From 3864dc6e69975fc7737fa4e0d86d2545e660b694 Mon Sep 17 00:00:00 2001 From: arjun Date: Wed, 26 May 2021 05:25:32 +0530 Subject: Updating documentation on repl logging to logs/puts.txt --- dragon/readme_docs.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dragon/readme_docs.rb b/dragon/readme_docs.rb index 020f856..aedf976 100644 --- a/dragon/readme_docs.rb +++ b/dragon/readme_docs.rb @@ -1109,7 +1109,7 @@ file called ~repl.rb~ and put it in ~mygame/app/repl.rb~: - If you use the `repl` method, the code will be executed and the DragonRuby Console will automatically open so you can see the results (on Mac and Linux, the results will also be printed to the terminal). -- All ~puts~ statements will also be saved to ~logs/log.txt~. So if you want to stay in your editor and not look at the terminal, or the DragonRuby Console, you can ~tail~ this file. +- All ~puts~ statements will also be saved to ~logs/puts.txt~. So if you want to stay in your editor and not look at the terminal, or the DragonRuby Console, you can ~tail~ this file. 4. To ignore code in ~repl.rb~, instead of commenting it out, prefix ~repl~ with the letter ~x~ and it'll be ignored. -- cgit v1.2.3 From 575b8ce2722d23355b137905e39aaaed2436b0ce Mon Sep 17 00:00:00 2001 From: Simon Chiang Date: Fri, 23 Apr 2021 11:26:45 -0600 Subject: Fix typos in storyline text --- samples/99_genre_platformer/the_little_probe/app/main.rb | 2 +- .../return_of_serenity/app/storyline_anka.rb | 8 ++++---- .../return_of_serenity/app/storyline_day_one.rb | 2 +- .../return_of_serenity/app/storyline_serenity_bio.rb | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/samples/99_genre_platformer/the_little_probe/app/main.rb b/samples/99_genre_platformer/the_little_probe/app/main.rb index 8fcf279..5c0ce61 100644 --- a/samples/99_genre_platformer/the_little_probe/app/main.rb +++ b/samples/99_genre_platformer/the_little_probe/app/main.rb @@ -33,7 +33,7 @@ class FallingCircle { text: "mission control, this is sasha. landing on europa successful.", distance_gate: 0 }, { text: "operation \"find earth 2.0\", initiated at 8-29-2036 14:00.", distance_gate: 0 }, { text: "jupiter's sure is beautiful...", distance_gate: 4000 }, - { text: "hmm, it seems there's some kind of anomoly in the sky", distance_gate: 7000 }, + { text: "hmm, it seems there's some kind of anomaly in the sky", distance_gate: 7000 }, { text: "dancing lights, i'll call them whisps.", distance_gate: 8000 }, { text: "#todo... look i ran out of time -_-", distance_gate: 9000 }, { text: "there's never enough time", distance_gate: 9000 }, diff --git a/samples/99_genre_rpg_narrative/return_of_serenity/app/storyline_anka.rb b/samples/99_genre_rpg_narrative/return_of_serenity/app/storyline_anka.rb index bad7795..8fc10b2 100644 --- a/samples/99_genre_rpg_narrative/return_of_serenity/app/storyline_anka.rb +++ b/samples/99_genre_rpg_narrative/return_of_serenity/app/storyline_anka.rb @@ -43,7 +43,7 @@ end def reply_to_anka args decision_graph anka_current_reply(args), - "Matthew's-- wife is doing-- well. What's-- even-- better-- is that he's-- a dad, and he didn't-- even-- know it. Should- I- leave- out the part about-- the crew- being-- in hibernation-- for 20-- years? They- should- enter-- statis-- on a high- note... Right?", + "Matthew's-- wife is doing-- well. What's-- even-- better-- is that he's-- a dad, and he didn't-- even-- know it. Should- I- leave- out the part about-- the crew- being-- in hibernation-- for 20-- years? They- should- enter-- stasis-- on a high- note... Right?", [:replied_with_whole_truth, "Whole-- Truth--", anka_reply_whole_truth], [:replied_with_half_truth, "Half-- Truth--", anka_reply_half_truth] end @@ -57,7 +57,7 @@ def anka_last_reply args end def anka_reply_whole_truth - "Matthew's wife is doing-- very-- well. In fact, she was pregnant. Matthew-- is a dad. He has a son. But, I need- all-- of-- you-- to brace-- yourselves. You've-- been in statis-- for 20 years. A lot has changed. Most of Earth's-- population--- didn't-- survive. Tell- Matthew-- that I'm-- sorry he didn't-- get to see- his- son grow- up." + "Matthew's wife is doing-- very-- well. In fact, she was pregnant. Matthew-- is a dad. He has a son. But, I need- all-- of-- you-- to brace-- yourselves. You've-- been in stasis-- for 20 years. A lot has changed. Most of Earth's-- population--- didn't-- survive. Tell- Matthew-- that I'm-- sorry he didn't-- get to see- his- son grow- up." end def anka_reply_half_truth @@ -92,9 +92,9 @@ end def anka_current_reply args if args.state.scene_history.include? :replied_to_serenity_alive_firmly - return "Hello. This is, Aanka. Sasha-- is still- trying-- to gather-- her wits about-- her, given- the gravity--- of your- last- reply. Thank- you- for being-- honest, and thank- you- for the help- with the ship- diagnostics. I was able-- to retrieve-- all of the navigation--- information---- after-- the battery--- swap. We- are ready-- to head back to Earth. Before-- we go- back- into-- statis, Matthew--- wanted-- to know- how his- wife- is doing. Please- reply-- as soon- as you can. He's-- not going-- to get- into-- the statis-- chamber-- until-- he knows- his wife is okay." + return "Hello. This is, Aanka. Sasha-- is still- trying-- to gather-- her wits about-- her, given- the gravity--- of your- last- reply. Thank- you- for being-- honest, and thank- you- for the help- with the ship- diagnostics. I was able-- to retrieve-- all of the navigation--- information---- after-- the battery--- swap. We- are ready-- to head back to Earth. Before-- we go- back- into-- stasis, Matthew--- wanted-- to know- how his- wife- is doing. Please- reply-- as soon- as you can. He's-- not going-- to get- into-- the stasis-- chamber-- until-- he knows- his wife is okay." else - return "Hello. This is, Aanka. Thank- you for the help- with the ship's-- diagnostics. I was able-- to retrieve-- all of the navigation--- information--- after-- the battery-- swap. I- know-- that- you didn't-- tell- the whole truth- about-- how far we are from- Earth. Don't-- worry. I understand-- why you did it. We- are ready-- to head back to Earth. Before-- we go- back- into-- statis, Matthew--- wanted-- to know- how his- wife- is doing. Please- reply-- as soon- as you can. He's-- not going-- to get- into-- the statis-- chamber-- until-- he knows- his wife is okay." + return "Hello. This is, Aanka. Thank- you for the help- with the ship's-- diagnostics. I was able-- to retrieve-- all of the navigation--- information--- after-- the battery-- swap. I- know-- that- you didn't-- tell- the whole truth- about-- how far we are from- Earth. Don't-- worry. I understand-- why you did it. We- are ready-- to head back to Earth. Before-- we go- back- into-- stasis, Matthew--- wanted-- to know- how his- wife- is doing. Please- reply-- as soon- as you can. He's-- not going-- to get- into-- the stasis-- chamber-- until-- he knows- his wife is okay." end end diff --git a/samples/99_genre_rpg_narrative/return_of_serenity/app/storyline_day_one.rb b/samples/99_genre_rpg_narrative/return_of_serenity/app/storyline_day_one.rb index 24b2b45..fb11c97 100644 --- a/samples/99_genre_rpg_narrative/return_of_serenity/app/storyline_day_one.rb +++ b/samples/99_genre_rpg_narrative/return_of_serenity/app/storyline_day_one.rb @@ -21,7 +21,7 @@ def day_one_infront_of_home args [0, 4, 3, 20, :day_one_ceremony] ], storylines: [ - [40, 20, 4, 4, "It looks like everyone- is already- at the rememberance-- ceremony."], + [40, 20, 4, 4, "It looks like everyone- is already- at the remembrance-- ceremony."], ] } end diff --git a/samples/99_genre_rpg_narrative/return_of_serenity/app/storyline_serenity_bio.rb b/samples/99_genre_rpg_narrative/return_of_serenity/app/storyline_serenity_bio.rb index 587f5f4..ad7653d 100644 --- a/samples/99_genre_rpg_narrative/return_of_serenity/app/storyline_serenity_bio.rb +++ b/samples/99_genre_rpg_narrative/return_of_serenity/app/storyline_serenity_bio.rb @@ -57,13 +57,13 @@ def serenity_bio_book args [ 4, 50, 56, 4, "The Title-- Reads: Never-- Forget-- Mission-- Serenity---"], [ 4, 38, 8, 8, "Name: Matthew--- R. Sex: Male--- Age-- at-- Departure: 36-----"], - [14, 38, 46, 8, "Tribute-- Text: Matthew graduated-- Magna-- Cum-- Laude-- from MIT--- with-- a- PHD---- in Aero-- Nautical--- Engineering. He was immensely--- competitive, and had an insatiable---- thirst- for aerial-- battle. From the age of twenty, he remained-- undefeated--- in the Israeli-- Air- Force- \"Blue Flag\" combat-- exercises. By the age of 29--- he had already-- risen through- the ranks, and became-- the Lieutenant--- General--- of Lufwaffe. Matthew-- volenteered-- to- pilot-- Mission-- Serenity. To- this day, his wife- and son- are pillars-- of strength- for us. Rest- in Peace- Matthew, we are sorry-- that- news of the pregancy-- never-- reached- you. Please forgive us."], + [14, 38, 46, 8, "Tribute-- Text: Matthew graduated-- Magna-- Cum-- Laude-- from MIT--- with-- a- PHD---- in Aero-- Nautical--- Engineering. He was immensely--- competitive, and had an insatiable---- thirst- for aerial-- battle. From the age of twenty, he remained-- undefeated--- in the Israeli-- Air- Force- \"Blue Flag\" combat-- exercises. By the age of 29--- he had already-- risen through- the ranks, and became-- the Lieutenant--- General--- of Lufwaffe. Matthew-- volunteered-- to- pilot-- Mission-- Serenity. To- this day, his wife- and son- are pillars-- of strength- for us. Rest- in Peace- Matthew, we are sorry-- that- news of the pregnancy-- never-- reached- you. Please forgive us."], [4, 26, 8, 8, "Name: Aanka--- P. Sex: Female--- Age-- at-- Departure: 9-----"], - [14, 26, 46, 8, "Tribute-- Text: Aanka--- gratuated--- Magna-- Cum- Laude-- from MIT, at- the- age- of eight, with a- PHD---- in Astro-- Physics. Her-- IQ--- was over 390, the highest-- ever- recorded--- IQ-- in- human-- history. She changed- the landscape-- of Physics-- with her efforts- in- unravelling--- the mysteries--- of- Dark- Matter--. Anka discovered-- the threat- of Halley's-- Comet-- collision--- with Earth. She spear headed-- the global-- effort-- for Misson-- Serenity. Her- multilingual--- address-- to- the world-- brought- us all hope."], + [14, 26, 46, 8, "Tribute-- Text: Aanka--- graduated--- Magna-- Cum- Laude-- from MIT, at- the- age- of eight, with a- PHD---- in Astro-- Physics. Her-- IQ--- was over 390, the highest-- ever- recorded--- IQ-- in- human-- history. She changed- the landscape-- of Physics-- with her efforts- in- unravelling--- the mysteries--- of- Dark- Matter--. Anka discovered-- the threat- of Halley's-- Comet-- collision--- with Earth. She spear headed-- the global-- effort-- for Mission-- Serenity. Her- multilingual--- address-- to- the world-- brought- us all hope."], [4, 14, 8, 8, "Name: Sasha--- N. Sex: Female--- Age-- at-- Departure: 29-----"], - [14, 14, 46, 8, "Tribute-- Text: Sasha gratuated-- Magna-- Cum- Laude-- from MIT--- with-- a- PHD---- in Computer---- Science----. She-- was-- brilliant--, strong- willed--, and-- a-- stunningly--- beautiful--- woman---. Sasha---- is- the- creator--- of the world's--- first- Ruby--- Quantum-- Machine---. After-- much- critical--- acclaim--, the Quantum-- Computer-- was placed in MIT's---- Museam-- next- to- Richard--- G. and Thomas--- K.'s---- Lisp-- Machine---. Her- engineering--- skills-- were-- paramount--- for Mission--- Serenity's--- success. Humanity-- misses-- you-- dearly,-- Sasha--. Life-- shines-- a dimmer-- light-- now- that- your- angelic- voice-- can never- be heard- again."], + [14, 14, 46, 8, "Tribute-- Text: Sasha graduated-- Magna-- Cum- Laude-- from MIT--- with-- a- PHD---- in Computer---- Science----. She-- was-- brilliant--, strong- willed--, and-- a-- stunningly--- beautiful--- woman---. Sasha---- is- the- creator--- of the world's--- first- Ruby--- Quantum-- Machine---. After-- much- critical--- acclaim--, the Quantum-- Computer-- was placed in MIT's---- Museum-- next- to- Richard--- G. and Thomas--- K.'s---- Lisp-- Machine---. Her- engineering--- skills-- were-- paramount--- for Mission--- Serenity's--- success. Humanity-- misses-- you-- dearly,-- Sasha--. Life-- shines-- a dimmer-- light-- now- that- your- angelic- voice-- can never- be heard- again."], ], scenes: [ [*hotspot_bottom, :serenity_bio_finally_to_bed] -- cgit v1.2.3 From 0f348fa240ff2bb0fa508368411e6d1fc73e167a Mon Sep 17 00:00:00 2001 From: Simon Chiang Date: Fri, 23 Apr 2021 11:18:12 -0600 Subject: Fix spelling separator not seperator --- dragon/console_prompt.rb | 10 ++++----- .../00_beginner_ruby_primer/app/main.rb | 10 ++++----- .../03_render_target_viewports/app/main.rb | 24 +++++++++++----------- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/dragon/console_prompt.rb b/dragon/console_prompt.rb index b97bdba..d4c4026 100644 --- a/dragon/console_prompt.rb +++ b/dragon/console_prompt.rb @@ -157,11 +157,11 @@ S # partition the original list of items into a string to be printed items.each_slice(columns).each_with_index do |cells, i| - pretty_print_row_seperator string_width, cell_width, column_width, columns + pretty_print_row_separator string_width, cell_width, column_width, columns pretty_print_row cells, string_width, cell_width, column_width, columns end - pretty_print_row_seperator string_width, cell_width, column_width, columns + pretty_print_row_separator string_width, cell_width, column_width, columns end end @@ -174,17 +174,17 @@ S "#{" " * (string_width.length - c.length) } #{c} |" end.join - # remove seperators between empty values + # remove separators between empty values formated_row = formated_row.gsub(" | ", " ") puts formated_row end - def pretty_print_row_seperator string_width, cell_width, column_width, columns + def pretty_print_row_separator string_width, cell_width, column_width, columns # this is a joint: +-------- column_joint = "+#{"-" * cell_width}" - # multiple joints create a row seperator: +----+----+ + # multiple joints create a row separator: +----+----+ puts (column_joint * columns) + "+" end diff --git a/samples/00_learn_ruby_optional/00_beginner_ruby_primer/app/main.rb b/samples/00_learn_ruby_optional/00_beginner_ruby_primer/app/main.rb index 6822cf3..711ca74 100644 --- a/samples/00_learn_ruby_optional/00_beginner_ruby_primer/app/main.rb +++ b/samples/00_learn_ruby_optional/00_beginner_ruby_primer/app/main.rb @@ -83,8 +83,8 @@ def tick_reset_button end end -def seperator - @seperator = "=" * 80 +def separator + @separator = "=" * 80 end def tick_intro @@ -286,11 +286,11 @@ def queue_message message $gtk.args.state.messages << message last_three = [$gtk.console.log[-3], $gtk.console.log[-2], $gtk.console.log[-1]].reject_nil $gtk.console.log.clear - puts seperator + puts separator $gtk.console.log += last_three - puts seperator + puts separator puts message - puts seperator + puts separator end def console_has? message diff --git a/samples/07_advanced_rendering/03_render_target_viewports/app/main.rb b/samples/07_advanced_rendering/03_render_target_viewports/app/main.rb index b748ffa..5c38d6c 100644 --- a/samples/07_advanced_rendering/03_render_target_viewports/app/main.rb +++ b/samples/07_advanced_rendering/03_render_target_viewports/app/main.rb @@ -111,7 +111,7 @@ class TechDemo button_tech_demo export_game_state_demo window_state_demo - render_seperators + render_separators end # Shows output of different kinds of labels on the screen @@ -408,28 +408,28 @@ class TechDemo end #Sets values for the horizontal separator (divides demo sections) - def horizontal_seperator y, x, x2 + def horizontal_separator y, x, x2 [x, y, x2, y, 150, 150, 150] end #Sets the values for the vertical separator (divides demo sections) - def vertical_seperator x, y, y2 + def vertical_separator x, y, y2 [x, y, x, y2, 150, 150, 150] end # Outputs vertical and horizontal separators onto the screen to separate each demo section. - def render_seperators - outputs.lines << horizontal_seperator(505, grid.left, 445) - outputs.lines << horizontal_seperator(353, grid.left, 445) - outputs.lines << horizontal_seperator(264, grid.left, 445) - outputs.lines << horizontal_seperator(174, grid.left, 445) + def render_separators + outputs.lines << horizontal_separator(505, grid.left, 445) + outputs.lines << horizontal_separator(353, grid.left, 445) + outputs.lines << horizontal_separator(264, grid.left, 445) + outputs.lines << horizontal_separator(174, grid.left, 445) - outputs.lines << vertical_seperator(445, grid.top, grid.bottom) + outputs.lines << vertical_separator(445, grid.top, grid.bottom) - outputs.lines << horizontal_seperator(690, 445, 820) - outputs.lines << horizontal_seperator(426, 445, 820) + outputs.lines << horizontal_separator(690, 445, 820) + outputs.lines << horizontal_separator(426, 445, 820) - outputs.lines << vertical_seperator(820, grid.top, grid.bottom) + outputs.lines << vertical_separator(820, grid.top, grid.bottom) end end -- cgit v1.2.3 From 1404fd05a99cf745c33a4316b9d5e1562083c3ae Mon Sep 17 00:00:00 2001 From: Simon Chiang Date: Fri, 23 Apr 2021 11:20:30 -0600 Subject: Fix spelling identifier not identifer --- dragon/ios_wizard.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dragon/ios_wizard.rb b/dragon/ios_wizard.rb index 0d48108..d2c3dc5 100644 --- a/dragon/ios_wizard.rb +++ b/dragon/ios_wizard.rb @@ -265,21 +265,21 @@ class IOSWizard end app_id_with_team_identifier = (provisioning_profile_xml environment)[:children].first[:children].first[:children][13][:children][application_identifier_index + 1][:children].first[:data] - team_identifer = team_identifier_from_provisioning_profile environment - app_id_with_team_identifier.gsub "#{team_identifer}.", "" + team_identifier = team_identifier_from_provisioning_profile environment + app_id_with_team_identifier.gsub "#{team_identifier}.", "" end def team_identifier_from_provisioning_profile environment - team_identifer_index = (provisioning_profile_xml environment)[:children][0][:children][0][:children][13][:children][0][:children][0][:data] + team_identifier_index = (provisioning_profile_xml environment)[:children][0][:children][0][:children][13][:children][0][:children][0][:data] (provisioning_profile_xml environment)[:children][0][:children][0][:children][13][:children].each.with_index do |node, i| if node[:children] && node[:children][0] && node[:children][0][:data] == "com.apple.developer.team-identifier" - team_identifer_index = i + team_identifier_index = i break end end - (provisioning_profile_xml environment)[:children].first[:children].first[:children][13][:children][team_identifer_index + 1][:children].first[:data] + (provisioning_profile_xml environment)[:children].first[:children].first[:children][13][:children][team_identifier_index + 1][:children].first[:data] end def determine_app_id -- cgit v1.2.3 From d5115606c96b0fe0affd72e6e0b72edce7e51042 Mon Sep 17 00:00:00 2001 From: Simon Chiang Date: Fri, 23 Apr 2021 09:46:41 -0600 Subject: Typo fixes --- deploy_template/mygame/documentation/02-labels.md | 4 +-- .../mygame/documentation/03-solids-and-borders.md | 4 +-- deploy_template/mygame/documentation/04-lines.md | 4 +-- deploy_template/mygame/documentation/05-sprites.md | 2 +- docs/todo/03-solids-and-borders.md | 4 +-- docs/todo/04-lines.md | 4 +-- docs/todo/05-sprites.md | 4 +-- docs/todo/08-controllers.md | 2 +- dragon/assert.rb | 8 +++--- dragon/config.rb | 2 +- dragon/controller_config.rb | 2 +- dragon/directional_input_helper_methods.rb | 2 +- dragon/docs.rb | 2 +- dragon/geometry.rb | 2 +- dragon/help.rb | 2 +- dragon/ios_wizard.rb | 4 +-- dragon/mouse_docs.rb | 12 ++++---- dragon/numeric.rb | 8 +++--- dragon/outputs_docs.rb | 8 +++--- dragon/readme_docs.rb | 8 +++--- dragon/remote_hotload_client.rb | 2 +- samples/01_rendering_basics/01_labels/app/main.rb | 6 ++-- samples/02_input_basics/01_keyboard/app/main.rb | 4 +-- .../03_mouse_point_to_rect/app/main.rb | 2 +- .../01_animation_using_separate_pngs/app/main.rb | 4 +-- .../04_color_and_rotation/app/main.rb | 4 +-- .../01_simple/app/main.rb | 6 ++-- .../02_moving_objects/app/main.rb | 2 +- .../04_box_collision/app/main.rb | 6 ++-- .../05_box_collision_2/app/main.rb | 4 +-- .../06_jump_physics/app/main.rb | 2 +- .../07_jump_physics/app/main.rb | 2 +- .../08_bouncing_on_collision/app/block.rb | 8 +++--- .../08_bouncing_on_collision/app/main.rb | 2 +- .../08_bouncing_on_collision/app/peg.rb | 18 ++++++------ .../08_bouncing_on_collision/app/vector2d.rb | 2 +- .../09_arbitrary_collision/app/linear_collider.rb | 4 +-- .../09_arbitrary_collision/app/main.rb | 2 +- .../09_arbitrary_collision/app/vector2d.rb | 2 +- .../app/linear_collider.rb | 6 ++-- .../app/vector2d.rb | 2 +- samples/05_mouse/01_mouse_click/app/main.rb | 2 +- samples/05_mouse/02_mouse_move/app/main.rb | 4 +-- .../05_mouse/03_mouse_move_paint_app/app/main.rb | 2 +- samples/06_save_load/01_save_load_game/app/main.rb | 8 +++--- .../03_render_target_viewports/app/main.rb | 4 +-- .../02_sprites_as_entities/app/main.rb | 2 +- .../04_sprites_as_classes/app/main.rb | 2 +- .../05_static_sprites_as_classes/app/main.rb | 2 +- .../app/main.rb | 2 +- .../01_breadth_first_search/app/main.rb | 2 +- .../02_detailed_breadth_first_search/app/main.rb | 2 +- .../06_heuristic/app/main.rb | 2 +- .../07_heuristic_with_walls/app/main.rb | 2 +- samples/99_genre_arcade/snakemoji/app/main.rb | 6 ++-- samples/99_genre_arcade/twinstick/app/main.rb | 2 +- .../craft_game_starting_point/app/main.rb | 32 +++++++++++----------- samples/99_genre_lowrez/nokia_3310/app/main.rb | 6 ++-- .../99_genre_lowrez/resolution_64x64/app/main.rb | 6 ++-- .../99_genre_platformer/clepto_frog/app/main.rb | 2 +- .../choose_your_own_adventure/app/decision.rb | 2 +- .../choose_your_own_adventure/app/main.rb | 2 +- .../01_roguelike_starting_point/app/main.rb | 2 +- .../app/sprite_lookup.rb | 2 +- .../02_roguelike_line_of_sight/app/main.rb | 2 +- .../roguelike_line_of_sight/app/main.rb | 2 +- .../roguelike_line_of_sight/app/sprite_lookup.rb | 2 +- .../roguelike_starting_point/app/main.rb | 2 +- .../isometric_grid/app/main.rb | 8 +++--- 69 files changed, 146 insertions(+), 146 deletions(-) diff --git a/deploy_template/mygame/documentation/02-labels.md b/deploy_template/mygame/documentation/02-labels.md index ea2642e..8cfa35e 100644 --- a/deploy_template/mygame/documentation/02-labels.md +++ b/deploy_template/mygame/documentation/02-labels.md @@ -43,7 +43,7 @@ args.outputs.labels << [640, 360, "Hello world", 0, 1] ## RGBA - Colors and Alpha -Labels can have colors. The value for the color is an number between +Labels can have colors. The value for the color is a number between `0` and `255`. A green label with 50% opacity. @@ -100,7 +100,7 @@ args.outputs.labels << { ## Duck Typing (Advanced) You can also create a class with line properties and render it as a primitive. -ALL properties must on the class. ADDITIONALLY, a method called +ALL properties must be on the class. ADDITIONALLY, a method called `primitive_marker` must be defined on the class. Here is an example: diff --git a/deploy_template/mygame/documentation/03-solids-and-borders.md b/deploy_template/mygame/documentation/03-solids-and-borders.md index d309e40..fb51e3a 100644 --- a/deploy_template/mygame/documentation/03-solids-and-borders.md +++ b/deploy_template/mygame/documentation/03-solids-and-borders.md @@ -33,7 +33,7 @@ args.outputs.borders << [100, 100, 160, 90] ## RGBA - Colors and Alpha -The value for the color and alpha is an number between `0` and `255`. The +The value for the color and alpha is a number between `0` and `255`. The alpha property is optional and will be set to `255` if not specified. Creates a green solid rectangle with an opacity of 50%. @@ -93,7 +93,7 @@ args.outputs.borders << { ## Duck Typing (Advanced) You can also create a class with solid/border properties and render it as a primitive. -ALL properties must on the class. ADDITIONALLY, a method called `primitive_marker` +ALL properties must be on the class. ADDITIONALLY, a method called `primitive_marker` must be defined on the class. Here is an example: diff --git a/deploy_template/mygame/documentation/04-lines.md b/deploy_template/mygame/documentation/04-lines.md index 03c1abc..20faa44 100644 --- a/deploy_template/mygame/documentation/04-lines.md +++ b/deploy_template/mygame/documentation/04-lines.md @@ -35,7 +35,7 @@ args.outputs.lines << [ 0, 360, 1280, 360] ## RGBA - Colors and Alpha -The value for the color and alpha is an number between `0` and `255`. The +The value for the color and alpha is a number between `0` and `255`. The alpha property is optional and will be set to `255` if not specified. Creates a green horizontal line through the center of the scene with an opacity of 50%. @@ -75,7 +75,7 @@ args.outputs.lines << { ## Duck Typing (Advanced) You can also create a class with line properties and render it as a primitive. -ALL properties must on the class. ADDITIONALLY, a method called `primitive_marker` +ALL properties must be on the class. ADDITIONALLY, a method called `primitive_marker` must be defined on the class. Here is an example: diff --git a/deploy_template/mygame/documentation/05-sprites.md b/deploy_template/mygame/documentation/05-sprites.md index e4d5cbb..973ff29 100644 --- a/deploy_template/mygame/documentation/05-sprites.md +++ b/deploy_template/mygame/documentation/05-sprites.md @@ -203,7 +203,7 @@ args.outputs.sprites << { ## Duck Typing (Advanced) You can also create a class with sprite properties and render it as a primitive. -ALL properties must on the class. ADDITIONALLY, a method called `primitive_marker` +ALL properties must be on the class. ADDITIONALLY, a method called `primitive_marker` must be defined on the class. Here is an example: diff --git a/docs/todo/03-solids-and-borders.md b/docs/todo/03-solids-and-borders.md index 0ed2fc9..34acc96 100644 --- a/docs/todo/03-solids-and-borders.md +++ b/docs/todo/03-solids-and-borders.md @@ -33,7 +33,7 @@ args.outputs.borders << [100, 100, 160, 90] ## RGBA - Colors and Alpha -The value for the color and alpha is an number between `0` and `255`. The +The value for the color and alpha is a number between `0` and `255`. The alpha property is optional and will be set to `255` if not specified. Creates a green solid rectangle with an opacity of 50%. @@ -93,7 +93,7 @@ args.outputs.borders << { ## Duck Typing (Advanced) You can also create a class with solid/border properties and render it as a primitive. -ALL properties must on the class. ADDITIONALLY, a method called `primitive_marker` +ALL properties must be on the class. ADDITIONALLY, a method called `primitive_marker` must be defined on the class. Here is an example: diff --git a/docs/todo/04-lines.md b/docs/todo/04-lines.md index 03c1abc..20faa44 100644 --- a/docs/todo/04-lines.md +++ b/docs/todo/04-lines.md @@ -35,7 +35,7 @@ args.outputs.lines << [ 0, 360, 1280, 360] ## RGBA - Colors and Alpha -The value for the color and alpha is an number between `0` and `255`. The +The value for the color and alpha is a number between `0` and `255`. The alpha property is optional and will be set to `255` if not specified. Creates a green horizontal line through the center of the scene with an opacity of 50%. @@ -75,7 +75,7 @@ args.outputs.lines << { ## Duck Typing (Advanced) You can also create a class with line properties and render it as a primitive. -ALL properties must on the class. ADDITIONALLY, a method called `primitive_marker` +ALL properties must be on the class. ADDITIONALLY, a method called `primitive_marker` must be defined on the class. Here is an example: diff --git a/docs/todo/05-sprites.md b/docs/todo/05-sprites.md index e8030ab..773a007 100644 --- a/docs/todo/05-sprites.md +++ b/docs/todo/05-sprites.md @@ -29,7 +29,7 @@ args.outputs.sprites << [100, 100, 32, 64, "sprites/player.png"] ## Rotation / Angle -Unlike `solids` and `borders`, sprites can be rotated. This is how you rotate a sprite 90 degress. +Unlike `solids` and `borders`, sprites can be rotated. This is how you rotate a sprite 90 degrees. Note: All angles in DragonRuby Game Toolkit are represented in degrees (not radians). @@ -180,7 +180,7 @@ args.outputs.sprites << { ## Duck Typing (Advanced) You can also create a class with sprite properties and render it as a primitive. -ALL properties must on the class. ADDITIONALLY, a method called `primitive_marker` +ALL properties must be on the class. ADDITIONALLY, a method called `primitive_marker` must be defined on the class. Here is an example: diff --git a/docs/todo/08-controllers.md b/docs/todo/08-controllers.md index aa85ee8..9ed9199 100644 --- a/docs/todo/08-controllers.md +++ b/docs/todo/08-controllers.md @@ -33,7 +33,7 @@ end # Truthy Keys -You can access all triggered keys through `thruthy_keys` on `keyboard`, `controller_one`, and `controller_two`. +You can access all triggered keys through `truthy_keys` on `keyboard`, `controller_one`, and `controller_two`. This is how you would write all keys to a file. The game must be in the foreground and have focus for this data to be recorded. diff --git a/dragon/assert.rb b/dragon/assert.rb index bc21add..5ba344d 100644 --- a/dragon/assert.rb +++ b/dragon/assert.rb @@ -24,10 +24,10 @@ To add an assertion open up this class and write: class Assert def custom_assertion actual, expected, message = nil - # this tell Game Toolkit that an assertion was performed (so that the test isn't marked inconclusive). + # this tells Game Toolkit that an assertion was performed (so that the test isn't marked inconclusive). @assertion_performed = true - # perform your custom logic here and rais an exception to denote a failure. + # perform your custom logic here and raise an exception to denote a failure. raise "Some Error. #{message}." end @@ -37,14 +37,14 @@ end attr :assertion_performed =begin -Us this if you are throwing your own exceptions and you want to mark the tests as ran (so that it wont be marked as inconclusive). +Use this if you are throwing your own exceptions and you want to mark the tests as ran (so that it wont be marked as inconclusive). =end def ok! @assertion_performed = true end =begin -Assert if a value is a thruthy value. All assert method take an optional final parameter that is the message to display to the user. +Assert if a value is a truthy value. All assert methods take an optional final parameter that is the message to display to the user. @example diff --git a/dragon/config.rb b/dragon/config.rb index de57085..a2887dc 100644 --- a/dragon/config.rb +++ b/dragon/config.rb @@ -127,7 +127,7 @@ module GTK def previous_part if @current_part > 0 - # remove the binding that we previous had here so it can be reused. + # remove the binding that we previously had here so it can be reused. bindstr = @bindings[@current_part - 1] @bindings[@current_part - 1] = nil @used_bindings[bindstr] = nil diff --git a/dragon/controller_config.rb b/dragon/controller_config.rb index 091fa1e..c315ab5 100644 --- a/dragon/controller_config.rb +++ b/dragon/controller_config.rb @@ -125,7 +125,7 @@ module GTK def previous_part if @current_part > 0 - # remove the binding that we previous had here so it can be reused. + # remove the binding that we previously had here so it can be reused. bindstr = @bindings[@current_part - 1] @bindings[@current_part - 1] = nil @used_bindings[bindstr] = nil diff --git a/dragon/directional_input_helper_methods.rb b/dragon/directional_input_helper_methods.rb index a587212..44913ba 100644 --- a/dragon/directional_input_helper_methods.rb +++ b/dragon/directional_input_helper_methods.rb @@ -13,7 +13,7 @@ module GTK error_message = <<-S * ERROR -The GTK::DirectionalKeys module should only be included in objects that respond to the following api heirarchy: +The GTK::DirectionalKeys module should only be included in objects that respond to the following api hierarchy: - (#{ directional_methods.join("|") }) - key_held.(#{ directional_methods.join("|") }) diff --git a/dragon/docs.rb b/dragon/docs.rb index cc80d7e..e6f6e2d 100644 --- a/dragon/docs.rb +++ b/dragon/docs.rb @@ -46,7 +46,7 @@ module DocsOrganizer unsorted.each do |k| puts <<-S * WARNING: #{klass.name} is not included in DocsOrganizer::class_sort_order. Please place this -module in it's correct topilogical order. +module in it's correct topological order. S end diff --git a/dragon/geometry.rb b/dragon/geometry.rb index 9385022..c2974db 100644 --- a/dragon/geometry.rb +++ b/dragon/geometry.rb @@ -129,7 +129,7 @@ S end - # Returns a primitive that is anchored/repositioned based off its retangle. + # Returns a primitive that is anchored/repositioned based off its rectangle. # @gtk def anchor_rect anchor_x, anchor_y current_w = self.w diff --git a/dragon/help.rb b/dragon/help.rb index aee60d8..9644347 100644 --- a/dragon/help.rb +++ b/dragon/help.rb @@ -57,7 +57,7 @@ S * :sprite (if :primitive_marker returns :sprite) ** :x, :y, :w, :h ** :angle, :angle_anchor_x, :angle_anchor_y -default for angle: 0 (0 to 360 degress) +default for angle: 0 (0 to 360 degrees) default for angle_anchor_(x|y): 0 (decimal value between 0 and 1.0, 0.5 means center) ** :r, :g, :b, :a ** :tile_x, :tile_y diff --git a/dragon/ios_wizard.rb b/dragon/ios_wizard.rb index d2c3dc5..9383749 100644 --- a/dragon/ios_wizard.rb +++ b/dragon/ios_wizard.rb @@ -227,7 +227,7 @@ class IOSWizard def determine_team_identifier @team_name = (team_identifier_from_provisioning_profile @opts[:env]) - log_info "Team Identifer is: #{@team_name}" + log_info "Team Identifier is: #{@team_name}" end def determine_app_name @@ -357,7 +357,7 @@ class IOSWizard "** 1. Open Xcode.", "** 2. Log into your developer account. Xcode -> Preferences -> Accounts.", { w: 700, h: 98, path: get_reserved_sprite("login-xcode.png") }, - "** 3. After loggin in, select Manage Certificates...", + "** 3. After logging in, select Manage Certificates...", { w: 700, h: 115, path: get_reserved_sprite("manage-certificates.png") }, "** 4. Add a certificate for Apple Development.", { w: 700, h: 217, path: get_reserved_sprite("add-cert.png") }, diff --git a/dragon/mouse_docs.rb b/dragon/mouse_docs.rb index ef4b923..523d5ce 100644 --- a/dragon/mouse_docs.rb +++ b/dragon/mouse_docs.rb @@ -46,12 +46,12 @@ The ~GTK::MousePoint~ has the following properties. - ~x~: Integer representing the mouse's x. - ~y~: Integer representing the mouse's y. - ~point~: Array with the ~x~ and ~y~ values. -- ~w~: Width of the point that always returns ~0~ (included so that it can seemlessly work with ~GTK::Geometry~ functions). -- ~h~: Height of the point that always returns ~0~ (included so that it can seemlessly work with ~GTK::Geometry~ functions). -- ~left~: This value is the same as ~x~ (included so that it can seemlessly work with ~GTK::Geometry~ functions). -- ~right~: This value is the same as ~x~ (included so that it can seemlessly work with ~GTK::Geometry~ functions). -- ~top~: This value is the same as ~y~ (included so that it can seemlessly work with ~GTK::Geometry~ functions). -- ~bottom~: This value is the same as ~y~ (included so that it can seemlessly work with ~GTK::Geometry~ functions). +- ~w~: Width of the point that always returns ~0~ (included so that it can seamlessly work with ~GTK::Geometry~ functions). +- ~h~: Height of the point that always returns ~0~ (included so that it can seamlessly work with ~GTK::Geometry~ functions). +- ~left~: This value is the same as ~x~ (included so that it can seamlessly work with ~GTK::Geometry~ functions). +- ~right~: This value is the same as ~x~ (included so that it can seamlessly work with ~GTK::Geometry~ functions). +- ~top~: This value is the same as ~y~ (included so that it can seamlessly work with ~GTK::Geometry~ functions). +- ~bottom~: This value is the same as ~y~ (included so that it can seamlessly work with ~GTK::Geometry~ functions). - ~created_at~: The tick (~args.state.tick_count~) that this structure was created. - ~global_created_at~: The global tick (~Kernel.global_tick_count~) that this structure was created. diff --git a/dragon/numeric.rb b/dragon/numeric.rb index 93bacae..3cf1314 100644 --- a/dragon/numeric.rb +++ b/dragon/numeric.rb @@ -256,7 +256,7 @@ S self * Math::PI.fdiv(180) end - # Converts a number representing an angle in radians to degress. + # Converts a number representing an angle in radians to degrees. # # @gtk def to_degrees @@ -273,21 +273,21 @@ S GTK::Geometry.to_square(self, x, y, anchor_x, anchor_y) end - # Returns a normal vector for a number that represents an angle in degress. + # Returns a normal vector for a number that represents an angle in degrees. # # @gtk def vector max_value = 1 [vector_x(max_value), vector_y(max_value)] end - # Returns the y component of a normal vector for a number that represents an angle in degress. + # Returns the y component of a normal vector for a number that represents an angle in degrees. # # @gtk def vector_y max_value = 1 max_value * Math.sin(self.to_radians) end - # Returns the x component of a normal vector for a number that represents an angle in degress. + # Returns the x component of a normal vector for a number that represents an angle in degrees. # # @gtk def vector_x max_value = 1 diff --git a/dragon/outputs_docs.rb b/dragon/outputs_docs.rb index cd4a20c..b2dc57d 100644 --- a/dragon/outputs_docs.rb +++ b/dragon/outputs_docs.rb @@ -80,7 +80,7 @@ wide and 90 pixels tall. ** Rendering a solid using an Array with colors and alpha -The value for the color and alpha is an number between ~0~ and ~255~. The +The value for the color and alpha is a number between ~0~ and ~255~. The alpha property is optional and will be set to ~255~ if not specified. Creates a green solid rectangle with an opacity of 50%. @@ -116,7 +116,7 @@ be provided in any order. ** Rendering a solid using a Class You can also create a class with solid/border properties and render it as a primitive. -ALL properties must on the class. *Additionally*, a method called ~primitive_marker~ +ALL properties must be on the class. *Additionally*, a method called ~primitive_marker~ must be defined on the class. Here is an example: @@ -171,7 +171,7 @@ wide and 90 pixels tall. ** Rendering a sprite using an Array with colors and alpha -The value for the color and alpha is an number between ~0~ and ~255~. The +The value for the color and alpha is a number between ~0~ and ~255~. The alpha property is optional and will be set to ~255~ if not specified. Creates a green circle sprite with an opacity of 50%. @@ -209,7 +209,7 @@ be provided in any order. ** Rendering a solid using a Class You can also create a class with solid/border properties and render it as a primitive. -ALL properties must on the class. *Additionally*, a method called ~primitive_marker~ +ALL properties must be on the class. *Additionally*, a method called ~primitive_marker~ must be defined on the class. Here is an example: diff --git a/dragon/readme_docs.rb b/dragon/readme_docs.rb index aedf976..78e0320 100644 --- a/dragon/readme_docs.rb +++ b/dragon/readme_docs.rb @@ -430,7 +430,7 @@ Console type: ~$wizards.ios.start~ and you will be guided through the deployment process. To deploy to Android, you need to have an Android emulator/device, and -a environment that is able to run Android SDK. ~dragonruby-publish~ +an environment that is able to run Android SDK. ~dragonruby-publish~ will create an APK for you. From there, you can sign the APK and install it to your device. The signing and installation procedure varies from OS to OS. Here's an example of what the command might look @@ -453,7 +453,7 @@ The following tenants of DragonRuby are what set us apart from other game engines. Given that Game Toolkit is a relatively new engine, there are definitely features that are missing. So having a big check list of "all the cool things" is not this engine's forte. This is -compensated with a strong commitment to the following principals. +compensated with a strong commitment to the following principles. ** Challenge The Status Quo @@ -1145,7 +1145,7 @@ challenges in creating something that is compatible. You can use DragonRuby's replay capabilities to troubleshoot: 1. DragonRuby is hot loaded which gives you a very fast feedback loop (if the game throws an exception, it's because of the code you just added). -2. Use ~./dragonruby mygame --record~ to create a game play recording that you can use to find the exception (you can replay a recoding by executing ~./dragonruby mygame --replay last_replay.txt~ or through the DragonRuby Console using ~$gtk.recording.start_replay "last_replay.txt"~. +2. Use ~./dragonruby mygame --record~ to create a game play recording that you can use to find the exception (you can replay a recording by executing ~./dragonruby mygame --replay last_replay.txt~ or through the DragonRuby Console using ~$gtk.recording.start_replay "last_replay.txt"~. 3. DragonRuby also ships with a unit testing facility. You can invoke the following command to run a test: ~./dragonruby . --eval some_ruby_file.rb --no-tick~. 4. Get into the habit of adding debugging facilities within the game itself. You can add drawing primitives to ~args.outputs.debug~ that will render on top of your game but will be ignored in a production release. 5. Debugging something that runs at 60fps is (imo) not that helpful. The exception you are seeing could have been because of a change that occurred many frames ago. @@ -1158,7 +1158,7 @@ Let's check the official source for the answer to this question: isrubydead.com: [[https://isrubydead.com/]]. On a more serious note, Ruby's _quantity_ levels aren't what they used -to be. And that's totally fine. Every one chases the new and shiny. +to be. And that's totally fine. Everyone chases the new and shiny. What really matters is _quality/maturity_. Here is the latest (StackOverflow Survey sorted by highest paid developers)[https://insights.stackoverflow.com/survey/2019#top-paying-technologies]. diff --git a/dragon/remote_hotload_client.rb b/dragon/remote_hotload_client.rb index 87693cd..ce8f175 100644 --- a/dragon/remote_hotload_client.rb +++ b/dragon/remote_hotload_client.rb @@ -47,7 +47,7 @@ module GTK def local_state @local_state ||= OpenEntity.new @local_state.hotload_client ||= @local_state.new_entity(:hotload_client, - notes: "This enitity is used by DragonRuby Game Toolkit to provide you hotloading on remote machines.", + notes: "This entity is used by DragonRuby Game Toolkit to provide you hotloading on remote machines.", changes: { }, changes_queue: [], reloaded_files_times: []) diff --git a/samples/01_rendering_basics/01_labels/app/main.rb b/samples/01_rendering_basics/01_labels/app/main.rb index c3e1afc..8a5e866 100644 --- a/samples/01_rendering_basics/01_labels/app/main.rb +++ b/samples/01_rendering_basics/01_labels/app/main.rb @@ -2,12 +2,12 @@ APIs listing that haven't been encountered in a previous sample apps: -- args.outputs.labels: An array. Values in this array generate labels +- args.outputs.labels: An array. Values in this array generate labels on the screen. - args.grid.(left|right|top|bottom): Pixel value for the boundaries of the virtual 720 p screen (Dragon Ruby Game Toolkits's virtual resolution is always 1280x720). - Numeric#shift_(left|right|up|down): Shifts the Numeric in the correct direction - by adding or subracting. + by adding or subtracting. =end @@ -27,7 +27,7 @@ APIs listing that haven't been encountered in a previous sample apps: # The tick method is called by DragonRuby every frame # args contains all the information regarding the game. def tick args - tick_instructions args, "Sample app shows different version of label sizes and alignments. And how to use hashes instead of arrays." + tick_instructions args, "Sample app shows different versions of label sizes and alignments. And how to use hashes instead of arrays." # Here are some examples of simple labels, with the minimum number of parameters # Note that the default values for the other parameters are 0, except for Alpha which is 255 and Font Style which is the default font args.outputs.labels << [400, 620, "Here is a label with just an x, y, and text"] diff --git a/samples/02_input_basics/01_keyboard/app/main.rb b/samples/02_input_basics/01_keyboard/app/main.rb index 3c5e1b4..d0321ef 100644 --- a/samples/02_input_basics/01_keyboard/app/main.rb +++ b/samples/02_input_basics/01_keyboard/app/main.rb @@ -4,7 +4,7 @@ APIs listing that haven't been encountered in a previous sample apps: - args.inputs.keyboard.key_up.KEY: The value of the properties will be set to the frame that the key_up event occurred (the frame correlates - to args.state.tick_count). Otherwise the value will be nil. + to args.state.tick_count). Otherwise the value will be nil. - args.state.PROPERTY: The state property on args is a dynamic structure. You can define ANY property here with ANY type of arbitrary nesting. Properties defined on args.state will be retained @@ -28,7 +28,7 @@ def tick args args.outputs.labels << [460, row_to_px(args, 2), "Keyboard input: args.inputs.keyboard.key_up.h", small_font] args.outputs.labels << [460, row_to_px(args, 3), "Press \"h\" on the keyboard.", small_font] - # Input on a specifc key can be found through args.inputs.keyboard.key_up followed by the key + # Input on a specific key can be found through args.inputs.keyboard.key_up followed by the key if args.inputs.keyboard.key_up.h args.state.h_pressed_at = args.state.tick_count end diff --git a/samples/02_input_basics/03_mouse_point_to_rect/app/main.rb b/samples/02_input_basics/03_mouse_point_to_rect/app/main.rb index 7dd627f..1e30943 100644 --- a/samples/02_input_basics/03_mouse_point_to_rect/app/main.rb +++ b/samples/02_input_basics/03_mouse_point_to_rect/app/main.rb @@ -36,7 +36,7 @@ APIs that haven't been encountered in a previous sample apps: # This is useful to determine if a click occurred in a rect def tick args - tick_instructions args, "Sample app shows how to determing if a click happened inside a rectangle." + tick_instructions args, "Sample app shows how to determine if a click happened inside a rectangle." x = 460 diff --git a/samples/03_rendering_sprites/01_animation_using_separate_pngs/app/main.rb b/samples/03_rendering_sprites/01_animation_using_separate_pngs/app/main.rb index c5622e8..1f88366 100644 --- a/samples/03_rendering_sprites/01_animation_using_separate_pngs/app/main.rb +++ b/samples/03_rendering_sprites/01_animation_using_separate_pngs/app/main.rb @@ -69,7 +69,7 @@ end # This function shows how to animate a sprite that executes # only once when the "f" key is pressed. def one_time_animation args - # This is just a label the shows instructions within the game. + # This is just a label that shows instructions within the game. args.outputs.labels << [220, 350, "(press f to animate)"] # If "f" is pressed on the keyboard... @@ -104,7 +104,7 @@ def one_time_animation args # This line sets the frame index to zero, if # the animation duration has passed (frame_index returned nil). - # Remeber: we are not looping forever here. + # Remember: we are not looping forever here. sprite_index ||= 0 # Present the sprite. diff --git a/samples/03_rendering_sprites/04_color_and_rotation/app/main.rb b/samples/03_rendering_sprites/04_color_and_rotation/app/main.rb index 072feaf..7e0fc3c 100644 --- a/samples/03_rendering_sprites/04_color_and_rotation/app/main.rb +++ b/samples/03_rendering_sprites/04_color_and_rotation/app/main.rb @@ -117,7 +117,7 @@ def create_sprite path, options = {} source_w: -1, source_h: -1, - # flip horiztonally, flip vertically + # flip horizontally, flip vertically flip_h: false, flip_v: false, @@ -153,7 +153,7 @@ end def calc_wrap state # car returns to left side of screen if it disappears on right side of screen - # sprite.width refers to tile's size, which is multipled by scale (4) to make it bigger + # sprite.width refers to tile's size, which is multiplied by scale (4) to make it bigger state.x = -state.sprite.width * state.sprite.scale if state.x - 20 > 1280 # car wraps around to right side of screen if it disappears on the left side diff --git a/samples/04_physics_and_collisions/01_simple/app/main.rb b/samples/04_physics_and_collisions/01_simple/app/main.rb index 5e3f9b7..9075d89 100644 --- a/samples/04_physics_and_collisions/01_simple/app/main.rb +++ b/samples/04_physics_and_collisions/01_simple/app/main.rb @@ -10,7 +10,7 @@ # This sample app shows collisions between two boxes. -# Runs methods needed for game to run properly. +# Runs methods needed for the game to run properly. def tick args tick_instructions args, "Sample app shows how to move a square over time and determine collision." defaults args @@ -33,7 +33,7 @@ def defaults args end def render args - # If the game state denotes that a collision has occured, + # If the game state denotes that a collision has occurred, # render a solid square, otherwise render a border instead. if args.state.center_box_collision args.outputs.solids << args.state.center_box @@ -47,7 +47,7 @@ end # Generally in a pipeline for a game engine, you have rendering, # game simulation (calculation), and input processing. -# This fuction represents the game simulation. +# This function represents the game simulation. def calc args position_moving_box args determine_collision_center_box args diff --git a/samples/04_physics_and_collisions/02_moving_objects/app/main.rb b/samples/04_physics_and_collisions/02_moving_objects/app/main.rb index e3e9261..9c39363 100644 --- a/samples/04_physics_and_collisions/02_moving_objects/app/main.rb +++ b/samples/04_physics_and_collisions/02_moving_objects/app/main.rb @@ -56,7 +56,7 @@ =end -# Calls methods needed for game to run properly +# Calls methods needed for the game to run properly def tick args tick_instructions args, "Use LEFT and RIGHT arrow keys to move and SPACE to jump." defaults args diff --git a/samples/04_physics_and_collisions/04_box_collision/app/main.rb b/samples/04_physics_and_collisions/04_box_collision/app/main.rb index af85fef..e407f0d 100644 --- a/samples/04_physics_and_collisions/04_box_collision/app/main.rb +++ b/samples/04_physics_and_collisions/04_box_collision/app/main.rb @@ -42,7 +42,7 @@ class PoorManPlatformerPhysics # Sets default values for variables. # The ||= sign means that the variable will only be set to the value following the = sign if the value has - # not already been set before. Intialization happens only in the first frame. + # not already been set before. Initialization happens only in the first frame. def defaults state.tile_size = 64 state.gravity = -0.2 @@ -161,7 +161,7 @@ class PoorManPlatformerPhysics # Calls methods needed to determine collisions between player and world_collision rects. def calc_box_collision - return unless state.world_lookup.keys.length > 0 # return unless hash has atleast 1 key + return unless state.world_lookup.keys.length > 0 # return unless hash has at least 1 key collision_floor! collision_left! collision_right! @@ -189,7 +189,7 @@ class PoorManPlatformerPhysics return unless state.dx < 0 # return unless player is moving left player_rect = [state.x - 0.1, state.y, state.tile_size, state.tile_size] - # Goes through world_collision_rects to find all intersections beween the player's left side and the + # Goes through world_collision_rects to find all intersections between the player's left side and the # right side of a world_collision_rect. left_side_collisions = state.world_collision_rects .find_all { |r| r[:left_right].intersect_rect?(player_rect, collision_tollerance) } diff --git a/samples/04_physics_and_collisions/05_box_collision_2/app/main.rb b/samples/04_physics_and_collisions/05_box_collision_2/app/main.rb index 126759a..42ccf22 100644 --- a/samples/04_physics_and_collisions/05_box_collision_2/app/main.rb +++ b/samples/04_physics_and_collisions/05_box_collision_2/app/main.rb @@ -91,7 +91,7 @@ class MetroidvaniaStarter state.sprite_selected ||= 1 state.map_saved_at ||= 0 - # Sets all the cordinate values for the sprite selection screen into a grid + # Sets all the coordinate values for the sprite selection screen into a grid # Displayed when 's' is pressed by player to access sprites if state.sprite_coords == [] # if sprite_coords is an empty array count = 1 @@ -223,7 +223,7 @@ class MetroidvaniaStarter # Calls methods that determine whether the player collides with any world_collision_rects. def calc_box_collision - return unless state.world_lookup.keys.length > 0 # return unless hash has atleast 1 key + return unless state.world_lookup.keys.length > 0 # return unless hash has at least 1 key collision_floor collision_left collision_right diff --git a/samples/04_physics_and_collisions/06_jump_physics/app/main.rb b/samples/04_physics_and_collisions/06_jump_physics/app/main.rb index da01e91..9d7a976 100644 --- a/samples/04_physics_and_collisions/06_jump_physics/app/main.rb +++ b/samples/04_physics_and_collisions/06_jump_physics/app/main.rb @@ -36,7 +36,7 @@ class VerticalPlatformer s.new_entity_strict(:platform, hash) # platform key end - # calls methods needed for game to run properly + # calls methods needed for the game to run properly def tick defaults render diff --git a/samples/04_physics_and_collisions/07_jump_physics/app/main.rb b/samples/04_physics_and_collisions/07_jump_physics/app/main.rb index da01e91..9d7a976 100644 --- a/samples/04_physics_and_collisions/07_jump_physics/app/main.rb +++ b/samples/04_physics_and_collisions/07_jump_physics/app/main.rb @@ -36,7 +36,7 @@ class VerticalPlatformer s.new_entity_strict(:platform, hash) # platform key end - # calls methods needed for game to run properly + # calls methods needed for the game to run properly def tick defaults render diff --git a/samples/04_physics_and_collisions/08_bouncing_on_collision/app/block.rb b/samples/04_physics_and_collisions/08_bouncing_on_collision/app/block.rb index 9254ee4..db6687a 100644 --- a/samples/04_physics_and_collisions/08_bouncing_on_collision/app/block.rb +++ b/samples/04_physics_and_collisions/08_bouncing_on_collision/app/block.rb @@ -110,8 +110,8 @@ class Block #Find the vector that is perpendicular to the slope perpVect = { x: x, y: y } - mag = (perpVect.x**2 + perpVect.y**2)**0.5 # find the magniude of the perpVect - perpVect = {x: perpVect.x/(mag), y: perpVect.y/(mag)} # divide the perpVect by the magniude to make it a unit vector + mag = (perpVect.x**2 + perpVect.y**2)**0.5 # find the magnitude of the perpVect + perpVect = {x: perpVect.x/(mag), y: perpVect.y/(mag)} # divide the perpVect by the magnitude to make it a unit vector previousPosition = { # calculate an ESTIMATE of the previousPosition of the ball x:args.state.ball.center.x-args.state.ball.velocity.x, @@ -140,7 +140,7 @@ class Block dampener = 0.3 ynew *= dampener * 0.5 - #If the bounce is very low, that means the ball is rolling and we don't want to dampenen the X velocity + #If the bounce is very low, that means the ball is rolling and we don't want to dampen the X velocity if ynew > -0.1 xnew *= dampener end @@ -152,7 +152,7 @@ class Block args.state.ball.velocity.x = -xnew args.state.ball.velocity.y = -ynew - #Set the position of the ball to the previous position so it doesn't warp throught the block + #Set the position of the ball to the previous position so it doesn't warp through the block args.state.ball.center.x = previousPosition.x args.state.ball.center.y = previousPosition.y end diff --git a/samples/04_physics_and_collisions/08_bouncing_on_collision/app/main.rb b/samples/04_physics_and_collisions/08_bouncing_on_collision/app/main.rb index f5883ad..22d3711 100644 --- a/samples/04_physics_and_collisions/08_bouncing_on_collision/app/main.rb +++ b/samples/04_physics_and_collisions/08_bouncing_on_collision/app/main.rb @@ -60,7 +60,7 @@ begin :default_methods center = args.grid.w / 2 for i in (0...5) - #Create a ramp of blocks. Not going to be perfect because of the float to integer conversion and anisotropic to isotropic coversion + #Create a ramp of blocks. Not going to be perfect because of the float to integer conversion and anisotropic to isotropic conversion args.state.blocks.append(Block.new((center + 100 + (i * horizontal_offset)).to_i, 100 + (vertical_offset * i) + (i * block_size), block_size, rotation)) args.state.blocks.append(Block.new((center - 100 - (i * horizontal_offset)).to_i, 100 + (vertical_offset * i) + (i * block_size), block_size, -rotation)) end diff --git a/samples/04_physics_and_collisions/08_bouncing_on_collision/app/peg.rb b/samples/04_physics_and_collisions/08_bouncing_on_collision/app/peg.rb index 52045de..daf95ec 100644 --- a/samples/04_physics_and_collisions/08_bouncing_on_collision/app/peg.rb +++ b/samples/04_physics_and_collisions/08_bouncing_on_collision/app/peg.rb @@ -1,11 +1,11 @@ class Peg def initialize(x, y, block_size) - @x = x # x cordinate of the LEFT side of the peg - @y = y # y cordinate of the RIGHT side of the peg + @x = x # x coordinate of the LEFT side of the peg + @y = y # y coordinate of the RIGHT side of the peg @block_size = block_size # diameter of the peg @radius = @block_size/2.0 # radius of the peg - @center = { # cordinatees of the CENTER of the peg + @center = { # coordinatees of the CENTER of the peg x: @x+@block_size/2.0, y: @y+@block_size/2.0 } @@ -116,8 +116,8 @@ class Peg } perpVect = {x: pointB.x - pointA.x, y:pointB.y - pointA.y} # perpVect is to be VECTOR of the perpendicular tangent - mag = (perpVect.x**2 + perpVect.y**2)**0.5 # find the magniude of the perpVect - perpVect = {x: perpVect.x/(mag), y: perpVect.y/(mag)} # divide the perpVect by the magniude to make it a unit vector + mag = (perpVect.x**2 + perpVect.y**2)**0.5 # find the magnitude of the perpVect + perpVect = {x: perpVect.x/(mag), y: perpVect.y/(mag)} # divide the perpVect by the magnitude to make it a unit vector perpVect = {x: -perpVect.y, y: perpVect.x} # swap the x and y and multiply by -1 to make the vector perpendicular args.state.display_value = perpVect if perpVect.y > 0 #ensure perpVect points upward @@ -130,12 +130,12 @@ class Peg } yInterc = pointA.y + -slope*pointA.x - if slope == INFINITY # the perpVect presently either points in the correct dirrection or it is 180 degrees off we need to correct this + if slope == INFINITY # the perpVect presently either points in the correct direction or it is 180 degrees off we need to correct this if previousPosition.x < pointA.x perpVect = {x: perpVect.x*-1, y: perpVect.y*-1} yInterc = -INFINITY end - elsif previousPosition.y < slope*previousPosition.x + yInterc # check if ball is bellow or above the collider to determine if perpVect is - or + + elsif previousPosition.y < slope*previousPosition.x + yInterc # check if ball is below or above the collider to determine if perpVect is - or + perpVect = {x: perpVect.x*-1, y: perpVect.y*-1} end @@ -148,7 +148,7 @@ class Peg fbx = velocityMag * Math.cos(theta_ball) #the x component of the ball's velocity fby = velocityMag * Math.sin(theta_ball) #the y component of the ball's velocity - repelMag = getRepelMagnitude( # the magniude of the collision vector + repelMag = getRepelMagnitude( # the magnitude of the collision vector args, fbx, fby, @@ -173,7 +173,7 @@ class Peg if args.state.ball.center.y > @center.y # if the ball is above the middle of the peg we need to temporarily ignore some of the gravity args.state.ball.velocity.y = ynew + GRAVITY * 0.01 else - args.state.ball.velocity.y = ynew - GRAVITY * 0.01 # if the ball is bellow the middle of the peg we need to temporarily increase the power of the gravity + args.state.ball.velocity.y = ynew - GRAVITY * 0.01 # if the ball is below the middle of the peg we need to temporarily increase the power of the gravity end args.state.ball.center.x+= args.state.ball.velocity.x # update the position of the ball so it never looks like the ball is intersecting the circle diff --git a/samples/04_physics_and_collisions/08_bouncing_on_collision/app/vector2d.rb b/samples/04_physics_and_collisions/08_bouncing_on_collision/app/vector2d.rb index 9cb1954..0b302f3 100644 --- a/samples/04_physics_and_collisions/08_bouncing_on_collision/app/vector2d.rb +++ b/samples/04_physics_and_collisions/08_bouncing_on_collision/app/vector2d.rb @@ -42,7 +42,7 @@ class Vector2d Vector2d.new(@x/mag, @y/mag) end - #TODO delet? + #TODO delete? def distABS vect (((vect.x-@x)**2+(vect.y-@y)**2)**0.5).abs() end diff --git a/samples/04_physics_and_collisions/09_arbitrary_collision/app/linear_collider.rb b/samples/04_physics_and_collisions/09_arbitrary_collision/app/linear_collider.rb index 9571669..679f3a4 100644 --- a/samples/04_physics_and_collisions/09_arbitrary_collision/app/linear_collider.rb +++ b/samples/04_physics_and_collisions/09_arbitrary_collision/app/linear_collider.rb @@ -82,7 +82,7 @@ class LinearCollider #if at least on point is in the rectangle then collision? is true - otherwise false for point in points #Check whether a given point lies inside a rectangle or not: - #if the sum of the area of traingls, PAB, PBC, PCD, PAD equal the area of the rec, then an intersection has occured + #if the sum of the area of traingls, PAB, PBC, PCD, PAD equal the area of the rec, then an intersection has occurred areaRec = triArea.call(rpointA, rpointB, rpointC)+triArea.call(rpointA, rpointC, rpointD) areaSum = [ triArea.call(point, rpointA, rpointB),triArea.call(point, rpointB, rpointC), @@ -148,7 +148,7 @@ class LinearCollider perpVect = {x: perpVect.x*-1, y: perpVect.y*-1} yInterc = -INFINITY end - elsif previousPosition.y < slope*previousPosition.x + yInterc #check if ball is bellow or above the collider to determine if perpVect is - or + + elsif previousPosition.y < slope*previousPosition.x + yInterc #check if ball is below or above the collider to determine if perpVect is - or + perpVect = {x: perpVect.x*-1, y: perpVect.y*-1} end diff --git a/samples/04_physics_and_collisions/09_arbitrary_collision/app/main.rb b/samples/04_physics_and_collisions/09_arbitrary_collision/app/main.rb index b2905fb..228eb9d 100644 --- a/samples/04_physics_and_collisions/09_arbitrary_collision/app/main.rb +++ b/samples/04_physics_and_collisions/09_arbitrary_collision/app/main.rb @@ -29,7 +29,7 @@ end begin :default_methods def init_blocks args block_size = args.state.board_width / 8 - #Space inbetween each block + #Space in between each block block_offset = 4 args.state.squares ||=[ diff --git a/samples/04_physics_and_collisions/09_arbitrary_collision/app/vector2d.rb b/samples/04_physics_and_collisions/09_arbitrary_collision/app/vector2d.rb index 9cb1954..0b302f3 100644 --- a/samples/04_physics_and_collisions/09_arbitrary_collision/app/vector2d.rb +++ b/samples/04_physics_and_collisions/09_arbitrary_collision/app/vector2d.rb @@ -42,7 +42,7 @@ class Vector2d Vector2d.new(@x/mag, @y/mag) end - #TODO delet? + #TODO delete? def distABS vect (((vect.x-@x)**2+(vect.y-@y)**2)**0.5).abs() end diff --git a/samples/04_physics_and_collisions/10_collision_with_object_removal/app/linear_collider.rb b/samples/04_physics_and_collisions/10_collision_with_object_removal/app/linear_collider.rb index 69ada5b..0a20583 100644 --- a/samples/04_physics_and_collisions/10_collision_with_object_removal/app/linear_collider.rb +++ b/samples/04_physics_and_collisions/10_collision_with_object_removal/app/linear_collider.rb @@ -1,4 +1,4 @@ -#The LinearCollider (theoretically) produces collisions upon a line segment defined point.y two x,y cordinates +#The LinearCollider (theoretically) produces collisions upon a line segment defined point.y two x,y coordinates class LinearCollider @@ -6,13 +6,13 @@ class LinearCollider #last [Array of length 2] end of the line segment as a x,y cordinate #inorder for the LinearCollider to be functional the line segment must be said to have a thickness - #(as it is unlikly that a colliding object will land exactly on the linesegment) + #(as it is unlikely that a colliding object will land exactly on the linesegment) #extension defines if the line's thickness extends negatively or positively #extension :pos extends positively #extension :neg extends negatively - #thickness [float] how thick the line should be (should always be atleast as large as the magnitude of the colliding object) + #thickness [float] how thick the line should be (should always be at least as large as the magnitude of the colliding object) def initialize (pointA, pointB, extension=:neg, thickness=10) @pointA = pointA @pointB = pointB diff --git a/samples/04_physics_and_collisions/10_collision_with_object_removal/app/vector2d.rb b/samples/04_physics_and_collisions/10_collision_with_object_removal/app/vector2d.rb index 97cf286..37ea141 100644 --- a/samples/04_physics_and_collisions/10_collision_with_object_removal/app/vector2d.rb +++ b/samples/04_physics_and_collisions/10_collision_with_object_removal/app/vector2d.rb @@ -43,7 +43,7 @@ class Vector2d Vector2d.new(@x/mag, @y/mag) end - #TODO delet? + #TODO delete? def distABS vect (((vect.x-@x)**2+(vect.y-@y)**2)**0.5).abs() end diff --git a/samples/05_mouse/01_mouse_click/app/main.rb b/samples/05_mouse/01_mouse_click/app/main.rb index c1a6e29..80b91df 100644 --- a/samples/05_mouse/01_mouse_click/app/main.rb +++ b/samples/05_mouse/01_mouse_click/app/main.rb @@ -120,7 +120,7 @@ class TicTacToe space.piece = state.current_turn # This ternary operator statement allows us to change the current player's turn. - # If it is currently x's turn, it becomes o's turn. If it is not x's turn, it become's x's turn. + # If it is currently x's turn, it becomes o's turn. If it is not x's turn, it becomes x's turn. state.current_turn = state.current_turn == :x ? :o : :x end diff --git a/samples/05_mouse/02_mouse_move/app/main.rb b/samples/05_mouse/02_mouse_move/app/main.rb index b015277..684928b 100644 --- a/samples/05_mouse/02_mouse_move/app/main.rb +++ b/samples/05_mouse/02_mouse_move/app/main.rb @@ -198,13 +198,13 @@ class ProtectThePuppiesFromTheZombies state.zombies = state.zombies - killed_this_frame # remove newly killed zombies from zombies collection state.killed_zombies += killed_this_frame # add newly killed zombies to killed zombies - if killed_this_frame.length > 0 # if atleast one zombie was killed in the frame + if killed_this_frame.length > 0 # if at least one zombie was killed in the frame state.flash_at = state.tick_count # flash_at set to the frame when the zombie was killed # Don't forget, the rendered flash lasts for 10 frames after the zombie is killed (look at render_flash method) end # Sets the tick_count (passage of time) as the value of the death_at variable for each killed zombie. - # Death_at stores the frame a zombie was killed. + # Death_at stores the frame where a zombie was killed. killed_this_frame.each do |z| z.death_at = state.tick_count end diff --git a/samples/05_mouse/03_mouse_move_paint_app/app/main.rb b/samples/05_mouse/03_mouse_move_paint_app/app/main.rb index b177fd6..be983a8 100644 --- a/samples/05_mouse/03_mouse_move_paint_app/app/main.rb +++ b/samples/05_mouse/03_mouse_move_paint_app/app/main.rb @@ -40,7 +40,7 @@ =end # This sample app shows an empty grid that the user can paint on. -# To paint, the user must keep their mouse presssed and drag it around the grid. +# To paint, the user must keep their mouse pressed and drag it around the grid. # The "clear" button allows users to clear the grid so they can start over. class PaintApp diff --git a/samples/06_save_load/01_save_load_game/app/main.rb b/samples/06_save_load/01_save_load_game/app/main.rb index cc52770..2d2bc41 100644 --- a/samples/06_save_load/01_save_load_game/app/main.rb +++ b/samples/06_save_load/01_save_load_game/app/main.rb @@ -48,7 +48,7 @@ class TextedBasedGame - # Contains methods needed for game to run properly. + # Contains methods needed for the game to run properly. # Increments tick count by 1 each time it runs (60 times in a single second) def tick default @@ -59,7 +59,7 @@ class TextedBasedGame # Sets default values. # The ||= ensures that a variable's value is only set to the value following the = sign - # if the value has not already been set before. Intialization happens only in the first frame. + # if the value has not already been set before. Initialization happens only in the first frame. def default state.engine_tick_count ||= 0 state.active_module ||= :room @@ -286,7 +286,7 @@ class TextedBasedGamePresenter end # instructions for users on how to add the missing method_to_call to the code - puts "It looks like #{method_to_call} doesn't exists on TextedBasedGamePresenter. Please add this method:" + puts "It looks like #{method_to_call} doesn't exist on TextedBasedGamePresenter. Please add this method:" puts "Just copy the code below and put it in the #{TextedBasedGamePresenter} class definition." puts "" puts "```" @@ -345,7 +345,7 @@ class TextedBasedGamePresenter @game end - # Initalizes the game and creates an empty list of buttons. + # Initializes the game and creates an empty list of buttons. def initialize @game = TextedBasedGame.new self @button_list ||= {} diff --git a/samples/07_advanced_rendering/03_render_target_viewports/app/main.rb b/samples/07_advanced_rendering/03_render_target_viewports/app/main.rb index 5c38d6c..0dd6c18 100644 --- a/samples/07_advanced_rendering/03_render_target_viewports/app/main.rb +++ b/samples/07_advanced_rendering/03_render_target_viewports/app/main.rb @@ -25,7 +25,7 @@ would print "How are you, Ruby?" to the console. (Remember, string interpolation only works with double quotes!) - - Ternary operator (?): Similar to if statement; first evalulates whether a statement is + - Ternary operator (?): Similar to if statement; first evaluates whether a statement is true or false, and then executes a command depending on that result. For example, if we had a variable grade = 75 @@ -39,7 +39,7 @@ 720 p screen (Dragon Ruby Game Toolkits's virtual resolution is always 1280x720). - Numeric#shift_(left|right|up|down): Shifts the Numeric in the correct direction - by adding or subracting. + by adding or subtracting. - ARRAY#inside_rect?: An array with at least two values is considered a point. An array with at least four values is considered a rect. The inside_rect? function returns true diff --git a/samples/09_performance/02_sprites_as_entities/app/main.rb b/samples/09_performance/02_sprites_as_entities/app/main.rb index 21babda..203dbe0 100644 --- a/samples/09_performance/02_sprites_as_entities/app/main.rb +++ b/samples/09_performance/02_sprites_as_entities/app/main.rb @@ -1,5 +1,5 @@ # Sprites represented as Entities using the queue ~args.outputs.sprites~ -# yields nicer access apis over Hashes, but require a bit more code upfront. +# yields nicer access apis over Hashes, but requires a bit more code upfront. # The hash sample has to use star[:s] to get the speed of the star, but # an entity can use .s instead. def random_x args diff --git a/samples/09_performance/04_sprites_as_classes/app/main.rb b/samples/09_performance/04_sprites_as_classes/app/main.rb index 2b43a98..d69dc66 100644 --- a/samples/09_performance/04_sprites_as_classes/app/main.rb +++ b/samples/09_performance/04_sprites_as_classes/app/main.rb @@ -22,7 +22,7 @@ class Star end end -# calls methods needed for game to run properly +# calls methods needed for the game to run properly def tick args # sets console command when sample app initially opens if Kernel.global_tick_count == 0 diff --git a/samples/09_performance/05_static_sprites_as_classes/app/main.rb b/samples/09_performance/05_static_sprites_as_classes/app/main.rb index cbfe00a..f87b110 100644 --- a/samples/09_performance/05_static_sprites_as_classes/app/main.rb +++ b/samples/09_performance/05_static_sprites_as_classes/app/main.rb @@ -23,7 +23,7 @@ class Star end end -# calls methods needed for game to run properly +# calls methods needed for the game to run properly def tick args # sets console command when sample app initially opens if Kernel.global_tick_count == 0 diff --git a/samples/09_performance/06_static_sprites_as_classes_with_custom_drawing/app/main.rb b/samples/09_performance/06_static_sprites_as_classes_with_custom_drawing/app/main.rb index 4d8719d..31f5c9f 100644 --- a/samples/09_performance/06_static_sprites_as_classes_with_custom_drawing/app/main.rb +++ b/samples/09_performance/06_static_sprites_as_classes_with_custom_drawing/app/main.rb @@ -47,7 +47,7 @@ class Star end end -# calls methods needed for game to run properly +# calls methods needed for the game to run properly def tick args # sets console command when sample app initially opens if Kernel.global_tick_count == 0 diff --git a/samples/13_path_finding_algorithms/01_breadth_first_search/app/main.rb b/samples/13_path_finding_algorithms/01_breadth_first_search/app/main.rb index 7f98509..c8e1633 100644 --- a/samples/13_path_finding_algorithms/01_breadth_first_search/app/main.rb +++ b/samples/13_path_finding_algorithms/01_breadth_first_search/app/main.rb @@ -251,7 +251,7 @@ class BreadthFirstSearch outputs.primitives << [slider.x, slider.y, slider.x + slider.w, slider.y].line # The circle needs to be offset so that the center of the circle # overlaps the line instead of the upper right corner of the circle - # The circle's x value is also moved based on the current seach step + # The circle's x value is also moved based on the current search step circle_x = (slider.x - slider.offset) + (state.anim_steps * slider.spacing) circle_y = (slider.y - slider.offset) circle_rect = [circle_x, circle_y, 37, 37] diff --git a/samples/13_path_finding_algorithms/02_detailed_breadth_first_search/app/main.rb b/samples/13_path_finding_algorithms/02_detailed_breadth_first_search/app/main.rb index 810ff7b..d4c9c1c 100644 --- a/samples/13_path_finding_algorithms/02_detailed_breadth_first_search/app/main.rb +++ b/samples/13_path_finding_algorithms/02_detailed_breadth_first_search/app/main.rb @@ -168,7 +168,7 @@ class DetailedBreadthFirstSearch outputs.primitives << [slider.x, slider.y, slider.x + slider.w, slider.y].line # The circle needs to be offset so that the center of the circle # overlaps the line instead of the upper right corner of the circle - # The circle's x value is also moved based on the current seach step + # The circle's x value is also moved based on the current search step circle_x = (slider.x - slider.offset) + (state.anim_steps * slider.spacing) circle_y = (slider.y - slider.offset) circle_rect = [circle_x, circle_y, 37, 37] diff --git a/samples/13_path_finding_algorithms/06_heuristic/app/main.rb b/samples/13_path_finding_algorithms/06_heuristic/app/main.rb index af466a5..10beba3 100644 --- a/samples/13_path_finding_algorithms/06_heuristic/app/main.rb +++ b/samples/13_path_finding_algorithms/06_heuristic/app/main.rb @@ -242,7 +242,7 @@ class Heuristic_With_Walls outputs.primitives << [slider.x, slider.y, slider.x + slider.w, slider.y].line # The circle needs to be offset so that the center of the circle # overlaps the line instead of the upper right corner of the circle - # The circle's x value is also moved based on the current seach step + # The circle's x value is also moved based on the current search step circle_x = (slider.x - slider.offset) + (state.current_step * slider.spacing) circle_y = (slider.y - slider.offset) circle_rect = [circle_x, circle_y, 37, 37] diff --git a/samples/13_path_finding_algorithms/07_heuristic_with_walls/app/main.rb b/samples/13_path_finding_algorithms/07_heuristic_with_walls/app/main.rb index 5fc0804..7b8f653 100644 --- a/samples/13_path_finding_algorithms/07_heuristic_with_walls/app/main.rb +++ b/samples/13_path_finding_algorithms/07_heuristic_with_walls/app/main.rb @@ -275,7 +275,7 @@ class Heuristic outputs.primitives << [slider.x, slider.y, slider.x + slider.w, slider.y].line # The circle needs to be offset so that the center of the circle # overlaps the line instead of the upper right corner of the circle - # The circle's x value is also moved based on the current seach step + # The circle's x value is also moved based on the current search step circle_x = (slider.x - slider.offset) + (state.current_step * slider.spacing) circle_y = (slider.y - slider.offset) circle_rect = [circle_x, circle_y, 37, 37] diff --git a/samples/99_genre_arcade/snakemoji/app/main.rb b/samples/99_genre_arcade/snakemoji/app/main.rb index 3bffa22..648b728 100644 --- a/samples/99_genre_arcade/snakemoji/app/main.rb +++ b/samples/99_genre_arcade/snakemoji/app/main.rb @@ -10,8 +10,8 @@ # https://gist.github.com/scorp200 #############LICENSE############ # Feel free to use this anywhere and however you want -# You can sell this to EA for $1,000,000 if you want, its completely free. -# Just rememeber you are helping this... thing... to spread... +# You can sell this to EA for $1,000,000 if you want, it's completely free. +# Just remember you are helping this... thing... to spread... # ALSO! I am not liable for any mental, physical or financial damage caused. #############LICENSE############ @@ -156,7 +156,7 @@ def defaults 🎮 🎮.🐍 ||= [] #Direction the head moves to 🎮.🚗 ||= [0, 0] - #Next_Direction, during input check only change this variable and then when game updates asign this to Direction + #Next_Direction, during input check only change this variable and then when game updates assign this to Direction 🎮.🚦 ||= [*🎮.🚗] #Your score 🎮.💰 ||= 0 diff --git a/samples/99_genre_arcade/twinstick/app/main.rb b/samples/99_genre_arcade/twinstick/app/main.rb index 4edef92..2ce1d50 100644 --- a/samples/99_genre_arcade/twinstick/app/main.rb +++ b/samples/99_genre_arcade/twinstick/app/main.rb @@ -64,7 +64,7 @@ def move_enemies args theta = Math.atan2(enemy.y - args.state.player.y, enemy.x - args.state.player.x) # Convert the angle to a vector pointing at the player dx, dy = theta.to_degrees.vector 5 - # Move the enemy towards thr player + # Move the enemy towards the player enemy.x -= dx enemy.y -= dy end diff --git a/samples/99_genre_crafting/craft_game_starting_point/app/main.rb b/samples/99_genre_crafting/craft_game_starting_point/app/main.rb index d7478e4..549e73d 100644 --- a/samples/99_genre_crafting/craft_game_starting_point/app/main.rb +++ b/samples/99_genre_crafting/craft_game_starting_point/app/main.rb @@ -1,13 +1,13 @@ # ================================================== # A NOTE TO JAM CRAFT PARTICIPANTS: -# The comments and code in here are just as small piece of DragonRuby's capabilities. +# The comments and code in here are just a small piece of DragonRuby's capabilities. # Be sure to check out the rest of the sample apps. Start with README.txt and go from there! # ================================================== # def tick args is the entry point into your game. This function is called at # a fixed update time of 60hz (60 fps). def tick args - # The defaults function intitializes the game. + # The defaults function initializes the game. defaults args # After the game is initialized, render it. @@ -38,7 +38,7 @@ def defaults args # Bottom left is 0, 0. Top right is 1280, 720. # The inventory area is at the top of the screen # the number 80 is the size of all the sprites, so that is what is being - # used to decide the with and height + # used to decide the width and height args.state.sprite_size = 80 args.state.inventory_border.w = args.state.sprite_size * 10 @@ -49,7 +49,7 @@ def defaults args # define the borders for where the crafting area is located # the crafting area is below the inventory area # the number 80 is the size of all the sprites, so that is what is being - # used to decide the with and height + # used to decide the width and height args.state.craft_border.x = 10 args.state.craft_border.y = 220 args.state.craft_border.w = args.state.sprite_size * 3 @@ -92,12 +92,12 @@ def defaults args }, ] - # after initializing the oridinal positions, derive the pixel + # after initializing the ordinal positions, derive the pixel # locations assuming that the width and height are 80 args.state.items.each { |item| set_inventory_position args, item } end - # define all the oridinal positions of the inventory slots + # define all the ordinal positions of the inventory slots if !args.state.inventory_area args.state.inventory_area = [ { ordinal_x: 0, ordinal_y: 0 }, @@ -132,7 +132,7 @@ def defaults args { ordinal_x: 9, ordinal_y: 2 }, ] - # after initializing the oridinal positions, derive the pixel + # after initializing the ordinal positions, derive the pixel # locations assuming that the width and height are 80 args.state.inventory_area.each { |i| set_inventory_position args, i } @@ -144,7 +144,7 @@ def defaults args # To bring up DragonRuby's Console, press the ~ key within the game. end - # define all the oridinal positions of the craft slots + # define all the ordinal positions of the craft slots if !args.state.craft_area args.state.craft_area = [ { ordinal_x: 0, ordinal_y: 0 }, @@ -158,7 +158,7 @@ def defaults args { ordinal_x: 2, ordinal_y: 2 }, ] - # after initializing the oridinal positions, derive the pixel + # after initializing the ordinal positions, derive the pixel # locations assuming that the width and height are 80 args.state.craft_area.each { |c| set_craft_position args, c } end @@ -244,7 +244,7 @@ def input args found[:location] = :held end - # if the mouse is clicked and an item is currently beign held.... + # if the mouse is clicked and an item is currently being held.... elsif args.state.held_item # determine if a slot within the craft area was clicked craft_area = args.state.craft_area.find { |a| args.inputs.mouse.click.point.inside_rect? a } @@ -255,7 +255,7 @@ def input args # if the click was within a craft area if craft_area # check to see if an item is already there and ignore the click if an item is found - # item_at_craft_slot is a helper method that returns an item or nil for a given oridinal + # item_at_craft_slot is a helper method that returns an item or nil for a given ordinal # position item_already_there = item_at_craft_slot args, craft_area[:ordinal_x], craft_area[:ordinal_y] @@ -263,8 +263,8 @@ def input args if !item_already_there # if the quantity they are currently holding is greater than 1 if args.state.held_item[:quantity] > 1 - # remove one item (creating a seperate item of the same type), and place it - # at the oridinal position and location of the craft area + # remove one item (creating a separate item of the same type), and place it + # at the ordinal position and location of the craft area # the .merge method on Hash creates a new Hash, but updates any values # passed as arguments to merge new_item = args.state.held_item.merge(quantity: 1, @@ -272,7 +272,7 @@ def input args ordinal_x: craft_area[:ordinal_x], ordinal_y: craft_area[:ordinal_y]) - # after the item is crated, place it into the args.state.items collection + # after the item is created, place it into the args.state.items collection args.state.items << new_item # then subtract one from the held item @@ -281,7 +281,7 @@ def input args # if the craft area is available and there is only one item being held elsif args.state.held_item[:quantity] == 1 # instead of creating any new items just set the location of the held item - # to the oridinal position of the craft area, and then nil out the + # to the ordinal position of the craft area, and then nil out the # held item state so that a new item can be picked up args.state.held_item[:location] = :craft args.state.held_item[:ordinal_x] = craft_area[:ordinal_x] @@ -326,7 +326,7 @@ end def calc args # make sure that the real position of the inventory # items are updated every frame to ensure that they - # are placed correctly given their location and oridinal positions + # are placed correctly given their location and ordinal positions # instead of using .map, here we use .each (since we are not returning a new item and just updating the items in place) args.state.items.each do |item| # based on the location of the item, invoke the correct pixel conversion method diff --git a/samples/99_genre_lowrez/nokia_3310/app/main.rb b/samples/99_genre_lowrez/nokia_3310/app/main.rb index d275ada..683539e 100644 --- a/samples/99_genre_lowrez/nokia_3310/app/main.rb +++ b/samples/99_genre_lowrez/nokia_3310/app/main.rb @@ -67,7 +67,7 @@ def tick args # ======================================================================= - # ==== HOW TO ANIMATE A SPRITE (SEPERATE PNGS) ========================== + # ==== HOW TO ANIMATE A SPRITE (SEPARATE PNGS) ========================== # ======================================================================= # Remove the "#" at the beginning of the line below # how_to_animate_a_sprite args @@ -248,7 +248,7 @@ def how_to_render_sprites args end # ============================================================================= -# ==== HOW TO ANIMATE A SPRITE (SEPERATE PNGS) ========================== +# ==== HOW TO ANIMATE A SPRITE (SEPARATE PNGS) ========================== # ============================================================================= def how_to_animate_a_sprite args # STEP 1: Define when you want the animation to start. The animation in this case will start in 3 seconds @@ -472,7 +472,7 @@ def how_to_determine_collision args text: "Collision!", alignment_enum: 1) else - # if collision occurred, render the words no collision. + # if no collision occurred, render the words no collision. args.nokia.labels << args.nokia .default_label .merge(x: 42, diff --git a/samples/99_genre_lowrez/resolution_64x64/app/main.rb b/samples/99_genre_lowrez/resolution_64x64/app/main.rb index a30d75a..9208120 100644 --- a/samples/99_genre_lowrez/resolution_64x64/app/main.rb +++ b/samples/99_genre_lowrez/resolution_64x64/app/main.rb @@ -62,7 +62,7 @@ def tick args # ======================================================================= - # ==== HOW TO ANIMATE A SPRITE (SEPERATE PNGS) ========================== + # ==== HOW TO ANIMATE A SPRITE (SEPARATE PNGS) ========================== # Remove the "#" at the beginning of the line below # how_to_animate_a_sprite args # ======================================================================= @@ -242,7 +242,7 @@ def how_to_render_sprites args end ## # ============================================================================= -## # ==== HOW TO ANIMATE A SPRITE (SEPERATE PNGS) ========================== +## # ==== HOW TO ANIMATE A SPRITE (SEPARATE PNGS) ========================== ## # ============================================================================= def how_to_animate_a_sprite args # STEP 1: Define when you want the animation to start. The animation in this case will start in 3 seconds @@ -462,7 +462,7 @@ def how_to_determine_collision args text: "Collision!", alignment_enum: 1) else - # if collision occurred, render the words no collision. + # if no collision occurred, render the words no collision. args.lowrez.labels << args.lowrez .default_label .merge(x: 31, diff --git a/samples/99_genre_platformer/clepto_frog/app/main.rb b/samples/99_genre_platformer/clepto_frog/app/main.rb index a4eb069..e1ddffb 100644 --- a/samples/99_genre_platformer/clepto_frog/app/main.rb +++ b/samples/99_genre_platformer/clepto_frog/app/main.rb @@ -485,7 +485,7 @@ class CleptoFrog return if state.world_lookup.keys.length > 0 return unless state.world.length > 0 - # Searches through the world and finds the cordinates that exist + # Searches through the world and finds the coordinates that exist state.world_lookup = {} state.world.each do |x, y, w, h| state.world_lookup[[x, y, w || state.tile_size, h || state.tile_size]] = true diff --git a/samples/99_genre_rpg_narrative/choose_your_own_adventure/app/decision.rb b/samples/99_genre_rpg_narrative/choose_your_own_adventure/app/decision.rb index 2921076..0d23668 100644 --- a/samples/99_genre_rpg_narrative/choose_your_own_adventure/app/decision.rb +++ b/samples/99_genre_rpg_narrative/choose_your_own_adventure/app/decision.rb @@ -1,5 +1,5 @@ # Hey there! Welcome to Four Decisions. Here is how you -# create your decision tree. Remove =being and =end from the text to +# create your decision tree. Remove =begin and =end from the text to # enable the game (just save the file). Change stuff and see what happens! def game diff --git a/samples/99_genre_rpg_narrative/choose_your_own_adventure/app/main.rb b/samples/99_genre_rpg_narrative/choose_your_own_adventure/app/main.rb index 9da0f38..953b121 100644 --- a/samples/99_genre_rpg_narrative/choose_your_own_adventure/app/main.rb +++ b/samples/99_genre_rpg_narrative/choose_your_own_adventure/app/main.rb @@ -53,7 +53,7 @@ def tick args end end -# Runs methods needed for game to function properly +# Runs methods needed for the game to function properly # Creates a rectangular border around the screen def tick_game args defaults args diff --git a/samples/99_genre_rpg_roguelike/01_roguelike_starting_point/app/main.rb b/samples/99_genre_rpg_roguelike/01_roguelike_starting_point/app/main.rb index bd5f521..15a381b 100644 --- a/samples/99_genre_rpg_roguelike/01_roguelike_starting_point/app/main.rb +++ b/samples/99_genre_rpg_roguelike/01_roguelike_starting_point/app/main.rb @@ -14,7 +14,7 @@ def tick_game args # set up your game # initialize the game/game defaults. ||= means that you only initialize it if - # the value isn't alread initialized + # the value isn't already initialized args.state.player.x ||= 0 args.state.player.y ||= 0 diff --git a/samples/99_genre_rpg_roguelike/01_roguelike_starting_point/app/sprite_lookup.rb b/samples/99_genre_rpg_roguelike/01_roguelike_starting_point/app/sprite_lookup.rb index f129e25..579e133 100644 --- a/samples/99_genre_rpg_roguelike/01_roguelike_starting_point/app/sprite_lookup.rb +++ b/samples/99_genre_rpg_roguelike/01_roguelike_starting_point/app/sprite_lookup.rb @@ -97,7 +97,7 @@ def tile_extended x, y, w, h, r, g, b, a, tile_row_column_or_key if !row member_name = member_name_as_code tile_row_column_or_key - raise "Unabled to find a sprite for #{member_name}. Make sure the value exists in app/sprite_lookup.rb." + raise "Unable to find a sprite for #{member_name}. Make sure the value exists in app/sprite_lookup.rb." end # Sprite provided by Rogue Yun diff --git a/samples/99_genre_rpg_roguelike/02_roguelike_line_of_sight/app/main.rb b/samples/99_genre_rpg_roguelike/02_roguelike_line_of_sight/app/main.rb index 66ff027..c2c364b 100644 --- a/samples/99_genre_rpg_roguelike/02_roguelike_line_of_sight/app/main.rb +++ b/samples/99_genre_rpg_roguelike/02_roguelike_line_of_sight/app/main.rb @@ -339,7 +339,7 @@ class Game state.enemies.find { |e| e.x == x && e.y == y && !e.is_dead } end - #M oves the user based on their keyboard input and sets values for target cell + # Moves the user based on their keyboard input and sets values for target cell def input_target_cell if inputs.keyboard.key_down.up # if "up" key is in "down" state [state.x, state.y + 1, 0, 1] # user moves up diff --git a/samples/99_genre_rpg_roguelike/roguelike_line_of_sight/app/main.rb b/samples/99_genre_rpg_roguelike/roguelike_line_of_sight/app/main.rb index bd5f521..15a381b 100644 --- a/samples/99_genre_rpg_roguelike/roguelike_line_of_sight/app/main.rb +++ b/samples/99_genre_rpg_roguelike/roguelike_line_of_sight/app/main.rb @@ -14,7 +14,7 @@ def tick_game args # set up your game # initialize the game/game defaults. ||= means that you only initialize it if - # the value isn't alread initialized + # the value isn't already initialized args.state.player.x ||= 0 args.state.player.y ||= 0 diff --git a/samples/99_genre_rpg_roguelike/roguelike_line_of_sight/app/sprite_lookup.rb b/samples/99_genre_rpg_roguelike/roguelike_line_of_sight/app/sprite_lookup.rb index f129e25..579e133 100644 --- a/samples/99_genre_rpg_roguelike/roguelike_line_of_sight/app/sprite_lookup.rb +++ b/samples/99_genre_rpg_roguelike/roguelike_line_of_sight/app/sprite_lookup.rb @@ -97,7 +97,7 @@ def tile_extended x, y, w, h, r, g, b, a, tile_row_column_or_key if !row member_name = member_name_as_code tile_row_column_or_key - raise "Unabled to find a sprite for #{member_name}. Make sure the value exists in app/sprite_lookup.rb." + raise "Unable to find a sprite for #{member_name}. Make sure the value exists in app/sprite_lookup.rb." end # Sprite provided by Rogue Yun diff --git a/samples/99_genre_rpg_roguelike/roguelike_starting_point/app/main.rb b/samples/99_genre_rpg_roguelike/roguelike_starting_point/app/main.rb index 7ed8d60..bc4d7fd 100644 --- a/samples/99_genre_rpg_roguelike/roguelike_starting_point/app/main.rb +++ b/samples/99_genre_rpg_roguelike/roguelike_starting_point/app/main.rb @@ -338,7 +338,7 @@ class Game state.enemies.find { |e| e.x == x && e.y == y && !e.is_dead } end - #M oves the user based on their keyboard input and sets values for target cell + # Moves the user based on their keyboard input and sets values for target cell def input_target_cell if inputs.keyboard.key_down.up # if "up" key is in "down" state [state.x, state.y + 1, 0, 1] # user moves up diff --git a/samples/99_genre_rpg_tactical/isometric_grid/app/main.rb b/samples/99_genre_rpg_tactical/isometric_grid/app/main.rb index 28bea32..6c8368d 100644 --- a/samples/99_genre_rpg_tactical/isometric_grid/app/main.rb +++ b/samples/99_genre_rpg_tactical/isometric_grid/app/main.rb @@ -10,10 +10,10 @@ class Isometric def defaults state.quantity ||= 6 #Size of grid - state.tileSize ||= [262 / 2, 194 / 2] #width and heigth of orange tiles + state.tileSize ||= [262 / 2, 194 / 2] #width and height of orange tiles state.tileGrid ||= [] #Holds ordering of tiles state.currentSpriteLocation ||= -1 #Current Sprite hovering location - state.tileCords ||= [] #Physical, rendering cordinates + state.tileCords ||= [] #Physical, rendering coordinates state.initCords ||= [640 - (state.quantity / 2 * state.tileSize[0]), 330] #Location of tile (0, 0) state.sideSize ||= [state.tileSize[0] / 2, 242 / 2] #Purple & green cube face size state.mode ||= :delete #Switches between :delete and :insert @@ -50,7 +50,7 @@ class Isometric end end - #Calculates physical cordinates for tiles + #Calculates physical coordinates for tiles if state.tileCords == [] state.tileCords = state.tileGrid.map do |val| @@ -101,7 +101,7 @@ class Isometric #Shows the tile itself. Important that it's rendered after the two above! outputs.sprites << state.tileCords.map do |val| - if val[2] == true #Chcekcs if tile needs to be rendered + if val[2] == true #Checks if tile needs to be rendered if val[5] == state.currentSpriteLocation [val[0], val[1], state.tileSize[0], state.tileSize[1], 'sprites/selectedTile.png'] else -- cgit v1.2.3 From bfab20c9a8a5f2abc5cf2b834c662ea89ad4adde Mon Sep 17 00:00:00 2001 From: Michał Dudziński Date: Sat, 10 Apr 2021 19:36:50 +0200 Subject: iOS wizard: determine version from either opts or metadata file --- dragon/ios_wizard.rb | 31 ++++++++++++++++++++++++------- dragon/itch_wizard.rb | 37 ++----------------------------------- dragon/metadata.rb | 41 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 67 insertions(+), 42 deletions(-) create mode 100644 dragon/metadata.rb diff --git a/dragon/ios_wizard.rb b/dragon/ios_wizard.rb index 9383749..81bd88e 100644 --- a/dragon/ios_wizard.rb +++ b/dragon/ios_wizard.rb @@ -1,3 +1,4 @@ +# Contributors outside of DragonRuby who also hold Copyright: Michał Dudziński # Copyright 2019 DragonRuby LLC # MIT License # ios_wizard.rb has been released under MIT (*only this file*). @@ -11,6 +12,8 @@ class WizardException < Exception end class IOSWizard + include Metadata + def initialize @doctor_executed_at = 0 end @@ -84,15 +87,19 @@ class IOSWizard def start opts = nil @opts = opts || {} - if !(@opts.is_a? Hash) || !($gtk.args.fn.eq_any? @opts[:env], :dev, :prod) + unless $gtk.args.fn.eq_any? @opts[:env], :dev, :prod raise WizardException.new( - "* $wizards.ios.start needs to be provided an environment option.", - "** For development builds type: $wizards.ios.start env: :dev", - "** For production builds type: $wizards.ios.start env: :prod" - ) + "* $wizards.ios.start needs to be provided an environment option.", + "** For development builds type: $wizards.ios.start env: :dev", + "** For production builds type: $wizards.ios.start env: :prod" + ) end @production_build = (@opts[:env] == :prod) + + @version = determine_app_version @opts + log_info "I will be using version: '#{@version}'" if @production_build + @steps = steps_development_build @steps = steps_production_build if @production_build @certificate_name = nil @@ -235,6 +242,15 @@ class IOSWizard log_info "App name is: #{@app_name}." end + def determine_app_version opts + version = @opts[:version] + unless version + version = get_metadata[:version] + version = version.start_with?('#') ? '1.0' : version.split('=').last + end + version.to_s + end + def provisioning_profile_xml environment xml = $gtk.read_file (provisioning_profile_path environment) scrubbed = xml.each_line.map do |l| @@ -798,7 +814,7 @@ XML CFBundlePackageType APPL CFBundleShortVersionString - 5.2 + :version CFBundleSignature ???? CFBundleSupportedPlatforms @@ -806,7 +822,7 @@ XML iPhoneOS CFBundleVersion - 5.2 + :version DTCompiler com.apple.compilers.llvm.clang.1_0 DTPlatformBuild @@ -890,6 +906,7 @@ XML info_plist_string.gsub!(":app_name", @app_name) info_plist_string.gsub!(":app_id", @app_id) + info_plist_string.gsub!(":version", @version); $gtk.write_file_root "tmp/ios/#{@app_name}.app/Info.plist", info_plist_string.strip diff --git a/dragon/itch_wizard.rb b/dragon/itch_wizard.rb index d87d07c..c0a69de 100644 --- a/dragon/itch_wizard.rb +++ b/dragon/itch_wizard.rb @@ -3,6 +3,8 @@ # itch_wizard.rb has been released under MIT (*only this file*). class ItchWizard + include Metadata + def steps [ :check_metadata, @@ -10,41 +12,6 @@ class ItchWizard ] end - def metadata_file_path - "metadata/game_metadata.txt" - end - - def get_metadata - metadata = $gtk.read_file metadata_file_path - - if !metadata - write_blank_metadata - metadata = $gtk.read_file metadata_file_path - end - - dev_id, dev_title, game_id, game_title, version, icon = *metadata.each_line.to_a - - { - dev_id: dev_id.strip, - dev_title: dev_title.strip, - game_id: game_id.strip, - game_title: game_title.strip, - version: version.strip, - icon: icon.strip - } - end - - def write_blank_metadata - $gtk.write_file metadata_file_path, <<-S.strip -#devid=myname -#devtitle=My Name -#gameid=mygame -#gametitle=My Game -#version=0.1 -#icon=metadata/icon.png -S - end - def check_metadata metadata_text = $gtk.read_file metadata_file_path if !metadata_text diff --git a/dragon/metadata.rb b/dragon/metadata.rb new file mode 100644 index 0000000..88d9b60 --- /dev/null +++ b/dragon/metadata.rb @@ -0,0 +1,41 @@ +# Contributors outside of DragonRuby who also hold Copyright: Michał Dudziński +# Copyright 2021 DragonRuby LLC +# MIT License +# metadata.rb has been released under MIT (*only this file*). + +module Metadata + def metadata_file_path + "metadata/game_metadata.txt" + end + + def get_metadata + metadata = $gtk.read_file metadata_file_path + + if !metadata + write_blank_metadata + metadata = $gtk.read_file metadata_file_path + end + + dev_id, dev_title, game_id, game_title, version, icon = *metadata.each_line.to_a + + { + dev_id: dev_id.strip, + dev_title: dev_title.strip, + game_id: game_id.strip, + game_title: game_title.strip, + version: version.strip, + icon: icon.strip + } + end + + def write_blank_metadata + $gtk.write_file metadata_file_path, <<-S.strip +#devid=myname +#devtitle=My Name +#gameid=mygame +#gametitle=My Game +#version=0.1 +#icon=metadata/icon.png +S + end +end -- cgit v1.2.3 From ba91acb8835e1c85a06e9b4c8cc82db1d12edbb0 Mon Sep 17 00:00:00 2001 From: Michał Dudziński Date: Mon, 3 May 2021 12:15:46 +0200 Subject: iOS wizard: minor tweaks --- dragon/ios_wizard.rb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/dragon/ios_wizard.rb b/dragon/ios_wizard.rb index 81bd88e..c1c032d 100644 --- a/dragon/ios_wizard.rb +++ b/dragon/ios_wizard.rb @@ -84,8 +84,8 @@ class IOSWizard sprite_path end - def start opts = nil - @opts = opts || {} + def start opts = {} + @opts = opts unless $gtk.args.fn.eq_any? @opts[:env], :dev, :prod raise WizardException.new( @@ -104,7 +104,11 @@ class IOSWizard @steps = steps_production_build if @production_build @certificate_name = nil init_wizard_status - log_info "Starting iOS Wizard so we can deploy to your device." + if @production_build + log_info "Starting iOS Wizard so we can create a production build." + else + log_info "Starting iOS Wizard so we can deploy to your device." + end @start_at = Kernel.global_tick_count steps.each do |m| log_info "Running step ~:#{m}~." -- cgit v1.2.3 From bea150381f495630f92f89d23d5f3445ec289b2d Mon Sep 17 00:00:00 2001 From: Amir Rajan Date: Sat, 7 Aug 2021 00:11:35 -0500 Subject: Deploy template folder synced. --- .../stubs/html5/dragonruby-html5-loader.js | 313 +-- .../.dragonruby/stubs/html5/stub/index.html | 4 +- deploy_template/CHANGELOG.txt | 2277 ++++++++++++-------- deploy_template/CHEATSHEET.txt | 232 -- deploy_template/README-raspberrypi.txt | 33 - deploy_template/README.txt | 369 ---- deploy_template/mygame/app/main.rb | 7 +- deploy_template/mygame/data/.gitkeep | 1 + .../mygame/documentation/01-high-level.md | 31 - deploy_template/mygame/documentation/02-labels.md | 132 -- .../mygame/documentation/03-solids-and-borders.md | 126 -- deploy_template/mygame/documentation/04-lines.md | 108 - deploy_template/mygame/documentation/05-sprites.md | 239 -- .../mygame/documentation/06-keyboard.md | 150 -- deploy_template/mygame/documentation/07-mouse.md | 48 - .../mygame/documentation/08-controllers.md | 86 - deploy_template/mygame/documentation/99-todo.md | 89 - deploy_template/mygame/fonts/.gitkeep | 1 + deploy_template/mygame/metadata/game_metadata.txt | 1 + deploy_template/mygame/metadata/ios_metadata.txt | 9 + deploy_template/mygame/sounds/.gitkeep | 1 + deploy_template/mygame/sprites/border-black.png | Bin 908 -> 0 bytes deploy_template/mygame/sprites/circle-black.png | Bin 1882 -> 0 bytes deploy_template/mygame/sprites/circle-blue.png | Bin 2901 -> 0 bytes deploy_template/mygame/sprites/circle-gray.png | Bin 3006 -> 0 bytes deploy_template/mygame/sprites/circle-green.png | Bin 2887 -> 0 bytes deploy_template/mygame/sprites/circle-indigo.png | Bin 2433 -> 0 bytes deploy_template/mygame/sprites/circle-orange.png | Bin 2670 -> 0 bytes deploy_template/mygame/sprites/circle-red.png | Bin 2233 -> 0 bytes deploy_template/mygame/sprites/circle-violet.png | Bin 2439 -> 0 bytes deploy_template/mygame/sprites/circle-white.png | Bin 1754 -> 0 bytes deploy_template/mygame/sprites/circle-yellow.png | Bin 2456 -> 0 bytes deploy_template/mygame/sprites/circle/black.png | Bin 0 -> 2511 bytes deploy_template/mygame/sprites/circle/blue.png | Bin 0 -> 4096 bytes deploy_template/mygame/sprites/circle/gray.png | Bin 0 -> 3719 bytes deploy_template/mygame/sprites/circle/green.png | Bin 0 -> 4105 bytes deploy_template/mygame/sprites/circle/indigo.png | Bin 0 -> 4430 bytes deploy_template/mygame/sprites/circle/orange.png | Bin 0 -> 4093 bytes deploy_template/mygame/sprites/circle/red.png | Bin 0 -> 4133 bytes deploy_template/mygame/sprites/circle/violet.png | Bin 0 -> 4383 bytes deploy_template/mygame/sprites/circle/white.png | Bin 0 -> 3463 bytes deploy_template/mygame/sprites/circle/yellow.png | Bin 0 -> 3408 bytes deploy_template/mygame/sprites/dragon-0.png | Bin 12896 -> 0 bytes deploy_template/mygame/sprites/dragon-1.png | Bin 2964 -> 0 bytes deploy_template/mygame/sprites/dragon-2.png | Bin 3047 -> 0 bytes deploy_template/mygame/sprites/dragon-3.png | Bin 2655 -> 0 bytes deploy_template/mygame/sprites/dragon-4.png | Bin 2725 -> 0 bytes deploy_template/mygame/sprites/dragon-5.png | Bin 2655 -> 0 bytes deploy_template/mygame/sprites/explosion-0.png | Bin 267 -> 0 bytes deploy_template/mygame/sprites/explosion-1.png | Bin 4585 -> 0 bytes deploy_template/mygame/sprites/explosion-2.png | Bin 4675 -> 0 bytes deploy_template/mygame/sprites/explosion-3.png | Bin 4724 -> 0 bytes deploy_template/mygame/sprites/explosion-4.png | Bin 4773 -> 0 bytes deploy_template/mygame/sprites/explosion-5.png | Bin 4742 -> 0 bytes deploy_template/mygame/sprites/explosion-6.png | Bin 4665 -> 0 bytes deploy_template/mygame/sprites/explosion-sheet.png | Bin 2584 -> 0 bytes deploy_template/mygame/sprites/hexagon-black.png | Bin 2602 -> 0 bytes deploy_template/mygame/sprites/hexagon-blue.png | Bin 4842 -> 0 bytes deploy_template/mygame/sprites/hexagon-gray.png | Bin 5184 -> 0 bytes deploy_template/mygame/sprites/hexagon-green.png | Bin 4695 -> 0 bytes deploy_template/mygame/sprites/hexagon-indigo.png | Bin 4918 -> 0 bytes deploy_template/mygame/sprites/hexagon-orange.png | Bin 4825 -> 0 bytes deploy_template/mygame/sprites/hexagon-red.png | Bin 3753 -> 0 bytes deploy_template/mygame/sprites/hexagon-violet.png | Bin 5069 -> 0 bytes deploy_template/mygame/sprites/hexagon-white.png | Bin 5326 -> 0 bytes deploy_template/mygame/sprites/hexagon-yellow.png | Bin 5249 -> 0 bytes deploy_template/mygame/sprites/hexagon/black.png | Bin 0 -> 2202 bytes deploy_template/mygame/sprites/hexagon/blue.png | Bin 0 -> 2060 bytes deploy_template/mygame/sprites/hexagon/gray.png | Bin 0 -> 2011 bytes deploy_template/mygame/sprites/hexagon/green.png | Bin 0 -> 2064 bytes deploy_template/mygame/sprites/hexagon/indigo.png | Bin 0 -> 2169 bytes deploy_template/mygame/sprites/hexagon/orange.png | Bin 0 -> 2045 bytes deploy_template/mygame/sprites/hexagon/red.png | Bin 0 -> 2017 bytes deploy_template/mygame/sprites/hexagon/violet.png | Bin 0 -> 2166 bytes deploy_template/mygame/sprites/hexagon/white.png | Bin 0 -> 1627 bytes deploy_template/mygame/sprites/hexagon/yellow.png | Bin 0 -> 1656 bytes deploy_template/mygame/sprites/isometric-black.png | Bin 264 -> 0 bytes deploy_template/mygame/sprites/isometric-blue.png | Bin 361 -> 0 bytes deploy_template/mygame/sprites/isometric-gray.png | Bin 493 -> 0 bytes deploy_template/mygame/sprites/isometric-green.png | Bin 361 -> 0 bytes .../mygame/sprites/isometric-indigo.png | Bin 361 -> 0 bytes .../mygame/sprites/isometric-orange.png | Bin 361 -> 0 bytes deploy_template/mygame/sprites/isometric-red.png | Bin 361 -> 0 bytes .../mygame/sprites/isometric-violet.png | Bin 361 -> 0 bytes deploy_template/mygame/sprites/isometric-white.png | Bin 361 -> 0 bytes .../mygame/sprites/isometric-yellow.png | Bin 361 -> 0 bytes deploy_template/mygame/sprites/isometric/black.png | Bin 0 -> 2444 bytes deploy_template/mygame/sprites/isometric/blue.png | Bin 0 -> 2771 bytes deploy_template/mygame/sprites/isometric/gray.png | Bin 0 -> 2475 bytes deploy_template/mygame/sprites/isometric/green.png | Bin 0 -> 2785 bytes .../mygame/sprites/isometric/indigo.png | Bin 0 -> 2844 bytes .../mygame/sprites/isometric/orange.png | Bin 0 -> 2444 bytes deploy_template/mygame/sprites/isometric/red.png | Bin 0 -> 2469 bytes .../mygame/sprites/isometric/violet.png | Bin 0 -> 2852 bytes deploy_template/mygame/sprites/isometric/white.png | Bin 0 -> 2033 bytes .../mygame/sprites/isometric/yellow.png | Bin 0 -> 1449 bytes deploy_template/mygame/sprites/misc/dragon-0.png | Bin 0 -> 12896 bytes deploy_template/mygame/sprites/misc/dragon-1.png | Bin 0 -> 2964 bytes deploy_template/mygame/sprites/misc/dragon-2.png | Bin 0 -> 3047 bytes deploy_template/mygame/sprites/misc/dragon-3.png | Bin 0 -> 2655 bytes deploy_template/mygame/sprites/misc/dragon-4.png | Bin 0 -> 2725 bytes deploy_template/mygame/sprites/misc/dragon-5.png | Bin 0 -> 2655 bytes .../mygame/sprites/misc/explosion-0.png | Bin 0 -> 267 bytes .../mygame/sprites/misc/explosion-1.png | Bin 0 -> 4585 bytes .../mygame/sprites/misc/explosion-2.png | Bin 0 -> 4675 bytes .../mygame/sprites/misc/explosion-3.png | Bin 0 -> 4724 bytes .../mygame/sprites/misc/explosion-4.png | Bin 0 -> 4773 bytes .../mygame/sprites/misc/explosion-5.png | Bin 0 -> 4742 bytes .../mygame/sprites/misc/explosion-6.png | Bin 0 -> 4665 bytes .../mygame/sprites/misc/explosion-sheet.png | Bin 0 -> 2584 bytes .../mygame/sprites/misc/lowrez-ship-blue.png | Bin 0 -> 109 bytes .../mygame/sprites/misc/lowrez-ship-red.png | Bin 0 -> 104 bytes .../mygame/sprites/misc/simple-mood-16x16.png | Bin 0 -> 14424 bytes deploy_template/mygame/sprites/misc/star.png | Bin 0 -> 711 bytes deploy_template/mygame/sprites/misc/tiny-star.png | Bin 0 -> 112 bytes deploy_template/mygame/sprites/square-black.png | Bin 250 -> 0 bytes deploy_template/mygame/sprites/square-blue.png | Bin 283 -> 0 bytes deploy_template/mygame/sprites/square-gray.png | Bin 251 -> 0 bytes deploy_template/mygame/sprites/square-green.png | Bin 283 -> 0 bytes deploy_template/mygame/sprites/square-indigo.png | Bin 283 -> 0 bytes deploy_template/mygame/sprites/square-orange.png | Bin 282 -> 0 bytes deploy_template/mygame/sprites/square-red.png | Bin 274 -> 0 bytes deploy_template/mygame/sprites/square-violet.png | Bin 284 -> 0 bytes deploy_template/mygame/sprites/square-white.png | Bin 279 -> 0 bytes deploy_template/mygame/sprites/square-yellow.png | Bin 286 -> 0 bytes deploy_template/mygame/sprites/square/black.png | Bin 0 -> 326 bytes deploy_template/mygame/sprites/square/blue.png | Bin 0 -> 329 bytes deploy_template/mygame/sprites/square/gray.png | Bin 0 -> 325 bytes deploy_template/mygame/sprites/square/green.png | Bin 0 -> 329 bytes deploy_template/mygame/sprites/square/indigo.png | Bin 0 -> 335 bytes deploy_template/mygame/sprites/square/orange.png | Bin 0 -> 335 bytes deploy_template/mygame/sprites/square/red.png | Bin 0 -> 335 bytes deploy_template/mygame/sprites/square/violet.png | Bin 0 -> 334 bytes deploy_template/mygame/sprites/square/white.png | Bin 0 -> 325 bytes deploy_template/mygame/sprites/square/yellow.png | Bin 0 -> 319 bytes deploy_template/mygame/sprites/star.png | Bin 711 -> 0 bytes deploy_template/mygame/sprites/tile/wall-0000.png | Bin 0 -> 93 bytes deploy_template/mygame/sprites/tile/wall-0001.png | Bin 0 -> 99 bytes deploy_template/mygame/sprites/tile/wall-0010.png | Bin 0 -> 98 bytes deploy_template/mygame/sprites/tile/wall-0011.png | Bin 0 -> 101 bytes deploy_template/mygame/sprites/tile/wall-0100.png | Bin 0 -> 98 bytes deploy_template/mygame/sprites/tile/wall-0101.png | Bin 0 -> 100 bytes deploy_template/mygame/sprites/tile/wall-0110.png | Bin 0 -> 100 bytes deploy_template/mygame/sprites/tile/wall-0111.png | Bin 0 -> 102 bytes deploy_template/mygame/sprites/tile/wall-1000.png | Bin 0 -> 99 bytes deploy_template/mygame/sprites/tile/wall-1001.png | Bin 0 -> 101 bytes deploy_template/mygame/sprites/tile/wall-1010.png | Bin 0 -> 100 bytes deploy_template/mygame/sprites/tile/wall-1011.png | Bin 0 -> 101 bytes deploy_template/mygame/sprites/tile/wall-1100.png | Bin 0 -> 101 bytes deploy_template/mygame/sprites/tile/wall-1101.png | Bin 0 -> 102 bytes deploy_template/mygame/sprites/tile/wall-1110.png | Bin 0 -> 101 bytes deploy_template/mygame/sprites/tile/wall-1111.png | Bin 0 -> 102 bytes 152 files changed, 1535 insertions(+), 2722 deletions(-) delete mode 100644 deploy_template/CHEATSHEET.txt delete mode 100644 deploy_template/README-raspberrypi.txt delete mode 100644 deploy_template/README.txt create mode 100644 deploy_template/mygame/data/.gitkeep delete mode 100644 deploy_template/mygame/documentation/01-high-level.md delete mode 100644 deploy_template/mygame/documentation/02-labels.md delete mode 100644 deploy_template/mygame/documentation/03-solids-and-borders.md delete mode 100644 deploy_template/mygame/documentation/04-lines.md delete mode 100644 deploy_template/mygame/documentation/05-sprites.md delete mode 100644 deploy_template/mygame/documentation/06-keyboard.md delete mode 100644 deploy_template/mygame/documentation/07-mouse.md delete mode 100644 deploy_template/mygame/documentation/08-controllers.md delete mode 100644 deploy_template/mygame/documentation/99-todo.md create mode 100644 deploy_template/mygame/fonts/.gitkeep create mode 100644 deploy_template/mygame/metadata/ios_metadata.txt create mode 100644 deploy_template/mygame/sounds/.gitkeep delete mode 100644 deploy_template/mygame/sprites/border-black.png delete mode 100644 deploy_template/mygame/sprites/circle-black.png delete mode 100644 deploy_template/mygame/sprites/circle-blue.png delete mode 100644 deploy_template/mygame/sprites/circle-gray.png delete mode 100644 deploy_template/mygame/sprites/circle-green.png delete mode 100644 deploy_template/mygame/sprites/circle-indigo.png delete mode 100644 deploy_template/mygame/sprites/circle-orange.png delete mode 100644 deploy_template/mygame/sprites/circle-red.png delete mode 100644 deploy_template/mygame/sprites/circle-violet.png delete mode 100644 deploy_template/mygame/sprites/circle-white.png delete mode 100644 deploy_template/mygame/sprites/circle-yellow.png create mode 100644 deploy_template/mygame/sprites/circle/black.png create mode 100644 deploy_template/mygame/sprites/circle/blue.png create mode 100644 deploy_template/mygame/sprites/circle/gray.png create mode 100644 deploy_template/mygame/sprites/circle/green.png create mode 100644 deploy_template/mygame/sprites/circle/indigo.png create mode 100644 deploy_template/mygame/sprites/circle/orange.png create mode 100644 deploy_template/mygame/sprites/circle/red.png create mode 100644 deploy_template/mygame/sprites/circle/violet.png create mode 100644 deploy_template/mygame/sprites/circle/white.png create mode 100644 deploy_template/mygame/sprites/circle/yellow.png delete mode 100644 deploy_template/mygame/sprites/dragon-0.png delete mode 100644 deploy_template/mygame/sprites/dragon-1.png delete mode 100644 deploy_template/mygame/sprites/dragon-2.png delete mode 100644 deploy_template/mygame/sprites/dragon-3.png delete mode 100644 deploy_template/mygame/sprites/dragon-4.png delete mode 100644 deploy_template/mygame/sprites/dragon-5.png delete mode 100644 deploy_template/mygame/sprites/explosion-0.png delete mode 100644 deploy_template/mygame/sprites/explosion-1.png delete mode 100644 deploy_template/mygame/sprites/explosion-2.png delete mode 100644 deploy_template/mygame/sprites/explosion-3.png delete mode 100644 deploy_template/mygame/sprites/explosion-4.png delete mode 100644 deploy_template/mygame/sprites/explosion-5.png delete mode 100644 deploy_template/mygame/sprites/explosion-6.png delete mode 100644 deploy_template/mygame/sprites/explosion-sheet.png delete mode 100644 deploy_template/mygame/sprites/hexagon-black.png delete mode 100644 deploy_template/mygame/sprites/hexagon-blue.png delete mode 100644 deploy_template/mygame/sprites/hexagon-gray.png delete mode 100644 deploy_template/mygame/sprites/hexagon-green.png delete mode 100644 deploy_template/mygame/sprites/hexagon-indigo.png delete mode 100644 deploy_template/mygame/sprites/hexagon-orange.png delete mode 100644 deploy_template/mygame/sprites/hexagon-red.png delete mode 100644 deploy_template/mygame/sprites/hexagon-violet.png delete mode 100644 deploy_template/mygame/sprites/hexagon-white.png delete mode 100644 deploy_template/mygame/sprites/hexagon-yellow.png create mode 100644 deploy_template/mygame/sprites/hexagon/black.png create mode 100644 deploy_template/mygame/sprites/hexagon/blue.png create mode 100644 deploy_template/mygame/sprites/hexagon/gray.png create mode 100644 deploy_template/mygame/sprites/hexagon/green.png create mode 100644 deploy_template/mygame/sprites/hexagon/indigo.png create mode 100644 deploy_template/mygame/sprites/hexagon/orange.png create mode 100644 deploy_template/mygame/sprites/hexagon/red.png create mode 100644 deploy_template/mygame/sprites/hexagon/violet.png create mode 100644 deploy_template/mygame/sprites/hexagon/white.png create mode 100644 deploy_template/mygame/sprites/hexagon/yellow.png delete mode 100644 deploy_template/mygame/sprites/isometric-black.png delete mode 100644 deploy_template/mygame/sprites/isometric-blue.png delete mode 100644 deploy_template/mygame/sprites/isometric-gray.png delete mode 100644 deploy_template/mygame/sprites/isometric-green.png delete mode 100644 deploy_template/mygame/sprites/isometric-indigo.png delete mode 100644 deploy_template/mygame/sprites/isometric-orange.png delete mode 100644 deploy_template/mygame/sprites/isometric-red.png delete mode 100644 deploy_template/mygame/sprites/isometric-violet.png delete mode 100644 deploy_template/mygame/sprites/isometric-white.png delete mode 100644 deploy_template/mygame/sprites/isometric-yellow.png create mode 100644 deploy_template/mygame/sprites/isometric/black.png create mode 100644 deploy_template/mygame/sprites/isometric/blue.png create mode 100644 deploy_template/mygame/sprites/isometric/gray.png create mode 100644 deploy_template/mygame/sprites/isometric/green.png create mode 100644 deploy_template/mygame/sprites/isometric/indigo.png create mode 100644 deploy_template/mygame/sprites/isometric/orange.png create mode 100644 deploy_template/mygame/sprites/isometric/red.png create mode 100644 deploy_template/mygame/sprites/isometric/violet.png create mode 100644 deploy_template/mygame/sprites/isometric/white.png create mode 100644 deploy_template/mygame/sprites/isometric/yellow.png create mode 100644 deploy_template/mygame/sprites/misc/dragon-0.png create mode 100644 deploy_template/mygame/sprites/misc/dragon-1.png create mode 100644 deploy_template/mygame/sprites/misc/dragon-2.png create mode 100644 deploy_template/mygame/sprites/misc/dragon-3.png create mode 100644 deploy_template/mygame/sprites/misc/dragon-4.png create mode 100644 deploy_template/mygame/sprites/misc/dragon-5.png create mode 100644 deploy_template/mygame/sprites/misc/explosion-0.png create mode 100644 deploy_template/mygame/sprites/misc/explosion-1.png create mode 100644 deploy_template/mygame/sprites/misc/explosion-2.png create mode 100644 deploy_template/mygame/sprites/misc/explosion-3.png create mode 100644 deploy_template/mygame/sprites/misc/explosion-4.png create mode 100644 deploy_template/mygame/sprites/misc/explosion-5.png create mode 100644 deploy_template/mygame/sprites/misc/explosion-6.png create mode 100644 deploy_template/mygame/sprites/misc/explosion-sheet.png create mode 100644 deploy_template/mygame/sprites/misc/lowrez-ship-blue.png create mode 100644 deploy_template/mygame/sprites/misc/lowrez-ship-red.png create mode 100644 deploy_template/mygame/sprites/misc/simple-mood-16x16.png create mode 100644 deploy_template/mygame/sprites/misc/star.png create mode 100644 deploy_template/mygame/sprites/misc/tiny-star.png delete mode 100644 deploy_template/mygame/sprites/square-black.png delete mode 100644 deploy_template/mygame/sprites/square-blue.png delete mode 100644 deploy_template/mygame/sprites/square-gray.png delete mode 100644 deploy_template/mygame/sprites/square-green.png delete mode 100644 deploy_template/mygame/sprites/square-indigo.png delete mode 100644 deploy_template/mygame/sprites/square-orange.png delete mode 100644 deploy_template/mygame/sprites/square-red.png delete mode 100644 deploy_template/mygame/sprites/square-violet.png delete mode 100644 deploy_template/mygame/sprites/square-white.png delete mode 100644 deploy_template/mygame/sprites/square-yellow.png create mode 100644 deploy_template/mygame/sprites/square/black.png create mode 100644 deploy_template/mygame/sprites/square/blue.png create mode 100644 deploy_template/mygame/sprites/square/gray.png create mode 100644 deploy_template/mygame/sprites/square/green.png create mode 100644 deploy_template/mygame/sprites/square/indigo.png create mode 100644 deploy_template/mygame/sprites/square/orange.png create mode 100644 deploy_template/mygame/sprites/square/red.png create mode 100644 deploy_template/mygame/sprites/square/violet.png create mode 100644 deploy_template/mygame/sprites/square/white.png create mode 100644 deploy_template/mygame/sprites/square/yellow.png delete mode 100644 deploy_template/mygame/sprites/star.png create mode 100644 deploy_template/mygame/sprites/tile/wall-0000.png create mode 100644 deploy_template/mygame/sprites/tile/wall-0001.png create mode 100644 deploy_template/mygame/sprites/tile/wall-0010.png create mode 100644 deploy_template/mygame/sprites/tile/wall-0011.png create mode 100644 deploy_template/mygame/sprites/tile/wall-0100.png create mode 100644 deploy_template/mygame/sprites/tile/wall-0101.png create mode 100644 deploy_template/mygame/sprites/tile/wall-0110.png create mode 100644 deploy_template/mygame/sprites/tile/wall-0111.png create mode 100644 deploy_template/mygame/sprites/tile/wall-1000.png create mode 100644 deploy_template/mygame/sprites/tile/wall-1001.png create mode 100644 deploy_template/mygame/sprites/tile/wall-1010.png create mode 100644 deploy_template/mygame/sprites/tile/wall-1011.png create mode 100644 deploy_template/mygame/sprites/tile/wall-1100.png create mode 100644 deploy_template/mygame/sprites/tile/wall-1101.png create mode 100644 deploy_template/mygame/sprites/tile/wall-1110.png create mode 100644 deploy_template/mygame/sprites/tile/wall-1111.png diff --git a/deploy_template/.dragonruby/stubs/html5/dragonruby-html5-loader.js b/deploy_template/.dragonruby/stubs/html5/dragonruby-html5-loader.js index c321422..bb4ef56 100644 --- a/deploy_template/.dragonruby/stubs/html5/dragonruby-html5-loader.js +++ b/deploy_template/.dragonruby/stubs/html5/dragonruby-html5-loader.js @@ -25,7 +25,7 @@ function syncDataFiles(dbname, baseurl) total_to_download: 0, total_downloaded: 0, total_files: 0, - pending_files: 0 + pending_files: [] }; var log = function(str) { console.log("CACHEAPPDATA: " + str); } @@ -98,15 +98,16 @@ function syncDataFiles(dbname, baseurl) failed("Couldn't open local database: " + event.target.error.message); }; + // !!! FIXME: there _has_ to be a better way to do this, right? + var hash_count = function(h) { + var k = Object.keys(h); + return (k === undefined) ? 0 : k.length; + } + var finished_file = function(fname) { debug("Finished writing '" + fname + "' to the database!"); - state.pending_files--; - if (state.pending_files < 0) { - state.pending_files = 0; - debug("Uhoh, pending_files went negative?!"); - } - if (state.pending_files == 0) { - succeeded(); + if ((hash_count(state.xhrs) == 0) && (state.pending_files.length == 0)) { + succeeded(); // nothing downloading, nothing new to download, and everything is written to disk. Success! } }; @@ -138,10 +139,63 @@ function syncDataFiles(dbname, baseurl) }; }; + var download_another_file = function() { + if (state.pending_files.length == 0) { + return false; // nothing to do. + } + + var remotefname = state.pending_files.pop(); + var remoteitem = state.remote_manifest[remotefname]; + var xhr = new XMLHttpRequest(); + state.xhrs[remotefname] = xhr; + xhr.previously_loaded = 0; + xhr.filename = remotefname; + xhr.filesize = remoteitem.filesize; + xhr.filetime = remoteitem.filetime; + xhr.expected_filesize = remoteitem.filesize; + xhr.responseType = "arraybuffer"; + xhr.addEventListener("error", function(e) { failed("Download error on '" + e.target.filename + "'!"); }); + xhr.addEventListener("timeout", function(e) { failed("Download timeout on '" + e.target.filename + "'!"); }); + xhr.addEventListener("abort", function(e) { failed("Download abort on '" + e.target.filename + "'!"); }); + + xhr.addEventListener('progress', function(e) { + if (state.reported_result) { return; } + var xhr = e.target; + var additional = e.loaded - xhr.previously_loaded; + state.total_downloaded += additional; + xhr.previously_loaded = e.loaded; + debug("Downloaded " + additional + " more bytes for file '" + xhr.filename + "'"); + var percent = state.total_to_download ? Math.floor((state.total_downloaded / state.total_to_download) * 100.0) : 0; + progress("Downloaded " + percent + "% (" + Math.ceil(state.total_downloaded / 1048576) + "/" + Math.ceil(state.total_to_download / 1048576) + " megabytes)"); + }); + + xhr.addEventListener("load", function(e) { + if (state.reported_result) { return; } + var xhr = e.target; + if (xhr.status != 200) { + failed("Server reported failure downloading '" + xhr.filename + "'!"); + } else { + debug("Finished download of '" + xhr.filename + "'!"); + state.total_downloaded -= xhr.previously_loaded; + state.total_downloaded += xhr.expected_filesize; + xhr.previously_loaded = xhr.expected_filesize; + delete state.xhrs[xhr.filename]; + var percent = state.total_to_download ? Math.floor((state.total_downloaded / state.total_to_download) * 100.0) : 0; + progress("Downloaded " + percent + "% (" + Math.ceil(state.total_downloaded / 1048576) + "/" + Math.ceil(state.total_to_download / 1048576) + " megabytes)"); + download_another_file(); // kick off another download now that this one is done. + store_file(xhr); + } + }); + + debug("Starting download of '" + xhr.filename + "'..."); + xhr.open("get", baseurl + remotefname + urlrandomizerarg, true); + xhr.send(); + return true; + } + var download_new_files = function() { if (state.reported_result) { return; } progress("Downloading new files..."); - var downloadme = []; for (var i in state.remote_manifest) { var remoteitem = state.remote_manifest[i]; var remotefname = i; @@ -149,65 +203,25 @@ function syncDataFiles(dbname, baseurl) debug("remote filename '" + remotefname + "' already downloaded."); } else { debug("remote filename '" + remotefname + "' needs downloading."); - // the browser will let a handful of these go in parallel, and - // then will queue the rest, firing events as appropriate - // when it gets around to them, so just fire them all off - // here. - // !!! FIXME: use the Fetch API, plus streaming, as an option. // !!! FIXME: It can use less memory, since it doesn't need // !!! FIXME: to keep the whole file in memory. state.total_to_download += remoteitem.filesize; state.total_files++; - state.pending_files++; - - var xhr = new XMLHttpRequest(); - state.xhrs[remotefname] = xhr; - xhr.previously_loaded = 0; - xhr.filename = remotefname; - xhr.filesize = state.remote_manifest[i].filesize; - xhr.filetime = state.remote_manifest[i].filetime; - xhr.expected_filesize = remoteitem.filesize; - xhr.responseType = "arraybuffer"; - xhr.addEventListener("error", function(e) { failed("Download error on '" + e.target.filename + "'!"); }); - xhr.addEventListener("timeout", function(e) { failed("Download timeout on '" + e.target.filename + "'!"); }); - xhr.addEventListener("abort", function(e) { failed("Download abort on '" + e.target.filename + "'!"); }); - - xhr.addEventListener('progress', function(e) { - if (state.reported_result) { return; } - var xhr = e.target; - var additional = e.loaded - xhr.previously_loaded; - state.total_downloaded += additional; - xhr.previously_loaded = e.loaded; - debug("Downloaded " + additional + " more bytes for file '" + xhr.filename + "'"); - var percent = state.total_to_download ? Math.floor((state.total_downloaded / state.total_to_download) * 100.0) : 0; - progress("Downloaded " + percent + "% (" + Math.ceil(state.total_downloaded / 1048576) + "/" + Math.ceil(state.total_to_download / 1048576) + " megabytes)"); - }); - - xhr.addEventListener("load", function(e) { - if (state.reported_result) { return; } - var xhr = e.target; - if (xhr.status != 200) { - failed("Server reported failure downloading '" + xhr.filename + "'!"); - } else { - debug("Finished download of '" + xhr.filename + "'!"); - state.total_downloaded -= xhr.previously_loaded; - state.total_downloaded += xhr.expected_filesize; - xhr.previously_loaded = xhr.expected_filesize; - delete state.xhrs[xhr.filename]; - var percent = state.total_to_download ? Math.floor((state.total_downloaded / state.total_to_download) * 100.0) : 0; - progress("Downloaded " + percent + "% (" + Math.ceil(state.total_downloaded / 1048576) + "/" + Math.ceil(state.total_to_download / 1048576) + " megabytes)"); - store_file(xhr); - } - }); - - xhr.open("get", baseurl + remotefname + urlrandomizerarg, true); - xhr.send(); + state.pending_files.push(remotefname) } } - if (state.pending_files == 0) { + if (state.pending_files.length == 0) { succeeded(); // we're already done. :) + return; + } + + var max_concurrent_downloads = 4; + while (download_another_file()) { + if (hash_count(state.xhrs) >= max_concurrent_downloads) { + break; // we'll start another as each download completes. + } } }; @@ -340,30 +354,52 @@ function syncDataFiles(dbname, baseurl) return retval; } +var prepareFilesystem = function() +{ + // Download the game data and set up the filesystem! + // set up a persistent store for save games, etc. + FS.mkdir('/persistent'); + FS.mount(IDBFS, {}, '/persistent'); + FS.syncfs(true, function(err) { + if (err) { + console.log("WARNING: Failed to populate persistent store. Save games likely lost?"); + } else { + console.log("Read in from persistent store."); + } + + loadDataFiles(GDragonRubyGameId, 'gamedata/', function() { + console.log("Game data is sync'd to MEMFS. Starting click-to-play()..."); + //Module.setStatus("Ready!"); + //setTimeout(function() { Module.setStatus(""); statusElement.style.display='none'; }, 1000); + Module.setStatus(""); + statusElement.style.display='none'; + Module.startClickToPlay(); + }); + }); +} + + var statusElement = document.getElementById('status'); var progressElement = document.getElementById('progress'); var canvasElement = document.getElementById('canvas'); -canvasElement.style.width = '1280px'; -canvasElement.style.height = '720px'; -canvasElement.style.display = 'block'; -canvasElement.style['margin-left'] = 'auto'; -canvasElement.style['margin-right'] = 'auto'; +canvasElement.style.width = '100%'; +canvasElement.style.height = '100%'; +document.getElementById('borderdiv').style.border = '0px'; -statusElement.style.display = 'none'; -progressElement.style.display = 'none'; -document.getElementById('progressdiv').style.display = 'none'; +//statusElement.style.display = 'none'; +//progressElement.style.display = 'none'; +//document.getElementById('progressdiv').style.display = 'none'; document.getElementById('output').style.display = 'none'; -document.getElementById('game-input').style.display = "none" -if (!window.parent.window.gtk) { - window.parent.window.gtk = {}; -} +// if (!window.parent.window.gtk) { +// window.parent.window.gtk = {}; +// } -window.parent.window.gtk.saveMain = function(text) { - FS.writeFile('app/main.rb', text); - window.gtk.play(); -} +// window.parent.window.gtk.saveMain = function(text) { +// FS.writeFile('app/main.rb', text); +// window.gtk.play(); +// } var loadDataFiles = function(dbname, baseurl, onsuccess) { @@ -481,8 +517,14 @@ var base64Encode = function(ui8array) { return out; } +function startGame() +{ + Module["removeRunDependency"]("dragonruby_init"); +} + + var Module = { - noInitialRun: true, + noInitialRun: false, preInit: [], clickedToPlay: false, clickToPlayListener: function() { @@ -493,10 +535,11 @@ var Module = { div.removeEventListener('click', Module.clickToPlayListener); document.body.removeChild(div); } - if (window.parent.window.gtk.starting) { - window.parent.window.gtk.starting(); - } - Module["callMain"](); // go go go! + // if (window.parent.window.gtk.starting) { + // window.parent.window.gtk.starting(); + // } + + startGame(); // go go go! }, startClickToPlay: function() { var base64 = base64Encode(FS.readFile(GDragonRubyIcon, {})); @@ -504,27 +547,38 @@ var Module = { var leftPx = ((window.innerWidth - 640) / 2); var leftPerc = Math.floor((leftPx / window.innerWidth) * 100); div.id = 'clicktoplaydiv'; + div.style.width = '50%'; + div.style.height = '50%'; div.style.backgroundColor = 'rgb(40, 44, 52)'; - div.style.left = leftPerc.toString() + "%"; - div.style.top = '10%'; - div.style.display = 'block'; div.style.position = 'absolute'; - div.style.width = "640px" - div.style.height = "360px" - - + div.style.top = '50%'; + div.style.left = '50%'; + div.style.transform = 'translate(-50%, -50%)'; var img = new Image(); img.onload = function() { // once we know its size, scale it, keeping aspect ratio. - var zoomRatio = 100.0 / this.width; - img.style.width = (zoomRatio * this.width.toString()) + "px"; - img.style.height = (zoomRatio * this.height.toString()) + "px"; - img.style.display = "block"; - img.style['margin-left'] = 'auto'; - img.style['margin-right'] = 'auto'; + var pct = 30; + var w = img.naturalWidth; + var h = img.naturalHeight; + if (!w || !h || (w == h)) { + img.style.width = '' + pct + '%'; + img.style.height = '' + pct + '%'; + } else if (w > h) { + img.style.width = '' + pct + '%'; + } else { + img.style.height = '' + pct + '%'; + } + img.style.display = 'block'; } img.style.display = 'none'; + img.style.width = 'auto'; + img.style.height = 'auto'; + img.style.margin = 0; + img.style.position = 'absolute'; + img.style.top = '50%'; + img.style.left = '50%'; + img.style.transform = 'translate(-50%, -50%)'; img.src = 'data:image/png;base64,' + base64; div.appendChild(img); @@ -536,17 +590,21 @@ var Module = { p.style.textAlign = 'center'; p.style.color = '#FFFFFF'; p.style.width = '100%'; + p.style.position = 'absolute'; + p.style.top = '10%'; p.style['font-family'] = "monospace"; div.appendChild(p); - + p = document.createElement('p'); - p.innerHTML = 'Click here to begin.'; + p.innerHTML = 'Click or tap here to begin.'; p.style['font-family'] = "monospace"; p.style['font-size'] = "20px"; p.style.textAlign = 'center'; p.style.backgroundColor = 'rgb(40, 44, 52)'; p.style.color = '#FFFFFF'; p.style.width = '100%'; + p.style.position = 'absolute'; + p.style.top = '75%'; div.appendChild(p); document.body.appendChild(div); @@ -554,25 +612,10 @@ var Module = { window.gtk.play = Module.clickToPlayListener; }, preRun: function() { - // set up a persistent store for save games, etc. - FS.mkdir('/persistent'); - FS.mount(IDBFS, {}, '/persistent'); - FS.syncfs(true, function(err) { - if (err) { - console.log("WARNING: Failed to populate persistent store. Save games likely lost?"); - } else { - console.log("Read in from persistent store."); - } - - loadDataFiles(GDragonRubyGameId, 'gamedata/', function() { - console.log("Game data is sync'd to MEMFS. Starting click-to-play()..."); - //Module.setStatus("Ready!"); - //setTimeout(function() { Module.setStatus(""); statusElement.style.display='none'; }, 1000); - Module.setStatus(""); - statusElement.style.display='none'; - Module.startClickToPlay(); - }); - }); + // this prevents the game from running. We'll remove the dependency when + // we have downloaded everything and the user has clicked-through to play. + Module["addRunDependency"]("dragonruby_init"); + prepareFilesystem(); // will get data, async. }, postRun: [], print: (function() { @@ -610,10 +653,6 @@ var Module = { canvas.addEventListener("click", function() { document.getElementById('toplevel').click(); document.getElementById('toplevel').focus(); - document.getElementById('game-input').style.display = "inline" - document.getElementById('game-input').focus(); - document.getElementById('game-input').blur(); - document.getElementById('game-input').style.display = "none" canvas.focus(); }); @@ -653,36 +692,26 @@ window.onerror = function(event) { }; }; +// sanity check this before downloading anything heavy. var hasWebAssembly = false; if (typeof WebAssembly==="object" && typeof WebAssembly.Memory==="function") { hasWebAssembly = true; } //console.log("Do we have WebAssembly? " + ((hasWebAssembly) ? "YES" : "NO")); +if (!hasWebAssembly) { + Module.setStatus("Your browser doesn't have WebAssembly support. Please upgrade."); +} else { + var buildtype = "wasm"; + var module = "dragonruby-" + buildtype + ".js"; + window.gtk = {}; + window.gtk.module = Module; -var buildtype = hasWebAssembly ? "wasm" : "asmjs"; -var module = "dragonruby-" + buildtype + ".js"; -window.gtk = {}; -window.gtk.module = Module; - -//console.log("Our main module is: " + module); + //console.log("Our main module is: " + module); -var script = document.createElement('script'); -script.src = module; -if (hasWebAssembly) { + var script = document.createElement('script'); + script.src = module; script.async = true; -} else { - script.async = false; // !!! FIXME: can this be async? - (function() { - var memoryInitializer = module + '.mem'; - if (typeof Module['locateFile'] === 'function') { - memoryInitializer = Module['locateFile'](memoryInitializer); - } else if (Module['memoryInitializerPrefixURL']) { - memoryInitializer = Module['memoryInitializerPrefixURL'] + memoryInitializer; - } - var meminitXHR = Module['memoryInitializerRequest'] = new XMLHttpRequest(); - meminitXHR.open('GET', memoryInitializer, true); - meminitXHR.responseType = 'arraybuffer'; - meminitXHR.send(null); - })(); + document.body.appendChild(script); } -document.body.appendChild(script); + +// end of dragonruby-html5-loader.js ... diff --git a/deploy_template/.dragonruby/stubs/html5/stub/index.html b/deploy_template/.dragonruby/stubs/html5/stub/index.html index b2bcf9f..b9d48b7 100644 --- a/deploy_template/.dragonruby/stubs/html5/stub/index.html +++ b/deploy_template/.dragonruby/stubs/html5/stub/index.html @@ -77,10 +77,8 @@
- - +
-
diff --git a/deploy_template/CHANGELOG.txt b/deploy_template/CHANGELOG.txt index cf22fc9..048bb49 100644 --- a/deploy_template/CHANGELOG.txt +++ b/deploy_template/CHANGELOG.txt @@ -1,947 +1,1362 @@ -= 1.14 = - - * [Support] Better HTML5 template. Additional JS events added to - handle loss of keyboard input within an iframe. - * [Bugfix] `args.outputs.screenshots` regression fixed. - * [Docs] Added documentation for a few more Numeric methods. - * [Samples] Brand new advanced sample app: 99_sample_sprite_animation_creator. - The sample app uses `args.outputs.screenshots` and `render_targets` heavily along with - in memory queues as a means to consolidate events coming from - different parts of the app. - - -= 1.13 = - - * [API] Sprite angle now accepts fractional degrees. - * [Samples] Better font added to LOWREZJAM 2020 template. - * [API] Added `args.outputs[RENDER_TARGET_NAME]` as an alias to - `args.render_target(RENDER_TARGET_NAME)`. Either of the following will work: - - ```ruby - def tick args - if args.state.tick_count == 1 - args.render_target(:camera).width = 100 - args.render_target(:camera).height = 100 - args.render_target(:camera).solids << [0, 0, 50, 50, 255, 0, 0] - end - - if args.state.tick_count > 0 - args.outputs.sprites << { x: 0, - y: 0, - w: 500, - h: 500, - source_x: 0, - source_y: 0, - source_w: 50, - source_h: 50, - path: :camera } - end - end - - $gtk.reset - ``` - - Is the same as: - - ```ruby - def tick args - if args.state.tick_count == 1 - args.outputs[:camera].width = 100 - args.outputs[:camera].height = 100 - args.outputs[:camera].solids << [0, 0, 50, 50, 255, 0, 0] - end - - if args.state.tick_count > 0 - args.outputs.sprites << { x: 0, - y: 0, - w: 500, - h: 500, - source_x: 0, - source_y: 0, - source_w: 50, - source_h: 50, - path: :camera } - end - end - - $gtk.reset - ``` - -= 1.12 = - - * [Samples] LOWREZ Jam sample app reworked in preparation for LOWREZ - Jam 2020 (starts on August 1st so hurry and join). - * [Docs] Docs added for GTK::Mouse, you can access them via the - Console by typing `GTK::Mouse.docs` or `$gtk.args.inputs.mouse.docs`. - * [MacOS] Updated minimum OS support to include MacOS 10.9+. - -= 1.11 = - - * [Bugfix] Fixed error in docs_search "TERM". - -= 1.10 = - - * [Support] Documentation infrastructure added (take a look at docs/docs.html). Bring up the DragonRuby Console and: - - To search docs you can type `docs_search "SEARCH TERM"` - - If you want to get fancy you can provide a `lambda` to filter documentation: - - docs_search { |entry| (entry.include? "Array") && (!entry.include? "Enumerable") } - - * [Bugfix] Fixed sprite rendering issues with source_(x|y|w|h) properties on sprites. - * [Support] Removed double buffering of game if framerate drops below 60 fps. - * [Support] Console now supports mouse wheel scrolling. - * [Support] One time notifications have less noise/easier to read. - * [Bugfix] Rogue ~app/main.rb~ directory will no longer be created if you run a sample app. - -= 1.9 = - - * [Bugfix] HTTP on windows should now work, for real this time. - * [Bugfix] Non-720p render targets now use correct coordinate system. - -= 1.8 = - - * [Experimental] Added the ability to control the logical game size. You can use cli - arguments to set it. Example ultra-wide support would be: - `./dragonruby --window_width 3840 --window_height 1080` - * [Bugfix] HTTP on windows should now work. - * [Bugfix] `even?` and `odd?` return the correct result for Fixnum. - * [Bugfix] args.intputs.mouse_wheel now reports the delta change in x and y correctly. - * [Bugfix] Improved analog joystick accuracy when converting to percentages. - * [Support] Incorporated pull request from https://github.com/kfischer-okarin that adds - autocompletion to the Console. This is the PR: - - https://github.com/DragonRuby/dragonruby-game-toolkit-contrib/commit/da0fdcfbd2bd9739fe056eb646920df79a32954c - - https://github.com/DragonRuby/dragonruby-game-toolkit-contrib/commit/99305ca79118fa0704c8681f4019738b8c7a500d - -= 1.7 = - - * [BREAKING] args.inputs.mouse.wheel.point is gone. Use args.inputs.mouse.x - and .y if you need cursor position. - * [BREAKING] args.inputs.mouse.wheel.x and .y now represent the amount the - mousewheel/trackpad has moved since the last tick and not the mouse cursor - position. Use args.inputs.mouse.x and .y if you need cursor position. - -= 1.6 = - - * [API] Sprite now supports source_(x|y|w|h). These properties are consistent with the origin - being in the bottom left. The existing properties tile_(x|y|w|h) assumes that origin 0, 0 is in the top left. - The code below will render the same sprite (in their respective coordinate systems): - - # using tile_(x|y|w|h) properties - args.outputs.sprites << { x: 0, - y: 0, - w: 1280, - h: 100, - path: :block, - tile_x: 0, - tile_y: 720 - 100, - tile_w: 1280, - tile_h: 100 } - - is equivalent to: - - # using source_(x|y|w|h) properties - args.outputs.sprites << { x: 0, - y: 0, - w: 1280, - h: 100, - path: :block, - source_x: 0, - source_y: 0, - source_w: 1280, - source_h: 100 } - - Note: if you provide both tile_(x|y|w|h) and source_(x|y|w|h). The values of tile_ will "win" so as not to - break existing code out there. - * [Bugfix] Updated require to remove duplicate requires of the same file (or files that have recently been required). - * [Bugfix] Strict entities of different types/names serialize and deserialize correctly. - * [Samples] Updated render targets sample app to show two render targets with transparencies. - * [API] No really, render targets now have a transparent background and respect opacity. - -= 1.5 = - - * [API] Added $gtk.show_cursor and $gtk.hide_cursor to show and hide the mouse cursor. The - function only needs to be called once. EG: args.gtk.hide_cursor if args.state.tick_count == 0. - * [Samples] Jam Craft 2020 sample app updated to have more comments and demonstrate a custom - mouse cursor. - -= 1.4 = - - * [Bugfix] Adding $gtk.reset at the bottom of main.rb will no longer cause an infinite loop. - * [Samples] Sample app added for Jam Craft 2020. - -= 1.3 = - - * [Bugfix] Adding $gtk.reset at the bottom of main.rb will no longer cause an infinite loop. - * [Samples] Better instructions added to various sample apps. - -= 1.2 = - - * [Bugfix] Top-level require statements within main.rb will load before - invoking the rest of the code in main.rb. - * [Samples] Better keyboard input sample app. - * [Samples] New sample app that shows how to use Numeric#ease_spline. - * [Bugfix] Fixed "FFI::Draw cannot be serialized" error message. - -= 1.1 = - - * [Bugfix] Fixed exception associated with providing serialization related help. - * [Bugfix] Fixed comments on how to run tests from CLI. - * [Support] More helpful global variables added. Here's a list: - - $gtk - - $console - - $args - - $state - - $tests - - $record - - $replay - * [API] inputs.keyboard.key_(down|held|up).any? and inputs.keyboard.key_(down|held|up).all? - added. - * [Support] Recording gameplay and replaying streamlined a bit more. GIVE THE - REPLAY FEATURE A SHOT! IT'S AWESOME!! Bring up the console and run: $record.start SEED_NUMBER. - * [Support] Bringing up the console will stop a replay if one is running. - -= 1.0 = - - * [News] DragonRuby Game Toolkit turns 1.0. Happy birthday! - * [Bugfix] args.state.new_entity_strict serializes and deserializes correctly now. - * [BREAKING] Entity#hash has been renamed to Entity#as_hash so as not to redefine - Object#hash. This is a "private" method so you probably don't have to worry about - anything breaking on your end. - * [BREAKING] gtk.save_state and gtk.load_state have been replaced with gtk.serialize_state - and gtk.deserialize_state (helpful error messages have been added). - * [Support] Console can now render sprites (this is still in its early stages). Try - $gtk.console.addsprite(w: 50, h: 50, path: "some_path.png"). - * [API] Render targets now have a transparent background and respect opacity. - * [API] Render targets can be cached/programatically created once and reused. - * [Samples] A new render target sample app has been created to show how to cache them. - * [Samples] Easing sample app reworked/simplified. - * [Support] GTK will keep a backup of your source file changes under the tmp directory. - One day this feature will save your ass. - -= 20200301 = - - * [Samples] Added sample app that shows how you can draw a cubic bezier curves. - * [Support] Keyup event prints key and raw_key to the console. - * [Support] Circumflex now opens the console. - -= 20200227 = - - * [Bugfix] Game will now auto restart in the event of a syntax error. - * [Samples] Sample app added to show how to use a sprite sheet for sprite animations: - 09_sprite_animation_using_tile_sheet. - * [Samples] Sample app added to show how to use a tile sheet for a roguelike: - 20_roguelike_starting_point_two. - * [Samples] Example code added to show how sort an array with a custom sort block: - 00_intermediate_ruby_primer/07_powerful_arrays.txt - * [OSS] The following files have been open sourced at https://github.com/DragonRuby/dragonruby-game-toolkit-contrib: - - modified: dragon/args.rb - - new file: dragon/assert.rb - - new file: dragon/attr_gtk.rb - - modified: dragon/console.rb - - new file: dragon/docs.rb - - new file: dragon/geometry.rb - - new file: dragon/help.rb - - modified: dragon/index.rb - - modified: dragon/inputs.rb - - new file: dragon/log.rb - - new file: dragon/numeric.rb - - new file: dragon/string.rb - - new file: dragon/tests.rb - - new file: dragon/trace.rb - * [Support] Added isometric placeholder sprites. - * [Support] Added $gtk.reset_sprite 'path' to refresh a sprite from - the file system (while the game is running). Future releases will - automatically auto load sprites but you can use this to reload them - on demand. - -= 20200225 = - - * [Bugfix] Fixed macOS compatibility back to Mac OS X 10.9 or so. - -= 20200224 = - - * [Bugfix] Some of the deprecation notices where throwing an exception. This has been fixed. - * [API] $gtk.system(cmd) has been added. You'll find this helpful for running cli programs from - Heads Up Display. It's probably not a good idea to use this in a production game (since you'll - be responsible for making sure it works on all platforms). - -= 20200218 = - - * [API] Enhanced screenshotting api that can be used for image manipulation. - Take a look at the painting sample app. - Example usage: `args.outputs.screenshots << [0, 0, 100, 100, 'bottom-left-corner.png']`. - * [BREAKING] Outputs#static_background_color has been renamed to Outputs#background_color. - * [API] Outputs#debug and Outputs#static_debug layer has been added. You can use this layer - to draw all your guide lines and helper primitives. When the game is published, this layer - will not render. - -= 20200217 = - - * [Bugfix] `dragonruby-publish` would only build html5. It now builds - all of the platforms again. Ryan has given Amir a warning and has told him - to be more careful releasing. Amir cackled in defiance. - -= 20200213 = - - * [API] Added Float#pos? and Float#neg?. - * [Samples] Sample added to show how to use directional_vector and sprite sheets. - * [Samples] Updated 01_api_01_labels sample app to show how to render a label - as an array or hash. - * [Bugfix] Fixed incorrectly named value for labels in 11_hash_primitives sample app. - -= 20200211 = - - * [API] Added `args.inputs.directional_vector` and - `args.inputs.(keyboard|controller_one|controller_two).directional_vector. - The sample app to demonstrate the use of this feature is pending. - * [API] Added Numeric#pos? and Numeric#neg?. - * [Bugfix] Fixed looping issues with ogg files and popping issues with - playing sounds in general. - * [Bugfix] `args.gtk.console.toast :message, "some message"` would fail because - of an invalid method name. - * [News] Amir (the CEO of DragonRuby LLP) wrote a 2019 year end review. You can - read it here: http://www.rubymotion.com/news/2020/01/02/year-end-review.html. - * [News] Expect the frequency of updates of GTK to increase. Ryan let Amir have - the deployment passwords, so the rate limiter is now gone :3 - -= 20200202 = - - * [API] Hash now supports :scale_rect. - * [Samples] Added sample app that shows how to create a hexagon based grid. - * [Support] Initial work on CHEATSHEET.txt. - * [API] Added args.inputs.keyboard.ctrl_* which will return true if Ctrl is - combined with another key. - * [API] Added args.inputs.click (which only returns the point or nil). - * [API] Added Numeric#even? and Numeric#odd?. - * [API] Added Geometry#point_inside_circle?(point, circle_point, radius). - -= 2020130 = - - * [Performance] Rendering api optimizations. Initial tests show that - DragonRuby Game Toolkit can now render more sprites (and calculate - more collisions) than Unity 2D. Checkmate. - * [Support] Fixed documentation for labels (the hash properties are - called size_enum, and alignment_enum). The documentation can be - found under mygame/documentation. - * [Support] Improved help text for exceptions related to ambiguous use - of primitives. - * [Bugfix] Requiring multiple ruby files will no long "blip" an - exception on startup. - -= 20191201 = - - * [Samples] Added sample game called The Little Probe that demonstrates - line collision. - * [Samples] Experiments with squares and cubes in 3D. - * [Support] HTML5 games now package a favicon. - * [Samples] [Support] Quite a few of the sample apps have been updated to - include an api listing at the top (expansion of documentation). - * [API] Initial work for http has been created. Take a look at the - http sample app to see how to use it. Take a look at - `samples/99_zz_gtk_unit_tests` for a test suite that asserts async - http. - * [Support] [Samples] Added a sample app that shows how create - collision detection associated with constraint points against - a ramp. This sample app also demonstrates the use of `gtk.slowmo!` - which you can use the slow down the tick execution of your game - to see things frame by frame (still experimental). - * [Support] Added sprites to default template folder. The sprites - are `sprites/square-COLOR.png` and `sprites/circle-COLOR.png` where - the colors are of the rainbow ROY G. BIV (eg `sprites/square-red.png`). - * [Sample] Added a sample app that shows how to use the - `static_sprites` rendering api which is the fastest way to render - a sprite (but also hangs on the instances by reference as opposed - to treating the collection as a queue... a trade off between - immutablility and speed). - * [API] Added the `attr_sprite` class macro which can be mixed into - a class so that it quacks like a sprite. The Sprite Limits sample - app has been updated to use this macro. - * [Support] In the event of an exception, the class hierarchy for - the object that threw the exception is provided. - * [Support] In the event of a :method_missing exception, the - instance's API is searched for methods that look like the one you - were trying to call. Those recommendations are printed to the - console. - * [Samples] [Support] Significant enhancements have been made to the - test harness. Take a look at `samples/99_zz_gtk_unit_tests` to see - some of the test suites that are being fleshed out. These test - suites are used as regression during builds. More will come. - * [Samples] Unit tests added for geometry apis. - * [Samples] Unit tests added for parsing json and xml. - * [Bugfix] HTML5 builds no longer fail at startup with an audio - initialization error message. - * [Bugfix] The $gtk.write_file API change was a mistake. The actual - bug it was meant to resolve has been fixed. The responsible - parties have been brutally disciplined. - * [BREAKING] `gtk_args` class macro has been renamed to - `attr_gtk`. This is a little easier to remember because it follows - the same pattern as `attr_accessor`. - * [BREAKING] `PRIMITIVE.w(idth)_half` and `PRIMITIVE.h(eight)_half` - have been deprecated. Use `PRIMITIVE.w.half` (Numeric#half). - * [BREAKING] `PRIMITIVE.angle_given_point` has been deprecated. Use - `PRIMITIVE.angle_from`. - * [API] `PRIMITIVE.angle_to` has been added. Take a look at - `samples/99_zz_gtk_unit_tests` for usages. - * [BREAKING] `intersects_rect?` with an `s` has been deprecated. Use - `intersect_rect?` instead. - NOTE: Ruby's naming convention is to generally *not* include the - \"s\" for interrogative method names (methods that end with a ? - [question mark]). It doesn't sound grammatically correct, but that - has been the rule for a long time (and why intersects_rect? has - been deprecated). - * [Samples] Added a white label version of Clepto Frog, a Ludam Dare - game built by Amir, Karen, and Rye. You can see the final version - (with all assets) here: https://amirrajan.itch.io/clepto-frog. The - code is horrible. Who wrote this crap? - * [Bugfix] Fixed looping issues with `.ogg`. The follow statement - will now correctly work: - ``` - def tick args - if args.state.tick_count == 0 - args.outputs.sounds << 'sounds/sample.ogg' - end +* 2.24 +** [Bugfix] Labels within render targets scale correctly when windows are resized. +** [Bugfix] [Pro] Better error handling in the iOS wizard if app metadata fails to retrieve. +** [API] Added ~Numeric.mid? n1, n2~ which is similar to ~Numeric.between?~ except the numbers supplied to ~mid~ do not have to be in strictly increasing order. +** [OSS] Contributions from [[github.com/dragonruby/dragonruby-game-toolkit-contrib]] have been synchronized. +* 2.23 +** [Bugfix] ~Hash#include?~ had invalid logic which has now been removed and should operate to core spec. +** [Bugfix] ~Hash#anchor_rect~ respects the anchor parameter passed to it as opposed to anchoring to 0.5, 0.5 only. +** [Bugfix] ~args.gtk.reset~ now clears ~args.audio~. +** [Bugfix] ~Numeric#(+|-|/|*) returns ~self~ instead of ~nil~ if arithmetic operation is performed against it. +** [Bugfix] ~Numeric#(+|-|/|*) can now be used with ~Array#inject~. +NOTE: A special thank you to leviondiscord@discord for persistence in talking about this issue and +taking the time to try to understand nil punning and the underlying reasoning for the original behavior (which proved +to be a unnecessarily inconsistency in the case of arithmetic). +** [Bugfix] ~args.layout.debug_primitives~ are now cached. The grid overlay will render more quickly. +** [Bugfix] Inner exceptions from ~GTK::Geometry~ class methods are now retained and reported within the error message. +** [Bugfix] ~args.grid~ responds to ~x~, ~y~ which allows it to be used with geometric functions. +You can use ~args.grid~ or continue to use ~args.grid.rect~. +** [Bugfix] Font glyph cache is invalided if the Window size changes. +** [API] ~args.audio~ now supports the ability to seek the audio to a specific location. +Set ~args.audio[:some_audio][:playtime]~ to seconds (float) representing the point in time you +want the audio to seek to. +Take a look at the audio_mixer sample app for full api usage. +** [Samples] Audio Mixer sample app got a solid facelift. =./samples/07_advanced_audio/01_audio_mixer/app/main.rb= +** [Samples] Performance based sample apps are better labeled and contain documentation/fixes for new override methods. +** [Support] The sprites under ~mygame/sprites/(square|circle|isometric|hexagon)~ have been redone (a lot nicer looking). +** [Support] ~args.outputs.lines~ can now accept rectangular primitives ~(x|y|w|h)~. +If the primitive does not respond to ~(x2|y2)~, then ~(w|h)~ will be used to derive ~(x2|y2)~. This +change makes the definition of horizontal and vertical lines more intuitive. + +Instead of defining a horizontal line like this: +#+begin_src ruby + args.outputs.lines << { x: 0, y: 360, x2: 1280, y2: 360 } + args.outputs.lines << { x: 640, y: 0, x2: 640, y2: 720 } +#+end_src + +You can instead do this: +#+begin_src ruby + args.outputs.lines << { x: 0, y: 360, w: 1280 } + args.outputs.lines << { x: 640, y: 0, h: 720 } +#+end_src +** [Support] Console font decreased slightly to give more real estate. +** [Support] Console will apply color/formatting to comment blocks (making code blocks easier to read). +** [Support] Slight performance improvements to ~OpenEntity~. +** [Support] ~Hash#method_missing~ expanded to allow access to methods that collide with core apis. +The ~Hash#method_missing~ capability allows you to access ~some_hash[:some_key]~, by using ~some_hash.some_key~ instead. +For keys that conflict with core ~Hash~ api's, you can now suffix the method with an ~underscore~. Example: You +can access ~some_hash[:length]~ using ~some_hash.length_~. + +Using the ~dot~ operator over ~Hash#[]~ isn't required, but it is encouraged (sample apps will opt to use the ~dot~ +operator for accessing keys in a ~Hash~, using the ~underscore~ suffix as needed). +** [Deprecation] [Soft] ~Hash#(solid|sprite|label|line|border)~ methods log a deprecation warning and suggest new methods usage. +*** New methods +NOTE: Given how long these methods have been around, it's unlikely they will be removed for *very* long time. +Here are the new method options: +- ~Hash#(solid!|to_solid)~ +- ~Hash#(sprite!|to_sprite)~ +- ~Hash#(label!|to_label)~ +- ~Hash#(line!|to_line)~ +- ~Hash#(border!|to_border)~ +*** Sample Usage +These new methods accept a ~Hash~ as an additional parameter that will perform a ~Hash#merge!~ +with the object it's called on. They also better communicate that these primitive +methods cause side effects. The existing methods did not communicate this which is why they are +being deprecated. + +This is how ~Hash#border~ is currently being used: +#+begin_src ruby + def tick args + color = { r: 255, g: 0, b: 0 } + cell = { + x: 0, + y: 0, + w: 100, + h: 100 + } + args.outputs.primitives << cell.merge!(color).border + end +#+end_src + +You'll want to use ~Hash#border!~ instead: +#+begin_src ruby + def tick args + color = { r: 255, g: 0, b: 0 } + cell = { + x: 0, + y: 0, + w: 100, + h: 100 + } + args.outputs.primitives << cell.border!(color) + # args.outputs.primitives << cell.merge(color).border! # this is also valid + end +#+end_src + +Use ~Hash#to_border~ if you *don't* want to mutate the original ~Hash~: +#+begin_src ruby + def tick args + color = { r: 255, g: 0, b: 0 } + cell = { + x: 0, + y: 0, + w: 100, + h: 100 + } + args.outputs.primitives << { + x: 0, + y: 0, + w: 100, + h: 100 + }.to_border(color) + end +#+end_src +* 2.22 +** [Pro] [iOS] [Bugfix] Added missing icon files for ios and missing ios_metadata.txt template file. +** [API] ~GTK::Runtime#http_post_body url:string, body:string, headers:array[string]~ +~args.gtk.http_post_body~ can be used to post raw data (with the responsibility of encoding left to the dev). +Example: +#+begin_src ruby + def tick args + if args.inputs.keyboard.key_down.enter + json = "{ \"userId\": \"1000\", \"name\": \"Artorias of the Abyss\" }" + args.gtk.http_post_body "http://tempuri.com/updated-profile", + json, + ["Content-Type: application/json" + "Content-Length: #{json.length}"] end - ``` - * [API] Added `args.gtk.stop_music` to stop all looping music. - * [API] Added `args.geometry` which contains stateless functions - that exist on primitives. For a full listing of methods open up - the console and type `args.geometry.help`. A lot of these methods - are exercised in the `samples/99_zz_gtk_unit_tests` test suite. - * [Support] The --no-tick switch for ./dragonruby will now hide the - game window (it's a good way to run "headless" unit - tests/regressions suites). Usage: `./dragonruby mygame --eval - some_ruby_file.rb --no-tick`. - * [BREAKING] gtk.on_ticks has been deprecated, use the better named - gtk.scheduled_callbacks instead. - * [BREAKING] gtk.on_tick TICKCOUNT { BLOCK } has been deprecated, use the better named - gtk.schedule_callback TICKCOUNT { BLOCK } instead. - -= release-20190930 = - - * [Samples] Added sample app that shows how trace can be used within a class. - * [Support] Added $gtk.log_level. Valid values are :on, - :off. When the value is set to :on, GTK log messages will show up - in the DragonRuby Console *AND* be written to logs/log.txt. When the - value is set to :off, GTK log messages will *NOT* show up in the - console, but will *STILL* be written to logs/log.txt - * [API] Added args.inputs.mouse.(click|up|down).(x|y) so you don't have to do - args.inputs.mouse.click.point. - * [Support] You can change your window title at runtime with - $gtk.set_window_title('new title'). YOU MUST SET UP YOUR GAME'S METADATA - CORRECTLY EVEN IF YOU USE THIS FUNCTION. - * [Support] The macOS build is now compiled with Link-Time - Optimization, as an experiment, which makes your games a little faster and - your downloads a little smaller. - * [Support] We've split the open source licenses out of README.txt - to their own file, which is packaged with your games, to be a good citizen - of the world. If you add other open source stuff, just copy - open-source-licenses.txt into your game's folder and add your own stuff - to it; that will package with your game instead of the original text file. - * [Support] Added JSON parsing. Try $gtk.parse_json(myJsonString) or - $gtk.parse_json_file(filename) - * [Support] Added XML parsing. Try $gtk.parse_xml(myXmlString) or - $gtk.parse_xml_file(filename) - * [BREAKING] There is a new replay data format that is less crappy. But it breaks - existing replay data. You'll need to re-record your replays (sorry T_T). - To record a replay of gameplay, you can run ./dragonruby mygame --record. - When you close the game, a file called last_replay.txt will be created. - You can re-run a replay as a means to perform visual regression using - ./dragonruby mygame --replay last_replay.txt - * [Support] Added a --production command line option for running an - unpublished game as if it were published. - * [Support] We now offer bleeding edge builds on the "experimental" - channel on itch.io. If you want those, go to where you downloaded this - package, and look for the "experimental" download instead. These are - expected to be less stable and pushed as we need to test things out or - hotfix a bug that isn't ready to roll into an official release. If this is - your jam, though, go for it. - * [OSS] Thank you to StardragonEX, phaedryx, and pusewicz for contributing - to GTK documentation located at github.com/DragonRuby/dragonruby-game-toolkit-contrib. - * [Support] Enabling trace! on an object now outputs - all trace data to a file as opposed to just standard out. This will - make trace debugging significantly more useful to developers that - don't have a high-buffer-history terminal running. - * [Samples] Added platformer that deals with moving objects, jumping, and dealing with inertia. - * [Samples] Added sample showing how to render an isometric grid - (like Into The Breach). - * [Samples] Sample added showing how to use trace! debugging when you - are having trouble with why an exception is being thrown. - * [Samples] Many of the sample apps have had their methods reorganized - for consistency in reading. They also have comments added to them. - * [Experimental] If the game has been running for over a minute, and cannot - keep a stable 60 fps, the game's rendering will be skipped every other - frame to save process cycles (tick method will still execute as fast - as possible, but results from them method will only be rendered at 30 fps). - -= release-20190912 = - - * [Bugfix] dragonruby-publish now correctly builds HTML5 packages when - there's a "'" character in the game's name (etc). - * [Bugfix] dragonruby-httpd now serves paths with spaces in them correctly. - * [Bugfix] dragonruby-publish now ignores __MACOSX directories (trash that - macOS tends to generate when you double-click a .zip file to unpack it - from the Finder). - -= release-20190909 = - - * [Bugfix] HTML5 builds' "click-to-play" UI now scales the icon. - * [Bugfix] args.gtk.writefile(path, content [, write_to_game_dir = true]) - now writes file to the game folder as opposed to the root directory. - If you need to write to the root directory provide false as the third - parameter to write file. - * [Experimental] There is now a special file in mygame called mailbox.rb. - When `args.gtk.suppress_mailbox = false`, mailbox.rb will be checked for - changes at a high frequency (10 times a second). Because this an - experimental feature, the default value of `args.gtk.suppress_mailbox` is - TRUE. You can use this file as a means to communicate with GTK between process. - There is a sample app that shows how to use the mailbox.rb file. - * [Support] You can now have multiple mouse buttons! - args.inputs.mouse.click and .up will still be set if there was a mouse - button change for the current tick, but you should look at - args.inputs.mouse.button_left (or _middle or _right or _x1 or _x2) as a - bool to see if it's currently pressed down. More than one might be pressed, - and more than one button might have changed in the one .click you'll get. - The same is true for .up - * [Support] You can now see the mouse wheel (or your trackpad - pretending to be a mouse wheel when you stroke it appropriately)! - All wheel input since the last tick is added together. You can check if - args.inputs.mouse.wheel isn't nil to decide if the wheel has moved for - this tick. - ```ruby - m = args.inputs.mouse - if m.wheel - puts("The wheel moved #{m.wheel.x} left/right and #{m.wheel.y} up/down") + end +#+end_src +** [Support] ~GTK::Runtime#notify_extended!~ now accepts ~overwrite~ as an option. +Example: +#+begin_src ruby + def tick args + if args.inputs.keyboard.key_down.enter + args.gtk.notify_extended! message: "message to show", # message to show + durations: 300, # how many ticks to show the message + env: :prod, # by default, notifications only happened in :dev + overwrite: true # if this value is true, the notification will + # shown even if another one is currently in progress end - ``` - -= release-20190829 = - - * [Community] Discord link: http://discord.dragonruby.org and Youtube link: http://youtube.dragonruby.org. - * [Support] Plugging in an unrecognized controller will now make DragonRuby pop up a - UI to let the user configure it. During this time your game will receive no - tick calls and so will be effectively paused. It resumes once the user has configured the - controller or abandoned it. This is a work in progress, but we already - think it's pretty cool. - * [Experimental] [Advanced] You can start up ./dragonruby by passing in --eval file_path. The file passed in will - execute on startup. Additionally you can pass in --eval file_path --no-tick which will - exit ./dragonruby immediately after loading all source, and running the file passed to eval. - * [Experimental] [Advanced] `on_tick` callback has been added to $gtk. This can be used to run some form of automation. - For example, you can run the Dueling Starships sample app with the following inside of repl.rb. - ```ruby - # Reset the game and sent the RNG seed to 100 - $gtk.reset 100 - - # Remove any existing callbacks. - $gtk.on_ticks.clear - - # One second into the game, hold down the right directional - # on controller one. - $gtk.on_tick 60 do - $gtk.args.inputs.controller_one.key_held.right = true + end +#+end_src +** [Support] Better method missing exception formatting if the object's inspect is very long. + +* 2.21 +** [Samples] Added farming simulator starting point: =./samples/99_genre_crafting/farming_game_starting_point/= +** [Pro] [iOS] Updated iOS Wizard to consult metadata/ios_metadata.txt for iOS Specific configurations. +** [Support] Added a more streamlined means to get autocomplete suggestions: http://localhost:9001/dragon/autocomplete/ +** [Support] DragonRuby Console prints backtrace for exceptions if helpful information is contained in it. + +* 2.20 +** [Bugfix] ~GTK::Runtime#benchmark~ reports completion time if only a single lambda is provided. +** [OSS] ~GTK::Runtime#benchmark~ has been open sourced. +** [API] Added ~args.layout.rect_group~ which allows you to layout a group of primitives +Entries of the group can be offset by a delta row/col value. This is useful if you want to +position primitives as if they were in a table. Here's an example of presenting a collection +of labels each offset by a delta row ~drow~: +#+begin_src ruby + def tick args + args.state.player.x ||= 640 + args.state.player.y ||= 360 + args.state.player.x += 10 + args.state.player.y -= 10 + + debug_labels = args.layout + .rect_group row: 0, # starting row + drow: 0.5, # row amount to offset set each item by (delta row) + col: 0, # starting col + group: [ # items representing the group + { text: "player.x: #{args.state.player.x}" }, + { text: "player.y: #{args.state.player.y}" }, + ] + args.outputs.labels << debug_labels + end +#+end_src +** [Samples] New sample app: =./samples/99_genre_fighting/01_special_move_inputs/app/main.rb= +Sample app added that shows how to capture "special moves" like in a fighting game. +** [Bugfix] Ensure custom console buttons show up in both dev and production builds. + +* 2.19 +** [Bugfix] Exception no longer thrown when requiring a brand new file. +** [Support] [Important] Server Side Request Forgery vulnerability patch for DragonRuby Game Toolkit Web Console (http://localhost:9001) +All http endpoints that submit data to DragonRuby now only accept ~application/json~ payloads (~x-www-form-urlencoded~ is no longer allowed). +This change patches a SSRF vulnerability that would allow a malicious website to process request against +~http://localhost:9001/dragon/eval/~ and execute arbitrary code on your machine. + +Special thanks to @mooff@discord for bringing up this concern and @kfischer_okarin@discord for verifying it. + +The new api interaction is as follows: +*** From curl: +#+begin_src sh + curl -H "Content-Type: application/json" --data '{ "code": "$result = $args.state" }' -X POST http://localhost:9001/dragon/eval/ +#+end_src +*** From DragonRuby Game Toolkit +#+begin_src ruby + def tick args + if args.inputs.keyboard.key_down.r + json = <<-S +{ + "code": " +log 'received request from $gtk.http_post' +$gtk.console.show +$result = 1 + 2 +" +} +S + args.state + .http_eval_request = args.gtk + .http_post "http://localhost:9001/dragon/eval/", + { "body" => json }, + [ "Content-Type: application/json" ] end - - # On frame 80, release the right directional, and - # hold down R1. - $gtk.on_tick 80 do - $gtk.args.inputs.controller_one.key_held.right = false - $gtk.args.inputs.controller_one.key_up.right = true - $gtk.args.inputs.controller_one.key_held.r1 = true + if (args.state.tick_count.zmod? 60) && args.state.http_eval_request && args.state.http_eval_request.complete + puts args.state.http_eval_request.response_data + end + end +#+end_src +* 2.18 +** [API] Added ~args.inputs.controller_(one|two).(key_down|key_held|key_up).(back|select)~. +** [API] Added ~args.inputs.controller_(one|two).(key_down|key_held|key_up).(home|guide)~. +** [API] Primitives now support ~blendmode_enum~ which can be used to inform how transparency should be blended. +You may have encountered render artifacts where opacity of a sprite would take on the background color of a render target, +or text of a label had quality degradation when included in a render target. +This can now be resolved by setting the ~blendmode_enum~ to ~0~. Example: +#+begin_src ruby + def tick args + # render target has transparent background + args.render_target(:camera).background_color = [0, 0, 0, 0] + + # set blendmode_enum to 0 for label to retain quality + args.render_target(:camera).labels << { x: 700, y: 300, text: 'Hello World', blendmode_enum: 0 } + + # set blendmode_enum to 0 for sprite so that background_color isn't blended in + args.render_target(:camera).sprites << { x: 700, + y: 300, + w: 300, + h: 300, + path: 'sprites/some-sprite-with-feathering.png', + blendmode_enum: 0 } + + args.outputs.sprites << { x: 0, y: 0, w: 1280, h: 720, path: :camera } + end +#+end_src +The following blend modes are supported: 0 (none), 1 (alpha), 2 (add), 3 (mod), 4 (multiply). +** [Samples] Sample app demonstrating ~blendmode_enum~ has been added: =./samples/07_advanced_rendering/10_blend_modes/=. +** [Bugfix] Emscripten/web builds will now allocate as much memory as needed to run the game. +The compilation of wasm games now set ~ALLOW_MEMORY_GROWTH~. If you had issues with large sound files +not loading within a web build, this change should resolve that issue. +** [Support] Added ~GTK::Runtime#benchmark~ which can be used to gauge performance. +Example usage: +#+begin_src ruby + def tick args + # press r to run benchmark + if args.inputs.keyboard.key_down.r + args.gtk.console.show + args.gtk.benchmark iterations: 1000, # number of iterations + # label for experiment + using_numeric_map: -> () { + # experiment body + v = 100.map do |i| + i * 100 + end + }, + # label for experiment + using_numeric_times: -> () { + # experiment body + v = [] + 100.times do |i| + v << i * 100 + end + } + end + end +#+end_src +** [Support] Better error message/exception for method missing on value types. +** [Support] ~args.layout.debug_primitives~ will draw the cells on the screen to help with placement. +~args.layout.rect(row:, col:, w:, h:)~ is a great way to layout controls. The ~debug_primitives~ function +will render an overlay to help you with placement. Example: +#+begin_src ruby + def tick args + args.outputs.debug << args.layout.debug_primitives + end +#+end_src +** [Bugfix] ~args.inputs.http_requests { |req| req.body }~ will now exclude the "Content-Disposition" envelope. +Performing an ~args.gtk.http_post url, form_fields~ with populated form_fields creates a Content-Disposition envelope +in the http request. The embedded web server's ~request.body~ now excludes that part of the payload to make parsing +the body easier. ~request.raw_body~ has been added to show the unaltered http payload if you need it. +** [Support] [Experimental] ~http://localhost:9001/dragon/eval/~ supports requests from ~args.gtk.http_post~. +Here is an example of how to request an eval of code over http via ~gtk.http_post~ +#+begin_src ruby + def tick args + if args.inputs.keyboard.key_down.r + code_to_eval = <<-S +log 'received request from $gtk.http_post' +$gtk.console.show +$result = 1 + 2 +S + args.state + .http_eval_request = args.gtk + .http_post "http://localhost:9001/dragon/eval/", + { "body" => code_to_eval } + end + if (args.state.tick_count.zmod? 60) && args.state.http_eval_request && args.state.http_eval_request.complete + puts args.state.http_eval_request.response_data + end + end +#+end_src +** [Support] Rendering should be 10% to 15% faster. +Enumeration of primitives uses a new module ~Object#fn#each_send~ which is faster than +using a while loop. Here is an example of how to use ~fn.each_send~: +#+begin_src ruby + def process_item i + + end + + def process_very_large_array + very_large_array = ... + + fn.each_send very_large_array, # array to process + self, # object containing method to invoke + :process_item # name of method to invoke for each item + end +#+end_src + +* 2.17 +** [Bugfix] Fixed another reload edgecase related to: Files loaded on startup will not be loaded again on frame 57 (hotloading is deferred until after the game has been fully initialized). + +* 2.16 +** [Bugfix] [Pro] Android 32-bit deployment should now work. +** [Support] [Pro] Android deployment are (for now) always production builds. Instructions for http server: +If you want to have access to your app over http, you will need to put the following line in ~app/main.rb~ +before deploying: + +#+begin_src ruby + def tick args + args.gtk.start_server! port: 9001, enable_in_prod: true + .... + end +#+end_src +** [API] ~Runtime#calcspritebox~ added. +Calling ~args.gtk.calcspritebox PATH~ will return the ~w~ and ~h~ of the sprite as an array/tuple. +** [Support] Better error messages in the event of a ~uninitialized constant~ Exception when invoking ~require~. +** [Support] Better coloring of codeblocks begin/end within the Console. +** [Bugfix] Added additional Raspberry Pi configurations (arm32). DRGTK running on Raspberry Pi's should work now. +** [Bugfix] Files loaded on startup will not be loaded again on frame 57 (hotloading is deferred until after the game has been fully initialized). +** [Bugfix] Allow startup even if audio isn't available. +** [API] [Bugfix] ~Geometry::inside_rect?~ will return ~nil~ instead of throwing an exception if either argument passed into it are ~nil~. + +* 2.15 +** [Bugfix] [Pro] ~dragonruby-publish~ no longer fails with ~ios-device~ error. +** [API] ~Numeric#clamp~ now accepts a single parameter (representing ~min~ value). +** [Support] Better Console visuals/information in the event of a ~method_missing~ exception. +** [Support] Better formatting of "Did you mean?" in the event of a ~method_missing~ exception. +** [Support] Added help text in Console stating that ~ctrl+g~ can be used to clear the prompt. +** [Bugfix] Console automatically closes in the event of a syntax error being fixed. + +* 2.14 +** [Samples] Added sample app that shows how to create a very simple camera =./samples/07_advanced_rendering/07_simple_camera/=. +** [Pro] [Support] Compiler optimizations for iOS builds. Your iOS apps should be quite a bit faster now. +** [API] Better error handling missing methods on ~args.inputs.keyboard.KEYBOARD_KEY~. +** [API] Added ~args.gtk.version_pro?~ which will return ~true~ for the Pro version of DragonRuby Game Toolkit. + +* 2.13 +** [Samples] Added sample app that you can use as a starting point for Classic Jam: Guantlet Edition =./samples/99_genre_dungeon_crawl/classics_jam/= +** [API] ~Geometry~ apis no longer rely on ~left~, ~right~, ~top~, and ~bottom~ allowing you to use anything that ~respond_to~ ~x~, ~y~, ~w~, ~h~. +** [API] Added ~args.inputs.directional_angle~ which will return nil, 0, 45, 90 ... 360 depending on if ~up~, ~down~, ~left~, ~right~ are pressed. +** [API] ~OpenEntity~ and ~StrictEntity~ include the ~Geometry~ module. +** [API] Added ~OpenEntity#merge~ which invokes ~(OpenEntity#as_hash).merge~. + +* 2.12 +** [Support] Better call stack for exceptions. +** [Support] Added ~args.fn.pretty_print OBJECT~ and ~args.fn.pretty_print_verbose OBJECT~. +These printing apis are still a work in progress/might not be perfect. +** [Bugfix] Fixed Raspberry Pi executable segfaulting (it was totally @icculus's fault). +** [Bugfix] Fixed ~GTK#http_(get|post) for Mojave, while at the same time not breaking Catalina/Big Sur (it was totally Apple's fault). +** [Bugfix] [Pro] Fixed unhandled exception caused by missing headers when responding to http requests. +** [API] Added ~Geometry#rotate_point(target_point, degrees_to_rotate, pivot_point = [0, 0])~. +** [API] Added ~FFI::Draw#draw_label_2~ which accepts ~vertical_alignment_enum~ as a new parameter. +~FFI::Draw#draw_label~ defaults ~vertical_alignment_enum~ to ~2~ for backwards compatibility. +** [API] ~Label~ primitive now supports ~vertical_alignment_enum~. +Example: + +#+begin_src ruby + def tick args + args.outputs.labels << { + # x position of the label's origin + x: 640, + + # y position of the label's origin + y: 360, + + # text of the label + text: "Sample Label", + + # red color of the label + r: 0, + + # green color of the label + g: 0, + + # blue color of the label + b: 0, + + # alpha of the label + a: 255, + + # default value of size_enum is 0 this virutal value of zero represents + # the recommended font size that would be legible on devices large and small + # this value can be negative to go smaller (but with the risk of being hard to read + # on mobile or handheld screens) + size_enum: 0 + + # this represents the horizontal alignment of the label, which is calculated using + # the far left value of the string (~x~) and its render width. + # 0 (default value) means ~left~ aligned, 1 means ~center~ aligned, 2 means ~right~ aligned + alignment_enum: 0, + + # this represents the vertical alignment of the label, which is calculated using + # the asension value of the string (~h~) and the bottom location of the string (~y~). + # 0 means ~bottom~ aligned, 1 means ~center~ aligned, 2 (default value) means ~top~ aligned + # IMPORTANT: To reiterate, the default value of this enum is 2 for backwards compatibility. + vertical_alignment_enum: 0, + + # the font for the label + font: "font.ttf" + } + end +#+end_src + +* 2.11 +** [Sample] Added a very simple sample app that shows how to move a sprite using the keyboard =samples/02_input_basics/01_moving_a_sprite=. +** [API] ~attr_gtk~ adds ~new_entity~ to the class that invokes this class macro. +** [API] Added ~args.temp_state~. All values are set to ~nil~ on this object after ~tick~ is processed. +** [API] ~Hash#merge(!)~ accepts both ~Entities~ and ~Hashes~. +** [API] ~Hash~ responds to method missing and will forward to ~[key](=)~. +** [API] ~Layout#rect~ accepts ~d(x|y)_ratio~ which alters the final rectangle by the ratio specified. +** [API] ~Layout#rect~ accepts ~merge~ which will add the hash specified into the resulting rectangle. +** [API] Added ~Runtime#platform?(symbol)~ which consults ~Runtime#platform_mappings~ to make it easier to determine the platform your game is running on. +** [Support] ~$wizards.itch.start~ performs a the publishing process for you, but no longer attempts to deploy to Itch.io using Butler (Butler is too unstable). +** [Support] [Pro] ~$wizards.ios.start~ now asks for App's version number. +** [Support] Performance improvements to ~Numeric#==~. + +* 2.10 +** [Sample] [Bugfix] Fixed naming of roguelike sample apps (they were wrong). +** [Pro] Ahead of time/bytecode compilation added. +In the manifest file, add ~compile_ruby=true~. ~./dragonruby-publish~ will do the work. +** [Pro] [Bugfix] Fixed issue where game would not boot if main.rb was compiled (AOT will totally work this time). +** [Pro] [Bugfix] ~dragonruby-publish~ will compile ruby files outside of =mygame/app= (such as mygame/lib). + +* 2.9 +** [Sample] [Bugfix] Fixed exception in breadth first search sample app =samples/13_path_finding_algorithms/01_breadth_first_search=. +** [Pro] [Bugfix] Fixed premature ~free~ in AOT which caused it to fail loading. + +* 2.8 +** [Pro] [Support] ~args.inputs.http_requests~ has been added so that you can prototype multiplayer games over http. +Here is an example usage: +#+begin_src ruby +def tick args + args.gtk.start_server! port: 9001, enabled_in_prod: true + args.inputs.http_request.each do |req| + puts req + req.respond 200, "hello from DragonRuby", { 'Content-Type' => 'text/plain } + end +end +#+end_src +** [Pro] [Sample] Added sample app that shows how to process http request =./samples/11_http/02_web_server=. +** [Pro] [iOS] Added the ability to create a distribution build of an iOS app. +To deploy to your device as a dev build, open up the Console and type ~$wizards.ios.start env: :dev~. +To create a package that can be uploaded to Apple, open up the Console and type ~$wizards.ios.start env: :prod~. +** [Pro] [Bugfix] [iOS] Remote hot loading of a game deployed to your iOS device is stable and will not perform unnecessary reloads. +** [Pro] Ahead of time/bytecode compilation added. +In the manifest file, add ~compile_ruby=true~. ~./dragonruby-publish~ will do the work. +** [Perf] Minor improvements made to arithmetic operations. +** [Samples] Created a much simpler sample app that shows how to play sounds. +** [OSS] Hot loading machinery has been open sourced. +** [Sample] Added sample app that shows a z-targeting game mechanic =./samples/07_advanced_rendering/08_z_targeting_camera=. +** [Support] DragonRuby GTK when in development mode spins up an http endpoint that exposes capabilities of the Console as a webpage. +The default port for the http endpoint is a port number 9001 (it's a port number over 9000). After +starting up DragonRuby, go to http://localhost:9001 to see the what options you have available (these options will expand over time). +** [Sample] Added a Tower Defense sample app =samples/13_path_finding_algorithms/09_tower_defense=. + +* 2.7 +** [Bugfix] Html5 exception when trying to find a missing metadata file no longer occurs. +** [API] ~attr_rect~, ~attr_sprite~ class macros updated so that they can be mixed into ~Entities~. +#+begin_src + def tick args + args.state.player ||= args.state.new_entity :player, x: 0, y: 0, w: 100, h: 100 do |e| + e.attr_rect end - ``` - There is a full blown automation script under samples/00_beginner_ruby_primer/automation.rb - ./samples/00_beginner_ruby_primer $ ../../dragonruby . --eval app/automation.rb - * [Support] Exceptions `game_state_*.txt files are now written to an exceptions directory - instead of cluttering up the root. - * [Support] Launching dragonruby with --fullscreen on the command line makes the game fullscreen. - * [Support] Launching dragonruby-publish from any directory with no command line arguments - and without a "mygame" folder in the current working directory will - cause it to look for "mygame" in the same directory as dragonruby-publish - itself. Which is to say: it'll work in the default configuration if you - double-click it from the macOS Finder. - * [Samples] New sample app called 02_collisions_02_moving_objects has been added. - * [Support] Previous console messages are subdued if unhandled exception is resolved. - This removes visual confusion if another exception is thrown (easier to determine what the current exception is). - * [Support] Added api documentation about truthy_keys for keyboards and controllers. - * [API] [Experimental] Hashes now quack like render primitives. For example some_hash[:x] is the same as - some_hash.x and can be interchangeable with some_array.x (this is a work in progress - so there may be some geometric/collision apis that aren't covered). - * [Support] Usability of Console and it's interaction with repl.rb is SIGNIFICANTLY better. - Take a look at the new repl.rb file under mygame/repl.rb to see an interactive - crash course of Ruby that shows how to use variables, functions, conditionals, - loops, and arrays. Special thanks to @raulrita (https://www.twitch.tv/raulrita) - for live streaming and bringing light to these enhancements. - * [Support] `puts` statements that begin with "====" are rendered as teal in the Console. This - provides a visual separation that will help with print line debugging. - * [OSS] The DragonRuby Game Toolkit Console has been open sourced under an MIT license. You can find it - here: https://github.com/DragonRuby/dragonruby-game-toolkit-contrib - -= release-20190823 = - - * [Support] The mygame directory now contains a documentation folder that provides high level - APIs for the engine (it's a work in progress, but a good starting point). - * [Samples] A sample app called "hash primitives" has been added that shows how you can use a Hash - to render a primitive. This will make specifying sprite's advanced properties much easier. - * [Samples] The sprite limits sample app shows how you can ducktype a class and render it as a sprite. - Doing this is a tiny bit more work, but there is a huge performance benefit. - * [Bugfix] Internal limits total textures/render targets/fonts is removed. - * [BREAKING] args.dragon has been deprecated, you must now use the new property args.gtk. - * [BREAKING] args.game has been deprecated, you must now use the new property args.state. - * [BREAKING] args.gtk.root has been removed and all attributes have been moved to args.gtk. - * [BREAKING] args.gtk(.root).mouse_focus has been removed, use args.inputs.mouse.has_focus. - * [BREAKING] args.gtk(.root).keyboard_focus has been removed, use args.inputs.keyboard.has_focus. - * [BREAKING] $dragon has been removed, you must now use $gtk. - * [BREAKING] $view has been removed and functionality has been moved to $gtk, use that variable instead. - -= release-20190816 = - - * [Bugfix] HTML5: Fixed crash on startup on Chrome if the game's icon isn't tiny. - * [Samples] Added sample app that shows how you can make a paint app (05_mouse_move_paint_app). - * [Samples] Added sample app that shows how you can make a tile editor (05_mouse_move_tile_editor). - * [Samples] Added LOWREZ Jam 2019 game that Amir built: Return of Serenity (99_sample_game_return_of_serenity). - * [Samples] Added Metroidvania sample app which is a great starting point for the "Metroidvania Month" Jam on Itch.io. - * [Support] :ordinal_indicator (º) character added to args.inputs.keyboard. It can be used to bring up the GTK console. - -= release-20190813 = - - * [Samples] Added sample app that shows off controller input. - * [API] `args.inputs.keyboard.key_down.delete is now available and works in the GTK console. - * [Bugfix] Requiring a ruby file that doesn't exist will return an error instead of crashing. - * [Support] Console coloring added for exceptions. - * [Support] When running trace!, if an exception occurs. The last method invoked will - be provided in the details. - -= release-20190806 = - - * [Bugfix] Having $gtk.reset at the bottom of your main.rb will not cause a recursive require - of all files. - * [Support] In the event of an exception, the source code will not be searched if the - search term is less than three characters. - * [Samples] A Roguelike starting point sample app has been added. - * [Support] If a primitive rendering fails, the primitive type will now be included - with the exception. - * [API] The property `args.outputs.static_background_color = [0, 0, 0]` is now exposed. This allows - you to control the color of the letterbox around your game. Some of the sample apps have been - updated to use this property (for example Dueling Starships). - -= release-20190803 = - - * [Bugfix] `gtk_attr` now included the `inputs` attr_accessor. - * [Website] The initial version of http://fiddle.dragonruby.org has - been created. Try it out. - * [Support] Eight new beginner sample apps have been added - which breakdown the tech demo into consumable pieces (with comments). - * [Support] The two introductory Ruby primers now contain links - to video tutorials that you can use to follow along. - * [Support] A game/sample app called Snakemoji has been added. Game - development should be fun and about experimentation. This sample app - was certainly built in the spirit of this. A big thank you to - Anton K. (ai Doge) for this contribution. - * [Support] Added $gtk.trace!(an_object) which will detailed print execution - information. This should make it much easier to track down exceptions. - * [Support] All source files are auto reloaded on save or when - $gtk.reset is executed. - * [Support] § (:section_sign) can now be used to open up the - DragonRuby GTK Console. - -= release-20190731 = - - * [Bugfix] Fixed bug in DragonRuby console returning evaled value. - * [Support] Updated collisions sample app with comments. - * [Support] Added comments for sprite animation sample app. - * [Support] dragonruby-publish will look for your game in the - "mygame" directory if not otherwise specified on the command line. - * [Support] dragonruby-publish now puts packaged builds in - "builds" directory instead of ".dragonruby/builds" so you can actually - find them. - -= release-20190712 = - - * [Bugfix] dragonruby-publish ignores .git/.hg/.svn directories. - -= release-20190711 = - - * [Bugfix] Bug fix for Easing module rename. Sorry about that! - * [Typo] Fixed grammar in sprite limits explanation. - -= release-20190709 = - - * [Bugfix] Text scaling now works on Windows. Resize the window and your - fonts should stay crisp now! - * [Bugfix] dragonruby-httpd on Windows now has proper EXE metadata. - * [API] Commonly used properties on `args` are now accessible as top - level methods: - - ``` + + puts60 (args.state.player.intersect_rect? [10, 10, 10, 10]) + end +#+end_src +** [Docs] Better themeing of table of contents. +** [Docs] Added docs for easing functions and string functions. Added ~args.easing~ and ~args.string~ so you have access to class functions like ~args.geometry~. +** [Bugfix] ~args.inputs.directional_vector~ now returns the correct normalized values for diagonals. +** [Bugfix] ~args.layout.rect~ now respects ~args.grid.origin_center!~. +** [API] Hash responds to ~pos~ and ~z~ so you can access those properties via the dot operator instead of using indexed symbols. +** [Samples] Misnamed sample app has been renamed to =bullet_hell= to reflect what the sample shows. + +* 2.6 +** [Samples] Fixed \r\n syntax error in animation creator sample app that only affected Window (grr). + +* 2.5 +** [Samples] [Pro] Fixed exception in synth sample app (no really this time). + +* 2.4 +** [OSS] Contributions from [[github.com/dragonruby/dragonruby-game-toolkit-contrib]] have been synchronized. +** [OSS] Remote hot load client has been open sourced. +** [Samples] Added starter template from Nokia Jam 3 under =./samples/99_lowrez=. +** [Samples] [Pro] Fixed exception in synth sample app. +** [Support] Initial work to include line number and file in the event on an exception. + +* 2.3 +** [Bugfix] Ensure that all requires are processed before running unit tests. +** [Samples] =./samples/99_genre_3d/02_wireframe=: Sample app added to show how to create a wireframe using ~.off~ (Object File Format) geometry files. +** [Samples] =./samples/13_path_finding_algorithms= Sample apps added that show various types of pathfinding. +[[This write-up][https://www.redblobgames.com/pathfinding/a-star/implementation.html]] on Red Blob Games is a fantastic read. +** [Samples] =./samples/(08_bouncing_on_collision|09_arbitrary_collision|10_collision_with_object_removal) Sample apps added that show collision of arbitrary polygons. +** [Samples] =./samples/99_genre_rpg_tactical= Sample app added that show how to do player/enemy turns in a tactical RPG. +** [API] Added a means to get autocompletion suggestions from the Runtime via ~GTK::Runtime::suggest_autocomplete~. You can use this to create fancy autocompletion plugins for your preferred editor. +Example usage: +#+begin_src ruby + # API: $gtk.suggest_autocompletion index: STRING_INDEX_REPRESENTING_CURSOR_LOCATION, text: SOURCE_CODE + + # Write something like the following to app/mailbox.rb + # get the autocomplete suggestions for the source code with the cursor at index 21 + suggestions = $gtk.suggest_autocompletion index: 21, text: <<-SOURCE_CODE def tick args - args.(solids|sprites|lines|labels|borders| - click|click_at|mouse|controller_one|controller_two| - keyboard) + args. end - ``` - * [BREAKING] `args.game` has been deprecated is favor of the better - named property `args.state`. - * [Support] DragonRuby GTK Console now accepts input - immediately (specifically while it's animating). - * [API] Class macro `gtk_args` has been added. Instead of having to - do: - - ``` - class Game - attr_accessor :args, :grid, :state, :inputs, :outputs, :gtk, :passes, - :current_scene, :other_custom_attrs - - def tick + SOURCE_CODE + + # write autocomplete suggestions to a file for reading later + $gtk.write_file 'autocomplete.txt', (suggestions.join "\n") +#+end_src +** [API] The ~attr_gtk~ class macro now adds ~layout~ as a member variable. +** [API] Added ~Kernel#puts(6|60|600). Using ~puts6~ will print to the console ever 6 ticks, ~puts60~ will print every second, ~puts600~ will print to the console every 10 seconds. +** [API] Added ~Mouse#inside_rect?~. +** [API] Added ~Geometry#center_inside_rect_(x|y)~ which only centers rects horizonally (x) or vertically (y). +** [API] ~GTK::Layout#rect~ now accepts ~d(x|y|w|h)~ parameters. +Example usage: +#+begin_src ruby + # note: the layout is composed of 12 rows and 24 columns, rows go from top to bottom and columns go from left to right. + # ~args.layout.rect~ returns a rectangle represented as a ~Hash~ with ~:x~, ~:y~, ~:w~, and ~:h~. + # render a border at row 0, column 0, with a width 1 and height of 1 + def tick args + args.outputs.borders << (args.layout.rect row: 0, # you have access to 12 rows (float values are allowed) + col: 0, # you have access to 24 columns (float values are allowed) + w: 1, # w and h are represented in cell units (not pixels) + h: 1) + end +#+end_src + +Example usage with added parameters +#+begin_src ruby + # render a border at row 0, column 0, with a width 1 and height of 1, but shift the rectangle by dx, dy (represented in pixels), + # and increase/decrease by dw, and dh (reprsented in pixels) + def tick args + def tick args + args.outputs.borders << (args.layout.rect row: 0, # you have access to 12 rows (float values are allowed) + col: 0, # you have access to 24 columns (float values are allowed) + w: 1, # w and h are represented in cell units (not pixels) + h: 1, + dx: -10, # after calculating, shift x by -10 pixels (left) + dy: 10, # after calculating, shift y by 10 pixels (up) + dw: 100, # after calculating, increase the w by 100 pixels + dh: 200) # after calculating, increase height by 200 pixels + end +#+end_src +** [OSS] ~GTK::Runtime::Autocomplete~ (the logic for suggesting autocompletions) has been open sourced. +** [OSS] ~GTK::Runtime::Framerate~ (the logic for calculating framerate) has been open sourced. +** [OSS] ~GTK::Layout~ (the logic to calculate aspect-ratio-aware rectangles within a 12x24 grid) has been open sourced. + +* 2.2 +** [Bugfix] Better support for requires for paths in nested directories. +** [Bugfix] Better support for requires for paths outside off the app directory. +** [Support] Added ~--test~ command line argument that will automatically start tests withouth explicitly having to call ~$tests.start~. +Take a look at ~samples/10_advanced_debugging/03_unit_tests~ for samples. + +* 2.1 +** [Bugfix] Better support for nested require statements ~require~ and top level ~require~ statements that depend on ~tick_count == 0~. +** [Bugfix] Ensure that screen remains black while nested and top level requires are being processed. + +* 2.0 +** [IMPORTANT] This version does NOT have any breaking changes. +** [Pro] [API] [Audio] Sound synthesis sample app now includes square, triangle, and sawtooth wave generation. +** [Pro] [Bugfix] [Android] Android deployment issues related to the latest SDKs have been fixed. +** [Support] Apple Silicon publishing added. +** [API] ~$gtk.version~ has been added and will return a ~String~ (in this case "2.0"). Assume the version is "1.0" if ~$gtk.respond_to? :version~ returns ~false~. +** [Bugfix] ~require~ parsing improved and facilities put in place to ensure all files are required before ~tick~ is invoked. +** [Bugfix] Flashing of background color when your game starts has been fixed. The default starting color is black. +** [Bugfix] [Http] $gtk.http_post now works correctly with form collections. +** [Samples] New sample app ~samples/04_physics_and_collisions/06_box_collision_3~ added that shows auto-tiling concepts with dynamically changing collisions. + +* 1.27 +** [Pro] [API] [Audio] Sound synthesis capabilities added. +** [Pro] [Samples] [Audio] Added a new sample app samples/01_rendering_basics/07_sound_synthesis/ that shows how to create sine waves. +** [Pro] [OSS] [iOS] iOS Wizard open sourced. +** [Bugfix] Scaling issues fixed with HTML5 games. +** [API] Added ~GTK::Runtime#openurl~ ~args.gtk.openurl(some_url)~. +** [API] Added ~GTK::Runtime#set_window_fullscreen~ ~args.gtk.set_window_fullscreen(true|false)~. +** [Bugfix] Sprite angles now accept float values instead of just ints. +** [Bugfix] More accurate results for ~args.gtk.calcstringbox~. +** [Support] Better cursor rendering in the Console. +** [Experimental] Added component layout api (open sourced), take a look at samples/01_rendering_basics/07_sound_synthesis/ to see how it's used to layout buttons. +** [Support] Emscripten dependencies updated (hopefully yielding better HTML5 games). +** [OSS] [iOS] Itch Wizard open sourced. + +* 1.26 +** [Pro] [Samples] [C Extensions] New sample app added showing how to incorporate your own regex library: 12_c_extensions/02_intermediate +** [Pro] [Samples] [C Extensions] New sample app added showing how to manipulate single pixels: 12_c_extensions/03_native_pixel_arrays +** [Samples] [API] [Experimental] Added a new sample app 01_rendering/06_audio_mixer that gives you more control over sounds. +Check out the YouTube video at [[https://www.youtube.com/watch?v=b1pL4pEWymI&ab_channel=AmirRajan]] +** [Docs] Docs added for ~outputs.screenshots~ (thank you kfischer_okarin@discord). +** [Support] ~trace!~ now provides timing information (thank you danhealy@discord). +** [Support] Console now supports left and right movement of the cursor (thank you kfischer_okarin@discord). +** [Bugfix] ~args.state~ serialization and deserialization now takes into consideration hashes that were stored by reference. +** [API] Added ~attr~ class method that is an alias for ~attr_accessor~. +** [API] Re-added ~args.gtk.save_state~ and ~args.gtk.load_state~ as convenience methods. +This is what the convenience methods do: +#+begin_src ruby + def save_state + serialize_state "game_state_#{Time.now.to_i}.txt", @args.state + serialize_state "game_state.txt", @args.state + end + + def load_state + @args.state = deserialize_state 'game_state.txt' + end +#+end_src +** [OSS] Implementation of draw order and the underlying FFI methods have been open sourced. +** [API] ~GTK::Runtime#console_button_primitive~ +The ~args.gtk.console_button_primitive~ is a function that returns and handles the click of a button that will render in the top right +corner of the screen. If this button is clicked, then the console will be shown. This is useful for when you want have the console +readily available on Desktop or if you need to bring up the console on mobile devices (mobile is available in DragonRuby Game +Toolkit Pro only). To use this, add the following to your ~tick~ method: +#+begin_src ruby + def tick args + args.outputs.reserved << args.gtk.console_button_primitive + end +#+end_src +The source code for this function is: +#+begin_src ruby +module GTK + class Runtime + def console_button_primitive + return nil if $gtk.production + return nil if @console.visible? + + @console_button ||= { x: 55.from_right, y: 50.from_top, w: 50, h: 50, path: 'console-logo.png', a: 80 }.sprite + if @args.inputs.mouse.click && (@args.inputs.mouse.inside_rect? @console_button) + @args.inputs.mouse.click = nil + @console.show end + @console_button + end + end +end +#+end_src +** [Bugfix] HTML game will now be uploaded to Itch.io along with Mac, Linux, PC, and Raspberry Pi binaries. +** [Support] Emscripten compiler has been updated. +* 1.25 +** [Bugfix] Hash#anchor_rect wasn't working like Array#anchor_rect (now it is). +** [API] Added Mouse#inside_circle? so you don't have to do ~args.inputs.mouse.point.inside_circle?~. +** [Bugfix] Mac app will no longer ask to monitor keyboard input when starting. +* 1.24 +** [Bugfix] ~GTK::Runtime#(write|append)_file~ +~$gtk.(write|append)_file in production mode will no long write to the +app directory. You can get the write location of the file using +~gtk.get_game_dir~. +** [Wizard] [Experimental] Itch.io Wizard +An Itch.io Wizard has been added to the Console as a menu button. you +can also invoke the wizard via ~$wizards.itch.start~. +* 1.23 +** [API] ~Numeric#randomize~ +~Numeric#randomize~ can now accept the symbol ~:int~. +~(100.randomize :int)~ will return a random whole number between ~0~ +and ~100~ inclusive. Here are some other uses of ~Numeric#randomize~: +#+begin_src ruby + 100.randomize :ratio # returns a float between 0 and 100 + 100.randomize :ratio, :sign # returns a float between 0 and 100, but negative or positive +#+end_src +** [Bugfix] ~Label#size_enum~ +Fixed bug where a label's size_enum is larger than the maximum font +size of the OS. +** [API] ~GTK::Runtime#(write|append)_file~ ~GTK::Runtime#(write|append)_file_root~ +This is kind of a breaking change, but should actually yield a nice +development experience. ~$gtk.(write|append)_file~ will now write to +your game directory as opposed to writing to the process execution +directory. To write to the process execution directory, use +~gtk.(write|append)_file_root~. +** [Bugfix] ~def tick args~ +The simulation will run more consistently in the event a slow ~tick~ +occurs and won't try to "catchup" (which causes the game to run very +fast for a few ticks). +* 1.22 +** [Samples] Console Customization +Sample app added that shows how to add custom buttons to the +Console. The new sample app is located at ~./samples/99_genre_dev_tools/add_buttons_to_console~ +* 1.21 +** [Bugfix] Sprite Color Saturation +There was a bug with rgb saturations on sprites. This bug was +terminated with extreme prejudice. +* 1.20 +** [Bugfix] Line Colors +The green and blue values for lines and screenshots was flipped. This +bug was terminated with extreme prejudice. +* 1.19 +** [Samples] Sprite Rendering Performance +Better sample apps showing a spectrum of ways to render a lot of +sprites. All sprite_limits samples apps were reworked. +** [Support] Override Draw Call For Sprite +Performance enhancements to draw calls and a means to override them +completely if you really need to (take a look at the sprite limit +sample apps). +** [Support] Troubleshooting Framerate +Added better diagnostics for performance issues. Try +~$gtk.framerate_diagnostics~ from the console. This diagnostics +information has been open sourced. +** [Samples] Sample Apps Reorganized +** [Bugfix] ~Outputs#background_color~ +Setting ~Output#background_color~ to an invalid value no longer segfaults. +** [Docs] Searching Sample Code +The file docs/docs.html now contains all code from the sample apps so you only have to search in one place. +** [Samples] There are over 12,000 lines of sample code now :-) +* 1.18 +** [Docs] Added the "Continuity of Design" to the "DragonRuby's Philosophy" section. +** [Docs] Added all source code that has been open sourced to the docs.html. +** [Support] ~$gtk.reset~ Enhancements +~$gtk.reset~ now resets the grids origin back to bottom left by +calling the ~args.grid.origin_bottom_left!~ method. +** [API] ~Numeric#from_top~ +Added ~Numeric#from_top~ so that it's easier to position primitives: +#+begin_src ruby + args.outputs.labels << [10, 10.from_top, "hello world"] +#+end_src +** [API] ~Object::attr_gtk~, ~Object::attr_sprite~, ~Object::attr_rect~ as instance methods. +** [API] ~Mouse#inside_rect?~ +Added ~Mouse#inside_rect?~ (~args.inputs.mouse.inside_rect?~) which +delegates to ~args.inputs.mouse.point.inside_rect?~. +** [Support] Added a collection of menu buttons for common tasks to DragonRuby Console. +* 1.17 +** [MacOS] Updated minimum OS support to include MacOS 10.9+ (really I swear this time it's fixed definitely, maybe). +* 1.16 +** [Bugfix] Fixed bug in HTML5 template that would cause an exception when releasing to Itch. +* 1.15 +** [Support] Rendering Enhancements +Rendering and simulation have been decoupled which will allow fps to +be unbounded. ~tick~ will still run at 60 hz (we just render as fast +as the platform allows). +* 1.14 +** [Support] HTML5 Template Updated +Better HTML5 template. Additional JS events added to handle loss of +keyboard input within an iframe. +** [Bugfix] ~args.outputs.screenshots~ regression fixed. +** [Docs] Added documentation for a few more ~Numeric~ methods. +** [Samples] Animation Creator +Brand new advanced sample app: 99_sample_sprite_animation_creator. The +sample app uses ~args.outputs.screenshots~ and ~render_targets~ +heavily along with in memory queues as a means to consolidate events +coming from different parts of the app. +* 1.13 +** [API] Sprite angle now accepts fractional degrees. +** [Samples] Better font added to LOWREZJAM 2020 template. +** [API] ~args.outputs[RENDER_TARGET_NAME]~ +Added ~args.outputs[RENDER_TARGET_NAME]~ as an alias to +~args.render_target(RENDER_TARGET_NAME)~. Either of the following will +work: +#+begin_src ruby + def tick args + if args.state.tick_count == 1 + args.render_target(:camera).width = 100 + args.render_target(:camera).height = 100 + args.render_target(:camera).solids << [0, 0, 50, 50, 255, 0, 0] end - def tick args - $game.args = args - $game.grid = args.grid - $game.state = args.state - $game.outputs = args.outputs - $game.gtk = args.gtk - $game.passes = args.passes - $game.tick + if args.state.tick_count > 0 + args.outputs.sprites << { x: 0, + y: 0, + w: 500, + h: 500, + source_x: 0, + source_y: 0, + source_w: 50, + source_h: 50, + path: :camera } end - ``` + end - You can now do: + $gtk.reset +#+end_src - ``` - class Game - gtk_args - attr_accessor :current_scene, :other_custom_attrs +Is the same as: - def tick - end +#+begin_src ruby + def tick args + if args.state.tick_count == 1 + args.outputs[:camera].width = 100 + args.outputs[:camera].height = 100 + args.outputs[:camera].solids << [0, 0, 50, 50, 255, 0, 0] end - def tick args - $game.args = args - $game.tick + if args.state.tick_count > 0 + args.outputs.sprites << { x: 0, + y: 0, + w: 500, + h: 500, + source_x: 0, + source_y: 0, + source_w: 50, + source_h: 50, + path: :camera } + end + end + + $gtk.reset +#+end_src +* 1.12 +** [Samples] New LOWREZ Sample +LOWREZ Jam sample app reworked in preparation for LOWREZ Jam 2020 +(starts on August 1st so hurry and join). +** [Docs] ~GTK::Mouse.docs~ +Docs added for GTK::Mouse, you can access them via the Console by typing ~GTK::Mouse.docs~ or ~$gtk.args.inputs.mouse.docs~. +** [MacOS] Updated minimum OS support to include MacOS 10.9+. +* 1.11 +** [Bugfix] Fixed error in ~docs_search "TERM"~. +* 1.10 +** [Support] Documentation infrastructure added (take a look at docs/docs.html). +Bring up the DragonRuby Console. +To search docs you can type ~docs_search "SEARCH TERM"~ +If you want to get fancy you can provide a ~lambda~ to filter documentation: +#+begin_src ruby + docs_search { |entry| (entry.include? "Array") && (!entry.include? "Enumerable") } +#+end_src +** [Bugfix] ~Sprite#source_(x|y|w|h) +Fixed sprite rendering issues with source_(x|y|w|h) properties on +sprites. +** [Support] Removed Double Buffering +Removed double buffering of game if framerate drops below 60 +fps. There have been quite a few performance enhancements that make +this method unneeded (plus there will be future enhancments to +rendering). +** [Support] Console Scroll Wheel Support +Console now supports mouse wheel scrolling. +** [Support] One Time Notification Clean Up +One time notifications have less noise/easier to read. +** [Bugfix] Orphaned ~app~ Directory +Rogue ~app/main.rb~ directory will no longer be created if you run a sample app. +* 1.9 +** [Bugfix] HTTP on windows should now work, for real this time. +** [Bugfix] Non-720p render targets now use correct coordinate system. +* 1.8 +** [Bugfix] HTTP on windows should now work. +** [Bugfix] ~even?~ and ~odd?~ return the correct result for Fixnum. +** [Bugfix] ~args.intputs.mouse_wheel~ now reports the delta change in x and y correctly. +** [Bugfix] Improved analog joystick accuracy when converting to percentages. +** [Support] Console Tab Completion +Incorporated pull request from https://github.com/kfischer-okarin that adds autocompletion to the Console. +This is the PR: + - https://github.com/DragonRuby/dragonruby-game-toolkit-contrib/commit/da0fdcfbd2bd9739fe056eb646920df79a32954c + - https://github.com/DragonRuby/dragonruby-game-toolkit-contrib/commit/99305ca79118fa0704c8681f4019738b8c7a500d +* 1.7 +** [BREAKING] ~args.inputs.mouse.wheel.point~ +~args.inputs.mouse.wheel.point~ is gone. Use args.inputs.mouse.x and +.y if you need cursor position. +** [BREAKING] ~args.inputs.mouse.wheel.(x|y)~ +~args.inputs.mouse.wheel.(x|y)~ now represent the amount the +mousewheel/trackpad has moved since the last tick and not the mouse +cursor position. Use args.inputs.mouse.x and .y if you need cursor +position. +* 1.6 +** [API] ~Sprite#source_(x|y|w|h)~ +~Sprite~ now supports source_(x|y|w|h). These properties are +consistent with the origin being in the bottom left. The existing +properties tile_(x|y|w|h) assumes that origin 0, 0 is in the top +left. The code below will render the same sprite (in their respective +coordinate systems): +#+begin_src ruby + # using tile_(x|y|w|h) properties + args.outputs.sprites << { x: 0, + y: 0, + w: 1280, + h: 100, + path: :block, + tile_x: 0, + tile_y: 720 - 100, + tile_w: 1280, + tile_h: 100 } +#+end_src + +is equivalent to: + +#+begin_src ruby + # using source_(x|y|w|h) properties + args.outputs.sprites << { x: 0, + y: 0, + w: 1280, + h: 100, + path: :block, + source_x: 0, + source_y: 0, + source_w: 1280, + source_h: 100 } +#+end_src +Note: if you provide both tile_(x|y|w|h) and source_(x|y|w|h). The +values of tile_ will "win" so as not to break existing code out +there. +** [Bugfix] Duplicate Requires +Updated require to remove duplicate requires of the same file (or +files that have recently been required). +** [Bugfix] Strict Entities Serialization +Strict entities of different types/names serialize and deserialize +correctly. +** [Samples] Render Targets with Alphas +Updated render targets sample app to show two render targets with +transparencies. No really, render targets now have a transparent +background and respect opacity. +* 1.5 +** [API] ~$gtk.(show|hide)_cursor~ +Added ~$gtk.show_cursor~ and ~$gtk.hide_cursor~ to show and hide the mouse +cursor. The function only needs to be called once. EG: +#+begin_src ruby + def tick args + args.gtk.hide_cursor if args.state.tick_count == 0 + end +#+end_src +The Jam Craft 2020 sample app updated to have more comments and demonstrate a custom mouse cursor. +* 1.4 +** [Bugfix] ~$gtk.reset~ +Adding $gtk.reset at the bottom of main.rb will no longer cause an infinite loop. +** [Samples] Jam Craft 2020. +* 1.3 +** [Samples] Added Better Help Text/Explanations +* 1.2 +** [Bugfix] Top-level require statements within main.rb will load before invoking the rest of the code in main.rb. +** [Samples] Better keyboard input sample app. +** [Samples] New sample app that shows how to use Numeric#ease_spline. +** [Bugfix] Fixed "FFI::Draw cannot be serialized" error message. +* 1.1 +** [Bugfix] Fixed exception associated with providing serialization related help. +** [Bugfix] Fixed comments on how to run tests from CLI. +** [Support] More helpful global variables added. Here's a list: + - $gtk + - $console + - $args + - $state + - $tests + - $record + - $replay +** [API] inputs.keyboard.key_(down|held|up).any? and inputs.keyboard.key_(down|held|up).all? added. +** [Support] Recording gameplay and replaying streamlined a bit more. GIVE THE REPLAY FEATURE A SHOT! IT'S AWESOME!! Bring up the console and run: $record.start SEED_NUMBER. +** [Support] Bringing up the console will stop a replay if one is running. +* 1.0 +** [News] DragonRuby Game Toolkit turns 1.0. Happy birthday! +** [Bugfix] args.state.new_entity_strict serializes and deserializes correctly now. +** [BREAKING] Entity#hash has been renamed to Entity#as_hash so as not to redefine Object#hash. This is a "private" method so you probably don't have to worry about anything breaking on your end. +** [BREAKING] gtk.save_state and gtk.load_state have been replaced with gtk.serialize_state and gtk.deserialize_state (helpful error messages have been added). +** [Support] Console can now render sprites (this is still in its early stages). Try $gtk.console.addsprite(w: 50, h: 50, path: "some_path.png"). +** [API] Render targets now have a transparent background and respect opacity. +** [API] Render targets can be cached/programatically created once and reused. +** [Samples] A new render target sample app has been created to show how to cache them. +** [Samples] Easing sample app reworked/simplified. +** [Support] GTK will keep a backup of your source file changes under the tmp directory. One day this feature will save your ass. +* release-20200301 +** [Samples] Added sample app that shows how you can draw a cubic bezier curves. +** [Support] Keyup event prints key and raw_key to the console. +** [Support] Circumflex now opens the console. +* release-20200227 +** [Bugfix] Game will now auto restart in the event of a syntax error. +** [Samples] Sample app added to show how to use a sprite sheet for sprite animations: 09_sprite_animation_using_tile_sheet. +** [Samples] Sample app added to show how to use a tile sheet for a roguelike: 20_roguelike_starting_point_two. +** [Samples] Example code added to show how sort an array with a custom sort block: 00_intermediate_ruby_primer/07_powerful_arrays.txt +** [OSS] The following files have been open sourced at https://github.com/DragonRuby/dragonruby-game-toolkit-contrib: + - modified: dragon/args.rb + - new file: dragon/assert.rb + - new file: dragon/attr_gtk.rb + - modified: dragon/console.rb + - new file: dragon/docs.rb + - new file: dragon/geometry.rb + - new file: dragon/help.rb + - modified: dragon/index.rb + - modified: dragon/inputs.rb + - new file: dragon/log.rb + - new file: dragon/numeric.rb + - new file: dragon/string.rb + - new file: dragon/tests.rb + - new file: dragon/trace.rb +** [Support] Added isometric placeholder sprites. +** [Support] Added $gtk.reset_sprite 'path' to refresh a sprite from the file system (while the game is running). Future releases will automatically auto load sprites but you can use this to reload them on demand. +* release-20200225 +** [Bugfix] Fixed macOS compatibility back to Mac OS X 10.9 or so. +* release-20200224 +** [Bugfix] Some of the deprecation notices where throwing an exception. This has been fixed. +** [API] $gtk.system(cmd) has been added. You'll find this helpful for running cli programs from Heads Up Display. It's probably not a good idea to use this in a production game (since you'll be responsible for making sure it works on all platforms). +* release-20200218 +** [API] Enhanced screenshotting api that can be used for image manipulation. Take a look at the painting sample app. +Example usage: +#+begin_src ruby + args.outputs.screenshots << [0, 0, 100, 100, 'bottom-left-corner.png'] +#+end_src +** [BREAKING] Outputs#static_background_color has been renamed to Outputs#background_color. +** [API] Outputs#debug and Outputs#static_debug layer has been added. You can use this layer to draw all your guide lines and helper primitives. When the game is published, this layer will not render. +* release-20200217 +** [Bugfix] ~dragonruby-publish~ would only build html5. It now builds all of the platforms again. Ryan has given Amir a warning and has told him to be more careful releasing. Amir cackled in defiance. +* release-20200213 +** [API] Added Float#pos? and Float#neg?. +** [Samples] Sample added to show how to use directional_vector and sprite sheets. +** [Samples] Updated 01_api_01_labels sample app to show how to render a label as an array or hash. +** [Bugfix] Fixed incorrectly named value for labels in 11_hash_primitives sample app. +* release-20200211 +** [API] Added ~args.inputs.directional_vector~ and ~args.inputs.(keyboard|controller_one|controller_two).directional_vector~. The sample app to demonstrate the use of this feature is pending. +** [API] Added Numeric#pos? and Numeric#neg?. +** [Bugfix] Fixed looping issues with ogg files and popping issues with playing sounds in general. +** [Bugfix] ~args.gtk.console.toast :message, "some message"~ would fail because of an invalid method name. +** [News] Amir (the CEO of DragonRuby LLP) wrote a 2019 year end review. You can read it here: http://www.rubymotion.com/news/2020/01/02/year-end-review.html. +** [News] Expect the frequency of updates of GTK to increase. Ryan let Amir have the deployment passwords, so the rate limiter is now gone :3 +* release-20200202 +** [API] Hash now supports :scale_rect. +** [Samples] Added sample app that shows how to create a hexagon based grid. +** [Support] Initial work on CHEATSHEET.txt. +** [API] Added args.inputs.keyboard.ctrl_* which will return true if Ctrl is combined with another key. +** [API] Added args.inputs.click (which only returns the point or nil). +** [API] Added Numeric#even? and Numeric#odd?. +** [API] Added Geometry#point_inside_circle?(point, circle_point, radius). +* release-2020130 +** [Performance] Rendering api optimizations. Initial tests show that DragonRuby Game Toolkit can now render more sprites (and calculate more collisions) than Unity 2D. Checkmate. +** [Support] Fixed documentation for labels (the hash properties are called size_enum, and alignment_enum). The documentation can be found under mygame/documentation. +** [Support] Improved help text for exceptions related to ambiguous use of primitives. +** [Bugfix] Requiring multiple ruby files will no long "blip" an exception on startup. +* release-20191201 +** [Samples] Added sample game called The Little Probe that demonstrates line collision. +** [Samples] Experiments with squares and cubes in 3D. +** [Support] HTML5 games now package a favicon. +** [Samples] [Support] Quite a few of the sample apps have been updated to include an api listing at the top (expansion of documentation). +** [API] Initial work for http has been created. Take a look at the http sample app to see how to use it. Take a look at ~samples/99_zz_gtk_unit_tests~ for a test suite that asserts async http. +** [Support] [Samples] Added a sample app that shows how create collision detection associated with constraint points against a ramp. This sample app also demonstrates the use of ~gtk.slowmo!~ which you can use the slow down the tick execution of your game to see things frame by frame (still experimental). +** [Support] Added sprites to default template folder. The sprites are ~sprites/square-COLOR.png~ and ~sprites/circle-COLOR.png~ where the colors are of the rainbow ROY G. BIV (eg ~sprites/square-red.png~). +** [Sample] Added a sample app that shows how to use the ~static_sprites~ rendering api which is the fastest way to render a sprite (but also hangs on the instances by reference as opposed to treating the collection as a queue... a trade off between immutablility and speed). +** [API] Added the ~attr_sprite~ class macro which can be mixed into a class so that it quacks like a sprite. The Sprite Limits sample app has been updated to use this macro. +** [Support] In the event of an exception, the class hierarchy for the object that threw the exception is provided. +** [Support] In the event of a :method_missing exception, the instance's API is searched for methods that look like the one you were trying to call. Those recommendations are printed to the console. +** [Samples] [Support] Significant enhancements have been made to the test harness. Take a look at ~samples/99_zz_gtk_unit_tests~ to see some of the test suites that are being fleshed out. These test suites are used as regression during builds. More will come. +** [Samples] Unit tests added for geometry apis. +** [Samples] Unit tests added for parsing json and xml. +** [Bugfix] HTML5 builds no longer fail at startup with an audio initialization error message. +** [Bugfix] The $gtk.write_file API change was a mistake. The actual bug it was meant to resolve has been fixed. The responsible parties have been brutally disciplined. +** [BREAKING] ~gtk_args~ class macro has been renamed to ~attr_gtk~. This is a little easier to remember because it follows the same pattern as ~attr_accessor~. +** [BREAKING] ~PRIMITIVE.w(idth)_half~ and ~PRIMITIVE.h(eight)_half~ have been deprecated. Use ~PRIMITIVE.w.half~ (Numeric#half). +** [BREAKING] ~PRIMITIVE.angle_given_point~ has been deprecated. Use ~PRIMITIVE.angle_from~. +** [API] ~PRIMITIVE.angle_to~ has been added. Take a look at ~samples/99_zz_gtk_unit_tests~ for usages. +** [BREAKING] ~intersects_rect?~ with an ~s~ has been deprecated. Use ~intersect_rect?~ instead. +NOTE: Ruby's naming convention is to generally *not* include the +\"s\" for interrogative method names (methods that end with a ? +[question mark]). It doesn't sound grammatically correct, but that +has been the rule for a long time (and why intersects_rect? has +been deprecated). +** [Samples] Added a white label version of Clepto Frog, a Ludam Dare game built by Amir, Karen, and Rye. You can see the final version (with all assets) here: https://amirrajan.itch.io/clepto-frog. The code is horrible. Who wrote this crap? +** [Bugfix] Fixed looping issues with ~.ogg~. The follow statement will now correctly work: +#+begin_src ruby + def tick args + if args.state.tick_count == 0 + args.outputs.sounds << 'sounds/sample.ogg' + end + end +#+end_src +** [API] Added ~args.gtk.stop_music~ to stop all looping music. +** [API] Added ~args.geometry~ which contains stateless functions that exist on primitives. For a full listing of methods open up the console and type ~args.geometry.help~. A lot of these methods are exercised in the ~samples/99_zz_gtk_unit_tests~ test suite. +** [Support] The --no-tick switch for ./dragonruby will now hide the game window (it's a good way to run "headless" unit tests/regressions suites). Usage: ~./dragonruby mygame --eval some_ruby_file.rb --no-tick~. +** [BREAKING] gtk.on_ticks has been deprecated, use the better named gtk.scheduled_callbacks instead. +** [BREAKING] gtk.on_tick TICKCOUNT { BLOCK } has been deprecated, use the better named gtk.schedule_callback TICKCOUNT { BLOCK } instead. +* release-20190930 +** [Samples] Added sample app that shows how trace can be used within a class. +** [Support] Added $gtk.log_level. Valid values are :on, :off. When the value is set to :on, GTK log messages will show up in the DragonRuby Console *AND* be written to logs/log.txt. When the value is set to :off, GTK log messages will *NOT* show up in the console, but will *STILL* be written to logs/log.txt +** [API] Added args.inputs.mouse.(click|up|down).(x|y) so you don't have to do args.inputs.mouse.click.point. +** [Support] You can change your window title at runtime with $gtk.set_window_title('new title'). YOU MUST SET UP YOUR GAME'S METADATA CORRECTLY EVEN IF YOU USE THIS FUNCTION. +** [Support] The macOS build is now compiled with Link-Time Optimization, as an experiment, which makes your games a little faster and your downloads a little smaller. +** [Support] We've split the open source licenses out of README.txt to their own file, which is packaged with your games, to be a good citizen of the world. If you add other open source stuff, just copy open-source-licenses.txt into your game's folder and add your own stuff to it; that will package with your game instead of the original text file. +** [Support] Added JSON parsing. Try $gtk.parse_json(myJsonString) or $gtk.parse_json_file(filename) +** [Support] Added XML parsing. Try $gtk.parse_xml(myXmlString) or $gtk.parse_xml_file(filename) +** [BREAKING] There is a new replay data format that is less crappy. But it breaks existing replay data. You'll need to re-record your replays (sorry T_T). To record a replay of gameplay, you can run ./dragonruby mygame --record. When you close the game, a file called last_replay.txt will be created. You can re-run a replay as a means to perform visual regression using ./dragonruby mygame --replay last_replay.txt +** [Support] Added a --production command line option for running an unpublished game as if it were published. +** [Support] We now offer bleeding edge builds on the "experimental" channel on itch.io. If you want those, go to where you downloaded this package, and look for the "experimental" download instead. These are expected to be less stable and pushed as we need to test things out or hotfix a bug that isn't ready to roll into an official release. If this is your jam, though, go for it. +** [OSS] Thank you to StardragonEX, phaedryx, and pusewicz for contributing to GTK documentation located at github.com/DragonRuby/dragonruby-game-toolkit-contrib. +** [Support] Enabling trace! on an object now outputs all trace data to a file as opposed to just standard out. This will make trace debugging significantly more useful to developers that don't have a high-buffer-history terminal running. +** [Samples] Added platformer that deals with moving objects, jumping, and dealing with inertia. +** [Samples] Added sample showing how to render an isometric grid (like Into The Breach). +** [Samples] Sample added showing how to use trace! debugging when you are having trouble with why an exception is being thrown. +** [Samples] Many of the sample apps have had their methods reorganized for consistency in reading. They also have comments added to them. +** [Experimental] If the game has been running for over a minute, and cannot keep a stable 60 fps, the game's rendering will be skipped every other frame to save process cycles (tick method will still execute as fast as possible, but results from them method will only be rendered at 30 fps). +* release-20190912 +** [Bugfix] dragonruby-publish now correctly builds HTML5 packages when there's a "'" character in the game's name (etc). +** [Bugfix] dragonruby-httpd now serves paths with spaces in them correctly. +** [Bugfix] dragonruby-publish now ignores __MACOSX directories (trash that macOS tends to generate when you double-click a .zip file to unpack it from the Finder). +* release-20190909 +** [Bugfix] HTML5 builds' "click-to-play" UI now scales the icon. +** [Bugfix] args.gtk.writefile(path, content [, write_to_game_dir = true]) now writes file to the game folder as opposed to the root directory. If you need to write to the root directory provide false as the third parameter to write file. +** [Experimental] There is now a special file in mygame called mailbox.rb. When ~args.gtk.suppress_mailbox = false~, mailbox.rb will be checked for changes at a high frequency (10 times a second). Because this an experimental feature, the default value of ~args.gtk.suppress_mailbox~ is TRUE. You can use this file as a means to communicate with GTK between process. There is a sample app that shows how to use the mailbox.rb file. +** [Support] You can now have multiple mouse buttons! args.inputs.mouse.click and .up will still be set if there was a mouse button change for the current tick, but you should look at args.inputs.mouse.button_left (or _middle or _right or _x1 or _x2) as a bool to see if it's currently pressed down. More than one might be pressed, and more than one button might have changed in the one .click you'll get. The same is true for .up +** [Support] You can now see the mouse wheel (or your trackpad pretending to be a mouse wheel when you stroke it appropriately)! All wheel input since the last tick is added together. You can check if args.inputs.mouse.wheel isn't nil to decide if the wheel has moved for this tick. +#+begin_src ruby + m = args.inputs.mouse + if m.wheel + puts("The wheel moved #{m.wheel.x} left/right and #{m.wheel.y} up/down") + end +#+end_src +* release-20190829 +** [Community] Discord link: http://discord.dragonruby.org and Youtube link: http://youtube.dragonruby.org. +** [Support] Plugging in an unrecognized controller will now make DragonRuby pop up a UI to let the user configure it. During this time your game will receive no tick calls and so will be effectively paused. It resumes once the user has configured the controller or abandoned it. This is a work in progress, but we already think it's pretty cool. +** [Experimental] [Advanced] You can start up ./dragonruby by passing in --eval file_path. The file passed in will execute on startup. Additionally you can pass in --eval file_path --no-tick which will exit ./dragonruby immediately after loading all source, and running the file passed to eval. +** [Experimental] [Advanced] ~on_tick~ callback has been added to $gtk. This can be used to run some form of automation. For example, you can run the Dueling Starships sample app with the following inside of repl.rb. +#+begin_src ruby + # Reset the game and sent the RNG seed to 100 + $gtk.reset 100 + + # Remove any existing callbacks. + $gtk.on_ticks.clear + + # One second into the game, hold down the right directional + # on controller one. + $gtk.on_tick 60 do + $gtk.args.inputs.controller_one.key_held.right = true + end + + # On frame 80, release the right directional, and + # hold down R1. + $gtk.on_tick 80 do + $gtk.args.inputs.controller_one.key_held.right = false + $gtk.args.inputs.controller_one.key_up.right = true + $gtk.args.inputs.controller_one.key_held.r1 = true + end +#+end_src +There is a full blown automation script under samples/00_beginner_ruby_primer/automation.rb ./samples/00_beginner_ruby_primer $ ../../dragonruby . --eval app/automation.rb +** [Support] Exceptions ~game_state_*.txt~ files are now written to an exceptions directory instead of cluttering up the root. +** [Support] Launching dragonruby with --fullscreen on the command line makes the game fullscreen. +** [Support] Launching dragonruby-publish from any directory with no command line arguments and without a "mygame" folder in the current working directory will cause it to look for "mygame" in the same directory as dragonruby-publish itself. Which is to say: it'll work in the default configuration if you double-click it from the macOS Finder. +** [Samples] New sample app called 02_collisions_02_moving_objects has been added. +** [Support] Previous console messages are subdued if unhandled exception is resolved. This removes visual confusion if another exception is thrown (easier to determine what the current exception is). +** [Support] Added api documentation about truthy_keys for keyboards and controllers. +** [API] [Experimental] Hashes now quack like render primitives. For example some_hash[:x] is the same as some_hash.x and can be interchangeable with some_array.x (this is a work in progress so there may be some geometric/collision apis that aren't covered). +** [Support] Usability of Console and it's interaction with repl.rb is SIGNIFICANTLY better. Take a look at the new repl.rb file under mygame/repl.rb to see an interactive crash course of Ruby that shows how to use variables, functions, conditionals, loops, and arrays. Special thanks to @raulrita (https://www.twitch.tv/raulrita) for live streaming and bringing light to these enhancements. +** [Support] ~puts~ statements that begin with "====" are rendered as teal in the Console. This provides a visual separation that will help with print line debugging. +** [OSS] The DragonRuby Game Toolkit Console has been open sourced under an MIT license. You can find it here: https://github.com/DragonRuby/dragonruby-game-toolkit-contrib +* release-20190823 +** [Support] The mygame directory now contains a documentation folder that provides high level APIs for the engine (it's a work in progress, but a good starting point). +** [Samples] A sample app called "hash primitives" has been added that shows how you can use a Hash to render a primitive. This will make specifying sprite's advanced properties much easier. +** [Samples] The sprite limits sample app shows how you can ducktype a class and render it as a sprite. Doing this is a tiny bit more work, but there is a huge performance benefit. +** [Bugfix] Internal limits total textures/render targets/fonts is removed. +** [BREAKING] args.dragon has been deprecated, you must now use the new property args.gtk. +** [BREAKING] args.game has been deprecated, you must now use the new property args.state. +** [BREAKING] args.gtk.root has been removed and all attributes have been moved to args.gtk. +** [BREAKING] args.gtk(.root).mouse_focus has been removed, use args.inputs.mouse.has_focus. +** [BREAKING] args.gtk(.root).keyboard_focus has been removed, use args.inputs.keyboard.has_focus. +** [BREAKING] $dragon has been removed, you must now use $gtk. +** [BREAKING] $view has been removed and functionality has been moved to $gtk, use that variable instead. +* release-20190816 +** [Bugfix] HTML5: Fixed crash on startup on Chrome if the game's icon isn't tiny. +** [Samples] Added sample app that shows how you can make a paint app (05_mouse_move_paint_app). +** [Samples] Added sample app that shows how you can make a tile editor (05_mouse_move_tile_editor). +** [Samples] Added LOWREZ Jam 2019 game that Amir built: Return of Serenity (99_sample_game_return_of_serenity). +** [Samples] Added Metroidvania sample app which is a great starting point for the "Metroidvania Month" Jam on Itch.io. +** [Support] :ordinal_indicator (º) character added to args.inputs.keyboard. It can be used to bring up the GTK console. +* release-20190813 +** [Samples] Added sample app that shows off controller input. +** [API] ~args.inputs.keyboard.key_down.delete~ is now available and works in the GTK console. +** [Bugfix] Requiring a ruby file that doesn't exist will return an error instead of crashing. +** [Support] Console coloring added for exceptions. +** [Support] When running trace!, if an exception occurs. The last method invoked will be provided in the details. +* release-20190806 +** [Bugfix] Having $gtk.reset at the bottom of your main.rb will not cause a recursive require of all files. +** [Support] In the event of an exception, the source code will not be searched if the search term is less than three characters. +** [Samples] A Roguelike starting point sample app has been added. +** [Support] If a primitive rendering fails, the primitive type will now be included with the exception. +** [API] The property ~args.outputs.static_background_color = [0, 0, 0]~ is now exposed. This allows you to control the color of the letterbox around your game. Some of the sample apps have been updated to use this property (for example Dueling Starships). +* release-20190803 +** [Bugfix] ~gtk_attr~ now included the ~inputs~ attr_accessor. +** [Website] The initial version of http://fiddle.dragonruby.org has been created. Try it out. +** [Support] Eight new beginner sample apps have been added which breakdown the tech demo into consumable pieces (with comments). +** [Support] The two introductory Ruby primers now contain links to video tutorials that you can use to follow along. +** [Support] A game/sample app called Snakemoji has been added. Game development should be fun and about experimentation. This sample app was certainly built in the spirit of this. A big thank you to Anton K. (ai Doge) for this contribution. +** [Support] Added $gtk.trace!(an_object) which will detailed print execution information. This should make it much easier to track down exceptions. +** [Support] All source files are auto reloaded on save or when $gtk.reset is executed. +** [Support] § (:section_sign) can now be used to open up the DragonRuby GTK Console. +* release-20190731 +** [Bugfix] Fixed bug in DragonRuby console returning evaled value. +** [Support] Updated collisions sample app with comments. +** [Support] Added comments for sprite animation sample app. +** [Support] dragonruby-publish will look for your game in the "mygame" directory if not otherwise specified on the command line. +** [Support] dragonruby-publish now puts packaged builds in "builds" directory instead of ".dragonruby/builds" so you can actually find them. +* release-20190712 +** [Bugfix] dragonruby-publish ignores .git/.hg/.svn directories. +* release-20190711 +** [Bugfix] Bug fix for Easing module rename. Sorry about that! +** [Typo] Fixed grammar in sprite limits explanation. +* release-20190709 +** [Bugfix] Text scaling now works on Windows. Resize the window and your fonts should stay crisp now! +** [Bugfix] dragonruby-httpd on Windows now has proper EXE metadata. +** [API] Commonly used properties on ~args~ are now accessible as top level methods: +#+begin_src ruby + def tick args + args.(solids|sprites|lines|labels|borders| + click|click_at|mouse|controller_one|controller_two| + keyboard) + end +#+end_src +** [BREAKING] ~args.game~ has been deprecated is favor of the better named property ~args.state~. +** [Support] DragonRuby GTK Console now accepts input immediately (specifically while it's animating). +** [API] Class macro ~gtk_args~ has been added. Instead of having to do: +#+begin_src ruby + class Game + attr_accessor :args, :grid, :state, :inputs, :outputs, :gtk, :passes, + :current_scene, :other_custom_attrs + + def tick + end + end + + def tick args + $game.args = args + $game.grid = args.grid + $game.state = args.state + $game.outputs = args.outputs + $game.gtk = args.gtk + $game.passes = args.passes + $game.tick + end +#+end_src + +You can now do: + +#+begin_src ruby + class Game + gtk_args + attr_accessor :current_scene, :other_custom_attrs + + def tick end - ``` - * [API] [BREAKING] The globally accessible GTK Runtime has been renamed `$dragon` to - `$gtk` (you can still use $dragon for now, but it is strongly - recommended that you update your usages to $gtk). - * [API] A new entity type has been introduced and is accessible via `args.state.new_entity_strict` - the usage of StrictEntity over OpenEntity (`args.state.new_entity`) yield significantly faster - property access. The downside is that `args.state.new_entity_strict` requires - you to define all properties upfront within the implicit block. You will receive - an exception if you attempt to access a property that hasn't be - pre-defined. For usage info and performance differences, take a look at the Sprite Limit - sample app. - * [Support] Exception messages have been significantly improved. Hashes and Type .to_s - information is well formatted. "stack too deep" exceptions resolved. - * [API] [BREAKING] `args.outputs.PRIMITIVES +=` is no longer supported. Use `args.outputs.PRIMITIVES <<` - for all concatenation of primitives to the outputs collection (trying to pick between += and << was confusing, - we settled on <<). - * [Support] Framerate warnings wait 10 seconds before calculating the moving average. If your - framerates begin to drop, consider using `args.state.new_entity_static` for game structures that have been - fleshed out. - * [Performance] Rendering of primitives is can support over twice as many sprites at 60 fps (see Sprite Limits - sample app for demonstration). - * [Support] Headless testing has been added. Take a look at the Basic Gorillas sample app to see - how headless testing can help you dial into frame-by-frame problems within your game. - * [Samples] The "Controller Analog Usage Advanced Sprites" sample - app now has a helper function with named parameters to create the - sprite. For example, if you needed to flip a sprite vertically, - you'd have to do the following: - - ``` - args.outputs.sprites << [0, 0, 100, 100, - 'fighter.png', - 0, - 255, 255, 255, 255, - 0, 0, -1, -1, false, true] - ``` - - With the helper method, you can write the following: - - ``` - args.outputs.sprites << create_sprite(x: 0, y: 0, w: 100, h: 100, vflip: true) - ``` - - We're still chewing on the API above before it gets integrated - into GTK proper. - * [API] "Superscript Two" can be used to bring up the DragonRuby - Console. People with international keyboards (which don't have a ~ - key) can now use the `superscript_two` key (which is in the same - place as the ~). - * [API] All keyboard attributes now have a `!` variant which will - clear the key if the value was true. Example: - - ``` - args.inputs.keyboard.key_down.up # returns true - args.inputs.keyboard.key_down.up # still returns true - ``` - - VS - - ``` - args.inputs.keyboard.key_down.up! # returns true - args.inputs.keyboard.key_down.up # now returns false for the rest of this tick - ``` - * [Samples] Added a sample app called "Sprite Animation and Keyboard - Input" that shows how to do repeating and one-time sprite - animations driven by keyboard input. - * [Samples] All sample apps have the MIT License added to them (to - remove any ambiguity with regards to if you can use them for - commercial purposes). - * [HTML5] Games published to HTML5 now has a loading progress bar. - * [Samples] Added sample app called "Coordinate Systems" that show - the two coordinate systems supported by the GTK. - * [API] `args.inputs.mouse` now respects `args.dragon.origin_center!`. - * [Samples] Added two sample apps called "Collision" and "Collision - and Entities" that show how to perform collision detection with - draw primitives and `args.state.new_entity`. - * [Samples] Added an interactive sample app called "Beginner Ruby - Primer" that does a better job of introducing you to the language. - * [Samples] [Video] Amir facilitated a workshop at a local user - group. The source code for the workshop is located in a sample app - called "NDDNUG Workshop". The video was recorded and you can use - that to code along: (https://www.youtube.com/watch?v=S3CFce1arC8). - * [Bugfix] Windows and Mac icon generation in dragonruby-publish was - broken in the previous build. Sorry! Fixed now. - * [Bugfix] DragonRuby binaries are now codesigned on macOS. We are still - working on signing games packaged by dragonruby-publish, but stay tuned! - -= release-20190604 = - - * [BREAKING] `perc_to_zero` and `perc_to_one` have been deprecated - and now throw and informative exception that will help you fix the - problem. Moving forward, you'll need to use the new `lerp` APIs - (details further down). - * [BREAKING] `intersects_rect?` now takes in an optional parameter - called `tolerance`. This parameter's default is set to `0.1`. The - original tolerance value was set to `0`. So if you still want a - tolerance of `0`, you'll need to update your `intersect_rect?` - calls to: `intersects_rect?(other_rect, 0)`. - * [IMPORTANT] [API] [Video] A Quake-style Heads Up Display (HUD), - has been added. You can access this console by pressing the "~" - key. This console can be used to experiment with Ruby, print debug - logging, and diagnose errors. Here is Ryan showing the console in - action: (https://www.youtube.com/watch?v=hHgV11F2ZPY) - * [IMPORTANT] [API] [Video] Added the ability to create replays so you can - do visual regression of your game. Here is this record/replay capability in - action: (https://www.youtube.com/watch?v=ev0UMVBe-fY) - ``` - args.dragon.start_recording(RNG_SEED) - args.dragon.stop_recording(filename) - args.dragon.start_replay(filename) - args.dragon.stop_replay - ``` - - You can record your game on startup using the following command - (it'll automatically save when you close the game): - - ``` - ./dragonruby(.exe) --record - ``` - * [API] Rendering primitives now support `float` values for position - and size. - * [API] [Sample] [Video] Lerping/Easing APIs have been added. There is a - sample app that shows all the things you can do with them. For - philosophical motivations as to why the APIs look the way they do - (and just simply a fantastic presentation), watch this - presentation given by Squirrel Esierloh *NO REALLY YOU SHOULD WATCH THIS PRESENTATION*: - "Math for Game Programmers: Fast and Funky 1D Nonlinear Transformations" (https://www.youtube.com/watch?v=mr5xkf6zSzk) - * [API] CTAG files now ship with releases. This will let you quickly - see the APIs available in DragonRuby GTK. - * [Sample] Added a "prerequisite" sample app that gives you a crash - course of Ruby the programming language. - * [Sample] The composition of primitives in DragonRuby GTK are - incredibly flexible. A sample app called "Fluid Primitives" has - been added to show this flexibility. - * [MacOS] [Linux] [Windows] If your screen resolution is below 720p, - the game will start at a smaller (but still aspect-correct) resolution. - * [Sample] Sample added showing `intersects_rect?` collision - tolerances as a topdown level (similar to what's - in Zelda for the NES). - -= release-20190516 = - - * [Community] A big thank you to Nick Culbertson (@mobypixel) for - creating the art and music for these games. - * [HTML5] [Demo] [Experimental] Experimental deployment to HTML5 added. You can - play the HTML5 version here: (https://dragonruby.itch.io/flappydragon). - * [HTML5] `dragonruby-httpd` binary added so that you can test your - HTML5 game locally. - * [RaspberryPI] [Video] [Experimental] Experimental support added to Rasberry Pi. You can - play DragonRuby GTK games, _develop them and publish them_. - Here's a video of Ryan playing Flappy Dragon on his DIY Arcade - Machine: (https://www.youtube.com/watch?v=DCvFMKsvG-Q). - * [API] Mouse movement can now be tracked: `args,inputs.mouse.position`. - * [API] Experimental API added for taking screenshots: `args.dragon.root.take_screenshot = true`. - * [API] Analog support for controllers added: `args.inputs.controller_one.left_analog_x_perc`. - * [API] [Experimental] Mouse and keyboard focus status are available for use: - ``` - args.dragon.root.mouse_focus - args.dragon.root.keyboard_focus - ``` - * [Samples] Added sample app that shows how to use mouse position. - * [Samples] Flappy Dragon reference implementation significantly polished. - * [Samples] [Demo] Added BASIC Gorillas reference implementation. Playable - here: (https://dragonruby.itch.io/basicgorillas). - * [Samples] Added sample app that shows analog controller support in - action. The sample also shows how to manipulate a sprite's - center of rotation, crop, and horizontal/vertical orientation: - ``` - [ - x, y, w, h, # decimal values (scales implicitly) - path, # string - angle, # in degrees - a, # alpha (0 to 255) - r, g, b, # color *saturation* - source_x, source_y, source_w, source_h, (crop, must be given in original pixels) - flip_h, flip_v, (boolean values) - rotation_anchor_x, rotation_anchor_y (decimal between 0 and 1/ratio from bottom left) - ] - ``` - * [API] Added `args.dragon.calcstringbox(str, size_enum, font)` - function that can be used to calculate the `rect` for a string. - -= release-20190427 = - - * [Packaging] [Windows] Packaging Windows builds of your game now sets a proper icon and - metadata in the final .exe. - * [API] Keyboard input is improved dramatically, so you can get reasonable - key state in your game. - * [Packaging] You can now specify an application icon in your game_metadata.txt - file instead of possibly having a second copy of the same file in - metadata/icon.png. - * [Sample] [Video] [Demo] Added a full-blown game/reference implementation called - `flappy_dragon` under the `samples` directory. Here's a quick five - second video showing the game in action: - (https://www.youtube.com/watch?v=ZQYRlVA1ru0). You can play it - yourself here: (https://dragonruby.itch.io/flappydragon). - -= release-20190422 = - - * [Packaging] Version.txt file added that shows the GIT commit that was - deployed. - * [Packaging] Fixed duplicate "Copying x to y ..." message in `dragon-publish`. - * [Packaging] Automatically package DragonRuby's font and logo so copying the - DragonRuby GTK binary around doesn't cause errors. - * [Linux] [Windows] Line rendering fixes on Linux and Windows. - * [Windows] Bug fix to `golf_with_musical_note` (sound tech demo) sample app where sound - wouldn't play on Windows. - * [Windows] README.txt file formatting updated so that it looks correct in - `notepad.exe`. - * [Packaging] Default icon added to `mygame`. - * [Samples] Reworked `doomwipe` (render targets tech demo) sample app so that - it's less erratic before the effect is revealed. - * [Windows] Fixed bug where rendering would stop on Windows if the screen was - resized. - * [Size] Deleted files that don't need to be packaged with DragonRuby GTK. - -= release-20190419 = - - * [IMPORTANT] First release. Hot off the presses. Ready to take over the world! As - soon as we fix that one bug. Oh and that one. Oh and that one too. - * [Community] The community forum is here: (https://dragonruby.itch.io/dragonruby-gtk/community). - * [Community] Or you can join the Slack channel at: (http://slack.rubymotion.com/). - * [Community] Ryan (@icculus) and Amir (@amirrajan) are both on - Twitter and always happy to help anyone that reaches out to them. + end + + def tick args + $game.args = args + $game.tick + end +#+end_src +** [API] [BREAKING] The globally accessible GTK Runtime has been renamed ~$dragon~ to ~$gtk~ (you can still use $dragon for now, but it is strongly recommended that you update your usages to $gtk). +** [API] A new entity type has been introduced and is accessible via ~args.state.new_entity_strict~ the usage of StrictEntity over OpenEntity (~args.state.new_entity~) yield significantly faster property access. The downside is that ~args.state.new_entity_strict~ requires you to define all properties upfront within the implicit block. You will receive an exception if you attempt to access a property that hasn't be pre-defined. For usage info and performance differences, take a look at the Sprite Limit sample app. +** [Support] Exception messages have been significantly improved. Hashes and Type .to_s information is well formatted. "stack too deep" exceptions resolved. +** [API] [BREAKING] ~args.outputs.PRIMITIVES +=~ is no longer supported. Use ~args.outputs.PRIMITIVES <<~ for all concatenation of primitives to the outputs collection (trying to pick between += and << was confusing, we settled on <<). +** [Support] Framerate warnings wait 10 seconds before calculating the moving average. If your framerates begin to drop, consider using ~args.state.new_entity_static~ for game structures that have been fleshed out. +** [Performance] Rendering of primitives is can support over twice as many sprites at 60 fps (see Sprite Limits sample app for demonstration). +** [Support] Headless testing has been added. Take a look at the Basic Gorillas sample app to see how headless testing can help you dial into frame-by-frame problems within your game. +** [Samples] The "Controller Analog Usage Advanced Sprites" sample app now has a helper function with named parameters to create the sprite. For example, if you needed to flip a sprite vertically, you'd have to do the following: +#+begin_src ruby + args.outputs.sprites << [0, 0, 100, 100, + 'fighter.png', + 0, + 255, 255, 255, 255, + 0, 0, -1, -1, false, true] +#+end_src + +With the helper method, you can write the following: + +#+begin_src ruby + args.outputs.sprites << create_sprite(x: 0, y: 0, w: 100, h: 100, vflip: true) +#+end_src +We're still chewing on the API above before it gets integrated into GTK proper. +** [API] "Superscript Two" can be used to bring up the DragonRuby Console. People with international keyboards (which don't have a ~ key) can now use the ~superscript_two~ key (which is in the same place as the ~). +** [API] All keyboard attributes now have a ~!~ variant which will clear the key if the value was true. Example: +#+begin_src ruby + args.inputs.keyboard.key_down.up # returns true + args.inputs.keyboard.key_down.up # still returns true +#+end_src + +VS + +#+begin_src ruby + args.inputs.keyboard.key_down.up! # returns true + args.inputs.keyboard.key_down.up # now returns false for the rest of this tick +#+end_src +** [Samples] Added a sample app called "Sprite Animation and Keyboard Input" that shows how to do repeating and one-time sprite animations driven by keyboard input. +** [Samples] All sample apps have the MIT License added to them (to remove any ambiguity with regards to if you can use them for commercial purposes). +** [HTML5] Games published to HTML5 now has a loading progress bar. +** [Samples] Added sample app called "Coordinate Systems" that show the two coordinate systems supported by the GTK. +** [API] ~args.inputs.mouse~ now respects ~args.dragon.origin_center!~. +** [Samples] Added two sample apps called "Collision" and "Collision and Entities" that show how to perform collision detection with draw primitives and ~args.state.new_entity~. +** [Samples] Added an interactive sample app called "Beginner Ruby Primer" that does a better job of introducing you to the language. +** [Samples] [Video] Amir facilitated a workshop at a local user group. The source code for the workshop is located in a sample app called "NDDNUG Workshop". The video was recorded and you can use that to code along: (https://www.youtube.com/watch?v=S3CFce1arC8). +** [Bugfix] Windows and Mac icon generation in dragonruby-publish was broken in the previous build. Sorry! Fixed now. +** [Bugfix] DragonRuby binaries are now codesigned on macOS. We are still working on signing games packaged by dragonruby-publish, but stay tuned! +* release-20190604 +** [BREAKING] ~perc_to_zero~ and ~perc_to_one~ have been deprecated and now throw and informative exception that will help you fix the problem. Moving forward, you'll need to use the new ~lerp~ APIs (details further down). +** [BREAKING] ~intersects_rect?~ now takes in an optional parameter called ~tolerance~. This parameter's default is set to ~0.1~. The original tolerance value was set to ~0~. So if you still want a tolerance of ~0~, you'll need to update your ~intersect_rect?~ calls to: ~intersects_rect?(other_rect, 0)~. +** [IMPORTANT] [API] [Video] A Quake-style Heads Up Display (HUD), has been added. You can access this console by pressing the "~" key. This console can be used to experiment with Ruby, print debug logging, and diagnose errors. Here is Ryan showing the console in action: (https://www.youtube.com/watch?v=hHgV11F2ZPY) +** [IMPORTANT] [API] [Video] Added the ability to create replays so you can do visual regression of your game. Here is this record/replay capability in action: (https://www.youtube.com/watch?v=ev0UMVBe-fY) +#+begin_src ruby + args.dragon.start_recording(RNG_SEED) + args.dragon.stop_recording(filename) + args.dragon.start_replay(filename) + args.dragon.stop_replay +#+end_src +You can record your game on startup using the following command (it'll automatically save when you close the game): +#+begin_src sh + ./dragonruby(.exe) --record +#+end_src +** [API] Rendering primitives now support ~float~ values for position and size. +** [API] [Sample] [Video] Lerping/Easing APIs have been added. There is a sample app that shows all the things you can do with them. For philosophical motivations as to why the APIs look the way they do (and just simply a fantastic presentation), watch this presentation given by Squirrel Esierloh *NO REALLY YOU SHOULD WATCH THIS PRESENTATION*: "Math for Game Programmers: Fast and Funky 1D Nonlinear Transformations" (https://www.youtube.com/watch?v=mr5xkf6zSzk) +** [API] CTAG files now ship with releases. This will let you quickly see the APIs available in DragonRuby GTK. +** [Sample] Added a "prerequisite" sample app that gives you a crash course of Ruby the programming language. +** [Sample] The composition of primitives in DragonRuby GTK are incredibly flexible. A sample app called "Fluid Primitives" has been added to show this flexibility. +** [MacOS] [Linux] [Windows] If your screen resolution is below 720p, the game will start at a smaller (but still aspect-correct) resolution. +** [Sample] Sample added showing ~intersects_rect?~ collision tolerances as a topdown level (similar to what's in Zelda for the NES). +* release-20190516 +** [Community] A big thank you to Nick Culbertson (@mobypixel) for creating the art and music for these games. +** [HTML5] [Demo] [Experimental] Experimental deployment to HTML5 added. You can play the HTML5 version here: (https://dragonruby.itch.io/flappydragon). +** [HTML5] ~dragonruby-httpd~ binary added so that you can test your HTML5 game locally. +** [RaspberryPI] [Video] [Experimental] Experimental support added to Rasberry Pi. You can play DragonRuby GTK games, _develop them and publish them_. Here's a video of Ryan playing Flappy Dragon on his DIY Arcade Machine: (https://www.youtube.com/watch?v=DCvFMKsvG-Q). +** [API] Mouse movement can now be tracked: ~args,inputs.mouse.position~. +** [API] Experimental API added for taking screenshots: ~args.dragon.root.take_screenshot = true~. +** [API] Analog support for controllers added: ~args.inputs.controller_one.left_analog_x_perc~. +** [API] [Experimental] Mouse and keyboard focus status are available for use: +#+begin_src ruby + args.dragon.root.mouse_focus + args.dragon.root.keyboard_focus +#+end_src +** [Samples] Added sample app that shows how to use mouse position. +** [Samples] Flappy Dragon reference implementation significantly polished. +** [Samples] [Demo] Added BASIC Gorillas reference implementation. Playable here: (https://dragonruby.itch.io/basicgorillas). +** [Samples] Added sample app that shows analog controller support in action. The sample also shows how to manipulate a sprite's center of rotation, crop, and horizontal/vertical orientation: +#+begin_src ruby + [ + x, y, w, h, # decimal values (scales implicitly) + path, # string + angle, # in degrees + a, # alpha (0 to 255) + r, g, b, # color *saturation* + source_x, source_y, source_w, source_h, (crop, must be given in original pixels) + flip_h, flip_v, (boolean values) + rotation_anchor_x, rotation_anchor_y (decimal between 0 and 1/ratio from bottom left) + ] +#+end_src +** [API] Added ~args.dragon.calcstringbox(str, size_enum, font)~ function that can be used to calculate the ~rect~ for a string. +* release-20190427 +** [Packaging] [Windows] Packaging Windows builds of your game now sets a proper icon and metadata in the final .exe. +** [API] Keyboard input is improved dramatically, so you can get reasonable key state in your game. +** [Packaging] You can now specify an application icon in your game_metadata.txt file instead of possibly having a second copy of the same file in metadata/icon.png. +** [Sample] [Video] [Demo] Added a full-blown game/reference implementation called ~flappy_dragon~ under the ~samples~ directory. Here's a quick five second video showing the game in action: (https://www.youtube.com/watch?v=ZQYRlVA1ru0). You can play it yourself here: (https://dragonruby.itch.io/flappydragon). +* release-20190422 +** [Packaging] Version.txt file added that shows the GIT commit that was deployed. +** [Packaging] Fixed duplicate "Copying x to y ..." message in ~dragon-publish~. +** [Packaging] Automatically package DragonRuby's font and logo so copying the DragonRuby GTK binary around doesn't cause errors. +** [Linux] [Windows] Line rendering fixes on Linux and Windows. +** [Windows] Bug fix to ~golf_with_musical_note~ (sound tech demo) sample app where sound wouldn't play on Windows. +** [Windows] README.txt file formatting updated so that it looks correct in ~notepad.exe~. +** [Packaging] Default icon added to ~mygame~. +** [Samples] Reworked ~doomwipe~ (render targets tech demo) sample app so that it's less erratic before the effect is revealed. +** [Windows] Fixed bug where rendering would stop on Windows if the screen was resized. +** [Size] Deleted files that don't need to be packaged with DragonRuby GTK. +* release-20190419 +** [IMPORTANT] First release. Hot off the presses. Ready to take over the world! As soon as we fix that one bug. Oh and that one. Oh and that one too. +** [Community] The community forum is here: (https://dragonruby.itch.io/dragonruby-gtk/community). +** [Community] Or you can join the Slack channel at: (http://slack.rubymotion.com/). +** [Community] Ryan (@icculus) and Amir (@amirrajan) are both on Twitter and always happy to help anyone that reaches out to them. diff --git a/deploy_template/CHEATSHEET.txt b/deploy_template/CHEATSHEET.txt deleted file mode 100644 index e35f38f..0000000 --- a/deploy_template/CHEATSHEET.txt +++ /dev/null @@ -1,232 +0,0 @@ -# DragonRuby Game Toolkit Cheatsheet - -A detailed documentation listing is located at -`mygame/documentation`. For real world sample usages of GTK's APIs, -take a look at the `samples` directory. The sample apps are ordered by -beginner to advanced. So look at them in order to get the most out of -them. - -# Minimum Code for Game - -The minimum amount of code required for a game is a file named -`mygame/main.rb` with the following: - -```ruby -def tick args - args.outputs.labels << [640, 360, "Hello World"] -end -``` - -# Args: `args` - -All of GTK's functionality hangs off of `args`. - -## Args' Outputs: `args.outputs` - -All render `primitive`s are accessible under `args.outputs`. - -### Labels: `args.outputs.labels` - -`args.outputs.labels` is used to render labels. - -Labels are how you display text. This code will go directly inside of the `def tick args` method. - -- **Minimum Code** - -```ruby -# X Y TEXT -args.outputs.labels << [640, 360, "I am a black label."] -``` - -- **A Colored Label** - -```ruby -# A colored label -# X Y TEXT, RED GREEN BLUE ALPHA -args.outputs.labels << [640, 360, "I am a redish label.", 255, 128, 128, 255] -``` - -- **Extended Capabilities** - -```ruby -# A colored label -# X Y TEXT SIZE ALIGNMENT RED GREEN BLUE ALPHA FONT FILE -args.outputs.labels << [640, 360, "Hello world", 0, 1, 0, 0, 0, 255, "fonts/coolfont.ttf"] -``` - -A `SIZE` of `0` represents "default size". A negative value will decrease -the label size. A positive value will increase the label's size. - -An `ALIGNMENT` of `0` represents "left aligned". `1` represents "center aligned". `2` represents "right aligned". - -- **Named Parameters/Additional Metadata** - -You can add additional metadata about your game within a label, which requires you to use a `Hash` instead. - -```ruby -args.outputs.labels << { - x: 200, - y: 550, - text: "dragonruby", - size_enum: 2, - alignment_enum: 1, - r: 155, - g: 50, - b: 50, - a: 255, - font: "fonts/manaspc.ttf", - # You can add any properties you like (this will be ignored/won't cause errors) - game_data_one: "Something", - game_data_two: { - value_1: "value", - value_2: "value two", - a_number: 15 - } -} -``` - -- **Getting The Size of a Piece of Text: `args.gtk.calcstringbox`** - -```ruby -def tick args - # local variable - # TEXT SIZE_ENUM FONT - text_size = args.gtk.args.calcstringbox("some string", 0, "font.ttf") - - # print size of a label to screen using Ruby's string formatting capabilities: #{} - args.outputs.labels << [640, 360, "the label's size is: #{text_size.x}, #{text_size.y}, #{text_size.w}, #{text_size.h}"] -end -``` - -### Sprites: `args.outputs.sprites` - -`args.outputs.sprites` is used to render sprites. - -All primitives in GTK have the same considerations as detailed in the Labels section. - -- **Minimum Code** - -```ruby -# X Y WIDTH HEIGHT PATH -args.outputs.sprites << [100, 100, 32, 64, "sprites/player.png"] -``` - -- **Extended Capabilities** - -```ruby -args.outputs.sprites << [ - 100, # X - 100, # Y - 32, # W - 64, # H - "player.png", # PATH - 0, # ANGLE - 255, # ALPHA - 0, # RED_SATURATION - 255, # GREEN_SATURATION - 0, # BLUE_SATURATION - 0, # TILE_X - 0, # TILE_Y - 32, # TILE_W - 32 # TILE_H -] -``` - -- **Named Parameters/Additional Metadata** - -Here are all the properties for `sprites`: - -```ruby -args.outputs.sprites << { - x: 100, - y: 100, - w: 100, - h: 100, - path: "sprites/player.png", - angle: 0, - a, 255 - r: 255, - g: 255, - b: 255, - tile_x: 0, - tile_y: 0, - tile_w: -1, - tile_h: -1, - flip_vertically: false, - flip_horizontally: false, - angle_anchor_x: 0.5, - angle_anchor_y: 1.0 -} -``` - -### Sounds `args.outputs.sounds` - -Sounds that end `.wav` will play once: -`args.outputs.sounds << 'something.wav'`. - -Sounds that end `.ogg` is considered background music and will loop: -`args.outputs.sounds << 'background_music.ogg'`. - -If you want to play a `.ogg` once as if it were a sound effect, you can do: -`args.gtk.queue_sound 'some-ogg.ogg'` - -## Args' State `args.state` - -`args.state` is where you can put all of your game state. - -- **Tick Count `args.state.tick_count`** - -GTK has a fixed time step of 60 frames per second. You can access the current `tick_count` using `args.state.tick_count`: - -```ruby -def tick args - # Render a label showing the current tick_count. - args.outputs.labels << [360, 640, args.state.tick_count] -end -``` - -- **Working With "Open" Game State** - -`args.state` is a "open" data structure that allows you to define -properties of any structure. You don't need to define any kind of -`class`. - -To initialize your game state, use the `||=` operator. Any value on -the right side of `||=` will only be assigned `once`. - -To assign a value every frame, just use the `=` operator, but _make -sure_ you've initalized a default value. - -```ruby -def tick args - # initialize your game state ONCE - args.player.x ||= 0 - args.player.y ||= 0 - args.player.hp ||= 100 - - # increment the x position of the character by one every frame - args.player.x += 1 - - # Render a sprite with a label above the sprite - - # X Y W H PATH - args.outputs.sprites << [args.player.x, args.player.y, 32, 32 "player.png"] - - # X Y TEXT - args.outputs.labels << [args.player.x, args.player.y - 50, args.player.hp] -end -``` - -## Args' Inputs: `args.inputs` - -# Numeric - -## Numeric#elapsed? - -Returns true if a numeric value plus an offset represents a point -in time that has elapsed. This is related to args.state.tick_count. - -``` -args.state.attacked_at ||= args.state.tick_count -puts args.state.attacked_at.elapsed? 60 # will print false after one second. -``` diff --git a/deploy_template/README-raspberrypi.txt b/deploy_template/README-raspberrypi.txt deleted file mode 100644 index 4f7b5ab..0000000 --- a/deploy_template/README-raspberrypi.txt +++ /dev/null @@ -1,33 +0,0 @@ -We have only tested DragonRuby on a Raspberry Pi 3, Models B and B+, but we -believe it _should_ work on any model, including the Pi Zero. - -If you're running DragonRuby Game Toolkit on a Raspberry Pi, or trying to run -a game made with the Toolkit on a Raspberry Pi, and it's really really slow-- -like one frame every few seconds--then there's likely a simple fix. - -You're proabably running a desktop environment: menus, apps, web browsers, -etc. This is okay! Launch the terminal app and type: - - sudo raspi-config - -It'll ask you for your password (if you don't know, try "raspberry"), and then -give you a menu of options. Find your way to "Advanced Options", then "GL -Driver", and change this to "GL (Full KMS)" ... not "fake KMS," which is -also listed there. Save and reboot. In theory, this should fix the problem. - -If you're _still_ having problems and have a Raspberry Pi 2 or better, go back -to raspi-config and head over to "Advanced Options", "Memory split," and give -the GPU 256 megabytes. You might be able to avoid this for simple games, as -this takes RAM away from the system and reserves it for graphics. You can -also try 128 megabytes as a gentler option. - - -Note that you can also run DragonRuby without X11 at all: if you run it from -a virtual terminal it will render fullscreen and won't need the "Full KMS" -option. This might be attractive if you want to use it as a game console -sort of thing, or develop over ssh, or launch it from RetroPie, etc. - -If you have questions or problems, please let us know! You can find us on -the forums at https://dragonruby.itch.io/dragonruby-gtk or our Discord channel -at https://discord.dragonruby.org/ ... - diff --git a/deploy_template/README.txt b/deploy_template/README.txt deleted file mode 100644 index 2d00b4c..0000000 --- a/deploy_template/README.txt +++ /dev/null @@ -1,369 +0,0 @@ -* Introduction - - Hello world! Do the things in this README file and you'll be well on your way to - building video games! - -* Join the community! - - Those who use DragonRuby are called Dragon Riders. This identity is - incredibly important to us. When someone asks you: - - > What game engine do you use? - - You can proudly reply with: - - > I am a Dragon Rider. - -** Subscribe to the News Letter - - The News Letter will keep you in the loop with regards to - http://dragonrubydispatch.com/ - -** Join the Discord - - Amir (one of the creators of DragonRuby) is always available to help - you out. So take the time to join the community Discord. The invite linke is located at: - - DragonRuby Discord: http://discord.dragonruby.org - -** Introduce Yourself on the Forums - - Take a moment to introducing yourself on the community forum: - - Stickied Community Post: https://itch.io/t/526689/dragonruby-gtk-discord-server-created-join-it-dammit - - This provides community members a registry of everyone using - DragonRuby. Itch.io holds a lot of game jams, and it'd be awesome if - Dragon Riders had a central place to find each other. - -* Determine how you want to start learning based on your experience level! - - Follows are sections pertaining to your experience level as a - programer and experience level with coding in a dynamic language. - -** If you have zero experience with programming. - - If you have no programing experience at all. You'll want to take the - time to see what DragonRuby is like before jumping in to code. Watch - the following videos in order (each one is only ~20 minutes long). - - Don't attempt to code anything shown in the video yet, just watch them to - get familiar with the language and how games are built. - - 1. Beginner Introduction to Ruby: https://www.youtube.com/watch?v=ixw7TJhU08E - 2. Intermediate Introduction to Ruby Syntax: https://www.youtube.com/watch?v=HG-XRZ5Ppgc - 3. Intermediate Introduction to Arrays in Ruby: https://www.youtube.com/watch?v=N72sEYFRqfo - - Once you have watched all the videos. Then (and only then) go back - through the videos and follow along. Here are the locations for the - samples: - - 1. Beginner Introduction to Ruby: samples/00_beginner_ruby_primer - 2. Intermediate Tutorials: samples/00_intermediate_ruby_primer - -** If you do not know Ruby, but have experience with C# (Unity) or GML (GameMaker) - - Those engines rot your brain. Forget the concepts that the forced you - to learn. Game development is so much simpler than what they make you - do. Please, try your best to set aside the concepts those engines - teach (we promise our approach to game development is much much easier). - - Watch these videos to get familiar with the Ruby language and - programming environment (they are ~20 min each so it'll be quick): - - 1. Beginner Introduction to Ruby: https://www.youtube.com/watch?v=ixw7TJhU08E - 2. Intermediate Introduction to Ruby Syntax: https://www.youtube.com/watch?v=HG-XRZ5Ppgc - 3. Intermediate Introduction to Arrays in Ruby: https://www.youtube.com/watch?v=N72sEYFRqfo - - You may also want to try this free course provided at http://dragonruby.school. - - After you've watch the videos, you'll be ready to go to the next section. - -** You are a dev that is familiar with a dynamically typed language (Ruby, Lua, Python, or JavaScript). - -*** STEP 1: Work through this Hello World tutorial - - This tutorial is provided by Ryan C Gordon (check out his wikipedia - page). We call him "The Juggernaut": - - Welcome! - - Here's just a little push to get you started if you're new to programming or - game development. - - If you want to write a game, it's no different than writing any other - program for any other framework: there are a few simple rules that might be - new to you, but more or less programming is programming no matter what you - are building. - - Did you not know that? Did you think you couldn't write a game because you're - a "web guy" or you're writing Java at a desk job? Stop letting people tell - you that you can't, because you already have everything you need. - - Here, we're going to be programming in a language called "Ruby." In the - interest of full disclosure, I (Ryan "The Juggernaut" Gordon) wrote the C - parts of this toolkit and Ruby looks a little strange to me (Amir Rajan wrote the - Ruby parts), but I'm going to walk you through the basics because we're all - learning together, and if you mostly think of yourself as someone that writes - C (or C++, C#, Objective-C), PHP, or Java, then you're only a step behind me right now. - - Here's the most important thing you should know: Ruby lets you do some - complicated things really easily, and you can learn that stuff later. I'm - going to show you one or two cool tricks, but that's all. - - Do you know what an if statement is? A for-loop? An array? That's all you'll - need to start. - - Ok, here are few rules with regards to game development with GTK: - - - Your game is all going to happen under one function... - - ...that runs 60 times a second... - - ...and has to tell the computer what to draw each time. - - That's an entire video game in one run-on sentence. - - Here's that function. You're going to want to put this in mygame/app/main.rb, - because that's where we'll look for it by default. Load it up in your favorite - text editor. - - #+begin_src ruby - def tick args - args.outputs.labels << [ 580, 400, 'Hello World!' ] - end - #+end_src - - Now run `dragonruby` ...did you get a window with "Hello World!" written in - it? Good, you're officially a game developer! - - `mygame/app/main.rb`, is where the Ruby source code is located. This looks a little strange, so - I'll break it down line by line. In Ruby, a '#' character starts a single-line - comment, so I'll talk about this inline. - - #+begin_src ruby - - # This "def"ines a function, named "tick," which takes a single argument - # named "args". DragonRuby looks for this function and calls it every - # frame, 60 times a second. "args" is a magic structure with lots of - # information in it. You can set variables in there for your own game state, - # and every frame it will updated if keys are pressed, joysticks moved, - # mice clicked, etc. - def tick args - - # One of the things in "args" is the "outputs" object that your game uses - # to draw things. Afraid of rendering APIs? No problem. In DragonRuby, - # you use arrays to draw things and we figure out the details. - # If you want to draw text on the screen, you give it an array (the thing - # in the [ brackets ]), with an X and Y coordinate and the text to draw. - # The "<<" thing says "append this array onto the list of them at - # args.outputs.labels) - args.outputs.labels << [ 580, 400, 'Hello World!' ] - end - - #+end_src - - Once your `tick` function finishes, we look at all the arrays you made and - figure out how to draw it. You don't need to know about graphics APIs. - You're just setting up some arrays! DragonRuby clears out these arrays - every frame, so you just need to add what you need _right now_ each time. - - Now let's spice this up a little. - - We're going to add some graphics. Each 2D image in DragonRuby is called a - "sprite," and to use them, you just make sure they exist in a reasonable file - format (png, jpg, gif, bmp, etc) and specify them by filename. The first time - you use one, DragonRuby will load it and keep it in video memory for fast - access in the future. If you use a filename that doesn't exist, you get a fun - checkerboard pattern! - - There's a "dragonruby.png" file included, just to get you started. Let's have - it draw every frame with our text: - - #+begin_src ruby - - def tick args - args.outputs.labels << [ 580, 400, 'Hello World!' ] - args.outputs.sprites << [ 576, 100, 128, 101, 'dragonruby.png' ] - end - - #+end_src - - (ProTip: you don't have to restart DragonRuby to test your changes; when you - save main.rb, DragonRuby will notice and reload your program.) - - That `.sprites` line says "add a sprite to the list of sprites we're drawing, - and draw it at position (576, 100) at a size of 128x101 pixels". You can - find the image to draw at dragonruby.png. - - Quick note about coordinates: (0, 0) is the bottom left corner of the screen, - and positive numbers go up and to the right. This is more "geometrically - correct," even if it's not how you remember doing 2D graphics, but we chose - this for a simpler reason: when you're making Super Mario Brothers and you - want Mario to jump, you should be able to add to Mario's y position as he - goes up and subtract as he falls. It makes things easier to understand. - - Also: your game screen is _always_ 1280x720 pixels. If you resize the window, - we will scale and letterbox everything appropriately, so you never have to - worry about different resolutions. - - Ok, now we have an image on the screen, let's animate it: - - #+begin_src ruby - - def tick args - args.state.rotation ||= 0 - args.outputs.labels << [ 580, 400, 'Hello World!' ] - args.outputs.sprites << [ 576, 100, 128, 101, 'dragonruby.png', args.state.rotation ] - args.state.rotation -= 1 - end - - #+end_src - - Now you can see that this function is getting called a lot! - - Here's a fun Ruby thing: `args.state.rotation ||= 0` is shorthand for "if - args.state.rotation isn't initialized, set it to zero." It's a nice way to - embed your initialization code right next to where you need the variable. - - `args.state` is a place you can hang your own data and have it survive past the - life of the function call. In this case, the current rotation of our sprite, - which is happily spinning at 60 frames per second. If you don't specify - rotation (or alpha, or color modulation, or a source rectangle, etc), - DragonRuby picks a reasonable default, and the array is ordered by the most - likely things you need to tell us: position, size, name. - - One thing we decided to do in DragonRuby is not make you worry about delta - time: your function runs at 60 frames per second (about 16 milliseconds) and - that's that. Having to worry about framerate is something massive triple-AAA - games do, but for fun little 2D games? You'd have to work really hard to not - hit 60fps. All your drawing is happening on a GPU designed to run Fortnite - quickly; it can definitely handle this. - - Since we didn't make you worry about delta time, you can just move the - rotation by 1 every time and it works without you having to keep track of - time and math. Want it to move faster? Subtract 2. - - Now, let's move that image around. - - #+begin_src ruby - - def tick args - args.state.rotation ||= 0 - args.state.x ||= 576 - args.state.y ||= 100 - - if args.inputs.mouse.click - args.state.x = args.inputs.mouse.click.point.x - 64 - args.state.y = args.inputs.mouse.click.point.y - 50 - end - - args.outputs.labels << [ 580, 400, 'Hello World!' ] - args.outputs.sprites << [ args.state.x, args.state.y, 128, 101, 'dragonruby.png', args.state.rotation ] - - args.state.rotation -= 1 - end - - #+end_src - - Everywhere you click your mouse, the image moves there. We set a default - location for it with args.state.x ||= 576, and then we change those variables - when we see the mouse button in action. You can get at the keyboard and game - controllers in similar ways. - - There is a lot more you can do with DragonRuby, but now you've already got - just about everything you need to make a simple game. After all, even the - most fancy games are just creating objects and moving them around. Experiment - a little. Add a few more things and have them interact in small ways. Want - something to go away? Just don't add it to args.output anymore. - -*** STEP 2: Read the CHEATSHEET.txt - - Go to the file CHEATSHEET.txt and skim through it quickly to get a - feel for some of the other APIs you have access to. If you need even - more details you'll find them at `mygame/documentation`. - -*** STEP 3: Run each sample app in order and read the code. - - The sample apps located in the `sample` directory are ordered by - increasing complexity. Run each one of them and read through the - code. Play around by changing values and see how they change the game. - -*** STEP 4: Editor integration. - - There is a file called `vim-ctags` and `emacs-ctags`. The data in - these files are standard output provided by Exuberent CTAGS. Most - editors have a "ctags plugin" so just search for that plugin for your - editor and point it to these files. - -*** STEP 5: Get in the habit of reading the CHANGELOG - - We are constantly adding new features to the engine. Be sure to read - the changelog with every release. - -* How to publish your game. - - Once you've built your game, you're all set to deploy! Good luck in - your game dev journey and if you get stuck, come to the Discord - channel! - -** STEP 1: Create a new Game in Itch.io. - - Log into Itch.io and go to https://itch.io/game/new. - - - Title: Give your game a Title. This value represents your `gametitle`. - - Project URL: Set your project url. This value represents your `gameid`. - - Classification: Keep this as Game. - - Kind of Project: Select HTML from the drop down list. Dont worry, - the HTML project type _aslo supports binary downloads_. - - Uploads: Skip this section for now. - - Embed Options: Set the dropdown value to "Click to launch in fullscreen". - DO NOT use the Embed in page option. iFrames are not reliable with - regards to capturing input. - - You can fill out all the other options later. - -** STEP 2: Go to mygame/metadata/metadata.txt and update it. - - Point your text editor at mygame/metadata/game_metadata.txt and - make it look like this: (Remove the `#` at the beginning of each line). - - #+begin_src text - devid=bob - devtitle=Bob The Game Developer - gameid=mygame - gametitle=My Game - version=0.1 - #+end_src - - The `devid` property is the username you use to log into Itch.io. - The `devtitle` is your name or company name (it can contain spaces). - The `gameid` is the Project URL value (see details in STEP 1). - The `gametitle` is the name of your game (it can contain spaces). - The `version` can be any `major.minor` number format. - -** STEP 3: Build your game for distribution. - - Open up the terminal and run this from the command line: - - #+begin_src sh - ./dragonruby-publish --only-package mygame - #+end_src - - (if you're on Windows, don't put the "./" on the front. That's a Mac and - Linux thing.) - - A directory called `./build` will be created that contains your - binaries. You can upload this to Itch.io manually. For the HTML - version of your game after you upload it. Check the checkbox labeled - "This file will be played in the browser". - - For subsequent updates you can use an automated deployment to Itch.io: - - #+begin_src sh - ./dragonruby-publish mygame - #+end_src - - DragonRuby will package _and publish_ your game to itch.io! Tell your - friends to go to your game's very own webpage and buy it! - - If you make changes to your game, just re-run dragonruby-publish and it'll - update the downloads for you. diff --git a/deploy_template/mygame/app/main.rb b/deploy_template/mygame/app/main.rb index 5683cc2..0ebdc6b 100644 --- a/deploy_template/mygame/app/main.rb +++ b/deploy_template/mygame/app/main.rb @@ -1,5 +1,6 @@ def tick args - args.outputs.labels << [ 580, 500, 'Hello World!' ] - args.outputs.labels << [ 640, 460, 'Go to docs/docs.html and read it!', 5, 1 ] - args.outputs.sprites << [ 576, 310, 128, 101, 'dragonruby.png' ] + args.outputs.labels << [640, 500, 'Hello World!', 5, 1] + args.outputs.labels << [640, 460, 'Go to docs/docs.html and read it!', 5, 1] + args.outputs.labels << [640, 420, 'Join the Discord! http://discord.dragonruby.org', 5, 1] + args.outputs.sprites << [576, 280, 128, 101, 'dragonruby.png'] end diff --git a/deploy_template/mygame/data/.gitkeep b/deploy_template/mygame/data/.gitkeep new file mode 100644 index 0000000..c1ffee3 --- /dev/null +++ b/deploy_template/mygame/data/.gitkeep @@ -0,0 +1 @@ +Put level data and other txt files here. \ No newline at end of file diff --git a/deploy_template/mygame/documentation/01-high-level.md b/deploy_template/mygame/documentation/01-high-level.md deleted file mode 100644 index 7206d8d..0000000 --- a/deploy_template/mygame/documentation/01-high-level.md +++ /dev/null @@ -1,31 +0,0 @@ -# General Stuff - -- You have 1280x720 pixels to work with. The bottom left corner is 0, 0 - with X increasing going right, and Y increasing going up. -- The game is on a fixed 60 fps cycle (no delta time needed). -- Come to the Discord if you need help: http://discord.dragonruby.org -- Going through all the sample apps is a REALLY GOOD IDEA. Most sample apps - contain a recorded replay/demo. So just double click `watch-recording` to - see a full presentation of the sample. - -# Entry Point - -For all the examples in the other documentation files. It's assumed they -are being placed into the follow code block: - -``` -# Entry point placed in main.rb -def tick args - args.outputs.labels << [100, 100, 'hello world'] -end -``` - -# New to Ruby - -If you are a complete beginner and have never coded before: - -1. Run the 00_beginner_ruby_primer sample app and work through it. - Video walkthrough: https://s3.amazonaws.com/s3.dragonruby.org/dragonruby-gtk-primer.mp4 -2. Read all the code in the 00_intermediate_ruby_primer sample app. - Video walkthrough: https://s3.amazonaws.com/s3.dragonruby.org/dragonruby-gtk-intermediate.mp4 -3. There is also a free course you can sign up for at http://dragonruby.school diff --git a/deploy_template/mygame/documentation/02-labels.md b/deploy_template/mygame/documentation/02-labels.md deleted file mode 100644 index 8cfa35e..0000000 --- a/deploy_template/mygame/documentation/02-labels.md +++ /dev/null @@ -1,132 +0,0 @@ -# Labels - -Labels display text. - -## Sample Apps Related to Label Usage (ordered by size of codebase increasing) - -- 01_api_01_labels -- 01_api_99_tech_demo (includes recording) -- 10_save_load_game (includes recording) -- 18_moddable_game -- 19_lowrez_jam_01_hello_world -- 99_sample_game_return_of_serenity - -## Minimum Code - -Creates a label with black text at location 100, 100. - -```ruby -# X Y TEXT -args.outputs.labels << [100, 100, "Hello world"] -``` - -## Font Size - -The size can be a number between `-10` and `+10`. The default size is `0`. - -```ruby -# X Y TEXT SIZE -args.outputs.labels << [100, 100, "Hello world", 5] -``` - -## Alignment - -Alignment values are `0` (left, default), `1` (center), and `2` -(right). The value must come after the size. - -A label smack dab in the center of the screen, with a center alignment: - -```ruby -# X Y TEXT SIZE ALIGNMENT -args.outputs.labels << [640, 360, "Hello world", 0, 1] -``` - -## RGBA - Colors and Alpha - -Labels can have colors. The value for the color is a number between -`0` and `255`. - -A green label with 50% opacity. - -```ruby -# X Y TEXT RED GREEN BLUE ALPHA -args.outputs.labels << [640, 360, "Hello world", 0, 255, 0, 128] -``` - -A green label with size and alignment. - -```ruby -# X Y TEXT SIZE ALIGNMENT RED GREEN BLUE ALPHA -args.outputs.labels << [640, 360, "Hello world", 0, 1, 0, 255, 0, 128] -``` - -## Custom Font - -You can override the font for a label. The font needs to be under the -`mygame` directory. It's recommended that you create a `fonts` folder -to keep things organized. - -Here is how you create a label with a font named `coolfont.ttf` under a directory `mygame/fonts`. - -```ruby -# X Y TEXT SIZE ALIGNMENT RED GREEN BLUE ALPHA FONT FILE -args.outputs.labels << [640, 360, "Hello world", 0, 1, 0, 0, 0, 255, "fonts/coolfont.ttf"] -``` - -## Hashes (Advanced) - -If you want a more readable invocation. You can use the following hash to create a label. -Any parameters that are not specified will be given a default value. The keys of the hash can -be provided in any order. - -Here is how you create a green label with a font named `coolfont.ttf` under a directory `mygame/fonts` -using the helper method (providing all the parameters). - -```ruby -args.outputs.labels << { - x: 200, - y: 550, - text: "dragonruby", - size_enum: 2, - alignment_enum: 1, - r: 155, - g: 50, - b: 50, - a: 255, - font: "fonts/manaspc.ttf" -} -``` - -## Duck Typing (Advanced) - -You can also create a class with line properties and render it as a primitive. -ALL properties must be on the class. ADDITIONALLY, a method called -`primitive_marker` must be defined on the class. - -Here is an example: - -```ruby -# Create type with ALL sprite properties AND primitive_marker -class Label - attr_accessor :x, :y, :text, :size_enum, :alignment_enum, :font, :r, :g, :b, :a - - def primitive_marker - :label - end -end - -# Inherit from type -class TitleLabel < Label - - # constructor - def initialize x, y, text - self.x = x - self.y = y - self.text = text - end -end - -# render layer label - -args.outputs.label << TitleLabel.new(10, 10, "The Game") -``` diff --git a/deploy_template/mygame/documentation/03-solids-and-borders.md b/deploy_template/mygame/documentation/03-solids-and-borders.md deleted file mode 100644 index fb51e3a..0000000 --- a/deploy_template/mygame/documentation/03-solids-and-borders.md +++ /dev/null @@ -1,126 +0,0 @@ -# Solids and Borders - -Solids and Borders are great to use as place holders for sprites. - -## Sample Apps Related to Solid/Borders Usage (ordered by size of codebase increasing) - -- 01_api_03_rects -- 01_api_99_tech_demo (includes recording) -- 02_collisions -- 12_top_down_area (includes recording) -- 99_sample_game_flappy_dragon (includes recording) -- 08_platformer_collisions -- 20_roguelike_starting_point -- 99_sample_game_pong (includes recording) - -## Minimum Code - -Creates a solid black rectangle located at 100, 100. 160 pixels -wide and 90 pixels tall. - -```ruby -# X Y WIDTH HEIGHT -args.outputs.solids << [100, 100, 160, 90] -``` - -Creates an unfilled black-bordered rectangle located at 100, 100. -160 pixels wide and 90 pixels tall. - -```ruby -# X Y WIDTH HEIGHT -args.outputs.borders << [100, 100, 160, 90] -``` - -## RGBA - Colors and Alpha - -The value for the color and alpha is a number between `0` and `255`. The -alpha property is optional and will be set to `255` if not specified. - -Creates a green solid rectangle with an opacity of 50%. - -```ruby -# X Y WIDTH HEIGHT RED GREEN BLUE ALPHA -args.outputs.solids << [100, 100, 160, 90, 0, 255, 0, 128] -``` - -Creates an unfilled green-bordered rectangle located at 100, 100. -160 pixels wide and 90 pixels tall and an opacity of 50%. - -```ruby -# X Y WIDTH HEIGHT RED GREEN BLUE ALPHA -args.outputs.borders << [100, 100, 160, 90, 0, 255, 0, 128] -``` - -Creates a solid gray rectangle that covers the entire scene. Like a background. -The opacity is excluded because it's 100% opaque (which has a value of 255). - -```ruby -# X Y WIDTH HEIGHT RED GREEN BLUE -args.outputs.solids << [ 0, 0, 1280, 720, 128, 128, 128] -``` - -## Hash (Advanced) - -If you want a more readable invocation. You can use the following hash to create a solid. -Any parameters that are not specified will be given a default value. The keys of the hash can -be provided in any order. - -```ruby -args.outputs.solids << { - x: 0, - y: 0, - w: 100, - h: 100, - r: 0, - g: 255, - b: 0, - a: 255 -} - - -args.outputs.borders << { - x: 0, - y: 0, - w: 100, - h: 100, - r: 0, - g: 255, - b: 0, - a: 255 -} -``` - -## Duck Typing (Advanced) - -You can also create a class with solid/border properties and render it as a primitive. -ALL properties must be on the class. ADDITIONALLY, a method called `primitive_marker` -must be defined on the class. - -Here is an example: - -```ruby -# Create type with ALL solid/border properties AND primitive_marker -class Solid (or Border) - attr_accessor :x, :y, :w, :h, :r, :g, :b, :a_x - - def primitive_marker - :solid (or :border) - end -end - -# Inherit from type -class Square < Solid (or Border) - # constructor - def initialize x, y, size - self.x = x - self.y = y - self.w = size - self.h = size - end -end - -# render solid/border - -args.outputs.solids << Square.new(10, 10, 32) -args.outputs.borders << Square.new(10, 10, 32) -``` diff --git a/deploy_template/mygame/documentation/04-lines.md b/deploy_template/mygame/documentation/04-lines.md deleted file mode 100644 index 20faa44..0000000 --- a/deploy_template/mygame/documentation/04-lines.md +++ /dev/null @@ -1,108 +0,0 @@ -# Lines - -Lines are 1 pixel wide and can be diagonal. - -## Sample Apps Related to Line Usage (ordered by size of codebase increasing) - -- 01_api_02_lines -- 01_api_99_tech_demo (includes recording) -- 06_coordinate_systems (includes recording) -- 19_lowrez_jam_01_hello_world -- 99_sample_game_pong (includes recording) - -## Minimum Code - -Creates a black line from the bottom left corner to the top right corner. - -```ruby -# X1 Y1 X2 Y2 -args.outputs.lines << [ 0, 0, 1280, 720] -``` - -Creates a black vertical line through the center of the scene. - -```ruby -# X1 Y1 X2 Y2 -args.outputs.lines << [ 640, 0, 640, 720] -``` - -Creates a black horizontal line through the center of the scene. - -```ruby -# X1 Y1 X2 Y2 -args.outputs.lines << [ 0, 360, 1280, 360] -``` - -## RGBA - Colors and Alpha - -The value for the color and alpha is a number between `0` and `255`. The -alpha property is optional and will be set to `255` if not specified. - -Creates a green horizontal line through the center of the scene with an opacity of 50%. - -```ruby -# X1 Y1 X2 Y2 RED GREEN BLUE ALPHA -args.outputs.lines << [ 0, 360, 1280, 360, 0, 255, 0, 128] -``` - -Creates a green vertical line through the center of the scene. -The opacity is excluded because it's 100% opaque (which has a value of 255). - -```ruby -# X1 Y1 X2 Y2 RED GREEN BLUE -args.outputs.lines << [ 640, 0, 640, 720, 0, 255, 0] -``` - -## Hash (Advanced) - -If you want a more readable invocation. You can use the following hash to create a line. -Any parameters that are not specified will be given a default value. The keys of the hash can -be provided in any order. - -```ruby -args.outputs.lines << { - x: 0, - y: 0, - x2: 1280, - y2: 720, - r: 0, - g: 255, - b: 0, - a: 255 -} -``` - -## Duck Typing (Advanced) - -You can also create a class with line properties and render it as a primitive. -ALL properties must be on the class. ADDITIONALLY, a method called `primitive_marker` -must be defined on the class. - -Here is an example: - -```ruby -# Create type with ALL line properties AND primitive_marker -class Line - attr_accessor :x, :y, :x2, :y2, :r, :g, :b, :a - - def primitive_marker - :line - end -end - -# Inherit from type -class VerticalLine < Line - - # constructor - def initialize x, y, h - self.x = x - self.y = y - self.x2 = x - self.y2 = y + h - end -end - -# render line - -args.outputs.lines << VerticalLine.new(10, 10, 100) -``` diff --git a/deploy_template/mygame/documentation/05-sprites.md b/deploy_template/mygame/documentation/05-sprites.md deleted file mode 100644 index 973ff29..0000000 --- a/deploy_template/mygame/documentation/05-sprites.md +++ /dev/null @@ -1,239 +0,0 @@ -# Sprites - -Sprites are the most important visual component of a game. - -## Sample Apps Related to Sprite Usage (ordered by size of codebase increasing) - -- 01_api_04_sprites -- 01_api_99_tech_demo (includes recording) -- 02_sprite_animation_and_keyboard_input (includes recording) -- 08_platformer_collisions_metroidvania -- 09_controller_analog_usage_advanced_sprites -- 99_sample_game_basic_gorillas (includes recording) -- 99_sample_game_dueling_starships (includes recording) -- 99_sample_game_flappy_dragon (includes recording) -- 99_sample_game_return_of_serenity - -## Minimum Code - -Sprites need to be under the `mygame` directory. It's recommended that you create a `sprites` folder -to keep things organized. All sprites must be `.png` files - -Here is how you create an sprite with located at 100, 100, that is 32 pixels wide and 64 pixels tall. -In this example the sprite name is `player.png` and is located under a directory `mygame/sprites`. - -```ruby -# X Y WIDTH HEIGHT PATH -args.outputs.sprites << [100, 100, 32, 64, "sprites/player.png"] -``` - -## Rotation / Angle - -Unlike `solids` and `borders`, sprites can be rotated. This is how you rotate a sprite 90 degrees. - -Note: All angles in DragonRuby Game Toolkit are represented in degrees (not radians). - -```ruby -# X Y WIDTH HEIGHT PATH ANGLE -args.outputs.sprites << [100, 100, 32, 64, "sprites/player.png", 90] -``` - -## Alpha - -Sprites can also have a transparency associated with them. The transparency value must come after -the angle value and supports a number between 0 and 255. - -This is how you would define a sprite with no rotation, and a 50% transparency. - -```ruby -# X Y WIDTH HEIGHT PATH ANGLE ALPHA -args.outputs.sprites << [100, 100, 32, 64, "sprites/player.png", 0, 128] -``` - -## Color Saturations - -A Sprite's color levels can be changed. The color saturations must come after `angle` and -`alpha` values. - -This is a sprite with no rotation, fully opaque, and with a green tint. - -```ruby -args.outputs.sprites << [100, # X - 100, # Y - 32, # W - 64, # H - "sprites/player.png", # PATH - 0, # ANGLE - 255, # ALPHA - 0, # RED_SATURATION - 255, # GREEN_SATURATION - 0] # BLUE_SATURATION -``` - -## Sprite Sub Division / Tile - -You can render a portion of a sprite (a tile). The sub division of the sprite is denoted as a rectangle -directly related to the original size of the png. - -This is a sprite scaled to 100 pixels where the source "tile" is located at the bottom left corner -within a 32 pixel square. The angle, opacity, and color levels of the tile are unaltered. - -```ruby -args.outputs.sprites << [ 100, # X - 100, # Y - 32, # W - 64, # H - "sprites/player.png", # PATH - 0, # ANGLE - 255, # ALPHA - 0, # RED_SATURATION - 255, # GREEN_SATURATION - 0, # BLUE_SATURATION - 0, # TILE_X - 0, # TILE_Y - 32, # TILE_W - 32] # TILE_H -``` - -## Flipping a Sprite Horizontally and Vertically - -A sprite can be flipped horizontally and vertically. - -This is a sprite that has been flipped horizontally. The sprite's angle, alpha, color saturations, -and tile subdivision are unaltered. - -```ruby -args.outputs.sprites << [ 100, # X - 100, # Y - 32, # W - 64, # H - "sprites/player.png", # PATH - 0, # ANGLE - 255, # ALPHA - 0, # RED_SATURATION - 255, # GREEN_SATURATION - 0, # BLUE_SATURATION - 0, # TILE_X - 0, # TILE_Y - 32, # TILE_W - 32, # TILE_H - true, # FLIP_HORIZONTALLY - false] # FLIP_VERTICALLY -``` - -This is a sprite that has been flipped vertically. The sprite's angle, alpha, color saturations, -and tile subdivision are unaltered. - -```ruby -args.outputs.sprites << [ 100, # X - 100, # Y - 32, # W - 64, # H - "sprites/player.png", # PATH - 0, # ANGLE - 255, # ALPHA - 0, # RED_SATURATION - 255, # GREEN_SATURATION - 0, # BLUE_SATURATION - 0, # TILE_X - 0, # TILE_Y - 32, # TILE_W - 32, # TILE_H - false, # FLIP_HORIZONTALLY - true] # FLIP_VERTICALLY -``` - -## Rotation Center - -A sprites center of rotation can be altered. - -This is a sprite that has its rotation center set to the top-middle. The sprite's angle, alpha, color saturations, -tile subdivision, and projections are unaltered. - -```ruby -args.outputs.sprites << [ 100, # X - 100, # Y - 32, # W - 64, # H - "sprites/player.png", # PATH - 0, # ANGLE - 255, # ALPHA - 255, # RED_SATURATION - 255, # GREEN_SATURATION - 0, # BLUE_SATURATION - 0, # TILE_X - 0, # TILE_Y - -1, # TILE_W - -1, # TILE_H - false, # FLIP_HORIZONTALLY - false, # FLIP_VERTICALLY - 0.5, # ANGLE_ANCHOR_X - 1.0] # ANCHOR_Y -``` - -## Hash (Advanced) - -If you want a more readable invocation. You can use the following hash to create a sprite. -Any parameters that are not specified will be given a default value. The keys of the hash can -be provided in any order. - -```ruby -args.outputs.sprites << { - x: 100, - y: 100, - w: 100, - h: 100, - path: "sprites/player.png", - angle: 0, - a, 255 - r: 255, - g: 255, - b: 255, - tile_x: 0, - tile_y: 0, - tile_w: -1, - tile_h: -1, - flip_vertically: false, - flip_horizontally: false, - angle_anchor_x: 0.5, - angle_anchor_y: 1.0 -} -``` - -## Duck Typing (Advanced) - -You can also create a class with sprite properties and render it as a primitive. -ALL properties must be on the class. ADDITIONALLY, a method called `primitive_marker` -must be defined on the class. - -Here is an example: - -```ruby -# Create type with ALL sprite properties AND primitive_marker -class Sprite - attr_accessor :x, :y, :w, :h, :path, :angle, :a, :r, :g, :b, :tile_x, - :tile_y, :tile_w, :tile_h, :flip_horizontally, - :flip_vertically, :angle_anchor_x, :angle_anchor_y - - def primitive_marker - :sprite - end -end - -# Inherit from type -class PlayerSprite < Sprite - - # constructor - def initialize x, y, w, h - self.x = x - self.y = y - self.w = w - self.h = h - self.path = 'sprites/player.png' - end -end - -#render player sprite - -args.outputs.sprites << PlayerSprite.new(10, 10, 32, 64) -``` diff --git a/deploy_template/mygame/documentation/06-keyboard.md b/deploy_template/mygame/documentation/06-keyboard.md deleted file mode 100644 index e226d16..0000000 --- a/deploy_template/mygame/documentation/06-keyboard.md +++ /dev/null @@ -1,150 +0,0 @@ -# Keyboard - -Determining if `a` key is in the down state (pressed). This happens once each time the key is pressed: - -``` -if args.inputs.keyboard.key_down.a - puts 'The key is pressed' -end -``` - -Determining if a key is being held. This happens every tick while the key is held down: - -``` -if args.inputs.keyboard.key_held.a - puts 'The key is being held' -end -``` - -Determining if a key is in the down state or is being held: - -``` -if args.inputs.keyboard.a - puts 'The key is pressed or being held' -end -``` - -Determining if a key is in the up state (released). This happens once each time the key is released: - -``` -if args.inputs.keyboard.key_up.a - puts 'The key is released' -end -``` - -# Truthy Keys - -You can access all triggered keys through `truthy_keys` on `keyboard`, `controller_one`, and `controller_two`. - -This is how you would right all keys to a file. The game must be in the foreground and have focus for this data -to be recorded. - -``` -def tick args - [ - [args.inputs.keyboard, :keyboard], - [args.inputs.controller_one, :controller_one], - [args.inputs.controller_two, :controller_two] - ].each do |input, name| - if input.key_down.truthy_keys.length > 0 - args.gtk.write_file("mygame/app/#{name}_key_down_#{args.state.tick_count}", input.key_down.truthy_keys.to_s) - end - end -end -``` - -# List of keys: - -These are the character and associated properties that will -be set to true. - -For example `A => :a, :shift` means that `args.inputs.keyboard.a` -would be true and so would `args.inputs.keyboard.shift` -(if both keys were being held or in the down state). - -``` -A => :a, :shift -B => :b, :shift -C => :c, :shift -D => :d, :shift -E => :e, :shift -F => :f, :shift -G => :g, :shift -H => :h, :shift -I => :i, :shift -J => :j, :shift -K => :k, :shift -L => :l, :shift -M => :m, :shift -N => :n, :shift -O => :o, :shift -P => :p, :shift -Q => :q, :shift -R => :r, :shift -S => :s, :shift -T => :t, :shift -U => :u, :shift -V => :v, :shift -W => :w, :shift -X => :x, :shift -Y => :y, :shift -Z => :z, :shift -! => :exclamation_point -0 => :zero -1 => :one -2 => :two -3 => :three -4 => :four -5 => :five -6 => :six -7 => :seven -8 => :eight -9 => :nine -\b => :backspace -\e => :escape -\r => :enter -\t => :tab -( => :open_round_brace -) => :close_round_brace -{ => :open_curly_brace -} => :close_curly_brace -[ => :open_square_brace -] => :close_square_brace -: => :colon -; => :semicolon -= => :equal_sign -- => :hyphen - => :space -$ => :dollar_sign -" => :double_quotation_mark -' => :single_quotation_mark -` => :backtick -~ => :tilde -. => :period -, => :comma -| => :pipe -_ => :underscore -# => :hash -+ => :plus -@ => :at -/ => :forward_slash -\ => :back_slash -* => :asterisk -< => :less_than -> => :greater_than -^ => :greater_than -& => :ampersand -² => :superscript_two -§ => :section_sign -? => :question_mark -% => :percent_sign -º => :ordinal_indicator -right arrow => :right -left arrow => :left -down arrow => :down -up arrow => :up -delete key => :delete -control key => :control -windows key/command key => :meta -alt key => :alt -``` diff --git a/deploy_template/mygame/documentation/07-mouse.md b/deploy_template/mygame/documentation/07-mouse.md deleted file mode 100644 index 2af8854..0000000 --- a/deploy_template/mygame/documentation/07-mouse.md +++ /dev/null @@ -1,48 +0,0 @@ -# Mouse - -Determining current position of mouse: - -``` -args.inputs.mouse.x -args.inputs.mouse.y -``` - -Determining if the mouse has been clicked, and it's position. Note: -`click` and `down` are aliases for each other. - -``` -if args.inputs.mouse.click - puts "click: #{args.inputs.mouse.click}" - puts "x: #{args.inputs.mouse.click.point.x}" - puts "y: #{args.inputs.mouse.click.point.y}" -end -``` - -Determining if the mouse button has been released: - -``` -if args.inputs.mouse.up - puts "up: #{args.inputs.mouse.up}" - puts "x: #{args.inputs.mouse.up.point.x}" - puts "y: #{args.inputs.mouse.up.point.y}" -end -``` - -Determine which mouse button(s) have been clicked (also works for up): -``` -if args.inputs.mouse.click - puts "left: #{args.inputs.mouse.button_left}" - puts "middle: #{args.inputs.mouse.button_middle}" - puts "right: #{args.inputs.mouse.button_right}" - puts "x1: #{args.inputs.mouse.button_x1}" - puts "x2: #{args.inputs.mouse.button_x2}" -end -``` - -Determine if the mouse wheel is being used and its values for this tick: -``` -if args.inputs.mouse.wheel - puts "The wheel moved #{args.inputs.mouse.wheel.x} left/right" - puts "The wheel moved #{args.inputs.mouse.wheel.y} up/down" -end -``` diff --git a/deploy_template/mygame/documentation/08-controllers.md b/deploy_template/mygame/documentation/08-controllers.md deleted file mode 100644 index fca575f..0000000 --- a/deploy_template/mygame/documentation/08-controllers.md +++ /dev/null @@ -1,86 +0,0 @@ -# Controllers - -There are two controllers you have access to: - -``` -args.inputs.controller_one -args.inputs.controller_two -``` - -Determining if a key was down: - -``` -if args.inputs.controller_one.key_down.a - puts 'The key was in the down state' -end -``` - -Determining if a key is being held: - -``` -if args.inputs.controller_one.key_held.a - puts 'The key is being held' -end -``` - -Determining if a key is released: - -``` -if args.inputs.controller_one.key_up.a - puts 'The key is being held' -end -``` - -# Truthy Keys - -You can access all triggered keys through `truthy_keys` on `keyboard`, `controller_one`, and `controller_two`. - -This is how you would right all keys to a file. The game must be in the foreground and have focus for this data -to be recorded. - -``` -def tick args - [ - [args.inputs.keyboard, :keyboard], - [args.inputs.controller_one, :controller_one], - [args.inputs.controller_two, :controller_two] - ].each do |input, name| - if input.key_down.truthy_keys.length > 0 - args.gtk.write_file("mygame/app/#{name}_key_down_#{args.state.tick_count}", input.key_down.truthy_keys.to_s) - end - end -end -``` - -# List of keys: - -``` -args.inputs.controller_one.key_held.up -args.inputs.controller_one.key_held.down -args.inputs.controller_one.key_held.left -args.inputs.controller_one.key_held.right -args.inputs.controller_one.key_held.a -args.inputs.controller_one.key_held.b -args.inputs.controller_one.x -args.inputs.controller_one.y -args.inputs.controller_one.key_held.l1 -args.inputs.controller_one.key_held.r1 -args.inputs.controller_one.key_held.l2 -args.inputs.controller_one.key_held.r2 -args.inputs.controller_one.key_held.l3 -args.inputs.controller_one.key_held.r3 -args.inputs.controller_one.key_held.start -args.inputs.controller_one.key_held.select -args.inputs.controller_one.key_held.directional_up -args.inputs.controller_one.key_held.directional_down -args.inputs.controller_one.key_held.directional_left -args.inputs.controller_one.key_held.directional_right -args.inputs.controller_one.left_analog_x_raw, -args.inputs.controller_one.left_analog_y_raw, -args.inputs.controller_one.left_analog_x_perc, -args.inputs.controller_one.left_analog_y_perc, -args.inputs.controller_one.right_analog_x_raw, -args.inputs.controller_one.right_analog_y_raw, -args.inputs.controller_one.right_analog_x_perc, -args.inputs.controller_one.right_analog_y_perc -``` diff --git a/deploy_template/mygame/documentation/99-todo.md b/deploy_template/mygame/documentation/99-todo.md deleted file mode 100644 index f02df2d..0000000 --- a/deploy_template/mygame/documentation/99-todo.md +++ /dev/null @@ -1,89 +0,0 @@ -# Documentation That Needs to be Organized - -## Class macro attr_gtk - -Use the `attr_gtk` class method to help access the different variables provided via `args`: - -```ruby -class Game - attr_gtk - attr_accessor :current_scene, :other_custom_attrs - - def tick - end -end - -$game = Game.new - -def tick args - $game.args = args - $game.tick -end -``` - -The code above is the similar to: - -```ruby -class Game - attr_accessor :args, :grid, :state, :inputs, :outputs, :gtk, :passes, - :current_scene, :other_custom_attrs - - def tick - end -end - -$game = Game.new - -def tick args - $game.args = args - $game.grid = args.grid - $game.state = args.state - $game.outputs = args.outputs - $game.gtk = args.gtk - $game.passes = args.passes - $game.tick -end -``` - -## Monkey patching the runtime - -You're on your own if you do this :grimacing: - -```ruby -module GTK - class Runtime - alias_method :__original_tick_core__, :tick_core unless Runtime.instance_methods.include?(:__original_tick_core__) - - def tick_core - __original_tick_core__ - $top_level.oh @args - $top_level.god @args - $top_level.why @args - end - end -end - -def tick args -end - -def oh args -end - -def god args -end - -def why args -end -``` - -## MP3's to Wav converstion script: - -```ruby -`ls .`.each_line.to_a.map do |l| - l = l.strip - if l.end_with? "mp3" - `ffmpeg -i #{l} -acodec pcm_s16le -ar 44100 prep-#{l.split(".")[0]}.wav` - `ffmpeg -y -i prep-#{l.split(".")[0]}.wav -f wav -bitexact -acodec pcm_s16le -ar 44100 -ac 1 #{l.split(".")[0]}.wav` - end -end -``` diff --git a/deploy_template/mygame/fonts/.gitkeep b/deploy_template/mygame/fonts/.gitkeep new file mode 100644 index 0000000..a03e35e --- /dev/null +++ b/deploy_template/mygame/fonts/.gitkeep @@ -0,0 +1 @@ +Put your custom fonts here. \ No newline at end of file diff --git a/deploy_template/mygame/metadata/game_metadata.txt b/deploy_template/mygame/metadata/game_metadata.txt index 1b03500..4fb92f4 100644 --- a/deploy_template/mygame/metadata/game_metadata.txt +++ b/deploy_template/mygame/metadata/game_metadata.txt @@ -4,3 +4,4 @@ #gametitle=My Game #version=0.1 #icon=metadata/icon.png +#compile_ruby=false diff --git a/deploy_template/mygame/metadata/ios_metadata.txt b/deploy_template/mygame/metadata/ios_metadata.txt new file mode 100644 index 0000000..5a2f375 --- /dev/null +++ b/deploy_template/mygame/metadata/ios_metadata.txt @@ -0,0 +1,9 @@ +# ios_metadata.txt is used by the Pro version of DragonRuby Game Toolkit to create iOS apps. +# Information about the Pro version can be found at: http://dragonruby.org/toolkit/game#purchase + +# teamname needs to be set to your assigned team id which can be found at https://developer.apple.com/account/#/membership/L7H57V9CRD +teamid= +# appid needs to be set to your application identifier which can be found at https://developer.apple.com/account/resources/identifiers/list +appid= +# appname is the name you want to show up underneath the app icon on the device +appname= diff --git a/deploy_template/mygame/sounds/.gitkeep b/deploy_template/mygame/sounds/.gitkeep new file mode 100644 index 0000000..a99ec00 --- /dev/null +++ b/deploy_template/mygame/sounds/.gitkeep @@ -0,0 +1 @@ +Put your sounds here. \ No newline at end of file diff --git a/deploy_template/mygame/sprites/border-black.png b/deploy_template/mygame/sprites/border-black.png deleted file mode 100644 index c9d0bad..0000000 Binary files a/deploy_template/mygame/sprites/border-black.png and /dev/null differ diff --git a/deploy_template/mygame/sprites/circle-black.png b/deploy_template/mygame/sprites/circle-black.png deleted file mode 100644 index c98e23d..0000000 Binary files a/deploy_template/mygame/sprites/circle-black.png and /dev/null differ diff --git a/deploy_template/mygame/sprites/circle-blue.png b/deploy_template/mygame/sprites/circle-blue.png deleted file mode 100644 index 1726d2a..0000000 Binary files a/deploy_template/mygame/sprites/circle-blue.png and /dev/null differ diff --git a/deploy_template/mygame/sprites/circle-gray.png b/deploy_template/mygame/sprites/circle-gray.png deleted file mode 100644 index 960f191..0000000 Binary files a/deploy_template/mygame/sprites/circle-gray.png and /dev/null differ diff --git a/deploy_template/mygame/sprites/circle-green.png b/deploy_template/mygame/sprites/circle-green.png deleted file mode 100644 index 43cf7ee..0000000 Binary files a/deploy_template/mygame/sprites/circle-green.png and /dev/null differ diff --git a/deploy_template/mygame/sprites/circle-indigo.png b/deploy_template/mygame/sprites/circle-indigo.png deleted file mode 100644 index 598e240..0000000 Binary files a/deploy_template/mygame/sprites/circle-indigo.png and /dev/null differ diff --git a/deploy_template/mygame/sprites/circle-orange.png b/deploy_template/mygame/sprites/circle-orange.png deleted file mode 100644 index 5604a42..0000000 Binary files a/deploy_template/mygame/sprites/circle-orange.png and /dev/null differ diff --git a/deploy_template/mygame/sprites/circle-red.png b/deploy_template/mygame/sprites/circle-red.png deleted file mode 100644 index 7f17ca6..0000000 Binary files a/deploy_template/mygame/sprites/circle-red.png and /dev/null differ diff --git a/deploy_template/mygame/sprites/circle-violet.png b/deploy_template/mygame/sprites/circle-violet.png deleted file mode 100644 index 681d210..0000000 Binary files a/deploy_template/mygame/sprites/circle-violet.png and /dev/null differ diff --git a/deploy_template/mygame/sprites/circle-white.png b/deploy_template/mygame/sprites/circle-white.png deleted file mode 100644 index bd32155..0000000 Binary files a/deploy_template/mygame/sprites/circle-white.png and /dev/null differ diff --git a/deploy_template/mygame/sprites/circle-yellow.png b/deploy_template/mygame/sprites/circle-yellow.png deleted file mode 100644 index 94992eb..0000000 Binary files a/deploy_template/mygame/sprites/circle-yellow.png and /dev/null differ diff --git a/deploy_template/mygame/sprites/circle/black.png b/deploy_template/mygame/sprites/circle/black.png new file mode 100644 index 0000000..7ec40e9 Binary files /dev/null and b/deploy_template/mygame/sprites/circle/black.png differ diff --git a/deploy_template/mygame/sprites/circle/blue.png b/deploy_template/mygame/sprites/circle/blue.png new file mode 100644 index 0000000..96bf51b Binary files /dev/null and b/deploy_template/mygame/sprites/circle/blue.png differ diff --git a/deploy_template/mygame/sprites/circle/gray.png b/deploy_template/mygame/sprites/circle/gray.png new file mode 100644 index 0000000..e13f8c3 Binary files /dev/null and b/deploy_template/mygame/sprites/circle/gray.png differ diff --git a/deploy_template/mygame/sprites/circle/green.png b/deploy_template/mygame/sprites/circle/green.png new file mode 100644 index 0000000..73fcea0 Binary files /dev/null and b/deploy_template/mygame/sprites/circle/green.png differ diff --git a/deploy_template/mygame/sprites/circle/indigo.png b/deploy_template/mygame/sprites/circle/indigo.png new file mode 100644 index 0000000..6afb0e0 Binary files /dev/null and b/deploy_template/mygame/sprites/circle/indigo.png differ diff --git a/deploy_template/mygame/sprites/circle/orange.png b/deploy_template/mygame/sprites/circle/orange.png new file mode 100644 index 0000000..8623103 Binary files /dev/null and b/deploy_template/mygame/sprites/circle/orange.png differ diff --git a/deploy_template/mygame/sprites/circle/red.png b/deploy_template/mygame/sprites/circle/red.png new file mode 100644 index 0000000..c4cc37c Binary files /dev/null and b/deploy_template/mygame/sprites/circle/red.png differ diff --git a/deploy_template/mygame/sprites/circle/violet.png b/deploy_template/mygame/sprites/circle/violet.png new file mode 100644 index 0000000..3dc5c37 Binary files /dev/null and b/deploy_template/mygame/sprites/circle/violet.png differ diff --git a/deploy_template/mygame/sprites/circle/white.png b/deploy_template/mygame/sprites/circle/white.png new file mode 100644 index 0000000..2ec542a Binary files /dev/null and b/deploy_template/mygame/sprites/circle/white.png differ diff --git a/deploy_template/mygame/sprites/circle/yellow.png b/deploy_template/mygame/sprites/circle/yellow.png new file mode 100644 index 0000000..eca1037 Binary files /dev/null and b/deploy_template/mygame/sprites/circle/yellow.png differ diff --git a/deploy_template/mygame/sprites/dragon-0.png b/deploy_template/mygame/sprites/dragon-0.png deleted file mode 100644 index fb179af..0000000 Binary files a/deploy_template/mygame/sprites/dragon-0.png and /dev/null differ diff --git a/deploy_template/mygame/sprites/dragon-1.png b/deploy_template/mygame/sprites/dragon-1.png deleted file mode 100644 index 8cfe531..0000000 Binary files a/deploy_template/mygame/sprites/dragon-1.png and /dev/null differ diff --git a/deploy_template/mygame/sprites/dragon-2.png b/deploy_template/mygame/sprites/dragon-2.png deleted file mode 100644 index cb462e1..0000000 Binary files a/deploy_template/mygame/sprites/dragon-2.png and /dev/null differ diff --git a/deploy_template/mygame/sprites/dragon-3.png b/deploy_template/mygame/sprites/dragon-3.png deleted file mode 100644 index 04c4977..0000000 Binary files a/deploy_template/mygame/sprites/dragon-3.png and /dev/null differ diff --git a/deploy_template/mygame/sprites/dragon-4.png b/deploy_template/mygame/sprites/dragon-4.png deleted file mode 100644 index b29fa3d..0000000 Binary files a/deploy_template/mygame/sprites/dragon-4.png and /dev/null differ diff --git a/deploy_template/mygame/sprites/dragon-5.png b/deploy_template/mygame/sprites/dragon-5.png deleted file mode 100644 index 99f4e74..0000000 Binary files a/deploy_template/mygame/sprites/dragon-5.png and /dev/null differ diff --git a/deploy_template/mygame/sprites/explosion-0.png b/deploy_template/mygame/sprites/explosion-0.png deleted file mode 100644 index f48636f..0000000 Binary files a/deploy_template/mygame/sprites/explosion-0.png and /dev/null differ diff --git a/deploy_template/mygame/sprites/explosion-1.png b/deploy_template/mygame/sprites/explosion-1.png deleted file mode 100644 index b4018d9..0000000 Binary files a/deploy_template/mygame/sprites/explosion-1.png and /dev/null differ diff --git a/deploy_template/mygame/sprites/explosion-2.png b/deploy_template/mygame/sprites/explosion-2.png deleted file mode 100644 index 3abaedd..0000000 Binary files a/deploy_template/mygame/sprites/explosion-2.png and /dev/null differ diff --git a/deploy_template/mygame/sprites/explosion-3.png b/deploy_template/mygame/sprites/explosion-3.png deleted file mode 100644 index fe94a5a..0000000 Binary files a/deploy_template/mygame/sprites/explosion-3.png and /dev/null differ diff --git a/deploy_template/mygame/sprites/explosion-4.png b/deploy_template/mygame/sprites/explosion-4.png deleted file mode 100644 index ed04237..0000000 Binary files a/deploy_template/mygame/sprites/explosion-4.png and /dev/null differ diff --git a/deploy_template/mygame/sprites/explosion-5.png b/deploy_template/mygame/sprites/explosion-5.png deleted file mode 100644 index 2cd8f06..0000000 Binary files a/deploy_template/mygame/sprites/explosion-5.png and /dev/null differ diff --git a/deploy_template/mygame/sprites/explosion-6.png b/deploy_template/mygame/sprites/explosion-6.png deleted file mode 100644 index e55909c..0000000 Binary files a/deploy_template/mygame/sprites/explosion-6.png and /dev/null differ diff --git a/deploy_template/mygame/sprites/explosion-sheet.png b/deploy_template/mygame/sprites/explosion-sheet.png deleted file mode 100644 index 8559a5c..0000000 Binary files a/deploy_template/mygame/sprites/explosion-sheet.png and /dev/null differ diff --git a/deploy_template/mygame/sprites/hexagon-black.png b/deploy_template/mygame/sprites/hexagon-black.png deleted file mode 100644 index f50c872..0000000 Binary files a/deploy_template/mygame/sprites/hexagon-black.png and /dev/null differ diff --git a/deploy_template/mygame/sprites/hexagon-blue.png b/deploy_template/mygame/sprites/hexagon-blue.png deleted file mode 100644 index 1696bae..0000000 Binary files a/deploy_template/mygame/sprites/hexagon-blue.png and /dev/null differ diff --git a/deploy_template/mygame/sprites/hexagon-gray.png b/deploy_template/mygame/sprites/hexagon-gray.png deleted file mode 100644 index e8c4c5a..0000000 Binary files a/deploy_template/mygame/sprites/hexagon-gray.png and /dev/null differ diff --git a/deploy_template/mygame/sprites/hexagon-green.png b/deploy_template/mygame/sprites/hexagon-green.png deleted file mode 100644 index a700602..0000000 Binary files a/deploy_template/mygame/sprites/hexagon-green.png and /dev/null differ diff --git a/deploy_template/mygame/sprites/hexagon-indigo.png b/deploy_template/mygame/sprites/hexagon-indigo.png deleted file mode 100644 index 15f6f4f..0000000 Binary files a/deploy_template/mygame/sprites/hexagon-indigo.png and /dev/null differ diff --git a/deploy_template/mygame/sprites/hexagon-orange.png b/deploy_template/mygame/sprites/hexagon-orange.png deleted file mode 100644 index 1587173..0000000 Binary files a/deploy_template/mygame/sprites/hexagon-orange.png and /dev/null differ diff --git a/deploy_template/mygame/sprites/hexagon-red.png b/deploy_template/mygame/sprites/hexagon-red.png deleted file mode 100644 index d442f39..0000000 Binary files a/deploy_template/mygame/sprites/hexagon-red.png and /dev/null differ diff --git a/deploy_template/mygame/sprites/hexagon-violet.png b/deploy_template/mygame/sprites/hexagon-violet.png deleted file mode 100644 index 3be5731..0000000 Binary files a/deploy_template/mygame/sprites/hexagon-violet.png and /dev/null differ diff --git a/deploy_template/mygame/sprites/hexagon-white.png b/deploy_template/mygame/sprites/hexagon-white.png deleted file mode 100644 index c1ad970..0000000 Binary files a/deploy_template/mygame/sprites/hexagon-white.png and /dev/null differ diff --git a/deploy_template/mygame/sprites/hexagon-yellow.png b/deploy_template/mygame/sprites/hexagon-yellow.png deleted file mode 100644 index 63f5f34..0000000 Binary files a/deploy_template/mygame/sprites/hexagon-yellow.png and /dev/null differ diff --git a/deploy_template/mygame/sprites/hexagon/black.png b/deploy_template/mygame/sprites/hexagon/black.png new file mode 100644 index 0000000..03a6c8a Binary files /dev/null and b/deploy_template/mygame/sprites/hexagon/black.png differ diff --git a/deploy_template/mygame/sprites/hexagon/blue.png b/deploy_template/mygame/sprites/hexagon/blue.png new file mode 100644 index 0000000..ca45f9b Binary files /dev/null and b/deploy_template/mygame/sprites/hexagon/blue.png differ diff --git a/deploy_template/mygame/sprites/hexagon/gray.png b/deploy_template/mygame/sprites/hexagon/gray.png new file mode 100644 index 0000000..230b436 Binary files /dev/null and b/deploy_template/mygame/sprites/hexagon/gray.png differ diff --git a/deploy_template/mygame/sprites/hexagon/green.png b/deploy_template/mygame/sprites/hexagon/green.png new file mode 100644 index 0000000..e740746 Binary files /dev/null and b/deploy_template/mygame/sprites/hexagon/green.png differ diff --git a/deploy_template/mygame/sprites/hexagon/indigo.png b/deploy_template/mygame/sprites/hexagon/indigo.png new file mode 100644 index 0000000..13b7065 Binary files /dev/null and b/deploy_template/mygame/sprites/hexagon/indigo.png differ diff --git a/deploy_template/mygame/sprites/hexagon/orange.png b/deploy_template/mygame/sprites/hexagon/orange.png new file mode 100644 index 0000000..85988f1 Binary files /dev/null and b/deploy_template/mygame/sprites/hexagon/orange.png differ diff --git a/deploy_template/mygame/sprites/hexagon/red.png b/deploy_template/mygame/sprites/hexagon/red.png new file mode 100644 index 0000000..bb0740f Binary files /dev/null and b/deploy_template/mygame/sprites/hexagon/red.png differ diff --git a/deploy_template/mygame/sprites/hexagon/violet.png b/deploy_template/mygame/sprites/hexagon/violet.png new file mode 100644 index 0000000..ca3f1c7 Binary files /dev/null and b/deploy_template/mygame/sprites/hexagon/violet.png differ diff --git a/deploy_template/mygame/sprites/hexagon/white.png b/deploy_template/mygame/sprites/hexagon/white.png new file mode 100644 index 0000000..7d0ee81 Binary files /dev/null and b/deploy_template/mygame/sprites/hexagon/white.png differ diff --git a/deploy_template/mygame/sprites/hexagon/yellow.png b/deploy_template/mygame/sprites/hexagon/yellow.png new file mode 100644 index 0000000..3b4de18 Binary files /dev/null and b/deploy_template/mygame/sprites/hexagon/yellow.png differ diff --git a/deploy_template/mygame/sprites/isometric-black.png b/deploy_template/mygame/sprites/isometric-black.png deleted file mode 100644 index fa9e463..0000000 Binary files a/deploy_template/mygame/sprites/isometric-black.png and /dev/null differ diff --git a/deploy_template/mygame/sprites/isometric-blue.png b/deploy_template/mygame/sprites/isometric-blue.png deleted file mode 100644 index a3d8524..0000000 Binary files a/deploy_template/mygame/sprites/isometric-blue.png and /dev/null differ diff --git a/deploy_template/mygame/sprites/isometric-gray.png b/deploy_template/mygame/sprites/isometric-gray.png deleted file mode 100644 index 85dcc1d..0000000 Binary files a/deploy_template/mygame/sprites/isometric-gray.png and /dev/null differ diff --git a/deploy_template/mygame/sprites/isometric-green.png b/deploy_template/mygame/sprites/isometric-green.png deleted file mode 100644 index ec2773e..0000000 Binary files a/deploy_template/mygame/sprites/isometric-green.png and /dev/null differ diff --git a/deploy_template/mygame/sprites/isometric-indigo.png b/deploy_template/mygame/sprites/isometric-indigo.png deleted file mode 100644 index e6be50c..0000000 Binary files a/deploy_template/mygame/sprites/isometric-indigo.png and /dev/null differ diff --git a/deploy_template/mygame/sprites/isometric-orange.png b/deploy_template/mygame/sprites/isometric-orange.png deleted file mode 100644 index 154d81c..0000000 Binary files a/deploy_template/mygame/sprites/isometric-orange.png and /dev/null differ diff --git a/deploy_template/mygame/sprites/isometric-red.png b/deploy_template/mygame/sprites/isometric-red.png deleted file mode 100644 index 3448c4d..0000000 Binary files a/deploy_template/mygame/sprites/isometric-red.png and /dev/null differ diff --git a/deploy_template/mygame/sprites/isometric-violet.png b/deploy_template/mygame/sprites/isometric-violet.png deleted file mode 100644 index f09bf21..0000000 Binary files a/deploy_template/mygame/sprites/isometric-violet.png and /dev/null differ diff --git a/deploy_template/mygame/sprites/isometric-white.png b/deploy_template/mygame/sprites/isometric-white.png deleted file mode 100644 index a45793d..0000000 Binary files a/deploy_template/mygame/sprites/isometric-white.png and /dev/null differ diff --git a/deploy_template/mygame/sprites/isometric-yellow.png b/deploy_template/mygame/sprites/isometric-yellow.png deleted file mode 100644 index 9be20c7..0000000 Binary files a/deploy_template/mygame/sprites/isometric-yellow.png and /dev/null differ diff --git a/deploy_template/mygame/sprites/isometric/black.png b/deploy_template/mygame/sprites/isometric/black.png new file mode 100644 index 0000000..698f791 Binary files /dev/null and b/deploy_template/mygame/sprites/isometric/black.png differ diff --git a/deploy_template/mygame/sprites/isometric/blue.png b/deploy_template/mygame/sprites/isometric/blue.png new file mode 100644 index 0000000..175141d Binary files /dev/null and b/deploy_template/mygame/sprites/isometric/blue.png differ diff --git a/deploy_template/mygame/sprites/isometric/gray.png b/deploy_template/mygame/sprites/isometric/gray.png new file mode 100644 index 0000000..6b776d8 Binary files /dev/null and b/deploy_template/mygame/sprites/isometric/gray.png differ diff --git a/deploy_template/mygame/sprites/isometric/green.png b/deploy_template/mygame/sprites/isometric/green.png new file mode 100644 index 0000000..f2099e6 Binary files /dev/null and b/deploy_template/mygame/sprites/isometric/green.png differ diff --git a/deploy_template/mygame/sprites/isometric/indigo.png b/deploy_template/mygame/sprites/isometric/indigo.png new file mode 100644 index 0000000..952a093 Binary files /dev/null and b/deploy_template/mygame/sprites/isometric/indigo.png differ diff --git a/deploy_template/mygame/sprites/isometric/orange.png b/deploy_template/mygame/sprites/isometric/orange.png new file mode 100644 index 0000000..1f0d433 Binary files /dev/null and b/deploy_template/mygame/sprites/isometric/orange.png differ diff --git a/deploy_template/mygame/sprites/isometric/red.png b/deploy_template/mygame/sprites/isometric/red.png new file mode 100644 index 0000000..45e565a Binary files /dev/null and b/deploy_template/mygame/sprites/isometric/red.png differ diff --git a/deploy_template/mygame/sprites/isometric/violet.png b/deploy_template/mygame/sprites/isometric/violet.png new file mode 100644 index 0000000..e9ca156 Binary files /dev/null and b/deploy_template/mygame/sprites/isometric/violet.png differ diff --git a/deploy_template/mygame/sprites/isometric/white.png b/deploy_template/mygame/sprites/isometric/white.png new file mode 100644 index 0000000..3360681 Binary files /dev/null and b/deploy_template/mygame/sprites/isometric/white.png differ diff --git a/deploy_template/mygame/sprites/isometric/yellow.png b/deploy_template/mygame/sprites/isometric/yellow.png new file mode 100644 index 0000000..b4cd60c Binary files /dev/null and b/deploy_template/mygame/sprites/isometric/yellow.png differ diff --git a/deploy_template/mygame/sprites/misc/dragon-0.png b/deploy_template/mygame/sprites/misc/dragon-0.png new file mode 100644 index 0000000..fb179af Binary files /dev/null and b/deploy_template/mygame/sprites/misc/dragon-0.png differ diff --git a/deploy_template/mygame/sprites/misc/dragon-1.png b/deploy_template/mygame/sprites/misc/dragon-1.png new file mode 100644 index 0000000..8cfe531 Binary files /dev/null and b/deploy_template/mygame/sprites/misc/dragon-1.png differ diff --git a/deploy_template/mygame/sprites/misc/dragon-2.png b/deploy_template/mygame/sprites/misc/dragon-2.png new file mode 100644 index 0000000..cb462e1 Binary files /dev/null and b/deploy_template/mygame/sprites/misc/dragon-2.png differ diff --git a/deploy_template/mygame/sprites/misc/dragon-3.png b/deploy_template/mygame/sprites/misc/dragon-3.png new file mode 100644 index 0000000..04c4977 Binary files /dev/null and b/deploy_template/mygame/sprites/misc/dragon-3.png differ diff --git a/deploy_template/mygame/sprites/misc/dragon-4.png b/deploy_template/mygame/sprites/misc/dragon-4.png new file mode 100644 index 0000000..b29fa3d Binary files /dev/null and b/deploy_template/mygame/sprites/misc/dragon-4.png differ diff --git a/deploy_template/mygame/sprites/misc/dragon-5.png b/deploy_template/mygame/sprites/misc/dragon-5.png new file mode 100644 index 0000000..99f4e74 Binary files /dev/null and b/deploy_template/mygame/sprites/misc/dragon-5.png differ diff --git a/deploy_template/mygame/sprites/misc/explosion-0.png b/deploy_template/mygame/sprites/misc/explosion-0.png new file mode 100644 index 0000000..f48636f Binary files /dev/null and b/deploy_template/mygame/sprites/misc/explosion-0.png differ diff --git a/deploy_template/mygame/sprites/misc/explosion-1.png b/deploy_template/mygame/sprites/misc/explosion-1.png new file mode 100644 index 0000000..b4018d9 Binary files /dev/null and b/deploy_template/mygame/sprites/misc/explosion-1.png differ diff --git a/deploy_template/mygame/sprites/misc/explosion-2.png b/deploy_template/mygame/sprites/misc/explosion-2.png new file mode 100644 index 0000000..3abaedd Binary files /dev/null and b/deploy_template/mygame/sprites/misc/explosion-2.png differ diff --git a/deploy_template/mygame/sprites/misc/explosion-3.png b/deploy_template/mygame/sprites/misc/explosion-3.png new file mode 100644 index 0000000..fe94a5a Binary files /dev/null and b/deploy_template/mygame/sprites/misc/explosion-3.png differ diff --git a/deploy_template/mygame/sprites/misc/explosion-4.png b/deploy_template/mygame/sprites/misc/explosion-4.png new file mode 100644 index 0000000..ed04237 Binary files /dev/null and b/deploy_template/mygame/sprites/misc/explosion-4.png differ diff --git a/deploy_template/mygame/sprites/misc/explosion-5.png b/deploy_template/mygame/sprites/misc/explosion-5.png new file mode 100644 index 0000000..2cd8f06 Binary files /dev/null and b/deploy_template/mygame/sprites/misc/explosion-5.png differ diff --git a/deploy_template/mygame/sprites/misc/explosion-6.png b/deploy_template/mygame/sprites/misc/explosion-6.png new file mode 100644 index 0000000..e55909c Binary files /dev/null and b/deploy_template/mygame/sprites/misc/explosion-6.png differ diff --git a/deploy_template/mygame/sprites/misc/explosion-sheet.png b/deploy_template/mygame/sprites/misc/explosion-sheet.png new file mode 100644 index 0000000..8559a5c Binary files /dev/null and b/deploy_template/mygame/sprites/misc/explosion-sheet.png differ diff --git a/deploy_template/mygame/sprites/misc/lowrez-ship-blue.png b/deploy_template/mygame/sprites/misc/lowrez-ship-blue.png new file mode 100644 index 0000000..7a3d3aa Binary files /dev/null and b/deploy_template/mygame/sprites/misc/lowrez-ship-blue.png differ diff --git a/deploy_template/mygame/sprites/misc/lowrez-ship-red.png b/deploy_template/mygame/sprites/misc/lowrez-ship-red.png new file mode 100644 index 0000000..dd1a1d4 Binary files /dev/null and b/deploy_template/mygame/sprites/misc/lowrez-ship-red.png differ diff --git a/deploy_template/mygame/sprites/misc/simple-mood-16x16.png b/deploy_template/mygame/sprites/misc/simple-mood-16x16.png new file mode 100644 index 0000000..0eca11e Binary files /dev/null and b/deploy_template/mygame/sprites/misc/simple-mood-16x16.png differ diff --git a/deploy_template/mygame/sprites/misc/star.png b/deploy_template/mygame/sprites/misc/star.png new file mode 100644 index 0000000..e0ee0f9 Binary files /dev/null and b/deploy_template/mygame/sprites/misc/star.png differ diff --git a/deploy_template/mygame/sprites/misc/tiny-star.png b/deploy_template/mygame/sprites/misc/tiny-star.png new file mode 100644 index 0000000..e04786a Binary files /dev/null and b/deploy_template/mygame/sprites/misc/tiny-star.png differ diff --git a/deploy_template/mygame/sprites/square-black.png b/deploy_template/mygame/sprites/square-black.png deleted file mode 100644 index cea7bd7..0000000 Binary files a/deploy_template/mygame/sprites/square-black.png and /dev/null differ diff --git a/deploy_template/mygame/sprites/square-blue.png b/deploy_template/mygame/sprites/square-blue.png deleted file mode 100644 index b840849..0000000 Binary files a/deploy_template/mygame/sprites/square-blue.png and /dev/null differ diff --git a/deploy_template/mygame/sprites/square-gray.png b/deploy_template/mygame/sprites/square-gray.png deleted file mode 100644 index 2142b30..0000000 Binary files a/deploy_template/mygame/sprites/square-gray.png and /dev/null differ diff --git a/deploy_template/mygame/sprites/square-green.png b/deploy_template/mygame/sprites/square-green.png deleted file mode 100644 index 5ef7f75..0000000 Binary files a/deploy_template/mygame/sprites/square-green.png and /dev/null differ diff --git a/deploy_template/mygame/sprites/square-indigo.png b/deploy_template/mygame/sprites/square-indigo.png deleted file mode 100644 index 2384108..0000000 Binary files a/deploy_template/mygame/sprites/square-indigo.png and /dev/null differ diff --git a/deploy_template/mygame/sprites/square-orange.png b/deploy_template/mygame/sprites/square-orange.png deleted file mode 100644 index bb1eee7..0000000 Binary files a/deploy_template/mygame/sprites/square-orange.png and /dev/null differ diff --git a/deploy_template/mygame/sprites/square-red.png b/deploy_template/mygame/sprites/square-red.png deleted file mode 100644 index 3ed5f13..0000000 Binary files a/deploy_template/mygame/sprites/square-red.png and /dev/null differ diff --git a/deploy_template/mygame/sprites/square-violet.png b/deploy_template/mygame/sprites/square-violet.png deleted file mode 100644 index 333540c..0000000 Binary files a/deploy_template/mygame/sprites/square-violet.png and /dev/null differ diff --git a/deploy_template/mygame/sprites/square-white.png b/deploy_template/mygame/sprites/square-white.png deleted file mode 100644 index 378c565..0000000 Binary files a/deploy_template/mygame/sprites/square-white.png and /dev/null differ diff --git a/deploy_template/mygame/sprites/square-yellow.png b/deploy_template/mygame/sprites/square-yellow.png deleted file mode 100644 index 0edeeec..0000000 Binary files a/deploy_template/mygame/sprites/square-yellow.png and /dev/null differ diff --git a/deploy_template/mygame/sprites/square/black.png b/deploy_template/mygame/sprites/square/black.png new file mode 100644 index 0000000..1a80bda Binary files /dev/null and b/deploy_template/mygame/sprites/square/black.png differ diff --git a/deploy_template/mygame/sprites/square/blue.png b/deploy_template/mygame/sprites/square/blue.png new file mode 100644 index 0000000..3194ff5 Binary files /dev/null and b/deploy_template/mygame/sprites/square/blue.png differ diff --git a/deploy_template/mygame/sprites/square/gray.png b/deploy_template/mygame/sprites/square/gray.png new file mode 100644 index 0000000..b94f1dd Binary files /dev/null and b/deploy_template/mygame/sprites/square/gray.png differ diff --git a/deploy_template/mygame/sprites/square/green.png b/deploy_template/mygame/sprites/square/green.png new file mode 100644 index 0000000..d14a892 Binary files /dev/null and b/deploy_template/mygame/sprites/square/green.png differ diff --git a/deploy_template/mygame/sprites/square/indigo.png b/deploy_template/mygame/sprites/square/indigo.png new file mode 100644 index 0000000..f66aa46 Binary files /dev/null and b/deploy_template/mygame/sprites/square/indigo.png differ diff --git a/deploy_template/mygame/sprites/square/orange.png b/deploy_template/mygame/sprites/square/orange.png new file mode 100644 index 0000000..bf023bc Binary files /dev/null and b/deploy_template/mygame/sprites/square/orange.png differ diff --git a/deploy_template/mygame/sprites/square/red.png b/deploy_template/mygame/sprites/square/red.png new file mode 100644 index 0000000..a59443e Binary files /dev/null and b/deploy_template/mygame/sprites/square/red.png differ diff --git a/deploy_template/mygame/sprites/square/violet.png b/deploy_template/mygame/sprites/square/violet.png new file mode 100644 index 0000000..c8f3db8 Binary files /dev/null and b/deploy_template/mygame/sprites/square/violet.png differ diff --git a/deploy_template/mygame/sprites/square/white.png b/deploy_template/mygame/sprites/square/white.png new file mode 100644 index 0000000..7a233ea Binary files /dev/null and b/deploy_template/mygame/sprites/square/white.png differ diff --git a/deploy_template/mygame/sprites/square/yellow.png b/deploy_template/mygame/sprites/square/yellow.png new file mode 100644 index 0000000..3b586c4 Binary files /dev/null and b/deploy_template/mygame/sprites/square/yellow.png differ diff --git a/deploy_template/mygame/sprites/star.png b/deploy_template/mygame/sprites/star.png deleted file mode 100644 index e0ee0f9..0000000 Binary files a/deploy_template/mygame/sprites/star.png and /dev/null differ diff --git a/deploy_template/mygame/sprites/tile/wall-0000.png b/deploy_template/mygame/sprites/tile/wall-0000.png new file mode 100644 index 0000000..469795c Binary files /dev/null and b/deploy_template/mygame/sprites/tile/wall-0000.png differ diff --git a/deploy_template/mygame/sprites/tile/wall-0001.png b/deploy_template/mygame/sprites/tile/wall-0001.png new file mode 100644 index 0000000..afcac7a Binary files /dev/null and b/deploy_template/mygame/sprites/tile/wall-0001.png differ diff --git a/deploy_template/mygame/sprites/tile/wall-0010.png b/deploy_template/mygame/sprites/tile/wall-0010.png new file mode 100644 index 0000000..b791e98 Binary files /dev/null and b/deploy_template/mygame/sprites/tile/wall-0010.png differ diff --git a/deploy_template/mygame/sprites/tile/wall-0011.png b/deploy_template/mygame/sprites/tile/wall-0011.png new file mode 100644 index 0000000..9e7d664 Binary files /dev/null and b/deploy_template/mygame/sprites/tile/wall-0011.png differ diff --git a/deploy_template/mygame/sprites/tile/wall-0100.png b/deploy_template/mygame/sprites/tile/wall-0100.png new file mode 100644 index 0000000..e49aadb Binary files /dev/null and b/deploy_template/mygame/sprites/tile/wall-0100.png differ diff --git a/deploy_template/mygame/sprites/tile/wall-0101.png b/deploy_template/mygame/sprites/tile/wall-0101.png new file mode 100644 index 0000000..b040a4a Binary files /dev/null and b/deploy_template/mygame/sprites/tile/wall-0101.png differ diff --git a/deploy_template/mygame/sprites/tile/wall-0110.png b/deploy_template/mygame/sprites/tile/wall-0110.png new file mode 100644 index 0000000..2273582 Binary files /dev/null and b/deploy_template/mygame/sprites/tile/wall-0110.png differ diff --git a/deploy_template/mygame/sprites/tile/wall-0111.png b/deploy_template/mygame/sprites/tile/wall-0111.png new file mode 100644 index 0000000..ae2faca Binary files /dev/null and b/deploy_template/mygame/sprites/tile/wall-0111.png differ diff --git a/deploy_template/mygame/sprites/tile/wall-1000.png b/deploy_template/mygame/sprites/tile/wall-1000.png new file mode 100644 index 0000000..900990d Binary files /dev/null and b/deploy_template/mygame/sprites/tile/wall-1000.png differ diff --git a/deploy_template/mygame/sprites/tile/wall-1001.png b/deploy_template/mygame/sprites/tile/wall-1001.png new file mode 100644 index 0000000..45aa962 Binary files /dev/null and b/deploy_template/mygame/sprites/tile/wall-1001.png differ diff --git a/deploy_template/mygame/sprites/tile/wall-1010.png b/deploy_template/mygame/sprites/tile/wall-1010.png new file mode 100644 index 0000000..9333835 Binary files /dev/null and b/deploy_template/mygame/sprites/tile/wall-1010.png differ diff --git a/deploy_template/mygame/sprites/tile/wall-1011.png b/deploy_template/mygame/sprites/tile/wall-1011.png new file mode 100644 index 0000000..439f135 Binary files /dev/null and b/deploy_template/mygame/sprites/tile/wall-1011.png differ diff --git a/deploy_template/mygame/sprites/tile/wall-1100.png b/deploy_template/mygame/sprites/tile/wall-1100.png new file mode 100644 index 0000000..67a2433 Binary files /dev/null and b/deploy_template/mygame/sprites/tile/wall-1100.png differ diff --git a/deploy_template/mygame/sprites/tile/wall-1101.png b/deploy_template/mygame/sprites/tile/wall-1101.png new file mode 100644 index 0000000..8e06769 Binary files /dev/null and b/deploy_template/mygame/sprites/tile/wall-1101.png differ diff --git a/deploy_template/mygame/sprites/tile/wall-1110.png b/deploy_template/mygame/sprites/tile/wall-1110.png new file mode 100644 index 0000000..d92e46c Binary files /dev/null and b/deploy_template/mygame/sprites/tile/wall-1110.png differ diff --git a/deploy_template/mygame/sprites/tile/wall-1111.png b/deploy_template/mygame/sprites/tile/wall-1111.png new file mode 100644 index 0000000..e5ce32f Binary files /dev/null and b/deploy_template/mygame/sprites/tile/wall-1111.png differ -- cgit v1.2.3 From a503afe87619ff82201c0a43818fa1c3f070a548 Mon Sep 17 00:00:00 2001 From: Amir Rajan Date: Sat, 7 Aug 2021 00:13:33 -0500 Subject: Samples folder synced. --- .../00_beginner_ruby_primer/app/main.rb | 10 +- .../00_intermediate_ruby_primer/app/repl.rb | 0 samples/01_rendering_basics/01_labels/app/main.rb | 10 +- .../03_solids_borders/app/main.rb | 2 +- samples/01_rendering_basics/05_sounds/app/main.rb | 163 +--- .../01_rendering_basics/06_audio_mixer/app/main.rb | 160 ---- .../06_audio_mixer/license-for-audio.txt | 48 - .../06_audio_mixer/license-for-sample.txt | 9 - .../06_audio_mixer/sounds/1.wav | Bin 409170 -> 0 bytes .../06_audio_mixer/sounds/2.wav | Bin 22374 -> 0 bytes .../06_audio_mixer/sounds/3.wav | Bin 420476 -> 0 bytes .../06_audio_mixer/sounds/4.wav | Bin 91358 -> 0 bytes .../06_audio_mixer/sounds/5.wav | Bin 117354 -> 0 bytes .../06_audio_mixer/sounds/6.ogg | Bin 330572 -> 0 bytes .../07_sound_synthesis/app/main.rb | 593 ------------ .../07_sound_synthesis/license-for-sample.txt | 9 - .../07_sound_synthesis/metadata/game_metadata.txt | 6 - .../07_sound_synthesis/metadata/icon.png | Bin 157056 -> 0 bytes .../07_sound_synthesis/sprites/square-black.png | Bin 250 -> 0 bytes .../07_sound_synthesis/sprites/square-white.png | Bin 279 -> 0 bytes samples/02_input_basics/01_keyboard/app/main.rb | 53 +- .../02_input_basics/01_moving_a_sprite/app/main.rb | 30 + .../01_moving_a_sprite/license-for-sample.txt | 9 + .../01_moving_a_sprite/sprites/square/green.png | Bin 0 -> 283 bytes samples/02_input_basics/02_mouse/app/main.rb | 12 +- .../03_mouse_point_to_rect/app/main.rb | 16 +- .../04_mouse_rect_to_rect/app/main.rb | 18 +- samples/02_input_basics/05_controller/app/main.rb | 68 +- samples/02_input_basics/06_touch/app/main.rb | 11 +- .../01_animation_using_separate_pngs/app/main.rb | 19 +- .../02_animation_using_sprite_sheet/replay.txt | 241 +++++ .../03_animation_states/replay.txt | 182 ++++ .../04_color_and_rotation/app/main.rb | 8 +- .../01_simple/app/main.rb | 6 +- .../02_moving_objects/app/main.rb | 4 +- .../04_box_collision/app/main.rb | 6 +- .../05_box_collision_2/app/main.rb | 4 +- .../06_box_collision_3/app/main.rb | 4 +- .../06_box_collision_3/replay.txt | 687 ++++++++++++++ .../06_jump_physics/app/main.rb | 195 ---- .../06_jump_physics/replay.txt | 124 --- .../07_jump_physics/app/main.rb | 3 +- .../08_bouncing_on_collision/app/block.rb | 8 +- .../08_bouncing_on_collision/app/main.rb | 2 +- .../08_bouncing_on_collision/app/peg.rb | 18 +- .../08_bouncing_on_collision/app/vector2d.rb | 2 +- .../docs/LinearCollider.md | 26 +- .../09_arbitrary_collision/app/linear_collider.rb | 4 +- .../09_arbitrary_collision/app/main.rb | 2 +- .../09_arbitrary_collision/app/vector2d.rb | 2 +- .../09_arbitrary_collision/docs/LinearCollider.md | 26 +- .../app/linear_collider.rb | 6 +- .../app/vector2d.rb | 2 +- samples/05_mouse/01_mouse_click/app/main.rb | 4 +- samples/05_mouse/02_mouse_move/app/main.rb | 6 +- .../05_mouse/03_mouse_move_paint_app/app/main.rb | 3 +- samples/05_mouse/04_coordinate_systems/app/main.rb | 4 + samples/06_save_load/01_save_load_game/app/main.rb | 9 +- .../07_advanced_audio/01_audio_mixer/app/main.rb | 376 ++++++++ .../01_audio_mixer/app/server_ip_address.txt | 1 + .../01_audio_mixer/license-for-audio.txt | 48 + .../01_audio_mixer/license-for-sample.txt | 9 + .../01_audio_mixer/metadata/game_metadata.txt | 6 + .../01_audio_mixer/metadata/icon.png | Bin 0 -> 157056 bytes .../01_audio_mixer/metadata/ios_metadata.txt | 9 + .../07_advanced_audio/01_audio_mixer/replay.txt | 995 +++++++++++++++++++++ .../01_audio_mixer/sounds/drum.wav | Bin 0 -> 420476 bytes .../01_audio_mixer/sounds/music.ogg | Bin 0 -> 330572 bytes .../01_audio_mixer/sounds/splash.wav | Bin 0 -> 22374 bytes .../01_audio_mixer/sounds/spring.wav | Bin 0 -> 117354 bytes .../01_audio_mixer/sounds/tada.wav | Bin 0 -> 409170 bytes .../01_audio_mixer/sounds/tink.wav | Bin 0 -> 91358 bytes .../02_sound_synthesis/app/main.rb | 593 ++++++++++++ .../02_sound_synthesis/license-for-sample.txt | 9 + .../02_sound_synthesis/metadata/game_metadata.txt | 6 + .../02_sound_synthesis/metadata/icon.png | Bin 0 -> 157056 bytes .../02_sound_synthesis/replay.txt | 237 +++++ .../02_sound_synthesis/sprites/square-white.png | Bin 0 -> 279 bytes .../02_render_targets_with_alphas/app/main.rb | 95 -- .../license-for-sample.txt | 9 - .../03_render_target_viewports/app/main.rb | 35 +- .../04_render_primitive_hierarchies/app/main.rb | 2 + .../05_render_primitives_as_hash/app/main.rb | 15 +- .../07_simple_camera/app/main.rb | 93 ++ .../07_simple_camera/replay.txt | 232 +++++ .../07_splitscreen_camera/app/main.rb | 395 -------- .../07_splitscreen_camera/run.bat | 6 - .../sprites/player/player_down_standing.png | Bin 186 -> 0 bytes .../sprites/player/player_left_standing.png | Bin 173 -> 0 bytes .../sprites/player/player_right_standing.png | Bin 170 -> 0 bytes .../sprites/player/player_up_standing.png | Bin 165 -> 0 bytes .../sprites/rooms/camera_room.png | Bin 2469 -> 0 bytes .../08_splitscreen_camera/app/main.rb | 395 ++++++++ .../08_splitscreen_camera/replay.txt | 226 +++++ .../sprites/player/player_down_standing.png | Bin 0 -> 186 bytes .../sprites/player/player_left_standing.png | Bin 0 -> 173 bytes .../sprites/player/player_right_standing.png | Bin 0 -> 170 bytes .../sprites/player/player_up_standing.png | Bin 0 -> 165 bytes .../sprites/rooms/camera_room.png | Bin 0 -> 2469 bytes .../08_z_targeting_camera/app/main.rb | 106 --- .../metadata/game_metadata.txt | 6 - .../08_z_targeting_camera/metadata/icon.png | Bin 14417 -> 0 bytes .../08_z_targeting_camera/sprites/arena.png | Bin 1072678 -> 0 bytes .../08_z_targeting_camera/sprites/player.png | Bin 9510 -> 0 bytes .../08_z_targeting_camera/sprites/square/black.png | Bin 250 -> 0 bytes .../09_z_targeting_camera/app/main.rb | 106 +++ .../metadata/game_metadata.txt | 6 + .../09_z_targeting_camera/metadata/icon.png | Bin 0 -> 14417 bytes .../09_z_targeting_camera/replay.txt | 185 ++++ .../09_z_targeting_camera/sprites/arena.png | Bin 0 -> 1072678 bytes .../09_z_targeting_camera/sprites/player.png | Bin 0 -> 9510 bytes .../09_z_targeting_camera/sprites/square/black.png | Bin 0 -> 250 bytes .../10_blend_modes/app/main.rb | 49 + .../10_blend_modes/sprites/blue-feathered.png | Bin 0 -> 7204 bytes .../09_performance/01_sprites_as_hash/app/main.rb | 6 +- .../02_sprites_as_entities/app/main.rb | 8 +- .../03_sprites_as_strict_entities/app/main.rb | 6 +- .../04_sprites_as_classes/app/main.rb | 7 +- .../05_static_sprites_as_classes/app/main.rb | 9 +- .../app/main.rb | 20 +- .../09_performance/07_collision_limits/app/main.rb | 2 + .../03_unit_tests/benchmark_api_tests.rb | 43 + .../03_unit_tests/pretty_format_tests.rb | 130 +++ .../03_unit_tests/run-bash.sh | 4 - .../03_unit_tests/run-tests.sh | 27 +- .../01_breadth_first_search/app/main.rb | 176 ++-- .../02_detailed_breadth_first_search/app/main.rb | 2 +- .../06_heuristic/app/main.rb | 218 ++--- .../07_heuristic_with_walls/app/main.rb | 218 ++--- samples/99_genre_3d/3d_cube/app/main.rb | 50 -- .../99_genre_3d/3d_cube/sprites/square-blue.png | Bin 283 -> 0 bytes samples/99_genre_arcade/snakemoji/app/main.rb | 6 +- samples/99_genre_arcade/twinstick/app/main.rb | 2 +- .../craft_game_starting_point/app/main.rb | 32 +- .../farming_game_starting_point/app/main.rb | 84 ++ .../farming_game_starting_point/app/repl.rb | 307 +++++++ .../farming_game_starting_point/app/tests.rb | 29 + .../sprites/background.png | Bin 0 -> 29236 bytes .../animation_creator_starting_point/app/main.rb | 38 +- .../tile_editor_starting_point/app/main.rb | 4 + .../classics_jam/app/main.rb | 213 +++++ .../classics_jam/sprites/circle/green.png | Bin 0 -> 2887 bytes .../classics_jam/sprites/square/blue.png | Bin 0 -> 283 bytes .../classics_jam/sprites/square/gray.png | Bin 0 -> 251 bytes .../classics_jam/sprites/square/red.png | Bin 0 -> 274 bytes .../01_special_move_inputs/app/main.rb | 297 ++++++ .../sprites/isometric/indigo.png | Bin 0 -> 361 bytes .../sprites/isometric/violet.png | Bin 0 -> 361 bytes .../01_special_move_inputs/sprites/square/blue.png | Bin 0 -> 283 bytes .../sprites/square/indigo.png | Bin 0 -> 283 bytes .../sprites/square/white.png | Bin 0 -> 279 bytes .../sprites/square/yellow.png | Bin 0 -> 286 bytes samples/99_genre_lowrez/nokia_3310/app/main.rb | 10 +- samples/99_genre_lowrez/nokia_3310/app/nokia.rb | 4 +- .../99_genre_lowrez/resolution_64x64/app/main.rb | 14 +- .../99_genre_platformer/clepto_frog/app/main.rb | 2 +- .../99_genre_platformer/gorillas_basic/app/repl.rb | 17 - .../the_little_probe/app/main.rb | 2 +- .../choose_your_own_adventure/app/decision.rb | 2 +- .../choose_your_own_adventure/app/main.rb | 6 +- .../return_of_serenity/app/repl.rb | 1 - .../return_of_serenity/app/storyline_anka.rb | 8 +- .../return_of_serenity/app/storyline_day_one.rb | 2 +- .../app/storyline_serenity_bio.rb | 6 +- .../01_roguelike_starting_point/app/main.rb | 2 +- .../app/sprite_lookup.rb | 2 +- .../02_roguelike_line_of_sight/app/main.rb | 2 +- .../roguelike_line_of_sight/app/constants.rb | 8 - .../roguelike_line_of_sight/app/legend.rb | 65 -- .../roguelike_line_of_sight/app/main.rb | 97 -- .../roguelike_line_of_sight/app/sprite_lookup.rb | 124 --- .../roguelike_line_of_sight/license-for-sample.txt | 9 - .../sprites/simple-mood-16x16.png | Bin 14424 -> 0 bytes .../roguelike_starting_point/app/main.rb | 438 --------- .../license-for-sample.txt | 9 - .../roguelike_starting_point/replay.txt | 555 ------------ .../gameboard_movement/app/main.rb | 529 ----------- .../gameboard_movement/sprites/border-black.png | Bin 908 -> 0 bytes .../gameboard_movement/sprites/circle-black.png | Bin 1882 -> 0 bytes .../gameboard_movement/sprites/circle-blue.png | Bin 2901 -> 0 bytes .../gameboard_movement/sprites/circle-gray.png | Bin 3006 -> 0 bytes .../gameboard_movement/sprites/circle-green.png | Bin 2887 -> 0 bytes .../gameboard_movement/sprites/circle-indigo.png | Bin 2433 -> 0 bytes .../gameboard_movement/sprites/circle-orange.png | Bin 2670 -> 0 bytes .../gameboard_movement/sprites/circle-red.png | Bin 2233 -> 0 bytes .../gameboard_movement/sprites/circle-violet.png | Bin 2439 -> 0 bytes .../gameboard_movement/sprites/circle-white.png | Bin 1754 -> 0 bytes .../gameboard_movement/sprites/circle-yellow.png | Bin 2456 -> 0 bytes .../gameboard_movement/sprites/dragon-0.png | Bin 12896 -> 0 bytes .../gameboard_movement/sprites/dragon-1.png | Bin 2964 -> 0 bytes .../gameboard_movement/sprites/dragon-2.png | Bin 3047 -> 0 bytes .../gameboard_movement/sprites/dragon-3.png | Bin 2655 -> 0 bytes .../gameboard_movement/sprites/dragon-4.png | Bin 2725 -> 0 bytes .../gameboard_movement/sprites/dragon-5.png | Bin 2655 -> 0 bytes .../gameboard_movement/sprites/explosion-0.png | Bin 267 -> 0 bytes .../gameboard_movement/sprites/explosion-1.png | Bin 4585 -> 0 bytes .../gameboard_movement/sprites/explosion-2.png | Bin 4675 -> 0 bytes .../gameboard_movement/sprites/explosion-3.png | Bin 4724 -> 0 bytes .../gameboard_movement/sprites/explosion-4.png | Bin 4773 -> 0 bytes .../gameboard_movement/sprites/explosion-5.png | Bin 4742 -> 0 bytes .../gameboard_movement/sprites/explosion-6.png | Bin 4665 -> 0 bytes .../gameboard_movement/sprites/explosion-sheet.png | Bin 2584 -> 0 bytes .../gameboard_movement/sprites/hexagon-black.png | Bin 2602 -> 0 bytes .../gameboard_movement/sprites/hexagon-blue.png | Bin 4842 -> 0 bytes .../gameboard_movement/sprites/hexagon-gray.png | Bin 5184 -> 0 bytes .../gameboard_movement/sprites/hexagon-green.png | Bin 4695 -> 0 bytes .../gameboard_movement/sprites/hexagon-indigo.png | Bin 4918 -> 0 bytes .../gameboard_movement/sprites/hexagon-orange.png | Bin 4825 -> 0 bytes .../gameboard_movement/sprites/hexagon-red.png | Bin 3753 -> 0 bytes .../gameboard_movement/sprites/hexagon-violet.png | Bin 5069 -> 0 bytes .../gameboard_movement/sprites/hexagon-white.png | Bin 5326 -> 0 bytes .../gameboard_movement/sprites/hexagon-yellow.png | Bin 5249 -> 0 bytes .../gameboard_movement/sprites/isometric-black.png | Bin 264 -> 0 bytes .../gameboard_movement/sprites/isometric-blue.png | Bin 361 -> 0 bytes .../gameboard_movement/sprites/isometric-gray.png | Bin 493 -> 0 bytes .../gameboard_movement/sprites/isometric-green.png | Bin 361 -> 0 bytes .../sprites/isometric-indigo.png | Bin 361 -> 0 bytes .../sprites/isometric-orange.png | Bin 361 -> 0 bytes .../gameboard_movement/sprites/isometric-red.png | Bin 361 -> 0 bytes .../sprites/isometric-violet.png | Bin 361 -> 0 bytes .../gameboard_movement/sprites/isometric-white.png | Bin 361 -> 0 bytes .../sprites/isometric-yellow.png | Bin 361 -> 0 bytes .../gameboard_movement/sprites/roy-0.png | Bin 20775 -> 0 bytes .../gameboard_movement/sprites/roy-1.png | Bin 3132 -> 0 bytes .../gameboard_movement/sprites/square-black.png | Bin 250 -> 0 bytes .../gameboard_movement/sprites/square-blue.png | Bin 283 -> 0 bytes .../gameboard_movement/sprites/square-gray.png | Bin 251 -> 0 bytes .../gameboard_movement/sprites/square-green.png | Bin 283 -> 0 bytes .../gameboard_movement/sprites/square-indigo.png | Bin 283 -> 0 bytes .../gameboard_movement/sprites/square-orange.png | Bin 282 -> 0 bytes .../gameboard_movement/sprites/square-red.png | Bin 274 -> 0 bytes .../gameboard_movement/sprites/square-violet.png | Bin 284 -> 0 bytes .../gameboard_movement/sprites/square-white.png | Bin 279 -> 0 bytes .../gameboard_movement/sprites/square-yellow.png | Bin 286 -> 0 bytes .../gameboard_movement/sprites/star.png | Bin 711 -> 0 bytes .../gameboard_movement/sprites/water-1.png | Bin 656794 -> 0 bytes .../gameboard_movement/sprites/water-2.png | Bin 655810 -> 0 bytes .../isometric_grid/app/main.rb | 8 +- .../99_genre_rpg_tactical/taking_turns/app/main.rb | 189 ---- samples/99_genre_rpg_tactical/taking_turns/run.bat | 6 - .../taking_turns/sprites/circle-blue.png | Bin 2901 -> 0 bytes .../taking_turns/sprites/circle-gray.png | Bin 3006 -> 0 bytes .../taking_turns/sprites/circle-green.png | Bin 2887 -> 0 bytes .../taking_turns/sprites/circle-orange.png | Bin 2670 -> 0 bytes .../taking_turns/sprites/explosion-0.png | Bin 267 -> 0 bytes .../taking_turns/sprites/explosion-1.png | Bin 4585 -> 0 bytes .../taking_turns/sprites/explosion-2.png | Bin 4675 -> 0 bytes .../taking_turns/sprites/explosion-3.png | Bin 4724 -> 0 bytes .../taking_turns/sprites/explosion-4.png | Bin 4773 -> 0 bytes .../taking_turns/sprites/explosion-5.png | Bin 4742 -> 0 bytes .../taking_turns/sprites/explosion-6.png | Bin 4665 -> 0 bytes .../taking_turns/sprites/star.png | Bin 711 -> 0 bytes .../topdown_starting_point/app/main.rb | 1 + 253 files changed, 6514 insertions(+), 4626 deletions(-) delete mode 100644 samples/00_learn_ruby_optional/00_intermediate_ruby_primer/app/repl.rb delete mode 100644 samples/01_rendering_basics/06_audio_mixer/app/main.rb delete mode 100644 samples/01_rendering_basics/06_audio_mixer/license-for-audio.txt delete mode 100644 samples/01_rendering_basics/06_audio_mixer/license-for-sample.txt delete mode 100644 samples/01_rendering_basics/06_audio_mixer/sounds/1.wav delete mode 100644 samples/01_rendering_basics/06_audio_mixer/sounds/2.wav delete mode 100644 samples/01_rendering_basics/06_audio_mixer/sounds/3.wav delete mode 100644 samples/01_rendering_basics/06_audio_mixer/sounds/4.wav delete mode 100644 samples/01_rendering_basics/06_audio_mixer/sounds/5.wav delete mode 100644 samples/01_rendering_basics/06_audio_mixer/sounds/6.ogg delete mode 100644 samples/01_rendering_basics/07_sound_synthesis/app/main.rb delete mode 100644 samples/01_rendering_basics/07_sound_synthesis/license-for-sample.txt delete mode 100644 samples/01_rendering_basics/07_sound_synthesis/metadata/game_metadata.txt delete mode 100644 samples/01_rendering_basics/07_sound_synthesis/metadata/icon.png delete mode 100644 samples/01_rendering_basics/07_sound_synthesis/sprites/square-black.png delete mode 100644 samples/01_rendering_basics/07_sound_synthesis/sprites/square-white.png create mode 100644 samples/02_input_basics/01_moving_a_sprite/app/main.rb create mode 100644 samples/02_input_basics/01_moving_a_sprite/license-for-sample.txt create mode 100644 samples/02_input_basics/01_moving_a_sprite/sprites/square/green.png create mode 100644 samples/03_rendering_sprites/02_animation_using_sprite_sheet/replay.txt create mode 100644 samples/03_rendering_sprites/03_animation_states/replay.txt create mode 100644 samples/04_physics_and_collisions/06_box_collision_3/replay.txt delete mode 100644 samples/04_physics_and_collisions/06_jump_physics/app/main.rb delete mode 100644 samples/04_physics_and_collisions/06_jump_physics/replay.txt create mode 100644 samples/07_advanced_audio/01_audio_mixer/app/main.rb create mode 100644 samples/07_advanced_audio/01_audio_mixer/app/server_ip_address.txt create mode 100644 samples/07_advanced_audio/01_audio_mixer/license-for-audio.txt create mode 100644 samples/07_advanced_audio/01_audio_mixer/license-for-sample.txt create mode 100644 samples/07_advanced_audio/01_audio_mixer/metadata/game_metadata.txt create mode 100644 samples/07_advanced_audio/01_audio_mixer/metadata/icon.png create mode 100644 samples/07_advanced_audio/01_audio_mixer/metadata/ios_metadata.txt create mode 100644 samples/07_advanced_audio/01_audio_mixer/replay.txt create mode 100644 samples/07_advanced_audio/01_audio_mixer/sounds/drum.wav create mode 100644 samples/07_advanced_audio/01_audio_mixer/sounds/music.ogg create mode 100644 samples/07_advanced_audio/01_audio_mixer/sounds/splash.wav create mode 100644 samples/07_advanced_audio/01_audio_mixer/sounds/spring.wav create mode 100644 samples/07_advanced_audio/01_audio_mixer/sounds/tada.wav create mode 100644 samples/07_advanced_audio/01_audio_mixer/sounds/tink.wav create mode 100644 samples/07_advanced_audio/02_sound_synthesis/app/main.rb create mode 100644 samples/07_advanced_audio/02_sound_synthesis/license-for-sample.txt create mode 100644 samples/07_advanced_audio/02_sound_synthesis/metadata/game_metadata.txt create mode 100644 samples/07_advanced_audio/02_sound_synthesis/metadata/icon.png create mode 100644 samples/07_advanced_audio/02_sound_synthesis/replay.txt create mode 100644 samples/07_advanced_audio/02_sound_synthesis/sprites/square-white.png delete mode 100644 samples/07_advanced_rendering/02_render_targets_with_alphas/app/main.rb delete mode 100644 samples/07_advanced_rendering/02_render_targets_with_alphas/license-for-sample.txt create mode 100644 samples/07_advanced_rendering/07_simple_camera/app/main.rb create mode 100644 samples/07_advanced_rendering/07_simple_camera/replay.txt delete mode 100644 samples/07_advanced_rendering/07_splitscreen_camera/app/main.rb delete mode 100644 samples/07_advanced_rendering/07_splitscreen_camera/run.bat delete mode 100644 samples/07_advanced_rendering/07_splitscreen_camera/sprites/player/player_down_standing.png delete mode 100644 samples/07_advanced_rendering/07_splitscreen_camera/sprites/player/player_left_standing.png delete mode 100644 samples/07_advanced_rendering/07_splitscreen_camera/sprites/player/player_right_standing.png delete mode 100644 samples/07_advanced_rendering/07_splitscreen_camera/sprites/player/player_up_standing.png delete mode 100644 samples/07_advanced_rendering/07_splitscreen_camera/sprites/rooms/camera_room.png create mode 100644 samples/07_advanced_rendering/08_splitscreen_camera/app/main.rb create mode 100644 samples/07_advanced_rendering/08_splitscreen_camera/replay.txt create mode 100644 samples/07_advanced_rendering/08_splitscreen_camera/sprites/player/player_down_standing.png create mode 100644 samples/07_advanced_rendering/08_splitscreen_camera/sprites/player/player_left_standing.png create mode 100644 samples/07_advanced_rendering/08_splitscreen_camera/sprites/player/player_right_standing.png create mode 100644 samples/07_advanced_rendering/08_splitscreen_camera/sprites/player/player_up_standing.png create mode 100644 samples/07_advanced_rendering/08_splitscreen_camera/sprites/rooms/camera_room.png delete mode 100644 samples/07_advanced_rendering/08_z_targeting_camera/app/main.rb delete mode 100644 samples/07_advanced_rendering/08_z_targeting_camera/metadata/game_metadata.txt delete mode 100644 samples/07_advanced_rendering/08_z_targeting_camera/metadata/icon.png delete mode 100644 samples/07_advanced_rendering/08_z_targeting_camera/sprites/arena.png delete mode 100644 samples/07_advanced_rendering/08_z_targeting_camera/sprites/player.png delete mode 100644 samples/07_advanced_rendering/08_z_targeting_camera/sprites/square/black.png create mode 100644 samples/07_advanced_rendering/09_z_targeting_camera/app/main.rb create mode 100644 samples/07_advanced_rendering/09_z_targeting_camera/metadata/game_metadata.txt create mode 100644 samples/07_advanced_rendering/09_z_targeting_camera/metadata/icon.png create mode 100644 samples/07_advanced_rendering/09_z_targeting_camera/replay.txt create mode 100644 samples/07_advanced_rendering/09_z_targeting_camera/sprites/arena.png create mode 100644 samples/07_advanced_rendering/09_z_targeting_camera/sprites/player.png create mode 100644 samples/07_advanced_rendering/09_z_targeting_camera/sprites/square/black.png create mode 100644 samples/07_advanced_rendering/10_blend_modes/app/main.rb create mode 100644 samples/07_advanced_rendering/10_blend_modes/sprites/blue-feathered.png create mode 100644 samples/10_advanced_debugging/03_unit_tests/benchmark_api_tests.rb create mode 100644 samples/10_advanced_debugging/03_unit_tests/pretty_format_tests.rb delete mode 100644 samples/10_advanced_debugging/03_unit_tests/run-bash.sh delete mode 100644 samples/99_genre_3d/3d_cube/app/main.rb delete mode 100644 samples/99_genre_3d/3d_cube/sprites/square-blue.png create mode 100644 samples/99_genre_crafting/farming_game_starting_point/app/main.rb create mode 100644 samples/99_genre_crafting/farming_game_starting_point/app/repl.rb create mode 100644 samples/99_genre_crafting/farming_game_starting_point/app/tests.rb create mode 100644 samples/99_genre_crafting/farming_game_starting_point/sprites/background.png create mode 100644 samples/99_genre_dungeon_crawl/classics_jam/app/main.rb create mode 100644 samples/99_genre_dungeon_crawl/classics_jam/sprites/circle/green.png create mode 100644 samples/99_genre_dungeon_crawl/classics_jam/sprites/square/blue.png create mode 100644 samples/99_genre_dungeon_crawl/classics_jam/sprites/square/gray.png create mode 100644 samples/99_genre_dungeon_crawl/classics_jam/sprites/square/red.png create mode 100644 samples/99_genre_fighting/01_special_move_inputs/app/main.rb create mode 100644 samples/99_genre_fighting/01_special_move_inputs/sprites/isometric/indigo.png create mode 100644 samples/99_genre_fighting/01_special_move_inputs/sprites/isometric/violet.png create mode 100644 samples/99_genre_fighting/01_special_move_inputs/sprites/square/blue.png create mode 100644 samples/99_genre_fighting/01_special_move_inputs/sprites/square/indigo.png create mode 100644 samples/99_genre_fighting/01_special_move_inputs/sprites/square/white.png create mode 100644 samples/99_genre_fighting/01_special_move_inputs/sprites/square/yellow.png delete mode 100644 samples/99_genre_platformer/gorillas_basic/app/repl.rb delete mode 100644 samples/99_genre_rpg_narrative/return_of_serenity/app/repl.rb delete mode 100644 samples/99_genre_rpg_roguelike/roguelike_line_of_sight/app/constants.rb delete mode 100644 samples/99_genre_rpg_roguelike/roguelike_line_of_sight/app/legend.rb delete mode 100644 samples/99_genre_rpg_roguelike/roguelike_line_of_sight/app/main.rb delete mode 100644 samples/99_genre_rpg_roguelike/roguelike_line_of_sight/app/sprite_lookup.rb delete mode 100644 samples/99_genre_rpg_roguelike/roguelike_line_of_sight/license-for-sample.txt delete mode 100644 samples/99_genre_rpg_roguelike/roguelike_line_of_sight/sprites/simple-mood-16x16.png delete mode 100644 samples/99_genre_rpg_roguelike/roguelike_starting_point/app/main.rb delete mode 100644 samples/99_genre_rpg_roguelike/roguelike_starting_point/license-for-sample.txt delete mode 100644 samples/99_genre_rpg_roguelike/roguelike_starting_point/replay.txt delete mode 100644 samples/99_genre_rpg_tactical/gameboard_movement/app/main.rb delete mode 100644 samples/99_genre_rpg_tactical/gameboard_movement/sprites/border-black.png delete mode 100644 samples/99_genre_rpg_tactical/gameboard_movement/sprites/circle-black.png delete mode 100644 samples/99_genre_rpg_tactical/gameboard_movement/sprites/circle-blue.png delete mode 100644 samples/99_genre_rpg_tactical/gameboard_movement/sprites/circle-gray.png delete mode 100644 samples/99_genre_rpg_tactical/gameboard_movement/sprites/circle-green.png delete mode 100644 samples/99_genre_rpg_tactical/gameboard_movement/sprites/circle-indigo.png delete mode 100644 samples/99_genre_rpg_tactical/gameboard_movement/sprites/circle-orange.png delete mode 100644 samples/99_genre_rpg_tactical/gameboard_movement/sprites/circle-red.png delete mode 100644 samples/99_genre_rpg_tactical/gameboard_movement/sprites/circle-violet.png delete mode 100644 samples/99_genre_rpg_tactical/gameboard_movement/sprites/circle-white.png delete mode 100644 samples/99_genre_rpg_tactical/gameboard_movement/sprites/circle-yellow.png delete mode 100644 samples/99_genre_rpg_tactical/gameboard_movement/sprites/dragon-0.png delete mode 100644 samples/99_genre_rpg_tactical/gameboard_movement/sprites/dragon-1.png delete mode 100644 samples/99_genre_rpg_tactical/gameboard_movement/sprites/dragon-2.png delete mode 100644 samples/99_genre_rpg_tactical/gameboard_movement/sprites/dragon-3.png delete mode 100644 samples/99_genre_rpg_tactical/gameboard_movement/sprites/dragon-4.png delete mode 100644 samples/99_genre_rpg_tactical/gameboard_movement/sprites/dragon-5.png delete mode 100644 samples/99_genre_rpg_tactical/gameboard_movement/sprites/explosion-0.png delete mode 100644 samples/99_genre_rpg_tactical/gameboard_movement/sprites/explosion-1.png delete mode 100644 samples/99_genre_rpg_tactical/gameboard_movement/sprites/explosion-2.png delete mode 100644 samples/99_genre_rpg_tactical/gameboard_movement/sprites/explosion-3.png delete mode 100644 samples/99_genre_rpg_tactical/gameboard_movement/sprites/explosion-4.png delete mode 100644 samples/99_genre_rpg_tactical/gameboard_movement/sprites/explosion-5.png delete mode 100644 samples/99_genre_rpg_tactical/gameboard_movement/sprites/explosion-6.png delete mode 100644 samples/99_genre_rpg_tactical/gameboard_movement/sprites/explosion-sheet.png delete mode 100644 samples/99_genre_rpg_tactical/gameboard_movement/sprites/hexagon-black.png delete mode 100644 samples/99_genre_rpg_tactical/gameboard_movement/sprites/hexagon-blue.png delete mode 100644 samples/99_genre_rpg_tactical/gameboard_movement/sprites/hexagon-gray.png delete mode 100644 samples/99_genre_rpg_tactical/gameboard_movement/sprites/hexagon-green.png delete mode 100644 samples/99_genre_rpg_tactical/gameboard_movement/sprites/hexagon-indigo.png delete mode 100644 samples/99_genre_rpg_tactical/gameboard_movement/sprites/hexagon-orange.png delete mode 100644 samples/99_genre_rpg_tactical/gameboard_movement/sprites/hexagon-red.png delete mode 100644 samples/99_genre_rpg_tactical/gameboard_movement/sprites/hexagon-violet.png delete mode 100644 samples/99_genre_rpg_tactical/gameboard_movement/sprites/hexagon-white.png delete mode 100644 samples/99_genre_rpg_tactical/gameboard_movement/sprites/hexagon-yellow.png delete mode 100644 samples/99_genre_rpg_tactical/gameboard_movement/sprites/isometric-black.png delete mode 100644 samples/99_genre_rpg_tactical/gameboard_movement/sprites/isometric-blue.png delete mode 100644 samples/99_genre_rpg_tactical/gameboard_movement/sprites/isometric-gray.png delete mode 100644 samples/99_genre_rpg_tactical/gameboard_movement/sprites/isometric-green.png delete mode 100644 samples/99_genre_rpg_tactical/gameboard_movement/sprites/isometric-indigo.png delete mode 100644 samples/99_genre_rpg_tactical/gameboard_movement/sprites/isometric-orange.png delete mode 100644 samples/99_genre_rpg_tactical/gameboard_movement/sprites/isometric-red.png delete mode 100644 samples/99_genre_rpg_tactical/gameboard_movement/sprites/isometric-violet.png delete mode 100644 samples/99_genre_rpg_tactical/gameboard_movement/sprites/isometric-white.png delete mode 100644 samples/99_genre_rpg_tactical/gameboard_movement/sprites/isometric-yellow.png delete mode 100644 samples/99_genre_rpg_tactical/gameboard_movement/sprites/roy-0.png delete mode 100644 samples/99_genre_rpg_tactical/gameboard_movement/sprites/roy-1.png delete mode 100644 samples/99_genre_rpg_tactical/gameboard_movement/sprites/square-black.png delete mode 100644 samples/99_genre_rpg_tactical/gameboard_movement/sprites/square-blue.png delete mode 100644 samples/99_genre_rpg_tactical/gameboard_movement/sprites/square-gray.png delete mode 100644 samples/99_genre_rpg_tactical/gameboard_movement/sprites/square-green.png delete mode 100644 samples/99_genre_rpg_tactical/gameboard_movement/sprites/square-indigo.png delete mode 100644 samples/99_genre_rpg_tactical/gameboard_movement/sprites/square-orange.png delete mode 100644 samples/99_genre_rpg_tactical/gameboard_movement/sprites/square-red.png delete mode 100644 samples/99_genre_rpg_tactical/gameboard_movement/sprites/square-violet.png delete mode 100644 samples/99_genre_rpg_tactical/gameboard_movement/sprites/square-white.png delete mode 100644 samples/99_genre_rpg_tactical/gameboard_movement/sprites/square-yellow.png delete mode 100644 samples/99_genre_rpg_tactical/gameboard_movement/sprites/star.png delete mode 100644 samples/99_genre_rpg_tactical/gameboard_movement/sprites/water-1.png delete mode 100644 samples/99_genre_rpg_tactical/gameboard_movement/sprites/water-2.png delete mode 100644 samples/99_genre_rpg_tactical/taking_turns/app/main.rb delete mode 100644 samples/99_genre_rpg_tactical/taking_turns/run.bat delete mode 100644 samples/99_genre_rpg_tactical/taking_turns/sprites/circle-blue.png delete mode 100644 samples/99_genre_rpg_tactical/taking_turns/sprites/circle-gray.png delete mode 100644 samples/99_genre_rpg_tactical/taking_turns/sprites/circle-green.png delete mode 100644 samples/99_genre_rpg_tactical/taking_turns/sprites/circle-orange.png delete mode 100644 samples/99_genre_rpg_tactical/taking_turns/sprites/explosion-0.png delete mode 100644 samples/99_genre_rpg_tactical/taking_turns/sprites/explosion-1.png delete mode 100644 samples/99_genre_rpg_tactical/taking_turns/sprites/explosion-2.png delete mode 100644 samples/99_genre_rpg_tactical/taking_turns/sprites/explosion-3.png delete mode 100644 samples/99_genre_rpg_tactical/taking_turns/sprites/explosion-4.png delete mode 100644 samples/99_genre_rpg_tactical/taking_turns/sprites/explosion-5.png delete mode 100644 samples/99_genre_rpg_tactical/taking_turns/sprites/explosion-6.png delete mode 100644 samples/99_genre_rpg_tactical/taking_turns/sprites/star.png diff --git a/samples/00_learn_ruby_optional/00_beginner_ruby_primer/app/main.rb b/samples/00_learn_ruby_optional/00_beginner_ruby_primer/app/main.rb index 711ca74..6822cf3 100644 --- a/samples/00_learn_ruby_optional/00_beginner_ruby_primer/app/main.rb +++ b/samples/00_learn_ruby_optional/00_beginner_ruby_primer/app/main.rb @@ -83,8 +83,8 @@ def tick_reset_button end end -def separator - @separator = "=" * 80 +def seperator + @seperator = "=" * 80 end def tick_intro @@ -286,11 +286,11 @@ def queue_message message $gtk.args.state.messages << message last_three = [$gtk.console.log[-3], $gtk.console.log[-2], $gtk.console.log[-1]].reject_nil $gtk.console.log.clear - puts separator + puts seperator $gtk.console.log += last_three - puts separator + puts seperator puts message - puts separator + puts seperator end def console_has? message diff --git a/samples/00_learn_ruby_optional/00_intermediate_ruby_primer/app/repl.rb b/samples/00_learn_ruby_optional/00_intermediate_ruby_primer/app/repl.rb deleted file mode 100644 index e69de29..0000000 diff --git a/samples/01_rendering_basics/01_labels/app/main.rb b/samples/01_rendering_basics/01_labels/app/main.rb index 8a5e866..837954f 100644 --- a/samples/01_rendering_basics/01_labels/app/main.rb +++ b/samples/01_rendering_basics/01_labels/app/main.rb @@ -2,12 +2,12 @@ APIs listing that haven't been encountered in a previous sample apps: -- args.outputs.labels: An array. Values in this array generate labels on +- args.outputs.labels: An array. Values in this array generate labels the screen. - args.grid.(left|right|top|bottom): Pixel value for the boundaries of the virtual 720 p screen (Dragon Ruby Game Toolkits's virtual resolution is always 1280x720). - Numeric#shift_(left|right|up|down): Shifts the Numeric in the correct direction - by adding or subtracting. + by adding or subracting. =end @@ -27,7 +27,7 @@ APIs listing that haven't been encountered in a previous sample apps: # The tick method is called by DragonRuby every frame # args contains all the information regarding the game. def tick args - tick_instructions args, "Sample app shows different versions of label sizes and alignments. And how to use hashes instead of arrays." + tick_instructions args, "Sample app shows different version of label sizes and alignments. And how to use hashes instead of arrays." # Here are some examples of simple labels, with the minimum number of parameters # Note that the default values for the other parameters are 0, except for Alpha which is 255 and Font Style which is the default font args.outputs.labels << [400, 620, "Here is a label with just an x, y, and text"] @@ -67,7 +67,7 @@ def tick args g: 0, b: 200, a: 255, - font: "manaspc.ttf" }.label + font: "manaspc.ttf" }.label! # Primitives can hold anything, and can be given a label in the following forms args.outputs.primitives << [690 + 150, 330 - 80, "Custom font (.primitives Array)", 0, 1, 125, 0, 200, 255, "manaspc.ttf" ].label @@ -81,7 +81,7 @@ def tick args g: 0, b: 200, a: 255, - font: "manaspc.ttf" }.label + font: "manaspc.ttf" }.label! end def tick_instructions args, text, y = 715 diff --git a/samples/01_rendering_basics/03_solids_borders/app/main.rb b/samples/01_rendering_basics/03_solids_borders/app/main.rb index 2b9b1c4..8d1bfef 100644 --- a/samples/01_rendering_basics/03_solids_borders/app/main.rb +++ b/samples/01_rendering_basics/03_solids_borders/app/main.rb @@ -15,7 +15,7 @@ APIs listing that haven't been encountered in a previous sample apps: # Borders are added to args.outputs.borders # The parameters required for rects are: -# 1. The bottom left corner (x, y) +# 1. The upper right corner (x, y) # 2. The width (w) # 3. The height (h) # 4. The rgba values for the color and transparency (r, g, b, a) diff --git a/samples/01_rendering_basics/05_sounds/app/main.rb b/samples/01_rendering_basics/05_sounds/app/main.rb index 630ce11..787d303 100644 --- a/samples/01_rendering_basics/05_sounds/app/main.rb +++ b/samples/01_rendering_basics/05_sounds/app/main.rb @@ -13,16 +13,7 @@ - args.outputs.labels: An array. The values generate a label. The parameters are [X, Y, TEXT, SIZE, ALIGNMENT, RED, GREEN, BLUE, ALPHA, FONT STYLE] - - - reject: Removes elements from a collection if they meet certain requirements. - - - first: Returns the first element of an array. - - - inside_rect: Returns true or false depending on if the point is inside the rect. - - - to_sym: Returns symbol corresponding to string. Will create a symbol if it does - not already exist. - + For more information about labels, go to mygame/documentation/02-labels.md. =end # This sample app allows users to test their musical skills by matching the piano sound that plays in each @@ -30,153 +21,11 @@ # Runs all the methods necessary for the game to function properly. def tick args - defaults args - render args - calc args - input_mouse args - tick_instructions args, "Sample app shows how to play sounds. args.outputs.sounds << \"path_to_wav.wav\"" -end - -# Sets default values and creates empty collections -# Initialization happens in the first frame only -def defaults _ - _.state.notes ||= [] - _.state.click_feedbacks ||= [] - _.state.current_level ||= 1 - _.state.times_wrong ||= 0 # when game starts, user hasn't guessed wrong yet -end - -# Uses a label to display current level, and shows the score -# Creates a button to play the sample note, and displays the available notes that could be a potential match -def render _ - - # grid.w_half positions the label in the horizontal center of the screen. - _.outputs.labels << [_.grid.w_half, _.grid.top.shift_down(40), "Hole #{_.state.current_level} of 9", 0, 1, 0, 0, 0] - - render_score _ # shows score on screen - - if _.state.game_over # if game is over, a "play again" button is shown - # Calculations ensure that Play Again label is displayed in center of border - # Remove calculations from y parameters and see what happens to border and label placement - _.state.play_again_border ||= _.state.with_meta([560, _.grid.h * 3 / 4 - 40, 160, 60], 'again') # array definition, text/title - _.outputs.labels << [_.grid.w_half, _.grid.h * 3 / 4, "Play Again", 0, 1, 0, 0, 0] # outputs label - _.outputs.borders << _.state.play_again_border # outputs border - else # otherwise, if game is not over - # Calculations ensure that label appears in center of border - _.state.play_note_border ||= _.state.with_meta([560, _.grid.h * 3 / 4 - 40, 160, 60], 'play') # array definition, text/title - _.outputs.labels << [_.grid.w_half, _.grid.h * 3 / 4, "Play Note ##{_.state.current_level}", 0, 1, 0, 0, 0] # outputs label - _.outputs.borders << _.state.play_note_border # outputs border - end - - return if _.state.game_over # return if game is over - - _.outputs.labels << [_.grid.w_half, 400, "I think the note is a(n)...", 0, 1, 0, 0, 0] # outputs label - - # Shows all of the available notes that can be potential matches. - available_notes.each_with_index do |note, i| - _.state.notes[i] ||= piano_button(_, note, i + 1) # calls piano_button method on each note (creates label and border) - _.outputs.labels << _.state.notes[i].label # outputs note on screen with a label and a border - _.outputs.borders << _.state.notes[i].border - end - - # Shows whether or not the user is correct by filling the screen with either red or green - _.outputs.solids << _.state.click_feedbacks.map { |c| c.solid } -end - -# Shows the score (number of times the user guesses wrong) onto the screen using labels. -def render_score _ - if _.state.times_wrong == 0 # if the user has guessed wrong zero times, the score is par - _.outputs.labels << [_.grid.w_half, _.grid.top.shift_down(80), "Score: PAR", 0, 1, 0, 0, 0] - else # otherwise, number of times the user has guessed wrong is shown - _.outputs.labels << [_.grid.w_half, _.grid.top.shift_down(80), "Score: +#{_.state.times_wrong}", 0, 1, 0, 0, 0] # shows score using string interpolation - end -end - -# Sets the target note for the level and performs calculations on click_feedbacks. -def calc _ - _.state.target_note ||= available_notes.sample # chooses a note from available_notes collection as target note - _.state.click_feedbacks.each { |c| c.solid[-1] -= 5 } # remove this line and solid color will remain on screen indefinitely - # comment this line out and the solid color will keep flashing on screen instead of being removed from click_feedbacks collection - _.state.click_feedbacks.reject! { |c| c.solid[-1] <= 0 } -end - -# Uses input from the user to play the target note, as well as the other notes that could be a potential match. -def input_mouse _ - return unless _.inputs.mouse.click # return unless the mouse is clicked - - # finds button that was clicked by user - button_clicked = _.outputs.borders.find_all do |b| # go through borders collection to find all borders that meet requirements - _.inputs.mouse.click.point.inside_rect? b # find button border that mouse was clicked inside of - end.reject {|b| !_.state.meta(b)}.first # reject, return first element - - return unless button_clicked # return unless button_clicked as a value (a button was clicked) + args.outputs.labels << [640, 360, "Click anywhere to play a random sound.", 0, 1] + args.state.notes ||= [:C3, :D3, :E3, :F3, :G3, :A3, :B3, :C4] - queue_click_feedback _, # calls queue_click_feedback method on the button that was clicked - button_clicked.x, - button_clicked.y, - button_clicked.w, - button_clicked.h, - 150, 100, 200 # sets color of button to shade of purple - - if _.state.meta(button_clicked) == 'play' # if "play note" button is pressed - _.outputs.sounds << "sounds/#{_.state.target_note}.wav" # sound of target note is output - elsif _.state.meta(button_clicked) == 'again' # if "play game again" button is pressed - _.state.target_note = nil # no target note - _.state.current_level = 1 # starts at level 1 again - _.state.times_wrong = 0 # starts off with 0 wrong guesses - _.state.game_over = false # the game is not over (because it has just been restarted) - else # otherwise if neither of those buttons were pressed - _.outputs.sounds << "sounds/#{_.state.meta(button_clicked)}.wav" # sound of clicked note is played - if _.state.meta(button_clicked).to_sym == _.state.target_note # if clicked note is target note - _.state.target_note = nil # target note is emptied - - if _.state.current_level < 9 # if game hasn't reached level 9 - _.state.current_level += 1 # game goes to next level - else # otherwise, if game has reached level 9 - _.state.game_over = true # the game is over - end - - queue_click_feedback _, 0, 0, _.grid.w, _.grid.h, 100, 200, 100 # green shown if user guesses correctly - else # otherwise, if clicked note is not target note - _.state.times_wrong += 1 # increments times user guessed wrong - queue_click_feedback _, 0, 0, _.grid.w, _.grid.h, 200, 100, 100 # red shown is user guesses wrong - end + if args.inputs.mouse.click + # Play a sound by adding a string to args.outputs.sounds + args.outputs.sounds << "sounds/#{args.state.notes.sample}.wav" # sound of target note is output end end - -# Creates a collection of all of the available notes as symbols -def available_notes - [:C3, :D3, :E3, :F3, :G3, :A3, :B3, :C4] -end - -# Creates buttons for each note, and sets a label (the note's name) and border for each note's button. -def piano_button _, note, position - _.state.new_entity(:button) do |b| # declares button as new entity - b.label = [460 + 40.mult(position), _.grid.h * 0.4, "#{note}", 0, 1, 0, 0, 0] # label definition - b.border = _.state.with_meta([460 + 40.mult(position) - 20, _.grid.h * 0.4 - 32, 40, 40], note) # border definition, text/title; 20 subtracted so label is in center of border - end -end - -# Color of click feedback changes depending on what button was clicked, and whether the guess is right or wrong -# If a button is clicked, the inside of button is purple (see input_mouse method) -# If correct note is clicked, screen turns green -# If incorrect note is clicked, screen turns red (again, see input_mouse method) -def queue_click_feedback _, x, y, w, h, *color - _.state.click_feedbacks << _.state.new_entity(:click_feedback) do |c| # declares feedback as new entity - c.solid = [x, y, w, h, *color, 255] # sets color - end -end - -def tick_instructions args, text, y = 715 - return if args.state.key_event_occurred - if args.inputs.mouse.click || - args.inputs.keyboard.directional_vector || - args.inputs.keyboard.key_down.enter || - args.inputs.keyboard.key_down.escape - args.state.key_event_occurred = true - end - - args.outputs.debug << [0, y - 50, 1280, 60].solid - args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label - args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label -end diff --git a/samples/01_rendering_basics/06_audio_mixer/app/main.rb b/samples/01_rendering_basics/06_audio_mixer/app/main.rb deleted file mode 100644 index ce48d3f..0000000 --- a/samples/01_rendering_basics/06_audio_mixer/app/main.rb +++ /dev/null @@ -1,160 +0,0 @@ -$gtk.reset - -$boxsize = 30 - -def render_sources args - mouse_in_panel = (args.state.selected != 0) && args.inputs.mouse.position.inside_rect?([900, 450, 340, 250]) - mouse_new_down = (args.state.mouse_held == 1) - - if (mouse_new_down && !mouse_in_panel) - args.state.selected = 0 # will reset below if we hit something. - end - - args.audio.keys.each { |k| - s = args.audio[k] - - if (mouse_new_down) && !mouse_in_panel && args.inputs.mouse.position.inside_rect?([s[:screenx], s[:screeny], $boxsize, $boxsize]) - args.state.selected = k - args.state.dragging_source = true - end - - isselected = (k == args.state.selected) - - if isselected && args.state.dragging_source - # you can hang anything on the audio hashes you want, so we store the - # actual screen position so it doesn't scale weirdly vs your mouse. - s[:screenx] = args.inputs.mouse.x - ($boxsize / 2) - s[:screeny] = args.inputs.mouse.y - ($boxsize / 2) - - s[:screeny] = 50 if s[:screeny] < 50 - s[:screeny] = (719 - $boxsize) if s[:screeny] > (719 - $boxsize) - s[:screenx] = 0 if s[:screenx] < 0 - s[:screenx] = (1279 - $boxsize) if s[:screenx] > (1279 - $boxsize) - - s[:x] = ((s[:screenx] / 1279.0) * 2.0) - 1.0 # scale to -1.0 - 1.0 range - s[:y] = ((s[:screeny] / 719.0) * 2.0) - 1.0 # scale to -1.0 - 1.0 range - end - - color = isselected ? [ 0, 255, 0, 255 ] : [ 0, 0, 255, 255 ] - args.outputs.primitives << [s[:screenx], s[:screeny], $boxsize, $boxsize, *color].solid - } -end - -def render_panel args - s = args.audio[args.state.selected] - return if s.nil? - mouse_down = (args.state.mouse_held > 0) - - args.outputs.primitives << [900, 450, 340, 250, 127, 127, 200, 255].solid - args.outputs.primitives << [1075, 690, "Source ##{args.state.selected}", 3, 1, 255, 255, 255].label - args.outputs.primitives << [910, 660, 1230, 660, 255, 255, 255].line - args.outputs.primitives << [910, 650, "screen: (#{s[:screenx].to_i}, #{s[:screeny].to_i})", 0, 0, 255, 255, 255].label - args.outputs.primitives << [910, 625, "position: (#{s[:x].round(5).to_s[0..6]}, #{s[:y].round(5).to_s[0..6]})", 0, 0, 255, 255, 255].label - - slider = [1022, 586, 200, 7] - if mouse_down && args.inputs.mouse.position.inside_rect?(slider) - s[:pitch] = ((args.inputs.mouse.x - slider[0]).to_f / (slider[2]-1.0)) * 2.0 - end - slidercolor = (s[:pitch] / 2.0) * 255 - args.outputs.primitives << [*slider, slidercolor, slidercolor, slidercolor, 255].solid - args.outputs.primitives << [910, 600, "pitch: #{s[:pitch].round(3).to_s[0..2]}", 0, 0, 255, 255, 255].label - - slider = [1022, 561, 200, 7] - if mouse_down && args.inputs.mouse.position.inside_rect?(slider) - s[:gain] = (args.inputs.mouse.x - slider[0]).to_f / (slider[2]-1.0) - end - slidercolor = s[:gain] * 255 - args.outputs.primitives << [*slider, slidercolor, slidercolor, slidercolor, 255].solid - args.outputs.primitives << [910, 575, "gain: #{s[:gain].round(3).to_s[0..2]}", 0, 0, 255, 255, 255].label - - checkbox = [1022, 533, 10, 12] - if (args.state.mouse_held == 1) && args.inputs.mouse.position.inside_rect?(checkbox) - s[:looping] = !s[:looping] - end - checkboxcolor = s[:looping] ? 255 : 0 - args.outputs.primitives << [*checkbox, checkboxcolor, checkboxcolor, checkboxcolor, 255].solid - args.outputs.primitives << [910, 550, "looping:", 0, 0, 255, 255, 255].label - - checkbox = [1022, 508, 10, 12] - if (args.state.mouse_held == 1) && args.inputs.mouse.position.inside_rect?(checkbox) - s[:paused] = !s[:paused] - end - checkboxcolor = s[:paused] ? 255 : 0 - args.outputs.primitives << [*checkbox, checkboxcolor, checkboxcolor, checkboxcolor, 255].solid - args.outputs.primitives << [910, 525, "paused:", 0, 0, 255, 255, 255].label - - button = [910, 460, 320, 20] - if (args.state.mouse_held == 1) && args.inputs.mouse.position.inside_rect?(button) - args.audio.delete(args.state.selected) - args.state.selected = 0 - end - args.outputs.primitives << [*button, 255, 0, 0, 255].solid - args.outputs.primitives << [button[0] + (button[2] / 2), button[1]+20, "DELETE SOURCE", 0, 1, 255, 255, 0].label -end - -def spawn_new_sound args, num - input = nil - input = "sounds/#{num}.#{(num == 6) ? 'ogg' : 'wav'}" - - # Spawn randomly in an area that won't be covered by UI. - screenx = (rand * 600.0) + 200.0 - screeny = (rand * 400.0) + 100.0 - - args.state.next_sound_index += 1 - - # you can hang anything on the audio hashes you want, so we store the - # actual screen position in here for convenience. - args.audio[args.state.next_sound_index] = { - input: input, - screenx: screenx, - screeny: screeny, - x: ((screenx / 1279.0) * 2.0) - 1.0, # scale to -1.0 - 1.0 range - y: ((screeny / 719.0) * 2.0) - 1.0, # scale to -1.0 - 1.0 range - z: 0.0, - gain: 1.0, - pitch: 1.0, - looping: true, - paused: false - } - - args.state.selected = args.state.next_sound_index -end - -def render_launcher args - total = 6 - x = (1280 - (total * $boxsize * 3)) / 2 - y = 10 - args.outputs.primitives << [0, 0, 1280, ((y*2) + $boxsize), 127, 127, 127, 255].solid - for i in 1..total - args.outputs.primitives << [x, y, $boxsize, $boxsize, 255, 255, 255, 255].solid - args.outputs.primitives << [x+8, y+28, i.to_s, 3, 0, 0, 0, 255, 255].label - if args.inputs.mouse.click && args.inputs.mouse.click.point.inside_rect?([x, y, $boxsize, $boxsize]) - spawn_new_sound args, i - end - x = x + ($boxsize * 3) - end -end - -def render_ui args - render_launcher args - render_panel args -end - -def tick args - args.state.mouse_held ||= 0 - args.state.dragging_source ||= false - args.state.selected ||= 0 - args.state.next_sound_index ||= 0 - - if args.inputs.mouse.up - args.state.mouse_held = 0 - args.state.dragging_source = false - elsif args.inputs.mouse.down || (args.state.mouse_held > 0) - args.state.mouse_held += 1 - else - end - - args.outputs.background_color = [ 0, 0, 0, 255 ] - render_sources args - render_ui args -end diff --git a/samples/01_rendering_basics/06_audio_mixer/license-for-audio.txt b/samples/01_rendering_basics/06_audio_mixer/license-for-audio.txt deleted file mode 100644 index f05c25c..0000000 --- a/samples/01_rendering_basics/06_audio_mixer/license-for-audio.txt +++ /dev/null @@ -1,48 +0,0 @@ -The audio files in this sample are used under various Creative Common licenses: - - -sounds/1.wav: - - Party Pack, Horn Coil 01, Long, 01.wav by InspectorJ (www.jshaw.co.uk) of Freesound.org - (We converted this to mono output.) - Original: https://freesound.org/s/484267/ - License: https://creativecommons.org/licenses/by/3.0/ - - -sounds/2.wav: - - SPLASH.wav by petenice - Original: https://freesound.org/s/9508/ - License: https://creativecommons.org/publicdomain/zero/1.0/ - - -sounds/3.wav: - - buzz roll.wav by bigjoedrummer - (We converted this to mono output.) - Original: https://freesound.org/s/77305/ - License: https://creativecommons.org/publicdomain/zero/1.0/ - - -sounds/4.wav: - - sword04.wav by Erdie - Original: https://freesound.org/s/27858/ - License: https://creativecommons.org/licenses/by/3.0/ - - -sounds/5.wav: - - Game Over Arcade.wav by myfox14 - (We converted this to mono output.) - Original: https://freesound.org/s/382310/ - License: https://creativecommons.org/publicdomain/zero/1.0/ - - -sounds/6.ogg: - - Arcade Music Loop.wav by joshuaempyre ( https://www.empyreanma.com/welcome ) - (We converted this to Ogg Vorbis format, and mono output.) - Original: https://freesound.org/s/251461/ - License: https://creativecommons.org/licenses/by/3.0/ - diff --git a/samples/01_rendering_basics/06_audio_mixer/license-for-sample.txt b/samples/01_rendering_basics/06_audio_mixer/license-for-sample.txt deleted file mode 100644 index 100dcec..0000000 --- a/samples/01_rendering_basics/06_audio_mixer/license-for-sample.txt +++ /dev/null @@ -1,9 +0,0 @@ -Copyright 2019 DragonRuby LLC - -MIT License - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/samples/01_rendering_basics/06_audio_mixer/sounds/1.wav b/samples/01_rendering_basics/06_audio_mixer/sounds/1.wav deleted file mode 100644 index 8aa1be3..0000000 Binary files a/samples/01_rendering_basics/06_audio_mixer/sounds/1.wav and /dev/null differ diff --git a/samples/01_rendering_basics/06_audio_mixer/sounds/2.wav b/samples/01_rendering_basics/06_audio_mixer/sounds/2.wav deleted file mode 100644 index 52a09c2..0000000 Binary files a/samples/01_rendering_basics/06_audio_mixer/sounds/2.wav and /dev/null differ diff --git a/samples/01_rendering_basics/06_audio_mixer/sounds/3.wav b/samples/01_rendering_basics/06_audio_mixer/sounds/3.wav deleted file mode 100644 index c7bde27..0000000 Binary files a/samples/01_rendering_basics/06_audio_mixer/sounds/3.wav and /dev/null differ diff --git a/samples/01_rendering_basics/06_audio_mixer/sounds/4.wav b/samples/01_rendering_basics/06_audio_mixer/sounds/4.wav deleted file mode 100644 index 193cf54..0000000 Binary files a/samples/01_rendering_basics/06_audio_mixer/sounds/4.wav and /dev/null differ diff --git a/samples/01_rendering_basics/06_audio_mixer/sounds/5.wav b/samples/01_rendering_basics/06_audio_mixer/sounds/5.wav deleted file mode 100644 index 112f3cc..0000000 Binary files a/samples/01_rendering_basics/06_audio_mixer/sounds/5.wav and /dev/null differ diff --git a/samples/01_rendering_basics/06_audio_mixer/sounds/6.ogg b/samples/01_rendering_basics/06_audio_mixer/sounds/6.ogg deleted file mode 100644 index a952191..0000000 Binary files a/samples/01_rendering_basics/06_audio_mixer/sounds/6.ogg and /dev/null differ diff --git a/samples/01_rendering_basics/07_sound_synthesis/app/main.rb b/samples/01_rendering_basics/07_sound_synthesis/app/main.rb deleted file mode 100644 index 391ce68..0000000 --- a/samples/01_rendering_basics/07_sound_synthesis/app/main.rb +++ /dev/null @@ -1,593 +0,0 @@ -begin # region: top level tick methods - def tick args - defaults args - render args - input args - process_audio_queue args - end - - def defaults args - args.state.sine_waves ||= {} - args.state.square_waves ||= {} - args.state.saw_tooth_waves ||= {} - args.state.triangle_waves ||= {} - args.state.audio_queue ||= [] - args.state.buttons ||= [ - (frequency_buttons args), - (sine_wave_note_buttons args), - (bell_buttons args), - (square_wave_note_buttons args), - (saw_tooth_wave_note_buttons args), - (triangle_wave_note_buttons args), - ].flatten - end - - def render args - args.outputs.borders << args.state.buttons.map { |b| b[:border] } - args.outputs.labels << args.state.buttons.map { |b| b[:label] } - args.outputs.labels << args.layout - .rect(row: 0, col: 11.5) - .yield_self { |r| r.merge y: r.y + r.h } - .merge(text: "This is a Pro only feature. Click here to watch the YouTube video if you are on the Standard License.", - alignment_enum: 1) - end - - - def input args - args.state.buttons.each do |b| - if args.inputs.mouse.click.inside_rect? b[:rect] - parameter_string = (b.slice :frequency, :note, :octave).map { |k, v| "#{k}: #{v}" }.join ", " - args.gtk.notify! "#{b[:method_to_call]} #{parameter_string}" - send b[:method_to_call], args, b - end - end - - if args.inputs.mouse.click.inside_rect? (args.layout.rect(row: 0).yield_self { |r| r.merge y: r.y + r.h.half, h: r.h.half }) - args.gtk.openurl 'https://www.youtube.com/watch?v=zEzovM5jT-k&ab_channel=AmirRajan' - end - end - - def process_audio_queue args - to_queue = args.state.audio_queue.find_all { |v| v[:queue_at] <= args.tick_count } - args.state.audio_queue -= to_queue - to_queue.each { |a| args.audio[a[:id]] = a } - - args.audio.find_all { |k, v| v[:decay_rate] } - .each { |k, v| v[:gain] -= v[:decay_rate] } - - sounds_to_stop = args.audio - .find_all { |k, v| v[:stop_at] && args.state.tick_count >= v[:stop_at] } - .map { |k, v| k } - - sounds_to_stop.each { |k| args.audio.delete k } - end -end - -begin # region: button definitions, ui layout, callback functions - def button args, opts - button_def = opts.merge rect: (args.layout.rect (opts.merge w: 2, h: 1)) - - button_def[:border] = button_def[:rect].merge r: 0, g: 0, b: 0 - - label_offset_x = 5 - label_offset_y = 30 - - button_def[:label] = button_def[:rect].merge text: opts[:text], - size_enum: -2.5, - x: button_def[:rect].x + label_offset_x, - y: button_def[:rect].y + label_offset_y - - button_def - end - - def play_sine_wave args, sender - queue_sine_wave args, - frequency: sender[:frequency], - duration: 1.seconds, - fade_out: true - end - - def play_note args, sender - method_to_call = :queue_sine_wave - method_to_call = :queue_square_wave if sender[:type] == :square - method_to_call = :queue_saw_tooth_wave if sender[:type] == :saw_tooth - method_to_call = :queue_triangle_wave if sender[:type] == :triangle - method_to_call = :queue_bell if sender[:type] == :bell - - send method_to_call, args, - frequency: (frequency_for note: sender[:note], octave: sender[:octave]), - duration: 1.seconds, - fade_out: true - end - - def frequency_buttons args - [ - (button args, - row: 4.0, col: 0, text: "300hz", - frequency: 300, - method_to_call: :play_sine_wave), - (button args, - row: 5.0, col: 0, text: "400hz", - frequency: 400, - method_to_call: :play_sine_wave), - (button args, - row: 6.0, col: 0, text: "500hz", - frequency: 500, - method_to_call: :play_sine_wave), - ] - end - - def sine_wave_note_buttons args - [ - (button args, - row: 1.5, col: 2, text: "Sine C4", - note: :c, octave: 4, type: :sine, method_to_call: :play_note), - (button args, - row: 2.5, col: 2, text: "Sine D4", - note: :d, octave: 4, type: :sine, method_to_call: :play_note), - (button args, - row: 3.5, col: 2, text: "Sine E4", - note: :e, octave: 4, type: :sine, method_to_call: :play_note), - (button args, - row: 4.5, col: 2, text: "Sine F4", - note: :f, octave: 4, type: :sine, method_to_call: :play_note), - (button args, - row: 5.5, col: 2, text: "Sine G4", - note: :g, octave: 4, type: :sine, method_to_call: :play_note), - (button args, - row: 6.5, col: 2, text: "Sine A5", - note: :a, octave: 5, type: :sine, method_to_call: :play_note), - (button args, - row: 7.5, col: 2, text: "Sine B5", - note: :b, octave: 5, type: :sine, method_to_call: :play_note), - (button args, - row: 8.5, col: 2, text: "Sine C5", - note: :c, octave: 5, type: :sine, method_to_call: :play_note), - ] - end - - def square_wave_note_buttons args - [ - (button args, - row: 1.5, col: 6, text: "Square C4", - note: :c, octave: 4, type: :square, method_to_call: :play_note), - (button args, - row: 2.5, col: 6, text: "Square D4", - note: :d, octave: 4, type: :square, method_to_call: :play_note), - (button args, - row: 3.5, col: 6, text: "Square E4", - note: :e, octave: 4, type: :square, method_to_call: :play_note), - (button args, - row: 4.5, col: 6, text: "Square F4", - note: :f, octave: 4, type: :square, method_to_call: :play_note), - (button args, - row: 5.5, col: 6, text: "Square G4", - note: :g, octave: 4, type: :square, method_to_call: :play_note), - (button args, - row: 6.5, col: 6, text: "Square A5", - note: :a, octave: 5, type: :square, method_to_call: :play_note), - (button args, - row: 7.5, col: 6, text: "Square B5", - note: :b, octave: 5, type: :square, method_to_call: :play_note), - (button args, - row: 8.5, col: 6, text: "Square C5", - note: :c, octave: 5, type: :square, method_to_call: :play_note), - ] - end - def saw_tooth_wave_note_buttons args - [ - (button args, - row: 1.5, col: 8, text: "Saw C4", - note: :c, octave: 4, type: :saw_tooth, method_to_call: :play_note), - (button args, - row: 2.5, col: 8, text: "Saw D4", - note: :d, octave: 4, type: :saw_tooth, method_to_call: :play_note), - (button args, - row: 3.5, col: 8, text: "Saw E4", - note: :e, octave: 4, type: :saw_tooth, method_to_call: :play_note), - (button args, - row: 4.5, col: 8, text: "Saw F4", - note: :f, octave: 4, type: :saw_tooth, method_to_call: :play_note), - (button args, - row: 5.5, col: 8, text: "Saw G4", - note: :g, octave: 4, type: :saw_tooth, method_to_call: :play_note), - (button args, - row: 6.5, col: 8, text: "Saw A5", - note: :a, octave: 5, type: :saw_tooth, method_to_call: :play_note), - (button args, - row: 7.5, col: 8, text: "Saw B5", - note: :b, octave: 5, type: :saw_tooth, method_to_call: :play_note), - (button args, - row: 8.5, col: 8, text: "Saw C5", - note: :c, octave: 5, type: :saw_tooth, method_to_call: :play_note), - ] - end - - def triangle_wave_note_buttons args - [ - (button args, - row: 1.5, col: 10, text: "Triangle C4", - note: :c, octave: 4, type: :triangle, method_to_call: :play_note), - (button args, - row: 2.5, col: 10, text: "Triangle D4", - note: :d, octave: 4, type: :triangle, method_to_call: :play_note), - (button args, - row: 3.5, col: 10, text: "Triangle E4", - note: :e, octave: 4, type: :triangle, method_to_call: :play_note), - (button args, - row: 4.5, col: 10, text: "Triangle F4", - note: :f, octave: 4, type: :triangle, method_to_call: :play_note), - (button args, - row: 5.5, col: 10, text: "Triangle G4", - note: :g, octave: 4, type: :triangle, method_to_call: :play_note), - (button args, - row: 6.5, col: 10, text: "Triangle A5", - note: :a, octave: 5, type: :triangle, method_to_call: :play_note), - (button args, - row: 7.5, col: 10, text: "Triangle B5", - note: :b, octave: 5, type: :triangle, method_to_call: :play_note), - (button args, - row: 8.5, col: 10, text: "Triangle C5", - note: :c, octave: 5, type: :triangle, method_to_call: :play_note), - ] - end - - def bell_buttons args - [ - (button args, - row: 1.5, col: 4, text: "Bell C4", - note: :c, octave: 4, type: :bell, method_to_call: :play_note), - (button args, - row: 2.5, col: 4, text: "Bell D4", - note: :d, octave: 4, type: :bell, method_to_call: :play_note), - (button args, - row: 3.5, col: 4, text: "Bell E4", - note: :e, octave: 4, type: :bell, method_to_call: :play_note), - (button args, - row: 4.5, col: 4, text: "Bell F4", - note: :f, octave: 4, type: :bell, method_to_call: :play_note), - (button args, - row: 5.5, col: 4, text: "Bell G4", - note: :g, octave: 4, type: :bell, method_to_call: :play_note), - (button args, - row: 6.5, col: 4, text: "Bell A5", - note: :a, octave: 5, type: :bell, method_to_call: :play_note), - (button args, - row: 7.5, col: 4, text: "Bell B5", - note: :b, octave: 5, type: :bell, method_to_call: :play_note), - (button args, - row: 8.5, col: 4, text: "Bell C5", - note: :c, octave: 5, type: :bell, method_to_call: :play_note), - ] - end -end - -begin # region: wave generation - begin # sine wave - def defaults_sine_wave_for - { frequency: 440, sample_rate: 48000 } - end - - def sine_wave_for opts = {} - opts = defaults_sine_wave_for.merge opts - frequency = opts[:frequency] - sample_rate = opts[:sample_rate] - period_size = (sample_rate.fdiv frequency).ceil - period_size.map_with_index do |i| - Math::sin((2.0 * Math::PI) / (sample_rate.to_f / frequency.to_f) * i) - end.to_a - end - - def defaults_queue_sine_wave - { frequency: 440, duration: 60, gain: 1.0, fade_out: false, queue_in: 0 } - end - - def queue_sine_wave args, opts = {} - opts = defaults_queue_sine_wave.merge opts - frequency = opts[:frequency] - sample_rate = 48000 - - sine_wave = sine_wave_for frequency: frequency, sample_rate: sample_rate - args.state.sine_waves[frequency] ||= sine_wave_for frequency: frequency, sample_rate: sample_rate - - proc = lambda do - generate_audio_data args.state.sine_waves[frequency], sample_rate - end - - audio_state = new_audio_state args, opts - audio_state[:input] = [1, sample_rate, proc] - queue_audio args, audio_state: audio_state, wave: sine_wave - end - end - - begin # region: square wave - def defaults_square_wave_for - { frequency: 440, sample_rate: 48000 } - end - - def square_wave_for opts = {} - opts = defaults_square_wave_for.merge opts - sine_wave = sine_wave_for opts - sine_wave.map do |v| - if v >= 0 - 1.0 - else - -1.0 - end - end.to_a - end - - def defaults_queue_square_wave - { frequency: 440, duration: 60, gain: 0.3, fade_out: false, queue_in: 0 } - end - - def queue_square_wave args, opts = {} - opts = defaults_queue_square_wave.merge opts - frequency = opts[:frequency] - sample_rate = 48000 - - square_wave = square_wave_for frequency: frequency, sample_rate: sample_rate - args.state.square_waves[frequency] ||= square_wave_for frequency: frequency, sample_rate: sample_rate - - proc = lambda do - generate_audio_data args.state.square_waves[frequency], sample_rate - end - - audio_state = new_audio_state args, opts - audio_state[:input] = [1, sample_rate, proc] - queue_audio args, audio_state: audio_state, wave: square_wave - end - end - - begin # region: saw tooth wave - def defaults_saw_tooth_wave_for - { frequency: 440, sample_rate: 48000 } - end - - def saw_tooth_wave_for opts = {} - opts = defaults_saw_tooth_wave_for.merge opts - sine_wave = sine_wave_for opts - period_size = sine_wave.length - sine_wave.map_with_index do |v, i| - (((i % period_size).fdiv period_size) * 2) - 1 - end - end - - def defaults_queue_saw_tooth_wave - { frequency: 440, duration: 60, gain: 0.3, fade_out: false, queue_in: 0 } - end - - def queue_saw_tooth_wave args, opts = {} - opts = defaults_queue_saw_tooth_wave.merge opts - frequency = opts[:frequency] - sample_rate = 48000 - - saw_tooth_wave = saw_tooth_wave_for frequency: frequency, sample_rate: sample_rate - args.state.saw_tooth_waves[frequency] ||= saw_tooth_wave_for frequency: frequency, sample_rate: sample_rate - - proc = lambda do - generate_audio_data args.state.saw_tooth_waves[frequency], sample_rate - end - - audio_state = new_audio_state args, opts - audio_state[:input] = [1, sample_rate, proc] - queue_audio args, audio_state: audio_state, wave: saw_tooth_wave - end - end - - begin # region: triangle wave - def defaults_triangle_wave_for - { frequency: 440, sample_rate: 48000 } - end - - def triangle_wave_for opts = {} - opts = defaults_saw_tooth_wave_for.merge opts - sine_wave = sine_wave_for opts - period_size = sine_wave.length - sine_wave.map_with_index do |v, i| - ratio = (i.fdiv period_size) - if ratio <= 0.5 - (ratio * 4) - 1 - else - ratio -= 0.5 - 1 - (ratio * 4) - end - end - end - - def defaults_queue_triangle_wave - { frequency: 440, duration: 60, gain: 1.0, fade_out: false, queue_in: 0 } - end - - def queue_triangle_wave args, opts = {} - opts = defaults_queue_triangle_wave.merge opts - frequency = opts[:frequency] - sample_rate = 48000 - - triangle_wave = triangle_wave_for frequency: frequency, sample_rate: sample_rate - args.state.triangle_waves[frequency] ||= triangle_wave_for frequency: frequency, sample_rate: sample_rate - - proc = lambda do - generate_audio_data args.state.triangle_waves[frequency], sample_rate - end - - audio_state = new_audio_state args, opts - audio_state[:input] = [1, sample_rate, proc] - queue_audio args, audio_state: audio_state, wave: triangle_wave - end - end - - begin # region: bell - def defaults_queue_bell - { frequency: 440, duration: 1.seconds, queue_in: 0 } - end - - def queue_bell args, opts = {} - (bell_to_sine_waves (defaults_queue_bell.merge opts)).each { |b| queue_sine_wave args, b } - end - - def bell_harmonics - [ - { frequency_ratio: 0.5, duration_ratio: 1.00 }, - { frequency_ratio: 1.0, duration_ratio: 0.80 }, - { frequency_ratio: 2.0, duration_ratio: 0.60 }, - { frequency_ratio: 3.0, duration_ratio: 0.40 }, - { frequency_ratio: 4.2, duration_ratio: 0.25 }, - { frequency_ratio: 5.4, duration_ratio: 0.20 }, - { frequency_ratio: 6.8, duration_ratio: 0.15 } - ] - end - - def defaults_bell_to_sine_waves - { frequency: 440, duration: 1.seconds, queue_in: 0 } - end - - def bell_to_sine_waves opts = {} - opts = defaults_bell_to_sine_waves.merge opts - bell_harmonics.map do |b| - { - frequency: opts[:frequency] * b[:frequency_ratio], - duration: opts[:duration] * b[:duration_ratio], - queue_in: opts[:queue_in], - gain: (1.fdiv bell_harmonics.length), - fade_out: true - } - end - end - end - - begin # audio entity construction - def generate_audio_data sine_wave, sample_rate - sample_size = (sample_rate.fdiv (1000.fdiv 60)).ceil - copy_count = (sample_size.fdiv sine_wave.length).ceil - sine_wave * copy_count - end - - def defaults_new_audio_state - { frequency: 440, duration: 60, gain: 1.0, fade_out: false, queue_in: 0 } - end - - def new_audio_state args, opts = {} - opts = defaults_new_audio_state.merge opts - decay_rate = 0 - decay_rate = 1.fdiv(opts[:duration]) * opts[:gain] if opts[:fade_out] - frequency = opts[:frequency] - sample_rate = 48000 - - { - id: (new_id! args), - frequency: frequency, - sample_rate: 48000, - stop_at: args.tick_count + opts[:queue_in] + opts[:duration], - gain: opts[:gain].to_f, - queue_at: args.state.tick_count + opts[:queue_in], - decay_rate: decay_rate, - pitch: 1.0, - looping: true, - paused: false - } - end - - def queue_audio args, opts = {} - graph_wave args, opts[:wave], opts[:audio_state][:frequency] - args.state.audio_queue << opts[:audio_state] - end - - def new_id! args - args.state.audio_id ||= 0 - args.state.audio_id += 1 - end - - def graph_wave args, wave, frequency - if args.state.tick_count != args.state.graphed_at - args.outputs.static_lines.clear - args.outputs.static_sprites.clear - end - - wave = wave - - r, g, b = frequency.to_i % 85, - frequency.to_i % 170, - frequency.to_i % 255 - - starting_rect = args.layout.rect(row: 5, col: 13) - x_scale = 10 - y_scale = 100 - max_points = 25 - - points = wave - if wave.length > max_points - resolution = wave.length.idiv max_points - points = wave.find_all.with_index { |y, i| (i % resolution == 0) } - end - - args.outputs.static_lines << points.map_with_index do |y, x| - next_y = points[x + 1] - - if next_y - { - x: starting_rect.x + (x * x_scale), - y: starting_rect.y + starting_rect.h.half + y_scale * y, - x2: starting_rect.x + ((x + 1) * x_scale), - y2: starting_rect.y + starting_rect.h.half + y_scale * next_y, - r: r, - g: g, - b: b - } - end - end - - args.outputs.static_sprites << points.map_with_index do |y, x| - { - x: (starting_rect.x + (x * x_scale)) - 2, - y: (starting_rect.y + starting_rect.h.half + y_scale * y) - 2, - w: 4, - h: 4, - path: 'sprites/square-white.png', - r: r, - g: g, - b: b - } - end - - args.state.graphed_at = args.state.tick_count - end - end - - begin # region: musical note mapping - def defaults_frequency_for - { note: :a, octave: 5, sharp: false, flat: false } - end - - def frequency_for opts = {} - opts = defaults_frequency_for.merge opts - octave_offset_multiplier = opts[:octave] - 5 - note = note_frequencies_octave_5[opts[:note]] - if octave_offset_multiplier < 0 - note = note * 1 / (octave_offset_multiplier.abs + 1) - elsif octave_offset_multiplier > 0 - note = note * (octave_offset_multiplier.abs + 1) / 1 - end - note - end - - def note_frequencies_octave_5 - { - a: 440.0, - a_sharp: 466.16, b_flat: 466.16, - b: 493.88, - c: 523.25, - c_sharp: 554.37, d_flat: 587.33, - d: 587.33, - d_sharp: 622.25, e_flat: 659.25, - e: 659.25, - f: 698.25, - f_sharp: 739.99, g_flat: 739.99, - g: 783.99, - g_sharp: 830.61, a_flat: 830.61 - } - end - end -end - -$gtk.reset diff --git a/samples/01_rendering_basics/07_sound_synthesis/license-for-sample.txt b/samples/01_rendering_basics/07_sound_synthesis/license-for-sample.txt deleted file mode 100644 index 100dcec..0000000 --- a/samples/01_rendering_basics/07_sound_synthesis/license-for-sample.txt +++ /dev/null @@ -1,9 +0,0 @@ -Copyright 2019 DragonRuby LLC - -MIT License - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/samples/01_rendering_basics/07_sound_synthesis/metadata/game_metadata.txt b/samples/01_rendering_basics/07_sound_synthesis/metadata/game_metadata.txt deleted file mode 100644 index 16cef1d..0000000 --- a/samples/01_rendering_basics/07_sound_synthesis/metadata/game_metadata.txt +++ /dev/null @@ -1,6 +0,0 @@ -devid=amirrajan -devtitle=Amir Rajan -gameid=hello-world -gametitle=Hello World -version=1.0 -icon=metadata/icon.png diff --git a/samples/01_rendering_basics/07_sound_synthesis/metadata/icon.png b/samples/01_rendering_basics/07_sound_synthesis/metadata/icon.png deleted file mode 100644 index e20e8c2..0000000 Binary files a/samples/01_rendering_basics/07_sound_synthesis/metadata/icon.png and /dev/null differ diff --git a/samples/01_rendering_basics/07_sound_synthesis/sprites/square-black.png b/samples/01_rendering_basics/07_sound_synthesis/sprites/square-black.png deleted file mode 100644 index cea7bd7..0000000 Binary files a/samples/01_rendering_basics/07_sound_synthesis/sprites/square-black.png and /dev/null differ diff --git a/samples/01_rendering_basics/07_sound_synthesis/sprites/square-white.png b/samples/01_rendering_basics/07_sound_synthesis/sprites/square-white.png deleted file mode 100644 index 378c565..0000000 Binary files a/samples/01_rendering_basics/07_sound_synthesis/sprites/square-white.png and /dev/null differ diff --git a/samples/02_input_basics/01_keyboard/app/main.rb b/samples/02_input_basics/01_keyboard/app/main.rb index d0321ef..f97c134 100644 --- a/samples/02_input_basics/01_keyboard/app/main.rb +++ b/samples/02_input_basics/01_keyboard/app/main.rb @@ -4,7 +4,8 @@ APIs listing that haven't been encountered in a previous sample apps: - args.inputs.keyboard.key_up.KEY: The value of the properties will be set to the frame that the key_up event occurred (the frame correlates - to args.state.tick_count). Otherwise the value will be nil. + to args.state.tick_count). Otherwise the value will be nil. For a + full listing of keys, take a look at mygame/documentation/06-keyboard.md. - args.state.PROPERTY: The state property on args is a dynamic structure. You can define ANY property here with ANY type of arbitrary nesting. Properties defined on args.state will be retained @@ -24,11 +25,11 @@ APIs listing that haven't been encountered in a previous sample apps: def tick args tick_instructions args, "Sample app shows how keyboard events are registered and accessed.", 360 # Notice how small_font accounts for all the remaining parameters - args.outputs.labels << [460, row_to_px(args, 0), "Current game time: #{args.state.tick_count}", small_font] - args.outputs.labels << [460, row_to_px(args, 2), "Keyboard input: args.inputs.keyboard.key_up.h", small_font] - args.outputs.labels << [460, row_to_px(args, 3), "Press \"h\" on the keyboard.", small_font] + args.outputs.labels << { x: 460, y: row_to_px(args, 0), text: "Current game time: #{args.state.tick_count}", size_enum: -1 } + args.outputs.labels << { x: 460, y: row_to_px(args, 2), text: "Keyboard input: args.inputs.keyboard.key_up.h", size_enum: -1 } + args.outputs.labels << { x: 460, y: row_to_px(args, 3), text: "Press \"h\" on the keyboard.", size_enum: -1 } - # Input on a specific key can be found through args.inputs.keyboard.key_up followed by the key + # Input on a specifc key can be found through args.inputs.keyboard.key_up followed by the key if args.inputs.keyboard.key_up.h args.state.h_pressed_at = args.state.tick_count end @@ -37,27 +38,19 @@ def tick args args.state.h_pressed_at ||= false if args.state.h_pressed_at - args.outputs.labels << [460, row_to_px(args, 4), "\"h\" was pressed at time: #{args.state.h_pressed_at}", small_font] + args.outputs.labels << { x: 460, y: row_to_px(args, 4), text: "\"h\" was pressed at time: #{args.state.h_pressed_at}", size_enum: -1 } else - args.outputs.labels << [460, row_to_px(args, 4), "\"h\" has never been pressed.", small_font] + args.outputs.labels << { x: 460, y: row_to_px(args, 4), text: "\"h\" has never been pressed.", size_enum: -1 } end tick_help_text args end -def small_font - # This method provides some values for the construction of labels - # Specifically, Size, Alignment, & RGBA - # This makes it so that custom parameters don't have to be repeatedly typed. - # Additionally "small_font" provides programmers with more information than some numbers - [-2, 0, 0, 0, 0, 255] -end - -def row_to_px args, row_number +def row_to_px args, row_number, y_offset = 20 # This takes a row_number and converts it to pixels DragonRuby understands. # Row 0 starts 5 units below the top of the grid # Each row afterward is 20 units lower - args.grid.top.shift_down(5).shift_down(20 * row_number) + args.grid.top - 5 - (y_offset * row_number) end # Don't worry about understanding the code within this method just yet. @@ -87,17 +80,17 @@ def tick_help_text args end end - args.outputs.labels << [10, row_to_px(args, 6), "Advanced Help:", small_font] + args.outputs.labels << { x: 10, y: row_to_px(args, 6), text: "This is the api for the keys you've pressed:", size_enum: -1, r: 180 } if !args.state.help_available args.outputs.labels << [10, row_to_px(args, 7), "Press a key and I'll show code to access the key and what value will be returned if you used the code.", small_font] return end - args.outputs.labels << [10 , row_to_px(args, 7), "args.inputs.keyboard", small_font] - args.outputs.labels << [330, row_to_px(args, 7), "args.inputs.keyboard.key_down", small_font] - args.outputs.labels << [650, row_to_px(args, 7), "args.inputs.keyboard.key_held", small_font] - args.outputs.labels << [990, row_to_px(args, 7), "args.inputs.keyboard.key_up", small_font] + args.outputs.labels << { x: 10 , y: row_to_px(args, 7), text: "args.inputs.keyboard", size_enum: -2 } + args.outputs.labels << { x: 330, y: row_to_px(args, 7), text: "args.inputs.keyboard.key_down", size_enum: -2 } + args.outputs.labels << { x: 650, y: row_to_px(args, 7), text: "args.inputs.keyboard.key_held", size_enum: -2 } + args.outputs.labels << { x: 990, y: row_to_px(args, 7), text: "args.inputs.keyboard.key_up", size_enum: -2 } fill_history args, :key_value_history, :down_or_held, nil fill_history args, :key_down_value_history, :down, :key_down @@ -143,12 +136,8 @@ def render_help_labels args, history_key, state_key, keyboard_method, x end idx += 2 [ - [x, row_to_px(args, idx - 2), - " .#{k} is #{current_value || "nil"}", - small_font], - [x, row_to_px(args, idx - 1), - " was #{v}", - small_font] + { x: x, y: row_to_px(args, idx + 0, 16), text: " .#{k} is #{current_value || "nil"}", size_enum: -2 }, + { x: x, y: row_to_px(args, idx + 1, 16), text: " was #{v}", size_enum: -2 } ] end end @@ -163,7 +152,9 @@ def tick_instructions args, text, y = 715 args.state.key_event_occurred = true end - args.outputs.debug << [0, y - 50, 1280, 60].solid - args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label - args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label + args.outputs.debug << { x: 0, y: y - 50, w: 1280, h: 60 }.solid! + args.outputs.debug << { x: 640, y: y, text: text, + size_enum: 1, alignment_enum: 1, r: 255, g: 255, b: 255 }.label! + args.outputs.debug << { x: 640, y: y - 25, text: "(click to dismiss instructions)", + size_enum: -2, alignment_enum: 1, r: 255, g: 255, b: 255 }.label! end diff --git a/samples/02_input_basics/01_moving_a_sprite/app/main.rb b/samples/02_input_basics/01_moving_a_sprite/app/main.rb new file mode 100644 index 0000000..da699a0 --- /dev/null +++ b/samples/02_input_basics/01_moving_a_sprite/app/main.rb @@ -0,0 +1,30 @@ +def tick args + # create a player and set default values + # for the player's x, y, w (width), and h (height) + args.state.player.x ||= 100 + args.state.player.y ||= 100 + args.state.player.w ||= 50 + args.state.player.h ||= 50 + + # render the player to the screen + args.outputs.sprites << { x: args.state.player.x, + y: args.state.player.y, + w: args.state.player.w, + h: args.state.player.h, + path: 'sprites/square/green.png' } + + # move the player around using the keyboard + if args.inputs.up + args.state.player.y += 10 + elsif args.inputs.down + args.state.player.y -= 10 + end + + if args.inputs.left + args.state.player.x -= 10 + elsif args.inputs.right + args.state.player.x += 10 + end +end + +$gtk.reset diff --git a/samples/02_input_basics/01_moving_a_sprite/license-for-sample.txt b/samples/02_input_basics/01_moving_a_sprite/license-for-sample.txt new file mode 100644 index 0000000..100dcec --- /dev/null +++ b/samples/02_input_basics/01_moving_a_sprite/license-for-sample.txt @@ -0,0 +1,9 @@ +Copyright 2019 DragonRuby LLC + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/samples/02_input_basics/01_moving_a_sprite/sprites/square/green.png b/samples/02_input_basics/01_moving_a_sprite/sprites/square/green.png new file mode 100644 index 0000000..5ef7f75 Binary files /dev/null and b/samples/02_input_basics/01_moving_a_sprite/sprites/square/green.png differ diff --git a/samples/02_input_basics/02_mouse/app/main.rb b/samples/02_input_basics/02_mouse/app/main.rb index 43217f5..823336c 100644 --- a/samples/02_input_basics/02_mouse/app/main.rb +++ b/samples/02_input_basics/02_mouse/app/main.rb @@ -61,11 +61,7 @@ def small_label args, x, row, message # This method effectively combines the row_to_px and small_font methods # It changes the given row value to a DragonRuby pixel value # and adds the customization parameters - [x, row_to_px(args, row), message, small_font] -end - -def small_font - [-2, 0, 0, 0, 0, 255] + { x: x, y: row_to_px(args, row), text: message, alignment_enum: -2 } end def row_to_px args, row_number @@ -81,7 +77,7 @@ def tick_instructions args, text, y = 715 args.state.key_event_occurred = true end - args.outputs.debug << [0, y - 50, 1280, 60].solid - args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label - args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label + args.outputs.debug << { x: 0, y: y - 50, w: 1280, h: 60 }.solid! + args.outputs.debug << { x: 640, y: y, text: text, size_enum: 1, alignment_enum: 1, r: 255, g: 255, b: 255 }.label! + args.outputs.debug << { x: 640, y: y - 25, text: "(click to dismiss instructions)", size_enum: -2, alignment_enum: 1, r: 255, g: 255, b: 255 }.label! end diff --git a/samples/02_input_basics/03_mouse_point_to_rect/app/main.rb b/samples/02_input_basics/03_mouse_point_to_rect/app/main.rb index 1e30943..7d4394c 100644 --- a/samples/02_input_basics/03_mouse_point_to_rect/app/main.rb +++ b/samples/02_input_basics/03_mouse_point_to_rect/app/main.rb @@ -36,13 +36,13 @@ APIs that haven't been encountered in a previous sample apps: # This is useful to determine if a click occurred in a rect def tick args - tick_instructions args, "Sample app shows how to determine if a click happened inside a rectangle." + tick_instructions args, "Sample app shows how to determing if a click happened inside a rectangle." x = 460 args.outputs.labels << small_label(args, x, 15, "Click inside the blue box maybe ---->") - box = [785, 370, 50, 50, 0, 0, 170] + box = { x: 785, y: 370, w: 50, h: 50, r: 0, g: 0, b: 170 } args.outputs.borders << box # Saves the most recent click into args.state @@ -64,11 +64,7 @@ def tick args end def small_label args, x, row, message - [x, row_to_px(args, row), message, small_font] -end - -def small_font - [-2, 0, 0, 0, 0, 255] + { x: x, y: row_to_px(args, row), text: message, size_enum: -2 } end def row_to_px args, row_number @@ -84,7 +80,7 @@ def tick_instructions args, text, y = 715 args.state.key_event_occurred = true end - args.outputs.debug << [0, y - 50, 1280, 60].solid - args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label - args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label + args.outputs.debug << { x: 0, y: y - 50, w: 1280, h: 60 }.solid! + args.outputs.debug << { x: 640, y: y, text: text, size_enum: 1, alignment_enum: 1, r: 255, g: 255, b: 255 }.label! + args.outputs.debug << { x: 640, y: y - 25, text: "(click to dismiss instructions)", size_enum: -2, alignment_enum: 1, r: 255, g: 255, b: 255 }.label! end diff --git a/samples/02_input_basics/04_mouse_rect_to_rect/app/main.rb b/samples/02_input_basics/04_mouse_rect_to_rect/app/main.rb index 1a00a41..8250598 100644 --- a/samples/02_input_basics/04_mouse_rect_to_rect/app/main.rb +++ b/samples/02_input_basics/04_mouse_rect_to_rect/app/main.rb @@ -42,9 +42,15 @@ def tick args # They are stored in game so that they do not get reset every tick if args.inputs.mouse.click if !args.state.box_collision_one - args.state.box_collision_one = [args.inputs.mouse.click.point.x - 25, args.inputs.mouse.click.point.y - 25, 125, 125, 180, 0, 0, 180] + args.state.box_collision_one = { x: args.inputs.mouse.click.point.x - 25, + y: args.inputs.mouse.click.point.y - 25, + w: 125, h: 125, + r: 180, g: 0, b: 0, a: 180 } elsif !args.state.box_collision_two - args.state.box_collision_two = [args.inputs.mouse.click.point.x - 25, args.inputs.mouse.click.point.y - 25, 125, 125, 0, 0, 180, 180] + args.state.box_collision_two = { x: args.inputs.mouse.click.point.x - 25, + y: args.inputs.mouse.click.point.y - 25, + w: 125, h: 125, + r: 0, g: 0, b: 180, a: 180 } else args.state.box_collision_one = nil args.state.box_collision_two = nil @@ -71,15 +77,11 @@ def tick args end def small_label args, x, row, message - [x, row_to_px(args, row), message, small_font] -end - -def small_font - [-2, 0, 0, 0, 0, 255] + { x: x, y: row_to_px(args, row), text: message, size_enum: -2 } end def row_to_px args, row_number - args.grid.top.shift_down(5).shift_down(20 * row_number) + args.grid.top - 5 - (20 * row_number) end def tick_instructions args, text, y = 715 diff --git a/samples/02_input_basics/05_controller/app/main.rb b/samples/02_input_basics/05_controller/app/main.rb index c986fa9..0ca4bbb 100644 --- a/samples/02_input_basics/05_controller/app/main.rb +++ b/samples/02_input_basics/05_controller/app/main.rb @@ -7,6 +7,8 @@ If there is more than one controller being used, they can be differentiated by using names like controller_one and controller_two. + For a full listing of buttons, take a look at mygame/documentation/08-controllers.md. + Reminder: - args.state.PROPERTY: The state property on args is a dynamic @@ -40,57 +42,51 @@ class ControllerDemo def process_inputs state.buttons = [] - state.buttons << [100, 500, inputs.controller_one.key_held.l1, "L1"] - state.buttons << [100, 600, inputs.controller_one.key_held.l2, "L2"] - - state.buttons << [1100, 500, inputs.controller_one.key_held.r1, "R1"] - state.buttons << [1100, 600, inputs.controller_one.key_held.r2, "R2"] - - state.buttons << [540, 450, inputs.controller_one.key_held.select, "Select"] - state.buttons << [660, 450, inputs.controller_one.key_held.start, "Start"] - - state.buttons << [200, 300, inputs.controller_one.key_held.left, "Left"] - state.buttons << [300, 400, inputs.controller_one.key_held.up, "Up"] - state.buttons << [400, 300, inputs.controller_one.key_held.right, "Right"] - state.buttons << [300, 200, inputs.controller_one.key_held.down, "Down"] - - state.buttons << [800, 300, inputs.controller_one.key_held.x, "X"] - state.buttons << [900, 400, inputs.controller_one.key_held.y, "Y"] - state.buttons << [1000, 300, inputs.controller_one.key_held.a, "A"] - state.buttons << [900, 200, inputs.controller_one.key_held.b, "B"] - - state.buttons << [450 + inputs.controller_one.left_analog_x_perc * 100, - 100 + inputs.controller_one.left_analog_y_perc * 100, - inputs.controller_one.key_held.l3, - "L3"] - - state.buttons << [750 + inputs.controller_one.right_analog_x_perc * 100, - 100 + inputs.controller_one.right_analog_y_perc * 100, - inputs.controller_one.key_held.r3, - "R3"] + state.buttons << { x: 100, y: 500, active: inputs.controller_one.key_held.l1, text: "L1"} + state.buttons << { x: 100, y: 600, active: inputs.controller_one.key_held.l2, text: "L2"} + state.buttons << { x: 1100, y: 500, active: inputs.controller_one.key_held.r1, text: "R1"} + state.buttons << { x: 1100, y: 600, active: inputs.controller_one.key_held.r2, text: "R2"} + state.buttons << { x: 540, y: 450, active: inputs.controller_one.key_held.select, text: "Select"} + state.buttons << { x: 660, y: 450, active: inputs.controller_one.key_held.start, text: "Start"} + state.buttons << { x: 200, y: 300, active: inputs.controller_one.key_held.left, text: "Left"} + state.buttons << { x: 300, y: 400, active: inputs.controller_one.key_held.up, text: "Up"} + state.buttons << { x: 400, y: 300, active: inputs.controller_one.key_held.right, text: "Right"} + state.buttons << { x: 300, y: 200, active: inputs.controller_one.key_held.down, text: "Down"} + state.buttons << { x: 800, y: 300, active: inputs.controller_one.key_held.x, text: "X"} + state.buttons << { x: 900, y: 400, active: inputs.controller_one.key_held.y, text: "Y"} + state.buttons << { x: 1000, y: 300, active: inputs.controller_one.key_held.a, text: "A"} + state.buttons << { x: 900, y: 200, active: inputs.controller_one.key_held.b, text: "B"} + state.buttons << { x: 450 + inputs.controller_one.left_analog_x_perc * 100, + y: 100 + inputs.controller_one.left_analog_y_perc * 100, + active: inputs.controller_one.key_held.l3, + text: "L3" } + state.buttons << { x: 750 + inputs.controller_one.right_analog_x_perc * 100, + y: 100 + inputs.controller_one.right_analog_y_perc * 100, + active: inputs.controller_one.key_held.r3, + text: "R3" } end # Gives each button a square shape. # If the button is being pressed or held (which means it is considered active), # the square is filled in. Otherwise, the button simply has a border. def render - state.buttons.each do |x, y, active, text| - rect = [x, y, 75, 75] + state.buttons.each do |b| + rect = { x: b.x, y: b.y, w: 75, h: 75 } - if active # if button is pressed + if b.active # if button is pressed outputs.solids << rect # rect is output as solid (filled in) else outputs.borders << rect # otherwise, output as border end # Outputs the text of each button using labels. - outputs.labels << [x, y + 95, text] # add 95 to place label above button + outputs.labels << { x: b.x, y: b.y + 95, text: b.text } # add 95 to place label above button end - outputs.labels << [10, 60, "Left Analog x: #{inputs.controller_one.left_analog_x_raw} (#{inputs.controller_one.left_analog_x_perc * 100}%)"] - outputs.labels << [10, 30, "Left Analog y: #{inputs.controller_one.left_analog_y_raw} (#{inputs.controller_one.left_analog_y_perc * 100}%)"] - outputs.labels << [900, 60, "Right Analog x: #{inputs.controller_one.right_analog_x_raw} (#{inputs.controller_one.right_analog_x_perc * 100}%)"] - outputs.labels << [900, 30, "Right Analog y: #{inputs.controller_one.right_analog_y_raw} (#{inputs.controller_one.right_analog_y_perc * 100}%)"] + outputs.labels << { x: 10, y: 60, text: "Left Analog x: #{inputs.controller_one.left_analog_x_raw} (#{inputs.controller_one.left_analog_x_perc * 100}%)" } + outputs.labels << { x: 10, y: 30, text: "Left Analog y: #{inputs.controller_one.left_analog_y_raw} (#{inputs.controller_one.left_analog_y_perc * 100}%)" } + outputs.labels << { x: 900, y: 60, text: "Right Analog x: #{inputs.controller_one.right_analog_x_raw} (#{inputs.controller_one.right_analog_x_perc * 100}%)" } + outputs.labels << { x: 900, y: 30, text: "Right Analog y: #{inputs.controller_one.right_analog_y_raw} (#{inputs.controller_one.right_analog_y_perc * 100}%)" } end end diff --git a/samples/02_input_basics/06_touch/app/main.rb b/samples/02_input_basics/06_touch/app/main.rb index 8b006c7..501fa74 100644 --- a/samples/02_input_basics/06_touch/app/main.rb +++ b/samples/02_input_basics/06_touch/app/main.rb @@ -11,10 +11,12 @@ def tick args # the next new touch will be finger_one again, but until then, new touches # don't fill in earlier slots. if !args.inputs.finger_one.nil? - args.outputs.primitives << [640, 650, "Finger #1 is touching at (#{args.inputs.finger_one.x}, #{args.inputs.finger_one.y}).", 5, 1, 255, 255, 255].label + args.outputs.primitives << { x: 640, y: 650, text: "Finger #1 is touching at (#{args.inputs.finger_one.x}, #{args.inputs.finger_one.y}).", + size_enum: 5, alignment_enum: 1, r: 255, g: 255, b: 255 }.label! end if !args.inputs.finger_two.nil? - args.outputs.primitives << [640, 600, "Finger #2 is touching at (#{args.inputs.finger_two.x}, #{args.inputs.finger_two.y}).", 5, 1, 255, 255, 255].label + args.outputs.primitives << { x: 640, y: 600, text: "Finger #2 is touching at (#{args.inputs.finger_two.x}, #{args.inputs.finger_two.y}).", + size_enum: 5, alignment_enum: 1, r: 255, g: 255, b: 255 }.label! end # Here's the more flexible interface: this will report as many simultaneous @@ -35,8 +37,7 @@ def tick args r = (color & 0xFF0000) >> 16 g = (color & 0x00FF00) >> 8 b = (color & 0x0000FF) - args.outputs.primitives << [v.x - (size / 2), v.y + (size / 2), size, size, r, g, b, 255].solid - args.outputs.primitives << [v.x, v.y + size, k.to_s, 0, 1, 0, 0, 0].label + args.outputs.primitives << { x: v.x - (size / 2), y: v.y + (size / 2), w: size, h: size, r: r, g: g, b: b, a: 255 }.solid! + args.outputs.primitives << { x: v.x, y: v.y + size, text: k.to_s, alignment_enum: 1 }.label! } end - diff --git a/samples/03_rendering_sprites/01_animation_using_separate_pngs/app/main.rb b/samples/03_rendering_sprites/01_animation_using_separate_pngs/app/main.rb index 1f88366..b25aa83 100644 --- a/samples/03_rendering_sprites/01_animation_using_separate_pngs/app/main.rb +++ b/samples/03_rendering_sprites/01_animation_using_separate_pngs/app/main.rb @@ -10,12 +10,15 @@ - args.outputs.sprites: An array. Values in this array generate sprites on the screen. The parameters are [X, Y, WIDTH, HEIGHT, IMAGE PATH] + For more information about sprites, go to mygame/documentation/05-sprites.md. - args.outputs.labels: An array. Values in the array generate labels on the screen. The parameters are [X, Y, TEXT, SIZE, ALIGNMENT, RED, GREEN, BLUE, ALPHA, FONT STYLE] + For more information about labels, go to mygame/documentation/02-labels.md. - args.inputs.keyboard.key_down.KEY: Determines if a key is in the down state, or pressed. Stores the frame that key was pressed on. + For more information about the keyboard, go to mygame/documentation/06-keyboard.md. =end @@ -28,6 +31,8 @@ # in this tick "entry point": `looping_animation`, and the # second method is `one_time_animation`. def tick args + # uncomment the line below to see animation play out in slow motion + # args.gtk.slowmo! 6 looping_animation args one_time_animation args end @@ -60,22 +65,22 @@ def looping_animation args does_sprite_loop # Now that we have `sprite_index, we can present the correct file. - args.outputs.sprites << [100, 100, 100, 100, "sprites/dragon_fly_#{sprite_index}.png"] + args.outputs.sprites << { x: 100, y: 100, w: 100, h: 100, path: "sprites/dragon_fly_#{sprite_index}.png" } # Try changing the numbers below to see how the animation changes: - args.outputs.sprites << [100, 200, 100, 100, "sprites/dragon_fly_#{0.frame_index 6, 4, true}.png"] + args.outputs.sprites << { x: 100, y: 200, w: 100, h: 100, path: "sprites/dragon_fly_#{0.frame_index 6, 4, true}.png" } end # This function shows how to animate a sprite that executes # only once when the "f" key is pressed. def one_time_animation args - # This is just a label that shows instructions within the game. - args.outputs.labels << [220, 350, "(press f to animate)"] + # This is just a label the shows instructions within the game. + args.outputs.labels << { x: 220, y: 350, text: "(press f to animate)" } # If "f" is pressed on the keyboard... if args.inputs.keyboard.key_down.f # Print the frame that "f" was pressed on. - puts "Hello from main.rb! The \"f\" key was in the down state on frame: #{args.inputs.keyboard.key_down.f}" + puts "Hello from main.rb! The \"f\" key was in the down state on frame: #{args.state.tick_count}" # And MOST IMPORTANTLY set the point it time to start the animation, # equal to "now" which is represented as args.state.tick_count. @@ -104,11 +109,11 @@ def one_time_animation args # This line sets the frame index to zero, if # the animation duration has passed (frame_index returned nil). - # Remember: we are not looping forever here. + # Remeber: we are not looping forever here. sprite_index ||= 0 # Present the sprite. - args.outputs.sprites << [100, 300, 100, 100, "sprites/dragon_fly_#{sprite_index}.png"] + args.outputs.sprites << { x: 100, y: 300, w: 100, h: 100, path: "sprites/dragon_fly_#{sprite_index}.png" } tick_instructions args, "Sample app shows how to use Numeric#frame_index and string interpolation to animate a sprite over time." end diff --git a/samples/03_rendering_sprites/02_animation_using_sprite_sheet/replay.txt b/samples/03_rendering_sprites/02_animation_using_sprite_sheet/replay.txt new file mode 100644 index 0000000..8927ef0 --- /dev/null +++ b/samples/03_rendering_sprites/02_animation_using_sprite_sheet/replay.txt @@ -0,0 +1,241 @@ +replay_version 2.0 +stopped_at 805 +seed 100 +recorded_at Sat Jul 17 09:26:10 2021 +[:mouse_button_up, 1, 0, 1, 1, 6] +[:key_down_raw, 1073741906, 0, 2, 2, 69] +[:key_down_raw, 1073741906, 0, 2, 3, 83] +[:key_down_raw, 1073741906, 0, 2, 4, 85] +[:key_down_raw, 1073741906, 0, 2, 5, 87] +[:key_down_raw, 1073741906, 0, 2, 6, 89] +[:key_down_raw, 1073741906, 0, 2, 7, 91] +[:key_down_raw, 1073741906, 0, 2, 8, 93] +[:key_down_raw, 1073741906, 0, 2, 9, 95] +[:key_down_raw, 1073741906, 0, 2, 10, 97] +[:key_down_raw, 1073741906, 0, 2, 11, 99] +[:key_down_raw, 1073741906, 0, 2, 12, 101] +[:key_down_raw, 1073741906, 0, 2, 13, 103] +[:key_down_raw, 1073741906, 0, 2, 14, 105] +[:key_down_raw, 1073741906, 0, 2, 15, 107] +[:key_down_raw, 1073741906, 0, 2, 16, 109] +[:key_down_raw, 1073741906, 0, 2, 17, 111] +[:key_down_raw, 1073741906, 0, 2, 18, 113] +[:key_down_raw, 1073741906, 0, 2, 19, 115] +[:key_down_raw, 1073741906, 0, 2, 20, 117] +[:key_down_raw, 1073741906, 0, 2, 21, 119] +[:key_down_raw, 1073741906, 0, 2, 22, 121] +[:key_down_raw, 1073741906, 0, 2, 23, 123] +[:key_down_raw, 1073741906, 0, 2, 24, 125] +[:key_down_raw, 1073741906, 0, 2, 25, 127] +[:key_down_raw, 1073741906, 0, 2, 26, 129] +[:key_up_raw, 1073741906, 0, 2, 27, 130] +[:key_down_raw, 1073741903, 0, 2, 28, 131] +[:key_down_raw, 1073741903, 0, 2, 29, 146] +[:key_down_raw, 1073741903, 0, 2, 30, 148] +[:key_down_raw, 1073741903, 0, 2, 31, 150] +[:key_down_raw, 1073741903, 0, 2, 32, 152] +[:key_down_raw, 1073741903, 0, 2, 33, 154] +[:key_down_raw, 1073741903, 0, 2, 34, 156] +[:key_down_raw, 1073741903, 0, 2, 35, 158] +[:key_down_raw, 1073741903, 0, 2, 36, 160] +[:key_down_raw, 1073741903, 0, 2, 37, 162] +[:key_down_raw, 1073741903, 0, 2, 38, 164] +[:key_down_raw, 1073741903, 0, 2, 39, 166] +[:key_down_raw, 1073741903, 0, 2, 40, 168] +[:key_down_raw, 1073741903, 0, 2, 41, 170] +[:key_down_raw, 1073741903, 0, 2, 42, 172] +[:key_down_raw, 1073741903, 0, 2, 43, 174] +[:key_down_raw, 1073741903, 0, 2, 44, 176] +[:key_down_raw, 1073741903, 0, 2, 45, 178] +[:key_down_raw, 1073741903, 0, 2, 46, 180] +[:key_down_raw, 1073741903, 0, 2, 47, 182] +[:key_down_raw, 1073741903, 0, 2, 48, 184] +[:key_down_raw, 1073741903, 0, 2, 49, 186] +[:key_down_raw, 1073741903, 0, 2, 50, 189] +[:key_down_raw, 1073741903, 0, 2, 51, 190] +[:key_down_raw, 1073741903, 0, 2, 52, 192] +[:key_down_raw, 1073741903, 0, 2, 53, 194] +[:key_down_raw, 1073741903, 0, 2, 54, 196] +[:key_down_raw, 1073741903, 0, 2, 55, 198] +[:key_down_raw, 1073741903, 0, 2, 56, 200] +[:key_down_raw, 1073741903, 0, 2, 57, 203] +[:key_down_raw, 1073741903, 0, 2, 58, 204] +[:key_down_raw, 1073741903, 0, 2, 59, 206] +[:key_down_raw, 1073741903, 0, 2, 60, 208] +[:key_down_raw, 1073741903, 0, 2, 61, 210] +[:key_down_raw, 1073741903, 0, 2, 62, 212] +[:key_down_raw, 1073741903, 0, 2, 63, 214] +[:key_down_raw, 1073741903, 0, 2, 64, 216] +[:key_down_raw, 1073741903, 0, 2, 65, 218] +[:key_down_raw, 1073741903, 0, 2, 66, 220] +[:key_down_raw, 1073741904, 0, 2, 67, 221] +[:key_up_raw, 1073741903, 0, 2, 68, 225] +[:key_down_raw, 1073741904, 0, 2, 69, 236] +[:key_down_raw, 1073741904, 0, 2, 70, 238] +[:key_down_raw, 1073741904, 0, 2, 71, 240] +[:key_down_raw, 1073741904, 0, 2, 72, 242] +[:key_down_raw, 1073741904, 0, 2, 73, 244] +[:key_down_raw, 1073741904, 0, 2, 74, 246] +[:key_down_raw, 1073741904, 0, 2, 75, 248] +[:key_down_raw, 1073741904, 0, 2, 76, 250] +[:key_up_raw, 1073741904, 0, 2, 77, 251] +[:key_down_raw, 1073741906, 0, 2, 78, 253] +[:key_down_raw, 1073741906, 0, 2, 79, 268] +[:key_down_raw, 1073741906, 0, 2, 80, 270] +[:key_down_raw, 1073741906, 0, 2, 81, 272] +[:key_down_raw, 1073741906, 0, 2, 82, 275] +[:key_down_raw, 1073741906, 0, 2, 83, 276] +[:key_down_raw, 1073741906, 0, 2, 84, 278] +[:key_down_raw, 1073741906, 0, 2, 85, 280] +[:key_down_raw, 1073741906, 0, 2, 86, 283] +[:key_down_raw, 1073741906, 0, 2, 87, 285] +[:key_down_raw, 1073741906, 0, 2, 88, 287] +[:key_down_raw, 1073741906, 0, 2, 89, 289] +[:key_down_raw, 1073741906, 0, 2, 90, 291] +[:key_down_raw, 1073741906, 0, 2, 91, 293] +[:key_down_raw, 1073741906, 0, 2, 92, 294] +[:key_down_raw, 1073741906, 0, 2, 93, 296] +[:key_down_raw, 1073741906, 0, 2, 94, 299] +[:key_down_raw, 1073741906, 0, 2, 95, 301] +[:key_down_raw, 1073741906, 0, 2, 96, 303] +[:key_up_raw, 1073741906, 0, 2, 97, 303] +[:key_down_raw, 1073741905, 0, 2, 98, 307] +[:key_down_raw, 1073741905, 0, 2, 99, 322] +[:key_down_raw, 1073741905, 0, 2, 100, 324] +[:key_down_raw, 1073741905, 0, 2, 101, 326] +[:key_down_raw, 1073741905, 0, 2, 102, 328] +[:key_down_raw, 1073741905, 0, 2, 103, 330] +[:key_down_raw, 1073741905, 0, 2, 104, 332] +[:key_down_raw, 1073741905, 0, 2, 105, 334] +[:key_down_raw, 1073741905, 0, 2, 106, 336] +[:key_up_raw, 1073741905, 0, 2, 107, 336] +[:key_down_raw, 1073741903, 0, 2, 108, 337] +[:key_down_raw, 1073741906, 0, 2, 109, 342] +[:key_down_raw, 1073741906, 0, 2, 110, 357] +[:key_down_raw, 1073741906, 0, 2, 111, 359] +[:key_down_raw, 1073741906, 0, 2, 112, 361] +[:key_down_raw, 1073741906, 0, 2, 113, 363] +[:key_down_raw, 1073741906, 0, 2, 114, 365] +[:key_down_raw, 1073741906, 0, 2, 115, 367] +[:key_down_raw, 1073741906, 0, 2, 116, 369] +[:key_down_raw, 1073741906, 0, 2, 117, 371] +[:key_down_raw, 1073741906, 0, 2, 118, 373] +[:key_down_raw, 1073741906, 0, 2, 119, 375] +[:key_down_raw, 1073741906, 0, 2, 120, 377] +[:key_down_raw, 1073741906, 0, 2, 121, 379] +[:key_down_raw, 1073741906, 0, 2, 122, 381] +[:key_down_raw, 1073741906, 0, 2, 123, 383] +[:key_down_raw, 1073741906, 0, 2, 124, 385] +[:key_down_raw, 1073741906, 0, 2, 125, 387] +[:key_down_raw, 1073741906, 0, 2, 126, 389] +[:key_down_raw, 1073741906, 0, 2, 127, 391] +[:key_up_raw, 1073741903, 0, 2, 128, 392] +[:key_down_raw, 1073741906, 0, 2, 129, 393] +[:key_up_raw, 1073741906, 0, 2, 130, 394] +[:key_down_raw, 1073741904, 0, 2, 131, 404] +[:key_down_raw, 1073741905, 0, 2, 132, 407] +[:key_down_raw, 1073741905, 0, 2, 133, 421] +[:key_down_raw, 1073741905, 0, 2, 134, 423] +[:key_down_raw, 1073741905, 0, 2, 135, 425] +[:key_down_raw, 1073741905, 0, 2, 136, 428] +[:key_down_raw, 1073741905, 0, 2, 137, 429] +[:key_down_raw, 1073741905, 0, 2, 138, 431] +[:key_down_raw, 1073741905, 0, 2, 139, 433] +[:key_down_raw, 1073741905, 0, 2, 140, 435] +[:key_down_raw, 1073741905, 0, 2, 141, 437] +[:key_down_raw, 1073741905, 0, 2, 142, 439] +[:key_down_raw, 1073741905, 0, 2, 143, 441] +[:key_down_raw, 1073741905, 0, 2, 144, 443] +[:key_down_raw, 1073741905, 0, 2, 145, 445] +[:key_down_raw, 1073741905, 0, 2, 146, 447] +[:key_down_raw, 1073741905, 0, 2, 147, 449] +[:key_up_raw, 1073741905, 0, 2, 148, 451] +[:key_up_raw, 1073741904, 0, 2, 149, 453] +[:key_down_raw, 1073741904, 0, 2, 150, 456] +[:key_up_raw, 1073741904, 0, 2, 151, 462] +[:key_down_raw, 1073741905, 0, 2, 152, 464] +[:key_down_raw, 1073741905, 0, 2, 153, 479] +[:key_down_raw, 1073741905, 0, 2, 154, 481] +[:key_down_raw, 1073741905, 0, 2, 155, 483] +[:key_down_raw, 1073741905, 0, 2, 156, 485] +[:key_down_raw, 1073741905, 0, 2, 157, 487] +[:key_down_raw, 1073741905, 0, 2, 158, 489] +[:key_down_raw, 1073741905, 0, 2, 159, 491] +[:key_down_raw, 1073741905, 0, 2, 160, 493] +[:key_down_raw, 1073741905, 0, 2, 161, 495] +[:key_down_raw, 1073741905, 0, 2, 162, 497] +[:key_down_raw, 1073741905, 0, 2, 163, 499] +[:key_down_raw, 1073741906, 0, 2, 164, 500] +[:key_down_raw, 1073741906, 0, 2, 165, 515] +[:key_down_raw, 1073741906, 0, 2, 166, 517] +[:key_down_raw, 1073741906, 0, 2, 167, 519] +[:key_down_raw, 1073741906, 0, 2, 168, 521] +[:key_down_raw, 1073741906, 0, 2, 169, 523] +[:key_down_raw, 1073741906, 0, 2, 170, 525] +[:key_down_raw, 1073741906, 0, 2, 171, 527] +[:key_down_raw, 1073741906, 0, 2, 172, 529] +[:key_down_raw, 1073741906, 0, 2, 173, 531] +[:key_down_raw, 1073741906, 0, 2, 174, 533] +[:key_down_raw, 1073741906, 0, 2, 175, 535] +[:key_down_raw, 1073741906, 0, 2, 176, 537] +[:key_down_raw, 1073741906, 0, 2, 177, 539] +[:key_down_raw, 1073741906, 0, 2, 178, 541] +[:key_down_raw, 1073741906, 0, 2, 179, 543] +[:key_down_raw, 1073741906, 0, 2, 180, 545] +[:key_down_raw, 1073741903, 0, 2, 181, 547] +[:key_up_raw, 1073741905, 0, 2, 182, 555] +[:key_down_raw, 1073741905, 0, 2, 183, 558] +[:key_up_raw, 1073741906, 0, 2, 184, 564] +[:key_down_raw, 1073741905, 0, 2, 185, 573] +[:key_down_raw, 1073741905, 0, 2, 186, 575] +[:key_down_raw, 1073741905, 0, 2, 187, 577] +[:key_down_raw, 1073741905, 0, 2, 188, 579] +[:key_down_raw, 1073741905, 0, 2, 189, 581] +[:key_down_raw, 1073741905, 0, 2, 190, 583] +[:key_down_raw, 1073741905, 0, 2, 191, 585] +[:key_down_raw, 1073741905, 0, 2, 192, 587] +[:key_down_raw, 1073741905, 0, 2, 193, 589] +[:key_down_raw, 1073741905, 0, 2, 194, 591] +[:key_down_raw, 1073741905, 0, 2, 195, 593] +[:key_down_raw, 1073741905, 0, 2, 196, 595] +[:key_down_raw, 1073741905, 0, 2, 197, 597] +[:key_down_raw, 1073741905, 0, 2, 198, 599] +[:key_down_raw, 1073741905, 0, 2, 199, 601] +[:key_down_raw, 1073741905, 0, 2, 200, 603] +[:key_down_raw, 1073741905, 0, 2, 201, 605] +[:key_up_raw, 1073741905, 0, 2, 202, 605] +[:key_up_raw, 1073741903, 0, 2, 203, 606] +[:key_down_raw, 96, 0, 2, 204, 640] +[:key_up_raw, 96, 0, 2, 205, 646] +[:mouse_move, 796, 95, 2, 206, 683] +[:mouse_move, 798, 95, 2, 207, 684] +[:mouse_move, 808, 94, 2, 208, 685] +[:mouse_move, 814, 94, 2, 209, 686] +[:mouse_move, 826, 94, 2, 210, 687] +[:mouse_move, 832, 94, 2, 211, 688] +[:mouse_move, 842, 94, 2, 212, 689] +[:mouse_move, 846, 94, 2, 213, 690] +[:mouse_move, 856, 93, 2, 214, 691] +[:mouse_move, 860, 93, 2, 215, 692] +[:mouse_move, 867, 93, 2, 216, 693] +[:mouse_move, 869, 93, 2, 217, 694] +[:mouse_move, 870, 93, 2, 218, 695] +[:mouse_move, 871, 93, 2, 219, 697] +[:mouse_move, 872, 93, 2, 220, 698] +[:mouse_move, 873, 93, 2, 221, 699] +[:mouse_move, 874, 93, 2, 222, 701] +[:mouse_move, 875, 93, 2, 223, 703] +[:mouse_move, 877, 94, 2, 224, 704] +[:mouse_move, 878, 94, 2, 225, 705] +[:mouse_move, 879, 94, 2, 226, 706] +[:mouse_move, 869, 95, 2, 227, 758] +[:mouse_move, 864, 96, 2, 228, 759] +[:mouse_move, 856, 96, 2, 229, 760] +[:mouse_move, 852, 96, 2, 230, 761] +[:mouse_move, 834, 96, 2, 231, 762] +[:mouse_move, 821, 96, 2, 232, 763] +[:mouse_move, 797, 96, 2, 233, 764] +[:mouse_move, 789, 96, 2, 234, 765] +[:mouse_move, 780, 94, 2, 235, 766] +[:mouse_move, 779, 94, 2, 236, 767] +[:key_down_raw, 13, 0, 2, 237, 805] diff --git a/samples/03_rendering_sprites/03_animation_states/replay.txt b/samples/03_rendering_sprites/03_animation_states/replay.txt new file mode 100644 index 0000000..f9d1962 --- /dev/null +++ b/samples/03_rendering_sprites/03_animation_states/replay.txt @@ -0,0 +1,182 @@ +replay_version 2.0 +stopped_at 770 +seed 100 +recorded_at Sat Jul 17 09:29:30 2021 +[:mouse_button_up, 1, 0, 1, 1, 4] +[:key_down_raw, 1073741903, 0, 2, 2, 75] +[:key_down_raw, 1073741903, 0, 2, 3, 89] +[:key_down_raw, 1073741903, 0, 2, 4, 91] +[:key_down_raw, 1073741903, 0, 2, 5, 93] +[:key_down_raw, 1073741903, 0, 2, 6, 95] +[:key_down_raw, 1073741903, 0, 2, 7, 97] +[:key_down_raw, 1073741903, 0, 2, 8, 99] +[:key_down_raw, 1073741903, 0, 2, 9, 101] +[:key_down_raw, 1073741903, 0, 2, 10, 103] +[:key_down_raw, 1073741903, 0, 2, 11, 105] +[:key_down_raw, 1073741903, 0, 2, 12, 107] +[:key_down_raw, 1073741903, 0, 2, 13, 109] +[:key_down_raw, 1073741903, 0, 2, 14, 111] +[:key_down_raw, 1073741903, 0, 2, 15, 113] +[:key_down_raw, 1073741903, 0, 2, 16, 115] +[:key_down_raw, 1073741903, 0, 2, 17, 117] +[:key_down_raw, 1073741903, 0, 2, 18, 119] +[:key_down_raw, 1073741903, 0, 2, 19, 121] +[:key_down_raw, 1073741903, 0, 2, 20, 123] +[:key_down_raw, 1073741903, 0, 2, 21, 125] +[:key_down_raw, 1073741903, 0, 2, 22, 127] +[:key_down_raw, 1073741903, 0, 2, 23, 129] +[:key_down_raw, 1073741903, 0, 2, 24, 131] +[:key_down_raw, 1073741903, 0, 2, 25, 133] +[:key_down_raw, 1073741903, 0, 2, 26, 135] +[:key_down_raw, 1073741903, 0, 2, 27, 137] +[:key_down_raw, 1073741903, 0, 2, 28, 139] +[:key_down_raw, 1073741903, 0, 2, 29, 141] +[:key_down_raw, 1073741903, 0, 2, 30, 143] +[:key_down_raw, 1073741903, 0, 2, 31, 145] +[:key_down_raw, 1073741903, 0, 2, 32, 147] +[:key_down_raw, 1073741903, 0, 2, 33, 149] +[:key_down_raw, 1073741903, 0, 2, 34, 151] +[:key_down_raw, 1073741903, 0, 2, 35, 153] +[:key_down_raw, 1073741903, 0, 2, 36, 155] +[:key_down_raw, 1073741903, 0, 2, 37, 157] +[:key_down_raw, 1073741903, 0, 2, 38, 159] +[:key_down_raw, 1073741903, 0, 2, 39, 161] +[:key_down_raw, 1073741903, 0, 2, 40, 163] +[:key_down_raw, 1073741903, 0, 2, 41, 165] +[:key_down_raw, 1073741903, 0, 2, 42, 167] +[:key_down_raw, 1073741903, 0, 2, 43, 169] +[:key_down_raw, 1073741903, 0, 2, 44, 171] +[:key_down_raw, 1073741903, 0, 2, 45, 173] +[:key_down_raw, 1073741903, 0, 2, 46, 175] +[:key_down_raw, 1073741903, 0, 2, 47, 177] +[:key_down_raw, 1073741903, 0, 2, 48, 179] +[:key_down_raw, 1073741903, 0, 2, 49, 181] +[:key_down_raw, 1073741903, 0, 2, 50, 183] +[:key_down_raw, 1073741903, 0, 2, 51, 185] +[:key_down_raw, 1073741903, 0, 2, 52, 187] +[:key_down_raw, 1073741903, 0, 2, 53, 189] +[:key_down_raw, 1073741903, 0, 2, 54, 191] +[:key_down_raw, 1073741903, 0, 2, 55, 193] +[:key_down_raw, 1073741903, 0, 2, 56, 195] +[:key_down_raw, 1073741903, 0, 2, 57, 197] +[:key_down_raw, 1073741903, 0, 2, 58, 199] +[:key_down_raw, 1073741903, 0, 2, 59, 201] +[:key_down_raw, 1073741903, 0, 2, 60, 203] +[:key_down_raw, 1073741903, 0, 2, 61, 205] +[:key_down_raw, 1073741903, 0, 2, 62, 207] +[:key_down_raw, 1073741903, 0, 2, 63, 209] +[:key_down_raw, 1073741903, 0, 2, 64, 211] +[:key_down_raw, 1073741903, 0, 2, 65, 213] +[:key_down_raw, 1073741903, 0, 2, 66, 215] +[:key_down_raw, 1073741903, 0, 2, 67, 217] +[:key_down_raw, 1073741903, 0, 2, 68, 219] +[:key_down_raw, 1073741903, 0, 2, 69, 221] +[:key_down_raw, 1073741903, 0, 2, 70, 223] +[:key_down_raw, 1073741903, 0, 2, 71, 225] +[:key_down_raw, 1073741903, 0, 2, 72, 227] +[:key_down_raw, 1073741903, 0, 2, 73, 229] +[:key_down_raw, 1073741903, 0, 2, 74, 231] +[:key_down_raw, 1073741903, 0, 2, 75, 233] +[:key_down_raw, 1073741903, 0, 2, 76, 235] +[:key_down_raw, 1073741903, 0, 2, 77, 237] +[:key_down_raw, 1073741903, 0, 2, 78, 239] +[:key_down_raw, 1073741903, 0, 2, 79, 241] +[:key_down_raw, 1073741903, 0, 2, 80, 243] +[:key_down_raw, 1073741903, 0, 2, 81, 245] +[:key_down_raw, 1073741903, 0, 2, 82, 247] +[:key_down_raw, 1073741903, 0, 2, 83, 249] +[:key_up_raw, 1073741903, 0, 2, 84, 250] +[:key_down_raw, 106, 0, 2, 85, 269] +[:key_up_raw, 106, 0, 2, 86, 277] +[:key_down_raw, 1073741905, 0, 2, 87, 299] +[:key_down_raw, 1073741905, 0, 2, 88, 314] +[:key_down_raw, 1073741905, 0, 2, 89, 316] +[:key_down_raw, 1073741905, 0, 2, 90, 318] +[:key_down_raw, 1073741905, 0, 2, 91, 320] +[:key_down_raw, 1073741905, 0, 2, 92, 322] +[:key_down_raw, 1073741905, 0, 2, 93, 324] +[:key_down_raw, 1073741905, 0, 2, 94, 326] +[:key_down_raw, 1073741905, 0, 2, 95, 328] +[:key_down_raw, 1073741905, 0, 2, 96, 330] +[:key_down_raw, 1073741905, 0, 2, 97, 332] +[:key_down_raw, 1073741905, 0, 2, 98, 334] +[:key_down_raw, 1073741905, 0, 2, 99, 336] +[:key_down_raw, 1073741905, 0, 2, 100, 338] +[:key_down_raw, 1073741905, 0, 2, 101, 340] +[:key_down_raw, 1073741904, 0, 2, 102, 341] +[:key_down_raw, 1073741904, 0, 2, 103, 356] +[:key_down_raw, 1073741904, 0, 2, 104, 358] +[:key_down_raw, 1073741904, 0, 2, 105, 360] +[:key_down_raw, 1073741904, 0, 2, 106, 362] +[:key_down_raw, 1073741904, 0, 2, 107, 364] +[:key_down_raw, 1073741904, 0, 2, 108, 366] +[:key_down_raw, 1073741904, 0, 2, 109, 368] +[:key_down_raw, 1073741904, 0, 2, 110, 370] +[:key_up_raw, 1073741904, 0, 2, 111, 371] +[:key_up_raw, 1073741905, 0, 2, 112, 373] +[:key_down_raw, 1073741906, 0, 2, 113, 378] +[:key_down_raw, 1073741906, 0, 2, 114, 393] +[:key_down_raw, 1073741906, 0, 2, 115, 395] +[:key_down_raw, 1073741906, 0, 2, 116, 397] +[:key_down_raw, 1073741906, 0, 2, 117, 399] +[:key_up_raw, 1073741906, 0, 2, 118, 401] +[:key_down_raw, 1073741904, 0, 2, 119, 402] +[:key_down_raw, 1073741904, 0, 2, 120, 419] +[:key_down_raw, 1073741904, 0, 2, 121, 421] +[:key_down_raw, 1073741904, 0, 2, 122, 423] +[:key_down_raw, 1073741904, 0, 2, 123, 425] +[:key_down_raw, 1073741904, 0, 2, 124, 427] +[:key_up_raw, 1073741904, 0, 2, 125, 429] +[:key_down_raw, 1073741904, 0, 2, 126, 434] +[:key_up_raw, 1073741904, 0, 2, 127, 437] +[:key_down_raw, 106, 0, 2, 128, 457] +[:key_up_raw, 106, 0, 2, 129, 463] +[:key_down_raw, 1073741903, 0, 2, 130, 490] +[:key_up_raw, 1073741903, 0, 2, 131, 500] +[:key_down_raw, 1073741906, 0, 2, 132, 501] +[:key_down_raw, 1073741906, 0, 2, 133, 516] +[:key_down_raw, 1073741906, 0, 2, 134, 518] +[:key_down_raw, 1073741906, 0, 2, 135, 520] +[:key_up_raw, 1073741906, 0, 2, 136, 521] +[:key_down_raw, 1073741904, 0, 2, 137, 532] +[:key_down_raw, 1073741904, 0, 2, 138, 547] +[:key_down_raw, 1073741904, 0, 2, 139, 549] +[:key_up_raw, 1073741904, 0, 2, 140, 550] +[:key_down_raw, 1073741903, 0, 2, 141, 552] +[:key_down_raw, 1073741903, 0, 2, 142, 567] +[:key_up_raw, 1073741903, 0, 2, 143, 568] +[:key_down_raw, 106, 0, 2, 144, 574] +[:key_up_raw, 106, 0, 2, 145, 580] +[:key_down_raw, 96, 0, 2, 146, 661] +[:key_up_raw, 96, 0, 2, 147, 666] +[:mouse_move, 799, 92, 2, 148, 693] +[:mouse_move, 803, 92, 2, 149, 694] +[:mouse_move, 811, 91, 2, 150, 695] +[:mouse_move, 816, 90, 2, 151, 696] +[:mouse_move, 827, 88, 2, 152, 697] +[:mouse_move, 830, 87, 2, 153, 698] +[:mouse_move, 835, 87, 2, 154, 699] +[:mouse_move, 837, 87, 2, 155, 700] +[:mouse_move, 838, 87, 2, 156, 701] +[:mouse_move, 838, 86, 2, 157, 702] +[:mouse_move, 839, 86, 2, 158, 704] +[:mouse_move, 838, 86, 2, 159, 712] +[:mouse_move, 838, 87, 2, 160, 713] +[:mouse_move, 835, 87, 2, 161, 714] +[:mouse_move, 832, 87, 2, 162, 715] +[:mouse_move, 824, 87, 2, 163, 716] +[:mouse_move, 820, 87, 2, 164, 717] +[:mouse_move, 809, 87, 2, 165, 718] +[:mouse_move, 805, 87, 2, 166, 719] +[:mouse_move, 800, 86, 2, 167, 720] +[:mouse_move, 799, 86, 2, 168, 721] +[:mouse_move, 798, 86, 2, 169, 722] +[:mouse_move, 797, 86, 2, 170, 723] +[:mouse_move, 796, 86, 2, 171, 724] +[:mouse_move, 798, 86, 2, 172, 742] +[:mouse_move, 805, 86, 2, 173, 743] +[:mouse_move, 807, 86, 2, 174, 744] +[:mouse_move, 810, 86, 2, 175, 745] +[:mouse_move, 811, 86, 2, 176, 747] +[:mouse_move, 811, 85, 2, 177, 760] +[:key_down_raw, 13, 0, 2, 178, 770] diff --git a/samples/03_rendering_sprites/04_color_and_rotation/app/main.rb b/samples/03_rendering_sprites/04_color_and_rotation/app/main.rb index 7e0fc3c..c3f2d8f 100644 --- a/samples/03_rendering_sprites/04_color_and_rotation/app/main.rb +++ b/samples/03_rendering_sprites/04_color_and_rotation/app/main.rb @@ -21,10 +21,14 @@ - args.outputs.sprites: An array. The values generate a sprite. The parameters are [X, Y, WIDTH, HEIGHT, PATH, ANGLE, ALPHA, RED, GREEN, BLUE] + Before continuing with this sample app, it is HIGHLY recommended that you look + at mygame/documentation/05-sprites.md. - args.inputs.keyboard.key_held.KEY: Determines if a key is being pressed. + For more information about the keyboard, go to mygame/documentation/06-keyboard.md. - args.inputs.controller_one: Takes input from the controller based on what key is pressed. + For more information about the controller, go to mygame/documentation/08-controllers.md. - num1.lesser(num2): Finds the lower value of the given options. @@ -117,7 +121,7 @@ def create_sprite path, options = {} source_w: -1, source_h: -1, - # flip horizontally, flip vertically + # flip horiztonally, flip vertically flip_h: false, flip_v: false, @@ -153,7 +157,7 @@ end def calc_wrap state # car returns to left side of screen if it disappears on right side of screen - # sprite.width refers to tile's size, which is multiplied by scale (4) to make it bigger + # sprite.width refers to tile's size, which is multipled by scale (4) to make it bigger state.x = -state.sprite.width * state.sprite.scale if state.x - 20 > 1280 # car wraps around to right side of screen if it disappears on the left side diff --git a/samples/04_physics_and_collisions/01_simple/app/main.rb b/samples/04_physics_and_collisions/01_simple/app/main.rb index 9075d89..5e3f9b7 100644 --- a/samples/04_physics_and_collisions/01_simple/app/main.rb +++ b/samples/04_physics_and_collisions/01_simple/app/main.rb @@ -10,7 +10,7 @@ # This sample app shows collisions between two boxes. -# Runs methods needed for the game to run properly. +# Runs methods needed for game to run properly. def tick args tick_instructions args, "Sample app shows how to move a square over time and determine collision." defaults args @@ -33,7 +33,7 @@ def defaults args end def render args - # If the game state denotes that a collision has occurred, + # If the game state denotes that a collision has occured, # render a solid square, otherwise render a border instead. if args.state.center_box_collision args.outputs.solids << args.state.center_box @@ -47,7 +47,7 @@ end # Generally in a pipeline for a game engine, you have rendering, # game simulation (calculation), and input processing. -# This function represents the game simulation. +# This fuction represents the game simulation. def calc args position_moving_box args determine_collision_center_box args diff --git a/samples/04_physics_and_collisions/02_moving_objects/app/main.rb b/samples/04_physics_and_collisions/02_moving_objects/app/main.rb index 9c39363..35eabfb 100644 --- a/samples/04_physics_and_collisions/02_moving_objects/app/main.rb +++ b/samples/04_physics_and_collisions/02_moving_objects/app/main.rb @@ -48,15 +48,17 @@ Reminders: - args.inputs.keyboard.KEY: Determines if a key has been pressed. + For more information about the keyboard, take a look at mygame/documentation/06-keyboard.md. - ARRAY#intersect_rect?: Returns true or false depending on if the two rectangles intersect. - args.outputs.solids: An array. The values generate a solid. The parameters are [X, Y, WIDTH, HEIGHT, RED, GREEN, BLUE] + For more information about solids, go to mygame/documentation/03-solids-and-borders.md. =end -# Calls methods needed for the game to run properly +# Calls methods needed for game to run properly def tick args tick_instructions args, "Use LEFT and RIGHT arrow keys to move and SPACE to jump." defaults args diff --git a/samples/04_physics_and_collisions/04_box_collision/app/main.rb b/samples/04_physics_and_collisions/04_box_collision/app/main.rb index e407f0d..af85fef 100644 --- a/samples/04_physics_and_collisions/04_box_collision/app/main.rb +++ b/samples/04_physics_and_collisions/04_box_collision/app/main.rb @@ -42,7 +42,7 @@ class PoorManPlatformerPhysics # Sets default values for variables. # The ||= sign means that the variable will only be set to the value following the = sign if the value has - # not already been set before. Initialization happens only in the first frame. + # not already been set before. Intialization happens only in the first frame. def defaults state.tile_size = 64 state.gravity = -0.2 @@ -161,7 +161,7 @@ class PoorManPlatformerPhysics # Calls methods needed to determine collisions between player and world_collision rects. def calc_box_collision - return unless state.world_lookup.keys.length > 0 # return unless hash has at least 1 key + return unless state.world_lookup.keys.length > 0 # return unless hash has atleast 1 key collision_floor! collision_left! collision_right! @@ -189,7 +189,7 @@ class PoorManPlatformerPhysics return unless state.dx < 0 # return unless player is moving left player_rect = [state.x - 0.1, state.y, state.tile_size, state.tile_size] - # Goes through world_collision_rects to find all intersections between the player's left side and the + # Goes through world_collision_rects to find all intersections beween the player's left side and the # right side of a world_collision_rect. left_side_collisions = state.world_collision_rects .find_all { |r| r[:left_right].intersect_rect?(player_rect, collision_tollerance) } diff --git a/samples/04_physics_and_collisions/05_box_collision_2/app/main.rb b/samples/04_physics_and_collisions/05_box_collision_2/app/main.rb index 42ccf22..126759a 100644 --- a/samples/04_physics_and_collisions/05_box_collision_2/app/main.rb +++ b/samples/04_physics_and_collisions/05_box_collision_2/app/main.rb @@ -91,7 +91,7 @@ class MetroidvaniaStarter state.sprite_selected ||= 1 state.map_saved_at ||= 0 - # Sets all the coordinate values for the sprite selection screen into a grid + # Sets all the cordinate values for the sprite selection screen into a grid # Displayed when 's' is pressed by player to access sprites if state.sprite_coords == [] # if sprite_coords is an empty array count = 1 @@ -223,7 +223,7 @@ class MetroidvaniaStarter # Calls methods that determine whether the player collides with any world_collision_rects. def calc_box_collision - return unless state.world_lookup.keys.length > 0 # return unless hash has at least 1 key + return unless state.world_lookup.keys.length > 0 # return unless hash has atleast 1 key collision_floor collision_left collision_right diff --git a/samples/04_physics_and_collisions/06_box_collision_3/app/main.rb b/samples/04_physics_and_collisions/06_box_collision_3/app/main.rb index 2e32eee..4f5b483 100644 --- a/samples/04_physics_and_collisions/06_box_collision_3/app/main.rb +++ b/samples/04_physics_and_collisions/06_box_collision_3/app/main.rb @@ -46,9 +46,9 @@ class Game mouse_overlay = mouse_overlay.merge r: 255 if state.delete_mode if state.mouse_held - outputs.primitives << mouse_overlay.border + outputs.primitives << mouse_overlay.border! else - outputs.primitives << mouse_overlay.solid + outputs.primitives << mouse_overlay.solid! end end diff --git a/samples/04_physics_and_collisions/06_box_collision_3/replay.txt b/samples/04_physics_and_collisions/06_box_collision_3/replay.txt new file mode 100644 index 0000000..0f4373e --- /dev/null +++ b/samples/04_physics_and_collisions/06_box_collision_3/replay.txt @@ -0,0 +1,687 @@ +replay_version 2.0 +stopped_at 2166 +seed 100 +recorded_at Sat Jul 17 09:33:34 2021 +[:mouse_button_up, 1, 0, 1, 1, 5] +[:mouse_move, 805, 89, 2, 2, 19] +[:mouse_move, 805, 91, 2, 3, 20] +[:mouse_move, 803, 96, 2, 4, 21] +[:mouse_move, 802, 99, 2, 5, 22] +[:mouse_move, 799, 103, 2, 6, 23] +[:mouse_move, 797, 107, 2, 7, 24] +[:mouse_move, 786, 124, 2, 8, 25] +[:mouse_move, 772, 141, 2, 9, 26] +[:mouse_move, 716, 207, 2, 10, 27] +[:mouse_move, 638, 289, 2, 11, 29] +[:mouse_move, 608, 314, 2, 12, 29] +[:mouse_move, 562, 342, 2, 13, 31] +[:mouse_move, 541, 350, 2, 14, 31] +[:mouse_move, 520, 356, 2, 15, 32] +[:mouse_move, 459, 360, 2, 16, 34] +[:mouse_move, 411, 357, 2, 17, 34] +[:mouse_move, 319, 340, 2, 18, 35] +[:mouse_move, 287, 330, 2, 19, 37] +[:mouse_move, 248, 308, 2, 20, 37] +[:mouse_move, 233, 298, 2, 21, 38] +[:mouse_move, 211, 283, 2, 22, 39] +[:mouse_move, 204, 278, 2, 23, 40] +[:mouse_move, 195, 272, 2, 24, 42] +[:mouse_move, 192, 269, 2, 25, 42] +[:mouse_move, 187, 266, 2, 26, 44] +[:mouse_move, 184, 263, 2, 27, 44] +[:mouse_move, 181, 261, 2, 28, 45] +[:mouse_move, 174, 255, 2, 29, 46] +[:mouse_move, 170, 252, 2, 30, 47] +[:mouse_move, 155, 244, 2, 31, 48] +[:mouse_move, 122, 232, 2, 32, 50] +[:mouse_move, 107, 227, 2, 33, 50] +[:mouse_move, 88, 224, 2, 34, 52] +[:mouse_move, 80, 223, 2, 35, 52] +[:mouse_move, 73, 223, 2, 36, 53] +[:mouse_move, 57, 224, 2, 37, 54] +[:mouse_move, 54, 224, 2, 38, 55] +[:mouse_move, 51, 224, 2, 39, 56] +[:mouse_move, 51, 223, 2, 40, 60] +[:mouse_move, 52, 221, 2, 41, 62] +[:mouse_move, 54, 219, 2, 42, 64] +[:mouse_move, 54, 218, 2, 43, 64] +[:mouse_move, 54, 219, 2, 44, 73] +[:mouse_move, 55, 221, 2, 45, 75] +[:mouse_move, 55, 224, 2, 46, 75] +[:mouse_move, 55, 230, 2, 47, 77] +[:mouse_move, 55, 232, 2, 48, 77] +[:mouse_move, 55, 238, 2, 49, 79] +[:mouse_move, 55, 243, 2, 50, 79] +[:mouse_move, 57, 254, 2, 51, 81] +[:mouse_move, 58, 256, 2, 52, 81] +[:mouse_button_pressed, 1, 0, 1, 53, 91] +[:mouse_move, 60, 256, 2, 54, 95] +[:mouse_move, 63, 256, 2, 55, 97] +[:mouse_move, 73, 256, 2, 56, 97] +[:mouse_move, 83, 256, 2, 57, 99] +[:mouse_move, 111, 257, 2, 58, 99] +[:mouse_move, 128, 257, 2, 59, 101] +[:mouse_move, 163, 257, 2, 60, 101] +[:mouse_move, 179, 257, 2, 61, 103] +[:mouse_move, 203, 257, 2, 62, 103] +[:mouse_move, 214, 257, 2, 63, 105] +[:mouse_move, 236, 257, 2, 64, 105] +[:mouse_move, 247, 257, 2, 65, 107] +[:mouse_move, 267, 257, 2, 66, 107] +[:mouse_move, 276, 257, 2, 67, 109] +[:mouse_move, 288, 257, 2, 68, 109] +[:mouse_move, 293, 257, 2, 69, 111] +[:mouse_move, 302, 257, 2, 70, 111] +[:mouse_move, 308, 257, 2, 71, 113] +[:mouse_move, 322, 257, 2, 72, 113] +[:mouse_move, 330, 257, 2, 73, 115] +[:mouse_move, 334, 257, 2, 74, 115] +[:mouse_move, 340, 257, 2, 75, 117] +[:mouse_move, 342, 257, 2, 76, 117] +[:mouse_move, 348, 257, 2, 77, 119] +[:mouse_move, 350, 257, 2, 78, 119] +[:mouse_move, 354, 257, 2, 79, 121] +[:mouse_button_up, 1, 0, 1, 80, 135] +[:mouse_move, 351, 257, 2, 81, 145] +[:mouse_move, 345, 257, 2, 82, 145] +[:mouse_move, 339, 258, 2, 83, 147] +[:mouse_move, 314, 261, 2, 84, 147] +[:mouse_move, 300, 262, 2, 85, 149] +[:mouse_move, 278, 264, 2, 86, 149] +[:mouse_move, 264, 265, 2, 87, 151] +[:mouse_move, 231, 265, 2, 88, 151] +[:mouse_move, 215, 264, 2, 89, 153] +[:mouse_move, 194, 262, 2, 90, 153] +[:mouse_move, 190, 261, 2, 91, 155] +[:mouse_move, 186, 260, 2, 92, 155] +[:mouse_move, 185, 260, 2, 93, 157] +[:mouse_move, 184, 259, 2, 94, 157] +[:mouse_move, 183, 259, 2, 95, 159] +[:mouse_move, 179, 259, 2, 96, 161] +[:mouse_move, 172, 259, 2, 97, 163] +[:mouse_move, 153, 259, 2, 98, 163] +[:mouse_move, 142, 259, 2, 99, 165] +[:mouse_move, 129, 258, 2, 100, 165] +[:mouse_move, 127, 257, 2, 101, 167] +[:mouse_move, 126, 257, 2, 102, 167] +[:mouse_move, 125, 257, 2, 103, 169] +[:mouse_move, 126, 257, 2, 104, 175] +[:mouse_move, 127, 257, 2, 105, 175] +[:mouse_move, 128, 257, 2, 106, 177] +[:mouse_move, 130, 257, 2, 107, 179] +[:mouse_move, 131, 257, 2, 108, 181] +[:mouse_move, 132, 256, 2, 109, 183] +[:mouse_move, 133, 256, 2, 110, 185] +[:mouse_move, 134, 256, 2, 111, 187] +[:mouse_move, 135, 256, 2, 112, 187] +[:mouse_move, 136, 256, 2, 113, 189] +[:mouse_move, 137, 256, 2, 114, 191] +[:mouse_move, 138, 256, 2, 115, 193] +[:mouse_button_pressed, 1, 0, 1, 116, 199] +[:mouse_move, 138, 255, 2, 117, 201] +[:mouse_button_up, 1, 0, 1, 118, 206] +[:mouse_move, 138, 256, 2, 119, 211] +[:mouse_move, 138, 257, 2, 120, 215] +[:mouse_move, 142, 267, 2, 121, 216] +[:mouse_move, 146, 274, 2, 122, 217] +[:mouse_move, 158, 291, 2, 123, 218] +[:mouse_move, 172, 304, 2, 124, 219] +[:mouse_move, 246, 354, 2, 125, 220] +[:mouse_move, 292, 380, 2, 126, 221] +[:mouse_move, 382, 424, 2, 127, 222] +[:mouse_move, 403, 436, 2, 128, 225] +[:mouse_move, 408, 437, 2, 129, 282] +[:mouse_move, 409, 437, 2, 130, 283] +[:mouse_move, 408, 438, 2, 131, 293] +[:mouse_move, 393, 438, 2, 132, 295] +[:mouse_move, 373, 435, 2, 133, 296] +[:mouse_move, 305, 421, 2, 134, 297] +[:mouse_move, 265, 410, 2, 135, 298] +[:mouse_move, 191, 391, 2, 136, 299] +[:mouse_move, 170, 386, 2, 137, 300] +[:mouse_move, 154, 380, 2, 138, 301] +[:mouse_move, 153, 381, 2, 139, 305] +[:mouse_move, 152, 381, 2, 140, 313] +[:mouse_move, 150, 381, 2, 141, 314] +[:mouse_move, 148, 379, 2, 142, 315] +[:mouse_move, 137, 372, 2, 143, 316] +[:mouse_move, 128, 366, 2, 144, 317] +[:mouse_move, 112, 359, 2, 145, 318] +[:mouse_move, 111, 359, 2, 146, 319] +[:mouse_move, 111, 358, 2, 147, 320] +[:mouse_move, 110, 358, 2, 148, 322] +[:mouse_move, 107, 357, 2, 149, 324] +[:mouse_move, 107, 356, 2, 150, 325] +[:mouse_move, 105, 356, 2, 151, 326] +[:mouse_move, 104, 356, 2, 152, 327] +[:mouse_move, 101, 354, 2, 153, 328] +[:mouse_move, 99, 352, 2, 154, 329] +[:mouse_move, 95, 350, 2, 155, 330] +[:mouse_move, 92, 348, 2, 156, 331] +[:mouse_move, 82, 345, 2, 157, 332] +[:mouse_move, 76, 343, 2, 158, 333] +[:mouse_move, 74, 342, 2, 159, 334] +[:mouse_move, 73, 342, 2, 160, 336] +[:mouse_move, 72, 342, 2, 161, 337] +[:mouse_move, 71, 343, 2, 162, 338] +[:mouse_move, 70, 343, 2, 163, 341] +[:mouse_move, 69, 343, 2, 164, 342] +[:mouse_move, 66, 344, 2, 165, 343] +[:mouse_move, 63, 345, 2, 166, 344] +[:mouse_move, 55, 348, 2, 167, 345] +[:mouse_move, 52, 348, 2, 168, 346] +[:mouse_move, 48, 350, 2, 169, 347] +[:mouse_move, 47, 350, 2, 170, 348] +[:mouse_move, 46, 350, 2, 171, 350] +[:mouse_move, 46, 349, 2, 172, 351] +[:mouse_move, 46, 348, 2, 173, 357] +[:mouse_move, 47, 348, 2, 174, 359] +[:mouse_move, 47, 347, 2, 175, 360] +[:mouse_move, 47, 346, 2, 176, 362] +[:mouse_move, 48, 345, 2, 177, 366] +[:mouse_button_pressed, 1, 0, 1, 178, 370] +[:mouse_move, 49, 346, 2, 179, 376] +[:mouse_move, 53, 346, 2, 180, 377] +[:mouse_move, 64, 348, 2, 181, 378] +[:mouse_move, 71, 348, 2, 182, 379] +[:mouse_move, 85, 350, 2, 183, 380] +[:mouse_move, 95, 351, 2, 184, 381] +[:mouse_move, 116, 351, 2, 185, 382] +[:mouse_move, 128, 351, 2, 186, 383] +[:mouse_move, 153, 351, 2, 187, 384] +[:mouse_move, 166, 352, 2, 188, 385] +[:mouse_move, 189, 354, 2, 189, 386] +[:mouse_move, 198, 354, 2, 190, 387] +[:mouse_move, 217, 354, 2, 191, 388] +[:mouse_move, 226, 354, 2, 192, 389] +[:mouse_move, 249, 355, 2, 193, 390] +[:mouse_move, 261, 355, 2, 194, 391] +[:mouse_move, 282, 355, 2, 195, 392] +[:mouse_move, 291, 355, 2, 196, 393] +[:mouse_move, 299, 354, 2, 197, 394] +[:mouse_move, 309, 353, 2, 198, 395] +[:mouse_move, 310, 353, 2, 199, 396] +[:mouse_move, 311, 353, 2, 200, 398] +[:mouse_move, 317, 352, 2, 201, 399] +[:mouse_move, 320, 352, 2, 202, 400] +[:mouse_move, 327, 352, 2, 203, 401] +[:mouse_move, 330, 352, 2, 204, 402] +[:mouse_move, 333, 351, 2, 205, 403] +[:mouse_move, 335, 351, 2, 206, 404] +[:mouse_move, 337, 351, 2, 207, 405] +[:mouse_move, 338, 351, 2, 208, 412] +[:mouse_move, 339, 351, 2, 209, 417] +[:mouse_move, 340, 351, 2, 210, 420] +[:mouse_move, 341, 351, 2, 211, 421] +[:mouse_move, 343, 351, 2, 212, 422] +[:mouse_move, 349, 351, 2, 213, 424] +[:mouse_move, 351, 351, 2, 214, 425] +[:mouse_move, 353, 351, 2, 215, 426] +[:mouse_move, 354, 351, 2, 216, 427] +[:mouse_move, 355, 351, 2, 217, 428] +[:mouse_move, 356, 351, 2, 218, 428] +[:mouse_move, 357, 351, 2, 219, 429] +[:mouse_move, 358, 351, 2, 220, 430] +[:mouse_move, 359, 351, 2, 221, 431] +[:mouse_move, 360, 351, 2, 222, 432] +[:mouse_move, 361, 351, 2, 223, 433] +[:mouse_move, 362, 351, 2, 224, 434] +[:mouse_move, 365, 351, 2, 225, 435] +[:mouse_move, 366, 351, 2, 226, 436] +[:mouse_move, 367, 351, 2, 227, 439] +[:mouse_move, 368, 351, 2, 228, 446] +[:mouse_move, 369, 351, 2, 229, 456] +[:mouse_move, 370, 351, 2, 230, 460] +[:mouse_button_up, 1, 0, 1, 231, 471] +[:key_down_raw, 1073741905, 0, 2, 232, 514] +[:key_down_raw, 1073741905, 0, 2, 233, 528] +[:key_down_raw, 32, 0, 2, 234, 529] +[:key_up_raw, 32, 0, 2, 235, 535] +[:key_up_raw, 1073741905, 0, 2, 236, 547] +[:key_down_raw, 1073741905, 0, 2, 237, 567] +[:key_down_raw, 32, 0, 2, 238, 577] +[:key_up_raw, 32, 0, 2, 239, 584] +[:key_up_raw, 1073741905, 0, 2, 240, 589] +[:key_down_raw, 32, 0, 2, 241, 608] +[:key_up_raw, 32, 0, 2, 242, 612] +[:key_down_raw, 32, 0, 2, 243, 619] +[:key_up_raw, 32, 0, 2, 244, 623] +[:key_down_raw, 32, 0, 2, 245, 627] +[:key_up_raw, 32, 0, 2, 246, 631] +[:mouse_move, 363, 354, 2, 247, 695] +[:mouse_move, 355, 354, 2, 248, 696] +[:mouse_move, 337, 351, 2, 249, 697] +[:mouse_move, 323, 347, 2, 250, 698] +[:mouse_move, 252, 326, 2, 251, 699] +[:mouse_move, 206, 312, 2, 252, 700] +[:mouse_move, 146, 292, 2, 253, 701] +[:mouse_move, 127, 286, 2, 254, 702] +[:mouse_move, 104, 279, 2, 255, 703] +[:mouse_move, 100, 277, 2, 256, 704] +[:mouse_move, 99, 277, 2, 257, 706] +[:mouse_move, 100, 277, 2, 258, 714] +[:mouse_move, 102, 277, 2, 259, 715] +[:mouse_move, 103, 277, 2, 260, 716] +[:mouse_move, 104, 276, 2, 261, 717] +[:mouse_move, 107, 273, 2, 262, 718] +[:mouse_move, 107, 272, 2, 263, 719] +[:mouse_move, 110, 270, 2, 264, 720] +[:mouse_move, 110, 269, 2, 265, 721] +[:mouse_move, 110, 268, 2, 266, 722] +[:mouse_move, 111, 266, 2, 267, 724] +[:mouse_move, 112, 264, 2, 268, 725] +[:mouse_move, 112, 261, 2, 269, 726] +[:mouse_move, 112, 260, 2, 270, 727] +[:mouse_move, 112, 259, 2, 271, 728] +[:key_down_raw, 120, 0, 2, 272, 739] +[:mouse_move, 111, 259, 2, 273, 745] +[:key_down_raw, 120, 0, 2, 274, 754] +[:key_down_raw, 120, 0, 2, 275, 756] +[:key_down_raw, 120, 0, 2, 276, 758] +[:key_down_raw, 120, 0, 2, 277, 760] +[:key_down_raw, 120, 0, 2, 278, 762] +[:mouse_button_pressed, 1, 0, 1, 279, 763] +[:key_down_raw, 120, 0, 2, 280, 764] +[:key_down_raw, 120, 0, 2, 281, 766] +[:key_down_raw, 120, 0, 2, 282, 768] +[:key_down_raw, 120, 0, 2, 283, 770] +[:mouse_button_up, 1, 0, 1, 284, 770] +[:key_down_raw, 120, 0, 2, 285, 772] +[:key_down_raw, 120, 0, 2, 286, 774] +[:key_down_raw, 120, 0, 2, 287, 776] +[:key_down_raw, 120, 0, 2, 288, 778] +[:mouse_move, 111, 262, 2, 289, 779] +[:mouse_move, 111, 271, 2, 290, 780] +[:key_down_raw, 120, 0, 2, 291, 780] +[:mouse_move, 110, 276, 2, 292, 781] +[:mouse_move, 108, 288, 2, 293, 782] +[:key_down_raw, 120, 0, 2, 294, 782] +[:mouse_move, 107, 295, 2, 295, 783] +[:mouse_move, 104, 312, 2, 296, 784] +[:key_down_raw, 120, 0, 2, 297, 784] +[:mouse_move, 104, 317, 2, 298, 785] +[:mouse_move, 102, 325, 2, 299, 786] +[:key_down_raw, 120, 0, 2, 300, 786] +[:mouse_move, 102, 328, 2, 301, 787] +[:mouse_move, 102, 332, 2, 302, 788] +[:key_down_raw, 120, 0, 2, 303, 788] +[:mouse_move, 102, 335, 2, 304, 789] +[:mouse_move, 102, 341, 2, 305, 790] +[:key_down_raw, 120, 0, 2, 306, 790] +[:mouse_move, 102, 343, 2, 307, 791] +[:mouse_move, 102, 345, 2, 308, 792] +[:key_down_raw, 120, 0, 2, 309, 792] +[:mouse_move, 102, 346, 2, 310, 793] +[:key_down_raw, 120, 0, 2, 311, 794] +[:mouse_move, 102, 347, 2, 312, 795] +[:key_down_raw, 120, 0, 2, 313, 796] +[:key_down_raw, 120, 0, 2, 314, 798] +[:mouse_move, 102, 348, 2, 315, 799] +[:key_down_raw, 120, 0, 2, 316, 800] +[:mouse_move, 103, 348, 2, 317, 801] +[:key_down_raw, 120, 0, 2, 318, 802] +[:key_down_raw, 120, 0, 2, 319, 804] +[:key_down_raw, 120, 0, 2, 320, 806] +[:key_down_raw, 120, 0, 2, 321, 808] +[:key_down_raw, 120, 0, 2, 322, 810] +[:mouse_move, 103, 349, 2, 323, 810] +[:mouse_move, 104, 349, 2, 324, 811] +[:key_down_raw, 120, 0, 2, 325, 812] +[:mouse_move, 104, 350, 2, 326, 813] +[:key_down_raw, 120, 0, 2, 327, 814] +[:key_down_raw, 120, 0, 2, 328, 816] +[:mouse_move, 105, 350, 2, 329, 817] +[:mouse_button_pressed, 1, 0, 1, 330, 817] +[:key_down_raw, 120, 0, 2, 331, 818] +[:key_down_raw, 120, 0, 2, 332, 820] +[:key_down_raw, 120, 0, 2, 333, 822] +[:key_down_raw, 120, 0, 2, 334, 824] +[:mouse_button_up, 1, 0, 1, 335, 826] +[:key_down_raw, 120, 0, 2, 336, 826] +[:key_down_raw, 120, 0, 2, 337, 828] +[:key_down_raw, 120, 0, 2, 338, 830] +[:key_down_raw, 120, 0, 2, 339, 832] +[:key_down_raw, 120, 0, 2, 340, 834] +[:mouse_move, 106, 350, 2, 341, 836] +[:key_down_raw, 120, 0, 2, 342, 836] +[:key_down_raw, 120, 0, 2, 343, 838] +[:key_up_raw, 120, 0, 2, 344, 839] +[:mouse_move, 107, 348, 2, 345, 842] +[:mouse_move, 108, 345, 2, 346, 843] +[:mouse_move, 109, 343, 2, 347, 844] +[:mouse_move, 109, 342, 2, 348, 845] +[:mouse_move, 109, 341, 2, 349, 852] +[:mouse_move, 111, 337, 2, 350, 853] +[:mouse_move, 113, 332, 2, 351, 854] +[:mouse_move, 116, 322, 2, 352, 855] +[:mouse_move, 118, 316, 2, 353, 856] +[:mouse_move, 119, 303, 2, 354, 857] +[:mouse_move, 120, 295, 2, 355, 858] +[:mouse_move, 120, 282, 2, 356, 859] +[:mouse_move, 120, 279, 2, 357, 860] +[:mouse_move, 121, 278, 2, 358, 861] +[:mouse_move, 121, 277, 2, 359, 865] +[:mouse_move, 121, 276, 2, 360, 868] +[:mouse_move, 120, 275, 2, 361, 869] +[:mouse_move, 120, 274, 2, 362, 870] +[:mouse_move, 118, 270, 2, 363, 871] +[:mouse_move, 118, 269, 2, 364, 872] +[:mouse_move, 117, 267, 2, 365, 873] +[:mouse_move, 117, 266, 2, 366, 880] +[:mouse_move, 118, 266, 2, 367, 881] +[:mouse_move, 118, 264, 2, 368, 882] +[:mouse_move, 118, 263, 2, 369, 883] +[:mouse_move, 118, 262, 2, 370, 884] +[:mouse_move, 118, 261, 2, 371, 887] +[:mouse_move, 119, 261, 2, 372, 888] +[:mouse_button_pressed, 1, 0, 1, 373, 909] +[:mouse_button_up, 1, 0, 1, 374, 912] +[:mouse_move, 118, 264, 2, 375, 914] +[:mouse_move, 116, 269, 2, 376, 915] +[:mouse_move, 113, 280, 2, 377, 916] +[:mouse_move, 111, 285, 2, 378, 917] +[:mouse_move, 109, 293, 2, 379, 918] +[:mouse_move, 108, 297, 2, 380, 919] +[:mouse_move, 105, 307, 2, 381, 920] +[:mouse_move, 103, 315, 2, 382, 921] +[:mouse_move, 101, 328, 2, 383, 922] +[:mouse_move, 101, 333, 2, 384, 923] +[:mouse_move, 102, 341, 2, 385, 924] +[:mouse_move, 102, 342, 2, 386, 925] +[:mouse_move, 103, 346, 2, 387, 926] +[:mouse_move, 103, 347, 2, 388, 927] +[:mouse_move, 103, 349, 2, 389, 928] +[:mouse_move, 104, 350, 2, 390, 930] +[:mouse_move, 104, 351, 2, 391, 933] +[:mouse_move, 104, 352, 2, 392, 939] +[:mouse_move, 105, 352, 2, 393, 940] +[:mouse_move, 106, 358, 2, 394, 941] +[:mouse_move, 107, 363, 2, 395, 942] +[:mouse_move, 108, 370, 2, 396, 943] +[:mouse_move, 109, 371, 2, 397, 944] +[:mouse_move, 109, 372, 2, 398, 945] +[:mouse_move, 109, 369, 2, 399, 953] +[:mouse_move, 109, 368, 2, 400, 954] +[:mouse_move, 109, 360, 2, 401, 955] +[:mouse_move, 109, 358, 2, 402, 956] +[:mouse_move, 109, 356, 2, 403, 957] +[:mouse_move, 109, 355, 2, 404, 958] +[:mouse_button_pressed, 1, 0, 1, 405, 970] +[:mouse_move, 109, 354, 2, 406, 970] +[:mouse_button_up, 1, 0, 1, 407, 975] +[:mouse_move, 109, 353, 2, 408, 985] +[:mouse_move, 109, 352, 2, 409, 987] +[:mouse_move, 109, 350, 2, 410, 988] +[:mouse_move, 109, 349, 2, 411, 990] +[:mouse_move, 109, 355, 2, 412, 996] +[:mouse_move, 109, 357, 2, 413, 997] +[:mouse_move, 106, 366, 2, 414, 998] +[:mouse_move, 104, 374, 2, 415, 999] +[:mouse_move, 100, 387, 2, 416, 1000] +[:mouse_move, 100, 391, 2, 417, 1001] +[:mouse_move, 101, 391, 2, 418, 1002] +[:mouse_move, 101, 390, 2, 419, 1008] +[:mouse_move, 102, 389, 2, 420, 1009] +[:mouse_move, 103, 387, 2, 421, 1010] +[:mouse_move, 103, 384, 2, 422, 1011] +[:mouse_move, 104, 382, 2, 423, 1012] +[:mouse_move, 104, 381, 2, 424, 1013] +[:mouse_move, 104, 380, 2, 425, 1014] +[:mouse_move, 105, 380, 2, 426, 1015] +[:mouse_move, 105, 379, 2, 427, 1030] +[:mouse_button_pressed, 1, 0, 1, 428, 1031] +[:mouse_move, 107, 379, 2, 429, 1039] +[:mouse_move, 111, 380, 2, 430, 1040] +[:mouse_move, 113, 380, 2, 431, 1041] +[:mouse_move, 124, 380, 2, 432, 1042] +[:mouse_move, 133, 381, 2, 433, 1043] +[:mouse_move, 145, 381, 2, 434, 1044] +[:mouse_move, 149, 381, 2, 435, 1045] +[:mouse_move, 152, 382, 2, 436, 1045] +[:mouse_move, 153, 382, 2, 437, 1046] +[:mouse_move, 154, 382, 2, 438, 1047] +[:mouse_move, 155, 382, 2, 439, 1048] +[:mouse_move, 158, 382, 2, 440, 1049] +[:mouse_move, 159, 382, 2, 441, 1050] +[:mouse_move, 162, 383, 2, 442, 1051] +[:mouse_move, 164, 383, 2, 443, 1052] +[:mouse_move, 168, 383, 2, 444, 1053] +[:mouse_move, 170, 384, 2, 445, 1053] +[:mouse_move, 172, 384, 2, 446, 1054] +[:mouse_move, 173, 384, 2, 447, 1055] +[:mouse_move, 176, 384, 2, 448, 1056] +[:mouse_move, 178, 384, 2, 449, 1057] +[:mouse_move, 180, 384, 2, 450, 1058] +[:mouse_move, 181, 384, 2, 451, 1059] +[:mouse_move, 183, 384, 2, 452, 1075] +[:mouse_move, 184, 384, 2, 453, 1076] +[:mouse_move, 186, 384, 2, 454, 1077] +[:mouse_move, 187, 384, 2, 455, 1078] +[:mouse_move, 190, 384, 2, 456, 1079] +[:mouse_move, 191, 384, 2, 457, 1080] +[:mouse_move, 193, 385, 2, 458, 1081] +[:mouse_move, 194, 385, 2, 459, 1083] +[:mouse_move, 195, 385, 2, 460, 1087] +[:mouse_move, 196, 385, 2, 461, 1090] +[:mouse_move, 197, 385, 2, 462, 1091] +[:mouse_move, 198, 385, 2, 463, 1093] +[:mouse_button_up, 1, 0, 1, 464, 1108] +[:mouse_move, 199, 385, 2, 465, 1110] +[:key_down_raw, 1073741905, 0, 2, 466, 1148] +[:key_down_raw, 1073741905, 0, 2, 467, 1163] +[:key_down_raw, 1073741905, 0, 2, 468, 1165] +[:key_down_raw, 1073741905, 0, 2, 469, 1167] +[:key_down_raw, 32, 0, 2, 470, 1168] +[:key_up_raw, 32, 0, 2, 471, 1174] +[:key_down_raw, 32, 0, 2, 472, 1210] +[:key_up_raw, 32, 0, 2, 473, 1217] +[:key_down_raw, 32, 0, 2, 474, 1225] +[:key_up_raw, 32, 0, 2, 475, 1231] +[:key_up_raw, 1073741905, 0, 2, 476, 1238] +[:mouse_move, 204, 382, 2, 477, 1263] +[:mouse_move, 213, 375, 2, 478, 1264] +[:mouse_move, 217, 364, 2, 479, 1265] +[:mouse_move, 217, 358, 2, 480, 1266] +[:mouse_move, 212, 345, 2, 481, 1267] +[:mouse_move, 208, 337, 2, 482, 1268] +[:mouse_move, 194, 319, 2, 483, 1269] +[:mouse_move, 183, 305, 2, 484, 1270] +[:mouse_move, 160, 280, 2, 485, 1271] +[:mouse_move, 150, 270, 2, 486, 1272] +[:mouse_move, 137, 258, 2, 487, 1273] +[:mouse_move, 135, 256, 2, 488, 1274] +[:key_down_raw, 32, 0, 2, 489, 1303] +[:key_up_raw, 32, 0, 2, 490, 1307] +[:key_down_raw, 1073741905, 0, 2, 491, 1341] +[:key_down_raw, 1073741905, 0, 2, 492, 1356] +[:key_down_raw, 1073741905, 0, 2, 493, 1358] +[:key_down_raw, 1073741905, 0, 2, 494, 1360] +[:key_down_raw, 32, 0, 2, 495, 1361] +[:key_up_raw, 32, 0, 2, 496, 1367] +[:key_up_raw, 1073741905, 0, 2, 497, 1381] +[:key_down_raw, 1073741904, 0, 2, 498, 1397] +[:key_up_raw, 1073741904, 0, 2, 499, 1403] +[:key_down_raw, 1073741905, 0, 2, 500, 1425] +[:key_down_raw, 1073741905, 0, 2, 501, 1440] +[:key_down_raw, 32, 0, 2, 502, 1441] +[:key_up_raw, 32, 0, 2, 503, 1450] +[:key_up_raw, 1073741905, 0, 2, 504, 1457] +[:key_down_raw, 1073741903, 0, 2, 505, 1470] +[:key_down_raw, 32, 0, 2, 506, 1479] +[:key_up_raw, 32, 0, 2, 507, 1485] +[:key_up_raw, 1073741903, 0, 2, 508, 1499] +[:key_down_raw, 32, 0, 2, 509, 1500] +[:key_up_raw, 32, 0, 2, 510, 1506] +[:key_down_raw, 32, 0, 2, 511, 1511] +[:key_up_raw, 32, 0, 2, 512, 1516] +[:key_down_raw, 32, 0, 2, 513, 1520] +[:key_up_raw, 32, 0, 2, 514, 1524] +[:key_down_raw, 32, 0, 2, 515, 1528] +[:key_up_raw, 32, 0, 2, 516, 1534] +[:key_down_raw, 32, 0, 2, 517, 1538] +[:key_down_raw, 1073741903, 0, 2, 518, 1540] +[:key_up_raw, 32, 0, 2, 519, 1545] +[:key_down_raw, 1073741903, 0, 2, 520, 1555] +[:key_down_raw, 32, 0, 2, 521, 1557] +[:key_up_raw, 1073741903, 0, 2, 522, 1558] +[:key_up_raw, 32, 0, 2, 523, 1563] +[:key_down_raw, 32, 0, 2, 524, 1567] +[:key_up_raw, 32, 0, 2, 525, 1581] +[:key_down_raw, 1073741904, 0, 2, 526, 1592] +[:key_down_raw, 1073741904, 0, 2, 527, 1607] +[:key_down_raw, 1073741904, 0, 2, 528, 1609] +[:key_down_raw, 1073741904, 0, 2, 529, 1611] +[:key_down_raw, 1073741904, 0, 2, 530, 1613] +[:key_down_raw, 1073741904, 0, 2, 531, 1615] +[:key_down_raw, 1073741904, 0, 2, 532, 1617] +[:key_down_raw, 1073741904, 0, 2, 533, 1619] +[:key_down_raw, 1073741904, 0, 2, 534, 1621] +[:key_down_raw, 1073741904, 0, 2, 535, 1623] +[:key_down_raw, 1073741904, 0, 2, 536, 1625] +[:key_down_raw, 1073741904, 0, 2, 537, 1627] +[:key_down_raw, 1073741904, 0, 2, 538, 1629] +[:key_down_raw, 1073741904, 0, 2, 539, 1631] +[:key_down_raw, 1073741904, 0, 2, 540, 1633] +[:key_up_raw, 1073741904, 0, 2, 541, 1633] +[:mouse_move, 137, 254, 2, 542, 1666] +[:mouse_move, 137, 253, 2, 543, 1667] +[:mouse_move, 137, 252, 2, 544, 1668] +[:mouse_move, 138, 248, 2, 545, 1669] +[:mouse_move, 141, 243, 2, 546, 1670] +[:mouse_move, 141, 242, 2, 547, 1675] +[:mouse_move, 142, 240, 2, 548, 1676] +[:mouse_move, 143, 240, 2, 549, 1677] +[:mouse_move, 143, 239, 2, 550, 1678] +[:mouse_move, 143, 238, 2, 551, 1682] +[:mouse_move, 144, 237, 2, 552, 1683] +[:mouse_move, 144, 236, 2, 553, 1684] +[:mouse_move, 144, 235, 2, 554, 1685] +[:mouse_move, 144, 234, 2, 555, 1686] +[:mouse_move, 146, 228, 2, 556, 1687] +[:mouse_move, 147, 226, 2, 557, 1688] +[:mouse_move, 147, 225, 2, 558, 1689] +[:mouse_button_pressed, 1, 0, 1, 559, 1703] +[:mouse_move, 148, 225, 2, 560, 1713] +[:mouse_move, 150, 225, 2, 561, 1714] +[:mouse_move, 157, 225, 2, 562, 1715] +[:mouse_move, 160, 225, 2, 563, 1716] +[:mouse_move, 170, 226, 2, 564, 1717] +[:mouse_move, 174, 226, 2, 565, 1718] +[:mouse_move, 179, 226, 2, 566, 1718] +[:mouse_move, 181, 226, 2, 567, 1719] +[:mouse_move, 185, 226, 2, 568, 1720] +[:mouse_move, 188, 226, 2, 569, 1721] +[:mouse_move, 195, 226, 2, 570, 1722] +[:mouse_move, 199, 226, 2, 571, 1723] +[:mouse_move, 205, 226, 2, 572, 1724] +[:mouse_move, 208, 226, 2, 573, 1724] +[:mouse_move, 216, 226, 2, 574, 1725] +[:mouse_move, 220, 226, 2, 575, 1726] +[:mouse_move, 225, 226, 2, 576, 1727] +[:mouse_move, 229, 226, 2, 577, 1728] +[:mouse_move, 236, 226, 2, 578, 1729] +[:mouse_move, 238, 226, 2, 579, 1729] +[:mouse_move, 240, 226, 2, 580, 1730] +[:mouse_move, 242, 226, 2, 581, 1731] +[:mouse_button_up, 1, 0, 1, 582, 1747] +[:mouse_move, 243, 227, 2, 583, 1749] +[:key_down_raw, 1073741903, 0, 2, 584, 1774] +[:key_up_raw, 1073741903, 0, 2, 585, 1783] +[:key_down_raw, 1073741906, 0, 2, 586, 1785] +[:key_up_raw, 1073741906, 0, 2, 587, 1789] +[:key_down_raw, 32, 0, 2, 588, 1815] +[:key_up_raw, 32, 0, 2, 589, 1819] +[:key_down_raw, 32, 0, 2, 590, 1825] +[:key_up_raw, 32, 0, 2, 591, 1831] +[:key_down_raw, 32, 0, 2, 592, 1845] +[:key_up_raw, 32, 0, 2, 593, 1851] +[:key_down_raw, 32, 0, 2, 594, 1856] +[:key_up_raw, 32, 0, 2, 595, 1863] +[:key_down_raw, 1073741904, 0, 2, 596, 1881] +[:key_down_raw, 1073741904, 0, 2, 597, 1896] +[:key_down_raw, 1073741904, 0, 2, 598, 1898] +[:key_down_raw, 1073741904, 0, 2, 599, 1900] +[:key_down_raw, 1073741904, 0, 2, 600, 1903] +[:key_down_raw, 1073741904, 0, 2, 601, 1904] +[:key_down_raw, 1073741904, 0, 2, 602, 1906] +[:key_up_raw, 1073741904, 0, 2, 603, 1908] +[:key_down_raw, 32, 0, 2, 604, 1920] +[:key_down_raw, 32, 0, 2, 605, 1935] +[:key_down_raw, 1073741903, 0, 2, 606, 1936] +[:key_down_raw, 1073741903, 0, 2, 607, 1951] +[:key_down_raw, 1073741903, 0, 2, 608, 1953] +[:key_up_raw, 32, 0, 2, 609, 1954] +[:key_up_raw, 1073741903, 0, 2, 610, 1954] +[:key_down_raw, 32, 0, 2, 611, 1985] +[:key_down_raw, 1073741903, 0, 2, 612, 1989] +[:key_up_raw, 32, 0, 2, 613, 1999] +[:key_up_raw, 1073741903, 0, 2, 614, 2002] +[:mouse_move, 245, 226, 2, 615, 2037] +[:mouse_move, 308, 213, 2, 616, 2038] +[:mouse_move, 380, 203, 2, 617, 2039] +[:mouse_move, 567, 189, 2, 618, 2040] +[:mouse_move, 663, 187, 2, 619, 2041] +[:mouse_move, 862, 189, 2, 620, 2042] +[:mouse_move, 931, 190, 2, 621, 2043] +[:mouse_move, 1002, 195, 2, 622, 2044] +[:mouse_move, 1016, 195, 2, 623, 2045] +[:mouse_move, 1031, 195, 2, 624, 2046] +[:key_down_raw, 96, 0, 2, 625, 2064] +[:key_up_raw, 96, 0, 2, 626, 2069] +[:mouse_move, 1031, 193, 2, 627, 2074] +[:mouse_move, 1031, 191, 2, 628, 2074] +[:mouse_move, 1031, 189, 2, 629, 2075] +[:mouse_move, 1031, 188, 2, 630, 2077] +[:mouse_move, 1031, 187, 2, 631, 2079] +[:mouse_move, 1029, 185, 2, 632, 2082] +[:mouse_move, 1023, 174, 2, 633, 2082] +[:mouse_move, 1017, 168, 2, 634, 2083] +[:mouse_move, 1005, 155, 2, 635, 2084] +[:mouse_move, 1000, 149, 2, 636, 2085] +[:mouse_move, 986, 140, 2, 637, 2086] +[:mouse_move, 980, 138, 2, 638, 2086] +[:mouse_move, 965, 131, 2, 639, 2087] +[:mouse_move, 953, 126, 2, 640, 2088] +[:mouse_move, 925, 115, 2, 641, 2089] +[:mouse_move, 912, 109, 2, 642, 2089] +[:mouse_move, 902, 105, 2, 643, 2090] +[:mouse_move, 891, 101, 2, 644, 2091] +[:mouse_move, 886, 99, 2, 645, 2092] +[:mouse_move, 877, 98, 2, 646, 2092] +[:mouse_move, 861, 97, 2, 647, 2093] +[:mouse_move, 857, 97, 2, 648, 2094] +[:mouse_move, 850, 98, 2, 649, 2095] +[:mouse_move, 849, 98, 2, 650, 2096] +[:mouse_move, 847, 99, 2, 651, 2096] +[:mouse_move, 846, 99, 2, 652, 2097] +[:mouse_move, 845, 99, 2, 653, 2098] +[:mouse_move, 842, 101, 2, 654, 2099] +[:mouse_move, 841, 101, 2, 655, 2100] +[:mouse_move, 840, 102, 2, 656, 2100] +[:mouse_move, 839, 103, 2, 657, 2104] +[:mouse_move, 840, 103, 2, 658, 2109] +[:mouse_move, 841, 103, 2, 659, 2110] +[:mouse_move, 843, 103, 2, 660, 2112] +[:mouse_move, 845, 103, 2, 661, 2113] +[:mouse_move, 846, 102, 2, 662, 2115] +[:mouse_move, 848, 102, 2, 663, 2116] +[:mouse_move, 855, 101, 2, 664, 2116] +[:mouse_move, 858, 100, 2, 665, 2117] +[:mouse_move, 862, 99, 2, 666, 2118] +[:mouse_move, 865, 98, 2, 667, 2119] +[:mouse_move, 867, 98, 2, 668, 2120] +[:mouse_move, 868, 97, 2, 669, 2121] +[:mouse_move, 869, 97, 2, 670, 2122] +[:mouse_move, 868, 97, 2, 671, 2128] +[:mouse_move, 864, 95, 2, 672, 2129] +[:mouse_move, 846, 92, 2, 673, 2129] +[:mouse_move, 834, 90, 2, 674, 2130] +[:mouse_move, 818, 88, 2, 675, 2131] +[:mouse_move, 813, 87, 2, 676, 2132] +[:mouse_move, 806, 87, 2, 677, 2132] +[:mouse_move, 803, 87, 2, 678, 2133] +[:mouse_move, 798, 87, 2, 679, 2134] +[:mouse_move, 796, 87, 2, 680, 2134] +[:mouse_move, 795, 87, 2, 681, 2135] +[:mouse_move, 794, 87, 2, 682, 2137] +[:key_down_raw, 13, 0, 2, 683, 2166] diff --git a/samples/04_physics_and_collisions/06_jump_physics/app/main.rb b/samples/04_physics_and_collisions/06_jump_physics/app/main.rb deleted file mode 100644 index 9d7a976..0000000 --- a/samples/04_physics_and_collisions/06_jump_physics/app/main.rb +++ /dev/null @@ -1,195 +0,0 @@ -=begin - - Reminders: - - - args.state.new_entity: Used when we want to create a new object, like a sprite or button. - For example, if we want to create a new button, we would declare it as a new entity and - then define its properties. (Remember, you can use state to define ANY property and it will - be retained across frames.) - - - args.outputs.solids: An array. The values generate a solid. - The parameters for a solid are [X, Y, WIDTH, HEIGHT, RED, GREEN, BLUE] - - - num1.greater(num2): Returns the greater value. - - - Hashes: Collection of unique keys and their corresponding values. The value can be found - using their keys. - - - ARRAY#inside_rect?: Returns true or false depending on if the point is inside the rect. - -=end - -# This sample app is a game that requires the user to jump from one platform to the next. -# As the player successfully clears platforms, they become smaller and move faster. - -class VerticalPlatformer - attr_gtk - - # declares vertical platformer as new entity - def s - state.vertical_platformer ||= state.new_entity(:vertical_platformer) - state.vertical_platformer - end - - # creates a new platform using a hash - def new_platform hash - s.new_entity_strict(:platform, hash) # platform key - end - - # calls methods needed for the game to run properly - def tick - defaults - render - calc - input - end - - # Sets default values - def defaults - s.platforms ||= [ # initializes platforms collection with two platforms using hashes - new_platform(x: 0, y: 0, w: 700, h: 32, dx: 1, speed: 0, rect: nil), - new_platform(x: 0, y: 300, w: 700, h: 32, dx: 1, speed: 0, rect: nil), # 300 pixels higher - ] - - s.tick_count = args.state.tick_count - s.gravity = -0.3 # what goes up must come down because of gravity - s.player.platforms_cleared ||= 0 # counts how many platforms the player has successfully cleared - s.player.x ||= 0 # sets player values - s.player.y ||= 100 - s.player.w ||= 64 - s.player.h ||= 64 - s.player.dy ||= 0 # change in position - s.player.dx ||= 0 - s.player_jump_power = 15 - s.player_jump_power_duration = 10 - s.player_max_run_speed = 5 - s.player_speed_slowdown_rate = 0.9 - s.player_acceleration = 1 - s.camera ||= { y: -100 } # shows view on screen (as the player moves upward, the camera does too) - end - - # Outputs objects onto the screen - def render - outputs.solids << s.platforms.map do |p| # outputs platforms onto screen - [p.x + 300, p.y - s.camera[:y], p.w, p.h] # add 300 to place platform in horizontal center - # don't forget, position of platform is denoted by bottom left hand corner - end - - # outputs player using hash - outputs.solids << { - x: s.player.x + 300, # player positioned on top of platform - y: s.player.y - s.camera[:y], - w: s.player.w, - h: s.player.h, - r: 100, # color saturation - g: 100, - b: 200 - } - end - - # Performs calculations - def calc - s.platforms.each do |p| # for each platform in the collection - p.rect = [p.x, p.y, p.w, p.h] # set the definition - end - - # sets player point by adding half the player's width to the player's x - s.player.point = [s.player.x + s.player.w.half, s.player.y] # change + to - and see what happens! - - # search the platforms collection to find if the player's point is inside the rect of a platform - collision = s.platforms.find { |p| s.player.point.inside_rect? p.rect } - - # if collision occurred and player is moving down (or not moving vertically at all) - if collision && s.player.dy <= 0 - s.player.y = collision.rect.y + collision.rect.h - 2 # player positioned on top of platform - s.player.dy = 0 if s.player.dy < 0 # player stops moving vertically - if !s.player.platform - s.player.dx = 0 # no horizontal movement - end - # changes horizontal position of player by multiplying collision change in x (dx) by speed and adding it to current x - s.player.x += collision.dx * collision.speed - s.player.platform = collision # player is on the platform that it collided with (or landed on) - if s.player.falling # if player is falling - s.player.dx = 0 # no horizontal movement - end - s.player.falling = false - s.player.jumped_at = nil - else - s.player.platform = nil # player is not on a platform - s.player.y += s.player.dy # velocity is the change in position - s.player.dy += s.gravity # acceleration is the change in velocity; what goes up must come down - end - - s.platforms.each do |p| # for each platform in the collection - p.x += p.dx * p.speed # x is incremented by product of dx and speed (causes platform to move horizontally) - # changes platform's x so it moves left and right across the screen (between -300 and 300 pixels) - if p.x < -300 # if platform goes too far left - p.dx *= -1 # dx is scaled down - p.x = -300 # as far left as possible within scope - elsif p.x > (1000 - p.w) # if platform's x is greater than 300 - p.dx *= -1 - p.x = (1000 - p.w) # set to 300 (as far right as possible within scope) - end - end - - delta = (s.player.y - s.camera[:y] - 100) # used to position camera view - - if delta > -200 - s.camera[:y] += delta * 0.01 # allows player to see view as they move upwards - s.player.x += s.player.dx # velocity is change in position; change in x increases by dx - - # searches platform collection to find platforms located more than 300 pixels above the player - has_platforms = s.platforms.find { |p| p.y > (s.player.y + 300) } - if !has_platforms # if there are no platforms 300 pixels above the player - width = 700 - (700 * (0.1 * s.player.platforms_cleared)) # the next platform is smaller than previous - s.player.platforms_cleared += 1 # player successfully cleared another platform - last_platform = s.platforms[-1] # platform just cleared becomes last platform - # another platform is created 300 pixels above the last platform, and this - # new platform has a smaller width and moves faster than all previous platforms - s.platforms << new_platform(x: (700 - width) * rand, # random x position - y: last_platform.y + 300, - w: width, - h: 32, - dx: 1.randomize(:sign), # random change in x - speed: 2 * s.player.platforms_cleared, - rect: nil) - end - else - s.as_hash.clear # otherwise clear the hash (no new platform is necessary) - end - end - - # Takes input from the user to move the player - def input - if inputs.keyboard.space # if the space bar is pressed - s.player.jumped_at ||= s.tick_count # set to current frame - - # if the time that has passed since the jump is less than the duration of a jump (10 frames) - # and the player is not falling - if s.player.jumped_at.elapsed_time < s.player_jump_power_duration && !s.player.falling - s.player.dy = s.player_jump_power # player jumps up - end - end - - if inputs.keyboard.key_up.space # if space bar is in "up" state - s.player.falling = true # player is falling - end - - if inputs.keyboard.left # if left key is pressed - s.player.dx -= s.player_acceleration # player's position changes, decremented by acceleration - s.player.dx = s.player.dx.greater(-s.player_max_run_speed) # dx is either current dx or -5, whichever is greater - elsif inputs.keyboard.right # if right key is pressed - s.player.dx += s.player_acceleration # player's position changes, incremented by acceleration - s.player.dx = s.player.dx.lesser(s.player_max_run_speed) # dx is either current dx or 5, whichever is lesser - else - s.player.dx *= s.player_speed_slowdown_rate # scales dx down - end - end -end - -$game = VerticalPlatformer.new - -def tick args - $game.args = args - $game.tick -end diff --git a/samples/04_physics_and_collisions/06_jump_physics/replay.txt b/samples/04_physics_and_collisions/06_jump_physics/replay.txt deleted file mode 100644 index 966dbcd..0000000 --- a/samples/04_physics_and_collisions/06_jump_physics/replay.txt +++ /dev/null @@ -1,124 +0,0 @@ -replay_version 2.0 -stopped_at 1260 -seed 100 -recorded_at Sun Sep 29 22:23:22 2019 -[:key_down_raw, 1073741903, 0, 2, 1, 45] -[:key_down_raw, 1073741903, 0, 2, 2, 70] -[:key_down_raw, 1073741903, 0, 2, 3, 72] -[:key_down_raw, 1073741903, 0, 2, 4, 74] -[:key_down_raw, 1073741903, 0, 2, 5, 76] -[:key_down_raw, 1073741903, 0, 2, 6, 78] -[:key_down_raw, 1073741903, 0, 2, 7, 80] -[:key_down_raw, 1073741903, 0, 2, 8, 82] -[:key_down_raw, 1073741903, 0, 2, 9, 84] -[:key_down_raw, 1073741903, 0, 2, 10, 86] -[:key_down_raw, 1073741903, 0, 2, 11, 88] -[:key_up_raw, 1073741903, 0, 2, 12, 89] -[:key_down_raw, 1073741904, 0, 2, 13, 92] -[:key_down_raw, 1073741903, 0, 2, 14, 112] -[:key_up_raw, 1073741904, 0, 2, 15, 115] -[:key_down_raw, 1073741903, 0, 2, 16, 137] -[:key_down_raw, 1073741903, 0, 2, 17, 139] -[:key_down_raw, 8, 0, 2, 18, 141] -[:key_up_raw, 1073741903, 0, 2, 19, 146] -[:key_down_raw, 1073741903, 0, 2, 20, 147] -[:key_up_raw, 1073741903, 0, 2, 21, 147] -[:key_down_raw, 1073741904, 0, 2, 22, 154] -[:key_up_raw, 8, 0, 2, 23, 172] -[:key_down_raw, 1073741903, 0, 2, 24, 175] -[:key_up_raw, 1073741904, 0, 2, 25, 175] -[:key_down_raw, 32, 0, 2, 26, 194] -[:key_down_raw, 1073741904, 0, 2, 27, 201] -[:key_up_raw, 1073741903, 0, 2, 28, 202] -[:key_down_raw, 1073741903, 0, 2, 29, 222] -[:key_up_raw, 1073741904, 0, 2, 30, 226] -[:key_up_raw, 32, 0, 2, 31, 233] -[:key_down_raw, 1073741903, 0, 2, 32, 247] -[:key_down_raw, 1073741903, 0, 2, 33, 249] -[:key_down_raw, 1073741903, 0, 2, 34, 251] -[:key_down_raw, 1073741903, 0, 2, 35, 253] -[:key_down_raw, 1073741903, 0, 2, 36, 255] -[:key_down_raw, 1073741903, 0, 2, 37, 257] -[:key_down_raw, 1073741903, 0, 2, 38, 259] -[:key_down_raw, 1073741903, 0, 2, 39, 261] -[:key_down_raw, 1073741903, 0, 2, 40, 263] -[:key_down_raw, 1073741903, 0, 2, 41, 265] -[:key_down_raw, 1073741903, 0, 2, 42, 267] -[:key_down_raw, 1073741903, 0, 2, 43, 269] -[:key_down_raw, 1073741903, 0, 2, 44, 271] -[:key_down_raw, 1073741903, 0, 2, 45, 273] -[:key_down_raw, 1073741903, 0, 2, 46, 275] -[:key_up_raw, 1073741903, 0, 2, 47, 276] -[:key_down_raw, 1073741904, 0, 2, 48, 280] -[:key_up_raw, 1073741904, 0, 2, 49, 297] -[:key_down_raw, 1073741903, 0, 2, 50, 300] -[:key_down_raw, 32, 0, 2, 51, 303] -[:key_up_raw, 32, 0, 2, 52, 308] -[:key_up_raw, 1073741903, 0, 2, 53, 334] -[:key_down_raw, 1073741904, 0, 2, 54, 336] -[:key_down_raw, 1073741903, 0, 2, 55, 355] -[:key_up_raw, 1073741904, 0, 2, 56, 355] -[:key_up_raw, 1073741903, 0, 2, 57, 373] -[:key_down_raw, 1073741904, 0, 2, 58, 380] -[:key_down_raw, 32, 0, 2, 59, 398] -[:key_up_raw, 32, 0, 2, 60, 404] -[:key_up_raw, 1073741904, 0, 2, 61, 490] -[:key_down_raw, 32, 0, 2, 62, 510] -[:key_up_raw, 32, 0, 2, 63, 516] -[:key_down_raw, 1073741903, 0, 2, 64, 517] -[:key_up_raw, 1073741903, 0, 2, 65, 537] -[:key_down_raw, 1073741904, 0, 2, 66, 538] -[:key_up_raw, 1073741904, 0, 2, 67, 553] -[:key_down_raw, 32, 0, 2, 68, 653] -[:key_up_raw, 32, 0, 2, 69, 659] -[:key_down_raw, 1073741903, 0, 2, 70, 661] -[:key_down_raw, 1073741903, 0, 2, 71, 686] -[:key_up_raw, 1073741903, 0, 2, 72, 687] -[:key_down_raw, 1073741904, 0, 2, 73, 690] -[:key_down_raw, 1073741904, 0, 2, 74, 715] -[:key_down_raw, 1073741904, 0, 2, 75, 717] -[:key_down_raw, 1073741904, 0, 2, 76, 719] -[:key_down_raw, 1073741904, 0, 2, 77, 721] -[:key_down_raw, 1073741904, 0, 2, 78, 723] -[:key_down_raw, 1073741904, 0, 2, 79, 725] -[:key_down_raw, 1073741904, 0, 2, 80, 727] -[:key_down_raw, 1073741904, 0, 2, 81, 729] -[:key_up_raw, 1073741904, 0, 2, 82, 731] -[:key_down_raw, 1073741903, 0, 2, 83, 740] -[:key_down_raw, 32, 0, 2, 84, 749] -[:key_up_raw, 32, 0, 2, 85, 756] -[:key_up_raw, 1073741903, 0, 2, 86, 789] -[:key_down_raw, 1073741904, 0, 2, 87, 792] -[:key_down_raw, 1073741904, 0, 2, 88, 817] -[:key_up_raw, 1073741904, 0, 2, 89, 817] -[:key_down_raw, 32, 0, 2, 90, 844] -[:key_down_raw, 1073741903, 0, 2, 91, 846] -[:key_up_raw, 32, 0, 2, 92, 852] -[:key_down_raw, 1073741903, 0, 2, 93, 871] -[:key_down_raw, 1073741903, 0, 2, 94, 873] -[:key_down_raw, 1073741903, 0, 2, 95, 875] -[:key_down_raw, 1073741903, 0, 2, 96, 877] -[:key_down_raw, 1073741903, 0, 2, 97, 879] -[:key_down_raw, 1073741903, 0, 2, 98, 881] -[:key_down_raw, 1073741903, 0, 2, 99, 883] -[:key_down_raw, 1073741903, 0, 2, 100, 885] -[:key_down_raw, 1073741903, 0, 2, 101, 887] -[:key_up_raw, 1073741903, 0, 2, 102, 887] -[:key_down_raw, 1073741904, 0, 2, 103, 897] -[:key_up_raw, 1073741904, 0, 2, 104, 901] -[:key_down_raw, 32, 0, 2, 105, 948] -[:key_up_raw, 32, 0, 2, 106, 953] -[:key_down_raw, 1073741904, 0, 2, 107, 977] -[:key_up_raw, 1073741904, 0, 2, 108, 991] -[:key_down_raw, 32, 0, 2, 109, 1056] -[:key_up_raw, 32, 0, 2, 110, 1060] -[:key_down_raw, 1073741904, 0, 2, 111, 1065] -[:key_down_raw, 1073741904, 0, 2, 112, 1090] -[:key_down_raw, 1073741904, 0, 2, 113, 1092] -[:key_down_raw, 1073741904, 0, 2, 114, 1094] -[:key_down_raw, 1073741904, 0, 2, 115, 1096] -[:key_up_raw, 1073741904, 0, 2, 116, 1098] -[:key_down_raw, 1073741903, 0, 2, 117, 1108] -[:key_up_raw, 1073741903, 0, 2, 118, 1127] -[:key_down_raw, 1073742051, 1024, 2, 119, 1258] -[:key_down_raw, 113, 1024, 2, 120, 1259] diff --git a/samples/04_physics_and_collisions/07_jump_physics/app/main.rb b/samples/04_physics_and_collisions/07_jump_physics/app/main.rb index 9d7a976..3fcb9e9 100644 --- a/samples/04_physics_and_collisions/07_jump_physics/app/main.rb +++ b/samples/04_physics_and_collisions/07_jump_physics/app/main.rb @@ -9,6 +9,7 @@ - args.outputs.solids: An array. The values generate a solid. The parameters for a solid are [X, Y, WIDTH, HEIGHT, RED, GREEN, BLUE] + For more information about solids, go to mygame/documentation/03-solids-and-borders.md. - num1.greater(num2): Returns the greater value. @@ -36,7 +37,7 @@ class VerticalPlatformer s.new_entity_strict(:platform, hash) # platform key end - # calls methods needed for the game to run properly + # calls methods needed for game to run properly def tick defaults render diff --git a/samples/04_physics_and_collisions/08_bouncing_on_collision/app/block.rb b/samples/04_physics_and_collisions/08_bouncing_on_collision/app/block.rb index db6687a..9254ee4 100644 --- a/samples/04_physics_and_collisions/08_bouncing_on_collision/app/block.rb +++ b/samples/04_physics_and_collisions/08_bouncing_on_collision/app/block.rb @@ -110,8 +110,8 @@ class Block #Find the vector that is perpendicular to the slope perpVect = { x: x, y: y } - mag = (perpVect.x**2 + perpVect.y**2)**0.5 # find the magnitude of the perpVect - perpVect = {x: perpVect.x/(mag), y: perpVect.y/(mag)} # divide the perpVect by the magnitude to make it a unit vector + mag = (perpVect.x**2 + perpVect.y**2)**0.5 # find the magniude of the perpVect + perpVect = {x: perpVect.x/(mag), y: perpVect.y/(mag)} # divide the perpVect by the magniude to make it a unit vector previousPosition = { # calculate an ESTIMATE of the previousPosition of the ball x:args.state.ball.center.x-args.state.ball.velocity.x, @@ -140,7 +140,7 @@ class Block dampener = 0.3 ynew *= dampener * 0.5 - #If the bounce is very low, that means the ball is rolling and we don't want to dampen the X velocity + #If the bounce is very low, that means the ball is rolling and we don't want to dampenen the X velocity if ynew > -0.1 xnew *= dampener end @@ -152,7 +152,7 @@ class Block args.state.ball.velocity.x = -xnew args.state.ball.velocity.y = -ynew - #Set the position of the ball to the previous position so it doesn't warp through the block + #Set the position of the ball to the previous position so it doesn't warp throught the block args.state.ball.center.x = previousPosition.x args.state.ball.center.y = previousPosition.y end diff --git a/samples/04_physics_and_collisions/08_bouncing_on_collision/app/main.rb b/samples/04_physics_and_collisions/08_bouncing_on_collision/app/main.rb index 22d3711..f5883ad 100644 --- a/samples/04_physics_and_collisions/08_bouncing_on_collision/app/main.rb +++ b/samples/04_physics_and_collisions/08_bouncing_on_collision/app/main.rb @@ -60,7 +60,7 @@ begin :default_methods center = args.grid.w / 2 for i in (0...5) - #Create a ramp of blocks. Not going to be perfect because of the float to integer conversion and anisotropic to isotropic conversion + #Create a ramp of blocks. Not going to be perfect because of the float to integer conversion and anisotropic to isotropic coversion args.state.blocks.append(Block.new((center + 100 + (i * horizontal_offset)).to_i, 100 + (vertical_offset * i) + (i * block_size), block_size, rotation)) args.state.blocks.append(Block.new((center - 100 - (i * horizontal_offset)).to_i, 100 + (vertical_offset * i) + (i * block_size), block_size, -rotation)) end diff --git a/samples/04_physics_and_collisions/08_bouncing_on_collision/app/peg.rb b/samples/04_physics_and_collisions/08_bouncing_on_collision/app/peg.rb index daf95ec..52045de 100644 --- a/samples/04_physics_and_collisions/08_bouncing_on_collision/app/peg.rb +++ b/samples/04_physics_and_collisions/08_bouncing_on_collision/app/peg.rb @@ -1,11 +1,11 @@ class Peg def initialize(x, y, block_size) - @x = x # x coordinate of the LEFT side of the peg - @y = y # y coordinate of the RIGHT side of the peg + @x = x # x cordinate of the LEFT side of the peg + @y = y # y cordinate of the RIGHT side of the peg @block_size = block_size # diameter of the peg @radius = @block_size/2.0 # radius of the peg - @center = { # coordinatees of the CENTER of the peg + @center = { # cordinatees of the CENTER of the peg x: @x+@block_size/2.0, y: @y+@block_size/2.0 } @@ -116,8 +116,8 @@ class Peg } perpVect = {x: pointB.x - pointA.x, y:pointB.y - pointA.y} # perpVect is to be VECTOR of the perpendicular tangent - mag = (perpVect.x**2 + perpVect.y**2)**0.5 # find the magnitude of the perpVect - perpVect = {x: perpVect.x/(mag), y: perpVect.y/(mag)} # divide the perpVect by the magnitude to make it a unit vector + mag = (perpVect.x**2 + perpVect.y**2)**0.5 # find the magniude of the perpVect + perpVect = {x: perpVect.x/(mag), y: perpVect.y/(mag)} # divide the perpVect by the magniude to make it a unit vector perpVect = {x: -perpVect.y, y: perpVect.x} # swap the x and y and multiply by -1 to make the vector perpendicular args.state.display_value = perpVect if perpVect.y > 0 #ensure perpVect points upward @@ -130,12 +130,12 @@ class Peg } yInterc = pointA.y + -slope*pointA.x - if slope == INFINITY # the perpVect presently either points in the correct direction or it is 180 degrees off we need to correct this + if slope == INFINITY # the perpVect presently either points in the correct dirrection or it is 180 degrees off we need to correct this if previousPosition.x < pointA.x perpVect = {x: perpVect.x*-1, y: perpVect.y*-1} yInterc = -INFINITY end - elsif previousPosition.y < slope*previousPosition.x + yInterc # check if ball is below or above the collider to determine if perpVect is - or + + elsif previousPosition.y < slope*previousPosition.x + yInterc # check if ball is bellow or above the collider to determine if perpVect is - or + perpVect = {x: perpVect.x*-1, y: perpVect.y*-1} end @@ -148,7 +148,7 @@ class Peg fbx = velocityMag * Math.cos(theta_ball) #the x component of the ball's velocity fby = velocityMag * Math.sin(theta_ball) #the y component of the ball's velocity - repelMag = getRepelMagnitude( # the magnitude of the collision vector + repelMag = getRepelMagnitude( # the magniude of the collision vector args, fbx, fby, @@ -173,7 +173,7 @@ class Peg if args.state.ball.center.y > @center.y # if the ball is above the middle of the peg we need to temporarily ignore some of the gravity args.state.ball.velocity.y = ynew + GRAVITY * 0.01 else - args.state.ball.velocity.y = ynew - GRAVITY * 0.01 # if the ball is below the middle of the peg we need to temporarily increase the power of the gravity + args.state.ball.velocity.y = ynew - GRAVITY * 0.01 # if the ball is bellow the middle of the peg we need to temporarily increase the power of the gravity end args.state.ball.center.x+= args.state.ball.velocity.x # update the position of the ball so it never looks like the ball is intersecting the circle diff --git a/samples/04_physics_and_collisions/08_bouncing_on_collision/app/vector2d.rb b/samples/04_physics_and_collisions/08_bouncing_on_collision/app/vector2d.rb index 0b302f3..9cb1954 100644 --- a/samples/04_physics_and_collisions/08_bouncing_on_collision/app/vector2d.rb +++ b/samples/04_physics_and_collisions/08_bouncing_on_collision/app/vector2d.rb @@ -42,7 +42,7 @@ class Vector2d Vector2d.new(@x/mag, @y/mag) end - #TODO delete? + #TODO delet? def distABS vect (((vect.x-@x)**2+(vect.y-@y)**2)**0.5).abs() end diff --git a/samples/04_physics_and_collisions/08_bouncing_on_collision/docs/LinearCollider.md b/samples/04_physics_and_collisions/08_bouncing_on_collision/docs/LinearCollider.md index 41227a2..315ecf8 100644 --- a/samples/04_physics_and_collisions/08_bouncing_on_collision/docs/LinearCollider.md +++ b/samples/04_physics_and_collisions/08_bouncing_on_collision/docs/LinearCollider.md @@ -1,13 +1,13 @@ -
- -
- -
- -
- -
- -
- -
+
+ +
+ +
+ +
+ +
+ +
+ +
diff --git a/samples/04_physics_and_collisions/09_arbitrary_collision/app/linear_collider.rb b/samples/04_physics_and_collisions/09_arbitrary_collision/app/linear_collider.rb index 679f3a4..9571669 100644 --- a/samples/04_physics_and_collisions/09_arbitrary_collision/app/linear_collider.rb +++ b/samples/04_physics_and_collisions/09_arbitrary_collision/app/linear_collider.rb @@ -82,7 +82,7 @@ class LinearCollider #if at least on point is in the rectangle then collision? is true - otherwise false for point in points #Check whether a given point lies inside a rectangle or not: - #if the sum of the area of traingls, PAB, PBC, PCD, PAD equal the area of the rec, then an intersection has occurred + #if the sum of the area of traingls, PAB, PBC, PCD, PAD equal the area of the rec, then an intersection has occured areaRec = triArea.call(rpointA, rpointB, rpointC)+triArea.call(rpointA, rpointC, rpointD) areaSum = [ triArea.call(point, rpointA, rpointB),triArea.call(point, rpointB, rpointC), @@ -148,7 +148,7 @@ class LinearCollider perpVect = {x: perpVect.x*-1, y: perpVect.y*-1} yInterc = -INFINITY end - elsif previousPosition.y < slope*previousPosition.x + yInterc #check if ball is below or above the collider to determine if perpVect is - or + + elsif previousPosition.y < slope*previousPosition.x + yInterc #check if ball is bellow or above the collider to determine if perpVect is - or + perpVect = {x: perpVect.x*-1, y: perpVect.y*-1} end diff --git a/samples/04_physics_and_collisions/09_arbitrary_collision/app/main.rb b/samples/04_physics_and_collisions/09_arbitrary_collision/app/main.rb index 228eb9d..b2905fb 100644 --- a/samples/04_physics_and_collisions/09_arbitrary_collision/app/main.rb +++ b/samples/04_physics_and_collisions/09_arbitrary_collision/app/main.rb @@ -29,7 +29,7 @@ end begin :default_methods def init_blocks args block_size = args.state.board_width / 8 - #Space in between each block + #Space inbetween each block block_offset = 4 args.state.squares ||=[ diff --git a/samples/04_physics_and_collisions/09_arbitrary_collision/app/vector2d.rb b/samples/04_physics_and_collisions/09_arbitrary_collision/app/vector2d.rb index 0b302f3..9cb1954 100644 --- a/samples/04_physics_and_collisions/09_arbitrary_collision/app/vector2d.rb +++ b/samples/04_physics_and_collisions/09_arbitrary_collision/app/vector2d.rb @@ -42,7 +42,7 @@ class Vector2d Vector2d.new(@x/mag, @y/mag) end - #TODO delete? + #TODO delet? def distABS vect (((vect.x-@x)**2+(vect.y-@y)**2)**0.5).abs() end diff --git a/samples/04_physics_and_collisions/09_arbitrary_collision/docs/LinearCollider.md b/samples/04_physics_and_collisions/09_arbitrary_collision/docs/LinearCollider.md index 41227a2..315ecf8 100644 --- a/samples/04_physics_and_collisions/09_arbitrary_collision/docs/LinearCollider.md +++ b/samples/04_physics_and_collisions/09_arbitrary_collision/docs/LinearCollider.md @@ -1,13 +1,13 @@ -
- -
- -
- -
- -
- -
- -
+
+ +
+ +
+ +
+ +
+ +
+ +
diff --git a/samples/04_physics_and_collisions/10_collision_with_object_removal/app/linear_collider.rb b/samples/04_physics_and_collisions/10_collision_with_object_removal/app/linear_collider.rb index 0a20583..69ada5b 100644 --- a/samples/04_physics_and_collisions/10_collision_with_object_removal/app/linear_collider.rb +++ b/samples/04_physics_and_collisions/10_collision_with_object_removal/app/linear_collider.rb @@ -1,4 +1,4 @@ -#The LinearCollider (theoretically) produces collisions upon a line segment defined point.y two x,y coordinates +#The LinearCollider (theoretically) produces collisions upon a line segment defined point.y two x,y cordinates class LinearCollider @@ -6,13 +6,13 @@ class LinearCollider #last [Array of length 2] end of the line segment as a x,y cordinate #inorder for the LinearCollider to be functional the line segment must be said to have a thickness - #(as it is unlikely that a colliding object will land exactly on the linesegment) + #(as it is unlikly that a colliding object will land exactly on the linesegment) #extension defines if the line's thickness extends negatively or positively #extension :pos extends positively #extension :neg extends negatively - #thickness [float] how thick the line should be (should always be at least as large as the magnitude of the colliding object) + #thickness [float] how thick the line should be (should always be atleast as large as the magnitude of the colliding object) def initialize (pointA, pointB, extension=:neg, thickness=10) @pointA = pointA @pointB = pointB diff --git a/samples/04_physics_and_collisions/10_collision_with_object_removal/app/vector2d.rb b/samples/04_physics_and_collisions/10_collision_with_object_removal/app/vector2d.rb index 37ea141..97cf286 100644 --- a/samples/04_physics_and_collisions/10_collision_with_object_removal/app/vector2d.rb +++ b/samples/04_physics_and_collisions/10_collision_with_object_removal/app/vector2d.rb @@ -43,7 +43,7 @@ class Vector2d Vector2d.new(@x/mag, @y/mag) end - #TODO delete? + #TODO delet? def distABS vect (((vect.x-@x)**2+(vect.y-@y)**2)**0.5).abs() end diff --git a/samples/05_mouse/01_mouse_click/app/main.rb b/samples/05_mouse/01_mouse_click/app/main.rb index 80b91df..8969a6e 100644 --- a/samples/05_mouse/01_mouse_click/app/main.rb +++ b/samples/05_mouse/01_mouse_click/app/main.rb @@ -33,9 +33,11 @@ - args.outputs.borders: An array. The values generate a border. The parameters are [X, Y, WIDTH, HEIGHT, RED, GREEN, BLUE] + For more information about borders, go to mygame/documentation/03-solids-and-borders.md. - args.outputs.labels: An array. The values generate a label. The parameters are [X, Y, TEXT, SIZE, ALIGNMENT, RED, GREEN, BLUE, ALPHA, FONT STYLE] + For more information about labels, go to mygame/documentation/02-labels. =end @@ -120,7 +122,7 @@ class TicTacToe space.piece = state.current_turn # This ternary operator statement allows us to change the current player's turn. - # If it is currently x's turn, it becomes o's turn. If it is not x's turn, it becomes x's turn. + # If it is currently x's turn, it becomes o's turn. If it is not x's turn, it become's x's turn. state.current_turn = state.current_turn == :x ? :o : :x end diff --git a/samples/05_mouse/02_mouse_move/app/main.rb b/samples/05_mouse/02_mouse_move/app/main.rb index 684928b..97edbe7 100644 --- a/samples/05_mouse/02_mouse_move/app/main.rb +++ b/samples/05_mouse/02_mouse_move/app/main.rb @@ -14,9 +14,11 @@ - args.inputs.keyboard.key_down.KEY: Determines if a key is being held or pressed. Stores the frame the "down" event occurred. + For more information about the keyboard, go to mygame/documentation/06-keyboard.md. - args.outputs.sprites: An array. The values generate a sprite. The parameters are [X, Y, WIDTH, HEIGHT, PATH, ANGLE, ALPHA, RED, GREEN, BLUE] + For more information about sprites, go to mygame/documentation/05-sprites.md. - args.state.new_entity: Used when we want to create a new object, like a sprite or button. When we want to create a new object, we can declare it as a new entity and then define @@ -198,13 +200,13 @@ class ProtectThePuppiesFromTheZombies state.zombies = state.zombies - killed_this_frame # remove newly killed zombies from zombies collection state.killed_zombies += killed_this_frame # add newly killed zombies to killed zombies - if killed_this_frame.length > 0 # if at least one zombie was killed in the frame + if killed_this_frame.length > 0 # if atleast one zombie was killed in the frame state.flash_at = state.tick_count # flash_at set to the frame when the zombie was killed # Don't forget, the rendered flash lasts for 10 frames after the zombie is killed (look at render_flash method) end # Sets the tick_count (passage of time) as the value of the death_at variable for each killed zombie. - # Death_at stores the frame where a zombie was killed. + # Death_at stores the frame a zombie was killed. killed_this_frame.each do |z| z.death_at = state.tick_count end diff --git a/samples/05_mouse/03_mouse_move_paint_app/app/main.rb b/samples/05_mouse/03_mouse_move_paint_app/app/main.rb index be983a8..9303949 100644 --- a/samples/05_mouse/03_mouse_move_paint_app/app/main.rb +++ b/samples/05_mouse/03_mouse_move_paint_app/app/main.rb @@ -34,13 +34,14 @@ - args.outputs.labels: An array. The values in the array generate a label. The parameters are [X, Y, TEXT, SIZE, ALIGN, RED, GREEN, BLUE, ALPHA, FONT STYLE] + For more information about labels, go to mygame/documentation/02-labels.md. - ARRAY#inside_rect?: Returns true or false depending on if the point is inside the rect. =end # This sample app shows an empty grid that the user can paint on. -# To paint, the user must keep their mouse pressed and drag it around the grid. +# To paint, the user must keep their mouse presssed and drag it around the grid. # The "clear" button allows users to clear the grid so they can start over. class PaintApp diff --git a/samples/05_mouse/04_coordinate_systems/app/main.rb b/samples/05_mouse/04_coordinate_systems/app/main.rb index 8e5578f..fcfa090 100644 --- a/samples/05_mouse/04_coordinate_systems/app/main.rb +++ b/samples/05_mouse/04_coordinate_systems/app/main.rb @@ -5,6 +5,7 @@ - args.inputs.mouse.click.position: Coordinates of the mouse's position on the screen. Unlike args.inputs.mouse.click.point, the mouse does not need to be pressed down for position to know the mouse's coordinates. + For more information about the mouse, go to mygame/documentation/07-mouse.md. Reminders: @@ -20,12 +21,15 @@ - args.outputs.labels: An array that generates a label. The parameters are [X, Y, TEXT, SIZE, ALIGN, RED, GREEN, BLUE, ALPHA, FONT STYLE] + For more information about labels, go to mygame/documentation/02-labels.md. - args.outputs.solids: An array that generates a solid. The parameters are [X, Y, WIDTH, HEIGHT, RED, GREEN, BLUE, ALPHA] + For more information about solids, go to mygame/documentation/03-solids-and-borders.md. - args.outputs.lines: An array that generates a line. The parameters are [X, Y, X2, Y2, RED, GREEN, BLUE, ALPHA] + For more information about lines, go to mygame/documentation/04-lines.md. =end diff --git a/samples/06_save_load/01_save_load_game/app/main.rb b/samples/06_save_load/01_save_load_game/app/main.rb index 2d2bc41..251848a 100644 --- a/samples/06_save_load/01_save_load_game/app/main.rb +++ b/samples/06_save_load/01_save_load_game/app/main.rb @@ -36,6 +36,7 @@ - args.outputs.labels: An array. Values generate a label. Parameters are [X, Y, TEXT, SIZE, ALIGN, RED, GREEN, BLUE, ALPHA, FONT STYLE] + For more information, go to mygame/documentation/02-labels.md. - ARRAY#inside_rect?: An array with at least two values is considered a point. An array with at least four values is considered a rect. The inside_rect? function returns true @@ -48,7 +49,7 @@ class TextedBasedGame - # Contains methods needed for the game to run properly. + # Contains methods needed for game to run properly. # Increments tick count by 1 each time it runs (60 times in a single second) def tick default @@ -59,7 +60,7 @@ class TextedBasedGame # Sets default values. # The ||= ensures that a variable's value is only set to the value following the = sign - # if the value has not already been set before. Initialization happens only in the first frame. + # if the value has not already been set before. Intialization happens only in the first frame. def default state.engine_tick_count ||= 0 state.active_module ||= :room @@ -286,7 +287,7 @@ class TextedBasedGamePresenter end # instructions for users on how to add the missing method_to_call to the code - puts "It looks like #{method_to_call} doesn't exist on TextedBasedGamePresenter. Please add this method:" + puts "It looks like #{method_to_call} doesn't exists on TextedBasedGamePresenter. Please add this method:" puts "Just copy the code below and put it in the #{TextedBasedGamePresenter} class definition." puts "" puts "```" @@ -345,7 +346,7 @@ class TextedBasedGamePresenter @game end - # Initializes the game and creates an empty list of buttons. + # Initalizes the game and creates an empty list of buttons. def initialize @game = TextedBasedGame.new self @button_list ||= {} diff --git a/samples/07_advanced_audio/01_audio_mixer/app/main.rb b/samples/07_advanced_audio/01_audio_mixer/app/main.rb new file mode 100644 index 0000000..3a85d47 --- /dev/null +++ b/samples/07_advanced_audio/01_audio_mixer/app/main.rb @@ -0,0 +1,376 @@ +# these are the properties that you can sent on args.audio +def spawn_new_sound args, name, path + # Spawn randomly in an area that won't be covered by UI. + screenx = (rand * 600.0) + 200.0 + screeny = (rand * 400.0) + 100.0 + + id = new_sound_id! args + # you can hang anything on the audio hashes you want, so we store the + # actual screen position in here for convenience. + args.audio[id] = { + name: name, + input: path, + screenx: screenx, + screeny: screeny, + x: ((screenx / 1279.0) * 2.0) - 1.0, # scale to -1.0 - 1.0 range + y: ((screeny / 719.0) * 2.0) - 1.0, # scale to -1.0 - 1.0 range + z: 0.0, + gain: 1.0, + pitch: 1.0, + looping: true, + paused: false + } + + args.state.selected = id +end + +# these are values you can change on the ~args.audio~ data structure +def input_panel args + return unless args.state.panel + return if args.state.dragging + + audio_entry = args.audio[args.state.selected] + results = args.state.panel + + if args.state.mouse_state == :held && args.inputs.mouse.position.inside_rect?(results.pitch_slider_rect.rect) + audio_entry.pitch = 2.0 * ((args.inputs.mouse.x - results.pitch_slider_rect.x).to_f / (results.pitch_slider_rect.w - 1.0)) + elsif args.state.mouse_state == :held && args.inputs.mouse.position.inside_rect?(results.playtime_slider_rect.rect) + audio_entry.playtime = audio_entry.length_ * ((args.inputs.mouse.x - results.playtime_slider_rect.x).to_f / (results.playtime_slider_rect.w - 1.0)) + elsif args.state.mouse_state == :held && args.inputs.mouse.position.inside_rect?(results.gain_slider_rect.rect) + audio_entry.gain = (args.inputs.mouse.x - results.gain_slider_rect.x).to_f / (results.gain_slider_rect.w - 1.0) + elsif args.inputs.mouse.click && args.inputs.mouse.position.inside_rect?(results.looping_checkbox_rect.rect) + audio_entry.looping = !audio_entry.looping + elsif args.inputs.mouse.click && args.inputs.mouse.position.inside_rect?(results.paused_checkbox_rect.rect) + audio_entry.paused = !audio_entry.paused + elsif args.inputs.mouse.click && args.inputs.mouse.position.inside_rect?(results.delete_button_rect.rect) + args.audio.delete args.state.selected + end +end + +def render_sources args + args.outputs.primitives << args.audio.keys.map do |k| + s = args.audio[k] + + isselected = (k == args.state.selected) + + color = isselected ? [ 0, 255, 0, 255 ] : [ 0, 0, 255, 255 ] + [ + [s.screenx, s.screeny, args.state.boxsize, args.state.boxsize, *color].solid, + + { + x: s.screenx + args.state.boxsize.half, + y: s.screeny, + text: s.name, + r: 255, + g: 255, + b: 255, + alignment_enum: 1 + }.label! + ] + end +end + +def playtime_str t + minutes = (t / 60.0).floor + seconds = t - (minutes * 60.0).to_f + return minutes.to_s + ':' + seconds.floor.to_s + ((seconds - seconds.floor).to_s + "000")[1..3] +end + +def label_with_drop_shadow x, y, text + [ + { x: x + 1, y: y + 1, text: text, vertical_alignment_enum: 1, alignment_enum: 1, r: 0, g: 0, b: 0 }.label!, + { x: x + 2, y: y + 0, text: text, vertical_alignment_enum: 1, alignment_enum: 1, r: 0, g: 0, b: 0 }.label!, + { x: x + 0, y: y + 1, text: text, vertical_alignment_enum: 1, alignment_enum: 1, r: 200, g: 200, b: 200 }.label! + ] +end + +def check_box opts = {} + checkbox_template = opts.args.layout.rect(w: 0.5, h: 0.5, col: 2) + final_rect = checkbox_template.center_inside_rect_y(opts.args.layout.rect(row: opts.row, col: opts.col)) + color = { r: 0, g: 0, b: 0 } + color = { r: 255, g: 255, b: 255 } if opts.checked + + { + rect: final_rect, + primitives: [ + (final_rect.to_solid color) + ] + } +end + +def progress_bar opts = {} + outer_rect = opts.args.layout.rect(row: opts.row, col: opts.col, w: 5, h: 1) + color = opts.percentage * 255 + baseline_progress_bar = opts.args + .layout + .rect(w: 5, h: 0.5) + + final_rect = baseline_progress_bar.center_inside_rect(outer_rect) + center = final_rect.rect_center_point + + { + rect: final_rect, + primitives: [ + final_rect.merge(r: color, g: color, b: color, a: 128).solid!, + label_with_drop_shadow(center.x, center.y, opts.text) + ] + } +end + +def panel_primitives args, audio_entry + results = { primitives: [] } + + return results unless audio_entry + + # this uses DRGTK's layout apis to layout the controls + # imagine the screen is split into equal cells (24 cells across, 12 cells up and down) + # args.layout.rect returns a hash which we merge values with to create primitives + # using args.layout.rect removes the need for pixel pushing + + # args.outputs.debug << args.layout.debug_primitives(r: 255, g: 255, b: 255) + + white_color = { r: 255, g: 255, b: 255 } + label_style = white_color.merge(vertical_alignment_enum: 1) + + # panel background + results.primitives << args.layout.rect(row: 0, col: 0, w: 7, h: 6, include_col_gutter: true, include_row_gutter: true) + .border!(r: 255, g: 255, b: 255) + + # title + results.primitives << args.layout.point(row: 0, col: 3.5, row_anchor: 0.5) + .merge(label_style) + .merge(text: "Source #{args.state.selected} (#{args.audio[args.state.selected].name})", + size_enum: 3, + alignment_enum: 1) + + # seperator line + results.primitives << args.layout.rect(row: 1, col: 0, w: 7, h: 0) + .line!(white_color) + + # screen location + results.primitives << args.layout.point(row: 1.0, col: 0, row_anchor: 0.5) + .merge(label_style) + .merge(text: "screen:") + + results.primitives << args.layout.point(row: 1.0, col: 2, row_anchor: 0.5) + .merge(label_style) + .merge(text: "(#{audio_entry.screenx.to_i}, #{audio_entry.screeny.to_i})") + + # position + results.primitives << args.layout.point(row: 1.5, col: 0, row_anchor: 0.5) + .merge(label_style) + .merge(text: "position:") + + results.primitives << args.layout.point(row: 1.5, col: 2, row_anchor: 0.5) + .merge(label_style) + .merge(text: "(#{audio_entry[:x].round(5).to_s[0..6]}, #{audio_entry[:y].round(5).to_s[0..6]})") + + results.primitives << args.layout.point(row: 2.0, col: 0, row_anchor: 0.5) + .merge(label_style) + .merge(text: "pitch:") + + results.pitch_slider_rect = progress_bar(row: 2.0, col: 2, + percentage: audio_entry.pitch / 2.0, + text: "#{audio_entry.pitch.to_sf}", + args: args) + + results.primitives << results.pitch_slider_rect.primitives + + results.primitives << args.layout.point(row: 2.5, col: 0, row_anchor: 0.5) + .merge(label_style) + .merge(text: "playtime:") + + results.playtime_slider_rect = progress_bar(args: args, + row: 2.5, + col: 2, + percentage: audio_entry.playtime / audio_entry.length_, + text: "#{playtime_str(audio_entry.playtime)} / #{playtime_str(audio_entry.length_)}") + + results.primitives << results.playtime_slider_rect.primitives + + results.primitives << args.layout.point(row: 3.0, col: 0, row_anchor: 0.5) + .merge(label_style) + .merge(text: "gain:") + + results.gain_slider_rect = progress_bar(args: args, + row: 3.0, + col: 2, + percentage: audio_entry.gain, + text: "#{audio_entry.gain.to_sf}") + + results.primitives << results.gain_slider_rect.primitives + + + results.primitives << args.layout.point(row: 3.5, col: 0, row_anchor: 0.5) + .merge(label_style) + .merge(text: "looping:") + + checkbox_template = args.layout.rect(w: 0.5, h: 0.5, col: 2) + + results.looping_checkbox_rect = check_box(args: args, row: 3.5, col: 2, checked: audio_entry.looping) + results.primitives << results.looping_checkbox_rect.primitives + + results.primitives << args.layout.point(row: 4.0, col: 0, row_anchor: 0.5) + .merge(label_style) + .merge(text: "paused:") + + checkbox_template = args.layout.rect(w: 0.5, h: 0.5, col: 2) + + results.paused_checkbox_rect = check_box(args: args, row: 4.0, col: 2, checked: !audio_entry.paused) + results.primitives << results.paused_checkbox_rect.primitives + + results.delete_button_rect = { rect: args.layout.rect(row: 5, col: 0, w: 7, h: 1) } + + results.primitives << results.delete_button_rect.to_solid(r: 180) + + results.primitives << args.layout.point(row: 5, col: 3.5, row_anchor: 0.5) + .merge(label_style) + .merge(text: "DELETE", alignment_enum: 1) + + return results +end + +def render_panel args + args.state.panel = nil + audio_entry = args.audio[args.state.selected] + return unless audio_entry + + mouse_down = (args.state.mouse_held >= 0) + args.state.panel = panel_primitives args, audio_entry + args.outputs.primitives << args.state.panel.primitives +end + +def new_sound_id! args + args.state.sound_id ||= 0 + args.state.sound_id += 1 + args.state.sound_id +end + +def render_launcher args + args.outputs.primitives << args.state.spawn_sound_buttons.map(&:primitives) +end + +def render_ui args + render_launcher args + render_panel args +end + +def tick args + defaults args + render args + input args +end + +def input args + if !args.audio[args.state.selected] + args.state.selected = nil + args.state.dragging = nil + end + + # spawn button and node interaction + if args.inputs.mouse.click + spawn_sound_button = args.state.spawn_sound_buttons.find { |b| args.inputs.mouse.inside_rect? b.rect } + + audio_click_key, audio_click_value = args.audio.find do |k, v| + args.inputs.mouse.inside_rect? [v.screenx, v.screeny, args.state.boxsize, args.state.boxsize] + end + + if spawn_sound_button + args.state.selected = nil + spawn_new_sound args, spawn_sound_button.name, spawn_sound_button.path + elsif audio_click_key + args.state.selected = audio_click_key + end + end + + if args.state.mouse_state == :held && args.state.selected + v = args.audio[args.state.selected] + if args.inputs.mouse.inside_rect? [v.screenx, v.screeny, args.state.boxsize, args.state.boxsize] + args.state.dragging = args.state.selected + end + + if args.state.dragging + s = args.audio[args.state.selected] + # you can hang anything on the audio hashes you want, so we store the + # actual screen position so it doesn't scale weirdly vs your mouse. + s.screenx = args.inputs.mouse.x - (args.state.boxsize / 2) + s.screeny = args.inputs.mouse.y - (args.state.boxsize / 2) + + s.screeny = 50 if s.screeny < 50 + s.screeny = (719 - args.state.boxsize) if s.screeny > (719 - args.state.boxsize) + s.screenx = 0 if s.screenx < 0 + s.screenx = (1279 - args.state.boxsize) if s.screenx > (1279 - args.state.boxsize) + + s.x = ((s.screenx / 1279.0) * 2.0) - 1.0 # scale to -1.0 - 1.0 range + s.y = ((s.screeny / 719.0) * 2.0) - 1.0 # scale to -1.0 - 1.0 range + end + elsif args.state.mouse_state == :released + args.state.dragging = nil + end + + input_panel args +end + +def defaults args + args.state.mouse_state ||= :released + args.state.dragging_source ||= false + args.state.selected ||= 0 + args.state.next_sound_index ||= 0 + args.state.boxsize ||= 30 + args.state.sound_files ||= [ + { name: :tada, path: "sounds/tada.wav" }, + { name: :splash, path: "sounds/splash.wav" }, + { name: :drum, path: "sounds/drum.wav" }, + { name: :spring, path: "sounds/spring.wav" }, + { name: :music, path: "sounds/music.ogg" } + ] + + # generate buttons based off the sound collection above + args.state.spawn_sound_buttons ||= begin + # create a group of buttons + # column centered (using col_offset to calculate the column offset) + # where each item is 2 columns apart + rects = args.layout.rect_group row: 11, + col_offset: { + count: args.state.sound_files.length, + w: 2 + }, + dcol: 2, + w: 2, + h: 1, + group: args.state.sound_files + + # now that you have the rects + # construct the metadata for the buttons + rects.map do |rect| + { + rect: rect, + name: rect.name, + path: rect.path, + primitives: [ + rect.to_border(r: 255, g: 255, b: 255), + rect.to_label(x: rect.center_x, + y: rect.center_y, + text: "#{rect.name}", + alignment_enum: 1, + vertical_alignment_enum: 1, + r: 255, g: 255, b: 255) + ] + } + end + end + + if args.inputs.mouse.up + args.state.mouse_state = :released + args.state.dragging_source = false + elsif args.inputs.mouse.down + args.state.mouse_state = :held + end + + args.outputs.background_color = [ 0, 0, 0, 255 ] +end + +def render args + render_ui args + render_sources args +end diff --git a/samples/07_advanced_audio/01_audio_mixer/app/server_ip_address.txt b/samples/07_advanced_audio/01_audio_mixer/app/server_ip_address.txt new file mode 100644 index 0000000..531e136 --- /dev/null +++ b/samples/07_advanced_audio/01_audio_mixer/app/server_ip_address.txt @@ -0,0 +1 @@ +192.168.1.65 \ No newline at end of file diff --git a/samples/07_advanced_audio/01_audio_mixer/license-for-audio.txt b/samples/07_advanced_audio/01_audio_mixer/license-for-audio.txt new file mode 100644 index 0000000..f05c25c --- /dev/null +++ b/samples/07_advanced_audio/01_audio_mixer/license-for-audio.txt @@ -0,0 +1,48 @@ +The audio files in this sample are used under various Creative Common licenses: + + +sounds/1.wav: + + Party Pack, Horn Coil 01, Long, 01.wav by InspectorJ (www.jshaw.co.uk) of Freesound.org + (We converted this to mono output.) + Original: https://freesound.org/s/484267/ + License: https://creativecommons.org/licenses/by/3.0/ + + +sounds/2.wav: + + SPLASH.wav by petenice + Original: https://freesound.org/s/9508/ + License: https://creativecommons.org/publicdomain/zero/1.0/ + + +sounds/3.wav: + + buzz roll.wav by bigjoedrummer + (We converted this to mono output.) + Original: https://freesound.org/s/77305/ + License: https://creativecommons.org/publicdomain/zero/1.0/ + + +sounds/4.wav: + + sword04.wav by Erdie + Original: https://freesound.org/s/27858/ + License: https://creativecommons.org/licenses/by/3.0/ + + +sounds/5.wav: + + Game Over Arcade.wav by myfox14 + (We converted this to mono output.) + Original: https://freesound.org/s/382310/ + License: https://creativecommons.org/publicdomain/zero/1.0/ + + +sounds/6.ogg: + + Arcade Music Loop.wav by joshuaempyre ( https://www.empyreanma.com/welcome ) + (We converted this to Ogg Vorbis format, and mono output.) + Original: https://freesound.org/s/251461/ + License: https://creativecommons.org/licenses/by/3.0/ + diff --git a/samples/07_advanced_audio/01_audio_mixer/license-for-sample.txt b/samples/07_advanced_audio/01_audio_mixer/license-for-sample.txt new file mode 100644 index 0000000..100dcec --- /dev/null +++ b/samples/07_advanced_audio/01_audio_mixer/license-for-sample.txt @@ -0,0 +1,9 @@ +Copyright 2019 DragonRuby LLC + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/samples/07_advanced_audio/01_audio_mixer/metadata/game_metadata.txt b/samples/07_advanced_audio/01_audio_mixer/metadata/game_metadata.txt new file mode 100644 index 0000000..16cef1d --- /dev/null +++ b/samples/07_advanced_audio/01_audio_mixer/metadata/game_metadata.txt @@ -0,0 +1,6 @@ +devid=amirrajan +devtitle=Amir Rajan +gameid=hello-world +gametitle=Hello World +version=1.0 +icon=metadata/icon.png diff --git a/samples/07_advanced_audio/01_audio_mixer/metadata/icon.png b/samples/07_advanced_audio/01_audio_mixer/metadata/icon.png new file mode 100644 index 0000000..e20e8c2 Binary files /dev/null and b/samples/07_advanced_audio/01_audio_mixer/metadata/icon.png differ diff --git a/samples/07_advanced_audio/01_audio_mixer/metadata/ios_metadata.txt b/samples/07_advanced_audio/01_audio_mixer/metadata/ios_metadata.txt new file mode 100644 index 0000000..fbd92f5 --- /dev/null +++ b/samples/07_advanced_audio/01_audio_mixer/metadata/ios_metadata.txt @@ -0,0 +1,9 @@ +# ios_metadata.txt is used by the Pro version of DragonRuby Game Toolkit to create iOS apps. +# Information about the Pro version can be found at: http://dragonruby.org/toolkit/game#purchase + +# teamid needs to be set to your assigned Team Id which can be found at https://developer.apple.com/account/#/membership/ +teamid= +# appid needs to be set to your application identifier which can be found at https://developer.apple.com/account/resources/identifiers/list +appid= +# appname is the name you want to show up underneath the app icon on the device. Keep it under 10 characters. +appname= diff --git a/samples/07_advanced_audio/01_audio_mixer/replay.txt b/samples/07_advanced_audio/01_audio_mixer/replay.txt new file mode 100644 index 0000000..3ddde51 --- /dev/null +++ b/samples/07_advanced_audio/01_audio_mixer/replay.txt @@ -0,0 +1,995 @@ +replay_version 2.0 +stopped_at 2551 +seed 100 +recorded_at Wed Jul 14 23:43:22 2021 +[:mouse_button_up, 1, 0, 1, 1, 3] +[:mouse_move, 797, 90, 2, 2, 111] +[:mouse_move, 796, 93, 2, 3, 112] +[:mouse_move, 794, 97, 2, 4, 113] +[:mouse_move, 794, 98, 2, 5, 114] +[:mouse_move, 794, 104, 2, 6, 115] +[:mouse_move, 793, 106, 2, 7, 116] +[:mouse_move, 794, 105, 2, 8, 117] +[:mouse_move, 796, 104, 2, 9, 128] +[:mouse_move, 798, 103, 2, 10, 129] +[:mouse_move, 802, 100, 2, 11, 130] +[:mouse_move, 805, 100, 2, 12, 131] +[:mouse_move, 809, 100, 2, 13, 132] +[:mouse_move, 810, 100, 2, 14, 133] +[:mouse_move, 811, 100, 2, 15, 134] +[:mouse_move, 812, 100, 2, 16, 135] +[:mouse_move, 814, 102, 2, 17, 138] +[:mouse_move, 817, 105, 2, 18, 139] +[:mouse_move, 823, 118, 2, 19, 140] +[:mouse_move, 826, 130, 2, 20, 141] +[:mouse_move, 832, 169, 2, 21, 142] +[:mouse_move, 834, 196, 2, 22, 143] +[:mouse_move, 834, 262, 2, 23, 144] +[:mouse_move, 833, 295, 2, 24, 145] +[:mouse_move, 829, 327, 2, 25, 146] +[:mouse_move, 825, 352, 2, 26, 147] +[:mouse_move, 815, 390, 2, 27, 148] +[:mouse_move, 805, 414, 2, 28, 149] +[:mouse_move, 798, 424, 2, 29, 150] +[:mouse_move, 786, 439, 2, 30, 151] +[:mouse_move, 783, 443, 2, 31, 152] +[:mouse_move, 779, 450, 2, 32, 153] +[:mouse_move, 777, 454, 2, 33, 154] +[:mouse_move, 775, 461, 2, 34, 155] +[:mouse_move, 775, 465, 2, 35, 157] +[:mouse_move, 777, 470, 2, 36, 158] +[:mouse_move, 783, 490, 2, 37, 159] +[:mouse_move, 787, 502, 2, 38, 160] +[:mouse_move, 791, 528, 2, 39, 161] +[:mouse_move, 794, 548, 2, 40, 162] +[:mouse_move, 802, 623, 2, 41, 163] +[:mouse_move, 809, 662, 2, 42, 164] +[:mouse_move, 819, 691, 2, 43, 165] +[:mouse_move, 820, 692, 2, 44, 166] +[:mouse_move, 820, 690, 2, 45, 169] +[:mouse_move, 821, 685, 2, 46, 170] +[:mouse_move, 823, 681, 2, 47, 171] +[:mouse_move, 823, 680, 2, 48, 172] +[:mouse_move, 823, 679, 2, 49, 173] +[:mouse_move, 824, 678, 2, 50, 174] +[:mouse_move, 825, 677, 2, 51, 175] +[:mouse_move, 826, 675, 2, 52, 176] +[:mouse_move, 827, 674, 2, 53, 177] +[:mouse_move, 828, 673, 2, 54, 178] +[:mouse_move, 829, 673, 2, 55, 179] +[:mouse_move, 831, 672, 2, 56, 180] +[:mouse_move, 832, 671, 2, 57, 181] +[:mouse_move, 835, 669, 2, 58, 182] +[:mouse_move, 837, 667, 2, 59, 183] +[:mouse_move, 839, 663, 2, 60, 184] +[:mouse_move, 839, 662, 2, 61, 185] +[:mouse_move, 840, 661, 2, 62, 189] +[:mouse_move, 841, 659, 2, 63, 190] +[:mouse_move, 841, 658, 2, 64, 191] +[:mouse_move, 842, 654, 2, 65, 192] +[:mouse_move, 843, 652, 2, 66, 193] +[:mouse_move, 845, 644, 2, 67, 194] +[:mouse_move, 846, 641, 2, 68, 195] +[:mouse_move, 847, 640, 2, 69, 196] +[:mouse_button_pressed, 1, 0, 1, 70, 221] +[:mouse_button_up, 1, 0, 1, 71, 225] +[:mouse_move, 846, 640, 2, 72, 227] +[:mouse_move, 839, 634, 2, 73, 254] +[:mouse_move, 830, 624, 2, 74, 255] +[:mouse_move, 782, 580, 2, 75, 256] +[:mouse_move, 735, 541, 2, 76, 257] +[:mouse_move, 650, 468, 2, 77, 258] +[:mouse_move, 626, 444, 2, 78, 259] +[:mouse_move, 615, 431, 2, 79, 260] +[:mouse_move, 601, 412, 2, 80, 261] +[:mouse_move, 597, 405, 2, 81, 262] +[:mouse_move, 589, 393, 2, 82, 263] +[:mouse_move, 587, 388, 2, 83, 264] +[:mouse_move, 585, 383, 2, 84, 265] +[:mouse_move, 585, 381, 2, 85, 266] +[:mouse_move, 581, 372, 2, 86, 267] +[:mouse_move, 576, 365, 2, 87, 268] +[:mouse_move, 568, 350, 2, 88, 269] +[:mouse_move, 566, 345, 2, 89, 270] +[:mouse_move, 563, 340, 2, 90, 271] +[:mouse_move, 563, 339, 2, 91, 272] +[:mouse_move, 562, 337, 2, 92, 273] +[:mouse_move, 562, 336, 2, 93, 275] +[:mouse_move, 561, 336, 2, 94, 278] +[:mouse_move, 560, 336, 2, 95, 279] +[:mouse_move, 559, 336, 2, 96, 280] +[:mouse_move, 557, 335, 2, 97, 281] +[:mouse_move, 556, 335, 2, 98, 282] +[:mouse_move, 555, 335, 2, 99, 287] +[:mouse_move, 555, 336, 2, 100, 288] +[:mouse_move, 554, 337, 2, 101, 290] +[:mouse_move, 547, 340, 2, 102, 292] +[:mouse_move, 544, 340, 2, 103, 293] +[:mouse_move, 537, 342, 2, 104, 294] +[:mouse_move, 533, 343, 2, 105, 295] +[:mouse_move, 525, 343, 2, 106, 296] +[:mouse_move, 524, 343, 2, 107, 297] +[:mouse_move, 524, 342, 2, 108, 304] +[:mouse_move, 524, 341, 2, 109, 306] +[:mouse_move, 524, 340, 2, 110, 307] +[:mouse_move, 524, 339, 2, 111, 308] +[:mouse_move, 525, 338, 2, 112, 310] +[:mouse_move, 525, 337, 2, 113, 311] +[:mouse_move, 525, 336, 2, 114, 314] +[:mouse_move, 526, 336, 2, 115, 316] +[:mouse_button_pressed, 1, 0, 1, 116, 318] +[:mouse_move, 520, 336, 2, 117, 321] +[:mouse_move, 512, 337, 2, 118, 322] +[:mouse_move, 488, 340, 2, 119, 323] +[:mouse_move, 471, 344, 2, 120, 324] +[:mouse_move, 426, 353, 2, 121, 325] +[:mouse_move, 400, 359, 2, 122, 326] +[:mouse_move, 354, 371, 2, 123, 327] +[:mouse_move, 335, 375, 2, 124, 328] +[:mouse_move, 306, 381, 2, 125, 329] +[:mouse_move, 295, 385, 2, 126, 330] +[:mouse_move, 278, 390, 2, 127, 331] +[:mouse_move, 268, 393, 2, 128, 332] +[:mouse_move, 247, 401, 2, 129, 333] +[:mouse_move, 238, 407, 2, 130, 334] +[:mouse_move, 225, 416, 2, 131, 335] +[:mouse_move, 219, 420, 2, 132, 336] +[:mouse_move, 208, 428, 2, 133, 337] +[:mouse_move, 201, 434, 2, 134, 338] +[:mouse_move, 186, 444, 2, 135, 339] +[:mouse_move, 181, 448, 2, 136, 340] +[:mouse_move, 177, 452, 2, 137, 341] +[:mouse_button_up, 1, 0, 1, 138, 349] +[:mouse_move, 178, 452, 2, 139, 349] +[:mouse_move, 192, 442, 2, 140, 350] +[:mouse_move, 208, 432, 2, 141, 351] +[:mouse_move, 259, 405, 2, 142, 352] +[:mouse_move, 294, 391, 2, 143, 353] +[:mouse_move, 380, 369, 2, 144, 354] +[:mouse_move, 415, 361, 2, 145, 355] +[:mouse_move, 459, 351, 2, 146, 356] +[:mouse_move, 475, 348, 2, 147, 357] +[:mouse_move, 505, 342, 2, 148, 358] +[:mouse_move, 519, 341, 2, 149, 359] +[:mouse_move, 538, 337, 2, 150, 360] +[:mouse_move, 544, 335, 2, 151, 361] +[:mouse_move, 546, 334, 2, 152, 362] +[:mouse_button_pressed, 1, 0, 1, 153, 379] +[:mouse_move, 542, 336, 2, 154, 383] +[:mouse_move, 537, 340, 2, 155, 384] +[:mouse_move, 509, 356, 2, 156, 385] +[:mouse_move, 489, 366, 2, 157, 386] +[:mouse_move, 435, 389, 2, 158, 387] +[:mouse_move, 409, 400, 2, 159, 388] +[:mouse_move, 353, 423, 2, 160, 389] +[:mouse_move, 332, 432, 2, 161, 390] +[:mouse_move, 301, 445, 2, 162, 391] +[:mouse_move, 290, 450, 2, 163, 392] +[:mouse_move, 278, 457, 2, 164, 393] +[:mouse_move, 275, 459, 2, 165, 394] +[:mouse_move, 267, 465, 2, 166, 395] +[:mouse_move, 261, 469, 2, 167, 396] +[:mouse_move, 254, 474, 2, 168, 397] +[:mouse_move, 244, 481, 2, 169, 398] +[:mouse_move, 241, 484, 2, 170, 399] +[:mouse_move, 240, 485, 2, 171, 400] +[:mouse_move, 237, 488, 2, 172, 402] +[:mouse_move, 234, 491, 2, 173, 404] +[:mouse_move, 231, 493, 2, 174, 405] +[:mouse_move, 224, 500, 2, 175, 406] +[:mouse_move, 222, 502, 2, 176, 407] +[:mouse_move, 219, 505, 2, 177, 408] +[:mouse_move, 218, 505, 2, 178, 409] +[:mouse_move, 214, 506, 2, 179, 412] +[:mouse_move, 211, 507, 2, 180, 413] +[:mouse_move, 202, 509, 2, 181, 414] +[:mouse_move, 198, 509, 2, 182, 415] +[:mouse_move, 183, 511, 2, 183, 416] +[:mouse_move, 174, 511, 2, 184, 417] +[:mouse_move, 169, 511, 2, 185, 418] +[:mouse_move, 166, 511, 2, 186, 420] +[:mouse_move, 164, 511, 2, 187, 421] +[:mouse_move, 163, 511, 2, 188, 422] +[:mouse_move, 164, 511, 2, 189, 434] +[:mouse_move, 164, 510, 2, 190, 436] +[:mouse_move, 166, 510, 2, 191, 437] +[:mouse_move, 167, 510, 2, 192, 438] +[:mouse_move, 171, 509, 2, 193, 439] +[:mouse_move, 174, 508, 2, 194, 440] +[:mouse_move, 186, 504, 2, 195, 441] +[:mouse_move, 197, 501, 2, 196, 442] +[:mouse_move, 247, 487, 2, 197, 443] +[:mouse_move, 298, 477, 2, 198, 444] +[:mouse_move, 429, 457, 2, 199, 445] +[:mouse_move, 481, 451, 2, 200, 446] +[:mouse_move, 586, 439, 2, 201, 447] +[:mouse_move, 632, 437, 2, 202, 448] +[:mouse_move, 728, 439, 2, 203, 449] +[:mouse_move, 785, 440, 2, 204, 450] +[:mouse_move, 905, 441, 2, 205, 451] +[:mouse_move, 943, 445, 2, 206, 452] +[:mouse_move, 981, 449, 2, 207, 453] +[:mouse_move, 997, 451, 2, 208, 454] +[:mouse_move, 1020, 455, 2, 209, 455] +[:mouse_move, 1034, 456, 2, 210, 456] +[:mouse_move, 1049, 458, 2, 211, 457] +[:mouse_move, 1065, 459, 2, 212, 458] +[:mouse_move, 1088, 460, 2, 213, 459] +[:mouse_move, 1101, 461, 2, 214, 460] +[:mouse_move, 1106, 461, 2, 215, 461] +[:mouse_move, 1116, 463, 2, 216, 462] +[:mouse_move, 1123, 465, 2, 217, 463] +[:mouse_move, 1137, 468, 2, 218, 464] +[:mouse_move, 1140, 468, 2, 219, 465] +[:mouse_move, 1141, 468, 2, 220, 466] +[:mouse_move, 1141, 469, 2, 221, 469] +[:mouse_move, 1142, 469, 2, 222, 472] +[:mouse_move, 1143, 469, 2, 223, 476] +[:mouse_move, 1144, 469, 2, 224, 478] +[:mouse_move, 1143, 469, 2, 225, 487] +[:mouse_move, 1137, 469, 2, 226, 488] +[:mouse_move, 1106, 463, 2, 227, 489] +[:mouse_move, 1082, 456, 2, 228, 490] +[:mouse_move, 1025, 442, 2, 229, 491] +[:mouse_move, 985, 434, 2, 230, 492] +[:mouse_move, 889, 417, 2, 231, 493] +[:mouse_move, 841, 410, 2, 232, 494] +[:mouse_move, 749, 402, 2, 233, 495] +[:mouse_move, 705, 399, 2, 234, 496] +[:mouse_move, 647, 396, 2, 235, 497] +[:mouse_move, 632, 396, 2, 236, 498] +[:mouse_move, 609, 398, 2, 237, 499] +[:mouse_move, 597, 400, 2, 238, 500] +[:mouse_move, 585, 403, 2, 239, 501] +[:mouse_move, 584, 403, 2, 240, 502] +[:mouse_move, 585, 403, 2, 241, 521] +[:mouse_move, 585, 402, 2, 242, 522] +[:mouse_move, 587, 400, 2, 243, 523] +[:mouse_move, 595, 395, 2, 244, 524] +[:mouse_move, 602, 392, 2, 245, 525] +[:mouse_move, 617, 388, 2, 246, 526] +[:mouse_move, 626, 387, 2, 247, 527] +[:mouse_move, 641, 385, 2, 248, 528] +[:mouse_move, 645, 385, 2, 249, 529] +[:mouse_move, 646, 385, 2, 250, 530] +[:mouse_move, 646, 384, 2, 251, 539] +[:mouse_move, 645, 384, 2, 252, 545] +[:mouse_move, 644, 384, 2, 253, 547] +[:mouse_button_up, 1, 0, 1, 254, 547] +[:mouse_move, 641, 383, 2, 255, 547] +[:mouse_move, 634, 381, 2, 256, 548] +[:mouse_move, 608, 370, 2, 257, 549] +[:mouse_move, 573, 355, 2, 258, 550] +[:mouse_move, 415, 301, 2, 259, 551] +[:mouse_move, 315, 267, 2, 260, 552] +[:mouse_move, 161, 209, 2, 261, 553] +[:mouse_move, 117, 193, 2, 262, 554] +[:mouse_move, 91, 178, 2, 263, 555] +[:mouse_move, 91, 177, 2, 264, 556] +[:mouse_move, 92, 176, 2, 265, 557] +[:mouse_move, 94, 174, 2, 266, 559] +[:mouse_move, 97, 172, 2, 267, 560] +[:mouse_move, 101, 169, 2, 268, 561] +[:mouse_move, 102, 169, 2, 269, 562] +[:mouse_move, 107, 163, 2, 270, 563] +[:mouse_move, 109, 159, 2, 271, 564] +[:mouse_move, 114, 154, 2, 272, 565] +[:mouse_move, 116, 153, 2, 273, 566] +[:mouse_move, 118, 153, 2, 274, 567] +[:mouse_move, 124, 154, 2, 275, 568] +[:mouse_move, 131, 156, 2, 276, 569] +[:mouse_move, 156, 162, 2, 277, 570] +[:mouse_move, 166, 165, 2, 278, 571] +[:mouse_move, 185, 170, 2, 279, 572] +[:mouse_move, 194, 172, 2, 280, 573] +[:mouse_move, 205, 175, 2, 281, 574] +[:mouse_move, 206, 176, 2, 282, 575] +[:mouse_move, 203, 176, 2, 283, 580] +[:mouse_move, 202, 176, 2, 284, 582] +[:mouse_button_pressed, 1, 0, 1, 285, 607] +[:mouse_move, 206, 176, 2, 286, 615] +[:mouse_move, 210, 176, 2, 287, 616] +[:mouse_move, 222, 178, 2, 288, 617] +[:mouse_move, 228, 180, 2, 289, 618] +[:mouse_move, 243, 183, 2, 290, 619] +[:mouse_move, 248, 184, 2, 291, 620] +[:mouse_move, 254, 185, 2, 292, 621] +[:mouse_move, 263, 186, 2, 293, 622] +[:mouse_move, 268, 187, 2, 294, 623] +[:mouse_move, 274, 187, 2, 295, 624] +[:mouse_move, 276, 188, 2, 296, 625] +[:mouse_move, 280, 188, 2, 297, 626] +[:mouse_move, 282, 188, 2, 298, 627] +[:mouse_move, 291, 189, 2, 299, 628] +[:mouse_move, 295, 189, 2, 300, 629] +[:mouse_move, 303, 191, 2, 301, 630] +[:mouse_move, 307, 191, 2, 302, 631] +[:mouse_move, 313, 192, 2, 303, 632] +[:mouse_move, 317, 192, 2, 304, 633] +[:mouse_move, 327, 193, 2, 305, 634] +[:mouse_move, 332, 193, 2, 306, 635] +[:mouse_move, 339, 193, 2, 307, 636] +[:mouse_move, 341, 193, 2, 308, 637] +[:mouse_move, 344, 193, 2, 309, 638] +[:mouse_move, 346, 194, 2, 310, 639] +[:mouse_move, 350, 194, 2, 311, 640] +[:mouse_move, 352, 194, 2, 312, 641] +[:mouse_move, 353, 194, 2, 313, 642] +[:mouse_move, 354, 194, 2, 314, 643] +[:mouse_move, 354, 193, 2, 315, 644] +[:mouse_move, 355, 193, 2, 316, 645] +[:mouse_move, 356, 193, 2, 317, 649] +[:mouse_move, 357, 192, 2, 318, 651] +[:mouse_move, 358, 192, 2, 319, 654] +[:mouse_move, 359, 191, 2, 320, 659] +[:mouse_move, 360, 191, 2, 321, 660] +[:mouse_move, 361, 190, 2, 322, 661] +[:mouse_move, 362, 189, 2, 323, 662] +[:mouse_move, 363, 189, 2, 324, 663] +[:mouse_move, 364, 188, 2, 325, 664] +[:mouse_move, 365, 188, 2, 326, 665] +[:mouse_move, 366, 188, 2, 327, 667] +[:mouse_move, 367, 187, 2, 328, 669] +[:mouse_move, 368, 187, 2, 329, 671] +[:mouse_move, 369, 187, 2, 330, 672] +[:mouse_move, 370, 186, 2, 331, 673] +[:mouse_move, 371, 186, 2, 332, 675] +[:mouse_move, 371, 185, 2, 333, 676] +[:mouse_move, 372, 185, 2, 334, 678] +[:mouse_move, 372, 184, 2, 335, 679] +[:mouse_move, 372, 183, 2, 336, 683] +[:mouse_move, 371, 183, 2, 337, 684] +[:mouse_move, 372, 183, 2, 338, 692] +[:mouse_move, 372, 182, 2, 339, 694] +[:mouse_move, 373, 182, 2, 340, 695] +[:mouse_move, 374, 182, 2, 341, 696] +[:mouse_move, 374, 181, 2, 342, 698] +[:mouse_move, 375, 181, 2, 343, 699] +[:mouse_move, 376, 180, 2, 344, 700] +[:mouse_move, 377, 180, 2, 345, 702] +[:mouse_move, 376, 180, 2, 346, 709] +[:mouse_move, 375, 180, 2, 347, 711] +[:mouse_move, 374, 180, 2, 348, 715] +[:mouse_move, 371, 180, 2, 349, 730] +[:mouse_move, 363, 180, 2, 350, 731] +[:mouse_move, 358, 180, 2, 351, 732] +[:mouse_move, 352, 180, 2, 352, 733] +[:mouse_move, 338, 182, 2, 353, 734] +[:mouse_move, 333, 182, 2, 354, 735] +[:mouse_move, 327, 183, 2, 355, 736] +[:mouse_move, 324, 183, 2, 356, 737] +[:mouse_move, 309, 183, 2, 357, 738] +[:mouse_move, 303, 183, 2, 358, 739] +[:mouse_move, 295, 182, 2, 359, 740] +[:mouse_move, 293, 182, 2, 360, 741] +[:mouse_move, 292, 182, 2, 361, 742] +[:mouse_move, 291, 182, 2, 362, 744] +[:mouse_move, 288, 182, 2, 363, 746] +[:mouse_move, 286, 182, 2, 364, 747] +[:mouse_move, 281, 182, 2, 365, 748] +[:mouse_move, 278, 182, 2, 366, 749] +[:mouse_move, 270, 183, 2, 367, 750] +[:mouse_move, 268, 183, 2, 368, 751] +[:mouse_move, 266, 183, 2, 369, 752] +[:mouse_move, 265, 183, 2, 370, 753] +[:mouse_move, 262, 183, 2, 371, 754] +[:mouse_move, 257, 183, 2, 372, 755] +[:mouse_move, 252, 183, 2, 373, 756] +[:mouse_move, 251, 183, 2, 374, 757] +[:mouse_move, 250, 183, 2, 375, 758] +[:mouse_move, 249, 183, 2, 376, 769] +[:mouse_move, 247, 182, 2, 377, 773] +[:mouse_move, 243, 182, 2, 378, 774] +[:mouse_move, 242, 182, 2, 379, 775] +[:mouse_move, 243, 182, 2, 380, 796] +[:mouse_move, 244, 182, 2, 381, 800] +[:mouse_move, 245, 182, 2, 382, 806] +[:mouse_move, 246, 182, 2, 383, 824] +[:mouse_move, 247, 182, 2, 384, 827] +[:mouse_move, 248, 183, 2, 385, 850] +[:mouse_move, 249, 183, 2, 386, 855] +[:mouse_button_up, 1, 0, 1, 387, 893] +[:mouse_move, 249, 184, 2, 388, 904] +[:mouse_move, 249, 185, 2, 389, 905] +[:mouse_move, 249, 191, 2, 390, 906] +[:mouse_move, 249, 196, 2, 391, 907] +[:mouse_move, 247, 208, 2, 392, 908] +[:mouse_move, 246, 214, 2, 393, 909] +[:mouse_move, 244, 223, 2, 394, 910] +[:mouse_move, 244, 225, 2, 395, 911] +[:mouse_move, 243, 226, 2, 396, 912] +[:mouse_move, 243, 227, 2, 397, 913] +[:mouse_move, 242, 229, 2, 398, 914] +[:mouse_move, 241, 229, 2, 399, 915] +[:mouse_move, 241, 230, 2, 400, 916] +[:mouse_move, 240, 230, 2, 401, 919] +[:mouse_move, 240, 231, 2, 402, 920] +[:mouse_move, 239, 232, 2, 403, 922] +[:mouse_move, 239, 231, 2, 404, 945] +[:mouse_move, 240, 230, 2, 405, 947] +[:mouse_button_pressed, 1, 0, 1, 406, 960] +[:mouse_button_up, 1, 0, 1, 407, 966] +[:mouse_move, 243, 230, 2, 408, 1005] +[:mouse_move, 245, 229, 2, 409, 1007] +[:mouse_move, 247, 229, 2, 410, 1009] +[:mouse_move, 251, 229, 2, 411, 1010] +[:mouse_move, 259, 228, 2, 412, 1011] +[:mouse_move, 262, 228, 2, 413, 1012] +[:mouse_move, 264, 228, 2, 414, 1013] +[:mouse_move, 271, 227, 2, 415, 1014] +[:mouse_move, 277, 227, 2, 416, 1015] +[:mouse_move, 288, 226, 2, 417, 1016] +[:mouse_move, 292, 225, 2, 418, 1017] +[:mouse_move, 304, 225, 2, 419, 1018] +[:mouse_move, 308, 225, 2, 420, 1019] +[:mouse_move, 316, 225, 2, 421, 1020] +[:mouse_move, 319, 224, 2, 422, 1021] +[:mouse_move, 324, 223, 2, 423, 1022] +[:mouse_move, 327, 222, 2, 424, 1023] +[:mouse_move, 334, 222, 2, 425, 1024] +[:mouse_move, 340, 222, 2, 426, 1025] +[:mouse_move, 351, 224, 2, 427, 1026] +[:mouse_move, 355, 225, 2, 428, 1027] +[:mouse_move, 359, 225, 2, 429, 1028] +[:mouse_move, 360, 225, 2, 430, 1029] +[:mouse_move, 361, 225, 2, 431, 1034] +[:mouse_move, 362, 225, 2, 432, 1036] +[:mouse_move, 363, 225, 2, 433, 1037] +[:mouse_move, 365, 225, 2, 434, 1038] +[:mouse_move, 366, 226, 2, 435, 1040] +[:mouse_move, 367, 227, 2, 436, 1043] +[:mouse_move, 368, 227, 2, 437, 1047] +[:mouse_move, 369, 227, 2, 438, 1051] +[:mouse_move, 370, 227, 2, 439, 1052] +[:mouse_move, 371, 228, 2, 440, 1053] +[:mouse_move, 372, 228, 2, 441, 1054] +[:mouse_move, 373, 228, 2, 442, 1057] +[:mouse_move, 374, 228, 2, 443, 1061] +[:mouse_button_pressed, 1, 0, 1, 444, 1066] +[:mouse_move, 375, 229, 2, 445, 1079] +[:mouse_move, 377, 229, 2, 446, 1080] +[:mouse_move, 378, 229, 2, 447, 1082] +[:mouse_move, 378, 230, 2, 448, 1088] +[:mouse_move, 379, 230, 2, 449, 1089] +[:mouse_move, 380, 230, 2, 450, 1090] +[:mouse_move, 381, 230, 2, 451, 1091] +[:mouse_move, 382, 230, 2, 452, 1092] +[:mouse_move, 383, 230, 2, 453, 1094] +[:mouse_button_up, 1, 0, 1, 454, 1123] +[:mouse_move, 382, 230, 2, 455, 1124] +[:mouse_move, 381, 230, 2, 456, 1125] +[:mouse_move, 377, 229, 2, 457, 1126] +[:mouse_move, 371, 229, 2, 458, 1127] +[:mouse_move, 351, 233, 2, 459, 1128] +[:mouse_move, 340, 236, 2, 460, 1129] +[:mouse_move, 312, 244, 2, 461, 1130] +[:mouse_move, 232, 261, 2, 462, 1132] +[:mouse_move, 213, 263, 2, 463, 1133] +[:mouse_move, 185, 265, 2, 464, 1134] +[:mouse_move, 172, 265, 2, 465, 1135] +[:mouse_move, 155, 265, 2, 466, 1136] +[:mouse_move, 153, 265, 2, 467, 1137] +[:mouse_move, 152, 265, 2, 468, 1143] +[:mouse_move, 152, 264, 2, 469, 1148] +[:mouse_move, 151, 264, 2, 470, 1150] +[:mouse_move, 150, 264, 2, 471, 1151] +[:mouse_move, 147, 266, 2, 472, 1152] +[:mouse_move, 142, 271, 2, 473, 1153] +[:mouse_move, 141, 273, 2, 474, 1154] +[:mouse_move, 139, 279, 2, 475, 1155] +[:mouse_move, 139, 280, 2, 476, 1156] +[:mouse_move, 138, 283, 2, 477, 1157] +[:mouse_move, 138, 285, 2, 478, 1158] +[:mouse_move, 138, 286, 2, 479, 1159] +[:mouse_move, 138, 287, 2, 480, 1163] +[:mouse_move, 138, 288, 2, 481, 1164] +[:mouse_move, 139, 289, 2, 482, 1165] +[:mouse_move, 138, 289, 2, 483, 1171] +[:mouse_move, 137, 288, 2, 484, 1172] +[:mouse_move, 136, 286, 2, 485, 1173] +[:mouse_move, 135, 285, 2, 486, 1174] +[:mouse_move, 135, 284, 2, 487, 1177] +[:mouse_button_pressed, 1, 0, 1, 488, 1183] +[:mouse_button_up, 1, 0, 1, 489, 1186] +[:mouse_move, 136, 284, 2, 490, 1190] +[:mouse_move, 137, 284, 2, 491, 1193] +[:mouse_button_pressed, 1, 0, 1, 492, 1231] +[:mouse_button_up, 1, 0, 1, 493, 1233] +[:mouse_move, 138, 281, 2, 494, 1242] +[:mouse_move, 140, 279, 2, 495, 1243] +[:mouse_move, 150, 267, 2, 496, 1244] +[:mouse_move, 157, 260, 2, 497, 1245] +[:mouse_move, 171, 248, 2, 498, 1246] +[:mouse_move, 180, 242, 2, 499, 1247] +[:mouse_move, 206, 229, 2, 500, 1248] +[:mouse_move, 222, 224, 2, 501, 1249] +[:mouse_move, 248, 217, 2, 502, 1250] +[:mouse_move, 257, 216, 2, 503, 1251] +[:mouse_move, 266, 215, 2, 504, 1252] +[:mouse_move, 266, 214, 2, 505, 1261] +[:mouse_move, 266, 208, 2, 506, 1263] +[:mouse_move, 265, 207, 2, 507, 1264] +[:mouse_move, 258, 202, 2, 508, 1265] +[:mouse_move, 256, 201, 2, 509, 1266] +[:mouse_move, 250, 200, 2, 510, 1267] +[:mouse_move, 249, 200, 2, 511, 1268] +[:mouse_move, 249, 199, 2, 512, 1269] +[:mouse_move, 248, 199, 2, 513, 1272] +[:mouse_move, 248, 200, 2, 514, 1285] +[:mouse_move, 245, 202, 2, 515, 1286] +[:mouse_move, 244, 205, 2, 516, 1287] +[:mouse_move, 243, 205, 2, 517, 1288] +[:mouse_move, 241, 207, 2, 518, 1289] +[:mouse_move, 241, 208, 2, 519, 1290] +[:mouse_move, 240, 208, 2, 520, 1291] +[:mouse_move, 239, 209, 2, 521, 1292] +[:mouse_move, 238, 209, 2, 522, 1293] +[:mouse_move, 238, 208, 2, 523, 1299] +[:mouse_move, 238, 207, 2, 524, 1300] +[:mouse_move, 238, 206, 2, 525, 1302] +[:mouse_move, 238, 205, 2, 526, 1304] +[:mouse_move, 239, 205, 2, 527, 1305] +[:mouse_move, 239, 204, 2, 528, 1306] +[:mouse_move, 243, 205, 2, 529, 1336] +[:mouse_move, 257, 207, 2, 530, 1337] +[:mouse_move, 267, 208, 2, 531, 1338] +[:mouse_move, 294, 210, 2, 532, 1339] +[:mouse_move, 308, 211, 2, 533, 1340] +[:mouse_move, 337, 212, 2, 534, 1341] +[:mouse_move, 350, 212, 2, 535, 1342] +[:mouse_move, 361, 212, 2, 536, 1343] +[:mouse_move, 363, 211, 2, 537, 1344] +[:mouse_move, 365, 211, 2, 538, 1345] +[:mouse_move, 366, 211, 2, 539, 1346] +[:mouse_move, 367, 210, 2, 540, 1348] +[:mouse_button_pressed, 1, 0, 1, 541, 1356] +[:mouse_button_up, 1, 0, 1, 542, 1361] +[:mouse_move, 363, 210, 2, 543, 1388] +[:mouse_move, 346, 213, 2, 544, 1389] +[:mouse_move, 331, 214, 2, 545, 1390] +[:mouse_move, 290, 218, 2, 546, 1391] +[:mouse_move, 271, 218, 2, 547, 1392] +[:mouse_move, 241, 218, 2, 548, 1393] +[:mouse_move, 232, 218, 2, 549, 1394] +[:mouse_move, 224, 217, 2, 550, 1395] +[:mouse_move, 222, 217, 2, 551, 1396] +[:mouse_move, 218, 216, 2, 552, 1397] +[:mouse_move, 215, 215, 2, 553, 1398] +[:mouse_move, 211, 214, 2, 554, 1399] +[:mouse_move, 211, 213, 2, 555, 1400] +[:mouse_move, 210, 213, 2, 556, 1401] +[:mouse_move, 210, 212, 2, 557, 1404] +[:mouse_move, 211, 212, 2, 558, 1405] +[:mouse_move, 212, 212, 2, 559, 1406] +[:mouse_move, 213, 211, 2, 560, 1407] +[:mouse_move, 215, 210, 2, 561, 1408] +[:mouse_move, 218, 210, 2, 562, 1409] +[:mouse_move, 224, 210, 2, 563, 1410] +[:mouse_button_pressed, 1, 0, 1, 564, 1414] +[:mouse_button_up, 1, 0, 1, 565, 1420] +[:mouse_move, 227, 210, 2, 566, 1427] +[:mouse_move, 233, 209, 2, 567, 1428] +[:mouse_move, 236, 209, 2, 568, 1429] +[:mouse_move, 237, 209, 2, 569, 1430] +[:mouse_move, 239, 208, 2, 570, 1431] +[:mouse_move, 241, 208, 2, 571, 1433] +[:mouse_move, 242, 208, 2, 572, 1434] +[:mouse_move, 244, 207, 2, 573, 1435] +[:mouse_move, 245, 207, 2, 574, 1436] +[:mouse_move, 246, 207, 2, 575, 1437] +[:mouse_move, 247, 207, 2, 576, 1450] +[:mouse_move, 249, 207, 2, 577, 1451] +[:mouse_move, 251, 206, 2, 578, 1452] +[:mouse_move, 255, 205, 2, 579, 1453] +[:mouse_move, 256, 205, 2, 580, 1455] +[:mouse_move, 255, 205, 2, 581, 1470] +[:mouse_move, 251, 206, 2, 582, 1471] +[:mouse_move, 233, 207, 2, 583, 1472] +[:mouse_move, 223, 207, 2, 584, 1473] +[:mouse_move, 201, 208, 2, 585, 1474] +[:mouse_move, 185, 209, 2, 586, 1475] +[:mouse_move, 127, 210, 2, 587, 1476] +[:mouse_move, 107, 211, 2, 588, 1477] +[:mouse_move, 97, 211, 2, 589, 1478] +[:mouse_move, 98, 211, 2, 590, 1485] +[:mouse_move, 99, 211, 2, 591, 1486] +[:mouse_move, 100, 211, 2, 592, 1487] +[:mouse_move, 102, 210, 2, 593, 1488] +[:mouse_move, 106, 209, 2, 594, 1489] +[:mouse_move, 110, 208, 2, 595, 1490] +[:mouse_move, 119, 206, 2, 596, 1491] +[:mouse_move, 124, 206, 2, 597, 1492] +[:mouse_move, 126, 205, 2, 598, 1493] +[:mouse_move, 127, 205, 2, 599, 1494] +[:mouse_move, 128, 205, 2, 600, 1499] +[:mouse_move, 128, 204, 2, 601, 1502] +[:mouse_move, 128, 203, 2, 602, 1507] +[:mouse_move, 127, 203, 2, 603, 1511] +[:mouse_button_pressed, 1, 0, 1, 604, 1516] +[:mouse_button_up, 1, 0, 1, 605, 1521] +[:mouse_move, 131, 205, 2, 606, 1534] +[:mouse_move, 132, 206, 2, 607, 1535] +[:mouse_move, 138, 211, 2, 608, 1536] +[:mouse_move, 142, 214, 2, 609, 1537] +[:mouse_move, 151, 223, 2, 610, 1538] +[:mouse_move, 157, 229, 2, 611, 1539] +[:mouse_move, 171, 248, 2, 612, 1540] +[:mouse_move, 179, 259, 2, 613, 1541] +[:mouse_move, 184, 270, 2, 614, 1542] +[:mouse_move, 195, 289, 2, 615, 1543] +[:mouse_move, 200, 297, 2, 616, 1544] +[:mouse_move, 207, 309, 2, 617, 1545] +[:mouse_move, 209, 313, 2, 618, 1546] +[:mouse_move, 211, 316, 2, 619, 1547] +[:mouse_move, 211, 317, 2, 620, 1548] +[:mouse_move, 212, 319, 2, 621, 1549] +[:mouse_move, 212, 320, 2, 622, 1551] +[:mouse_move, 213, 320, 2, 623, 1552] +[:mouse_move, 213, 322, 2, 624, 1554] +[:mouse_move, 216, 327, 2, 625, 1555] +[:mouse_move, 217, 329, 2, 626, 1556] +[:mouse_move, 220, 333, 2, 627, 1557] +[:mouse_move, 221, 335, 2, 628, 1558] +[:mouse_move, 221, 336, 2, 629, 1559] +[:mouse_move, 222, 337, 2, 630, 1560] +[:mouse_move, 223, 340, 2, 631, 1561] +[:mouse_move, 226, 343, 2, 632, 1562] +[:mouse_move, 232, 348, 2, 633, 1563] +[:mouse_move, 235, 350, 2, 634, 1564] +[:mouse_move, 236, 350, 2, 635, 1565] +[:mouse_move, 236, 349, 2, 636, 1602] +[:mouse_move, 241, 339, 2, 637, 1603] +[:mouse_move, 242, 332, 2, 638, 1604] +[:mouse_move, 246, 318, 2, 639, 1605] +[:mouse_move, 246, 311, 2, 640, 1606] +[:mouse_move, 245, 288, 2, 641, 1607] +[:mouse_move, 241, 271, 2, 642, 1608] +[:mouse_move, 226, 240, 2, 643, 1609] +[:mouse_move, 219, 228, 2, 644, 1610] +[:mouse_move, 214, 218, 2, 645, 1611] +[:mouse_move, 214, 217, 2, 646, 1612] +[:mouse_move, 214, 215, 2, 647, 1613] +[:mouse_move, 214, 214, 2, 648, 1614] +[:mouse_move, 214, 213, 2, 649, 1617] +[:mouse_move, 215, 212, 2, 650, 1619] +[:mouse_move, 216, 212, 2, 651, 1620] +[:mouse_move, 223, 214, 2, 652, 1621] +[:mouse_move, 226, 216, 2, 653, 1622] +[:mouse_move, 230, 218, 2, 654, 1623] +[:mouse_move, 231, 218, 2, 655, 1624] +[:mouse_move, 232, 218, 2, 656, 1625] +[:mouse_move, 232, 219, 2, 657, 1628] +[:mouse_move, 233, 220, 2, 658, 1633] +[:mouse_move, 237, 223, 2, 659, 1634] +[:mouse_move, 238, 224, 2, 660, 1635] +[:mouse_move, 241, 226, 2, 661, 1636] +[:mouse_move, 242, 227, 2, 662, 1637] +[:mouse_move, 243, 227, 2, 663, 1640] +[:mouse_move, 244, 227, 2, 664, 1642] +[:mouse_move, 245, 227, 2, 665, 1644] +[:mouse_move, 246, 227, 2, 666, 1651] +[:mouse_move, 247, 227, 2, 667, 1654] +[:mouse_move, 248, 228, 2, 668, 1656] +[:mouse_button_pressed, 1, 0, 1, 669, 1675] +[:mouse_button_up, 1, 0, 1, 670, 1679] +[:mouse_move, 250, 235, 2, 671, 1698] +[:mouse_move, 254, 245, 2, 672, 1699] +[:mouse_move, 265, 275, 2, 673, 1700] +[:mouse_move, 274, 296, 2, 674, 1701] +[:mouse_move, 301, 366, 2, 675, 1702] +[:mouse_move, 322, 417, 2, 676, 1703] +[:mouse_move, 346, 474, 2, 677, 1704] +[:mouse_move, 386, 571, 2, 678, 1705] +[:mouse_move, 409, 614, 2, 679, 1706] +[:mouse_move, 417, 626, 2, 680, 1707] +[:mouse_move, 425, 638, 2, 681, 1708] +[:mouse_move, 435, 657, 2, 682, 1710] +[:mouse_move, 437, 662, 2, 683, 1710] +[:mouse_move, 438, 664, 2, 684, 1711] +[:mouse_move, 438, 665, 2, 685, 1712] +[:mouse_move, 438, 666, 2, 686, 1714] +[:mouse_move, 434, 672, 2, 687, 1715] +[:mouse_move, 430, 675, 2, 688, 1716] +[:mouse_move, 429, 678, 2, 689, 1717] +[:mouse_move, 429, 679, 2, 690, 1721] +[:mouse_move, 428, 683, 2, 691, 1722] +[:mouse_move, 424, 694, 2, 692, 1723] +[:mouse_move, 423, 697, 2, 693, 1724] +[:mouse_move, 423, 698, 2, 694, 1725] +[:mouse_move, 424, 698, 2, 695, 1727] +[:mouse_move, 424, 697, 2, 696, 1728] +[:mouse_move, 430, 686, 2, 697, 1729] +[:mouse_move, 430, 679, 2, 698, 1730] +[:mouse_move, 434, 669, 2, 699, 1731] +[:mouse_move, 435, 667, 2, 700, 1732] +[:mouse_move, 435, 664, 2, 701, 1733] +[:mouse_move, 435, 663, 2, 702, 1734] +[:mouse_move, 435, 662, 2, 703, 1735] +[:mouse_move, 435, 661, 2, 704, 1736] +[:mouse_move, 435, 660, 2, 705, 1738] +[:mouse_move, 436, 659, 2, 706, 1739] +[:mouse_move, 436, 658, 2, 707, 1740] +[:mouse_move, 437, 655, 2, 708, 1741] +[:mouse_move, 440, 649, 2, 709, 1742] +[:mouse_move, 440, 648, 2, 710, 1744] +[:mouse_move, 440, 647, 2, 711, 1744] +[:mouse_move, 458, 647, 2, 712, 1761] +[:mouse_move, 473, 647, 2, 713, 1762] +[:mouse_move, 503, 646, 2, 714, 1763] +[:mouse_move, 511, 644, 2, 715, 1764] +[:mouse_move, 512, 644, 2, 716, 1765] +[:mouse_move, 515, 644, 2, 717, 1770] +[:mouse_move, 533, 641, 2, 718, 1771] +[:mouse_move, 546, 641, 2, 719, 1772] +[:mouse_move, 580, 640, 2, 720, 1773] +[:mouse_move, 600, 640, 2, 721, 1774] +[:mouse_move, 643, 639, 2, 722, 1775] +[:mouse_move, 661, 639, 2, 723, 1776] +[:mouse_move, 682, 639, 2, 724, 1777] +[:mouse_move, 690, 639, 2, 725, 1778] +[:mouse_move, 693, 639, 2, 726, 1779] +[:mouse_move, 696, 639, 2, 727, 1783] +[:mouse_move, 697, 639, 2, 728, 1784] +[:mouse_move, 698, 639, 2, 729, 1785] +[:mouse_move, 699, 639, 2, 730, 1786] +[:mouse_move, 702, 641, 2, 731, 1787] +[:mouse_move, 704, 643, 2, 732, 1788] +[:mouse_move, 709, 645, 2, 733, 1789] +[:mouse_move, 712, 645, 2, 734, 1790] +[:mouse_move, 715, 645, 2, 735, 1791] +[:mouse_move, 717, 645, 2, 736, 1792] +[:mouse_move, 721, 645, 2, 737, 1793] +[:mouse_move, 723, 645, 2, 738, 1794] +[:mouse_move, 724, 645, 2, 739, 1795] +[:mouse_move, 730, 645, 2, 740, 1796] +[:mouse_move, 733, 645, 2, 741, 1797] +[:mouse_move, 734, 645, 2, 742, 1798] +[:mouse_button_pressed, 1, 0, 1, 743, 1800] +[:mouse_move, 735, 645, 2, 744, 1801] +[:mouse_button_up, 1, 0, 1, 745, 1804] +[:mouse_move, 735, 644, 2, 746, 1810] +[:mouse_move, 734, 644, 2, 747, 1818] +[:mouse_move, 728, 642, 2, 748, 1820] +[:mouse_move, 719, 637, 2, 749, 1821] +[:mouse_move, 708, 632, 2, 750, 1822] +[:mouse_move, 665, 611, 2, 751, 1823] +[:mouse_move, 623, 591, 2, 752, 1824] +[:mouse_move, 509, 533, 2, 753, 1825] +[:mouse_move, 473, 514, 2, 754, 1826] +[:mouse_move, 453, 502, 2, 755, 1827] +[:mouse_move, 451, 500, 2, 756, 1829] +[:mouse_move, 448, 495, 2, 757, 1829] +[:mouse_move, 440, 482, 2, 758, 1831] +[:mouse_move, 439, 480, 2, 759, 1832] +[:mouse_move, 434, 474, 2, 760, 1833] +[:mouse_move, 430, 469, 2, 761, 1834] +[:mouse_move, 417, 459, 2, 762, 1835] +[:mouse_move, 411, 456, 2, 763, 1836] +[:mouse_move, 399, 452, 2, 764, 1837] +[:mouse_move, 390, 449, 2, 765, 1838] +[:mouse_move, 369, 442, 2, 766, 1839] +[:mouse_move, 362, 440, 2, 767, 1840] +[:mouse_move, 357, 439, 2, 768, 1841] +[:mouse_move, 360, 440, 2, 769, 1848] +[:mouse_move, 362, 441, 2, 770, 1849] +[:mouse_move, 364, 442, 2, 771, 1850] +[:mouse_move, 365, 442, 2, 772, 1854] +[:mouse_move, 365, 443, 2, 773, 1856] +[:mouse_move, 367, 443, 2, 774, 1856] +[:mouse_move, 368, 443, 2, 775, 1858] +[:mouse_move, 370, 443, 2, 776, 1859] +[:mouse_move, 375, 445, 2, 777, 1860] +[:mouse_move, 378, 445, 2, 778, 1861] +[:mouse_move, 381, 445, 2, 779, 1862] +[:mouse_move, 382, 445, 2, 780, 1863] +[:mouse_move, 383, 445, 2, 781, 1865] +[:mouse_move, 383, 444, 2, 782, 1927] +[:mouse_button_pressed, 1, 0, 1, 783, 1936] +[:mouse_move, 377, 443, 2, 784, 1937] +[:mouse_move, 370, 443, 2, 785, 1939] +[:mouse_move, 347, 443, 2, 786, 1940] +[:mouse_move, 331, 444, 2, 787, 1941] +[:mouse_move, 301, 448, 2, 788, 1942] +[:mouse_move, 281, 452, 2, 789, 1943] +[:mouse_move, 239, 461, 2, 790, 1944] +[:mouse_move, 219, 467, 2, 791, 1945] +[:mouse_move, 188, 476, 2, 792, 1946] +[:mouse_move, 179, 482, 2, 793, 1947] +[:mouse_move, 168, 491, 2, 794, 1948] +[:mouse_move, 164, 495, 2, 795, 1949] +[:mouse_move, 160, 499, 2, 796, 1950] +[:mouse_move, 160, 500, 2, 797, 1951] +[:mouse_move, 162, 498, 2, 798, 1961] +[:mouse_move, 165, 496, 2, 799, 1962] +[:mouse_move, 183, 486, 2, 800, 1963] +[:mouse_move, 200, 476, 2, 801, 1964] +[:mouse_move, 281, 430, 2, 802, 1965] +[:mouse_move, 344, 398, 2, 803, 1966] +[:mouse_move, 506, 339, 2, 804, 1967] +[:mouse_move, 596, 318, 2, 805, 1968] +[:mouse_move, 743, 293, 2, 806, 1969] +[:mouse_move, 795, 284, 2, 807, 1970] +[:mouse_move, 874, 275, 2, 808, 1971] +[:mouse_move, 900, 274, 2, 809, 1972] +[:mouse_move, 942, 275, 2, 810, 1973] +[:mouse_move, 959, 278, 2, 811, 1974] +[:mouse_move, 994, 284, 2, 812, 1975] +[:mouse_move, 1008, 288, 2, 813, 1976] +[:mouse_move, 1031, 295, 2, 814, 1976] +[:mouse_move, 1044, 299, 2, 815, 1978] +[:mouse_move, 1068, 310, 2, 816, 1979] +[:mouse_move, 1080, 314, 2, 817, 1980] +[:mouse_move, 1103, 325, 2, 818, 1981] +[:mouse_move, 1110, 328, 2, 819, 1982] +[:mouse_move, 1121, 334, 2, 820, 1983] +[:mouse_move, 1123, 336, 2, 821, 1984] +[:mouse_move, 1126, 338, 2, 822, 1985] +[:mouse_move, 1127, 338, 2, 823, 1986] +[:mouse_move, 1126, 338, 2, 824, 1995] +[:mouse_move, 1112, 335, 2, 825, 1996] +[:mouse_move, 1097, 332, 2, 826, 1997] +[:mouse_move, 1053, 323, 2, 827, 1998] +[:mouse_move, 1020, 317, 2, 828, 1999] +[:mouse_move, 948, 304, 2, 829, 2000] +[:mouse_move, 915, 298, 2, 830, 2001] +[:mouse_move, 832, 290, 2, 831, 2002] +[:mouse_move, 788, 288, 2, 832, 2003] +[:mouse_move, 722, 287, 2, 833, 2004] +[:mouse_move, 691, 291, 2, 834, 2005] +[:mouse_move, 628, 305, 2, 835, 2006] +[:mouse_move, 601, 315, 2, 836, 2007] +[:mouse_move, 557, 333, 2, 837, 2008] +[:mouse_move, 538, 343, 2, 838, 2009] +[:mouse_move, 502, 361, 2, 839, 2010] +[:mouse_move, 486, 372, 2, 840, 2011] +[:mouse_move, 463, 390, 2, 841, 2012] +[:mouse_move, 458, 394, 2, 842, 2013] +[:mouse_move, 458, 396, 2, 843, 2016] +[:mouse_move, 457, 397, 2, 844, 2017] +[:mouse_move, 457, 398, 2, 845, 2018] +[:mouse_move, 457, 399, 2, 846, 2019] +[:mouse_move, 456, 400, 2, 847, 2020] +[:mouse_move, 454, 405, 2, 848, 2021] +[:mouse_move, 454, 406, 2, 849, 2022] +[:mouse_move, 453, 408, 2, 850, 2029] +[:mouse_move, 453, 409, 2, 851, 2030] +[:mouse_move, 450, 413, 2, 852, 2031] +[:mouse_move, 449, 416, 2, 853, 2032] +[:mouse_move, 448, 418, 2, 854, 2033] +[:mouse_button_up, 1, 0, 1, 855, 2054] +[:mouse_move, 449, 416, 2, 856, 2073] +[:mouse_move, 450, 415, 2, 857, 2074] +[:mouse_move, 450, 414, 2, 858, 2075] +[:mouse_move, 449, 412, 2, 859, 2076] +[:mouse_move, 436, 402, 2, 860, 2077] +[:mouse_move, 419, 393, 2, 861, 2078] +[:mouse_move, 337, 363, 2, 862, 2079] +[:mouse_move, 279, 346, 2, 863, 2080] +[:mouse_move, 192, 321, 2, 864, 2081] +[:mouse_move, 175, 315, 2, 865, 2082] +[:mouse_move, 162, 308, 2, 866, 2083] +[:mouse_move, 161, 307, 2, 867, 2084] +[:mouse_move, 157, 306, 2, 868, 2085] +[:mouse_move, 156, 306, 2, 869, 2086] +[:mouse_move, 154, 306, 2, 870, 2087] +[:mouse_move, 154, 305, 2, 871, 2088] +[:mouse_move, 153, 304, 2, 872, 2090] +[:mouse_move, 150, 301, 2, 873, 2091] +[:mouse_move, 148, 300, 2, 874, 2092] +[:mouse_move, 142, 294, 2, 875, 2093] +[:mouse_move, 136, 289, 2, 876, 2094] +[:mouse_move, 125, 277, 2, 877, 2095] +[:mouse_move, 122, 274, 2, 878, 2096] +[:mouse_move, 122, 273, 2, 879, 2097] +[:mouse_move, 122, 272, 2, 880, 2098] +[:mouse_move, 128, 273, 2, 881, 2104] +[:mouse_move, 137, 274, 2, 882, 2105] +[:mouse_move, 166, 275, 2, 883, 2106] +[:mouse_move, 199, 276, 2, 884, 2107] +[:mouse_move, 320, 286, 2, 885, 2108] +[:mouse_move, 394, 295, 2, 886, 2109] +[:mouse_move, 533, 320, 2, 887, 2110] +[:mouse_move, 591, 335, 2, 888, 2111] +[:mouse_move, 645, 351, 2, 889, 2112] +[:mouse_move, 654, 354, 2, 890, 2113] +[:mouse_move, 667, 360, 2, 891, 2114] +[:mouse_move, 675, 365, 2, 892, 2115] +[:mouse_move, 690, 378, 2, 893, 2116] +[:mouse_move, 695, 383, 2, 894, 2117] +[:mouse_move, 699, 389, 2, 895, 2118] +[:mouse_move, 699, 390, 2, 896, 2119] +[:mouse_move, 700, 390, 2, 897, 2120] +[:mouse_move, 692, 387, 2, 898, 2124] +[:mouse_move, 681, 384, 2, 899, 2125] +[:mouse_move, 656, 381, 2, 900, 2126] +[:mouse_move, 650, 381, 2, 901, 2127] +[:mouse_move, 647, 381, 2, 902, 2128] +[:mouse_move, 649, 381, 2, 903, 2137] +[:mouse_move, 650, 382, 2, 904, 2138] +[:mouse_move, 651, 382, 2, 905, 2139] +[:mouse_button_pressed, 1, 0, 1, 906, 2144] +[:mouse_button_up, 1, 0, 1, 907, 2148] +[:mouse_move, 650, 382, 2, 908, 2165] +[:mouse_move, 647, 383, 2, 909, 2166] +[:mouse_move, 643, 384, 2, 910, 2167] +[:mouse_move, 629, 387, 2, 911, 2168] +[:mouse_move, 617, 390, 2, 912, 2169] +[:mouse_move, 587, 395, 2, 913, 2170] +[:mouse_move, 573, 397, 2, 914, 2171] +[:mouse_move, 541, 399, 2, 915, 2172] +[:mouse_move, 524, 401, 2, 916, 2173] +[:mouse_move, 488, 405, 2, 917, 2174] +[:mouse_move, 476, 407, 2, 918, 2175] +[:mouse_move, 465, 409, 2, 919, 2176] +[:mouse_move, 464, 409, 2, 920, 2177] +[:mouse_move, 462, 410, 2, 921, 2178] +[:mouse_move, 461, 410, 2, 922, 2179] +[:mouse_move, 459, 411, 2, 923, 2180] +[:mouse_move, 459, 412, 2, 924, 2186] +[:mouse_move, 459, 413, 2, 925, 2189] +[:mouse_move, 458, 413, 2, 926, 2190] +[:mouse_move, 451, 419, 2, 927, 2191] +[:mouse_move, 449, 421, 2, 928, 2192] +[:mouse_move, 448, 421, 2, 929, 2193] +[:mouse_move, 447, 421, 2, 930, 2194] +[:mouse_move, 445, 422, 2, 931, 2195] +[:mouse_move, 444, 422, 2, 932, 2196] +[:mouse_button_pressed, 1, 0, 1, 933, 2216] +[:mouse_button_up, 1, 0, 1, 934, 2220] +[:mouse_move, 442, 420, 2, 935, 2229] +[:mouse_move, 424, 411, 2, 936, 2230] +[:mouse_move, 406, 403, 2, 937, 2231] +[:mouse_move, 336, 378, 2, 938, 2232] +[:mouse_move, 286, 359, 2, 939, 2233] +[:mouse_move, 225, 334, 2, 940, 2234] +[:mouse_move, 213, 328, 2, 941, 2235] +[:mouse_move, 201, 321, 2, 942, 2236] +[:mouse_move, 198, 318, 2, 943, 2237] +[:mouse_move, 191, 314, 2, 944, 2238] +[:mouse_move, 185, 310, 2, 945, 2239] +[:mouse_move, 179, 305, 2, 946, 2240] +[:mouse_move, 171, 299, 2, 947, 2241] +[:mouse_move, 170, 297, 2, 948, 2242] +[:mouse_move, 170, 295, 2, 949, 2243] +[:mouse_move, 170, 294, 2, 950, 2244] +[:mouse_move, 169, 293, 2, 951, 2245] +[:mouse_move, 169, 291, 2, 952, 2246] +[:mouse_move, 168, 289, 2, 953, 2247] +[:mouse_move, 167, 289, 2, 954, 2248] +[:mouse_move, 167, 287, 2, 955, 2249] +[:mouse_move, 167, 286, 2, 956, 2250] +[:mouse_move, 164, 283, 2, 957, 2251] +[:mouse_move, 160, 279, 2, 958, 2252] +[:mouse_move, 143, 270, 2, 959, 2253] +[:mouse_move, 136, 267, 2, 960, 2254] +[:mouse_move, 130, 265, 2, 961, 2255] +[:mouse_move, 128, 265, 2, 962, 2256] +[:mouse_move, 125, 264, 2, 963, 2257] +[:mouse_move, 123, 263, 2, 964, 2258] +[:mouse_move, 120, 262, 2, 965, 2259] +[:mouse_move, 120, 261, 2, 966, 2260] +[:mouse_move, 120, 260, 2, 967, 2265] +[:mouse_move, 120, 259, 2, 968, 2267] +[:mouse_move, 121, 259, 2, 969, 2268] +[:mouse_move, 122, 259, 2, 970, 2269] +[:mouse_move, 124, 258, 2, 971, 2270] +[:mouse_move, 126, 257, 2, 972, 2271] +[:mouse_move, 130, 256, 2, 973, 2272] +[:mouse_move, 131, 256, 2, 974, 2274] +[:mouse_move, 132, 256, 2, 975, 2275] +[:mouse_button_pressed, 1, 0, 1, 976, 2290] +[:mouse_button_up, 1, 0, 1, 977, 2292] +[:mouse_move, 132, 258, 2, 978, 2305] +[:mouse_move, 133, 262, 2, 979, 2306] +[:mouse_move, 135, 278, 2, 980, 2307] +[:mouse_move, 136, 290, 2, 981, 2308] +[:mouse_move, 143, 325, 2, 982, 2309] +[:mouse_move, 146, 347, 2, 983, 2310] +[:mouse_move, 162, 411, 2, 984, 2311] +[:mouse_move, 173, 445, 2, 985, 2312] +[:mouse_move, 189, 482, 2, 986, 2313] +[:mouse_move, 195, 490, 2, 987, 2314] +[:mouse_move, 198, 492, 2, 988, 2315] +[:key_down_raw, 96, 0, 2, 989, 2426] +[:key_up_raw, 96, 0, 2, 990, 2430] +[:key_down_raw, 13, 0, 2, 991, 2551] diff --git a/samples/07_advanced_audio/01_audio_mixer/sounds/drum.wav b/samples/07_advanced_audio/01_audio_mixer/sounds/drum.wav new file mode 100644 index 0000000..c7bde27 Binary files /dev/null and b/samples/07_advanced_audio/01_audio_mixer/sounds/drum.wav differ diff --git a/samples/07_advanced_audio/01_audio_mixer/sounds/music.ogg b/samples/07_advanced_audio/01_audio_mixer/sounds/music.ogg new file mode 100644 index 0000000..a952191 Binary files /dev/null and b/samples/07_advanced_audio/01_audio_mixer/sounds/music.ogg differ diff --git a/samples/07_advanced_audio/01_audio_mixer/sounds/splash.wav b/samples/07_advanced_audio/01_audio_mixer/sounds/splash.wav new file mode 100644 index 0000000..52a09c2 Binary files /dev/null and b/samples/07_advanced_audio/01_audio_mixer/sounds/splash.wav differ diff --git a/samples/07_advanced_audio/01_audio_mixer/sounds/spring.wav b/samples/07_advanced_audio/01_audio_mixer/sounds/spring.wav new file mode 100644 index 0000000..112f3cc Binary files /dev/null and b/samples/07_advanced_audio/01_audio_mixer/sounds/spring.wav differ diff --git a/samples/07_advanced_audio/01_audio_mixer/sounds/tada.wav b/samples/07_advanced_audio/01_audio_mixer/sounds/tada.wav new file mode 100644 index 0000000..8aa1be3 Binary files /dev/null and b/samples/07_advanced_audio/01_audio_mixer/sounds/tada.wav differ diff --git a/samples/07_advanced_audio/01_audio_mixer/sounds/tink.wav b/samples/07_advanced_audio/01_audio_mixer/sounds/tink.wav new file mode 100644 index 0000000..193cf54 Binary files /dev/null and b/samples/07_advanced_audio/01_audio_mixer/sounds/tink.wav differ diff --git a/samples/07_advanced_audio/02_sound_synthesis/app/main.rb b/samples/07_advanced_audio/02_sound_synthesis/app/main.rb new file mode 100644 index 0000000..af2be9d --- /dev/null +++ b/samples/07_advanced_audio/02_sound_synthesis/app/main.rb @@ -0,0 +1,593 @@ +begin # region: top level tick methods + def tick args + defaults args + render args + input args + process_audio_queue args + end + + def defaults args + args.state.sine_waves ||= {} + args.state.square_waves ||= {} + args.state.saw_tooth_waves ||= {} + args.state.triangle_waves ||= {} + args.state.audio_queue ||= [] + args.state.buttons ||= [ + (frequency_buttons args), + (sine_wave_note_buttons args), + (bell_buttons args), + (square_wave_note_buttons args), + (saw_tooth_wave_note_buttons args), + (triangle_wave_note_buttons args), + ].flatten + end + + def render args + args.outputs.borders << args.state.buttons.map { |b| b[:border] } + args.outputs.labels << args.state.buttons.map { |b| b[:label] } + args.outputs.labels << args.layout + .rect(row: 0, col: 11.5) + .yield_self { |r| r.merge y: r.y + r.h } + .merge(text: "This is a Pro only feature. Click here to watch the YouTube video if you are on the Standard License.", + alignment_enum: 1) + end + + + def input args + args.state.buttons.each do |b| + if args.inputs.mouse.click && (args.inputs.mouse.click.inside_rect? b[:rect]) + parameter_string = (b.slice :frequency, :note, :octave).map { |k, v| "#{k}: #{v}" }.join ", " + args.gtk.notify! "#{b[:method_to_call]} #{parameter_string}" + send b[:method_to_call], args, b + end + end + + if args.inputs.mouse.click && (args.inputs.mouse.click.inside_rect? (args.layout.rect(row: 0).yield_self { |r| r.merge y: r.y + r.h.half, h: r.h.half })) + args.gtk.openurl 'https://www.youtube.com/watch?v=zEzovM5jT-k&ab_channel=AmirRajan' + end + end + + def process_audio_queue args + to_queue = args.state.audio_queue.find_all { |v| v[:queue_at] <= args.tick_count } + args.state.audio_queue -= to_queue + to_queue.each { |a| args.audio[a[:id]] = a } + + args.audio.find_all { |k, v| v[:decay_rate] } + .each { |k, v| v[:gain] -= v[:decay_rate] } + + sounds_to_stop = args.audio + .find_all { |k, v| v[:stop_at] && args.state.tick_count >= v[:stop_at] } + .map { |k, v| k } + + sounds_to_stop.each { |k| args.audio.delete k } + end +end + +begin # region: button definitions, ui layout, callback functions + def button args, opts + button_def = opts.merge rect: (args.layout.rect (opts.merge w: 2, h: 1)) + + button_def[:border] = button_def[:rect].merge r: 0, g: 0, b: 0 + + label_offset_x = 5 + label_offset_y = 30 + + button_def[:label] = button_def[:rect].merge text: opts[:text], + size_enum: -2.5, + x: button_def[:rect].x + label_offset_x, + y: button_def[:rect].y + label_offset_y + + button_def + end + + def play_sine_wave args, sender + queue_sine_wave args, + frequency: sender[:frequency], + duration: 1.seconds, + fade_out: true + end + + def play_note args, sender + method_to_call = :queue_sine_wave + method_to_call = :queue_square_wave if sender[:type] == :square + method_to_call = :queue_saw_tooth_wave if sender[:type] == :saw_tooth + method_to_call = :queue_triangle_wave if sender[:type] == :triangle + method_to_call = :queue_bell if sender[:type] == :bell + + send method_to_call, args, + frequency: (frequency_for note: sender[:note], octave: sender[:octave]), + duration: 1.seconds, + fade_out: true + end + + def frequency_buttons args + [ + (button args, + row: 4.0, col: 0, text: "300hz", + frequency: 300, + method_to_call: :play_sine_wave), + (button args, + row: 5.0, col: 0, text: "400hz", + frequency: 400, + method_to_call: :play_sine_wave), + (button args, + row: 6.0, col: 0, text: "500hz", + frequency: 500, + method_to_call: :play_sine_wave), + ] + end + + def sine_wave_note_buttons args + [ + (button args, + row: 1.5, col: 2, text: "Sine C4", + note: :c, octave: 4, type: :sine, method_to_call: :play_note), + (button args, + row: 2.5, col: 2, text: "Sine D4", + note: :d, octave: 4, type: :sine, method_to_call: :play_note), + (button args, + row: 3.5, col: 2, text: "Sine E4", + note: :e, octave: 4, type: :sine, method_to_call: :play_note), + (button args, + row: 4.5, col: 2, text: "Sine F4", + note: :f, octave: 4, type: :sine, method_to_call: :play_note), + (button args, + row: 5.5, col: 2, text: "Sine G4", + note: :g, octave: 4, type: :sine, method_to_call: :play_note), + (button args, + row: 6.5, col: 2, text: "Sine A5", + note: :a, octave: 5, type: :sine, method_to_call: :play_note), + (button args, + row: 7.5, col: 2, text: "Sine B5", + note: :b, octave: 5, type: :sine, method_to_call: :play_note), + (button args, + row: 8.5, col: 2, text: "Sine C5", + note: :c, octave: 5, type: :sine, method_to_call: :play_note), + ] + end + + def square_wave_note_buttons args + [ + (button args, + row: 1.5, col: 6, text: "Square C4", + note: :c, octave: 4, type: :square, method_to_call: :play_note), + (button args, + row: 2.5, col: 6, text: "Square D4", + note: :d, octave: 4, type: :square, method_to_call: :play_note), + (button args, + row: 3.5, col: 6, text: "Square E4", + note: :e, octave: 4, type: :square, method_to_call: :play_note), + (button args, + row: 4.5, col: 6, text: "Square F4", + note: :f, octave: 4, type: :square, method_to_call: :play_note), + (button args, + row: 5.5, col: 6, text: "Square G4", + note: :g, octave: 4, type: :square, method_to_call: :play_note), + (button args, + row: 6.5, col: 6, text: "Square A5", + note: :a, octave: 5, type: :square, method_to_call: :play_note), + (button args, + row: 7.5, col: 6, text: "Square B5", + note: :b, octave: 5, type: :square, method_to_call: :play_note), + (button args, + row: 8.5, col: 6, text: "Square C5", + note: :c, octave: 5, type: :square, method_to_call: :play_note), + ] + end + def saw_tooth_wave_note_buttons args + [ + (button args, + row: 1.5, col: 8, text: "Saw C4", + note: :c, octave: 4, type: :saw_tooth, method_to_call: :play_note), + (button args, + row: 2.5, col: 8, text: "Saw D4", + note: :d, octave: 4, type: :saw_tooth, method_to_call: :play_note), + (button args, + row: 3.5, col: 8, text: "Saw E4", + note: :e, octave: 4, type: :saw_tooth, method_to_call: :play_note), + (button args, + row: 4.5, col: 8, text: "Saw F4", + note: :f, octave: 4, type: :saw_tooth, method_to_call: :play_note), + (button args, + row: 5.5, col: 8, text: "Saw G4", + note: :g, octave: 4, type: :saw_tooth, method_to_call: :play_note), + (button args, + row: 6.5, col: 8, text: "Saw A5", + note: :a, octave: 5, type: :saw_tooth, method_to_call: :play_note), + (button args, + row: 7.5, col: 8, text: "Saw B5", + note: :b, octave: 5, type: :saw_tooth, method_to_call: :play_note), + (button args, + row: 8.5, col: 8, text: "Saw C5", + note: :c, octave: 5, type: :saw_tooth, method_to_call: :play_note), + ] + end + + def triangle_wave_note_buttons args + [ + (button args, + row: 1.5, col: 10, text: "Triangle C4", + note: :c, octave: 4, type: :triangle, method_to_call: :play_note), + (button args, + row: 2.5, col: 10, text: "Triangle D4", + note: :d, octave: 4, type: :triangle, method_to_call: :play_note), + (button args, + row: 3.5, col: 10, text: "Triangle E4", + note: :e, octave: 4, type: :triangle, method_to_call: :play_note), + (button args, + row: 4.5, col: 10, text: "Triangle F4", + note: :f, octave: 4, type: :triangle, method_to_call: :play_note), + (button args, + row: 5.5, col: 10, text: "Triangle G4", + note: :g, octave: 4, type: :triangle, method_to_call: :play_note), + (button args, + row: 6.5, col: 10, text: "Triangle A5", + note: :a, octave: 5, type: :triangle, method_to_call: :play_note), + (button args, + row: 7.5, col: 10, text: "Triangle B5", + note: :b, octave: 5, type: :triangle, method_to_call: :play_note), + (button args, + row: 8.5, col: 10, text: "Triangle C5", + note: :c, octave: 5, type: :triangle, method_to_call: :play_note), + ] + end + + def bell_buttons args + [ + (button args, + row: 1.5, col: 4, text: "Bell C4", + note: :c, octave: 4, type: :bell, method_to_call: :play_note), + (button args, + row: 2.5, col: 4, text: "Bell D4", + note: :d, octave: 4, type: :bell, method_to_call: :play_note), + (button args, + row: 3.5, col: 4, text: "Bell E4", + note: :e, octave: 4, type: :bell, method_to_call: :play_note), + (button args, + row: 4.5, col: 4, text: "Bell F4", + note: :f, octave: 4, type: :bell, method_to_call: :play_note), + (button args, + row: 5.5, col: 4, text: "Bell G4", + note: :g, octave: 4, type: :bell, method_to_call: :play_note), + (button args, + row: 6.5, col: 4, text: "Bell A5", + note: :a, octave: 5, type: :bell, method_to_call: :play_note), + (button args, + row: 7.5, col: 4, text: "Bell B5", + note: :b, octave: 5, type: :bell, method_to_call: :play_note), + (button args, + row: 8.5, col: 4, text: "Bell C5", + note: :c, octave: 5, type: :bell, method_to_call: :play_note), + ] + end +end + +begin # region: wave generation + begin # sine wave + def defaults_sine_wave_for + { frequency: 440, sample_rate: 48000 } + end + + def sine_wave_for opts = {} + opts = defaults_sine_wave_for.merge opts + frequency = opts[:frequency] + sample_rate = opts[:sample_rate] + period_size = (sample_rate.fdiv frequency).ceil + period_size.map_with_index do |i| + Math::sin((2.0 * Math::PI) / (sample_rate.to_f / frequency.to_f) * i) + end.to_a + end + + def defaults_queue_sine_wave + { frequency: 440, duration: 60, gain: 1.0, fade_out: false, queue_in: 0 } + end + + def queue_sine_wave args, opts = {} + opts = defaults_queue_sine_wave.merge opts + frequency = opts[:frequency] + sample_rate = 48000 + + sine_wave = sine_wave_for frequency: frequency, sample_rate: sample_rate + args.state.sine_waves[frequency] ||= sine_wave_for frequency: frequency, sample_rate: sample_rate + + proc = lambda do + generate_audio_data args.state.sine_waves[frequency], sample_rate + end + + audio_state = new_audio_state args, opts + audio_state[:input] = [1, sample_rate, proc] + queue_audio args, audio_state: audio_state, wave: sine_wave + end + end + + begin # region: square wave + def defaults_square_wave_for + { frequency: 440, sample_rate: 48000 } + end + + def square_wave_for opts = {} + opts = defaults_square_wave_for.merge opts + sine_wave = sine_wave_for opts + sine_wave.map do |v| + if v >= 0 + 1.0 + else + -1.0 + end + end.to_a + end + + def defaults_queue_square_wave + { frequency: 440, duration: 60, gain: 0.3, fade_out: false, queue_in: 0 } + end + + def queue_square_wave args, opts = {} + opts = defaults_queue_square_wave.merge opts + frequency = opts[:frequency] + sample_rate = 48000 + + square_wave = square_wave_for frequency: frequency, sample_rate: sample_rate + args.state.square_waves[frequency] ||= square_wave_for frequency: frequency, sample_rate: sample_rate + + proc = lambda do + generate_audio_data args.state.square_waves[frequency], sample_rate + end + + audio_state = new_audio_state args, opts + audio_state[:input] = [1, sample_rate, proc] + queue_audio args, audio_state: audio_state, wave: square_wave + end + end + + begin # region: saw tooth wave + def defaults_saw_tooth_wave_for + { frequency: 440, sample_rate: 48000 } + end + + def saw_tooth_wave_for opts = {} + opts = defaults_saw_tooth_wave_for.merge opts + sine_wave = sine_wave_for opts + period_size = sine_wave.length + sine_wave.map_with_index do |v, i| + (((i % period_size).fdiv period_size) * 2) - 1 + end + end + + def defaults_queue_saw_tooth_wave + { frequency: 440, duration: 60, gain: 0.3, fade_out: false, queue_in: 0 } + end + + def queue_saw_tooth_wave args, opts = {} + opts = defaults_queue_saw_tooth_wave.merge opts + frequency = opts[:frequency] + sample_rate = 48000 + + saw_tooth_wave = saw_tooth_wave_for frequency: frequency, sample_rate: sample_rate + args.state.saw_tooth_waves[frequency] ||= saw_tooth_wave_for frequency: frequency, sample_rate: sample_rate + + proc = lambda do + generate_audio_data args.state.saw_tooth_waves[frequency], sample_rate + end + + audio_state = new_audio_state args, opts + audio_state[:input] = [1, sample_rate, proc] + queue_audio args, audio_state: audio_state, wave: saw_tooth_wave + end + end + + begin # region: triangle wave + def defaults_triangle_wave_for + { frequency: 440, sample_rate: 48000 } + end + + def triangle_wave_for opts = {} + opts = defaults_saw_tooth_wave_for.merge opts + sine_wave = sine_wave_for opts + period_size = sine_wave.length + sine_wave.map_with_index do |v, i| + ratio = (i.fdiv period_size) + if ratio <= 0.5 + (ratio * 4) - 1 + else + ratio -= 0.5 + 1 - (ratio * 4) + end + end + end + + def defaults_queue_triangle_wave + { frequency: 440, duration: 60, gain: 1.0, fade_out: false, queue_in: 0 } + end + + def queue_triangle_wave args, opts = {} + opts = defaults_queue_triangle_wave.merge opts + frequency = opts[:frequency] + sample_rate = 48000 + + triangle_wave = triangle_wave_for frequency: frequency, sample_rate: sample_rate + args.state.triangle_waves[frequency] ||= triangle_wave_for frequency: frequency, sample_rate: sample_rate + + proc = lambda do + generate_audio_data args.state.triangle_waves[frequency], sample_rate + end + + audio_state = new_audio_state args, opts + audio_state[:input] = [1, sample_rate, proc] + queue_audio args, audio_state: audio_state, wave: triangle_wave + end + end + + begin # region: bell + def defaults_queue_bell + { frequency: 440, duration: 1.seconds, queue_in: 0 } + end + + def queue_bell args, opts = {} + (bell_to_sine_waves (defaults_queue_bell.merge opts)).each { |b| queue_sine_wave args, b } + end + + def bell_harmonics + [ + { frequency_ratio: 0.5, duration_ratio: 1.00 }, + { frequency_ratio: 1.0, duration_ratio: 0.80 }, + { frequency_ratio: 2.0, duration_ratio: 0.60 }, + { frequency_ratio: 3.0, duration_ratio: 0.40 }, + { frequency_ratio: 4.2, duration_ratio: 0.25 }, + { frequency_ratio: 5.4, duration_ratio: 0.20 }, + { frequency_ratio: 6.8, duration_ratio: 0.15 } + ] + end + + def defaults_bell_to_sine_waves + { frequency: 440, duration: 1.seconds, queue_in: 0 } + end + + def bell_to_sine_waves opts = {} + opts = defaults_bell_to_sine_waves.merge opts + bell_harmonics.map do |b| + { + frequency: opts[:frequency] * b[:frequency_ratio], + duration: opts[:duration] * b[:duration_ratio], + queue_in: opts[:queue_in], + gain: (1.fdiv bell_harmonics.length), + fade_out: true + } + end + end + end + + begin # audio entity construction + def generate_audio_data sine_wave, sample_rate + sample_size = (sample_rate.fdiv (1000.fdiv 60)).ceil + copy_count = (sample_size.fdiv sine_wave.length).ceil + sine_wave * copy_count + end + + def defaults_new_audio_state + { frequency: 440, duration: 60, gain: 1.0, fade_out: false, queue_in: 0 } + end + + def new_audio_state args, opts = {} + opts = defaults_new_audio_state.merge opts + decay_rate = 0 + decay_rate = 1.fdiv(opts[:duration]) * opts[:gain] if opts[:fade_out] + frequency = opts[:frequency] + sample_rate = 48000 + + { + id: (new_id! args), + frequency: frequency, + sample_rate: 48000, + stop_at: args.tick_count + opts[:queue_in] + opts[:duration], + gain: opts[:gain].to_f, + queue_at: args.state.tick_count + opts[:queue_in], + decay_rate: decay_rate, + pitch: 1.0, + looping: true, + paused: false + } + end + + def queue_audio args, opts = {} + graph_wave args, opts[:wave], opts[:audio_state][:frequency] + args.state.audio_queue << opts[:audio_state] + end + + def new_id! args + args.state.audio_id ||= 0 + args.state.audio_id += 1 + end + + def graph_wave args, wave, frequency + if args.state.tick_count != args.state.graphed_at + args.outputs.static_lines.clear + args.outputs.static_sprites.clear + end + + wave = wave + + r, g, b = frequency.to_i % 85, + frequency.to_i % 170, + frequency.to_i % 255 + + starting_rect = args.layout.rect(row: 5, col: 13) + x_scale = 10 + y_scale = 100 + max_points = 25 + + points = wave + if wave.length > max_points + resolution = wave.length.idiv max_points + points = wave.find_all.with_index { |y, i| (i % resolution == 0) } + end + + args.outputs.static_lines << points.map_with_index do |y, x| + next_y = points[x + 1] + + if next_y + { + x: starting_rect.x + (x * x_scale), + y: starting_rect.y + starting_rect.h.half + y_scale * y, + x2: starting_rect.x + ((x + 1) * x_scale), + y2: starting_rect.y + starting_rect.h.half + y_scale * next_y, + r: r, + g: g, + b: b + } + end + end + + args.outputs.static_sprites << points.map_with_index do |y, x| + { + x: (starting_rect.x + (x * x_scale)) - 2, + y: (starting_rect.y + starting_rect.h.half + y_scale * y) - 2, + w: 4, + h: 4, + path: 'sprites/square-white.png', + r: r, + g: g, + b: b + } + end + + args.state.graphed_at = args.state.tick_count + end + end + + begin # region: musical note mapping + def defaults_frequency_for + { note: :a, octave: 5, sharp: false, flat: false } + end + + def frequency_for opts = {} + opts = defaults_frequency_for.merge opts + octave_offset_multiplier = opts[:octave] - 5 + note = note_frequencies_octave_5[opts[:note]] + if octave_offset_multiplier < 0 + note = note * 1 / (octave_offset_multiplier.abs + 1) + elsif octave_offset_multiplier > 0 + note = note * (octave_offset_multiplier.abs + 1) / 1 + end + note + end + + def note_frequencies_octave_5 + { + a: 440.0, + a_sharp: 466.16, b_flat: 466.16, + b: 493.88, + c: 523.25, + c_sharp: 554.37, d_flat: 587.33, + d: 587.33, + d_sharp: 622.25, e_flat: 659.25, + e: 659.25, + f: 698.25, + f_sharp: 739.99, g_flat: 739.99, + g: 783.99, + g_sharp: 830.61, a_flat: 830.61 + } + end + end +end + +$gtk.reset diff --git a/samples/07_advanced_audio/02_sound_synthesis/license-for-sample.txt b/samples/07_advanced_audio/02_sound_synthesis/license-for-sample.txt new file mode 100644 index 0000000..100dcec --- /dev/null +++ b/samples/07_advanced_audio/02_sound_synthesis/license-for-sample.txt @@ -0,0 +1,9 @@ +Copyright 2019 DragonRuby LLC + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/samples/07_advanced_audio/02_sound_synthesis/metadata/game_metadata.txt b/samples/07_advanced_audio/02_sound_synthesis/metadata/game_metadata.txt new file mode 100644 index 0000000..16cef1d --- /dev/null +++ b/samples/07_advanced_audio/02_sound_synthesis/metadata/game_metadata.txt @@ -0,0 +1,6 @@ +devid=amirrajan +devtitle=Amir Rajan +gameid=hello-world +gametitle=Hello World +version=1.0 +icon=metadata/icon.png diff --git a/samples/07_advanced_audio/02_sound_synthesis/metadata/icon.png b/samples/07_advanced_audio/02_sound_synthesis/metadata/icon.png new file mode 100644 index 0000000..e20e8c2 Binary files /dev/null and b/samples/07_advanced_audio/02_sound_synthesis/metadata/icon.png differ diff --git a/samples/07_advanced_audio/02_sound_synthesis/replay.txt b/samples/07_advanced_audio/02_sound_synthesis/replay.txt new file mode 100644 index 0000000..0d7c6d5 --- /dev/null +++ b/samples/07_advanced_audio/02_sound_synthesis/replay.txt @@ -0,0 +1,237 @@ +replay_version 2.0 +stopped_at 425 +seed 100 +recorded_at Sat Jul 17 09:17:17 2021 +[:mouse_button_up, 1, 0, 1, 1, 4] +[:mouse_move, 790, 90, 2, 2, 31] +[:mouse_move, 781, 91, 2, 3, 32] +[:mouse_move, 753, 101, 2, 4, 33] +[:mouse_move, 737, 106, 2, 5, 34] +[:mouse_move, 716, 109, 2, 6, 35] +[:mouse_move, 633, 122, 2, 7, 36] +[:mouse_move, 583, 132, 2, 8, 37] +[:mouse_move, 489, 167, 2, 9, 38] +[:mouse_move, 443, 189, 2, 10, 39] +[:mouse_move, 356, 237, 2, 11, 40] +[:mouse_move, 330, 255, 2, 12, 41] +[:mouse_move, 307, 276, 2, 13, 42] +[:mouse_move, 300, 282, 2, 14, 43] +[:mouse_move, 285, 293, 2, 15, 43] +[:mouse_move, 271, 298, 2, 16, 44] +[:mouse_move, 222, 308, 2, 17, 45] +[:mouse_move, 178, 314, 2, 18, 46] +[:mouse_move, 104, 327, 2, 19, 47] +[:mouse_move, 82, 331, 2, 20, 48] +[:mouse_move, 55, 332, 2, 21, 49] +[:mouse_move, 47, 330, 2, 22, 50] +[:mouse_move, 41, 325, 2, 23, 51] +[:mouse_move, 38, 322, 2, 24, 52] +[:mouse_move, 35, 315, 2, 25, 53] +[:mouse_move, 33, 312, 2, 26, 54] +[:mouse_move, 35, 299, 2, 27, 55] +[:mouse_move, 37, 290, 2, 28, 56] +[:mouse_move, 43, 277, 2, 29, 57] +[:mouse_move, 47, 271, 2, 30, 58] +[:mouse_move, 54, 262, 2, 31, 59] +[:mouse_move, 61, 256, 2, 32, 60] +[:mouse_move, 71, 247, 2, 33, 61] +[:mouse_move, 90, 231, 2, 34, 62] +[:mouse_move, 103, 223, 2, 35, 63] +[:mouse_move, 128, 209, 2, 36, 64] +[:mouse_move, 138, 205, 2, 37, 65] +[:mouse_move, 157, 194, 2, 38, 66] +[:mouse_move, 168, 186, 2, 39, 67] +[:mouse_move, 187, 169, 2, 40, 68] +[:mouse_move, 193, 163, 2, 41, 69] +[:mouse_move, 197, 157, 2, 42, 70] +[:mouse_move, 199, 154, 2, 43, 71] +[:mouse_move, 202, 148, 2, 44, 72] +[:mouse_move, 204, 143, 2, 45, 73] +[:mouse_move, 206, 139, 2, 46, 74] +[:mouse_move, 204, 142, 2, 47, 82] +[:mouse_move, 203, 145, 2, 48, 83] +[:mouse_move, 194, 152, 2, 49, 84] +[:mouse_move, 189, 157, 2, 50, 85] +[:mouse_move, 169, 172, 2, 51, 86] +[:mouse_move, 155, 185, 2, 52, 87] +[:mouse_move, 128, 217, 2, 53, 88] +[:mouse_move, 119, 232, 2, 54, 89] +[:mouse_move, 112, 243, 2, 55, 90] +[:mouse_move, 106, 255, 2, 56, 91] +[:mouse_move, 104, 258, 2, 57, 92] +[:mouse_move, 102, 262, 2, 58, 93] +[:mouse_move, 101, 265, 2, 59, 94] +[:mouse_move, 96, 272, 2, 60, 95] +[:mouse_move, 95, 273, 2, 61, 96] +[:mouse_move, 93, 274, 2, 62, 100] +[:mouse_move, 85, 277, 2, 63, 101] +[:mouse_move, 84, 277, 2, 64, 102] +[:mouse_move, 83, 277, 2, 65, 103] +[:mouse_button_pressed, 1, 0, 1, 66, 106] +[:mouse_button_up, 1, 0, 1, 67, 112] +[:mouse_move, 83, 278, 2, 68, 113] +[:mouse_move, 84, 285, 2, 69, 114] +[:mouse_move, 82, 292, 2, 70, 116] +[:mouse_move, 78, 309, 2, 71, 117] +[:mouse_move, 76, 318, 2, 72, 118] +[:mouse_move, 76, 326, 2, 73, 119] +[:mouse_move, 76, 333, 2, 74, 120] +[:mouse_move, 75, 336, 2, 75, 122] +[:mouse_move, 73, 344, 2, 76, 123] +[:mouse_move, 71, 347, 2, 77, 124] +[:mouse_move, 70, 349, 2, 78, 125] +[:mouse_button_pressed, 1, 0, 1, 79, 131] +[:mouse_button_up, 1, 0, 1, 80, 136] +[:mouse_move, 70, 350, 2, 81, 142] +[:mouse_move, 70, 353, 2, 82, 143] +[:mouse_move, 68, 362, 2, 83, 144] +[:mouse_move, 68, 367, 2, 84, 145] +[:mouse_move, 67, 370, 2, 85, 146] +[:mouse_move, 66, 376, 2, 86, 147] +[:mouse_move, 66, 379, 2, 87, 148] +[:mouse_move, 65, 385, 2, 88, 149] +[:mouse_move, 65, 387, 2, 89, 150] +[:mouse_move, 66, 387, 2, 90, 151] +[:mouse_button_pressed, 1, 0, 1, 91, 155] +[:mouse_button_up, 1, 0, 1, 92, 160] +[:mouse_move, 68, 386, 2, 93, 160] +[:mouse_move, 84, 365, 2, 94, 161] +[:mouse_move, 99, 342, 2, 95, 162] +[:mouse_move, 142, 284, 2, 96, 163] +[:mouse_move, 159, 260, 2, 97, 164] +[:mouse_move, 181, 220, 2, 98, 165] +[:mouse_move, 189, 189, 2, 99, 167] +[:mouse_move, 190, 177, 2, 100, 168] +[:mouse_move, 190, 167, 2, 101, 169] +[:mouse_move, 192, 149, 2, 102, 170] +[:mouse_move, 192, 147, 2, 103, 171] +[:mouse_move, 190, 152, 2, 104, 178] +[:mouse_move, 187, 157, 2, 105, 179] +[:mouse_move, 184, 168, 2, 106, 180] +[:mouse_move, 183, 171, 2, 107, 181] +[:mouse_move, 183, 173, 2, 108, 182] +[:mouse_move, 183, 172, 2, 109, 186] +[:mouse_move, 184, 172, 2, 110, 187] +[:mouse_move, 184, 171, 2, 111, 188] +[:mouse_move, 185, 168, 2, 112, 189] +[:mouse_move, 187, 163, 2, 113, 190] +[:mouse_move, 188, 160, 2, 114, 191] +[:mouse_move, 188, 159, 2, 115, 192] +[:mouse_button_pressed, 1, 0, 1, 116, 193] +[:mouse_button_up, 1, 0, 1, 117, 198] +[:mouse_move, 189, 159, 2, 118, 198] +[:mouse_move, 195, 163, 2, 119, 200] +[:mouse_move, 202, 167, 2, 120, 201] +[:mouse_move, 214, 173, 2, 121, 202] +[:mouse_move, 240, 187, 2, 122, 203] +[:mouse_move, 251, 194, 2, 123, 204] +[:mouse_move, 269, 205, 2, 124, 205] +[:mouse_move, 277, 210, 2, 125, 206] +[:mouse_move, 290, 216, 2, 126, 207] +[:mouse_move, 291, 217, 2, 127, 208] +[:mouse_button_pressed, 1, 0, 1, 128, 217] +[:mouse_button_up, 1, 0, 1, 129, 219] +[:mouse_move, 292, 217, 2, 130, 220] +[:mouse_move, 298, 222, 2, 131, 220] +[:mouse_move, 306, 226, 2, 132, 221] +[:mouse_move, 322, 234, 2, 133, 221] +[:mouse_move, 330, 238, 2, 134, 221] +[:mouse_move, 338, 241, 2, 135, 222] +[:mouse_move, 351, 244, 2, 136, 222] +[:mouse_move, 359, 246, 2, 137, 223] +[:mouse_move, 374, 251, 2, 138, 223] +[:mouse_move, 382, 253, 2, 139, 223] +[:mouse_move, 392, 256, 2, 140, 224] +[:mouse_move, 393, 256, 2, 141, 224] +[:mouse_button_pressed, 1, 0, 1, 142, 227] +[:mouse_button_up, 1, 0, 1, 143, 232] +[:mouse_move, 402, 262, 2, 144, 235] +[:mouse_move, 410, 268, 2, 145, 236] +[:mouse_move, 431, 279, 2, 146, 237] +[:mouse_move, 440, 283, 2, 147, 238] +[:mouse_move, 448, 287, 2, 148, 239] +[:mouse_move, 458, 292, 2, 149, 240] +[:mouse_move, 463, 295, 2, 150, 242] +[:mouse_move, 471, 299, 2, 151, 243] +[:mouse_move, 474, 301, 2, 152, 244] +[:mouse_move, 478, 302, 2, 153, 245] +[:mouse_button_pressed, 1, 0, 1, 154, 253] +[:mouse_button_up, 1, 0, 1, 155, 259] +[:mouse_move, 479, 303, 2, 156, 259] +[:mouse_move, 484, 307, 2, 157, 260] +[:mouse_move, 504, 321, 2, 158, 261] +[:mouse_move, 516, 329, 2, 159, 262] +[:mouse_move, 538, 342, 2, 160, 263] +[:mouse_move, 546, 345, 2, 161, 264] +[:mouse_move, 555, 349, 2, 162, 265] +[:mouse_move, 558, 350, 2, 163, 267] +[:mouse_move, 560, 351, 2, 164, 268] +[:mouse_move, 561, 351, 2, 165, 270] +[:mouse_move, 562, 351, 2, 166, 271] +[:mouse_move, 563, 351, 2, 167, 273] +[:mouse_move, 564, 351, 2, 168, 274] +[:mouse_move, 565, 352, 2, 169, 278] +[:mouse_button_pressed, 1, 0, 1, 170, 281] +[:mouse_button_up, 1, 0, 1, 171, 287] +[:mouse_move, 563, 358, 2, 172, 287] +[:mouse_move, 559, 363, 2, 173, 288] +[:mouse_move, 553, 371, 2, 174, 289] +[:mouse_move, 550, 375, 2, 175, 291] +[:mouse_move, 543, 381, 2, 176, 292] +[:mouse_move, 539, 384, 2, 177, 293] +[:mouse_move, 529, 389, 2, 178, 294] +[:mouse_move, 523, 393, 2, 179, 295] +[:mouse_move, 503, 402, 2, 180, 296] +[:mouse_move, 494, 405, 2, 181, 299] +[:mouse_move, 493, 406, 2, 182, 301] +[:mouse_move, 492, 406, 2, 183, 302] +[:mouse_button_pressed, 1, 0, 1, 184, 307] +[:mouse_button_up, 1, 0, 1, 185, 312] +[:mouse_move, 483, 413, 2, 186, 314] +[:mouse_move, 476, 417, 2, 187, 315] +[:mouse_move, 460, 424, 2, 188, 316] +[:mouse_move, 452, 427, 2, 189, 317] +[:mouse_move, 433, 433, 2, 190, 318] +[:mouse_move, 423, 436, 2, 191, 320] +[:mouse_move, 404, 443, 2, 192, 321] +[:mouse_move, 396, 448, 2, 193, 322] +[:mouse_move, 386, 453, 2, 194, 323] +[:mouse_move, 383, 454, 2, 195, 324] +[:mouse_move, 374, 456, 2, 196, 325] +[:mouse_move, 369, 457, 2, 197, 327] +[:mouse_move, 365, 458, 2, 198, 328] +[:mouse_button_pressed, 1, 0, 1, 199, 334] +[:mouse_button_up, 1, 0, 1, 200, 341] +[:mouse_move, 364, 460, 2, 201, 343] +[:mouse_move, 364, 461, 2, 202, 344] +[:mouse_move, 359, 465, 2, 203, 345] +[:mouse_move, 352, 467, 2, 204, 346] +[:mouse_move, 341, 471, 2, 205, 347] +[:mouse_move, 336, 473, 2, 206, 348] +[:mouse_move, 324, 478, 2, 207, 349] +[:mouse_move, 316, 482, 2, 208, 351] +[:mouse_move, 297, 491, 2, 209, 352] +[:mouse_move, 288, 494, 2, 210, 353] +[:mouse_move, 278, 498, 2, 211, 354] +[:mouse_move, 274, 499, 2, 212, 355] +[:mouse_move, 270, 502, 2, 213, 356] +[:mouse_move, 269, 502, 2, 214, 357] +[:mouse_move, 269, 503, 2, 215, 358] +[:mouse_move, 268, 503, 2, 216, 359] +[:mouse_move, 266, 505, 2, 217, 360] +[:mouse_move, 266, 506, 2, 218, 362] +[:mouse_move, 265, 506, 2, 219, 364] +[:mouse_move, 265, 507, 2, 220, 365] +[:mouse_move, 265, 508, 2, 221, 367] +[:mouse_button_pressed, 1, 0, 1, 222, 370] +[:mouse_button_up, 1, 0, 1, 223, 372] +[:mouse_move, 266, 508, 2, 224, 375] +[:mouse_move, 267, 508, 2, 225, 382] +[:mouse_move, 268, 508, 2, 226, 383] +[:mouse_move, 270, 509, 2, 227, 383] +[:mouse_move, 271, 509, 2, 228, 385] +[:mouse_move, 272, 509, 2, 229, 385] +[:key_down_raw, 96, 0, 2, 230, 386] +[:mouse_move, 272, 508, 2, 231, 386] +[:key_up_raw, 96, 0, 2, 232, 388] +[:key_down_raw, 13, 0, 2, 233, 425] diff --git a/samples/07_advanced_audio/02_sound_synthesis/sprites/square-white.png b/samples/07_advanced_audio/02_sound_synthesis/sprites/square-white.png new file mode 100644 index 0000000..378c565 Binary files /dev/null and b/samples/07_advanced_audio/02_sound_synthesis/sprites/square-white.png differ diff --git a/samples/07_advanced_rendering/02_render_targets_with_alphas/app/main.rb b/samples/07_advanced_rendering/02_render_targets_with_alphas/app/main.rb deleted file mode 100644 index 2caec43..0000000 --- a/samples/07_advanced_rendering/02_render_targets_with_alphas/app/main.rb +++ /dev/null @@ -1,95 +0,0 @@ -# This sample is meant to show you how to do that dripping transition thing -# at the start of the original Doom. Most of this file is here to animate -# a scene to wipe away; the actual wipe effect is in the last 20 lines or -# so. - -$gtk.reset # reset all game state if reloaded. - -def circle_of_blocks pass, xoffset, yoffset, angleoffset, blocksize, distance - numblocks = 10 - - for i in 1..numblocks do - angle = ((360 / numblocks) * i) + angleoffset - radians = angle * (Math::PI / 180) - x = (xoffset + (distance * Math.cos(radians))).round - y = (yoffset + (distance * Math.sin(radians))).round - pass.solids << [ x, y, blocksize, blocksize, 255, 255, 0 ] - end -end - -def draw_scene args, pass - pass.solids << [0, 360, 1280, 360, 0, 0, 200] - pass.solids << [0, 0, 1280, 360, 0, 127, 0] - - blocksize = 100 - angleoffset = args.state.tick_count * 2.5 - centerx = (1280 - blocksize) / 2 - centery = (720 - blocksize) / 2 - - circle_of_blocks pass, centerx, centery, angleoffset, blocksize * 2, 500 - circle_of_blocks pass, centerx, centery, angleoffset, blocksize, 325 - circle_of_blocks pass, centerx, centery, angleoffset, blocksize / 2, 200 - circle_of_blocks pass, centerx, centery, angleoffset, blocksize / 4, 100 -end - -def tick args - segments = 160 - - # On the first tick, initialize some stuff. - if !args.state.yoffsets - args.state.baseyoff = 0 - args.state.yoffsets = [] - for i in 0..segments do - args.state.yoffsets << rand * 100 - end - end - - # Just draw some random stuff for a few seconds. - args.state.static_debounce ||= 60 * 2.5 - if args.state.static_debounce > 0 - last_frame = args.state.static_debounce == 1 - target = last_frame ? args.render_target(:last_frame) : args.outputs - draw_scene args, target - args.state.static_debounce -= 1 - return unless last_frame - end - - # build up the wipe... - - # this is the thing we're wiping to. - args.outputs.sprites << [ 0, 0, 1280, 720, 'dragonruby.png' ] - - return if (args.state.baseyoff > (1280 + 100)) # stop when done sliding - - segmentw = 1280 / segments - - x = 0 - for i in 0..segments do - yoffset = 0 - if args.state.yoffsets[i] < args.state.baseyoff - yoffset = args.state.baseyoff - args.state.yoffsets[i] - end - - # (720 - yoffset) flips the coordinate system, (- 720) adjusts for the height of the segment. - args.outputs.sprites << [ x, (720 - yoffset) - 720, segmentw, 720, 'last_frame', 0, 255, 255, 255, 255, x, 0, segmentw, 720 ] - x += segmentw - end - - args.state.baseyoff += 4 - - tick_instructions args, "Sample app shows an advanced usage of render_target." -end - -def tick_instructions args, text, y = 715 - return if args.state.key_event_occurred - if args.inputs.mouse.click || - args.inputs.keyboard.directional_vector || - args.inputs.keyboard.key_down.enter || - args.inputs.keyboard.key_down.escape - args.state.key_event_occurred = true - end - - args.outputs.debug << [0, y - 50, 1280, 60].solid - args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label - args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label -end diff --git a/samples/07_advanced_rendering/02_render_targets_with_alphas/license-for-sample.txt b/samples/07_advanced_rendering/02_render_targets_with_alphas/license-for-sample.txt deleted file mode 100644 index 100dcec..0000000 --- a/samples/07_advanced_rendering/02_render_targets_with_alphas/license-for-sample.txt +++ /dev/null @@ -1,9 +0,0 @@ -Copyright 2019 DragonRuby LLC - -MIT License - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/samples/07_advanced_rendering/03_render_target_viewports/app/main.rb b/samples/07_advanced_rendering/03_render_target_viewports/app/main.rb index 0dd6c18..dbceab3 100644 --- a/samples/07_advanced_rendering/03_render_target_viewports/app/main.rb +++ b/samples/07_advanced_rendering/03_render_target_viewports/app/main.rb @@ -25,7 +25,7 @@ would print "How are you, Ruby?" to the console. (Remember, string interpolation only works with double quotes!) - - Ternary operator (?): Similar to if statement; first evaluates whether a statement is + - Ternary operator (?): Similar to if statement; first evalulates whether a statement is true or false, and then executes a command depending on that result. For example, if we had a variable grade = 75 @@ -39,7 +39,7 @@ 720 p screen (Dragon Ruby Game Toolkits's virtual resolution is always 1280x720). - Numeric#shift_(left|right|up|down): Shifts the Numeric in the correct direction - by adding or subtracting. + by adding or subracting. - ARRAY#inside_rect?: An array with at least two values is considered a point. An array with at least four values is considered a rect. The inside_rect? function returns true @@ -48,10 +48,12 @@ - ARRAY#intersect_rect?: Returns true or false depending on if the two rectangles intersect. - args.inputs.mouse.click: This property will be set if the mouse was clicked. + For more information about the mouse, go to mygame/documentation/07-mouse.md. - args.inputs.keyboard.key_up.KEY: The value of the properties will be set to the frame that the key_up event occurred (the frame correlates to args.state.tick_count). + For more information about the keyboard, go to mygame/documentation/06-keyboard.md. - args.state.labels: The parameters for a label are @@ -61,6 +63,7 @@ 4. the alignment 5. the color (red, green, and blue saturations) 6. the alpha (or transparency) + For more information about labels, go to mygame/documentation/02-labels.md. - args.state.lines: The parameters for a line are @@ -68,6 +71,7 @@ 2. the ending position (x2, y2) 3. the color (red, green, and blue saturations) 4. the alpha (or transparency) + For more information about lines, go to mygame/documentation/04-lines.md. - args.state.solids (and args.state.borders): The parameters for a solid (or border) are @@ -76,6 +80,7 @@ 3. the height (h) 4. the color (r, g, b) 5. the alpha (or transparency) + For more information about solids and borders, go to mygame/documentation/03-solids-and-borders.md. - args.state.sprites: The parameters for a sprite are @@ -85,7 +90,7 @@ 4. the image path 5. the angle 6. the alpha (or transparency) - + For more information about sprites, go to mygame/documentation/05-sprites.md. =end # This sample app shows different objects that can be used when making games, such as labels, @@ -111,7 +116,7 @@ class TechDemo button_tech_demo export_game_state_demo window_state_demo - render_separators + render_seperators end # Shows output of different kinds of labels on the screen @@ -408,28 +413,28 @@ class TechDemo end #Sets values for the horizontal separator (divides demo sections) - def horizontal_separator y, x, x2 + def horizontal_seperator y, x, x2 [x, y, x2, y, 150, 150, 150] end #Sets the values for the vertical separator (divides demo sections) - def vertical_separator x, y, y2 + def vertical_seperator x, y, y2 [x, y, x, y2, 150, 150, 150] end # Outputs vertical and horizontal separators onto the screen to separate each demo section. - def render_separators - outputs.lines << horizontal_separator(505, grid.left, 445) - outputs.lines << horizontal_separator(353, grid.left, 445) - outputs.lines << horizontal_separator(264, grid.left, 445) - outputs.lines << horizontal_separator(174, grid.left, 445) + def render_seperators + outputs.lines << horizontal_seperator(505, grid.left, 445) + outputs.lines << horizontal_seperator(353, grid.left, 445) + outputs.lines << horizontal_seperator(264, grid.left, 445) + outputs.lines << horizontal_seperator(174, grid.left, 445) - outputs.lines << vertical_separator(445, grid.top, grid.bottom) + outputs.lines << vertical_seperator(445, grid.top, grid.bottom) - outputs.lines << horizontal_separator(690, 445, 820) - outputs.lines << horizontal_separator(426, 445, 820) + outputs.lines << horizontal_seperator(690, 445, 820) + outputs.lines << horizontal_seperator(426, 445, 820) - outputs.lines << vertical_separator(820, grid.top, grid.bottom) + outputs.lines << vertical_seperator(820, grid.top, grid.bottom) end end diff --git a/samples/07_advanced_rendering/04_render_primitive_hierarchies/app/main.rb b/samples/07_advanced_rendering/04_render_primitive_hierarchies/app/main.rb index 7f345ac..aedd830 100644 --- a/samples/07_advanced_rendering/04_render_primitive_hierarchies/app/main.rb +++ b/samples/07_advanced_rendering/04_render_primitive_hierarchies/app/main.rb @@ -39,6 +39,7 @@ Here is an example of a (red) border or solid definition: [100, 100, 400, 500, 255, 0, 0] It will be a solid or border depending on if it is added to args.outputs.solids or args.outputs.borders. + For more information about solids and borders, go to mygame/documentation/03-solids-and-borders.md. - args.outputs.sprites: An array. The values generate a sprite. The parameters for sprites are @@ -49,6 +50,7 @@ Here is an example of a sprite definition: [100, 100, 400, 500, 'sprites/dragonruby.png'] + For more information about sprites, go to mygame/documentation/05-sprites.md. =end diff --git a/samples/07_advanced_rendering/05_render_primitives_as_hash/app/main.rb b/samples/07_advanced_rendering/05_render_primitives_as_hash/app/main.rb index 53e0f3d..907b0fb 100644 --- a/samples/07_advanced_rendering/05_render_primitives_as_hash/app/main.rb +++ b/samples/07_advanced_rendering/05_render_primitives_as_hash/app/main.rb @@ -16,18 +16,23 @@ - args.outputs.sprites: An array. The values generate a sprite. The parameters are [X, Y, WIDTH, HEIGHT, PATH, ANGLE, ALPHA, RED, GREEN, BLUE] + For more information about sprites, go to mygame/documentation/05-sprites.md. - args.outputs.labels: An array. The values generate a label. The parameters are [X, Y, TEXT, SIZE, ALIGNMENT, RED, GREEN, BLUE, ALPHA, FONT STYLE] + For more information about labels, go to mygame/documentation/02-labels.md. - args.outputs.solids: An array. The values generate a solid. The parameters are [X, Y, WIDTH, HEIGHT, RED, GREEN, BLUE, ALPHA] + For more information about solids, go to mygame/documentation/03-solids-and-borders.md. - args.outputs.borders: An array. The values generate a border. The parameters are the same as a solid. + For more information about borders, go to mygame/documentation/03-solids-and-borders.md. - args.outputs.lines: An array. The values generate a line. The parameters are [X1, Y1, X2, Y2, RED, GREEN, BLUE] + For more information about labels, go to mygame/documentation/02-labels.md. =end @@ -131,7 +136,7 @@ def tick args flip_horizontally: false, angle_anchor_x: 0.5, # rotation center set to middle angle_anchor_y: 0.5 - }.sprite + }.sprite! # Outputs label as primitive using a hash args.outputs.primitives << { @@ -145,7 +150,7 @@ def tick args b: 50, a: 255, # transparency font: "fonts/manaspc.ttf" # font style - }.label + }.label! # Outputs solid as primitive using a hash args.outputs.primitives << { @@ -157,7 +162,7 @@ def tick args g: 50, b: 50, a: 255 # transparency - }.solid + }.solid! # Outputs border as primitive using a hash # Same parameters as solid @@ -170,7 +175,7 @@ def tick args g: 50, b: 50, a: 255 # transparency - }.border + }.border! # Outputs line as primitive using a hash args.outputs.primitives << { @@ -182,5 +187,5 @@ def tick args g: 50, b: 50, a: 255 # transparency - }.line + }.line! end diff --git a/samples/07_advanced_rendering/07_simple_camera/app/main.rb b/samples/07_advanced_rendering/07_simple_camera/app/main.rb new file mode 100644 index 0000000..e8d96ea --- /dev/null +++ b/samples/07_advanced_rendering/07_simple_camera/app/main.rb @@ -0,0 +1,93 @@ +def tick args + # variables you can play around with + args.state.world.w ||= 1280 + args.state.world.h ||= 720 + + args.state.player.x ||= 0 + args.state.player.y ||= 0 + args.state.player.size ||= 32 + + args.state.enemy.x ||= 700 + args.state.enemy.y ||= 700 + args.state.enemy.size ||= 16 + + args.state.camera.x ||= 640 + args.state.camera.y ||= 300 + args.state.camera.scale ||= 1.0 + args.state.camera.show_empty_space ||= :yes + + # instructions + args.outputs.primitives << { x: 0, y: 80.from_top, w: 360, h: 80, r: 0, g: 0, b: 0, a: 128 }.solid! + args.outputs.primitives << { x: 10, y: 10.from_top, text: "arrow keys to move around", r: 255, g: 255, b: 255}.label! + args.outputs.primitives << { x: 10, y: 30.from_top, text: "+/- to change zoom of camera", r: 255, g: 255, b: 255}.label! + args.outputs.primitives << { x: 10, y: 50.from_top, text: "tab to change camera edge behavior", r: 255, g: 255, b: 255}.label! + + # render scene + args.outputs[:scene].w = args.state.world.w + args.outputs[:scene].h = args.state.world.h + + args.outputs[:scene].solids << { x: 0, y: 0, w: args.state.world.w, h: args.state.world.h, r: 20, g: 60, b: 80 } + args.outputs[:scene].solids << { x: args.state.player.x, y: args.state.player.y, + w: args.state.player.size, h: args.state.player.size, r: 80, g: 155, b: 80 } + args.outputs[:scene].solids << { x: args.state.enemy.x, y: args.state.enemy.y, + w: args.state.enemy.size, h: args.state.enemy.size, r: 155, g: 80, b: 80 } + + # render camera + scene_position = calc_scene_position args + args.outputs.sprites << { x: scene_position.x, + y: scene_position.y, + w: scene_position.w, + h: scene_position.h, + path: :scene } + + # move player + if args.inputs.directional_angle + args.state.player.x += args.inputs.directional_angle.vector_x * 5 + args.state.player.y += args.inputs.directional_angle.vector_y * 5 + args.state.player.x = args.state.player.x.clamp(0, args.state.world.w - args.state.player.size) + args.state.player.y = args.state.player.y.clamp(0, args.state.world.h - args.state.player.size) + end + + # +/- to zoom in and out + if args.inputs.keyboard.plus && args.state.tick_count.zmod?(3) + args.state.camera.scale += 0.05 + elsif args.inputs.keyboard.hyphen && args.state.tick_count.zmod?(3) + args.state.camera.scale -= 0.05 + elsif args.inputs.keyboard.key_down.tab + if args.state.camera.show_empty_space == :yes + args.state.camera.show_empty_space = :no + else + args.state.camera.show_empty_space = :yes + end + end + + args.state.camera.scale = args.state.camera.scale.greater(0.1) +end + +def calc_scene_position args + result = { x: args.state.camera.x - (args.state.player.x * args.state.camera.scale), + y: args.state.camera.y - (args.state.player.y * args.state.camera.scale), + w: args.state.world.w * args.state.camera.scale, + h: args.state.world.h * args.state.camera.scale, + scale: args.state.camera.scale } + + return result if args.state.camera.show_empty_space == :yes + + if result.w < args.grid.w + result.merge!(x: (args.grid.w - result.w).half) + elsif (args.state.player.x * result.scale) < args.grid.w.half + result.merge!(x: 10) + elsif (result.x + result.w) < args.grid.w + result.merge!(x: - result.w + (args.grid.w - 10)) + end + + if result.h < args.grid.h + result.merge!(y: (args.grid.h - result.h).half) + elsif (result.y) > 10 + result.merge!(y: 10) + elsif (result.y + result.h) < args.grid.h + result.merge!(y: - result.h + (args.grid.h - 10)) + end + + result +end diff --git a/samples/07_advanced_rendering/07_simple_camera/replay.txt b/samples/07_advanced_rendering/07_simple_camera/replay.txt new file mode 100644 index 0000000..532f46c --- /dev/null +++ b/samples/07_advanced_rendering/07_simple_camera/replay.txt @@ -0,0 +1,232 @@ +replay_version 2.0 +stopped_at 1551 +seed 100 +recorded_at Sat Jul 17 09:21:44 2021 +[:mouse_button_up, 1, 0, 1, 1, 6] +[:mouse_button_pressed, 1, 0, 1, 2, 140] +[:mouse_button_up, 1, 0, 1, 3, 146] +[:key_down_raw, 1073741903, 0, 2, 4, 245] +[:key_down_raw, 1073741903, 0, 2, 5, 259] +[:key_down_raw, 1073741903, 0, 2, 6, 261] +[:key_down_raw, 1073741903, 0, 2, 7, 263] +[:key_down_raw, 1073741903, 0, 2, 8, 265] +[:key_down_raw, 1073741903, 0, 2, 9, 267] +[:key_down_raw, 1073741903, 0, 2, 10, 269] +[:key_down_raw, 1073741906, 0, 2, 11, 269] +[:key_up_raw, 1073741903, 0, 2, 12, 280] +[:key_down_raw, 1073741903, 0, 2, 13, 284] +[:key_down_raw, 1073741903, 0, 2, 14, 299] +[:key_down_raw, 1073741903, 0, 2, 15, 301] +[:key_down_raw, 1073741903, 0, 2, 16, 303] +[:key_down_raw, 1073741903, 0, 2, 17, 305] +[:key_down_raw, 1073741903, 0, 2, 18, 307] +[:key_down_raw, 1073741903, 0, 2, 19, 309] +[:key_down_raw, 1073741903, 0, 2, 20, 311] +[:key_down_raw, 1073741903, 0, 2, 21, 313] +[:key_down_raw, 1073741903, 0, 2, 22, 315] +[:key_down_raw, 1073741903, 0, 2, 23, 317] +[:key_down_raw, 1073741903, 0, 2, 24, 319] +[:key_down_raw, 1073741903, 0, 2, 25, 321] +[:key_down_raw, 1073741903, 0, 2, 26, 323] +[:key_down_raw, 1073741903, 0, 2, 27, 325] +[:key_down_raw, 1073741903, 0, 2, 28, 327] +[:key_down_raw, 1073741903, 0, 2, 29, 329] +[:key_down_raw, 1073741903, 0, 2, 30, 331] +[:key_down_raw, 1073741903, 0, 2, 31, 333] +[:key_down_raw, 1073741903, 0, 2, 32, 335] +[:key_down_raw, 1073741903, 0, 2, 33, 337] +[:key_down_raw, 1073741903, 0, 2, 34, 339] +[:key_up_raw, 1073741906, 0, 2, 35, 341] +[:key_down_raw, 1073741903, 0, 2, 36, 341] +[:key_down_raw, 1073741903, 0, 2, 37, 343] +[:key_down_raw, 1073741903, 0, 2, 38, 345] +[:key_down_raw, 1073741903, 0, 2, 39, 347] +[:key_down_raw, 1073741903, 0, 2, 40, 349] +[:key_down_raw, 1073741903, 0, 2, 41, 351] +[:key_down_raw, 1073741903, 0, 2, 42, 353] +[:key_down_raw, 1073741903, 0, 2, 43, 355] +[:key_down_raw, 1073741906, 0, 2, 44, 357] +[:key_down_raw, 1073741906, 0, 2, 45, 372] +[:key_down_raw, 1073741906, 0, 2, 46, 374] +[:key_down_raw, 1073741906, 0, 2, 47, 376] +[:key_down_raw, 1073741906, 0, 2, 48, 378] +[:key_down_raw, 1073741906, 0, 2, 49, 380] +[:key_down_raw, 1073741906, 0, 2, 50, 382] +[:key_down_raw, 1073741906, 0, 2, 51, 384] +[:key_down_raw, 1073741906, 0, 2, 52, 386] +[:key_down_raw, 1073741906, 0, 2, 53, 388] +[:key_down_raw, 1073741906, 0, 2, 54, 390] +[:key_down_raw, 1073741906, 0, 2, 55, 392] +[:key_down_raw, 1073741906, 0, 2, 56, 395] +[:key_up_raw, 1073741906, 0, 2, 57, 396] +[:key_up_raw, 1073741903, 0, 2, 58, 397] +[:key_down_raw, 8, 0, 2, 59, 466] +[:key_up_raw, 8, 0, 2, 60, 466] +[:key_down_raw, 8, 0, 2, 61, 470] +[:key_up_raw, 8, 0, 2, 62, 475] +[:key_down_raw, 45, 0, 2, 63, 540] +[:key_up_raw, 45, 0, 2, 64, 545] +[:key_down_raw, 45, 0, 2, 65, 551] +[:key_up_raw, 45, 0, 2, 66, 556] +[:key_down_raw, 45, 0, 2, 67, 566] +[:key_up_raw, 45, 0, 2, 68, 571] +[:key_down_raw, 45, 0, 2, 69, 577] +[:key_up_raw, 45, 0, 2, 70, 581] +[:key_down_raw, 45, 0, 2, 71, 595] +[:key_up_raw, 45, 0, 2, 72, 600] +[:key_down_raw, 1073741905, 0, 2, 73, 715] +[:key_down_raw, 1073741905, 0, 2, 74, 730] +[:key_down_raw, 1073741905, 0, 2, 75, 732] +[:key_down_raw, 1073741905, 0, 2, 76, 734] +[:key_down_raw, 1073741905, 0, 2, 77, 736] +[:key_down_raw, 1073741905, 0, 2, 78, 738] +[:key_down_raw, 1073741904, 0, 2, 79, 739] +[:key_up_raw, 1073741905, 0, 2, 80, 743] +[:key_down_raw, 1073741904, 0, 2, 81, 754] +[:key_down_raw, 1073741904, 0, 2, 82, 756] +[:key_down_raw, 1073741904, 0, 2, 83, 758] +[:key_down_raw, 1073741904, 0, 2, 84, 760] +[:key_down_raw, 1073741904, 0, 2, 85, 762] +[:key_down_raw, 1073741904, 0, 2, 86, 764] +[:key_down_raw, 1073741904, 0, 2, 87, 766] +[:key_down_raw, 1073741904, 0, 2, 88, 768] +[:key_down_raw, 1073741904, 0, 2, 89, 770] +[:key_down_raw, 1073741904, 0, 2, 90, 772] +[:key_down_raw, 1073741905, 0, 2, 91, 774] +[:key_down_raw, 1073741906, 0, 2, 92, 781] +[:key_up_raw, 1073741904, 0, 2, 93, 785] +[:key_up_raw, 1073741905, 0, 2, 94, 791] +[:key_down_raw, 1073741906, 0, 2, 95, 796] +[:key_down_raw, 1073741903, 0, 2, 96, 797] +[:key_up_raw, 1073741906, 0, 2, 97, 804] +[:key_up_raw, 1073741903, 0, 2, 98, 810] +[:key_down_raw, 1073742049, 1, 2, 99, 884] +[:key_down_raw, 61, 1, 2, 100, 885] +[:key_up_raw, 61, 1, 2, 101, 888] +[:key_up_raw, 1073742049, 0, 2, 102, 888] +[:key_down_raw, 1073742049, 1, 2, 103, 898] +[:key_down_raw, 61, 1, 2, 104, 899] +[:key_up_raw, 61, 1, 2, 105, 903] +[:key_up_raw, 1073742049, 0, 2, 106, 903] +[:key_down_raw, 1073742049, 1, 2, 107, 909] +[:key_down_raw, 61, 1, 2, 108, 909] +[:key_up_raw, 61, 1, 2, 109, 912] +[:key_up_raw, 1073742049, 0, 2, 110, 913] +[:key_down_raw, 1073742049, 1, 2, 111, 918] +[:key_down_raw, 61, 1, 2, 112, 918] +[:key_up_raw, 61, 1, 2, 113, 921] +[:key_up_raw, 1073742049, 0, 2, 114, 922] +[:key_down_raw, 1073742049, 1, 2, 115, 926] +[:key_down_raw, 61, 1, 2, 116, 926] +[:key_up_raw, 61, 1, 2, 117, 930] +[:key_up_raw, 1073742049, 0, 2, 118, 931] +[:key_down_raw, 1073742049, 1, 2, 119, 935] +[:key_down_raw, 61, 1, 2, 120, 935] +[:key_up_raw, 61, 1, 2, 121, 940] +[:key_up_raw, 1073742049, 0, 2, 122, 941] +[:key_down_raw, 1073742049, 1, 2, 123, 947] +[:key_down_raw, 61, 1, 2, 124, 947] +[:key_up_raw, 61, 1, 2, 125, 950] +[:key_up_raw, 1073742049, 0, 2, 126, 951] +[:key_down_raw, 1073742049, 1, 2, 127, 955] +[:key_down_raw, 61, 1, 2, 128, 956] +[:key_up_raw, 61, 1, 2, 129, 960] +[:key_up_raw, 1073742049, 0, 2, 130, 960] +[:key_down_raw, 9, 0, 2, 131, 986] +[:key_up_raw, 9, 0, 2, 132, 991] +[:key_down_raw, 1073741904, 0, 2, 133, 1015] +[:key_down_raw, 1073741904, 0, 2, 134, 1030] +[:key_down_raw, 1073741904, 0, 2, 135, 1032] +[:key_down_raw, 1073741904, 0, 2, 136, 1034] +[:key_down_raw, 1073741904, 0, 2, 137, 1036] +[:key_down_raw, 1073741904, 0, 2, 138, 1038] +[:key_down_raw, 1073741904, 0, 2, 139, 1040] +[:key_down_raw, 1073741904, 0, 2, 140, 1042] +[:key_up_raw, 1073741904, 0, 2, 141, 1044] +[:key_down_raw, 1073741903, 0, 2, 142, 1048] +[:key_down_raw, 1073741903, 0, 2, 143, 1063] +[:key_down_raw, 1073741903, 0, 2, 144, 1065] +[:key_down_raw, 1073741903, 0, 2, 145, 1067] +[:key_down_raw, 1073741903, 0, 2, 146, 1069] +[:key_down_raw, 1073741903, 0, 2, 147, 1071] +[:key_down_raw, 1073741903, 0, 2, 148, 1073] +[:key_down_raw, 1073741903, 0, 2, 149, 1075] +[:key_down_raw, 1073741903, 0, 2, 150, 1077] +[:key_down_raw, 1073741903, 0, 2, 151, 1079] +[:key_down_raw, 1073741903, 0, 2, 152, 1081] +[:key_down_raw, 1073741903, 0, 2, 153, 1083] +[:key_down_raw, 1073741903, 0, 2, 154, 1085] +[:key_down_raw, 1073741903, 0, 2, 155, 1087] +[:key_down_raw, 1073741903, 0, 2, 156, 1089] +[:key_down_raw, 1073741903, 0, 2, 157, 1091] +[:key_down_raw, 1073741903, 0, 2, 158, 1093] +[:key_down_raw, 1073741903, 0, 2, 159, 1095] +[:key_down_raw, 1073741903, 0, 2, 160, 1097] +[:key_down_raw, 1073741903, 0, 2, 161, 1099] +[:key_down_raw, 1073741903, 0, 2, 162, 1101] +[:key_down_raw, 1073741903, 0, 2, 163, 1103] +[:key_down_raw, 1073741903, 0, 2, 164, 1105] +[:key_down_raw, 1073741903, 0, 2, 165, 1107] +[:key_down_raw, 1073741903, 0, 2, 166, 1109] +[:key_down_raw, 1073741903, 0, 2, 167, 1111] +[:key_down_raw, 1073741903, 0, 2, 168, 1113] +[:key_down_raw, 1073741903, 0, 2, 169, 1115] +[:key_down_raw, 1073741903, 0, 2, 170, 1117] +[:key_down_raw, 1073741903, 0, 2, 171, 1119] +[:key_down_raw, 1073741903, 0, 2, 172, 1121] +[:key_down_raw, 1073741903, 0, 2, 173, 1123] +[:key_down_raw, 1073741903, 0, 2, 174, 1125] +[:key_down_raw, 1073741903, 0, 2, 175, 1127] +[:key_down_raw, 1073741903, 0, 2, 176, 1129] +[:key_down_raw, 1073741903, 0, 2, 177, 1131] +[:key_down_raw, 1073741903, 0, 2, 178, 1133] +[:key_down_raw, 1073741903, 0, 2, 179, 1135] +[:key_down_raw, 1073741903, 0, 2, 180, 1137] +[:key_down_raw, 1073741903, 0, 2, 181, 1139] +[:key_down_raw, 1073741903, 0, 2, 182, 1141] +[:key_down_raw, 1073741903, 0, 2, 183, 1143] +[:key_down_raw, 1073741903, 0, 2, 184, 1145] +[:key_down_raw, 1073741903, 0, 2, 185, 1147] +[:key_down_raw, 1073741903, 0, 2, 186, 1149] +[:key_down_raw, 1073741903, 0, 2, 187, 1151] +[:key_down_raw, 1073741903, 0, 2, 188, 1153] +[:key_down_raw, 1073741903, 0, 2, 189, 1155] +[:key_down_raw, 1073741903, 0, 2, 190, 1157] +[:key_down_raw, 1073741903, 0, 2, 191, 1159] +[:key_down_raw, 1073741903, 0, 2, 192, 1161] +[:key_down_raw, 1073741903, 0, 2, 193, 1163] +[:key_down_raw, 1073741905, 0, 2, 194, 1164] +[:key_down_raw, 1073741905, 0, 2, 195, 1180] +[:key_down_raw, 1073741905, 0, 2, 196, 1182] +[:key_down_raw, 1073741905, 0, 2, 197, 1184] +[:key_down_raw, 1073741905, 0, 2, 198, 1186] +[:key_down_raw, 1073741905, 0, 2, 199, 1188] +[:key_down_raw, 1073741905, 0, 2, 200, 1190] +[:key_down_raw, 1073741905, 0, 2, 201, 1192] +[:key_down_raw, 1073741905, 0, 2, 202, 1194] +[:key_down_raw, 1073741905, 0, 2, 203, 1196] +[:key_down_raw, 1073741905, 0, 2, 204, 1198] +[:key_down_raw, 1073741905, 0, 2, 205, 1200] +[:key_down_raw, 1073741905, 0, 2, 206, 1202] +[:key_down_raw, 1073741905, 0, 2, 207, 1204] +[:key_down_raw, 1073741905, 0, 2, 208, 1206] +[:key_down_raw, 1073741905, 0, 2, 209, 1208] +[:key_down_raw, 1073741905, 0, 2, 210, 1210] +[:key_down_raw, 1073741905, 0, 2, 211, 1212] +[:key_down_raw, 1073741905, 0, 2, 212, 1214] +[:key_down_raw, 1073741905, 0, 2, 213, 1216] +[:key_up_raw, 1073741903, 0, 2, 214, 1216] +[:key_up_raw, 1073741905, 0, 2, 215, 1217] +[:key_down_raw, 45, 0, 2, 216, 1263] +[:key_up_raw, 45, 0, 2, 217, 1265] +[:key_down_raw, 45, 0, 2, 218, 1271] +[:key_up_raw, 45, 0, 2, 219, 1275] +[:key_down_raw, 45, 0, 2, 220, 1282] +[:key_up_raw, 45, 0, 2, 221, 1287] +[:key_down_raw, 45, 0, 2, 222, 1296] +[:key_up_raw, 45, 0, 2, 223, 1301] +[:key_down_raw, 45, 0, 2, 224, 1308] +[:key_up_raw, 45, 0, 2, 225, 1312] +[:key_down_raw, 96, 0, 2, 226, 1386] +[:key_up_raw, 96, 0, 2, 227, 1391] +[:key_down_raw, 13, 0, 2, 228, 1551] diff --git a/samples/07_advanced_rendering/07_splitscreen_camera/app/main.rb b/samples/07_advanced_rendering/07_splitscreen_camera/app/main.rb deleted file mode 100644 index 9b08e1e..0000000 --- a/samples/07_advanced_rendering/07_splitscreen_camera/app/main.rb +++ /dev/null @@ -1,395 +0,0 @@ -class CameraMovement - attr_accessor :state, :inputs, :outputs, :grid - - #============================================================================================== - #Serialize - def serialize - {state: state, inputs: inputs, outputs: outputs, grid: grid } - end - - def inspect - serialize.to_s - end - - def to_s - serialize.to_s - end - - #============================================================================================== - #Tick - def tick - defaults - calc - render - input - end - - #============================================================================================== - #Default functions - def defaults - outputs[:scene].background_color = [0,0,0] - state.trauma ||= 0.0 - state.trauma_power ||= 2 - state.player_cyan ||= new_player_cyan - state.player_magenta ||= new_player_magenta - state.camera_magenta ||= new_camera_magenta - state.camera_cyan ||= new_camera_cyan - state.camera_center ||= new_camera_center - state.room ||= new_room - end - - def default_player x, y, w, h, sprite_path - state.new_entity(:player, - { x: x, - y: y, - dy: 0, - dx: 0, - w: w, - h: h, - damage: 0, - dead: false, - orientation: "down", - max_alpha: 255, - sprite_path: sprite_path}) - end - - def default_floor_tile x, y, w, h, sprite_path - state.new_entity(:room, - { x: x, - y: y, - w: w, - h: h, - sprite_path: sprite_path}) - end - - def default_camera x, y, w, h - state.new_entity(:camera, - { x: x, - y: y, - dx: 0, - dy: 0, - w: w, - h: h}) - end - - def new_player_cyan - default_player(0, 0, 64, 64, - "sprites/player/player_#{state.player_cyan.orientation}_standing.png") - end - - def new_player_magenta - default_player(64, 0, 64, 64, - "sprites/player/player_#{state.player_magenta.orientation}_standing.png") - end - - def new_camera_magenta - default_camera(0,0,720,720) - end - - def new_camera_cyan - default_camera(0,0,720,720) - end - - def new_camera_center - default_camera(0,0,1280,720) - end - - def new_room - default_floor_tile(0,0,1024,1024,'sprites/rooms/camera_room.png') - end - - #============================================================================================== - #Calculation functions - def calc - calc_camera_magenta - calc_camera_cyan - calc_camera_center - calc_player_cyan - calc_player_magenta - calc_trauma_decay - end - - def center_camera_tolerance - return Math.sqrt(((state.player_magenta.x - state.player_cyan.x) ** 2) + - ((state.player_magenta.y - state.player_cyan.y) ** 2)) > 640 - end - - def calc_player_cyan - state.player_cyan.x += state.player_cyan.dx - state.player_cyan.y += state.player_cyan.dy - end - - def calc_player_magenta - state.player_magenta.x += state.player_magenta.dx - state.player_magenta.y += state.player_magenta.dy - end - - def calc_camera_center - timeScale = 1 - midX = (state.player_magenta.x + state.player_cyan.x)/2 - midY = (state.player_magenta.y + state.player_cyan.y)/2 - targetX = midX - state.camera_center.w/2 - targetY = midY - state.camera_center.h/2 - state.camera_center.x += (targetX - state.camera_center.x) * 0.1 * timeScale - state.camera_center.y += (targetY - state.camera_center.y) * 0.1 * timeScale - end - - - def calc_camera_magenta - timeScale = 1 - targetX = state.player_magenta.x + state.player_magenta.w - state.camera_magenta.w/2 - targetY = state.player_magenta.y + state.player_magenta.h - state.camera_magenta.h/2 - state.camera_magenta.x += (targetX - state.camera_magenta.x) * 0.1 * timeScale - state.camera_magenta.y += (targetY - state.camera_magenta.y) * 0.1 * timeScale - end - - def calc_camera_cyan - timeScale = 1 - targetX = state.player_cyan.x + state.player_cyan.w - state.camera_cyan.w/2 - targetY = state.player_cyan.y + state.player_cyan.h - state.camera_cyan.h/2 - state.camera_cyan.x += (targetX - state.camera_cyan.x) * 0.1 * timeScale - state.camera_cyan.y += (targetY - state.camera_cyan.y) * 0.1 * timeScale - end - - def calc_player_quadrant angle - if angle < 45 and angle > -45 and state.player_cyan.x < state.player_magenta.x - return 1 - elsif angle < 45 and angle > -45 and state.player_cyan.x > state.player_magenta.x - return 3 - elsif (angle > 45 or angle < -45) and state.player_cyan.y < state.player_magenta.y - return 2 - elsif (angle > 45 or angle < -45) and state.player_cyan.y > state.player_magenta.y - return 4 - end - end - - def calc_camera_shake - state.trauma - end - - def calc_trauma_decay - state.trauma = state.trauma * 0.9 - end - - def calc_random_float_range(min, max) - rand * (max-min) + min - end - - #============================================================================================== - #Render Functions - def render - render_floor - render_player_cyan - render_player_magenta - if center_camera_tolerance - render_split_camera_scene - else - render_camera_center_scene - end - end - - def render_player_cyan - outputs[:scene].sprites << {x: state.player_cyan.x, - y: state.player_cyan.y, - w: state.player_cyan.w, - h: state.player_cyan.h, - path: "sprites/player/player_#{state.player_cyan.orientation}_standing.png", - r: 0, - g: 255, - b: 255} - end - - def render_player_magenta - outputs[:scene].sprites << {x: state.player_magenta.x, - y: state.player_magenta.y, - w: state.player_magenta.w, - h: state.player_magenta.h, - path: "sprites/player/player_#{state.player_magenta.orientation}_standing.png", - r: 255, - g: 0, - b: 255} - end - - def render_floor - outputs[:scene].sprites << [state.room.x, state.room.y, - state.room.w, state.room.h, - state.room.sprite_path] - end - - def render_camera_center_scene - zoomFactor = 1 - outputs[:scene].width = state.room.w - outputs[:scene].height = state.room.h - - maxAngle = 10.0 - maxOffset = 20.0 - angle = maxAngle * calc_camera_shake * calc_random_float_range(-1,1) - offsetX = 32 - (maxOffset * calc_camera_shake * calc_random_float_range(-1,1)) - offsetY = 32 - (maxOffset * calc_camera_shake * calc_random_float_range(-1,1)) - - outputs.sprites << {x: (-state.camera_center.x - offsetX)/zoomFactor, - y: (-state.camera_center.y - offsetY)/zoomFactor, - w: outputs[:scene].width/zoomFactor, - h: outputs[:scene].height/zoomFactor, - path: :scene, - angle: angle, - source_w: -1, - source_h: -1} - outputs.labels << [128,64,"#{state.trauma.round(1)}",8,2,255,0,255,255] - end - - def render_split_camera_scene - outputs[:scene].width = state.room.w - outputs[:scene].height = state.room.h - render_camera_magenta_scene - render_camera_cyan_scene - - angle = Math.atan((state.player_magenta.y - state.player_cyan.y)/(state.player_magenta.x- state.player_cyan.x)) * 180/Math::PI - output_split_camera angle - - end - - def render_camera_magenta_scene - zoomFactor = 1 - offsetX = 32 - offsetY = 32 - - outputs[:scene_magenta].sprites << {x: (-state.camera_magenta.x*2), - y: (-state.camera_magenta.y), - w: outputs[:scene].width*2, - h: outputs[:scene].height, - path: :scene} - - end - - def render_camera_cyan_scene - zoomFactor = 1 - offsetX = 32 - offsetY = 32 - outputs[:scene_cyan].sprites << {x: (-state.camera_cyan.x*2), - y: (-state.camera_cyan.y), - w: outputs[:scene].width*2, - h: outputs[:scene].height, - path: :scene} - end - - def output_split_camera angle - #TODO: Clean this up! - quadrant = calc_player_quadrant angle - outputs.labels << [128,64,"#{quadrant}",8,2,255,0,255,255] - if quadrant == 1 - set_camera_attributes(w: 640, h: 720, m_x: 640, m_y: 0, c_x: 0, c_y: 0) - - elsif quadrant == 2 - set_camera_attributes(w: 1280, h: 360, m_x: 0, m_y: 360, c_x: 0, c_y: 0) - - elsif quadrant == 3 - set_camera_attributes(w: 640, h: 720, m_x: 0, m_y: 0, c_x: 640, c_y: 0) - - elsif quadrant == 4 - set_camera_attributes(w: 1280, h: 360, m_x: 0, m_y: 0, c_x: 0, c_y: 360) - - end - end - - def set_camera_attributes(w: 0, h: 0, m_x: 0, m_y: 0, c_x: 0, c_y: 0) - state.camera_cyan.w = w + 64 - state.camera_cyan.h = h + 64 - outputs[:scene_cyan].width = (w) * 2 - outputs[:scene_cyan].height = h - - state.camera_magenta.w = w + 64 - state.camera_magenta.h = h + 64 - outputs[:scene_magenta].width = (w) * 2 - outputs[:scene_magenta].height = h - outputs.sprites << {x: m_x, - y: m_y, - w: w, - h: h, - path: :scene_magenta} - outputs.sprites << {x: c_x, - y: c_y, - w: w, - h: h, - path: :scene_cyan} - end - - def add_trauma amount - state.trauma = [state.trauma + amount, 1.0].min - end - - def remove_trauma amount - state.trauma = [state.trauma - amount, 0.0].max - end - #============================================================================================== - #Input functions - def input - input_move_cyan - input_move_magenta - - if inputs.keyboard.key_down.t - add_trauma(0.5) - elsif inputs.keyboard.key_down.y - remove_trauma(0.1) - end - end - - def input_move_cyan - if inputs.keyboard.key_held.up - state.player_cyan.dy = 5 - state.player_cyan.orientation = "up" - elsif inputs.keyboard.key_held.down - state.player_cyan.dy = -5 - state.player_cyan.orientation = "down" - else - state.player_cyan.dy *= 0.8 - end - if inputs.keyboard.key_held.left - state.player_cyan.dx = -5 - state.player_cyan.orientation = "left" - elsif inputs.keyboard.key_held.right - state.player_cyan.dx = 5 - state.player_cyan.orientation = "right" - else - state.player_cyan.dx *= 0.8 - end - - outputs.labels << [128,512,"#{state.player_cyan.x.round()}",8,2,0,255,255,255] - outputs.labels << [128,480,"#{state.player_cyan.y.round()}",8,2,0,255,255,255] - end - - def input_move_magenta - if inputs.keyboard.key_held.w - state.player_magenta.dy = 5 - state.player_magenta.orientation = "up" - elsif inputs.keyboard.key_held.s - state.player_magenta.dy = -5 - state.player_magenta.orientation = "down" - else - state.player_magenta.dy *= 0.8 - end - if inputs.keyboard.key_held.a - state.player_magenta.dx = -5 - state.player_magenta.orientation = "left" - elsif inputs.keyboard.key_held.d - state.player_magenta.dx = 5 - state.player_magenta.orientation = "right" - else - state.player_magenta.dx *= 0.8 - end - - outputs.labels << [128,360,"#{state.player_magenta.x.round()}",8,2,255,0,255,255] - outputs.labels << [128,328,"#{state.player_magenta.y.round()}",8,2,255,0,255,255] - end -end - -$camera_movement = CameraMovement.new - -def tick args - args.outputs.background_color = [0,0,0] - $camera_movement.inputs = args.inputs - $camera_movement.outputs = args.outputs - $camera_movement.state = args.state - $camera_movement.grid = args.grid - $camera_movement.tick -end diff --git a/samples/07_advanced_rendering/07_splitscreen_camera/run.bat b/samples/07_advanced_rendering/07_splitscreen_camera/run.bat deleted file mode 100644 index 08e7ed8..0000000 --- a/samples/07_advanced_rendering/07_splitscreen_camera/run.bat +++ /dev/null @@ -1,6 +0,0 @@ -cd /d %~dp0 - -cd .. -cd .. -cd .. -dragonruby samples/99_camera/splitscreen diff --git a/samples/07_advanced_rendering/07_splitscreen_camera/sprites/player/player_down_standing.png b/samples/07_advanced_rendering/07_splitscreen_camera/sprites/player/player_down_standing.png deleted file mode 100644 index 9e27489..0000000 Binary files a/samples/07_advanced_rendering/07_splitscreen_camera/sprites/player/player_down_standing.png and /dev/null differ diff --git a/samples/07_advanced_rendering/07_splitscreen_camera/sprites/player/player_left_standing.png b/samples/07_advanced_rendering/07_splitscreen_camera/sprites/player/player_left_standing.png deleted file mode 100644 index 2fea35b..0000000 Binary files a/samples/07_advanced_rendering/07_splitscreen_camera/sprites/player/player_left_standing.png and /dev/null differ diff --git a/samples/07_advanced_rendering/07_splitscreen_camera/sprites/player/player_right_standing.png b/samples/07_advanced_rendering/07_splitscreen_camera/sprites/player/player_right_standing.png deleted file mode 100644 index 6f3402e..0000000 Binary files a/samples/07_advanced_rendering/07_splitscreen_camera/sprites/player/player_right_standing.png and /dev/null differ diff --git a/samples/07_advanced_rendering/07_splitscreen_camera/sprites/player/player_up_standing.png b/samples/07_advanced_rendering/07_splitscreen_camera/sprites/player/player_up_standing.png deleted file mode 100644 index 9ebdca7..0000000 Binary files a/samples/07_advanced_rendering/07_splitscreen_camera/sprites/player/player_up_standing.png and /dev/null differ diff --git a/samples/07_advanced_rendering/07_splitscreen_camera/sprites/rooms/camera_room.png b/samples/07_advanced_rendering/07_splitscreen_camera/sprites/rooms/camera_room.png deleted file mode 100644 index e0ca375..0000000 Binary files a/samples/07_advanced_rendering/07_splitscreen_camera/sprites/rooms/camera_room.png and /dev/null differ diff --git a/samples/07_advanced_rendering/08_splitscreen_camera/app/main.rb b/samples/07_advanced_rendering/08_splitscreen_camera/app/main.rb new file mode 100644 index 0000000..9b08e1e --- /dev/null +++ b/samples/07_advanced_rendering/08_splitscreen_camera/app/main.rb @@ -0,0 +1,395 @@ +class CameraMovement + attr_accessor :state, :inputs, :outputs, :grid + + #============================================================================================== + #Serialize + def serialize + {state: state, inputs: inputs, outputs: outputs, grid: grid } + end + + def inspect + serialize.to_s + end + + def to_s + serialize.to_s + end + + #============================================================================================== + #Tick + def tick + defaults + calc + render + input + end + + #============================================================================================== + #Default functions + def defaults + outputs[:scene].background_color = [0,0,0] + state.trauma ||= 0.0 + state.trauma_power ||= 2 + state.player_cyan ||= new_player_cyan + state.player_magenta ||= new_player_magenta + state.camera_magenta ||= new_camera_magenta + state.camera_cyan ||= new_camera_cyan + state.camera_center ||= new_camera_center + state.room ||= new_room + end + + def default_player x, y, w, h, sprite_path + state.new_entity(:player, + { x: x, + y: y, + dy: 0, + dx: 0, + w: w, + h: h, + damage: 0, + dead: false, + orientation: "down", + max_alpha: 255, + sprite_path: sprite_path}) + end + + def default_floor_tile x, y, w, h, sprite_path + state.new_entity(:room, + { x: x, + y: y, + w: w, + h: h, + sprite_path: sprite_path}) + end + + def default_camera x, y, w, h + state.new_entity(:camera, + { x: x, + y: y, + dx: 0, + dy: 0, + w: w, + h: h}) + end + + def new_player_cyan + default_player(0, 0, 64, 64, + "sprites/player/player_#{state.player_cyan.orientation}_standing.png") + end + + def new_player_magenta + default_player(64, 0, 64, 64, + "sprites/player/player_#{state.player_magenta.orientation}_standing.png") + end + + def new_camera_magenta + default_camera(0,0,720,720) + end + + def new_camera_cyan + default_camera(0,0,720,720) + end + + def new_camera_center + default_camera(0,0,1280,720) + end + + def new_room + default_floor_tile(0,0,1024,1024,'sprites/rooms/camera_room.png') + end + + #============================================================================================== + #Calculation functions + def calc + calc_camera_magenta + calc_camera_cyan + calc_camera_center + calc_player_cyan + calc_player_magenta + calc_trauma_decay + end + + def center_camera_tolerance + return Math.sqrt(((state.player_magenta.x - state.player_cyan.x) ** 2) + + ((state.player_magenta.y - state.player_cyan.y) ** 2)) > 640 + end + + def calc_player_cyan + state.player_cyan.x += state.player_cyan.dx + state.player_cyan.y += state.player_cyan.dy + end + + def calc_player_magenta + state.player_magenta.x += state.player_magenta.dx + state.player_magenta.y += state.player_magenta.dy + end + + def calc_camera_center + timeScale = 1 + midX = (state.player_magenta.x + state.player_cyan.x)/2 + midY = (state.player_magenta.y + state.player_cyan.y)/2 + targetX = midX - state.camera_center.w/2 + targetY = midY - state.camera_center.h/2 + state.camera_center.x += (targetX - state.camera_center.x) * 0.1 * timeScale + state.camera_center.y += (targetY - state.camera_center.y) * 0.1 * timeScale + end + + + def calc_camera_magenta + timeScale = 1 + targetX = state.player_magenta.x + state.player_magenta.w - state.camera_magenta.w/2 + targetY = state.player_magenta.y + state.player_magenta.h - state.camera_magenta.h/2 + state.camera_magenta.x += (targetX - state.camera_magenta.x) * 0.1 * timeScale + state.camera_magenta.y += (targetY - state.camera_magenta.y) * 0.1 * timeScale + end + + def calc_camera_cyan + timeScale = 1 + targetX = state.player_cyan.x + state.player_cyan.w - state.camera_cyan.w/2 + targetY = state.player_cyan.y + state.player_cyan.h - state.camera_cyan.h/2 + state.camera_cyan.x += (targetX - state.camera_cyan.x) * 0.1 * timeScale + state.camera_cyan.y += (targetY - state.camera_cyan.y) * 0.1 * timeScale + end + + def calc_player_quadrant angle + if angle < 45 and angle > -45 and state.player_cyan.x < state.player_magenta.x + return 1 + elsif angle < 45 and angle > -45 and state.player_cyan.x > state.player_magenta.x + return 3 + elsif (angle > 45 or angle < -45) and state.player_cyan.y < state.player_magenta.y + return 2 + elsif (angle > 45 or angle < -45) and state.player_cyan.y > state.player_magenta.y + return 4 + end + end + + def calc_camera_shake + state.trauma + end + + def calc_trauma_decay + state.trauma = state.trauma * 0.9 + end + + def calc_random_float_range(min, max) + rand * (max-min) + min + end + + #============================================================================================== + #Render Functions + def render + render_floor + render_player_cyan + render_player_magenta + if center_camera_tolerance + render_split_camera_scene + else + render_camera_center_scene + end + end + + def render_player_cyan + outputs[:scene].sprites << {x: state.player_cyan.x, + y: state.player_cyan.y, + w: state.player_cyan.w, + h: state.player_cyan.h, + path: "sprites/player/player_#{state.player_cyan.orientation}_standing.png", + r: 0, + g: 255, + b: 255} + end + + def render_player_magenta + outputs[:scene].sprites << {x: state.player_magenta.x, + y: state.player_magenta.y, + w: state.player_magenta.w, + h: state.player_magenta.h, + path: "sprites/player/player_#{state.player_magenta.orientation}_standing.png", + r: 255, + g: 0, + b: 255} + end + + def render_floor + outputs[:scene].sprites << [state.room.x, state.room.y, + state.room.w, state.room.h, + state.room.sprite_path] + end + + def render_camera_center_scene + zoomFactor = 1 + outputs[:scene].width = state.room.w + outputs[:scene].height = state.room.h + + maxAngle = 10.0 + maxOffset = 20.0 + angle = maxAngle * calc_camera_shake * calc_random_float_range(-1,1) + offsetX = 32 - (maxOffset * calc_camera_shake * calc_random_float_range(-1,1)) + offsetY = 32 - (maxOffset * calc_camera_shake * calc_random_float_range(-1,1)) + + outputs.sprites << {x: (-state.camera_center.x - offsetX)/zoomFactor, + y: (-state.camera_center.y - offsetY)/zoomFactor, + w: outputs[:scene].width/zoomFactor, + h: outputs[:scene].height/zoomFactor, + path: :scene, + angle: angle, + source_w: -1, + source_h: -1} + outputs.labels << [128,64,"#{state.trauma.round(1)}",8,2,255,0,255,255] + end + + def render_split_camera_scene + outputs[:scene].width = state.room.w + outputs[:scene].height = state.room.h + render_camera_magenta_scene + render_camera_cyan_scene + + angle = Math.atan((state.player_magenta.y - state.player_cyan.y)/(state.player_magenta.x- state.player_cyan.x)) * 180/Math::PI + output_split_camera angle + + end + + def render_camera_magenta_scene + zoomFactor = 1 + offsetX = 32 + offsetY = 32 + + outputs[:scene_magenta].sprites << {x: (-state.camera_magenta.x*2), + y: (-state.camera_magenta.y), + w: outputs[:scene].width*2, + h: outputs[:scene].height, + path: :scene} + + end + + def render_camera_cyan_scene + zoomFactor = 1 + offsetX = 32 + offsetY = 32 + outputs[:scene_cyan].sprites << {x: (-state.camera_cyan.x*2), + y: (-state.camera_cyan.y), + w: outputs[:scene].width*2, + h: outputs[:scene].height, + path: :scene} + end + + def output_split_camera angle + #TODO: Clean this up! + quadrant = calc_player_quadrant angle + outputs.labels << [128,64,"#{quadrant}",8,2,255,0,255,255] + if quadrant == 1 + set_camera_attributes(w: 640, h: 720, m_x: 640, m_y: 0, c_x: 0, c_y: 0) + + elsif quadrant == 2 + set_camera_attributes(w: 1280, h: 360, m_x: 0, m_y: 360, c_x: 0, c_y: 0) + + elsif quadrant == 3 + set_camera_attributes(w: 640, h: 720, m_x: 0, m_y: 0, c_x: 640, c_y: 0) + + elsif quadrant == 4 + set_camera_attributes(w: 1280, h: 360, m_x: 0, m_y: 0, c_x: 0, c_y: 360) + + end + end + + def set_camera_attributes(w: 0, h: 0, m_x: 0, m_y: 0, c_x: 0, c_y: 0) + state.camera_cyan.w = w + 64 + state.camera_cyan.h = h + 64 + outputs[:scene_cyan].width = (w) * 2 + outputs[:scene_cyan].height = h + + state.camera_magenta.w = w + 64 + state.camera_magenta.h = h + 64 + outputs[:scene_magenta].width = (w) * 2 + outputs[:scene_magenta].height = h + outputs.sprites << {x: m_x, + y: m_y, + w: w, + h: h, + path: :scene_magenta} + outputs.sprites << {x: c_x, + y: c_y, + w: w, + h: h, + path: :scene_cyan} + end + + def add_trauma amount + state.trauma = [state.trauma + amount, 1.0].min + end + + def remove_trauma amount + state.trauma = [state.trauma - amount, 0.0].max + end + #============================================================================================== + #Input functions + def input + input_move_cyan + input_move_magenta + + if inputs.keyboard.key_down.t + add_trauma(0.5) + elsif inputs.keyboard.key_down.y + remove_trauma(0.1) + end + end + + def input_move_cyan + if inputs.keyboard.key_held.up + state.player_cyan.dy = 5 + state.player_cyan.orientation = "up" + elsif inputs.keyboard.key_held.down + state.player_cyan.dy = -5 + state.player_cyan.orientation = "down" + else + state.player_cyan.dy *= 0.8 + end + if inputs.keyboard.key_held.left + state.player_cyan.dx = -5 + state.player_cyan.orientation = "left" + elsif inputs.keyboard.key_held.right + state.player_cyan.dx = 5 + state.player_cyan.orientation = "right" + else + state.player_cyan.dx *= 0.8 + end + + outputs.labels << [128,512,"#{state.player_cyan.x.round()}",8,2,0,255,255,255] + outputs.labels << [128,480,"#{state.player_cyan.y.round()}",8,2,0,255,255,255] + end + + def input_move_magenta + if inputs.keyboard.key_held.w + state.player_magenta.dy = 5 + state.player_magenta.orientation = "up" + elsif inputs.keyboard.key_held.s + state.player_magenta.dy = -5 + state.player_magenta.orientation = "down" + else + state.player_magenta.dy *= 0.8 + end + if inputs.keyboard.key_held.a + state.player_magenta.dx = -5 + state.player_magenta.orientation = "left" + elsif inputs.keyboard.key_held.d + state.player_magenta.dx = 5 + state.player_magenta.orientation = "right" + else + state.player_magenta.dx *= 0.8 + end + + outputs.labels << [128,360,"#{state.player_magenta.x.round()}",8,2,255,0,255,255] + outputs.labels << [128,328,"#{state.player_magenta.y.round()}",8,2,255,0,255,255] + end +end + +$camera_movement = CameraMovement.new + +def tick args + args.outputs.background_color = [0,0,0] + $camera_movement.inputs = args.inputs + $camera_movement.outputs = args.outputs + $camera_movement.state = args.state + $camera_movement.grid = args.grid + $camera_movement.tick +end diff --git a/samples/07_advanced_rendering/08_splitscreen_camera/replay.txt b/samples/07_advanced_rendering/08_splitscreen_camera/replay.txt new file mode 100644 index 0000000..b0c548e --- /dev/null +++ b/samples/07_advanced_rendering/08_splitscreen_camera/replay.txt @@ -0,0 +1,226 @@ +replay_version 2.0 +stopped_at 1047 +seed 100 +recorded_at Sat Jul 17 09:23:22 2021 +[:mouse_button_up, 1, 0, 1, 1, 5] +[:mouse_move, 795, 98, 2, 2, 75] +[:mouse_move, 797, 100, 2, 3, 77] +[:mouse_move, 799, 101, 2, 4, 78] +[:mouse_move, 800, 101, 2, 5, 78] +[:mouse_button_pressed, 1, 0, 1, 6, 88] +[:mouse_button_up, 1, 0, 1, 7, 92] +[:key_down_raw, 1073741903, 0, 2, 8, 124] +[:key_down_raw, 1073741903, 0, 2, 9, 138] +[:key_down_raw, 1073741903, 0, 2, 10, 141] +[:key_down_raw, 1073741903, 0, 2, 11, 142] +[:key_down_raw, 1073741903, 0, 2, 12, 144] +[:key_down_raw, 1073741903, 0, 2, 13, 147] +[:key_down_raw, 1073741903, 0, 2, 14, 148] +[:key_down_raw, 1073741903, 0, 2, 15, 151] +[:key_down_raw, 1073741906, 0, 2, 16, 151] +[:key_down_raw, 1073741906, 0, 2, 17, 166] +[:key_down_raw, 1073741906, 0, 2, 18, 169] +[:key_down_raw, 1073741906, 0, 2, 19, 170] +[:key_down_raw, 1073741906, 0, 2, 20, 172] +[:key_down_raw, 1073741906, 0, 2, 21, 174] +[:key_down_raw, 1073741906, 0, 2, 22, 177] +[:key_down_raw, 1073741906, 0, 2, 23, 178] +[:key_down_raw, 1073741906, 0, 2, 24, 180] +[:key_down_raw, 1073741906, 0, 2, 25, 182] +[:key_down_raw, 1073741906, 0, 2, 26, 184] +[:key_down_raw, 1073741906, 0, 2, 27, 186] +[:key_down_raw, 1073741906, 0, 2, 28, 188] +[:key_down_raw, 1073741906, 0, 2, 29, 190] +[:key_down_raw, 1073741906, 0, 2, 30, 193] +[:key_down_raw, 1073741906, 0, 2, 31, 194] +[:key_up_raw, 1073741906, 0, 2, 32, 195] +[:key_up_raw, 1073741903, 0, 2, 33, 291] +[:key_down_raw, 119, 0, 2, 34, 360] +[:key_down_raw, 119, 0, 2, 35, 375] +[:key_down_raw, 119, 0, 2, 36, 378] +[:key_down_raw, 119, 0, 2, 37, 379] +[:key_down_raw, 119, 0, 2, 38, 381] +[:key_down_raw, 119, 0, 2, 39, 383] +[:key_down_raw, 119, 0, 2, 40, 385] +[:key_down_raw, 119, 0, 2, 41, 387] +[:key_down_raw, 119, 0, 2, 42, 389] +[:key_down_raw, 119, 0, 2, 43, 391] +[:key_down_raw, 119, 0, 2, 44, 393] +[:key_down_raw, 119, 0, 2, 45, 395] +[:key_down_raw, 119, 0, 2, 46, 397] +[:key_down_raw, 119, 0, 2, 47, 401] +[:key_down_raw, 119, 0, 2, 48, 403] +[:key_down_raw, 119, 0, 2, 49, 405] +[:key_down_raw, 119, 0, 2, 50, 407] +[:key_down_raw, 119, 0, 2, 51, 409] +[:key_down_raw, 119, 0, 2, 52, 411] +[:key_down_raw, 119, 0, 2, 53, 412] +[:key_down_raw, 119, 0, 2, 54, 414] +[:key_down_raw, 119, 0, 2, 55, 416] +[:key_down_raw, 119, 0, 2, 56, 419] +[:key_down_raw, 119, 0, 2, 57, 421] +[:key_down_raw, 119, 0, 2, 58, 422] +[:key_down_raw, 119, 0, 2, 59, 424] +[:key_down_raw, 119, 0, 2, 60, 426] +[:key_down_raw, 119, 0, 2, 61, 429] +[:key_down_raw, 119, 0, 2, 62, 431] +[:key_down_raw, 119, 0, 2, 63, 432] +[:key_down_raw, 119, 0, 2, 64, 434] +[:key_down_raw, 119, 0, 2, 65, 436] +[:key_down_raw, 119, 0, 2, 66, 438] +[:key_down_raw, 119, 0, 2, 67, 441] +[:key_down_raw, 119, 0, 2, 68, 443] +[:key_down_raw, 119, 0, 2, 69, 444] +[:key_down_raw, 119, 0, 2, 70, 446] +[:key_down_raw, 119, 0, 2, 71, 449] +[:key_down_raw, 119, 0, 2, 72, 451] +[:key_down_raw, 119, 0, 2, 73, 453] +[:key_down_raw, 119, 0, 2, 74, 455] +[:key_down_raw, 119, 0, 2, 75, 457] +[:key_down_raw, 119, 0, 2, 76, 459] +[:key_down_raw, 119, 0, 2, 77, 460] +[:key_down_raw, 119, 0, 2, 78, 462] +[:key_down_raw, 119, 0, 2, 79, 464] +[:key_down_raw, 119, 0, 2, 80, 467] +[:key_down_raw, 119, 0, 2, 81, 468] +[:key_down_raw, 119, 0, 2, 82, 471] +[:key_down_raw, 119, 0, 2, 83, 473] +[:key_down_raw, 119, 0, 2, 84, 474] +[:key_down_raw, 119, 0, 2, 85, 476] +[:key_down_raw, 119, 0, 2, 86, 478] +[:key_down_raw, 119, 0, 2, 87, 481] +[:key_down_raw, 119, 0, 2, 88, 482] +[:key_down_raw, 119, 0, 2, 89, 484] +[:key_down_raw, 119, 0, 2, 90, 486] +[:key_down_raw, 119, 0, 2, 91, 489] +[:key_down_raw, 119, 0, 2, 92, 491] +[:key_down_raw, 119, 0, 2, 93, 493] +[:key_down_raw, 119, 0, 2, 94, 494] +[:key_down_raw, 119, 0, 2, 95, 496] +[:key_down_raw, 119, 0, 2, 96, 498] +[:key_down_raw, 119, 0, 2, 97, 501] +[:key_down_raw, 119, 0, 2, 98, 502] +[:key_down_raw, 119, 0, 2, 99, 505] +[:key_down_raw, 119, 0, 2, 100, 507] +[:key_down_raw, 119, 0, 2, 101, 509] +[:key_down_raw, 119, 0, 2, 102, 511] +[:key_down_raw, 119, 0, 2, 103, 512] +[:key_down_raw, 119, 0, 2, 104, 514] +[:key_down_raw, 119, 0, 2, 105, 516] +[:key_down_raw, 119, 0, 2, 106, 519] +[:key_down_raw, 119, 0, 2, 107, 521] +[:key_down_raw, 119, 0, 2, 108, 523] +[:key_down_raw, 119, 0, 2, 109, 524] +[:key_down_raw, 119, 0, 2, 110, 526] +[:key_down_raw, 119, 0, 2, 111, 529] +[:key_down_raw, 119, 0, 2, 112, 530] +[:key_down_raw, 119, 0, 2, 113, 533] +[:key_down_raw, 119, 0, 2, 114, 535] +[:key_down_raw, 119, 0, 2, 115, 536] +[:key_up_raw, 119, 0, 2, 116, 536] +[:key_down_raw, 100, 0, 2, 117, 548] +[:key_down_raw, 100, 0, 2, 118, 563] +[:key_down_raw, 100, 0, 2, 119, 565] +[:key_down_raw, 100, 0, 2, 120, 567] +[:key_down_raw, 100, 0, 2, 121, 569] +[:key_down_raw, 100, 0, 2, 122, 572] +[:key_down_raw, 100, 0, 2, 123, 573] +[:key_down_raw, 100, 0, 2, 124, 576] +[:key_down_raw, 100, 0, 2, 125, 577] +[:key_down_raw, 100, 0, 2, 126, 579] +[:key_down_raw, 100, 0, 2, 127, 582] +[:key_down_raw, 100, 0, 2, 128, 584] +[:key_down_raw, 100, 0, 2, 129, 585] +[:key_down_raw, 100, 0, 2, 130, 588] +[:key_down_raw, 100, 0, 2, 131, 589] +[:key_down_raw, 100, 0, 2, 132, 591] +[:key_down_raw, 100, 0, 2, 133, 593] +[:key_down_raw, 100, 0, 2, 134, 595] +[:key_down_raw, 100, 0, 2, 135, 597] +[:key_down_raw, 100, 0, 2, 136, 599] +[:key_down_raw, 100, 0, 2, 137, 601] +[:key_down_raw, 100, 0, 2, 138, 603] +[:key_down_raw, 100, 0, 2, 139, 605] +[:key_down_raw, 100, 0, 2, 140, 607] +[:key_up_raw, 100, 0, 2, 141, 608] +[:key_down_raw, 100, 0, 2, 142, 646] +[:key_up_raw, 100, 0, 2, 143, 654] +[:key_down_raw, 1073741906, 0, 2, 144, 696] +[:key_down_raw, 1073741906, 0, 2, 145, 711] +[:key_down_raw, 1073741906, 0, 2, 146, 713] +[:key_down_raw, 1073741906, 0, 2, 147, 715] +[:key_down_raw, 1073741906, 0, 2, 148, 717] +[:key_down_raw, 1073741906, 0, 2, 149, 719] +[:key_down_raw, 1073741906, 0, 2, 150, 721] +[:key_down_raw, 1073741906, 0, 2, 151, 723] +[:key_down_raw, 1073741906, 0, 2, 152, 725] +[:key_down_raw, 1073741906, 0, 2, 153, 727] +[:key_down_raw, 1073741906, 0, 2, 154, 729] +[:key_down_raw, 1073741906, 0, 2, 155, 731] +[:key_down_raw, 1073741906, 0, 2, 156, 733] +[:key_down_raw, 1073741906, 0, 2, 157, 735] +[:key_down_raw, 1073741906, 0, 2, 158, 737] +[:key_down_raw, 1073741906, 0, 2, 159, 739] +[:key_down_raw, 1073741906, 0, 2, 160, 741] +[:key_down_raw, 1073741906, 0, 2, 161, 743] +[:key_down_raw, 1073741906, 0, 2, 162, 745] +[:key_down_raw, 1073741906, 0, 2, 163, 747] +[:key_down_raw, 1073741906, 0, 2, 164, 749] +[:key_down_raw, 1073741906, 0, 2, 165, 751] +[:key_down_raw, 1073741906, 0, 2, 166, 753] +[:key_down_raw, 1073741906, 0, 2, 167, 755] +[:key_down_raw, 1073741906, 0, 2, 168, 757] +[:key_down_raw, 1073741906, 0, 2, 169, 759] +[:key_down_raw, 1073741906, 0, 2, 170, 761] +[:key_down_raw, 1073741906, 0, 2, 171, 763] +[:key_down_raw, 1073741906, 0, 2, 172, 765] +[:key_down_raw, 1073741906, 0, 2, 173, 767] +[:key_down_raw, 1073741906, 0, 2, 174, 769] +[:key_down_raw, 1073741906, 0, 2, 175, 771] +[:key_down_raw, 1073741906, 0, 2, 176, 773] +[:key_down_raw, 1073741906, 0, 2, 177, 775] +[:key_down_raw, 1073741906, 0, 2, 178, 777] +[:key_down_raw, 1073741906, 0, 2, 179, 779] +[:key_down_raw, 1073741906, 0, 2, 180, 781] +[:key_down_raw, 1073741906, 0, 2, 181, 783] +[:key_down_raw, 1073741904, 0, 2, 182, 784] +[:key_down_raw, 1073741904, 0, 2, 183, 798] +[:key_down_raw, 1073741904, 0, 2, 184, 800] +[:key_down_raw, 1073741904, 0, 2, 185, 802] +[:key_down_raw, 1073741904, 0, 2, 186, 804] +[:key_down_raw, 1073741904, 0, 2, 187, 806] +[:key_down_raw, 1073741904, 0, 2, 188, 810] +[:key_down_raw, 1073741904, 0, 2, 189, 810] +[:key_down_raw, 1073741904, 0, 2, 190, 814] +[:key_down_raw, 1073741904, 0, 2, 191, 815] +[:key_down_raw, 1073741904, 0, 2, 192, 818] +[:key_down_raw, 1073741904, 0, 2, 193, 819] +[:key_down_raw, 1073741904, 0, 2, 194, 822] +[:key_down_raw, 1073741904, 0, 2, 195, 824] +[:key_up_raw, 1073741906, 0, 2, 196, 824] +[:key_down_raw, 1073741904, 0, 2, 197, 825] +[:key_down_raw, 1073741904, 0, 2, 198, 828] +[:key_up_raw, 1073741904, 0, 2, 199, 828] +[:key_down_raw, 96, 0, 2, 200, 870] +[:key_up_raw, 96, 0, 2, 201, 875] +[:mouse_move, 802, 100, 2, 202, 933] +[:mouse_move, 803, 100, 2, 203, 934] +[:mouse_move, 806, 99, 2, 204, 935] +[:mouse_move, 808, 98, 2, 205, 936] +[:mouse_move, 813, 96, 2, 206, 937] +[:mouse_move, 816, 95, 2, 207, 938] +[:mouse_move, 824, 93, 2, 208, 939] +[:mouse_move, 827, 92, 2, 209, 940] +[:mouse_move, 837, 90, 2, 210, 941] +[:mouse_move, 843, 90, 2, 211, 942] +[:mouse_move, 857, 89, 2, 212, 943] +[:mouse_move, 864, 89, 2, 213, 944] +[:mouse_move, 874, 88, 2, 214, 945] +[:mouse_move, 876, 88, 2, 215, 946] +[:mouse_move, 878, 88, 2, 216, 947] +[:mouse_move, 881, 87, 2, 217, 948] +[:mouse_move, 882, 87, 2, 218, 950] +[:mouse_move, 884, 87, 2, 219, 950] +[:mouse_move, 885, 87, 2, 220, 951] +[:mouse_move, 887, 87, 2, 221, 952] +[:key_down_raw, 13, 0, 2, 222, 1047] diff --git a/samples/07_advanced_rendering/08_splitscreen_camera/sprites/player/player_down_standing.png b/samples/07_advanced_rendering/08_splitscreen_camera/sprites/player/player_down_standing.png new file mode 100644 index 0000000..9e27489 Binary files /dev/null and b/samples/07_advanced_rendering/08_splitscreen_camera/sprites/player/player_down_standing.png differ diff --git a/samples/07_advanced_rendering/08_splitscreen_camera/sprites/player/player_left_standing.png b/samples/07_advanced_rendering/08_splitscreen_camera/sprites/player/player_left_standing.png new file mode 100644 index 0000000..2fea35b Binary files /dev/null and b/samples/07_advanced_rendering/08_splitscreen_camera/sprites/player/player_left_standing.png differ diff --git a/samples/07_advanced_rendering/08_splitscreen_camera/sprites/player/player_right_standing.png b/samples/07_advanced_rendering/08_splitscreen_camera/sprites/player/player_right_standing.png new file mode 100644 index 0000000..6f3402e Binary files /dev/null and b/samples/07_advanced_rendering/08_splitscreen_camera/sprites/player/player_right_standing.png differ diff --git a/samples/07_advanced_rendering/08_splitscreen_camera/sprites/player/player_up_standing.png b/samples/07_advanced_rendering/08_splitscreen_camera/sprites/player/player_up_standing.png new file mode 100644 index 0000000..9ebdca7 Binary files /dev/null and b/samples/07_advanced_rendering/08_splitscreen_camera/sprites/player/player_up_standing.png differ diff --git a/samples/07_advanced_rendering/08_splitscreen_camera/sprites/rooms/camera_room.png b/samples/07_advanced_rendering/08_splitscreen_camera/sprites/rooms/camera_room.png new file mode 100644 index 0000000..e0ca375 Binary files /dev/null and b/samples/07_advanced_rendering/08_splitscreen_camera/sprites/rooms/camera_room.png differ diff --git a/samples/07_advanced_rendering/08_z_targeting_camera/app/main.rb b/samples/07_advanced_rendering/08_z_targeting_camera/app/main.rb deleted file mode 100644 index ecdbfd3..0000000 --- a/samples/07_advanced_rendering/08_z_targeting_camera/app/main.rb +++ /dev/null @@ -1,106 +0,0 @@ -class Game - attr_gtk - - def tick - defaults - render - input - calc - end - - def defaults - outputs.background_color = [219, 208, 191] - player.x ||= 634 - player.y ||= 153 - player.angle ||= 90 - player.distance ||= arena_radius - target.x ||= 634 - target.y ||= 359 - end - - def render - outputs[:scene].sprites << ([0, 0, 933, 700, 'sprites/arena.png'].center_inside_rect grid.rect) - outputs[:scene].sprites << target_sprite - outputs[:scene].sprites << player_sprite - outputs.sprites << scene - end - - def target_sprite - { - x: target.x, y: target.y, - w: 10, h: 10, - path: 'sprites/square/black.png' - }.anchor_rect 0.5, 0.5 - end - - def input - if inputs.up && player.distance > 30 - player.distance -= 2 - elsif inputs.down && player.distance < 200 - player.distance += 2 - end - - player.angle += inputs.left_right * -1 - end - - def calc - player.x = target.x + ((player.angle * 1).vector_x player.distance) - player.y = target.y + ((player.angle * -1).vector_y player.distance) - end - - def player_sprite - { - x: player.x, - y: player.y, - w: 50, - h: 100, - path: 'sprites/player.png', - angle: (player.angle * -1) + 90 - }.anchor_rect 0.5, 0 - end - - def center_map - { x: 634, y: 359 } - end - - def zoom_factor_single - 2 - ((args.geometry.distance player, center_map).fdiv arena_radius) - end - - def zoom_factor - zoom_factor_single ** 2 - end - - def arena_radius - 206 - end - - def scene - { - x: (640 - player.x) + (640 - (640 * zoom_factor)), - y: (360 - player.y - (75 * zoom_factor)) + (320 - (320 * zoom_factor)), - w: 1280 * zoom_factor, - h: 720 * zoom_factor, - path: :scene, - angle: player.angle - 90, - angle_anchor_x: (player.x.fdiv 1280), - angle_anchor_y: (player.y.fdiv 720) - } - end - - def player - state.player - end - - def target - state.target - end -end - -def tick args - $game ||= Game.new - $game.args = args - $game.tick -end - -$gtk.reset diff --git a/samples/07_advanced_rendering/08_z_targeting_camera/metadata/game_metadata.txt b/samples/07_advanced_rendering/08_z_targeting_camera/metadata/game_metadata.txt deleted file mode 100644 index 3ad3a1a..0000000 --- a/samples/07_advanced_rendering/08_z_targeting_camera/metadata/game_metadata.txt +++ /dev/null @@ -1,6 +0,0 @@ -devid=dragonruby -devtitle=DragonRuby LLC -gameid=httpserverexample -gametitle=DragonRuby GTK HTTP Server Example -version=0.1 -icon=metadata/icon.png diff --git a/samples/07_advanced_rendering/08_z_targeting_camera/metadata/icon.png b/samples/07_advanced_rendering/08_z_targeting_camera/metadata/icon.png deleted file mode 100644 index 57254fe..0000000 Binary files a/samples/07_advanced_rendering/08_z_targeting_camera/metadata/icon.png and /dev/null differ diff --git a/samples/07_advanced_rendering/08_z_targeting_camera/sprites/arena.png b/samples/07_advanced_rendering/08_z_targeting_camera/sprites/arena.png deleted file mode 100644 index 5c92e91..0000000 Binary files a/samples/07_advanced_rendering/08_z_targeting_camera/sprites/arena.png and /dev/null differ diff --git a/samples/07_advanced_rendering/08_z_targeting_camera/sprites/player.png b/samples/07_advanced_rendering/08_z_targeting_camera/sprites/player.png deleted file mode 100644 index 332a80b..0000000 Binary files a/samples/07_advanced_rendering/08_z_targeting_camera/sprites/player.png and /dev/null differ diff --git a/samples/07_advanced_rendering/08_z_targeting_camera/sprites/square/black.png b/samples/07_advanced_rendering/08_z_targeting_camera/sprites/square/black.png deleted file mode 100644 index cea7bd7..0000000 Binary files a/samples/07_advanced_rendering/08_z_targeting_camera/sprites/square/black.png and /dev/null differ diff --git a/samples/07_advanced_rendering/09_z_targeting_camera/app/main.rb b/samples/07_advanced_rendering/09_z_targeting_camera/app/main.rb new file mode 100644 index 0000000..ecdbfd3 --- /dev/null +++ b/samples/07_advanced_rendering/09_z_targeting_camera/app/main.rb @@ -0,0 +1,106 @@ +class Game + attr_gtk + + def tick + defaults + render + input + calc + end + + def defaults + outputs.background_color = [219, 208, 191] + player.x ||= 634 + player.y ||= 153 + player.angle ||= 90 + player.distance ||= arena_radius + target.x ||= 634 + target.y ||= 359 + end + + def render + outputs[:scene].sprites << ([0, 0, 933, 700, 'sprites/arena.png'].center_inside_rect grid.rect) + outputs[:scene].sprites << target_sprite + outputs[:scene].sprites << player_sprite + outputs.sprites << scene + end + + def target_sprite + { + x: target.x, y: target.y, + w: 10, h: 10, + path: 'sprites/square/black.png' + }.anchor_rect 0.5, 0.5 + end + + def input + if inputs.up && player.distance > 30 + player.distance -= 2 + elsif inputs.down && player.distance < 200 + player.distance += 2 + end + + player.angle += inputs.left_right * -1 + end + + def calc + player.x = target.x + ((player.angle * 1).vector_x player.distance) + player.y = target.y + ((player.angle * -1).vector_y player.distance) + end + + def player_sprite + { + x: player.x, + y: player.y, + w: 50, + h: 100, + path: 'sprites/player.png', + angle: (player.angle * -1) + 90 + }.anchor_rect 0.5, 0 + end + + def center_map + { x: 634, y: 359 } + end + + def zoom_factor_single + 2 - ((args.geometry.distance player, center_map).fdiv arena_radius) + end + + def zoom_factor + zoom_factor_single ** 2 + end + + def arena_radius + 206 + end + + def scene + { + x: (640 - player.x) + (640 - (640 * zoom_factor)), + y: (360 - player.y - (75 * zoom_factor)) + (320 - (320 * zoom_factor)), + w: 1280 * zoom_factor, + h: 720 * zoom_factor, + path: :scene, + angle: player.angle - 90, + angle_anchor_x: (player.x.fdiv 1280), + angle_anchor_y: (player.y.fdiv 720) + } + end + + def player + state.player + end + + def target + state.target + end +end + +def tick args + $game ||= Game.new + $game.args = args + $game.tick +end + +$gtk.reset diff --git a/samples/07_advanced_rendering/09_z_targeting_camera/metadata/game_metadata.txt b/samples/07_advanced_rendering/09_z_targeting_camera/metadata/game_metadata.txt new file mode 100644 index 0000000..3ad3a1a --- /dev/null +++ b/samples/07_advanced_rendering/09_z_targeting_camera/metadata/game_metadata.txt @@ -0,0 +1,6 @@ +devid=dragonruby +devtitle=DragonRuby LLC +gameid=httpserverexample +gametitle=DragonRuby GTK HTTP Server Example +version=0.1 +icon=metadata/icon.png diff --git a/samples/07_advanced_rendering/09_z_targeting_camera/metadata/icon.png b/samples/07_advanced_rendering/09_z_targeting_camera/metadata/icon.png new file mode 100644 index 0000000..57254fe Binary files /dev/null and b/samples/07_advanced_rendering/09_z_targeting_camera/metadata/icon.png differ diff --git a/samples/07_advanced_rendering/09_z_targeting_camera/replay.txt b/samples/07_advanced_rendering/09_z_targeting_camera/replay.txt new file mode 100644 index 0000000..db9130a --- /dev/null +++ b/samples/07_advanced_rendering/09_z_targeting_camera/replay.txt @@ -0,0 +1,185 @@ +replay_version 2.0 +stopped_at 741 +seed 100 +recorded_at Sat Jul 17 09:24:36 2021 +[:mouse_button_up, 1, 0, 1, 1, 4] +[:key_down_raw, 1073741906, 0, 2, 2, 104] +[:key_down_raw, 1073741906, 0, 2, 3, 118] +[:key_down_raw, 1073741906, 0, 2, 4, 120] +[:key_down_raw, 1073741906, 0, 2, 5, 122] +[:key_down_raw, 1073741906, 0, 2, 6, 124] +[:key_down_raw, 1073741906, 0, 2, 7, 126] +[:key_down_raw, 1073741906, 0, 2, 8, 128] +[:key_down_raw, 1073741906, 0, 2, 9, 130] +[:key_down_raw, 1073741906, 0, 2, 10, 132] +[:key_down_raw, 1073741906, 0, 2, 11, 134] +[:key_down_raw, 1073741906, 0, 2, 12, 136] +[:key_down_raw, 1073741906, 0, 2, 13, 138] +[:key_down_raw, 1073741906, 0, 2, 14, 140] +[:key_down_raw, 1073741906, 0, 2, 15, 142] +[:key_down_raw, 1073741906, 0, 2, 16, 144] +[:key_down_raw, 1073741906, 0, 2, 17, 146] +[:key_down_raw, 1073741906, 0, 2, 18, 148] +[:key_down_raw, 1073741906, 0, 2, 19, 150] +[:key_down_raw, 1073741906, 0, 2, 20, 152] +[:key_down_raw, 1073741906, 0, 2, 21, 154] +[:key_up_raw, 1073741906, 0, 2, 22, 156] +[:key_down_raw, 1073741904, 0, 2, 23, 165] +[:key_down_raw, 1073741904, 0, 2, 24, 180] +[:key_down_raw, 1073741904, 0, 2, 25, 182] +[:key_down_raw, 1073741904, 0, 2, 26, 184] +[:key_down_raw, 1073741904, 0, 2, 27, 186] +[:key_down_raw, 1073741904, 0, 2, 28, 188] +[:key_down_raw, 1073741904, 0, 2, 29, 190] +[:key_down_raw, 1073741904, 0, 2, 30, 192] +[:key_down_raw, 1073741904, 0, 2, 31, 194] +[:key_down_raw, 1073741904, 0, 2, 32, 196] +[:key_down_raw, 1073741904, 0, 2, 33, 198] +[:key_down_raw, 1073741904, 0, 2, 34, 200] +[:key_down_raw, 1073741904, 0, 2, 35, 202] +[:key_down_raw, 1073741904, 0, 2, 36, 204] +[:key_down_raw, 1073741904, 0, 2, 37, 206] +[:key_down_raw, 1073741904, 0, 2, 38, 208] +[:key_down_raw, 1073741904, 0, 2, 39, 210] +[:key_down_raw, 1073741904, 0, 2, 40, 212] +[:key_down_raw, 1073741904, 0, 2, 41, 214] +[:key_down_raw, 1073741904, 0, 2, 42, 216] +[:key_down_raw, 1073741904, 0, 2, 43, 218] +[:key_down_raw, 1073741904, 0, 2, 44, 220] +[:key_down_raw, 1073741904, 0, 2, 45, 222] +[:key_down_raw, 1073741904, 0, 2, 46, 224] +[:key_down_raw, 1073741904, 0, 2, 47, 226] +[:key_down_raw, 1073741904, 0, 2, 48, 228] +[:key_down_raw, 1073741904, 0, 2, 49, 230] +[:key_down_raw, 1073741904, 0, 2, 50, 232] +[:key_down_raw, 1073741904, 0, 2, 51, 234] +[:key_down_raw, 1073741904, 0, 2, 52, 236] +[:key_down_raw, 1073741904, 0, 2, 53, 238] +[:key_down_raw, 1073741904, 0, 2, 54, 240] +[:key_down_raw, 1073741904, 0, 2, 55, 242] +[:key_down_raw, 1073741904, 0, 2, 56, 244] +[:key_down_raw, 1073741904, 0, 2, 57, 246] +[:key_down_raw, 1073741904, 0, 2, 58, 248] +[:key_down_raw, 1073741904, 0, 2, 59, 250] +[:key_down_raw, 1073741904, 0, 2, 60, 252] +[:key_down_raw, 1073741904, 0, 2, 61, 254] +[:key_down_raw, 1073741906, 0, 2, 62, 256] +[:key_down_raw, 1073741906, 0, 2, 63, 271] +[:key_down_raw, 1073741906, 0, 2, 64, 273] +[:key_down_raw, 1073741906, 0, 2, 65, 275] +[:key_down_raw, 1073741906, 0, 2, 66, 277] +[:key_down_raw, 1073741906, 0, 2, 67, 279] +[:key_down_raw, 1073741906, 0, 2, 68, 281] +[:key_down_raw, 1073741906, 0, 2, 69, 283] +[:key_down_raw, 1073741906, 0, 2, 70, 285] +[:key_down_raw, 1073741906, 0, 2, 71, 287] +[:key_down_raw, 1073741906, 0, 2, 72, 289] +[:key_down_raw, 1073741906, 0, 2, 73, 291] +[:key_down_raw, 1073741906, 0, 2, 74, 293] +[:key_down_raw, 1073741906, 0, 2, 75, 295] +[:key_down_raw, 1073741906, 0, 2, 76, 297] +[:key_down_raw, 1073741906, 0, 2, 77, 299] +[:key_down_raw, 1073741906, 0, 2, 78, 301] +[:key_down_raw, 1073741906, 0, 2, 79, 303] +[:key_down_raw, 1073741906, 0, 2, 80, 305] +[:key_down_raw, 1073741906, 0, 2, 81, 307] +[:key_down_raw, 1073741906, 0, 2, 82, 309] +[:key_down_raw, 1073741906, 0, 2, 83, 311] +[:key_down_raw, 1073741906, 0, 2, 84, 313] +[:key_up_raw, 1073741906, 0, 2, 85, 314] +[:key_up_raw, 1073741904, 0, 2, 86, 316] +[:key_down_raw, 1073741903, 0, 2, 87, 338] +[:key_down_raw, 1073741903, 0, 2, 88, 353] +[:key_down_raw, 1073741903, 0, 2, 89, 355] +[:key_down_raw, 1073741903, 0, 2, 90, 357] +[:key_down_raw, 1073741903, 0, 2, 91, 359] +[:key_down_raw, 1073741903, 0, 2, 92, 361] +[:key_down_raw, 1073741903, 0, 2, 93, 363] +[:key_down_raw, 1073741903, 0, 2, 94, 365] +[:key_down_raw, 1073741903, 0, 2, 95, 367] +[:key_down_raw, 1073741903, 0, 2, 96, 369] +[:key_down_raw, 1073741903, 0, 2, 97, 371] +[:key_down_raw, 1073741903, 0, 2, 98, 373] +[:key_down_raw, 1073741903, 0, 2, 99, 375] +[:key_down_raw, 1073741903, 0, 2, 100, 377] +[:key_down_raw, 1073741903, 0, 2, 101, 379] +[:key_down_raw, 1073741903, 0, 2, 102, 381] +[:key_down_raw, 1073741905, 0, 2, 103, 382] +[:key_down_raw, 1073741905, 0, 2, 104, 397] +[:key_down_raw, 1073741905, 0, 2, 105, 399] +[:key_down_raw, 1073741905, 0, 2, 106, 401] +[:key_down_raw, 1073741905, 0, 2, 107, 403] +[:key_down_raw, 1073741905, 0, 2, 108, 405] +[:key_down_raw, 1073741905, 0, 2, 109, 407] +[:key_down_raw, 1073741905, 0, 2, 110, 409] +[:key_down_raw, 1073741905, 0, 2, 111, 411] +[:key_down_raw, 1073741905, 0, 2, 112, 413] +[:key_down_raw, 1073741905, 0, 2, 113, 415] +[:key_down_raw, 1073741905, 0, 2, 114, 417] +[:key_down_raw, 1073741905, 0, 2, 115, 419] +[:key_down_raw, 1073741905, 0, 2, 116, 421] +[:key_down_raw, 1073741905, 0, 2, 117, 423] +[:key_down_raw, 1073741905, 0, 2, 118, 425] +[:key_down_raw, 1073741905, 0, 2, 119, 427] +[:key_down_raw, 1073741905, 0, 2, 120, 429] +[:key_down_raw, 1073741905, 0, 2, 121, 431] +[:key_down_raw, 1073741905, 0, 2, 122, 433] +[:key_up_raw, 1073741905, 0, 2, 123, 435] +[:key_down_raw, 1073741905, 0, 2, 124, 447] +[:key_up_raw, 1073741905, 0, 2, 125, 460] +[:key_down_raw, 1073741905, 0, 2, 126, 485] +[:key_down_raw, 1073741905, 0, 2, 127, 500] +[:key_down_raw, 1073741905, 0, 2, 128, 502] +[:key_down_raw, 1073741905, 0, 2, 129, 504] +[:key_down_raw, 1073741905, 0, 2, 130, 506] +[:key_up_raw, 1073741905, 0, 2, 131, 507] +[:key_up_raw, 1073741903, 0, 2, 132, 548] +[:key_down_raw, 1073741905, 0, 2, 133, 561] +[:key_down_raw, 1073741905, 0, 2, 134, 576] +[:key_down_raw, 1073741905, 0, 2, 135, 578] +[:key_down_raw, 1073741905, 0, 2, 136, 580] +[:key_down_raw, 1073741905, 0, 2, 137, 582] +[:key_up_raw, 1073741905, 0, 2, 138, 584] +[:key_down_raw, 96, 0, 2, 139, 648] +[:key_up_raw, 96, 0, 2, 140, 653] +[:mouse_move, 815, 98, 2, 141, 654] +[:mouse_move, 816, 101, 2, 142, 655] +[:mouse_move, 816, 104, 2, 143, 656] +[:mouse_move, 816, 112, 2, 144, 657] +[:mouse_move, 816, 117, 2, 145, 658] +[:mouse_move, 810, 130, 2, 146, 659] +[:mouse_move, 803, 137, 2, 147, 660] +[:mouse_move, 782, 157, 2, 148, 661] +[:mouse_move, 767, 168, 2, 149, 662] +[:mouse_move, 734, 188, 2, 150, 663] +[:mouse_move, 716, 197, 2, 151, 664] +[:mouse_move, 682, 215, 2, 152, 665] +[:mouse_move, 665, 223, 2, 153, 666] +[:mouse_move, 645, 234, 2, 154, 667] +[:mouse_move, 643, 235, 2, 155, 668] +[:mouse_move, 643, 236, 2, 156, 669] +[:mouse_move, 647, 237, 2, 157, 672] +[:mouse_move, 670, 244, 2, 158, 673] +[:mouse_move, 687, 245, 2, 159, 674] +[:mouse_move, 720, 242, 2, 160, 675] +[:mouse_move, 737, 237, 2, 161, 676] +[:mouse_move, 764, 224, 2, 162, 677] +[:mouse_move, 777, 216, 2, 163, 678] +[:mouse_move, 796, 197, 2, 164, 679] +[:mouse_move, 804, 187, 2, 165, 680] +[:mouse_move, 815, 164, 2, 166, 681] +[:mouse_move, 820, 152, 2, 167, 682] +[:mouse_move, 825, 142, 2, 168, 683] +[:mouse_move, 831, 128, 2, 169, 684] +[:mouse_move, 832, 126, 2, 170, 685] +[:mouse_move, 832, 125, 2, 171, 686] +[:mouse_move, 833, 123, 2, 172, 688] +[:mouse_move, 836, 120, 2, 173, 690] +[:mouse_move, 837, 118, 2, 174, 691] +[:mouse_move, 842, 113, 2, 175, 692] +[:mouse_move, 844, 112, 2, 176, 693] +[:mouse_move, 844, 111, 2, 177, 694] +[:mouse_move, 844, 110, 2, 178, 696] +[:mouse_move, 845, 110, 2, 179, 697] +[:mouse_move, 845, 109, 2, 180, 699] +[:key_down_raw, 13, 0, 2, 181, 741] diff --git a/samples/07_advanced_rendering/09_z_targeting_camera/sprites/arena.png b/samples/07_advanced_rendering/09_z_targeting_camera/sprites/arena.png new file mode 100644 index 0000000..5c92e91 Binary files /dev/null and b/samples/07_advanced_rendering/09_z_targeting_camera/sprites/arena.png differ diff --git a/samples/07_advanced_rendering/09_z_targeting_camera/sprites/player.png b/samples/07_advanced_rendering/09_z_targeting_camera/sprites/player.png new file mode 100644 index 0000000..332a80b Binary files /dev/null and b/samples/07_advanced_rendering/09_z_targeting_camera/sprites/player.png differ diff --git a/samples/07_advanced_rendering/09_z_targeting_camera/sprites/square/black.png b/samples/07_advanced_rendering/09_z_targeting_camera/sprites/square/black.png new file mode 100644 index 0000000..cea7bd7 Binary files /dev/null and b/samples/07_advanced_rendering/09_z_targeting_camera/sprites/square/black.png differ diff --git a/samples/07_advanced_rendering/10_blend_modes/app/main.rb b/samples/07_advanced_rendering/10_blend_modes/app/main.rb new file mode 100644 index 0000000..7e28ba8 --- /dev/null +++ b/samples/07_advanced_rendering/10_blend_modes/app/main.rb @@ -0,0 +1,49 @@ +$gtk.reset + +def draw_blendmode args, mode + w = 160 + h = w + args.state.x += (1280-w) / (args.state.blendmodes.length + 1) + x = args.state.x + y = (720 - h) / 2 + s = 'sprites/blue-feathered.png' + args.outputs.sprites << { blendmode_enum: mode.value, x: x, y: y, w: w, h: h, path: s } + args.outputs.labels << [x + (w/2), y, mode.name.to_s, 1, 1, 255, 255, 255] +end + +def tick args + + # Different blend modes do different things, depending on what they + # blend against (in this case, the pixels of the background color). + args.state.bg_element ||= 1 + args.state.bg_color ||= 255 + args.state.bg_color_direction ||= 1 + bg_r = (args.state.bg_element == 1) ? args.state.bg_color : 0 + bg_g = (args.state.bg_element == 2) ? args.state.bg_color : 0 + bg_b = (args.state.bg_element == 3) ? args.state.bg_color : 0 + args.state.bg_color += args.state.bg_color_direction + if (args.state.bg_color_direction > 0) && (args.state.bg_color >= 255) + args.state.bg_color_direction = -1 + args.state.bg_color = 255 + elsif (args.state.bg_color_direction < 0) && (args.state.bg_color <= 0) + args.state.bg_color_direction = 1 + args.state.bg_color = 0 + args.state.bg_element += 1 + if args.state.bg_element >= 4 + args.state.bg_element = 1 + end + end + + args.outputs.background_color = [ bg_r, bg_g, bg_b, 255 ] + + args.state.blendmodes ||= [ + { name: :none, value: 0 }, + { name: :blend, value: 1 }, + { name: :add, value: 2 }, + { name: :mod, value: 3 }, + { name: :mul, value: 4 } + ] + + args.state.x = 0 # reset this, draw_blendmode will increment it. + args.state.blendmodes.each { |blendmode| draw_blendmode args, blendmode } +end diff --git a/samples/07_advanced_rendering/10_blend_modes/sprites/blue-feathered.png b/samples/07_advanced_rendering/10_blend_modes/sprites/blue-feathered.png new file mode 100644 index 0000000..a8bf6b5 Binary files /dev/null and b/samples/07_advanced_rendering/10_blend_modes/sprites/blue-feathered.png differ diff --git a/samples/09_performance/01_sprites_as_hash/app/main.rb b/samples/09_performance/01_sprites_as_hash/app/main.rb index 6bbb295..d032900 100644 --- a/samples/09_performance/01_sprites_as_hash/app/main.rb +++ b/samples/09_performance/01_sprites_as_hash/app/main.rb @@ -39,7 +39,11 @@ def tick args # sets console command when sample app initially opens if Kernel.global_tick_count == 0 - puts "* INFO - Please specify the number of sprites to render." + puts "" + puts "" + puts "=========================================================" + puts "* INFO: Sprites, Hashes" + puts "* INFO: Please specify the number of sprites to render." args.gtk.console.set_command "reset_with count: 100" end diff --git a/samples/09_performance/02_sprites_as_entities/app/main.rb b/samples/09_performance/02_sprites_as_entities/app/main.rb index 203dbe0..dba02ae 100644 --- a/samples/09_performance/02_sprites_as_entities/app/main.rb +++ b/samples/09_performance/02_sprites_as_entities/app/main.rb @@ -1,5 +1,5 @@ # Sprites represented as Entities using the queue ~args.outputs.sprites~ -# yields nicer access apis over Hashes, but requires a bit more code upfront. +# yields nicer access apis over Hashes, but require a bit more code upfront. # The hash sample has to use star[:s] to get the speed of the star, but # an entity can use .s instead. def random_x args @@ -39,7 +39,11 @@ def tick args # sets console command when sample app initially opens if Kernel.global_tick_count == 0 - puts "* INFO - Please specify the number of sprites to render." + puts "" + puts "" + puts "=========================================================" + puts "* INFO: Sprites, Open Entities" + puts "* INFO: Please specify the number of sprites to render." args.gtk.console.set_command "reset_with count: 100" end diff --git a/samples/09_performance/03_sprites_as_strict_entities/app/main.rb b/samples/09_performance/03_sprites_as_strict_entities/app/main.rb index 376d9a1..a2688c2 100644 --- a/samples/09_performance/03_sprites_as_strict_entities/app/main.rb +++ b/samples/09_performance/03_sprites_as_strict_entities/app/main.rb @@ -43,7 +43,11 @@ def tick args # sets console command when sample app initially opens if Kernel.global_tick_count == 0 - puts "* INFO - Please specify the number of sprites to render." + puts "" + puts "" + puts "=========================================================" + puts "* INFO: Sprites, Strict Entities" + puts "* INFO: Please specify the number of sprites to render." args.gtk.console.set_command "reset_with count: 100" end diff --git a/samples/09_performance/04_sprites_as_classes/app/main.rb b/samples/09_performance/04_sprites_as_classes/app/main.rb index d69dc66..67cde79 100644 --- a/samples/09_performance/04_sprites_as_classes/app/main.rb +++ b/samples/09_performance/04_sprites_as_classes/app/main.rb @@ -22,10 +22,15 @@ class Star end end -# calls methods needed for the game to run properly +# calls methods needed for game to run properly def tick args # sets console command when sample app initially opens if Kernel.global_tick_count == 0 + puts "" + puts "" + puts "=========================================================" + puts "* INFO: Sprites, Classes" + puts "* INFO: Please specify the number of sprites to render." args.gtk.console.set_command "reset_with count: 100" end diff --git a/samples/09_performance/05_static_sprites_as_classes/app/main.rb b/samples/09_performance/05_static_sprites_as_classes/app/main.rb index f87b110..db5bf8e 100644 --- a/samples/09_performance/05_static_sprites_as_classes/app/main.rb +++ b/samples/09_performance/05_static_sprites_as_classes/app/main.rb @@ -23,23 +23,28 @@ class Star end end -# calls methods needed for the game to run properly +# calls methods needed for game to run properly def tick args # sets console command when sample app initially opens if Kernel.global_tick_count == 0 + puts "" + puts "" + puts "=========================================================" + puts "* INFO: Static Sprites, Classes" + puts "* INFO: Please specify the number of sprites to render." args.gtk.console.set_command "reset_with count: 100" end # init if args.state.tick_count == 0 args.state.stars = args.state.star_count.map { |i| Star.new args.grid } + args.outputs.static_sprites << args.state.stars end # update args.state.stars.each(&:move) # render - args.outputs.sprites << args.state.stars args.outputs.background_color = [0, 0, 0] args.outputs.primitives << args.gtk.current_framerate_primitives end diff --git a/samples/09_performance/06_static_sprites_as_classes_with_custom_drawing/app/main.rb b/samples/09_performance/06_static_sprites_as_classes_with_custom_drawing/app/main.rb index 31f5c9f..3291f5e 100644 --- a/samples/09_performance/06_static_sprites_as_classes_with_custom_drawing/app/main.rb +++ b/samples/09_performance/06_static_sprites_as_classes_with_custom_drawing/app/main.rb @@ -39,18 +39,34 @@ class Star # x, y, w, h, # path, # angle, - # alpha, red_saturation, green_saturation, blue_saturation, + # alpha, red_saturation, green_saturation, blue_saturation # tile_x, tile_y, tile_w, tile_h, # flip_horizontally, flip_vertically, # angle_anchor_x, angle_anchor_y, # source_x, source_y, source_w, source_h + + # The argument order for ffi_draw.draw_sprite_4 is: + # x, y, w, h, + # path, + # angle, + # alpha, red_saturation, green_saturation, blue_saturation + # tile_x, tile_y, tile_w, tile_h, + # flip_horizontally, flip_vertically, + # angle_anchor_x, angle_anchor_y, + # source_x, source_y, source_w, source_h, + # blendmode_enum end end -# calls methods needed for the game to run properly +# calls methods needed for game to run properly def tick args # sets console command when sample app initially opens if Kernel.global_tick_count == 0 + puts "" + puts "" + puts "=========================================================" + puts "* INFO: Static Sprites, Classes, Draw Override" + puts "* INFO: Please specify the number of sprites to render." args.gtk.console.set_command "reset_with count: 100" end diff --git a/samples/09_performance/07_collision_limits/app/main.rb b/samples/09_performance/07_collision_limits/app/main.rb index 4a7945c..01ad308 100644 --- a/samples/09_performance/07_collision_limits/app/main.rb +++ b/samples/09_performance/07_collision_limits/app/main.rb @@ -6,9 +6,11 @@ - args.outputs.solids: An array. The values generate a solid. The parameters are [X, Y, WIDTH, HEIGHT, RED, GREEN, BLUE] + For more information about solids, go to mygame/documentation/03-solids-and-borders.md. - args.outputs.labels: An array. The values generate a label. The parameters are [X, Y, TEXT, SIZE, ALIGNMENT, RED, GREEN, BLUE, ALPHA, FONT STYLE] + For more information about labels, go to mygame/documentation/02-labels.md. - ARRAY#intersect_rect?: Returns true or false depending on if two rectangles intersect. diff --git a/samples/10_advanced_debugging/03_unit_tests/benchmark_api_tests.rb b/samples/10_advanced_debugging/03_unit_tests/benchmark_api_tests.rb new file mode 100644 index 0000000..2c06f1a --- /dev/null +++ b/samples/10_advanced_debugging/03_unit_tests/benchmark_api_tests.rb @@ -0,0 +1,43 @@ +def test_benchmark_api args, assert + result = args.gtk.benchmark iterations: 100, + only_one: -> () { + r = 0 + (1..100).each do |i| + r += 1 + end + } + + assert.equal! result.first_place.name, :only_one + + result = args.gtk.benchmark iterations: 100, + iterations_100: -> () { + r = 0 + (1..100).each do |i| + r += 1 + end + }, + iterations_50: -> () { + r = 0 + (1..50).each do |i| + r += 1 + end + } + + assert.equal! result.first_place.name, :iterations_50 + + result = args.gtk.benchmark iterations: 1, + iterations_100: -> () { + r = 0 + (1..100).each do |i| + r += 1 + end + }, + iterations_50: -> () { + r = 0 + (1..50).each do |i| + r += 1 + end + } + + assert.equal! result.too_small_to_measure, true +end diff --git a/samples/10_advanced_debugging/03_unit_tests/pretty_format_tests.rb b/samples/10_advanced_debugging/03_unit_tests/pretty_format_tests.rb new file mode 100644 index 0000000..6ac7b05 --- /dev/null +++ b/samples/10_advanced_debugging/03_unit_tests/pretty_format_tests.rb @@ -0,0 +1,130 @@ +def H opts + opts +end + +def A *opts + opts +end + +def assert_format args, assert, hash, expected + actual = args.fn.pretty_format hash + assert.are_equal! actual, expected +end + +def test_pretty_print args, assert + # ============================= + # hash with single value + # ============================= + input = (H first_name: "John") + expected = <<-S +{:first_name "John"} +S + (assert_format args, assert, input, expected) + + # ============================= + # hash with two values + # ============================= + input = (H first_name: "John", last_name: "Smith") + expected = <<-S +{:first_name "John" + :last_name "Smith"} +S + + (assert_format args, assert, input, expected) + + # ============================= + # hash with inner hash + # ============================= + input = (H first_name: "John", + last_name: "Smith", + middle_initial: "I", + so: (H first_name: "Pocahontas", + last_name: "Tsenacommacah"), + friends: (A (H first_name: "Side", last_name: "Kick"), + (H first_name: "Tim", last_name: "Wizard"))) + expected = <<-S +{:first_name "John" + :last_name "Smith" + :middle_initial "I" + :so {:first_name "Pocahontas" + :last_name "Tsenacommacah"} + :friends [{:first_name "Side" + :last_name "Kick"} + {:first_name "Tim" + :last_name "Wizard"}]} +S + + (assert_format args, assert, input, expected) + + # ============================= + # array with one value + # ============================= + input = (A 1) + expected = <<-S +[1] +S + (assert_format args, assert, input, expected) + + # ============================= + # array with multiple values + # ============================= + input = (A 1, 2, 3) + expected = <<-S +[1 + 2 + 3] +S + (assert_format args, assert, input, expected) + + # ============================= + # array with multiple values hashes + # ============================= + input = (A (H first_name: "Side", last_name: "Kick"), + (H first_name: "Tim", last_name: "Wizard")) + expected = <<-S +[{:first_name "Side" + :last_name "Kick"} + {:first_name "Tim" + :last_name "Wizard"}] +S + + (assert_format args, assert, input, expected) +end + +def test_nested_nested args, assert + # ============================= + # nested array in nested hash + # ============================= + input = (H type: :root, + text: "Root", + children: (A (H level: 1, + text: "Level 1", + children: (A (H level: 2, + text: "Level 2", + children: []))))) + + expected = <<-S +{:type :root + :text "Root" + :children [{:level 1 + :text "Level 1" + :children [{:level 2 + :text "Level 2" + :children []}]}]} + +S + + (assert_format args, assert, input, expected) +end + +def test_scene args, assert + script = <<-S +* Scene 1 +** Narrator +They say happy endings don't exist. +** Narrator +They say true love is a lie. +S + input = parse_org args, script + puts (args.fn.pretty_format input) +end diff --git a/samples/10_advanced_debugging/03_unit_tests/run-bash.sh b/samples/10_advanced_debugging/03_unit_tests/run-bash.sh deleted file mode 100644 index 005077b..0000000 --- a/samples/10_advanced_debugging/03_unit_tests/run-bash.sh +++ /dev/null @@ -1,4 +0,0 @@ -sh ./amir-build-and-run.sh --eval samples/99_zz_gtk_unit_tests/geometry_tests.rb --no-tick -sh ./amir-build-and-run.sh --eval samples/99_zz_gtk_unit_tests/parsing_tests.rb --no-tick -sh ./amir-build-and-run.sh --eval samples/99_zz_gtk_unit_tests/http_tests.rb --no-tick -sh ./amir-build-and-run.sh --eval samples/99_zz_gtk_unit_tests/array_to_primitive_tests.rb --no-tick diff --git a/samples/10_advanced_debugging/03_unit_tests/run-tests.sh b/samples/10_advanced_debugging/03_unit_tests/run-tests.sh index e551edf..d8b1a4a 100644 --- a/samples/10_advanced_debugging/03_unit_tests/run-tests.sh +++ b/samples/10_advanced_debugging/03_unit_tests/run-tests.sh @@ -1,10 +1,17 @@ -./dragonruby mygame --test samples/10_advanced_debugging/03_unit_tests/require_tests.rb -./dragonruby mygame --test samples/10_advanced_debugging/03_unit_tests/gen_docs.rb -./dragonruby mygame --test samples/10_advanced_debugging/03_unit_tests/geometry_tests.rb -./dragonruby mygame --test samples/10_advanced_debugging/03_unit_tests/http_tests.rb -./dragonruby mygame --test samples/10_advanced_debugging/03_unit_tests/object_to_primitive_tests.rb -./dragonruby mygame --test samples/10_advanced_debugging/03_unit_tests/parsing_tests.rb -./dragonruby mygame --test samples/10_advanced_debugging/03_unit_tests/require_tests.rb -./dragonruby mygame --test samples/10_advanced_debugging/03_unit_tests/serialize_deserialize_tests.rb -./dragonruby mygame --test samples/10_advanced_debugging/03_unit_tests/state_serialization_experimental_tests.rb -./dragonruby mygame --test samples/10_advanced_debugging/03_unit_tests/suggest_autocompletion_tests.rb +# fswatch ./samples/10_advanced_debugging/03_unit_tests/benchmark_api_tests.rb | xargs -n1 -I{} sh ./samples/10_advanced_debugging/03_unit_tests/run-tests.sh +# set -e +# rake +# ./dragonruby mygame --test samples/10_advanced_debugging/03_unit_tests/require_tests.rb +# ./dragonruby mygame --test samples/10_advanced_debugging/03_unit_tests/gen_docs.rb +# ./dragonruby mygame --test samples/10_advanced_debugging/03_unit_tests/geometry_tests.rb +# ./dragonruby mygame --test samples/10_advanced_debugging/03_unit_tests/http_tests.rb +# ./dragonruby mygame --test samples/10_advanced_debugging/03_unit_tests/object_to_primitive_tests.rb +# ./dragonruby mygame --test samples/10_advanced_debugging/03_unit_tests/parsing_tests.rb +# ./dragonruby mygame --test samples/10_advanced_debugging/03_unit_tests/require_tests.rb +# ./dragonruby mygame --test samples/10_advanced_debugging/03_unit_tests/serialize_deserialize_tests.rb +# ./dragonruby mygame --test samples/10_advanced_debugging/03_unit_tests/state_serialization_experimental_tests.rb +# ./dragonruby mygame --test samples/10_advanced_debugging/03_unit_tests/suggest_autocompletion_tests.rb +# ./dragonruby mygame --test samples/10_advanced_debugging/03_unit_tests/nil_coercion_tests.rb +# ./dragonruby mygame --test samples/10_advanced_debugging/03_unit_tests/fn_tests.rb +# ./dragonruby mygame --test samples/10_advanced_debugging/03_unit_tests/pretty_format_test.rb +./dragonruby mygame --test samples/10_advanced_debugging/03_unit_tests/benchmark_api_tests.rb diff --git a/samples/13_path_finding_algorithms/01_breadth_first_search/app/main.rb b/samples/13_path_finding_algorithms/01_breadth_first_search/app/main.rb index c8e1633..8b84f1c 100644 --- a/samples/13_path_finding_algorithms/01_breadth_first_search/app/main.rb +++ b/samples/13_path_finding_algorithms/01_breadth_first_search/app/main.rb @@ -35,19 +35,19 @@ class BreadthFirstSearch # Stores which step of the animation is being rendered # When the user moves the star or messes with the walls, # the breadth first search is recalculated up to this step - args.state.anim_steps = 0 + args.state.anim_steps = 0 # At some step the animation will end, # and further steps won't change anything (the whole grid will be explored) # This step is roughly the grid's width * height # When anim_steps equals max_steps no more calculations will occur # and the slider will be at the end - args.state.max_steps = args.state.grid.width * args.state.grid.height + args.state.max_steps = args.state.grid.width * args.state.grid.height # Whether the animation should play or not # If true, every tick moves anim_steps forward one # Pressing the stepwise animation buttons will pause the animation - args.state.play = true + args.state.play = true # The location of the star and walls of the grid # They can be modified to have a different initial grid @@ -116,7 +116,7 @@ class BreadthFirstSearch [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 @@ -132,7 +132,7 @@ class BreadthFirstSearch # 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. - args.state.click_and_drag = :none + args.state.click_and_drag = :none # Store the rects of the buttons that control the animation # They are here for user customization @@ -166,13 +166,13 @@ class BreadthFirstSearch # User input is processed, and # The next step in the search is calculated def tick - render - input + render + input # If animation is playing, and max steps have not been reached # Move the search a step forward if state.play && state.anim_steps < state.max_steps # Variable that tells the program what step to recalculate up to - state.anim_steps += 1 + state.anim_steps += 1 calc end end @@ -182,8 +182,8 @@ class BreadthFirstSearch render_buttons render_slider - render_background - render_visited + render_background + render_visited render_frontier render_walls render_star @@ -251,7 +251,7 @@ class BreadthFirstSearch outputs.primitives << [slider.x, slider.y, slider.x + slider.w, slider.y].line # The circle needs to be offset so that the center of the circle # overlaps the line instead of the upper right corner of the circle - # The circle's x value is also moved based on the current search step + # The circle's x value is also moved based on the current seach step circle_x = (slider.x - slider.offset) + (state.anim_steps * slider.spacing) circle_y = (slider.y - slider.offset) circle_rect = [circle_x, circle_y, 37, 37] @@ -260,8 +260,8 @@ class BreadthFirstSearch # 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 a rectangle the size of the entire grid to represent unvisited cells @@ -276,7 +276,7 @@ class BreadthFirstSearch end for y in 0..grid.height - outputs.lines << horizontal_line(y) + outputs.lines << horizontal_line(y) end end @@ -294,28 +294,28 @@ class BreadthFirstSearch # The frontier is the most outward parts of the search def render_frontier outputs.solids << state.frontier.map do |cell| - [scale_up(cell), frontier_color] + [scale_up([cell.x, cell.y]), frontier_color] end end # Draws the walls def render_walls outputs.solids << state.walls.map do |wall| - [scale_up(wall), wall_color] + [scale_up([wall.x, wall.y]), wall_color] end end # Renders cells that have been searched in the appropriate color def render_visited outputs.solids << state.visited.map do |cell| - [scale_up(cell), visited_color] + [scale_up([cell.x, cell.y]), visited_color] end end # Renders the star def render_star outputs.sprites << [scale_up(state.star), 'star.png'] - end + end # In code, the cells are represented as 1x1 rectangles # When drawn, the cells are larger than 1x1 rectangles @@ -369,20 +369,20 @@ class BreadthFirstSearch # The detection and processing of click and drag inputs are separate # The program has to remember that the user is dragging an object # even when the mouse is no longer over that object - detect_click_and_drag - process_click_and_drag + detect_click_and_drag + process_click_and_drag end # Detects and Process input for each button def input_buttons - input_left_button - input_center_button - input_next_step_button + input_left_button + input_center_button + input_next_step_button end # Checks if the previous step button is clicked # If it is, it pauses the animation and moves the search one step backward - def input_left_button + def input_left_button if left_button_clicked? state.play = false state.anim_steps -= 1 @@ -394,7 +394,7 @@ class BreadthFirstSearch # Inverses whether the animation is playing or not when clicked def input_center_button if center_button_clicked? or inputs.keyboard.key_down.space - state.play = !state.play + state.play = !state.play end end @@ -402,8 +402,8 @@ class BreadthFirstSearch # If it is, it pauses the animation and moves the search one step forward def input_next_step_button if right_button_clicked? - state.play = false - state.anim_steps += 1 + state.play = false + state.anim_steps += 1 calc end end @@ -412,29 +412,29 @@ class BreadthFirstSearch # Storing the value allows the user to continue the same edit as long as the # mouse left click is held def detect_click_and_drag - if inputs.mouse.up - state.click_and_drag = :none - elsif star_clicked? - state.click_and_drag = :star - elsif wall_clicked? - state.click_and_drag = :remove_wall - elsif grid_clicked? - state.click_and_drag = :add_wall - elsif slider_clicked? - state.click_and_drag = :slider + if inputs.mouse.up + state.click_and_drag = :none + elsif star_clicked? + state.click_and_drag = :star + elsif wall_clicked? + state.click_and_drag = :remove_wall + elsif grid_clicked? + state.click_and_drag = :add_wall + elsif slider_clicked? + state.click_and_drag = :slider end end # Processes click and drag based on what the user is currently dragging def process_click_and_drag - if state.click_and_drag == :star - input_star - elsif state.click_and_drag == :remove_wall - input_remove_wall - elsif state.click_and_drag == :add_wall - input_add_wall - elsif state.click_and_drag == :slider - input_slider + if state.click_and_drag == :star + input_star + elsif state.click_and_drag == :remove_wall + input_remove_wall + elsif state.click_and_drag == :add_wall + input_add_wall + elsif state.click_and_drag == :slider + input_slider end end @@ -442,10 +442,10 @@ class BreadthFirstSearch # Only recalculates 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 = state.star.clone + old_star = state.star.clone state.star = cell_closest_to_mouse - unless old_star == state.star - recalculate + unless old_star == state.star + recalculate end end @@ -454,20 +454,20 @@ class BreadthFirstSearch # 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 state.walls.has_key?(cell_closest_to_mouse) - state.walls.delete(cell_closest_to_mouse) - recalculate + state.walls.delete(cell_closest_to_mouse) + recalculate end end end # Adds walls at cells under the cursor def input_add_wall - if mouse_inside_grid? + if mouse_inside_grid? unless state.walls.has_key?(cell_closest_to_mouse) - state.walls[cell_closest_to_mouse] = true - recalculate + state.walls[cell_closest_to_mouse] = true + recalculate end end end @@ -477,18 +477,18 @@ class BreadthFirstSearch # on the slider # Changes the step of the search to be animated def input_slider - state.play = false + state.play = false mouse_x = inputs.mouse.point.x # Bounds the mouse_x to the closest x value on the slider line - mouse_x = slider.x if mouse_x < slider.x - mouse_x = slider.x + slider.w if mouse_x > slider.x + slider.w + mouse_x = slider.x if mouse_x < slider.x + mouse_x = slider.x + slider.w if mouse_x > slider.x + slider.w # Sets the current search step to the one represented by the mouse x value # The slider's circle moves due to the render_slider method using anim_steps state.anim_steps = ((mouse_x - slider.x) / slider.spacing).to_i - recalculate + recalculate end # Whenever the user edits the grid, @@ -496,11 +496,11 @@ class BreadthFirstSearch # with the current grid as the initial state of the grid def recalculate # Resets the search - state.frontier = [] - state.visited = {} + state.frontier = [] + state.visited = {} # Moves the animation forward one step at a time - state.anim_steps.times { calc } + state.anim_steps.times { calc } end @@ -515,39 +515,39 @@ class BreadthFirstSearch # The setup to the search # Runs once when the there is no frontier or visited cells - if state.frontier.empty? && state.visited.empty? - state.frontier << state.star - state.visited[state.star] = true + if state.frontier.empty? && state.visited.empty? + state.frontier << state.star + state.visited[state.star] = true end # A step in the search - unless state.frontier.empty? + unless state.frontier.empty? # Takes the next frontier cell - new_frontier = state.frontier.shift + new_frontier = state.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 state.visited.has_key?(neighbor) || state.walls.has_key?(neighbor) + unless state.visited.has_key?(neighbor) || state.walls.has_key?(neighbor) # Add them to the frontier and mark them as visited - state.frontier << neighbor - state.visited[neighbor] = true + state.frontier << neighbor + state.visited[neighbor] = true end end end end - + # 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 = [] - 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 + neighbors << [cell.x, cell.y - 1] unless cell.y == 0 + neighbors << [cell.x - 1, cell.y] unless cell.x == 0 - neighbors + neighbors end # When the user grabs the star and puts their cursor to the far right @@ -555,13 +555,13 @@ class BreadthFirstSearch # Finding the cell closest to the mouse helps with this def cell_closest_to_mouse # Closest cell to the mouse - 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 # These methods detect when the buttons are clicked @@ -605,7 +605,7 @@ class BreadthFirstSearch # Part of the condition that checks whether the user is removing a wall def mouse_inside_a_wall? state.walls.each_key do | wall | - return true if inputs.mouse.point.inside_rect?(scale_up(wall)) + return true if inputs.mouse.point.inside_rect?(scale_up([wall.x, wall.y])) end false @@ -622,27 +622,27 @@ class BreadthFirstSearch # Light brown def unvisited_color - [221, 212, 213] + [221, 212, 213] end # Black def grid_line_color - [255, 255, 255] + [255, 255, 255] end # Dark Brown def visited_color - [204, 191, 179] + [204, 191, 179] end # Blue def frontier_color - [103, 136, 204] + [103, 136, 204] end # Camo Green def wall_color - [134, 134, 120] + [134, 134, 120] end # Button Background diff --git a/samples/13_path_finding_algorithms/02_detailed_breadth_first_search/app/main.rb b/samples/13_path_finding_algorithms/02_detailed_breadth_first_search/app/main.rb index d4c9c1c..810ff7b 100644 --- a/samples/13_path_finding_algorithms/02_detailed_breadth_first_search/app/main.rb +++ b/samples/13_path_finding_algorithms/02_detailed_breadth_first_search/app/main.rb @@ -168,7 +168,7 @@ class DetailedBreadthFirstSearch outputs.primitives << [slider.x, slider.y, slider.x + slider.w, slider.y].line # The circle needs to be offset so that the center of the circle # overlaps the line instead of the upper right corner of the circle - # The circle's x value is also moved based on the current search step + # The circle's x value is also moved based on the current seach step circle_x = (slider.x - slider.offset) + (state.anim_steps * slider.spacing) circle_y = (slider.y - slider.offset) circle_rect = [circle_x, circle_y, 37, 37] diff --git a/samples/13_path_finding_algorithms/06_heuristic/app/main.rb b/samples/13_path_finding_algorithms/06_heuristic/app/main.rb index 10beba3..cbdfca7 100644 --- a/samples/13_path_finding_algorithms/06_heuristic/app/main.rb +++ b/samples/13_path_finding_algorithms/06_heuristic/app/main.rb @@ -10,13 +10,13 @@ class Heuristic_With_Walls def tick defaults - render - input + render + input # If animation is playing, and max steps have not been reached # Move the search a step forward if state.play && state.current_step < state.max_steps # Variable that tells the program what step to recalculate up to - state.current_step += 1 + state.current_step += 1 move_searches_one_step_forward end end @@ -38,7 +38,7 @@ class Heuristic_With_Walls # 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.user_input ||= :none + state.user_input ||= :none # These variables allow the breadth first search to take place # Came_from is a hash with a key of a cell and a value of the cell that was expanded from to find the key. @@ -63,7 +63,7 @@ class Heuristic_With_Walls # Unless the current step has a value unless state.current_step # Set the current step to 10 - state.current_step = 10 + state.current_step = 10 # And calculate the searches up to step 10 recalculate_searches end @@ -73,7 +73,7 @@ class Heuristic_With_Walls # This step is roughly the grid's width * height # When anim_steps equals max_steps no more calculations will occur # and the slider will be at the end - state.max_steps = grid.width * grid.height + state.max_steps = grid.width * grid.height # Whether the animation should play or not # If true, every tick moves anim_steps forward one @@ -166,7 +166,7 @@ class Heuristic_With_Walls # If the mouse was clicked this tick if inputs.mouse.down # Determine what the user is editing and appropriately edit the state.user_input variable - determine_input + determine_input end # Process user input based on user_input variable and current mouse position @@ -179,35 +179,35 @@ class Heuristic_With_Walls if mouse_over_slider? state.user_input = :slider # If the mouse is over the star in the first grid - elsif bfs_mouse_over_star? + elsif bfs_mouse_over_star? # The user is editing the star from the first grid - state.user_input = :bfs_star + state.user_input = :bfs_star # If the mouse is over the star in the second grid - elsif heuristic_mouse_over_star? + elsif heuristic_mouse_over_star? # The user is editing the star from the second grid - state.user_input = :heuristic_star + state.user_input = :heuristic_star # If the mouse is over the target in the first grid - elsif bfs_mouse_over_target? + elsif bfs_mouse_over_target? # The user is editing the target from the first grid - state.user_input = :bfs_target + state.user_input = :bfs_target # If the mouse is over the target in the second grid - elsif heuristic_mouse_over_target? + elsif heuristic_mouse_over_target? # The user is editing the target from the second grid - state.user_input = :heuristic_target + state.user_input = :heuristic_target # If the mouse is over a wall in the first grid - elsif bfs_mouse_over_wall? + elsif bfs_mouse_over_wall? # The user is removing a wall from the first grid - state.user_input = :bfs_remove_wall + state.user_input = :bfs_remove_wall # If the mouse is over a wall in the second grid - elsif heuristic_mouse_over_wall? + elsif heuristic_mouse_over_wall? # The user is removing a wall from the second grid state.user_input = :heuristic_remove_wall # If the mouse is over the first grid - elsif bfs_mouse_over_grid? + elsif bfs_mouse_over_grid? # The user is adding a wall from the first grid state.user_input = :bfs_add_wall # If the mouse is over the second grid - elsif heuristic_mouse_over_grid? + elsif heuristic_mouse_over_grid? # The user is adding a wall from the second grid state.user_input = :heuristic_add_wall end @@ -217,22 +217,22 @@ class Heuristic_With_Walls def process_input if state.user_input == :slider process_input_slider - elsif state.user_input == :bfs_star - process_input_bfs_star + elsif state.user_input == :bfs_star + process_input_bfs_star elsif state.user_input == :heuristic_star - process_input_heuristic_star - elsif state.user_input == :bfs_target - process_input_bfs_target - elsif state.user_input == :heuristic_target - process_input_heuristic_target - elsif state.user_input == :bfs_remove_wall - process_input_bfs_remove_wall + process_input_heuristic_star + elsif state.user_input == :bfs_target + process_input_bfs_target + elsif state.user_input == :heuristic_target + process_input_heuristic_target + elsif state.user_input == :bfs_remove_wall + process_input_bfs_remove_wall elsif state.user_input == :heuristic_remove_wall - process_input_heuristic_remove_wall - elsif state.user_input == :bfs_add_wall - process_input_bfs_add_wall - elsif state.user_input == :heuristic_add_wall - process_input_heuristic_add_wall + process_input_heuristic_remove_wall + elsif state.user_input == :bfs_add_wall + process_input_bfs_add_wall + elsif state.user_input == :heuristic_add_wall + process_input_heuristic_add_wall end end @@ -242,7 +242,7 @@ class Heuristic_With_Walls outputs.primitives << [slider.x, slider.y, slider.x + slider.w, slider.y].line # The circle needs to be offset so that the center of the circle # overlaps the line instead of the upper right corner of the circle - # The circle's x value is also moved based on the current search step + # The circle's x value is also moved based on the current seach step circle_x = (slider.x - slider.offset) + (state.current_step * slider.spacing) circle_y = (slider.y - slider.offset) circle_rect = [circle_x, circle_y, 37, 37] @@ -309,7 +309,7 @@ class Heuristic_With_Walls # The horizontal grid lines for y in 0..grid.height - outputs.lines << bfs_horizontal_line(y) + outputs.lines << bfs_horizontal_line(y) end end @@ -324,10 +324,10 @@ class Heuristic_With_Walls # The horizontal grid lines for y in 0..grid.height - outputs.lines << heuristic_horizontal_line(y) + outputs.lines << heuristic_horizontal_line(y) end end - + # Returns a vertical line for a column of the first grid def bfs_vertical_line column bfs_scale_up([column, 0, column, grid.height]) @@ -362,7 +362,7 @@ class Heuristic_With_Walls def render_bfs_target outputs.sprites << [bfs_scale_up(grid.target), 'target.png'] end - + # Renders the target on the second grid def render_heuristic_target outputs.sprites << [heuristic_scale_up(grid.target), 'target.png'] @@ -370,14 +370,14 @@ class Heuristic_With_Walls # Renders the walls on the first grid def render_bfs_walls - grid.walls.each_key do | wall | + grid.walls.each_key do | wall | outputs.solids << [bfs_scale_up(wall), wall_color] end end # Renders the walls on the second grid def render_heuristic_walls - grid.walls.each_key do | wall | + grid.walls.each_key do | wall | outputs.solids << [heuristic_scale_up(wall), wall_color] end end @@ -398,14 +398,14 @@ class Heuristic_With_Walls # Renders the frontier cells on the first grid def render_bfs_frontier - bfs.frontier.each do | frontier_cell | + bfs.frontier.each do | frontier_cell | outputs.solids << [bfs_scale_up(frontier_cell), frontier_color, 200] end end # Renders the frontier cells on the second grid def render_heuristic_frontier - heuristic.frontier.each do | frontier_cell | + heuristic.frontier.each do | frontier_cell | outputs.solids << [heuristic_scale_up(frontier_cell), frontier_color, 200] end end @@ -489,14 +489,14 @@ class Heuristic_With_Walls # Checks and handles input for the buttons # Called when the mouse is lifted def input_buttons - input_left_button - input_center_button - input_right_button + input_left_button + input_center_button + input_right_button end # Checks if the previous step button is clicked # If it is, it pauses the animation and moves the search one step backward - def input_left_button + def input_left_button if left_button_clicked? state.play = false state.current_step -= 1 @@ -508,7 +508,7 @@ class Heuristic_With_Walls # Inverses whether the animation is playing or not when clicked def input_center_button if center_button_clicked? || inputs.keyboard.key_down.space - state.play = !state.play + state.play = !state.play end end @@ -516,8 +516,8 @@ class Heuristic_With_Walls # If it is, it pauses the animation and moves the search one step forward def input_right_button if right_button_clicked? - state.play = false - state.current_step += 1 + state.play = false + state.current_step += 1 move_searches_one_step_forward end end @@ -598,12 +598,12 @@ class Heuristic_With_Walls # on the slider # Changes the step of the search to be animated def process_input_slider - state.play = false + state.play = false mouse_x = inputs.mouse.point.x # Bounds the mouse_x to the closest x value on the slider line - mouse_x = slider.x if mouse_x < slider.x - mouse_x = slider.x + slider.w if mouse_x > slider.x + slider.w + mouse_x = slider.x if mouse_x < slider.x + mouse_x = slider.x + slider.w if mouse_x > slider.x + slider.w # Sets the current search step to the one represented by the mouse x value # The slider's circle moves due to the render_slider method using anim_steps @@ -616,12 +616,12 @@ class Heuristic_With_Walls # Only resets the search if the star changes position # Called whenever the user is editing the star (puts mouse down on star) def process_input_bfs_star - old_star = grid.star.clone + old_star = grid.star.clone unless bfs_cell_closest_to_mouse == grid.target - grid.star = bfs_cell_closest_to_mouse + grid.star = bfs_cell_closest_to_mouse end - unless old_star == grid.star - recalculate_searches + unless old_star == grid.star + recalculate_searches end end @@ -629,12 +629,12 @@ class Heuristic_With_Walls # Only resets the search if the star changes position # Called whenever the user is editing the star (puts mouse down on star) def process_input_heuristic_star - old_star = grid.star.clone + old_star = grid.star.clone unless heuristic_cell_closest_to_mouse == grid.target grid.star = heuristic_cell_closest_to_mouse end - unless old_star == grid.star - recalculate_searches + unless old_star == grid.star + recalculate_searches end end @@ -642,12 +642,12 @@ class Heuristic_With_Walls # Only recalculate_searchess the search if the target changes position # Called whenever the user is editing the target (puts mouse down on target) def process_input_bfs_target - old_target = grid.target.clone + old_target = grid.target.clone unless bfs_cell_closest_to_mouse == grid.star grid.target = bfs_cell_closest_to_mouse end - unless old_target == grid.target - recalculate_searches + unless old_target == grid.target + recalculate_searches end end @@ -655,12 +655,12 @@ class Heuristic_With_Walls # Only recalculate_searchess the search if the target changes position # Called whenever the user is editing the target (puts mouse down on target) def process_input_heuristic_target - old_target = grid.target.clone + old_target = grid.target.clone unless heuristic_cell_closest_to_mouse == grid.star grid.target = heuristic_cell_closest_to_mouse end - unless old_target == grid.target - recalculate_searches + unless old_target == grid.target + recalculate_searches end end @@ -669,10 +669,10 @@ class Heuristic_With_Walls # 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 bfs_mouse_over_grid? + if bfs_mouse_over_grid? if grid.walls.has_key?(bfs_cell_closest_to_mouse) - grid.walls.delete(bfs_cell_closest_to_mouse) - recalculate_searches + grid.walls.delete(bfs_cell_closest_to_mouse) + recalculate_searches end end end @@ -682,29 +682,29 @@ class Heuristic_With_Walls # 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 heuristic_mouse_over_grid? + if heuristic_mouse_over_grid? if grid.walls.has_key?(heuristic_cell_closest_to_mouse) - grid.walls.delete(heuristic_cell_closest_to_mouse) - recalculate_searches + grid.walls.delete(heuristic_cell_closest_to_mouse) + recalculate_searches end end end # Adds a wall in the first grid in the cell the mouse is over def process_input_bfs_add_wall - if bfs_mouse_over_grid? + if bfs_mouse_over_grid? unless grid.walls.has_key?(bfs_cell_closest_to_mouse) - grid.walls[bfs_cell_closest_to_mouse] = true - recalculate_searches + grid.walls[bfs_cell_closest_to_mouse] = true + recalculate_searches end end end # Adds a wall in the second grid in the cell the mouse is over def process_input_heuristic_add_wall - if heuristic_mouse_over_grid? + if heuristic_mouse_over_grid? unless grid.walls.has_key?(heuristic_cell_closest_to_mouse) - grid.walls[heuristic_cell_closest_to_mouse] = true - recalculate_searches + grid.walls[heuristic_cell_closest_to_mouse] = true + recalculate_searches end end end @@ -714,13 +714,13 @@ class Heuristic_With_Walls # Finding the cell closest to the mouse helps with this def bfs_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 # When the user grabs the star and puts their cursor to the far right @@ -728,17 +728,17 @@ class Heuristic_With_Walls # Finding the cell closest to the mouse in the second grid helps with this def heuristic_cell_closest_to_mouse # Closest cell grid to the mouse in the second - 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 # Translate the cell to the first grid x -= grid.width + 1 # Bound x and y to the first grid x = 0 if x < 0 y = 0 if y < 0 - 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 def recalculate_searches @@ -763,22 +763,22 @@ class Heuristic_With_Walls return if bfs.came_from.has_key?(grid.target) # Only runs at the beginning of the search as setup. - if bfs.came_from.empty? - bfs.frontier << grid.star - bfs.came_from[grid.star] = nil + if bfs.came_from.empty? + bfs.frontier << grid.star + bfs.came_from[grid.star] = nil end # A step in the search - unless bfs.frontier.empty? + unless bfs.frontier.empty? # Takes the next frontier cell - new_frontier = bfs.frontier.shift + new_frontier = bfs.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 bfs.came_from.has_key?(neighbor) || grid.walls.has_key?(neighbor) + unless bfs.came_from.has_key?(neighbor) || grid.walls.has_key?(neighbor) # Add them to the frontier and mark them as visited - bfs.frontier << neighbor - bfs.came_from[neighbor] = new_frontier + bfs.frontier << neighbor + bfs.came_from[neighbor] = new_frontier end end end @@ -833,12 +833,12 @@ class Heuristic_With_Walls # Get the next cell to explore from new_frontier = heuristic.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 heuristic.came_from.has_key?(neighbor) || grid.walls.has_key?(neighbor) + unless heuristic.came_from.has_key?(neighbor) || grid.walls.has_key?(neighbor) # Add them to the frontier and mark them as visited - heuristic.frontier << neighbor - heuristic.came_from[neighbor] = new_frontier + heuristic.frontier << neighbor + heuristic.came_from[neighbor] = new_frontier end end end @@ -882,16 +882,16 @@ class Heuristic_With_Walls # 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 - neighbors + neighbors end # Finds the vertical and horizontal distance of a cell from the star @@ -940,7 +940,7 @@ class Heuristic_With_Walls def wall_color [134, 134, 120] # Camo Green end - + def visited_color [204, 191, 179] # Dark Brown end @@ -948,7 +948,7 @@ class Heuristic_With_Walls def frontier_color [103, 136, 204] # Blue end - + def path_color [231, 230, 228] # Pastel White end diff --git a/samples/13_path_finding_algorithms/07_heuristic_with_walls/app/main.rb b/samples/13_path_finding_algorithms/07_heuristic_with_walls/app/main.rb index 7b8f653..b106e34 100644 --- a/samples/13_path_finding_algorithms/07_heuristic_with_walls/app/main.rb +++ b/samples/13_path_finding_algorithms/07_heuristic_with_walls/app/main.rb @@ -10,13 +10,13 @@ class Heuristic def tick defaults - render - input + render + input # If animation is playing, and max steps have not been reached # Move the search a step forward if state.play && state.current_step < state.max_steps # Variable that tells the program what step to recalculate up to - state.current_step += 1 + state.current_step += 1 move_searches_one_step_forward end end @@ -71,7 +71,7 @@ class Heuristic # 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.user_input ||= :none + state.user_input ||= :none # These variables allow the breadth first search to take place # Came_from is a hash with a key of a cell and a value of the cell that was expanded from to find the key. @@ -96,7 +96,7 @@ class Heuristic # Unless the current step has a value unless state.current_step # Set the current step to 10 - state.current_step = 10 + state.current_step = 10 # And calculate the searches up to step 10 recalculate_searches end @@ -106,7 +106,7 @@ class Heuristic # This step is roughly the grid's width * height # When anim_steps equals max_steps no more calculations will occur # and the slider will be at the end - state.max_steps = grid.width * grid.height + state.max_steps = grid.width * grid.height # Whether the animation should play or not # If true, every tick moves anim_steps forward one @@ -199,7 +199,7 @@ class Heuristic # If the mouse was clicked this tick if inputs.mouse.down # Determine what the user is editing and appropriately edit the state.user_input variable - determine_input + determine_input end # Process user input based on user_input variable and current mouse position @@ -212,35 +212,35 @@ class Heuristic if mouse_over_slider? state.user_input = :slider # If the mouse is over the star in the first grid - elsif bfs_mouse_over_star? + elsif bfs_mouse_over_star? # The user is editing the star from the first grid - state.user_input = :bfs_star + state.user_input = :bfs_star # If the mouse is over the star in the second grid - elsif heuristic_mouse_over_star? + elsif heuristic_mouse_over_star? # The user is editing the star from the second grid - state.user_input = :heuristic_star + state.user_input = :heuristic_star # If the mouse is over the target in the first grid - elsif bfs_mouse_over_target? + elsif bfs_mouse_over_target? # The user is editing the target from the first grid - state.user_input = :bfs_target + state.user_input = :bfs_target # If the mouse is over the target in the second grid - elsif heuristic_mouse_over_target? + elsif heuristic_mouse_over_target? # The user is editing the target from the second grid - state.user_input = :heuristic_target + state.user_input = :heuristic_target # If the mouse is over a wall in the first grid - elsif bfs_mouse_over_wall? + elsif bfs_mouse_over_wall? # The user is removing a wall from the first grid - state.user_input = :bfs_remove_wall + state.user_input = :bfs_remove_wall # If the mouse is over a wall in the second grid - elsif heuristic_mouse_over_wall? + elsif heuristic_mouse_over_wall? # The user is removing a wall from the second grid state.user_input = :heuristic_remove_wall # If the mouse is over the first grid - elsif bfs_mouse_over_grid? + elsif bfs_mouse_over_grid? # The user is adding a wall from the first grid state.user_input = :bfs_add_wall # If the mouse is over the second grid - elsif heuristic_mouse_over_grid? + elsif heuristic_mouse_over_grid? # The user is adding a wall from the second grid state.user_input = :heuristic_add_wall end @@ -250,22 +250,22 @@ class Heuristic def process_input if state.user_input == :slider process_input_slider - elsif state.user_input == :bfs_star - process_input_bfs_star + elsif state.user_input == :bfs_star + process_input_bfs_star elsif state.user_input == :heuristic_star - process_input_heuristic_star - elsif state.user_input == :bfs_target - process_input_bfs_target - elsif state.user_input == :heuristic_target - process_input_heuristic_target - elsif state.user_input == :bfs_remove_wall - process_input_bfs_remove_wall + process_input_heuristic_star + elsif state.user_input == :bfs_target + process_input_bfs_target + elsif state.user_input == :heuristic_target + process_input_heuristic_target + elsif state.user_input == :bfs_remove_wall + process_input_bfs_remove_wall elsif state.user_input == :heuristic_remove_wall - process_input_heuristic_remove_wall - elsif state.user_input == :bfs_add_wall - process_input_bfs_add_wall - elsif state.user_input == :heuristic_add_wall - process_input_heuristic_add_wall + process_input_heuristic_remove_wall + elsif state.user_input == :bfs_add_wall + process_input_bfs_add_wall + elsif state.user_input == :heuristic_add_wall + process_input_heuristic_add_wall end end @@ -275,7 +275,7 @@ class Heuristic outputs.primitives << [slider.x, slider.y, slider.x + slider.w, slider.y].line # The circle needs to be offset so that the center of the circle # overlaps the line instead of the upper right corner of the circle - # The circle's x value is also moved based on the current search step + # The circle's x value is also moved based on the current seach step circle_x = (slider.x - slider.offset) + (state.current_step * slider.spacing) circle_y = (slider.y - slider.offset) circle_rect = [circle_x, circle_y, 37, 37] @@ -342,7 +342,7 @@ class Heuristic # The horizontal grid lines for y in 0..grid.height - outputs.lines << bfs_horizontal_line(y) + outputs.lines << bfs_horizontal_line(y) end end @@ -357,10 +357,10 @@ class Heuristic # The horizontal grid lines for y in 0..grid.height - outputs.lines << heuristic_horizontal_line(y) + outputs.lines << heuristic_horizontal_line(y) end end - + # Returns a vertical line for a column of the first grid def bfs_vertical_line column bfs_scale_up([column, 0, column, grid.height]) @@ -395,7 +395,7 @@ class Heuristic def render_bfs_target outputs.sprites << [bfs_scale_up(grid.target), 'target.png'] end - + # Renders the target on the second grid def render_heuristic_target outputs.sprites << [heuristic_scale_up(grid.target), 'target.png'] @@ -403,14 +403,14 @@ class Heuristic # Renders the walls on the first grid def render_bfs_walls - grid.walls.each_key do | wall | + grid.walls.each_key do | wall | outputs.solids << [bfs_scale_up(wall), wall_color] end end # Renders the walls on the second grid def render_heuristic_walls - grid.walls.each_key do | wall | + grid.walls.each_key do | wall | outputs.solids << [heuristic_scale_up(wall), wall_color] end end @@ -431,14 +431,14 @@ class Heuristic # Renders the frontier cells on the first grid def render_bfs_frontier - bfs.frontier.each do | frontier_cell | + bfs.frontier.each do | frontier_cell | outputs.solids << [bfs_scale_up(frontier_cell), frontier_color, 200] end end # Renders the frontier cells on the second grid def render_heuristic_frontier - heuristic.frontier.each do | frontier_cell | + heuristic.frontier.each do | frontier_cell | outputs.solids << [heuristic_scale_up(frontier_cell), frontier_color, 200] end end @@ -522,14 +522,14 @@ class Heuristic # Checks and handles input for the buttons # Called when the mouse is lifted def input_buttons - input_left_button - input_center_button - input_right_button + input_left_button + input_center_button + input_right_button end # Checks if the previous step button is clicked # If it is, it pauses the animation and moves the search one step backward - def input_left_button + def input_left_button if left_button_clicked? state.play = false state.current_step -= 1 @@ -541,7 +541,7 @@ class Heuristic # Inverses whether the animation is playing or not when clicked def input_center_button if center_button_clicked? || inputs.keyboard.key_down.space - state.play = !state.play + state.play = !state.play end end @@ -549,8 +549,8 @@ class Heuristic # If it is, it pauses the animation and moves the search one step forward def input_right_button if right_button_clicked? - state.play = false - state.current_step += 1 + state.play = false + state.current_step += 1 move_searches_one_step_forward end end @@ -631,12 +631,12 @@ class Heuristic # on the slider # Changes the step of the search to be animated def process_input_slider - state.play = false + state.play = false mouse_x = inputs.mouse.point.x # Bounds the mouse_x to the closest x value on the slider line - mouse_x = slider.x if mouse_x < slider.x - mouse_x = slider.x + slider.w if mouse_x > slider.x + slider.w + mouse_x = slider.x if mouse_x < slider.x + mouse_x = slider.x + slider.w if mouse_x > slider.x + slider.w # Sets the current search step to the one represented by the mouse x value # The slider's circle moves due to the render_slider method using anim_steps @@ -649,12 +649,12 @@ class Heuristic # Only resets the search if the star changes position # Called whenever the user is editing the star (puts mouse down on star) def process_input_bfs_star - old_star = grid.star.clone + old_star = grid.star.clone unless bfs_cell_closest_to_mouse == grid.target - grid.star = bfs_cell_closest_to_mouse + grid.star = bfs_cell_closest_to_mouse end - unless old_star == grid.star - recalculate_searches + unless old_star == grid.star + recalculate_searches end end @@ -662,12 +662,12 @@ class Heuristic # Only resets the search if the star changes position # Called whenever the user is editing the star (puts mouse down on star) def process_input_heuristic_star - old_star = grid.star.clone + old_star = grid.star.clone unless heuristic_cell_closest_to_mouse == grid.target grid.star = heuristic_cell_closest_to_mouse end - unless old_star == grid.star - recalculate_searches + unless old_star == grid.star + recalculate_searches end end @@ -675,12 +675,12 @@ class Heuristic # Only recalculate_searchess the search if the target changes position # Called whenever the user is editing the target (puts mouse down on target) def process_input_bfs_target - old_target = grid.target.clone + old_target = grid.target.clone unless bfs_cell_closest_to_mouse == grid.star grid.target = bfs_cell_closest_to_mouse end - unless old_target == grid.target - recalculate_searches + unless old_target == grid.target + recalculate_searches end end @@ -688,12 +688,12 @@ class Heuristic # Only recalculate_searchess the search if the target changes position # Called whenever the user is editing the target (puts mouse down on target) def process_input_heuristic_target - old_target = grid.target.clone + old_target = grid.target.clone unless heuristic_cell_closest_to_mouse == grid.star grid.target = heuristic_cell_closest_to_mouse end - unless old_target == grid.target - recalculate_searches + unless old_target == grid.target + recalculate_searches end end @@ -702,10 +702,10 @@ class Heuristic # 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 bfs_mouse_over_grid? + if bfs_mouse_over_grid? if grid.walls.has_key?(bfs_cell_closest_to_mouse) - grid.walls.delete(bfs_cell_closest_to_mouse) - recalculate_searches + grid.walls.delete(bfs_cell_closest_to_mouse) + recalculate_searches end end end @@ -715,29 +715,29 @@ class Heuristic # 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 heuristic_mouse_over_grid? + if heuristic_mouse_over_grid? if grid.walls.has_key?(heuristic_cell_closest_to_mouse) - grid.walls.delete(heuristic_cell_closest_to_mouse) - recalculate_searches + grid.walls.delete(heuristic_cell_closest_to_mouse) + recalculate_searches end end end # Adds a wall in the first grid in the cell the mouse is over def process_input_bfs_add_wall - if bfs_mouse_over_grid? + if bfs_mouse_over_grid? unless grid.walls.has_key?(bfs_cell_closest_to_mouse) - grid.walls[bfs_cell_closest_to_mouse] = true - recalculate_searches + grid.walls[bfs_cell_closest_to_mouse] = true + recalculate_searches end end end # Adds a wall in the second grid in the cell the mouse is over def process_input_heuristic_add_wall - if heuristic_mouse_over_grid? + if heuristic_mouse_over_grid? unless grid.walls.has_key?(heuristic_cell_closest_to_mouse) - grid.walls[heuristic_cell_closest_to_mouse] = true - recalculate_searches + grid.walls[heuristic_cell_closest_to_mouse] = true + recalculate_searches end end end @@ -747,13 +747,13 @@ class Heuristic # Finding the cell closest to the mouse helps with this def bfs_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 # When the user grabs the star and puts their cursor to the far right @@ -761,17 +761,17 @@ class Heuristic # Finding the cell closest to the mouse in the second grid helps with this def heuristic_cell_closest_to_mouse # Closest cell grid to the mouse in the second - 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 # Translate the cell to the first grid x -= grid.width + 1 # Bound x and y to the first grid x = 0 if x < 0 y = 0 if y < 0 - 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 def recalculate_searches @@ -796,22 +796,22 @@ class Heuristic return if bfs.came_from.has_key?(grid.target) # Only runs at the beginning of the search as setup. - if bfs.came_from.empty? - bfs.frontier << grid.star - bfs.came_from[grid.star] = nil + if bfs.came_from.empty? + bfs.frontier << grid.star + bfs.came_from[grid.star] = nil end # A step in the search - unless bfs.frontier.empty? + unless bfs.frontier.empty? # Takes the next frontier cell - new_frontier = bfs.frontier.shift + new_frontier = bfs.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 bfs.came_from.has_key?(neighbor) || grid.walls.has_key?(neighbor) + unless bfs.came_from.has_key?(neighbor) || grid.walls.has_key?(neighbor) # Add them to the frontier and mark them as visited - bfs.frontier << neighbor - bfs.came_from[neighbor] = new_frontier + bfs.frontier << neighbor + bfs.came_from[neighbor] = new_frontier end end end @@ -866,12 +866,12 @@ class Heuristic # Get the next cell to explore from new_frontier = heuristic.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 heuristic.came_from.has_key?(neighbor) || grid.walls.has_key?(neighbor) + unless heuristic.came_from.has_key?(neighbor) || grid.walls.has_key?(neighbor) # Add them to the frontier and mark them as visited - heuristic.frontier << neighbor - heuristic.came_from[neighbor] = new_frontier + heuristic.frontier << neighbor + heuristic.came_from[neighbor] = new_frontier end end end @@ -915,16 +915,16 @@ class Heuristic # 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 - neighbors + neighbors end # Finds the vertical and horizontal distance of a cell from the star @@ -973,7 +973,7 @@ class Heuristic def wall_color [134, 134, 120] # Camo Green end - + def visited_color [204, 191, 179] # Dark Brown end @@ -981,7 +981,7 @@ class Heuristic def frontier_color [103, 136, 204] # Blue end - + def path_color [231, 230, 228] # Pastel White end diff --git a/samples/99_genre_3d/3d_cube/app/main.rb b/samples/99_genre_3d/3d_cube/app/main.rb deleted file mode 100644 index fc95291..0000000 --- a/samples/99_genre_3d/3d_cube/app/main.rb +++ /dev/null @@ -1,50 +0,0 @@ -STARTX = 0.0 -STARTY = 0.0 -ENDY = 20.0 -ENDX = 20.0 -SPINPOINT = 10 -SPINDURATION = 400 -POINTSIZE = 8 -BOXDEPTH = 40 -YAW = 1 -DISTANCE = 10 - -def tick args - args.outputs.background_color = [0, 0, 0] - a = Math.sin(args.state.tick_count / SPINDURATION) * Math.tan(args.state.tick_count / SPINDURATION) - s = Math.sin(a) - c = Math.cos(a) - x = STARTX - y = STARTY - offset_x = (1280 - (ENDX - STARTX)) / 2 - offset_y = (360 - (ENDY - STARTY)) / 2 - - srand(1) - while y < ENDY do - while x < ENDX do - if (y == STARTY || - y == (ENDY / 0.5) * 2 || - y == (ENDY / 0.5) * 2 + 0.5 || - y == ENDY - 0.5 || - x == STARTX || - x == ENDX - 0.5) - z = rand(BOXDEPTH) - z *= Math.sin(a / 2) - x -= SPINPOINT - u = (x * c) - (z * s) - v = (x * s) + (z * c) - k = DISTANCE.fdiv(100) + (v / 500 * YAW) - u = u / k - v = y / k - w = POINTSIZE / 10 / k - args.outputs.sprites << { x: offset_x + u - w, y: offset_y + v - w, w: w, h: w, path: 'sprites/square-blue.png'} - x += SPINPOINT - end - x += 0.5 - end - y += 0.5 - x = STARTX - end -end - -$gtk.reset diff --git a/samples/99_genre_3d/3d_cube/sprites/square-blue.png b/samples/99_genre_3d/3d_cube/sprites/square-blue.png deleted file mode 100644 index b840849..0000000 Binary files a/samples/99_genre_3d/3d_cube/sprites/square-blue.png and /dev/null differ diff --git a/samples/99_genre_arcade/snakemoji/app/main.rb b/samples/99_genre_arcade/snakemoji/app/main.rb index 648b728..3bffa22 100644 --- a/samples/99_genre_arcade/snakemoji/app/main.rb +++ b/samples/99_genre_arcade/snakemoji/app/main.rb @@ -10,8 +10,8 @@ # https://gist.github.com/scorp200 #############LICENSE############ # Feel free to use this anywhere and however you want -# You can sell this to EA for $1,000,000 if you want, it's completely free. -# Just remember you are helping this... thing... to spread... +# You can sell this to EA for $1,000,000 if you want, its completely free. +# Just rememeber you are helping this... thing... to spread... # ALSO! I am not liable for any mental, physical or financial damage caused. #############LICENSE############ @@ -156,7 +156,7 @@ def defaults 🎮 🎮.🐍 ||= [] #Direction the head moves to 🎮.🚗 ||= [0, 0] - #Next_Direction, during input check only change this variable and then when game updates assign this to Direction + #Next_Direction, during input check only change this variable and then when game updates asign this to Direction 🎮.🚦 ||= [*🎮.🚗] #Your score 🎮.💰 ||= 0 diff --git a/samples/99_genre_arcade/twinstick/app/main.rb b/samples/99_genre_arcade/twinstick/app/main.rb index 2ce1d50..4edef92 100644 --- a/samples/99_genre_arcade/twinstick/app/main.rb +++ b/samples/99_genre_arcade/twinstick/app/main.rb @@ -64,7 +64,7 @@ def move_enemies args theta = Math.atan2(enemy.y - args.state.player.y, enemy.x - args.state.player.x) # Convert the angle to a vector pointing at the player dx, dy = theta.to_degrees.vector 5 - # Move the enemy towards the player + # Move the enemy towards thr player enemy.x -= dx enemy.y -= dy end diff --git a/samples/99_genre_crafting/craft_game_starting_point/app/main.rb b/samples/99_genre_crafting/craft_game_starting_point/app/main.rb index 549e73d..d7478e4 100644 --- a/samples/99_genre_crafting/craft_game_starting_point/app/main.rb +++ b/samples/99_genre_crafting/craft_game_starting_point/app/main.rb @@ -1,13 +1,13 @@ # ================================================== # A NOTE TO JAM CRAFT PARTICIPANTS: -# The comments and code in here are just a small piece of DragonRuby's capabilities. +# The comments and code in here are just as small piece of DragonRuby's capabilities. # Be sure to check out the rest of the sample apps. Start with README.txt and go from there! # ================================================== # def tick args is the entry point into your game. This function is called at # a fixed update time of 60hz (60 fps). def tick args - # The defaults function initializes the game. + # The defaults function intitializes the game. defaults args # After the game is initialized, render it. @@ -38,7 +38,7 @@ def defaults args # Bottom left is 0, 0. Top right is 1280, 720. # The inventory area is at the top of the screen # the number 80 is the size of all the sprites, so that is what is being - # used to decide the width and height + # used to decide the with and height args.state.sprite_size = 80 args.state.inventory_border.w = args.state.sprite_size * 10 @@ -49,7 +49,7 @@ def defaults args # define the borders for where the crafting area is located # the crafting area is below the inventory area # the number 80 is the size of all the sprites, so that is what is being - # used to decide the width and height + # used to decide the with and height args.state.craft_border.x = 10 args.state.craft_border.y = 220 args.state.craft_border.w = args.state.sprite_size * 3 @@ -92,12 +92,12 @@ def defaults args }, ] - # after initializing the ordinal positions, derive the pixel + # after initializing the oridinal positions, derive the pixel # locations assuming that the width and height are 80 args.state.items.each { |item| set_inventory_position args, item } end - # define all the ordinal positions of the inventory slots + # define all the oridinal positions of the inventory slots if !args.state.inventory_area args.state.inventory_area = [ { ordinal_x: 0, ordinal_y: 0 }, @@ -132,7 +132,7 @@ def defaults args { ordinal_x: 9, ordinal_y: 2 }, ] - # after initializing the ordinal positions, derive the pixel + # after initializing the oridinal positions, derive the pixel # locations assuming that the width and height are 80 args.state.inventory_area.each { |i| set_inventory_position args, i } @@ -144,7 +144,7 @@ def defaults args # To bring up DragonRuby's Console, press the ~ key within the game. end - # define all the ordinal positions of the craft slots + # define all the oridinal positions of the craft slots if !args.state.craft_area args.state.craft_area = [ { ordinal_x: 0, ordinal_y: 0 }, @@ -158,7 +158,7 @@ def defaults args { ordinal_x: 2, ordinal_y: 2 }, ] - # after initializing the ordinal positions, derive the pixel + # after initializing the oridinal positions, derive the pixel # locations assuming that the width and height are 80 args.state.craft_area.each { |c| set_craft_position args, c } end @@ -244,7 +244,7 @@ def input args found[:location] = :held end - # if the mouse is clicked and an item is currently being held.... + # if the mouse is clicked and an item is currently beign held.... elsif args.state.held_item # determine if a slot within the craft area was clicked craft_area = args.state.craft_area.find { |a| args.inputs.mouse.click.point.inside_rect? a } @@ -255,7 +255,7 @@ def input args # if the click was within a craft area if craft_area # check to see if an item is already there and ignore the click if an item is found - # item_at_craft_slot is a helper method that returns an item or nil for a given ordinal + # item_at_craft_slot is a helper method that returns an item or nil for a given oridinal # position item_already_there = item_at_craft_slot args, craft_area[:ordinal_x], craft_area[:ordinal_y] @@ -263,8 +263,8 @@ def input args if !item_already_there # if the quantity they are currently holding is greater than 1 if args.state.held_item[:quantity] > 1 - # remove one item (creating a separate item of the same type), and place it - # at the ordinal position and location of the craft area + # remove one item (creating a seperate item of the same type), and place it + # at the oridinal position and location of the craft area # the .merge method on Hash creates a new Hash, but updates any values # passed as arguments to merge new_item = args.state.held_item.merge(quantity: 1, @@ -272,7 +272,7 @@ def input args ordinal_x: craft_area[:ordinal_x], ordinal_y: craft_area[:ordinal_y]) - # after the item is created, place it into the args.state.items collection + # after the item is crated, place it into the args.state.items collection args.state.items << new_item # then subtract one from the held item @@ -281,7 +281,7 @@ def input args # if the craft area is available and there is only one item being held elsif args.state.held_item[:quantity] == 1 # instead of creating any new items just set the location of the held item - # to the ordinal position of the craft area, and then nil out the + # to the oridinal position of the craft area, and then nil out the # held item state so that a new item can be picked up args.state.held_item[:location] = :craft args.state.held_item[:ordinal_x] = craft_area[:ordinal_x] @@ -326,7 +326,7 @@ end def calc args # make sure that the real position of the inventory # items are updated every frame to ensure that they - # are placed correctly given their location and ordinal positions + # are placed correctly given their location and oridinal positions # instead of using .map, here we use .each (since we are not returning a new item and just updating the items in place) args.state.items.each do |item| # based on the location of the item, invoke the correct pixel conversion method diff --git a/samples/99_genre_crafting/farming_game_starting_point/app/main.rb b/samples/99_genre_crafting/farming_game_starting_point/app/main.rb new file mode 100644 index 0000000..4c7dd61 --- /dev/null +++ b/samples/99_genre_crafting/farming_game_starting_point/app/main.rb @@ -0,0 +1,84 @@ +def tick args + args.state.tile_size = 80 + args.state.player_speed = 4 + args.state.player ||= tile(args, 7, 3, 0, 128, 180) + generate_map args + #press j to plant a green onion + if args.inputs.keyboard.j + #change this part you can change what you want to plant + args.state.walls << tile(args, ((args.state.player.x+80)/args.state.tile_size), ((args.state.player.y)/args.state.tile_size), 255, 255, 255) + args.state.plants << tile(args, ((args.state.player.x+80)/args.state.tile_size), ((args.state.player.y+80)/args.state.tile_size), 0, 160, 0) + end + # Adds walls, background, and player to args.outputs.solids so they appear on screen + args.outputs.solids << [0,0,1280,720, 237,189,101] + args.outputs.sprites << [0, 0, 1280, 720, 'sprites/background.png'] + args.outputs.solids << args.state.walls + args.outputs.solids << args.state.player + args.outputs.solids << args.state.plants + args.outputs.labels << [320, 640, "press J to plant", 3, 1, 255, 0, 0, 200] + + move_player args, -1, 0 if args.inputs.keyboard.left # x position decreases by 1 if left key is pressed + move_player args, 1, 0 if args.inputs.keyboard.right # x position increases by 1 if right key is pressed + move_player args, 0, 1 if args.inputs.keyboard.up # y position increases by 1 if up is pressed + move_player args, 0, -1 if args.inputs.keyboard.down # y position decreases by 1 if down is pressed +end + +# Sets position, size, and color of the tile +def tile args, x, y, *color + [x * args.state.tile_size, # sets definition for array using method parameters + y * args.state.tile_size, # multiplying by tile_size sets x and y to correct position using pixel values + args.state.tile_size, + args.state.tile_size, + *color] +end + +# Creates map by adding tiles to the wall, as well as a goal (that the player needs to reach) +def generate_map args + return if args.state.area + + # Creates the area of the map. There are 9 rows running horizontally across the screen + # and 16 columns running vertically on the screen. Any spot with a "1" is not + # open for the player to move into (and is green), and any spot with a "0" is available + # for the player to move in. + args.state.area = [ + [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,], + [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,], + [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,], + [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,], + [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,], + [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,], + [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,], + [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,], + [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], + ].reverse # reverses the order of the area collection + + # By reversing the order, the way that the area appears above is how it appears + # on the screen in the game. If we did not reverse, the map would appear inverted. + + #The wall starts off with no tiles. + args.state.walls = [] + args.state.plants = [] + + # If v is 1, a green tile is added to args.state.walls. + # If v is 2, a black tile is created as the goal. + args.state.area.map_2d do |y, x, v| + if v == 1 + args.state.walls << tile(args, x, y, 255, 160, 156) # green tile + end + end +end + +# Allows the player to move their box around the screen +def move_player args, *vector + box = args.state.player.shift_rect(vector) # box is able to move at an angle + + # If the player's box hits a wall, it is not able to move further in that direction + return if args.state.walls + .any_intersect_rect?(box) + + # Player's box is able to move at angles (not just the four general directions) fast + args.state.player = + args.state.player + .shift_rect(vector.x * args.state.player_speed, # if we don't multiply by speed, then + vector.y * args.state.player_speed) # the box will move extremely slow +end diff --git a/samples/99_genre_crafting/farming_game_starting_point/app/repl.rb b/samples/99_genre_crafting/farming_game_starting_point/app/repl.rb new file mode 100644 index 0000000..f4c8292 --- /dev/null +++ b/samples/99_genre_crafting/farming_game_starting_point/app/repl.rb @@ -0,0 +1,307 @@ +# =============================================================== +# Welcome to repl.rb +# =============================================================== +# You can experiement with code within this file. Code in this +# file is only executed when you save (and only excecuted ONCE). +# =============================================================== + +# =============================================================== +# REMOVE the "x" from the word "xrepl" and save the file to RUN +# the code in between the do/end block delimiters. +# =============================================================== + +# =============================================================== +# ADD the "x" to the word "repl" (make it xrepl) and save the +# file to IGNORE the code in between the do/end block delimiters. +# =============================================================== + +# Remove the x from xrepl to run the code. Add the x back to ignore to code. +xrepl do + puts "The result of 1 + 2 is: #{1 + 2}" +end + +# ==================================================================================== +# Ruby Crash Course: +# Strings, Numeric, Booleans, Conditionals, Looping, Enumerables, Arrays +# ==================================================================================== + +# ==================================================================================== +# Strings +# ==================================================================================== +# Remove the x from xrepl to run the code. Add the x back to ignore to code. +xrepl do + message = "Hello World" + puts "The value of message is: " + message + puts "Any value can be interpolated within a string using \#{}." + puts "Interpolated message: #{message}." + puts 'This #{message} is not interpolated because the string uses single quotes.' +end + +# ==================================================================================== +# Numerics +# ==================================================================================== +# Remove the x from xrepl to run the code. Add the x back to ignore to code. +xrepl do + a = 10 + puts "The value of a is: #{a}" + puts "a + 1 is: #{a + 1}" + puts "a / 3 is: #{a / 3}" +end + +# Remove the x from xrepl to run the code. Add the x back to ignore to code. +xrepl do + b = 10.12 + puts "The value of b is: #{b}" + puts "b + 1 is: #{b + 1}" + puts "b as an integer is: #{b.to_i}" + puts '' +end + +# ==================================================================================== +# Booleans +# ==================================================================================== +# Remove the x from xrepl to run the code. Add the x back to ignore to code. +xrepl do + c = 30 + puts "The value of c is #{c}." + + if c + puts "This if statement ran because c is truthy." + end +end + +# Remove the x from xrepl to run the code. Add the x back to ignore to code. +xrepl do + d = false + puts "The value of d is #{d}." + + if !d + puts "This if statement ran because d is falsey, using the not operator (!) makes d evaluate to true." + end + + e = nil + puts "Nil is also considered falsey. The value of e is: #{e}." + + if !e + puts "This if statement ran because e is nil (a falsey value)." + end +end + +# ==================================================================================== +# Conditionals +# ==================================================================================== +# Remove the x from xrepl to run the code. Add the x back to ignore to code. +xrepl do + i_am_true = true + i_am_nil = nil + i_am_false = false + i_am_hi = "hi" + + puts "======== if statement" + i_am_one = 1 + if i_am_one + puts "This was printed because i_am_one is truthy." + end + + puts "======== if/else statement" + if i_am_false + puts "This will NOT get printed because i_am_false is false." + else + puts "This was printed because i_am_false is false." + end + + puts "======== if/elsif/else statement" + if i_am_false + puts "This will NOT get printed because i_am_false is false." + elsif i_am_true + puts "This was printed because i_am_true is true." + else + puts "This will NOT get printed i_am_true was true." + end + + puts "======== case statement " + i_am_one = 1 + case i_am_one + when 10 + puts "case equaled: 10" + when 9 + puts "case equaled: 9" + when 5 + puts "case equaled: 5" + when 1 + puts "case equaled: 1" + else + puts "Value wasn't cased." + end + + puts "======== different types of comparisons" + if 4 == 4 + puts "equal (4 == 4)" + end + + if 4 != 3 + puts "not equal (4 != 3)" + end + + if 3 < 4 + puts "less than (3 < 4)" + end + + if 4 > 3 + puts "greater than (4 > 3)" + end + + if ((4 > 3) || (3 < 4) || false) + puts "or statement ((4 > 3) || (3 < 4) || false)" + end + + if ((4 > 3) && (3 < 4)) + puts "and statement ((4 > 3) && (3 < 4))" + end +end + +# ==================================================================================== +# Looping +# ==================================================================================== +# Remove the x from xrepl to run the code. Add the x back to ignore to code. +xrepl do + puts "======== times block" + 3.times do |i| + puts i + end + puts "======== range block exclusive" + (0...3).each do |i| + puts i + end + puts "======== range block inclusive" + (0..3).each do |i| + puts i + end +end + +# ==================================================================================== +# Enumerables +# ==================================================================================== +# Remove the x from xrepl to run the code. Add the x back to ignore to code. +xrepl do + puts "======== array each" + colors = ["red", "blue", "yellow"] + colors.each do |color| + puts color + end + + puts '======== array each_with_index' + colors = ["red", "blue", "yellow"] + colors.each_with_index do |color, i| + puts "#{color} at index #{i}" + end +end + +# Remove the x from xrepl to run the code. Add the x back to ignore to code. +xrepl do + puts "======== single parameter function" + def add_one_to n + n + 5 + end + + puts add_one_to(3) + + puts "======== function with default value" + def function_with_default_value v = 10 + v * 10 + end + + puts "passing three: #{function_with_default_value(3)}" + puts "passing nil: #{function_with_default_value}" + + puts "======== Or Equal (||=) operator for nil values" + def function_with_nil_default_with_local a = nil + result = a + result ||= "or equal operator was exected and set a default value" + end + + puts "passing 'hi': #{function_with_nil_default_with_local 'hi'}" + puts "passing nil: #{function_with_nil_default_with_local}" +end + +# ==================================================================================== +# Arrays +# ==================================================================================== +# Remove the x from xrepl to run the code. Add the x back to ignore to code. +xrepl do + puts "======== Create an array with the numbers 1 to 10." + one_to_ten = (1..10).to_a + puts one_to_ten + + puts "======== Create a new array that only contains even numbers from the previous array." + one_to_ten = (1..10).to_a + evens = one_to_ten.find_all do |number| + number % 2 == 0 + end + puts evens + + puts "======== Create a new array that rejects odd numbers." + one_to_ten = (1..10).to_a + also_even = one_to_ten.reject do |number| + number % 2 != 0 + end + puts also_even + + puts "======== Create an array that doubles every number." + one_to_ten = (1..10).to_a + doubled = one_to_ten.map do |number| + number * 2 + end + puts doubled + + puts "======== Create an array that selects only odd numbers and then multiply those by 10." + one_to_ten = (1..10).to_a + odd_doubled = one_to_ten.find_all do |number| + number % 2 != 0 + end.map do |odd_number| + odd_number * 10 + end + puts odd_doubled + + puts "======== All combination of numbers 1 to 10." + one_to_ten = (1..10).to_a + all_combinations = one_to_ten.product(one_to_ten) + puts all_combinations + + puts "======== All uniq combinations of numbers. For example: [1, 2] is the same as [2, 1]." + one_to_ten = (1..10).to_a + uniq_combinations = + one_to_ten.product(one_to_ten) + .map do |unsorted_number| + unsorted_number.sort + end.uniq + puts uniq_combinations +end + +# ==================================================================================== +# Advanced Arrays +# ==================================================================================== +# Remove the x from xrepl to run the code. Add the x back to ignore to code. +xrepl do + puts "======== All unique Pythagorean Triples between 1 and 40 sorted by area of the triangle." + + one_to_hundred = (1..40).to_a + triples = + one_to_hundred.product(one_to_hundred).map do |width, height| + [width, height, Math.sqrt(width ** 2 + height ** 2)] + end.find_all do |_, _, hypotenuse| + hypotenuse.to_i == hypotenuse + end.map do |triangle| + triangle.map(&:to_i) + end.uniq do |triangle| + triangle.sort + end.map do |width, height, hypotenuse| + [width, height, hypotenuse, (width * height) / 2] + end.sort_by do |_, _, _, area| + area + end + + triples.each do |width, height, hypotenuse, area| + puts "(#{width}, #{height}, #{hypotenuse}) = #{area}" + end +end diff --git a/samples/99_genre_crafting/farming_game_starting_point/app/tests.rb b/samples/99_genre_crafting/farming_game_starting_point/app/tests.rb new file mode 100644 index 0000000..458bc18 --- /dev/null +++ b/samples/99_genre_crafting/farming_game_starting_point/app/tests.rb @@ -0,0 +1,29 @@ +# For advanced users: +# You can put some quick verification tests here, any method +# that starts with the `test_` will be run when you save this file. + +# Here is an example test and game + +# To run the test: ./dragonruby mygame --eval app/tests.rb --no-tick + +class MySuperHappyFunGame + attr_gtk + + def tick + outputs.solids << [100, 100, 300, 300] + end +end + +def test_universe args, assert + game = MySuperHappyFunGame.new + game.args = args + game.tick + assert.true! args.outputs.solids.length == 1, "failure: a solid was not added after tick" + assert.false! 1 == 2, "failure: some how, 1 equals 2, the world is ending" + puts "test_universe completed successfully" +end + +puts "running tests" +$gtk.reset 100 +$gtk.log_level = :off +$gtk.tests.start diff --git a/samples/99_genre_crafting/farming_game_starting_point/sprites/background.png b/samples/99_genre_crafting/farming_game_starting_point/sprites/background.png new file mode 100644 index 0000000..dbda37e Binary files /dev/null and b/samples/99_genre_crafting/farming_game_starting_point/sprites/background.png differ diff --git a/samples/99_genre_dev_tools/animation_creator_starting_point/app/main.rb b/samples/99_genre_dev_tools/animation_creator_starting_point/app/main.rb index 14456e3..b80e4b8 100644 --- a/samples/99_genre_dev_tools/animation_creator_starting_point/app/main.rb +++ b/samples/99_genre_dev_tools/animation_creator_starting_point/app/main.rb @@ -72,24 +72,22 @@ class OneBitLowrezPaint end def render_instructions - instructions = <<-S -* Instructions: -- All data is stored in the ~canvas~ directory. -- Hold ~d~ to set the edit mode to erase. -- Release ~d~ to set the edit mode drawing. -- Press ~a~ to added a frame to the end. -- Press ~b~ to select the previous frame. -- Press ~f~ to select the next frame. -- Press ~c~ to copy a frame. -- Press ~v~ to paste a copied frame into the selected frame. -- Press ~x~ to delete the currently selected frame. -- Press ~w~ to save the canvas and export all sprites. -- Press ~l~ to load the canvas. -S - - instructions.strip.each_line.with_index do |l, i| + instructions = [ + "* Hotkeys:", + "- d: hold to erase, release to draw.", + "- a: add frame.", + "- c: copy frame.", + "- v: paste frame.", + "- x: delete frame.", + "- b: go to previous frame.", + "- f: go to next frame.", + "- w: save to ./canvas directory.", + "- l: load from ./canvas." + ] + + instructions.each.with_index do |l, i| outputs.labels << { x: 840, y: 500 - (i * 20), text: "#{l}", - r: 180, g: 180, b: 180, size_enum: -3 } + r: 180, g: 180, b: 180, size_enum: 0 } end end @@ -103,12 +101,12 @@ S label = { x: b.x + state.buttons_frame_selection.size.half, y: b.y, text: "#{i + 1}", r: 180, g: 180, b: 180, - size_enum: -4, alignment_enum: 1 }.label + size_enum: -4, alignment_enum: 1 }.label! - selection_border = b.merge(r: 40, g: 40, b: 40).border + selection_border = b.merge(r: 40, g: 40, b: 40).border! if i == state.animation_frames_selected_index - selection_border = b.merge(r: 40, g: 230, b: 200).border + selection_border = b.merge(r: 40, g: 230, b: 200).border! end [selection_border, label] diff --git a/samples/99_genre_dev_tools/tile_editor_starting_point/app/main.rb b/samples/99_genre_dev_tools/tile_editor_starting_point/app/main.rb index 4238fcd..95ccfdf 100644 --- a/samples/99_genre_dev_tools/tile_editor_starting_point/app/main.rb +++ b/samples/99_genre_dev_tools/tile_editor_starting_point/app/main.rb @@ -17,15 +17,19 @@ - args.outputs.labels: An array. The values generate a label. The parameters are [X, Y, TEXT, SIZE, ALIGNMENT, RED, GREEN, BLUE, ALPHA, FONT STYLE] + For more information about labels, go to mygame/documentation/02-labels.md. - args.outputs.sprites: An array. The values generate a sprite. The parameters are [X, Y, WIDTH, HEIGHT, IMAGE PATH] + For more information about sprites, go to mygame/documentation/05-sprites.md. - args.outputs.solids: An array. The values generate a solid. The parameters are [X, Y, WIDTH, HEIGHT, RED, GREEN, BLUE] + For more information about solids, go to mygame/documentation/03-solids-and-borders.md. - args.outputs.lines: An array. The values generate a line. The parameters are [X1, Y1, X2, Y2, RED, GREEN, BLUE] + For more information about lines, go to mygame/documentation/04-lines.md. - args.state.new_entity: Used when we want to create a new object, like a sprite or button. In this sample app, new_entity is used to create a new button that clears the grid. diff --git a/samples/99_genre_dungeon_crawl/classics_jam/app/main.rb b/samples/99_genre_dungeon_crawl/classics_jam/app/main.rb new file mode 100644 index 0000000..d14b50e --- /dev/null +++ b/samples/99_genre_dungeon_crawl/classics_jam/app/main.rb @@ -0,0 +1,213 @@ +class Game + attr_gtk + + def tick + defaults + render + input + calc + end + + def defaults + player.x ||= 640 + player.y ||= 360 + player.w ||= 16 + player.h ||= 16 + player.attacked_at ||= -1 + player.angle ||= 0 + player.future_player ||= future_player_position 0, 0 + player.projectiles ||= [] + player.damage ||= 0 + state.level ||= create_level level_one_template + end + + def render + outputs.sprites << level.walls.map do |w| + w.merge(path: 'sprites/square/gray.png') + end + + outputs.sprites << level.spawn_locations.map do |s| + s.merge(path: 'sprites/square/blue.png') + end + + outputs.sprites << player.projectiles.map do |p| + p.merge(path: 'sprites/square/blue.png') + end + + outputs.sprites << level.enemies.map do |e| + e.merge(path: 'sprites/square/red.png') + end + + outputs.sprites << player.merge(path: 'sprites/circle/green.png', angle: player.angle) + + outputs.labels << { x: 30, y: 30.from_top, text: "damage: #{player.damage || 0}" } + end + + def input + player.angle = inputs.directional_angle || player.angle + if inputs.controller_one.key_down.a || inputs.keyboard.key_down.space + player.attacked_at = state.tick_count + end + end + + def calc + calc_player + calc_projectiles + calc_enemies + calc_spawn_locations + end + + def calc_player + if player.attacked_at == state.tick_count + player.projectiles << { at: state.tick_count, + x: player.x, + y: player.y, + angle: player.angle, + w: 4, + h: 4 }.center_inside_rect(player) + end + + if player.attacked_at.elapsed_time > 5 + future_player = future_player_position inputs.left_right * 2, inputs.up_down * 2 + future_player_collision = future_collision player, future_player, level.walls + player.x = future_player_collision.x if !future_player_collision.dx_collision + player.y = future_player_collision.y if !future_player_collision.dy_collision + end + end + + def calc_projectile_collisions entities + entities.each do |e| + e.damage ||= 0 + player.projectiles.each do |p| + if !p.collided && (p.intersect_rect? e) + p.collided = true + e.damage += 1 + end + end + end + end + + def calc_projectiles + player.projectiles.map! do |p| + dx, dy = p.angle.vector 10 + p.merge(x: p.x + dx, y: p.y + dy) + end + + calc_projectile_collisions level.walls + level.enemies + level.spawn_locations + player.projectiles.reject! { |p| p.at.elapsed_time > 10000 } + player.projectiles.reject! { |p| p.collided } + level.enemies.reject! { |e| e.damage > e.hp } + level.spawn_locations.reject! { |s| s.damage > s.hp } + end + + def calc_enemies + level.enemies.map! do |e| + dx = 0 + dx = 1 if e.x < player.x + dx = -1 if e.x > player.x + dy = 0 + dy = 1 if e.y < player.y + dy = -1 if e.y > player.y + future_e = future_entity_position dx, dy, e + future_e_collision = future_collision e, future_e, level.enemies + level.walls + e.next_x = e.x + e.next_y = e.y + e.next_x = future_e_collision.x if !future_e_collision.dx_collision + e.next_y = future_e_collision.y if !future_e_collision.dy_collision + e + end + + level.enemies.map! do |e| + e.x = e.next_x + e.y = e.next_y + e + end + + level.enemies.each do |e| + player.damage += 1 if e.intersect_rect? player + end + end + + def calc_spawn_locations + level.spawn_locations.map! do |s| + s.merge(countdown: s.countdown - 1) + end + level.spawn_locations + .find_all { |s| s.countdown.neg? } + .each do |s| + s.countdown = s.rate + s.merge(countdown: s.rate) + new_enemy = create_enemy s + if !(level.enemies.find { |e| e.intersect_rect? new_enemy }) + level.enemies << new_enemy + end + end + end + + def create_enemy spawn_location + to_cell(spawn_location.ordinal_x, spawn_location.ordinal_y).merge hp: 2 + end + + def create_level level_template + { + walls: level_template.walls.map { |w| to_cell(w.ordinal_x, w.ordinal_y).merge(w) }, + enemies: [], + spawn_locations: level_template.spawn_locations.map { |s| to_cell(s.ordinal_x, s.ordinal_y).merge(s) } + } + end + + def level_one_template + { + walls: [{ ordinal_x: 25, ordinal_y: 20}, + { ordinal_x: 25, ordinal_y: 21}, + { ordinal_x: 25, ordinal_y: 22}, + { ordinal_x: 25, ordinal_y: 23}], + spawn_locations: [{ ordinal_x: 10, ordinal_y: 10, rate: 120, countdown: 0, hp: 5 }] + } + end + + def player + state.player ||= {} + end + + def level + state.level ||= {} + end + + def future_collision entity, future_entity, others + dx_collision = others.find { |o| o != entity && (o.intersect_rect? future_entity.dx) } + dy_collision = others.find { |o| o != entity && (o.intersect_rect? future_entity.dy) } + + { + dx_collision: dx_collision, + x: future_entity.dx.x, + dy_collision: dy_collision, + y: future_entity.dy.y + } + end + + def future_entity_position dx, dy, entity + { + dx: entity.merge(x: entity.x + dx), + dy: entity.merge(y: entity.y + dy), + both: entity.merge(x: entity.x + dx, y: entity.y + dy) + } + end + + def future_player_position dx, dy + future_entity_position dx, dy, player + end + + def to_cell ordinal_x, ordinal_y + { x: ordinal_x * 16, y: ordinal_y * 16, w: 16, h: 16 } + end +end + +def tick args + $game ||= Game.new + $game.args = args + $game.tick +end + +$gtk.reset +$game = nil diff --git a/samples/99_genre_dungeon_crawl/classics_jam/sprites/circle/green.png b/samples/99_genre_dungeon_crawl/classics_jam/sprites/circle/green.png new file mode 100644 index 0000000..43cf7ee Binary files /dev/null and b/samples/99_genre_dungeon_crawl/classics_jam/sprites/circle/green.png differ diff --git a/samples/99_genre_dungeon_crawl/classics_jam/sprites/square/blue.png b/samples/99_genre_dungeon_crawl/classics_jam/sprites/square/blue.png new file mode 100644 index 0000000..b840849 Binary files /dev/null and b/samples/99_genre_dungeon_crawl/classics_jam/sprites/square/blue.png differ diff --git a/samples/99_genre_dungeon_crawl/classics_jam/sprites/square/gray.png b/samples/99_genre_dungeon_crawl/classics_jam/sprites/square/gray.png new file mode 100644 index 0000000..2142b30 Binary files /dev/null and b/samples/99_genre_dungeon_crawl/classics_jam/sprites/square/gray.png differ diff --git a/samples/99_genre_dungeon_crawl/classics_jam/sprites/square/red.png b/samples/99_genre_dungeon_crawl/classics_jam/sprites/square/red.png new file mode 100644 index 0000000..3ed5f13 Binary files /dev/null and b/samples/99_genre_dungeon_crawl/classics_jam/sprites/square/red.png differ diff --git a/samples/99_genre_fighting/01_special_move_inputs/app/main.rb b/samples/99_genre_fighting/01_special_move_inputs/app/main.rb new file mode 100644 index 0000000..5db1951 --- /dev/null +++ b/samples/99_genre_fighting/01_special_move_inputs/app/main.rb @@ -0,0 +1,297 @@ +def tick args + #tick_instructions args, "Use LEFT and RIGHT arrow keys to move and SPACE to jump." + defaults args + render args + input args + calc args +end + +# sets default values and creates empty collections +# initialization only happens in the first frame +def defaults args + fiddle args + + args.state.tick_count = args.state.tick_count + args.state.bridge_top = 128 + args.state.player.x ||= 0 # initializes player's properties + args.state.player.y ||= args.state.bridge_top + args.state.player.w ||= 64 + args.state.player.h ||= 64 + args.state.player.dy ||= 0 + args.state.player.dx ||= 0 + args.state.player.r ||= 0 + args.state.game_over_at ||= 0 + args.state.animation_time ||=0 + + args.state.timeleft ||=0 + args.state.timeright ||=0 + args.state.lastpush ||=0 + + args.state.inputlist ||= ["j","k","l"] +end + +# sets enemy, player, hammer values +def fiddle args + args.state.gravity = -0.5 + args.state.player_jump_power = 10 # sets player values + args.state.player_jump_power_duration = 5 + args.state.player_max_run_speed = 20 + args.state.player_speed_slowdown_rate = 0.9 + args.state.player_acceleration = 0.9 +end + +# outputs objects onto the screen +def render args + if (args.state.player.dx < 0.01) && (args.state.player.dx > -0.01) + args.state.player.dx = 0 + end + + #move list + (args.layout.rect_group row: 0, col_from_right: 8, drow: 0.3, + merge: { vertical_alignment_enum: 0, size_enum: -2 }, + group: [ + { text: "move: WASD" }, + { text: "jump: Space" }, + { text: "attack forwards: J (while on ground" }, + { text: "attack upwards: K (while on groud)" }, + { text: "attack backwards: J (while on ground and holding A)" }, + { text: "attack downwards: K (while in air)" }, + { text: "dash attack: J, K in quick succession." }, + { text: "shield: hold J, K at the same time." }, + { text: "dash backwards: A, A in quick succession." }, + ]).into args.outputs.labels + + # registered moves + args.outputs.labels << { x: 0.to_layout_col, + y: 0.to_layout_row, + text: "input history", + size_enum: -2, + vertical_alignment_enum: 0 } + + (args.state.inputlist.take(5)).map do |s| + { text: s, size_enum: -2, vertical_alignment_enum: 0 } + end.yield_self do |group| + (args.layout.rect_group row: 0.3, col: 0, drow: 0.3, group: group).into args.outputs.labels + end + + + #sprites + player = [args.state.player.x, args.state.player.y, + args.state.player.w, args.state.player.h, + "sprites/square/white.png", + args.state.player.r] + + playershield = [args.state.player.x - 20, args.state.player.y - 10, + args.state.player.w + 20, args.state.player.h + 20, + "sprites/square/blue.png", + args.state.player.r, + 0] + + playerjab = [args.state.player.x + 32, args.state.player.y, + args.state.player.w, args.state.player.h, + "sprites/isometric/indigo.png", + args.state.player.r, + 0] + + playerupper = [args.state.player.x, args.state.player.y + 32, + args.state.player.w, args.state.player.h, + "sprites/isometric/indigo.png", + args.state.player.r+90, + 0] + + if ((args.state.tick_count - args.state.lastpush) <= 15) + if (args.state.inputlist[0] == "<<") + player = [args.state.player.x, args.state.player.y, + args.state.player.w, args.state.player.h, + "sprites/square/yellow.png", args.state.player.r] + end + + if (args.state.inputlist[0] == "shield") + player = [args.state.player.x, args.state.player.y, + args.state.player.w, args.state.player.h, + "sprites/square/indigo.png", args.state.player.r] + + playershield = [args.state.player.x - 10, args.state.player.y - 10, + args.state.player.w + 20, args.state.player.h + 20, + "sprites/square/blue.png", args.state.player.r, 50] + end + + if (args.state.inputlist[0] == "back-attack") + playerjab = [args.state.player.x - 20, args.state.player.y, + args.state.player.w - 10, args.state.player.h, + "sprites/isometric/indigo.png", args.state.player.r, 255] + end + + if (args.state.inputlist[0] == "forward-attack") + playerjab = [args.state.player.x + 32, args.state.player.y, + args.state.player.w, args.state.player.h, + "sprites/isometric/indigo.png", args.state.player.r, 255] + end + + if (args.state.inputlist[0] == "up-attack") + playerupper = [args.state.player.x, args.state.player.y + 32, + args.state.player.w, args.state.player.h, + "sprites/isometric/indigo.png", args.state.player.r + 90, 255] + end + + if (args.state.inputlist[0] == "dair") + playerupper = [args.state.player.x, args.state.player.y - 32, + args.state.player.w, args.state.player.h, + "sprites/isometric/indigo.png", args.state.player.r + 90, 255] + end + + if (args.state.inputlist[0] == "dash-attack") + playerupper = [args.state.player.x, args.state.player.y + 32, + args.state.player.w, args.state.player.h, + "sprites/isometric/violet.png", args.state.player.r + 90, 255] + + playerjab = [args.state.player.x + 32, args.state.player.y, + args.state.player.w, args.state.player.h, + "sprites/isometric/violet.png", args.state.player.r, 255] + end + end + + args.outputs.sprites << playerjab + args.outputs.sprites << playerupper + args.outputs.sprites << player + args.outputs.sprites << playershield + + args.outputs.solids << 20.map_with_index do |i| # uses 20 squares to form bridge + [i * 64, args.state.bridge_top - 64, 64, 64] + end +end + +# Performs calculations to move objects on the screen +def calc args + # Since velocity is the change in position, the change in x increases by dx. Same with y and dy. + args.state.player.x += args.state.player.dx + args.state.player.y += args.state.player.dy + + # Since acceleration is the change in velocity, the change in y (dy) increases every frame + args.state.player.dy += args.state.gravity + + # player's y position is either current y position or y position of top of + # bridge, whichever has a greater value + # ensures that the player never goes below the bridge + args.state.player.y = args.state.player.y.greater(args.state.bridge_top) + + # player's x position is either the current x position or 0, whichever has a greater value + # ensures that the player doesn't go too far left (out of the screen's scope) + args.state.player.x = args.state.player.x.greater(0) + + # player is not falling if it is located on the top of the bridge + args.state.player.falling = false if args.state.player.y == args.state.bridge_top + #args.state.player.rect = [args.state.player.x, args.state.player.y, args.state.player.h, args.state.player.w] # sets definition for player +end + +# Resets the player by changing its properties back to the values they had at initialization +def reset_player args + args.state.player.x = 0 + args.state.player.y = args.state.bridge_top + args.state.player.dy = 0 + args.state.player.dx = 0 + args.state.enemy.hammers.clear # empties hammer collection + args.state.enemy.hammer_queue.clear # empties hammer_queue + args.state.game_over_at = args.state.tick_count # game_over_at set to current frame (or passage of time) +end + +# Processes input from the user to move the player +def input args + if args.state.inputlist.length > 5 + args.state.inputlist.pop + end + + should_process_special_move = (args.inputs.keyboard.key_down.j) || + (args.inputs.keyboard.key_down.k) || + (args.inputs.keyboard.key_down.a) || + (args.inputs.keyboard.key_down.d) || + (args.inputs.controller_one.key_down.y) || + (args.inputs.controller_one.key_down.x) || + (args.inputs.controller_one.key_down.left) || + (args.inputs.controller_one.key_down.right) + + if (should_process_special_move) + if (args.inputs.keyboard.key_down.j && args.inputs.keyboard.key_down.k) || + (args.inputs.controller_one.key_down.x && args.inputs.controller_one.key_down.y) + args.state.inputlist.unshift("shield") + elsif (args.inputs.keyboard.key_down.k || args.inputs.controller_one.key_down.y) && + (args.state.inputlist[0] == "forward-attack") && ((args.state.tick_count - args.state.lastpush) <= 15) + args.state.inputlist.unshift("dash-attack") + args.state.player.dx = 20 + elsif (args.inputs.keyboard.key_down.j && args.inputs.keyboard.a) || + (args.inputs.controller_one.key_down.x && args.inputs.controller_one.key_down.left) + args.state.inputlist.unshift("back-attack") + elsif ( args.inputs.controller_one.key_down.x || args.inputs.keyboard.key_down.j) + args.state.inputlist.unshift("forward-attack") + elsif (args.inputs.keyboard.key_down.k || args.inputs.controller_one.key_down.y) && + (args.state.player.y > 128) + args.state.inputlist.unshift("dair") + elsif (args.inputs.keyboard.key_down.k || args.inputs.controller_one.key_down.y) + args.state.inputlist.unshift("up-attack") + elsif (args.inputs.controller_one.key_down.left || args.inputs.keyboard.key_down.a) && + (args.state.inputlist[0] == "<") && + ((args.state.tick_count - args.state.lastpush) <= 10) + args.state.inputlist.unshift("<<") + args.state.player.dx = -15 + elsif (args.inputs.controller_one.key_down.left || args.inputs.keyboard.key_down.a) + args.state.inputlist.unshift("<") + args.state.timeleft = args.state.tick_count + elsif (args.inputs.controller_one.key_down.right || args.inputs.keyboard.key_down.d) + args.state.inputlist.unshift(">") + end + + args.state.lastpush = args.state.tick_count + end + + if args.inputs.keyboard.space || args.inputs.controller_one.r2 # if the user presses the space bar + args.state.player.jumped_at ||= args.state.tick_count # jumped_at is set to current frame + + # if the time that has passed since the jump is less than the player's jump duration and + # the player is not falling + if args.state.player.jumped_at.elapsed_time < args.state.player_jump_power_duration && !args.state.player.falling + args.state.player.dy = args.state.player_jump_power # change in y is set to power of player's jump + end + end + + # if the space bar is in the "up" state (or not being pressed down) + if args.inputs.keyboard.key_up.space || args.inputs.controller_one.key_up.r2 + args.state.player.jumped_at = nil # jumped_at is empty + args.state.player.falling = true # the player is falling + end + + if args.inputs.left # if left key is pressed + if args.state.player.dx < -5 + args.state.player.dx = args.state.player.dx + else + args.state.player.dx = -5 + end + + elsif args.inputs.right # if right key is pressed + if args.state.player.dx > 5 + args.state.player.dx = args.state.player.dx + else + args.state.player.dx = 5 + end + else + args.state.player.dx *= args.state.player_speed_slowdown_rate # dx is scaled down + end + + if ((args.state.player.dx).abs > 5) #&& ((args.state.tick_count - args.state.lastpush) <= 10) + args.state.player.dx *= 0.95 + end +end + +def tick_instructions args, text, y = 715 + return if args.state.key_event_occurred + if args.inputs.mouse.click || + args.inputs.keyboard.directional_vector || + args.inputs.keyboard.key_down.enter || + args.inputs.keyboard.key_down.space || + args.inputs.keyboard.key_down.escape + args.state.key_event_occurred = true + end + + args.outputs.debug << [0, y - 50, 1280, 60].solid + args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label + args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label +end diff --git a/samples/99_genre_fighting/01_special_move_inputs/sprites/isometric/indigo.png b/samples/99_genre_fighting/01_special_move_inputs/sprites/isometric/indigo.png new file mode 100644 index 0000000..e6be50c Binary files /dev/null and b/samples/99_genre_fighting/01_special_move_inputs/sprites/isometric/indigo.png differ diff --git a/samples/99_genre_fighting/01_special_move_inputs/sprites/isometric/violet.png b/samples/99_genre_fighting/01_special_move_inputs/sprites/isometric/violet.png new file mode 100644 index 0000000..f09bf21 Binary files /dev/null and b/samples/99_genre_fighting/01_special_move_inputs/sprites/isometric/violet.png differ diff --git a/samples/99_genre_fighting/01_special_move_inputs/sprites/square/blue.png b/samples/99_genre_fighting/01_special_move_inputs/sprites/square/blue.png new file mode 100644 index 0000000..b840849 Binary files /dev/null and b/samples/99_genre_fighting/01_special_move_inputs/sprites/square/blue.png differ diff --git a/samples/99_genre_fighting/01_special_move_inputs/sprites/square/indigo.png b/samples/99_genre_fighting/01_special_move_inputs/sprites/square/indigo.png new file mode 100644 index 0000000..2384108 Binary files /dev/null and b/samples/99_genre_fighting/01_special_move_inputs/sprites/square/indigo.png differ diff --git a/samples/99_genre_fighting/01_special_move_inputs/sprites/square/white.png b/samples/99_genre_fighting/01_special_move_inputs/sprites/square/white.png new file mode 100644 index 0000000..378c565 Binary files /dev/null and b/samples/99_genre_fighting/01_special_move_inputs/sprites/square/white.png differ diff --git a/samples/99_genre_fighting/01_special_move_inputs/sprites/square/yellow.png b/samples/99_genre_fighting/01_special_move_inputs/sprites/square/yellow.png new file mode 100644 index 0000000..0edeeec Binary files /dev/null and b/samples/99_genre_fighting/01_special_move_inputs/sprites/square/yellow.png differ diff --git a/samples/99_genre_lowrez/nokia_3310/app/main.rb b/samples/99_genre_lowrez/nokia_3310/app/main.rb index 683539e..7aa6ba5 100644 --- a/samples/99_genre_lowrez/nokia_3310/app/main.rb +++ b/samples/99_genre_lowrez/nokia_3310/app/main.rb @@ -67,7 +67,7 @@ def tick args # ======================================================================= - # ==== HOW TO ANIMATE A SPRITE (SEPARATE PNGS) ========================== + # ==== HOW TO ANIMATE A SPRITE (SEPERATE PNGS) ========================== # ======================================================================= # Remove the "#" at the beginning of the line below # how_to_animate_a_sprite args @@ -248,7 +248,7 @@ def how_to_render_sprites args end # ============================================================================= -# ==== HOW TO ANIMATE A SPRITE (SEPARATE PNGS) ========================== +# ==== HOW TO ANIMATE A SPRITE (SEPERATE PNGS) ========================== # ============================================================================= def how_to_animate_a_sprite args # STEP 1: Define when you want the animation to start. The animation in this case will start in 3 seconds @@ -472,7 +472,7 @@ def how_to_determine_collision args text: "Collision!", alignment_enum: 1) else - # if no collision occurred, render the words no collision. + # if collision occurred, render the words no collision. args.nokia.labels << args.nokia .default_label .merge(x: 42, @@ -605,7 +605,7 @@ def render_debug args text: text, size_enum: -1.5, r: 255, g: 255, b: 255 - }.label + }.label! end args.outputs.debug << { @@ -615,7 +615,7 @@ def render_debug args size_enum: -0.5, alignment_enum: 1, r: 255, g: 255, b: 255 - }.label + }.label! end def snake_demo args diff --git a/samples/99_genre_lowrez/nokia_3310/app/nokia.rb b/samples/99_genre_lowrez/nokia_3310/app/nokia.rb index 077e36f..7bcb5b1 100644 --- a/samples/99_genre_lowrez/nokia_3310/app/nokia.rb +++ b/samples/99_genre_lowrez/nokia_3310/app/nokia.rb @@ -236,7 +236,7 @@ module GTK g: 240, b: 216, a: 100 - }.line + }.line! end (NOKIA_WIDTH + 1).map_with_index do |i| @@ -249,7 +249,7 @@ module GTK g: 240, b: 216, a: 100 - }.line + }.line! end @args.state.overlay_rendered = true diff --git a/samples/99_genre_lowrez/resolution_64x64/app/main.rb b/samples/99_genre_lowrez/resolution_64x64/app/main.rb index 9208120..4b1614d 100644 --- a/samples/99_genre_lowrez/resolution_64x64/app/main.rb +++ b/samples/99_genre_lowrez/resolution_64x64/app/main.rb @@ -62,7 +62,7 @@ def tick args # ======================================================================= - # ==== HOW TO ANIMATE A SPRITE (SEPARATE PNGS) ========================== + # ==== HOW TO ANIMATE A SPRITE (SEPERATE PNGS) ========================== # Remove the "#" at the beginning of the line below # how_to_animate_a_sprite args # ======================================================================= @@ -242,7 +242,7 @@ def how_to_render_sprites args end ## # ============================================================================= -## # ==== HOW TO ANIMATE A SPRITE (SEPARATE PNGS) ========================== +## # ==== HOW TO ANIMATE A SPRITE (SEPERATE PNGS) ========================== ## # ============================================================================= def how_to_animate_a_sprite args # STEP 1: Define when you want the animation to start. The animation in this case will start in 3 seconds @@ -462,7 +462,7 @@ def how_to_determine_collision args text: "Collision!", alignment_enum: 1) else - # if no collision occurred, render the words no collision. + # if collision occurred, render the words no collision. args.lowrez.labels << args.lowrez .default_label .merge(x: 31, @@ -560,7 +560,7 @@ def render_debug args g: 128, b: 128, a: 80 - }.line + }.line! args.outputs.static_debug << { x: LOWREZ_X_OFFSET + (i * 10), @@ -571,7 +571,7 @@ def render_debug args g: 128, b: 128, a: 80 - }.line + }.line! end end @@ -598,7 +598,7 @@ def render_debug args y: 720 - (i * 20), text: text, size_enum: -1.5 - }.label + }.label! end args.outputs.debug << { @@ -607,7 +607,7 @@ def render_debug args text: "INFO: dev mode is currently enabled. Comment out the invocation of ~render_debug~ within the ~tick~ method to hide the debug layer.", size_enum: -0.5, alignment_enum: 1 - }.label + }.label! end $gtk.reset diff --git a/samples/99_genre_platformer/clepto_frog/app/main.rb b/samples/99_genre_platformer/clepto_frog/app/main.rb index e1ddffb..a4eb069 100644 --- a/samples/99_genre_platformer/clepto_frog/app/main.rb +++ b/samples/99_genre_platformer/clepto_frog/app/main.rb @@ -485,7 +485,7 @@ class CleptoFrog return if state.world_lookup.keys.length > 0 return unless state.world.length > 0 - # Searches through the world and finds the coordinates that exist + # Searches through the world and finds the cordinates that exist state.world_lookup = {} state.world.each do |x, y, w, h| state.world_lookup[[x, y, w || state.tile_size, h || state.tile_size]] = true diff --git a/samples/99_genre_platformer/gorillas_basic/app/repl.rb b/samples/99_genre_platformer/gorillas_basic/app/repl.rb deleted file mode 100644 index 4428c4b..0000000 --- a/samples/99_genre_platformer/gorillas_basic/app/repl.rb +++ /dev/null @@ -1,17 +0,0 @@ -begin - if $gtk.args.state.current_turn == :player_1_angle - $gtk.args.state.player_1_angle = "#{60 + 10.randomize(:ratio).to_i}" - $you_so_basic_gorillas.input_execute_turn - $gtk.args.state.player_1_velocity = "#{30 + 20.randomize(:ratio).to_i}" - $you_so_basic_gorillas.input_execute_turn - elsif $gtk.args.state.current_turn == :player_2_angle - $gtk.args.state.player_2_angle = "#{60 + 10.randomize(:ratio).to_i}" - $you_so_basic_gorillas.input_execute_turn - $gtk.args.state.player_2_velocity = "#{30 + 20.randomize(:ratio).to_i}" - $you_so_basic_gorillas.input_execute_turn - else - $you_so_basic_gorillas.input_execute_turn - end -rescue Exception => e - puts e -end diff --git a/samples/99_genre_platformer/the_little_probe/app/main.rb b/samples/99_genre_platformer/the_little_probe/app/main.rb index 5c0ce61..8fcf279 100644 --- a/samples/99_genre_platformer/the_little_probe/app/main.rb +++ b/samples/99_genre_platformer/the_little_probe/app/main.rb @@ -33,7 +33,7 @@ class FallingCircle { text: "mission control, this is sasha. landing on europa successful.", distance_gate: 0 }, { text: "operation \"find earth 2.0\", initiated at 8-29-2036 14:00.", distance_gate: 0 }, { text: "jupiter's sure is beautiful...", distance_gate: 4000 }, - { text: "hmm, it seems there's some kind of anomaly in the sky", distance_gate: 7000 }, + { text: "hmm, it seems there's some kind of anomoly in the sky", distance_gate: 7000 }, { text: "dancing lights, i'll call them whisps.", distance_gate: 8000 }, { text: "#todo... look i ran out of time -_-", distance_gate: 9000 }, { text: "there's never enough time", distance_gate: 9000 }, diff --git a/samples/99_genre_rpg_narrative/choose_your_own_adventure/app/decision.rb b/samples/99_genre_rpg_narrative/choose_your_own_adventure/app/decision.rb index 0d23668..2921076 100644 --- a/samples/99_genre_rpg_narrative/choose_your_own_adventure/app/decision.rb +++ b/samples/99_genre_rpg_narrative/choose_your_own_adventure/app/decision.rb @@ -1,5 +1,5 @@ # Hey there! Welcome to Four Decisions. Here is how you -# create your decision tree. Remove =begin and =end from the text to +# create your decision tree. Remove =being and =end from the text to # enable the game (just save the file). Change stuff and see what happens! def game diff --git a/samples/99_genre_rpg_narrative/choose_your_own_adventure/app/main.rb b/samples/99_genre_rpg_narrative/choose_your_own_adventure/app/main.rb index 953b121..22faad1 100644 --- a/samples/99_genre_rpg_narrative/choose_your_own_adventure/app/main.rb +++ b/samples/99_genre_rpg_narrative/choose_your_own_adventure/app/main.rb @@ -14,8 +14,10 @@ - args.outputs.labels: An array. The values generate a label. The parameters are [X, Y, TEXT, SIZE, ALIGNMENT, RED, GREEN, BLUE, ALPHA, FONT STYLE] - + For more information about labels, go to mygame/documentation/02-labels.md. + - args.keyboard.key_down.KEY: Determines if a key is in the down state or pressed down. + For more information about the keyboard, go to mygame/documentation/06-keyboard.md. - String interpolation: uses #{} syntax; everything between the #{ and the } is evaluated as Ruby code, and the placeholder is replaced with its corresponding value or result. @@ -53,7 +55,7 @@ def tick args end end -# Runs methods needed for the game to function properly +# Runs methods needed for game to function properly # Creates a rectangular border around the screen def tick_game args defaults args diff --git a/samples/99_genre_rpg_narrative/return_of_serenity/app/repl.rb b/samples/99_genre_rpg_narrative/return_of_serenity/app/repl.rb deleted file mode 100644 index a59baf5..0000000 --- a/samples/99_genre_rpg_narrative/return_of_serenity/app/repl.rb +++ /dev/null @@ -1 +0,0 @@ -puts $gtk.args.state.current_scene diff --git a/samples/99_genre_rpg_narrative/return_of_serenity/app/storyline_anka.rb b/samples/99_genre_rpg_narrative/return_of_serenity/app/storyline_anka.rb index 8fc10b2..bad7795 100644 --- a/samples/99_genre_rpg_narrative/return_of_serenity/app/storyline_anka.rb +++ b/samples/99_genre_rpg_narrative/return_of_serenity/app/storyline_anka.rb @@ -43,7 +43,7 @@ end def reply_to_anka args decision_graph anka_current_reply(args), - "Matthew's-- wife is doing-- well. What's-- even-- better-- is that he's-- a dad, and he didn't-- even-- know it. Should- I- leave- out the part about-- the crew- being-- in hibernation-- for 20-- years? They- should- enter-- stasis-- on a high- note... Right?", + "Matthew's-- wife is doing-- well. What's-- even-- better-- is that he's-- a dad, and he didn't-- even-- know it. Should- I- leave- out the part about-- the crew- being-- in hibernation-- for 20-- years? They- should- enter-- statis-- on a high- note... Right?", [:replied_with_whole_truth, "Whole-- Truth--", anka_reply_whole_truth], [:replied_with_half_truth, "Half-- Truth--", anka_reply_half_truth] end @@ -57,7 +57,7 @@ def anka_last_reply args end def anka_reply_whole_truth - "Matthew's wife is doing-- very-- well. In fact, she was pregnant. Matthew-- is a dad. He has a son. But, I need- all-- of-- you-- to brace-- yourselves. You've-- been in stasis-- for 20 years. A lot has changed. Most of Earth's-- population--- didn't-- survive. Tell- Matthew-- that I'm-- sorry he didn't-- get to see- his- son grow- up." + "Matthew's wife is doing-- very-- well. In fact, she was pregnant. Matthew-- is a dad. He has a son. But, I need- all-- of-- you-- to brace-- yourselves. You've-- been in statis-- for 20 years. A lot has changed. Most of Earth's-- population--- didn't-- survive. Tell- Matthew-- that I'm-- sorry he didn't-- get to see- his- son grow- up." end def anka_reply_half_truth @@ -92,9 +92,9 @@ end def anka_current_reply args if args.state.scene_history.include? :replied_to_serenity_alive_firmly - return "Hello. This is, Aanka. Sasha-- is still- trying-- to gather-- her wits about-- her, given- the gravity--- of your- last- reply. Thank- you- for being-- honest, and thank- you- for the help- with the ship- diagnostics. I was able-- to retrieve-- all of the navigation--- information---- after-- the battery--- swap. We- are ready-- to head back to Earth. Before-- we go- back- into-- stasis, Matthew--- wanted-- to know- how his- wife- is doing. Please- reply-- as soon- as you can. He's-- not going-- to get- into-- the stasis-- chamber-- until-- he knows- his wife is okay." + return "Hello. This is, Aanka. Sasha-- is still- trying-- to gather-- her wits about-- her, given- the gravity--- of your- last- reply. Thank- you- for being-- honest, and thank- you- for the help- with the ship- diagnostics. I was able-- to retrieve-- all of the navigation--- information---- after-- the battery--- swap. We- are ready-- to head back to Earth. Before-- we go- back- into-- statis, Matthew--- wanted-- to know- how his- wife- is doing. Please- reply-- as soon- as you can. He's-- not going-- to get- into-- the statis-- chamber-- until-- he knows- his wife is okay." else - return "Hello. This is, Aanka. Thank- you for the help- with the ship's-- diagnostics. I was able-- to retrieve-- all of the navigation--- information--- after-- the battery-- swap. I- know-- that- you didn't-- tell- the whole truth- about-- how far we are from- Earth. Don't-- worry. I understand-- why you did it. We- are ready-- to head back to Earth. Before-- we go- back- into-- stasis, Matthew--- wanted-- to know- how his- wife- is doing. Please- reply-- as soon- as you can. He's-- not going-- to get- into-- the stasis-- chamber-- until-- he knows- his wife is okay." + return "Hello. This is, Aanka. Thank- you for the help- with the ship's-- diagnostics. I was able-- to retrieve-- all of the navigation--- information--- after-- the battery-- swap. I- know-- that- you didn't-- tell- the whole truth- about-- how far we are from- Earth. Don't-- worry. I understand-- why you did it. We- are ready-- to head back to Earth. Before-- we go- back- into-- statis, Matthew--- wanted-- to know- how his- wife- is doing. Please- reply-- as soon- as you can. He's-- not going-- to get- into-- the statis-- chamber-- until-- he knows- his wife is okay." end end diff --git a/samples/99_genre_rpg_narrative/return_of_serenity/app/storyline_day_one.rb b/samples/99_genre_rpg_narrative/return_of_serenity/app/storyline_day_one.rb index fb11c97..24b2b45 100644 --- a/samples/99_genre_rpg_narrative/return_of_serenity/app/storyline_day_one.rb +++ b/samples/99_genre_rpg_narrative/return_of_serenity/app/storyline_day_one.rb @@ -21,7 +21,7 @@ def day_one_infront_of_home args [0, 4, 3, 20, :day_one_ceremony] ], storylines: [ - [40, 20, 4, 4, "It looks like everyone- is already- at the remembrance-- ceremony."], + [40, 20, 4, 4, "It looks like everyone- is already- at the rememberance-- ceremony."], ] } end diff --git a/samples/99_genre_rpg_narrative/return_of_serenity/app/storyline_serenity_bio.rb b/samples/99_genre_rpg_narrative/return_of_serenity/app/storyline_serenity_bio.rb index ad7653d..587f5f4 100644 --- a/samples/99_genre_rpg_narrative/return_of_serenity/app/storyline_serenity_bio.rb +++ b/samples/99_genre_rpg_narrative/return_of_serenity/app/storyline_serenity_bio.rb @@ -57,13 +57,13 @@ def serenity_bio_book args [ 4, 50, 56, 4, "The Title-- Reads: Never-- Forget-- Mission-- Serenity---"], [ 4, 38, 8, 8, "Name: Matthew--- R. Sex: Male--- Age-- at-- Departure: 36-----"], - [14, 38, 46, 8, "Tribute-- Text: Matthew graduated-- Magna-- Cum-- Laude-- from MIT--- with-- a- PHD---- in Aero-- Nautical--- Engineering. He was immensely--- competitive, and had an insatiable---- thirst- for aerial-- battle. From the age of twenty, he remained-- undefeated--- in the Israeli-- Air- Force- \"Blue Flag\" combat-- exercises. By the age of 29--- he had already-- risen through- the ranks, and became-- the Lieutenant--- General--- of Lufwaffe. Matthew-- volunteered-- to- pilot-- Mission-- Serenity. To- this day, his wife- and son- are pillars-- of strength- for us. Rest- in Peace- Matthew, we are sorry-- that- news of the pregnancy-- never-- reached- you. Please forgive us."], + [14, 38, 46, 8, "Tribute-- Text: Matthew graduated-- Magna-- Cum-- Laude-- from MIT--- with-- a- PHD---- in Aero-- Nautical--- Engineering. He was immensely--- competitive, and had an insatiable---- thirst- for aerial-- battle. From the age of twenty, he remained-- undefeated--- in the Israeli-- Air- Force- \"Blue Flag\" combat-- exercises. By the age of 29--- he had already-- risen through- the ranks, and became-- the Lieutenant--- General--- of Lufwaffe. Matthew-- volenteered-- to- pilot-- Mission-- Serenity. To- this day, his wife- and son- are pillars-- of strength- for us. Rest- in Peace- Matthew, we are sorry-- that- news of the pregancy-- never-- reached- you. Please forgive us."], [4, 26, 8, 8, "Name: Aanka--- P. Sex: Female--- Age-- at-- Departure: 9-----"], - [14, 26, 46, 8, "Tribute-- Text: Aanka--- graduated--- Magna-- Cum- Laude-- from MIT, at- the- age- of eight, with a- PHD---- in Astro-- Physics. Her-- IQ--- was over 390, the highest-- ever- recorded--- IQ-- in- human-- history. She changed- the landscape-- of Physics-- with her efforts- in- unravelling--- the mysteries--- of- Dark- Matter--. Anka discovered-- the threat- of Halley's-- Comet-- collision--- with Earth. She spear headed-- the global-- effort-- for Mission-- Serenity. Her- multilingual--- address-- to- the world-- brought- us all hope."], + [14, 26, 46, 8, "Tribute-- Text: Aanka--- gratuated--- Magna-- Cum- Laude-- from MIT, at- the- age- of eight, with a- PHD---- in Astro-- Physics. Her-- IQ--- was over 390, the highest-- ever- recorded--- IQ-- in- human-- history. She changed- the landscape-- of Physics-- with her efforts- in- unravelling--- the mysteries--- of- Dark- Matter--. Anka discovered-- the threat- of Halley's-- Comet-- collision--- with Earth. She spear headed-- the global-- effort-- for Misson-- Serenity. Her- multilingual--- address-- to- the world-- brought- us all hope."], [4, 14, 8, 8, "Name: Sasha--- N. Sex: Female--- Age-- at-- Departure: 29-----"], - [14, 14, 46, 8, "Tribute-- Text: Sasha graduated-- Magna-- Cum- Laude-- from MIT--- with-- a- PHD---- in Computer---- Science----. She-- was-- brilliant--, strong- willed--, and-- a-- stunningly--- beautiful--- woman---. Sasha---- is- the- creator--- of the world's--- first- Ruby--- Quantum-- Machine---. After-- much- critical--- acclaim--, the Quantum-- Computer-- was placed in MIT's---- Museum-- next- to- Richard--- G. and Thomas--- K.'s---- Lisp-- Machine---. Her- engineering--- skills-- were-- paramount--- for Mission--- Serenity's--- success. Humanity-- misses-- you-- dearly,-- Sasha--. Life-- shines-- a dimmer-- light-- now- that- your- angelic- voice-- can never- be heard- again."], + [14, 14, 46, 8, "Tribute-- Text: Sasha gratuated-- Magna-- Cum- Laude-- from MIT--- with-- a- PHD---- in Computer---- Science----. She-- was-- brilliant--, strong- willed--, and-- a-- stunningly--- beautiful--- woman---. Sasha---- is- the- creator--- of the world's--- first- Ruby--- Quantum-- Machine---. After-- much- critical--- acclaim--, the Quantum-- Computer-- was placed in MIT's---- Museam-- next- to- Richard--- G. and Thomas--- K.'s---- Lisp-- Machine---. Her- engineering--- skills-- were-- paramount--- for Mission--- Serenity's--- success. Humanity-- misses-- you-- dearly,-- Sasha--. Life-- shines-- a dimmer-- light-- now- that- your- angelic- voice-- can never- be heard- again."], ], scenes: [ [*hotspot_bottom, :serenity_bio_finally_to_bed] diff --git a/samples/99_genre_rpg_roguelike/01_roguelike_starting_point/app/main.rb b/samples/99_genre_rpg_roguelike/01_roguelike_starting_point/app/main.rb index 15a381b..bd5f521 100644 --- a/samples/99_genre_rpg_roguelike/01_roguelike_starting_point/app/main.rb +++ b/samples/99_genre_rpg_roguelike/01_roguelike_starting_point/app/main.rb @@ -14,7 +14,7 @@ def tick_game args # set up your game # initialize the game/game defaults. ||= means that you only initialize it if - # the value isn't already initialized + # the value isn't alread initialized args.state.player.x ||= 0 args.state.player.y ||= 0 diff --git a/samples/99_genre_rpg_roguelike/01_roguelike_starting_point/app/sprite_lookup.rb b/samples/99_genre_rpg_roguelike/01_roguelike_starting_point/app/sprite_lookup.rb index 579e133..f129e25 100644 --- a/samples/99_genre_rpg_roguelike/01_roguelike_starting_point/app/sprite_lookup.rb +++ b/samples/99_genre_rpg_roguelike/01_roguelike_starting_point/app/sprite_lookup.rb @@ -97,7 +97,7 @@ def tile_extended x, y, w, h, r, g, b, a, tile_row_column_or_key if !row member_name = member_name_as_code tile_row_column_or_key - raise "Unable to find a sprite for #{member_name}. Make sure the value exists in app/sprite_lookup.rb." + raise "Unabled to find a sprite for #{member_name}. Make sure the value exists in app/sprite_lookup.rb." end # Sprite provided by Rogue Yun diff --git a/samples/99_genre_rpg_roguelike/02_roguelike_line_of_sight/app/main.rb b/samples/99_genre_rpg_roguelike/02_roguelike_line_of_sight/app/main.rb index c2c364b..66ff027 100644 --- a/samples/99_genre_rpg_roguelike/02_roguelike_line_of_sight/app/main.rb +++ b/samples/99_genre_rpg_roguelike/02_roguelike_line_of_sight/app/main.rb @@ -339,7 +339,7 @@ class Game state.enemies.find { |e| e.x == x && e.y == y && !e.is_dead } end - # Moves the user based on their keyboard input and sets values for target cell + #M oves the user based on their keyboard input and sets values for target cell def input_target_cell if inputs.keyboard.key_down.up # if "up" key is in "down" state [state.x, state.y + 1, 0, 1] # user moves up diff --git a/samples/99_genre_rpg_roguelike/roguelike_line_of_sight/app/constants.rb b/samples/99_genre_rpg_roguelike/roguelike_line_of_sight/app/constants.rb deleted file mode 100644 index 37dd493..0000000 --- a/samples/99_genre_rpg_roguelike/roguelike_line_of_sight/app/constants.rb +++ /dev/null @@ -1,8 +0,0 @@ -SHOW_LEGEND = true -SOURCE_TILE_SIZE = 16 -DESTINATION_TILE_SIZE = 16 -TILE_SHEET_SIZE = 256 -TILE_R = 0 -TILE_G = 0 -TILE_B = 0 -TILE_A = 255 diff --git a/samples/99_genre_rpg_roguelike/roguelike_line_of_sight/app/legend.rb b/samples/99_genre_rpg_roguelike/roguelike_line_of_sight/app/legend.rb deleted file mode 100644 index 4d07b79..0000000 --- a/samples/99_genre_rpg_roguelike/roguelike_line_of_sight/app/legend.rb +++ /dev/null @@ -1,65 +0,0 @@ -def tick_legend args - return unless SHOW_LEGEND - - legend_padding = 16 - legend_x = 1280 - TILE_SHEET_SIZE - legend_padding - legend_y = 720 - TILE_SHEET_SIZE - legend_padding - tile_sheet_sprite = [legend_x, - legend_y, - TILE_SHEET_SIZE, - TILE_SHEET_SIZE, - 'sprites/simple-mood-16x16.png', 0, - TILE_A, - TILE_R, - TILE_G, - TILE_B] - - if args.inputs.mouse.point.inside_rect? tile_sheet_sprite - mouse_row = args.inputs.mouse.point.y.idiv(SOURCE_TILE_SIZE) - tile_row = 15 - (mouse_row - legend_y.idiv(SOURCE_TILE_SIZE)) - - mouse_col = args.inputs.mouse.point.x.idiv(SOURCE_TILE_SIZE) - tile_col = (mouse_col - legend_x.idiv(SOURCE_TILE_SIZE)) - - args.outputs.primitives << [legend_x - legend_padding * 2, - mouse_row * SOURCE_TILE_SIZE, 256 + legend_padding * 2, 16, 128, 128, 128, 64].solid - - args.outputs.primitives << [mouse_col * SOURCE_TILE_SIZE, - legend_y - legend_padding * 2, 16, 256 + legend_padding * 2, 128, 128, 128, 64].solid - - sprite_key = sprite_lookup.find { |k, v| v == [tile_row, tile_col] } - if sprite_key - member_name, _ = sprite_key - member_name = member_name_as_code member_name - args.outputs.labels << [660, 70, "# CODE SAMPLE (place in the tick_game method located in main.rb)", -1, 0] - args.outputs.labels << [660, 50, "# GRID_X, GRID_Y, TILE_KEY", -1, 0] - args.outputs.labels << [660, 30, "args.outputs.sprites << tile_in_game( 5, 6, #{member_name} )", -1, 0] - else - args.outputs.labels << [660, 50, "Tile [#{tile_row}, #{tile_col}] not found. Add a key and value to app/sprite_lookup.rb:", -1, 0] - args.outputs.labels << [660, 30, "{ \"some_string\" => [#{tile_row}, #{tile_col}] } OR { some_symbol: [#{tile_row}, #{tile_col}] }.", -1, 0] - end - - end - - # render the sprite in the top right with a padding to the top and right so it's - # not flush against the edge - args.outputs.sprites << tile_sheet_sprite - - # carefully place some ascii arrows to show the legend labels - args.outputs.labels << [895, 707, "ROW --->"] - args.outputs.labels << [943, 412, " ^"] - args.outputs.labels << [943, 412, " |"] - args.outputs.labels << [943, 394, "COL ---+"] - - # use the tile sheet to print out row and column numbers - args.outputs.sprites << 16.map_with_index do |i| - sprite_key = i % 10 - [ - tile(1280 - TILE_SHEET_SIZE - legend_padding * 2 - SOURCE_TILE_SIZE, - 720 - legend_padding * 2 - (SOURCE_TILE_SIZE * i), - sprite(sprite_key)), - tile(1280 - TILE_SHEET_SIZE - SOURCE_TILE_SIZE + (SOURCE_TILE_SIZE * i), - 720 - TILE_SHEET_SIZE - legend_padding * 3, sprite(sprite_key)) - ] - end -end diff --git a/samples/99_genre_rpg_roguelike/roguelike_line_of_sight/app/main.rb b/samples/99_genre_rpg_roguelike/roguelike_line_of_sight/app/main.rb deleted file mode 100644 index 15a381b..0000000 --- a/samples/99_genre_rpg_roguelike/roguelike_line_of_sight/app/main.rb +++ /dev/null @@ -1,97 +0,0 @@ -require 'app/constants.rb' -require 'app/sprite_lookup.rb' -require 'app/legend.rb' - -def tick args - tick_game args - tick_legend args -end - -def tick_game args - # setup the grid - args.state.grid.padding = 104 - args.state.grid.size = 512 - - # set up your game - # initialize the game/game defaults. ||= means that you only initialize it if - # the value isn't already initialized - args.state.player.x ||= 0 - args.state.player.y ||= 0 - - args.state.enemies ||= [ - { x: 10, y: 10, type: :goblin, tile_key: :G }, - { x: 15, y: 30, type: :rat, tile_key: :R } - ] - - args.state.info_message ||= "Use arrow keys to move around." - - # handle keyboard input - # keyboard input (arrow keys to move player) - new_player_x = args.state.player.x - new_player_y = args.state.player.y - player_direction = "" - player_moved = false - if args.inputs.keyboard.key_down.up - new_player_y += 1 - player_direction = "north" - player_moved = true - elsif args.inputs.keyboard.key_down.down - new_player_y -= 1 - player_direction = "south" - player_moved = true - elsif args.inputs.keyboard.key_down.right - new_player_x += 1 - player_direction = "east" - player_moved = true - elsif args.inputs.keyboard.key_down.left - new_player_x -= 1 - player_direction = "west" - player_moved = true - end - - #handle game logic - # determine if there is an enemy on that square, - # if so, don't let the player move there - if player_moved - found_enemy = args.state.enemies.find do |e| - e[:x] == new_player_x && e[:y] == new_player_y - end - - if !found_enemy - args.state.player.x = new_player_x - args.state.player.y = new_player_y - args.state.info_message = "You moved #{player_direction}." - else - args.state.info_message = "You cannot move into a square an enemy occupies." - end - end - - args.outputs.sprites << tile_in_game(args.state.player.x, - args.state.player.y, '@') - - # render game - # render enemies at locations - args.outputs.sprites << args.state.enemies.map do |e| - tile_in_game(e[:x], e[:y], e[:tile_key]) - end - - # render the border - border_x = args.state.grid.padding - DESTINATION_TILE_SIZE - border_y = args.state.grid.padding - DESTINATION_TILE_SIZE - border_size = args.state.grid.size + DESTINATION_TILE_SIZE * 2 - - args.outputs.borders << [border_x, - border_y, - border_size, - border_size] - - # render label stuff - args.outputs.labels << [border_x, border_y - 10, "Current player location is: #{args.state.player.x}, #{args.state.player.y}"] - args.outputs.labels << [border_x, border_y + 25 + border_size, args.state.info_message] -end - -def tile_in_game x, y, tile_key - tile($gtk.args.state.grid.padding + x * DESTINATION_TILE_SIZE, - $gtk.args.state.grid.padding + y * DESTINATION_TILE_SIZE, - tile_key) -end diff --git a/samples/99_genre_rpg_roguelike/roguelike_line_of_sight/app/sprite_lookup.rb b/samples/99_genre_rpg_roguelike/roguelike_line_of_sight/app/sprite_lookup.rb deleted file mode 100644 index 579e133..0000000 --- a/samples/99_genre_rpg_roguelike/roguelike_line_of_sight/app/sprite_lookup.rb +++ /dev/null @@ -1,124 +0,0 @@ -def sprite_lookup - { - 0 => [3, 0], - 1 => [3, 1], - 2 => [3, 2], - 3 => [3, 3], - 4 => [3, 4], - 5 => [3, 5], - 6 => [3, 6], - 7 => [3, 7], - 8 => [3, 8], - 9 => [3, 9], - '@' => [4, 0], - A: [ 4, 1], - B: [ 4, 2], - C: [ 4, 3], - D: [ 4, 4], - E: [ 4, 5], - F: [ 4, 6], - G: [ 4, 7], - H: [ 4, 8], - I: [ 4, 9], - J: [ 4, 10], - K: [ 4, 11], - L: [ 4, 12], - M: [ 4, 13], - N: [ 4, 14], - O: [ 4, 15], - P: [ 5, 0], - Q: [ 5, 1], - R: [ 5, 2], - S: [ 5, 3], - T: [ 5, 4], - U: [ 5, 5], - V: [ 5, 6], - W: [ 5, 7], - X: [ 5, 8], - Y: [ 5, 9], - Z: [ 5, 10], - a: [ 6, 1], - b: [ 6, 2], - c: [ 6, 3], - d: [ 6, 4], - e: [ 6, 5], - f: [ 6, 6], - g: [ 6, 7], - h: [ 6, 8], - i: [ 6, 9], - j: [ 6, 10], - k: [ 6, 11], - l: [ 6, 12], - m: [ 6, 13], - n: [ 6, 14], - o: [ 6, 15], - p: [ 7, 0], - q: [ 7, 1], - r: [ 7, 2], - s: [ 7, 3], - t: [ 7, 4], - u: [ 7, 5], - v: [ 7, 6], - w: [ 7, 7], - x: [ 7, 8], - y: [ 7, 9], - z: [ 7, 10], - '|' => [ 7, 12] - } -end - -def sprite key - $gtk.args.state.reserved.sprite_lookup[key] -end - -def member_name_as_code raw_member_name - if raw_member_name.is_a? Symbol - ":#{raw_member_name}" - elsif raw_member_name.is_a? String - "'#{raw_member_name}'" - elsif raw_member_name.is_a? Fixnum - "#{raw_member_name}" - else - "UNKNOWN: #{raw_member_name}" - end -end - -def tile x, y, tile_row_column_or_key - tile_extended x, y, DESTINATION_TILE_SIZE, DESTINATION_TILE_SIZE, TILE_R, TILE_G, TILE_B, TILE_A, tile_row_column_or_key -end - -def tile_extended x, y, w, h, r, g, b, a, tile_row_column_or_key - row_or_key, column = tile_row_column_or_key - if !column - row, column = sprite row_or_key - else - row, column = row_or_key, column - end - - if !row - member_name = member_name_as_code tile_row_column_or_key - raise "Unable to find a sprite for #{member_name}. Make sure the value exists in app/sprite_lookup.rb." - end - - # Sprite provided by Rogue Yun - # http://www.bay12forums.com/smf/index.php?topic=144897.0 - # License: Public Domain - - { - x: x, - y: y, - w: w, - h: h, - tile_x: column * 16, - tile_y: (row * 16), - tile_w: 16, - tile_h: 16, - r: r, - g: g, - b: b, - a: a, - path: 'sprites/simple-mood-16x16.png' - } -end - -$gtk.args.state.reserved.sprite_lookup = sprite_lookup diff --git a/samples/99_genre_rpg_roguelike/roguelike_line_of_sight/license-for-sample.txt b/samples/99_genre_rpg_roguelike/roguelike_line_of_sight/license-for-sample.txt deleted file mode 100644 index 100dcec..0000000 --- a/samples/99_genre_rpg_roguelike/roguelike_line_of_sight/license-for-sample.txt +++ /dev/null @@ -1,9 +0,0 @@ -Copyright 2019 DragonRuby LLC - -MIT License - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/samples/99_genre_rpg_roguelike/roguelike_line_of_sight/sprites/simple-mood-16x16.png b/samples/99_genre_rpg_roguelike/roguelike_line_of_sight/sprites/simple-mood-16x16.png deleted file mode 100644 index 0eca11e..0000000 Binary files a/samples/99_genre_rpg_roguelike/roguelike_line_of_sight/sprites/simple-mood-16x16.png and /dev/null differ diff --git a/samples/99_genre_rpg_roguelike/roguelike_starting_point/app/main.rb b/samples/99_genre_rpg_roguelike/roguelike_starting_point/app/main.rb deleted file mode 100644 index bc4d7fd..0000000 --- a/samples/99_genre_rpg_roguelike/roguelike_starting_point/app/main.rb +++ /dev/null @@ -1,438 +0,0 @@ -=begin - - APIs listing that haven't been encountered in previous sample apps: - - - lambda: A way to define a block and its parameters with special syntax. - For example, the syntax of lambda looks like this: - my_lambda = -> { puts "This is my lambda" } - - Reminders: - - args.outputs.labels: An array. The values generate a label. - The parameters are [X, Y, TEXT, SIZE, ALIGNMENT, RED, GREEN, BLUE, ALPHA, FONT STYLE] - - - ARRAY#inside_rect?: Returns whether or not the point is inside a rect. - - - product: Returns an array of all combinations of elements from all arrays. - - - find: Finds all elements of a collection that meet requirements. - - - abs: Returns the absolute value. - -=end - -# This sample app allows the player to move around in the dungeon, which becomes more or less visible -# depending on the player's location, and also has enemies. - -class Game - attr_accessor :args, :state, :inputs, :outputs, :grid - - # Calls all the methods needed for the game to run properly. - def tick - defaults - render_canvas - render_dungeon - render_player - render_enemies - print_cell_coordinates - calc_canvas - input_move - input_click_map - end - - # Sets default values and initializes variables - def defaults - outputs.background_color = [0, 0, 0] # black background - - # Initializes empty canvas, dungeon, and enemies collections. - state.canvas ||= [] - state.dungeon ||= [] - state.enemies ||= [] - - # If state.area doesn't have value, load_area_one and derive_dungeon_from_area methods are called - if !state.area - load_area_one - derive_dungeon_from_area - - # Changing these values will change the position of player - state.x = 7 - state.y = 5 - - # Creates new enemies, sets their values, and adds them to the enemies collection. - state.enemies << state.new_entity(:enemy) do |e| # declares each enemy as new entity - e.x = 13 # position - e.y = 5 - e.previous_hp = 3 - e.hp = 3 - e.max_hp = 3 - e.is_dead = false # the enemy is alive - end - - update_line_of_sight # updates line of sight by adding newly visible cells - end - end - - # Adds elements into the state.area collection - # The dungeon is derived using the coordinates of this collection - def load_area_one - state.area ||= [] - state.area << [8, 6] - state.area << [7, 6] - state.area << [7, 7] - state.area << [8, 9] - state.area << [7, 8] - state.area << [7, 9] - state.area << [6, 4] - state.area << [7, 3] - state.area << [7, 4] - state.area << [6, 5] - state.area << [7, 5] - state.area << [8, 5] - state.area << [8, 4] - state.area << [1, 1] - state.area << [0, 1] - state.area << [0, 2] - state.area << [1, 2] - state.area << [2, 2] - state.area << [2, 1] - state.area << [2, 3] - state.area << [1, 3] - state.area << [1, 4] - state.area << [2, 4] - state.area << [2, 5] - state.area << [1, 5] - state.area << [2, 6] - state.area << [3, 6] - state.area << [4, 6] - state.area << [4, 7] - state.area << [4, 8] - state.area << [5, 8] - state.area << [5, 9] - state.area << [6, 9] - state.area << [7, 10] - state.area << [7, 11] - state.area << [7, 12] - state.area << [7, 12] - state.area << [7, 13] - state.area << [8, 13] - state.area << [9, 13] - state.area << [10, 13] - state.area << [11, 13] - state.area << [12, 13] - state.area << [12, 12] - state.area << [8, 12] - state.area << [9, 12] - state.area << [10, 12] - state.area << [11, 12] - state.area << [12, 11] - state.area << [13, 11] - state.area << [13, 10] - state.area << [13, 9] - state.area << [13, 8] - state.area << [13, 7] - state.area << [13, 6] - state.area << [12, 6] - state.area << [14, 6] - state.area << [14, 5] - state.area << [13, 5] - state.area << [12, 5] - state.area << [12, 4] - state.area << [13, 4] - state.area << [14, 4] - state.area << [1, 6] - state.area << [6, 6] - end - - # Starts with an empty dungeon collection, and adds dungeon cells into it. - def derive_dungeon_from_area - state.dungeon = [] # starts as empty collection - - state.area.each do |a| # for each element of the area collection - state.dungeon << state.new_entity(:dungeon_cell) do |d| # declares each dungeon cell as new entity - d.x = a.x # dungeon cell position using coordinates from area - d.y = a.y - d.is_visible = false # cell is not visible - d.alpha = 0 # not transparent at all - d.border = [left_margin + a.x * grid_size, - bottom_margin + a.y * grid_size, - grid_size, - grid_size, - *blue, - 255] # sets border definition for dungeon cell - d # returns dungeon cell - end - end - end - - def left_margin - 40 # sets left margin - end - - def bottom_margin - 60 # sets bottom margin - end - - def grid_size - 40 # sets size of grid square - end - - # Updates the line of sight by calling the thick_line_of_sight method and - # adding dungeon cells to the newly_visible collection - def update_line_of_sight - variations = [-1, 0, 1] - # creates collection of newly visible dungeon cells - newly_visible = variations.product(variations).flat_map do |rise, run| # combo of all elements - thick_line_of_sight state.x, state.y, rise, run, 15, # calls thick_line_of_sight method - lambda { |x, y| dungeon_cell_exists? x, y } # checks whether or not cell exists - end.uniq# removes duplicates - - state.dungeon.each do |d| # perform action on each element of dungeons collection - d.is_visible = newly_visible.find { |v| v.x == d.x && v.y == d.y } # finds match inside newly_visible collection - end - end - - #Returns a boolean value - def dungeon_cell_exists? x, y - # Finds cell coordinates inside dungeon collection to determine if dungeon cell exists - state.dungeon.find { |d| d.x == x && d.y == y } - end - - # Calls line_of_sight method to add elements to result collection - def thick_line_of_sight start_x, start_y, rise, run, distance, cell_exists_lambda - result = [] - result += line_of_sight start_x, start_y, rise, run, distance, cell_exists_lambda - result += line_of_sight start_x - 1, start_y, rise, run, distance, cell_exists_lambda # one left - result += line_of_sight start_x + 1, start_y, rise, run, distance, cell_exists_lambda # one right - result - end - - # Adds points to the result collection to create the player's line of sight - def line_of_sight start_x, start_y, rise, run, distance, cell_exists_lambda - result = [] # starts as empty collection - points = points_on_line start_x, start_y, rise, run, distance # calls points_on_line method - points.each do |p| # for each point in collection - if cell_exists_lambda.call(p.x, p.y) # if the cell exists - result << p # add it to result collection - else # if cell does not exist - return result # return result collection as it is - end - end - - result # return result collection - end - - # Finds the coordinates of the points on the line by performing calculations - def points_on_line start_x, start_y, rise, run, distance - distance.times.map do |i| # perform an action - [start_x + run * i, start_y + rise * i] # definition of point - end - end - - def render_canvas - return - outputs.borders << state.canvas.map do |c| # on each element of canvas collection - c.border # outputs border - end - end - - # Outputs the dungeon cells. - def render_dungeon - outputs.solids << [0, 0, grid.w, grid.h] # outputs black background for grid - - # Sets the alpha value (opacity) for each dungeon cell and calls the cell_border method. - outputs.borders << state.dungeon.map do |d| # for each element in dungeon collection - d.alpha += if d.is_visible # if cell is visible - 255.fdiv(30) # increment opacity (transparency) - else # if cell is not visible - 255.fdiv(600) * -1 # decrease opacity - end - d.alpha = d.alpha.cap_min_max(0, 255) - cell_border d.x, d.y, [*blue, d.alpha] # sets blue border using alpha value - end.reject_nil - end - - # Sets definition of a cell border using the parameters - def cell_border x, y, color = nil - [left_margin + x * grid_size, - bottom_margin + y * grid_size, - grid_size, - grid_size, - *color] - end - - # Sets the values for the player and outputs it as a label - def render_player - outputs.labels << [grid_x(state.x) + 20, # positions "@" text in center of grid square - grid_y(state.y) + 35, - "@", # player is represented by a white "@" character - 1, 1, *white] - end - - def grid_x x - left_margin + x * grid_size # positions horizontally on grid - end - - def grid_y y - bottom_margin + y * grid_size # positions vertically on grid - end - - # Outputs enemies onto the screen. - def render_enemies - state.enemies.map do |e| # for each enemy in the collection - alpha = 255 # set opacity (full transparency) - - # Outputs an enemy using a label. - outputs.labels << [ - left_margin + 20 + e.x * grid_size, # positions enemy's "r" text in center of grid square - bottom_margin + 35 + e.y * grid_size, - "r", # enemy's text - 1, 1, *white, alpha] - - # Creates a red border around an enemy. - outputs.borders << [grid_x(e.x), grid_y(e.y), grid_size, grid_size, *red] - end - end - - #White labels are output for the cell coordinates of each element in the dungeon collection. - def print_cell_coordinates - return unless state.debug - state.dungeon.each do |d| - outputs.labels << [grid_x(d.x) + 2, - grid_y(d.y) - 2, - "#{d.x},#{d.y}", - -2, 0, *white] - end - end - - # Adds new elements into the canvas collection and sets their values. - def calc_canvas - return if state.canvas.length > 0 # return if canvas collection has at least one element - 15.times do |x| # 15 times perform an action - 15.times do |y| - state.canvas << state.new_entity(:canvas) do |c| # declare canvas element as new entity - c.x = x # set position - c.y = y - c.border = [left_margin + x * grid_size, - bottom_margin + y * grid_size, - grid_size, - grid_size, - *white, 30] # sets border definition - end - end - end - end - - # Updates x and y values of the player, and updates player's line of sight - def input_move - x, y, x_diff, y_diff = input_target_cell - - return unless dungeon_cell_exists? x, y # player can't move there if a dungeon cell doesn't exist in that location - return if enemy_at x, y # player can't move there if there is an enemy in that location - - state.x += x_diff # increments x by x_diff (so player moves left or right) - state.y += y_diff # same with y and y_diff ( so player moves up or down) - update_line_of_sight # updates visible cells - end - - def enemy_at x, y - # Finds if coordinates exist in enemies collection and enemy is not dead - state.enemies.find { |e| e.x == x && e.y == y && !e.is_dead } - end - - # Moves the user based on their keyboard input and sets values for target cell - def input_target_cell - if inputs.keyboard.key_down.up # if "up" key is in "down" state - [state.x, state.y + 1, 0, 1] # user moves up - elsif inputs.keyboard.key_down.down # if "down" key is pressed - [state.x, state.y - 1, 0, -1] # user moves down - elsif inputs.keyboard.key_down.left # if "left" key is pressed - [state.x - 1, state.y, -1, 0] # user moves left - elsif inputs.keyboard.key_down.right # if "right" key is pressed - [state.x + 1, state.y, 1, 0] # user moves right - else - nil # otherwise, empty - end - end - - # Goes through the canvas collection to find if the mouse was clicked inside of the borders of an element. - def input_click_map - return unless inputs.mouse.click # return unless the mouse is clicked - canvas_entry = state.canvas.find do |c| # find element from canvas collection that meets requirements - inputs.mouse.click.inside_rect? c.border # find border that mouse was clicked inside of - end - puts canvas_entry # prints canvas_entry value - end - - # Sets the definition of a label using the parameters. - def label text, x, y, color = nil - color ||= white # color is initialized to white - [x, y, text, 1, 1, *color] # sets label definition - end - - def green - [60, 200, 100] # sets color saturation to shade of green - end - - def blue - [50, 50, 210] # sets color saturation to shade of blue - end - - def white - [255, 255, 255] # sets color saturation to white - end - - def red - [230, 80, 80] # sets color saturation to shade of red - end - - def orange - [255, 80, 60] # sets color saturation to shade of orange - end - - def pink - [255, 0, 200] # sets color saturation to shade of pink - end - - def gray - [75, 75, 75] # sets color saturation to shade of gray - end - - # Recolors the border using the parameters. - def recolor_border border, r, g, b - border[4] = r - border[5] = g - border[6] = b - border - end - - # Returns a boolean value. - def visible? cell - # finds cell's coordinates inside visible_cells collections to determine if cell is visible - state.visible_cells.find { |c| c.x == cell.x && c.y == cell.y} - end - - # Exports dungeon by printing dungeon cell coordinates - def export_dungeon - state.dungeon.each do |d| # on each element of dungeon collection - puts "state.dungeon << [#{d.x}, #{d.y}]" # prints cell coordinates - end - end - - def distance_to_cell cell - distance_to state.x, cell.x, state.y, cell.y # calls distance_to method - end - - def distance_to from_x, x, from_y, y - (from_x - x).abs + (from_y - y).abs # finds distance between two cells using coordinates - end -end - -$game = Game.new - -def tick args - $game.args = args - $game.state = args.state - $game.inputs = args.inputs - $game.outputs = args.outputs - $game.grid = args.grid - $game.tick -end diff --git a/samples/99_genre_rpg_roguelike/roguelike_starting_point/license-for-sample.txt b/samples/99_genre_rpg_roguelike/roguelike_starting_point/license-for-sample.txt deleted file mode 100644 index 100dcec..0000000 --- a/samples/99_genre_rpg_roguelike/roguelike_starting_point/license-for-sample.txt +++ /dev/null @@ -1,9 +0,0 @@ -Copyright 2019 DragonRuby LLC - -MIT License - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/samples/99_genre_rpg_roguelike/roguelike_starting_point/replay.txt b/samples/99_genre_rpg_roguelike/roguelike_starting_point/replay.txt deleted file mode 100644 index a2b4c52..0000000 --- a/samples/99_genre_rpg_roguelike/roguelike_starting_point/replay.txt +++ /dev/null @@ -1,555 +0,0 @@ -replay_version 2.0 -stopped_at 1731 -seed 100 -recorded_at Sun Sep 29 22:38:52 2019 -[:mouse_move, 785, 468, 2, 1, 114] -[:mouse_move, 756, 468, 2, 2, 115] -[:mouse_move, 745, 468, 2, 3, 117] -[:mouse_move, 718, 470, 2, 4, 118] -[:mouse_move, 705, 472, 2, 5, 119] -[:mouse_move, 680, 476, 2, 6, 120] -[:mouse_move, 668, 478, 2, 7, 121] -[:mouse_move, 606, 492, 2, 8, 122] -[:mouse_move, 581, 499, 2, 9, 123] -[:mouse_move, 523, 511, 2, 10, 124] -[:mouse_move, 417, 527, 2, 11, 125] -[:mouse_move, 387, 528, 2, 12, 126] -[:mouse_move, 344, 528, 2, 13, 127] -[:mouse_move, 324, 526, 2, 14, 128] -[:mouse_move, 295, 520, 2, 15, 129] -[:mouse_move, 285, 518, 2, 16, 130] -[:mouse_move, 276, 515, 2, 17, 131] -[:mouse_move, 255, 512, 2, 18, 132] -[:mouse_move, 244, 511, 2, 19, 133] -[:mouse_move, 228, 511, 2, 20, 134] -[:mouse_move, 213, 513, 2, 21, 135] -[:mouse_move, 194, 523, 2, 22, 136] -[:mouse_move, 190, 526, 2, 23, 137] -[:mouse_move, 183, 532, 2, 24, 138] -[:mouse_move, 180, 533, 2, 25, 139] -[:mouse_move, 177, 536, 2, 26, 140] -[:mouse_move, 177, 537, 2, 27, 141] -[:mouse_move, 193, 537, 2, 28, 142] -[:mouse_move, 208, 536, 2, 29, 143] -[:mouse_move, 222, 536, 2, 30, 144] -[:mouse_move, 232, 535, 2, 31, 145] -[:mouse_move, 241, 535, 2, 32, 146] -[:mouse_move, 245, 535, 2, 33, 147] -[:mouse_move, 249, 535, 2, 34, 148] -[:mouse_move, 250, 535, 2, 35, 149] -[:mouse_move, 251, 535, 2, 36, 150] -[:mouse_move, 252, 534, 2, 37, 151] -[:mouse_move, 256, 531, 2, 38, 152] -[:mouse_move, 259, 527, 2, 39, 153] -[:mouse_move, 265, 520, 2, 40, 154] -[:mouse_move, 270, 515, 2, 41, 155] -[:mouse_move, 274, 511, 2, 42, 156] -[:mouse_move, 282, 501, 2, 43, 157] -[:mouse_move, 293, 490, 2, 44, 159] -[:mouse_move, 295, 489, 2, 45, 160] -[:mouse_move, 299, 487, 2, 46, 161] -[:mouse_move, 301, 485, 2, 47, 162] -[:mouse_move, 303, 484, 2, 48, 163] -[:mouse_move, 304, 484, 2, 49, 164] -[:mouse_move, 306, 484, 2, 50, 165] -[:mouse_move, 307, 484, 2, 51, 166] -[:mouse_move, 308, 484, 2, 52, 167] -[:mouse_move, 310, 484, 2, 53, 168] -[:mouse_move, 314, 484, 2, 54, 169] -[:mouse_move, 316, 484, 2, 55, 170] -[:mouse_move, 317, 484, 2, 56, 171] -[:mouse_move, 318, 484, 2, 57, 172] -[:mouse_move, 319, 484, 2, 58, 173] -[:key_down_raw, 1073741906, 0, 2, 59, 232] -[:key_up_raw, 1073741906, 0, 2, 60, 237] -[:key_down_raw, 1073741906, 0, 2, 61, 243] -[:key_up_raw, 1073741906, 0, 2, 62, 247] -[:key_down_raw, 1073741906, 0, 2, 63, 254] -[:key_up_raw, 1073741906, 0, 2, 64, 257] -[:key_down_raw, 1073741906, 0, 2, 65, 266] -[:key_up_raw, 1073741906, 0, 2, 66, 272] -[:key_down_raw, 1073741906, 0, 2, 67, 279] -[:key_up_raw, 1073741906, 0, 2, 68, 284] -[:key_down_raw, 1073741905, 0, 2, 69, 326] -[:key_up_raw, 1073741905, 0, 2, 70, 334] -[:key_down_raw, 1073741904, 0, 2, 71, 421] -[:key_up_raw, 1073741904, 0, 2, 72, 428] -[:key_down_raw, 1073741904, 0, 2, 73, 438] -[:key_up_raw, 1073741904, 0, 2, 74, 445] -[:key_down_raw, 1073741905, 0, 2, 75, 459] -[:key_up_raw, 1073741905, 0, 2, 76, 466] -[:key_down_raw, 1073741904, 0, 2, 77, 480] -[:key_up_raw, 1073741904, 0, 2, 78, 488] -[:key_down_raw, 1073741905, 0, 2, 79, 499] -[:key_up_raw, 1073741905, 0, 2, 80, 507] -[:mouse_move, 289, 484, 2, 81, 545] -[:mouse_move, 274, 484, 2, 82, 546] -[:mouse_move, 244, 484, 2, 83, 547] -[:mouse_move, 231, 485, 2, 84, 548] -[:mouse_move, 208, 485, 2, 85, 549] -[:mouse_move, 199, 485, 2, 86, 550] -[:mouse_move, 178, 485, 2, 87, 551] -[:mouse_move, 174, 485, 2, 88, 552] -[:mouse_move, 162, 483, 2, 89, 553] -[:mouse_move, 159, 482, 2, 90, 554] -[:mouse_move, 157, 477, 2, 91, 555] -[:mouse_move, 157, 473, 2, 92, 556] -[:mouse_move, 161, 465, 2, 93, 557] -[:mouse_move, 165, 459, 2, 94, 558] -[:mouse_move, 174, 449, 2, 95, 559] -[:mouse_move, 179, 443, 2, 96, 560] -[:mouse_move, 191, 431, 2, 97, 561] -[:mouse_move, 196, 425, 2, 98, 562] -[:mouse_move, 205, 413, 2, 99, 563] -[:mouse_move, 210, 408, 2, 100, 564] -[:mouse_move, 212, 406, 2, 101, 565] -[:mouse_move, 219, 397, 2, 102, 566] -[:mouse_move, 223, 395, 2, 103, 567] -[:mouse_move, 228, 390, 2, 104, 568] -[:mouse_move, 230, 388, 2, 105, 569] -[:mouse_move, 233, 386, 2, 106, 570] -[:mouse_move, 234, 385, 2, 107, 571] -[:mouse_move, 235, 384, 2, 108, 573] -[:mouse_move, 234, 384, 2, 109, 580] -[:mouse_move, 234, 382, 2, 110, 622] -[:mouse_move, 234, 379, 2, 111, 623] -[:mouse_move, 236, 374, 2, 112, 624] -[:mouse_move, 237, 371, 2, 113, 625] -[:mouse_move, 240, 366, 2, 114, 626] -[:mouse_move, 241, 364, 2, 115, 627] -[:mouse_move, 243, 362, 2, 116, 628] -[:mouse_move, 243, 361, 2, 117, 629] -[:mouse_move, 242, 361, 2, 118, 632] -[:mouse_move, 239, 361, 2, 119, 633] -[:mouse_move, 229, 367, 2, 120, 634] -[:mouse_move, 223, 372, 2, 121, 635] -[:mouse_move, 208, 385, 2, 122, 636] -[:mouse_move, 198, 393, 2, 123, 637] -[:mouse_move, 179, 410, 2, 124, 638] -[:mouse_move, 169, 421, 2, 125, 639] -[:mouse_move, 149, 440, 2, 126, 640] -[:mouse_move, 139, 451, 2, 127, 641] -[:mouse_move, 127, 465, 2, 128, 642] -[:mouse_move, 119, 473, 2, 129, 643] -[:mouse_move, 108, 486, 2, 130, 644] -[:mouse_move, 103, 491, 2, 131, 645] -[:mouse_move, 98, 496, 2, 132, 646] -[:mouse_move, 96, 498, 2, 133, 647] -[:mouse_move, 94, 500, 2, 134, 648] -[:mouse_move, 92, 501, 2, 135, 649] -[:mouse_move, 91, 502, 2, 136, 650] -[:mouse_move, 92, 500, 2, 137, 653] -[:mouse_move, 95, 498, 2, 138, 654] -[:mouse_move, 105, 488, 2, 139, 655] -[:mouse_move, 112, 482, 2, 140, 656] -[:mouse_move, 128, 463, 2, 141, 657] -[:mouse_move, 138, 450, 2, 142, 658] -[:mouse_move, 159, 419, 2, 143, 659] -[:mouse_move, 168, 403, 2, 144, 660] -[:mouse_move, 182, 382, 2, 145, 661] -[:mouse_move, 188, 370, 2, 146, 662] -[:mouse_move, 200, 354, 2, 147, 663] -[:mouse_move, 205, 348, 2, 148, 664] -[:mouse_move, 214, 338, 2, 149, 665] -[:mouse_move, 218, 335, 2, 150, 666] -[:mouse_move, 222, 331, 2, 151, 667] -[:mouse_move, 224, 330, 2, 152, 668] -[:mouse_move, 226, 328, 2, 153, 669] -[:mouse_move, 227, 328, 2, 154, 670] -[:mouse_move, 222, 329, 2, 155, 674] -[:mouse_move, 219, 332, 2, 156, 675] -[:mouse_move, 207, 342, 2, 157, 676] -[:mouse_move, 201, 350, 2, 158, 677] -[:mouse_move, 184, 370, 2, 159, 678] -[:mouse_move, 173, 384, 2, 160, 679] -[:mouse_move, 151, 415, 2, 161, 680] -[:mouse_move, 140, 431, 2, 162, 681] -[:mouse_move, 119, 458, 2, 163, 682] -[:mouse_move, 114, 463, 2, 164, 683] -[:mouse_move, 99, 478, 2, 165, 684] -[:mouse_move, 97, 480, 2, 166, 685] -[:mouse_move, 88, 490, 2, 167, 686] -[:mouse_move, 85, 493, 2, 168, 687] -[:mouse_move, 82, 496, 2, 169, 688] -[:mouse_move, 81, 497, 2, 170, 689] -[:mouse_move, 82, 497, 2, 171, 692] -[:mouse_move, 84, 496, 2, 172, 693] -[:mouse_move, 94, 489, 2, 173, 694] -[:mouse_move, 101, 482, 2, 174, 695] -[:mouse_move, 119, 463, 2, 175, 696] -[:mouse_move, 129, 451, 2, 176, 697] -[:mouse_move, 151, 426, 2, 177, 698] -[:mouse_move, 155, 420, 2, 178, 699] -[:mouse_move, 172, 401, 2, 179, 700] -[:mouse_move, 178, 393, 2, 180, 701] -[:mouse_move, 185, 387, 2, 181, 702] -[:mouse_move, 197, 376, 2, 182, 703] -[:mouse_move, 202, 371, 2, 183, 704] -[:mouse_move, 209, 365, 2, 184, 705] -[:mouse_move, 215, 360, 2, 185, 706] -[:mouse_move, 218, 357, 2, 186, 707] -[:mouse_move, 222, 353, 2, 187, 708] -[:mouse_move, 225, 351, 2, 188, 709] -[:mouse_move, 226, 350, 2, 189, 710] -[:mouse_move, 227, 348, 2, 190, 711] -[:mouse_move, 228, 348, 2, 191, 712] -[:mouse_move, 229, 347, 2, 192, 713] -[:mouse_move, 229, 346, 2, 193, 715] -[:mouse_move, 225, 352, 2, 194, 721] -[:mouse_move, 219, 361, 2, 195, 722] -[:mouse_move, 201, 385, 2, 196, 723] -[:mouse_move, 193, 393, 2, 197, 724] -[:mouse_move, 165, 424, 2, 198, 725] -[:mouse_move, 151, 439, 2, 199, 726] -[:mouse_move, 127, 468, 2, 200, 727] -[:mouse_move, 116, 480, 2, 201, 728] -[:mouse_move, 106, 490, 2, 202, 729] -[:mouse_move, 92, 504, 2, 203, 730] -[:mouse_move, 84, 512, 2, 204, 731] -[:mouse_move, 77, 519, 2, 205, 732] -[:mouse_move, 73, 523, 2, 206, 733] -[:mouse_move, 69, 527, 2, 207, 734] -[:mouse_move, 68, 527, 2, 208, 735] -[:mouse_move, 68, 528, 2, 209, 736] -[:mouse_move, 70, 525, 2, 210, 738] -[:mouse_move, 73, 522, 2, 211, 739] -[:mouse_move, 86, 511, 2, 212, 740] -[:mouse_move, 93, 503, 2, 213, 741] -[:mouse_move, 117, 477, 2, 214, 742] -[:mouse_move, 123, 469, 2, 215, 743] -[:mouse_move, 156, 427, 2, 216, 744] -[:mouse_move, 169, 407, 2, 217, 745] -[:mouse_move, 187, 376, 2, 218, 746] -[:mouse_move, 199, 356, 2, 219, 747] -[:mouse_move, 221, 318, 2, 220, 748] -[:mouse_move, 231, 302, 2, 221, 749] -[:mouse_move, 250, 276, 2, 222, 750] -[:mouse_move, 260, 266, 2, 223, 751] -[:mouse_move, 267, 259, 2, 224, 752] -[:mouse_move, 272, 254, 2, 225, 753] -[:mouse_move, 279, 247, 2, 226, 754] -[:mouse_move, 281, 245, 2, 227, 755] -[:mouse_move, 282, 245, 2, 228, 756] -[:mouse_move, 283, 244, 2, 229, 757] -[:key_down_raw, 1073741906, 0, 2, 230, 813] -[:key_up_raw, 1073741906, 0, 2, 231, 820] -[:key_down_raw, 1073741903, 0, 2, 232, 833] -[:key_up_raw, 1073741903, 0, 2, 233, 840] -[:key_down_raw, 1073741903, 0, 2, 234, 848] -[:key_up_raw, 1073741903, 0, 2, 235, 855] -[:key_down_raw, 1073741906, 0, 2, 236, 862] -[:key_up_raw, 1073741906, 0, 2, 237, 870] -[:key_down_raw, 1073741903, 0, 2, 238, 880] -[:key_up_raw, 1073741903, 0, 2, 239, 901] -[:key_down_raw, 1073741903, 0, 2, 240, 917] -[:key_up_raw, 1073741903, 0, 2, 241, 924] -[:key_down_raw, 1073741905, 0, 2, 242, 943] -[:key_up_raw, 1073741905, 0, 2, 243, 948] -[:key_down_raw, 1073741905, 0, 2, 244, 952] -[:key_up_raw, 1073741905, 0, 2, 245, 956] -[:key_down_raw, 1073741905, 0, 2, 246, 960] -[:key_up_raw, 1073741905, 0, 2, 247, 963] -[:key_down_raw, 1073741905, 0, 2, 248, 967] -[:key_up_raw, 1073741905, 0, 2, 249, 972] -[:mouse_move, 244, 247, 2, 250, 997] -[:mouse_move, 229, 253, 2, 251, 998] -[:mouse_move, 174, 283, 2, 252, 999] -[:mouse_move, 152, 299, 2, 253, 1000] -[:mouse_move, 133, 313, 2, 254, 1001] -[:mouse_move, 63, 372, 2, 255, 1002] -[:mouse_move, 53, 384, 2, 256, 1003] -[:mouse_move, 40, 399, 2, 257, 1004] -[:mouse_move, 20, 424, 2, 258, 1005] -[:mouse_move, 13, 440, 2, 259, 1006] -[:mouse_move, 12, 445, 2, 260, 1007] -[:mouse_move, 12, 450, 2, 261, 1008] -[:mouse_move, 12, 451, 2, 262, 1009] -[:mouse_move, 13, 454, 2, 263, 1010] -[:mouse_move, 14, 454, 2, 264, 1011] -[:mouse_move, 15, 455, 2, 265, 1012] -[:mouse_move, 15, 454, 2, 266, 1014] -[:mouse_move, 15, 452, 2, 267, 1015] -[:mouse_move, 15, 447, 2, 268, 1016] -[:mouse_move, 15, 443, 2, 269, 1017] -[:mouse_move, 16, 438, 2, 270, 1018] -[:mouse_move, 17, 435, 2, 271, 1019] -[:mouse_move, 19, 431, 2, 272, 1020] -[:mouse_move, 20, 430, 2, 273, 1021] -[:mouse_move, 22, 428, 2, 274, 1022] -[:mouse_move, 23, 427, 2, 275, 1023] -[:mouse_move, 25, 426, 2, 276, 1024] -[:mouse_move, 26, 426, 2, 277, 1025] -[:mouse_move, 29, 426, 2, 278, 1026] -[:mouse_move, 30, 426, 2, 279, 1028] -[:mouse_move, 31, 427, 2, 280, 1029] -[:mouse_move, 32, 428, 2, 281, 1030] -[:mouse_move, 33, 431, 2, 282, 1031] -[:mouse_move, 34, 432, 2, 283, 1032] -[:mouse_move, 35, 437, 2, 284, 1033] -[:mouse_move, 36, 439, 2, 285, 1034] -[:mouse_move, 37, 444, 2, 286, 1035] -[:mouse_move, 39, 449, 2, 287, 1036] -[:mouse_move, 44, 460, 2, 288, 1037] -[:mouse_move, 45, 464, 2, 289, 1038] -[:mouse_move, 52, 475, 2, 290, 1039] -[:mouse_move, 55, 479, 2, 291, 1040] -[:mouse_move, 62, 485, 2, 292, 1041] -[:mouse_move, 66, 487, 2, 293, 1042] -[:mouse_move, 74, 488, 2, 294, 1043] -[:mouse_move, 79, 488, 2, 295, 1044] -[:mouse_move, 89, 484, 2, 296, 1045] -[:mouse_move, 95, 480, 2, 297, 1046] -[:mouse_move, 111, 468, 2, 298, 1047] -[:mouse_move, 115, 466, 2, 299, 1048] -[:mouse_move, 134, 453, 2, 300, 1049] -[:mouse_move, 142, 447, 2, 301, 1050] -[:mouse_move, 160, 437, 2, 302, 1051] -[:mouse_move, 170, 431, 2, 303, 1052] -[:mouse_move, 179, 425, 2, 304, 1053] -[:mouse_move, 192, 417, 2, 305, 1054] -[:mouse_move, 200, 411, 2, 306, 1055] -[:mouse_move, 213, 401, 2, 307, 1056] -[:mouse_move, 219, 396, 2, 308, 1057] -[:mouse_move, 230, 386, 2, 309, 1058] -[:mouse_move, 238, 375, 2, 310, 1059] -[:mouse_move, 244, 363, 2, 311, 1060] -[:mouse_move, 247, 355, 2, 312, 1061] -[:mouse_move, 253, 341, 2, 313, 1062] -[:mouse_move, 255, 335, 2, 314, 1063] -[:mouse_move, 257, 321, 2, 315, 1064] -[:mouse_move, 258, 309, 2, 316, 1065] -[:mouse_move, 257, 298, 2, 317, 1066] -[:mouse_move, 255, 291, 2, 318, 1067] -[:mouse_move, 249, 281, 2, 319, 1068] -[:mouse_move, 242, 271, 2, 320, 1069] -[:mouse_move, 233, 264, 2, 321, 1070] -[:mouse_move, 226, 260, 2, 322, 1071] -[:mouse_move, 207, 252, 2, 323, 1072] -[:mouse_move, 203, 251, 2, 324, 1073] -[:mouse_move, 185, 249, 2, 325, 1074] -[:mouse_move, 178, 249, 2, 326, 1075] -[:mouse_move, 161, 249, 2, 327, 1076] -[:mouse_move, 153, 250, 2, 328, 1077] -[:mouse_move, 139, 256, 2, 329, 1078] -[:mouse_move, 132, 259, 2, 330, 1079] -[:mouse_move, 120, 269, 2, 331, 1080] -[:mouse_move, 110, 279, 2, 332, 1081] -[:mouse_move, 104, 287, 2, 333, 1082] -[:mouse_move, 93, 304, 2, 334, 1083] -[:mouse_move, 87, 313, 2, 335, 1084] -[:mouse_move, 80, 326, 2, 336, 1085] -[:mouse_move, 75, 335, 2, 337, 1086] -[:mouse_move, 69, 351, 2, 338, 1087] -[:mouse_move, 67, 359, 2, 339, 1088] -[:mouse_move, 64, 376, 2, 340, 1089] -[:mouse_move, 64, 383, 2, 341, 1090] -[:mouse_move, 62, 399, 2, 342, 1091] -[:mouse_move, 62, 406, 2, 343, 1092] -[:mouse_move, 62, 418, 2, 344, 1093] -[:mouse_move, 62, 423, 2, 345, 1094] -[:mouse_move, 66, 433, 2, 346, 1095] -[:mouse_move, 69, 437, 2, 347, 1096] -[:mouse_move, 78, 444, 2, 348, 1097] -[:mouse_move, 86, 450, 2, 349, 1098] -[:mouse_move, 102, 457, 2, 350, 1099] -[:mouse_move, 112, 458, 2, 351, 1100] -[:mouse_move, 136, 461, 2, 352, 1101] -[:mouse_move, 142, 461, 2, 353, 1102] -[:mouse_move, 162, 460, 2, 354, 1103] -[:mouse_move, 172, 459, 2, 355, 1104] -[:mouse_move, 188, 454, 2, 356, 1105] -[:mouse_move, 195, 451, 2, 357, 1106] -[:mouse_move, 211, 443, 2, 358, 1107] -[:mouse_move, 214, 440, 2, 359, 1108] -[:mouse_move, 222, 432, 2, 360, 1109] -[:mouse_move, 233, 412, 2, 361, 1110] -[:mouse_move, 238, 400, 2, 362, 1111] -[:mouse_move, 248, 375, 2, 363, 1112] -[:mouse_move, 250, 370, 2, 364, 1113] -[:mouse_move, 258, 351, 2, 365, 1114] -[:mouse_move, 261, 343, 2, 366, 1115] -[:mouse_move, 264, 328, 2, 367, 1116] -[:mouse_move, 264, 321, 2, 368, 1117] -[:mouse_move, 265, 307, 2, 369, 1118] -[:mouse_move, 265, 305, 2, 370, 1119] -[:mouse_move, 264, 296, 2, 371, 1120] -[:mouse_move, 262, 289, 2, 372, 1121] -[:mouse_move, 257, 282, 2, 373, 1122] -[:mouse_move, 252, 277, 2, 374, 1123] -[:mouse_move, 237, 271, 2, 375, 1124] -[:mouse_move, 227, 269, 2, 376, 1125] -[:mouse_move, 211, 268, 2, 377, 1126] -[:mouse_move, 201, 268, 2, 378, 1127] -[:mouse_move, 177, 268, 2, 379, 1128] -[:mouse_move, 168, 269, 2, 380, 1129] -[:mouse_move, 149, 274, 2, 381, 1130] -[:mouse_move, 137, 279, 2, 382, 1131] -[:mouse_move, 124, 288, 2, 383, 1132] -[:mouse_move, 116, 294, 2, 384, 1133] -[:mouse_move, 102, 307, 2, 385, 1134] -[:mouse_move, 91, 319, 2, 386, 1135] -[:mouse_move, 88, 323, 2, 387, 1136] -[:mouse_move, 73, 344, 2, 388, 1137] -[:mouse_move, 68, 353, 2, 389, 1138] -[:mouse_move, 57, 374, 2, 390, 1139] -[:mouse_move, 52, 386, 2, 391, 1140] -[:mouse_move, 44, 412, 2, 392, 1141] -[:mouse_move, 42, 418, 2, 393, 1142] -[:mouse_move, 36, 437, 2, 394, 1143] -[:mouse_move, 34, 445, 2, 395, 1144] -[:mouse_move, 33, 453, 2, 396, 1145] -[:mouse_move, 32, 457, 2, 397, 1146] -[:mouse_move, 32, 466, 2, 398, 1147] -[:mouse_move, 33, 468, 2, 399, 1148] -[:mouse_move, 38, 475, 2, 400, 1149] -[:mouse_move, 44, 482, 2, 401, 1150] -[:mouse_move, 56, 492, 2, 402, 1151] -[:mouse_move, 64, 496, 2, 403, 1152] -[:mouse_move, 81, 503, 2, 404, 1153] -[:mouse_move, 92, 503, 2, 405, 1154] -[:mouse_move, 106, 503, 2, 406, 1155] -[:mouse_move, 115, 501, 2, 407, 1156] -[:mouse_move, 134, 492, 2, 408, 1157] -[:mouse_move, 147, 485, 2, 409, 1158] -[:mouse_move, 163, 471, 2, 410, 1159] -[:mouse_move, 171, 463, 2, 411, 1160] -[:mouse_move, 183, 451, 2, 412, 1161] -[:mouse_move, 202, 425, 2, 413, 1163] -[:mouse_move, 215, 401, 2, 414, 1164] -[:mouse_move, 217, 395, 2, 415, 1165] -[:mouse_move, 226, 373, 2, 416, 1166] -[:mouse_move, 234, 357, 2, 417, 1167] -[:mouse_move, 238, 343, 2, 418, 1168] -[:mouse_move, 240, 334, 2, 419, 1169] -[:mouse_move, 247, 310, 2, 420, 1170] -[:mouse_move, 249, 299, 2, 421, 1171] -[:mouse_move, 250, 290, 2, 422, 1172] -[:mouse_move, 251, 283, 2, 423, 1173] -[:mouse_move, 251, 269, 2, 424, 1174] -[:mouse_move, 248, 263, 2, 425, 1175] -[:mouse_move, 237, 256, 2, 426, 1176] -[:mouse_move, 229, 254, 2, 427, 1177] -[:mouse_move, 210, 250, 2, 428, 1178] -[:mouse_move, 199, 249, 2, 429, 1179] -[:mouse_move, 184, 248, 2, 430, 1180] -[:mouse_move, 173, 248, 2, 431, 1181] -[:mouse_move, 153, 248, 2, 432, 1182] -[:mouse_move, 145, 249, 2, 433, 1183] -[:mouse_move, 138, 251, 2, 434, 1184] -[:mouse_move, 125, 257, 2, 435, 1185] -[:mouse_move, 121, 260, 2, 436, 1186] -[:mouse_move, 112, 267, 2, 437, 1187] -[:mouse_move, 101, 280, 2, 438, 1188] -[:mouse_move, 97, 287, 2, 439, 1189] -[:mouse_move, 86, 306, 2, 440, 1190] -[:mouse_move, 81, 316, 2, 441, 1191] -[:mouse_move, 79, 322, 2, 442, 1192] -[:mouse_move, 70, 345, 2, 443, 1193] -[:mouse_move, 63, 365, 2, 444, 1194] -[:mouse_move, 59, 389, 2, 445, 1195] -[:mouse_move, 59, 401, 2, 446, 1196] -[:mouse_move, 59, 416, 2, 447, 1197] -[:mouse_move, 59, 425, 2, 448, 1198] -[:mouse_move, 60, 439, 2, 449, 1199] -[:mouse_move, 60, 442, 2, 450, 1200] -[:mouse_move, 64, 454, 2, 451, 1201] -[:mouse_move, 66, 457, 2, 452, 1202] -[:mouse_move, 70, 462, 2, 453, 1203] -[:mouse_move, 74, 464, 2, 454, 1204] -[:mouse_move, 81, 467, 2, 455, 1205] -[:mouse_move, 85, 468, 2, 456, 1206] -[:mouse_move, 97, 469, 2, 457, 1207] -[:mouse_move, 107, 469, 2, 458, 1208] -[:mouse_move, 124, 471, 2, 459, 1209] -[:mouse_move, 134, 471, 2, 460, 1210] -[:mouse_move, 148, 471, 2, 461, 1211] -[:mouse_move, 161, 468, 2, 462, 1212] -[:mouse_move, 178, 457, 2, 463, 1213] -[:mouse_move, 186, 451, 2, 464, 1214] -[:mouse_move, 202, 434, 2, 465, 1215] -[:mouse_move, 210, 424, 2, 466, 1216] -[:mouse_move, 227, 400, 2, 467, 1217] -[:mouse_move, 234, 388, 2, 468, 1218] -[:mouse_move, 237, 383, 2, 469, 1219] -[:mouse_move, 250, 360, 2, 470, 1220] -[:mouse_move, 254, 351, 2, 471, 1221] -[:mouse_move, 261, 334, 2, 472, 1222] -[:mouse_move, 262, 326, 2, 473, 1223] -[:mouse_move, 264, 312, 2, 474, 1224] -[:mouse_move, 265, 305, 2, 475, 1225] -[:mouse_move, 265, 293, 2, 476, 1226] -[:mouse_move, 265, 287, 2, 477, 1227] -[:mouse_move, 259, 272, 2, 478, 1228] -[:mouse_move, 255, 267, 2, 479, 1229] -[:mouse_move, 246, 260, 2, 480, 1230] -[:mouse_move, 239, 257, 2, 481, 1231] -[:mouse_move, 226, 253, 2, 482, 1232] -[:mouse_move, 213, 251, 2, 483, 1233] -[:mouse_move, 194, 251, 2, 484, 1234] -[:mouse_move, 184, 252, 2, 485, 1235] -[:mouse_move, 163, 259, 2, 486, 1236] -[:mouse_move, 153, 263, 2, 487, 1237] -[:mouse_move, 133, 274, 2, 488, 1238] -[:mouse_move, 128, 278, 2, 489, 1239] -[:mouse_move, 107, 297, 2, 490, 1240] -[:mouse_move, 100, 305, 2, 491, 1241] -[:mouse_move, 86, 324, 2, 492, 1242] -[:mouse_move, 79, 335, 2, 493, 1243] -[:mouse_move, 74, 348, 2, 494, 1244] -[:mouse_move, 66, 388, 2, 495, 1245] -[:mouse_move, 66, 399, 2, 496, 1246] -[:mouse_move, 68, 429, 2, 497, 1247] -[:mouse_move, 73, 441, 2, 498, 1248] -[:mouse_move, 83, 452, 2, 499, 1249] -[:mouse_move, 89, 457, 2, 500, 1250] -[:mouse_move, 97, 462, 2, 501, 1251] -[:key_down_raw, 1073741906, 0, 2, 502, 1292] -[:key_up_raw, 1073741906, 0, 2, 503, 1296] -[:key_down_raw, 1073741906, 0, 2, 504, 1309] -[:key_up_raw, 1073741906, 0, 2, 505, 1314] -[:key_down_raw, 1073741906, 0, 2, 506, 1319] -[:key_up_raw, 1073741906, 0, 2, 507, 1322] -[:key_down_raw, 1073741906, 0, 2, 508, 1327] -[:key_up_raw, 1073741906, 0, 2, 509, 1331] -[:key_down_raw, 1073741906, 0, 2, 510, 1336] -[:key_up_raw, 1073741906, 0, 2, 511, 1339] -[:key_down_raw, 1073741906, 0, 2, 512, 1345] -[:key_up_raw, 1073741906, 0, 2, 513, 1348] -[:key_down_raw, 1073741906, 0, 2, 514, 1354] -[:key_up_raw, 1073741906, 0, 2, 515, 1358] -[:key_down_raw, 1073741906, 0, 2, 516, 1362] -[:key_up_raw, 1073741906, 0, 2, 517, 1370] -[:key_down_raw, 1073741903, 0, 2, 518, 1386] -[:key_up_raw, 1073741903, 0, 2, 519, 1392] -[:key_down_raw, 1073741903, 0, 2, 520, 1397] -[:key_up_raw, 1073741903, 0, 2, 521, 1401] -[:key_down_raw, 1073741903, 0, 2, 522, 1407] -[:key_up_raw, 1073741903, 0, 2, 523, 1412] -[:key_down_raw, 1073741903, 0, 2, 524, 1415] -[:key_up_raw, 1073741903, 0, 2, 525, 1421] -[:key_down_raw, 1073741903, 0, 2, 526, 1428] -[:key_up_raw, 1073741903, 0, 2, 527, 1436] -[:key_down_raw, 1073741905, 0, 2, 528, 1446] -[:key_up_raw, 1073741905, 0, 2, 529, 1458] -[:key_down_raw, 1073741905, 0, 2, 530, 1466] -[:key_up_raw, 1073741905, 0, 2, 531, 1472] -[:key_down_raw, 1073741903, 0, 2, 532, 1479] -[:key_up_raw, 1073741903, 0, 2, 533, 1489] -[:key_down_raw, 1073741905, 0, 2, 534, 1513] -[:key_up_raw, 1073741905, 0, 2, 535, 1517] -[:key_down_raw, 1073741905, 0, 2, 536, 1522] -[:key_up_raw, 1073741905, 0, 2, 537, 1526] -[:key_down_raw, 1073741905, 0, 2, 538, 1531] -[:key_up_raw, 1073741905, 0, 2, 539, 1535] -[:key_down_raw, 1073741905, 0, 2, 540, 1540] -[:key_up_raw, 1073741905, 0, 2, 541, 1544] -[:key_down_raw, 1073741905, 0, 2, 542, 1549] -[:key_up_raw, 1073741905, 0, 2, 543, 1554] -[:key_down_raw, 1073741905, 0, 2, 544, 1558] -[:key_up_raw, 1073741905, 0, 2, 545, 1564] -[:key_down_raw, 1073742051, 1024, 2, 546, 1663] -[:key_down_raw, 114, 1024, 2, 547, 1664] -[:key_up_raw, 114, 1024, 2, 548, 1669] -[:key_up_raw, 1073742051, 0, 2, 549, 1677] -[:key_down_raw, 1073742051, 1024, 2, 550, 1729] -[:key_down_raw, 113, 1024, 2, 551, 1730] diff --git a/samples/99_genre_rpg_tactical/gameboard_movement/app/main.rb b/samples/99_genre_rpg_tactical/gameboard_movement/app/main.rb deleted file mode 100644 index 8eb935e..0000000 --- a/samples/99_genre_rpg_tactical/gameboard_movement/app/main.rb +++ /dev/null @@ -1,529 +0,0 @@ -# Size of board is always 1280x720 - -def tick args - size = 64 - - # Draw a checkerboard as a placeholder game board - i = 0 - j = 0 - while i < 12 do - while j < 21 do - args.outputs.solids << [(j*size), (i*size), size, size, 255, 100, 0, ((i+j) % 2 == 0) ? 255 : 0] - j += 1 - end - j = 0 - i += 1 - end - k = 0 - ary = Array.new(220) - while k < 220 - ary[k] = 1 - if k > 20 and k < 36 - ary[k] = 0 - end - if k > 40 and k < 56 - ary[k] = 0 - end - if k > 60 and k < 76 - ary[k] = 0 - end - if k > 80 and k < 96 - ary[k] = 0 - end - if k > 100 and k < 116 - ary[k] = 0 - end - if k > 120 and k < 136 - ary[k] = 0 - end - if k == 161 and args.state.bot3.hp >= 1 - ary[k] = 0 - end - if k == 147 and args.state.bot1.hp >= 1 - ary[k] = 0 - end - if k == 215 and args.state.bot2.hp >= 1 - ary[k] = 0 - end - k += 1 - end - ary2 = ary; - htarget = 161 - target = 160 - targetb = 181 - targetc = 141 - targetd = 162 - target2 = 146 - target2b = 167 - target2c = 148 - htarget2 = 147 - target3 = 214 - target3c = 216 - target3b = 195 - htarget3 = 215 - # player attributes - args.state.player.x ||= 0 - args.state.player.y ||= 0 - args.state.player.w ||= 64 - args.state.player.h ||= 64 - args.state.player.direction ||= 1 - args.state.player.hp ||= 100 - args.state.player.strength ||= 100 - args.state.player.pos ||= 0 - - # bot1 attributes - args.state.bot1.x ||= 448 - args.state.bot1.y ||= 448 - args.state.bot1.w ||= 64 - args.state.bot1.h ||= 64 - args.state.bot1.direction ||= 1 - args.state.bot1.hp ||= 100 - args.state.bot1.strength ||= 5 - - # bot2 attributes - args.state.bot2.x ||= 960 - args.state.bot2.y ||= 640 - args.state.bot2.w ||= 64 - args.state.bot2.h ||= 64 - args.state.bot2.direction ||= 1 - args.state.bot2.hp ||= 100 - args.state.bot2.strength ||= 8 - - # bot3 attributes - args.state.bot3.x ||= 64 - args.state.bot3.y ||= 512 - args.state.bot3.w ||= 64 - args.state.bot3.h ||= 64 - args.state.bot3.direction ||= 1 - args.state.bot3.hp ||= 100 - args.state.bot3.strength ||= 8 - - # obstacle attributes - args.state.obs1.x ||= 64 - args.state.obs1.y ||= 64 - args.state.obs1.w ||= 960 - args.state.obs1.h ||= 384 - args.state.obs1.direction ||= 1 - - - @menu_shown ||= :hidden - - # display menu - if @menu_shown == :hidden - args.state.menu_button ||= new_button :menu, 1081, 650, "Menu" - args.outputs.primitives << args.state.menu_button[:primitives] - - if button_clicked? args, args.state.menu_button - @menu_shown = :visible - end - - else - args.state.menu_overlay = [1080, 0, 200, 720, 100, 0, 0, 250] - - # first overlay - if args.state.menu_overlay - args.outputs.solids << args.state.menu_overlay - - # move button - args.state.move_button ||= new_button :move, 1081, 650, "Move" - args.outputs.primitives << args.state.move_button[:primitives] - - if button_clicked? args, args.state.move_button - args.gtk.notify! "Move button was clicked!" - end - - # attack button - args.state.attack_button ||= new_button :attack, 1081, 600, "Attack" - args.outputs.primitives << args.state.attack_button[:primitives] - - if button_clicked? args, args.state.attack_button - - if args.state.player.pos+1 == htarget or args.state.player.pos-1 == htarget or args.state.player.pos+20 == htarget or args.state.player.pos-20 == htarget - damage = rand(100) - dealt = "#{damage} Damage Dealt!" - args.gtk.notify! dealt - args.state.bot3.hp -= damage - - end - if args.state.player.pos+1 == htarget2 or args.state.player.pos-1 == htarget2 or args.state.player.pos+20 == htarget2 or args.state.player.pos-20 == htarget2 - damage = rand(100) - dealt = "#{damage} Damage Dealt!" - args.gtk.notify! dealt - - args.state.bot1.hp -= damage - - end - if args.state.player.pos+1 == htarget3 or args.state.player.pos-1 == htarget3 or args.state.player.pos+20 == htarget3 or args.state.player.pos-20 == htarget3 - damage = rand(100) - dealt = "#{damage} Damage Dealt!" - args.gtk.notify! dealt - args.state.bot2.hp -= damage - - end - end - - # items button - args.state.items_button ||= new_button :items, 1081, 550, "Items" - args.outputs.primitives << args.state.items_button[:primitives] - - if button_clicked? args, args.state.items_button - args.state.itemMenu_overlay = [880, 0, 200, 720, 150, 0, 0, 250] - args.gtk.notify! "Items button was clicked!" - end - - # second overlay - if args.state.itemMenu_overlay - args.outputs.solids << args.state.itemMenu_overlay - args.outputs.labels << [960, 700, "Items"] - - # create items - args.state.potion_button ||= new_button :potion, 881, 600, "Potion" - args.outputs.primitives << args.state.potion_button[:primitives] - - if button_clicked? args, args.state.potion_button - args.gtk.notify! "Potion Used!" - end - - args.state.elixer_button ||= new_button :potion, 881, 550, "Elixer" - args.outputs.primitives << args.state.elixer_button[:primitives] - - if button_clicked? args, args.state.elixer_button - args.gtk.notify! "Elixer Used!" - end - - end - - # wait button - args.state.wait_button ||= new_button :wait, 1081, 500, "Wait" - args.outputs.primitives << args.state.wait_button[:primitives] - - if button_clicked? args, args.state.wait_button - args.gtk.notify! "Wait button was clicked!" - end - - # close button - args.state.close_button ||= new_button :close, 1081, 450, "Close" - args.outputs.primitives << args.state.close_button[:primitives] - - # hide menu - if button_clicked? args, args.state.close_button - @menu_shown = :hidden - end - - end - end - - # left and right movement - if args.inputs.keyboard.key_down.right and ary[args.state.player.pos+1] == 1 and args.state.player.pos%20 < 19 - args.state.player.direction = 1 - args.state.player.started_running_at = args.state.tick_count - args.state.player.x += size - args.state.player.pos += 1 - elsif args.inputs.keyboard.key_down.left and ary[args.state.player.pos-1] == 1 and args.state.player.pos%20 > 0 - args.state.player.direction = -1 - args.state.player.started_running_at = args.state.tick_count - args.state.player.x -= size - args.state.player.pos -= 1 - end - - - - - # up and down movement - if args.inputs.keyboard.key_down.up and ary[args.state.player.pos+20] == 1 and args.state.player.pos < 200 - args.state.player.direction = 1 - args.state.player.started_running_at = args.state.tick_count - args.state.player.y += size - args.state.player.pos += 20 - elsif args.inputs.keyboard.key_down.down and ary[args.state.player.pos-20] == 1 and args.state.player.pos >= 20 - args.state.player.direction = -1 - args.state.player.started_running_at = args.state.tick_count - args.state.player.y -= size - args.state.player.pos -= 20 - end - - pigga = args.state.player.intersect_rect? args.state.obs1 - if pigga - args.gtk.notify! "sprites collide!" - args.state.player.y -= size - end - looping = true - cangoup = false - cangoright = false - cangodown = false - cangoleft = false - ftarget = 10000 - hold = 9 - testtarget = args.state.player.pos - if args.state.bot3.hp > 0 - ftarget = (target-testtarget).abs - hold = target - end - if(ftarget > (targetb-testtarget).abs and args.state.bot3.hp > 0) - ftarget = (targetb-testtarget).abs - hold = targetb - end - if(ftarget > (targetc-testtarget).abs and args.state.bot3.hp > 0) - ftarget = (targetc-testtarget).abs - hold = targetc - end - if(ftarget > (targetd-testtarget).abs and args.state.bot3.hp > 0) - ftarget = (targetd-testtarget).abs - hold = targetd - end - if(ftarget > (target2-testtarget).abs and args.state.bot1.hp > 0) - ftarget = (target2-testtarget).abs - hold = target2 - end - if(ftarget > (target2b-testtarget).abs and args.state.bot1.hp > 0) - ftarget = (target2b-testtarget).abs - hold = target2b - end - if(ftarget > (target2c-testtarget).abs and args.state.bot1.hp > 0) - ftarget = (target2c-testtarget).abs - hold = target2c - end - if(ftarget > (target3-testtarget).abs and args.state.bot2.hp > 0) - ftarget = (target3-testtarget).abs - hold = target3 - end - if(ftarget > (target3b-testtarget).abs and args.state.bot2.hp > 0) - ftarget = (target3b-testtarget).abs - hold = target3b - end - if(ftarget > (target3c-testtarget).abs and args.state.bot2.hp > 0) - ftarget = (target3c-testtarget).abs - hold = target3c - end - if ftarget == 10000 - looping = false - end - if args.inputs.keyboard.key_down.f - while looping and target != testtarget and targetb != testtarget and targetc != testtarget and targetd != testtarget and target2 != testtarget and target2b != testtarget and target2c != testtarget and target3 != testtarget and target3b != testtarget and target3c != testtarget - cangoup = false - cangoright = false - cangodown = false - cangoleft = false - - if hold-testtarget >= 20 and ary2[args.state.player.pos+20] == 1 and args.state.player.pos < 200 - cangoup = true - elsif testtarget-hold >= 20 and ary2[args.state.player.pos-20] == 1 and args.state.player.pos > 20 - cangodown = true - cangoup = false - elsif hold%20-testtarget%20 > 0 and ary2[args.state.player.pos+1] == 1 and args.state.player.pos%20 < 19 - cangodown = false - cangoup = false - cangoright = true - elsif testtarget%20-hold%20 > 0 and ary2[args.state.player.pos-1] == 1 and args.state.player.pos%20 > 0 - cangodown = false - cangoup = false - cangoright = false - cangoleft = true - end - if cangodown == false and cangoup == false and cangoleft == false and cangoright == false - if ary2[args.state.player.pos+20] == 1 and args.state.player.pos < 200 - cangoup = true - elsif ary2[args.state.player.pos-20] == 1 and args.state.player.pos > 20 - cangodown = true - cangoup = false - elsif ary2[args.state.player.pos+1] == 1 and args.state.player.pos%20 < 19 - cangodown = false - cangoup = false - cangoright = true - elsif ary2[args.state.player.pos-1] == 1 and args.state.player.pos%20 > 0 - cangodown = false - cangoup = false - cangoright = false - cangoleft = true - end - end - if cangodown == true - args.state.player.direction = -1 - args.state.player.started_running_at = args.state.tick_count - args.state.player.y -= size - ary2[args.state.player.pos] = 0 - args.state.player.pos -= 20 - testtarget -= 20 - - elsif cangoup == true - args.state.player.direction = 1 - args.state.player.started_running_at = args.state.tick_count - args.state.player.y += size - ary2[args.state.player.pos] = 0 - args.state.player.pos += 20 - testtarget+=20 - - elsif cangoright == true - args.state.player.direction = 1 - args.state.player.started_running_at = args.state.tick_count - args.state.player.x += size - ary2[args.state.player.pos] = 0 - args.state.player.pos += 1 - testtarget += 1 - - elsif cangoleft == true - args.state.player.direction = -1 - args.state.player.started_running_at = args.state.tick_count - args.state.player.x -= size - ary2[args.state.player.pos] = 0 - args.state.player.pos -= 1 - testtarget -= 1 - end - - end - end - - - #Wrap player around the stage - if args.state.player.x > 1280 - args.state.player.x = -64 - args.state.player.started_running_at ||= args.state.tick_count - elsif args.state.player.x < -64 - args.state.player.x = 1280 - args.state.player.started_running_at ||= args.state.tick_count - end - - if args.state.player.y > 720 - args.state.player.y = -64 - args.state.player.started_running_at ||= args.state.tick_count - elsif args.state.player.y < -64 - args.state.player.y = 720 - args.state.player.started_running_at ||= args.state.tick_count - end - - # Display obstacles - args.outputs.sprites << display_obs1(args) - - #Display the flying dragon and bots - args.outputs.sprites << display_dragon(args) - if args.state.bot1.hp >= 1 - args.outputs.sprites << display_bot1(args) - end - if args.state.bot2.hp >= 1 - args.outputs.sprites << display_bot2(args) - end - if args.state.bot3.hp >= 1 - args.outputs.sprites << display_bot3(args) - end - if args.state.bot1.hp <= 0 and args.state.bot3.hp <= 0 and args.state.bot2.hp <= 0 - args.gtk.notify! "You Win!" - end -end - -# helper method to create a button -def new_button id, x, y, text - # create a hash ("entity") that has some metadata - # about what it represents - entity = - { - id: id, - rect: { x: x, y: y, w: 200, h: 50 } - } - - # for that entity, define the primitives - # that form it - entity[:primitives] = - [ - { x: x, y: y, w: 200, h: 50 }.border, - { x: x + 75, y: y + 30, text: text }.label - ] - - entity -end - -# helper method for determining if a button was clicked -def button_clicked? args, button - return false unless args.inputs.mouse.click - return args.inputs.mouse.point.inside_rect? button[:rect] -end - -def display_dragon args - start_looping_at = 0 - number_of_sprites = 2 - number_of_frames_to_show_each_sprite = 8 - does_sprite_loop = true - sprite_index = start_looping_at.frame_index number_of_sprites, - number_of_frames_to_show_each_sprite, - does_sprite_loop - { - pos: args.state.player.pos, - x: args.state.player.x, - y: args.state.player.y, - w: args.state.player.w, - h: args.state.player.h, - path: "sprites/roy-#{sprite_index}.png", - flip_horizontally: args.state.player.direction < 0 - } -end - -def display_bot1 args - start_looping_at = 0 - number_of_sprites = 6 - number_of_frames_to_show_each_sprite = 4 - does_sprite_loop = true - sprite_index = start_looping_at.frame_index number_of_sprites, - number_of_frames_to_show_each_sprite, - does_sprite_loop - { - x: args.state.bot1.x, - y: args.state.bot1.y, - w: args.state.bot1.w, - h: args.state.bot1.h, - path: "sprites/dragon-#{sprite_index}.png", - flip_horizontally: args.state.bot1.direction < 0 - } -end - -def display_bot2 args - start_looping_at = 0 - number_of_sprites = 6 - number_of_frames_to_show_each_sprite = 4 - does_sprite_loop = true - sprite_index = start_looping_at.frame_index number_of_sprites, - number_of_frames_to_show_each_sprite, - does_sprite_loop - { - x: args.state.bot2.x, - y: args.state.bot2.y, - w: args.state.bot2.w, - h: args.state.bot2.h, - path: "sprites/dragon-#{sprite_index}.png", - flip_horizontally: args.state.bot2.direction < 0 - } -end - -def display_bot3 args - start_looping_at = 0 - number_of_sprites = 6 - number_of_frames_to_show_each_sprite = 4 - does_sprite_loop = true - sprite_index = start_looping_at.frame_index number_of_sprites, - number_of_frames_to_show_each_sprite, - does_sprite_loop - { - x: args.state.bot3.x, - y: args.state.bot3.y, - w: args.state.bot3.w, - h: args.state.bot3.h, - path: "sprites/dragon-#{sprite_index}.png", - flip_horizontally: args.state.bot3.direction < 0 - } -end - -def display_obs1 args - start_looping_at = 0 - number_of_sprites = 1 - number_of_frames_to_show_each_sprite = 8 - does_sprite_loop = true - sprite_index = start_looping_at.frame_index number_of_sprites, - number_of_frames_to_show_each_sprite, - does_sprite_loop - { - x: args.state.obs1.x, - y: args.state.obs1.y, - w: args.state.obs1.w, - h: args.state.obs1.h, - path: "sprites/water-1.png", - flip_horizontally: args.state.obs1.direction < 0 - } -end diff --git a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/border-black.png b/samples/99_genre_rpg_tactical/gameboard_movement/sprites/border-black.png deleted file mode 100644 index c9d0bad..0000000 Binary files a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/border-black.png and /dev/null differ diff --git a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/circle-black.png b/samples/99_genre_rpg_tactical/gameboard_movement/sprites/circle-black.png deleted file mode 100644 index c98e23d..0000000 Binary files a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/circle-black.png and /dev/null differ diff --git a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/circle-blue.png b/samples/99_genre_rpg_tactical/gameboard_movement/sprites/circle-blue.png deleted file mode 100644 index 1726d2a..0000000 Binary files a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/circle-blue.png and /dev/null differ diff --git a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/circle-gray.png b/samples/99_genre_rpg_tactical/gameboard_movement/sprites/circle-gray.png deleted file mode 100644 index 960f191..0000000 Binary files a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/circle-gray.png and /dev/null differ diff --git a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/circle-green.png b/samples/99_genre_rpg_tactical/gameboard_movement/sprites/circle-green.png deleted file mode 100644 index 43cf7ee..0000000 Binary files a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/circle-green.png and /dev/null differ diff --git a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/circle-indigo.png b/samples/99_genre_rpg_tactical/gameboard_movement/sprites/circle-indigo.png deleted file mode 100644 index 598e240..0000000 Binary files a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/circle-indigo.png and /dev/null differ diff --git a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/circle-orange.png b/samples/99_genre_rpg_tactical/gameboard_movement/sprites/circle-orange.png deleted file mode 100644 index 5604a42..0000000 Binary files a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/circle-orange.png and /dev/null differ diff --git a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/circle-red.png b/samples/99_genre_rpg_tactical/gameboard_movement/sprites/circle-red.png deleted file mode 100644 index 7f17ca6..0000000 Binary files a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/circle-red.png and /dev/null differ diff --git a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/circle-violet.png b/samples/99_genre_rpg_tactical/gameboard_movement/sprites/circle-violet.png deleted file mode 100644 index 681d210..0000000 Binary files a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/circle-violet.png and /dev/null differ diff --git a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/circle-white.png b/samples/99_genre_rpg_tactical/gameboard_movement/sprites/circle-white.png deleted file mode 100644 index bd32155..0000000 Binary files a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/circle-white.png and /dev/null differ diff --git a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/circle-yellow.png b/samples/99_genre_rpg_tactical/gameboard_movement/sprites/circle-yellow.png deleted file mode 100644 index 94992eb..0000000 Binary files a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/circle-yellow.png and /dev/null differ diff --git a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/dragon-0.png b/samples/99_genre_rpg_tactical/gameboard_movement/sprites/dragon-0.png deleted file mode 100644 index fb179af..0000000 Binary files a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/dragon-0.png and /dev/null differ diff --git a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/dragon-1.png b/samples/99_genre_rpg_tactical/gameboard_movement/sprites/dragon-1.png deleted file mode 100644 index 8cfe531..0000000 Binary files a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/dragon-1.png and /dev/null differ diff --git a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/dragon-2.png b/samples/99_genre_rpg_tactical/gameboard_movement/sprites/dragon-2.png deleted file mode 100644 index cb462e1..0000000 Binary files a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/dragon-2.png and /dev/null differ diff --git a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/dragon-3.png b/samples/99_genre_rpg_tactical/gameboard_movement/sprites/dragon-3.png deleted file mode 100644 index 04c4977..0000000 Binary files a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/dragon-3.png and /dev/null differ diff --git a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/dragon-4.png b/samples/99_genre_rpg_tactical/gameboard_movement/sprites/dragon-4.png deleted file mode 100644 index b29fa3d..0000000 Binary files a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/dragon-4.png and /dev/null differ diff --git a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/dragon-5.png b/samples/99_genre_rpg_tactical/gameboard_movement/sprites/dragon-5.png deleted file mode 100644 index 99f4e74..0000000 Binary files a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/dragon-5.png and /dev/null differ diff --git a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/explosion-0.png b/samples/99_genre_rpg_tactical/gameboard_movement/sprites/explosion-0.png deleted file mode 100644 index f48636f..0000000 Binary files a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/explosion-0.png and /dev/null differ diff --git a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/explosion-1.png b/samples/99_genre_rpg_tactical/gameboard_movement/sprites/explosion-1.png deleted file mode 100644 index b4018d9..0000000 Binary files a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/explosion-1.png and /dev/null differ diff --git a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/explosion-2.png b/samples/99_genre_rpg_tactical/gameboard_movement/sprites/explosion-2.png deleted file mode 100644 index 3abaedd..0000000 Binary files a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/explosion-2.png and /dev/null differ diff --git a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/explosion-3.png b/samples/99_genre_rpg_tactical/gameboard_movement/sprites/explosion-3.png deleted file mode 100644 index fe94a5a..0000000 Binary files a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/explosion-3.png and /dev/null differ diff --git a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/explosion-4.png b/samples/99_genre_rpg_tactical/gameboard_movement/sprites/explosion-4.png deleted file mode 100644 index ed04237..0000000 Binary files a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/explosion-4.png and /dev/null differ diff --git a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/explosion-5.png b/samples/99_genre_rpg_tactical/gameboard_movement/sprites/explosion-5.png deleted file mode 100644 index 2cd8f06..0000000 Binary files a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/explosion-5.png and /dev/null differ diff --git a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/explosion-6.png b/samples/99_genre_rpg_tactical/gameboard_movement/sprites/explosion-6.png deleted file mode 100644 index e55909c..0000000 Binary files a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/explosion-6.png and /dev/null differ diff --git a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/explosion-sheet.png b/samples/99_genre_rpg_tactical/gameboard_movement/sprites/explosion-sheet.png deleted file mode 100644 index 8559a5c..0000000 Binary files a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/explosion-sheet.png and /dev/null differ diff --git a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/hexagon-black.png b/samples/99_genre_rpg_tactical/gameboard_movement/sprites/hexagon-black.png deleted file mode 100644 index f50c872..0000000 Binary files a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/hexagon-black.png and /dev/null differ diff --git a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/hexagon-blue.png b/samples/99_genre_rpg_tactical/gameboard_movement/sprites/hexagon-blue.png deleted file mode 100644 index 1696bae..0000000 Binary files a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/hexagon-blue.png and /dev/null differ diff --git a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/hexagon-gray.png b/samples/99_genre_rpg_tactical/gameboard_movement/sprites/hexagon-gray.png deleted file mode 100644 index e8c4c5a..0000000 Binary files a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/hexagon-gray.png and /dev/null differ diff --git a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/hexagon-green.png b/samples/99_genre_rpg_tactical/gameboard_movement/sprites/hexagon-green.png deleted file mode 100644 index a700602..0000000 Binary files a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/hexagon-green.png and /dev/null differ diff --git a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/hexagon-indigo.png b/samples/99_genre_rpg_tactical/gameboard_movement/sprites/hexagon-indigo.png deleted file mode 100644 index 15f6f4f..0000000 Binary files a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/hexagon-indigo.png and /dev/null differ diff --git a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/hexagon-orange.png b/samples/99_genre_rpg_tactical/gameboard_movement/sprites/hexagon-orange.png deleted file mode 100644 index 1587173..0000000 Binary files a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/hexagon-orange.png and /dev/null differ diff --git a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/hexagon-red.png b/samples/99_genre_rpg_tactical/gameboard_movement/sprites/hexagon-red.png deleted file mode 100644 index d442f39..0000000 Binary files a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/hexagon-red.png and /dev/null differ diff --git a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/hexagon-violet.png b/samples/99_genre_rpg_tactical/gameboard_movement/sprites/hexagon-violet.png deleted file mode 100644 index 3be5731..0000000 Binary files a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/hexagon-violet.png and /dev/null differ diff --git a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/hexagon-white.png b/samples/99_genre_rpg_tactical/gameboard_movement/sprites/hexagon-white.png deleted file mode 100644 index c1ad970..0000000 Binary files a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/hexagon-white.png and /dev/null differ diff --git a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/hexagon-yellow.png b/samples/99_genre_rpg_tactical/gameboard_movement/sprites/hexagon-yellow.png deleted file mode 100644 index 63f5f34..0000000 Binary files a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/hexagon-yellow.png and /dev/null differ diff --git a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/isometric-black.png b/samples/99_genre_rpg_tactical/gameboard_movement/sprites/isometric-black.png deleted file mode 100644 index fa9e463..0000000 Binary files a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/isometric-black.png and /dev/null differ diff --git a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/isometric-blue.png b/samples/99_genre_rpg_tactical/gameboard_movement/sprites/isometric-blue.png deleted file mode 100644 index a3d8524..0000000 Binary files a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/isometric-blue.png and /dev/null differ diff --git a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/isometric-gray.png b/samples/99_genre_rpg_tactical/gameboard_movement/sprites/isometric-gray.png deleted file mode 100644 index 85dcc1d..0000000 Binary files a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/isometric-gray.png and /dev/null differ diff --git a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/isometric-green.png b/samples/99_genre_rpg_tactical/gameboard_movement/sprites/isometric-green.png deleted file mode 100644 index ec2773e..0000000 Binary files a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/isometric-green.png and /dev/null differ diff --git a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/isometric-indigo.png b/samples/99_genre_rpg_tactical/gameboard_movement/sprites/isometric-indigo.png deleted file mode 100644 index e6be50c..0000000 Binary files a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/isometric-indigo.png and /dev/null differ diff --git a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/isometric-orange.png b/samples/99_genre_rpg_tactical/gameboard_movement/sprites/isometric-orange.png deleted file mode 100644 index 154d81c..0000000 Binary files a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/isometric-orange.png and /dev/null differ diff --git a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/isometric-red.png b/samples/99_genre_rpg_tactical/gameboard_movement/sprites/isometric-red.png deleted file mode 100644 index 3448c4d..0000000 Binary files a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/isometric-red.png and /dev/null differ diff --git a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/isometric-violet.png b/samples/99_genre_rpg_tactical/gameboard_movement/sprites/isometric-violet.png deleted file mode 100644 index f09bf21..0000000 Binary files a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/isometric-violet.png and /dev/null differ diff --git a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/isometric-white.png b/samples/99_genre_rpg_tactical/gameboard_movement/sprites/isometric-white.png deleted file mode 100644 index a45793d..0000000 Binary files a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/isometric-white.png and /dev/null differ diff --git a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/isometric-yellow.png b/samples/99_genre_rpg_tactical/gameboard_movement/sprites/isometric-yellow.png deleted file mode 100644 index 9be20c7..0000000 Binary files a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/isometric-yellow.png and /dev/null differ diff --git a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/roy-0.png b/samples/99_genre_rpg_tactical/gameboard_movement/sprites/roy-0.png deleted file mode 100644 index dd122e1..0000000 Binary files a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/roy-0.png and /dev/null differ diff --git a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/roy-1.png b/samples/99_genre_rpg_tactical/gameboard_movement/sprites/roy-1.png deleted file mode 100644 index d3ac548..0000000 Binary files a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/roy-1.png and /dev/null differ diff --git a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/square-black.png b/samples/99_genre_rpg_tactical/gameboard_movement/sprites/square-black.png deleted file mode 100644 index cea7bd7..0000000 Binary files a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/square-black.png and /dev/null differ diff --git a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/square-blue.png b/samples/99_genre_rpg_tactical/gameboard_movement/sprites/square-blue.png deleted file mode 100644 index b840849..0000000 Binary files a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/square-blue.png and /dev/null differ diff --git a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/square-gray.png b/samples/99_genre_rpg_tactical/gameboard_movement/sprites/square-gray.png deleted file mode 100644 index 2142b30..0000000 Binary files a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/square-gray.png and /dev/null differ diff --git a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/square-green.png b/samples/99_genre_rpg_tactical/gameboard_movement/sprites/square-green.png deleted file mode 100644 index 5ef7f75..0000000 Binary files a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/square-green.png and /dev/null differ diff --git a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/square-indigo.png b/samples/99_genre_rpg_tactical/gameboard_movement/sprites/square-indigo.png deleted file mode 100644 index 2384108..0000000 Binary files a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/square-indigo.png and /dev/null differ diff --git a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/square-orange.png b/samples/99_genre_rpg_tactical/gameboard_movement/sprites/square-orange.png deleted file mode 100644 index bb1eee7..0000000 Binary files a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/square-orange.png and /dev/null differ diff --git a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/square-red.png b/samples/99_genre_rpg_tactical/gameboard_movement/sprites/square-red.png deleted file mode 100644 index 3ed5f13..0000000 Binary files a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/square-red.png and /dev/null differ diff --git a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/square-violet.png b/samples/99_genre_rpg_tactical/gameboard_movement/sprites/square-violet.png deleted file mode 100644 index 333540c..0000000 Binary files a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/square-violet.png and /dev/null differ diff --git a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/square-white.png b/samples/99_genre_rpg_tactical/gameboard_movement/sprites/square-white.png deleted file mode 100644 index 378c565..0000000 Binary files a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/square-white.png and /dev/null differ diff --git a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/square-yellow.png b/samples/99_genre_rpg_tactical/gameboard_movement/sprites/square-yellow.png deleted file mode 100644 index 0edeeec..0000000 Binary files a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/square-yellow.png and /dev/null differ diff --git a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/star.png b/samples/99_genre_rpg_tactical/gameboard_movement/sprites/star.png deleted file mode 100644 index e0ee0f9..0000000 Binary files a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/star.png and /dev/null differ diff --git a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/water-1.png b/samples/99_genre_rpg_tactical/gameboard_movement/sprites/water-1.png deleted file mode 100644 index 527385a..0000000 Binary files a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/water-1.png and /dev/null differ diff --git a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/water-2.png b/samples/99_genre_rpg_tactical/gameboard_movement/sprites/water-2.png deleted file mode 100644 index 7f73b1b..0000000 Binary files a/samples/99_genre_rpg_tactical/gameboard_movement/sprites/water-2.png and /dev/null differ diff --git a/samples/99_genre_rpg_tactical/isometric_grid/app/main.rb b/samples/99_genre_rpg_tactical/isometric_grid/app/main.rb index 6c8368d..28bea32 100644 --- a/samples/99_genre_rpg_tactical/isometric_grid/app/main.rb +++ b/samples/99_genre_rpg_tactical/isometric_grid/app/main.rb @@ -10,10 +10,10 @@ class Isometric def defaults state.quantity ||= 6 #Size of grid - state.tileSize ||= [262 / 2, 194 / 2] #width and height of orange tiles + state.tileSize ||= [262 / 2, 194 / 2] #width and heigth of orange tiles state.tileGrid ||= [] #Holds ordering of tiles state.currentSpriteLocation ||= -1 #Current Sprite hovering location - state.tileCords ||= [] #Physical, rendering coordinates + state.tileCords ||= [] #Physical, rendering cordinates state.initCords ||= [640 - (state.quantity / 2 * state.tileSize[0]), 330] #Location of tile (0, 0) state.sideSize ||= [state.tileSize[0] / 2, 242 / 2] #Purple & green cube face size state.mode ||= :delete #Switches between :delete and :insert @@ -50,7 +50,7 @@ class Isometric end end - #Calculates physical coordinates for tiles + #Calculates physical cordinates for tiles if state.tileCords == [] state.tileCords = state.tileGrid.map do |val| @@ -101,7 +101,7 @@ class Isometric #Shows the tile itself. Important that it's rendered after the two above! outputs.sprites << state.tileCords.map do |val| - if val[2] == true #Checks if tile needs to be rendered + if val[2] == true #Chcekcs if tile needs to be rendered if val[5] == state.currentSpriteLocation [val[0], val[1], state.tileSize[0], state.tileSize[1], 'sprites/selectedTile.png'] else diff --git a/samples/99_genre_rpg_tactical/taking_turns/app/main.rb b/samples/99_genre_rpg_tactical/taking_turns/app/main.rb deleted file mode 100644 index aac6de7..0000000 --- a/samples/99_genre_rpg_tactical/taking_turns/app/main.rb +++ /dev/null @@ -1,189 +0,0 @@ -def tick args - args.state.base_columns ||= 10.times.map { |n| 50 * n + 1280 / 2 - 5 * 50 + 5 } - args.state.base_rows ||= 5.times.map { |n| 50 * n + 720 - 5 * 50 } - args.state.offset_columns = 10.times.map { |n| (n - 4.5) * Math.sin(Kernel.tick_count.to_radians) * 12 } - args.state.offset_rows = 5.map { 0 } - args.state.columns = 10.times.map { |i| args.state.base_columns[i] + args.state.offset_columns[i] } - args.state.rows = 5.times.map { |i| args.state.base_rows[i] + args.state.offset_rows[i] } - args.state.explosions ||= [] - args.state.enemies ||= [] - args.state.score ||= 0 - args.state.wave ||= 0 - if args.state.enemies.empty? - args.state.wave += 1 - args.state.wave_root = Math.sqrt(args.state.wave) - args.state.enemies = make_enemies - end - args.state.player ||= {x: 620, y: 80, w: 40, h: 40, path: 'sprites/circle-gray.png', angle: 90, cooldown: 0, alive: true} - args.state.enemy_bullets ||= [] - args.state.player_bullets ||= [] - args.state.lives ||= 3 - args.state.missed_shots ||= 0 - args.state.fired_shots ||= 0 - - update_explosions args - update_enemy_positions args - - if args.inputs.left && args.state.player[:x] > (300 + 5) - args.state.player[:x] -= 5 - end - if args.inputs.right && args.state.player[:x] < (1280 - args.state.player[:w] - 300 - 5) - args.state.player[:x] += 5 - end - - args.state.enemy_bullets.each do |bullet| - bullet[:x] += bullet[:dx] - bullet[:y] += bullet[:dy] - end - args.state.player_bullets.each do |bullet| - bullet[:x] += bullet[:dx] - bullet[:y] += bullet[:dy] - end - - args.state.enemy_bullets = args.state.enemy_bullets.find_all { |bullet| bullet[:y].between?(-16, 736) } - args.state.player_bullets = args.state.player_bullets.find_all do |bullet| - if bullet[:y].between?(-16, 736) - true - else - args.state.missed_shots += 1 - false - end - end - - args.state.enemies = args.state.enemies.reject do |enemy| - if args.state.player[:alive] && 1500 > (args.state.player[:x] - enemy[:x]) ** 2 + (args.state.player[:y] - enemy[:y]) ** 2 - args.state.explosions << {x: enemy[:x] + 4, y: enemy[:y] + 4, w: 32, h: 32, path: 'sprites/explosion-0.png', age: 0} - args.state.explosions << {x: args.state.player[:x] + 4, y: args.state.player[:y] + 4, w: 32, h: 32, path: 'sprites/explosion-0.png', age: 0} - args.state.player[:alive] = false - true - else - false - end - end - args.state.enemy_bullets.each do |bullet| - if args.state.player[:alive] && 400 > (args.state.player[:x] - bullet[:x] + 12) ** 2 + (args.state.player[:y] - bullet[:y] + 12) ** 2 - args.state.explosions << {x: args.state.player[:x] + 4, y: args.state.player[:y] + 4, w: 32, h: 32, path: 'sprites/explosion-0.png', age: 0} - args.state.player[:alive] = false - bullet[:despawn] = true - end - end - args.state.enemies = args.state.enemies.reject do |enemy| - args.state.player_bullets.any? do |bullet| - if 400 > (enemy[:x] - bullet[:x] + 12) ** 2 + (enemy[:y] - bullet[:y] + 12) ** 2 - args.state.explosions << {x: enemy[:x] + 4, y: enemy[:y] + 4, w: 32, h: 32, path: 'sprites/explosion-0.png', age: 0} - bullet[:despawn] = true - args.state.score += 1000 * args.state.wave - true - else - false - end - end - end - - args.state.player_bullets = args.state.player_bullets.reject { |bullet| bullet[:despawn] } - args.state.enemy_bullets = args.state.enemy_bullets.reject { |bullet| bullet[:despawn] } - - args.state.player[:cooldown] -= 1 - if args.inputs.keyboard.key_held.space && args.state.player[:cooldown] <= 0 && args.state.player[:alive] - args.state.player_bullets << {x: args.state.player[:x] + 12, y: args.state.player[:y] + 28, w: 16, h: 16, path: 'sprites/star.png', dx: 0, dy: 8}.sprite - args.state.fired_shots += 1 - args.state.player[:cooldown] = 10 + 20 / args.state.wave - end - args.state.enemies.each do |enemy| - if Math.rand < 0.0005 + 0.0005 * args.state.wave && args.state.player[:alive] && enemy[:move_state] == :normal - args.state.enemy_bullets << {x: enemy[:x] + 12, y: enemy[:y] - 8, w: 16, h: 16, path: 'sprites/star.png', dx: 0, dy: -3 - args.state.wave_root}.sprite - end - end - - args.outputs.background_color = [0, 0, 0] - args.outputs.primitives << args.state.enemies.map do |enemy| - [enemy[:x], enemy[:y], 40, 40, enemy[:path], -90].sprite - end - args.outputs.primitives << args.state.player if args.state.player[:alive] - args.outputs.primitives << args.state.explosions - args.outputs.primitives << args.state.player_bullets - args.outputs.primitives << args.state.enemy_bullets - accuracy = args.state.fired_shots.zero? ? 1 : (args.state.fired_shots - args.state.missed_shots) / args.state.fired_shots - args.outputs.primitives << [ - [0, 0, 300, 720, 96, 0, 0].solid, - [1280 - 300, 0, 300, 720, 96, 0, 0].solid, - [1280 - 290, 60, "Wave #{args.state.wave}", 255, 255, 255].label, - [1280 - 290, 40, "Accuracy #{(accuracy * 100).floor}%", 255, 255, 255].label, - [1280 - 290, 20, "Score #{(args.state.score * accuracy).floor}", 255, 255, 255].label, - ] - args.outputs.primitives << args.state.lives.times.map do |n| - [1280 - 290 + 50 * n, 80, 40, 40, 'sprites/circle-gray.png', 90].sprite - end - #args.outputs.debug << args.gtk.framerate_diagnostics_primitives - - if (!args.state.player[:alive]) && args.state.enemy_bullets.empty? && args.state.explosions.empty? && args.state.enemies.all? { |enemy| enemy[:move_state] == :normal } - args.state.player[:alive] = true - args.state.player[:x] = 624 - args.state.player[:y] = 80 - args.state.lives -= 1 - if args.state.lives == -1 - args.state.clear! - end - end -end - -def make_enemies - enemies = [] - enemies += 10.times.map { |n| {x: Math.rand * 1280 * 2 - 640, y: Math.rand * 720 * 2 + 720, row: 0, col: n, path: 'sprites/circle-orange.png', move_state: :retreat} } - enemies += 10.times.map { |n| {x: Math.rand * 1280 * 2 - 640, y: Math.rand * 720 * 2 + 720, row: 1, col: n, path: 'sprites/circle-orange.png', move_state: :retreat} } - enemies += 8.times.map { |n| {x: Math.rand * 1280 * 2 - 640, y: Math.rand * 720 * 2 + 720, row: 2, col: n + 1, path: 'sprites/circle-blue.png', move_state: :retreat} } - enemies += 8.times.map { |n| {x: Math.rand * 1280 * 2 - 640, y: Math.rand * 720 * 2 + 720, row: 3, col: n + 1, path: 'sprites/circle-blue.png', move_state: :retreat} } - enemies += 4.times.map { |n| {x: Math.rand * 1280 * 2 - 640, y: Math.rand * 720 * 2 + 720, row: 4, col: n + 3, path: 'sprites/circle-green.png', move_state: :retreat} } - enemies -end - -def update_explosions args - args.state.explosions.each do |explosion| - explosion[:age] += 0.5 - explosion[:path] = "sprites/explosion-#{explosion[:age].floor}.png" - end - args.state.explosions = args.state.explosions.reject { |explosion| explosion[:age] >= 7 } -end - -def update_enemy_positions args - args.state.enemies.each do |enemy| - if enemy[:move_state] == :normal - enemy[:x] = args.state.columns[enemy[:col]] - enemy[:y] = args.state.rows[enemy[:row]] - enemy[:move_state] = :dive if Math.rand < 0.0002 + 0.00005 * args.state.wave && args.state.player[:alive] - elsif enemy[:move_state] == :dive - enemy[:target_x] ||= args.state.player[:x] - enemy[:target_y] ||= args.state.player[:y] - dx = enemy[:target_x] - enemy[:x] - dy = enemy[:target_y] - enemy[:y] - vel = Math.sqrt(dx * dx + dy * dy) - speed_limit = 2 + args.state.wave_root - if vel > speed_limit - dx /= vel / speed_limit - dy /= vel / speed_limit - end - if vel < 1 || !args.state.player[:alive] - enemy[:move_state] = :retreat - end - enemy[:x] += dx - enemy[:y] += dy - elsif enemy[:move_state] == :retreat - enemy[:target_x] = args.state.columns[enemy[:col]] - enemy[:target_y] = args.state.rows[enemy[:row]] - dx = enemy[:target_x] - enemy[:x] - dy = enemy[:target_y] - enemy[:y] - vel = Math.sqrt(dx * dx + dy * dy) - speed_limit = 2 + args.state.wave_root - if vel > speed_limit - dx /= vel / speed_limit - dy /= vel / speed_limit - elsif vel < 1 - enemy[:move_state] = :normal - enemy[:target_x] = nil - enemy[:target_y] = nil - end - enemy[:x] += dx - enemy[:y] += dy - end - end -end diff --git a/samples/99_genre_rpg_tactical/taking_turns/run.bat b/samples/99_genre_rpg_tactical/taking_turns/run.bat deleted file mode 100644 index 36335e3..0000000 --- a/samples/99_genre_rpg_tactical/taking_turns/run.bat +++ /dev/null @@ -1,6 +0,0 @@ -cd /d %~dp0 - -cd .. -cd .. -cd .. -dragonruby samples/99_genre_arcade/dragalaga diff --git a/samples/99_genre_rpg_tactical/taking_turns/sprites/circle-blue.png b/samples/99_genre_rpg_tactical/taking_turns/sprites/circle-blue.png deleted file mode 100644 index 1726d2a..0000000 Binary files a/samples/99_genre_rpg_tactical/taking_turns/sprites/circle-blue.png and /dev/null differ diff --git a/samples/99_genre_rpg_tactical/taking_turns/sprites/circle-gray.png b/samples/99_genre_rpg_tactical/taking_turns/sprites/circle-gray.png deleted file mode 100644 index 960f191..0000000 Binary files a/samples/99_genre_rpg_tactical/taking_turns/sprites/circle-gray.png and /dev/null differ diff --git a/samples/99_genre_rpg_tactical/taking_turns/sprites/circle-green.png b/samples/99_genre_rpg_tactical/taking_turns/sprites/circle-green.png deleted file mode 100644 index 43cf7ee..0000000 Binary files a/samples/99_genre_rpg_tactical/taking_turns/sprites/circle-green.png and /dev/null differ diff --git a/samples/99_genre_rpg_tactical/taking_turns/sprites/circle-orange.png b/samples/99_genre_rpg_tactical/taking_turns/sprites/circle-orange.png deleted file mode 100644 index 5604a42..0000000 Binary files a/samples/99_genre_rpg_tactical/taking_turns/sprites/circle-orange.png and /dev/null differ diff --git a/samples/99_genre_rpg_tactical/taking_turns/sprites/explosion-0.png b/samples/99_genre_rpg_tactical/taking_turns/sprites/explosion-0.png deleted file mode 100644 index f48636f..0000000 Binary files a/samples/99_genre_rpg_tactical/taking_turns/sprites/explosion-0.png and /dev/null differ diff --git a/samples/99_genre_rpg_tactical/taking_turns/sprites/explosion-1.png b/samples/99_genre_rpg_tactical/taking_turns/sprites/explosion-1.png deleted file mode 100644 index b4018d9..0000000 Binary files a/samples/99_genre_rpg_tactical/taking_turns/sprites/explosion-1.png and /dev/null differ diff --git a/samples/99_genre_rpg_tactical/taking_turns/sprites/explosion-2.png b/samples/99_genre_rpg_tactical/taking_turns/sprites/explosion-2.png deleted file mode 100644 index 3abaedd..0000000 Binary files a/samples/99_genre_rpg_tactical/taking_turns/sprites/explosion-2.png and /dev/null differ diff --git a/samples/99_genre_rpg_tactical/taking_turns/sprites/explosion-3.png b/samples/99_genre_rpg_tactical/taking_turns/sprites/explosion-3.png deleted file mode 100644 index fe94a5a..0000000 Binary files a/samples/99_genre_rpg_tactical/taking_turns/sprites/explosion-3.png and /dev/null differ diff --git a/samples/99_genre_rpg_tactical/taking_turns/sprites/explosion-4.png b/samples/99_genre_rpg_tactical/taking_turns/sprites/explosion-4.png deleted file mode 100644 index ed04237..0000000 Binary files a/samples/99_genre_rpg_tactical/taking_turns/sprites/explosion-4.png and /dev/null differ diff --git a/samples/99_genre_rpg_tactical/taking_turns/sprites/explosion-5.png b/samples/99_genre_rpg_tactical/taking_turns/sprites/explosion-5.png deleted file mode 100644 index 2cd8f06..0000000 Binary files a/samples/99_genre_rpg_tactical/taking_turns/sprites/explosion-5.png and /dev/null differ diff --git a/samples/99_genre_rpg_tactical/taking_turns/sprites/explosion-6.png b/samples/99_genre_rpg_tactical/taking_turns/sprites/explosion-6.png deleted file mode 100644 index e55909c..0000000 Binary files a/samples/99_genre_rpg_tactical/taking_turns/sprites/explosion-6.png and /dev/null differ diff --git a/samples/99_genre_rpg_tactical/taking_turns/sprites/star.png b/samples/99_genre_rpg_tactical/taking_turns/sprites/star.png deleted file mode 100644 index e0ee0f9..0000000 Binary files a/samples/99_genre_rpg_tactical/taking_turns/sprites/star.png and /dev/null differ diff --git a/samples/99_genre_rpg_topdown/topdown_starting_point/app/main.rb b/samples/99_genre_rpg_topdown/topdown_starting_point/app/main.rb index 33228a6..c447940 100644 --- a/samples/99_genre_rpg_topdown/topdown_starting_point/app/main.rb +++ b/samples/99_genre_rpg_topdown/topdown_starting_point/app/main.rb @@ -15,6 +15,7 @@ - args.outputs.labels: An array. The values generate a label. The parameters are [X, Y, TEXT, SIZE, ALIGNMENT, RED, GREEN, BLUE, ALPHA, FONT STYLE] + For more information about labels, go to mygame/documentation/02-labels.md. =end -- cgit v1.2.3 From 17d6f2a45d07932fb2ac354d4f8996c420eddc27 Mon Sep 17 00:00:00 2001 From: Amir Rajan Date: Sat, 7 Aug 2021 00:14:16 -0500 Subject: Docs synced. --- docs/docs.html | 8876 ++-- docs/docs.txt | 12653 +++-- docs/parse_log.txt | 93166 ++++++++++++++++++++--------------- docs/todo/03-solids-and-borders.md | 4 +- docs/todo/04-lines.md | 4 +- docs/todo/05-sprites.md | 4 +- docs/todo/08-controllers.md | 2 +- 7 files changed, 65703 insertions(+), 49006 deletions(-) diff --git a/docs/docs.html b/docs/docs.html index 39d0086..5ad5d6c 100644 --- a/docs/docs.html +++ b/docs/docs.html @@ -1,7 +1,8 @@ - + + DragonRuby Game Toolkit Documentation - +
@@ -10,16 +11,16 @@
  • DragonRuby Game Toolkit Live Docs
  • Hello World
  • Join the Discord and Subscribe to the News Letter
  • -
  • Watch Some Intro Videos
  • -
  • Getting Started Tutorial
  • -
  • Deploying To Itch.io
  • +
  • Intro Videos
  • +
  • Getting Started Tutorial
  • +
  • Deploying To Itch.io
  • Deploying To Mobile Devices
  • DragonRuby's Philosophy
  • -
  • Frequently Asked Questions, Comments, and Concerns
  • -
  • RECIPIES:
  • -
  • DOCS: GTK::Runtime
  • +
  • Frequently Asked Questions, Comments, and Concerns
  • +
  • RECIPIES:
  • +
  • DOCS: GTK::Runtime
  • SUMMARY: def tick args; end;
  • -
  • DOCS: GTK::Runtime#reset
  • +
  • DOCS: GTK::Runtime#reset
  • DOCS: GTK::Runtime#calcstringbox
  • DOCS: GTK::Runtime#write_file
  • DOCS: Array
  • @@ -29,28 +30,29 @@
  • DOCS: Array#reject_false
  • DOCS: Array#product
  • DOCS: Array#map_2d
  • -
  • DOCS: Array#include_any?
  • -
  • DOCS: Array#any_intersect_rect?
  • +
  • DOCS: Array#include_any?
  • +
  • DOCS: Array#any_intersect_rect?
  • DOCS: GTK::Args#audio
  • DOCS: GTK::Outputs
  • DOCS: GTK::Outputs#solids
  • DOCS: GTK::Outputs#borders
  • -
  • DOCS: GTK::Outputs#screenshots
  • +
  • DOCS: GTK::Outputs#sprites
  • +
  • DOCS: GTK::Outputs#screenshots
  • DOCS: GTK::Mouse
  • DOCS: GTK::MousePoint
  • DOCS: GTK::OpenEntity
  • DOCS: GTK::OpenEntity#as_hash
  • DOCS: Numeric#frame_index
  • DOCS: Numeric#elapsed_time
  • -
  • DOCS: Numeric#elapsed?
  • -
  • DOCS: Numeric#created?
  • +
  • DOCS: Numeric#elapsed?
  • +
  • DOCS: Numeric#created?
  • DOCS: Kernel
  • DOCS: Kernel::tick_count
  • DOCS: Kernel::global_tick_count
  • DOCS: Geometry
  • DOCS: GTK::Geometry#scale_rect
  • Source Code
  • -
    +

    DragonRuby Game Toolkit Live Docs

    @@ -61,9 +63,6 @@ To search docs you can type docs_search "SEARCH TERM" or if you wan

    docs_search { |entry| (entry.include? "Array") && (!entry.include? "Enumerable") }
     
    -

    - -

    Hello World

    Welcome to DragonRuby Game Toolkit. Take the steps below to get started. @@ -91,21 +90,26 @@ Reply with: I am a Dragon Rider.

    -

    Watch Some Intro Videos

    +

    Intro Videos

    -Each video is only 20 minutes and all of them will fit into a lunch break. So please watch them: +Here are some videos to help you get the lay of the land.

    +

    Quick Api Tour

    1. Beginner Introduction to DragonRuby Game Toolkit: https://youtu.be/ixw7TJhU08E
    2. +
    +

    If You Are Completely New to Ruby and Programming

    +
    1. Intermediate Introduction to Ruby Syntax: https://youtu.be/HG-XRZ5Ppgc
    2. Intermediate Introduction to Arrays in Ruby: https://youtu.be/N72sEYFRqfo
    3. +
    4. You may also want to try this free course provided at http://dragonruby.school.
    5. +
    +

    If You Have Game Dev Experience

    +
      +
    1. Building Tetris - Part 1: https://youtu.be/xZMwRSbC4rY
    2. +
    3. Building Tetris - Part 2: https://youtu.be/C3LLzDUDgz4
    4. +
    5. Low Res Game Jam Tutorial: https://youtu.be/pCI90ukKCME
    -

    -The second and third videos are not required if you are proficient with Ruby, but *definitely* watch the first one. -

    -

    -You may also want to try this free course provided at http://dragonruby.school. -

    Getting Started Tutorial

    This is a tutorial written by Ryan C Gordon (a Juggernaut in the industry who has contracted to Valve, Epic, Activision, and EA... check out his Wikipedia page: https://en.wikipedia.org/wiki/Ryan_C._Gordon). @@ -291,7 +295,7 @@ Note that you can also run DragonRuby without X11 at all: if you run it from a v

    There is a lot more you can do with DragonRuby, but now you've already got just about everything you need to make a simple game. After all, even the most fancy games are just creating objects and moving them around. Experiment a little. Add a few more things and have them interact in small ways. Want something to go away? Just don't add it to args.output anymore.

    -

    Deploying To Itch.io

    +

    Deploying To Itch.io

    Once you've built your game, you're all set to deploy! Good luck in your game dev journey and if you get stuck, come to the Discord channel!

    @@ -360,7 +364,7 @@ If you have a Pro subscription, you also have the capability to deploy to mobile To deploy to iOS, you need to have a Mac running MacOS Catalina, an iOS device, and an active/paid Developer Account with Apple. From the Console type: $wizards.ios.start and you will be guided through the deployment process.

    -To deploy to Android, you need to have an Android emulator/device, and a environment that is able to run Android SDK. dragonruby-publish will create an APK for you. From there, you can sign the APK and install it to your device. The signing and installation procedure varies from OS to OS. Here's an example of what the command might look like: +To deploy to Android, you need to have an Android emulator/device, and an environment that is able to run Android SDK. dragonruby-publish will create an APK for you. From there, you can sign the APK and install it to your device. The signing and installation procedure varies from OS to OS. Here's an example of what the command might look like:

    > adb logcat -e mygame # you'll want to run this in a separate terminal
     > keytool -genkey -v -keystore mygame.keystore -alias mygame -keyalg RSA -keysize 2048 -validity 10000
    @@ -369,7 +373,7 @@ To deploy to Android, you need to have an Android emulator/device, and a environ
     

    DragonRuby's Philosophy

    -The following tenants of DragonRuby are what set us apart from other game engines. Given that Game Toolkit is a relatively new engine, there are definitely features that are missing. So having a big check list of "all the cool things" is not this engine's forte. This is compensated with a strong commitment to the following principals. +The following tenants of DragonRuby are what set us apart from other game engines. Given that Game Toolkit is a relatively new engine, there are definitely features that are missing. So having a big check list of "all the cool things" is not this engine's forte. This is compensated with a strong commitment to the following principles.

    Challenge The Status Quo

    @@ -388,7 +392,7 @@ It's a hard pill to swallow, but forget blindly accepted best practices and try There is a programming idiom in software called "The Pit of Success". The term normalizes upfront pain as a necessity/requirement in the hopes that the investment will yield dividends "when you become successful" or "when the code becomes more complicated". This approach to development is strongly discouraged by us. It leads to over-architected and unnecessary code; creates barriers to rapid prototyping and shipping a game; and overwhelms beginners who are new to the engine or programming in general.

    -DragonRuby's philosophy is to provide multiple options across the "make it fast" vs "make it right" spectrum, with incremental/intuitive transitions between the options provided. A concrete example of this philosophy would be render primitives: the spectrum of options allows renderable constructs take the form of tuples/arrays (easy to pickup, simple, and fast to code/prototype with), hashes (a little more work, but gives you the ability to add additional properties), open and string entities (more work than hashes, but yields cleaner apis), and finally - if you really need full power/flexibility in rendering - classes (which take the most amount of code and programming knowledge to create). +DragonRuby's philosophy is to provide multiple options across the "make it fast" vs "make it right" spectrum, with incremental/intuitive transitions between the options provided. A concrete example of this philosophy would be render primitives: the spectrum of options allows renderable constructs that take the form of tuples/arrays (easy to pickup, simple, and fast to code/prototype with), hashes (a little more work, but gives you the ability to add additional properties), open and strict entities (more work than hashes, but yields cleaner apis), and finally - if you really need full power/flexibility in rendering - classes (which take the most amount of code and programming knowledge to create).

    Release Early and Often

    @@ -432,12 +436,12 @@ We are bombarded by marketing speak day in and day out. We don't do that here. T

    We want DragonRuby to *actually* help you build the game you want to build (as opposed to sell you something piece of demoware that doesn't work).

    -

    Frequently Asked Questions, Comments, and Concerns

    +

    Frequently Asked Questions, Comments, and Concerns

    Here are questions, comments, and concerns that frequently come up.

    Frequently Asked Questions

    -

    What is DragonRuby LLP?

    +

    What is DragonRuby LLP?

    DragonRuby LLP is a partnership of four devs who came together with the goal of bringing the aesthetics and joy of Ruby, everywhere possible.

    @@ -462,7 +466,7 @@ NOTE: We leave the "A DragonRuby LLP Product" off of this one because that just

    NOTE: Devs who use DragonRuby are "Dragon Riders/Riders of Dragons". That's a bad ass identifier huh?

    -

    What is DragonRuby?

    +

    What is DragonRuby?

    The response to this question requires a few subparts. First we need to clarify some terms. Specifically _language specification_ vs _runtime_.

    @@ -482,7 +486,7 @@ DragonRuby's goal is to be compliant with the ISO/IEC 30170:2012 standard. It's The elevator pitch is:

    -DragonRuby is a Multilevel Cross-platform Runtime. The "multiple levels" within the runtime allows us to target platforms no other Ruby can target: PC, Mac, Linux, Raspberry Pi, WASM, iOS, Android, Nintendo Switch, PS4, Xbox, and Scadia. +DragonRuby is a Multilevel Cross-platform Runtime. The "multiple levels" within the runtime allows us to target platforms no other Ruby can target: PC, Mac, Linux, Raspberry Pi, WASM, iOS, Android, Nintendo Switch, PS4, Xbox, and Stadia.

    What does Multilevel Cross-platform mean?

    @@ -513,7 +517,7 @@ These levels allow us to stay up to date with open source implementations of Rub

    DragonRuby is a Ruby runtime implementation that takes all the lessons we've learned from MRI/CRuby, and merges it with the latest and greatest compiler and OSS technologies.

    -

    How is DragonRuby different than MRI?

    +

    How is DragonRuby different than MRI?

    DragonRuby supports a subset of MRI apis. Our target is to support all of mRuby's standard lib. There are challenges to this given the number of platforms we are trying to support (specifically console).

    @@ -535,7 +539,7 @@ end
    • If you use the `repl` method, the code will be executed and the DragonRuby Console will automatically open so you can see the results (on Mac and Linux, the results will also be printed to the terminal).
    • -
    • All puts statements will also be saved to logs/log.txt. So if you want to stay in your editor and not look at the terminal, or the DragonRuby Console, you can tail this file.
    • +
    • All puts statements will also be saved to logs/puts.txt. So if you want to stay in your editor and not look at the terminal, or the DragonRuby Console, you can tail this file.

    4. To ignore code in repl.rb, instead of commenting it out, prefix repl with the letter x and it'll be ignored. @@ -568,18 +572,18 @@ You can use DragonRuby's replay capabilities to troubleshoot:

    1. DragonRuby is hot loaded which gives you a very fast feedback loop (if the game throws an exception, it's because of the code you just added).
    2. -
    3. Use ./dragonruby mygame --record to create a game play recording that you can use to find the exception (you can replay a recoding by executing ./dragonruby mygame --replay last_replay.txt or through the DragonRuby Console using $gtk.recording.start_replay "last_replay.txt".
    4. +
    5. Use ./dragonruby mygame --record to create a game play recording that you can use to find the exception (you can replay a recording by executing ./dragonruby mygame --replay last_replay.txt or through the DragonRuby Console using $gtk.recording.start_replay "last_replay.txt".
    6. DragonRuby also ships with a unit testing facility. You can invoke the following command to run a test: ./dragonruby . --eval some_ruby_file.rb --no-tick.
    7. Get into the habit of adding debugging facilities within the game itself. You can add drawing primitives to args.outputs.debug that will render on top of your game but will be ignored in a production release.
    8. Debugging something that runs at 60fps is (imo) not that helpful. The exception you are seeing could have been because of a change that occurred many frames ago.

    Frequent Comments About Ruby as a Language Choice

    -

    But Ruby is dead.

    +

    But Ruby is dead.

    Let's check the official source for the answer to this question: isrubydead.com: https://isrubydead.com/.

    -On a more serious note, Ruby's _quantity_ levels aren't what they used to be. And that's totally fine. Every one chases the new and shiny. +On a more serious note, Ruby's _quantity_ levels aren't what they used to be. And that's totally fine. Everyone chases the new and shiny.

    What really matters is _quality/maturity_. Here is the latest (StackOverflow Survey sorted by highest paid developers)[https://insights.stackoverflow.com/survey/2019#top-paying-technologies]. @@ -587,11 +591,11 @@ What really matters is _quality/maturity_. Here is the latest (StackOverflow Sur

    Let's stop making this comment shall we?

    -

    But Ruby is slow.

    +

    But Ruby is slow.

    That doesn't make any sense. A language specification can't be slow... it's a language spec. Sure, an _implementation/runtime_ can be slow though, but then we'd have to talk about which runtime.

    -

    Dynamic languages are slow.

    +

    Dynamic languages are slow.

    They are certainly slower than statically compiled languages. With the processing power and compiler optimizations we have today, dynamic languages like Ruby are _fast enough_.

    @@ -602,7 +606,7 @@ Unless you are writing in some form of intermediate representation by hand, your NOTE: If you _are_ hand writing LLVM IR, we are always open to bringing on new partners with such a skill set. Email us ^_^.

    Frequent Concerns

    -

    DragonRuby is not open source. That's not right.

    +

    DragonRuby is not open source. That's not right.

    The current state of open source is unsustainable. Contributors work for free, most all open source repositories are severely under-staffed, and burnout from core members is rampant.

    @@ -618,7 +622,7 @@ If the reason above isn't sufficient, then definitely use something else.

    All this being said, we do have parts of the engine open sourced on GitHub: https://github.com/dragonruby/dragonruby-game-toolkit-contrib/

    -

    DragonRuby is for pay. You should offer a free version.

    +

    DragonRuby is for pay. You should offer a free version.

    If you can afford to pay for DragonRuby, you should (and will). We don't go around telling writers that they should give us their books for free, and only require payment if we read the entire thing. It's time we stop asking that of software products.

    @@ -640,21 +644,21 @@ You qualify for a free, unrestricted license to DragonRuby products if any of th

    Just contact Amir at amir.rajan@dragonruby.org with a short explanation of your current situation and he'll set you up. No questions asked.

    -

    But still, you should offer a free version. So I can try it out and see if I like it.

    +

    But still, you should offer a free version. So I can try it out and see if I like it.

    -You can try our [web-based sandbox environment](). But it won't do the runtime justice. Or just come to our [Slack]() or [Discord]() channel and ask questions. We'd be happy to have a one on one video chat with you and show off all the cool stuff we're doing. +You can try our web-based sandbox environment at http://fiddle.dragonruby.org. But it won't do the runtime justice. Or just come to our Discord Channel at http://discord.dragonruby.org and ask questions. We'd be happy to have a one on one video chat with you and show off all the cool stuff we're doing.

    Seriously just buy it. Get a refund if you don't like it. We make it stupid easy to do so.

    -

    I still think you should do a free version. Think of all people who would give it a shot.

    +

    I still think you should do a free version. Think of all people who would give it a shot.

    Free isn't a sustainable financial model. We don't want to spam your email. We don't want to collect usage data off of you either. We just want to provide quality toolchains to quality developers (as opposed to a large quantity of developers).

    The people that pay for DragonRuby and make an effort to understand it are the ones we want to build a community around, partner with, and collaborate with. So having that small monetary wall deters entitled individuals that don't value the same things we do.

    -

    What if I build something with DragonRuby, but DragonRuby LLP becomes insolvent.

    +

    What if I build something with DragonRuby, but DragonRuby LLP becomes insolvent.

    That won't happen if the development world stop asking for free stuff and non-trivially compensate open source developers. Look, we want to be able to work on the stuff we love, every day of our lives. And we'll go to great lengths to make that happen.

    @@ -743,11 +747,15 @@ You can represent a sprite as a Hash: flip_vertically: false, flip_horizontally: false, angle_anchor_x: 0.5, - angle_anchor_y: 1.0 + angle_anchor_y: 1.0, + blendmode_enum: 1 } end

    +The blendmode_enum value can be set to 0 (no blending), 1 (alpha blending), 2 (additive blending), 3 (modulo blending), 4 (multiply blending). +

    +

    You can represent a sprite as an object:

    # Create type with ALL sprite properties AND primitive_marker
    @@ -756,7 +764,7 @@ class Sprite
                     :source_x, :source_y, :source_w, :source_h,
                     :tile_x, :tile_y, :tile_w, :tile_h,
                     :flip_horizontally, :flip_vertically,
    -                :angle_anchor_x, :angle_anchor_y
    +                :angle_anchor_x, :angle_anchor_y, :blendmode_enum
     
       def primitive_marker
         :sprite
    @@ -832,16 +840,17 @@ You can add additional metadata about your game within a label, which requires y
     

    def tick args
       args.outputs.labels << {
    -    x:              200,
    -    y:              550,
    -    text:           "dragonruby",
    -    size_enum:      2,
    -    alignment_enum: 1,
    -    r:              155,
    -    g:              50,
    -    b:              50,
    -    a:              255,
    -    font:           "fonts/manaspc.ttf",
    +    x:                       200,
    +    y:                       550,
    +    text:                    "dragonruby",
    +    size_enum:               2,
    +    alignment_enum:          1,
    +    r:                       155,
    +    g:                       50,
    +    b:                       50,
    +    a:                       255,
    +    font:                    "fonts/manaspc.ttf",
    +    vertical_alignment_enum: 0, # 0 is bottom, 1 is middle, 2 is top
         # You can add any properties you like (this will be ignored/won't cause errors)
         game_data_one:  "Something",
         game_data_two: {
    @@ -871,6 +880,19 @@ You can get the render size of any string using args.gtk.calcstringbox
    +

    Rendering Labels With New Line Characters And Wrapping

    +

    +You can use a strategy like the following to create multiple labels from a String. +

    +
    def tick args
    +  long_string = "Lorem ipsum dolor sit amet, consectetur adipiscing elitteger dolor velit, ultricies vitae libero vel, aliquam imperdiet enim."
    +  max_character_length = 30
    +  long_strings_split = args.string.wrapped_lines long_string, max_character_length
    +  args.outputs.labels << long_strings_split.map_with_index do |s, i|
    +    { x: 10, y: 600 - (i * 20), text: s }
    +  end
    +end
    +

    How To Play A Sound

    Sounds that end .wav will play once: @@ -902,7 +924,7 @@ If you want to play a .ogg once as if it were a sound effect, you c end end

    -

    Using args.state To Store Your Game State

    +

    Using args.state To Store Your Game State

    args.state is a open data structure that allows you to define properties that are arbitrarily nested. You don't need to define any kind of class.

    @@ -975,7 +997,7 @@ All the properties below hang off of args and can be accessed in th args.PROPERTY end
    -

    args.state

    +

    args.state

    Store your game state inside of this state. Properties with arbitrary nesting is allowed and a backing Entity will be created on your behalf.

    @@ -984,35 +1006,35 @@ Store your game state inside of this state. Properties with arbitra args.state.player.y ||= 0 end
    -

    .*.entity_id

    +

    .*.entity_id

    Entities automatically receive an entity_id of type Fixnum.

    -

    .*.entity_type

    +

    .*.entity_type

    Entities can have an entity_type which is represented as a Symbol.

    -

    .*.created_at

    +

    .*.created_at

    Entities have created_at set to args.state.tick_count when they are created.

    -

    .*.created_at_elapsed

    +

    .*.created_at_elapsed

    Returns the elapsed number of ticks since creation.

    -

    .*.global_created_at

    +

    .*.global_created_at

    Entities have global_created_at set to Kernel.global_tick_count when they are created.

    -

    .*.global_created_at_elapsed

    +

    .*.global_created_at_elapsed

    Returns the elapsed number of global ticks since creation.

    -

    .*.as_hash

    +

    .*.as_hash

    Entity cast to a Hash so you can update values as if you were updating a Hash.

    -

    .new_entity

    +

    .new_entity

    Creates a new Entity with a type, and initial properties. An option block can be passed to change the newly created entity:

    @@ -1023,47 +1045,47 @@ Creates a new Entity with a type, and initial properties. An option end end -

    .new_entity_strict

    +

    .new_entity_strict

    Creates a new Strict Entity. While Entities created via args.state.new_entity can have new properties added later on, Entities created using args.state.new_entity must define all properties that are allowed during its initialization. Attempting to add new properties after initialization will result in an exception.

    -

    .tick_count

    +

    .tick_count

    Returns the current tick of the game. args.state.tick_count is 0 when the game is first started or if the game is reset via $gtk.reset.

    -

    args.inputs

    +

    args.inputs

    Access using input using args.inputs.

    -

    .up

    +

    .up

    Returns true if: the up arrow or w key is pressed or held on the keyboard; or if up is pressed or held on controller_one; or if the left_analog on controller_one is tilted upwards.

    -

    .down

    +

    .down

    Returns true if: the down arrow or s key is pressed or held on the keyboard; or if down is pressed or held on controller_one; or if the left_analog on controller_one is tilted downwards.

    -

    .left

    +

    .left

    Returns true if: the left arrow or a key is pressed or held on the keyboard; or if left is pressed or held on controller_one; or if the left_analog on controller_one is tilted to the left.

    -

    .right

    +

    .right

    Returns true if: the right arrow or d key is pressed or held on the keyboard; or if right is pressed or held on controller_one; or if the left_analog on controller_one is tilted to the right.

    -

    .left_right

    +

    .left_right

    Returns -1 (left), 0 (neutral), or +1 (right) depending on results of args.inputs.left and args.inputs.right.

    -

    .up_down

    +

    .up_down

    -Returns -1 (down), 0 (neutral), or +1 (right) depending on results of args.inputs.up and args.inputs.down. +Returns -1 (down), 0 (neutral), or +1 (up) depending on results of args.inputs.down and args.inputs.up.

    -

    .text OR .history

    +

    .text OR .history

    Returns a string that represents the last key that was pressed on the keyboard.

    -

    .mouse

    +

    .mouse

    Represents the user's

    @@ -1105,37 +1127,49 @@ Returns a bitmask for all buttons on the mouse: 1 for a button in t

    mouse.wheel

    -Represents the mouse wheel. Returns nil if no mouse wheel actions occurred. ***** .x Returns the negative or positive number if the mouse wheel has changed in the x axis. ***** .y Returns the negative or positive number if the mouse wheel has changed in the y axis. +Represents the mouse wheel. Returns nil if no mouse wheel actions occurred. +

    +

    +***** .x +

    +

    +Returns the negative or positive number if the mouse wheel has changed in the x axis. +

    +

    +***** .y +

    +

    +Returns the negative or positive number if the mouse wheel has changed in the y axis.

    .click OR .down, .previous_click, .up

    The properties args.inputs.mouse.(click|down|previous_click|up) each return nil if the mouse button event didn't occur. And return an Entity that has an x, y properties along with helper functions to determine collision: inside_rect?, inside_circle.

    -

    .controller_one, .controller_two

    +

    .controller_one, .controller_two

    Represents controllers connected to the usb ports.

    -

    ~.up

    +

    .up

    Returns true if up is pressed or held on the directional or left analog.

    -

    ~.down

    +

    .down

    Returns true if down is pressed or held on the directional or left analog.

    -

    ~.left

    +

    .left

    Returns true if left is pressed or held on the directional or left analog.

    -

    ~.right

    +

    .right

    Returns true if right is pressed or held on the directional or left analog.

    -

    ~.left_right

    +

    .left_right

    Returns -1 (left), 0 (neutral), or +1 (right) depending on results of args.inputs.controller_(one|two).left and args.inputs.controller_(one|two).right.

    -

    ~.up_down

    +

    .up_down

    Returns -1 (down), 0 (neutral), or +1 (up) depending on results of args.inputs.controller_(one|two).up and args.inputs.controller_(one|two).down.

    @@ -1155,19 +1189,19 @@ Returns a number between -1 and 1 which represents the

    Returns a number between -1 and 1 which represents the percentage the analog is moved vertically as a ratio of the maximum vertical movement.

    -

    .directional_up)

    +

    .directional_up

    Returns true if up is pressed or held on the directional.

    -

    .directional_down)

    +

    .directional_down

    Returns true if down is pressed or held on the directional.

    -

    .directional_left)

    +

    .directional_left

    Returns true if left is pressed or held on the directional.

    -

    .directional_right)

    +

    .directional_right

    Returns true if right is pressed or held on the directional.

    @@ -1191,7 +1225,7 @@ Returns true if the specific button is being held. args.input

    Returns true if the specific button was released. args.inputs.controller_(one|two).key_up.BUTTON will be true only on the frame the button was released.

    -

    .keyboard

    +

    .keyboard

    Represents the user's keyboard

    @@ -1333,139 +1367,148 @@ Returns a Hash with all keys on the keyboard in their respective st
  • :down_or_held
  • :up
  • -

    args.outputs

    +

    args.outputs

    args.outputs.PROPERTY is how you render to the screen.

    -

    .background_color

    +

    .background_color

    Set args.outputs.background_color to an Array with RGB values (eg. [255, 255, 255] for the color white).

    -

    .sounds

    +

    .sounds

    Send a file path to this collection to play a sound. The sound file must be under the mygame directory. Example: args.outputs.sounds << "sounds/jump.wav".

    -

    .solids

    +

    .solids

    Send a Primitive to this collection to render a filled in rectangle to the screen. This collection is cleared at the end of every frame.

    -

    .static_solids

    +

    .static_solids

    Send a Primitive to this collection to render a filled in rectangle to the screen. This collection is not cleared at the end of every frame. And objects can be mutated by reference.

    -

    .sprites, .static_sprites

    +

    .sprites, .static_sprites

    Send a Primitive to this collection to render a sprite to the screen.

    -

    .primitives, .static_primitives

    +

    .primitives, .static_primitives

    Send a Primitive of any type and it'll be rendered. The Primitive must have a primitive_marker that returns :solid, :sprite, :label, :line, :border.

    -

    .labels, .static_labels

    +

    .labels, .static_labels

    Send a Primitive to this collection to render text to the screen.

    -

    .lines, .static_lines

    +

    .lines, .static_lines

    Send a Primitive to this collection to render a line to the screen.

    -

    .borders, .static_borders

    +

    .borders, .static_borders

    Send a Primitive to this collection to render an unfilled rectangle to the screen.

    -

    .debug, .static_debug

    +

    .debug, .static_debug

    Send any Primitive to this collection which represents things you render to the screen for debugging purposes. Primitives in this collection will not be rendered in a production release of your game.

    -

    args.geometry

    +

    args.geometry

    This property contains geometric functions. Functions can be invoked via args.geometry.FUNCTION.

    -

    .inside_rect? rect_1, rect_2

    +

    +Here are some general notes with regards to the arguments these geometric functions accept. +

    +
      +
    1. Rectangles can be represented as an Array with four (or more) values [x, y, w, h], as a Hash { x:, y:, w:, h: } or an object that responds to x, y, w, and h.
    2. +
    3. Points can be represent as an Array with two (or more) values [x, y], as a Hash { x:, y:} or an object that responds to x, and y.
    4. +
    5. Lines can be represented as an Array with four (or more) values [x, y, x2, y2], as a Hash { x:, y:, x2:, y2: } or an object that responds to x, y, x2, and y2.
    6. +
    7. Angles are represented as degrees (not radians).
    8. +
    +

    .inside_rect? rect_1, rect_2

    Returns true if rect_1 is inside rect_2.

    -

    .intersect_rect? rect_2, rect_2

    +

    .intersect_rect? rect_2, rect_2

    Returns true if rect_1 intersects rect_2.

    -

    .scale_rect rect, x_percentage, y_percentage

    +

    .scale_rect rect, x_percentage, y_percentage

    Returns a new rectangle that is scaled by the percentages provided.

    -

    .angle_to start_point, end_point

    +

    .angle_to start_point, end_point

    Returns the angle in degrees between two points start_point to end_point.

    -

    .angle_from start_point, end_point

    +

    .angle_from start_point, end_point

    Returns the angle in degrees between two points start_point from end_point.

    -

    .point_inside_circle? point, circle_center_point, radius

    +

    .point_inside_circle? point, circle_center_point, radius

    Returns true if a point is inside a circle defined by its center and radius.

    -

    .center_inside_rect rect, other_rect

    +

    .center_inside_rect rect, other_rect

    Returns a new rectangle based of off rect that is centered inside of other_rect.

    -

    .center_inside_rect_x rect, other_rect

    +

    .center_inside_rect_x rect, other_rect

    Returns a new rectangle based of off rect that is centered horizontally inside of other_rect.

    -

    .center_inside_rect_y rect, other_rect

    +

    .center_inside_rect_y rect, other_rect

    Returns a new rectangle based of off rect that is centered vertically inside of other_rect.

    -

    .anchor_rect rect, anchor_x, anchor_y

    +

    .anchor_rect rect, anchor_x, anchor_y

    Returns a new rectangle based of off rect that has been repositioned based on the percentages passed into anchor_x, and anchor_y.

    -

    .shift_line line, x, y

    +

    .shift_line line, x, y

    Returns a line that is offset by x, and y.

    -

    .line_y_intercept line

    +

    .line_y_intercept line

    Given a line, the b value is determined for the point slope form equation: y = mx + b.

    -

    .angle_between_lines line_one, line_two, replace_infinity:

    +

    .angle_between_lines line_one, line_two, replace_infinity:

    Returns the angle between two lines as if they were infinitely long. A numeric value can be passed in for the last parameter which would represent lines that do not intersect.

    -

    .line_slope line, replace_infinity:

    +

    .line_slope line, replace_infinity:

    Given a line, the m value is determined for the point slope form equation: y = mx + b.

    -

    .line_rise_run

    +

    .line_rise_run

    Given a line, a Hash is returned that returns the slope as x and y properties with normalized values (the number is between -1 and 1).

    -

    .ray_test point, line

    +

    .ray_test point, line

    Given a point and a line, :on, :left, or :right which represents the location of the point relative to the line.

    -

    .line_rect line

    +

    .line_rect line

    Returns the bounding rectangle for a line.

    -

    .line_intersect line_one, line_two

    +

    .line_intersect line_one, line_two

    Returns a point that represents the intersection of the lines.

    -

    .distance point_one, point_two

    +

    .distance point_one, point_two

    Returns the distance between two points.

    -

    .cubic_bezier t, a, b, c, d

    +

    .cubic_bezier t, a, b, c, d

    Returns the cubic bezier function for tick_count t with anchors a, b, c, and d.

    -

    args.easing

    +

    args.easing

    A set of functions that allow you to determine the current progression of an easing function.

    -

    .ease start_tick, current_tick, duration, easing_functions

    +

    .ease start_tick, current_tick, duration, easing_functions

    Given a start, current, duration, and easing function names, ease returns a number between 0 and 1 that represents the progress of an easing function.

    @@ -1485,7 +1528,7 @@ This example will move a box at a linear speed from 0 to 1280. args.outputs.solids << { x: 1280 * current_progress, y: 360, w: 10, h: 10 } end
    -

    .ease_spline start_tick, current_tick, duration, spline

    +

    .ease_spline start_tick, current_tick, duration, spline

    Given a start, current, duration, and a multiple bezier values, this function returns a number between 0 and 1 that represents the progress of an easing function.

    @@ -1506,11 +1549,11 @@ This example will move a box at a linear speed from 0 to 1280 and then back to 0 args.outputs.solids << { x: 1280 * current_progress, y: 360, w: 10, h: 10 } end -

    args.string

    +

    args.string

    Useful string functions not included in Ruby core libraries.

    -

    .wrapped_lines string, max_character_length

    +

    .wrapped_lines string, max_character_length

    This function will return a collection of strings given an input string and max_character_length. The collection of strings returned will split the input string into strings of length <= max_character_length.

    @@ -1527,175 +1570,175 @@ teger dolor velit, ultricies vitae libero vel, aliquam imperdiet enim." end end -

    args.grid

    +

    args.grid

    Returns the virtual grid for the game.

    -

    .name

    +

    .name

    Returns either :origin_bottom_left or :origin_center.

    -

    .bottom

    +

    .bottom

    Returns the y value that represents the bottom of the grid.

    -

    .top

    +

    .top

    Returns the y value that represents the top of the grid.

    -

    .left

    +

    .left

    Returns the x value that represents the left of the grid.

    -

    .right

    +

    .right

    Returns the x value that represents the right of the grid.

    -

    .rect

    +

    .rect

    Returns a rectangle Primitive that represents the grid.

    -

    .origin_bottom_left!

    +

    .origin_bottom_left!

    Change the grids coordinate system to 0, 0 at the bottom left corner.

    -

    .origin_center!

    +

    .origin_center!

    Change the grids coordinate system to 0, 0 at the center of the screen.

    -

    .w

    +

    .w

    Returns the grid's width (always 1280).

    -

    .h

    +

    .h

    Returns the grid's height (always 720).

    -

    args.gtk

    +

    args.gtk

    This represents the DragonRuby Game Toolkit's Runtime Environment and can be accessed via args.gtk.METHOD.

    -

    .argv

    +

    .argv

    Returns a String that represents the parameters passed into the ./dragonruby binary.

    -

    .platform

    +

    .platform

    Returns a String representing the operating system the game is running on.

    -

    .request_quit

    +

    .request_quit

    Request that the runtime quit the game.

    -

    .write_file path, contents

    +

    .write_file path, contents

    Writes/overwrites a file within the game directory + path.

    -

    .write_file_root

    +

    .write_file_root

    Writes/overwrites a file within the root dragonruby binary directory + path.

    -

    .append_file path, contents

    +

    .append_file path, contents

    Append content to a file located at the game directory + path.

    -

    .append_file_root path, contents

    +

    .append_file_root path, contents

    Append content to a file located at the root dragonruby binary directory + path.

    -

    .read_file path

    +

    .read_file path

    Reads a file from the sandboxed file system.

    -

    .parse_xml string, parse_xml_file path

    +

    .parse_xml string, parse_xml_file path

    Returns a Hash for a String that represents XML.

    -

    .parse_json string, parse_json_file path

    +

    .parse_json string, parse_json_file path

    Returns a Hash for a String that represents JSON.

    -

    .http_get url, extra_headers = {}

    +

    .http_get url, extra_headers = {}

    Creates an async task to perform an HTTP GET.

    -

    .http_post url, form_fields = {}, extra_headers = {}

    +

    .http_post url, form_fields = {}, extra_headers = {}

    Creates an async task to perform an HTTP POST.

    -

    .reset

    +

    .reset

    Resets the game by deleting all data in args.state and setting args.state.tick_count back to 0.

    -

    .stop_music

    +

    .stop_music

    Stops all background music.

    -

    .calcstringbox str, size_enum, font

    +

    .calcstringbox str, size_enum, font

    Returns a tuple with width and height of a string being rendered.

    -

    .slowmo! factor

    +

    .slowmo! factor

    Slows the game down by the factor provided.

    -

    .notify! string

    +

    .notify! string

    Renders a toast message at the bottom of the screen.

    -

    .system

    +

    .system

    Invokes a shell command and prints the result to the console.

    -

    .exec

    +

    .exec

    Invokes a shell command and returns a String that represents the result.

    -

    .save_state

    +

    .save_state

    Saves the game state to game_state.txt.

    -

    .load_state

    +

    .load_state

    Load args.state from game_state.txt.

    -

    .serialize_state file, state

    +

    .serialize_state file, state

    Saves entity state to a file. If only one parameter is provided a string is returned for state instead of writing to a file.

    -

    .deserialize_state file

    +

    .deserialize_state file

    Returns entity state from a file or serialization data represented as a String.

    -

    .reset_sprite path

    +

    .reset_sprite path

    Invalids the texture cache of a sprite.

    -

    .show_cursor

    +

    .show_cursor

    Shows the mouse cursor.

    -

    .hide_cursor

    +

    .hide_cursor

    Hides the mouse cursor.

    -

    .cursor_shown?

    +

    .cursor_shown?

    Returns true if the mouse cursor is shown.

    -

    .set_window_fullscreen enabled

    +

    .set_window_fullscreen enabled

    Sets the game to either fullscreen (enabled=true) or windowed (enabled=false).

    -

    .openurl url

    +

    .openurl url

    Opens a url using the Operating System's default browser.

    -

    .get_base_dir

    +

    .get_base_dir

    Returns the full path of the DragonRuby binary directory.

    -

    .get_game_dir

    +

    .get_game_dir

    Returns the full path of the game directory in its sandboxed environment.

    @@ -1869,11 +1912,11 @@ Assuming the array is an array of arrays, Given a block, each 2D array index inv puts occupied_tiles end -

    DOCS: Array#include_any?

    +

    DOCS: Array#include_any?

    Given a collection of items, the function will return true if any of self's items exists in the collection of items passed in:

    -

    DOCS: Array#any_intersect_rect?

    +

    DOCS: Array#any_intersect_rect?

    Assuming the array contains objects that respond to left, right, top, bottom, this method returns true if any of the elements within the array intersect the object being passed in. You are given an optional parameter called tolerance which informs how close to the other rectangles the elements need to be for it to be considered intersecting.

    @@ -2018,7 +2061,7 @@ end

    Rendering a solid using an Array with colors and alpha

    -The value for the color and alpha is an number between 0 and 255. The alpha property is optional and will be set to 255 if not specified. +The value for the color and alpha is a number between 0 and 255. The alpha property is optional and will be set to 255 if not specified.

    Creates a green solid rectangle with an opacity of 50%. @@ -2047,7 +2090,7 @@ end

    Rendering a solid using a Class

    -You can also create a class with solid/border properties and render it as a primitive. ALL properties must on the class. *Additionally*, a method called primitive_marker must be defined on the class. +You can also create a class with solid/border properties and render it as a primitive. ALL properties must be on the class. *Additionally*, a method called primitive_marker must be defined on the class.

    Here is an example: @@ -2100,6 +2143,93 @@ You have to use args.outputs.borders: args.outputs.borders << [100, 100, 160, 90] end +

    DOCS: GTK::Outputs#sprites

    +

    +Add primitives to this collection to render a sprite to the screen. +

    +

    Rendering a sprite using an Array

    +

    +Creates a sprite of a white circle located at 100, 100. 160 pixels wide and 90 pixels tall. +

    +
    def tick args
    +  #                         X    Y   WIDTH   HEIGHT                      PATH
    +  args.outputs.sprites << [100, 100,   160,     90, "sprites/circle/white.png]
    +end
    +
    +

    Rendering a sprite using an Array with colors and alpha

    +

    +The value for the color and alpha is a number between 0 and 255. The alpha property is optional and will be set to 255 if not specified. +

    +

    +Creates a green circle sprite with an opacity of 50%. +

    +
    def tick args
    +  #                         X    Y  WIDTH  HEIGHT           PATH                ANGLE  ALPHA  RED  GREEN  BLUE
    +  args.outputs.sprites << [100, 100,  160,     90, "sprites/circle/white.png",     0,    128,   0,   255,    0]
    +end
    +
    +

    Rendering a sprite using a Hash

    +

    +If you want a more readable invocation. You can use the following hash to create a sprite. Any parameters that are not specified will be given a default value. The keys of the hash can be provided in any order. +

    +
    def tick args
    +  args.outputs.sprites << {
    +    x:                             0,
    +    y:                             0,
    +    w:                           100,
    +    h:                           100,
    +    path: "sprites/circle/white.png",
    +    angle:                         0,
    +    a:                           255,
    +    r:                             0,
    +    g:                           255,
    +    b:                             0
    +  }
    +end
    +
    +

    Rendering a solid using a Class

    +

    +You can also create a class with solid/border properties and render it as a primitive. ALL properties must be on the class. *Additionally*, a method called primitive_marker must be defined on the class. +

    +

    +Here is an example: +

    +
    # Create type with ALL sprite properties AND primitive_marker
    +class Sprite
    +  attr_accessor :x, :y, :w, :h, :path, :angle, :angle_anchor_x, :angle_anchor_y,  :tile_x, :tile_y, :tile_w, :tile_h, :source_x, :source_y, :source_w, :source_h, :flip_horizontally, :flip_vertically, :a, :r, :g, :b
    +
    +  def primitive_marker
    +    :sprite
    +  end
    +end
    +
    +# Inherit from type
    +class Circle < Sprite
    +# constructor
    +  def initialize x, y, size, path
    +    self.x = x
    +    self.y = y
    +    self.w = size
    +    self.h = size
    +    self.path = path
    +  end
    +  def serlialize
    +    {x:self.x, y:self.y, w:self.w, h:self.h, path:self.path}
    +  end
    +
    +  def inspect
    +    serlialize.to_s
    +  end
    +
    +  def to_s
    +    serlialize.to_s
    +  end
    +end
    +def tick args
    +  # render circle sprite
    +  args.outputs.sprites  << Circle.new(10, 10, 32,"sprites/circle/white.png")
    +end
    +

    DOCS: GTK::Outputs#screenshots

    Add a hash to this collection to take a screenshot and save as png file. The keys of the hash can be provided in any order. @@ -2160,12 +2290,12 @@ The GTK::MousePoint has the following properties.

  • x: Integer representing the mouse's x.
  • y: Integer representing the mouse's y.
  • point: Array with the x and y values.
  • -
  • w: Width of the point that always returns 0 (included so that it can seemlessly work with GTK::Geometry functions).
  • -
  • h: Height of the point that always returns 0 (included so that it can seemlessly work with GTK::Geometry functions).
  • -
  • left: This value is the same as x (included so that it can seemlessly work with GTK::Geometry functions).
  • -
  • right: This value is the same as x (included so that it can seemlessly work with GTK::Geometry functions).
  • -
  • top: This value is the same as y (included so that it can seemlessly work with GTK::Geometry functions).
  • -
  • bottom: This value is the same as y (included so that it can seemlessly work with GTK::Geometry functions).
  • +
  • w: Width of the point that always returns 0 (included so that it can seamlessly work with GTK::Geometry functions).
  • +
  • h: Height of the point that always returns 0 (included so that it can seamlessly work with GTK::Geometry functions).
  • +
  • left: This value is the same as x (included so that it can seamlessly work with GTK::Geometry functions).
  • +
  • right: This value is the same as x (included so that it can seamlessly work with GTK::Geometry functions).
  • +
  • top: This value is the same as y (included so that it can seamlessly work with GTK::Geometry functions).
  • +
  • bottom: This value is the same as y (included so that it can seamlessly work with GTK::Geometry functions).
  • created_at: The tick (args.state.tick_count) that this structure was created.
  • global_created_at: The global tick (Kernel.global_tick_count) that this structure was created.
  • @@ -2322,7 +2452,7 @@ And here is an example where the override parameter is passed in: end end -

    DOCS: Numeric#elapsed?

    +

    DOCS: Numeric#elapsed?

    Returns true if Numeric#elapsed_time is greater than the number. An optional parameter can be passed into elapsed? which is added to the number before evaluating whether elapsed? is true.

    @@ -2386,7 +2516,7 @@ Example usage (with optional parameter): args.state.box_queue -= boxes_to_destroy end -

    DOCS: Numeric#created?

    +

    DOCS: Numeric#created?

    Returns true if Numeric#elapsed_time == 0. Essentially communicating that number is equal to the current frame.

    @@ -2455,7 +2585,7 @@ end Follows is a source code listing for all files that have been open sourced. This code can be found in the ./samples directory.

    Samples

    -

    Learn Ruby Optional - Beginner Ruby Primer - automation.rb

    +

    Learn Ruby Optional - Beginner Ruby Primer - automation.rb

    # ./samples/00_learn_ruby_optional/00_beginner_ruby_primer/app/automation.rb
     # ==========================================================================
     #  _    _ ________     __  _      _____  _____ _______ ______ _   _ _ _ _ _
    @@ -2579,7 +2709,7 @@ $gtk.schedule_callback 400 do
     end
     
     
    -

    Learn Ruby Optional - Beginner Ruby Primer - main.rb

    +

    Learn Ruby Optional - Beginner Ruby Primer - main.rb

    # ./samples/00_learn_ruby_optional/00_beginner_ruby_primer/app/main.rb
     # ==========================================================================
     #  _    _ ________     __  _      _____  _____ _______ ______ _   _ _ _ _ _
    @@ -2900,7 +3030,7 @@ def outputs
     end
     
     
    -

    Learn Ruby Optional - Intermediate Ruby Primer - printing.txt

    +

    Learn Ruby Optional - Intermediate Ruby Primer - printing.txt

    # ./samples/00_learn_ruby_optional/00_intermediate_ruby_primer/app/01_printing.txt
     # ====================================================================================
     # Commenting Code
    @@ -2935,7 +3065,7 @@ repl do
     end
     
     
    -

    Learn Ruby Optional - Intermediate Ruby Primer - strings.txt

    +

    Learn Ruby Optional - Intermediate Ruby Primer - strings.txt

    # ./samples/00_learn_ruby_optional/00_intermediate_ruby_primer/app/02_strings.txt
     # ====================================================================================
     #  Strings
    @@ -2954,7 +3084,7 @@ repl do
     end
     
     
    -

    Learn Ruby Optional - Intermediate Ruby Primer - numbers.txt

    +

    Learn Ruby Optional - Intermediate Ruby Primer - numbers.txt

    # ./samples/00_learn_ruby_optional/00_intermediate_ruby_primer/app/03_numbers.txt
     # ====================================================================================
     #  Numerics
    @@ -2979,7 +3109,7 @@ repl do
     end
     
     
    -

    Learn Ruby Optional - Intermediate Ruby Primer - booleans.txt

    +

    Learn Ruby Optional - Intermediate Ruby Primer - booleans.txt

    # ./samples/00_learn_ruby_optional/00_intermediate_ruby_primer/app/04_booleans.txt
     # ====================================================================================
     #  Booleans
    @@ -3015,7 +3145,7 @@ repl do
     end
     
     
    -

    Learn Ruby Optional - Intermediate Ruby Primer - conditionals.txt

    +

    Learn Ruby Optional - Intermediate Ruby Primer - conditionals.txt

    # ./samples/00_learn_ruby_optional/00_intermediate_ruby_primer/app/05_conditionals.txt
     # ====================================================================================
     #  Conditionals
    @@ -3133,7 +3263,7 @@ repl do
     end
     
     
    -

    Learn Ruby Optional - Intermediate Ruby Primer - looping.txt

    +

    Learn Ruby Optional - Intermediate Ruby Primer - looping.txt

    # ./samples/00_learn_ruby_optional/00_intermediate_ruby_primer/app/06_looping.txt
     # ====================================================================================
     #  Looping
    @@ -3192,7 +3322,7 @@ repl do
     end
     
     
    -

    Learn Ruby Optional - Intermediate Ruby Primer - functions.txt

    +

    Learn Ruby Optional - Intermediate Ruby Primer - functions.txt

    # ./samples/00_learn_ruby_optional/00_intermediate_ruby_primer/app/07_functions.txt
     # ====================================================================================
     # Functions
    @@ -3265,7 +3395,7 @@ repl do
     end
     
     
    -

    Learn Ruby Optional - Intermediate Ruby Primer - arrays.txt

    +

    Learn Ruby Optional - Intermediate Ruby Primer - arrays.txt

    # ./samples/00_learn_ruby_optional/00_intermediate_ruby_primer/app/08_arrays.txt
     # ====================================================================================
     # Arrays
    @@ -3479,14 +3609,14 @@ end
     # ====================================================================================
     
     
    -

    Learn Ruby Optional - Intermediate Ruby Primer - main.rb

    +

    Learn Ruby Optional - Intermediate Ruby Primer - main.rb

    # ./samples/00_learn_ruby_optional/00_intermediate_ruby_primer/app/main.rb
     def tick args
       args.outputs.labels << [640, 380, "Open repl.rb in the text editor of your choice and follow the document.", 0, 1]
     end
     
     
    -

    Rendering Basics - Labels - main.rb

    +

    Rendering Basics - Labels - main.rb

    # ./samples/01_rendering_basics/01_labels/app/main.rb
     =begin
     
    @@ -3557,7 +3687,7 @@ def tick args
                                    g: 0,
                                    b: 200,
                                    a: 255,
    -                               font: "manaspc.ttf" }.label
    +                               font: "manaspc.ttf" }.label!
     
       # Primitives can hold anything, and can be given a label in the following forms
       args.outputs.primitives << [690 + 150, 330 - 80, "Custom font (.primitives Array)", 0, 1, 125, 0, 200, 255, "manaspc.ttf" ].label
    @@ -3571,7 +3701,7 @@ def tick args
                                    g: 0,
                                    b: 200,
                                    a: 255,
    -                               font: "manaspc.ttf" }.label
    +                               font: "manaspc.ttf" }.label!
     end
     
     def tick_instructions args, text, y = 715
    @@ -3589,7 +3719,7 @@ def tick_instructions args, text, y = 715
     end
     
     
    -

    Rendering Basics - Lines - main.rb

    +

    Rendering Basics - Lines - main.rb

    # ./samples/01_rendering_basics/02_lines/app/main.rb
     =begin
     
    @@ -3647,7 +3777,7 @@ def tick_instructions args, text, y = 715
     end
     
     
    -

    Rendering Basics - Solids Borders - main.rb

    +

    Rendering Basics - Solids Borders - main.rb

    # ./samples/01_rendering_basics/03_solids_borders/app/main.rb
     =begin
     
    @@ -3717,7 +3847,7 @@ def tick_instructions args, text, y = 715
     end
     
     
    -

    Rendering Basics - Sprites - main.rb

    +

    Rendering Basics - Sprites - main.rb

    # ./samples/01_rendering_basics/04_sprites/app/main.rb
     =begin
     
    @@ -3764,7 +3894,7 @@ def tick_instructions args, text, y = 715
     end
     
     
    -

    Rendering Basics - Sounds - main.rb

    +

    Rendering Basics - Sounds - main.rb

    # ./samples/01_rendering_basics/05_sounds/app/main.rb
     =begin
     
    @@ -3799,1011 +3929,360 @@ def tick args
     end
     
     
    -

    Rendering Basics - Audio Mixer - main.rb

    -
    # ./samples/01_rendering_basics/06_audio_mixer/app/main.rb
    -$gtk.reset
    +

    Input Basics - Keyboard - main.rb

    +
    # ./samples/02_input_basics/01_keyboard/app/main.rb
    +=begin
     
    -$boxsize = 30
    +APIs listing that haven't been encountered in a previous sample apps:
     
    -def render_sources args
    -  mouse_in_panel = (args.state.selected != 0) && args.inputs.mouse.position.inside_rect?([900, 450, 340, 250])
    -  mouse_new_down = (args.state.mouse_held == 1)
    +- args.inputs.keyboard.key_up.KEY: The value of the properties will be set
    +  to the frame  that the key_up event occurred (the frame correlates
    +  to args.state.tick_count). Otherwise the value will be nil. For a
    +  full listing of keys, take a look at mygame/documentation/06-keyboard.md.
    +- args.state.PROPERTY: The state property on args is a dynamic
    +  structure. You can define ANY property here with ANY type of
    +  arbitrary nesting. Properties defined on args.state will be retained
    +  across frames. If you attempt access a property that doesn't exist
    +  on args.state, it will simply return nil (no exception will be thrown).
     
    -  if (mouse_new_down && !mouse_in_panel)
    -    args.state.selected = 0  # will reset below if we hit something.
    -  end
    +=end
     
    -  args.audio.keys.each { |k|
    -    s = args.audio[k]
    +# Along with outputs, inputs are also an essential part of video game development
    +# DragonRuby can take input from keyboards, mouse, and controllers.
    +# This sample app will cover keyboard input.
     
    -    if (mouse_new_down) && !mouse_in_panel && args.inputs.mouse.position.inside_rect?([s[:screenx], s[:screeny], $boxsize, $boxsize])
    -      args.state.selected = k
    -      args.state.dragging_source = true
    -    end
    +# args.inputs.keyboard.key_up.a will check to see if the a key has been pressed
    +# This will work with the other keys as well
     
    -    isselected = (k == args.state.selected)
     
    -    if isselected && args.state.dragging_source
    -      # you can hang anything on the audio hashes you want, so we store the
    -      #  actual screen position so it doesn't scale weirdly vs your mouse.
    -      s[:screenx] = args.inputs.mouse.x - ($boxsize / 2)
    -      s[:screeny] = args.inputs.mouse.y - ($boxsize / 2)
    +def tick args
    +  tick_instructions args, "Sample app shows how keyboard events are registered and accessed.", 360
    +  # Notice how small_font accounts for all the remaining parameters
    +  args.outputs.labels << { x: 460, y: row_to_px(args, 0), text: "Current game time: #{args.state.tick_count}", size_enum: -1 }
    +  args.outputs.labels << { x: 460, y: row_to_px(args, 2), text: "Keyboard input: args.inputs.keyboard.key_up.h", size_enum: -1 }
    +  args.outputs.labels << { x: 460, y: row_to_px(args, 3), text: "Press \"h\" on the keyboard.", size_enum: -1 }
    +
    +  # Input on a specifc key can be found through args.inputs.keyboard.key_up followed by the key
    +  if args.inputs.keyboard.key_up.h
    +    args.state.h_pressed_at = args.state.tick_count
    +  end
     
    -      s[:screeny] = 50 if s[:screeny] < 50
    -      s[:screeny] = (719 - $boxsize) if s[:screeny] > (719 - $boxsize)
    -      s[:screenx] = 0 if s[:screenx] < 0
    -      s[:screenx] = (1279 - $boxsize) if s[:screenx] > (1279 - $boxsize)
    +  # This code simplifies to if args.state.h_pressed_at has not been initialized, set it to false
    +  args.state.h_pressed_at ||= false
     
    -      s[:x] = ((s[:screenx] / 1279.0) * 2.0) - 1.0  # scale to -1.0 - 1.0 range
    -      s[:y] = ((s[:screeny] / 719.0) * 2.0) - 1.0   # scale to -1.0 - 1.0 range
    -    end
    +  if args.state.h_pressed_at
    +    args.outputs.labels << { x: 460, y: row_to_px(args, 4), text: "\"h\" was pressed at time: #{args.state.h_pressed_at}", size_enum: -1 }
    +  else
    +    args.outputs.labels << { x: 460, y: row_to_px(args, 4), text: "\"h\" has never been pressed.", size_enum: -1 }
    +  end
     
    -    color = isselected ? [ 0, 255, 0, 255 ] : [ 0, 0, 255, 255 ]
    -    args.outputs.primitives << [s[:screenx], s[:screeny], $boxsize, $boxsize, *color].solid
    -  }
    +  tick_help_text args
     end
     
    -def render_panel args
    -  s = args.audio[args.state.selected]
    -  return if s.nil?
    -  mouse_down = (args.state.mouse_held > 0)
    -
    -  args.outputs.primitives << [900, 450, 340, 250, 127, 127, 200, 255].solid
    -  args.outputs.primitives << [1075, 690, "Source ##{args.state.selected}", 3, 1, 255, 255, 255].label
    -  args.outputs.primitives << [910, 660, 1230, 660, 255, 255, 255].line
    -  args.outputs.primitives << [910, 650, "screen:    (#{s[:screenx].to_i}, #{s[:screeny].to_i})", 0, 0, 255, 255, 255].label
    -  args.outputs.primitives << [910, 625, "position:  (#{s[:x].round(5).to_s[0..6]}, #{s[:y].round(5).to_s[0..6]})", 0, 0, 255, 255, 255].label
    +def row_to_px args, row_number, y_offset = 20
    +  # This takes a row_number and converts it to pixels DragonRuby understands.
    +  # Row 0 starts 5 units below the top of the grid
    +  # Each row afterward is 20 units lower
    +  args.grid.top - 5 - (y_offset * row_number)
    +end
     
    -  slider = [1022, 586, 200, 7]
    -  if mouse_down && args.inputs.mouse.position.inside_rect?(slider)
    -    s[:pitch] = ((args.inputs.mouse.x - slider[0]).to_f / (slider[2]-1.0)) * 2.0
    -  end
    -  slidercolor = (s[:pitch] / 2.0) * 255
    -  args.outputs.primitives << [*slider, slidercolor, slidercolor, slidercolor, 255].solid
    -  args.outputs.primitives << [910, 600, "pitch: #{s[:pitch].round(3).to_s[0..2]}", 0, 0, 255, 255, 255].label
    +# Don't worry about understanding the code within this method just yet.
    +# This method shows you the help text within the game.
    +def tick_help_text args
    +  return unless args.state.h_pressed_at
     
    -  slider = [1022, 561, 200, 7]
    -  if mouse_down && args.inputs.mouse.position.inside_rect?(slider)
    -    s[:gain] = (args.inputs.mouse.x - slider[0]).to_f / (slider[2]-1.0)
    -  end
    -  slidercolor = s[:gain] * 255
    -  args.outputs.primitives << [*slider, slidercolor, slidercolor, slidercolor, 255].solid
    -  args.outputs.primitives << [910, 575, "gain: #{s[:gain].round(3).to_s[0..2]}", 0, 0, 255, 255, 255].label
    +  args.state.key_value_history      ||= {}
    +  args.state.key_down_value_history ||= {}
    +  args.state.key_held_value_history ||= {}
    +  args.state.key_up_value_history   ||= {}
     
    -  checkbox = [1022, 533, 10, 12]
    -  if (args.state.mouse_held == 1) && args.inputs.mouse.position.inside_rect?(checkbox)
    -    s[:looping] = !s[:looping]
    +  if (args.inputs.keyboard.key_down.truthy_keys.length > 0 ||
    +      args.inputs.keyboard.key_held.truthy_keys.length > 0 ||
    +      args.inputs.keyboard.key_up.truthy_keys.length > 0)
    +    args.state.help_available = true
    +    args.state.no_activity_debounce = nil
    +  else
    +    args.state.no_activity_debounce ||= 5.seconds
    +    args.state.no_activity_debounce -= 1
    +    if args.state.no_activity_debounce <= 0
    +      args.state.help_available = false
    +      args.state.key_value_history        = {}
    +      args.state.key_down_value_history   = {}
    +      args.state.key_held_value_history   = {}
    +      args.state.key_up_value_history     = {}
    +    end
       end
    -  checkboxcolor = s[:looping] ? 255 : 0
    -  args.outputs.primitives << [*checkbox, checkboxcolor, checkboxcolor, checkboxcolor, 255].solid
    -  args.outputs.primitives << [910, 550, "looping:", 0, 0, 255, 255, 255].label
     
    -  checkbox = [1022, 508, 10, 12]
    -  if (args.state.mouse_held == 1) && args.inputs.mouse.position.inside_rect?(checkbox)
    -    s[:paused] = !s[:paused]
    -  end
    -  checkboxcolor = s[:paused] ? 255 : 0
    -  args.outputs.primitives << [*checkbox, checkboxcolor, checkboxcolor, checkboxcolor, 255].solid
    -  args.outputs.primitives << [910, 525, "paused:", 0, 0, 255, 255, 255].label
    +  args.outputs.labels << { x: 10, y: row_to_px(args, 6), text: "This is the api for the keys you've pressed:", size_enum: -1, r: 180 }
     
    -  button = [910, 460, 320, 20]
    -  if (args.state.mouse_held == 1) && args.inputs.mouse.position.inside_rect?(button)
    -    args.audio.delete(args.state.selected)
    -    args.state.selected = 0
    +  if !args.state.help_available
    +    args.outputs.labels << [10, row_to_px(args, 7),  "Press a key and I'll show code to access the key and what value will be returned if you used the code.", small_font]
    +    return
       end
    -  args.outputs.primitives << [*button, 255, 0, 0, 255].solid
    -  args.outputs.primitives << [button[0] + (button[2] / 2), button[1]+20, "DELETE SOURCE", 0, 1, 255, 255, 0].label
    -end
     
    -def spawn_new_sound args, num
    -  input = nil
    -  input = "sounds/#{num}.#{(num == 6) ? 'ogg' : 'wav'}"
    +  args.outputs.labels << { x: 10 , y: row_to_px(args, 7), text: "args.inputs.keyboard",          size_enum: -2 }
    +  args.outputs.labels << { x: 330, y: row_to_px(args, 7), text: "args.inputs.keyboard.key_down", size_enum: -2 }
    +  args.outputs.labels << { x: 650, y: row_to_px(args, 7), text: "args.inputs.keyboard.key_held", size_enum: -2 }
    +  args.outputs.labels << { x: 990, y: row_to_px(args, 7), text: "args.inputs.keyboard.key_up",   size_enum: -2 }
     
    -  # Spawn randomly in an area that won't be covered by UI.
    -  screenx = (rand * 600.0) + 200.0
    -  screeny = (rand * 400.0) + 100.0
    +  fill_history args, :key_value_history,      :down_or_held, nil
    +  fill_history args, :key_down_value_history, :down,        :key_down
    +  fill_history args, :key_held_value_history, :held,        :key_held
    +  fill_history args, :key_up_value_history,   :up,          :key_up
     
    -  args.state.next_sound_index += 1
    +  render_help_labels args, :key_value_history,      :down_or_held, nil,      10
    +  render_help_labels args, :key_down_value_history, :down,        :key_down, 330
    +  render_help_labels args, :key_held_value_history, :held,        :key_held, 650
    +  render_help_labels args, :key_up_value_history,   :up,          :key_up,   990
    +end
     
    -  # you can hang anything on the audio hashes you want, so we store the
    -  #  actual screen position in here for convenience.
    -  args.audio[args.state.next_sound_index] = {
    -    input: input,
    -    screenx: screenx,
    -    screeny: screeny,
    -    x: ((screenx / 1279.0) * 2.0) - 1.0,  # scale to -1.0 - 1.0 range
    -    y: ((screeny / 719.0) * 2.0) - 1.0,   # scale to -1.0 - 1.0 range
    -    z: 0.0,
    -    gain: 1.0,
    -    pitch: 1.0,
    -    looping: true,
    -    paused: false
    -  }
    +def fill_history args, history_key, state_key, keyboard_method
    +  fill_single_history args, history_key, state_key, keyboard_method, :raw_key
    +  fill_single_history args, history_key, state_key, keyboard_method, :char
    +  args.inputs.keyboard.keys[state_key].each do |key_name|
    +    fill_single_history args, history_key, state_key, keyboard_method, key_name
    +  end
    +end
     
    -  args.state.selected = args.state.next_sound_index
    +def fill_single_history args, history_key, state_key, keyboard_method, key_name
    +  current_value = args.inputs.keyboard.send(key_name)
    +  if keyboard_method
    +    current_value = args.inputs.keyboard.send(keyboard_method).send(key_name)
    +  end
    +  args.state.as_hash[history_key][key_name] ||= []
    +  args.state.as_hash[history_key][key_name] << current_value
    +  args.state.as_hash[history_key][key_name] = args.state.as_hash[history_key][key_name].reverse.uniq.take(3).reverse
     end
     
    -def render_launcher args
    -  total = 6
    -  x = (1280 - (total * $boxsize * 3)) / 2
    -  y = 10
    -  args.outputs.primitives << [0, 0, 1280, ((y*2) + $boxsize), 127, 127, 127, 255].solid
    -  for i in 1..total
    -    args.outputs.primitives << [x, y, $boxsize, $boxsize, 255, 255, 255, 255].solid
    -    args.outputs.primitives << [x+8, y+28, i.to_s, 3, 0, 0, 0, 255, 255].label
    -    if args.inputs.mouse.click && args.inputs.mouse.click.point.inside_rect?([x, y, $boxsize, $boxsize])
    -      spawn_new_sound args, i
    +def render_help_labels args, history_key, state_key, keyboard_method, x
    +  idx = 8
    +  args.outputs.labels << args.state
    +                           .as_hash[history_key]
    +                           .keys
    +                           .reverse
    +                           .map
    +                           .with_index do |k, i|
    +    v = args.state.as_hash[history_key][k]
    +    current_value = args.inputs.keyboard.send(k)
    +    if keyboard_method
    +      current_value = args.inputs.keyboard.send(keyboard_method).send(k)
         end
    -    x = x + ($boxsize * 3)
    +    idx += 2
    +    [
    +      { x: x, y: row_to_px(args, idx + 0, 16), text: "    .#{k} is #{current_value || "nil"}", size_enum: -2 },
    +      { x: x, y: row_to_px(args, idx + 1, 16), text: "       was #{v}", size_enum: -2 }
    +    ]
       end
     end
     
    -def render_ui args
    -  render_launcher args
    -  render_panel args
    +
    +def tick_instructions args, text, y = 715
    +  return if args.state.key_event_occurred
    +  if args.inputs.mouse.click ||
    +     args.inputs.keyboard.directional_vector ||
    +     args.inputs.keyboard.key_down.enter ||
    +     args.inputs.keyboard.key_down.escape
    +    args.state.key_event_occurred = true
    +  end
    +
    +  args.outputs.debug << { x: 0,   y: y - 50, w: 1280, h: 60 }.solid!
    +  args.outputs.debug << { x: 640, y: y,      text: text,
    +                          size_enum: 1, alignment_enum: 1, r: 255, g: 255, b: 255 }.label!
    +  args.outputs.debug << { x: 640, y: y - 25, text: "(click to dismiss instructions)",
    +                          size_enum: -2, alignment_enum: 1, r: 255, g: 255, b: 255 }.label!
     end
     
    +
    +

    Input Basics - Moving A Sprite - main.rb

    +
    # ./samples/02_input_basics/01_moving_a_sprite/app/main.rb
     def tick args
    -  args.state.mouse_held ||= 0
    -  args.state.dragging_source ||= false
    -  args.state.selected ||= 0
    -  args.state.next_sound_index ||= 0
    +  # create a player and set default values
    +  # for the player's x, y, w (width), and h (height)
    +  args.state.player.x ||= 100
    +  args.state.player.y ||= 100
    +  args.state.player.w ||=  50
    +  args.state.player.h ||=  50
     
    -  if args.inputs.mouse.up
    -    args.state.mouse_held = 0
    -    args.state.dragging_source = false
    -  elsif args.inputs.mouse.down || (args.state.mouse_held > 0)
    -    args.state.mouse_held += 1
    -  else
    +  # render the player to the screen
    +  args.outputs.sprites << { x: args.state.player.x,
    +                            y: args.state.player.y,
    +                            w: args.state.player.w,
    +                            h: args.state.player.h,
    +                            path: 'sprites/square/green.png' }
    +
    +  # move the player around using the keyboard
    +  if args.inputs.up
    +    args.state.player.y += 10
    +  elsif args.inputs.down
    +    args.state.player.y -= 10
       end
     
    -  args.outputs.background_color = [ 0, 0, 0, 255 ]
    -  render_sources args
    -  render_ui args
    +  if args.inputs.left
    +    args.state.player.x -= 10
    +  elsif args.inputs.right
    +    args.state.player.x += 10
    +  end
     end
     
    +$gtk.reset
    +
     
    -

    Rendering Basics - Sound Synthesis - main.rb

    -
    # ./samples/01_rendering_basics/07_sound_synthesis/app/main.rb
    -begin # region: top level tick methods
    -  def tick args
    -    defaults args
    -    render args
    -    input args
    -    process_audio_queue args
    -  end
    +

    Input Basics - Mouse - main.rb

    +
    # ./samples/02_input_basics/02_mouse/app/main.rb
    +=begin
     
    -  def defaults args
    -    args.state.sine_waves      ||= {}
    -    args.state.square_waves    ||= {}
    -    args.state.saw_tooth_waves ||= {}
    -    args.state.triangle_waves  ||= {}
    -    args.state.audio_queue     ||= []
    -    args.state.buttons         ||= [
    -      (frequency_buttons args),
    -      (sine_wave_note_buttons args),
    -      (bell_buttons args),
    -      (square_wave_note_buttons args),
    -      (saw_tooth_wave_note_buttons args),
    -      (triangle_wave_note_buttons args),
    -    ].flatten
    -  end
    +APIs that haven't been encountered in a previous sample apps:
     
    -  def render args
    -    args.outputs.borders << args.state.buttons.map { |b| b[:border] }
    -    args.outputs.labels  << args.state.buttons.map { |b| b[:label]  }
    -    args.outputs.labels  << args.layout
    -                              .rect(row: 0, col: 11.5)
    -                              .yield_self { |r| r.merge y: r.y + r.h }
    -                              .merge(text: "This is a Pro only feature. Click here to watch the YouTube video if you are on the Standard License.",
    -                                     alignment_enum: 1)
    -  end
    +- args.inputs.mouse.click: This property will be set if the mouse was clicked.
    +- args.inputs.mouse.click.point.(x|y): The x and y location of the mouse.
    +- args.inputs.mouse.click.point.created_at: The frame the mouse click occurred in.
    +- args.inputs.mouse.click.point.created_at_elapsed: How many frames have passed
    +  since the click event.
     
    +Reminder:
     
    -  def input args
    -    args.state.buttons.each do |b|
    -      if args.inputs.mouse.click && (args.inputs.mouse.click.inside_rect? b[:rect])
    -        parameter_string = (b.slice :frequency, :note, :octave).map { |k, v| "#{k}: #{v}" }.join ", "
    -        args.gtk.notify! "#{b[:method_to_call]} #{parameter_string}"
    -        send b[:method_to_call], args, b
    -      end
    -    end
    +- args.state.PROPERTY: The state property on args is a dynamic
    +  structure. You can define ANY property here with ANY type of
    +  arbitrary nesting. Properties defined on args.state will be retained
    +  across frames. If you attempt access a property that doesn't exist
    +  on args.state, it will simply return nil (no exception will be thrown).
     
    -    if args.inputs.mouse.click && (args.inputs.mouse.click.inside_rect? (args.layout.rect(row: 0).yield_self { |r| r.merge y: r.y + r.h.half, h: r.h.half }))
    -      args.gtk.openurl 'https://www.youtube.com/watch?v=zEzovM5jT-k&ab_channel=AmirRajan'
    -    end
    -  end
    +=end
     
    -  def process_audio_queue args
    -    to_queue = args.state.audio_queue.find_all { |v| v[:queue_at] <= args.tick_count }
    -    args.state.audio_queue -= to_queue
    -    to_queue.each { |a| args.audio[a[:id]] = a }
    +# This code demonstrates DragonRuby mouse input
     
    -    args.audio.find_all { |k, v| v[:decay_rate] }
    -      .each     { |k, v| v[:gain] -= v[:decay_rate] }
    +# To see if the a mouse click occurred
    +# Use args.inputs.mouse.click
    +# Which returns a boolean
     
    -    sounds_to_stop = args.audio
    -                       .find_all { |k, v| v[:stop_at] && args.state.tick_count >= v[:stop_at] }
    -                       .map { |k, v| k }
    +# To see where a mouse click occurred
    +# Use args.inputs.mouse.click.point.x AND
    +# args.inputs.mouse.click.point.y
     
    -    sounds_to_stop.each { |k| args.audio.delete k }
    -  end
    -end
    +# To see which frame the click occurred
    +# Use args.inputs.mouse.click.created_at
     
    -begin # region: button definitions, ui layout, callback functions
    -  def button args, opts
    -    button_def = opts.merge rect: (args.layout.rect (opts.merge w: 2, h: 1))
    +# To see how many frames its been since the click occurred
    +# Use args.inputs.mouse.click.creat_at_elapsed
     
    -    button_def[:border] = button_def[:rect].merge r: 0, g: 0, b: 0
    +# Saving the click in args.state can be quite useful
     
    -    label_offset_x = 5
    -    label_offset_y = 30
    +def tick args
    +  tick_instructions args, "Sample app shows how mouse events are registered and how to measure elapsed time."
    +  x = 460
     
    -    button_def[:label]  = button_def[:rect].merge text: opts[:text],
    -                                                  size_enum: -2.5,
    -                                                  x: button_def[:rect].x + label_offset_x,
    -                                                  y: button_def[:rect].y + label_offset_y
    +  args.outputs.labels << small_label(args, x, 11, "Mouse input: args.inputs.mouse")
     
    -    button_def
    +  if args.inputs.mouse.click
    +    args.state.last_mouse_click = args.inputs.mouse.click
       end
     
    -  def play_sine_wave args, sender
    -    queue_sine_wave args,
    -                    frequency: sender[:frequency],
    -                    duration: 1.seconds,
    -                    fade_out: true
    +  if args.state.last_mouse_click
    +    click = args.state.last_mouse_click
    +    args.outputs.labels << small_label(args, x, 12, "Mouse click happened at: #{click.created_at}")
    +    args.outputs.labels << small_label(args, x, 13, "Mouse clicked #{click.created_at_elapsed} ticks ago")
    +    args.outputs.labels << small_label(args, x, 14, "Mouse click location: #{click.point.x}, #{click.point.y}")
    +  else
    +    args.outputs.labels << small_label(args, x, 12, "Mouse click has not occurred yet.")
    +    args.outputs.labels << small_label(args, x, 13, "Please click mouse.")
       end
    +end
     
    -  def play_note args, sender
    -    method_to_call = :queue_sine_wave
    -    method_to_call = :queue_square_wave    if sender[:type] == :square
    -    method_to_call = :queue_saw_tooth_wave if sender[:type] == :saw_tooth
    -    method_to_call = :queue_triangle_wave  if sender[:type] == :triangle
    -    method_to_call = :queue_bell           if sender[:type] == :bell
    +def small_label args, x, row, message
    +  # This method effectively combines the row_to_px and small_font methods
    +  # It changes the given row value to a DragonRuby pixel value
    +  # and adds the customization parameters
    +  { x: x, y: row_to_px(args, row), text: message, alignment_enum: -2 }
    +end
     
    -    send method_to_call, args,
    -         frequency: (frequency_for note: sender[:note], octave: sender[:octave]),
    -         duration: 1.seconds,
    -         fade_out: true
    +def row_to_px args, row_number
    +  args.grid.top.shift_down(5).shift_down(20 * row_number)
    +end
    +
    +def tick_instructions args, text, y = 715
    +  return if args.state.key_event_occurred
    +  if args.inputs.mouse.click ||
    +     args.inputs.keyboard.directional_vector ||
    +     args.inputs.keyboard.key_down.enter ||
    +     args.inputs.keyboard.key_down.escape
    +    args.state.key_event_occurred = true
       end
     
    -  def frequency_buttons args
    -    [
    -      (button args,
    -              row: 4.0, col: 0, text: "300hz",
    -              frequency: 300,
    -              method_to_call: :play_sine_wave),
    -      (button args,
    -              row: 5.0, col: 0, text: "400hz",
    -              frequency: 400,
    -              method_to_call: :play_sine_wave),
    -      (button args,
    -              row: 6.0, col: 0, text: "500hz",
    -              frequency: 500,
    -              method_to_call: :play_sine_wave),
    -    ]
    +  args.outputs.debug << { x: 0,   y: y - 50, w: 1280, h: 60 }.solid!
    +  args.outputs.debug << { x: 640, y: y, text: text, size_enum: 1, alignment_enum: 1, r: 255, g: 255, b: 255 }.label!
    +  args.outputs.debug << { x: 640, y: y - 25, text: "(click to dismiss instructions)", size_enum: -2, alignment_enum: 1, r: 255, g: 255, b: 255 }.label!
    +end
    +
    +
    +

    Input Basics - Mouse Point To Rect - main.rb

    +
    # ./samples/02_input_basics/03_mouse_point_to_rect/app/main.rb
    +=begin
    +
    +APIs that haven't been encountered in a previous sample apps:
    +
    +- args.outputus.borders: An array. Values in this array will be rendered as
    +  unfilled rectangles on the screen.
    +- ARRAY#inside_rect?: An array with at least two values is considered a point. An array
    +  with at least four values is considered a rect. The inside_rect? function returns true
    +  or false depending on if the point is inside the rect.
    +
    +  ```
    +  # Point:  x: 100, y: 100
    +  # Rect:   x: 0, y: 0, w: 500, h: 500
    +  # Result: true
    +
    +  [100, 100].inside_rect? [0, 0, 500, 500]
    +  ```
    +
    +  ```
    +  # Point:  x: 100, y: 100
    +  # Rect:   x: 300, y: 300, w: 100, h: 100
    +  # Result: false
    +
    +  [100, 100].inside_rect? [300, 300, 100, 100]
    +  ```
    +
    +- args.inputs.mouse.click.point.created_at: The frame the mouse click occurred in.
    +- args.inputs.mouse.click.point.created_at_elapsed: How many frames have passed
    +  since the click event.
    +
    +=end
    +
    +# To determine whether a point is in a rect
    +# Use point.inside_rect? rect
    +
    +# This is useful to determine if a click occurred in a rect
    +
    +def tick args
    +  tick_instructions args, "Sample app shows how to determing if a click happened inside a rectangle."
    +
    +  x = 460
    +
    +  args.outputs.labels << small_label(args, x, 15, "Click inside the blue box maybe ---->")
    +
    +  box = { x: 785, y: 370, w: 50, h: 50, r: 0, g: 0, b: 170 }
    +  args.outputs.borders << box
    +
    +  # Saves the most recent click into args.state
    +  # Unlike the other components of args,
    +  # args.state does not reset every tick.
    +  if args.inputs.mouse.click
    +    args.state.last_mouse_click = args.inputs.mouse.click
       end
     
    -  def sine_wave_note_buttons args
    -    [
    -      (button args,
    -              row: 1.5, col: 2, text: "Sine C4",
    -              note: :c, octave: 4, type: :sine, method_to_call: :play_note),
    -      (button args,
    -              row: 2.5, col: 2, text: "Sine D4",
    -              note: :d, octave: 4, type: :sine, method_to_call: :play_note),
    -      (button args,
    -              row: 3.5, col: 2, text: "Sine E4",
    -              note: :e, octave: 4, type: :sine, method_to_call: :play_note),
    -      (button args,
    -              row: 4.5, col: 2, text: "Sine F4",
    -              note: :f, octave: 4, type: :sine, method_to_call: :play_note),
    -      (button args,
    -              row: 5.5, col: 2, text: "Sine G4",
    -              note: :g, octave: 4, type: :sine, method_to_call: :play_note),
    -      (button args,
    -              row: 6.5, col: 2, text: "Sine A5",
    -              note: :a, octave: 5, type: :sine, method_to_call: :play_note),
    -      (button args,
    -              row: 7.5, col: 2, text: "Sine B5",
    -              note: :b, octave: 5, type: :sine, method_to_call: :play_note),
    -      (button args,
    -              row: 8.5, col: 2, text: "Sine C5",
    -              note: :c, octave: 5, type: :sine, method_to_call: :play_note),
    -    ]
    +  if args.state.last_mouse_click
    +    if args.state.last_mouse_click.point.inside_rect? box
    +      args.outputs.labels << small_label(args, x, 16, "Mouse click happened *inside* the box.")
    +    else
    +      args.outputs.labels << small_label(args, x, 16, "Mouse click happened *outside* the box.")
    +    end
    +  else
    +    args.outputs.labels << small_label(args, x, 16, "Mouse click has not occurred yet.")
       end
    -
    -  def square_wave_note_buttons args
    -    [
    -      (button args,
    -              row: 1.5, col: 6, text: "Square C4",
    -              note: :c, octave: 4, type: :square, method_to_call: :play_note),
    -      (button args,
    -              row: 2.5, col: 6, text: "Square D4",
    -              note: :d, octave: 4, type: :square, method_to_call: :play_note),
    -      (button args,
    -              row: 3.5, col: 6, text: "Square E4",
    -              note: :e, octave: 4, type: :square, method_to_call: :play_note),
    -      (button args,
    -              row: 4.5, col: 6, text: "Square F4",
    -              note: :f, octave: 4, type: :square, method_to_call: :play_note),
    -      (button args,
    -              row: 5.5, col: 6, text: "Square G4",
    -              note: :g, octave: 4, type: :square, method_to_call: :play_note),
    -      (button args,
    -              row: 6.5, col: 6, text: "Square A5",
    -              note: :a, octave: 5, type: :square, method_to_call: :play_note),
    -      (button args,
    -              row: 7.5, col: 6, text: "Square B5",
    -              note: :b, octave: 5, type: :square, method_to_call: :play_note),
    -      (button args,
    -              row: 8.5, col: 6, text: "Square C5",
    -              note: :c, octave: 5, type: :square, method_to_call: :play_note),
    -    ]
    -  end
    -  def saw_tooth_wave_note_buttons args
    -    [
    -      (button args,
    -              row: 1.5, col: 8, text: "Saw C4",
    -              note: :c, octave: 4, type: :saw_tooth, method_to_call: :play_note),
    -      (button args,
    -              row: 2.5, col: 8, text: "Saw D4",
    -              note: :d, octave: 4, type: :saw_tooth, method_to_call: :play_note),
    -      (button args,
    -              row: 3.5, col: 8, text: "Saw E4",
    -              note: :e, octave: 4, type: :saw_tooth, method_to_call: :play_note),
    -      (button args,
    -              row: 4.5, col: 8, text: "Saw F4",
    -              note: :f, octave: 4, type: :saw_tooth, method_to_call: :play_note),
    -      (button args,
    -              row: 5.5, col: 8, text: "Saw G4",
    -              note: :g, octave: 4, type: :saw_tooth, method_to_call: :play_note),
    -      (button args,
    -              row: 6.5, col: 8, text: "Saw A5",
    -              note: :a, octave: 5, type: :saw_tooth, method_to_call: :play_note),
    -      (button args,
    -              row: 7.5, col: 8, text: "Saw B5",
    -              note: :b, octave: 5, type: :saw_tooth, method_to_call: :play_note),
    -      (button args,
    -              row: 8.5, col: 8, text: "Saw C5",
    -              note: :c, octave: 5, type: :saw_tooth, method_to_call: :play_note),
    -    ]
    -  end
    -
    -  def triangle_wave_note_buttons args
    -    [
    -      (button args,
    -              row: 1.5, col: 10, text: "Triangle C4",
    -              note: :c, octave: 4, type: :triangle, method_to_call: :play_note),
    -      (button args,
    -              row: 2.5, col: 10, text: "Triangle D4",
    -              note: :d, octave: 4, type: :triangle, method_to_call: :play_note),
    -      (button args,
    -              row: 3.5, col: 10, text: "Triangle E4",
    -              note: :e, octave: 4, type: :triangle, method_to_call: :play_note),
    -      (button args,
    -              row: 4.5, col: 10, text: "Triangle F4",
    -              note: :f, octave: 4, type: :triangle, method_to_call: :play_note),
    -      (button args,
    -              row: 5.5, col: 10, text: "Triangle G4",
    -              note: :g, octave: 4, type: :triangle, method_to_call: :play_note),
    -      (button args,
    -              row: 6.5, col: 10, text: "Triangle A5",
    -              note: :a, octave: 5, type: :triangle, method_to_call: :play_note),
    -      (button args,
    -              row: 7.5, col: 10, text: "Triangle B5",
    -              note: :b, octave: 5, type: :triangle, method_to_call: :play_note),
    -      (button args,
    -              row: 8.5, col: 10, text: "Triangle C5",
    -              note: :c, octave: 5, type: :triangle, method_to_call: :play_note),
    -    ]
    -  end
    -
    -  def bell_buttons args
    -    [
    -      (button args,
    -              row: 1.5, col: 4, text: "Bell C4",
    -              note: :c, octave: 4, type: :bell, method_to_call: :play_note),
    -      (button args,
    -              row: 2.5, col: 4, text: "Bell D4",
    -              note: :d, octave: 4, type: :bell, method_to_call: :play_note),
    -      (button args,
    -              row: 3.5, col: 4, text: "Bell E4",
    -              note: :e, octave: 4, type: :bell, method_to_call: :play_note),
    -      (button args,
    -              row: 4.5, col: 4, text: "Bell F4",
    -              note: :f, octave: 4, type: :bell, method_to_call: :play_note),
    -      (button args,
    -              row: 5.5, col: 4, text: "Bell G4",
    -              note: :g, octave: 4, type: :bell, method_to_call: :play_note),
    -      (button args,
    -              row: 6.5, col: 4, text: "Bell A5",
    -              note: :a, octave: 5, type: :bell, method_to_call: :play_note),
    -      (button args,
    -              row: 7.5, col: 4, text: "Bell B5",
    -              note: :b, octave: 5, type: :bell, method_to_call: :play_note),
    -      (button args,
    -              row: 8.5, col: 4, text: "Bell C5",
    -              note: :c, octave: 5, type: :bell, method_to_call: :play_note),
    -    ]
    -  end
    -end
    -
    -begin # region: wave generation
    -  begin # sine wave
    -    def defaults_sine_wave_for
    -      { frequency: 440, sample_rate: 48000 }
    -    end
    -
    -    def sine_wave_for opts = {}
    -      opts = defaults_sine_wave_for.merge opts
    -      frequency   = opts[:frequency]
    -      sample_rate = opts[:sample_rate]
    -      period_size = (sample_rate.fdiv frequency).ceil
    -      period_size.map_with_index do |i|
    -        Math::sin((2.0 * Math::PI) / (sample_rate.to_f / frequency.to_f) * i)
    -      end.to_a
    -    end
    -
    -    def defaults_queue_sine_wave
    -      { frequency: 440, duration: 60, gain: 1.0, fade_out: false, queue_in: 0 }
    -    end
    -
    -    def queue_sine_wave args, opts = {}
    -      opts        = defaults_queue_sine_wave.merge opts
    -      frequency   = opts[:frequency]
    -      sample_rate = 48000
    -
    -      sine_wave = sine_wave_for frequency: frequency, sample_rate: sample_rate
    -      args.state.sine_waves[frequency] ||= sine_wave_for frequency: frequency, sample_rate: sample_rate
    -
    -      proc = lambda do
    -        generate_audio_data args.state.sine_waves[frequency], sample_rate
    -      end
    -
    -      audio_state = new_audio_state args, opts
    -      audio_state[:input] = [1, sample_rate, proc]
    -      queue_audio args, audio_state: audio_state, wave: sine_wave
    -    end
    -  end
    -
    -  begin # region: square wave
    -    def defaults_square_wave_for
    -      { frequency: 440, sample_rate: 48000 }
    -    end
    -
    -    def square_wave_for opts = {}
    -      opts = defaults_square_wave_for.merge opts
    -      sine_wave = sine_wave_for opts
    -      sine_wave.map do |v|
    -        if v >= 0
    -          1.0
    -        else
    -          -1.0
    -        end
    -      end.to_a
    -    end
    -
    -    def defaults_queue_square_wave
    -      { frequency: 440, duration: 60, gain: 0.3, fade_out: false, queue_in: 0 }
    -    end
    -
    -    def queue_square_wave args, opts = {}
    -      opts        = defaults_queue_square_wave.merge opts
    -      frequency   = opts[:frequency]
    -      sample_rate = 48000
    -
    -      square_wave = square_wave_for frequency: frequency, sample_rate: sample_rate
    -      args.state.square_waves[frequency] ||= square_wave_for frequency: frequency, sample_rate: sample_rate
    -
    -      proc = lambda do
    -        generate_audio_data args.state.square_waves[frequency], sample_rate
    -      end
    -
    -      audio_state = new_audio_state args, opts
    -      audio_state[:input] = [1, sample_rate, proc]
    -      queue_audio args, audio_state: audio_state, wave: square_wave
    -    end
    -  end
    -
    -  begin # region: saw tooth wave
    -    def defaults_saw_tooth_wave_for
    -      { frequency: 440, sample_rate: 48000 }
    -    end
    -
    -    def saw_tooth_wave_for opts = {}
    -      opts = defaults_saw_tooth_wave_for.merge opts
    -      sine_wave = sine_wave_for opts
    -      period_size = sine_wave.length
    -      sine_wave.map_with_index do |v, i|
    -        (((i % period_size).fdiv period_size) * 2) - 1
    -      end
    -    end
    -
    -    def defaults_queue_saw_tooth_wave
    -      { frequency: 440, duration: 60, gain: 0.3, fade_out: false, queue_in: 0 }
    -    end
    -
    -    def queue_saw_tooth_wave args, opts = {}
    -      opts        = defaults_queue_saw_tooth_wave.merge opts
    -      frequency   = opts[:frequency]
    -      sample_rate = 48000
    -
    -      saw_tooth_wave = saw_tooth_wave_for frequency: frequency, sample_rate: sample_rate
    -      args.state.saw_tooth_waves[frequency] ||= saw_tooth_wave_for frequency: frequency, sample_rate: sample_rate
    -
    -      proc = lambda do
    -        generate_audio_data args.state.saw_tooth_waves[frequency], sample_rate
    -      end
    -
    -      audio_state = new_audio_state args, opts
    -      audio_state[:input] = [1, sample_rate, proc]
    -      queue_audio args, audio_state: audio_state, wave: saw_tooth_wave
    -    end
    -  end
    -
    -  begin # region: triangle wave
    -    def defaults_triangle_wave_for
    -      { frequency: 440, sample_rate: 48000 }
    -    end
    -
    -    def triangle_wave_for opts = {}
    -      opts = defaults_saw_tooth_wave_for.merge opts
    -      sine_wave = sine_wave_for opts
    -      period_size = sine_wave.length
    -      sine_wave.map_with_index do |v, i|
    -        ratio = (i.fdiv period_size)
    -        if ratio <= 0.5
    -          (ratio * 4) - 1
    -        else
    -          ratio -= 0.5
    -          1 - (ratio * 4)
    -        end
    -      end
    -    end
    -
    -    def defaults_queue_triangle_wave
    -      { frequency: 440, duration: 60, gain: 1.0, fade_out: false, queue_in: 0 }
    -    end
    -
    -    def queue_triangle_wave args, opts = {}
    -      opts        = defaults_queue_triangle_wave.merge opts
    -      frequency   = opts[:frequency]
    -      sample_rate = 48000
    -
    -      triangle_wave = triangle_wave_for frequency: frequency, sample_rate: sample_rate
    -      args.state.triangle_waves[frequency] ||= triangle_wave_for frequency: frequency, sample_rate: sample_rate
    -
    -      proc = lambda do
    -        generate_audio_data args.state.triangle_waves[frequency], sample_rate
    -      end
    -
    -      audio_state = new_audio_state args, opts
    -      audio_state[:input] = [1, sample_rate, proc]
    -      queue_audio args, audio_state: audio_state, wave: triangle_wave
    -    end
    -  end
    -
    -  begin # region: bell
    -    def defaults_queue_bell
    -      { frequency: 440, duration: 1.seconds, queue_in: 0 }
    -    end
    -
    -    def queue_bell args, opts = {}
    -      (bell_to_sine_waves (defaults_queue_bell.merge opts)).each { |b| queue_sine_wave args, b }
    -    end
    -
    -    def bell_harmonics
    -      [
    -        { frequency_ratio: 0.5, duration_ratio: 1.00 },
    -        { frequency_ratio: 1.0, duration_ratio: 0.80 },
    -        { frequency_ratio: 2.0, duration_ratio: 0.60 },
    -        { frequency_ratio: 3.0, duration_ratio: 0.40 },
    -        { frequency_ratio: 4.2, duration_ratio: 0.25 },
    -        { frequency_ratio: 5.4, duration_ratio: 0.20 },
    -        { frequency_ratio: 6.8, duration_ratio: 0.15 }
    -      ]
    -    end
    -
    -    def defaults_bell_to_sine_waves
    -      { frequency: 440, duration: 1.seconds, queue_in: 0 }
    -    end
    -
    -    def bell_to_sine_waves opts = {}
    -      opts = defaults_bell_to_sine_waves.merge opts
    -      bell_harmonics.map do |b|
    -        {
    -          frequency: opts[:frequency] * b[:frequency_ratio],
    -          duration:  opts[:duration] * b[:duration_ratio],
    -          queue_in:  opts[:queue_in],
    -          gain:      (1.fdiv bell_harmonics.length),
    -          fade_out:  true
    -        }
    -      end
    -    end
    -  end
    -
    -  begin # audio entity construction
    -    def generate_audio_data sine_wave, sample_rate
    -      sample_size = (sample_rate.fdiv (1000.fdiv 60)).ceil
    -      copy_count  = (sample_size.fdiv sine_wave.length).ceil
    -      sine_wave * copy_count
    -    end
    -
    -    def defaults_new_audio_state
    -      { frequency: 440, duration: 60, gain: 1.0, fade_out: false, queue_in: 0 }
    -    end
    -
    -    def new_audio_state args, opts = {}
    -      opts        = defaults_new_audio_state.merge opts
    -      decay_rate  = 0
    -      decay_rate  = 1.fdiv(opts[:duration]) * opts[:gain] if opts[:fade_out]
    -      frequency   = opts[:frequency]
    -      sample_rate = 48000
    -
    -      {
    -        id:               (new_id! args),
    -        frequency:        frequency,
    -        sample_rate:      48000,
    -        stop_at:          args.tick_count + opts[:queue_in] + opts[:duration],
    -        gain:             opts[:gain].to_f,
    -        queue_at:         args.state.tick_count + opts[:queue_in],
    -        decay_rate:       decay_rate,
    -        pitch:            1.0,
    -        looping:          true,
    -        paused:           false
    -      }
    -    end
    -
    -    def queue_audio args, opts = {}
    -      graph_wave args, opts[:wave], opts[:audio_state][:frequency]
    -      args.state.audio_queue << opts[:audio_state]
    -    end
    -
    -    def new_id! args
    -      args.state.audio_id ||= 0
    -      args.state.audio_id  += 1
    -    end
    -
    -    def graph_wave args, wave, frequency
    -      if args.state.tick_count != args.state.graphed_at
    -        args.outputs.static_lines.clear
    -        args.outputs.static_sprites.clear
    -      end
    -
    -      wave = wave
    -
    -      r, g, b = frequency.to_i % 85,
    -                frequency.to_i % 170,
    -                frequency.to_i % 255
    -
    -      starting_rect = args.layout.rect(row: 5, col: 13)
    -      x_scale    = 10
    -      y_scale    = 100
    -      max_points = 25
    -
    -      points = wave
    -      if wave.length > max_points
    -        resolution = wave.length.idiv max_points
    -        points = wave.find_all.with_index { |y, i| (i % resolution == 0) }
    -      end
    -
    -      args.outputs.static_lines << points.map_with_index do |y, x|
    -        next_y = points[x + 1]
    -
    -        if next_y
    -          {
    -            x:  starting_rect.x + (x * x_scale),
    -            y:  starting_rect.y + starting_rect.h.half + y_scale * y,
    -            x2: starting_rect.x + ((x + 1) * x_scale),
    -            y2: starting_rect.y + starting_rect.h.half + y_scale * next_y,
    -            r:  r,
    -            g:  g,
    -            b:  b
    -          }
    -        end
    -      end
    -
    -      args.outputs.static_sprites << points.map_with_index do |y, x|
    -        {
    -          x:  (starting_rect.x + (x * x_scale)) - 2,
    -          y:  (starting_rect.y + starting_rect.h.half + y_scale * y) - 2,
    -          w:  4,
    -          h:  4,
    -          path: 'sprites/square-white.png',
    -          r: r,
    -          g: g,
    -          b: b
    -        }
    -      end
    -
    -      args.state.graphed_at = args.state.tick_count
    -    end
    -  end
    -
    -  begin # region: musical note mapping
    -    def defaults_frequency_for
    -      { note: :a, octave: 5, sharp:  false, flat:   false }
    -    end
    -
    -    def frequency_for opts = {}
    -      opts = defaults_frequency_for.merge opts
    -      octave_offset_multiplier  = opts[:octave] - 5
    -      note = note_frequencies_octave_5[opts[:note]]
    -      if octave_offset_multiplier < 0
    -        note = note * 1 / (octave_offset_multiplier.abs + 1)
    -      elsif octave_offset_multiplier > 0
    -        note = note * (octave_offset_multiplier.abs + 1) / 1
    -      end
    -      note
    -    end
    -
    -    def note_frequencies_octave_5
    -      {
    -        a: 440.0,
    -        a_sharp: 466.16, b_flat: 466.16,
    -        b: 493.88,
    -        c: 523.25,
    -        c_sharp: 554.37, d_flat: 587.33,
    -        d: 587.33,
    -        d_sharp: 622.25, e_flat: 659.25,
    -        e: 659.25,
    -        f: 698.25,
    -        f_sharp: 739.99, g_flat: 739.99,
    -        g: 783.99,
    -        g_sharp: 830.61, a_flat: 830.61
    -      }
    -    end
    -  end
    -end
    -
    -$gtk.reset
    -
    -
    -

    Input Basics - Keyboard - main.rb

    -
    # ./samples/02_input_basics/01_keyboard/app/main.rb
    -=begin
    -
    -APIs listing that haven't been encountered in a previous sample apps:
    -
    -- args.inputs.keyboard.key_up.KEY: The value of the properties will be set
    -  to the frame  that the key_up event occurred (the frame correlates
    -  to args.state.tick_count). Otherwise the value will be nil. For a
    -  full listing of keys, take a look at mygame/documentation/06-keyboard.md.
    -- args.state.PROPERTY: The state property on args is a dynamic
    -  structure. You can define ANY property here with ANY type of
    -  arbitrary nesting. Properties defined on args.state will be retained
    -  across frames. If you attempt access a property that doesn't exist
    -  on args.state, it will simply return nil (no exception will be thrown).
    -
    -=end
    -
    -# Along with outputs, inputs are also an essential part of video game development
    -# DragonRuby can take input from keyboards, mouse, and controllers.
    -# This sample app will cover keyboard input.
    -
    -# args.inputs.keyboard.key_up.a will check to see if the a key has been pressed
    -# This will work with the other keys as well
    -
    -
    -def tick args
    -  tick_instructions args, "Sample app shows how keyboard events are registered and accessed.", 360
    -  # Notice how small_font accounts for all the remaining parameters
    -  args.outputs.labels << [460, row_to_px(args, 0), "Current game time: #{args.state.tick_count}", small_font]
    -  args.outputs.labels << [460, row_to_px(args, 2), "Keyboard input: args.inputs.keyboard.key_up.h", small_font]
    -  args.outputs.labels << [460, row_to_px(args, 3), "Press \"h\" on the keyboard.", small_font]
    -
    -  # Input on a specifc key can be found through args.inputs.keyboard.key_up followed by the key
    -  if args.inputs.keyboard.key_up.h
    -    args.state.h_pressed_at = args.state.tick_count
    -  end
    -
    -  # This code simplifies to if args.state.h_pressed_at has not been initialized, set it to false
    -  args.state.h_pressed_at ||= false
    -
    -  if args.state.h_pressed_at
    -    args.outputs.labels << [460, row_to_px(args, 4), "\"h\" was pressed at time: #{args.state.h_pressed_at}", small_font]
    -  else
    -    args.outputs.labels << [460, row_to_px(args, 4), "\"h\" has never been pressed.", small_font]
    -  end
    -
    -  tick_help_text args
    -end
    -
    -def small_font
    -  # This method provides some values for the construction of labels
    -  # Specifically, Size, Alignment, & RGBA
    -  # This makes it so that custom parameters don't have to be repeatedly typed.
    -  # Additionally "small_font" provides programmers with more information than some numbers
    -  [-2, 0, 0, 0, 0, 255]
    -end
    -
    -def row_to_px args, row_number
    -  # This takes a row_number and converts it to pixels DragonRuby understands.
    -  # Row 0 starts 5 units below the top of the grid
    -  # Each row afterward is 20 units lower
    -  args.grid.top.shift_down(5).shift_down(20 * row_number)
    -end
    -
    -# Don't worry about understanding the code within this method just yet.
    -# This method shows you the help text within the game.
    -def tick_help_text args
    -  return unless args.state.h_pressed_at
    -
    -  args.state.key_value_history      ||= {}
    -  args.state.key_down_value_history ||= {}
    -  args.state.key_held_value_history ||= {}
    -  args.state.key_up_value_history   ||= {}
    -
    -  if (args.inputs.keyboard.key_down.truthy_keys.length > 0 ||
    -      args.inputs.keyboard.key_held.truthy_keys.length > 0 ||
    -      args.inputs.keyboard.key_up.truthy_keys.length > 0)
    -    args.state.help_available = true
    -    args.state.no_activity_debounce = nil
    -  else
    -    args.state.no_activity_debounce ||= 5.seconds
    -    args.state.no_activity_debounce -= 1
    -    if args.state.no_activity_debounce <= 0
    -      args.state.help_available = false
    -      args.state.key_value_history        = {}
    -      args.state.key_down_value_history   = {}
    -      args.state.key_held_value_history   = {}
    -      args.state.key_up_value_history     = {}
    -    end
    -  end
    -
    -  args.outputs.labels << [10, row_to_px(args, 6), "Advanced Help:", small_font]
    -
    -  if !args.state.help_available
    -    args.outputs.labels << [10, row_to_px(args, 7),  "Press a key and I'll show code to access the key and what value will be returned if you used the code.", small_font]
    -    return
    -  end
    -
    -  args.outputs.labels << [10 , row_to_px(args, 7), "args.inputs.keyboard", small_font]
    -  args.outputs.labels << [330, row_to_px(args, 7), "args.inputs.keyboard.key_down", small_font]
    -  args.outputs.labels << [650, row_to_px(args, 7), "args.inputs.keyboard.key_held", small_font]
    -  args.outputs.labels << [990, row_to_px(args, 7), "args.inputs.keyboard.key_up", small_font]
    -
    -  fill_history args, :key_value_history,      :down_or_held, nil
    -  fill_history args, :key_down_value_history, :down,        :key_down
    -  fill_history args, :key_held_value_history, :held,        :key_held
    -  fill_history args, :key_up_value_history,   :up,          :key_up
    -
    -  render_help_labels args, :key_value_history,      :down_or_held, nil,      10
    -  render_help_labels args, :key_down_value_history, :down,        :key_down, 330
    -  render_help_labels args, :key_held_value_history, :held,        :key_held, 650
    -  render_help_labels args, :key_up_value_history,   :up,          :key_up,   990
    -end
    -
    -def fill_history args, history_key, state_key, keyboard_method
    -  fill_single_history args, history_key, state_key, keyboard_method, :raw_key
    -  fill_single_history args, history_key, state_key, keyboard_method, :char
    -  args.inputs.keyboard.keys[state_key].each do |key_name|
    -    fill_single_history args, history_key, state_key, keyboard_method, key_name
    -  end
    -end
    -
    -def fill_single_history args, history_key, state_key, keyboard_method, key_name
    -  current_value = args.inputs.keyboard.send(key_name)
    -  if keyboard_method
    -    current_value = args.inputs.keyboard.send(keyboard_method).send(key_name)
    -  end
    -  args.state.as_hash[history_key][key_name] ||= []
    -  args.state.as_hash[history_key][key_name] << current_value
    -  args.state.as_hash[history_key][key_name] = args.state.as_hash[history_key][key_name].reverse.uniq.take(3).reverse
    -end
    -
    -def render_help_labels args, history_key, state_key, keyboard_method, x
    -  idx = 8
    -  args.outputs.labels << args.state
    -                           .as_hash[history_key]
    -                           .keys
    -                           .reverse
    -                           .map
    -                           .with_index do |k, i|
    -    v = args.state.as_hash[history_key][k]
    -    current_value = args.inputs.keyboard.send(k)
    -    if keyboard_method
    -      current_value = args.inputs.keyboard.send(keyboard_method).send(k)
    -    end
    -    idx += 2
    -    [
    -      [x, row_to_px(args, idx - 2),
    -       "    .#{k} is #{current_value || "nil"}",
    -       small_font],
    -      [x, row_to_px(args, idx - 1),
    -       "       was #{v}",
    -       small_font]
    -    ]
    -  end
    -end
    -
    -
    -def tick_instructions args, text, y = 715
    -  return if args.state.key_event_occurred
    -  if args.inputs.mouse.click ||
    -     args.inputs.keyboard.directional_vector ||
    -     args.inputs.keyboard.key_down.enter ||
    -     args.inputs.keyboard.key_down.escape
    -    args.state.key_event_occurred = true
    -  end
    -
    -  args.outputs.debug << [0, y - 50, 1280, 60].solid
    -  args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label
    -  args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label
    -end
    -
    -
    -

    Input Basics - Mouse - main.rb

    -
    # ./samples/02_input_basics/02_mouse/app/main.rb
    -=begin
    -
    -APIs that haven't been encountered in a previous sample apps:
    -
    -- args.inputs.mouse.click: This property will be set if the mouse was clicked.
    -- args.inputs.mouse.click.point.(x|y): The x and y location of the mouse.
    -- args.inputs.mouse.click.point.created_at: The frame the mouse click occurred in.
    -- args.inputs.mouse.click.point.created_at_elapsed: How many frames have passed
    -  since the click event.
    -
    -Reminder:
    -
    -- args.state.PROPERTY: The state property on args is a dynamic
    -  structure. You can define ANY property here with ANY type of
    -  arbitrary nesting. Properties defined on args.state will be retained
    -  across frames. If you attempt access a property that doesn't exist
    -  on args.state, it will simply return nil (no exception will be thrown).
    -
    -=end
    -
    -# This code demonstrates DragonRuby mouse input
    -
    -# To see if the a mouse click occurred
    -# Use args.inputs.mouse.click
    -# Which returns a boolean
    -
    -# To see where a mouse click occurred
    -# Use args.inputs.mouse.click.point.x AND
    -# args.inputs.mouse.click.point.y
    -
    -# To see which frame the click occurred
    -# Use args.inputs.mouse.click.created_at
    -
    -# To see how many frames its been since the click occurred
    -# Use args.inputs.mouse.click.creat_at_elapsed
    -
    -# Saving the click in args.state can be quite useful
    -
    -def tick args
    -  tick_instructions args, "Sample app shows how mouse events are registered and how to measure elapsed time."
    -  x = 460
    -
    -  args.outputs.labels << small_label(args, x, 11, "Mouse input: args.inputs.mouse")
    -
    -  if args.inputs.mouse.click
    -    args.state.last_mouse_click = args.inputs.mouse.click
    -  end
    -
    -  if args.state.last_mouse_click
    -    click = args.state.last_mouse_click
    -    args.outputs.labels << small_label(args, x, 12, "Mouse click happened at: #{click.created_at}")
    -    args.outputs.labels << small_label(args, x, 13, "Mouse clicked #{click.created_at_elapsed} ticks ago")
    -    args.outputs.labels << small_label(args, x, 14, "Mouse click location: #{click.point.x}, #{click.point.y}")
    -  else
    -    args.outputs.labels << small_label(args, x, 12, "Mouse click has not occurred yet.")
    -    args.outputs.labels << small_label(args, x, 13, "Please click mouse.")
    -  end
    -end
    +end
     
     def small_label args, x, row, message
    -  # This method effectively combines the row_to_px and small_font methods
    -  # It changes the given row value to a DragonRuby pixel value
    -  # and adds the customization parameters
    -  [x, row_to_px(args, row), message, small_font]
    -end
    -
    -def small_font
    -  [-2, 0, 0, 0, 0, 255]
    +  { x: x, y: row_to_px(args, row), text: message, size_enum: -2 }
     end
     
     def row_to_px args, row_number
    @@ -4819,107 +4298,13 @@ def tick_instructions args, text, y = 715
         args.state.key_event_occurred = true
       end
     
    -  args.outputs.debug << [0, y - 50, 1280, 60].solid
    -  args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label
    -  args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label
    +  args.outputs.debug << { x: 0,   y: y - 50, w: 1280, h: 60 }.solid!
    +  args.outputs.debug << { x: 640, y: y, text: text, size_enum: 1, alignment_enum: 1, r: 255, g: 255, b: 255 }.label!
    +  args.outputs.debug << { x: 640, y: y - 25, text: "(click to dismiss instructions)", size_enum: -2, alignment_enum: 1, r: 255, g: 255, b: 255 }.label!
     end
     
     
    -

    Input Basics - Mouse Point To Rect - main.rb

    -
    # ./samples/02_input_basics/03_mouse_point_to_rect/app/main.rb
    -=begin
    -
    -APIs that haven't been encountered in a previous sample apps:
    -
    -- args.outputus.borders: An array. Values in this array will be rendered as
    -  unfilled rectangles on the screen.
    -- ARRAY#inside_rect?: An array with at least two values is considered a point. An array
    -  with at least four values is considered a rect. The inside_rect? function returns true
    -  or false depending on if the point is inside the rect.
    -
    -  ```
    -  # Point:  x: 100, y: 100
    -  # Rect:   x: 0, y: 0, w: 500, h: 500
    -  # Result: true
    -
    -  [100, 100].inside_rect? [0, 0, 500, 500]
    -  ```
    -
    -  ```
    -  # Point:  x: 100, y: 100
    -  # Rect:   x: 300, y: 300, w: 100, h: 100
    -  # Result: false
    -
    -  [100, 100].inside_rect? [300, 300, 100, 100]
    -  ```
    -
    -- args.inputs.mouse.click.point.created_at: The frame the mouse click occurred in.
    -- args.inputs.mouse.click.point.created_at_elapsed: How many frames have passed
    -  since the click event.
    -
    -=end
    -
    -# To determine whether a point is in a rect
    -# Use point.inside_rect? rect
    -
    -# This is useful to determine if a click occurred in a rect
    -
    -def tick args
    -  tick_instructions args, "Sample app shows how to determing if a click happened inside a rectangle."
    -
    -  x = 460
    -
    -  args.outputs.labels << small_label(args, x, 15, "Click inside the blue box maybe ---->")
    -
    -  box = [785, 370, 50, 50, 0, 0, 170]
    -  args.outputs.borders << box
    -
    -  # Saves the most recent click into args.state
    -  # Unlike the other components of args,
    -  # args.state does not reset every tick.
    -  if args.inputs.mouse.click
    -    args.state.last_mouse_click = args.inputs.mouse.click
    -  end
    -
    -  if args.state.last_mouse_click
    -    if args.state.last_mouse_click.point.inside_rect? box
    -      args.outputs.labels << small_label(args, x, 16, "Mouse click happened *inside* the box.")
    -    else
    -      args.outputs.labels << small_label(args, x, 16, "Mouse click happened *outside* the box.")
    -    end
    -  else
    -    args.outputs.labels << small_label(args, x, 16, "Mouse click has not occurred yet.")
    -  end
    -end
    -
    -def small_label args, x, row, message
    -  [x, row_to_px(args, row), message, small_font]
    -end
    -
    -def small_font
    -  [-2, 0, 0, 0, 0, 255]
    -end
    -
    -def row_to_px args, row_number
    -  args.grid.top.shift_down(5).shift_down(20 * row_number)
    -end
    -
    -def tick_instructions args, text, y = 715
    -  return if args.state.key_event_occurred
    -  if args.inputs.mouse.click ||
    -     args.inputs.keyboard.directional_vector ||
    -     args.inputs.keyboard.key_down.enter ||
    -     args.inputs.keyboard.key_down.escape
    -    args.state.key_event_occurred = true
    -  end
    -
    -  args.outputs.debug << [0, y - 50, 1280, 60].solid
    -  args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label
    -  args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label
    -end
    -
    -
    -

    Input Basics - Mouse Rect To Rect - main.rb

    +

    Input Basics - Mouse Rect To Rect - main.rb

    # ./samples/02_input_basics/04_mouse_rect_to_rect/app/main.rb
     =begin
     
    @@ -4965,9 +4350,15 @@ def tick args
       # They are stored in game so that they do not get reset every tick
       if args.inputs.mouse.click
         if !args.state.box_collision_one
    -      args.state.box_collision_one = [args.inputs.mouse.click.point.x - 25, args.inputs.mouse.click.point.y - 25, 125, 125, 180, 0,   0, 180]
    +      args.state.box_collision_one = { x: args.inputs.mouse.click.point.x - 25,
    +                                       y: args.inputs.mouse.click.point.y - 25,
    +                                       w: 125, h: 125,
    +                                       r: 180, g: 0, b: 0, a: 180 }
         elsif !args.state.box_collision_two
    -      args.state.box_collision_two = [args.inputs.mouse.click.point.x - 25, args.inputs.mouse.click.point.y - 25, 125, 125,   0, 0, 180, 180]
    +      args.state.box_collision_two = { x: args.inputs.mouse.click.point.x - 25,
    +                                       y: args.inputs.mouse.click.point.y - 25,
    +                                       w: 125, h: 125,
    +                                       r: 0, g: 0, b: 180, a: 180 }
         else
           args.state.box_collision_one = nil
           args.state.box_collision_two = nil
    @@ -4994,15 +4385,11 @@ def tick args
     end
     
     def small_label args, x, row, message
    -  [x, row_to_px(args, row), message, small_font]
    -end
    -
    -def small_font
    -  [-2, 0, 0, 0, 0, 255]
    +  { x: x, y: row_to_px(args, row), text: message, size_enum: -2 }
     end
     
     def row_to_px args, row_number
    -  args.grid.top.shift_down(5).shift_down(20 * row_number)
    +  args.grid.top - 5 - (20 * row_number)
     end
     
     def tick_instructions args, text, y = 715
    @@ -5020,7 +4407,7 @@ def tick_instructions args, text, y = 715
     end
     
     
    -

    Input Basics - Controller - main.rb

    +

    Input Basics - Controller - main.rb

    # ./samples/02_input_basics/05_controller/app/main.rb
     =begin
     
    @@ -5066,57 +4453,51 @@ class ControllerDemo
       def process_inputs
         state.buttons = []
     
    -    state.buttons << [100, 500, inputs.controller_one.key_held.l1, "L1"]
    -    state.buttons << [100, 600, inputs.controller_one.key_held.l2, "L2"]
    -
    -    state.buttons << [1100, 500, inputs.controller_one.key_held.r1, "R1"]
    -    state.buttons << [1100, 600, inputs.controller_one.key_held.r2, "R2"]
    -
    -    state.buttons << [540, 450, inputs.controller_one.key_held.select, "Select"]
    -    state.buttons << [660, 450, inputs.controller_one.key_held.start, "Start"]
    -
    -    state.buttons << [200, 300, inputs.controller_one.key_held.left, "Left"]
    -    state.buttons << [300, 400, inputs.controller_one.key_held.up, "Up"]
    -    state.buttons << [400, 300, inputs.controller_one.key_held.right, "Right"]
    -    state.buttons << [300, 200, inputs.controller_one.key_held.down, "Down"]
    -
    -    state.buttons << [800, 300, inputs.controller_one.key_held.x, "X"]
    -    state.buttons << [900, 400, inputs.controller_one.key_held.y, "Y"]
    -    state.buttons << [1000, 300, inputs.controller_one.key_held.a, "A"]
    -    state.buttons << [900, 200, inputs.controller_one.key_held.b, "B"]
    -
    -    state.buttons << [450 + inputs.controller_one.left_analog_x_perc * 100,
    -                      100 + inputs.controller_one.left_analog_y_perc * 100,
    -                      inputs.controller_one.key_held.l3,
    -                      "L3"]
    -
    -    state.buttons << [750 + inputs.controller_one.right_analog_x_perc * 100,
    -                      100 + inputs.controller_one.right_analog_y_perc * 100,
    -                      inputs.controller_one.key_held.r3,
    -                      "R3"]
    +    state.buttons << { x: 100,  y: 500, active: inputs.controller_one.key_held.l1, text: "L1"}
    +    state.buttons << { x: 100,  y: 600, active: inputs.controller_one.key_held.l2, text: "L2"}
    +    state.buttons << { x: 1100, y: 500, active: inputs.controller_one.key_held.r1, text: "R1"}
    +    state.buttons << { x: 1100, y: 600, active: inputs.controller_one.key_held.r2, text: "R2"}
    +    state.buttons << { x: 540,  y: 450, active: inputs.controller_one.key_held.select, text: "Select"}
    +    state.buttons << { x: 660,  y: 450, active: inputs.controller_one.key_held.start, text: "Start"}
    +    state.buttons << { x: 200,  y: 300, active: inputs.controller_one.key_held.left, text: "Left"}
    +    state.buttons << { x: 300,  y: 400, active: inputs.controller_one.key_held.up, text: "Up"}
    +    state.buttons << { x: 400,  y: 300, active: inputs.controller_one.key_held.right, text: "Right"}
    +    state.buttons << { x: 300,  y: 200, active: inputs.controller_one.key_held.down, text: "Down"}
    +    state.buttons << { x: 800,  y: 300, active: inputs.controller_one.key_held.x, text: "X"}
    +    state.buttons << { x: 900,  y: 400, active: inputs.controller_one.key_held.y, text: "Y"}
    +    state.buttons << { x: 1000, y: 300, active: inputs.controller_one.key_held.a, text: "A"}
    +    state.buttons << { x: 900,  y: 200, active: inputs.controller_one.key_held.b, text: "B"}
    +    state.buttons << { x: 450 + inputs.controller_one.left_analog_x_perc * 100,
    +                       y: 100 + inputs.controller_one.left_analog_y_perc * 100,
    +                       active: inputs.controller_one.key_held.l3,
    +                       text: "L3" }
    +    state.buttons << { x: 750 + inputs.controller_one.right_analog_x_perc * 100,
    +                       y: 100 + inputs.controller_one.right_analog_y_perc * 100,
    +                       active: inputs.controller_one.key_held.r3,
    +                       text: "R3" }
       end
     
       # Gives each button a square shape.
       # If the button is being pressed or held (which means it is considered active),
       # the square is filled in. Otherwise, the button simply has a border.
       def render
    -    state.buttons.each do |x, y, active, text|
    -      rect = [x, y, 75, 75]
    +    state.buttons.each do |b|
    +      rect = { x: b.x, y: b.y, w: 75, h: 75 }
     
    -      if active # if button is pressed
    +      if b.active # if button is pressed
             outputs.solids << rect # rect is output as solid (filled in)
           else
             outputs.borders << rect # otherwise, output as border
           end
     
           # Outputs the text of each button using labels.
    -      outputs.labels << [x, y + 95, text] # add 95 to place label above button
    +      outputs.labels << { x: b.x, y: b.y + 95, text: b.text } # add 95 to place label above button
         end
     
    -    outputs.labels << [10, 60, "Left Analog x: #{inputs.controller_one.left_analog_x_raw} (#{inputs.controller_one.left_analog_x_perc * 100}%)"]
    -    outputs.labels << [10, 30, "Left Analog y: #{inputs.controller_one.left_analog_y_raw} (#{inputs.controller_one.left_analog_y_perc * 100}%)"]
    -    outputs.labels << [900, 60, "Right Analog x: #{inputs.controller_one.right_analog_x_raw} (#{inputs.controller_one.right_analog_x_perc * 100}%)"]
    -    outputs.labels << [900, 30, "Right Analog y: #{inputs.controller_one.right_analog_y_raw} (#{inputs.controller_one.right_analog_y_perc * 100}%)"]
    +    outputs.labels << { x:  10, y: 60, text: "Left Analog x: #{inputs.controller_one.left_analog_x_raw} (#{inputs.controller_one.left_analog_x_perc * 100}%)" }
    +    outputs.labels << { x:  10, y: 30, text: "Left Analog y: #{inputs.controller_one.left_analog_y_raw} (#{inputs.controller_one.left_analog_y_perc * 100}%)" }
    +    outputs.labels << { x: 900, y: 60, text: "Right Analog x: #{inputs.controller_one.right_analog_x_raw} (#{inputs.controller_one.right_analog_x_perc * 100}%)" }
    +    outputs.labels << { x: 900, y: 30, text: "Right Analog y: #{inputs.controller_one.right_analog_y_raw} (#{inputs.controller_one.right_analog_y_perc * 100}%)" }
       end
     end
     
    @@ -5150,7 +4531,7 @@ def tick_instructions args, text, y = 715
     end
     
     
    -

    Input Basics - Touch - main.rb

    +

    Input Basics - Touch - main.rb

    # ./samples/02_input_basics/06_touch/app/main.rb
     def tick args
       args.outputs.background_color = [ 0, 0, 0 ]
    @@ -5165,10 +4546,12 @@ def tick args
       #  the next new touch will be finger_one again, but until then, new touches
       #  don't fill in earlier slots.
       if !args.inputs.finger_one.nil?
    -    args.outputs.primitives << [640, 650, "Finger #1 is touching at (#{args.inputs.finger_one.x}, #{args.inputs.finger_one.y}).", 5, 1, 255, 255, 255].label
    +    args.outputs.primitives << { x: 640, y: 650, text: "Finger #1 is touching at (#{args.inputs.finger_one.x}, #{args.inputs.finger_one.y}).",
    +                                 size_enum: 5, alignment_enum: 1, r: 255, g: 255, b: 255 }.label!
       end
       if !args.inputs.finger_two.nil?
    -    args.outputs.primitives << [640, 600, "Finger #2 is touching at (#{args.inputs.finger_two.x}, #{args.inputs.finger_two.y}).", 5, 1, 255, 255, 255].label
    +    args.outputs.primitives << { x: 640, y: 600, text: "Finger #2 is touching at (#{args.inputs.finger_two.x}, #{args.inputs.finger_two.y}).",
    +                                 size_enum: 5, alignment_enum: 1, r: 255, g: 255, b: 255 }.label!
       end
     
       # Here's the more flexible interface: this will report as many simultaneous
    @@ -5189,14 +4572,13 @@ def tick args
         r = (color & 0xFF0000) >> 16
         g = (color & 0x00FF00) >> 8
         b = (color & 0x0000FF)
    -    args.outputs.primitives << [v.x - (size / 2), v.y + (size / 2), size, size, r, g, b, 255].solid
    -    args.outputs.primitives << [v.x, v.y + size, k.to_s, 0, 1, 0, 0, 0].label
    +    args.outputs.primitives << { x: v.x - (size / 2), y: v.y + (size / 2), w: size, h: size, r: r, g: g, b: b, a: 255 }.solid!
    +    args.outputs.primitives << { x: v.x, y: v.y + size, text: k.to_s, alignment_enum: 1 }.label!
       }
     end
     
    -
     
    -

    Rendering Sprites - Animation Using Separate Pngs - main.rb

    +

    Rendering Sprites - Animation Using Separate Pngs - main.rb

    # ./samples/03_rendering_sprites/01_animation_using_separate_pngs/app/main.rb
     =begin
     
    @@ -5231,6 +4613,8 @@ end
     # in this tick "entry point": `looping_animation`, and the
     # second method is `one_time_animation`.
     def tick args
    +  # uncomment the line below to see animation play out in slow motion
    +  # args.gtk.slowmo! 6
       looping_animation args
       one_time_animation args
     end
    @@ -5263,22 +4647,22 @@ def looping_animation args
                                                   does_sprite_loop
     
       # Now that we have `sprite_index, we can present the correct file.
    -  args.outputs.sprites << [100, 100, 100, 100, "sprites/dragon_fly_#{sprite_index}.png"]
    +  args.outputs.sprites << { x: 100, y: 100, w: 100, h: 100, path: "sprites/dragon_fly_#{sprite_index}.png" }
     
       # Try changing the numbers below to see how the animation changes:
    -  args.outputs.sprites << [100, 200, 100, 100, "sprites/dragon_fly_#{0.frame_index 6, 4, true}.png"]
    +  args.outputs.sprites << { x: 100, y: 200, w: 100, h: 100, path: "sprites/dragon_fly_#{0.frame_index 6, 4, true}.png" }
     end
     
     # This function shows how to animate a sprite that executes
     # only once when the "f" key is pressed.
     def one_time_animation args
       # This is just a label the shows instructions within the game.
    -  args.outputs.labels << [220, 350, "(press f to animate)"]
    +  args.outputs.labels <<  { x: 220, y: 350, text: "(press f to animate)" }
     
       # If "f" is pressed on the keyboard...
       if args.inputs.keyboard.key_down.f
         # Print the frame that "f" was pressed on.
    -    puts "Hello from main.rb! The \"f\" key was in the down state on frame: #{args.inputs.keyboard.key_down.f}"
    +    puts "Hello from main.rb! The \"f\" key was in the down state on frame: #{args.state.tick_count}"
     
         # And MOST IMPORTANTLY set the point it time to start the animation,
         # equal to "now" which is represented as args.state.tick_count.
    @@ -5311,7 +4695,7 @@ def one_time_animation args
       sprite_index ||= 0
     
       # Present the sprite.
    -  args.outputs.sprites << [100, 300, 100, 100, "sprites/dragon_fly_#{sprite_index}.png"]
    +  args.outputs.sprites << { x: 100, y: 300, w: 100, h: 100, path: "sprites/dragon_fly_#{sprite_index}.png" }
     
       tick_instructions args, "Sample app shows how to use Numeric#frame_index and string interpolation to animate a sprite over time."
     end
    @@ -5331,7 +4715,7 @@ def tick_instructions args, text, y = 715
     end
     
     
    -

    Rendering Sprites - Animation Using Sprite Sheet - main.rb

    +

    Rendering Sprites - Animation Using Sprite Sheet - main.rb

    # ./samples/03_rendering_sprites/02_animation_using_sprite_sheet/app/main.rb
     def tick args
       args.state.player.x ||= 100
    @@ -5433,7 +4817,7 @@ def running_sprite args
     end
     
     
    -

    Rendering Sprites - Animation States - main.rb

    +

    Rendering Sprites - Animation States - main.rb

    # ./samples/03_rendering_sprites/03_animation_states/app/main.rb
     class Game
       attr_gtk
    @@ -5620,7 +5004,7 @@ end
     $gtk.reset
     
     
    -

    Rendering Sprites - Color And Rotation - main.rb

    +

    Rendering Sprites - Color And Rotation - main.rb

    # ./samples/03_rendering_sprites/04_color_and_rotation/app/main.rb
     =begin
      APIs listing that haven't been encountered in previous sample apps:
    @@ -5850,7 +5234,7 @@ def source_rect state
     end
     
     
    -

    Physics And Collisions - Simple - main.rb

    +

    Physics And Collisions - Simple - main.rb

    # ./samples/04_physics_and_collisions/01_simple/app/main.rb
     =begin
     
    @@ -5962,7 +5346,7 @@ def tick_instructions args, text, y = 715
     end
     
     
    -

    Physics And Collisions - Moving Objects - main.rb

    +

    Physics And Collisions - Moving Objects - main.rb

    # ./samples/04_physics_and_collisions/02_moving_objects/app/main.rb
     =begin
     
    @@ -6266,7 +5650,7 @@ def tick_instructions args, text, y = 715
     end
     
     
    -

    Physics And Collisions - Entities - main.rb

    +

    Physics And Collisions - Entities - main.rb

    # ./samples/04_physics_and_collisions/03_entities/app/main.rb
     =begin
     
    @@ -6421,7 +5805,7 @@ def tick_instructions args, text, y = 715
     end
     
     
    -

    Physics And Collisions - Box Collision - main.rb

    +

    Physics And Collisions - Box Collision - main.rb

    # ./samples/04_physics_and_collisions/04_box_collision/app/main.rb
     =begin
     
    @@ -6762,7 +6146,7 @@ def tick_instructions args, text, y = 715
     end
     
     
    -

    Physics And Collisions - Box Collision 2 - main.rb

    +

    Physics And Collisions - Box Collision 2 - main.rb

    # ./samples/04_physics_and_collisions/05_box_collision_2/app/main.rb
     =begin
      APIs listing that haven't been encountered in previous sample apps:
    @@ -7236,7 +6620,7 @@ def tick args
     end
     
     
    -

    Physics And Collisions - Box Collision 3 - main.rb

    +

    Physics And Collisions - Box Collision 3 - main.rb

    # ./samples/04_physics_and_collisions/06_box_collision_3/app/main.rb
     class Game
       attr_gtk
    @@ -7286,9 +6670,9 @@ class Game
         mouse_overlay = mouse_overlay.merge r: 255 if state.delete_mode
     
         if state.mouse_held
    -      outputs.primitives << mouse_overlay.border
    +      outputs.primitives << mouse_overlay.border!
         else
    -      outputs.primitives << mouse_overlay.solid
    +      outputs.primitives << mouse_overlay.solid!
         end
       end
     
    @@ -7495,7 +6879,7 @@ def tick args
     end
     
     
    -

    Physics And Collisions - Jump Physics - main.rb

    +

    Physics And Collisions - Jump Physics - main.rb

    # ./samples/04_physics_and_collisions/07_jump_physics/app/main.rb
     =begin
     
    @@ -7695,7 +7079,7 @@ def tick args
     end
     
     
    -

    Physics And Collisions - Bouncing On Collision - ball.rb

    +

    Physics And Collisions - Bouncing On Collision - ball.rb

    # ./samples/04_physics_and_collisions/08_bouncing_on_collision/app/ball.rb
     GRAVITY = -0.08
     
    @@ -7786,7 +7170,7 @@ class Ball
       end
     
     
    -

    Physics And Collisions - Bouncing On Collision - block.rb

    +

    Physics And Collisions - Bouncing On Collision - block.rb

    # ./samples/04_physics_and_collisions/08_bouncing_on_collision/app/block.rb
     DEGREES_TO_RADIANS = Math::PI / 180
     
    @@ -7949,7 +7333,7 @@ class Block
     end
     
     
    -

    Physics And Collisions - Bouncing On Collision - cannon.rb

    +

    Physics And Collisions - Bouncing On Collision - cannon.rb

    # ./samples/04_physics_and_collisions/08_bouncing_on_collision/app/cannon.rb
     class Cannon
       def initialize args
    @@ -7973,7 +7357,7 @@ class Cannon
     end
     
     
    -

    Physics And Collisions - Bouncing On Collision - main.rb

    +

    Physics And Collisions - Bouncing On Collision - main.rb

    # ./samples/04_physics_and_collisions/08_bouncing_on_collision/app/main.rb
     INFINITY= 10**10
     
    @@ -8094,7 +7478,7 @@ def tick args
     end
     
     
    -

    Physics And Collisions - Bouncing On Collision - peg.rb

    +

    Physics And Collisions - Bouncing On Collision - peg.rb

    # ./samples/04_physics_and_collisions/08_bouncing_on_collision/app/peg.rb
     class Peg
       def initialize(x, y, block_size)
    @@ -8280,7 +7664,7 @@ class Peg
     end
     
     
    -

    Physics And Collisions - Bouncing On Collision - vector2d.rb

    +

    Physics And Collisions - Bouncing On Collision - vector2d.rb

    # ./samples/04_physics_and_collisions/08_bouncing_on_collision/app/vector2d.rb
     class Vector2d
         attr_accessor :x, :y
    @@ -8332,7 +7716,7 @@ class Vector2d
         end
       end
     
    -

    Physics And Collisions - Arbitrary Collision - ball.rb

    +

    Physics And Collisions - Arbitrary Collision - ball.rb

    # ./samples/04_physics_and_collisions/09_arbitrary_collision/app/ball.rb
     
     class Ball
    @@ -8502,7 +7886,7 @@ class Ball
       end
     
     
    -

    Physics And Collisions - Arbitrary Collision - blocks.rb

    +

    Physics And Collisions - Arbitrary Collision - blocks.rb

    # ./samples/04_physics_and_collisions/09_arbitrary_collision/app/blocks.rb
     MAX_COUNT=100
     
    @@ -9124,7 +8508,7 @@ class Line
     end
     
     
    -

    Physics And Collisions - Arbitrary Collision - linear_collider.rb

    +

    Physics And Collisions - Arbitrary Collision - linear_collider.rb

    # ./samples/04_physics_and_collisions/09_arbitrary_collision/app/linear_collider.rb
     
     COLLISIONWIDTH=8
    @@ -9308,7 +8692,7 @@ class LinearCollider
     end
     
     
    -

    Physics And Collisions - Arbitrary Collision - main.rb

    +

    Physics And Collisions - Arbitrary Collision - main.rb

    # ./samples/04_physics_and_collisions/09_arbitrary_collision/app/main.rb
     INFINITY= 10**10
     MAX_VELOCITY = 8.0
    @@ -9483,7 +8867,7 @@ def tick args
     end
     
     
    -

    Physics And Collisions - Arbitrary Collision - paddle.rb

    +

    Physics And Collisions - Arbitrary Collision - paddle.rb

    # ./samples/04_physics_and_collisions/09_arbitrary_collision/app/paddle.rb
     class Paddle
       attr_accessor :enabled
    @@ -9540,7 +8924,7 @@ class Paddle
     end
     
     
    -

    Physics And Collisions - Arbitrary Collision - rectangle.rb

    +

    Physics And Collisions - Arbitrary Collision - rectangle.rb

    # ./samples/04_physics_and_collisions/09_arbitrary_collision/app/rectangle.rb
     class Rectangle
       def initialize args
    @@ -9634,7 +9018,7 @@ class Rectangle
     end
     
     
    -

    Physics And Collisions - Arbitrary Collision - square_collider.rb

    +

    Physics And Collisions - Arbitrary Collision - square_collider.rb

    # ./samples/04_physics_and_collisions/09_arbitrary_collision/app/square_collider.rb
     
     class SquareCollider
    @@ -9667,7 +9051,7 @@ class SquareCollider
     end
     
     
    -

    Physics And Collisions - Arbitrary Collision - vector2d.rb

    +

    Physics And Collisions - Arbitrary Collision - vector2d.rb

    # ./samples/04_physics_and_collisions/09_arbitrary_collision/app/vector2d.rb
     class Vector2d
         attr_accessor :x, :y
    @@ -9719,779 +9103,1407 @@ class Vector2d
         end
       end
     
    -

    Physics And Collisions - Collision With Object Removal - ball.rb

    +

    Physics And Collisions - Collision With Object Removal - ball.rb

    # ./samples/04_physics_and_collisions/10_collision_with_object_removal/app/ball.rb
     class Ball
       #TODO limit accessors?
       attr_accessor :xy, :width, :height, :velocity
     
     
    -  #@xy [Vector2d] x,y position
    -  #@velocity [Vector2d] velocity of ball
    -  def initialize
    -    @xy = Vector2d.new(WIDTH/2,500)
    -    @velocity = Vector2d.new(4,-4)
    -    @width =  20
    -    @height = 20
    +  #@xy [Vector2d] x,y position
    +  #@velocity [Vector2d] velocity of ball
    +  def initialize
    +    @xy = Vector2d.new(WIDTH/2,500)
    +    @velocity = Vector2d.new(4,-4)
    +    @width =  20
    +    @height = 20
    +  end
    +
    +  #move the ball according to its velocity
    +  def update args
    +    @xy.x+=@velocity.x
    +    @xy.y+=@velocity.y
    +  end
    +
    +  #render the ball to the screen
    +  def render args
    +    args.outputs.solids << [@xy.x,@xy.y,@width,@height,255,0,255];
    +    #args.outputs.labels << [20,HEIGHT-50,"velocity: " +@velocity.x.to_s+","+@velocity.y.to_s + "   magnitude:" + @velocity.mag.to_s]
    +  end
    +
    +  def rect
    +    [@xy.x,@xy.y,@width,@height]
    +  end
    +
    +end
    +
    +
    +

    Physics And Collisions - Collision With Object Removal - linear_collider.rb

    +
    # ./samples/04_physics_and_collisions/10_collision_with_object_removal/app/linear_collider.rb
    +#The LinearCollider (theoretically) produces collisions upon a line segment defined point.y two x,y cordinates
    +
    +class LinearCollider
    +
    +  #start [Array of length 2] start of the line segment as a x,y cordinate
    +  #last [Array of length 2] end of the line segment as a x,y cordinate
    +
    +  #inorder for the LinearCollider to be functional the line segment must be said to have a thickness
    +  #(as it is unlikly that a colliding object will land exactly on the linesegment)
    +
    +  #extension defines if the line's thickness extends negatively or positively
    +  #extension :pos     extends positively
    +  #extension :neg     extends negatively
    +
    +  #thickness [float] how thick the line should be (should always be atleast as large as the magnitude of the colliding object)
    +  def initialize (pointA, pointB, extension=:neg, thickness=10)
    +    @pointA = pointA
    +    @pointB = pointB
    +    @thickness = thickness
    +    @extension = extension
    +
    +    @pointAExtended={
    +      x: @pointA.x + @thickness*(@extension == :neg ? -1 : 1),
    +      y: @pointA.y + @thickness*(@extension == :neg ? -1 : 1)
    +    }
    +    @pointBExtended={
    +      x: @pointB.x + @thickness*(@extension == :neg ? -1 : 1),
    +      y: @pointB.y + @thickness*(@extension == :neg ? -1 : 1)
    +    }
    +
    +  end
    +
    +  def resetPoints(pointA,pointB)
    +    @pointA = pointA
    +    @pointB = pointB
    +
    +    @pointAExtended={
    +      x:@pointA.x + @thickness*(@extension == :neg ? -1 : 1),
    +      y:@pointA.y + @thickness*(@extension == :neg ? -1 : 1)
    +    }
    +    @pointBExtended={
    +      x:@pointB.x + @thickness*(@extension == :neg ? -1 : 1),
    +      y:@pointB.y + @thickness*(@extension == :neg ? -1 : 1)
    +    }
    +  end
    +
    +  #TODO: Ugly function
    +  def slope (pointA, pointB)
    +    return (pointB.x==pointA.x) ? INFINITY : (pointB.y+-pointA.y)/(pointB.x+-pointA.x)
    +  end
    +
    +  #TODO: Ugly function
    +  def intercept(pointA, pointB)
    +    if (slope(pointA, pointB) == INFINITY)
    +      -INFINITY
    +    elsif slope(pointA, pointB) == -1*INFINITY
    +      INFINITY
    +    else
    +      pointA.y+-1.0*(slope(pointA, pointB)*pointA.x)
    +    end
    +  end
    +
    +  def calcY(pointA, pointB, x)
    +    return slope(pointA, pointB)*x + intercept(pointA, pointB)
    +  end
    +
    +  #test if a collision has occurred
    +  def isCollision? (point)
    +    #INFINITY slop breaks down when trying to determin collision, ergo it requires a special test
    +    if slope(@pointA, @pointB) ==  INFINITY &&
    +      point.x >= [@pointA.x,@pointB.x].min+(@extension == :pos ? -@thickness : 0) &&
    +      point.x <= [@pointA.x,@pointB.x].max+(@extension == :neg ?  @thickness : 0) &&
    +      point.y >= [@pointA.y,@pointB.y].min && point.y <= [@pointA.y,@pointB.y].max
    +        return true
    +    end
    +
    +    isNegInLine   = @extension == :neg &&
    +                    point.y <= slope(@pointA, @pointB)*point.x+intercept(@pointA,@pointB) &&
    +                    point.y >= point.x*slope(@pointAExtended, @pointBExtended)+intercept(@pointAExtended,@pointBExtended)
    +    isPosInLine   = @extension == :pos &&
    +                    point.y >= slope(@pointA, @pointB)*point.x+intercept(@pointA,@pointB) &&
    +                    point.y <= point.x*slope(@pointAExtended, @pointBExtended)+intercept(@pointAExtended,@pointBExtended)
    +    isInBoxBounds = point.x >= [@pointA.x,@pointB.x].min &&
    +                    point.x <= [@pointA.x,@pointB.x].max &&
    +                    point.y >= [@pointA.y,@pointB.y].min+(@extension == :neg ? -@thickness : 0) &&
    +                    point.y <= [@pointA.y,@pointB.y].max+(@extension == :pos ? @thickness : 0)
    +
    +    return isInBoxBounds && (isNegInLine || isPosInLine)
    +
    +  end
    +
    +  def getRepelMagnitude (fbx, fby, vrx, vry, args)
    +    a = fbx ; b = vrx ; c = fby
    +    d = vry ; e = args.state.ball.velocity.mag
    +
    +    if b**2 + d**2 == 0
    +      puts "magnitude error"
    +    end
    +
    +    x1 = (-a*b+-c*d + (e**2 * b**2 - b**2 * c**2 + 2*a*b*c*d + e**2 + d**2 - a**2 * d**2)**0.5)/(b**2 + d**2)
    +    x2 = -((a*b + c*d + (e**2 * b**2 - b**2 * c**2 + 2*a*b*c*d + e**2 * d**2 - a**2 * d**2)**0.5)/(b**2 + d**2))
    +    return ((a+x1*b)**2 + (c+x1*d)**2 == e**2) ? x1 : x2
    +  end
    +
    +  def update args
    +    #each of the four points on the square ball - NOTE simple to extend to a circle
    +    points= [ {x: args.state.ball.xy.x,                          y: args.state.ball.xy.y},
    +              {x: args.state.ball.xy.x+args.state.ball.width,    y: args.state.ball.xy.y},
    +              {x: args.state.ball.xy.x,                          y: args.state.ball.xy.y+args.state.ball.height},
    +              {x: args.state.ball.xy.x+args.state.ball.width,    y: args.state.ball.xy.y + args.state.ball.height}
    +            ]
    +
    +    #for each point p in points
    +    for point in points
    +      #isCollision.md has more information on this section
    +      #TODO: section can certainly be simplifyed
    +      if isCollision?(point)
    +        u = Vector2d.new(1.0,((slope(@pointA, @pointB)==0) ? INFINITY : -1/slope(@pointA, @pointB))*1.0).normalize #normal perpendicular (to line segment) vector
    +
    +        #the vector with the repeling force can be u or -u depending of where the ball was coming from in relation to the line segment
    +        previousBallPosition=Vector2d.new(point.x-args.state.ball.velocity.x,point.y-args.state.ball.velocity.y)
    +        choiceA = (u.mult(1))
    +        choiceB =  (u.mult(-1))
    +        vectorRepel = nil
    +
    +        if (slope(@pointA, @pointB))!=INFINITY && u.y < 0
    +          choiceA, choiceB = choiceB, choiceA
    +        end
    +        vectorRepel = (previousBallPosition.y > calcY(@pointA, @pointB, previousBallPosition.x)) ? choiceA : choiceB
    +
    +        #vectorRepel = (previousBallPosition.y > slope(@pointA, @pointB)*previousBallPosition.x+intercept(@pointA,@pointB)) ? choiceA : choiceB)
    +        if (slope(@pointA, @pointB) == INFINITY) #slope INFINITY breaks down in the above test, ergo it requires a custom test
    +          vectorRepel = (previousBallPosition.x > @pointA.x) ? (u.mult(1)) : (u.mult(-1))
    +        end
    +        #puts ("     " + $t[0].to_s + "," + $t[1].to_s + "    " + $t[2].to_s + "," + $t[3].to_s + "     " + "   " + u.x.to_s + "," + u.y.to_s)
    +        #vectorRepel now has the repeling force
    +
    +        mag = args.state.ball.velocity.mag
    +        theta_ball=Math.atan2(args.state.ball.velocity.y,args.state.ball.velocity.x) #the angle of the ball's velocity
    +        theta_repel=Math.atan2(vectorRepel.y,vectorRepel.x) #the angle of the repeling force
    +        #puts ("theta:" + theta_ball.to_s + " " + theta_repel.to_s) #theta okay
    +
    +        fbx = mag * Math.cos(theta_ball) #the x component of the ball's velocity
    +        fby = mag * Math.sin(theta_ball) #the y component of the ball's velocity
    +
    +        repelMag = getRepelMagnitude(fbx, fby, vectorRepel.x, vectorRepel.y, args)
    +
    +        frx = repelMag* Math.cos(theta_repel) #the x component of the repel's velocity | magnitude is set to twice of fbx
    +        fry = repelMag* Math.sin(theta_repel) #the y component of the repel's velocity | magnitude is set to twice of fby
    +
    +        fsumx = fbx+frx #sum of x forces
    +        fsumy = fby+fry #sum of y forces
    +        fr = mag#fr is the resulting magnitude
    +        thetaNew = Math.atan2(fsumy, fsumx)  #thetaNew is the resulting angle
    +        xnew = fr*Math.cos(thetaNew) #resulting x velocity
    +        ynew = fr*Math.sin(thetaNew) #resulting y velocity
    +
    +        args.state.ball.velocity = Vector2d.new(xnew,ynew)
    +        #args.state.ball.xy.add(args.state.ball.velocity)
    +        break #no need to check the other points ?
    +      else
    +      end
    +    end
    +  end #end update
    +
    +end
    +
    +
    +

    Physics And Collisions - Collision With Object Removal - main.rb

    +
    # ./samples/04_physics_and_collisions/10_collision_with_object_removal/app/main.rb
    +# coding: utf-8
    +INFINITY= 10**10
    +WIDTH=1280
    +HEIGHT=720
    +
    +require 'app/vector2d.rb'
    +require 'app/paddle.rb'
    +require 'app/ball.rb'
    +require 'app/linear_collider.rb'
    +
    +#Method to init default values
    +def defaults args
    +  args.state.game_board ||= [(args.grid.w / 2 - args.grid.w / 4), 0, (args.grid.w / 2), args.grid.h]
    +  args.state.bricks ||= []
    +  args.state.num_bricks ||= 0
    +  args.state.game_over_at ||= 0
    +  args.state.paddle ||= Paddle.new
    +  args.state.ball   ||= Ball.new
    +  args.state.westWall  ||= LinearCollider.new({x: args.grid.w/4,      y: 0},          {x: args.grid.w/4,      y: args.grid.h}, :pos)
    +  args.state.eastWall  ||= LinearCollider.new({x: 3*args.grid.w*0.25, y: 0},          {x: 3*args.grid.w*0.25, y: args.grid.h})
    +  args.state.southWall ||= LinearCollider.new({x: 0,                  y: 0},          {x: args.grid.w,        y: 0})
    +  args.state.northWall ||= LinearCollider.new({x: 0,                  y:args.grid.h}, {x: args.grid.w,        y: args.grid.h}, :pos)
    +
    +  #args.state.testWall ||= LinearCollider.new({x:0 , y:0},{x:args.grid.w, y:args.grid.h})
    +end
    +
    +#Render loop
    +def render args
    +  render_instructions args
    +  render_board args
    +  render_bricks args
    +end
    +
    +begin :render_methods
    +  #Method to display the instructions of the game
    +  def render_instructions args
    +    args.outputs.labels << [225, args.grid.h - 30, "← and → to move the paddle left and right",  0, 1]
    +  end
    +
    +  def render_board args
    +    args.outputs.borders << args.state.game_board
    +  end
    +
    +  def render_bricks args
    +    args.outputs.solids << args.state.bricks.map(&:rect)
    +  end
    +end
    +
    +#Calls all methods necessary for performing calculations
    +def calc args
    +  add_new_bricks args
    +  reset_game args
    +  calc_collision args
    +  win_game args
    +
    +  args.state.westWall.update args
    +  args.state.eastWall.update args
    +  args.state.southWall.update args
    +  args.state.northWall.update args
    +  args.state.paddle.update args
    +  args.state.ball.update args
    +
    +  #args.state.testWall.update args
    +
    +  args.state.paddle.render args
    +  args.state.ball.render args
    +end
    +
    +begin :calc_methods
    +  def add_new_bricks args
    +    return if args.state.num_bricks > 40
    +
    +    #Width of the game board is 640px
    +    brick_width = (args.grid.w / 2) / 10
    +    brick_height = brick_width / 2
    +
    +    (4).map_with_index do |y|
    +      #Make a box that is 10 bricks wide and 4 bricks tall
    +      args.state.bricks += (10).map_with_index do |x|
    +        args.state.new_entity(:brick) do |b|
    +          b.x = x * brick_width + (args.grid.w / 2 - args.grid.w / 4)
    +          b.y = args.grid.h - ((y + 1) * brick_height)
    +          b.rect = [b.x + 1, b.y - 1, brick_width - 2, brick_height - 2, 235, 50 * y, 52]
    +
    +          #Add linear colliders to the brick
    +          b.collider_bottom = LinearCollider.new([(b.x-2), (b.y-5)], [(b.x+brick_width+1), (b.y-5)], :pos, brick_height)
    +          b.collider_right = LinearCollider.new([(b.x+brick_width+1), (b.y-5)], [(b.x+brick_width+1), (b.y+brick_height+1)], :pos)
    +          b.collider_left = LinearCollider.new([(b.x-2), (b.y-5)], [(b.x-2), (b.y+brick_height+1)], :neg)
    +          b.collider_top = LinearCollider.new([(b.x-2), (b.y+brick_height+1)], [(b.x+brick_width+1), (b.y+brick_height+1)], :neg)
    +
    +          # @xyCollision  = LinearCollider.new({x: @x,y: @y+@height}, {x: @x+@width, y: @y+@height})
    +          # @xyCollision2 = LinearCollider.new({x: @x,y: @y}, {x: @x+@width, y: @y}, :pos)
    +          # @xyCollision3 = LinearCollider.new({x: @x,y: @y}, {x: @x, y: @y+@height})
    +          # @xyCollision4 = LinearCollider.new({x: @x+@width,y: @y}, {x: @x+@width, y: @y+@height}, :pos)
    +
    +          b.broken = false
    +
    +          args.state.num_bricks += 1
    +        end
    +      end
    +    end
    +  end
    +
    +  def reset_game args
    +    if args.state.ball.xy.y < 20 && args.state.game_over_at.elapsed_time > 60
    +      #Freeze the ball
    +      args.state.ball.velocity.x = 0
    +      args.state.ball.velocity.y = 0
    +      #Freeze the paddle
    +      args.state.paddle.enabled = false
    +
    +      args.state.game_over_at = args.state.tick_count
    +    end
    +
    +    if args.state.game_over_at.elapsed_time < 60 && args.state.tick_count > 60 && args.state.bricks.count != 0
    +      #Display a "Game over" message
    +      args.outputs.labels << [100, 100, "GAME OVER", 10]
    +    end
    +
    +    #If 60 frames have passed since the game ended, restart the game
    +    if args.state.game_over_at != 0 && args.state.game_over_at.elapsed_time == 60
    +      # FIXME: only put value types in state
    +      args.state.ball = Ball.new
    +
    +      # FIXME: only put value types in state
    +      args.state.paddle = Paddle.new
    +
    +      args.state.bricks = []
    +      args.state.num_bricks = 0
    +    end
    +  end
    +
    +  def calc_collision args
    +    #Remove the brick if it is hit with the ball
    +    ball = args.state.ball
    +    ball_rect = [ball.xy.x, ball.xy.y, 20, 20]
    +
    +    #Loop through each brick to see if the ball is colliding with it
    +    args.state.bricks.each do |b|
    +      if b.rect.intersect_rect?(ball_rect)
    +        #Run the linear collider for the brick if there is a collision
    +        b[:collider_bottom].update args
    +        b[:collider_right].update args
    +        b[:collider_left].update args
    +        b[:collider_top].update args
    +
    +        b.broken = true
    +      end
    +    end
    +
    +    args.state.bricks = args.state.bricks.reject(&:broken)
    +  end
    +
    +  def win_game args
    +    if args.state.bricks.count == 0 && args.state.game_over_at.elapsed_time > 60
    +      #Freeze the ball
    +      args.state.ball.velocity.x = 0
    +      args.state.ball.velocity.y = 0
    +      #Freeze the paddle
    +      args.state.paddle.enabled = false
    +
    +      args.state.game_over_at = args.state.tick_count
    +    end
    +
    +    if args.state.game_over_at.elapsed_time < 60 && args.state.tick_count > 60 && args.state.bricks.count == 0
    +      #Display a "Game over" message
    +      args.outputs.labels << [100, 100, "CONGRATULATIONS!", 10]
    +    end
    +  end
    +
    +end
    +
    +def tick args
    +  defaults args
    +  render args
    +  calc args
    +
    +  #args.outputs.lines << [0, 0, args.grid.w, args.grid.h]
    +
    +  #$tc+=1
    +  #if $tc == 5
    +    #$train << [args.state.ball.xy.x, args.state.ball.xy.y]
    +    #$tc = 0
    +  #end
    +  #for t in $train
    +
    +    #args.outputs.solids << [t[0],t[1],5,5,255,0,0];
    +  #end
    +end
    +
    +
    +

    Physics And Collisions - Collision With Object Removal - paddle.rb

    +
    # ./samples/04_physics_and_collisions/10_collision_with_object_removal/app/paddle.rb
    +class Paddle
    +  attr_accessor :enabled
    +
    +  def initialize ()
    +    @x=WIDTH/2
    +    @y=100
    +    @width=100
    +    @height=20
    +    @speed=10
    +
    +    @xyCollision  = LinearCollider.new({x: @x,y: @y+@height+5}, {x: @x+@width, y: @y+@height+5})
    +    @xyCollision2 = LinearCollider.new({x: @x,y: @y}, {x: @x+@width, y: @y}, :pos)
    +    @xyCollision3 = LinearCollider.new({x: @x,y: @y}, {x: @x, y: @y+@height+5})
    +    @xyCollision4 = LinearCollider.new({x: @x+@width,y: @y}, {x: @x+@width, y: @y+@height+5}, :pos)
    +
    +    @enabled = true
    +  end
    +
    +  def update args
    +    @xyCollision.resetPoints({x: @x,y: @y+@height+5}, {x: @x+@width, y: @y+@height+5})
    +    @xyCollision2.resetPoints({x: @x,y: @y}, {x: @x+@width, y: @y})
    +    @xyCollision3.resetPoints({x: @x,y: @y}, {x: @x, y: @y+@height+5})
    +    @xyCollision4.resetPoints({x: @x+@width,y: @y}, {x: @x+@width, y: @y+@height+5})
    +
    +    @xyCollision.update  args
    +    @xyCollision2.update args
    +    @xyCollision3.update args
    +    @xyCollision4.update args
    +
    +    args.inputs.keyboard.key_held.left  ||= false
    +    args.inputs.keyboard.key_held.right  ||= false
    +
    +    if not (args.inputs.keyboard.key_held.left == args.inputs.keyboard.key_held.right)
    +      if args.inputs.keyboard.key_held.left && @enabled
    +        @x-=@speed
    +      elsif args.inputs.keyboard.key_held.right && @enabled
    +        @x+=@speed
    +      end
    +    end
    +
    +    xmin =WIDTH/4
    +    xmax = 3*(WIDTH/4)
    +    @x = (@x+@width > xmax) ? xmax-@width : (@x
    +

    Physics And Collisions - Collision With Object Removal - tests.rb

    +
    # ./samples/04_physics_and_collisions/10_collision_with_object_removal/app/tests.rb
    +# For advanced users:
    +# You can put some quick verification tests here, any method
    +# that starts with the `test_` will be run when you save this file.
    +
    +# Here is an example test and game
    +
    +# To run the test: ./dragonruby mygame --eval app/tests.rb --no-tick
    +
    +class MySuperHappyFunGame
    +  attr_gtk
    +
    +  def tick
    +    outputs.solids << [100, 100, 300, 300]
    +  end
    +end
    +
    +def test_universe args, assert
    +  game = MySuperHappyFunGame.new
    +  game.args = args
    +  game.tick
    +  assert.true!  args.outputs.solids.length == 1, "failure: a solid was not added after tick"
    +  assert.false! 1 == 2, "failure: some how, 1 equals 2, the world is ending"
    +  puts "test_universe completed successfully"
    +end
    +
    +puts "running tests"
    +$gtk.reset 100
    +$gtk.log_level = :off
    +$gtk.tests.start
    +
    +
    +

    Physics And Collisions - Collision With Object Removal - vector2d.rb

    +
    # ./samples/04_physics_and_collisions/10_collision_with_object_removal/app/vector2d.rb
    +
    +class Vector2d
    +  attr_accessor :x, :y
    +
    +  def initialize x=0, y=0
    +    @x=x
    +    @y=y
    +  end
    +
    +  #returns a vector multiplied by scalar x
    +  #x [float] scalar
    +  def mult x
    +    r = Vector2d.new(0,0)
    +    r.x=@x*x
    +    r.y=@y*x
    +    r
    +  end
    +
    +  # vect [Vector2d] vector to copy
    +  def copy vect
    +    Vector2d.new(@x, @y)
    +  end
    +
    +  #returns a new vector equivalent to this+vect
    +  #vect [Vector2d] vector to add to self
    +  def add vect
    +    Vector2d.new(@x+vect.x,@y+vect.y)
       end
     
    -  #move the ball according to its velocity
    -  def update args
    -    @xy.x+=@velocity.x
    -    @xy.y+=@velocity.y
    +  #returns a new vector equivalent to this-vect
    +  #vect [Vector2d] vector to subtract to self
    +  def sub vect
    +    Vector2d.new(@x-vect.c, @y-vect.y)
       end
     
    -  #render the ball to the screen
    -  def render args
    -    args.outputs.solids << [@xy.x,@xy.y,@width,@height,255,0,255];
    -    #args.outputs.labels << [20,HEIGHT-50,"velocity: " +@velocity.x.to_s+","+@velocity.y.to_s + "   magnitude:" + @velocity.mag.to_s]
    +  #return the magnitude of the vector
    +  def mag
    +    ((@x**2)+(@y**2))**0.5
       end
     
    -  def rect
    -    [@xy.x,@xy.y,@width,@height]
    +  #returns a new normalize version of the vector
    +  def normalize
    +    Vector2d.new(@x/mag, @y/mag)
       end
     
    +  #TODO delet?
    +  def distABS vect
    +    (((vect.x-@x)**2+(vect.y-@y)**2)**0.5).abs()
    +  end
     end
     
     
    -

    Physics And Collisions - Collision With Object Removal - linear_collider.rb

    -
    # ./samples/04_physics_and_collisions/10_collision_with_object_removal/app/linear_collider.rb
    -#The LinearCollider (theoretically) produces collisions upon a line segment defined point.y two x,y cordinates
    +

    Mouse - Mouse Click - main.rb

    +
    # ./samples/05_mouse/01_mouse_click/app/main.rb
    +=begin
     
    -class LinearCollider
    + APIs listing that haven't been encountered in previous sample apps:
     
    -  #start [Array of length 2] start of the line segment as a x,y cordinate
    -  #last [Array of length 2] end of the line segment as a x,y cordinate
    + - product: Returns an array of all combinations of elements from all arrays.
     
    -  #inorder for the LinearCollider to be functional the line segment must be said to have a thickness
    -  #(as it is unlikly that a colliding object will land exactly on the linesegment)
    +   For example, [1,2].product([1,2]) would return the following array...
    +   [[1,1], [1,2], [2,1], [2,2]]
    +   More than two arrays can be given to product and it will still work,
    +   such as [1,2].product([1,2],[3,4]). What would product return in this case?
     
    -  #extension defines if the line's thickness extends negatively or positively
    -  #extension :pos     extends positively
    -  #extension :neg     extends negatively
    +   Answer:
    +   [[1,1,3],[1,1,4],[1,2,3],[1,2,4],[2,1,3],[2,1,4],[2,2,3],[2,2,4]]
     
    -  #thickness [float] how thick the line should be (should always be atleast as large as the magnitude of the colliding object)
    -  def initialize (pointA, pointB, extension=:neg, thickness=10)
    -    @pointA = pointA
    -    @pointB = pointB
    -    @thickness = thickness
    -    @extension = extension
    + - num1.fdiv(num2): Returns the float division (will have a decimal) of the two given numbers.
    +   For example, 5.fdiv(2) = 2.5 and 5.fdiv(5) = 1.0
     
    -    @pointAExtended={
    -      x: @pointA.x + @thickness*(@extension == :neg ? -1 : 1),
    -      y: @pointA.y + @thickness*(@extension == :neg ? -1 : 1)
    -    }
    -    @pointBExtended={
    -      x: @pointB.x + @thickness*(@extension == :neg ? -1 : 1),
    -      y: @pointB.y + @thickness*(@extension == :neg ? -1 : 1)
    -    }
    + - yield: Allows you to call a method with a code block and yield to that block.
     
    -  end
    + Reminders:
     
    -  def resetPoints(pointA,pointB)
    -    @pointA = pointA
    -    @pointB = pointB
    + - ARRAY#inside_rect?: Returns true or false depending on if the point is inside the rect.
     
    -    @pointAExtended={
    -      x:@pointA.x + @thickness*(@extension == :neg ? -1 : 1),
    -      y:@pointA.y + @thickness*(@extension == :neg ? -1 : 1)
    -    }
    -    @pointBExtended={
    -      x:@pointB.x + @thickness*(@extension == :neg ? -1 : 1),
    -      y:@pointB.y + @thickness*(@extension == :neg ? -1 : 1)
    -    }
    -  end
    + - String interpolation: Uses #{} syntax; everything between the #{ and the } is evaluated
    +   as Ruby code, and the placeholder is replaced with its corresponding value or result.
     
    -  #TODO: Ugly function
    -  def slope (pointA, pointB)
    -    return (pointB.x==pointA.x) ? INFINITY : (pointB.y+-pointA.y)/(pointB.x+-pointA.x)
    -  end
    + - args.inputs.mouse.click: This property will be set if the mouse was clicked.
     
    -  #TODO: Ugly function
    -  def intercept(pointA, pointB)
    -    if (slope(pointA, pointB) == INFINITY)
    -      -INFINITY
    -    elsif slope(pointA, pointB) == -1*INFINITY
    -      INFINITY
    -    else
    -      pointA.y+-1.0*(slope(pointA, pointB)*pointA.x)
    -    end
    -  end
    + - Ternary operator (?): Will evaluate a statement (just like an if statement)
    +   and perform an action if the result is true or another action if it is false.
     
    -  def calcY(pointA, pointB, x)
    -    return slope(pointA, pointB)*x + intercept(pointA, pointB)
    + - reject: Removes elements from a collection if they meet certain requirements.
    +
    + - args.outputs.borders: An array. The values generate a border.
    +   The parameters are [X, Y, WIDTH, HEIGHT, RED, GREEN, BLUE]
    +   For more information about borders, go to mygame/documentation/03-solids-and-borders.md.
    +
    + - args.outputs.labels: An array. The values generate a label.
    +   The parameters are [X, Y, TEXT, SIZE, ALIGNMENT, RED, GREEN, BLUE, ALPHA, FONT STYLE]
    +   For more information about labels, go to mygame/documentation/02-labels.
    +
    +=end
    +
    +# This sample app is a classic game of Tic Tac Toe.
    +
    +class TicTacToe
    +  attr_accessor :_, :state, :outputs, :inputs, :grid, :gtk
    +
    +  # Starts the game with player x's turn and creates an array (to_a) for space combinations.
    +  # Calls methods necessary for the game to run properly.
    +  def tick
    +    state.current_turn ||= :x
    +    state.space_combinations = [-1, 0, 1].product([-1, 0, 1]).to_a
    +    render_board
    +    input_board
       end
     
    -  #test if a collision has occurred
    -  def isCollision? (point)
    -    #INFINITY slop breaks down when trying to determin collision, ergo it requires a special test
    -    if slope(@pointA, @pointB) ==  INFINITY &&
    -      point.x >= [@pointA.x,@pointB.x].min+(@extension == :pos ? -@thickness : 0) &&
    -      point.x <= [@pointA.x,@pointB.x].max+(@extension == :neg ?  @thickness : 0) &&
    -      point.y >= [@pointA.y,@pointB.y].min && point.y <= [@pointA.y,@pointB.y].max
    -        return true
    +  # Uses borders to create grid squares for the game's board. Also outputs the game pieces using labels.
    +  def render_board
    +    square_size = 80
    +
    +    # Positions the game's board in the center of the screen.
    +    # Try removing what follows grid.w_half or grid.h_half and see how the position changes!
    +    board_left = grid.w_half - square_size * 1.5
    +    board_top  = grid.h_half - square_size * 1.5
    +
    +    # At first glance, the add(1) looks pretty trivial. But if you remove it,
    +    # you'll see that the positioning of the board would be skewed without it!
    +    # Or if you put 2 in the parenthesis, the pieces will be placed in the wrong squares
    +    # due to the change in board placement.
    +    outputs.borders << all_spaces do |x, y, space| # outputs borders for all board spaces
    +      space.border ||= [
    +        board_left + x.add(1) * square_size, # space.border is initialized using this definition
    +        board_top  + y.add(1) * square_size,
    +        square_size,
    +        square_size
    +      ]
         end
     
    -    isNegInLine   = @extension == :neg &&
    -                    point.y <= slope(@pointA, @pointB)*point.x+intercept(@pointA,@pointB) &&
    -                    point.y >= point.x*slope(@pointAExtended, @pointBExtended)+intercept(@pointAExtended,@pointBExtended)
    -    isPosInLine   = @extension == :pos &&
    -                    point.y >= slope(@pointA, @pointB)*point.x+intercept(@pointA,@pointB) &&
    -                    point.y <= point.x*slope(@pointAExtended, @pointBExtended)+intercept(@pointAExtended,@pointBExtended)
    -    isInBoxBounds = point.x >= [@pointA.x,@pointB.x].min &&
    -                    point.x <= [@pointA.x,@pointB.x].max &&
    -                    point.y >= [@pointA.y,@pointB.y].min+(@extension == :neg ? -@thickness : 0) &&
    -                    point.y <= [@pointA.y,@pointB.y].max+(@extension == :pos ? @thickness : 0)
    +    # Again, the calculations ensure that the piece is placed in the center of the grid square.
    +    # Remove the '- 20' and the piece will be placed at the top of the grid square instead of the center.
    +    outputs.labels << filled_spaces do |x, y, space| # put label in each filled space of board
    +          label board_left + x.add(1) * square_size + square_size.fdiv(2),
    +          board_top  + y.add(1) * square_size + square_size - 20,
    +          space.piece # text of label, either "x" or "o"
    +    end
     
    -    return isInBoxBounds && (isNegInLine || isPosInLine)
    +    # Uses a label to output whether x or o won, or if a draw occurred.
    +    # If the game is ongoing, a label shows whose turn it currently is.
    +    outputs.labels << if state.x_won
    +                        label grid.w_half, grid.top - 80, "x won" # the '-80' positions the label 80 pixels lower than top
    +                      elsif state.o_won
    +                        label grid.w_half, grid.top - 80, "o won" # grid.w_half positions the label in the center horizontally
    +                      elsif state.draw
    +                        label grid.w_half, grid.top - 80, "a draw"
    +                      else # if no one won and the game is ongoing
    +                        label grid.w_half, grid.top - 80, "turn: #{state.current_turn}"
    +                      end
    +  end
     
    +  # Calls the methods responsible for handling user input and determining the winner.
    +  # Does nothing unless the mouse is clicked.
    +  def input_board
    +    return unless inputs.mouse.click
    +    input_place_piece
    +    input_restart_game
    +    determine_winner
       end
     
    -  def getRepelMagnitude (fbx, fby, vrx, vry, args)
    -    a = fbx ; b = vrx ; c = fby
    -    d = vry ; e = args.state.ball.velocity.mag
    +  # Handles user input for placing pieces on the board.
    +  def input_place_piece
    +    return if state.game_over
     
    -    if b**2 + d**2 == 0
    -      puts "magnitude error"
    +    # Checks to find the space that the mouse was clicked inside of, and makes sure the space does not already
    +    # have a piece in it.
    +    __, __, space = all_spaces.find do |__, __, space|
    +      inputs.mouse.click.point.inside_rect?(space.border) && !space.piece
         end
     
    -    x1 = (-a*b+-c*d + (e**2 * b**2 - b**2 * c**2 + 2*a*b*c*d + e**2 + d**2 - a**2 * d**2)**0.5)/(b**2 + d**2)
    -    x2 = -((a*b + c*d + (e**2 * b**2 - b**2 * c**2 + 2*a*b*c*d + e**2 * d**2 - a**2 * d**2)**0.5)/(b**2 + d**2))
    -    return ((a+x1*b)**2 + (c+x1*d)**2 == e**2) ? x1 : x2
    +    # The piece that goes into the space belongs to the player whose turn it currently is.
    +    return unless space
    +    space.piece = state.current_turn
    +
    +    # This ternary operator statement allows us to change the current player's turn.
    +    # If it is currently x's turn, it becomes o's turn. If it is not x's turn, it become's x's turn.
    +    state.current_turn = state.current_turn == :x ? :o : :x
       end
     
    -  def update args
    -    #each of the four points on the square ball - NOTE simple to extend to a circle
    -    points= [ {x: args.state.ball.xy.x,                          y: args.state.ball.xy.y},
    -              {x: args.state.ball.xy.x+args.state.ball.width,    y: args.state.ball.xy.y},
    -              {x: args.state.ball.xy.x,                          y: args.state.ball.xy.y+args.state.ball.height},
    -              {x: args.state.ball.xy.x+args.state.ball.width,    y: args.state.ball.xy.y + args.state.ball.height}
    -            ]
    +  # Resets the game.
    +  def input_restart_game
    +    return unless state.game_over
    +    gtk.reset
    +  end
     
    -    #for each point p in points
    -    for point in points
    -      #isCollision.md has more information on this section
    -      #TODO: section can certainly be simplifyed
    -      if isCollision?(point)
    -        u = Vector2d.new(1.0,((slope(@pointA, @pointB)==0) ? INFINITY : -1/slope(@pointA, @pointB))*1.0).normalize #normal perpendicular (to line segment) vector
    +  # Checks if x or o won the game.
    +  # If neither player wins and all nine squares are filled, a draw happens.
    +  # Once a player is chosen as the winner or a draw happens, the game is over.
    +  def determine_winner
    +    state.x_won = won? :x # evaluates to either true or false (boolean values)
    +    state.o_won = won? :o
    +    state.draw = true if filled_spaces.length == 9 && !state.x_won && !state.o_won
    +    state.game_over = state.x_won || state.o_won || state.draw
    +  end
     
    -        #the vector with the repeling force can be u or -u depending of where the ball was coming from in relation to the line segment
    -        previousBallPosition=Vector2d.new(point.x-args.state.ball.velocity.x,point.y-args.state.ball.velocity.y)
    -        choiceA = (u.mult(1))
    -        choiceB =  (u.mult(-1))
    -        vectorRepel = nil
    +  # Determines if a player won by checking if there is a horizontal match or vertical match.
    +  # Horizontal_match and vertical_match have boolean values. If either is true, the game has been won.
    +  def won? piece
    +    # performs action on all space combinations
    +    won = [[-1, 0, 1]].product([-1, 0, 1]).map do |xs, y|
     
    -        if (slope(@pointA, @pointB))!=INFINITY && u.y < 0
    -          choiceA, choiceB = choiceB, choiceA
    -        end
    -        vectorRepel = (previousBallPosition.y > calcY(@pointA, @pointB, previousBallPosition.x)) ? choiceA : choiceB
    +      # Checks if the 3 grid spaces with the same y value (or same row) and
    +      # x values that are next to each other have pieces that belong to the same player.
    +      # Remember, the value of piece is equal to the current turn (which is the player).
    +      horizontal_match = state.spaces[xs[0]][y].piece == piece &&
    +                         state.spaces[xs[1]][y].piece == piece &&
    +                         state.spaces[xs[2]][y].piece == piece
     
    -        #vectorRepel = (previousBallPosition.y > slope(@pointA, @pointB)*previousBallPosition.x+intercept(@pointA,@pointB)) ? choiceA : choiceB)
    -        if (slope(@pointA, @pointB) == INFINITY) #slope INFINITY breaks down in the above test, ergo it requires a custom test
    -          vectorRepel = (previousBallPosition.x > @pointA.x) ? (u.mult(1)) : (u.mult(-1))
    -        end
    -        #puts ("     " + $t[0].to_s + "," + $t[1].to_s + "    " + $t[2].to_s + "," + $t[3].to_s + "     " + "   " + u.x.to_s + "," + u.y.to_s)
    -        #vectorRepel now has the repeling force
    +      # Checks if the 3 grid spaces with the same x value (or same column) and
    +      # y values that are next to each other have pieces that belong to the same player.
    +      # The && represents an "and" statement: if even one part of the statement is false,
    +      # the entire statement evaluates to false.
    +      vertical_match = state.spaces[y][xs[0]].piece == piece &&
    +                       state.spaces[y][xs[1]].piece == piece &&
    +                       state.spaces[y][xs[2]].piece == piece
     
    -        mag = args.state.ball.velocity.mag
    -        theta_ball=Math.atan2(args.state.ball.velocity.y,args.state.ball.velocity.x) #the angle of the ball's velocity
    -        theta_repel=Math.atan2(vectorRepel.y,vectorRepel.x) #the angle of the repeling force
    -        #puts ("theta:" + theta_ball.to_s + " " + theta_repel.to_s) #theta okay
    +      horizontal_match || vertical_match # if either is true, true is returned
    +    end
     
    -        fbx = mag * Math.cos(theta_ball) #the x component of the ball's velocity
    -        fby = mag * Math.sin(theta_ball) #the y component of the ball's velocity
    +    # Sees if there is a diagonal match, starting from the bottom left and ending at the top right.
    +    # Is added to won regardless of whether the statement is true or false.
    +    won << (state.spaces[-1][-1].piece == piece && # bottom left
    +            state.spaces[ 0][ 0].piece == piece && # center
    +            state.spaces[ 1][ 1].piece == piece)   # top right
     
    -        repelMag = getRepelMagnitude(fbx, fby, vectorRepel.x, vectorRepel.y, args)
    +    # Sees if there is a diagonal match, starting at the bottom right and ending at the top left
    +    # and is added to won.
    +    won << (state.spaces[ 1][-1].piece == piece && # bottom right
    +            state.spaces[ 0][ 0].piece == piece && # center
    +            state.spaces[-1][ 1].piece == piece)   # top left
     
    -        frx = repelMag* Math.cos(theta_repel) #the x component of the repel's velocity | magnitude is set to twice of fbx
    -        fry = repelMag* Math.sin(theta_repel) #the y component of the repel's velocity | magnitude is set to twice of fby
    +    # Any false statements (meaning false diagonal matches) are rejected from won
    +    won.reject_false.any?
    +  end
     
    -        fsumx = fbx+frx #sum of x forces
    -        fsumy = fby+fry #sum of y forces
    -        fr = mag#fr is the resulting magnitude
    -        thetaNew = Math.atan2(fsumy, fsumx)  #thetaNew is the resulting angle
    -        xnew = fr*Math.cos(thetaNew) #resulting x velocity
    -        ynew = fr*Math.sin(thetaNew) #resulting y velocity
    +  # Defines filled spaces on the board by rejecting all spaces that do not have game pieces in them.
    +  # The ! before a statement means "not". For example, we are rejecting any space combinations that do
    +  # NOT have pieces in them.
    +  def filled_spaces
    +    state.space_combinations
    +      .reject { |x, y| !state.spaces[x][y].piece } # reject spaces with no pieces in them
    +      .map do |x, y|
    +        if block_given?
    +          yield x, y, state.spaces[x][y]
    +        else
    +          [x, y, state.spaces[x][y]] # sets definition of space
    +        end
    +    end
    +  end
     
    -        args.state.ball.velocity = Vector2d.new(xnew,ynew)
    -        #args.state.ball.xy.add(args.state.ball.velocity)
    -        break #no need to check the other points ?
    -      else
    +  # Defines all spaces on the board.
    +  def all_spaces
    +    if !block_given?
    +      state.space_combinations.map do |x, y|
    +        [x, y, state.spaces[x][y]] # sets definition of space
    +      end
    +    else # if a block is given (block_given? is true)
    +      state.space_combinations.map do |x, y|
    +        yield x, y, state.spaces[x][y] # yield if a block is given
           end
         end
    -  end #end update
    +  end
     
    +  # Sets values for a label, such as the position, value, size, alignment, and color.
    +  def label x, y, value
    +    [x, y + 10, value, 20, 1, 0, 0, 0]
    +  end
     end
     
    -
    -

    Physics And Collisions - Collision With Object Removal - main.rb

    -
    # ./samples/04_physics_and_collisions/10_collision_with_object_removal/app/main.rb
    -# coding: utf-8
    -INFINITY= 10**10
    -WIDTH=1280
    -HEIGHT=720
    +$tic_tac_toe = TicTacToe.new
     
    -require 'app/vector2d.rb'
    -require 'app/paddle.rb'
    -require 'app/ball.rb'
    -require 'app/linear_collider.rb'
    +def tick args
    +  $tic_tac_toe._       = args
    +  $tic_tac_toe.state   = args.state
    +  $tic_tac_toe.outputs = args.outputs
    +  $tic_tac_toe.inputs  = args.inputs
    +  $tic_tac_toe.grid    = args.grid
    +  $tic_tac_toe.gtk     = args.gtk
    +  $tic_tac_toe.tick
    +  tick_instructions args, "Sample app shows how to work with mouse clicks."
    +end
     
    -#Method to init default values
    -def defaults args
    -  args.state.game_board ||= [(args.grid.w / 2 - args.grid.w / 4), 0, (args.grid.w / 2), args.grid.h]
    -  args.state.bricks ||= []
    -  args.state.num_bricks ||= 0
    -  args.state.game_over_at ||= 0
    -  args.state.paddle ||= Paddle.new
    -  args.state.ball   ||= Ball.new
    -  args.state.westWall  ||= LinearCollider.new({x: args.grid.w/4,      y: 0},          {x: args.grid.w/4,      y: args.grid.h}, :pos)
    -  args.state.eastWall  ||= LinearCollider.new({x: 3*args.grid.w*0.25, y: 0},          {x: 3*args.grid.w*0.25, y: args.grid.h})
    -  args.state.southWall ||= LinearCollider.new({x: 0,                  y: 0},          {x: args.grid.w,        y: 0})
    -  args.state.northWall ||= LinearCollider.new({x: 0,                  y:args.grid.h}, {x: args.grid.w,        y: args.grid.h}, :pos)
    +def tick_instructions args, text, y = 715
    +  return if args.state.key_event_occurred
    +  if args.inputs.mouse.click ||
    +     args.inputs.keyboard.directional_vector ||
    +     args.inputs.keyboard.key_down.enter ||
    +     args.inputs.keyboard.key_down.escape
    +    args.state.key_event_occurred = true
    +  end
     
    -  #args.state.testWall ||= LinearCollider.new({x:0 , y:0},{x:args.grid.w, y:args.grid.h})
    +  args.outputs.debug << [0, y - 50, 1280, 60].solid
    +  args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label
    +  args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label
     end
     
    -#Render loop
    -def render args
    -  render_instructions args
    -  render_board args
    -  render_bricks args
    -end
    +
    +

    Mouse - Mouse Move - main.rb

    +
    # ./samples/05_mouse/02_mouse_move/app/main.rb
    +=begin
     
    -begin :render_methods
    -  #Method to display the instructions of the game
    -  def render_instructions args
    -    args.outputs.labels << [225, args.grid.h - 30, "← and → to move the paddle left and right",  0, 1]
    -  end
    + Reminders:
     
    -  def render_board args
    -    args.outputs.borders << args.state.game_board
    -  end
    + - num1.greater(num2): Returns the greater value.
    +   For example, if we have the command
    +   puts 4.greater(3)
    +   the number 4 would be printed to the console since it has a greater value than 3.
    +   Similar to lesser, which returns the lesser value.
     
    -  def render_bricks args
    -    args.outputs.solids << args.state.bricks.map(&:rect)
    -  end
    -end
    + - find_all: Finds all elements of a collection that meet certain requirements.
    +   For example, in this sample app, we're using find_all to find all zombies that have intersected
    +   or hit the player's sprite since these zombies have been killed.
     
    -#Calls all methods necessary for performing calculations
    -def calc args
    -  add_new_bricks args
    -  reset_game args
    -  calc_collision args
    -  win_game args
    + - args.inputs.keyboard.key_down.KEY: Determines if a key is being held or pressed.
    +   Stores the frame the "down" event occurred.
    +   For more information about the keyboard, go to mygame/documentation/06-keyboard.md.
     
    -  args.state.westWall.update args
    -  args.state.eastWall.update args
    -  args.state.southWall.update args
    -  args.state.northWall.update args
    -  args.state.paddle.update args
    -  args.state.ball.update args
    + - args.outputs.sprites: An array. The values generate a sprite.
    +   The parameters are [X, Y, WIDTH, HEIGHT, PATH, ANGLE, ALPHA, RED, GREEN, BLUE]
    +   For more information about sprites, go to mygame/documentation/05-sprites.md.
     
    -  #args.state.testWall.update args
    + - args.state.new_entity: Used when we want to create a new object, like a sprite or button.
    +   When we want to create a new object, we can declare it as a new entity and then define
    +   its properties. (Remember, you can use state to define ANY property and it will
    +   be retained across frames.)
     
    -  args.state.paddle.render args
    -  args.state.ball.render args
    -end
    + - String interpolation: Uses #{} syntax; everything between the #{ and the } is evaluated
    +   as Ruby code, and the placeholder is replaced with its corresponding value or result.
     
    -begin :calc_methods
    -  def add_new_bricks args
    -    return if args.state.num_bricks > 40
    + - map: Ruby method used to transform data; used in arrays, hashes, and collections.
    +   Can be used to perform an action on every element of a collection, such as multiplying
    +   each element by 2 or declaring every element as a new entity.
     
    -    #Width of the game board is 640px
    -    brick_width = (args.grid.w / 2) / 10
    -    brick_height = brick_width / 2
    + - sample: Chooses a random element from the array.
     
    -    (4).map_with_index do |y|
    -      #Make a box that is 10 bricks wide and 4 bricks tall
    -      args.state.bricks += (10).map_with_index do |x|
    -        args.state.new_entity(:brick) do |b|
    -          b.x = x * brick_width + (args.grid.w / 2 - args.grid.w / 4)
    -          b.y = args.grid.h - ((y + 1) * brick_height)
    -          b.rect = [b.x + 1, b.y - 1, brick_width - 2, brick_height - 2, 235, 50 * y, 52]
    + - reject: Removes elements that meet certain requirements.
    +   In this sample app, we're removing/rejecting zombies that reach the center of the screen. We're also
    +   rejecting zombies that were killed more than 30 frames ago.
     
    -          #Add linear colliders to the brick
    -          b.collider_bottom = LinearCollider.new([(b.x-2), (b.y-5)], [(b.x+brick_width+1), (b.y-5)], :pos, brick_height)
    -          b.collider_right = LinearCollider.new([(b.x+brick_width+1), (b.y-5)], [(b.x+brick_width+1), (b.y+brick_height+1)], :pos)
    -          b.collider_left = LinearCollider.new([(b.x-2), (b.y-5)], [(b.x-2), (b.y+brick_height+1)], :neg)
    -          b.collider_top = LinearCollider.new([(b.x-2), (b.y+brick_height+1)], [(b.x+brick_width+1), (b.y+brick_height+1)], :neg)
    +=end
     
    -          # @xyCollision  = LinearCollider.new({x: @x,y: @y+@height}, {x: @x+@width, y: @y+@height})
    -          # @xyCollision2 = LinearCollider.new({x: @x,y: @y}, {x: @x+@width, y: @y}, :pos)
    -          # @xyCollision3 = LinearCollider.new({x: @x,y: @y}, {x: @x, y: @y+@height})
    -          # @xyCollision4 = LinearCollider.new({x: @x+@width,y: @y}, {x: @x+@width, y: @y+@height}, :pos)
    +# This sample app allows users to move around the screen in order to kill zombies. Zombies appear from every direction so the goal
    +# is to kill the zombies as fast as possible!
    +
    +class ProtectThePuppiesFromTheZombies
    +  attr_accessor :grid, :inputs, :state, :outputs
    +
    +  # Calls the methods necessary for the game to run properly.
    +  def tick
    +    defaults
    +    render
    +    calc
    +    input
    +  end
    +
    +  # Sets default values for the zombies and for the player.
    +  # Initialization happens only in the first frame.
    +  def defaults
    +    state.flash_at               ||= 0
    +    state.zombie_min_spawn_rate  ||= 60
    +    state.zombie_spawn_countdown ||= random_spawn_countdown state.zombie_min_spawn_rate
    +    state.zombies                ||= []
    +    state.killed_zombies         ||= []
    +
    +    # Declares player as a new entity and sets its properties.
    +    # The player begins the game in the center of the screen, not moving in any direction.
    +    state.player ||= state.new_entity(:player, { x: 640,
    +                                               y: 360,
    +                                               attack_angle: 0,
    +                                               dx: 0,
    +                                               dy: 0 })
    +  end
     
    -          b.broken = false
    +  # Outputs a gray background.
    +  # Calls the methods needed to output the player, zombies, etc onto the screen.
    +  def render
    +    outputs.solids << [grid.rect, 100, 100, 100]
    +    render_zombies
    +    render_killed_zombies
    +    render_player
    +    render_flash
    +  end
     
    -          args.state.num_bricks += 1
    -        end
    -      end
    +  # Outputs the zombies on the screen and sets values for the sprites, such as the position, width, height, and animation.
    +  def render_zombies
    +    outputs.sprites << state.zombies.map do |z| # performs action on all zombies in the collection
    +      z.sprite = [z.x, z.y, 4 * 3, 8 * 3, animation_sprite(z)].sprite # sets definition for sprite, calls animation_sprite method
    +      z.sprite
         end
       end
     
    -  def reset_game args
    -    if args.state.ball.xy.y < 20 && args.state.game_over_at.elapsed_time > 60
    -      #Freeze the ball
    -      args.state.ball.velocity.x = 0
    -      args.state.ball.velocity.y = 0
    -      #Freeze the paddle
    -      args.state.paddle.enabled = false
    -
    -      args.state.game_over_at = args.state.tick_count
    -    end
    +  # Outputs sprites of killed zombies, and displays a slash image to show that a zombie has been killed.
    +  def render_killed_zombies
    +    outputs.sprites << state.killed_zombies.map do |z| # performs action on all killed zombies in collection
    +      z.sprite = [z.x,
    +                  z.y,
    +                  4 * 3,
    +                  8 * 3,
    +                  animation_sprite(z, z.death_at), # calls animation_sprite method
    +                  0, # angle
    +                  255 * z.death_at.ease(30, :flip)].sprite # transparency of a zombie changes when they die
    +                  # change the value of 30 and see what happens when a zombie is killed
     
    -    if args.state.game_over_at.elapsed_time < 60 && args.state.tick_count > 60 && args.state.bricks.count != 0
    -      #Display a "Game over" message
    -      args.outputs.labels << [100, 100, "GAME OVER", 10]
    +      # Sets values to output the slash over the zombie's sprite when a zombie is killed.
    +      # The slash is tilted 45 degrees from the angle of the player's attack.
    +      # Change the 3 inside scale_rect to 30 and the slash will be HUGE! Scale_rect positions
    +      # the slash over the killed zombie's sprite.
    +      [z.sprite, [z.sprite.rect, 'sprites/slash.png', 45 + state.player.attack_angle_on_click, z.sprite.a].scale_rect(3, 0.5, 0.5)]
         end
    +  end
     
    -    #If 60 frames have passed since the game ended, restart the game
    -    if args.state.game_over_at != 0 && args.state.game_over_at.elapsed_time == 60
    -      # FIXME: only put value types in state
    -      args.state.ball = Ball.new
    +  # Outputs the player sprite using the images in the sprites folder.
    +  def render_player
    +    state.player_sprite = [state.player.x,
    +                           state.player.y,
    +                          4 * 3,
    +                          8 * 3, "sprites/player-#{animation_index(state.player.created_at_elapsed)}.png"] # string interpolation
    +    outputs.sprites << state.player_sprite
     
    -      # FIXME: only put value types in state
    -      args.state.paddle = Paddle.new
    +    # Outputs a small red square that previews the angles that the player can attack in.
    +    # It can be moved in a perfect circle around the player to show possible movements.
    +    # Change the 60 in the parenthesis and see what happens to the movement of the red square.
    +    outputs.solids <<  [state.player.x + state.player.attack_angle.vector_x(60),
    +                        state.player.y + state.player.attack_angle.vector_y(60),
    +                        3, 3, 255, 0, 0]
    +  end
     
    -      args.state.bricks = []
    -      args.state.num_bricks = 0
    -    end
    +  # Renders flash as a solid. The screen turns white for 10 frames when a zombie is killed.
    +  def render_flash
    +    return if state.flash_at.elapsed_time > 10 # return if more than 10 frames have passed since flash.
    +    # Transparency gradually changes (or eases) during the 10 frames of flash.
    +    outputs.primitives << [grid.rect, 255, 255, 255, 255 * state.flash_at.ease(10, :flip)].solid
       end
     
    -  def calc_collision args
    -    #Remove the brick if it is hit with the ball
    -    ball = args.state.ball
    -    ball_rect = [ball.xy.x, ball.xy.y, 20, 20]
    +  # Calls all methods necessary for performing calculations.
    +  def calc
    +    calc_spawn_zombie
    +    calc_move_zombies
    +    calc_player
    +    calc_kill_zombie
    +  end
     
    -    #Loop through each brick to see if the ball is colliding with it
    -    args.state.bricks.each do |b|
    -      if b.rect.intersect_rect?(ball_rect)
    -        #Run the linear collider for the brick if there is a collision
    -        b[:collider_bottom].update args
    -        b[:collider_right].update args
    -        b[:collider_left].update args
    -        b[:collider_top].update args
    +  # Decreases the zombie spawn countdown by 1 if it has a value greater than 0.
    +  def calc_spawn_zombie
    +    if state.zombie_spawn_countdown > 0
    +      state.zombie_spawn_countdown -= 1
    +      return
    +    end
     
    -        b.broken = true
    +    # New zombies are created, positioned on the screen, and added to the zombies collection.
    +    state.zombies << state.new_entity(:zombie) do |z| # each zombie is declared a new entity
    +      if rand > 0.5
    +        z.x = grid.rect.w.randomize(:ratio) # random x position on screen (within grid scope)
    +        z.y = [-10, 730].sample # y position is set to either -10 or 730 (randomly chosen)
    +        # the possible values exceed the screen's scope so zombies appear to be coming from far away
    +      else
    +        z.x = [-10, 1290].sample # x position is set to either -10 or 1290 (randomly chosen)
    +        z.y = grid.rect.w.randomize(:ratio) # random y position on screen
           end
         end
     
    -    args.state.bricks = args.state.bricks.reject(&:broken)
    +    # Calls random_spawn_countdown method (determines how fast new zombies appear)
    +    state.zombie_spawn_countdown = random_spawn_countdown state.zombie_min_spawn_rate
    +    state.zombie_min_spawn_rate -= 1
    +    # set to either the current zombie_min_spawn_rate or 0, depending on which value is greater
    +    state.zombie_min_spawn_rate  = state.zombie_min_spawn_rate.greater(0)
       end
     
    -  def win_game args
    -    if args.state.bricks.count == 0 && args.state.game_over_at.elapsed_time > 60
    -      #Freeze the ball
    -      args.state.ball.velocity.x = 0
    -      args.state.ball.velocity.y = 0
    -      #Freeze the paddle
    -      args.state.paddle.enabled = false
    -
    -      args.state.game_over_at = args.state.tick_count
    -    end
    -
    -    if args.state.game_over_at.elapsed_time < 60 && args.state.tick_count > 60 && args.state.bricks.count == 0
    -      #Display a "Game over" message
    -      args.outputs.labels << [100, 100, "CONGRATULATIONS!", 10]
    +  # Moves all zombies towards the center of the screen.
    +  # All zombies that reach the center (640, 360) are rejected from the zombies collection and disappear.
    +  def calc_move_zombies
    +    state.zombies.each do |z| # for each zombie in the collection
    +      z.y = z.y.towards(360, 0.1) # move the zombie towards the center (640, 360) at a rate of 0.1
    +      z.x = z.x.towards(640, 0.1) # change 0.1 to 1.1 and see how much faster the zombies move to the center
         end
    +    state.zombies = state.zombies.reject { |z| z.y == 360 && z.x == 640 } # remove zombies that are in center
       end
     
    -end
    -
    -def tick args
    -  defaults args
    -  render args
    -  calc args
    +  # Calculates the position and movement of the player on the screen.
    +  def calc_player
    +    state.player.x += state.player.dx # changes x based on dx (change in x)
    +    state.player.y += state.player.dy # changes y based on dy (change in y)
     
    -  #args.outputs.lines << [0, 0, args.grid.w, args.grid.h]
    +    state.player.dx *= 0.9 # scales dx down
    +    state.player.dy *= 0.9 # scales dy down
     
    -  #$tc+=1
    -  #if $tc == 5
    -    #$train << [args.state.ball.xy.x, args.state.ball.xy.y]
    -    #$tc = 0
    -  #end
    -  #for t in $train
    +    # Compares player's x to 1280 to find lesser value, then compares result to 0 to find greater value.
    +    # This ensures that the player remains within the screen's scope.
    +    state.player.x = state.player.x.lesser(1280).greater(0)
    +    state.player.y = state.player.y.lesser(720).greater(0) # same with player's y
    +  end
     
    -    #args.outputs.solids << [t[0],t[1],5,5,255,0,0];
    -  #end
    -end
    +  # Finds all zombies that intersect with the player's sprite. These zombies are removed from the zombies collection
    +  # and added to the killed_zombies collection since any zombie that intersects with the player is killed.
    +  def calc_kill_zombie
     
    -
    -

    Physics And Collisions - Collision With Object Removal - paddle.rb

    -
    # ./samples/04_physics_and_collisions/10_collision_with_object_removal/app/paddle.rb
    -class Paddle
    -  attr_accessor :enabled
    +    # Find all zombies that intersect with the player. They are considered killed.
    +    killed_this_frame = state.zombies.find_all { |z| z.sprite.intersect_rect? state.player_sprite }
    +    state.zombies = state.zombies - killed_this_frame # remove newly killed zombies from zombies collection
    +    state.killed_zombies += killed_this_frame # add newly killed zombies to killed zombies
     
    -  def initialize ()
    -    @x=WIDTH/2
    -    @y=100
    -    @width=100
    -    @height=20
    -    @speed=10
    +    if killed_this_frame.length > 0 # if atleast one zombie was killed in the frame
    +      state.flash_at = state.tick_count # flash_at set to the frame when the zombie was killed
    +    # Don't forget, the rendered flash lasts for 10 frames after the zombie is killed (look at render_flash method)
    +    end
     
    -    @xyCollision  = LinearCollider.new({x: @x,y: @y+@height+5}, {x: @x+@width, y: @y+@height+5})
    -    @xyCollision2 = LinearCollider.new({x: @x,y: @y}, {x: @x+@width, y: @y}, :pos)
    -    @xyCollision3 = LinearCollider.new({x: @x,y: @y}, {x: @x, y: @y+@height+5})
    -    @xyCollision4 = LinearCollider.new({x: @x+@width,y: @y}, {x: @x+@width, y: @y+@height+5}, :pos)
    +    # Sets the tick_count (passage of time) as the value of the death_at variable for each killed zombie.
    +    # Death_at stores the frame a zombie was killed.
    +    killed_this_frame.each do |z|
    +      z.death_at = state.tick_count
    +    end
     
    -    @enabled = true
    +    # Zombies are rejected from the killed_zombies collection depending on when they were killed.
    +    # They are rejected if more than 30 frames have passed since their death.
    +    state.killed_zombies = state.killed_zombies.reject { |z| state.tick_count - z.death_at > 30 }
       end
     
    -  def update args
    -    @xyCollision.resetPoints({x: @x,y: @y+@height+5}, {x: @x+@width, y: @y+@height+5})
    -    @xyCollision2.resetPoints({x: @x,y: @y}, {x: @x+@width, y: @y})
    -    @xyCollision3.resetPoints({x: @x,y: @y}, {x: @x, y: @y+@height+5})
    -    @xyCollision4.resetPoints({x: @x+@width,y: @y}, {x: @x+@width, y: @y+@height+5})
    +  # Uses input from the user to move the player around the screen.
    +  def input
     
    -    @xyCollision.update  args
    -    @xyCollision2.update args
    -    @xyCollision3.update args
    -    @xyCollision4.update args
    +    # If the "a" key or left key is pressed, the x position of the player decreases.
    +    # Otherwise, if the "d" key or right key is pressed, the x position of the player increases.
    +    if inputs.keyboard.key_held.a || inputs.keyboard.key_held.left
    +      state.player.x -= 5
    +    elsif inputs.keyboard.key_held.d || inputs.keyboard.key_held.right
    +      state.player.x += 5
    +    end
     
    -    args.inputs.keyboard.key_held.left  ||= false
    -    args.inputs.keyboard.key_held.right  ||= false
    +    # If the "w" or up key is pressed, the y position of the player increases.
    +    # Otherwise, if the "s" or down key is pressed, the y position of the player decreases.
    +    if inputs.keyboard.key_held.w || inputs.keyboard.key_held.up
    +      state.player.y += 5
    +    elsif inputs.keyboard.key_held.s || inputs.keyboard.key_held.down
    +      state.player.y -= 5
    +    end
     
    -    if not (args.inputs.keyboard.key_held.left == args.inputs.keyboard.key_held.right)
    -      if args.inputs.keyboard.key_held.left && @enabled
    -        @x-=@speed
    -      elsif args.inputs.keyboard.key_held.right && @enabled
    -        @x+=@speed
    -      end
    +    # Sets the attack angle so the player can move and attack in the precise direction it wants to go.
    +    # If the mouse is moved, the attack angle is changed (based on the player's position and mouse position).
    +    # Attack angle also contributes to the position of red square.
    +    if inputs.mouse.moved
    +      state.player.attack_angle = inputs.mouse.position.angle_from [state.player.x, state.player.y]
         end
     
    -    xmin =WIDTH/4
    -    xmax = 3*(WIDTH/4)
    -    @x = (@x+@width > xmax) ? xmax-@width : (@x
    -

    Physics And Collisions - Collision With Object Removal - tests.rb

    -
    # ./samples/04_physics_and_collisions/10_collision_with_object_removal/app/tests.rb
    -# For advanced users:
    -# You can put some quick verification tests here, any method
    -# that starts with the `test_` will be run when you save this file.
    +

    Mouse - Mouse Move Paint App - main.rb

    +
    # ./samples/05_mouse/03_mouse_move_paint_app/app/main.rb
    +=begin
     
    -# Here is an example test and game
    + APIs listing that haven't been encountered in previous sample apps:
     
    -# To run the test: ./dragonruby mygame --eval app/tests.rb --no-tick
    + - Floor: Method that returns an integer number smaller than or equal to the original with no decimal.
     
    -class MySuperHappyFunGame
    -  attr_gtk
    +   For example, if we have a variable, a = 13.7, and we called floor on it, it would look like this...
    +   puts a.floor()
    +   which would print out 13.
    +   (There is also a ceil method, which returns an integer number greater than or equal to the original
    +   with no decimal. If we had called ceil on the variable a, the result would have been 14.)
     
    -  def tick
    -    outputs.solids << [100, 100, 300, 300]
    -  end
    -end
    + Reminders:
     
    -def test_universe args, assert
    -  game = MySuperHappyFunGame.new
    -  game.args = args
    -  game.tick
    -  assert.true!  args.outputs.solids.length == 1, "failure: a solid was not added after tick"
    -  assert.false! 1 == 2, "failure: some how, 1 equals 2, the world is ending"
    -  puts "test_universe completed successfully"
    -end
    + - Hashes: Collection of unique keys and their corresponding values. The value can be found
    +   using their keys.
     
    -puts "running tests"
    -$gtk.reset 100
    -$gtk.log_level = :off
    -$gtk.tests.start
    +   For example, if we have a "numbers" hash that stores numbers in English as the
    +   key and numbers in Spanish as the value, we'd have a hash that looks like this...
    +   numbers = { "one" => "uno", "two" => "dos", "three" => "tres" }
    +   and on it goes.
     
    -
    -

    Physics And Collisions - Collision With Object Removal - vector2d.rb

    -
    # ./samples/04_physics_and_collisions/10_collision_with_object_removal/app/vector2d.rb
    +   Now if we wanted to find the corresponding value of the "one" key, we could say
    +   puts numbers["one"]
    +   which would print "uno" to the console.
     
    -class Vector2d
    -  attr_accessor :x, :y
    + - args.state.new_entity: Used when we want to create a new object, like a sprite or button.
    +   In this sample app, new_entity is used to create a new button that clears the grid.
    +   (Remember, you can use state to define ANY property and it will be retained across frames.)
     
    -  def initialize x=0, y=0
    -    @x=x
    -    @y=y
    -  end
    + - args.inputs.mouse.click.point.(x|y): The x and y location of the mouse.
     
    -  #returns a vector multiplied by scalar x
    -  #x [float] scalar
    -  def mult x
    -    r = Vector2d.new(0,0)
    -    r.x=@x*x
    -    r.y=@y*x
    -    r
    -  end
    + - args.inputs.mouse.click.point.created_at: The frame the mouse click occurred in.
     
    -  # vect [Vector2d] vector to copy
    -  def copy vect
    -    Vector2d.new(@x, @y)
    -  end
    + - args.outputs.labels: An array. The values in the array generate a label.
    +   The parameters are [X, Y, TEXT, SIZE, ALIGN, RED, GREEN, BLUE, ALPHA, FONT STYLE]
    +   For more information about labels, go to mygame/documentation/02-labels.md.
     
    -  #returns a new vector equivalent to this+vect
    -  #vect [Vector2d] vector to add to self
    -  def add vect
    -    Vector2d.new(@x+vect.x,@y+vect.y)
    -  end
    + - ARRAY#inside_rect?: Returns true or false depending on if the point is inside the rect.
     
    -  #returns a new vector equivalent to this-vect
    -  #vect [Vector2d] vector to subtract to self
    -  def sub vect
    -    Vector2d.new(@x-vect.c, @y-vect.y)
    +=end
    +
    +# This sample app shows an empty grid that the user can paint on.
    +# To paint, the user must keep their mouse presssed and drag it around the grid.
    +# The "clear" button allows users to clear the grid so they can start over.
    +
    +class PaintApp
    +  attr_accessor :inputs, :state, :outputs, :grid, :args
    +
    +  # Runs methods necessary for the game to function properly.
    +  def tick
    +    print_title
    +    add_grid
    +    check_click
    +    draw_buttons
       end
     
    -  #return the magnitude of the vector
    -  def mag
    -    ((@x**2)+(@y**2))**0.5
    +  # Prints the title onto the screen by using a label.
    +  # Also separates the title from the grid with a line as a horizontal separator.
    +  def print_title
    +    args.outputs.labels << [ 640, 700, 'Paint!', 0, 1 ]
    +    outputs.lines << horizontal_separator(660, 0, 1280)
       end
     
    -  #returns a new normalize version of the vector
    -  def normalize
    -    Vector2d.new(@x/mag, @y/mag)
    +  # Sets the starting position, ending position, and color for the horizontal separator.
    +  # The starting and ending positions have the same y values.
    +  def horizontal_separator y, x, x2
    +    [x, y, x2, y, 150, 150, 150]
       end
     
    -  #TODO delet?
    -  def distABS vect
    -    (((vect.x-@x)**2+(vect.y-@y)**2)**0.5).abs()
    +  # Sets the starting position, ending position, and color for the vertical separator.
    +  # The starting and ending positions have the same x values.
    +  def vertical_separator x, y, y2
    +    [x, y, x, y2, 150, 150, 150]
       end
    -end
     
    -
    -

    Mouse - Mouse Click - main.rb

    -
    # ./samples/05_mouse/01_mouse_click/app/main.rb
    -=begin
    +  # Outputs a border and a grid containing empty squares onto the screen.
    +  def add_grid
     
    - APIs listing that haven't been encountered in previous sample apps:
    +    # Sets the x, y, height, and width of the grid.
    +    # There are 31 horizontal lines and 31 vertical lines in the grid.
    +    # Feel free to count them yourself before continuing!
    +    x, y, h, w = 640 - 500/2, 640 - 500, 500, 500 # calculations done so the grid appears in screen's center
    +    lines_h = 31
    +    lines_v = 31
     
    - - product: Returns an array of all combinations of elements from all arrays.
    +    # Sets values for the grid's border, grid lines, and filled squares.
    +    # The filled_squares variable is initially set to an empty array.
    +    state.grid_border ||= [ x, y, h, w ] # definition of grid's outer border
    +    state.grid_lines ||= draw_grid(x, y, h, w, lines_h, lines_v) # calls draw_grid method
    +    state.filled_squares ||= [] # there are no filled squares until the user fills them in
     
    -   For example, [1,2].product([1,2]) would return the following array...
    -   [[1,1], [1,2], [2,1], [2,2]]
    -   More than two arrays can be given to product and it will still work,
    -   such as [1,2].product([1,2],[3,4]). What would product return in this case?
    +    # Outputs the grid lines, border, and filled squares onto the screen.
    +    outputs.lines.concat state.grid_lines
    +    outputs.borders << state.grid_border
    +    outputs.solids << state.filled_squares
    +  end
     
    -   Answer:
    -   [[1,1,3],[1,1,4],[1,2,3],[1,2,4],[2,1,3],[2,1,4],[2,2,3],[2,2,4]]
    +  # Draws the grid by adding in vertical and horizontal separators.
    +  def draw_grid x, y, h, w, lines_h, lines_v
     
    - - num1.fdiv(num2): Returns the float division (will have a decimal) of the two given numbers.
    -   For example, 5.fdiv(2) = 2.5 and 5.fdiv(5) = 1.0
    +    # The grid starts off empty.
    +    grid = []
     
    - - yield: Allows you to call a method with a code block and yield to that block.
    +    # Calculates the placement and adds horizontal lines or separators into the grid.
    +    curr_y = y # start at the bottom of the box
    +    dist_y = h / (lines_h + 1) # finds distance to place horizontal lines evenly throughout 500 height of grid
    +    lines_h.times do
    +      curr_y += dist_y # increment curr_y by the distance between the horizontal lines
    +      grid << horizontal_separator(curr_y, x, x + w - 1) # add a separator into the grid
    +    end
     
    - Reminders:
    +    # Calculates the placement and adds vertical lines or separators into the grid.
    +    curr_x = x # now start at the left of the box
    +    dist_x = w / (lines_v + 1) # finds distance to place vertical lines evenly throughout 500 width of grid
    +    lines_v.times do
    +      curr_x += dist_x # increment curr_x by the distance between the vertical lines
    +      grid << vertical_separator(curr_x, y + 1, y  + h) # add separator
    +    end
     
    - - ARRAY#inside_rect?: Returns true or false depending on if the point is inside the rect.
    +    # paint_grid uses a hash to assign values to keys.
    +    state.paint_grid ||= {"x" => x, "y" => y, "h" => h, "w" => w, "lines_h" => lines_h,
    +                          "lines_v" => lines_v, "dist_x" => dist_x,
    +                          "dist_y" => dist_y }
     
    - - String interpolation: Uses #{} syntax; everything between the #{ and the } is evaluated
    -   as Ruby code, and the placeholder is replaced with its corresponding value or result.
    +    return grid
    +  end
     
    - - args.inputs.mouse.click: This property will be set if the mouse was clicked.
    +  # Checks if the user is keeping the mouse pressed down and sets the mouse_hold variable accordingly using boolean values.
    +  # If the mouse is up, the user cannot drag the mouse.
    +  def check_click
    +    if inputs.mouse.down #is mouse up or down?
    +      state.mouse_held = true # mouse is being held down
    +    elsif inputs.mouse.up # if mouse is up
    +    state.mouse_held = false # mouse is not being held down or dragged
    +      state.mouse_dragging = false
    +    end
     
    - - Ternary operator (?): Will evaluate a statement (just like an if statement)
    -   and perform an action if the result is true or another action if it is false.
    +    if state.mouse_held &&    # mouse needs to be down
    +      !inputs.mouse.click &&     # must not be first click
    +      ((inputs.mouse.previous_click.point.x - inputs.mouse.position.x).abs > 15) # Need to move 15 pixels before "drag"
    +      state.mouse_dragging = true
    +    end
     
    - - reject: Removes elements from a collection if they meet certain requirements.
    +    # If the user clicks their mouse inside the grid, the search_lines method is called with a click input type.
    +    if ((inputs.mouse.click) && (inputs.mouse.click.point.inside_rect? state.grid_border))
    +      search_lines(inputs.mouse.click.point, :click)
     
    - - args.outputs.borders: An array. The values generate a border.
    -   The parameters are [X, Y, WIDTH, HEIGHT, RED, GREEN, BLUE]
    -   For more information about borders, go to mygame/documentation/03-solids-and-borders.md.
    +    # If the user drags their mouse inside the grid, the search_lines method is called with a drag input type.
    +    elsif ((state.mouse_dragging) && (inputs.mouse.position.inside_rect? state.grid_border))
    +      search_lines(inputs.mouse.position, :drag)
    +    end
    +  end
     
    - - args.outputs.labels: An array. The values generate a label.
    -   The parameters are [X, Y, TEXT, SIZE, ALIGNMENT, RED, GREEN, BLUE, ALPHA, FONT STYLE]
    -   For more information about labels, go to mygame/documentation/02-labels.
    +  # Sets the definition of a grid box and handles user input to fill in or clear grid boxes.
    +  def search_lines (point, input_type)
    +    point.x -= state.paint_grid["x"] # subtracts the value assigned to the "x" key in the paint_grid hash
    +    point.y -= state.paint_grid["y"] # subtracts the value assigned to the "y" key in the paint_grid hash
     
    -=end
    +    # Remove code following the .floor and see what happens when you try to fill in grid squares
    +    point.x = (point.x / state.paint_grid["dist_x"]).floor * state.paint_grid["dist_x"]
    +    point.y = (point.y / state.paint_grid["dist_y"]).floor * state.paint_grid["dist_y"]
     
    -# This sample app is a classic game of Tic Tac Toe.
    +    point.x += state.paint_grid["x"]
    +    point.y += state.paint_grid["y"]
     
    -class TicTacToe
    -  attr_accessor :_, :state, :outputs, :inputs, :grid, :gtk
    +    # Sets definition of a grid box, meaning its x, y, width, and height.
    +    # Floor is called on the point.x and point.y variables.
    +    # Ceil method is called on values of the distance hash keys, setting the width and height of a box.
    +    grid_box = [ point.x.floor, point.y.floor, state.paint_grid["dist_x"].ceil, state.paint_grid["dist_y"].ceil ]
     
    -  # Starts the game with player x's turn and creates an array (to_a) for space combinations.
    -  # Calls methods necessary for the game to run properly.
    -  def tick
    -    state.current_turn ||= :x
    -    state.space_combinations = [-1, 0, 1].product([-1, 0, 1]).to_a
    -    render_board
    -    input_board
    +    if input_type == :click # if user clicks their mouse
    +      if state.filled_squares.include? grid_box # if grid box is already filled in
    +        state.filled_squares.delete grid_box # box is cleared and removed from filled_squares
    +      else
    +        state.filled_squares << grid_box # otherwise, box is filled in and added to filled_squares
    +      end
    +    elsif input_type == :drag # if user drags mouse
    +      unless state.filled_squares.include? grid_box # unless the grid box dragged over is already filled in
    +        state.filled_squares << grid_box # the box is filled in and added to filled_squares
    +      end
    +    end
       end
     
    -  # Uses borders to create grid squares for the game's board. Also outputs the game pieces using labels.
    -  def render_board
    -    square_size = 80
    +  # Creates and outputs a "Clear" button on the screen using a label and a border.
    +  # If the button is clicked, the filled squares are cleared, making the filled_squares collection empty.
    +  def draw_buttons
    +    x, y, w, h = 390, 50, 240, 50
    +    state.clear_button        ||= state.new_entity(:button_with_fade)
     
    -    # Positions the game's board in the center of the screen.
    -    # Try removing what follows grid.w_half or grid.h_half and see how the position changes!
    -    board_left = grid.w_half - square_size * 1.5
    -    board_top  = grid.h_half - square_size * 1.5
    +    # The x and y positions are set to display the label in the center of the button.
    +    # Try changing the first two parameters to simply x, y and see what happens to the text placement!
    +    state.clear_button.label  ||= [x + w.half, y + h.half + 10, "Clear", 0, 1] # placed in center of border
    +    state.clear_button.border ||= [x, y, w, h]
     
    -    # At first glance, the add(1) looks pretty trivial. But if you remove it,
    -    # you'll see that the positioning of the board would be skewed without it!
    -    # Or if you put 2 in the parenthesis, the pieces will be placed in the wrong squares
    -    # due to the change in board placement.
    -    outputs.borders << all_spaces do |x, y, space| # outputs borders for all board spaces
    -      space.border ||= [
    -        board_left + x.add(1) * square_size, # space.border is initialized using this definition
    -        board_top  + y.add(1) * square_size,
    -        square_size,
    -        square_size
    -      ]
    +    # If the mouse is clicked inside the borders of the clear button,
    +    # the filled_squares collection is emptied and the squares are cleared.
    +    if inputs.mouse.click && inputs.mouse.click.point.inside_rect?(state.clear_button.border)
    +      state.clear_button.clicked_at = inputs.mouse.click.created_at # time (frame) the click occurred
    +      state.filled_squares.clear
    +      inputs.mouse.previous_click = nil
         end
     
    -    # Again, the calculations ensure that the piece is placed in the center of the grid square.
    -    # Remove the '- 20' and the piece will be placed at the top of the grid square instead of the center.
    -    outputs.labels << filled_spaces do |x, y, space| # put label in each filled space of board
    -          label board_left + x.add(1) * square_size + square_size.fdiv(2),
    -          board_top  + y.add(1) * square_size + square_size - 20,
    -          space.piece # text of label, either "x" or "o"
    -    end
    +    outputs.labels << state.clear_button.label
    +    outputs.borders << state.clear_button.border
     
    -    # Uses a label to output whether x or o won, or if a draw occurred.
    -    # If the game is ongoing, a label shows whose turn it currently is.
    -    outputs.labels << if state.x_won
    -                        label grid.w_half, grid.top - 80, "x won" # the '-80' positions the label 80 pixels lower than top
    -                      elsif state.o_won
    -                        label grid.w_half, grid.top - 80, "o won" # grid.w_half positions the label in the center horizontally
    -                      elsif state.draw
    -                        label grid.w_half, grid.top - 80, "a draw"
    -                      else # if no one won and the game is ongoing
    -                        label grid.w_half, grid.top - 80, "turn: #{state.current_turn}"
    -                      end
    +    # When the clear button is clicked, the color of the button changes
    +    # and the transparency changes, as well. If you change the time from
    +    # 0.25.seconds to 1.25.seconds or more, the change will last longer.
    +    if state.clear_button.clicked_at
    +      outputs.solids << [x, y, w, h, 0, 180, 80, 255 * state.clear_button.clicked_at.ease(0.25.seconds, :flip)]
    +    end
       end
    +end
     
    -  # Calls the methods responsible for handling user input and determining the winner.
    -  # Does nothing unless the mouse is clicked.
    -  def input_board
    -    return unless inputs.mouse.click
    -    input_place_piece
    -    input_restart_game
    -    determine_winner
    +$paint_app = PaintApp.new
    +
    +def tick args
    +  $paint_app.inputs = args.inputs
    +  $paint_app.state = args.state
    +  $paint_app.grid = args.grid
    +  $paint_app.args = args
    +  $paint_app.outputs = args.outputs
    +  $paint_app.tick
    +  tick_instructions args, "How to create a simple paint app. CLICK and HOLD to draw."
    +end
    +
    +def tick_instructions args, text, y = 715
    +  return if args.state.key_event_occurred
    +  if args.inputs.mouse.click ||
    +     args.inputs.keyboard.directional_vector ||
    +     args.inputs.keyboard.key_down.enter ||
    +     args.inputs.keyboard.key_down.escape
    +    args.state.key_event_occurred = true
       end
     
    -  # Handles user input for placing pieces on the board.
    -  def input_place_piece
    -    return if state.game_over
    +  args.outputs.debug << [0, y - 50, 1280, 60].solid
    +  args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label
    +  args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label
    +end
     
    -    # Checks to find the space that the mouse was clicked inside of, and makes sure the space does not already
    -    # have a piece in it.
    -    __, __, space = all_spaces.find do |__, __, space|
    -      inputs.mouse.click.point.inside_rect?(space.border) && !space.piece
    -    end
    +
    +

    Mouse - Coordinate Systems - main.rb

    +
    # ./samples/05_mouse/04_coordinate_systems/app/main.rb
    +=begin
     
    -    # The piece that goes into the space belongs to the player whose turn it currently is.
    -    return unless space
    -    space.piece = state.current_turn
    + APIs listing that haven't been encountered in previous sample apps:
     
    -    # This ternary operator statement allows us to change the current player's turn.
    -    # If it is currently x's turn, it becomes o's turn. If it is not x's turn, it become's x's turn.
    -    state.current_turn = state.current_turn == :x ? :o : :x
    -  end
    + - args.inputs.mouse.click.position: Coordinates of the mouse's position on the screen.
    +   Unlike args.inputs.mouse.click.point, the mouse does not need to be pressed down for
    +   position to know the mouse's coordinates.
    +   For more information about the mouse, go to mygame/documentation/07-mouse.md.
     
    -  # Resets the game.
    -  def input_restart_game
    -    return unless state.game_over
    -    gtk.reset
    -  end
    + Reminders:
     
    -  # Checks if x or o won the game.
    -  # If neither player wins and all nine squares are filled, a draw happens.
    -  # Once a player is chosen as the winner or a draw happens, the game is over.
    -  def determine_winner
    -    state.x_won = won? :x # evaluates to either true or false (boolean values)
    -    state.o_won = won? :o
    -    state.draw = true if filled_spaces.length == 9 && !state.x_won && !state.o_won
    -    state.game_over = state.x_won || state.o_won || state.draw
    -  end
    + - args.inputs.mouse.click: This property will be set if the mouse was clicked.
     
    -  # Determines if a player won by checking if there is a horizontal match or vertical match.
    -  # Horizontal_match and vertical_match have boolean values. If either is true, the game has been won.
    -  def won? piece
    -    # performs action on all space combinations
    -    won = [[-1, 0, 1]].product([-1, 0, 1]).map do |xs, y|
    + - args.inputs.mouse.click.point.(x|y): The x and y location of the mouse.
     
    -      # Checks if the 3 grid spaces with the same y value (or same row) and
    -      # x values that are next to each other have pieces that belong to the same player.
    -      # Remember, the value of piece is equal to the current turn (which is the player).
    -      horizontal_match = state.spaces[xs[0]][y].piece == piece &&
    -                         state.spaces[xs[1]][y].piece == piece &&
    -                         state.spaces[xs[2]][y].piece == piece
    + - String interpolation: Uses #{} syntax; everything between the #{ and the } is evaluated
    +   as Ruby code, and the placeholder is replaced with its corresponding value or result.
     
    -      # Checks if the 3 grid spaces with the same x value (or same column) and
    -      # y values that are next to each other have pieces that belong to the same player.
    -      # The && represents an "and" statement: if even one part of the statement is false,
    -      # the entire statement evaluates to false.
    -      vertical_match = state.spaces[y][xs[0]].piece == piece &&
    -                       state.spaces[y][xs[1]].piece == piece &&
    -                       state.spaces[y][xs[2]].piece == piece
    +   In this sample app, string interpolation is used to show the current position of the mouse
    +   in a label.
     
    -      horizontal_match || vertical_match # if either is true, true is returned
    -    end
    + - args.outputs.labels: An array that generates a label.
    +   The parameters are [X, Y, TEXT, SIZE, ALIGN, RED, GREEN, BLUE, ALPHA, FONT STYLE]
    +   For more information about labels, go to mygame/documentation/02-labels.md.
     
    -    # Sees if there is a diagonal match, starting from the bottom left and ending at the top right.
    -    # Is added to won regardless of whether the statement is true or false.
    -    won << (state.spaces[-1][-1].piece == piece && # bottom left
    -            state.spaces[ 0][ 0].piece == piece && # center
    -            state.spaces[ 1][ 1].piece == piece)   # top right
    + - args.outputs.solids: An array that generates a solid.
    +   The parameters are [X, Y, WIDTH, HEIGHT, RED, GREEN, BLUE, ALPHA]
    +   For more information about solids, go to mygame/documentation/03-solids-and-borders.md.
     
    -    # Sees if there is a diagonal match, starting at the bottom right and ending at the top left
    -    # and is added to won.
    -    won << (state.spaces[ 1][-1].piece == piece && # bottom right
    -            state.spaces[ 0][ 0].piece == piece && # center
    -            state.spaces[-1][ 1].piece == piece)   # top left
    + - args.outputs.lines: An array that generates a line.
    +   The parameters are [X, Y, X2, Y2, RED, GREEN, BLUE, ALPHA]
    +   For more information about lines, go to mygame/documentation/04-lines.md.
     
    -    # Any false statements (meaning false diagonal matches) are rejected from won
    -    won.reject_false.any?
    -  end
    +=end
     
    -  # Defines filled spaces on the board by rejecting all spaces that do not have game pieces in them.
    -  # The ! before a statement means "not". For example, we are rejecting any space combinations that do
    -  # NOT have pieces in them.
    -  def filled_spaces
    -    state.space_combinations
    -      .reject { |x, y| !state.spaces[x][y].piece } # reject spaces with no pieces in them
    -      .map do |x, y|
    -        if block_given?
    -          yield x, y, state.spaces[x][y]
    -        else
    -          [x, y, state.spaces[x][y]] # sets definition of space
    -        end
    -    end
    -  end
    +# This sample app shows a coordinate system or grid. The user can move their mouse around the screen and the
    +# coordinates of their position on the screen will be displayed. Users can choose to view one quadrant or
    +# four quadrants by pressing the button.
     
    -  # Defines all spaces on the board.
    -  def all_spaces
    -    if !block_given?
    -      state.space_combinations.map do |x, y|
    -        [x, y, state.spaces[x][y]] # sets definition of space
    -      end
    -    else # if a block is given (block_given? is true)
    -      state.space_combinations.map do |x, y|
    -        yield x, y, state.spaces[x][y] # yield if a block is given
    +def tick args
    +
    +  # The addition and subtraction in the first two parameters of the label and solid
    +  # ensure that the outputs don't overlap each other. Try removing them and see what happens.
    +  pos = args.inputs.mouse.position # stores coordinates of mouse's position
    +  args.outputs.labels << [pos.x + 10, pos.y + 10, "#{pos}"] # outputs label of coordinates
    +  args.outputs.solids << [pos.x -  2, pos.y - 2, 5, 5] # outputs small blackk box placed where mouse is hovering
    +
    +  button = [0, 0, 370, 50] # sets definition of toggle button
    +  args.outputs.borders << button # outputs button as border (not filled in)
    +  args.outputs.labels << [10, 35, "click here toggle coordinate system"] # label of button
    +  args.outputs.lines << [    0, -720,    0, 720] # vertical line dividing quadrants
    +  args.outputs.lines << [-1280,    0, 1280,   0] # horizontal line dividing quadrants
    +
    +  if args.inputs.mouse.click # if the user clicks the mouse
    +    pos = args.inputs.mouse.click.point # pos's value is point where user clicked (coordinates)
    +    if pos.inside_rect? button # if the click occurred inside the button
    +      if args.grid.name == :bottom_left # if the grid shows bottom left as origin
    +        args.grid.origin_center! # origin will be shown in center
    +      else
    +        args.grid.origin_bottom_left! # otherwise, the view will change to show bottom left as origin
           end
         end
       end
     
    -  # Sets values for a label, such as the position, value, size, alignment, and color.
    -  def label x, y, value
    -    [x, y + 10, value, 20, 1, 0, 0, 0]
    -  end
    -end
    -
    -$tic_tac_toe = TicTacToe.new
    -
    -def tick args
    -  $tic_tac_toe._       = args
    -  $tic_tac_toe.state   = args.state
    -  $tic_tac_toe.outputs = args.outputs
    -  $tic_tac_toe.inputs  = args.inputs
    -  $tic_tac_toe.grid    = args.grid
    -  $tic_tac_toe.gtk     = args.gtk
    -  $tic_tac_toe.tick
    -  tick_instructions args, "Sample app shows how to work with mouse clicks."
    +  tick_instructions args, "Sample app shows the two supported coordinate systems in Game Toolkit."
     end
     
     def tick_instructions args, text, y = 715
    @@ -10509,1028 +10521,1394 @@ def tick_instructions args, text, y = 715
     end
     
     
    -

    Mouse - Mouse Move - main.rb

    -
    # ./samples/05_mouse/02_mouse_move/app/main.rb
    +

    Save Load - Save Load Game - main.rb

    +
    # ./samples/06_save_load/01_save_load_game/app/main.rb
     =begin
     
    - Reminders:
    + APIs listing that haven't been encountered in previous sample apps:
     
    - - num1.greater(num2): Returns the greater value.
    -   For example, if we have the command
    -   puts 4.greater(3)
    -   the number 4 would be printed to the console since it has a greater value than 3.
    -   Similar to lesser, which returns the lesser value.
    + - Symbol (:): Ruby object with a name and an internal ID. Symbols are useful
    +   because with a given symbol name, you can refer to the same object throughout
    +   a Ruby program.
     
    - - find_all: Finds all elements of a collection that meet certain requirements.
    -   For example, in this sample app, we're using find_all to find all zombies that have intersected
    -   or hit the player's sprite since these zombies have been killed.
    +   In this sample app, we're using symbols for our buttons. We have buttons that
    +   light fires, save, load, etc. Each of these buttons has a distinct symbol like
    +   :light_fire, :save_game, :load_game, etc.
     
    - - args.inputs.keyboard.key_down.KEY: Determines if a key is being held or pressed.
    -   Stores the frame the "down" event occurred.
    -   For more information about the keyboard, go to mygame/documentation/06-keyboard.md.
    + - to_sym: Returns the symbol corresponding to the given string; creates the symbol
    +   if it does not already exist.
    +   For example,
    +   'car'.to_sym
    +   would return the symbol :car.
     
    - - args.outputs.sprites: An array. The values generate a sprite.
    -   The parameters are [X, Y, WIDTH, HEIGHT, PATH, ANGLE, ALPHA, RED, GREEN, BLUE]
    -   For more information about sprites, go to mygame/documentation/05-sprites.md.
    + - last: Returns the last element of an array.
     
    - - args.state.new_entity: Used when we want to create a new object, like a sprite or button.
    -   When we want to create a new object, we can declare it as a new entity and then define
    -   its properties. (Remember, you can use state to define ANY property and it will
    -   be retained across frames.)
    + Reminders:
     
    - - String interpolation: Uses #{} syntax; everything between the #{ and the } is evaluated
    -   as Ruby code, and the placeholder is replaced with its corresponding value or result.
    + - num1.lesser(num2): finds the lower value of the given options.
    +   For example, in the statement
    +   a = 4.lesser(3)
    +   3 has a lower value than 4, which means that the value of a would be set to 3,
    +   but if the statement had been
    +   a = 4.lesser(5)
    +   4 has a lower value than 5, which means that the value of a would be set to 4.
     
    - - map: Ruby method used to transform data; used in arrays, hashes, and collections.
    -   Can be used to perform an action on every element of a collection, such as multiplying
    -   each element by 2 or declaring every element as a new entity.
    + - num1.fdiv(num2): returns the float division (will have a decimal) of the two given numbers.
    +   For example, 5.fdiv(2) = 2.5 and 5.fdiv(5) = 1.0
     
    - - sample: Chooses a random element from the array.
    + - String interpolation: uses #{} syntax; everything between the #{ and the } is evaluated
    +   as Ruby code, and the placeholder is replaced with its corresponding value or result.
     
    - - reject: Removes elements that meet certain requirements.
    -   In this sample app, we're removing/rejecting zombies that reach the center of the screen. We're also
    -   rejecting zombies that were killed more than 30 frames ago.
    + - args.outputs.labels: An array. Values generate a label.
    +   Parameters are [X, Y, TEXT, SIZE, ALIGN, RED, GREEN, BLUE, ALPHA, FONT STYLE]
    +   For more information, go to mygame/documentation/02-labels.md.
    +
    + - ARRAY#inside_rect?: An array with at least two values is considered a point. An array
    +   with at least four values is considered a rect. The inside_rect? function returns true
    +   or false depending on if the point is inside the rect.
     
     =end
     
    -# This sample app allows users to move around the screen in order to kill zombies. Zombies appear from every direction so the goal
    -# is to kill the zombies as fast as possible!
    +# This code allows users to perform different tasks, such as saving and loading the game.
    +# Users also have options to reset the game and light a fire.
     
    -class ProtectThePuppiesFromTheZombies
    -  attr_accessor :grid, :inputs, :state, :outputs
    +class TextedBasedGame
     
    -  # Calls the methods necessary for the game to run properly.
    +  # Contains methods needed for game to run properly.
    +  # Increments tick count by 1 each time it runs (60 times in a single second)
       def tick
    -    defaults
    -    render
    -    calc
    -    input
    +    default
    +    show_intro
    +    state.engine_tick_count += 1
    +    tick_fire
       end
     
    -  # Sets default values for the zombies and for the player.
    -  # Initialization happens only in the first frame.
    -  def defaults
    -    state.flash_at               ||= 0
    -    state.zombie_min_spawn_rate  ||= 60
    -    state.zombie_spawn_countdown ||= random_spawn_countdown state.zombie_min_spawn_rate
    -    state.zombies                ||= []
    -    state.killed_zombies         ||= []
    +  # Sets default values.
    +  # The ||= ensures that a variable's value is only set to the value following the = sign
    +  # if the value has not already been set before. Intialization happens only in the first frame.
    +  def default
    +    state.engine_tick_count ||= 0
    +    state.active_module     ||= :room
    +    state.fire_progress     ||= 0
    +    state.fire_ready_in     ||= 10
    +    state.previous_fire     ||= :dead
    +    state.fire              ||= :dead
    +  end
     
    -    # Declares player as a new entity and sets its properties.
    -    # The player begins the game in the center of the screen, not moving in any direction.
    -    state.player ||= state.new_entity(:player, { x: 640,
    -                                               y: 360,
    -                                               attack_angle: 0,
    -                                               dx: 0,
    -                                               dy: 0 })
    +  def show_intro
    +    return unless state.engine_tick_count == 0 # return unless the game just started
    +    set_story_line "awake." # calls set_story_line method, sets to "awake"
       end
     
    -  # Outputs a gray background.
    -  # Calls the methods needed to output the player, zombies, etc onto the screen.
    -  def render
    -    outputs.solids << [grid.rect, 100, 100, 100]
    -    render_zombies
    -    render_killed_zombies
    -    render_player
    -    render_flash
    +  # Sets story line.
    +  def set_story_line story_line
    +    state.story_line    = story_line # story line set to value of parameter
    +    state.active_module = :alert # active module set to alert
       end
     
    -  # Outputs the zombies on the screen and sets values for the sprites, such as the position, width, height, and animation.
    -  def render_zombies
    -    outputs.sprites << state.zombies.map do |z| # performs action on all zombies in the collection
    -      z.sprite = [z.x, z.y, 4 * 3, 8 * 3, animation_sprite(z)].sprite # sets definition for sprite, calls animation_sprite method
    -      z.sprite
    +  # Clears story line.
    +  def clear_storyline
    +    state.active_module = :none # active module set to none
    +    state.story_line = nil # story line is cleared, set to nil (or empty)
    +  end
    +
    +  # Determines fire progress (how close the fire is to being ready to light).
    +  def tick_fire
    +    return if state.active_module == :alert # return if active module is alert
    +    state.fire_progress += 1 # increment fire progress
    +    # fire_ready_in is 10. The fire_progress is either the current value or 10, whichever has a lower value.
    +    state.fire_progress = state.fire_progress.lesser(state.fire_ready_in)
    +  end
    +
    +  # Sets the value of fire (whether it is dead or roaring), and the story line
    +  def light_fire
    +    return unless fire_ready? # returns unless the fire is ready to be lit
    +    state.fire = :roaring # fire is lit, set to roaring
    +    state.fire_progress = 0 # the fire progress returns to 0, since the fire has been lit
    +    if state.fire != state.previous_fire
    +      set_story_line "the fire is #{state.fire}." # the story line is set using string interpolation
    +      state.previous_fire = state.fire
         end
       end
     
    -  # Outputs sprites of killed zombies, and displays a slash image to show that a zombie has been killed.
    -  def render_killed_zombies
    -    outputs.sprites << state.killed_zombies.map do |z| # performs action on all killed zombies in collection
    -      z.sprite = [z.x,
    -                  z.y,
    -                  4 * 3,
    -                  8 * 3,
    -                  animation_sprite(z, z.death_at), # calls animation_sprite method
    -                  0, # angle
    -                  255 * z.death_at.ease(30, :flip)].sprite # transparency of a zombie changes when they die
    -                  # change the value of 30 and see what happens when a zombie is killed
    +  # Checks if the fire is ready to be lit. Returns a boolean value.
    +  def fire_ready?
    +    # If fire_progress (value between 0 and 10) is equal to fire_ready_in (value of 10),
    +    # the fire is ready to be lit.
    +    state.fire_progress == state.fire_ready_in
    +  end
    +
    +  # Divides the value of the fire_progress variable by 10 to determine how close the user is to
    +  # being able to light a fire.
    +  def light_fire_progress
    +    state.fire_progress.fdiv(10) # float division
    +  end
    +
    +  # Defines fire as the state.fire variable.
    +  def fire
    +    state.fire
    +  end
    +
    +  # Sets the title of the room.
    +  def room_title
    +    return "a room that is dark" if state.fire == :dead # room is dark if the fire is dead
    +    return "a room that is lit" # room is lit if the fire is not dead
    +  end
    +
    +  # Sets the active_module to room.
    +  def go_to_room
    +    state.active_module = :room
    +  end
    +
    +  # Defines active_module as the state.active_module variable.
    +  def active_module
    +    state.active_module
    +  end
    +
    +  # Defines story_line as the state.story_line variable.
    +  def story_line
    +    state.story_line
    +  end
    +
    +  # Update every 60 frames (or every second)
    +  def should_tick?
    +    state.tick_count.mod_zero?(60)
    +  end
    +
    +  # Sets the value of the game state provider.
    +  def initialize game_state_provider
    +    @game_state_provider = game_state_provider
    +  end
    +
    +  # Defines the game state.
    +  # Any variable prefixed with an @ symbol is an instance variable.
    +  def state
    +    @game_state_provider.state
    +  end
    +
    +  # Saves the state of the game in a text file called game_state.txt.
    +  def save
    +    $gtk.serialize_state('game_state.txt', state)
    +  end
    +
    +  # Loads the game state from the game_state.txt text file.
    +  # If the load is unsuccessful, the user is informed since the story line indicates the failure.
    +  def load
    +    parsed_state = $gtk.deserialize_state('game_state.txt')
    +    if !parsed_state
    +      set_story_line "no game to load. press save first."
    +    else
    +      $gtk.args.state = parsed_state
    +    end
    +  end
    +
    +  # Resets the game.
    +  def reset
    +    $gtk.reset
    +  end
    +end
    +
    +class TextedBasedGamePresenter
    +  attr_accessor :state, :outputs, :inputs
    +
    +  # Creates empty collection called highlights.
    +  # Calls methods necessary to run the game.
    +  def tick
    +    state.layout.highlights ||= []
    +    game.tick if game.should_tick?
    +    render
    +    process_input
    +  end
     
    -      # Sets values to output the slash over the zombie's sprite when a zombie is killed.
    -      # The slash is tilted 45 degrees from the angle of the player's attack.
    -      # Change the 3 inside scale_rect to 30 and the slash will be HUGE! Scale_rect positions
    -      # the slash over the killed zombie's sprite.
    -      [z.sprite, [z.sprite.rect, 'sprites/slash.png', 45 + state.player.attack_angle_on_click, z.sprite.a].scale_rect(3, 0.5, 0.5)]
    -    end
    +  # Outputs a label of the tick count (passage of time) and calls all render methods.
    +  def render
    +    outputs.labels << [10, 30, state.tick_count]
    +    render_alert
    +    render_room
    +    render_highlights
       end
     
    -  # Outputs the player sprite using the images in the sprites folder.
    -  def render_player
    -    state.player_sprite = [state.player.x,
    -                           state.player.y,
    -                          4 * 3,
    -                          8 * 3, "sprites/player-#{animation_index(state.player.created_at_elapsed)}.png"] # string interpolation
    -    outputs.sprites << state.player_sprite
    +  # Outputs a label onto the screen that shows the story line, and also outputs a "close" button.
    +  def render_alert
    +    return unless game.active_module == :alert
     
    -    # Outputs a small red square that previews the angles that the player can attack in.
    -    # It can be moved in a perfect circle around the player to show possible movements.
    -    # Change the 60 in the parenthesis and see what happens to the movement of the red square.
    -    outputs.solids <<  [state.player.x + state.player.attack_angle.vector_x(60),
    -                        state.player.y + state.player.attack_angle.vector_y(60),
    -                        3, 3, 255, 0, 0]
    +    outputs.labels << [640, 480, game.story_line, 5, 1]  # outputs story line label
    +    outputs.primitives << button(:alert_dismiss, 490, 380, "close")  # positions "close" button under story line
       end
     
    -  # Renders flash as a solid. The screen turns white for 10 frames when a zombie is killed.
    -  def render_flash
    -    return if state.flash_at.elapsed_time > 10 # return if more than 10 frames have passed since flash.
    -    # Transparency gradually changes (or eases) during the 10 frames of flash.
    -    outputs.primitives << [grid.rect, 255, 255, 255, 255 * state.flash_at.ease(10, :flip)].solid
    -  end
    +  def render_room
    +    return unless game.active_module == :room
    +    outputs.labels << [640, 700, game.room_title, 4, 1] # outputs room title label at top of screen
     
    -  # Calls all methods necessary for performing calculations.
    -  def calc
    -    calc_spawn_zombie
    -    calc_move_zombies
    -    calc_player
    -    calc_kill_zombie
    +    # The parameters for these outputs are (symbol, x, y, text, value/percentage) and each has a y value
    +    # that positions it 60 pixels lower than the previous output.
    +
    +    # outputs the light_fire_progress bar, uses light_fire_progress for its percentage (which changes bar's appearance)
    +    outputs.primitives << progress_bar(:light_fire, 490, 600, "light fire", game.light_fire_progress)
    +    outputs.primitives << button(       :save_game, 490, 540, "save") # outputs save button
    +    outputs.primitives << button(       :load_game, 490, 480, "load") # outputs load button
    +    outputs.primitives << button(      :reset_game, 490, 420, "reset") # outputs reset button
    +    outputs.labels << [640, 30, "the fire is #{game.fire}", 0, 1] # outputs fire label at bottom of screen
       end
     
    -  # Decreases the zombie spawn countdown by 1 if it has a value greater than 0.
    -  def calc_spawn_zombie
    -    if state.zombie_spawn_countdown > 0
    -      state.zombie_spawn_countdown -= 1
    -      return
    -    end
    +  # Outputs a collection of highlights using an array to set their values, and also rejects certain values from the collection.
    +  def render_highlights
    +    state.layout.highlights.each do |h| # for each highlight in the collection
    +        h.lifetime -= 1 # decrease the value of its lifetime
    +      end
     
    -    # New zombies are created, positioned on the screen, and added to the zombies collection.
    -    state.zombies << state.new_entity(:zombie) do |z| # each zombie is declared a new entity
    -      if rand > 0.5
    -        z.x = grid.rect.w.randomize(:ratio) # random x position on screen (within grid scope)
    -        z.y = [-10, 730].sample # y position is set to either -10 or 730 (randomly chosen)
    -        # the possible values exceed the screen's scope so zombies appear to be coming from far away
    -      else
    -        z.x = [-10, 1290].sample # x position is set to either -10 or 1290 (randomly chosen)
    -        z.y = grid.rect.w.randomize(:ratio) # random y position on screen
    +      outputs.solids << state.layout.highlights.map do |h| # outputs highlights collection
    +        [h.x, h.y, h.w, h.h, h.color, 255 * h.lifetime / h.max_lifetime] # sets definition for each highlight
    +        # transparency changes; divide lifetime by max_lifetime, multiply result by 255
           end
    -    end
     
    -    # Calls random_spawn_countdown method (determines how fast new zombies appear)
    -    state.zombie_spawn_countdown = random_spawn_countdown state.zombie_min_spawn_rate
    -    state.zombie_min_spawn_rate -= 1
    -    # set to either the current zombie_min_spawn_rate or 0, depending on which value is greater
    -    state.zombie_min_spawn_rate  = state.zombie_min_spawn_rate.greater(0)
    +      # reject highlights from collection that have no remaining lifetime
    +      state.layout.highlights = state.layout.highlights.reject { |h| h.lifetime <= 0 }
       end
     
    -  # Moves all zombies towards the center of the screen.
    -  # All zombies that reach the center (640, 360) are rejected from the zombies collection and disappear.
    -  def calc_move_zombies
    -    state.zombies.each do |z| # for each zombie in the collection
    -      z.y = z.y.towards(360, 0.1) # move the zombie towards the center (640, 360) at a rate of 0.1
    -      z.x = z.x.towards(640, 0.1) # change 0.1 to 1.1 and see how much faster the zombies move to the center
    -    end
    -    state.zombies = state.zombies.reject { |z| z.y == 360 && z.x == 640 } # remove zombies that are in center
    +  # Checks whether or not a button was clicked.
    +  # Returns a boolean value.
    +  def process_input
    +    button = button_clicked? # calls button_clicked? method
       end
     
    -  # Calculates the position and movement of the player on the screen.
    -  def calc_player
    -    state.player.x += state.player.dx # changes x based on dx (change in x)
    -    state.player.y += state.player.dy # changes y based on dy (change in y)
    +  # Returns a boolean value.
    +  # Finds the button that was clicked from the button list and determines what method to call.
    +  # Adds a highlight to the highlights collection.
    +  def button_clicked?
    +    return nil unless click_pos # return nil unless click_pos holds coordinates of mouse click
    +      button = @button_list.find do |k, v| # goes through button_list to find button clicked
    +        click_pos.inside_rect? v[:primitives].last.rect # was the mouse clicked inside the rect of button?
    +      end
    +      return unless button # return unless a button was clicked
    +      method_to_call = "#{button[0]}_clicked".to_sym # sets method_to_call to symbol (like :save_game or :load_game)
    +      if self.respond_to? method_to_call # returns true if self responds to the given method (method actually exists)
    +        border = button[1][:primitives].last # sets border definition using value of last key in button list hash
     
    -    state.player.dx *= 0.9 # scales dx down
    -    state.player.dy *= 0.9 # scales dy down
    +        # declares each highlight as a new entity, sets properties
    +        state.layout.highlights << state.new_entity(:highlight) do |h|
    +            h.x = border.x
    +            h.y = border.y
    +            h.w = border.w
    +            h.h = border.h
    +            h.max_lifetime = 10
    +            h.lifetime = h.max_lifetime
    +            h.color = [120, 120, 180] # sets color to shade of purple
    +          end
     
    -    # Compares player's x to 1280 to find lesser value, then compares result to 0 to find greater value.
    -    # This ensures that the player remains within the screen's scope.
    -    state.player.x = state.player.x.lesser(1280).greater(0)
    -    state.player.y = state.player.y.lesser(720).greater(0) # same with player's y
    -  end
    +          self.send method_to_call # invoke method identified by symbol
    +        else # otherwise, if self doesn't respond to given method
    +          border = button[1][:primitives].last # sets border definition using value of last key in hash
     
    -  # Finds all zombies that intersect with the player's sprite. These zombies are removed from the zombies collection
    -  # and added to the killed_zombies collection since any zombie that intersects with the player is killed.
    -  def calc_kill_zombie
    +          # declares each highlight as a new entity, sets properties
    +          state.layout.highlights << state.new_entity(:highlight) do |h|
    +            h.x = border.x
    +            h.y = border.y
    +            h.w = border.w
    +            h.h = border.h
    +            h.max_lifetime = 4 # different max_lifetime than the one set if respond_to? had been true
    +            h.lifetime = h.max_lifetime
    +            h.color = [120, 80, 80] # sets color to dark color
    +          end
     
    -    # Find all zombies that intersect with the player. They are considered killed.
    -    killed_this_frame = state.zombies.find_all { |z| z.sprite.intersect_rect? state.player_sprite }
    -    state.zombies = state.zombies - killed_this_frame # remove newly killed zombies from zombies collection
    -    state.killed_zombies += killed_this_frame # add newly killed zombies to killed zombies
    +          # instructions for users on how to add the missing method_to_call to the code
    +          puts "It looks like #{method_to_call} doesn't exists on TextedBasedGamePresenter. Please add this method:"
    +          puts "Just copy the code below and put it in the #{TextedBasedGamePresenter} class definition."
    +          puts ""
    +          puts "```"
    +          puts "class TextedBasedGamePresenter <--- find this class and put the method below in it"
    +          puts ""
    +          puts "  def #{method_to_call}"
    +          puts "    puts 'Yay that worked!'"
    +          puts "  end"
    +          puts ""
    +          puts "end <-- make sure to put the #{method_to_call} method in between the `class` word and the final `end` statement."
    +          puts "```"
    +          puts ""
    +      end
    +  end
     
    -    if killed_this_frame.length > 0 # if atleast one zombie was killed in the frame
    -      state.flash_at = state.tick_count # flash_at set to the frame when the zombie was killed
    -    # Don't forget, the rendered flash lasts for 10 frames after the zombie is killed (look at render_flash method)
    -    end
    +  # Returns the position of the mouse when it is clicked.
    +  def click_pos
    +    return nil unless inputs.mouse.click # returns nil unless the mouse was clicked
    +    return inputs.mouse.click.point # returns location of mouse click (coordinates)
    +  end
     
    -    # Sets the tick_count (passage of time) as the value of the death_at variable for each killed zombie.
    -    # Death_at stores the frame a zombie was killed.
    -    killed_this_frame.each do |z|
    -      z.death_at = state.tick_count
    -    end
    +  # Creates buttons for the button_list and sets their values using a hash (uses symbols as keys)
    +  def button id, x, y, text
    +    @button_list[id] ||= { # assigns values to hash keys
    +      id: id,
    +      text: text,
    +      primitives: [
    +        [x + 10, y + 30, text, 2, 0].label, # positions label inside border
    +        [x, y, 300, 50].border,             # sets definition of border
    +      ]
    +    }
     
    -    # Zombies are rejected from the killed_zombies collection depending on when they were killed.
    -    # They are rejected if more than 30 frames have passed since their death.
    -    state.killed_zombies = state.killed_zombies.reject { |z| state.tick_count - z.death_at > 30 }
    +    @button_list[id][:primitives] # returns label and border for buttons
       end
     
    -  # Uses input from the user to move the player around the screen.
    -  def input
    -
    -    # If the "a" key or left key is pressed, the x position of the player decreases.
    -    # Otherwise, if the "d" key or right key is pressed, the x position of the player increases.
    -    if inputs.keyboard.key_held.a || inputs.keyboard.key_held.left
    -      state.player.x -= 5
    -    elsif inputs.keyboard.key_held.d || inputs.keyboard.key_held.right
    -      state.player.x += 5
    -    end
    +  # Creates a progress bar (used for lighting the fire) and sets its values.
    +  def progress_bar id, x, y, text, percentage
    +    @button_list[id] = { # assigns values to hash keys
    +      id: id,
    +      text: text,
    +      primitives: [
    +        [x, y, 300, 50, 100, 100, 100].solid, # sets definition for solid (which fills the bar with gray)
    +        [x + 10, y + 30, text, 2, 0].label, # sets definition for label, positions inside border
    +        [x, y, 300, 50].border, # sets definition of border
    +      ]
    +    }
     
    -    # If the "w" or up key is pressed, the y position of the player increases.
    -    # Otherwise, if the "s" or down key is pressed, the y position of the player decreases.
    -    if inputs.keyboard.key_held.w || inputs.keyboard.key_held.up
    -      state.player.y += 5
    -    elsif inputs.keyboard.key_held.s || inputs.keyboard.key_held.down
    -      state.player.y -= 5
    -    end
    +    # Fills progress bar based on percentage. If the fire was ready to be lit (100%) and we multiplied by
    +    # 100, only 1/3 of the bar would only be filled in. 200 would cause only 2/3 to be filled in.
    +    @button_list[id][:primitives][0][2] = 300 * percentage
    +    @button_list[id][:primitives]
    +  end
     
    -    # Sets the attack angle so the player can move and attack in the precise direction it wants to go.
    -    # If the mouse is moved, the attack angle is changed (based on the player's position and mouse position).
    -    # Attack angle also contributes to the position of red square.
    -    if inputs.mouse.moved
    -      state.player.attack_angle = inputs.mouse.position.angle_from [state.player.x, state.player.y]
    -    end
    +  # Defines the game.
    +  def game
    +    @game
    +  end
     
    -    if inputs.mouse.click && state.player.dx < 0.5 && state.player.dy < 0.5
    -      state.player.attack_angle_on_click = inputs.mouse.position.angle_from [state.player.x, state.player.y]
    -      state.player.attack_angle = state.player.attack_angle_on_click # player's attack angle is set
    -      state.player.dx = state.player.attack_angle.vector_x(25) # change in player's position
    -      state.player.dy = state.player.attack_angle.vector_y(25)
    -    end
    +  # Initalizes the game and creates an empty list of buttons.
    +  def initialize
    +    @game = TextedBasedGame.new self
    +    @button_list ||= {}
       end
     
    -  # Sets the zombie spawn's countdown to a random number.
    -  # How fast zombies appear (change the 60 to 6 and too many zombies will appear at once!)
    -  def random_spawn_countdown minimum
    -    10.randomize(:ratio, :sign).to_i + 60
    +  # Clears the storyline and takes the user to the room.
    +  def alert_dismiss_clicked
    +    game.clear_storyline
    +    game.go_to_room
       end
     
    -  # Helps to iterate through the images in the sprites folder by setting the animation index.
    -  # 3 frames is how long to show an image, and 6 is how many images to flip through.
    -  def animation_index at
    -    at.idiv(3).mod(6)
    +  # Lights the fire when the user clicks the "light fire" option.
    +  def light_fire_clicked
    +    game.light_fire
       end
     
    -  # Animates the zombies by using the animation index to go through the images in the sprites folder.
    -  def animation_sprite zombie, at = nil
    -    at ||= zombie.created_at_elapsed # how long it is has been since a zombie was created
    -    index = animation_index at
    -    "sprites/zombie-#{index}.png" # string interpolation to iterate through images
    +  # Saves the game when the user clicks the "save" option.
    +  def save_game_clicked
    +    game.save
       end
    -end
     
    -$protect_the_puppies_from_the_zombies = ProtectThePuppiesFromTheZombies.new
    +  # Resets the game when the user clicks the "reset" option.
    +  def reset_game_clicked
    +    game.reset
    +  end
     
    -def tick args
    -  $protect_the_puppies_from_the_zombies.grid    = args.grid
    -  $protect_the_puppies_from_the_zombies.inputs  = args.inputs
    -  $protect_the_puppies_from_the_zombies.state    = args.state
    -  $protect_the_puppies_from_the_zombies.outputs = args.outputs
    -  $protect_the_puppies_from_the_zombies.tick
    -  tick_instructions args, "How to get the mouse position and translate it to an x, y position using .vector_x and .vector_y. CLICK to play."
    +  # Loads the game when the user clicks the "load" option.
    +  def load_game_clicked
    +    game.load
    +  end
     end
     
    -def tick_instructions args, text, y = 715
    -  return if args.state.key_event_occurred
    -  if args.inputs.mouse.click ||
    -     args.inputs.keyboard.directional_vector ||
    -     args.inputs.keyboard.key_down.enter ||
    -     args.inputs.keyboard.key_down.escape
    -    args.state.key_event_occurred = true
    -  end
    +$text_based_rpg = TextedBasedGamePresenter.new
     
    -  args.outputs.debug << [0, y - 50, 1280, 60].solid
    -  args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label
    -  args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label
    +def tick args
    +  $text_based_rpg.state = args.state
    +  $text_based_rpg.outputs = args.outputs
    +  $text_based_rpg.inputs = args.inputs
    +  $text_based_rpg.tick
     end
     
     
    -

    Mouse - Mouse Move Paint App - main.rb

    -
    # ./samples/05_mouse/03_mouse_move_paint_app/app/main.rb
    -=begin
    -
    - APIs listing that haven't been encountered in previous sample apps:
    -
    - - Floor: Method that returns an integer number smaller than or equal to the original with no decimal.
    -
    -   For example, if we have a variable, a = 13.7, and we called floor on it, it would look like this...
    -   puts a.floor()
    -   which would print out 13.
    -   (There is also a ceil method, which returns an integer number greater than or equal to the original
    -   with no decimal. If we had called ceil on the variable a, the result would have been 14.)
    -
    - Reminders:
    -
    - - Hashes: Collection of unique keys and their corresponding values. The value can be found
    -   using their keys.
    -
    -   For example, if we have a "numbers" hash that stores numbers in English as the
    -   key and numbers in Spanish as the value, we'd have a hash that looks like this...
    -   numbers = { "one" => "uno", "two" => "dos", "three" => "tres" }
    -   and on it goes.
    -
    -   Now if we wanted to find the corresponding value of the "one" key, we could say
    -   puts numbers["one"]
    -   which would print "uno" to the console.
    +

    Advanced Audio - Audio Mixer - main.rb

    +
    # ./samples/07_advanced_audio/01_audio_mixer/app/main.rb
    +# these are the properties that you can sent on args.audio
    +def spawn_new_sound args, name, path
    +  # Spawn randomly in an area that won't be covered by UI.
    +  screenx = (rand * 600.0) + 200.0
    +  screeny = (rand * 400.0) + 100.0
     
    - - args.state.new_entity: Used when we want to create a new object, like a sprite or button.
    -   In this sample app, new_entity is used to create a new button that clears the grid.
    -   (Remember, you can use state to define ANY property and it will be retained across frames.)
    +  id = new_sound_id! args
    +  # you can hang anything on the audio hashes you want, so we store the
    +  #  actual screen position in here for convenience.
    +  args.audio[id] = {
    +    name: name,
    +    input: path,
    +    screenx: screenx,
    +    screeny: screeny,
    +    x: ((screenx / 1279.0) * 2.0) - 1.0,  # scale to -1.0 - 1.0 range
    +    y: ((screeny / 719.0) * 2.0) - 1.0,   # scale to -1.0 - 1.0 range
    +    z: 0.0,
    +    gain: 1.0,
    +    pitch: 1.0,
    +    looping: true,
    +    paused: false
    +  }
     
    - - args.inputs.mouse.click.point.(x|y): The x and y location of the mouse.
    +  args.state.selected = id
    +end
     
    - - args.inputs.mouse.click.point.created_at: The frame the mouse click occurred in.
    +# these are values you can change on the ~args.audio~ data structure
    +def input_panel args
    +  return unless args.state.panel
    +  return if args.state.dragging
     
    - - args.outputs.labels: An array. The values in the array generate a label.
    -   The parameters are [X, Y, TEXT, SIZE, ALIGN, RED, GREEN, BLUE, ALPHA, FONT STYLE]
    -   For more information about labels, go to mygame/documentation/02-labels.md.
    +  audio_entry = args.audio[args.state.selected]
    +  results = args.state.panel
     
    - - ARRAY#inside_rect?: Returns true or false depending on if the point is inside the rect.
    +  if args.state.mouse_state == :held && args.inputs.mouse.position.inside_rect?(results.pitch_slider_rect.rect)
    +    audio_entry.pitch = 2.0 * ((args.inputs.mouse.x - results.pitch_slider_rect.x).to_f / (results.pitch_slider_rect.w - 1.0))
    +  elsif args.state.mouse_state == :held && args.inputs.mouse.position.inside_rect?(results.playtime_slider_rect.rect)
    +    audio_entry.playtime = audio_entry.length_ * ((args.inputs.mouse.x - results.playtime_slider_rect.x).to_f / (results.playtime_slider_rect.w - 1.0))
    +  elsif args.state.mouse_state == :held && args.inputs.mouse.position.inside_rect?(results.gain_slider_rect.rect)
    +    audio_entry.gain = (args.inputs.mouse.x - results.gain_slider_rect.x).to_f / (results.gain_slider_rect.w - 1.0)
    +  elsif args.inputs.mouse.click && args.inputs.mouse.position.inside_rect?(results.looping_checkbox_rect.rect)
    +    audio_entry.looping = !audio_entry.looping
    +  elsif args.inputs.mouse.click && args.inputs.mouse.position.inside_rect?(results.paused_checkbox_rect.rect)
    +    audio_entry.paused = !audio_entry.paused
    +  elsif args.inputs.mouse.click && args.inputs.mouse.position.inside_rect?(results.delete_button_rect.rect)
    +    args.audio.delete args.state.selected
    +  end
    +end
     
    -=end
    +def render_sources args
    +  args.outputs.primitives << args.audio.keys.map do |k|
    +    s = args.audio[k]
     
    -# This sample app shows an empty grid that the user can paint on.
    -# To paint, the user must keep their mouse presssed and drag it around the grid.
    -# The "clear" button allows users to clear the grid so they can start over.
    +    isselected = (k == args.state.selected)
     
    -class PaintApp
    -  attr_accessor :inputs, :state, :outputs, :grid, :args
    +    color = isselected ? [ 0, 255, 0, 255 ] : [ 0, 0, 255, 255 ]
    +    [
    +      [s.screenx, s.screeny, args.state.boxsize, args.state.boxsize, *color].solid,
     
    -  # Runs methods necessary for the game to function properly.
    -  def tick
    -    print_title
    -    add_grid
    -    check_click
    -    draw_buttons
    +      {
    +        x: s.screenx + args.state.boxsize.half,
    +        y: s.screeny,
    +        text: s.name,
    +        r: 255,
    +        g: 255,
    +        b: 255,
    +        alignment_enum: 1
    +      }.label!
    +    ]
       end
    +end
     
    -  # Prints the title onto the screen by using a label.
    -  # Also separates the title from the grid with a line as a horizontal separator.
    -  def print_title
    -    args.outputs.labels << [ 640, 700, 'Paint!', 0, 1 ]
    -    outputs.lines << horizontal_separator(660, 0, 1280)
    -  end
    +def playtime_str t
    +  minutes = (t / 60.0).floor
    +  seconds = t - (minutes * 60.0).to_f
    +  return minutes.to_s + ':' + seconds.floor.to_s + ((seconds - seconds.floor).to_s + "000")[1..3]
    +end
     
    -  # Sets the starting position, ending position, and color for the horizontal separator.
    -  # The starting and ending positions have the same y values.
    -  def horizontal_separator y, x, x2
    -    [x, y, x2, y, 150, 150, 150]
    -  end
    +def label_with_drop_shadow x, y, text
    +  [
    +    { x: x + 1, y: y + 1, text: text, vertical_alignment_enum: 1, alignment_enum: 1, r:   0, g:   0, b:   0 }.label!,
    +    { x: x + 2, y: y + 0, text: text, vertical_alignment_enum: 1, alignment_enum: 1, r:   0, g:   0, b:   0 }.label!,
    +    { x: x + 0, y: y + 1, text: text, vertical_alignment_enum: 1, alignment_enum: 1, r: 200, g: 200, b: 200 }.label!
    +  ]
    +end
     
    -  # Sets the starting position, ending position, and color for the vertical separator.
    -  # The starting and ending positions have the same x values.
    -  def vertical_separator x, y, y2
    -    [x, y, x, y2, 150, 150, 150]
    -  end
    +def check_box opts = {}
    +  checkbox_template = opts.args.layout.rect(w: 0.5, h: 0.5, col: 2)
    +  final_rect = checkbox_template.center_inside_rect_y(opts.args.layout.rect(row: opts.row, col: opts.col))
    +  color = { r:   0, g:   0, b:   0 }
    +  color = { r: 255, g: 255, b: 255 } if opts.checked
     
    -  # Outputs a border and a grid containing empty squares onto the screen.
    -  def add_grid
    +  {
    +    rect: final_rect,
    +    primitives: [
    +      (final_rect.to_solid color)
    +    ]
    +  }
    +end
     
    -    # Sets the x, y, height, and width of the grid.
    -    # There are 31 horizontal lines and 31 vertical lines in the grid.
    -    # Feel free to count them yourself before continuing!
    -    x, y, h, w = 640 - 500/2, 640 - 500, 500, 500 # calculations done so the grid appears in screen's center
    -    lines_h = 31
    -    lines_v = 31
    +def progress_bar opts = {}
    +  outer_rect  = opts.args.layout.rect(row: opts.row, col: opts.col, w: 5, h: 1)
    +  color = opts.percentage * 255
    +  baseline_progress_bar = opts.args
    +                              .layout
    +                              .rect(w: 5, h: 0.5)
     
    -    # Sets values for the grid's border, grid lines, and filled squares.
    -    # The filled_squares variable is initially set to an empty array.
    -    state.grid_border ||= [ x, y, h, w ] # definition of grid's outer border
    -    state.grid_lines ||= draw_grid(x, y, h, w, lines_h, lines_v) # calls draw_grid method
    -    state.filled_squares ||= [] # there are no filled squares until the user fills them in
    +  final_rect = baseline_progress_bar.center_inside_rect(outer_rect)
    +  center = final_rect.rect_center_point
     
    -    # Outputs the grid lines, border, and filled squares onto the screen.
    -    outputs.lines.concat state.grid_lines
    -    outputs.borders << state.grid_border
    -    outputs.solids << state.filled_squares
    -  end
    +  {
    +    rect: final_rect,
    +    primitives: [
    +      final_rect.merge(r: color, g: color, b: color, a: 128).solid!,
    +      label_with_drop_shadow(center.x, center.y, opts.text)
    +    ]
    +  }
    +end
     
    -  # Draws the grid by adding in vertical and horizontal separators.
    -  def draw_grid x, y, h, w, lines_h, lines_v
    +def panel_primitives args, audio_entry
    +  results = { primitives: [] }
     
    -    # The grid starts off empty.
    -    grid = []
    +  return results unless audio_entry
     
    -    # Calculates the placement and adds horizontal lines or separators into the grid.
    -    curr_y = y # start at the bottom of the box
    -    dist_y = h / (lines_h + 1) # finds distance to place horizontal lines evenly throughout 500 height of grid
    -    lines_h.times do
    -      curr_y += dist_y # increment curr_y by the distance between the horizontal lines
    -      grid << horizontal_separator(curr_y, x, x + w - 1) # add a separator into the grid
    -    end
    +  # this uses DRGTK's layout apis to layout the controls
    +  # imagine the screen is split into equal cells (24 cells across, 12 cells up and down)
    +  # args.layout.rect returns a hash which we merge values with to create primitives
    +  # using args.layout.rect removes the need for pixel pushing
     
    -    # Calculates the placement and adds vertical lines or separators into the grid.
    -    curr_x = x # now start at the left of the box
    -    dist_x = w / (lines_v + 1) # finds distance to place vertical lines evenly throughout 500 width of grid
    -    lines_v.times do
    -      curr_x += dist_x # increment curr_x by the distance between the vertical lines
    -      grid << vertical_separator(curr_x, y + 1, y  + h) # add separator
    -    end
    +  # args.outputs.debug << args.layout.debug_primitives(r: 255, g: 255, b: 255)
     
    -    # paint_grid uses a hash to assign values to keys.
    -    state.paint_grid ||= {"x" => x, "y" => y, "h" => h, "w" => w, "lines_h" => lines_h,
    -                          "lines_v" => lines_v, "dist_x" => dist_x,
    -                          "dist_y" => dist_y }
    +  white_color = { r: 255, g: 255, b: 255 }
    +  label_style = white_color.merge(vertical_alignment_enum: 1)
     
    -    return grid
    -  end
    +  # panel background
    +  results.primitives << args.layout.rect(row: 0, col: 0, w: 7, h: 6, include_col_gutter: true, include_row_gutter: true)
    +                                   .border!(r: 255, g: 255, b: 255)
     
    -  # Checks if the user is keeping the mouse pressed down and sets the mouse_hold variable accordingly using boolean values.
    -  # If the mouse is up, the user cannot drag the mouse.
    -  def check_click
    -    if inputs.mouse.down #is mouse up or down?
    -      state.mouse_held = true # mouse is being held down
    -    elsif inputs.mouse.up # if mouse is up
    -    state.mouse_held = false # mouse is not being held down or dragged
    -      state.mouse_dragging = false
    -    end
    +  # title
    +  results.primitives << args.layout.point(row: 0, col: 3.5, row_anchor: 0.5)
    +                                   .merge(label_style)
    +                                   .merge(text:           "Source #{args.state.selected} (#{args.audio[args.state.selected].name})",
    +                                          size_enum:      3,
    +                                          alignment_enum: 1)
     
    -    if state.mouse_held &&    # mouse needs to be down
    -      !inputs.mouse.click &&     # must not be first click
    -      ((inputs.mouse.previous_click.point.x - inputs.mouse.position.x).abs > 15) # Need to move 15 pixels before "drag"
    -      state.mouse_dragging = true
    -    end
    +  # seperator line
    +  results.primitives << args.layout.rect(row: 1, col: 0, w: 7, h: 0)
    +                                   .line!(white_color)
     
    -    # If the user clicks their mouse inside the grid, the search_lines method is called with a click input type.
    -    if ((inputs.mouse.click) && (inputs.mouse.click.point.inside_rect? state.grid_border))
    -      search_lines(inputs.mouse.click.point, :click)
    +  # screen location
    +  results.primitives << args.layout.point(row: 1.0, col: 0, row_anchor: 0.5)
    +                                   .merge(label_style)
    +                                   .merge(text: "screen:")
     
    -    # If the user drags their mouse inside the grid, the search_lines method is called with a drag input type.
    -    elsif ((state.mouse_dragging) && (inputs.mouse.position.inside_rect? state.grid_border))
    -      search_lines(inputs.mouse.position, :drag)
    -    end
    -  end
    +  results.primitives << args.layout.point(row: 1.0, col: 2, row_anchor: 0.5)
    +                                   .merge(label_style)
    +                                   .merge(text: "(#{audio_entry.screenx.to_i}, #{audio_entry.screeny.to_i})")
     
    -  # Sets the definition of a grid box and handles user input to fill in or clear grid boxes.
    -  def search_lines (point, input_type)
    -    point.x -= state.paint_grid["x"] # subtracts the value assigned to the "x" key in the paint_grid hash
    -    point.y -= state.paint_grid["y"] # subtracts the value assigned to the "y" key in the paint_grid hash
    +  # position
    +  results.primitives << args.layout.point(row: 1.5, col: 0, row_anchor: 0.5)
    +                                   .merge(label_style)
    +                                   .merge(text: "position:")
     
    -    # Remove code following the .floor and see what happens when you try to fill in grid squares
    -    point.x = (point.x / state.paint_grid["dist_x"]).floor * state.paint_grid["dist_x"]
    -    point.y = (point.y / state.paint_grid["dist_y"]).floor * state.paint_grid["dist_y"]
    +  results.primitives << args.layout.point(row: 1.5, col: 2, row_anchor: 0.5)
    +                                   .merge(label_style)
    +                                   .merge(text: "(#{audio_entry[:x].round(5).to_s[0..6]}, #{audio_entry[:y].round(5).to_s[0..6]})")
     
    -    point.x += state.paint_grid["x"]
    -    point.y += state.paint_grid["y"]
    +  results.primitives << args.layout.point(row: 2.0, col: 0, row_anchor: 0.5)
    +                                   .merge(label_style)
    +                                   .merge(text: "pitch:")
     
    -    # Sets definition of a grid box, meaning its x, y, width, and height.
    -    # Floor is called on the point.x and point.y variables.
    -    # Ceil method is called on values of the distance hash keys, setting the width and height of a box.
    -    grid_box = [ point.x.floor, point.y.floor, state.paint_grid["dist_x"].ceil, state.paint_grid["dist_y"].ceil ]
    +  results.pitch_slider_rect = progress_bar(row: 2.0, col: 2,
    +                                           percentage: audio_entry.pitch / 2.0,
    +                                           text: "#{audio_entry.pitch.to_sf}",
    +                                           args: args)
     
    -    if input_type == :click # if user clicks their mouse
    -      if state.filled_squares.include? grid_box # if grid box is already filled in
    -        state.filled_squares.delete grid_box # box is cleared and removed from filled_squares
    -      else
    -        state.filled_squares << grid_box # otherwise, box is filled in and added to filled_squares
    -      end
    -    elsif input_type == :drag # if user drags mouse
    -      unless state.filled_squares.include? grid_box # unless the grid box dragged over is already filled in
    -        state.filled_squares << grid_box # the box is filled in and added to filled_squares
    -      end
    -    end
    -  end
    +  results.primitives << results.pitch_slider_rect.primitives
     
    -  # Creates and outputs a "Clear" button on the screen using a label and a border.
    -  # If the button is clicked, the filled squares are cleared, making the filled_squares collection empty.
    -  def draw_buttons
    -    x, y, w, h = 390, 50, 240, 50
    -    state.clear_button        ||= state.new_entity(:button_with_fade)
    +  results.primitives << args.layout.point(row: 2.5, col: 0, row_anchor: 0.5)
    +                                   .merge(label_style)
    +                                   .merge(text: "playtime:")
     
    -    # The x and y positions are set to display the label in the center of the button.
    -    # Try changing the first two parameters to simply x, y and see what happens to the text placement!
    -    state.clear_button.label  ||= [x + w.half, y + h.half + 10, "Clear", 0, 1] # placed in center of border
    -    state.clear_button.border ||= [x, y, w, h]
    +  results.playtime_slider_rect = progress_bar(args: args,
    +                                              row:  2.5,
    +                                              col:  2,
    +                                              percentage: audio_entry.playtime / audio_entry.length_,
    +                                              text: "#{playtime_str(audio_entry.playtime)} / #{playtime_str(audio_entry.length_)}")
     
    -    # If the mouse is clicked inside the borders of the clear button,
    -    # the filled_squares collection is emptied and the squares are cleared.
    -    if inputs.mouse.click && inputs.mouse.click.point.inside_rect?(state.clear_button.border)
    -      state.clear_button.clicked_at = inputs.mouse.click.created_at # time (frame) the click occurred
    -      state.filled_squares.clear
    -      inputs.mouse.previous_click = nil
    -    end
    +  results.primitives << results.playtime_slider_rect.primitives
     
    -    outputs.labels << state.clear_button.label
    -    outputs.borders << state.clear_button.border
    +  results.primitives << args.layout.point(row: 3.0, col: 0, row_anchor: 0.5)
    +                                   .merge(label_style)
    +                                   .merge(text: "gain:")
     
    -    # When the clear button is clicked, the color of the button changes
    -    # and the transparency changes, as well. If you change the time from
    -    # 0.25.seconds to 1.25.seconds or more, the change will last longer.
    -    if state.clear_button.clicked_at
    -      outputs.solids << [x, y, w, h, 0, 180, 80, 255 * state.clear_button.clicked_at.ease(0.25.seconds, :flip)]
    -    end
    -  end
    -end
    +  results.gain_slider_rect = progress_bar(args: args,
    +                                          row:  3.0,
    +                                          col:  2,
    +                                          percentage: audio_entry.gain,
    +                                          text: "#{audio_entry.gain.to_sf}")
     
    -$paint_app = PaintApp.new
    +  results.primitives << results.gain_slider_rect.primitives
     
    -def tick args
    -  $paint_app.inputs = args.inputs
    -  $paint_app.state = args.state
    -  $paint_app.grid = args.grid
    -  $paint_app.args = args
    -  $paint_app.outputs = args.outputs
    -  $paint_app.tick
    -  tick_instructions args, "How to create a simple paint app. CLICK and HOLD to draw."
    -end
     
    -def tick_instructions args, text, y = 715
    -  return if args.state.key_event_occurred
    -  if args.inputs.mouse.click ||
    -     args.inputs.keyboard.directional_vector ||
    -     args.inputs.keyboard.key_down.enter ||
    -     args.inputs.keyboard.key_down.escape
    -    args.state.key_event_occurred = true
    -  end
    +  results.primitives << args.layout.point(row: 3.5, col: 0, row_anchor: 0.5)
    +                                   .merge(label_style)
    +                                   .merge(text: "looping:")
     
    -  args.outputs.debug << [0, y - 50, 1280, 60].solid
    -  args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label
    -  args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label
    -end
    +  checkbox_template = args.layout.rect(w: 0.5, h: 0.5, col: 2)
     
    -
    -

    Mouse - Coordinate Systems - main.rb

    -
    # ./samples/05_mouse/04_coordinate_systems/app/main.rb
    -=begin
    +  results.looping_checkbox_rect = check_box(args: args, row: 3.5, col: 2, checked: audio_entry.looping)
    +  results.primitives << results.looping_checkbox_rect.primitives
     
    - APIs listing that haven't been encountered in previous sample apps:
    +  results.primitives << args.layout.point(row: 4.0, col: 0, row_anchor: 0.5)
    +                                   .merge(label_style)
    +                                   .merge(text: "paused:")
     
    - - args.inputs.mouse.click.position: Coordinates of the mouse's position on the screen.
    -   Unlike args.inputs.mouse.click.point, the mouse does not need to be pressed down for
    -   position to know the mouse's coordinates.
    -   For more information about the mouse, go to mygame/documentation/07-mouse.md.
    +  checkbox_template = args.layout.rect(w: 0.5, h: 0.5, col: 2)
     
    - Reminders:
    +  results.paused_checkbox_rect = check_box(args: args, row: 4.0, col: 2, checked: !audio_entry.paused)
    +  results.primitives << results.paused_checkbox_rect.primitives
     
    - - args.inputs.mouse.click: This property will be set if the mouse was clicked.
    +  results.delete_button_rect = { rect: args.layout.rect(row: 5, col: 0, w: 7, h: 1) }
     
    - - args.inputs.mouse.click.point.(x|y): The x and y location of the mouse.
    +  results.primitives << results.delete_button_rect.to_solid(r: 180)
     
    - - String interpolation: Uses #{} syntax; everything between the #{ and the } is evaluated
    -   as Ruby code, and the placeholder is replaced with its corresponding value or result.
    +  results.primitives << args.layout.point(row: 5, col: 3.5, row_anchor: 0.5)
    +                                   .merge(label_style)
    +                                   .merge(text: "DELETE", alignment_enum: 1)
     
    -   In this sample app, string interpolation is used to show the current position of the mouse
    -   in a label.
    +  return results
    +end
     
    - - args.outputs.labels: An array that generates a label.
    -   The parameters are [X, Y, TEXT, SIZE, ALIGN, RED, GREEN, BLUE, ALPHA, FONT STYLE]
    -   For more information about labels, go to mygame/documentation/02-labels.md.
    +def render_panel args
    +  args.state.panel = nil
    +  audio_entry = args.audio[args.state.selected]
    +  return unless audio_entry
     
    - - args.outputs.solids: An array that generates a solid.
    -   The parameters are [X, Y, WIDTH, HEIGHT, RED, GREEN, BLUE, ALPHA]
    -   For more information about solids, go to mygame/documentation/03-solids-and-borders.md.
    +  mouse_down = (args.state.mouse_held >= 0)
    +  args.state.panel = panel_primitives args, audio_entry
    +  args.outputs.primitives << args.state.panel.primitives
    +end
     
    - - args.outputs.lines: An array that generates a line.
    -   The parameters are [X, Y, X2, Y2, RED, GREEN, BLUE, ALPHA]
    -   For more information about lines, go to mygame/documentation/04-lines.md.
    +def new_sound_id! args
    +  args.state.sound_id ||= 0
    +  args.state.sound_id  += 1
    +  args.state.sound_id
    +end
     
    -=end
    +def render_launcher args
    +  args.outputs.primitives << args.state.spawn_sound_buttons.map(&:primitives)
    +end
     
    -# This sample app shows a coordinate system or grid. The user can move their mouse around the screen and the
    -# coordinates of their position on the screen will be displayed. Users can choose to view one quadrant or
    -# four quadrants by pressing the button.
    +def render_ui args
    +  render_launcher args
    +  render_panel args
    +end
     
     def tick args
    +  defaults args
    +  render args
    +  input args
    +end
     
    -  # The addition and subtraction in the first two parameters of the label and solid
    -  # ensure that the outputs don't overlap each other. Try removing them and see what happens.
    -  pos = args.inputs.mouse.position # stores coordinates of mouse's position
    -  args.outputs.labels << [pos.x + 10, pos.y + 10, "#{pos}"] # outputs label of coordinates
    -  args.outputs.solids << [pos.x -  2, pos.y - 2, 5, 5] # outputs small blackk box placed where mouse is hovering
    +def input args
    +  if !args.audio[args.state.selected]
    +    args.state.selected = nil
    +    args.state.dragging = nil
    +  end
     
    -  button = [0, 0, 370, 50] # sets definition of toggle button
    -  args.outputs.borders << button # outputs button as border (not filled in)
    -  args.outputs.labels << [10, 35, "click here toggle coordinate system"] # label of button
    -  args.outputs.lines << [    0, -720,    0, 720] # vertical line dividing quadrants
    -  args.outputs.lines << [-1280,    0, 1280,   0] # horizontal line dividing quadrants
    +  # spawn button and node interaction
    +  if args.inputs.mouse.click
    +    spawn_sound_button = args.state.spawn_sound_buttons.find { |b| args.inputs.mouse.inside_rect? b.rect }
     
    -  if args.inputs.mouse.click # if the user clicks the mouse
    -    pos = args.inputs.mouse.click.point # pos's value is point where user clicked (coordinates)
    -    if pos.inside_rect? button # if the click occurred inside the button
    -      if args.grid.name == :bottom_left # if the grid shows bottom left as origin
    -        args.grid.origin_center! # origin will be shown in center
    -      else
    -        args.grid.origin_bottom_left! # otherwise, the view will change to show bottom left as origin
    -      end
    +    audio_click_key, audio_click_value = args.audio.find do |k, v|
    +      args.inputs.mouse.inside_rect? [v.screenx, v.screeny, args.state.boxsize, args.state.boxsize]
    +    end
    +
    +    if spawn_sound_button
    +      args.state.selected = nil
    +      spawn_new_sound args, spawn_sound_button.name, spawn_sound_button.path
    +    elsif audio_click_key
    +      args.state.selected = audio_click_key
         end
       end
     
    -  tick_instructions args, "Sample app shows the two supported coordinate systems in Game Toolkit."
    +  if args.state.mouse_state == :held && args.state.selected
    +    v = args.audio[args.state.selected]
    +    if args.inputs.mouse.inside_rect? [v.screenx, v.screeny, args.state.boxsize, args.state.boxsize]
    +      args.state.dragging = args.state.selected
    +    end
    +
    +    if args.state.dragging
    +      s = args.audio[args.state.selected]
    +      # you can hang anything on the audio hashes you want, so we store the
    +      #  actual screen position so it doesn't scale weirdly vs your mouse.
    +      s.screenx = args.inputs.mouse.x - (args.state.boxsize / 2)
    +      s.screeny = args.inputs.mouse.y - (args.state.boxsize / 2)
    +
    +      s.screeny = 50 if s.screeny < 50
    +      s.screeny = (719 - args.state.boxsize) if s.screeny > (719 - args.state.boxsize)
    +      s.screenx = 0 if s.screenx < 0
    +      s.screenx = (1279 - args.state.boxsize) if s.screenx > (1279 - args.state.boxsize)
    +
    +      s.x = ((s.screenx / 1279.0) * 2.0) - 1.0  # scale to -1.0 - 1.0 range
    +      s.y = ((s.screeny / 719.0) * 2.0) - 1.0   # scale to -1.0 - 1.0 range
    +    end
    +  elsif args.state.mouse_state == :released
    +    args.state.dragging = nil
    +  end
    +
    +  input_panel args
     end
     
    -def tick_instructions args, text, y = 715
    -  return if args.state.key_event_occurred
    -  if args.inputs.mouse.click ||
    -     args.inputs.keyboard.directional_vector ||
    -     args.inputs.keyboard.key_down.enter ||
    -     args.inputs.keyboard.key_down.escape
    -    args.state.key_event_occurred = true
    +def defaults args
    +  args.state.mouse_state      ||= :released
    +  args.state.dragging_source  ||= false
    +  args.state.selected         ||= 0
    +  args.state.next_sound_index ||= 0
    +  args.state.boxsize          ||= 30
    +  args.state.sound_files      ||= [
    +    { name: :tada,   path: "sounds/tada.wav"   },
    +    { name: :splash, path: "sounds/splash.wav" },
    +    { name: :drum,   path: "sounds/drum.wav"   },
    +    { name: :spring, path: "sounds/spring.wav" },
    +    { name: :music,  path: "sounds/music.ogg"  }
    +  ]
    +
    +  # generate buttons based off the sound collection above
    +  args.state.spawn_sound_buttons ||= begin
    +    # create a group of buttons
    +    # column centered (using col_offset to calculate the column offset)
    +    # where each item is 2 columns apart
    +    rects = args.layout.rect_group row:   11,
    +                                   col_offset: {
    +                                     count: args.state.sound_files.length,
    +                                     w:     2
    +                                   },
    +                                   dcol:  2,
    +                                   w:     2,
    +                                   h:     1,
    +                                   group: args.state.sound_files
    +
    +    # now that you have the rects
    +    # construct the metadata for the buttons
    +    rects.map do |rect|
    +      {
    +        rect: rect,
    +        name: rect.name,
    +        path: rect.path,
    +        primitives: [
    +          rect.to_border(r: 255, g: 255, b: 255),
    +          rect.to_label(x: rect.center_x,
    +                        y: rect.center_y,
    +                        text: "#{rect.name}",
    +                        alignment_enum: 1,
    +                        vertical_alignment_enum: 1,
    +                        r: 255, g: 255, b: 255)
    +        ]
    +      }
    +    end
       end
     
    -  args.outputs.debug << [0, y - 50, 1280, 60].solid
    -  args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label
    -  args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label
    +  if args.inputs.mouse.up
    +    args.state.mouse_state = :released
    +    args.state.dragging_source = false
    +  elsif args.inputs.mouse.down
    +    args.state.mouse_state = :held
    +  end
    +
    +  args.outputs.background_color = [ 0, 0, 0, 255 ]
    +end
    +
    +def render args
    +  render_ui args
    +  render_sources args
     end
     
     
    -

    Save Load - Save Load Game - main.rb

    -
    # ./samples/06_save_load/01_save_load_game/app/main.rb
    -=begin
    +

    Advanced Audio - Audio Mixer - server_ip_address.txt

    +
    # ./samples/07_advanced_audio/01_audio_mixer/app/server_ip_address.txt
    +192.168.1.65
    +
    +

    Advanced Audio - Audio Mixer - Metadata - ios_metadata.txt

    +
    # ./samples/07_advanced_audio/01_audio_mixer/metadata/ios_metadata.txt
    +# ios_metadata.txt is used by the Pro version of DragonRuby Game Toolkit to create iOS apps.
    +# Information about the Pro version can be found at: http://dragonruby.org/toolkit/game#purchase
     
    - APIs listing that haven't been encountered in previous sample apps:
    +# teamid needs to be set to your assigned Team Id which can be found at https://developer.apple.com/account/#/membership/
    +teamid=
    +# appid needs to be set to your application identifier which can be found at https://developer.apple.com/account/resources/identifiers/list
    +appid=
    +# appname is the name you want to show up underneath the app icon on the device. Keep it under 10 characters.
    +appname=
     
    - - Symbol (:): Ruby object with a name and an internal ID. Symbols are useful
    -   because with a given symbol name, you can refer to the same object throughout
    -   a Ruby program.
    +
    +

    Advanced Audio - Sound Synthesis - main.rb

    +
    # ./samples/07_advanced_audio/02_sound_synthesis/app/main.rb
    +begin # region: top level tick methods
    +  def tick args
    +    defaults args
    +    render args
    +    input args
    +    process_audio_queue args
    +  end
     
    -   In this sample app, we're using symbols for our buttons. We have buttons that
    -   light fires, save, load, etc. Each of these buttons has a distinct symbol like
    -   :light_fire, :save_game, :load_game, etc.
    +  def defaults args
    +    args.state.sine_waves      ||= {}
    +    args.state.square_waves    ||= {}
    +    args.state.saw_tooth_waves ||= {}
    +    args.state.triangle_waves  ||= {}
    +    args.state.audio_queue     ||= []
    +    args.state.buttons         ||= [
    +      (frequency_buttons args),
    +      (sine_wave_note_buttons args),
    +      (bell_buttons args),
    +      (square_wave_note_buttons args),
    +      (saw_tooth_wave_note_buttons args),
    +      (triangle_wave_note_buttons args),
    +    ].flatten
    +  end
     
    - - to_sym: Returns the symbol corresponding to the given string; creates the symbol
    -   if it does not already exist.
    -   For example,
    -   'car'.to_sym
    -   would return the symbol :car.
    +  def render args
    +    args.outputs.borders << args.state.buttons.map { |b| b[:border] }
    +    args.outputs.labels  << args.state.buttons.map { |b| b[:label]  }
    +    args.outputs.labels  << args.layout
    +                              .rect(row: 0, col: 11.5)
    +                              .yield_self { |r| r.merge y: r.y + r.h }
    +                              .merge(text: "This is a Pro only feature. Click here to watch the YouTube video if you are on the Standard License.",
    +                                     alignment_enum: 1)
    +  end
     
    - - last: Returns the last element of an array.
     
    - Reminders:
    +  def input args
    +    args.state.buttons.each do |b|
    +      if args.inputs.mouse.click && (args.inputs.mouse.click.inside_rect? b[:rect])
    +        parameter_string = (b.slice :frequency, :note, :octave).map { |k, v| "#{k}: #{v}" }.join ", "
    +        args.gtk.notify! "#{b[:method_to_call]} #{parameter_string}"
    +        send b[:method_to_call], args, b
    +      end
    +    end
     
    - - num1.lesser(num2): finds the lower value of the given options.
    -   For example, in the statement
    -   a = 4.lesser(3)
    -   3 has a lower value than 4, which means that the value of a would be set to 3,
    -   but if the statement had been
    -   a = 4.lesser(5)
    -   4 has a lower value than 5, which means that the value of a would be set to 4.
    +    if args.inputs.mouse.click && (args.inputs.mouse.click.inside_rect? (args.layout.rect(row: 0).yield_self { |r| r.merge y: r.y + r.h.half, h: r.h.half }))
    +      args.gtk.openurl 'https://www.youtube.com/watch?v=zEzovM5jT-k&ab_channel=AmirRajan'
    +    end
    +  end
     
    - - num1.fdiv(num2): returns the float division (will have a decimal) of the two given numbers.
    -   For example, 5.fdiv(2) = 2.5 and 5.fdiv(5) = 1.0
    +  def process_audio_queue args
    +    to_queue = args.state.audio_queue.find_all { |v| v[:queue_at] <= args.tick_count }
    +    args.state.audio_queue -= to_queue
    +    to_queue.each { |a| args.audio[a[:id]] = a }
     
    - - String interpolation: uses #{} syntax; everything between the #{ and the } is evaluated
    -   as Ruby code, and the placeholder is replaced with its corresponding value or result.
    +    args.audio.find_all { |k, v| v[:decay_rate] }
    +      .each     { |k, v| v[:gain] -= v[:decay_rate] }
     
    - - args.outputs.labels: An array. Values generate a label.
    -   Parameters are [X, Y, TEXT, SIZE, ALIGN, RED, GREEN, BLUE, ALPHA, FONT STYLE]
    -   For more information, go to mygame/documentation/02-labels.md.
    +    sounds_to_stop = args.audio
    +                       .find_all { |k, v| v[:stop_at] && args.state.tick_count >= v[:stop_at] }
    +                       .map { |k, v| k }
     
    - - ARRAY#inside_rect?: An array with at least two values is considered a point. An array
    -   with at least four values is considered a rect. The inside_rect? function returns true
    -   or false depending on if the point is inside the rect.
    +    sounds_to_stop.each { |k| args.audio.delete k }
    +  end
    +end
     
    -=end
    +begin # region: button definitions, ui layout, callback functions
    +  def button args, opts
    +    button_def = opts.merge rect: (args.layout.rect (opts.merge w: 2, h: 1))
     
    -# This code allows users to perform different tasks, such as saving and loading the game.
    -# Users also have options to reset the game and light a fire.
    +    button_def[:border] = button_def[:rect].merge r: 0, g: 0, b: 0
     
    -class TextedBasedGame
    +    label_offset_x = 5
    +    label_offset_y = 30
     
    -  # Contains methods needed for game to run properly.
    -  # Increments tick count by 1 each time it runs (60 times in a single second)
    -  def tick
    -    default
    -    show_intro
    -    state.engine_tick_count += 1
    -    tick_fire
    +    button_def[:label]  = button_def[:rect].merge text: opts[:text],
    +                                                  size_enum: -2.5,
    +                                                  x: button_def[:rect].x + label_offset_x,
    +                                                  y: button_def[:rect].y + label_offset_y
    +
    +    button_def
       end
     
    -  # Sets default values.
    -  # The ||= ensures that a variable's value is only set to the value following the = sign
    -  # if the value has not already been set before. Intialization happens only in the first frame.
    -  def default
    -    state.engine_tick_count ||= 0
    -    state.active_module     ||= :room
    -    state.fire_progress     ||= 0
    -    state.fire_ready_in     ||= 10
    -    state.previous_fire     ||= :dead
    -    state.fire              ||= :dead
    +  def play_sine_wave args, sender
    +    queue_sine_wave args,
    +                    frequency: sender[:frequency],
    +                    duration: 1.seconds,
    +                    fade_out: true
       end
     
    -  def show_intro
    -    return unless state.engine_tick_count == 0 # return unless the game just started
    -    set_story_line "awake." # calls set_story_line method, sets to "awake"
    +  def play_note args, sender
    +    method_to_call = :queue_sine_wave
    +    method_to_call = :queue_square_wave    if sender[:type] == :square
    +    method_to_call = :queue_saw_tooth_wave if sender[:type] == :saw_tooth
    +    method_to_call = :queue_triangle_wave  if sender[:type] == :triangle
    +    method_to_call = :queue_bell           if sender[:type] == :bell
    +
    +    send method_to_call, args,
    +         frequency: (frequency_for note: sender[:note], octave: sender[:octave]),
    +         duration: 1.seconds,
    +         fade_out: true
       end
     
    -  # Sets story line.
    -  def set_story_line story_line
    -    state.story_line    = story_line # story line set to value of parameter
    -    state.active_module = :alert # active module set to alert
    +  def frequency_buttons args
    +    [
    +      (button args,
    +              row: 4.0, col: 0, text: "300hz",
    +              frequency: 300,
    +              method_to_call: :play_sine_wave),
    +      (button args,
    +              row: 5.0, col: 0, text: "400hz",
    +              frequency: 400,
    +              method_to_call: :play_sine_wave),
    +      (button args,
    +              row: 6.0, col: 0, text: "500hz",
    +              frequency: 500,
    +              method_to_call: :play_sine_wave),
    +    ]
       end
     
    -  # Clears story line.
    -  def clear_storyline
    -    state.active_module = :none # active module set to none
    -    state.story_line = nil # story line is cleared, set to nil (or empty)
    +  def sine_wave_note_buttons args
    +    [
    +      (button args,
    +              row: 1.5, col: 2, text: "Sine C4",
    +              note: :c, octave: 4, type: :sine, method_to_call: :play_note),
    +      (button args,
    +              row: 2.5, col: 2, text: "Sine D4",
    +              note: :d, octave: 4, type: :sine, method_to_call: :play_note),
    +      (button args,
    +              row: 3.5, col: 2, text: "Sine E4",
    +              note: :e, octave: 4, type: :sine, method_to_call: :play_note),
    +      (button args,
    +              row: 4.5, col: 2, text: "Sine F4",
    +              note: :f, octave: 4, type: :sine, method_to_call: :play_note),
    +      (button args,
    +              row: 5.5, col: 2, text: "Sine G4",
    +              note: :g, octave: 4, type: :sine, method_to_call: :play_note),
    +      (button args,
    +              row: 6.5, col: 2, text: "Sine A5",
    +              note: :a, octave: 5, type: :sine, method_to_call: :play_note),
    +      (button args,
    +              row: 7.5, col: 2, text: "Sine B5",
    +              note: :b, octave: 5, type: :sine, method_to_call: :play_note),
    +      (button args,
    +              row: 8.5, col: 2, text: "Sine C5",
    +              note: :c, octave: 5, type: :sine, method_to_call: :play_note),
    +    ]
       end
     
    -  # Determines fire progress (how close the fire is to being ready to light).
    -  def tick_fire
    -    return if state.active_module == :alert # return if active module is alert
    -    state.fire_progress += 1 # increment fire progress
    -    # fire_ready_in is 10. The fire_progress is either the current value or 10, whichever has a lower value.
    -    state.fire_progress = state.fire_progress.lesser(state.fire_ready_in)
    +  def square_wave_note_buttons args
    +    [
    +      (button args,
    +              row: 1.5, col: 6, text: "Square C4",
    +              note: :c, octave: 4, type: :square, method_to_call: :play_note),
    +      (button args,
    +              row: 2.5, col: 6, text: "Square D4",
    +              note: :d, octave: 4, type: :square, method_to_call: :play_note),
    +      (button args,
    +              row: 3.5, col: 6, text: "Square E4",
    +              note: :e, octave: 4, type: :square, method_to_call: :play_note),
    +      (button args,
    +              row: 4.5, col: 6, text: "Square F4",
    +              note: :f, octave: 4, type: :square, method_to_call: :play_note),
    +      (button args,
    +              row: 5.5, col: 6, text: "Square G4",
    +              note: :g, octave: 4, type: :square, method_to_call: :play_note),
    +      (button args,
    +              row: 6.5, col: 6, text: "Square A5",
    +              note: :a, octave: 5, type: :square, method_to_call: :play_note),
    +      (button args,
    +              row: 7.5, col: 6, text: "Square B5",
    +              note: :b, octave: 5, type: :square, method_to_call: :play_note),
    +      (button args,
    +              row: 8.5, col: 6, text: "Square C5",
    +              note: :c, octave: 5, type: :square, method_to_call: :play_note),
    +    ]
    +  end
    +  def saw_tooth_wave_note_buttons args
    +    [
    +      (button args,
    +              row: 1.5, col: 8, text: "Saw C4",
    +              note: :c, octave: 4, type: :saw_tooth, method_to_call: :play_note),
    +      (button args,
    +              row: 2.5, col: 8, text: "Saw D4",
    +              note: :d, octave: 4, type: :saw_tooth, method_to_call: :play_note),
    +      (button args,
    +              row: 3.5, col: 8, text: "Saw E4",
    +              note: :e, octave: 4, type: :saw_tooth, method_to_call: :play_note),
    +      (button args,
    +              row: 4.5, col: 8, text: "Saw F4",
    +              note: :f, octave: 4, type: :saw_tooth, method_to_call: :play_note),
    +      (button args,
    +              row: 5.5, col: 8, text: "Saw G4",
    +              note: :g, octave: 4, type: :saw_tooth, method_to_call: :play_note),
    +      (button args,
    +              row: 6.5, col: 8, text: "Saw A5",
    +              note: :a, octave: 5, type: :saw_tooth, method_to_call: :play_note),
    +      (button args,
    +              row: 7.5, col: 8, text: "Saw B5",
    +              note: :b, octave: 5, type: :saw_tooth, method_to_call: :play_note),
    +      (button args,
    +              row: 8.5, col: 8, text: "Saw C5",
    +              note: :c, octave: 5, type: :saw_tooth, method_to_call: :play_note),
    +    ]
       end
     
    -  # Sets the value of fire (whether it is dead or roaring), and the story line
    -  def light_fire
    -    return unless fire_ready? # returns unless the fire is ready to be lit
    -    state.fire = :roaring # fire is lit, set to roaring
    -    state.fire_progress = 0 # the fire progress returns to 0, since the fire has been lit
    -    if state.fire != state.previous_fire
    -      set_story_line "the fire is #{state.fire}." # the story line is set using string interpolation
    -      state.previous_fire = state.fire
    -    end
    +  def triangle_wave_note_buttons args
    +    [
    +      (button args,
    +              row: 1.5, col: 10, text: "Triangle C4",
    +              note: :c, octave: 4, type: :triangle, method_to_call: :play_note),
    +      (button args,
    +              row: 2.5, col: 10, text: "Triangle D4",
    +              note: :d, octave: 4, type: :triangle, method_to_call: :play_note),
    +      (button args,
    +              row: 3.5, col: 10, text: "Triangle E4",
    +              note: :e, octave: 4, type: :triangle, method_to_call: :play_note),
    +      (button args,
    +              row: 4.5, col: 10, text: "Triangle F4",
    +              note: :f, octave: 4, type: :triangle, method_to_call: :play_note),
    +      (button args,
    +              row: 5.5, col: 10, text: "Triangle G4",
    +              note: :g, octave: 4, type: :triangle, method_to_call: :play_note),
    +      (button args,
    +              row: 6.5, col: 10, text: "Triangle A5",
    +              note: :a, octave: 5, type: :triangle, method_to_call: :play_note),
    +      (button args,
    +              row: 7.5, col: 10, text: "Triangle B5",
    +              note: :b, octave: 5, type: :triangle, method_to_call: :play_note),
    +      (button args,
    +              row: 8.5, col: 10, text: "Triangle C5",
    +              note: :c, octave: 5, type: :triangle, method_to_call: :play_note),
    +    ]
       end
     
    -  # Checks if the fire is ready to be lit. Returns a boolean value.
    -  def fire_ready?
    -    # If fire_progress (value between 0 and 10) is equal to fire_ready_in (value of 10),
    -    # the fire is ready to be lit.
    -    state.fire_progress == state.fire_ready_in
    +  def bell_buttons args
    +    [
    +      (button args,
    +              row: 1.5, col: 4, text: "Bell C4",
    +              note: :c, octave: 4, type: :bell, method_to_call: :play_note),
    +      (button args,
    +              row: 2.5, col: 4, text: "Bell D4",
    +              note: :d, octave: 4, type: :bell, method_to_call: :play_note),
    +      (button args,
    +              row: 3.5, col: 4, text: "Bell E4",
    +              note: :e, octave: 4, type: :bell, method_to_call: :play_note),
    +      (button args,
    +              row: 4.5, col: 4, text: "Bell F4",
    +              note: :f, octave: 4, type: :bell, method_to_call: :play_note),
    +      (button args,
    +              row: 5.5, col: 4, text: "Bell G4",
    +              note: :g, octave: 4, type: :bell, method_to_call: :play_note),
    +      (button args,
    +              row: 6.5, col: 4, text: "Bell A5",
    +              note: :a, octave: 5, type: :bell, method_to_call: :play_note),
    +      (button args,
    +              row: 7.5, col: 4, text: "Bell B5",
    +              note: :b, octave: 5, type: :bell, method_to_call: :play_note),
    +      (button args,
    +              row: 8.5, col: 4, text: "Bell C5",
    +              note: :c, octave: 5, type: :bell, method_to_call: :play_note),
    +    ]
    +  end
    +end
    +
    +begin # region: wave generation
    +  begin # sine wave
    +    def defaults_sine_wave_for
    +      { frequency: 440, sample_rate: 48000 }
    +    end
    +
    +    def sine_wave_for opts = {}
    +      opts = defaults_sine_wave_for.merge opts
    +      frequency   = opts[:frequency]
    +      sample_rate = opts[:sample_rate]
    +      period_size = (sample_rate.fdiv frequency).ceil
    +      period_size.map_with_index do |i|
    +        Math::sin((2.0 * Math::PI) / (sample_rate.to_f / frequency.to_f) * i)
    +      end.to_a
    +    end
    +
    +    def defaults_queue_sine_wave
    +      { frequency: 440, duration: 60, gain: 1.0, fade_out: false, queue_in: 0 }
    +    end
    +
    +    def queue_sine_wave args, opts = {}
    +      opts        = defaults_queue_sine_wave.merge opts
    +      frequency   = opts[:frequency]
    +      sample_rate = 48000
    +
    +      sine_wave = sine_wave_for frequency: frequency, sample_rate: sample_rate
    +      args.state.sine_waves[frequency] ||= sine_wave_for frequency: frequency, sample_rate: sample_rate
    +
    +      proc = lambda do
    +        generate_audio_data args.state.sine_waves[frequency], sample_rate
    +      end
    +
    +      audio_state = new_audio_state args, opts
    +      audio_state[:input] = [1, sample_rate, proc]
    +      queue_audio args, audio_state: audio_state, wave: sine_wave
    +    end
       end
     
    -  # Divides the value of the fire_progress variable by 10 to determine how close the user is to
    -  # being able to light a fire.
    -  def light_fire_progress
    -    state.fire_progress.fdiv(10) # float division
    -  end
    +  begin # region: square wave
    +    def defaults_square_wave_for
    +      { frequency: 440, sample_rate: 48000 }
    +    end
    +
    +    def square_wave_for opts = {}
    +      opts = defaults_square_wave_for.merge opts
    +      sine_wave = sine_wave_for opts
    +      sine_wave.map do |v|
    +        if v >= 0
    +          1.0
    +        else
    +          -1.0
    +        end
    +      end.to_a
    +    end
    +
    +    def defaults_queue_square_wave
    +      { frequency: 440, duration: 60, gain: 0.3, fade_out: false, queue_in: 0 }
    +    end
     
    -  # Defines fire as the state.fire variable.
    -  def fire
    -    state.fire
    -  end
    +    def queue_square_wave args, opts = {}
    +      opts        = defaults_queue_square_wave.merge opts
    +      frequency   = opts[:frequency]
    +      sample_rate = 48000
     
    -  # Sets the title of the room.
    -  def room_title
    -    return "a room that is dark" if state.fire == :dead # room is dark if the fire is dead
    -    return "a room that is lit" # room is lit if the fire is not dead
    -  end
    +      square_wave = square_wave_for frequency: frequency, sample_rate: sample_rate
    +      args.state.square_waves[frequency] ||= square_wave_for frequency: frequency, sample_rate: sample_rate
     
    -  # Sets the active_module to room.
    -  def go_to_room
    -    state.active_module = :room
    -  end
    +      proc = lambda do
    +        generate_audio_data args.state.square_waves[frequency], sample_rate
    +      end
     
    -  # Defines active_module as the state.active_module variable.
    -  def active_module
    -    state.active_module
    +      audio_state = new_audio_state args, opts
    +      audio_state[:input] = [1, sample_rate, proc]
    +      queue_audio args, audio_state: audio_state, wave: square_wave
    +    end
       end
     
    -  # Defines story_line as the state.story_line variable.
    -  def story_line
    -    state.story_line
    -  end
    +  begin # region: saw tooth wave
    +    def defaults_saw_tooth_wave_for
    +      { frequency: 440, sample_rate: 48000 }
    +    end
     
    -  # Update every 60 frames (or every second)
    -  def should_tick?
    -    state.tick_count.mod_zero?(60)
    -  end
    +    def saw_tooth_wave_for opts = {}
    +      opts = defaults_saw_tooth_wave_for.merge opts
    +      sine_wave = sine_wave_for opts
    +      period_size = sine_wave.length
    +      sine_wave.map_with_index do |v, i|
    +        (((i % period_size).fdiv period_size) * 2) - 1
    +      end
    +    end
     
    -  # Sets the value of the game state provider.
    -  def initialize game_state_provider
    -    @game_state_provider = game_state_provider
    -  end
    +    def defaults_queue_saw_tooth_wave
    +      { frequency: 440, duration: 60, gain: 0.3, fade_out: false, queue_in: 0 }
    +    end
     
    -  # Defines the game state.
    -  # Any variable prefixed with an @ symbol is an instance variable.
    -  def state
    -    @game_state_provider.state
    -  end
    +    def queue_saw_tooth_wave args, opts = {}
    +      opts        = defaults_queue_saw_tooth_wave.merge opts
    +      frequency   = opts[:frequency]
    +      sample_rate = 48000
     
    -  # Saves the state of the game in a text file called game_state.txt.
    -  def save
    -    $gtk.serialize_state('game_state.txt', state)
    -  end
    +      saw_tooth_wave = saw_tooth_wave_for frequency: frequency, sample_rate: sample_rate
    +      args.state.saw_tooth_waves[frequency] ||= saw_tooth_wave_for frequency: frequency, sample_rate: sample_rate
     
    -  # Loads the game state from the game_state.txt text file.
    -  # If the load is unsuccessful, the user is informed since the story line indicates the failure.
    -  def load
    -    parsed_state = $gtk.deserialize_state('game_state.txt')
    -    if !parsed_state
    -      set_story_line "no game to load. press save first."
    -    else
    -      $gtk.args.state = parsed_state
    +      proc = lambda do
    +        generate_audio_data args.state.saw_tooth_waves[frequency], sample_rate
    +      end
    +
    +      audio_state = new_audio_state args, opts
    +      audio_state[:input] = [1, sample_rate, proc]
    +      queue_audio args, audio_state: audio_state, wave: saw_tooth_wave
         end
       end
     
    -  # Resets the game.
    -  def reset
    -    $gtk.reset
    -  end
    -end
    +  begin # region: triangle wave
    +    def defaults_triangle_wave_for
    +      { frequency: 440, sample_rate: 48000 }
    +    end
     
    -class TextedBasedGamePresenter
    -  attr_accessor :state, :outputs, :inputs
    +    def triangle_wave_for opts = {}
    +      opts = defaults_saw_tooth_wave_for.merge opts
    +      sine_wave = sine_wave_for opts
    +      period_size = sine_wave.length
    +      sine_wave.map_with_index do |v, i|
    +        ratio = (i.fdiv period_size)
    +        if ratio <= 0.5
    +          (ratio * 4) - 1
    +        else
    +          ratio -= 0.5
    +          1 - (ratio * 4)
    +        end
    +      end
    +    end
     
    -  # Creates empty collection called highlights.
    -  # Calls methods necessary to run the game.
    -  def tick
    -    state.layout.highlights ||= []
    -    game.tick if game.should_tick?
    -    render
    -    process_input
    -  end
    +    def defaults_queue_triangle_wave
    +      { frequency: 440, duration: 60, gain: 1.0, fade_out: false, queue_in: 0 }
    +    end
     
    -  # Outputs a label of the tick count (passage of time) and calls all render methods.
    -  def render
    -    outputs.labels << [10, 30, state.tick_count]
    -    render_alert
    -    render_room
    -    render_highlights
    -  end
    +    def queue_triangle_wave args, opts = {}
    +      opts        = defaults_queue_triangle_wave.merge opts
    +      frequency   = opts[:frequency]
    +      sample_rate = 48000
     
    -  # Outputs a label onto the screen that shows the story line, and also outputs a "close" button.
    -  def render_alert
    -    return unless game.active_module == :alert
    +      triangle_wave = triangle_wave_for frequency: frequency, sample_rate: sample_rate
    +      args.state.triangle_waves[frequency] ||= triangle_wave_for frequency: frequency, sample_rate: sample_rate
     
    -    outputs.labels << [640, 480, game.story_line, 5, 1]  # outputs story line label
    -    outputs.primitives << button(:alert_dismiss, 490, 380, "close")  # positions "close" button under story line
    +      proc = lambda do
    +        generate_audio_data args.state.triangle_waves[frequency], sample_rate
    +      end
    +
    +      audio_state = new_audio_state args, opts
    +      audio_state[:input] = [1, sample_rate, proc]
    +      queue_audio args, audio_state: audio_state, wave: triangle_wave
    +    end
       end
     
    -  def render_room
    -    return unless game.active_module == :room
    -    outputs.labels << [640, 700, game.room_title, 4, 1] # outputs room title label at top of screen
    +  begin # region: bell
    +    def defaults_queue_bell
    +      { frequency: 440, duration: 1.seconds, queue_in: 0 }
    +    end
     
    -    # The parameters for these outputs are (symbol, x, y, text, value/percentage) and each has a y value
    -    # that positions it 60 pixels lower than the previous output.
    +    def queue_bell args, opts = {}
    +      (bell_to_sine_waves (defaults_queue_bell.merge opts)).each { |b| queue_sine_wave args, b }
    +    end
     
    -    # outputs the light_fire_progress bar, uses light_fire_progress for its percentage (which changes bar's appearance)
    -    outputs.primitives << progress_bar(:light_fire, 490, 600, "light fire", game.light_fire_progress)
    -    outputs.primitives << button(       :save_game, 490, 540, "save") # outputs save button
    -    outputs.primitives << button(       :load_game, 490, 480, "load") # outputs load button
    -    outputs.primitives << button(      :reset_game, 490, 420, "reset") # outputs reset button
    -    outputs.labels << [640, 30, "the fire is #{game.fire}", 0, 1] # outputs fire label at bottom of screen
    -  end
    +    def bell_harmonics
    +      [
    +        { frequency_ratio: 0.5, duration_ratio: 1.00 },
    +        { frequency_ratio: 1.0, duration_ratio: 0.80 },
    +        { frequency_ratio: 2.0, duration_ratio: 0.60 },
    +        { frequency_ratio: 3.0, duration_ratio: 0.40 },
    +        { frequency_ratio: 4.2, duration_ratio: 0.25 },
    +        { frequency_ratio: 5.4, duration_ratio: 0.20 },
    +        { frequency_ratio: 6.8, duration_ratio: 0.15 }
    +      ]
    +    end
     
    -  # Outputs a collection of highlights using an array to set their values, and also rejects certain values from the collection.
    -  def render_highlights
    -    state.layout.highlights.each do |h| # for each highlight in the collection
    -        h.lifetime -= 1 # decrease the value of its lifetime
    -      end
    +    def defaults_bell_to_sine_waves
    +      { frequency: 440, duration: 1.seconds, queue_in: 0 }
    +    end
     
    -      outputs.solids << state.layout.highlights.map do |h| # outputs highlights collection
    -        [h.x, h.y, h.w, h.h, h.color, 255 * h.lifetime / h.max_lifetime] # sets definition for each highlight
    -        # transparency changes; divide lifetime by max_lifetime, multiply result by 255
    +    def bell_to_sine_waves opts = {}
    +      opts = defaults_bell_to_sine_waves.merge opts
    +      bell_harmonics.map do |b|
    +        {
    +          frequency: opts[:frequency] * b[:frequency_ratio],
    +          duration:  opts[:duration] * b[:duration_ratio],
    +          queue_in:  opts[:queue_in],
    +          gain:      (1.fdiv bell_harmonics.length),
    +          fade_out:  true
    +        }
           end
    -
    -      # reject highlights from collection that have no remaining lifetime
    -      state.layout.highlights = state.layout.highlights.reject { |h| h.lifetime <= 0 }
    +    end
       end
     
    -  # Checks whether or not a button was clicked.
    -  # Returns a boolean value.
    -  def process_input
    -    button = button_clicked? # calls button_clicked? method
    -  end
    +  begin # audio entity construction
    +    def generate_audio_data sine_wave, sample_rate
    +      sample_size = (sample_rate.fdiv (1000.fdiv 60)).ceil
    +      copy_count  = (sample_size.fdiv sine_wave.length).ceil
    +      sine_wave * copy_count
    +    end
     
    -  # Returns a boolean value.
    -  # Finds the button that was clicked from the button list and determines what method to call.
    -  # Adds a highlight to the highlights collection.
    -  def button_clicked?
    -    return nil unless click_pos # return nil unless click_pos holds coordinates of mouse click
    -      button = @button_list.find do |k, v| # goes through button_list to find button clicked
    -        click_pos.inside_rect? v[:primitives].last.rect # was the mouse clicked inside the rect of button?
    -      end
    -      return unless button # return unless a button was clicked
    -      method_to_call = "#{button[0]}_clicked".to_sym # sets method_to_call to symbol (like :save_game or :load_game)
    -      if self.respond_to? method_to_call # returns true if self responds to the given method (method actually exists)
    -        border = button[1][:primitives].last # sets border definition using value of last key in button list hash
    +    def defaults_new_audio_state
    +      { frequency: 440, duration: 60, gain: 1.0, fade_out: false, queue_in: 0 }
    +    end
     
    -        # declares each highlight as a new entity, sets properties
    -        state.layout.highlights << state.new_entity(:highlight) do |h|
    -            h.x = border.x
    -            h.y = border.y
    -            h.w = border.w
    -            h.h = border.h
    -            h.max_lifetime = 10
    -            h.lifetime = h.max_lifetime
    -            h.color = [120, 120, 180] # sets color to shade of purple
    -          end
    +    def new_audio_state args, opts = {}
    +      opts        = defaults_new_audio_state.merge opts
    +      decay_rate  = 0
    +      decay_rate  = 1.fdiv(opts[:duration]) * opts[:gain] if opts[:fade_out]
    +      frequency   = opts[:frequency]
    +      sample_rate = 48000
     
    -          self.send method_to_call # invoke method identified by symbol
    -        else # otherwise, if self doesn't respond to given method
    -          border = button[1][:primitives].last # sets border definition using value of last key in hash
    +      {
    +        id:               (new_id! args),
    +        frequency:        frequency,
    +        sample_rate:      48000,
    +        stop_at:          args.tick_count + opts[:queue_in] + opts[:duration],
    +        gain:             opts[:gain].to_f,
    +        queue_at:         args.state.tick_count + opts[:queue_in],
    +        decay_rate:       decay_rate,
    +        pitch:            1.0,
    +        looping:          true,
    +        paused:           false
    +      }
    +    end
     
    -          # declares each highlight as a new entity, sets properties
    -          state.layout.highlights << state.new_entity(:highlight) do |h|
    -            h.x = border.x
    -            h.y = border.y
    -            h.w = border.w
    -            h.h = border.h
    -            h.max_lifetime = 4 # different max_lifetime than the one set if respond_to? had been true
    -            h.lifetime = h.max_lifetime
    -            h.color = [120, 80, 80] # sets color to dark color
    -          end
    +    def queue_audio args, opts = {}
    +      graph_wave args, opts[:wave], opts[:audio_state][:frequency]
    +      args.state.audio_queue << opts[:audio_state]
    +    end
     
    -          # instructions for users on how to add the missing method_to_call to the code
    -          puts "It looks like #{method_to_call} doesn't exists on TextedBasedGamePresenter. Please add this method:"
    -          puts "Just copy the code below and put it in the #{TextedBasedGamePresenter} class definition."
    -          puts ""
    -          puts "```"
    -          puts "class TextedBasedGamePresenter <--- find this class and put the method below in it"
    -          puts ""
    -          puts "  def #{method_to_call}"
    -          puts "    puts 'Yay that worked!'"
    -          puts "  end"
    -          puts ""
    -          puts "end <-- make sure to put the #{method_to_call} method in between the `class` word and the final `end` statement."
    -          puts "```"
    -          puts ""
    -      end
    -  end
    +    def new_id! args
    +      args.state.audio_id ||= 0
    +      args.state.audio_id  += 1
    +    end
     
    -  # Returns the position of the mouse when it is clicked.
    -  def click_pos
    -    return nil unless inputs.mouse.click # returns nil unless the mouse was clicked
    -    return inputs.mouse.click.point # returns location of mouse click (coordinates)
    -  end
    +    def graph_wave args, wave, frequency
    +      if args.state.tick_count != args.state.graphed_at
    +        args.outputs.static_lines.clear
    +        args.outputs.static_sprites.clear
    +      end
     
    -  # Creates buttons for the button_list and sets their values using a hash (uses symbols as keys)
    -  def button id, x, y, text
    -    @button_list[id] ||= { # assigns values to hash keys
    -      id: id,
    -      text: text,
    -      primitives: [
    -        [x + 10, y + 30, text, 2, 0].label, # positions label inside border
    -        [x, y, 300, 50].border,             # sets definition of border
    -      ]
    -    }
    +      wave = wave
     
    -    @button_list[id][:primitives] # returns label and border for buttons
    -  end
    +      r, g, b = frequency.to_i % 85,
    +                frequency.to_i % 170,
    +                frequency.to_i % 255
     
    -  # Creates a progress bar (used for lighting the fire) and sets its values.
    -  def progress_bar id, x, y, text, percentage
    -    @button_list[id] = { # assigns values to hash keys
    -      id: id,
    -      text: text,
    -      primitives: [
    -        [x, y, 300, 50, 100, 100, 100].solid, # sets definition for solid (which fills the bar with gray)
    -        [x + 10, y + 30, text, 2, 0].label, # sets definition for label, positions inside border
    -        [x, y, 300, 50].border, # sets definition of border
    -      ]
    -    }
    +      starting_rect = args.layout.rect(row: 5, col: 13)
    +      x_scale    = 10
    +      y_scale    = 100
    +      max_points = 25
     
    -    # Fills progress bar based on percentage. If the fire was ready to be lit (100%) and we multiplied by
    -    # 100, only 1/3 of the bar would only be filled in. 200 would cause only 2/3 to be filled in.
    -    @button_list[id][:primitives][0][2] = 300 * percentage
    -    @button_list[id][:primitives]
    -  end
    +      points = wave
    +      if wave.length > max_points
    +        resolution = wave.length.idiv max_points
    +        points = wave.find_all.with_index { |y, i| (i % resolution == 0) }
    +      end
     
    -  # Defines the game.
    -  def game
    -    @game
    -  end
    +      args.outputs.static_lines << points.map_with_index do |y, x|
    +        next_y = points[x + 1]
     
    -  # Initalizes the game and creates an empty list of buttons.
    -  def initialize
    -    @game = TextedBasedGame.new self
    -    @button_list ||= {}
    -  end
    +        if next_y
    +          {
    +            x:  starting_rect.x + (x * x_scale),
    +            y:  starting_rect.y + starting_rect.h.half + y_scale * y,
    +            x2: starting_rect.x + ((x + 1) * x_scale),
    +            y2: starting_rect.y + starting_rect.h.half + y_scale * next_y,
    +            r:  r,
    +            g:  g,
    +            b:  b
    +          }
    +        end
    +      end
     
    -  # Clears the storyline and takes the user to the room.
    -  def alert_dismiss_clicked
    -    game.clear_storyline
    -    game.go_to_room
    -  end
    +      args.outputs.static_sprites << points.map_with_index do |y, x|
    +        {
    +          x:  (starting_rect.x + (x * x_scale)) - 2,
    +          y:  (starting_rect.y + starting_rect.h.half + y_scale * y) - 2,
    +          w:  4,
    +          h:  4,
    +          path: 'sprites/square-white.png',
    +          r: r,
    +          g: g,
    +          b: b
    +        }
    +      end
     
    -  # Lights the fire when the user clicks the "light fire" option.
    -  def light_fire_clicked
    -    game.light_fire
    +      args.state.graphed_at = args.state.tick_count
    +    end
       end
     
    -  # Saves the game when the user clicks the "save" option.
    -  def save_game_clicked
    -    game.save
    -  end
    +  begin # region: musical note mapping
    +    def defaults_frequency_for
    +      { note: :a, octave: 5, sharp:  false, flat:   false }
    +    end
     
    -  # Resets the game when the user clicks the "reset" option.
    -  def reset_game_clicked
    -    game.reset
    -  end
    +    def frequency_for opts = {}
    +      opts = defaults_frequency_for.merge opts
    +      octave_offset_multiplier  = opts[:octave] - 5
    +      note = note_frequencies_octave_5[opts[:note]]
    +      if octave_offset_multiplier < 0
    +        note = note * 1 / (octave_offset_multiplier.abs + 1)
    +      elsif octave_offset_multiplier > 0
    +        note = note * (octave_offset_multiplier.abs + 1) / 1
    +      end
    +      note
    +    end
     
    -  # Loads the game when the user clicks the "load" option.
    -  def load_game_clicked
    -    game.load
    +    def note_frequencies_octave_5
    +      {
    +        a: 440.0,
    +        a_sharp: 466.16, b_flat: 466.16,
    +        b: 493.88,
    +        c: 523.25,
    +        c_sharp: 554.37, d_flat: 587.33,
    +        d: 587.33,
    +        d_sharp: 622.25, e_flat: 659.25,
    +        e: 659.25,
    +        f: 698.25,
    +        f_sharp: 739.99, g_flat: 739.99,
    +        g: 783.99,
    +        g_sharp: 830.61, a_flat: 830.61
    +      }
    +    end
       end
     end
     
    -$text_based_rpg = TextedBasedGamePresenter.new
    -
    -def tick args
    -  $text_based_rpg.state = args.state
    -  $text_based_rpg.outputs = args.outputs
    -  $text_based_rpg.inputs = args.inputs
    -  $text_based_rpg.tick
    -end
    +$gtk.reset
     
     
    -

    Advanced Rendering - Simple Render Targets - main.rb

    +

    Advanced Rendering - Simple Render Targets - main.rb

    # ./samples/07_advanced_rendering/01_simple_render_targets/app/main.rb
     def tick args
       # args.outputs.render_targets are really really powerful.
    @@ -11586,7 +11964,7 @@ end
     $gtk.reset
     
     
    -

    Advanced Rendering - Render Targets With Tile Manipulation - main.rb

    +

    Advanced Rendering - Render Targets With Tile Manipulation - main.rb

    # ./samples/07_advanced_rendering/02_render_targets_with_tile_manipulation/app/main.rb
     # This sample is meant to show you how to do that dripping transition thing
     #  at the start of the original Doom. Most of this file is here to animate
    @@ -11685,7 +12063,7 @@ def tick_instructions args, text, y = 715
     end
     
     
    -

    Advanced Rendering - Render Target Viewports - main.rb

    +

    Advanced Rendering - Render Target Viewports - main.rb

    # ./samples/07_advanced_rendering/03_render_target_viewports/app/main.rb
     =begin
     
    @@ -12157,7 +12535,7 @@ def tick_instructions args, text, y = 715
     end
     
     
    -

    Advanced Rendering - Render Primitive Hierarchies - main.rb

    +

    Advanced Rendering - Render Primitive Hierarchies - main.rb

    # ./samples/07_advanced_rendering/04_render_primitive_hierarchies/app/main.rb
     =begin
     
    @@ -12333,7 +12711,7 @@ def collection_of_sprites args
     end
     
     
    -

    Advanced Rendering - Render Primitives As Hash - main.rb

    +

    Advanced Rendering - Render Primitives As Hash - main.rb

    # ./samples/07_advanced_rendering/05_render_primitives_as_hash/app/main.rb
     =begin
     
    @@ -12473,7 +12851,7 @@ def tick args
         flip_horizontally: false,
         angle_anchor_x: 0.5,            # rotation center set to middle
         angle_anchor_y: 0.5
    -  }.sprite
    +  }.sprite!
     
       # Outputs label as primitive using a hash
       args.outputs.primitives << {
    @@ -12487,7 +12865,7 @@ def tick args
         b:         50,
         a:         255,                 # transparency
         font:      "fonts/manaspc.ttf"  # font style
    -  }.label
    +  }.label!
     
       # Outputs solid as primitive using a hash
       args.outputs.primitives << {
    @@ -12499,7 +12877,7 @@ def tick args
         g:  50,
         b:  50,
         a: 255                          # transparency
    -  }.solid
    +  }.solid!
     
       # Outputs border as primitive using a hash
       # Same parameters as solid
    @@ -12512,7 +12890,7 @@ def tick args
         g:  50,
         b:  50,
         a: 255                          # transparency
    -  }.border
    +  }.border!
     
       # Outputs line as primitive using a hash
       args.outputs.primitives << {
    @@ -12524,11 +12902,11 @@ def tick args
         g:   50,
         b:   50,
         a:  255                         # transparency
    -  }.line
    +  }.line!
     end
     
     
    -

    Advanced Rendering - Pixel Arrays - main.rb

    +

    Advanced Rendering - Pixel Arrays - main.rb

    # ./samples/07_advanced_rendering/06_pixel_arrays/app/main.rb
     $gtk.reset
     
    @@ -12573,8 +12951,105 @@ end
     
     
     
    -

    Advanced Rendering - Splitscreen Camera - main.rb

    -
    # ./samples/07_advanced_rendering/07_splitscreen_camera/app/main.rb
    +

    Advanced Rendering - Simple Camera - main.rb

    +
    # ./samples/07_advanced_rendering/07_simple_camera/app/main.rb
    +def tick args
    +  # variables you can play around with
    +  args.state.world.w      ||= 1280
    +  args.state.world.h      ||= 720
    +
    +  args.state.player.x     ||= 0
    +  args.state.player.y     ||= 0
    +  args.state.player.size  ||= 32
    +
    +  args.state.enemy.x      ||= 700
    +  args.state.enemy.y      ||= 700
    +  args.state.enemy.size   ||= 16
    +
    +  args.state.camera.x                ||= 640
    +  args.state.camera.y                ||= 300
    +  args.state.camera.scale            ||= 1.0
    +  args.state.camera.show_empty_space ||= :yes
    +
    +  # instructions
    +  args.outputs.primitives << { x: 0, y:  80.from_top, w: 360, h: 80, r: 0, g: 0, b: 0, a: 128 }.solid!
    +  args.outputs.primitives << { x: 10, y: 10.from_top, text: "arrow keys to move around", r: 255, g: 255, b: 255}.label!
    +  args.outputs.primitives << { x: 10, y: 30.from_top, text: "+/- to change zoom of camera", r: 255, g: 255, b: 255}.label!
    +  args.outputs.primitives << { x: 10, y: 50.from_top, text: "tab to change camera edge behavior", r: 255, g: 255, b: 255}.label!
    +
    +  # render scene
    +  args.outputs[:scene].w = args.state.world.w
    +  args.outputs[:scene].h = args.state.world.h
    +
    +  args.outputs[:scene].solids << { x: 0, y: 0, w: args.state.world.w, h: args.state.world.h, r: 20, g: 60, b: 80 }
    +  args.outputs[:scene].solids << { x: args.state.player.x, y: args.state.player.y,
    +                                   w: args.state.player.size, h: args.state.player.size, r: 80, g: 155, b: 80 }
    +  args.outputs[:scene].solids << { x: args.state.enemy.x, y: args.state.enemy.y,
    +                                   w: args.state.enemy.size, h: args.state.enemy.size, r: 155, g: 80, b: 80 }
    +
    +  # render camera
    +  scene_position = calc_scene_position args
    +  args.outputs.sprites << { x: scene_position.x,
    +                            y: scene_position.y,
    +                            w: scene_position.w,
    +                            h: scene_position.h,
    +                            path: :scene }
    +
    +  # move player
    +  if args.inputs.directional_angle
    +    args.state.player.x += args.inputs.directional_angle.vector_x * 5
    +    args.state.player.y += args.inputs.directional_angle.vector_y * 5
    +    args.state.player.x  = args.state.player.x.clamp(0, args.state.world.w - args.state.player.size)
    +    args.state.player.y  = args.state.player.y.clamp(0, args.state.world.h - args.state.player.size)
    +  end
    +
    +  # +/- to zoom in and out
    +  if args.inputs.keyboard.plus && args.state.tick_count.zmod?(3)
    +    args.state.camera.scale += 0.05
    +  elsif args.inputs.keyboard.hyphen && args.state.tick_count.zmod?(3)
    +    args.state.camera.scale -= 0.05
    +  elsif args.inputs.keyboard.key_down.tab
    +    if args.state.camera.show_empty_space == :yes
    +      args.state.camera.show_empty_space = :no
    +    else
    +      args.state.camera.show_empty_space = :yes
    +    end
    +  end
    +
    +  args.state.camera.scale = args.state.camera.scale.greater(0.1)
    +end
    +
    +def calc_scene_position args
    +  result = { x: args.state.camera.x - (args.state.player.x * args.state.camera.scale),
    +             y: args.state.camera.y - (args.state.player.y * args.state.camera.scale),
    +             w: args.state.world.w * args.state.camera.scale,
    +             h: args.state.world.h * args.state.camera.scale,
    +             scale: args.state.camera.scale }
    +
    +  return result if args.state.camera.show_empty_space == :yes
    +
    +  if result.w < args.grid.w
    +    result.merge!(x: (args.grid.w - result.w).half)
    +  elsif (args.state.player.x * result.scale) < args.grid.w.half
    +    result.merge!(x: 10)
    +  elsif (result.x + result.w) < args.grid.w
    +    result.merge!(x: - result.w + (args.grid.w - 10))
    +  end
    +
    +  if result.h < args.grid.h
    +    result.merge!(y: (args.grid.h - result.h).half)
    +  elsif (result.y) > 10
    +    result.merge!(y: 10)
    +  elsif (result.y + result.h) < args.grid.h
    +    result.merge!(y: - result.h + (args.grid.h - 10))
    +  end
    +
    +  result
    +end
    +
    +
    +

    Advanced Rendering - Splitscreen Camera - main.rb

    +
    # ./samples/07_advanced_rendering/08_splitscreen_camera/app/main.rb
     class CameraMovement
       attr_accessor :state, :inputs, :outputs, :grid
     
    @@ -12972,8 +13447,8 @@ def tick args
     end
     
     
    -

    Advanced Rendering - Z Targeting Camera - main.rb

    -
    # ./samples/07_advanced_rendering/08_z_targeting_camera/app/main.rb
    +

    Advanced Rendering - Z Targeting Camera - main.rb

    +
    # ./samples/07_advanced_rendering/09_z_targeting_camera/app/main.rb
     class Game
       attr_gtk
     
    @@ -13082,7 +13557,60 @@ end
     $gtk.reset
     
     
    -

    Tweening Lerping Easing Functions - Easing Functions - main.rb

    +

    Advanced Rendering - Blend Modes - main.rb

    +
    # ./samples/07_advanced_rendering/10_blend_modes/app/main.rb
    +$gtk.reset
    +
    +def draw_blendmode args, mode
    +  w = 160
    +  h = w
    +  args.state.x += (1280-w) / (args.state.blendmodes.length + 1)
    +  x = args.state.x
    +  y = (720 - h) / 2
    +  s = 'sprites/blue-feathered.png'
    +  args.outputs.sprites << { blendmode_enum: mode.value, x: x, y: y, w: w, h: h, path: s }
    +  args.outputs.labels << [x + (w/2), y, mode.name.to_s, 1, 1, 255, 255, 255]
    +end
    +
    +def tick args
    +
    +  # Different blend modes do different things, depending on what they
    +  # blend against (in this case, the pixels of the background color).
    +  args.state.bg_element ||= 1
    +  args.state.bg_color ||= 255
    +  args.state.bg_color_direction ||= 1
    +  bg_r = (args.state.bg_element == 1) ? args.state.bg_color : 0
    +  bg_g = (args.state.bg_element == 2) ? args.state.bg_color : 0
    +  bg_b = (args.state.bg_element == 3) ? args.state.bg_color : 0
    +  args.state.bg_color += args.state.bg_color_direction
    +  if (args.state.bg_color_direction > 0) && (args.state.bg_color >= 255)
    +    args.state.bg_color_direction = -1
    +    args.state.bg_color = 255
    +  elsif (args.state.bg_color_direction < 0) && (args.state.bg_color <= 0)
    +    args.state.bg_color_direction = 1
    +    args.state.bg_color = 0
    +    args.state.bg_element += 1
    +    if args.state.bg_element >= 4
    +      args.state.bg_element = 1
    +    end
    +  end
    +
    +  args.outputs.background_color = [ bg_r, bg_g, bg_b, 255 ]
    +
    +  args.state.blendmodes ||= [
    +    { name: :none,  value: 0 },
    +    { name: :blend, value: 1 },
    +    { name: :add,   value: 2 },
    +    { name: :mod,   value: 3 },
    +    { name: :mul,   value: 4 }
    +  ]
    +
    +  args.state.x = 0  # reset this, draw_blendmode will increment it.
    +  args.state.blendmodes.each { |blendmode| draw_blendmode args, blendmode }
    +end
    +
    +
    +

    Tweening Lerping Easing Functions - Easing Functions - main.rb

    # ./samples/08_tweening_lerping_easing_functions/01_easing_functions/app/main.rb
     def tick args
       # STOP! Watch the following presentation first!!!!
    @@ -13218,7 +13746,7 @@ module Easing
     end
     
     
    -

    Tweening Lerping Easing Functions - Cubic Bezier - main.rb

    +

    Tweening Lerping Easing Functions - Cubic Bezier - main.rb

    # ./samples/08_tweening_lerping_easing_functions/02_cubic_bezier/app/main.rb
     def tick args
       args.outputs.background_color = [33, 33, 33]
    @@ -13283,7 +13811,7 @@ def pow n, to
     end
     
     
    -

    Tweening Lerping Easing Functions - Easing Using Spline - main.rb

    +

    Tweening Lerping Easing Functions - Easing Using Spline - main.rb

    # ./samples/08_tweening_lerping_easing_functions/03_easing_using_spline/app/main.rb
     def tick args
       args.state.duration = 10.seconds
    @@ -13305,7 +13833,7 @@ def tick args
     end
     
     
    -

    Tweening Lerping Easing Functions - Parametric Enemy Movement - main.rb

    +

    Tweening Lerping Easing Functions - Parametric Enemy Movement - main.rb

    # ./samples/08_tweening_lerping_easing_functions/04_parametric_enemy_movement/app/main.rb
     def new_star args
       { x: 1280.randomize(:ratio),
    @@ -13522,7 +14050,7 @@ def tick args
     end
     
     
    -

    Performance - Sprites As Hash - main.rb

    +

    Performance - Sprites As Hash - main.rb

    # ./samples/09_performance/01_sprites_as_hash/app/main.rb
     
     # Sprites represented as Hashes using the queue ~args.outputs.sprites~
    @@ -13565,7 +14093,11 @@ def tick args
     
       # sets console command when sample app initially opens
       if Kernel.global_tick_count == 0
    -    puts "* INFO - Please specify the number of sprites to render."
    +    puts ""
    +    puts ""
    +    puts "========================================================="
    +    puts "* INFO: Sprites, Hashes"
    +    puts "* INFO: Please specify the number of sprites to render."
         args.gtk.console.set_command "reset_with count: 100"
       end
     
    @@ -13590,7 +14122,7 @@ def reset_with count: count
     end
     
     
    -

    Performance - Sprites As Entities - main.rb

    +

    Performance - Sprites As Entities - main.rb

    # ./samples/09_performance/02_sprites_as_entities/app/main.rb
     # Sprites represented as Entities using the queue ~args.outputs.sprites~
     # yields nicer access apis over Hashes, but require a bit more code upfront.
    @@ -13633,7 +14165,11 @@ def tick args
     
       # sets console command when sample app initially opens
       if Kernel.global_tick_count == 0
    -    puts "* INFO - Please specify the number of sprites to render."
    +    puts ""
    +    puts ""
    +    puts "========================================================="
    +    puts "* INFO: Sprites, Open Entities"
    +    puts "* INFO: Please specify the number of sprites to render."
         args.gtk.console.set_command "reset_with count: 100"
       end
     
    @@ -13658,7 +14194,7 @@ def reset_with count: count
     end
     
     
    -

    Performance - Sprites As Strict Entities - main.rb

    +

    Performance - Sprites As Strict Entities - main.rb

    # ./samples/09_performance/03_sprites_as_strict_entities/app/main.rb
     # Sprites represented as StrictEntities using the queue ~args.outputs.sprites~
     # yields apis access similar to Entities, but all properties that can be set on the
    @@ -13705,7 +14241,11 @@ def tick args
     
       # sets console command when sample app initially opens
       if Kernel.global_tick_count == 0
    -    puts "* INFO - Please specify the number of sprites to render."
    +    puts ""
    +    puts ""
    +    puts "========================================================="
    +    puts "* INFO: Sprites, Strict Entities"
    +    puts "* INFO: Please specify the number of sprites to render."
         args.gtk.console.set_command "reset_with count: 100"
       end
     
    @@ -13730,7 +14270,7 @@ def reset_with count: count
     end
     
     
    -

    Performance - Sprites As Classes - main.rb

    +

    Performance - Sprites As Classes - main.rb

    # ./samples/09_performance/04_sprites_as_classes/app/main.rb
     # Sprites represented as Classes using the queue ~args.outputs.sprites~.
     # gives you full control of property declaration and method invocation.
    @@ -13760,6 +14300,11 @@ end
     def tick args
       # sets console command when sample app initially opens
       if Kernel.global_tick_count == 0
    +    puts ""
    +    puts ""
    +    puts "========================================================="
    +    puts "* INFO: Sprites, Classes"
    +    puts "* INFO: Please specify the number of sprites to render."
         args.gtk.console.set_command "reset_with count: 100"
       end
     
    @@ -13784,7 +14329,7 @@ def reset_with count: count
     end
     
     
    -

    Performance - Static Sprites As Classes - main.rb

    +

    Performance - Static Sprites As Classes - main.rb

    # ./samples/09_performance/05_static_sprites_as_classes/app/main.rb
     # Sprites represented as Classes using the queue ~args.outputs.static_sprites~.
     # bypasses the queue behavior of ~args.outputs.sprites~. All instances are held
    @@ -13815,19 +14360,24 @@ end
     def tick args
       # sets console command when sample app initially opens
       if Kernel.global_tick_count == 0
    +    puts ""
    +    puts ""
    +    puts "========================================================="
    +    puts "* INFO: Static Sprites, Classes"
    +    puts "* INFO: Please specify the number of sprites to render."
         args.gtk.console.set_command "reset_with count: 100"
       end
     
       # init
       if args.state.tick_count == 0
         args.state.stars = args.state.star_count.map { |i| Star.new args.grid }
    +    args.outputs.static_sprites << args.state.stars
       end
     
       # update
       args.state.stars.each(&:move)
     
       # render
    -  args.outputs.sprites << args.state.stars
       args.outputs.background_color = [0, 0, 0]
       args.outputs.primitives << args.gtk.current_framerate_primitives
     end
    @@ -13839,7 +14389,7 @@ def reset_with count: count
     end
     
     
    -

    Performance - Static Sprites As Classes With Custom Drawing - main.rb

    +

    Performance - Static Sprites As Classes With Custom Drawing - main.rb

    # ./samples/09_performance/06_static_sprites_as_classes_with_custom_drawing/app/main.rb
     # Sprites represented as Classes, with a draw_override method, and using the queue ~args.outputs.static_sprites~.
     # is the fastest approach. This is comparable to what other game engines set as the default behavior.
    @@ -13883,10 +14433,21 @@ class Star
         # path,
         # angle,
         # alpha, red_saturation, green_saturation, blue_saturation
    +    # tile_x, tile_y, tile_w, tile_h,
         # flip_horizontally, flip_vertically,
    -    # tile_x, tile_y, tile_w, tile_h
         # angle_anchor_x, angle_anchor_y,
         # source_x, source_y, source_w, source_h
    +
    +    # The argument order for ffi_draw.draw_sprite_4 is:
    +    # x, y, w, h,
    +    # path,
    +    # angle,
    +    # alpha, red_saturation, green_saturation, blue_saturation
    +    # tile_x, tile_y, tile_w, tile_h,
    +    # flip_horizontally, flip_vertically,
    +    # angle_anchor_x, angle_anchor_y,
    +    # source_x, source_y, source_w, source_h,
    +    # blendmode_enum
       end
     end
     
    @@ -13894,6 +14455,11 @@ end
     def tick args
       # sets console command when sample app initially opens
       if Kernel.global_tick_count == 0
    +    puts ""
    +    puts ""
    +    puts "========================================================="
    +    puts "* INFO: Static Sprites, Classes, Draw Override"
    +    puts "* INFO: Please specify the number of sprites to render."
         args.gtk.console.set_command "reset_with count: 100"
       end
     
    @@ -13915,7 +14481,7 @@ def reset_with count: count
     end
     
     
    -

    Performance - Collision Limits - main.rb

    +

    Performance - Collision Limits - main.rb

    # ./samples/09_performance/07_collision_limits/app/main.rb
     =begin
     
    @@ -13974,7 +14540,7 @@ end
     $gtk.reset
     
     
    -

    Advanced Debugging - Trace Debugging - main.rb

    +

    Advanced Debugging - Trace Debugging - main.rb

    # ./samples/10_advanced_debugging/01_trace_debugging/app/main.rb
     class Game
       attr_gtk
    @@ -14031,7 +14597,7 @@ def tick args
     end
     
     
    -

    Advanced Debugging - Trace Debugging Classes - main.rb

    +

    Advanced Debugging - Trace Debugging Classes - main.rb

    # ./samples/10_advanced_debugging/02_trace_debugging_classes/app/main.rb
     class Foobar
       def initialize
    @@ -14057,7 +14623,54 @@ def tick args
     end
     
     
    -

    Advanced Debugging - Unit Tests - exception_raising_tests.rb

    +

    Advanced Debugging - Unit Tests - benchmark_api_tests.rb

    +
    # ./samples/10_advanced_debugging/03_unit_tests/benchmark_api_tests.rb
    +def test_benchmark_api args, assert
    +  result = args.gtk.benchmark iterations: 100,
    +                              only_one: -> () {
    +                                r = 0
    +                                (1..100).each do |i|
    +                                  r += 1
    +                                end
    +                              }
    +
    +  assert.equal! result.first_place.name, :only_one
    +
    +  result = args.gtk.benchmark iterations: 100,
    +                              iterations_100: -> () {
    +                                r = 0
    +                                (1..100).each do |i|
    +                                  r += 1
    +                                end
    +                              },
    +                              iterations_50: -> () {
    +                                r = 0
    +                                (1..50).each do |i|
    +                                  r += 1
    +                                end
    +                              }
    +
    +  assert.equal! result.first_place.name, :iterations_50
    +
    +  result = args.gtk.benchmark iterations: 1,
    +                              iterations_100: -> () {
    +                                r = 0
    +                                (1..100).each do |i|
    +                                  r += 1
    +                                end
    +                              },
    +                              iterations_50: -> () {
    +                                r = 0
    +                                (1..50).each do |i|
    +                                  r += 1
    +                                end
    +                              }
    +
    +  assert.equal! result.too_small_to_measure, true
    +end
    +
    +
    +

    Advanced Debugging - Unit Tests - exception_raising_tests.rb

    # ./samples/10_advanced_debugging/03_unit_tests/exception_raising_tests.rb
     begin :shared
       class ExceptionalClass
    @@ -14080,7 +14693,7 @@ $gtk.reset 100
     $gtk.log_level = :off
     
     
    -

    Advanced Debugging - Unit Tests - fn_tests.rb

    +

    Advanced Debugging - Unit Tests - fn_tests.rb

    # ./samples/10_advanced_debugging/03_unit_tests/fn_tests.rb
     def infinity
       1 / 0
    @@ -14264,13 +14877,13 @@ def test_array_hash args, assert
     end
     
     
    -

    Advanced Debugging - Unit Tests - gen_docs.rb

    +

    Advanced Debugging - Unit Tests - gen_docs.rb

    # ./samples/10_advanced_debugging/03_unit_tests/gen_docs.rb
     # ./dragonruby mygame --eval samples/99_zz_gtk_unit_tests/gen_docs.rb --no-tick
     Kernel.export_docs!
     
     
    -

    Advanced Debugging - Unit Tests - geometry_tests.rb

    +

    Advanced Debugging - Unit Tests - geometry_tests.rb

    # ./samples/10_advanced_debugging/03_unit_tests/geometry_tests.rb
     begin :shared
       def primitive_representations x, y, w, h
    @@ -14388,7 +15001,7 @@ $gtk.reset 100
     $gtk.log_level = :off
     
     
    -

    Advanced Debugging - Unit Tests - http_tests.rb

    +

    Advanced Debugging - Unit Tests - http_tests.rb

    # ./samples/10_advanced_debugging/03_unit_tests/http_tests.rb
     def try_assert_or_schedule args, assert
       if $result[:complete]
    @@ -14414,7 +15027,7 @@ $gtk.reset 100
     $gtk.log_level = :off
     
     
    -

    Advanced Debugging - Unit Tests - nil_coercion_tests.rb

    +

    Advanced Debugging - Unit Tests - nil_coercion_tests.rb

    # ./samples/10_advanced_debugging/03_unit_tests/nil_coercion_tests.rb
     # numbers
     def test_open_entity_add_number args, assert
    @@ -14510,7 +15123,7 @@ def test_open_entity_nil_bug args, assert
     end
     
     
    -

    Advanced Debugging - Unit Tests - object_to_primitive_tests.rb

    +

    Advanced Debugging - Unit Tests - object_to_primitive_tests.rb

    # ./samples/10_advanced_debugging/03_unit_tests/object_to_primitive_tests.rb
     class PlayerSpriteForTest
     end
    @@ -14530,7 +15143,7 @@ $gtk.reset 100
     $gtk.log_level = :off
     
     
    -

    Advanced Debugging - Unit Tests - parsing_tests.rb

    +

    Advanced Debugging - Unit Tests - parsing_tests.rb

    # ./samples/10_advanced_debugging/03_unit_tests/parsing_tests.rb
     def test_parse_json args, assert
       result = args.gtk.parse_json '{ "name": "John Doe", "aliases": ["JD"] }'
    @@ -14561,7 +15174,141 @@ $gtk.reset 100
     $gtk.log_level = :off
     
     
    -

    Advanced Debugging - Unit Tests - require_tests.rb

    +

    Advanced Debugging - Unit Tests - pretty_format_tests.rb

    +
    # ./samples/10_advanced_debugging/03_unit_tests/pretty_format_tests.rb
    +def H opts
    +  opts
    +end
    +
    +def A *opts
    +  opts
    +end
    +
    +def assert_format args, assert, hash, expected
    +  actual = args.fn.pretty_format hash
    +  assert.are_equal! actual, expected
    +end
    +
    +def test_pretty_print args, assert
    +  # =============================
    +  # hash with single value
    +  # =============================
    +  input = (H first_name: "John")
    +  expected = <<-S
    +{:first_name "John"}
    +S
    +  (assert_format args, assert, input, expected)
    +
    +  # =============================
    +  # hash with two values
    +  # =============================
    +  input = (H first_name: "John", last_name: "Smith")
    +  expected = <<-S
    +{:first_name "John"
    + :last_name "Smith"}
    +S
    +
    +  (assert_format args, assert, input, expected)
    +
    +  # =============================
    +  # hash with inner hash
    +  # =============================
    +  input = (H first_name: "John",
    +             last_name: "Smith",
    +             middle_initial: "I",
    +             so: (H first_name: "Pocahontas",
    +                    last_name: "Tsenacommacah"),
    +             friends: (A (H first_name: "Side", last_name: "Kick"),
    +                         (H first_name: "Tim", last_name: "Wizard")))
    +  expected = <<-S
    +{:first_name "John"
    + :last_name "Smith"
    + :middle_initial "I"
    + :so {:first_name "Pocahontas"
    +      :last_name "Tsenacommacah"}
    + :friends [{:first_name "Side"
    +            :last_name "Kick"}
    +           {:first_name "Tim"
    +            :last_name "Wizard"}]}
    +S
    +
    +  (assert_format args, assert, input, expected)
    +
    +  # =============================
    +  # array with one value
    +  # =============================
    +  input = (A 1)
    +  expected = <<-S
    +[1]
    +S
    +  (assert_format args, assert, input, expected)
    +
    +  # =============================
    +  # array with multiple values
    +  # =============================
    +  input = (A 1, 2, 3)
    +  expected = <<-S
    +[1
    + 2
    + 3]
    +S
    +  (assert_format args, assert, input, expected)
    +
    +  # =============================
    +  # array with multiple values hashes
    +  # =============================
    +  input = (A (H first_name: "Side", last_name: "Kick"),
    +             (H first_name: "Tim", last_name: "Wizard"))
    +  expected = <<-S
    +[{:first_name "Side"
    +  :last_name "Kick"}
    + {:first_name "Tim"
    +  :last_name "Wizard"}]
    +S
    +
    +  (assert_format args, assert, input, expected)
    +end
    +
    +def test_nested_nested args, assert
    +  # =============================
    +  # nested array in nested hash
    +  # =============================
    +  input = (H type: :root,
    +             text: "Root",
    +             children: (A (H level: 1,
    +                             text: "Level 1",
    +                             children: (A (H level: 2,
    +                                             text: "Level 2",
    +                                             children: [])))))
    +
    +  expected = <<-S
    +{:type :root
    + :text "Root"
    + :children [{:level 1
    +             :text "Level 1"
    +             :children [{:level 2
    +                         :text "Level 2"
    +                         :children []}]}]}
    +
    +S
    +
    +  (assert_format args, assert, input, expected)
    +end
    +
    +def test_scene args, assert
    +  script = <<-S
    +* Scene 1
    +** Narrator
    +They say happy endings don't exist.
    +** Narrator
    +They say true love is a lie.
    +S
    +  input = parse_org args, script
    +  puts (args.fn.pretty_format input)
    +end
    +
    +
    +

    Advanced Debugging - Unit Tests - require_tests.rb

    # ./samples/10_advanced_debugging/03_unit_tests/require_tests.rb
     def write_src path, src
       $gtk.write_file path, src
    @@ -14603,7 +15350,7 @@ def test_require args, assert
     end
     
     
    -

    Advanced Debugging - Unit Tests - serialize_deserialize_tests.rb

    +

    Advanced Debugging - Unit Tests - serialize_deserialize_tests.rb

    # ./samples/10_advanced_debugging/03_unit_tests/serialize_deserialize_tests.rb
     def test_serialize args, assert
       GTK::Entity.__reset_id__!
    @@ -14722,7 +15469,7 @@ def test_by_reference_state_strict_entities args, assert
     end
     
     
    -

    Advanced Debugging - Unit Tests - state_serialization_experimental_tests.rb

    +

    Advanced Debugging - Unit Tests - state_serialization_experimental_tests.rb

    # ./samples/10_advanced_debugging/03_unit_tests/state_serialization_experimental_tests.rb
     MAX_CODE_GEN_LENGTH = 50
     
    @@ -14832,7 +15579,7 @@ $gtk.reset 100
     $gtk.log_level = :off
     
     
    -

    Advanced Debugging - Unit Tests - suggest_autocompletion_tests.rb

    +

    Advanced Debugging - Unit Tests - suggest_autocompletion_tests.rb

    # ./samples/10_advanced_debugging/03_unit_tests/suggest_autocompletion_tests.rb
     def default_suggest_autocompletion args
       {
    @@ -14874,7 +15621,7 @@ S
     end
     
     
    -

    Http - Retrieve Images - main.rb

    +

    Http - Retrieve Images - main.rb

    # ./samples/11_http/01_retrieve_images/app/main.rb
     def tick args
       args.outputs.background_color = [0, 0, 0]
    @@ -14931,7 +15678,7 @@ def tick args
     end
     
     
    -

    Http - Web Server - main.rb

    +

    Http - Web Server - main.rb

    # ./samples/11_http/02_web_server/app/main.rb
     def tick args
       args.state.port ||= 3000
    @@ -14962,7 +15709,7 @@ def tick args
     end
     
     
    -

    C Extensions - Basics - main.rb

    +

    C Extensions - Basics - main.rb

    # ./samples/12_c_extensions/01_basics/app/main.rb
     $gtk.ffi_misc.gtk_dlopen("ext")
     include FFI::CExt
    @@ -14976,7 +15723,7 @@ end
     
     
     
    -

    C Extensions - Intermediate - main.rb

    +

    C Extensions - Intermediate - main.rb

    # ./samples/12_c_extensions/02_intermediate/app/main.rb
     $gtk.ffi_misc.gtk_dlopen("ext")
     include FFI::RE
    @@ -14999,7 +15746,7 @@ def tick args
     end
     
     
    -

    C Extensions - Native Pixel Arrays - main.rb

    +

    C Extensions - Native Pixel Arrays - main.rb

    # ./samples/12_c_extensions/03_native_pixel_arrays/app/main.rb
     $gtk.ffi_misc.gtk_dlopen("ext")
     include FFI::CExt
    @@ -15025,7 +15772,7 @@ end
     
     
     
    -

    Path Finding Algorithms - Breadth First Search - main.rb

    +

    Path Finding Algorithms - Breadth First Search - main.rb

    # ./samples/13_path_finding_algorithms/01_breadth_first_search/app/main.rb
     # A visual demonstration of a breadth first search
     # Inspired by https://www.redblobgames.com/pathfinding/a-star/introduction.html
    @@ -15721,7 +16468,7 @@ def reset
     end
     
     
    -

    Path Finding Algorithms - Detailed Breadth First Search - main.rb

    +

    Path Finding Algorithms - Detailed Breadth First Search - main.rb

    # ./samples/13_path_finding_algorithms/02_detailed_breadth_first_search/app/main.rb
     # A visual demonstration of a breadth first search
     # Inspired by https://www.redblobgames.com/pathfinding/a-star/introduction.html
    @@ -16371,7 +17118,7 @@ def reset
     end
     
     
    -

    Path Finding Algorithms - Breadcrumbs - main.rb

    +

    Path Finding Algorithms - Breadcrumbs - main.rb

    # ./samples/13_path_finding_algorithms/03_breadcrumbs/app/main.rb
     class Breadcrumbs
       attr_gtk
    @@ -16920,7 +17667,7 @@ end
      #  end
     
     
    -

    Path Finding Algorithms - Early Exit - main.rb

    +

    Path Finding Algorithms - Early Exit - main.rb

    # ./samples/13_path_finding_algorithms/04_early_exit/app/main.rb
     # Comparison of a breadth first search with and without early exit
     # Inspired by https://www.redblobgames.com/pathfinding/a-star/introduction.html
    @@ -17555,7 +18302,7 @@ def reset
     end
     
     
    -

    Path Finding Algorithms - Dijkstra - main.rb

    +

    Path Finding Algorithms - Dijkstra - main.rb

    # ./samples/13_path_finding_algorithms/05_dijkstra/app/main.rb
     # Demonstrates how Dijkstra's Algorithm allows movement costs to be considered
     
    @@ -18403,7 +19150,7 @@ def reset
     end
     
     
    -

    Path Finding Algorithms - Heuristic - main.rb

    +

    Path Finding Algorithms - Heuristic - main.rb

    # ./samples/13_path_finding_algorithms/06_heuristic/app/main.rb
     # This program is inspired by https://www.redblobgames.com/pathfinding/a-star/introduction.html
     
    @@ -19387,7 +20134,7 @@ def reset
     end
     
     
    -

    Path Finding Algorithms - Heuristic With Walls - main.rb

    +

    Path Finding Algorithms - Heuristic With Walls - main.rb

    # ./samples/13_path_finding_algorithms/07_heuristic_with_walls/app/main.rb
     # This program is inspired by https://www.redblobgames.com/pathfinding/a-star/introduction.html
     # The effectiveness of the Heuristic search algorithm is shown through this demonstration.
    @@ -20404,7 +21151,7 @@ def reset
     end
     
     
    -

    Path Finding Algorithms - A Star - main.rb

    +

    Path Finding Algorithms - A Star - main.rb

    # ./samples/13_path_finding_algorithms/08_a_star/app/main.rb
     # This program is inspired by https://www.redblobgames.com/pathfinding/a-star/introduction.html
     
    @@ -21437,7 +22184,7 @@ def reset
     end
     
     
    -

    Path Finding Algorithms - Tower Defense - main.rb

    +

    Path Finding Algorithms - Tower Defense - main.rb

    # ./samples/13_path_finding_algorithms/09_tower_defense/app/main.rb
     # An example of some major components in a tower defence game
     # The pathing of the tanks is determined by A* algorithm -- try editing the walls
    @@ -21742,7 +22489,7 @@ def a_star_color
     end
     
     
    -

    3d - 3d Cube - main.rb

    +

    3d - 3d Cube - main.rb

    # ./samples/99_genre_3d/01_3d_cube/app/main.rb
     STARTX             = 0.0
     STARTY             = 0.0
    @@ -21796,7 +22543,7 @@ end
     $gtk.reset
     
     
    -

    3d - Wireframe - main.rb

    +

    3d - Wireframe - main.rb

    # ./samples/99_genre_3d/02_wireframe/app/main.rb
     def tick args
       args.state.model   ||= Object3D.new('data/shuttle.off')
    @@ -21949,11 +22696,11 @@ class Vertex
       end
     end
     
    -

    3d - Wireframe - Data - what-is-this.txt

    +

    3d - Wireframe - Data - what-is-this.txt

    # ./samples/99_genre_3d/02_wireframe/data/what-is-this.txt
     https://en.wikipedia.org/wiki/OFF_(file_format)
     
    -

    Arcade - Bullet Hell - main.rb

    +

    Arcade - Bullet Hell - main.rb

    # ./samples/99_genre_arcade/bullet_hell/app/main.rb
     def tick args
       args.state.base_columns   ||= 10.times.map { |n| 50 * n + 1280 / 2 - 5 * 50 + 5 }
    @@ -22146,7 +22893,7 @@ def update_enemy_positions args
     end
     
     
    -

    Arcade - Dueling Starships - main.rb

    +

    Arcade - Dueling Starships - main.rb

    # ./samples/99_genre_arcade/dueling_starships/app/main.rb
     class DuelingSpaceships
       attr_accessor :state, :inputs, :outputs, :grid
    @@ -22515,14 +23262,14 @@ def tick args
     end
     
     
    -

    arcade/flappy dragon/credits.txt

    +

    arcade/flappy dragon/credits.txt

    # ./samples/99_genre_arcade/flappy_dragon/CREDITS.txt
     code: Amir Rajan, https://twitter.com/amirrajan
     graphics and audio: Nick Culbertson, https://twitter.com/MobyPixel
     
     
     
    -

    arcade/flappy dragon/main.rb

    +

    arcade/flappy dragon/main.rb

    # ./samples/99_genre_arcade/flappy_dragon/app/main.rb
     class FlappyDragon
       attr_accessor :grid, :inputs, :state, :outputs
    @@ -22886,7 +23633,7 @@ def tick args
     end
     
     
    -

    Arcade - Pong - main.rb

    +

    Arcade - Pong - main.rb

    # ./samples/99_genre_arcade/pong/app/main.rb
     def tick args
       defaults args
    @@ -23049,7 +23796,7 @@ begin :assets
     end
     
     
    -

    Arcade - Snakemoji - main.rb

    +

    Arcade - Snakemoji - main.rb

    # ./samples/99_genre_arcade/snakemoji/app/main.rb
     # coding: utf-8
     ################################
    @@ -23218,7 +23965,7 @@ def defaults 🎮
     end
     
     
    -

    Arcade - Solar System - main.rb

    +

    Arcade - Solar System - main.rb

    # ./samples/99_genre_arcade/solar_system/app/main.rb
     # Focused tutorial video: https://s3.amazonaws.com/s3.dragonruby.org/dragonruby-nddnug-workshop.mp4
     # Workshop/Presentation which provides motivation for creating a game engine: https://www.youtube.com/watch?v=S3CFce1arC8
    @@ -23330,7 +24077,7 @@ def r
     end
     
     
    -

    Arcade - Sound Golf - main.rb

    +

    Arcade - Sound Golf - main.rb

    # ./samples/99_genre_arcade/sound_golf/app/main.rb
     =begin
     
    @@ -23524,7 +24271,7 @@ def tick_instructions args, text, y = 715
     end
     
     
    -

    Arcade - Twinstick - main.rb

    +

    Arcade - Twinstick - main.rb

    # ./samples/99_genre_arcade/twinstick/app/main.rb
     def tick args
       args.state.player         ||= {x: 600, y: 320, w: 80, h: 80, path: 'sprites/circle-white.png', vx: 0, vy: 0, health: 10, cooldown: 0, score: 0}
    @@ -23678,7 +24425,7 @@ def shoot_directional_vector args
       [dx, dy]
     end
     
    -

    Crafting - Craft Game Starting Point - main.rb

    +

    Crafting - Craft Game Starting Point - main.rb

    # ./samples/99_genre_crafting/craft_game_starting_point/app/main.rb
     # ==================================================
     # A NOTE TO JAM CRAFT PARTICIPANTS:
    @@ -24105,7 +24852,439 @@ end
     $gtk.reset
     
     
    -

    Dev Tools - Add Buttons To Console - main.rb

    +

    Crafting - Farming Game Starting Point - main.rb

    +
    # ./samples/99_genre_crafting/farming_game_starting_point/app/main.rb
    +def tick args
    +  args.state.tile_size     = 80
    +  args.state.player_speed  = 4
    +  args.state.player      ||= tile(args, 7, 3, 0, 128, 180)
    +  generate_map args
    +  #press j to plant a green onion
    +  if args.inputs.keyboard.j
    +  #change this part you can change what you want to plant
    +   args.state.walls << tile(args, ((args.state.player.x+80)/args.state.tile_size), ((args.state.player.y)/args.state.tile_size), 255, 255, 255)
    +   args.state.plants << tile(args, ((args.state.player.x+80)/args.state.tile_size), ((args.state.player.y+80)/args.state.tile_size), 0, 160, 0)
    +  end
    +  # Adds walls, background, and player to args.outputs.solids so they appear on screen
    +  args.outputs.solids << [0,0,1280,720, 237,189,101]
    +  args.outputs.sprites << [0, 0, 1280, 720, 'sprites/background.png']
    +  args.outputs.solids << args.state.walls
    +  args.outputs.solids << args.state.player
    +  args.outputs.solids << args.state.plants
    +  args.outputs.labels << [320, 640, "press J to plant", 3, 1, 255, 0, 0, 200]
    +
    +  move_player args, -1,  0 if args.inputs.keyboard.left # x position decreases by 1 if left key is pressed
    +  move_player args,  1,  0 if args.inputs.keyboard.right # x position increases by 1 if right key is pressed
    +  move_player args,  0,  1 if args.inputs.keyboard.up # y position increases by 1 if up is pressed
    +  move_player args,  0, -1 if args.inputs.keyboard.down # y position decreases by 1 if down is pressed
    +end
    +
    +# Sets position, size, and color of the tile
    +def tile args, x, y, *color
    +  [x * args.state.tile_size, # sets definition for array using method parameters
    +   y * args.state.tile_size, # multiplying by tile_size sets x and y to correct position using pixel values
    +   args.state.tile_size,
    +   args.state.tile_size,
    +   *color]
    +end
    +
    +# Creates map by adding tiles to the wall, as well as a goal (that the player needs to reach)
    +def generate_map args
    +  return if args.state.area
    +
    +  # Creates the area of the map. There are 9 rows running horizontally across the screen
    +  # and 16 columns running vertically on the screen. Any spot with a "1" is not
    +  # open for the player to move into (and is green), and any spot with a "0" is available
    +  # for the player to move in.
    +  args.state.area = [
    +    [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,],
    +    [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,],
    +    [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,],
    +    [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,],
    +    [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,],
    +    [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,],
    +    [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,],
    +    [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,],
    +    [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ],
    +  ].reverse # reverses the order of the area collection
    +
    +  # By reversing the order, the way that the area appears above is how it appears
    +  # on the screen in the game. If we did not reverse, the map would appear inverted.
    +
    +  #The wall starts off with no tiles.
    +  args.state.walls = []
    +  args.state.plants = []
    +
    +  # If v is 1, a green tile is added to args.state.walls.
    +  # If v is 2, a black tile is created as the goal.
    +  args.state.area.map_2d do |y, x, v|
    +    if    v == 1
    +      args.state.walls << tile(args, x, y, 255, 160, 156) # green tile
    +    end
    +  end
    +end
    +
    +# Allows the player to move their box around the screen
    +def move_player args, *vector
    +  box = args.state.player.shift_rect(vector) # box is able to move at an angle
    +
    +  # If the player's box hits a wall, it is not able to move further in that direction
    +  return if args.state.walls
    +                .any_intersect_rect?(box)
    +
    +  # Player's box is able to move at angles (not just the four general directions) fast
    +  args.state.player =
    +    args.state.player
    +        .shift_rect(vector.x * args.state.player_speed, # if we don't multiply by speed, then
    +                    vector.y * args.state.player_speed) # the box will move extremely slow
    +end
    +
    +
    +

    Crafting - Farming Game Starting Point - repl.rb

    +
    # ./samples/99_genre_crafting/farming_game_starting_point/app/repl.rb
    +# ===============================================================
    +# Welcome to repl.rb
    +# ===============================================================
    +# You can experiement with code within this file. Code in this
    +# file is only executed when you save (and only excecuted ONCE).
    +# ===============================================================
    +
    +# ===============================================================
    +# REMOVE the "x" from the word "xrepl" and save the file to RUN
    +# the code in between the do/end block delimiters.
    +# ===============================================================
    +
    +# ===============================================================
    +# ADD the "x" to the word "repl" (make it xrepl) and save the
    +# file to IGNORE the code in between the do/end block delimiters.
    +# ===============================================================
    +
    +# Remove the x from xrepl to run the code. Add the x back to ignore to code.
    +xrepl do
    +  puts "The result of 1 + 2 is: #{1 + 2}"
    +end
    +
    +# ====================================================================================
    +# Ruby Crash Course:
    +# Strings, Numeric, Booleans, Conditionals, Looping, Enumerables, Arrays
    +# ====================================================================================
    +
    +# ====================================================================================
    +#  Strings
    +# ====================================================================================
    +# Remove the x from xrepl to run the code. Add the x back to ignore to code.
    +xrepl do
    +  message = "Hello World"
    +  puts "The value of message is: " + message
    +  puts "Any value can be interpolated within a string using \#{}."
    +  puts "Interpolated message: #{message}."
    +  puts 'This #{message} is not interpolated because the string uses single quotes.'
    +end
    +
    +# ====================================================================================
    +#  Numerics
    +# ====================================================================================
    +# Remove the x from xrepl to run the code. Add the x back to ignore to code.
    +xrepl do
    +  a = 10
    +  puts "The value of a is: #{a}"
    +  puts "a + 1 is: #{a + 1}"
    +  puts "a / 3 is: #{a / 3}"
    +end
    +
    +# Remove the x from xrepl to run the code. Add the x back to ignore to code.
    +xrepl do
    +  b = 10.12
    +  puts "The value of b is: #{b}"
    +  puts "b + 1 is: #{b + 1}"
    +  puts "b as an integer is: #{b.to_i}"
    +  puts ''
    +end
    +
    +# ====================================================================================
    +#  Booleans
    +# ====================================================================================
    +# Remove the x from xrepl to run the code. Add the x back to ignore to code.
    +xrepl do
    +  c = 30
    +  puts "The value of c is #{c}."
    +
    +  if c
    +    puts "This if statement ran because c is truthy."
    +  end
    +end
    +
    +# Remove the x from xrepl to run the code. Add the x back to ignore to code.
    +xrepl do
    +  d = false
    +  puts "The value of d is #{d}."
    +
    +  if !d
    +    puts "This if statement ran because d is falsey, using the not operator (!) makes d evaluate to true."
    +  end
    +
    +  e = nil
    +  puts "Nil is also considered falsey. The value of e is: #{e}."
    +
    +  if !e
    +    puts "This if statement ran because e is nil (a falsey value)."
    +  end
    +end
    +
    +# ====================================================================================
    +#  Conditionals
    +# ====================================================================================
    +# Remove the x from xrepl to run the code. Add the x back to ignore to code.
    +xrepl do
    +  i_am_true  = true
    +  i_am_nil   = nil
    +  i_am_false = false
    +  i_am_hi    = "hi"
    +
    +  puts "======== if statement"
    +  i_am_one = 1
    +  if i_am_one
    +    puts "This was printed because i_am_one is truthy."
    +  end
    +
    +  puts "======== if/else statement"
    +  if i_am_false
    +    puts "This will NOT get printed because i_am_false is false."
    +  else
    +    puts "This was printed because i_am_false is false."
    +  end
    +
    +  puts "======== if/elsif/else statement"
    +  if i_am_false
    +    puts "This will NOT get printed because i_am_false is false."
    +  elsif i_am_true
    +    puts "This was printed because i_am_true is true."
    +  else
    +    puts "This will NOT get printed i_am_true was true."
    +  end
    +
    +  puts "======== case statement "
    +  i_am_one = 1
    +  case i_am_one
    +  when 10
    +    puts "case equaled: 10"
    +  when 9
    +    puts "case equaled: 9"
    +  when 5
    +    puts "case equaled: 5"
    +  when 1
    +    puts "case equaled: 1"
    +  else
    +    puts "Value wasn't cased."
    +  end
    +
    +  puts "======== different types of comparisons"
    +  if 4 == 4
    +    puts "equal (4 == 4)"
    +  end
    +
    +  if 4 != 3
    +    puts "not equal (4 != 3)"
    +  end
    +
    +  if 3 < 4
    +    puts "less than (3 < 4)"
    +  end
    +
    +  if 4 > 3
    +    puts "greater than (4 > 3)"
    +  end
    +
    +  if ((4 > 3) || (3 < 4) || false)
    +    puts "or statement ((4 > 3) || (3 < 4) || false)"
    +  end
    +
    +  if ((4 > 3) && (3 < 4))
    +    puts "and statement ((4 > 3) && (3 < 4))"
    +  end
    +end
    +
    +# ====================================================================================
    +# Looping
    +# ====================================================================================
    +# Remove the x from xrepl to run the code. Add the x back to ignore to code.
    +xrepl do
    +  puts "======== times block"
    +  3.times do |i|
    +    puts i
    +  end
    +  puts "======== range block exclusive"
    +  (0...3).each do |i|
    +    puts i
    +  end
    +  puts "======== range block inclusive"
    +  (0..3).each do |i|
    +    puts i
    +  end
    +end
    +
    +# ====================================================================================
    +#  Enumerables
    +# ====================================================================================
    +# Remove the x from xrepl to run the code. Add the x back to ignore to code.
    +xrepl do
    +  puts "======== array each"
    +  colors = ["red", "blue", "yellow"]
    +  colors.each do |color|
    +    puts color
    +  end
    +
    +  puts '======== array each_with_index'
    +  colors = ["red", "blue", "yellow"]
    +  colors.each_with_index do |color, i|
    +    puts "#{color} at index #{i}"
    +  end
    +end
    +
    +# Remove the x from xrepl to run the code. Add the x back to ignore to code.
    +xrepl do
    +  puts "======== single parameter function"
    +  def add_one_to n
    +    n + 5
    +  end
    +
    +  puts add_one_to(3)
    +
    +  puts "======== function with default value"
    +  def function_with_default_value v = 10
    +    v * 10
    +  end
    +
    +  puts "passing three: #{function_with_default_value(3)}"
    +  puts "passing nil: #{function_with_default_value}"
    +
    +  puts "======== Or Equal (||=) operator for nil values"
    +  def function_with_nil_default_with_local a = nil
    +    result   = a
    +    result ||= "or equal operator was exected and set a default value"
    +  end
    +
    +  puts "passing 'hi': #{function_with_nil_default_with_local 'hi'}"
    +  puts "passing nil: #{function_with_nil_default_with_local}"
    +end
    +
    +# ====================================================================================
    +#  Arrays
    +# ====================================================================================
    +# Remove the x from xrepl to run the code. Add the x back to ignore to code.
    +xrepl do
    +  puts "======== Create an array with the numbers 1 to 10."
    +  one_to_ten = (1..10).to_a
    +  puts one_to_ten
    +
    +  puts "======== Create a new array that only contains even numbers from the previous array."
    +  one_to_ten = (1..10).to_a
    +  evens = one_to_ten.find_all do |number|
    +    number % 2 == 0
    +  end
    +  puts evens
    +
    +  puts "======== Create a new array that rejects odd numbers."
    +  one_to_ten = (1..10).to_a
    +  also_even = one_to_ten.reject do |number|
    +    number % 2 != 0
    +  end
    +  puts also_even
    +
    +  puts "======== Create an array that doubles every number."
    +  one_to_ten = (1..10).to_a
    +  doubled = one_to_ten.map do |number|
    +    number * 2
    +  end
    +  puts doubled
    +
    +  puts "======== Create an array that selects only odd numbers and then multiply those by 10."
    +  one_to_ten = (1..10).to_a
    +  odd_doubled = one_to_ten.find_all do |number|
    +    number % 2 != 0
    +  end.map do |odd_number|
    +    odd_number * 10
    +  end
    +  puts odd_doubled
    +
    +  puts "======== All combination of numbers 1 to 10."
    +  one_to_ten = (1..10).to_a
    +  all_combinations = one_to_ten.product(one_to_ten)
    +  puts all_combinations
    +
    +  puts "======== All uniq combinations of numbers. For example: [1, 2] is the same as [2, 1]."
    +  one_to_ten = (1..10).to_a
    +  uniq_combinations =
    +    one_to_ten.product(one_to_ten)
    +      .map do |unsorted_number|
    +    unsorted_number.sort
    +  end.uniq
    +  puts uniq_combinations
    +end
    +
    +# ====================================================================================
    +#  Advanced Arrays
    +# ====================================================================================
    +# Remove the x from xrepl to run the code. Add the x back to ignore to code.
    +xrepl do
    +  puts "======== All unique Pythagorean Triples between 1 and 40 sorted by area of the triangle."
    +
    +  one_to_hundred = (1..40).to_a
    +  triples =
    +    one_to_hundred.product(one_to_hundred).map do |width, height|
    +    [width, height, Math.sqrt(width ** 2 + height ** 2)]
    +  end.find_all do |_, _, hypotenuse|
    +    hypotenuse.to_i == hypotenuse
    +  end.map do |triangle|
    +    triangle.map(&:to_i)
    +  end.uniq do |triangle|
    +    triangle.sort
    +  end.map do |width, height, hypotenuse|
    +    [width, height, hypotenuse, (width * height) / 2]
    +  end.sort_by do |_, _, _, area|
    +    area
    +  end
    +
    +  triples.each do |width, height, hypotenuse, area|
    +    puts "(#{width}, #{height}, #{hypotenuse}) = #{area}"
    +  end
    +end
    +
    +
    +

    Crafting - Farming Game Starting Point - tests.rb

    +
    # ./samples/99_genre_crafting/farming_game_starting_point/app/tests.rb
    +# For advanced users:
    +# You can put some quick verification tests here, any method
    +# that starts with the `test_` will be run when you save this file.
    +
    +# Here is an example test and game
    +
    +# To run the test: ./dragonruby mygame --eval app/tests.rb --no-tick
    +
    +class MySuperHappyFunGame
    +  attr_gtk
    +
    +  def tick
    +    outputs.solids << [100, 100, 300, 300]
    +  end
    +end
    +
    +def test_universe args, assert
    +  game = MySuperHappyFunGame.new
    +  game.args = args
    +  game.tick
    +  assert.true!  args.outputs.solids.length == 1, "failure: a solid was not added after tick"
    +  assert.false! 1 == 2, "failure: some how, 1 equals 2, the world is ending"
    +  puts "test_universe completed successfully"
    +end
    +
    +puts "running tests"
    +$gtk.reset 100
    +$gtk.log_level = :off
    +$gtk.tests.start
    +
    +
    +

    Dev Tools - Add Buttons To Console - main.rb

    # ./samples/99_genre_dev_tools/add_buttons_to_console/app/main.rb
     # You can customize the buttons that show up in the Console.
     class GTK::Console::Menu
    @@ -24167,7 +25346,7 @@ def tick args
     end
     
     
    -

    Dev Tools - Animation Creator Starting Point - main.rb

    +

    Dev Tools - Animation Creator Starting Point - main.rb

    # ./samples/99_genre_dev_tools/animation_creator_starting_point/app/main.rb
     class OneBitLowrezPaint
       attr_gtk
    @@ -24272,12 +25451,12 @@ class OneBitLowrezPaint
           label = { x: b.x + state.buttons_frame_selection.size.half,
                     y: b.y,
                     text: "#{i + 1}", r: 180, g: 180, b: 180,
    -                size_enum: -4, alignment_enum: 1 }.label
    +                size_enum: -4, alignment_enum: 1 }.label!
     
    -      selection_border = b.merge(r: 40, g: 40, b: 40).border
    +      selection_border = b.merge(r: 40, g: 40, b: 40).border!
     
           if i == state.animation_frames_selected_index
    -        selection_border = b.merge(r: 40, g: 230, b: 200).border
    +        selection_border = b.merge(r: 40, g: 230, b: 200).border!
           end
     
           [selection_border, label]
    @@ -24616,7 +25795,7 @@ end
     # $gtk.reset
     
     
    -

    Dev Tools - Tile Editor Starting Point - main.rb

    +

    Dev Tools - Tile Editor Starting Point - main.rb

    # ./samples/99_genre_dev_tools/tile_editor_starting_point/app/main.rb
     =begin
     
    @@ -25011,7 +26190,525 @@ def tick_instructions args, text, y = 715
     end
     
     
    -

    Lowrez - Nokia 3310 - main.rb

    +

    Dungeon Crawl - Classics Jam - main.rb

    +
    # ./samples/99_genre_dungeon_crawl/classics_jam/app/main.rb
    +class Game
    +  attr_gtk
    +
    +  def tick
    +    defaults
    +    render
    +    input
    +    calc
    +  end
    +
    +  def defaults
    +    player.x              ||= 640
    +    player.y              ||= 360
    +    player.w              ||= 16
    +    player.h              ||= 16
    +    player.attacked_at    ||= -1
    +    player.angle          ||= 0
    +    player.future_player  ||= future_player_position 0, 0
    +    player.projectiles    ||= []
    +    player.damage         ||= 0
    +    state.level           ||= create_level level_one_template
    +  end
    +
    +  def render
    +    outputs.sprites << level.walls.map do |w|
    +      w.merge(path: 'sprites/square/gray.png')
    +    end
    +
    +    outputs.sprites << level.spawn_locations.map do |s|
    +      s.merge(path: 'sprites/square/blue.png')
    +    end
    +
    +    outputs.sprites << player.projectiles.map do |p|
    +      p.merge(path: 'sprites/square/blue.png')
    +    end
    +
    +    outputs.sprites << level.enemies.map do |e|
    +      e.merge(path: 'sprites/square/red.png')
    +    end
    +
    +    outputs.sprites << player.merge(path: 'sprites/circle/green.png', angle: player.angle)
    +
    +    outputs.labels << { x: 30, y: 30.from_top, text: "damage: #{player.damage || 0}" }
    +  end
    +
    +  def input
    +    player.angle = inputs.directional_angle || player.angle
    +    if inputs.controller_one.key_down.a || inputs.keyboard.key_down.space
    +      player.attacked_at = state.tick_count
    +    end
    +  end
    +
    +  def calc
    +    calc_player
    +    calc_projectiles
    +    calc_enemies
    +    calc_spawn_locations
    +  end
    +
    +  def calc_player
    +    if player.attacked_at == state.tick_count
    +      player.projectiles << { at: state.tick_count,
    +                              x: player.x,
    +                              y: player.y,
    +                              angle: player.angle,
    +                              w: 4,
    +                              h: 4 }.center_inside_rect(player)
    +    end
    +
    +    if player.attacked_at.elapsed_time > 5
    +      future_player = future_player_position inputs.left_right * 2, inputs.up_down * 2
    +      future_player_collision = future_collision player, future_player, level.walls
    +      player.x = future_player_collision.x if !future_player_collision.dx_collision
    +      player.y = future_player_collision.y if !future_player_collision.dy_collision
    +    end
    +  end
    +
    +  def calc_projectile_collisions entities
    +    entities.each do |e|
    +      e.damage ||= 0
    +      player.projectiles.each do |p|
    +        if !p.collided && (p.intersect_rect? e)
    +          p.collided = true
    +          e.damage  += 1
    +        end
    +      end
    +    end
    +  end
    +
    +  def calc_projectiles
    +    player.projectiles.map! do |p|
    +      dx, dy = p.angle.vector 10
    +      p.merge(x: p.x + dx, y: p.y + dy)
    +    end
    +
    +    calc_projectile_collisions level.walls + level.enemies + level.spawn_locations
    +    player.projectiles.reject! { |p| p.at.elapsed_time > 10000 }
    +    player.projectiles.reject! { |p| p.collided }
    +    level.enemies.reject! { |e| e.damage > e.hp }
    +    level.spawn_locations.reject! { |s| s.damage > s.hp }
    +  end
    +
    +  def calc_enemies
    +    level.enemies.map! do |e|
    +      dx =  0
    +      dx =  1 if e.x < player.x
    +      dx = -1 if e.x > player.x
    +      dy =  0
    +      dy =  1 if e.y < player.y
    +      dy = -1 if e.y > player.y
    +      future_e           = future_entity_position dx, dy, e
    +      future_e_collision = future_collision e, future_e, level.enemies + level.walls
    +      e.next_x = e.x
    +      e.next_y = e.y
    +      e.next_x = future_e_collision.x if !future_e_collision.dx_collision
    +      e.next_y = future_e_collision.y if !future_e_collision.dy_collision
    +      e
    +    end
    +
    +    level.enemies.map! do |e|
    +      e.x = e.next_x
    +      e.y = e.next_y
    +      e
    +    end
    +
    +    level.enemies.each do |e|
    +      player.damage += 1 if e.intersect_rect? player
    +    end
    +  end
    +
    +  def calc_spawn_locations
    +    level.spawn_locations.map! do |s|
    +      s.merge(countdown: s.countdown - 1)
    +    end
    +    level.spawn_locations
    +         .find_all { |s| s.countdown.neg? }
    +         .each do |s|
    +      s.countdown = s.rate
    +      s.merge(countdown: s.rate)
    +      new_enemy = create_enemy s
    +      if !(level.enemies.find { |e| e.intersect_rect? new_enemy })
    +        level.enemies << new_enemy
    +      end
    +    end
    +  end
    +
    +  def create_enemy spawn_location
    +    to_cell(spawn_location.ordinal_x, spawn_location.ordinal_y).merge hp: 2
    +  end
    +
    +  def create_level level_template
    +    {
    +      walls:           level_template.walls.map { |w| to_cell(w.ordinal_x, w.ordinal_y).merge(w) },
    +      enemies:         [],
    +      spawn_locations: level_template.spawn_locations.map { |s| to_cell(s.ordinal_x, s.ordinal_y).merge(s) }
    +    }
    +  end
    +
    +  def level_one_template
    +    {
    +      walls:           [{ ordinal_x: 25, ordinal_y: 20},
    +                        { ordinal_x: 25, ordinal_y: 21},
    +                        { ordinal_x: 25, ordinal_y: 22},
    +                        { ordinal_x: 25, ordinal_y: 23}],
    +      spawn_locations: [{ ordinal_x: 10, ordinal_y: 10, rate: 120, countdown: 0, hp: 5 }]
    +    }
    +  end
    +
    +  def player
    +    state.player ||= {}
    +  end
    +
    +  def level
    +    state.level  ||= {}
    +  end
    +
    +  def future_collision entity, future_entity, others
    +    dx_collision = others.find { |o| o != entity && (o.intersect_rect? future_entity.dx) }
    +    dy_collision = others.find { |o| o != entity && (o.intersect_rect? future_entity.dy) }
    +
    +    {
    +      dx_collision: dx_collision,
    +      x: future_entity.dx.x,
    +      dy_collision: dy_collision,
    +      y: future_entity.dy.y
    +    }
    +  end
    +
    +  def future_entity_position dx, dy, entity
    +    {
    +      dx:   entity.merge(x: entity.x + dx),
    +      dy:   entity.merge(y: entity.y + dy),
    +      both: entity.merge(x: entity.x + dx, y: entity.y + dy)
    +    }
    +  end
    +
    +  def future_player_position  dx, dy
    +    future_entity_position dx, dy, player
    +  end
    +
    +  def to_cell ordinal_x, ordinal_y
    +    { x: ordinal_x * 16, y: ordinal_y * 16, w: 16, h: 16 }
    +  end
    +end
    +
    +def tick args
    +  $game ||= Game.new
    +  $game.args = args
    +  $game.tick
    +end
    +
    +$gtk.reset
    +$game = nil
    +
    +
    +

    Fighting - Special Move Inputs - main.rb

    +
    # ./samples/99_genre_fighting/01_special_move_inputs/app/main.rb
    +def tick args
    +  #tick_instructions args, "Use LEFT and RIGHT arrow keys to move and SPACE to jump."
    +  defaults args
    +  render args
    +  input args
    +  calc args
    +end
    +
    +# sets default values and creates empty collections
    +# initialization only happens in the first frame
    +def defaults args
    +  fiddle args
    +
    +  args.state.tick_count = args.state.tick_count
    +  args.state.bridge_top = 128
    +  args.state.player.x  ||= 0                        # initializes player's properties
    +  args.state.player.y  ||= args.state.bridge_top
    +  args.state.player.w  ||= 64
    +  args.state.player.h  ||= 64
    +  args.state.player.dy ||= 0
    +  args.state.player.dx ||= 0
    +  args.state.player.r  ||= 0
    +  args.state.game_over_at ||= 0
    +  args.state.animation_time ||=0
    +
    +  args.state.timeleft ||=0
    +  args.state.timeright ||=0
    +  args.state.lastpush ||=0
    +
    +  args.state.inputlist ||=  ["j","k","l"]
    +end
    +
    +# sets enemy, player, hammer values
    +def fiddle args
    +  args.state.gravity                     = -0.5
    +  args.state.player_jump_power           = 10      # sets player values
    +  args.state.player_jump_power_duration  = 5
    +  args.state.player_max_run_speed        = 20
    +  args.state.player_speed_slowdown_rate  = 0.9
    +  args.state.player_acceleration         = 0.9
    +end
    +
    +# outputs objects onto the screen
    +def render args
    +  if (args.state.player.dx < 0.01) && (args.state.player.dx > -0.01)
    +    args.state.player.dx = 0
    +  end
    +
    +  #move list
    +  (args.layout.rect_group row: 0, col_from_right: 8, drow: 0.3,
    +                          merge: { vertical_alignment_enum: 0, size_enum: -2 },
    +                          group: [
    +                            { text: "move:             WASD" },
    +                            { text: "jump:             Space" },
    +                            { text: "attack forwards:  J (while on ground" },
    +                            { text: "attack upwards:   K (while on groud)" },
    +                            { text: "attack backwards: J (while on ground and holding A)" },
    +                            { text: "attack downwards: K (while in air)" },
    +                            { text: "dash attack:      J, K in quick succession." },
    +                            { text: "shield: hold      J, K at the same time." },
    +                            { text: "dash backwards:   A, A in quick succession." },
    +                          ]).into args.outputs.labels
    +
    +  # registered moves
    +  args.outputs.labels << { x: 0.to_layout_col,
    +                           y: 0.to_layout_row,
    +                           text: "input history",
    +                           size_enum: -2,
    +                           vertical_alignment_enum: 0 }
    +
    +  (args.state.inputlist.take(5)).map do |s|
    +    { text: s, size_enum: -2, vertical_alignment_enum: 0 }
    +  end.yield_self do |group|
    +    (args.layout.rect_group row: 0.3, col: 0, drow: 0.3, group: group).into args.outputs.labels
    +  end
    +
    +
    +  #sprites
    +  player = [args.state.player.x, args.state.player.y,
    +            args.state.player.w, args.state.player.h,
    +            "sprites/square/white.png",
    +            args.state.player.r]
    +
    +  playershield = [args.state.player.x - 20, args.state.player.y - 10,
    +                  args.state.player.w + 20, args.state.player.h + 20,
    +                  "sprites/square/blue.png",
    +                  args.state.player.r,
    +                  0]
    +
    +  playerjab = [args.state.player.x + 32, args.state.player.y,
    +               args.state.player.w, args.state.player.h,
    +               "sprites/isometric/indigo.png",
    +               args.state.player.r,
    +               0]
    +
    +  playerupper = [args.state.player.x, args.state.player.y + 32,
    +                 args.state.player.w, args.state.player.h,
    +                 "sprites/isometric/indigo.png",
    +                 args.state.player.r+90,
    +                 0]
    +
    +  if ((args.state.tick_count - args.state.lastpush) <= 15)
    +    if (args.state.inputlist[0] == "<<")
    +      player = [args.state.player.x, args.state.player.y,
    +                args.state.player.w, args.state.player.h,
    +                "sprites/square/yellow.png", args.state.player.r]
    +    end
    +
    +    if (args.state.inputlist[0] == "shield")
    +      player = [args.state.player.x, args.state.player.y,
    +                args.state.player.w, args.state.player.h,
    +                "sprites/square/indigo.png", args.state.player.r]
    +
    +      playershield = [args.state.player.x - 10, args.state.player.y - 10,
    +                      args.state.player.w + 20, args.state.player.h + 20,
    +                      "sprites/square/blue.png", args.state.player.r, 50]
    +    end
    +
    +    if (args.state.inputlist[0] == "back-attack")
    +      playerjab = [args.state.player.x - 20, args.state.player.y,
    +                   args.state.player.w - 10, args.state.player.h,
    +                   "sprites/isometric/indigo.png", args.state.player.r, 255]
    +    end
    +
    +    if (args.state.inputlist[0] == "forward-attack")
    +      playerjab = [args.state.player.x + 32, args.state.player.y,
    +                   args.state.player.w, args.state.player.h,
    +                   "sprites/isometric/indigo.png", args.state.player.r, 255]
    +    end
    +
    +    if (args.state.inputlist[0] == "up-attack")
    +      playerupper = [args.state.player.x, args.state.player.y + 32,
    +                     args.state.player.w, args.state.player.h,
    +                     "sprites/isometric/indigo.png", args.state.player.r + 90, 255]
    +    end
    +
    +    if (args.state.inputlist[0] == "dair")
    +      playerupper = [args.state.player.x, args.state.player.y - 32,
    +                     args.state.player.w, args.state.player.h,
    +                     "sprites/isometric/indigo.png", args.state.player.r + 90, 255]
    +    end
    +
    +    if (args.state.inputlist[0] == "dash-attack")
    +      playerupper = [args.state.player.x, args.state.player.y + 32,
    +                     args.state.player.w, args.state.player.h,
    +                     "sprites/isometric/violet.png", args.state.player.r + 90, 255]
    +
    +      playerjab = [args.state.player.x + 32, args.state.player.y,
    +                   args.state.player.w, args.state.player.h,
    +                   "sprites/isometric/violet.png", args.state.player.r, 255]
    +    end
    +  end
    +
    +  args.outputs.sprites << playerjab
    +  args.outputs.sprites << playerupper
    +  args.outputs.sprites << player
    +  args.outputs.sprites << playershield
    +
    +  args.outputs.solids << 20.map_with_index do |i| # uses 20 squares to form bridge
    +    [i * 64, args.state.bridge_top - 64, 64, 64]
    +  end
    +end
    +
    +# Performs calculations to move objects on the screen
    +def calc args
    +  # Since velocity is the change in position, the change in x increases by dx. Same with y and dy.
    +  args.state.player.x  += args.state.player.dx
    +  args.state.player.y  += args.state.player.dy
    +
    +  # Since acceleration is the change in velocity, the change in y (dy) increases every frame
    +  args.state.player.dy += args.state.gravity
    +
    +  # player's y position is either current y position or y position of top of
    +  # bridge, whichever has a greater value
    +  # ensures that the player never goes below the bridge
    +  args.state.player.y  = args.state.player.y.greater(args.state.bridge_top)
    +
    +  # player's x position is either the current x position or 0, whichever has a greater value
    +  # ensures that the player doesn't go too far left (out of the screen's scope)
    +  args.state.player.x  = args.state.player.x.greater(0)
    +
    +  # player is not falling if it is located on the top of the bridge
    +  args.state.player.falling = false if args.state.player.y == args.state.bridge_top
    +  #args.state.player.rect = [args.state.player.x, args.state.player.y, args.state.player.h, args.state.player.w] # sets definition for player
    +end
    +
    +# Resets the player by changing its properties back to the values they had at initialization
    +def reset_player args
    +  args.state.player.x = 0
    +  args.state.player.y = args.state.bridge_top
    +  args.state.player.dy = 0
    +  args.state.player.dx = 0
    +  args.state.enemy.hammers.clear # empties hammer collection
    +  args.state.enemy.hammer_queue.clear # empties hammer_queue
    +  args.state.game_over_at = args.state.tick_count # game_over_at set to current frame (or passage of time)
    +end
    +
    +# Processes input from the user to move the player
    +def input args
    +  if args.state.inputlist.length > 5
    +    args.state.inputlist.pop
    +  end
    +
    +  should_process_special_move = (args.inputs.keyboard.key_down.j)           ||
    +                                (args.inputs.keyboard.key_down.k)           ||
    +                                (args.inputs.keyboard.key_down.a)           ||
    +                                (args.inputs.keyboard.key_down.d)           ||
    +                                (args.inputs.controller_one.key_down.y)     ||
    +                                (args.inputs.controller_one.key_down.x)     ||
    +                                (args.inputs.controller_one.key_down.left)  ||
    +                                (args.inputs.controller_one.key_down.right)
    +
    +  if (should_process_special_move)
    +    if (args.inputs.keyboard.key_down.j && args.inputs.keyboard.key_down.k) ||
    +       (args.inputs.controller_one.key_down.x && args.inputs.controller_one.key_down.y)
    +      args.state.inputlist.unshift("shield")
    +    elsif (args.inputs.keyboard.key_down.k || args.inputs.controller_one.key_down.y) &&
    +          (args.state.inputlist[0] == "forward-attack") && ((args.state.tick_count - args.state.lastpush) <= 15)
    +      args.state.inputlist.unshift("dash-attack")
    +      args.state.player.dx = 20
    +    elsif (args.inputs.keyboard.key_down.j && args.inputs.keyboard.a) ||
    +          (args.inputs.controller_one.key_down.x && args.inputs.controller_one.key_down.left)
    +      args.state.inputlist.unshift("back-attack")
    +    elsif ( args.inputs.controller_one.key_down.x || args.inputs.keyboard.key_down.j)
    +      args.state.inputlist.unshift("forward-attack")
    +    elsif (args.inputs.keyboard.key_down.k || args.inputs.controller_one.key_down.y) &&
    +          (args.state.player.y > 128)
    +      args.state.inputlist.unshift("dair")
    +    elsif (args.inputs.keyboard.key_down.k || args.inputs.controller_one.key_down.y)
    +      args.state.inputlist.unshift("up-attack")
    +    elsif (args.inputs.controller_one.key_down.left || args.inputs.keyboard.key_down.a) &&
    +          (args.state.inputlist[0] == "<") &&
    +          ((args.state.tick_count - args.state.lastpush) <= 10)
    +      args.state.inputlist.unshift("<<")
    +      args.state.player.dx = -15
    +    elsif (args.inputs.controller_one.key_down.left || args.inputs.keyboard.key_down.a)
    +      args.state.inputlist.unshift("<")
    +      args.state.timeleft = args.state.tick_count
    +    elsif (args.inputs.controller_one.key_down.right || args.inputs.keyboard.key_down.d)
    +      args.state.inputlist.unshift(">")
    +    end
    +
    +    args.state.lastpush = args.state.tick_count
    +  end
    +
    +  if args.inputs.keyboard.space || args.inputs.controller_one.r2   # if the user presses the space bar
    +    args.state.player.jumped_at ||= args.state.tick_count # jumped_at is set to current frame
    +
    +    # if the time that has passed since the jump is less than the player's jump duration and
    +    # the player is not falling
    +    if args.state.player.jumped_at.elapsed_time < args.state.player_jump_power_duration && !args.state.player.falling
    +      args.state.player.dy = args.state.player_jump_power # change in y is set to power of player's jump
    +    end
    +  end
    +
    +  # if the space bar is in the "up" state (or not being pressed down)
    +  if args.inputs.keyboard.key_up.space || args.inputs.controller_one.key_up.r2
    +    args.state.player.jumped_at = nil # jumped_at is empty
    +    args.state.player.falling = true # the player is falling
    +  end
    +
    +  if args.inputs.left # if left key is pressed
    +    if args.state.player.dx < -5
    +      args.state.player.dx = args.state.player.dx
    +    else
    +      args.state.player.dx = -5
    +    end
    +
    +  elsif args.inputs.right # if right key is pressed
    +    if args.state.player.dx > 5
    +      args.state.player.dx = args.state.player.dx
    +    else
    +      args.state.player.dx = 5
    +    end
    +  else
    +    args.state.player.dx *= args.state.player_speed_slowdown_rate # dx is scaled down
    +  end
    +
    +  if ((args.state.player.dx).abs > 5) #&& ((args.state.tick_count - args.state.lastpush) <= 10)
    +    args.state.player.dx *= 0.95
    +  end
    +end
    +
    +def tick_instructions args, text, y = 715
    +  return if args.state.key_event_occurred
    +  if args.inputs.mouse.click ||
    +     args.inputs.keyboard.directional_vector ||
    +     args.inputs.keyboard.key_down.enter ||
    +     args.inputs.keyboard.key_down.space ||
    +     args.inputs.keyboard.key_down.escape
    +    args.state.key_event_occurred = true
    +  end
    +
    +  args.outputs.debug << [0, y - 50, 1280, 60].solid
    +  args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label
    +  args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label
    +end
    +
    +
    +

    Lowrez - Nokia 3310 - main.rb

    # ./samples/99_genre_lowrez/nokia_3310/app/main.rb
     require 'app/nokia.rb'
     
    @@ -25620,7 +27317,7 @@ def render_debug args
           text: text,
           size_enum: -1.5,
           r: 255, g: 255, b: 255
    -    }.label
    +    }.label!
       end
     
       args.outputs.debug << {
    @@ -25630,7 +27327,7 @@ def render_debug args
         size_enum: -0.5,
         alignment_enum: 1,
         r: 255, g: 255, b: 255
    -  }.label
    +  }.label!
     end
     
     def snake_demo args
    @@ -25640,7 +27337,7 @@ end
     $gtk.reset
     
     
    -

    Lowrez - Nokia 3310 - nokia.rb

    +

    Lowrez - Nokia 3310 - nokia.rb

    # ./samples/99_genre_lowrez/nokia_3310/app/nokia.rb
     # Emulation of a 64x64 canvas. Don't change this file unless you know what you're doing :-)
     # Head over to main.rb and study the code there.
    @@ -25880,7 +27577,7 @@ module GTK
                 g: 240,
                 b: 216,
                 a: 100
    -          }.line
    +          }.line!
             end
     
             (NOKIA_WIDTH + 1).map_with_index do |i|
    @@ -25893,7 +27590,7 @@ module GTK
                 g: 240,
                 b: 216,
                 a: 100
    -          }.line
    +          }.line!
             end
     
             @args.state.overlay_rendered = true
    @@ -25903,7 +27600,7 @@ module GTK
     end
     
     
    -

    Lowrez - Resolution 64x64 - lowrez.rb

    +

    Lowrez - Resolution 64x64 - lowrez.rb

    # ./samples/99_genre_lowrez/resolution_64x64/app/lowrez.rb
     # Emulation of a 64x64 canvas. Don't change this file unless you know what you're doing :-)
     # Head over to main.rb and study the code there.
    @@ -26077,7 +27774,7 @@ module GTK
     end
     
     
    -

    Lowrez - Resolution 64x64 - main.rb

    +

    Lowrez - Resolution 64x64 - main.rb

    # ./samples/99_genre_lowrez/resolution_64x64/app/main.rb
     require 'app/lowrez.rb'
     
    @@ -26641,7 +28338,7 @@ def render_debug args
             g: 128,
             b: 128,
             a: 80
    -      }.line
    +      }.line!
     
           args.outputs.static_debug << {
             x:  LOWREZ_X_OFFSET + (i * 10),
    @@ -26652,7 +28349,7 @@ def render_debug args
             g: 128,
             b: 128,
             a: 80
    -      }.line
    +      }.line!
         end
       end
     
    @@ -26679,7 +28376,7 @@ def render_debug args
           y: 720 - (i * 20),
           text: text,
           size_enum: -1.5
    -    }.label
    +    }.label!
       end
     
       args.outputs.debug << {
    @@ -26688,13 +28385,13 @@ def render_debug args
         text: "INFO: dev mode is currently enabled. Comment out the invocation of ~render_debug~ within the ~tick~ method to hide the debug layer.",
         size_enum: -0.5,
         alignment_enum: 1
    -  }.label
    +  }.label!
     end
     
     $gtk.reset
     
     
    -

    Platformer - Clepto Frog - main.rb

    +

    Platformer - Clepto Frog - main.rb

    # ./samples/99_genre_platformer/clepto_frog/app/main.rb
     MAP_FILE_PATH = 'app/map.txt'
     
    @@ -27562,7 +29259,7 @@ def tick_instructions args, text, y = 715
     end
     
     
    -

    Platformer - Clepto Frog - map.rb

    +

    Platformer - Clepto Frog - map.rb

    # ./samples/99_genre_platformer/clepto_frog/app/map.rb
     $collisions = [
       [326, 463, 64, 64],
    @@ -28591,14 +30288,14 @@ $mugs = [
     ]
     
     
    -

    Platformer - Gorillas Basic - credits.txt

    +

    Platformer - Gorillas Basic - credits.txt

    # ./samples/99_genre_platformer/gorillas_basic/CREDITS.txt
     code: Amir Rajan, https://twitter.com/amirrajan
     graphics: Nick Culbertson, https://twitter.com/MobyPixel
     
     
     
    -

    Platformer - Gorillas Basic - main.rb

    +

    Platformer - Gorillas Basic - main.rb

    # ./samples/99_genre_platformer/gorillas_basic/app/main.rb
     class YouSoBasicGorillas
       attr_accessor :outputs, :grid, :state, :inputs
    @@ -28975,7 +30672,7 @@ def tick args
     end
     
     
    -

    Platformer - Gorillas Basic - tests.rb

    +

    Platformer - Gorillas Basic - tests.rb

    # ./samples/99_genre_platformer/gorillas_basic/app/tests.rb
     $gtk.reset 100
     $gtk.supress_framerate_warning = true
    @@ -28983,7 +30680,7 @@ $gtk.require 'app/tests/building_generation_tests.rb'
     $gtk.tests.start
     
     
    -

    Platformer - Gorillas Basic - Tests - building_generation_tests.rb

    +

    Platformer - Gorillas Basic - Tests - building_generation_tests.rb

    # ./samples/99_genre_platformer/gorillas_basic/app/tests/building_generation_tests.rb
     def test_solids args, assert
       game = YouSoBasicGorillas.new
    @@ -29002,7 +30699,7 @@ def test_solids args, assert
     end
     
     
    -

    Platformer - The Little Probe - main.rb

    +

    Platformer - The Little Probe - main.rb

    # ./samples/99_genre_platformer/the_little_probe/app/main.rb
     class FallingCircle
       attr_gtk
    @@ -29893,7 +31590,7 @@ def reset
     end
     
     
    -

    Platformer - The Little Probe - Data - level.txt

    +

    Platformer - The Little Probe - Data - level.txt

    # ./samples/99_genre_platformer/the_little_probe/data/level.txt
     640,8840,1180,8840
     -60,10220,0,9960
    @@ -31377,7 +33074,7 @@ end
     1910,11280,2200,11180
     923.0029599285435,11398.99893503157,1264.002959928544,11351.99893503157
     
    -

    Platformer - The Little Probe - Data - level_lava.txt

    +

    Platformer - The Little Probe - Data - level_lava.txt

    # ./samples/99_genre_platformer/the_little_probe/data/level_lava.txt
     100,10740,500,10780
     500,10780,960,10760
    @@ -31615,7 +33312,7 @@ end
     2200,11130,2360,11090
     1840,11230,2200,11130
     
    -

    Rpg Narrative - Choose Your Own Adventure - decision.rb

    +

    Rpg Narrative - Choose Your Own Adventure - decision.rb

    # ./samples/99_genre_rpg_narrative/choose_your_own_adventure/app/decision.rb
     # Hey there! Welcome to Four Decisions. Here is how you
     # create your decision tree. Remove =being and =end from the text to
    @@ -31656,7 +33353,7 @@ def game
     end
     
     
    -

    Rpg Narrative - Choose Your Own Adventure - main.rb

    +

    Rpg Narrative - Choose Your Own Adventure - main.rb

    # ./samples/99_genre_rpg_narrative/choose_your_own_adventure/app/main.rb
     =begin
     
    @@ -31792,7 +33489,7 @@ end
     $gtk.reset
     
     
    -

    Rpg Narrative - Return Of Serenity - lowrez_simulator.rb

    +

    Rpg Narrative - Return Of Serenity - lowrez_simulator.rb

    # ./samples/99_genre_rpg_narrative/return_of_serenity/app/lowrez_simulator.rb
     ###################################################################################
     # YOU CAN PLAY AROUND WITH THE CODE BELOW, BUT USE CAUTION AS THIS IS WHAT EMULATES
    @@ -31887,7 +33584,7 @@ def render_gridlines_if_needed args
     end
     
     
    -

    Rpg Narrative - Return Of Serenity - main.rb

    +

    Rpg Narrative - Return Of Serenity - main.rb

    # ./samples/99_genre_rpg_narrative/return_of_serenity/app/main.rb
     require 'app/require.rb'
     
    @@ -32364,7 +34061,7 @@ def player_xs args, x, y
     end
     
     
    -

    Rpg Narrative - Return Of Serenity - require.rb

    +

    Rpg Narrative - Return Of Serenity - require.rb

    # ./samples/99_genre_rpg_narrative/return_of_serenity/app/require.rb
     require 'app/lowrez_simulator.rb'
     require 'app/storyline_day_one.rb'
    @@ -32379,7 +34076,7 @@ require 'app/storyline_final_decision.rb'
     require 'app/storyline.rb'
     
     
    -

    Rpg Narrative - Return Of Serenity - storyline.rb

    +

    Rpg Narrative - Return Of Serenity - storyline.rb

    # ./samples/99_genre_rpg_narrative/return_of_serenity/app/storyline.rb
     def hotspot_top
       [4, 61, 56, 3]
    @@ -32529,7 +34226,7 @@ def reload_current_scene
     end
     
     
    -

    Rpg Narrative - Return Of Serenity - storyline_anka.rb

    +

    Rpg Narrative - Return Of Serenity - storyline_anka.rb

    # ./samples/99_genre_rpg_narrative/return_of_serenity/app/storyline_anka.rb
     def anka_inside_room args
       {
    @@ -32660,7 +34357,7 @@ def replied_to_anka_back_home args
     end
     
     
    -

    Rpg Narrative - Return Of Serenity - storyline_blinking_light.rb

    +

    Rpg Narrative - Return Of Serenity - storyline_blinking_light.rb

    # ./samples/99_genre_rpg_narrative/return_of_serenity/app/storyline_blinking_light.rb
     def the_blinking_light args
       {
    @@ -32739,7 +34436,7 @@ def blinking_light_inside_mainframe args
     end
     
     
    -

    Rpg Narrative - Return Of Serenity - storyline_day_one.rb

    +

    Rpg Narrative - Return Of Serenity - storyline_day_one.rb

    # ./samples/99_genre_rpg_narrative/return_of_serenity/app/storyline_day_one.rb
     def day_one_beginning args
       {
    @@ -32949,7 +34646,7 @@ def explaining_the_special_power_inside_computer args
     end
     
     
    -

    Rpg Narrative - Return Of Serenity - storyline_final_decision.rb

    +

    Rpg Narrative - Return Of Serenity - storyline_final_decision.rb

    # ./samples/99_genre_rpg_narrative/return_of_serenity/app/storyline_final_decision.rb
     def final_decision_side_of_home args
       {
    @@ -33089,7 +34786,7 @@ def final_decision_ship_status_shared args
     end
     
     
    -

    Rpg Narrative - Return Of Serenity - storyline_final_message.rb

    +

    Rpg Narrative - Return Of Serenity - storyline_final_message.rb

    # ./samples/99_genre_rpg_narrative/return_of_serenity/app/storyline_final_message.rb
     def final_message_sad args
       {
    @@ -33309,7 +35006,7 @@ def final_message_summary args
     end
     
     
    -

    Rpg Narrative - Return Of Serenity - storyline_serenity_alive.rb

    +

    Rpg Narrative - Return Of Serenity - storyline_serenity_alive.rb

    # ./samples/99_genre_rpg_narrative/return_of_serenity/app/storyline_serenity_alive.rb
     def serenity_alive_side_of_home args
       {
    @@ -33532,7 +35229,7 @@ def serenity_alive_current_message args
     end
     
     
    -

    Rpg Narrative - Return Of Serenity - storyline_serenity_bio.rb

    +

    Rpg Narrative - Return Of Serenity - storyline_serenity_bio.rb

    # ./samples/99_genre_rpg_narrative/return_of_serenity/app/storyline_serenity_bio.rb
     def serenity_bio_infront_of_home args
       {
    @@ -33687,7 +35384,7 @@ def bad_dream_last_reply args
     end
     
     
    -

    Rpg Narrative - Return Of Serenity - storyline_serenity_introduction.rb

    +

    Rpg Narrative - Return Of Serenity - storyline_serenity_introduction.rb

    # ./samples/99_genre_rpg_narrative/return_of_serenity/app/storyline_serenity_introduction.rb
     # decision_graph "Message from Sasha",
     #                "I should reply.",
    @@ -33786,7 +35483,7 @@ def replied_to_introduction_side_of_home args
     end
     
     
    -

    Rpg Narrative - Return Of Serenity - storyline_speed_of_light.rb

    +

    Rpg Narrative - Return Of Serenity - storyline_speed_of_light.rb

    # ./samples/99_genre_rpg_narrative/return_of_serenity/app/storyline_speed_of_light.rb
     def speed_of_light_front_of_home args
       {
    @@ -33894,7 +35591,7 @@ def speed_of_light_end_of_day args
     end
     
     
    -

    Rpg Roguelike - Roguelike Starting Point - constants.rb

    +

    Rpg Roguelike - Roguelike Starting Point - constants.rb

    # ./samples/99_genre_rpg_roguelike/01_roguelike_starting_point/app/constants.rb
     SHOW_LEGEND = true
     SOURCE_TILE_SIZE = 16
    @@ -33906,7 +35603,7 @@ TILE_B = 0
     TILE_A = 255
     
     
    -

    Rpg Roguelike - Roguelike Starting Point - legend.rb

    +

    Rpg Roguelike - Roguelike Starting Point - legend.rb

    # ./samples/99_genre_rpg_roguelike/01_roguelike_starting_point/app/legend.rb
     def tick_legend args
       return unless SHOW_LEGEND
    @@ -33975,7 +35672,7 @@ def tick_legend args
     end
     
     
    -

    Rpg Roguelike - Roguelike Starting Point - main.rb

    +

    Rpg Roguelike - Roguelike Starting Point - main.rb

    # ./samples/99_genre_rpg_roguelike/01_roguelike_starting_point/app/main.rb
     require 'app/constants.rb'
     require 'app/sprite_lookup.rb'
    @@ -34076,7 +35773,7 @@ def tile_in_game x, y, tile_key
     end
     
     
    -

    Rpg Roguelike - Roguelike Starting Point - sprite_lookup.rb

    +

    Rpg Roguelike - Roguelike Starting Point - sprite_lookup.rb

    # ./samples/99_genre_rpg_roguelike/01_roguelike_starting_point/app/sprite_lookup.rb
     def sprite_lookup
       {
    @@ -34204,7 +35901,7 @@ end
     $gtk.args.state.reserved.sprite_lookup = sprite_lookup
     
     
    -

    Rpg Roguelike - Roguelike Line Of Sight - main.rb

    +

    Rpg Roguelike - Roguelike Line Of Sight - main.rb

    # ./samples/99_genre_rpg_roguelike/02_roguelike_line_of_sight/app/main.rb
     =begin
     
    @@ -34647,7 +36344,7 @@ def tick args
     end
     
     
    -

    Rpg Tactical - Hexagonal Grid - main.rb

    +

    Rpg Tactical - Hexagonal Grid - main.rb

    # ./samples/99_genre_rpg_tactical/hexagonal_grid/app/main.rb
     class HexagonTileGame
       attr_gtk
    @@ -34719,7 +36416,7 @@ end
     $gtk.reset
     
     
    -

    Rpg Tactical - Isometric Grid - main.rb

    +

    Rpg Tactical - Isometric Grid - main.rb

    # ./samples/99_genre_rpg_tactical/isometric_grid/app/main.rb
     class Isometric
         attr_accessor :grid, :inputs, :state, :outputs
    @@ -34985,7 +36682,7 @@ def tick args
     end
     
     
    -

    Rpg Topdown - Topdown Starting Point - main.rb

    +

    Rpg Topdown - Topdown Starting Point - main.rb

    # ./samples/99_genre_rpg_topdown/topdown_starting_point/app/main.rb
     =begin
     
    @@ -35101,7 +36798,7 @@ end
     

    Follows is a source code listing for all files that have been open sourced. This code can be found online at https://github.com/DragonRuby/dragonruby-game-toolkit-contrib/.

    -

    args.rb

    +

    args.rb

    # ./dragon/args.rb
     # coding: utf-8
     # Copyright 2019 DragonRuby LLC
    @@ -35115,58 +36812,21 @@ module GTK
       class Args
         include ArgsDeprecated
         include Serialize
    -
    -    # Contains information related to input devices and input events.
    -    #
    -    # @return [Inputs]
         attr_accessor :inputs
    -
    -    # Contains the means to interact with output devices such as the screen.
    -    #
    -    # @return [Outputs]
         attr_accessor :outputs
    -
    -    # Contains the means to interact with the audio mixer.
    -    #
    -    # @return [Hash]
         attr_accessor :audio
    -
    -    # Contains display size information to assist in positioning things on the screen.
    -    #
    -    # @return [Grid]
         attr_accessor :grid
    -
    -    # Provides access to game play recording facilities within Game Toolkit.
    -    #
    -    # @return [Recording]
         attr_accessor :recording
    -
    -    # Gives you access to geometry related functions.
    -    #
    -    # @return [Geometry]
         attr_accessor :geometry
    -
         attr_accessor :fn
    -
    -    # This is where you'll put state associated with your video game.
    -    #
    -    # @return [OpenEntity]
         attr_accessor :state
    -
    -    # Gives you access to the top level DragonRuby runtime.
    -    #
    -    # @return [Runtime]
    +    attr_accessor :temp_state
         attr_accessor :runtime
         alias_method :gtk, :runtime
    -
         attr_accessor :passes
    -
         attr_accessor :wizards
    -
         attr_accessor :layout
    -
         attr_accessor :easing
    -
         attr_accessor :string
     
         def initialize runtime, recording
    @@ -35175,6 +36835,7 @@ module GTK
           @audio = {}
           @passes = []
           @state = OpenEntity.new
    +      @temp_state = OpenEntity.new
           @state.tick_count = -1
           @runtime = runtime
           @recording = recording
    @@ -35204,11 +36865,12 @@ module GTK
     
         def serialize
           {
    -        state: state.as_hash,
    -        inputs: inputs.serialize,
    -        passes: passes.serialize,
    -        outputs: outputs.serialize,
    -        grid: grid.serialize
    +        state:      state.as_hash,
    +        temp_state: temp_state.as_hash,
    +        inputs:     inputs.serialize,
    +        passes:     passes.serialize,
    +        outputs:    outputs.serialize,
    +        grid:       grid.serialize
           }
         end
     
    @@ -35344,7 +37006,7 @@ module GTK
     end
     
     
    -

    assert.rb

    +

    assert.rb

    # ./dragon/assert.rb
     # coding: utf-8
     # Copyright 2019 DragonRuby LLC
    @@ -35372,10 +37034,10 @@ To add an assertion open up this class and write:
     
     class Assert
       def custom_assertion actual, expected, message = nil
    -    # this tell Game Toolkit that an assertion was performed (so that the test isn't marked inconclusive).
    +    # this tells Game Toolkit that an assertion was performed (so that the test isn't marked inconclusive).
         @assertion_performed = true
     
    -    # perform your custom logic here and rais an exception to denote a failure.
    +    # perform your custom logic here and raise an exception to denote a failure.
     
         raise "Some Error. #{message}."
       end
    @@ -35385,14 +37047,14 @@ end
         attr :assertion_performed
     
     =begin
    -Us this if you are throwing your own exceptions and you want to mark the tests as ran (so that it wont be marked as inconclusive).
    +Use this if you are throwing your own exceptions and you want to mark the tests as ran (so that it wont be marked as inconclusive).
     =end
         def ok!
           @assertion_performed = true
         end
     
     =begin
    -Assert if a value is a thruthy value. All assert method take an optional final parameter that is the message to display to the user.
    +Assert if a value is a truthy value. All assert methods take an optional final parameter that is the message to display to the user.
     
     @example
     
    @@ -35446,7 +37108,7 @@ end
           @assertion_performed = true
           if actual != expected
             actual_string = "#{actual}#{actual.nil? ? " (nil) " : " " }".strip
    -        message = "actual:\n#{actual_string}\n\ndid not equal\n\nexpected:\n#{expected}.\n#{message}"
    +        message = "actual:\n#{actual_string}\n\ndid not equal\n\nexpected:\n#{expected}\n#{message}"
             raise message
           end
           nil
    @@ -35456,7 +37118,7 @@ end
           @assertion_performed = true
           if actual == expected
             actual_string = "#{actual}#{actual.nil? ? " (nil) " : " " }".strip
    -        message = "actual:\n#{actual_string}\n\nequaled\n\nexpected:\n#{expected}.\n#{message}"
    +        message = "actual:\n#{actual_string}\n\nequaled\n\nexpected:\n#{expected}\n#{message}"
             raise message
           end
           nil
    @@ -35486,7 +37148,7 @@ end
     end
     
     
    -

    attr_gtk.rb

    +

    attr_gtk.rb

    # ./dragon/attr_gtk.rb
     # coding: utf-8
     # Copyright 2019 DragonRuby LLC
    @@ -35509,6 +37171,10 @@ module AttrGTK
         args.state
       end
     
    +  def temp_state
    +    args.temp_state
    +  end
    +
       def inputs
         args.inputs
       end
    @@ -35536,10 +37202,18 @@ module AttrGTK
       def layout
         args.layout
       end
    +
    +  def new_entity entity_type, init_hash = nil, &block
    +    args.state.new_entity entity_type, init_hash, &block
    +  end
    +
    +  def new_entity_strict entity_type, init_hash = nil, &block
    +    args.state.new_entity_strict entity_type, init_hash, &block
    +  end
     end
     
     
    -

    attr_sprite.rb

    +

    attr_sprite.rb

    # ./dragon/attr_sprite.rb
     # Copyright 2019 DragonRuby LLC
     # MIT License
    @@ -35580,7 +37254,7 @@ module AttrSprite
       attr_accessor :x, :y, :w, :h, :path, :angle, :a, :r, :g, :b, :tile_x,
                     :tile_y, :tile_w, :tile_h, :flip_horizontally,
                     :flip_vertically, :angle_anchor_x, :angle_anchor_y, :id,
    -                :source_x, :source_y, :source_w, :source_h
    +                :source_x, :source_y, :source_w, :source_h, :blendmode_enum
     
       def primitive_marker
         :sprite
    @@ -35600,7 +37274,7 @@ module AttrSprite
     end
     
     
    -

    console.rb

    +

    console.rb

    # ./dragon/console.rb
     # Copyright 2019 DragonRuby LLC
     # MIT License
    @@ -35623,7 +37297,7 @@ module GTK
                       :font_style, :menu
     
         def initialize
    -      @font_style = FontStyle.new(font: 'font.ttf', size_enum: -1, line_height: 1.1)
    +      @font_style = FontStyle.new(font: 'font.ttf', size_enum: -1.5, line_height: 1.1)
           @menu = Menu.new self
           @disabled = false
           @log_offset = 0
    @@ -35643,6 +37317,8 @@ module GTK
           @text_color = Color.new [255, 255, 255]
           @error_color = Color.new [200, 50, 50]
           @header_color = Color.new [100, 200, 220]
    +      @code_color = Color.new [210, 168, 255]
    +      @comment_color    = Color.new [0, 200, 100]
           @animation_duration = 1.seconds
           @shown_at = -1
           load_history
    @@ -35917,6 +37593,8 @@ S
     
             if cmd == 'quit' || cmd == ':wq' || cmd == ':q!' || cmd == ':q' || cmd == ':wqa'
               $gtk.request_quit
    +        elsif cmd.start_with? ':'
    +          send ((cmd.gsub '-', '_').gsub ':', '')
             else
               puts "-> #{cmd}"
               begin
    @@ -35925,13 +37603,19 @@ S
                 if $results.nil?
                   puts "=> nil"
                 elsif $results == :console_silent_eval
    +              # do nothing since the console is silent
                 else
                   puts "=> #{$results}"
                 end
                 @last_command_errored = false
               rescue Exception => e
                 try_search_docs e
    -            puts  "* EXCEPTION: #{e}"
    +            # if an exception is thrown and the bactrace includes something helpful, then show it
    +            if (e.backtrace || []).first && (e.backtrace.first.include? "(eval)")
    +              puts  "* EXCEPTION: #{e}"
    +            else
    +              puts  "* EXCEPTION: #{e}\n#{e.__backtrace_to_org__}"
    +            end
               end
             end
           end
    @@ -36158,6 +37842,11 @@ S
           end
     
           render_log_offset args
    +
    +      args.outputs.reserved << { x: 10.from_right, y: @bottom + 10,
    +                                 text: "Press CTRL+g or ESCAPE to clear the prompt.",
    +                                 vertical_alignment_enum: 0,
    +                                 alignment_enum: 2, r: 80, g: 80, b: 80 }.label!
         end
     
         def render_log_offset args
    @@ -36180,7 +37869,7 @@ S
         end
     
         def include_subdued_markers? text
    -      include_any_words? text, subdued_markers
    +      (text.start_with? "* INFO: ") && (include_any_words? text, subdued_markers)
         end
     
         def include_any_words? text, words
    @@ -36326,8 +38015,32 @@ S
           (log_entry.start_with? "**** ")
         end
     
    +    def code? log_entry
    +      (just_symbol? log_entry) || (codeblock_marker? log_entry)
    +    end
    +
    +    def just_symbol? log_entry
    +      scrubbed = log_entry.gsub("*", "").strip
    +      (scrubbed.start_with? ":") && (!scrubbed.include? " ") && (!scrubbed.include? "=>")
    +    end
    +
    +    def code_comment? log_entry
    +      return true  if log_entry.strip.start_with?("# ")
    +      return false
    +    end
    +
    +    def codeblock_marker? log_entry
    +      return true if log_entry.strip.start_with?("#+begin_src")
    +      return true if log_entry.strip.start_with?("#+end_src")
    +      return false
    +    end
    +
         def color_for_log_entry(log_entry)
    -      if include_row_marker? log_entry
    +      if code? log_entry
    +        @code_color
    +      elsif code_comment? log_entry
    +        @comment_color
    +      elsif include_row_marker? log_entry
             @text_color
           elsif include_error_marker? log_entry
             @error_color
    @@ -36374,7 +38087,7 @@ S
     end
     
     
    -

    console_color.rb

    +

    console_color.rb

    # ./dragon/console_color.rb
     # Copyright 2019 DragonRuby LLC
     # MIT License
    @@ -36400,6 +38113,10 @@ module GTK
             @color
           end
     
    +      def to_s
    +        "GTK::Console::Color #{to_h}"
    +      end
    +
           def to_h
             { r: @color[0], g: @color[1], b: @color[2], a: @color[3] }
           end
    @@ -36408,7 +38125,7 @@ module GTK
     end
     
     
    -

    console_font_style.rb

    +

    console_font_style.rb

    # ./dragon/console_font_style.rb
     # Copyright 2019 DragonRuby LLC
     # MIT License
    @@ -36445,14 +38162,14 @@ module GTK
               size_enum: size_enum,
               alignment_enum: alignment_enum,
               **color.to_h,
    -        }.label
    +        }.label!
           end
         end
       end
     end
     
     
    -

    console_menu.rb

    +

    console_menu.rb

    # ./dragon/console_menu.rb
     # Copyright 2019 DragonRuby LLC
     # MIT License
    @@ -36507,7 +38224,7 @@ module GTK
     
           def itch_wizard_clicked
             @console.scroll_to_bottom
    -        $wizards.itch.start
    +        $wizards.itch.restart
           end
     
           def docs_clicked
    @@ -36532,6 +38249,7 @@ module GTK
               @buttons = [
                 (button id: :record,      row: 0, col:   9, text: "record gameplay",       method: :record_clicked),
                 (button id: :replay,      row: 0, col:  10, text: "start replay",          method: :replay_clicked),
    +            *custom_buttons
               ]
             elsif @menu_shown == :hidden
               @buttons = [
    @@ -36590,8 +38308,8 @@ module GTK
               method: method
             }.let do |entity|
               primitives = []
    -          primitives << entity[:rect].merge(a: 164).solid
    -          primitives << entity[:rect].merge(r: 255, g: 255, b: 255).border
    +          primitives << entity[:rect].solid!(a: 164)
    +          primitives << entity[:rect].border!(r: 255, g: 255, b: 255)
               primitives << text.wrapped_lines(5)
                                 .map_with_index do |l, i|
                                   [
    @@ -36615,7 +38333,7 @@ module GTK
     end
     
     
    -

    console_prompt.rb

    +

    console_prompt.rb

    # ./dragon/console_prompt.rb
     # Copyright 2019 DragonRuby LLC
     # MIT License
    @@ -36793,17 +38511,17 @@ S
               "#{" " * (string_width.length - c.length) } #{c} |"
             end.join
     
    -        # remove seperators between empty values
    +        # remove separators between empty values
             formated_row = formated_row.gsub("  |  ", "     ")
     
             puts formated_row
           end
     
    -      def pretty_print_row_seperator string_width, cell_width, column_width, columns
    +      def pretty_print_row_separator string_width, cell_width, column_width, columns
             # this is a joint: +--------
             column_joint = "+#{"-" * cell_width}"
     
    -        # multiple joints create a row seperator: +----+----+
    +        # multiple joints create a row separator: +----+----+
             puts (column_joint * columns) + "+"
           end
     
    @@ -36812,12 +38530,12 @@ S
             args.outputs.reserved << (@cursor_color.to_h.merge x: x + @cursor_position_px + 0.5,
                                                                y: y + 5,
                                                                x2: x + @cursor_position_px + 0.5,
    -                                                           y2: y + @font_style.letter_size.y + 5)
    +                                                           y2: y + @font_style.letter_size.y + 4)
     
             args.outputs.reserved << (@cursor_color.to_h.merge x: x + @cursor_position_px + 1,
                                                                y: y + 5,
                                                                x2: x + @cursor_position_px + 1,
    -                                                           y2: y + @font_style.letter_size.y + 5)
    +                                                           y2: y + @font_style.letter_size.y + 4)
     
             # debugging rectangle for string
             # args.outputs.reserved << (@cursor_color.to_h.merge x: x,
    @@ -36892,7 +38610,7 @@ S
     end
     
     
    -

    controller.rb

    +

    controller.rb

    # ./dragon/controller.rb
     # coding: utf-8
     # Copyright 2019 DragonRuby LLC
    @@ -37018,7 +38736,7 @@ end
     
     
     
    -

    controller/config.rb

    +

    controller/config.rb

    # ./dragon/controller/config.rb
     # coding: utf-8
     # Copyright 2019 DragonRuby LLC
    @@ -37421,7 +39139,7 @@ module GTK
     end
     
     
    -

    controller/keys.rb

    +

    controller/keys.rb

    # ./dragon/controller/keys.rb
     # coding: utf-8
     # Copyright 2019 DragonRuby LLC
    @@ -37439,7 +39157,7 @@ module GTK
             :l1, :r1,
             :l2, :r2,
             :l3, :r3,
    -        :start, :select,
    +        :start, :select, :home,
             :directional_up, :directional_down, :directional_left, :directional_right
           ].freeze
     
    @@ -37447,6 +39165,22 @@ module GTK
             attr label
           end
     
    +      def back
    +        @select
    +      end
    +
    +      def back= value
    +        @select = value
    +      end
    +
    +      def guide
    +        @home
    +      end
    +
    +      def guide= value
    +        @home = value
    +      end
    +
           # Activate a key.
           #
           # @return [void]
    @@ -37476,7 +39210,7 @@ module GTK
     end
     
     
    -

    directional_input_helper_methods.rb

    +

    directional_input_helper_methods.rb

    # ./dragon/directional_input_helper_methods.rb
     # coding: utf-8
     # Copyright 2019 DragonRuby LLC
    @@ -37493,7 +39227,7 @@ module GTK
     
           error_message = <<-S
     * ERROR
    -The GTK::DirectionalKeys module should only be included in objects that respond to the following api heirarchy:
    +The GTK::DirectionalKeys module should only be included in objects that respond to the following api hierarchy:
     
     - (#{ directional_methods.join("|") })
     - key_held.(#{ directional_methods.join("|") })
    @@ -37550,6 +39284,12 @@ S
           end
         end
     
    +    def directional_angle
    +      return nil unless directional_vector
    +
    +      Math.atan2(up_down, left_right).to_degrees
    +    end
    +
         def method_missing m, *args
           # combine the key with ctrl_
           if m.to_s.start_with?("ctrl_")
    @@ -37572,7 +39312,7 @@ S
     end
     
     
    -

    easing.rb

    +

    easing.rb

    # ./dragon/easing.rb
     # coding: utf-8
     # Copyright 2019 DragonRuby LLC
    @@ -37672,7 +39412,7 @@ end
     Easing = GTK::Easing
     
     
    -

    entity.rb

    +

    entity.rb

    # ./dragon/entity.rb
     # coding: utf-8
     # Copyright 2019 DragonRuby LLC
    @@ -37767,7 +39507,7 @@ S
     end
     
     
    -

    geometry.rb

    +

    geometry.rb

    # ./dragon/geometry.rb
     # coding: utf-8
     # Copyright 2019 DragonRuby LLC
    @@ -37776,6 +39516,22 @@ end
     
     module GTK
       module Geometry
    +    def self.rotate_point point, angle, around = nil
    +      s = Math.sin a.to_radians
    +      c = Math.cos a.to_radians
    +      px = point.x
    +      py = point.y
    +      cx = 0
    +      cy = 0
    +      if around
    +        cx = around.x
    +        cy = around.y
    +      end
    +
    +      point.merge(x: ((px - cx) * c - (py - cy) * s) + cx,
    +                  y: ((px - cx) * s + (py - cy) * c) + cy)
    +    end
    +
         # Returns f(t) for a cubic Bezier curve.
         def self.cubic_bezier t, a, b, c, d
           s  = 1 - t
    @@ -37857,7 +39613,7 @@ module GTK
         rescue Exception => e
           raise e, <<-S
     * ERROR:
    -center_inside_rect for self #{self} and other_rect #{other_rect}. Failed with exception #{e}.
    +center_inside_rect for self #{self} and other_rect #{other_rect}.\n#{e}.
     S
         end
     
    @@ -37874,7 +39630,7 @@ S
         rescue Exception => e
           raise e, <<-S
     * ERROR:
    -center_inside_rect_x for self #{self} and other_rect #{other_rect}. Failed with exception #{e}.
    +center_inside_rect_x for self #{self} and other_rect #{other_rect}.\n#{e}.
     S
         end
     
    @@ -37891,7 +39647,7 @@ S
         rescue Exception => e
           raise e, <<-S
     * ERROR:
    -center_inside_rect_y for self #{self} and other_rect #{other_rect}. Failed with exception #{e}.
    +center_inside_rect_y for self #{self} and other_rect #{other_rect}.\n#{e}.
     S
         end
     
    @@ -37900,7 +39656,7 @@ S
         end
     
     
    -    # Returns a primitive that is anchored/repositioned based off its retangle.
    +    # Returns a primitive that is anchored/repositioned based off its rectangle.
         # @gtk
         def anchor_rect anchor_x, anchor_y
           current_w = self.w
    @@ -38036,10 +39792,10 @@ S
     
         # @gtk
         def self.intersect_rect? rect_one, rect_two, tolerance = 0.1
    -      return false if rect_one.right - tolerance < rect_two.left + tolerance
    -      return false if rect_one.left + tolerance > rect_two.right - tolerance
    -      return false if rect_one.top - tolerance < rect_two.bottom + tolerance
    -      return false if rect_one.bottom + tolerance > rect_two.top - tolerance
    +      return false if ((rect_one.x + rect_one.w) - tolerance) < (rect_two.x + tolerance)
    +      return false if (rect_one.x + tolerance) > ((rect_two.x + rect_two.w) - tolerance)
    +      return false if ((rect_one.y + rect_one.h) - tolerance) < (rect_two.y + tolerance)
    +      return false if (rect_one.y + tolerance) > ((rect_two.y + rect_two.h) - tolerance)
           return true
         rescue Exception => e
           context_help_rect_one = (rect_one.__help_contract_implementation contract_intersect_rect?)[:not_implemented_methods]
    @@ -38067,6 +39823,7 @@ S
     - rect_one: #{rect_one}
     - rect_two: #{rect_two}
     #{context_help}
    +\n#{e}
     S
         end
     
    @@ -38077,14 +39834,14 @@ S
           y = y.shift_down(size * anchor_y)
           [x, y, size, size]
         rescue Exception => e
    -      raise e, ":to_square failed for size: #{size} x: #{x} y: #{y} anchor_x: #{anchor_x} anchor_y: #{anchor_y}."
    +      raise e, ":to_square failed for size: #{size} x: #{x} y: #{y} anchor_x: #{anchor_x} anchor_y: #{anchor_y}.\n#{e}"
         end
     
         # @gtk
         def self.distance point_one, point_two
           Math.sqrt((point_two.x - point_one.x)**2 + (point_two.y - point_one.y)**2)
         rescue Exception => e
    -      raise e, ":distance failed for point_one: #{point_one} point_two #{point_two}."
    +      raise e, ":distance failed for point_one: #{point_one} point_two #{point_two}.\n#{e}"
         end
     
         # @gtk
    @@ -38093,31 +39850,34 @@ S
           d_x = end_point.x - start_point.x
           Math::PI.+(Math.atan2(d_y, d_x)).to_degrees
         rescue Exception => e
    -      raise e, ":angle_from failed for start_point: #{start_point} end_point: #{end_point}."
    +      raise e, ":angle_from failed for start_point: #{start_point} end_point: #{end_point}.\n#{e}"
         end
     
         # @gtk
         def self.angle_to start_point, end_point
           angle_from end_point, start_point
         rescue Exception => e
    -      raise e, ":angle_to failed for start_point: #{start_point} end_point: #{end_point}."
    +      raise e, ":angle_to failed for start_point: #{start_point} end_point: #{end_point}.\n#{e}"
         end
     
         # @gtk
         def self.point_inside_circle? point, circle_center_point, radius
           (point.x - circle_center_point.x) ** 2 + (point.y - circle_center_point.y) ** 2 < radius ** 2
         rescue Exception => e
    -      raise e, ":point_inside_circle? failed for point: #{point} circle_center_point: #{circle_center_point} radius: #{radius}"
    +      raise e, ":point_inside_circle? failed for point: #{point} circle_center_point: #{circle_center_point} radius: #{radius}.\n#{e}"
         end
     
         # @gtk
         def self.inside_rect? inner_rect, outer_rect, tolerance = 0.0
    +      return nil if !inner_rect
    +      return nil if !outer_rect
    +
           inner_rect.x     + tolerance >= outer_rect.x     - tolerance &&
    -      inner_rect.right - tolerance <= outer_rect.right + tolerance &&
    +      (inner_rect.x + inner_rect.w) - tolerance <= (outer_rect.x + outer_rect.w) + tolerance &&
           inner_rect.y     + tolerance >= outer_rect.y     - tolerance &&
    -      inner_rect.top   - tolerance <= outer_rect.top   + tolerance
    +      (inner_rect.y + inner_rect.h) - tolerance <= (outer_rect.y + outer_rect.h) + tolerance
         rescue Exception => e
    -      raise e, ":inside_rect? failed for inner_rect: #{inner_rect} outer_rect: #{outer_rect}."
    +      raise e, ":inside_rect? failed for inner_rect: #{inner_rect} outer_rect: #{outer_rect}.\n#{e}"
         end
     
         # @gtk
    @@ -38152,7 +39912,7 @@ S
             return rect
           end
         rescue Exception => e
    -      raise e, ":scale_rect_extended failed for rect: #{rect} percentage_x: #{percentage_x} percentage_y: #{percentage_y} anchors_x: #{anchor_x} anchor_y: #{anchor_y}."
    +      raise e, ":scale_rect_extended failed for rect: #{rect} percentage_x: #{percentage_x} percentage_y: #{percentage_y} anchors_x: #{anchor_x} anchor_y: #{anchor_y}.\n#{e}"
         end
     
         # @gtk
    @@ -38166,13 +39926,27 @@ S
                                        anchor_x: anchor_x,
                                        anchor_y: anchor_y
         rescue Exception => e
    -      raise e, ":scale_rect failed for rect: #{rect} percentage: #{percentage} anchors [#{anchor_x} (x), #{anchor_y} (y)]."
    +      raise e, ":scale_rect failed for rect: #{rect} percentage: #{percentage} anchors [#{anchor_x} (x), #{anchor_y} (y)].\n#{e}"
    +    end
    +
    +    def self.rect_to_line rect
    +      l = rect.to_hash.line
    +      l.merge(x2: l.x + l.w - 1,
    +              y2: l.y + l.h)
    +    end
    +
    +    def self.rect_center_point rect
    +      { x: rect.x + rect.w.half, y: rect.y + rect.h.half }
    +    end
    +
    +    def rect_center_point
    +      Geometry.rect_center_point self
         end
       end # module Geometry
     end # module GTK
     
     
    -

    grid.rb

    +

    grid.rb

    # ./dragon/grid.rb
     # coding: utf-8
     # Copyright 2019 DragonRuby LLC
    @@ -38361,11 +40135,19 @@ module GTK
         def bottom_right
           [@right, @bottom].point
         end
    +
    +    def x
    +      0
    +    end
    +
    +    def y
    +      0
    +    end
       end
     end
     
     
    -

    inputs.rb

    +

    inputs.rb

    # ./dragon/inputs.rb
     # coding: utf-8
     # Copyright 2019 DragonRuby LLC
    @@ -38560,6 +40342,30 @@ module GTK
           }
         end
     
    +    def self.method_to_key_hash
    +      return @method_to_key_hash if @method_to_key_hash
    +      @method_to_key_hash = {}
    +      string_representation_overrides ||= {
    +        backspace: '\b'
    +      }
    +      char_to_method_hash.each do |k, v|
    +        v.each do |vi|
    +          t = { char_or_raw_key: k }
    +
    +          if k.is_a? Numeric
    +            t[:raw_key] = k
    +            t[:string_representation] = "raw_key == #{k}"
    +          else
    +            t[:char] = k
    +            t[:string_representation] = "\"#{k.strip}\""
    +          end
    +
    +          @method_to_key_hash[vi] = t
    +        end
    +      end
    +      @method_to_key_hash
    +    end
    +
         def self.char_to_method char, int = nil
           methods = char_to_method_hash[char] || char_to_method_hash[int]
           methods ? methods.dup : [char.to_sym || int]
    @@ -38674,24 +40480,32 @@ S
         end
     
         def method_missing m, *args
    -      begin
    -        define_singleton_method(m) do
    -          r = self.instance_variable_get("@#{m.without_ending_bang}".to_sym)
    -          clear_key m
    -          return r
    -        end
    +      if KeyboardKeys.method_to_key_hash[m.without_ending_bang]
    +        begin
    +          define_singleton_method(m) do
    +            r = self.instance_variable_get("@#{m.without_ending_bang}".to_sym)
    +            clear_key m
    +            return r
    +          end
     
    -        return self.send m
    -      rescue Exception => e
    -        log_important "#{e}"
    +          return self.send m
    +        rescue Exception => e
    +          log_important "#{e}"
    +        end
           end
     
    +      did_you_mean = KeyboardKeys.method_to_key_hash.find_all do |k, v|
    +        k.to_s[0..1] == m.to_s[0..1]
    +      end.map {|k, v| ":#{k} (#{v[:string_representation]})" }
    +      did_you_mean_string = ""
    +      did_you_mean_string = ". Did you mean #{did_you_mean.join ", "}?"
    +
           raise <<-S
     * ERROR:
    -There is no member on the keyboard called #{m}. Here is a to_s representation of what's available:
    -
    -#{KeyboardKeys.char_to_method_hash.map { |k, v| "[#{k} => #{v.join(",")}]" }.join("  ")}
    +#{KeyboardKeys.method_to_key_hash.map { |k, v| "** :#{k} #{v.string_representation}" }.join("\n")}
     
    +There is no key on the keyboard called :#{m}#{did_you_mean_string}.
    +Full list of available keys =:points_up:=.
     S
         end
     
    @@ -39075,6 +40889,10 @@ module GTK
             (controller_one && controller_one.directional_vector)
         end
     
    +    def directional_angle
    +      keyboard.directional_angle || (controller_one && controller_one.directional_angle)
    +    end
    +
         # Returns a signal indicating right (`1`), left (`-1`), or neither ('0').
         #
         # @return [Integer]
    @@ -39142,21 +40960,14 @@ module GTK
     end
     
     
    -

    ios_wizard.rb

    +

    ios_wizard.rb

    # ./dragon/ios_wizard.rb
    +# Contributors outside of DragonRuby who also hold Copyright: Michał Dudziński
     # Copyright 2019 DragonRuby LLC
     # MIT License
     # ios_wizard.rb has been released under MIT (*only this file*).
     
    -class WizardException < Exception
    -  attr_accessor :console_primitives
    -
    -  def initialize *console_primitives
    -    @console_primitives = console_primitives
    -  end
    -end
    -
    -class IOSWizard
    +class IOSWizard < Wizard
       def initialize
         @doctor_executed_at = 0
       end
    @@ -39169,23 +40980,45 @@ class IOSWizard
         @steps ||= []
       end
     
    -  def steps_development_build
    +  def prerequisite_steps
         [
           :check_for_xcode,
           :check_for_brew,
           :check_for_certs,
    -      :check_for_device,
    -      :check_for_dev_profile,
    +    ]
    +  end
    +
    +  def app_metadata_retrieval_steps
    +    [
           :determine_team_identifier,
           :determine_app_name,
           :determine_app_id,
    -      :blow_away_temp,
    +    ]
    +  end
    +
    +  def steps_development_build
    +    [
    +      *prerequisite_steps,
    +
    +      :check_for_device,
    +      :check_for_dev_profile,
    +
    +      *app_metadata_retrieval_steps,
    +
    +      :clear_tmp_directory,
           :stage_app,
    +
           :development_write_info_plist,
    +
           :write_entitlements_plist,
           :compile_icons,
    -      :create_payload_directory,
    +      :clear_payload_directory,
    +
    +      :create_payload_directory_dev,
    +
    +      :create_payload,
           :code_sign_payload,
    +
           :create_ipa,
           :deploy
         ]
    @@ -39193,20 +41026,27 @@ class IOSWizard
     
       def steps_production_build
         [
    -      :check_for_xcode,
    -      :check_for_brew,
    -      :check_for_certs,
    +      *prerequisite_steps,
    +
           :check_for_distribution_profile,
    -      :determine_team_identifier,
    -      :determine_app_name,
    -      :determine_app_id,
    -      :blow_away_temp,
    +      :determine_app_version,
    +
    +      *app_metadata_retrieval_steps,
    +
    +      :clear_tmp_directory,
           :stage_app,
    +
           :production_write_info_plist,
    +
           :write_entitlements_plist,
           :compile_icons,
    -      :create_payload_directory,
    +      :clear_payload_directory,
    +
    +      :create_payload_directory_prod,
    +
    +      :create_payload,
           :code_sign_payload,
    +
           :create_ipa,
           :print_publish_help
         ]
    @@ -39242,6 +41082,8 @@ class IOSWizard
         @steps = steps_development_build
         @steps = steps_production_build if @production_build
         @certificate_name = nil
    +    @app_version = opts[:version]
    +    @app_version = "1.0" if @opts[:env] == :dev && !@app_version
         init_wizard_status
         log_info "Starting iOS Wizard so we can deploy to your device."
         @start_at = Kernel.global_tick_count
    @@ -39263,8 +41105,10 @@ class IOSWizard
           log "=" * $console.console_text_width
         else
           log_error e.to_s
    +      log e.__backtrace_to_org__
         end
     
    +    init_wizard_status
         $console.set_command "$wizards.ios.start env: :#{@opts[:env]}"
       end
     
    @@ -39371,13 +41215,66 @@ class IOSWizard
         return "profiles/development.mobileprovision"
       end
     
    +  def ios_metadata_template
    +    <<-S
    +# ios_metadata.txt is used by the Pro version of DragonRuby Game Toolkit to create iOS apps.
    +# Information about the Pro version can be found at: http://dragonruby.org/toolkit/game#purchase
    +
    +# teamid needs to be set to your assigned Team Id which can be found at https://developer.apple.com/account/#/membership/
    +teamid=
    +# appid needs to be set to your application identifier which can be found at https://developer.apple.com/account/resources/identifiers/list
    +appid=
    +# appname is the name you want to show up underneath the app icon on the device. Keep it under 10 characters.
    +appname=
    +S
    +  end
    +
    +  def ios_metadata
    +    contents = $gtk.read_file 'metadata/ios_metadata.txt'
    +
    +    if !contents
    +      $gtk.write_file 'metadata/ios_metadata.txt', ios_metadata_template
    +      contents = $gtk.read_file 'metadata/ios_metadata.txt'
    +    end
    +
    +    kvps = contents.each_line
    +                   .reject { |l| l.strip.length == 0 || (l.strip.start_with? "#") }
    +                   .map do |l|
    +                     key, value = l.split("=")
    +                     [key.strip.to_sym, value.strip]
    +                   end.flatten
    +    Hash[*kvps]
    +  end
    +
    +  def game_metadata
    +    contents = $gtk.read_file 'metadata/game_metadata.txt'
    +
    +    kvps = contents.each_line
    +                   .reject { |l| l.strip.length == 0 || (l.strip.start_with? "#") }
    +                   .map do |l|
    +                     key, value = l.split("=")
    +                     [key.strip.to_sym, value.strip]
    +                   end.flatten
    +    Hash[*kvps]
    +  end
    +
    +  def raise_ios_metadata_required
    +    raise WizardException.new(
    +            "* mygame/metadata/ios_metadata.txt needs to be filled out.",
    +            "You need to update metadata/ios_metadata.txt with a valid teamid, appname, and appid.",
    +            "Instructions for where the values should come from are within metadata/ios_metadata.txt."
    +          )
    +  end
    +
       def determine_team_identifier
    -    @team_name = (team_identifier_from_provisioning_profile @opts[:env])
    -    log_info "Team Identifer is: #{@team_name}"
    +    @team_id = (ios_metadata.teamid || "")
    +    raise_ios_metadata_required if @team_id.strip.length == 0
    +    log_info "Team Identifer is: #{@team_id}"
       end
     
       def determine_app_name
    -    @app_name = (provisioning_profile_xml @opts[:env])[:children].first[:children].first[:children][1][:children].first[:data]
    +    @app_name = (ios_metadata.appname || "")
    +    raise_ios_metadata_required if @app_name.strip.length == 0
         log_info "App name is: #{@app_name}."
       end
     
    @@ -39401,36 +41298,9 @@ class IOSWizard
         $gtk.parse_xml scrubbed
       end
     
    -  def app_id_from_provisioning_profile environment
    -    application_identifier_index = (provisioning_profile_xml environment)[:children][0][:children][0][:children][13][:children][0][:children][0][:data]
    -    (provisioning_profile_xml environment)[:children][0][:children][0][:children][13][:children].each.with_index do |node, i|
    -      if node[:children] && node[:children][0] && node[:children][0][:data] == "application-identifier"
    -        application_identifier_index = i
    -        break
    -      end
    -    end
    -
    -    app_id_with_team_identifier = (provisioning_profile_xml environment)[:children].first[:children].first[:children][13][:children][application_identifier_index + 1][:children].first[:data]
    -    team_identifer = team_identifier_from_provisioning_profile environment
    -    app_id_with_team_identifier.gsub "#{team_identifer}.", ""
    -  end
    -
    -  def team_identifier_from_provisioning_profile environment
    -    team_identifer_index = (provisioning_profile_xml environment)[:children][0][:children][0][:children][13][:children][0][:children][0][:data]
    -
    -    (provisioning_profile_xml environment)[:children][0][:children][0][:children][13][:children].each.with_index do |node, i|
    -      if node[:children] && node[:children][0] && node[:children][0][:data] == "com.apple.developer.team-identifier"
    -        team_identifer_index = i
    -        break
    -      end
    -    end
    -
    -    (provisioning_profile_xml environment)[:children].first[:children].first[:children][13][:children][team_identifer_index + 1][:children].first[:data]
    -  end
    -
       def determine_app_id
    -    @app_id = app_id_from_provisioning_profile @opts[:env]
    -
    +    @app_id = ios_metadata.appid
    +    raise_ios_metadata_required if @app_id.strip.length == 0
         log_info "App Identifier is set to : #{@app_id}"
       end
     
    @@ -39449,7 +41319,7 @@ class IOSWizard
         end
       end
     
    -  def blow_away_temp
    +  def clear_tmp_directory
         sh "rm -rf #{tmp_directory}"
       end
     
    @@ -39590,7 +41460,8 @@ XML
     
         log_info "Creating Entitlements.plist"
     
    -    $gtk.write_file_root "tmp/ios/Entitlements.plist", entitlement_plist_string.gsub(":app_id", "#{@team_name}.#{@app_id}").strip
    +    $gtk.write_file_root "tmp/ios/Entitlements.plist", entitlement_plist_string.gsub(":app_id", "#{@team_id}.#{@app_id}").strip
    +    $gtk.write_file_root "tmp/ios/Entitlements.txt", entitlement_plist_string.gsub(":app_id", "#{@team_id}.#{@app_id}").strip
     
         sh "/usr/bin/plutil -convert binary1 \"#{tmp_directory}/Entitlements.plist\""
         sh "/usr/bin/plutil -convert xml1 \"#{tmp_directory}/Entitlements.plist\""
    @@ -39628,15 +41499,15 @@ XML
             CFBundleExecutable
             :app_name
             CFBundleInfoDictionaryVersion
    -        6.0
    +        :app_version
             CFBundlePackageType
             APPL
             CFBundleShortVersionString
    -        5.6
    +        :app_version
             CFBundleSignature
             ????
             CFBundleVersion
    -        5.6
    +        :app_version
             CFBundleIcons
             
                 CFBundlePrimaryIcon
    @@ -39785,13 +41656,13 @@ XML
             CFBundleIdentifier
             :app_id
             CFBundleInfoDictionaryVersion
    -        6.0
    +        :app_version
             CFBundleName
             :app_name
             CFBundlePackageType
             APPL
             CFBundleShortVersionString
    -        5.2
    +        :app_version
             CFBundleSignature
             ????
             CFBundleSupportedPlatforms
    @@ -39799,7 +41670,7 @@ XML
                     iPhoneOS
             
             CFBundleVersion
    -        5.2
    +        :app_version
             DTCompiler
             com.apple.compilers.llvm.clang.1_0
             DTPlatformBuild
    @@ -39885,6 +41756,7 @@ XML
         info_plist_string.gsub!(":app_id", @app_id)
     
         $gtk.write_file_root "tmp/ios/#{@app_name}.app/Info.plist", info_plist_string.strip
    +    $gtk.write_file_root "tmp/ios/Info.txt", info_plist_string.strip
     
         @info_plist_written = true
       end
    @@ -39938,13 +41810,13 @@ XML
             CFBundleIdentifier
             :app_id
             CFBundleInfoDictionaryVersion
    -        6.0
    +        :app_version
             CFBundleName
             :app_name
             CFBundlePackageType
             APPL
             CFBundleShortVersionString
    -        5.2
    +        :app_version
             CFBundleSignature
             ????
             CFBundleSupportedPlatforms
    @@ -39952,7 +41824,7 @@ XML
                     iPhoneOS
             
             CFBundleVersion
    -        5.2
    +        :app_version
             DTCompiler
             com.apple.compilers.llvm.clang.1_0
             DTPlatformBuild
    @@ -40036,8 +41908,10 @@ XML
     
         info_plist_string.gsub!(":app_name", @app_name)
         info_plist_string.gsub!(":app_id", @app_id)
    +    info_plist_string.gsub!(":app_version", @app_version)
     
         $gtk.write_file_root "tmp/ios/#{@app_name}.app/Info.plist", info_plist_string.strip
    +    $gtk.write_file_root "tmp/ios/Info.txt", info_plist_string.strip
     
         @info_plist_written = true
       end
    @@ -40059,28 +41933,53 @@ XML
         "#{relative_path}/#{$gtk.cli_arguments[:dragonruby]}"
       end
     
    -  def write_ip_address
    +  def embed_mobileprovision
    +    sh %Q[cp #{@provisioning_profile_path} "#{app_path}/embedded.mobileprovision"]
    +    sh %Q[/usr/bin/plutil -convert binary1 "#{app_path}/Info.plist"]
    +  end
    +
    +  def clear_payload_directory
    +    sh %Q[rm "#{@app_name}".ipa]
    +    sh %Q[rm -rf "#{app_path}/app"]
    +    sh %Q[rm -rf "#{app_path}/sounds"]
    +    sh %Q[rm -rf "#{app_path}/sprites"]
    +    sh %Q[rm -rf "#{app_path}/data"]
    +    sh %Q[rm -rf "#{app_path}/fonts"]
    +  end
    +
    +  def stage_app
    +    sh %Q[cp -r "#{root_folder}/app/" "#{app_path}/app/"]
    +    sh %Q[cp -r "#{root_folder}/sounds/" "#{app_path}/sounds/"]
    +    sh %Q[cp -r "#{root_folder}/sprites/" "#{app_path}/sprites/"]
    +    sh %Q[cp -r "#{root_folder}/data/" "#{app_path}/data/"]
    +    sh %Q[cp -r "#{root_folder}/fonts/" "#{app_path}/fonts/"]
    +  end
    +
    +  def create_payload
    +    sh %Q[mkdir -p #{tmp_directory}/ipa_root/Payload]
    +    sh %Q[cp -r "#{app_path}" "#{tmp_directory}/ipa_root/Payload"]
    +    sh %Q[chmod -R 755 "#{tmp_directory}/ipa_root/Payload"]
    +  end
    +
    +  def create_payload_directory_dev
    +    # write dev machine's ip address for hotloading
         $gtk.write_file "app/server_ip_address.txt", $gtk.ffi_misc.get_local_ip_address.strip
    +
    +    embed_mobileprovision
    +    clear_payload_directory
    +    stage_app
       end
     
    -  def create_payload_directory
    -    sh "cp #{@provisioning_profile_path} \"#{app_path}/embedded.mobileprovision\""
    -    sh "/usr/bin/plutil -convert binary1 \"#{app_path}/Info.plist\""
    -    write_ip_address
    -    sh "rm \"#{@app_name}\".ipa"
    -    sh "rm -rf \"#{app_path}/app\""
    -    sh "rm -rf \"#{app_path}/sounds\""
    -    sh "rm -rf \"#{app_path}/sprites\""
    -    sh "rm -rf \"#{app_path}/data\""
    -    sh "rm -rf \"#{app_path}/fonts\""
    -    sh "cp -r \"#{root_folder}/app/\" \"#{app_path}/app/\""
    -    sh "cp -r \"#{root_folder}/sounds/\" \"#{app_path}/sounds/\""
    -    sh "cp -r \"#{root_folder}/sprites/\" \"#{app_path}/sprites/\""
    -    sh "cp -r \"#{root_folder}/data/\" \"#{app_path}/data/\""
    -    sh "cp -r \"#{root_folder}/fonts/\" \"#{app_path}/fonts/\""
    -    sh "mkdir -p #{tmp_directory}/ipa_root/Payload"
    -    sh "cp -r \"#{app_path}\" \"#{tmp_directory}/ipa_root/Payload\""
    -    sh "chmod -R 755 \"#{tmp_directory}/ipa_root/Payload\""
    +  def create_payload_directory_prod
    +    # production builds does not hotload ip address
    +    sh %Q[rm "#{root_folder}/app/server_ip_address.txt"]
    +
    +    embed_mobileprovision
    +    stage_app
    +
    +    # production build marker
    +    sh %Q[mkdir -p "#{app_path}/metadata/"]
    +    sh %Q[touch metadata/DRAGONRUBY_PRODUCTION_BUILD]
       end
     
       def create_ipa
    @@ -40113,10 +42012,22 @@ SCRIPT
       end
     
       def print_publish_help
    -      log_info "Go to https://appstoreconnect.apple.com/apps and create an App if you haven't already done so."
    -      log_info "Go to https://appleid.apple.com and create a 'Application Specific Password'."
    -      log_info "To upload your app, Download Transporter from the App Store https://apps.apple.com/us/app/transporter/id1450874784?mt=12."
    -      log_info "Your app is located at ./tmp/ios/#{@app_name}.ipa"
    +    has_transporter = (sh "ls /Applications/Transporter.app").include? "Contents"
    +    if !has_transporter
    +      $gtk.openurl "https://apps.apple.com/us/app/transporter/id1450874784?mt=12"
    +      $console.set_command "$wizards.ios.start env: :#{@opts[:env]}, version: \"#{@opts[:version]}\""
    +      raise WizardException.new(
    +        "* To upload your app, Download Transporter from the App Store https://apps.apple.com/us/app/transporter/id1450874784?mt=12."
    +      )
    +    else
    +      sh "mkdir ./tmp/ios/intermediary_artifacts"
    +      sh "mv \"#{tmp_directory}/#{@app_name}.app\" #{tmp_directory}/intermediary_artifacts/"
    +      sh "mv \"#{tmp_directory}/do_zip.sh\" #{tmp_directory}/intermediary_artifacts"
    +      sh "mv \"#{tmp_directory}/Entitlements.plist\" #{tmp_directory}/intermediary_artifacts"
    +      sh "mv \"#{tmp_directory}/ipa_root\" #{tmp_directory}/intermediary_artifacts/"
    +      sh "open /Applications/Transporter.app"
    +      sh "open ./tmp/ios/"
    +    end
       end
     
       def compile_icons
    @@ -40137,47 +42048,43 @@ S
         sh "cp -r \"#{root_folder}/native/\" \"#{app_path}/native/\""
         sh "CODESIGN_ALLOCATE=\"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate\" /usr/bin/codesign -f -s \"#{@certificate_name}\" --entitlements #{tmp_directory}/Entitlements.plist \"#{tmp_directory}/#{@app_name}.app/native/ios-device/ext.dylib\""
       end
    +
    +  def set_version version
    +    @app_version = version
    +    start env: @opts[:env], version: version
    +  end
    +
    +  def app_version
    +    log_info "Attempting to retrieve App Version from metadata/ios_metadata.txt."
    +    ios_version_number = (ios_metadata.version || "").strip
    +    if ios_version_number.length == 0
    +      log_info "Not found. Attempting to retrieve App Version from metadata/game_metadata.txt."
    +      ios_version_number = (game_metadata.version || "").strip
    +    end
    +    ios_version_number
    +  end
    +
    +  def determine_app_version
    +    @app_version = app_version
    +    return if @app_version
    +  end
     end
     
     
    -

    itch_wizard.rb

    +

    itch_wizard.rb

    # ./dragon/itch_wizard.rb
     # Copyright 2019 DragonRuby LLC
     # MIT License
     # itch_wizard.rb has been released under MIT (*only this file*).
     
    -class ItchWizard
    +class ItchWizard < Wizard
       def steps
         [
           :check_metadata,
    -      :deploy
    +      :deploy,
         ]
       end
     
    -  def metadata_file_path
    -    "metadata/game_metadata.txt"
    -  end
    -
    -  def get_metadata
    -    metadata = $gtk.read_file metadata_file_path
    -
    -    if !metadata
    -      write_blank_metadata
    -      metadata = $gtk.read_file metadata_file_path
    -    end
    -
    -    dev_id, dev_title, game_id, game_title, version, icon = *metadata.each_line.to_a
    -
    -    {
    -      dev_id: dev_id.strip,
    -      dev_title: dev_title.strip,
    -      game_id: game_id.strip,
    -      game_title: game_title.strip,
    -      version: version.strip,
    -      icon: icon.strip
    -    }
    -  end
    -
       def write_blank_metadata
           $gtk.write_file metadata_file_path, <<-S.strip
     #devid=myname
    @@ -40195,7 +42102,7 @@ S
           write_blank_metadata
         end
     
    -    if metadata_text.each_line.to_a.length != 6
    +    if metadata_text.strip.each_line.to_a.length < 6
           write_blank_metadata
         end
     
    @@ -40207,70 +42114,67 @@ S
     
         if metadata[:dev_id].start_with?("#") || !@dev_id
           log "* PROMPT: Please provide your username for Itch."
    -      $console.set_command "$wizards.itch.set_dev_id \"your-itch-username\""
    +      $console.set_command "$wizards.itch.set_dev_id \"#{metadata[:dev_id]}\""
           return :need_dev_id
         end
     
         if metadata[:dev_title].start_with?("#") || !@dev_title
           log "* PROMPT: Please provide developer's/company's name that you want displayed."
    -      $console.set_command "$wizards.itch.set_dev_title \"Your Name\""
    +      $console.set_command "$wizards.itch.set_dev_title \"#{metadata[:dev_title]}\""
           return :need_dev_title
         end
     
         if metadata[:game_id].start_with?("#") || !@game_id
           log "* PROMPT: Please provide the id for you game. This is the id you specified when you set up a new game page on Itch."
    -      $console.set_command "$wizards.itch.set_game_id \"your-game-id\""
    +      $console.set_command "$wizards.itch.set_game_id \"#{metadata[:game_id]}\""
           return :need_game_id
         end
     
         if metadata[:game_title].start_with?("#") || !@game_title
           log "* PROMPT: Please provide the display name for your game. (This can include spaces)"
    -      $console.set_command "$wizards.itch.set_game_title \"Your Game\""
    +      $console.set_command "$wizards.itch.set_game_title \"#{metadata[:game_title]}\""
           return :need_game_title
         end
     
         if metadata[:version].start_with?("#") || !@version
           log "* PROMPT: Please provide the version for your game."
    -      $console.set_command "$wizards.itch.set_version \"1.0\""
    +      $console.set_command "$wizards.itch.set_version \"#{metadata[:version]}\""
           return :need_version
         end
     
         if metadata[:icon].start_with?("#") || !@icon
           log "* PROMPT: Please provide icon path for your game."
    -      $console.set_command "$wizards.itch.set_icon \"icon.png\""
    +      $console.set_command "$wizards.itch.set_icon \"#{metadata[:icon]}\""
           return :need_icon
         end
     
    +    puts "here!! success!!!"
    +
         return :success
       end
     
       def set_dev_id value
         @dev_id = value
    -    write_metadata
         start
       end
     
       def set_dev_title value
         @dev_title = value
    -    write_metadata
         start
       end
     
       def set_game_id value
         @game_id = value
    -    write_metadata
         start
       end
     
       def set_game_title value
         @game_title = value
    -    write_metadata
         start
       end
     
       def set_version value
         @version = value
    -    write_metadata
         start
       end
     
    @@ -40313,7 +42217,7 @@ S
         end
     
         if @icon
    -      text += "icon=metadata/#{@icon}\n"
    +      text += "icon=#{@icon}\n"
         else
           text += "#icon=metadata/icon.png\n"
         end
    @@ -40331,10 +42235,25 @@ S
     
       def deploy
         log_info "* Running dragonruby-publish: #{package_command}"
    -    results = $gtk.exec package_command
    +    $gtk.openurl "http://itch.io/dashboard" if $gtk.platform == "Mac OS X"
    +    if $gtk.platform? :mac
    +      $gtk.exec "rm -rf ./builds"
    +    end
    +    results = $gtk.exec "#{package_command} --only-package"
    +    puts File.expand_path("./builds")
    +
         log "#+begin_src"
         log results
         log "#+end_src"
    +
    +    if $gtk.platform? :mac
    +      $gtk.exec "open ./builds/"
    +    elsif $gtk.platform? :windows
    +      $gtk.exec "powershell \"ii .\""
    +    end
    +
    +    $gtk.openurl "https://itch.io/dashboard"
    +
         :success
       end
     
    @@ -40345,7 +42264,7 @@ S
         steps.each do |m|
           begin
             log_info "Running Itch Wizard Step: ~$wizards.itch.#{m}~"
    -        result = (send m) || :success if @wizard_status[m][:result] != :success
    +        result = (send m) || :success
             @wizard_status[m][:result] = result
             if result != :success
               log_info "Exiting wizard. :#{result}"
    @@ -40412,7 +42331,7 @@ S
     end
     
     
    -

    layout.rb

    +

    layout.rb

    # ./dragon/layout.rb
     # Copyright 2019 DragonRuby LLC
     # MIT License
    @@ -40692,10 +42611,18 @@ module GTK
           device.grid_area.row_count
         end
     
    +    def row_max_index
    +      row_count - 1
    +    end
    +
         def col_count
           device.grid_area.col_count
         end
     
    +    def col_max_index
    +      col_count - 1
    +    end
    +
         def gutter_height
           device.grid_area.gutter
         end
    @@ -40718,18 +42645,124 @@ module GTK
     
         def rect_defaults
           {
    -        row: nil,
    -        col: nil,
    -        h:   1,
    -        w:   1,
    -        dx:  0,
    -        dy:  0,
    -        rect: :control_rect
    +        row:      nil,
    +        col:      nil,
    +        h:        1,
    +        w:        1,
    +        dx:       0,
    +        dx_ratio: 1,
    +        dy:       0,
    +        dy_ratio: 1,
    +        dh_ratio: 1,
    +        dw_ratio: 1,
    +        merge:    nil,
    +        rect:     :control_rect
           }
         end
     
    -    def rect opts
    +    def row n
    +      (rect row: n, col: 0, w: 0, h: 0).x
    +    end
    +
    +    def row_from_bottom n
    +      (rect row: row_count - n, col: 0, w: 0, h: 0).x
    +    end
    +
    +    def col n
    +      (rect row: 0, col: n, w: 0, h: 0).y
    +    end
    +
    +    def col_from_right n
    +      (rect row: 0, col: col_max_index - n, w: 0, h: 0).y
    +    end
    +
    +    def w n
    +      (rect row: 0, col: 0, w: n, h: 1).w
    +    end
    +
    +    def h n
    +      (rect row: 0, col: 0, w: 1, h: n).h
    +    end
    +
    +    def rect_group opts
    +      group = opts.group
    +      r     = opts.row || 0
    +      r     = row_max_index - opts.row_from_bottom if opts.row_from_bottom
    +      c     = opts.col || 0
    +      c     = col_max_index - opts.col_from_right  if opts.col_from_right
    +      drow  = opts.drow || 0
    +      dcol  = opts.dcol || 0
    +      w     = opts.w    || 0
    +      h     = opts.h    || 0
    +      merge = opts[:merge]
    +
    +      running_row = r
    +      running_col = c
    +
    +      running_col = calc_col_offset(opts.col_offset) if opts.col_offset
    +      running_row = calc_row_offset(opts.row_offset) if opts.row_offset
    +
    +      group.map do |i|
    +        group_layout_opts = i.layout || {}
    +        group_layout_opts = group_layout_opts.merge row: running_row,
    +                                                    col: running_col,
    +                                                    merge: merge,
    +                                                    w: w, h: h
    +        result = (rect group_layout_opts).merge i
    +
    +        if (i.is_a? Hash) && (i.primitive_marker == :label)
    +          if    i.alignment_enum == 1
    +            result.x += result.w.half
    +          elsif i.alignment_enum == 2
    +            result.x += result.w
    +          end
    +        end
    +
    +        running_row += drow
    +        running_col += dcol
    +        result
    +      end
    +    end
    +
    +    def calc_row_offset opts = {}
    +      count = opts[:count] || opts[:length] || 0
    +      h     = opts.h || 1
    +      (row_count - (count * h)) / 2.0
    +    end
    +
    +    def calc_col_offset opts = {}
    +      count = opts[:count] || opts[:length] || 0
    +      w     = opts.w || 1
    +      (col_count - (count * w)) / 2.0
    +    end
    +
    +    def point opts = {}
    +      opts.w = 1
    +      opts.h = 1
    +      opts.row ||= 0
    +      opts.col ||= 0
    +      r = rect opts
    +      r.x  += r.w * opts.col_anchor if opts.col_anchor
    +      r.y  += r.h * opts.row_anchor if opts.row_anchor
    +      r
    +    end
    +
    +    def rect *all_opts
    +      if all_opts.length == 1
    +        opts = all_opts.first
    +      else
    +        opts = {}
    +        all_opts.each do |o|
    +          opts.merge! o
    +        end
    +      end
    +
    +      opts.row = row_max_index - opts.row_from_bottom if opts.row_from_bottom
    +      opts.col = col_max_index - opts.col_from_right if opts.col_from_right
           opts = rect_defaults.merge opts
    +      opts.row ||= 0
    +      opts.col ||= 0
    +
           result = send opts[:rect]
           if opts[:row] && opts[:col] && opts[:w] && opts[:h]
             col = rect_col opts[:col], opts[:w]
    @@ -40737,7 +42770,9 @@ module GTK
             result = control_rect.merge x: col.x,
                                         y: row.y,
                                         w: col.w,
    -                                    h: row.h
    +                                    h: row.h,
    +                                    center_x: col.center_x,
    +                                    center_y: row.center_y
           elsif opts[:row] && !opts[:col]
             result = rect_row opts[:row], opts[:h]
           elsif !opts[:row] && opts[:col]
    @@ -40775,13 +42810,21 @@ module GTK
             result[:h] += device.grid_area.gutter * 2
           end
     
    -      result[:x] += opts[:dx] if opts[:dx]
    -      result[:y] += opts[:dy] if opts[:dy]
    -      result[:w] += opts[:dw] if opts[:dw]
    -      result[:h] += opts[:dh] if opts[:dh]
    +      result[:x] += opts[:dx]       if opts[:dx]
    +      result[:x] *= opts[:dx_ratio] if opts[:dx_ratio]
    +      result[:y] += opts[:dy]       if opts[:dy]
    +      result[:y] *= opts[:dy_ratio] if opts[:dy_ratio]
    +      result[:w] += opts[:dw]       if opts[:dw]
    +      result[:w] *= opts[:dw_ratio] if opts[:dw_ratio]
    +      result[:h] += opts[:dh]       if opts[:dh]
    +      result[:h] *= opts[:dh_ratio] if opts[:dh_ratio]
    +      result.merge! opts[:merge]    if opts[:merge]
           result[:row] = opts[:row]
           result[:col] = opts[:col]
     
    +      result[:h] = result[:h].clamp 0
    +      result[:w] = result[:w].clamp 0
    +
           if $gtk.args.grid.name == :center
             result[:x] -= 640
             result[:y] -= 360
    @@ -40816,7 +42859,7 @@ module GTK
     
           row_y = device.h - row_y - row_h
     
    -      result = control_rect.merge y: row_y, h: row_h
    +      result = control_rect.merge y: row_y, h: row_h, center_y: (row_y + row_h.half)
           @rect_cache[:row][index][h] = result
           @rect_cache[:row][index][h]
         end
    @@ -40839,7 +42882,7 @@ module GTK
           col_w = col_w.to_i
           col_w -= 1 if col_w.odd?
     
    -      result = control_rect.merge x: col_x, w: col_w
    +      result = control_rect.merge x: col_x, w: col_w, center_x: (col_x + col_w.half)
           @rect_cache[:col][index][w] = result
           @rect_cache[:col][index][w]
         end
    @@ -40890,6 +42933,26 @@ module GTK
           @device
         end
     
    +    def debug_primitives opts = {}
    +      @primitives ||= col_count.map_with_index do |col|
    +                        row_count.map_with_index do |row|
    +                          cell   = rect row: row, col: col
    +                          center = Geometry.rect_center_point cell
    +                          [
    +                            cell.merge(opts).border,
    +                            cell.merge(opts)
    +                                .label!(x: center.x,
    +                                        y: center.y,
    +                                        text: "#{row},#{col}",
    +                                        size_enum: -3,
    +                                        vertical_alignment_enum: 1,
    +                                        alignment_enum: 1)
    +                          ]
    +                        end
    +                      end
    +                      @primitives
    +    end
    +
         def serialize
           {
             device: @device.serialize,
    @@ -40903,11 +42966,18 @@ module GTK
         def to_s
           serialize.to_s
         end
    +
    +    def reset
    +      @primitives = nil
    +      @rect_cache ||= {}
    +      @rect_cache.clear
    +    end
    +
       end
     end
     
     
    -

    log.rb

    +

    log.rb

    # ./dragon/log.rb
     # coding: utf-8
     # Copyright 2019 DragonRuby LLC
    @@ -41040,6 +43110,11 @@ module GTK
           self.puts message
         end
     
    +    def self.reset
    +      @once = {}
    +      nil
    +    end
    +
         def self.puts_once *ids, message
           id = "#{ids}"
           @once ||= {}
    @@ -41175,7 +43250,52 @@ class Object
     end
     
     
    -

    numeric.rb

    +

    metadata.rb

    +
    # ./dragon/metadata.rb
    +# Contributors outside of DragonRuby who also hold Copyright: Michał Dudziński
    +# Copyright 2021 DragonRuby LLC
    +# MIT License
    +# metadata.rb has been released under MIT (*only this file*).
    +
    +module Metadata
    +  def metadata_file_path
    +    "metadata/game_metadata.txt"
    +  end
    +
    +  def get_metadata
    +    metadata = $gtk.read_file metadata_file_path
    +
    +    if !metadata
    +      write_blank_metadata
    +      metadata = $gtk.read_file metadata_file_path
    +    end
    +
    +    dev_id, dev_title, game_id, game_title, version, icon = *metadata.each_line.to_a
    +
    +    {
    +      dev_id: dev_id.strip,
    +      dev_title: dev_title.strip,
    +      game_id: game_id.strip,
    +      game_title: game_title.strip,
    +      version: version.strip,
    +      icon: icon.strip
    +    }
    +  end
    +
    +  def write_blank_metadata
    +      $gtk.write_file metadata_file_path, <<-S.strip
    +#devid=myname
    +#devtitle=My Name
    +#gameid=mygame
    +#gametitle=My Game
    +#version=0.1
    +#icon=metadata/icon.png
    +S
    +  end
    +end
    +
    +
    +

    numeric.rb

    # ./dragon/numeric.rb
     # coding: utf-8
     # Copyright 2019 DragonRuby LLC
    @@ -41192,6 +43312,35 @@ class Numeric
       alias_method :lte, :<=
       alias_method :__original_eq_eq__, :== unless Numeric.instance_methods.include? :__original_eq_eq__
     
    +  def to_layout_row opts = {}
    +    $layout.rect(row: self,
    +                 col: opts.col || 0,
    +                 w:   opts.w || 0,
    +                 h:   opts.h || 0).y
    +  end
    +
    +  def to_layout_col opts = {}
    +    $layout.rect(row: 0,
    +                 col: self,
    +                 w:   opts.w || 0,
    +                 h:   opts.h || 0).x
    +  end
    +
    +  def to_layout_w
    +    $layout.rect(row: 0, col: 0, w: self, h: 1).w
    +  end
    +
    +  def to_layout_h
    +    $layout.rect(row: 0, col: 0, w: 1, h: self).h
    +  end
    +
    +  def to_layout_row_from_bottom opts = {}
    +    ($layout.row_max_index - self).to_layout_row opts
    +  end
    +
    +  def to_layout_col_from_right opts = {}
    +    ($layout.col_max_index - self).to_layout_col opts
    +  end
     
       # Converts a numeric value representing seconds into frames.
       #
    @@ -41207,10 +43356,26 @@ class Numeric
         self / 2.0
       end
     
    +  def third
    +    self / 3.0
    +  end
    +
    +  def quarter
    +    self / 4.0
    +  end
    +
       def to_byte
         clamp(0, 255).to_i
       end
     
    +  def clamp *opts
    +    min = (opts.at 0)
    +    max = (opts.at 1)
    +    return min if min && self < min
    +    return max if max && self > max
    +    return self
    +  end
    +
       def clamp_wrap min, max
         max, min = min, max if min > max
         return self if self >= min && self <= max
    @@ -41435,7 +43600,7 @@ S
         self * Math::PI.fdiv(180)
       end
     
    -  # Converts a number representing an angle in radians to degress.
    +  # Converts a number representing an angle in radians to degrees.
       #
       # @gtk
       def to_degrees
    @@ -41452,21 +43617,21 @@ S
         GTK::Geometry.to_square(self, x, y, anchor_x, anchor_y)
       end
     
    -  # Returns a normal vector for a number that represents an angle in degress.
    +  # Returns a normal vector for a number that represents an angle in degrees.
       #
       # @gtk
       def vector max_value = 1
         [vector_x(max_value), vector_y(max_value)]
       end
     
    -  # Returns the y component of a normal vector for a number that represents an angle in degress.
    +  # Returns the y component of a normal vector for a number that represents an angle in degrees.
       #
       # @gtk
       def vector_y max_value = 1
         max_value * Math.sin(self.to_radians)
       end
     
    -  # Returns the x component of a normal vector for a number that represents an angle in degress.
    +  # Returns the x component of a normal vector for a number that represents an angle in degrees.
       #
       # @gtk
       def vector_x max_value = 1
    @@ -41493,6 +43658,18 @@ S
         (self % n) == 0
       end
     
    +  def multiply n
    +    self * n
    +  end
    +
    +  def fmult n
    +    self * n.to_f
    +  end
    +
    +  def imult n
    +    (self * n).to_i
    +  end
    +
       def mult n
         self * n
       end
    @@ -41614,12 +43791,6 @@ S
         return gt other
       end
     
    -  def == other
    -    return true if __original_eq_eq__ other
    -    return __original_eq_eq__ other.entity_id if other.is_a? OpenEntity
    -    return false
    -  end
    -
       # @gtk
       def map
         unless block_given?
    @@ -41706,29 +43877,29 @@ S
       end
     
       def - other
    -    return nil unless other
    -    super
    +    return self unless other
    +    self - other
       rescue Exception => e
         __raise_arithmetic_exception__ other, :-, e
       end
     
       def + other
    -    return nil unless other
    -    super
    +    return self unless other
    +    self + other
       rescue Exception => e
         __raise_arithmetic_exception__ other, :+, e
       end
     
       def * other
    -    return nil unless other
    -    super
    +    return self unless other
    +    self * other
       rescue Exception => e
         __raise_arithmetic_exception__ other, :*, e
       end
     
       def / other
    -    return nil unless other
    -    super
    +    return self unless other
    +    self / other
       rescue Exception => e
         __raise_arithmetic_exception__ other, :/, e
       end
    @@ -41758,6 +43929,10 @@ S
       def self.clamp n, min, max
         n.clamp min, max
       end
    +
    +  def mid? l, r
    +    (between? l, r) || (between? r, l)
    +  end
     end
     
     class Fixnum
    @@ -41784,39 +43959,33 @@ class Fixnum
       end
     
       def + other
    -    return nil unless other
    -    super
    +    return self unless other
    +    self + other
       rescue Exception => e
         __raise_arithmetic_exception__ other, :+, e
       end
     
       def * other
    -    return nil unless other
    -    super
    +    return self unless other
    +    self * other
       rescue Exception => e
         __raise_arithmetic_exception__ other, :*, e
       end
     
       def / other
    -    return nil unless other
    -    super
    +    return self unless other
    +    self / other
       rescue Exception => e
         __raise_arithmetic_exception__ other, :/, e
       end
     
       def - other
    -    return nil unless other
    -    super
    +    return self unless other
    +    self - other
       rescue Exception => e
         __raise_arithmetic_exception__ other, :-, e
       end
     
    -  def == other
    -    return true if __original_eq_eq__ other
    -    return __original_eq_eq__ other.entity_id if other.is_a? GTK::OpenEntity
    -    return false
    -  end
    -
       # Returns `-1` if the number is less than `0`. `+1` if the number
       # is greater than `0`. Returns `0` if the number is equal to `0`.
       #
    @@ -41873,28 +44042,28 @@ class Float
       alias_method :__original_divide__,   :- unless Float.instance_methods.include? :__original_divide__
     
       def - other
    -    return nil unless other
    +    return self unless other
         super
       rescue Exception => e
         __raise_arithmetic_exception__ other, :-, e
       end
     
       def + other
    -    return nil unless other
    +    return self unless other
         super
       rescue Exception => e
         __raise_arithmetic_exception__ other, :+, e
       end
     
       def * other
    -    return nil unless other
    +    return self unless other
         super
       rescue Exception => e
         __raise_arithmetic_exception__ other, :*, e
       end
     
       def / other
    -    return nil unless other
    +    return self unless other
         super
       rescue Exception => e
         __raise_arithmetic_exception__ other, :/, e
    @@ -41941,10 +44110,14 @@ class Integer
       def nan?
         false
       end
    +
    +  def center other
    +    (self - other).abs.fdiv(2)
    +  end
     end
     
     
    -

    remote_hotload_client.rb

    +

    remote_hotload_client.rb

    # ./dragon/remote_hotload_client.rb
     # coding: utf-8
     # Copyright 2019 DragonRuby LLC
    @@ -41995,7 +44168,7 @@ module GTK
         def local_state
           @local_state ||= OpenEntity.new
           @local_state.hotload_client ||= @local_state.new_entity(:hotload_client,
    -                                                              notes: "This enitity is used by DragonRuby Game Toolkit to provide you hotloading on remote machines.",
    +                                                              notes: "This entity is used by DragonRuby Game Toolkit to provide you hotloading on remote machines.",
                                                                   changes: { },
                                                                   changes_queue: [],
                                                                   reloaded_files_times: [])
    @@ -42141,7 +44314,7 @@ module GTK
     end
     
     
    -

    runtime/autocomplete.rb

    +

    runtime/autocomplete.rb

    # ./dragon/runtime/autocomplete.rb
     # Copyright 2019 DragonRuby LLC
     # MIT License
    @@ -42169,7 +44342,7 @@ module GTK
               sub_index       = index - previous_line[:sum]
               word            = (cursor_line[:line][0..sub_index - 1]).strip
               token           = (word.split " ")[-1]
    -          dots            = (token.split ".")
    +          dots            = (token.split ".").flat_map { |s| s.split "[" }.flat_map { |s| s.split "]" }.flat_map { |s| s.split "(" }.flat_map { |s| s.split ")" }
               dot             = dots[-1]
             end
     
    @@ -42190,6 +44363,10 @@ module GTK
             ignores ||= []
             ignores   = [ignores].flatten
             keys   = keys.map { |k| k.to_s }
    +        keys   = keys.reject { |k| k.include? '"' }
    +                     .reject { |k| k.start_with? "'" }
    +                     .reject { |k| k.include? "," }
    +                     .reject { |k| k.start_with? "#" }
             others = ["def", "end"] +
                      [ :entity_keys_by_ref,
                        :entity_name,
    @@ -42247,6 +44424,10 @@ module GTK
     
               return autocomplete_filter_methods lookup_result.call if lookup_result
     
    +          if dot[0].upcase == dot[0] && (Object.const_defined? dot.to_sym)
    +            return (Object.const_get dot.to_sym).autocomplete_methods
    +          end
    +
               start_collecting = false
               dots_after_state = dots.find_all do |s|
                 if s == "state"
    @@ -42262,10 +44443,16 @@ module GTK
                 target = target.as_hash[k.to_sym] if target.respond_to? :as_hash
               end
     
    -          return autocomplete_filter_methods target.as_hash.keys
    +          if target.respond_to? :as_hash
    +            return autocomplete_filter_methods target.as_hash.keys
    +          else
    +            return autocomplete_filter_methods target.autocomplete_methods
    +          end
             end
     
     
    +        text = text.each_line.reject { |l| l.strip.start_with? "#" }.join "\n"
    +        text = text.each_line.map { |l| l.split("#").first }.join "\n"
             text.gsub!("[", " ")
             text.gsub!("]", " ")
             text.gsub!("(", " ")
    @@ -42281,153 +44468,155 @@ module GTK
     end # end GTK
     
     
    -

    runtime/draw.rb

    -
    # ./dragon/runtime/draw.rb
    +

    runtime/benchmark.rb

    +
    # ./dragon/runtime/benchmark.rb
     # Copyright 2019 DragonRuby LLC
     # MIT License
    -# draw.rb has been released under MIT (*only this file*).
    +# benchmark.rb has been released under MIT (*only this file*).
     
     module GTK
       class Runtime
    -    module Draw
    -      def primitives pass
    -        if $top_level.respond_to? :primitives_override
    -          return $top_level.tick_render @args, pass
    -        end
    -
    -        # Don't change this draw order unless you understand
    -        # the implications.
    -
    -        # pass.solids.each            { |s| draw_solid s }
    -        # while loops are faster than each with block
    +    module Benchmark
    +      def benchmark_single iterations, name, proc
    +        log <<-S
    +** Invoking :#{name}...
    +S
    +        time_start = Time.now
             idx = 0
    -        length = pass.solids.length
    -        while idx < pass.solids.length
    -          draw_solid (pass.solids.at idx) # accessing an array using .value instead of [] is faster
    +        r = nil
    +        while idx < iterations
    +          r = proc.call
               idx += 1
             end
     
    -        # pass.static_solids.each     { |s| draw_solid s }
    -        idx = 0
    -        length = pass.static_solids.length
    -        while idx < length
    -          draw_solid (pass.static_solids.at idx)
    -          idx += 1
    -        end
    +        result = (Time.now - time_start).round 3
     
    -        # pass.sprites.each           { |s| draw_sprite s }
    -        idx = 0
    -        length = pass.sprites.length
    -        while idx < length
    -          draw_sprite (pass.sprites.at idx)
    -          idx += 1
    -        end
    +        { name: name,
    +          time: result,
    +          time_ms: (result * 1000).to_i }
    +      end
     
    -        # pass.static_sprites.each    { |s| draw_sprite s }
    -        idx = 0
    -        length = pass.static_sprites.length
    -        while idx < length
    -          draw_sprite (pass.static_sprites.at idx)
    -          idx += 1
    -        end
    +      def benchmark opts = {}
    +        iterations = opts.iterations
     
    -        # pass.primitives.each        { |p| draw_primitive p }
    -        idx = 0
    -        length = pass.primitives.length
    -        while idx < length
    -          draw_primitive (pass.primitives.at idx)
    -          idx += 1
    -        end
    +        log <<-S
    +* BENCHMARK: Started
    +** Caller: #{(caller || []).first}
    +** Iterations: #{iterations}
    +S
    +        procs = opts.find_all { |k, v| v.respond_to? :call }
    +
    +        times = procs.map do |(name, proc)|
    +          benchmark_single iterations, name, proc
    +        end.sort_by { |r| r.time }
    +
    +        first_place = times.first
    +        second_place = times.second || first_place
    +
    +        times = times.map do |candidate|
    +          average_time = first_place.time
    +                           .add(candidate.time)
    +                           .abs
    +                           .fdiv(2)
    +
    +          difference_percentage = 0
    +          if average_time == 0
    +            difference_percentage = 0
    +          else
    +            difference_percentage = first_place.time
    +                                      .subtract(candidate.time)
    +                                      .abs
    +                                      .fdiv(average_time)
    +                                      .imult(100)
    +          end
     
    -        # pass.static_primitives.each { |p| draw_primitive p }
    -        idx = 0
    -        length = pass.static_primitives.length
    -        while idx < length
    -          draw_primitive (pass.static_primitives.at idx)
    -          idx += 1
    +          difference_time = ((first_place.time - candidate.time) * 1000).round
    +          candidate.merge(difference_percentage: difference_percentage,
    +                          difference_time: difference_time)
             end
     
    -        # pass.labels.each            { |l| draw_label l }
    -        idx = 0
    -        length = pass.labels.length
    -        while idx < length
    -          draw_label (pass.labels.at idx)
    -          idx += 1
    +        too_small_to_measure = false
    +        if (first_place.time + second_place.time) == 0
    +          too_small_to_measure = true
    +          difference_percentage = 0
    +          log <<-S
    +* BENCHMARK: Average time for experiments were too small. Increase the number of iterations.
    +S
    +        else
    +          difference_percentage = (((first_place.time - second_place.time).abs.fdiv((first_place.time + second_place.time).abs.fdiv(2))) * 100).round
             end
     
    -        # pass.static_labels.each     { |l| draw_label l }
    -        idx = 0
    -        length = pass.static_labels.length
    -        while idx < length
    -          draw_label (pass.static_labels.at idx)
    -          idx += 1
    -        end
    +        difference_time = first_place.time.-(second_place.time).*(1000).abs.round
     
    -        # pass.lines.each             { |l| draw_line l }
    -        idx = 0
    -        length = pass.lines.length
    -        while idx < length
    -          draw_line (pass.lines.at idx)
    -          idx += 1
    -        end
    +        r = {
    +          iterations: iterations,
    +          first_place: first_place,
    +          second_place: second_place,
    +          difference_time: difference_time,
    +          difference_percentage: difference_percentage,
    +          times: times,
    +          too_small_to_measure: too_small_to_measure
    +        }
     
    -        # pass.static_lines.each      { |l| draw_line l }
    -        idx = 0
    -        length = pass.static_lines.length
    -        while idx < pass.static_lines.length
    -          draw_line (pass.static_lines.at idx)
    -          idx += 1
    -        end
    +        log_message = []
    +        only_one_result = first_place.name == second_place.name
     
    -        # pass.borders.each           { |b| draw_border b }
    -        idx = 0
    -        length = pass.borders.length
    -        while idx < length
    -          draw_border (pass.borders.at idx)
    -          idx += 1
    +        if only_one_result
    +          log <<-S
    +* BENCHMARK: #{r.first_place.name} completed in #{r.first_place.time_ms}ms."
    +S
    +        else
    +          log <<-S
    +* BENCHMARK: #{r.message}
    +** Fastest: #{r.first_place.name.inspect}
    +** Second:  #{r.second_place.name.inspect}
    +** Margin:  #{r.difference_percentage}% (#{r.difference_time.abs}ms) #{r.first_place.time_ms}ms vs #{r.second_place.time_ms}ms.
    +** Times:
    +#{r.times.map { |t| "*** #{t.name}: #{t.time_ms}ms (#{t.difference_percentage}% #{t.difference_time.abs}ms)." }.join("\n")}
    +S
             end
     
    -        # pass.static_borders.each    { |b| draw_border b }
    -        idx = 0
    -        length = pass.static_borders.length
    -        while idx < length
    -          draw_border (pass.static_borders.at idx)
    -          idx += 1
    -        end
    +        r
    +      end
    +    end
    +  end
    +end
     
    -        if !$gtk.production
    -          # pass.debug.each        { |r| draw_primitive r }
    -          idx = 0
    -          length = pass.debug.length
    -          while idx < length
    -            draw_primitive (pass.debug.at idx)
    -            idx += 1
    -          end
    +
    +

    runtime/draw.rb

    +
    # ./dragon/runtime/draw.rb
    +# Copyright 2019 DragonRuby LLC
    +# MIT License
    +# draw.rb has been released under MIT (*only this file*).
     
    -          # pass.static_debug.each { |r| draw_primitive r }
    -          idx = 0
    -          length = pass.static_debug.length
    -          while idx < length
    -            draw_primitive (pass.static_debug.at idx)
    -            idx += 1
    -          end
    +module GTK
    +  class Runtime
    +    module Draw
    +      def primitives pass
    +        if $top_level.respond_to? :primitives_override
    +          return $top_level.tick_render @args, pass
             end
     
    -        # pass.reserved.each          { |r| draw_primitive r }
    -        idx = 0
    -        length = pass.reserved.length
    -        while idx < length
    -          draw_primitive (pass.reserved.at idx)
    -          idx += 1
    -        end
    +        fn.each_send pass.solids,            self, :draw_solid
    +        fn.each_send pass.static_solids,     self, :draw_solid
    +        fn.each_send pass.sprites,           self, :draw_sprite
    +        fn.each_send pass.static_sprites,    self, :draw_sprite
    +        fn.each_send pass.primitives,        self, :draw_primitive
    +        fn.each_send pass.static_primitives, self, :draw_primitive
    +        fn.each_send pass.labels,            self, :draw_label
    +        fn.each_send pass.static_labels,     self, :draw_label
    +        fn.each_send pass.lines,             self, :draw_line
    +        fn.each_send pass.static_lines,      self, :draw_line
    +        fn.each_send pass.borders,           self, :draw_border
    +        fn.each_send pass.static_borders,    self, :draw_border
     
    -        # pass.static_reserved.each   { |r| draw_primitive r }
    -        idx = 0
    -        length = pass.static_reserved.length
    -        while idx < length
    -          draw_primitive (pass.static_reserved.at idx)
    -          idx += 1
    +        if !$gtk.production
    +          fn.each_send pass.debug,           self, :draw_primitive
    +          fn.each_send pass.static_debug,    self, :draw_primitive
             end
    +
    +        fn.each_send pass.reserved,          self, :draw_primitive
    +        fn.each_send pass.static_reserved,   self, :draw_primitive
           rescue Exception => e
             pause!
             pretty_print_exception_and_export! e
    @@ -42438,7 +44627,9 @@ module GTK
             if s.respond_to? :draw_override
               s.draw_override @ffi_draw
             else
    -          @ffi_draw.draw_solid s.x, s.y, s.w, s.h, s.r, s.g, s.b, s.a
    +          @ffi_draw.draw_solid_2 s.x, s.y, s.w, s.h,
    +                                 s.r, s.g, s.b, s.a,
    +                                 (s.blendmode_enum || 1)
             end
           rescue Exception => e
             raise_conversion_for_rendering_failed s, e, :solid
    @@ -42449,14 +44640,15 @@ module GTK
             if s.respond_to? :draw_override
               s.draw_override @ffi_draw
             else
    -          @ffi_draw.draw_sprite_3 s.x, s.y, s.w, s.h,
    -                                  s.path.s_or_default,
    +          @ffi_draw.draw_sprite_4 s.x, s.y, s.w, s.h,
    +                                  (s.path || '').to_s,
                                       s.angle,
                                       s.a, s.r, s.g, s.b,
                                       s.tile_x, s.tile_y, s.tile_w, s.tile_h,
                                       !!s.flip_horizontally, !!s.flip_vertically,
                                       s.angle_anchor_x, s.angle_anchor_y,
    -                                  s.source_x, s.source_y, s.source_w, s.source_h
    +                                  s.source_x, s.source_y, s.source_w, s.source_h,
    +                                  (s.blendmode_enum || 1)
             end
           rescue Exception => e
             raise_conversion_for_rendering_failed s, e, :sprite
    @@ -42467,7 +44659,7 @@ module GTK
             if s.respond_to? :draw_override
               s.draw_override @ffi_draw
             else
    -          @ffi_draw.draw_screenshot s.path.s_or_default,
    +          @ffi_draw.draw_screenshot (s.path || '').to_s,
                                         s.x, s.y, s.w, s.h,
                                         s.angle,
                                         s.a, s.r, s.g, s.b,
    @@ -42485,10 +44677,13 @@ module GTK
             if l.respond_to? :draw_override
               l.draw_override @ffi_draw
             else
    -          @ffi_draw.draw_label l.x, l.y, l.text.s_or_default,
    -                               l.size_enum, l.alignment_enum,
    -                               l.r, l.g, l.b, l.a,
    -                               l.font.s_or_default(nil)
    +          @ffi_draw.draw_label_3 l.x, l.y,
    +                                 (l.text || '').to_s,
    +                                 l.size_enum, l.alignment_enum,
    +                                 l.r, l.g, l.b, l.a,
    +                                 l.font,
    +                                 (l.vertical_alignment_enum || 2),
    +                                 (l.blendmode_enum || 1)
             end
           rescue Exception => e
             raise_conversion_for_rendering_failed l, e, :label
    @@ -42499,7 +44694,21 @@ module GTK
             if l.respond_to? :draw_override
               l.draw_override @ffi_draw
             else
    -          @ffi_draw.draw_line l.x, l.y, l.x2, l.y2, l.r, l.g, l.b, l.a
    +          if l.x2
    +            @ffi_draw.draw_line_2 l.x, l.y, l.x2, l.y2,
    +                                  l.r, l.g, l.b, l.a,
    +                                  (l.blendmode_enum || 1)
    +          else
    +            w = l.w || 0
    +            w = 1 if w == 0
    +            h = l.h || 0
    +            h = 1 if h == 0
    +            @ffi_draw.draw_line_2 l.x, l.y,
    +                                  l.x + w - 1,
    +                                  l.y + h - 1,
    +                                  l.r, l.g, l.b, l.a,
    +                                  (l.blendmode_enum || 1)
    +          end
             end
           rescue Exception => e
             raise_conversion_for_rendering_failed l, e, :line
    @@ -42510,7 +44719,9 @@ module GTK
             if s.respond_to? :draw_override
               s.draw_override @ffi_draw
             else
    -          @ffi_draw.draw_border s.x, s.y, s.w, s.h, s.r, s.g, s.b, s.a
    +          @ffi_draw.draw_border_2 s.x, s.y, s.w, s.h,
    +                                  s.r, s.g, s.b, s.a,
    +                                  (s.blendmode_enum || 1)
             end
           rescue Exception => e
             raise_conversion_for_rendering_failed s, e, :border
    @@ -42530,13 +44741,12 @@ module GTK
             pause!
             pretty_print_exception_and_export! e
           end
    -
         end
       end
     end
     
     
    -

    runtime/framerate.rb

    +

    runtime/framerate.rb

    # ./dragon/runtime/framerate.rb
     # Copyright 2019 DragonRuby LLC
     # MIT License
    @@ -42623,7 +44833,7 @@ module GTK
     end # end module GTK
     
     
    -

    runtime/framerate_diagnostics.rb

    +

    runtime/framerate_diagnostics.rb

    # ./dragon/runtime/framerate_diagnostics.rb
     # Copyright 2019 DragonRuby LLC
     # MIT License
    @@ -42742,7 +44952,7 @@ If this warning is getting annoying put the following in your tick method:
     
           def framerate_diagnostics_primitives
             [
    -          { x: 0, y: 93.from_top, w: 500, h: 93, a: 128 }.solid,
    +          { x: 0, y: 93.from_top, w: 500, h: 93, a: 128 }.solid!,
               {
                 x: 5,
                 y: 5.from_top,
    @@ -42751,7 +44961,7 @@ If this warning is getting annoying put the following in your tick method:
                 g: 255,
                 b: 255,
                 size_enum: -2
    -          }.label,
    +          }.label!,
               {
                 x: 5,
                 y: 20.from_top,
    @@ -42760,7 +44970,7 @@ If this warning is getting annoying put the following in your tick method:
                 g: 255,
                 b: 255,
                 size_enum: -2
    -          }.label,
    +          }.label!,
               {
                 x: 5,
                 y: 35.from_top,
    @@ -42769,7 +44979,7 @@ If this warning is getting annoying put the following in your tick method:
                 g: 255,
                 b: 255,
                 size_enum: -2
    -          }.label,
    +          }.label!,
               {
                 x: 5,
                 y: 50.from_top,
    @@ -42778,7 +44988,7 @@ If this warning is getting annoying put the following in your tick method:
                 g: 255,
                 b: 255,
                 size_enum: -2
    -          }.label,
    +          }.label!,
               {
                 x: 5,
                 y: 65.from_top,
    @@ -42787,7 +44997,7 @@ If this warning is getting annoying put the following in your tick method:
                 g: 255,
                 b: 255,
                 size_enum: -2
    -          }.label,
    +          }.label!,
             ]
           end
     
    @@ -42796,7 +45006,7 @@ If this warning is getting annoying put the following in your tick method:
     end
     
     
    -

    runtime/hotload.rb

    +

    runtime/hotload.rb

    # ./dragon/runtime/hotload.rb
     # coding: utf-8
     # Copyright 2019 DragonRuby LLC
    @@ -42810,7 +45020,14 @@ module GTK
           def hotload_init
             @hotload_if_needed = 0
             @mailbox_if_needed = 0
    +
    +        # schema for file_mtimes
    +        # { FILE_PATH: { current: (Time as Fixnum),
    +        #                last:    (Time as Fixnum) },
    +        #   FILE_PATH: { current: (Time as Fixnum),
    +        #                last:    (Time as Fixnum) } }
             @file_mtimes = { }
    +
             @suppress_mailbox = true
             files_to_reload.each { |f| init_mtimes f }
             init_mtimes 'app/mailbox.rb'
    @@ -42848,6 +45065,7 @@ module GTK
                 'dragon/symbol.rb',
                 'dragon/numeric_deprecated.rb',
                 'dragon/numeric.rb',
    +            'dragon/hash_deprecated.rb',
                 'dragon/hash.rb',
                 'dragon/outputs_deprecated.rb',
                 'dragon/array_docs.rb',
    @@ -42880,6 +45098,7 @@ module GTK
                 'dragon/trace.rb',
                 'dragon/readme_docs.rb',
                 'dragon/hotload_client.rb',
    +            'dragon/wizards.rb',
                 'dragon/ios_wizard.rb',
                 'dragon/itch_wizard.rb',
               ] + core_files_to_reload + @required_files
    @@ -42898,10 +45117,8 @@ module GTK
           end
     
           def init_mtimes file
    -        current_key = "current_#{file}".to_sym
    -        last_key = "last_#{file}".to_sym
    -        @file_mtimes[current_key] ||= @ffi_file.mtime(file)
    -        @file_mtimes[last_key] ||= @ffi_file.mtime(file)
    +        @file_mtimes[file] ||= { current: @ffi_file.mtime(file),
    +                                 last: @ffi_file.mtime(file) }
           end
     
           def hotload_source_files
    @@ -42933,32 +45150,43 @@ module GTK
           end
     
           def hotload_if_needed
    +        return if Kernel.tick_count < 0
             hotload_source_files
             check_mailbox
           end
     
           def on_load_succeeded file
    -        @rcb_sender.files_reloaded << file
    -        @rcb_sender.reloaded_files << file
    +        self.files_reloaded << file
    +        self.reloaded_files << file
             Trace.untrace_classes!
           end
     
    +      def reset_all_mtimes
    +        @file_mtimes.each do |file, _|
    +          @file_mtimes[file].current = @ffi_file.mtime(file)
    +          @file_mtimes[file].last    = @file_mtimes[file].current
    +        end
    +
    +        files_to_reload.each do |file, _|
    +          @file_mtimes[file] ||= {}
    +          @file_mtimes[file].current = @ffi_file.mtime(file)
    +          @file_mtimes[file].last    = @file_mtimes[file].current
    +        end
    +      end
    +
           def reload_if_needed file, force = false
    -        current_key = "current_#{file}".to_sym
    -        last_key = "last_#{file}".to_sym
    -        @file_mtimes[current_key] ||= nil
    -        @file_mtimes[last_key] ||= nil
    -        @file_mtimes[current_key] = @ffi_file.mtime(file)
    -        return if !force && @file_mtimes[last_key] == @file_mtimes[current_key]
    +        @file_mtimes[file] ||= { current: @ffi_file.mtime(file), last: @ffi_file.mtime(file) }
    +        @file_mtimes[file].current = @ffi_file.mtime(file)
    +        return if !force && @file_mtimes[file].current == @file_mtimes[file].last
             on_load_succeeded file if reload_ruby_file file
    -        @file_mtimes[last_key] = @file_mtimes[current_key]
    +        @file_mtimes[file].last = @file_mtimes[file].current
           end
         end
       end
     end
     
     
    -

    string.rb

    +

    string.rb

    # ./dragon/string.rb
     # coding: utf-8
     # Copyright 2019 DragonRuby LLC
    @@ -42991,6 +45219,30 @@ S
         end
       end
     
    +  def char_byte
    +    return nil if self.length == 0
    +    c = self.each_char.first.bytes
    +    c = c.first if c.is_a? Enumerable
    +    c
    +  end
    +
    +  def insert_character_at index, char
    +    t = each_char.to_a
    +    t = (t.insert index, char)
    +    t.join
    +  end
    +
    +  def excluding_character_at index
    +    t = each_char.to_a
    +    t.delete_at index
    +    t.join
    +  end
    +
    +  def excluding_last_character
    +    return "" if self.length <= 1
    +    return excluding_character_at(self.length - 1)
    +  end
    +
       def end_with_bang?
         self[-1] == "!"
       end
    @@ -43070,7 +45322,7 @@ S
     end
     
     
    -

    tests.rb

    +

    tests.rb

    # ./dragon/tests.rb
     # coding: utf-8
     # Copyright 2019 DragonRuby LLC
    @@ -43206,14 +45458,14 @@ S
           log "#{self.failed.length} test(s) failed."
           self.failed.each do |h|
             log "**** Test name: :#{h[:m]}"
    -        log "#{h[:e].to_s.gsub("* ERROR:", "").strip}"
    +        log "#{h[:e].to_s.gsub("* ERROR:", "").strip}\n#{h[:e].__backtrace_to_org__}"
           end
         end
       end
     end
     
     
    -

    trace.rb

    +

    trace.rb

    # ./dragon/trace.rb
     # coding: utf-8
     # Copyright 2019 DragonRuby LLC
    @@ -43401,12 +45653,46 @@ module GTK
     end
     
     
    -

    wizards.rb

    +

    wizards.rb

    # ./dragon/wizards.rb
     # Copyright 2019 DragonRuby LLC
     # MIT License
     # wizards.rb has been released under MIT (*only this file*).
     
    +class Wizard
    +  def metadata_file_path
    +    "metadata/game_metadata.txt"
    +  end
    +
    +  def get_metadata
    +    metadata = $gtk.read_file metadata_file_path
    +
    +    if !metadata
    +      write_blank_metadata
    +      metadata = $gtk.read_file metadata_file_path
    +    end
    +
    +    dev_id, dev_title, game_id, game_title, version, icon = *metadata.each_line.to_a
    +
    +    {
    +      dev_id:     dev_id.strip.gsub("#", "").gsub("devid=", ""),
    +      dev_title:  dev_title.strip.gsub("#", "").gsub("devtitle=", ""),
    +      game_id:    game_id.strip.gsub("#", "").gsub("gameid=", ""),
    +      game_title: game_title.strip.gsub("#", "").gsub("gametitle=", ""),
    +      version:    version.strip.gsub("#", "").gsub("version=", ""),
    +      icon:       icon.strip.gsub("#", "").gsub("icon=", "")
    +    }
    +  end
    +end
    +
    +class WizardException < Exception
    +  attr_accessor :console_primitives
    +
    +  def initialize *console_primitives
    +    @console_primitives = console_primitives
    +  end
    +end
    +
     module GTK
       class Wizards
         attr_accessor :ios, :itch
    diff --git a/docs/docs.txt b/docs/docs.txt
    index 0b543de..c07fbcd 100644
    --- a/docs/docs.txt
    +++ b/docs/docs.txt
    @@ -11,8 +11,6 @@ to get fancy you can provide a ~lambda~ to filter documentation:
       docs_search { |entry| (entry.include? "Array") && (!entry.include? "Enumerable") }
     #+end_src
     
    -[[docs_search.gif]]
    -
     * Hello World
     
     Welcome to DragonRuby Game Toolkit. Take the steps below to get started.
    @@ -37,20 +35,25 @@ Reply with:
     I am a Dragon Rider.
     #+end_quote
     
    -* Watch Some Intro Videos
    +* Intro Videos
    +
    +Here are some videos to help you get the lay of the land.
     
    -Each video is only 20 minutes and all of them will fit into a lunch
    -break. So please watch them:
    +** Quick Api Tour
     
     1. Beginner Introduction to DragonRuby Game Toolkit: [[https://youtu.be/ixw7TJhU08E]]
    -2. Intermediate Introduction to Ruby Syntax: [[https://youtu.be/HG-XRZ5Ppgc]]
    -3. Intermediate Introduction to Arrays in Ruby: [[https://youtu.be/N72sEYFRqfo]]
     
    -The second and third videos are not required if you are proficient
    -with Ruby, but *definitely* watch the first one.
    +** If You Are Completely New to Ruby and Programming
    +
    +1. Intermediate Introduction to Ruby Syntax: [[https://youtu.be/HG-XRZ5Ppgc]]
    +2. Intermediate Introduction to Arrays in Ruby: [[https://youtu.be/N72sEYFRqfo]]
    +3. You may also want to try this free course provided at [[http://dragonruby.school]].
    +
    +** If You Have Game Dev Experience
     
    -You may also want to try this free course provided at
    -[[http://dragonruby.school]].
    +1. Building Tetris - Part 1: [[https://youtu.be/xZMwRSbC4rY]]
    +2. Building Tetris - Part 2: [[https://youtu.be/C3LLzDUDgz4]]
    +3. Low Res Game Jam Tutorial: [[https://youtu.be/pCI90ukKCME]]
     
     * Getting Started Tutorial
     
    @@ -392,7 +395,7 @@ Console type: ~$wizards.ios.start~ and you will be guided through the
     deployment process.
     
     To deploy to Android, you need to have an Android emulator/device, and
    -a environment that is able to run Android SDK. ~dragonruby-publish~
    +an environment that is able to run Android SDK. ~dragonruby-publish~
     will create an APK for you. From there, you can sign the APK and
     install it to your device. The signing and installation procedure
     varies from OS to OS. Here's an example of what the command might look
    @@ -411,7 +414,7 @@ The following tenants of DragonRuby are what set us apart from other
     game engines. Given that Game Toolkit is a relatively new engine,
     there are definitely features that are missing. So having a big check
     list of "all the cool things" is not this engine's forte. This is
    -compensated with a strong commitment to the following principals.
    +compensated with a strong commitment to the following principles.
     
     ** Challenge The Status Quo
     
    @@ -440,10 +443,10 @@ overwhelms beginners who are new to the engine or programming in general.
     DragonRuby's philosophy is to provide multiple options across the "make it
     fast" vs "make it right" spectrum, with incremental/intuitive
     transitions between the options provided. A concrete example of this philosophy
    -would be render primitives: the spectrum of options allows renderable constructs take
    -the form of tuples/arrays (easy to pickup, simple, and fast to code/prototype with),
    +would be render primitives: the spectrum of options allows renderable constructs that
    +take the form of tuples/arrays (easy to pickup, simple, and fast to code/prototype with),
     hashes (a little more work, but gives you the ability to add additional properties),
    -open and string entities (more work than hashes, but yields cleaner apis),
    +open and strict entities (more work than hashes, but yields cleaner apis),
     and finally - if you really need full power/flexibility in rendering - classes
     (which take the most amount of code and programming knowledge to create).
     
    @@ -570,7 +573,7 @@ The elevator pitch is:
     DragonRuby is a Multilevel Cross-platform Runtime. The "multiple levels"
     within the runtime allows us to target platforms no other Ruby can
     target: PC, Mac, Linux, Raspberry Pi, WASM, iOS, Android, Nintendo
    -Switch, PS4, Xbox, and Scadia.
    +Switch, PS4, Xbox, and Stadia.
     
     **** What does Multilevel Cross-platform mean?
     
    @@ -648,7 +651,7 @@ file called ~repl.rb~ and put it in ~mygame/app/repl.rb~:
     
     - If you use the `repl` method, the code will be executed and the DragonRuby Console will automatically open so you can see the results (on Mac and Linux, the results will also be printed to the terminal).
     
    -- All ~puts~ statements will also be saved to ~logs/log.txt~. So if you want to stay in your editor and not look at the terminal, or the DragonRuby Console, you can ~tail~ this file.
    +- All ~puts~ statements will also be saved to ~logs/puts.txt~. So if you want to stay in your editor and not look at the terminal, or the DragonRuby Console, you can ~tail~ this file.
     
     4. To ignore code in ~repl.rb~, instead of commenting it out, prefix ~repl~ with the letter ~x~ and it'll be ignored.
     
    @@ -684,7 +687,7 @@ challenges in creating something that is compatible.
     You can use DragonRuby's replay capabilities to troubleshoot:
     
     1. DragonRuby is hot loaded which gives you a very fast feedback loop (if the game throws an exception, it's because of the code you just added).
    -2. Use ~./dragonruby mygame --record~ to create a game play recording that you can use to find the exception (you can replay a recoding by executing ~./dragonruby mygame --replay last_replay.txt~ or through the DragonRuby Console using ~$gtk.recording.start_replay "last_replay.txt"~.
    +2. Use ~./dragonruby mygame --record~ to create a game play recording that you can use to find the exception (you can replay a recording by executing ~./dragonruby mygame --replay last_replay.txt~ or through the DragonRuby Console using ~$gtk.recording.start_replay "last_replay.txt"~.
     3. DragonRuby also ships with a unit testing facility. You can invoke the following command to run a test: ~./dragonruby . --eval some_ruby_file.rb --no-tick~.
     4. Get into the habit of adding debugging facilities within the game itself. You can add drawing primitives to ~args.outputs.debug~ that will render on top of your game but will be ignored in a production release.
     5. Debugging something that runs at 60fps is (imo) not that helpful. The exception you are seeing could have been because of a change that occurred many frames ago.
    @@ -697,7 +700,7 @@ Let's check the official source for the answer to this question:
     isrubydead.com: [[https://isrubydead.com/]].
     
     On a more serious note, Ruby's _quantity_ levels aren't what they used
    -to be. And that's totally fine. Every one chases the new and shiny.
    +to be. And that's totally fine. Everyone chases the new and shiny.
     
     What really matters is _quality/maturity_. Here is the latest (StackOverflow
     Survey sorted by highest paid developers)[https://insights.stackoverflow.com/survey/2019#top-paying-technologies].
    @@ -771,13 +774,11 @@ questions asked.
     
     *** But still, you should offer a free version. So I can try it out and see if I like it.
     
    -You can try our [web-based sandbox environment](). But it won't do the
    -runtime justice. Or just come to our [Slack]() or [Discord]() channel
    -and ask questions. We'd be happy to have a one on one video chat with
    -you and show off all the cool stuff we're doing.
    +You can try our web-based sandbox environment at [[http://fiddle.dragonruby.org]]. But it won't do the
    +runtime justice. Or just come to our Discord Channel at [[http://discord.dragonruby.org]] and ask questions.
    +We'd be happy to have a one on one video chat with you and show off all the cool stuff we're doing.
     
    -Seriously just buy it. Get a refund if you don't like it. We make it
    -stupid easy to do so.
    +Seriously just buy it. Get a refund if you don't like it. We make it stupid easy to do so.
     
     *** I still think you should do a free version. Think of all people who would give it a shot.
     
    @@ -897,11 +898,15 @@ You can represent a sprite as a ~Hash~:
           flip_vertically: false,
           flip_horizontally: false,
           angle_anchor_x: 0.5,
    -      angle_anchor_y: 1.0
    +      angle_anchor_y: 1.0,
    +      blendmode_enum: 1
         }
       end
     #+end_src
     
    +The ~blendmode_enum~ value can be set to ~0~ (no blending), ~1~ (alpha blending),
    +~2~ (additive blending), ~3~ (modulo blending), ~4~ (multiply blending).
    +
     You can represent a sprite as an ~object~:
     
     #+begin_src ruby
    @@ -911,7 +916,7 @@ You can represent a sprite as an ~object~:
                       :source_x, :source_y, :source_w, :source_h,
                       :tile_x, :tile_y, :tile_w, :tile_h,
                       :flip_horizontally, :flip_vertically,
    -                  :angle_anchor_x, :angle_anchor_y
    +                  :angle_anchor_x, :angle_anchor_y, :blendmode_enum
     
         def primitive_marker
           :sprite
    @@ -997,16 +1002,17 @@ You can add additional metadata about your game within a label, which requires y
     #+begin_src
       def tick args
         args.outputs.labels << {
    -      x:              200,
    -      y:              550,
    -      text:           "dragonruby",
    -      size_enum:      2,
    -      alignment_enum: 1,
    -      r:              155,
    -      g:              50,
    -      b:              50,
    -      a:              255,
    -      font:           "fonts/manaspc.ttf",
    +      x:                       200,
    +      y:                       550,
    +      text:                    "dragonruby",
    +      size_enum:               2,
    +      alignment_enum:          1,
    +      r:                       155,
    +      g:                       50,
    +      b:                       50,
    +      a:                       255,
    +      font:                    "fonts/manaspc.ttf",
    +      vertical_alignment_enum: 0, # 0 is bottom, 1 is middle, 2 is top
           # You can add any properties you like (this will be ignored/won't cause errors)
           game_data_one:  "Something",
           game_data_two: {
    @@ -1039,6 +1045,21 @@ You can get the render size of any string using ~args.gtk.calcstringbox~.
       end
     #+end_src
     
    +** Rendering Labels With New Line Characters And Wrapping
    +
    +You can use a strategy like the following to create multiple labels from a String.
    +
    +#+begin_src ruby
    +  def tick args
    +    long_string = "Lorem ipsum dolor sit amet, consectetur adipiscing elitteger dolor velit, ultricies vitae libero vel, aliquam imperdiet enim."
    +    max_character_length = 30
    +    long_strings_split = args.string.wrapped_lines long_string, max_character_length
    +    args.outputs.labels << long_strings_split.map_with_index do |s, i|
    +      { x: 10, y: 600 - (i * 20), text: s }
    +    end
    +  end
    +#+end_src
    +
     ** How To Play A Sound
     
     Sounds that end ~.wav~ will play once:
    @@ -1195,7 +1216,7 @@ Returns ~true~ if: the ~right~ arrow or ~d~ key is pressed or held on the ~keybo
     *** ~.left_right~
     Returns ~-1~ (left), ~0~ (neutral), or ~+1~ (right) depending on results of ~args.inputs.left~ and ~args.inputs.right~.
     *** ~.up_down~
    -Returns ~-1~ (down), ~0~ (neutral), or ~+1~ (right) depending on results of ~args.inputs.up~ and ~args.inputs.down~.
    +Returns ~-1~ (down), ~0~ (neutral), or ~+1~ (up) depending on results of ~args.inputs.down~ and ~args.inputs.up~.
     *** ~.text~ OR ~.history~
     Returns a string that represents the last key that was pressed on the keyboard.
     *** ~.mouse~
    @@ -1229,17 +1250,17 @@ The properties ~args.inputs.mouse.(click|down|previous_click|up)~ each return ~n
     that has an ~x~, ~y~ properties along with helper functions to determine collision: ~inside_rect?~, ~inside_circle~.
     *** ~.controller_one~, ~.controller_two~
     Represents controllers connected to the usb ports.
    -**** ~.up
    +**** ~.up~
     Returns ~true~ if ~up~ is pressed or held on the directional or left analog.
    -**** ~.down
    +**** ~.down~
     Returns ~true~ if ~down~ is pressed or held on the directional or left analog.
    -**** ~.left
    +**** ~.left~
     Returns ~true~ if ~left~ is pressed or held on the directional or left analog.
    -**** ~.right
    +**** ~.right~
     Returns ~true~ if ~right~ is pressed or held on the directional or left analog.
    -**** ~.left_right
    +**** ~.left_right~
     Returns ~-1~ (left), ~0~ (neutral), or ~+1~ (right) depending on results of ~args.inputs.controller_(one|two).left~ and ~args.inputs.controller_(one|two).right~.
    -**** ~.up_down
    +**** ~.up_down~
     Returns ~-1~ (down), ~0~ (neutral), or ~+1~ (up) depending on results of ~args.inputs.controller_(one|two).up~ and ~args.inputs.controller_(one|two).down~.
     **** ~.(left_analog_x_raw|right_analog_x_raw)~
     Returns the raw integer value for the analog's horizontal movement (~-32,000 to +32,000~).
    @@ -1249,13 +1270,13 @@ Returns the raw integer value for the analog's vertical movement (~-32,000 to +3
     Returns a number between ~-1~ and ~1~ which represents the percentage the analog is moved horizontally as a ratio of the maximum horizontal movement.
     **** ~.left_analog_y_perc|right_analog_y_perc)~
     Returns a number between ~-1~ and ~1~ which represents the percentage the analog is moved vertically as a ratio of the maximum vertical movement.
    -**** ~.directional_up)~
    +**** ~.directional_up~
     Returns ~true~ if ~up~ is pressed or held on the directional.
    -**** ~.directional_down)~
    +**** ~.directional_down~
     Returns ~true~ if ~down~ is pressed or held on the directional.
    -**** ~.directional_left)~
    +**** ~.directional_left~
     Returns ~true~ if ~left~ is pressed or held on the directional.
    -**** ~.directional_right)~
    +**** ~.directional_right~
     Returns ~true~ if ~right~ is pressed or held on the directional.
     **** ~.(a|b|x|y|l1|r1|l2|r2|l3|r3|start|select)~
     Returns ~true~ if the specific button is pressed or held.
    @@ -1411,6 +1432,14 @@ Send a Primitive to this collection to render an unfilled rectangle to the scree
     Send any Primitive to this collection which represents things you render to the screen for debugging purposes. Primitives in this collection will not be rendered in a production release of your game.
     ** ~args.geometry~
     This property contains geometric functions. Functions can be invoked via ~args.geometry.FUNCTION~.
    +
    +Here are some general notes with regards to the arguments these geometric functions accept.
    +
    +1. ~Rectangles~ can be represented as an ~Array~ with four (or more) values ~[x, y, w, h]~, as a ~Hash~ ~{ x:, y:, w:, h: }~ or an object that responds to ~x~, ~y~, ~w~, and ~h~.
    +2. ~Points~ can be represent as an ~Array~ with two (or more) values ~[x, y]~, as a ~Hash~ ~{ x:, y:}~ or an object that responds to ~x~, and ~y~.
    +3. ~Lines~ can be represented as an ~Array~ with four (or more) values ~[x, y, x2, y2]~, as a ~Hash~ ~{ x:, y:, x2:, y2: }~ or an object that responds to ~x~, ~y~, ~x2~, and ~y2~.
    +4. ~Angles~ are represented as degrees (not radians).
    +
     *** ~.inside_rect? rect_1, rect_2~
     Returns ~true~ if ~rect_1~ is inside ~rect_2~.
     *** ~.intersect_rect? rect_2, rect_2~
    @@ -1975,7 +2004,7 @@ wide and 90 pixels tall.
     
     ** Rendering a solid using an Array with colors and alpha
     
    -The value for the color and alpha is an number between ~0~ and ~255~. The
    +The value for the color and alpha is a number between ~0~ and ~255~. The
     alpha property is optional and will be set to ~255~ if not specified.
     
     Creates a green solid rectangle with an opacity of 50%.
    @@ -2011,7 +2040,7 @@ be provided in any order.
     ** Rendering a solid using a Class
     
     You can also create a class with solid/border properties and render it as a primitive.
    -ALL properties must on the class. *Additionally*, a method called ~primitive_marker~
    +ALL properties must be on the class. *Additionally*, a method called ~primitive_marker~
     must be defined on the class.
     
     Here is an example:
    @@ -2070,6 +2099,106 @@ You have to use ~args.outputs.borders~:
     #+end_src
     
     
    +* DOCS: ~GTK::Outputs#sprites~
    +
    +Add primitives to this collection to render a sprite to the screen.
    +
    +** Rendering a sprite using an Array
    +
    +Creates a sprite of a white circle located at 100, 100. 160 pixels
    +wide and 90 pixels tall.
    +
    +#+begin_src
    +  def tick args
    +    #                         X    Y   WIDTH   HEIGHT                      PATH
    +    args.outputs.sprites << [100, 100,   160,     90, "sprites/circle/white.png]
    +  end
    +#+end_src
    +
    +** Rendering a sprite using an Array with colors and alpha
    +
    +The value for the color and alpha is a number between ~0~ and ~255~. The
    +alpha property is optional and will be set to ~255~ if not specified.
    +
    +Creates a green circle sprite with an opacity of 50%.
    +
    +#+begin_src
    +  def tick args
    +    #                         X    Y  WIDTH  HEIGHT           PATH                ANGLE  ALPHA  RED  GREEN  BLUE
    +    args.outputs.sprites << [100, 100,  160,     90, "sprites/circle/white.png",     0,    128,   0,   255,    0]
    +  end
    +#+end_src
    +
    +** Rendering a sprite using a Hash
    +
    +If you want a more readable invocation. You can use the following hash to create a sprite.
    +Any parameters that are not specified will be given a default value. The keys of the hash can
    +be provided in any order.
    +
    +#+begin_src
    +  def tick args
    +    args.outputs.sprites << {
    +      x:                             0,
    +      y:                             0,
    +      w:                           100,
    +      h:                           100,
    +      path: "sprites/circle/white.png",
    +      angle:                         0,
    +      a:                           255,
    +      r:                             0,
    +      g:                           255,
    +      b:                             0
    +    }
    +  end
    +#+end_src
    +
    +** Rendering a solid using a Class
    +
    +You can also create a class with solid/border properties and render it as a primitive.
    +ALL properties must be on the class. *Additionally*, a method called ~primitive_marker~
    +must be defined on the class.
    +
    +Here is an example:
    +
    +#+begin_src
    +  # Create type with ALL sprite properties AND primitive_marker
    +  class Sprite
    +    attr_accessor :x, :y, :w, :h, :path, :angle, :angle_anchor_x, :angle_anchor_y,  :tile_x, :tile_y, :tile_w, :tile_h, :source_x, :source_y, :source_w, :source_h, :flip_horizontally, :flip_vertically, :a, :r, :g, :b
    +
    +    def primitive_marker
    +      :sprite
    +    end
    +  end
    +
    +  # Inherit from type
    +  class Circle < Sprite
    +  # constructor
    +    def initialize x, y, size, path
    +      self.x = x
    +      self.y = y
    +      self.w = size
    +      self.h = size
    +      self.path = path
    +    end
    +    def serlialize
    +      {x:self.x, y:self.y, w:self.w, h:self.h, path:self.path}
    +    end
    +
    +    def inspect
    +      serlialize.to_s
    +    end
    +
    +    def to_s
    +      serlialize.to_s
    +    end
    +  end
    +  def tick args
    +    # render circle sprite
    +    args.outputs.sprites  << Circle.new(10, 10, 32,"sprites/circle/white.png")
    +  end
    +#+end_src
    +
    +
     * DOCS: ~GTK::Outputs#screenshots~
     
     Add a hash to this collection to take a screenshot and save as png file.
    @@ -2133,12 +2262,12 @@ The ~GTK::MousePoint~ has the following properties.
     - ~x~: Integer representing the mouse's x.
     - ~y~: Integer representing the mouse's y.
     - ~point~: Array with the ~x~ and ~y~ values.
    -- ~w~: Width of the point that always returns ~0~ (included so that it can seemlessly work with ~GTK::Geometry~ functions).
    -- ~h~: Height of the point that always returns ~0~ (included so that it can seemlessly work with ~GTK::Geometry~ functions).
    -- ~left~: This value is the same as ~x~ (included so that it can seemlessly work with ~GTK::Geometry~ functions).
    -- ~right~: This value is the same as ~x~ (included so that it can seemlessly work with ~GTK::Geometry~ functions).
    -- ~top~: This value is the same as ~y~ (included so that it can seemlessly work with ~GTK::Geometry~ functions).
    -- ~bottom~: This value is the same as ~y~ (included so that it can seemlessly work with ~GTK::Geometry~ functions).
    +- ~w~: Width of the point that always returns ~0~ (included so that it can seamlessly work with ~GTK::Geometry~ functions).
    +- ~h~: Height of the point that always returns ~0~ (included so that it can seamlessly work with ~GTK::Geometry~ functions).
    +- ~left~: This value is the same as ~x~ (included so that it can seamlessly work with ~GTK::Geometry~ functions).
    +- ~right~: This value is the same as ~x~ (included so that it can seamlessly work with ~GTK::Geometry~ functions).
    +- ~top~: This value is the same as ~y~ (included so that it can seamlessly work with ~GTK::Geometry~ functions).
    +- ~bottom~: This value is the same as ~y~ (included so that it can seamlessly work with ~GTK::Geometry~ functions).
     - ~created_at~: The tick (~args.state.tick_count~) that this structure was created.
     - ~global_created_at~: The global tick (~Kernel.global_tick_count~) that this structure was created.
     
    @@ -3580,7 +3709,7 @@ Follows is a source code listing for all files that have been open sourced. This
                                      g: 0,
                                      b: 200,
                                      a: 255,
    -                                 font: "manaspc.ttf" }.label
    +                                 font: "manaspc.ttf" }.label!
       
         # Primitives can hold anything, and can be given a label in the following forms
         args.outputs.primitives << [690 + 150, 330 - 80, "Custom font (.primitives Array)", 0, 1, 125, 0, 200, 255, "manaspc.ttf" ].label
    @@ -3594,7 +3723,7 @@ Follows is a source code listing for all files that have been open sourced. This
                                      g: 0,
                                      b: 200,
                                      a: 255,
    -                                 font: "manaspc.ttf" }.label
    +                                 font: "manaspc.ttf" }.label!
       end
       
       def tick_instructions args, text, y = 715
    @@ -3831,930 +3960,791 @@ Follows is a source code listing for all files that have been open sourced. This
     
     #+end_src
     
    -*** Rendering Basics - Audio Mixer - main.rb
    +*** Input Basics - Keyboard - main.rb
     #+begin_src ruby
    -  # ./samples/01_rendering_basics/06_audio_mixer/app/main.rb
    -  $gtk.reset
    +  # ./samples/02_input_basics/01_keyboard/app/main.rb
    +  =begin
       
    -  $boxsize = 30
    +  APIs listing that haven't been encountered in a previous sample apps:
       
    -  def render_sources args
    -    mouse_in_panel = (args.state.selected != 0) && args.inputs.mouse.position.inside_rect?([900, 450, 340, 250])
    -    mouse_new_down = (args.state.mouse_held == 1)
    +  - args.inputs.keyboard.key_up.KEY: The value of the properties will be set
    +    to the frame  that the key_up event occurred (the frame correlates
    +    to args.state.tick_count). Otherwise the value will be nil. For a
    +    full listing of keys, take a look at mygame/documentation/06-keyboard.md.
    +  - args.state.PROPERTY: The state property on args is a dynamic
    +    structure. You can define ANY property here with ANY type of
    +    arbitrary nesting. Properties defined on args.state will be retained
    +    across frames. If you attempt access a property that doesn't exist
    +    on args.state, it will simply return nil (no exception will be thrown).
       
    -    if (mouse_new_down && !mouse_in_panel)
    -      args.state.selected = 0  # will reset below if we hit something.
    -    end
    +  =end
       
    -    args.audio.keys.each { |k|
    -      s = args.audio[k]
    +  # Along with outputs, inputs are also an essential part of video game development
    +  # DragonRuby can take input from keyboards, mouse, and controllers.
    +  # This sample app will cover keyboard input.
       
    -      if (mouse_new_down) && !mouse_in_panel && args.inputs.mouse.position.inside_rect?([s[:screenx], s[:screeny], $boxsize, $boxsize])
    -        args.state.selected = k
    -        args.state.dragging_source = true
    -      end
    +  # args.inputs.keyboard.key_up.a will check to see if the a key has been pressed
    +  # This will work with the other keys as well
       
    -      isselected = (k == args.state.selected)
       
    -      if isselected && args.state.dragging_source
    -        # you can hang anything on the audio hashes you want, so we store the
    -        #  actual screen position so it doesn't scale weirdly vs your mouse.
    -        s[:screenx] = args.inputs.mouse.x - ($boxsize / 2)
    -        s[:screeny] = args.inputs.mouse.y - ($boxsize / 2)
    +  def tick args
    +    tick_instructions args, "Sample app shows how keyboard events are registered and accessed.", 360
    +    # Notice how small_font accounts for all the remaining parameters
    +    args.outputs.labels << { x: 460, y: row_to_px(args, 0), text: "Current game time: #{args.state.tick_count}", size_enum: -1 }
    +    args.outputs.labels << { x: 460, y: row_to_px(args, 2), text: "Keyboard input: args.inputs.keyboard.key_up.h", size_enum: -1 }
    +    args.outputs.labels << { x: 460, y: row_to_px(args, 3), text: "Press \"h\" on the keyboard.", size_enum: -1 }
    +  
    +    # Input on a specifc key can be found through args.inputs.keyboard.key_up followed by the key
    +    if args.inputs.keyboard.key_up.h
    +      args.state.h_pressed_at = args.state.tick_count
    +    end
       
    -        s[:screeny] = 50 if s[:screeny] < 50
    -        s[:screeny] = (719 - $boxsize) if s[:screeny] > (719 - $boxsize)
    -        s[:screenx] = 0 if s[:screenx] < 0
    -        s[:screenx] = (1279 - $boxsize) if s[:screenx] > (1279 - $boxsize)
    +    # This code simplifies to if args.state.h_pressed_at has not been initialized, set it to false
    +    args.state.h_pressed_at ||= false
       
    -        s[:x] = ((s[:screenx] / 1279.0) * 2.0) - 1.0  # scale to -1.0 - 1.0 range
    -        s[:y] = ((s[:screeny] / 719.0) * 2.0) - 1.0   # scale to -1.0 - 1.0 range
    -      end
    +    if args.state.h_pressed_at
    +      args.outputs.labels << { x: 460, y: row_to_px(args, 4), text: "\"h\" was pressed at time: #{args.state.h_pressed_at}", size_enum: -1 }
    +    else
    +      args.outputs.labels << { x: 460, y: row_to_px(args, 4), text: "\"h\" has never been pressed.", size_enum: -1 }
    +    end
       
    -      color = isselected ? [ 0, 255, 0, 255 ] : [ 0, 0, 255, 255 ]
    -      args.outputs.primitives << [s[:screenx], s[:screeny], $boxsize, $boxsize, *color].solid
    -    }
    +    tick_help_text args
       end
       
    -  def render_panel args
    -    s = args.audio[args.state.selected]
    -    return if s.nil?
    -    mouse_down = (args.state.mouse_held > 0)
    +  def row_to_px args, row_number, y_offset = 20
    +    # This takes a row_number and converts it to pixels DragonRuby understands.
    +    # Row 0 starts 5 units below the top of the grid
    +    # Each row afterward is 20 units lower
    +    args.grid.top - 5 - (y_offset * row_number)
    +  end
    +  
    +  # Don't worry about understanding the code within this method just yet.
    +  # This method shows you the help text within the game.
    +  def tick_help_text args
    +    return unless args.state.h_pressed_at
       
    -    args.outputs.primitives << [900, 450, 340, 250, 127, 127, 200, 255].solid
    -    args.outputs.primitives << [1075, 690, "Source ##{args.state.selected}", 3, 1, 255, 255, 255].label
    -    args.outputs.primitives << [910, 660, 1230, 660, 255, 255, 255].line
    -    args.outputs.primitives << [910, 650, "screen:    (#{s[:screenx].to_i}, #{s[:screeny].to_i})", 0, 0, 255, 255, 255].label
    -    args.outputs.primitives << [910, 625, "position:  (#{s[:x].round(5).to_s[0..6]}, #{s[:y].round(5).to_s[0..6]})", 0, 0, 255, 255, 255].label
    +    args.state.key_value_history      ||= {}
    +    args.state.key_down_value_history ||= {}
    +    args.state.key_held_value_history ||= {}
    +    args.state.key_up_value_history   ||= {}
       
    -    slider = [1022, 586, 200, 7]
    -    if mouse_down && args.inputs.mouse.position.inside_rect?(slider)
    -      s[:pitch] = ((args.inputs.mouse.x - slider[0]).to_f / (slider[2]-1.0)) * 2.0
    +    if (args.inputs.keyboard.key_down.truthy_keys.length > 0 ||
    +        args.inputs.keyboard.key_held.truthy_keys.length > 0 ||
    +        args.inputs.keyboard.key_up.truthy_keys.length > 0)
    +      args.state.help_available = true
    +      args.state.no_activity_debounce = nil
    +    else
    +      args.state.no_activity_debounce ||= 5.seconds
    +      args.state.no_activity_debounce -= 1
    +      if args.state.no_activity_debounce <= 0
    +        args.state.help_available = false
    +        args.state.key_value_history        = {}
    +        args.state.key_down_value_history   = {}
    +        args.state.key_held_value_history   = {}
    +        args.state.key_up_value_history     = {}
    +      end
         end
    -    slidercolor = (s[:pitch] / 2.0) * 255
    -    args.outputs.primitives << [*slider, slidercolor, slidercolor, slidercolor, 255].solid
    -    args.outputs.primitives << [910, 600, "pitch: #{s[:pitch].round(3).to_s[0..2]}", 0, 0, 255, 255, 255].label
       
    -    slider = [1022, 561, 200, 7]
    -    if mouse_down && args.inputs.mouse.position.inside_rect?(slider)
    -      s[:gain] = (args.inputs.mouse.x - slider[0]).to_f / (slider[2]-1.0)
    +    args.outputs.labels << { x: 10, y: row_to_px(args, 6), text: "This is the api for the keys you've pressed:", size_enum: -1, r: 180 }
    +  
    +    if !args.state.help_available
    +      args.outputs.labels << [10, row_to_px(args, 7),  "Press a key and I'll show code to access the key and what value will be returned if you used the code.", small_font]
    +      return
         end
    -    slidercolor = s[:gain] * 255
    -    args.outputs.primitives << [*slider, slidercolor, slidercolor, slidercolor, 255].solid
    -    args.outputs.primitives << [910, 575, "gain: #{s[:gain].round(3).to_s[0..2]}", 0, 0, 255, 255, 255].label
       
    -    checkbox = [1022, 533, 10, 12]
    -    if (args.state.mouse_held == 1) && args.inputs.mouse.position.inside_rect?(checkbox)
    -      s[:looping] = !s[:looping]
    +    args.outputs.labels << { x: 10 , y: row_to_px(args, 7), text: "args.inputs.keyboard",          size_enum: -2 }
    +    args.outputs.labels << { x: 330, y: row_to_px(args, 7), text: "args.inputs.keyboard.key_down", size_enum: -2 }
    +    args.outputs.labels << { x: 650, y: row_to_px(args, 7), text: "args.inputs.keyboard.key_held", size_enum: -2 }
    +    args.outputs.labels << { x: 990, y: row_to_px(args, 7), text: "args.inputs.keyboard.key_up",   size_enum: -2 }
    +  
    +    fill_history args, :key_value_history,      :down_or_held, nil
    +    fill_history args, :key_down_value_history, :down,        :key_down
    +    fill_history args, :key_held_value_history, :held,        :key_held
    +    fill_history args, :key_up_value_history,   :up,          :key_up
    +  
    +    render_help_labels args, :key_value_history,      :down_or_held, nil,      10
    +    render_help_labels args, :key_down_value_history, :down,        :key_down, 330
    +    render_help_labels args, :key_held_value_history, :held,        :key_held, 650
    +    render_help_labels args, :key_up_value_history,   :up,          :key_up,   990
    +  end
    +  
    +  def fill_history args, history_key, state_key, keyboard_method
    +    fill_single_history args, history_key, state_key, keyboard_method, :raw_key
    +    fill_single_history args, history_key, state_key, keyboard_method, :char
    +    args.inputs.keyboard.keys[state_key].each do |key_name|
    +      fill_single_history args, history_key, state_key, keyboard_method, key_name
         end
    -    checkboxcolor = s[:looping] ? 255 : 0
    -    args.outputs.primitives << [*checkbox, checkboxcolor, checkboxcolor, checkboxcolor, 255].solid
    -    args.outputs.primitives << [910, 550, "looping:", 0, 0, 255, 255, 255].label
    +  end
       
    -    checkbox = [1022, 508, 10, 12]
    -    if (args.state.mouse_held == 1) && args.inputs.mouse.position.inside_rect?(checkbox)
    -      s[:paused] = !s[:paused]
    +  def fill_single_history args, history_key, state_key, keyboard_method, key_name
    +    current_value = args.inputs.keyboard.send(key_name)
    +    if keyboard_method
    +      current_value = args.inputs.keyboard.send(keyboard_method).send(key_name)
         end
    -    checkboxcolor = s[:paused] ? 255 : 0
    -    args.outputs.primitives << [*checkbox, checkboxcolor, checkboxcolor, checkboxcolor, 255].solid
    -    args.outputs.primitives << [910, 525, "paused:", 0, 0, 255, 255, 255].label
    +    args.state.as_hash[history_key][key_name] ||= []
    +    args.state.as_hash[history_key][key_name] << current_value
    +    args.state.as_hash[history_key][key_name] = args.state.as_hash[history_key][key_name].reverse.uniq.take(3).reverse
    +  end
       
    -    button = [910, 460, 320, 20]
    -    if (args.state.mouse_held == 1) && args.inputs.mouse.position.inside_rect?(button)
    -      args.audio.delete(args.state.selected)
    -      args.state.selected = 0
    +  def render_help_labels args, history_key, state_key, keyboard_method, x
    +    idx = 8
    +    args.outputs.labels << args.state
    +                             .as_hash[history_key]
    +                             .keys
    +                             .reverse
    +                             .map
    +                             .with_index do |k, i|
    +      v = args.state.as_hash[history_key][k]
    +      current_value = args.inputs.keyboard.send(k)
    +      if keyboard_method
    +        current_value = args.inputs.keyboard.send(keyboard_method).send(k)
    +      end
    +      idx += 2
    +      [
    +        { x: x, y: row_to_px(args, idx + 0, 16), text: "    .#{k} is #{current_value || "nil"}", size_enum: -2 },
    +        { x: x, y: row_to_px(args, idx + 1, 16), text: "       was #{v}", size_enum: -2 }
    +      ]
         end
    -    args.outputs.primitives << [*button, 255, 0, 0, 255].solid
    -    args.outputs.primitives << [button[0] + (button[2] / 2), button[1]+20, "DELETE SOURCE", 0, 1, 255, 255, 0].label
       end
       
    -  def spawn_new_sound args, num
    -    input = nil
    -    input = "sounds/#{num}.#{(num == 6) ? 'ogg' : 'wav'}"
       
    -    # Spawn randomly in an area that won't be covered by UI.
    -    screenx = (rand * 600.0) + 200.0
    -    screeny = (rand * 400.0) + 100.0
    +  def tick_instructions args, text, y = 715
    +    return if args.state.key_event_occurred
    +    if args.inputs.mouse.click ||
    +       args.inputs.keyboard.directional_vector ||
    +       args.inputs.keyboard.key_down.enter ||
    +       args.inputs.keyboard.key_down.escape
    +      args.state.key_event_occurred = true
    +    end
       
    -    args.state.next_sound_index += 1
    +    args.outputs.debug << { x: 0,   y: y - 50, w: 1280, h: 60 }.solid!
    +    args.outputs.debug << { x: 640, y: y,      text: text,
    +                            size_enum: 1, alignment_enum: 1, r: 255, g: 255, b: 255 }.label!
    +    args.outputs.debug << { x: 640, y: y - 25, text: "(click to dismiss instructions)",
    +                            size_enum: -2, alignment_enum: 1, r: 255, g: 255, b: 255 }.label!
    +  end
    +
    +#+end_src
    +
    +*** Input Basics - Moving A Sprite - main.rb
    +#+begin_src ruby
    +  # ./samples/02_input_basics/01_moving_a_sprite/app/main.rb
    +  def tick args
    +    # create a player and set default values
    +    # for the player's x, y, w (width), and h (height)
    +    args.state.player.x ||= 100
    +    args.state.player.y ||= 100
    +    args.state.player.w ||=  50
    +    args.state.player.h ||=  50
       
    -    # you can hang anything on the audio hashes you want, so we store the
    -    #  actual screen position in here for convenience.
    -    args.audio[args.state.next_sound_index] = {
    -      input: input,
    -      screenx: screenx,
    -      screeny: screeny,
    -      x: ((screenx / 1279.0) * 2.0) - 1.0,  # scale to -1.0 - 1.0 range
    -      y: ((screeny / 719.0) * 2.0) - 1.0,   # scale to -1.0 - 1.0 range
    -      z: 0.0,
    -      gain: 1.0,
    -      pitch: 1.0,
    -      looping: true,
    -      paused: false
    -    }
    +    # render the player to the screen
    +    args.outputs.sprites << { x: args.state.player.x,
    +                              y: args.state.player.y,
    +                              w: args.state.player.w,
    +                              h: args.state.player.h,
    +                              path: 'sprites/square/green.png' }
       
    -    args.state.selected = args.state.next_sound_index
    -  end
    +    # move the player around using the keyboard
    +    if args.inputs.up
    +      args.state.player.y += 10
    +    elsif args.inputs.down
    +      args.state.player.y -= 10
    +    end
       
    -  def render_launcher args
    -    total = 6
    -    x = (1280 - (total * $boxsize * 3)) / 2
    -    y = 10
    -    args.outputs.primitives << [0, 0, 1280, ((y*2) + $boxsize), 127, 127, 127, 255].solid
    -    for i in 1..total
    -      args.outputs.primitives << [x, y, $boxsize, $boxsize, 255, 255, 255, 255].solid
    -      args.outputs.primitives << [x+8, y+28, i.to_s, 3, 0, 0, 0, 255, 255].label
    -      if args.inputs.mouse.click && args.inputs.mouse.click.point.inside_rect?([x, y, $boxsize, $boxsize])
    -        spawn_new_sound args, i
    -      end
    -      x = x + ($boxsize * 3)
    +    if args.inputs.left
    +      args.state.player.x -= 10
    +    elsif args.inputs.right
    +      args.state.player.x += 10
         end
       end
       
    -  def render_ui args
    -    render_launcher args
    -    render_panel args
    -  end
    +  $gtk.reset
    +
    +#+end_src
    +
    +*** Input Basics - Mouse - main.rb
    +#+begin_src ruby
    +  # ./samples/02_input_basics/02_mouse/app/main.rb
    +  =begin
    +  
    +  APIs that haven't been encountered in a previous sample apps:
    +  
    +  - args.inputs.mouse.click: This property will be set if the mouse was clicked.
    +  - args.inputs.mouse.click.point.(x|y): The x and y location of the mouse.
    +  - args.inputs.mouse.click.point.created_at: The frame the mouse click occurred in.
    +  - args.inputs.mouse.click.point.created_at_elapsed: How many frames have passed
    +    since the click event.
    +  
    +  Reminder:
    +  
    +  - args.state.PROPERTY: The state property on args is a dynamic
    +    structure. You can define ANY property here with ANY type of
    +    arbitrary nesting. Properties defined on args.state will be retained
    +    across frames. If you attempt access a property that doesn't exist
    +    on args.state, it will simply return nil (no exception will be thrown).
    +  
    +  =end
    +  
    +  # This code demonstrates DragonRuby mouse input
    +  
    +  # To see if the a mouse click occurred
    +  # Use args.inputs.mouse.click
    +  # Which returns a boolean
    +  
    +  # To see where a mouse click occurred
    +  # Use args.inputs.mouse.click.point.x AND
    +  # args.inputs.mouse.click.point.y
    +  
    +  # To see which frame the click occurred
    +  # Use args.inputs.mouse.click.created_at
    +  
    +  # To see how many frames its been since the click occurred
    +  # Use args.inputs.mouse.click.creat_at_elapsed
    +  
    +  # Saving the click in args.state can be quite useful
       
       def tick args
    -    args.state.mouse_held ||= 0
    -    args.state.dragging_source ||= false
    -    args.state.selected ||= 0
    -    args.state.next_sound_index ||= 0
    +    tick_instructions args, "Sample app shows how mouse events are registered and how to measure elapsed time."
    +    x = 460
       
    -    if args.inputs.mouse.up
    -      args.state.mouse_held = 0
    -      args.state.dragging_source = false
    -    elsif args.inputs.mouse.down || (args.state.mouse_held > 0)
    -      args.state.mouse_held += 1
    +    args.outputs.labels << small_label(args, x, 11, "Mouse input: args.inputs.mouse")
    +  
    +    if args.inputs.mouse.click
    +      args.state.last_mouse_click = args.inputs.mouse.click
    +    end
    +  
    +    if args.state.last_mouse_click
    +      click = args.state.last_mouse_click
    +      args.outputs.labels << small_label(args, x, 12, "Mouse click happened at: #{click.created_at}")
    +      args.outputs.labels << small_label(args, x, 13, "Mouse clicked #{click.created_at_elapsed} ticks ago")
    +      args.outputs.labels << small_label(args, x, 14, "Mouse click location: #{click.point.x}, #{click.point.y}")
         else
    +      args.outputs.labels << small_label(args, x, 12, "Mouse click has not occurred yet.")
    +      args.outputs.labels << small_label(args, x, 13, "Please click mouse.")
         end
    +  end
       
    -    args.outputs.background_color = [ 0, 0, 0, 255 ]
    -    render_sources args
    -    render_ui args
    +  def small_label args, x, row, message
    +    # This method effectively combines the row_to_px and small_font methods
    +    # It changes the given row value to a DragonRuby pixel value
    +    # and adds the customization parameters
    +    { x: x, y: row_to_px(args, row), text: message, alignment_enum: -2 }
    +  end
    +  
    +  def row_to_px args, row_number
    +    args.grid.top.shift_down(5).shift_down(20 * row_number)
    +  end
    +  
    +  def tick_instructions args, text, y = 715
    +    return if args.state.key_event_occurred
    +    if args.inputs.mouse.click ||
    +       args.inputs.keyboard.directional_vector ||
    +       args.inputs.keyboard.key_down.enter ||
    +       args.inputs.keyboard.key_down.escape
    +      args.state.key_event_occurred = true
    +    end
    +  
    +    args.outputs.debug << { x: 0,   y: y - 50, w: 1280, h: 60 }.solid!
    +    args.outputs.debug << { x: 640, y: y, text: text, size_enum: 1, alignment_enum: 1, r: 255, g: 255, b: 255 }.label!
    +    args.outputs.debug << { x: 640, y: y - 25, text: "(click to dismiss instructions)", size_enum: -2, alignment_enum: 1, r: 255, g: 255, b: 255 }.label!
       end
     
     #+end_src
     
    -*** Rendering Basics - Sound Synthesis - main.rb
    +*** Input Basics - Mouse Point To Rect - main.rb
     #+begin_src ruby
    -  # ./samples/01_rendering_basics/07_sound_synthesis/app/main.rb
    -  begin # region: top level tick methods
    -    def tick args
    -      defaults args
    -      render args
    -      input args
    -      process_audio_queue args
    -    end
    +  # ./samples/02_input_basics/03_mouse_point_to_rect/app/main.rb
    +  =begin
       
    -    def defaults args
    -      args.state.sine_waves      ||= {}
    -      args.state.square_waves    ||= {}
    -      args.state.saw_tooth_waves ||= {}
    -      args.state.triangle_waves  ||= {}
    -      args.state.audio_queue     ||= []
    -      args.state.buttons         ||= [
    -        (frequency_buttons args),
    -        (sine_wave_note_buttons args),
    -        (bell_buttons args),
    -        (square_wave_note_buttons args),
    -        (saw_tooth_wave_note_buttons args),
    -        (triangle_wave_note_buttons args),
    -      ].flatten
    -    end
    +  APIs that haven't been encountered in a previous sample apps:
       
    -    def render args
    -      args.outputs.borders << args.state.buttons.map { |b| b[:border] }
    -      args.outputs.labels  << args.state.buttons.map { |b| b[:label]  }
    -      args.outputs.labels  << args.layout
    -                                .rect(row: 0, col: 11.5)
    -                                .yield_self { |r| r.merge y: r.y + r.h }
    -                                .merge(text: "This is a Pro only feature. Click here to watch the YouTube video if you are on the Standard License.",
    -                                       alignment_enum: 1)
    -    end
    +  - args.outputus.borders: An array. Values in this array will be rendered as
    +    unfilled rectangles on the screen.
    +  - ARRAY#inside_rect?: An array with at least two values is considered a point. An array
    +    with at least four values is considered a rect. The inside_rect? function returns true
    +    or false depending on if the point is inside the rect.
       
    +    ```
    +    # Point:  x: 100, y: 100
    +    # Rect:   x: 0, y: 0, w: 500, h: 500
    +    # Result: true
       
    -    def input args
    -      args.state.buttons.each do |b|
    -        if args.inputs.mouse.click && (args.inputs.mouse.click.inside_rect? b[:rect])
    -          parameter_string = (b.slice :frequency, :note, :octave).map { |k, v| "#{k}: #{v}" }.join ", "
    -          args.gtk.notify! "#{b[:method_to_call]} #{parameter_string}"
    -          send b[:method_to_call], args, b
    -        end
    -      end
    +    [100, 100].inside_rect? [0, 0, 500, 500]
    +    ```
       
    -      if args.inputs.mouse.click && (args.inputs.mouse.click.inside_rect? (args.layout.rect(row: 0).yield_self { |r| r.merge y: r.y + r.h.half, h: r.h.half }))
    -        args.gtk.openurl 'https://www.youtube.com/watch?v=zEzovM5jT-k&ab_channel=AmirRajan'
    -      end
    -    end
    +    ```
    +    # Point:  x: 100, y: 100
    +    # Rect:   x: 300, y: 300, w: 100, h: 100
    +    # Result: false
       
    -    def process_audio_queue args
    -      to_queue = args.state.audio_queue.find_all { |v| v[:queue_at] <= args.tick_count }
    -      args.state.audio_queue -= to_queue
    -      to_queue.each { |a| args.audio[a[:id]] = a }
    +    [100, 100].inside_rect? [300, 300, 100, 100]
    +    ```
       
    -      args.audio.find_all { |k, v| v[:decay_rate] }
    -        .each     { |k, v| v[:gain] -= v[:decay_rate] }
    +  - args.inputs.mouse.click.point.created_at: The frame the mouse click occurred in.
    +  - args.inputs.mouse.click.point.created_at_elapsed: How many frames have passed
    +    since the click event.
       
    -      sounds_to_stop = args.audio
    -                         .find_all { |k, v| v[:stop_at] && args.state.tick_count >= v[:stop_at] }
    -                         .map { |k, v| k }
    +  =end
       
    -      sounds_to_stop.each { |k| args.audio.delete k }
    -    end
    -  end
    +  # To determine whether a point is in a rect
    +  # Use point.inside_rect? rect
       
    -  begin # region: button definitions, ui layout, callback functions
    -    def button args, opts
    -      button_def = opts.merge rect: (args.layout.rect (opts.merge w: 2, h: 1))
    +  # This is useful to determine if a click occurred in a rect
       
    -      button_def[:border] = button_def[:rect].merge r: 0, g: 0, b: 0
    +  def tick args
    +    tick_instructions args, "Sample app shows how to determing if a click happened inside a rectangle."
       
    -      label_offset_x = 5
    -      label_offset_y = 30
    +    x = 460
       
    -      button_def[:label]  = button_def[:rect].merge text: opts[:text],
    -                                                    size_enum: -2.5,
    -                                                    x: button_def[:rect].x + label_offset_x,
    -                                                    y: button_def[:rect].y + label_offset_y
    +    args.outputs.labels << small_label(args, x, 15, "Click inside the blue box maybe ---->")
       
    -      button_def
    +    box = { x: 785, y: 370, w: 50, h: 50, r: 0, g: 0, b: 170 }
    +    args.outputs.borders << box
    +  
    +    # Saves the most recent click into args.state
    +    # Unlike the other components of args,
    +    # args.state does not reset every tick.
    +    if args.inputs.mouse.click
    +      args.state.last_mouse_click = args.inputs.mouse.click
         end
       
    -    def play_sine_wave args, sender
    -      queue_sine_wave args,
    -                      frequency: sender[:frequency],
    -                      duration: 1.seconds,
    -                      fade_out: true
    +    if args.state.last_mouse_click
    +      if args.state.last_mouse_click.point.inside_rect? box
    +        args.outputs.labels << small_label(args, x, 16, "Mouse click happened *inside* the box.")
    +      else
    +        args.outputs.labels << small_label(args, x, 16, "Mouse click happened *outside* the box.")
    +      end
    +    else
    +      args.outputs.labels << small_label(args, x, 16, "Mouse click has not occurred yet.")
         end
    +  end
       
    -    def play_note args, sender
    -      method_to_call = :queue_sine_wave
    -      method_to_call = :queue_square_wave    if sender[:type] == :square
    -      method_to_call = :queue_saw_tooth_wave if sender[:type] == :saw_tooth
    -      method_to_call = :queue_triangle_wave  if sender[:type] == :triangle
    -      method_to_call = :queue_bell           if sender[:type] == :bell
    +  def small_label args, x, row, message
    +    { x: x, y: row_to_px(args, row), text: message, size_enum: -2 }
    +  end
       
    -      send method_to_call, args,
    -           frequency: (frequency_for note: sender[:note], octave: sender[:octave]),
    -           duration: 1.seconds,
    -           fade_out: true
    -    end
    +  def row_to_px args, row_number
    +    args.grid.top.shift_down(5).shift_down(20 * row_number)
    +  end
       
    -    def frequency_buttons args
    -      [
    -        (button args,
    -                row: 4.0, col: 0, text: "300hz",
    -                frequency: 300,
    -                method_to_call: :play_sine_wave),
    -        (button args,
    -                row: 5.0, col: 0, text: "400hz",
    -                frequency: 400,
    -                method_to_call: :play_sine_wave),
    -        (button args,
    -                row: 6.0, col: 0, text: "500hz",
    -                frequency: 500,
    -                method_to_call: :play_sine_wave),
    -      ]
    +  def tick_instructions args, text, y = 715
    +    return if args.state.key_event_occurred
    +    if args.inputs.mouse.click ||
    +       args.inputs.keyboard.directional_vector ||
    +       args.inputs.keyboard.key_down.enter ||
    +       args.inputs.keyboard.key_down.escape
    +      args.state.key_event_occurred = true
         end
       
    -    def sine_wave_note_buttons args
    -      [
    -        (button args,
    -                row: 1.5, col: 2, text: "Sine C4",
    -                note: :c, octave: 4, type: :sine, method_to_call: :play_note),
    -        (button args,
    -                row: 2.5, col: 2, text: "Sine D4",
    -                note: :d, octave: 4, type: :sine, method_to_call: :play_note),
    -        (button args,
    -                row: 3.5, col: 2, text: "Sine E4",
    -                note: :e, octave: 4, type: :sine, method_to_call: :play_note),
    -        (button args,
    -                row: 4.5, col: 2, text: "Sine F4",
    -                note: :f, octave: 4, type: :sine, method_to_call: :play_note),
    -        (button args,
    -                row: 5.5, col: 2, text: "Sine G4",
    -                note: :g, octave: 4, type: :sine, method_to_call: :play_note),
    -        (button args,
    -                row: 6.5, col: 2, text: "Sine A5",
    -                note: :a, octave: 5, type: :sine, method_to_call: :play_note),
    -        (button args,
    -                row: 7.5, col: 2, text: "Sine B5",
    -                note: :b, octave: 5, type: :sine, method_to_call: :play_note),
    -        (button args,
    -                row: 8.5, col: 2, text: "Sine C5",
    -                note: :c, octave: 5, type: :sine, method_to_call: :play_note),
    -      ]
    -    end
    -  
    -    def square_wave_note_buttons args
    -      [
    -        (button args,
    -                row: 1.5, col: 6, text: "Square C4",
    -                note: :c, octave: 4, type: :square, method_to_call: :play_note),
    -        (button args,
    -                row: 2.5, col: 6, text: "Square D4",
    -                note: :d, octave: 4, type: :square, method_to_call: :play_note),
    -        (button args,
    -                row: 3.5, col: 6, text: "Square E4",
    -                note: :e, octave: 4, type: :square, method_to_call: :play_note),
    -        (button args,
    -                row: 4.5, col: 6, text: "Square F4",
    -                note: :f, octave: 4, type: :square, method_to_call: :play_note),
    -        (button args,
    -                row: 5.5, col: 6, text: "Square G4",
    -                note: :g, octave: 4, type: :square, method_to_call: :play_note),
    -        (button args,
    -                row: 6.5, col: 6, text: "Square A5",
    -                note: :a, octave: 5, type: :square, method_to_call: :play_note),
    -        (button args,
    -                row: 7.5, col: 6, text: "Square B5",
    -                note: :b, octave: 5, type: :square, method_to_call: :play_note),
    -        (button args,
    -                row: 8.5, col: 6, text: "Square C5",
    -                note: :c, octave: 5, type: :square, method_to_call: :play_note),
    -      ]
    -    end
    -    def saw_tooth_wave_note_buttons args
    -      [
    -        (button args,
    -                row: 1.5, col: 8, text: "Saw C4",
    -                note: :c, octave: 4, type: :saw_tooth, method_to_call: :play_note),
    -        (button args,
    -                row: 2.5, col: 8, text: "Saw D4",
    -                note: :d, octave: 4, type: :saw_tooth, method_to_call: :play_note),
    -        (button args,
    -                row: 3.5, col: 8, text: "Saw E4",
    -                note: :e, octave: 4, type: :saw_tooth, method_to_call: :play_note),
    -        (button args,
    -                row: 4.5, col: 8, text: "Saw F4",
    -                note: :f, octave: 4, type: :saw_tooth, method_to_call: :play_note),
    -        (button args,
    -                row: 5.5, col: 8, text: "Saw G4",
    -                note: :g, octave: 4, type: :saw_tooth, method_to_call: :play_note),
    -        (button args,
    -                row: 6.5, col: 8, text: "Saw A5",
    -                note: :a, octave: 5, type: :saw_tooth, method_to_call: :play_note),
    -        (button args,
    -                row: 7.5, col: 8, text: "Saw B5",
    -                note: :b, octave: 5, type: :saw_tooth, method_to_call: :play_note),
    -        (button args,
    -                row: 8.5, col: 8, text: "Saw C5",
    -                note: :c, octave: 5, type: :saw_tooth, method_to_call: :play_note),
    -      ]
    -    end
    -  
    -    def triangle_wave_note_buttons args
    -      [
    -        (button args,
    -                row: 1.5, col: 10, text: "Triangle C4",
    -                note: :c, octave: 4, type: :triangle, method_to_call: :play_note),
    -        (button args,
    -                row: 2.5, col: 10, text: "Triangle D4",
    -                note: :d, octave: 4, type: :triangle, method_to_call: :play_note),
    -        (button args,
    -                row: 3.5, col: 10, text: "Triangle E4",
    -                note: :e, octave: 4, type: :triangle, method_to_call: :play_note),
    -        (button args,
    -                row: 4.5, col: 10, text: "Triangle F4",
    -                note: :f, octave: 4, type: :triangle, method_to_call: :play_note),
    -        (button args,
    -                row: 5.5, col: 10, text: "Triangle G4",
    -                note: :g, octave: 4, type: :triangle, method_to_call: :play_note),
    -        (button args,
    -                row: 6.5, col: 10, text: "Triangle A5",
    -                note: :a, octave: 5, type: :triangle, method_to_call: :play_note),
    -        (button args,
    -                row: 7.5, col: 10, text: "Triangle B5",
    -                note: :b, octave: 5, type: :triangle, method_to_call: :play_note),
    -        (button args,
    -                row: 8.5, col: 10, text: "Triangle C5",
    -                note: :c, octave: 5, type: :triangle, method_to_call: :play_note),
    -      ]
    -    end
    -  
    -    def bell_buttons args
    -      [
    -        (button args,
    -                row: 1.5, col: 4, text: "Bell C4",
    -                note: :c, octave: 4, type: :bell, method_to_call: :play_note),
    -        (button args,
    -                row: 2.5, col: 4, text: "Bell D4",
    -                note: :d, octave: 4, type: :bell, method_to_call: :play_note),
    -        (button args,
    -                row: 3.5, col: 4, text: "Bell E4",
    -                note: :e, octave: 4, type: :bell, method_to_call: :play_note),
    -        (button args,
    -                row: 4.5, col: 4, text: "Bell F4",
    -                note: :f, octave: 4, type: :bell, method_to_call: :play_note),
    -        (button args,
    -                row: 5.5, col: 4, text: "Bell G4",
    -                note: :g, octave: 4, type: :bell, method_to_call: :play_note),
    -        (button args,
    -                row: 6.5, col: 4, text: "Bell A5",
    -                note: :a, octave: 5, type: :bell, method_to_call: :play_note),
    -        (button args,
    -                row: 7.5, col: 4, text: "Bell B5",
    -                note: :b, octave: 5, type: :bell, method_to_call: :play_note),
    -        (button args,
    -                row: 8.5, col: 4, text: "Bell C5",
    -                note: :c, octave: 5, type: :bell, method_to_call: :play_note),
    -      ]
    -    end
    +    args.outputs.debug << { x: 0,   y: y - 50, w: 1280, h: 60 }.solid!
    +    args.outputs.debug << { x: 640, y: y, text: text, size_enum: 1, alignment_enum: 1, r: 255, g: 255, b: 255 }.label!
    +    args.outputs.debug << { x: 640, y: y - 25, text: "(click to dismiss instructions)", size_enum: -2, alignment_enum: 1, r: 255, g: 255, b: 255 }.label!
       end
    +
    +#+end_src
    +
    +*** Input Basics - Mouse Rect To Rect - main.rb
    +#+begin_src ruby
    +  # ./samples/02_input_basics/04_mouse_rect_to_rect/app/main.rb
    +  =begin
       
    -  begin # region: wave generation
    -    begin # sine wave
    -      def defaults_sine_wave_for
    -        { frequency: 440, sample_rate: 48000 }
    -      end
    +  APIs that haven't been encountered in a previous sample apps:
       
    -      def sine_wave_for opts = {}
    -        opts = defaults_sine_wave_for.merge opts
    -        frequency   = opts[:frequency]
    -        sample_rate = opts[:sample_rate]
    -        period_size = (sample_rate.fdiv frequency).ceil
    -        period_size.map_with_index do |i|
    -          Math::sin((2.0 * Math::PI) / (sample_rate.to_f / frequency.to_f) * i)
    -        end.to_a
    -      end
    +  - args.outputs.borders: An array. Values in this array will be rendered as
    +    unfilled rectangles on the screen.
    +  - ARRAY#intersect_rect?: An array with at least four values is
    +    considered a rect. The intersect_rect? function returns true
    +    or false depending on if the two rectangles intersect.
       
    -      def defaults_queue_sine_wave
    -        { frequency: 440, duration: 60, gain: 1.0, fade_out: false, queue_in: 0 }
    -      end
    +    ```
    +    # Rect One: x: 100, y: 100, w: 100, h: 100
    +    # Rect Two: x: 0, y: 0, w: 500, h: 500
    +    # Result:   true
       
    -      def queue_sine_wave args, opts = {}
    -        opts        = defaults_queue_sine_wave.merge opts
    -        frequency   = opts[:frequency]
    -        sample_rate = 48000
    +    [100, 100, 100, 100].intersect_rect? [0, 0, 500, 500]
    +    ```
       
    -        sine_wave = sine_wave_for frequency: frequency, sample_rate: sample_rate
    -        args.state.sine_waves[frequency] ||= sine_wave_for frequency: frequency, sample_rate: sample_rate
    +    ```
    +    # Rect One: x: 100, y: 100, w: 10, h: 10
    +    # Rect Two: x: 500, y: 500, w: 10, h: 10
    +    # Result:   false
       
    -        proc = lambda do
    -          generate_audio_data args.state.sine_waves[frequency], sample_rate
    -        end
    +    [100, 100, 10, 10].intersect_rect? [500, 500, 10, 10]
    +    ```
       
    -        audio_state = new_audio_state args, opts
    -        audio_state[:input] = [1, sample_rate, proc]
    -        queue_audio args, audio_state: audio_state, wave: sine_wave
    -      end
    -    end
    +  =end
       
    -    begin # region: square wave
    -      def defaults_square_wave_for
    -        { frequency: 440, sample_rate: 48000 }
    -      end
    +  # Similarly, whether rects intersect can be found through
    +  # rect1.intersect_rect? rect2
       
    -      def square_wave_for opts = {}
    -        opts = defaults_square_wave_for.merge opts
    -        sine_wave = sine_wave_for opts
    -        sine_wave.map do |v|
    -          if v >= 0
    -            1.0
    -          else
    -            -1.0
    -          end
    -        end.to_a
    -      end
    +  def tick args
    +    tick_instructions args, "Sample app shows how to determine if two rectangles intersect."
    +    x = 460
       
    -      def defaults_queue_square_wave
    -        { frequency: 440, duration: 60, gain: 0.3, fade_out: false, queue_in: 0 }
    -      end
    +    args.outputs.labels << small_label(args, x, 3, "Click anywhere on the screen")
    +    # red_box = [460, 250, 355, 90, 170, 0, 0]
    +    # args.outputs.borders << red_box
       
    -      def queue_square_wave args, opts = {}
    -        opts        = defaults_queue_square_wave.merge opts
    -        frequency   = opts[:frequency]
    -        sample_rate = 48000
    +    # args.state.box_collision_one and args.state.box_collision_two
    +    # Are given values of a solid when they should be rendered
    +    # They are stored in game so that they do not get reset every tick
    +    if args.inputs.mouse.click
    +      if !args.state.box_collision_one
    +        args.state.box_collision_one = { x: args.inputs.mouse.click.point.x - 25,
    +                                         y: args.inputs.mouse.click.point.y - 25,
    +                                         w: 125, h: 125,
    +                                         r: 180, g: 0, b: 0, a: 180 }
    +      elsif !args.state.box_collision_two
    +        args.state.box_collision_two = { x: args.inputs.mouse.click.point.x - 25,
    +                                         y: args.inputs.mouse.click.point.y - 25,
    +                                         w: 125, h: 125,
    +                                         r: 0, g: 0, b: 180, a: 180 }
    +      else
    +        args.state.box_collision_one = nil
    +        args.state.box_collision_two = nil
    +      end
    +    end
       
    -        square_wave = square_wave_for frequency: frequency, sample_rate: sample_rate
    -        args.state.square_waves[frequency] ||= square_wave_for frequency: frequency, sample_rate: sample_rate
    +    if args.state.box_collision_one
    +      args.outputs.solids << args.state.box_collision_one
    +    end
       
    -        proc = lambda do
    -          generate_audio_data args.state.square_waves[frequency], sample_rate
    -        end
    +    if args.state.box_collision_two
    +      args.outputs.solids << args.state.box_collision_two
    +    end
       
    -        audio_state = new_audio_state args, opts
    -        audio_state[:input] = [1, sample_rate, proc]
    -        queue_audio args, audio_state: audio_state, wave: square_wave
    +    if args.state.box_collision_one && args.state.box_collision_two
    +      if args.state.box_collision_one.intersect_rect? args.state.box_collision_two
    +        args.outputs.labels << small_label(args, x, 4, 'The boxes intersect.')
    +      else
    +        args.outputs.labels << small_label(args, x, 4, 'The boxes do not intersect.')
           end
    +    else
    +      args.outputs.labels << small_label(args, x, 4, '--')
         end
    +  end
       
    -    begin # region: saw tooth wave
    -      def defaults_saw_tooth_wave_for
    -        { frequency: 440, sample_rate: 48000 }
    -      end
    +  def small_label args, x, row, message
    +    { x: x, y: row_to_px(args, row), text: message, size_enum: -2 }
    +  end
       
    -      def saw_tooth_wave_for opts = {}
    -        opts = defaults_saw_tooth_wave_for.merge opts
    -        sine_wave = sine_wave_for opts
    -        period_size = sine_wave.length
    -        sine_wave.map_with_index do |v, i|
    -          (((i % period_size).fdiv period_size) * 2) - 1
    -        end
    -      end
    +  def row_to_px args, row_number
    +    args.grid.top - 5 - (20 * row_number)
    +  end
       
    -      def defaults_queue_saw_tooth_wave
    -        { frequency: 440, duration: 60, gain: 0.3, fade_out: false, queue_in: 0 }
    -      end
    +  def tick_instructions args, text, y = 715
    +    return if args.state.key_event_occurred
    +    if args.inputs.mouse.click ||
    +       args.inputs.keyboard.directional_vector ||
    +       args.inputs.keyboard.key_down.enter ||
    +       args.inputs.keyboard.key_down.escape
    +      args.state.key_event_occurred = true
    +    end
       
    -      def queue_saw_tooth_wave args, opts = {}
    -        opts        = defaults_queue_saw_tooth_wave.merge opts
    -        frequency   = opts[:frequency]
    -        sample_rate = 48000
    +    args.outputs.debug << [0, y - 50, 1280, 60].solid
    +    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label
    +    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label
    +  end
    +
    +#+end_src
    +
    +*** Input Basics - Controller - main.rb
    +#+begin_src ruby
    +  # ./samples/02_input_basics/05_controller/app/main.rb
    +  =begin
       
    -        saw_tooth_wave = saw_tooth_wave_for frequency: frequency, sample_rate: sample_rate
    -        args.state.saw_tooth_waves[frequency] ||= saw_tooth_wave_for frequency: frequency, sample_rate: sample_rate
    +   APIs listing that haven't been encountered in previous sample apps:
       
    -        proc = lambda do
    -          generate_audio_data args.state.saw_tooth_waves[frequency], sample_rate
    -        end
    +   - args.inputs.controller_one.key_held.KEY: Will check to see if a specific key
    +     is being held down on the controller.
    +     If there is more than one controller being used, they can be differentiated by
    +     using names like controller_one and controller_two.
       
    -        audio_state = new_audio_state args, opts
    -        audio_state[:input] = [1, sample_rate, proc]
    -        queue_audio args, audio_state: audio_state, wave: saw_tooth_wave
    -      end
    -    end
    +     For a full listing of buttons, take a look at mygame/documentation/08-controllers.md.
       
    -    begin # region: triangle wave
    -      def defaults_triangle_wave_for
    -        { frequency: 440, sample_rate: 48000 }
    -      end
    +   Reminder:
       
    -      def triangle_wave_for opts = {}
    -        opts = defaults_saw_tooth_wave_for.merge opts
    -        sine_wave = sine_wave_for opts
    -        period_size = sine_wave.length
    -        sine_wave.map_with_index do |v, i|
    -          ratio = (i.fdiv period_size)
    -          if ratio <= 0.5
    -            (ratio * 4) - 1
    -          else
    -            ratio -= 0.5
    -            1 - (ratio * 4)
    -          end
    -        end
    -      end
    +   - args.state.PROPERTY: The state property on args is a dynamic
    +     structure. You can define ANY property here with ANY type of
    +     arbitrary nesting. Properties defined on args.state will be retained
    +     across frames. If you attempt to access a property that doesn't exist
    +     on args.state, it will simply return nil (no exception will be thrown).
       
    -      def defaults_queue_triangle_wave
    -        { frequency: 440, duration: 60, gain: 1.0, fade_out: false, queue_in: 0 }
    -      end
    +     In this sample app, args.state.BUTTONS is an array that stores the buttons of the controller.
    +     The parameters of a button are:
    +     1. the position (x, y)
    +     2. the input key held on the controller
    +     3. the text or name of the button
       
    -      def queue_triangle_wave args, opts = {}
    -        opts        = defaults_queue_triangle_wave.merge opts
    -        frequency   = opts[:frequency]
    -        sample_rate = 48000
    +  =end
       
    -        triangle_wave = triangle_wave_for frequency: frequency, sample_rate: sample_rate
    -        args.state.triangle_waves[frequency] ||= triangle_wave_for frequency: frequency, sample_rate: sample_rate
    +  # This sample app provides a visual demonstration of a standard controller, including
    +  # the placement and function of all buttons.
       
    -        proc = lambda do
    -          generate_audio_data args.state.triangle_waves[frequency], sample_rate
    -        end
    +  class ControllerDemo
    +    attr_accessor :inputs, :state, :outputs
       
    -        audio_state = new_audio_state args, opts
    -        audio_state[:input] = [1, sample_rate, proc]
    -        queue_audio args, audio_state: audio_state, wave: triangle_wave
    -      end
    +    # Calls the methods necessary for the app to run successfully.
    +    def tick
    +      process_inputs
    +      render
         end
       
    -    begin # region: bell
    -      def defaults_queue_bell
    -        { frequency: 440, duration: 1.seconds, queue_in: 0 }
    -      end
    -  
    -      def queue_bell args, opts = {}
    -        (bell_to_sine_waves (defaults_queue_bell.merge opts)).each { |b| queue_sine_wave args, b }
    -      end
    +    # Starts with an empty collection of buttons.
    +    # Adds buttons that are on the controller to the collection.
    +    def process_inputs
    +      state.buttons = []
       
    -      def bell_harmonics
    -        [
    -          { frequency_ratio: 0.5, duration_ratio: 1.00 },
    -          { frequency_ratio: 1.0, duration_ratio: 0.80 },
    -          { frequency_ratio: 2.0, duration_ratio: 0.60 },
    -          { frequency_ratio: 3.0, duration_ratio: 0.40 },
    -          { frequency_ratio: 4.2, duration_ratio: 0.25 },
    -          { frequency_ratio: 5.4, duration_ratio: 0.20 },
    -          { frequency_ratio: 6.8, duration_ratio: 0.15 }
    -        ]
    -      end
    +      state.buttons << { x: 100,  y: 500, active: inputs.controller_one.key_held.l1, text: "L1"}
    +      state.buttons << { x: 100,  y: 600, active: inputs.controller_one.key_held.l2, text: "L2"}
    +      state.buttons << { x: 1100, y: 500, active: inputs.controller_one.key_held.r1, text: "R1"}
    +      state.buttons << { x: 1100, y: 600, active: inputs.controller_one.key_held.r2, text: "R2"}
    +      state.buttons << { x: 540,  y: 450, active: inputs.controller_one.key_held.select, text: "Select"}
    +      state.buttons << { x: 660,  y: 450, active: inputs.controller_one.key_held.start, text: "Start"}
    +      state.buttons << { x: 200,  y: 300, active: inputs.controller_one.key_held.left, text: "Left"}
    +      state.buttons << { x: 300,  y: 400, active: inputs.controller_one.key_held.up, text: "Up"}
    +      state.buttons << { x: 400,  y: 300, active: inputs.controller_one.key_held.right, text: "Right"}
    +      state.buttons << { x: 300,  y: 200, active: inputs.controller_one.key_held.down, text: "Down"}
    +      state.buttons << { x: 800,  y: 300, active: inputs.controller_one.key_held.x, text: "X"}
    +      state.buttons << { x: 900,  y: 400, active: inputs.controller_one.key_held.y, text: "Y"}
    +      state.buttons << { x: 1000, y: 300, active: inputs.controller_one.key_held.a, text: "A"}
    +      state.buttons << { x: 900,  y: 200, active: inputs.controller_one.key_held.b, text: "B"}
    +      state.buttons << { x: 450 + inputs.controller_one.left_analog_x_perc * 100,
    +                         y: 100 + inputs.controller_one.left_analog_y_perc * 100,
    +                         active: inputs.controller_one.key_held.l3,
    +                         text: "L3" }
    +      state.buttons << { x: 750 + inputs.controller_one.right_analog_x_perc * 100,
    +                         y: 100 + inputs.controller_one.right_analog_y_perc * 100,
    +                         active: inputs.controller_one.key_held.r3,
    +                         text: "R3" }
    +    end
       
    -      def defaults_bell_to_sine_waves
    -        { frequency: 440, duration: 1.seconds, queue_in: 0 }
    -      end
    +    # Gives each button a square shape.
    +    # If the button is being pressed or held (which means it is considered active),
    +    # the square is filled in. Otherwise, the button simply has a border.
    +    def render
    +      state.buttons.each do |b|
    +        rect = { x: b.x, y: b.y, w: 75, h: 75 }
       
    -      def bell_to_sine_waves opts = {}
    -        opts = defaults_bell_to_sine_waves.merge opts
    -        bell_harmonics.map do |b|
    -          {
    -            frequency: opts[:frequency] * b[:frequency_ratio],
    -            duration:  opts[:duration] * b[:duration_ratio],
    -            queue_in:  opts[:queue_in],
    -            gain:      (1.fdiv bell_harmonics.length),
    -            fade_out:  true
    -          }
    +        if b.active # if button is pressed
    +          outputs.solids << rect # rect is output as solid (filled in)
    +        else
    +          outputs.borders << rect # otherwise, output as border
             end
    -      end
    -    end
       
    -    begin # audio entity construction
    -      def generate_audio_data sine_wave, sample_rate
    -        sample_size = (sample_rate.fdiv (1000.fdiv 60)).ceil
    -        copy_count  = (sample_size.fdiv sine_wave.length).ceil
    -        sine_wave * copy_count
    +        # Outputs the text of each button using labels.
    +        outputs.labels << { x: b.x, y: b.y + 95, text: b.text } # add 95 to place label above button
           end
       
    -      def defaults_new_audio_state
    -        { frequency: 440, duration: 60, gain: 1.0, fade_out: false, queue_in: 0 }
    -      end
    +      outputs.labels << { x:  10, y: 60, text: "Left Analog x: #{inputs.controller_one.left_analog_x_raw} (#{inputs.controller_one.left_analog_x_perc * 100}%)" }
    +      outputs.labels << { x:  10, y: 30, text: "Left Analog y: #{inputs.controller_one.left_analog_y_raw} (#{inputs.controller_one.left_analog_y_perc * 100}%)" }
    +      outputs.labels << { x: 900, y: 60, text: "Right Analog x: #{inputs.controller_one.right_analog_x_raw} (#{inputs.controller_one.right_analog_x_perc * 100}%)" }
    +      outputs.labels << { x: 900, y: 30, text: "Right Analog y: #{inputs.controller_one.right_analog_y_raw} (#{inputs.controller_one.right_analog_y_perc * 100}%)" }
    +    end
    +  end
       
    -      def new_audio_state args, opts = {}
    -        opts        = defaults_new_audio_state.merge opts
    -        decay_rate  = 0
    -        decay_rate  = 1.fdiv(opts[:duration]) * opts[:gain] if opts[:fade_out]
    -        frequency   = opts[:frequency]
    -        sample_rate = 48000
    +  $controller_demo = ControllerDemo.new
       
    -        {
    -          id:               (new_id! args),
    -          frequency:        frequency,
    -          sample_rate:      48000,
    -          stop_at:          args.tick_count + opts[:queue_in] + opts[:duration],
    -          gain:             opts[:gain].to_f,
    -          queue_at:         args.state.tick_count + opts[:queue_in],
    -          decay_rate:       decay_rate,
    -          pitch:            1.0,
    -          looping:          true,
    -          paused:           false
    -        }
    -      end
    +  def tick args
    +    tick_instructions args, "Sample app shows how controller input is handled. You'll need to connect a USB controller."
    +    $controller_demo.inputs = args.inputs
    +    $controller_demo.state = args.state
    +    $controller_demo.outputs = args.outputs
    +    $controller_demo.tick
    +  end
       
    -      def queue_audio args, opts = {}
    -        graph_wave args, opts[:wave], opts[:audio_state][:frequency]
    -        args.state.audio_queue << opts[:audio_state]
    -      end
    +  # Resets the app.
    +  def r
    +    $gtk.reset
    +  end
       
    -      def new_id! args
    -        args.state.audio_id ||= 0
    -        args.state.audio_id  += 1
    -      end
    +  def tick_instructions args, text, y = 715
    +    return if args.state.key_event_occurred
    +    if args.inputs.mouse.click ||
    +       args.inputs.keyboard.directional_vector ||
    +       args.inputs.keyboard.key_down.enter ||
    +       args.inputs.keyboard.key_down.escape
    +      args.state.key_event_occurred = true
    +    end
       
    -      def graph_wave args, wave, frequency
    -        if args.state.tick_count != args.state.graphed_at
    -          args.outputs.static_lines.clear
    -          args.outputs.static_sprites.clear
    -        end
    +    args.outputs.debug << [0, y - 50, 1280, 60].solid
    +    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label
    +    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label
    +  end
    +
    +#+end_src
    +
    +*** Input Basics - Touch - main.rb
    +#+begin_src ruby
    +  # ./samples/02_input_basics/06_touch/app/main.rb
    +  def tick args
    +    args.outputs.background_color = [ 0, 0, 0 ]
    +    args.outputs.primitives << [640, 700, "Touch your screen.", 5, 1, 255, 255, 255].label
       
    -        wave = wave
    +    # If you don't want to get fancy, you can just look for finger_one
    +    #  (and _two, if you like), which are assigned in the order new touches hit
    +    #  the screen. If not nil, they are touching right now, and are just
    +    #  references to specific items in the args.input.touch hash.
    +    # If finger_one lifts off, it will become nil, but finger_two, if it was
    +    #  touching, remains until it also lifts off. When all fingers lift off, the
    +    #  the next new touch will be finger_one again, but until then, new touches
    +    #  don't fill in earlier slots.
    +    if !args.inputs.finger_one.nil?
    +      args.outputs.primitives << { x: 640, y: 650, text: "Finger #1 is touching at (#{args.inputs.finger_one.x}, #{args.inputs.finger_one.y}).",
    +                                   size_enum: 5, alignment_enum: 1, r: 255, g: 255, b: 255 }.label!
    +    end
    +    if !args.inputs.finger_two.nil?
    +      args.outputs.primitives << { x: 640, y: 600, text: "Finger #2 is touching at (#{args.inputs.finger_two.x}, #{args.inputs.finger_two.y}).",
    +                                   size_enum: 5, alignment_enum: 1, r: 255, g: 255, b: 255 }.label!
    +    end
       
    -        r, g, b = frequency.to_i % 85,
    -                  frequency.to_i % 170,
    -                  frequency.to_i % 255
    +    # Here's the more flexible interface: this will report as many simultaneous
    +    #  touches as the system can handle, but it's a little more effort to track
    +    #  them. Each item in the args.input.touch hash has a unique key (an
    +    #  incrementing integer) that exists until the finger lifts off. You can
    +    #  tell which order the touches happened globally by the key value, or
    +    #  by the touch[id].touch_order field, which resets to zero each time all
    +    #  touches have lifted.
       
    -        starting_rect = args.layout.rect(row: 5, col: 13)
    -        x_scale    = 10
    -        y_scale    = 100
    -        max_points = 25
    +    args.state.colors ||= [
    +      0xFF0000, 0x00FF00, 0x1010FF, 0xFFFF00, 0xFF00FF, 0x00FFFF, 0xFFFFFF
    +    ]
       
    -        points = wave
    -        if wave.length > max_points
    -          resolution = wave.length.idiv max_points
    -          points = wave.find_all.with_index { |y, i| (i % resolution == 0) }
    -        end
    -  
    -        args.outputs.static_lines << points.map_with_index do |y, x|
    -          next_y = points[x + 1]
    -  
    -          if next_y
    -            {
    -              x:  starting_rect.x + (x * x_scale),
    -              y:  starting_rect.y + starting_rect.h.half + y_scale * y,
    -              x2: starting_rect.x + ((x + 1) * x_scale),
    -              y2: starting_rect.y + starting_rect.h.half + y_scale * next_y,
    -              r:  r,
    -              g:  g,
    -              b:  b
    -            }
    -          end
    -        end
    -  
    -        args.outputs.static_sprites << points.map_with_index do |y, x|
    -          {
    -            x:  (starting_rect.x + (x * x_scale)) - 2,
    -            y:  (starting_rect.y + starting_rect.h.half + y_scale * y) - 2,
    -            w:  4,
    -            h:  4,
    -            path: 'sprites/square-white.png',
    -            r: r,
    -            g: g,
    -            b: b
    -          }
    -        end
    -  
    -        args.state.graphed_at = args.state.tick_count
    -      end
    -    end
    -  
    -    begin # region: musical note mapping
    -      def defaults_frequency_for
    -        { note: :a, octave: 5, sharp:  false, flat:   false }
    -      end
    -  
    -      def frequency_for opts = {}
    -        opts = defaults_frequency_for.merge opts
    -        octave_offset_multiplier  = opts[:octave] - 5
    -        note = note_frequencies_octave_5[opts[:note]]
    -        if octave_offset_multiplier < 0
    -          note = note * 1 / (octave_offset_multiplier.abs + 1)
    -        elsif octave_offset_multiplier > 0
    -          note = note * (octave_offset_multiplier.abs + 1) / 1
    -        end
    -        note
    -      end
    -  
    -      def note_frequencies_octave_5
    -        {
    -          a: 440.0,
    -          a_sharp: 466.16, b_flat: 466.16,
    -          b: 493.88,
    -          c: 523.25,
    -          c_sharp: 554.37, d_flat: 587.33,
    -          d: 587.33,
    -          d_sharp: 622.25, e_flat: 659.25,
    -          e: 659.25,
    -          f: 698.25,
    -          f_sharp: 739.99, g_flat: 739.99,
    -          g: 783.99,
    -          g_sharp: 830.61, a_flat: 830.61
    -        }
    -      end
    -    end
    +    size = 100
    +    args.inputs.touch.each { |k,v|
    +      color = args.state.colors[v.touch_order % 7]
    +      r = (color & 0xFF0000) >> 16
    +      g = (color & 0x00FF00) >> 8
    +      b = (color & 0x0000FF)
    +      args.outputs.primitives << { x: v.x - (size / 2), y: v.y + (size / 2), w: size, h: size, r: r, g: g, b: b, a: 255 }.solid!
    +      args.outputs.primitives << { x: v.x, y: v.y + size, text: k.to_s, alignment_enum: 1 }.label!
    +    }
       end
    -  
    -  $gtk.reset
     
     #+end_src
     
    -*** Input Basics - Keyboard - main.rb
    +*** Rendering Sprites - Animation Using Separate Pngs - main.rb
     #+begin_src ruby
    -  # ./samples/02_input_basics/01_keyboard/app/main.rb
    +  # ./samples/03_rendering_sprites/01_animation_using_separate_pngs/app/main.rb
       =begin
       
    -  APIs listing that haven't been encountered in a previous sample apps:
    +   Reminders:
       
    -  - args.inputs.keyboard.key_up.KEY: The value of the properties will be set
    -    to the frame  that the key_up event occurred (the frame correlates
    -    to args.state.tick_count). Otherwise the value will be nil. For a
    -    full listing of keys, take a look at mygame/documentation/06-keyboard.md.
    -  - args.state.PROPERTY: The state property on args is a dynamic
    -    structure. You can define ANY property here with ANY type of
    -    arbitrary nesting. Properties defined on args.state will be retained
    -    across frames. If you attempt access a property that doesn't exist
    -    on args.state, it will simply return nil (no exception will be thrown).
    +   - String interpolation: Uses #{} syntax; everything between the #{ and the } is evaluated
    +     as Ruby code, and the placeholder is replaced with its corresponding value or result.
       
    -  =end
    +     In this sample app, we're using string interpolation to iterate through images in the
    +     sprites folder using their image path names.
       
    -  # Along with outputs, inputs are also an essential part of video game development
    -  # DragonRuby can take input from keyboards, mouse, and controllers.
    -  # This sample app will cover keyboard input.
    +   - args.outputs.sprites: An array. Values in this array generate sprites on the screen.
    +     The parameters are [X, Y, WIDTH, HEIGHT, IMAGE PATH]
    +     For more information about sprites, go to mygame/documentation/05-sprites.md.
       
    -  # args.inputs.keyboard.key_up.a will check to see if the a key has been pressed
    -  # This will work with the other keys as well
    +   - args.outputs.labels: An array. Values in the array generate labels on the screen.
    +     The parameters are [X, Y, TEXT, SIZE, ALIGNMENT, RED, GREEN, BLUE, ALPHA, FONT STYLE]
    +     For more information about labels, go to mygame/documentation/02-labels.md.
       
    +   - args.inputs.keyboard.key_down.KEY: Determines if a key is in the down state, or pressed.
    +     Stores the frame that key was pressed on.
    +     For more information about the keyboard, go to mygame/documentation/06-keyboard.md.
    +  
    +  =end
    +  
    +  # This sample app demonstrates how sprite animations work.
    +  # There are two sprites that animate forever and one sprite
    +  # that *only* animates when you press the "f" key on the keyboard.
       
    +  # This is the entry point to your game. The `tick` method
    +  # executes at 60 frames per second. There are two methods
    +  # in this tick "entry point": `looping_animation`, and the
    +  # second method is `one_time_animation`.
       def tick args
    -    tick_instructions args, "Sample app shows how keyboard events are registered and accessed.", 360
    -    # Notice how small_font accounts for all the remaining parameters
    -    args.outputs.labels << [460, row_to_px(args, 0), "Current game time: #{args.state.tick_count}", small_font]
    -    args.outputs.labels << [460, row_to_px(args, 2), "Keyboard input: args.inputs.keyboard.key_up.h", small_font]
    -    args.outputs.labels << [460, row_to_px(args, 3), "Press \"h\" on the keyboard.", small_font]
    +    # uncomment the line below to see animation play out in slow motion
    +    # args.gtk.slowmo! 6
    +    looping_animation args
    +    one_time_animation args
    +  end
       
    -    # Input on a specifc key can be found through args.inputs.keyboard.key_up followed by the key
    -    if args.inputs.keyboard.key_up.h
    -      args.state.h_pressed_at = args.state.tick_count
    -    end
    +  # This function shows how to animate a sprite that loops forever.
    +  def looping_animation args
    +    # Here we define a few local variables that will be sent
    +    # into the magic function that gives us the correct sprite image
    +    # over time. There are four things we need in order to figure
    +    # out which sprite to show.
       
    -    # This code simplifies to if args.state.h_pressed_at has not been initialized, set it to false
    -    args.state.h_pressed_at ||= false
    +    # 1. When to start the animation.
    +    start_looping_at = 0
       
    -    if args.state.h_pressed_at
    -      args.outputs.labels << [460, row_to_px(args, 4), "\"h\" was pressed at time: #{args.state.h_pressed_at}", small_font]
    -    else
    -      args.outputs.labels << [460, row_to_px(args, 4), "\"h\" has never been pressed.", small_font]
    -    end
    +    # 2. The number of pngs that represent the full animation.
    +    number_of_sprites = 6
       
    -    tick_help_text args
    -  end
    +    # 3. How long to show each png.
    +    number_of_frames_to_show_each_sprite = 4
       
    -  def small_font
    -    # This method provides some values for the construction of labels
    -    # Specifically, Size, Alignment, & RGBA
    -    # This makes it so that custom parameters don't have to be repeatedly typed.
    -    # Additionally "small_font" provides programmers with more information than some numbers
    -    [-2, 0, 0, 0, 0, 255]
    -  end
    +    # 4. Whether the animation should loop once, or forever.
    +    does_sprite_loop = true
       
    -  def row_to_px args, row_number
    -    # This takes a row_number and converts it to pixels DragonRuby understands.
    -    # Row 0 starts 5 units below the top of the grid
    -    # Each row afterward is 20 units lower
    -    args.grid.top.shift_down(5).shift_down(20 * row_number)
    -  end
    +    # With the variables defined above, we can get a number
    +    # which represents the sprite to show by calling the `frame_index` function.
    +    # In this case the number will be between 0, and 5 (you can see the sprites
    +    # in the ./sprites directory).
    +    sprite_index = start_looping_at.frame_index number_of_sprites,
    +                                                number_of_frames_to_show_each_sprite,
    +                                                does_sprite_loop
       
    -  # Don't worry about understanding the code within this method just yet.
    -  # This method shows you the help text within the game.
    -  def tick_help_text args
    -    return unless args.state.h_pressed_at
    +    # Now that we have `sprite_index, we can present the correct file.
    +    args.outputs.sprites << { x: 100, y: 100, w: 100, h: 100, path: "sprites/dragon_fly_#{sprite_index}.png" }
       
    -    args.state.key_value_history      ||= {}
    -    args.state.key_down_value_history ||= {}
    -    args.state.key_held_value_history ||= {}
    -    args.state.key_up_value_history   ||= {}
    +    # Try changing the numbers below to see how the animation changes:
    +    args.outputs.sprites << { x: 100, y: 200, w: 100, h: 100, path: "sprites/dragon_fly_#{0.frame_index 6, 4, true}.png" }
    +  end
       
    -    if (args.inputs.keyboard.key_down.truthy_keys.length > 0 ||
    -        args.inputs.keyboard.key_held.truthy_keys.length > 0 ||
    -        args.inputs.keyboard.key_up.truthy_keys.length > 0)
    -      args.state.help_available = true
    -      args.state.no_activity_debounce = nil
    -    else
    -      args.state.no_activity_debounce ||= 5.seconds
    -      args.state.no_activity_debounce -= 1
    -      if args.state.no_activity_debounce <= 0
    -        args.state.help_available = false
    -        args.state.key_value_history        = {}
    -        args.state.key_down_value_history   = {}
    -        args.state.key_held_value_history   = {}
    -        args.state.key_up_value_history     = {}
    -      end
    -    end
    +  # This function shows how to animate a sprite that executes
    +  # only once when the "f" key is pressed.
    +  def one_time_animation args
    +    # This is just a label the shows instructions within the game.
    +    args.outputs.labels <<  { x: 220, y: 350, text: "(press f to animate)" }
       
    -    args.outputs.labels << [10, row_to_px(args, 6), "Advanced Help:", small_font]
    +    # If "f" is pressed on the keyboard...
    +    if args.inputs.keyboard.key_down.f
    +      # Print the frame that "f" was pressed on.
    +      puts "Hello from main.rb! The \"f\" key was in the down state on frame: #{args.state.tick_count}"
       
    -    if !args.state.help_available
    -      args.outputs.labels << [10, row_to_px(args, 7),  "Press a key and I'll show code to access the key and what value will be returned if you used the code.", small_font]
    -      return
    +      # And MOST IMPORTANTLY set the point it time to start the animation,
    +      # equal to "now" which is represented as args.state.tick_count.
    +  
    +      # Also IMPORTANT, you'll notice that the value of when to start looping
    +      # is stored in `args.state`. This construct's values are retained across
    +      # executions of the `tick` method.
    +      args.state.start_looping_at = args.state.tick_count
         end
       
    -    args.outputs.labels << [10 , row_to_px(args, 7), "args.inputs.keyboard", small_font]
    -    args.outputs.labels << [330, row_to_px(args, 7), "args.inputs.keyboard.key_down", small_font]
    -    args.outputs.labels << [650, row_to_px(args, 7), "args.inputs.keyboard.key_held", small_font]
    -    args.outputs.labels << [990, row_to_px(args, 7), "args.inputs.keyboard.key_up", small_font]
    +    # These are the same local variables that were defined
    +    # for the `looping_animation` function.
    +    number_of_sprites = 6
    +    number_of_frames_to_show_each_sprite = 4
       
    -    fill_history args, :key_value_history,      :down_or_held, nil
    -    fill_history args, :key_down_value_history, :down,        :key_down
    -    fill_history args, :key_held_value_history, :held,        :key_held
    -    fill_history args, :key_up_value_history,   :up,          :key_up
    +    # Except this sprite does not loop again. If the animation time has passed,
    +    # then the frame_index function returns nil.
    +    does_sprite_loop = false
       
    -    render_help_labels args, :key_value_history,      :down_or_held, nil,      10
    -    render_help_labels args, :key_down_value_history, :down,        :key_down, 330
    -    render_help_labels args, :key_held_value_history, :held,        :key_held, 650
    -    render_help_labels args, :key_up_value_history,   :up,          :key_up,   990
    -  end
    +    sprite_index = args.state
    +                       .start_looping_at
    +                       .frame_index number_of_sprites,
    +                                    number_of_frames_to_show_each_sprite,
    +                                    does_sprite_loop
       
    -  def fill_history args, history_key, state_key, keyboard_method
    -    fill_single_history args, history_key, state_key, keyboard_method, :raw_key
    -    fill_single_history args, history_key, state_key, keyboard_method, :char
    -    args.inputs.keyboard.keys[state_key].each do |key_name|
    -      fill_single_history args, history_key, state_key, keyboard_method, key_name
    -    end
    -  end
    +    # This line sets the frame index to zero, if
    +    # the animation duration has passed (frame_index returned nil).
       
    -  def fill_single_history args, history_key, state_key, keyboard_method, key_name
    -    current_value = args.inputs.keyboard.send(key_name)
    -    if keyboard_method
    -      current_value = args.inputs.keyboard.send(keyboard_method).send(key_name)
    -    end
    -    args.state.as_hash[history_key][key_name] ||= []
    -    args.state.as_hash[history_key][key_name] << current_value
    -    args.state.as_hash[history_key][key_name] = args.state.as_hash[history_key][key_name].reverse.uniq.take(3).reverse
    -  end
    +    # Remeber: we are not looping forever here.
    +    sprite_index ||= 0
       
    -  def render_help_labels args, history_key, state_key, keyboard_method, x
    -    idx = 8
    -    args.outputs.labels << args.state
    -                             .as_hash[history_key]
    -                             .keys
    -                             .reverse
    -                             .map
    -                             .with_index do |k, i|
    -      v = args.state.as_hash[history_key][k]
    -      current_value = args.inputs.keyboard.send(k)
    -      if keyboard_method
    -        current_value = args.inputs.keyboard.send(keyboard_method).send(k)
    -      end
    -      idx += 2
    -      [
    -        [x, row_to_px(args, idx - 2),
    -         "    .#{k} is #{current_value || "nil"}",
    -         small_font],
    -        [x, row_to_px(args, idx - 1),
    -         "       was #{v}",
    -         small_font]
    -      ]
    -    end
    -  end
    +    # Present the sprite.
    +    args.outputs.sprites << { x: 100, y: 300, w: 100, h: 100, path: "sprites/dragon_fly_#{sprite_index}.png" }
       
    +    tick_instructions args, "Sample app shows how to use Numeric#frame_index and string interpolation to animate a sprite over time."
    +  end
       
       def tick_instructions args, text, y = 715
         return if args.state.key_event_occurred
    @@ -4772,597 +4762,627 @@ Follows is a source code listing for all files that have been open sourced. This
     
     #+end_src
     
    -*** Input Basics - Mouse - main.rb
    +*** Rendering Sprites - Animation Using Sprite Sheet - main.rb
     #+begin_src ruby
    -  # ./samples/02_input_basics/02_mouse/app/main.rb
    -  =begin
    -  
    -  APIs that haven't been encountered in a previous sample apps:
    -  
    -  - args.inputs.mouse.click: This property will be set if the mouse was clicked.
    -  - args.inputs.mouse.click.point.(x|y): The x and y location of the mouse.
    -  - args.inputs.mouse.click.point.created_at: The frame the mouse click occurred in.
    -  - args.inputs.mouse.click.point.created_at_elapsed: How many frames have passed
    -    since the click event.
    -  
    -  Reminder:
    -  
    -  - args.state.PROPERTY: The state property on args is a dynamic
    -    structure. You can define ANY property here with ANY type of
    -    arbitrary nesting. Properties defined on args.state will be retained
    -    across frames. If you attempt access a property that doesn't exist
    -    on args.state, it will simply return nil (no exception will be thrown).
    -  
    -  =end
    -  
    -  # This code demonstrates DragonRuby mouse input
    -  
    -  # To see if the a mouse click occurred
    -  # Use args.inputs.mouse.click
    -  # Which returns a boolean
    -  
    -  # To see where a mouse click occurred
    -  # Use args.inputs.mouse.click.point.x AND
    -  # args.inputs.mouse.click.point.y
    +  # ./samples/03_rendering_sprites/02_animation_using_sprite_sheet/app/main.rb
    +  def tick args
    +    args.state.player.x ||= 100
    +    args.state.player.y ||= 100
    +    args.state.player.w ||= 64
    +    args.state.player.h ||= 64
    +    args.state.player.direction ||= 1
       
    -  # To see which frame the click occurred
    -  # Use args.inputs.mouse.click.created_at
    +    args.state.player.is_moving = false
       
    -  # To see how many frames its been since the click occurred
    -  # Use args.inputs.mouse.click.creat_at_elapsed
    +    # get the keyboard input and set player properties
    +    if args.inputs.keyboard.right
    +      args.state.player.x += 3
    +      args.state.player.direction = 1
    +      args.state.player.started_running_at ||= args.state.tick_count
    +    elsif args.inputs.keyboard.left
    +      args.state.player.x -= 3
    +      args.state.player.direction = -1
    +      args.state.player.started_running_at ||= args.state.tick_count
    +    end
       
    -  # Saving the click in args.state can be quite useful
    +    if args.inputs.keyboard.up
    +      args.state.player.y += 1
    +      args.state.player.started_running_at ||= args.state.tick_count
    +    elsif args.inputs.keyboard.down
    +      args.state.player.y -= 1
    +      args.state.player.started_running_at ||= args.state.tick_count
    +    end
       
    -  def tick args
    -    tick_instructions args, "Sample app shows how mouse events are registered and how to measure elapsed time."
    -    x = 460
    +    # if no arrow keys are being pressed, set the player as not moving
    +    if !args.inputs.keyboard.directional_vector
    +      args.state.player.started_running_at = nil
    +    end
       
    -    args.outputs.labels << small_label(args, x, 11, "Mouse input: args.inputs.mouse")
    +    # wrap player around the stage
    +    if args.state.player.x > 1280
    +      args.state.player.x = -64
    +      args.state.player.started_running_at ||= args.state.tick_count
    +    elsif args.state.player.x < -64
    +      args.state.player.x = 1280
    +      args.state.player.started_running_at ||= args.state.tick_count
    +    end
       
    -    if args.inputs.mouse.click
    -      args.state.last_mouse_click = args.inputs.mouse.click
    +    if args.state.player.y > 720
    +      args.state.player.y = -64
    +      args.state.player.started_running_at ||= args.state.tick_count
    +    elsif args.state.player.y < -64
    +      args.state.player.y = 720
    +      args.state.player.started_running_at ||= args.state.tick_count
         end
       
    -    if args.state.last_mouse_click
    -      click = args.state.last_mouse_click
    -      args.outputs.labels << small_label(args, x, 12, "Mouse click happened at: #{click.created_at}")
    -      args.outputs.labels << small_label(args, x, 13, "Mouse clicked #{click.created_at_elapsed} ticks ago")
    -      args.outputs.labels << small_label(args, x, 14, "Mouse click location: #{click.point.x}, #{click.point.y}")
    +    # render player as standing or running
    +    if args.state.player.started_running_at
    +      args.outputs.sprites << running_sprite(args)
         else
    -      args.outputs.labels << small_label(args, x, 12, "Mouse click has not occurred yet.")
    -      args.outputs.labels << small_label(args, x, 13, "Please click mouse.")
    +      args.outputs.sprites << standing_sprite(args)
         end
    +    args.outputs.labels << [30, 700, "Use arrow keys to move around."]
       end
       
    -  def small_label args, x, row, message
    -    # This method effectively combines the row_to_px and small_font methods
    -    # It changes the given row value to a DragonRuby pixel value
    -    # and adds the customization parameters
    -    [x, row_to_px(args, row), message, small_font]
    -  end
    -  
    -  def small_font
    -    [-2, 0, 0, 0, 0, 255]
    -  end
    -  
    -  def row_to_px args, row_number
    -    args.grid.top.shift_down(5).shift_down(20 * row_number)
    +  def standing_sprite args
    +    {
    +      x: args.state.player.x,
    +      y: args.state.player.y,
    +      w: args.state.player.w,
    +      h: args.state.player.h,
    +      path: "sprites/horizontal-stand.png",
    +      flip_horizontally: args.state.player.direction > 0
    +    }
       end
       
    -  def tick_instructions args, text, y = 715
    -    return if args.state.key_event_occurred
    -    if args.inputs.mouse.click ||
    -       args.inputs.keyboard.directional_vector ||
    -       args.inputs.keyboard.key_down.enter ||
    -       args.inputs.keyboard.key_down.escape
    -      args.state.key_event_occurred = true
    +  def running_sprite args
    +    if !args.state.player.started_running_at
    +      tile_index = 0
    +    else
    +      how_many_frames_in_sprite_sheet = 6
    +      how_many_ticks_to_hold_each_frame = 3
    +      should_the_index_repeat = true
    +      tile_index = args.state
    +                       .player
    +                       .started_running_at
    +                       .frame_index(how_many_frames_in_sprite_sheet,
    +                                    how_many_ticks_to_hold_each_frame,
    +                                    should_the_index_repeat)
         end
       
    -    args.outputs.debug << [0, y - 50, 1280, 60].solid
    -    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label
    -    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label
    +    {
    +      x: args.state.player.x,
    +      y: args.state.player.y,
    +      w: args.state.player.w,
    +      h: args.state.player.h,
    +      path: 'sprites/horizontal-run.png',
    +      tile_x: 0 + (tile_index * args.state.player.w),
    +      tile_y: 0,
    +      tile_w: args.state.player.w,
    +      tile_h: args.state.player.h,
    +      flip_horizontally: args.state.player.direction > 0,
    +    }
       end
     
     #+end_src
     
    -*** Input Basics - Mouse Point To Rect - main.rb
    +*** Rendering Sprites - Animation States - main.rb
     #+begin_src ruby
    -  # ./samples/02_input_basics/03_mouse_point_to_rect/app/main.rb
    -  =begin
    -  
    -  APIs that haven't been encountered in a previous sample apps:
    -  
    -  - args.outputus.borders: An array. Values in this array will be rendered as
    -    unfilled rectangles on the screen.
    -  - ARRAY#inside_rect?: An array with at least two values is considered a point. An array
    -    with at least four values is considered a rect. The inside_rect? function returns true
    -    or false depending on if the point is inside the rect.
    -  
    -    ```
    -    # Point:  x: 100, y: 100
    -    # Rect:   x: 0, y: 0, w: 500, h: 500
    -    # Result: true
    -  
    -    [100, 100].inside_rect? [0, 0, 500, 500]
    -    ```
    -  
    -    ```
    -    # Point:  x: 100, y: 100
    -    # Rect:   x: 300, y: 300, w: 100, h: 100
    -    # Result: false
    +  # ./samples/03_rendering_sprites/03_animation_states/app/main.rb
    +  class Game
    +    attr_gtk
       
    -    [100, 100].inside_rect? [300, 300, 100, 100]
    -    ```
    +    def defaults
    +      state.show_debug_layer  = true if state.tick_count == 0
    +      player.tile_size        = 64
    +      player.speed            = 3
    +      player.slash_frames     = 15
    +      player.x              ||= 50
    +      player.y              ||= 400
    +      player.dir_x          ||=  1
    +      player.dir_y          ||= -1
    +      player.is_moving      ||= false
    +      state.watch_list      ||= {}
    +      state.enemies         ||= []
    +    end
       
    -  - args.inputs.mouse.click.point.created_at: The frame the mouse click occurred in.
    -  - args.inputs.mouse.click.point.created_at_elapsed: How many frames have passed
    -    since the click event.
    +    def add_enemy
    +      state.enemies << { x: 1200 * rand, y: 600 * rand, w: 64, h: 64 }
    +    end
       
    -  =end
    +    def sprite_horizontal_run
    +      tile_index = 0.frame_index(6, 3, true)
    +      tile_index = 0 if !player.is_moving
       
    -  # To determine whether a point is in a rect
    -  # Use point.inside_rect? rect
    +      {
    +        x: player.x,
    +        y: player.y,
    +        w: player.tile_size,
    +        h: player.tile_size,
    +        path: 'sprites/horizontal-run.png',
    +        tile_x: 0 + (tile_index * player.tile_size),
    +        tile_y: 0,
    +        tile_w: player.tile_size,
    +        tile_h: player.tile_size,
    +        flip_horizontally: player.dir_x > 0,
    +        # a: 40
    +      }
    +    end
       
    -  # This is useful to determine if a click occurred in a rect
    +    def sprite_horizontal_stand
    +      {
    +        x: player.x,
    +        y: player.y,
    +        w: player.tile_size,
    +        h: player.tile_size,
    +        path: 'sprites/horizontal-stand.png',
    +        flip_horizontally: player.dir_x > 0,
    +        # a: 40
    +      }
    +    end
       
    -  def tick args
    -    tick_instructions args, "Sample app shows how to determing if a click happened inside a rectangle."
    +    def sprite_horizontal_slash
    +      tile_index   = player.slash_at.frame_index(5, player.slash_frames.idiv(5), false) || 0
       
    -    x = 460
    -  
    -    args.outputs.labels << small_label(args, x, 15, "Click inside the blue box maybe ---->")
    -  
    -    box = [785, 370, 50, 50, 0, 0, 170]
    -    args.outputs.borders << box
    -  
    -    # Saves the most recent click into args.state
    -    # Unlike the other components of args,
    -    # args.state does not reset every tick.
    -    if args.inputs.mouse.click
    -      args.state.last_mouse_click = args.inputs.mouse.click
    +      {
    +        x: player.x - 41.25,
    +        y: player.y - 41.25,
    +        w: 165,
    +        h: 165,
    +        path: 'sprites/horizontal-slash.png',
    +        tile_x: 0 + (tile_index * 128),
    +        tile_y: 0,
    +        tile_w: 128,
    +        tile_h: 128,
    +        flip_horizontally: player.dir_x > 0
    +      }
         end
       
    -    if args.state.last_mouse_click
    -      if args.state.last_mouse_click.point.inside_rect? box
    -        args.outputs.labels << small_label(args, x, 16, "Mouse click happened *inside* the box.")
    +    def render_player
    +      if player.slash_at
    +        outputs.sprites << sprite_horizontal_slash
    +      elsif player.is_moving
    +        outputs.sprites << sprite_horizontal_run
           else
    -        args.outputs.labels << small_label(args, x, 16, "Mouse click happened *outside* the box.")
    +        outputs.sprites << sprite_horizontal_stand
           end
    -    else
    -      args.outputs.labels << small_label(args, x, 16, "Mouse click has not occurred yet.")
         end
    -  end
    -  
    -  def small_label args, x, row, message
    -    [x, row_to_px(args, row), message, small_font]
    -  end
    -  
    -  def small_font
    -    [-2, 0, 0, 0, 0, 255]
    -  end
    -  
    -  def row_to_px args, row_number
    -    args.grid.top.shift_down(5).shift_down(20 * row_number)
    -  end
       
    -  def tick_instructions args, text, y = 715
    -    return if args.state.key_event_occurred
    -    if args.inputs.mouse.click ||
    -       args.inputs.keyboard.directional_vector ||
    -       args.inputs.keyboard.key_down.enter ||
    -       args.inputs.keyboard.key_down.escape
    -      args.state.key_event_occurred = true
    +    def render_enemies
    +      outputs.borders << state.enemies
         end
       
    -    args.outputs.debug << [0, y - 50, 1280, 60].solid
    -    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label
    -    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label
    -  end
    -
    -#+end_src
    -
    -*** Input Basics - Mouse Rect To Rect - main.rb
    -#+begin_src ruby
    -  # ./samples/02_input_basics/04_mouse_rect_to_rect/app/main.rb
    -  =begin
    -  
    -  APIs that haven't been encountered in a previous sample apps:
    -  
    -  - args.outputs.borders: An array. Values in this array will be rendered as
    -    unfilled rectangles on the screen.
    -  - ARRAY#intersect_rect?: An array with at least four values is
    -    considered a rect. The intersect_rect? function returns true
    -    or false depending on if the two rectangles intersect.
    +    def render_debug_layer
    +      return if !state.show_debug_layer
    +      outputs.labels << state.watch_list.map.with_index do |(k, v), i|
    +         [30, 710 - i * 28, "#{k}: #{v || "(nil)"}"]
    +      end
       
    -    ```
    -    # Rect One: x: 100, y: 100, w: 100, h: 100
    -    # Rect Two: x: 0, y: 0, w: 500, h: 500
    -    # Result:   true
    +      outputs.borders << player.slash_collision_rect
    +    end
       
    -    [100, 100, 100, 100].intersect_rect? [0, 0, 500, 500]
    -    ```
    +    def slash_initiate?
    +      # buffalo usb controller has a button and b button swapped lol
    +      inputs.controller_one.key_down.a || inputs.keyboard.key_down.j
    +    end
       
    -    ```
    -    # Rect One: x: 100, y: 100, w: 10, h: 10
    -    # Rect Two: x: 500, y: 500, w: 10, h: 10
    -    # Result:   false
    +    def input
    +      # player movement
    +      if slash_complete? && (vector = inputs.directional_vector)
    +        player.x += vector.x * player.speed
    +        player.y += vector.y * player.speed
    +      end
    +      player.slash_at = slash_initiate? if slash_initiate?
    +    end
       
    -    [100, 100, 10, 10].intersect_rect? [500, 500, 10, 10]
    -    ```
    +    def calc_movement
    +      # movement
    +      if vector = inputs.directional_vector
    +        state.debug_label = vector
    +        player.dir_x = vector.x
    +        player.dir_y = vector.y
    +        player.is_moving = true
    +      else
    +        state.debug_label = vector
    +        player.is_moving = false
    +      end
    +    end
       
    -  =end
    +    def calc_slash
    +      # re-calc the location of the swords collision box
    +      if player.dir_x.positive?
    +        player.slash_collision_rect = [player.x + player.tile_size,
    +                                       player.y + player.tile_size.half - 10,
    +                                       40, 20]
    +      else
    +        player.slash_collision_rect = [player.x - 32 - 8,
    +                                       player.y + player.tile_size.half - 10,
    +                                       40, 20]
    +      end
       
    -  # Similarly, whether rects intersect can be found through
    -  # rect1.intersect_rect? rect2
    +      # recalc sword's slash state
    +      player.slash_at = nil if slash_complete?
       
    -  def tick args
    -    tick_instructions args, "Sample app shows how to determine if two rectangles intersect."
    -    x = 460
    +      # determine collision if the sword is at it's point of damaging
    +      return unless slash_can_damage?
       
    -    args.outputs.labels << small_label(args, x, 3, "Click anywhere on the screen")
    -    # red_box = [460, 250, 355, 90, 170, 0, 0]
    -    # args.outputs.borders << red_box
    +      state.enemies.reject! { |e| e.intersect_rect? player.slash_collision_rect }
    +    end
       
    -    # args.state.box_collision_one and args.state.box_collision_two
    -    # Are given values of a solid when they should be rendered
    -    # They are stored in game so that they do not get reset every tick
    -    if args.inputs.mouse.click
    -      if !args.state.box_collision_one
    -        args.state.box_collision_one = [args.inputs.mouse.click.point.x - 25, args.inputs.mouse.click.point.y - 25, 125, 125, 180, 0,   0, 180]
    -      elsif !args.state.box_collision_two
    -        args.state.box_collision_two = [args.inputs.mouse.click.point.x - 25, args.inputs.mouse.click.point.y - 25, 125, 125,   0, 0, 180, 180]
    -      else
    -        args.state.box_collision_one = nil
    -        args.state.box_collision_two = nil
    -      end
    +    def slash_complete?
    +      !player.slash_at || player.slash_at.elapsed?(player.slash_frames)
         end
       
    -    if args.state.box_collision_one
    -      args.outputs.solids << args.state.box_collision_one
    +    def slash_can_damage?
    +      # damage occurs half way into the slash animation
    +      return false if slash_complete?
    +      return false if (player.slash_at + player.slash_frames.idiv(2)) != state.tick_count
    +      return true
         end
       
    -    if args.state.box_collision_two
    -      args.outputs.solids << args.state.box_collision_two
    +    def calc
    +      # generate an enemy if there aren't any on the screen
    +      add_enemy if state.enemies.length == 0
    +      calc_movement
    +      calc_slash
         end
       
    -    if args.state.box_collision_one && args.state.box_collision_two
    -      if args.state.box_collision_one.intersect_rect? args.state.box_collision_two
    -        args.outputs.labels << small_label(args, x, 4, 'The boxes intersect.')
    -      else
    -        args.outputs.labels << small_label(args, x, 4, 'The boxes do not intersect.')
    -      end
    -    else
    -      args.outputs.labels << small_label(args, x, 4, '--')
    +    # source is at http://github.com/amirrajan/dragonruby-link-to-the-past
    +    def tick
    +      defaults
    +      render_enemies
    +      render_player
    +      outputs.labels << [30, 30, "Gamepad: D-Pad to move. B button to attack."]
    +      outputs.labels << [30, 52, "Keyboard: WASD/Arrow keys to move. J to attack."]
    +      render_debug_layer
    +      input
    +      calc
         end
    -  end
       
    -  def small_label args, x, row, message
    -    [x, row_to_px(args, row), message, small_font]
    +    def player
    +      state.player
    +    end
       end
       
    -  def small_font
    -    [-2, 0, 0, 0, 0, 255]
    -  end
    +  $game = Game.new
       
    -  def row_to_px args, row_number
    -    args.grid.top.shift_down(5).shift_down(20 * row_number)
    +  def tick args
    +    $game.args = args
    +    $game.tick
       end
       
    -  def tick_instructions args, text, y = 715
    -    return if args.state.key_event_occurred
    -    if args.inputs.mouse.click ||
    -       args.inputs.keyboard.directional_vector ||
    -       args.inputs.keyboard.key_down.enter ||
    -       args.inputs.keyboard.key_down.escape
    -      args.state.key_event_occurred = true
    -    end
    -  
    -    args.outputs.debug << [0, y - 50, 1280, 60].solid
    -    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label
    -    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label
    -  end
    +  $gtk.reset
     
     #+end_src
     
    -*** Input Basics - Controller - main.rb
    +*** Rendering Sprites - Color And Rotation - main.rb
     #+begin_src ruby
    -  # ./samples/02_input_basics/05_controller/app/main.rb
    +  # ./samples/03_rendering_sprites/04_color_and_rotation/app/main.rb
       =begin
    -  
        APIs listing that haven't been encountered in previous sample apps:
       
    -   - args.inputs.controller_one.key_held.KEY: Will check to see if a specific key
    -     is being held down on the controller.
    -     If there is more than one controller being used, they can be differentiated by
    -     using names like controller_one and controller_two.
    +   - merge: Returns a hash containing the contents of two original hashes.
    +     Merge does not allow duplicate keys, so the value of a repeated key
    +     will be overwritten.
       
    -     For a full listing of buttons, take a look at mygame/documentation/08-controllers.md.
    +     For example, if we had two hashes
    +     h1 = { "a" => 1, "b" => 2}
    +     h2 = { "b" => 3, "c" => 3}
    +     and we called the command
    +     h1.merge(h2)
    +     the result would the following hash
    +     { "a" => 1, "b" => 3, "c" => 3}.
       
    -   Reminder:
    +   Reminders:
       
    -   - args.state.PROPERTY: The state property on args is a dynamic
    -     structure. You can define ANY property here with ANY type of
    -     arbitrary nesting. Properties defined on args.state will be retained
    -     across frames. If you attempt to access a property that doesn't exist
    -     on args.state, it will simply return nil (no exception will be thrown).
    +   - Hashes: Collection of unique keys and their corresponding values. The value can be found
    +     using their keys.
    +     In this sample app, we're using a hash to create a sprite.
       
    -     In this sample app, args.state.BUTTONS is an array that stores the buttons of the controller.
    -     The parameters of a button are:
    -     1. the position (x, y)
    -     2. the input key held on the controller
    -     3. the text or name of the button
    +   - args.outputs.sprites: An array. The values generate a sprite.
    +     The parameters are [X, Y, WIDTH, HEIGHT, PATH, ANGLE, ALPHA, RED, GREEN, BLUE]
    +     Before continuing with this sample app, it is HIGHLY recommended that you look
    +     at mygame/documentation/05-sprites.md.
       
    -  =end
    +   - args.inputs.keyboard.key_held.KEY: Determines if a key is being pressed.
    +     For more information about the keyboard, go to mygame/documentation/06-keyboard.md.
       
    -  # This sample app provides a visual demonstration of a standard controller, including
    -  # the placement and function of all buttons.
    +   - args.inputs.controller_one: Takes input from the controller based on what key is pressed.
    +     For more information about the controller, go to mygame/documentation/08-controllers.md.
       
    -  class ControllerDemo
    -    attr_accessor :inputs, :state, :outputs
    +   - num1.lesser(num2): Finds the lower value of the given options.
       
    -    # Calls the methods necessary for the app to run successfully.
    -    def tick
    -      process_inputs
    -      render
    -    end
    +  =end
       
    -    # Starts with an empty collection of buttons.
    -    # Adds buttons that are on the controller to the collection.
    -    def process_inputs
    -      state.buttons = []
    +  # This sample app shows a car moving across the screen. It loops back around if it exceeds the dimensions of the screen,
    +  # and also can be moved in different directions through keyboard input from the user.
    +  
    +  # Calls the methods necessary for the game to run successfully.
    +  def tick args
    +    default args
    +    render args.grid, args.outputs, args.state
    +    calc args.state
    +    process_inputs args
    +  end
       
    -      state.buttons << [100, 500, inputs.controller_one.key_held.l1, "L1"]
    -      state.buttons << [100, 600, inputs.controller_one.key_held.l2, "L2"]
    +  # Sets default values for the car sprite
    +  # Initialization ||= only happens in the first frame
    +  def default args
    +    args.state.sprite.width    = 19
    +    args.state.sprite.height   = 10
    +    args.state.sprite.scale    = 4
    +    args.state.max_speed       = 5
    +    args.state.x             ||= 100
    +    args.state.y             ||= 100
    +    args.state.speed         ||= 1
    +    args.state.angle         ||= 0
    +  end
       
    -      state.buttons << [1100, 500, inputs.controller_one.key_held.r1, "R1"]
    -      state.buttons << [1100, 600, inputs.controller_one.key_held.r2, "R2"]
    +  # Outputs sprite onto screen
    +  def render grid, outputs, state
    +    outputs.solids  <<  [grid.rect, 70, 70, 70] # outputs gray background
    +    outputs.sprites <<  [destination_rect(state), # sets first four parameters of car sprite
    +    'sprites/86.png', # image path of car
    +    state.angle,
    +    opacity, # transparency
    +    saturation,
    +    source_rect(state), # sprite sub division/tile (tile x, y, w, h)
    +    false, false,  # don't flip sprites
    +    rotation_anchor]
       
    -      state.buttons << [540, 450, inputs.controller_one.key_held.select, "Select"]
    -      state.buttons << [660, 450, inputs.controller_one.key_held.start, "Start"]
    +    # also look at the create_sprite helper method
    +    #
    +    # For example:
    +    #
    +    # dest   = destination_rect(state)
    +    # source = source_rect(state),
    +    # outputs.sprites << create_sprite(
    +    #   'sprites/86.png',
    +    #   x: dest.x,
    +    #   y: dest.y,
    +    #   w: dest.w,
    +    #   h: dest.h,
    +    #   angle: state.angle,
    +    #   source_x: source.x,
    +    #   source_y: source.y,
    +    #   source_w: source.w,
    +    #   source_h: source.h,
    +    #   flip_h: false,
    +    #   flip_v: false,
    +    #   rotation_anchor_x: 0.7,
    +    #   rotation_anchor_y: 0.5
    +    # )
    +  end
       
    -      state.buttons << [200, 300, inputs.controller_one.key_held.left, "Left"]
    -      state.buttons << [300, 400, inputs.controller_one.key_held.up, "Up"]
    -      state.buttons << [400, 300, inputs.controller_one.key_held.right, "Right"]
    -      state.buttons << [300, 200, inputs.controller_one.key_held.down, "Down"]
    +  # Creates sprite by setting values inside of a hash
    +  def create_sprite path, options = {}
    +    options = {
       
    -      state.buttons << [800, 300, inputs.controller_one.key_held.x, "X"]
    -      state.buttons << [900, 400, inputs.controller_one.key_held.y, "Y"]
    -      state.buttons << [1000, 300, inputs.controller_one.key_held.a, "A"]
    -      state.buttons << [900, 200, inputs.controller_one.key_held.b, "B"]
    +      # dest x, y, w, h
    +      x: 0,
    +      y: 0,
    +      w: 100,
    +      h: 100,
       
    -      state.buttons << [450 + inputs.controller_one.left_analog_x_perc * 100,
    -                        100 + inputs.controller_one.left_analog_y_perc * 100,
    -                        inputs.controller_one.key_held.l3,
    -                        "L3"]
    +      # angle, rotation
    +      angle: 0,
    +      rotation_anchor_x: 0.5,
    +      rotation_anchor_y: 0.5,
       
    -      state.buttons << [750 + inputs.controller_one.right_analog_x_perc * 100,
    -                        100 + inputs.controller_one.right_analog_y_perc * 100,
    -                        inputs.controller_one.key_held.r3,
    -                        "R3"]
    -    end
    +      # color saturation (red, green, blue), transparency
    +      r: 255,
    +      g: 255,
    +      b: 255,
    +      a: 255,
       
    -    # Gives each button a square shape.
    -    # If the button is being pressed or held (which means it is considered active),
    -    # the square is filled in. Otherwise, the button simply has a border.
    -    def render
    -      state.buttons.each do |x, y, active, text|
    -        rect = [x, y, 75, 75]
    +      # source x, y, width, height
    +      source_x: 0,
    +      source_y: 0,
    +      source_w: -1,
    +      source_h: -1,
       
    -        if active # if button is pressed
    -          outputs.solids << rect # rect is output as solid (filled in)
    -        else
    -          outputs.borders << rect # otherwise, output as border
    -        end
    +      # flip horiztonally, flip vertically
    +      flip_h: false,
    +      flip_v: false,
       
    -        # Outputs the text of each button using labels.
    -        outputs.labels << [x, y + 95, text] # add 95 to place label above button
    -      end
    +    }.merge options
       
    -      outputs.labels << [10, 60, "Left Analog x: #{inputs.controller_one.left_analog_x_raw} (#{inputs.controller_one.left_analog_x_perc * 100}%)"]
    -      outputs.labels << [10, 30, "Left Analog y: #{inputs.controller_one.left_analog_y_raw} (#{inputs.controller_one.left_analog_y_perc * 100}%)"]
    -      outputs.labels << [900, 60, "Right Analog x: #{inputs.controller_one.right_analog_x_raw} (#{inputs.controller_one.right_analog_x_perc * 100}%)"]
    -      outputs.labels << [900, 30, "Right Analog y: #{inputs.controller_one.right_analog_y_raw} (#{inputs.controller_one.right_analog_y_perc * 100}%)"]
    -    end
    +    [
    +      options[:x], options[:y], options[:w], options[:h], # dest rect keys
    +      path,
    +      options[:angle], options[:a], options[:r], options[:g], options[:b], # angle, color, alpha
    +      options[:source_x], options[:source_y], options[:source_w], options[:source_h], # source rect keys
    +      options[:flip_h], options[:flip_v], # flip
    +      options[:rotation_anchor_x], options[:rotation_anchor_y], # rotation anchor
    +    ] # hash keys contain corresponding values
       end
       
    -  $controller_demo = ControllerDemo.new
    -  
    -  def tick args
    -    tick_instructions args, "Sample app shows how controller input is handled. You'll need to connect a USB controller."
    -    $controller_demo.inputs = args.inputs
    -    $controller_demo.state = args.state
    -    $controller_demo.outputs = args.outputs
    -    $controller_demo.tick
    +  # Calls the calc_pos and calc_wrap methods.
    +  def calc state
    +    calc_pos state
    +    calc_wrap state
       end
       
    -  # Resets the app.
    -  def r
    -    $gtk.reset
    +  # Changes sprite's position on screen
    +  # Vectors have magnitude and direction, so the incremented x and y values give the car direction
    +  def calc_pos state
    +    state.x     += state.angle.vector_x * state.speed # increments x by product of angle's x vector and speed
    +    state.y     += state.angle.vector_y * state.speed # increments y by product of angle's y vector and speed
    +    state.speed *= 1.1 # scales speed up
    +    state.speed  = state.speed.lesser(state.max_speed) # speed is either current speed or max speed, whichever has a lesser value (ensures that the car doesn't go too fast or exceed the max speed)
       end
       
    -  def tick_instructions args, text, y = 715
    -    return if args.state.key_event_occurred
    -    if args.inputs.mouse.click ||
    -       args.inputs.keyboard.directional_vector ||
    -       args.inputs.keyboard.key_down.enter ||
    -       args.inputs.keyboard.key_down.escape
    -      args.state.key_event_occurred = true
    -    end
    +  # The screen's dimensions are 1280x720. If the car goes out of scope,
    +  # it loops back around on the screen.
    +  def calc_wrap state
       
    -    args.outputs.debug << [0, y - 50, 1280, 60].solid
    -    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label
    -    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label
    +    # car returns to left side of screen if it disappears on right side of screen
    +    # sprite.width refers to tile's size, which is multipled by scale (4) to make it bigger
    +    state.x = -state.sprite.width * state.sprite.scale if state.x - 20 > 1280
    +  
    +    # car wraps around to right side of screen if it disappears on the left side
    +    state.x = 1280 if state.x + state.sprite.width * state.sprite.scale + 20 < 0
    +  
    +    # car wraps around to bottom of screen if it disappears at the top of the screen
    +    # if you subtract 520 pixels instead of 20 pixels, the car takes longer to reappear (try it!)
    +    state.y = 0    if state.y - 20 > 720 # if 20 pixels less than car's y position is greater than vertical scope
    +  
    +    # car wraps around to top of screen if it disappears at the bottom of the screen
    +    state.y = 720  if state.y + state.sprite.height * state.sprite.scale + 20 < 0
       end
    -
    -#+end_src
    -
    -*** Input Basics - Touch - main.rb
    -#+begin_src ruby
    -  # ./samples/02_input_basics/06_touch/app/main.rb
    -  def tick args
    -    args.outputs.background_color = [ 0, 0, 0 ]
    -    args.outputs.primitives << [640, 700, "Touch your screen.", 5, 1, 255, 255, 255].label
       
    -    # If you don't want to get fancy, you can just look for finger_one
    -    #  (and _two, if you like), which are assigned in the order new touches hit
    -    #  the screen. If not nil, they are touching right now, and are just
    -    #  references to specific items in the args.input.touch hash.
    -    # If finger_one lifts off, it will become nil, but finger_two, if it was
    -    #  touching, remains until it also lifts off. When all fingers lift off, the
    -    #  the next new touch will be finger_one again, but until then, new touches
    -    #  don't fill in earlier slots.
    -    if !args.inputs.finger_one.nil?
    -      args.outputs.primitives << [640, 650, "Finger #1 is touching at (#{args.inputs.finger_one.x}, #{args.inputs.finger_one.y}).", 5, 1, 255, 255, 255].label
    -    end
    -    if !args.inputs.finger_two.nil?
    -      args.outputs.primitives << [640, 600, "Finger #2 is touching at (#{args.inputs.finger_two.x}, #{args.inputs.finger_two.y}).", 5, 1, 255, 255, 255].label
    +  # Changes angle of sprite based on user input from keyboard or controller
    +  def process_inputs args
    +  
    +    # NOTE: increasing the angle doesn't mean that the car will continue to go
    +    # in a specific direction. The angle is increasing, which means that if the
    +    # left key was kept in the "down" state, the change in the angle would cause
    +    # the car to go in a counter-clockwise direction and form a circle (360 degrees)
    +    if args.inputs.keyboard.key_held.left # if left key is pressed
    +      args.state.angle += 2 # car's angle is incremented by 2
    +  
    +    # The same applies to decreasing the angle. If the right key was kept in the
    +    # "down" state, the decreasing angle would cause the car to go in a clockwise
    +    # direction and form a circle (360 degrees)
    +    elsif args.inputs.keyboard.key_held.right # if right key is pressed
    +      args.state.angle -= 2 # car's angle is decremented by 2
    +  
    +    # Input from a controller can also change the angle of the car
    +    elsif args.inputs.controller_one.left_analog_x_perc != 0
    +      args.state.angle += 2 * args.inputs.controller_one.left_analog_x_perc * -1
         end
    +  end
       
    -    # Here's the more flexible interface: this will report as many simultaneous
    -    #  touches as the system can handle, but it's a little more effort to track
    -    #  them. Each item in the args.input.touch hash has a unique key (an
    -    #  incrementing integer) that exists until the finger lifts off. You can
    -    #  tell which order the touches happened globally by the key value, or
    -    #  by the touch[id].touch_order field, which resets to zero each time all
    -    #  touches have lifted.
    +  # A sprite's center of rotation can be altered
    +  # Increasing either of these numbers would dramatically increase the
    +  # car's drift when it turns!
    +  def rotation_anchor
    +    [0.7, 0.5]
    +  end
       
    -    args.state.colors ||= [
    -      0xFF0000, 0x00FF00, 0x1010FF, 0xFFFF00, 0xFF00FF, 0x00FFFF, 0xFFFFFF
    -    ]
    +  # Sets opacity value of sprite to 255 so that it is not transparent at all
    +  # Change it to 0 and you won't be able to see the car sprite on the screen
    +  def opacity
    +    255
    +  end
       
    -    size = 100
    -    args.inputs.touch.each { |k,v|
    -      color = args.state.colors[v.touch_order % 7]
    -      r = (color & 0xFF0000) >> 16
    -      g = (color & 0x00FF00) >> 8
    -      b = (color & 0x0000FF)
    -      args.outputs.primitives << [v.x - (size / 2), v.y + (size / 2), size, size, r, g, b, 255].solid
    -      args.outputs.primitives << [v.x, v.y + size, k.to_s, 0, 1, 0, 0, 0].label
    -    }
    +  # Sets the color of the sprite to white.
    +  def saturation
    +    [255, 255, 255]
    +  end
    +  
    +  # Sets definition of destination_rect (used to define the car sprite)
    +  def destination_rect state
    +    [state.x, state.y,
    +    state.sprite.width  * state.sprite.scale, # multiplies by 4 to set size
    +    state.sprite.height * state.sprite.scale]
       end
       
    +  # Portion of a sprite (a tile)
    +  # Sub division of sprite is denoted as a rectangle directly related to original size of .png
    +  # Tile is located at bottom left corner within a 19x10 pixel rectangle (based on sprite.width, sprite.height)
    +  def source_rect state
    +    [0, 0, state.sprite.width, state.sprite.height]
    +  end
     
     #+end_src
     
    -*** Rendering Sprites - Animation Using Separate Pngs - main.rb
    +*** Physics And Collisions - Simple - main.rb
     #+begin_src ruby
    -  # ./samples/03_rendering_sprites/01_animation_using_separate_pngs/app/main.rb
    +  # ./samples/04_physics_and_collisions/01_simple/app/main.rb
       =begin
       
        Reminders:
    +   - ARRAY#intersect_rect?: Returns true or false depending on if the two rectangles intersect.
       
    -   - String interpolation: Uses #{} syntax; everything between the #{ and the } is evaluated
    -     as Ruby code, and the placeholder is replaced with its corresponding value or result.
    -  
    -     In this sample app, we're using string interpolation to iterate through images in the
    -     sprites folder using their image path names.
    -  
    -   - args.outputs.sprites: An array. Values in this array generate sprites on the screen.
    -     The parameters are [X, Y, WIDTH, HEIGHT, IMAGE PATH]
    -     For more information about sprites, go to mygame/documentation/05-sprites.md.
    -  
    -   - args.outputs.labels: An array. Values in the array generate labels on the screen.
    -     The parameters are [X, Y, TEXT, SIZE, ALIGNMENT, RED, GREEN, BLUE, ALPHA, FONT STYLE]
    -     For more information about labels, go to mygame/documentation/02-labels.md.
    -  
    -   - args.inputs.keyboard.key_down.KEY: Determines if a key is in the down state, or pressed.
    -     Stores the frame that key was pressed on.
    -     For more information about the keyboard, go to mygame/documentation/06-keyboard.md.
    +   - args.outputs.solids: An array. The values generate a solid.
    +     The parameters are [X, Y, WIDTH, HEIGHT, RED, GREEN, BLUE]
       
       =end
       
    -  # This sample app demonstrates how sprite animations work.
    -  # There are two sprites that animate forever and one sprite
    -  # that *only* animates when you press the "f" key on the keyboard.
    +  # This sample app shows collisions between two boxes.
       
    -  # This is the entry point to your game. The `tick` method
    -  # executes at 60 frames per second. There are two methods
    -  # in this tick "entry point": `looping_animation`, and the
    -  # second method is `one_time_animation`.
    +  # Runs methods needed for game to run properly.
       def tick args
    -    looping_animation args
    -    one_time_animation args
    +    tick_instructions args, "Sample app shows how to move a square over time and determine collision."
    +    defaults args
    +    render args
    +    calc args
       end
       
    -  # This function shows how to animate a sprite that loops forever.
    -  def looping_animation args
    -    # Here we define a few local variables that will be sent
    -    # into the magic function that gives us the correct sprite image
    -    # over time. There are four things we need in order to figure
    -    # out which sprite to show.
    -  
    -    # 1. When to start the animation.
    -    start_looping_at = 0
    -  
    -    # 2. The number of pngs that represent the full animation.
    -    number_of_sprites = 6
    -  
    -    # 3. How long to show each png.
    -    number_of_frames_to_show_each_sprite = 4
    -  
    -    # 4. Whether the animation should loop once, or forever.
    -    does_sprite_loop = true
    -  
    -    # With the variables defined above, we can get a number
    -    # which represents the sprite to show by calling the `frame_index` function.
    -    # In this case the number will be between 0, and 5 (you can see the sprites
    -    # in the ./sprites directory).
    -    sprite_index = start_looping_at.frame_index number_of_sprites,
    -                                                number_of_frames_to_show_each_sprite,
    -                                                does_sprite_loop
    -  
    -    # Now that we have `sprite_index, we can present the correct file.
    -    args.outputs.sprites << [100, 100, 100, 100, "sprites/dragon_fly_#{sprite_index}.png"]
    +  # Sets default values.
    +  def defaults args
    +    # These values represent the moving box.
    +    args.state.moving_box_speed   = 10
    +    args.state.moving_box_size    = 100
    +    args.state.moving_box_dx    ||=  1
    +    args.state.moving_box_dy    ||=  1
    +    args.state.moving_box       ||= [0, 0, args.state.moving_box_size, args.state.moving_box_size] # moving_box_size is set as the width and height
       
    -    # Try changing the numbers below to see how the animation changes:
    -    args.outputs.sprites << [100, 200, 100, 100, "sprites/dragon_fly_#{0.frame_index 6, 4, true}.png"]
    +    # These values represent the center box.
    +    args.state.center_box ||= [540, 260, 200, 200, 180]
    +    args.state.center_box_collision ||= false # initially no collision
       end
       
    -  # This function shows how to animate a sprite that executes
    -  # only once when the "f" key is pressed.
    -  def one_time_animation args
    -    # This is just a label the shows instructions within the game.
    -    args.outputs.labels << [220, 350, "(press f to animate)"]
    -  
    -    # If "f" is pressed on the keyboard...
    -    if args.inputs.keyboard.key_down.f
    -      # Print the frame that "f" was pressed on.
    -      puts "Hello from main.rb! The \"f\" key was in the down state on frame: #{args.inputs.keyboard.key_down.f}"
    -  
    -      # And MOST IMPORTANTLY set the point it time to start the animation,
    -      # equal to "now" which is represented as args.state.tick_count.
    -  
    -      # Also IMPORTANT, you'll notice that the value of when to start looping
    -      # is stored in `args.state`. This construct's values are retained across
    -      # executions of the `tick` method.
    -      args.state.start_looping_at = args.state.tick_count
    +  def render args
    +    # If the game state denotes that a collision has occured,
    +    # render a solid square, otherwise render a border instead.
    +    if args.state.center_box_collision
    +      args.outputs.solids << args.state.center_box
    +    else
    +      args.outputs.borders << args.state.center_box
         end
       
    -    # These are the same local variables that were defined
    -    # for the `looping_animation` function.
    -    number_of_sprites = 6
    -    number_of_frames_to_show_each_sprite = 4
    +    # Then render the moving box.
    +    args.outputs.solids << args.state.moving_box
    +  end
       
    -    # Except this sprite does not loop again. If the animation time has passed,
    -    # then the frame_index function returns nil.
    -    does_sprite_loop = false
    +  # Generally in a pipeline for a game engine, you have rendering,
    +  # game simulation (calculation), and input processing.
    +  # This fuction represents the game simulation.
    +  def calc args
    +    position_moving_box args
    +    determine_collision_center_box args
    +  end
       
    -    sprite_index = args.state
    -                       .start_looping_at
    -                       .frame_index number_of_sprites,
    -                                    number_of_frames_to_show_each_sprite,
    -                                    does_sprite_loop
    +  # Changes the position of the moving box on the screen by multiplying the change in x (dx) and change in y (dy) by the speed,
    +  # and adding it to the current position.
    +  # dx and dy are positive if the box is moving right and up, respectively
    +  # dx and dy are negative if the box is moving left and down, respectively
    +  def position_moving_box args
    +    args.state.moving_box.x += args.state.moving_box_dx * args.state.moving_box_speed
    +    args.state.moving_box.y += args.state.moving_box_dy * args.state.moving_box_speed
       
    -    # This line sets the frame index to zero, if
    -    # the animation duration has passed (frame_index returned nil).
    +    # 1280x720 are the virtual pixels you work with (essentially 720p).
    +    screen_width  = 1280
    +    screen_height = 720
       
    -    # Remeber: we are not looping forever here.
    -    sprite_index ||= 0
    +    # Position of the box is denoted by the bottom left hand corner, in
    +    # that case, we have to subtract the width of the box so that it stays
    +    # in the scene (you can try deleting the subtraction to see how it
    +    # impacts the box's movement).
    +    if args.state.moving_box.x > screen_width - args.state.moving_box_size
    +      args.state.moving_box_dx = -1 # moves left
    +    elsif args.state.moving_box.x < 0
    +      args.state.moving_box_dx =  1 # moves right
    +    end
       
    -    # Present the sprite.
    -    args.outputs.sprites << [100, 300, 100, 100, "sprites/dragon_fly_#{sprite_index}.png"]
    +    # Here, we're making sure the moving box remains within the vertical scope of the screen
    +    if args.state.moving_box.y > screen_height - args.state.moving_box_size # if the box moves too high
    +      args.state.moving_box_dy = -1 # moves down
    +    elsif args.state.moving_box.y < 0 # if the box moves too low
    +      args.state.moving_box_dy =  1 # moves up
    +    end
    +  end
       
    -    tick_instructions args, "Sample app shows how to use Numeric#frame_index and string interpolation to animate a sprite over time."
    +  def determine_collision_center_box args
    +    # Collision is handled by the engine. You simply have to call the
    +    # `intersect_rect?` function.
    +    if args.state.moving_box.intersect_rect? args.state.center_box # if the two boxes intersect
    +      args.state.center_box_collision = true # then a collision happened
    +    else
    +      args.state.center_box_collision = false # otherwise, no collision happened
    +    end
       end
       
       def tick_instructions args, text, y = 715
    @@ -5381,932 +5401,794 @@ Follows is a source code listing for all files that have been open sourced. This
     
     #+end_src
     
    -*** Rendering Sprites - Animation Using Sprite Sheet - main.rb
    +*** Physics And Collisions - Moving Objects - main.rb
     #+begin_src ruby
    -  # ./samples/03_rendering_sprites/02_animation_using_sprite_sheet/app/main.rb
    -  def tick args
    -    args.state.player.x ||= 100
    -    args.state.player.y ||= 100
    -    args.state.player.w ||= 64
    -    args.state.player.h ||= 64
    -    args.state.player.direction ||= 1
    +  # ./samples/04_physics_and_collisions/02_moving_objects/app/main.rb
    +  =begin
       
    -    args.state.player.is_moving = false
    +   APIs listing that haven't been encountered in previous sample apps:
       
    -    # get the keyboard input and set player properties
    -    if args.inputs.keyboard.right
    -      args.state.player.x += 3
    -      args.state.player.direction = 1
    -      args.state.player.started_running_at ||= args.state.tick_count
    -    elsif args.inputs.keyboard.left
    -      args.state.player.x -= 3
    -      args.state.player.direction = -1
    -      args.state.player.started_running_at ||= args.state.tick_count
    -    end
    +   - Hashes: Collection of unique keys and their corresponding values. The value can be found
    +     using their keys.
       
    -    if args.inputs.keyboard.up
    -      args.state.player.y += 1
    -      args.state.player.started_running_at ||= args.state.tick_count
    -    elsif args.inputs.keyboard.down
    -      args.state.player.y -= 1
    -      args.state.player.started_running_at ||= args.state.tick_count
    -    end
    +     For example, if we have a "numbers" hash that stores numbers in English as the
    +     key and numbers in Spanish as the value, we'd have a hash that looks like this...
    +     numbers = { "one" => "uno", "two" => "dos", "three" => "tres" }
    +     and on it goes.
       
    -    # if no arrow keys are being pressed, set the player as not moving
    -    if !args.inputs.keyboard.directional_vector
    -      args.state.player.started_running_at = nil
    -    end
    +     Now if we wanted to find the corresponding value of the "one" key, we could say
    +     puts numbers["one"]
    +     which would print "uno" to the console.
       
    -    # wrap player around the stage
    -    if args.state.player.x > 1280
    -      args.state.player.x = -64
    -      args.state.player.started_running_at ||= args.state.tick_count
    -    elsif args.state.player.x < -64
    -      args.state.player.x = 1280
    -      args.state.player.started_running_at ||= args.state.tick_count
    -    end
    +   - num1.greater(num2): Returns the greater value.
    +     For example, if we have the command
    +     puts 4.greater(3)
    +     the number 4 would be printed to the console since it has a greater value than 3.
    +     Similar to lesser, which returns the lesser value.
       
    -    if args.state.player.y > 720
    -      args.state.player.y = -64
    -      args.state.player.started_running_at ||= args.state.tick_count
    -    elsif args.state.player.y < -64
    -      args.state.player.y = 720
    -      args.state.player.started_running_at ||= args.state.tick_count
    -    end
    +   - num1.lesser(num2): Finds the lower value of the given options.
    +     For example, in the statement
    +     a = 4.lesser(3)
    +     3 has a lower value than 4, which means that the value of a would be set to 3,
    +     but if the statement had been
    +     a = 4.lesser(5)
    +     4 has a lower value than 5, which means that the value of a would be set to 4.
       
    -    # render player as standing or running
    -    if args.state.player.started_running_at
    -      args.outputs.sprites << running_sprite(args)
    -    else
    -      args.outputs.sprites << standing_sprite(args)
    -    end
    -    args.outputs.labels << [30, 700, "Use arrow keys to move around."]
    +   - reject: Removes elements from a collection if they meet certain requirements.
    +     For example, you can derive an array of odd numbers from an original array of
    +     numbers 1 through 10 by rejecting all elements that are even (or divisible by 2).
    +  
    +   - find_all: Finds all values that satisfy specific requirements.
    +     For example, you can find all elements of a collection that are divisible by 2
    +     or find all objects that have intersected with another object.
    +  
    +   - abs: Returns the absolute value.
    +     For example, the command
    +     (-30).abs
    +     would return 30 as a result.
    +  
    +   - map: Ruby method used to transform data; used in arrays, hashes, and collections.
    +     Can be used to perform an action on every element of a collection, such as multiplying
    +     each element by 2 or declaring every element as a new entity.
    +  
    +   Reminders:
    +  
    +   - args.inputs.keyboard.KEY: Determines if a key has been pressed.
    +     For more information about the keyboard, take a look at mygame/documentation/06-keyboard.md.
    +  
    +   - ARRAY#intersect_rect?: Returns true or false depending on if the two rectangles intersect.
    +  
    +   - args.outputs.solids: An array. The values generate a solid.
    +     The parameters are [X, Y, WIDTH, HEIGHT, RED, GREEN, BLUE]
    +     For more information about solids, go to mygame/documentation/03-solids-and-borders.md.
    +  
    +  =end
    +  
    +  # Calls methods needed for game to run properly
    +  def tick args
    +    tick_instructions args, "Use LEFT and RIGHT arrow keys to move and SPACE to jump."
    +    defaults args
    +    render args
    +    calc args
    +    input args
       end
       
    -  def standing_sprite args
    -    {
    -      x: args.state.player.x,
    -      y: args.state.player.y,
    -      w: args.state.player.w,
    -      h: args.state.player.h,
    -      path: "sprites/horizontal-stand.png",
    -      flip_horizontally: args.state.player.direction > 0
    -    }
    +  # sets default values and creates empty collections
    +  # initialization only happens in the first frame
    +  def defaults args
    +    fiddle args
    +    args.state.enemy.hammers ||= []
    +    args.state.enemy.hammer_queue ||= []
    +    args.state.tick_count = args.state.tick_count
    +    args.state.bridge_top = 128
    +    args.state.player.x  ||= 0                        # initializes player's properties
    +    args.state.player.y  ||= args.state.bridge_top
    +    args.state.player.w  ||= 64
    +    args.state.player.h  ||= 64
    +    args.state.player.dy ||= 0
    +    args.state.player.dx ||= 0
    +    args.state.enemy.x   ||= 800                      # initializes enemy's properties
    +    args.state.enemy.y   ||= 0
    +    args.state.enemy.w   ||= 128
    +    args.state.enemy.h   ||= 128
    +    args.state.enemy.dy  ||= 0
    +    args.state.enemy.dx  ||= 0
    +    args.state.game_over_at ||= 0
       end
       
    -  def running_sprite args
    -    if !args.state.player.started_running_at
    -      tile_index = 0
    -    else
    -      how_many_frames_in_sprite_sheet = 6
    -      how_many_ticks_to_hold_each_frame = 3
    -      should_the_index_repeat = true
    -      tile_index = args.state
    -                       .player
    -                       .started_running_at
    -                       .frame_index(how_many_frames_in_sprite_sheet,
    -                                    how_many_ticks_to_hold_each_frame,
    -                                    should_the_index_repeat)
    +  # sets enemy, player, hammer values
    +  def fiddle args
    +    args.state.gravity                     = -0.3
    +    args.state.enemy_jump_power            = 10       # sets enemy values
    +    args.state.enemy_jump_interval         = 60
    +    args.state.hammer_throw_interval       = 40       # sets hammer values
    +    args.state.hammer_launch_power_default = 5
    +    args.state.hammer_launch_power_near    = 2
    +    args.state.hammer_launch_power_far     = 7
    +    args.state.hammer_upward_launch_power  = 15
    +    args.state.max_hammers_per_volley      = 10
    +    args.state.gap_between_hammers         = 10
    +    args.state.player_jump_power           = 10       # sets player values
    +    args.state.player_jump_power_duration  = 10
    +    args.state.player_max_run_speed        = 10
    +    args.state.player_speed_slowdown_rate  = 0.9
    +    args.state.player_acceleration         = 1
    +    args.state.hammer_size                 = 32
    +  end
    +  
    +  # outputs objects onto the screen
    +  def render args
    +    args.outputs.solids << 20.map_with_index do |i| # uses 20 squares to form bridge
    +      # sets x by multiplying 64 to index to find pixel value (places all squares side by side)
    +      # subtracts 64 from bridge_top because position is denoted by bottom left corner
    +      [i * 64, args.state.bridge_top - 64, 64, 64]
         end
       
    -    {
    -      x: args.state.player.x,
    -      y: args.state.player.y,
    -      w: args.state.player.w,
    -      h: args.state.player.h,
    -      path: 'sprites/horizontal-run.png',
    -      tile_x: 0 + (tile_index * args.state.player.w),
    -      tile_y: 0,
    -      tile_w: args.state.player.w,
    -      tile_h: args.state.player.h,
    -      flip_horizontally: args.state.player.direction > 0,
    -    }
    +    args.outputs.solids << [args.state.x, args.state.y, args.state.w, args.state.h, 255, 0, 0]
    +    args.outputs.solids << [args.state.player.x, args.state.player.y, args.state.player.w, args.state.player.h, 255, 0, 0] # outputs player onto screen (red box)
    +    args.outputs.solids << [args.state.enemy.x, args.state.enemy.y, args.state.enemy.w, args.state.enemy.h, 0, 255, 0] # outputs enemy onto screen (green box)
    +    args.outputs.solids << args.state.enemy.hammers # outputs enemy's hammers onto screen
       end
    -
    -#+end_src
    -
    -*** Rendering Sprites - Animation States - main.rb
    -#+begin_src ruby
    -  # ./samples/03_rendering_sprites/03_animation_states/app/main.rb
    -  class Game
    -    attr_gtk
       
    -    def defaults
    -      state.show_debug_layer  = true if state.tick_count == 0
    -      player.tile_size        = 64
    -      player.speed            = 3
    -      player.slash_frames     = 15
    -      player.x              ||= 50
    -      player.y              ||= 400
    -      player.dir_x          ||=  1
    -      player.dir_y          ||= -1
    -      player.is_moving      ||= false
    -      state.watch_list      ||= {}
    -      state.enemies         ||= []
    -    end
    +  # Performs calculations to move objects on the screen
    +  def calc args
       
    -    def add_enemy
    -      state.enemies << { x: 1200 * rand, y: 600 * rand, w: 64, h: 64 }
    -    end
    +    # Since velocity is the change in position, the change in x increases by dx. Same with y and dy.
    +    args.state.player.x  += args.state.player.dx
    +    args.state.player.y  += args.state.player.dy
       
    -    def sprite_horizontal_run
    -      tile_index = 0.frame_index(6, 3, true)
    -      tile_index = 0 if !player.is_moving
    +    # Since acceleration is the change in velocity, the change in y (dy) increases every frame
    +    args.state.player.dy += args.state.gravity
       
    -      {
    -        x: player.x,
    -        y: player.y,
    -        w: player.tile_size,
    -        h: player.tile_size,
    -        path: 'sprites/horizontal-run.png',
    -        tile_x: 0 + (tile_index * player.tile_size),
    -        tile_y: 0,
    -        tile_w: player.tile_size,
    -        tile_h: player.tile_size,
    -        flip_horizontally: player.dir_x > 0,
    -        # a: 40
    -      }
    -    end
    +    # player's y position is either current y position or y position of top of
    +    # bridge, whichever has a greater value
    +    # ensures that the player never goes below the bridge
    +    args.state.player.y  = args.state.player.y.greater(args.state.bridge_top)
       
    -    def sprite_horizontal_stand
    -      {
    -        x: player.x,
    -        y: player.y,
    -        w: player.tile_size,
    -        h: player.tile_size,
    -        path: 'sprites/horizontal-stand.png',
    -        flip_horizontally: player.dir_x > 0,
    -        # a: 40
    -      }
    -    end
    +    # player's x position is either the current x position or 0, whichever has a greater value
    +    # ensures that the player doesn't go too far left (out of the screen's scope)
    +    args.state.player.x  = args.state.player.x.greater(0)
       
    -    def sprite_horizontal_slash
    -      tile_index   = player.slash_at.frame_index(5, player.slash_frames.idiv(5), false) || 0
    +    # player is not falling if it is located on the top of the bridge
    +    args.state.player.falling = false if args.state.player.y == args.state.bridge_top
    +    args.state.player.rect = [args.state.player.x, args.state.player.y, args.state.player.h, args.state.player.w] # sets definition for player
       
    -      {
    -        x: player.x - 41.25,
    -        y: player.y - 41.25,
    -        w: 165,
    -        h: 165,
    -        path: 'sprites/horizontal-slash.png',
    -        tile_x: 0 + (tile_index * 128),
    -        tile_y: 0,
    -        tile_w: 128,
    -        tile_h: 128,
    -        flip_horizontally: player.dir_x > 0
    -      }
    -    end
    +    args.state.enemy.x += args.state.enemy.dx # velocity; change in x increases by dx
    +    args.state.enemy.y += args.state.enemy.dy # same with y and dy
       
    -    def render_player
    -      if player.slash_at
    -        outputs.sprites << sprite_horizontal_slash
    -      elsif player.is_moving
    -        outputs.sprites << sprite_horizontal_run
    -      else
    -        outputs.sprites << sprite_horizontal_stand
    -      end
    -    end
    +    # ensures that the enemy never goes below the bridge
    +    args.state.enemy.y  = args.state.enemy.y.greater(args.state.bridge_top)
       
    -    def render_enemies
    -      outputs.borders << state.enemies
    -    end
    +    # ensures that the enemy never goes too far left (outside the screen's scope)
    +    args.state.enemy.x  = args.state.enemy.x.greater(0)
       
    -    def render_debug_layer
    -      return if !state.show_debug_layer
    -      outputs.labels << state.watch_list.map.with_index do |(k, v), i|
    -         [30, 710 - i * 28, "#{k}: #{v || "(nil)"}"]
    -      end
    +    # objects that go up must come down because of gravity
    +    args.state.enemy.dy += args.state.gravity
       
    -      outputs.borders << player.slash_collision_rect
    +    args.state.enemy.y  = args.state.enemy.y.greater(args.state.bridge_top)
    +  
    +    #sets definition of enemy
    +    args.state.enemy.rect = [args.state.enemy.x, args.state.enemy.y, args.state.enemy.h, args.state.enemy.w]
    +  
    +    if args.state.enemy.y == args.state.bridge_top # if enemy is located on the top of the bridge
    +      args.state.enemy.dy = 0 # there is no change in y
         end
       
    -    def slash_initiate?
    -      # buffalo usb controller has a button and b button swapped lol
    -      inputs.controller_one.key_down.a || inputs.keyboard.key_down.j
    +    # if 60 frames have passed and the enemy is not moving vertically
    +    if args.state.tick_count.mod_zero?(args.state.enemy_jump_interval) && args.state.enemy.dy == 0
    +      args.state.enemy.dy = args.state.enemy_jump_power # the enemy jumps up
         end
       
    -    def input
    -      # player movement
    -      if slash_complete? && (vector = inputs.directional_vector)
    -        player.x += vector.x * player.speed
    -        player.y += vector.y * player.speed
    +    # if 40 frames have passed or 5 frames have passed since the game ended
    +    if args.state.tick_count.mod_zero?(args.state.hammer_throw_interval) || args.state.game_over_at.elapsed_time == 5
    +      # rand will return a number greater than or equal to 0 and less than given variable's value (since max is excluded)
    +      # that is why we're adding 1, to include the max possibility
    +      volley_dx   = (rand(args.state.hammer_launch_power_default) + 1) * -1 # horizontal movement (follow order of operations)
    +  
    +      # if the horizontal distance between the player and enemy is less than 128 pixels
    +      if (args.state.player.x - args.state.enemy.x).abs < 128
    +        # the change in x won't be that great since the enemy and player are closer to each other
    +        volley_dx = (rand(args.state.hammer_launch_power_near) + 1) * -1
           end
    -      player.slash_at = slash_initiate? if slash_initiate?
    -    end
       
    -    def calc_movement
    -      # movement
    -      if vector = inputs.directional_vector
    -        state.debug_label = vector
    -        player.dir_x = vector.x
    -        player.dir_y = vector.y
    -        player.is_moving = true
    -      else
    -        state.debug_label = vector
    -        player.is_moving = false
    +      # if the horizontal distance between the player and enemy is greater than 300 pixels
    +      if (args.state.player.x - args.state.enemy.x).abs > 300
    +        # change in x will be more drastic since player and enemy are so far apart
    +        volley_dx = (rand(args.state.hammer_launch_power_far) + 1) * -1 # more drastic change
           end
    -    end
       
    -    def calc_slash
    -      # re-calc the location of the swords collision box
    -      if player.dir_x.positive?
    -        player.slash_collision_rect = [player.x + player.tile_size,
    -                                       player.y + player.tile_size.half - 10,
    -                                       40, 20]
    -      else
    -        player.slash_collision_rect = [player.x - 32 - 8,
    -                                       player.y + player.tile_size.half - 10,
    -                                       40, 20]
    +      (rand(args.state.max_hammers_per_volley) + 1).map_with_index do |i|
    +        args.state.enemy.hammer_queue << { # stores hammer values in a hash
    +          x: args.state.enemy.x,
    +          w: args.state.hammer_size,
    +          h: args.state.hammer_size,
    +          dx: volley_dx, # change in horizontal position
    +          # multiplication operator takes precedence over addition operator
    +          throw_at: args.state.tick_count + i * args.state.gap_between_hammers
    +        }
           end
    +    end
       
    -      # recalc sword's slash state
    -      player.slash_at = nil if slash_complete?
    +    # add elements from hammer_queue collection to the hammers collection by
    +    # finding all hammers that were thrown before the current frame (have already been thrown)
    +    args.state.enemy.hammers += args.state.enemy.hammer_queue.find_all do |h|
    +      h[:throw_at] < args.state.tick_count
    +    end
       
    -      # determine collision if the sword is at it's point of damaging
    -      return unless slash_can_damage?
    +    args.state.enemy.hammers.each do |h| # sets values for all hammers in collection
    +      h[:y]  ||= args.state.enemy.y + 130
    +      h[:dy] ||= args.state.hammer_upward_launch_power
    +      h[:dy]  += args.state.gravity # acceleration is change in gravity
    +      h[:x]   += h[:dx] # incremented by change in position
    +      h[:y]   += h[:dy]
    +      h[:rect] = [h[:x], h[:y], h[:w], h[:h]] # sets definition of hammer's rect
    +    end
       
    -      state.enemies.reject! { |e| e.intersect_rect? player.slash_collision_rect }
    +    # reject hammers that have been thrown before current frame (have already been thrown)
    +    args.state.enemy.hammer_queue = args.state.enemy.hammer_queue.reject do |h|
    +      h[:throw_at] < args.state.tick_count
         end
       
    -    def slash_complete?
    -      !player.slash_at || player.slash_at.elapsed?(player.slash_frames)
    +    # any hammers with a y position less than 0 are rejected from the hammers collection
    +    # since they have gone too far down (outside the scope's screen)
    +    args.state.enemy.hammers = args.state.enemy.hammers.reject { |h| h[:y] < 0 }
    +  
    +    # if there are any hammers that intersect with (or hit) the player,
    +    # the reset_player method is called (so the game can start over)
    +    if args.state.enemy.hammers.any? { |h| h[:rect].intersect_rect?(args.state.player.rect) }
    +      reset_player args
         end
       
    -    def slash_can_damage?
    -      # damage occurs half way into the slash animation
    -      return false if slash_complete?
    -      return false if (player.slash_at + player.slash_frames.idiv(2)) != state.tick_count
    -      return true
    +    # if the enemy's rect intersects with (or hits) the player,
    +    # the reset_player method is called (so the game can start over)
    +    if args.state.enemy.rect.intersect_rect? args.state.player.rect
    +      reset_player args
         end
    +  end
       
    -    def calc
    -      # generate an enemy if there aren't any on the screen
    -      add_enemy if state.enemies.length == 0
    -      calc_movement
    -      calc_slash
    +  # Resets the player by changing its properties back to the values they had at initialization
    +  def reset_player args
    +    args.state.player.x = 0
    +    args.state.player.y = args.state.bridge_top
    +    args.state.player.dy = 0
    +    args.state.player.dx = 0
    +    args.state.enemy.hammers.clear # empties hammer collection
    +    args.state.enemy.hammer_queue.clear # empties hammer_queue
    +    args.state.game_over_at = args.state.tick_count # game_over_at set to current frame (or passage of time)
    +  end
    +  
    +  # Processes input from the user to move the player
    +  def input args
    +    if args.inputs.keyboard.space # if the user presses the space bar
    +      args.state.player.jumped_at ||= args.state.tick_count # jumped_at is set to current frame
    +  
    +      # if the time that has passed since the jump is less than the player's jump duration and
    +      # the player is not falling
    +      if args.state.player.jumped_at.elapsed_time < args.state.player_jump_power_duration && !args.state.player.falling
    +        args.state.player.dy = args.state.player_jump_power # change in y is set to power of player's jump
    +      end
         end
       
    -    # source is at http://github.com/amirrajan/dragonruby-link-to-the-past
    -    def tick
    -      defaults
    -      render_enemies
    -      render_player
    -      outputs.labels << [30, 30, "Gamepad: D-Pad to move. B button to attack."]
    -      outputs.labels << [30, 52, "Keyboard: WASD/Arrow keys to move. J to attack."]
    -      render_debug_layer
    -      input
    -      calc
    +    # if the space bar is in the "up" state (or not being pressed down)
    +    if args.inputs.keyboard.key_up.space
    +      args.state.player.jumped_at = nil # jumped_at is empty
    +      args.state.player.falling = true # the player is falling
         end
       
    -    def player
    -      state.player
    +    if args.inputs.keyboard.left # if left key is pressed
    +      args.state.player.dx -= args.state.player_acceleration # dx decreases by acceleration (player goes left)
    +      # dx is either set to current dx or the negative max run speed (which would be -10),
    +      # whichever has a greater value
    +      args.state.player.dx = args.state.player.dx.greater(-args.state.player_max_run_speed)
    +    elsif args.inputs.keyboard.right # if right key is pressed
    +      args.state.player.dx += args.state.player_acceleration # dx increases by acceleration (player goes right)
    +      # dx is either set to current dx or max run speed (which would be 10),
    +      # whichever has a lesser value
    +      args.state.player.dx = args.state.player.dx.lesser(args.state.player_max_run_speed)
    +    else
    +      args.state.player.dx *= args.state.player_speed_slowdown_rate # dx is scaled down
         end
       end
       
    -  $game = Game.new
    +  def tick_instructions args, text, y = 715
    +    return if args.state.key_event_occurred
    +    if args.inputs.mouse.click ||
    +       args.inputs.keyboard.directional_vector ||
    +       args.inputs.keyboard.key_down.enter ||
    +       args.inputs.keyboard.key_down.space ||
    +       args.inputs.keyboard.key_down.escape
    +      args.state.key_event_occurred = true
    +    end
       
    -  def tick args
    -    $game.args = args
    -    $game.tick
    +    args.outputs.debug << [0, y - 50, 1280, 60].solid
    +    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label
    +    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label
       end
    -  
    -  $gtk.reset
     
     #+end_src
     
    -*** Rendering Sprites - Color And Rotation - main.rb
    +*** Physics And Collisions - Entities - main.rb
     #+begin_src ruby
    -  # ./samples/03_rendering_sprites/04_color_and_rotation/app/main.rb
    +  # ./samples/04_physics_and_collisions/03_entities/app/main.rb
       =begin
    -   APIs listing that haven't been encountered in previous sample apps:
    -  
    -   - merge: Returns a hash containing the contents of two original hashes.
    -     Merge does not allow duplicate keys, so the value of a repeated key
    -     will be overwritten.
    -  
    -     For example, if we had two hashes
    -     h1 = { "a" => 1, "b" => 2}
    -     h2 = { "b" => 3, "c" => 3}
    -     and we called the command
    -     h1.merge(h2)
    -     the result would the following hash
    -     { "a" => 1, "b" => 3, "c" => 3}.
       
        Reminders:
       
    -   - Hashes: Collection of unique keys and their corresponding values. The value can be found
    -     using their keys.
    -     In this sample app, we're using a hash to create a sprite.
    +   - map: Ruby method used to transform data; used in arrays, hashes, and collections.
    +     Can be used to perform an action on every element of a collection, such as multiplying
    +     each element by 2 or declaring every element as a new entity.
       
    -   - args.outputs.sprites: An array. The values generate a sprite.
    -     The parameters are [X, Y, WIDTH, HEIGHT, PATH, ANGLE, ALPHA, RED, GREEN, BLUE]
    -     Before continuing with this sample app, it is HIGHLY recommended that you look
    -     at mygame/documentation/05-sprites.md.
    +   - reject: Removes elements from a collection if they meet certain requirements.
    +     For example, you can derive an array of odd numbers from an original array of
    +     numbers 1 through 10 by rejecting all elements that are even (or divisible by 2).
       
    -   - args.inputs.keyboard.key_held.KEY: Determines if a key is being pressed.
    -     For more information about the keyboard, go to mygame/documentation/06-keyboard.md.
    +   - args.state.new_entity: Used when we want to create a new object, like a sprite or button.
    +     In this sample app, new_entity is used to define the properties of enemies and bullets.
    +     (Remember, you can use state to define ANY property and it will be retained across frames.)
       
    -   - args.inputs.controller_one: Takes input from the controller based on what key is pressed.
    -     For more information about the controller, go to mygame/documentation/08-controllers.md.
    +   - args.outputs.labels: An array. The values generate a label on the screen.
    +     The parameters are [X, Y, TEXT, SIZE, ALIGN, RED, GREEN, BLUE, ALPHA, FONT STYLE]
       
    -   - num1.lesser(num2): Finds the lower value of the given options.
    +   - ARRAY#intersect_rect?: Returns true or false depending on if the two rectangles intersect.
    +  
    +   - args.inputs.mouse.click.point.(x|y): The x and y location of the mouse.
       
       =end
       
    -  # This sample app shows a car moving across the screen. It loops back around if it exceeds the dimensions of the screen,
    -  # and also can be moved in different directions through keyboard input from the user.
    +  # This sample app shows enemies that contain an id value and the time they were created.
    +  # These enemies can be removed by shooting at them with bullets.
       
    -  # Calls the methods necessary for the game to run successfully.
    +  # Calls all methods necessary for the game to function properly.
       def tick args
    -    default args
    -    render args.grid, args.outputs, args.state
    -    calc args.state
    +    tick_instructions args, "Sample app shows how to use args.state.new_entity along with collisions. CLICK to shoot a bullet."
    +    defaults args
    +    render args
    +    calc args
         process_inputs args
       end
       
    -  # Sets default values for the car sprite
    -  # Initialization ||= only happens in the first frame
    -  def default args
    -    args.state.sprite.width    = 19
    -    args.state.sprite.height   = 10
    -    args.state.sprite.scale    = 4
    -    args.state.max_speed       = 5
    -    args.state.x             ||= 100
    -    args.state.y             ||= 100
    -    args.state.speed         ||= 1
    -    args.state.angle         ||= 0
    +  # Sets default values
    +  # Enemies and bullets start off as empty collections
    +  def defaults args
    +    args.state.enemies ||= []
    +    args.state.bullets ||= []
       end
       
    -  # Outputs sprite onto screen
    -  def render grid, outputs, state
    -    outputs.solids  <<  [grid.rect, 70, 70, 70] # outputs gray background
    -    outputs.sprites <<  [destination_rect(state), # sets first four parameters of car sprite
    -    'sprites/86.png', # image path of car
    -    state.angle,
    -    opacity, # transparency
    -    saturation,
    -    source_rect(state), # sprite sub division/tile (tile x, y, w, h)
    -    false, false,  # don't flip sprites
    -    rotation_anchor]
    +  # Provides each enemy in enemies collection with rectangular border,
    +  # as well as a label showing id and when they were created
    +  def render args
    +    # When you're calling a method that takes no arguments, you can use this & syntax on map.
    +    # Numbers are being added to x and y in order to keep the text within the enemy's borders.
    +    args.outputs.borders << args.state.enemies.map(&:rect)
    +    args.outputs.labels  << args.state.enemies.flat_map do |enemy|
    +      [
    +        [enemy.x + 4, enemy.y + 29, "id: #{enemy.entity_id}", -3, 0],
    +        [enemy.x + 4, enemy.y + 17, "created_at: #{enemy.created_at}", -3, 0] # frame enemy was created
    +      ]
    +    end
       
    -    # also look at the create_sprite helper method
    -    #
    -    # For example:
    -    #
    -    # dest   = destination_rect(state)
    -    # source = source_rect(state),
    -    # outputs.sprites << create_sprite(
    -    #   'sprites/86.png',
    -    #   x: dest.x,
    -    #   y: dest.y,
    -    #   w: dest.w,
    -    #   h: dest.h,
    -    #   angle: state.angle,
    -    #   source_x: source.x,
    -    #   source_y: source.y,
    -    #   source_w: source.w,
    -    #   source_h: source.h,
    -    #   flip_h: false,
    -    #   flip_v: false,
    -    #   rotation_anchor_x: 0.7,
    -    #   rotation_anchor_y: 0.5
    -    # )
    +    # Outputs bullets in bullets collection as rectangular solids
    +    args.outputs.solids << args.state.bullets.map(&:rect)
       end
       
    -  # Creates sprite by setting values inside of a hash
    -  def create_sprite path, options = {}
    -    options = {
    -  
    -      # dest x, y, w, h
    -      x: 0,
    -      y: 0,
    -      w: 100,
    -      h: 100,
    -  
    -      # angle, rotation
    -      angle: 0,
    -      rotation_anchor_x: 0.5,
    -      rotation_anchor_y: 0.5,
    -  
    -      # color saturation (red, green, blue), transparency
    -      r: 255,
    -      g: 255,
    -      b: 255,
    -      a: 255,
    -  
    -      # source x, y, width, height
    -      source_x: 0,
    -      source_y: 0,
    -      source_w: -1,
    -      source_h: -1,
    -  
    -      # flip horiztonally, flip vertically
    -      flip_h: false,
    -      flip_v: false,
    -  
    -    }.merge options
    -  
    -    [
    -      options[:x], options[:y], options[:w], options[:h], # dest rect keys
    -      path,
    -      options[:angle], options[:a], options[:r], options[:g], options[:b], # angle, color, alpha
    -      options[:source_x], options[:source_y], options[:source_w], options[:source_h], # source rect keys
    -      options[:flip_h], options[:flip_v], # flip
    -      options[:rotation_anchor_x], options[:rotation_anchor_y], # rotation anchor
    -    ] # hash keys contain corresponding values
    +  # Calls all methods necessary for performing calculations
    +  def calc args
    +    add_new_enemies_if_needed args
    +    move_bullets args
    +    calculate_collisions args
    +    remove_bullets_of_screen args
       end
       
    -  # Calls the calc_pos and calc_wrap methods.
    -  def calc state
    -    calc_pos state
    -    calc_wrap state
    -  end
    +  # Adds enemies to the enemies collection and sets their values
    +  def add_new_enemies_if_needed args
    +    return if args.state.enemies.length >= 10 # if 10 or more enemies, enemies are not added
    +    return unless args.state.bullets.length == 0 # if user has not yet shot bullet, no enemies are added
       
    -  # Changes sprite's position on screen
    -  # Vectors have magnitude and direction, so the incremented x and y values give the car direction
    -  def calc_pos state
    -    state.x     += state.angle.vector_x * state.speed # increments x by product of angle's x vector and speed
    -    state.y     += state.angle.vector_y * state.speed # increments y by product of angle's y vector and speed
    -    state.speed *= 1.1 # scales speed up
    -    state.speed  = state.speed.lesser(state.max_speed) # speed is either current speed or max speed, whichever has a lesser value (ensures that the car doesn't go too fast or exceed the max speed)
    +    args.state.enemies += (10 - args.state.enemies.length).map do # adds enemies so there are 10 total
    +      args.state.new_entity(:enemy) do |e| # each enemy is declared as a new entity
    +        e.x = 640 + 500 * rand # each enemy is given random position on screen
    +        e.y = 600 * rand + 50
    +        e.rect = [e.x, e.y, 130, 30] # sets definition for enemy's rect
    +      end
    +    end
       end
       
    -  # The screen's dimensions are 1280x720. If the car goes out of scope,
    -  # it loops back around on the screen.
    -  def calc_wrap state
    -  
    -    # car returns to left side of screen if it disappears on right side of screen
    -    # sprite.width refers to tile's size, which is multipled by scale (4) to make it bigger
    -    state.x = -state.sprite.width * state.sprite.scale if state.x - 20 > 1280
    -  
    -    # car wraps around to right side of screen if it disappears on the left side
    -    state.x = 1280 if state.x + state.sprite.width * state.sprite.scale + 20 < 0
    -  
    -    # car wraps around to bottom of screen if it disappears at the top of the screen
    -    # if you subtract 520 pixels instead of 20 pixels, the car takes longer to reappear (try it!)
    -    state.y = 0    if state.y - 20 > 720 # if 20 pixels less than car's y position is greater than vertical scope
    +  # Moves bullets across screen
    +  # Sets definition of the bullets
    +  def move_bullets args
    +    args.state.bullets.each do |bullet| # perform action on each bullet in collection
    +      bullet.x += bullet.speed # increment x by speed (bullets fly horizontally across screen)
       
    -    # car wraps around to top of screen if it disappears at the bottom of the screen
    -    state.y = 720  if state.y + state.sprite.height * state.sprite.scale + 20 < 0
    +      # By randomizing the value that increments bullet.y, the bullet does not fly straight up and out
    +      # of the scope of the screen. Try removing what follows bullet.speed, or changing 0.25 to 1.25 to
    +      # see what happens to the bullet's movement.
    +      bullet.y += bullet.speed.*(0.25).randomize(:ratio, :sign)
    +      bullet.rect = [bullet.x, bullet.y, bullet.size, bullet.size] # sets definition of bullet's rect
    +    end
       end
       
    -  # Changes angle of sprite based on user input from keyboard or controller
    -  def process_inputs args
    -  
    -    # NOTE: increasing the angle doesn't mean that the car will continue to go
    -    # in a specific direction. The angle is increasing, which means that if the
    -    # left key was kept in the "down" state, the change in the angle would cause
    -    # the car to go in a counter-clockwise direction and form a circle (360 degrees)
    -    if args.inputs.keyboard.key_held.left # if left key is pressed
    -      args.state.angle += 2 # car's angle is incremented by 2
    -  
    -    # The same applies to decreasing the angle. If the right key was kept in the
    -    # "down" state, the decreasing angle would cause the car to go in a clockwise
    -    # direction and form a circle (360 degrees)
    -    elsif args.inputs.keyboard.key_held.right # if right key is pressed
    -      args.state.angle -= 2 # car's angle is decremented by 2
    -  
    -    # Input from a controller can also change the angle of the car
    -    elsif args.inputs.controller_one.left_analog_x_perc != 0
    -      args.state.angle += 2 * args.inputs.controller_one.left_analog_x_perc * -1
    +  # Determines if a bullet hits an enemy
    +  def calculate_collisions args
    +    args.state.bullets.each do |bullet| # perform action on every bullet and enemy in collections
    +      args.state.enemies.each do |enemy|
    +        # if bullet has not exploded yet and the bullet hits an enemy
    +        if !bullet.exploded && bullet.rect.intersect_rect?(enemy.rect)
    +          bullet.exploded = true # bullet explodes
    +          enemy.dead = true # enemy is killed
    +        end
    +      end
         end
    -  end
       
    -  # A sprite's center of rotation can be altered
    -  # Increasing either of these numbers would dramatically increase the
    -  # car's drift when it turns!
    -  def rotation_anchor
    -    [0.7, 0.5]
    +    # All exploded bullets are rejected or removed from the bullets collection
    +    # and any dead enemy is rejected from the enemies collection.
    +    args.state.bullets = args.state.bullets.reject(&:exploded)
    +    args.state.enemies = args.state.enemies.reject(&:dead)
       end
       
    -  # Sets opacity value of sprite to 255 so that it is not transparent at all
    -  # Change it to 0 and you won't be able to see the car sprite on the screen
    -  def opacity
    -    255
    +  # Bullets are rejected from bullets collection once their position exceeds the width of screen
    +  def remove_bullets_of_screen args
    +    args.state.bullets = args.state.bullets.reject { |bullet| bullet.x > 1280 } # screen width is 1280
       end
       
    -  # Sets the color of the sprite to white.
    -  def saturation
    -    [255, 255, 255]
    +  # Calls fire_bullet method
    +  def process_inputs args
    +    fire_bullet args
       end
       
    -  # Sets definition of destination_rect (used to define the car sprite)
    -  def destination_rect state
    -    [state.x, state.y,
    -    state.sprite.width  * state.sprite.scale, # multiplies by 4 to set size
    -    state.sprite.height * state.sprite.scale]
    +  # Once mouse is clicked by the user to fire a bullet, a new bullet is added to bullets collection
    +  def fire_bullet args
    +    return unless args.inputs.mouse.click # return unless mouse is clicked
    +    args.state.bullets << args.state.new_entity(:bullet) do |bullet| # new bullet is declared a new entity
    +      bullet.y = args.inputs.mouse.click.point.y # set to the y value of where the mouse was clicked
    +      bullet.x = 0 # starts on the left side of the screen
    +      bullet.size = 10
    +      bullet.speed = 10 * rand + 2 # speed of a bullet is randomized
    +      bullet.rect = [bullet.x, bullet.y, bullet.size, bullet.size] # definition is set
    +    end
       end
       
    -  # Portion of a sprite (a tile)
    -  # Sub division of sprite is denoted as a rectangle directly related to original size of .png
    -  # Tile is located at bottom left corner within a 19x10 pixel rectangle (based on sprite.width, sprite.height)
    -  def source_rect state
    -    [0, 0, state.sprite.width, state.sprite.height]
    +  def tick_instructions args, text, y = 715
    +    return if args.state.key_event_occurred
    +    if args.inputs.mouse.click ||
    +       args.inputs.keyboard.directional_vector ||
    +       args.inputs.keyboard.key_down.enter ||
    +       args.inputs.keyboard.key_down.space ||
    +       args.inputs.keyboard.key_down.escape
    +      args.state.key_event_occurred = true
    +    end
    +  
    +    args.outputs.debug << [0, y - 50, 1280, 60].solid
    +    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label
    +    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label
       end
     
     #+end_src
     
    -*** Physics And Collisions - Simple - main.rb
    +*** Physics And Collisions - Box Collision - main.rb
     #+begin_src ruby
    -  # ./samples/04_physics_and_collisions/01_simple/app/main.rb
    +  # ./samples/04_physics_and_collisions/04_box_collision/app/main.rb
       =begin
       
    -   Reminders:
    -   - ARRAY#intersect_rect?: Returns true or false depending on if the two rectangles intersect.
    -  
    -   - args.outputs.solids: An array. The values generate a solid.
    -     The parameters are [X, Y, WIDTH, HEIGHT, RED, GREEN, BLUE]
    +   APIs listing that haven't been encountered in previous sample apps:
       
    -  =end
    +   - first: Returns the first element of the array.
    +     For example, if we have an array
    +     numbers = [1, 2, 3, 4, 5]
    +     and we call first by saying
    +     numbers.first
    +     the number 1 will be returned because it is the first element of the numbers array.
       
    -  # This sample app shows collisions between two boxes.
    +   - num1.idiv(num2): Divides two numbers and returns an integer.
    +     For example,
    +     16.idiv(3) = 5, because 16 / 3 is 5.33333 returned as an integer.
    +     16.idiv(4) = 4, because 16 / 4 is 4 and already has no decimal.
       
    -  # Runs methods needed for game to run properly.
    -  def tick args
    -    tick_instructions args, "Sample app shows how to move a square over time and determine collision."
    -    defaults args
    -    render args
    -    calc args
    -  end
    +   Reminders:
       
    -  # Sets default values.
    -  def defaults args
    -    # These values represent the moving box.
    -    args.state.moving_box_speed   = 10
    -    args.state.moving_box_size    = 100
    -    args.state.moving_box_dx    ||=  1
    -    args.state.moving_box_dy    ||=  1
    -    args.state.moving_box       ||= [0, 0, args.state.moving_box_size, args.state.moving_box_size] # moving_box_size is set as the width and height
    +   - find_all: Finds all values that satisfy specific requirements.
       
    -    # These values represent the center box.
    -    args.state.center_box ||= [540, 260, 200, 200, 180]
    -    args.state.center_box_collision ||= false # initially no collision
    -  end
    +   - ARRAY#intersect_rect?: An array with at least four values is
    +     considered a rect. The intersect_rect? function returns true
    +     or false depending on if the two rectangles intersect.
       
    -  def render args
    -    # If the game state denotes that a collision has occured,
    -    # render a solid square, otherwise render a border instead.
    -    if args.state.center_box_collision
    -      args.outputs.solids << args.state.center_box
    -    else
    -      args.outputs.borders << args.state.center_box
    -    end
    +   - reject: Removes elements from a collection if they meet certain requirements.
       
    -    # Then render the moving box.
    -    args.outputs.solids << args.state.moving_box
    -  end
    +  =end
       
    -  # Generally in a pipeline for a game engine, you have rendering,
    -  # game simulation (calculation), and input processing.
    -  # This fuction represents the game simulation.
    -  def calc args
    -    position_moving_box args
    -    determine_collision_center_box args
    -  end
    +  # This sample app allows users to create tiles and place them anywhere on the screen as obstacles.
    +  # The player can then move and maneuver around them.
       
    -  # Changes the position of the moving box on the screen by multiplying the change in x (dx) and change in y (dy) by the speed,
    -  # and adding it to the current position.
    -  # dx and dy are positive if the box is moving right and up, respectively
    -  # dx and dy are negative if the box is moving left and down, respectively
    -  def position_moving_box args
    -    args.state.moving_box.x += args.state.moving_box_dx * args.state.moving_box_speed
    -    args.state.moving_box.y += args.state.moving_box_dy * args.state.moving_box_speed
    +  class PoorManPlatformerPhysics
    +    attr_accessor :grid, :inputs, :state, :outputs
       
    -    # 1280x720 are the virtual pixels you work with (essentially 720p).
    -    screen_width  = 1280
    -    screen_height = 720
    -  
    -    # Position of the box is denoted by the bottom left hand corner, in
    -    # that case, we have to subtract the width of the box so that it stays
    -    # in the scene (you can try deleting the subtraction to see how it
    -    # impacts the box's movement).
    -    if args.state.moving_box.x > screen_width - args.state.moving_box_size
    -      args.state.moving_box_dx = -1 # moves left
    -    elsif args.state.moving_box.x < 0
    -      args.state.moving_box_dx =  1 # moves right
    -    end
    -  
    -    # Here, we're making sure the moving box remains within the vertical scope of the screen
    -    if args.state.moving_box.y > screen_height - args.state.moving_box_size # if the box moves too high
    -      args.state.moving_box_dy = -1 # moves down
    -    elsif args.state.moving_box.y < 0 # if the box moves too low
    -      args.state.moving_box_dy =  1 # moves up
    -    end
    -  end
    -  
    -  def determine_collision_center_box args
    -    # Collision is handled by the engine. You simply have to call the
    -    # `intersect_rect?` function.
    -    if args.state.moving_box.intersect_rect? args.state.center_box # if the two boxes intersect
    -      args.state.center_box_collision = true # then a collision happened
    -    else
    -      args.state.center_box_collision = false # otherwise, no collision happened
    +    # Calls all methods necessary for the app to run successfully.
    +    def tick
    +      defaults
    +      render
    +      calc
    +      process_inputs
         end
    -  end
       
    -  def tick_instructions args, text, y = 715
    -    return if args.state.key_event_occurred
    -    if args.inputs.mouse.click ||
    -       args.inputs.keyboard.directional_vector ||
    -       args.inputs.keyboard.key_down.enter ||
    -       args.inputs.keyboard.key_down.escape
    -      args.state.key_event_occurred = true
    +    # Sets default values for variables.
    +    # The ||= sign means that the variable will only be set to the value following the = sign if the value has
    +    # not already been set before. Intialization happens only in the first frame.
    +    def defaults
    +      state.tile_size               = 64
    +      state.gravity                 = -0.2
    +      state.previous_tile_size    ||= state.tile_size
    +      state.x                     ||= 0
    +      state.y                     ||= 800
    +      state.dy                    ||= 0
    +      state.dx                    ||= 0
    +      state.world                 ||= []
    +      state.world_lookup          ||= {}
    +      state.world_collision_rects ||= []
         end
       
    -    args.outputs.debug << [0, y - 50, 1280, 60].solid
    -    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label
    -    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label
    -  end
    -
    -#+end_src
    -
    -*** Physics And Collisions - Moving Objects - main.rb
    -#+begin_src ruby
    -  # ./samples/04_physics_and_collisions/02_moving_objects/app/main.rb
    -  =begin
    +    # Outputs solids and borders of different colors for the world and collision_rects collections.
    +    def render
       
    -   APIs listing that haven't been encountered in previous sample apps:
    +      # Sets a black background on the screen (Comment this line out and the background will become white.)
    +      # Also note that black is the default color for when no color is assigned.
    +      outputs.solids << grid.rect
       
    -   - Hashes: Collection of unique keys and their corresponding values. The value can be found
    -     using their keys.
    +      # The position, size, and color (white) are set for borders given to the world collection.
    +      # Try changing the color by assigning different numbers (between 0 and 255) to the last three parameters.
    +      outputs.borders << state.world.map do |x, y|
    +        [x * state.tile_size,
    +         y * state.tile_size,
    +         state.tile_size,
    +         state.tile_size, 255, 255, 255]
    +      end
       
    -     For example, if we have a "numbers" hash that stores numbers in English as the
    -     key and numbers in Spanish as the value, we'd have a hash that looks like this...
    -     numbers = { "one" => "uno", "two" => "dos", "three" => "tres" }
    -     and on it goes.
    +      # The top, bottom, and sides of the borders for collision_rects are different colors.
    +      outputs.borders << state.world_collision_rects.map do |e|
    +        [
    +          [e[:top],                             0, 170,   0], # top is a shade of green
    +          [e[:bottom],                          0, 100, 170], # bottom is a shade of greenish-blue
    +          [e[:left_right],                    170,   0,   0], # left and right are a shade of red
    +        ]
    +      end
       
    -     Now if we wanted to find the corresponding value of the "one" key, we could say
    -     puts numbers["one"]
    -     which would print "uno" to the console.
    +      # Sets the position, size, and color (a shade of green) of the borders of only the player's
    +      # box and outputs it. If you change the 180 to 0, the player's box will be black and you
    +      # won't be able to see it (because it will match the black background).
    +      outputs.borders << [state.x,
    +                          state.y,
    +                          state.tile_size,
    +                          state.tile_size,  0, 180, 0]
    +    end
       
    -   - num1.greater(num2): Returns the greater value.
    -     For example, if we have the command
    -     puts 4.greater(3)
    -     the number 4 would be printed to the console since it has a greater value than 3.
    -     Similar to lesser, which returns the lesser value.
    +    # Calls methods needed to perform calculations.
    +    def calc
    +      calc_world_lookup
    +      calc_player
    +    end
       
    -   - num1.lesser(num2): Finds the lower value of the given options.
    -     For example, in the statement
    -     a = 4.lesser(3)
    -     3 has a lower value than 4, which means that the value of a would be set to 3,
    -     but if the statement had been
    -     a = 4.lesser(5)
    -     4 has a lower value than 5, which means that the value of a would be set to 4.
    +    # Performs calculations on world_lookup and sets values.
    +    def calc_world_lookup
       
    -   - reject: Removes elements from a collection if they meet certain requirements.
    -     For example, you can derive an array of odd numbers from an original array of
    -     numbers 1 through 10 by rejecting all elements that are even (or divisible by 2).
    +      # If the tile size isn't equal to the previous tile size,
    +      # the previous tile size is set to the tile size,
    +      # and world_lookup hash is set to empty.
    +      if state.tile_size != state.previous_tile_size
    +        state.previous_tile_size = state.tile_size
    +        state.world_lookup = {} # empty hash
    +      end
       
    -   - find_all: Finds all values that satisfy specific requirements.
    -     For example, you can find all elements of a collection that are divisible by 2
    -     or find all objects that have intersected with another object.
    +      # return if the world_lookup hash has keys (or, in other words, is not empty)
    +      # return unless the world collection has values inside of it (or is not empty)
    +      return if state.world_lookup.keys.length > 0
    +      return unless state.world.length > 0
       
    -   - abs: Returns the absolute value.
    -     For example, the command
    -     (-30).abs
    -     would return 30 as a result.
    +      # Starts with an empty hash for world_lookup.
    +      # Searches through the world and finds the coordinates that exist.
    +      state.world_lookup = {}
    +      state.world.each { |x, y| state.world_lookup[[x, y]] = true }
       
    -   - map: Ruby method used to transform data; used in arrays, hashes, and collections.
    -     Can be used to perform an action on every element of a collection, such as multiplying
    -     each element by 2 or declaring every element as a new entity.
    +      # Assigns world_collision_rects for every sprite drawn.
    +      state.world_collision_rects =
    +        state.world_lookup
    +            .keys
    +            .map do |coord_x, coord_y|
    +              s = state.tile_size
    +              # multiply by tile size so the grid coordinates; sets pixel value
    +              # don't forget that position is denoted by bottom left corner
    +              # set x = coord_x or y = coord_y and see what happens!
    +              x = s * coord_x
    +              y = s * coord_y
    +              {
    +                # The values added to x, y, and s position the world_collision_rects so they all appear
    +                # stacked (on top of world rects) but don't directly overlap.
    +                # Remove these added values and mess around with the rect placement!
    +                args:       [coord_x, coord_y],
    +                left_right: [x,     y + 4, s,     s - 6], # hash keys and values
    +                top:        [x + 4, y + 6, s - 8, s - 6],
    +                bottom:     [x + 1, y - 1, s - 2, s - 8],
    +              }
    +            end
    +    end
       
    -   Reminders:
    +    # Performs calculations to change the x and y values of the player's box.
    +    def calc_player
       
    -   - args.inputs.keyboard.KEY: Determines if a key has been pressed.
    -     For more information about the keyboard, take a look at mygame/documentation/06-keyboard.md.
    +      # Since acceleration is the change in velocity, the change in y (dy) increases every frame.
    +      # What goes up must come down because of gravity.
    +      state.dy += state.gravity
       
    -   - ARRAY#intersect_rect?: Returns true or false depending on if the two rectangles intersect.
    +      # Calls the calc_box_collision and calc_edge_collision methods.
    +      calc_box_collision
    +      calc_edge_collision
       
    -   - args.outputs.solids: An array. The values generate a solid.
    -     The parameters are [X, Y, WIDTH, HEIGHT, RED, GREEN, BLUE]
    -     For more information about solids, go to mygame/documentation/03-solids-and-borders.md.
    +      # Since velocity is the change in position, the change in y increases by dy. Same with x and dx.
    +      state.y += state.dy
    +      state.x += state.dx
       
    -  =end
    +      # Scales dx down.
    +      state.dx *= 0.8
    +    end
       
    -  # Calls methods needed for game to run properly
    -  def tick args
    -    tick_instructions args, "Use LEFT and RIGHT arrow keys to move and SPACE to jump."
    -    defaults args
    -    render args
    -    calc args
    -    input args
    -  end
    +    # Calls methods needed to determine collisions between player and world_collision rects.
    +    def calc_box_collision
    +      return unless state.world_lookup.keys.length > 0 # return unless hash has atleast 1 key
    +      collision_floor!
    +      collision_left!
    +      collision_right!
    +      collision_ceiling!
    +    end
       
    -  # sets default values and creates empty collections
    -  # initialization only happens in the first frame
    -  def defaults args
    -    fiddle args
    -    args.state.enemy.hammers ||= []
    -    args.state.enemy.hammer_queue ||= []
    -    args.state.tick_count = args.state.tick_count
    -    args.state.bridge_top = 128
    -    args.state.player.x  ||= 0                        # initializes player's properties
    -    args.state.player.y  ||= args.state.bridge_top
    -    args.state.player.w  ||= 64
    -    args.state.player.h  ||= 64
    -    args.state.player.dy ||= 0
    -    args.state.player.dx ||= 0
    -    args.state.enemy.x   ||= 800                      # initializes enemy's properties
    -    args.state.enemy.y   ||= 0
    -    args.state.enemy.w   ||= 128
    -    args.state.enemy.h   ||= 128
    -    args.state.enemy.dy  ||= 0
    -    args.state.enemy.dx  ||= 0
    -    args.state.game_over_at ||= 0
    -  end
    +    # Finds collisions between the bottom of the player's rect and the top of a world_collision_rect.
    +    def collision_floor!
    +      return unless state.dy <= 0 # return unless player is going down or is as far down as possible
    +      player_rect = [state.x, state.y - 0.1, state.tile_size, state.tile_size] # definition of player
       
    -  # sets enemy, player, hammer values
    -  def fiddle args
    -    args.state.gravity                     = -0.3
    -    args.state.enemy_jump_power            = 10       # sets enemy values
    -    args.state.enemy_jump_interval         = 60
    -    args.state.hammer_throw_interval       = 40       # sets hammer values
    -    args.state.hammer_launch_power_default = 5
    -    args.state.hammer_launch_power_near    = 2
    -    args.state.hammer_launch_power_far     = 7
    -    args.state.hammer_upward_launch_power  = 15
    -    args.state.max_hammers_per_volley      = 10
    -    args.state.gap_between_hammers         = 10
    -    args.state.player_jump_power           = 10       # sets player values
    -    args.state.player_jump_power_duration  = 10
    -    args.state.player_max_run_speed        = 10
    -    args.state.player_speed_slowdown_rate  = 0.9
    -    args.state.player_acceleration         = 1
    -    args.state.hammer_size                 = 32
    -  end
    +      # Goes through world_collision_rects to find all intersections between the bottom of player's rect and
    +      # the top of a world_collision_rect (hence the "-0.1" above)
    +      floor_collisions = state.world_collision_rects
    +                             .find_all { |r| r[:top].intersect_rect?(player_rect, collision_tollerance) }
    +                             .first
       
    -  # outputs objects onto the screen
    -  def render args
    -    args.outputs.solids << 20.map_with_index do |i| # uses 20 squares to form bridge
    -      # sets x by multiplying 64 to index to find pixel value (places all squares side by side)
    -      # subtracts 64 from bridge_top because position is denoted by bottom left corner
    -      [i * 64, args.state.bridge_top - 64, 64, 64]
    +      return unless floor_collisions # return unless collision occurred
    +      state.y = floor_collisions[:top].top # player's y is set to the y of the top of the collided rect
    +      state.dy = 0 # if a collision occurred, the player's rect isn't moving because its path is blocked
         end
       
    -    args.outputs.solids << [args.state.x, args.state.y, args.state.w, args.state.h, 255, 0, 0]
    -    args.outputs.solids << [args.state.player.x, args.state.player.y, args.state.player.w, args.state.player.h, 255, 0, 0] # outputs player onto screen (red box)
    -    args.outputs.solids << [args.state.enemy.x, args.state.enemy.y, args.state.enemy.w, args.state.enemy.h, 0, 255, 0] # outputs enemy onto screen (green box)
    -    args.outputs.solids << args.state.enemy.hammers # outputs enemy's hammers onto screen
    -  end
    -  
    -  # Performs calculations to move objects on the screen
    -  def calc args
    -  
    -    # Since velocity is the change in position, the change in x increases by dx. Same with y and dy.
    -    args.state.player.x  += args.state.player.dx
    -    args.state.player.y  += args.state.player.dy
    +    # Finds collisions between the player's left side and the right side of a world_collision_rect.
    +    def collision_left!
    +      return unless state.dx < 0 # return unless player is moving left
    +      player_rect = [state.x - 0.1, state.y, state.tile_size, state.tile_size]
       
    -    # Since acceleration is the change in velocity, the change in y (dy) increases every frame
    -    args.state.player.dy += args.state.gravity
    +      # Goes through world_collision_rects to find all intersections beween the player's left side and the
    +      # right side of a world_collision_rect.
    +      left_side_collisions = state.world_collision_rects
    +                                 .find_all { |r| r[:left_right].intersect_rect?(player_rect, collision_tollerance) }
    +                                 .first
       
    -    # player's y position is either current y position or y position of top of
    -    # bridge, whichever has a greater value
    -    # ensures that the player never goes below the bridge
    -    args.state.player.y  = args.state.player.y.greater(args.state.bridge_top)
    +      return unless left_side_collisions # return unless collision occurred
       
    -    # player's x position is either the current x position or 0, whichever has a greater value
    -    # ensures that the player doesn't go too far left (out of the screen's scope)
    -    args.state.player.x  = args.state.player.x.greater(0)
    +      # player's x is set to the value of the x of the collided rect's right side
    +      state.x = left_side_collisions[:left_right].right
    +      state.dx = 0 # player isn't moving left because its path is blocked
    +    end
       
    -    # player is not falling if it is located on the top of the bridge
    -    args.state.player.falling = false if args.state.player.y == args.state.bridge_top
    -    args.state.player.rect = [args.state.player.x, args.state.player.y, args.state.player.h, args.state.player.w] # sets definition for player
    +    # Finds collisions between the right side of the player and the left side of a world_collision_rect.
    +    def collision_right!
    +      return unless state.dx > 0 # return unless player is moving right
    +      player_rect = [state.x + 0.1, state.y, state.tile_size, state.tile_size]
       
    -    args.state.enemy.x += args.state.enemy.dx # velocity; change in x increases by dx
    -    args.state.enemy.y += args.state.enemy.dy # same with y and dy
    +      # Goes through world_collision_rects to find all intersections between the player's right side
    +      # and the left side of a world_collision_rect (hence the "+0.1" above)
    +      right_side_collisions = state.world_collision_rects
    +                                  .find_all { |r| r[:left_right].intersect_rect?(player_rect, collision_tollerance) }
    +                                  .first
       
    -    # ensures that the enemy never goes below the bridge
    -    args.state.enemy.y  = args.state.enemy.y.greater(args.state.bridge_top)
    +      return unless right_side_collisions # return unless collision occurred
       
    -    # ensures that the enemy never goes too far left (outside the screen's scope)
    -    args.state.enemy.x  = args.state.enemy.x.greater(0)
    +      # player's x is set to the value of the collided rect's left, minus the size of a rect
    +      # tile size is subtracted because player's position is denoted by bottom left corner
    +      state.x = right_side_collisions[:left_right].left - state.tile_size
    +      state.dx = 0 # player isn't moving right because its path is blocked
    +    end
       
    -    # objects that go up must come down because of gravity
    -    args.state.enemy.dy += args.state.gravity
    +    # Finds collisions between the top of the player's rect and the bottom of a world_collision_rect.
    +    def collision_ceiling!
    +      return unless state.dy > 0 # return unless player is moving up
    +      player_rect = [state.x, state.y + 0.1, state.tile_size, state.tile_size]
       
    -    args.state.enemy.y  = args.state.enemy.y.greater(args.state.bridge_top)
    +      # Goes through world_collision_rects to find intersections between the bottom of a
    +      # world_collision_rect and the top of the player's rect (hence the "+0.1" above)
    +      ceil_collisions = state.world_collision_rects
    +                            .find_all { |r| r[:bottom].intersect_rect?(player_rect, collision_tollerance) }
    +                            .first
       
    -    #sets definition of enemy
    -    args.state.enemy.rect = [args.state.enemy.x, args.state.enemy.y, args.state.enemy.h, args.state.enemy.w]
    +      return unless ceil_collisions # return unless collision occurred
       
    -    if args.state.enemy.y == args.state.bridge_top # if enemy is located on the top of the bridge
    -      args.state.enemy.dy = 0 # there is no change in y
    +      # player's y is set to the bottom y of the rect it collided with, minus the size of a rect
    +      state.y = ceil_collisions[:bottom].y - state.tile_size
    +      state.dy = 0 # if a collision occurred, the player isn't moving up because its path is blocked
         end
       
    -    # if 60 frames have passed and the enemy is not moving vertically
    -    if args.state.tick_count.mod_zero?(args.state.enemy_jump_interval) && args.state.enemy.dy == 0
    -      args.state.enemy.dy = args.state.enemy_jump_power # the enemy jumps up
    -    end
    +    # Makes sure the player remains within the screen's dimensions.
    +    def calc_edge_collision
       
    -    # if 40 frames have passed or 5 frames have passed since the game ended
    -    if args.state.tick_count.mod_zero?(args.state.hammer_throw_interval) || args.state.game_over_at.elapsed_time == 5
    -      # rand will return a number greater than or equal to 0 and less than given variable's value (since max is excluded)
    -      # that is why we're adding 1, to include the max possibility
    -      volley_dx   = (rand(args.state.hammer_launch_power_default) + 1) * -1 # horizontal movement (follow order of operations)
    +      #Ensures that the player doesn't fall below the map.
    +      if state.y < 0
    +        state.y = 0
    +        state.dy = 0
       
    -      # if the horizontal distance between the player and enemy is less than 128 pixels
    -      if (args.state.player.x - args.state.enemy.x).abs < 128
    -        # the change in x won't be that great since the enemy and player are closer to each other
    -        volley_dx = (rand(args.state.hammer_launch_power_near) + 1) * -1
    +      #Ensures that the player doesn't go too high.
    +      # Position of player is denoted by bottom left hand corner, which is why we have to subtract the
    +      # size of the player's box (so it remains visible on the screen)
    +      elsif state.y > 720 - state.tile_size # if the player's y position exceeds the height of screen
    +        state.y = 720 - state.tile_size # the player will remain as high as possible while staying on screen
    +        state.dy = 0
           end
       
    -      # if the horizontal distance between the player and enemy is greater than 300 pixels
    -      if (args.state.player.x - args.state.enemy.x).abs > 300
    -        # change in x will be more drastic since player and enemy are so far apart
    -        volley_dx = (rand(args.state.hammer_launch_power_far) + 1) * -1 # more drastic change
    +      # Ensures that the player remains in the horizontal range that it is supposed to.
    +      if state.x >= 1280 - state.tile_size && state.dx > 0 # if player moves too far right
    +        state.x = 1280 - state.tile_size # player will remain as right as possible while staying on screen
    +        state.dx = 0
    +      elsif state.x <= 0 && state.dx < 0 # if player moves too far left
    +        state.x = 0 # player will remain as left as possible while remaining on screen
    +        state.dx = 0
           end
    +    end
       
    -      (rand(args.state.max_hammers_per_volley) + 1).map_with_index do |i|
    -        args.state.enemy.hammer_queue << { # stores hammer values in a hash
    -          x: args.state.enemy.x,
    -          w: args.state.hammer_size,
    -          h: args.state.hammer_size,
    -          dx: volley_dx, # change in horizontal position
    -          # multiplication operator takes precedence over addition operator
    -          throw_at: args.state.tick_count + i * args.state.gap_between_hammers
    -        }
    +    # Processes input from the user on the keyboard.
    +    def process_inputs
    +      if inputs.mouse.down
    +        state.world_lookup = {}
    +        x, y = to_coord inputs.mouse.down.point  # gets x, y coordinates for the grid
    +  
    +        if state.world.any? { |loc| loc == [x, y] }  # checks if coordinates duplicate
    +          state.world = state.world.reject { |loc| loc == [x, y] }  # erases tile space
    +        else
    +          state.world << [x, y] # If no duplicates, adds to world collection
    +        end
           end
    -    end
       
    -    # add elements from hammer_queue collection to the hammers collection by
    -    # finding all hammers that were thrown before the current frame (have already been thrown)
    -    args.state.enemy.hammers += args.state.enemy.hammer_queue.find_all do |h|
    -      h[:throw_at] < args.state.tick_count
    -    end
    +      # Sets dx to 0 if the player lets go of arrow keys.
    +      if inputs.keyboard.key_up.right
    +        state.dx = 0
    +      elsif inputs.keyboard.key_up.left
    +        state.dx = 0
    +      end
       
    -    args.state.enemy.hammers.each do |h| # sets values for all hammers in collection
    -      h[:y]  ||= args.state.enemy.y + 130
    -      h[:dy] ||= args.state.hammer_upward_launch_power
    -      h[:dy]  += args.state.gravity # acceleration is change in gravity
    -      h[:x]   += h[:dx] # incremented by change in position
    -      h[:y]   += h[:dy]
    -      h[:rect] = [h[:x], h[:y], h[:w], h[:h]] # sets definition of hammer's rect
    -    end
    +      # Sets dx to 3 in whatever direction the player chooses.
    +      if inputs.keyboard.key_held.right # if right key is pressed
    +        state.dx =  3
    +      elsif inputs.keyboard.key_held.left # if left key is pressed
    +        state.dx = -3
    +      end
       
    -    # reject hammers that have been thrown before current frame (have already been thrown)
    -    args.state.enemy.hammer_queue = args.state.enemy.hammer_queue.reject do |h|
    -      h[:throw_at] < args.state.tick_count
    +      #Sets dy to 5 to make the player ~fly~ when they press the space bar
    +      if inputs.keyboard.key_held.space
    +        state.dy = 5
    +      end
         end
       
    -    # any hammers with a y position less than 0 are rejected from the hammers collection
    -    # since they have gone too far down (outside the scope's screen)
    -    args.state.enemy.hammers = args.state.enemy.hammers.reject { |h| h[:y] < 0 }
    +    def to_coord point
       
    -    # if there are any hammers that intersect with (or hit) the player,
    -    # the reset_player method is called (so the game can start over)
    -    if args.state.enemy.hammers.any? { |h| h[:rect].intersect_rect?(args.state.player.rect) }
    -      reset_player args
    +      # Integer divides (idiv) point.x to turn into grid
    +      # Then, you can just multiply each integer by state.tile_size later so the grid coordinates.
    +      [point.x.idiv(state.tile_size), point.y.idiv(state.tile_size)]
         end
       
    -    # if the enemy's rect intersects with (or hits) the player,
    -    # the reset_player method is called (so the game can start over)
    -    if args.state.enemy.rect.intersect_rect? args.state.player.rect
    -      reset_player args
    +    # Represents the tolerance for a collision between the player's rect and another rect.
    +    def collision_tollerance
    +      0.0
         end
       end
       
    -  # Resets the player by changing its properties back to the values they had at initialization
    -  def reset_player args
    -    args.state.player.x = 0
    -    args.state.player.y = args.state.bridge_top
    -    args.state.player.dy = 0
    -    args.state.player.dx = 0
    -    args.state.enemy.hammers.clear # empties hammer collection
    -    args.state.enemy.hammer_queue.clear # empties hammer_queue
    -    args.state.game_over_at = args.state.tick_count # game_over_at set to current frame (or passage of time)
    -  end
    -  
    -  # Processes input from the user to move the player
    -  def input args
    -    if args.inputs.keyboard.space # if the user presses the space bar
    -      args.state.player.jumped_at ||= args.state.tick_count # jumped_at is set to current frame
    -  
    -      # if the time that has passed since the jump is less than the player's jump duration and
    -      # the player is not falling
    -      if args.state.player.jumped_at.elapsed_time < args.state.player_jump_power_duration && !args.state.player.falling
    -        args.state.player.dy = args.state.player_jump_power # change in y is set to power of player's jump
    -      end
    -    end
    -  
    -    # if the space bar is in the "up" state (or not being pressed down)
    -    if args.inputs.keyboard.key_up.space
    -      args.state.player.jumped_at = nil # jumped_at is empty
    -      args.state.player.falling = true # the player is falling
    -    end
    +  $platformer_physics = PoorManPlatformerPhysics.new
       
    -    if args.inputs.keyboard.left # if left key is pressed
    -      args.state.player.dx -= args.state.player_acceleration # dx decreases by acceleration (player goes left)
    -      # dx is either set to current dx or the negative max run speed (which would be -10),
    -      # whichever has a greater value
    -      args.state.player.dx = args.state.player.dx.greater(-args.state.player_max_run_speed)
    -    elsif args.inputs.keyboard.right # if right key is pressed
    -      args.state.player.dx += args.state.player_acceleration # dx increases by acceleration (player goes right)
    -      # dx is either set to current dx or max run speed (which would be 10),
    -      # whichever has a lesser value
    -      args.state.player.dx = args.state.player.dx.lesser(args.state.player_max_run_speed)
    -    else
    -      args.state.player.dx *= args.state.player_speed_slowdown_rate # dx is scaled down
    -    end
    +  def tick args
    +    $platformer_physics.grid    = args.grid
    +    $platformer_physics.inputs  = args.inputs
    +    $platformer_physics.state    = args.state
    +    $platformer_physics.outputs = args.outputs
    +    $platformer_physics.tick
    +    tick_instructions args, "Sample app shows platformer collisions. CLICK to place box. ARROW keys to move around. SPACE to jump."
       end
       
       def tick_instructions args, text, y = 715
    @@ -6314,7 +6196,6 @@ Follows is a source code listing for all files that have been open sourced. This
         if args.inputs.mouse.click ||
            args.inputs.keyboard.directional_vector ||
            args.inputs.keyboard.key_down.enter ||
    -       args.inputs.keyboard.key_down.space ||
            args.inputs.keyboard.key_down.escape
           args.state.key_event_occurred = true
         end
    @@ -6326,507 +6207,7 @@ Follows is a source code listing for all files that have been open sourced. This
     
     #+end_src
     
    -*** Physics And Collisions - Entities - main.rb
    -#+begin_src ruby
    -  # ./samples/04_physics_and_collisions/03_entities/app/main.rb
    -  =begin
    -  
    -   Reminders:
    -  
    -   - map: Ruby method used to transform data; used in arrays, hashes, and collections.
    -     Can be used to perform an action on every element of a collection, such as multiplying
    -     each element by 2 or declaring every element as a new entity.
    -  
    -   - reject: Removes elements from a collection if they meet certain requirements.
    -     For example, you can derive an array of odd numbers from an original array of
    -     numbers 1 through 10 by rejecting all elements that are even (or divisible by 2).
    -  
    -   - args.state.new_entity: Used when we want to create a new object, like a sprite or button.
    -     In this sample app, new_entity is used to define the properties of enemies and bullets.
    -     (Remember, you can use state to define ANY property and it will be retained across frames.)
    -  
    -   - args.outputs.labels: An array. The values generate a label on the screen.
    -     The parameters are [X, Y, TEXT, SIZE, ALIGN, RED, GREEN, BLUE, ALPHA, FONT STYLE]
    -  
    -   - ARRAY#intersect_rect?: Returns true or false depending on if the two rectangles intersect.
    -  
    -   - args.inputs.mouse.click.point.(x|y): The x and y location of the mouse.
    -  
    -  =end
    -  
    -  # This sample app shows enemies that contain an id value and the time they were created.
    -  # These enemies can be removed by shooting at them with bullets.
    -  
    -  # Calls all methods necessary for the game to function properly.
    -  def tick args
    -    tick_instructions args, "Sample app shows how to use args.state.new_entity along with collisions. CLICK to shoot a bullet."
    -    defaults args
    -    render args
    -    calc args
    -    process_inputs args
    -  end
    -  
    -  # Sets default values
    -  # Enemies and bullets start off as empty collections
    -  def defaults args
    -    args.state.enemies ||= []
    -    args.state.bullets ||= []
    -  end
    -  
    -  # Provides each enemy in enemies collection with rectangular border,
    -  # as well as a label showing id and when they were created
    -  def render args
    -    # When you're calling a method that takes no arguments, you can use this & syntax on map.
    -    # Numbers are being added to x and y in order to keep the text within the enemy's borders.
    -    args.outputs.borders << args.state.enemies.map(&:rect)
    -    args.outputs.labels  << args.state.enemies.flat_map do |enemy|
    -      [
    -        [enemy.x + 4, enemy.y + 29, "id: #{enemy.entity_id}", -3, 0],
    -        [enemy.x + 4, enemy.y + 17, "created_at: #{enemy.created_at}", -3, 0] # frame enemy was created
    -      ]
    -    end
    -  
    -    # Outputs bullets in bullets collection as rectangular solids
    -    args.outputs.solids << args.state.bullets.map(&:rect)
    -  end
    -  
    -  # Calls all methods necessary for performing calculations
    -  def calc args
    -    add_new_enemies_if_needed args
    -    move_bullets args
    -    calculate_collisions args
    -    remove_bullets_of_screen args
    -  end
    -  
    -  # Adds enemies to the enemies collection and sets their values
    -  def add_new_enemies_if_needed args
    -    return if args.state.enemies.length >= 10 # if 10 or more enemies, enemies are not added
    -    return unless args.state.bullets.length == 0 # if user has not yet shot bullet, no enemies are added
    -  
    -    args.state.enemies += (10 - args.state.enemies.length).map do # adds enemies so there are 10 total
    -      args.state.new_entity(:enemy) do |e| # each enemy is declared as a new entity
    -        e.x = 640 + 500 * rand # each enemy is given random position on screen
    -        e.y = 600 * rand + 50
    -        e.rect = [e.x, e.y, 130, 30] # sets definition for enemy's rect
    -      end
    -    end
    -  end
    -  
    -  # Moves bullets across screen
    -  # Sets definition of the bullets
    -  def move_bullets args
    -    args.state.bullets.each do |bullet| # perform action on each bullet in collection
    -      bullet.x += bullet.speed # increment x by speed (bullets fly horizontally across screen)
    -  
    -      # By randomizing the value that increments bullet.y, the bullet does not fly straight up and out
    -      # of the scope of the screen. Try removing what follows bullet.speed, or changing 0.25 to 1.25 to
    -      # see what happens to the bullet's movement.
    -      bullet.y += bullet.speed.*(0.25).randomize(:ratio, :sign)
    -      bullet.rect = [bullet.x, bullet.y, bullet.size, bullet.size] # sets definition of bullet's rect
    -    end
    -  end
    -  
    -  # Determines if a bullet hits an enemy
    -  def calculate_collisions args
    -    args.state.bullets.each do |bullet| # perform action on every bullet and enemy in collections
    -      args.state.enemies.each do |enemy|
    -        # if bullet has not exploded yet and the bullet hits an enemy
    -        if !bullet.exploded && bullet.rect.intersect_rect?(enemy.rect)
    -          bullet.exploded = true # bullet explodes
    -          enemy.dead = true # enemy is killed
    -        end
    -      end
    -    end
    -  
    -    # All exploded bullets are rejected or removed from the bullets collection
    -    # and any dead enemy is rejected from the enemies collection.
    -    args.state.bullets = args.state.bullets.reject(&:exploded)
    -    args.state.enemies = args.state.enemies.reject(&:dead)
    -  end
    -  
    -  # Bullets are rejected from bullets collection once their position exceeds the width of screen
    -  def remove_bullets_of_screen args
    -    args.state.bullets = args.state.bullets.reject { |bullet| bullet.x > 1280 } # screen width is 1280
    -  end
    -  
    -  # Calls fire_bullet method
    -  def process_inputs args
    -    fire_bullet args
    -  end
    -  
    -  # Once mouse is clicked by the user to fire a bullet, a new bullet is added to bullets collection
    -  def fire_bullet args
    -    return unless args.inputs.mouse.click # return unless mouse is clicked
    -    args.state.bullets << args.state.new_entity(:bullet) do |bullet| # new bullet is declared a new entity
    -      bullet.y = args.inputs.mouse.click.point.y # set to the y value of where the mouse was clicked
    -      bullet.x = 0 # starts on the left side of the screen
    -      bullet.size = 10
    -      bullet.speed = 10 * rand + 2 # speed of a bullet is randomized
    -      bullet.rect = [bullet.x, bullet.y, bullet.size, bullet.size] # definition is set
    -    end
    -  end
    -  
    -  def tick_instructions args, text, y = 715
    -    return if args.state.key_event_occurred
    -    if args.inputs.mouse.click ||
    -       args.inputs.keyboard.directional_vector ||
    -       args.inputs.keyboard.key_down.enter ||
    -       args.inputs.keyboard.key_down.space ||
    -       args.inputs.keyboard.key_down.escape
    -      args.state.key_event_occurred = true
    -    end
    -  
    -    args.outputs.debug << [0, y - 50, 1280, 60].solid
    -    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label
    -    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label
    -  end
    -
    -#+end_src
    -
    -*** Physics And Collisions - Box Collision - main.rb
    -#+begin_src ruby
    -  # ./samples/04_physics_and_collisions/04_box_collision/app/main.rb
    -  =begin
    -  
    -   APIs listing that haven't been encountered in previous sample apps:
    -  
    -   - first: Returns the first element of the array.
    -     For example, if we have an array
    -     numbers = [1, 2, 3, 4, 5]
    -     and we call first by saying
    -     numbers.first
    -     the number 1 will be returned because it is the first element of the numbers array.
    -  
    -   - num1.idiv(num2): Divides two numbers and returns an integer.
    -     For example,
    -     16.idiv(3) = 5, because 16 / 3 is 5.33333 returned as an integer.
    -     16.idiv(4) = 4, because 16 / 4 is 4 and already has no decimal.
    -  
    -   Reminders:
    -  
    -   - find_all: Finds all values that satisfy specific requirements.
    -  
    -   - ARRAY#intersect_rect?: An array with at least four values is
    -     considered a rect. The intersect_rect? function returns true
    -     or false depending on if the two rectangles intersect.
    -  
    -   - reject: Removes elements from a collection if they meet certain requirements.
    -  
    -  =end
    -  
    -  # This sample app allows users to create tiles and place them anywhere on the screen as obstacles.
    -  # The player can then move and maneuver around them.
    -  
    -  class PoorManPlatformerPhysics
    -    attr_accessor :grid, :inputs, :state, :outputs
    -  
    -    # Calls all methods necessary for the app to run successfully.
    -    def tick
    -      defaults
    -      render
    -      calc
    -      process_inputs
    -    end
    -  
    -    # Sets default values for variables.
    -    # The ||= sign means that the variable will only be set to the value following the = sign if the value has
    -    # not already been set before. Intialization happens only in the first frame.
    -    def defaults
    -      state.tile_size               = 64
    -      state.gravity                 = -0.2
    -      state.previous_tile_size    ||= state.tile_size
    -      state.x                     ||= 0
    -      state.y                     ||= 800
    -      state.dy                    ||= 0
    -      state.dx                    ||= 0
    -      state.world                 ||= []
    -      state.world_lookup          ||= {}
    -      state.world_collision_rects ||= []
    -    end
    -  
    -    # Outputs solids and borders of different colors for the world and collision_rects collections.
    -    def render
    -  
    -      # Sets a black background on the screen (Comment this line out and the background will become white.)
    -      # Also note that black is the default color for when no color is assigned.
    -      outputs.solids << grid.rect
    -  
    -      # The position, size, and color (white) are set for borders given to the world collection.
    -      # Try changing the color by assigning different numbers (between 0 and 255) to the last three parameters.
    -      outputs.borders << state.world.map do |x, y|
    -        [x * state.tile_size,
    -         y * state.tile_size,
    -         state.tile_size,
    -         state.tile_size, 255, 255, 255]
    -      end
    -  
    -      # The top, bottom, and sides of the borders for collision_rects are different colors.
    -      outputs.borders << state.world_collision_rects.map do |e|
    -        [
    -          [e[:top],                             0, 170,   0], # top is a shade of green
    -          [e[:bottom],                          0, 100, 170], # bottom is a shade of greenish-blue
    -          [e[:left_right],                    170,   0,   0], # left and right are a shade of red
    -        ]
    -      end
    -  
    -      # Sets the position, size, and color (a shade of green) of the borders of only the player's
    -      # box and outputs it. If you change the 180 to 0, the player's box will be black and you
    -      # won't be able to see it (because it will match the black background).
    -      outputs.borders << [state.x,
    -                          state.y,
    -                          state.tile_size,
    -                          state.tile_size,  0, 180, 0]
    -    end
    -  
    -    # Calls methods needed to perform calculations.
    -    def calc
    -      calc_world_lookup
    -      calc_player
    -    end
    -  
    -    # Performs calculations on world_lookup and sets values.
    -    def calc_world_lookup
    -  
    -      # If the tile size isn't equal to the previous tile size,
    -      # the previous tile size is set to the tile size,
    -      # and world_lookup hash is set to empty.
    -      if state.tile_size != state.previous_tile_size
    -        state.previous_tile_size = state.tile_size
    -        state.world_lookup = {} # empty hash
    -      end
    -  
    -      # return if the world_lookup hash has keys (or, in other words, is not empty)
    -      # return unless the world collection has values inside of it (or is not empty)
    -      return if state.world_lookup.keys.length > 0
    -      return unless state.world.length > 0
    -  
    -      # Starts with an empty hash for world_lookup.
    -      # Searches through the world and finds the coordinates that exist.
    -      state.world_lookup = {}
    -      state.world.each { |x, y| state.world_lookup[[x, y]] = true }
    -  
    -      # Assigns world_collision_rects for every sprite drawn.
    -      state.world_collision_rects =
    -        state.world_lookup
    -            .keys
    -            .map do |coord_x, coord_y|
    -              s = state.tile_size
    -              # multiply by tile size so the grid coordinates; sets pixel value
    -              # don't forget that position is denoted by bottom left corner
    -              # set x = coord_x or y = coord_y and see what happens!
    -              x = s * coord_x
    -              y = s * coord_y
    -              {
    -                # The values added to x, y, and s position the world_collision_rects so they all appear
    -                # stacked (on top of world rects) but don't directly overlap.
    -                # Remove these added values and mess around with the rect placement!
    -                args:       [coord_x, coord_y],
    -                left_right: [x,     y + 4, s,     s - 6], # hash keys and values
    -                top:        [x + 4, y + 6, s - 8, s - 6],
    -                bottom:     [x + 1, y - 1, s - 2, s - 8],
    -              }
    -            end
    -    end
    -  
    -    # Performs calculations to change the x and y values of the player's box.
    -    def calc_player
    -  
    -      # Since acceleration is the change in velocity, the change in y (dy) increases every frame.
    -      # What goes up must come down because of gravity.
    -      state.dy += state.gravity
    -  
    -      # Calls the calc_box_collision and calc_edge_collision methods.
    -      calc_box_collision
    -      calc_edge_collision
    -  
    -      # Since velocity is the change in position, the change in y increases by dy. Same with x and dx.
    -      state.y += state.dy
    -      state.x += state.dx
    -  
    -      # Scales dx down.
    -      state.dx *= 0.8
    -    end
    -  
    -    # Calls methods needed to determine collisions between player and world_collision rects.
    -    def calc_box_collision
    -      return unless state.world_lookup.keys.length > 0 # return unless hash has atleast 1 key
    -      collision_floor!
    -      collision_left!
    -      collision_right!
    -      collision_ceiling!
    -    end
    -  
    -    # Finds collisions between the bottom of the player's rect and the top of a world_collision_rect.
    -    def collision_floor!
    -      return unless state.dy <= 0 # return unless player is going down or is as far down as possible
    -      player_rect = [state.x, state.y - 0.1, state.tile_size, state.tile_size] # definition of player
    -  
    -      # Goes through world_collision_rects to find all intersections between the bottom of player's rect and
    -      # the top of a world_collision_rect (hence the "-0.1" above)
    -      floor_collisions = state.world_collision_rects
    -                             .find_all { |r| r[:top].intersect_rect?(player_rect, collision_tollerance) }
    -                             .first
    -  
    -      return unless floor_collisions # return unless collision occurred
    -      state.y = floor_collisions[:top].top # player's y is set to the y of the top of the collided rect
    -      state.dy = 0 # if a collision occurred, the player's rect isn't moving because its path is blocked
    -    end
    -  
    -    # Finds collisions between the player's left side and the right side of a world_collision_rect.
    -    def collision_left!
    -      return unless state.dx < 0 # return unless player is moving left
    -      player_rect = [state.x - 0.1, state.y, state.tile_size, state.tile_size]
    -  
    -      # Goes through world_collision_rects to find all intersections beween the player's left side and the
    -      # right side of a world_collision_rect.
    -      left_side_collisions = state.world_collision_rects
    -                                 .find_all { |r| r[:left_right].intersect_rect?(player_rect, collision_tollerance) }
    -                                 .first
    -  
    -      return unless left_side_collisions # return unless collision occurred
    -  
    -      # player's x is set to the value of the x of the collided rect's right side
    -      state.x = left_side_collisions[:left_right].right
    -      state.dx = 0 # player isn't moving left because its path is blocked
    -    end
    -  
    -    # Finds collisions between the right side of the player and the left side of a world_collision_rect.
    -    def collision_right!
    -      return unless state.dx > 0 # return unless player is moving right
    -      player_rect = [state.x + 0.1, state.y, state.tile_size, state.tile_size]
    -  
    -      # Goes through world_collision_rects to find all intersections between the player's right side
    -      # and the left side of a world_collision_rect (hence the "+0.1" above)
    -      right_side_collisions = state.world_collision_rects
    -                                  .find_all { |r| r[:left_right].intersect_rect?(player_rect, collision_tollerance) }
    -                                  .first
    -  
    -      return unless right_side_collisions # return unless collision occurred
    -  
    -      # player's x is set to the value of the collided rect's left, minus the size of a rect
    -      # tile size is subtracted because player's position is denoted by bottom left corner
    -      state.x = right_side_collisions[:left_right].left - state.tile_size
    -      state.dx = 0 # player isn't moving right because its path is blocked
    -    end
    -  
    -    # Finds collisions between the top of the player's rect and the bottom of a world_collision_rect.
    -    def collision_ceiling!
    -      return unless state.dy > 0 # return unless player is moving up
    -      player_rect = [state.x, state.y + 0.1, state.tile_size, state.tile_size]
    -  
    -      # Goes through world_collision_rects to find intersections between the bottom of a
    -      # world_collision_rect and the top of the player's rect (hence the "+0.1" above)
    -      ceil_collisions = state.world_collision_rects
    -                            .find_all { |r| r[:bottom].intersect_rect?(player_rect, collision_tollerance) }
    -                            .first
    -  
    -      return unless ceil_collisions # return unless collision occurred
    -  
    -      # player's y is set to the bottom y of the rect it collided with, minus the size of a rect
    -      state.y = ceil_collisions[:bottom].y - state.tile_size
    -      state.dy = 0 # if a collision occurred, the player isn't moving up because its path is blocked
    -    end
    -  
    -    # Makes sure the player remains within the screen's dimensions.
    -    def calc_edge_collision
    -  
    -      #Ensures that the player doesn't fall below the map.
    -      if state.y < 0
    -        state.y = 0
    -        state.dy = 0
    -  
    -      #Ensures that the player doesn't go too high.
    -      # Position of player is denoted by bottom left hand corner, which is why we have to subtract the
    -      # size of the player's box (so it remains visible on the screen)
    -      elsif state.y > 720 - state.tile_size # if the player's y position exceeds the height of screen
    -        state.y = 720 - state.tile_size # the player will remain as high as possible while staying on screen
    -        state.dy = 0
    -      end
    -  
    -      # Ensures that the player remains in the horizontal range that it is supposed to.
    -      if state.x >= 1280 - state.tile_size && state.dx > 0 # if player moves too far right
    -        state.x = 1280 - state.tile_size # player will remain as right as possible while staying on screen
    -        state.dx = 0
    -      elsif state.x <= 0 && state.dx < 0 # if player moves too far left
    -        state.x = 0 # player will remain as left as possible while remaining on screen
    -        state.dx = 0
    -      end
    -    end
    -  
    -    # Processes input from the user on the keyboard.
    -    def process_inputs
    -      if inputs.mouse.down
    -        state.world_lookup = {}
    -        x, y = to_coord inputs.mouse.down.point  # gets x, y coordinates for the grid
    -  
    -        if state.world.any? { |loc| loc == [x, y] }  # checks if coordinates duplicate
    -          state.world = state.world.reject { |loc| loc == [x, y] }  # erases tile space
    -        else
    -          state.world << [x, y] # If no duplicates, adds to world collection
    -        end
    -      end
    -  
    -      # Sets dx to 0 if the player lets go of arrow keys.
    -      if inputs.keyboard.key_up.right
    -        state.dx = 0
    -      elsif inputs.keyboard.key_up.left
    -        state.dx = 0
    -      end
    -  
    -      # Sets dx to 3 in whatever direction the player chooses.
    -      if inputs.keyboard.key_held.right # if right key is pressed
    -        state.dx =  3
    -      elsif inputs.keyboard.key_held.left # if left key is pressed
    -        state.dx = -3
    -      end
    -  
    -      #Sets dy to 5 to make the player ~fly~ when they press the space bar
    -      if inputs.keyboard.key_held.space
    -        state.dy = 5
    -      end
    -    end
    -  
    -    def to_coord point
    -  
    -      # Integer divides (idiv) point.x to turn into grid
    -      # Then, you can just multiply each integer by state.tile_size later so the grid coordinates.
    -      [point.x.idiv(state.tile_size), point.y.idiv(state.tile_size)]
    -    end
    -  
    -    # Represents the tolerance for a collision between the player's rect and another rect.
    -    def collision_tollerance
    -      0.0
    -    end
    -  end
    -  
    -  $platformer_physics = PoorManPlatformerPhysics.new
    -  
    -  def tick args
    -    $platformer_physics.grid    = args.grid
    -    $platformer_physics.inputs  = args.inputs
    -    $platformer_physics.state    = args.state
    -    $platformer_physics.outputs = args.outputs
    -    $platformer_physics.tick
    -    tick_instructions args, "Sample app shows platformer collisions. CLICK to place box. ARROW keys to move around. SPACE to jump."
    -  end
    -  
    -  def tick_instructions args, text, y = 715
    -    return if args.state.key_event_occurred
    -    if args.inputs.mouse.click ||
    -       args.inputs.keyboard.directional_vector ||
    -       args.inputs.keyboard.key_down.enter ||
    -       args.inputs.keyboard.key_down.escape
    -      args.state.key_event_occurred = true
    -    end
    -  
    -    args.outputs.debug << [0, y - 50, 1280, 60].solid
    -    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label
    -    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label
    -  end
    -
    -#+end_src
    -
    -*** Physics And Collisions - Box Collision 2 - main.rb
    +*** Physics And Collisions - Box Collision 2 - main.rb
     #+begin_src ruby
       # ./samples/04_physics_and_collisions/05_box_collision_2/app/main.rb
       =begin
    @@ -7353,9 +6734,9 @@ Follows is a source code listing for all files that have been open sourced. This
           mouse_overlay = mouse_overlay.merge r: 255 if state.delete_mode
       
           if state.mouse_held
    -        outputs.primitives << mouse_overlay.border
    +        outputs.primitives << mouse_overlay.border!
           else
    -        outputs.primitives << mouse_overlay.solid
    +        outputs.primitives << mouse_overlay.solid!
           end
         end
       
    @@ -9130,438 +8511,1074 @@ Follows is a source code listing for all files that have been open sourced. This
               end
       
       
    -          hypotenuse=args.state.ball_hypotenuse
    +          hypotenuse=args.state.ball_hypotenuse
    +  
    +          @bold = [(minX.x-hypotenuse/2)-1, (minY.y-hypotenuse/2)-1, -((minX.x-hypotenuse/2)-1)+(maxX.x + hypotenuse + 2), -((minY.y-hypotenuse/2)-1)+(maxY.y + hypotenuse + 2)]
    +      end
    +  
    +      def getShapePoints(args)
    +        points=[]
    +        x_offset = (args.state.board_width + args.grid.w / 8) + (@block_offset / 2)
    +  
    +        if @orientation == :right
    +          #args.outputs.solids << [@x + x_offset, @y, @block_size * 3 - @block_offset, @block_size - @block_offset, @r, @g, @b]
    +          xa =@x + x_offset
    +          ya =@y
    +          wa =@block_size * 3 - @block_offset
    +          ha =(@block_size - @block_offset)
    +        elsif @orientation == :up
    +          #args.outputs.solids << [@x + x_offset, @y, @block_size - @block_offset, @block_size * 3 - @block_offset, @r, @g, @b]
    +          xa =@x + x_offset
    +          ya =@y
    +          wa =@block_size - @block_offset
    +          ha =@block_size * 3 - @block_offset
    +  
    +        elsif @orientation == :left
    +          #args.outputs.solids << [@x + x_offset, @y, @block_size * 3 - @block_offset, @block_size - @block_offset, @r, @g, @b]
    +          xa =@x + x_offset
    +          ya =@y
    +          wa =@block_size * 3 - @block_offset
    +          ha =@block_size - @block_offset
    +        elsif @orientation == :down
    +          #args.outputs.solids << [@x + x_offset, @y, @block_size - @block_offset, @block_size * 3 - @block_offset, @r, @g, @b]
    +          xa =@x + x_offset
    +          ya =@y
    +          wa =@block_size - @block_offset
    +          ha =@block_size * 3 - @block_offset
    +        end
    +        points = [
    +          {x: xa, y:ya},
    +          {x: xa + wa,y:ya},
    +          {x: xa + wa,y:ya+ha},
    +          {x: xa, y:ya+ha},
    +        ]
    +        @squareColliders = [
    +          SquareCollider.new(points[0].x,points[0].y,{x:-1,y:-1}),
    +          SquareCollider.new(points[1].x-COLLISIONWIDTH,points[1].y,{x:1,y:-1}),
    +          SquareCollider.new(points[2].x-COLLISIONWIDTH,points[2].y-COLLISIONWIDTH,{x:1,y:1}),
    +          SquareCollider.new(points[3].x,points[3].y-COLLISIONWIDTH,{x:-1,y:1}),
    +        ]
    +        @colliders = [
    +          LinearCollider.new(points[0],points[1], :neg),
    +          LinearCollider.new(points[1],points[2], :neg),
    +          LinearCollider.new(points[2],points[3], :pos),
    +          LinearCollider.new(points[0],points[3], :pos),
    +        ]
    +        return points
    +      end
    +  
    +      def update args
    +        universalUpdate args, self
    +      end
    +  
    +      def draw(args)
    +          x_offset = (args.state.board_width + args.grid.w / 8) + @block_offset / 2
    +  
    +          if @orientation == :right
    +              args.outputs.solids << [@x + x_offset, @y, @block_size * 3 - @block_offset, @block_size - @block_offset, @r, @g, @b]
    +          elsif @orientation == :up
    +              args.outputs.solids << [@x + x_offset, @y, @block_size - @block_offset, @block_size * 3 - @block_offset, @r, @g, @b]
    +          elsif @orientation == :left
    +              args.outputs.solids << [@x + x_offset, @y, @block_size * 3 - @block_offset, @block_size - @block_offset, @r, @g, @b]
    +          elsif @orientation == :down
    +              args.outputs.solids << [@x + x_offset, @y, @block_size - @block_offset, @block_size * 3 - @block_offset, @r, @g, @b]
    +          end
    +  
    +          args.outputs.labels << [@x + x_offset + (@block_size * 2 - @block_offset)/2, (@y) + (@block_size * 2 - @block_offset)/2, @count.to_s]
    +  
    +      end
    +  end
    +
    +#+end_src
    +
    +*** Physics And Collisions - Arbitrary Collision - linear_collider.rb
    +#+begin_src ruby
    +  # ./samples/04_physics_and_collisions/09_arbitrary_collision/app/linear_collider.rb
    +  
    +  COLLISIONWIDTH=8
    +  
    +  class LinearCollider
    +    attr_reader :pointA, :pointB
    +    def initialize (pointA, pointB, mode,collisionWidth=COLLISIONWIDTH)
    +      @pointA = pointA
    +      @pointB = pointB
    +      @mode = mode
    +      @collisionWidth = collisionWidth
    +  
    +      if (@pointA.x > @pointB.x)
    +        @pointA, @pointB = @pointB, @pointA
    +      end
    +  
    +      @linearCollider_collision_once = false
    +    end
    +  
    +    def collisionSlope args
    +      if (@pointB.x-@pointA.x == 0)
    +        return INFINITY
    +      end
    +      return (@pointB.y - @pointA.y) / (@pointB.x - @pointA.x)
    +    end
    +  
    +  
    +    def collision? (args, points, ball=nil)
    +  
    +      slope = collisionSlope args
    +      result = false
    +  
    +      # calculate a vector with a magnitude of (1/2)collisionWidth and a direction perpendicular to the collision line
    +      vect=nil;mag=nil;vect=nil;
    +      if @mode == :both
    +        vect = {x: @pointB.x - @pointA.x, y:@pointB.y - @pointA.y}
    +        mag  = (vect.x**2 + vect.y**2)**0.5
    +        vect = {y: -1*(vect.x/(mag))*@collisionWidth*0.5, x: (vect.y/(mag))*@collisionWidth*0.5}
    +      else
    +        vect = {x: @pointB.x - @pointA.x, y:@pointB.y - @pointA.y}
    +        mag  = (vect.x**2 + vect.y**2)**0.5
    +        vect = {y: -1*(vect.x/(mag))*@collisionWidth, x: (vect.y/(mag))*@collisionWidth}
    +      end
    +  
    +      rpointA=nil;rpointB=nil;rpointC=nil;rpointD=nil;
    +      if @mode == :pos
    +        rpointA = {x:@pointA.x + vect.x, y:@pointA.y + vect.y}
    +        rpointB = {x:@pointB.x + vect.x, y:@pointB.y + vect.y}
    +        rpointC = {x:@pointB.x, y:@pointB.y}
    +        rpointD = {x:@pointA.x, y:@pointA.y}
    +      elsif @mode == :neg
    +        rpointA = {x:@pointA.x, y:@pointA.y}
    +        rpointB = {x:@pointB.x, y:@pointB.y}
    +        rpointC = {x:@pointB.x - vect.x, y:@pointB.y - vect.y}
    +        rpointD = {x:@pointA.x - vect.x, y:@pointA.y - vect.y}
    +      elsif @mode == :both
    +        rpointA = {x:@pointA.x + vect.x, y:@pointA.y + vect.y}
    +        rpointB = {x:@pointB.x + vect.x, y:@pointB.y + vect.y}
    +        rpointC = {x:@pointB.x - vect.x, y:@pointB.y - vect.y}
    +        rpointD = {x:@pointA.x - vect.x, y:@pointA.y - vect.y}
    +      end
    +      #four point rectangle
    +  
    +  
    +  
    +      if ball != nil
    +        xs = [rpointA.x,rpointB.x,rpointC.x,rpointD.x]
    +        ys = [rpointA.y,rpointB.y,rpointC.y,rpointD.y]
    +        correct = 1
    +        rect1 = [ball.x, ball.y, ball.width, ball.height]
    +        #$r1 = rect1
    +        rect2 = [xs.min-correct,ys.min-correct,(xs.max-xs.min)+correct*2,(ys.max-ys.min)+correct*2]
    +        #$r2 = rect2
    +        if rect1.intersect_rect?(rect2) == false
    +          return false
    +        end
    +      end
    +  
    +  
    +      #area of a triangle
    +      triArea = -> (a,b,c) { ((a.x * (b.y - c.y) + b.x * (c.y - a.y) + c.x * (a.y - b.y))/2.0).abs }
    +  
    +      #if at least on point is in the rectangle then collision? is true - otherwise false
    +      for point in points
    +        #Check whether a given point lies inside a rectangle or not:
    +        #if the sum of the area of traingls, PAB, PBC, PCD, PAD equal the area of the rec, then an intersection has occured
    +        areaRec =  triArea.call(rpointA, rpointB, rpointC)+triArea.call(rpointA, rpointC, rpointD)
    +        areaSum = [
    +          triArea.call(point, rpointA, rpointB),triArea.call(point, rpointB, rpointC),
    +          triArea.call(point, rpointC, rpointD),triArea.call(point, rpointA, rpointD)
    +        ].inject(0){|sum,x| sum + x }
    +        e = 0.0001 #allow for minor error
    +        if areaRec>= areaSum-e and areaRec<= areaSum+e
    +          result = true
    +          #return true
    +          break
    +        end
    +      end
    +  
    +      #args.outputs.lines << [@pointA.x, @pointA.y, @pointB.x, @pointB.y,     000, 000, 000]
    +      #args.outputs.lines << [rpointA.x, rpointA.y, rpointB.x, rpointB.y,     255, 000, 000]
    +      #args.outputs.lines << [rpointC.x, rpointC.y, rpointD.x, rpointD.y,     000, 000, 255]
    +  
    +  
    +      #puts (rpointA.x.to_s + " " +  rpointA.y.to_s + " " + rpointB.x.to_s + " "+ rpointB.y.to_s)
    +      return result
    +    end #end collision?
    +  
    +    def getRepelMagnitude (fbx, fby, vrx, vry, ballMag)
    +      a = fbx ; b = vrx ; c = fby
    +      d = vry ; e = ballMag
    +      if b**2 + d**2 == 0
    +        #unexpected
    +      end
    +      x1 = (-a*b+-c*d + (e**2 * b**2 - b**2 * c**2 + 2*a*b*c*d + e**2 + d**2 - a**2 * d**2)**0.5)/(b**2 + d**2)
    +      x2 = -((a*b + c*d + (e**2 * b**2 - b**2 * c**2 + 2*a*b*c*d + e**2 * d**2 - a**2 * d**2)**0.5)/(b**2 + d**2))
    +      err = 0.00001
    +      o = ((fbx + x1*vrx)**2 + (fby + x1*vry)**2 ) ** 0.5
    +      p = ((fbx + x2*vrx)**2 + (fby + x2*vry)**2 ) ** 0.5
    +      r = 0
    +      if (ballMag >= o-err and ballMag <= o+err)
    +        r = x1
    +      elsif (ballMag >= p-err and ballMag <= p+err)
    +        r = x2
    +      else
    +        #unexpected
    +      end
    +      return r
    +    end
    +  
    +    def collide args, ball
    +      slope = collisionSlope args
    +  
    +      # perpVect: normal vector perpendicular to collision
    +      perpVect = {x: @pointB.x - @pointA.x, y:@pointB.y - @pointA.y}
    +      mag  = (perpVect.x**2 + perpVect.y**2)**0.5
    +      perpVect = {x: perpVect.x/(mag), y: perpVect.y/(mag)}
    +      perpVect = {x: -perpVect.y, y: perpVect.x}
    +      if perpVect.y > 0 #ensure perpVect points upward
    +        perpVect = {x: perpVect.x*-1, y: perpVect.y*-1}
    +      end
    +      previousPosition = {
    +        x:ball.x-ball.velocity.x,
    +        y:ball.y-ball.velocity.y
    +      }
    +      yInterc = @pointA.y + -slope*@pointA.x
    +      if slope == INFINITY
    +        if previousPosition.x < @pointA.x
    +          perpVect = {x: perpVect.x*-1, y: perpVect.y*-1}
    +          yInterc = -INFINITY
    +        end
    +      elsif previousPosition.y < slope*previousPosition.x + yInterc #check if ball is bellow or above the collider to determine if perpVect is - or +
    +        perpVect = {x: perpVect.x*-1, y: perpVect.y*-1}
    +      end
    +  
    +      velocityMag = (ball.velocity.x**2 + ball.velocity.y**2)**0.5
    +      theta_ball=Math.atan2(ball.velocity.y,ball.velocity.x) #the angle of the ball's velocity
    +      theta_repel=Math.atan2(perpVect.y,perpVect.x) #the angle of the repelling force(perpVect)
    +  
    +      fbx = velocityMag * Math.cos(theta_ball) #the x component of the ball's velocity
    +      fby = velocityMag * Math.sin(theta_ball) #the y component of the ball's velocity
    +  
    +      #the magnitude of the repelling force
    +      repelMag = getRepelMagnitude(fbx, fby, perpVect.x, perpVect.y, (ball.velocity.x**2 + ball.velocity.y**2)**0.5)
    +      frx = repelMag* Math.cos(theta_repel) #the x component of the repel's velocity | magnitude is set to twice of fbx
    +      fry = repelMag* Math.sin(theta_repel) #the y component of the repel's velocity | magnitude is set to twice of fby
    +  
    +      fsumx = fbx+frx #sum of x forces
    +      fsumy = fby+fry #sum of y forces
    +      fr = velocityMag#fr is the resulting magnitude
    +      thetaNew = Math.atan2(fsumy, fsumx)  #thetaNew is the resulting angle
    +      xnew = fr*Math.cos(thetaNew)#resulting x velocity
    +      ynew = fr*Math.sin(thetaNew)#resulting y velocity
    +      if (velocityMag < MAX_VELOCITY)
    +        ball.velocity =  Vector2d.new(xnew*1.1, ynew*1.1)
    +      else
    +        ball.velocity =  Vector2d.new(xnew, ynew)
    +      end
    +  
    +    end
    +  end
    +
    +#+end_src
    +
    +*** Physics And Collisions - Arbitrary Collision - main.rb
    +#+begin_src ruby
    +  # ./samples/04_physics_and_collisions/09_arbitrary_collision/app/main.rb
    +  INFINITY= 10**10
    +  MAX_VELOCITY = 8.0
    +  BALL_COUNT = 90
    +  BALL_DISTANCE = 20
    +  require 'app/vector2d.rb'
    +  require 'app/blocks.rb'
    +  require 'app/ball.rb'
    +  require 'app/rectangle.rb'
    +  require 'app/linear_collider.rb'
    +  require 'app/square_collider.rb'
    +  
    +  
    +  
    +  #Method to init default values
    +  def defaults args
    +    args.state.board_width ||= args.grid.w / 4
    +    args.state.board_height ||= args.grid.h
    +    args.state.game_area ||= [(args.state.board_width + args.grid.w / 8), 0, args.state.board_width, args.grid.h]
    +    args.state.balls ||= []
    +    args.state.num_balls ||= 0
    +    args.state.ball_created_at ||= args.state.tick_count
    +    args.state.ball_hypotenuse = (10**2 + 10**2)**0.5
    +    args.state.ballParents ||=nil
    +  
    +    init_blocks args
    +    init_balls args
    +  end
    +  
    +  begin :default_methods
    +    def init_blocks args
    +      block_size = args.state.board_width / 8
    +      #Space inbetween each block
    +      block_offset = 4
    +  
    +      args.state.squares ||=[
    +        Square.new(args, 2, 0, block_size, :right, block_offset),
    +        Square.new(args, 5, 0, block_size, :right, block_offset),
    +        Square.new(args, 6, 7, block_size, :right, block_offset)
    +      ]
    +  
    +  
    +      #Possible orientations are :right, :left, :up, :down
    +  
    +  
    +      args.state.tshapes ||= [
    +        TShape.new(args, 0, 6, block_size, :left, block_offset),
    +        TShape.new(args, 3, 3, block_size, :down, block_offset),
    +        TShape.new(args, 0, 3, block_size, :right, block_offset),
    +        TShape.new(args, 0, 11, block_size, :up, block_offset)
    +      ]
    +  
    +      args.state.lines ||= [
    +        Line.new(args,3, 8, block_size, :down, block_offset),
    +        Line.new(args, 7, 3, block_size, :up, block_offset),
    +        Line.new(args, 3, 7, block_size, :right, block_offset)
    +      ]
    +  
    +      #exit()
    +    end
    +  
    +    def init_balls args
    +      return unless args.state.num_balls < BALL_COUNT
    +  
    +  
    +      #only create a new ball every 10 ticks
    +      return unless args.state.ball_created_at.elapsed_time > 10
    +  
    +      if (args.state.num_balls == 0)
    +        args.state.balls.append(Ball.new(args,args.state.num_balls,BALL_COUNT-1, nil, nil))
    +        args.state.ballParents = [args.state.balls[0]]
    +      else
    +        args.state.balls.append(Ball.new(args,args.state.num_balls,BALL_COUNT-1, args.state.balls.last, nil) )
    +        args.state.balls[-2].child = args.state.balls[-1]
    +      end
    +      args.state.ball_created_at = args.state.tick_count
    +      args.state.num_balls += 1
    +    end
    +  end
    +  
    +  #Render loop
    +  def render args
    +    bgClr = {r:10, g:10, b:200}
    +    bgClr = {r:255-30, g:255-30, b:255-30}
    +  
    +    args.outputs.solids << [0, 0, $args.grid.right, $args.grid.top, bgClr[:r], bgClr[:g], bgClr[:b]];
    +    args.outputs.borders << args.state.game_area
    +  
    +    render_instructions args
    +    render_shapes args
    +  
    +    render_balls args
    +  
    +    #args.state.rectangle.draw args
    +  
    +    args.outputs.sprites << [$args.grid.right-(args.state.board_width + args.grid.w / 8), 0, $args.grid.right, $args.grid.top, "sprites/square-white-2.png", 0, 255, bgClr[:r], bgClr[:g], bgClr[:b]]
    +    args.outputs.sprites << [0, 0, (args.state.board_width + args.grid.w / 8), $args.grid.top, "sprites/square-white-2.png", 0, 255, bgClr[:r], bgClr[:g], bgClr[:b]]
    +  
    +  end
    +  
    +  begin :render_methods
    +    def render_instructions args
    +      #gtk.current_framerate
    +      args.outputs.labels << [20, $args.grid.top-20, "FPS: " + $gtk.current_framerate.to_s]
    +      if (args.state.balls != nil && args.state.balls[0] != nil)
    +          bx =  args.state.balls[0].velocity.x
    +          by =  args.state.balls[0].velocity.y
    +          bmg = (bx**2.0 + by**2.0)**0.5
    +          args.outputs.labels << [20, $args.grid.top-20-20, "V: " + bmg.to_s ]
    +      end
    +  
    +  
    +    end
    +  
    +    def render_shapes args
    +      for s in args.state.squares
    +        s.draw args
    +      end
    +  
    +      for l in args.state.lines
    +        l.draw args
    +      end
    +  
    +      for t in args.state.tshapes
    +        t.draw args
    +      end
    +  
    +  
    +    end
    +  
    +    def render_balls args
    +      #args.state.balls.each do |ball|
    +        #ball.draw args
    +      #end
    +  
    +      args.outputs.sprites << args.state.balls.map do |ball|
    +        ball.getDraw args
    +      end
    +    end
    +  end
    +  
    +  #Calls all methods necessary for performing calculations
    +  def calc args
    +    for b in args.state.ballParents
    +      b.update args
    +    end
    +  
    +    for s in args.state.squares
    +      s.update args
    +    end
    +  
    +    for l in args.state.lines
    +      l.update args
    +    end
    +  
    +    for t in args.state.tshapes
    +      t.update args
    +    end
    +  
    +  
    +  
    +  end
    +  
    +  begin :calc_methods
    +  
    +  end
    +  
    +  def tick args
    +    defaults args
    +    render args
    +    calc args
    +  end
    +
    +#+end_src
    +
    +*** Physics And Collisions - Arbitrary Collision - paddle.rb
    +#+begin_src ruby
    +  # ./samples/04_physics_and_collisions/09_arbitrary_collision/app/paddle.rb
    +  class Paddle
    +    attr_accessor :enabled
    +  
    +    def initialize ()
    +      @x=WIDTH/2
    +      @y=100
    +      @width=100
    +      @height=20
    +      @speed=10
    +  
    +      @xyCollision  = LinearCollider.new({x: @x,y: @y+@height+5}, {x: @x+@width, y: @y+@height+5})
    +      @xyCollision2 = LinearCollider.new({x: @x,y: @y}, {x: @x+@width, y: @y}, :pos)
    +      @xyCollision3 = LinearCollider.new({x: @x,y: @y}, {x: @x, y: @y+@height+5})
    +      @xyCollision4 = LinearCollider.new({x: @x+@width,y: @y}, {x: @x+@width, y: @y+@height+5}, :pos)
    +  
    +      @enabled = true
    +    end
    +  
    +    def update args
    +      @xyCollision.resetPoints({x: @x,y: @y+@height+5}, {x: @x+@width, y: @y+@height+5})
    +      @xyCollision2.resetPoints({x: @x,y: @y}, {x: @x+@width, y: @y})
    +      @xyCollision3.resetPoints({x: @x,y: @y}, {x: @x, y: @y+@height+5})
    +      @xyCollision4.resetPoints({x: @x+@width,y: @y}, {x: @x+@width, y: @y+@height+5})
    +  
    +      @xyCollision.update  args
    +      @xyCollision2.update args
    +      @xyCollision3.update args
    +      @xyCollision4.update args
    +  
    +      args.inputs.keyboard.key_held.left  ||= false
    +      args.inputs.keyboard.key_held.right  ||= false
    +  
    +      if not (args.inputs.keyboard.key_held.left == args.inputs.keyboard.key_held.right)
    +        if args.inputs.keyboard.key_held.left && @enabled
    +          @x-=@speed
    +        elsif args.inputs.keyboard.key_held.right && @enabled
    +          @x+=@speed
    +        end
    +      end
    +  
    +      xmin =WIDTH/4
    +      xmax = 3*(WIDTH/4)
    +      @x = (@x+@width > xmax) ? xmax-@width : (@x @pointB.x)
    -        @pointA, @pointB = @pointB, @pointA
    -      end
       
    -      @linearCollider_collision_once = false
    -    end
    +    #start [Array of length 2] start of the line segment as a x,y cordinate
    +    #last [Array of length 2] end of the line segment as a x,y cordinate
       
    -    def collisionSlope args
    -      if (@pointB.x-@pointA.x == 0)
    -        return INFINITY
    -      end
    -      return (@pointB.y - @pointA.y) / (@pointB.x - @pointA.x)
    -    end
    +    #inorder for the LinearCollider to be functional the line segment must be said to have a thickness
    +    #(as it is unlikly that a colliding object will land exactly on the linesegment)
       
    +    #extension defines if the line's thickness extends negatively or positively
    +    #extension :pos     extends positively
    +    #extension :neg     extends negatively
       
    -    def collision? (args, points, ball=nil)
    +    #thickness [float] how thick the line should be (should always be atleast as large as the magnitude of the colliding object)
    +    def initialize (pointA, pointB, extension=:neg, thickness=10)
    +      @pointA = pointA
    +      @pointB = pointB
    +      @thickness = thickness
    +      @extension = extension
       
    -      slope = collisionSlope args
    -      result = false
    +      @pointAExtended={
    +        x: @pointA.x + @thickness*(@extension == :neg ? -1 : 1),
    +        y: @pointA.y + @thickness*(@extension == :neg ? -1 : 1)
    +      }
    +      @pointBExtended={
    +        x: @pointB.x + @thickness*(@extension == :neg ? -1 : 1),
    +        y: @pointB.y + @thickness*(@extension == :neg ? -1 : 1)
    +      }
       
    -      # calculate a vector with a magnitude of (1/2)collisionWidth and a direction perpendicular to the collision line
    -      vect=nil;mag=nil;vect=nil;
    -      if @mode == :both
    -        vect = {x: @pointB.x - @pointA.x, y:@pointB.y - @pointA.y}
    -        mag  = (vect.x**2 + vect.y**2)**0.5
    -        vect = {y: -1*(vect.x/(mag))*@collisionWidth*0.5, x: (vect.y/(mag))*@collisionWidth*0.5}
    -      else
    -        vect = {x: @pointB.x - @pointA.x, y:@pointB.y - @pointA.y}
    -        mag  = (vect.x**2 + vect.y**2)**0.5
    -        vect = {y: -1*(vect.x/(mag))*@collisionWidth, x: (vect.y/(mag))*@collisionWidth}
    -      end
    +    end
       
    -      rpointA=nil;rpointB=nil;rpointC=nil;rpointD=nil;
    -      if @mode == :pos
    -        rpointA = {x:@pointA.x + vect.x, y:@pointA.y + vect.y}
    -        rpointB = {x:@pointB.x + vect.x, y:@pointB.y + vect.y}
    -        rpointC = {x:@pointB.x, y:@pointB.y}
    -        rpointD = {x:@pointA.x, y:@pointA.y}
    -      elsif @mode == :neg
    -        rpointA = {x:@pointA.x, y:@pointA.y}
    -        rpointB = {x:@pointB.x, y:@pointB.y}
    -        rpointC = {x:@pointB.x - vect.x, y:@pointB.y - vect.y}
    -        rpointD = {x:@pointA.x - vect.x, y:@pointA.y - vect.y}
    -      elsif @mode == :both
    -        rpointA = {x:@pointA.x + vect.x, y:@pointA.y + vect.y}
    -        rpointB = {x:@pointB.x + vect.x, y:@pointB.y + vect.y}
    -        rpointC = {x:@pointB.x - vect.x, y:@pointB.y - vect.y}
    -        rpointD = {x:@pointA.x - vect.x, y:@pointA.y - vect.y}
    -      end
    -      #four point rectangle
    +    def resetPoints(pointA,pointB)
    +      @pointA = pointA
    +      @pointB = pointB
       
    +      @pointAExtended={
    +        x:@pointA.x + @thickness*(@extension == :neg ? -1 : 1),
    +        y:@pointA.y + @thickness*(@extension == :neg ? -1 : 1)
    +      }
    +      @pointBExtended={
    +        x:@pointB.x + @thickness*(@extension == :neg ? -1 : 1),
    +        y:@pointB.y + @thickness*(@extension == :neg ? -1 : 1)
    +      }
    +    end
       
    +    #TODO: Ugly function
    +    def slope (pointA, pointB)
    +      return (pointB.x==pointA.x) ? INFINITY : (pointB.y+-pointA.y)/(pointB.x+-pointA.x)
    +    end
       
    -      if ball != nil
    -        xs = [rpointA.x,rpointB.x,rpointC.x,rpointD.x]
    -        ys = [rpointA.y,rpointB.y,rpointC.y,rpointD.y]
    -        correct = 1
    -        rect1 = [ball.x, ball.y, ball.width, ball.height]
    -        #$r1 = rect1
    -        rect2 = [xs.min-correct,ys.min-correct,(xs.max-xs.min)+correct*2,(ys.max-ys.min)+correct*2]
    -        #$r2 = rect2
    -        if rect1.intersect_rect?(rect2) == false
    -          return false
    -        end
    +    #TODO: Ugly function
    +    def intercept(pointA, pointB)
    +      if (slope(pointA, pointB) == INFINITY)
    +        -INFINITY
    +      elsif slope(pointA, pointB) == -1*INFINITY
    +        INFINITY
    +      else
    +        pointA.y+-1.0*(slope(pointA, pointB)*pointA.x)
           end
    +    end
       
    +    def calcY(pointA, pointB, x)
    +      return slope(pointA, pointB)*x + intercept(pointA, pointB)
    +    end
       
    -      #area of a triangle
    -      triArea = -> (a,b,c) { ((a.x * (b.y - c.y) + b.x * (c.y - a.y) + c.x * (a.y - b.y))/2.0).abs }
    -  
    -      #if at least on point is in the rectangle then collision? is true - otherwise false
    -      for point in points
    -        #Check whether a given point lies inside a rectangle or not:
    -        #if the sum of the area of traingls, PAB, PBC, PCD, PAD equal the area of the rec, then an intersection has occured
    -        areaRec =  triArea.call(rpointA, rpointB, rpointC)+triArea.call(rpointA, rpointC, rpointD)
    -        areaSum = [
    -          triArea.call(point, rpointA, rpointB),triArea.call(point, rpointB, rpointC),
    -          triArea.call(point, rpointC, rpointD),triArea.call(point, rpointA, rpointD)
    -        ].inject(0){|sum,x| sum + x }
    -        e = 0.0001 #allow for minor error
    -        if areaRec>= areaSum-e and areaRec<= areaSum+e
    -          result = true
    -          #return true
    -          break
    -        end
    +    #test if a collision has occurred
    +    def isCollision? (point)
    +      #INFINITY slop breaks down when trying to determin collision, ergo it requires a special test
    +      if slope(@pointA, @pointB) ==  INFINITY &&
    +        point.x >= [@pointA.x,@pointB.x].min+(@extension == :pos ? -@thickness : 0) &&
    +        point.x <= [@pointA.x,@pointB.x].max+(@extension == :neg ?  @thickness : 0) &&
    +        point.y >= [@pointA.y,@pointB.y].min && point.y <= [@pointA.y,@pointB.y].max
    +          return true
           end
       
    -      #args.outputs.lines << [@pointA.x, @pointA.y, @pointB.x, @pointB.y,     000, 000, 000]
    -      #args.outputs.lines << [rpointA.x, rpointA.y, rpointB.x, rpointB.y,     255, 000, 000]
    -      #args.outputs.lines << [rpointC.x, rpointC.y, rpointD.x, rpointD.y,     000, 000, 255]
    +      isNegInLine   = @extension == :neg &&
    +                      point.y <= slope(@pointA, @pointB)*point.x+intercept(@pointA,@pointB) &&
    +                      point.y >= point.x*slope(@pointAExtended, @pointBExtended)+intercept(@pointAExtended,@pointBExtended)
    +      isPosInLine   = @extension == :pos &&
    +                      point.y >= slope(@pointA, @pointB)*point.x+intercept(@pointA,@pointB) &&
    +                      point.y <= point.x*slope(@pointAExtended, @pointBExtended)+intercept(@pointAExtended,@pointBExtended)
    +      isInBoxBounds = point.x >= [@pointA.x,@pointB.x].min &&
    +                      point.x <= [@pointA.x,@pointB.x].max &&
    +                      point.y >= [@pointA.y,@pointB.y].min+(@extension == :neg ? -@thickness : 0) &&
    +                      point.y <= [@pointA.y,@pointB.y].max+(@extension == :pos ? @thickness : 0)
       
    +      return isInBoxBounds && (isNegInLine || isPosInLine)
       
    -      #puts (rpointA.x.to_s + " " +  rpointA.y.to_s + " " + rpointB.x.to_s + " "+ rpointB.y.to_s)
    -      return result
    -    end #end collision?
    +    end
       
    -    def getRepelMagnitude (fbx, fby, vrx, vry, ballMag)
    +    def getRepelMagnitude (fbx, fby, vrx, vry, args)
           a = fbx ; b = vrx ; c = fby
    -      d = vry ; e = ballMag
    +      d = vry ; e = args.state.ball.velocity.mag
    +  
           if b**2 + d**2 == 0
    -        #unexpected
    +        puts "magnitude error"
           end
    +  
           x1 = (-a*b+-c*d + (e**2 * b**2 - b**2 * c**2 + 2*a*b*c*d + e**2 + d**2 - a**2 * d**2)**0.5)/(b**2 + d**2)
           x2 = -((a*b + c*d + (e**2 * b**2 - b**2 * c**2 + 2*a*b*c*d + e**2 * d**2 - a**2 * d**2)**0.5)/(b**2 + d**2))
    -      err = 0.00001
    -      o = ((fbx + x1*vrx)**2 + (fby + x1*vry)**2 ) ** 0.5
    -      p = ((fbx + x2*vrx)**2 + (fby + x2*vry)**2 ) ** 0.5
    -      r = 0
    -      if (ballMag >= o-err and ballMag <= o+err)
    -        r = x1
    -      elsif (ballMag >= p-err and ballMag <= p+err)
    -        r = x2
    -      else
    -        #unexpected
    -      end
    -      return r
    +      return ((a+x1*b)**2 + (c+x1*d)**2 == e**2) ? x1 : x2
         end
       
    -    def collide args, ball
    -      slope = collisionSlope args
    +    def update args
    +      #each of the four points on the square ball - NOTE simple to extend to a circle
    +      points= [ {x: args.state.ball.xy.x,                          y: args.state.ball.xy.y},
    +                {x: args.state.ball.xy.x+args.state.ball.width,    y: args.state.ball.xy.y},
    +                {x: args.state.ball.xy.x,                          y: args.state.ball.xy.y+args.state.ball.height},
    +                {x: args.state.ball.xy.x+args.state.ball.width,    y: args.state.ball.xy.y + args.state.ball.height}
    +              ]
       
    -      # perpVect: normal vector perpendicular to collision
    -      perpVect = {x: @pointB.x - @pointA.x, y:@pointB.y - @pointA.y}
    -      mag  = (perpVect.x**2 + perpVect.y**2)**0.5
    -      perpVect = {x: perpVect.x/(mag), y: perpVect.y/(mag)}
    -      perpVect = {x: -perpVect.y, y: perpVect.x}
    -      if perpVect.y > 0 #ensure perpVect points upward
    -        perpVect = {x: perpVect.x*-1, y: perpVect.y*-1}
    -      end
    -      previousPosition = {
    -        x:ball.x-ball.velocity.x,
    -        y:ball.y-ball.velocity.y
    -      }
    -      yInterc = @pointA.y + -slope*@pointA.x
    -      if slope == INFINITY
    -        if previousPosition.x < @pointA.x
    -          perpVect = {x: perpVect.x*-1, y: perpVect.y*-1}
    -          yInterc = -INFINITY
    -        end
    -      elsif previousPosition.y < slope*previousPosition.x + yInterc #check if ball is bellow or above the collider to determine if perpVect is - or +
    -        perpVect = {x: perpVect.x*-1, y: perpVect.y*-1}
    -      end
    +      #for each point p in points
    +      for point in points
    +        #isCollision.md has more information on this section
    +        #TODO: section can certainly be simplifyed
    +        if isCollision?(point)
    +          u = Vector2d.new(1.0,((slope(@pointA, @pointB)==0) ? INFINITY : -1/slope(@pointA, @pointB))*1.0).normalize #normal perpendicular (to line segment) vector
       
    -      velocityMag = (ball.velocity.x**2 + ball.velocity.y**2)**0.5
    -      theta_ball=Math.atan2(ball.velocity.y,ball.velocity.x) #the angle of the ball's velocity
    -      theta_repel=Math.atan2(perpVect.y,perpVect.x) #the angle of the repelling force(perpVect)
    +          #the vector with the repeling force can be u or -u depending of where the ball was coming from in relation to the line segment
    +          previousBallPosition=Vector2d.new(point.x-args.state.ball.velocity.x,point.y-args.state.ball.velocity.y)
    +          choiceA = (u.mult(1))
    +          choiceB =  (u.mult(-1))
    +          vectorRepel = nil
       
    -      fbx = velocityMag * Math.cos(theta_ball) #the x component of the ball's velocity
    -      fby = velocityMag * Math.sin(theta_ball) #the y component of the ball's velocity
    +          if (slope(@pointA, @pointB))!=INFINITY && u.y < 0
    +            choiceA, choiceB = choiceB, choiceA
    +          end
    +          vectorRepel = (previousBallPosition.y > calcY(@pointA, @pointB, previousBallPosition.x)) ? choiceA : choiceB
       
    -      #the magnitude of the repelling force
    -      repelMag = getRepelMagnitude(fbx, fby, perpVect.x, perpVect.y, (ball.velocity.x**2 + ball.velocity.y**2)**0.5)
    -      frx = repelMag* Math.cos(theta_repel) #the x component of the repel's velocity | magnitude is set to twice of fbx
    -      fry = repelMag* Math.sin(theta_repel) #the y component of the repel's velocity | magnitude is set to twice of fby
    +          #vectorRepel = (previousBallPosition.y > slope(@pointA, @pointB)*previousBallPosition.x+intercept(@pointA,@pointB)) ? choiceA : choiceB)
    +          if (slope(@pointA, @pointB) == INFINITY) #slope INFINITY breaks down in the above test, ergo it requires a custom test
    +            vectorRepel = (previousBallPosition.x > @pointA.x) ? (u.mult(1)) : (u.mult(-1))
    +          end
    +          #puts ("     " + $t[0].to_s + "," + $t[1].to_s + "    " + $t[2].to_s + "," + $t[3].to_s + "     " + "   " + u.x.to_s + "," + u.y.to_s)
    +          #vectorRepel now has the repeling force
       
    -      fsumx = fbx+frx #sum of x forces
    -      fsumy = fby+fry #sum of y forces
    -      fr = velocityMag#fr is the resulting magnitude
    -      thetaNew = Math.atan2(fsumy, fsumx)  #thetaNew is the resulting angle
    -      xnew = fr*Math.cos(thetaNew)#resulting x velocity
    -      ynew = fr*Math.sin(thetaNew)#resulting y velocity
    -      if (velocityMag < MAX_VELOCITY)
    -        ball.velocity =  Vector2d.new(xnew*1.1, ynew*1.1)
    -      else
    -        ball.velocity =  Vector2d.new(xnew, ynew)
    +          mag = args.state.ball.velocity.mag
    +          theta_ball=Math.atan2(args.state.ball.velocity.y,args.state.ball.velocity.x) #the angle of the ball's velocity
    +          theta_repel=Math.atan2(vectorRepel.y,vectorRepel.x) #the angle of the repeling force
    +          #puts ("theta:" + theta_ball.to_s + " " + theta_repel.to_s) #theta okay
    +  
    +          fbx = mag * Math.cos(theta_ball) #the x component of the ball's velocity
    +          fby = mag * Math.sin(theta_ball) #the y component of the ball's velocity
    +  
    +          repelMag = getRepelMagnitude(fbx, fby, vectorRepel.x, vectorRepel.y, args)
    +  
    +          frx = repelMag* Math.cos(theta_repel) #the x component of the repel's velocity | magnitude is set to twice of fbx
    +          fry = repelMag* Math.sin(theta_repel) #the y component of the repel's velocity | magnitude is set to twice of fby
    +  
    +          fsumx = fbx+frx #sum of x forces
    +          fsumy = fby+fry #sum of y forces
    +          fr = mag#fr is the resulting magnitude
    +          thetaNew = Math.atan2(fsumy, fsumx)  #thetaNew is the resulting angle
    +          xnew = fr*Math.cos(thetaNew) #resulting x velocity
    +          ynew = fr*Math.sin(thetaNew) #resulting y velocity
    +  
    +          args.state.ball.velocity = Vector2d.new(xnew,ynew)
    +          #args.state.ball.xy.add(args.state.ball.velocity)
    +          break #no need to check the other points ?
    +        else
    +        end
           end
    +    end #end update
       
    -    end
       end
     
     #+end_src
     
    -*** Physics And Collisions - Arbitrary Collision - main.rb
    +*** Physics And Collisions - Collision With Object Removal - main.rb
     #+begin_src ruby
    -  # ./samples/04_physics_and_collisions/09_arbitrary_collision/app/main.rb
    -  INFINITY= 10**10
    -  MAX_VELOCITY = 8.0
    -  BALL_COUNT = 90
    -  BALL_DISTANCE = 20
    -  require 'app/vector2d.rb'
    -  require 'app/blocks.rb'
    -  require 'app/ball.rb'
    -  require 'app/rectangle.rb'
    -  require 'app/linear_collider.rb'
    -  require 'app/square_collider.rb'
    -  
    -  
    -  
    -  #Method to init default values
    -  def defaults args
    -    args.state.board_width ||= args.grid.w / 4
    -    args.state.board_height ||= args.grid.h
    -    args.state.game_area ||= [(args.state.board_width + args.grid.w / 8), 0, args.state.board_width, args.grid.h]
    -    args.state.balls ||= []
    -    args.state.num_balls ||= 0
    -    args.state.ball_created_at ||= args.state.tick_count
    -    args.state.ball_hypotenuse = (10**2 + 10**2)**0.5
    -    args.state.ballParents ||=nil
    -  
    -    init_blocks args
    -    init_balls args
    -  end
    -  
    -  begin :default_methods
    -    def init_blocks args
    -      block_size = args.state.board_width / 8
    -      #Space inbetween each block
    -      block_offset = 4
    +  # ./samples/04_physics_and_collisions/10_collision_with_object_removal/app/main.rb
    +  # coding: utf-8
    +  INFINITY= 10**10
    +  WIDTH=1280
    +  HEIGHT=720
       
    -      args.state.squares ||=[
    -        Square.new(args, 2, 0, block_size, :right, block_offset),
    -        Square.new(args, 5, 0, block_size, :right, block_offset),
    -        Square.new(args, 6, 7, block_size, :right, block_offset)
    -      ]
    +  require 'app/vector2d.rb'
    +  require 'app/paddle.rb'
    +  require 'app/ball.rb'
    +  require 'app/linear_collider.rb'
       
    +  #Method to init default values
    +  def defaults args
    +    args.state.game_board ||= [(args.grid.w / 2 - args.grid.w / 4), 0, (args.grid.w / 2), args.grid.h]
    +    args.state.bricks ||= []
    +    args.state.num_bricks ||= 0
    +    args.state.game_over_at ||= 0
    +    args.state.paddle ||= Paddle.new
    +    args.state.ball   ||= Ball.new
    +    args.state.westWall  ||= LinearCollider.new({x: args.grid.w/4,      y: 0},          {x: args.grid.w/4,      y: args.grid.h}, :pos)
    +    args.state.eastWall  ||= LinearCollider.new({x: 3*args.grid.w*0.25, y: 0},          {x: 3*args.grid.w*0.25, y: args.grid.h})
    +    args.state.southWall ||= LinearCollider.new({x: 0,                  y: 0},          {x: args.grid.w,        y: 0})
    +    args.state.northWall ||= LinearCollider.new({x: 0,                  y:args.grid.h}, {x: args.grid.w,        y: args.grid.h}, :pos)
       
    -      #Possible orientations are :right, :left, :up, :down
    +    #args.state.testWall ||= LinearCollider.new({x:0 , y:0},{x:args.grid.w, y:args.grid.h})
    +  end
       
    +  #Render loop
    +  def render args
    +    render_instructions args
    +    render_board args
    +    render_bricks args
    +  end
       
    -      args.state.tshapes ||= [
    -        TShape.new(args, 0, 6, block_size, :left, block_offset),
    -        TShape.new(args, 3, 3, block_size, :down, block_offset),
    -        TShape.new(args, 0, 3, block_size, :right, block_offset),
    -        TShape.new(args, 0, 11, block_size, :up, block_offset)
    -      ]
    +  begin :render_methods
    +    #Method to display the instructions of the game
    +    def render_instructions args
    +      args.outputs.labels << [225, args.grid.h - 30, "← and → to move the paddle left and right",  0, 1]
    +    end
       
    -      args.state.lines ||= [
    -        Line.new(args,3, 8, block_size, :down, block_offset),
    -        Line.new(args, 7, 3, block_size, :up, block_offset),
    -        Line.new(args, 3, 7, block_size, :right, block_offset)
    -      ]
    +    def render_board args
    +      args.outputs.borders << args.state.game_board
    +    end
       
    -      #exit()
    +    def render_bricks args
    +      args.outputs.solids << args.state.bricks.map(&:rect)
         end
    +  end
       
    -    def init_balls args
    -      return unless args.state.num_balls < BALL_COUNT
    +  #Calls all methods necessary for performing calculations
    +  def calc args
    +    add_new_bricks args
    +    reset_game args
    +    calc_collision args
    +    win_game args
       
    +    args.state.westWall.update args
    +    args.state.eastWall.update args
    +    args.state.southWall.update args
    +    args.state.northWall.update args
    +    args.state.paddle.update args
    +    args.state.ball.update args
       
    -      #only create a new ball every 10 ticks
    -      return unless args.state.ball_created_at.elapsed_time > 10
    +    #args.state.testWall.update args
       
    -      if (args.state.num_balls == 0)
    -        args.state.balls.append(Ball.new(args,args.state.num_balls,BALL_COUNT-1, nil, nil))
    -        args.state.ballParents = [args.state.balls[0]]
    -      else
    -        args.state.balls.append(Ball.new(args,args.state.num_balls,BALL_COUNT-1, args.state.balls.last, nil) )
    -        args.state.balls[-2].child = args.state.balls[-1]
    -      end
    -      args.state.ball_created_at = args.state.tick_count
    -      args.state.num_balls += 1
    -    end
    +    args.state.paddle.render args
    +    args.state.ball.render args
       end
       
    -  #Render loop
    -  def render args
    -    bgClr = {r:10, g:10, b:200}
    -    bgClr = {r:255-30, g:255-30, b:255-30}
    -  
    -    args.outputs.solids << [0, 0, $args.grid.right, $args.grid.top, bgClr[:r], bgClr[:g], bgClr[:b]];
    -    args.outputs.borders << args.state.game_area
    +  begin :calc_methods
    +    def add_new_bricks args
    +      return if args.state.num_bricks > 40
       
    -    render_instructions args
    -    render_shapes args
    +      #Width of the game board is 640px
    +      brick_width = (args.grid.w / 2) / 10
    +      brick_height = brick_width / 2
       
    -    render_balls args
    +      (4).map_with_index do |y|
    +        #Make a box that is 10 bricks wide and 4 bricks tall
    +        args.state.bricks += (10).map_with_index do |x|
    +          args.state.new_entity(:brick) do |b|
    +            b.x = x * brick_width + (args.grid.w / 2 - args.grid.w / 4)
    +            b.y = args.grid.h - ((y + 1) * brick_height)
    +            b.rect = [b.x + 1, b.y - 1, brick_width - 2, brick_height - 2, 235, 50 * y, 52]
       
    -    #args.state.rectangle.draw args
    +            #Add linear colliders to the brick
    +            b.collider_bottom = LinearCollider.new([(b.x-2), (b.y-5)], [(b.x+brick_width+1), (b.y-5)], :pos, brick_height)
    +            b.collider_right = LinearCollider.new([(b.x+brick_width+1), (b.y-5)], [(b.x+brick_width+1), (b.y+brick_height+1)], :pos)
    +            b.collider_left = LinearCollider.new([(b.x-2), (b.y-5)], [(b.x-2), (b.y+brick_height+1)], :neg)
    +            b.collider_top = LinearCollider.new([(b.x-2), (b.y+brick_height+1)], [(b.x+brick_width+1), (b.y+brick_height+1)], :neg)
       
    -    args.outputs.sprites << [$args.grid.right-(args.state.board_width + args.grid.w / 8), 0, $args.grid.right, $args.grid.top, "sprites/square-white-2.png", 0, 255, bgClr[:r], bgClr[:g], bgClr[:b]]
    -    args.outputs.sprites << [0, 0, (args.state.board_width + args.grid.w / 8), $args.grid.top, "sprites/square-white-2.png", 0, 255, bgClr[:r], bgClr[:g], bgClr[:b]]
    +            # @xyCollision  = LinearCollider.new({x: @x,y: @y+@height}, {x: @x+@width, y: @y+@height})
    +            # @xyCollision2 = LinearCollider.new({x: @x,y: @y}, {x: @x+@width, y: @y}, :pos)
    +            # @xyCollision3 = LinearCollider.new({x: @x,y: @y}, {x: @x, y: @y+@height})
    +            # @xyCollision4 = LinearCollider.new({x: @x+@width,y: @y}, {x: @x+@width, y: @y+@height}, :pos)
       
    -  end
    +            b.broken = false
       
    -  begin :render_methods
    -    def render_instructions args
    -      #gtk.current_framerate
    -      args.outputs.labels << [20, $args.grid.top-20, "FPS: " + $gtk.current_framerate.to_s]
    -      if (args.state.balls != nil && args.state.balls[0] != nil)
    -          bx =  args.state.balls[0].velocity.x
    -          by =  args.state.balls[0].velocity.y
    -          bmg = (bx**2.0 + by**2.0)**0.5
    -          args.outputs.labels << [20, $args.grid.top-20-20, "V: " + bmg.to_s ]
    +            args.state.num_bricks += 1
    +          end
    +        end
           end
    -  
    -  
         end
       
    -    def render_shapes args
    -      for s in args.state.squares
    -        s.draw args
    -      end
    +    def reset_game args
    +      if args.state.ball.xy.y < 20 && args.state.game_over_at.elapsed_time > 60
    +        #Freeze the ball
    +        args.state.ball.velocity.x = 0
    +        args.state.ball.velocity.y = 0
    +        #Freeze the paddle
    +        args.state.paddle.enabled = false
       
    -      for l in args.state.lines
    -        l.draw args
    +        args.state.game_over_at = args.state.tick_count
           end
       
    -      for t in args.state.tshapes
    -        t.draw args
    +      if args.state.game_over_at.elapsed_time < 60 && args.state.tick_count > 60 && args.state.bricks.count != 0
    +        #Display a "Game over" message
    +        args.outputs.labels << [100, 100, "GAME OVER", 10]
           end
       
    +      #If 60 frames have passed since the game ended, restart the game
    +      if args.state.game_over_at != 0 && args.state.game_over_at.elapsed_time == 60
    +        # FIXME: only put value types in state
    +        args.state.ball = Ball.new
       
    -    end
    -  
    -    def render_balls args
    -      #args.state.balls.each do |ball|
    -        #ball.draw args
    -      #end
    +        # FIXME: only put value types in state
    +        args.state.paddle = Paddle.new
       
    -      args.outputs.sprites << args.state.balls.map do |ball|
    -        ball.getDraw args
    +        args.state.bricks = []
    +        args.state.num_bricks = 0
           end
         end
    -  end
       
    -  #Calls all methods necessary for performing calculations
    -  def calc args
    -    for b in args.state.ballParents
    -      b.update args
    -    end
    +    def calc_collision args
    +      #Remove the brick if it is hit with the ball
    +      ball = args.state.ball
    +      ball_rect = [ball.xy.x, ball.xy.y, 20, 20]
       
    -    for s in args.state.squares
    -      s.update args
    -    end
    +      #Loop through each brick to see if the ball is colliding with it
    +      args.state.bricks.each do |b|
    +        if b.rect.intersect_rect?(ball_rect)
    +          #Run the linear collider for the brick if there is a collision
    +          b[:collider_bottom].update args
    +          b[:collider_right].update args
    +          b[:collider_left].update args
    +          b[:collider_top].update args
       
    -    for l in args.state.lines
    -      l.update args
    -    end
    +          b.broken = true
    +        end
    +      end
       
    -    for t in args.state.tshapes
    -      t.update args
    +      args.state.bricks = args.state.bricks.reject(&:broken)
         end
       
    +    def win_game args
    +      if args.state.bricks.count == 0 && args.state.game_over_at.elapsed_time > 60
    +        #Freeze the ball
    +        args.state.ball.velocity.x = 0
    +        args.state.ball.velocity.y = 0
    +        #Freeze the paddle
    +        args.state.paddle.enabled = false
       
    +        args.state.game_over_at = args.state.tick_count
    +      end
       
    -  end
    -  
    -  begin :calc_methods
    +      if args.state.game_over_at.elapsed_time < 60 && args.state.tick_count > 60 && args.state.bricks.count == 0
    +        #Display a "Game over" message
    +        args.outputs.labels << [100, 100, "CONGRATULATIONS!", 10]
    +      end
    +    end
       
       end
       
    @@ -9569,13 +9586,25 @@ Follows is a source code listing for all files that have been open sourced. This
         defaults args
         render args
         calc args
    +  
    +    #args.outputs.lines << [0, 0, args.grid.w, args.grid.h]
    +  
    +    #$tc+=1
    +    #if $tc == 5
    +      #$train << [args.state.ball.xy.x, args.state.ball.xy.y]
    +      #$tc = 0
    +    #end
    +    #for t in $train
    +  
    +      #args.outputs.solids << [t[0],t[1],5,5,255,0,0];
    +    #end
       end
     
     #+end_src
     
    -*** Physics And Collisions - Arbitrary Collision - paddle.rb
    +*** Physics And Collisions - Collision With Object Removal - paddle.rb
     #+begin_src ruby
    -  # ./samples/04_physics_and_collisions/09_arbitrary_collision/app/paddle.rb
    +  # ./samples/04_physics_and_collisions/10_collision_with_object_removal/app/paddle.rb
       class Paddle
         attr_accessor :enabled
       
    @@ -9632,977 +9661,963 @@ Follows is a source code listing for all files that have been open sourced. This
     
     #+end_src
     
    -*** Physics And Collisions - Arbitrary Collision - rectangle.rb
    +*** Physics And Collisions - Collision With Object Removal - tests.rb
     #+begin_src ruby
    -  # ./samples/04_physics_and_collisions/09_arbitrary_collision/app/rectangle.rb
    -  class Rectangle
    -    def initialize args
    +  # ./samples/04_physics_and_collisions/10_collision_with_object_removal/app/tests.rb
    +  # For advanced users:
    +  # You can put some quick verification tests here, any method
    +  # that starts with the `test_` will be run when you save this file.
       
    -      @image = "sprites/roundSquare_white.png"
    -      @width  = 160.0
    -      @height = 80.0
    -      @x=$args.grid.right/2.0 - @width/2.0
    -      @y=$args.grid.top/2.0 - @height/2.0
    +  # Here is an example test and game
       
    -      @xtmp = @width  * (1.0/10.0)
    -      @ytmp = @height * (1.0/10.0)
    +  # To run the test: ./dragonruby mygame --eval app/tests.rb --no-tick
       
    -      #ball0 = args.state.balls[0]
    -      #hypotenuse = (args.state.balls[0].width**2 + args.state.balls[0].height**2)**0.5
    -      hypotenuse=args.state.ball_hypotenuse
    -      @boldXY = {x:(@x-hypotenuse/2)-1, y:(@y-hypotenuse/2)-1}
    -      @boldWidth = @width + hypotenuse + 2
    -      @boldHeight = @height + hypotenuse + 2
    -      @bold = [(@x-hypotenuse/2)-1,(@y-hypotenuse/2)-1,@width + hypotenuse + 2,@height + hypotenuse + 2]
    +  class MySuperHappyFunGame
    +    attr_gtk
       
    +    def tick
    +      outputs.solids << [100, 100, 300, 300]
    +    end
    +  end
       
    -      @points = [
    -        {x:@x,        y:@y+@ytmp},
    -        {x:@x+@xtmp,        y:@y},
    -        {x:@x+@width-@xtmp, y:@y},
    -        {x:@x+@width, y:@y+@ytmp},
    -        {x:@x+@width, y:@y+@height-@ytmp},#
    -        {x:@x+@width-@xtmp, y:@y+@height},
    -        {x:@x+@xtmp,        y:@y+@height},
    -        {x:@x,        y:@y+@height-@ytmp}
    -      ]
    +  def test_universe args, assert
    +    game = MySuperHappyFunGame.new
    +    game.args = args
    +    game.tick
    +    assert.true!  args.outputs.solids.length == 1, "failure: a solid was not added after tick"
    +    assert.false! 1 == 2, "failure: some how, 1 equals 2, the world is ending"
    +    puts "test_universe completed successfully"
    +  end
       
    -      @colliders = []
    -      #i = 0
    -      #while i < @points.length-1
    -        #@colliders.append(LinearCollider.new(@points[i],@points[i+1],:pos))
    -        #i+=1
    -      #end
    -      @colliders.append(LinearCollider.new(@points[0],@points[1], :neg))
    -      @colliders.append(LinearCollider.new(@points[1],@points[2], :neg))
    -      @colliders.append(LinearCollider.new(@points[2],@points[3], :neg))
    -      @colliders.append(LinearCollider.new(@points[3],@points[4], :neg))
    -      @colliders.append(LinearCollider.new(@points[4],@points[5], :pos))
    -      @colliders.append(LinearCollider.new(@points[5],@points[6], :pos))
    -      @colliders.append(LinearCollider.new(@points[6],@points[7], :pos))
    -      @colliders.append(LinearCollider.new(@points[0],@points[7], :pos))
    +  puts "running tests"
    +  $gtk.reset 100
    +  $gtk.log_level = :off
    +  $gtk.tests.start
    +
    +#+end_src
    +
    +*** Physics And Collisions - Collision With Object Removal - vector2d.rb
    +#+begin_src ruby
    +  # ./samples/04_physics_and_collisions/10_collision_with_object_removal/app/vector2d.rb
    +  
    +  class Vector2d
    +    attr_accessor :x, :y
    +  
    +    def initialize x=0, y=0
    +      @x=x
    +      @y=y
    +    end
    +  
    +    #returns a vector multiplied by scalar x
    +    #x [float] scalar
    +    def mult x
    +      r = Vector2d.new(0,0)
    +      r.x=@x*x
    +      r.y=@y*x
    +      r
    +    end
    +  
    +    # vect [Vector2d] vector to copy
    +    def copy vect
    +      Vector2d.new(@x, @y)
    +    end
    +  
    +    #returns a new vector equivalent to this+vect
    +    #vect [Vector2d] vector to add to self
    +    def add vect
    +      Vector2d.new(@x+vect.x,@y+vect.y)
    +    end
    +  
    +    #returns a new vector equivalent to this-vect
    +    #vect [Vector2d] vector to subtract to self
    +    def sub vect
    +      Vector2d.new(@x-vect.c, @y-vect.y)
    +    end
    +  
    +    #return the magnitude of the vector
    +    def mag
    +      ((@x**2)+(@y**2))**0.5
    +    end
    +  
    +    #returns a new normalize version of the vector
    +    def normalize
    +      Vector2d.new(@x/mag, @y/mag)
    +    end
    +  
    +    #TODO delet?
    +    def distABS vect
    +      (((vect.x-@x)**2+(vect.y-@y)**2)**0.5).abs()
    +    end
    +  end
    +
    +#+end_src
    +
    +*** Mouse - Mouse Click - main.rb
    +#+begin_src ruby
    +  # ./samples/05_mouse/01_mouse_click/app/main.rb
    +  =begin
    +  
    +   APIs listing that haven't been encountered in previous sample apps:
    +  
    +   - product: Returns an array of all combinations of elements from all arrays.
    +  
    +     For example, [1,2].product([1,2]) would return the following array...
    +     [[1,1], [1,2], [2,1], [2,2]]
    +     More than two arrays can be given to product and it will still work,
    +     such as [1,2].product([1,2],[3,4]). What would product return in this case?
    +  
    +     Answer:
    +     [[1,1,3],[1,1,4],[1,2,3],[1,2,4],[2,1,3],[2,1,4],[2,2,3],[2,2,4]]
    +  
    +   - num1.fdiv(num2): Returns the float division (will have a decimal) of the two given numbers.
    +     For example, 5.fdiv(2) = 2.5 and 5.fdiv(5) = 1.0
    +  
    +   - yield: Allows you to call a method with a code block and yield to that block.
    +  
    +   Reminders:
    +  
    +   - ARRAY#inside_rect?: Returns true or false depending on if the point is inside the rect.
    +  
    +   - String interpolation: Uses #{} syntax; everything between the #{ and the } is evaluated
    +     as Ruby code, and the placeholder is replaced with its corresponding value or result.
    +  
    +   - args.inputs.mouse.click: This property will be set if the mouse was clicked.
    +  
    +   - Ternary operator (?): Will evaluate a statement (just like an if statement)
    +     and perform an action if the result is true or another action if it is false.
    +  
    +   - reject: Removes elements from a collection if they meet certain requirements.
    +  
    +   - args.outputs.borders: An array. The values generate a border.
    +     The parameters are [X, Y, WIDTH, HEIGHT, RED, GREEN, BLUE]
    +     For more information about borders, go to mygame/documentation/03-solids-and-borders.md.
    +  
    +   - args.outputs.labels: An array. The values generate a label.
    +     The parameters are [X, Y, TEXT, SIZE, ALIGNMENT, RED, GREEN, BLUE, ALPHA, FONT STYLE]
    +     For more information about labels, go to mygame/documentation/02-labels.
    +  
    +  =end
    +  
    +  # This sample app is a classic game of Tic Tac Toe.
    +  
    +  class TicTacToe
    +    attr_accessor :_, :state, :outputs, :inputs, :grid, :gtk
    +  
    +    # Starts the game with player x's turn and creates an array (to_a) for space combinations.
    +    # Calls methods necessary for the game to run properly.
    +    def tick
    +      state.current_turn ||= :x
    +      state.space_combinations = [-1, 0, 1].product([-1, 0, 1]).to_a
    +      render_board
    +      input_board
    +    end
    +  
    +    # Uses borders to create grid squares for the game's board. Also outputs the game pieces using labels.
    +    def render_board
    +      square_size = 80
    +  
    +      # Positions the game's board in the center of the screen.
    +      # Try removing what follows grid.w_half or grid.h_half and see how the position changes!
    +      board_left = grid.w_half - square_size * 1.5
    +      board_top  = grid.h_half - square_size * 1.5
    +  
    +      # At first glance, the add(1) looks pretty trivial. But if you remove it,
    +      # you'll see that the positioning of the board would be skewed without it!
    +      # Or if you put 2 in the parenthesis, the pieces will be placed in the wrong squares
    +      # due to the change in board placement.
    +      outputs.borders << all_spaces do |x, y, space| # outputs borders for all board spaces
    +        space.border ||= [
    +          board_left + x.add(1) * square_size, # space.border is initialized using this definition
    +          board_top  + y.add(1) * square_size,
    +          square_size,
    +          square_size
    +        ]
    +      end
    +  
    +      # Again, the calculations ensure that the piece is placed in the center of the grid square.
    +      # Remove the '- 20' and the piece will be placed at the top of the grid square instead of the center.
    +      outputs.labels << filled_spaces do |x, y, space| # put label in each filled space of board
    +            label board_left + x.add(1) * square_size + square_size.fdiv(2),
    +            board_top  + y.add(1) * square_size + square_size - 20,
    +            space.piece # text of label, either "x" or "o"
    +      end
    +  
    +      # Uses a label to output whether x or o won, or if a draw occurred.
    +      # If the game is ongoing, a label shows whose turn it currently is.
    +      outputs.labels << if state.x_won
    +                          label grid.w_half, grid.top - 80, "x won" # the '-80' positions the label 80 pixels lower than top
    +                        elsif state.o_won
    +                          label grid.w_half, grid.top - 80, "o won" # grid.w_half positions the label in the center horizontally
    +                        elsif state.draw
    +                          label grid.w_half, grid.top - 80, "a draw"
    +                        else # if no one won and the game is ongoing
    +                          label grid.w_half, grid.top - 80, "turn: #{state.current_turn}"
    +                        end
    +    end
    +  
    +    # Calls the methods responsible for handling user input and determining the winner.
    +    # Does nothing unless the mouse is clicked.
    +    def input_board
    +      return unless inputs.mouse.click
    +      input_place_piece
    +      input_restart_game
    +      determine_winner
    +    end
    +  
    +    # Handles user input for placing pieces on the board.
    +    def input_place_piece
    +      return if state.game_over
    +  
    +      # Checks to find the space that the mouse was clicked inside of, and makes sure the space does not already
    +      # have a piece in it.
    +      __, __, space = all_spaces.find do |__, __, space|
    +        inputs.mouse.click.point.inside_rect?(space.border) && !space.piece
    +      end
    +  
    +      # The piece that goes into the space belongs to the player whose turn it currently is.
    +      return unless space
    +      space.piece = state.current_turn
    +  
    +      # This ternary operator statement allows us to change the current player's turn.
    +      # If it is currently x's turn, it becomes o's turn. If it is not x's turn, it become's x's turn.
    +      state.current_turn = state.current_turn == :x ? :o : :x
    +    end
    +  
    +    # Resets the game.
    +    def input_restart_game
    +      return unless state.game_over
    +      gtk.reset
    +    end
    +  
    +    # Checks if x or o won the game.
    +    # If neither player wins and all nine squares are filled, a draw happens.
    +    # Once a player is chosen as the winner or a draw happens, the game is over.
    +    def determine_winner
    +      state.x_won = won? :x # evaluates to either true or false (boolean values)
    +      state.o_won = won? :o
    +      state.draw = true if filled_spaces.length == 9 && !state.x_won && !state.o_won
    +      state.game_over = state.x_won || state.o_won || state.draw
    +    end
    +  
    +    # Determines if a player won by checking if there is a horizontal match or vertical match.
    +    # Horizontal_match and vertical_match have boolean values. If either is true, the game has been won.
    +    def won? piece
    +      # performs action on all space combinations
    +      won = [[-1, 0, 1]].product([-1, 0, 1]).map do |xs, y|
       
    -    end
    +        # Checks if the 3 grid spaces with the same y value (or same row) and
    +        # x values that are next to each other have pieces that belong to the same player.
    +        # Remember, the value of piece is equal to the current turn (which is the player).
    +        horizontal_match = state.spaces[xs[0]][y].piece == piece &&
    +                           state.spaces[xs[1]][y].piece == piece &&
    +                           state.spaces[xs[2]][y].piece == piece
       
    -    def update args
    +        # Checks if the 3 grid spaces with the same x value (or same column) and
    +        # y values that are next to each other have pieces that belong to the same player.
    +        # The && represents an "and" statement: if even one part of the statement is false,
    +        # the entire statement evaluates to false.
    +        vertical_match = state.spaces[y][xs[0]].piece == piece &&
    +                         state.spaces[y][xs[1]].piece == piece &&
    +                         state.spaces[y][xs[2]].piece == piece
       
    -      for b in args.state.balls
    -        if [b.x, b.y, b.width, b.height].intersect_rect?(@bold)
    -          for c in @colliders
    -            if c.collision?(args, b.getPoints(args),b)
    -              c.collide args, b
    -            end
    -          end
    -        end
    +        horizontal_match || vertical_match # if either is true, true is returned
           end
    -    end
       
    -    def draw args
    -      args.outputs.sprites << [
    -        @x,                                       # X
    -        @y,                                       # Y
    -        @width,                                   # W
    -        @height,                                  # H
    -        @image,                                   # PATH
    -        0,                                        # ANGLE
    -        255,                                      # ALPHA
    -        219,                                      # RED_SATURATION
    -        112,                                      # GREEN_SATURATION
    -        147                                       # BLUE_SATURATION
    -      ]
    -      #args.outputs.sprites << [@x, @y, @width, @height, "sprites/roundSquare_small_black.png"]
    +      # Sees if there is a diagonal match, starting from the bottom left and ending at the top right.
    +      # Is added to won regardless of whether the statement is true or false.
    +      won << (state.spaces[-1][-1].piece == piece && # bottom left
    +              state.spaces[ 0][ 0].piece == piece && # center
    +              state.spaces[ 1][ 1].piece == piece)   # top right
    +  
    +      # Sees if there is a diagonal match, starting at the bottom right and ending at the top left
    +      # and is added to won.
    +      won << (state.spaces[ 1][-1].piece == piece && # bottom right
    +              state.spaces[ 0][ 0].piece == piece && # center
    +              state.spaces[-1][ 1].piece == piece)   # top left
    +  
    +      # Any false statements (meaning false diagonal matches) are rejected from won
    +      won.reject_false.any?
         end
       
    -    def serialize
    -    	{x: @x, y:@y}
    +    # Defines filled spaces on the board by rejecting all spaces that do not have game pieces in them.
    +    # The ! before a statement means "not". For example, we are rejecting any space combinations that do
    +    # NOT have pieces in them.
    +    def filled_spaces
    +      state.space_combinations
    +        .reject { |x, y| !state.spaces[x][y].piece } # reject spaces with no pieces in them
    +        .map do |x, y|
    +          if block_given?
    +            yield x, y, state.spaces[x][y]
    +          else
    +            [x, y, state.spaces[x][y]] # sets definition of space
    +          end
    +      end
         end
       
    -    def inspect
    -    	serialize.to_s
    +    # Defines all spaces on the board.
    +    def all_spaces
    +      if !block_given?
    +        state.space_combinations.map do |x, y|
    +          [x, y, state.spaces[x][y]] # sets definition of space
    +        end
    +      else # if a block is given (block_given? is true)
    +        state.space_combinations.map do |x, y|
    +          yield x, y, state.spaces[x][y] # yield if a block is given
    +        end
    +      end
         end
       
    -    def to_s
    -    	serialize.to_s
    +    # Sets values for a label, such as the position, value, size, alignment, and color.
    +    def label x, y, value
    +      [x, y + 10, value, 20, 1, 0, 0, 0]
         end
       end
    -
    -#+end_src
    -
    -*** Physics And Collisions - Arbitrary Collision - square_collider.rb
    -#+begin_src ruby
    -  # ./samples/04_physics_and_collisions/09_arbitrary_collision/app/square_collider.rb
    -  
    -  class SquareCollider
    -    def initialize x,y,direction,size=COLLISIONWIDTH
    -      @x = x
    -      @y = y
    -      @size = size
    -      @direction = direction
       
    -    end
    -    def collision? args, ball
    -      #args.outputs.solids <<  [@x, @y, @size, @size,     000, 255, 255]
    +  $tic_tac_toe = TicTacToe.new
       
    +  def tick args
    +    $tic_tac_toe._       = args
    +    $tic_tac_toe.state   = args.state
    +    $tic_tac_toe.outputs = args.outputs
    +    $tic_tac_toe.inputs  = args.inputs
    +    $tic_tac_toe.grid    = args.grid
    +    $tic_tac_toe.gtk     = args.gtk
    +    $tic_tac_toe.tick
    +    tick_instructions args, "Sample app shows how to work with mouse clicks."
    +  end
       
    -      return [@x,@y,@size,@size].intersect_rect?([ball.x,ball.y,ball.width,ball.height])
    +  def tick_instructions args, text, y = 715
    +    return if args.state.key_event_occurred
    +    if args.inputs.mouse.click ||
    +       args.inputs.keyboard.directional_vector ||
    +       args.inputs.keyboard.key_down.enter ||
    +       args.inputs.keyboard.key_down.escape
    +      args.state.key_event_occurred = true
         end
       
    -    def collide args, ball
    -      vmag = (ball.velocity.x**2.0 +ball.velocity.y**2.0)**0.5
    -      a = ((2.0**0.5)*vmag)/2.0
    -      if vmag < MAX_VELOCITY
    -        ball.velocity.x = (a) * @direction.x * 1.1
    -        ball.velocity.y = (a) * @direction.y * 1.1
    -      else
    -        ball.velocity.x = (a) * @direction.x
    -        ball.velocity.y = (a) * @direction.y
    -      end
    -  
    -    end
    +    args.outputs.debug << [0, y - 50, 1280, 60].solid
    +    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label
    +    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label
       end
     
     #+end_src
     
    -*** Physics And Collisions - Arbitrary Collision - vector2d.rb
    -#+begin_src ruby
    -  # ./samples/04_physics_and_collisions/09_arbitrary_collision/app/vector2d.rb
    -  class Vector2d
    -      attr_accessor :x, :y
    -    
    -      def initialize x=0, y=0
    -        @x=x
    -        @y=y
    -      end
    -    
    -      #returns a vector multiplied by scalar x
    -      #x [float] scalar
    -      def mult x
    -        r = Vector2d.new(0,0)
    -        r.x=@x*x
    -        r.y=@y*x
    -        r
    -      end
    -    
    -      # vect [Vector2d] vector to copy
    -      def copy vect
    -        Vector2d.new(@x, @y)
    -      end
    -    
    -      #returns a new vector equivalent to this+vect
    -      #vect [Vector2d] vector to add to self
    -      def add vect
    -        Vector2d.new(@x+vect.x,@y+vect.y)
    -      end
    -    
    -      #returns a new vector equivalent to this-vect
    -      #vect [Vector2d] vector to subtract to self
    -      def sub vect
    -        Vector2d.new(@x-vect.c, @y-vect.y)
    -      end
    -    
    -      #return the magnitude of the vector
    -      def mag
    -        ((@x**2)+(@y**2))**0.5
    -      end
    -    
    -      #returns a new normalize version of the vector
    -      def normalize
    -        Vector2d.new(@x/mag, @y/mag)
    -      end
    -    
    -      #TODO delet?
    -      def distABS vect
    -        (((vect.x-@x)**2+(vect.y-@y)**2)**0.5).abs()
    -      end
    -    end
    -#+end_src
    -
    -*** Physics And Collisions - Collision With Object Removal - ball.rb
    +*** Mouse - Mouse Move - main.rb
     #+begin_src ruby
    -  # ./samples/04_physics_and_collisions/10_collision_with_object_removal/app/ball.rb
    -  class Ball
    -    #TODO limit accessors?
    -    attr_accessor :xy, :width, :height, :velocity
    +  # ./samples/05_mouse/02_mouse_move/app/main.rb
    +  =begin
       
    +   Reminders:
       
    -    #@xy [Vector2d] x,y position
    -    #@velocity [Vector2d] velocity of ball
    -    def initialize
    -      @xy = Vector2d.new(WIDTH/2,500)
    -      @velocity = Vector2d.new(4,-4)
    -      @width =  20
    -      @height = 20
    -    end
    +   - num1.greater(num2): Returns the greater value.
    +     For example, if we have the command
    +     puts 4.greater(3)
    +     the number 4 would be printed to the console since it has a greater value than 3.
    +     Similar to lesser, which returns the lesser value.
       
    -    #move the ball according to its velocity
    -    def update args
    -      @xy.x+=@velocity.x
    -      @xy.y+=@velocity.y
    -    end
    +   - find_all: Finds all elements of a collection that meet certain requirements.
    +     For example, in this sample app, we're using find_all to find all zombies that have intersected
    +     or hit the player's sprite since these zombies have been killed.
       
    -    #render the ball to the screen
    -    def render args
    -      args.outputs.solids << [@xy.x,@xy.y,@width,@height,255,0,255];
    -      #args.outputs.labels << [20,HEIGHT-50,"velocity: " +@velocity.x.to_s+","+@velocity.y.to_s + "   magnitude:" + @velocity.mag.to_s]
    -    end
    +   - args.inputs.keyboard.key_down.KEY: Determines if a key is being held or pressed.
    +     Stores the frame the "down" event occurred.
    +     For more information about the keyboard, go to mygame/documentation/06-keyboard.md.
       
    -    def rect
    -      [@xy.x,@xy.y,@width,@height]
    -    end
    +   - args.outputs.sprites: An array. The values generate a sprite.
    +     The parameters are [X, Y, WIDTH, HEIGHT, PATH, ANGLE, ALPHA, RED, GREEN, BLUE]
    +     For more information about sprites, go to mygame/documentation/05-sprites.md.
       
    -  end
    -
    -#+end_src
    -
    -*** Physics And Collisions - Collision With Object Removal - linear_collider.rb
    -#+begin_src ruby
    -  # ./samples/04_physics_and_collisions/10_collision_with_object_removal/app/linear_collider.rb
    -  #The LinearCollider (theoretically) produces collisions upon a line segment defined point.y two x,y cordinates
    +   - args.state.new_entity: Used when we want to create a new object, like a sprite or button.
    +     When we want to create a new object, we can declare it as a new entity and then define
    +     its properties. (Remember, you can use state to define ANY property and it will
    +     be retained across frames.)
       
    -  class LinearCollider
    +   - String interpolation: Uses #{} syntax; everything between the #{ and the } is evaluated
    +     as Ruby code, and the placeholder is replaced with its corresponding value or result.
       
    -    #start [Array of length 2] start of the line segment as a x,y cordinate
    -    #last [Array of length 2] end of the line segment as a x,y cordinate
    +   - map: Ruby method used to transform data; used in arrays, hashes, and collections.
    +     Can be used to perform an action on every element of a collection, such as multiplying
    +     each element by 2 or declaring every element as a new entity.
       
    -    #inorder for the LinearCollider to be functional the line segment must be said to have a thickness
    -    #(as it is unlikly that a colliding object will land exactly on the linesegment)
    +   - sample: Chooses a random element from the array.
       
    -    #extension defines if the line's thickness extends negatively or positively
    -    #extension :pos     extends positively
    -    #extension :neg     extends negatively
    +   - reject: Removes elements that meet certain requirements.
    +     In this sample app, we're removing/rejecting zombies that reach the center of the screen. We're also
    +     rejecting zombies that were killed more than 30 frames ago.
       
    -    #thickness [float] how thick the line should be (should always be atleast as large as the magnitude of the colliding object)
    -    def initialize (pointA, pointB, extension=:neg, thickness=10)
    -      @pointA = pointA
    -      @pointB = pointB
    -      @thickness = thickness
    -      @extension = extension
    +  =end
       
    -      @pointAExtended={
    -        x: @pointA.x + @thickness*(@extension == :neg ? -1 : 1),
    -        y: @pointA.y + @thickness*(@extension == :neg ? -1 : 1)
    -      }
    -      @pointBExtended={
    -        x: @pointB.x + @thickness*(@extension == :neg ? -1 : 1),
    -        y: @pointB.y + @thickness*(@extension == :neg ? -1 : 1)
    -      }
    +  # This sample app allows users to move around the screen in order to kill zombies. Zombies appear from every direction so the goal
    +  # is to kill the zombies as fast as possible!
    +  
    +  class ProtectThePuppiesFromTheZombies
    +    attr_accessor :grid, :inputs, :state, :outputs
       
    +    # Calls the methods necessary for the game to run properly.
    +    def tick
    +      defaults
    +      render
    +      calc
    +      input
         end
       
    -    def resetPoints(pointA,pointB)
    -      @pointA = pointA
    -      @pointB = pointB
    +    # Sets default values for the zombies and for the player.
    +    # Initialization happens only in the first frame.
    +    def defaults
    +      state.flash_at               ||= 0
    +      state.zombie_min_spawn_rate  ||= 60
    +      state.zombie_spawn_countdown ||= random_spawn_countdown state.zombie_min_spawn_rate
    +      state.zombies                ||= []
    +      state.killed_zombies         ||= []
       
    -      @pointAExtended={
    -        x:@pointA.x + @thickness*(@extension == :neg ? -1 : 1),
    -        y:@pointA.y + @thickness*(@extension == :neg ? -1 : 1)
    -      }
    -      @pointBExtended={
    -        x:@pointB.x + @thickness*(@extension == :neg ? -1 : 1),
    -        y:@pointB.y + @thickness*(@extension == :neg ? -1 : 1)
    -      }
    +      # Declares player as a new entity and sets its properties.
    +      # The player begins the game in the center of the screen, not moving in any direction.
    +      state.player ||= state.new_entity(:player, { x: 640,
    +                                                 y: 360,
    +                                                 attack_angle: 0,
    +                                                 dx: 0,
    +                                                 dy: 0 })
         end
       
    -    #TODO: Ugly function
    -    def slope (pointA, pointB)
    -      return (pointB.x==pointA.x) ? INFINITY : (pointB.y+-pointA.y)/(pointB.x+-pointA.x)
    +    # Outputs a gray background.
    +    # Calls the methods needed to output the player, zombies, etc onto the screen.
    +    def render
    +      outputs.solids << [grid.rect, 100, 100, 100]
    +      render_zombies
    +      render_killed_zombies
    +      render_player
    +      render_flash
         end
       
    -    #TODO: Ugly function
    -    def intercept(pointA, pointB)
    -      if (slope(pointA, pointB) == INFINITY)
    -        -INFINITY
    -      elsif slope(pointA, pointB) == -1*INFINITY
    -        INFINITY
    -      else
    -        pointA.y+-1.0*(slope(pointA, pointB)*pointA.x)
    +    # Outputs the zombies on the screen and sets values for the sprites, such as the position, width, height, and animation.
    +    def render_zombies
    +      outputs.sprites << state.zombies.map do |z| # performs action on all zombies in the collection
    +        z.sprite = [z.x, z.y, 4 * 3, 8 * 3, animation_sprite(z)].sprite # sets definition for sprite, calls animation_sprite method
    +        z.sprite
           end
         end
       
    -    def calcY(pointA, pointB, x)
    -      return slope(pointA, pointB)*x + intercept(pointA, pointB)
    -    end
    +    # Outputs sprites of killed zombies, and displays a slash image to show that a zombie has been killed.
    +    def render_killed_zombies
    +      outputs.sprites << state.killed_zombies.map do |z| # performs action on all killed zombies in collection
    +        z.sprite = [z.x,
    +                    z.y,
    +                    4 * 3,
    +                    8 * 3,
    +                    animation_sprite(z, z.death_at), # calls animation_sprite method
    +                    0, # angle
    +                    255 * z.death_at.ease(30, :flip)].sprite # transparency of a zombie changes when they die
    +                    # change the value of 30 and see what happens when a zombie is killed
       
    -    #test if a collision has occurred
    -    def isCollision? (point)
    -      #INFINITY slop breaks down when trying to determin collision, ergo it requires a special test
    -      if slope(@pointA, @pointB) ==  INFINITY &&
    -        point.x >= [@pointA.x,@pointB.x].min+(@extension == :pos ? -@thickness : 0) &&
    -        point.x <= [@pointA.x,@pointB.x].max+(@extension == :neg ?  @thickness : 0) &&
    -        point.y >= [@pointA.y,@pointB.y].min && point.y <= [@pointA.y,@pointB.y].max
    -          return true
    +        # Sets values to output the slash over the zombie's sprite when a zombie is killed.
    +        # The slash is tilted 45 degrees from the angle of the player's attack.
    +        # Change the 3 inside scale_rect to 30 and the slash will be HUGE! Scale_rect positions
    +        # the slash over the killed zombie's sprite.
    +        [z.sprite, [z.sprite.rect, 'sprites/slash.png', 45 + state.player.attack_angle_on_click, z.sprite.a].scale_rect(3, 0.5, 0.5)]
           end
    +    end
       
    -      isNegInLine   = @extension == :neg &&
    -                      point.y <= slope(@pointA, @pointB)*point.x+intercept(@pointA,@pointB) &&
    -                      point.y >= point.x*slope(@pointAExtended, @pointBExtended)+intercept(@pointAExtended,@pointBExtended)
    -      isPosInLine   = @extension == :pos &&
    -                      point.y >= slope(@pointA, @pointB)*point.x+intercept(@pointA,@pointB) &&
    -                      point.y <= point.x*slope(@pointAExtended, @pointBExtended)+intercept(@pointAExtended,@pointBExtended)
    -      isInBoxBounds = point.x >= [@pointA.x,@pointB.x].min &&
    -                      point.x <= [@pointA.x,@pointB.x].max &&
    -                      point.y >= [@pointA.y,@pointB.y].min+(@extension == :neg ? -@thickness : 0) &&
    -                      point.y <= [@pointA.y,@pointB.y].max+(@extension == :pos ? @thickness : 0)
    -  
    -      return isInBoxBounds && (isNegInLine || isPosInLine)
    +    # Outputs the player sprite using the images in the sprites folder.
    +    def render_player
    +      state.player_sprite = [state.player.x,
    +                             state.player.y,
    +                            4 * 3,
    +                            8 * 3, "sprites/player-#{animation_index(state.player.created_at_elapsed)}.png"] # string interpolation
    +      outputs.sprites << state.player_sprite
       
    +      # Outputs a small red square that previews the angles that the player can attack in.
    +      # It can be moved in a perfect circle around the player to show possible movements.
    +      # Change the 60 in the parenthesis and see what happens to the movement of the red square.
    +      outputs.solids <<  [state.player.x + state.player.attack_angle.vector_x(60),
    +                          state.player.y + state.player.attack_angle.vector_y(60),
    +                          3, 3, 255, 0, 0]
         end
       
    -    def getRepelMagnitude (fbx, fby, vrx, vry, args)
    -      a = fbx ; b = vrx ; c = fby
    -      d = vry ; e = args.state.ball.velocity.mag
    -  
    -      if b**2 + d**2 == 0
    -        puts "magnitude error"
    -      end
    +    # Renders flash as a solid. The screen turns white for 10 frames when a zombie is killed.
    +    def render_flash
    +      return if state.flash_at.elapsed_time > 10 # return if more than 10 frames have passed since flash.
    +      # Transparency gradually changes (or eases) during the 10 frames of flash.
    +      outputs.primitives << [grid.rect, 255, 255, 255, 255 * state.flash_at.ease(10, :flip)].solid
    +    end
       
    -      x1 = (-a*b+-c*d + (e**2 * b**2 - b**2 * c**2 + 2*a*b*c*d + e**2 + d**2 - a**2 * d**2)**0.5)/(b**2 + d**2)
    -      x2 = -((a*b + c*d + (e**2 * b**2 - b**2 * c**2 + 2*a*b*c*d + e**2 * d**2 - a**2 * d**2)**0.5)/(b**2 + d**2))
    -      return ((a+x1*b)**2 + (c+x1*d)**2 == e**2) ? x1 : x2
    +    # Calls all methods necessary for performing calculations.
    +    def calc
    +      calc_spawn_zombie
    +      calc_move_zombies
    +      calc_player
    +      calc_kill_zombie
         end
       
    -    def update args
    -      #each of the four points on the square ball - NOTE simple to extend to a circle
    -      points= [ {x: args.state.ball.xy.x,                          y: args.state.ball.xy.y},
    -                {x: args.state.ball.xy.x+args.state.ball.width,    y: args.state.ball.xy.y},
    -                {x: args.state.ball.xy.x,                          y: args.state.ball.xy.y+args.state.ball.height},
    -                {x: args.state.ball.xy.x+args.state.ball.width,    y: args.state.ball.xy.y + args.state.ball.height}
    -              ]
    +    # Decreases the zombie spawn countdown by 1 if it has a value greater than 0.
    +    def calc_spawn_zombie
    +      if state.zombie_spawn_countdown > 0
    +        state.zombie_spawn_countdown -= 1
    +        return
    +      end
       
    -      #for each point p in points
    -      for point in points
    -        #isCollision.md has more information on this section
    -        #TODO: section can certainly be simplifyed
    -        if isCollision?(point)
    -          u = Vector2d.new(1.0,((slope(@pointA, @pointB)==0) ? INFINITY : -1/slope(@pointA, @pointB))*1.0).normalize #normal perpendicular (to line segment) vector
    +      # New zombies are created, positioned on the screen, and added to the zombies collection.
    +      state.zombies << state.new_entity(:zombie) do |z| # each zombie is declared a new entity
    +        if rand > 0.5
    +          z.x = grid.rect.w.randomize(:ratio) # random x position on screen (within grid scope)
    +          z.y = [-10, 730].sample # y position is set to either -10 or 730 (randomly chosen)
    +          # the possible values exceed the screen's scope so zombies appear to be coming from far away
    +        else
    +          z.x = [-10, 1290].sample # x position is set to either -10 or 1290 (randomly chosen)
    +          z.y = grid.rect.w.randomize(:ratio) # random y position on screen
    +        end
    +      end
       
    -          #the vector with the repeling force can be u or -u depending of where the ball was coming from in relation to the line segment
    -          previousBallPosition=Vector2d.new(point.x-args.state.ball.velocity.x,point.y-args.state.ball.velocity.y)
    -          choiceA = (u.mult(1))
    -          choiceB =  (u.mult(-1))
    -          vectorRepel = nil
    +      # Calls random_spawn_countdown method (determines how fast new zombies appear)
    +      state.zombie_spawn_countdown = random_spawn_countdown state.zombie_min_spawn_rate
    +      state.zombie_min_spawn_rate -= 1
    +      # set to either the current zombie_min_spawn_rate or 0, depending on which value is greater
    +      state.zombie_min_spawn_rate  = state.zombie_min_spawn_rate.greater(0)
    +    end
       
    -          if (slope(@pointA, @pointB))!=INFINITY && u.y < 0
    -            choiceA, choiceB = choiceB, choiceA
    -          end
    -          vectorRepel = (previousBallPosition.y > calcY(@pointA, @pointB, previousBallPosition.x)) ? choiceA : choiceB
    +    # Moves all zombies towards the center of the screen.
    +    # All zombies that reach the center (640, 360) are rejected from the zombies collection and disappear.
    +    def calc_move_zombies
    +      state.zombies.each do |z| # for each zombie in the collection
    +        z.y = z.y.towards(360, 0.1) # move the zombie towards the center (640, 360) at a rate of 0.1
    +        z.x = z.x.towards(640, 0.1) # change 0.1 to 1.1 and see how much faster the zombies move to the center
    +      end
    +      state.zombies = state.zombies.reject { |z| z.y == 360 && z.x == 640 } # remove zombies that are in center
    +    end
       
    -          #vectorRepel = (previousBallPosition.y > slope(@pointA, @pointB)*previousBallPosition.x+intercept(@pointA,@pointB)) ? choiceA : choiceB)
    -          if (slope(@pointA, @pointB) == INFINITY) #slope INFINITY breaks down in the above test, ergo it requires a custom test
    -            vectorRepel = (previousBallPosition.x > @pointA.x) ? (u.mult(1)) : (u.mult(-1))
    -          end
    -          #puts ("     " + $t[0].to_s + "," + $t[1].to_s + "    " + $t[2].to_s + "," + $t[3].to_s + "     " + "   " + u.x.to_s + "," + u.y.to_s)
    -          #vectorRepel now has the repeling force
    +    # Calculates the position and movement of the player on the screen.
    +    def calc_player
    +      state.player.x += state.player.dx # changes x based on dx (change in x)
    +      state.player.y += state.player.dy # changes y based on dy (change in y)
       
    -          mag = args.state.ball.velocity.mag
    -          theta_ball=Math.atan2(args.state.ball.velocity.y,args.state.ball.velocity.x) #the angle of the ball's velocity
    -          theta_repel=Math.atan2(vectorRepel.y,vectorRepel.x) #the angle of the repeling force
    -          #puts ("theta:" + theta_ball.to_s + " " + theta_repel.to_s) #theta okay
    +      state.player.dx *= 0.9 # scales dx down
    +      state.player.dy *= 0.9 # scales dy down
       
    -          fbx = mag * Math.cos(theta_ball) #the x component of the ball's velocity
    -          fby = mag * Math.sin(theta_ball) #the y component of the ball's velocity
    +      # Compares player's x to 1280 to find lesser value, then compares result to 0 to find greater value.
    +      # This ensures that the player remains within the screen's scope.
    +      state.player.x = state.player.x.lesser(1280).greater(0)
    +      state.player.y = state.player.y.lesser(720).greater(0) # same with player's y
    +    end
       
    -          repelMag = getRepelMagnitude(fbx, fby, vectorRepel.x, vectorRepel.y, args)
    +    # Finds all zombies that intersect with the player's sprite. These zombies are removed from the zombies collection
    +    # and added to the killed_zombies collection since any zombie that intersects with the player is killed.
    +    def calc_kill_zombie
       
    -          frx = repelMag* Math.cos(theta_repel) #the x component of the repel's velocity | magnitude is set to twice of fbx
    -          fry = repelMag* Math.sin(theta_repel) #the y component of the repel's velocity | magnitude is set to twice of fby
    +      # Find all zombies that intersect with the player. They are considered killed.
    +      killed_this_frame = state.zombies.find_all { |z| z.sprite.intersect_rect? state.player_sprite }
    +      state.zombies = state.zombies - killed_this_frame # remove newly killed zombies from zombies collection
    +      state.killed_zombies += killed_this_frame # add newly killed zombies to killed zombies
       
    -          fsumx = fbx+frx #sum of x forces
    -          fsumy = fby+fry #sum of y forces
    -          fr = mag#fr is the resulting magnitude
    -          thetaNew = Math.atan2(fsumy, fsumx)  #thetaNew is the resulting angle
    -          xnew = fr*Math.cos(thetaNew) #resulting x velocity
    -          ynew = fr*Math.sin(thetaNew) #resulting y velocity
    +      if killed_this_frame.length > 0 # if atleast one zombie was killed in the frame
    +        state.flash_at = state.tick_count # flash_at set to the frame when the zombie was killed
    +      # Don't forget, the rendered flash lasts for 10 frames after the zombie is killed (look at render_flash method)
    +      end
       
    -          args.state.ball.velocity = Vector2d.new(xnew,ynew)
    -          #args.state.ball.xy.add(args.state.ball.velocity)
    -          break #no need to check the other points ?
    -        else
    -        end
    +      # Sets the tick_count (passage of time) as the value of the death_at variable for each killed zombie.
    +      # Death_at stores the frame a zombie was killed.
    +      killed_this_frame.each do |z|
    +        z.death_at = state.tick_count
           end
    -    end #end update
       
    -  end
    -
    -#+end_src
    -
    -*** Physics And Collisions - Collision With Object Removal - main.rb
    -#+begin_src ruby
    -  # ./samples/04_physics_and_collisions/10_collision_with_object_removal/app/main.rb
    -  # coding: utf-8
    -  INFINITY= 10**10
    -  WIDTH=1280
    -  HEIGHT=720
    +      # Zombies are rejected from the killed_zombies collection depending on when they were killed.
    +      # They are rejected if more than 30 frames have passed since their death.
    +      state.killed_zombies = state.killed_zombies.reject { |z| state.tick_count - z.death_at > 30 }
    +    end
       
    -  require 'app/vector2d.rb'
    -  require 'app/paddle.rb'
    -  require 'app/ball.rb'
    -  require 'app/linear_collider.rb'
    +    # Uses input from the user to move the player around the screen.
    +    def input
       
    -  #Method to init default values
    -  def defaults args
    -    args.state.game_board ||= [(args.grid.w / 2 - args.grid.w / 4), 0, (args.grid.w / 2), args.grid.h]
    -    args.state.bricks ||= []
    -    args.state.num_bricks ||= 0
    -    args.state.game_over_at ||= 0
    -    args.state.paddle ||= Paddle.new
    -    args.state.ball   ||= Ball.new
    -    args.state.westWall  ||= LinearCollider.new({x: args.grid.w/4,      y: 0},          {x: args.grid.w/4,      y: args.grid.h}, :pos)
    -    args.state.eastWall  ||= LinearCollider.new({x: 3*args.grid.w*0.25, y: 0},          {x: 3*args.grid.w*0.25, y: args.grid.h})
    -    args.state.southWall ||= LinearCollider.new({x: 0,                  y: 0},          {x: args.grid.w,        y: 0})
    -    args.state.northWall ||= LinearCollider.new({x: 0,                  y:args.grid.h}, {x: args.grid.w,        y: args.grid.h}, :pos)
    +      # If the "a" key or left key is pressed, the x position of the player decreases.
    +      # Otherwise, if the "d" key or right key is pressed, the x position of the player increases.
    +      if inputs.keyboard.key_held.a || inputs.keyboard.key_held.left
    +        state.player.x -= 5
    +      elsif inputs.keyboard.key_held.d || inputs.keyboard.key_held.right
    +        state.player.x += 5
    +      end
       
    -    #args.state.testWall ||= LinearCollider.new({x:0 , y:0},{x:args.grid.w, y:args.grid.h})
    -  end
    +      # If the "w" or up key is pressed, the y position of the player increases.
    +      # Otherwise, if the "s" or down key is pressed, the y position of the player decreases.
    +      if inputs.keyboard.key_held.w || inputs.keyboard.key_held.up
    +        state.player.y += 5
    +      elsif inputs.keyboard.key_held.s || inputs.keyboard.key_held.down
    +        state.player.y -= 5
    +      end
       
    -  #Render loop
    -  def render args
    -    render_instructions args
    -    render_board args
    -    render_bricks args
    -  end
    +      # Sets the attack angle so the player can move and attack in the precise direction it wants to go.
    +      # If the mouse is moved, the attack angle is changed (based on the player's position and mouse position).
    +      # Attack angle also contributes to the position of red square.
    +      if inputs.mouse.moved
    +        state.player.attack_angle = inputs.mouse.position.angle_from [state.player.x, state.player.y]
    +      end
       
    -  begin :render_methods
    -    #Method to display the instructions of the game
    -    def render_instructions args
    -      args.outputs.labels << [225, args.grid.h - 30, "← and → to move the paddle left and right",  0, 1]
    +      if inputs.mouse.click && state.player.dx < 0.5 && state.player.dy < 0.5
    +        state.player.attack_angle_on_click = inputs.mouse.position.angle_from [state.player.x, state.player.y]
    +        state.player.attack_angle = state.player.attack_angle_on_click # player's attack angle is set
    +        state.player.dx = state.player.attack_angle.vector_x(25) # change in player's position
    +        state.player.dy = state.player.attack_angle.vector_y(25)
    +      end
         end
       
    -    def render_board args
    -      args.outputs.borders << args.state.game_board
    +    # Sets the zombie spawn's countdown to a random number.
    +    # How fast zombies appear (change the 60 to 6 and too many zombies will appear at once!)
    +    def random_spawn_countdown minimum
    +      10.randomize(:ratio, :sign).to_i + 60
         end
       
    -    def render_bricks args
    -      args.outputs.solids << args.state.bricks.map(&:rect)
    +    # Helps to iterate through the images in the sprites folder by setting the animation index.
    +    # 3 frames is how long to show an image, and 6 is how many images to flip through.
    +    def animation_index at
    +      at.idiv(3).mod(6)
    +    end
    +  
    +    # Animates the zombies by using the animation index to go through the images in the sprites folder.
    +    def animation_sprite zombie, at = nil
    +      at ||= zombie.created_at_elapsed # how long it is has been since a zombie was created
    +      index = animation_index at
    +      "sprites/zombie-#{index}.png" # string interpolation to iterate through images
         end
       end
       
    -  #Calls all methods necessary for performing calculations
    -  def calc args
    -    add_new_bricks args
    -    reset_game args
    -    calc_collision args
    -    win_game args
    +  $protect_the_puppies_from_the_zombies = ProtectThePuppiesFromTheZombies.new
       
    -    args.state.westWall.update args
    -    args.state.eastWall.update args
    -    args.state.southWall.update args
    -    args.state.northWall.update args
    -    args.state.paddle.update args
    -    args.state.ball.update args
    +  def tick args
    +    $protect_the_puppies_from_the_zombies.grid    = args.grid
    +    $protect_the_puppies_from_the_zombies.inputs  = args.inputs
    +    $protect_the_puppies_from_the_zombies.state    = args.state
    +    $protect_the_puppies_from_the_zombies.outputs = args.outputs
    +    $protect_the_puppies_from_the_zombies.tick
    +    tick_instructions args, "How to get the mouse position and translate it to an x, y position using .vector_x and .vector_y. CLICK to play."
    +  end
       
    -    #args.state.testWall.update args
    +  def tick_instructions args, text, y = 715
    +    return if args.state.key_event_occurred
    +    if args.inputs.mouse.click ||
    +       args.inputs.keyboard.directional_vector ||
    +       args.inputs.keyboard.key_down.enter ||
    +       args.inputs.keyboard.key_down.escape
    +      args.state.key_event_occurred = true
    +    end
       
    -    args.state.paddle.render args
    -    args.state.ball.render args
    +    args.outputs.debug << [0, y - 50, 1280, 60].solid
    +    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label
    +    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label
       end
    +
    +#+end_src
    +
    +*** Mouse - Mouse Move Paint App - main.rb
    +#+begin_src ruby
    +  # ./samples/05_mouse/03_mouse_move_paint_app/app/main.rb
    +  =begin
       
    -  begin :calc_methods
    -    def add_new_bricks args
    -      return if args.state.num_bricks > 40
    -  
    -      #Width of the game board is 640px
    -      brick_width = (args.grid.w / 2) / 10
    -      brick_height = brick_width / 2
    +   APIs listing that haven't been encountered in previous sample apps:
       
    -      (4).map_with_index do |y|
    -        #Make a box that is 10 bricks wide and 4 bricks tall
    -        args.state.bricks += (10).map_with_index do |x|
    -          args.state.new_entity(:brick) do |b|
    -            b.x = x * brick_width + (args.grid.w / 2 - args.grid.w / 4)
    -            b.y = args.grid.h - ((y + 1) * brick_height)
    -            b.rect = [b.x + 1, b.y - 1, brick_width - 2, brick_height - 2, 235, 50 * y, 52]
    +   - Floor: Method that returns an integer number smaller than or equal to the original with no decimal.
       
    -            #Add linear colliders to the brick
    -            b.collider_bottom = LinearCollider.new([(b.x-2), (b.y-5)], [(b.x+brick_width+1), (b.y-5)], :pos, brick_height)
    -            b.collider_right = LinearCollider.new([(b.x+brick_width+1), (b.y-5)], [(b.x+brick_width+1), (b.y+brick_height+1)], :pos)
    -            b.collider_left = LinearCollider.new([(b.x-2), (b.y-5)], [(b.x-2), (b.y+brick_height+1)], :neg)
    -            b.collider_top = LinearCollider.new([(b.x-2), (b.y+brick_height+1)], [(b.x+brick_width+1), (b.y+brick_height+1)], :neg)
    +     For example, if we have a variable, a = 13.7, and we called floor on it, it would look like this...
    +     puts a.floor()
    +     which would print out 13.
    +     (There is also a ceil method, which returns an integer number greater than or equal to the original
    +     with no decimal. If we had called ceil on the variable a, the result would have been 14.)
       
    -            # @xyCollision  = LinearCollider.new({x: @x,y: @y+@height}, {x: @x+@width, y: @y+@height})
    -            # @xyCollision2 = LinearCollider.new({x: @x,y: @y}, {x: @x+@width, y: @y}, :pos)
    -            # @xyCollision3 = LinearCollider.new({x: @x,y: @y}, {x: @x, y: @y+@height})
    -            # @xyCollision4 = LinearCollider.new({x: @x+@width,y: @y}, {x: @x+@width, y: @y+@height}, :pos)
    +   Reminders:
       
    -            b.broken = false
    +   - Hashes: Collection of unique keys and their corresponding values. The value can be found
    +     using their keys.
       
    -            args.state.num_bricks += 1
    -          end
    -        end
    -      end
    -    end
    +     For example, if we have a "numbers" hash that stores numbers in English as the
    +     key and numbers in Spanish as the value, we'd have a hash that looks like this...
    +     numbers = { "one" => "uno", "two" => "dos", "three" => "tres" }
    +     and on it goes.
       
    -    def reset_game args
    -      if args.state.ball.xy.y < 20 && args.state.game_over_at.elapsed_time > 60
    -        #Freeze the ball
    -        args.state.ball.velocity.x = 0
    -        args.state.ball.velocity.y = 0
    -        #Freeze the paddle
    -        args.state.paddle.enabled = false
    +     Now if we wanted to find the corresponding value of the "one" key, we could say
    +     puts numbers["one"]
    +     which would print "uno" to the console.
       
    -        args.state.game_over_at = args.state.tick_count
    -      end
    +   - args.state.new_entity: Used when we want to create a new object, like a sprite or button.
    +     In this sample app, new_entity is used to create a new button that clears the grid.
    +     (Remember, you can use state to define ANY property and it will be retained across frames.)
       
    -      if args.state.game_over_at.elapsed_time < 60 && args.state.tick_count > 60 && args.state.bricks.count != 0
    -        #Display a "Game over" message
    -        args.outputs.labels << [100, 100, "GAME OVER", 10]
    -      end
    +   - args.inputs.mouse.click.point.(x|y): The x and y location of the mouse.
       
    -      #If 60 frames have passed since the game ended, restart the game
    -      if args.state.game_over_at != 0 && args.state.game_over_at.elapsed_time == 60
    -        # FIXME: only put value types in state
    -        args.state.ball = Ball.new
    +   - args.inputs.mouse.click.point.created_at: The frame the mouse click occurred in.
       
    -        # FIXME: only put value types in state
    -        args.state.paddle = Paddle.new
    +   - args.outputs.labels: An array. The values in the array generate a label.
    +     The parameters are [X, Y, TEXT, SIZE, ALIGN, RED, GREEN, BLUE, ALPHA, FONT STYLE]
    +     For more information about labels, go to mygame/documentation/02-labels.md.
       
    -        args.state.bricks = []
    -        args.state.num_bricks = 0
    -      end
    -    end
    +   - ARRAY#inside_rect?: Returns true or false depending on if the point is inside the rect.
       
    -    def calc_collision args
    -      #Remove the brick if it is hit with the ball
    -      ball = args.state.ball
    -      ball_rect = [ball.xy.x, ball.xy.y, 20, 20]
    +  =end
       
    -      #Loop through each brick to see if the ball is colliding with it
    -      args.state.bricks.each do |b|
    -        if b.rect.intersect_rect?(ball_rect)
    -          #Run the linear collider for the brick if there is a collision
    -          b[:collider_bottom].update args
    -          b[:collider_right].update args
    -          b[:collider_left].update args
    -          b[:collider_top].update args
    +  # This sample app shows an empty grid that the user can paint on.
    +  # To paint, the user must keep their mouse presssed and drag it around the grid.
    +  # The "clear" button allows users to clear the grid so they can start over.
       
    -          b.broken = true
    -        end
    -      end
    +  class PaintApp
    +    attr_accessor :inputs, :state, :outputs, :grid, :args
       
    -      args.state.bricks = args.state.bricks.reject(&:broken)
    +    # Runs methods necessary for the game to function properly.
    +    def tick
    +      print_title
    +      add_grid
    +      check_click
    +      draw_buttons
         end
       
    -    def win_game args
    -      if args.state.bricks.count == 0 && args.state.game_over_at.elapsed_time > 60
    -        #Freeze the ball
    -        args.state.ball.velocity.x = 0
    -        args.state.ball.velocity.y = 0
    -        #Freeze the paddle
    -        args.state.paddle.enabled = false
    -  
    -        args.state.game_over_at = args.state.tick_count
    -      end
    -  
    -      if args.state.game_over_at.elapsed_time < 60 && args.state.tick_count > 60 && args.state.bricks.count == 0
    -        #Display a "Game over" message
    -        args.outputs.labels << [100, 100, "CONGRATULATIONS!", 10]
    -      end
    +    # Prints the title onto the screen by using a label.
    +    # Also separates the title from the grid with a line as a horizontal separator.
    +    def print_title
    +      args.outputs.labels << [ 640, 700, 'Paint!', 0, 1 ]
    +      outputs.lines << horizontal_separator(660, 0, 1280)
         end
       
    -  end
    -  
    -  def tick args
    -    defaults args
    -    render args
    -    calc args
    -  
    -    #args.outputs.lines << [0, 0, args.grid.w, args.grid.h]
    +    # Sets the starting position, ending position, and color for the horizontal separator.
    +    # The starting and ending positions have the same y values.
    +    def horizontal_separator y, x, x2
    +      [x, y, x2, y, 150, 150, 150]
    +    end
       
    -    #$tc+=1
    -    #if $tc == 5
    -      #$train << [args.state.ball.xy.x, args.state.ball.xy.y]
    -      #$tc = 0
    -    #end
    -    #for t in $train
    +    # Sets the starting position, ending position, and color for the vertical separator.
    +    # The starting and ending positions have the same x values.
    +    def vertical_separator x, y, y2
    +      [x, y, x, y2, 150, 150, 150]
    +    end
       
    -      #args.outputs.solids << [t[0],t[1],5,5,255,0,0];
    -    #end
    -  end
    -
    -#+end_src
    -
    -*** Physics And Collisions - Collision With Object Removal - paddle.rb
    -#+begin_src ruby
    -  # ./samples/04_physics_and_collisions/10_collision_with_object_removal/app/paddle.rb
    -  class Paddle
    -    attr_accessor :enabled
    +    # Outputs a border and a grid containing empty squares onto the screen.
    +    def add_grid
       
    -    def initialize ()
    -      @x=WIDTH/2
    -      @y=100
    -      @width=100
    -      @height=20
    -      @speed=10
    +      # Sets the x, y, height, and width of the grid.
    +      # There are 31 horizontal lines and 31 vertical lines in the grid.
    +      # Feel free to count them yourself before continuing!
    +      x, y, h, w = 640 - 500/2, 640 - 500, 500, 500 # calculations done so the grid appears in screen's center
    +      lines_h = 31
    +      lines_v = 31
       
    -      @xyCollision  = LinearCollider.new({x: @x,y: @y+@height+5}, {x: @x+@width, y: @y+@height+5})
    -      @xyCollision2 = LinearCollider.new({x: @x,y: @y}, {x: @x+@width, y: @y}, :pos)
    -      @xyCollision3 = LinearCollider.new({x: @x,y: @y}, {x: @x, y: @y+@height+5})
    -      @xyCollision4 = LinearCollider.new({x: @x+@width,y: @y}, {x: @x+@width, y: @y+@height+5}, :pos)
    +      # Sets values for the grid's border, grid lines, and filled squares.
    +      # The filled_squares variable is initially set to an empty array.
    +      state.grid_border ||= [ x, y, h, w ] # definition of grid's outer border
    +      state.grid_lines ||= draw_grid(x, y, h, w, lines_h, lines_v) # calls draw_grid method
    +      state.filled_squares ||= [] # there are no filled squares until the user fills them in
       
    -      @enabled = true
    +      # Outputs the grid lines, border, and filled squares onto the screen.
    +      outputs.lines.concat state.grid_lines
    +      outputs.borders << state.grid_border
    +      outputs.solids << state.filled_squares
         end
       
    -    def update args
    -      @xyCollision.resetPoints({x: @x,y: @y+@height+5}, {x: @x+@width, y: @y+@height+5})
    -      @xyCollision2.resetPoints({x: @x,y: @y}, {x: @x+@width, y: @y})
    -      @xyCollision3.resetPoints({x: @x,y: @y}, {x: @x, y: @y+@height+5})
    -      @xyCollision4.resetPoints({x: @x+@width,y: @y}, {x: @x+@width, y: @y+@height+5})
    -  
    -      @xyCollision.update  args
    -      @xyCollision2.update args
    -      @xyCollision3.update args
    -      @xyCollision4.update args
    +    # Draws the grid by adding in vertical and horizontal separators.
    +    def draw_grid x, y, h, w, lines_h, lines_v
       
    -      args.inputs.keyboard.key_held.left  ||= false
    -      args.inputs.keyboard.key_held.right  ||= false
    +      # The grid starts off empty.
    +      grid = []
       
    -      if not (args.inputs.keyboard.key_held.left == args.inputs.keyboard.key_held.right)
    -        if args.inputs.keyboard.key_held.left && @enabled
    -          @x-=@speed
    -        elsif args.inputs.keyboard.key_held.right && @enabled
    -          @x+=@speed
    -        end
    +      # Calculates the placement and adds horizontal lines or separators into the grid.
    +      curr_y = y # start at the bottom of the box
    +      dist_y = h / (lines_h + 1) # finds distance to place horizontal lines evenly throughout 500 height of grid
    +      lines_h.times do
    +        curr_y += dist_y # increment curr_y by the distance between the horizontal lines
    +        grid << horizontal_separator(curr_y, x, x + w - 1) # add a separator into the grid
           end
       
    -      xmin =WIDTH/4
    -      xmax = 3*(WIDTH/4)
    -      @x = (@x+@width > xmax) ? xmax-@width : (@x x, "y" => y, "h" => h, "w" => w, "lines_h" => lines_h,
    +                            "lines_v" => lines_v, "dist_x" => dist_x,
    +                            "dist_y" => dist_y }
       
    -    def rect
    -      [@x, @y, @width, @height]
    +      return grid
         end
    -  end
    -
    -#+end_src
    -
    -*** Physics And Collisions - Collision With Object Removal - tests.rb
    -#+begin_src ruby
    -  # ./samples/04_physics_and_collisions/10_collision_with_object_removal/app/tests.rb
    -  # For advanced users:
    -  # You can put some quick verification tests here, any method
    -  # that starts with the `test_` will be run when you save this file.
       
    -  # Here is an example test and game
    +    # Checks if the user is keeping the mouse pressed down and sets the mouse_hold variable accordingly using boolean values.
    +    # If the mouse is up, the user cannot drag the mouse.
    +    def check_click
    +      if inputs.mouse.down #is mouse up or down?
    +        state.mouse_held = true # mouse is being held down
    +      elsif inputs.mouse.up # if mouse is up
    +      state.mouse_held = false # mouse is not being held down or dragged
    +        state.mouse_dragging = false
    +      end
       
    -  # To run the test: ./dragonruby mygame --eval app/tests.rb --no-tick
    +      if state.mouse_held &&    # mouse needs to be down
    +        !inputs.mouse.click &&     # must not be first click
    +        ((inputs.mouse.previous_click.point.x - inputs.mouse.position.x).abs > 15) # Need to move 15 pixels before "drag"
    +        state.mouse_dragging = true
    +      end
       
    -  class MySuperHappyFunGame
    -    attr_gtk
    +      # If the user clicks their mouse inside the grid, the search_lines method is called with a click input type.
    +      if ((inputs.mouse.click) && (inputs.mouse.click.point.inside_rect? state.grid_border))
    +        search_lines(inputs.mouse.click.point, :click)
       
    -    def tick
    -      outputs.solids << [100, 100, 300, 300]
    +      # If the user drags their mouse inside the grid, the search_lines method is called with a drag input type.
    +      elsif ((state.mouse_dragging) && (inputs.mouse.position.inside_rect? state.grid_border))
    +        search_lines(inputs.mouse.position, :drag)
    +      end
         end
    -  end
       
    -  def test_universe args, assert
    -    game = MySuperHappyFunGame.new
    -    game.args = args
    -    game.tick
    -    assert.true!  args.outputs.solids.length == 1, "failure: a solid was not added after tick"
    -    assert.false! 1 == 2, "failure: some how, 1 equals 2, the world is ending"
    -    puts "test_universe completed successfully"
    -  end
    +    # Sets the definition of a grid box and handles user input to fill in or clear grid boxes.
    +    def search_lines (point, input_type)
    +      point.x -= state.paint_grid["x"] # subtracts the value assigned to the "x" key in the paint_grid hash
    +      point.y -= state.paint_grid["y"] # subtracts the value assigned to the "y" key in the paint_grid hash
       
    -  puts "running tests"
    -  $gtk.reset 100
    -  $gtk.log_level = :off
    -  $gtk.tests.start
    -
    -#+end_src
    -
    -*** Physics And Collisions - Collision With Object Removal - vector2d.rb
    -#+begin_src ruby
    -  # ./samples/04_physics_and_collisions/10_collision_with_object_removal/app/vector2d.rb
    +      # Remove code following the .floor and see what happens when you try to fill in grid squares
    +      point.x = (point.x / state.paint_grid["dist_x"]).floor * state.paint_grid["dist_x"]
    +      point.y = (point.y / state.paint_grid["dist_y"]).floor * state.paint_grid["dist_y"]
       
    -  class Vector2d
    -    attr_accessor :x, :y
    +      point.x += state.paint_grid["x"]
    +      point.y += state.paint_grid["y"]
       
    -    def initialize x=0, y=0
    -      @x=x
    -      @y=y
    -    end
    +      # Sets definition of a grid box, meaning its x, y, width, and height.
    +      # Floor is called on the point.x and point.y variables.
    +      # Ceil method is called on values of the distance hash keys, setting the width and height of a box.
    +      grid_box = [ point.x.floor, point.y.floor, state.paint_grid["dist_x"].ceil, state.paint_grid["dist_y"].ceil ]
       
    -    #returns a vector multiplied by scalar x
    -    #x [float] scalar
    -    def mult x
    -      r = Vector2d.new(0,0)
    -      r.x=@x*x
    -      r.y=@y*x
    -      r
    +      if input_type == :click # if user clicks their mouse
    +        if state.filled_squares.include? grid_box # if grid box is already filled in
    +          state.filled_squares.delete grid_box # box is cleared and removed from filled_squares
    +        else
    +          state.filled_squares << grid_box # otherwise, box is filled in and added to filled_squares
    +        end
    +      elsif input_type == :drag # if user drags mouse
    +        unless state.filled_squares.include? grid_box # unless the grid box dragged over is already filled in
    +          state.filled_squares << grid_box # the box is filled in and added to filled_squares
    +        end
    +      end
         end
       
    -    # vect [Vector2d] vector to copy
    -    def copy vect
    -      Vector2d.new(@x, @y)
    -    end
    +    # Creates and outputs a "Clear" button on the screen using a label and a border.
    +    # If the button is clicked, the filled squares are cleared, making the filled_squares collection empty.
    +    def draw_buttons
    +      x, y, w, h = 390, 50, 240, 50
    +      state.clear_button        ||= state.new_entity(:button_with_fade)
       
    -    #returns a new vector equivalent to this+vect
    -    #vect [Vector2d] vector to add to self
    -    def add vect
    -      Vector2d.new(@x+vect.x,@y+vect.y)
    -    end
    +      # The x and y positions are set to display the label in the center of the button.
    +      # Try changing the first two parameters to simply x, y and see what happens to the text placement!
    +      state.clear_button.label  ||= [x + w.half, y + h.half + 10, "Clear", 0, 1] # placed in center of border
    +      state.clear_button.border ||= [x, y, w, h]
       
    -    #returns a new vector equivalent to this-vect
    -    #vect [Vector2d] vector to subtract to self
    -    def sub vect
    -      Vector2d.new(@x-vect.c, @y-vect.y)
    +      # If the mouse is clicked inside the borders of the clear button,
    +      # the filled_squares collection is emptied and the squares are cleared.
    +      if inputs.mouse.click && inputs.mouse.click.point.inside_rect?(state.clear_button.border)
    +        state.clear_button.clicked_at = inputs.mouse.click.created_at # time (frame) the click occurred
    +        state.filled_squares.clear
    +        inputs.mouse.previous_click = nil
    +      end
    +  
    +      outputs.labels << state.clear_button.label
    +      outputs.borders << state.clear_button.border
    +  
    +      # When the clear button is clicked, the color of the button changes
    +      # and the transparency changes, as well. If you change the time from
    +      # 0.25.seconds to 1.25.seconds or more, the change will last longer.
    +      if state.clear_button.clicked_at
    +        outputs.solids << [x, y, w, h, 0, 180, 80, 255 * state.clear_button.clicked_at.ease(0.25.seconds, :flip)]
    +      end
         end
    +  end
       
    -    #return the magnitude of the vector
    -    def mag
    -      ((@x**2)+(@y**2))**0.5
    -    end
    +  $paint_app = PaintApp.new
       
    -    #returns a new normalize version of the vector
    -    def normalize
    -      Vector2d.new(@x/mag, @y/mag)
    -    end
    +  def tick args
    +    $paint_app.inputs = args.inputs
    +    $paint_app.state = args.state
    +    $paint_app.grid = args.grid
    +    $paint_app.args = args
    +    $paint_app.outputs = args.outputs
    +    $paint_app.tick
    +    tick_instructions args, "How to create a simple paint app. CLICK and HOLD to draw."
    +  end
       
    -    #TODO delet?
    -    def distABS vect
    -      (((vect.x-@x)**2+(vect.y-@y)**2)**0.5).abs()
    +  def tick_instructions args, text, y = 715
    +    return if args.state.key_event_occurred
    +    if args.inputs.mouse.click ||
    +       args.inputs.keyboard.directional_vector ||
    +       args.inputs.keyboard.key_down.enter ||
    +       args.inputs.keyboard.key_down.escape
    +      args.state.key_event_occurred = true
         end
    +  
    +    args.outputs.debug << [0, y - 50, 1280, 60].solid
    +    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label
    +    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label
       end
     
     #+end_src
     
    -*** Mouse - Mouse Click - main.rb
    +*** Mouse - Coordinate Systems - main.rb
     #+begin_src ruby
    -  # ./samples/05_mouse/01_mouse_click/app/main.rb
    +  # ./samples/05_mouse/04_coordinate_systems/app/main.rb
       =begin
       
        APIs listing that haven't been encountered in previous sample apps:
       
    -   - product: Returns an array of all combinations of elements from all arrays.
    -  
    -     For example, [1,2].product([1,2]) would return the following array...
    -     [[1,1], [1,2], [2,1], [2,2]]
    -     More than two arrays can be given to product and it will still work,
    -     such as [1,2].product([1,2],[3,4]). What would product return in this case?
    -  
    -     Answer:
    -     [[1,1,3],[1,1,4],[1,2,3],[1,2,4],[2,1,3],[2,1,4],[2,2,3],[2,2,4]]
    -  
    -   - num1.fdiv(num2): Returns the float division (will have a decimal) of the two given numbers.
    -     For example, 5.fdiv(2) = 2.5 and 5.fdiv(5) = 1.0
    -  
    -   - yield: Allows you to call a method with a code block and yield to that block.
    +   - args.inputs.mouse.click.position: Coordinates of the mouse's position on the screen.
    +     Unlike args.inputs.mouse.click.point, the mouse does not need to be pressed down for
    +     position to know the mouse's coordinates.
    +     For more information about the mouse, go to mygame/documentation/07-mouse.md.
       
        Reminders:
       
    -   - ARRAY#inside_rect?: Returns true or false depending on if the point is inside the rect.
    +   - args.inputs.mouse.click: This property will be set if the mouse was clicked.
    +  
    +   - args.inputs.mouse.click.point.(x|y): The x and y location of the mouse.
       
        - String interpolation: Uses #{} syntax; everything between the #{ and the } is evaluated
          as Ruby code, and the placeholder is replaced with its corresponding value or result.
       
    -   - args.inputs.mouse.click: This property will be set if the mouse was clicked.
    -  
    -   - Ternary operator (?): Will evaluate a statement (just like an if statement)
    -     and perform an action if the result is true or another action if it is false.
    +     In this sample app, string interpolation is used to show the current position of the mouse
    +     in a label.
       
    -   - reject: Removes elements from a collection if they meet certain requirements.
    +   - args.outputs.labels: An array that generates a label.
    +     The parameters are [X, Y, TEXT, SIZE, ALIGN, RED, GREEN, BLUE, ALPHA, FONT STYLE]
    +     For more information about labels, go to mygame/documentation/02-labels.md.
       
    -   - args.outputs.borders: An array. The values generate a border.
    -     The parameters are [X, Y, WIDTH, HEIGHT, RED, GREEN, BLUE]
    -     For more information about borders, go to mygame/documentation/03-solids-and-borders.md.
    +   - args.outputs.solids: An array that generates a solid.
    +     The parameters are [X, Y, WIDTH, HEIGHT, RED, GREEN, BLUE, ALPHA]
    +     For more information about solids, go to mygame/documentation/03-solids-and-borders.md.
       
    -   - args.outputs.labels: An array. The values generate a label.
    -     The parameters are [X, Y, TEXT, SIZE, ALIGNMENT, RED, GREEN, BLUE, ALPHA, FONT STYLE]
    -     For more information about labels, go to mygame/documentation/02-labels.
    +   - args.outputs.lines: An array that generates a line.
    +     The parameters are [X, Y, X2, Y2, RED, GREEN, BLUE, ALPHA]
    +     For more information about lines, go to mygame/documentation/04-lines.md.
       
       =end
       
    -  # This sample app is a classic game of Tic Tac Toe.
    -  
    -  class TicTacToe
    -    attr_accessor :_, :state, :outputs, :inputs, :grid, :gtk
    -  
    -    # Starts the game with player x's turn and creates an array (to_a) for space combinations.
    -    # Calls methods necessary for the game to run properly.
    -    def tick
    -      state.current_turn ||= :x
    -      state.space_combinations = [-1, 0, 1].product([-1, 0, 1]).to_a
    -      render_board
    -      input_board
    -    end
    -  
    -    # Uses borders to create grid squares for the game's board. Also outputs the game pieces using labels.
    -    def render_board
    -      square_size = 80
    -  
    -      # Positions the game's board in the center of the screen.
    -      # Try removing what follows grid.w_half or grid.h_half and see how the position changes!
    -      board_left = grid.w_half - square_size * 1.5
    -      board_top  = grid.h_half - square_size * 1.5
    -  
    -      # At first glance, the add(1) looks pretty trivial. But if you remove it,
    -      # you'll see that the positioning of the board would be skewed without it!
    -      # Or if you put 2 in the parenthesis, the pieces will be placed in the wrong squares
    -      # due to the change in board placement.
    -      outputs.borders << all_spaces do |x, y, space| # outputs borders for all board spaces
    -        space.border ||= [
    -          board_left + x.add(1) * square_size, # space.border is initialized using this definition
    -          board_top  + y.add(1) * square_size,
    -          square_size,
    -          square_size
    -        ]
    -      end
    -  
    -      # Again, the calculations ensure that the piece is placed in the center of the grid square.
    -      # Remove the '- 20' and the piece will be placed at the top of the grid square instead of the center.
    -      outputs.labels << filled_spaces do |x, y, space| # put label in each filled space of board
    -            label board_left + x.add(1) * square_size + square_size.fdiv(2),
    -            board_top  + y.add(1) * square_size + square_size - 20,
    -            space.piece # text of label, either "x" or "o"
    -      end
    -  
    -      # Uses a label to output whether x or o won, or if a draw occurred.
    -      # If the game is ongoing, a label shows whose turn it currently is.
    -      outputs.labels << if state.x_won
    -                          label grid.w_half, grid.top - 80, "x won" # the '-80' positions the label 80 pixels lower than top
    -                        elsif state.o_won
    -                          label grid.w_half, grid.top - 80, "o won" # grid.w_half positions the label in the center horizontally
    -                        elsif state.draw
    -                          label grid.w_half, grid.top - 80, "a draw"
    -                        else # if no one won and the game is ongoing
    -                          label grid.w_half, grid.top - 80, "turn: #{state.current_turn}"
    -                        end
    -    end
    -  
    -    # Calls the methods responsible for handling user input and determining the winner.
    -    # Does nothing unless the mouse is clicked.
    -    def input_board
    -      return unless inputs.mouse.click
    -      input_place_piece
    -      input_restart_game
    -      determine_winner
    -    end
    -  
    -    # Handles user input for placing pieces on the board.
    -    def input_place_piece
    -      return if state.game_over
    -  
    -      # Checks to find the space that the mouse was clicked inside of, and makes sure the space does not already
    -      # have a piece in it.
    -      __, __, space = all_spaces.find do |__, __, space|
    -        inputs.mouse.click.point.inside_rect?(space.border) && !space.piece
    -      end
    -  
    -      # The piece that goes into the space belongs to the player whose turn it currently is.
    -      return unless space
    -      space.piece = state.current_turn
    -  
    -      # This ternary operator statement allows us to change the current player's turn.
    -      # If it is currently x's turn, it becomes o's turn. If it is not x's turn, it become's x's turn.
    -      state.current_turn = state.current_turn == :x ? :o : :x
    -    end
    -  
    -    # Resets the game.
    -    def input_restart_game
    -      return unless state.game_over
    -      gtk.reset
    -    end
    -  
    -    # Checks if x or o won the game.
    -    # If neither player wins and all nine squares are filled, a draw happens.
    -    # Once a player is chosen as the winner or a draw happens, the game is over.
    -    def determine_winner
    -      state.x_won = won? :x # evaluates to either true or false (boolean values)
    -      state.o_won = won? :o
    -      state.draw = true if filled_spaces.length == 9 && !state.x_won && !state.o_won
    -      state.game_over = state.x_won || state.o_won || state.draw
    -    end
    -  
    -    # Determines if a player won by checking if there is a horizontal match or vertical match.
    -    # Horizontal_match and vertical_match have boolean values. If either is true, the game has been won.
    -    def won? piece
    -      # performs action on all space combinations
    -      won = [[-1, 0, 1]].product([-1, 0, 1]).map do |xs, y|
    -  
    -        # Checks if the 3 grid spaces with the same y value (or same row) and
    -        # x values that are next to each other have pieces that belong to the same player.
    -        # Remember, the value of piece is equal to the current turn (which is the player).
    -        horizontal_match = state.spaces[xs[0]][y].piece == piece &&
    -                           state.spaces[xs[1]][y].piece == piece &&
    -                           state.spaces[xs[2]][y].piece == piece
    -  
    -        # Checks if the 3 grid spaces with the same x value (or same column) and
    -        # y values that are next to each other have pieces that belong to the same player.
    -        # The && represents an "and" statement: if even one part of the statement is false,
    -        # the entire statement evaluates to false.
    -        vertical_match = state.spaces[y][xs[0]].piece == piece &&
    -                         state.spaces[y][xs[1]].piece == piece &&
    -                         state.spaces[y][xs[2]].piece == piece
    -  
    -        horizontal_match || vertical_match # if either is true, true is returned
    -      end
    -  
    -      # Sees if there is a diagonal match, starting from the bottom left and ending at the top right.
    -      # Is added to won regardless of whether the statement is true or false.
    -      won << (state.spaces[-1][-1].piece == piece && # bottom left
    -              state.spaces[ 0][ 0].piece == piece && # center
    -              state.spaces[ 1][ 1].piece == piece)   # top right
    +  # This sample app shows a coordinate system or grid. The user can move their mouse around the screen and the
    +  # coordinates of their position on the screen will be displayed. Users can choose to view one quadrant or
    +  # four quadrants by pressing the button.
       
    -      # Sees if there is a diagonal match, starting at the bottom right and ending at the top left
    -      # and is added to won.
    -      won << (state.spaces[ 1][-1].piece == piece && # bottom right
    -              state.spaces[ 0][ 0].piece == piece && # center
    -              state.spaces[-1][ 1].piece == piece)   # top left
    +  def tick args
       
    -      # Any false statements (meaning false diagonal matches) are rejected from won
    -      won.reject_false.any?
    -    end
    +    # The addition and subtraction in the first two parameters of the label and solid
    +    # ensure that the outputs don't overlap each other. Try removing them and see what happens.
    +    pos = args.inputs.mouse.position # stores coordinates of mouse's position
    +    args.outputs.labels << [pos.x + 10, pos.y + 10, "#{pos}"] # outputs label of coordinates
    +    args.outputs.solids << [pos.x -  2, pos.y - 2, 5, 5] # outputs small blackk box placed where mouse is hovering
       
    -    # Defines filled spaces on the board by rejecting all spaces that do not have game pieces in them.
    -    # The ! before a statement means "not". For example, we are rejecting any space combinations that do
    -    # NOT have pieces in them.
    -    def filled_spaces
    -      state.space_combinations
    -        .reject { |x, y| !state.spaces[x][y].piece } # reject spaces with no pieces in them
    -        .map do |x, y|
    -          if block_given?
    -            yield x, y, state.spaces[x][y]
    -          else
    -            [x, y, state.spaces[x][y]] # sets definition of space
    -          end
    -      end
    -    end
    +    button = [0, 0, 370, 50] # sets definition of toggle button
    +    args.outputs.borders << button # outputs button as border (not filled in)
    +    args.outputs.labels << [10, 35, "click here toggle coordinate system"] # label of button
    +    args.outputs.lines << [    0, -720,    0, 720] # vertical line dividing quadrants
    +    args.outputs.lines << [-1280,    0, 1280,   0] # horizontal line dividing quadrants
       
    -    # Defines all spaces on the board.
    -    def all_spaces
    -      if !block_given?
    -        state.space_combinations.map do |x, y|
    -          [x, y, state.spaces[x][y]] # sets definition of space
    -        end
    -      else # if a block is given (block_given? is true)
    -        state.space_combinations.map do |x, y|
    -          yield x, y, state.spaces[x][y] # yield if a block is given
    +    if args.inputs.mouse.click # if the user clicks the mouse
    +      pos = args.inputs.mouse.click.point # pos's value is point where user clicked (coordinates)
    +      if pos.inside_rect? button # if the click occurred inside the button
    +        if args.grid.name == :bottom_left # if the grid shows bottom left as origin
    +          args.grid.origin_center! # origin will be shown in center
    +        else
    +          args.grid.origin_bottom_left! # otherwise, the view will change to show bottom left as origin
             end
           end
         end
       
    -    # Sets values for a label, such as the position, value, size, alignment, and color.
    -    def label x, y, value
    -      [x, y + 10, value, 20, 1, 0, 0, 0]
    -    end
    -  end
    -  
    -  $tic_tac_toe = TicTacToe.new
    -  
    -  def tick args
    -    $tic_tac_toe._       = args
    -    $tic_tac_toe.state   = args.state
    -    $tic_tac_toe.outputs = args.outputs
    -    $tic_tac_toe.inputs  = args.inputs
    -    $tic_tac_toe.grid    = args.grid
    -    $tic_tac_toe.gtk     = args.gtk
    -    $tic_tac_toe.tick
    -    tick_instructions args, "Sample app shows how to work with mouse clicks."
    +    tick_instructions args, "Sample app shows the two supported coordinate systems in Game Toolkit."
       end
       
       def tick_instructions args, text, y = 715
    @@ -10621,1032 +10636,1400 @@ Follows is a source code listing for all files that have been open sourced. This
     
     #+end_src
     
    -*** Mouse - Mouse Move - main.rb
    +*** Save Load - Save Load Game - main.rb
     #+begin_src ruby
    -  # ./samples/05_mouse/02_mouse_move/app/main.rb
    +  # ./samples/06_save_load/01_save_load_game/app/main.rb
       =begin
       
    -   Reminders:
    +   APIs listing that haven't been encountered in previous sample apps:
       
    -   - num1.greater(num2): Returns the greater value.
    -     For example, if we have the command
    -     puts 4.greater(3)
    -     the number 4 would be printed to the console since it has a greater value than 3.
    -     Similar to lesser, which returns the lesser value.
    +   - Symbol (:): Ruby object with a name and an internal ID. Symbols are useful
    +     because with a given symbol name, you can refer to the same object throughout
    +     a Ruby program.
       
    -   - find_all: Finds all elements of a collection that meet certain requirements.
    -     For example, in this sample app, we're using find_all to find all zombies that have intersected
    -     or hit the player's sprite since these zombies have been killed.
    +     In this sample app, we're using symbols for our buttons. We have buttons that
    +     light fires, save, load, etc. Each of these buttons has a distinct symbol like
    +     :light_fire, :save_game, :load_game, etc.
       
    -   - args.inputs.keyboard.key_down.KEY: Determines if a key is being held or pressed.
    -     Stores the frame the "down" event occurred.
    -     For more information about the keyboard, go to mygame/documentation/06-keyboard.md.
    +   - to_sym: Returns the symbol corresponding to the given string; creates the symbol
    +     if it does not already exist.
    +     For example,
    +     'car'.to_sym
    +     would return the symbol :car.
       
    -   - args.outputs.sprites: An array. The values generate a sprite.
    -     The parameters are [X, Y, WIDTH, HEIGHT, PATH, ANGLE, ALPHA, RED, GREEN, BLUE]
    -     For more information about sprites, go to mygame/documentation/05-sprites.md.
    +   - last: Returns the last element of an array.
       
    -   - args.state.new_entity: Used when we want to create a new object, like a sprite or button.
    -     When we want to create a new object, we can declare it as a new entity and then define
    -     its properties. (Remember, you can use state to define ANY property and it will
    -     be retained across frames.)
    +   Reminders:
       
    -   - String interpolation: Uses #{} syntax; everything between the #{ and the } is evaluated
    -     as Ruby code, and the placeholder is replaced with its corresponding value or result.
    +   - num1.lesser(num2): finds the lower value of the given options.
    +     For example, in the statement
    +     a = 4.lesser(3)
    +     3 has a lower value than 4, which means that the value of a would be set to 3,
    +     but if the statement had been
    +     a = 4.lesser(5)
    +     4 has a lower value than 5, which means that the value of a would be set to 4.
       
    -   - map: Ruby method used to transform data; used in arrays, hashes, and collections.
    -     Can be used to perform an action on every element of a collection, such as multiplying
    -     each element by 2 or declaring every element as a new entity.
    +   - num1.fdiv(num2): returns the float division (will have a decimal) of the two given numbers.
    +     For example, 5.fdiv(2) = 2.5 and 5.fdiv(5) = 1.0
       
    -   - sample: Chooses a random element from the array.
    +   - String interpolation: uses #{} syntax; everything between the #{ and the } is evaluated
    +     as Ruby code, and the placeholder is replaced with its corresponding value or result.
       
    -   - reject: Removes elements that meet certain requirements.
    -     In this sample app, we're removing/rejecting zombies that reach the center of the screen. We're also
    -     rejecting zombies that were killed more than 30 frames ago.
    +   - args.outputs.labels: An array. Values generate a label.
    +     Parameters are [X, Y, TEXT, SIZE, ALIGN, RED, GREEN, BLUE, ALPHA, FONT STYLE]
    +     For more information, go to mygame/documentation/02-labels.md.
    +  
    +   - ARRAY#inside_rect?: An array with at least two values is considered a point. An array
    +     with at least four values is considered a rect. The inside_rect? function returns true
    +     or false depending on if the point is inside the rect.
       
       =end
       
    -  # This sample app allows users to move around the screen in order to kill zombies. Zombies appear from every direction so the goal
    -  # is to kill the zombies as fast as possible!
    +  # This code allows users to perform different tasks, such as saving and loading the game.
    +  # Users also have options to reset the game and light a fire.
       
    -  class ProtectThePuppiesFromTheZombies
    -    attr_accessor :grid, :inputs, :state, :outputs
    +  class TextedBasedGame
       
    -    # Calls the methods necessary for the game to run properly.
    +    # Contains methods needed for game to run properly.
    +    # Increments tick count by 1 each time it runs (60 times in a single second)
         def tick
    -      defaults
    -      render
    -      calc
    -      input
    +      default
    +      show_intro
    +      state.engine_tick_count += 1
    +      tick_fire
         end
       
    -    # Sets default values for the zombies and for the player.
    -    # Initialization happens only in the first frame.
    -    def defaults
    -      state.flash_at               ||= 0
    -      state.zombie_min_spawn_rate  ||= 60
    -      state.zombie_spawn_countdown ||= random_spawn_countdown state.zombie_min_spawn_rate
    -      state.zombies                ||= []
    -      state.killed_zombies         ||= []
    +    # Sets default values.
    +    # The ||= ensures that a variable's value is only set to the value following the = sign
    +    # if the value has not already been set before. Intialization happens only in the first frame.
    +    def default
    +      state.engine_tick_count ||= 0
    +      state.active_module     ||= :room
    +      state.fire_progress     ||= 0
    +      state.fire_ready_in     ||= 10
    +      state.previous_fire     ||= :dead
    +      state.fire              ||= :dead
    +    end
       
    -      # Declares player as a new entity and sets its properties.
    -      # The player begins the game in the center of the screen, not moving in any direction.
    -      state.player ||= state.new_entity(:player, { x: 640,
    -                                                 y: 360,
    -                                                 attack_angle: 0,
    -                                                 dx: 0,
    -                                                 dy: 0 })
    +    def show_intro
    +      return unless state.engine_tick_count == 0 # return unless the game just started
    +      set_story_line "awake." # calls set_story_line method, sets to "awake"
         end
       
    -    # Outputs a gray background.
    -    # Calls the methods needed to output the player, zombies, etc onto the screen.
    -    def render
    -      outputs.solids << [grid.rect, 100, 100, 100]
    -      render_zombies
    -      render_killed_zombies
    -      render_player
    -      render_flash
    +    # Sets story line.
    +    def set_story_line story_line
    +      state.story_line    = story_line # story line set to value of parameter
    +      state.active_module = :alert # active module set to alert
         end
       
    -    # Outputs the zombies on the screen and sets values for the sprites, such as the position, width, height, and animation.
    -    def render_zombies
    -      outputs.sprites << state.zombies.map do |z| # performs action on all zombies in the collection
    -        z.sprite = [z.x, z.y, 4 * 3, 8 * 3, animation_sprite(z)].sprite # sets definition for sprite, calls animation_sprite method
    -        z.sprite
    +    # Clears story line.
    +    def clear_storyline
    +      state.active_module = :none # active module set to none
    +      state.story_line = nil # story line is cleared, set to nil (or empty)
    +    end
    +  
    +    # Determines fire progress (how close the fire is to being ready to light).
    +    def tick_fire
    +      return if state.active_module == :alert # return if active module is alert
    +      state.fire_progress += 1 # increment fire progress
    +      # fire_ready_in is 10. The fire_progress is either the current value or 10, whichever has a lower value.
    +      state.fire_progress = state.fire_progress.lesser(state.fire_ready_in)
    +    end
    +  
    +    # Sets the value of fire (whether it is dead or roaring), and the story line
    +    def light_fire
    +      return unless fire_ready? # returns unless the fire is ready to be lit
    +      state.fire = :roaring # fire is lit, set to roaring
    +      state.fire_progress = 0 # the fire progress returns to 0, since the fire has been lit
    +      if state.fire != state.previous_fire
    +        set_story_line "the fire is #{state.fire}." # the story line is set using string interpolation
    +        state.previous_fire = state.fire
           end
         end
       
    -    # Outputs sprites of killed zombies, and displays a slash image to show that a zombie has been killed.
    -    def render_killed_zombies
    -      outputs.sprites << state.killed_zombies.map do |z| # performs action on all killed zombies in collection
    -        z.sprite = [z.x,
    -                    z.y,
    -                    4 * 3,
    -                    8 * 3,
    -                    animation_sprite(z, z.death_at), # calls animation_sprite method
    -                    0, # angle
    -                    255 * z.death_at.ease(30, :flip)].sprite # transparency of a zombie changes when they die
    -                    # change the value of 30 and see what happens when a zombie is killed
    +    # Checks if the fire is ready to be lit. Returns a boolean value.
    +    def fire_ready?
    +      # If fire_progress (value between 0 and 10) is equal to fire_ready_in (value of 10),
    +      # the fire is ready to be lit.
    +      state.fire_progress == state.fire_ready_in
    +    end
       
    -        # Sets values to output the slash over the zombie's sprite when a zombie is killed.
    -        # The slash is tilted 45 degrees from the angle of the player's attack.
    -        # Change the 3 inside scale_rect to 30 and the slash will be HUGE! Scale_rect positions
    -        # the slash over the killed zombie's sprite.
    -        [z.sprite, [z.sprite.rect, 'sprites/slash.png', 45 + state.player.attack_angle_on_click, z.sprite.a].scale_rect(3, 0.5, 0.5)]
    +    # Divides the value of the fire_progress variable by 10 to determine how close the user is to
    +    # being able to light a fire.
    +    def light_fire_progress
    +      state.fire_progress.fdiv(10) # float division
    +    end
    +  
    +    # Defines fire as the state.fire variable.
    +    def fire
    +      state.fire
    +    end
    +  
    +    # Sets the title of the room.
    +    def room_title
    +      return "a room that is dark" if state.fire == :dead # room is dark if the fire is dead
    +      return "a room that is lit" # room is lit if the fire is not dead
    +    end
    +  
    +    # Sets the active_module to room.
    +    def go_to_room
    +      state.active_module = :room
    +    end
    +  
    +    # Defines active_module as the state.active_module variable.
    +    def active_module
    +      state.active_module
    +    end
    +  
    +    # Defines story_line as the state.story_line variable.
    +    def story_line
    +      state.story_line
    +    end
    +  
    +    # Update every 60 frames (or every second)
    +    def should_tick?
    +      state.tick_count.mod_zero?(60)
    +    end
    +  
    +    # Sets the value of the game state provider.
    +    def initialize game_state_provider
    +      @game_state_provider = game_state_provider
    +    end
    +  
    +    # Defines the game state.
    +    # Any variable prefixed with an @ symbol is an instance variable.
    +    def state
    +      @game_state_provider.state
    +    end
    +  
    +    # Saves the state of the game in a text file called game_state.txt.
    +    def save
    +      $gtk.serialize_state('game_state.txt', state)
    +    end
    +  
    +    # Loads the game state from the game_state.txt text file.
    +    # If the load is unsuccessful, the user is informed since the story line indicates the failure.
    +    def load
    +      parsed_state = $gtk.deserialize_state('game_state.txt')
    +      if !parsed_state
    +        set_story_line "no game to load. press save first."
    +      else
    +        $gtk.args.state = parsed_state
           end
         end
       
    -    # Outputs the player sprite using the images in the sprites folder.
    -    def render_player
    -      state.player_sprite = [state.player.x,
    -                             state.player.y,
    -                            4 * 3,
    -                            8 * 3, "sprites/player-#{animation_index(state.player.created_at_elapsed)}.png"] # string interpolation
    -      outputs.sprites << state.player_sprite
    +    # Resets the game.
    +    def reset
    +      $gtk.reset
    +    end
    +  end
       
    -      # Outputs a small red square that previews the angles that the player can attack in.
    -      # It can be moved in a perfect circle around the player to show possible movements.
    -      # Change the 60 in the parenthesis and see what happens to the movement of the red square.
    -      outputs.solids <<  [state.player.x + state.player.attack_angle.vector_x(60),
    -                          state.player.y + state.player.attack_angle.vector_y(60),
    -                          3, 3, 255, 0, 0]
    +  class TextedBasedGamePresenter
    +    attr_accessor :state, :outputs, :inputs
    +  
    +    # Creates empty collection called highlights.
    +    # Calls methods necessary to run the game.
    +    def tick
    +      state.layout.highlights ||= []
    +      game.tick if game.should_tick?
    +      render
    +      process_input
         end
       
    -    # Renders flash as a solid. The screen turns white for 10 frames when a zombie is killed.
    -    def render_flash
    -      return if state.flash_at.elapsed_time > 10 # return if more than 10 frames have passed since flash.
    -      # Transparency gradually changes (or eases) during the 10 frames of flash.
    -      outputs.primitives << [grid.rect, 255, 255, 255, 255 * state.flash_at.ease(10, :flip)].solid
    +    # Outputs a label of the tick count (passage of time) and calls all render methods.
    +    def render
    +      outputs.labels << [10, 30, state.tick_count]
    +      render_alert
    +      render_room
    +      render_highlights
         end
       
    -    # Calls all methods necessary for performing calculations.
    -    def calc
    -      calc_spawn_zombie
    -      calc_move_zombies
    -      calc_player
    -      calc_kill_zombie
    +    # Outputs a label onto the screen that shows the story line, and also outputs a "close" button.
    +    def render_alert
    +      return unless game.active_module == :alert
    +  
    +      outputs.labels << [640, 480, game.story_line, 5, 1]  # outputs story line label
    +      outputs.primitives << button(:alert_dismiss, 490, 380, "close")  # positions "close" button under story line
         end
       
    -    # Decreases the zombie spawn countdown by 1 if it has a value greater than 0.
    -    def calc_spawn_zombie
    -      if state.zombie_spawn_countdown > 0
    -        state.zombie_spawn_countdown -= 1
    -        return
    -      end
    +    def render_room
    +      return unless game.active_module == :room
    +      outputs.labels << [640, 700, game.room_title, 4, 1] # outputs room title label at top of screen
       
    -      # New zombies are created, positioned on the screen, and added to the zombies collection.
    -      state.zombies << state.new_entity(:zombie) do |z| # each zombie is declared a new entity
    -        if rand > 0.5
    -          z.x = grid.rect.w.randomize(:ratio) # random x position on screen (within grid scope)
    -          z.y = [-10, 730].sample # y position is set to either -10 or 730 (randomly chosen)
    -          # the possible values exceed the screen's scope so zombies appear to be coming from far away
    -        else
    -          z.x = [-10, 1290].sample # x position is set to either -10 or 1290 (randomly chosen)
    -          z.y = grid.rect.w.randomize(:ratio) # random y position on screen
    -        end
    -      end
    +      # The parameters for these outputs are (symbol, x, y, text, value/percentage) and each has a y value
    +      # that positions it 60 pixels lower than the previous output.
       
    -      # Calls random_spawn_countdown method (determines how fast new zombies appear)
    -      state.zombie_spawn_countdown = random_spawn_countdown state.zombie_min_spawn_rate
    -      state.zombie_min_spawn_rate -= 1
    -      # set to either the current zombie_min_spawn_rate or 0, depending on which value is greater
    -      state.zombie_min_spawn_rate  = state.zombie_min_spawn_rate.greater(0)
    +      # outputs the light_fire_progress bar, uses light_fire_progress for its percentage (which changes bar's appearance)
    +      outputs.primitives << progress_bar(:light_fire, 490, 600, "light fire", game.light_fire_progress)
    +      outputs.primitives << button(       :save_game, 490, 540, "save") # outputs save button
    +      outputs.primitives << button(       :load_game, 490, 480, "load") # outputs load button
    +      outputs.primitives << button(      :reset_game, 490, 420, "reset") # outputs reset button
    +      outputs.labels << [640, 30, "the fire is #{game.fire}", 0, 1] # outputs fire label at bottom of screen
         end
       
    -    # Moves all zombies towards the center of the screen.
    -    # All zombies that reach the center (640, 360) are rejected from the zombies collection and disappear.
    -    def calc_move_zombies
    -      state.zombies.each do |z| # for each zombie in the collection
    -        z.y = z.y.towards(360, 0.1) # move the zombie towards the center (640, 360) at a rate of 0.1
    -        z.x = z.x.towards(640, 0.1) # change 0.1 to 1.1 and see how much faster the zombies move to the center
    -      end
    -      state.zombies = state.zombies.reject { |z| z.y == 360 && z.x == 640 } # remove zombies that are in center
    -    end
    +    # Outputs a collection of highlights using an array to set their values, and also rejects certain values from the collection.
    +    def render_highlights
    +      state.layout.highlights.each do |h| # for each highlight in the collection
    +          h.lifetime -= 1 # decrease the value of its lifetime
    +        end
       
    -    # Calculates the position and movement of the player on the screen.
    -    def calc_player
    -      state.player.x += state.player.dx # changes x based on dx (change in x)
    -      state.player.y += state.player.dy # changes y based on dy (change in y)
    +        outputs.solids << state.layout.highlights.map do |h| # outputs highlights collection
    +          [h.x, h.y, h.w, h.h, h.color, 255 * h.lifetime / h.max_lifetime] # sets definition for each highlight
    +          # transparency changes; divide lifetime by max_lifetime, multiply result by 255
    +        end
       
    -      state.player.dx *= 0.9 # scales dx down
    -      state.player.dy *= 0.9 # scales dy down
    +        # reject highlights from collection that have no remaining lifetime
    +        state.layout.highlights = state.layout.highlights.reject { |h| h.lifetime <= 0 }
    +    end
       
    -      # Compares player's x to 1280 to find lesser value, then compares result to 0 to find greater value.
    -      # This ensures that the player remains within the screen's scope.
    -      state.player.x = state.player.x.lesser(1280).greater(0)
    -      state.player.y = state.player.y.lesser(720).greater(0) # same with player's y
    +    # Checks whether or not a button was clicked.
    +    # Returns a boolean value.
    +    def process_input
    +      button = button_clicked? # calls button_clicked? method
         end
       
    -    # Finds all zombies that intersect with the player's sprite. These zombies are removed from the zombies collection
    -    # and added to the killed_zombies collection since any zombie that intersects with the player is killed.
    -    def calc_kill_zombie
    +    # Returns a boolean value.
    +    # Finds the button that was clicked from the button list and determines what method to call.
    +    # Adds a highlight to the highlights collection.
    +    def button_clicked?
    +      return nil unless click_pos # return nil unless click_pos holds coordinates of mouse click
    +        button = @button_list.find do |k, v| # goes through button_list to find button clicked
    +          click_pos.inside_rect? v[:primitives].last.rect # was the mouse clicked inside the rect of button?
    +        end
    +        return unless button # return unless a button was clicked
    +        method_to_call = "#{button[0]}_clicked".to_sym # sets method_to_call to symbol (like :save_game or :load_game)
    +        if self.respond_to? method_to_call # returns true if self responds to the given method (method actually exists)
    +          border = button[1][:primitives].last # sets border definition using value of last key in button list hash
       
    -      # Find all zombies that intersect with the player. They are considered killed.
    -      killed_this_frame = state.zombies.find_all { |z| z.sprite.intersect_rect? state.player_sprite }
    -      state.zombies = state.zombies - killed_this_frame # remove newly killed zombies from zombies collection
    -      state.killed_zombies += killed_this_frame # add newly killed zombies to killed zombies
    +          # declares each highlight as a new entity, sets properties
    +          state.layout.highlights << state.new_entity(:highlight) do |h|
    +              h.x = border.x
    +              h.y = border.y
    +              h.w = border.w
    +              h.h = border.h
    +              h.max_lifetime = 10
    +              h.lifetime = h.max_lifetime
    +              h.color = [120, 120, 180] # sets color to shade of purple
    +            end
       
    -      if killed_this_frame.length > 0 # if atleast one zombie was killed in the frame
    -        state.flash_at = state.tick_count # flash_at set to the frame when the zombie was killed
    -      # Don't forget, the rendered flash lasts for 10 frames after the zombie is killed (look at render_flash method)
    -      end
    +            self.send method_to_call # invoke method identified by symbol
    +          else # otherwise, if self doesn't respond to given method
    +            border = button[1][:primitives].last # sets border definition using value of last key in hash
       
    -      # Sets the tick_count (passage of time) as the value of the death_at variable for each killed zombie.
    -      # Death_at stores the frame a zombie was killed.
    -      killed_this_frame.each do |z|
    -        z.death_at = state.tick_count
    -      end
    +            # declares each highlight as a new entity, sets properties
    +            state.layout.highlights << state.new_entity(:highlight) do |h|
    +              h.x = border.x
    +              h.y = border.y
    +              h.w = border.w
    +              h.h = border.h
    +              h.max_lifetime = 4 # different max_lifetime than the one set if respond_to? had been true
    +              h.lifetime = h.max_lifetime
    +              h.color = [120, 80, 80] # sets color to dark color
    +            end
       
    -      # Zombies are rejected from the killed_zombies collection depending on when they were killed.
    -      # They are rejected if more than 30 frames have passed since their death.
    -      state.killed_zombies = state.killed_zombies.reject { |z| state.tick_count - z.death_at > 30 }
    +            # instructions for users on how to add the missing method_to_call to the code
    +            puts "It looks like #{method_to_call} doesn't exists on TextedBasedGamePresenter. Please add this method:"
    +            puts "Just copy the code below and put it in the #{TextedBasedGamePresenter} class definition."
    +            puts ""
    +            puts "```"
    +            puts "class TextedBasedGamePresenter <--- find this class and put the method below in it"
    +            puts ""
    +            puts "  def #{method_to_call}"
    +            puts "    puts 'Yay that worked!'"
    +            puts "  end"
    +            puts ""
    +            puts "end <-- make sure to put the #{method_to_call} method in between the `class` word and the final `end` statement."
    +            puts "```"
    +            puts ""
    +        end
         end
       
    -    # Uses input from the user to move the player around the screen.
    -    def input
    +    # Returns the position of the mouse when it is clicked.
    +    def click_pos
    +      return nil unless inputs.mouse.click # returns nil unless the mouse was clicked
    +      return inputs.mouse.click.point # returns location of mouse click (coordinates)
    +    end
       
    -      # If the "a" key or left key is pressed, the x position of the player decreases.
    -      # Otherwise, if the "d" key or right key is pressed, the x position of the player increases.
    -      if inputs.keyboard.key_held.a || inputs.keyboard.key_held.left
    -        state.player.x -= 5
    -      elsif inputs.keyboard.key_held.d || inputs.keyboard.key_held.right
    -        state.player.x += 5
    -      end
    +    # Creates buttons for the button_list and sets their values using a hash (uses symbols as keys)
    +    def button id, x, y, text
    +      @button_list[id] ||= { # assigns values to hash keys
    +        id: id,
    +        text: text,
    +        primitives: [
    +          [x + 10, y + 30, text, 2, 0].label, # positions label inside border
    +          [x, y, 300, 50].border,             # sets definition of border
    +        ]
    +      }
       
    -      # If the "w" or up key is pressed, the y position of the player increases.
    -      # Otherwise, if the "s" or down key is pressed, the y position of the player decreases.
    -      if inputs.keyboard.key_held.w || inputs.keyboard.key_held.up
    -        state.player.y += 5
    -      elsif inputs.keyboard.key_held.s || inputs.keyboard.key_held.down
    -        state.player.y -= 5
    -      end
    +      @button_list[id][:primitives] # returns label and border for buttons
    +    end
       
    -      # Sets the attack angle so the player can move and attack in the precise direction it wants to go.
    -      # If the mouse is moved, the attack angle is changed (based on the player's position and mouse position).
    -      # Attack angle also contributes to the position of red square.
    -      if inputs.mouse.moved
    -        state.player.attack_angle = inputs.mouse.position.angle_from [state.player.x, state.player.y]
    -      end
    +    # Creates a progress bar (used for lighting the fire) and sets its values.
    +    def progress_bar id, x, y, text, percentage
    +      @button_list[id] = { # assigns values to hash keys
    +        id: id,
    +        text: text,
    +        primitives: [
    +          [x, y, 300, 50, 100, 100, 100].solid, # sets definition for solid (which fills the bar with gray)
    +          [x + 10, y + 30, text, 2, 0].label, # sets definition for label, positions inside border
    +          [x, y, 300, 50].border, # sets definition of border
    +        ]
    +      }
       
    -      if inputs.mouse.click && state.player.dx < 0.5 && state.player.dy < 0.5
    -        state.player.attack_angle_on_click = inputs.mouse.position.angle_from [state.player.x, state.player.y]
    -        state.player.attack_angle = state.player.attack_angle_on_click # player's attack angle is set
    -        state.player.dx = state.player.attack_angle.vector_x(25) # change in player's position
    -        state.player.dy = state.player.attack_angle.vector_y(25)
    -      end
    +      # Fills progress bar based on percentage. If the fire was ready to be lit (100%) and we multiplied by
    +      # 100, only 1/3 of the bar would only be filled in. 200 would cause only 2/3 to be filled in.
    +      @button_list[id][:primitives][0][2] = 300 * percentage
    +      @button_list[id][:primitives]
         end
       
    -    # Sets the zombie spawn's countdown to a random number.
    -    # How fast zombies appear (change the 60 to 6 and too many zombies will appear at once!)
    -    def random_spawn_countdown minimum
    -      10.randomize(:ratio, :sign).to_i + 60
    +    # Defines the game.
    +    def game
    +      @game
         end
       
    -    # Helps to iterate through the images in the sprites folder by setting the animation index.
    -    # 3 frames is how long to show an image, and 6 is how many images to flip through.
    -    def animation_index at
    -      at.idiv(3).mod(6)
    +    # Initalizes the game and creates an empty list of buttons.
    +    def initialize
    +      @game = TextedBasedGame.new self
    +      @button_list ||= {}
         end
       
    -    # Animates the zombies by using the animation index to go through the images in the sprites folder.
    -    def animation_sprite zombie, at = nil
    -      at ||= zombie.created_at_elapsed # how long it is has been since a zombie was created
    -      index = animation_index at
    -      "sprites/zombie-#{index}.png" # string interpolation to iterate through images
    +    # Clears the storyline and takes the user to the room.
    +    def alert_dismiss_clicked
    +      game.clear_storyline
    +      game.go_to_room
         end
    -  end
       
    -  $protect_the_puppies_from_the_zombies = ProtectThePuppiesFromTheZombies.new
    +    # Lights the fire when the user clicks the "light fire" option.
    +    def light_fire_clicked
    +      game.light_fire
    +    end
       
    -  def tick args
    -    $protect_the_puppies_from_the_zombies.grid    = args.grid
    -    $protect_the_puppies_from_the_zombies.inputs  = args.inputs
    -    $protect_the_puppies_from_the_zombies.state    = args.state
    -    $protect_the_puppies_from_the_zombies.outputs = args.outputs
    -    $protect_the_puppies_from_the_zombies.tick
    -    tick_instructions args, "How to get the mouse position and translate it to an x, y position using .vector_x and .vector_y. CLICK to play."
    -  end
    +    # Saves the game when the user clicks the "save" option.
    +    def save_game_clicked
    +      game.save
    +    end
       
    -  def tick_instructions args, text, y = 715
    -    return if args.state.key_event_occurred
    -    if args.inputs.mouse.click ||
    -       args.inputs.keyboard.directional_vector ||
    -       args.inputs.keyboard.key_down.enter ||
    -       args.inputs.keyboard.key_down.escape
    -      args.state.key_event_occurred = true
    +    # Resets the game when the user clicks the "reset" option.
    +    def reset_game_clicked
    +      game.reset
         end
       
    -    args.outputs.debug << [0, y - 50, 1280, 60].solid
    -    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label
    -    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label
    +    # Loads the game when the user clicks the "load" option.
    +    def load_game_clicked
    +      game.load
    +    end
    +  end
    +  
    +  $text_based_rpg = TextedBasedGamePresenter.new
    +  
    +  def tick args
    +    $text_based_rpg.state = args.state
    +    $text_based_rpg.outputs = args.outputs
    +    $text_based_rpg.inputs = args.inputs
    +    $text_based_rpg.tick
       end
     
     #+end_src
     
    -*** Mouse - Mouse Move Paint App - main.rb
    +*** Advanced Audio - Audio Mixer - main.rb
     #+begin_src ruby
    -  # ./samples/05_mouse/03_mouse_move_paint_app/app/main.rb
    -  =begin
    -  
    -   APIs listing that haven't been encountered in previous sample apps:
    -  
    -   - Floor: Method that returns an integer number smaller than or equal to the original with no decimal.
    -  
    -     For example, if we have a variable, a = 13.7, and we called floor on it, it would look like this...
    -     puts a.floor()
    -     which would print out 13.
    -     (There is also a ceil method, which returns an integer number greater than or equal to the original
    -     with no decimal. If we had called ceil on the variable a, the result would have been 14.)
    -  
    -   Reminders:
    -  
    -   - Hashes: Collection of unique keys and their corresponding values. The value can be found
    -     using their keys.
    -  
    -     For example, if we have a "numbers" hash that stores numbers in English as the
    -     key and numbers in Spanish as the value, we'd have a hash that looks like this...
    -     numbers = { "one" => "uno", "two" => "dos", "three" => "tres" }
    -     and on it goes.
    -  
    -     Now if we wanted to find the corresponding value of the "one" key, we could say
    -     puts numbers["one"]
    -     which would print "uno" to the console.
    -  
    -   - args.state.new_entity: Used when we want to create a new object, like a sprite or button.
    -     In this sample app, new_entity is used to create a new button that clears the grid.
    -     (Remember, you can use state to define ANY property and it will be retained across frames.)
    -  
    -   - args.inputs.mouse.click.point.(x|y): The x and y location of the mouse.
    +  # ./samples/07_advanced_audio/01_audio_mixer/app/main.rb
    +  # these are the properties that you can sent on args.audio
    +  def spawn_new_sound args, name, path
    +    # Spawn randomly in an area that won't be covered by UI.
    +    screenx = (rand * 600.0) + 200.0
    +    screeny = (rand * 400.0) + 100.0
       
    -   - args.inputs.mouse.click.point.created_at: The frame the mouse click occurred in.
    +    id = new_sound_id! args
    +    # you can hang anything on the audio hashes you want, so we store the
    +    #  actual screen position in here for convenience.
    +    args.audio[id] = {
    +      name: name,
    +      input: path,
    +      screenx: screenx,
    +      screeny: screeny,
    +      x: ((screenx / 1279.0) * 2.0) - 1.0,  # scale to -1.0 - 1.0 range
    +      y: ((screeny / 719.0) * 2.0) - 1.0,   # scale to -1.0 - 1.0 range
    +      z: 0.0,
    +      gain: 1.0,
    +      pitch: 1.0,
    +      looping: true,
    +      paused: false
    +    }
       
    -   - args.outputs.labels: An array. The values in the array generate a label.
    -     The parameters are [X, Y, TEXT, SIZE, ALIGN, RED, GREEN, BLUE, ALPHA, FONT STYLE]
    -     For more information about labels, go to mygame/documentation/02-labels.md.
    +    args.state.selected = id
    +  end
       
    -   - ARRAY#inside_rect?: Returns true or false depending on if the point is inside the rect.
    +  # these are values you can change on the ~args.audio~ data structure
    +  def input_panel args
    +    return unless args.state.panel
    +    return if args.state.dragging
       
    -  =end
    +    audio_entry = args.audio[args.state.selected]
    +    results = args.state.panel
       
    -  # This sample app shows an empty grid that the user can paint on.
    -  # To paint, the user must keep their mouse presssed and drag it around the grid.
    -  # The "clear" button allows users to clear the grid so they can start over.
    +    if args.state.mouse_state == :held && args.inputs.mouse.position.inside_rect?(results.pitch_slider_rect.rect)
    +      audio_entry.pitch = 2.0 * ((args.inputs.mouse.x - results.pitch_slider_rect.x).to_f / (results.pitch_slider_rect.w - 1.0))
    +    elsif args.state.mouse_state == :held && args.inputs.mouse.position.inside_rect?(results.playtime_slider_rect.rect)
    +      audio_entry.playtime = audio_entry.length_ * ((args.inputs.mouse.x - results.playtime_slider_rect.x).to_f / (results.playtime_slider_rect.w - 1.0))
    +    elsif args.state.mouse_state == :held && args.inputs.mouse.position.inside_rect?(results.gain_slider_rect.rect)
    +      audio_entry.gain = (args.inputs.mouse.x - results.gain_slider_rect.x).to_f / (results.gain_slider_rect.w - 1.0)
    +    elsif args.inputs.mouse.click && args.inputs.mouse.position.inside_rect?(results.looping_checkbox_rect.rect)
    +      audio_entry.looping = !audio_entry.looping
    +    elsif args.inputs.mouse.click && args.inputs.mouse.position.inside_rect?(results.paused_checkbox_rect.rect)
    +      audio_entry.paused = !audio_entry.paused
    +    elsif args.inputs.mouse.click && args.inputs.mouse.position.inside_rect?(results.delete_button_rect.rect)
    +      args.audio.delete args.state.selected
    +    end
    +  end
       
    -  class PaintApp
    -    attr_accessor :inputs, :state, :outputs, :grid, :args
    +  def render_sources args
    +    args.outputs.primitives << args.audio.keys.map do |k|
    +      s = args.audio[k]
       
    -    # Runs methods necessary for the game to function properly.
    -    def tick
    -      print_title
    -      add_grid
    -      check_click
    -      draw_buttons
    -    end
    +      isselected = (k == args.state.selected)
       
    -    # Prints the title onto the screen by using a label.
    -    # Also separates the title from the grid with a line as a horizontal separator.
    -    def print_title
    -      args.outputs.labels << [ 640, 700, 'Paint!', 0, 1 ]
    -      outputs.lines << horizontal_separator(660, 0, 1280)
    -    end
    +      color = isselected ? [ 0, 255, 0, 255 ] : [ 0, 0, 255, 255 ]
    +      [
    +        [s.screenx, s.screeny, args.state.boxsize, args.state.boxsize, *color].solid,
       
    -    # Sets the starting position, ending position, and color for the horizontal separator.
    -    # The starting and ending positions have the same y values.
    -    def horizontal_separator y, x, x2
    -      [x, y, x2, y, 150, 150, 150]
    +        {
    +          x: s.screenx + args.state.boxsize.half,
    +          y: s.screeny,
    +          text: s.name,
    +          r: 255,
    +          g: 255,
    +          b: 255,
    +          alignment_enum: 1
    +        }.label!
    +      ]
         end
    +  end
       
    -    # Sets the starting position, ending position, and color for the vertical separator.
    -    # The starting and ending positions have the same x values.
    -    def vertical_separator x, y, y2
    -      [x, y, x, y2, 150, 150, 150]
    -    end
    +  def playtime_str t
    +    minutes = (t / 60.0).floor
    +    seconds = t - (minutes * 60.0).to_f
    +    return minutes.to_s + ':' + seconds.floor.to_s + ((seconds - seconds.floor).to_s + "000")[1..3]
    +  end
       
    -    # Outputs a border and a grid containing empty squares onto the screen.
    -    def add_grid
    +  def label_with_drop_shadow x, y, text
    +    [
    +      { x: x + 1, y: y + 1, text: text, vertical_alignment_enum: 1, alignment_enum: 1, r:   0, g:   0, b:   0 }.label!,
    +      { x: x + 2, y: y + 0, text: text, vertical_alignment_enum: 1, alignment_enum: 1, r:   0, g:   0, b:   0 }.label!,
    +      { x: x + 0, y: y + 1, text: text, vertical_alignment_enum: 1, alignment_enum: 1, r: 200, g: 200, b: 200 }.label!
    +    ]
    +  end
       
    -      # Sets the x, y, height, and width of the grid.
    -      # There are 31 horizontal lines and 31 vertical lines in the grid.
    -      # Feel free to count them yourself before continuing!
    -      x, y, h, w = 640 - 500/2, 640 - 500, 500, 500 # calculations done so the grid appears in screen's center
    -      lines_h = 31
    -      lines_v = 31
    +  def check_box opts = {}
    +    checkbox_template = opts.args.layout.rect(w: 0.5, h: 0.5, col: 2)
    +    final_rect = checkbox_template.center_inside_rect_y(opts.args.layout.rect(row: opts.row, col: opts.col))
    +    color = { r:   0, g:   0, b:   0 }
    +    color = { r: 255, g: 255, b: 255 } if opts.checked
       
    -      # Sets values for the grid's border, grid lines, and filled squares.
    -      # The filled_squares variable is initially set to an empty array.
    -      state.grid_border ||= [ x, y, h, w ] # definition of grid's outer border
    -      state.grid_lines ||= draw_grid(x, y, h, w, lines_h, lines_v) # calls draw_grid method
    -      state.filled_squares ||= [] # there are no filled squares until the user fills them in
    +    {
    +      rect: final_rect,
    +      primitives: [
    +        (final_rect.to_solid color)
    +      ]
    +    }
    +  end
       
    -      # Outputs the grid lines, border, and filled squares onto the screen.
    -      outputs.lines.concat state.grid_lines
    -      outputs.borders << state.grid_border
    -      outputs.solids << state.filled_squares
    -    end
    +  def progress_bar opts = {}
    +    outer_rect  = opts.args.layout.rect(row: opts.row, col: opts.col, w: 5, h: 1)
    +    color = opts.percentage * 255
    +    baseline_progress_bar = opts.args
    +                                .layout
    +                                .rect(w: 5, h: 0.5)
       
    -    # Draws the grid by adding in vertical and horizontal separators.
    -    def draw_grid x, y, h, w, lines_h, lines_v
    +    final_rect = baseline_progress_bar.center_inside_rect(outer_rect)
    +    center = final_rect.rect_center_point
       
    -      # The grid starts off empty.
    -      grid = []
    +    {
    +      rect: final_rect,
    +      primitives: [
    +        final_rect.merge(r: color, g: color, b: color, a: 128).solid!,
    +        label_with_drop_shadow(center.x, center.y, opts.text)
    +      ]
    +    }
    +  end
       
    -      # Calculates the placement and adds horizontal lines or separators into the grid.
    -      curr_y = y # start at the bottom of the box
    -      dist_y = h / (lines_h + 1) # finds distance to place horizontal lines evenly throughout 500 height of grid
    -      lines_h.times do
    -        curr_y += dist_y # increment curr_y by the distance between the horizontal lines
    -        grid << horizontal_separator(curr_y, x, x + w - 1) # add a separator into the grid
    -      end
    +  def panel_primitives args, audio_entry
    +    results = { primitives: [] }
       
    -      # Calculates the placement and adds vertical lines or separators into the grid.
    -      curr_x = x # now start at the left of the box
    -      dist_x = w / (lines_v + 1) # finds distance to place vertical lines evenly throughout 500 width of grid
    -      lines_v.times do
    -        curr_x += dist_x # increment curr_x by the distance between the vertical lines
    -        grid << vertical_separator(curr_x, y + 1, y  + h) # add separator
    -      end
    +    return results unless audio_entry
       
    -      # paint_grid uses a hash to assign values to keys.
    -      state.paint_grid ||= {"x" => x, "y" => y, "h" => h, "w" => w, "lines_h" => lines_h,
    -                            "lines_v" => lines_v, "dist_x" => dist_x,
    -                            "dist_y" => dist_y }
    +    # this uses DRGTK's layout apis to layout the controls
    +    # imagine the screen is split into equal cells (24 cells across, 12 cells up and down)
    +    # args.layout.rect returns a hash which we merge values with to create primitives
    +    # using args.layout.rect removes the need for pixel pushing
       
    -      return grid
    -    end
    +    # args.outputs.debug << args.layout.debug_primitives(r: 255, g: 255, b: 255)
       
    -    # Checks if the user is keeping the mouse pressed down and sets the mouse_hold variable accordingly using boolean values.
    -    # If the mouse is up, the user cannot drag the mouse.
    -    def check_click
    -      if inputs.mouse.down #is mouse up or down?
    -        state.mouse_held = true # mouse is being held down
    -      elsif inputs.mouse.up # if mouse is up
    -      state.mouse_held = false # mouse is not being held down or dragged
    -        state.mouse_dragging = false
    -      end
    +    white_color = { r: 255, g: 255, b: 255 }
    +    label_style = white_color.merge(vertical_alignment_enum: 1)
       
    -      if state.mouse_held &&    # mouse needs to be down
    -        !inputs.mouse.click &&     # must not be first click
    -        ((inputs.mouse.previous_click.point.x - inputs.mouse.position.x).abs > 15) # Need to move 15 pixels before "drag"
    -        state.mouse_dragging = true
    -      end
    +    # panel background
    +    results.primitives << args.layout.rect(row: 0, col: 0, w: 7, h: 6, include_col_gutter: true, include_row_gutter: true)
    +                                     .border!(r: 255, g: 255, b: 255)
       
    -      # If the user clicks their mouse inside the grid, the search_lines method is called with a click input type.
    -      if ((inputs.mouse.click) && (inputs.mouse.click.point.inside_rect? state.grid_border))
    -        search_lines(inputs.mouse.click.point, :click)
    +    # title
    +    results.primitives << args.layout.point(row: 0, col: 3.5, row_anchor: 0.5)
    +                                     .merge(label_style)
    +                                     .merge(text:           "Source #{args.state.selected} (#{args.audio[args.state.selected].name})",
    +                                            size_enum:      3,
    +                                            alignment_enum: 1)
       
    -      # If the user drags their mouse inside the grid, the search_lines method is called with a drag input type.
    -      elsif ((state.mouse_dragging) && (inputs.mouse.position.inside_rect? state.grid_border))
    -        search_lines(inputs.mouse.position, :drag)
    -      end
    -    end
    +    # seperator line
    +    results.primitives << args.layout.rect(row: 1, col: 0, w: 7, h: 0)
    +                                     .line!(white_color)
       
    -    # Sets the definition of a grid box and handles user input to fill in or clear grid boxes.
    -    def search_lines (point, input_type)
    -      point.x -= state.paint_grid["x"] # subtracts the value assigned to the "x" key in the paint_grid hash
    -      point.y -= state.paint_grid["y"] # subtracts the value assigned to the "y" key in the paint_grid hash
    +    # screen location
    +    results.primitives << args.layout.point(row: 1.0, col: 0, row_anchor: 0.5)
    +                                     .merge(label_style)
    +                                     .merge(text: "screen:")
       
    -      # Remove code following the .floor and see what happens when you try to fill in grid squares
    -      point.x = (point.x / state.paint_grid["dist_x"]).floor * state.paint_grid["dist_x"]
    -      point.y = (point.y / state.paint_grid["dist_y"]).floor * state.paint_grid["dist_y"]
    +    results.primitives << args.layout.point(row: 1.0, col: 2, row_anchor: 0.5)
    +                                     .merge(label_style)
    +                                     .merge(text: "(#{audio_entry.screenx.to_i}, #{audio_entry.screeny.to_i})")
       
    -      point.x += state.paint_grid["x"]
    -      point.y += state.paint_grid["y"]
    +    # position
    +    results.primitives << args.layout.point(row: 1.5, col: 0, row_anchor: 0.5)
    +                                     .merge(label_style)
    +                                     .merge(text: "position:")
       
    -      # Sets definition of a grid box, meaning its x, y, width, and height.
    -      # Floor is called on the point.x and point.y variables.
    -      # Ceil method is called on values of the distance hash keys, setting the width and height of a box.
    -      grid_box = [ point.x.floor, point.y.floor, state.paint_grid["dist_x"].ceil, state.paint_grid["dist_y"].ceil ]
    +    results.primitives << args.layout.point(row: 1.5, col: 2, row_anchor: 0.5)
    +                                     .merge(label_style)
    +                                     .merge(text: "(#{audio_entry[:x].round(5).to_s[0..6]}, #{audio_entry[:y].round(5).to_s[0..6]})")
       
    -      if input_type == :click # if user clicks their mouse
    -        if state.filled_squares.include? grid_box # if grid box is already filled in
    -          state.filled_squares.delete grid_box # box is cleared and removed from filled_squares
    -        else
    -          state.filled_squares << grid_box # otherwise, box is filled in and added to filled_squares
    -        end
    -      elsif input_type == :drag # if user drags mouse
    -        unless state.filled_squares.include? grid_box # unless the grid box dragged over is already filled in
    -          state.filled_squares << grid_box # the box is filled in and added to filled_squares
    -        end
    -      end
    -    end
    +    results.primitives << args.layout.point(row: 2.0, col: 0, row_anchor: 0.5)
    +                                     .merge(label_style)
    +                                     .merge(text: "pitch:")
       
    -    # Creates and outputs a "Clear" button on the screen using a label and a border.
    -    # If the button is clicked, the filled squares are cleared, making the filled_squares collection empty.
    -    def draw_buttons
    -      x, y, w, h = 390, 50, 240, 50
    -      state.clear_button        ||= state.new_entity(:button_with_fade)
    +    results.pitch_slider_rect = progress_bar(row: 2.0, col: 2,
    +                                             percentage: audio_entry.pitch / 2.0,
    +                                             text: "#{audio_entry.pitch.to_sf}",
    +                                             args: args)
       
    -      # The x and y positions are set to display the label in the center of the button.
    -      # Try changing the first two parameters to simply x, y and see what happens to the text placement!
    -      state.clear_button.label  ||= [x + w.half, y + h.half + 10, "Clear", 0, 1] # placed in center of border
    -      state.clear_button.border ||= [x, y, w, h]
    +    results.primitives << results.pitch_slider_rect.primitives
       
    -      # If the mouse is clicked inside the borders of the clear button,
    -      # the filled_squares collection is emptied and the squares are cleared.
    -      if inputs.mouse.click && inputs.mouse.click.point.inside_rect?(state.clear_button.border)
    -        state.clear_button.clicked_at = inputs.mouse.click.created_at # time (frame) the click occurred
    -        state.filled_squares.clear
    -        inputs.mouse.previous_click = nil
    -      end
    +    results.primitives << args.layout.point(row: 2.5, col: 0, row_anchor: 0.5)
    +                                     .merge(label_style)
    +                                     .merge(text: "playtime:")
       
    -      outputs.labels << state.clear_button.label
    -      outputs.borders << state.clear_button.border
    +    results.playtime_slider_rect = progress_bar(args: args,
    +                                                row:  2.5,
    +                                                col:  2,
    +                                                percentage: audio_entry.playtime / audio_entry.length_,
    +                                                text: "#{playtime_str(audio_entry.playtime)} / #{playtime_str(audio_entry.length_)}")
       
    -      # When the clear button is clicked, the color of the button changes
    -      # and the transparency changes, as well. If you change the time from
    -      # 0.25.seconds to 1.25.seconds or more, the change will last longer.
    -      if state.clear_button.clicked_at
    -        outputs.solids << [x, y, w, h, 0, 180, 80, 255 * state.clear_button.clicked_at.ease(0.25.seconds, :flip)]
    -      end
    -    end
    -  end
    +    results.primitives << results.playtime_slider_rect.primitives
       
    -  $paint_app = PaintApp.new
    +    results.primitives << args.layout.point(row: 3.0, col: 0, row_anchor: 0.5)
    +                                     .merge(label_style)
    +                                     .merge(text: "gain:")
       
    -  def tick args
    -    $paint_app.inputs = args.inputs
    -    $paint_app.state = args.state
    -    $paint_app.grid = args.grid
    -    $paint_app.args = args
    -    $paint_app.outputs = args.outputs
    -    $paint_app.tick
    -    tick_instructions args, "How to create a simple paint app. CLICK and HOLD to draw."
    -  end
    +    results.gain_slider_rect = progress_bar(args: args,
    +                                            row:  3.0,
    +                                            col:  2,
    +                                            percentage: audio_entry.gain,
    +                                            text: "#{audio_entry.gain.to_sf}")
       
    -  def tick_instructions args, text, y = 715
    -    return if args.state.key_event_occurred
    -    if args.inputs.mouse.click ||
    -       args.inputs.keyboard.directional_vector ||
    -       args.inputs.keyboard.key_down.enter ||
    -       args.inputs.keyboard.key_down.escape
    -      args.state.key_event_occurred = true
    -    end
    +    results.primitives << results.gain_slider_rect.primitives
       
    -    args.outputs.debug << [0, y - 50, 1280, 60].solid
    -    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label
    -    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label
    -  end
    -
    -#+end_src
    -
    -*** Mouse - Coordinate Systems - main.rb
    -#+begin_src ruby
    -  # ./samples/05_mouse/04_coordinate_systems/app/main.rb
    -  =begin
       
    -   APIs listing that haven't been encountered in previous sample apps:
    +    results.primitives << args.layout.point(row: 3.5, col: 0, row_anchor: 0.5)
    +                                     .merge(label_style)
    +                                     .merge(text: "looping:")
       
    -   - args.inputs.mouse.click.position: Coordinates of the mouse's position on the screen.
    -     Unlike args.inputs.mouse.click.point, the mouse does not need to be pressed down for
    -     position to know the mouse's coordinates.
    -     For more information about the mouse, go to mygame/documentation/07-mouse.md.
    +    checkbox_template = args.layout.rect(w: 0.5, h: 0.5, col: 2)
       
    -   Reminders:
    +    results.looping_checkbox_rect = check_box(args: args, row: 3.5, col: 2, checked: audio_entry.looping)
    +    results.primitives << results.looping_checkbox_rect.primitives
       
    -   - args.inputs.mouse.click: This property will be set if the mouse was clicked.
    +    results.primitives << args.layout.point(row: 4.0, col: 0, row_anchor: 0.5)
    +                                     .merge(label_style)
    +                                     .merge(text: "paused:")
       
    -   - args.inputs.mouse.click.point.(x|y): The x and y location of the mouse.
    +    checkbox_template = args.layout.rect(w: 0.5, h: 0.5, col: 2)
       
    -   - String interpolation: Uses #{} syntax; everything between the #{ and the } is evaluated
    -     as Ruby code, and the placeholder is replaced with its corresponding value or result.
    +    results.paused_checkbox_rect = check_box(args: args, row: 4.0, col: 2, checked: !audio_entry.paused)
    +    results.primitives << results.paused_checkbox_rect.primitives
       
    -     In this sample app, string interpolation is used to show the current position of the mouse
    -     in a label.
    +    results.delete_button_rect = { rect: args.layout.rect(row: 5, col: 0, w: 7, h: 1) }
       
    -   - args.outputs.labels: An array that generates a label.
    -     The parameters are [X, Y, TEXT, SIZE, ALIGN, RED, GREEN, BLUE, ALPHA, FONT STYLE]
    -     For more information about labels, go to mygame/documentation/02-labels.md.
    +    results.primitives << results.delete_button_rect.to_solid(r: 180)
       
    -   - args.outputs.solids: An array that generates a solid.
    -     The parameters are [X, Y, WIDTH, HEIGHT, RED, GREEN, BLUE, ALPHA]
    -     For more information about solids, go to mygame/documentation/03-solids-and-borders.md.
    +    results.primitives << args.layout.point(row: 5, col: 3.5, row_anchor: 0.5)
    +                                     .merge(label_style)
    +                                     .merge(text: "DELETE", alignment_enum: 1)
       
    -   - args.outputs.lines: An array that generates a line.
    -     The parameters are [X, Y, X2, Y2, RED, GREEN, BLUE, ALPHA]
    -     For more information about lines, go to mygame/documentation/04-lines.md.
    +    return results
    +  end
       
    -  =end
    +  def render_panel args
    +    args.state.panel = nil
    +    audio_entry = args.audio[args.state.selected]
    +    return unless audio_entry
       
    -  # This sample app shows a coordinate system or grid. The user can move their mouse around the screen and the
    -  # coordinates of their position on the screen will be displayed. Users can choose to view one quadrant or
    -  # four quadrants by pressing the button.
    +    mouse_down = (args.state.mouse_held >= 0)
    +    args.state.panel = panel_primitives args, audio_entry
    +    args.outputs.primitives << args.state.panel.primitives
    +  end
    +  
    +  def new_sound_id! args
    +    args.state.sound_id ||= 0
    +    args.state.sound_id  += 1
    +    args.state.sound_id
    +  end
    +  
    +  def render_launcher args
    +    args.outputs.primitives << args.state.spawn_sound_buttons.map(&:primitives)
    +  end
    +  
    +  def render_ui args
    +    render_launcher args
    +    render_panel args
    +  end
       
       def tick args
    +    defaults args
    +    render args
    +    input args
    +  end
       
    -    # The addition and subtraction in the first two parameters of the label and solid
    -    # ensure that the outputs don't overlap each other. Try removing them and see what happens.
    -    pos = args.inputs.mouse.position # stores coordinates of mouse's position
    -    args.outputs.labels << [pos.x + 10, pos.y + 10, "#{pos}"] # outputs label of coordinates
    -    args.outputs.solids << [pos.x -  2, pos.y - 2, 5, 5] # outputs small blackk box placed where mouse is hovering
    +  def input args
    +    if !args.audio[args.state.selected]
    +      args.state.selected = nil
    +      args.state.dragging = nil
    +    end
       
    -    button = [0, 0, 370, 50] # sets definition of toggle button
    -    args.outputs.borders << button # outputs button as border (not filled in)
    -    args.outputs.labels << [10, 35, "click here toggle coordinate system"] # label of button
    -    args.outputs.lines << [    0, -720,    0, 720] # vertical line dividing quadrants
    -    args.outputs.lines << [-1280,    0, 1280,   0] # horizontal line dividing quadrants
    +    # spawn button and node interaction
    +    if args.inputs.mouse.click
    +      spawn_sound_button = args.state.spawn_sound_buttons.find { |b| args.inputs.mouse.inside_rect? b.rect }
       
    -    if args.inputs.mouse.click # if the user clicks the mouse
    -      pos = args.inputs.mouse.click.point # pos's value is point where user clicked (coordinates)
    -      if pos.inside_rect? button # if the click occurred inside the button
    -        if args.grid.name == :bottom_left # if the grid shows bottom left as origin
    -          args.grid.origin_center! # origin will be shown in center
    -        else
    -          args.grid.origin_bottom_left! # otherwise, the view will change to show bottom left as origin
    -        end
    +      audio_click_key, audio_click_value = args.audio.find do |k, v|
    +        args.inputs.mouse.inside_rect? [v.screenx, v.screeny, args.state.boxsize, args.state.boxsize]
    +      end
    +  
    +      if spawn_sound_button
    +        args.state.selected = nil
    +        spawn_new_sound args, spawn_sound_button.name, spawn_sound_button.path
    +      elsif audio_click_key
    +        args.state.selected = audio_click_key
           end
         end
       
    -    tick_instructions args, "Sample app shows the two supported coordinate systems in Game Toolkit."
    +    if args.state.mouse_state == :held && args.state.selected
    +      v = args.audio[args.state.selected]
    +      if args.inputs.mouse.inside_rect? [v.screenx, v.screeny, args.state.boxsize, args.state.boxsize]
    +        args.state.dragging = args.state.selected
    +      end
    +  
    +      if args.state.dragging
    +        s = args.audio[args.state.selected]
    +        # you can hang anything on the audio hashes you want, so we store the
    +        #  actual screen position so it doesn't scale weirdly vs your mouse.
    +        s.screenx = args.inputs.mouse.x - (args.state.boxsize / 2)
    +        s.screeny = args.inputs.mouse.y - (args.state.boxsize / 2)
    +  
    +        s.screeny = 50 if s.screeny < 50
    +        s.screeny = (719 - args.state.boxsize) if s.screeny > (719 - args.state.boxsize)
    +        s.screenx = 0 if s.screenx < 0
    +        s.screenx = (1279 - args.state.boxsize) if s.screenx > (1279 - args.state.boxsize)
    +  
    +        s.x = ((s.screenx / 1279.0) * 2.0) - 1.0  # scale to -1.0 - 1.0 range
    +        s.y = ((s.screeny / 719.0) * 2.0) - 1.0   # scale to -1.0 - 1.0 range
    +      end
    +    elsif args.state.mouse_state == :released
    +      args.state.dragging = nil
    +    end
    +  
    +    input_panel args
       end
       
    -  def tick_instructions args, text, y = 715
    -    return if args.state.key_event_occurred
    -    if args.inputs.mouse.click ||
    -       args.inputs.keyboard.directional_vector ||
    -       args.inputs.keyboard.key_down.enter ||
    -       args.inputs.keyboard.key_down.escape
    -      args.state.key_event_occurred = true
    +  def defaults args
    +    args.state.mouse_state      ||= :released
    +    args.state.dragging_source  ||= false
    +    args.state.selected         ||= 0
    +    args.state.next_sound_index ||= 0
    +    args.state.boxsize          ||= 30
    +    args.state.sound_files      ||= [
    +      { name: :tada,   path: "sounds/tada.wav"   },
    +      { name: :splash, path: "sounds/splash.wav" },
    +      { name: :drum,   path: "sounds/drum.wav"   },
    +      { name: :spring, path: "sounds/spring.wav" },
    +      { name: :music,  path: "sounds/music.ogg"  }
    +    ]
    +  
    +    # generate buttons based off the sound collection above
    +    args.state.spawn_sound_buttons ||= begin
    +      # create a group of buttons
    +      # column centered (using col_offset to calculate the column offset)
    +      # where each item is 2 columns apart
    +      rects = args.layout.rect_group row:   11,
    +                                     col_offset: {
    +                                       count: args.state.sound_files.length,
    +                                       w:     2
    +                                     },
    +                                     dcol:  2,
    +                                     w:     2,
    +                                     h:     1,
    +                                     group: args.state.sound_files
    +  
    +      # now that you have the rects
    +      # construct the metadata for the buttons
    +      rects.map do |rect|
    +        {
    +          rect: rect,
    +          name: rect.name,
    +          path: rect.path,
    +          primitives: [
    +            rect.to_border(r: 255, g: 255, b: 255),
    +            rect.to_label(x: rect.center_x,
    +                          y: rect.center_y,
    +                          text: "#{rect.name}",
    +                          alignment_enum: 1,
    +                          vertical_alignment_enum: 1,
    +                          r: 255, g: 255, b: 255)
    +          ]
    +        }
    +      end
         end
       
    -    args.outputs.debug << [0, y - 50, 1280, 60].solid
    -    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label
    -    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label
    +    if args.inputs.mouse.up
    +      args.state.mouse_state = :released
    +      args.state.dragging_source = false
    +    elsif args.inputs.mouse.down
    +      args.state.mouse_state = :held
    +    end
    +  
    +    args.outputs.background_color = [ 0, 0, 0, 255 ]
    +  end
    +  
    +  def render args
    +    render_ui args
    +    render_sources args
       end
     
     #+end_src
     
    -*** Save Load - Save Load Game - main.rb
    +*** Advanced Audio - Audio Mixer - server_ip_address.txt
     #+begin_src ruby
    -  # ./samples/06_save_load/01_save_load_game/app/main.rb
    -  =begin
    +  # ./samples/07_advanced_audio/01_audio_mixer/app/server_ip_address.txt
    +  192.168.1.65
    +#+end_src
    +
    +*** Advanced Audio - Audio Mixer - Metadata - ios_metadata.txt
    +#+begin_src ruby
    +  # ./samples/07_advanced_audio/01_audio_mixer/metadata/ios_metadata.txt
    +  # ios_metadata.txt is used by the Pro version of DragonRuby Game Toolkit to create iOS apps.
    +  # Information about the Pro version can be found at: http://dragonruby.org/toolkit/game#purchase
       
    -   APIs listing that haven't been encountered in previous sample apps:
    +  # teamid needs to be set to your assigned Team Id which can be found at https://developer.apple.com/account/#/membership/
    +  teamid=
    +  # appid needs to be set to your application identifier which can be found at https://developer.apple.com/account/resources/identifiers/list
    +  appid=
    +  # appname is the name you want to show up underneath the app icon on the device. Keep it under 10 characters.
    +  appname=
    +
    +#+end_src
    +
    +*** Advanced Audio - Sound Synthesis - main.rb
    +#+begin_src ruby
    +  # ./samples/07_advanced_audio/02_sound_synthesis/app/main.rb
    +  begin # region: top level tick methods
    +    def tick args
    +      defaults args
    +      render args
    +      input args
    +      process_audio_queue args
    +    end
       
    -   - Symbol (:): Ruby object with a name and an internal ID. Symbols are useful
    -     because with a given symbol name, you can refer to the same object throughout
    -     a Ruby program.
    +    def defaults args
    +      args.state.sine_waves      ||= {}
    +      args.state.square_waves    ||= {}
    +      args.state.saw_tooth_waves ||= {}
    +      args.state.triangle_waves  ||= {}
    +      args.state.audio_queue     ||= []
    +      args.state.buttons         ||= [
    +        (frequency_buttons args),
    +        (sine_wave_note_buttons args),
    +        (bell_buttons args),
    +        (square_wave_note_buttons args),
    +        (saw_tooth_wave_note_buttons args),
    +        (triangle_wave_note_buttons args),
    +      ].flatten
    +    end
       
    -     In this sample app, we're using symbols for our buttons. We have buttons that
    -     light fires, save, load, etc. Each of these buttons has a distinct symbol like
    -     :light_fire, :save_game, :load_game, etc.
    +    def render args
    +      args.outputs.borders << args.state.buttons.map { |b| b[:border] }
    +      args.outputs.labels  << args.state.buttons.map { |b| b[:label]  }
    +      args.outputs.labels  << args.layout
    +                                .rect(row: 0, col: 11.5)
    +                                .yield_self { |r| r.merge y: r.y + r.h }
    +                                .merge(text: "This is a Pro only feature. Click here to watch the YouTube video if you are on the Standard License.",
    +                                       alignment_enum: 1)
    +    end
       
    -   - to_sym: Returns the symbol corresponding to the given string; creates the symbol
    -     if it does not already exist.
    -     For example,
    -     'car'.to_sym
    -     would return the symbol :car.
       
    -   - last: Returns the last element of an array.
    +    def input args
    +      args.state.buttons.each do |b|
    +        if args.inputs.mouse.click && (args.inputs.mouse.click.inside_rect? b[:rect])
    +          parameter_string = (b.slice :frequency, :note, :octave).map { |k, v| "#{k}: #{v}" }.join ", "
    +          args.gtk.notify! "#{b[:method_to_call]} #{parameter_string}"
    +          send b[:method_to_call], args, b
    +        end
    +      end
       
    -   Reminders:
    +      if args.inputs.mouse.click && (args.inputs.mouse.click.inside_rect? (args.layout.rect(row: 0).yield_self { |r| r.merge y: r.y + r.h.half, h: r.h.half }))
    +        args.gtk.openurl 'https://www.youtube.com/watch?v=zEzovM5jT-k&ab_channel=AmirRajan'
    +      end
    +    end
       
    -   - num1.lesser(num2): finds the lower value of the given options.
    -     For example, in the statement
    -     a = 4.lesser(3)
    -     3 has a lower value than 4, which means that the value of a would be set to 3,
    -     but if the statement had been
    -     a = 4.lesser(5)
    -     4 has a lower value than 5, which means that the value of a would be set to 4.
    +    def process_audio_queue args
    +      to_queue = args.state.audio_queue.find_all { |v| v[:queue_at] <= args.tick_count }
    +      args.state.audio_queue -= to_queue
    +      to_queue.each { |a| args.audio[a[:id]] = a }
       
    -   - num1.fdiv(num2): returns the float division (will have a decimal) of the two given numbers.
    -     For example, 5.fdiv(2) = 2.5 and 5.fdiv(5) = 1.0
    +      args.audio.find_all { |k, v| v[:decay_rate] }
    +        .each     { |k, v| v[:gain] -= v[:decay_rate] }
       
    -   - String interpolation: uses #{} syntax; everything between the #{ and the } is evaluated
    -     as Ruby code, and the placeholder is replaced with its corresponding value or result.
    +      sounds_to_stop = args.audio
    +                         .find_all { |k, v| v[:stop_at] && args.state.tick_count >= v[:stop_at] }
    +                         .map { |k, v| k }
       
    -   - args.outputs.labels: An array. Values generate a label.
    -     Parameters are [X, Y, TEXT, SIZE, ALIGN, RED, GREEN, BLUE, ALPHA, FONT STYLE]
    -     For more information, go to mygame/documentation/02-labels.md.
    +      sounds_to_stop.each { |k| args.audio.delete k }
    +    end
    +  end
       
    -   - ARRAY#inside_rect?: An array with at least two values is considered a point. An array
    -     with at least four values is considered a rect. The inside_rect? function returns true
    -     or false depending on if the point is inside the rect.
    +  begin # region: button definitions, ui layout, callback functions
    +    def button args, opts
    +      button_def = opts.merge rect: (args.layout.rect (opts.merge w: 2, h: 1))
       
    -  =end
    +      button_def[:border] = button_def[:rect].merge r: 0, g: 0, b: 0
       
    -  # This code allows users to perform different tasks, such as saving and loading the game.
    -  # Users also have options to reset the game and light a fire.
    +      label_offset_x = 5
    +      label_offset_y = 30
       
    -  class TextedBasedGame
    +      button_def[:label]  = button_def[:rect].merge text: opts[:text],
    +                                                    size_enum: -2.5,
    +                                                    x: button_def[:rect].x + label_offset_x,
    +                                                    y: button_def[:rect].y + label_offset_y
       
    -    # Contains methods needed for game to run properly.
    -    # Increments tick count by 1 each time it runs (60 times in a single second)
    -    def tick
    -      default
    -      show_intro
    -      state.engine_tick_count += 1
    -      tick_fire
    +      button_def
         end
       
    -    # Sets default values.
    -    # The ||= ensures that a variable's value is only set to the value following the = sign
    -    # if the value has not already been set before. Intialization happens only in the first frame.
    -    def default
    -      state.engine_tick_count ||= 0
    -      state.active_module     ||= :room
    -      state.fire_progress     ||= 0
    -      state.fire_ready_in     ||= 10
    -      state.previous_fire     ||= :dead
    -      state.fire              ||= :dead
    +    def play_sine_wave args, sender
    +      queue_sine_wave args,
    +                      frequency: sender[:frequency],
    +                      duration: 1.seconds,
    +                      fade_out: true
         end
       
    -    def show_intro
    -      return unless state.engine_tick_count == 0 # return unless the game just started
    -      set_story_line "awake." # calls set_story_line method, sets to "awake"
    +    def play_note args, sender
    +      method_to_call = :queue_sine_wave
    +      method_to_call = :queue_square_wave    if sender[:type] == :square
    +      method_to_call = :queue_saw_tooth_wave if sender[:type] == :saw_tooth
    +      method_to_call = :queue_triangle_wave  if sender[:type] == :triangle
    +      method_to_call = :queue_bell           if sender[:type] == :bell
    +  
    +      send method_to_call, args,
    +           frequency: (frequency_for note: sender[:note], octave: sender[:octave]),
    +           duration: 1.seconds,
    +           fade_out: true
         end
       
    -    # Sets story line.
    -    def set_story_line story_line
    -      state.story_line    = story_line # story line set to value of parameter
    -      state.active_module = :alert # active module set to alert
    +    def frequency_buttons args
    +      [
    +        (button args,
    +                row: 4.0, col: 0, text: "300hz",
    +                frequency: 300,
    +                method_to_call: :play_sine_wave),
    +        (button args,
    +                row: 5.0, col: 0, text: "400hz",
    +                frequency: 400,
    +                method_to_call: :play_sine_wave),
    +        (button args,
    +                row: 6.0, col: 0, text: "500hz",
    +                frequency: 500,
    +                method_to_call: :play_sine_wave),
    +      ]
         end
       
    -    # Clears story line.
    -    def clear_storyline
    -      state.active_module = :none # active module set to none
    -      state.story_line = nil # story line is cleared, set to nil (or empty)
    +    def sine_wave_note_buttons args
    +      [
    +        (button args,
    +                row: 1.5, col: 2, text: "Sine C4",
    +                note: :c, octave: 4, type: :sine, method_to_call: :play_note),
    +        (button args,
    +                row: 2.5, col: 2, text: "Sine D4",
    +                note: :d, octave: 4, type: :sine, method_to_call: :play_note),
    +        (button args,
    +                row: 3.5, col: 2, text: "Sine E4",
    +                note: :e, octave: 4, type: :sine, method_to_call: :play_note),
    +        (button args,
    +                row: 4.5, col: 2, text: "Sine F4",
    +                note: :f, octave: 4, type: :sine, method_to_call: :play_note),
    +        (button args,
    +                row: 5.5, col: 2, text: "Sine G4",
    +                note: :g, octave: 4, type: :sine, method_to_call: :play_note),
    +        (button args,
    +                row: 6.5, col: 2, text: "Sine A5",
    +                note: :a, octave: 5, type: :sine, method_to_call: :play_note),
    +        (button args,
    +                row: 7.5, col: 2, text: "Sine B5",
    +                note: :b, octave: 5, type: :sine, method_to_call: :play_note),
    +        (button args,
    +                row: 8.5, col: 2, text: "Sine C5",
    +                note: :c, octave: 5, type: :sine, method_to_call: :play_note),
    +      ]
         end
       
    -    # Determines fire progress (how close the fire is to being ready to light).
    -    def tick_fire
    -      return if state.active_module == :alert # return if active module is alert
    -      state.fire_progress += 1 # increment fire progress
    -      # fire_ready_in is 10. The fire_progress is either the current value or 10, whichever has a lower value.
    -      state.fire_progress = state.fire_progress.lesser(state.fire_ready_in)
    +    def square_wave_note_buttons args
    +      [
    +        (button args,
    +                row: 1.5, col: 6, text: "Square C4",
    +                note: :c, octave: 4, type: :square, method_to_call: :play_note),
    +        (button args,
    +                row: 2.5, col: 6, text: "Square D4",
    +                note: :d, octave: 4, type: :square, method_to_call: :play_note),
    +        (button args,
    +                row: 3.5, col: 6, text: "Square E4",
    +                note: :e, octave: 4, type: :square, method_to_call: :play_note),
    +        (button args,
    +                row: 4.5, col: 6, text: "Square F4",
    +                note: :f, octave: 4, type: :square, method_to_call: :play_note),
    +        (button args,
    +                row: 5.5, col: 6, text: "Square G4",
    +                note: :g, octave: 4, type: :square, method_to_call: :play_note),
    +        (button args,
    +                row: 6.5, col: 6, text: "Square A5",
    +                note: :a, octave: 5, type: :square, method_to_call: :play_note),
    +        (button args,
    +                row: 7.5, col: 6, text: "Square B5",
    +                note: :b, octave: 5, type: :square, method_to_call: :play_note),
    +        (button args,
    +                row: 8.5, col: 6, text: "Square C5",
    +                note: :c, octave: 5, type: :square, method_to_call: :play_note),
    +      ]
    +    end
    +    def saw_tooth_wave_note_buttons args
    +      [
    +        (button args,
    +                row: 1.5, col: 8, text: "Saw C4",
    +                note: :c, octave: 4, type: :saw_tooth, method_to_call: :play_note),
    +        (button args,
    +                row: 2.5, col: 8, text: "Saw D4",
    +                note: :d, octave: 4, type: :saw_tooth, method_to_call: :play_note),
    +        (button args,
    +                row: 3.5, col: 8, text: "Saw E4",
    +                note: :e, octave: 4, type: :saw_tooth, method_to_call: :play_note),
    +        (button args,
    +                row: 4.5, col: 8, text: "Saw F4",
    +                note: :f, octave: 4, type: :saw_tooth, method_to_call: :play_note),
    +        (button args,
    +                row: 5.5, col: 8, text: "Saw G4",
    +                note: :g, octave: 4, type: :saw_tooth, method_to_call: :play_note),
    +        (button args,
    +                row: 6.5, col: 8, text: "Saw A5",
    +                note: :a, octave: 5, type: :saw_tooth, method_to_call: :play_note),
    +        (button args,
    +                row: 7.5, col: 8, text: "Saw B5",
    +                note: :b, octave: 5, type: :saw_tooth, method_to_call: :play_note),
    +        (button args,
    +                row: 8.5, col: 8, text: "Saw C5",
    +                note: :c, octave: 5, type: :saw_tooth, method_to_call: :play_note),
    +      ]
         end
       
    -    # Sets the value of fire (whether it is dead or roaring), and the story line
    -    def light_fire
    -      return unless fire_ready? # returns unless the fire is ready to be lit
    -      state.fire = :roaring # fire is lit, set to roaring
    -      state.fire_progress = 0 # the fire progress returns to 0, since the fire has been lit
    -      if state.fire != state.previous_fire
    -        set_story_line "the fire is #{state.fire}." # the story line is set using string interpolation
    -        state.previous_fire = state.fire
    +    def triangle_wave_note_buttons args
    +      [
    +        (button args,
    +                row: 1.5, col: 10, text: "Triangle C4",
    +                note: :c, octave: 4, type: :triangle, method_to_call: :play_note),
    +        (button args,
    +                row: 2.5, col: 10, text: "Triangle D4",
    +                note: :d, octave: 4, type: :triangle, method_to_call: :play_note),
    +        (button args,
    +                row: 3.5, col: 10, text: "Triangle E4",
    +                note: :e, octave: 4, type: :triangle, method_to_call: :play_note),
    +        (button args,
    +                row: 4.5, col: 10, text: "Triangle F4",
    +                note: :f, octave: 4, type: :triangle, method_to_call: :play_note),
    +        (button args,
    +                row: 5.5, col: 10, text: "Triangle G4",
    +                note: :g, octave: 4, type: :triangle, method_to_call: :play_note),
    +        (button args,
    +                row: 6.5, col: 10, text: "Triangle A5",
    +                note: :a, octave: 5, type: :triangle, method_to_call: :play_note),
    +        (button args,
    +                row: 7.5, col: 10, text: "Triangle B5",
    +                note: :b, octave: 5, type: :triangle, method_to_call: :play_note),
    +        (button args,
    +                row: 8.5, col: 10, text: "Triangle C5",
    +                note: :c, octave: 5, type: :triangle, method_to_call: :play_note),
    +      ]
    +    end
    +  
    +    def bell_buttons args
    +      [
    +        (button args,
    +                row: 1.5, col: 4, text: "Bell C4",
    +                note: :c, octave: 4, type: :bell, method_to_call: :play_note),
    +        (button args,
    +                row: 2.5, col: 4, text: "Bell D4",
    +                note: :d, octave: 4, type: :bell, method_to_call: :play_note),
    +        (button args,
    +                row: 3.5, col: 4, text: "Bell E4",
    +                note: :e, octave: 4, type: :bell, method_to_call: :play_note),
    +        (button args,
    +                row: 4.5, col: 4, text: "Bell F4",
    +                note: :f, octave: 4, type: :bell, method_to_call: :play_note),
    +        (button args,
    +                row: 5.5, col: 4, text: "Bell G4",
    +                note: :g, octave: 4, type: :bell, method_to_call: :play_note),
    +        (button args,
    +                row: 6.5, col: 4, text: "Bell A5",
    +                note: :a, octave: 5, type: :bell, method_to_call: :play_note),
    +        (button args,
    +                row: 7.5, col: 4, text: "Bell B5",
    +                note: :b, octave: 5, type: :bell, method_to_call: :play_note),
    +        (button args,
    +                row: 8.5, col: 4, text: "Bell C5",
    +                note: :c, octave: 5, type: :bell, method_to_call: :play_note),
    +      ]
    +    end
    +  end
    +  
    +  begin # region: wave generation
    +    begin # sine wave
    +      def defaults_sine_wave_for
    +        { frequency: 440, sample_rate: 48000 }
    +      end
    +  
    +      def sine_wave_for opts = {}
    +        opts = defaults_sine_wave_for.merge opts
    +        frequency   = opts[:frequency]
    +        sample_rate = opts[:sample_rate]
    +        period_size = (sample_rate.fdiv frequency).ceil
    +        period_size.map_with_index do |i|
    +          Math::sin((2.0 * Math::PI) / (sample_rate.to_f / frequency.to_f) * i)
    +        end.to_a
    +      end
    +  
    +      def defaults_queue_sine_wave
    +        { frequency: 440, duration: 60, gain: 1.0, fade_out: false, queue_in: 0 }
    +      end
    +  
    +      def queue_sine_wave args, opts = {}
    +        opts        = defaults_queue_sine_wave.merge opts
    +        frequency   = opts[:frequency]
    +        sample_rate = 48000
    +  
    +        sine_wave = sine_wave_for frequency: frequency, sample_rate: sample_rate
    +        args.state.sine_waves[frequency] ||= sine_wave_for frequency: frequency, sample_rate: sample_rate
    +  
    +        proc = lambda do
    +          generate_audio_data args.state.sine_waves[frequency], sample_rate
    +        end
    +  
    +        audio_state = new_audio_state args, opts
    +        audio_state[:input] = [1, sample_rate, proc]
    +        queue_audio args, audio_state: audio_state, wave: sine_wave
           end
         end
       
    -    # Checks if the fire is ready to be lit. Returns a boolean value.
    -    def fire_ready?
    -      # If fire_progress (value between 0 and 10) is equal to fire_ready_in (value of 10),
    -      # the fire is ready to be lit.
    -      state.fire_progress == state.fire_ready_in
    -    end
    +    begin # region: square wave
    +      def defaults_square_wave_for
    +        { frequency: 440, sample_rate: 48000 }
    +      end
       
    -    # Divides the value of the fire_progress variable by 10 to determine how close the user is to
    -    # being able to light a fire.
    -    def light_fire_progress
    -      state.fire_progress.fdiv(10) # float division
    -    end
    +      def square_wave_for opts = {}
    +        opts = defaults_square_wave_for.merge opts
    +        sine_wave = sine_wave_for opts
    +        sine_wave.map do |v|
    +          if v >= 0
    +            1.0
    +          else
    +            -1.0
    +          end
    +        end.to_a
    +      end
       
    -    # Defines fire as the state.fire variable.
    -    def fire
    -      state.fire
    -    end
    +      def defaults_queue_square_wave
    +        { frequency: 440, duration: 60, gain: 0.3, fade_out: false, queue_in: 0 }
    +      end
       
    -    # Sets the title of the room.
    -    def room_title
    -      return "a room that is dark" if state.fire == :dead # room is dark if the fire is dead
    -      return "a room that is lit" # room is lit if the fire is not dead
    -    end
    +      def queue_square_wave args, opts = {}
    +        opts        = defaults_queue_square_wave.merge opts
    +        frequency   = opts[:frequency]
    +        sample_rate = 48000
       
    -    # Sets the active_module to room.
    -    def go_to_room
    -      state.active_module = :room
    -    end
    +        square_wave = square_wave_for frequency: frequency, sample_rate: sample_rate
    +        args.state.square_waves[frequency] ||= square_wave_for frequency: frequency, sample_rate: sample_rate
       
    -    # Defines active_module as the state.active_module variable.
    -    def active_module
    -      state.active_module
    -    end
    +        proc = lambda do
    +          generate_audio_data args.state.square_waves[frequency], sample_rate
    +        end
       
    -    # Defines story_line as the state.story_line variable.
    -    def story_line
    -      state.story_line
    +        audio_state = new_audio_state args, opts
    +        audio_state[:input] = [1, sample_rate, proc]
    +        queue_audio args, audio_state: audio_state, wave: square_wave
    +      end
         end
       
    -    # Update every 60 frames (or every second)
    -    def should_tick?
    -      state.tick_count.mod_zero?(60)
    -    end
    +    begin # region: saw tooth wave
    +      def defaults_saw_tooth_wave_for
    +        { frequency: 440, sample_rate: 48000 }
    +      end
       
    -    # Sets the value of the game state provider.
    -    def initialize game_state_provider
    -      @game_state_provider = game_state_provider
    -    end
    +      def saw_tooth_wave_for opts = {}
    +        opts = defaults_saw_tooth_wave_for.merge opts
    +        sine_wave = sine_wave_for opts
    +        period_size = sine_wave.length
    +        sine_wave.map_with_index do |v, i|
    +          (((i % period_size).fdiv period_size) * 2) - 1
    +        end
    +      end
       
    -    # Defines the game state.
    -    # Any variable prefixed with an @ symbol is an instance variable.
    -    def state
    -      @game_state_provider.state
    -    end
    +      def defaults_queue_saw_tooth_wave
    +        { frequency: 440, duration: 60, gain: 0.3, fade_out: false, queue_in: 0 }
    +      end
       
    -    # Saves the state of the game in a text file called game_state.txt.
    -    def save
    -      $gtk.serialize_state('game_state.txt', state)
    -    end
    +      def queue_saw_tooth_wave args, opts = {}
    +        opts        = defaults_queue_saw_tooth_wave.merge opts
    +        frequency   = opts[:frequency]
    +        sample_rate = 48000
       
    -    # Loads the game state from the game_state.txt text file.
    -    # If the load is unsuccessful, the user is informed since the story line indicates the failure.
    -    def load
    -      parsed_state = $gtk.deserialize_state('game_state.txt')
    -      if !parsed_state
    -        set_story_line "no game to load. press save first."
    -      else
    -        $gtk.args.state = parsed_state
    +        saw_tooth_wave = saw_tooth_wave_for frequency: frequency, sample_rate: sample_rate
    +        args.state.saw_tooth_waves[frequency] ||= saw_tooth_wave_for frequency: frequency, sample_rate: sample_rate
    +  
    +        proc = lambda do
    +          generate_audio_data args.state.saw_tooth_waves[frequency], sample_rate
    +        end
    +  
    +        audio_state = new_audio_state args, opts
    +        audio_state[:input] = [1, sample_rate, proc]
    +        queue_audio args, audio_state: audio_state, wave: saw_tooth_wave
           end
         end
       
    -    # Resets the game.
    -    def reset
    -      $gtk.reset
    -    end
    -  end
    +    begin # region: triangle wave
    +      def defaults_triangle_wave_for
    +        { frequency: 440, sample_rate: 48000 }
    +      end
       
    -  class TextedBasedGamePresenter
    -    attr_accessor :state, :outputs, :inputs
    +      def triangle_wave_for opts = {}
    +        opts = defaults_saw_tooth_wave_for.merge opts
    +        sine_wave = sine_wave_for opts
    +        period_size = sine_wave.length
    +        sine_wave.map_with_index do |v, i|
    +          ratio = (i.fdiv period_size)
    +          if ratio <= 0.5
    +            (ratio * 4) - 1
    +          else
    +            ratio -= 0.5
    +            1 - (ratio * 4)
    +          end
    +        end
    +      end
       
    -    # Creates empty collection called highlights.
    -    # Calls methods necessary to run the game.
    -    def tick
    -      state.layout.highlights ||= []
    -      game.tick if game.should_tick?
    -      render
    -      process_input
    -    end
    +      def defaults_queue_triangle_wave
    +        { frequency: 440, duration: 60, gain: 1.0, fade_out: false, queue_in: 0 }
    +      end
       
    -    # Outputs a label of the tick count (passage of time) and calls all render methods.
    -    def render
    -      outputs.labels << [10, 30, state.tick_count]
    -      render_alert
    -      render_room
    -      render_highlights
    -    end
    +      def queue_triangle_wave args, opts = {}
    +        opts        = defaults_queue_triangle_wave.merge opts
    +        frequency   = opts[:frequency]
    +        sample_rate = 48000
       
    -    # Outputs a label onto the screen that shows the story line, and also outputs a "close" button.
    -    def render_alert
    -      return unless game.active_module == :alert
    +        triangle_wave = triangle_wave_for frequency: frequency, sample_rate: sample_rate
    +        args.state.triangle_waves[frequency] ||= triangle_wave_for frequency: frequency, sample_rate: sample_rate
       
    -      outputs.labels << [640, 480, game.story_line, 5, 1]  # outputs story line label
    -      outputs.primitives << button(:alert_dismiss, 490, 380, "close")  # positions "close" button under story line
    +        proc = lambda do
    +          generate_audio_data args.state.triangle_waves[frequency], sample_rate
    +        end
    +  
    +        audio_state = new_audio_state args, opts
    +        audio_state[:input] = [1, sample_rate, proc]
    +        queue_audio args, audio_state: audio_state, wave: triangle_wave
    +      end
         end
       
    -    def render_room
    -      return unless game.active_module == :room
    -      outputs.labels << [640, 700, game.room_title, 4, 1] # outputs room title label at top of screen
    +    begin # region: bell
    +      def defaults_queue_bell
    +        { frequency: 440, duration: 1.seconds, queue_in: 0 }
    +      end
       
    -      # The parameters for these outputs are (symbol, x, y, text, value/percentage) and each has a y value
    -      # that positions it 60 pixels lower than the previous output.
    +      def queue_bell args, opts = {}
    +        (bell_to_sine_waves (defaults_queue_bell.merge opts)).each { |b| queue_sine_wave args, b }
    +      end
       
    -      # outputs the light_fire_progress bar, uses light_fire_progress for its percentage (which changes bar's appearance)
    -      outputs.primitives << progress_bar(:light_fire, 490, 600, "light fire", game.light_fire_progress)
    -      outputs.primitives << button(       :save_game, 490, 540, "save") # outputs save button
    -      outputs.primitives << button(       :load_game, 490, 480, "load") # outputs load button
    -      outputs.primitives << button(      :reset_game, 490, 420, "reset") # outputs reset button
    -      outputs.labels << [640, 30, "the fire is #{game.fire}", 0, 1] # outputs fire label at bottom of screen
    -    end
    +      def bell_harmonics
    +        [
    +          { frequency_ratio: 0.5, duration_ratio: 1.00 },
    +          { frequency_ratio: 1.0, duration_ratio: 0.80 },
    +          { frequency_ratio: 2.0, duration_ratio: 0.60 },
    +          { frequency_ratio: 3.0, duration_ratio: 0.40 },
    +          { frequency_ratio: 4.2, duration_ratio: 0.25 },
    +          { frequency_ratio: 5.4, duration_ratio: 0.20 },
    +          { frequency_ratio: 6.8, duration_ratio: 0.15 }
    +        ]
    +      end
       
    -    # Outputs a collection of highlights using an array to set their values, and also rejects certain values from the collection.
    -    def render_highlights
    -      state.layout.highlights.each do |h| # for each highlight in the collection
    -          h.lifetime -= 1 # decrease the value of its lifetime
    -        end
    +      def defaults_bell_to_sine_waves
    +        { frequency: 440, duration: 1.seconds, queue_in: 0 }
    +      end
       
    -        outputs.solids << state.layout.highlights.map do |h| # outputs highlights collection
    -          [h.x, h.y, h.w, h.h, h.color, 255 * h.lifetime / h.max_lifetime] # sets definition for each highlight
    -          # transparency changes; divide lifetime by max_lifetime, multiply result by 255
    +      def bell_to_sine_waves opts = {}
    +        opts = defaults_bell_to_sine_waves.merge opts
    +        bell_harmonics.map do |b|
    +          {
    +            frequency: opts[:frequency] * b[:frequency_ratio],
    +            duration:  opts[:duration] * b[:duration_ratio],
    +            queue_in:  opts[:queue_in],
    +            gain:      (1.fdiv bell_harmonics.length),
    +            fade_out:  true
    +          }
             end
    -  
    -        # reject highlights from collection that have no remaining lifetime
    -        state.layout.highlights = state.layout.highlights.reject { |h| h.lifetime <= 0 }
    +      end
         end
       
    -    # Checks whether or not a button was clicked.
    -    # Returns a boolean value.
    -    def process_input
    -      button = button_clicked? # calls button_clicked? method
    -    end
    +    begin # audio entity construction
    +      def generate_audio_data sine_wave, sample_rate
    +        sample_size = (sample_rate.fdiv (1000.fdiv 60)).ceil
    +        copy_count  = (sample_size.fdiv sine_wave.length).ceil
    +        sine_wave * copy_count
    +      end
       
    -    # Returns a boolean value.
    -    # Finds the button that was clicked from the button list and determines what method to call.
    -    # Adds a highlight to the highlights collection.
    -    def button_clicked?
    -      return nil unless click_pos # return nil unless click_pos holds coordinates of mouse click
    -        button = @button_list.find do |k, v| # goes through button_list to find button clicked
    -          click_pos.inside_rect? v[:primitives].last.rect # was the mouse clicked inside the rect of button?
    -        end
    -        return unless button # return unless a button was clicked
    -        method_to_call = "#{button[0]}_clicked".to_sym # sets method_to_call to symbol (like :save_game or :load_game)
    -        if self.respond_to? method_to_call # returns true if self responds to the given method (method actually exists)
    -          border = button[1][:primitives].last # sets border definition using value of last key in button list hash
    +      def defaults_new_audio_state
    +        { frequency: 440, duration: 60, gain: 1.0, fade_out: false, queue_in: 0 }
    +      end
       
    -          # declares each highlight as a new entity, sets properties
    -          state.layout.highlights << state.new_entity(:highlight) do |h|
    -              h.x = border.x
    -              h.y = border.y
    -              h.w = border.w
    -              h.h = border.h
    -              h.max_lifetime = 10
    -              h.lifetime = h.max_lifetime
    -              h.color = [120, 120, 180] # sets color to shade of purple
    -            end
    +      def new_audio_state args, opts = {}
    +        opts        = defaults_new_audio_state.merge opts
    +        decay_rate  = 0
    +        decay_rate  = 1.fdiv(opts[:duration]) * opts[:gain] if opts[:fade_out]
    +        frequency   = opts[:frequency]
    +        sample_rate = 48000
       
    -            self.send method_to_call # invoke method identified by symbol
    -          else # otherwise, if self doesn't respond to given method
    -            border = button[1][:primitives].last # sets border definition using value of last key in hash
    +        {
    +          id:               (new_id! args),
    +          frequency:        frequency,
    +          sample_rate:      48000,
    +          stop_at:          args.tick_count + opts[:queue_in] + opts[:duration],
    +          gain:             opts[:gain].to_f,
    +          queue_at:         args.state.tick_count + opts[:queue_in],
    +          decay_rate:       decay_rate,
    +          pitch:            1.0,
    +          looping:          true,
    +          paused:           false
    +        }
    +      end
       
    -            # declares each highlight as a new entity, sets properties
    -            state.layout.highlights << state.new_entity(:highlight) do |h|
    -              h.x = border.x
    -              h.y = border.y
    -              h.w = border.w
    -              h.h = border.h
    -              h.max_lifetime = 4 # different max_lifetime than the one set if respond_to? had been true
    -              h.lifetime = h.max_lifetime
    -              h.color = [120, 80, 80] # sets color to dark color
    -            end
    +      def queue_audio args, opts = {}
    +        graph_wave args, opts[:wave], opts[:audio_state][:frequency]
    +        args.state.audio_queue << opts[:audio_state]
    +      end
       
    -            # instructions for users on how to add the missing method_to_call to the code
    -            puts "It looks like #{method_to_call} doesn't exists on TextedBasedGamePresenter. Please add this method:"
    -            puts "Just copy the code below and put it in the #{TextedBasedGamePresenter} class definition."
    -            puts ""
    -            puts "```"
    -            puts "class TextedBasedGamePresenter <--- find this class and put the method below in it"
    -            puts ""
    -            puts "  def #{method_to_call}"
    -            puts "    puts 'Yay that worked!'"
    -            puts "  end"
    -            puts ""
    -            puts "end <-- make sure to put the #{method_to_call} method in between the `class` word and the final `end` statement."
    -            puts "```"
    -            puts ""
    -        end
    -    end
    +      def new_id! args
    +        args.state.audio_id ||= 0
    +        args.state.audio_id  += 1
    +      end
       
    -    # Returns the position of the mouse when it is clicked.
    -    def click_pos
    -      return nil unless inputs.mouse.click # returns nil unless the mouse was clicked
    -      return inputs.mouse.click.point # returns location of mouse click (coordinates)
    -    end
    +      def graph_wave args, wave, frequency
    +        if args.state.tick_count != args.state.graphed_at
    +          args.outputs.static_lines.clear
    +          args.outputs.static_sprites.clear
    +        end
       
    -    # Creates buttons for the button_list and sets their values using a hash (uses symbols as keys)
    -    def button id, x, y, text
    -      @button_list[id] ||= { # assigns values to hash keys
    -        id: id,
    -        text: text,
    -        primitives: [
    -          [x + 10, y + 30, text, 2, 0].label, # positions label inside border
    -          [x, y, 300, 50].border,             # sets definition of border
    -        ]
    -      }
    +        wave = wave
       
    -      @button_list[id][:primitives] # returns label and border for buttons
    -    end
    +        r, g, b = frequency.to_i % 85,
    +                  frequency.to_i % 170,
    +                  frequency.to_i % 255
       
    -    # Creates a progress bar (used for lighting the fire) and sets its values.
    -    def progress_bar id, x, y, text, percentage
    -      @button_list[id] = { # assigns values to hash keys
    -        id: id,
    -        text: text,
    -        primitives: [
    -          [x, y, 300, 50, 100, 100, 100].solid, # sets definition for solid (which fills the bar with gray)
    -          [x + 10, y + 30, text, 2, 0].label, # sets definition for label, positions inside border
    -          [x, y, 300, 50].border, # sets definition of border
    -        ]
    -      }
    +        starting_rect = args.layout.rect(row: 5, col: 13)
    +        x_scale    = 10
    +        y_scale    = 100
    +        max_points = 25
       
    -      # Fills progress bar based on percentage. If the fire was ready to be lit (100%) and we multiplied by
    -      # 100, only 1/3 of the bar would only be filled in. 200 would cause only 2/3 to be filled in.
    -      @button_list[id][:primitives][0][2] = 300 * percentage
    -      @button_list[id][:primitives]
    -    end
    +        points = wave
    +        if wave.length > max_points
    +          resolution = wave.length.idiv max_points
    +          points = wave.find_all.with_index { |y, i| (i % resolution == 0) }
    +        end
       
    -    # Defines the game.
    -    def game
    -      @game
    -    end
    +        args.outputs.static_lines << points.map_with_index do |y, x|
    +          next_y = points[x + 1]
       
    -    # Initalizes the game and creates an empty list of buttons.
    -    def initialize
    -      @game = TextedBasedGame.new self
    -      @button_list ||= {}
    -    end
    +          if next_y
    +            {
    +              x:  starting_rect.x + (x * x_scale),
    +              y:  starting_rect.y + starting_rect.h.half + y_scale * y,
    +              x2: starting_rect.x + ((x + 1) * x_scale),
    +              y2: starting_rect.y + starting_rect.h.half + y_scale * next_y,
    +              r:  r,
    +              g:  g,
    +              b:  b
    +            }
    +          end
    +        end
       
    -    # Clears the storyline and takes the user to the room.
    -    def alert_dismiss_clicked
    -      game.clear_storyline
    -      game.go_to_room
    -    end
    +        args.outputs.static_sprites << points.map_with_index do |y, x|
    +          {
    +            x:  (starting_rect.x + (x * x_scale)) - 2,
    +            y:  (starting_rect.y + starting_rect.h.half + y_scale * y) - 2,
    +            w:  4,
    +            h:  4,
    +            path: 'sprites/square-white.png',
    +            r: r,
    +            g: g,
    +            b: b
    +          }
    +        end
       
    -    # Lights the fire when the user clicks the "light fire" option.
    -    def light_fire_clicked
    -      game.light_fire
    +        args.state.graphed_at = args.state.tick_count
    +      end
         end
       
    -    # Saves the game when the user clicks the "save" option.
    -    def save_game_clicked
    -      game.save
    -    end
    +    begin # region: musical note mapping
    +      def defaults_frequency_for
    +        { note: :a, octave: 5, sharp:  false, flat:   false }
    +      end
       
    -    # Resets the game when the user clicks the "reset" option.
    -    def reset_game_clicked
    -      game.reset
    -    end
    +      def frequency_for opts = {}
    +        opts = defaults_frequency_for.merge opts
    +        octave_offset_multiplier  = opts[:octave] - 5
    +        note = note_frequencies_octave_5[opts[:note]]
    +        if octave_offset_multiplier < 0
    +          note = note * 1 / (octave_offset_multiplier.abs + 1)
    +        elsif octave_offset_multiplier > 0
    +          note = note * (octave_offset_multiplier.abs + 1) / 1
    +        end
    +        note
    +      end
       
    -    # Loads the game when the user clicks the "load" option.
    -    def load_game_clicked
    -      game.load
    +      def note_frequencies_octave_5
    +        {
    +          a: 440.0,
    +          a_sharp: 466.16, b_flat: 466.16,
    +          b: 493.88,
    +          c: 523.25,
    +          c_sharp: 554.37, d_flat: 587.33,
    +          d: 587.33,
    +          d_sharp: 622.25, e_flat: 659.25,
    +          e: 659.25,
    +          f: 698.25,
    +          f_sharp: 739.99, g_flat: 739.99,
    +          g: 783.99,
    +          g_sharp: 830.61, a_flat: 830.61
    +        }
    +      end
         end
       end
       
    -  $text_based_rpg = TextedBasedGamePresenter.new
    -  
    -  def tick args
    -    $text_based_rpg.state = args.state
    -    $text_based_rpg.outputs = args.outputs
    -    $text_based_rpg.inputs = args.inputs
    -    $text_based_rpg.tick
    -  end
    +  $gtk.reset
     
     #+end_src
     
    @@ -12602,7 +12985,7 @@ Follows is a source code listing for all files that have been open sourced. This
           flip_horizontally: false,
           angle_anchor_x: 0.5,            # rotation center set to middle
           angle_anchor_y: 0.5
    -    }.sprite
    +    }.sprite!
       
         # Outputs label as primitive using a hash
         args.outputs.primitives << {
    @@ -12616,7 +12999,7 @@ Follows is a source code listing for all files that have been open sourced. This
           b:         50,
           a:         255,                 # transparency
           font:      "fonts/manaspc.ttf"  # font style
    -    }.label
    +    }.label!
       
         # Outputs solid as primitive using a hash
         args.outputs.primitives << {
    @@ -12628,7 +13011,7 @@ Follows is a source code listing for all files that have been open sourced. This
           g:  50,
           b:  50,
           a: 255                          # transparency
    -    }.solid
    +    }.solid!
       
         # Outputs border as primitive using a hash
         # Same parameters as solid
    @@ -12641,7 +13024,7 @@ Follows is a source code listing for all files that have been open sourced. This
           g:  50,
           b:  50,
           a: 255                          # transparency
    -    }.border
    +    }.border!
       
         # Outputs line as primitive using a hash
         args.outputs.primitives << {
    @@ -12653,7 +13036,7 @@ Follows is a source code listing for all files that have been open sourced. This
           g:   50,
           b:   50,
           a:  255                         # transparency
    -    }.line
    +    }.line!
       end
     
     #+end_src
    @@ -12705,9 +13088,108 @@ Follows is a source code listing for all files that have been open sourced. This
     
     #+end_src
     
    +*** Advanced Rendering - Simple Camera - main.rb
    +#+begin_src ruby
    +  # ./samples/07_advanced_rendering/07_simple_camera/app/main.rb
    +  def tick args
    +    # variables you can play around with
    +    args.state.world.w      ||= 1280
    +    args.state.world.h      ||= 720
    +  
    +    args.state.player.x     ||= 0
    +    args.state.player.y     ||= 0
    +    args.state.player.size  ||= 32
    +  
    +    args.state.enemy.x      ||= 700
    +    args.state.enemy.y      ||= 700
    +    args.state.enemy.size   ||= 16
    +  
    +    args.state.camera.x                ||= 640
    +    args.state.camera.y                ||= 300
    +    args.state.camera.scale            ||= 1.0
    +    args.state.camera.show_empty_space ||= :yes
    +  
    +    # instructions
    +    args.outputs.primitives << { x: 0, y:  80.from_top, w: 360, h: 80, r: 0, g: 0, b: 0, a: 128 }.solid!
    +    args.outputs.primitives << { x: 10, y: 10.from_top, text: "arrow keys to move around", r: 255, g: 255, b: 255}.label!
    +    args.outputs.primitives << { x: 10, y: 30.from_top, text: "+/- to change zoom of camera", r: 255, g: 255, b: 255}.label!
    +    args.outputs.primitives << { x: 10, y: 50.from_top, text: "tab to change camera edge behavior", r: 255, g: 255, b: 255}.label!
    +  
    +    # render scene
    +    args.outputs[:scene].w = args.state.world.w
    +    args.outputs[:scene].h = args.state.world.h
    +  
    +    args.outputs[:scene].solids << { x: 0, y: 0, w: args.state.world.w, h: args.state.world.h, r: 20, g: 60, b: 80 }
    +    args.outputs[:scene].solids << { x: args.state.player.x, y: args.state.player.y,
    +                                     w: args.state.player.size, h: args.state.player.size, r: 80, g: 155, b: 80 }
    +    args.outputs[:scene].solids << { x: args.state.enemy.x, y: args.state.enemy.y,
    +                                     w: args.state.enemy.size, h: args.state.enemy.size, r: 155, g: 80, b: 80 }
    +  
    +    # render camera
    +    scene_position = calc_scene_position args
    +    args.outputs.sprites << { x: scene_position.x,
    +                              y: scene_position.y,
    +                              w: scene_position.w,
    +                              h: scene_position.h,
    +                              path: :scene }
    +  
    +    # move player
    +    if args.inputs.directional_angle
    +      args.state.player.x += args.inputs.directional_angle.vector_x * 5
    +      args.state.player.y += args.inputs.directional_angle.vector_y * 5
    +      args.state.player.x  = args.state.player.x.clamp(0, args.state.world.w - args.state.player.size)
    +      args.state.player.y  = args.state.player.y.clamp(0, args.state.world.h - args.state.player.size)
    +    end
    +  
    +    # +/- to zoom in and out
    +    if args.inputs.keyboard.plus && args.state.tick_count.zmod?(3)
    +      args.state.camera.scale += 0.05
    +    elsif args.inputs.keyboard.hyphen && args.state.tick_count.zmod?(3)
    +      args.state.camera.scale -= 0.05
    +    elsif args.inputs.keyboard.key_down.tab
    +      if args.state.camera.show_empty_space == :yes
    +        args.state.camera.show_empty_space = :no
    +      else
    +        args.state.camera.show_empty_space = :yes
    +      end
    +    end
    +  
    +    args.state.camera.scale = args.state.camera.scale.greater(0.1)
    +  end
    +  
    +  def calc_scene_position args
    +    result = { x: args.state.camera.x - (args.state.player.x * args.state.camera.scale),
    +               y: args.state.camera.y - (args.state.player.y * args.state.camera.scale),
    +               w: args.state.world.w * args.state.camera.scale,
    +               h: args.state.world.h * args.state.camera.scale,
    +               scale: args.state.camera.scale }
    +  
    +    return result if args.state.camera.show_empty_space == :yes
    +  
    +    if result.w < args.grid.w
    +      result.merge!(x: (args.grid.w - result.w).half)
    +    elsif (args.state.player.x * result.scale) < args.grid.w.half
    +      result.merge!(x: 10)
    +    elsif (result.x + result.w) < args.grid.w
    +      result.merge!(x: - result.w + (args.grid.w - 10))
    +    end
    +  
    +    if result.h < args.grid.h
    +      result.merge!(y: (args.grid.h - result.h).half)
    +    elsif (result.y) > 10
    +      result.merge!(y: 10)
    +    elsif (result.y + result.h) < args.grid.h
    +      result.merge!(y: - result.h + (args.grid.h - 10))
    +    end
    +  
    +    result
    +  end
    +
    +#+end_src
    +
     *** Advanced Rendering - Splitscreen Camera - main.rb
     #+begin_src ruby
    -  # ./samples/07_advanced_rendering/07_splitscreen_camera/app/main.rb
    +  # ./samples/07_advanced_rendering/08_splitscreen_camera/app/main.rb
       class CameraMovement
         attr_accessor :state, :inputs, :outputs, :grid
       
    @@ -13108,7 +13590,7 @@ Follows is a source code listing for all files that have been open sourced. This
     
     *** Advanced Rendering - Z Targeting Camera - main.rb
     #+begin_src ruby
    -  # ./samples/07_advanced_rendering/08_z_targeting_camera/app/main.rb
    +  # ./samples/07_advanced_rendering/09_z_targeting_camera/app/main.rb
       class Game
         attr_gtk
       
    @@ -13218,6 +13700,61 @@ Follows is a source code listing for all files that have been open sourced. This
     
     #+end_src
     
    +*** Advanced Rendering - Blend Modes - main.rb
    +#+begin_src ruby
    +  # ./samples/07_advanced_rendering/10_blend_modes/app/main.rb
    +  $gtk.reset
    +  
    +  def draw_blendmode args, mode
    +    w = 160
    +    h = w
    +    args.state.x += (1280-w) / (args.state.blendmodes.length + 1)
    +    x = args.state.x
    +    y = (720 - h) / 2
    +    s = 'sprites/blue-feathered.png'
    +    args.outputs.sprites << { blendmode_enum: mode.value, x: x, y: y, w: w, h: h, path: s }
    +    args.outputs.labels << [x + (w/2), y, mode.name.to_s, 1, 1, 255, 255, 255]
    +  end
    +  
    +  def tick args
    +  
    +    # Different blend modes do different things, depending on what they
    +    # blend against (in this case, the pixels of the background color).
    +    args.state.bg_element ||= 1
    +    args.state.bg_color ||= 255
    +    args.state.bg_color_direction ||= 1
    +    bg_r = (args.state.bg_element == 1) ? args.state.bg_color : 0
    +    bg_g = (args.state.bg_element == 2) ? args.state.bg_color : 0
    +    bg_b = (args.state.bg_element == 3) ? args.state.bg_color : 0
    +    args.state.bg_color += args.state.bg_color_direction
    +    if (args.state.bg_color_direction > 0) && (args.state.bg_color >= 255)
    +      args.state.bg_color_direction = -1
    +      args.state.bg_color = 255
    +    elsif (args.state.bg_color_direction < 0) && (args.state.bg_color <= 0)
    +      args.state.bg_color_direction = 1
    +      args.state.bg_color = 0
    +      args.state.bg_element += 1
    +      if args.state.bg_element >= 4
    +        args.state.bg_element = 1
    +      end
    +    end
    +  
    +    args.outputs.background_color = [ bg_r, bg_g, bg_b, 255 ]
    +  
    +    args.state.blendmodes ||= [
    +      { name: :none,  value: 0 },
    +      { name: :blend, value: 1 },
    +      { name: :add,   value: 2 },
    +      { name: :mod,   value: 3 },
    +      { name: :mul,   value: 4 }
    +    ]
    +  
    +    args.state.x = 0  # reset this, draw_blendmode will increment it.
    +    args.state.blendmodes.each { |blendmode| draw_blendmode args, blendmode }
    +  end
    +
    +#+end_src
    +
     *** Tweening Lerping Easing Functions - Easing Functions - main.rb
     #+begin_src ruby
       # ./samples/08_tweening_lerping_easing_functions/01_easing_functions/app/main.rb
    @@ -13710,7 +14247,11 @@ Follows is a source code listing for all files that have been open sourced. This
       
         # sets console command when sample app initially opens
         if Kernel.global_tick_count == 0
    -      puts "* INFO - Please specify the number of sprites to render."
    +      puts ""
    +      puts ""
    +      puts "========================================================="
    +      puts "* INFO: Sprites, Hashes"
    +      puts "* INFO: Please specify the number of sprites to render."
           args.gtk.console.set_command "reset_with count: 100"
         end
       
    @@ -13780,7 +14321,11 @@ Follows is a source code listing for all files that have been open sourced. This
       
         # sets console command when sample app initially opens
         if Kernel.global_tick_count == 0
    -      puts "* INFO - Please specify the number of sprites to render."
    +      puts ""
    +      puts ""
    +      puts "========================================================="
    +      puts "* INFO: Sprites, Open Entities"
    +      puts "* INFO: Please specify the number of sprites to render."
           args.gtk.console.set_command "reset_with count: 100"
         end
       
    @@ -13854,7 +14399,11 @@ Follows is a source code listing for all files that have been open sourced. This
       
         # sets console command when sample app initially opens
         if Kernel.global_tick_count == 0
    -      puts "* INFO - Please specify the number of sprites to render."
    +      puts ""
    +      puts ""
    +      puts "========================================================="
    +      puts "* INFO: Sprites, Strict Entities"
    +      puts "* INFO: Please specify the number of sprites to render."
           args.gtk.console.set_command "reset_with count: 100"
         end
       
    @@ -13911,6 +14460,11 @@ Follows is a source code listing for all files that have been open sourced. This
       def tick args
         # sets console command when sample app initially opens
         if Kernel.global_tick_count == 0
    +      puts ""
    +      puts ""
    +      puts "========================================================="
    +      puts "* INFO: Sprites, Classes"
    +      puts "* INFO: Please specify the number of sprites to render."
           args.gtk.console.set_command "reset_with count: 100"
         end
       
    @@ -13968,19 +14522,24 @@ Follows is a source code listing for all files that have been open sourced. This
       def tick args
         # sets console command when sample app initially opens
         if Kernel.global_tick_count == 0
    +      puts ""
    +      puts ""
    +      puts "========================================================="
    +      puts "* INFO: Static Sprites, Classes"
    +      puts "* INFO: Please specify the number of sprites to render."
           args.gtk.console.set_command "reset_with count: 100"
         end
       
         # init
         if args.state.tick_count == 0
           args.state.stars = args.state.star_count.map { |i| Star.new args.grid }
    +      args.outputs.static_sprites << args.state.stars
         end
       
         # update
         args.state.stars.each(&:move)
       
         # render
    -    args.outputs.sprites << args.state.stars
         args.outputs.background_color = [0, 0, 0]
         args.outputs.primitives << args.gtk.current_framerate_primitives
       end
    @@ -14038,10 +14597,21 @@ Follows is a source code listing for all files that have been open sourced. This
           # path,
           # angle,
           # alpha, red_saturation, green_saturation, blue_saturation
    +      # tile_x, tile_y, tile_w, tile_h,
           # flip_horizontally, flip_vertically,
    -      # tile_x, tile_y, tile_w, tile_h
           # angle_anchor_x, angle_anchor_y,
           # source_x, source_y, source_w, source_h
    +  
    +      # The argument order for ffi_draw.draw_sprite_4 is:
    +      # x, y, w, h,
    +      # path,
    +      # angle,
    +      # alpha, red_saturation, green_saturation, blue_saturation
    +      # tile_x, tile_y, tile_w, tile_h,
    +      # flip_horizontally, flip_vertically,
    +      # angle_anchor_x, angle_anchor_y,
    +      # source_x, source_y, source_w, source_h,
    +      # blendmode_enum
         end
       end
       
    @@ -14049,6 +14619,11 @@ Follows is a source code listing for all files that have been open sourced. This
       def tick args
         # sets console command when sample app initially opens
         if Kernel.global_tick_count == 0
    +      puts ""
    +      puts ""
    +      puts "========================================================="
    +      puts "* INFO: Static Sprites, Classes, Draw Override"
    +      puts "* INFO: Please specify the number of sprites to render."
           args.gtk.console.set_command "reset_with count: 100"
         end
       
    @@ -14219,6 +14794,55 @@ Follows is a source code listing for all files that have been open sourced. This
     
     #+end_src
     
    +*** Advanced Debugging - Unit Tests - benchmark_api_tests.rb
    +#+begin_src ruby
    +  # ./samples/10_advanced_debugging/03_unit_tests/benchmark_api_tests.rb
    +  def test_benchmark_api args, assert
    +    result = args.gtk.benchmark iterations: 100,
    +                                only_one: -> () {
    +                                  r = 0
    +                                  (1..100).each do |i|
    +                                    r += 1
    +                                  end
    +                                }
    +  
    +    assert.equal! result.first_place.name, :only_one
    +  
    +    result = args.gtk.benchmark iterations: 100,
    +                                iterations_100: -> () {
    +                                  r = 0
    +                                  (1..100).each do |i|
    +                                    r += 1
    +                                  end
    +                                },
    +                                iterations_50: -> () {
    +                                  r = 0
    +                                  (1..50).each do |i|
    +                                    r += 1
    +                                  end
    +                                }
    +  
    +    assert.equal! result.first_place.name, :iterations_50
    +  
    +    result = args.gtk.benchmark iterations: 1,
    +                                iterations_100: -> () {
    +                                  r = 0
    +                                  (1..100).each do |i|
    +                                    r += 1
    +                                  end
    +                                },
    +                                iterations_50: -> () {
    +                                  r = 0
    +                                  (1..50).each do |i|
    +                                    r += 1
    +                                  end
    +                                }
    +  
    +    assert.equal! result.too_small_to_measure, true
    +  end
    +
    +#+end_src
    +
     *** Advanced Debugging - Unit Tests - exception_raising_tests.rb
     #+begin_src ruby
       # ./samples/10_advanced_debugging/03_unit_tests/exception_raising_tests.rb
    @@ -14739,6 +15363,142 @@ Follows is a source code listing for all files that have been open sourced. This
     
     #+end_src
     
    +*** Advanced Debugging - Unit Tests - pretty_format_tests.rb
    +#+begin_src ruby
    +  # ./samples/10_advanced_debugging/03_unit_tests/pretty_format_tests.rb
    +  def H opts
    +    opts
    +  end
    +  
    +  def A *opts
    +    opts
    +  end
    +  
    +  def assert_format args, assert, hash, expected
    +    actual = args.fn.pretty_format hash
    +    assert.are_equal! actual, expected
    +  end
    +  
    +  def test_pretty_print args, assert
    +    # =============================
    +    # hash with single value
    +    # =============================
    +    input = (H first_name: "John")
    +    expected = <<-S
    +  {:first_name "John"}
    +  S
    +    (assert_format args, assert, input, expected)
    +  
    +    # =============================
    +    # hash with two values
    +    # =============================
    +    input = (H first_name: "John", last_name: "Smith")
    +    expected = <<-S
    +  {:first_name "John"
    +   :last_name "Smith"}
    +  S
    +  
    +    (assert_format args, assert, input, expected)
    +  
    +    # =============================
    +    # hash with inner hash
    +    # =============================
    +    input = (H first_name: "John",
    +               last_name: "Smith",
    +               middle_initial: "I",
    +               so: (H first_name: "Pocahontas",
    +                      last_name: "Tsenacommacah"),
    +               friends: (A (H first_name: "Side", last_name: "Kick"),
    +                           (H first_name: "Tim", last_name: "Wizard")))
    +    expected = <<-S
    +  {:first_name "John"
    +   :last_name "Smith"
    +   :middle_initial "I"
    +   :so {:first_name "Pocahontas"
    +        :last_name "Tsenacommacah"}
    +   :friends [{:first_name "Side"
    +              :last_name "Kick"}
    +             {:first_name "Tim"
    +              :last_name "Wizard"}]}
    +  S
    +  
    +    (assert_format args, assert, input, expected)
    +  
    +    # =============================
    +    # array with one value
    +    # =============================
    +    input = (A 1)
    +    expected = <<-S
    +  [1]
    +  S
    +    (assert_format args, assert, input, expected)
    +  
    +    # =============================
    +    # array with multiple values
    +    # =============================
    +    input = (A 1, 2, 3)
    +    expected = <<-S
    +  [1
    +   2
    +   3]
    +  S
    +    (assert_format args, assert, input, expected)
    +  
    +    # =============================
    +    # array with multiple values hashes
    +    # =============================
    +    input = (A (H first_name: "Side", last_name: "Kick"),
    +               (H first_name: "Tim", last_name: "Wizard"))
    +    expected = <<-S
    +  [{:first_name "Side"
    +    :last_name "Kick"}
    +   {:first_name "Tim"
    +    :last_name "Wizard"}]
    +  S
    +  
    +    (assert_format args, assert, input, expected)
    +  end
    +  
    +  def test_nested_nested args, assert
    +    # =============================
    +    # nested array in nested hash
    +    # =============================
    +    input = (H type: :root,
    +               text: "Root",
    +               children: (A (H level: 1,
    +                               text: "Level 1",
    +                               children: (A (H level: 2,
    +                                               text: "Level 2",
    +                                               children: [])))))
    +  
    +    expected = <<-S
    +  {:type :root
    +   :text "Root"
    +   :children [{:level 1
    +               :text "Level 1"
    +               :children [{:level 2
    +                           :text "Level 2"
    +                           :children []}]}]}
    +  
    +  S
    +  
    +    (assert_format args, assert, input, expected)
    +  end
    +  
    +  def test_scene args, assert
    +    script = <<-S
    +  * Scene 1
    +  ** Narrator
    +  They say happy endings don't exist.
    +  ** Narrator
    +  They say true love is a lie.
    +  S
    +    input = parse_org args, script
    +    puts (args.fn.pretty_format input)
    +  end
    +
    +#+end_src
    +
     *** Advanced Debugging - Unit Tests - require_tests.rb
     #+begin_src ruby
       # ./samples/10_advanced_debugging/03_unit_tests/require_tests.rb
    @@ -18624,13 +19384,13 @@ Follows is a source code listing for all files that have been open sourced. This
       
         def tick
           defaults
    -      render 
    -      input  
    +      render
    +      input
           # If animation is playing, and max steps have not been reached
           # Move the search a step forward
           if state.play && state.current_step < state.max_steps
             # Variable that tells the program what step to recalculate up to
    -        state.current_step += 1 
    +        state.current_step += 1
             move_searches_one_step_forward
           end
         end
    @@ -18652,7 +19412,7 @@ Follows is a source code listing for all files that have been open sourced. This
           # 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.user_input ||= :none 
    +      state.user_input ||= :none
       
           # These variables allow the breadth first search to take place
           # Came_from is a hash with a key of a cell and a value of the cell that was expanded from to find the key.
    @@ -18677,7 +19437,7 @@ Follows is a source code listing for all files that have been open sourced. This
           # Unless the current step has a value
           unless state.current_step
             # Set the current step to 10
    -        state.current_step = 10 
    +        state.current_step = 10
             # And calculate the searches up to step 10
             recalculate_searches
           end
    @@ -18687,7 +19447,7 @@ Follows is a source code listing for all files that have been open sourced. This
           # This step is roughly the grid's width * height
           # When anim_steps equals max_steps no more calculations will occur
           # and the slider will be at the end
    -      state.max_steps = grid.width * grid.height 
    +      state.max_steps = grid.width * grid.height
       
           # Whether the animation should play or not
           # If true, every tick moves anim_steps forward one
    @@ -18780,7 +19540,7 @@ Follows is a source code listing for all files that have been open sourced. This
           # If the mouse was clicked this tick
           if inputs.mouse.down
             # Determine what the user is editing and appropriately edit the state.user_input variable
    -        determine_input          
    +        determine_input
           end
       
           # Process user input based on user_input variable and current mouse position
    @@ -18793,35 +19553,35 @@ Follows is a source code listing for all files that have been open sourced. This
           if mouse_over_slider?
             state.user_input = :slider
           # If the mouse is over the star in the first grid
    -      elsif bfs_mouse_over_star?                 
    +      elsif bfs_mouse_over_star?
             # The user is editing the star from the first grid
    -        state.user_input = :bfs_star          
    +        state.user_input = :bfs_star
           # If the mouse is over the star in the second grid
    -      elsif heuristic_mouse_over_star?                 
    +      elsif heuristic_mouse_over_star?
             # The user is editing the star from the second grid
    -        state.user_input = :heuristic_star          
    +        state.user_input = :heuristic_star
           # If the mouse is over the target in the first grid
    -      elsif bfs_mouse_over_target?                 
    +      elsif bfs_mouse_over_target?
             # The user is editing the target from the first grid
    -        state.user_input = :bfs_target          
    +        state.user_input = :bfs_target
           # If the mouse is over the target in the second grid
    -      elsif heuristic_mouse_over_target?                 
    +      elsif heuristic_mouse_over_target?
             # The user is editing the target from the second grid
    -        state.user_input = :heuristic_target 
    +        state.user_input = :heuristic_target
           # If the mouse is over a wall in the first grid
    -      elsif bfs_mouse_over_wall?                 
    +      elsif bfs_mouse_over_wall?
             # The user is removing a wall from the first grid
    -        state.user_input = :bfs_remove_wall   
    +        state.user_input = :bfs_remove_wall
           # If the mouse is over a wall in the second grid
    -      elsif heuristic_mouse_over_wall?                 
    +      elsif heuristic_mouse_over_wall?
             # The user is removing a wall from the second grid
             state.user_input = :heuristic_remove_wall
           # If the mouse is over the first grid
    -      elsif bfs_mouse_over_grid?                 
    +      elsif bfs_mouse_over_grid?
             # The user is adding a wall from the first grid
             state.user_input = :bfs_add_wall
           # If the mouse is over the second grid
    -      elsif heuristic_mouse_over_grid?                 
    +      elsif heuristic_mouse_over_grid?
             # The user is adding a wall from the second grid
             state.user_input = :heuristic_add_wall
           end
    @@ -18831,22 +19591,22 @@ Follows is a source code listing for all files that have been open sourced. This
         def process_input
           if state.user_input == :slider
             process_input_slider
    -      elsif state.user_input == :bfs_star         
    -        process_input_bfs_star                            
    +      elsif state.user_input == :bfs_star
    +        process_input_bfs_star
           elsif state.user_input == :heuristic_star
    -        process_input_heuristic_star                            
    -      elsif state.user_input == :bfs_target         
    -        process_input_bfs_target                            
    -      elsif state.user_input == :heuristic_target         
    -        process_input_heuristic_target                            
    -      elsif state.user_input == :bfs_remove_wall  
    -        process_input_bfs_remove_wall                     
    +        process_input_heuristic_star
    +      elsif state.user_input == :bfs_target
    +        process_input_bfs_target
    +      elsif state.user_input == :heuristic_target
    +        process_input_heuristic_target
    +      elsif state.user_input == :bfs_remove_wall
    +        process_input_bfs_remove_wall
           elsif state.user_input == :heuristic_remove_wall
    -        process_input_heuristic_remove_wall                     
    -      elsif state.user_input == :bfs_add_wall     
    -        process_input_bfs_add_wall                        
    -      elsif state.user_input == :heuristic_add_wall     
    -        process_input_heuristic_add_wall                        
    +        process_input_heuristic_remove_wall
    +      elsif state.user_input == :bfs_add_wall
    +        process_input_bfs_add_wall
    +      elsif state.user_input == :heuristic_add_wall
    +        process_input_heuristic_add_wall
           end
         end
       
    @@ -18923,7 +19683,7 @@ Follows is a source code listing for all files that have been open sourced. This
       
           # The horizontal grid lines
           for y in 0..grid.height
    -        outputs.lines << bfs_horizontal_line(y) 
    +        outputs.lines << bfs_horizontal_line(y)
           end
         end
       
    @@ -18938,10 +19698,10 @@ Follows is a source code listing for all files that have been open sourced. This
       
           # The horizontal grid lines
           for y in 0..grid.height
    -        outputs.lines << heuristic_horizontal_line(y) 
    +        outputs.lines << heuristic_horizontal_line(y)
           end
         end
    -      
    +  
         # Returns a vertical line for a column of the first grid
         def bfs_vertical_line column
           bfs_scale_up([column, 0, column, grid.height])
    @@ -18976,7 +19736,7 @@ Follows is a source code listing for all files that have been open sourced. This
         def render_bfs_target
           outputs.sprites << [bfs_scale_up(grid.target), 'target.png']
         end
    -    
    +  
         # Renders the target on the second grid
         def render_heuristic_target
           outputs.sprites << [heuristic_scale_up(grid.target), 'target.png']
    @@ -18984,14 +19744,14 @@ Follows is a source code listing for all files that have been open sourced. This
       
         # Renders the walls on the first grid
         def render_bfs_walls
    -      grid.walls.each_key do | wall | 
    +      grid.walls.each_key do | wall |
             outputs.solids << [bfs_scale_up(wall), wall_color]
           end
         end
       
         # Renders the walls on the second grid
         def render_heuristic_walls
    -      grid.walls.each_key do | wall | 
    +      grid.walls.each_key do | wall |
             outputs.solids << [heuristic_scale_up(wall), wall_color]
           end
         end
    @@ -19012,14 +19772,14 @@ Follows is a source code listing for all files that have been open sourced. This
       
         # Renders the frontier cells on the first grid
         def render_bfs_frontier
    -      bfs.frontier.each do | frontier_cell | 
    +      bfs.frontier.each do | frontier_cell |
             outputs.solids << [bfs_scale_up(frontier_cell), frontier_color, 200]
           end
         end
       
         # Renders the frontier cells on the second grid
         def render_heuristic_frontier
    -      heuristic.frontier.each do | frontier_cell | 
    +      heuristic.frontier.each do | frontier_cell |
             outputs.solids << [heuristic_scale_up(frontier_cell), frontier_color, 200]
           end
         end
    @@ -19103,14 +19863,14 @@ Follows is a source code listing for all files that have been open sourced. This
         # Checks and handles input for the buttons
         # Called when the mouse is lifted
         def input_buttons
    -      input_left_button 
    -      input_center_button          
    -      input_right_button     
    +      input_left_button
    +      input_center_button
    +      input_right_button
         end
       
         # Checks if the previous step button is clicked
         # If it is, it pauses the animation and moves the search one step backward
    -    def input_left_button 
    +    def input_left_button
           if left_button_clicked?
             state.play = false
             state.current_step -= 1
    @@ -19122,7 +19882,7 @@ Follows is a source code listing for all files that have been open sourced. This
         # Inverses whether the animation is playing or not when clicked
         def input_center_button
           if center_button_clicked? || inputs.keyboard.key_down.space
    -        state.play = !state.play         
    +        state.play = !state.play
           end
         end
       
    @@ -19130,8 +19890,8 @@ Follows is a source code listing for all files that have been open sourced. This
         # If it is, it pauses the animation and moves the search one step forward
         def input_right_button
           if right_button_clicked?
    -        state.play = false              
    -        state.current_step += 1           
    +        state.play = false
    +        state.current_step += 1
             move_searches_one_step_forward
           end
         end
    @@ -19212,12 +19972,12 @@ Follows is a source code listing for all files that have been open sourced. This
         # on the slider
         # Changes the step of the search to be animated
         def process_input_slider
    -      state.play = false 
    +      state.play = false
           mouse_x = inputs.mouse.point.x
       
           # Bounds the mouse_x to the closest x value on the slider line
    -      mouse_x = slider.x if mouse_x < slider.x 
    -      mouse_x = slider.x + slider.w if mouse_x > slider.x + slider.w 
    +      mouse_x = slider.x if mouse_x < slider.x
    +      mouse_x = slider.x + slider.w if mouse_x > slider.x + slider.w
       
           # Sets the current search step to the one represented by the mouse x value
           # The slider's circle moves due to the render_slider method using anim_steps
    @@ -19230,12 +19990,12 @@ Follows is a source code listing for all files that have been open sourced. This
         # Only resets the search if the star changes position
         # Called whenever the user is editing the star (puts mouse down on star)
         def process_input_bfs_star
    -      old_star = grid.star.clone 
    +      old_star = grid.star.clone
           unless bfs_cell_closest_to_mouse == grid.target
    -        grid.star = bfs_cell_closest_to_mouse 
    +        grid.star = bfs_cell_closest_to_mouse
           end
    -      unless old_star == grid.star 
    -        recalculate_searches 
    +      unless old_star == grid.star
    +        recalculate_searches
           end
         end
       
    @@ -19243,12 +20003,12 @@ Follows is a source code listing for all files that have been open sourced. This
         # Only resets the search if the star changes position
         # Called whenever the user is editing the star (puts mouse down on star)
         def process_input_heuristic_star
    -      old_star = grid.star.clone 
    +      old_star = grid.star.clone
           unless heuristic_cell_closest_to_mouse == grid.target
             grid.star = heuristic_cell_closest_to_mouse
           end
    -      unless old_star == grid.star 
    -        recalculate_searches 
    +      unless old_star == grid.star
    +        recalculate_searches
           end
         end
       
    @@ -19256,12 +20016,12 @@ Follows is a source code listing for all files that have been open sourced. This
         # Only recalculate_searchess the search if the target changes position
         # Called whenever the user is editing the target (puts mouse down on target)
         def process_input_bfs_target
    -      old_target = grid.target.clone 
    +      old_target = grid.target.clone
           unless bfs_cell_closest_to_mouse == grid.star
             grid.target = bfs_cell_closest_to_mouse
           end
    -      unless old_target == grid.target 
    -        recalculate_searches 
    +      unless old_target == grid.target
    +        recalculate_searches
           end
         end
       
    @@ -19269,12 +20029,12 @@ Follows is a source code listing for all files that have been open sourced. This
         # Only recalculate_searchess the search if the target changes position
         # Called whenever the user is editing the target (puts mouse down on target)
         def process_input_heuristic_target
    -      old_target = grid.target.clone 
    +      old_target = grid.target.clone
           unless heuristic_cell_closest_to_mouse == grid.star
             grid.target = heuristic_cell_closest_to_mouse
           end
    -      unless old_target == grid.target 
    -        recalculate_searches 
    +      unless old_target == grid.target
    +        recalculate_searches
           end
         end
       
    @@ -19283,10 +20043,10 @@ Follows is a source code listing for all files that have been open sourced. This
           # 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 bfs_mouse_over_grid? 
    +      if bfs_mouse_over_grid?
             if grid.walls.has_key?(bfs_cell_closest_to_mouse)
    -          grid.walls.delete(bfs_cell_closest_to_mouse) 
    -          recalculate_searches 
    +          grid.walls.delete(bfs_cell_closest_to_mouse)
    +          recalculate_searches
             end
           end
         end
    @@ -19296,29 +20056,29 @@ Follows is a source code listing for all files that have been open sourced. This
           # 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 heuristic_mouse_over_grid? 
    +      if heuristic_mouse_over_grid?
             if grid.walls.has_key?(heuristic_cell_closest_to_mouse)
    -          grid.walls.delete(heuristic_cell_closest_to_mouse) 
    -          recalculate_searches 
    +          grid.walls.delete(heuristic_cell_closest_to_mouse)
    +          recalculate_searches
             end
           end
         end
         # Adds a wall in the first grid in the cell the mouse is over
         def process_input_bfs_add_wall
    -      if bfs_mouse_over_grid? 
    +      if bfs_mouse_over_grid?
             unless grid.walls.has_key?(bfs_cell_closest_to_mouse)
    -          grid.walls[bfs_cell_closest_to_mouse] = true 
    -          recalculate_searches 
    +          grid.walls[bfs_cell_closest_to_mouse] = true
    +          recalculate_searches
             end
           end
         end
       
         # Adds a wall in the second grid in the cell the mouse is over
         def process_input_heuristic_add_wall
    -      if heuristic_mouse_over_grid? 
    +      if heuristic_mouse_over_grid?
             unless grid.walls.has_key?(heuristic_cell_closest_to_mouse)
    -          grid.walls[heuristic_cell_closest_to_mouse] = true 
    -          recalculate_searches 
    +          grid.walls[heuristic_cell_closest_to_mouse] = true
    +          recalculate_searches
             end
           end
         end
    @@ -19328,13 +20088,13 @@ Follows is a source code listing for all files that have been open sourced. This
         # Finding the cell closest to the mouse helps with this
         def bfs_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
       
         # When the user grabs the star and puts their cursor to the far right
    @@ -19342,17 +20102,17 @@ Follows is a source code listing for all files that have been open sourced. This
         # Finding the cell closest to the mouse in the second grid helps with this
         def heuristic_cell_closest_to_mouse
           # Closest cell grid to the mouse in the second
    -      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
           # Translate the cell to the first grid
           x -= grid.width + 1
           # Bound x and y to the first grid
           x = 0 if x < 0
           y = 0 if y < 0
    -      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
       
         def recalculate_searches
    @@ -19377,22 +20137,22 @@ Follows is a source code listing for all files that have been open sourced. This
           return if bfs.came_from.has_key?(grid.target)
       
           # Only runs at the beginning of the search as setup.
    -      if bfs.came_from.empty?  
    -        bfs.frontier << grid.star                   
    -        bfs.came_from[grid.star] = nil              
    +      if bfs.came_from.empty?
    +        bfs.frontier << grid.star
    +        bfs.came_from[grid.star] = nil
           end
       
           # A step in the search
    -      unless bfs.frontier.empty? 
    +      unless bfs.frontier.empty?
             # Takes the next frontier cell
    -        new_frontier = bfs.frontier.shift 
    +        new_frontier = bfs.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 bfs.came_from.has_key?(neighbor) || grid.walls.has_key?(neighbor) 
    +          unless bfs.came_from.has_key?(neighbor) || grid.walls.has_key?(neighbor)
                 # Add them to the frontier and mark them as visited
    -            bfs.frontier << neighbor 
    -            bfs.came_from[neighbor] = new_frontier 
    +            bfs.frontier << neighbor
    +            bfs.came_from[neighbor] = new_frontier
               end
             end
           end
    @@ -19447,12 +20207,12 @@ Follows is a source code listing for all files that have been open sourced. This
             # Get the next cell to explore from
             new_frontier = heuristic.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 heuristic.came_from.has_key?(neighbor) || grid.walls.has_key?(neighbor) 
    +          unless heuristic.came_from.has_key?(neighbor) || grid.walls.has_key?(neighbor)
                 # Add them to the frontier and mark them as visited
    -            heuristic.frontier << neighbor 
    -            heuristic.came_from[neighbor] = new_frontier 
    +            heuristic.frontier << neighbor
    +            heuristic.came_from[neighbor] = new_frontier
               end
             end
           end
    @@ -19496,16 +20256,16 @@ Follows is a source code listing for all files that have been open sourced. This
         # 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
       
    -      neighbors 
    +      neighbors
         end
       
         # Finds the vertical and horizontal distance of a cell from the star
    @@ -19554,7 +20314,7 @@ Follows is a source code listing for all files that have been open sourced. This
         def wall_color
           [134, 134, 120] # Camo Green
         end
    -    
    +  
         def visited_color
           [204, 191, 179] # Dark Brown
         end
    @@ -19562,7 +20322,7 @@ Follows is a source code listing for all files that have been open sourced. This
         def frontier_color
           [103, 136, 204] # Blue
         end
    -    
    +  
         def path_color
           [231, 230, 228] # Pastel White
         end
    @@ -19610,13 +20370,13 @@ Follows is a source code listing for all files that have been open sourced. This
       
         def tick
           defaults
    -      render 
    -      input  
    +      render
    +      input
           # If animation is playing, and max steps have not been reached
           # Move the search a step forward
           if state.play && state.current_step < state.max_steps
             # Variable that tells the program what step to recalculate up to
    -        state.current_step += 1 
    +        state.current_step += 1
             move_searches_one_step_forward
           end
         end
    @@ -19671,7 +20431,7 @@ Follows is a source code listing for all files that have been open sourced. This
           # 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.user_input ||= :none 
    +      state.user_input ||= :none
       
           # These variables allow the breadth first search to take place
           # Came_from is a hash with a key of a cell and a value of the cell that was expanded from to find the key.
    @@ -19696,7 +20456,7 @@ Follows is a source code listing for all files that have been open sourced. This
           # Unless the current step has a value
           unless state.current_step
             # Set the current step to 10
    -        state.current_step = 10 
    +        state.current_step = 10
             # And calculate the searches up to step 10
             recalculate_searches
           end
    @@ -19706,7 +20466,7 @@ Follows is a source code listing for all files that have been open sourced. This
           # This step is roughly the grid's width * height
           # When anim_steps equals max_steps no more calculations will occur
           # and the slider will be at the end
    -      state.max_steps = grid.width * grid.height 
    +      state.max_steps = grid.width * grid.height
       
           # Whether the animation should play or not
           # If true, every tick moves anim_steps forward one
    @@ -19799,7 +20559,7 @@ Follows is a source code listing for all files that have been open sourced. This
           # If the mouse was clicked this tick
           if inputs.mouse.down
             # Determine what the user is editing and appropriately edit the state.user_input variable
    -        determine_input          
    +        determine_input
           end
       
           # Process user input based on user_input variable and current mouse position
    @@ -19812,35 +20572,35 @@ Follows is a source code listing for all files that have been open sourced. This
           if mouse_over_slider?
             state.user_input = :slider
           # If the mouse is over the star in the first grid
    -      elsif bfs_mouse_over_star?                 
    +      elsif bfs_mouse_over_star?
             # The user is editing the star from the first grid
    -        state.user_input = :bfs_star          
    +        state.user_input = :bfs_star
           # If the mouse is over the star in the second grid
    -      elsif heuristic_mouse_over_star?                 
    +      elsif heuristic_mouse_over_star?
             # The user is editing the star from the second grid
    -        state.user_input = :heuristic_star          
    +        state.user_input = :heuristic_star
           # If the mouse is over the target in the first grid
    -      elsif bfs_mouse_over_target?                 
    +      elsif bfs_mouse_over_target?
             # The user is editing the target from the first grid
    -        state.user_input = :bfs_target          
    +        state.user_input = :bfs_target
           # If the mouse is over the target in the second grid
    -      elsif heuristic_mouse_over_target?                 
    +      elsif heuristic_mouse_over_target?
             # The user is editing the target from the second grid
    -        state.user_input = :heuristic_target 
    +        state.user_input = :heuristic_target
           # If the mouse is over a wall in the first grid
    -      elsif bfs_mouse_over_wall?                 
    +      elsif bfs_mouse_over_wall?
             # The user is removing a wall from the first grid
    -        state.user_input = :bfs_remove_wall   
    +        state.user_input = :bfs_remove_wall
           # If the mouse is over a wall in the second grid
    -      elsif heuristic_mouse_over_wall?                 
    +      elsif heuristic_mouse_over_wall?
             # The user is removing a wall from the second grid
             state.user_input = :heuristic_remove_wall
           # If the mouse is over the first grid
    -      elsif bfs_mouse_over_grid?                 
    +      elsif bfs_mouse_over_grid?
             # The user is adding a wall from the first grid
             state.user_input = :bfs_add_wall
           # If the mouse is over the second grid
    -      elsif heuristic_mouse_over_grid?                 
    +      elsif heuristic_mouse_over_grid?
             # The user is adding a wall from the second grid
             state.user_input = :heuristic_add_wall
           end
    @@ -19850,22 +20610,22 @@ Follows is a source code listing for all files that have been open sourced. This
         def process_input
           if state.user_input == :slider
             process_input_slider
    -      elsif state.user_input == :bfs_star         
    -        process_input_bfs_star                            
    +      elsif state.user_input == :bfs_star
    +        process_input_bfs_star
           elsif state.user_input == :heuristic_star
    -        process_input_heuristic_star                            
    -      elsif state.user_input == :bfs_target         
    -        process_input_bfs_target                            
    -      elsif state.user_input == :heuristic_target         
    -        process_input_heuristic_target                            
    -      elsif state.user_input == :bfs_remove_wall  
    -        process_input_bfs_remove_wall                     
    +        process_input_heuristic_star
    +      elsif state.user_input == :bfs_target
    +        process_input_bfs_target
    +      elsif state.user_input == :heuristic_target
    +        process_input_heuristic_target
    +      elsif state.user_input == :bfs_remove_wall
    +        process_input_bfs_remove_wall
           elsif state.user_input == :heuristic_remove_wall
    -        process_input_heuristic_remove_wall                     
    -      elsif state.user_input == :bfs_add_wall     
    -        process_input_bfs_add_wall                        
    -      elsif state.user_input == :heuristic_add_wall     
    -        process_input_heuristic_add_wall                        
    +        process_input_heuristic_remove_wall
    +      elsif state.user_input == :bfs_add_wall
    +        process_input_bfs_add_wall
    +      elsif state.user_input == :heuristic_add_wall
    +        process_input_heuristic_add_wall
           end
         end
       
    @@ -19942,7 +20702,7 @@ Follows is a source code listing for all files that have been open sourced. This
       
           # The horizontal grid lines
           for y in 0..grid.height
    -        outputs.lines << bfs_horizontal_line(y) 
    +        outputs.lines << bfs_horizontal_line(y)
           end
         end
       
    @@ -19957,10 +20717,10 @@ Follows is a source code listing for all files that have been open sourced. This
       
           # The horizontal grid lines
           for y in 0..grid.height
    -        outputs.lines << heuristic_horizontal_line(y) 
    +        outputs.lines << heuristic_horizontal_line(y)
           end
         end
    -      
    +  
         # Returns a vertical line for a column of the first grid
         def bfs_vertical_line column
           bfs_scale_up([column, 0, column, grid.height])
    @@ -19995,7 +20755,7 @@ Follows is a source code listing for all files that have been open sourced. This
         def render_bfs_target
           outputs.sprites << [bfs_scale_up(grid.target), 'target.png']
         end
    -    
    +  
         # Renders the target on the second grid
         def render_heuristic_target
           outputs.sprites << [heuristic_scale_up(grid.target), 'target.png']
    @@ -20003,14 +20763,14 @@ Follows is a source code listing for all files that have been open sourced. This
       
         # Renders the walls on the first grid
         def render_bfs_walls
    -      grid.walls.each_key do | wall | 
    +      grid.walls.each_key do | wall |
             outputs.solids << [bfs_scale_up(wall), wall_color]
           end
         end
       
         # Renders the walls on the second grid
         def render_heuristic_walls
    -      grid.walls.each_key do | wall | 
    +      grid.walls.each_key do | wall |
             outputs.solids << [heuristic_scale_up(wall), wall_color]
           end
         end
    @@ -20031,14 +20791,14 @@ Follows is a source code listing for all files that have been open sourced. This
       
         # Renders the frontier cells on the first grid
         def render_bfs_frontier
    -      bfs.frontier.each do | frontier_cell | 
    +      bfs.frontier.each do | frontier_cell |
             outputs.solids << [bfs_scale_up(frontier_cell), frontier_color, 200]
           end
         end
       
         # Renders the frontier cells on the second grid
         def render_heuristic_frontier
    -      heuristic.frontier.each do | frontier_cell | 
    +      heuristic.frontier.each do | frontier_cell |
             outputs.solids << [heuristic_scale_up(frontier_cell), frontier_color, 200]
           end
         end
    @@ -20122,14 +20882,14 @@ Follows is a source code listing for all files that have been open sourced. This
         # Checks and handles input for the buttons
         # Called when the mouse is lifted
         def input_buttons
    -      input_left_button 
    -      input_center_button          
    -      input_right_button     
    +      input_left_button
    +      input_center_button
    +      input_right_button
         end
       
         # Checks if the previous step button is clicked
         # If it is, it pauses the animation and moves the search one step backward
    -    def input_left_button 
    +    def input_left_button
           if left_button_clicked?
             state.play = false
             state.current_step -= 1
    @@ -20141,7 +20901,7 @@ Follows is a source code listing for all files that have been open sourced. This
         # Inverses whether the animation is playing or not when clicked
         def input_center_button
           if center_button_clicked? || inputs.keyboard.key_down.space
    -        state.play = !state.play         
    +        state.play = !state.play
           end
         end
       
    @@ -20149,8 +20909,8 @@ Follows is a source code listing for all files that have been open sourced. This
         # If it is, it pauses the animation and moves the search one step forward
         def input_right_button
           if right_button_clicked?
    -        state.play = false              
    -        state.current_step += 1           
    +        state.play = false
    +        state.current_step += 1
             move_searches_one_step_forward
           end
         end
    @@ -20231,12 +20991,12 @@ Follows is a source code listing for all files that have been open sourced. This
         # on the slider
         # Changes the step of the search to be animated
         def process_input_slider
    -      state.play = false 
    +      state.play = false
           mouse_x = inputs.mouse.point.x
       
           # Bounds the mouse_x to the closest x value on the slider line
    -      mouse_x = slider.x if mouse_x < slider.x 
    -      mouse_x = slider.x + slider.w if mouse_x > slider.x + slider.w 
    +      mouse_x = slider.x if mouse_x < slider.x
    +      mouse_x = slider.x + slider.w if mouse_x > slider.x + slider.w
       
           # Sets the current search step to the one represented by the mouse x value
           # The slider's circle moves due to the render_slider method using anim_steps
    @@ -20249,12 +21009,12 @@ Follows is a source code listing for all files that have been open sourced. This
         # Only resets the search if the star changes position
         # Called whenever the user is editing the star (puts mouse down on star)
         def process_input_bfs_star
    -      old_star = grid.star.clone 
    +      old_star = grid.star.clone
           unless bfs_cell_closest_to_mouse == grid.target
    -        grid.star = bfs_cell_closest_to_mouse 
    +        grid.star = bfs_cell_closest_to_mouse
           end
    -      unless old_star == grid.star 
    -        recalculate_searches 
    +      unless old_star == grid.star
    +        recalculate_searches
           end
         end
       
    @@ -20262,12 +21022,12 @@ Follows is a source code listing for all files that have been open sourced. This
         # Only resets the search if the star changes position
         # Called whenever the user is editing the star (puts mouse down on star)
         def process_input_heuristic_star
    -      old_star = grid.star.clone 
    +      old_star = grid.star.clone
           unless heuristic_cell_closest_to_mouse == grid.target
             grid.star = heuristic_cell_closest_to_mouse
           end
    -      unless old_star == grid.star 
    -        recalculate_searches 
    +      unless old_star == grid.star
    +        recalculate_searches
           end
         end
       
    @@ -20275,12 +21035,12 @@ Follows is a source code listing for all files that have been open sourced. This
         # Only recalculate_searchess the search if the target changes position
         # Called whenever the user is editing the target (puts mouse down on target)
         def process_input_bfs_target
    -      old_target = grid.target.clone 
    +      old_target = grid.target.clone
           unless bfs_cell_closest_to_mouse == grid.star
             grid.target = bfs_cell_closest_to_mouse
           end
    -      unless old_target == grid.target 
    -        recalculate_searches 
    +      unless old_target == grid.target
    +        recalculate_searches
           end
         end
       
    @@ -20288,12 +21048,12 @@ Follows is a source code listing for all files that have been open sourced. This
         # Only recalculate_searchess the search if the target changes position
         # Called whenever the user is editing the target (puts mouse down on target)
         def process_input_heuristic_target
    -      old_target = grid.target.clone 
    +      old_target = grid.target.clone
           unless heuristic_cell_closest_to_mouse == grid.star
             grid.target = heuristic_cell_closest_to_mouse
           end
    -      unless old_target == grid.target 
    -        recalculate_searches 
    +      unless old_target == grid.target
    +        recalculate_searches
           end
         end
       
    @@ -20302,10 +21062,10 @@ Follows is a source code listing for all files that have been open sourced. This
           # 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 bfs_mouse_over_grid? 
    +      if bfs_mouse_over_grid?
             if grid.walls.has_key?(bfs_cell_closest_to_mouse)
    -          grid.walls.delete(bfs_cell_closest_to_mouse) 
    -          recalculate_searches 
    +          grid.walls.delete(bfs_cell_closest_to_mouse)
    +          recalculate_searches
             end
           end
         end
    @@ -20315,29 +21075,29 @@ Follows is a source code listing for all files that have been open sourced. This
           # 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 heuristic_mouse_over_grid? 
    +      if heuristic_mouse_over_grid?
             if grid.walls.has_key?(heuristic_cell_closest_to_mouse)
    -          grid.walls.delete(heuristic_cell_closest_to_mouse) 
    -          recalculate_searches 
    +          grid.walls.delete(heuristic_cell_closest_to_mouse)
    +          recalculate_searches
             end
           end
         end
         # Adds a wall in the first grid in the cell the mouse is over
         def process_input_bfs_add_wall
    -      if bfs_mouse_over_grid? 
    +      if bfs_mouse_over_grid?
             unless grid.walls.has_key?(bfs_cell_closest_to_mouse)
    -          grid.walls[bfs_cell_closest_to_mouse] = true 
    -          recalculate_searches 
    +          grid.walls[bfs_cell_closest_to_mouse] = true
    +          recalculate_searches
             end
           end
         end
       
         # Adds a wall in the second grid in the cell the mouse is over
         def process_input_heuristic_add_wall
    -      if heuristic_mouse_over_grid? 
    +      if heuristic_mouse_over_grid?
             unless grid.walls.has_key?(heuristic_cell_closest_to_mouse)
    -          grid.walls[heuristic_cell_closest_to_mouse] = true 
    -          recalculate_searches 
    +          grid.walls[heuristic_cell_closest_to_mouse] = true
    +          recalculate_searches
             end
           end
         end
    @@ -20347,13 +21107,13 @@ Follows is a source code listing for all files that have been open sourced. This
         # Finding the cell closest to the mouse helps with this
         def bfs_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
       
         # When the user grabs the star and puts their cursor to the far right
    @@ -20361,17 +21121,17 @@ Follows is a source code listing for all files that have been open sourced. This
         # Finding the cell closest to the mouse in the second grid helps with this
         def heuristic_cell_closest_to_mouse
           # Closest cell grid to the mouse in the second
    -      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
           # Translate the cell to the first grid
           x -= grid.width + 1
           # Bound x and y to the first grid
           x = 0 if x < 0
           y = 0 if y < 0
    -      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
       
         def recalculate_searches
    @@ -20396,22 +21156,22 @@ Follows is a source code listing for all files that have been open sourced. This
           return if bfs.came_from.has_key?(grid.target)
       
           # Only runs at the beginning of the search as setup.
    -      if bfs.came_from.empty?  
    -        bfs.frontier << grid.star                   
    -        bfs.came_from[grid.star] = nil              
    +      if bfs.came_from.empty?
    +        bfs.frontier << grid.star
    +        bfs.came_from[grid.star] = nil
           end
       
           # A step in the search
    -      unless bfs.frontier.empty? 
    +      unless bfs.frontier.empty?
             # Takes the next frontier cell
    -        new_frontier = bfs.frontier.shift 
    +        new_frontier = bfs.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 bfs.came_from.has_key?(neighbor) || grid.walls.has_key?(neighbor) 
    +          unless bfs.came_from.has_key?(neighbor) || grid.walls.has_key?(neighbor)
                 # Add them to the frontier and mark them as visited
    -            bfs.frontier << neighbor 
    -            bfs.came_from[neighbor] = new_frontier 
    +            bfs.frontier << neighbor
    +            bfs.came_from[neighbor] = new_frontier
               end
             end
           end
    @@ -20466,12 +21226,12 @@ Follows is a source code listing for all files that have been open sourced. This
             # Get the next cell to explore from
             new_frontier = heuristic.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 heuristic.came_from.has_key?(neighbor) || grid.walls.has_key?(neighbor) 
    +          unless heuristic.came_from.has_key?(neighbor) || grid.walls.has_key?(neighbor)
                 # Add them to the frontier and mark them as visited
    -            heuristic.frontier << neighbor 
    -            heuristic.came_from[neighbor] = new_frontier 
    +            heuristic.frontier << neighbor
    +            heuristic.came_from[neighbor] = new_frontier
               end
             end
           end
    @@ -20515,16 +21275,16 @@ Follows is a source code listing for all files that have been open sourced. This
         # 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
       
    -      neighbors 
    +      neighbors
         end
       
         # Finds the vertical and horizontal distance of a cell from the star
    @@ -20573,7 +21333,7 @@ Follows is a source code listing for all files that have been open sourced. This
         def wall_color
           [134, 134, 120] # Camo Green
         end
    -    
    +  
         def visited_color
           [204, 191, 179] # Dark Brown
         end
    @@ -20581,7 +21341,7 @@ Follows is a source code listing for all files that have been open sourced. This
         def frontier_color
           [103, 136, 204] # Blue
         end
    -    
    +  
         def path_color
           [231, 230, 228] # Pastel White
         end
    @@ -24345,6 +25105,444 @@ Follows is a source code listing for all files that have been open sourced. This
     
     #+end_src
     
    +*** Crafting - Farming Game Starting Point - main.rb
    +#+begin_src ruby
    +  # ./samples/99_genre_crafting/farming_game_starting_point/app/main.rb
    +  def tick args
    +    args.state.tile_size     = 80
    +    args.state.player_speed  = 4
    +    args.state.player      ||= tile(args, 7, 3, 0, 128, 180)
    +    generate_map args
    +    #press j to plant a green onion
    +    if args.inputs.keyboard.j
    +    #change this part you can change what you want to plant
    +     args.state.walls << tile(args, ((args.state.player.x+80)/args.state.tile_size), ((args.state.player.y)/args.state.tile_size), 255, 255, 255)
    +     args.state.plants << tile(args, ((args.state.player.x+80)/args.state.tile_size), ((args.state.player.y+80)/args.state.tile_size), 0, 160, 0)
    +    end
    +    # Adds walls, background, and player to args.outputs.solids so they appear on screen
    +    args.outputs.solids << [0,0,1280,720, 237,189,101]
    +    args.outputs.sprites << [0, 0, 1280, 720, 'sprites/background.png']
    +    args.outputs.solids << args.state.walls
    +    args.outputs.solids << args.state.player
    +    args.outputs.solids << args.state.plants
    +    args.outputs.labels << [320, 640, "press J to plant", 3, 1, 255, 0, 0, 200]
    +  
    +    move_player args, -1,  0 if args.inputs.keyboard.left # x position decreases by 1 if left key is pressed
    +    move_player args,  1,  0 if args.inputs.keyboard.right # x position increases by 1 if right key is pressed
    +    move_player args,  0,  1 if args.inputs.keyboard.up # y position increases by 1 if up is pressed
    +    move_player args,  0, -1 if args.inputs.keyboard.down # y position decreases by 1 if down is pressed
    +  end
    +  
    +  # Sets position, size, and color of the tile
    +  def tile args, x, y, *color
    +    [x * args.state.tile_size, # sets definition for array using method parameters
    +     y * args.state.tile_size, # multiplying by tile_size sets x and y to correct position using pixel values
    +     args.state.tile_size,
    +     args.state.tile_size,
    +     *color]
    +  end
    +  
    +  # Creates map by adding tiles to the wall, as well as a goal (that the player needs to reach)
    +  def generate_map args
    +    return if args.state.area
    +  
    +    # Creates the area of the map. There are 9 rows running horizontally across the screen
    +    # and 16 columns running vertically on the screen. Any spot with a "1" is not
    +    # open for the player to move into (and is green), and any spot with a "0" is available
    +    # for the player to move in.
    +    args.state.area = [
    +      [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,],
    +      [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,],
    +      [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,],
    +      [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,],
    +      [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,],
    +      [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,],
    +      [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,],
    +      [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,],
    +      [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ],
    +    ].reverse # reverses the order of the area collection
    +  
    +    # By reversing the order, the way that the area appears above is how it appears
    +    # on the screen in the game. If we did not reverse, the map would appear inverted.
    +  
    +    #The wall starts off with no tiles.
    +    args.state.walls = []
    +    args.state.plants = []
    +  
    +    # If v is 1, a green tile is added to args.state.walls.
    +    # If v is 2, a black tile is created as the goal.
    +    args.state.area.map_2d do |y, x, v|
    +      if    v == 1
    +        args.state.walls << tile(args, x, y, 255, 160, 156) # green tile
    +      end
    +    end
    +  end
    +  
    +  # Allows the player to move their box around the screen
    +  def move_player args, *vector
    +    box = args.state.player.shift_rect(vector) # box is able to move at an angle
    +  
    +    # If the player's box hits a wall, it is not able to move further in that direction
    +    return if args.state.walls
    +                  .any_intersect_rect?(box)
    +  
    +    # Player's box is able to move at angles (not just the four general directions) fast
    +    args.state.player =
    +      args.state.player
    +          .shift_rect(vector.x * args.state.player_speed, # if we don't multiply by speed, then
    +                      vector.y * args.state.player_speed) # the box will move extremely slow
    +  end
    +
    +#+end_src
    +
    +*** Crafting - Farming Game Starting Point - repl.rb
    +#+begin_src ruby
    +  # ./samples/99_genre_crafting/farming_game_starting_point/app/repl.rb
    +  # ===============================================================
    +  # Welcome to repl.rb
    +  # ===============================================================
    +  # You can experiement with code within this file. Code in this
    +  # file is only executed when you save (and only excecuted ONCE).
    +  # ===============================================================
    +  
    +  # ===============================================================
    +  # REMOVE the "x" from the word "xrepl" and save the file to RUN
    +  # the code in between the do/end block delimiters.
    +  # ===============================================================
    +  
    +  # ===============================================================
    +  # ADD the "x" to the word "repl" (make it xrepl) and save the
    +  # file to IGNORE the code in between the do/end block delimiters.
    +  # ===============================================================
    +  
    +  # Remove the x from xrepl to run the code. Add the x back to ignore to code.
    +  xrepl do
    +    puts "The result of 1 + 2 is: #{1 + 2}"
    +  end
    +  
    +  # ====================================================================================
    +  # Ruby Crash Course:
    +  # Strings, Numeric, Booleans, Conditionals, Looping, Enumerables, Arrays
    +  # ====================================================================================
    +  
    +  # ====================================================================================
    +  #  Strings
    +  # ====================================================================================
    +  # Remove the x from xrepl to run the code. Add the x back to ignore to code.
    +  xrepl do
    +    message = "Hello World"
    +    puts "The value of message is: " + message
    +    puts "Any value can be interpolated within a string using \#{}."
    +    puts "Interpolated message: #{message}."
    +    puts 'This #{message} is not interpolated because the string uses single quotes.'
    +  end
    +  
    +  # ====================================================================================
    +  #  Numerics
    +  # ====================================================================================
    +  # Remove the x from xrepl to run the code. Add the x back to ignore to code.
    +  xrepl do
    +    a = 10
    +    puts "The value of a is: #{a}"
    +    puts "a + 1 is: #{a + 1}"
    +    puts "a / 3 is: #{a / 3}"
    +  end
    +  
    +  # Remove the x from xrepl to run the code. Add the x back to ignore to code.
    +  xrepl do
    +    b = 10.12
    +    puts "The value of b is: #{b}"
    +    puts "b + 1 is: #{b + 1}"
    +    puts "b as an integer is: #{b.to_i}"
    +    puts ''
    +  end
    +  
    +  # ====================================================================================
    +  #  Booleans
    +  # ====================================================================================
    +  # Remove the x from xrepl to run the code. Add the x back to ignore to code.
    +  xrepl do
    +    c = 30
    +    puts "The value of c is #{c}."
    +  
    +    if c
    +      puts "This if statement ran because c is truthy."
    +    end
    +  end
    +  
    +  # Remove the x from xrepl to run the code. Add the x back to ignore to code.
    +  xrepl do
    +    d = false
    +    puts "The value of d is #{d}."
    +  
    +    if !d
    +      puts "This if statement ran because d is falsey, using the not operator (!) makes d evaluate to true."
    +    end
    +  
    +    e = nil
    +    puts "Nil is also considered falsey. The value of e is: #{e}."
    +  
    +    if !e
    +      puts "This if statement ran because e is nil (a falsey value)."
    +    end
    +  end
    +  
    +  # ====================================================================================
    +  #  Conditionals
    +  # ====================================================================================
    +  # Remove the x from xrepl to run the code. Add the x back to ignore to code.
    +  xrepl do
    +    i_am_true  = true
    +    i_am_nil   = nil
    +    i_am_false = false
    +    i_am_hi    = "hi"
    +  
    +    puts "======== if statement"
    +    i_am_one = 1
    +    if i_am_one
    +      puts "This was printed because i_am_one is truthy."
    +    end
    +  
    +    puts "======== if/else statement"
    +    if i_am_false
    +      puts "This will NOT get printed because i_am_false is false."
    +    else
    +      puts "This was printed because i_am_false is false."
    +    end
    +  
    +    puts "======== if/elsif/else statement"
    +    if i_am_false
    +      puts "This will NOT get printed because i_am_false is false."
    +    elsif i_am_true
    +      puts "This was printed because i_am_true is true."
    +    else
    +      puts "This will NOT get printed i_am_true was true."
    +    end
    +  
    +    puts "======== case statement "
    +    i_am_one = 1
    +    case i_am_one
    +    when 10
    +      puts "case equaled: 10"
    +    when 9
    +      puts "case equaled: 9"
    +    when 5
    +      puts "case equaled: 5"
    +    when 1
    +      puts "case equaled: 1"
    +    else
    +      puts "Value wasn't cased."
    +    end
    +  
    +    puts "======== different types of comparisons"
    +    if 4 == 4
    +      puts "equal (4 == 4)"
    +    end
    +  
    +    if 4 != 3
    +      puts "not equal (4 != 3)"
    +    end
    +  
    +    if 3 < 4
    +      puts "less than (3 < 4)"
    +    end
    +  
    +    if 4 > 3
    +      puts "greater than (4 > 3)"
    +    end
    +  
    +    if ((4 > 3) || (3 < 4) || false)
    +      puts "or statement ((4 > 3) || (3 < 4) || false)"
    +    end
    +  
    +    if ((4 > 3) && (3 < 4))
    +      puts "and statement ((4 > 3) && (3 < 4))"
    +    end
    +  end
    +  
    +  # ====================================================================================
    +  # Looping
    +  # ====================================================================================
    +  # Remove the x from xrepl to run the code. Add the x back to ignore to code.
    +  xrepl do
    +    puts "======== times block"
    +    3.times do |i|
    +      puts i
    +    end
    +    puts "======== range block exclusive"
    +    (0...3).each do |i|
    +      puts i
    +    end
    +    puts "======== range block inclusive"
    +    (0..3).each do |i|
    +      puts i
    +    end
    +  end
    +  
    +  # ====================================================================================
    +  #  Enumerables
    +  # ====================================================================================
    +  # Remove the x from xrepl to run the code. Add the x back to ignore to code.
    +  xrepl do
    +    puts "======== array each"
    +    colors = ["red", "blue", "yellow"]
    +    colors.each do |color|
    +      puts color
    +    end
    +  
    +    puts '======== array each_with_index'
    +    colors = ["red", "blue", "yellow"]
    +    colors.each_with_index do |color, i|
    +      puts "#{color} at index #{i}"
    +    end
    +  end
    +  
    +  # Remove the x from xrepl to run the code. Add the x back to ignore to code.
    +  xrepl do
    +    puts "======== single parameter function"
    +    def add_one_to n
    +      n + 5
    +    end
    +  
    +    puts add_one_to(3)
    +  
    +    puts "======== function with default value"
    +    def function_with_default_value v = 10
    +      v * 10
    +    end
    +  
    +    puts "passing three: #{function_with_default_value(3)}"
    +    puts "passing nil: #{function_with_default_value}"
    +  
    +    puts "======== Or Equal (||=) operator for nil values"
    +    def function_with_nil_default_with_local a = nil
    +      result   = a
    +      result ||= "or equal operator was exected and set a default value"
    +    end
    +  
    +    puts "passing 'hi': #{function_with_nil_default_with_local 'hi'}"
    +    puts "passing nil: #{function_with_nil_default_with_local}"
    +  end
    +  
    +  # ====================================================================================
    +  #  Arrays
    +  # ====================================================================================
    +  # Remove the x from xrepl to run the code. Add the x back to ignore to code.
    +  xrepl do
    +    puts "======== Create an array with the numbers 1 to 10."
    +    one_to_ten = (1..10).to_a
    +    puts one_to_ten
    +  
    +    puts "======== Create a new array that only contains even numbers from the previous array."
    +    one_to_ten = (1..10).to_a
    +    evens = one_to_ten.find_all do |number|
    +      number % 2 == 0
    +    end
    +    puts evens
    +  
    +    puts "======== Create a new array that rejects odd numbers."
    +    one_to_ten = (1..10).to_a
    +    also_even = one_to_ten.reject do |number|
    +      number % 2 != 0
    +    end
    +    puts also_even
    +  
    +    puts "======== Create an array that doubles every number."
    +    one_to_ten = (1..10).to_a
    +    doubled = one_to_ten.map do |number|
    +      number * 2
    +    end
    +    puts doubled
    +  
    +    puts "======== Create an array that selects only odd numbers and then multiply those by 10."
    +    one_to_ten = (1..10).to_a
    +    odd_doubled = one_to_ten.find_all do |number|
    +      number % 2 != 0
    +    end.map do |odd_number|
    +      odd_number * 10
    +    end
    +    puts odd_doubled
    +  
    +    puts "======== All combination of numbers 1 to 10."
    +    one_to_ten = (1..10).to_a
    +    all_combinations = one_to_ten.product(one_to_ten)
    +    puts all_combinations
    +  
    +    puts "======== All uniq combinations of numbers. For example: [1, 2] is the same as [2, 1]."
    +    one_to_ten = (1..10).to_a
    +    uniq_combinations =
    +      one_to_ten.product(one_to_ten)
    +        .map do |unsorted_number|
    +      unsorted_number.sort
    +    end.uniq
    +    puts uniq_combinations
    +  end
    +  
    +  # ====================================================================================
    +  #  Advanced Arrays
    +  # ====================================================================================
    +  # Remove the x from xrepl to run the code. Add the x back to ignore to code.
    +  xrepl do
    +    puts "======== All unique Pythagorean Triples between 1 and 40 sorted by area of the triangle."
    +  
    +    one_to_hundred = (1..40).to_a
    +    triples =
    +      one_to_hundred.product(one_to_hundred).map do |width, height|
    +      [width, height, Math.sqrt(width ** 2 + height ** 2)]
    +    end.find_all do |_, _, hypotenuse|
    +      hypotenuse.to_i == hypotenuse
    +    end.map do |triangle|
    +      triangle.map(&:to_i)
    +    end.uniq do |triangle|
    +      triangle.sort
    +    end.map do |width, height, hypotenuse|
    +      [width, height, hypotenuse, (width * height) / 2]
    +    end.sort_by do |_, _, _, area|
    +      area
    +    end
    +  
    +    triples.each do |width, height, hypotenuse, area|
    +      puts "(#{width}, #{height}, #{hypotenuse}) = #{area}"
    +    end
    +  end
    +
    +#+end_src
    +
    +*** Crafting - Farming Game Starting Point - tests.rb
    +#+begin_src ruby
    +  # ./samples/99_genre_crafting/farming_game_starting_point/app/tests.rb
    +  # For advanced users:
    +  # You can put some quick verification tests here, any method
    +  # that starts with the `test_` will be run when you save this file.
    +  
    +  # Here is an example test and game
    +  
    +  # To run the test: ./dragonruby mygame --eval app/tests.rb --no-tick
    +  
    +  class MySuperHappyFunGame
    +    attr_gtk
    +  
    +    def tick
    +      outputs.solids << [100, 100, 300, 300]
    +    end
    +  end
    +  
    +  def test_universe args, assert
    +    game = MySuperHappyFunGame.new
    +    game.args = args
    +    game.tick
    +    assert.true!  args.outputs.solids.length == 1, "failure: a solid was not added after tick"
    +    assert.false! 1 == 2, "failure: some how, 1 equals 2, the world is ending"
    +    puts "test_universe completed successfully"
    +  end
    +  
    +  puts "running tests"
    +  $gtk.reset 100
    +  $gtk.log_level = :off
    +  $gtk.tests.start
    +
    +#+end_src
    +
     *** Dev Tools - Add Buttons To Console - main.rb
     #+begin_src ruby
       # ./samples/99_genre_dev_tools/add_buttons_to_console/app/main.rb
    @@ -24515,12 +25713,12 @@ Follows is a source code listing for all files that have been open sourced. This
             label = { x: b.x + state.buttons_frame_selection.size.half,
                       y: b.y,
                       text: "#{i + 1}", r: 180, g: 180, b: 180,
    -                  size_enum: -4, alignment_enum: 1 }.label
    +                  size_enum: -4, alignment_enum: 1 }.label!
       
    -        selection_border = b.merge(r: 40, g: 40, b: 40).border
    +        selection_border = b.merge(r: 40, g: 40, b: 40).border!
       
             if i == state.animation_frames_selected_index
    -          selection_border = b.merge(r: 40, g: 230, b: 200).border
    +          selection_border = b.merge(r: 40, g: 230, b: 200).border!
             end
       
             [selection_border, label]
    @@ -25257,6 +26455,528 @@ Follows is a source code listing for all files that have been open sourced. This
     
     #+end_src
     
    +*** Dungeon Crawl - Classics Jam - main.rb
    +#+begin_src ruby
    +  # ./samples/99_genre_dungeon_crawl/classics_jam/app/main.rb
    +  class Game
    +    attr_gtk
    +  
    +    def tick
    +      defaults
    +      render
    +      input
    +      calc
    +    end
    +  
    +    def defaults
    +      player.x              ||= 640
    +      player.y              ||= 360
    +      player.w              ||= 16
    +      player.h              ||= 16
    +      player.attacked_at    ||= -1
    +      player.angle          ||= 0
    +      player.future_player  ||= future_player_position 0, 0
    +      player.projectiles    ||= []
    +      player.damage         ||= 0
    +      state.level           ||= create_level level_one_template
    +    end
    +  
    +    def render
    +      outputs.sprites << level.walls.map do |w|
    +        w.merge(path: 'sprites/square/gray.png')
    +      end
    +  
    +      outputs.sprites << level.spawn_locations.map do |s|
    +        s.merge(path: 'sprites/square/blue.png')
    +      end
    +  
    +      outputs.sprites << player.projectiles.map do |p|
    +        p.merge(path: 'sprites/square/blue.png')
    +      end
    +  
    +      outputs.sprites << level.enemies.map do |e|
    +        e.merge(path: 'sprites/square/red.png')
    +      end
    +  
    +      outputs.sprites << player.merge(path: 'sprites/circle/green.png', angle: player.angle)
    +  
    +      outputs.labels << { x: 30, y: 30.from_top, text: "damage: #{player.damage || 0}" }
    +    end
    +  
    +    def input
    +      player.angle = inputs.directional_angle || player.angle
    +      if inputs.controller_one.key_down.a || inputs.keyboard.key_down.space
    +        player.attacked_at = state.tick_count
    +      end
    +    end
    +  
    +    def calc
    +      calc_player
    +      calc_projectiles
    +      calc_enemies
    +      calc_spawn_locations
    +    end
    +  
    +    def calc_player
    +      if player.attacked_at == state.tick_count
    +        player.projectiles << { at: state.tick_count,
    +                                x: player.x,
    +                                y: player.y,
    +                                angle: player.angle,
    +                                w: 4,
    +                                h: 4 }.center_inside_rect(player)
    +      end
    +  
    +      if player.attacked_at.elapsed_time > 5
    +        future_player = future_player_position inputs.left_right * 2, inputs.up_down * 2
    +        future_player_collision = future_collision player, future_player, level.walls
    +        player.x = future_player_collision.x if !future_player_collision.dx_collision
    +        player.y = future_player_collision.y if !future_player_collision.dy_collision
    +      end
    +    end
    +  
    +    def calc_projectile_collisions entities
    +      entities.each do |e|
    +        e.damage ||= 0
    +        player.projectiles.each do |p|
    +          if !p.collided && (p.intersect_rect? e)
    +            p.collided = true
    +            e.damage  += 1
    +          end
    +        end
    +      end
    +    end
    +  
    +    def calc_projectiles
    +      player.projectiles.map! do |p|
    +        dx, dy = p.angle.vector 10
    +        p.merge(x: p.x + dx, y: p.y + dy)
    +      end
    +  
    +      calc_projectile_collisions level.walls + level.enemies + level.spawn_locations
    +      player.projectiles.reject! { |p| p.at.elapsed_time > 10000 }
    +      player.projectiles.reject! { |p| p.collided }
    +      level.enemies.reject! { |e| e.damage > e.hp }
    +      level.spawn_locations.reject! { |s| s.damage > s.hp }
    +    end
    +  
    +    def calc_enemies
    +      level.enemies.map! do |e|
    +        dx =  0
    +        dx =  1 if e.x < player.x
    +        dx = -1 if e.x > player.x
    +        dy =  0
    +        dy =  1 if e.y < player.y
    +        dy = -1 if e.y > player.y
    +        future_e           = future_entity_position dx, dy, e
    +        future_e_collision = future_collision e, future_e, level.enemies + level.walls
    +        e.next_x = e.x
    +        e.next_y = e.y
    +        e.next_x = future_e_collision.x if !future_e_collision.dx_collision
    +        e.next_y = future_e_collision.y if !future_e_collision.dy_collision
    +        e
    +      end
    +  
    +      level.enemies.map! do |e|
    +        e.x = e.next_x
    +        e.y = e.next_y
    +        e
    +      end
    +  
    +      level.enemies.each do |e|
    +        player.damage += 1 if e.intersect_rect? player
    +      end
    +    end
    +  
    +    def calc_spawn_locations
    +      level.spawn_locations.map! do |s|
    +        s.merge(countdown: s.countdown - 1)
    +      end
    +      level.spawn_locations
    +           .find_all { |s| s.countdown.neg? }
    +           .each do |s|
    +        s.countdown = s.rate
    +        s.merge(countdown: s.rate)
    +        new_enemy = create_enemy s
    +        if !(level.enemies.find { |e| e.intersect_rect? new_enemy })
    +          level.enemies << new_enemy
    +        end
    +      end
    +    end
    +  
    +    def create_enemy spawn_location
    +      to_cell(spawn_location.ordinal_x, spawn_location.ordinal_y).merge hp: 2
    +    end
    +  
    +    def create_level level_template
    +      {
    +        walls:           level_template.walls.map { |w| to_cell(w.ordinal_x, w.ordinal_y).merge(w) },
    +        enemies:         [],
    +        spawn_locations: level_template.spawn_locations.map { |s| to_cell(s.ordinal_x, s.ordinal_y).merge(s) }
    +      }
    +    end
    +  
    +    def level_one_template
    +      {
    +        walls:           [{ ordinal_x: 25, ordinal_y: 20},
    +                          { ordinal_x: 25, ordinal_y: 21},
    +                          { ordinal_x: 25, ordinal_y: 22},
    +                          { ordinal_x: 25, ordinal_y: 23}],
    +        spawn_locations: [{ ordinal_x: 10, ordinal_y: 10, rate: 120, countdown: 0, hp: 5 }]
    +      }
    +    end
    +  
    +    def player
    +      state.player ||= {}
    +    end
    +  
    +    def level
    +      state.level  ||= {}
    +    end
    +  
    +    def future_collision entity, future_entity, others
    +      dx_collision = others.find { |o| o != entity && (o.intersect_rect? future_entity.dx) }
    +      dy_collision = others.find { |o| o != entity && (o.intersect_rect? future_entity.dy) }
    +  
    +      {
    +        dx_collision: dx_collision,
    +        x: future_entity.dx.x,
    +        dy_collision: dy_collision,
    +        y: future_entity.dy.y
    +      }
    +    end
    +  
    +    def future_entity_position dx, dy, entity
    +      {
    +        dx:   entity.merge(x: entity.x + dx),
    +        dy:   entity.merge(y: entity.y + dy),
    +        both: entity.merge(x: entity.x + dx, y: entity.y + dy)
    +      }
    +    end
    +  
    +    def future_player_position  dx, dy
    +      future_entity_position dx, dy, player
    +    end
    +  
    +    def to_cell ordinal_x, ordinal_y
    +      { x: ordinal_x * 16, y: ordinal_y * 16, w: 16, h: 16 }
    +    end
    +  end
    +  
    +  def tick args
    +    $game ||= Game.new
    +    $game.args = args
    +    $game.tick
    +  end
    +  
    +  $gtk.reset
    +  $game = nil
    +
    +#+end_src
    +
    +*** Fighting - Special Move Inputs - main.rb
    +#+begin_src ruby
    +  # ./samples/99_genre_fighting/01_special_move_inputs/app/main.rb
    +  def tick args
    +    #tick_instructions args, "Use LEFT and RIGHT arrow keys to move and SPACE to jump."
    +    defaults args
    +    render args
    +    input args
    +    calc args
    +  end
    +  
    +  # sets default values and creates empty collections
    +  # initialization only happens in the first frame
    +  def defaults args
    +    fiddle args
    +  
    +    args.state.tick_count = args.state.tick_count
    +    args.state.bridge_top = 128
    +    args.state.player.x  ||= 0                        # initializes player's properties
    +    args.state.player.y  ||= args.state.bridge_top
    +    args.state.player.w  ||= 64
    +    args.state.player.h  ||= 64
    +    args.state.player.dy ||= 0
    +    args.state.player.dx ||= 0
    +    args.state.player.r  ||= 0
    +    args.state.game_over_at ||= 0
    +    args.state.animation_time ||=0
    +  
    +    args.state.timeleft ||=0
    +    args.state.timeright ||=0
    +    args.state.lastpush ||=0
    +  
    +    args.state.inputlist ||=  ["j","k","l"]
    +  end
    +  
    +  # sets enemy, player, hammer values
    +  def fiddle args
    +    args.state.gravity                     = -0.5
    +    args.state.player_jump_power           = 10      # sets player values
    +    args.state.player_jump_power_duration  = 5
    +    args.state.player_max_run_speed        = 20
    +    args.state.player_speed_slowdown_rate  = 0.9
    +    args.state.player_acceleration         = 0.9
    +  end
    +  
    +  # outputs objects onto the screen
    +  def render args
    +    if (args.state.player.dx < 0.01) && (args.state.player.dx > -0.01)
    +      args.state.player.dx = 0
    +    end
    +  
    +    #move list
    +    (args.layout.rect_group row: 0, col_from_right: 8, drow: 0.3,
    +                            merge: { vertical_alignment_enum: 0, size_enum: -2 },
    +                            group: [
    +                              { text: "move:             WASD" },
    +                              { text: "jump:             Space" },
    +                              { text: "attack forwards:  J (while on ground" },
    +                              { text: "attack upwards:   K (while on groud)" },
    +                              { text: "attack backwards: J (while on ground and holding A)" },
    +                              { text: "attack downwards: K (while in air)" },
    +                              { text: "dash attack:      J, K in quick succession." },
    +                              { text: "shield: hold      J, K at the same time." },
    +                              { text: "dash backwards:   A, A in quick succession." },
    +                            ]).into args.outputs.labels
    +  
    +    # registered moves
    +    args.outputs.labels << { x: 0.to_layout_col,
    +                             y: 0.to_layout_row,
    +                             text: "input history",
    +                             size_enum: -2,
    +                             vertical_alignment_enum: 0 }
    +  
    +    (args.state.inputlist.take(5)).map do |s|
    +      { text: s, size_enum: -2, vertical_alignment_enum: 0 }
    +    end.yield_self do |group|
    +      (args.layout.rect_group row: 0.3, col: 0, drow: 0.3, group: group).into args.outputs.labels
    +    end
    +  
    +  
    +    #sprites
    +    player = [args.state.player.x, args.state.player.y,
    +              args.state.player.w, args.state.player.h,
    +              "sprites/square/white.png",
    +              args.state.player.r]
    +  
    +    playershield = [args.state.player.x - 20, args.state.player.y - 10,
    +                    args.state.player.w + 20, args.state.player.h + 20,
    +                    "sprites/square/blue.png",
    +                    args.state.player.r,
    +                    0]
    +  
    +    playerjab = [args.state.player.x + 32, args.state.player.y,
    +                 args.state.player.w, args.state.player.h,
    +                 "sprites/isometric/indigo.png",
    +                 args.state.player.r,
    +                 0]
    +  
    +    playerupper = [args.state.player.x, args.state.player.y + 32,
    +                   args.state.player.w, args.state.player.h,
    +                   "sprites/isometric/indigo.png",
    +                   args.state.player.r+90,
    +                   0]
    +  
    +    if ((args.state.tick_count - args.state.lastpush) <= 15)
    +      if (args.state.inputlist[0] == "<<")
    +        player = [args.state.player.x, args.state.player.y,
    +                  args.state.player.w, args.state.player.h,
    +                  "sprites/square/yellow.png", args.state.player.r]
    +      end
    +  
    +      if (args.state.inputlist[0] == "shield")
    +        player = [args.state.player.x, args.state.player.y,
    +                  args.state.player.w, args.state.player.h,
    +                  "sprites/square/indigo.png", args.state.player.r]
    +  
    +        playershield = [args.state.player.x - 10, args.state.player.y - 10,
    +                        args.state.player.w + 20, args.state.player.h + 20,
    +                        "sprites/square/blue.png", args.state.player.r, 50]
    +      end
    +  
    +      if (args.state.inputlist[0] == "back-attack")
    +        playerjab = [args.state.player.x - 20, args.state.player.y,
    +                     args.state.player.w - 10, args.state.player.h,
    +                     "sprites/isometric/indigo.png", args.state.player.r, 255]
    +      end
    +  
    +      if (args.state.inputlist[0] == "forward-attack")
    +        playerjab = [args.state.player.x + 32, args.state.player.y,
    +                     args.state.player.w, args.state.player.h,
    +                     "sprites/isometric/indigo.png", args.state.player.r, 255]
    +      end
    +  
    +      if (args.state.inputlist[0] == "up-attack")
    +        playerupper = [args.state.player.x, args.state.player.y + 32,
    +                       args.state.player.w, args.state.player.h,
    +                       "sprites/isometric/indigo.png", args.state.player.r + 90, 255]
    +      end
    +  
    +      if (args.state.inputlist[0] == "dair")
    +        playerupper = [args.state.player.x, args.state.player.y - 32,
    +                       args.state.player.w, args.state.player.h,
    +                       "sprites/isometric/indigo.png", args.state.player.r + 90, 255]
    +      end
    +  
    +      if (args.state.inputlist[0] == "dash-attack")
    +        playerupper = [args.state.player.x, args.state.player.y + 32,
    +                       args.state.player.w, args.state.player.h,
    +                       "sprites/isometric/violet.png", args.state.player.r + 90, 255]
    +  
    +        playerjab = [args.state.player.x + 32, args.state.player.y,
    +                     args.state.player.w, args.state.player.h,
    +                     "sprites/isometric/violet.png", args.state.player.r, 255]
    +      end
    +    end
    +  
    +    args.outputs.sprites << playerjab
    +    args.outputs.sprites << playerupper
    +    args.outputs.sprites << player
    +    args.outputs.sprites << playershield
    +  
    +    args.outputs.solids << 20.map_with_index do |i| # uses 20 squares to form bridge
    +      [i * 64, args.state.bridge_top - 64, 64, 64]
    +    end
    +  end
    +  
    +  # Performs calculations to move objects on the screen
    +  def calc args
    +    # Since velocity is the change in position, the change in x increases by dx. Same with y and dy.
    +    args.state.player.x  += args.state.player.dx
    +    args.state.player.y  += args.state.player.dy
    +  
    +    # Since acceleration is the change in velocity, the change in y (dy) increases every frame
    +    args.state.player.dy += args.state.gravity
    +  
    +    # player's y position is either current y position or y position of top of
    +    # bridge, whichever has a greater value
    +    # ensures that the player never goes below the bridge
    +    args.state.player.y  = args.state.player.y.greater(args.state.bridge_top)
    +  
    +    # player's x position is either the current x position or 0, whichever has a greater value
    +    # ensures that the player doesn't go too far left (out of the screen's scope)
    +    args.state.player.x  = args.state.player.x.greater(0)
    +  
    +    # player is not falling if it is located on the top of the bridge
    +    args.state.player.falling = false if args.state.player.y == args.state.bridge_top
    +    #args.state.player.rect = [args.state.player.x, args.state.player.y, args.state.player.h, args.state.player.w] # sets definition for player
    +  end
    +  
    +  # Resets the player by changing its properties back to the values they had at initialization
    +  def reset_player args
    +    args.state.player.x = 0
    +    args.state.player.y = args.state.bridge_top
    +    args.state.player.dy = 0
    +    args.state.player.dx = 0
    +    args.state.enemy.hammers.clear # empties hammer collection
    +    args.state.enemy.hammer_queue.clear # empties hammer_queue
    +    args.state.game_over_at = args.state.tick_count # game_over_at set to current frame (or passage of time)
    +  end
    +  
    +  # Processes input from the user to move the player
    +  def input args
    +    if args.state.inputlist.length > 5
    +      args.state.inputlist.pop
    +    end
    +  
    +    should_process_special_move = (args.inputs.keyboard.key_down.j)           ||
    +                                  (args.inputs.keyboard.key_down.k)           ||
    +                                  (args.inputs.keyboard.key_down.a)           ||
    +                                  (args.inputs.keyboard.key_down.d)           ||
    +                                  (args.inputs.controller_one.key_down.y)     ||
    +                                  (args.inputs.controller_one.key_down.x)     ||
    +                                  (args.inputs.controller_one.key_down.left)  ||
    +                                  (args.inputs.controller_one.key_down.right)
    +  
    +    if (should_process_special_move)
    +      if (args.inputs.keyboard.key_down.j && args.inputs.keyboard.key_down.k) ||
    +         (args.inputs.controller_one.key_down.x && args.inputs.controller_one.key_down.y)
    +        args.state.inputlist.unshift("shield")
    +      elsif (args.inputs.keyboard.key_down.k || args.inputs.controller_one.key_down.y) &&
    +            (args.state.inputlist[0] == "forward-attack") && ((args.state.tick_count - args.state.lastpush) <= 15)
    +        args.state.inputlist.unshift("dash-attack")
    +        args.state.player.dx = 20
    +      elsif (args.inputs.keyboard.key_down.j && args.inputs.keyboard.a) ||
    +            (args.inputs.controller_one.key_down.x && args.inputs.controller_one.key_down.left)
    +        args.state.inputlist.unshift("back-attack")
    +      elsif ( args.inputs.controller_one.key_down.x || args.inputs.keyboard.key_down.j)
    +        args.state.inputlist.unshift("forward-attack")
    +      elsif (args.inputs.keyboard.key_down.k || args.inputs.controller_one.key_down.y) &&
    +            (args.state.player.y > 128)
    +        args.state.inputlist.unshift("dair")
    +      elsif (args.inputs.keyboard.key_down.k || args.inputs.controller_one.key_down.y)
    +        args.state.inputlist.unshift("up-attack")
    +      elsif (args.inputs.controller_one.key_down.left || args.inputs.keyboard.key_down.a) &&
    +            (args.state.inputlist[0] == "<") &&
    +            ((args.state.tick_count - args.state.lastpush) <= 10)
    +        args.state.inputlist.unshift("<<")
    +        args.state.player.dx = -15
    +      elsif (args.inputs.controller_one.key_down.left || args.inputs.keyboard.key_down.a)
    +        args.state.inputlist.unshift("<")
    +        args.state.timeleft = args.state.tick_count
    +      elsif (args.inputs.controller_one.key_down.right || args.inputs.keyboard.key_down.d)
    +        args.state.inputlist.unshift(">")
    +      end
    +  
    +      args.state.lastpush = args.state.tick_count
    +    end
    +  
    +    if args.inputs.keyboard.space || args.inputs.controller_one.r2   # if the user presses the space bar
    +      args.state.player.jumped_at ||= args.state.tick_count # jumped_at is set to current frame
    +  
    +      # if the time that has passed since the jump is less than the player's jump duration and
    +      # the player is not falling
    +      if args.state.player.jumped_at.elapsed_time < args.state.player_jump_power_duration && !args.state.player.falling
    +        args.state.player.dy = args.state.player_jump_power # change in y is set to power of player's jump
    +      end
    +    end
    +  
    +    # if the space bar is in the "up" state (or not being pressed down)
    +    if args.inputs.keyboard.key_up.space || args.inputs.controller_one.key_up.r2
    +      args.state.player.jumped_at = nil # jumped_at is empty
    +      args.state.player.falling = true # the player is falling
    +    end
    +  
    +    if args.inputs.left # if left key is pressed
    +      if args.state.player.dx < -5
    +        args.state.player.dx = args.state.player.dx
    +      else
    +        args.state.player.dx = -5
    +      end
    +  
    +    elsif args.inputs.right # if right key is pressed
    +      if args.state.player.dx > 5
    +        args.state.player.dx = args.state.player.dx
    +      else
    +        args.state.player.dx = 5
    +      end
    +    else
    +      args.state.player.dx *= args.state.player_speed_slowdown_rate # dx is scaled down
    +    end
    +  
    +    if ((args.state.player.dx).abs > 5) #&& ((args.state.tick_count - args.state.lastpush) <= 10)
    +      args.state.player.dx *= 0.95
    +    end
    +  end
    +  
    +  def tick_instructions args, text, y = 715
    +    return if args.state.key_event_occurred
    +    if args.inputs.mouse.click ||
    +       args.inputs.keyboard.directional_vector ||
    +       args.inputs.keyboard.key_down.enter ||
    +       args.inputs.keyboard.key_down.space ||
    +       args.inputs.keyboard.key_down.escape
    +      args.state.key_event_occurred = true
    +    end
    +  
    +    args.outputs.debug << [0, y - 50, 1280, 60].solid
    +    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label
    +    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label
    +  end
    +
    +#+end_src
    +
     *** Lowrez - Nokia 3310 - main.rb
     #+begin_src ruby
       # ./samples/99_genre_lowrez/nokia_3310/app/main.rb
    @@ -25867,7 +27587,7 @@ Follows is a source code listing for all files that have been open sourced. This
             text: text,
             size_enum: -1.5,
             r: 255, g: 255, b: 255
    -      }.label
    +      }.label!
         end
       
         args.outputs.debug << {
    @@ -25877,7 +27597,7 @@ Follows is a source code listing for all files that have been open sourced. This
           size_enum: -0.5,
           alignment_enum: 1,
           r: 255, g: 255, b: 255
    -    }.label
    +    }.label!
       end
       
       def snake_demo args
    @@ -26129,7 +27849,7 @@ Follows is a source code listing for all files that have been open sourced. This
                   g: 240,
                   b: 216,
                   a: 100
    -            }.line
    +            }.line!
               end
       
               (NOKIA_WIDTH + 1).map_with_index do |i|
    @@ -26142,7 +27862,7 @@ Follows is a source code listing for all files that have been open sourced. This
                   g: 240,
                   b: 216,
                   a: 100
    -            }.line
    +            }.line!
               end
       
               @args.state.overlay_rendered = true
    @@ -26894,7 +28614,7 @@ Follows is a source code listing for all files that have been open sourced. This
               g: 128,
               b: 128,
               a: 80
    -        }.line
    +        }.line!
       
             args.outputs.static_debug << {
               x:  LOWREZ_X_OFFSET + (i * 10),
    @@ -26905,7 +28625,7 @@ Follows is a source code listing for all files that have been open sourced. This
               g: 128,
               b: 128,
               a: 80
    -        }.line
    +        }.line!
           end
         end
       
    @@ -26932,7 +28652,7 @@ Follows is a source code listing for all files that have been open sourced. This
             y: 720 - (i * 20),
             text: text,
             size_enum: -1.5
    -      }.label
    +      }.label!
         end
       
         args.outputs.debug << {
    @@ -26941,7 +28661,7 @@ Follows is a source code listing for all files that have been open sourced. This
           text: "INFO: dev mode is currently enabled. Comment out the invocation of ~render_debug~ within the ~tick~ method to hide the debug layer.",
           size_enum: -0.5,
           alignment_enum: 1
    -    }.label
    +    }.label!
       end
       
       $gtk.reset
    @@ -35432,58 +37152,21 @@ Follows is a source code listing for all files that have been open sourced. This
         class Args
           include ArgsDeprecated
           include Serialize
    -  
    -      # Contains information related to input devices and input events.
    -      #
    -      # @return [Inputs]
           attr_accessor :inputs
    -  
    -      # Contains the means to interact with output devices such as the screen.
    -      #
    -      # @return [Outputs]
           attr_accessor :outputs
    -  
    -      # Contains the means to interact with the audio mixer.
    -      #
    -      # @return [Hash]
           attr_accessor :audio
    -  
    -      # Contains display size information to assist in positioning things on the screen.
    -      #
    -      # @return [Grid]
           attr_accessor :grid
    -  
    -      # Provides access to game play recording facilities within Game Toolkit.
    -      #
    -      # @return [Recording]
           attr_accessor :recording
    -  
    -      # Gives you access to geometry related functions.
    -      #
    -      # @return [Geometry]
           attr_accessor :geometry
    -  
           attr_accessor :fn
    -  
    -      # This is where you'll put state associated with your video game.
    -      #
    -      # @return [OpenEntity]
           attr_accessor :state
    -  
    -      # Gives you access to the top level DragonRuby runtime.
    -      #
    -      # @return [Runtime]
    +      attr_accessor :temp_state
           attr_accessor :runtime
           alias_method :gtk, :runtime
    -  
           attr_accessor :passes
    -  
           attr_accessor :wizards
    -  
           attr_accessor :layout
    -  
           attr_accessor :easing
    -  
           attr_accessor :string
       
           def initialize runtime, recording
    @@ -35492,6 +37175,7 @@ Follows is a source code listing for all files that have been open sourced. This
             @audio = {}
             @passes = []
             @state = OpenEntity.new
    +        @temp_state = OpenEntity.new
             @state.tick_count = -1
             @runtime = runtime
             @recording = recording
    @@ -35521,11 +37205,12 @@ Follows is a source code listing for all files that have been open sourced. This
       
           def serialize
             {
    -          state: state.as_hash,
    -          inputs: inputs.serialize,
    -          passes: passes.serialize,
    -          outputs: outputs.serialize,
    -          grid: grid.serialize
    +          state:      state.as_hash,
    +          temp_state: temp_state.as_hash,
    +          inputs:     inputs.serialize,
    +          passes:     passes.serialize,
    +          outputs:    outputs.serialize,
    +          grid:       grid.serialize
             }
           end
       
    @@ -35691,10 +37376,10 @@ Follows is a source code listing for all files that have been open sourced. This
       
       class Assert
         def custom_assertion actual, expected, message = nil
    -      # this tell Game Toolkit that an assertion was performed (so that the test isn't marked inconclusive).
    +      # this tells Game Toolkit that an assertion was performed (so that the test isn't marked inconclusive).
           @assertion_performed = true
       
    -      # perform your custom logic here and rais an exception to denote a failure.
    +      # perform your custom logic here and raise an exception to denote a failure.
       
           raise "Some Error. #{message}."
         end
    @@ -35704,14 +37389,14 @@ Follows is a source code listing for all files that have been open sourced. This
           attr :assertion_performed
       
       =begin
    -  Us this if you are throwing your own exceptions and you want to mark the tests as ran (so that it wont be marked as inconclusive).
    +  Use this if you are throwing your own exceptions and you want to mark the tests as ran (so that it wont be marked as inconclusive).
       =end
           def ok!
             @assertion_performed = true
           end
       
       =begin
    -  Assert if a value is a thruthy value. All assert method take an optional final parameter that is the message to display to the user.
    +  Assert if a value is a truthy value. All assert methods take an optional final parameter that is the message to display to the user.
       
       @example
       
    @@ -35765,7 +37450,7 @@ Follows is a source code listing for all files that have been open sourced. This
             @assertion_performed = true
             if actual != expected
               actual_string = "#{actual}#{actual.nil? ? " (nil) " : " " }".strip
    -          message = "actual:\n#{actual_string}\n\ndid not equal\n\nexpected:\n#{expected}.\n#{message}"
    +          message = "actual:\n#{actual_string}\n\ndid not equal\n\nexpected:\n#{expected}\n#{message}"
               raise message
             end
             nil
    @@ -35775,7 +37460,7 @@ Follows is a source code listing for all files that have been open sourced. This
             @assertion_performed = true
             if actual == expected
               actual_string = "#{actual}#{actual.nil? ? " (nil) " : " " }".strip
    -          message = "actual:\n#{actual_string}\n\nequaled\n\nexpected:\n#{expected}.\n#{message}"
    +          message = "actual:\n#{actual_string}\n\nequaled\n\nexpected:\n#{expected}\n#{message}"
               raise message
             end
             nil
    @@ -35830,6 +37515,10 @@ Follows is a source code listing for all files that have been open sourced. This
           args.state
         end
       
    +    def temp_state
    +      args.temp_state
    +    end
    +  
         def inputs
           args.inputs
         end
    @@ -35857,6 +37546,14 @@ Follows is a source code listing for all files that have been open sourced. This
         def layout
           args.layout
         end
    +  
    +    def new_entity entity_type, init_hash = nil, &block
    +      args.state.new_entity entity_type, init_hash, &block
    +    end
    +  
    +    def new_entity_strict entity_type, init_hash = nil, &block
    +      args.state.new_entity_strict entity_type, init_hash, &block
    +    end
       end
     
     #+end_src
    @@ -35903,7 +37600,7 @@ Follows is a source code listing for all files that have been open sourced. This
         attr_accessor :x, :y, :w, :h, :path, :angle, :a, :r, :g, :b, :tile_x,
                       :tile_y, :tile_w, :tile_h, :flip_horizontally,
                       :flip_vertically, :angle_anchor_x, :angle_anchor_y, :id,
    -                  :source_x, :source_y, :source_w, :source_h
    +                  :source_x, :source_y, :source_w, :source_h, :blendmode_enum
       
         def primitive_marker
           :sprite
    @@ -35948,7 +37645,7 @@ Follows is a source code listing for all files that have been open sourced. This
                         :font_style, :menu
       
           def initialize
    -        @font_style = FontStyle.new(font: 'font.ttf', size_enum: -1, line_height: 1.1)
    +        @font_style = FontStyle.new(font: 'font.ttf', size_enum: -1.5, line_height: 1.1)
             @menu = Menu.new self
             @disabled = false
             @log_offset = 0
    @@ -35968,6 +37665,8 @@ Follows is a source code listing for all files that have been open sourced. This
             @text_color = Color.new [255, 255, 255]
             @error_color = Color.new [200, 50, 50]
             @header_color = Color.new [100, 200, 220]
    +        @code_color = Color.new [210, 168, 255]
    +        @comment_color    = Color.new [0, 200, 100]
             @animation_duration = 1.seconds
             @shown_at = -1
             load_history
    @@ -36242,6 +37941,8 @@ Follows is a source code listing for all files that have been open sourced. This
       
               if cmd == 'quit' || cmd == ':wq' || cmd == ':q!' || cmd == ':q' || cmd == ':wqa'
                 $gtk.request_quit
    +          elsif cmd.start_with? ':'
    +            send ((cmd.gsub '-', '_').gsub ':', '')
               else
                 puts "-> #{cmd}"
                 begin
    @@ -36250,13 +37951,19 @@ Follows is a source code listing for all files that have been open sourced. This
                   if $results.nil?
                     puts "=> nil"
                   elsif $results == :console_silent_eval
    +                # do nothing since the console is silent
                   else
                     puts "=> #{$results}"
                   end
                   @last_command_errored = false
                 rescue Exception => e
                   try_search_docs e
    -              puts  "* EXCEPTION: #{e}"
    +              # if an exception is thrown and the bactrace includes something helpful, then show it
    +              if (e.backtrace || []).first && (e.backtrace.first.include? "(eval)")
    +                puts  "* EXCEPTION: #{e}"
    +              else
    +                puts  "* EXCEPTION: #{e}\n#{e.__backtrace_to_org__}"
    +              end
                 end
               end
             end
    @@ -36483,6 +38190,11 @@ Follows is a source code listing for all files that have been open sourced. This
             end
       
             render_log_offset args
    +  
    +        args.outputs.reserved << { x: 10.from_right, y: @bottom + 10,
    +                                   text: "Press CTRL+g or ESCAPE to clear the prompt.",
    +                                   vertical_alignment_enum: 0,
    +                                   alignment_enum: 2, r: 80, g: 80, b: 80 }.label!
           end
       
           def render_log_offset args
    @@ -36505,7 +38217,7 @@ Follows is a source code listing for all files that have been open sourced. This
           end
       
           def include_subdued_markers? text
    -        include_any_words? text, subdued_markers
    +        (text.start_with? "* INFO: ") && (include_any_words? text, subdued_markers)
           end
       
           def include_any_words? text, words
    @@ -36651,8 +38363,32 @@ Follows is a source code listing for all files that have been open sourced. This
             (log_entry.start_with? "**** ")
           end
       
    +      def code? log_entry
    +        (just_symbol? log_entry) || (codeblock_marker? log_entry)
    +      end
    +  
    +      def just_symbol? log_entry
    +        scrubbed = log_entry.gsub("*", "").strip
    +        (scrubbed.start_with? ":") && (!scrubbed.include? " ") && (!scrubbed.include? "=>")
    +      end
    +  
    +      def code_comment? log_entry
    +        return true  if log_entry.strip.start_with?("# ")
    +        return false
    +      end
    +  
    +      def codeblock_marker? log_entry
    +        return true if log_entry.strip.start_with?("#+begin_src")
    +        return true if log_entry.strip.start_with?("#+end_src")
    +        return false
    +      end
    +  
           def color_for_log_entry(log_entry)
    -        if include_row_marker? log_entry
    +        if code? log_entry
    +          @code_color
    +        elsif code_comment? log_entry
    +          @comment_color
    +        elsif include_row_marker? log_entry
               @text_color
             elsif include_error_marker? log_entry
               @error_color
    @@ -36727,6 +38463,10 @@ Follows is a source code listing for all files that have been open sourced. This
               @color
             end
       
    +        def to_s
    +          "GTK::Console::Color #{to_h}"
    +        end
    +  
             def to_h
               { r: @color[0], g: @color[1], b: @color[2], a: @color[3] }
             end
    @@ -36774,7 +38514,7 @@ Follows is a source code listing for all files that have been open sourced. This
                 size_enum: size_enum,
                 alignment_enum: alignment_enum,
                 **color.to_h,
    -          }.label
    +          }.label!
             end
           end
         end
    @@ -36838,7 +38578,7 @@ Follows is a source code listing for all files that have been open sourced. This
       
             def itch_wizard_clicked
               @console.scroll_to_bottom
    -          $wizards.itch.start
    +          $wizards.itch.restart
             end
       
             def docs_clicked
    @@ -36863,6 +38603,7 @@ Follows is a source code listing for all files that have been open sourced. This
                 @buttons = [
                   (button id: :record,      row: 0, col:   9, text: "record gameplay",       method: :record_clicked),
                   (button id: :replay,      row: 0, col:  10, text: "start replay",          method: :replay_clicked),
    +              *custom_buttons
                 ]
               elsif @menu_shown == :hidden
                 @buttons = [
    @@ -36921,8 +38662,8 @@ Follows is a source code listing for all files that have been open sourced. This
                 method: method
               }.let do |entity|
                 primitives = []
    -            primitives << entity[:rect].merge(a: 164).solid
    -            primitives << entity[:rect].merge(r: 255, g: 255, b: 255).border
    +            primitives << entity[:rect].solid!(a: 164)
    +            primitives << entity[:rect].border!(r: 255, g: 255, b: 255)
                 primitives << text.wrapped_lines(5)
                                   .map_with_index do |l, i|
                                     [
    @@ -37023,14 +38764,14 @@ Follows is a source code listing for all files that have been open sourced. This
               return if @cursor_position.zero?
       
               new_pos = @cursor_position - 1
    -          (is_word_boundary? @current_input_str[new_pos]) ? 
    +          (is_word_boundary? @current_input_str[new_pos]) ?
                   (new_pos -= 1 until !(is_word_boundary? @current_input_str[new_pos - 1]) || new_pos.zero?):
                   (new_pos -= 1 until (is_word_boundary? @current_input_str[new_pos - 1]) || new_pos.zero?)
       
               @cursor_position = new_pos
               update_cursor_position_px
             end
    -          
    +  
             def move_cursor_right
               @cursor_position += 1 if @cursor_position < current_input_str.length
               update_cursor_position_px
    @@ -37043,7 +38784,7 @@ Follows is a source code listing for all files that have been open sourced. This
               (is_word_boundary? @current_input_str[new_pos]) ?
                   (new_pos += 1 until !(is_word_boundary? @current_input_str[new_pos]) || (new_pos.equal? str_len)):
                   (new_pos += 1 until (is_word_boundary? @current_input_str[new_pos]) || (new_pos.equal? str_len))
    -          
    +  
               @cursor_position = new_pos
               update_cursor_position_px
             end
    @@ -37126,17 +38867,17 @@ Follows is a source code listing for all files that have been open sourced. This
                 "#{" " * (string_width.length - c.length) } #{c} |"
               end.join
       
    -          # remove seperators between empty values
    +          # remove separators between empty values
               formated_row = formated_row.gsub("  |  ", "     ")
       
               puts formated_row
             end
       
    -        def pretty_print_row_seperator string_width, cell_width, column_width, columns
    +        def pretty_print_row_separator string_width, cell_width, column_width, columns
               # this is a joint: +--------
               column_joint = "+#{"-" * cell_width}"
       
    -          # multiple joints create a row seperator: +----+----+
    +          # multiple joints create a row separator: +----+----+
               puts (column_joint * columns) + "+"
             end
       
    @@ -37145,12 +38886,12 @@ Follows is a source code listing for all files that have been open sourced. This
               args.outputs.reserved << (@cursor_color.to_h.merge x: x + @cursor_position_px + 0.5,
                                                                  y: y + 5,
                                                                  x2: x + @cursor_position_px + 0.5,
    -                                                             y2: y + @font_style.letter_size.y + 5)
    +                                                             y2: y + @font_style.letter_size.y + 4)
       
               args.outputs.reserved << (@cursor_color.to_h.merge x: x + @cursor_position_px + 1,
                                                                  y: y + 5,
                                                                  x2: x + @cursor_position_px + 1,
    -                                                             y2: y + @font_style.letter_size.y + 5)
    +                                                             y2: y + @font_style.letter_size.y + 4)
       
               # debugging rectangle for string
               # args.outputs.reserved << (@cursor_color.to_h.merge x: x,
    @@ -37778,7 +39519,7 @@ Follows is a source code listing for all files that have been open sourced. This
               :l1, :r1,
               :l2, :r2,
               :l3, :r3,
    -          :start, :select,
    +          :start, :select, :home,
               :directional_up, :directional_down, :directional_left, :directional_right
             ].freeze
       
    @@ -37786,6 +39527,22 @@ Follows is a source code listing for all files that have been open sourced. This
               attr label
             end
       
    +        def back
    +          @select
    +        end
    +  
    +        def back= value
    +          @select = value
    +        end
    +  
    +        def guide
    +          @home
    +        end
    +  
    +        def guide= value
    +          @home = value
    +        end
    +  
             # Activate a key.
             #
             # @return [void]
    @@ -37834,7 +39591,7 @@ Follows is a source code listing for all files that have been open sourced. This
       
             error_message = <<-S
       * ERROR
    -  The GTK::DirectionalKeys module should only be included in objects that respond to the following api heirarchy:
    +  The GTK::DirectionalKeys module should only be included in objects that respond to the following api hierarchy:
       
       - (#{ directional_methods.join("|") })
       - key_held.(#{ directional_methods.join("|") })
    @@ -37891,6 +39648,12 @@ Follows is a source code listing for all files that have been open sourced. This
             end
           end
       
    +      def directional_angle
    +        return nil unless directional_vector
    +  
    +        Math.atan2(up_down, left_right).to_degrees
    +      end
    +  
           def method_missing m, *args
             # combine the key with ctrl_
             if m.to_s.start_with?("ctrl_")
    @@ -38123,6 +39886,22 @@ Follows is a source code listing for all files that have been open sourced. This
       
       module GTK
         module Geometry
    +      def self.rotate_point point, angle, around = nil
    +        s = Math.sin a.to_radians
    +        c = Math.cos a.to_radians
    +        px = point.x
    +        py = point.y
    +        cx = 0
    +        cy = 0
    +        if around
    +          cx = around.x
    +          cy = around.y
    +        end
    +  
    +        point.merge(x: ((px - cx) * c - (py - cy) * s) + cx,
    +                    y: ((px - cx) * s + (py - cy) * c) + cy)
    +      end
    +  
           # Returns f(t) for a cubic Bezier curve.
           def self.cubic_bezier t, a, b, c, d
             s  = 1 - t
    @@ -38204,7 +39983,7 @@ Follows is a source code listing for all files that have been open sourced. This
           rescue Exception => e
             raise e, <<-S
       * ERROR:
    -  center_inside_rect for self #{self} and other_rect #{other_rect}. Failed with exception #{e}.
    +  center_inside_rect for self #{self} and other_rect #{other_rect}.\n#{e}.
       S
           end
       
    @@ -38221,7 +40000,7 @@ Follows is a source code listing for all files that have been open sourced. This
           rescue Exception => e
             raise e, <<-S
       * ERROR:
    -  center_inside_rect_x for self #{self} and other_rect #{other_rect}. Failed with exception #{e}.
    +  center_inside_rect_x for self #{self} and other_rect #{other_rect}.\n#{e}.
       S
           end
       
    @@ -38238,7 +40017,7 @@ Follows is a source code listing for all files that have been open sourced. This
           rescue Exception => e
             raise e, <<-S
       * ERROR:
    -  center_inside_rect_y for self #{self} and other_rect #{other_rect}. Failed with exception #{e}.
    +  center_inside_rect_y for self #{self} and other_rect #{other_rect}.\n#{e}.
       S
           end
       
    @@ -38247,7 +40026,7 @@ Follows is a source code listing for all files that have been open sourced. This
           end
       
       
    -      # Returns a primitive that is anchored/repositioned based off its retangle.
    +      # Returns a primitive that is anchored/repositioned based off its rectangle.
           # @gtk
           def anchor_rect anchor_x, anchor_y
             current_w = self.w
    @@ -38383,10 +40162,10 @@ Follows is a source code listing for all files that have been open sourced. This
       
           # @gtk
           def self.intersect_rect? rect_one, rect_two, tolerance = 0.1
    -        return false if rect_one.right - tolerance < rect_two.left + tolerance
    -        return false if rect_one.left + tolerance > rect_two.right - tolerance
    -        return false if rect_one.top - tolerance < rect_two.bottom + tolerance
    -        return false if rect_one.bottom + tolerance > rect_two.top - tolerance
    +        return false if ((rect_one.x + rect_one.w) - tolerance) < (rect_two.x + tolerance)
    +        return false if (rect_one.x + tolerance) > ((rect_two.x + rect_two.w) - tolerance)
    +        return false if ((rect_one.y + rect_one.h) - tolerance) < (rect_two.y + tolerance)
    +        return false if (rect_one.y + tolerance) > ((rect_two.y + rect_two.h) - tolerance)
             return true
           rescue Exception => e
             context_help_rect_one = (rect_one.__help_contract_implementation contract_intersect_rect?)[:not_implemented_methods]
    @@ -38414,6 +40193,7 @@ Follows is a source code listing for all files that have been open sourced. This
       - rect_one: #{rect_one}
       - rect_two: #{rect_two}
       #{context_help}
    +  \n#{e}
       S
           end
       
    @@ -38424,14 +40204,14 @@ Follows is a source code listing for all files that have been open sourced. This
             y = y.shift_down(size * anchor_y)
             [x, y, size, size]
           rescue Exception => e
    -        raise e, ":to_square failed for size: #{size} x: #{x} y: #{y} anchor_x: #{anchor_x} anchor_y: #{anchor_y}."
    +        raise e, ":to_square failed for size: #{size} x: #{x} y: #{y} anchor_x: #{anchor_x} anchor_y: #{anchor_y}.\n#{e}"
           end
       
           # @gtk
           def self.distance point_one, point_two
             Math.sqrt((point_two.x - point_one.x)**2 + (point_two.y - point_one.y)**2)
           rescue Exception => e
    -        raise e, ":distance failed for point_one: #{point_one} point_two #{point_two}."
    +        raise e, ":distance failed for point_one: #{point_one} point_two #{point_two}.\n#{e}"
           end
       
           # @gtk
    @@ -38440,31 +40220,34 @@ Follows is a source code listing for all files that have been open sourced. This
             d_x = end_point.x - start_point.x
             Math::PI.+(Math.atan2(d_y, d_x)).to_degrees
           rescue Exception => e
    -        raise e, ":angle_from failed for start_point: #{start_point} end_point: #{end_point}."
    +        raise e, ":angle_from failed for start_point: #{start_point} end_point: #{end_point}.\n#{e}"
           end
       
           # @gtk
           def self.angle_to start_point, end_point
             angle_from end_point, start_point
           rescue Exception => e
    -        raise e, ":angle_to failed for start_point: #{start_point} end_point: #{end_point}."
    +        raise e, ":angle_to failed for start_point: #{start_point} end_point: #{end_point}.\n#{e}"
           end
       
           # @gtk
           def self.point_inside_circle? point, circle_center_point, radius
             (point.x - circle_center_point.x) ** 2 + (point.y - circle_center_point.y) ** 2 < radius ** 2
           rescue Exception => e
    -        raise e, ":point_inside_circle? failed for point: #{point} circle_center_point: #{circle_center_point} radius: #{radius}"
    +        raise e, ":point_inside_circle? failed for point: #{point} circle_center_point: #{circle_center_point} radius: #{radius}.\n#{e}"
           end
       
           # @gtk
           def self.inside_rect? inner_rect, outer_rect, tolerance = 0.0
    +        return nil if !inner_rect
    +        return nil if !outer_rect
    +  
             inner_rect.x     + tolerance >= outer_rect.x     - tolerance &&
    -        inner_rect.right - tolerance <= outer_rect.right + tolerance &&
    +        (inner_rect.x + inner_rect.w) - tolerance <= (outer_rect.x + outer_rect.w) + tolerance &&
             inner_rect.y     + tolerance >= outer_rect.y     - tolerance &&
    -        inner_rect.top   - tolerance <= outer_rect.top   + tolerance
    +        (inner_rect.y + inner_rect.h) - tolerance <= (outer_rect.y + outer_rect.h) + tolerance
           rescue Exception => e
    -        raise e, ":inside_rect? failed for inner_rect: #{inner_rect} outer_rect: #{outer_rect}."
    +        raise e, ":inside_rect? failed for inner_rect: #{inner_rect} outer_rect: #{outer_rect}.\n#{e}"
           end
       
           # @gtk
    @@ -38499,7 +40282,7 @@ Follows is a source code listing for all files that have been open sourced. This
               return rect
             end
           rescue Exception => e
    -        raise e, ":scale_rect_extended failed for rect: #{rect} percentage_x: #{percentage_x} percentage_y: #{percentage_y} anchors_x: #{anchor_x} anchor_y: #{anchor_y}."
    +        raise e, ":scale_rect_extended failed for rect: #{rect} percentage_x: #{percentage_x} percentage_y: #{percentage_y} anchors_x: #{anchor_x} anchor_y: #{anchor_y}.\n#{e}"
           end
       
           # @gtk
    @@ -38513,7 +40296,21 @@ Follows is a source code listing for all files that have been open sourced. This
                                          anchor_x: anchor_x,
                                          anchor_y: anchor_y
           rescue Exception => e
    -        raise e, ":scale_rect failed for rect: #{rect} percentage: #{percentage} anchors [#{anchor_x} (x), #{anchor_y} (y)]."
    +        raise e, ":scale_rect failed for rect: #{rect} percentage: #{percentage} anchors [#{anchor_x} (x), #{anchor_y} (y)].\n#{e}"
    +      end
    +  
    +      def self.rect_to_line rect
    +        l = rect.to_hash.line
    +        l.merge(x2: l.x + l.w - 1,
    +                y2: l.y + l.h)
    +      end
    +  
    +      def self.rect_center_point rect
    +        { x: rect.x + rect.w.half, y: rect.y + rect.h.half }
    +      end
    +  
    +      def rect_center_point
    +        Geometry.rect_center_point self
           end
         end # module Geometry
       end # module GTK
    @@ -38710,6 +40507,14 @@ Follows is a source code listing for all files that have been open sourced. This
           def bottom_right
             [@right, @bottom].point
           end
    +  
    +      def x
    +        0
    +      end
    +  
    +      def y
    +        0
    +      end
         end
       end
     
    @@ -38911,6 +40716,30 @@ Follows is a source code listing for all files that have been open sourced. This
             }
           end
       
    +      def self.method_to_key_hash
    +        return @method_to_key_hash if @method_to_key_hash
    +        @method_to_key_hash = {}
    +        string_representation_overrides ||= {
    +          backspace: '\b'
    +        }
    +        char_to_method_hash.each do |k, v|
    +          v.each do |vi|
    +            t = { char_or_raw_key: k }
    +  
    +            if k.is_a? Numeric
    +              t[:raw_key] = k
    +              t[:string_representation] = "raw_key == #{k}"
    +            else
    +              t[:char] = k
    +              t[:string_representation] = "\"#{k.strip}\""
    +            end
    +  
    +            @method_to_key_hash[vi] = t
    +          end
    +        end
    +        @method_to_key_hash
    +      end
    +  
           def self.char_to_method char, int = nil
             methods = char_to_method_hash[char] || char_to_method_hash[int]
             methods ? methods.dup : [char.to_sym || int]
    @@ -39025,24 +40854,32 @@ Follows is a source code listing for all files that have been open sourced. This
           end
       
           def method_missing m, *args
    -        begin
    -          define_singleton_method(m) do
    -            r = self.instance_variable_get("@#{m.without_ending_bang}".to_sym)
    -            clear_key m
    -            return r
    -          end
    +        if KeyboardKeys.method_to_key_hash[m.without_ending_bang]
    +          begin
    +            define_singleton_method(m) do
    +              r = self.instance_variable_get("@#{m.without_ending_bang}".to_sym)
    +              clear_key m
    +              return r
    +            end
       
    -          return self.send m
    -        rescue Exception => e
    -          log_important "#{e}"
    +            return self.send m
    +          rescue Exception => e
    +            log_important "#{e}"
    +          end
             end
       
    +        did_you_mean = KeyboardKeys.method_to_key_hash.find_all do |k, v|
    +          k.to_s[0..1] == m.to_s[0..1]
    +        end.map {|k, v| ":#{k} (#{v[:string_representation]})" }
    +        did_you_mean_string = ""
    +        did_you_mean_string = ". Did you mean #{did_you_mean.join ", "}?"
    +  
             raise <<-S
       * ERROR:
    -  There is no member on the keyboard called #{m}. Here is a to_s representation of what's available:
    -  
    -  #{KeyboardKeys.char_to_method_hash.map { |k, v| "[#{k} => #{v.join(",")}]" }.join("  ")}
    +  #{KeyboardKeys.method_to_key_hash.map { |k, v| "** :#{k} #{v.string_representation}" }.join("\n")}
       
    +  There is no key on the keyboard called :#{m}#{did_you_mean_string}.
    +  Full list of available keys =:points_up:=.
       S
           end
       
    @@ -39426,6 +41263,10 @@ Follows is a source code listing for all files that have been open sourced. This
               (controller_one && controller_one.directional_vector)
           end
       
    +      def directional_angle
    +        keyboard.directional_angle || (controller_one && controller_one.directional_angle)
    +      end
    +  
           # Returns a signal indicating right (`1`), left (`-1`), or neither ('0').
           #
           # @return [Integer]
    @@ -39497,19 +41338,12 @@ Follows is a source code listing for all files that have been open sourced. This
     *** ios_wizard.rb
     #+begin_src ruby
       # ./dragon/ios_wizard.rb
    +  # Contributors outside of DragonRuby who also hold Copyright: Michał Dudziński
       # Copyright 2019 DragonRuby LLC
       # MIT License
       # ios_wizard.rb has been released under MIT (*only this file*).
       
    -  class WizardException < Exception
    -    attr_accessor :console_primitives
    -  
    -    def initialize *console_primitives
    -      @console_primitives = console_primitives
    -    end
    -  end
    -  
    -  class IOSWizard
    +  class IOSWizard < Wizard
         def initialize
           @doctor_executed_at = 0
         end
    @@ -39522,23 +41356,45 @@ Follows is a source code listing for all files that have been open sourced. This
           @steps ||= []
         end
       
    -    def steps_development_build
    +    def prerequisite_steps
           [
             :check_for_xcode,
             :check_for_brew,
             :check_for_certs,
    -        :check_for_device,
    -        :check_for_dev_profile,
    +      ]
    +    end
    +  
    +    def app_metadata_retrieval_steps
    +      [
             :determine_team_identifier,
             :determine_app_name,
             :determine_app_id,
    -        :blow_away_temp,
    +      ]
    +    end
    +  
    +    def steps_development_build
    +      [
    +        *prerequisite_steps,
    +  
    +        :check_for_device,
    +        :check_for_dev_profile,
    +  
    +        *app_metadata_retrieval_steps,
    +  
    +        :clear_tmp_directory,
             :stage_app,
    +  
             :development_write_info_plist,
    +  
             :write_entitlements_plist,
             :compile_icons,
    -        :create_payload_directory,
    +        :clear_payload_directory,
    +  
    +        :create_payload_directory_dev,
    +  
    +        :create_payload,
             :code_sign_payload,
    +  
             :create_ipa,
             :deploy
           ]
    @@ -39546,20 +41402,27 @@ Follows is a source code listing for all files that have been open sourced. This
       
         def steps_production_build
           [
    -        :check_for_xcode,
    -        :check_for_brew,
    -        :check_for_certs,
    +        *prerequisite_steps,
    +  
             :check_for_distribution_profile,
    -        :determine_team_identifier,
    -        :determine_app_name,
    -        :determine_app_id,
    -        :blow_away_temp,
    +        :determine_app_version,
    +  
    +        *app_metadata_retrieval_steps,
    +  
    +        :clear_tmp_directory,
             :stage_app,
    +  
             :production_write_info_plist,
    +  
             :write_entitlements_plist,
             :compile_icons,
    -        :create_payload_directory,
    +        :clear_payload_directory,
    +  
    +        :create_payload_directory_prod,
    +  
    +        :create_payload,
             :code_sign_payload,
    +  
             :create_ipa,
             :print_publish_help
           ]
    @@ -39595,6 +41458,8 @@ Follows is a source code listing for all files that have been open sourced. This
           @steps = steps_development_build
           @steps = steps_production_build if @production_build
           @certificate_name = nil
    +      @app_version = opts[:version]
    +      @app_version = "1.0" if @opts[:env] == :dev && !@app_version
           init_wizard_status
           log_info "Starting iOS Wizard so we can deploy to your device."
           @start_at = Kernel.global_tick_count
    @@ -39616,8 +41481,10 @@ Follows is a source code listing for all files that have been open sourced. This
             log "=" * $console.console_text_width
           else
             log_error e.to_s
    +        log e.__backtrace_to_org__
           end
       
    +      init_wizard_status
           $console.set_command "$wizards.ios.start env: :#{@opts[:env]}"
         end
       
    @@ -39724,13 +41591,66 @@ Follows is a source code listing for all files that have been open sourced. This
           return "profiles/development.mobileprovision"
         end
       
    +    def ios_metadata_template
    +      <<-S
    +  # ios_metadata.txt is used by the Pro version of DragonRuby Game Toolkit to create iOS apps.
    +  # Information about the Pro version can be found at: http://dragonruby.org/toolkit/game#purchase
    +  
    +  # teamid needs to be set to your assigned Team Id which can be found at https://developer.apple.com/account/#/membership/
    +  teamid=
    +  # appid needs to be set to your application identifier which can be found at https://developer.apple.com/account/resources/identifiers/list
    +  appid=
    +  # appname is the name you want to show up underneath the app icon on the device. Keep it under 10 characters.
    +  appname=
    +  S
    +    end
    +  
    +    def ios_metadata
    +      contents = $gtk.read_file 'metadata/ios_metadata.txt'
    +  
    +      if !contents
    +        $gtk.write_file 'metadata/ios_metadata.txt', ios_metadata_template
    +        contents = $gtk.read_file 'metadata/ios_metadata.txt'
    +      end
    +  
    +      kvps = contents.each_line
    +                     .reject { |l| l.strip.length == 0 || (l.strip.start_with? "#") }
    +                     .map do |l|
    +                       key, value = l.split("=")
    +                       [key.strip.to_sym, value.strip]
    +                     end.flatten
    +      Hash[*kvps]
    +    end
    +  
    +    def game_metadata
    +      contents = $gtk.read_file 'metadata/game_metadata.txt'
    +  
    +      kvps = contents.each_line
    +                     .reject { |l| l.strip.length == 0 || (l.strip.start_with? "#") }
    +                     .map do |l|
    +                       key, value = l.split("=")
    +                       [key.strip.to_sym, value.strip]
    +                     end.flatten
    +      Hash[*kvps]
    +    end
    +  
    +    def raise_ios_metadata_required
    +      raise WizardException.new(
    +              "* mygame/metadata/ios_metadata.txt needs to be filled out.",
    +              "You need to update metadata/ios_metadata.txt with a valid teamid, appname, and appid.",
    +              "Instructions for where the values should come from are within metadata/ios_metadata.txt."
    +            )
    +    end
    +  
         def determine_team_identifier
    -      @team_name = (team_identifier_from_provisioning_profile @opts[:env])
    -      log_info "Team Identifer is: #{@team_name}"
    +      @team_id = (ios_metadata.teamid || "")
    +      raise_ios_metadata_required if @team_id.strip.length == 0
    +      log_info "Team Identifer is: #{@team_id}"
         end
       
         def determine_app_name
    -      @app_name = (provisioning_profile_xml @opts[:env])[:children].first[:children].first[:children][1][:children].first[:data]
    +      @app_name = (ios_metadata.appname || "")
    +      raise_ios_metadata_required if @app_name.strip.length == 0
           log_info "App name is: #{@app_name}."
         end
       
    @@ -39754,36 +41674,9 @@ Follows is a source code listing for all files that have been open sourced. This
           $gtk.parse_xml scrubbed
         end
       
    -    def app_id_from_provisioning_profile environment
    -      application_identifier_index = (provisioning_profile_xml environment)[:children][0][:children][0][:children][13][:children][0][:children][0][:data]
    -      (provisioning_profile_xml environment)[:children][0][:children][0][:children][13][:children].each.with_index do |node, i|
    -        if node[:children] && node[:children][0] && node[:children][0][:data] == "application-identifier"
    -          application_identifier_index = i
    -          break
    -        end
    -      end
    -  
    -      app_id_with_team_identifier = (provisioning_profile_xml environment)[:children].first[:children].first[:children][13][:children][application_identifier_index + 1][:children].first[:data]
    -      team_identifer = team_identifier_from_provisioning_profile environment
    -      app_id_with_team_identifier.gsub "#{team_identifer}.", ""
    -    end
    -  
    -    def team_identifier_from_provisioning_profile environment
    -      team_identifer_index = (provisioning_profile_xml environment)[:children][0][:children][0][:children][13][:children][0][:children][0][:data]
    -  
    -      (provisioning_profile_xml environment)[:children][0][:children][0][:children][13][:children].each.with_index do |node, i|
    -        if node[:children] && node[:children][0] && node[:children][0][:data] == "com.apple.developer.team-identifier"
    -          team_identifer_index = i
    -          break
    -        end
    -      end
    -  
    -      (provisioning_profile_xml environment)[:children].first[:children].first[:children][13][:children][team_identifer_index + 1][:children].first[:data]
    -    end
    -  
         def determine_app_id
    -      @app_id = app_id_from_provisioning_profile @opts[:env]
    -  
    +      @app_id = ios_metadata.appid
    +      raise_ios_metadata_required if @app_id.strip.length == 0
           log_info "App Identifier is set to : #{@app_id}"
         end
       
    @@ -39802,7 +41695,7 @@ Follows is a source code listing for all files that have been open sourced. This
           end
         end
       
    -    def blow_away_temp
    +    def clear_tmp_directory
           sh "rm -rf #{tmp_directory}"
         end
       
    @@ -39943,7 +41836,8 @@ Follows is a source code listing for all files that have been open sourced. This
       
           log_info "Creating Entitlements.plist"
       
    -      $gtk.write_file_root "tmp/ios/Entitlements.plist", entitlement_plist_string.gsub(":app_id", "#{@team_name}.#{@app_id}").strip
    +      $gtk.write_file_root "tmp/ios/Entitlements.plist", entitlement_plist_string.gsub(":app_id", "#{@team_id}.#{@app_id}").strip
    +      $gtk.write_file_root "tmp/ios/Entitlements.txt", entitlement_plist_string.gsub(":app_id", "#{@team_id}.#{@app_id}").strip
       
           sh "/usr/bin/plutil -convert binary1 \"#{tmp_directory}/Entitlements.plist\""
           sh "/usr/bin/plutil -convert xml1 \"#{tmp_directory}/Entitlements.plist\""
    @@ -39981,15 +41875,15 @@ Follows is a source code listing for all files that have been open sourced. This
               CFBundleExecutable
               :app_name
               CFBundleInfoDictionaryVersion
    -          6.0
    +          :app_version
               CFBundlePackageType
               APPL
               CFBundleShortVersionString
    -          5.6
    +          :app_version
               CFBundleSignature
               ????
               CFBundleVersion
    -          5.6
    +          :app_version
               CFBundleIcons
               
                   CFBundlePrimaryIcon
    @@ -40138,13 +42032,13 @@ Follows is a source code listing for all files that have been open sourced. This
               CFBundleIdentifier
               :app_id
               CFBundleInfoDictionaryVersion
    -          6.0
    +          :app_version
               CFBundleName
               :app_name
               CFBundlePackageType
               APPL
               CFBundleShortVersionString
    -          5.2
    +          :app_version
               CFBundleSignature
               ????
               CFBundleSupportedPlatforms
    @@ -40152,7 +42046,7 @@ Follows is a source code listing for all files that have been open sourced. This
                       iPhoneOS
               
               CFBundleVersion
    -          5.2
    +          :app_version
               DTCompiler
               com.apple.compilers.llvm.clang.1_0
               DTPlatformBuild
    @@ -40238,6 +42132,7 @@ Follows is a source code listing for all files that have been open sourced. This
           info_plist_string.gsub!(":app_id", @app_id)
       
           $gtk.write_file_root "tmp/ios/#{@app_name}.app/Info.plist", info_plist_string.strip
    +      $gtk.write_file_root "tmp/ios/Info.txt", info_plist_string.strip
       
           @info_plist_written = true
         end
    @@ -40291,13 +42186,13 @@ Follows is a source code listing for all files that have been open sourced. This
               CFBundleIdentifier
               :app_id
               CFBundleInfoDictionaryVersion
    -          6.0
    +          :app_version
               CFBundleName
               :app_name
               CFBundlePackageType
               APPL
               CFBundleShortVersionString
    -          5.2
    +          :app_version
               CFBundleSignature
               ????
               CFBundleSupportedPlatforms
    @@ -40305,7 +42200,7 @@ Follows is a source code listing for all files that have been open sourced. This
                       iPhoneOS
               
               CFBundleVersion
    -          5.2
    +          :app_version
               DTCompiler
               com.apple.compilers.llvm.clang.1_0
               DTPlatformBuild
    @@ -40389,8 +42284,10 @@ Follows is a source code listing for all files that have been open sourced. This
       
           info_plist_string.gsub!(":app_name", @app_name)
           info_plist_string.gsub!(":app_id", @app_id)
    +      info_plist_string.gsub!(":app_version", @app_version)
       
           $gtk.write_file_root "tmp/ios/#{@app_name}.app/Info.plist", info_plist_string.strip
    +      $gtk.write_file_root "tmp/ios/Info.txt", info_plist_string.strip
       
           @info_plist_written = true
         end
    @@ -40412,28 +42309,53 @@ Follows is a source code listing for all files that have been open sourced. This
           "#{relative_path}/#{$gtk.cli_arguments[:dragonruby]}"
         end
       
    -    def write_ip_address
    +    def embed_mobileprovision
    +      sh %Q[cp #{@provisioning_profile_path} "#{app_path}/embedded.mobileprovision"]
    +      sh %Q[/usr/bin/plutil -convert binary1 "#{app_path}/Info.plist"]
    +    end
    +  
    +    def clear_payload_directory
    +      sh %Q[rm "#{@app_name}".ipa]
    +      sh %Q[rm -rf "#{app_path}/app"]
    +      sh %Q[rm -rf "#{app_path}/sounds"]
    +      sh %Q[rm -rf "#{app_path}/sprites"]
    +      sh %Q[rm -rf "#{app_path}/data"]
    +      sh %Q[rm -rf "#{app_path}/fonts"]
    +    end
    +  
    +    def stage_app
    +      sh %Q[cp -r "#{root_folder}/app/" "#{app_path}/app/"]
    +      sh %Q[cp -r "#{root_folder}/sounds/" "#{app_path}/sounds/"]
    +      sh %Q[cp -r "#{root_folder}/sprites/" "#{app_path}/sprites/"]
    +      sh %Q[cp -r "#{root_folder}/data/" "#{app_path}/data/"]
    +      sh %Q[cp -r "#{root_folder}/fonts/" "#{app_path}/fonts/"]
    +    end
    +  
    +    def create_payload
    +      sh %Q[mkdir -p #{tmp_directory}/ipa_root/Payload]
    +      sh %Q[cp -r "#{app_path}" "#{tmp_directory}/ipa_root/Payload"]
    +      sh %Q[chmod -R 755 "#{tmp_directory}/ipa_root/Payload"]
    +    end
    +  
    +    def create_payload_directory_dev
    +      # write dev machine's ip address for hotloading
           $gtk.write_file "app/server_ip_address.txt", $gtk.ffi_misc.get_local_ip_address.strip
    +  
    +      embed_mobileprovision
    +      clear_payload_directory
    +      stage_app
         end
       
    -    def create_payload_directory
    -      sh "cp #{@provisioning_profile_path} \"#{app_path}/embedded.mobileprovision\""
    -      sh "/usr/bin/plutil -convert binary1 \"#{app_path}/Info.plist\""
    -      write_ip_address
    -      sh "rm \"#{@app_name}\".ipa"
    -      sh "rm -rf \"#{app_path}/app\""
    -      sh "rm -rf \"#{app_path}/sounds\""
    -      sh "rm -rf \"#{app_path}/sprites\""
    -      sh "rm -rf \"#{app_path}/data\""
    -      sh "rm -rf \"#{app_path}/fonts\""
    -      sh "cp -r \"#{root_folder}/app/\" \"#{app_path}/app/\""
    -      sh "cp -r \"#{root_folder}/sounds/\" \"#{app_path}/sounds/\""
    -      sh "cp -r \"#{root_folder}/sprites/\" \"#{app_path}/sprites/\""
    -      sh "cp -r \"#{root_folder}/data/\" \"#{app_path}/data/\""
    -      sh "cp -r \"#{root_folder}/fonts/\" \"#{app_path}/fonts/\""
    -      sh "mkdir -p #{tmp_directory}/ipa_root/Payload"
    -      sh "cp -r \"#{app_path}\" \"#{tmp_directory}/ipa_root/Payload\""
    -      sh "chmod -R 755 \"#{tmp_directory}/ipa_root/Payload\""
    +    def create_payload_directory_prod
    +      # production builds does not hotload ip address
    +      sh %Q[rm "#{root_folder}/app/server_ip_address.txt"]
    +  
    +      embed_mobileprovision
    +      stage_app
    +  
    +      # production build marker
    +      sh %Q[mkdir -p "#{app_path}/metadata/"]
    +      sh %Q[touch metadata/DRAGONRUBY_PRODUCTION_BUILD]
         end
       
         def create_ipa
    @@ -40466,10 +42388,22 @@ Follows is a source code listing for all files that have been open sourced. This
         end
       
         def print_publish_help
    -        log_info "Go to https://appstoreconnect.apple.com/apps and create an App if you haven't already done so."
    -        log_info "Go to https://appleid.apple.com and create a 'Application Specific Password'."
    -        log_info "To upload your app, Download Transporter from the App Store https://apps.apple.com/us/app/transporter/id1450874784?mt=12."
    -        log_info "Your app is located at ./tmp/ios/#{@app_name}.ipa"
    +      has_transporter = (sh "ls /Applications/Transporter.app").include? "Contents"
    +      if !has_transporter
    +        $gtk.openurl "https://apps.apple.com/us/app/transporter/id1450874784?mt=12"
    +        $console.set_command "$wizards.ios.start env: :#{@opts[:env]}, version: \"#{@opts[:version]}\""
    +        raise WizardException.new(
    +          "* To upload your app, Download Transporter from the App Store https://apps.apple.com/us/app/transporter/id1450874784?mt=12."
    +        )
    +      else
    +        sh "mkdir ./tmp/ios/intermediary_artifacts"
    +        sh "mv \"#{tmp_directory}/#{@app_name}.app\" #{tmp_directory}/intermediary_artifacts/"
    +        sh "mv \"#{tmp_directory}/do_zip.sh\" #{tmp_directory}/intermediary_artifacts"
    +        sh "mv \"#{tmp_directory}/Entitlements.plist\" #{tmp_directory}/intermediary_artifacts"
    +        sh "mv \"#{tmp_directory}/ipa_root\" #{tmp_directory}/intermediary_artifacts/"
    +        sh "open /Applications/Transporter.app"
    +        sh "open ./tmp/ios/"
    +      end
         end
       
         def compile_icons
    @@ -40490,6 +42424,26 @@ Follows is a source code listing for all files that have been open sourced. This
           sh "cp -r \"#{root_folder}/native/\" \"#{app_path}/native/\""
           sh "CODESIGN_ALLOCATE=\"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate\" /usr/bin/codesign -f -s \"#{@certificate_name}\" --entitlements #{tmp_directory}/Entitlements.plist \"#{tmp_directory}/#{@app_name}.app/native/ios-device/ext.dylib\""
         end
    +  
    +    def set_version version
    +      @app_version = version
    +      start env: @opts[:env], version: version
    +    end
    +  
    +    def app_version
    +      log_info "Attempting to retrieve App Version from metadata/ios_metadata.txt."
    +      ios_version_number = (ios_metadata.version || "").strip
    +      if ios_version_number.length == 0
    +        log_info "Not found. Attempting to retrieve App Version from metadata/game_metadata.txt."
    +        ios_version_number = (game_metadata.version || "").strip
    +      end
    +      ios_version_number
    +    end
    +  
    +    def determine_app_version
    +      @app_version = app_version
    +      return if @app_version
    +    end
       end
     
     #+end_src
    @@ -40501,38 +42455,14 @@ Follows is a source code listing for all files that have been open sourced. This
       # MIT License
       # itch_wizard.rb has been released under MIT (*only this file*).
       
    -  class ItchWizard
    +  class ItchWizard < Wizard
         def steps
           [
             :check_metadata,
    -        :deploy
    +        :deploy,
           ]
         end
       
    -    def metadata_file_path
    -      "metadata/game_metadata.txt"
    -    end
    -  
    -    def get_metadata
    -      metadata = $gtk.read_file metadata_file_path
    -  
    -      if !metadata
    -        write_blank_metadata
    -        metadata = $gtk.read_file metadata_file_path
    -      end
    -  
    -      dev_id, dev_title, game_id, game_title, version, icon = *metadata.each_line.to_a
    -  
    -      {
    -        dev_id: dev_id.strip,
    -        dev_title: dev_title.strip,
    -        game_id: game_id.strip,
    -        game_title: game_title.strip,
    -        version: version.strip,
    -        icon: icon.strip
    -      }
    -    end
    -  
         def write_blank_metadata
             $gtk.write_file metadata_file_path, <<-S.strip
       #devid=myname
    @@ -40550,7 +42480,7 @@ Follows is a source code listing for all files that have been open sourced. This
             write_blank_metadata
           end
       
    -      if metadata_text.each_line.to_a.length != 6
    +      if metadata_text.strip.each_line.to_a.length < 6
             write_blank_metadata
           end
       
    @@ -40562,70 +42492,67 @@ Follows is a source code listing for all files that have been open sourced. This
       
           if metadata[:dev_id].start_with?("#") || !@dev_id
             log "* PROMPT: Please provide your username for Itch."
    -        $console.set_command "$wizards.itch.set_dev_id \"your-itch-username\""
    +        $console.set_command "$wizards.itch.set_dev_id \"#{metadata[:dev_id]}\""
             return :need_dev_id
           end
       
           if metadata[:dev_title].start_with?("#") || !@dev_title
             log "* PROMPT: Please provide developer's/company's name that you want displayed."
    -        $console.set_command "$wizards.itch.set_dev_title \"Your Name\""
    +        $console.set_command "$wizards.itch.set_dev_title \"#{metadata[:dev_title]}\""
             return :need_dev_title
           end
       
           if metadata[:game_id].start_with?("#") || !@game_id
             log "* PROMPT: Please provide the id for you game. This is the id you specified when you set up a new game page on Itch."
    -        $console.set_command "$wizards.itch.set_game_id \"your-game-id\""
    +        $console.set_command "$wizards.itch.set_game_id \"#{metadata[:game_id]}\""
             return :need_game_id
           end
       
           if metadata[:game_title].start_with?("#") || !@game_title
             log "* PROMPT: Please provide the display name for your game. (This can include spaces)"
    -        $console.set_command "$wizards.itch.set_game_title \"Your Game\""
    +        $console.set_command "$wizards.itch.set_game_title \"#{metadata[:game_title]}\""
             return :need_game_title
           end
       
           if metadata[:version].start_with?("#") || !@version
             log "* PROMPT: Please provide the version for your game."
    -        $console.set_command "$wizards.itch.set_version \"1.0\""
    +        $console.set_command "$wizards.itch.set_version \"#{metadata[:version]}\""
             return :need_version
           end
       
           if metadata[:icon].start_with?("#") || !@icon
             log "* PROMPT: Please provide icon path for your game."
    -        $console.set_command "$wizards.itch.set_icon \"icon.png\""
    +        $console.set_command "$wizards.itch.set_icon \"#{metadata[:icon]}\""
             return :need_icon
           end
       
    +      puts "here!! success!!!"
    +  
           return :success
         end
       
         def set_dev_id value
           @dev_id = value
    -      write_metadata
           start
         end
       
         def set_dev_title value
           @dev_title = value
    -      write_metadata
           start
         end
       
         def set_game_id value
           @game_id = value
    -      write_metadata
           start
         end
       
         def set_game_title value
           @game_title = value
    -      write_metadata
           start
         end
       
         def set_version value
           @version = value
    -      write_metadata
           start
         end
       
    @@ -40668,7 +42595,7 @@ Follows is a source code listing for all files that have been open sourced. This
           end
       
           if @icon
    -        text += "icon=metadata/#{@icon}\n"
    +        text += "icon=#{@icon}\n"
           else
             text += "#icon=metadata/icon.png\n"
           end
    @@ -40686,10 +42613,25 @@ Follows is a source code listing for all files that have been open sourced. This
       
         def deploy
           log_info "* Running dragonruby-publish: #{package_command}"
    -      results = $gtk.exec package_command
    +      $gtk.openurl "http://itch.io/dashboard" if $gtk.platform == "Mac OS X"
    +      if $gtk.platform? :mac
    +        $gtk.exec "rm -rf ./builds"
    +      end
    +      results = $gtk.exec "#{package_command} --only-package"
    +      puts File.expand_path("./builds")
    +  
           log "#+begin_src"
           log results
           log "#+end_src"
    +  
    +      if $gtk.platform? :mac
    +        $gtk.exec "open ./builds/"
    +      elsif $gtk.platform? :windows
    +        $gtk.exec "powershell \"ii .\""
    +      end
    +  
    +      $gtk.openurl "https://itch.io/dashboard"
    +  
           :success
         end
       
    @@ -40700,7 +42642,7 @@ Follows is a source code listing for all files that have been open sourced. This
           steps.each do |m|
             begin
               log_info "Running Itch Wizard Step: ~$wizards.itch.#{m}~"
    -          result = (send m) || :success if @wizard_status[m][:result] != :success
    +          result = (send m) || :success
               @wizard_status[m][:result] = result
               if result != :success
                 log_info "Exiting wizard. :#{result}"
    @@ -41049,10 +42991,18 @@ Follows is a source code listing for all files that have been open sourced. This
             device.grid_area.row_count
           end
       
    +      def row_max_index
    +        row_count - 1
    +      end
    +  
           def col_count
             device.grid_area.col_count
           end
       
    +      def col_max_index
    +        col_count - 1
    +      end
    +  
           def gutter_height
             device.grid_area.gutter
           end
    @@ -41075,18 +43025,124 @@ Follows is a source code listing for all files that have been open sourced. This
       
           def rect_defaults
             {
    -          row: nil,
    -          col: nil,
    -          h:   1,
    -          w:   1,
    -          dx:  0,
    -          dy:  0,
    -          rect: :control_rect
    +          row:      nil,
    +          col:      nil,
    +          h:        1,
    +          w:        1,
    +          dx:       0,
    +          dx_ratio: 1,
    +          dy:       0,
    +          dy_ratio: 1,
    +          dh_ratio: 1,
    +          dw_ratio: 1,
    +          merge:    nil,
    +          rect:     :control_rect
             }
           end
       
    -      def rect opts
    +      def row n
    +        (rect row: n, col: 0, w: 0, h: 0).x
    +      end
    +  
    +      def row_from_bottom n
    +        (rect row: row_count - n, col: 0, w: 0, h: 0).x
    +      end
    +  
    +      def col n
    +        (rect row: 0, col: n, w: 0, h: 0).y
    +      end
    +  
    +      def col_from_right n
    +        (rect row: 0, col: col_max_index - n, w: 0, h: 0).y
    +      end
    +  
    +      def w n
    +        (rect row: 0, col: 0, w: n, h: 1).w
    +      end
    +  
    +      def h n
    +        (rect row: 0, col: 0, w: 1, h: n).h
    +      end
    +  
    +      def rect_group opts
    +        group = opts.group
    +        r     = opts.row || 0
    +        r     = row_max_index - opts.row_from_bottom if opts.row_from_bottom
    +        c     = opts.col || 0
    +        c     = col_max_index - opts.col_from_right  if opts.col_from_right
    +        drow  = opts.drow || 0
    +        dcol  = opts.dcol || 0
    +        w     = opts.w    || 0
    +        h     = opts.h    || 0
    +        merge = opts[:merge]
    +  
    +        running_row = r
    +        running_col = c
    +  
    +        running_col = calc_col_offset(opts.col_offset) if opts.col_offset
    +        running_row = calc_row_offset(opts.row_offset) if opts.row_offset
    +  
    +        group.map do |i|
    +          group_layout_opts = i.layout || {}
    +          group_layout_opts = group_layout_opts.merge row: running_row,
    +                                                      col: running_col,
    +                                                      merge: merge,
    +                                                      w: w, h: h
    +          result = (rect group_layout_opts).merge i
    +  
    +          if (i.is_a? Hash) && (i.primitive_marker == :label)
    +            if    i.alignment_enum == 1
    +              result.x += result.w.half
    +            elsif i.alignment_enum == 2
    +              result.x += result.w
    +            end
    +          end
    +  
    +          running_row += drow
    +          running_col += dcol
    +          result
    +        end
    +      end
    +  
    +      def calc_row_offset opts = {}
    +        count = opts[:count] || opts[:length] || 0
    +        h     = opts.h || 1
    +        (row_count - (count * h)) / 2.0
    +      end
    +  
    +      def calc_col_offset opts = {}
    +        count = opts[:count] || opts[:length] || 0
    +        w     = opts.w || 1
    +        (col_count - (count * w)) / 2.0
    +      end
    +  
    +      def point opts = {}
    +        opts.w = 1
    +        opts.h = 1
    +        opts.row ||= 0
    +        opts.col ||= 0
    +        r = rect opts
    +        r.x  += r.w * opts.col_anchor if opts.col_anchor
    +        r.y  += r.h * opts.row_anchor if opts.row_anchor
    +        r
    +      end
    +  
    +      def rect *all_opts
    +        if all_opts.length == 1
    +          opts = all_opts.first
    +        else
    +          opts = {}
    +          all_opts.each do |o|
    +            opts.merge! o
    +          end
    +        end
    +  
    +        opts.row = row_max_index - opts.row_from_bottom if opts.row_from_bottom
    +        opts.col = col_max_index - opts.col_from_right if opts.col_from_right
             opts = rect_defaults.merge opts
    +        opts.row ||= 0
    +        opts.col ||= 0
    +  
             result = send opts[:rect]
             if opts[:row] && opts[:col] && opts[:w] && opts[:h]
               col = rect_col opts[:col], opts[:w]
    @@ -41094,7 +43150,9 @@ Follows is a source code listing for all files that have been open sourced. This
               result = control_rect.merge x: col.x,
                                           y: row.y,
                                           w: col.w,
    -                                      h: row.h
    +                                      h: row.h,
    +                                      center_x: col.center_x,
    +                                      center_y: row.center_y
             elsif opts[:row] && !opts[:col]
               result = rect_row opts[:row], opts[:h]
             elsif !opts[:row] && opts[:col]
    @@ -41132,13 +43190,21 @@ Follows is a source code listing for all files that have been open sourced. This
               result[:h] += device.grid_area.gutter * 2
             end
       
    -        result[:x] += opts[:dx] if opts[:dx]
    -        result[:y] += opts[:dy] if opts[:dy]
    -        result[:w] += opts[:dw] if opts[:dw]
    -        result[:h] += opts[:dh] if opts[:dh]
    +        result[:x] += opts[:dx]       if opts[:dx]
    +        result[:x] *= opts[:dx_ratio] if opts[:dx_ratio]
    +        result[:y] += opts[:dy]       if opts[:dy]
    +        result[:y] *= opts[:dy_ratio] if opts[:dy_ratio]
    +        result[:w] += opts[:dw]       if opts[:dw]
    +        result[:w] *= opts[:dw_ratio] if opts[:dw_ratio]
    +        result[:h] += opts[:dh]       if opts[:dh]
    +        result[:h] *= opts[:dh_ratio] if opts[:dh_ratio]
    +        result.merge! opts[:merge]    if opts[:merge]
             result[:row] = opts[:row]
             result[:col] = opts[:col]
       
    +        result[:h] = result[:h].clamp 0
    +        result[:w] = result[:w].clamp 0
    +  
             if $gtk.args.grid.name == :center
               result[:x] -= 640
               result[:y] -= 360
    @@ -41173,7 +43239,7 @@ Follows is a source code listing for all files that have been open sourced. This
       
             row_y = device.h - row_y - row_h
       
    -        result = control_rect.merge y: row_y, h: row_h
    +        result = control_rect.merge y: row_y, h: row_h, center_y: (row_y + row_h.half)
             @rect_cache[:row][index][h] = result
             @rect_cache[:row][index][h]
           end
    @@ -41196,7 +43262,7 @@ Follows is a source code listing for all files that have been open sourced. This
             col_w = col_w.to_i
             col_w -= 1 if col_w.odd?
       
    -        result = control_rect.merge x: col_x, w: col_w
    +        result = control_rect.merge x: col_x, w: col_w, center_x: (col_x + col_w.half)
             @rect_cache[:col][index][w] = result
             @rect_cache[:col][index][w]
           end
    @@ -41247,6 +43313,26 @@ Follows is a source code listing for all files that have been open sourced. This
             @device
           end
       
    +      def debug_primitives opts = {}
    +        @primitives ||= col_count.map_with_index do |col|
    +                          row_count.map_with_index do |row|
    +                            cell   = rect row: row, col: col
    +                            center = Geometry.rect_center_point cell
    +                            [
    +                              cell.merge(opts).border,
    +                              cell.merge(opts)
    +                                  .label!(x: center.x,
    +                                          y: center.y,
    +                                          text: "#{row},#{col}",
    +                                          size_enum: -3,
    +                                          vertical_alignment_enum: 1,
    +                                          alignment_enum: 1)
    +                            ]
    +                          end
    +                        end
    +                        @primitives
    +      end
    +  
           def serialize
             {
               device: @device.serialize,
    @@ -41260,6 +43346,13 @@ Follows is a source code listing for all files that have been open sourced. This
           def to_s
             serialize.to_s
           end
    +  
    +      def reset
    +        @primitives = nil
    +        @rect_cache ||= {}
    +        @rect_cache.clear
    +      end
    +  
         end
       end
     
    @@ -41399,6 +43492,11 @@ Follows is a source code listing for all files that have been open sourced. This
             self.puts message
           end
       
    +      def self.reset
    +        @once = {}
    +        nil
    +      end
    +  
           def self.puts_once *ids, message
             id = "#{ids}"
             @once ||= {}
    @@ -41535,6 +43633,53 @@ Follows is a source code listing for all files that have been open sourced. This
     
     #+end_src
     
    +*** metadata.rb
    +#+begin_src ruby
    +  # ./dragon/metadata.rb
    +  # Contributors outside of DragonRuby who also hold Copyright: Michał Dudziński
    +  # Copyright 2021 DragonRuby LLC
    +  # MIT License
    +  # metadata.rb has been released under MIT (*only this file*).
    +  
    +  module Metadata
    +    def metadata_file_path
    +      "metadata/game_metadata.txt"
    +    end
    +  
    +    def get_metadata
    +      metadata = $gtk.read_file metadata_file_path
    +  
    +      if !metadata
    +        write_blank_metadata
    +        metadata = $gtk.read_file metadata_file_path
    +      end
    +  
    +      dev_id, dev_title, game_id, game_title, version, icon = *metadata.each_line.to_a
    +  
    +      {
    +        dev_id: dev_id.strip,
    +        dev_title: dev_title.strip,
    +        game_id: game_id.strip,
    +        game_title: game_title.strip,
    +        version: version.strip,
    +        icon: icon.strip
    +      }
    +    end
    +  
    +    def write_blank_metadata
    +        $gtk.write_file metadata_file_path, <<-S.strip
    +  #devid=myname
    +  #devtitle=My Name
    +  #gameid=mygame
    +  #gametitle=My Game
    +  #version=0.1
    +  #icon=metadata/icon.png
    +  S
    +    end
    +  end
    +
    +#+end_src
    +
     *** numeric.rb
     #+begin_src ruby
       # ./dragon/numeric.rb
    @@ -41553,6 +43698,35 @@ Follows is a source code listing for all files that have been open sourced. This
         alias_method :lte, :<=
         alias_method :__original_eq_eq__, :== unless Numeric.instance_methods.include? :__original_eq_eq__
       
    +    def to_layout_row opts = {}
    +      $layout.rect(row: self,
    +                   col: opts.col || 0,
    +                   w:   opts.w || 0,
    +                   h:   opts.h || 0).y
    +    end
    +  
    +    def to_layout_col opts = {}
    +      $layout.rect(row: 0,
    +                   col: self,
    +                   w:   opts.w || 0,
    +                   h:   opts.h || 0).x
    +    end
    +  
    +    def to_layout_w
    +      $layout.rect(row: 0, col: 0, w: self, h: 1).w
    +    end
    +  
    +    def to_layout_h
    +      $layout.rect(row: 0, col: 0, w: 1, h: self).h
    +    end
    +  
    +    def to_layout_row_from_bottom opts = {}
    +      ($layout.row_max_index - self).to_layout_row opts
    +    end
    +  
    +    def to_layout_col_from_right opts = {}
    +      ($layout.col_max_index - self).to_layout_col opts
    +    end
       
         # Converts a numeric value representing seconds into frames.
         #
    @@ -41568,10 +43742,26 @@ Follows is a source code listing for all files that have been open sourced. This
           self / 2.0
         end
       
    +    def third
    +      self / 3.0
    +    end
    +  
    +    def quarter
    +      self / 4.0
    +    end
    +  
         def to_byte
           clamp(0, 255).to_i
         end
       
    +    def clamp *opts
    +      min = (opts.at 0)
    +      max = (opts.at 1)
    +      return min if min && self < min
    +      return max if max && self > max
    +      return self
    +    end
    +  
         def clamp_wrap min, max
           max, min = min, max if min > max
           return self if self >= min && self <= max
    @@ -41796,7 +43986,7 @@ Follows is a source code listing for all files that have been open sourced. This
           self * Math::PI.fdiv(180)
         end
       
    -    # Converts a number representing an angle in radians to degress.
    +    # Converts a number representing an angle in radians to degrees.
         #
         # @gtk
         def to_degrees
    @@ -41813,21 +44003,21 @@ Follows is a source code listing for all files that have been open sourced. This
           GTK::Geometry.to_square(self, x, y, anchor_x, anchor_y)
         end
       
    -    # Returns a normal vector for a number that represents an angle in degress.
    +    # Returns a normal vector for a number that represents an angle in degrees.
         #
         # @gtk
         def vector max_value = 1
           [vector_x(max_value), vector_y(max_value)]
         end
       
    -    # Returns the y component of a normal vector for a number that represents an angle in degress.
    +    # Returns the y component of a normal vector for a number that represents an angle in degrees.
         #
         # @gtk
         def vector_y max_value = 1
           max_value * Math.sin(self.to_radians)
         end
       
    -    # Returns the x component of a normal vector for a number that represents an angle in degress.
    +    # Returns the x component of a normal vector for a number that represents an angle in degrees.
         #
         # @gtk
         def vector_x max_value = 1
    @@ -41854,6 +44044,18 @@ Follows is a source code listing for all files that have been open sourced. This
           (self % n) == 0
         end
       
    +    def multiply n
    +      self * n
    +    end
    +  
    +    def fmult n
    +      self * n.to_f
    +    end
    +  
    +    def imult n
    +      (self * n).to_i
    +    end
    +  
         def mult n
           self * n
         end
    @@ -41975,12 +44177,6 @@ Follows is a source code listing for all files that have been open sourced. This
           return gt other
         end
       
    -    def == other
    -      return true if __original_eq_eq__ other
    -      return __original_eq_eq__ other.entity_id if other.is_a? OpenEntity
    -      return false
    -    end
    -  
         # @gtk
         def map
           unless block_given?
    @@ -42067,29 +44263,29 @@ Follows is a source code listing for all files that have been open sourced. This
         end
       
         def - other
    -      return nil unless other
    -      super
    +      return self unless other
    +      self - other
         rescue Exception => e
           __raise_arithmetic_exception__ other, :-, e
         end
       
         def + other
    -      return nil unless other
    -      super
    +      return self unless other
    +      self + other
         rescue Exception => e
           __raise_arithmetic_exception__ other, :+, e
         end
       
         def * other
    -      return nil unless other
    -      super
    +      return self unless other
    +      self * other
         rescue Exception => e
           __raise_arithmetic_exception__ other, :*, e
         end
       
         def / other
    -      return nil unless other
    -      super
    +      return self unless other
    +      self / other
         rescue Exception => e
           __raise_arithmetic_exception__ other, :/, e
         end
    @@ -42119,6 +44315,10 @@ Follows is a source code listing for all files that have been open sourced. This
         def self.clamp n, min, max
           n.clamp min, max
         end
    +  
    +    def mid? l, r
    +      (between? l, r) || (between? r, l)
    +    end
       end
       
       class Fixnum
    @@ -42145,39 +44345,33 @@ Follows is a source code listing for all files that have been open sourced. This
         end
       
         def + other
    -      return nil unless other
    -      super
    +      return self unless other
    +      self + other
         rescue Exception => e
           __raise_arithmetic_exception__ other, :+, e
         end
       
         def * other
    -      return nil unless other
    -      super
    +      return self unless other
    +      self * other
         rescue Exception => e
           __raise_arithmetic_exception__ other, :*, e
         end
       
         def / other
    -      return nil unless other
    -      super
    +      return self unless other
    +      self / other
         rescue Exception => e
           __raise_arithmetic_exception__ other, :/, e
         end
       
         def - other
    -      return nil unless other
    -      super
    +      return self unless other
    +      self - other
         rescue Exception => e
           __raise_arithmetic_exception__ other, :-, e
         end
       
    -    def == other
    -      return true if __original_eq_eq__ other
    -      return __original_eq_eq__ other.entity_id if other.is_a? GTK::OpenEntity
    -      return false
    -    end
    -  
         # Returns `-1` if the number is less than `0`. `+1` if the number
         # is greater than `0`. Returns `0` if the number is equal to `0`.
         #
    @@ -42234,28 +44428,28 @@ Follows is a source code listing for all files that have been open sourced. This
         alias_method :__original_divide__,   :- unless Float.instance_methods.include? :__original_divide__
       
         def - other
    -      return nil unless other
    +      return self unless other
           super
         rescue Exception => e
           __raise_arithmetic_exception__ other, :-, e
         end
       
         def + other
    -      return nil unless other
    +      return self unless other
           super
         rescue Exception => e
           __raise_arithmetic_exception__ other, :+, e
         end
       
         def * other
    -      return nil unless other
    +      return self unless other
           super
         rescue Exception => e
           __raise_arithmetic_exception__ other, :*, e
         end
       
         def / other
    -      return nil unless other
    +      return self unless other
           super
         rescue Exception => e
           __raise_arithmetic_exception__ other, :/, e
    @@ -42302,6 +44496,10 @@ Follows is a source code listing for all files that have been open sourced. This
         def nan?
           false
         end
    +  
    +    def center other
    +      (self - other).abs.fdiv(2)
    +    end
       end
     
     #+end_src
    @@ -42358,7 +44556,7 @@ Follows is a source code listing for all files that have been open sourced. This
           def local_state
             @local_state ||= OpenEntity.new
             @local_state.hotload_client ||= @local_state.new_entity(:hotload_client,
    -                                                                notes: "This enitity is used by DragonRuby Game Toolkit to provide you hotloading on remote machines.",
    +                                                                notes: "This entity is used by DragonRuby Game Toolkit to provide you hotloading on remote machines.",
                                                                     changes: { },
                                                                     changes_queue: [],
                                                                     reloaded_files_times: [])
    @@ -42534,7 +44732,7 @@ Follows is a source code listing for all files that have been open sourced. This
                 sub_index       = index - previous_line[:sum]
                 word            = (cursor_line[:line][0..sub_index - 1]).strip
                 token           = (word.split " ")[-1]
    -            dots            = (token.split ".")
    +            dots            = (token.split ".").flat_map { |s| s.split "[" }.flat_map { |s| s.split "]" }.flat_map { |s| s.split "(" }.flat_map { |s| s.split ")" }
                 dot             = dots[-1]
               end
       
    @@ -42555,6 +44753,10 @@ Follows is a source code listing for all files that have been open sourced. This
               ignores ||= []
               ignores   = [ignores].flatten
               keys   = keys.map { |k| k.to_s }
    +          keys   = keys.reject { |k| k.include? '"' }
    +                       .reject { |k| k.start_with? "'" }
    +                       .reject { |k| k.include? "," }
    +                       .reject { |k| k.start_with? "#" }
               others = ["def", "end"] +
                        [ :entity_keys_by_ref,
                          :entity_name,
    @@ -42612,6 +44814,10 @@ Follows is a source code listing for all files that have been open sourced. This
       
                 return autocomplete_filter_methods lookup_result.call if lookup_result
       
    +            if dot[0].upcase == dot[0] && (Object.const_defined? dot.to_sym)
    +              return (Object.const_get dot.to_sym).autocomplete_methods
    +            end
    +  
                 start_collecting = false
                 dots_after_state = dots.find_all do |s|
                   if s == "state"
    @@ -42627,10 +44833,16 @@ Follows is a source code listing for all files that have been open sourced. This
                   target = target.as_hash[k.to_sym] if target.respond_to? :as_hash
                 end
       
    -            return autocomplete_filter_methods target.as_hash.keys
    +            if target.respond_to? :as_hash
    +              return autocomplete_filter_methods target.as_hash.keys
    +            else
    +              return autocomplete_filter_methods target.autocomplete_methods
    +            end
               end
       
       
    +          text = text.each_line.reject { |l| l.strip.start_with? "#" }.join "\n"
    +          text = text.each_line.map { |l| l.split("#").first }.join "\n"
               text.gsub!("[", " ")
               text.gsub!("]", " ")
               text.gsub!("(", " ")
    @@ -42647,154 +44859,158 @@ Follows is a source code listing for all files that have been open sourced. This
     
     #+end_src
     
    -*** runtime/draw.rb
    +*** runtime/benchmark.rb
     #+begin_src ruby
    -  # ./dragon/runtime/draw.rb
    +  # ./dragon/runtime/benchmark.rb
       # Copyright 2019 DragonRuby LLC
       # MIT License
    -  # draw.rb has been released under MIT (*only this file*).
    +  # benchmark.rb has been released under MIT (*only this file*).
       
       module GTK
         class Runtime
    -      module Draw
    -        def primitives pass
    -          if $top_level.respond_to? :primitives_override
    -            return $top_level.tick_render @args, pass
    -          end
    -  
    -          # Don't change this draw order unless you understand
    -          # the implications.
    -  
    -          # pass.solids.each            { |s| draw_solid s }
    -          # while loops are faster than each with block
    -          idx = 0
    -          length = pass.solids.length
    -          while idx < pass.solids.length
    -            draw_solid (pass.solids.at idx) # accessing an array using .value instead of [] is faster
    -            idx += 1
    -          end
    -  
    -          # pass.static_solids.each     { |s| draw_solid s }
    +      module Benchmark
    +        def benchmark_single iterations, name, proc
    +          log <<-S
    +  ** Invoking :#{name}...
    +  S
    +          time_start = Time.now
               idx = 0
    -          length = pass.static_solids.length
    -          while idx < length
    -            draw_solid (pass.static_solids.at idx)
    +          r = nil
    +          while idx < iterations
    +            r = proc.call
                 idx += 1
               end
       
    -          # pass.sprites.each           { |s| draw_sprite s }
    -          idx = 0
    -          length = pass.sprites.length
    -          while idx < length
    -            draw_sprite (pass.sprites.at idx)
    -            idx += 1
    -          end
    +          result = (Time.now - time_start).round 3
       
    -          # pass.static_sprites.each    { |s| draw_sprite s }
    -          idx = 0
    -          length = pass.static_sprites.length
    -          while idx < length
    -            draw_sprite (pass.static_sprites.at idx)
    -            idx += 1
    -          end
    +          { name: name,
    +            time: result,
    +            time_ms: (result * 1000).to_i }
    +        end
       
    -          # pass.primitives.each        { |p| draw_primitive p }
    -          idx = 0
    -          length = pass.primitives.length
    -          while idx < length
    -            draw_primitive (pass.primitives.at idx)
    -            idx += 1
    -          end
    +        def benchmark opts = {}
    +          iterations = opts.iterations
       
    -          # pass.static_primitives.each { |p| draw_primitive p }
    -          idx = 0
    -          length = pass.static_primitives.length
    -          while idx < length
    -            draw_primitive (pass.static_primitives.at idx)
    -            idx += 1
    -          end
    +          log <<-S
    +  * BENCHMARK: Started
    +  ** Caller: #{(caller || []).first}
    +  ** Iterations: #{iterations}
    +  S
    +          procs = opts.find_all { |k, v| v.respond_to? :call }
    +  
    +          times = procs.map do |(name, proc)|
    +            benchmark_single iterations, name, proc
    +          end.sort_by { |r| r.time }
    +  
    +          first_place = times.first
    +          second_place = times.second || first_place
    +  
    +          times = times.map do |candidate|
    +            average_time = first_place.time
    +                             .add(candidate.time)
    +                             .abs
    +                             .fdiv(2)
    +  
    +            difference_percentage = 0
    +            if average_time == 0
    +              difference_percentage = 0
    +            else
    +              difference_percentage = first_place.time
    +                                        .subtract(candidate.time)
    +                                        .abs
    +                                        .fdiv(average_time)
    +                                        .imult(100)
    +            end
       
    -          # pass.labels.each            { |l| draw_label l }
    -          idx = 0
    -          length = pass.labels.length
    -          while idx < length
    -            draw_label (pass.labels.at idx)
    -            idx += 1
    +            difference_time = ((first_place.time - candidate.time) * 1000).round
    +            candidate.merge(difference_percentage: difference_percentage,
    +                            difference_time: difference_time)
               end
       
    -          # pass.static_labels.each     { |l| draw_label l }
    -          idx = 0
    -          length = pass.static_labels.length
    -          while idx < length
    -            draw_label (pass.static_labels.at idx)
    -            idx += 1
    +          too_small_to_measure = false
    +          if (first_place.time + second_place.time) == 0
    +            too_small_to_measure = true
    +            difference_percentage = 0
    +            log <<-S
    +  * BENCHMARK: Average time for experiments were too small. Increase the number of iterations.
    +  S
    +          else
    +            difference_percentage = (((first_place.time - second_place.time).abs.fdiv((first_place.time + second_place.time).abs.fdiv(2))) * 100).round
               end
       
    -          # pass.lines.each             { |l| draw_line l }
    -          idx = 0
    -          length = pass.lines.length
    -          while idx < length
    -            draw_line (pass.lines.at idx)
    -            idx += 1
    -          end
    +          difference_time = first_place.time.-(second_place.time).*(1000).abs.round
       
    -          # pass.static_lines.each      { |l| draw_line l }
    -          idx = 0
    -          length = pass.static_lines.length
    -          while idx < pass.static_lines.length
    -            draw_line (pass.static_lines.at idx)
    -            idx += 1
    -          end
    +          r = {
    +            iterations: iterations,
    +            first_place: first_place,
    +            second_place: second_place,
    +            difference_time: difference_time,
    +            difference_percentage: difference_percentage,
    +            times: times,
    +            too_small_to_measure: too_small_to_measure
    +          }
       
    -          # pass.borders.each           { |b| draw_border b }
    -          idx = 0
    -          length = pass.borders.length
    -          while idx < length
    -            draw_border (pass.borders.at idx)
    -            idx += 1
    -          end
    +          log_message = []
    +          only_one_result = first_place.name == second_place.name
       
    -          # pass.static_borders.each    { |b| draw_border b }
    -          idx = 0
    -          length = pass.static_borders.length
    -          while idx < length
    -            draw_border (pass.static_borders.at idx)
    -            idx += 1
    +          if only_one_result
    +            log <<-S
    +  * BENCHMARK: #{r.first_place.name} completed in #{r.first_place.time_ms}ms."
    +  S
    +          else
    +            log <<-S
    +  * BENCHMARK: #{r.message}
    +  ** Fastest: #{r.first_place.name.inspect}
    +  ** Second:  #{r.second_place.name.inspect}
    +  ** Margin:  #{r.difference_percentage}% (#{r.difference_time.abs}ms) #{r.first_place.time_ms}ms vs #{r.second_place.time_ms}ms.
    +  ** Times:
    +  #{r.times.map { |t| "*** #{t.name}: #{t.time_ms}ms (#{t.difference_percentage}% #{t.difference_time.abs}ms)." }.join("\n")}
    +  S
               end
       
    -          if !$gtk.production
    -            # pass.debug.each        { |r| draw_primitive r }
    -            idx = 0
    -            length = pass.debug.length
    -            while idx < length
    -              draw_primitive (pass.debug.at idx)
    -              idx += 1
    -            end
    +          r
    +        end
    +      end
    +    end
    +  end
    +
    +#+end_src
    +
    +*** runtime/draw.rb
    +#+begin_src ruby
    +  # ./dragon/runtime/draw.rb
    +  # Copyright 2019 DragonRuby LLC
    +  # MIT License
    +  # draw.rb has been released under MIT (*only this file*).
       
    -            # pass.static_debug.each { |r| draw_primitive r }
    -            idx = 0
    -            length = pass.static_debug.length
    -            while idx < length
    -              draw_primitive (pass.static_debug.at idx)
    -              idx += 1
    -            end
    +  module GTK
    +    class Runtime
    +      module Draw
    +        def primitives pass
    +          if $top_level.respond_to? :primitives_override
    +            return $top_level.tick_render @args, pass
               end
       
    -          # pass.reserved.each          { |r| draw_primitive r }
    -          idx = 0
    -          length = pass.reserved.length
    -          while idx < length
    -            draw_primitive (pass.reserved.at idx)
    -            idx += 1
    -          end
    +          fn.each_send pass.solids,            self, :draw_solid
    +          fn.each_send pass.static_solids,     self, :draw_solid
    +          fn.each_send pass.sprites,           self, :draw_sprite
    +          fn.each_send pass.static_sprites,    self, :draw_sprite
    +          fn.each_send pass.primitives,        self, :draw_primitive
    +          fn.each_send pass.static_primitives, self, :draw_primitive
    +          fn.each_send pass.labels,            self, :draw_label
    +          fn.each_send pass.static_labels,     self, :draw_label
    +          fn.each_send pass.lines,             self, :draw_line
    +          fn.each_send pass.static_lines,      self, :draw_line
    +          fn.each_send pass.borders,           self, :draw_border
    +          fn.each_send pass.static_borders,    self, :draw_border
       
    -          # pass.static_reserved.each   { |r| draw_primitive r }
    -          idx = 0
    -          length = pass.static_reserved.length
    -          while idx < length
    -            draw_primitive (pass.static_reserved.at idx)
    -            idx += 1
    +          if !$gtk.production
    +            fn.each_send pass.debug,           self, :draw_primitive
    +            fn.each_send pass.static_debug,    self, :draw_primitive
               end
    +  
    +          fn.each_send pass.reserved,          self, :draw_primitive
    +          fn.each_send pass.static_reserved,   self, :draw_primitive
             rescue Exception => e
               pause!
               pretty_print_exception_and_export! e
    @@ -42805,7 +45021,9 @@ Follows is a source code listing for all files that have been open sourced. This
               if s.respond_to? :draw_override
                 s.draw_override @ffi_draw
               else
    -            @ffi_draw.draw_solid s.x, s.y, s.w, s.h, s.r, s.g, s.b, s.a
    +            @ffi_draw.draw_solid_2 s.x, s.y, s.w, s.h,
    +                                   s.r, s.g, s.b, s.a,
    +                                   (s.blendmode_enum || 1)
               end
             rescue Exception => e
               raise_conversion_for_rendering_failed s, e, :solid
    @@ -42816,14 +45034,15 @@ Follows is a source code listing for all files that have been open sourced. This
               if s.respond_to? :draw_override
                 s.draw_override @ffi_draw
               else
    -            @ffi_draw.draw_sprite_3 s.x, s.y, s.w, s.h,
    -                                    s.path.s_or_default,
    +            @ffi_draw.draw_sprite_4 s.x, s.y, s.w, s.h,
    +                                    (s.path || '').to_s,
                                         s.angle,
                                         s.a, s.r, s.g, s.b,
                                         s.tile_x, s.tile_y, s.tile_w, s.tile_h,
                                         !!s.flip_horizontally, !!s.flip_vertically,
                                         s.angle_anchor_x, s.angle_anchor_y,
    -                                    s.source_x, s.source_y, s.source_w, s.source_h
    +                                    s.source_x, s.source_y, s.source_w, s.source_h,
    +                                    (s.blendmode_enum || 1)
               end
             rescue Exception => e
               raise_conversion_for_rendering_failed s, e, :sprite
    @@ -42834,7 +45053,7 @@ Follows is a source code listing for all files that have been open sourced. This
               if s.respond_to? :draw_override
                 s.draw_override @ffi_draw
               else
    -            @ffi_draw.draw_screenshot s.path.s_or_default,
    +            @ffi_draw.draw_screenshot (s.path || '').to_s,
                                           s.x, s.y, s.w, s.h,
                                           s.angle,
                                           s.a, s.r, s.g, s.b,
    @@ -42852,10 +45071,13 @@ Follows is a source code listing for all files that have been open sourced. This
               if l.respond_to? :draw_override
                 l.draw_override @ffi_draw
               else
    -            @ffi_draw.draw_label l.x, l.y, l.text.s_or_default,
    -                                 l.size_enum, l.alignment_enum,
    -                                 l.r, l.g, l.b, l.a,
    -                                 l.font.s_or_default(nil)
    +            @ffi_draw.draw_label_3 l.x, l.y,
    +                                   (l.text || '').to_s,
    +                                   l.size_enum, l.alignment_enum,
    +                                   l.r, l.g, l.b, l.a,
    +                                   l.font,
    +                                   (l.vertical_alignment_enum || 2),
    +                                   (l.blendmode_enum || 1)
               end
             rescue Exception => e
               raise_conversion_for_rendering_failed l, e, :label
    @@ -42866,7 +45088,21 @@ Follows is a source code listing for all files that have been open sourced. This
               if l.respond_to? :draw_override
                 l.draw_override @ffi_draw
               else
    -            @ffi_draw.draw_line l.x, l.y, l.x2, l.y2, l.r, l.g, l.b, l.a
    +            if l.x2
    +              @ffi_draw.draw_line_2 l.x, l.y, l.x2, l.y2,
    +                                    l.r, l.g, l.b, l.a,
    +                                    (l.blendmode_enum || 1)
    +            else
    +              w = l.w || 0
    +              w = 1 if w == 0
    +              h = l.h || 0
    +              h = 1 if h == 0
    +              @ffi_draw.draw_line_2 l.x, l.y,
    +                                    l.x + w - 1,
    +                                    l.y + h - 1,
    +                                    l.r, l.g, l.b, l.a,
    +                                    (l.blendmode_enum || 1)
    +            end
               end
             rescue Exception => e
               raise_conversion_for_rendering_failed l, e, :line
    @@ -42877,7 +45113,9 @@ Follows is a source code listing for all files that have been open sourced. This
               if s.respond_to? :draw_override
                 s.draw_override @ffi_draw
               else
    -            @ffi_draw.draw_border s.x, s.y, s.w, s.h, s.r, s.g, s.b, s.a
    +            @ffi_draw.draw_border_2 s.x, s.y, s.w, s.h,
    +                                    s.r, s.g, s.b, s.a,
    +                                    (s.blendmode_enum || 1)
               end
             rescue Exception => e
               raise_conversion_for_rendering_failed s, e, :border
    @@ -42897,7 +45135,6 @@ Follows is a source code listing for all files that have been open sourced. This
               pause!
               pretty_print_exception_and_export! e
             end
    -  
           end
         end
       end
    @@ -43113,7 +45350,7 @@ Follows is a source code listing for all files that have been open sourced. This
       
             def framerate_diagnostics_primitives
               [
    -            { x: 0, y: 93.from_top, w: 500, h: 93, a: 128 }.solid,
    +            { x: 0, y: 93.from_top, w: 500, h: 93, a: 128 }.solid!,
                 {
                   x: 5,
                   y: 5.from_top,
    @@ -43122,7 +45359,7 @@ Follows is a source code listing for all files that have been open sourced. This
                   g: 255,
                   b: 255,
                   size_enum: -2
    -            }.label,
    +            }.label!,
                 {
                   x: 5,
                   y: 20.from_top,
    @@ -43131,7 +45368,7 @@ Follows is a source code listing for all files that have been open sourced. This
                   g: 255,
                   b: 255,
                   size_enum: -2
    -            }.label,
    +            }.label!,
                 {
                   x: 5,
                   y: 35.from_top,
    @@ -43140,7 +45377,7 @@ Follows is a source code listing for all files that have been open sourced. This
                   g: 255,
                   b: 255,
                   size_enum: -2
    -            }.label,
    +            }.label!,
                 {
                   x: 5,
                   y: 50.from_top,
    @@ -43149,7 +45386,7 @@ Follows is a source code listing for all files that have been open sourced. This
                   g: 255,
                   b: 255,
                   size_enum: -2
    -            }.label,
    +            }.label!,
                 {
                   x: 5,
                   y: 65.from_top,
    @@ -43158,7 +45395,7 @@ Follows is a source code listing for all files that have been open sourced. This
                   g: 255,
                   b: 255,
                   size_enum: -2
    -            }.label,
    +            }.label!,
               ]
             end
       
    @@ -43183,7 +45420,14 @@ Follows is a source code listing for all files that have been open sourced. This
             def hotload_init
               @hotload_if_needed = 0
               @mailbox_if_needed = 0
    +  
    +          # schema for file_mtimes
    +          # { FILE_PATH: { current: (Time as Fixnum),
    +          #                last:    (Time as Fixnum) },
    +          #   FILE_PATH: { current: (Time as Fixnum),
    +          #                last:    (Time as Fixnum) } }
               @file_mtimes = { }
    +  
               @suppress_mailbox = true
               files_to_reload.each { |f| init_mtimes f }
               init_mtimes 'app/mailbox.rb'
    @@ -43221,6 +45465,7 @@ Follows is a source code listing for all files that have been open sourced. This
                   'dragon/symbol.rb',
                   'dragon/numeric_deprecated.rb',
                   'dragon/numeric.rb',
    +              'dragon/hash_deprecated.rb',
                   'dragon/hash.rb',
                   'dragon/outputs_deprecated.rb',
                   'dragon/array_docs.rb',
    @@ -43253,6 +45498,7 @@ Follows is a source code listing for all files that have been open sourced. This
                   'dragon/trace.rb',
                   'dragon/readme_docs.rb',
                   'dragon/hotload_client.rb',
    +              'dragon/wizards.rb',
                   'dragon/ios_wizard.rb',
                   'dragon/itch_wizard.rb',
                 ] + core_files_to_reload + @required_files
    @@ -43271,10 +45517,8 @@ Follows is a source code listing for all files that have been open sourced. This
             end
       
             def init_mtimes file
    -          current_key = "current_#{file}".to_sym
    -          last_key = "last_#{file}".to_sym
    -          @file_mtimes[current_key] ||= @ffi_file.mtime(file)
    -          @file_mtimes[last_key] ||= @ffi_file.mtime(file)
    +          @file_mtimes[file] ||= { current: @ffi_file.mtime(file),
    +                                   last: @ffi_file.mtime(file) }
             end
       
             def hotload_source_files
    @@ -43306,25 +45550,36 @@ Follows is a source code listing for all files that have been open sourced. This
             end
       
             def hotload_if_needed
    +          return if Kernel.tick_count < 0
               hotload_source_files
               check_mailbox
             end
       
             def on_load_succeeded file
    -          @rcb_sender.files_reloaded << file
    -          @rcb_sender.reloaded_files << file
    +          self.files_reloaded << file
    +          self.reloaded_files << file
               Trace.untrace_classes!
             end
       
    +        def reset_all_mtimes
    +          @file_mtimes.each do |file, _|
    +            @file_mtimes[file].current = @ffi_file.mtime(file)
    +            @file_mtimes[file].last    = @file_mtimes[file].current
    +          end
    +  
    +          files_to_reload.each do |file, _|
    +            @file_mtimes[file] ||= {}
    +            @file_mtimes[file].current = @ffi_file.mtime(file)
    +            @file_mtimes[file].last    = @file_mtimes[file].current
    +          end
    +        end
    +  
             def reload_if_needed file, force = false
    -          current_key = "current_#{file}".to_sym
    -          last_key = "last_#{file}".to_sym
    -          @file_mtimes[current_key] ||= nil
    -          @file_mtimes[last_key] ||= nil
    -          @file_mtimes[current_key] = @ffi_file.mtime(file)
    -          return if !force && @file_mtimes[last_key] == @file_mtimes[current_key]
    +          @file_mtimes[file] ||= { current: @ffi_file.mtime(file), last: @ffi_file.mtime(file) }
    +          @file_mtimes[file].current = @ffi_file.mtime(file)
    +          return if !force && @file_mtimes[file].current == @file_mtimes[file].last
               on_load_succeeded file if reload_ruby_file file
    -          @file_mtimes[last_key] = @file_mtimes[current_key]
    +          @file_mtimes[file].last = @file_mtimes[file].current
             end
           end
         end
    @@ -43366,6 +45621,30 @@ Follows is a source code listing for all files that have been open sourced. This
           end
         end
       
    +    def char_byte
    +      return nil if self.length == 0
    +      c = self.each_char.first.bytes
    +      c = c.first if c.is_a? Enumerable
    +      c
    +    end
    +  
    +    def insert_character_at index, char
    +      t = each_char.to_a
    +      t = (t.insert index, char)
    +      t.join
    +    end
    +  
    +    def excluding_character_at index
    +      t = each_char.to_a
    +      t.delete_at index
    +      t.join
    +    end
    +  
    +    def excluding_last_character
    +      return "" if self.length <= 1
    +      return excluding_character_at(self.length - 1)
    +    end
    +  
         def end_with_bang?
           self[-1] == "!"
         end
    @@ -43583,7 +45862,7 @@ Follows is a source code listing for all files that have been open sourced. This
             log "#{self.failed.length} test(s) failed."
             self.failed.each do |h|
               log "**** Test name: :#{h[:m]}"
    -          log "#{h[:e].to_s.gsub("* ERROR:", "").strip}"
    +          log "#{h[:e].to_s.gsub("* ERROR:", "").strip}\n#{h[:e].__backtrace_to_org__}"
             end
           end
         end
    @@ -43788,6 +46067,40 @@ Follows is a source code listing for all files that have been open sourced. This
       # MIT License
       # wizards.rb has been released under MIT (*only this file*).
       
    +  class Wizard
    +    def metadata_file_path
    +      "metadata/game_metadata.txt"
    +    end
    +  
    +    def get_metadata
    +      metadata = $gtk.read_file metadata_file_path
    +  
    +      if !metadata
    +        write_blank_metadata
    +        metadata = $gtk.read_file metadata_file_path
    +      end
    +  
    +      dev_id, dev_title, game_id, game_title, version, icon = *metadata.each_line.to_a
    +  
    +      {
    +        dev_id:     dev_id.strip.gsub("#", "").gsub("devid=", ""),
    +        dev_title:  dev_title.strip.gsub("#", "").gsub("devtitle=", ""),
    +        game_id:    game_id.strip.gsub("#", "").gsub("gameid=", ""),
    +        game_title: game_title.strip.gsub("#", "").gsub("gametitle=", ""),
    +        version:    version.strip.gsub("#", "").gsub("version=", ""),
    +        icon:       icon.strip.gsub("#", "").gsub("icon=", "")
    +      }
    +    end
    +  end
    +  
    +  class WizardException < Exception
    +    attr_accessor :console_primitives
    +  
    +    def initialize *console_primitives
    +      @console_primitives = console_primitives
    +    end
    +  end
    +  
       module GTK
         class Wizards
           attr_accessor :ios, :itch
    diff --git a/docs/parse_log.txt b/docs/parse_log.txt
    index 5f10281..4e43983 100644
    --- a/docs/parse_log.txt
    +++ b/docs/parse_log.txt
    @@ -40,11 +40,6 @@ To search docs you can type ~docs_search "SEARCH TERM"~ or if you want to get fa
     - End of paragraph detected.
     *** True Line Result
     
    -** Processing line: ~[[docs_search.gif]]~
    -** Processing line: ~~
    -- End of paragraph detected.
    -*** True Line Result
    -[[docs_search.gif]]
     ** Processing line: ~* Hello World~
     - Header detected.
     *** True Line Result
    @@ -126,50 +121,91 @@ I am a Dragon Rider.
     - End of paragraph detected.
     *** True Line Result
     
    -** Processing line: ~* Watch Some Intro Videos~
    +** Processing line: ~* Intro Videos~
     - Header detected.
     *** True Line Result
     
     *** True Line Result
    -* Watch Some Intro Videos
    +* Intro Videos
     ** Processing line: ~~
     - End of paragraph detected.
     *** True Line Result
     
    -** Processing line: ~Each video is only 20 minutes and all of them will fit into a lunch~
    -** Processing line: ~break. So please watch them:~
    +** Processing line: ~Here are some videos to help you get the lay of the land.~
     ** Processing line: ~~
     - End of paragraph detected.
     *** True Line Result
    -Each video is only 20 minutes and all of them will fit into a lunch break. So please watch them:
    +Here are some videos to help you get the lay of the land.
    +** Processing line: ~** Quick Api Tour~
    +- Header detected.
    +*** True Line Result
    +
    +*** True Line Result
    +** Quick Api Tour
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +
     ** Processing line: ~1. Beginner Introduction to DragonRuby Game Toolkit: [[https://youtu.be/ixw7TJhU08E]]~
     - Line was identified as a start of a list.
     *** True Line Result
     
    -** Processing line: ~2. Intermediate Introduction to Ruby Syntax: [[https://youtu.be/HG-XRZ5Ppgc]]~
    -- Line was identified as a continuation of a list.
    +** Processing line: ~~
    +- End of paragraph detected.
     *** True Line Result
     1. Beginner Introduction to DragonRuby Game Toolkit: [[https://youtu.be/ixw7TJhU08E]]
    -** Processing line: ~3. Intermediate Introduction to Arrays in Ruby: [[https://youtu.be/N72sEYFRqfo]]~
    +** Processing line: ~** If You Are Completely New to Ruby and Programming~
    +- Header detected.
    +*** True Line Result
    +
    +*** True Line Result
    +** If You Are Completely New to Ruby and Programming
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +
    +** Processing line: ~1. Intermediate Introduction to Ruby Syntax: [[https://youtu.be/HG-XRZ5Ppgc]]~
    +- Line was identified as a start of a list.
    +*** True Line Result
    +
    +** Processing line: ~2. Intermediate Introduction to Arrays in Ruby: [[https://youtu.be/N72sEYFRqfo]]~
     - Line was identified as a continuation of a list.
     *** True Line Result
    -2. Intermediate Introduction to Ruby Syntax: [[https://youtu.be/HG-XRZ5Ppgc]]
    +1. Intermediate Introduction to Ruby Syntax: [[https://youtu.be/HG-XRZ5Ppgc]]
    +** Processing line: ~3. You may also want to try this free course provided at [[http://dragonruby.school]].~
    +- Line was identified as a continuation of a list.
    +*** True Line Result
    +2. Intermediate Introduction to Arrays in Ruby: [[https://youtu.be/N72sEYFRqfo]]
     ** Processing line: ~~
     - End of paragraph detected.
     *** True Line Result
    -3. Intermediate Introduction to Arrays in Ruby: [[https://youtu.be/N72sEYFRqfo]]
    -** Processing line: ~The second and third videos are not required if you are proficient~
    -** Processing line: ~with Ruby, but *definitely* watch the first one.~
    +3. You may also want to try this free course provided at [[http://dragonruby.school]].
    +** Processing line: ~** If You Have Game Dev Experience~
    +- Header detected.
    +*** True Line Result
    +
    +*** True Line Result
    +** If You Have Game Dev Experience
     ** Processing line: ~~
     - End of paragraph detected.
     *** True Line Result
    -The second and third videos are not required if you are proficient with Ruby, but *definitely* watch the first one.
    -** Processing line: ~You may also want to try this free course provided at~
    -** Processing line: ~[[http://dragonruby.school]].~
    +
    +** Processing line: ~1. Building Tetris - Part 1: [[https://youtu.be/xZMwRSbC4rY]]~
    +- Line was identified as a start of a list.
    +*** True Line Result
    +
    +** Processing line: ~2. Building Tetris - Part 2: [[https://youtu.be/C3LLzDUDgz4]]~
    +- Line was identified as a continuation of a list.
    +*** True Line Result
    +1. Building Tetris - Part 1: [[https://youtu.be/xZMwRSbC4rY]]
    +** Processing line: ~3. Low Res Game Jam Tutorial: [[https://youtu.be/pCI90ukKCME]]~
    +- Line was identified as a continuation of a list.
    +*** True Line Result
    +2. Building Tetris - Part 2: [[https://youtu.be/C3LLzDUDgz4]]
     ** Processing line: ~~
     - End of paragraph detected.
     *** True Line Result
    -You may also want to try this free course provided at [[http://dragonruby.school]].
    +3. Low Res Game Jam Tutorial: [[https://youtu.be/pCI90ukKCME]]
     ** Processing line: ~* Getting Started Tutorial~
     - Header detected.
     *** True Line Result
    @@ -1115,7 +1151,7 @@ If you have a Pro subscription, you also have the capability to deploy to mobile
     *** True Line Result
     To deploy to iOS, you need to have a Mac running MacOS Catalina, an iOS device, and an active/paid Developer Account with Apple. From the Console type: ~$wizards.ios.start~ and you will be guided through the deployment process.
     ** Processing line: ~To deploy to Android, you need to have an Android emulator/device, and~
    -** Processing line: ~a environment that is able to run Android SDK. ~dragonruby-publish~~
    +** Processing line: ~an environment that is able to run Android SDK. ~dragonruby-publish~~
     ** Processing line: ~will create an APK for you. From there, you can sign the APK and~
     ** Processing line: ~install it to your device. The signing and installation procedure~
     ** Processing line: ~varies from OS to OS. Here's an example of what the command might look~
    @@ -1123,7 +1159,7 @@ To deploy to iOS, you need to have a Mac running MacOS Catalina, an iOS device,
     ** Processing line: ~~
     - End of paragraph detected.
     *** True Line Result
    -To deploy to Android, you need to have an Android emulator/device, and a environment that is able to run Android SDK. ~dragonruby-publish~ will create an APK for you. From there, you can sign the APK and install it to your device. The signing and installation procedure varies from OS to OS. Here's an example of what the command might look like:
    +To deploy to Android, you need to have an Android emulator/device, and an environment that is able to run Android SDK. ~dragonruby-publish~ will create an APK for you. From there, you can sign the APK and install it to your device. The signing and installation procedure varies from OS to OS. Here's an example of what the command might look like:
     ** Processing line: ~#+begin_src~
     - Line was identified as the beginning of a code block.
     *** True Line Result
    @@ -1168,11 +1204,11 @@ To deploy to Android, you need to have an Android emulator/device, and a environ
     ** Processing line: ~game engines. Given that Game Toolkit is a relatively new engine,~
     ** Processing line: ~there are definitely features that are missing. So having a big check~
     ** Processing line: ~list of "all the cool things" is not this engine's forte. This is~
    -** Processing line: ~compensated with a strong commitment to the following principals.~
    +** Processing line: ~compensated with a strong commitment to the following principles.~
     ** Processing line: ~~
     - End of paragraph detected.
     *** True Line Result
    -The following tenants of DragonRuby are what set us apart from other game engines. Given that Game Toolkit is a relatively new engine, there are definitely features that are missing. So having a big check list of "all the cool things" is not this engine's forte. This is compensated with a strong commitment to the following principals.
    +The following tenants of DragonRuby are what set us apart from other game engines. Given that Game Toolkit is a relatively new engine, there are definitely features that are missing. So having a big check list of "all the cool things" is not this engine's forte. This is compensated with a strong commitment to the following principles.
     ** Processing line: ~** Challenge The Status Quo~
     - Header detected.
     *** True Line Result
    @@ -1238,16 +1274,16 @@ There is a programming idiom in software called "The Pit of Success". The term n
     ** Processing line: ~DragonRuby's philosophy is to provide multiple options across the "make it~
     ** Processing line: ~fast" vs "make it right" spectrum, with incremental/intuitive~
     ** Processing line: ~transitions between the options provided. A concrete example of this philosophy~
    -** Processing line: ~would be render primitives: the spectrum of options allows renderable constructs take~
    -** Processing line: ~the form of tuples/arrays (easy to pickup, simple, and fast to code/prototype with),~
    +** Processing line: ~would be render primitives: the spectrum of options allows renderable constructs that~
    +** Processing line: ~take the form of tuples/arrays (easy to pickup, simple, and fast to code/prototype with),~
     ** Processing line: ~hashes (a little more work, but gives you the ability to add additional properties),~
    -** Processing line: ~open and string entities (more work than hashes, but yields cleaner apis),~
    +** Processing line: ~open and strict entities (more work than hashes, but yields cleaner apis),~
     ** Processing line: ~and finally - if you really need full power/flexibility in rendering - classes~
     ** Processing line: ~(which take the most amount of code and programming knowledge to create).~
     ** Processing line: ~~
     - End of paragraph detected.
     *** True Line Result
    -DragonRuby's philosophy is to provide multiple options across the "make it fast" vs "make it right" spectrum, with incremental/intuitive transitions between the options provided. A concrete example of this philosophy would be render primitives: the spectrum of options allows renderable constructs take the form of tuples/arrays (easy to pickup, simple, and fast to code/prototype with), hashes (a little more work, but gives you the ability to add additional properties), open and string entities (more work than hashes, but yields cleaner apis), and finally - if you really need full power/flexibility in rendering - classes (which take the most amount of code and programming knowledge to create).
    +DragonRuby's philosophy is to provide multiple options across the "make it fast" vs "make it right" spectrum, with incremental/intuitive transitions between the options provided. A concrete example of this philosophy would be render primitives: the spectrum of options allows renderable constructs that take the form of tuples/arrays (easy to pickup, simple, and fast to code/prototype with), hashes (a little more work, but gives you the ability to add additional properties), open and strict entities (more work than hashes, but yields cleaner apis), and finally - if you really need full power/flexibility in rendering - classes (which take the most amount of code and programming knowledge to create).
     ** Processing line: ~** Release Early and Often~
     - Header detected.
     *** True Line Result
    @@ -1558,11 +1594,11 @@ The elevator pitch is:
     ** Processing line: ~DragonRuby is a Multilevel Cross-platform Runtime. The "multiple levels"~
     ** Processing line: ~within the runtime allows us to target platforms no other Ruby can~
     ** Processing line: ~target: PC, Mac, Linux, Raspberry Pi, WASM, iOS, Android, Nintendo~
    -** Processing line: ~Switch, PS4, Xbox, and Scadia.~
    +** Processing line: ~Switch, PS4, Xbox, and Stadia.~
     ** Processing line: ~~
     - End of paragraph detected.
     *** True Line Result
    -DragonRuby is a Multilevel Cross-platform Runtime. The "multiple levels" within the runtime allows us to target platforms no other Ruby can target: PC, Mac, Linux, Raspberry Pi, WASM, iOS, Android, Nintendo Switch, PS4, Xbox, and Scadia.
    +DragonRuby is a Multilevel Cross-platform Runtime. The "multiple levels" within the runtime allows us to target platforms no other Ruby can target: PC, Mac, Linux, Raspberry Pi, WASM, iOS, Android, Nintendo Switch, PS4, Xbox, and Stadia.
     ** Processing line: ~**** What does Multilevel Cross-platform mean?~
     - Header detected.
     *** True Line Result
    @@ -1770,14 +1806,14 @@ You can use DragonRuby's Console within the game to inspect object and execute s
     - End of paragraph detected.
     *** True Line Result
     - If you use the `repl` method, the code will be executed and the DragonRuby Console will automatically open so you can see the results (on Mac and Linux, the results will also be printed to the terminal).
    -** Processing line: ~- All ~puts~ statements will also be saved to ~logs/log.txt~. So if you want to stay in your editor and not look at the terminal, or the DragonRuby Console, you can ~tail~ this file.~
    +** Processing line: ~- All ~puts~ statements will also be saved to ~logs/puts.txt~. So if you want to stay in your editor and not look at the terminal, or the DragonRuby Console, you can ~tail~ this file.~
     - Line was identified as a list.
     *** True Line Result
     
     ** Processing line: ~~
     - End of paragraph detected.
     *** True Line Result
    -- All ~puts~ statements will also be saved to ~logs/log.txt~. So if you want to stay in your editor and not look at the terminal, or the DragonRuby Console, you can ~tail~ this file.
    +- All ~puts~ statements will also be saved to ~logs/puts.txt~. So if you want to stay in your editor and not look at the terminal, or the DragonRuby Console, you can ~tail~ this file.
     ** Processing line: ~4. To ignore code in ~repl.rb~, instead of commenting it out, prefix ~repl~ with the letter ~x~ and it'll be ignored.~
     ** Processing line: ~~
     - End of paragraph detected.
    @@ -1897,14 +1933,14 @@ You can use DragonRuby's replay capabilities to troubleshoot:
     - Line was identified as a start of a list.
     *** True Line Result
     
    -** Processing line: ~2. Use ~./dragonruby mygame --record~ to create a game play recording that you can use to find the exception (you can replay a recoding by executing ~./dragonruby mygame --replay last_replay.txt~ or through the DragonRuby Console using ~$gtk.recording.start_replay "last_replay.txt"~.~
    +** Processing line: ~2. Use ~./dragonruby mygame --record~ to create a game play recording that you can use to find the exception (you can replay a recording by executing ~./dragonruby mygame --replay last_replay.txt~ or through the DragonRuby Console using ~$gtk.recording.start_replay "last_replay.txt"~.~
     - Line was identified as a continuation of a list.
     *** True Line Result
     1. DragonRuby is hot loaded which gives you a very fast feedback loop (if the game throws an exception, it's because of the code you just added).
     ** Processing line: ~3. DragonRuby also ships with a unit testing facility. You can invoke the following command to run a test: ~./dragonruby . --eval some_ruby_file.rb --no-tick~.~
     - Line was identified as a continuation of a list.
     *** True Line Result
    -2. Use ~./dragonruby mygame --record~ to create a game play recording that you can use to find the exception (you can replay a recoding by executing ~./dragonruby mygame --replay last_replay.txt~ or through the DragonRuby Console using ~$gtk.recording.start_replay "last_replay.txt"~.
    +2. Use ~./dragonruby mygame --record~ to create a game play recording that you can use to find the exception (you can replay a recording by executing ~./dragonruby mygame --replay last_replay.txt~ or through the DragonRuby Console using ~$gtk.recording.start_replay "last_replay.txt"~.
     ** Processing line: ~4. Get into the habit of adding debugging facilities within the game itself. You can add drawing primitives to ~args.outputs.debug~ that will render on top of your game but will be ignored in a production release.~
     - Line was identified as a continuation of a list.
     *** True Line Result
    @@ -1944,11 +1980,11 @@ You can use DragonRuby's replay capabilities to troubleshoot:
     *** True Line Result
     Let's check the official source for the answer to this question: isrubydead.com: [[https://isrubydead.com/]].
     ** Processing line: ~On a more serious note, Ruby's _quantity_ levels aren't what they used~
    -** Processing line: ~to be. And that's totally fine. Every one chases the new and shiny.~
    +** Processing line: ~to be. And that's totally fine. Everyone chases the new and shiny.~
     ** Processing line: ~~
     - End of paragraph detected.
     *** True Line Result
    -On a more serious note, Ruby's _quantity_ levels aren't what they used to be. And that's totally fine. Every one chases the new and shiny.
    +On a more serious note, Ruby's _quantity_ levels aren't what they used to be. And that's totally fine. Everyone chases the new and shiny.
     ** Processing line: ~What really matters is _quality/maturity_. Here is the latest (StackOverflow~
     ** Processing line: ~Survey sorted by highest paid developers)[https://insights.stackoverflow.com/survey/2019#top-paying-technologies].~
     ** Processing line: ~~
    @@ -2134,16 +2170,14 @@ Just contact Amir at amir.rajan@dragonruby.org with a short explanation of your
     - End of paragraph detected.
     *** True Line Result
     
    -** Processing line: ~You can try our [web-based sandbox environment](). But it won't do the~
    -** Processing line: ~runtime justice. Or just come to our [Slack]() or [Discord]() channel~
    -** Processing line: ~and ask questions. We'd be happy to have a one on one video chat with~
    -** Processing line: ~you and show off all the cool stuff we're doing.~
    +** Processing line: ~You can try our web-based sandbox environment at [[http://fiddle.dragonruby.org]]. But it won't do the~
    +** Processing line: ~runtime justice. Or just come to our Discord Channel at [[http://discord.dragonruby.org]] and ask questions.~
    +** Processing line: ~We'd be happy to have a one on one video chat with you and show off all the cool stuff we're doing.~
     ** Processing line: ~~
     - End of paragraph detected.
     *** True Line Result
    -You can try our [web-based sandbox environment](). But it won't do the runtime justice. Or just come to our [Slack]() or [Discord]() channel and ask questions. We'd be happy to have a one on one video chat with you and show off all the cool stuff we're doing.
    -** Processing line: ~Seriously just buy it. Get a refund if you don't like it. We make it~
    -** Processing line: ~stupid easy to do so.~
    +You can try our web-based sandbox environment at [[http://fiddle.dragonruby.org]]. But it won't do the runtime justice. Or just come to our Discord Channel at [[http://discord.dragonruby.org]] and ask questions. We'd be happy to have a one on one video chat with you and show off all the cool stuff we're doing.
    +** Processing line: ~Seriously just buy it. Get a refund if you don't like it. We make it stupid easy to do so.~
     ** Processing line: ~~
     - End of paragraph detected.
     *** True Line Result
    @@ -2556,10 +2590,14 @@ You can represent a sprite as a ~Hash~:
     - Inside source: true
     *** True Line Result
           angle_anchor_x: 0.5,
    -** Processing line: ~      angle_anchor_y: 1.0~
    +** Processing line: ~      angle_anchor_y: 1.0,~
     - Inside source: true
     *** True Line Result
    -      angle_anchor_y: 1.0
    +      angle_anchor_y: 1.0,
    +** Processing line: ~      blendmode_enum: 1~
    +- Inside source: true
    +*** True Line Result
    +      blendmode_enum: 1
     ** Processing line: ~    }~
     - Inside source: true
     *** True Line Result
    @@ -2576,6 +2614,12 @@ You can represent a sprite as a ~Hash~:
     - End of paragraph detected.
     *** True Line Result
     
    +** Processing line: ~The ~blendmode_enum~ value can be set to ~0~ (no blending), ~1~ (alpha blending),~
    +** Processing line: ~~2~ (additive blending), ~3~ (modulo blending), ~4~ (multiply blending).~
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +The ~blendmode_enum~ value can be set to ~0~ (no blending), ~1~ (alpha blending), ~2~ (additive blending), ~3~ (modulo blending), ~4~ (multiply blending).
     ** Processing line: ~You can represent a sprite as an ~object~:~
     ** Processing line: ~~
     - End of paragraph detected.
    @@ -2611,10 +2655,10 @@ You can represent a sprite as an ~object~:
     - Inside source: true
     *** True Line Result
                       :flip_horizontally, :flip_vertically,
    -** Processing line: ~                  :angle_anchor_x, :angle_anchor_y~
    +** Processing line: ~                  :angle_anchor_x, :angle_anchor_y, :blendmode_enum~
     - Inside source: true
     *** True Line Result
    -                  :angle_anchor_x, :angle_anchor_y
    +                  :angle_anchor_x, :angle_anchor_y, :blendmode_enum
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
    @@ -2941,46 +2985,50 @@ You can add additional metadata about your game within a label, which requires y
     - Inside source: true
     *** True Line Result
         args.outputs.labels << {
    -** Processing line: ~      x:              200,~
    +** Processing line: ~      x:                       200,~
     - Inside source: true
     *** True Line Result
    -      x:              200,
    -** Processing line: ~      y:              550,~
    +      x:                       200,
    +** Processing line: ~      y:                       550,~
     - Inside source: true
     *** True Line Result
    -      y:              550,
    -** Processing line: ~      text:           "dragonruby",~
    +      y:                       550,
    +** Processing line: ~      text:                    "dragonruby",~
     - Inside source: true
     *** True Line Result
    -      text:           "dragonruby",
    -** Processing line: ~      size_enum:      2,~
    +      text:                    "dragonruby",
    +** Processing line: ~      size_enum:               2,~
     - Inside source: true
     *** True Line Result
    -      size_enum:      2,
    -** Processing line: ~      alignment_enum: 1,~
    +      size_enum:               2,
    +** Processing line: ~      alignment_enum:          1,~
     - Inside source: true
     *** True Line Result
    -      alignment_enum: 1,
    -** Processing line: ~      r:              155,~
    +      alignment_enum:          1,
    +** Processing line: ~      r:                       155,~
     - Inside source: true
     *** True Line Result
    -      r:              155,
    -** Processing line: ~      g:              50,~
    +      r:                       155,
    +** Processing line: ~      g:                       50,~
     - Inside source: true
     *** True Line Result
    -      g:              50,
    -** Processing line: ~      b:              50,~
    +      g:                       50,
    +** Processing line: ~      b:                       50,~
     - Inside source: true
     *** True Line Result
    -      b:              50,
    -** Processing line: ~      a:              255,~
    +      b:                       50,
    +** Processing line: ~      a:                       255,~
     - Inside source: true
     *** True Line Result
    -      a:              255,
    -** Processing line: ~      font:           "fonts/manaspc.ttf",~
    +      a:                       255,
    +** Processing line: ~      font:                    "fonts/manaspc.ttf",~
     - Inside source: true
     *** True Line Result
    -      font:           "fonts/manaspc.ttf",
    +      font:                    "fonts/manaspc.ttf",
    +** Processing line: ~      vertical_alignment_enum: 0, # 0 is bottom, 1 is middle, 2 is top~
    +- Inside source: true
    +*** True Line Result
    +      vertical_alignment_enum: 0, # 0 is bottom, 1 is middle, 2 is top
     ** Processing line: ~      # You can add any properties you like (this will be ignored/won't cause errors)~
     - Inside source: true
     *** True Line Result
    @@ -3110,6 +3158,67 @@ You can get the render size of any string using ~args.gtk.calcstringbox~.
     - End of paragraph detected.
     *** True Line Result
     
    +** Processing line: ~** Rendering Labels With New Line Characters And Wrapping~
    +- Header detected.
    +*** True Line Result
    +
    +*** True Line Result
    +** Rendering Labels With New Line Characters And Wrapping
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +
    +** Processing line: ~You can use a strategy like the following to create multiple labels from a String.~
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +You can use a strategy like the following to create multiple labels from a String.
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  def tick args~
    +- Inside source: true
    +*** True Line Result
    +  def tick args
    +** Processing line: ~    long_string = "Lorem ipsum dolor sit amet, consectetur adipiscing elitteger dolor velit, ultricies vitae libero vel, aliquam imperdiet enim."~
    +- Inside source: true
    +*** True Line Result
    +    long_string = "Lorem ipsum dolor sit amet, consectetur adipiscing elitteger dolor velit, ultricies vitae libero vel, aliquam imperdiet enim."
    +** Processing line: ~    max_character_length = 30~
    +- Inside source: true
    +*** True Line Result
    +    max_character_length = 30
    +** Processing line: ~    long_strings_split = args.string.wrapped_lines long_string, max_character_length~
    +- Inside source: true
    +*** True Line Result
    +    long_strings_split = args.string.wrapped_lines long_string, max_character_length
    +** Processing line: ~    args.outputs.labels << long_strings_split.map_with_index do |s, i|~
    +- Inside source: true
    +*** True Line Result
    +    args.outputs.labels << long_strings_split.map_with_index do |s, i|
    +** Processing line: ~      { x: 10, y: 600 - (i * 20), text: s }~
    +- Inside source: true
    +*** True Line Result
    +      { x: 10, y: 600 - (i * 20), text: s }
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
    +*** True Line Result
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +
     ** Processing line: ~** How To Play A Sound~
     - Header detected.
     *** True Line Result
    @@ -3699,11 +3808,11 @@ Returns ~true~ if: the ~right~ arrow or ~d~ key is pressed or held on the ~keybo
     Returns ~-1~ (left), ~0~ (neutral), or ~+1~ (right) depending on results of ~args.inputs.left~ and ~args.inputs.right~.
     *** True Line Result
     *** ~.up_down~
    -** Processing line: ~Returns ~-1~ (down), ~0~ (neutral), or ~+1~ (right) depending on results of ~args.inputs.up~ and ~args.inputs.down~.~
    +** Processing line: ~Returns ~-1~ (down), ~0~ (neutral), or ~+1~ (up) depending on results of ~args.inputs.down~ and ~args.inputs.up~.~
     ** Processing line: ~*** ~.text~ OR ~.history~~
     - Header detected.
     *** True Line Result
    -Returns ~-1~ (down), ~0~ (neutral), or ~+1~ (right) depending on results of ~args.inputs.up~ and ~args.inputs.down~.
    +Returns ~-1~ (down), ~0~ (neutral), or ~+1~ (up) depending on results of ~args.inputs.down~ and ~args.inputs.up~.
     *** True Line Result
     *** ~.text~ OR ~.history~
     ** Processing line: ~Returns a string that represents the last key that was pressed on the keyboard.~
    @@ -3785,13 +3894,23 @@ Returns a bitmask for all buttons on the mouse: ~1~ for a button in the ~down~ s
     **** ~mouse.wheel~
     ** Processing line: ~Represents the mouse wheel. Returns ~nil~ if no mouse wheel actions occurred.~
     ** Processing line: ~***** ~.x~~
    +- Header detected.
    +*** True Line Result
    +Represents the mouse wheel. Returns ~nil~ if no mouse wheel actions occurred.
    +*** True Line Result
    +***** ~.x~
     ** Processing line: ~Returns the negative or positive number if the mouse wheel has changed in the ~x~ axis.~
     ** Processing line: ~***** ~.y~~
    +- Header detected.
    +*** True Line Result
    +Returns the negative or positive number if the mouse wheel has changed in the ~x~ axis.
    +*** True Line Result
    +***** ~.y~
     ** Processing line: ~Returns the negative or positive number if the mouse wheel has changed in the ~y~ axis.~
     ** Processing line: ~**** ~.click~ OR ~.down~, ~.previous_click~, ~.up~~
     - Header detected.
     *** True Line Result
    -Represents the mouse wheel. Returns ~nil~ if no mouse wheel actions occurred. ***** ~.x~ Returns the negative or positive number if the mouse wheel has changed in the ~x~ axis. ***** ~.y~ Returns the negative or positive number if the mouse wheel has changed in the ~y~ axis.
    +Returns the negative or positive number if the mouse wheel has changed in the ~y~ axis.
     *** True Line Result
     **** ~.click~ OR ~.down~, ~.previous_click~, ~.up~
     ** Processing line: ~The properties ~args.inputs.mouse.(click|down|previous_click|up)~ each return ~nil~ if the mouse button event didn't occur. And return an Entity~
    @@ -3803,47 +3922,47 @@ The properties ~args.inputs.mouse.(click|down|previous_click|up)~ each return ~n
     *** True Line Result
     *** ~.controller_one~, ~.controller_two~
     ** Processing line: ~Represents controllers connected to the usb ports.~
    -** Processing line: ~**** ~.up~
    +** Processing line: ~**** ~.up~~
     - Header detected.
     *** True Line Result
     Represents controllers connected to the usb ports.
     *** True Line Result
    -**** ~.up
    +**** ~.up~
     ** Processing line: ~Returns ~true~ if ~up~ is pressed or held on the directional or left analog.~
    -** Processing line: ~**** ~.down~
    +** Processing line: ~**** ~.down~~
     - Header detected.
     *** True Line Result
     Returns ~true~ if ~up~ is pressed or held on the directional or left analog.
     *** True Line Result
    -**** ~.down
    +**** ~.down~
     ** Processing line: ~Returns ~true~ if ~down~ is pressed or held on the directional or left analog.~
    -** Processing line: ~**** ~.left~
    +** Processing line: ~**** ~.left~~
     - Header detected.
     *** True Line Result
     Returns ~true~ if ~down~ is pressed or held on the directional or left analog.
     *** True Line Result
    -**** ~.left
    +**** ~.left~
     ** Processing line: ~Returns ~true~ if ~left~ is pressed or held on the directional or left analog.~
    -** Processing line: ~**** ~.right~
    +** Processing line: ~**** ~.right~~
     - Header detected.
     *** True Line Result
     Returns ~true~ if ~left~ is pressed or held on the directional or left analog.
     *** True Line Result
    -**** ~.right
    +**** ~.right~
     ** Processing line: ~Returns ~true~ if ~right~ is pressed or held on the directional or left analog.~
    -** Processing line: ~**** ~.left_right~
    +** Processing line: ~**** ~.left_right~~
     - Header detected.
     *** True Line Result
     Returns ~true~ if ~right~ is pressed or held on the directional or left analog.
     *** True Line Result
    -**** ~.left_right
    +**** ~.left_right~
     ** Processing line: ~Returns ~-1~ (left), ~0~ (neutral), or ~+1~ (right) depending on results of ~args.inputs.controller_(one|two).left~ and ~args.inputs.controller_(one|two).right~.~
    -** Processing line: ~**** ~.up_down~
    +** Processing line: ~**** ~.up_down~~
     - Header detected.
     *** True Line Result
     Returns ~-1~ (left), ~0~ (neutral), or ~+1~ (right) depending on results of ~args.inputs.controller_(one|two).left~ and ~args.inputs.controller_(one|two).right~.
     *** True Line Result
    -**** ~.up_down
    +**** ~.up_down~
     ** Processing line: ~Returns ~-1~ (down), ~0~ (neutral), or ~+1~ (up) depending on results of ~args.inputs.controller_(one|two).up~ and ~args.inputs.controller_(one|two).down~.~
     ** Processing line: ~**** ~.(left_analog_x_raw|right_analog_x_raw)~~
     - Header detected.
    @@ -3873,33 +3992,33 @@ Returns a number between ~-1~ and ~1~ which represents the percentage the analog
     *** True Line Result
     **** ~.left_analog_y_perc|right_analog_y_perc)~
     ** Processing line: ~Returns a number between ~-1~ and ~1~ which represents the percentage the analog is moved vertically as a ratio of the maximum vertical movement.~
    -** Processing line: ~**** ~.directional_up)~~
    +** Processing line: ~**** ~.directional_up~~
     - Header detected.
     *** True Line Result
     Returns a number between ~-1~ and ~1~ which represents the percentage the analog is moved vertically as a ratio of the maximum vertical movement.
     *** True Line Result
    -**** ~.directional_up)~
    +**** ~.directional_up~
     ** Processing line: ~Returns ~true~ if ~up~ is pressed or held on the directional.~
    -** Processing line: ~**** ~.directional_down)~~
    +** Processing line: ~**** ~.directional_down~~
     - Header detected.
     *** True Line Result
     Returns ~true~ if ~up~ is pressed or held on the directional.
     *** True Line Result
    -**** ~.directional_down)~
    +**** ~.directional_down~
     ** Processing line: ~Returns ~true~ if ~down~ is pressed or held on the directional.~
    -** Processing line: ~**** ~.directional_left)~~
    +** Processing line: ~**** ~.directional_left~~
     - Header detected.
     *** True Line Result
     Returns ~true~ if ~down~ is pressed or held on the directional.
     *** True Line Result
    -**** ~.directional_left)~
    +**** ~.directional_left~
     ** Processing line: ~Returns ~true~ if ~left~ is pressed or held on the directional.~
    -** Processing line: ~**** ~.directional_right)~~
    +** Processing line: ~**** ~.directional_right~~
     - Header detected.
     *** True Line Result
     Returns ~true~ if ~left~ is pressed or held on the directional.
     *** True Line Result
    -**** ~.directional_right)~
    +**** ~.directional_right~
     ** Processing line: ~Returns ~true~ if ~right~ is pressed or held on the directional.~
     ** Processing line: ~**** ~.(a|b|x|y|l1|r1|l2|r2|l3|r3|start|select)~~
     - Header detected.
    @@ -4491,10 +4610,39 @@ Send any Primitive to this collection which represents things you render to the
     *** True Line Result
     ** ~args.geometry~
     ** Processing line: ~This property contains geometric functions. Functions can be invoked via ~args.geometry.FUNCTION~.~
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +This property contains geometric functions. Functions can be invoked via ~args.geometry.FUNCTION~.
    +** Processing line: ~Here are some general notes with regards to the arguments these geometric functions accept.~
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +Here are some general notes with regards to the arguments these geometric functions accept.
    +** Processing line: ~1. ~Rectangles~ can be represented as an ~Array~ with four (or more) values ~[x, y, w, h]~, as a ~Hash~ ~{ x:, y:, w:, h: }~ or an object that responds to ~x~, ~y~, ~w~, and ~h~.~
    +- Line was identified as a start of a list.
    +*** True Line Result
    +
    +** Processing line: ~2. ~Points~ can be represent as an ~Array~ with two (or more) values ~[x, y]~, as a ~Hash~ ~{ x:, y:}~ or an object that responds to ~x~, and ~y~.~
    +- Line was identified as a continuation of a list.
    +*** True Line Result
    +1. ~Rectangles~ can be represented as an ~Array~ with four (or more) values ~[x, y, w, h]~, as a ~Hash~ ~{ x:, y:, w:, h: }~ or an object that responds to ~x~, ~y~, ~w~, and ~h~.
    +** Processing line: ~3. ~Lines~ can be represented as an ~Array~ with four (or more) values ~[x, y, x2, y2]~, as a ~Hash~ ~{ x:, y:, x2:, y2: }~ or an object that responds to ~x~, ~y~, ~x2~, and ~y2~.~
    +- Line was identified as a continuation of a list.
    +*** True Line Result
    +2. ~Points~ can be represent as an ~Array~ with two (or more) values ~[x, y]~, as a ~Hash~ ~{ x:, y:}~ or an object that responds to ~x~, and ~y~.
    +** Processing line: ~4. ~Angles~ are represented as degrees (not radians).~
    +- Line was identified as a continuation of a list.
    +*** True Line Result
    +3. ~Lines~ can be represented as an ~Array~ with four (or more) values ~[x, y, x2, y2]~, as a ~Hash~ ~{ x:, y:, x2:, y2: }~ or an object that responds to ~x~, ~y~, ~x2~, and ~y2~.
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +4. ~Angles~ are represented as degrees (not radians).
     ** Processing line: ~*** ~.inside_rect? rect_1, rect_2~~
     - Header detected.
     *** True Line Result
    -This property contains geometric functions. Functions can be invoked via ~args.geometry.FUNCTION~.
    +
     *** True Line Result
     *** ~.inside_rect? rect_1, rect_2~
     ** Processing line: ~Returns ~true~ if ~rect_1~ is inside ~rect_2~.~
    @@ -6575,12 +6723,12 @@ Creates a solid black rectangle located at 100, 100. 160 pixels wide and 90 pixe
     - End of paragraph detected.
     *** True Line Result
     
    -** Processing line: ~The value for the color and alpha is an number between ~0~ and ~255~. The~
    +** Processing line: ~The value for the color and alpha is a number between ~0~ and ~255~. The~
     ** Processing line: ~alpha property is optional and will be set to ~255~ if not specified.~
     ** Processing line: ~~
     - End of paragraph detected.
     *** True Line Result
    -The value for the color and alpha is an number between ~0~ and ~255~. The alpha property is optional and will be set to ~255~ if not specified.
    +The value for the color and alpha is a number between ~0~ and ~255~. The alpha property is optional and will be set to ~255~ if not specified.
     ** Processing line: ~Creates a green solid rectangle with an opacity of 50%.~
     ** Processing line: ~~
     - End of paragraph detected.
    @@ -6706,12 +6854,12 @@ If you want a more readable invocation. You can use the following hash to create
     *** True Line Result
     
     ** Processing line: ~You can also create a class with solid/border properties and render it as a primitive.~
    -** Processing line: ~ALL properties must on the class. *Additionally*, a method called ~primitive_marker~~
    +** Processing line: ~ALL properties must be on the class. *Additionally*, a method called ~primitive_marker~~
     ** Processing line: ~must be defined on the class.~
     ** Processing line: ~~
     - End of paragraph detected.
     *** True Line Result
    -You can also create a class with solid/border properties and render it as a primitive. ALL properties must on the class. *Additionally*, a method called ~primitive_marker~ must be defined on the class.
    +You can also create a class with solid/border properties and render it as a primitive. ALL properties must be on the class. *Additionally*, a method called ~primitive_marker~ must be defined on the class.
     ** Processing line: ~Here is an example:~
     ** Processing line: ~~
     - End of paragraph detected.
    @@ -6926,6 +7074,385 @@ You have to use ~args.outputs.borders~:
     - End of paragraph detected.
     *** True Line Result
     
    +** Processing line: ~* DOCS: ~GTK::Outputs#sprites~~
    +- Header detected.
    +*** True Line Result
    +
    +*** True Line Result
    +* DOCS: ~GTK::Outputs#sprites~
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +
    +** Processing line: ~Add primitives to this collection to render a sprite to the screen.~
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +Add primitives to this collection to render a sprite to the screen.
    +** Processing line: ~** Rendering a sprite using an Array~
    +- Header detected.
    +*** True Line Result
    +
    +*** True Line Result
    +** Rendering a sprite using an Array
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +
    +** Processing line: ~Creates a sprite of a white circle located at 100, 100. 160 pixels~
    +** Processing line: ~wide and 90 pixels tall.~
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +Creates a sprite of a white circle located at 100, 100. 160 pixels wide and 90 pixels tall.
    +** Processing line: ~#+begin_src~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src
    +** Processing line: ~  def tick args~
    +- Inside source: true
    +*** True Line Result
    +  def tick args
    +** Processing line: ~    #                         X    Y   WIDTH   HEIGHT                      PATH~
    +- Inside source: true
    +*** True Line Result
    +    #                         X    Y   WIDTH   HEIGHT                      PATH
    +** Processing line: ~    args.outputs.sprites << [100, 100,   160,     90, "sprites/circle/white.png]~
    +- Inside source: true
    +*** True Line Result
    +    args.outputs.sprites << [100, 100,   160,     90, "sprites/circle/white.png]
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
    +*** True Line Result
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +
    +** Processing line: ~** Rendering a sprite using an Array with colors and alpha~
    +- Header detected.
    +*** True Line Result
    +
    +*** True Line Result
    +** Rendering a sprite using an Array with colors and alpha
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +
    +** Processing line: ~The value for the color and alpha is a number between ~0~ and ~255~. The~
    +** Processing line: ~alpha property is optional and will be set to ~255~ if not specified.~
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +The value for the color and alpha is a number between ~0~ and ~255~. The alpha property is optional and will be set to ~255~ if not specified.
    +** Processing line: ~Creates a green circle sprite with an opacity of 50%.~
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +Creates a green circle sprite with an opacity of 50%.
    +** Processing line: ~#+begin_src~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src
    +** Processing line: ~  def tick args~
    +- Inside source: true
    +*** True Line Result
    +  def tick args
    +** Processing line: ~    #                         X    Y  WIDTH  HEIGHT           PATH                ANGLE  ALPHA  RED  GREEN  BLUE~
    +- Inside source: true
    +*** True Line Result
    +    #                         X    Y  WIDTH  HEIGHT           PATH                ANGLE  ALPHA  RED  GREEN  BLUE
    +** Processing line: ~    args.outputs.sprites << [100, 100,  160,     90, "sprites/circle/white.png",     0,    128,   0,   255,    0]~
    +- Inside source: true
    +*** True Line Result
    +    args.outputs.sprites << [100, 100,  160,     90, "sprites/circle/white.png",     0,    128,   0,   255,    0]
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
    +*** True Line Result
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +
    +** Processing line: ~** Rendering a sprite using a Hash~
    +- Header detected.
    +*** True Line Result
    +
    +*** True Line Result
    +** Rendering a sprite using a Hash
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +
    +** Processing line: ~If you want a more readable invocation. You can use the following hash to create a sprite.~
    +** Processing line: ~Any parameters that are not specified will be given a default value. The keys of the hash can~
    +** Processing line: ~be provided in any order.~
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +If you want a more readable invocation. You can use the following hash to create a sprite. Any parameters that are not specified will be given a default value. The keys of the hash can be provided in any order.
    +** Processing line: ~#+begin_src~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src
    +** Processing line: ~  def tick args~
    +- Inside source: true
    +*** True Line Result
    +  def tick args
    +** Processing line: ~    args.outputs.sprites << {~
    +- Inside source: true
    +*** True Line Result
    +    args.outputs.sprites << {
    +** Processing line: ~      x:                             0,~
    +- Inside source: true
    +*** True Line Result
    +      x:                             0,
    +** Processing line: ~      y:                             0,~
    +- Inside source: true
    +*** True Line Result
    +      y:                             0,
    +** Processing line: ~      w:                           100,~
    +- Inside source: true
    +*** True Line Result
    +      w:                           100,
    +** Processing line: ~      h:                           100,~
    +- Inside source: true
    +*** True Line Result
    +      h:                           100,
    +** Processing line: ~      path: "sprites/circle/white.png",~
    +- Inside source: true
    +*** True Line Result
    +      path: "sprites/circle/white.png",
    +** Processing line: ~      angle:                         0,~
    +- Inside source: true
    +*** True Line Result
    +      angle:                         0,
    +** Processing line: ~      a:                           255,~
    +- Inside source: true
    +*** True Line Result
    +      a:                           255,
    +** Processing line: ~      r:                             0,~
    +- Inside source: true
    +*** True Line Result
    +      r:                             0,
    +** Processing line: ~      g:                           255,~
    +- Inside source: true
    +*** True Line Result
    +      g:                           255,
    +** Processing line: ~      b:                             0~
    +- Inside source: true
    +*** True Line Result
    +      b:                             0
    +** Processing line: ~    }~
    +- Inside source: true
    +*** True Line Result
    +    }
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
    +*** True Line Result
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +
    +** Processing line: ~** Rendering a solid using a Class~
    +- Header detected.
    +*** True Line Result
    +
    +*** True Line Result
    +** Rendering a solid using a Class
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +
    +** Processing line: ~You can also create a class with solid/border properties and render it as a primitive.~
    +** Processing line: ~ALL properties must be on the class. *Additionally*, a method called ~primitive_marker~~
    +** Processing line: ~must be defined on the class.~
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +You can also create a class with solid/border properties and render it as a primitive. ALL properties must be on the class. *Additionally*, a method called ~primitive_marker~ must be defined on the class.
    +** Processing line: ~Here is an example:~
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +Here is an example:
    +** Processing line: ~#+begin_src~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src
    +** Processing line: ~  # Create type with ALL sprite properties AND primitive_marker~
    +- Inside source: true
    +*** True Line Result
    +  # Create type with ALL sprite properties AND primitive_marker
    +** Processing line: ~  class Sprite~
    +- Inside source: true
    +*** True Line Result
    +  class Sprite
    +** Processing line: ~    attr_accessor :x, :y, :w, :h, :path, :angle, :angle_anchor_x, :angle_anchor_y,  :tile_x, :tile_y, :tile_w, :tile_h, :source_x, :source_y, :source_w, :source_h, :flip_horizontally, :flip_vertically, :a, :r, :g, :b~
    +- Inside source: true
    +*** True Line Result
    +    attr_accessor :x, :y, :w, :h, :path, :angle, :angle_anchor_x, :angle_anchor_y,  :tile_x, :tile_y, :tile_w, :tile_h, :source_x, :source_y, :source_w, :source_h, :flip_horizontally, :flip_vertically, :a, :r, :g, :b
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    def primitive_marker~
    +- Inside source: true
    +*** True Line Result
    +    def primitive_marker
    +** Processing line: ~      :sprite~
    +- Inside source: true
    +*** True Line Result
    +      :sprite
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~  # Inherit from type~
    +- Inside source: true
    +*** True Line Result
    +  # Inherit from type
    +** Processing line: ~  class Circle < Sprite~
    +- Inside source: true
    +*** True Line Result
    +  class Circle < Sprite
    +** Processing line: ~  # constructor~
    +- Inside source: true
    +*** True Line Result
    +  # constructor
    +** Processing line: ~    def initialize x, y, size, path~
    +- Inside source: true
    +*** True Line Result
    +    def initialize x, y, size, path
    +** Processing line: ~      self.x = x~
    +- Inside source: true
    +*** True Line Result
    +      self.x = x
    +** Processing line: ~      self.y = y~
    +- Inside source: true
    +*** True Line Result
    +      self.y = y
    +** Processing line: ~      self.w = size~
    +- Inside source: true
    +*** True Line Result
    +      self.w = size
    +** Processing line: ~      self.h = size~
    +- Inside source: true
    +*** True Line Result
    +      self.h = size
    +** Processing line: ~      self.path = path~
    +- Inside source: true
    +*** True Line Result
    +      self.path = path
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~    def serlialize~
    +- Inside source: true
    +*** True Line Result
    +    def serlialize
    +** Processing line: ~      {x:self.x, y:self.y, w:self.w, h:self.h, path:self.path}~
    +- Inside source: true
    +*** True Line Result
    +      {x:self.x, y:self.y, w:self.w, h:self.h, path:self.path}
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    def inspect~
    +- Inside source: true
    +*** True Line Result
    +    def inspect
    +** Processing line: ~      serlialize.to_s~
    +- Inside source: true
    +*** True Line Result
    +      serlialize.to_s
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    def to_s~
    +- Inside source: true
    +*** True Line Result
    +    def to_s
    +** Processing line: ~      serlialize.to_s~
    +- Inside source: true
    +*** True Line Result
    +      serlialize.to_s
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
    +** Processing line: ~  def tick args~
    +- Inside source: true
    +*** True Line Result
    +  def tick args
    +** Processing line: ~    # render circle sprite~
    +- Inside source: true
    +*** True Line Result
    +    # render circle sprite
    +** Processing line: ~    args.outputs.sprites  << Circle.new(10, 10, 32,"sprites/circle/white.png")~
    +- Inside source: true
    +*** True Line Result
    +    args.outputs.sprites  << Circle.new(10, 10, 32,"sprites/circle/white.png")
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
    +*** True Line Result
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +
     ** Processing line: ~* DOCS: ~GTK::Outputs#screenshots~~
     - Header detected.
     *** True Line Result
    @@ -7163,34 +7690,34 @@ The ~GTK::MousePoint~ has the following properties.
     - Line was identified as a list.
     *** True Line Result
     - ~y~: Integer representing the mouse's y.
    -** Processing line: ~- ~w~: Width of the point that always returns ~0~ (included so that it can seemlessly work with ~GTK::Geometry~ functions).~
    +** Processing line: ~- ~w~: Width of the point that always returns ~0~ (included so that it can seamlessly work with ~GTK::Geometry~ functions).~
     - Line was identified as a list.
     *** True Line Result
     - ~point~: Array with the ~x~ and ~y~ values.
    -** Processing line: ~- ~h~: Height of the point that always returns ~0~ (included so that it can seemlessly work with ~GTK::Geometry~ functions).~
    +** Processing line: ~- ~h~: Height of the point that always returns ~0~ (included so that it can seamlessly work with ~GTK::Geometry~ functions).~
     - Line was identified as a list.
     *** True Line Result
    -- ~w~: Width of the point that always returns ~0~ (included so that it can seemlessly work with ~GTK::Geometry~ functions).
    -** Processing line: ~- ~left~: This value is the same as ~x~ (included so that it can seemlessly work with ~GTK::Geometry~ functions).~
    +- ~w~: Width of the point that always returns ~0~ (included so that it can seamlessly work with ~GTK::Geometry~ functions).
    +** Processing line: ~- ~left~: This value is the same as ~x~ (included so that it can seamlessly work with ~GTK::Geometry~ functions).~
     - Line was identified as a list.
     *** True Line Result
    -- ~h~: Height of the point that always returns ~0~ (included so that it can seemlessly work with ~GTK::Geometry~ functions).
    -** Processing line: ~- ~right~: This value is the same as ~x~ (included so that it can seemlessly work with ~GTK::Geometry~ functions).~
    +- ~h~: Height of the point that always returns ~0~ (included so that it can seamlessly work with ~GTK::Geometry~ functions).
    +** Processing line: ~- ~right~: This value is the same as ~x~ (included so that it can seamlessly work with ~GTK::Geometry~ functions).~
     - Line was identified as a list.
     *** True Line Result
    -- ~left~: This value is the same as ~x~ (included so that it can seemlessly work with ~GTK::Geometry~ functions).
    -** Processing line: ~- ~top~: This value is the same as ~y~ (included so that it can seemlessly work with ~GTK::Geometry~ functions).~
    +- ~left~: This value is the same as ~x~ (included so that it can seamlessly work with ~GTK::Geometry~ functions).
    +** Processing line: ~- ~top~: This value is the same as ~y~ (included so that it can seamlessly work with ~GTK::Geometry~ functions).~
     - Line was identified as a list.
     *** True Line Result
    -- ~right~: This value is the same as ~x~ (included so that it can seemlessly work with ~GTK::Geometry~ functions).
    -** Processing line: ~- ~bottom~: This value is the same as ~y~ (included so that it can seemlessly work with ~GTK::Geometry~ functions).~
    +- ~right~: This value is the same as ~x~ (included so that it can seamlessly work with ~GTK::Geometry~ functions).
    +** Processing line: ~- ~bottom~: This value is the same as ~y~ (included so that it can seamlessly work with ~GTK::Geometry~ functions).~
     - Line was identified as a list.
     *** True Line Result
    -- ~top~: This value is the same as ~y~ (included so that it can seemlessly work with ~GTK::Geometry~ functions).
    +- ~top~: This value is the same as ~y~ (included so that it can seamlessly work with ~GTK::Geometry~ functions).
     ** Processing line: ~- ~created_at~: The tick (~args.state.tick_count~) that this structure was created.~
     - Line was identified as a list.
     *** True Line Result
    -- ~bottom~: This value is the same as ~y~ (included so that it can seemlessly work with ~GTK::Geometry~ functions).
    +- ~bottom~: This value is the same as ~y~ (included so that it can seamlessly work with ~GTK::Geometry~ functions).
     ** Processing line: ~- ~global_created_at~: The global tick (~Kernel.global_tick_count~) that this structure was created.~
     - Line was identified as a list.
     *** True Line Result
    @@ -12924,10 +13451,10 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
                                      a: 255,
    -** Processing line: ~                                 font: "manaspc.ttf" }.label~
    +** Processing line: ~                                 font: "manaspc.ttf" }.label!~
     - Inside source: true
     *** True Line Result
    -                                 font: "manaspc.ttf" }.label
    +                                 font: "manaspc.ttf" }.label!
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
    @@ -12980,10 +13507,10 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
                                      a: 255,
    -** Processing line: ~                                 font: "manaspc.ttf" }.label~
    +** Processing line: ~                                 font: "manaspc.ttf" }.label!~
     - Inside source: true
     *** True Line Result
    -                                 font: "manaspc.ttf" }.label
    +                                 font: "manaspc.ttf" }.label!
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -13944,502 +14471,506 @@ Follows is a source code listing for all files that have been open sourced. This
     - End of paragraph detected.
     *** True Line Result
     
    -** Processing line: ~*** Rendering Basics - Audio Mixer - main.rb~
    +** Processing line: ~*** Input Basics - Keyboard - main.rb~
     - Header detected.
     *** True Line Result
     
     *** True Line Result
    -*** Rendering Basics - Audio Mixer - main.rb
    +*** Input Basics - Keyboard - main.rb
     ** Processing line: ~#+begin_src ruby~
     - Line was identified as the beginning of a code block.
     *** True Line Result
     
     *** True Line Result
     #+begin_src ruby
    -** Processing line: ~  # ./samples/01_rendering_basics/06_audio_mixer/app/main.rb~
    +** Processing line: ~  # ./samples/02_input_basics/01_keyboard/app/main.rb~
     - Inside source: true
     *** True Line Result
    -  # ./samples/01_rendering_basics/06_audio_mixer/app/main.rb
    -** Processing line: ~  $gtk.reset~
    +  # ./samples/02_input_basics/01_keyboard/app/main.rb
    +** Processing line: ~  =begin~
     - Inside source: true
     *** True Line Result
    -  $gtk.reset
    +  =begin
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  $boxsize = 30~
    +** Processing line: ~  APIs listing that haven't been encountered in a previous sample apps:~
     - Inside source: true
     *** True Line Result
    -  $boxsize = 30
    +  APIs listing that haven't been encountered in a previous sample apps:
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def render_sources args~
    -- Inside source: true
    -*** True Line Result
    -  def render_sources args
    -** Processing line: ~    mouse_in_panel = (args.state.selected != 0) && args.inputs.mouse.position.inside_rect?([900, 450, 340, 250])~
    +** Processing line: ~  - args.inputs.keyboard.key_up.KEY: The value of the properties will be set~
     - Inside source: true
     *** True Line Result
    -    mouse_in_panel = (args.state.selected != 0) && args.inputs.mouse.position.inside_rect?([900, 450, 340, 250])
    -** Processing line: ~    mouse_new_down = (args.state.mouse_held == 1)~
    +  - args.inputs.keyboard.key_up.KEY: The value of the properties will be set
    +** Processing line: ~    to the frame  that the key_up event occurred (the frame correlates~
     - Inside source: true
     *** True Line Result
    -    mouse_new_down = (args.state.mouse_held == 1)
    -** Processing line: ~~
    +    to the frame  that the key_up event occurred (the frame correlates
    +** Processing line: ~    to args.state.tick_count). Otherwise the value will be nil. For a~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    if (mouse_new_down && !mouse_in_panel)~
    +    to args.state.tick_count). Otherwise the value will be nil. For a
    +** Processing line: ~    full listing of keys, take a look at mygame/documentation/06-keyboard.md.~
     - Inside source: true
     *** True Line Result
    -    if (mouse_new_down && !mouse_in_panel)
    -** Processing line: ~      args.state.selected = 0  # will reset below if we hit something.~
    +    full listing of keys, take a look at mygame/documentation/06-keyboard.md.
    +** Processing line: ~  - args.state.PROPERTY: The state property on args is a dynamic~
     - Inside source: true
     *** True Line Result
    -      args.state.selected = 0  # will reset below if we hit something.
    -** Processing line: ~    end~
    +  - args.state.PROPERTY: The state property on args is a dynamic
    +** Processing line: ~    structure. You can define ANY property here with ANY type of~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +    structure. You can define ANY property here with ANY type of
    +** Processing line: ~    arbitrary nesting. Properties defined on args.state will be retained~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    args.audio.keys.each { |k|~
    +    arbitrary nesting. Properties defined on args.state will be retained
    +** Processing line: ~    across frames. If you attempt access a property that doesn't exist~
     - Inside source: true
     *** True Line Result
    -    args.audio.keys.each { |k|
    -** Processing line: ~      s = args.audio[k]~
    +    across frames. If you attempt access a property that doesn't exist
    +** Processing line: ~    on args.state, it will simply return nil (no exception will be thrown).~
     - Inside source: true
     *** True Line Result
    -      s = args.audio[k]
    +    on args.state, it will simply return nil (no exception will be thrown).
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      if (mouse_new_down) && !mouse_in_panel && args.inputs.mouse.position.inside_rect?([s[:screenx], s[:screeny], $boxsize, $boxsize])~
    -- Inside source: true
    -*** True Line Result
    -      if (mouse_new_down) && !mouse_in_panel && args.inputs.mouse.position.inside_rect?([s[:screenx], s[:screeny], $boxsize, $boxsize])
    -** Processing line: ~        args.state.selected = k~
    +** Processing line: ~  =end~
     - Inside source: true
     *** True Line Result
    -        args.state.selected = k
    -** Processing line: ~        args.state.dragging_source = true~
    +  =end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        args.state.dragging_source = true
    -** Processing line: ~      end~
    +
    +** Processing line: ~  # Along with outputs, inputs are also an essential part of video game development~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +  # Along with outputs, inputs are also an essential part of video game development
    +** Processing line: ~  # DragonRuby can take input from keyboards, mouse, and controllers.~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      isselected = (k == args.state.selected)~
    +  # DragonRuby can take input from keyboards, mouse, and controllers.
    +** Processing line: ~  # This sample app will cover keyboard input.~
     - Inside source: true
     *** True Line Result
    -      isselected = (k == args.state.selected)
    +  # This sample app will cover keyboard input.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      if isselected && args.state.dragging_source~
    +** Processing line: ~  # args.inputs.keyboard.key_up.a will check to see if the a key has been pressed~
     - Inside source: true
     *** True Line Result
    -      if isselected && args.state.dragging_source
    -** Processing line: ~        # you can hang anything on the audio hashes you want, so we store the~
    +  # args.inputs.keyboard.key_up.a will check to see if the a key has been pressed
    +** Processing line: ~  # This will work with the other keys as well~
     - Inside source: true
     *** True Line Result
    -        # you can hang anything on the audio hashes you want, so we store the
    -** Processing line: ~        #  actual screen position so it doesn't scale weirdly vs your mouse.~
    +  # This will work with the other keys as well
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        #  actual screen position so it doesn't scale weirdly vs your mouse.
    -** Processing line: ~        s[:screenx] = args.inputs.mouse.x - ($boxsize / 2)~
    +
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        s[:screenx] = args.inputs.mouse.x - ($boxsize / 2)
    -** Processing line: ~        s[:screeny] = args.inputs.mouse.y - ($boxsize / 2)~
    +
    +** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
    -        s[:screeny] = args.inputs.mouse.y - ($boxsize / 2)
    -** Processing line: ~~
    +  def tick args
    +** Processing line: ~    tick_instructions args, "Sample app shows how keyboard events are registered and accessed.", 360~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~        s[:screeny] = 50 if s[:screeny] < 50~
    +    tick_instructions args, "Sample app shows how keyboard events are registered and accessed.", 360
    +** Processing line: ~    # Notice how small_font accounts for all the remaining parameters~
     - Inside source: true
     *** True Line Result
    -        s[:screeny] = 50 if s[:screeny] < 50
    -** Processing line: ~        s[:screeny] = (719 - $boxsize) if s[:screeny] > (719 - $boxsize)~
    +    # Notice how small_font accounts for all the remaining parameters
    +** Processing line: ~    args.outputs.labels << { x: 460, y: row_to_px(args, 0), text: "Current game time: #{args.state.tick_count}", size_enum: -1 }~
     - Inside source: true
     *** True Line Result
    -        s[:screeny] = (719 - $boxsize) if s[:screeny] > (719 - $boxsize)
    -** Processing line: ~        s[:screenx] = 0 if s[:screenx] < 0~
    +    args.outputs.labels << { x: 460, y: row_to_px(args, 0), text: "Current game time: #{args.state.tick_count}", size_enum: -1 }
    +** Processing line: ~    args.outputs.labels << { x: 460, y: row_to_px(args, 2), text: "Keyboard input: args.inputs.keyboard.key_up.h", size_enum: -1 }~
     - Inside source: true
     *** True Line Result
    -        s[:screenx] = 0 if s[:screenx] < 0
    -** Processing line: ~        s[:screenx] = (1279 - $boxsize) if s[:screenx] > (1279 - $boxsize)~
    +    args.outputs.labels << { x: 460, y: row_to_px(args, 2), text: "Keyboard input: args.inputs.keyboard.key_up.h", size_enum: -1 }
    +** Processing line: ~    args.outputs.labels << { x: 460, y: row_to_px(args, 3), text: "Press \"h\" on the keyboard.", size_enum: -1 }~
     - Inside source: true
     *** True Line Result
    -        s[:screenx] = (1279 - $boxsize) if s[:screenx] > (1279 - $boxsize)
    +    args.outputs.labels << { x: 460, y: row_to_px(args, 3), text: "Press \"h\" on the keyboard.", size_enum: -1 }
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~        s[:x] = ((s[:screenx] / 1279.0) * 2.0) - 1.0  # scale to -1.0 - 1.0 range~
    -- Inside source: true
    -*** True Line Result
    -        s[:x] = ((s[:screenx] / 1279.0) * 2.0) - 1.0  # scale to -1.0 - 1.0 range
    -** Processing line: ~        s[:y] = ((s[:screeny] / 719.0) * 2.0) - 1.0   # scale to -1.0 - 1.0 range~
    +** Processing line: ~    # Input on a specifc key can be found through args.inputs.keyboard.key_up followed by the key~
     - Inside source: true
     *** True Line Result
    -        s[:y] = ((s[:screeny] / 719.0) * 2.0) - 1.0   # scale to -1.0 - 1.0 range
    -** Processing line: ~      end~
    +    # Input on a specifc key can be found through args.inputs.keyboard.key_up followed by the key
    +** Processing line: ~    if args.inputs.keyboard.key_up.h~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +    if args.inputs.keyboard.key_up.h
    +** Processing line: ~      args.state.h_pressed_at = args.state.tick_count~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      color = isselected ? [ 0, 255, 0, 255 ] : [ 0, 0, 255, 255 ]~
    +      args.state.h_pressed_at = args.state.tick_count
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      color = isselected ? [ 0, 255, 0, 255 ] : [ 0, 0, 255, 255 ]
    -** Processing line: ~      args.outputs.primitives << [s[:screenx], s[:screeny], $boxsize, $boxsize, *color].solid~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      args.outputs.primitives << [s[:screenx], s[:screeny], $boxsize, $boxsize, *color].solid
    -** Processing line: ~    }~
    +
    +** Processing line: ~    # This code simplifies to if args.state.h_pressed_at has not been initialized, set it to false~
     - Inside source: true
     *** True Line Result
    -    }
    -** Processing line: ~  end~
    +    # This code simplifies to if args.state.h_pressed_at has not been initialized, set it to false
    +** Processing line: ~    args.state.h_pressed_at ||= false~
     - Inside source: true
     *** True Line Result
    -  end
    +    args.state.h_pressed_at ||= false
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def render_panel args~
    +** Processing line: ~    if args.state.h_pressed_at~
     - Inside source: true
     *** True Line Result
    -  def render_panel args
    -** Processing line: ~    s = args.audio[args.state.selected]~
    +    if args.state.h_pressed_at
    +** Processing line: ~      args.outputs.labels << { x: 460, y: row_to_px(args, 4), text: "\"h\" was pressed at time: #{args.state.h_pressed_at}", size_enum: -1 }~
     - Inside source: true
     *** True Line Result
    -    s = args.audio[args.state.selected]
    -** Processing line: ~    return if s.nil?~
    +      args.outputs.labels << { x: 460, y: row_to_px(args, 4), text: "\"h\" was pressed at time: #{args.state.h_pressed_at}", size_enum: -1 }
    +** Processing line: ~    else~
    +- Inside source: true
    +*** True Line Result
    +    else
    +** Processing line: ~      args.outputs.labels << { x: 460, y: row_to_px(args, 4), text: "\"h\" has never been pressed.", size_enum: -1 }~
     - Inside source: true
     *** True Line Result
    -    return if s.nil?
    -** Processing line: ~    mouse_down = (args.state.mouse_held > 0)~
    +      args.outputs.labels << { x: 460, y: row_to_px(args, 4), text: "\"h\" has never been pressed.", size_enum: -1 }
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    mouse_down = (args.state.mouse_held > 0)
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    args.outputs.primitives << [900, 450, 340, 250, 127, 127, 200, 255].solid~
    +** Processing line: ~    tick_help_text args~
     - Inside source: true
     *** True Line Result
    -    args.outputs.primitives << [900, 450, 340, 250, 127, 127, 200, 255].solid
    -** Processing line: ~    args.outputs.primitives << [1075, 690, "Source ##{args.state.selected}", 3, 1, 255, 255, 255].label~
    +    tick_help_text args
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    args.outputs.primitives << [1075, 690, "Source ##{args.state.selected}", 3, 1, 255, 255, 255].label
    -** Processing line: ~    args.outputs.primitives << [910, 660, 1230, 660, 255, 255, 255].line~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    args.outputs.primitives << [910, 660, 1230, 660, 255, 255, 255].line
    -** Processing line: ~    args.outputs.primitives << [910, 650, "screen:    (#{s[:screenx].to_i}, #{s[:screeny].to_i})", 0, 0, 255, 255, 255].label~
    +
    +** Processing line: ~  def row_to_px args, row_number, y_offset = 20~
     - Inside source: true
     *** True Line Result
    -    args.outputs.primitives << [910, 650, "screen:    (#{s[:screenx].to_i}, #{s[:screeny].to_i})", 0, 0, 255, 255, 255].label
    -** Processing line: ~    args.outputs.primitives << [910, 625, "position:  (#{s[:x].round(5).to_s[0..6]}, #{s[:y].round(5).to_s[0..6]})", 0, 0, 255, 255, 255].label~
    +  def row_to_px args, row_number, y_offset = 20
    +** Processing line: ~    # This takes a row_number and converts it to pixels DragonRuby understands.~
     - Inside source: true
     *** True Line Result
    -    args.outputs.primitives << [910, 625, "position:  (#{s[:x].round(5).to_s[0..6]}, #{s[:y].round(5).to_s[0..6]})", 0, 0, 255, 255, 255].label
    -** Processing line: ~~
    +    # This takes a row_number and converts it to pixels DragonRuby understands.
    +** Processing line: ~    # Row 0 starts 5 units below the top of the grid~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    slider = [1022, 586, 200, 7]~
    +    # Row 0 starts 5 units below the top of the grid
    +** Processing line: ~    # Each row afterward is 20 units lower~
    +- Inside source: true
    +*** True Line Result
    +    # Each row afterward is 20 units lower
    +** Processing line: ~    args.grid.top - 5 - (y_offset * row_number)~
     - Inside source: true
     *** True Line Result
    -    slider = [1022, 586, 200, 7]
    -** Processing line: ~    if mouse_down && args.inputs.mouse.position.inside_rect?(slider)~
    +    args.grid.top - 5 - (y_offset * row_number)
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    if mouse_down && args.inputs.mouse.position.inside_rect?(slider)
    -** Processing line: ~      s[:pitch] = ((args.inputs.mouse.x - slider[0]).to_f / (slider[2]-1.0)) * 2.0~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      s[:pitch] = ((args.inputs.mouse.x - slider[0]).to_f / (slider[2]-1.0)) * 2.0
    -** Processing line: ~    end~
    +
    +** Processing line: ~  # Don't worry about understanding the code within this method just yet.~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~    slidercolor = (s[:pitch] / 2.0) * 255~
    +  # Don't worry about understanding the code within this method just yet.
    +** Processing line: ~  # This method shows you the help text within the game.~
     - Inside source: true
     *** True Line Result
    -    slidercolor = (s[:pitch] / 2.0) * 255
    -** Processing line: ~    args.outputs.primitives << [*slider, slidercolor, slidercolor, slidercolor, 255].solid~
    +  # This method shows you the help text within the game.
    +** Processing line: ~  def tick_help_text args~
     - Inside source: true
     *** True Line Result
    -    args.outputs.primitives << [*slider, slidercolor, slidercolor, slidercolor, 255].solid
    -** Processing line: ~    args.outputs.primitives << [910, 600, "pitch: #{s[:pitch].round(3).to_s[0..2]}", 0, 0, 255, 255, 255].label~
    +  def tick_help_text args
    +** Processing line: ~    return unless args.state.h_pressed_at~
     - Inside source: true
     *** True Line Result
    -    args.outputs.primitives << [910, 600, "pitch: #{s[:pitch].round(3).to_s[0..2]}", 0, 0, 255, 255, 255].label
    +    return unless args.state.h_pressed_at
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    slider = [1022, 561, 200, 7]~
    +** Processing line: ~    args.state.key_value_history      ||= {}~
     - Inside source: true
     *** True Line Result
    -    slider = [1022, 561, 200, 7]
    -** Processing line: ~    if mouse_down && args.inputs.mouse.position.inside_rect?(slider)~
    +    args.state.key_value_history      ||= {}
    +** Processing line: ~    args.state.key_down_value_history ||= {}~
     - Inside source: true
     *** True Line Result
    -    if mouse_down && args.inputs.mouse.position.inside_rect?(slider)
    -** Processing line: ~      s[:gain] = (args.inputs.mouse.x - slider[0]).to_f / (slider[2]-1.0)~
    +    args.state.key_down_value_history ||= {}
    +** Processing line: ~    args.state.key_held_value_history ||= {}~
     - Inside source: true
     *** True Line Result
    -      s[:gain] = (args.inputs.mouse.x - slider[0]).to_f / (slider[2]-1.0)
    -** Processing line: ~    end~
    +    args.state.key_held_value_history ||= {}
    +** Processing line: ~    args.state.key_up_value_history   ||= {}~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~    slidercolor = s[:gain] * 255~
    +    args.state.key_up_value_history   ||= {}
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    slidercolor = s[:gain] * 255
    -** Processing line: ~    args.outputs.primitives << [*slider, slidercolor, slidercolor, slidercolor, 255].solid~
    +
    +** Processing line: ~    if (args.inputs.keyboard.key_down.truthy_keys.length > 0 ||~
     - Inside source: true
     *** True Line Result
    -    args.outputs.primitives << [*slider, slidercolor, slidercolor, slidercolor, 255].solid
    -** Processing line: ~    args.outputs.primitives << [910, 575, "gain: #{s[:gain].round(3).to_s[0..2]}", 0, 0, 255, 255, 255].label~
    +    if (args.inputs.keyboard.key_down.truthy_keys.length > 0 ||
    +** Processing line: ~        args.inputs.keyboard.key_held.truthy_keys.length > 0 ||~
     - Inside source: true
     *** True Line Result
    -    args.outputs.primitives << [910, 575, "gain: #{s[:gain].round(3).to_s[0..2]}", 0, 0, 255, 255, 255].label
    -** Processing line: ~~
    +        args.inputs.keyboard.key_held.truthy_keys.length > 0 ||
    +** Processing line: ~        args.inputs.keyboard.key_up.truthy_keys.length > 0)~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    checkbox = [1022, 533, 10, 12]~
    +        args.inputs.keyboard.key_up.truthy_keys.length > 0)
    +** Processing line: ~      args.state.help_available = true~
     - Inside source: true
     *** True Line Result
    -    checkbox = [1022, 533, 10, 12]
    -** Processing line: ~    if (args.state.mouse_held == 1) && args.inputs.mouse.position.inside_rect?(checkbox)~
    +      args.state.help_available = true
    +** Processing line: ~      args.state.no_activity_debounce = nil~
     - Inside source: true
     *** True Line Result
    -    if (args.state.mouse_held == 1) && args.inputs.mouse.position.inside_rect?(checkbox)
    -** Processing line: ~      s[:looping] = !s[:looping]~
    +      args.state.no_activity_debounce = nil
    +** Processing line: ~    else~
     - Inside source: true
     *** True Line Result
    -      s[:looping] = !s[:looping]
    -** Processing line: ~    end~
    +    else
    +** Processing line: ~      args.state.no_activity_debounce ||= 5.seconds~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~    checkboxcolor = s[:looping] ? 255 : 0~
    +      args.state.no_activity_debounce ||= 5.seconds
    +** Processing line: ~      args.state.no_activity_debounce -= 1~
     - Inside source: true
     *** True Line Result
    -    checkboxcolor = s[:looping] ? 255 : 0
    -** Processing line: ~    args.outputs.primitives << [*checkbox, checkboxcolor, checkboxcolor, checkboxcolor, 255].solid~
    +      args.state.no_activity_debounce -= 1
    +** Processing line: ~      if args.state.no_activity_debounce <= 0~
     - Inside source: true
     *** True Line Result
    -    args.outputs.primitives << [*checkbox, checkboxcolor, checkboxcolor, checkboxcolor, 255].solid
    -** Processing line: ~    args.outputs.primitives << [910, 550, "looping:", 0, 0, 255, 255, 255].label~
    +      if args.state.no_activity_debounce <= 0
    +** Processing line: ~        args.state.help_available = false~
     - Inside source: true
     *** True Line Result
    -    args.outputs.primitives << [910, 550, "looping:", 0, 0, 255, 255, 255].label
    -** Processing line: ~~
    +        args.state.help_available = false
    +** Processing line: ~        args.state.key_value_history        = {}~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    checkbox = [1022, 508, 10, 12]~
    +        args.state.key_value_history        = {}
    +** Processing line: ~        args.state.key_down_value_history   = {}~
     - Inside source: true
     *** True Line Result
    -    checkbox = [1022, 508, 10, 12]
    -** Processing line: ~    if (args.state.mouse_held == 1) && args.inputs.mouse.position.inside_rect?(checkbox)~
    +        args.state.key_down_value_history   = {}
    +** Processing line: ~        args.state.key_held_value_history   = {}~
     - Inside source: true
     *** True Line Result
    -    if (args.state.mouse_held == 1) && args.inputs.mouse.position.inside_rect?(checkbox)
    -** Processing line: ~      s[:paused] = !s[:paused]~
    +        args.state.key_held_value_history   = {}
    +** Processing line: ~        args.state.key_up_value_history     = {}~
     - Inside source: true
     *** True Line Result
    -      s[:paused] = !s[:paused]
    -** Processing line: ~    end~
    +        args.state.key_up_value_history     = {}
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~    checkboxcolor = s[:paused] ? 255 : 0~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    checkboxcolor = s[:paused] ? 255 : 0
    -** Processing line: ~    args.outputs.primitives << [*checkbox, checkboxcolor, checkboxcolor, checkboxcolor, 255].solid~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    args.outputs.primitives << [*checkbox, checkboxcolor, checkboxcolor, checkboxcolor, 255].solid
    -** Processing line: ~    args.outputs.primitives << [910, 525, "paused:", 0, 0, 255, 255, 255].label~
    +
    +** Processing line: ~    args.outputs.labels << { x: 10, y: row_to_px(args, 6), text: "This is the api for the keys you've pressed:", size_enum: -1, r: 180 }~
     - Inside source: true
     *** True Line Result
    -    args.outputs.primitives << [910, 525, "paused:", 0, 0, 255, 255, 255].label
    +    args.outputs.labels << { x: 10, y: row_to_px(args, 6), text: "This is the api for the keys you've pressed:", size_enum: -1, r: 180 }
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    button = [910, 460, 320, 20]~
    -- Inside source: true
    -*** True Line Result
    -    button = [910, 460, 320, 20]
    -** Processing line: ~    if (args.state.mouse_held == 1) && args.inputs.mouse.position.inside_rect?(button)~
    +** Processing line: ~    if !args.state.help_available~
     - Inside source: true
     *** True Line Result
    -    if (args.state.mouse_held == 1) && args.inputs.mouse.position.inside_rect?(button)
    -** Processing line: ~      args.audio.delete(args.state.selected)~
    +    if !args.state.help_available
    +** Processing line: ~      args.outputs.labels << [10, row_to_px(args, 7),  "Press a key and I'll show code to access the key and what value will be returned if you used the code.", small_font]~
     - Inside source: true
     *** True Line Result
    -      args.audio.delete(args.state.selected)
    -** Processing line: ~      args.state.selected = 0~
    +      args.outputs.labels << [10, row_to_px(args, 7),  "Press a key and I'll show code to access the key and what value will be returned if you used the code.", small_font]
    +** Processing line: ~      return~
     - Inside source: true
     *** True Line Result
    -      args.state.selected = 0
    +      return
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
         end
    -** Processing line: ~    args.outputs.primitives << [*button, 255, 0, 0, 255].solid~
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    args.outputs.labels << { x: 10 , y: row_to_px(args, 7), text: "args.inputs.keyboard",          size_enum: -2 }~
     - Inside source: true
     *** True Line Result
    -    args.outputs.primitives << [*button, 255, 0, 0, 255].solid
    -** Processing line: ~    args.outputs.primitives << [button[0] + (button[2] / 2), button[1]+20, "DELETE SOURCE", 0, 1, 255, 255, 0].label~
    +    args.outputs.labels << { x: 10 , y: row_to_px(args, 7), text: "args.inputs.keyboard",          size_enum: -2 }
    +** Processing line: ~    args.outputs.labels << { x: 330, y: row_to_px(args, 7), text: "args.inputs.keyboard.key_down", size_enum: -2 }~
     - Inside source: true
     *** True Line Result
    -    args.outputs.primitives << [button[0] + (button[2] / 2), button[1]+20, "DELETE SOURCE", 0, 1, 255, 255, 0].label
    -** Processing line: ~  end~
    +    args.outputs.labels << { x: 330, y: row_to_px(args, 7), text: "args.inputs.keyboard.key_down", size_enum: -2 }
    +** Processing line: ~    args.outputs.labels << { x: 650, y: row_to_px(args, 7), text: "args.inputs.keyboard.key_held", size_enum: -2 }~
     - Inside source: true
     *** True Line Result
    -  end
    +    args.outputs.labels << { x: 650, y: row_to_px(args, 7), text: "args.inputs.keyboard.key_held", size_enum: -2 }
    +** Processing line: ~    args.outputs.labels << { x: 990, y: row_to_px(args, 7), text: "args.inputs.keyboard.key_up",   size_enum: -2 }~
    +- Inside source: true
    +*** True Line Result
    +    args.outputs.labels << { x: 990, y: row_to_px(args, 7), text: "args.inputs.keyboard.key_up",   size_enum: -2 }
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def spawn_new_sound args, num~
    +** Processing line: ~    fill_history args, :key_value_history,      :down_or_held, nil~
    +- Inside source: true
    +*** True Line Result
    +    fill_history args, :key_value_history,      :down_or_held, nil
    +** Processing line: ~    fill_history args, :key_down_value_history, :down,        :key_down~
     - Inside source: true
     *** True Line Result
    -  def spawn_new_sound args, num
    -** Processing line: ~    input = nil~
    +    fill_history args, :key_down_value_history, :down,        :key_down
    +** Processing line: ~    fill_history args, :key_held_value_history, :held,        :key_held~
     - Inside source: true
     *** True Line Result
    -    input = nil
    -** Processing line: ~    input = "sounds/#{num}.#{(num == 6) ? 'ogg' : 'wav'}"~
    +    fill_history args, :key_held_value_history, :held,        :key_held
    +** Processing line: ~    fill_history args, :key_up_value_history,   :up,          :key_up~
     - Inside source: true
     *** True Line Result
    -    input = "sounds/#{num}.#{(num == 6) ? 'ogg' : 'wav'}"
    +    fill_history args, :key_up_value_history,   :up,          :key_up
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Spawn randomly in an area that won't be covered by UI.~
    +** Processing line: ~    render_help_labels args, :key_value_history,      :down_or_held, nil,      10~
     - Inside source: true
     *** True Line Result
    -    # Spawn randomly in an area that won't be covered by UI.
    -** Processing line: ~    screenx = (rand * 600.0) + 200.0~
    +    render_help_labels args, :key_value_history,      :down_or_held, nil,      10
    +** Processing line: ~    render_help_labels args, :key_down_value_history, :down,        :key_down, 330~
     - Inside source: true
     *** True Line Result
    -    screenx = (rand * 600.0) + 200.0
    -** Processing line: ~    screeny = (rand * 400.0) + 100.0~
    +    render_help_labels args, :key_down_value_history, :down,        :key_down, 330
    +** Processing line: ~    render_help_labels args, :key_held_value_history, :held,        :key_held, 650~
     - Inside source: true
     *** True Line Result
    -    screeny = (rand * 400.0) + 100.0
    -** Processing line: ~~
    +    render_help_labels args, :key_held_value_history, :held,        :key_held, 650
    +** Processing line: ~    render_help_labels args, :key_up_value_history,   :up,          :key_up,   990~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    args.state.next_sound_index += 1~
    +    render_help_labels args, :key_up_value_history,   :up,          :key_up,   990
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    args.state.next_sound_index += 1
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # you can hang anything on the audio hashes you want, so we store the~
    +** Processing line: ~  def fill_history args, history_key, state_key, keyboard_method~
     - Inside source: true
     *** True Line Result
    -    # you can hang anything on the audio hashes you want, so we store the
    -** Processing line: ~    #  actual screen position in here for convenience.~
    +  def fill_history args, history_key, state_key, keyboard_method
    +** Processing line: ~    fill_single_history args, history_key, state_key, keyboard_method, :raw_key~
     - Inside source: true
     *** True Line Result
    -    #  actual screen position in here for convenience.
    -** Processing line: ~    args.audio[args.state.next_sound_index] = {~
    +    fill_single_history args, history_key, state_key, keyboard_method, :raw_key
    +** Processing line: ~    fill_single_history args, history_key, state_key, keyboard_method, :char~
     - Inside source: true
     *** True Line Result
    -    args.audio[args.state.next_sound_index] = {
    -** Processing line: ~      input: input,~
    +    fill_single_history args, history_key, state_key, keyboard_method, :char
    +** Processing line: ~    args.inputs.keyboard.keys[state_key].each do |key_name|~
     - Inside source: true
     *** True Line Result
    -      input: input,
    -** Processing line: ~      screenx: screenx,~
    +    args.inputs.keyboard.keys[state_key].each do |key_name|
    +** Processing line: ~      fill_single_history args, history_key, state_key, keyboard_method, key_name~
     - Inside source: true
     *** True Line Result
    -      screenx: screenx,
    -** Processing line: ~      screeny: screeny,~
    +      fill_single_history args, history_key, state_key, keyboard_method, key_name
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      screeny: screeny,
    -** Processing line: ~      x: ((screenx / 1279.0) * 2.0) - 1.0,  # scale to -1.0 - 1.0 range~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -      x: ((screenx / 1279.0) * 2.0) - 1.0,  # scale to -1.0 - 1.0 range
    -** Processing line: ~      y: ((screeny / 719.0) * 2.0) - 1.0,   # scale to -1.0 - 1.0 range~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      y: ((screeny / 719.0) * 2.0) - 1.0,   # scale to -1.0 - 1.0 range
    -** Processing line: ~      z: 0.0,~
    +
    +** Processing line: ~  def fill_single_history args, history_key, state_key, keyboard_method, key_name~
     - Inside source: true
     *** True Line Result
    -      z: 0.0,
    -** Processing line: ~      gain: 1.0,~
    +  def fill_single_history args, history_key, state_key, keyboard_method, key_name
    +** Processing line: ~    current_value = args.inputs.keyboard.send(key_name)~
     - Inside source: true
     *** True Line Result
    -      gain: 1.0,
    -** Processing line: ~      pitch: 1.0,~
    +    current_value = args.inputs.keyboard.send(key_name)
    +** Processing line: ~    if keyboard_method~
     - Inside source: true
     *** True Line Result
    -      pitch: 1.0,
    -** Processing line: ~      looping: true,~
    +    if keyboard_method
    +** Processing line: ~      current_value = args.inputs.keyboard.send(keyboard_method).send(key_name)~
     - Inside source: true
     *** True Line Result
    -      looping: true,
    -** Processing line: ~      paused: false~
    +      current_value = args.inputs.keyboard.send(keyboard_method).send(key_name)
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      paused: false
    -** Processing line: ~    }~
    +    end
    +** Processing line: ~    args.state.as_hash[history_key][key_name] ||= []~
     - Inside source: true
     *** True Line Result
    -    }
    -** Processing line: ~~
    +    args.state.as_hash[history_key][key_name] ||= []
    +** Processing line: ~    args.state.as_hash[history_key][key_name] << current_value~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    args.state.selected = args.state.next_sound_index~
    +    args.state.as_hash[history_key][key_name] << current_value
    +** Processing line: ~    args.state.as_hash[history_key][key_name] = args.state.as_hash[history_key][key_name].reverse.uniq.take(3).reverse~
     - Inside source: true
     *** True Line Result
    -    args.state.selected = args.state.next_sound_index
    +    args.state.as_hash[history_key][key_name] = args.state.as_hash[history_key][key_name].reverse.uniq.take(3).reverse
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -14448,78 +14979,82 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def render_launcher args~
    +** Processing line: ~  def render_help_labels args, history_key, state_key, keyboard_method, x~
     - Inside source: true
     *** True Line Result
    -  def render_launcher args
    -** Processing line: ~    total = 6~
    +  def render_help_labels args, history_key, state_key, keyboard_method, x
    +** Processing line: ~    idx = 8~
    +- Inside source: true
    +*** True Line Result
    +    idx = 8
    +** Processing line: ~    args.outputs.labels << args.state~
    +- Inside source: true
    +*** True Line Result
    +    args.outputs.labels << args.state
    +** Processing line: ~                             .as_hash[history_key]~
     - Inside source: true
     *** True Line Result
    -    total = 6
    -** Processing line: ~    x = (1280 - (total * $boxsize * 3)) / 2~
    +                             .as_hash[history_key]
    +** Processing line: ~                             .keys~
     - Inside source: true
     *** True Line Result
    -    x = (1280 - (total * $boxsize * 3)) / 2
    -** Processing line: ~    y = 10~
    +                             .keys
    +** Processing line: ~                             .reverse~
     - Inside source: true
     *** True Line Result
    -    y = 10
    -** Processing line: ~    args.outputs.primitives << [0, 0, 1280, ((y*2) + $boxsize), 127, 127, 127, 255].solid~
    +                             .reverse
    +** Processing line: ~                             .map~
     - Inside source: true
     *** True Line Result
    -    args.outputs.primitives << [0, 0, 1280, ((y*2) + $boxsize), 127, 127, 127, 255].solid
    -** Processing line: ~    for i in 1..total~
    +                             .map
    +** Processing line: ~                             .with_index do |k, i|~
     - Inside source: true
     *** True Line Result
    -    for i in 1..total
    -** Processing line: ~      args.outputs.primitives << [x, y, $boxsize, $boxsize, 255, 255, 255, 255].solid~
    +                             .with_index do |k, i|
    +** Processing line: ~      v = args.state.as_hash[history_key][k]~
     - Inside source: true
     *** True Line Result
    -      args.outputs.primitives << [x, y, $boxsize, $boxsize, 255, 255, 255, 255].solid
    -** Processing line: ~      args.outputs.primitives << [x+8, y+28, i.to_s, 3, 0, 0, 0, 255, 255].label~
    +      v = args.state.as_hash[history_key][k]
    +** Processing line: ~      current_value = args.inputs.keyboard.send(k)~
     - Inside source: true
     *** True Line Result
    -      args.outputs.primitives << [x+8, y+28, i.to_s, 3, 0, 0, 0, 255, 255].label
    -** Processing line: ~      if args.inputs.mouse.click && args.inputs.mouse.click.point.inside_rect?([x, y, $boxsize, $boxsize])~
    +      current_value = args.inputs.keyboard.send(k)
    +** Processing line: ~      if keyboard_method~
     - Inside source: true
     *** True Line Result
    -      if args.inputs.mouse.click && args.inputs.mouse.click.point.inside_rect?([x, y, $boxsize, $boxsize])
    -** Processing line: ~        spawn_new_sound args, i~
    +      if keyboard_method
    +** Processing line: ~        current_value = args.inputs.keyboard.send(keyboard_method).send(k)~
     - Inside source: true
     *** True Line Result
    -        spawn_new_sound args, i
    +        current_value = args.inputs.keyboard.send(keyboard_method).send(k)
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
           end
    -** Processing line: ~      x = x + ($boxsize * 3)~
    -- Inside source: true
    -*** True Line Result
    -      x = x + ($boxsize * 3)
    -** Processing line: ~    end~
    +** Processing line: ~      idx += 2~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~  end~
    +      idx += 2
    +** Processing line: ~      [~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +      [
    +** Processing line: ~        { x: x, y: row_to_px(args, idx + 0, 16), text: "    .#{k} is #{current_value || "nil"}", size_enum: -2 },~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def render_ui args~
    +        { x: x, y: row_to_px(args, idx + 0, 16), text: "    .#{k} is #{current_value || "nil"}", size_enum: -2 },
    +** Processing line: ~        { x: x, y: row_to_px(args, idx + 1, 16), text: "       was #{v}", size_enum: -2 }~
     - Inside source: true
     *** True Line Result
    -  def render_ui args
    -** Processing line: ~    render_launcher args~
    +        { x: x, y: row_to_px(args, idx + 1, 16), text: "       was #{v}", size_enum: -2 }
    +** Processing line: ~      ]~
     - Inside source: true
     *** True Line Result
    -    render_launcher args
    -** Processing line: ~    render_panel args~
    +      ]
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    render_panel args
    +    end
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -14528,54 +15063,38 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def tick args~
    -- Inside source: true
    -*** True Line Result
    -  def tick args
    -** Processing line: ~    args.state.mouse_held ||= 0~
    -- Inside source: true
    -*** True Line Result
    -    args.state.mouse_held ||= 0
    -** Processing line: ~    args.state.dragging_source ||= false~
    -- Inside source: true
    -*** True Line Result
    -    args.state.dragging_source ||= false
    -** Processing line: ~    args.state.selected ||= 0~
    -- Inside source: true
    -*** True Line Result
    -    args.state.selected ||= 0
    -** Processing line: ~    args.state.next_sound_index ||= 0~
    -- Inside source: true
    -*** True Line Result
    -    args.state.next_sound_index ||= 0
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    if args.inputs.mouse.up~
    +** Processing line: ~  def tick_instructions args, text, y = 715~
     - Inside source: true
     *** True Line Result
    -    if args.inputs.mouse.up
    -** Processing line: ~      args.state.mouse_held = 0~
    +  def tick_instructions args, text, y = 715
    +** Processing line: ~    return if args.state.key_event_occurred~
     - Inside source: true
     *** True Line Result
    -      args.state.mouse_held = 0
    -** Processing line: ~      args.state.dragging_source = false~
    +    return if args.state.key_event_occurred
    +** Processing line: ~    if args.inputs.mouse.click ||~
     - Inside source: true
     *** True Line Result
    -      args.state.dragging_source = false
    -** Processing line: ~    elsif args.inputs.mouse.down || (args.state.mouse_held > 0)~
    +    if args.inputs.mouse.click ||
    +** Processing line: ~       args.inputs.keyboard.directional_vector ||~
     - Inside source: true
     *** True Line Result
    -    elsif args.inputs.mouse.down || (args.state.mouse_held > 0)
    -** Processing line: ~      args.state.mouse_held += 1~
    +       args.inputs.keyboard.directional_vector ||
    +** Processing line: ~       args.inputs.keyboard.key_down.enter ||~
     - Inside source: true
     *** True Line Result
    -      args.state.mouse_held += 1
    -** Processing line: ~    else~
    +       args.inputs.keyboard.key_down.enter ||
    +** Processing line: ~       args.inputs.keyboard.key_down.escape~
     - Inside source: true
     *** True Line Result
    -    else
    +       args.inputs.keyboard.key_down.escape
    +** Processing line: ~      args.state.key_event_occurred = true~
    +- Inside source: true
    +*** True Line Result
    +      args.state.key_event_occurred = true
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -14584,18 +15103,26 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    args.outputs.background_color = [ 0, 0, 0, 255 ]~
    +** Processing line: ~    args.outputs.debug << { x: 0,   y: y - 50, w: 1280, h: 60 }.solid!~
     - Inside source: true
     *** True Line Result
    -    args.outputs.background_color = [ 0, 0, 0, 255 ]
    -** Processing line: ~    render_sources args~
    +    args.outputs.debug << { x: 0,   y: y - 50, w: 1280, h: 60 }.solid!
    +** Processing line: ~    args.outputs.debug << { x: 640, y: y,      text: text,~
     - Inside source: true
     *** True Line Result
    -    render_sources args
    -** Processing line: ~    render_ui args~
    +    args.outputs.debug << { x: 640, y: y,      text: text,
    +** Processing line: ~                            size_enum: 1, alignment_enum: 1, r: 255, g: 255, b: 255 }.label!~
     - Inside source: true
     *** True Line Result
    -    render_ui args
    +                            size_enum: 1, alignment_enum: 1, r: 255, g: 255, b: 255 }.label!
    +** Processing line: ~    args.outputs.debug << { x: 640, y: y - 25, text: "(click to dismiss instructions)",~
    +- Inside source: true
    +*** True Line Result
    +    args.outputs.debug << { x: 640, y: y - 25, text: "(click to dismiss instructions)",
    +** Processing line: ~                            size_enum: -2, alignment_enum: 1, r: 255, g: 255, b: 255 }.label!~
    +- Inside source: true
    +*** True Line Result
    +                            size_enum: -2, alignment_enum: 1, r: 255, g: 255, b: 255 }.label!
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -14612,110 +15139,102 @@ Follows is a source code listing for all files that have been open sourced. This
     - End of paragraph detected.
     *** True Line Result
     
    -** Processing line: ~*** Rendering Basics - Sound Synthesis - main.rb~
    +** Processing line: ~*** Input Basics - Moving A Sprite - main.rb~
     - Header detected.
     *** True Line Result
     
     *** True Line Result
    -*** Rendering Basics - Sound Synthesis - main.rb
    +*** Input Basics - Moving A Sprite - main.rb
     ** Processing line: ~#+begin_src ruby~
     - Line was identified as the beginning of a code block.
     *** True Line Result
     
     *** True Line Result
     #+begin_src ruby
    -** Processing line: ~  # ./samples/01_rendering_basics/07_sound_synthesis/app/main.rb~
    +** Processing line: ~  # ./samples/02_input_basics/01_moving_a_sprite/app/main.rb~
     - Inside source: true
     *** True Line Result
    -  # ./samples/01_rendering_basics/07_sound_synthesis/app/main.rb
    -** Processing line: ~  begin # region: top level tick methods~
    +  # ./samples/02_input_basics/01_moving_a_sprite/app/main.rb
    +** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
    -  begin # region: top level tick methods
    -** Processing line: ~    def tick args~
    +  def tick args
    +** Processing line: ~    # create a player and set default values~
     - Inside source: true
     *** True Line Result
    -    def tick args
    -** Processing line: ~      defaults args~
    +    # create a player and set default values
    +** Processing line: ~    # for the player's x, y, w (width), and h (height)~
     - Inside source: true
     *** True Line Result
    -      defaults args
    -** Processing line: ~      render args~
    +    # for the player's x, y, w (width), and h (height)
    +** Processing line: ~    args.state.player.x ||= 100~
     - Inside source: true
     *** True Line Result
    -      render args
    -** Processing line: ~      input args~
    +    args.state.player.x ||= 100
    +** Processing line: ~    args.state.player.y ||= 100~
     - Inside source: true
     *** True Line Result
    -      input args
    -** Processing line: ~      process_audio_queue args~
    +    args.state.player.y ||= 100
    +** Processing line: ~    args.state.player.w ||=  50~
     - Inside source: true
     *** True Line Result
    -      process_audio_queue args
    -** Processing line: ~    end~
    +    args.state.player.w ||=  50
    +** Processing line: ~    args.state.player.h ||=  50~
     - Inside source: true
     *** True Line Result
    -    end
    +    args.state.player.h ||=  50
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def defaults args~
    -- Inside source: true
    -*** True Line Result
    -    def defaults args
    -** Processing line: ~      args.state.sine_waves      ||= {}~
    -- Inside source: true
    -*** True Line Result
    -      args.state.sine_waves      ||= {}
    -** Processing line: ~      args.state.square_waves    ||= {}~
    +** Processing line: ~    # render the player to the screen~
     - Inside source: true
     *** True Line Result
    -      args.state.square_waves    ||= {}
    -** Processing line: ~      args.state.saw_tooth_waves ||= {}~
    +    # render the player to the screen
    +** Processing line: ~    args.outputs.sprites << { x: args.state.player.x,~
     - Inside source: true
     *** True Line Result
    -      args.state.saw_tooth_waves ||= {}
    -** Processing line: ~      args.state.triangle_waves  ||= {}~
    +    args.outputs.sprites << { x: args.state.player.x,
    +** Processing line: ~                              y: args.state.player.y,~
     - Inside source: true
     *** True Line Result
    -      args.state.triangle_waves  ||= {}
    -** Processing line: ~      args.state.audio_queue     ||= []~
    +                              y: args.state.player.y,
    +** Processing line: ~                              w: args.state.player.w,~
     - Inside source: true
     *** True Line Result
    -      args.state.audio_queue     ||= []
    -** Processing line: ~      args.state.buttons         ||= [~
    +                              w: args.state.player.w,
    +** Processing line: ~                              h: args.state.player.h,~
     - Inside source: true
     *** True Line Result
    -      args.state.buttons         ||= [
    -** Processing line: ~        (frequency_buttons args),~
    +                              h: args.state.player.h,
    +** Processing line: ~                              path: 'sprites/square/green.png' }~
     - Inside source: true
     *** True Line Result
    -        (frequency_buttons args),
    -** Processing line: ~        (sine_wave_note_buttons args),~
    +                              path: 'sprites/square/green.png' }
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        (sine_wave_note_buttons args),
    -** Processing line: ~        (bell_buttons args),~
    +
    +** Processing line: ~    # move the player around using the keyboard~
     - Inside source: true
     *** True Line Result
    -        (bell_buttons args),
    -** Processing line: ~        (square_wave_note_buttons args),~
    +    # move the player around using the keyboard
    +** Processing line: ~    if args.inputs.up~
     - Inside source: true
     *** True Line Result
    -        (square_wave_note_buttons args),
    -** Processing line: ~        (saw_tooth_wave_note_buttons args),~
    +    if args.inputs.up
    +** Processing line: ~      args.state.player.y += 10~
     - Inside source: true
     *** True Line Result
    -        (saw_tooth_wave_note_buttons args),
    -** Processing line: ~        (triangle_wave_note_buttons args),~
    +      args.state.player.y += 10
    +** Processing line: ~    elsif args.inputs.down~
     - Inside source: true
     *** True Line Result
    -        (triangle_wave_note_buttons args),
    -** Processing line: ~      ].flatten~
    +    elsif args.inputs.down
    +** Processing line: ~      args.state.player.y -= 10~
     - Inside source: true
     *** True Line Result
    -      ].flatten
    +      args.state.player.y -= 10
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -14724,258 +15243,250 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def render args~
    -- Inside source: true
    -*** True Line Result
    -    def render args
    -** Processing line: ~      args.outputs.borders << args.state.buttons.map { |b| b[:border] }~
    +** Processing line: ~    if args.inputs.left~
     - Inside source: true
     *** True Line Result
    -      args.outputs.borders << args.state.buttons.map { |b| b[:border] }
    -** Processing line: ~      args.outputs.labels  << args.state.buttons.map { |b| b[:label]  }~
    +    if args.inputs.left
    +** Processing line: ~      args.state.player.x -= 10~
     - Inside source: true
     *** True Line Result
    -      args.outputs.labels  << args.state.buttons.map { |b| b[:label]  }
    -** Processing line: ~      args.outputs.labels  << args.layout~
    +      args.state.player.x -= 10
    +** Processing line: ~    elsif args.inputs.right~
     - Inside source: true
     *** True Line Result
    -      args.outputs.labels  << args.layout
    -** Processing line: ~                                .rect(row: 0, col: 11.5)~
    +    elsif args.inputs.right
    +** Processing line: ~      args.state.player.x += 10~
     - Inside source: true
     *** True Line Result
    -                                .rect(row: 0, col: 11.5)
    -** Processing line: ~                                .yield_self { |r| r.merge y: r.y + r.h }~
    +      args.state.player.x += 10
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -                                .yield_self { |r| r.merge y: r.y + r.h }
    -** Processing line: ~                                .merge(text: "This is a Pro only feature. Click here to watch the YouTube video if you are on the Standard License.",~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -                                .merge(text: "This is a Pro only feature. Click here to watch the YouTube video if you are on the Standard License.",
    -** Processing line: ~                                       alignment_enum: 1)~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -                                       alignment_enum: 1)
    -** Processing line: ~    end~
    +
    +** Processing line: ~  $gtk.reset~
     - Inside source: true
     *** True Line Result
    -    end
    +  $gtk.reset
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
    +*** True Line Result
    +#+end_src
     ** Processing line: ~~
    -- Inside source: true
    +- End of paragraph detected.
     *** True Line Result
     
    -** Processing line: ~    def input args~
    -- Inside source: true
    +** Processing line: ~*** Input Basics - Mouse - main.rb~
    +- Header detected.
     *** True Line Result
    -    def input args
    -** Processing line: ~      args.state.buttons.each do |b|~
    -- Inside source: true
    +
     *** True Line Result
    -      args.state.buttons.each do |b|
    -** Processing line: ~        if args.inputs.mouse.click && (args.inputs.mouse.click.inside_rect? b[:rect])~
    -- Inside source: true
    +*** Input Basics - Mouse - main.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
     *** True Line Result
    -        if args.inputs.mouse.click && (args.inputs.mouse.click.inside_rect? b[:rect])
    -** Processing line: ~          parameter_string = (b.slice :frequency, :note, :octave).map { |k, v| "#{k}: #{v}" }.join ", "~
    -- Inside source: true
    +
     *** True Line Result
    -          parameter_string = (b.slice :frequency, :note, :octave).map { |k, v| "#{k}: #{v}" }.join ", "
    -** Processing line: ~          args.gtk.notify! "#{b[:method_to_call]} #{parameter_string}"~
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/02_input_basics/02_mouse/app/main.rb~
     - Inside source: true
     *** True Line Result
    -          args.gtk.notify! "#{b[:method_to_call]} #{parameter_string}"
    -** Processing line: ~          send b[:method_to_call], args, b~
    +  # ./samples/02_input_basics/02_mouse/app/main.rb
    +** Processing line: ~  =begin~
     - Inside source: true
     *** True Line Result
    -          send b[:method_to_call], args, b
    -** Processing line: ~        end~
    +  =begin
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~      end~
    +
    +** Processing line: ~  APIs that haven't been encountered in a previous sample apps:~
     - Inside source: true
     *** True Line Result
    -      end
    +  APIs that haven't been encountered in a previous sample apps:
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      if args.inputs.mouse.click && (args.inputs.mouse.click.inside_rect? (args.layout.rect(row: 0).yield_self { |r| r.merge y: r.y + r.h.half, h: r.h.half }))~
    +** Processing line: ~  - args.inputs.mouse.click: This property will be set if the mouse was clicked.~
     - Inside source: true
     *** True Line Result
    -      if args.inputs.mouse.click && (args.inputs.mouse.click.inside_rect? (args.layout.rect(row: 0).yield_self { |r| r.merge y: r.y + r.h.half, h: r.h.half }))
    -** Processing line: ~        args.gtk.openurl 'https://www.youtube.com/watch?v=zEzovM5jT-k&ab_channel=AmirRajan'~
    +  - args.inputs.mouse.click: This property will be set if the mouse was clicked.
    +** Processing line: ~  - args.inputs.mouse.click.point.(x|y): The x and y location of the mouse.~
     - Inside source: true
     *** True Line Result
    -        args.gtk.openurl 'https://www.youtube.com/watch?v=zEzovM5jT-k&ab_channel=AmirRajan'
    -** Processing line: ~      end~
    +  - args.inputs.mouse.click.point.(x|y): The x and y location of the mouse.
    +** Processing line: ~  - args.inputs.mouse.click.point.created_at: The frame the mouse click occurred in.~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +  - args.inputs.mouse.click.point.created_at: The frame the mouse click occurred in.
    +** Processing line: ~  - args.inputs.mouse.click.point.created_at_elapsed: How many frames have passed~
     - Inside source: true
     *** True Line Result
    -    end
    +  - args.inputs.mouse.click.point.created_at_elapsed: How many frames have passed
    +** Processing line: ~    since the click event.~
    +- Inside source: true
    +*** True Line Result
    +    since the click event.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def process_audio_queue args~
    +** Processing line: ~  Reminder:~
     - Inside source: true
     *** True Line Result
    -    def process_audio_queue args
    -** Processing line: ~      to_queue = args.state.audio_queue.find_all { |v| v[:queue_at] <= args.tick_count }~
    +  Reminder:
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      to_queue = args.state.audio_queue.find_all { |v| v[:queue_at] <= args.tick_count }
    -** Processing line: ~      args.state.audio_queue -= to_queue~
    +
    +** Processing line: ~  - args.state.PROPERTY: The state property on args is a dynamic~
     - Inside source: true
     *** True Line Result
    -      args.state.audio_queue -= to_queue
    -** Processing line: ~      to_queue.each { |a| args.audio[a[:id]] = a }~
    +  - args.state.PROPERTY: The state property on args is a dynamic
    +** Processing line: ~    structure. You can define ANY property here with ANY type of~
     - Inside source: true
     *** True Line Result
    -      to_queue.each { |a| args.audio[a[:id]] = a }
    -** Processing line: ~~
    +    structure. You can define ANY property here with ANY type of
    +** Processing line: ~    arbitrary nesting. Properties defined on args.state will be retained~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      args.audio.find_all { |k, v| v[:decay_rate] }~
    +    arbitrary nesting. Properties defined on args.state will be retained
    +** Processing line: ~    across frames. If you attempt access a property that doesn't exist~
     - Inside source: true
     *** True Line Result
    -      args.audio.find_all { |k, v| v[:decay_rate] }
    -** Processing line: ~        .each     { |k, v| v[:gain] -= v[:decay_rate] }~
    +    across frames. If you attempt access a property that doesn't exist
    +** Processing line: ~    on args.state, it will simply return nil (no exception will be thrown).~
     - Inside source: true
     *** True Line Result
    -        .each     { |k, v| v[:gain] -= v[:decay_rate] }
    +    on args.state, it will simply return nil (no exception will be thrown).
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      sounds_to_stop = args.audio~
    +** Processing line: ~  =end~
     - Inside source: true
     *** True Line Result
    -      sounds_to_stop = args.audio
    -** Processing line: ~                         .find_all { |k, v| v[:stop_at] && args.state.tick_count >= v[:stop_at] }~
    +  =end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -                         .find_all { |k, v| v[:stop_at] && args.state.tick_count >= v[:stop_at] }
    -** Processing line: ~                         .map { |k, v| k }~
    +
    +** Processing line: ~  # This code demonstrates DragonRuby mouse input~
     - Inside source: true
     *** True Line Result
    -                         .map { |k, v| k }
    +  # This code demonstrates DragonRuby mouse input
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      sounds_to_stop.each { |k| args.audio.delete k }~
    +** Processing line: ~  # To see if the a mouse click occurred~
     - Inside source: true
     *** True Line Result
    -      sounds_to_stop.each { |k| args.audio.delete k }
    -** Processing line: ~    end~
    +  # To see if the a mouse click occurred
    +** Processing line: ~  # Use args.inputs.mouse.click~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~  end~
    +  # Use args.inputs.mouse.click
    +** Processing line: ~  # Which returns a boolean~
     - Inside source: true
     *** True Line Result
    -  end
    +  # Which returns a boolean
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  begin # region: button definitions, ui layout, callback functions~
    -- Inside source: true
    -*** True Line Result
    -  begin # region: button definitions, ui layout, callback functions
    -** Processing line: ~    def button args, opts~
    -- Inside source: true
    -*** True Line Result
    -    def button args, opts
    -** Processing line: ~      button_def = opts.merge rect: (args.layout.rect (opts.merge w: 2, h: 1))~
    +** Processing line: ~  # To see where a mouse click occurred~
     - Inside source: true
     *** True Line Result
    -      button_def = opts.merge rect: (args.layout.rect (opts.merge w: 2, h: 1))
    -** Processing line: ~~
    +  # To see where a mouse click occurred
    +** Processing line: ~  # Use args.inputs.mouse.click.point.x AND~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      button_def[:border] = button_def[:rect].merge r: 0, g: 0, b: 0~
    +  # Use args.inputs.mouse.click.point.x AND
    +** Processing line: ~  # args.inputs.mouse.click.point.y~
     - Inside source: true
     *** True Line Result
    -      button_def[:border] = button_def[:rect].merge r: 0, g: 0, b: 0
    +  # args.inputs.mouse.click.point.y
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      label_offset_x = 5~
    +** Processing line: ~  # To see which frame the click occurred~
     - Inside source: true
     *** True Line Result
    -      label_offset_x = 5
    -** Processing line: ~      label_offset_y = 30~
    +  # To see which frame the click occurred
    +** Processing line: ~  # Use args.inputs.mouse.click.created_at~
     - Inside source: true
     *** True Line Result
    -      label_offset_y = 30
    +  # Use args.inputs.mouse.click.created_at
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      button_def[:label]  = button_def[:rect].merge text: opts[:text],~
    +** Processing line: ~  # To see how many frames its been since the click occurred~
     - Inside source: true
     *** True Line Result
    -      button_def[:label]  = button_def[:rect].merge text: opts[:text],
    -** Processing line: ~                                                    size_enum: -2.5,~
    +  # To see how many frames its been since the click occurred
    +** Processing line: ~  # Use args.inputs.mouse.click.creat_at_elapsed~
     - Inside source: true
     *** True Line Result
    -                                                    size_enum: -2.5,
    -** Processing line: ~                                                    x: button_def[:rect].x + label_offset_x,~
    +  # Use args.inputs.mouse.click.creat_at_elapsed
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -                                                    x: button_def[:rect].x + label_offset_x,
    -** Processing line: ~                                                    y: button_def[:rect].y + label_offset_y~
    +
    +** Processing line: ~  # Saving the click in args.state can be quite useful~
     - Inside source: true
     *** True Line Result
    -                                                    y: button_def[:rect].y + label_offset_y
    +  # Saving the click in args.state can be quite useful
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      button_def~
    +** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
    -      button_def
    -** Processing line: ~    end~
    +  def tick args
    +** Processing line: ~    tick_instructions args, "Sample app shows how mouse events are registered and how to measure elapsed time."~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +    tick_instructions args, "Sample app shows how mouse events are registered and how to measure elapsed time."
    +** Processing line: ~    x = 460~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def play_sine_wave args, sender~
    +    x = 460
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    def play_sine_wave args, sender
    -** Processing line: ~      queue_sine_wave args,~
    +
    +** Processing line: ~    args.outputs.labels << small_label(args, x, 11, "Mouse input: args.inputs.mouse")~
     - Inside source: true
     *** True Line Result
    -      queue_sine_wave args,
    -** Processing line: ~                      frequency: sender[:frequency],~
    +    args.outputs.labels << small_label(args, x, 11, "Mouse input: args.inputs.mouse")
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -                      frequency: sender[:frequency],
    -** Processing line: ~                      duration: 1.seconds,~
    +
    +** Processing line: ~    if args.inputs.mouse.click~
     - Inside source: true
     *** True Line Result
    -                      duration: 1.seconds,
    -** Processing line: ~                      fade_out: true~
    +    if args.inputs.mouse.click
    +** Processing line: ~      args.state.last_mouse_click = args.inputs.mouse.click~
     - Inside source: true
     *** True Line Result
    -                      fade_out: true
    +      args.state.last_mouse_click = args.inputs.mouse.click
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -14984,118 +15495,122 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def play_note args, sender~
    +** Processing line: ~    if args.state.last_mouse_click~
     - Inside source: true
     *** True Line Result
    -    def play_note args, sender
    -** Processing line: ~      method_to_call = :queue_sine_wave~
    +    if args.state.last_mouse_click
    +** Processing line: ~      click = args.state.last_mouse_click~
     - Inside source: true
     *** True Line Result
    -      method_to_call = :queue_sine_wave
    -** Processing line: ~      method_to_call = :queue_square_wave    if sender[:type] == :square~
    +      click = args.state.last_mouse_click
    +** Processing line: ~      args.outputs.labels << small_label(args, x, 12, "Mouse click happened at: #{click.created_at}")~
     - Inside source: true
     *** True Line Result
    -      method_to_call = :queue_square_wave    if sender[:type] == :square
    -** Processing line: ~      method_to_call = :queue_saw_tooth_wave if sender[:type] == :saw_tooth~
    +      args.outputs.labels << small_label(args, x, 12, "Mouse click happened at: #{click.created_at}")
    +** Processing line: ~      args.outputs.labels << small_label(args, x, 13, "Mouse clicked #{click.created_at_elapsed} ticks ago")~
     - Inside source: true
     *** True Line Result
    -      method_to_call = :queue_saw_tooth_wave if sender[:type] == :saw_tooth
    -** Processing line: ~      method_to_call = :queue_triangle_wave  if sender[:type] == :triangle~
    +      args.outputs.labels << small_label(args, x, 13, "Mouse clicked #{click.created_at_elapsed} ticks ago")
    +** Processing line: ~      args.outputs.labels << small_label(args, x, 14, "Mouse click location: #{click.point.x}, #{click.point.y}")~
     - Inside source: true
     *** True Line Result
    -      method_to_call = :queue_triangle_wave  if sender[:type] == :triangle
    -** Processing line: ~      method_to_call = :queue_bell           if sender[:type] == :bell~
    +      args.outputs.labels << small_label(args, x, 14, "Mouse click location: #{click.point.x}, #{click.point.y}")
    +** Processing line: ~    else~
     - Inside source: true
     *** True Line Result
    -      method_to_call = :queue_bell           if sender[:type] == :bell
    -** Processing line: ~~
    +    else
    +** Processing line: ~      args.outputs.labels << small_label(args, x, 12, "Mouse click has not occurred yet.")~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      send method_to_call, args,~
    +      args.outputs.labels << small_label(args, x, 12, "Mouse click has not occurred yet.")
    +** Processing line: ~      args.outputs.labels << small_label(args, x, 13, "Please click mouse.")~
     - Inside source: true
     *** True Line Result
    -      send method_to_call, args,
    -** Processing line: ~           frequency: (frequency_for note: sender[:note], octave: sender[:octave]),~
    +      args.outputs.labels << small_label(args, x, 13, "Please click mouse.")
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -           frequency: (frequency_for note: sender[:note], octave: sender[:octave]),
    -** Processing line: ~           duration: 1.seconds,~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -           duration: 1.seconds,
    -** Processing line: ~           fade_out: true~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -           fade_out: true
    -** Processing line: ~    end~
    +
    +** Processing line: ~  def small_label args, x, row, message~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +  def small_label args, x, row, message
    +** Processing line: ~    # This method effectively combines the row_to_px and small_font methods~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def frequency_buttons args~
    +    # This method effectively combines the row_to_px and small_font methods
    +** Processing line: ~    # It changes the given row value to a DragonRuby pixel value~
     - Inside source: true
     *** True Line Result
    -    def frequency_buttons args
    -** Processing line: ~      [~
    +    # It changes the given row value to a DragonRuby pixel value
    +** Processing line: ~    # and adds the customization parameters~
     - Inside source: true
     *** True Line Result
    -      [
    -** Processing line: ~        (button args,~
    +    # and adds the customization parameters
    +** Processing line: ~    { x: x, y: row_to_px(args, row), text: message, alignment_enum: -2 }~
     - Inside source: true
     *** True Line Result
    -        (button args,
    -** Processing line: ~                row: 4.0, col: 0, text: "300hz",~
    +    { x: x, y: row_to_px(args, row), text: message, alignment_enum: -2 }
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -                row: 4.0, col: 0, text: "300hz",
    -** Processing line: ~                frequency: 300,~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -                frequency: 300,
    -** Processing line: ~                method_to_call: :play_sine_wave),~
    +
    +** Processing line: ~  def row_to_px args, row_number~
     - Inside source: true
     *** True Line Result
    -                method_to_call: :play_sine_wave),
    -** Processing line: ~        (button args,~
    +  def row_to_px args, row_number
    +** Processing line: ~    args.grid.top.shift_down(5).shift_down(20 * row_number)~
     - Inside source: true
     *** True Line Result
    -        (button args,
    -** Processing line: ~                row: 5.0, col: 0, text: "400hz",~
    +    args.grid.top.shift_down(5).shift_down(20 * row_number)
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -                row: 5.0, col: 0, text: "400hz",
    -** Processing line: ~                frequency: 400,~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -                frequency: 400,
    -** Processing line: ~                method_to_call: :play_sine_wave),~
    +
    +** Processing line: ~  def tick_instructions args, text, y = 715~
     - Inside source: true
     *** True Line Result
    -                method_to_call: :play_sine_wave),
    -** Processing line: ~        (button args,~
    +  def tick_instructions args, text, y = 715
    +** Processing line: ~    return if args.state.key_event_occurred~
     - Inside source: true
     *** True Line Result
    -        (button args,
    -** Processing line: ~                row: 6.0, col: 0, text: "500hz",~
    +    return if args.state.key_event_occurred
    +** Processing line: ~    if args.inputs.mouse.click ||~
     - Inside source: true
     *** True Line Result
    -                row: 6.0, col: 0, text: "500hz",
    -** Processing line: ~                frequency: 500,~
    +    if args.inputs.mouse.click ||
    +** Processing line: ~       args.inputs.keyboard.directional_vector ||~
     - Inside source: true
     *** True Line Result
    -                frequency: 500,
    -** Processing line: ~                method_to_call: :play_sine_wave),~
    +       args.inputs.keyboard.directional_vector ||
    +** Processing line: ~       args.inputs.keyboard.key_down.enter ||~
     - Inside source: true
     *** True Line Result
    -                method_to_call: :play_sine_wave),
    -** Processing line: ~      ]~
    +       args.inputs.keyboard.key_down.enter ||
    +** Processing line: ~       args.inputs.keyboard.key_down.escape~
     - Inside source: true
     *** True Line Result
    -      ]
    +       args.inputs.keyboard.key_down.escape
    +** Processing line: ~      args.state.key_event_occurred = true~
    +- Inside source: true
    +*** True Line Result
    +      args.state.key_event_occurred = true
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -15104,1030 +15619,994 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def sine_wave_note_buttons args~
    +** Processing line: ~    args.outputs.debug << { x: 0,   y: y - 50, w: 1280, h: 60 }.solid!~
     - Inside source: true
     *** True Line Result
    -    def sine_wave_note_buttons args
    -** Processing line: ~      [~
    +    args.outputs.debug << { x: 0,   y: y - 50, w: 1280, h: 60 }.solid!
    +** Processing line: ~    args.outputs.debug << { x: 640, y: y, text: text, size_enum: 1, alignment_enum: 1, r: 255, g: 255, b: 255 }.label!~
     - Inside source: true
     *** True Line Result
    -      [
    -** Processing line: ~        (button args,~
    +    args.outputs.debug << { x: 640, y: y, text: text, size_enum: 1, alignment_enum: 1, r: 255, g: 255, b: 255 }.label!
    +** Processing line: ~    args.outputs.debug << { x: 640, y: y - 25, text: "(click to dismiss instructions)", size_enum: -2, alignment_enum: 1, r: 255, g: 255, b: 255 }.label!~
     - Inside source: true
     *** True Line Result
    -        (button args,
    -** Processing line: ~                row: 1.5, col: 2, text: "Sine C4",~
    +    args.outputs.debug << { x: 640, y: y - 25, text: "(click to dismiss instructions)", size_enum: -2, alignment_enum: 1, r: 255, g: 255, b: 255 }.label!
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -                row: 1.5, col: 2, text: "Sine C4",
    -** Processing line: ~                note: :c, octave: 4, type: :sine, method_to_call: :play_note),~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -                note: :c, octave: 4, type: :sine, method_to_call: :play_note),
    -** Processing line: ~        (button args,~
    -- Inside source: true
    +
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
     *** True Line Result
    -        (button args,
    -** Processing line: ~                row: 2.5, col: 2, text: "Sine D4",~
    -- Inside source: true
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
     *** True Line Result
    -                row: 2.5, col: 2, text: "Sine D4",
    -** Processing line: ~                note: :d, octave: 4, type: :sine, method_to_call: :play_note),~
    -- Inside source: true
    +
    +** Processing line: ~*** Input Basics - Mouse Point To Rect - main.rb~
    +- Header detected.
     *** True Line Result
    -                note: :d, octave: 4, type: :sine, method_to_call: :play_note),
    -** Processing line: ~        (button args,~
    -- Inside source: true
    +
     *** True Line Result
    -        (button args,
    -** Processing line: ~                row: 3.5, col: 2, text: "Sine E4",~
    -- Inside source: true
    +*** Input Basics - Mouse Point To Rect - main.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
     *** True Line Result
    -                row: 3.5, col: 2, text: "Sine E4",
    -** Processing line: ~                note: :e, octave: 4, type: :sine, method_to_call: :play_note),~
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/02_input_basics/03_mouse_point_to_rect/app/main.rb~
     - Inside source: true
     *** True Line Result
    -                note: :e, octave: 4, type: :sine, method_to_call: :play_note),
    -** Processing line: ~        (button args,~
    +  # ./samples/02_input_basics/03_mouse_point_to_rect/app/main.rb
    +** Processing line: ~  =begin~
     - Inside source: true
     *** True Line Result
    -        (button args,
    -** Processing line: ~                row: 4.5, col: 2, text: "Sine F4",~
    +  =begin
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -                row: 4.5, col: 2, text: "Sine F4",
    -** Processing line: ~                note: :f, octave: 4, type: :sine, method_to_call: :play_note),~
    +
    +** Processing line: ~  APIs that haven't been encountered in a previous sample apps:~
     - Inside source: true
     *** True Line Result
    -                note: :f, octave: 4, type: :sine, method_to_call: :play_note),
    -** Processing line: ~        (button args,~
    +  APIs that haven't been encountered in a previous sample apps:
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        (button args,
    -** Processing line: ~                row: 5.5, col: 2, text: "Sine G4",~
    +
    +** Processing line: ~  - args.outputus.borders: An array. Values in this array will be rendered as~
     - Inside source: true
     *** True Line Result
    -                row: 5.5, col: 2, text: "Sine G4",
    -** Processing line: ~                note: :g, octave: 4, type: :sine, method_to_call: :play_note),~
    +  - args.outputus.borders: An array. Values in this array will be rendered as
    +** Processing line: ~    unfilled rectangles on the screen.~
     - Inside source: true
     *** True Line Result
    -                note: :g, octave: 4, type: :sine, method_to_call: :play_note),
    -** Processing line: ~        (button args,~
    +    unfilled rectangles on the screen.
    +** Processing line: ~  - ARRAY#inside_rect?: An array with at least two values is considered a point. An array~
     - Inside source: true
     *** True Line Result
    -        (button args,
    -** Processing line: ~                row: 6.5, col: 2, text: "Sine A5",~
    +  - ARRAY#inside_rect?: An array with at least two values is considered a point. An array
    +** Processing line: ~    with at least four values is considered a rect. The inside_rect? function returns true~
     - Inside source: true
     *** True Line Result
    -                row: 6.5, col: 2, text: "Sine A5",
    -** Processing line: ~                note: :a, octave: 5, type: :sine, method_to_call: :play_note),~
    +    with at least four values is considered a rect. The inside_rect? function returns true
    +** Processing line: ~    or false depending on if the point is inside the rect.~
     - Inside source: true
     *** True Line Result
    -                note: :a, octave: 5, type: :sine, method_to_call: :play_note),
    -** Processing line: ~        (button args,~
    +    or false depending on if the point is inside the rect.
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        (button args,
    -** Processing line: ~                row: 7.5, col: 2, text: "Sine B5",~
    +
    +** Processing line: ~    ```~
     - Inside source: true
     *** True Line Result
    -                row: 7.5, col: 2, text: "Sine B5",
    -** Processing line: ~                note: :b, octave: 5, type: :sine, method_to_call: :play_note),~
    +    ```
    +** Processing line: ~    # Point:  x: 100, y: 100~
     - Inside source: true
     *** True Line Result
    -                note: :b, octave: 5, type: :sine, method_to_call: :play_note),
    -** Processing line: ~        (button args,~
    +    # Point:  x: 100, y: 100
    +** Processing line: ~    # Rect:   x: 0, y: 0, w: 500, h: 500~
     - Inside source: true
     *** True Line Result
    -        (button args,
    -** Processing line: ~                row: 8.5, col: 2, text: "Sine C5",~
    +    # Rect:   x: 0, y: 0, w: 500, h: 500
    +** Processing line: ~    # Result: true~
     - Inside source: true
     *** True Line Result
    -                row: 8.5, col: 2, text: "Sine C5",
    -** Processing line: ~                note: :c, octave: 5, type: :sine, method_to_call: :play_note),~
    +    # Result: true
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -                note: :c, octave: 5, type: :sine, method_to_call: :play_note),
    -** Processing line: ~      ]~
    +
    +** Processing line: ~    [100, 100].inside_rect? [0, 0, 500, 500]~
     - Inside source: true
     *** True Line Result
    -      ]
    -** Processing line: ~    end~
    +    [100, 100].inside_rect? [0, 0, 500, 500]
    +** Processing line: ~    ```~
     - Inside source: true
     *** True Line Result
    -    end
    +    ```
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def square_wave_note_buttons args~
    +** Processing line: ~    ```~
     - Inside source: true
     *** True Line Result
    -    def square_wave_note_buttons args
    -** Processing line: ~      [~
    +    ```
    +** Processing line: ~    # Point:  x: 100, y: 100~
     - Inside source: true
     *** True Line Result
    -      [
    -** Processing line: ~        (button args,~
    +    # Point:  x: 100, y: 100
    +** Processing line: ~    # Rect:   x: 300, y: 300, w: 100, h: 100~
     - Inside source: true
     *** True Line Result
    -        (button args,
    -** Processing line: ~                row: 1.5, col: 6, text: "Square C4",~
    +    # Rect:   x: 300, y: 300, w: 100, h: 100
    +** Processing line: ~    # Result: false~
     - Inside source: true
     *** True Line Result
    -                row: 1.5, col: 6, text: "Square C4",
    -** Processing line: ~                note: :c, octave: 4, type: :square, method_to_call: :play_note),~
    +    # Result: false
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -                note: :c, octave: 4, type: :square, method_to_call: :play_note),
    -** Processing line: ~        (button args,~
    +
    +** Processing line: ~    [100, 100].inside_rect? [300, 300, 100, 100]~
     - Inside source: true
     *** True Line Result
    -        (button args,
    -** Processing line: ~                row: 2.5, col: 6, text: "Square D4",~
    +    [100, 100].inside_rect? [300, 300, 100, 100]
    +** Processing line: ~    ```~
     - Inside source: true
     *** True Line Result
    -                row: 2.5, col: 6, text: "Square D4",
    -** Processing line: ~                note: :d, octave: 4, type: :square, method_to_call: :play_note),~
    +    ```
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -                note: :d, octave: 4, type: :square, method_to_call: :play_note),
    -** Processing line: ~        (button args,~
    +
    +** Processing line: ~  - args.inputs.mouse.click.point.created_at: The frame the mouse click occurred in.~
     - Inside source: true
     *** True Line Result
    -        (button args,
    -** Processing line: ~                row: 3.5, col: 6, text: "Square E4",~
    +  - args.inputs.mouse.click.point.created_at: The frame the mouse click occurred in.
    +** Processing line: ~  - args.inputs.mouse.click.point.created_at_elapsed: How many frames have passed~
     - Inside source: true
     *** True Line Result
    -                row: 3.5, col: 6, text: "Square E4",
    -** Processing line: ~                note: :e, octave: 4, type: :square, method_to_call: :play_note),~
    +  - args.inputs.mouse.click.point.created_at_elapsed: How many frames have passed
    +** Processing line: ~    since the click event.~
     - Inside source: true
     *** True Line Result
    -                note: :e, octave: 4, type: :square, method_to_call: :play_note),
    -** Processing line: ~        (button args,~
    +    since the click event.
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        (button args,
    -** Processing line: ~                row: 4.5, col: 6, text: "Square F4",~
    +
    +** Processing line: ~  =end~
     - Inside source: true
     *** True Line Result
    -                row: 4.5, col: 6, text: "Square F4",
    -** Processing line: ~                note: :f, octave: 4, type: :square, method_to_call: :play_note),~
    +  =end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -                note: :f, octave: 4, type: :square, method_to_call: :play_note),
    -** Processing line: ~        (button args,~
    +
    +** Processing line: ~  # To determine whether a point is in a rect~
     - Inside source: true
     *** True Line Result
    -        (button args,
    -** Processing line: ~                row: 5.5, col: 6, text: "Square G4",~
    +  # To determine whether a point is in a rect
    +** Processing line: ~  # Use point.inside_rect? rect~
     - Inside source: true
     *** True Line Result
    -                row: 5.5, col: 6, text: "Square G4",
    -** Processing line: ~                note: :g, octave: 4, type: :square, method_to_call: :play_note),~
    +  # Use point.inside_rect? rect
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -                note: :g, octave: 4, type: :square, method_to_call: :play_note),
    -** Processing line: ~        (button args,~
    +
    +** Processing line: ~  # This is useful to determine if a click occurred in a rect~
     - Inside source: true
     *** True Line Result
    -        (button args,
    -** Processing line: ~                row: 6.5, col: 6, text: "Square A5",~
    +  # This is useful to determine if a click occurred in a rect
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -                row: 6.5, col: 6, text: "Square A5",
    -** Processing line: ~                note: :a, octave: 5, type: :square, method_to_call: :play_note),~
    +
    +** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
    -                note: :a, octave: 5, type: :square, method_to_call: :play_note),
    -** Processing line: ~        (button args,~
    +  def tick args
    +** Processing line: ~    tick_instructions args, "Sample app shows how to determing if a click happened inside a rectangle."~
     - Inside source: true
     *** True Line Result
    -        (button args,
    -** Processing line: ~                row: 7.5, col: 6, text: "Square B5",~
    +    tick_instructions args, "Sample app shows how to determing if a click happened inside a rectangle."
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -                row: 7.5, col: 6, text: "Square B5",
    -** Processing line: ~                note: :b, octave: 5, type: :square, method_to_call: :play_note),~
    +
    +** Processing line: ~    x = 460~
     - Inside source: true
     *** True Line Result
    -                note: :b, octave: 5, type: :square, method_to_call: :play_note),
    -** Processing line: ~        (button args,~
    +    x = 460
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        (button args,
    -** Processing line: ~                row: 8.5, col: 6, text: "Square C5",~
    +
    +** Processing line: ~    args.outputs.labels << small_label(args, x, 15, "Click inside the blue box maybe ---->")~
     - Inside source: true
     *** True Line Result
    -                row: 8.5, col: 6, text: "Square C5",
    -** Processing line: ~                note: :c, octave: 5, type: :square, method_to_call: :play_note),~
    +    args.outputs.labels << small_label(args, x, 15, "Click inside the blue box maybe ---->")
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -                note: :c, octave: 5, type: :square, method_to_call: :play_note),
    -** Processing line: ~      ]~
    +
    +** Processing line: ~    box = { x: 785, y: 370, w: 50, h: 50, r: 0, g: 0, b: 170 }~
     - Inside source: true
     *** True Line Result
    -      ]
    -** Processing line: ~    end~
    +    box = { x: 785, y: 370, w: 50, h: 50, r: 0, g: 0, b: 170 }
    +** Processing line: ~    args.outputs.borders << box~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~    def saw_tooth_wave_note_buttons args~
    +    args.outputs.borders << box
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    def saw_tooth_wave_note_buttons args
    -** Processing line: ~      [~
    +
    +** Processing line: ~    # Saves the most recent click into args.state~
     - Inside source: true
     *** True Line Result
    -      [
    -** Processing line: ~        (button args,~
    +    # Saves the most recent click into args.state
    +** Processing line: ~    # Unlike the other components of args,~
     - Inside source: true
     *** True Line Result
    -        (button args,
    -** Processing line: ~                row: 1.5, col: 8, text: "Saw C4",~
    +    # Unlike the other components of args,
    +** Processing line: ~    # args.state does not reset every tick.~
     - Inside source: true
     *** True Line Result
    -                row: 1.5, col: 8, text: "Saw C4",
    -** Processing line: ~                note: :c, octave: 4, type: :saw_tooth, method_to_call: :play_note),~
    -- Inside source: true
    -*** True Line Result
    -                note: :c, octave: 4, type: :saw_tooth, method_to_call: :play_note),
    -** Processing line: ~        (button args,~
    -- Inside source: true
    -*** True Line Result
    -        (button args,
    -** Processing line: ~                row: 2.5, col: 8, text: "Saw D4",~
    +    # args.state does not reset every tick.
    +** Processing line: ~    if args.inputs.mouse.click~
     - Inside source: true
     *** True Line Result
    -                row: 2.5, col: 8, text: "Saw D4",
    -** Processing line: ~                note: :d, octave: 4, type: :saw_tooth, method_to_call: :play_note),~
    +    if args.inputs.mouse.click
    +** Processing line: ~      args.state.last_mouse_click = args.inputs.mouse.click~
     - Inside source: true
     *** True Line Result
    -                note: :d, octave: 4, type: :saw_tooth, method_to_call: :play_note),
    -** Processing line: ~        (button args,~
    +      args.state.last_mouse_click = args.inputs.mouse.click
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -        (button args,
    -** Processing line: ~                row: 3.5, col: 8, text: "Saw E4",~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -                row: 3.5, col: 8, text: "Saw E4",
    -** Processing line: ~                note: :e, octave: 4, type: :saw_tooth, method_to_call: :play_note),~
    +
    +** Processing line: ~    if args.state.last_mouse_click~
     - Inside source: true
     *** True Line Result
    -                note: :e, octave: 4, type: :saw_tooth, method_to_call: :play_note),
    -** Processing line: ~        (button args,~
    +    if args.state.last_mouse_click
    +** Processing line: ~      if args.state.last_mouse_click.point.inside_rect? box~
     - Inside source: true
     *** True Line Result
    -        (button args,
    -** Processing line: ~                row: 4.5, col: 8, text: "Saw F4",~
    +      if args.state.last_mouse_click.point.inside_rect? box
    +** Processing line: ~        args.outputs.labels << small_label(args, x, 16, "Mouse click happened *inside* the box.")~
     - Inside source: true
     *** True Line Result
    -                row: 4.5, col: 8, text: "Saw F4",
    -** Processing line: ~                note: :f, octave: 4, type: :saw_tooth, method_to_call: :play_note),~
    +        args.outputs.labels << small_label(args, x, 16, "Mouse click happened *inside* the box.")
    +** Processing line: ~      else~
     - Inside source: true
     *** True Line Result
    -                note: :f, octave: 4, type: :saw_tooth, method_to_call: :play_note),
    -** Processing line: ~        (button args,~
    +      else
    +** Processing line: ~        args.outputs.labels << small_label(args, x, 16, "Mouse click happened *outside* the box.")~
     - Inside source: true
     *** True Line Result
    -        (button args,
    -** Processing line: ~                row: 5.5, col: 8, text: "Saw G4",~
    +        args.outputs.labels << small_label(args, x, 16, "Mouse click happened *outside* the box.")
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -                row: 5.5, col: 8, text: "Saw G4",
    -** Processing line: ~                note: :g, octave: 4, type: :saw_tooth, method_to_call: :play_note),~
    +      end
    +** Processing line: ~    else~
     - Inside source: true
     *** True Line Result
    -                note: :g, octave: 4, type: :saw_tooth, method_to_call: :play_note),
    -** Processing line: ~        (button args,~
    +    else
    +** Processing line: ~      args.outputs.labels << small_label(args, x, 16, "Mouse click has not occurred yet.")~
     - Inside source: true
     *** True Line Result
    -        (button args,
    -** Processing line: ~                row: 6.5, col: 8, text: "Saw A5",~
    +      args.outputs.labels << small_label(args, x, 16, "Mouse click has not occurred yet.")
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -                row: 6.5, col: 8, text: "Saw A5",
    -** Processing line: ~                note: :a, octave: 5, type: :saw_tooth, method_to_call: :play_note),~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -                note: :a, octave: 5, type: :saw_tooth, method_to_call: :play_note),
    -** Processing line: ~        (button args,~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        (button args,
    -** Processing line: ~                row: 7.5, col: 8, text: "Saw B5",~
    +
    +** Processing line: ~  def small_label args, x, row, message~
     - Inside source: true
     *** True Line Result
    -                row: 7.5, col: 8, text: "Saw B5",
    -** Processing line: ~                note: :b, octave: 5, type: :saw_tooth, method_to_call: :play_note),~
    +  def small_label args, x, row, message
    +** Processing line: ~    { x: x, y: row_to_px(args, row), text: message, size_enum: -2 }~
     - Inside source: true
     *** True Line Result
    -                note: :b, octave: 5, type: :saw_tooth, method_to_call: :play_note),
    -** Processing line: ~        (button args,~
    +    { x: x, y: row_to_px(args, row), text: message, size_enum: -2 }
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -        (button args,
    -** Processing line: ~                row: 8.5, col: 8, text: "Saw C5",~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -                row: 8.5, col: 8, text: "Saw C5",
    -** Processing line: ~                note: :c, octave: 5, type: :saw_tooth, method_to_call: :play_note),~
    +
    +** Processing line: ~  def row_to_px args, row_number~
     - Inside source: true
     *** True Line Result
    -                note: :c, octave: 5, type: :saw_tooth, method_to_call: :play_note),
    -** Processing line: ~      ]~
    +  def row_to_px args, row_number
    +** Processing line: ~    args.grid.top.shift_down(5).shift_down(20 * row_number)~
     - Inside source: true
     *** True Line Result
    -      ]
    -** Processing line: ~    end~
    +    args.grid.top.shift_down(5).shift_down(20 * row_number)
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    end
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def triangle_wave_note_buttons args~
    +** Processing line: ~  def tick_instructions args, text, y = 715~
     - Inside source: true
     *** True Line Result
    -    def triangle_wave_note_buttons args
    -** Processing line: ~      [~
    +  def tick_instructions args, text, y = 715
    +** Processing line: ~    return if args.state.key_event_occurred~
     - Inside source: true
     *** True Line Result
    -      [
    -** Processing line: ~        (button args,~
    +    return if args.state.key_event_occurred
    +** Processing line: ~    if args.inputs.mouse.click ||~
     - Inside source: true
     *** True Line Result
    -        (button args,
    -** Processing line: ~                row: 1.5, col: 10, text: "Triangle C4",~
    +    if args.inputs.mouse.click ||
    +** Processing line: ~       args.inputs.keyboard.directional_vector ||~
     - Inside source: true
     *** True Line Result
    -                row: 1.5, col: 10, text: "Triangle C4",
    -** Processing line: ~                note: :c, octave: 4, type: :triangle, method_to_call: :play_note),~
    +       args.inputs.keyboard.directional_vector ||
    +** Processing line: ~       args.inputs.keyboard.key_down.enter ||~
     - Inside source: true
     *** True Line Result
    -                note: :c, octave: 4, type: :triangle, method_to_call: :play_note),
    -** Processing line: ~        (button args,~
    +       args.inputs.keyboard.key_down.enter ||
    +** Processing line: ~       args.inputs.keyboard.key_down.escape~
     - Inside source: true
     *** True Line Result
    -        (button args,
    -** Processing line: ~                row: 2.5, col: 10, text: "Triangle D4",~
    +       args.inputs.keyboard.key_down.escape
    +** Processing line: ~      args.state.key_event_occurred = true~
     - Inside source: true
     *** True Line Result
    -                row: 2.5, col: 10, text: "Triangle D4",
    -** Processing line: ~                note: :d, octave: 4, type: :triangle, method_to_call: :play_note),~
    +      args.state.key_event_occurred = true
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -                note: :d, octave: 4, type: :triangle, method_to_call: :play_note),
    -** Processing line: ~        (button args,~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        (button args,
    -** Processing line: ~                row: 3.5, col: 10, text: "Triangle E4",~
    +
    +** Processing line: ~    args.outputs.debug << { x: 0,   y: y - 50, w: 1280, h: 60 }.solid!~
     - Inside source: true
     *** True Line Result
    -                row: 3.5, col: 10, text: "Triangle E4",
    -** Processing line: ~                note: :e, octave: 4, type: :triangle, method_to_call: :play_note),~
    +    args.outputs.debug << { x: 0,   y: y - 50, w: 1280, h: 60 }.solid!
    +** Processing line: ~    args.outputs.debug << { x: 640, y: y, text: text, size_enum: 1, alignment_enum: 1, r: 255, g: 255, b: 255 }.label!~
     - Inside source: true
     *** True Line Result
    -                note: :e, octave: 4, type: :triangle, method_to_call: :play_note),
    -** Processing line: ~        (button args,~
    +    args.outputs.debug << { x: 640, y: y, text: text, size_enum: 1, alignment_enum: 1, r: 255, g: 255, b: 255 }.label!
    +** Processing line: ~    args.outputs.debug << { x: 640, y: y - 25, text: "(click to dismiss instructions)", size_enum: -2, alignment_enum: 1, r: 255, g: 255, b: 255 }.label!~
     - Inside source: true
     *** True Line Result
    -        (button args,
    -** Processing line: ~                row: 4.5, col: 10, text: "Triangle F4",~
    +    args.outputs.debug << { x: 640, y: y - 25, text: "(click to dismiss instructions)", size_enum: -2, alignment_enum: 1, r: 255, g: 255, b: 255 }.label!
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -                row: 4.5, col: 10, text: "Triangle F4",
    -** Processing line: ~                note: :f, octave: 4, type: :triangle, method_to_call: :play_note),~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -                note: :f, octave: 4, type: :triangle, method_to_call: :play_note),
    -** Processing line: ~        (button args,~
    -- Inside source: true
    +
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
     *** True Line Result
    -        (button args,
    -** Processing line: ~                row: 5.5, col: 10, text: "Triangle G4",~
    -- Inside source: true
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
     *** True Line Result
    -                row: 5.5, col: 10, text: "Triangle G4",
    -** Processing line: ~                note: :g, octave: 4, type: :triangle, method_to_call: :play_note),~
    -- Inside source: true
    +
    +** Processing line: ~*** Input Basics - Mouse Rect To Rect - main.rb~
    +- Header detected.
     *** True Line Result
    -                note: :g, octave: 4, type: :triangle, method_to_call: :play_note),
    -** Processing line: ~        (button args,~
    -- Inside source: true
    +
     *** True Line Result
    -        (button args,
    -** Processing line: ~                row: 6.5, col: 10, text: "Triangle A5",~
    +*** Input Basics - Mouse Rect To Rect - main.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/02_input_basics/04_mouse_rect_to_rect/app/main.rb~
     - Inside source: true
     *** True Line Result
    -                row: 6.5, col: 10, text: "Triangle A5",
    -** Processing line: ~                note: :a, octave: 5, type: :triangle, method_to_call: :play_note),~
    +  # ./samples/02_input_basics/04_mouse_rect_to_rect/app/main.rb
    +** Processing line: ~  =begin~
     - Inside source: true
     *** True Line Result
    -                note: :a, octave: 5, type: :triangle, method_to_call: :play_note),
    -** Processing line: ~        (button args,~
    +  =begin
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        (button args,
    -** Processing line: ~                row: 7.5, col: 10, text: "Triangle B5",~
    +
    +** Processing line: ~  APIs that haven't been encountered in a previous sample apps:~
     - Inside source: true
     *** True Line Result
    -                row: 7.5, col: 10, text: "Triangle B5",
    -** Processing line: ~                note: :b, octave: 5, type: :triangle, method_to_call: :play_note),~
    +  APIs that haven't been encountered in a previous sample apps:
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -                note: :b, octave: 5, type: :triangle, method_to_call: :play_note),
    -** Processing line: ~        (button args,~
    +
    +** Processing line: ~  - args.outputs.borders: An array. Values in this array will be rendered as~
     - Inside source: true
     *** True Line Result
    -        (button args,
    -** Processing line: ~                row: 8.5, col: 10, text: "Triangle C5",~
    +  - args.outputs.borders: An array. Values in this array will be rendered as
    +** Processing line: ~    unfilled rectangles on the screen.~
     - Inside source: true
     *** True Line Result
    -                row: 8.5, col: 10, text: "Triangle C5",
    -** Processing line: ~                note: :c, octave: 5, type: :triangle, method_to_call: :play_note),~
    +    unfilled rectangles on the screen.
    +** Processing line: ~  - ARRAY#intersect_rect?: An array with at least four values is~
     - Inside source: true
     *** True Line Result
    -                note: :c, octave: 5, type: :triangle, method_to_call: :play_note),
    -** Processing line: ~      ]~
    +  - ARRAY#intersect_rect?: An array with at least four values is
    +** Processing line: ~    considered a rect. The intersect_rect? function returns true~
     - Inside source: true
     *** True Line Result
    -      ]
    -** Processing line: ~    end~
    +    considered a rect. The intersect_rect? function returns true
    +** Processing line: ~    or false depending on if the two rectangles intersect.~
     - Inside source: true
     *** True Line Result
    -    end
    +    or false depending on if the two rectangles intersect.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def bell_buttons args~
    -- Inside source: true
    -*** True Line Result
    -    def bell_buttons args
    -** Processing line: ~      [~
    +** Processing line: ~    ```~
     - Inside source: true
     *** True Line Result
    -      [
    -** Processing line: ~        (button args,~
    +    ```
    +** Processing line: ~    # Rect One: x: 100, y: 100, w: 100, h: 100~
     - Inside source: true
     *** True Line Result
    -        (button args,
    -** Processing line: ~                row: 1.5, col: 4, text: "Bell C4",~
    +    # Rect One: x: 100, y: 100, w: 100, h: 100
    +** Processing line: ~    # Rect Two: x: 0, y: 0, w: 500, h: 500~
     - Inside source: true
     *** True Line Result
    -                row: 1.5, col: 4, text: "Bell C4",
    -** Processing line: ~                note: :c, octave: 4, type: :bell, method_to_call: :play_note),~
    +    # Rect Two: x: 0, y: 0, w: 500, h: 500
    +** Processing line: ~    # Result:   true~
     - Inside source: true
     *** True Line Result
    -                note: :c, octave: 4, type: :bell, method_to_call: :play_note),
    -** Processing line: ~        (button args,~
    +    # Result:   true
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        (button args,
    -** Processing line: ~                row: 2.5, col: 4, text: "Bell D4",~
    +
    +** Processing line: ~    [100, 100, 100, 100].intersect_rect? [0, 0, 500, 500]~
     - Inside source: true
     *** True Line Result
    -                row: 2.5, col: 4, text: "Bell D4",
    -** Processing line: ~                note: :d, octave: 4, type: :bell, method_to_call: :play_note),~
    +    [100, 100, 100, 100].intersect_rect? [0, 0, 500, 500]
    +** Processing line: ~    ```~
     - Inside source: true
     *** True Line Result
    -                note: :d, octave: 4, type: :bell, method_to_call: :play_note),
    -** Processing line: ~        (button args,~
    +    ```
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        (button args,
    -** Processing line: ~                row: 3.5, col: 4, text: "Bell E4",~
    +
    +** Processing line: ~    ```~
     - Inside source: true
     *** True Line Result
    -                row: 3.5, col: 4, text: "Bell E4",
    -** Processing line: ~                note: :e, octave: 4, type: :bell, method_to_call: :play_note),~
    +    ```
    +** Processing line: ~    # Rect One: x: 100, y: 100, w: 10, h: 10~
     - Inside source: true
     *** True Line Result
    -                note: :e, octave: 4, type: :bell, method_to_call: :play_note),
    -** Processing line: ~        (button args,~
    +    # Rect One: x: 100, y: 100, w: 10, h: 10
    +** Processing line: ~    # Rect Two: x: 500, y: 500, w: 10, h: 10~
     - Inside source: true
     *** True Line Result
    -        (button args,
    -** Processing line: ~                row: 4.5, col: 4, text: "Bell F4",~
    +    # Rect Two: x: 500, y: 500, w: 10, h: 10
    +** Processing line: ~    # Result:   false~
     - Inside source: true
     *** True Line Result
    -                row: 4.5, col: 4, text: "Bell F4",
    -** Processing line: ~                note: :f, octave: 4, type: :bell, method_to_call: :play_note),~
    +    # Result:   false
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -                note: :f, octave: 4, type: :bell, method_to_call: :play_note),
    -** Processing line: ~        (button args,~
    +
    +** Processing line: ~    [100, 100, 10, 10].intersect_rect? [500, 500, 10, 10]~
     - Inside source: true
     *** True Line Result
    -        (button args,
    -** Processing line: ~                row: 5.5, col: 4, text: "Bell G4",~
    +    [100, 100, 10, 10].intersect_rect? [500, 500, 10, 10]
    +** Processing line: ~    ```~
     - Inside source: true
     *** True Line Result
    -                row: 5.5, col: 4, text: "Bell G4",
    -** Processing line: ~                note: :g, octave: 4, type: :bell, method_to_call: :play_note),~
    +    ```
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -                note: :g, octave: 4, type: :bell, method_to_call: :play_note),
    -** Processing line: ~        (button args,~
    +
    +** Processing line: ~  =end~
     - Inside source: true
     *** True Line Result
    -        (button args,
    -** Processing line: ~                row: 6.5, col: 4, text: "Bell A5",~
    +  =end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -                row: 6.5, col: 4, text: "Bell A5",
    -** Processing line: ~                note: :a, octave: 5, type: :bell, method_to_call: :play_note),~
    +
    +** Processing line: ~  # Similarly, whether rects intersect can be found through~
     - Inside source: true
     *** True Line Result
    -                note: :a, octave: 5, type: :bell, method_to_call: :play_note),
    -** Processing line: ~        (button args,~
    +  # Similarly, whether rects intersect can be found through
    +** Processing line: ~  # rect1.intersect_rect? rect2~
     - Inside source: true
     *** True Line Result
    -        (button args,
    -** Processing line: ~                row: 7.5, col: 4, text: "Bell B5",~
    +  # rect1.intersect_rect? rect2
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -                row: 7.5, col: 4, text: "Bell B5",
    -** Processing line: ~                note: :b, octave: 5, type: :bell, method_to_call: :play_note),~
    +
    +** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
    -                note: :b, octave: 5, type: :bell, method_to_call: :play_note),
    -** Processing line: ~        (button args,~
    +  def tick args
    +** Processing line: ~    tick_instructions args, "Sample app shows how to determine if two rectangles intersect."~
     - Inside source: true
     *** True Line Result
    -        (button args,
    -** Processing line: ~                row: 8.5, col: 4, text: "Bell C5",~
    +    tick_instructions args, "Sample app shows how to determine if two rectangles intersect."
    +** Processing line: ~    x = 460~
     - Inside source: true
     *** True Line Result
    -                row: 8.5, col: 4, text: "Bell C5",
    -** Processing line: ~                note: :c, octave: 5, type: :bell, method_to_call: :play_note),~
    +    x = 460
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -                note: :c, octave: 5, type: :bell, method_to_call: :play_note),
    -** Processing line: ~      ]~
    +
    +** Processing line: ~    args.outputs.labels << small_label(args, x, 3, "Click anywhere on the screen")~
     - Inside source: true
     *** True Line Result
    -      ]
    -** Processing line: ~    end~
    +    args.outputs.labels << small_label(args, x, 3, "Click anywhere on the screen")
    +** Processing line: ~    # red_box = [460, 250, 355, 90, 170, 0, 0]~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~  end~
    +    # red_box = [460, 250, 355, 90, 170, 0, 0]
    +** Processing line: ~    # args.outputs.borders << red_box~
     - Inside source: true
     *** True Line Result
    -  end
    +    # args.outputs.borders << red_box
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  begin # region: wave generation~
    -- Inside source: true
    -*** True Line Result
    -  begin # region: wave generation
    -** Processing line: ~    begin # sine wave~
    +** Processing line: ~    # args.state.box_collision_one and args.state.box_collision_two~
     - Inside source: true
     *** True Line Result
    -    begin # sine wave
    -** Processing line: ~      def defaults_sine_wave_for~
    +    # args.state.box_collision_one and args.state.box_collision_two
    +** Processing line: ~    # Are given values of a solid when they should be rendered~
     - Inside source: true
     *** True Line Result
    -      def defaults_sine_wave_for
    -** Processing line: ~        { frequency: 440, sample_rate: 48000 }~
    +    # Are given values of a solid when they should be rendered
    +** Processing line: ~    # They are stored in game so that they do not get reset every tick~
     - Inside source: true
     *** True Line Result
    -        { frequency: 440, sample_rate: 48000 }
    -** Processing line: ~      end~
    +    # They are stored in game so that they do not get reset every tick
    +** Processing line: ~    if args.inputs.mouse.click~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +    if args.inputs.mouse.click
    +** Processing line: ~      if !args.state.box_collision_one~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      def sine_wave_for opts = {}~
    +      if !args.state.box_collision_one
    +** Processing line: ~        args.state.box_collision_one = { x: args.inputs.mouse.click.point.x - 25,~
     - Inside source: true
     *** True Line Result
    -      def sine_wave_for opts = {}
    -** Processing line: ~        opts = defaults_sine_wave_for.merge opts~
    +        args.state.box_collision_one = { x: args.inputs.mouse.click.point.x - 25,
    +** Processing line: ~                                         y: args.inputs.mouse.click.point.y - 25,~
     - Inside source: true
     *** True Line Result
    -        opts = defaults_sine_wave_for.merge opts
    -** Processing line: ~        frequency   = opts[:frequency]~
    +                                         y: args.inputs.mouse.click.point.y - 25,
    +** Processing line: ~                                         w: 125, h: 125,~
     - Inside source: true
     *** True Line Result
    -        frequency   = opts[:frequency]
    -** Processing line: ~        sample_rate = opts[:sample_rate]~
    +                                         w: 125, h: 125,
    +** Processing line: ~                                         r: 180, g: 0, b: 0, a: 180 }~
     - Inside source: true
     *** True Line Result
    -        sample_rate = opts[:sample_rate]
    -** Processing line: ~        period_size = (sample_rate.fdiv frequency).ceil~
    +                                         r: 180, g: 0, b: 0, a: 180 }
    +** Processing line: ~      elsif !args.state.box_collision_two~
     - Inside source: true
     *** True Line Result
    -        period_size = (sample_rate.fdiv frequency).ceil
    -** Processing line: ~        period_size.map_with_index do |i|~
    +      elsif !args.state.box_collision_two
    +** Processing line: ~        args.state.box_collision_two = { x: args.inputs.mouse.click.point.x - 25,~
     - Inside source: true
     *** True Line Result
    -        period_size.map_with_index do |i|
    -** Processing line: ~          Math::sin((2.0 * Math::PI) / (sample_rate.to_f / frequency.to_f) * i)~
    +        args.state.box_collision_two = { x: args.inputs.mouse.click.point.x - 25,
    +** Processing line: ~                                         y: args.inputs.mouse.click.point.y - 25,~
     - Inside source: true
     *** True Line Result
    -          Math::sin((2.0 * Math::PI) / (sample_rate.to_f / frequency.to_f) * i)
    -** Processing line: ~        end.to_a~
    +                                         y: args.inputs.mouse.click.point.y - 25,
    +** Processing line: ~                                         w: 125, h: 125,~
     - Inside source: true
     *** True Line Result
    -        end.to_a
    -** Processing line: ~      end~
    +                                         w: 125, h: 125,
    +** Processing line: ~                                         r: 0, g: 0, b: 180, a: 180 }~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +                                         r: 0, g: 0, b: 180, a: 180 }
    +** Processing line: ~      else~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      def defaults_queue_sine_wave~
    +      else
    +** Processing line: ~        args.state.box_collision_one = nil~
     - Inside source: true
     *** True Line Result
    -      def defaults_queue_sine_wave
    -** Processing line: ~        { frequency: 440, duration: 60, gain: 1.0, fade_out: false, queue_in: 0 }~
    +        args.state.box_collision_one = nil
    +** Processing line: ~        args.state.box_collision_two = nil~
     - Inside source: true
     *** True Line Result
    -        { frequency: 440, duration: 60, gain: 1.0, fade_out: false, queue_in: 0 }
    +        args.state.box_collision_two = nil
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
           end
    -** Processing line: ~~
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      def queue_sine_wave args, opts = {}~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      def queue_sine_wave args, opts = {}
    -** Processing line: ~        opts        = defaults_queue_sine_wave.merge opts~
    +
    +** Processing line: ~    if args.state.box_collision_one~
     - Inside source: true
     *** True Line Result
    -        opts        = defaults_queue_sine_wave.merge opts
    -** Processing line: ~        frequency   = opts[:frequency]~
    +    if args.state.box_collision_one
    +** Processing line: ~      args.outputs.solids << args.state.box_collision_one~
     - Inside source: true
     *** True Line Result
    -        frequency   = opts[:frequency]
    -** Processing line: ~        sample_rate = 48000~
    +      args.outputs.solids << args.state.box_collision_one
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -        sample_rate = 48000
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~        sine_wave = sine_wave_for frequency: frequency, sample_rate: sample_rate~
    +** Processing line: ~    if args.state.box_collision_two~
     - Inside source: true
     *** True Line Result
    -        sine_wave = sine_wave_for frequency: frequency, sample_rate: sample_rate
    -** Processing line: ~        args.state.sine_waves[frequency] ||= sine_wave_for frequency: frequency, sample_rate: sample_rate~
    +    if args.state.box_collision_two
    +** Processing line: ~      args.outputs.solids << args.state.box_collision_two~
     - Inside source: true
     *** True Line Result
    -        args.state.sine_waves[frequency] ||= sine_wave_for frequency: frequency, sample_rate: sample_rate
    +      args.outputs.solids << args.state.box_collision_two
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~        proc = lambda do~
    +** Processing line: ~    if args.state.box_collision_one && args.state.box_collision_two~
     - Inside source: true
     *** True Line Result
    -        proc = lambda do
    -** Processing line: ~          generate_audio_data args.state.sine_waves[frequency], sample_rate~
    +    if args.state.box_collision_one && args.state.box_collision_two
    +** Processing line: ~      if args.state.box_collision_one.intersect_rect? args.state.box_collision_two~
     - Inside source: true
     *** True Line Result
    -          generate_audio_data args.state.sine_waves[frequency], sample_rate
    -** Processing line: ~        end~
    +      if args.state.box_collision_one.intersect_rect? args.state.box_collision_two
    +** Processing line: ~        args.outputs.labels << small_label(args, x, 4, 'The boxes intersect.')~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~~
    +        args.outputs.labels << small_label(args, x, 4, 'The boxes intersect.')
    +** Processing line: ~      else~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~        audio_state = new_audio_state args, opts~
    +      else
    +** Processing line: ~        args.outputs.labels << small_label(args, x, 4, 'The boxes do not intersect.')~
     - Inside source: true
     *** True Line Result
    -        audio_state = new_audio_state args, opts
    -** Processing line: ~        audio_state[:input] = [1, sample_rate, proc]~
    +        args.outputs.labels << small_label(args, x, 4, 'The boxes do not intersect.')
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -        audio_state[:input] = [1, sample_rate, proc]
    -** Processing line: ~        queue_audio args, audio_state: audio_state, wave: sine_wave~
    +      end
    +** Processing line: ~    else~
     - Inside source: true
     *** True Line Result
    -        queue_audio args, audio_state: audio_state, wave: sine_wave
    -** Processing line: ~      end~
    +    else
    +** Processing line: ~      args.outputs.labels << small_label(args, x, 4, '--')~
     - Inside source: true
     *** True Line Result
    -      end
    +      args.outputs.labels << small_label(args, x, 4, '--')
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
         end
    -** Processing line: ~~
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    begin # region: square wave~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    begin # region: square wave
    -** Processing line: ~      def defaults_square_wave_for~
    +
    +** Processing line: ~  def small_label args, x, row, message~
     - Inside source: true
     *** True Line Result
    -      def defaults_square_wave_for
    -** Processing line: ~        { frequency: 440, sample_rate: 48000 }~
    +  def small_label args, x, row, message
    +** Processing line: ~    { x: x, y: row_to_px(args, row), text: message, size_enum: -2 }~
     - Inside source: true
     *** True Line Result
    -        { frequency: 440, sample_rate: 48000 }
    -** Processing line: ~      end~
    +    { x: x, y: row_to_px(args, row), text: message, size_enum: -2 }
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -      end
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      def square_wave_for opts = {}~
    -- Inside source: true
    -*** True Line Result
    -      def square_wave_for opts = {}
    -** Processing line: ~        opts = defaults_square_wave_for.merge opts~
    -- Inside source: true
    -*** True Line Result
    -        opts = defaults_square_wave_for.merge opts
    -** Processing line: ~        sine_wave = sine_wave_for opts~
    -- Inside source: true
    -*** True Line Result
    -        sine_wave = sine_wave_for opts
    -** Processing line: ~        sine_wave.map do |v|~
    +** Processing line: ~  def row_to_px args, row_number~
     - Inside source: true
     *** True Line Result
    -        sine_wave.map do |v|
    -** Processing line: ~          if v >= 0~
    +  def row_to_px args, row_number
    +** Processing line: ~    args.grid.top - 5 - (20 * row_number)~
     - Inside source: true
     *** True Line Result
    -          if v >= 0
    -** Processing line: ~            1.0~
    +    args.grid.top - 5 - (20 * row_number)
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -            1.0
    -** Processing line: ~          else~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          else
    -** Processing line: ~            -1.0~
    +
    +** Processing line: ~  def tick_instructions args, text, y = 715~
     - Inside source: true
     *** True Line Result
    -            -1.0
    -** Processing line: ~          end~
    +  def tick_instructions args, text, y = 715
    +** Processing line: ~    return if args.state.key_event_occurred~
     - Inside source: true
     *** True Line Result
    -          end
    -** Processing line: ~        end.to_a~
    +    return if args.state.key_event_occurred
    +** Processing line: ~    if args.inputs.mouse.click ||~
     - Inside source: true
     *** True Line Result
    -        end.to_a
    -** Processing line: ~      end~
    +    if args.inputs.mouse.click ||
    +** Processing line: ~       args.inputs.keyboard.directional_vector ||~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +       args.inputs.keyboard.directional_vector ||
    +** Processing line: ~       args.inputs.keyboard.key_down.enter ||~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      def defaults_queue_square_wave~
    +       args.inputs.keyboard.key_down.enter ||
    +** Processing line: ~       args.inputs.keyboard.key_down.escape~
     - Inside source: true
     *** True Line Result
    -      def defaults_queue_square_wave
    -** Processing line: ~        { frequency: 440, duration: 60, gain: 0.3, fade_out: false, queue_in: 0 }~
    +       args.inputs.keyboard.key_down.escape
    +** Processing line: ~      args.state.key_event_occurred = true~
     - Inside source: true
     *** True Line Result
    -        { frequency: 440, duration: 60, gain: 0.3, fade_out: false, queue_in: 0 }
    -** Processing line: ~      end~
    +      args.state.key_event_occurred = true
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      end
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      def queue_square_wave args, opts = {}~
    +** Processing line: ~    args.outputs.debug << [0, y - 50, 1280, 60].solid~
     - Inside source: true
     *** True Line Result
    -      def queue_square_wave args, opts = {}
    -** Processing line: ~        opts        = defaults_queue_square_wave.merge opts~
    +    args.outputs.debug << [0, y - 50, 1280, 60].solid
    +** Processing line: ~    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label~
     - Inside source: true
     *** True Line Result
    -        opts        = defaults_queue_square_wave.merge opts
    -** Processing line: ~        frequency   = opts[:frequency]~
    +    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label
    +** Processing line: ~    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label~
     - Inside source: true
     *** True Line Result
    -        frequency   = opts[:frequency]
    -** Processing line: ~        sample_rate = 48000~
    +    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -        sample_rate = 48000
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~        square_wave = square_wave_for frequency: frequency, sample_rate: sample_rate~
    -- Inside source: true
    -*** True Line Result
    -        square_wave = square_wave_for frequency: frequency, sample_rate: sample_rate
    -** Processing line: ~        args.state.square_waves[frequency] ||= square_wave_for frequency: frequency, sample_rate: sample_rate~
    -- Inside source: true
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
     *** True Line Result
    -        args.state.square_waves[frequency] ||= square_wave_for frequency: frequency, sample_rate: sample_rate
    +#+end_src
     ** Processing line: ~~
    -- Inside source: true
    +- End of paragraph detected.
     *** True Line Result
     
    -** Processing line: ~        proc = lambda do~
    -- Inside source: true
    -*** True Line Result
    -        proc = lambda do
    -** Processing line: ~          generate_audio_data args.state.square_waves[frequency], sample_rate~
    -- Inside source: true
    +** Processing line: ~*** Input Basics - Controller - main.rb~
    +- Header detected.
     *** True Line Result
    -          generate_audio_data args.state.square_waves[frequency], sample_rate
    -** Processing line: ~        end~
    -- Inside source: true
    +
     *** True Line Result
    -        end
    -** Processing line: ~~
    -- Inside source: true
    +*** Input Basics - Controller - main.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
     *** True Line Result
     
    -** Processing line: ~        audio_state = new_audio_state args, opts~
    -- Inside source: true
     *** True Line Result
    -        audio_state = new_audio_state args, opts
    -** Processing line: ~        audio_state[:input] = [1, sample_rate, proc]~
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/02_input_basics/05_controller/app/main.rb~
     - Inside source: true
     *** True Line Result
    -        audio_state[:input] = [1, sample_rate, proc]
    -** Processing line: ~        queue_audio args, audio_state: audio_state, wave: square_wave~
    +  # ./samples/02_input_basics/05_controller/app/main.rb
    +** Processing line: ~  =begin~
     - Inside source: true
     *** True Line Result
    -        queue_audio args, audio_state: audio_state, wave: square_wave
    -** Processing line: ~      end~
    +  =begin
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +
    +** Processing line: ~   APIs listing that haven't been encountered in previous sample apps:~
     - Inside source: true
     *** True Line Result
    -    end
    +   APIs listing that haven't been encountered in previous sample apps:
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    begin # region: saw tooth wave~
    +** Processing line: ~   - args.inputs.controller_one.key_held.KEY: Will check to see if a specific key~
     - Inside source: true
     *** True Line Result
    -    begin # region: saw tooth wave
    -** Processing line: ~      def defaults_saw_tooth_wave_for~
    +   - args.inputs.controller_one.key_held.KEY: Will check to see if a specific key
    +** Processing line: ~     is being held down on the controller.~
     - Inside source: true
     *** True Line Result
    -      def defaults_saw_tooth_wave_for
    -** Processing line: ~        { frequency: 440, sample_rate: 48000 }~
    +     is being held down on the controller.
    +** Processing line: ~     If there is more than one controller being used, they can be differentiated by~
     - Inside source: true
     *** True Line Result
    -        { frequency: 440, sample_rate: 48000 }
    -** Processing line: ~      end~
    +     If there is more than one controller being used, they can be differentiated by
    +** Processing line: ~     using names like controller_one and controller_two.~
     - Inside source: true
     *** True Line Result
    -      end
    +     using names like controller_one and controller_two.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      def saw_tooth_wave_for opts = {}~
    +** Processing line: ~     For a full listing of buttons, take a look at mygame/documentation/08-controllers.md.~
     - Inside source: true
     *** True Line Result
    -      def saw_tooth_wave_for opts = {}
    -** Processing line: ~        opts = defaults_saw_tooth_wave_for.merge opts~
    +     For a full listing of buttons, take a look at mygame/documentation/08-controllers.md.
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        opts = defaults_saw_tooth_wave_for.merge opts
    -** Processing line: ~        sine_wave = sine_wave_for opts~
    +
    +** Processing line: ~   Reminder:~
     - Inside source: true
     *** True Line Result
    -        sine_wave = sine_wave_for opts
    -** Processing line: ~        period_size = sine_wave.length~
    +   Reminder:
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        period_size = sine_wave.length
    -** Processing line: ~        sine_wave.map_with_index do |v, i|~
    +
    +** Processing line: ~   - args.state.PROPERTY: The state property on args is a dynamic~
     - Inside source: true
     *** True Line Result
    -        sine_wave.map_with_index do |v, i|
    -** Processing line: ~          (((i % period_size).fdiv period_size) * 2) - 1~
    +   - args.state.PROPERTY: The state property on args is a dynamic
    +** Processing line: ~     structure. You can define ANY property here with ANY type of~
     - Inside source: true
     *** True Line Result
    -          (((i % period_size).fdiv period_size) * 2) - 1
    -** Processing line: ~        end~
    +     structure. You can define ANY property here with ANY type of
    +** Processing line: ~     arbitrary nesting. Properties defined on args.state will be retained~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~      end~
    +     arbitrary nesting. Properties defined on args.state will be retained
    +** Processing line: ~     across frames. If you attempt to access a property that doesn't exist~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +     across frames. If you attempt to access a property that doesn't exist
    +** Processing line: ~     on args.state, it will simply return nil (no exception will be thrown).~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      def defaults_queue_saw_tooth_wave~
    +     on args.state, it will simply return nil (no exception will be thrown).
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      def defaults_queue_saw_tooth_wave
    -** Processing line: ~        { frequency: 440, duration: 60, gain: 0.3, fade_out: false, queue_in: 0 }~
    +
    +** Processing line: ~     In this sample app, args.state.BUTTONS is an array that stores the buttons of the controller.~
     - Inside source: true
     *** True Line Result
    -        { frequency: 440, duration: 60, gain: 0.3, fade_out: false, queue_in: 0 }
    -** Processing line: ~      end~
    +     In this sample app, args.state.BUTTONS is an array that stores the buttons of the controller.
    +** Processing line: ~     The parameters of a button are:~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +     The parameters of a button are:
    +** Processing line: ~     1. the position (x, y)~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      def queue_saw_tooth_wave args, opts = {}~
    +     1. the position (x, y)
    +** Processing line: ~     2. the input key held on the controller~
     - Inside source: true
     *** True Line Result
    -      def queue_saw_tooth_wave args, opts = {}
    -** Processing line: ~        opts        = defaults_queue_saw_tooth_wave.merge opts~
    +     2. the input key held on the controller
    +** Processing line: ~     3. the text or name of the button~
     - Inside source: true
     *** True Line Result
    -        opts        = defaults_queue_saw_tooth_wave.merge opts
    -** Processing line: ~        frequency   = opts[:frequency]~
    +     3. the text or name of the button
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        frequency   = opts[:frequency]
    -** Processing line: ~        sample_rate = 48000~
    +
    +** Processing line: ~  =end~
     - Inside source: true
     *** True Line Result
    -        sample_rate = 48000
    +  =end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~        saw_tooth_wave = saw_tooth_wave_for frequency: frequency, sample_rate: sample_rate~
    +** Processing line: ~  # This sample app provides a visual demonstration of a standard controller, including~
     - Inside source: true
     *** True Line Result
    -        saw_tooth_wave = saw_tooth_wave_for frequency: frequency, sample_rate: sample_rate
    -** Processing line: ~        args.state.saw_tooth_waves[frequency] ||= saw_tooth_wave_for frequency: frequency, sample_rate: sample_rate~
    +  # This sample app provides a visual demonstration of a standard controller, including
    +** Processing line: ~  # the placement and function of all buttons.~
     - Inside source: true
     *** True Line Result
    -        args.state.saw_tooth_waves[frequency] ||= saw_tooth_wave_for frequency: frequency, sample_rate: sample_rate
    +  # the placement and function of all buttons.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~        proc = lambda do~
    -- Inside source: true
    -*** True Line Result
    -        proc = lambda do
    -** Processing line: ~          generate_audio_data args.state.saw_tooth_waves[frequency], sample_rate~
    +** Processing line: ~  class ControllerDemo~
     - Inside source: true
     *** True Line Result
    -          generate_audio_data args.state.saw_tooth_waves[frequency], sample_rate
    -** Processing line: ~        end~
    +  class ControllerDemo
    +** Processing line: ~    attr_accessor :inputs, :state, :outputs~
     - Inside source: true
     *** True Line Result
    -        end
    +    attr_accessor :inputs, :state, :outputs
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~        audio_state = new_audio_state args, opts~
    +** Processing line: ~    # Calls the methods necessary for the app to run successfully.~
     - Inside source: true
     *** True Line Result
    -        audio_state = new_audio_state args, opts
    -** Processing line: ~        audio_state[:input] = [1, sample_rate, proc]~
    +    # Calls the methods necessary for the app to run successfully.
    +** Processing line: ~    def tick~
     - Inside source: true
     *** True Line Result
    -        audio_state[:input] = [1, sample_rate, proc]
    -** Processing line: ~        queue_audio args, audio_state: audio_state, wave: saw_tooth_wave~
    +    def tick
    +** Processing line: ~      process_inputs~
     - Inside source: true
     *** True Line Result
    -        queue_audio args, audio_state: audio_state, wave: saw_tooth_wave
    -** Processing line: ~      end~
    +      process_inputs
    +** Processing line: ~      render~
     - Inside source: true
     *** True Line Result
    -      end
    +      render
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -16136,186 +16615,182 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    begin # region: triangle wave~
    +** Processing line: ~    # Starts with an empty collection of buttons.~
     - Inside source: true
     *** True Line Result
    -    begin # region: triangle wave
    -** Processing line: ~      def defaults_triangle_wave_for~
    +    # Starts with an empty collection of buttons.
    +** Processing line: ~    # Adds buttons that are on the controller to the collection.~
     - Inside source: true
     *** True Line Result
    -      def defaults_triangle_wave_for
    -** Processing line: ~        { frequency: 440, sample_rate: 48000 }~
    +    # Adds buttons that are on the controller to the collection.
    +** Processing line: ~    def process_inputs~
     - Inside source: true
     *** True Line Result
    -        { frequency: 440, sample_rate: 48000 }
    -** Processing line: ~      end~
    +    def process_inputs
    +** Processing line: ~      state.buttons = []~
     - Inside source: true
     *** True Line Result
    -      end
    +      state.buttons = []
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      def triangle_wave_for opts = {}~
    +** Processing line: ~      state.buttons << { x: 100,  y: 500, active: inputs.controller_one.key_held.l1, text: "L1"}~
     - Inside source: true
     *** True Line Result
    -      def triangle_wave_for opts = {}
    -** Processing line: ~        opts = defaults_saw_tooth_wave_for.merge opts~
    +      state.buttons << { x: 100,  y: 500, active: inputs.controller_one.key_held.l1, text: "L1"}
    +** Processing line: ~      state.buttons << { x: 100,  y: 600, active: inputs.controller_one.key_held.l2, text: "L2"}~
     - Inside source: true
     *** True Line Result
    -        opts = defaults_saw_tooth_wave_for.merge opts
    -** Processing line: ~        sine_wave = sine_wave_for opts~
    +      state.buttons << { x: 100,  y: 600, active: inputs.controller_one.key_held.l2, text: "L2"}
    +** Processing line: ~      state.buttons << { x: 1100, y: 500, active: inputs.controller_one.key_held.r1, text: "R1"}~
     - Inside source: true
     *** True Line Result
    -        sine_wave = sine_wave_for opts
    -** Processing line: ~        period_size = sine_wave.length~
    +      state.buttons << { x: 1100, y: 500, active: inputs.controller_one.key_held.r1, text: "R1"}
    +** Processing line: ~      state.buttons << { x: 1100, y: 600, active: inputs.controller_one.key_held.r2, text: "R2"}~
     - Inside source: true
     *** True Line Result
    -        period_size = sine_wave.length
    -** Processing line: ~        sine_wave.map_with_index do |v, i|~
    +      state.buttons << { x: 1100, y: 600, active: inputs.controller_one.key_held.r2, text: "R2"}
    +** Processing line: ~      state.buttons << { x: 540,  y: 450, active: inputs.controller_one.key_held.select, text: "Select"}~
     - Inside source: true
     *** True Line Result
    -        sine_wave.map_with_index do |v, i|
    -** Processing line: ~          ratio = (i.fdiv period_size)~
    +      state.buttons << { x: 540,  y: 450, active: inputs.controller_one.key_held.select, text: "Select"}
    +** Processing line: ~      state.buttons << { x: 660,  y: 450, active: inputs.controller_one.key_held.start, text: "Start"}~
     - Inside source: true
     *** True Line Result
    -          ratio = (i.fdiv period_size)
    -** Processing line: ~          if ratio <= 0.5~
    +      state.buttons << { x: 660,  y: 450, active: inputs.controller_one.key_held.start, text: "Start"}
    +** Processing line: ~      state.buttons << { x: 200,  y: 300, active: inputs.controller_one.key_held.left, text: "Left"}~
     - Inside source: true
     *** True Line Result
    -          if ratio <= 0.5
    -** Processing line: ~            (ratio * 4) - 1~
    +      state.buttons << { x: 200,  y: 300, active: inputs.controller_one.key_held.left, text: "Left"}
    +** Processing line: ~      state.buttons << { x: 300,  y: 400, active: inputs.controller_one.key_held.up, text: "Up"}~
     - Inside source: true
     *** True Line Result
    -            (ratio * 4) - 1
    -** Processing line: ~          else~
    +      state.buttons << { x: 300,  y: 400, active: inputs.controller_one.key_held.up, text: "Up"}
    +** Processing line: ~      state.buttons << { x: 400,  y: 300, active: inputs.controller_one.key_held.right, text: "Right"}~
     - Inside source: true
     *** True Line Result
    -          else
    -** Processing line: ~            ratio -= 0.5~
    +      state.buttons << { x: 400,  y: 300, active: inputs.controller_one.key_held.right, text: "Right"}
    +** Processing line: ~      state.buttons << { x: 300,  y: 200, active: inputs.controller_one.key_held.down, text: "Down"}~
     - Inside source: true
     *** True Line Result
    -            ratio -= 0.5
    -** Processing line: ~            1 - (ratio * 4)~
    +      state.buttons << { x: 300,  y: 200, active: inputs.controller_one.key_held.down, text: "Down"}
    +** Processing line: ~      state.buttons << { x: 800,  y: 300, active: inputs.controller_one.key_held.x, text: "X"}~
     - Inside source: true
     *** True Line Result
    -            1 - (ratio * 4)
    -** Processing line: ~          end~
    +      state.buttons << { x: 800,  y: 300, active: inputs.controller_one.key_held.x, text: "X"}
    +** Processing line: ~      state.buttons << { x: 900,  y: 400, active: inputs.controller_one.key_held.y, text: "Y"}~
     - Inside source: true
     *** True Line Result
    -          end
    -** Processing line: ~        end~
    +      state.buttons << { x: 900,  y: 400, active: inputs.controller_one.key_held.y, text: "Y"}
    +** Processing line: ~      state.buttons << { x: 1000, y: 300, active: inputs.controller_one.key_held.a, text: "A"}~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~      end~
    +      state.buttons << { x: 1000, y: 300, active: inputs.controller_one.key_held.a, text: "A"}
    +** Processing line: ~      state.buttons << { x: 900,  y: 200, active: inputs.controller_one.key_held.b, text: "B"}~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +      state.buttons << { x: 900,  y: 200, active: inputs.controller_one.key_held.b, text: "B"}
    +** Processing line: ~      state.buttons << { x: 450 + inputs.controller_one.left_analog_x_perc * 100,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      def defaults_queue_triangle_wave~
    +      state.buttons << { x: 450 + inputs.controller_one.left_analog_x_perc * 100,
    +** Processing line: ~                         y: 100 + inputs.controller_one.left_analog_y_perc * 100,~
     - Inside source: true
     *** True Line Result
    -      def defaults_queue_triangle_wave
    -** Processing line: ~        { frequency: 440, duration: 60, gain: 1.0, fade_out: false, queue_in: 0 }~
    +                         y: 100 + inputs.controller_one.left_analog_y_perc * 100,
    +** Processing line: ~                         active: inputs.controller_one.key_held.l3,~
     - Inside source: true
     *** True Line Result
    -        { frequency: 440, duration: 60, gain: 1.0, fade_out: false, queue_in: 0 }
    -** Processing line: ~      end~
    +                         active: inputs.controller_one.key_held.l3,
    +** Processing line: ~                         text: "L3" }~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +                         text: "L3" }
    +** Processing line: ~      state.buttons << { x: 750 + inputs.controller_one.right_analog_x_perc * 100,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      def queue_triangle_wave args, opts = {}~
    +      state.buttons << { x: 750 + inputs.controller_one.right_analog_x_perc * 100,
    +** Processing line: ~                         y: 100 + inputs.controller_one.right_analog_y_perc * 100,~
     - Inside source: true
     *** True Line Result
    -      def queue_triangle_wave args, opts = {}
    -** Processing line: ~        opts        = defaults_queue_triangle_wave.merge opts~
    +                         y: 100 + inputs.controller_one.right_analog_y_perc * 100,
    +** Processing line: ~                         active: inputs.controller_one.key_held.r3,~
     - Inside source: true
     *** True Line Result
    -        opts        = defaults_queue_triangle_wave.merge opts
    -** Processing line: ~        frequency   = opts[:frequency]~
    +                         active: inputs.controller_one.key_held.r3,
    +** Processing line: ~                         text: "R3" }~
     - Inside source: true
     *** True Line Result
    -        frequency   = opts[:frequency]
    -** Processing line: ~        sample_rate = 48000~
    +                         text: "R3" }
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -        sample_rate = 48000
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~        triangle_wave = triangle_wave_for frequency: frequency, sample_rate: sample_rate~
    +** Processing line: ~    # Gives each button a square shape.~
     - Inside source: true
     *** True Line Result
    -        triangle_wave = triangle_wave_for frequency: frequency, sample_rate: sample_rate
    -** Processing line: ~        args.state.triangle_waves[frequency] ||= triangle_wave_for frequency: frequency, sample_rate: sample_rate~
    +    # Gives each button a square shape.
    +** Processing line: ~    # If the button is being pressed or held (which means it is considered active),~
     - Inside source: true
     *** True Line Result
    -        args.state.triangle_waves[frequency] ||= triangle_wave_for frequency: frequency, sample_rate: sample_rate
    -** Processing line: ~~
    +    # If the button is being pressed or held (which means it is considered active),
    +** Processing line: ~    # the square is filled in. Otherwise, the button simply has a border.~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~        proc = lambda do~
    +    # the square is filled in. Otherwise, the button simply has a border.
    +** Processing line: ~    def render~
     - Inside source: true
     *** True Line Result
    -        proc = lambda do
    -** Processing line: ~          generate_audio_data args.state.triangle_waves[frequency], sample_rate~
    +    def render
    +** Processing line: ~      state.buttons.each do |b|~
     - Inside source: true
     *** True Line Result
    -          generate_audio_data args.state.triangle_waves[frequency], sample_rate
    -** Processing line: ~        end~
    +      state.buttons.each do |b|
    +** Processing line: ~        rect = { x: b.x, y: b.y, w: 75, h: 75 }~
     - Inside source: true
     *** True Line Result
    -        end
    +        rect = { x: b.x, y: b.y, w: 75, h: 75 }
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~        audio_state = new_audio_state args, opts~
    +** Processing line: ~        if b.active # if button is pressed~
     - Inside source: true
     *** True Line Result
    -        audio_state = new_audio_state args, opts
    -** Processing line: ~        audio_state[:input] = [1, sample_rate, proc]~
    +        if b.active # if button is pressed
    +** Processing line: ~          outputs.solids << rect # rect is output as solid (filled in)~
     - Inside source: true
     *** True Line Result
    -        audio_state[:input] = [1, sample_rate, proc]
    -** Processing line: ~        queue_audio args, audio_state: audio_state, wave: triangle_wave~
    +          outputs.solids << rect # rect is output as solid (filled in)
    +** Processing line: ~        else~
     - Inside source: true
     *** True Line Result
    -        queue_audio args, audio_state: audio_state, wave: triangle_wave
    -** Processing line: ~      end~
    +        else
    +** Processing line: ~          outputs.borders << rect # otherwise, output as border~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +          outputs.borders << rect # otherwise, output as border
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -    end
    +        end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    begin # region: bell~
    -- Inside source: true
    -*** True Line Result
    -    begin # region: bell
    -** Processing line: ~      def defaults_queue_bell~
    +** Processing line: ~        # Outputs the text of each button using labels.~
     - Inside source: true
     *** True Line Result
    -      def defaults_queue_bell
    -** Processing line: ~        { frequency: 440, duration: 1.seconds, queue_in: 0 }~
    +        # Outputs the text of each button using labels.
    +** Processing line: ~        outputs.labels << { x: b.x, y: b.y + 95, text: b.text } # add 95 to place label above button~
     - Inside source: true
     *** True Line Result
    -        { frequency: 440, duration: 1.seconds, queue_in: 0 }
    +        outputs.labels << { x: b.x, y: b.y + 95, text: b.text } # add 95 to place label above button
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    @@ -16324,134 +16799,122 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      def queue_bell args, opts = {}~
    -- Inside source: true
    -*** True Line Result
    -      def queue_bell args, opts = {}
    -** Processing line: ~        (bell_to_sine_waves (defaults_queue_bell.merge opts)).each { |b| queue_sine_wave args, b }~
    -- Inside source: true
    -*** True Line Result
    -        (bell_to_sine_waves (defaults_queue_bell.merge opts)).each { |b| queue_sine_wave args, b }
    -** Processing line: ~      end~
    -- Inside source: true
    -*** True Line Result
    -      end
    -** Processing line: ~~
    +** Processing line: ~      outputs.labels << { x:  10, y: 60, text: "Left Analog x: #{inputs.controller_one.left_analog_x_raw} (#{inputs.controller_one.left_analog_x_perc * 100}%)" }~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      def bell_harmonics~
    +      outputs.labels << { x:  10, y: 60, text: "Left Analog x: #{inputs.controller_one.left_analog_x_raw} (#{inputs.controller_one.left_analog_x_perc * 100}%)" }
    +** Processing line: ~      outputs.labels << { x:  10, y: 30, text: "Left Analog y: #{inputs.controller_one.left_analog_y_raw} (#{inputs.controller_one.left_analog_y_perc * 100}%)" }~
     - Inside source: true
     *** True Line Result
    -      def bell_harmonics
    -** Processing line: ~        [~
    +      outputs.labels << { x:  10, y: 30, text: "Left Analog y: #{inputs.controller_one.left_analog_y_raw} (#{inputs.controller_one.left_analog_y_perc * 100}%)" }
    +** Processing line: ~      outputs.labels << { x: 900, y: 60, text: "Right Analog x: #{inputs.controller_one.right_analog_x_raw} (#{inputs.controller_one.right_analog_x_perc * 100}%)" }~
     - Inside source: true
     *** True Line Result
    -        [
    -** Processing line: ~          { frequency_ratio: 0.5, duration_ratio: 1.00 },~
    +      outputs.labels << { x: 900, y: 60, text: "Right Analog x: #{inputs.controller_one.right_analog_x_raw} (#{inputs.controller_one.right_analog_x_perc * 100}%)" }
    +** Processing line: ~      outputs.labels << { x: 900, y: 30, text: "Right Analog y: #{inputs.controller_one.right_analog_y_raw} (#{inputs.controller_one.right_analog_y_perc * 100}%)" }~
     - Inside source: true
     *** True Line Result
    -          { frequency_ratio: 0.5, duration_ratio: 1.00 },
    -** Processing line: ~          { frequency_ratio: 1.0, duration_ratio: 0.80 },~
    +      outputs.labels << { x: 900, y: 30, text: "Right Analog y: #{inputs.controller_one.right_analog_y_raw} (#{inputs.controller_one.right_analog_y_perc * 100}%)" }
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -          { frequency_ratio: 1.0, duration_ratio: 0.80 },
    -** Processing line: ~          { frequency_ratio: 2.0, duration_ratio: 0.60 },~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -          { frequency_ratio: 2.0, duration_ratio: 0.60 },
    -** Processing line: ~          { frequency_ratio: 3.0, duration_ratio: 0.40 },~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          { frequency_ratio: 3.0, duration_ratio: 0.40 },
    -** Processing line: ~          { frequency_ratio: 4.2, duration_ratio: 0.25 },~
    +
    +** Processing line: ~  $controller_demo = ControllerDemo.new~
     - Inside source: true
     *** True Line Result
    -          { frequency_ratio: 4.2, duration_ratio: 0.25 },
    -** Processing line: ~          { frequency_ratio: 5.4, duration_ratio: 0.20 },~
    +  $controller_demo = ControllerDemo.new
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          { frequency_ratio: 5.4, duration_ratio: 0.20 },
    -** Processing line: ~          { frequency_ratio: 6.8, duration_ratio: 0.15 }~
    +
    +** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
    -          { frequency_ratio: 6.8, duration_ratio: 0.15 }
    -** Processing line: ~        ]~
    +  def tick args
    +** Processing line: ~    tick_instructions args, "Sample app shows how controller input is handled. You'll need to connect a USB controller."~
     - Inside source: true
     *** True Line Result
    -        ]
    -** Processing line: ~      end~
    +    tick_instructions args, "Sample app shows how controller input is handled. You'll need to connect a USB controller."
    +** Processing line: ~    $controller_demo.inputs = args.inputs~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +    $controller_demo.inputs = args.inputs
    +** Processing line: ~    $controller_demo.state = args.state~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      def defaults_bell_to_sine_waves~
    +    $controller_demo.state = args.state
    +** Processing line: ~    $controller_demo.outputs = args.outputs~
     - Inside source: true
     *** True Line Result
    -      def defaults_bell_to_sine_waves
    -** Processing line: ~        { frequency: 440, duration: 1.seconds, queue_in: 0 }~
    +    $controller_demo.outputs = args.outputs
    +** Processing line: ~    $controller_demo.tick~
     - Inside source: true
     *** True Line Result
    -        { frequency: 440, duration: 1.seconds, queue_in: 0 }
    -** Processing line: ~      end~
    +    $controller_demo.tick
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -      end
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      def bell_to_sine_waves opts = {}~
    +** Processing line: ~  # Resets the app.~
     - Inside source: true
     *** True Line Result
    -      def bell_to_sine_waves opts = {}
    -** Processing line: ~        opts = defaults_bell_to_sine_waves.merge opts~
    +  # Resets the app.
    +** Processing line: ~  def r~
     - Inside source: true
     *** True Line Result
    -        opts = defaults_bell_to_sine_waves.merge opts
    -** Processing line: ~        bell_harmonics.map do |b|~
    +  def r
    +** Processing line: ~    $gtk.reset~
     - Inside source: true
     *** True Line Result
    -        bell_harmonics.map do |b|
    -** Processing line: ~          {~
    +    $gtk.reset
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -          {
    -** Processing line: ~            frequency: opts[:frequency] * b[:frequency_ratio],~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -            frequency: opts[:frequency] * b[:frequency_ratio],
    -** Processing line: ~            duration:  opts[:duration] * b[:duration_ratio],~
    +
    +** Processing line: ~  def tick_instructions args, text, y = 715~
     - Inside source: true
     *** True Line Result
    -            duration:  opts[:duration] * b[:duration_ratio],
    -** Processing line: ~            queue_in:  opts[:queue_in],~
    +  def tick_instructions args, text, y = 715
    +** Processing line: ~    return if args.state.key_event_occurred~
     - Inside source: true
     *** True Line Result
    -            queue_in:  opts[:queue_in],
    -** Processing line: ~            gain:      (1.fdiv bell_harmonics.length),~
    +    return if args.state.key_event_occurred
    +** Processing line: ~    if args.inputs.mouse.click ||~
     - Inside source: true
     *** True Line Result
    -            gain:      (1.fdiv bell_harmonics.length),
    -** Processing line: ~            fade_out:  true~
    +    if args.inputs.mouse.click ||
    +** Processing line: ~       args.inputs.keyboard.directional_vector ||~
     - Inside source: true
     *** True Line Result
    -            fade_out:  true
    -** Processing line: ~          }~
    +       args.inputs.keyboard.directional_vector ||
    +** Processing line: ~       args.inputs.keyboard.key_down.enter ||~
     - Inside source: true
     *** True Line Result
    -          }
    -** Processing line: ~        end~
    +       args.inputs.keyboard.key_down.enter ||
    +** Processing line: ~       args.inputs.keyboard.key_down.escape~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~      end~
    +       args.inputs.keyboard.key_down.escape
    +** Processing line: ~      args.state.key_event_occurred = true~
     - Inside source: true
     *** True Line Result
    -      end
    +      args.state.key_event_occurred = true
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -16460,758 +16923,722 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    begin # audio entity construction~
    +** Processing line: ~    args.outputs.debug << [0, y - 50, 1280, 60].solid~
     - Inside source: true
     *** True Line Result
    -    begin # audio entity construction
    -** Processing line: ~      def generate_audio_data sine_wave, sample_rate~
    +    args.outputs.debug << [0, y - 50, 1280, 60].solid
    +** Processing line: ~    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label~
     - Inside source: true
     *** True Line Result
    -      def generate_audio_data sine_wave, sample_rate
    -** Processing line: ~        sample_size = (sample_rate.fdiv (1000.fdiv 60)).ceil~
    +    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label
    +** Processing line: ~    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label~
     - Inside source: true
     *** True Line Result
    -        sample_size = (sample_rate.fdiv (1000.fdiv 60)).ceil
    -** Processing line: ~        copy_count  = (sample_size.fdiv sine_wave.length).ceil~
    +    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -        copy_count  = (sample_size.fdiv sine_wave.length).ceil
    -** Processing line: ~        sine_wave * copy_count~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        sine_wave * copy_count
    -** Processing line: ~      end~
    -- Inside source: true
    +
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
     *** True Line Result
    -      end
    +#+end_src
     ** Processing line: ~~
    -- Inside source: true
    +- End of paragraph detected.
     *** True Line Result
     
    -** Processing line: ~      def defaults_new_audio_state~
    -- Inside source: true
    -*** True Line Result
    -      def defaults_new_audio_state
    -** Processing line: ~        { frequency: 440, duration: 60, gain: 1.0, fade_out: false, queue_in: 0 }~
    -- Inside source: true
    +** Processing line: ~*** Input Basics - Touch - main.rb~
    +- Header detected.
     *** True Line Result
    -        { frequency: 440, duration: 60, gain: 1.0, fade_out: false, queue_in: 0 }
    -** Processing line: ~      end~
    -- Inside source: true
    +
     *** True Line Result
    -      end
    -** Processing line: ~~
    -- Inside source: true
    +*** Input Basics - Touch - main.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
     *** True Line Result
     
    -** Processing line: ~      def new_audio_state args, opts = {}~
    -- Inside source: true
    -*** True Line Result
    -      def new_audio_state args, opts = {}
    -** Processing line: ~        opts        = defaults_new_audio_state.merge opts~
    -- Inside source: true
     *** True Line Result
    -        opts        = defaults_new_audio_state.merge opts
    -** Processing line: ~        decay_rate  = 0~
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/02_input_basics/06_touch/app/main.rb~
     - Inside source: true
     *** True Line Result
    -        decay_rate  = 0
    -** Processing line: ~        decay_rate  = 1.fdiv(opts[:duration]) * opts[:gain] if opts[:fade_out]~
    +  # ./samples/02_input_basics/06_touch/app/main.rb
    +** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
    -        decay_rate  = 1.fdiv(opts[:duration]) * opts[:gain] if opts[:fade_out]
    -** Processing line: ~        frequency   = opts[:frequency]~
    +  def tick args
    +** Processing line: ~    args.outputs.background_color = [ 0, 0, 0 ]~
     - Inside source: true
     *** True Line Result
    -        frequency   = opts[:frequency]
    -** Processing line: ~        sample_rate = 48000~
    +    args.outputs.background_color = [ 0, 0, 0 ]
    +** Processing line: ~    args.outputs.primitives << [640, 700, "Touch your screen.", 5, 1, 255, 255, 255].label~
     - Inside source: true
     *** True Line Result
    -        sample_rate = 48000
    +    args.outputs.primitives << [640, 700, "Touch your screen.", 5, 1, 255, 255, 255].label
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~        {~
    +** Processing line: ~    # If you don't want to get fancy, you can just look for finger_one~
     - Inside source: true
     *** True Line Result
    -        {
    -** Processing line: ~          id:               (new_id! args),~
    +    # If you don't want to get fancy, you can just look for finger_one
    +** Processing line: ~    #  (and _two, if you like), which are assigned in the order new touches hit~
     - Inside source: true
     *** True Line Result
    -          id:               (new_id! args),
    -** Processing line: ~          frequency:        frequency,~
    +    #  (and _two, if you like), which are assigned in the order new touches hit
    +** Processing line: ~    #  the screen. If not nil, they are touching right now, and are just~
     - Inside source: true
     *** True Line Result
    -          frequency:        frequency,
    -** Processing line: ~          sample_rate:      48000,~
    +    #  the screen. If not nil, they are touching right now, and are just
    +** Processing line: ~    #  references to specific items in the args.input.touch hash.~
     - Inside source: true
     *** True Line Result
    -          sample_rate:      48000,
    -** Processing line: ~          stop_at:          args.tick_count + opts[:queue_in] + opts[:duration],~
    -- Inside source: true
    -*** True Line Result
    -          stop_at:          args.tick_count + opts[:queue_in] + opts[:duration],
    -** Processing line: ~          gain:             opts[:gain].to_f,~
    -- Inside source: true
    -*** True Line Result
    -          gain:             opts[:gain].to_f,
    -** Processing line: ~          queue_at:         args.state.tick_count + opts[:queue_in],~
    -- Inside source: true
    -*** True Line Result
    -          queue_at:         args.state.tick_count + opts[:queue_in],
    -** Processing line: ~          decay_rate:       decay_rate,~
    -- Inside source: true
    -*** True Line Result
    -          decay_rate:       decay_rate,
    -** Processing line: ~          pitch:            1.0,~
    -- Inside source: true
    -*** True Line Result
    -          pitch:            1.0,
    -** Processing line: ~          looping:          true,~
    -- Inside source: true
    -*** True Line Result
    -          looping:          true,
    -** Processing line: ~          paused:           false~
    -- Inside source: true
    -*** True Line Result
    -          paused:           false
    -** Processing line: ~        }~
    +    #  references to specific items in the args.input.touch hash.
    +** Processing line: ~    # If finger_one lifts off, it will become nil, but finger_two, if it was~
     - Inside source: true
     *** True Line Result
    -        }
    -** Processing line: ~      end~
    +    # If finger_one lifts off, it will become nil, but finger_two, if it was
    +** Processing line: ~    #  touching, remains until it also lifts off. When all fingers lift off, the~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +    #  touching, remains until it also lifts off. When all fingers lift off, the
    +** Processing line: ~    #  the next new touch will be finger_one again, but until then, new touches~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      def queue_audio args, opts = {}~
    +    #  the next new touch will be finger_one again, but until then, new touches
    +** Processing line: ~    #  don't fill in earlier slots.~
     - Inside source: true
     *** True Line Result
    -      def queue_audio args, opts = {}
    -** Processing line: ~        graph_wave args, opts[:wave], opts[:audio_state][:frequency]~
    +    #  don't fill in earlier slots.
    +** Processing line: ~    if !args.inputs.finger_one.nil?~
     - Inside source: true
     *** True Line Result
    -        graph_wave args, opts[:wave], opts[:audio_state][:frequency]
    -** Processing line: ~        args.state.audio_queue << opts[:audio_state]~
    +    if !args.inputs.finger_one.nil?
    +** Processing line: ~      args.outputs.primitives << { x: 640, y: 650, text: "Finger #1 is touching at (#{args.inputs.finger_one.x}, #{args.inputs.finger_one.y}).",~
     - Inside source: true
     *** True Line Result
    -        args.state.audio_queue << opts[:audio_state]
    -** Processing line: ~      end~
    +      args.outputs.primitives << { x: 640, y: 650, text: "Finger #1 is touching at (#{args.inputs.finger_one.x}, #{args.inputs.finger_one.y}).",
    +** Processing line: ~                                   size_enum: 5, alignment_enum: 1, r: 255, g: 255, b: 255 }.label!~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +                                   size_enum: 5, alignment_enum: 1, r: 255, g: 255, b: 255 }.label!
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      def new_id! args~
    +    end
    +** Processing line: ~    if !args.inputs.finger_two.nil?~
     - Inside source: true
     *** True Line Result
    -      def new_id! args
    -** Processing line: ~        args.state.audio_id ||= 0~
    +    if !args.inputs.finger_two.nil?
    +** Processing line: ~      args.outputs.primitives << { x: 640, y: 600, text: "Finger #2 is touching at (#{args.inputs.finger_two.x}, #{args.inputs.finger_two.y}).",~
     - Inside source: true
     *** True Line Result
    -        args.state.audio_id ||= 0
    -** Processing line: ~        args.state.audio_id  += 1~
    +      args.outputs.primitives << { x: 640, y: 600, text: "Finger #2 is touching at (#{args.inputs.finger_two.x}, #{args.inputs.finger_two.y}).",
    +** Processing line: ~                                   size_enum: 5, alignment_enum: 1, r: 255, g: 255, b: 255 }.label!~
     - Inside source: true
     *** True Line Result
    -        args.state.audio_id  += 1
    -** Processing line: ~      end~
    +                                   size_enum: 5, alignment_enum: 1, r: 255, g: 255, b: 255 }.label!
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      end
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      def graph_wave args, wave, frequency~
    +** Processing line: ~    # Here's the more flexible interface: this will report as many simultaneous~
     - Inside source: true
     *** True Line Result
    -      def graph_wave args, wave, frequency
    -** Processing line: ~        if args.state.tick_count != args.state.graphed_at~
    +    # Here's the more flexible interface: this will report as many simultaneous
    +** Processing line: ~    #  touches as the system can handle, but it's a little more effort to track~
     - Inside source: true
     *** True Line Result
    -        if args.state.tick_count != args.state.graphed_at
    -** Processing line: ~          args.outputs.static_lines.clear~
    +    #  touches as the system can handle, but it's a little more effort to track
    +** Processing line: ~    #  them. Each item in the args.input.touch hash has a unique key (an~
     - Inside source: true
     *** True Line Result
    -          args.outputs.static_lines.clear
    -** Processing line: ~          args.outputs.static_sprites.clear~
    +    #  them. Each item in the args.input.touch hash has a unique key (an
    +** Processing line: ~    #  incrementing integer) that exists until the finger lifts off. You can~
     - Inside source: true
     *** True Line Result
    -          args.outputs.static_sprites.clear
    -** Processing line: ~        end~
    +    #  incrementing integer) that exists until the finger lifts off. You can
    +** Processing line: ~    #  tell which order the touches happened globally by the key value, or~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~~
    +    #  tell which order the touches happened globally by the key value, or
    +** Processing line: ~    #  by the touch[id].touch_order field, which resets to zero each time all~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~        wave = wave~
    +    #  by the touch[id].touch_order field, which resets to zero each time all
    +** Processing line: ~    #  touches have lifted.~
     - Inside source: true
     *** True Line Result
    -        wave = wave
    +    #  touches have lifted.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~        r, g, b = frequency.to_i % 85,~
    +** Processing line: ~    args.state.colors ||= [~
     - Inside source: true
     *** True Line Result
    -        r, g, b = frequency.to_i % 85,
    -** Processing line: ~                  frequency.to_i % 170,~
    +    args.state.colors ||= [
    +** Processing line: ~      0xFF0000, 0x00FF00, 0x1010FF, 0xFFFF00, 0xFF00FF, 0x00FFFF, 0xFFFFFF~
     - Inside source: true
     *** True Line Result
    -                  frequency.to_i % 170,
    -** Processing line: ~                  frequency.to_i % 255~
    +      0xFF0000, 0x00FF00, 0x1010FF, 0xFFFF00, 0xFF00FF, 0x00FFFF, 0xFFFFFF
    +** Processing line: ~    ]~
     - Inside source: true
     *** True Line Result
    -                  frequency.to_i % 255
    +    ]
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~        starting_rect = args.layout.rect(row: 5, col: 13)~
    +** Processing line: ~    size = 100~
     - Inside source: true
     *** True Line Result
    -        starting_rect = args.layout.rect(row: 5, col: 13)
    -** Processing line: ~        x_scale    = 10~
    +    size = 100
    +** Processing line: ~    args.inputs.touch.each { |k,v|~
     - Inside source: true
     *** True Line Result
    -        x_scale    = 10
    -** Processing line: ~        y_scale    = 100~
    +    args.inputs.touch.each { |k,v|
    +** Processing line: ~      color = args.state.colors[v.touch_order % 7]~
     - Inside source: true
     *** True Line Result
    -        y_scale    = 100
    -** Processing line: ~        max_points = 25~
    +      color = args.state.colors[v.touch_order % 7]
    +** Processing line: ~      r = (color & 0xFF0000) >> 16~
     - Inside source: true
     *** True Line Result
    -        max_points = 25
    -** Processing line: ~~
    +      r = (color & 0xFF0000) >> 16
    +** Processing line: ~      g = (color & 0x00FF00) >> 8~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~        points = wave~
    +      g = (color & 0x00FF00) >> 8
    +** Processing line: ~      b = (color & 0x0000FF)~
     - Inside source: true
     *** True Line Result
    -        points = wave
    -** Processing line: ~        if wave.length > max_points~
    +      b = (color & 0x0000FF)
    +** Processing line: ~      args.outputs.primitives << { x: v.x - (size / 2), y: v.y + (size / 2), w: size, h: size, r: r, g: g, b: b, a: 255 }.solid!~
     - Inside source: true
     *** True Line Result
    -        if wave.length > max_points
    -** Processing line: ~          resolution = wave.length.idiv max_points~
    +      args.outputs.primitives << { x: v.x - (size / 2), y: v.y + (size / 2), w: size, h: size, r: r, g: g, b: b, a: 255 }.solid!
    +** Processing line: ~      args.outputs.primitives << { x: v.x, y: v.y + size, text: k.to_s, alignment_enum: 1 }.label!~
     - Inside source: true
     *** True Line Result
    -          resolution = wave.length.idiv max_points
    -** Processing line: ~          points = wave.find_all.with_index { |y, i| (i % resolution == 0) }~
    +      args.outputs.primitives << { x: v.x, y: v.y + size, text: k.to_s, alignment_enum: 1 }.label!
    +** Processing line: ~    }~
     - Inside source: true
     *** True Line Result
    -          points = wave.find_all.with_index { |y, i| (i % resolution == 0) }
    -** Processing line: ~        end~
    +    }
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -        end
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~        args.outputs.static_lines << points.map_with_index do |y, x|~
    -- Inside source: true
    -*** True Line Result
    -        args.outputs.static_lines << points.map_with_index do |y, x|
    -** Processing line: ~          next_y = points[x + 1]~
    -- Inside source: true
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
     *** True Line Result
    -          next_y = points[x + 1]
    +#+end_src
     ** Processing line: ~~
    -- Inside source: true
    +- End of paragraph detected.
     *** True Line Result
     
    -** Processing line: ~          if next_y~
    -- Inside source: true
    +** Processing line: ~*** Rendering Sprites - Animation Using Separate Pngs - main.rb~
    +- Header detected.
     *** True Line Result
    -          if next_y
    -** Processing line: ~            {~
    -- Inside source: true
    +
     *** True Line Result
    -            {
    -** Processing line: ~              x:  starting_rect.x + (x * x_scale),~
    +*** Rendering Sprites - Animation Using Separate Pngs - main.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/03_rendering_sprites/01_animation_using_separate_pngs/app/main.rb~
     - Inside source: true
     *** True Line Result
    -              x:  starting_rect.x + (x * x_scale),
    -** Processing line: ~              y:  starting_rect.y + starting_rect.h.half + y_scale * y,~
    +  # ./samples/03_rendering_sprites/01_animation_using_separate_pngs/app/main.rb
    +** Processing line: ~  =begin~
     - Inside source: true
     *** True Line Result
    -              y:  starting_rect.y + starting_rect.h.half + y_scale * y,
    -** Processing line: ~              x2: starting_rect.x + ((x + 1) * x_scale),~
    +  =begin
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -              x2: starting_rect.x + ((x + 1) * x_scale),
    -** Processing line: ~              y2: starting_rect.y + starting_rect.h.half + y_scale * next_y,~
    +
    +** Processing line: ~   Reminders:~
     - Inside source: true
     *** True Line Result
    -              y2: starting_rect.y + starting_rect.h.half + y_scale * next_y,
    -** Processing line: ~              r:  r,~
    +   Reminders:
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -              r:  r,
    -** Processing line: ~              g:  g,~
    +
    +** Processing line: ~   - String interpolation: Uses #{} syntax; everything between the #{ and the } is evaluated~
     - Inside source: true
     *** True Line Result
    -              g:  g,
    -** Processing line: ~              b:  b~
    +   - String interpolation: Uses #{} syntax; everything between the #{ and the } is evaluated
    +** Processing line: ~     as Ruby code, and the placeholder is replaced with its corresponding value or result.~
     - Inside source: true
     *** True Line Result
    -              b:  b
    -** Processing line: ~            }~
    +     as Ruby code, and the placeholder is replaced with its corresponding value or result.
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -            }
    -** Processing line: ~          end~
    +
    +** Processing line: ~     In this sample app, we're using string interpolation to iterate through images in the~
     - Inside source: true
     *** True Line Result
    -          end
    -** Processing line: ~        end~
    +     In this sample app, we're using string interpolation to iterate through images in the
    +** Processing line: ~     sprites folder using their image path names.~
     - Inside source: true
     *** True Line Result
    -        end
    +     sprites folder using their image path names.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~        args.outputs.static_sprites << points.map_with_index do |y, x|~
    +** Processing line: ~   - args.outputs.sprites: An array. Values in this array generate sprites on the screen.~
     - Inside source: true
     *** True Line Result
    -        args.outputs.static_sprites << points.map_with_index do |y, x|
    -** Processing line: ~          {~
    +   - args.outputs.sprites: An array. Values in this array generate sprites on the screen.
    +** Processing line: ~     The parameters are [X, Y, WIDTH, HEIGHT, IMAGE PATH]~
     - Inside source: true
     *** True Line Result
    -          {
    -** Processing line: ~            x:  (starting_rect.x + (x * x_scale)) - 2,~
    +     The parameters are [X, Y, WIDTH, HEIGHT, IMAGE PATH]
    +** Processing line: ~     For more information about sprites, go to mygame/documentation/05-sprites.md.~
     - Inside source: true
     *** True Line Result
    -            x:  (starting_rect.x + (x * x_scale)) - 2,
    -** Processing line: ~            y:  (starting_rect.y + starting_rect.h.half + y_scale * y) - 2,~
    +     For more information about sprites, go to mygame/documentation/05-sprites.md.
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -            y:  (starting_rect.y + starting_rect.h.half + y_scale * y) - 2,
    -** Processing line: ~            w:  4,~
    +
    +** Processing line: ~   - args.outputs.labels: An array. Values in the array generate labels on the screen.~
     - Inside source: true
     *** True Line Result
    -            w:  4,
    -** Processing line: ~            h:  4,~
    +   - args.outputs.labels: An array. Values in the array generate labels on the screen.
    +** Processing line: ~     The parameters are [X, Y, TEXT, SIZE, ALIGNMENT, RED, GREEN, BLUE, ALPHA, FONT STYLE]~
     - Inside source: true
     *** True Line Result
    -            h:  4,
    -** Processing line: ~            path: 'sprites/square-white.png',~
    +     The parameters are [X, Y, TEXT, SIZE, ALIGNMENT, RED, GREEN, BLUE, ALPHA, FONT STYLE]
    +** Processing line: ~     For more information about labels, go to mygame/documentation/02-labels.md.~
     - Inside source: true
     *** True Line Result
    -            path: 'sprites/square-white.png',
    -** Processing line: ~            r: r,~
    +     For more information about labels, go to mygame/documentation/02-labels.md.
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -            r: r,
    -** Processing line: ~            g: g,~
    +
    +** Processing line: ~   - args.inputs.keyboard.key_down.KEY: Determines if a key is in the down state, or pressed.~
     - Inside source: true
     *** True Line Result
    -            g: g,
    -** Processing line: ~            b: b~
    +   - args.inputs.keyboard.key_down.KEY: Determines if a key is in the down state, or pressed.
    +** Processing line: ~     Stores the frame that key was pressed on.~
     - Inside source: true
     *** True Line Result
    -            b: b
    -** Processing line: ~          }~
    +     Stores the frame that key was pressed on.
    +** Processing line: ~     For more information about the keyboard, go to mygame/documentation/06-keyboard.md.~
     - Inside source: true
     *** True Line Result
    -          }
    -** Processing line: ~        end~
    +     For more information about the keyboard, go to mygame/documentation/06-keyboard.md.
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        end
    +
    +** Processing line: ~  =end~
    +- Inside source: true
    +*** True Line Result
    +  =end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~        args.state.graphed_at = args.state.tick_count~
    +** Processing line: ~  # This sample app demonstrates how sprite animations work.~
     - Inside source: true
     *** True Line Result
    -        args.state.graphed_at = args.state.tick_count
    -** Processing line: ~      end~
    +  # This sample app demonstrates how sprite animations work.
    +** Processing line: ~  # There are two sprites that animate forever and one sprite~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +  # There are two sprites that animate forever and one sprite
    +** Processing line: ~  # that *only* animates when you press the "f" key on the keyboard.~
     - Inside source: true
     *** True Line Result
    -    end
    +  # that *only* animates when you press the "f" key on the keyboard.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    begin # region: musical note mapping~
    +** Processing line: ~  # This is the entry point to your game. The `tick` method~
     - Inside source: true
     *** True Line Result
    -    begin # region: musical note mapping
    -** Processing line: ~      def defaults_frequency_for~
    +  # This is the entry point to your game. The `tick` method
    +** Processing line: ~  # executes at 60 frames per second. There are two methods~
     - Inside source: true
     *** True Line Result
    -      def defaults_frequency_for
    -** Processing line: ~        { note: :a, octave: 5, sharp:  false, flat:   false }~
    +  # executes at 60 frames per second. There are two methods
    +** Processing line: ~  # in this tick "entry point": `looping_animation`, and the~
     - Inside source: true
     *** True Line Result
    -        { note: :a, octave: 5, sharp:  false, flat:   false }
    -** Processing line: ~      end~
    +  # in this tick "entry point": `looping_animation`, and the
    +** Processing line: ~  # second method is `one_time_animation`.~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +  # second method is `one_time_animation`.
    +** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      def frequency_for opts = {}~
    +  def tick args
    +** Processing line: ~    # uncomment the line below to see animation play out in slow motion~
     - Inside source: true
     *** True Line Result
    -      def frequency_for opts = {}
    -** Processing line: ~        opts = defaults_frequency_for.merge opts~
    +    # uncomment the line below to see animation play out in slow motion
    +** Processing line: ~    # args.gtk.slowmo! 6~
     - Inside source: true
     *** True Line Result
    -        opts = defaults_frequency_for.merge opts
    -** Processing line: ~        octave_offset_multiplier  = opts[:octave] - 5~
    +    # args.gtk.slowmo! 6
    +** Processing line: ~    looping_animation args~
     - Inside source: true
     *** True Line Result
    -        octave_offset_multiplier  = opts[:octave] - 5
    -** Processing line: ~        note = note_frequencies_octave_5[opts[:note]]~
    +    looping_animation args
    +** Processing line: ~    one_time_animation args~
     - Inside source: true
     *** True Line Result
    -        note = note_frequencies_octave_5[opts[:note]]
    -** Processing line: ~        if octave_offset_multiplier < 0~
    +    one_time_animation args
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -        if octave_offset_multiplier < 0
    -** Processing line: ~          note = note * 1 / (octave_offset_multiplier.abs + 1)~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          note = note * 1 / (octave_offset_multiplier.abs + 1)
    -** Processing line: ~        elsif octave_offset_multiplier > 0~
    +
    +** Processing line: ~  # This function shows how to animate a sprite that loops forever.~
     - Inside source: true
     *** True Line Result
    -        elsif octave_offset_multiplier > 0
    -** Processing line: ~          note = note * (octave_offset_multiplier.abs + 1) / 1~
    +  # This function shows how to animate a sprite that loops forever.
    +** Processing line: ~  def looping_animation args~
     - Inside source: true
     *** True Line Result
    -          note = note * (octave_offset_multiplier.abs + 1) / 1
    -** Processing line: ~        end~
    +  def looping_animation args
    +** Processing line: ~    # Here we define a few local variables that will be sent~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~        note~
    +    # Here we define a few local variables that will be sent
    +** Processing line: ~    # into the magic function that gives us the correct sprite image~
     - Inside source: true
     *** True Line Result
    -        note
    -** Processing line: ~      end~
    +    # into the magic function that gives us the correct sprite image
    +** Processing line: ~    # over time. There are four things we need in order to figure~
     - Inside source: true
     *** True Line Result
    -      end
    +    # over time. There are four things we need in order to figure
    +** Processing line: ~    # out which sprite to show.~
    +- Inside source: true
    +*** True Line Result
    +    # out which sprite to show.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      def note_frequencies_octave_5~
    +** Processing line: ~    # 1. When to start the animation.~
     - Inside source: true
     *** True Line Result
    -      def note_frequencies_octave_5
    -** Processing line: ~        {~
    +    # 1. When to start the animation.
    +** Processing line: ~    start_looping_at = 0~
     - Inside source: true
     *** True Line Result
    -        {
    -** Processing line: ~          a: 440.0,~
    +    start_looping_at = 0
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          a: 440.0,
    -** Processing line: ~          a_sharp: 466.16, b_flat: 466.16,~
    +
    +** Processing line: ~    # 2. The number of pngs that represent the full animation.~
     - Inside source: true
     *** True Line Result
    -          a_sharp: 466.16, b_flat: 466.16,
    -** Processing line: ~          b: 493.88,~
    +    # 2. The number of pngs that represent the full animation.
    +** Processing line: ~    number_of_sprites = 6~
     - Inside source: true
     *** True Line Result
    -          b: 493.88,
    -** Processing line: ~          c: 523.25,~
    +    number_of_sprites = 6
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          c: 523.25,
    -** Processing line: ~          c_sharp: 554.37, d_flat: 587.33,~
    +
    +** Processing line: ~    # 3. How long to show each png.~
     - Inside source: true
     *** True Line Result
    -          c_sharp: 554.37, d_flat: 587.33,
    -** Processing line: ~          d: 587.33,~
    +    # 3. How long to show each png.
    +** Processing line: ~    number_of_frames_to_show_each_sprite = 4~
     - Inside source: true
     *** True Line Result
    -          d: 587.33,
    -** Processing line: ~          d_sharp: 622.25, e_flat: 659.25,~
    +    number_of_frames_to_show_each_sprite = 4
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          d_sharp: 622.25, e_flat: 659.25,
    -** Processing line: ~          e: 659.25,~
    +
    +** Processing line: ~    # 4. Whether the animation should loop once, or forever.~
     - Inside source: true
     *** True Line Result
    -          e: 659.25,
    -** Processing line: ~          f: 698.25,~
    +    # 4. Whether the animation should loop once, or forever.
    +** Processing line: ~    does_sprite_loop = true~
     - Inside source: true
     *** True Line Result
    -          f: 698.25,
    -** Processing line: ~          f_sharp: 739.99, g_flat: 739.99,~
    +    does_sprite_loop = true
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          f_sharp: 739.99, g_flat: 739.99,
    -** Processing line: ~          g: 783.99,~
    +
    +** Processing line: ~    # With the variables defined above, we can get a number~
     - Inside source: true
     *** True Line Result
    -          g: 783.99,
    -** Processing line: ~          g_sharp: 830.61, a_flat: 830.61~
    +    # With the variables defined above, we can get a number
    +** Processing line: ~    # which represents the sprite to show by calling the `frame_index` function.~
     - Inside source: true
     *** True Line Result
    -          g_sharp: 830.61, a_flat: 830.61
    -** Processing line: ~        }~
    +    # which represents the sprite to show by calling the `frame_index` function.
    +** Processing line: ~    # In this case the number will be between 0, and 5 (you can see the sprites~
     - Inside source: true
     *** True Line Result
    -        }
    -** Processing line: ~      end~
    +    # In this case the number will be between 0, and 5 (you can see the sprites
    +** Processing line: ~    # in the ./sprites directory).~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +    # in the ./sprites directory).
    +** Processing line: ~    sprite_index = start_looping_at.frame_index number_of_sprites,~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~  end~
    +    sprite_index = start_looping_at.frame_index number_of_sprites,
    +** Processing line: ~                                                number_of_frames_to_show_each_sprite,~
     - Inside source: true
     *** True Line Result
    -  end
    +                                                number_of_frames_to_show_each_sprite,
    +** Processing line: ~                                                does_sprite_loop~
    +- Inside source: true
    +*** True Line Result
    +                                                does_sprite_loop
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  $gtk.reset~
    +** Processing line: ~    # Now that we have `sprite_index, we can present the correct file.~
     - Inside source: true
     *** True Line Result
    -  $gtk.reset
    -** Processing line: ~~
    +    # Now that we have `sprite_index, we can present the correct file.
    +** Processing line: ~    args.outputs.sprites << { x: 100, y: 100, w: 100, h: 100, path: "sprites/dragon_fly_#{sprite_index}.png" }~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~#+end_src~
    -- Line was identified as the end of a code block.
    -*** True Line Result
    -#+end_src
    +    args.outputs.sprites << { x: 100, y: 100, w: 100, h: 100, path: "sprites/dragon_fly_#{sprite_index}.png" }
     ** Processing line: ~~
    -- End of paragraph detected.
    -*** True Line Result
    -
    -** Processing line: ~*** Input Basics - Keyboard - main.rb~
    -- Header detected.
    -*** True Line Result
    -
    -*** True Line Result
    -*** Input Basics - Keyboard - main.rb
    -** Processing line: ~#+begin_src ruby~
    -- Line was identified as the beginning of a code block.
    +- Inside source: true
     *** True Line Result
     
    +** Processing line: ~    # Try changing the numbers below to see how the animation changes:~
    +- Inside source: true
     *** True Line Result
    -#+begin_src ruby
    -** Processing line: ~  # ./samples/02_input_basics/01_keyboard/app/main.rb~
    +    # Try changing the numbers below to see how the animation changes:
    +** Processing line: ~    args.outputs.sprites << { x: 100, y: 200, w: 100, h: 100, path: "sprites/dragon_fly_#{0.frame_index 6, 4, true}.png" }~
     - Inside source: true
     *** True Line Result
    -  # ./samples/02_input_basics/01_keyboard/app/main.rb
    -** Processing line: ~  =begin~
    +    args.outputs.sprites << { x: 100, y: 200, w: 100, h: 100, path: "sprites/dragon_fly_#{0.frame_index 6, 4, true}.png" }
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -  =begin
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  APIs listing that haven't been encountered in a previous sample apps:~
    -- Inside source: true
    -*** True Line Result
    -  APIs listing that haven't been encountered in a previous sample apps:
    -** Processing line: ~~
    +** Processing line: ~  # This function shows how to animate a sprite that executes~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  - args.inputs.keyboard.key_up.KEY: The value of the properties will be set~
    +  # This function shows how to animate a sprite that executes
    +** Processing line: ~  # only once when the "f" key is pressed.~
     - Inside source: true
     *** True Line Result
    -  - args.inputs.keyboard.key_up.KEY: The value of the properties will be set
    -** Processing line: ~    to the frame  that the key_up event occurred (the frame correlates~
    +  # only once when the "f" key is pressed.
    +** Processing line: ~  def one_time_animation args~
     - Inside source: true
     *** True Line Result
    -    to the frame  that the key_up event occurred (the frame correlates
    -** Processing line: ~    to args.state.tick_count). Otherwise the value will be nil. For a~
    +  def one_time_animation args
    +** Processing line: ~    # This is just a label the shows instructions within the game.~
     - Inside source: true
     *** True Line Result
    -    to args.state.tick_count). Otherwise the value will be nil. For a
    -** Processing line: ~    full listing of keys, take a look at mygame/documentation/06-keyboard.md.~
    +    # This is just a label the shows instructions within the game.
    +** Processing line: ~    args.outputs.labels <<  { x: 220, y: 350, text: "(press f to animate)" }~
     - Inside source: true
     *** True Line Result
    -    full listing of keys, take a look at mygame/documentation/06-keyboard.md.
    -** Processing line: ~  - args.state.PROPERTY: The state property on args is a dynamic~
    +    args.outputs.labels <<  { x: 220, y: 350, text: "(press f to animate)" }
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  - args.state.PROPERTY: The state property on args is a dynamic
    -** Processing line: ~    structure. You can define ANY property here with ANY type of~
    +
    +** Processing line: ~    # If "f" is pressed on the keyboard...~
     - Inside source: true
     *** True Line Result
    -    structure. You can define ANY property here with ANY type of
    -** Processing line: ~    arbitrary nesting. Properties defined on args.state will be retained~
    +    # If "f" is pressed on the keyboard...
    +** Processing line: ~    if args.inputs.keyboard.key_down.f~
     - Inside source: true
     *** True Line Result
    -    arbitrary nesting. Properties defined on args.state will be retained
    -** Processing line: ~    across frames. If you attempt access a property that doesn't exist~
    +    if args.inputs.keyboard.key_down.f
    +** Processing line: ~      # Print the frame that "f" was pressed on.~
     - Inside source: true
     *** True Line Result
    -    across frames. If you attempt access a property that doesn't exist
    -** Processing line: ~    on args.state, it will simply return nil (no exception will be thrown).~
    +      # Print the frame that "f" was pressed on.
    +** Processing line: ~      puts "Hello from main.rb! The \"f\" key was in the down state on frame: #{args.state.tick_count}"~
     - Inside source: true
     *** True Line Result
    -    on args.state, it will simply return nil (no exception will be thrown).
    +      puts "Hello from main.rb! The \"f\" key was in the down state on frame: #{args.state.tick_count}"
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  =end~
    +** Processing line: ~      # And MOST IMPORTANTLY set the point it time to start the animation,~
     - Inside source: true
     *** True Line Result
    -  =end
    -** Processing line: ~~
    +      # And MOST IMPORTANTLY set the point it time to start the animation,
    +** Processing line: ~      # equal to "now" which is represented as args.state.tick_count.~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  # Along with outputs, inputs are also an essential part of video game development~
    +      # equal to "now" which is represented as args.state.tick_count.
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  # Along with outputs, inputs are also an essential part of video game development
    -** Processing line: ~  # DragonRuby can take input from keyboards, mouse, and controllers.~
    +
    +** Processing line: ~      # Also IMPORTANT, you'll notice that the value of when to start looping~
     - Inside source: true
     *** True Line Result
    -  # DragonRuby can take input from keyboards, mouse, and controllers.
    -** Processing line: ~  # This sample app will cover keyboard input.~
    +      # Also IMPORTANT, you'll notice that the value of when to start looping
    +** Processing line: ~      # is stored in `args.state`. This construct's values are retained across~
     - Inside source: true
     *** True Line Result
    -  # This sample app will cover keyboard input.
    -** Processing line: ~~
    +      # is stored in `args.state`. This construct's values are retained across
    +** Processing line: ~      # executions of the `tick` method.~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  # args.inputs.keyboard.key_up.a will check to see if the a key has been pressed~
    +      # executions of the `tick` method.
    +** Processing line: ~      args.state.start_looping_at = args.state.tick_count~
     - Inside source: true
     *** True Line Result
    -  # args.inputs.keyboard.key_up.a will check to see if the a key has been pressed
    -** Processing line: ~  # This will work with the other keys as well~
    +      args.state.start_looping_at = args.state.tick_count
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  # This will work with the other keys as well
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~~
    +** Processing line: ~    # These are the same local variables that were defined~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def tick args~
    +    # These are the same local variables that were defined
    +** Processing line: ~    # for the `looping_animation` function.~
     - Inside source: true
     *** True Line Result
    -  def tick args
    -** Processing line: ~    tick_instructions args, "Sample app shows how keyboard events are registered and accessed.", 360~
    +    # for the `looping_animation` function.
    +** Processing line: ~    number_of_sprites = 6~
     - Inside source: true
     *** True Line Result
    -    tick_instructions args, "Sample app shows how keyboard events are registered and accessed.", 360
    -** Processing line: ~    # Notice how small_font accounts for all the remaining parameters~
    +    number_of_sprites = 6
    +** Processing line: ~    number_of_frames_to_show_each_sprite = 4~
     - Inside source: true
     *** True Line Result
    -    # Notice how small_font accounts for all the remaining parameters
    -** Processing line: ~    args.outputs.labels << [460, row_to_px(args, 0), "Current game time: #{args.state.tick_count}", small_font]~
    +    number_of_frames_to_show_each_sprite = 4
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    # Except this sprite does not loop again. If the animation time has passed,~
     - Inside source: true
     *** True Line Result
    -    args.outputs.labels << [460, row_to_px(args, 0), "Current game time: #{args.state.tick_count}", small_font]
    -** Processing line: ~    args.outputs.labels << [460, row_to_px(args, 2), "Keyboard input: args.inputs.keyboard.key_up.h", small_font]~
    +    # Except this sprite does not loop again. If the animation time has passed,
    +** Processing line: ~    # then the frame_index function returns nil.~
     - Inside source: true
     *** True Line Result
    -    args.outputs.labels << [460, row_to_px(args, 2), "Keyboard input: args.inputs.keyboard.key_up.h", small_font]
    -** Processing line: ~    args.outputs.labels << [460, row_to_px(args, 3), "Press \"h\" on the keyboard.", small_font]~
    +    # then the frame_index function returns nil.
    +** Processing line: ~    does_sprite_loop = false~
     - Inside source: true
     *** True Line Result
    -    args.outputs.labels << [460, row_to_px(args, 3), "Press \"h\" on the keyboard.", small_font]
    +    does_sprite_loop = false
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Input on a specifc key can be found through args.inputs.keyboard.key_up followed by the key~
    +** Processing line: ~    sprite_index = args.state~
     - Inside source: true
     *** True Line Result
    -    # Input on a specifc key can be found through args.inputs.keyboard.key_up followed by the key
    -** Processing line: ~    if args.inputs.keyboard.key_up.h~
    +    sprite_index = args.state
    +** Processing line: ~                       .start_looping_at~
     - Inside source: true
     *** True Line Result
    -    if args.inputs.keyboard.key_up.h
    -** Processing line: ~      args.state.h_pressed_at = args.state.tick_count~
    +                       .start_looping_at
    +** Processing line: ~                       .frame_index number_of_sprites,~
     - Inside source: true
     *** True Line Result
    -      args.state.h_pressed_at = args.state.tick_count
    -** Processing line: ~    end~
    +                       .frame_index number_of_sprites,
    +** Processing line: ~                                    number_of_frames_to_show_each_sprite,~
     - Inside source: true
     *** True Line Result
    -    end
    +                                    number_of_frames_to_show_each_sprite,
    +** Processing line: ~                                    does_sprite_loop~
    +- Inside source: true
    +*** True Line Result
    +                                    does_sprite_loop
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # This code simplifies to if args.state.h_pressed_at has not been initialized, set it to false~
    +** Processing line: ~    # This line sets the frame index to zero, if~
     - Inside source: true
     *** True Line Result
    -    # This code simplifies to if args.state.h_pressed_at has not been initialized, set it to false
    -** Processing line: ~    args.state.h_pressed_at ||= false~
    +    # This line sets the frame index to zero, if
    +** Processing line: ~    # the animation duration has passed (frame_index returned nil).~
     - Inside source: true
     *** True Line Result
    -    args.state.h_pressed_at ||= false
    +    # the animation duration has passed (frame_index returned nil).
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    if args.state.h_pressed_at~
    +** Processing line: ~    # Remeber: we are not looping forever here.~
     - Inside source: true
     *** True Line Result
    -    if args.state.h_pressed_at
    -** Processing line: ~      args.outputs.labels << [460, row_to_px(args, 4), "\"h\" was pressed at time: #{args.state.h_pressed_at}", small_font]~
    +    # Remeber: we are not looping forever here.
    +** Processing line: ~    sprite_index ||= 0~
     - Inside source: true
     *** True Line Result
    -      args.outputs.labels << [460, row_to_px(args, 4), "\"h\" was pressed at time: #{args.state.h_pressed_at}", small_font]
    -** Processing line: ~    else~
    +    sprite_index ||= 0
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    else
    -** Processing line: ~      args.outputs.labels << [460, row_to_px(args, 4), "\"h\" has never been pressed.", small_font]~
    +
    +** Processing line: ~    # Present the sprite.~
     - Inside source: true
     *** True Line Result
    -      args.outputs.labels << [460, row_to_px(args, 4), "\"h\" has never been pressed.", small_font]
    -** Processing line: ~    end~
    +    # Present the sprite.
    +** Processing line: ~    args.outputs.sprites << { x: 100, y: 300, w: 100, h: 100, path: "sprites/dragon_fly_#{sprite_index}.png" }~
     - Inside source: true
     *** True Line Result
    -    end
    +    args.outputs.sprites << { x: 100, y: 300, w: 100, h: 100, path: "sprites/dragon_fly_#{sprite_index}.png" }
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    tick_help_text args~
    +** Processing line: ~    tick_instructions args, "Sample app shows how to use Numeric#frame_index and string interpolation to animate a sprite over time."~
     - Inside source: true
     *** True Line Result
    -    tick_help_text args
    +    tick_instructions args, "Sample app shows how to use Numeric#frame_index and string interpolation to animate a sprite over time."
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -17220,58 +17647,54 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def small_font~
    -- Inside source: true
    -*** True Line Result
    -  def small_font
    -** Processing line: ~    # This method provides some values for the construction of labels~
    +** Processing line: ~  def tick_instructions args, text, y = 715~
     - Inside source: true
     *** True Line Result
    -    # This method provides some values for the construction of labels
    -** Processing line: ~    # Specifically, Size, Alignment, & RGBA~
    +  def tick_instructions args, text, y = 715
    +** Processing line: ~    return if args.state.key_event_occurred~
     - Inside source: true
     *** True Line Result
    -    # Specifically, Size, Alignment, & RGBA
    -** Processing line: ~    # This makes it so that custom parameters don't have to be repeatedly typed.~
    +    return if args.state.key_event_occurred
    +** Processing line: ~    if args.inputs.mouse.click ||~
     - Inside source: true
     *** True Line Result
    -    # This makes it so that custom parameters don't have to be repeatedly typed.
    -** Processing line: ~    # Additionally "small_font" provides programmers with more information than some numbers~
    +    if args.inputs.mouse.click ||
    +** Processing line: ~       args.inputs.keyboard.directional_vector ||~
     - Inside source: true
     *** True Line Result
    -    # Additionally "small_font" provides programmers with more information than some numbers
    -** Processing line: ~    [-2, 0, 0, 0, 0, 255]~
    +       args.inputs.keyboard.directional_vector ||
    +** Processing line: ~       args.inputs.keyboard.key_down.enter ||~
     - Inside source: true
     *** True Line Result
    -    [-2, 0, 0, 0, 0, 255]
    -** Processing line: ~  end~
    +       args.inputs.keyboard.key_down.enter ||
    +** Processing line: ~       args.inputs.keyboard.key_down.escape~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +       args.inputs.keyboard.key_down.escape
    +** Processing line: ~      args.state.key_event_occurred = true~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def row_to_px args, row_number~
    +      args.state.key_event_occurred = true
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  def row_to_px args, row_number
    -** Processing line: ~    # This takes a row_number and converts it to pixels DragonRuby understands.~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    # This takes a row_number and converts it to pixels DragonRuby understands.
    -** Processing line: ~    # Row 0 starts 5 units below the top of the grid~
    +
    +** Processing line: ~    args.outputs.debug << [0, y - 50, 1280, 60].solid~
     - Inside source: true
     *** True Line Result
    -    # Row 0 starts 5 units below the top of the grid
    -** Processing line: ~    # Each row afterward is 20 units lower~
    +    args.outputs.debug << [0, y - 50, 1280, 60].solid
    +** Processing line: ~    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label~
     - Inside source: true
     *** True Line Result
    -    # Each row afterward is 20 units lower
    -** Processing line: ~    args.grid.top.shift_down(5).shift_down(20 * row_number)~
    +    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label
    +** Processing line: ~    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label~
     - Inside source: true
     *** True Line Result
    -    args.grid.top.shift_down(5).shift_down(20 * row_number)
    +    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -17280,106 +17703,102 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # Don't worry about understanding the code within this method just yet.~
    -- Inside source: true
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
     *** True Line Result
    -  # Don't worry about understanding the code within this method just yet.
    -** Processing line: ~  # This method shows you the help text within the game.~
    -- Inside source: true
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
     *** True Line Result
    -  # This method shows you the help text within the game.
    -** Processing line: ~  def tick_help_text args~
    -- Inside source: true
    +
    +** Processing line: ~*** Rendering Sprites - Animation Using Sprite Sheet - main.rb~
    +- Header detected.
     *** True Line Result
    -  def tick_help_text args
    -** Processing line: ~    return unless args.state.h_pressed_at~
    -- Inside source: true
    +
     *** True Line Result
    -    return unless args.state.h_pressed_at
    -** Processing line: ~~
    -- Inside source: true
    +*** Rendering Sprites - Animation Using Sprite Sheet - main.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
     *** True Line Result
     
    -** Processing line: ~    args.state.key_value_history      ||= {}~
    -- Inside source: true
     *** True Line Result
    -    args.state.key_value_history      ||= {}
    -** Processing line: ~    args.state.key_down_value_history ||= {}~
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/03_rendering_sprites/02_animation_using_sprite_sheet/app/main.rb~
     - Inside source: true
     *** True Line Result
    -    args.state.key_down_value_history ||= {}
    -** Processing line: ~    args.state.key_held_value_history ||= {}~
    +  # ./samples/03_rendering_sprites/02_animation_using_sprite_sheet/app/main.rb
    +** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
    -    args.state.key_held_value_history ||= {}
    -** Processing line: ~    args.state.key_up_value_history   ||= {}~
    +  def tick args
    +** Processing line: ~    args.state.player.x ||= 100~
     - Inside source: true
     *** True Line Result
    -    args.state.key_up_value_history   ||= {}
    -** Processing line: ~~
    +    args.state.player.x ||= 100
    +** Processing line: ~    args.state.player.y ||= 100~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    if (args.inputs.keyboard.key_down.truthy_keys.length > 0 ||~
    +    args.state.player.y ||= 100
    +** Processing line: ~    args.state.player.w ||= 64~
     - Inside source: true
     *** True Line Result
    -    if (args.inputs.keyboard.key_down.truthy_keys.length > 0 ||
    -** Processing line: ~        args.inputs.keyboard.key_held.truthy_keys.length > 0 ||~
    +    args.state.player.w ||= 64
    +** Processing line: ~    args.state.player.h ||= 64~
     - Inside source: true
     *** True Line Result
    -        args.inputs.keyboard.key_held.truthy_keys.length > 0 ||
    -** Processing line: ~        args.inputs.keyboard.key_up.truthy_keys.length > 0)~
    +    args.state.player.h ||= 64
    +** Processing line: ~    args.state.player.direction ||= 1~
     - Inside source: true
     *** True Line Result
    -        args.inputs.keyboard.key_up.truthy_keys.length > 0)
    -** Processing line: ~      args.state.help_available = true~
    +    args.state.player.direction ||= 1
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      args.state.help_available = true
    -** Processing line: ~      args.state.no_activity_debounce = nil~
    +
    +** Processing line: ~    args.state.player.is_moving = false~
     - Inside source: true
     *** True Line Result
    -      args.state.no_activity_debounce = nil
    -** Processing line: ~    else~
    +    args.state.player.is_moving = false
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    else
    -** Processing line: ~      args.state.no_activity_debounce ||= 5.seconds~
    +
    +** Processing line: ~    # get the keyboard input and set player properties~
     - Inside source: true
     *** True Line Result
    -      args.state.no_activity_debounce ||= 5.seconds
    -** Processing line: ~      args.state.no_activity_debounce -= 1~
    +    # get the keyboard input and set player properties
    +** Processing line: ~    if args.inputs.keyboard.right~
     - Inside source: true
     *** True Line Result
    -      args.state.no_activity_debounce -= 1
    -** Processing line: ~      if args.state.no_activity_debounce <= 0~
    +    if args.inputs.keyboard.right
    +** Processing line: ~      args.state.player.x += 3~
     - Inside source: true
     *** True Line Result
    -      if args.state.no_activity_debounce <= 0
    -** Processing line: ~        args.state.help_available = false~
    +      args.state.player.x += 3
    +** Processing line: ~      args.state.player.direction = 1~
     - Inside source: true
     *** True Line Result
    -        args.state.help_available = false
    -** Processing line: ~        args.state.key_value_history        = {}~
    +      args.state.player.direction = 1
    +** Processing line: ~      args.state.player.started_running_at ||= args.state.tick_count~
     - Inside source: true
     *** True Line Result
    -        args.state.key_value_history        = {}
    -** Processing line: ~        args.state.key_down_value_history   = {}~
    +      args.state.player.started_running_at ||= args.state.tick_count
    +** Processing line: ~    elsif args.inputs.keyboard.left~
     - Inside source: true
     *** True Line Result
    -        args.state.key_down_value_history   = {}
    -** Processing line: ~        args.state.key_held_value_history   = {}~
    +    elsif args.inputs.keyboard.left
    +** Processing line: ~      args.state.player.x -= 3~
     - Inside source: true
     *** True Line Result
    -        args.state.key_held_value_history   = {}
    -** Processing line: ~        args.state.key_up_value_history     = {}~
    +      args.state.player.x -= 3
    +** Processing line: ~      args.state.player.direction = -1~
     - Inside source: true
     *** True Line Result
    -        args.state.key_up_value_history     = {}
    -** Processing line: ~      end~
    +      args.state.player.direction = -1
    +** Processing line: ~      args.state.player.started_running_at ||= args.state.tick_count~
     - Inside source: true
     *** True Line Result
    -      end
    +      args.state.player.started_running_at ||= args.state.tick_count
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -17388,26 +17807,30 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    args.outputs.labels << [10, row_to_px(args, 6), "Advanced Help:", small_font]~
    +** Processing line: ~    if args.inputs.keyboard.up~
     - Inside source: true
     *** True Line Result
    -    args.outputs.labels << [10, row_to_px(args, 6), "Advanced Help:", small_font]
    -** Processing line: ~~
    +    if args.inputs.keyboard.up
    +** Processing line: ~      args.state.player.y += 1~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    if !args.state.help_available~
    +      args.state.player.y += 1
    +** Processing line: ~      args.state.player.started_running_at ||= args.state.tick_count~
     - Inside source: true
     *** True Line Result
    -    if !args.state.help_available
    -** Processing line: ~      args.outputs.labels << [10, row_to_px(args, 7),  "Press a key and I'll show code to access the key and what value will be returned if you used the code.", small_font]~
    +      args.state.player.started_running_at ||= args.state.tick_count
    +** Processing line: ~    elsif args.inputs.keyboard.down~
     - Inside source: true
     *** True Line Result
    -      args.outputs.labels << [10, row_to_px(args, 7),  "Press a key and I'll show code to access the key and what value will be returned if you used the code.", small_font]
    -** Processing line: ~      return~
    +    elsif args.inputs.keyboard.down
    +** Processing line: ~      args.state.player.y -= 1~
     - Inside source: true
     *** True Line Result
    -      return
    +      args.state.player.y -= 1
    +** Processing line: ~      args.state.player.started_running_at ||= args.state.tick_count~
    +- Inside source: true
    +*** True Line Result
    +      args.state.player.started_running_at ||= args.state.tick_count
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -17416,134 +17839,122 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    args.outputs.labels << [10 , row_to_px(args, 7), "args.inputs.keyboard", small_font]~
    +** Processing line: ~    # if no arrow keys are being pressed, set the player as not moving~
     - Inside source: true
     *** True Line Result
    -    args.outputs.labels << [10 , row_to_px(args, 7), "args.inputs.keyboard", small_font]
    -** Processing line: ~    args.outputs.labels << [330, row_to_px(args, 7), "args.inputs.keyboard.key_down", small_font]~
    +    # if no arrow keys are being pressed, set the player as not moving
    +** Processing line: ~    if !args.inputs.keyboard.directional_vector~
     - Inside source: true
     *** True Line Result
    -    args.outputs.labels << [330, row_to_px(args, 7), "args.inputs.keyboard.key_down", small_font]
    -** Processing line: ~    args.outputs.labels << [650, row_to_px(args, 7), "args.inputs.keyboard.key_held", small_font]~
    +    if !args.inputs.keyboard.directional_vector
    +** Processing line: ~      args.state.player.started_running_at = nil~
     - Inside source: true
     *** True Line Result
    -    args.outputs.labels << [650, row_to_px(args, 7), "args.inputs.keyboard.key_held", small_font]
    -** Processing line: ~    args.outputs.labels << [990, row_to_px(args, 7), "args.inputs.keyboard.key_up", small_font]~
    +      args.state.player.started_running_at = nil
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    args.outputs.labels << [990, row_to_px(args, 7), "args.inputs.keyboard.key_up", small_font]
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    fill_history args, :key_value_history,      :down_or_held, nil~
    -- Inside source: true
    -*** True Line Result
    -    fill_history args, :key_value_history,      :down_or_held, nil
    -** Processing line: ~    fill_history args, :key_down_value_history, :down,        :key_down~
    -- Inside source: true
    -*** True Line Result
    -    fill_history args, :key_down_value_history, :down,        :key_down
    -** Processing line: ~    fill_history args, :key_held_value_history, :held,        :key_held~
    +** Processing line: ~    # wrap player around the stage~
     - Inside source: true
     *** True Line Result
    -    fill_history args, :key_held_value_history, :held,        :key_held
    -** Processing line: ~    fill_history args, :key_up_value_history,   :up,          :key_up~
    +    # wrap player around the stage
    +** Processing line: ~    if args.state.player.x > 1280~
     - Inside source: true
     *** True Line Result
    -    fill_history args, :key_up_value_history,   :up,          :key_up
    -** Processing line: ~~
    +    if args.state.player.x > 1280
    +** Processing line: ~      args.state.player.x = -64~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    render_help_labels args, :key_value_history,      :down_or_held, nil,      10~
    +      args.state.player.x = -64
    +** Processing line: ~      args.state.player.started_running_at ||= args.state.tick_count~
     - Inside source: true
     *** True Line Result
    -    render_help_labels args, :key_value_history,      :down_or_held, nil,      10
    -** Processing line: ~    render_help_labels args, :key_down_value_history, :down,        :key_down, 330~
    +      args.state.player.started_running_at ||= args.state.tick_count
    +** Processing line: ~    elsif args.state.player.x < -64~
     - Inside source: true
     *** True Line Result
    -    render_help_labels args, :key_down_value_history, :down,        :key_down, 330
    -** Processing line: ~    render_help_labels args, :key_held_value_history, :held,        :key_held, 650~
    +    elsif args.state.player.x < -64
    +** Processing line: ~      args.state.player.x = 1280~
     - Inside source: true
     *** True Line Result
    -    render_help_labels args, :key_held_value_history, :held,        :key_held, 650
    -** Processing line: ~    render_help_labels args, :key_up_value_history,   :up,          :key_up,   990~
    +      args.state.player.x = 1280
    +** Processing line: ~      args.state.player.started_running_at ||= args.state.tick_count~
     - Inside source: true
     *** True Line Result
    -    render_help_labels args, :key_up_value_history,   :up,          :key_up,   990
    -** Processing line: ~  end~
    +      args.state.player.started_running_at ||= args.state.tick_count
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  end
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def fill_history args, history_key, state_key, keyboard_method~
    +** Processing line: ~    if args.state.player.y > 720~
     - Inside source: true
     *** True Line Result
    -  def fill_history args, history_key, state_key, keyboard_method
    -** Processing line: ~    fill_single_history args, history_key, state_key, keyboard_method, :raw_key~
    +    if args.state.player.y > 720
    +** Processing line: ~      args.state.player.y = -64~
     - Inside source: true
     *** True Line Result
    -    fill_single_history args, history_key, state_key, keyboard_method, :raw_key
    -** Processing line: ~    fill_single_history args, history_key, state_key, keyboard_method, :char~
    +      args.state.player.y = -64
    +** Processing line: ~      args.state.player.started_running_at ||= args.state.tick_count~
     - Inside source: true
     *** True Line Result
    -    fill_single_history args, history_key, state_key, keyboard_method, :char
    -** Processing line: ~    args.inputs.keyboard.keys[state_key].each do |key_name|~
    +      args.state.player.started_running_at ||= args.state.tick_count
    +** Processing line: ~    elsif args.state.player.y < -64~
     - Inside source: true
     *** True Line Result
    -    args.inputs.keyboard.keys[state_key].each do |key_name|
    -** Processing line: ~      fill_single_history args, history_key, state_key, keyboard_method, key_name~
    +    elsif args.state.player.y < -64
    +** Processing line: ~      args.state.player.y = 720~
     - Inside source: true
     *** True Line Result
    -      fill_single_history args, history_key, state_key, keyboard_method, key_name
    -** Processing line: ~    end~
    +      args.state.player.y = 720
    +** Processing line: ~      args.state.player.started_running_at ||= args.state.tick_count~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~  end~
    +      args.state.player.started_running_at ||= args.state.tick_count
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  end
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def fill_single_history args, history_key, state_key, keyboard_method, key_name~
    -- Inside source: true
    -*** True Line Result
    -  def fill_single_history args, history_key, state_key, keyboard_method, key_name
    -** Processing line: ~    current_value = args.inputs.keyboard.send(key_name)~
    +** Processing line: ~    # render player as standing or running~
     - Inside source: true
     *** True Line Result
    -    current_value = args.inputs.keyboard.send(key_name)
    -** Processing line: ~    if keyboard_method~
    +    # render player as standing or running
    +** Processing line: ~    if args.state.player.started_running_at~
     - Inside source: true
     *** True Line Result
    -    if keyboard_method
    -** Processing line: ~      current_value = args.inputs.keyboard.send(keyboard_method).send(key_name)~
    +    if args.state.player.started_running_at
    +** Processing line: ~      args.outputs.sprites << running_sprite(args)~
     - Inside source: true
     *** True Line Result
    -      current_value = args.inputs.keyboard.send(keyboard_method).send(key_name)
    -** Processing line: ~    end~
    +      args.outputs.sprites << running_sprite(args)
    +** Processing line: ~    else~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~    args.state.as_hash[history_key][key_name] ||= []~
    +    else
    +** Processing line: ~      args.outputs.sprites << standing_sprite(args)~
     - Inside source: true
     *** True Line Result
    -    args.state.as_hash[history_key][key_name] ||= []
    -** Processing line: ~    args.state.as_hash[history_key][key_name] << current_value~
    +      args.outputs.sprites << standing_sprite(args)
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    args.state.as_hash[history_key][key_name] << current_value
    -** Processing line: ~    args.state.as_hash[history_key][key_name] = args.state.as_hash[history_key][key_name].reverse.uniq.take(3).reverse~
    +    end
    +** Processing line: ~    args.outputs.labels << [30, 700, "Use arrow keys to move around."]~
     - Inside source: true
     *** True Line Result
    -    args.state.as_hash[history_key][key_name] = args.state.as_hash[history_key][key_name].reverse.uniq.take(3).reverse
    +    args.outputs.labels << [30, 700, "Use arrow keys to move around."]
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -17552,158 +17963,158 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def render_help_labels args, history_key, state_key, keyboard_method, x~
    +** Processing line: ~  def standing_sprite args~
     - Inside source: true
     *** True Line Result
    -  def render_help_labels args, history_key, state_key, keyboard_method, x
    -** Processing line: ~    idx = 8~
    +  def standing_sprite args
    +** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
    -    idx = 8
    -** Processing line: ~    args.outputs.labels << args.state~
    +    {
    +** Processing line: ~      x: args.state.player.x,~
     - Inside source: true
     *** True Line Result
    -    args.outputs.labels << args.state
    -** Processing line: ~                             .as_hash[history_key]~
    +      x: args.state.player.x,
    +** Processing line: ~      y: args.state.player.y,~
     - Inside source: true
     *** True Line Result
    -                             .as_hash[history_key]
    -** Processing line: ~                             .keys~
    +      y: args.state.player.y,
    +** Processing line: ~      w: args.state.player.w,~
     - Inside source: true
     *** True Line Result
    -                             .keys
    -** Processing line: ~                             .reverse~
    +      w: args.state.player.w,
    +** Processing line: ~      h: args.state.player.h,~
     - Inside source: true
     *** True Line Result
    -                             .reverse
    -** Processing line: ~                             .map~
    +      h: args.state.player.h,
    +** Processing line: ~      path: "sprites/horizontal-stand.png",~
     - Inside source: true
     *** True Line Result
    -                             .map
    -** Processing line: ~                             .with_index do |k, i|~
    +      path: "sprites/horizontal-stand.png",
    +** Processing line: ~      flip_horizontally: args.state.player.direction > 0~
     - Inside source: true
     *** True Line Result
    -                             .with_index do |k, i|
    -** Processing line: ~      v = args.state.as_hash[history_key][k]~
    +      flip_horizontally: args.state.player.direction > 0
    +** Processing line: ~    }~
     - Inside source: true
     *** True Line Result
    -      v = args.state.as_hash[history_key][k]
    -** Processing line: ~      current_value = args.inputs.keyboard.send(k)~
    +    }
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -      current_value = args.inputs.keyboard.send(k)
    -** Processing line: ~      if keyboard_method~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      if keyboard_method
    -** Processing line: ~        current_value = args.inputs.keyboard.send(keyboard_method).send(k)~
    +
    +** Processing line: ~  def running_sprite args~
     - Inside source: true
     *** True Line Result
    -        current_value = args.inputs.keyboard.send(keyboard_method).send(k)
    -** Processing line: ~      end~
    +  def running_sprite args
    +** Processing line: ~    if !args.state.player.started_running_at~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~      idx += 2~
    +    if !args.state.player.started_running_at
    +** Processing line: ~      tile_index = 0~
     - Inside source: true
     *** True Line Result
    -      idx += 2
    -** Processing line: ~      [~
    +      tile_index = 0
    +** Processing line: ~    else~
     - Inside source: true
     *** True Line Result
    -      [
    -** Processing line: ~        [x, row_to_px(args, idx - 2),~
    +    else
    +** Processing line: ~      how_many_frames_in_sprite_sheet = 6~
     - Inside source: true
     *** True Line Result
    -        [x, row_to_px(args, idx - 2),
    -** Processing line: ~         "    .#{k} is #{current_value || "nil"}",~
    +      how_many_frames_in_sprite_sheet = 6
    +** Processing line: ~      how_many_ticks_to_hold_each_frame = 3~
     - Inside source: true
     *** True Line Result
    -         "    .#{k} is #{current_value || "nil"}",
    -** Processing line: ~         small_font],~
    +      how_many_ticks_to_hold_each_frame = 3
    +** Processing line: ~      should_the_index_repeat = true~
     - Inside source: true
     *** True Line Result
    -         small_font],
    -** Processing line: ~        [x, row_to_px(args, idx - 1),~
    +      should_the_index_repeat = true
    +** Processing line: ~      tile_index = args.state~
     - Inside source: true
     *** True Line Result
    -        [x, row_to_px(args, idx - 1),
    -** Processing line: ~         "       was #{v}",~
    +      tile_index = args.state
    +** Processing line: ~                       .player~
     - Inside source: true
     *** True Line Result
    -         "       was #{v}",
    -** Processing line: ~         small_font]~
    +                       .player
    +** Processing line: ~                       .started_running_at~
     - Inside source: true
     *** True Line Result
    -         small_font]
    -** Processing line: ~      ]~
    +                       .started_running_at
    +** Processing line: ~                       .frame_index(how_many_frames_in_sprite_sheet,~
     - Inside source: true
     *** True Line Result
    -      ]
    -** Processing line: ~    end~
    +                       .frame_index(how_many_frames_in_sprite_sheet,
    +** Processing line: ~                                    how_many_ticks_to_hold_each_frame,~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~  end~
    +                                    how_many_ticks_to_hold_each_frame,
    +** Processing line: ~                                    should_the_index_repeat)~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +                                    should_the_index_repeat)
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def tick_instructions args, text, y = 715~
    +** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
    -  def tick_instructions args, text, y = 715
    -** Processing line: ~    return if args.state.key_event_occurred~
    +    {
    +** Processing line: ~      x: args.state.player.x,~
     - Inside source: true
     *** True Line Result
    -    return if args.state.key_event_occurred
    -** Processing line: ~    if args.inputs.mouse.click ||~
    +      x: args.state.player.x,
    +** Processing line: ~      y: args.state.player.y,~
     - Inside source: true
     *** True Line Result
    -    if args.inputs.mouse.click ||
    -** Processing line: ~       args.inputs.keyboard.directional_vector ||~
    +      y: args.state.player.y,
    +** Processing line: ~      w: args.state.player.w,~
     - Inside source: true
     *** True Line Result
    -       args.inputs.keyboard.directional_vector ||
    -** Processing line: ~       args.inputs.keyboard.key_down.enter ||~
    +      w: args.state.player.w,
    +** Processing line: ~      h: args.state.player.h,~
     - Inside source: true
     *** True Line Result
    -       args.inputs.keyboard.key_down.enter ||
    -** Processing line: ~       args.inputs.keyboard.key_down.escape~
    +      h: args.state.player.h,
    +** Processing line: ~      path: 'sprites/horizontal-run.png',~
     - Inside source: true
     *** True Line Result
    -       args.inputs.keyboard.key_down.escape
    -** Processing line: ~      args.state.key_event_occurred = true~
    +      path: 'sprites/horizontal-run.png',
    +** Processing line: ~      tile_x: 0 + (tile_index * args.state.player.w),~
     - Inside source: true
     *** True Line Result
    -      args.state.key_event_occurred = true
    -** Processing line: ~    end~
    +      tile_x: 0 + (tile_index * args.state.player.w),
    +** Processing line: ~      tile_y: 0,~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +      tile_y: 0,
    +** Processing line: ~      tile_w: args.state.player.w,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    args.outputs.debug << [0, y - 50, 1280, 60].solid~
    +      tile_w: args.state.player.w,
    +** Processing line: ~      tile_h: args.state.player.h,~
     - Inside source: true
     *** True Line Result
    -    args.outputs.debug << [0, y - 50, 1280, 60].solid
    -** Processing line: ~    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label~
    +      tile_h: args.state.player.h,
    +** Processing line: ~      flip_horizontally: args.state.player.direction > 0,~
     - Inside source: true
     *** True Line Result
    -    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label
    -** Processing line: ~    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label~
    +      flip_horizontally: args.state.player.direction > 0,
    +** Processing line: ~    }~
     - Inside source: true
     *** True Line Result
    -    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label
    +    }
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -17720,346 +18131,346 @@ Follows is a source code listing for all files that have been open sourced. This
     - End of paragraph detected.
     *** True Line Result
     
    -** Processing line: ~*** Input Basics - Mouse - main.rb~
    +** Processing line: ~*** Rendering Sprites - Animation States - main.rb~
     - Header detected.
     *** True Line Result
     
     *** True Line Result
    -*** Input Basics - Mouse - main.rb
    +*** Rendering Sprites - Animation States - main.rb
     ** Processing line: ~#+begin_src ruby~
     - Line was identified as the beginning of a code block.
     *** True Line Result
     
     *** True Line Result
     #+begin_src ruby
    -** Processing line: ~  # ./samples/02_input_basics/02_mouse/app/main.rb~
    +** Processing line: ~  # ./samples/03_rendering_sprites/03_animation_states/app/main.rb~
     - Inside source: true
     *** True Line Result
    -  # ./samples/02_input_basics/02_mouse/app/main.rb
    -** Processing line: ~  =begin~
    +  # ./samples/03_rendering_sprites/03_animation_states/app/main.rb
    +** Processing line: ~  class Game~
     - Inside source: true
     *** True Line Result
    -  =begin
    +  class Game
    +** Processing line: ~    attr_gtk~
    +- Inside source: true
    +*** True Line Result
    +    attr_gtk
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  APIs that haven't been encountered in a previous sample apps:~
    +** Processing line: ~    def defaults~
     - Inside source: true
     *** True Line Result
    -  APIs that haven't been encountered in a previous sample apps:
    -** Processing line: ~~
    -- Inside source: true
    -*** True Line Result
    -
    -** Processing line: ~  - args.inputs.mouse.click: This property will be set if the mouse was clicked.~
    -- Inside source: true
    -*** True Line Result
    -  - args.inputs.mouse.click: This property will be set if the mouse was clicked.
    -** Processing line: ~  - args.inputs.mouse.click.point.(x|y): The x and y location of the mouse.~
    +    def defaults
    +** Processing line: ~      state.show_debug_layer  = true if state.tick_count == 0~
     - Inside source: true
     *** True Line Result
    -  - args.inputs.mouse.click.point.(x|y): The x and y location of the mouse.
    -** Processing line: ~  - args.inputs.mouse.click.point.created_at: The frame the mouse click occurred in.~
    +      state.show_debug_layer  = true if state.tick_count == 0
    +** Processing line: ~      player.tile_size        = 64~
     - Inside source: true
     *** True Line Result
    -  - args.inputs.mouse.click.point.created_at: The frame the mouse click occurred in.
    -** Processing line: ~  - args.inputs.mouse.click.point.created_at_elapsed: How many frames have passed~
    +      player.tile_size        = 64
    +** Processing line: ~      player.speed            = 3~
     - Inside source: true
     *** True Line Result
    -  - args.inputs.mouse.click.point.created_at_elapsed: How many frames have passed
    -** Processing line: ~    since the click event.~
    +      player.speed            = 3
    +** Processing line: ~      player.slash_frames     = 15~
     - Inside source: true
     *** True Line Result
    -    since the click event.
    -** Processing line: ~~
    +      player.slash_frames     = 15
    +** Processing line: ~      player.x              ||= 50~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  Reminder:~
    +      player.x              ||= 50
    +** Processing line: ~      player.y              ||= 400~
     - Inside source: true
     *** True Line Result
    -  Reminder:
    -** Processing line: ~~
    +      player.y              ||= 400
    +** Processing line: ~      player.dir_x          ||=  1~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  - args.state.PROPERTY: The state property on args is a dynamic~
    +      player.dir_x          ||=  1
    +** Processing line: ~      player.dir_y          ||= -1~
     - Inside source: true
     *** True Line Result
    -  - args.state.PROPERTY: The state property on args is a dynamic
    -** Processing line: ~    structure. You can define ANY property here with ANY type of~
    +      player.dir_y          ||= -1
    +** Processing line: ~      player.is_moving      ||= false~
     - Inside source: true
     *** True Line Result
    -    structure. You can define ANY property here with ANY type of
    -** Processing line: ~    arbitrary nesting. Properties defined on args.state will be retained~
    +      player.is_moving      ||= false
    +** Processing line: ~      state.watch_list      ||= {}~
     - Inside source: true
     *** True Line Result
    -    arbitrary nesting. Properties defined on args.state will be retained
    -** Processing line: ~    across frames. If you attempt access a property that doesn't exist~
    +      state.watch_list      ||= {}
    +** Processing line: ~      state.enemies         ||= []~
     - Inside source: true
     *** True Line Result
    -    across frames. If you attempt access a property that doesn't exist
    -** Processing line: ~    on args.state, it will simply return nil (no exception will be thrown).~
    +      state.enemies         ||= []
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    on args.state, it will simply return nil (no exception will be thrown).
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  =end~
    +** Processing line: ~    def add_enemy~
     - Inside source: true
     *** True Line Result
    -  =end
    -** Processing line: ~~
    +    def add_enemy
    +** Processing line: ~      state.enemies << { x: 1200 * rand, y: 600 * rand, w: 64, h: 64 }~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  # This code demonstrates DragonRuby mouse input~
    +      state.enemies << { x: 1200 * rand, y: 600 * rand, w: 64, h: 64 }
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  # This code demonstrates DragonRuby mouse input
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # To see if the a mouse click occurred~
    +** Processing line: ~    def sprite_horizontal_run~
     - Inside source: true
     *** True Line Result
    -  # To see if the a mouse click occurred
    -** Processing line: ~  # Use args.inputs.mouse.click~
    +    def sprite_horizontal_run
    +** Processing line: ~      tile_index = 0.frame_index(6, 3, true)~
     - Inside source: true
     *** True Line Result
    -  # Use args.inputs.mouse.click
    -** Processing line: ~  # Which returns a boolean~
    +      tile_index = 0.frame_index(6, 3, true)
    +** Processing line: ~      tile_index = 0 if !player.is_moving~
     - Inside source: true
     *** True Line Result
    -  # Which returns a boolean
    +      tile_index = 0 if !player.is_moving
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # To see where a mouse click occurred~
    -- Inside source: true
    -*** True Line Result
    -  # To see where a mouse click occurred
    -** Processing line: ~  # Use args.inputs.mouse.click.point.x AND~
    +** Processing line: ~      {~
     - Inside source: true
     *** True Line Result
    -  # Use args.inputs.mouse.click.point.x AND
    -** Processing line: ~  # args.inputs.mouse.click.point.y~
    +      {
    +** Processing line: ~        x: player.x,~
     - Inside source: true
     *** True Line Result
    -  # args.inputs.mouse.click.point.y
    -** Processing line: ~~
    +        x: player.x,
    +** Processing line: ~        y: player.y,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  # To see which frame the click occurred~
    +        y: player.y,
    +** Processing line: ~        w: player.tile_size,~
     - Inside source: true
     *** True Line Result
    -  # To see which frame the click occurred
    -** Processing line: ~  # Use args.inputs.mouse.click.created_at~
    +        w: player.tile_size,
    +** Processing line: ~        h: player.tile_size,~
     - Inside source: true
     *** True Line Result
    -  # Use args.inputs.mouse.click.created_at
    -** Processing line: ~~
    +        h: player.tile_size,
    +** Processing line: ~        path: 'sprites/horizontal-run.png',~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  # To see how many frames its been since the click occurred~
    +        path: 'sprites/horizontal-run.png',
    +** Processing line: ~        tile_x: 0 + (tile_index * player.tile_size),~
     - Inside source: true
     *** True Line Result
    -  # To see how many frames its been since the click occurred
    -** Processing line: ~  # Use args.inputs.mouse.click.creat_at_elapsed~
    +        tile_x: 0 + (tile_index * player.tile_size),
    +** Processing line: ~        tile_y: 0,~
     - Inside source: true
     *** True Line Result
    -  # Use args.inputs.mouse.click.creat_at_elapsed
    -** Processing line: ~~
    +        tile_y: 0,
    +** Processing line: ~        tile_w: player.tile_size,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  # Saving the click in args.state can be quite useful~
    +        tile_w: player.tile_size,
    +** Processing line: ~        tile_h: player.tile_size,~
     - Inside source: true
     *** True Line Result
    -  # Saving the click in args.state can be quite useful
    -** Processing line: ~~
    +        tile_h: player.tile_size,
    +** Processing line: ~        flip_horizontally: player.dir_x > 0,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def tick args~
    +        flip_horizontally: player.dir_x > 0,
    +** Processing line: ~        # a: 40~
     - Inside source: true
     *** True Line Result
    -  def tick args
    -** Processing line: ~    tick_instructions args, "Sample app shows how mouse events are registered and how to measure elapsed time."~
    +        # a: 40
    +** Processing line: ~      }~
     - Inside source: true
     *** True Line Result
    -    tick_instructions args, "Sample app shows how mouse events are registered and how to measure elapsed time."
    -** Processing line: ~    x = 460~
    +      }
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    x = 460
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    args.outputs.labels << small_label(args, x, 11, "Mouse input: args.inputs.mouse")~
    +** Processing line: ~    def sprite_horizontal_stand~
     - Inside source: true
     *** True Line Result
    -    args.outputs.labels << small_label(args, x, 11, "Mouse input: args.inputs.mouse")
    -** Processing line: ~~
    +    def sprite_horizontal_stand
    +** Processing line: ~      {~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    if args.inputs.mouse.click~
    +      {
    +** Processing line: ~        x: player.x,~
     - Inside source: true
     *** True Line Result
    -    if args.inputs.mouse.click
    -** Processing line: ~      args.state.last_mouse_click = args.inputs.mouse.click~
    +        x: player.x,
    +** Processing line: ~        y: player.y,~
     - Inside source: true
     *** True Line Result
    -      args.state.last_mouse_click = args.inputs.mouse.click
    -** Processing line: ~    end~
    +        y: player.y,
    +** Processing line: ~        w: player.tile_size,~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +        w: player.tile_size,
    +** Processing line: ~        h: player.tile_size,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    if args.state.last_mouse_click~
    +        h: player.tile_size,
    +** Processing line: ~        path: 'sprites/horizontal-stand.png',~
     - Inside source: true
     *** True Line Result
    -    if args.state.last_mouse_click
    -** Processing line: ~      click = args.state.last_mouse_click~
    +        path: 'sprites/horizontal-stand.png',
    +** Processing line: ~        flip_horizontally: player.dir_x > 0,~
     - Inside source: true
     *** True Line Result
    -      click = args.state.last_mouse_click
    -** Processing line: ~      args.outputs.labels << small_label(args, x, 12, "Mouse click happened at: #{click.created_at}")~
    +        flip_horizontally: player.dir_x > 0,
    +** Processing line: ~        # a: 40~
     - Inside source: true
     *** True Line Result
    -      args.outputs.labels << small_label(args, x, 12, "Mouse click happened at: #{click.created_at}")
    -** Processing line: ~      args.outputs.labels << small_label(args, x, 13, "Mouse clicked #{click.created_at_elapsed} ticks ago")~
    +        # a: 40
    +** Processing line: ~      }~
     - Inside source: true
     *** True Line Result
    -      args.outputs.labels << small_label(args, x, 13, "Mouse clicked #{click.created_at_elapsed} ticks ago")
    -** Processing line: ~      args.outputs.labels << small_label(args, x, 14, "Mouse click location: #{click.point.x}, #{click.point.y}")~
    +      }
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      args.outputs.labels << small_label(args, x, 14, "Mouse click location: #{click.point.x}, #{click.point.y}")
    -** Processing line: ~    else~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    else
    -** Processing line: ~      args.outputs.labels << small_label(args, x, 12, "Mouse click has not occurred yet.")~
    +
    +** Processing line: ~    def sprite_horizontal_slash~
     - Inside source: true
     *** True Line Result
    -      args.outputs.labels << small_label(args, x, 12, "Mouse click has not occurred yet.")
    -** Processing line: ~      args.outputs.labels << small_label(args, x, 13, "Please click mouse.")~
    +    def sprite_horizontal_slash
    +** Processing line: ~      tile_index   = player.slash_at.frame_index(5, player.slash_frames.idiv(5), false) || 0~
     - Inside source: true
     *** True Line Result
    -      args.outputs.labels << small_label(args, x, 13, "Please click mouse.")
    -** Processing line: ~    end~
    +      tile_index   = player.slash_at.frame_index(5, player.slash_frames.idiv(5), false) || 0
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~  end~
    +
    +** Processing line: ~      {~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +      {
    +** Processing line: ~        x: player.x - 41.25,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def small_label args, x, row, message~
    +        x: player.x - 41.25,
    +** Processing line: ~        y: player.y - 41.25,~
     - Inside source: true
     *** True Line Result
    -  def small_label args, x, row, message
    -** Processing line: ~    # This method effectively combines the row_to_px and small_font methods~
    +        y: player.y - 41.25,
    +** Processing line: ~        w: 165,~
     - Inside source: true
     *** True Line Result
    -    # This method effectively combines the row_to_px and small_font methods
    -** Processing line: ~    # It changes the given row value to a DragonRuby pixel value~
    +        w: 165,
    +** Processing line: ~        h: 165,~
     - Inside source: true
     *** True Line Result
    -    # It changes the given row value to a DragonRuby pixel value
    -** Processing line: ~    # and adds the customization parameters~
    +        h: 165,
    +** Processing line: ~        path: 'sprites/horizontal-slash.png',~
     - Inside source: true
     *** True Line Result
    -    # and adds the customization parameters
    -** Processing line: ~    [x, row_to_px(args, row), message, small_font]~
    +        path: 'sprites/horizontal-slash.png',
    +** Processing line: ~        tile_x: 0 + (tile_index * 128),~
     - Inside source: true
     *** True Line Result
    -    [x, row_to_px(args, row), message, small_font]
    -** Processing line: ~  end~
    +        tile_x: 0 + (tile_index * 128),
    +** Processing line: ~        tile_y: 0,~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +        tile_y: 0,
    +** Processing line: ~        tile_w: 128,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def small_font~
    +        tile_w: 128,
    +** Processing line: ~        tile_h: 128,~
     - Inside source: true
     *** True Line Result
    -  def small_font
    -** Processing line: ~    [-2, 0, 0, 0, 0, 255]~
    +        tile_h: 128,
    +** Processing line: ~        flip_horizontally: player.dir_x > 0~
     - Inside source: true
     *** True Line Result
    -    [-2, 0, 0, 0, 0, 255]
    -** Processing line: ~  end~
    +        flip_horizontally: player.dir_x > 0
    +** Processing line: ~      }~
     - Inside source: true
     *** True Line Result
    -  end
    +      }
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def row_to_px args, row_number~
    +** Processing line: ~    def render_player~
     - Inside source: true
     *** True Line Result
    -  def row_to_px args, row_number
    -** Processing line: ~    args.grid.top.shift_down(5).shift_down(20 * row_number)~
    +    def render_player
    +** Processing line: ~      if player.slash_at~
     - Inside source: true
     *** True Line Result
    -    args.grid.top.shift_down(5).shift_down(20 * row_number)
    -** Processing line: ~  end~
    +      if player.slash_at
    +** Processing line: ~        outputs.sprites << sprite_horizontal_slash~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +        outputs.sprites << sprite_horizontal_slash
    +** Processing line: ~      elsif player.is_moving~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def tick_instructions args, text, y = 715~
    +      elsif player.is_moving
    +** Processing line: ~        outputs.sprites << sprite_horizontal_run~
     - Inside source: true
     *** True Line Result
    -  def tick_instructions args, text, y = 715
    -** Processing line: ~    return if args.state.key_event_occurred~
    +        outputs.sprites << sprite_horizontal_run
    +** Processing line: ~      else~
     - Inside source: true
     *** True Line Result
    -    return if args.state.key_event_occurred
    -** Processing line: ~    if args.inputs.mouse.click ||~
    +      else
    +** Processing line: ~        outputs.sprites << sprite_horizontal_stand~
     - Inside source: true
     *** True Line Result
    -    if args.inputs.mouse.click ||
    -** Processing line: ~       args.inputs.keyboard.directional_vector ||~
    +        outputs.sprites << sprite_horizontal_stand
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -       args.inputs.keyboard.directional_vector ||
    -** Processing line: ~       args.inputs.keyboard.key_down.enter ||~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -       args.inputs.keyboard.key_down.enter ||
    -** Processing line: ~       args.inputs.keyboard.key_down.escape~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -       args.inputs.keyboard.key_down.escape
    -** Processing line: ~      args.state.key_event_occurred = true~
    +
    +** Processing line: ~    def render_enemies~
     - Inside source: true
     *** True Line Result
    -      args.state.key_event_occurred = true
    +    def render_enemies
    +** Processing line: ~      outputs.borders << state.enemies~
    +- Inside source: true
    +*** True Line Result
    +      outputs.borders << state.enemies
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -18068,258 +18479,270 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    args.outputs.debug << [0, y - 50, 1280, 60].solid~
    +** Processing line: ~    def render_debug_layer~
     - Inside source: true
     *** True Line Result
    -    args.outputs.debug << [0, y - 50, 1280, 60].solid
    -** Processing line: ~    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label~
    +    def render_debug_layer
    +** Processing line: ~      return if !state.show_debug_layer~
     - Inside source: true
     *** True Line Result
    -    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label
    -** Processing line: ~    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label~
    +      return if !state.show_debug_layer
    +** Processing line: ~      outputs.labels << state.watch_list.map.with_index do |(k, v), i|~
     - Inside source: true
     *** True Line Result
    -    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label
    -** Processing line: ~  end~
    +      outputs.labels << state.watch_list.map.with_index do |(k, v), i|
    +** Processing line: ~         [30, 710 - i * 28, "#{k}: #{v || "(nil)"}"]~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +         [30, 710 - i * 28, "#{k}: #{v || "(nil)"}"]
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~#+end_src~
    -- Line was identified as the end of a code block.
    -*** True Line Result
    -#+end_src
    +      end
     ** Processing line: ~~
    -- End of paragraph detected.
    +- Inside source: true
     *** True Line Result
     
    -** Processing line: ~*** Input Basics - Mouse Point To Rect - main.rb~
    -- Header detected.
    +** Processing line: ~      outputs.borders << player.slash_collision_rect~
    +- Inside source: true
     *** True Line Result
    -
    +      outputs.borders << player.slash_collision_rect
    +** Processing line: ~    end~
    +- Inside source: true
     *** True Line Result
    -*** Input Basics - Mouse Point To Rect - main.rb
    -** Processing line: ~#+begin_src ruby~
    -- Line was identified as the beginning of a code block.
    +    end
    +** Processing line: ~~
    +- Inside source: true
     *** True Line Result
     
    +** Processing line: ~    def slash_initiate?~
    +- Inside source: true
     *** True Line Result
    -#+begin_src ruby
    -** Processing line: ~  # ./samples/02_input_basics/03_mouse_point_to_rect/app/main.rb~
    +    def slash_initiate?
    +** Processing line: ~      # buffalo usb controller has a button and b button swapped lol~
     - Inside source: true
     *** True Line Result
    -  # ./samples/02_input_basics/03_mouse_point_to_rect/app/main.rb
    -** Processing line: ~  =begin~
    +      # buffalo usb controller has a button and b button swapped lol
    +** Processing line: ~      inputs.controller_one.key_down.a || inputs.keyboard.key_down.j~
     - Inside source: true
     *** True Line Result
    -  =begin
    +      inputs.controller_one.key_down.a || inputs.keyboard.key_down.j
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  APIs that haven't been encountered in a previous sample apps:~
    +** Processing line: ~    def input~
     - Inside source: true
     *** True Line Result
    -  APIs that haven't been encountered in a previous sample apps:
    -** Processing line: ~~
    +    def input
    +** Processing line: ~      # player movement~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  - args.outputus.borders: An array. Values in this array will be rendered as~
    +      # player movement
    +** Processing line: ~      if slash_complete? && (vector = inputs.directional_vector)~
     - Inside source: true
     *** True Line Result
    -  - args.outputus.borders: An array. Values in this array will be rendered as
    -** Processing line: ~    unfilled rectangles on the screen.~
    +      if slash_complete? && (vector = inputs.directional_vector)
    +** Processing line: ~        player.x += vector.x * player.speed~
     - Inside source: true
     *** True Line Result
    -    unfilled rectangles on the screen.
    -** Processing line: ~  - ARRAY#inside_rect?: An array with at least two values is considered a point. An array~
    +        player.x += vector.x * player.speed
    +** Processing line: ~        player.y += vector.y * player.speed~
     - Inside source: true
     *** True Line Result
    -  - ARRAY#inside_rect?: An array with at least two values is considered a point. An array
    -** Processing line: ~    with at least four values is considered a rect. The inside_rect? function returns true~
    +        player.y += vector.y * player.speed
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    with at least four values is considered a rect. The inside_rect? function returns true
    -** Processing line: ~    or false depending on if the point is inside the rect.~
    +      end
    +** Processing line: ~      player.slash_at = slash_initiate? if slash_initiate?~
     - Inside source: true
     *** True Line Result
    -    or false depending on if the point is inside the rect.
    +      player.slash_at = slash_initiate? if slash_initiate?
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    ```~
    +** Processing line: ~    def calc_movement~
     - Inside source: true
     *** True Line Result
    -    ```
    -** Processing line: ~    # Point:  x: 100, y: 100~
    +    def calc_movement
    +** Processing line: ~      # movement~
     - Inside source: true
     *** True Line Result
    -    # Point:  x: 100, y: 100
    -** Processing line: ~    # Rect:   x: 0, y: 0, w: 500, h: 500~
    +      # movement
    +** Processing line: ~      if vector = inputs.directional_vector~
     - Inside source: true
     *** True Line Result
    -    # Rect:   x: 0, y: 0, w: 500, h: 500
    -** Processing line: ~    # Result: true~
    +      if vector = inputs.directional_vector
    +** Processing line: ~        state.debug_label = vector~
     - Inside source: true
     *** True Line Result
    -    # Result: true
    -** Processing line: ~~
    +        state.debug_label = vector
    +** Processing line: ~        player.dir_x = vector.x~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    [100, 100].inside_rect? [0, 0, 500, 500]~
    +        player.dir_x = vector.x
    +** Processing line: ~        player.dir_y = vector.y~
     - Inside source: true
     *** True Line Result
    -    [100, 100].inside_rect? [0, 0, 500, 500]
    -** Processing line: ~    ```~
    +        player.dir_y = vector.y
    +** Processing line: ~        player.is_moving = true~
     - Inside source: true
     *** True Line Result
    -    ```
    -** Processing line: ~~
    +        player.is_moving = true
    +** Processing line: ~      else~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    ```~
    +      else
    +** Processing line: ~        state.debug_label = vector~
     - Inside source: true
     *** True Line Result
    -    ```
    -** Processing line: ~    # Point:  x: 100, y: 100~
    +        state.debug_label = vector
    +** Processing line: ~        player.is_moving = false~
     - Inside source: true
     *** True Line Result
    -    # Point:  x: 100, y: 100
    -** Processing line: ~    # Rect:   x: 300, y: 300, w: 100, h: 100~
    +        player.is_moving = false
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    # Rect:   x: 300, y: 300, w: 100, h: 100
    -** Processing line: ~    # Result: false~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    # Result: false
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    [100, 100].inside_rect? [300, 300, 100, 100]~
    +** Processing line: ~    def calc_slash~
     - Inside source: true
     *** True Line Result
    -    [100, 100].inside_rect? [300, 300, 100, 100]
    -** Processing line: ~    ```~
    +    def calc_slash
    +** Processing line: ~      # re-calc the location of the swords collision box~
     - Inside source: true
     *** True Line Result
    -    ```
    -** Processing line: ~~
    +      # re-calc the location of the swords collision box
    +** Processing line: ~      if player.dir_x.positive?~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  - args.inputs.mouse.click.point.created_at: The frame the mouse click occurred in.~
    +      if player.dir_x.positive?
    +** Processing line: ~        player.slash_collision_rect = [player.x + player.tile_size,~
     - Inside source: true
     *** True Line Result
    -  - args.inputs.mouse.click.point.created_at: The frame the mouse click occurred in.
    -** Processing line: ~  - args.inputs.mouse.click.point.created_at_elapsed: How many frames have passed~
    +        player.slash_collision_rect = [player.x + player.tile_size,
    +** Processing line: ~                                       player.y + player.tile_size.half - 10,~
     - Inside source: true
     *** True Line Result
    -  - args.inputs.mouse.click.point.created_at_elapsed: How many frames have passed
    -** Processing line: ~    since the click event.~
    +                                       player.y + player.tile_size.half - 10,
    +** Processing line: ~                                       40, 20]~
     - Inside source: true
     *** True Line Result
    -    since the click event.
    -** Processing line: ~~
    +                                       40, 20]
    +** Processing line: ~      else~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  =end~
    +      else
    +** Processing line: ~        player.slash_collision_rect = [player.x - 32 - 8,~
     - Inside source: true
     *** True Line Result
    -  =end
    -** Processing line: ~~
    +        player.slash_collision_rect = [player.x - 32 - 8,
    +** Processing line: ~                                       player.y + player.tile_size.half - 10,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  # To determine whether a point is in a rect~
    +                                       player.y + player.tile_size.half - 10,
    +** Processing line: ~                                       40, 20]~
     - Inside source: true
     *** True Line Result
    -  # To determine whether a point is in a rect
    -** Processing line: ~  # Use point.inside_rect? rect~
    +                                       40, 20]
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -  # Use point.inside_rect? rect
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # This is useful to determine if a click occurred in a rect~
    +** Processing line: ~      # recalc sword's slash state~
     - Inside source: true
     *** True Line Result
    -  # This is useful to determine if a click occurred in a rect
    +      # recalc sword's slash state
    +** Processing line: ~      player.slash_at = nil if slash_complete?~
    +- Inside source: true
    +*** True Line Result
    +      player.slash_at = nil if slash_complete?
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def tick args~
    +** Processing line: ~      # determine collision if the sword is at it's point of damaging~
     - Inside source: true
     *** True Line Result
    -  def tick args
    -** Processing line: ~    tick_instructions args, "Sample app shows how to determing if a click happened inside a rectangle."~
    +      # determine collision if the sword is at it's point of damaging
    +** Processing line: ~      return unless slash_can_damage?~
     - Inside source: true
     *** True Line Result
    -    tick_instructions args, "Sample app shows how to determing if a click happened inside a rectangle."
    +      return unless slash_can_damage?
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    x = 460~
    -- Inside source: true
    -*** True Line Result
    -    x = 460
    -** Processing line: ~~
    +** Processing line: ~      state.enemies.reject! { |e| e.intersect_rect? player.slash_collision_rect }~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    args.outputs.labels << small_label(args, x, 15, "Click inside the blue box maybe ---->")~
    +      state.enemies.reject! { |e| e.intersect_rect? player.slash_collision_rect }
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    args.outputs.labels << small_label(args, x, 15, "Click inside the blue box maybe ---->")
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    box = [785, 370, 50, 50, 0, 0, 170]~
    +** Processing line: ~    def slash_complete?~
     - Inside source: true
     *** True Line Result
    -    box = [785, 370, 50, 50, 0, 0, 170]
    -** Processing line: ~    args.outputs.borders << box~
    +    def slash_complete?
    +** Processing line: ~      !player.slash_at || player.slash_at.elapsed?(player.slash_frames)~
     - Inside source: true
     *** True Line Result
    -    args.outputs.borders << box
    +      !player.slash_at || player.slash_at.elapsed?(player.slash_frames)
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Saves the most recent click into args.state~
    +** Processing line: ~    def slash_can_damage?~
     - Inside source: true
     *** True Line Result
    -    # Saves the most recent click into args.state
    -** Processing line: ~    # Unlike the other components of args,~
    +    def slash_can_damage?
    +** Processing line: ~      # damage occurs half way into the slash animation~
     - Inside source: true
     *** True Line Result
    -    # Unlike the other components of args,
    -** Processing line: ~    # args.state does not reset every tick.~
    +      # damage occurs half way into the slash animation
    +** Processing line: ~      return false if slash_complete?~
     - Inside source: true
     *** True Line Result
    -    # args.state does not reset every tick.
    -** Processing line: ~    if args.inputs.mouse.click~
    +      return false if slash_complete?
    +** Processing line: ~      return false if (player.slash_at + player.slash_frames.idiv(2)) != state.tick_count~
     - Inside source: true
     *** True Line Result
    -    if args.inputs.mouse.click
    -** Processing line: ~      args.state.last_mouse_click = args.inputs.mouse.click~
    +      return false if (player.slash_at + player.slash_frames.idiv(2)) != state.tick_count
    +** Processing line: ~      return true~
     - Inside source: true
     *** True Line Result
    -      args.state.last_mouse_click = args.inputs.mouse.click
    +      return true
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -18328,146 +18751,122 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    if args.state.last_mouse_click~
    -- Inside source: true
    -*** True Line Result
    -    if args.state.last_mouse_click
    -** Processing line: ~      if args.state.last_mouse_click.point.inside_rect? box~
    -- Inside source: true
    -*** True Line Result
    -      if args.state.last_mouse_click.point.inside_rect? box
    -** Processing line: ~        args.outputs.labels << small_label(args, x, 16, "Mouse click happened *inside* the box.")~
    -- Inside source: true
    -*** True Line Result
    -        args.outputs.labels << small_label(args, x, 16, "Mouse click happened *inside* the box.")
    -** Processing line: ~      else~
    +** Processing line: ~    def calc~
     - Inside source: true
     *** True Line Result
    -      else
    -** Processing line: ~        args.outputs.labels << small_label(args, x, 16, "Mouse click happened *outside* the box.")~
    +    def calc
    +** Processing line: ~      # generate an enemy if there aren't any on the screen~
     - Inside source: true
     *** True Line Result
    -        args.outputs.labels << small_label(args, x, 16, "Mouse click happened *outside* the box.")
    -** Processing line: ~      end~
    +      # generate an enemy if there aren't any on the screen
    +** Processing line: ~      add_enemy if state.enemies.length == 0~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    else~
    +      add_enemy if state.enemies.length == 0
    +** Processing line: ~      calc_movement~
     - Inside source: true
     *** True Line Result
    -    else
    -** Processing line: ~      args.outputs.labels << small_label(args, x, 16, "Mouse click has not occurred yet.")~
    +      calc_movement
    +** Processing line: ~      calc_slash~
     - Inside source: true
     *** True Line Result
    -      args.outputs.labels << small_label(args, x, 16, "Mouse click has not occurred yet.")
    +      calc_slash
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
         end
    -** Processing line: ~  end~
    -- Inside source: true
    -*** True Line Result
    -  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def small_label args, x, row, message~
    +** Processing line: ~    # source is at http://github.com/amirrajan/dragonruby-link-to-the-past~
     - Inside source: true
     *** True Line Result
    -  def small_label args, x, row, message
    -** Processing line: ~    [x, row_to_px(args, row), message, small_font]~
    +    # source is at http://github.com/amirrajan/dragonruby-link-to-the-past
    +** Processing line: ~    def tick~
     - Inside source: true
     *** True Line Result
    -    [x, row_to_px(args, row), message, small_font]
    -** Processing line: ~  end~
    +    def tick
    +** Processing line: ~      defaults~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +      defaults
    +** Processing line: ~      render_enemies~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def small_font~
    +      render_enemies
    +** Processing line: ~      render_player~
     - Inside source: true
     *** True Line Result
    -  def small_font
    -** Processing line: ~    [-2, 0, 0, 0, 0, 255]~
    +      render_player
    +** Processing line: ~      outputs.labels << [30, 30, "Gamepad: D-Pad to move. B button to attack."]~
     - Inside source: true
     *** True Line Result
    -    [-2, 0, 0, 0, 0, 255]
    -** Processing line: ~  end~
    +      outputs.labels << [30, 30, "Gamepad: D-Pad to move. B button to attack."]
    +** Processing line: ~      outputs.labels << [30, 52, "Keyboard: WASD/Arrow keys to move. J to attack."]~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +      outputs.labels << [30, 52, "Keyboard: WASD/Arrow keys to move. J to attack."]
    +** Processing line: ~      render_debug_layer~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def row_to_px args, row_number~
    +      render_debug_layer
    +** Processing line: ~      input~
     - Inside source: true
     *** True Line Result
    -  def row_to_px args, row_number
    -** Processing line: ~    args.grid.top.shift_down(5).shift_down(20 * row_number)~
    +      input
    +** Processing line: ~      calc~
     - Inside source: true
     *** True Line Result
    -    args.grid.top.shift_down(5).shift_down(20 * row_number)
    -** Processing line: ~  end~
    +      calc
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  end
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def tick_instructions args, text, y = 715~
    -- Inside source: true
    -*** True Line Result
    -  def tick_instructions args, text, y = 715
    -** Processing line: ~    return if args.state.key_event_occurred~
    -- Inside source: true
    -*** True Line Result
    -    return if args.state.key_event_occurred
    -** Processing line: ~    if args.inputs.mouse.click ||~
    +** Processing line: ~    def player~
     - Inside source: true
     *** True Line Result
    -    if args.inputs.mouse.click ||
    -** Processing line: ~       args.inputs.keyboard.directional_vector ||~
    +    def player
    +** Processing line: ~      state.player~
     - Inside source: true
     *** True Line Result
    -       args.inputs.keyboard.directional_vector ||
    -** Processing line: ~       args.inputs.keyboard.key_down.enter ||~
    +      state.player
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -       args.inputs.keyboard.key_down.enter ||
    -** Processing line: ~       args.inputs.keyboard.key_down.escape~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -       args.inputs.keyboard.key_down.escape
    -** Processing line: ~      args.state.key_event_occurred = true~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      args.state.key_event_occurred = true
    -** Processing line: ~    end~
    +
    +** Processing line: ~  $game = Game.new~
     - Inside source: true
     *** True Line Result
    -    end
    +  $game = Game.new
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    args.outputs.debug << [0, y - 50, 1280, 60].solid~
    +** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
    -    args.outputs.debug << [0, y - 50, 1280, 60].solid
    -** Processing line: ~    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label~
    +  def tick args
    +** Processing line: ~    $game.args = args~
     - Inside source: true
     *** True Line Result
    -    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label
    -** Processing line: ~    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label~
    +    $game.args = args
    +** Processing line: ~    $game.tick~
     - Inside source: true
     *** True Line Result
    -    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label
    +    $game.tick
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -18476,6 +18875,14 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    +** Processing line: ~  $gtk.reset~
    +- Inside source: true
    +*** True Line Result
    +  $gtk.reset
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
     ** Processing line: ~#+end_src~
     - Line was identified as the end of a code block.
     *** True Line Result
    @@ -18484,122 +18891,154 @@ Follows is a source code listing for all files that have been open sourced. This
     - End of paragraph detected.
     *** True Line Result
     
    -** Processing line: ~*** Input Basics - Mouse Rect To Rect - main.rb~
    +** Processing line: ~*** Rendering Sprites - Color And Rotation - main.rb~
     - Header detected.
     *** True Line Result
     
     *** True Line Result
    -*** Input Basics - Mouse Rect To Rect - main.rb
    +*** Rendering Sprites - Color And Rotation - main.rb
     ** Processing line: ~#+begin_src ruby~
     - Line was identified as the beginning of a code block.
     *** True Line Result
     
     *** True Line Result
     #+begin_src ruby
    -** Processing line: ~  # ./samples/02_input_basics/04_mouse_rect_to_rect/app/main.rb~
    +** Processing line: ~  # ./samples/03_rendering_sprites/04_color_and_rotation/app/main.rb~
     - Inside source: true
     *** True Line Result
    -  # ./samples/02_input_basics/04_mouse_rect_to_rect/app/main.rb
    +  # ./samples/03_rendering_sprites/04_color_and_rotation/app/main.rb
     ** Processing line: ~  =begin~
     - Inside source: true
     *** True Line Result
       =begin
    +** Processing line: ~   APIs listing that haven't been encountered in previous sample apps:~
    +- Inside source: true
    +*** True Line Result
    +   APIs listing that haven't been encountered in previous sample apps:
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  APIs that haven't been encountered in a previous sample apps:~
    +** Processing line: ~   - merge: Returns a hash containing the contents of two original hashes.~
     - Inside source: true
     *** True Line Result
    -  APIs that haven't been encountered in a previous sample apps:
    +   - merge: Returns a hash containing the contents of two original hashes.
    +** Processing line: ~     Merge does not allow duplicate keys, so the value of a repeated key~
    +- Inside source: true
    +*** True Line Result
    +     Merge does not allow duplicate keys, so the value of a repeated key
    +** Processing line: ~     will be overwritten.~
    +- Inside source: true
    +*** True Line Result
    +     will be overwritten.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  - args.outputs.borders: An array. Values in this array will be rendered as~
    +** Processing line: ~     For example, if we had two hashes~
     - Inside source: true
     *** True Line Result
    -  - args.outputs.borders: An array. Values in this array will be rendered as
    -** Processing line: ~    unfilled rectangles on the screen.~
    +     For example, if we had two hashes
    +** Processing line: ~     h1 = { "a" => 1, "b" => 2}~
     - Inside source: true
     *** True Line Result
    -    unfilled rectangles on the screen.
    -** Processing line: ~  - ARRAY#intersect_rect?: An array with at least four values is~
    +     h1 = { "a" => 1, "b" => 2}
    +** Processing line: ~     h2 = { "b" => 3, "c" => 3}~
     - Inside source: true
     *** True Line Result
    -  - ARRAY#intersect_rect?: An array with at least four values is
    -** Processing line: ~    considered a rect. The intersect_rect? function returns true~
    +     h2 = { "b" => 3, "c" => 3}
    +** Processing line: ~     and we called the command~
     - Inside source: true
     *** True Line Result
    -    considered a rect. The intersect_rect? function returns true
    -** Processing line: ~    or false depending on if the two rectangles intersect.~
    +     and we called the command
    +** Processing line: ~     h1.merge(h2)~
     - Inside source: true
     *** True Line Result
    -    or false depending on if the two rectangles intersect.
    +     h1.merge(h2)
    +** Processing line: ~     the result would the following hash~
    +- Inside source: true
    +*** True Line Result
    +     the result would the following hash
    +** Processing line: ~     { "a" => 1, "b" => 3, "c" => 3}.~
    +- Inside source: true
    +*** True Line Result
    +     { "a" => 1, "b" => 3, "c" => 3}.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    ```~
    +** Processing line: ~   Reminders:~
     - Inside source: true
     *** True Line Result
    -    ```
    -** Processing line: ~    # Rect One: x: 100, y: 100, w: 100, h: 100~
    +   Reminders:
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    # Rect One: x: 100, y: 100, w: 100, h: 100
    -** Processing line: ~    # Rect Two: x: 0, y: 0, w: 500, h: 500~
    +
    +** Processing line: ~   - Hashes: Collection of unique keys and their corresponding values. The value can be found~
     - Inside source: true
     *** True Line Result
    -    # Rect Two: x: 0, y: 0, w: 500, h: 500
    -** Processing line: ~    # Result:   true~
    +   - Hashes: Collection of unique keys and their corresponding values. The value can be found
    +** Processing line: ~     using their keys.~
     - Inside source: true
     *** True Line Result
    -    # Result:   true
    +     using their keys.
    +** Processing line: ~     In this sample app, we're using a hash to create a sprite.~
    +- Inside source: true
    +*** True Line Result
    +     In this sample app, we're using a hash to create a sprite.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    [100, 100, 100, 100].intersect_rect? [0, 0, 500, 500]~
    +** Processing line: ~   - args.outputs.sprites: An array. The values generate a sprite.~
     - Inside source: true
     *** True Line Result
    -    [100, 100, 100, 100].intersect_rect? [0, 0, 500, 500]
    -** Processing line: ~    ```~
    +   - args.outputs.sprites: An array. The values generate a sprite.
    +** Processing line: ~     The parameters are [X, Y, WIDTH, HEIGHT, PATH, ANGLE, ALPHA, RED, GREEN, BLUE]~
     - Inside source: true
     *** True Line Result
    -    ```
    -** Processing line: ~~
    +     The parameters are [X, Y, WIDTH, HEIGHT, PATH, ANGLE, ALPHA, RED, GREEN, BLUE]
    +** Processing line: ~     Before continuing with this sample app, it is HIGHLY recommended that you look~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    ```~
    +     Before continuing with this sample app, it is HIGHLY recommended that you look
    +** Processing line: ~     at mygame/documentation/05-sprites.md.~
     - Inside source: true
     *** True Line Result
    -    ```
    -** Processing line: ~    # Rect One: x: 100, y: 100, w: 10, h: 10~
    +     at mygame/documentation/05-sprites.md.
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    # Rect One: x: 100, y: 100, w: 10, h: 10
    -** Processing line: ~    # Rect Two: x: 500, y: 500, w: 10, h: 10~
    +
    +** Processing line: ~   - args.inputs.keyboard.key_held.KEY: Determines if a key is being pressed.~
     - Inside source: true
     *** True Line Result
    -    # Rect Two: x: 500, y: 500, w: 10, h: 10
    -** Processing line: ~    # Result:   false~
    +   - args.inputs.keyboard.key_held.KEY: Determines if a key is being pressed.
    +** Processing line: ~     For more information about the keyboard, go to mygame/documentation/06-keyboard.md.~
     - Inside source: true
     *** True Line Result
    -    # Result:   false
    +     For more information about the keyboard, go to mygame/documentation/06-keyboard.md.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    [100, 100, 10, 10].intersect_rect? [500, 500, 10, 10]~
    +** Processing line: ~   - args.inputs.controller_one: Takes input from the controller based on what key is pressed.~
     - Inside source: true
     *** True Line Result
    -    [100, 100, 10, 10].intersect_rect? [500, 500, 10, 10]
    -** Processing line: ~    ```~
    +   - args.inputs.controller_one: Takes input from the controller based on what key is pressed.
    +** Processing line: ~     For more information about the controller, go to mygame/documentation/08-controllers.md.~
     - Inside source: true
     *** True Line Result
    -    ```
    +     For more information about the controller, go to mygame/documentation/08-controllers.md.
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~   - num1.lesser(num2): Finds the lower value of the given options.~
    +- Inside source: true
    +*** True Line Result
    +   - num1.lesser(num2): Finds the lower value of the given options.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
    @@ -18612,690 +19051,630 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # Similarly, whether rects intersect can be found through~
    +** Processing line: ~  # This sample app shows a car moving across the screen. It loops back around if it exceeds the dimensions of the screen,~
     - Inside source: true
     *** True Line Result
    -  # Similarly, whether rects intersect can be found through
    -** Processing line: ~  # rect1.intersect_rect? rect2~
    +  # This sample app shows a car moving across the screen. It loops back around if it exceeds the dimensions of the screen,
    +** Processing line: ~  # and also can be moved in different directions through keyboard input from the user.~
     - Inside source: true
     *** True Line Result
    -  # rect1.intersect_rect? rect2
    +  # and also can be moved in different directions through keyboard input from the user.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def tick args~
    +** Processing line: ~  # Calls the methods necessary for the game to run successfully.~
     - Inside source: true
     *** True Line Result
    -  def tick args
    -** Processing line: ~    tick_instructions args, "Sample app shows how to determine if two rectangles intersect."~
    +  # Calls the methods necessary for the game to run successfully.
    +** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
    -    tick_instructions args, "Sample app shows how to determine if two rectangles intersect."
    -** Processing line: ~    x = 460~
    +  def tick args
    +** Processing line: ~    default args~
     - Inside source: true
     *** True Line Result
    -    x = 460
    -** Processing line: ~~
    +    default args
    +** Processing line: ~    render args.grid, args.outputs, args.state~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    args.outputs.labels << small_label(args, x, 3, "Click anywhere on the screen")~
    +    render args.grid, args.outputs, args.state
    +** Processing line: ~    calc args.state~
     - Inside source: true
     *** True Line Result
    -    args.outputs.labels << small_label(args, x, 3, "Click anywhere on the screen")
    -** Processing line: ~    # red_box = [460, 250, 355, 90, 170, 0, 0]~
    +    calc args.state
    +** Processing line: ~    process_inputs args~
     - Inside source: true
     *** True Line Result
    -    # red_box = [460, 250, 355, 90, 170, 0, 0]
    -** Processing line: ~    # args.outputs.borders << red_box~
    +    process_inputs args
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    # args.outputs.borders << red_box
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # args.state.box_collision_one and args.state.box_collision_two~
    -- Inside source: true
    -*** True Line Result
    -    # args.state.box_collision_one and args.state.box_collision_two
    -** Processing line: ~    # Are given values of a solid when they should be rendered~
    +** Processing line: ~  # Sets default values for the car sprite~
     - Inside source: true
     *** True Line Result
    -    # Are given values of a solid when they should be rendered
    -** Processing line: ~    # They are stored in game so that they do not get reset every tick~
    +  # Sets default values for the car sprite
    +** Processing line: ~  # Initialization ||= only happens in the first frame~
     - Inside source: true
     *** True Line Result
    -    # They are stored in game so that they do not get reset every tick
    -** Processing line: ~    if args.inputs.mouse.click~
    +  # Initialization ||= only happens in the first frame
    +** Processing line: ~  def default args~
     - Inside source: true
     *** True Line Result
    -    if args.inputs.mouse.click
    -** Processing line: ~      if !args.state.box_collision_one~
    +  def default args
    +** Processing line: ~    args.state.sprite.width    = 19~
     - Inside source: true
     *** True Line Result
    -      if !args.state.box_collision_one
    -** Processing line: ~        args.state.box_collision_one = [args.inputs.mouse.click.point.x - 25, args.inputs.mouse.click.point.y - 25, 125, 125, 180, 0,   0, 180]~
    +    args.state.sprite.width    = 19
    +** Processing line: ~    args.state.sprite.height   = 10~
     - Inside source: true
     *** True Line Result
    -        args.state.box_collision_one = [args.inputs.mouse.click.point.x - 25, args.inputs.mouse.click.point.y - 25, 125, 125, 180, 0,   0, 180]
    -** Processing line: ~      elsif !args.state.box_collision_two~
    +    args.state.sprite.height   = 10
    +** Processing line: ~    args.state.sprite.scale    = 4~
     - Inside source: true
     *** True Line Result
    -      elsif !args.state.box_collision_two
    -** Processing line: ~        args.state.box_collision_two = [args.inputs.mouse.click.point.x - 25, args.inputs.mouse.click.point.y - 25, 125, 125,   0, 0, 180, 180]~
    +    args.state.sprite.scale    = 4
    +** Processing line: ~    args.state.max_speed       = 5~
     - Inside source: true
     *** True Line Result
    -        args.state.box_collision_two = [args.inputs.mouse.click.point.x - 25, args.inputs.mouse.click.point.y - 25, 125, 125,   0, 0, 180, 180]
    -** Processing line: ~      else~
    +    args.state.max_speed       = 5
    +** Processing line: ~    args.state.x             ||= 100~
     - Inside source: true
     *** True Line Result
    -      else
    -** Processing line: ~        args.state.box_collision_one = nil~
    +    args.state.x             ||= 100
    +** Processing line: ~    args.state.y             ||= 100~
     - Inside source: true
     *** True Line Result
    -        args.state.box_collision_one = nil
    -** Processing line: ~        args.state.box_collision_two = nil~
    +    args.state.y             ||= 100
    +** Processing line: ~    args.state.speed         ||= 1~
     - Inside source: true
     *** True Line Result
    -        args.state.box_collision_two = nil
    -** Processing line: ~      end~
    +    args.state.speed         ||= 1
    +** Processing line: ~    args.state.angle         ||= 0~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +    args.state.angle         ||= 0
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    end
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    if args.state.box_collision_one~
    +** Processing line: ~  # Outputs sprite onto screen~
     - Inside source: true
     *** True Line Result
    -    if args.state.box_collision_one
    -** Processing line: ~      args.outputs.solids << args.state.box_collision_one~
    +  # Outputs sprite onto screen
    +** Processing line: ~  def render grid, outputs, state~
     - Inside source: true
     *** True Line Result
    -      args.outputs.solids << args.state.box_collision_one
    -** Processing line: ~    end~
    +  def render grid, outputs, state
    +** Processing line: ~    outputs.solids  <<  [grid.rect, 70, 70, 70] # outputs gray background~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +    outputs.solids  <<  [grid.rect, 70, 70, 70] # outputs gray background
    +** Processing line: ~    outputs.sprites <<  [destination_rect(state), # sets first four parameters of car sprite~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    if args.state.box_collision_two~
    +    outputs.sprites <<  [destination_rect(state), # sets first four parameters of car sprite
    +** Processing line: ~    'sprites/86.png', # image path of car~
     - Inside source: true
     *** True Line Result
    -    if args.state.box_collision_two
    -** Processing line: ~      args.outputs.solids << args.state.box_collision_two~
    +    'sprites/86.png', # image path of car
    +** Processing line: ~    state.angle,~
     - Inside source: true
     *** True Line Result
    -      args.outputs.solids << args.state.box_collision_two
    -** Processing line: ~    end~
    +    state.angle,
    +** Processing line: ~    opacity, # transparency~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +    opacity, # transparency
    +** Processing line: ~    saturation,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    if args.state.box_collision_one && args.state.box_collision_two~
    +    saturation,
    +** Processing line: ~    source_rect(state), # sprite sub division/tile (tile x, y, w, h)~
     - Inside source: true
     *** True Line Result
    -    if args.state.box_collision_one && args.state.box_collision_two
    -** Processing line: ~      if args.state.box_collision_one.intersect_rect? args.state.box_collision_two~
    +    source_rect(state), # sprite sub division/tile (tile x, y, w, h)
    +** Processing line: ~    false, false,  # don't flip sprites~
     - Inside source: true
     *** True Line Result
    -      if args.state.box_collision_one.intersect_rect? args.state.box_collision_two
    -** Processing line: ~        args.outputs.labels << small_label(args, x, 4, 'The boxes intersect.')~
    +    false, false,  # don't flip sprites
    +** Processing line: ~    rotation_anchor]~
     - Inside source: true
     *** True Line Result
    -        args.outputs.labels << small_label(args, x, 4, 'The boxes intersect.')
    -** Processing line: ~      else~
    +    rotation_anchor]
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      else
    -** Processing line: ~        args.outputs.labels << small_label(args, x, 4, 'The boxes do not intersect.')~
    +
    +** Processing line: ~    # also look at the create_sprite helper method~
     - Inside source: true
     *** True Line Result
    -        args.outputs.labels << small_label(args, x, 4, 'The boxes do not intersect.')
    -** Processing line: ~      end~
    +    # also look at the create_sprite helper method
    +** Processing line: ~    #~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    else~
    +    #
    +** Processing line: ~    # For example:~
     - Inside source: true
     *** True Line Result
    -    else
    -** Processing line: ~      args.outputs.labels << small_label(args, x, 4, '--')~
    +    # For example:
    +** Processing line: ~    #~
     - Inside source: true
     *** True Line Result
    -      args.outputs.labels << small_label(args, x, 4, '--')
    -** Processing line: ~    end~
    +    #
    +** Processing line: ~    # dest   = destination_rect(state)~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~  end~
    +    # dest   = destination_rect(state)
    +** Processing line: ~    # source = source_rect(state),~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +    # source = source_rect(state),
    +** Processing line: ~    # outputs.sprites << create_sprite(~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def small_label args, x, row, message~
    +    # outputs.sprites << create_sprite(
    +** Processing line: ~    #   'sprites/86.png',~
     - Inside source: true
     *** True Line Result
    -  def small_label args, x, row, message
    -** Processing line: ~    [x, row_to_px(args, row), message, small_font]~
    +    #   'sprites/86.png',
    +** Processing line: ~    #   x: dest.x,~
     - Inside source: true
     *** True Line Result
    -    [x, row_to_px(args, row), message, small_font]
    -** Processing line: ~  end~
    +    #   x: dest.x,
    +** Processing line: ~    #   y: dest.y,~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +    #   y: dest.y,
    +** Processing line: ~    #   w: dest.w,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def small_font~
    +    #   w: dest.w,
    +** Processing line: ~    #   h: dest.h,~
     - Inside source: true
     *** True Line Result
    -  def small_font
    -** Processing line: ~    [-2, 0, 0, 0, 0, 255]~
    +    #   h: dest.h,
    +** Processing line: ~    #   angle: state.angle,~
     - Inside source: true
     *** True Line Result
    -    [-2, 0, 0, 0, 0, 255]
    -** Processing line: ~  end~
    +    #   angle: state.angle,
    +** Processing line: ~    #   source_x: source.x,~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +    #   source_x: source.x,
    +** Processing line: ~    #   source_y: source.y,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def row_to_px args, row_number~
    +    #   source_y: source.y,
    +** Processing line: ~    #   source_w: source.w,~
     - Inside source: true
     *** True Line Result
    -  def row_to_px args, row_number
    -** Processing line: ~    args.grid.top.shift_down(5).shift_down(20 * row_number)~
    +    #   source_w: source.w,
    +** Processing line: ~    #   source_h: source.h,~
     - Inside source: true
     *** True Line Result
    -    args.grid.top.shift_down(5).shift_down(20 * row_number)
    -** Processing line: ~  end~
    +    #   source_h: source.h,
    +** Processing line: ~    #   flip_h: false,~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +    #   flip_h: false,
    +** Processing line: ~    #   flip_v: false,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def tick_instructions args, text, y = 715~
    +    #   flip_v: false,
    +** Processing line: ~    #   rotation_anchor_x: 0.7,~
     - Inside source: true
     *** True Line Result
    -  def tick_instructions args, text, y = 715
    -** Processing line: ~    return if args.state.key_event_occurred~
    +    #   rotation_anchor_x: 0.7,
    +** Processing line: ~    #   rotation_anchor_y: 0.5~
     - Inside source: true
     *** True Line Result
    -    return if args.state.key_event_occurred
    -** Processing line: ~    if args.inputs.mouse.click ||~
    +    #   rotation_anchor_y: 0.5
    +** Processing line: ~    # )~
     - Inside source: true
     *** True Line Result
    -    if args.inputs.mouse.click ||
    -** Processing line: ~       args.inputs.keyboard.directional_vector ||~
    +    # )
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -       args.inputs.keyboard.directional_vector ||
    -** Processing line: ~       args.inputs.keyboard.key_down.enter ||~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -       args.inputs.keyboard.key_down.enter ||
    -** Processing line: ~       args.inputs.keyboard.key_down.escape~
    +
    +** Processing line: ~  # Creates sprite by setting values inside of a hash~
     - Inside source: true
     *** True Line Result
    -       args.inputs.keyboard.key_down.escape
    -** Processing line: ~      args.state.key_event_occurred = true~
    +  # Creates sprite by setting values inside of a hash
    +** Processing line: ~  def create_sprite path, options = {}~
     - Inside source: true
     *** True Line Result
    -      args.state.key_event_occurred = true
    -** Processing line: ~    end~
    +  def create_sprite path, options = {}
    +** Processing line: ~    options = {~
     - Inside source: true
     *** True Line Result
    -    end
    +    options = {
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    args.outputs.debug << [0, y - 50, 1280, 60].solid~
    +** Processing line: ~      # dest x, y, w, h~
     - Inside source: true
     *** True Line Result
    -    args.outputs.debug << [0, y - 50, 1280, 60].solid
    -** Processing line: ~    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label~
    +      # dest x, y, w, h
    +** Processing line: ~      x: 0,~
     - Inside source: true
     *** True Line Result
    -    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label
    -** Processing line: ~    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label~
    +      x: 0,
    +** Processing line: ~      y: 0,~
     - Inside source: true
     *** True Line Result
    -    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label
    -** Processing line: ~  end~
    +      y: 0,
    +** Processing line: ~      w: 100,~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +      w: 100,
    +** Processing line: ~      h: 100,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~#+end_src~
    -- Line was identified as the end of a code block.
    -*** True Line Result
    -#+end_src
    +      h: 100,
     ** Processing line: ~~
    -- End of paragraph detected.
    -*** True Line Result
    -
    -** Processing line: ~*** Input Basics - Controller - main.rb~
    -- Header detected.
    -*** True Line Result
    -
    -*** True Line Result
    -*** Input Basics - Controller - main.rb
    -** Processing line: ~#+begin_src ruby~
    -- Line was identified as the beginning of a code block.
    +- Inside source: true
     *** True Line Result
     
    -*** True Line Result
    -#+begin_src ruby
    -** Processing line: ~  # ./samples/02_input_basics/05_controller/app/main.rb~
    +** Processing line: ~      # angle, rotation~
     - Inside source: true
     *** True Line Result
    -  # ./samples/02_input_basics/05_controller/app/main.rb
    -** Processing line: ~  =begin~
    +      # angle, rotation
    +** Processing line: ~      angle: 0,~
     - Inside source: true
     *** True Line Result
    -  =begin
    -** Processing line: ~~
    +      angle: 0,
    +** Processing line: ~      rotation_anchor_x: 0.5,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   APIs listing that haven't been encountered in previous sample apps:~
    +      rotation_anchor_x: 0.5,
    +** Processing line: ~      rotation_anchor_y: 0.5,~
     - Inside source: true
     *** True Line Result
    -   APIs listing that haven't been encountered in previous sample apps:
    +      rotation_anchor_y: 0.5,
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~   - args.inputs.controller_one.key_held.KEY: Will check to see if a specific key~
    -- Inside source: true
    -*** True Line Result
    -   - args.inputs.controller_one.key_held.KEY: Will check to see if a specific key
    -** Processing line: ~     is being held down on the controller.~
    -- Inside source: true
    -*** True Line Result
    -     is being held down on the controller.
    -** Processing line: ~     If there is more than one controller being used, they can be differentiated by~
    -- Inside source: true
    -*** True Line Result
    -     If there is more than one controller being used, they can be differentiated by
    -** Processing line: ~     using names like controller_one and controller_two.~
    +** Processing line: ~      # color saturation (red, green, blue), transparency~
     - Inside source: true
     *** True Line Result
    -     using names like controller_one and controller_two.
    -** Processing line: ~~
    +      # color saturation (red, green, blue), transparency
    +** Processing line: ~      r: 255,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~     For a full listing of buttons, take a look at mygame/documentation/08-controllers.md.~
    +      r: 255,
    +** Processing line: ~      g: 255,~
     - Inside source: true
     *** True Line Result
    -     For a full listing of buttons, take a look at mygame/documentation/08-controllers.md.
    -** Processing line: ~~
    +      g: 255,
    +** Processing line: ~      b: 255,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   Reminder:~
    +      b: 255,
    +** Processing line: ~      a: 255,~
     - Inside source: true
     *** True Line Result
    -   Reminder:
    +      a: 255,
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~   - args.state.PROPERTY: The state property on args is a dynamic~
    +** Processing line: ~      # source x, y, width, height~
     - Inside source: true
     *** True Line Result
    -   - args.state.PROPERTY: The state property on args is a dynamic
    -** Processing line: ~     structure. You can define ANY property here with ANY type of~
    +      # source x, y, width, height
    +** Processing line: ~      source_x: 0,~
     - Inside source: true
     *** True Line Result
    -     structure. You can define ANY property here with ANY type of
    -** Processing line: ~     arbitrary nesting. Properties defined on args.state will be retained~
    +      source_x: 0,
    +** Processing line: ~      source_y: 0,~
     - Inside source: true
     *** True Line Result
    -     arbitrary nesting. Properties defined on args.state will be retained
    -** Processing line: ~     across frames. If you attempt to access a property that doesn't exist~
    +      source_y: 0,
    +** Processing line: ~      source_w: -1,~
     - Inside source: true
     *** True Line Result
    -     across frames. If you attempt to access a property that doesn't exist
    -** Processing line: ~     on args.state, it will simply return nil (no exception will be thrown).~
    +      source_w: -1,
    +** Processing line: ~      source_h: -1,~
     - Inside source: true
     *** True Line Result
    -     on args.state, it will simply return nil (no exception will be thrown).
    +      source_h: -1,
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~     In this sample app, args.state.BUTTONS is an array that stores the buttons of the controller.~
    -- Inside source: true
    -*** True Line Result
    -     In this sample app, args.state.BUTTONS is an array that stores the buttons of the controller.
    -** Processing line: ~     The parameters of a button are:~
    -- Inside source: true
    -*** True Line Result
    -     The parameters of a button are:
    -** Processing line: ~     1. the position (x, y)~
    +** Processing line: ~      # flip horiztonally, flip vertically~
     - Inside source: true
     *** True Line Result
    -     1. the position (x, y)
    -** Processing line: ~     2. the input key held on the controller~
    +      # flip horiztonally, flip vertically
    +** Processing line: ~      flip_h: false,~
     - Inside source: true
     *** True Line Result
    -     2. the input key held on the controller
    -** Processing line: ~     3. the text or name of the button~
    +      flip_h: false,
    +** Processing line: ~      flip_v: false,~
     - Inside source: true
     *** True Line Result
    -     3. the text or name of the button
    +      flip_v: false,
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  =end~
    +** Processing line: ~    }.merge options~
     - Inside source: true
     *** True Line Result
    -  =end
    +    }.merge options
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # This sample app provides a visual demonstration of a standard controller, including~
    -- Inside source: true
    -*** True Line Result
    -  # This sample app provides a visual demonstration of a standard controller, including
    -** Processing line: ~  # the placement and function of all buttons.~
    -- Inside source: true
    -*** True Line Result
    -  # the placement and function of all buttons.
    -** Processing line: ~~
    +** Processing line: ~    [~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  class ControllerDemo~
    +    [
    +** Processing line: ~      options[:x], options[:y], options[:w], options[:h], # dest rect keys~
     - Inside source: true
     *** True Line Result
    -  class ControllerDemo
    -** Processing line: ~    attr_accessor :inputs, :state, :outputs~
    +      options[:x], options[:y], options[:w], options[:h], # dest rect keys
    +** Processing line: ~      path,~
     - Inside source: true
     *** True Line Result
    -    attr_accessor :inputs, :state, :outputs
    -** Processing line: ~~
    +      path,
    +** Processing line: ~      options[:angle], options[:a], options[:r], options[:g], options[:b], # angle, color, alpha~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # Calls the methods necessary for the app to run successfully.~
    +      options[:angle], options[:a], options[:r], options[:g], options[:b], # angle, color, alpha
    +** Processing line: ~      options[:source_x], options[:source_y], options[:source_w], options[:source_h], # source rect keys~
     - Inside source: true
     *** True Line Result
    -    # Calls the methods necessary for the app to run successfully.
    -** Processing line: ~    def tick~
    +      options[:source_x], options[:source_y], options[:source_w], options[:source_h], # source rect keys
    +** Processing line: ~      options[:flip_h], options[:flip_v], # flip~
     - Inside source: true
     *** True Line Result
    -    def tick
    -** Processing line: ~      process_inputs~
    +      options[:flip_h], options[:flip_v], # flip
    +** Processing line: ~      options[:rotation_anchor_x], options[:rotation_anchor_y], # rotation anchor~
     - Inside source: true
     *** True Line Result
    -      process_inputs
    -** Processing line: ~      render~
    +      options[:rotation_anchor_x], options[:rotation_anchor_y], # rotation anchor
    +** Processing line: ~    ] # hash keys contain corresponding values~
     - Inside source: true
     *** True Line Result
    -      render
    -** Processing line: ~    end~
    +    ] # hash keys contain corresponding values
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    end
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Starts with an empty collection of buttons.~
    +** Processing line: ~  # Calls the calc_pos and calc_wrap methods.~
     - Inside source: true
     *** True Line Result
    -    # Starts with an empty collection of buttons.
    -** Processing line: ~    # Adds buttons that are on the controller to the collection.~
    +  # Calls the calc_pos and calc_wrap methods.
    +** Processing line: ~  def calc state~
     - Inside source: true
     *** True Line Result
    -    # Adds buttons that are on the controller to the collection.
    -** Processing line: ~    def process_inputs~
    +  def calc state
    +** Processing line: ~    calc_pos state~
     - Inside source: true
     *** True Line Result
    -    def process_inputs
    -** Processing line: ~      state.buttons = []~
    +    calc_pos state
    +** Processing line: ~    calc_wrap state~
     - Inside source: true
     *** True Line Result
    -      state.buttons = []
    +    calc_wrap state
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      state.buttons << [100, 500, inputs.controller_one.key_held.l1, "L1"]~
    +** Processing line: ~  # Changes sprite's position on screen~
     - Inside source: true
     *** True Line Result
    -      state.buttons << [100, 500, inputs.controller_one.key_held.l1, "L1"]
    -** Processing line: ~      state.buttons << [100, 600, inputs.controller_one.key_held.l2, "L2"]~
    +  # Changes sprite's position on screen
    +** Processing line: ~  # Vectors have magnitude and direction, so the incremented x and y values give the car direction~
     - Inside source: true
     *** True Line Result
    -      state.buttons << [100, 600, inputs.controller_one.key_held.l2, "L2"]
    -** Processing line: ~~
    +  # Vectors have magnitude and direction, so the incremented x and y values give the car direction
    +** Processing line: ~  def calc_pos state~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      state.buttons << [1100, 500, inputs.controller_one.key_held.r1, "R1"]~
    +  def calc_pos state
    +** Processing line: ~    state.x     += state.angle.vector_x * state.speed # increments x by product of angle's x vector and speed~
     - Inside source: true
     *** True Line Result
    -      state.buttons << [1100, 500, inputs.controller_one.key_held.r1, "R1"]
    -** Processing line: ~      state.buttons << [1100, 600, inputs.controller_one.key_held.r2, "R2"]~
    +    state.x     += state.angle.vector_x * state.speed # increments x by product of angle's x vector and speed
    +** Processing line: ~    state.y     += state.angle.vector_y * state.speed # increments y by product of angle's y vector and speed~
     - Inside source: true
     *** True Line Result
    -      state.buttons << [1100, 600, inputs.controller_one.key_held.r2, "R2"]
    -** Processing line: ~~
    +    state.y     += state.angle.vector_y * state.speed # increments y by product of angle's y vector and speed
    +** Processing line: ~    state.speed *= 1.1 # scales speed up~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      state.buttons << [540, 450, inputs.controller_one.key_held.select, "Select"]~
    +    state.speed *= 1.1 # scales speed up
    +** Processing line: ~    state.speed  = state.speed.lesser(state.max_speed) # speed is either current speed or max speed, whichever has a lesser value (ensures that the car doesn't go too fast or exceed the max speed)~
     - Inside source: true
     *** True Line Result
    -      state.buttons << [540, 450, inputs.controller_one.key_held.select, "Select"]
    -** Processing line: ~      state.buttons << [660, 450, inputs.controller_one.key_held.start, "Start"]~
    +    state.speed  = state.speed.lesser(state.max_speed) # speed is either current speed or max speed, whichever has a lesser value (ensures that the car doesn't go too fast or exceed the max speed)
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -      state.buttons << [660, 450, inputs.controller_one.key_held.start, "Start"]
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      state.buttons << [200, 300, inputs.controller_one.key_held.left, "Left"]~
    -- Inside source: true
    -*** True Line Result
    -      state.buttons << [200, 300, inputs.controller_one.key_held.left, "Left"]
    -** Processing line: ~      state.buttons << [300, 400, inputs.controller_one.key_held.up, "Up"]~
    +** Processing line: ~  # The screen's dimensions are 1280x720. If the car goes out of scope,~
     - Inside source: true
     *** True Line Result
    -      state.buttons << [300, 400, inputs.controller_one.key_held.up, "Up"]
    -** Processing line: ~      state.buttons << [400, 300, inputs.controller_one.key_held.right, "Right"]~
    +  # The screen's dimensions are 1280x720. If the car goes out of scope,
    +** Processing line: ~  # it loops back around on the screen.~
     - Inside source: true
     *** True Line Result
    -      state.buttons << [400, 300, inputs.controller_one.key_held.right, "Right"]
    -** Processing line: ~      state.buttons << [300, 200, inputs.controller_one.key_held.down, "Down"]~
    +  # it loops back around on the screen.
    +** Processing line: ~  def calc_wrap state~
     - Inside source: true
     *** True Line Result
    -      state.buttons << [300, 200, inputs.controller_one.key_held.down, "Down"]
    +  def calc_wrap state
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      state.buttons << [800, 300, inputs.controller_one.key_held.x, "X"]~
    -- Inside source: true
    -*** True Line Result
    -      state.buttons << [800, 300, inputs.controller_one.key_held.x, "X"]
    -** Processing line: ~      state.buttons << [900, 400, inputs.controller_one.key_held.y, "Y"]~
    +** Processing line: ~    # car returns to left side of screen if it disappears on right side of screen~
     - Inside source: true
     *** True Line Result
    -      state.buttons << [900, 400, inputs.controller_one.key_held.y, "Y"]
    -** Processing line: ~      state.buttons << [1000, 300, inputs.controller_one.key_held.a, "A"]~
    +    # car returns to left side of screen if it disappears on right side of screen
    +** Processing line: ~    # sprite.width refers to tile's size, which is multipled by scale (4) to make it bigger~
     - Inside source: true
     *** True Line Result
    -      state.buttons << [1000, 300, inputs.controller_one.key_held.a, "A"]
    -** Processing line: ~      state.buttons << [900, 200, inputs.controller_one.key_held.b, "B"]~
    +    # sprite.width refers to tile's size, which is multipled by scale (4) to make it bigger
    +** Processing line: ~    state.x = -state.sprite.width * state.sprite.scale if state.x - 20 > 1280~
     - Inside source: true
     *** True Line Result
    -      state.buttons << [900, 200, inputs.controller_one.key_held.b, "B"]
    +    state.x = -state.sprite.width * state.sprite.scale if state.x - 20 > 1280
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      state.buttons << [450 + inputs.controller_one.left_analog_x_perc * 100,~
    -- Inside source: true
    -*** True Line Result
    -      state.buttons << [450 + inputs.controller_one.left_analog_x_perc * 100,
    -** Processing line: ~                        100 + inputs.controller_one.left_analog_y_perc * 100,~
    -- Inside source: true
    -*** True Line Result
    -                        100 + inputs.controller_one.left_analog_y_perc * 100,
    -** Processing line: ~                        inputs.controller_one.key_held.l3,~
    +** Processing line: ~    # car wraps around to right side of screen if it disappears on the left side~
     - Inside source: true
     *** True Line Result
    -                        inputs.controller_one.key_held.l3,
    -** Processing line: ~                        "L3"]~
    +    # car wraps around to right side of screen if it disappears on the left side
    +** Processing line: ~    state.x = 1280 if state.x + state.sprite.width * state.sprite.scale + 20 < 0~
     - Inside source: true
     *** True Line Result
    -                        "L3"]
    +    state.x = 1280 if state.x + state.sprite.width * state.sprite.scale + 20 < 0
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      state.buttons << [750 + inputs.controller_one.right_analog_x_perc * 100,~
    -- Inside source: true
    -*** True Line Result
    -      state.buttons << [750 + inputs.controller_one.right_analog_x_perc * 100,
    -** Processing line: ~                        100 + inputs.controller_one.right_analog_y_perc * 100,~
    -- Inside source: true
    -*** True Line Result
    -                        100 + inputs.controller_one.right_analog_y_perc * 100,
    -** Processing line: ~                        inputs.controller_one.key_held.r3,~
    +** Processing line: ~    # car wraps around to bottom of screen if it disappears at the top of the screen~
     - Inside source: true
     *** True Line Result
    -                        inputs.controller_one.key_held.r3,
    -** Processing line: ~                        "R3"]~
    +    # car wraps around to bottom of screen if it disappears at the top of the screen
    +** Processing line: ~    # if you subtract 520 pixels instead of 20 pixels, the car takes longer to reappear (try it!)~
     - Inside source: true
     *** True Line Result
    -                        "R3"]
    -** Processing line: ~    end~
    +    # if you subtract 520 pixels instead of 20 pixels, the car takes longer to reappear (try it!)
    +** Processing line: ~    state.y = 0    if state.y - 20 > 720 # if 20 pixels less than car's y position is greater than vertical scope~
     - Inside source: true
     *** True Line Result
    -    end
    +    state.y = 0    if state.y - 20 > 720 # if 20 pixels less than car's y position is greater than vertical scope
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Gives each button a square shape.~
    +** Processing line: ~    # car wraps around to top of screen if it disappears at the bottom of the screen~
     - Inside source: true
     *** True Line Result
    -    # Gives each button a square shape.
    -** Processing line: ~    # If the button is being pressed or held (which means it is considered active),~
    +    # car wraps around to top of screen if it disappears at the bottom of the screen
    +** Processing line: ~    state.y = 720  if state.y + state.sprite.height * state.sprite.scale + 20 < 0~
     - Inside source: true
     *** True Line Result
    -    # If the button is being pressed or held (which means it is considered active),
    -** Processing line: ~    # the square is filled in. Otherwise, the button simply has a border.~
    +    state.y = 720  if state.y + state.sprite.height * state.sprite.scale + 20 < 0
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    # the square is filled in. Otherwise, the button simply has a border.
    -** Processing line: ~    def render~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    def render
    -** Processing line: ~      state.buttons.each do |x, y, active, text|~
    +
    +** Processing line: ~  # Changes angle of sprite based on user input from keyboard or controller~
     - Inside source: true
     *** True Line Result
    -      state.buttons.each do |x, y, active, text|
    -** Processing line: ~        rect = [x, y, 75, 75]~
    +  # Changes angle of sprite based on user input from keyboard or controller
    +** Processing line: ~  def process_inputs args~
     - Inside source: true
     *** True Line Result
    -        rect = [x, y, 75, 75]
    +  def process_inputs args
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~        if active # if button is pressed~
    +** Processing line: ~    # NOTE: increasing the angle doesn't mean that the car will continue to go~
     - Inside source: true
     *** True Line Result
    -        if active # if button is pressed
    -** Processing line: ~          outputs.solids << rect # rect is output as solid (filled in)~
    +    # NOTE: increasing the angle doesn't mean that the car will continue to go
    +** Processing line: ~    # in a specific direction. The angle is increasing, which means that if the~
     - Inside source: true
     *** True Line Result
    -          outputs.solids << rect # rect is output as solid (filled in)
    -** Processing line: ~        else~
    +    # in a specific direction. The angle is increasing, which means that if the
    +** Processing line: ~    # left key was kept in the "down" state, the change in the angle would cause~
     - Inside source: true
     *** True Line Result
    -        else
    -** Processing line: ~          outputs.borders << rect # otherwise, output as border~
    +    # left key was kept in the "down" state, the change in the angle would cause
    +** Processing line: ~    # the car to go in a counter-clockwise direction and form a circle (360 degrees)~
     - Inside source: true
     *** True Line Result
    -          outputs.borders << rect # otherwise, output as border
    -** Processing line: ~        end~
    +    # the car to go in a counter-clockwise direction and form a circle (360 degrees)
    +** Processing line: ~    if args.inputs.keyboard.key_held.left # if left key is pressed~
     - Inside source: true
     *** True Line Result
    -        end
    +    if args.inputs.keyboard.key_held.left # if left key is pressed
    +** Processing line: ~      args.state.angle += 2 # car's angle is incremented by 2~
    +- Inside source: true
    +*** True Line Result
    +      args.state.angle += 2 # car's angle is incremented by 2
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~        # Outputs the text of each button using labels.~
    +** Processing line: ~    # The same applies to decreasing the angle. If the right key was kept in the~
     - Inside source: true
     *** True Line Result
    -        # Outputs the text of each button using labels.
    -** Processing line: ~        outputs.labels << [x, y + 95, text] # add 95 to place label above button~
    +    # The same applies to decreasing the angle. If the right key was kept in the
    +** Processing line: ~    # "down" state, the decreasing angle would cause the car to go in a clockwise~
     - Inside source: true
     *** True Line Result
    -        outputs.labels << [x, y + 95, text] # add 95 to place label above button
    -** Processing line: ~      end~
    +    # "down" state, the decreasing angle would cause the car to go in a clockwise
    +** Processing line: ~    # direction and form a circle (360 degrees)~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +    # direction and form a circle (360 degrees)
    +** Processing line: ~    elsif args.inputs.keyboard.key_held.right # if right key is pressed~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      outputs.labels << [10, 60, "Left Analog x: #{inputs.controller_one.left_analog_x_raw} (#{inputs.controller_one.left_analog_x_perc * 100}%)"]~
    +    elsif args.inputs.keyboard.key_held.right # if right key is pressed
    +** Processing line: ~      args.state.angle -= 2 # car's angle is decremented by 2~
    +- Inside source: true
    +*** True Line Result
    +      args.state.angle -= 2 # car's angle is decremented by 2
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << [10, 60, "Left Analog x: #{inputs.controller_one.left_analog_x_raw} (#{inputs.controller_one.left_analog_x_perc * 100}%)"]
    -** Processing line: ~      outputs.labels << [10, 30, "Left Analog y: #{inputs.controller_one.left_analog_y_raw} (#{inputs.controller_one.left_analog_y_perc * 100}%)"]~
    +
    +** Processing line: ~    # Input from a controller can also change the angle of the car~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << [10, 30, "Left Analog y: #{inputs.controller_one.left_analog_y_raw} (#{inputs.controller_one.left_analog_y_perc * 100}%)"]
    -** Processing line: ~      outputs.labels << [900, 60, "Right Analog x: #{inputs.controller_one.right_analog_x_raw} (#{inputs.controller_one.right_analog_x_perc * 100}%)"]~
    +    # Input from a controller can also change the angle of the car
    +** Processing line: ~    elsif args.inputs.controller_one.left_analog_x_perc != 0~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << [900, 60, "Right Analog x: #{inputs.controller_one.right_analog_x_raw} (#{inputs.controller_one.right_analog_x_perc * 100}%)"]
    -** Processing line: ~      outputs.labels << [900, 30, "Right Analog y: #{inputs.controller_one.right_analog_y_raw} (#{inputs.controller_one.right_analog_y_perc * 100}%)"]~
    +    elsif args.inputs.controller_one.left_analog_x_perc != 0
    +** Processing line: ~      args.state.angle += 2 * args.inputs.controller_one.left_analog_x_perc * -1~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << [900, 30, "Right Analog y: #{inputs.controller_one.right_analog_y_raw} (#{inputs.controller_one.right_analog_y_perc * 100}%)"]
    +      args.state.angle += 2 * args.inputs.controller_one.left_analog_x_perc * -1
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -19308,38 +19687,50 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  $controller_demo = ControllerDemo.new~
    +** Processing line: ~  # A sprite's center of rotation can be altered~
     - Inside source: true
     *** True Line Result
    -  $controller_demo = ControllerDemo.new
    -** Processing line: ~~
    +  # A sprite's center of rotation can be altered
    +** Processing line: ~  # Increasing either of these numbers would dramatically increase the~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def tick args~
    +  # Increasing either of these numbers would dramatically increase the
    +** Processing line: ~  # car's drift when it turns!~
     - Inside source: true
     *** True Line Result
    -  def tick args
    -** Processing line: ~    tick_instructions args, "Sample app shows how controller input is handled. You'll need to connect a USB controller."~
    +  # car's drift when it turns!
    +** Processing line: ~  def rotation_anchor~
     - Inside source: true
     *** True Line Result
    -    tick_instructions args, "Sample app shows how controller input is handled. You'll need to connect a USB controller."
    -** Processing line: ~    $controller_demo.inputs = args.inputs~
    +  def rotation_anchor
    +** Processing line: ~    [0.7, 0.5]~
     - Inside source: true
     *** True Line Result
    -    $controller_demo.inputs = args.inputs
    -** Processing line: ~    $controller_demo.state = args.state~
    +    [0.7, 0.5]
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    $controller_demo.state = args.state
    -** Processing line: ~    $controller_demo.outputs = args.outputs~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    $controller_demo.outputs = args.outputs
    -** Processing line: ~    $controller_demo.tick~
    +
    +** Processing line: ~  # Sets opacity value of sprite to 255 so that it is not transparent at all~
     - Inside source: true
     *** True Line Result
    -    $controller_demo.tick
    +  # Sets opacity value of sprite to 255 so that it is not transparent at all
    +** Processing line: ~  # Change it to 0 and you won't be able to see the car sprite on the screen~
    +- Inside source: true
    +*** True Line Result
    +  # Change it to 0 and you won't be able to see the car sprite on the screen
    +** Processing line: ~  def opacity~
    +- Inside source: true
    +*** True Line Result
    +  def opacity
    +** Processing line: ~    255~
    +- Inside source: true
    +*** True Line Result
    +    255
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -19348,18 +19739,18 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # Resets the app.~
    +** Processing line: ~  # Sets the color of the sprite to white.~
     - Inside source: true
     *** True Line Result
    -  # Resets the app.
    -** Processing line: ~  def r~
    +  # Sets the color of the sprite to white.
    +** Processing line: ~  def saturation~
     - Inside source: true
     *** True Line Result
    -  def r
    -** Processing line: ~    $gtk.reset~
    +  def saturation
    +** Processing line: ~    [255, 255, 255]~
     - Inside source: true
     *** True Line Result
    -    $gtk.reset
    +    [255, 255, 255]
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -19368,54 +19759,54 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def tick_instructions args, text, y = 715~
    +** Processing line: ~  # Sets definition of destination_rect (used to define the car sprite)~
     - Inside source: true
     *** True Line Result
    -  def tick_instructions args, text, y = 715
    -** Processing line: ~    return if args.state.key_event_occurred~
    +  # Sets definition of destination_rect (used to define the car sprite)
    +** Processing line: ~  def destination_rect state~
     - Inside source: true
     *** True Line Result
    -    return if args.state.key_event_occurred
    -** Processing line: ~    if args.inputs.mouse.click ||~
    +  def destination_rect state
    +** Processing line: ~    [state.x, state.y,~
     - Inside source: true
     *** True Line Result
    -    if args.inputs.mouse.click ||
    -** Processing line: ~       args.inputs.keyboard.directional_vector ||~
    +    [state.x, state.y,
    +** Processing line: ~    state.sprite.width  * state.sprite.scale, # multiplies by 4 to set size~
     - Inside source: true
     *** True Line Result
    -       args.inputs.keyboard.directional_vector ||
    -** Processing line: ~       args.inputs.keyboard.key_down.enter ||~
    +    state.sprite.width  * state.sprite.scale, # multiplies by 4 to set size
    +** Processing line: ~    state.sprite.height * state.sprite.scale]~
     - Inside source: true
     *** True Line Result
    -       args.inputs.keyboard.key_down.enter ||
    -** Processing line: ~       args.inputs.keyboard.key_down.escape~
    +    state.sprite.height * state.sprite.scale]
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -       args.inputs.keyboard.key_down.escape
    -** Processing line: ~      args.state.key_event_occurred = true~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      args.state.key_event_occurred = true
    -** Processing line: ~    end~
    +
    +** Processing line: ~  # Portion of a sprite (a tile)~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +  # Portion of a sprite (a tile)
    +** Processing line: ~  # Sub division of sprite is denoted as a rectangle directly related to original size of .png~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    args.outputs.debug << [0, y - 50, 1280, 60].solid~
    +  # Sub division of sprite is denoted as a rectangle directly related to original size of .png
    +** Processing line: ~  # Tile is located at bottom left corner within a 19x10 pixel rectangle (based on sprite.width, sprite.height)~
     - Inside source: true
     *** True Line Result
    -    args.outputs.debug << [0, y - 50, 1280, 60].solid
    -** Processing line: ~    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label~
    +  # Tile is located at bottom left corner within a 19x10 pixel rectangle (based on sprite.width, sprite.height)
    +** Processing line: ~  def source_rect state~
     - Inside source: true
     *** True Line Result
    -    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label
    -** Processing line: ~    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label~
    +  def source_rect state
    +** Processing line: ~    [0, 0, state.sprite.width, state.sprite.height]~
     - Inside source: true
     *** True Line Result
    -    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label
    +    [0, 0, state.sprite.width, state.sprite.height]
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -19432,358 +19823,354 @@ Follows is a source code listing for all files that have been open sourced. This
     - End of paragraph detected.
     *** True Line Result
     
    -** Processing line: ~*** Input Basics - Touch - main.rb~
    +** Processing line: ~*** Physics And Collisions - Simple - main.rb~
     - Header detected.
     *** True Line Result
     
     *** True Line Result
    -*** Input Basics - Touch - main.rb
    +*** Physics And Collisions - Simple - main.rb
     ** Processing line: ~#+begin_src ruby~
     - Line was identified as the beginning of a code block.
     *** True Line Result
     
     *** True Line Result
     #+begin_src ruby
    -** Processing line: ~  # ./samples/02_input_basics/06_touch/app/main.rb~
    +** Processing line: ~  # ./samples/04_physics_and_collisions/01_simple/app/main.rb~
     - Inside source: true
     *** True Line Result
    -  # ./samples/02_input_basics/06_touch/app/main.rb
    -** Processing line: ~  def tick args~
    +  # ./samples/04_physics_and_collisions/01_simple/app/main.rb
    +** Processing line: ~  =begin~
     - Inside source: true
     *** True Line Result
    -  def tick args
    -** Processing line: ~    args.outputs.background_color = [ 0, 0, 0 ]~
    +  =begin
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    args.outputs.background_color = [ 0, 0, 0 ]
    -** Processing line: ~    args.outputs.primitives << [640, 700, "Touch your screen.", 5, 1, 255, 255, 255].label~
    +
    +** Processing line: ~   Reminders:~
     - Inside source: true
     *** True Line Result
    -    args.outputs.primitives << [640, 700, "Touch your screen.", 5, 1, 255, 255, 255].label
    +   Reminders:
    +** Processing line: ~   - ARRAY#intersect_rect?: Returns true or false depending on if the two rectangles intersect.~
    +- Inside source: true
    +*** True Line Result
    +   - ARRAY#intersect_rect?: Returns true or false depending on if the two rectangles intersect.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # If you don't want to get fancy, you can just look for finger_one~
    +** Processing line: ~   - args.outputs.solids: An array. The values generate a solid.~
     - Inside source: true
     *** True Line Result
    -    # If you don't want to get fancy, you can just look for finger_one
    -** Processing line: ~    #  (and _two, if you like), which are assigned in the order new touches hit~
    +   - args.outputs.solids: An array. The values generate a solid.
    +** Processing line: ~     The parameters are [X, Y, WIDTH, HEIGHT, RED, GREEN, BLUE]~
     - Inside source: true
     *** True Line Result
    -    #  (and _two, if you like), which are assigned in the order new touches hit
    -** Processing line: ~    #  the screen. If not nil, they are touching right now, and are just~
    +     The parameters are [X, Y, WIDTH, HEIGHT, RED, GREEN, BLUE]
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    #  the screen. If not nil, they are touching right now, and are just
    -** Processing line: ~    #  references to specific items in the args.input.touch hash.~
    +
    +** Processing line: ~  =end~
     - Inside source: true
     *** True Line Result
    -    #  references to specific items in the args.input.touch hash.
    -** Processing line: ~    # If finger_one lifts off, it will become nil, but finger_two, if it was~
    +  =end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    # If finger_one lifts off, it will become nil, but finger_two, if it was
    -** Processing line: ~    #  touching, remains until it also lifts off. When all fingers lift off, the~
    +
    +** Processing line: ~  # This sample app shows collisions between two boxes.~
     - Inside source: true
     *** True Line Result
    -    #  touching, remains until it also lifts off. When all fingers lift off, the
    -** Processing line: ~    #  the next new touch will be finger_one again, but until then, new touches~
    +  # This sample app shows collisions between two boxes.
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    #  the next new touch will be finger_one again, but until then, new touches
    -** Processing line: ~    #  don't fill in earlier slots.~
    +
    +** Processing line: ~  # Runs methods needed for game to run properly.~
     - Inside source: true
     *** True Line Result
    -    #  don't fill in earlier slots.
    -** Processing line: ~    if !args.inputs.finger_one.nil?~
    +  # Runs methods needed for game to run properly.
    +** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
    -    if !args.inputs.finger_one.nil?
    -** Processing line: ~      args.outputs.primitives << [640, 650, "Finger #1 is touching at (#{args.inputs.finger_one.x}, #{args.inputs.finger_one.y}).", 5, 1, 255, 255, 255].label~
    +  def tick args
    +** Processing line: ~    tick_instructions args, "Sample app shows how to move a square over time and determine collision."~
     - Inside source: true
     *** True Line Result
    -      args.outputs.primitives << [640, 650, "Finger #1 is touching at (#{args.inputs.finger_one.x}, #{args.inputs.finger_one.y}).", 5, 1, 255, 255, 255].label
    -** Processing line: ~    end~
    +    tick_instructions args, "Sample app shows how to move a square over time and determine collision."
    +** Processing line: ~    defaults args~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~    if !args.inputs.finger_two.nil?~
    +    defaults args
    +** Processing line: ~    render args~
     - Inside source: true
     *** True Line Result
    -    if !args.inputs.finger_two.nil?
    -** Processing line: ~      args.outputs.primitives << [640, 600, "Finger #2 is touching at (#{args.inputs.finger_two.x}, #{args.inputs.finger_two.y}).", 5, 1, 255, 255, 255].label~
    +    render args
    +** Processing line: ~    calc args~
     - Inside source: true
     *** True Line Result
    -      args.outputs.primitives << [640, 600, "Finger #2 is touching at (#{args.inputs.finger_two.x}, #{args.inputs.finger_two.y}).", 5, 1, 255, 255, 255].label
    -** Processing line: ~    end~
    +    calc args
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    end
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Here's the more flexible interface: this will report as many simultaneous~
    +** Processing line: ~  # Sets default values.~
     - Inside source: true
     *** True Line Result
    -    # Here's the more flexible interface: this will report as many simultaneous
    -** Processing line: ~    #  touches as the system can handle, but it's a little more effort to track~
    +  # Sets default values.
    +** Processing line: ~  def defaults args~
     - Inside source: true
     *** True Line Result
    -    #  touches as the system can handle, but it's a little more effort to track
    -** Processing line: ~    #  them. Each item in the args.input.touch hash has a unique key (an~
    +  def defaults args
    +** Processing line: ~    # These values represent the moving box.~
     - Inside source: true
     *** True Line Result
    -    #  them. Each item in the args.input.touch hash has a unique key (an
    -** Processing line: ~    #  incrementing integer) that exists until the finger lifts off. You can~
    +    # These values represent the moving box.
    +** Processing line: ~    args.state.moving_box_speed   = 10~
     - Inside source: true
     *** True Line Result
    -    #  incrementing integer) that exists until the finger lifts off. You can
    -** Processing line: ~    #  tell which order the touches happened globally by the key value, or~
    +    args.state.moving_box_speed   = 10
    +** Processing line: ~    args.state.moving_box_size    = 100~
     - Inside source: true
     *** True Line Result
    -    #  tell which order the touches happened globally by the key value, or
    -** Processing line: ~    #  by the touch[id].touch_order field, which resets to zero each time all~
    +    args.state.moving_box_size    = 100
    +** Processing line: ~    args.state.moving_box_dx    ||=  1~
     - Inside source: true
     *** True Line Result
    -    #  by the touch[id].touch_order field, which resets to zero each time all
    -** Processing line: ~    #  touches have lifted.~
    +    args.state.moving_box_dx    ||=  1
    +** Processing line: ~    args.state.moving_box_dy    ||=  1~
     - Inside source: true
     *** True Line Result
    -    #  touches have lifted.
    +    args.state.moving_box_dy    ||=  1
    +** Processing line: ~    args.state.moving_box       ||= [0, 0, args.state.moving_box_size, args.state.moving_box_size] # moving_box_size is set as the width and height~
    +- Inside source: true
    +*** True Line Result
    +    args.state.moving_box       ||= [0, 0, args.state.moving_box_size, args.state.moving_box_size] # moving_box_size is set as the width and height
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    args.state.colors ||= [~
    +** Processing line: ~    # These values represent the center box.~
     - Inside source: true
     *** True Line Result
    -    args.state.colors ||= [
    -** Processing line: ~      0xFF0000, 0x00FF00, 0x1010FF, 0xFFFF00, 0xFF00FF, 0x00FFFF, 0xFFFFFF~
    +    # These values represent the center box.
    +** Processing line: ~    args.state.center_box ||= [540, 260, 200, 200, 180]~
     - Inside source: true
     *** True Line Result
    -      0xFF0000, 0x00FF00, 0x1010FF, 0xFFFF00, 0xFF00FF, 0x00FFFF, 0xFFFFFF
    -** Processing line: ~    ]~
    +    args.state.center_box ||= [540, 260, 200, 200, 180]
    +** Processing line: ~    args.state.center_box_collision ||= false # initially no collision~
     - Inside source: true
     *** True Line Result
    -    ]
    +    args.state.center_box_collision ||= false # initially no collision
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    size = 100~
    +** Processing line: ~  def render args~
     - Inside source: true
     *** True Line Result
    -    size = 100
    -** Processing line: ~    args.inputs.touch.each { |k,v|~
    +  def render args
    +** Processing line: ~    # If the game state denotes that a collision has occured,~
     - Inside source: true
     *** True Line Result
    -    args.inputs.touch.each { |k,v|
    -** Processing line: ~      color = args.state.colors[v.touch_order % 7]~
    +    # If the game state denotes that a collision has occured,
    +** Processing line: ~    # render a solid square, otherwise render a border instead.~
     - Inside source: true
     *** True Line Result
    -      color = args.state.colors[v.touch_order % 7]
    -** Processing line: ~      r = (color & 0xFF0000) >> 16~
    +    # render a solid square, otherwise render a border instead.
    +** Processing line: ~    if args.state.center_box_collision~
     - Inside source: true
     *** True Line Result
    -      r = (color & 0xFF0000) >> 16
    -** Processing line: ~      g = (color & 0x00FF00) >> 8~
    +    if args.state.center_box_collision
    +** Processing line: ~      args.outputs.solids << args.state.center_box~
     - Inside source: true
     *** True Line Result
    -      g = (color & 0x00FF00) >> 8
    -** Processing line: ~      b = (color & 0x0000FF)~
    +      args.outputs.solids << args.state.center_box
    +** Processing line: ~    else~
     - Inside source: true
     *** True Line Result
    -      b = (color & 0x0000FF)
    -** Processing line: ~      args.outputs.primitives << [v.x - (size / 2), v.y + (size / 2), size, size, r, g, b, 255].solid~
    +    else
    +** Processing line: ~      args.outputs.borders << args.state.center_box~
     - Inside source: true
     *** True Line Result
    -      args.outputs.primitives << [v.x - (size / 2), v.y + (size / 2), size, size, r, g, b, 255].solid
    -** Processing line: ~      args.outputs.primitives << [v.x, v.y + size, k.to_s, 0, 1, 0, 0, 0].label~
    +      args.outputs.borders << args.state.center_box
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      args.outputs.primitives << [v.x, v.y + size, k.to_s, 0, 1, 0, 0, 0].label
    -** Processing line: ~    }~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    }
    -** Processing line: ~  end~
    +
    +** Processing line: ~    # Then render the moving box.~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +    # Then render the moving box.
    +** Processing line: ~    args.outputs.solids << args.state.moving_box~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~~
    +    args.outputs.solids << args.state.moving_box
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~#+end_src~
    -- Line was identified as the end of a code block.
    -*** True Line Result
    -#+end_src
    +  end
     ** Processing line: ~~
    -- End of paragraph detected.
    -*** True Line Result
    -
    -** Processing line: ~*** Rendering Sprites - Animation Using Separate Pngs - main.rb~
    -- Header detected.
    -*** True Line Result
    -
    -*** True Line Result
    -*** Rendering Sprites - Animation Using Separate Pngs - main.rb
    -** Processing line: ~#+begin_src ruby~
    -- Line was identified as the beginning of a code block.
    +- Inside source: true
     *** True Line Result
     
    -*** True Line Result
    -#+begin_src ruby
    -** Processing line: ~  # ./samples/03_rendering_sprites/01_animation_using_separate_pngs/app/main.rb~
    +** Processing line: ~  # Generally in a pipeline for a game engine, you have rendering,~
     - Inside source: true
     *** True Line Result
    -  # ./samples/03_rendering_sprites/01_animation_using_separate_pngs/app/main.rb
    -** Processing line: ~  =begin~
    +  # Generally in a pipeline for a game engine, you have rendering,
    +** Processing line: ~  # game simulation (calculation), and input processing.~
     - Inside source: true
     *** True Line Result
    -  =begin
    -** Processing line: ~~
    +  # game simulation (calculation), and input processing.
    +** Processing line: ~  # This fuction represents the game simulation.~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   Reminders:~
    +  # This fuction represents the game simulation.
    +** Processing line: ~  def calc args~
     - Inside source: true
     *** True Line Result
    -   Reminders:
    -** Processing line: ~~
    +  def calc args
    +** Processing line: ~    position_moving_box args~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   - String interpolation: Uses #{} syntax; everything between the #{ and the } is evaluated~
    +    position_moving_box args
    +** Processing line: ~    determine_collision_center_box args~
     - Inside source: true
     *** True Line Result
    -   - String interpolation: Uses #{} syntax; everything between the #{ and the } is evaluated
    -** Processing line: ~     as Ruby code, and the placeholder is replaced with its corresponding value or result.~
    +    determine_collision_center_box args
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -     as Ruby code, and the placeholder is replaced with its corresponding value or result.
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~     In this sample app, we're using string interpolation to iterate through images in the~
    +** Processing line: ~  # Changes the position of the moving box on the screen by multiplying the change in x (dx) and change in y (dy) by the speed,~
     - Inside source: true
     *** True Line Result
    -     In this sample app, we're using string interpolation to iterate through images in the
    -** Processing line: ~     sprites folder using their image path names.~
    +  # Changes the position of the moving box on the screen by multiplying the change in x (dx) and change in y (dy) by the speed,
    +** Processing line: ~  # and adding it to the current position.~
     - Inside source: true
     *** True Line Result
    -     sprites folder using their image path names.
    -** Processing line: ~~
    +  # and adding it to the current position.
    +** Processing line: ~  # dx and dy are positive if the box is moving right and up, respectively~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   - args.outputs.sprites: An array. Values in this array generate sprites on the screen.~
    +  # dx and dy are positive if the box is moving right and up, respectively
    +** Processing line: ~  # dx and dy are negative if the box is moving left and down, respectively~
     - Inside source: true
     *** True Line Result
    -   - args.outputs.sprites: An array. Values in this array generate sprites on the screen.
    -** Processing line: ~     The parameters are [X, Y, WIDTH, HEIGHT, IMAGE PATH]~
    +  # dx and dy are negative if the box is moving left and down, respectively
    +** Processing line: ~  def position_moving_box args~
     - Inside source: true
     *** True Line Result
    -     The parameters are [X, Y, WIDTH, HEIGHT, IMAGE PATH]
    -** Processing line: ~     For more information about sprites, go to mygame/documentation/05-sprites.md.~
    +  def position_moving_box args
    +** Processing line: ~    args.state.moving_box.x += args.state.moving_box_dx * args.state.moving_box_speed~
     - Inside source: true
     *** True Line Result
    -     For more information about sprites, go to mygame/documentation/05-sprites.md.
    +    args.state.moving_box.x += args.state.moving_box_dx * args.state.moving_box_speed
    +** Processing line: ~    args.state.moving_box.y += args.state.moving_box_dy * args.state.moving_box_speed~
    +- Inside source: true
    +*** True Line Result
    +    args.state.moving_box.y += args.state.moving_box_dy * args.state.moving_box_speed
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~   - args.outputs.labels: An array. Values in the array generate labels on the screen.~
    +** Processing line: ~    # 1280x720 are the virtual pixels you work with (essentially 720p).~
     - Inside source: true
     *** True Line Result
    -   - args.outputs.labels: An array. Values in the array generate labels on the screen.
    -** Processing line: ~     The parameters are [X, Y, TEXT, SIZE, ALIGNMENT, RED, GREEN, BLUE, ALPHA, FONT STYLE]~
    +    # 1280x720 are the virtual pixels you work with (essentially 720p).
    +** Processing line: ~    screen_width  = 1280~
     - Inside source: true
     *** True Line Result
    -     The parameters are [X, Y, TEXT, SIZE, ALIGNMENT, RED, GREEN, BLUE, ALPHA, FONT STYLE]
    -** Processing line: ~     For more information about labels, go to mygame/documentation/02-labels.md.~
    +    screen_width  = 1280
    +** Processing line: ~    screen_height = 720~
     - Inside source: true
     *** True Line Result
    -     For more information about labels, go to mygame/documentation/02-labels.md.
    +    screen_height = 720
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~   - args.inputs.keyboard.key_down.KEY: Determines if a key is in the down state, or pressed.~
    +** Processing line: ~    # Position of the box is denoted by the bottom left hand corner, in~
     - Inside source: true
     *** True Line Result
    -   - args.inputs.keyboard.key_down.KEY: Determines if a key is in the down state, or pressed.
    -** Processing line: ~     Stores the frame that key was pressed on.~
    +    # Position of the box is denoted by the bottom left hand corner, in
    +** Processing line: ~    # that case, we have to subtract the width of the box so that it stays~
     - Inside source: true
     *** True Line Result
    -     Stores the frame that key was pressed on.
    -** Processing line: ~     For more information about the keyboard, go to mygame/documentation/06-keyboard.md.~
    +    # that case, we have to subtract the width of the box so that it stays
    +** Processing line: ~    # in the scene (you can try deleting the subtraction to see how it~
     - Inside source: true
     *** True Line Result
    -     For more information about the keyboard, go to mygame/documentation/06-keyboard.md.
    -** Processing line: ~~
    +    # in the scene (you can try deleting the subtraction to see how it
    +** Processing line: ~    # impacts the box's movement).~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  =end~
    +    # impacts the box's movement).
    +** Processing line: ~    if args.state.moving_box.x > screen_width - args.state.moving_box_size~
     - Inside source: true
     *** True Line Result
    -  =end
    -** Processing line: ~~
    +    if args.state.moving_box.x > screen_width - args.state.moving_box_size
    +** Processing line: ~      args.state.moving_box_dx = -1 # moves left~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  # This sample app demonstrates how sprite animations work.~
    +      args.state.moving_box_dx = -1 # moves left
    +** Processing line: ~    elsif args.state.moving_box.x < 0~
     - Inside source: true
     *** True Line Result
    -  # This sample app demonstrates how sprite animations work.
    -** Processing line: ~  # There are two sprites that animate forever and one sprite~
    +    elsif args.state.moving_box.x < 0
    +** Processing line: ~      args.state.moving_box_dx =  1 # moves right~
     - Inside source: true
     *** True Line Result
    -  # There are two sprites that animate forever and one sprite
    -** Processing line: ~  # that *only* animates when you press the "f" key on the keyboard.~
    +      args.state.moving_box_dx =  1 # moves right
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  # that *only* animates when you press the "f" key on the keyboard.
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # This is the entry point to your game. The `tick` method~
    -- Inside source: true
    -*** True Line Result
    -  # This is the entry point to your game. The `tick` method
    -** Processing line: ~  # executes at 60 frames per second. There are two methods~
    +** Processing line: ~    # Here, we're making sure the moving box remains within the vertical scope of the screen~
     - Inside source: true
     *** True Line Result
    -  # executes at 60 frames per second. There are two methods
    -** Processing line: ~  # in this tick "entry point": `looping_animation`, and the~
    +    # Here, we're making sure the moving box remains within the vertical scope of the screen
    +** Processing line: ~    if args.state.moving_box.y > screen_height - args.state.moving_box_size # if the box moves too high~
     - Inside source: true
     *** True Line Result
    -  # in this tick "entry point": `looping_animation`, and the
    -** Processing line: ~  # second method is `one_time_animation`.~
    +    if args.state.moving_box.y > screen_height - args.state.moving_box_size # if the box moves too high
    +** Processing line: ~      args.state.moving_box_dy = -1 # moves down~
     - Inside source: true
     *** True Line Result
    -  # second method is `one_time_animation`.
    -** Processing line: ~  def tick args~
    +      args.state.moving_box_dy = -1 # moves down
    +** Processing line: ~    elsif args.state.moving_box.y < 0 # if the box moves too low~
     - Inside source: true
     *** True Line Result
    -  def tick args
    -** Processing line: ~    looping_animation args~
    +    elsif args.state.moving_box.y < 0 # if the box moves too low
    +** Processing line: ~      args.state.moving_box_dy =  1 # moves up~
     - Inside source: true
     *** True Line Result
    -    looping_animation args
    -** Processing line: ~    one_time_animation args~
    +      args.state.moving_box_dy =  1 # moves up
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    one_time_animation args
    +    end
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -19792,602 +20179,598 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # This function shows how to animate a sprite that loops forever.~
    +** Processing line: ~  def determine_collision_center_box args~
     - Inside source: true
     *** True Line Result
    -  # This function shows how to animate a sprite that loops forever.
    -** Processing line: ~  def looping_animation args~
    +  def determine_collision_center_box args
    +** Processing line: ~    # Collision is handled by the engine. You simply have to call the~
     - Inside source: true
     *** True Line Result
    -  def looping_animation args
    -** Processing line: ~    # Here we define a few local variables that will be sent~
    +    # Collision is handled by the engine. You simply have to call the
    +** Processing line: ~    # `intersect_rect?` function.~
     - Inside source: true
     *** True Line Result
    -    # Here we define a few local variables that will be sent
    -** Processing line: ~    # into the magic function that gives us the correct sprite image~
    +    # `intersect_rect?` function.
    +** Processing line: ~    if args.state.moving_box.intersect_rect? args.state.center_box # if the two boxes intersect~
     - Inside source: true
     *** True Line Result
    -    # into the magic function that gives us the correct sprite image
    -** Processing line: ~    # over time. There are four things we need in order to figure~
    +    if args.state.moving_box.intersect_rect? args.state.center_box # if the two boxes intersect
    +** Processing line: ~      args.state.center_box_collision = true # then a collision happened~
     - Inside source: true
     *** True Line Result
    -    # over time. There are four things we need in order to figure
    -** Processing line: ~    # out which sprite to show.~
    +      args.state.center_box_collision = true # then a collision happened
    +** Processing line: ~    else~
     - Inside source: true
     *** True Line Result
    -    # out which sprite to show.
    -** Processing line: ~~
    +    else
    +** Processing line: ~      args.state.center_box_collision = false # otherwise, no collision happened~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # 1. When to start the animation.~
    +      args.state.center_box_collision = false # otherwise, no collision happened
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    # 1. When to start the animation.
    -** Processing line: ~    start_looping_at = 0~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    start_looping_at = 0
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # 2. The number of pngs that represent the full animation.~
    +** Processing line: ~  def tick_instructions args, text, y = 715~
     - Inside source: true
     *** True Line Result
    -    # 2. The number of pngs that represent the full animation.
    -** Processing line: ~    number_of_sprites = 6~
    +  def tick_instructions args, text, y = 715
    +** Processing line: ~    return if args.state.key_event_occurred~
     - Inside source: true
     *** True Line Result
    -    number_of_sprites = 6
    -** Processing line: ~~
    +    return if args.state.key_event_occurred
    +** Processing line: ~    if args.inputs.mouse.click ||~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # 3. How long to show each png.~
    +    if args.inputs.mouse.click ||
    +** Processing line: ~       args.inputs.keyboard.directional_vector ||~
     - Inside source: true
     *** True Line Result
    -    # 3. How long to show each png.
    -** Processing line: ~    number_of_frames_to_show_each_sprite = 4~
    +       args.inputs.keyboard.directional_vector ||
    +** Processing line: ~       args.inputs.keyboard.key_down.enter ||~
     - Inside source: true
     *** True Line Result
    -    number_of_frames_to_show_each_sprite = 4
    -** Processing line: ~~
    +       args.inputs.keyboard.key_down.enter ||
    +** Processing line: ~       args.inputs.keyboard.key_down.escape~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # 4. Whether the animation should loop once, or forever.~
    +       args.inputs.keyboard.key_down.escape
    +** Processing line: ~      args.state.key_event_occurred = true~
     - Inside source: true
     *** True Line Result
    -    # 4. Whether the animation should loop once, or forever.
    -** Processing line: ~    does_sprite_loop = true~
    +      args.state.key_event_occurred = true
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    does_sprite_loop = true
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # With the variables defined above, we can get a number~
    -- Inside source: true
    -*** True Line Result
    -    # With the variables defined above, we can get a number
    -** Processing line: ~    # which represents the sprite to show by calling the `frame_index` function.~
    +** Processing line: ~    args.outputs.debug << [0, y - 50, 1280, 60].solid~
     - Inside source: true
     *** True Line Result
    -    # which represents the sprite to show by calling the `frame_index` function.
    -** Processing line: ~    # In this case the number will be between 0, and 5 (you can see the sprites~
    +    args.outputs.debug << [0, y - 50, 1280, 60].solid
    +** Processing line: ~    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label~
     - Inside source: true
     *** True Line Result
    -    # In this case the number will be between 0, and 5 (you can see the sprites
    -** Processing line: ~    # in the ./sprites directory).~
    +    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label
    +** Processing line: ~    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label~
     - Inside source: true
     *** True Line Result
    -    # in the ./sprites directory).
    -** Processing line: ~    sprite_index = start_looping_at.frame_index number_of_sprites,~
    +    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    sprite_index = start_looping_at.frame_index number_of_sprites,
    -** Processing line: ~                                                number_of_frames_to_show_each_sprite,~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -                                                number_of_frames_to_show_each_sprite,
    -** Processing line: ~                                                does_sprite_loop~
    -- Inside source: true
    +
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
     *** True Line Result
    -                                                does_sprite_loop
    +#+end_src
     ** Processing line: ~~
    -- Inside source: true
    +- End of paragraph detected.
     *** True Line Result
     
    -** Processing line: ~    # Now that we have `sprite_index, we can present the correct file.~
    -- Inside source: true
    +** Processing line: ~*** Physics And Collisions - Moving Objects - main.rb~
    +- Header detected.
     *** True Line Result
    -    # Now that we have `sprite_index, we can present the correct file.
    -** Processing line: ~    args.outputs.sprites << [100, 100, 100, 100, "sprites/dragon_fly_#{sprite_index}.png"]~
    -- Inside source: true
    +
     *** True Line Result
    -    args.outputs.sprites << [100, 100, 100, 100, "sprites/dragon_fly_#{sprite_index}.png"]
    -** Processing line: ~~
    -- Inside source: true
    +*** Physics And Collisions - Moving Objects - main.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
     *** True Line Result
     
    -** Processing line: ~    # Try changing the numbers below to see how the animation changes:~
    -- Inside source: true
     *** True Line Result
    -    # Try changing the numbers below to see how the animation changes:
    -** Processing line: ~    args.outputs.sprites << [100, 200, 100, 100, "sprites/dragon_fly_#{0.frame_index 6, 4, true}.png"]~
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/04_physics_and_collisions/02_moving_objects/app/main.rb~
     - Inside source: true
     *** True Line Result
    -    args.outputs.sprites << [100, 200, 100, 100, "sprites/dragon_fly_#{0.frame_index 6, 4, true}.png"]
    -** Processing line: ~  end~
    +  # ./samples/04_physics_and_collisions/02_moving_objects/app/main.rb
    +** Processing line: ~  =begin~
     - Inside source: true
     *** True Line Result
    -  end
    +  =begin
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # This function shows how to animate a sprite that executes~
    -- Inside source: true
    -*** True Line Result
    -  # This function shows how to animate a sprite that executes
    -** Processing line: ~  # only once when the "f" key is pressed.~
    +** Processing line: ~   APIs listing that haven't been encountered in previous sample apps:~
     - Inside source: true
     *** True Line Result
    -  # only once when the "f" key is pressed.
    -** Processing line: ~  def one_time_animation args~
    +   APIs listing that haven't been encountered in previous sample apps:
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  def one_time_animation args
    -** Processing line: ~    # This is just a label the shows instructions within the game.~
    +
    +** Processing line: ~   - Hashes: Collection of unique keys and their corresponding values. The value can be found~
     - Inside source: true
     *** True Line Result
    -    # This is just a label the shows instructions within the game.
    -** Processing line: ~    args.outputs.labels << [220, 350, "(press f to animate)"]~
    +   - Hashes: Collection of unique keys and their corresponding values. The value can be found
    +** Processing line: ~     using their keys.~
     - Inside source: true
     *** True Line Result
    -    args.outputs.labels << [220, 350, "(press f to animate)"]
    +     using their keys.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # If "f" is pressed on the keyboard...~
    +** Processing line: ~     For example, if we have a "numbers" hash that stores numbers in English as the~
     - Inside source: true
     *** True Line Result
    -    # If "f" is pressed on the keyboard...
    -** Processing line: ~    if args.inputs.keyboard.key_down.f~
    +     For example, if we have a "numbers" hash that stores numbers in English as the
    +** Processing line: ~     key and numbers in Spanish as the value, we'd have a hash that looks like this...~
     - Inside source: true
     *** True Line Result
    -    if args.inputs.keyboard.key_down.f
    -** Processing line: ~      # Print the frame that "f" was pressed on.~
    +     key and numbers in Spanish as the value, we'd have a hash that looks like this...
    +** Processing line: ~     numbers = { "one" => "uno", "two" => "dos", "three" => "tres" }~
     - Inside source: true
     *** True Line Result
    -      # Print the frame that "f" was pressed on.
    -** Processing line: ~      puts "Hello from main.rb! The \"f\" key was in the down state on frame: #{args.inputs.keyboard.key_down.f}"~
    +     numbers = { "one" => "uno", "two" => "dos", "three" => "tres" }
    +** Processing line: ~     and on it goes.~
     - Inside source: true
     *** True Line Result
    -      puts "Hello from main.rb! The \"f\" key was in the down state on frame: #{args.inputs.keyboard.key_down.f}"
    +     and on it goes.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      # And MOST IMPORTANTLY set the point it time to start the animation,~
    +** Processing line: ~     Now if we wanted to find the corresponding value of the "one" key, we could say~
     - Inside source: true
     *** True Line Result
    -      # And MOST IMPORTANTLY set the point it time to start the animation,
    -** Processing line: ~      # equal to "now" which is represented as args.state.tick_count.~
    +     Now if we wanted to find the corresponding value of the "one" key, we could say
    +** Processing line: ~     puts numbers["one"]~
     - Inside source: true
     *** True Line Result
    -      # equal to "now" which is represented as args.state.tick_count.
    +     puts numbers["one"]
    +** Processing line: ~     which would print "uno" to the console.~
    +- Inside source: true
    +*** True Line Result
    +     which would print "uno" to the console.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      # Also IMPORTANT, you'll notice that the value of when to start looping~
    +** Processing line: ~   - num1.greater(num2): Returns the greater value.~
     - Inside source: true
     *** True Line Result
    -      # Also IMPORTANT, you'll notice that the value of when to start looping
    -** Processing line: ~      # is stored in `args.state`. This construct's values are retained across~
    +   - num1.greater(num2): Returns the greater value.
    +** Processing line: ~     For example, if we have the command~
     - Inside source: true
     *** True Line Result
    -      # is stored in `args.state`. This construct's values are retained across
    -** Processing line: ~      # executions of the `tick` method.~
    +     For example, if we have the command
    +** Processing line: ~     puts 4.greater(3)~
     - Inside source: true
     *** True Line Result
    -      # executions of the `tick` method.
    -** Processing line: ~      args.state.start_looping_at = args.state.tick_count~
    +     puts 4.greater(3)
    +** Processing line: ~     the number 4 would be printed to the console since it has a greater value than 3.~
     - Inside source: true
     *** True Line Result
    -      args.state.start_looping_at = args.state.tick_count
    -** Processing line: ~    end~
    +     the number 4 would be printed to the console since it has a greater value than 3.
    +** Processing line: ~     Similar to lesser, which returns the lesser value.~
     - Inside source: true
     *** True Line Result
    -    end
    +     Similar to lesser, which returns the lesser value.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # These are the same local variables that were defined~
    +** Processing line: ~   - num1.lesser(num2): Finds the lower value of the given options.~
     - Inside source: true
     *** True Line Result
    -    # These are the same local variables that were defined
    -** Processing line: ~    # for the `looping_animation` function.~
    +   - num1.lesser(num2): Finds the lower value of the given options.
    +** Processing line: ~     For example, in the statement~
     - Inside source: true
     *** True Line Result
    -    # for the `looping_animation` function.
    -** Processing line: ~    number_of_sprites = 6~
    +     For example, in the statement
    +** Processing line: ~     a = 4.lesser(3)~
     - Inside source: true
     *** True Line Result
    -    number_of_sprites = 6
    -** Processing line: ~    number_of_frames_to_show_each_sprite = 4~
    +     a = 4.lesser(3)
    +** Processing line: ~     3 has a lower value than 4, which means that the value of a would be set to 3,~
     - Inside source: true
     *** True Line Result
    -    number_of_frames_to_show_each_sprite = 4
    +     3 has a lower value than 4, which means that the value of a would be set to 3,
    +** Processing line: ~     but if the statement had been~
    +- Inside source: true
    +*** True Line Result
    +     but if the statement had been
    +** Processing line: ~     a = 4.lesser(5)~
    +- Inside source: true
    +*** True Line Result
    +     a = 4.lesser(5)
    +** Processing line: ~     4 has a lower value than 5, which means that the value of a would be set to 4.~
    +- Inside source: true
    +*** True Line Result
    +     4 has a lower value than 5, which means that the value of a would be set to 4.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Except this sprite does not loop again. If the animation time has passed,~
    +** Processing line: ~   - reject: Removes elements from a collection if they meet certain requirements.~
     - Inside source: true
     *** True Line Result
    -    # Except this sprite does not loop again. If the animation time has passed,
    -** Processing line: ~    # then the frame_index function returns nil.~
    +   - reject: Removes elements from a collection if they meet certain requirements.
    +** Processing line: ~     For example, you can derive an array of odd numbers from an original array of~
     - Inside source: true
     *** True Line Result
    -    # then the frame_index function returns nil.
    -** Processing line: ~    does_sprite_loop = false~
    +     For example, you can derive an array of odd numbers from an original array of
    +** Processing line: ~     numbers 1 through 10 by rejecting all elements that are even (or divisible by 2).~
     - Inside source: true
     *** True Line Result
    -    does_sprite_loop = false
    +     numbers 1 through 10 by rejecting all elements that are even (or divisible by 2).
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    sprite_index = args.state~
    +** Processing line: ~   - find_all: Finds all values that satisfy specific requirements.~
     - Inside source: true
     *** True Line Result
    -    sprite_index = args.state
    -** Processing line: ~                       .start_looping_at~
    +   - find_all: Finds all values that satisfy specific requirements.
    +** Processing line: ~     For example, you can find all elements of a collection that are divisible by 2~
     - Inside source: true
     *** True Line Result
    -                       .start_looping_at
    -** Processing line: ~                       .frame_index number_of_sprites,~
    +     For example, you can find all elements of a collection that are divisible by 2
    +** Processing line: ~     or find all objects that have intersected with another object.~
     - Inside source: true
     *** True Line Result
    -                       .frame_index number_of_sprites,
    -** Processing line: ~                                    number_of_frames_to_show_each_sprite,~
    +     or find all objects that have intersected with another object.
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -                                    number_of_frames_to_show_each_sprite,
    -** Processing line: ~                                    does_sprite_loop~
    +
    +** Processing line: ~   - abs: Returns the absolute value.~
     - Inside source: true
     *** True Line Result
    -                                    does_sprite_loop
    -** Processing line: ~~
    +   - abs: Returns the absolute value.
    +** Processing line: ~     For example, the command~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # This line sets the frame index to zero, if~
    +     For example, the command
    +** Processing line: ~     (-30).abs~
     - Inside source: true
     *** True Line Result
    -    # This line sets the frame index to zero, if
    -** Processing line: ~    # the animation duration has passed (frame_index returned nil).~
    +     (-30).abs
    +** Processing line: ~     would return 30 as a result.~
     - Inside source: true
     *** True Line Result
    -    # the animation duration has passed (frame_index returned nil).
    +     would return 30 as a result.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Remeber: we are not looping forever here.~
    +** Processing line: ~   - map: Ruby method used to transform data; used in arrays, hashes, and collections.~
     - Inside source: true
     *** True Line Result
    -    # Remeber: we are not looping forever here.
    -** Processing line: ~    sprite_index ||= 0~
    +   - map: Ruby method used to transform data; used in arrays, hashes, and collections.
    +** Processing line: ~     Can be used to perform an action on every element of a collection, such as multiplying~
     - Inside source: true
     *** True Line Result
    -    sprite_index ||= 0
    -** Processing line: ~~
    +     Can be used to perform an action on every element of a collection, such as multiplying
    +** Processing line: ~     each element by 2 or declaring every element as a new entity.~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # Present the sprite.~
    +     each element by 2 or declaring every element as a new entity.
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    # Present the sprite.
    -** Processing line: ~    args.outputs.sprites << [100, 300, 100, 100, "sprites/dragon_fly_#{sprite_index}.png"]~
    +
    +** Processing line: ~   Reminders:~
     - Inside source: true
     *** True Line Result
    -    args.outputs.sprites << [100, 300, 100, 100, "sprites/dragon_fly_#{sprite_index}.png"]
    +   Reminders:
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    tick_instructions args, "Sample app shows how to use Numeric#frame_index and string interpolation to animate a sprite over time."~
    +** Processing line: ~   - args.inputs.keyboard.KEY: Determines if a key has been pressed.~
     - Inside source: true
     *** True Line Result
    -    tick_instructions args, "Sample app shows how to use Numeric#frame_index and string interpolation to animate a sprite over time."
    -** Processing line: ~  end~
    +   - args.inputs.keyboard.KEY: Determines if a key has been pressed.
    +** Processing line: ~     For more information about the keyboard, take a look at mygame/documentation/06-keyboard.md.~
     - Inside source: true
     *** True Line Result
    -  end
    +     For more information about the keyboard, take a look at mygame/documentation/06-keyboard.md.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def tick_instructions args, text, y = 715~
    +** Processing line: ~   - ARRAY#intersect_rect?: Returns true or false depending on if the two rectangles intersect.~
     - Inside source: true
     *** True Line Result
    -  def tick_instructions args, text, y = 715
    -** Processing line: ~    return if args.state.key_event_occurred~
    +   - ARRAY#intersect_rect?: Returns true or false depending on if the two rectangles intersect.
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    return if args.state.key_event_occurred
    -** Processing line: ~    if args.inputs.mouse.click ||~
    +
    +** Processing line: ~   - args.outputs.solids: An array. The values generate a solid.~
     - Inside source: true
     *** True Line Result
    -    if args.inputs.mouse.click ||
    -** Processing line: ~       args.inputs.keyboard.directional_vector ||~
    +   - args.outputs.solids: An array. The values generate a solid.
    +** Processing line: ~     The parameters are [X, Y, WIDTH, HEIGHT, RED, GREEN, BLUE]~
     - Inside source: true
     *** True Line Result
    -       args.inputs.keyboard.directional_vector ||
    -** Processing line: ~       args.inputs.keyboard.key_down.enter ||~
    -- Inside source: true
    -*** True Line Result
    -       args.inputs.keyboard.key_down.enter ||
    -** Processing line: ~       args.inputs.keyboard.key_down.escape~
    +     The parameters are [X, Y, WIDTH, HEIGHT, RED, GREEN, BLUE]
    +** Processing line: ~     For more information about solids, go to mygame/documentation/03-solids-and-borders.md.~
     - Inside source: true
     *** True Line Result
    -       args.inputs.keyboard.key_down.escape
    -** Processing line: ~      args.state.key_event_occurred = true~
    +     For more information about solids, go to mygame/documentation/03-solids-and-borders.md.
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      args.state.key_event_occurred = true
    -** Processing line: ~    end~
    +
    +** Processing line: ~  =end~
     - Inside source: true
     *** True Line Result
    -    end
    +  =end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    args.outputs.debug << [0, y - 50, 1280, 60].solid~
    +** Processing line: ~  # Calls methods needed for game to run properly~
     - Inside source: true
     *** True Line Result
    -    args.outputs.debug << [0, y - 50, 1280, 60].solid
    -** Processing line: ~    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label~
    +  # Calls methods needed for game to run properly
    +** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
    -    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label
    -** Processing line: ~    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label~
    +  def tick args
    +** Processing line: ~    tick_instructions args, "Use LEFT and RIGHT arrow keys to move and SPACE to jump."~
     - Inside source: true
     *** True Line Result
    -    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label
    -** Processing line: ~  end~
    +    tick_instructions args, "Use LEFT and RIGHT arrow keys to move and SPACE to jump."
    +** Processing line: ~    defaults args~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +    defaults args
    +** Processing line: ~    render args~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~#+end_src~
    -- Line was identified as the end of a code block.
    -*** True Line Result
    -#+end_src
    -** Processing line: ~~
    -- End of paragraph detected.
    +    render args
    +** Processing line: ~    calc args~
    +- Inside source: true
     *** True Line Result
    -
    -** Processing line: ~*** Rendering Sprites - Animation Using Sprite Sheet - main.rb~
    -- Header detected.
    +    calc args
    +** Processing line: ~    input args~
    +- Inside source: true
     *** True Line Result
    -
    +    input args
    +** Processing line: ~  end~
    +- Inside source: true
     *** True Line Result
    -*** Rendering Sprites - Animation Using Sprite Sheet - main.rb
    -** Processing line: ~#+begin_src ruby~
    -- Line was identified as the beginning of a code block.
    +  end
    +** Processing line: ~~
    +- Inside source: true
     *** True Line Result
     
    -*** True Line Result
    -#+begin_src ruby
    -** Processing line: ~  # ./samples/03_rendering_sprites/02_animation_using_sprite_sheet/app/main.rb~
    +** Processing line: ~  # sets default values and creates empty collections~
     - Inside source: true
     *** True Line Result
    -  # ./samples/03_rendering_sprites/02_animation_using_sprite_sheet/app/main.rb
    -** Processing line: ~  def tick args~
    +  # sets default values and creates empty collections
    +** Processing line: ~  # initialization only happens in the first frame~
     - Inside source: true
     *** True Line Result
    -  def tick args
    -** Processing line: ~    args.state.player.x ||= 100~
    +  # initialization only happens in the first frame
    +** Processing line: ~  def defaults args~
     - Inside source: true
     *** True Line Result
    -    args.state.player.x ||= 100
    -** Processing line: ~    args.state.player.y ||= 100~
    +  def defaults args
    +** Processing line: ~    fiddle args~
     - Inside source: true
     *** True Line Result
    -    args.state.player.y ||= 100
    -** Processing line: ~    args.state.player.w ||= 64~
    +    fiddle args
    +** Processing line: ~    args.state.enemy.hammers ||= []~
     - Inside source: true
     *** True Line Result
    -    args.state.player.w ||= 64
    -** Processing line: ~    args.state.player.h ||= 64~
    +    args.state.enemy.hammers ||= []
    +** Processing line: ~    args.state.enemy.hammer_queue ||= []~
     - Inside source: true
     *** True Line Result
    -    args.state.player.h ||= 64
    -** Processing line: ~    args.state.player.direction ||= 1~
    +    args.state.enemy.hammer_queue ||= []
    +** Processing line: ~    args.state.tick_count = args.state.tick_count~
     - Inside source: true
     *** True Line Result
    -    args.state.player.direction ||= 1
    -** Processing line: ~~
    +    args.state.tick_count = args.state.tick_count
    +** Processing line: ~    args.state.bridge_top = 128~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    args.state.player.is_moving = false~
    +    args.state.bridge_top = 128
    +** Processing line: ~    args.state.player.x  ||= 0                        # initializes player's properties~
     - Inside source: true
     *** True Line Result
    -    args.state.player.is_moving = false
    -** Processing line: ~~
    +    args.state.player.x  ||= 0                        # initializes player's properties
    +** Processing line: ~    args.state.player.y  ||= args.state.bridge_top~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # get the keyboard input and set player properties~
    +    args.state.player.y  ||= args.state.bridge_top
    +** Processing line: ~    args.state.player.w  ||= 64~
     - Inside source: true
     *** True Line Result
    -    # get the keyboard input and set player properties
    -** Processing line: ~    if args.inputs.keyboard.right~
    +    args.state.player.w  ||= 64
    +** Processing line: ~    args.state.player.h  ||= 64~
     - Inside source: true
     *** True Line Result
    -    if args.inputs.keyboard.right
    -** Processing line: ~      args.state.player.x += 3~
    +    args.state.player.h  ||= 64
    +** Processing line: ~    args.state.player.dy ||= 0~
     - Inside source: true
     *** True Line Result
    -      args.state.player.x += 3
    -** Processing line: ~      args.state.player.direction = 1~
    +    args.state.player.dy ||= 0
    +** Processing line: ~    args.state.player.dx ||= 0~
     - Inside source: true
     *** True Line Result
    -      args.state.player.direction = 1
    -** Processing line: ~      args.state.player.started_running_at ||= args.state.tick_count~
    +    args.state.player.dx ||= 0
    +** Processing line: ~    args.state.enemy.x   ||= 800                      # initializes enemy's properties~
     - Inside source: true
     *** True Line Result
    -      args.state.player.started_running_at ||= args.state.tick_count
    -** Processing line: ~    elsif args.inputs.keyboard.left~
    +    args.state.enemy.x   ||= 800                      # initializes enemy's properties
    +** Processing line: ~    args.state.enemy.y   ||= 0~
     - Inside source: true
     *** True Line Result
    -    elsif args.inputs.keyboard.left
    -** Processing line: ~      args.state.player.x -= 3~
    +    args.state.enemy.y   ||= 0
    +** Processing line: ~    args.state.enemy.w   ||= 128~
     - Inside source: true
     *** True Line Result
    -      args.state.player.x -= 3
    -** Processing line: ~      args.state.player.direction = -1~
    +    args.state.enemy.w   ||= 128
    +** Processing line: ~    args.state.enemy.h   ||= 128~
     - Inside source: true
     *** True Line Result
    -      args.state.player.direction = -1
    -** Processing line: ~      args.state.player.started_running_at ||= args.state.tick_count~
    +    args.state.enemy.h   ||= 128
    +** Processing line: ~    args.state.enemy.dy  ||= 0~
     - Inside source: true
     *** True Line Result
    -      args.state.player.started_running_at ||= args.state.tick_count
    -** Processing line: ~    end~
    +    args.state.enemy.dy  ||= 0
    +** Processing line: ~    args.state.enemy.dx  ||= 0~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +    args.state.enemy.dx  ||= 0
    +** Processing line: ~    args.state.game_over_at ||= 0~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    if args.inputs.keyboard.up~
    +    args.state.game_over_at ||= 0
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    if args.inputs.keyboard.up
    -** Processing line: ~      args.state.player.y += 1~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      args.state.player.y += 1
    -** Processing line: ~      args.state.player.started_running_at ||= args.state.tick_count~
    +
    +** Processing line: ~  # sets enemy, player, hammer values~
     - Inside source: true
     *** True Line Result
    -      args.state.player.started_running_at ||= args.state.tick_count
    -** Processing line: ~    elsif args.inputs.keyboard.down~
    +  # sets enemy, player, hammer values
    +** Processing line: ~  def fiddle args~
     - Inside source: true
     *** True Line Result
    -    elsif args.inputs.keyboard.down
    -** Processing line: ~      args.state.player.y -= 1~
    +  def fiddle args
    +** Processing line: ~    args.state.gravity                     = -0.3~
     - Inside source: true
     *** True Line Result
    -      args.state.player.y -= 1
    -** Processing line: ~      args.state.player.started_running_at ||= args.state.tick_count~
    +    args.state.gravity                     = -0.3
    +** Processing line: ~    args.state.enemy_jump_power            = 10       # sets enemy values~
     - Inside source: true
     *** True Line Result
    -      args.state.player.started_running_at ||= args.state.tick_count
    -** Processing line: ~    end~
    +    args.state.enemy_jump_power            = 10       # sets enemy values
    +** Processing line: ~    args.state.enemy_jump_interval         = 60~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +    args.state.enemy_jump_interval         = 60
    +** Processing line: ~    args.state.hammer_throw_interval       = 40       # sets hammer values~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # if no arrow keys are being pressed, set the player as not moving~
    +    args.state.hammer_throw_interval       = 40       # sets hammer values
    +** Processing line: ~    args.state.hammer_launch_power_default = 5~
     - Inside source: true
     *** True Line Result
    -    # if no arrow keys are being pressed, set the player as not moving
    -** Processing line: ~    if !args.inputs.keyboard.directional_vector~
    +    args.state.hammer_launch_power_default = 5
    +** Processing line: ~    args.state.hammer_launch_power_near    = 2~
     - Inside source: true
     *** True Line Result
    -    if !args.inputs.keyboard.directional_vector
    -** Processing line: ~      args.state.player.started_running_at = nil~
    +    args.state.hammer_launch_power_near    = 2
    +** Processing line: ~    args.state.hammer_launch_power_far     = 7~
     - Inside source: true
     *** True Line Result
    -      args.state.player.started_running_at = nil
    -** Processing line: ~    end~
    +    args.state.hammer_launch_power_far     = 7
    +** Processing line: ~    args.state.hammer_upward_launch_power  = 15~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +    args.state.hammer_upward_launch_power  = 15
    +** Processing line: ~    args.state.max_hammers_per_volley      = 10~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # wrap player around the stage~
    +    args.state.max_hammers_per_volley      = 10
    +** Processing line: ~    args.state.gap_between_hammers         = 10~
     - Inside source: true
     *** True Line Result
    -    # wrap player around the stage
    -** Processing line: ~    if args.state.player.x > 1280~
    +    args.state.gap_between_hammers         = 10
    +** Processing line: ~    args.state.player_jump_power           = 10       # sets player values~
     - Inside source: true
     *** True Line Result
    -    if args.state.player.x > 1280
    -** Processing line: ~      args.state.player.x = -64~
    +    args.state.player_jump_power           = 10       # sets player values
    +** Processing line: ~    args.state.player_jump_power_duration  = 10~
     - Inside source: true
     *** True Line Result
    -      args.state.player.x = -64
    -** Processing line: ~      args.state.player.started_running_at ||= args.state.tick_count~
    +    args.state.player_jump_power_duration  = 10
    +** Processing line: ~    args.state.player_max_run_speed        = 10~
     - Inside source: true
     *** True Line Result
    -      args.state.player.started_running_at ||= args.state.tick_count
    -** Processing line: ~    elsif args.state.player.x < -64~
    +    args.state.player_max_run_speed        = 10
    +** Processing line: ~    args.state.player_speed_slowdown_rate  = 0.9~
     - Inside source: true
     *** True Line Result
    -    elsif args.state.player.x < -64
    -** Processing line: ~      args.state.player.x = 1280~
    +    args.state.player_speed_slowdown_rate  = 0.9
    +** Processing line: ~    args.state.player_acceleration         = 1~
     - Inside source: true
     *** True Line Result
    -      args.state.player.x = 1280
    -** Processing line: ~      args.state.player.started_running_at ||= args.state.tick_count~
    +    args.state.player_acceleration         = 1
    +** Processing line: ~    args.state.hammer_size                 = 32~
     - Inside source: true
     *** True Line Result
    -      args.state.player.started_running_at ||= args.state.tick_count
    -** Processing line: ~    end~
    +    args.state.hammer_size                 = 32
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    end
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    if args.state.player.y > 720~
    +** Processing line: ~  # outputs objects onto the screen~
     - Inside source: true
     *** True Line Result
    -    if args.state.player.y > 720
    -** Processing line: ~      args.state.player.y = -64~
    +  # outputs objects onto the screen
    +** Processing line: ~  def render args~
     - Inside source: true
     *** True Line Result
    -      args.state.player.y = -64
    -** Processing line: ~      args.state.player.started_running_at ||= args.state.tick_count~
    +  def render args
    +** Processing line: ~    args.outputs.solids << 20.map_with_index do |i| # uses 20 squares to form bridge~
     - Inside source: true
     *** True Line Result
    -      args.state.player.started_running_at ||= args.state.tick_count
    -** Processing line: ~    elsif args.state.player.y < -64~
    +    args.outputs.solids << 20.map_with_index do |i| # uses 20 squares to form bridge
    +** Processing line: ~      # sets x by multiplying 64 to index to find pixel value (places all squares side by side)~
     - Inside source: true
     *** True Line Result
    -    elsif args.state.player.y < -64
    -** Processing line: ~      args.state.player.y = 720~
    +      # sets x by multiplying 64 to index to find pixel value (places all squares side by side)
    +** Processing line: ~      # subtracts 64 from bridge_top because position is denoted by bottom left corner~
     - Inside source: true
     *** True Line Result
    -      args.state.player.y = 720
    -** Processing line: ~      args.state.player.started_running_at ||= args.state.tick_count~
    +      # subtracts 64 from bridge_top because position is denoted by bottom left corner
    +** Processing line: ~      [i * 64, args.state.bridge_top - 64, 64, 64]~
     - Inside source: true
     *** True Line Result
    -      args.state.player.started_running_at ||= args.state.tick_count
    +      [i * 64, args.state.bridge_top - 64, 64, 64]
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -20396,34 +20779,22 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # render player as standing or running~
    -- Inside source: true
    -*** True Line Result
    -    # render player as standing or running
    -** Processing line: ~    if args.state.player.started_running_at~
    -- Inside source: true
    -*** True Line Result
    -    if args.state.player.started_running_at
    -** Processing line: ~      args.outputs.sprites << running_sprite(args)~
    -- Inside source: true
    -*** True Line Result
    -      args.outputs.sprites << running_sprite(args)
    -** Processing line: ~    else~
    +** Processing line: ~    args.outputs.solids << [args.state.x, args.state.y, args.state.w, args.state.h, 255, 0, 0]~
     - Inside source: true
     *** True Line Result
    -    else
    -** Processing line: ~      args.outputs.sprites << standing_sprite(args)~
    +    args.outputs.solids << [args.state.x, args.state.y, args.state.w, args.state.h, 255, 0, 0]
    +** Processing line: ~    args.outputs.solids << [args.state.player.x, args.state.player.y, args.state.player.w, args.state.player.h, 255, 0, 0] # outputs player onto screen (red box)~
     - Inside source: true
     *** True Line Result
    -      args.outputs.sprites << standing_sprite(args)
    -** Processing line: ~    end~
    +    args.outputs.solids << [args.state.player.x, args.state.player.y, args.state.player.w, args.state.player.h, 255, 0, 0] # outputs player onto screen (red box)
    +** Processing line: ~    args.outputs.solids << [args.state.enemy.x, args.state.enemy.y, args.state.enemy.w, args.state.enemy.h, 0, 255, 0] # outputs enemy onto screen (green box)~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~    args.outputs.labels << [30, 700, "Use arrow keys to move around."]~
    +    args.outputs.solids << [args.state.enemy.x, args.state.enemy.y, args.state.enemy.w, args.state.enemy.h, 0, 255, 0] # outputs enemy onto screen (green box)
    +** Processing line: ~    args.outputs.solids << args.state.enemy.hammers # outputs enemy's hammers onto screen~
     - Inside source: true
     *** True Line Result
    -    args.outputs.labels << [30, 700, "Use arrow keys to move around."]
    +    args.outputs.solids << args.state.enemy.hammers # outputs enemy's hammers onto screen
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -20432,342 +20803,338 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def standing_sprite args~
    -- Inside source: true
    -*** True Line Result
    -  def standing_sprite args
    -** Processing line: ~    {~
    +** Processing line: ~  # Performs calculations to move objects on the screen~
     - Inside source: true
     *** True Line Result
    -    {
    -** Processing line: ~      x: args.state.player.x,~
    +  # Performs calculations to move objects on the screen
    +** Processing line: ~  def calc args~
     - Inside source: true
     *** True Line Result
    -      x: args.state.player.x,
    -** Processing line: ~      y: args.state.player.y,~
    +  def calc args
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      y: args.state.player.y,
    -** Processing line: ~      w: args.state.player.w,~
    +
    +** Processing line: ~    # Since velocity is the change in position, the change in x increases by dx. Same with y and dy.~
     - Inside source: true
     *** True Line Result
    -      w: args.state.player.w,
    -** Processing line: ~      h: args.state.player.h,~
    +    # Since velocity is the change in position, the change in x increases by dx. Same with y and dy.
    +** Processing line: ~    args.state.player.x  += args.state.player.dx~
     - Inside source: true
     *** True Line Result
    -      h: args.state.player.h,
    -** Processing line: ~      path: "sprites/horizontal-stand.png",~
    +    args.state.player.x  += args.state.player.dx
    +** Processing line: ~    args.state.player.y  += args.state.player.dy~
     - Inside source: true
     *** True Line Result
    -      path: "sprites/horizontal-stand.png",
    -** Processing line: ~      flip_horizontally: args.state.player.direction > 0~
    +    args.state.player.y  += args.state.player.dy
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      flip_horizontally: args.state.player.direction > 0
    -** Processing line: ~    }~
    +
    +** Processing line: ~    # Since acceleration is the change in velocity, the change in y (dy) increases every frame~
     - Inside source: true
     *** True Line Result
    -    }
    -** Processing line: ~  end~
    +    # Since acceleration is the change in velocity, the change in y (dy) increases every frame
    +** Processing line: ~    args.state.player.dy += args.state.gravity~
     - Inside source: true
     *** True Line Result
    -  end
    +    args.state.player.dy += args.state.gravity
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def running_sprite args~
    +** Processing line: ~    # player's y position is either current y position or y position of top of~
     - Inside source: true
     *** True Line Result
    -  def running_sprite args
    -** Processing line: ~    if !args.state.player.started_running_at~
    +    # player's y position is either current y position or y position of top of
    +** Processing line: ~    # bridge, whichever has a greater value~
     - Inside source: true
     *** True Line Result
    -    if !args.state.player.started_running_at
    -** Processing line: ~      tile_index = 0~
    +    # bridge, whichever has a greater value
    +** Processing line: ~    # ensures that the player never goes below the bridge~
     - Inside source: true
     *** True Line Result
    -      tile_index = 0
    -** Processing line: ~    else~
    +    # ensures that the player never goes below the bridge
    +** Processing line: ~    args.state.player.y  = args.state.player.y.greater(args.state.bridge_top)~
     - Inside source: true
     *** True Line Result
    -    else
    -** Processing line: ~      how_many_frames_in_sprite_sheet = 6~
    +    args.state.player.y  = args.state.player.y.greater(args.state.bridge_top)
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      how_many_frames_in_sprite_sheet = 6
    -** Processing line: ~      how_many_ticks_to_hold_each_frame = 3~
    +
    +** Processing line: ~    # player's x position is either the current x position or 0, whichever has a greater value~
     - Inside source: true
     *** True Line Result
    -      how_many_ticks_to_hold_each_frame = 3
    -** Processing line: ~      should_the_index_repeat = true~
    +    # player's x position is either the current x position or 0, whichever has a greater value
    +** Processing line: ~    # ensures that the player doesn't go too far left (out of the screen's scope)~
     - Inside source: true
     *** True Line Result
    -      should_the_index_repeat = true
    -** Processing line: ~      tile_index = args.state~
    +    # ensures that the player doesn't go too far left (out of the screen's scope)
    +** Processing line: ~    args.state.player.x  = args.state.player.x.greater(0)~
     - Inside source: true
     *** True Line Result
    -      tile_index = args.state
    -** Processing line: ~                       .player~
    +    args.state.player.x  = args.state.player.x.greater(0)
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -                       .player
    -** Processing line: ~                       .started_running_at~
    +
    +** Processing line: ~    # player is not falling if it is located on the top of the bridge~
     - Inside source: true
     *** True Line Result
    -                       .started_running_at
    -** Processing line: ~                       .frame_index(how_many_frames_in_sprite_sheet,~
    +    # player is not falling if it is located on the top of the bridge
    +** Processing line: ~    args.state.player.falling = false if args.state.player.y == args.state.bridge_top~
     - Inside source: true
     *** True Line Result
    -                       .frame_index(how_many_frames_in_sprite_sheet,
    -** Processing line: ~                                    how_many_ticks_to_hold_each_frame,~
    +    args.state.player.falling = false if args.state.player.y == args.state.bridge_top
    +** Processing line: ~    args.state.player.rect = [args.state.player.x, args.state.player.y, args.state.player.h, args.state.player.w] # sets definition for player~
     - Inside source: true
     *** True Line Result
    -                                    how_many_ticks_to_hold_each_frame,
    -** Processing line: ~                                    should_the_index_repeat)~
    +    args.state.player.rect = [args.state.player.x, args.state.player.y, args.state.player.h, args.state.player.w] # sets definition for player
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -                                    should_the_index_repeat)
    -** Processing line: ~    end~
    +
    +** Processing line: ~    args.state.enemy.x += args.state.enemy.dx # velocity; change in x increases by dx~
     - Inside source: true
     *** True Line Result
    -    end
    +    args.state.enemy.x += args.state.enemy.dx # velocity; change in x increases by dx
    +** Processing line: ~    args.state.enemy.y += args.state.enemy.dy # same with y and dy~
    +- Inside source: true
    +*** True Line Result
    +    args.state.enemy.y += args.state.enemy.dy # same with y and dy
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    {~
    +** Processing line: ~    # ensures that the enemy never goes below the bridge~
     - Inside source: true
     *** True Line Result
    -    {
    -** Processing line: ~      x: args.state.player.x,~
    +    # ensures that the enemy never goes below the bridge
    +** Processing line: ~    args.state.enemy.y  = args.state.enemy.y.greater(args.state.bridge_top)~
     - Inside source: true
     *** True Line Result
    -      x: args.state.player.x,
    -** Processing line: ~      y: args.state.player.y,~
    +    args.state.enemy.y  = args.state.enemy.y.greater(args.state.bridge_top)
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      y: args.state.player.y,
    -** Processing line: ~      w: args.state.player.w,~
    +
    +** Processing line: ~    # ensures that the enemy never goes too far left (outside the screen's scope)~
     - Inside source: true
     *** True Line Result
    -      w: args.state.player.w,
    -** Processing line: ~      h: args.state.player.h,~
    +    # ensures that the enemy never goes too far left (outside the screen's scope)
    +** Processing line: ~    args.state.enemy.x  = args.state.enemy.x.greater(0)~
     - Inside source: true
     *** True Line Result
    -      h: args.state.player.h,
    -** Processing line: ~      path: 'sprites/horizontal-run.png',~
    +    args.state.enemy.x  = args.state.enemy.x.greater(0)
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      path: 'sprites/horizontal-run.png',
    -** Processing line: ~      tile_x: 0 + (tile_index * args.state.player.w),~
    +
    +** Processing line: ~    # objects that go up must come down because of gravity~
     - Inside source: true
     *** True Line Result
    -      tile_x: 0 + (tile_index * args.state.player.w),
    -** Processing line: ~      tile_y: 0,~
    +    # objects that go up must come down because of gravity
    +** Processing line: ~    args.state.enemy.dy += args.state.gravity~
     - Inside source: true
     *** True Line Result
    -      tile_y: 0,
    -** Processing line: ~      tile_w: args.state.player.w,~
    +    args.state.enemy.dy += args.state.gravity
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      tile_w: args.state.player.w,
    -** Processing line: ~      tile_h: args.state.player.h,~
    +
    +** Processing line: ~    args.state.enemy.y  = args.state.enemy.y.greater(args.state.bridge_top)~
     - Inside source: true
     *** True Line Result
    -      tile_h: args.state.player.h,
    -** Processing line: ~      flip_horizontally: args.state.player.direction > 0,~
    +    args.state.enemy.y  = args.state.enemy.y.greater(args.state.bridge_top)
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      flip_horizontally: args.state.player.direction > 0,
    -** Processing line: ~    }~
    +
    +** Processing line: ~    #sets definition of enemy~
     - Inside source: true
     *** True Line Result
    -    }
    -** Processing line: ~  end~
    +    #sets definition of enemy
    +** Processing line: ~    args.state.enemy.rect = [args.state.enemy.x, args.state.enemy.y, args.state.enemy.h, args.state.enemy.w]~
     - Inside source: true
     *** True Line Result
    -  end
    +    args.state.enemy.rect = [args.state.enemy.x, args.state.enemy.y, args.state.enemy.h, args.state.enemy.w]
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~#+end_src~
    -- Line was identified as the end of a code block.
    -*** True Line Result
    -#+end_src
    -** Processing line: ~~
    -- End of paragraph detected.
    +** Processing line: ~    if args.state.enemy.y == args.state.bridge_top # if enemy is located on the top of the bridge~
    +- Inside source: true
     *** True Line Result
    -
    -** Processing line: ~*** Rendering Sprites - Animation States - main.rb~
    -- Header detected.
    +    if args.state.enemy.y == args.state.bridge_top # if enemy is located on the top of the bridge
    +** Processing line: ~      args.state.enemy.dy = 0 # there is no change in y~
    +- Inside source: true
     *** True Line Result
    -
    +      args.state.enemy.dy = 0 # there is no change in y
    +** Processing line: ~    end~
    +- Inside source: true
     *** True Line Result
    -*** Rendering Sprites - Animation States - main.rb
    -** Processing line: ~#+begin_src ruby~
    -- Line was identified as the beginning of a code block.
    +    end
    +** Processing line: ~~
    +- Inside source: true
     *** True Line Result
     
    +** Processing line: ~    # if 60 frames have passed and the enemy is not moving vertically~
    +- Inside source: true
     *** True Line Result
    -#+begin_src ruby
    -** Processing line: ~  # ./samples/03_rendering_sprites/03_animation_states/app/main.rb~
    +    # if 60 frames have passed and the enemy is not moving vertically
    +** Processing line: ~    if args.state.tick_count.mod_zero?(args.state.enemy_jump_interval) && args.state.enemy.dy == 0~
     - Inside source: true
     *** True Line Result
    -  # ./samples/03_rendering_sprites/03_animation_states/app/main.rb
    -** Processing line: ~  class Game~
    +    if args.state.tick_count.mod_zero?(args.state.enemy_jump_interval) && args.state.enemy.dy == 0
    +** Processing line: ~      args.state.enemy.dy = args.state.enemy_jump_power # the enemy jumps up~
     - Inside source: true
     *** True Line Result
    -  class Game
    -** Processing line: ~    attr_gtk~
    +      args.state.enemy.dy = args.state.enemy_jump_power # the enemy jumps up
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    attr_gtk
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def defaults~
    +** Processing line: ~    # if 40 frames have passed or 5 frames have passed since the game ended~
     - Inside source: true
     *** True Line Result
    -    def defaults
    -** Processing line: ~      state.show_debug_layer  = true if state.tick_count == 0~
    +    # if 40 frames have passed or 5 frames have passed since the game ended
    +** Processing line: ~    if args.state.tick_count.mod_zero?(args.state.hammer_throw_interval) || args.state.game_over_at.elapsed_time == 5~
     - Inside source: true
     *** True Line Result
    -      state.show_debug_layer  = true if state.tick_count == 0
    -** Processing line: ~      player.tile_size        = 64~
    +    if args.state.tick_count.mod_zero?(args.state.hammer_throw_interval) || args.state.game_over_at.elapsed_time == 5
    +** Processing line: ~      # rand will return a number greater than or equal to 0 and less than given variable's value (since max is excluded)~
     - Inside source: true
     *** True Line Result
    -      player.tile_size        = 64
    -** Processing line: ~      player.speed            = 3~
    +      # rand will return a number greater than or equal to 0 and less than given variable's value (since max is excluded)
    +** Processing line: ~      # that is why we're adding 1, to include the max possibility~
     - Inside source: true
     *** True Line Result
    -      player.speed            = 3
    -** Processing line: ~      player.slash_frames     = 15~
    +      # that is why we're adding 1, to include the max possibility
    +** Processing line: ~      volley_dx   = (rand(args.state.hammer_launch_power_default) + 1) * -1 # horizontal movement (follow order of operations)~
     - Inside source: true
     *** True Line Result
    -      player.slash_frames     = 15
    -** Processing line: ~      player.x              ||= 50~
    +      volley_dx   = (rand(args.state.hammer_launch_power_default) + 1) * -1 # horizontal movement (follow order of operations)
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      player.x              ||= 50
    -** Processing line: ~      player.y              ||= 400~
    +
    +** Processing line: ~      # if the horizontal distance between the player and enemy is less than 128 pixels~
     - Inside source: true
     *** True Line Result
    -      player.y              ||= 400
    -** Processing line: ~      player.dir_x          ||=  1~
    +      # if the horizontal distance between the player and enemy is less than 128 pixels
    +** Processing line: ~      if (args.state.player.x - args.state.enemy.x).abs < 128~
     - Inside source: true
     *** True Line Result
    -      player.dir_x          ||=  1
    -** Processing line: ~      player.dir_y          ||= -1~
    +      if (args.state.player.x - args.state.enemy.x).abs < 128
    +** Processing line: ~        # the change in x won't be that great since the enemy and player are closer to each other~
     - Inside source: true
     *** True Line Result
    -      player.dir_y          ||= -1
    -** Processing line: ~      player.is_moving      ||= false~
    +        # the change in x won't be that great since the enemy and player are closer to each other
    +** Processing line: ~        volley_dx = (rand(args.state.hammer_launch_power_near) + 1) * -1~
     - Inside source: true
     *** True Line Result
    -      player.is_moving      ||= false
    -** Processing line: ~      state.watch_list      ||= {}~
    +        volley_dx = (rand(args.state.hammer_launch_power_near) + 1) * -1
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -      state.watch_list      ||= {}
    -** Processing line: ~      state.enemies         ||= []~
    +      end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      state.enemies         ||= []
    -** Processing line: ~    end~
    +
    +** Processing line: ~      # if the horizontal distance between the player and enemy is greater than 300 pixels~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +      # if the horizontal distance between the player and enemy is greater than 300 pixels
    +** Processing line: ~      if (args.state.player.x - args.state.enemy.x).abs > 300~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def add_enemy~
    +      if (args.state.player.x - args.state.enemy.x).abs > 300
    +** Processing line: ~        # change in x will be more drastic since player and enemy are so far apart~
     - Inside source: true
     *** True Line Result
    -    def add_enemy
    -** Processing line: ~      state.enemies << { x: 1200 * rand, y: 600 * rand, w: 64, h: 64 }~
    +        # change in x will be more drastic since player and enemy are so far apart
    +** Processing line: ~        volley_dx = (rand(args.state.hammer_launch_power_far) + 1) * -1 # more drastic change~
     - Inside source: true
     *** True Line Result
    -      state.enemies << { x: 1200 * rand, y: 600 * rand, w: 64, h: 64 }
    -** Processing line: ~    end~
    +        volley_dx = (rand(args.state.hammer_launch_power_far) + 1) * -1 # more drastic change
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    end
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def sprite_horizontal_run~
    -- Inside source: true
    -*** True Line Result
    -    def sprite_horizontal_run
    -** Processing line: ~      tile_index = 0.frame_index(6, 3, true)~
    +** Processing line: ~      (rand(args.state.max_hammers_per_volley) + 1).map_with_index do |i|~
     - Inside source: true
     *** True Line Result
    -      tile_index = 0.frame_index(6, 3, true)
    -** Processing line: ~      tile_index = 0 if !player.is_moving~
    +      (rand(args.state.max_hammers_per_volley) + 1).map_with_index do |i|
    +** Processing line: ~        args.state.enemy.hammer_queue << { # stores hammer values in a hash~
     - Inside source: true
     *** True Line Result
    -      tile_index = 0 if !player.is_moving
    -** Processing line: ~~
    +        args.state.enemy.hammer_queue << { # stores hammer values in a hash
    +** Processing line: ~          x: args.state.enemy.x,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      {~
    +          x: args.state.enemy.x,
    +** Processing line: ~          w: args.state.hammer_size,~
     - Inside source: true
     *** True Line Result
    -      {
    -** Processing line: ~        x: player.x,~
    +          w: args.state.hammer_size,
    +** Processing line: ~          h: args.state.hammer_size,~
     - Inside source: true
     *** True Line Result
    -        x: player.x,
    -** Processing line: ~        y: player.y,~
    +          h: args.state.hammer_size,
    +** Processing line: ~          dx: volley_dx, # change in horizontal position~
     - Inside source: true
     *** True Line Result
    -        y: player.y,
    -** Processing line: ~        w: player.tile_size,~
    +          dx: volley_dx, # change in horizontal position
    +** Processing line: ~          # multiplication operator takes precedence over addition operator~
     - Inside source: true
     *** True Line Result
    -        w: player.tile_size,
    -** Processing line: ~        h: player.tile_size,~
    +          # multiplication operator takes precedence over addition operator
    +** Processing line: ~          throw_at: args.state.tick_count + i * args.state.gap_between_hammers~
     - Inside source: true
     *** True Line Result
    -        h: player.tile_size,
    -** Processing line: ~        path: 'sprites/horizontal-run.png',~
    +          throw_at: args.state.tick_count + i * args.state.gap_between_hammers
    +** Processing line: ~        }~
     - Inside source: true
     *** True Line Result
    -        path: 'sprites/horizontal-run.png',
    -** Processing line: ~        tile_x: 0 + (tile_index * player.tile_size),~
    +        }
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -        tile_x: 0 + (tile_index * player.tile_size),
    -** Processing line: ~        tile_y: 0,~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -        tile_y: 0,
    -** Processing line: ~        tile_w: player.tile_size,~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        tile_w: player.tile_size,
    -** Processing line: ~        tile_h: player.tile_size,~
    +
    +** Processing line: ~    # add elements from hammer_queue collection to the hammers collection by~
     - Inside source: true
     *** True Line Result
    -        tile_h: player.tile_size,
    -** Processing line: ~        flip_horizontally: player.dir_x > 0,~
    +    # add elements from hammer_queue collection to the hammers collection by
    +** Processing line: ~    # finding all hammers that were thrown before the current frame (have already been thrown)~
     - Inside source: true
     *** True Line Result
    -        flip_horizontally: player.dir_x > 0,
    -** Processing line: ~        # a: 40~
    +    # finding all hammers that were thrown before the current frame (have already been thrown)
    +** Processing line: ~    args.state.enemy.hammers += args.state.enemy.hammer_queue.find_all do |h|~
     - Inside source: true
     *** True Line Result
    -        # a: 40
    -** Processing line: ~      }~
    +    args.state.enemy.hammers += args.state.enemy.hammer_queue.find_all do |h|
    +** Processing line: ~      h[:throw_at] < args.state.tick_count~
     - Inside source: true
     *** True Line Result
    -      }
    +      h[:throw_at] < args.state.tick_count
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -20776,46 +21143,54 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def sprite_horizontal_stand~
    +** Processing line: ~    args.state.enemy.hammers.each do |h| # sets values for all hammers in collection~
     - Inside source: true
     *** True Line Result
    -    def sprite_horizontal_stand
    -** Processing line: ~      {~
    +    args.state.enemy.hammers.each do |h| # sets values for all hammers in collection
    +** Processing line: ~      h[:y]  ||= args.state.enemy.y + 130~
     - Inside source: true
     *** True Line Result
    -      {
    -** Processing line: ~        x: player.x,~
    +      h[:y]  ||= args.state.enemy.y + 130
    +** Processing line: ~      h[:dy] ||= args.state.hammer_upward_launch_power~
     - Inside source: true
     *** True Line Result
    -        x: player.x,
    -** Processing line: ~        y: player.y,~
    +      h[:dy] ||= args.state.hammer_upward_launch_power
    +** Processing line: ~      h[:dy]  += args.state.gravity # acceleration is change in gravity~
     - Inside source: true
     *** True Line Result
    -        y: player.y,
    -** Processing line: ~        w: player.tile_size,~
    +      h[:dy]  += args.state.gravity # acceleration is change in gravity
    +** Processing line: ~      h[:x]   += h[:dx] # incremented by change in position~
     - Inside source: true
     *** True Line Result
    -        w: player.tile_size,
    -** Processing line: ~        h: player.tile_size,~
    +      h[:x]   += h[:dx] # incremented by change in position
    +** Processing line: ~      h[:y]   += h[:dy]~
     - Inside source: true
     *** True Line Result
    -        h: player.tile_size,
    -** Processing line: ~        path: 'sprites/horizontal-stand.png',~
    +      h[:y]   += h[:dy]
    +** Processing line: ~      h[:rect] = [h[:x], h[:y], h[:w], h[:h]] # sets definition of hammer's rect~
     - Inside source: true
     *** True Line Result
    -        path: 'sprites/horizontal-stand.png',
    -** Processing line: ~        flip_horizontally: player.dir_x > 0,~
    +      h[:rect] = [h[:x], h[:y], h[:w], h[:h]] # sets definition of hammer's rect
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -        flip_horizontally: player.dir_x > 0,
    -** Processing line: ~        # a: 40~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        # a: 40
    -** Processing line: ~      }~
    +
    +** Processing line: ~    # reject hammers that have been thrown before current frame (have already been thrown)~
     - Inside source: true
     *** True Line Result
    -      }
    +    # reject hammers that have been thrown before current frame (have already been thrown)
    +** Processing line: ~    args.state.enemy.hammer_queue = args.state.enemy.hammer_queue.reject do |h|~
    +- Inside source: true
    +*** True Line Result
    +    args.state.enemy.hammer_queue = args.state.enemy.hammer_queue.reject do |h|
    +** Processing line: ~      h[:throw_at] < args.state.tick_count~
    +- Inside source: true
    +*** True Line Result
    +      h[:throw_at] < args.state.tick_count
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -20824,158 +21199,158 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def sprite_horizontal_slash~
    -- Inside source: true
    -*** True Line Result
    -    def sprite_horizontal_slash
    -** Processing line: ~      tile_index   = player.slash_at.frame_index(5, player.slash_frames.idiv(5), false) || 0~
    +** Processing line: ~    # any hammers with a y position less than 0 are rejected from the hammers collection~
     - Inside source: true
     *** True Line Result
    -      tile_index   = player.slash_at.frame_index(5, player.slash_frames.idiv(5), false) || 0
    -** Processing line: ~~
    +    # any hammers with a y position less than 0 are rejected from the hammers collection
    +** Processing line: ~    # since they have gone too far down (outside the scope's screen)~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      {~
    +    # since they have gone too far down (outside the scope's screen)
    +** Processing line: ~    args.state.enemy.hammers = args.state.enemy.hammers.reject { |h| h[:y] < 0 }~
     - Inside source: true
     *** True Line Result
    -      {
    -** Processing line: ~        x: player.x - 41.25,~
    +    args.state.enemy.hammers = args.state.enemy.hammers.reject { |h| h[:y] < 0 }
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        x: player.x - 41.25,
    -** Processing line: ~        y: player.y - 41.25,~
    +
    +** Processing line: ~    # if there are any hammers that intersect with (or hit) the player,~
     - Inside source: true
     *** True Line Result
    -        y: player.y - 41.25,
    -** Processing line: ~        w: 165,~
    +    # if there are any hammers that intersect with (or hit) the player,
    +** Processing line: ~    # the reset_player method is called (so the game can start over)~
     - Inside source: true
     *** True Line Result
    -        w: 165,
    -** Processing line: ~        h: 165,~
    +    # the reset_player method is called (so the game can start over)
    +** Processing line: ~    if args.state.enemy.hammers.any? { |h| h[:rect].intersect_rect?(args.state.player.rect) }~
     - Inside source: true
     *** True Line Result
    -        h: 165,
    -** Processing line: ~        path: 'sprites/horizontal-slash.png',~
    +    if args.state.enemy.hammers.any? { |h| h[:rect].intersect_rect?(args.state.player.rect) }
    +** Processing line: ~      reset_player args~
     - Inside source: true
     *** True Line Result
    -        path: 'sprites/horizontal-slash.png',
    -** Processing line: ~        tile_x: 0 + (tile_index * 128),~
    +      reset_player args
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -        tile_x: 0 + (tile_index * 128),
    -** Processing line: ~        tile_y: 0,~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        tile_y: 0,
    -** Processing line: ~        tile_w: 128,~
    +
    +** Processing line: ~    # if the enemy's rect intersects with (or hits) the player,~
     - Inside source: true
     *** True Line Result
    -        tile_w: 128,
    -** Processing line: ~        tile_h: 128,~
    +    # if the enemy's rect intersects with (or hits) the player,
    +** Processing line: ~    # the reset_player method is called (so the game can start over)~
     - Inside source: true
     *** True Line Result
    -        tile_h: 128,
    -** Processing line: ~        flip_horizontally: player.dir_x > 0~
    +    # the reset_player method is called (so the game can start over)
    +** Processing line: ~    if args.state.enemy.rect.intersect_rect? args.state.player.rect~
     - Inside source: true
     *** True Line Result
    -        flip_horizontally: player.dir_x > 0
    -** Processing line: ~      }~
    +    if args.state.enemy.rect.intersect_rect? args.state.player.rect
    +** Processing line: ~      reset_player args~
     - Inside source: true
     *** True Line Result
    -      }
    +      reset_player args
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
         end
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def render_player~
    +** Processing line: ~  # Resets the player by changing its properties back to the values they had at initialization~
     - Inside source: true
     *** True Line Result
    -    def render_player
    -** Processing line: ~      if player.slash_at~
    +  # Resets the player by changing its properties back to the values they had at initialization
    +** Processing line: ~  def reset_player args~
     - Inside source: true
     *** True Line Result
    -      if player.slash_at
    -** Processing line: ~        outputs.sprites << sprite_horizontal_slash~
    +  def reset_player args
    +** Processing line: ~    args.state.player.x = 0~
     - Inside source: true
     *** True Line Result
    -        outputs.sprites << sprite_horizontal_slash
    -** Processing line: ~      elsif player.is_moving~
    +    args.state.player.x = 0
    +** Processing line: ~    args.state.player.y = args.state.bridge_top~
     - Inside source: true
     *** True Line Result
    -      elsif player.is_moving
    -** Processing line: ~        outputs.sprites << sprite_horizontal_run~
    +    args.state.player.y = args.state.bridge_top
    +** Processing line: ~    args.state.player.dy = 0~
     - Inside source: true
     *** True Line Result
    -        outputs.sprites << sprite_horizontal_run
    -** Processing line: ~      else~
    +    args.state.player.dy = 0
    +** Processing line: ~    args.state.player.dx = 0~
     - Inside source: true
     *** True Line Result
    -      else
    -** Processing line: ~        outputs.sprites << sprite_horizontal_stand~
    +    args.state.player.dx = 0
    +** Processing line: ~    args.state.enemy.hammers.clear # empties hammer collection~
     - Inside source: true
     *** True Line Result
    -        outputs.sprites << sprite_horizontal_stand
    -** Processing line: ~      end~
    +    args.state.enemy.hammers.clear # empties hammer collection
    +** Processing line: ~    args.state.enemy.hammer_queue.clear # empties hammer_queue~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +    args.state.enemy.hammer_queue.clear # empties hammer_queue
    +** Processing line: ~    args.state.game_over_at = args.state.tick_count # game_over_at set to current frame (or passage of time)~
     - Inside source: true
     *** True Line Result
    -    end
    +    args.state.game_over_at = args.state.tick_count # game_over_at set to current frame (or passage of time)
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def render_enemies~
    +** Processing line: ~  # Processes input from the user to move the player~
     - Inside source: true
     *** True Line Result
    -    def render_enemies
    -** Processing line: ~      outputs.borders << state.enemies~
    +  # Processes input from the user to move the player
    +** Processing line: ~  def input args~
     - Inside source: true
     *** True Line Result
    -      outputs.borders << state.enemies
    -** Processing line: ~    end~
    +  def input args
    +** Processing line: ~    if args.inputs.keyboard.space # if the user presses the space bar~
     - Inside source: true
     *** True Line Result
    -    end
    +    if args.inputs.keyboard.space # if the user presses the space bar
    +** Processing line: ~      args.state.player.jumped_at ||= args.state.tick_count # jumped_at is set to current frame~
    +- Inside source: true
    +*** True Line Result
    +      args.state.player.jumped_at ||= args.state.tick_count # jumped_at is set to current frame
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def render_debug_layer~
    +** Processing line: ~      # if the time that has passed since the jump is less than the player's jump duration and~
     - Inside source: true
     *** True Line Result
    -    def render_debug_layer
    -** Processing line: ~      return if !state.show_debug_layer~
    +      # if the time that has passed since the jump is less than the player's jump duration and
    +** Processing line: ~      # the player is not falling~
     - Inside source: true
     *** True Line Result
    -      return if !state.show_debug_layer
    -** Processing line: ~      outputs.labels << state.watch_list.map.with_index do |(k, v), i|~
    +      # the player is not falling
    +** Processing line: ~      if args.state.player.jumped_at.elapsed_time < args.state.player_jump_power_duration && !args.state.player.falling~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << state.watch_list.map.with_index do |(k, v), i|
    -** Processing line: ~         [30, 710 - i * 28, "#{k}: #{v || "(nil)"}"]~
    +      if args.state.player.jumped_at.elapsed_time < args.state.player_jump_power_duration && !args.state.player.falling
    +** Processing line: ~        args.state.player.dy = args.state.player_jump_power # change in y is set to power of player's jump~
     - Inside source: true
     *** True Line Result
    -         [30, 710 - i * 28, "#{k}: #{v || "(nil)"}"]
    +        args.state.player.dy = args.state.player_jump_power # change in y is set to power of player's jump
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
           end
    -** Processing line: ~~
    -- Inside source: true
    -*** True Line Result
    -
    -** Processing line: ~      outputs.borders << player.slash_collision_rect~
    -- Inside source: true
    -*** True Line Result
    -      outputs.borders << player.slash_collision_rect
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -20984,18 +21359,22 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def slash_initiate?~
    +** Processing line: ~    # if the space bar is in the "up" state (or not being pressed down)~
     - Inside source: true
     *** True Line Result
    -    def slash_initiate?
    -** Processing line: ~      # buffalo usb controller has a button and b button swapped lol~
    +    # if the space bar is in the "up" state (or not being pressed down)
    +** Processing line: ~    if args.inputs.keyboard.key_up.space~
     - Inside source: true
     *** True Line Result
    -      # buffalo usb controller has a button and b button swapped lol
    -** Processing line: ~      inputs.controller_one.key_down.a || inputs.keyboard.key_down.j~
    +    if args.inputs.keyboard.key_up.space
    +** Processing line: ~      args.state.player.jumped_at = nil # jumped_at is empty~
     - Inside source: true
     *** True Line Result
    -      inputs.controller_one.key_down.a || inputs.keyboard.key_down.j
    +      args.state.player.jumped_at = nil # jumped_at is empty
    +** Processing line: ~      args.state.player.falling = true # the player is falling~
    +- Inside source: true
    +*** True Line Result
    +      args.state.player.falling = true # the player is falling
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -21004,86 +21383,98 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def input~
    +** Processing line: ~    if args.inputs.keyboard.left # if left key is pressed~
     - Inside source: true
     *** True Line Result
    -    def input
    -** Processing line: ~      # player movement~
    +    if args.inputs.keyboard.left # if left key is pressed
    +** Processing line: ~      args.state.player.dx -= args.state.player_acceleration # dx decreases by acceleration (player goes left)~
     - Inside source: true
     *** True Line Result
    -      # player movement
    -** Processing line: ~      if slash_complete? && (vector = inputs.directional_vector)~
    +      args.state.player.dx -= args.state.player_acceleration # dx decreases by acceleration (player goes left)
    +** Processing line: ~      # dx is either set to current dx or the negative max run speed (which would be -10),~
     - Inside source: true
     *** True Line Result
    -      if slash_complete? && (vector = inputs.directional_vector)
    -** Processing line: ~        player.x += vector.x * player.speed~
    +      # dx is either set to current dx or the negative max run speed (which would be -10),
    +** Processing line: ~      # whichever has a greater value~
     - Inside source: true
     *** True Line Result
    -        player.x += vector.x * player.speed
    -** Processing line: ~        player.y += vector.y * player.speed~
    +      # whichever has a greater value
    +** Processing line: ~      args.state.player.dx = args.state.player.dx.greater(-args.state.player_max_run_speed)~
     - Inside source: true
     *** True Line Result
    -        player.y += vector.y * player.speed
    -** Processing line: ~      end~
    +      args.state.player.dx = args.state.player.dx.greater(-args.state.player_max_run_speed)
    +** Processing line: ~    elsif args.inputs.keyboard.right # if right key is pressed~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~      player.slash_at = slash_initiate? if slash_initiate?~
    +    elsif args.inputs.keyboard.right # if right key is pressed
    +** Processing line: ~      args.state.player.dx += args.state.player_acceleration # dx increases by acceleration (player goes right)~
     - Inside source: true
     *** True Line Result
    -      player.slash_at = slash_initiate? if slash_initiate?
    -** Processing line: ~    end~
    +      args.state.player.dx += args.state.player_acceleration # dx increases by acceleration (player goes right)
    +** Processing line: ~      # dx is either set to current dx or max run speed (which would be 10),~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +      # dx is either set to current dx or max run speed (which would be 10),
    +** Processing line: ~      # whichever has a lesser value~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def calc_movement~
    +      # whichever has a lesser value
    +** Processing line: ~      args.state.player.dx = args.state.player.dx.lesser(args.state.player_max_run_speed)~
     - Inside source: true
     *** True Line Result
    -    def calc_movement
    -** Processing line: ~      # movement~
    +      args.state.player.dx = args.state.player.dx.lesser(args.state.player_max_run_speed)
    +** Processing line: ~    else~
     - Inside source: true
     *** True Line Result
    -      # movement
    -** Processing line: ~      if vector = inputs.directional_vector~
    +    else
    +** Processing line: ~      args.state.player.dx *= args.state.player_speed_slowdown_rate # dx is scaled down~
     - Inside source: true
     *** True Line Result
    -      if vector = inputs.directional_vector
    -** Processing line: ~        state.debug_label = vector~
    +      args.state.player.dx *= args.state.player_speed_slowdown_rate # dx is scaled down
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -        state.debug_label = vector
    -** Processing line: ~        player.dir_x = vector.x~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -        player.dir_x = vector.x
    -** Processing line: ~        player.dir_y = vector.y~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        player.dir_y = vector.y
    -** Processing line: ~        player.is_moving = true~
    +
    +** Processing line: ~  def tick_instructions args, text, y = 715~
     - Inside source: true
     *** True Line Result
    -        player.is_moving = true
    -** Processing line: ~      else~
    +  def tick_instructions args, text, y = 715
    +** Processing line: ~    return if args.state.key_event_occurred~
     - Inside source: true
     *** True Line Result
    -      else
    -** Processing line: ~        state.debug_label = vector~
    +    return if args.state.key_event_occurred
    +** Processing line: ~    if args.inputs.mouse.click ||~
     - Inside source: true
     *** True Line Result
    -        state.debug_label = vector
    -** Processing line: ~        player.is_moving = false~
    +    if args.inputs.mouse.click ||
    +** Processing line: ~       args.inputs.keyboard.directional_vector ||~
     - Inside source: true
     *** True Line Result
    -        player.is_moving = false
    -** Processing line: ~      end~
    +       args.inputs.keyboard.directional_vector ||
    +** Processing line: ~       args.inputs.keyboard.key_down.enter ||~
     - Inside source: true
     *** True Line Result
    -      end
    +       args.inputs.keyboard.key_down.enter ||
    +** Processing line: ~       args.inputs.keyboard.key_down.space ||~
    +- Inside source: true
    +*** True Line Result
    +       args.inputs.keyboard.key_down.space ||
    +** Processing line: ~       args.inputs.keyboard.key_down.escape~
    +- Inside source: true
    +*** True Line Result
    +       args.inputs.keyboard.key_down.escape
    +** Processing line: ~      args.state.key_event_occurred = true~
    +- Inside source: true
    +*** True Line Result
    +      args.state.key_event_occurred = true
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -21092,222 +21483,218 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def calc_slash~
    +** Processing line: ~    args.outputs.debug << [0, y - 50, 1280, 60].solid~
     - Inside source: true
     *** True Line Result
    -    def calc_slash
    -** Processing line: ~      # re-calc the location of the swords collision box~
    +    args.outputs.debug << [0, y - 50, 1280, 60].solid
    +** Processing line: ~    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label~
     - Inside source: true
     *** True Line Result
    -      # re-calc the location of the swords collision box
    -** Processing line: ~      if player.dir_x.positive?~
    +    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label
    +** Processing line: ~    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label~
     - Inside source: true
     *** True Line Result
    -      if player.dir_x.positive?
    -** Processing line: ~        player.slash_collision_rect = [player.x + player.tile_size,~
    +    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -        player.slash_collision_rect = [player.x + player.tile_size,
    -** Processing line: ~                                       player.y + player.tile_size.half - 10,~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -                                       player.y + player.tile_size.half - 10,
    -** Processing line: ~                                       40, 20]~
    -- Inside source: true
    +
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
     *** True Line Result
    -                                       40, 20]
    -** Processing line: ~      else~
    -- Inside source: true
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
     *** True Line Result
    -      else
    -** Processing line: ~        player.slash_collision_rect = [player.x - 32 - 8,~
    -- Inside source: true
    +
    +** Processing line: ~*** Physics And Collisions - Entities - main.rb~
    +- Header detected.
     *** True Line Result
    -        player.slash_collision_rect = [player.x - 32 - 8,
    -** Processing line: ~                                       player.y + player.tile_size.half - 10,~
    -- Inside source: true
    +
     *** True Line Result
    -                                       player.y + player.tile_size.half - 10,
    -** Processing line: ~                                       40, 20]~
    +*** Physics And Collisions - Entities - main.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/04_physics_and_collisions/03_entities/app/main.rb~
     - Inside source: true
     *** True Line Result
    -                                       40, 20]
    -** Processing line: ~      end~
    +  # ./samples/04_physics_and_collisions/03_entities/app/main.rb
    +** Processing line: ~  =begin~
     - Inside source: true
     *** True Line Result
    -      end
    +  =begin
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      # recalc sword's slash state~
    -- Inside source: true
    -*** True Line Result
    -      # recalc sword's slash state
    -** Processing line: ~      player.slash_at = nil if slash_complete?~
    +** Processing line: ~   Reminders:~
     - Inside source: true
     *** True Line Result
    -      player.slash_at = nil if slash_complete?
    +   Reminders:
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      # determine collision if the sword is at it's point of damaging~
    +** Processing line: ~   - map: Ruby method used to transform data; used in arrays, hashes, and collections.~
     - Inside source: true
     *** True Line Result
    -      # determine collision if the sword is at it's point of damaging
    -** Processing line: ~      return unless slash_can_damage?~
    +   - map: Ruby method used to transform data; used in arrays, hashes, and collections.
    +** Processing line: ~     Can be used to perform an action on every element of a collection, such as multiplying~
     - Inside source: true
     *** True Line Result
    -      return unless slash_can_damage?
    +     Can be used to perform an action on every element of a collection, such as multiplying
    +** Processing line: ~     each element by 2 or declaring every element as a new entity.~
    +- Inside source: true
    +*** True Line Result
    +     each element by 2 or declaring every element as a new entity.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      state.enemies.reject! { |e| e.intersect_rect? player.slash_collision_rect }~
    +** Processing line: ~   - reject: Removes elements from a collection if they meet certain requirements.~
     - Inside source: true
     *** True Line Result
    -      state.enemies.reject! { |e| e.intersect_rect? player.slash_collision_rect }
    -** Processing line: ~    end~
    +   - reject: Removes elements from a collection if they meet certain requirements.
    +** Processing line: ~     For example, you can derive an array of odd numbers from an original array of~
     - Inside source: true
     *** True Line Result
    -    end
    +     For example, you can derive an array of odd numbers from an original array of
    +** Processing line: ~     numbers 1 through 10 by rejecting all elements that are even (or divisible by 2).~
    +- Inside source: true
    +*** True Line Result
    +     numbers 1 through 10 by rejecting all elements that are even (or divisible by 2).
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def slash_complete?~
    +** Processing line: ~   - args.state.new_entity: Used when we want to create a new object, like a sprite or button.~
     - Inside source: true
     *** True Line Result
    -    def slash_complete?
    -** Processing line: ~      !player.slash_at || player.slash_at.elapsed?(player.slash_frames)~
    +   - args.state.new_entity: Used when we want to create a new object, like a sprite or button.
    +** Processing line: ~     In this sample app, new_entity is used to define the properties of enemies and bullets.~
     - Inside source: true
     *** True Line Result
    -      !player.slash_at || player.slash_at.elapsed?(player.slash_frames)
    -** Processing line: ~    end~
    +     In this sample app, new_entity is used to define the properties of enemies and bullets.
    +** Processing line: ~     (Remember, you can use state to define ANY property and it will be retained across frames.)~
     - Inside source: true
     *** True Line Result
    -    end
    +     (Remember, you can use state to define ANY property and it will be retained across frames.)
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def slash_can_damage?~
    +** Processing line: ~   - args.outputs.labels: An array. The values generate a label on the screen.~
     - Inside source: true
     *** True Line Result
    -    def slash_can_damage?
    -** Processing line: ~      # damage occurs half way into the slash animation~
    +   - args.outputs.labels: An array. The values generate a label on the screen.
    +** Processing line: ~     The parameters are [X, Y, TEXT, SIZE, ALIGN, RED, GREEN, BLUE, ALPHA, FONT STYLE]~
     - Inside source: true
     *** True Line Result
    -      # damage occurs half way into the slash animation
    -** Processing line: ~      return false if slash_complete?~
    +     The parameters are [X, Y, TEXT, SIZE, ALIGN, RED, GREEN, BLUE, ALPHA, FONT STYLE]
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      return false if slash_complete?
    -** Processing line: ~      return false if (player.slash_at + player.slash_frames.idiv(2)) != state.tick_count~
    -- Inside source: true
    -*** True Line Result
    -      return false if (player.slash_at + player.slash_frames.idiv(2)) != state.tick_count
    -** Processing line: ~      return true~
    -- Inside source: true
    -*** True Line Result
    -      return true
    -** Processing line: ~    end~
    +
    +** Processing line: ~   - ARRAY#intersect_rect?: Returns true or false depending on if the two rectangles intersect.~
     - Inside source: true
     *** True Line Result
    -    end
    +   - ARRAY#intersect_rect?: Returns true or false depending on if the two rectangles intersect.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def calc~
    +** Processing line: ~   - args.inputs.mouse.click.point.(x|y): The x and y location of the mouse.~
     - Inside source: true
     *** True Line Result
    -    def calc
    -** Processing line: ~      # generate an enemy if there aren't any on the screen~
    +   - args.inputs.mouse.click.point.(x|y): The x and y location of the mouse.
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      # generate an enemy if there aren't any on the screen
    -** Processing line: ~      add_enemy if state.enemies.length == 0~
    +
    +** Processing line: ~  =end~
     - Inside source: true
     *** True Line Result
    -      add_enemy if state.enemies.length == 0
    -** Processing line: ~      calc_movement~
    +  =end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      calc_movement
    -** Processing line: ~      calc_slash~
    +
    +** Processing line: ~  # This sample app shows enemies that contain an id value and the time they were created.~
     - Inside source: true
     *** True Line Result
    -      calc_slash
    -** Processing line: ~    end~
    +  # This sample app shows enemies that contain an id value and the time they were created.
    +** Processing line: ~  # These enemies can be removed by shooting at them with bullets.~
     - Inside source: true
     *** True Line Result
    -    end
    +  # These enemies can be removed by shooting at them with bullets.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # source is at http://github.com/amirrajan/dragonruby-link-to-the-past~
    -- Inside source: true
    -*** True Line Result
    -    # source is at http://github.com/amirrajan/dragonruby-link-to-the-past
    -** Processing line: ~    def tick~
    +** Processing line: ~  # Calls all methods necessary for the game to function properly.~
     - Inside source: true
     *** True Line Result
    -    def tick
    -** Processing line: ~      defaults~
    +  # Calls all methods necessary for the game to function properly.
    +** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
    -      defaults
    -** Processing line: ~      render_enemies~
    +  def tick args
    +** Processing line: ~    tick_instructions args, "Sample app shows how to use args.state.new_entity along with collisions. CLICK to shoot a bullet."~
     - Inside source: true
     *** True Line Result
    -      render_enemies
    -** Processing line: ~      render_player~
    +    tick_instructions args, "Sample app shows how to use args.state.new_entity along with collisions. CLICK to shoot a bullet."
    +** Processing line: ~    defaults args~
     - Inside source: true
     *** True Line Result
    -      render_player
    -** Processing line: ~      outputs.labels << [30, 30, "Gamepad: D-Pad to move. B button to attack."]~
    +    defaults args
    +** Processing line: ~    render args~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << [30, 30, "Gamepad: D-Pad to move. B button to attack."]
    -** Processing line: ~      outputs.labels << [30, 52, "Keyboard: WASD/Arrow keys to move. J to attack."]~
    +    render args
    +** Processing line: ~    calc args~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << [30, 52, "Keyboard: WASD/Arrow keys to move. J to attack."]
    -** Processing line: ~      render_debug_layer~
    +    calc args
    +** Processing line: ~    process_inputs args~
     - Inside source: true
     *** True Line Result
    -      render_debug_layer
    -** Processing line: ~      input~
    +    process_inputs args
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -      input
    -** Processing line: ~      calc~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      calc
    -** Processing line: ~    end~
    +
    +** Processing line: ~  # Sets default values~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +  # Sets default values
    +** Processing line: ~  # Enemies and bullets start off as empty collections~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def player~
    +  # Enemies and bullets start off as empty collections
    +** Processing line: ~  def defaults args~
     - Inside source: true
     *** True Line Result
    -    def player
    -** Processing line: ~      state.player~
    +  def defaults args
    +** Processing line: ~    args.state.enemies ||= []~
     - Inside source: true
     *** True Line Result
    -      state.player
    -** Processing line: ~    end~
    +    args.state.enemies ||= []
    +** Processing line: ~    args.state.bullets ||= []~
     - Inside source: true
     *** True Line Result
    -    end
    +    args.state.bullets ||= []
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -21316,298 +21703,282 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  $game = Game.new~
    +** Processing line: ~  # Provides each enemy in enemies collection with rectangular border,~
     - Inside source: true
     *** True Line Result
    -  $game = Game.new
    -** Processing line: ~~
    +  # Provides each enemy in enemies collection with rectangular border,
    +** Processing line: ~  # as well as a label showing id and when they were created~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def tick args~
    +  # as well as a label showing id and when they were created
    +** Processing line: ~  def render args~
     - Inside source: true
     *** True Line Result
    -  def tick args
    -** Processing line: ~    $game.args = args~
    +  def render args
    +** Processing line: ~    # When you're calling a method that takes no arguments, you can use this & syntax on map.~
     - Inside source: true
     *** True Line Result
    -    $game.args = args
    -** Processing line: ~    $game.tick~
    +    # When you're calling a method that takes no arguments, you can use this & syntax on map.
    +** Processing line: ~    # Numbers are being added to x and y in order to keep the text within the enemy's borders.~
     - Inside source: true
     *** True Line Result
    -    $game.tick
    -** Processing line: ~  end~
    +    # Numbers are being added to x and y in order to keep the text within the enemy's borders.
    +** Processing line: ~    args.outputs.borders << args.state.enemies.map(&:rect)~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +    args.outputs.borders << args.state.enemies.map(&:rect)
    +** Processing line: ~    args.outputs.labels  << args.state.enemies.flat_map do |enemy|~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  $gtk.reset~
    +    args.outputs.labels  << args.state.enemies.flat_map do |enemy|
    +** Processing line: ~      [~
     - Inside source: true
     *** True Line Result
    -  $gtk.reset
    -** Processing line: ~~
    +      [
    +** Processing line: ~        [enemy.x + 4, enemy.y + 29, "id: #{enemy.entity_id}", -3, 0],~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~#+end_src~
    -- Line was identified as the end of a code block.
    -*** True Line Result
    -#+end_src
    -** Processing line: ~~
    -- End of paragraph detected.
    -*** True Line Result
    -
    -** Processing line: ~*** Rendering Sprites - Color And Rotation - main.rb~
    -- Header detected.
    -*** True Line Result
    -
    -*** True Line Result
    -*** Rendering Sprites - Color And Rotation - main.rb
    -** Processing line: ~#+begin_src ruby~
    -- Line was identified as the beginning of a code block.
    -*** True Line Result
    -
    -*** True Line Result
    -#+begin_src ruby
    -** Processing line: ~  # ./samples/03_rendering_sprites/04_color_and_rotation/app/main.rb~
    +        [enemy.x + 4, enemy.y + 29, "id: #{enemy.entity_id}", -3, 0],
    +** Processing line: ~        [enemy.x + 4, enemy.y + 17, "created_at: #{enemy.created_at}", -3, 0] # frame enemy was created~
     - Inside source: true
     *** True Line Result
    -  # ./samples/03_rendering_sprites/04_color_and_rotation/app/main.rb
    -** Processing line: ~  =begin~
    +        [enemy.x + 4, enemy.y + 17, "created_at: #{enemy.created_at}", -3, 0] # frame enemy was created
    +** Processing line: ~      ]~
     - Inside source: true
     *** True Line Result
    -  =begin
    -** Processing line: ~   APIs listing that haven't been encountered in previous sample apps:~
    +      ]
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -   APIs listing that haven't been encountered in previous sample apps:
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~   - merge: Returns a hash containing the contents of two original hashes.~
    +** Processing line: ~    # Outputs bullets in bullets collection as rectangular solids~
     - Inside source: true
     *** True Line Result
    -   - merge: Returns a hash containing the contents of two original hashes.
    -** Processing line: ~     Merge does not allow duplicate keys, so the value of a repeated key~
    +    # Outputs bullets in bullets collection as rectangular solids
    +** Processing line: ~    args.outputs.solids << args.state.bullets.map(&:rect)~
     - Inside source: true
     *** True Line Result
    -     Merge does not allow duplicate keys, so the value of a repeated key
    -** Processing line: ~     will be overwritten.~
    +    args.outputs.solids << args.state.bullets.map(&:rect)
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -     will be overwritten.
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~     For example, if we had two hashes~
    +** Processing line: ~  # Calls all methods necessary for performing calculations~
     - Inside source: true
     *** True Line Result
    -     For example, if we had two hashes
    -** Processing line: ~     h1 = { "a" => 1, "b" => 2}~
    +  # Calls all methods necessary for performing calculations
    +** Processing line: ~  def calc args~
     - Inside source: true
     *** True Line Result
    -     h1 = { "a" => 1, "b" => 2}
    -** Processing line: ~     h2 = { "b" => 3, "c" => 3}~
    +  def calc args
    +** Processing line: ~    add_new_enemies_if_needed args~
     - Inside source: true
     *** True Line Result
    -     h2 = { "b" => 3, "c" => 3}
    -** Processing line: ~     and we called the command~
    +    add_new_enemies_if_needed args
    +** Processing line: ~    move_bullets args~
     - Inside source: true
     *** True Line Result
    -     and we called the command
    -** Processing line: ~     h1.merge(h2)~
    +    move_bullets args
    +** Processing line: ~    calculate_collisions args~
     - Inside source: true
     *** True Line Result
    -     h1.merge(h2)
    -** Processing line: ~     the result would the following hash~
    +    calculate_collisions args
    +** Processing line: ~    remove_bullets_of_screen args~
     - Inside source: true
     *** True Line Result
    -     the result would the following hash
    -** Processing line: ~     { "a" => 1, "b" => 3, "c" => 3}.~
    +    remove_bullets_of_screen args
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -     { "a" => 1, "b" => 3, "c" => 3}.
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~   Reminders:~
    -- Inside source: true
    -*** True Line Result
    -   Reminders:
    -** Processing line: ~~
    +** Processing line: ~  # Adds enemies to the enemies collection and sets their values~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   - Hashes: Collection of unique keys and their corresponding values. The value can be found~
    +  # Adds enemies to the enemies collection and sets their values
    +** Processing line: ~  def add_new_enemies_if_needed args~
     - Inside source: true
     *** True Line Result
    -   - Hashes: Collection of unique keys and their corresponding values. The value can be found
    -** Processing line: ~     using their keys.~
    +  def add_new_enemies_if_needed args
    +** Processing line: ~    return if args.state.enemies.length >= 10 # if 10 or more enemies, enemies are not added~
     - Inside source: true
     *** True Line Result
    -     using their keys.
    -** Processing line: ~     In this sample app, we're using a hash to create a sprite.~
    +    return if args.state.enemies.length >= 10 # if 10 or more enemies, enemies are not added
    +** Processing line: ~    return unless args.state.bullets.length == 0 # if user has not yet shot bullet, no enemies are added~
     - Inside source: true
     *** True Line Result
    -     In this sample app, we're using a hash to create a sprite.
    +    return unless args.state.bullets.length == 0 # if user has not yet shot bullet, no enemies are added
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~   - args.outputs.sprites: An array. The values generate a sprite.~
    +** Processing line: ~    args.state.enemies += (10 - args.state.enemies.length).map do # adds enemies so there are 10 total~
     - Inside source: true
     *** True Line Result
    -   - args.outputs.sprites: An array. The values generate a sprite.
    -** Processing line: ~     The parameters are [X, Y, WIDTH, HEIGHT, PATH, ANGLE, ALPHA, RED, GREEN, BLUE]~
    +    args.state.enemies += (10 - args.state.enemies.length).map do # adds enemies so there are 10 total
    +** Processing line: ~      args.state.new_entity(:enemy) do |e| # each enemy is declared as a new entity~
     - Inside source: true
     *** True Line Result
    -     The parameters are [X, Y, WIDTH, HEIGHT, PATH, ANGLE, ALPHA, RED, GREEN, BLUE]
    -** Processing line: ~     Before continuing with this sample app, it is HIGHLY recommended that you look~
    +      args.state.new_entity(:enemy) do |e| # each enemy is declared as a new entity
    +** Processing line: ~        e.x = 640 + 500 * rand # each enemy is given random position on screen~
     - Inside source: true
     *** True Line Result
    -     Before continuing with this sample app, it is HIGHLY recommended that you look
    -** Processing line: ~     at mygame/documentation/05-sprites.md.~
    +        e.x = 640 + 500 * rand # each enemy is given random position on screen
    +** Processing line: ~        e.y = 600 * rand + 50~
     - Inside source: true
     *** True Line Result
    -     at mygame/documentation/05-sprites.md.
    -** Processing line: ~~
    +        e.y = 600 * rand + 50
    +** Processing line: ~        e.rect = [e.x, e.y, 130, 30] # sets definition for enemy's rect~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   - args.inputs.keyboard.key_held.KEY: Determines if a key is being pressed.~
    +        e.rect = [e.x, e.y, 130, 30] # sets definition for enemy's rect
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -   - args.inputs.keyboard.key_held.KEY: Determines if a key is being pressed.
    -** Processing line: ~     For more information about the keyboard, go to mygame/documentation/06-keyboard.md.~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -     For more information about the keyboard, go to mygame/documentation/06-keyboard.md.
    +    end
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~   - args.inputs.controller_one: Takes input from the controller based on what key is pressed.~
    +** Processing line: ~  # Moves bullets across screen~
     - Inside source: true
     *** True Line Result
    -   - args.inputs.controller_one: Takes input from the controller based on what key is pressed.
    -** Processing line: ~     For more information about the controller, go to mygame/documentation/08-controllers.md.~
    +  # Moves bullets across screen
    +** Processing line: ~  # Sets definition of the bullets~
     - Inside source: true
     *** True Line Result
    -     For more information about the controller, go to mygame/documentation/08-controllers.md.
    -** Processing line: ~~
    +  # Sets definition of the bullets
    +** Processing line: ~  def move_bullets args~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   - num1.lesser(num2): Finds the lower value of the given options.~
    +  def move_bullets args
    +** Processing line: ~    args.state.bullets.each do |bullet| # perform action on each bullet in collection~
     - Inside source: true
     *** True Line Result
    -   - num1.lesser(num2): Finds the lower value of the given options.
    +    args.state.bullets.each do |bullet| # perform action on each bullet in collection
    +** Processing line: ~      bullet.x += bullet.speed # increment x by speed (bullets fly horizontally across screen)~
    +- Inside source: true
    +*** True Line Result
    +      bullet.x += bullet.speed # increment x by speed (bullets fly horizontally across screen)
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  =end~
    +** Processing line: ~      # By randomizing the value that increments bullet.y, the bullet does not fly straight up and out~
     - Inside source: true
     *** True Line Result
    -  =end
    -** Processing line: ~~
    +      # By randomizing the value that increments bullet.y, the bullet does not fly straight up and out
    +** Processing line: ~      # of the scope of the screen. Try removing what follows bullet.speed, or changing 0.25 to 1.25 to~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  # This sample app shows a car moving across the screen. It loops back around if it exceeds the dimensions of the screen,~
    +      # of the scope of the screen. Try removing what follows bullet.speed, or changing 0.25 to 1.25 to
    +** Processing line: ~      # see what happens to the bullet's movement.~
     - Inside source: true
     *** True Line Result
    -  # This sample app shows a car moving across the screen. It loops back around if it exceeds the dimensions of the screen,
    -** Processing line: ~  # and also can be moved in different directions through keyboard input from the user.~
    +      # see what happens to the bullet's movement.
    +** Processing line: ~      bullet.y += bullet.speed.*(0.25).randomize(:ratio, :sign)~
     - Inside source: true
     *** True Line Result
    -  # and also can be moved in different directions through keyboard input from the user.
    -** Processing line: ~~
    +      bullet.y += bullet.speed.*(0.25).randomize(:ratio, :sign)
    +** Processing line: ~      bullet.rect = [bullet.x, bullet.y, bullet.size, bullet.size] # sets definition of bullet's rect~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  # Calls the methods necessary for the game to run successfully.~
    +      bullet.rect = [bullet.x, bullet.y, bullet.size, bullet.size] # sets definition of bullet's rect
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  # Calls the methods necessary for the game to run successfully.
    -** Processing line: ~  def tick args~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -  def tick args
    -** Processing line: ~    default args~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    default args
    -** Processing line: ~    render args.grid, args.outputs, args.state~
    +
    +** Processing line: ~  # Determines if a bullet hits an enemy~
     - Inside source: true
     *** True Line Result
    -    render args.grid, args.outputs, args.state
    -** Processing line: ~    calc args.state~
    +  # Determines if a bullet hits an enemy
    +** Processing line: ~  def calculate_collisions args~
     - Inside source: true
     *** True Line Result
    -    calc args.state
    -** Processing line: ~    process_inputs args~
    +  def calculate_collisions args
    +** Processing line: ~    args.state.bullets.each do |bullet| # perform action on every bullet and enemy in collections~
     - Inside source: true
     *** True Line Result
    -    process_inputs args
    -** Processing line: ~  end~
    +    args.state.bullets.each do |bullet| # perform action on every bullet and enemy in collections
    +** Processing line: ~      args.state.enemies.each do |enemy|~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +      args.state.enemies.each do |enemy|
    +** Processing line: ~        # if bullet has not exploded yet and the bullet hits an enemy~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  # Sets default values for the car sprite~
    +        # if bullet has not exploded yet and the bullet hits an enemy
    +** Processing line: ~        if !bullet.exploded && bullet.rect.intersect_rect?(enemy.rect)~
     - Inside source: true
     *** True Line Result
    -  # Sets default values for the car sprite
    -** Processing line: ~  # Initialization ||= only happens in the first frame~
    +        if !bullet.exploded && bullet.rect.intersect_rect?(enemy.rect)
    +** Processing line: ~          bullet.exploded = true # bullet explodes~
     - Inside source: true
     *** True Line Result
    -  # Initialization ||= only happens in the first frame
    -** Processing line: ~  def default args~
    +          bullet.exploded = true # bullet explodes
    +** Processing line: ~          enemy.dead = true # enemy is killed~
     - Inside source: true
     *** True Line Result
    -  def default args
    -** Processing line: ~    args.state.sprite.width    = 19~
    +          enemy.dead = true # enemy is killed
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -    args.state.sprite.width    = 19
    -** Processing line: ~    args.state.sprite.height   = 10~
    +        end
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    args.state.sprite.height   = 10
    -** Processing line: ~    args.state.sprite.scale    = 4~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    args.state.sprite.scale    = 4
    -** Processing line: ~    args.state.max_speed       = 5~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    args.state.max_speed       = 5
    -** Processing line: ~    args.state.x             ||= 100~
    +
    +** Processing line: ~    # All exploded bullets are rejected or removed from the bullets collection~
     - Inside source: true
     *** True Line Result
    -    args.state.x             ||= 100
    -** Processing line: ~    args.state.y             ||= 100~
    +    # All exploded bullets are rejected or removed from the bullets collection
    +** Processing line: ~    # and any dead enemy is rejected from the enemies collection.~
     - Inside source: true
     *** True Line Result
    -    args.state.y             ||= 100
    -** Processing line: ~    args.state.speed         ||= 1~
    +    # and any dead enemy is rejected from the enemies collection.
    +** Processing line: ~    args.state.bullets = args.state.bullets.reject(&:exploded)~
     - Inside source: true
     *** True Line Result
    -    args.state.speed         ||= 1
    -** Processing line: ~    args.state.angle         ||= 0~
    +    args.state.bullets = args.state.bullets.reject(&:exploded)
    +** Processing line: ~    args.state.enemies = args.state.enemies.reject(&:dead)~
     - Inside source: true
     *** True Line Result
    -    args.state.angle         ||= 0
    +    args.state.enemies = args.state.enemies.reject(&:dead)
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -21616,142 +21987,146 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # Outputs sprite onto screen~
    +** Processing line: ~  # Bullets are rejected from bullets collection once their position exceeds the width of screen~
     - Inside source: true
     *** True Line Result
    -  # Outputs sprite onto screen
    -** Processing line: ~  def render grid, outputs, state~
    +  # Bullets are rejected from bullets collection once their position exceeds the width of screen
    +** Processing line: ~  def remove_bullets_of_screen args~
     - Inside source: true
     *** True Line Result
    -  def render grid, outputs, state
    -** Processing line: ~    outputs.solids  <<  [grid.rect, 70, 70, 70] # outputs gray background~
    +  def remove_bullets_of_screen args
    +** Processing line: ~    args.state.bullets = args.state.bullets.reject { |bullet| bullet.x > 1280 } # screen width is 1280~
     - Inside source: true
     *** True Line Result
    -    outputs.solids  <<  [grid.rect, 70, 70, 70] # outputs gray background
    -** Processing line: ~    outputs.sprites <<  [destination_rect(state), # sets first four parameters of car sprite~
    +    args.state.bullets = args.state.bullets.reject { |bullet| bullet.x > 1280 } # screen width is 1280
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    outputs.sprites <<  [destination_rect(state), # sets first four parameters of car sprite
    -** Processing line: ~    'sprites/86.png', # image path of car~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    'sprites/86.png', # image path of car
    -** Processing line: ~    state.angle,~
    +
    +** Processing line: ~  # Calls fire_bullet method~
     - Inside source: true
     *** True Line Result
    -    state.angle,
    -** Processing line: ~    opacity, # transparency~
    +  # Calls fire_bullet method
    +** Processing line: ~  def process_inputs args~
     - Inside source: true
     *** True Line Result
    -    opacity, # transparency
    -** Processing line: ~    saturation,~
    +  def process_inputs args
    +** Processing line: ~    fire_bullet args~
     - Inside source: true
     *** True Line Result
    -    saturation,
    -** Processing line: ~    source_rect(state), # sprite sub division/tile (tile x, y, w, h)~
    +    fire_bullet args
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    source_rect(state), # sprite sub division/tile (tile x, y, w, h)
    -** Processing line: ~    false, false,  # don't flip sprites~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    false, false,  # don't flip sprites
    -** Processing line: ~    rotation_anchor]~
    +
    +** Processing line: ~  # Once mouse is clicked by the user to fire a bullet, a new bullet is added to bullets collection~
     - Inside source: true
     *** True Line Result
    -    rotation_anchor]
    -** Processing line: ~~
    +  # Once mouse is clicked by the user to fire a bullet, a new bullet is added to bullets collection
    +** Processing line: ~  def fire_bullet args~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # also look at the create_sprite helper method~
    +  def fire_bullet args
    +** Processing line: ~    return unless args.inputs.mouse.click # return unless mouse is clicked~
     - Inside source: true
     *** True Line Result
    -    # also look at the create_sprite helper method
    -** Processing line: ~    #~
    +    return unless args.inputs.mouse.click # return unless mouse is clicked
    +** Processing line: ~    args.state.bullets << args.state.new_entity(:bullet) do |bullet| # new bullet is declared a new entity~
     - Inside source: true
     *** True Line Result
    -    #
    -** Processing line: ~    # For example:~
    +    args.state.bullets << args.state.new_entity(:bullet) do |bullet| # new bullet is declared a new entity
    +** Processing line: ~      bullet.y = args.inputs.mouse.click.point.y # set to the y value of where the mouse was clicked~
     - Inside source: true
     *** True Line Result
    -    # For example:
    -** Processing line: ~    #~
    +      bullet.y = args.inputs.mouse.click.point.y # set to the y value of where the mouse was clicked
    +** Processing line: ~      bullet.x = 0 # starts on the left side of the screen~
     - Inside source: true
     *** True Line Result
    -    #
    -** Processing line: ~    # dest   = destination_rect(state)~
    +      bullet.x = 0 # starts on the left side of the screen
    +** Processing line: ~      bullet.size = 10~
     - Inside source: true
     *** True Line Result
    -    # dest   = destination_rect(state)
    -** Processing line: ~    # source = source_rect(state),~
    +      bullet.size = 10
    +** Processing line: ~      bullet.speed = 10 * rand + 2 # speed of a bullet is randomized~
     - Inside source: true
     *** True Line Result
    -    # source = source_rect(state),
    -** Processing line: ~    # outputs.sprites << create_sprite(~
    +      bullet.speed = 10 * rand + 2 # speed of a bullet is randomized
    +** Processing line: ~      bullet.rect = [bullet.x, bullet.y, bullet.size, bullet.size] # definition is set~
     - Inside source: true
     *** True Line Result
    -    # outputs.sprites << create_sprite(
    -** Processing line: ~    #   'sprites/86.png',~
    +      bullet.rect = [bullet.x, bullet.y, bullet.size, bullet.size] # definition is set
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    #   'sprites/86.png',
    -** Processing line: ~    #   x: dest.x,~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    #   x: dest.x,
    -** Processing line: ~    #   y: dest.y,~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    #   y: dest.y,
    -** Processing line: ~    #   w: dest.w,~
    +
    +** Processing line: ~  def tick_instructions args, text, y = 715~
     - Inside source: true
     *** True Line Result
    -    #   w: dest.w,
    -** Processing line: ~    #   h: dest.h,~
    +  def tick_instructions args, text, y = 715
    +** Processing line: ~    return if args.state.key_event_occurred~
     - Inside source: true
     *** True Line Result
    -    #   h: dest.h,
    -** Processing line: ~    #   angle: state.angle,~
    +    return if args.state.key_event_occurred
    +** Processing line: ~    if args.inputs.mouse.click ||~
     - Inside source: true
     *** True Line Result
    -    #   angle: state.angle,
    -** Processing line: ~    #   source_x: source.x,~
    +    if args.inputs.mouse.click ||
    +** Processing line: ~       args.inputs.keyboard.directional_vector ||~
     - Inside source: true
     *** True Line Result
    -    #   source_x: source.x,
    -** Processing line: ~    #   source_y: source.y,~
    +       args.inputs.keyboard.directional_vector ||
    +** Processing line: ~       args.inputs.keyboard.key_down.enter ||~
     - Inside source: true
     *** True Line Result
    -    #   source_y: source.y,
    -** Processing line: ~    #   source_w: source.w,~
    +       args.inputs.keyboard.key_down.enter ||
    +** Processing line: ~       args.inputs.keyboard.key_down.space ||~
     - Inside source: true
     *** True Line Result
    -    #   source_w: source.w,
    -** Processing line: ~    #   source_h: source.h,~
    +       args.inputs.keyboard.key_down.space ||
    +** Processing line: ~       args.inputs.keyboard.key_down.escape~
     - Inside source: true
     *** True Line Result
    -    #   source_h: source.h,
    -** Processing line: ~    #   flip_h: false,~
    +       args.inputs.keyboard.key_down.escape
    +** Processing line: ~      args.state.key_event_occurred = true~
     - Inside source: true
     *** True Line Result
    -    #   flip_h: false,
    -** Processing line: ~    #   flip_v: false,~
    +      args.state.key_event_occurred = true
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    #   flip_v: false,
    -** Processing line: ~    #   rotation_anchor_x: 0.7,~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    #   rotation_anchor_x: 0.7,
    -** Processing line: ~    #   rotation_anchor_y: 0.5~
    +
    +** Processing line: ~    args.outputs.debug << [0, y - 50, 1280, 60].solid~
     - Inside source: true
     *** True Line Result
    -    #   rotation_anchor_y: 0.5
    -** Processing line: ~    # )~
    +    args.outputs.debug << [0, y - 50, 1280, 60].solid
    +** Processing line: ~    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label~
     - Inside source: true
     *** True Line Result
    -    # )
    +    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label
    +** Processing line: ~    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label~
    +- Inside source: true
    +*** True Line Result
    +    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -21760,718 +22135,766 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # Creates sprite by setting values inside of a hash~
    -- Inside source: true
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
     *** True Line Result
    -  # Creates sprite by setting values inside of a hash
    -** Processing line: ~  def create_sprite path, options = {}~
    -- Inside source: true
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
     *** True Line Result
    -  def create_sprite path, options = {}
    -** Processing line: ~    options = {~
    -- Inside source: true
    +
    +** Processing line: ~*** Physics And Collisions - Box Collision - main.rb~
    +- Header detected.
     *** True Line Result
    -    options = {
    -** Processing line: ~~
    -- Inside source: true
    +
    +*** True Line Result
    +*** Physics And Collisions - Box Collision - main.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
     *** True Line Result
     
    -** Processing line: ~      # dest x, y, w, h~
    -- Inside source: true
     *** True Line Result
    -      # dest x, y, w, h
    -** Processing line: ~      x: 0,~
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/04_physics_and_collisions/04_box_collision/app/main.rb~
     - Inside source: true
     *** True Line Result
    -      x: 0,
    -** Processing line: ~      y: 0,~
    +  # ./samples/04_physics_and_collisions/04_box_collision/app/main.rb
    +** Processing line: ~  =begin~
     - Inside source: true
     *** True Line Result
    -      y: 0,
    -** Processing line: ~      w: 100,~
    +  =begin
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      w: 100,
    -** Processing line: ~      h: 100,~
    +
    +** Processing line: ~   APIs listing that haven't been encountered in previous sample apps:~
     - Inside source: true
     *** True Line Result
    -      h: 100,
    +   APIs listing that haven't been encountered in previous sample apps:
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      # angle, rotation~
    +** Processing line: ~   - first: Returns the first element of the array.~
     - Inside source: true
     *** True Line Result
    -      # angle, rotation
    -** Processing line: ~      angle: 0,~
    +   - first: Returns the first element of the array.
    +** Processing line: ~     For example, if we have an array~
     - Inside source: true
     *** True Line Result
    -      angle: 0,
    -** Processing line: ~      rotation_anchor_x: 0.5,~
    +     For example, if we have an array
    +** Processing line: ~     numbers = [1, 2, 3, 4, 5]~
     - Inside source: true
     *** True Line Result
    -      rotation_anchor_x: 0.5,
    -** Processing line: ~      rotation_anchor_y: 0.5,~
    +     numbers = [1, 2, 3, 4, 5]
    +** Processing line: ~     and we call first by saying~
     - Inside source: true
     *** True Line Result
    -      rotation_anchor_y: 0.5,
    +     and we call first by saying
    +** Processing line: ~     numbers.first~
    +- Inside source: true
    +*** True Line Result
    +     numbers.first
    +** Processing line: ~     the number 1 will be returned because it is the first element of the numbers array.~
    +- Inside source: true
    +*** True Line Result
    +     the number 1 will be returned because it is the first element of the numbers array.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      # color saturation (red, green, blue), transparency~
    +** Processing line: ~   - num1.idiv(num2): Divides two numbers and returns an integer.~
     - Inside source: true
     *** True Line Result
    -      # color saturation (red, green, blue), transparency
    -** Processing line: ~      r: 255,~
    +   - num1.idiv(num2): Divides two numbers and returns an integer.
    +** Processing line: ~     For example,~
     - Inside source: true
     *** True Line Result
    -      r: 255,
    -** Processing line: ~      g: 255,~
    +     For example,
    +** Processing line: ~     16.idiv(3) = 5, because 16 / 3 is 5.33333 returned as an integer.~
     - Inside source: true
     *** True Line Result
    -      g: 255,
    -** Processing line: ~      b: 255,~
    +     16.idiv(3) = 5, because 16 / 3 is 5.33333 returned as an integer.
    +** Processing line: ~     16.idiv(4) = 4, because 16 / 4 is 4 and already has no decimal.~
     - Inside source: true
     *** True Line Result
    -      b: 255,
    -** Processing line: ~      a: 255,~
    +     16.idiv(4) = 4, because 16 / 4 is 4 and already has no decimal.
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      a: 255,
    +
    +** Processing line: ~   Reminders:~
    +- Inside source: true
    +*** True Line Result
    +   Reminders:
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      # source x, y, width, height~
    +** Processing line: ~   - find_all: Finds all values that satisfy specific requirements.~
     - Inside source: true
     *** True Line Result
    -      # source x, y, width, height
    -** Processing line: ~      source_x: 0,~
    +   - find_all: Finds all values that satisfy specific requirements.
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      source_x: 0,
    -** Processing line: ~      source_y: 0,~
    +
    +** Processing line: ~   - ARRAY#intersect_rect?: An array with at least four values is~
     - Inside source: true
     *** True Line Result
    -      source_y: 0,
    -** Processing line: ~      source_w: -1,~
    +   - ARRAY#intersect_rect?: An array with at least four values is
    +** Processing line: ~     considered a rect. The intersect_rect? function returns true~
     - Inside source: true
     *** True Line Result
    -      source_w: -1,
    -** Processing line: ~      source_h: -1,~
    +     considered a rect. The intersect_rect? function returns true
    +** Processing line: ~     or false depending on if the two rectangles intersect.~
     - Inside source: true
     *** True Line Result
    -      source_h: -1,
    +     or false depending on if the two rectangles intersect.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      # flip horiztonally, flip vertically~
    +** Processing line: ~   - reject: Removes elements from a collection if they meet certain requirements.~
     - Inside source: true
     *** True Line Result
    -      # flip horiztonally, flip vertically
    -** Processing line: ~      flip_h: false,~
    +   - reject: Removes elements from a collection if they meet certain requirements.
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      flip_h: false,
    -** Processing line: ~      flip_v: false,~
    +
    +** Processing line: ~  =end~
     - Inside source: true
     *** True Line Result
    -      flip_v: false,
    +  =end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    }.merge options~
    +** Processing line: ~  # This sample app allows users to create tiles and place them anywhere on the screen as obstacles.~
     - Inside source: true
     *** True Line Result
    -    }.merge options
    +  # This sample app allows users to create tiles and place them anywhere on the screen as obstacles.
    +** Processing line: ~  # The player can then move and maneuver around them.~
    +- Inside source: true
    +*** True Line Result
    +  # The player can then move and maneuver around them.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    [~
    +** Processing line: ~  class PoorManPlatformerPhysics~
     - Inside source: true
     *** True Line Result
    -    [
    -** Processing line: ~      options[:x], options[:y], options[:w], options[:h], # dest rect keys~
    +  class PoorManPlatformerPhysics
    +** Processing line: ~    attr_accessor :grid, :inputs, :state, :outputs~
     - Inside source: true
     *** True Line Result
    -      options[:x], options[:y], options[:w], options[:h], # dest rect keys
    -** Processing line: ~      path,~
    +    attr_accessor :grid, :inputs, :state, :outputs
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      path,
    -** Processing line: ~      options[:angle], options[:a], options[:r], options[:g], options[:b], # angle, color, alpha~
    +
    +** Processing line: ~    # Calls all methods necessary for the app to run successfully.~
     - Inside source: true
     *** True Line Result
    -      options[:angle], options[:a], options[:r], options[:g], options[:b], # angle, color, alpha
    -** Processing line: ~      options[:source_x], options[:source_y], options[:source_w], options[:source_h], # source rect keys~
    +    # Calls all methods necessary for the app to run successfully.
    +** Processing line: ~    def tick~
     - Inside source: true
     *** True Line Result
    -      options[:source_x], options[:source_y], options[:source_w], options[:source_h], # source rect keys
    -** Processing line: ~      options[:flip_h], options[:flip_v], # flip~
    +    def tick
    +** Processing line: ~      defaults~
     - Inside source: true
     *** True Line Result
    -      options[:flip_h], options[:flip_v], # flip
    -** Processing line: ~      options[:rotation_anchor_x], options[:rotation_anchor_y], # rotation anchor~
    +      defaults
    +** Processing line: ~      render~
     - Inside source: true
     *** True Line Result
    -      options[:rotation_anchor_x], options[:rotation_anchor_y], # rotation anchor
    -** Processing line: ~    ] # hash keys contain corresponding values~
    +      render
    +** Processing line: ~      calc~
     - Inside source: true
     *** True Line Result
    -    ] # hash keys contain corresponding values
    -** Processing line: ~  end~
    +      calc
    +** Processing line: ~      process_inputs~
     - Inside source: true
     *** True Line Result
    -  end
    +      process_inputs
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # Calls the calc_pos and calc_wrap methods.~
    +** Processing line: ~    # Sets default values for variables.~
     - Inside source: true
     *** True Line Result
    -  # Calls the calc_pos and calc_wrap methods.
    -** Processing line: ~  def calc state~
    +    # Sets default values for variables.
    +** Processing line: ~    # The ||= sign means that the variable will only be set to the value following the = sign if the value has~
     - Inside source: true
     *** True Line Result
    -  def calc state
    -** Processing line: ~    calc_pos state~
    +    # The ||= sign means that the variable will only be set to the value following the = sign if the value has
    +** Processing line: ~    # not already been set before. Intialization happens only in the first frame.~
     - Inside source: true
     *** True Line Result
    -    calc_pos state
    -** Processing line: ~    calc_wrap state~
    +    # not already been set before. Intialization happens only in the first frame.
    +** Processing line: ~    def defaults~
     - Inside source: true
     *** True Line Result
    -    calc_wrap state
    -** Processing line: ~  end~
    +    def defaults
    +** Processing line: ~      state.tile_size               = 64~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +      state.tile_size               = 64
    +** Processing line: ~      state.gravity                 = -0.2~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  # Changes sprite's position on screen~
    +      state.gravity                 = -0.2
    +** Processing line: ~      state.previous_tile_size    ||= state.tile_size~
     - Inside source: true
     *** True Line Result
    -  # Changes sprite's position on screen
    -** Processing line: ~  # Vectors have magnitude and direction, so the incremented x and y values give the car direction~
    +      state.previous_tile_size    ||= state.tile_size
    +** Processing line: ~      state.x                     ||= 0~
     - Inside source: true
     *** True Line Result
    -  # Vectors have magnitude and direction, so the incremented x and y values give the car direction
    -** Processing line: ~  def calc_pos state~
    +      state.x                     ||= 0
    +** Processing line: ~      state.y                     ||= 800~
     - Inside source: true
     *** True Line Result
    -  def calc_pos state
    -** Processing line: ~    state.x     += state.angle.vector_x * state.speed # increments x by product of angle's x vector and speed~
    +      state.y                     ||= 800
    +** Processing line: ~      state.dy                    ||= 0~
     - Inside source: true
     *** True Line Result
    -    state.x     += state.angle.vector_x * state.speed # increments x by product of angle's x vector and speed
    -** Processing line: ~    state.y     += state.angle.vector_y * state.speed # increments y by product of angle's y vector and speed~
    +      state.dy                    ||= 0
    +** Processing line: ~      state.dx                    ||= 0~
     - Inside source: true
     *** True Line Result
    -    state.y     += state.angle.vector_y * state.speed # increments y by product of angle's y vector and speed
    -** Processing line: ~    state.speed *= 1.1 # scales speed up~
    +      state.dx                    ||= 0
    +** Processing line: ~      state.world                 ||= []~
     - Inside source: true
     *** True Line Result
    -    state.speed *= 1.1 # scales speed up
    -** Processing line: ~    state.speed  = state.speed.lesser(state.max_speed) # speed is either current speed or max speed, whichever has a lesser value (ensures that the car doesn't go too fast or exceed the max speed)~
    +      state.world                 ||= []
    +** Processing line: ~      state.world_lookup          ||= {}~
     - Inside source: true
     *** True Line Result
    -    state.speed  = state.speed.lesser(state.max_speed) # speed is either current speed or max speed, whichever has a lesser value (ensures that the car doesn't go too fast or exceed the max speed)
    -** Processing line: ~  end~
    +      state.world_lookup          ||= {}
    +** Processing line: ~      state.world_collision_rects ||= []~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +      state.world_collision_rects ||= []
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  # The screen's dimensions are 1280x720. If the car goes out of scope,~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  # The screen's dimensions are 1280x720. If the car goes out of scope,
    -** Processing line: ~  # it loops back around on the screen.~
    +
    +** Processing line: ~    # Outputs solids and borders of different colors for the world and collision_rects collections.~
     - Inside source: true
     *** True Line Result
    -  # it loops back around on the screen.
    -** Processing line: ~  def calc_wrap state~
    +    # Outputs solids and borders of different colors for the world and collision_rects collections.
    +** Processing line: ~    def render~
     - Inside source: true
     *** True Line Result
    -  def calc_wrap state
    +    def render
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # car returns to left side of screen if it disappears on right side of screen~
    +** Processing line: ~      # Sets a black background on the screen (Comment this line out and the background will become white.)~
     - Inside source: true
     *** True Line Result
    -    # car returns to left side of screen if it disappears on right side of screen
    -** Processing line: ~    # sprite.width refers to tile's size, which is multipled by scale (4) to make it bigger~
    +      # Sets a black background on the screen (Comment this line out and the background will become white.)
    +** Processing line: ~      # Also note that black is the default color for when no color is assigned.~
     - Inside source: true
     *** True Line Result
    -    # sprite.width refers to tile's size, which is multipled by scale (4) to make it bigger
    -** Processing line: ~    state.x = -state.sprite.width * state.sprite.scale if state.x - 20 > 1280~
    +      # Also note that black is the default color for when no color is assigned.
    +** Processing line: ~      outputs.solids << grid.rect~
     - Inside source: true
     *** True Line Result
    -    state.x = -state.sprite.width * state.sprite.scale if state.x - 20 > 1280
    +      outputs.solids << grid.rect
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # car wraps around to right side of screen if it disappears on the left side~
    +** Processing line: ~      # The position, size, and color (white) are set for borders given to the world collection.~
     - Inside source: true
     *** True Line Result
    -    # car wraps around to right side of screen if it disappears on the left side
    -** Processing line: ~    state.x = 1280 if state.x + state.sprite.width * state.sprite.scale + 20 < 0~
    +      # The position, size, and color (white) are set for borders given to the world collection.
    +** Processing line: ~      # Try changing the color by assigning different numbers (between 0 and 255) to the last three parameters.~
     - Inside source: true
     *** True Line Result
    -    state.x = 1280 if state.x + state.sprite.width * state.sprite.scale + 20 < 0
    -** Processing line: ~~
    +      # Try changing the color by assigning different numbers (between 0 and 255) to the last three parameters.
    +** Processing line: ~      outputs.borders << state.world.map do |x, y|~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # car wraps around to bottom of screen if it disappears at the top of the screen~
    +      outputs.borders << state.world.map do |x, y|
    +** Processing line: ~        [x * state.tile_size,~
     - Inside source: true
     *** True Line Result
    -    # car wraps around to bottom of screen if it disappears at the top of the screen
    -** Processing line: ~    # if you subtract 520 pixels instead of 20 pixels, the car takes longer to reappear (try it!)~
    +        [x * state.tile_size,
    +** Processing line: ~         y * state.tile_size,~
     - Inside source: true
     *** True Line Result
    -    # if you subtract 520 pixels instead of 20 pixels, the car takes longer to reappear (try it!)
    -** Processing line: ~    state.y = 0    if state.y - 20 > 720 # if 20 pixels less than car's y position is greater than vertical scope~
    +         y * state.tile_size,
    +** Processing line: ~         state.tile_size,~
     - Inside source: true
     *** True Line Result
    -    state.y = 0    if state.y - 20 > 720 # if 20 pixels less than car's y position is greater than vertical scope
    -** Processing line: ~~
    +         state.tile_size,
    +** Processing line: ~         state.tile_size, 255, 255, 255]~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # car wraps around to top of screen if it disappears at the bottom of the screen~
    +         state.tile_size, 255, 255, 255]
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    # car wraps around to top of screen if it disappears at the bottom of the screen
    -** Processing line: ~    state.y = 720  if state.y + state.sprite.height * state.sprite.scale + 20 < 0~
    +      end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    state.y = 720  if state.y + state.sprite.height * state.sprite.scale + 20 < 0
    -** Processing line: ~  end~
    +
    +** Processing line: ~      # The top, bottom, and sides of the borders for collision_rects are different colors.~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +      # The top, bottom, and sides of the borders for collision_rects are different colors.
    +** Processing line: ~      outputs.borders << state.world_collision_rects.map do |e|~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  # Changes angle of sprite based on user input from keyboard or controller~
    +      outputs.borders << state.world_collision_rects.map do |e|
    +** Processing line: ~        [~
     - Inside source: true
     *** True Line Result
    -  # Changes angle of sprite based on user input from keyboard or controller
    -** Processing line: ~  def process_inputs args~
    +        [
    +** Processing line: ~          [e[:top],                             0, 170,   0], # top is a shade of green~
     - Inside source: true
     *** True Line Result
    -  def process_inputs args
    -** Processing line: ~~
    +          [e[:top],                             0, 170,   0], # top is a shade of green
    +** Processing line: ~          [e[:bottom],                          0, 100, 170], # bottom is a shade of greenish-blue~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # NOTE: increasing the angle doesn't mean that the car will continue to go~
    +          [e[:bottom],                          0, 100, 170], # bottom is a shade of greenish-blue
    +** Processing line: ~          [e[:left_right],                    170,   0,   0], # left and right are a shade of red~
     - Inside source: true
     *** True Line Result
    -    # NOTE: increasing the angle doesn't mean that the car will continue to go
    -** Processing line: ~    # in a specific direction. The angle is increasing, which means that if the~
    +          [e[:left_right],                    170,   0,   0], # left and right are a shade of red
    +** Processing line: ~        ]~
     - Inside source: true
     *** True Line Result
    -    # in a specific direction. The angle is increasing, which means that if the
    -** Processing line: ~    # left key was kept in the "down" state, the change in the angle would cause~
    +        ]
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    # left key was kept in the "down" state, the change in the angle would cause
    -** Processing line: ~    # the car to go in a counter-clockwise direction and form a circle (360 degrees)~
    +      end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    # the car to go in a counter-clockwise direction and form a circle (360 degrees)
    -** Processing line: ~    if args.inputs.keyboard.key_held.left # if left key is pressed~
    +
    +** Processing line: ~      # Sets the position, size, and color (a shade of green) of the borders of only the player's~
     - Inside source: true
     *** True Line Result
    -    if args.inputs.keyboard.key_held.left # if left key is pressed
    -** Processing line: ~      args.state.angle += 2 # car's angle is incremented by 2~
    +      # Sets the position, size, and color (a shade of green) of the borders of only the player's
    +** Processing line: ~      # box and outputs it. If you change the 180 to 0, the player's box will be black and you~
     - Inside source: true
     *** True Line Result
    -      args.state.angle += 2 # car's angle is incremented by 2
    -** Processing line: ~~
    +      # box and outputs it. If you change the 180 to 0, the player's box will be black and you
    +** Processing line: ~      # won't be able to see it (because it will match the black background).~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # The same applies to decreasing the angle. If the right key was kept in the~
    +      # won't be able to see it (because it will match the black background).
    +** Processing line: ~      outputs.borders << [state.x,~
     - Inside source: true
     *** True Line Result
    -    # The same applies to decreasing the angle. If the right key was kept in the
    -** Processing line: ~    # "down" state, the decreasing angle would cause the car to go in a clockwise~
    +      outputs.borders << [state.x,
    +** Processing line: ~                          state.y,~
     - Inside source: true
     *** True Line Result
    -    # "down" state, the decreasing angle would cause the car to go in a clockwise
    -** Processing line: ~    # direction and form a circle (360 degrees)~
    +                          state.y,
    +** Processing line: ~                          state.tile_size,~
     - Inside source: true
     *** True Line Result
    -    # direction and form a circle (360 degrees)
    -** Processing line: ~    elsif args.inputs.keyboard.key_held.right # if right key is pressed~
    +                          state.tile_size,
    +** Processing line: ~                          state.tile_size,  0, 180, 0]~
     - Inside source: true
     *** True Line Result
    -    elsif args.inputs.keyboard.key_held.right # if right key is pressed
    -** Processing line: ~      args.state.angle -= 2 # car's angle is decremented by 2~
    +                          state.tile_size,  0, 180, 0]
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      args.state.angle -= 2 # car's angle is decremented by 2
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Input from a controller can also change the angle of the car~
    +** Processing line: ~    # Calls methods needed to perform calculations.~
     - Inside source: true
     *** True Line Result
    -    # Input from a controller can also change the angle of the car
    -** Processing line: ~    elsif args.inputs.controller_one.left_analog_x_perc != 0~
    +    # Calls methods needed to perform calculations.
    +** Processing line: ~    def calc~
     - Inside source: true
     *** True Line Result
    -    elsif args.inputs.controller_one.left_analog_x_perc != 0
    -** Processing line: ~      args.state.angle += 2 * args.inputs.controller_one.left_analog_x_perc * -1~
    +    def calc
    +** Processing line: ~      calc_world_lookup~
     - Inside source: true
     *** True Line Result
    -      args.state.angle += 2 * args.inputs.controller_one.left_analog_x_perc * -1
    +      calc_world_lookup
    +** Processing line: ~      calc_player~
    +- Inside source: true
    +*** True Line Result
    +      calc_player
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
         end
    -** Processing line: ~  end~
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  end
    +
    +** Processing line: ~    # Performs calculations on world_lookup and sets values.~
    +- Inside source: true
    +*** True Line Result
    +    # Performs calculations on world_lookup and sets values.
    +** Processing line: ~    def calc_world_lookup~
    +- Inside source: true
    +*** True Line Result
    +    def calc_world_lookup
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # A sprite's center of rotation can be altered~
    +** Processing line: ~      # If the tile size isn't equal to the previous tile size,~
     - Inside source: true
     *** True Line Result
    -  # A sprite's center of rotation can be altered
    -** Processing line: ~  # Increasing either of these numbers would dramatically increase the~
    +      # If the tile size isn't equal to the previous tile size,
    +** Processing line: ~      # the previous tile size is set to the tile size,~
     - Inside source: true
     *** True Line Result
    -  # Increasing either of these numbers would dramatically increase the
    -** Processing line: ~  # car's drift when it turns!~
    +      # the previous tile size is set to the tile size,
    +** Processing line: ~      # and world_lookup hash is set to empty.~
     - Inside source: true
     *** True Line Result
    -  # car's drift when it turns!
    -** Processing line: ~  def rotation_anchor~
    +      # and world_lookup hash is set to empty.
    +** Processing line: ~      if state.tile_size != state.previous_tile_size~
     - Inside source: true
     *** True Line Result
    -  def rotation_anchor
    -** Processing line: ~    [0.7, 0.5]~
    +      if state.tile_size != state.previous_tile_size
    +** Processing line: ~        state.previous_tile_size = state.tile_size~
     - Inside source: true
     *** True Line Result
    -    [0.7, 0.5]
    -** Processing line: ~  end~
    +        state.previous_tile_size = state.tile_size
    +** Processing line: ~        state.world_lookup = {} # empty hash~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +        state.world_lookup = {} # empty hash
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  # Sets opacity value of sprite to 255 so that it is not transparent at all~
    +      end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  # Sets opacity value of sprite to 255 so that it is not transparent at all
    -** Processing line: ~  # Change it to 0 and you won't be able to see the car sprite on the screen~
    +
    +** Processing line: ~      # return if the world_lookup hash has keys (or, in other words, is not empty)~
     - Inside source: true
     *** True Line Result
    -  # Change it to 0 and you won't be able to see the car sprite on the screen
    -** Processing line: ~  def opacity~
    +      # return if the world_lookup hash has keys (or, in other words, is not empty)
    +** Processing line: ~      # return unless the world collection has values inside of it (or is not empty)~
     - Inside source: true
     *** True Line Result
    -  def opacity
    -** Processing line: ~    255~
    +      # return unless the world collection has values inside of it (or is not empty)
    +** Processing line: ~      return if state.world_lookup.keys.length > 0~
     - Inside source: true
     *** True Line Result
    -    255
    -** Processing line: ~  end~
    +      return if state.world_lookup.keys.length > 0
    +** Processing line: ~      return unless state.world.length > 0~
     - Inside source: true
     *** True Line Result
    -  end
    +      return unless state.world.length > 0
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # Sets the color of the sprite to white.~
    +** Processing line: ~      # Starts with an empty hash for world_lookup.~
     - Inside source: true
     *** True Line Result
    -  # Sets the color of the sprite to white.
    -** Processing line: ~  def saturation~
    +      # Starts with an empty hash for world_lookup.
    +** Processing line: ~      # Searches through the world and finds the coordinates that exist.~
     - Inside source: true
     *** True Line Result
    -  def saturation
    -** Processing line: ~    [255, 255, 255]~
    +      # Searches through the world and finds the coordinates that exist.
    +** Processing line: ~      state.world_lookup = {}~
     - Inside source: true
     *** True Line Result
    -    [255, 255, 255]
    -** Processing line: ~  end~
    +      state.world_lookup = {}
    +** Processing line: ~      state.world.each { |x, y| state.world_lookup[[x, y]] = true }~
     - Inside source: true
     *** True Line Result
    -  end
    +      state.world.each { |x, y| state.world_lookup[[x, y]] = true }
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # Sets definition of destination_rect (used to define the car sprite)~
    +** Processing line: ~      # Assigns world_collision_rects for every sprite drawn.~
     - Inside source: true
     *** True Line Result
    -  # Sets definition of destination_rect (used to define the car sprite)
    -** Processing line: ~  def destination_rect state~
    +      # Assigns world_collision_rects for every sprite drawn.
    +** Processing line: ~      state.world_collision_rects =~
     - Inside source: true
     *** True Line Result
    -  def destination_rect state
    -** Processing line: ~    [state.x, state.y,~
    +      state.world_collision_rects =
    +** Processing line: ~        state.world_lookup~
     - Inside source: true
     *** True Line Result
    -    [state.x, state.y,
    -** Processing line: ~    state.sprite.width  * state.sprite.scale, # multiplies by 4 to set size~
    +        state.world_lookup
    +** Processing line: ~            .keys~
     - Inside source: true
     *** True Line Result
    -    state.sprite.width  * state.sprite.scale, # multiplies by 4 to set size
    -** Processing line: ~    state.sprite.height * state.sprite.scale]~
    +            .keys
    +** Processing line: ~            .map do |coord_x, coord_y|~
     - Inside source: true
     *** True Line Result
    -    state.sprite.height * state.sprite.scale]
    -** Processing line: ~  end~
    +            .map do |coord_x, coord_y|
    +** Processing line: ~              s = state.tile_size~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +              s = state.tile_size
    +** Processing line: ~              # multiply by tile size so the grid coordinates; sets pixel value~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  # Portion of a sprite (a tile)~
    +              # multiply by tile size so the grid coordinates; sets pixel value
    +** Processing line: ~              # don't forget that position is denoted by bottom left corner~
     - Inside source: true
     *** True Line Result
    -  # Portion of a sprite (a tile)
    -** Processing line: ~  # Sub division of sprite is denoted as a rectangle directly related to original size of .png~
    +              # don't forget that position is denoted by bottom left corner
    +** Processing line: ~              # set x = coord_x or y = coord_y and see what happens!~
     - Inside source: true
     *** True Line Result
    -  # Sub division of sprite is denoted as a rectangle directly related to original size of .png
    -** Processing line: ~  # Tile is located at bottom left corner within a 19x10 pixel rectangle (based on sprite.width, sprite.height)~
    +              # set x = coord_x or y = coord_y and see what happens!
    +** Processing line: ~              x = s * coord_x~
     - Inside source: true
     *** True Line Result
    -  # Tile is located at bottom left corner within a 19x10 pixel rectangle (based on sprite.width, sprite.height)
    -** Processing line: ~  def source_rect state~
    +              x = s * coord_x
    +** Processing line: ~              y = s * coord_y~
     - Inside source: true
     *** True Line Result
    -  def source_rect state
    -** Processing line: ~    [0, 0, state.sprite.width, state.sprite.height]~
    +              y = s * coord_y
    +** Processing line: ~              {~
     - Inside source: true
     *** True Line Result
    -    [0, 0, state.sprite.width, state.sprite.height]
    -** Processing line: ~  end~
    +              {
    +** Processing line: ~                # The values added to x, y, and s position the world_collision_rects so they all appear~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +                # The values added to x, y, and s position the world_collision_rects so they all appear
    +** Processing line: ~                # stacked (on top of world rects) but don't directly overlap.~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~#+end_src~
    -- Line was identified as the end of a code block.
    +                # stacked (on top of world rects) but don't directly overlap.
    +** Processing line: ~                # Remove these added values and mess around with the rect placement!~
    +- Inside source: true
     *** True Line Result
    -#+end_src
    -** Processing line: ~~
    -- End of paragraph detected.
    +                # Remove these added values and mess around with the rect placement!
    +** Processing line: ~                args:       [coord_x, coord_y],~
    +- Inside source: true
     *** True Line Result
    -
    -** Processing line: ~*** Physics And Collisions - Simple - main.rb~
    -- Header detected.
    +                args:       [coord_x, coord_y],
    +** Processing line: ~                left_right: [x,     y + 4, s,     s - 6], # hash keys and values~
    +- Inside source: true
     *** True Line Result
    -
    +                left_right: [x,     y + 4, s,     s - 6], # hash keys and values
    +** Processing line: ~                top:        [x + 4, y + 6, s - 8, s - 6],~
    +- Inside source: true
     *** True Line Result
    -*** Physics And Collisions - Simple - main.rb
    -** Processing line: ~#+begin_src ruby~
    -- Line was identified as the beginning of a code block.
    +                top:        [x + 4, y + 6, s - 8, s - 6],
    +** Processing line: ~                bottom:     [x + 1, y - 1, s - 2, s - 8],~
    +- Inside source: true
     *** True Line Result
    -
    +                bottom:     [x + 1, y - 1, s - 2, s - 8],
    +** Processing line: ~              }~
    +- Inside source: true
     *** True Line Result
    -#+begin_src ruby
    -** Processing line: ~  # ./samples/04_physics_and_collisions/01_simple/app/main.rb~
    +              }
    +** Processing line: ~            end~
     - Inside source: true
     *** True Line Result
    -  # ./samples/04_physics_and_collisions/01_simple/app/main.rb
    -** Processing line: ~  =begin~
    +            end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  =begin
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~   Reminders:~
    +** Processing line: ~    # Performs calculations to change the x and y values of the player's box.~
     - Inside source: true
     *** True Line Result
    -   Reminders:
    -** Processing line: ~   - ARRAY#intersect_rect?: Returns true or false depending on if the two rectangles intersect.~
    +    # Performs calculations to change the x and y values of the player's box.
    +** Processing line: ~    def calc_player~
     - Inside source: true
     *** True Line Result
    -   - ARRAY#intersect_rect?: Returns true or false depending on if the two rectangles intersect.
    +    def calc_player
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~   - args.outputs.solids: An array. The values generate a solid.~
    +** Processing line: ~      # Since acceleration is the change in velocity, the change in y (dy) increases every frame.~
     - Inside source: true
     *** True Line Result
    -   - args.outputs.solids: An array. The values generate a solid.
    -** Processing line: ~     The parameters are [X, Y, WIDTH, HEIGHT, RED, GREEN, BLUE]~
    +      # Since acceleration is the change in velocity, the change in y (dy) increases every frame.
    +** Processing line: ~      # What goes up must come down because of gravity.~
     - Inside source: true
     *** True Line Result
    -     The parameters are [X, Y, WIDTH, HEIGHT, RED, GREEN, BLUE]
    +      # What goes up must come down because of gravity.
    +** Processing line: ~      state.dy += state.gravity~
    +- Inside source: true
    +*** True Line Result
    +      state.dy += state.gravity
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  =end~
    +** Processing line: ~      # Calls the calc_box_collision and calc_edge_collision methods.~
     - Inside source: true
     *** True Line Result
    -  =end
    -** Processing line: ~~
    +      # Calls the calc_box_collision and calc_edge_collision methods.
    +** Processing line: ~      calc_box_collision~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  # This sample app shows collisions between two boxes.~
    +      calc_box_collision
    +** Processing line: ~      calc_edge_collision~
     - Inside source: true
     *** True Line Result
    -  # This sample app shows collisions between two boxes.
    +      calc_edge_collision
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # Runs methods needed for game to run properly.~
    +** Processing line: ~      # Since velocity is the change in position, the change in y increases by dy. Same with x and dx.~
     - Inside source: true
     *** True Line Result
    -  # Runs methods needed for game to run properly.
    -** Processing line: ~  def tick args~
    +      # Since velocity is the change in position, the change in y increases by dy. Same with x and dx.
    +** Processing line: ~      state.y += state.dy~
     - Inside source: true
     *** True Line Result
    -  def tick args
    -** Processing line: ~    tick_instructions args, "Sample app shows how to move a square over time and determine collision."~
    +      state.y += state.dy
    +** Processing line: ~      state.x += state.dx~
     - Inside source: true
     *** True Line Result
    -    tick_instructions args, "Sample app shows how to move a square over time and determine collision."
    -** Processing line: ~    defaults args~
    +      state.x += state.dx
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    defaults args
    -** Processing line: ~    render args~
    +
    +** Processing line: ~      # Scales dx down.~
     - Inside source: true
     *** True Line Result
    -    render args
    -** Processing line: ~    calc args~
    +      # Scales dx down.
    +** Processing line: ~      state.dx *= 0.8~
     - Inside source: true
     *** True Line Result
    -    calc args
    -** Processing line: ~  end~
    +      state.dx *= 0.8
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  end
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # Sets default values.~
    +** Processing line: ~    # Calls methods needed to determine collisions between player and world_collision rects.~
     - Inside source: true
     *** True Line Result
    -  # Sets default values.
    -** Processing line: ~  def defaults args~
    +    # Calls methods needed to determine collisions between player and world_collision rects.
    +** Processing line: ~    def calc_box_collision~
     - Inside source: true
     *** True Line Result
    -  def defaults args
    -** Processing line: ~    # These values represent the moving box.~
    +    def calc_box_collision
    +** Processing line: ~      return unless state.world_lookup.keys.length > 0 # return unless hash has atleast 1 key~
     - Inside source: true
     *** True Line Result
    -    # These values represent the moving box.
    -** Processing line: ~    args.state.moving_box_speed   = 10~
    +      return unless state.world_lookup.keys.length > 0 # return unless hash has atleast 1 key
    +** Processing line: ~      collision_floor!~
     - Inside source: true
     *** True Line Result
    -    args.state.moving_box_speed   = 10
    -** Processing line: ~    args.state.moving_box_size    = 100~
    +      collision_floor!
    +** Processing line: ~      collision_left!~
     - Inside source: true
     *** True Line Result
    -    args.state.moving_box_size    = 100
    -** Processing line: ~    args.state.moving_box_dx    ||=  1~
    +      collision_left!
    +** Processing line: ~      collision_right!~
     - Inside source: true
     *** True Line Result
    -    args.state.moving_box_dx    ||=  1
    -** Processing line: ~    args.state.moving_box_dy    ||=  1~
    +      collision_right!
    +** Processing line: ~      collision_ceiling!~
     - Inside source: true
     *** True Line Result
    -    args.state.moving_box_dy    ||=  1
    -** Processing line: ~    args.state.moving_box       ||= [0, 0, args.state.moving_box_size, args.state.moving_box_size] # moving_box_size is set as the width and height~
    +      collision_ceiling!
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    args.state.moving_box       ||= [0, 0, args.state.moving_box_size, args.state.moving_box_size] # moving_box_size is set as the width and height
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # These values represent the center box.~
    +** Processing line: ~    # Finds collisions between the bottom of the player's rect and the top of a world_collision_rect.~
     - Inside source: true
     *** True Line Result
    -    # These values represent the center box.
    -** Processing line: ~    args.state.center_box ||= [540, 260, 200, 200, 180]~
    +    # Finds collisions between the bottom of the player's rect and the top of a world_collision_rect.
    +** Processing line: ~    def collision_floor!~
     - Inside source: true
     *** True Line Result
    -    args.state.center_box ||= [540, 260, 200, 200, 180]
    -** Processing line: ~    args.state.center_box_collision ||= false # initially no collision~
    +    def collision_floor!
    +** Processing line: ~      return unless state.dy <= 0 # return unless player is going down or is as far down as possible~
     - Inside source: true
     *** True Line Result
    -    args.state.center_box_collision ||= false # initially no collision
    -** Processing line: ~  end~
    +      return unless state.dy <= 0 # return unless player is going down or is as far down as possible
    +** Processing line: ~      player_rect = [state.x, state.y - 0.1, state.tile_size, state.tile_size] # definition of player~
     - Inside source: true
     *** True Line Result
    -  end
    +      player_rect = [state.x, state.y - 0.1, state.tile_size, state.tile_size] # definition of player
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def render args~
    +** Processing line: ~      # Goes through world_collision_rects to find all intersections between the bottom of player's rect and~
     - Inside source: true
     *** True Line Result
    -  def render args
    -** Processing line: ~    # If the game state denotes that a collision has occured,~
    +      # Goes through world_collision_rects to find all intersections between the bottom of player's rect and
    +** Processing line: ~      # the top of a world_collision_rect (hence the "-0.1" above)~
     - Inside source: true
     *** True Line Result
    -    # If the game state denotes that a collision has occured,
    -** Processing line: ~    # render a solid square, otherwise render a border instead.~
    +      # the top of a world_collision_rect (hence the "-0.1" above)
    +** Processing line: ~      floor_collisions = state.world_collision_rects~
     - Inside source: true
     *** True Line Result
    -    # render a solid square, otherwise render a border instead.
    -** Processing line: ~    if args.state.center_box_collision~
    +      floor_collisions = state.world_collision_rects
    +** Processing line: ~                             .find_all { |r| r[:top].intersect_rect?(player_rect, collision_tollerance) }~
     - Inside source: true
     *** True Line Result
    -    if args.state.center_box_collision
    -** Processing line: ~      args.outputs.solids << args.state.center_box~
    +                             .find_all { |r| r[:top].intersect_rect?(player_rect, collision_tollerance) }
    +** Processing line: ~                             .first~
     - Inside source: true
     *** True Line Result
    -      args.outputs.solids << args.state.center_box
    -** Processing line: ~    else~
    +                             .first
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    else
    -** Processing line: ~      args.outputs.borders << args.state.center_box~
    +
    +** Processing line: ~      return unless floor_collisions # return unless collision occurred~
     - Inside source: true
     *** True Line Result
    -      args.outputs.borders << args.state.center_box
    +      return unless floor_collisions # return unless collision occurred
    +** Processing line: ~      state.y = floor_collisions[:top].top # player's y is set to the y of the top of the collided rect~
    +- Inside source: true
    +*** True Line Result
    +      state.y = floor_collisions[:top].top # player's y is set to the y of the top of the collided rect
    +** Processing line: ~      state.dy = 0 # if a collision occurred, the player's rect isn't moving because its path is blocked~
    +- Inside source: true
    +*** True Line Result
    +      state.dy = 0 # if a collision occurred, the player's rect isn't moving because its path is blocked
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -22480,242 +22903,218 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Then render the moving box.~
    -- Inside source: true
    -*** True Line Result
    -    # Then render the moving box.
    -** Processing line: ~    args.outputs.solids << args.state.moving_box~
    +** Processing line: ~    # Finds collisions between the player's left side and the right side of a world_collision_rect.~
     - Inside source: true
     *** True Line Result
    -    args.outputs.solids << args.state.moving_box
    -** Processing line: ~  end~
    +    # Finds collisions between the player's left side and the right side of a world_collision_rect.
    +** Processing line: ~    def collision_left!~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +    def collision_left!
    +** Processing line: ~      return unless state.dx < 0 # return unless player is moving left~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  # Generally in a pipeline for a game engine, you have rendering,~
    +      return unless state.dx < 0 # return unless player is moving left
    +** Processing line: ~      player_rect = [state.x - 0.1, state.y, state.tile_size, state.tile_size]~
     - Inside source: true
     *** True Line Result
    -  # Generally in a pipeline for a game engine, you have rendering,
    -** Processing line: ~  # game simulation (calculation), and input processing.~
    +      player_rect = [state.x - 0.1, state.y, state.tile_size, state.tile_size]
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  # game simulation (calculation), and input processing.
    -** Processing line: ~  # This fuction represents the game simulation.~
    +
    +** Processing line: ~      # Goes through world_collision_rects to find all intersections beween the player's left side and the~
     - Inside source: true
     *** True Line Result
    -  # This fuction represents the game simulation.
    -** Processing line: ~  def calc args~
    +      # Goes through world_collision_rects to find all intersections beween the player's left side and the
    +** Processing line: ~      # right side of a world_collision_rect.~
     - Inside source: true
     *** True Line Result
    -  def calc args
    -** Processing line: ~    position_moving_box args~
    +      # right side of a world_collision_rect.
    +** Processing line: ~      left_side_collisions = state.world_collision_rects~
     - Inside source: true
     *** True Line Result
    -    position_moving_box args
    -** Processing line: ~    determine_collision_center_box args~
    +      left_side_collisions = state.world_collision_rects
    +** Processing line: ~                                 .find_all { |r| r[:left_right].intersect_rect?(player_rect, collision_tollerance) }~
     - Inside source: true
     *** True Line Result
    -    determine_collision_center_box args
    -** Processing line: ~  end~
    +                                 .find_all { |r| r[:left_right].intersect_rect?(player_rect, collision_tollerance) }
    +** Processing line: ~                                 .first~
     - Inside source: true
     *** True Line Result
    -  end
    +                                 .first
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # Changes the position of the moving box on the screen by multiplying the change in x (dx) and change in y (dy) by the speed,~
    -- Inside source: true
    -*** True Line Result
    -  # Changes the position of the moving box on the screen by multiplying the change in x (dx) and change in y (dy) by the speed,
    -** Processing line: ~  # and adding it to the current position.~
    +** Processing line: ~      return unless left_side_collisions # return unless collision occurred~
     - Inside source: true
     *** True Line Result
    -  # and adding it to the current position.
    -** Processing line: ~  # dx and dy are positive if the box is moving right and up, respectively~
    +      return unless left_side_collisions # return unless collision occurred
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  # dx and dy are positive if the box is moving right and up, respectively
    -** Processing line: ~  # dx and dy are negative if the box is moving left and down, respectively~
    +
    +** Processing line: ~      # player's x is set to the value of the x of the collided rect's right side~
     - Inside source: true
     *** True Line Result
    -  # dx and dy are negative if the box is moving left and down, respectively
    -** Processing line: ~  def position_moving_box args~
    +      # player's x is set to the value of the x of the collided rect's right side
    +** Processing line: ~      state.x = left_side_collisions[:left_right].right~
     - Inside source: true
     *** True Line Result
    -  def position_moving_box args
    -** Processing line: ~    args.state.moving_box.x += args.state.moving_box_dx * args.state.moving_box_speed~
    +      state.x = left_side_collisions[:left_right].right
    +** Processing line: ~      state.dx = 0 # player isn't moving left because its path is blocked~
     - Inside source: true
     *** True Line Result
    -    args.state.moving_box.x += args.state.moving_box_dx * args.state.moving_box_speed
    -** Processing line: ~    args.state.moving_box.y += args.state.moving_box_dy * args.state.moving_box_speed~
    +      state.dx = 0 # player isn't moving left because its path is blocked
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    args.state.moving_box.y += args.state.moving_box_dy * args.state.moving_box_speed
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # 1280x720 are the virtual pixels you work with (essentially 720p).~
    -- Inside source: true
    -*** True Line Result
    -    # 1280x720 are the virtual pixels you work with (essentially 720p).
    -** Processing line: ~    screen_width  = 1280~
    +** Processing line: ~    # Finds collisions between the right side of the player and the left side of a world_collision_rect.~
     - Inside source: true
     *** True Line Result
    -    screen_width  = 1280
    -** Processing line: ~    screen_height = 720~
    +    # Finds collisions between the right side of the player and the left side of a world_collision_rect.
    +** Processing line: ~    def collision_right!~
     - Inside source: true
     *** True Line Result
    -    screen_height = 720
    -** Processing line: ~~
    +    def collision_right!
    +** Processing line: ~      return unless state.dx > 0 # return unless player is moving right~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # Position of the box is denoted by the bottom left hand corner, in~
    +      return unless state.dx > 0 # return unless player is moving right
    +** Processing line: ~      player_rect = [state.x + 0.1, state.y, state.tile_size, state.tile_size]~
     - Inside source: true
     *** True Line Result
    -    # Position of the box is denoted by the bottom left hand corner, in
    -** Processing line: ~    # that case, we have to subtract the width of the box so that it stays~
    +      player_rect = [state.x + 0.1, state.y, state.tile_size, state.tile_size]
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    # that case, we have to subtract the width of the box so that it stays
    -** Processing line: ~    # in the scene (you can try deleting the subtraction to see how it~
    +
    +** Processing line: ~      # Goes through world_collision_rects to find all intersections between the player's right side~
     - Inside source: true
     *** True Line Result
    -    # in the scene (you can try deleting the subtraction to see how it
    -** Processing line: ~    # impacts the box's movement).~
    +      # Goes through world_collision_rects to find all intersections between the player's right side
    +** Processing line: ~      # and the left side of a world_collision_rect (hence the "+0.1" above)~
     - Inside source: true
     *** True Line Result
    -    # impacts the box's movement).
    -** Processing line: ~    if args.state.moving_box.x > screen_width - args.state.moving_box_size~
    +      # and the left side of a world_collision_rect (hence the "+0.1" above)
    +** Processing line: ~      right_side_collisions = state.world_collision_rects~
     - Inside source: true
     *** True Line Result
    -    if args.state.moving_box.x > screen_width - args.state.moving_box_size
    -** Processing line: ~      args.state.moving_box_dx = -1 # moves left~
    +      right_side_collisions = state.world_collision_rects
    +** Processing line: ~                                  .find_all { |r| r[:left_right].intersect_rect?(player_rect, collision_tollerance) }~
     - Inside source: true
     *** True Line Result
    -      args.state.moving_box_dx = -1 # moves left
    -** Processing line: ~    elsif args.state.moving_box.x < 0~
    +                                  .find_all { |r| r[:left_right].intersect_rect?(player_rect, collision_tollerance) }
    +** Processing line: ~                                  .first~
     - Inside source: true
     *** True Line Result
    -    elsif args.state.moving_box.x < 0
    -** Processing line: ~      args.state.moving_box_dx =  1 # moves right~
    +                                  .first
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      args.state.moving_box_dx =  1 # moves right
    -** Processing line: ~    end~
    +
    +** Processing line: ~      return unless right_side_collisions # return unless collision occurred~
     - Inside source: true
     *** True Line Result
    -    end
    +      return unless right_side_collisions # return unless collision occurred
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Here, we're making sure the moving box remains within the vertical scope of the screen~
    -- Inside source: true
    -*** True Line Result
    -    # Here, we're making sure the moving box remains within the vertical scope of the screen
    -** Processing line: ~    if args.state.moving_box.y > screen_height - args.state.moving_box_size # if the box moves too high~
    +** Processing line: ~      # player's x is set to the value of the collided rect's left, minus the size of a rect~
     - Inside source: true
     *** True Line Result
    -    if args.state.moving_box.y > screen_height - args.state.moving_box_size # if the box moves too high
    -** Processing line: ~      args.state.moving_box_dy = -1 # moves down~
    +      # player's x is set to the value of the collided rect's left, minus the size of a rect
    +** Processing line: ~      # tile size is subtracted because player's position is denoted by bottom left corner~
     - Inside source: true
     *** True Line Result
    -      args.state.moving_box_dy = -1 # moves down
    -** Processing line: ~    elsif args.state.moving_box.y < 0 # if the box moves too low~
    +      # tile size is subtracted because player's position is denoted by bottom left corner
    +** Processing line: ~      state.x = right_side_collisions[:left_right].left - state.tile_size~
     - Inside source: true
     *** True Line Result
    -    elsif args.state.moving_box.y < 0 # if the box moves too low
    -** Processing line: ~      args.state.moving_box_dy =  1 # moves up~
    +      state.x = right_side_collisions[:left_right].left - state.tile_size
    +** Processing line: ~      state.dx = 0 # player isn't moving right because its path is blocked~
     - Inside source: true
     *** True Line Result
    -      args.state.moving_box_dy =  1 # moves up
    +      state.dx = 0 # player isn't moving right because its path is blocked
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
         end
    -** Processing line: ~  end~
    -- Inside source: true
    -*** True Line Result
    -  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def determine_collision_center_box args~
    -- Inside source: true
    -*** True Line Result
    -  def determine_collision_center_box args
    -** Processing line: ~    # Collision is handled by the engine. You simply have to call the~
    +** Processing line: ~    # Finds collisions between the top of the player's rect and the bottom of a world_collision_rect.~
     - Inside source: true
     *** True Line Result
    -    # Collision is handled by the engine. You simply have to call the
    -** Processing line: ~    # `intersect_rect?` function.~
    +    # Finds collisions between the top of the player's rect and the bottom of a world_collision_rect.
    +** Processing line: ~    def collision_ceiling!~
     - Inside source: true
     *** True Line Result
    -    # `intersect_rect?` function.
    -** Processing line: ~    if args.state.moving_box.intersect_rect? args.state.center_box # if the two boxes intersect~
    +    def collision_ceiling!
    +** Processing line: ~      return unless state.dy > 0 # return unless player is moving up~
     - Inside source: true
     *** True Line Result
    -    if args.state.moving_box.intersect_rect? args.state.center_box # if the two boxes intersect
    -** Processing line: ~      args.state.center_box_collision = true # then a collision happened~
    +      return unless state.dy > 0 # return unless player is moving up
    +** Processing line: ~      player_rect = [state.x, state.y + 0.1, state.tile_size, state.tile_size]~
     - Inside source: true
     *** True Line Result
    -      args.state.center_box_collision = true # then a collision happened
    -** Processing line: ~    else~
    +      player_rect = [state.x, state.y + 0.1, state.tile_size, state.tile_size]
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    else
    -** Processing line: ~      args.state.center_box_collision = false # otherwise, no collision happened~
    +
    +** Processing line: ~      # Goes through world_collision_rects to find intersections between the bottom of a~
     - Inside source: true
     *** True Line Result
    -      args.state.center_box_collision = false # otherwise, no collision happened
    -** Processing line: ~    end~
    +      # Goes through world_collision_rects to find intersections between the bottom of a
    +** Processing line: ~      # world_collision_rect and the top of the player's rect (hence the "+0.1" above)~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~  end~
    +      # world_collision_rect and the top of the player's rect (hence the "+0.1" above)
    +** Processing line: ~      ceil_collisions = state.world_collision_rects~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +      ceil_collisions = state.world_collision_rects
    +** Processing line: ~                            .find_all { |r| r[:bottom].intersect_rect?(player_rect, collision_tollerance) }~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def tick_instructions args, text, y = 715~
    +                            .find_all { |r| r[:bottom].intersect_rect?(player_rect, collision_tollerance) }
    +** Processing line: ~                            .first~
     - Inside source: true
     *** True Line Result
    -  def tick_instructions args, text, y = 715
    -** Processing line: ~    return if args.state.key_event_occurred~
    +                            .first
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    return if args.state.key_event_occurred
    -** Processing line: ~    if args.inputs.mouse.click ||~
    +
    +** Processing line: ~      return unless ceil_collisions # return unless collision occurred~
     - Inside source: true
     *** True Line Result
    -    if args.inputs.mouse.click ||
    -** Processing line: ~       args.inputs.keyboard.directional_vector ||~
    +      return unless ceil_collisions # return unless collision occurred
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -       args.inputs.keyboard.directional_vector ||
    -** Processing line: ~       args.inputs.keyboard.key_down.enter ||~
    +
    +** Processing line: ~      # player's y is set to the bottom y of the rect it collided with, minus the size of a rect~
     - Inside source: true
     *** True Line Result
    -       args.inputs.keyboard.key_down.enter ||
    -** Processing line: ~       args.inputs.keyboard.key_down.escape~
    +      # player's y is set to the bottom y of the rect it collided with, minus the size of a rect
    +** Processing line: ~      state.y = ceil_collisions[:bottom].y - state.tile_size~
     - Inside source: true
     *** True Line Result
    -       args.inputs.keyboard.key_down.escape
    -** Processing line: ~      args.state.key_event_occurred = true~
    +      state.y = ceil_collisions[:bottom].y - state.tile_size
    +** Processing line: ~      state.dy = 0 # if a collision occurred, the player isn't moving up because its path is blocked~
     - Inside source: true
     *** True Line Result
    -      args.state.key_event_occurred = true
    +      state.dy = 0 # if a collision occurred, the player isn't moving up because its path is blocked
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -22724,318 +23123,286 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    args.outputs.debug << [0, y - 50, 1280, 60].solid~
    -- Inside source: true
    -*** True Line Result
    -    args.outputs.debug << [0, y - 50, 1280, 60].solid
    -** Processing line: ~    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label~
    -- Inside source: true
    -*** True Line Result
    -    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label
    -** Processing line: ~    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label~
    +** Processing line: ~    # Makes sure the player remains within the screen's dimensions.~
     - Inside source: true
     *** True Line Result
    -    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label
    -** Processing line: ~  end~
    +    # Makes sure the player remains within the screen's dimensions.
    +** Processing line: ~    def calc_edge_collision~
     - Inside source: true
     *** True Line Result
    -  end
    +    def calc_edge_collision
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~#+end_src~
    -- Line was identified as the end of a code block.
    -*** True Line Result
    -#+end_src
    -** Processing line: ~~
    -- End of paragraph detected.
    -*** True Line Result
    -
    -** Processing line: ~*** Physics And Collisions - Moving Objects - main.rb~
    -- Header detected.
    -*** True Line Result
    -
    -*** True Line Result
    -*** Physics And Collisions - Moving Objects - main.rb
    -** Processing line: ~#+begin_src ruby~
    -- Line was identified as the beginning of a code block.
    -*** True Line Result
    -
    -*** True Line Result
    -#+begin_src ruby
    -** Processing line: ~  # ./samples/04_physics_and_collisions/02_moving_objects/app/main.rb~
    +** Processing line: ~      #Ensures that the player doesn't fall below the map.~
     - Inside source: true
     *** True Line Result
    -  # ./samples/04_physics_and_collisions/02_moving_objects/app/main.rb
    -** Processing line: ~  =begin~
    +      #Ensures that the player doesn't fall below the map.
    +** Processing line: ~      if state.y < 0~
     - Inside source: true
     *** True Line Result
    -  =begin
    -** Processing line: ~~
    +      if state.y < 0
    +** Processing line: ~        state.y = 0~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   APIs listing that haven't been encountered in previous sample apps:~
    +        state.y = 0
    +** Processing line: ~        state.dy = 0~
     - Inside source: true
     *** True Line Result
    -   APIs listing that haven't been encountered in previous sample apps:
    +        state.dy = 0
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~   - Hashes: Collection of unique keys and their corresponding values. The value can be found~
    +** Processing line: ~      #Ensures that the player doesn't go too high.~
     - Inside source: true
     *** True Line Result
    -   - Hashes: Collection of unique keys and their corresponding values. The value can be found
    -** Processing line: ~     using their keys.~
    +      #Ensures that the player doesn't go too high.
    +** Processing line: ~      # Position of player is denoted by bottom left hand corner, which is why we have to subtract the~
     - Inside source: true
     *** True Line Result
    -     using their keys.
    -** Processing line: ~~
    +      # Position of player is denoted by bottom left hand corner, which is why we have to subtract the
    +** Processing line: ~      # size of the player's box (so it remains visible on the screen)~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~     For example, if we have a "numbers" hash that stores numbers in English as the~
    +      # size of the player's box (so it remains visible on the screen)
    +** Processing line: ~      elsif state.y > 720 - state.tile_size # if the player's y position exceeds the height of screen~
     - Inside source: true
     *** True Line Result
    -     For example, if we have a "numbers" hash that stores numbers in English as the
    -** Processing line: ~     key and numbers in Spanish as the value, we'd have a hash that looks like this...~
    +      elsif state.y > 720 - state.tile_size # if the player's y position exceeds the height of screen
    +** Processing line: ~        state.y = 720 - state.tile_size # the player will remain as high as possible while staying on screen~
     - Inside source: true
     *** True Line Result
    -     key and numbers in Spanish as the value, we'd have a hash that looks like this...
    -** Processing line: ~     numbers = { "one" => "uno", "two" => "dos", "three" => "tres" }~
    +        state.y = 720 - state.tile_size # the player will remain as high as possible while staying on screen
    +** Processing line: ~        state.dy = 0~
     - Inside source: true
     *** True Line Result
    -     numbers = { "one" => "uno", "two" => "dos", "three" => "tres" }
    -** Processing line: ~     and on it goes.~
    +        state.dy = 0
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -     and on it goes.
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~     Now if we wanted to find the corresponding value of the "one" key, we could say~
    +** Processing line: ~      # Ensures that the player remains in the horizontal range that it is supposed to.~
     - Inside source: true
     *** True Line Result
    -     Now if we wanted to find the corresponding value of the "one" key, we could say
    -** Processing line: ~     puts numbers["one"]~
    +      # Ensures that the player remains in the horizontal range that it is supposed to.
    +** Processing line: ~      if state.x >= 1280 - state.tile_size && state.dx > 0 # if player moves too far right~
     - Inside source: true
     *** True Line Result
    -     puts numbers["one"]
    -** Processing line: ~     which would print "uno" to the console.~
    +      if state.x >= 1280 - state.tile_size && state.dx > 0 # if player moves too far right
    +** Processing line: ~        state.x = 1280 - state.tile_size # player will remain as right as possible while staying on screen~
     - Inside source: true
     *** True Line Result
    -     which would print "uno" to the console.
    -** Processing line: ~~
    +        state.x = 1280 - state.tile_size # player will remain as right as possible while staying on screen
    +** Processing line: ~        state.dx = 0~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   - num1.greater(num2): Returns the greater value.~
    +        state.dx = 0
    +** Processing line: ~      elsif state.x <= 0 && state.dx < 0 # if player moves too far left~
     - Inside source: true
     *** True Line Result
    -   - num1.greater(num2): Returns the greater value.
    -** Processing line: ~     For example, if we have the command~
    +      elsif state.x <= 0 && state.dx < 0 # if player moves too far left
    +** Processing line: ~        state.x = 0 # player will remain as left as possible while remaining on screen~
     - Inside source: true
     *** True Line Result
    -     For example, if we have the command
    -** Processing line: ~     puts 4.greater(3)~
    +        state.x = 0 # player will remain as left as possible while remaining on screen
    +** Processing line: ~        state.dx = 0~
     - Inside source: true
     *** True Line Result
    -     puts 4.greater(3)
    -** Processing line: ~     the number 4 would be printed to the console since it has a greater value than 3.~
    +        state.dx = 0
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -     the number 4 would be printed to the console since it has a greater value than 3.
    -** Processing line: ~     Similar to lesser, which returns the lesser value.~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -     Similar to lesser, which returns the lesser value.
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~   - num1.lesser(num2): Finds the lower value of the given options.~
    -- Inside source: true
    -*** True Line Result
    -   - num1.lesser(num2): Finds the lower value of the given options.
    -** Processing line: ~     For example, in the statement~
    -- Inside source: true
    -*** True Line Result
    -     For example, in the statement
    -** Processing line: ~     a = 4.lesser(3)~
    +** Processing line: ~    # Processes input from the user on the keyboard.~
     - Inside source: true
     *** True Line Result
    -     a = 4.lesser(3)
    -** Processing line: ~     3 has a lower value than 4, which means that the value of a would be set to 3,~
    +    # Processes input from the user on the keyboard.
    +** Processing line: ~    def process_inputs~
     - Inside source: true
     *** True Line Result
    -     3 has a lower value than 4, which means that the value of a would be set to 3,
    -** Processing line: ~     but if the statement had been~
    +    def process_inputs
    +** Processing line: ~      if inputs.mouse.down~
     - Inside source: true
     *** True Line Result
    -     but if the statement had been
    -** Processing line: ~     a = 4.lesser(5)~
    +      if inputs.mouse.down
    +** Processing line: ~        state.world_lookup = {}~
     - Inside source: true
     *** True Line Result
    -     a = 4.lesser(5)
    -** Processing line: ~     4 has a lower value than 5, which means that the value of a would be set to 4.~
    +        state.world_lookup = {}
    +** Processing line: ~        x, y = to_coord inputs.mouse.down.point  # gets x, y coordinates for the grid~
     - Inside source: true
     *** True Line Result
    -     4 has a lower value than 5, which means that the value of a would be set to 4.
    +        x, y = to_coord inputs.mouse.down.point  # gets x, y coordinates for the grid
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~   - reject: Removes elements from a collection if they meet certain requirements.~
    -- Inside source: true
    -*** True Line Result
    -   - reject: Removes elements from a collection if they meet certain requirements.
    -** Processing line: ~     For example, you can derive an array of odd numbers from an original array of~
    +** Processing line: ~        if state.world.any? { |loc| loc == [x, y] }  # checks if coordinates duplicate~
     - Inside source: true
     *** True Line Result
    -     For example, you can derive an array of odd numbers from an original array of
    -** Processing line: ~     numbers 1 through 10 by rejecting all elements that are even (or divisible by 2).~
    +        if state.world.any? { |loc| loc == [x, y] }  # checks if coordinates duplicate
    +** Processing line: ~          state.world = state.world.reject { |loc| loc == [x, y] }  # erases tile space~
     - Inside source: true
     *** True Line Result
    -     numbers 1 through 10 by rejecting all elements that are even (or divisible by 2).
    -** Processing line: ~~
    +          state.world = state.world.reject { |loc| loc == [x, y] }  # erases tile space
    +** Processing line: ~        else~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   - find_all: Finds all values that satisfy specific requirements.~
    +        else
    +** Processing line: ~          state.world << [x, y] # If no duplicates, adds to world collection~
     - Inside source: true
     *** True Line Result
    -   - find_all: Finds all values that satisfy specific requirements.
    -** Processing line: ~     For example, you can find all elements of a collection that are divisible by 2~
    +          state.world << [x, y] # If no duplicates, adds to world collection
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -     For example, you can find all elements of a collection that are divisible by 2
    -** Processing line: ~     or find all objects that have intersected with another object.~
    +        end
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -     or find all objects that have intersected with another object.
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~   - abs: Returns the absolute value.~
    +** Processing line: ~      # Sets dx to 0 if the player lets go of arrow keys.~
     - Inside source: true
     *** True Line Result
    -   - abs: Returns the absolute value.
    -** Processing line: ~     For example, the command~
    +      # Sets dx to 0 if the player lets go of arrow keys.
    +** Processing line: ~      if inputs.keyboard.key_up.right~
     - Inside source: true
     *** True Line Result
    -     For example, the command
    -** Processing line: ~     (-30).abs~
    +      if inputs.keyboard.key_up.right
    +** Processing line: ~        state.dx = 0~
     - Inside source: true
     *** True Line Result
    -     (-30).abs
    -** Processing line: ~     would return 30 as a result.~
    +        state.dx = 0
    +** Processing line: ~      elsif inputs.keyboard.key_up.left~
     - Inside source: true
     *** True Line Result
    -     would return 30 as a result.
    -** Processing line: ~~
    +      elsif inputs.keyboard.key_up.left
    +** Processing line: ~        state.dx = 0~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   - map: Ruby method used to transform data; used in arrays, hashes, and collections.~
    +        state.dx = 0
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -   - map: Ruby method used to transform data; used in arrays, hashes, and collections.
    -** Processing line: ~     Can be used to perform an action on every element of a collection, such as multiplying~
    +      end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -     Can be used to perform an action on every element of a collection, such as multiplying
    -** Processing line: ~     each element by 2 or declaring every element as a new entity.~
    +
    +** Processing line: ~      # Sets dx to 3 in whatever direction the player chooses.~
     - Inside source: true
     *** True Line Result
    -     each element by 2 or declaring every element as a new entity.
    -** Processing line: ~~
    +      # Sets dx to 3 in whatever direction the player chooses.
    +** Processing line: ~      if inputs.keyboard.key_held.right # if right key is pressed~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   Reminders:~
    +      if inputs.keyboard.key_held.right # if right key is pressed
    +** Processing line: ~        state.dx =  3~
     - Inside source: true
     *** True Line Result
    -   Reminders:
    -** Processing line: ~~
    +        state.dx =  3
    +** Processing line: ~      elsif inputs.keyboard.key_held.left # if left key is pressed~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   - args.inputs.keyboard.KEY: Determines if a key has been pressed.~
    +      elsif inputs.keyboard.key_held.left # if left key is pressed
    +** Processing line: ~        state.dx = -3~
     - Inside source: true
     *** True Line Result
    -   - args.inputs.keyboard.KEY: Determines if a key has been pressed.
    -** Processing line: ~     For more information about the keyboard, take a look at mygame/documentation/06-keyboard.md.~
    +        state.dx = -3
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -     For more information about the keyboard, take a look at mygame/documentation/06-keyboard.md.
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~   - ARRAY#intersect_rect?: Returns true or false depending on if the two rectangles intersect.~
    +** Processing line: ~      #Sets dy to 5 to make the player ~fly~ when they press the space bar~
     - Inside source: true
     *** True Line Result
    -   - ARRAY#intersect_rect?: Returns true or false depending on if the two rectangles intersect.
    -** Processing line: ~~
    +      #Sets dy to 5 to make the player ~fly~ when they press the space bar
    +** Processing line: ~      if inputs.keyboard.key_held.space~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   - args.outputs.solids: An array. The values generate a solid.~
    +      if inputs.keyboard.key_held.space
    +** Processing line: ~        state.dy = 5~
     - Inside source: true
     *** True Line Result
    -   - args.outputs.solids: An array. The values generate a solid.
    -** Processing line: ~     The parameters are [X, Y, WIDTH, HEIGHT, RED, GREEN, BLUE]~
    +        state.dy = 5
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -     The parameters are [X, Y, WIDTH, HEIGHT, RED, GREEN, BLUE]
    -** Processing line: ~     For more information about solids, go to mygame/documentation/03-solids-and-borders.md.~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -     For more information about solids, go to mygame/documentation/03-solids-and-borders.md.
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  =end~
    +** Processing line: ~    def to_coord point~
     - Inside source: true
     *** True Line Result
    -  =end
    +    def to_coord point
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # Calls methods needed for game to run properly~
    +** Processing line: ~      # Integer divides (idiv) point.x to turn into grid~
     - Inside source: true
     *** True Line Result
    -  # Calls methods needed for game to run properly
    -** Processing line: ~  def tick args~
    +      # Integer divides (idiv) point.x to turn into grid
    +** Processing line: ~      # Then, you can just multiply each integer by state.tile_size later so the grid coordinates.~
     - Inside source: true
     *** True Line Result
    -  def tick args
    -** Processing line: ~    tick_instructions args, "Use LEFT and RIGHT arrow keys to move and SPACE to jump."~
    +      # Then, you can just multiply each integer by state.tile_size later so the grid coordinates.
    +** Processing line: ~      [point.x.idiv(state.tile_size), point.y.idiv(state.tile_size)]~
     - Inside source: true
     *** True Line Result
    -    tick_instructions args, "Use LEFT and RIGHT arrow keys to move and SPACE to jump."
    -** Processing line: ~    defaults args~
    +      [point.x.idiv(state.tile_size), point.y.idiv(state.tile_size)]
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    defaults args
    -** Processing line: ~    render args~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    render args
    -** Processing line: ~    calc args~
    +
    +** Processing line: ~    # Represents the tolerance for a collision between the player's rect and another rect.~
     - Inside source: true
     *** True Line Result
    -    calc args
    -** Processing line: ~    input args~
    +    # Represents the tolerance for a collision between the player's rect and another rect.
    +** Processing line: ~    def collision_tollerance~
     - Inside source: true
     *** True Line Result
    -    input args
    +    def collision_tollerance
    +** Processing line: ~      0.0~
    +- Inside source: true
    +*** True Line Result
    +      0.0
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -23044,90 +23411,98 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # sets default values and creates empty collections~
    +** Processing line: ~  $platformer_physics = PoorManPlatformerPhysics.new~
     - Inside source: true
     *** True Line Result
    -  # sets default values and creates empty collections
    -** Processing line: ~  # initialization only happens in the first frame~
    +  $platformer_physics = PoorManPlatformerPhysics.new
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  # initialization only happens in the first frame
    -** Processing line: ~  def defaults args~
    +
    +** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
    -  def defaults args
    -** Processing line: ~    fiddle args~
    +  def tick args
    +** Processing line: ~    $platformer_physics.grid    = args.grid~
     - Inside source: true
     *** True Line Result
    -    fiddle args
    -** Processing line: ~    args.state.enemy.hammers ||= []~
    +    $platformer_physics.grid    = args.grid
    +** Processing line: ~    $platformer_physics.inputs  = args.inputs~
     - Inside source: true
     *** True Line Result
    -    args.state.enemy.hammers ||= []
    -** Processing line: ~    args.state.enemy.hammer_queue ||= []~
    +    $platformer_physics.inputs  = args.inputs
    +** Processing line: ~    $platformer_physics.state    = args.state~
     - Inside source: true
     *** True Line Result
    -    args.state.enemy.hammer_queue ||= []
    -** Processing line: ~    args.state.tick_count = args.state.tick_count~
    +    $platformer_physics.state    = args.state
    +** Processing line: ~    $platformer_physics.outputs = args.outputs~
     - Inside source: true
     *** True Line Result
    -    args.state.tick_count = args.state.tick_count
    -** Processing line: ~    args.state.bridge_top = 128~
    +    $platformer_physics.outputs = args.outputs
    +** Processing line: ~    $platformer_physics.tick~
     - Inside source: true
     *** True Line Result
    -    args.state.bridge_top = 128
    -** Processing line: ~    args.state.player.x  ||= 0                        # initializes player's properties~
    +    $platformer_physics.tick
    +** Processing line: ~    tick_instructions args, "Sample app shows platformer collisions. CLICK to place box. ARROW keys to move around. SPACE to jump."~
     - Inside source: true
     *** True Line Result
    -    args.state.player.x  ||= 0                        # initializes player's properties
    -** Processing line: ~    args.state.player.y  ||= args.state.bridge_top~
    +    tick_instructions args, "Sample app shows platformer collisions. CLICK to place box. ARROW keys to move around. SPACE to jump."
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    args.state.player.y  ||= args.state.bridge_top
    -** Processing line: ~    args.state.player.w  ||= 64~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    args.state.player.w  ||= 64
    -** Processing line: ~    args.state.player.h  ||= 64~
    +
    +** Processing line: ~  def tick_instructions args, text, y = 715~
     - Inside source: true
     *** True Line Result
    -    args.state.player.h  ||= 64
    -** Processing line: ~    args.state.player.dy ||= 0~
    +  def tick_instructions args, text, y = 715
    +** Processing line: ~    return if args.state.key_event_occurred~
     - Inside source: true
     *** True Line Result
    -    args.state.player.dy ||= 0
    -** Processing line: ~    args.state.player.dx ||= 0~
    +    return if args.state.key_event_occurred
    +** Processing line: ~    if args.inputs.mouse.click ||~
     - Inside source: true
     *** True Line Result
    -    args.state.player.dx ||= 0
    -** Processing line: ~    args.state.enemy.x   ||= 800                      # initializes enemy's properties~
    +    if args.inputs.mouse.click ||
    +** Processing line: ~       args.inputs.keyboard.directional_vector ||~
     - Inside source: true
     *** True Line Result
    -    args.state.enemy.x   ||= 800                      # initializes enemy's properties
    -** Processing line: ~    args.state.enemy.y   ||= 0~
    +       args.inputs.keyboard.directional_vector ||
    +** Processing line: ~       args.inputs.keyboard.key_down.enter ||~
     - Inside source: true
     *** True Line Result
    -    args.state.enemy.y   ||= 0
    -** Processing line: ~    args.state.enemy.w   ||= 128~
    +       args.inputs.keyboard.key_down.enter ||
    +** Processing line: ~       args.inputs.keyboard.key_down.escape~
     - Inside source: true
     *** True Line Result
    -    args.state.enemy.w   ||= 128
    -** Processing line: ~    args.state.enemy.h   ||= 128~
    +       args.inputs.keyboard.key_down.escape
    +** Processing line: ~      args.state.key_event_occurred = true~
     - Inside source: true
     *** True Line Result
    -    args.state.enemy.h   ||= 128
    -** Processing line: ~    args.state.enemy.dy  ||= 0~
    +      args.state.key_event_occurred = true
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    args.state.enemy.dy  ||= 0
    -** Processing line: ~    args.state.enemy.dx  ||= 0~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    args.state.enemy.dx  ||= 0
    -** Processing line: ~    args.state.game_over_at ||= 0~
    +
    +** Processing line: ~    args.outputs.debug << [0, y - 50, 1280, 60].solid~
     - Inside source: true
     *** True Line Result
    -    args.state.game_over_at ||= 0
    +    args.outputs.debug << [0, y - 50, 1280, 60].solid
    +** Processing line: ~    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label~
    +- Inside source: true
    +*** True Line Result
    +    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label
    +** Processing line: ~    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label~
    +- Inside source: true
    +*** True Line Result
    +    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -23136,310 +23511,282 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # sets enemy, player, hammer values~
    -- Inside source: true
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
     *** True Line Result
    -  # sets enemy, player, hammer values
    -** Processing line: ~  def fiddle args~
    -- Inside source: true
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
     *** True Line Result
    -  def fiddle args
    -** Processing line: ~    args.state.gravity                     = -0.3~
    -- Inside source: true
    +
    +** Processing line: ~*** Physics And Collisions - Box Collision 2 - main.rb~
    +- Header detected.
     *** True Line Result
    -    args.state.gravity                     = -0.3
    -** Processing line: ~    args.state.enemy_jump_power            = 10       # sets enemy values~
    -- Inside source: true
    +
     *** True Line Result
    -    args.state.enemy_jump_power            = 10       # sets enemy values
    -** Processing line: ~    args.state.enemy_jump_interval         = 60~
    -- Inside source: true
    +*** Physics And Collisions - Box Collision 2 - main.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
     *** True Line Result
    -    args.state.enemy_jump_interval         = 60
    -** Processing line: ~    args.state.hammer_throw_interval       = 40       # sets hammer values~
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/04_physics_and_collisions/05_box_collision_2/app/main.rb~
     - Inside source: true
     *** True Line Result
    -    args.state.hammer_throw_interval       = 40       # sets hammer values
    -** Processing line: ~    args.state.hammer_launch_power_default = 5~
    +  # ./samples/04_physics_and_collisions/05_box_collision_2/app/main.rb
    +** Processing line: ~  =begin~
     - Inside source: true
     *** True Line Result
    -    args.state.hammer_launch_power_default = 5
    -** Processing line: ~    args.state.hammer_launch_power_near    = 2~
    +  =begin
    +** Processing line: ~   APIs listing that haven't been encountered in previous sample apps:~
     - Inside source: true
     *** True Line Result
    -    args.state.hammer_launch_power_near    = 2
    -** Processing line: ~    args.state.hammer_launch_power_far     = 7~
    +   APIs listing that haven't been encountered in previous sample apps:
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    args.state.hammer_launch_power_far     = 7
    -** Processing line: ~    args.state.hammer_upward_launch_power  = 15~
    +
    +** Processing line: ~   - times: Performs an action a specific number of times.~
     - Inside source: true
     *** True Line Result
    -    args.state.hammer_upward_launch_power  = 15
    -** Processing line: ~    args.state.max_hammers_per_volley      = 10~
    +   - times: Performs an action a specific number of times.
    +** Processing line: ~     For example, if we said~
     - Inside source: true
     *** True Line Result
    -    args.state.max_hammers_per_volley      = 10
    -** Processing line: ~    args.state.gap_between_hammers         = 10~
    +     For example, if we said
    +** Processing line: ~     5.times puts "Hello DragonRuby",~
     - Inside source: true
     *** True Line Result
    -    args.state.gap_between_hammers         = 10
    -** Processing line: ~    args.state.player_jump_power           = 10       # sets player values~
    +     5.times puts "Hello DragonRuby",
    +** Processing line: ~     then we'd see the words "Hello DragonRuby" printed on the console 5 times.~
     - Inside source: true
     *** True Line Result
    -    args.state.player_jump_power           = 10       # sets player values
    -** Processing line: ~    args.state.player_jump_power_duration  = 10~
    +     then we'd see the words "Hello DragonRuby" printed on the console 5 times.
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    args.state.player_jump_power_duration  = 10
    -** Processing line: ~    args.state.player_max_run_speed        = 10~
    +
    +** Processing line: ~   - split: Divides a string into substrings based on a delimiter.~
     - Inside source: true
     *** True Line Result
    -    args.state.player_max_run_speed        = 10
    -** Processing line: ~    args.state.player_speed_slowdown_rate  = 0.9~
    +   - split: Divides a string into substrings based on a delimiter.
    +** Processing line: ~     For example, if we had a command~
     - Inside source: true
     *** True Line Result
    -    args.state.player_speed_slowdown_rate  = 0.9
    -** Processing line: ~    args.state.player_acceleration         = 1~
    +     For example, if we had a command
    +** Processing line: ~     "DragonRuby is awesome".split(" ")~
     - Inside source: true
     *** True Line Result
    -    args.state.player_acceleration         = 1
    -** Processing line: ~    args.state.hammer_size                 = 32~
    +     "DragonRuby is awesome".split(" ")
    +** Processing line: ~     then the result would be~
     - Inside source: true
     *** True Line Result
    -    args.state.hammer_size                 = 32
    -** Processing line: ~  end~
    +     then the result would be
    +** Processing line: ~     ["DragonRuby", "is", "awesome"] because the words are separated by a space delimiter.~
     - Inside source: true
     *** True Line Result
    -  end
    +     ["DragonRuby", "is", "awesome"] because the words are separated by a space delimiter.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # outputs objects onto the screen~
    +** Processing line: ~   - join: Opposite of split; converts each element of array to a string separated by delimiter.~
     - Inside source: true
     *** True Line Result
    -  # outputs objects onto the screen
    -** Processing line: ~  def render args~
    +   - join: Opposite of split; converts each element of array to a string separated by delimiter.
    +** Processing line: ~     For example, if we had a command~
     - Inside source: true
     *** True Line Result
    -  def render args
    -** Processing line: ~    args.outputs.solids << 20.map_with_index do |i| # uses 20 squares to form bridge~
    +     For example, if we had a command
    +** Processing line: ~     ["DragonRuby","is","awesome"].join(" ")~
     - Inside source: true
     *** True Line Result
    -    args.outputs.solids << 20.map_with_index do |i| # uses 20 squares to form bridge
    -** Processing line: ~      # sets x by multiplying 64 to index to find pixel value (places all squares side by side)~
    +     ["DragonRuby","is","awesome"].join(" ")
    +** Processing line: ~     then the result would be~
     - Inside source: true
     *** True Line Result
    -      # sets x by multiplying 64 to index to find pixel value (places all squares side by side)
    -** Processing line: ~      # subtracts 64 from bridge_top because position is denoted by bottom left corner~
    +     then the result would be
    +** Processing line: ~     "DragonRuby is awesome".~
     - Inside source: true
     *** True Line Result
    -      # subtracts 64 from bridge_top because position is denoted by bottom left corner
    -** Processing line: ~      [i * 64, args.state.bridge_top - 64, 64, 64]~
    +     "DragonRuby is awesome".
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      [i * 64, args.state.bridge_top - 64, 64, 64]
    -** Processing line: ~    end~
    +
    +** Processing line: ~   Reminders:~
     - Inside source: true
     *** True Line Result
    -    end
    +   Reminders:
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    args.outputs.solids << [args.state.x, args.state.y, args.state.w, args.state.h, 255, 0, 0]~
    +** Processing line: ~   - to_s: Returns a string representation of an object.~
     - Inside source: true
     *** True Line Result
    -    args.outputs.solids << [args.state.x, args.state.y, args.state.w, args.state.h, 255, 0, 0]
    -** Processing line: ~    args.outputs.solids << [args.state.player.x, args.state.player.y, args.state.player.w, args.state.player.h, 255, 0, 0] # outputs player onto screen (red box)~
    +   - to_s: Returns a string representation of an object.
    +** Processing line: ~     For example, if we had~
     - Inside source: true
     *** True Line Result
    -    args.outputs.solids << [args.state.player.x, args.state.player.y, args.state.player.w, args.state.player.h, 255, 0, 0] # outputs player onto screen (red box)
    -** Processing line: ~    args.outputs.solids << [args.state.enemy.x, args.state.enemy.y, args.state.enemy.w, args.state.enemy.h, 0, 255, 0] # outputs enemy onto screen (green box)~
    +     For example, if we had
    +** Processing line: ~     500.to_s~
     - Inside source: true
     *** True Line Result
    -    args.outputs.solids << [args.state.enemy.x, args.state.enemy.y, args.state.enemy.w, args.state.enemy.h, 0, 255, 0] # outputs enemy onto screen (green box)
    -** Processing line: ~    args.outputs.solids << args.state.enemy.hammers # outputs enemy's hammers onto screen~
    +     500.to_s
    +** Processing line: ~     the string "500" would be returned.~
     - Inside source: true
     *** True Line Result
    -    args.outputs.solids << args.state.enemy.hammers # outputs enemy's hammers onto screen
    -** Processing line: ~  end~
    +     the string "500" would be returned.
    +** Processing line: ~     Similar to to_i, which returns an integer representation of an object.~
     - Inside source: true
     *** True Line Result
    -  end
    +     Similar to to_i, which returns an integer representation of an object.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # Performs calculations to move objects on the screen~
    -- Inside source: true
    -*** True Line Result
    -  # Performs calculations to move objects on the screen
    -** Processing line: ~  def calc args~
    +** Processing line: ~   - elapsed_time: How many frames have passed since the click event.~
     - Inside source: true
     *** True Line Result
    -  def calc args
    +   - elapsed_time: How many frames have passed since the click event.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Since velocity is the change in position, the change in x increases by dx. Same with y and dy.~
    +** Processing line: ~   - args.outputs.labels: An array. Values in the array generate labels on the screen.~
     - Inside source: true
     *** True Line Result
    -    # Since velocity is the change in position, the change in x increases by dx. Same with y and dy.
    -** Processing line: ~    args.state.player.x  += args.state.player.dx~
    +   - args.outputs.labels: An array. Values in the array generate labels on the screen.
    +** Processing line: ~     The parameters are: [X, Y, TEXT, SIZE, ALIGN, RED, GREEN, BLUE, ALPHA, FONT STYLE]~
     - Inside source: true
     *** True Line Result
    -    args.state.player.x  += args.state.player.dx
    -** Processing line: ~    args.state.player.y  += args.state.player.dy~
    +     The parameters are: [X, Y, TEXT, SIZE, ALIGN, RED, GREEN, BLUE, ALPHA, FONT STYLE]
    +** Processing line: ~     For more information about labels, go to mygame/documentation/02-labels.md.~
     - Inside source: true
     *** True Line Result
    -    args.state.player.y  += args.state.player.dy
    +     For more information about labels, go to mygame/documentation/02-labels.md.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Since acceleration is the change in velocity, the change in y (dy) increases every frame~
    +** Processing line: ~   - inputs.mouse.down: Determines whether or not the mouse is being pressed down.~
     - Inside source: true
     *** True Line Result
    -    # Since acceleration is the change in velocity, the change in y (dy) increases every frame
    -** Processing line: ~    args.state.player.dy += args.state.gravity~
    +   - inputs.mouse.down: Determines whether or not the mouse is being pressed down.
    +** Processing line: ~     The position of the mouse when it is pressed down can be found using inputs.mouse.down.point.(x|y).~
     - Inside source: true
     *** True Line Result
    -    args.state.player.dy += args.state.gravity
    +     The position of the mouse when it is pressed down can be found using inputs.mouse.down.point.(x|y).
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # player's y position is either current y position or y position of top of~
    -- Inside source: true
    -*** True Line Result
    -    # player's y position is either current y position or y position of top of
    -** Processing line: ~    # bridge, whichever has a greater value~
    -- Inside source: true
    -*** True Line Result
    -    # bridge, whichever has a greater value
    -** Processing line: ~    # ensures that the player never goes below the bridge~
    -- Inside source: true
    -*** True Line Result
    -    # ensures that the player never goes below the bridge
    -** Processing line: ~    args.state.player.y  = args.state.player.y.greater(args.state.bridge_top)~
    +** Processing line: ~   - first: Returns the first element of the array.~
     - Inside source: true
     *** True Line Result
    -    args.state.player.y  = args.state.player.y.greater(args.state.bridge_top)
    +   - first: Returns the first element of the array.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # player's x position is either the current x position or 0, whichever has a greater value~
    +** Processing line: ~   - num1.idiv(num2): Divides two numbers and returns an integer.~
     - Inside source: true
     *** True Line Result
    -    # player's x position is either the current x position or 0, whichever has a greater value
    -** Processing line: ~    # ensures that the player doesn't go too far left (out of the screen's scope)~
    +   - num1.idiv(num2): Divides two numbers and returns an integer.
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    # ensures that the player doesn't go too far left (out of the screen's scope)
    -** Processing line: ~    args.state.player.x  = args.state.player.x.greater(0)~
    +
    +** Processing line: ~   - find_all: Finds all values that satisfy specific requirements.~
     - Inside source: true
     *** True Line Result
    -    args.state.player.x  = args.state.player.x.greater(0)
    +   - find_all: Finds all values that satisfy specific requirements.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # player is not falling if it is located on the top of the bridge~
    +** Processing line: ~   - ARRAY#intersect_rect?: Returns true or false depending on if two rectangles intersect.~
     - Inside source: true
     *** True Line Result
    -    # player is not falling if it is located on the top of the bridge
    -** Processing line: ~    args.state.player.falling = false if args.state.player.y == args.state.bridge_top~
    +   - ARRAY#intersect_rect?: Returns true or false depending on if two rectangles intersect.
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    args.state.player.falling = false if args.state.player.y == args.state.bridge_top
    -** Processing line: ~    args.state.player.rect = [args.state.player.x, args.state.player.y, args.state.player.h, args.state.player.w] # sets definition for player~
    +
    +** Processing line: ~   - reject: Removes elements from a collection if they meet certain requirements.~
     - Inside source: true
     *** True Line Result
    -    args.state.player.rect = [args.state.player.x, args.state.player.y, args.state.player.h, args.state.player.w] # sets definition for player
    +   - reject: Removes elements from a collection if they meet certain requirements.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    args.state.enemy.x += args.state.enemy.dx # velocity; change in x increases by dx~
    +** Processing line: ~   - String interpolation: Uses #{} syntax; everything between the #{ and the } is evaluated~
     - Inside source: true
     *** True Line Result
    -    args.state.enemy.x += args.state.enemy.dx # velocity; change in x increases by dx
    -** Processing line: ~    args.state.enemy.y += args.state.enemy.dy # same with y and dy~
    +   - String interpolation: Uses #{} syntax; everything between the #{ and the } is evaluated
    +** Processing line: ~     as Ruby code, and the placeholder is replaced with its corresponding value or result.~
     - Inside source: true
     *** True Line Result
    -    args.state.enemy.y += args.state.enemy.dy # same with y and dy
    +     as Ruby code, and the placeholder is replaced with its corresponding value or result.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # ensures that the enemy never goes below the bridge~
    -- Inside source: true
    -*** True Line Result
    -    # ensures that the enemy never goes below the bridge
    -** Processing line: ~    args.state.enemy.y  = args.state.enemy.y.greater(args.state.bridge_top)~
    +** Processing line: ~  =end~
     - Inside source: true
     *** True Line Result
    -    args.state.enemy.y  = args.state.enemy.y.greater(args.state.bridge_top)
    +  =end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # ensures that the enemy never goes too far left (outside the screen's scope)~
    -- Inside source: true
    -*** True Line Result
    -    # ensures that the enemy never goes too far left (outside the screen's scope)
    -** Processing line: ~    args.state.enemy.x  = args.state.enemy.x.greater(0)~
    +** Processing line: ~  MAP_FILE_PATH = 'app/map.txt' # the map.txt file in the app folder contains exported map~
     - Inside source: true
     *** True Line Result
    -    args.state.enemy.x  = args.state.enemy.x.greater(0)
    +  MAP_FILE_PATH = 'app/map.txt' # the map.txt file in the app folder contains exported map
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # objects that go up must come down because of gravity~
    +** Processing line: ~  class MetroidvaniaStarter~
     - Inside source: true
     *** True Line Result
    -    # objects that go up must come down because of gravity
    -** Processing line: ~    args.state.enemy.dy += args.state.gravity~
    +  class MetroidvaniaStarter
    +** Processing line: ~    attr_accessor :grid, :inputs, :state, :outputs, :gtk~
     - Inside source: true
     *** True Line Result
    -    args.state.enemy.dy += args.state.gravity
    +    attr_accessor :grid, :inputs, :state, :outputs, :gtk
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    args.state.enemy.y  = args.state.enemy.y.greater(args.state.bridge_top)~
    +** Processing line: ~    # Calls methods needed to run the game properly.~
     - Inside source: true
     *** True Line Result
    -    args.state.enemy.y  = args.state.enemy.y.greater(args.state.bridge_top)
    -** Processing line: ~~
    +    # Calls methods needed to run the game properly.
    +** Processing line: ~    def tick~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    #sets definition of enemy~
    +    def tick
    +** Processing line: ~      defaults~
     - Inside source: true
     *** True Line Result
    -    #sets definition of enemy
    -** Processing line: ~    args.state.enemy.rect = [args.state.enemy.x, args.state.enemy.y, args.state.enemy.h, args.state.enemy.w]~
    +      defaults
    +** Processing line: ~      render~
     - Inside source: true
     *** True Line Result
    -    args.state.enemy.rect = [args.state.enemy.x, args.state.enemy.y, args.state.enemy.h, args.state.enemy.w]
    -** Processing line: ~~
    +      render
    +** Processing line: ~      calc~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    if args.state.enemy.y == args.state.bridge_top # if enemy is located on the top of the bridge~
    -- Inside source: true
    -*** True Line Result
    -    if args.state.enemy.y == args.state.bridge_top # if enemy is located on the top of the bridge
    -** Processing line: ~      args.state.enemy.dy = 0 # there is no change in y~
    +      calc
    +** Processing line: ~      process_inputs~
     - Inside source: true
     *** True Line Result
    -      args.state.enemy.dy = 0 # there is no change in y
    +      process_inputs
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -23448,402 +23795,390 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # if 60 frames have passed and the enemy is not moving vertically~
    -- Inside source: true
    -*** True Line Result
    -    # if 60 frames have passed and the enemy is not moving vertically
    -** Processing line: ~    if args.state.tick_count.mod_zero?(args.state.enemy_jump_interval) && args.state.enemy.dy == 0~
    +** Processing line: ~    # Sets all the default variables.~
     - Inside source: true
     *** True Line Result
    -    if args.state.tick_count.mod_zero?(args.state.enemy_jump_interval) && args.state.enemy.dy == 0
    -** Processing line: ~      args.state.enemy.dy = args.state.enemy_jump_power # the enemy jumps up~
    +    # Sets all the default variables.
    +** Processing line: ~    # '||' states that initialization occurs only in the first frame.~
     - Inside source: true
     *** True Line Result
    -      args.state.enemy.dy = args.state.enemy_jump_power # the enemy jumps up
    -** Processing line: ~    end~
    +    # '||' states that initialization occurs only in the first frame.
    +** Processing line: ~    def defaults~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +    def defaults
    +** Processing line: ~      state.tile_size                = 64~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # if 40 frames have passed or 5 frames have passed since the game ended~
    +      state.tile_size                = 64
    +** Processing line: ~      state.gravity                  = -0.2~
     - Inside source: true
     *** True Line Result
    -    # if 40 frames have passed or 5 frames have passed since the game ended
    -** Processing line: ~    if args.state.tick_count.mod_zero?(args.state.hammer_throw_interval) || args.state.game_over_at.elapsed_time == 5~
    +      state.gravity                  = -0.2
    +** Processing line: ~      state.player_width             = 60~
     - Inside source: true
     *** True Line Result
    -    if args.state.tick_count.mod_zero?(args.state.hammer_throw_interval) || args.state.game_over_at.elapsed_time == 5
    -** Processing line: ~      # rand will return a number greater than or equal to 0 and less than given variable's value (since max is excluded)~
    +      state.player_width             = 60
    +** Processing line: ~      state.player_height            = 64~
     - Inside source: true
     *** True Line Result
    -      # rand will return a number greater than or equal to 0 and less than given variable's value (since max is excluded)
    -** Processing line: ~      # that is why we're adding 1, to include the max possibility~
    +      state.player_height            = 64
    +** Processing line: ~      state.collision_tolerance      = 0.0~
     - Inside source: true
     *** True Line Result
    -      # that is why we're adding 1, to include the max possibility
    -** Processing line: ~      volley_dx   = (rand(args.state.hammer_launch_power_default) + 1) * -1 # horizontal movement (follow order of operations)~
    +      state.collision_tolerance      = 0.0
    +** Processing line: ~      state.previous_tile_size     ||= state.tile_size~
     - Inside source: true
     *** True Line Result
    -      volley_dx   = (rand(args.state.hammer_launch_power_default) + 1) * -1 # horizontal movement (follow order of operations)
    -** Processing line: ~~
    +      state.previous_tile_size     ||= state.tile_size
    +** Processing line: ~      state.x                      ||= 0~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      # if the horizontal distance between the player and enemy is less than 128 pixels~
    +      state.x                      ||= 0
    +** Processing line: ~      state.y                      ||= 800~
     - Inside source: true
     *** True Line Result
    -      # if the horizontal distance between the player and enemy is less than 128 pixels
    -** Processing line: ~      if (args.state.player.x - args.state.enemy.x).abs < 128~
    +      state.y                      ||= 800
    +** Processing line: ~      state.dy                     ||= 0~
     - Inside source: true
     *** True Line Result
    -      if (args.state.player.x - args.state.enemy.x).abs < 128
    -** Processing line: ~        # the change in x won't be that great since the enemy and player are closer to each other~
    +      state.dy                     ||= 0
    +** Processing line: ~      state.dx                     ||= 0~
     - Inside source: true
     *** True Line Result
    -        # the change in x won't be that great since the enemy and player are closer to each other
    -** Processing line: ~        volley_dx = (rand(args.state.hammer_launch_power_near) + 1) * -1~
    +      state.dx                     ||= 0
    +** Processing line: ~      attempt_load_world_from_file~
     - Inside source: true
     *** True Line Result
    -        volley_dx = (rand(args.state.hammer_launch_power_near) + 1) * -1
    -** Processing line: ~      end~
    +      attempt_load_world_from_file
    +** Processing line: ~      state.world_lookup           ||= { }~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +      state.world_lookup           ||= { }
    +** Processing line: ~      state.world_collision_rects  ||= []~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      # if the horizontal distance between the player and enemy is greater than 300 pixels~
    +      state.world_collision_rects  ||= []
    +** Processing line: ~      state.mode                   ||= :creating # alternates between :creating and :selecting for sprite selection~
     - Inside source: true
     *** True Line Result
    -      # if the horizontal distance between the player and enemy is greater than 300 pixels
    -** Processing line: ~      if (args.state.player.x - args.state.enemy.x).abs > 300~
    +      state.mode                   ||= :creating # alternates between :creating and :selecting for sprite selection
    +** Processing line: ~      state.select_menu            ||= [0, 720, 1280, 720]~
     - Inside source: true
     *** True Line Result
    -      if (args.state.player.x - args.state.enemy.x).abs > 300
    -** Processing line: ~        # change in x will be more drastic since player and enemy are so far apart~
    +      state.select_menu            ||= [0, 720, 1280, 720]
    +** Processing line: ~      #=======================================IMPORTANT=======================================#~
     - Inside source: true
     *** True Line Result
    -        # change in x will be more drastic since player and enemy are so far apart
    -** Processing line: ~        volley_dx = (rand(args.state.hammer_launch_power_far) + 1) * -1 # more drastic change~
    +      #=======================================IMPORTANT=======================================#
    +** Processing line: ~      # When adding sprites, please label them "image1.png", "image2.png", image3".png", etc.~
     - Inside source: true
     *** True Line Result
    -        volley_dx = (rand(args.state.hammer_launch_power_far) + 1) * -1 # more drastic change
    -** Processing line: ~      end~
    +      # When adding sprites, please label them "image1.png", "image2.png", image3".png", etc.
    +** Processing line: ~      # Once you have done that, adjust "state.sprite_quantity" to how many sprites you have.~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +      # Once you have done that, adjust "state.sprite_quantity" to how many sprites you have.
    +** Processing line: ~      #=======================================================================================#~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      (rand(args.state.max_hammers_per_volley) + 1).map_with_index do |i|~
    +      #=======================================================================================#
    +** Processing line: ~      state.sprite_quantity        ||= 20 # IMPORTANT TO ALTER IF SPRITES ADDED IF YOU ADD MORE SPRITES~
     - Inside source: true
     *** True Line Result
    -      (rand(args.state.max_hammers_per_volley) + 1).map_with_index do |i|
    -** Processing line: ~        args.state.enemy.hammer_queue << { # stores hammer values in a hash~
    +      state.sprite_quantity        ||= 20 # IMPORTANT TO ALTER IF SPRITES ADDED IF YOU ADD MORE SPRITES
    +** Processing line: ~      state.sprite_coords          ||= []~
     - Inside source: true
     *** True Line Result
    -        args.state.enemy.hammer_queue << { # stores hammer values in a hash
    -** Processing line: ~          x: args.state.enemy.x,~
    +      state.sprite_coords          ||= []
    +** Processing line: ~      state.banner_coords          ||= [640, 680 + 720]~
     - Inside source: true
     *** True Line Result
    -          x: args.state.enemy.x,
    -** Processing line: ~          w: args.state.hammer_size,~
    +      state.banner_coords          ||= [640, 680 + 720]
    +** Processing line: ~      state.sprite_selected        ||= 1~
     - Inside source: true
     *** True Line Result
    -          w: args.state.hammer_size,
    -** Processing line: ~          h: args.state.hammer_size,~
    +      state.sprite_selected        ||= 1
    +** Processing line: ~      state.map_saved_at           ||= 0~
     - Inside source: true
     *** True Line Result
    -          h: args.state.hammer_size,
    -** Processing line: ~          dx: volley_dx, # change in horizontal position~
    +      state.map_saved_at           ||= 0
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          dx: volley_dx, # change in horizontal position
    -** Processing line: ~          # multiplication operator takes precedence over addition operator~
    +
    +** Processing line: ~      # Sets all the cordinate values for the sprite selection screen into a grid~
     - Inside source: true
     *** True Line Result
    -          # multiplication operator takes precedence over addition operator
    -** Processing line: ~          throw_at: args.state.tick_count + i * args.state.gap_between_hammers~
    +      # Sets all the cordinate values for the sprite selection screen into a grid
    +** Processing line: ~      # Displayed when 's' is pressed by player to access sprites~
     - Inside source: true
     *** True Line Result
    -          throw_at: args.state.tick_count + i * args.state.gap_between_hammers
    -** Processing line: ~        }~
    +      # Displayed when 's' is pressed by player to access sprites
    +** Processing line: ~      if state.sprite_coords == [] # if sprite_coords is an empty array~
     - Inside source: true
     *** True Line Result
    -        }
    -** Processing line: ~      end~
    +      if state.sprite_coords == [] # if sprite_coords is an empty array
    +** Processing line: ~        count = 1~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +        count = 1
    +** Processing line: ~        temp_x = 165 # sets a starting x and y position for display~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +        temp_x = 165 # sets a starting x and y position for display
    +** Processing line: ~        temp_y = 500 + 720~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # add elements from hammer_queue collection to the hammers collection by~
    +        temp_y = 500 + 720
    +** Processing line: ~        state.sprite_quantity.times do # for the number of sprites you have~
     - Inside source: true
     *** True Line Result
    -    # add elements from hammer_queue collection to the hammers collection by
    -** Processing line: ~    # finding all hammers that were thrown before the current frame (have already been thrown)~
    +        state.sprite_quantity.times do # for the number of sprites you have
    +** Processing line: ~          state.sprite_coords += [[temp_x, temp_y, count]] # add element to sprite_coords array~
     - Inside source: true
     *** True Line Result
    -    # finding all hammers that were thrown before the current frame (have already been thrown)
    -** Processing line: ~    args.state.enemy.hammers += args.state.enemy.hammer_queue.find_all do |h|~
    +          state.sprite_coords += [[temp_x, temp_y, count]] # add element to sprite_coords array
    +** Processing line: ~          temp_x += 100 # increment temp_x~
     - Inside source: true
     *** True Line Result
    -    args.state.enemy.hammers += args.state.enemy.hammer_queue.find_all do |h|
    -** Processing line: ~      h[:throw_at] < args.state.tick_count~
    +          temp_x += 100 # increment temp_x
    +** Processing line: ~          count += 1 # increment count~
     - Inside source: true
     *** True Line Result
    -      h[:throw_at] < args.state.tick_count
    -** Processing line: ~    end~
    +          count += 1 # increment count
    +** Processing line: ~          if temp_x > 1280 - (165 + 50) # if exceeding specific horizontal width on screen~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +          if temp_x > 1280 - (165 + 50) # if exceeding specific horizontal width on screen
    +** Processing line: ~            temp_x = 165 # a new row of sprites starts~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    args.state.enemy.hammers.each do |h| # sets values for all hammers in collection~
    +            temp_x = 165 # a new row of sprites starts
    +** Processing line: ~            temp_y -= 75 # new row of sprites starts 75 units lower than the previous row~
     - Inside source: true
     *** True Line Result
    -    args.state.enemy.hammers.each do |h| # sets values for all hammers in collection
    -** Processing line: ~      h[:y]  ||= args.state.enemy.y + 130~
    +            temp_y -= 75 # new row of sprites starts 75 units lower than the previous row
    +** Processing line: ~          end~
     - Inside source: true
     *** True Line Result
    -      h[:y]  ||= args.state.enemy.y + 130
    -** Processing line: ~      h[:dy] ||= args.state.hammer_upward_launch_power~
    +          end
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -      h[:dy] ||= args.state.hammer_upward_launch_power
    -** Processing line: ~      h[:dy]  += args.state.gravity # acceleration is change in gravity~
    +        end
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -      h[:dy]  += args.state.gravity # acceleration is change in gravity
    -** Processing line: ~      h[:x]   += h[:dx] # incremented by change in position~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      h[:x]   += h[:dx] # incremented by change in position
    -** Processing line: ~      h[:y]   += h[:dy]~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      h[:y]   += h[:dy]
    -** Processing line: ~      h[:rect] = [h[:x], h[:y], h[:w], h[:h]] # sets definition of hammer's rect~
    +
    +** Processing line: ~    # Places sprites~
     - Inside source: true
     *** True Line Result
    -      h[:rect] = [h[:x], h[:y], h[:w], h[:h]] # sets definition of hammer's rect
    -** Processing line: ~    end~
    +    # Places sprites
    +** Processing line: ~    def render~
     - Inside source: true
     *** True Line Result
    -    end
    +    def render
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # reject hammers that have been thrown before current frame (have already been thrown)~
    +** Processing line: ~      # Sets the x, y, width, height, and image path for each sprite in the world collection.~
     - Inside source: true
     *** True Line Result
    -    # reject hammers that have been thrown before current frame (have already been thrown)
    -** Processing line: ~    args.state.enemy.hammer_queue = args.state.enemy.hammer_queue.reject do |h|~
    +      # Sets the x, y, width, height, and image path for each sprite in the world collection.
    +** Processing line: ~      outputs.sprites << state.world.map do |x, y, sprite|~
     - Inside source: true
     *** True Line Result
    -    args.state.enemy.hammer_queue = args.state.enemy.hammer_queue.reject do |h|
    -** Processing line: ~      h[:throw_at] < args.state.tick_count~
    +      outputs.sprites << state.world.map do |x, y, sprite|
    +** Processing line: ~        [x * state.tile_size, # multiply by size so grid coordinates; pixel value of location~
     - Inside source: true
     *** True Line Result
    -      h[:throw_at] < args.state.tick_count
    -** Processing line: ~    end~
    +        [x * state.tile_size, # multiply by size so grid coordinates; pixel value of location
    +** Processing line: ~         y * state.tile_size,~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +         y * state.tile_size,
    +** Processing line: ~         state.tile_size,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # any hammers with a y position less than 0 are rejected from the hammers collection~
    +         state.tile_size,
    +** Processing line: ~         state.tile_size,~
     - Inside source: true
     *** True Line Result
    -    # any hammers with a y position less than 0 are rejected from the hammers collection
    -** Processing line: ~    # since they have gone too far down (outside the scope's screen)~
    +         state.tile_size,
    +** Processing line: ~         'sprites/image' + sprite.to_s + '.png'] # uses concatenation to create unique image path~
     - Inside source: true
     *** True Line Result
    -    # since they have gone too far down (outside the scope's screen)
    -** Processing line: ~    args.state.enemy.hammers = args.state.enemy.hammers.reject { |h| h[:y] < 0 }~
    +         'sprites/image' + sprite.to_s + '.png'] # uses concatenation to create unique image path
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    args.state.enemy.hammers = args.state.enemy.hammers.reject { |h| h[:y] < 0 }
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # if there are any hammers that intersect with (or hit) the player,~
    +** Processing line: ~      # Outputs sprite for the player by setting x, y, width, height, and image path~
     - Inside source: true
     *** True Line Result
    -    # if there are any hammers that intersect with (or hit) the player,
    -** Processing line: ~    # the reset_player method is called (so the game can start over)~
    +      # Outputs sprite for the player by setting x, y, width, height, and image path
    +** Processing line: ~      outputs.sprites << [state.x,~
     - Inside source: true
     *** True Line Result
    -    # the reset_player method is called (so the game can start over)
    -** Processing line: ~    if args.state.enemy.hammers.any? { |h| h[:rect].intersect_rect?(args.state.player.rect) }~
    +      outputs.sprites << [state.x,
    +** Processing line: ~                          state.y,~
     - Inside source: true
     *** True Line Result
    -    if args.state.enemy.hammers.any? { |h| h[:rect].intersect_rect?(args.state.player.rect) }
    -** Processing line: ~      reset_player args~
    +                          state.y,
    +** Processing line: ~                          state.player_width,~
     - Inside source: true
     *** True Line Result
    -      reset_player args
    -** Processing line: ~    end~
    +                          state.player_width,
    +** Processing line: ~                          state.player_height,'sprites/player.png']~
     - Inside source: true
     *** True Line Result
    -    end
    +                          state.player_height,'sprites/player.png']
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # if the enemy's rect intersects with (or hits) the player,~
    +** Processing line: ~      # Outputs labels as primitives in top right of the screen~
     - Inside source: true
     *** True Line Result
    -    # if the enemy's rect intersects with (or hits) the player,
    -** Processing line: ~    # the reset_player method is called (so the game can start over)~
    +      # Outputs labels as primitives in top right of the screen
    +** Processing line: ~      outputs.primitives << [920, 700, 'Press \'s\' to access sprites.', 1, 0].label~
     - Inside source: true
     *** True Line Result
    -    # the reset_player method is called (so the game can start over)
    -** Processing line: ~    if args.state.enemy.rect.intersect_rect? args.state.player.rect~
    +      outputs.primitives << [920, 700, 'Press \'s\' to access sprites.', 1, 0].label
    +** Processing line: ~      outputs.primitives << [920, 675, 'Click existing sprite to delete.', 1, 0].label~
     - Inside source: true
     *** True Line Result
    -    if args.state.enemy.rect.intersect_rect? args.state.player.rect
    -** Processing line: ~      reset_player args~
    +      outputs.primitives << [920, 675, 'Click existing sprite to delete.', 1, 0].label
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      reset_player args
    -** Processing line: ~    end~
    +
    +** Processing line: ~      outputs.primitives << [920, 640, '<- and -> to move.', 1, 0].label~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~  end~
    +      outputs.primitives << [920, 640, '<- and -> to move.', 1, 0].label
    +** Processing line: ~      outputs.primitives << [920, 615, 'Press and hold space to jump.', 1, 0].label~
     - Inside source: true
     *** True Line Result
    -  end
    +      outputs.primitives << [920, 615, 'Press and hold space to jump.', 1, 0].label
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # Resets the player by changing its properties back to the values they had at initialization~
    -- Inside source: true
    -*** True Line Result
    -  # Resets the player by changing its properties back to the values they had at initialization
    -** Processing line: ~  def reset_player args~
    +** Processing line: ~      outputs.primitives << [920, 580, 'Press \'e\' to export current map.', 1, 0].label~
     - Inside source: true
     *** True Line Result
    -  def reset_player args
    -** Processing line: ~    args.state.player.x = 0~
    +      outputs.primitives << [920, 580, 'Press \'e\' to export current map.', 1, 0].label
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    args.state.player.x = 0
    -** Processing line: ~    args.state.player.y = args.state.bridge_top~
    +
    +** Processing line: ~      # if the map is saved and less than 120 frames have passed, the label is displayed~
     - Inside source: true
     *** True Line Result
    -    args.state.player.y = args.state.bridge_top
    -** Processing line: ~    args.state.player.dy = 0~
    +      # if the map is saved and less than 120 frames have passed, the label is displayed
    +** Processing line: ~      if state.map_saved_at > 0 && state.map_saved_at.elapsed_time < 120~
     - Inside source: true
     *** True Line Result
    -    args.state.player.dy = 0
    -** Processing line: ~    args.state.player.dx = 0~
    +      if state.map_saved_at > 0 && state.map_saved_at.elapsed_time < 120
    +** Processing line: ~        outputs.primitives << [920, 555, 'Map has been exported!', 1, 0, 50, 100, 50].label~
     - Inside source: true
     *** True Line Result
    -    args.state.player.dx = 0
    -** Processing line: ~    args.state.enemy.hammers.clear # empties hammer collection~
    +        outputs.primitives << [920, 555, 'Map has been exported!', 1, 0, 50, 100, 50].label
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    args.state.enemy.hammers.clear # empties hammer collection
    -** Processing line: ~    args.state.enemy.hammer_queue.clear # empties hammer_queue~
    +      end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    args.state.enemy.hammer_queue.clear # empties hammer_queue
    -** Processing line: ~    args.state.game_over_at = args.state.tick_count # game_over_at set to current frame (or passage of time)~
    +
    +** Processing line: ~      # If player hits 's', following appears~
     - Inside source: true
     *** True Line Result
    -    args.state.game_over_at = args.state.tick_count # game_over_at set to current frame (or passage of time)
    -** Processing line: ~  end~
    +      # If player hits 's', following appears
    +** Processing line: ~      if state.mode == :selecting~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +      if state.mode == :selecting
    +** Processing line: ~        # White background for sprite selection~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  # Processes input from the user to move the player~
    +        # White background for sprite selection
    +** Processing line: ~        outputs.primitives << [state.select_menu, 255, 255, 255].solid~
     - Inside source: true
     *** True Line Result
    -  # Processes input from the user to move the player
    -** Processing line: ~  def input args~
    +        outputs.primitives << [state.select_menu, 255, 255, 255].solid
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  def input args
    -** Processing line: ~    if args.inputs.keyboard.space # if the user presses the space bar~
    +
    +** Processing line: ~        # Select tile label at the top of the screen~
     - Inside source: true
     *** True Line Result
    -    if args.inputs.keyboard.space # if the user presses the space bar
    -** Processing line: ~      args.state.player.jumped_at ||= args.state.tick_count # jumped_at is set to current frame~
    +        # Select tile label at the top of the screen
    +** Processing line: ~        outputs.primitives << [state.banner_coords.x, state.banner_coords.y, "Select Sprite (sprites located in \"sprites\" folder)", 10, 1, 0, 0, 0, 255].label~
     - Inside source: true
     *** True Line Result
    -      args.state.player.jumped_at ||= args.state.tick_count # jumped_at is set to current frame
    +        outputs.primitives << [state.banner_coords.x, state.banner_coords.y, "Select Sprite (sprites located in \"sprites\" folder)", 10, 1, 0, 0, 0, 255].label
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      # if the time that has passed since the jump is less than the player's jump duration and~
    +** Processing line: ~        # Places sprites in locations calculated in the defaults function~
     - Inside source: true
     *** True Line Result
    -      # if the time that has passed since the jump is less than the player's jump duration and
    -** Processing line: ~      # the player is not falling~
    +        # Places sprites in locations calculated in the defaults function
    +** Processing line: ~        outputs.primitives << state.sprite_coords.map do |x, y, order|~
     - Inside source: true
     *** True Line Result
    -      # the player is not falling
    -** Processing line: ~      if args.state.player.jumped_at.elapsed_time < args.state.player_jump_power_duration && !args.state.player.falling~
    +        outputs.primitives << state.sprite_coords.map do |x, y, order|
    +** Processing line: ~          [x, y, 50, 50, 'sprites/image' + order.to_s + ".png"].sprite~
     - Inside source: true
     *** True Line Result
    -      if args.state.player.jumped_at.elapsed_time < args.state.player_jump_power_duration && !args.state.player.falling
    -** Processing line: ~        args.state.player.dy = args.state.player_jump_power # change in y is set to power of player's jump~
    +          [x, y, 50, 50, 'sprites/image' + order.to_s + ".png"].sprite
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -        args.state.player.dy = args.state.player_jump_power # change in y is set to power of player's jump
    +        end
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
           end
    -** Processing line: ~    end~
    -- Inside source: true
    -*** True Line Result
    -    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # if the space bar is in the "up" state (or not being pressed down)~
    +** Processing line: ~      # Creates sprite following mouse to help indicate which sprite you have selected~
     - Inside source: true
     *** True Line Result
    -    # if the space bar is in the "up" state (or not being pressed down)
    -** Processing line: ~    if args.inputs.keyboard.key_up.space~
    +      # Creates sprite following mouse to help indicate which sprite you have selected
    +** Processing line: ~      # 10 is subtracted from the mouse's x position so that the sprite is not covered by the mouse icon~
     - Inside source: true
     *** True Line Result
    -    if args.inputs.keyboard.key_up.space
    -** Processing line: ~      args.state.player.jumped_at = nil # jumped_at is empty~
    +      # 10 is subtracted from the mouse's x position so that the sprite is not covered by the mouse icon
    +** Processing line: ~      outputs.primitives << [inputs.mouse.position.x - 10, inputs.mouse.position.y,~
     - Inside source: true
     *** True Line Result
    -      args.state.player.jumped_at = nil # jumped_at is empty
    -** Processing line: ~      args.state.player.falling = true # the player is falling~
    +      outputs.primitives << [inputs.mouse.position.x - 10, inputs.mouse.position.y,
    +** Processing line: ~                             10, 10, 'sprites/image' + state.sprite_selected.to_s + ".png"].sprite~
     - Inside source: true
     *** True Line Result
    -      args.state.player.falling = true # the player is falling
    +                             10, 10, 'sprites/image' + state.sprite_selected.to_s + ".png"].sprite
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -23852,370 +24187,338 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    if args.inputs.keyboard.left # if left key is pressed~
    -- Inside source: true
    -*** True Line Result
    -    if args.inputs.keyboard.left # if left key is pressed
    -** Processing line: ~      args.state.player.dx -= args.state.player_acceleration # dx decreases by acceleration (player goes left)~
    +** Processing line: ~    # Calls methods that perform calculations~
     - Inside source: true
     *** True Line Result
    -      args.state.player.dx -= args.state.player_acceleration # dx decreases by acceleration (player goes left)
    -** Processing line: ~      # dx is either set to current dx or the negative max run speed (which would be -10),~
    +    # Calls methods that perform calculations
    +** Processing line: ~    def calc~
     - Inside source: true
     *** True Line Result
    -      # dx is either set to current dx or the negative max run speed (which would be -10),
    -** Processing line: ~      # whichever has a greater value~
    +    def calc
    +** Processing line: ~      calc_in_game~
     - Inside source: true
     *** True Line Result
    -      # whichever has a greater value
    -** Processing line: ~      args.state.player.dx = args.state.player.dx.greater(-args.state.player_max_run_speed)~
    +      calc_in_game
    +** Processing line: ~      calc_sprite_selection~
     - Inside source: true
     *** True Line Result
    -      args.state.player.dx = args.state.player.dx.greater(-args.state.player_max_run_speed)
    -** Processing line: ~    elsif args.inputs.keyboard.right # if right key is pressed~
    +      calc_sprite_selection
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    elsif args.inputs.keyboard.right # if right key is pressed
    -** Processing line: ~      args.state.player.dx += args.state.player_acceleration # dx increases by acceleration (player goes right)~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      args.state.player.dx += args.state.player_acceleration # dx increases by acceleration (player goes right)
    -** Processing line: ~      # dx is either set to current dx or max run speed (which would be 10),~
    +
    +** Processing line: ~    # Calls methods that perform calculations (if in creating mode)~
     - Inside source: true
     *** True Line Result
    -      # dx is either set to current dx or max run speed (which would be 10),
    -** Processing line: ~      # whichever has a lesser value~
    +    # Calls methods that perform calculations (if in creating mode)
    +** Processing line: ~    def calc_in_game~
     - Inside source: true
     *** True Line Result
    -      # whichever has a lesser value
    -** Processing line: ~      args.state.player.dx = args.state.player.dx.lesser(args.state.player_max_run_speed)~
    +    def calc_in_game
    +** Processing line: ~      return unless state.mode == :creating~
     - Inside source: true
     *** True Line Result
    -      args.state.player.dx = args.state.player.dx.lesser(args.state.player_max_run_speed)
    -** Processing line: ~    else~
    +      return unless state.mode == :creating
    +** Processing line: ~      calc_world_lookup~
     - Inside source: true
     *** True Line Result
    -    else
    -** Processing line: ~      args.state.player.dx *= args.state.player_speed_slowdown_rate # dx is scaled down~
    +      calc_world_lookup
    +** Processing line: ~      calc_player~
     - Inside source: true
     *** True Line Result
    -      args.state.player.dx *= args.state.player_speed_slowdown_rate # dx is scaled down
    +      calc_player
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
         end
    -** Processing line: ~  end~
    -- Inside source: true
    -*** True Line Result
    -  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def tick_instructions args, text, y = 715~
    -- Inside source: true
    -*** True Line Result
    -  def tick_instructions args, text, y = 715
    -** Processing line: ~    return if args.state.key_event_occurred~
    +** Processing line: ~    def calc_world_lookup~
     - Inside source: true
     *** True Line Result
    -    return if args.state.key_event_occurred
    -** Processing line: ~    if args.inputs.mouse.click ||~
    +    def calc_world_lookup
    +** Processing line: ~      # If the tile size isn't equal to the previous tile size,~
     - Inside source: true
     *** True Line Result
    -    if args.inputs.mouse.click ||
    -** Processing line: ~       args.inputs.keyboard.directional_vector ||~
    +      # If the tile size isn't equal to the previous tile size,
    +** Processing line: ~      # the previous tile size is set to the tile size,~
     - Inside source: true
     *** True Line Result
    -       args.inputs.keyboard.directional_vector ||
    -** Processing line: ~       args.inputs.keyboard.key_down.enter ||~
    +      # the previous tile size is set to the tile size,
    +** Processing line: ~      # and world_lookup hash is set to empty.~
     - Inside source: true
     *** True Line Result
    -       args.inputs.keyboard.key_down.enter ||
    -** Processing line: ~       args.inputs.keyboard.key_down.space ||~
    +      # and world_lookup hash is set to empty.
    +** Processing line: ~      if state.tile_size != state.previous_tile_size~
     - Inside source: true
     *** True Line Result
    -       args.inputs.keyboard.key_down.space ||
    -** Processing line: ~       args.inputs.keyboard.key_down.escape~
    +      if state.tile_size != state.previous_tile_size
    +** Processing line: ~        state.previous_tile_size = state.tile_size~
     - Inside source: true
     *** True Line Result
    -       args.inputs.keyboard.key_down.escape
    -** Processing line: ~      args.state.key_event_occurred = true~
    +        state.previous_tile_size = state.tile_size
    +** Processing line: ~        state.world_lookup = {}~
     - Inside source: true
     *** True Line Result
    -      args.state.key_event_occurred = true
    -** Processing line: ~    end~
    +        state.world_lookup = {}
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    end
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    args.outputs.debug << [0, y - 50, 1280, 60].solid~
    -- Inside source: true
    -*** True Line Result
    -    args.outputs.debug << [0, y - 50, 1280, 60].solid
    -** Processing line: ~    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label~
    +** Processing line: ~      # return if world_lookup is not empty or if world is empty~
     - Inside source: true
     *** True Line Result
    -    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label
    -** Processing line: ~    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label~
    +      # return if world_lookup is not empty or if world is empty
    +** Processing line: ~      return if state.world_lookup.keys.length > 0~
     - Inside source: true
     *** True Line Result
    -    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label
    -** Processing line: ~  end~
    +      return if state.world_lookup.keys.length > 0
    +** Processing line: ~      return unless state.world.length > 0~
     - Inside source: true
     *** True Line Result
    -  end
    +      return unless state.world.length > 0
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~#+end_src~
    -- Line was identified as the end of a code block.
    -*** True Line Result
    -#+end_src
    -** Processing line: ~~
    -- End of paragraph detected.
    +** Processing line: ~      # Searches through the world and finds the coordinates that exist~
    +- Inside source: true
     *** True Line Result
    -
    -** Processing line: ~*** Physics And Collisions - Entities - main.rb~
    -- Header detected.
    +      # Searches through the world and finds the coordinates that exist
    +** Processing line: ~      state.world_lookup = {}~
    +- Inside source: true
     *** True Line Result
    -
    +      state.world_lookup = {}
    +** Processing line: ~      state.world.each { |x, y| state.world_lookup[[x, y]] = true }~
    +- Inside source: true
     *** True Line Result
    -*** Physics And Collisions - Entities - main.rb
    -** Processing line: ~#+begin_src ruby~
    -- Line was identified as the beginning of a code block.
    +      state.world.each { |x, y| state.world_lookup[[x, y]] = true }
    +** Processing line: ~~
    +- Inside source: true
     *** True Line Result
     
    -*** True Line Result
    -#+begin_src ruby
    -** Processing line: ~  # ./samples/04_physics_and_collisions/03_entities/app/main.rb~
    +** Processing line: ~      # Assigns collision rects for every sprite drawn~
     - Inside source: true
     *** True Line Result
    -  # ./samples/04_physics_and_collisions/03_entities/app/main.rb
    -** Processing line: ~  =begin~
    +      # Assigns collision rects for every sprite drawn
    +** Processing line: ~      state.world_collision_rects =~
     - Inside source: true
     *** True Line Result
    -  =begin
    -** Processing line: ~~
    +      state.world_collision_rects =
    +** Processing line: ~        state.world_lookup~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   Reminders:~
    +        state.world_lookup
    +** Processing line: ~             .keys~
     - Inside source: true
     *** True Line Result
    -   Reminders:
    -** Processing line: ~~
    +             .keys
    +** Processing line: ~             .map do |coord_x, coord_y|~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   - map: Ruby method used to transform data; used in arrays, hashes, and collections.~
    +             .map do |coord_x, coord_y|
    +** Processing line: ~               s = state.tile_size~
     - Inside source: true
     *** True Line Result
    -   - map: Ruby method used to transform data; used in arrays, hashes, and collections.
    -** Processing line: ~     Can be used to perform an action on every element of a collection, such as multiplying~
    +               s = state.tile_size
    +** Processing line: ~               # Multiplying by s (the size of a tile) ensures that the rect is~
     - Inside source: true
     *** True Line Result
    -     Can be used to perform an action on every element of a collection, such as multiplying
    -** Processing line: ~     each element by 2 or declaring every element as a new entity.~
    +               # Multiplying by s (the size of a tile) ensures that the rect is
    +** Processing line: ~               # placed exactly where you want it to be placed (causes grid to coordinate)~
     - Inside source: true
     *** True Line Result
    -     each element by 2 or declaring every element as a new entity.
    -** Processing line: ~~
    +               # placed exactly where you want it to be placed (causes grid to coordinate)
    +** Processing line: ~               # How many pixels horizontally across and vertically up and down~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   - reject: Removes elements from a collection if they meet certain requirements.~
    +               # How many pixels horizontally across and vertically up and down
    +** Processing line: ~               x = s * coord_x~
     - Inside source: true
     *** True Line Result
    -   - reject: Removes elements from a collection if they meet certain requirements.
    -** Processing line: ~     For example, you can derive an array of odd numbers from an original array of~
    +               x = s * coord_x
    +** Processing line: ~               y = s * coord_y~
     - Inside source: true
     *** True Line Result
    -     For example, you can derive an array of odd numbers from an original array of
    -** Processing line: ~     numbers 1 through 10 by rejecting all elements that are even (or divisible by 2).~
    +               y = s * coord_y
    +** Processing line: ~               {~
     - Inside source: true
     *** True Line Result
    -     numbers 1 through 10 by rejecting all elements that are even (or divisible by 2).
    -** Processing line: ~~
    +               {
    +** Processing line: ~                 args:       [coord_x, coord_y],~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   - args.state.new_entity: Used when we want to create a new object, like a sprite or button.~
    +                 args:       [coord_x, coord_y],
    +** Processing line: ~                 left_right: [x,     y + 4, s,     s - 6], # hash keys and values~
     - Inside source: true
     *** True Line Result
    -   - args.state.new_entity: Used when we want to create a new object, like a sprite or button.
    -** Processing line: ~     In this sample app, new_entity is used to define the properties of enemies and bullets.~
    +                 left_right: [x,     y + 4, s,     s - 6], # hash keys and values
    +** Processing line: ~                 top:        [x + 4, y + 6, s - 8, s - 6],~
     - Inside source: true
     *** True Line Result
    -     In this sample app, new_entity is used to define the properties of enemies and bullets.
    -** Processing line: ~     (Remember, you can use state to define ANY property and it will be retained across frames.)~
    +                 top:        [x + 4, y + 6, s - 8, s - 6],
    +** Processing line: ~                 bottom:     [x + 1, y - 1, s - 2, s - 8],~
     - Inside source: true
     *** True Line Result
    -     (Remember, you can use state to define ANY property and it will be retained across frames.)
    -** Processing line: ~~
    +                 bottom:     [x + 1, y - 1, s - 2, s - 8],
    +** Processing line: ~               }~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   - args.outputs.labels: An array. The values generate a label on the screen.~
    +               }
    +** Processing line: ~             end~
     - Inside source: true
     *** True Line Result
    -   - args.outputs.labels: An array. The values generate a label on the screen.
    -** Processing line: ~     The parameters are [X, Y, TEXT, SIZE, ALIGN, RED, GREEN, BLUE, ALPHA, FONT STYLE]~
    +             end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -     The parameters are [X, Y, TEXT, SIZE, ALIGN, RED, GREEN, BLUE, ALPHA, FONT STYLE]
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~   - ARRAY#intersect_rect?: Returns true or false depending on if the two rectangles intersect.~
    +** Processing line: ~    # Calculates movement of player and calls methods that perform collision calculations~
     - Inside source: true
     *** True Line Result
    -   - ARRAY#intersect_rect?: Returns true or false depending on if the two rectangles intersect.
    -** Processing line: ~~
    +    # Calculates movement of player and calls methods that perform collision calculations
    +** Processing line: ~    def calc_player~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   - args.inputs.mouse.click.point.(x|y): The x and y location of the mouse.~
    +    def calc_player
    +** Processing line: ~      state.dy += state.gravity  # what goes up must come down because of gravity~
     - Inside source: true
     *** True Line Result
    -   - args.inputs.mouse.click.point.(x|y): The x and y location of the mouse.
    -** Processing line: ~~
    +      state.dy += state.gravity  # what goes up must come down because of gravity
    +** Processing line: ~      calc_box_collision~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  =end~
    +      calc_box_collision
    +** Processing line: ~      calc_edge_collision~
     - Inside source: true
     *** True Line Result
    -  =end
    -** Processing line: ~~
    +      calc_edge_collision
    +** Processing line: ~      state.y  += state.dy       # Since velocity is the change in position, the change in y increases by dy~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  # This sample app shows enemies that contain an id value and the time they were created.~
    +      state.y  += state.dy       # Since velocity is the change in position, the change in y increases by dy
    +** Processing line: ~      state.x  += state.dx       # Ditto line above but dx and x~
     - Inside source: true
     *** True Line Result
    -  # This sample app shows enemies that contain an id value and the time they were created.
    -** Processing line: ~  # These enemies can be removed by shooting at them with bullets.~
    +      state.x  += state.dx       # Ditto line above but dx and x
    +** Processing line: ~      state.dx *= 0.8            # Scales dx down~
     - Inside source: true
     *** True Line Result
    -  # These enemies can be removed by shooting at them with bullets.
    +      state.dx *= 0.8            # Scales dx down
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # Calls all methods necessary for the game to function properly.~
    +** Processing line: ~    # Calls methods that determine whether the player collides with any world_collision_rects.~
     - Inside source: true
     *** True Line Result
    -  # Calls all methods necessary for the game to function properly.
    -** Processing line: ~  def tick args~
    +    # Calls methods that determine whether the player collides with any world_collision_rects.
    +** Processing line: ~    def calc_box_collision~
     - Inside source: true
     *** True Line Result
    -  def tick args
    -** Processing line: ~    tick_instructions args, "Sample app shows how to use args.state.new_entity along with collisions. CLICK to shoot a bullet."~
    +    def calc_box_collision
    +** Processing line: ~      return unless state.world_lookup.keys.length > 0 # return unless hash has atleast 1 key~
     - Inside source: true
     *** True Line Result
    -    tick_instructions args, "Sample app shows how to use args.state.new_entity along with collisions. CLICK to shoot a bullet."
    -** Processing line: ~    defaults args~
    +      return unless state.world_lookup.keys.length > 0 # return unless hash has atleast 1 key
    +** Processing line: ~      collision_floor~
     - Inside source: true
     *** True Line Result
    -    defaults args
    -** Processing line: ~    render args~
    +      collision_floor
    +** Processing line: ~      collision_left~
     - Inside source: true
     *** True Line Result
    -    render args
    -** Processing line: ~    calc args~
    +      collision_left
    +** Processing line: ~      collision_right~
     - Inside source: true
     *** True Line Result
    -    calc args
    -** Processing line: ~    process_inputs args~
    +      collision_right
    +** Processing line: ~      collision_ceiling~
     - Inside source: true
     *** True Line Result
    -    process_inputs args
    -** Processing line: ~  end~
    +      collision_ceiling
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  end
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # Sets default values~
    -- Inside source: true
    -*** True Line Result
    -  # Sets default values
    -** Processing line: ~  # Enemies and bullets start off as empty collections~
    -- Inside source: true
    -*** True Line Result
    -  # Enemies and bullets start off as empty collections
    -** Processing line: ~  def defaults args~
    +** Processing line: ~    # Finds collisions between the bottom of the player's rect and the top of a world_collision_rect.~
     - Inside source: true
     *** True Line Result
    -  def defaults args
    -** Processing line: ~    args.state.enemies ||= []~
    +    # Finds collisions between the bottom of the player's rect and the top of a world_collision_rect.
    +** Processing line: ~    def collision_floor~
     - Inside source: true
     *** True Line Result
    -    args.state.enemies ||= []
    -** Processing line: ~    args.state.bullets ||= []~
    +    def collision_floor
    +** Processing line: ~      return unless state.dy <= 0 # return unless player is going down or is as far down as possible~
     - Inside source: true
     *** True Line Result
    -    args.state.bullets ||= []
    -** Processing line: ~  end~
    +      return unless state.dy <= 0 # return unless player is going down or is as far down as possible
    +** Processing line: ~      player_rect = [state.x, next_y, state.tile_size, state.tile_size] # definition of player~
     - Inside source: true
     *** True Line Result
    -  end
    +      player_rect = [state.x, next_y, state.tile_size, state.tile_size] # definition of player
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # Provides each enemy in enemies collection with rectangular border,~
    -- Inside source: true
    -*** True Line Result
    -  # Provides each enemy in enemies collection with rectangular border,
    -** Processing line: ~  # as well as a label showing id and when they were created~
    -- Inside source: true
    -*** True Line Result
    -  # as well as a label showing id and when they were created
    -** Processing line: ~  def render args~
    +** Processing line: ~      # Runs through all the sprites on the field and finds all intersections between player's~
     - Inside source: true
     *** True Line Result
    -  def render args
    -** Processing line: ~    # When you're calling a method that takes no arguments, you can use this & syntax on map.~
    +      # Runs through all the sprites on the field and finds all intersections between player's
    +** Processing line: ~      # bottom and the top of a rect.~
     - Inside source: true
     *** True Line Result
    -    # When you're calling a method that takes no arguments, you can use this & syntax on map.
    -** Processing line: ~    # Numbers are being added to x and y in order to keep the text within the enemy's borders.~
    +      # bottom and the top of a rect.
    +** Processing line: ~      floor_collisions = state.world_collision_rects~
     - Inside source: true
     *** True Line Result
    -    # Numbers are being added to x and y in order to keep the text within the enemy's borders.
    -** Processing line: ~    args.outputs.borders << args.state.enemies.map(&:rect)~
    +      floor_collisions = state.world_collision_rects
    +** Processing line: ~                           .find_all { |r| r[:top].intersect_rect?(player_rect, state.collision_tolerance) }~
     - Inside source: true
     *** True Line Result
    -    args.outputs.borders << args.state.enemies.map(&:rect)
    -** Processing line: ~    args.outputs.labels  << args.state.enemies.flat_map do |enemy|~
    +                           .find_all { |r| r[:top].intersect_rect?(player_rect, state.collision_tolerance) }
    +** Processing line: ~                           .first~
     - Inside source: true
     *** True Line Result
    -    args.outputs.labels  << args.state.enemies.flat_map do |enemy|
    -** Processing line: ~      [~
    +                           .first
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      [
    -** Processing line: ~        [enemy.x + 4, enemy.y + 29, "id: #{enemy.entity_id}", -3, 0],~
    +
    +** Processing line: ~      return unless floor_collisions # performs following changes if a collision has occurred~
     - Inside source: true
     *** True Line Result
    -        [enemy.x + 4, enemy.y + 29, "id: #{enemy.entity_id}", -3, 0],
    -** Processing line: ~        [enemy.x + 4, enemy.y + 17, "created_at: #{enemy.created_at}", -3, 0] # frame enemy was created~
    +      return unless floor_collisions # performs following changes if a collision has occurred
    +** Processing line: ~      state.y = floor_collisions[:top].top # y of player is set to the y of the colliding rect's top~
     - Inside source: true
     *** True Line Result
    -        [enemy.x + 4, enemy.y + 17, "created_at: #{enemy.created_at}", -3, 0] # frame enemy was created
    -** Processing line: ~      ]~
    +      state.y = floor_collisions[:top].top # y of player is set to the y of the colliding rect's top
    +** Processing line: ~      state.dy = 0 # no change in y because the player's path is blocked~
     - Inside source: true
     *** True Line Result
    -      ]
    +      state.dy = 0 # no change in y because the player's path is blocked
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -24224,570 +24527,550 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Outputs bullets in bullets collection as rectangular solids~
    -- Inside source: true
    -*** True Line Result
    -    # Outputs bullets in bullets collection as rectangular solids
    -** Processing line: ~    args.outputs.solids << args.state.bullets.map(&:rect)~
    +** Processing line: ~    # Finds collisions between the player's left side and the right side of a world_collision_rect.~
     - Inside source: true
     *** True Line Result
    -    args.outputs.solids << args.state.bullets.map(&:rect)
    -** Processing line: ~  end~
    +    # Finds collisions between the player's left side and the right side of a world_collision_rect.
    +** Processing line: ~    def collision_left~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +    def collision_left
    +** Processing line: ~      return unless state.dx < 0 # return unless player is moving left~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  # Calls all methods necessary for performing calculations~
    +      return unless state.dx < 0 # return unless player is moving left
    +** Processing line: ~      player_rect = [next_x, state.y, state.tile_size, state.tile_size]~
     - Inside source: true
     *** True Line Result
    -  # Calls all methods necessary for performing calculations
    -** Processing line: ~  def calc args~
    +      player_rect = [next_x, state.y, state.tile_size, state.tile_size]
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  def calc args
    -** Processing line: ~    add_new_enemies_if_needed args~
    +
    +** Processing line: ~      # Runs through all the sprites on the field and finds all intersections between the player's left side~
     - Inside source: true
     *** True Line Result
    -    add_new_enemies_if_needed args
    -** Processing line: ~    move_bullets args~
    +      # Runs through all the sprites on the field and finds all intersections between the player's left side
    +** Processing line: ~      # and the right side of a rect.~
     - Inside source: true
     *** True Line Result
    -    move_bullets args
    -** Processing line: ~    calculate_collisions args~
    +      # and the right side of a rect.
    +** Processing line: ~      left_side_collisions = state.world_collision_rects~
     - Inside source: true
     *** True Line Result
    -    calculate_collisions args
    -** Processing line: ~    remove_bullets_of_screen args~
    +      left_side_collisions = state.world_collision_rects
    +** Processing line: ~                               .find_all { |r| r[:left_right].intersect_rect?(player_rect, state.collision_tolerance) }~
     - Inside source: true
     *** True Line Result
    -    remove_bullets_of_screen args
    -** Processing line: ~  end~
    +                               .find_all { |r| r[:left_right].intersect_rect?(player_rect, state.collision_tolerance) }
    +** Processing line: ~                               .first~
     - Inside source: true
     *** True Line Result
    -  end
    +                               .first
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # Adds enemies to the enemies collection and sets their values~
    +** Processing line: ~      return unless left_side_collisions # return unless collision occurred~
     - Inside source: true
     *** True Line Result
    -  # Adds enemies to the enemies collection and sets their values
    -** Processing line: ~  def add_new_enemies_if_needed args~
    +      return unless left_side_collisions # return unless collision occurred
    +** Processing line: ~      state.x = left_side_collisions[:left_right].right # sets player's x to the x of the colliding rect's right side~
     - Inside source: true
     *** True Line Result
    -  def add_new_enemies_if_needed args
    -** Processing line: ~    return if args.state.enemies.length >= 10 # if 10 or more enemies, enemies are not added~
    +      state.x = left_side_collisions[:left_right].right # sets player's x to the x of the colliding rect's right side
    +** Processing line: ~      state.dx = 0 # no change in x because the player's path is blocked~
     - Inside source: true
     *** True Line Result
    -    return if args.state.enemies.length >= 10 # if 10 or more enemies, enemies are not added
    -** Processing line: ~    return unless args.state.bullets.length == 0 # if user has not yet shot bullet, no enemies are added~
    +      state.dx = 0 # no change in x because the player's path is blocked
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    return unless args.state.bullets.length == 0 # if user has not yet shot bullet, no enemies are added
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    args.state.enemies += (10 - args.state.enemies.length).map do # adds enemies so there are 10 total~
    -- Inside source: true
    -*** True Line Result
    -    args.state.enemies += (10 - args.state.enemies.length).map do # adds enemies so there are 10 total
    -** Processing line: ~      args.state.new_entity(:enemy) do |e| # each enemy is declared as a new entity~
    -- Inside source: true
    -*** True Line Result
    -      args.state.new_entity(:enemy) do |e| # each enemy is declared as a new entity
    -** Processing line: ~        e.x = 640 + 500 * rand # each enemy is given random position on screen~
    -- Inside source: true
    -*** True Line Result
    -        e.x = 640 + 500 * rand # each enemy is given random position on screen
    -** Processing line: ~        e.y = 600 * rand + 50~
    -- Inside source: true
    -*** True Line Result
    -        e.y = 600 * rand + 50
    -** Processing line: ~        e.rect = [e.x, e.y, 130, 30] # sets definition for enemy's rect~
    +** Processing line: ~    # Finds collisions between the right side of the player and the left side of a world_collision_rect.~
     - Inside source: true
     *** True Line Result
    -        e.rect = [e.x, e.y, 130, 30] # sets definition for enemy's rect
    -** Processing line: ~      end~
    +    # Finds collisions between the right side of the player and the left side of a world_collision_rect.
    +** Processing line: ~    def collision_right~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +    def collision_right
    +** Processing line: ~      return unless state.dx > 0 # return unless player is moving right~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~  end~
    +      return unless state.dx > 0 # return unless player is moving right
    +** Processing line: ~      player_rect = [next_x, state.y, state.tile_size, state.tile_size]~
     - Inside source: true
     *** True Line Result
    -  end
    +      player_rect = [next_x, state.y, state.tile_size, state.tile_size]
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # Moves bullets across screen~
    +** Processing line: ~      # Runs through all the sprites on the field and finds all intersections between the  player's~
     - Inside source: true
     *** True Line Result
    -  # Moves bullets across screen
    -** Processing line: ~  # Sets definition of the bullets~
    +      # Runs through all the sprites on the field and finds all intersections between the  player's
    +** Processing line: ~      # right side and the left side of a rect.~
     - Inside source: true
     *** True Line Result
    -  # Sets definition of the bullets
    -** Processing line: ~  def move_bullets args~
    +      # right side and the left side of a rect.
    +** Processing line: ~      right_side_collisions = state.world_collision_rects~
     - Inside source: true
     *** True Line Result
    -  def move_bullets args
    -** Processing line: ~    args.state.bullets.each do |bullet| # perform action on each bullet in collection~
    +      right_side_collisions = state.world_collision_rects
    +** Processing line: ~                                .find_all { |r| r[:left_right].intersect_rect?(player_rect, state.collision_tolerance) }~
     - Inside source: true
     *** True Line Result
    -    args.state.bullets.each do |bullet| # perform action on each bullet in collection
    -** Processing line: ~      bullet.x += bullet.speed # increment x by speed (bullets fly horizontally across screen)~
    +                                .find_all { |r| r[:left_right].intersect_rect?(player_rect, state.collision_tolerance) }
    +** Processing line: ~                                .first~
     - Inside source: true
     *** True Line Result
    -      bullet.x += bullet.speed # increment x by speed (bullets fly horizontally across screen)
    +                                .first
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      # By randomizing the value that increments bullet.y, the bullet does not fly straight up and out~
    -- Inside source: true
    -*** True Line Result
    -      # By randomizing the value that increments bullet.y, the bullet does not fly straight up and out
    -** Processing line: ~      # of the scope of the screen. Try removing what follows bullet.speed, or changing 0.25 to 1.25 to~
    -- Inside source: true
    -*** True Line Result
    -      # of the scope of the screen. Try removing what follows bullet.speed, or changing 0.25 to 1.25 to
    -** Processing line: ~      # see what happens to the bullet's movement.~
    +** Processing line: ~      return unless right_side_collisions # return unless collision occurred~
     - Inside source: true
     *** True Line Result
    -      # see what happens to the bullet's movement.
    -** Processing line: ~      bullet.y += bullet.speed.*(0.25).randomize(:ratio, :sign)~
    +      return unless right_side_collisions # return unless collision occurred
    +** Processing line: ~      state.x = right_side_collisions[:left_right].left - state.tile_size # player's x is set to the x of colliding rect's left side (minus tile size since x is the player's bottom left corner)~
     - Inside source: true
     *** True Line Result
    -      bullet.y += bullet.speed.*(0.25).randomize(:ratio, :sign)
    -** Processing line: ~      bullet.rect = [bullet.x, bullet.y, bullet.size, bullet.size] # sets definition of bullet's rect~
    +      state.x = right_side_collisions[:left_right].left - state.tile_size # player's x is set to the x of colliding rect's left side (minus tile size since x is the player's bottom left corner)
    +** Processing line: ~      state.dx = 0 # no change in x because the player's path is blocked~
     - Inside source: true
     *** True Line Result
    -      bullet.rect = [bullet.x, bullet.y, bullet.size, bullet.size] # sets definition of bullet's rect
    +      state.dx = 0 # no change in x because the player's path is blocked
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
         end
    -** Processing line: ~  end~
    -- Inside source: true
    -*** True Line Result
    -  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # Determines if a bullet hits an enemy~
    -- Inside source: true
    -*** True Line Result
    -  # Determines if a bullet hits an enemy
    -** Processing line: ~  def calculate_collisions args~
    +** Processing line: ~    # Finds collisions between the top of the player's rect and the bottom of a world_collision_rect.~
     - Inside source: true
     *** True Line Result
    -  def calculate_collisions args
    -** Processing line: ~    args.state.bullets.each do |bullet| # perform action on every bullet and enemy in collections~
    +    # Finds collisions between the top of the player's rect and the bottom of a world_collision_rect.
    +** Processing line: ~    def collision_ceiling~
     - Inside source: true
     *** True Line Result
    -    args.state.bullets.each do |bullet| # perform action on every bullet and enemy in collections
    -** Processing line: ~      args.state.enemies.each do |enemy|~
    +    def collision_ceiling
    +** Processing line: ~      return unless state.dy > 0 # return unless player is moving up~
     - Inside source: true
     *** True Line Result
    -      args.state.enemies.each do |enemy|
    -** Processing line: ~        # if bullet has not exploded yet and the bullet hits an enemy~
    +      return unless state.dy > 0 # return unless player is moving up
    +** Processing line: ~      player_rect = [state.x, next_y, state.player_width, state.player_height]~
     - Inside source: true
     *** True Line Result
    -        # if bullet has not exploded yet and the bullet hits an enemy
    -** Processing line: ~        if !bullet.exploded && bullet.rect.intersect_rect?(enemy.rect)~
    +      player_rect = [state.x, next_y, state.player_width, state.player_height]
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        if !bullet.exploded && bullet.rect.intersect_rect?(enemy.rect)
    -** Processing line: ~          bullet.exploded = true # bullet explodes~
    +
    +** Processing line: ~      # Runs through all the sprites on the field and finds all intersections between the player's top~
     - Inside source: true
     *** True Line Result
    -          bullet.exploded = true # bullet explodes
    -** Processing line: ~          enemy.dead = true # enemy is killed~
    +      # Runs through all the sprites on the field and finds all intersections between the player's top
    +** Processing line: ~      # and the bottom of a rect.~
     - Inside source: true
     *** True Line Result
    -          enemy.dead = true # enemy is killed
    -** Processing line: ~        end~
    +      # and the bottom of a rect.
    +** Processing line: ~      ceil_collisions = state.world_collision_rects~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~      end~
    +      ceil_collisions = state.world_collision_rects
    +** Processing line: ~                          .find_all { |r| r[:bottom].intersect_rect?(player_rect, state.collision_tolerance) }~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +                          .find_all { |r| r[:bottom].intersect_rect?(player_rect, state.collision_tolerance) }
    +** Processing line: ~                          .first~
     - Inside source: true
     *** True Line Result
    -    end
    +                          .first
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # All exploded bullets are rejected or removed from the bullets collection~
    -- Inside source: true
    -*** True Line Result
    -    # All exploded bullets are rejected or removed from the bullets collection
    -** Processing line: ~    # and any dead enemy is rejected from the enemies collection.~
    +** Processing line: ~      return unless ceil_collisions # return unless collision occurred~
     - Inside source: true
     *** True Line Result
    -    # and any dead enemy is rejected from the enemies collection.
    -** Processing line: ~    args.state.bullets = args.state.bullets.reject(&:exploded)~
    +      return unless ceil_collisions # return unless collision occurred
    +** Processing line: ~      state.y = ceil_collisions[:bottom].y - state.tile_size # player's y is set to the y of the colliding rect's bottom (minus tile size)~
     - Inside source: true
     *** True Line Result
    -    args.state.bullets = args.state.bullets.reject(&:exploded)
    -** Processing line: ~    args.state.enemies = args.state.enemies.reject(&:dead)~
    +      state.y = ceil_collisions[:bottom].y - state.tile_size # player's y is set to the y of the colliding rect's bottom (minus tile size)
    +** Processing line: ~      state.dy = 0 # no change in y because the player's path is blocked~
     - Inside source: true
     *** True Line Result
    -    args.state.enemies = args.state.enemies.reject(&:dead)
    -** Processing line: ~  end~
    +      state.dy = 0 # no change in y because the player's path is blocked
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  end
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # Bullets are rejected from bullets collection once their position exceeds the width of screen~
    +** Processing line: ~    # Makes sure the player remains within the screen's dimensions.~
     - Inside source: true
     *** True Line Result
    -  # Bullets are rejected from bullets collection once their position exceeds the width of screen
    -** Processing line: ~  def remove_bullets_of_screen args~
    +    # Makes sure the player remains within the screen's dimensions.
    +** Processing line: ~    def calc_edge_collision~
     - Inside source: true
     *** True Line Result
    -  def remove_bullets_of_screen args
    -** Processing line: ~    args.state.bullets = args.state.bullets.reject { |bullet| bullet.x > 1280 } # screen width is 1280~
    +    def calc_edge_collision
    +** Processing line: ~      # Ensures that player doesn't fall below the map~
     - Inside source: true
     *** True Line Result
    -    args.state.bullets = args.state.bullets.reject { |bullet| bullet.x > 1280 } # screen width is 1280
    -** Processing line: ~  end~
    +      # Ensures that player doesn't fall below the map
    +** Processing line: ~      if next_y < 0 && state.dy < 0 # if player is moving down and is about to fall (next_y) below the map's scope~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +      if next_y < 0 && state.dy < 0 # if player is moving down and is about to fall (next_y) below the map's scope
    +** Processing line: ~        state.y = 0 # 0 is the lowest the player can be while staying on the screen~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  # Calls fire_bullet method~
    +        state.y = 0 # 0 is the lowest the player can be while staying on the screen
    +** Processing line: ~        state.dy = 0~
     - Inside source: true
     *** True Line Result
    -  # Calls fire_bullet method
    -** Processing line: ~  def process_inputs args~
    +        state.dy = 0
    +** Processing line: ~      # Ensures player doesn't go insanely high~
     - Inside source: true
     *** True Line Result
    -  def process_inputs args
    -** Processing line: ~    fire_bullet args~
    +      # Ensures player doesn't go insanely high
    +** Processing line: ~      elsif next_y > 720 - state.tile_size && state.dy > 0 # if player is moving up, about to exceed map's scope~
     - Inside source: true
     *** True Line Result
    -    fire_bullet args
    -** Processing line: ~  end~
    +      elsif next_y > 720 - state.tile_size && state.dy > 0 # if player is moving up, about to exceed map's scope
    +** Processing line: ~        state.y = 720 - state.tile_size # if we don't subtract tile_size, we won't be able to see the player on the screen~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +        state.y = 720 - state.tile_size # if we don't subtract tile_size, we won't be able to see the player on the screen
    +** Processing line: ~        state.dy = 0~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  # Once mouse is clicked by the user to fire a bullet, a new bullet is added to bullets collection~
    +        state.dy = 0
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -  # Once mouse is clicked by the user to fire a bullet, a new bullet is added to bullets collection
    -** Processing line: ~  def fire_bullet args~
    +      end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  def fire_bullet args
    -** Processing line: ~    return unless args.inputs.mouse.click # return unless mouse is clicked~
    +
    +** Processing line: ~      # Ensures that player remains in the horizontal range its supposed to~
     - Inside source: true
     *** True Line Result
    -    return unless args.inputs.mouse.click # return unless mouse is clicked
    -** Processing line: ~    args.state.bullets << args.state.new_entity(:bullet) do |bullet| # new bullet is declared a new entity~
    +      # Ensures that player remains in the horizontal range its supposed to
    +** Processing line: ~      if state.x >= 1280 - state.tile_size && state.dx > 0 # if the player is moving too far right~
     - Inside source: true
     *** True Line Result
    -    args.state.bullets << args.state.new_entity(:bullet) do |bullet| # new bullet is declared a new entity
    -** Processing line: ~      bullet.y = args.inputs.mouse.click.point.y # set to the y value of where the mouse was clicked~
    +      if state.x >= 1280 - state.tile_size && state.dx > 0 # if the player is moving too far right
    +** Processing line: ~        state.x = 1280 - state.tile_size # farthest right the player can be while remaining in the screen's scope~
     - Inside source: true
     *** True Line Result
    -      bullet.y = args.inputs.mouse.click.point.y # set to the y value of where the mouse was clicked
    -** Processing line: ~      bullet.x = 0 # starts on the left side of the screen~
    +        state.x = 1280 - state.tile_size # farthest right the player can be while remaining in the screen's scope
    +** Processing line: ~        state.dx = 0~
     - Inside source: true
     *** True Line Result
    -      bullet.x = 0 # starts on the left side of the screen
    -** Processing line: ~      bullet.size = 10~
    +        state.dx = 0
    +** Processing line: ~      elsif state.x <= 0 && state.dx < 0 # if the player is moving too far left~
     - Inside source: true
     *** True Line Result
    -      bullet.size = 10
    -** Processing line: ~      bullet.speed = 10 * rand + 2 # speed of a bullet is randomized~
    +      elsif state.x <= 0 && state.dx < 0 # if the player is moving too far left
    +** Processing line: ~        state.x = 0 # farthest left the player can be while remaining in the screen's scope~
     - Inside source: true
     *** True Line Result
    -      bullet.speed = 10 * rand + 2 # speed of a bullet is randomized
    -** Processing line: ~      bullet.rect = [bullet.x, bullet.y, bullet.size, bullet.size] # definition is set~
    +        state.x = 0 # farthest left the player can be while remaining in the screen's scope
    +** Processing line: ~        state.dx = 0~
     - Inside source: true
     *** True Line Result
    -      bullet.rect = [bullet.x, bullet.y, bullet.size, bullet.size] # definition is set
    -** Processing line: ~    end~
    +        state.dx = 0
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~  end~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  end
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def tick_instructions args, text, y = 715~
    +** Processing line: ~    def calc_sprite_selection~
     - Inside source: true
     *** True Line Result
    -  def tick_instructions args, text, y = 715
    -** Processing line: ~    return if args.state.key_event_occurred~
    +    def calc_sprite_selection
    +** Processing line: ~      # Does the transition to bring down the select sprite screen~
     - Inside source: true
     *** True Line Result
    -    return if args.state.key_event_occurred
    -** Processing line: ~    if args.inputs.mouse.click ||~
    +      # Does the transition to bring down the select sprite screen
    +** Processing line: ~      if state.mode == :selecting && state.select_menu.y != 0~
     - Inside source: true
     *** True Line Result
    -    if args.inputs.mouse.click ||
    -** Processing line: ~       args.inputs.keyboard.directional_vector ||~
    +      if state.mode == :selecting && state.select_menu.y != 0
    +** Processing line: ~        state.select_menu.y = 0  # sets y position of select menu (shown when 's' is pressed)~
     - Inside source: true
     *** True Line Result
    -       args.inputs.keyboard.directional_vector ||
    -** Processing line: ~       args.inputs.keyboard.key_down.enter ||~
    +        state.select_menu.y = 0  # sets y position of select menu (shown when 's' is pressed)
    +** Processing line: ~        state.banner_coords.y = 680 # sets y position of Select Sprite banner~
     - Inside source: true
     *** True Line Result
    -       args.inputs.keyboard.key_down.enter ||
    -** Processing line: ~       args.inputs.keyboard.key_down.space ||~
    +        state.banner_coords.y = 680 # sets y position of Select Sprite banner
    +** Processing line: ~        state.sprite_coords = state.sprite_coords.map do |x, y, w, h|~
     - Inside source: true
     *** True Line Result
    -       args.inputs.keyboard.key_down.space ||
    -** Processing line: ~       args.inputs.keyboard.key_down.escape~
    +        state.sprite_coords = state.sprite_coords.map do |x, y, w, h|
    +** Processing line: ~          [x, y - 720, w, h] # sets definition of sprites (change '-' to '+' and the sprites can't be seen)~
     - Inside source: true
     *** True Line Result
    -       args.inputs.keyboard.key_down.escape
    -** Processing line: ~      args.state.key_event_occurred = true~
    +          [x, y - 720, w, h] # sets definition of sprites (change '-' to '+' and the sprites can't be seen)
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -      args.state.key_event_occurred = true
    -** Processing line: ~    end~
    +        end
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    end
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    args.outputs.debug << [0, y - 50, 1280, 60].solid~
    +** Processing line: ~      # Does the transition to leave the select sprite screen~
     - Inside source: true
     *** True Line Result
    -    args.outputs.debug << [0, y - 50, 1280, 60].solid
    -** Processing line: ~    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label~
    +      # Does the transition to leave the select sprite screen
    +** Processing line: ~      if state.mode == :creating  && state.select_menu.y != 720~
     - Inside source: true
     *** True Line Result
    -    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label
    -** Processing line: ~    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label~
    +      if state.mode == :creating  && state.select_menu.y != 720
    +** Processing line: ~        state.select_menu.y = 720 # sets y position of select menu (menu is retreated back up)~
     - Inside source: true
     *** True Line Result
    -    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label
    -** Processing line: ~  end~
    +        state.select_menu.y = 720 # sets y position of select menu (menu is retreated back up)
    +** Processing line: ~        state.banner_coords.y = 1000 # sets y position of Select Sprite banner~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +        state.banner_coords.y = 1000 # sets y position of Select Sprite banner
    +** Processing line: ~        state.sprite_coords = state.sprite_coords.map do |x, y, w, h|~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~#+end_src~
    -- Line was identified as the end of a code block.
    +        state.sprite_coords = state.sprite_coords.map do |x, y, w, h|
    +** Processing line: ~          [x, y + 720, w, h] # sets definition of all elements in collection~
    +- Inside source: true
     *** True Line Result
    -#+end_src
    +          [x, y + 720, w, h] # sets definition of all elements in collection
    +** Processing line: ~        end~
    +- Inside source: true
    +*** True Line Result
    +        end
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
     ** Processing line: ~~
    -- End of paragraph detected.
    +- Inside source: true
     *** True Line Result
     
    -** Processing line: ~*** Physics And Collisions - Box Collision - main.rb~
    -- Header detected.
    +** Processing line: ~    def process_inputs~
    +- Inside source: true
     *** True Line Result
    -
    +    def process_inputs
    +** Processing line: ~      # If the state.mode is back and if the menu has retreated back up~
    +- Inside source: true
     *** True Line Result
    -*** Physics And Collisions - Box Collision - main.rb
    -** Processing line: ~#+begin_src ruby~
    -- Line was identified as the beginning of a code block.
    +      # If the state.mode is back and if the menu has retreated back up
    +** Processing line: ~      # call methods that process user inputs~
    +- Inside source: true
     *** True Line Result
    -
    +      # call methods that process user inputs
    +** Processing line: ~      if state.mode == :creating~
    +- Inside source: true
     *** True Line Result
    -#+begin_src ruby
    -** Processing line: ~  # ./samples/04_physics_and_collisions/04_box_collision/app/main.rb~
    +      if state.mode == :creating
    +** Processing line: ~        process_inputs_player_movement~
     - Inside source: true
     *** True Line Result
    -  # ./samples/04_physics_and_collisions/04_box_collision/app/main.rb
    -** Processing line: ~  =begin~
    +        process_inputs_player_movement
    +** Processing line: ~        process_inputs_place_tile~
     - Inside source: true
     *** True Line Result
    -  =begin
    +        process_inputs_place_tile
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~   APIs listing that haven't been encountered in previous sample apps:~
    +** Processing line: ~      # For each sprite_coordinate added, check what sprite was selected~
     - Inside source: true
     *** True Line Result
    -   APIs listing that haven't been encountered in previous sample apps:
    -** Processing line: ~~
    +      # For each sprite_coordinate added, check what sprite was selected
    +** Processing line: ~      if state.mode == :selecting~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   - first: Returns the first element of the array.~
    +      if state.mode == :selecting
    +** Processing line: ~        state.sprite_coords.map do |x, y, order| # goes through all sprites in collection~
     - Inside source: true
     *** True Line Result
    -   - first: Returns the first element of the array.
    -** Processing line: ~     For example, if we have an array~
    +        state.sprite_coords.map do |x, y, order| # goes through all sprites in collection
    +** Processing line: ~          # checks that a specific sprite was pressed based on x, y position~
     - Inside source: true
     *** True Line Result
    -     For example, if we have an array
    -** Processing line: ~     numbers = [1, 2, 3, 4, 5]~
    +          # checks that a specific sprite was pressed based on x, y position
    +** Processing line: ~          if inputs.mouse.down && # the && (and) sign means ALL statements must be true for the evaluation to be true~
     - Inside source: true
     *** True Line Result
    -     numbers = [1, 2, 3, 4, 5]
    -** Processing line: ~     and we call first by saying~
    +          if inputs.mouse.down && # the && (and) sign means ALL statements must be true for the evaluation to be true
    +** Processing line: ~             inputs.mouse.down.point.x >= x      && # x is greater than or equal to sprite's x and~
     - Inside source: true
     *** True Line Result
    -     and we call first by saying
    -** Processing line: ~     numbers.first~
    +             inputs.mouse.down.point.x >= x      && # x is greater than or equal to sprite's x and
    +** Processing line: ~             inputs.mouse.down.point.x <= x + 50 && # x is less than or equal to 50 pixels to the right~
     - Inside source: true
     *** True Line Result
    -     numbers.first
    -** Processing line: ~     the number 1 will be returned because it is the first element of the numbers array.~
    +             inputs.mouse.down.point.x <= x + 50 && # x is less than or equal to 50 pixels to the right
    +** Processing line: ~             inputs.mouse.down.point.y >= y      && # y is greater than or equal to sprite's y~
     - Inside source: true
     *** True Line Result
    -     the number 1 will be returned because it is the first element of the numbers array.
    -** Processing line: ~~
    +             inputs.mouse.down.point.y >= y      && # y is greater than or equal to sprite's y
    +** Processing line: ~             inputs.mouse.down.point.y <= y + 50 # y is less than or equal to 50 pixels up~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   - num1.idiv(num2): Divides two numbers and returns an integer.~
    +             inputs.mouse.down.point.y <= y + 50 # y is less than or equal to 50 pixels up
    +** Processing line: ~            state.sprite_selected = order # sprite is chosen~
     - Inside source: true
     *** True Line Result
    -   - num1.idiv(num2): Divides two numbers and returns an integer.
    -** Processing line: ~     For example,~
    +            state.sprite_selected = order # sprite is chosen
    +** Processing line: ~          end~
     - Inside source: true
     *** True Line Result
    -     For example,
    -** Processing line: ~     16.idiv(3) = 5, because 16 / 3 is 5.33333 returned as an integer.~
    +          end
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -     16.idiv(3) = 5, because 16 / 3 is 5.33333 returned as an integer.
    -** Processing line: ~     16.idiv(4) = 4, because 16 / 4 is 4 and already has no decimal.~
    +        end
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -     16.idiv(4) = 4, because 16 / 4 is 4 and already has no decimal.
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~   Reminders:~
    +** Processing line: ~      inputs_export_stage~
     - Inside source: true
     *** True Line Result
    -   Reminders:
    -** Processing line: ~~
    +      inputs_export_stage
    +** Processing line: ~      process_inputs_show_available_sprites~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   - find_all: Finds all values that satisfy specific requirements.~
    +      process_inputs_show_available_sprites
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -   - find_all: Finds all values that satisfy specific requirements.
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~   - ARRAY#intersect_rect?: An array with at least four values is~
    +** Processing line: ~    # Moves the player based on the keys they press on their keyboard~
     - Inside source: true
     *** True Line Result
    -   - ARRAY#intersect_rect?: An array with at least four values is
    -** Processing line: ~     considered a rect. The intersect_rect? function returns true~
    +    # Moves the player based on the keys they press on their keyboard
    +** Processing line: ~    def process_inputs_player_movement~
     - Inside source: true
     *** True Line Result
    -     considered a rect. The intersect_rect? function returns true
    -** Processing line: ~     or false depending on if the two rectangles intersect.~
    +    def process_inputs_player_movement
    +** Processing line: ~      # Sets dx to 0 if the player lets go of arrow keys (player won't move left or right)~
     - Inside source: true
     *** True Line Result
    -     or false depending on if the two rectangles intersect.
    -** Processing line: ~~
    +      # Sets dx to 0 if the player lets go of arrow keys (player won't move left or right)
    +** Processing line: ~      if inputs.keyboard.key_up.right~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   - reject: Removes elements from a collection if they meet certain requirements.~
    +      if inputs.keyboard.key_up.right
    +** Processing line: ~        state.dx = 0~
     - Inside source: true
     *** True Line Result
    -   - reject: Removes elements from a collection if they meet certain requirements.
    -** Processing line: ~~
    +        state.dx = 0
    +** Processing line: ~      elsif inputs.keyboard.key_up.left~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  =end~
    +      elsif inputs.keyboard.key_up.left
    +** Processing line: ~        state.dx = 0~
     - Inside source: true
     *** True Line Result
    -  =end
    -** Processing line: ~~
    +        state.dx = 0
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  # This sample app allows users to create tiles and place them anywhere on the screen as obstacles.~
    +      end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  # This sample app allows users to create tiles and place them anywhere on the screen as obstacles.
    -** Processing line: ~  # The player can then move and maneuver around them.~
    +
    +** Processing line: ~      # Sets dx to 3 in whatever direction the player chooses when they hold down (or press) the left or right keys~
     - Inside source: true
     *** True Line Result
    -  # The player can then move and maneuver around them.
    -** Processing line: ~~
    +      # Sets dx to 3 in whatever direction the player chooses when they hold down (or press) the left or right keys
    +** Processing line: ~      if inputs.keyboard.key_held.right~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  class PoorManPlatformerPhysics~
    +      if inputs.keyboard.key_held.right
    +** Processing line: ~        state.dx =  3~
     - Inside source: true
     *** True Line Result
    -  class PoorManPlatformerPhysics
    -** Processing line: ~    attr_accessor :grid, :inputs, :state, :outputs~
    +        state.dx =  3
    +** Processing line: ~      elsif inputs.keyboard.key_held.left~
     - Inside source: true
     *** True Line Result
    -    attr_accessor :grid, :inputs, :state, :outputs
    -** Processing line: ~~
    +      elsif inputs.keyboard.key_held.left
    +** Processing line: ~        state.dx = -3~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # Calls all methods necessary for the app to run successfully.~
    +        state.dx = -3
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    # Calls all methods necessary for the app to run successfully.
    -** Processing line: ~    def tick~
    +      end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    def tick
    -** Processing line: ~      defaults~
    +
    +** Processing line: ~      # Sets dy to 5 to make the player ~fly~ when they press the space bar on their keyboard~
     - Inside source: true
     *** True Line Result
    -      defaults
    -** Processing line: ~      render~
    +      # Sets dy to 5 to make the player ~fly~ when they press the space bar on their keyboard
    +** Processing line: ~      if inputs.keyboard.key_held.space~
     - Inside source: true
     *** True Line Result
    -      render
    -** Processing line: ~      calc~
    +      if inputs.keyboard.key_held.space
    +** Processing line: ~        state.dy = 5~
     - Inside source: true
     *** True Line Result
    -      calc
    -** Processing line: ~      process_inputs~
    +        state.dy = 5
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -      process_inputs
    +      end
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -24796,62 +25079,70 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Sets default values for variables.~
    +** Processing line: ~    # Adds tile in the place the user holds down the mouse~
     - Inside source: true
     *** True Line Result
    -    # Sets default values for variables.
    -** Processing line: ~    # The ||= sign means that the variable will only be set to the value following the = sign if the value has~
    +    # Adds tile in the place the user holds down the mouse
    +** Processing line: ~    def process_inputs_place_tile~
     - Inside source: true
     *** True Line Result
    -    # The ||= sign means that the variable will only be set to the value following the = sign if the value has
    -** Processing line: ~    # not already been set before. Intialization happens only in the first frame.~
    +    def process_inputs_place_tile
    +** Processing line: ~      if inputs.mouse.down # if mouse is pressed~
     - Inside source: true
     *** True Line Result
    -    # not already been set before. Intialization happens only in the first frame.
    -** Processing line: ~    def defaults~
    +      if inputs.mouse.down # if mouse is pressed
    +** Processing line: ~        state.world_lookup = {}~
     - Inside source: true
     *** True Line Result
    -    def defaults
    -** Processing line: ~      state.tile_size               = 64~
    +        state.world_lookup = {}
    +** Processing line: ~        x, y = to_coord inputs.mouse.down.point # gets x, y coordinates for the grid~
     - Inside source: true
     *** True Line Result
    -      state.tile_size               = 64
    -** Processing line: ~      state.gravity                 = -0.2~
    +        x, y = to_coord inputs.mouse.down.point # gets x, y coordinates for the grid
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      state.gravity                 = -0.2
    -** Processing line: ~      state.previous_tile_size    ||= state.tile_size~
    +
    +** Processing line: ~        # Checks if any coordinates duplicate (already exist in world)~
     - Inside source: true
     *** True Line Result
    -      state.previous_tile_size    ||= state.tile_size
    -** Processing line: ~      state.x                     ||= 0~
    +        # Checks if any coordinates duplicate (already exist in world)
    +** Processing line: ~        if state.world.any? { |existing_x, existing_y, n| existing_x == x && existing_y == y }~
     - Inside source: true
     *** True Line Result
    -      state.x                     ||= 0
    -** Processing line: ~      state.y                     ||= 800~
    +        if state.world.any? { |existing_x, existing_y, n| existing_x == x && existing_y == y }
    +** Processing line: ~          #erases existing tile space by rejecting them from world~
     - Inside source: true
     *** True Line Result
    -      state.y                     ||= 800
    -** Processing line: ~      state.dy                    ||= 0~
    +          #erases existing tile space by rejecting them from world
    +** Processing line: ~          state.world = state.world.reject do |existing_x, existing_y, n|~
     - Inside source: true
     *** True Line Result
    -      state.dy                    ||= 0
    -** Processing line: ~      state.dx                    ||= 0~
    +          state.world = state.world.reject do |existing_x, existing_y, n|
    +** Processing line: ~            existing_x == x && existing_y == y~
     - Inside source: true
     *** True Line Result
    -      state.dx                    ||= 0
    -** Processing line: ~      state.world                 ||= []~
    +            existing_x == x && existing_y == y
    +** Processing line: ~          end~
     - Inside source: true
     *** True Line Result
    -      state.world                 ||= []
    -** Processing line: ~      state.world_lookup          ||= {}~
    +          end
    +** Processing line: ~        else~
     - Inside source: true
     *** True Line Result
    -      state.world_lookup          ||= {}
    -** Processing line: ~      state.world_collision_rects ||= []~
    +        else
    +** Processing line: ~          state.world << [x, y, state.sprite_selected] # If no duplicates, add the sprite~
     - Inside source: true
     *** True Line Result
    -      state.world_collision_rects ||= []
    +          state.world << [x, y, state.sprite_selected] # If no duplicates, add the sprite
    +** Processing line: ~        end~
    +- Inside source: true
    +*** True Line Result
    +        end
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -24860,134 +25151,134 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Outputs solids and borders of different colors for the world and collision_rects collections.~
    +** Processing line: ~    # Stores/exports world collection's info (coordinates, sprite number) into a file~
     - Inside source: true
     *** True Line Result
    -    # Outputs solids and borders of different colors for the world and collision_rects collections.
    -** Processing line: ~    def render~
    +    # Stores/exports world collection's info (coordinates, sprite number) into a file
    +** Processing line: ~    def inputs_export_stage~
     - Inside source: true
     *** True Line Result
    -    def render
    -** Processing line: ~~
    +    def inputs_export_stage
    +** Processing line: ~      if inputs.keyboard.key_down.e # if "e" is pressed~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      # Sets a black background on the screen (Comment this line out and the background will become white.)~
    +      if inputs.keyboard.key_down.e # if "e" is pressed
    +** Processing line: ~        export_string = state.world.map do |x, y, sprite_number| # stores world info in a string~
     - Inside source: true
     *** True Line Result
    -      # Sets a black background on the screen (Comment this line out and the background will become white.)
    -** Processing line: ~      # Also note that black is the default color for when no color is assigned.~
    +        export_string = state.world.map do |x, y, sprite_number| # stores world info in a string
    +** Processing line: ~          "#{x},#{y},#{sprite_number}"                           # using string interpolation~
     - Inside source: true
     *** True Line Result
    -      # Also note that black is the default color for when no color is assigned.
    -** Processing line: ~      outputs.solids << grid.rect~
    +          "#{x},#{y},#{sprite_number}"                           # using string interpolation
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -      outputs.solids << grid.rect
    -** Processing line: ~~
    +        end
    +** Processing line: ~        gtk.write_file(MAP_FILE_PATH, export_string.join("\n")) # writes string into a file~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      # The position, size, and color (white) are set for borders given to the world collection.~
    +        gtk.write_file(MAP_FILE_PATH, export_string.join("\n")) # writes string into a file
    +** Processing line: ~        state.map_saved_at = state.tick_count # frame number (passage of time) when the map was saved~
     - Inside source: true
     *** True Line Result
    -      # The position, size, and color (white) are set for borders given to the world collection.
    -** Processing line: ~      # Try changing the color by assigning different numbers (between 0 and 255) to the last three parameters.~
    +        state.map_saved_at = state.tick_count # frame number (passage of time) when the map was saved
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -      # Try changing the color by assigning different numbers (between 0 and 255) to the last three parameters.
    -** Processing line: ~      outputs.borders << state.world.map do |x, y|~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      outputs.borders << state.world.map do |x, y|
    -** Processing line: ~        [x * state.tile_size,~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        [x * state.tile_size,
    -** Processing line: ~         y * state.tile_size,~
    +
    +** Processing line: ~    def process_inputs_show_available_sprites~
     - Inside source: true
     *** True Line Result
    -         y * state.tile_size,
    -** Processing line: ~         state.tile_size,~
    +    def process_inputs_show_available_sprites
    +** Processing line: ~      # Based on keyboard input, the entity (:creating and :selecting) switch~
     - Inside source: true
     *** True Line Result
    -         state.tile_size,
    -** Processing line: ~         state.tile_size, 255, 255, 255]~
    +      # Based on keyboard input, the entity (:creating and :selecting) switch
    +** Processing line: ~      if inputs.keyboard.key_held.s && state.mode == :creating # if "s" is pressed and currently creating~
     - Inside source: true
     *** True Line Result
    -         state.tile_size, 255, 255, 255]
    -** Processing line: ~      end~
    +      if inputs.keyboard.key_held.s && state.mode == :creating # if "s" is pressed and currently creating
    +** Processing line: ~        state.mode = :selecting # will change to selecting~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +        state.mode = :selecting # will change to selecting
    +** Processing line: ~        inputs.keyboard.clear # VERY IMPORTANT! If not present, it'll flicker between on and off~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      # The top, bottom, and sides of the borders for collision_rects are different colors.~
    +        inputs.keyboard.clear # VERY IMPORTANT! If not present, it'll flicker between on and off
    +** Processing line: ~      elsif inputs.keyboard.key_held.s && state.mode == :selecting # if "s" is pressed and currently selecting~
     - Inside source: true
     *** True Line Result
    -      # The top, bottom, and sides of the borders for collision_rects are different colors.
    -** Processing line: ~      outputs.borders << state.world_collision_rects.map do |e|~
    +      elsif inputs.keyboard.key_held.s && state.mode == :selecting # if "s" is pressed and currently selecting
    +** Processing line: ~        state.mode = :creating # will change to creating~
     - Inside source: true
     *** True Line Result
    -      outputs.borders << state.world_collision_rects.map do |e|
    -** Processing line: ~        [~
    +        state.mode = :creating # will change to creating
    +** Processing line: ~        inputs.keyboard.clear # VERY IMPORTANT! If not present, it'll flicker between on and off~
     - Inside source: true
     *** True Line Result
    -        [
    -** Processing line: ~          [e[:top],                             0, 170,   0], # top is a shade of green~
    +        inputs.keyboard.clear # VERY IMPORTANT! If not present, it'll flicker between on and off
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -          [e[:top],                             0, 170,   0], # top is a shade of green
    -** Processing line: ~          [e[:bottom],                          0, 100, 170], # bottom is a shade of greenish-blue~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -          [e[:bottom],                          0, 100, 170], # bottom is a shade of greenish-blue
    -** Processing line: ~          [e[:left_right],                    170,   0,   0], # left and right are a shade of red~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          [e[:left_right],                    170,   0,   0], # left and right are a shade of red
    -** Processing line: ~        ]~
    +
    +** Processing line: ~    # Loads the world collection by reading from the map.txt file in the app folder~
     - Inside source: true
     *** True Line Result
    -        ]
    -** Processing line: ~      end~
    +    # Loads the world collection by reading from the map.txt file in the app folder
    +** Processing line: ~    def attempt_load_world_from_file~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +    def attempt_load_world_from_file
    +** Processing line: ~      return if state.world # return if the world collection is already populated~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      # Sets the position, size, and color (a shade of green) of the borders of only the player's~
    +      return if state.world # return if the world collection is already populated
    +** Processing line: ~      state.world ||= [] # initialized as an empty collection~
     - Inside source: true
     *** True Line Result
    -      # Sets the position, size, and color (a shade of green) of the borders of only the player's
    -** Processing line: ~      # box and outputs it. If you change the 180 to 0, the player's box will be black and you~
    +      state.world ||= [] # initialized as an empty collection
    +** Processing line: ~      exported_world = gtk.read_file(MAP_FILE_PATH) # reads the file using the path mentioned at top of code~
     - Inside source: true
     *** True Line Result
    -      # box and outputs it. If you change the 180 to 0, the player's box will be black and you
    -** Processing line: ~      # won't be able to see it (because it will match the black background).~
    +      exported_world = gtk.read_file(MAP_FILE_PATH) # reads the file using the path mentioned at top of code
    +** Processing line: ~      return unless exported_world # return unless the file read was successful~
     - Inside source: true
     *** True Line Result
    -      # won't be able to see it (because it will match the black background).
    -** Processing line: ~      outputs.borders << [state.x,~
    +      return unless exported_world # return unless the file read was successful
    +** Processing line: ~      state.world = exported_world.each_line.map do |l| # perform action on each line of exported_world~
     - Inside source: true
     *** True Line Result
    -      outputs.borders << [state.x,
    -** Processing line: ~                          state.y,~
    +      state.world = exported_world.each_line.map do |l| # perform action on each line of exported_world
    +** Processing line: ~          l.split(',').map(&:to_i) # calls split using ',' as a delimiter, and invokes .map on the collection,~
     - Inside source: true
     *** True Line Result
    -                          state.y,
    -** Processing line: ~                          state.tile_size,~
    +          l.split(',').map(&:to_i) # calls split using ',' as a delimiter, and invokes .map on the collection,
    +** Processing line: ~                                   # calling to_i (converts to integers) on each element~
     - Inside source: true
     *** True Line Result
    -                          state.tile_size,
    -** Processing line: ~                          state.tile_size,  0, 180, 0]~
    +                                   # calling to_i (converts to integers) on each element
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -                          state.tile_size,  0, 180, 0]
    +      end
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -24996,22 +25287,18 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Calls methods needed to perform calculations.~
    -- Inside source: true
    -*** True Line Result
    -    # Calls methods needed to perform calculations.
    -** Processing line: ~    def calc~
    +** Processing line: ~    # Adds the change in y to y to determine the next y position of the player.~
     - Inside source: true
     *** True Line Result
    -    def calc
    -** Processing line: ~      calc_world_lookup~
    +    # Adds the change in y to y to determine the next y position of the player.
    +** Processing line: ~    def next_y~
     - Inside source: true
     *** True Line Result
    -      calc_world_lookup
    -** Processing line: ~      calc_player~
    +    def next_y
    +** Processing line: ~      state.y + state.dy~
     - Inside source: true
     *** True Line Result
    -      calc_player
    +      state.y + state.dy
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -25020,174 +25307,178 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Performs calculations on world_lookup and sets values.~
    -- Inside source: true
    -*** True Line Result
    -    # Performs calculations on world_lookup and sets values.
    -** Processing line: ~    def calc_world_lookup~
    -- Inside source: true
    -*** True Line Result
    -    def calc_world_lookup
    -** Processing line: ~~
    -- Inside source: true
    -*** True Line Result
    -
    -** Processing line: ~      # If the tile size isn't equal to the previous tile size,~
    +** Processing line: ~    # Determines next x position of player~
     - Inside source: true
     *** True Line Result
    -      # If the tile size isn't equal to the previous tile size,
    -** Processing line: ~      # the previous tile size is set to the tile size,~
    +    # Determines next x position of player
    +** Processing line: ~    def next_x~
     - Inside source: true
     *** True Line Result
    -      # the previous tile size is set to the tile size,
    -** Processing line: ~      # and world_lookup hash is set to empty.~
    +    def next_x
    +** Processing line: ~      if state.dx < 0 # if the player moves left~
     - Inside source: true
     *** True Line Result
    -      # and world_lookup hash is set to empty.
    -** Processing line: ~      if state.tile_size != state.previous_tile_size~
    +      if state.dx < 0 # if the player moves left
    +** Processing line: ~        return state.x - (state.tile_size - state.player_width) # subtracts since the change in x is negative (player is moving left)~
     - Inside source: true
     *** True Line Result
    -      if state.tile_size != state.previous_tile_size
    -** Processing line: ~        state.previous_tile_size = state.tile_size~
    +        return state.x - (state.tile_size - state.player_width) # subtracts since the change in x is negative (player is moving left)
    +** Processing line: ~      else~
     - Inside source: true
     *** True Line Result
    -        state.previous_tile_size = state.tile_size
    -** Processing line: ~        state.world_lookup = {} # empty hash~
    +      else
    +** Processing line: ~        return state.x + (state.tile_size - state.player_width) # adds since the change in x is positive (player is moving right)~
     - Inside source: true
     *** True Line Result
    -        state.world_lookup = {} # empty hash
    +        return state.x + (state.tile_size - state.player_width) # adds since the change in x is positive (player is moving right)
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
           end
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      # return if the world_lookup hash has keys (or, in other words, is not empty)~
    +** Processing line: ~    def to_coord point~
     - Inside source: true
     *** True Line Result
    -      # return if the world_lookup hash has keys (or, in other words, is not empty)
    -** Processing line: ~      # return unless the world collection has values inside of it (or is not empty)~
    +    def to_coord point
    +** Processing line: ~      # Integer divides (idiv) point.x to turn into grid~
     - Inside source: true
     *** True Line Result
    -      # return unless the world collection has values inside of it (or is not empty)
    -** Processing line: ~      return if state.world_lookup.keys.length > 0~
    +      # Integer divides (idiv) point.x to turn into grid
    +** Processing line: ~      # Then, you can just multiply each integer by state.tile_size~
     - Inside source: true
     *** True Line Result
    -      return if state.world_lookup.keys.length > 0
    -** Processing line: ~      return unless state.world.length > 0~
    +      # Then, you can just multiply each integer by state.tile_size
    +** Processing line: ~      # later and huzzah. Grid coordinates~
     - Inside source: true
     *** True Line Result
    -      return unless state.world.length > 0
    -** Processing line: ~~
    +      # later and huzzah. Grid coordinates
    +** Processing line: ~      [point.x.idiv(state.tile_size), point.y.idiv(state.tile_size)]~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      # Starts with an empty hash for world_lookup.~
    +      [point.x.idiv(state.tile_size), point.y.idiv(state.tile_size)]
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      # Starts with an empty hash for world_lookup.
    -** Processing line: ~      # Searches through the world and finds the coordinates that exist.~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -      # Searches through the world and finds the coordinates that exist.
    -** Processing line: ~      state.world_lookup = {}~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      state.world_lookup = {}
    -** Processing line: ~      state.world.each { |x, y| state.world_lookup[[x, y]] = true }~
    +
    +** Processing line: ~  $metroidvania_starter = MetroidvaniaStarter.new~
     - Inside source: true
     *** True Line Result
    -      state.world.each { |x, y| state.world_lookup[[x, y]] = true }
    +  $metroidvania_starter = MetroidvaniaStarter.new
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      # Assigns world_collision_rects for every sprite drawn.~
    +** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
    -      # Assigns world_collision_rects for every sprite drawn.
    -** Processing line: ~      state.world_collision_rects =~
    +  def tick args
    +** Processing line: ~      $metroidvania_starter.grid    = args.grid~
     - Inside source: true
     *** True Line Result
    -      state.world_collision_rects =
    -** Processing line: ~        state.world_lookup~
    +      $metroidvania_starter.grid    = args.grid
    +** Processing line: ~      $metroidvania_starter.inputs  = args.inputs~
     - Inside source: true
     *** True Line Result
    -        state.world_lookup
    -** Processing line: ~            .keys~
    +      $metroidvania_starter.inputs  = args.inputs
    +** Processing line: ~      $metroidvania_starter.state   = args.state~
     - Inside source: true
     *** True Line Result
    -            .keys
    -** Processing line: ~            .map do |coord_x, coord_y|~
    +      $metroidvania_starter.state   = args.state
    +** Processing line: ~      $metroidvania_starter.outputs = args.outputs~
     - Inside source: true
     *** True Line Result
    -            .map do |coord_x, coord_y|
    -** Processing line: ~              s = state.tile_size~
    +      $metroidvania_starter.outputs = args.outputs
    +** Processing line: ~      $metroidvania_starter.gtk     = args.gtk~
     - Inside source: true
     *** True Line Result
    -              s = state.tile_size
    -** Processing line: ~              # multiply by tile size so the grid coordinates; sets pixel value~
    +      $metroidvania_starter.gtk     = args.gtk
    +** Processing line: ~      $metroidvania_starter.tick~
     - Inside source: true
     *** True Line Result
    -              # multiply by tile size so the grid coordinates; sets pixel value
    -** Processing line: ~              # don't forget that position is denoted by bottom left corner~
    +      $metroidvania_starter.tick
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -              # don't forget that position is denoted by bottom left corner
    -** Processing line: ~              # set x = coord_x or y = coord_y and see what happens!~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -              # set x = coord_x or y = coord_y and see what happens!
    -** Processing line: ~              x = s * coord_x~
    -- Inside source: true
    +
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
     *** True Line Result
    -              x = s * coord_x
    -** Processing line: ~              y = s * coord_y~
    -- Inside source: true
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
     *** True Line Result
    -              y = s * coord_y
    -** Processing line: ~              {~
    +
    +** Processing line: ~*** Physics And Collisions - Box Collision 3 - main.rb~
    +- Header detected.
    +*** True Line Result
    +
    +*** True Line Result
    +*** Physics And Collisions - Box Collision 3 - main.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/04_physics_and_collisions/06_box_collision_3/app/main.rb~
     - Inside source: true
     *** True Line Result
    -              {
    -** Processing line: ~                # The values added to x, y, and s position the world_collision_rects so they all appear~
    +  # ./samples/04_physics_and_collisions/06_box_collision_3/app/main.rb
    +** Processing line: ~  class Game~
     - Inside source: true
     *** True Line Result
    -                # The values added to x, y, and s position the world_collision_rects so they all appear
    -** Processing line: ~                # stacked (on top of world rects) but don't directly overlap.~
    +  class Game
    +** Processing line: ~    attr_gtk~
     - Inside source: true
     *** True Line Result
    -                # stacked (on top of world rects) but don't directly overlap.
    -** Processing line: ~                # Remove these added values and mess around with the rect placement!~
    +    attr_gtk
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -                # Remove these added values and mess around with the rect placement!
    -** Processing line: ~                args:       [coord_x, coord_y],~
    +
    +** Processing line: ~    def tick~
     - Inside source: true
     *** True Line Result
    -                args:       [coord_x, coord_y],
    -** Processing line: ~                left_right: [x,     y + 4, s,     s - 6], # hash keys and values~
    +    def tick
    +** Processing line: ~      defaults~
     - Inside source: true
     *** True Line Result
    -                left_right: [x,     y + 4, s,     s - 6], # hash keys and values
    -** Processing line: ~                top:        [x + 4, y + 6, s - 8, s - 6],~
    +      defaults
    +** Processing line: ~      render~
     - Inside source: true
     *** True Line Result
    -                top:        [x + 4, y + 6, s - 8, s - 6],
    -** Processing line: ~                bottom:     [x + 1, y - 1, s - 2, s - 8],~
    +      render
    +** Processing line: ~      input_edit_map~
     - Inside source: true
     *** True Line Result
    -                bottom:     [x + 1, y - 1, s - 2, s - 8],
    -** Processing line: ~              }~
    +      input_edit_map
    +** Processing line: ~      input_player~
     - Inside source: true
     *** True Line Result
    -              }
    -** Processing line: ~            end~
    +      input_player
    +** Processing line: ~      calc_player~
     - Inside source: true
     *** True Line Result
    -            end
    +      calc_player
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -25196,74 +25487,70 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Performs calculations to change the x and y values of the player's box.~
    +** Processing line: ~    def defaults~
     - Inside source: true
     *** True Line Result
    -    # Performs calculations to change the x and y values of the player's box.
    -** Processing line: ~    def calc_player~
    +    def defaults
    +** Processing line: ~      state.gravity           = -0.4~
     - Inside source: true
     *** True Line Result
    -    def calc_player
    -** Processing line: ~~
    +      state.gravity           = -0.4
    +** Processing line: ~      state.drag              = 0.15~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      # Since acceleration is the change in velocity, the change in y (dy) increases every frame.~
    +      state.drag              = 0.15
    +** Processing line: ~      state.tile_size         = 32~
     - Inside source: true
     *** True Line Result
    -      # Since acceleration is the change in velocity, the change in y (dy) increases every frame.
    -** Processing line: ~      # What goes up must come down because of gravity.~
    +      state.tile_size         = 32
    +** Processing line: ~      state.player.size       = 16~
     - Inside source: true
     *** True Line Result
    -      # What goes up must come down because of gravity.
    -** Processing line: ~      state.dy += state.gravity~
    +      state.player.size       = 16
    +** Processing line: ~      state.player.jump_power = 12~
     - Inside source: true
     *** True Line Result
    -      state.dy += state.gravity
    +      state.player.jump_power = 12
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      # Calls the calc_box_collision and calc_edge_collision methods.~
    +** Processing line: ~      state.tiles                 ||= []~
     - Inside source: true
     *** True Line Result
    -      # Calls the calc_box_collision and calc_edge_collision methods.
    -** Processing line: ~      calc_box_collision~
    +      state.tiles                 ||= []
    +** Processing line: ~      state.player.y              ||= 800~
     - Inside source: true
     *** True Line Result
    -      calc_box_collision
    -** Processing line: ~      calc_edge_collision~
    +      state.player.y              ||= 800
    +** Processing line: ~      state.player.x              ||= 100~
     - Inside source: true
     *** True Line Result
    -      calc_edge_collision
    -** Processing line: ~~
    +      state.player.x              ||= 100
    +** Processing line: ~      state.player.dy             ||= 0~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      # Since velocity is the change in position, the change in y increases by dy. Same with x and dx.~
    +      state.player.dy             ||= 0
    +** Processing line: ~      state.player.dx             ||= 0~
     - Inside source: true
     *** True Line Result
    -      # Since velocity is the change in position, the change in y increases by dy. Same with x and dx.
    -** Processing line: ~      state.y += state.dy~
    +      state.player.dx             ||= 0
    +** Processing line: ~      state.player.jumped_down_at ||= 0~
     - Inside source: true
     *** True Line Result
    -      state.y += state.dy
    -** Processing line: ~      state.x += state.dx~
    +      state.player.jumped_down_at ||= 0
    +** Processing line: ~      state.player.jumped_at      ||= 0~
     - Inside source: true
     *** True Line Result
    -      state.x += state.dx
    +      state.player.jumped_at      ||= 0
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      # Scales dx down.~
    -- Inside source: true
    -*** True Line Result
    -      # Scales dx down.
    -** Processing line: ~      state.dx *= 0.8~
    +** Processing line: ~      calc_player_rect if !state.player.rect~
     - Inside source: true
     *** True Line Result
    -      state.dx *= 0.8
    +      calc_player_rect if !state.player.rect
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -25272,98 +25559,98 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Calls methods needed to determine collisions between player and world_collision rects.~
    -- Inside source: true
    -*** True Line Result
    -    # Calls methods needed to determine collisions between player and world_collision rects.
    -** Processing line: ~    def calc_box_collision~
    +** Processing line: ~    def render~
     - Inside source: true
     *** True Line Result
    -    def calc_box_collision
    -** Processing line: ~      return unless state.world_lookup.keys.length > 0 # return unless hash has atleast 1 key~
    +    def render
    +** Processing line: ~      outputs.labels << [10, 10.from_top, "tile: click to add a tile, hold X key and click to delete a tile."]~
     - Inside source: true
     *** True Line Result
    -      return unless state.world_lookup.keys.length > 0 # return unless hash has atleast 1 key
    -** Processing line: ~      collision_floor!~
    +      outputs.labels << [10, 10.from_top, "tile: click to add a tile, hold X key and click to delete a tile."]
    +** Processing line: ~      outputs.labels << [10, 35.from_top, "move: use left and right to move, space to jump, down and space to jump down."]~
     - Inside source: true
     *** True Line Result
    -      collision_floor!
    -** Processing line: ~      collision_left!~
    +      outputs.labels << [10, 35.from_top, "move: use left and right to move, space to jump, down and space to jump down."]
    +** Processing line: ~      outputs.labels << [10, 55.from_top, "      You can jump through or jump down through tiles with a height of 1."]~
     - Inside source: true
     *** True Line Result
    -      collision_left!
    -** Processing line: ~      collision_right!~
    +      outputs.labels << [10, 55.from_top, "      You can jump through or jump down through tiles with a height of 1."]
    +** Processing line: ~      outputs.background_color = [80, 80, 80]~
     - Inside source: true
     *** True Line Result
    -      collision_right!
    -** Processing line: ~      collision_ceiling!~
    +      outputs.background_color = [80, 80, 80]
    +** Processing line: ~      outputs.sprites << tiles.map(&:sprite)~
     - Inside source: true
     *** True Line Result
    -      collision_ceiling!
    -** Processing line: ~    end~
    +      outputs.sprites << tiles.map(&:sprite)
    +** Processing line: ~      outputs.sprites << (player.rect.merge path: 'sprites/square/green.png')~
     - Inside source: true
     *** True Line Result
    -    end
    +      outputs.sprites << (player.rect.merge path: 'sprites/square/green.png')
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Finds collisions between the bottom of the player's rect and the top of a world_collision_rect.~
    -- Inside source: true
    -*** True Line Result
    -    # Finds collisions between the bottom of the player's rect and the top of a world_collision_rect.
    -** Processing line: ~    def collision_floor!~
    +** Processing line: ~      mouse_overlay = {~
     - Inside source: true
     *** True Line Result
    -    def collision_floor!
    -** Processing line: ~      return unless state.dy <= 0 # return unless player is going down or is as far down as possible~
    +      mouse_overlay = {
    +** Processing line: ~        x: (inputs.mouse.x.ifloor state.tile_size),~
     - Inside source: true
     *** True Line Result
    -      return unless state.dy <= 0 # return unless player is going down or is as far down as possible
    -** Processing line: ~      player_rect = [state.x, state.y - 0.1, state.tile_size, state.tile_size] # definition of player~
    +        x: (inputs.mouse.x.ifloor state.tile_size),
    +** Processing line: ~        y: (inputs.mouse.y.ifloor state.tile_size),~
     - Inside source: true
     *** True Line Result
    -      player_rect = [state.x, state.y - 0.1, state.tile_size, state.tile_size] # definition of player
    -** Processing line: ~~
    +        y: (inputs.mouse.y.ifloor state.tile_size),
    +** Processing line: ~        w: state.tile_size,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      # Goes through world_collision_rects to find all intersections between the bottom of player's rect and~
    +        w: state.tile_size,
    +** Processing line: ~        h: state.tile_size,~
     - Inside source: true
     *** True Line Result
    -      # Goes through world_collision_rects to find all intersections between the bottom of player's rect and
    -** Processing line: ~      # the top of a world_collision_rect (hence the "-0.1" above)~
    +        h: state.tile_size,
    +** Processing line: ~        a: 100~
     - Inside source: true
     *** True Line Result
    -      # the top of a world_collision_rect (hence the "-0.1" above)
    -** Processing line: ~      floor_collisions = state.world_collision_rects~
    +        a: 100
    +** Processing line: ~      }~
     - Inside source: true
     *** True Line Result
    -      floor_collisions = state.world_collision_rects
    -** Processing line: ~                             .find_all { |r| r[:top].intersect_rect?(player_rect, collision_tollerance) }~
    +      }
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -                             .find_all { |r| r[:top].intersect_rect?(player_rect, collision_tollerance) }
    -** Processing line: ~                             .first~
    +
    +** Processing line: ~      mouse_overlay = mouse_overlay.merge r: 255 if state.delete_mode~
     - Inside source: true
     *** True Line Result
    -                             .first
    +      mouse_overlay = mouse_overlay.merge r: 255 if state.delete_mode
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      return unless floor_collisions # return unless collision occurred~
    +** Processing line: ~      if state.mouse_held~
     - Inside source: true
     *** True Line Result
    -      return unless floor_collisions # return unless collision occurred
    -** Processing line: ~      state.y = floor_collisions[:top].top # player's y is set to the y of the top of the collided rect~
    +      if state.mouse_held
    +** Processing line: ~        outputs.primitives << mouse_overlay.border!~
     - Inside source: true
     *** True Line Result
    -      state.y = floor_collisions[:top].top # player's y is set to the y of the top of the collided rect
    -** Processing line: ~      state.dy = 0 # if a collision occurred, the player's rect isn't moving because its path is blocked~
    +        outputs.primitives << mouse_overlay.border!
    +** Processing line: ~      else~
     - Inside source: true
     *** True Line Result
    -      state.dy = 0 # if a collision occurred, the player's rect isn't moving because its path is blocked
    +      else
    +** Processing line: ~        outputs.primitives << mouse_overlay.solid!~
    +- Inside source: true
    +*** True Line Result
    +        outputs.primitives << mouse_overlay.solid!
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -25372,218 +25659,198 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Finds collisions between the player's left side and the right side of a world_collision_rect.~
    -- Inside source: true
    -*** True Line Result
    -    # Finds collisions between the player's left side and the right side of a world_collision_rect.
    -** Processing line: ~    def collision_left!~
    +** Processing line: ~    def input_edit_map~
     - Inside source: true
     *** True Line Result
    -    def collision_left!
    -** Processing line: ~      return unless state.dx < 0 # return unless player is moving left~
    +    def input_edit_map
    +** Processing line: ~      state.mouse_held = true  if inputs.mouse.down~
     - Inside source: true
     *** True Line Result
    -      return unless state.dx < 0 # return unless player is moving left
    -** Processing line: ~      player_rect = [state.x - 0.1, state.y, state.tile_size, state.tile_size]~
    +      state.mouse_held = true  if inputs.mouse.down
    +** Processing line: ~      state.mouse_held = false if inputs.mouse.up~
     - Inside source: true
     *** True Line Result
    -      player_rect = [state.x - 0.1, state.y, state.tile_size, state.tile_size]
    +      state.mouse_held = false if inputs.mouse.up
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      # Goes through world_collision_rects to find all intersections beween the player's left side and the~
    +** Processing line: ~      if inputs.keyboard.x~
     - Inside source: true
     *** True Line Result
    -      # Goes through world_collision_rects to find all intersections beween the player's left side and the
    -** Processing line: ~      # right side of a world_collision_rect.~
    +      if inputs.keyboard.x
    +** Processing line: ~        state.delete_mode = true~
     - Inside source: true
     *** True Line Result
    -      # right side of a world_collision_rect.
    -** Processing line: ~      left_side_collisions = state.world_collision_rects~
    +        state.delete_mode = true
    +** Processing line: ~      elsif inputs.keyboard.key_up.x~
     - Inside source: true
     *** True Line Result
    -      left_side_collisions = state.world_collision_rects
    -** Processing line: ~                                 .find_all { |r| r[:left_right].intersect_rect?(player_rect, collision_tollerance) }~
    +      elsif inputs.keyboard.key_up.x
    +** Processing line: ~        state.delete_mode = false~
     - Inside source: true
     *** True Line Result
    -                                 .find_all { |r| r[:left_right].intersect_rect?(player_rect, collision_tollerance) }
    -** Processing line: ~                                 .first~
    +        state.delete_mode = false
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -                                 .first
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      return unless left_side_collisions # return unless collision occurred~
    +** Processing line: ~      return unless state.mouse_held~
     - Inside source: true
     *** True Line Result
    -      return unless left_side_collisions # return unless collision occurred
    +      return unless state.mouse_held
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      # player's x is set to the value of the x of the collided rect's right side~
    -- Inside source: true
    -*** True Line Result
    -      # player's x is set to the value of the x of the collided rect's right side
    -** Processing line: ~      state.x = left_side_collisions[:left_right].right~
    -- Inside source: true
    -*** True Line Result
    -      state.x = left_side_collisions[:left_right].right
    -** Processing line: ~      state.dx = 0 # player isn't moving left because its path is blocked~
    +** Processing line: ~      ordinal = { x: (inputs.mouse.x.idiv state.tile_size),~
     - Inside source: true
     *** True Line Result
    -      state.dx = 0 # player isn't moving left because its path is blocked
    -** Processing line: ~    end~
    +      ordinal = { x: (inputs.mouse.x.idiv state.tile_size),
    +** Processing line: ~                  y: (inputs.mouse.y.idiv state.tile_size) }~
     - Inside source: true
     *** True Line Result
    -    end
    +                  y: (inputs.mouse.y.idiv state.tile_size) }
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Finds collisions between the right side of the player and the left side of a world_collision_rect.~
    -- Inside source: true
    -*** True Line Result
    -    # Finds collisions between the right side of the player and the left side of a world_collision_rect.
    -** Processing line: ~    def collision_right!~
    +** Processing line: ~      found = find_tile ordinal~
     - Inside source: true
     *** True Line Result
    -    def collision_right!
    -** Processing line: ~      return unless state.dx > 0 # return unless player is moving right~
    +      found = find_tile ordinal
    +** Processing line: ~      if !found && !state.delete_mode~
     - Inside source: true
     *** True Line Result
    -      return unless state.dx > 0 # return unless player is moving right
    -** Processing line: ~      player_rect = [state.x + 0.1, state.y, state.tile_size, state.tile_size]~
    +      if !found && !state.delete_mode
    +** Processing line: ~        tiles << (state.new_entity :tile, ordinal)~
     - Inside source: true
     *** True Line Result
    -      player_rect = [state.x + 0.1, state.y, state.tile_size, state.tile_size]
    -** Processing line: ~~
    +        tiles << (state.new_entity :tile, ordinal)
    +** Processing line: ~        recompute_tiles~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      # Goes through world_collision_rects to find all intersections between the player's right side~
    +        recompute_tiles
    +** Processing line: ~      elsif found && state.delete_mode~
     - Inside source: true
     *** True Line Result
    -      # Goes through world_collision_rects to find all intersections between the player's right side
    -** Processing line: ~      # and the left side of a world_collision_rect (hence the "+0.1" above)~
    +      elsif found && state.delete_mode
    +** Processing line: ~        tiles.delete found~
     - Inside source: true
     *** True Line Result
    -      # and the left side of a world_collision_rect (hence the "+0.1" above)
    -** Processing line: ~      right_side_collisions = state.world_collision_rects~
    +        tiles.delete found
    +** Processing line: ~        recompute_tiles~
     - Inside source: true
     *** True Line Result
    -      right_side_collisions = state.world_collision_rects
    -** Processing line: ~                                  .find_all { |r| r[:left_right].intersect_rect?(player_rect, collision_tollerance) }~
    +        recompute_tiles
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -                                  .find_all { |r| r[:left_right].intersect_rect?(player_rect, collision_tollerance) }
    -** Processing line: ~                                  .first~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -                                  .first
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      return unless right_side_collisions # return unless collision occurred~
    +** Processing line: ~    def input_player~
     - Inside source: true
     *** True Line Result
    -      return unless right_side_collisions # return unless collision occurred
    +    def input_player
    +** Processing line: ~      player.dx += inputs.left_right~
    +- Inside source: true
    +*** True Line Result
    +      player.dx += inputs.left_right
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      # player's x is set to the value of the collided rect's left, minus the size of a rect~
    +** Processing line: ~      if inputs.keyboard.key_down.space && inputs.keyboard.down~
     - Inside source: true
     *** True Line Result
    -      # player's x is set to the value of the collided rect's left, minus the size of a rect
    -** Processing line: ~      # tile size is subtracted because player's position is denoted by bottom left corner~
    +      if inputs.keyboard.key_down.space && inputs.keyboard.down
    +** Processing line: ~        player.dy             = player.jump_power * -1~
     - Inside source: true
     *** True Line Result
    -      # tile size is subtracted because player's position is denoted by bottom left corner
    -** Processing line: ~      state.x = right_side_collisions[:left_right].left - state.tile_size~
    +        player.dy             = player.jump_power * -1
    +** Processing line: ~        player.jumped_at      = 0~
     - Inside source: true
     *** True Line Result
    -      state.x = right_side_collisions[:left_right].left - state.tile_size
    -** Processing line: ~      state.dx = 0 # player isn't moving right because its path is blocked~
    +        player.jumped_at      = 0
    +** Processing line: ~        player.jumped_down_at = state.tick_count~
     - Inside source: true
     *** True Line Result
    -      state.dx = 0 # player isn't moving right because its path is blocked
    -** Processing line: ~    end~
    +        player.jumped_down_at = state.tick_count
    +** Processing line: ~      elsif inputs.keyboard.key_down.space~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +      elsif inputs.keyboard.key_down.space
    +** Processing line: ~        player.dy             = player.jump_power~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # Finds collisions between the top of the player's rect and the bottom of a world_collision_rect.~
    +        player.dy             = player.jump_power
    +** Processing line: ~        player.jumped_at      = state.tick_count~
     - Inside source: true
     *** True Line Result
    -    # Finds collisions between the top of the player's rect and the bottom of a world_collision_rect.
    -** Processing line: ~    def collision_ceiling!~
    +        player.jumped_at      = state.tick_count
    +** Processing line: ~        player.jumped_down_at = 0~
     - Inside source: true
     *** True Line Result
    -    def collision_ceiling!
    -** Processing line: ~      return unless state.dy > 0 # return unless player is moving up~
    +        player.jumped_down_at = 0
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -      return unless state.dy > 0 # return unless player is moving up
    -** Processing line: ~      player_rect = [state.x, state.y + 0.1, state.tile_size, state.tile_size]~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      player_rect = [state.x, state.y + 0.1, state.tile_size, state.tile_size]
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      # Goes through world_collision_rects to find intersections between the bottom of a~
    -- Inside source: true
    -*** True Line Result
    -      # Goes through world_collision_rects to find intersections between the bottom of a
    -** Processing line: ~      # world_collision_rect and the top of the player's rect (hence the "+0.1" above)~
    -- Inside source: true
    -*** True Line Result
    -      # world_collision_rect and the top of the player's rect (hence the "+0.1" above)
    -** Processing line: ~      ceil_collisions = state.world_collision_rects~
    +** Processing line: ~    def calc_player~
     - Inside source: true
     *** True Line Result
    -      ceil_collisions = state.world_collision_rects
    -** Processing line: ~                            .find_all { |r| r[:bottom].intersect_rect?(player_rect, collision_tollerance) }~
    +    def calc_player
    +** Processing line: ~      calc_player_rect~
     - Inside source: true
     *** True Line Result
    -                            .find_all { |r| r[:bottom].intersect_rect?(player_rect, collision_tollerance) }
    -** Processing line: ~                            .first~
    +      calc_player_rect
    +** Processing line: ~      calc_below~
     - Inside source: true
     *** True Line Result
    -                            .first
    -** Processing line: ~~
    +      calc_below
    +** Processing line: ~      calc_left~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      return unless ceil_collisions # return unless collision occurred~
    +      calc_left
    +** Processing line: ~      calc_right~
     - Inside source: true
     *** True Line Result
    -      return unless ceil_collisions # return unless collision occurred
    -** Processing line: ~~
    +      calc_right
    +** Processing line: ~      calc_above~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      # player's y is set to the bottom y of the rect it collided with, minus the size of a rect~
    +      calc_above
    +** Processing line: ~      calc_player_dy~
     - Inside source: true
     *** True Line Result
    -      # player's y is set to the bottom y of the rect it collided with, minus the size of a rect
    -** Processing line: ~      state.y = ceil_collisions[:bottom].y - state.tile_size~
    +      calc_player_dy
    +** Processing line: ~      calc_player_dx~
     - Inside source: true
     *** True Line Result
    -      state.y = ceil_collisions[:bottom].y - state.tile_size
    -** Processing line: ~      state.dy = 0 # if a collision occurred, the player isn't moving up because its path is blocked~
    +      calc_player_dx
    +** Processing line: ~      reset_player if player_off_stage?~
     - Inside source: true
     *** True Line Result
    -      state.dy = 0 # if a collision occurred, the player isn't moving up because its path is blocked
    +      reset_player if player_off_stage?
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -25592,234 +25859,242 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Makes sure the player remains within the screen's dimensions.~
    +** Processing line: ~    def calc_player_rect~
     - Inside source: true
     *** True Line Result
    -    # Makes sure the player remains within the screen's dimensions.
    -** Processing line: ~    def calc_edge_collision~
    +    def calc_player_rect
    +** Processing line: ~      player.rect      = current_player_rect~
     - Inside source: true
     *** True Line Result
    -    def calc_edge_collision
    -** Processing line: ~~
    +      player.rect      = current_player_rect
    +** Processing line: ~      player.next_rect = player.rect.merge x: player.x + player.dx,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      #Ensures that the player doesn't fall below the map.~
    +      player.next_rect = player.rect.merge x: player.x + player.dx,
    +** Processing line: ~                                           y: player.y + player.dy~
     - Inside source: true
     *** True Line Result
    -      #Ensures that the player doesn't fall below the map.
    -** Processing line: ~      if state.y < 0~
    +                                           y: player.y + player.dy
    +** Processing line: ~      player.prev_rect = player.rect.merge x: player.x - player.dx,~
     - Inside source: true
     *** True Line Result
    -      if state.y < 0
    -** Processing line: ~        state.y = 0~
    +      player.prev_rect = player.rect.merge x: player.x - player.dx,
    +** Processing line: ~                                           y: player.y - player.dy~
     - Inside source: true
     *** True Line Result
    -        state.y = 0
    -** Processing line: ~        state.dy = 0~
    +                                           y: player.y - player.dy
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -        state.dy = 0
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      #Ensures that the player doesn't go too high.~
    +** Processing line: ~    def calc_below~
     - Inside source: true
     *** True Line Result
    -      #Ensures that the player doesn't go too high.
    -** Processing line: ~      # Position of player is denoted by bottom left hand corner, which is why we have to subtract the~
    +    def calc_below
    +** Processing line: ~      return unless player.dy <= 0~
     - Inside source: true
     *** True Line Result
    -      # Position of player is denoted by bottom left hand corner, which is why we have to subtract the
    -** Processing line: ~      # size of the player's box (so it remains visible on the screen)~
    +      return unless player.dy <= 0
    +** Processing line: ~      tiles_below = find_tiles { |t| t.rect.top <= player.y }~
     - Inside source: true
     *** True Line Result
    -      # size of the player's box (so it remains visible on the screen)
    -** Processing line: ~      elsif state.y > 720 - state.tile_size # if the player's y position exceeds the height of screen~
    +      tiles_below = find_tiles { |t| t.rect.top <= player.y }
    +** Processing line: ~      collision = find_colliding_tile tiles_below, (player.rect.merge y: player.next_rect.y)~
     - Inside source: true
     *** True Line Result
    -      elsif state.y > 720 - state.tile_size # if the player's y position exceeds the height of screen
    -** Processing line: ~        state.y = 720 - state.tile_size # the player will remain as high as possible while staying on screen~
    +      collision = find_colliding_tile tiles_below, (player.rect.merge y: player.next_rect.y)
    +** Processing line: ~      return unless collision~
     - Inside source: true
     *** True Line Result
    -        state.y = 720 - state.tile_size # the player will remain as high as possible while staying on screen
    -** Processing line: ~        state.dy = 0~
    +      return unless collision
    +** Processing line: ~      if collision.neighbors.b == :none && player.jumped_down_at.elapsed_time < 10~
     - Inside source: true
     *** True Line Result
    -        state.dy = 0
    -** Processing line: ~      end~
    +      if collision.neighbors.b == :none && player.jumped_down_at.elapsed_time < 10
    +** Processing line: ~        player.dy = -1~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +        player.dy = -1
    +** Processing line: ~      else~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      # Ensures that the player remains in the horizontal range that it is supposed to.~
    +      else
    +** Processing line: ~        player.y  = collision.rect.y + state.tile_size~
     - Inside source: true
     *** True Line Result
    -      # Ensures that the player remains in the horizontal range that it is supposed to.
    -** Processing line: ~      if state.x >= 1280 - state.tile_size && state.dx > 0 # if player moves too far right~
    +        player.y  = collision.rect.y + state.tile_size
    +** Processing line: ~        player.dy = 0~
     - Inside source: true
     *** True Line Result
    -      if state.x >= 1280 - state.tile_size && state.dx > 0 # if player moves too far right
    -** Processing line: ~        state.x = 1280 - state.tile_size # player will remain as right as possible while staying on screen~
    +        player.dy = 0
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -        state.x = 1280 - state.tile_size # player will remain as right as possible while staying on screen
    -** Processing line: ~        state.dx = 0~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -        state.dx = 0
    -** Processing line: ~      elsif state.x <= 0 && state.dx < 0 # if player moves too far left~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      elsif state.x <= 0 && state.dx < 0 # if player moves too far left
    -** Processing line: ~        state.x = 0 # player will remain as left as possible while remaining on screen~
    +
    +** Processing line: ~    def calc_left~
     - Inside source: true
     *** True Line Result
    -        state.x = 0 # player will remain as left as possible while remaining on screen
    -** Processing line: ~        state.dx = 0~
    +    def calc_left
    +** Processing line: ~      return unless player.dx < 0~
     - Inside source: true
     *** True Line Result
    -        state.dx = 0
    -** Processing line: ~      end~
    +      return unless player.dx < 0
    +** Processing line: ~      tiles_left = find_tiles { |t| t.rect.right <= player.prev_rect.left }~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +      tiles_left = find_tiles { |t| t.rect.right <= player.prev_rect.left }
    +** Processing line: ~      collision = find_colliding_tile tiles_left, (player.rect.merge x: player.next_rect.x)~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +      collision = find_colliding_tile tiles_left, (player.rect.merge x: player.next_rect.x)
    +** Processing line: ~      return unless collision~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # Processes input from the user on the keyboard.~
    +      return unless collision
    +** Processing line: ~      player.x  = collision.rect.right~
     - Inside source: true
     *** True Line Result
    -    # Processes input from the user on the keyboard.
    -** Processing line: ~    def process_inputs~
    +      player.x  = collision.rect.right
    +** Processing line: ~      player.dx = 0~
     - Inside source: true
     *** True Line Result
    -    def process_inputs
    -** Processing line: ~      if inputs.mouse.down~
    +      player.dx = 0
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      if inputs.mouse.down
    -** Processing line: ~        state.world_lookup = {}~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        state.world_lookup = {}
    -** Processing line: ~        x, y = to_coord inputs.mouse.down.point  # gets x, y coordinates for the grid~
    +
    +** Processing line: ~    def calc_right~
     - Inside source: true
     *** True Line Result
    -        x, y = to_coord inputs.mouse.down.point  # gets x, y coordinates for the grid
    -** Processing line: ~~
    +    def calc_right
    +** Processing line: ~      return unless player.dx > 0~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~        if state.world.any? { |loc| loc == [x, y] }  # checks if coordinates duplicate~
    +      return unless player.dx > 0
    +** Processing line: ~      tiles_right = find_tiles { |t| t.rect.left >= player.prev_rect.right }~
     - Inside source: true
     *** True Line Result
    -        if state.world.any? { |loc| loc == [x, y] }  # checks if coordinates duplicate
    -** Processing line: ~          state.world = state.world.reject { |loc| loc == [x, y] }  # erases tile space~
    +      tiles_right = find_tiles { |t| t.rect.left >= player.prev_rect.right }
    +** Processing line: ~      collision = find_colliding_tile tiles_right, (player.rect.merge x: player.next_rect.x)~
     - Inside source: true
     *** True Line Result
    -          state.world = state.world.reject { |loc| loc == [x, y] }  # erases tile space
    -** Processing line: ~        else~
    +      collision = find_colliding_tile tiles_right, (player.rect.merge x: player.next_rect.x)
    +** Processing line: ~      return unless collision~
     - Inside source: true
     *** True Line Result
    -        else
    -** Processing line: ~          state.world << [x, y] # If no duplicates, adds to world collection~
    +      return unless collision
    +** Processing line: ~      player.x  = collision.rect.left - player.rect.w~
     - Inside source: true
     *** True Line Result
    -          state.world << [x, y] # If no duplicates, adds to world collection
    -** Processing line: ~        end~
    +      player.x  = collision.rect.left - player.rect.w
    +** Processing line: ~      player.dx = 0~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~      end~
    +      player.dx = 0
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      end
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      # Sets dx to 0 if the player lets go of arrow keys.~
    +** Processing line: ~    def calc_above~
     - Inside source: true
     *** True Line Result
    -      # Sets dx to 0 if the player lets go of arrow keys.
    -** Processing line: ~      if inputs.keyboard.key_up.right~
    +    def calc_above
    +** Processing line: ~      return unless player.dy > 0~
     - Inside source: true
     *** True Line Result
    -      if inputs.keyboard.key_up.right
    -** Processing line: ~        state.dx = 0~
    +      return unless player.dy > 0
    +** Processing line: ~      tiles_above = find_tiles { |t| t.rect.y >= player.y }~
     - Inside source: true
     *** True Line Result
    -        state.dx = 0
    -** Processing line: ~      elsif inputs.keyboard.key_up.left~
    +      tiles_above = find_tiles { |t| t.rect.y >= player.y }
    +** Processing line: ~      collision = find_colliding_tile tiles_above, (player.rect.merge y: player.next_rect.y)~
     - Inside source: true
     *** True Line Result
    -      elsif inputs.keyboard.key_up.left
    -** Processing line: ~        state.dx = 0~
    +      collision = find_colliding_tile tiles_above, (player.rect.merge y: player.next_rect.y)
    +** Processing line: ~      return unless collision~
     - Inside source: true
     *** True Line Result
    -        state.dx = 0
    -** Processing line: ~      end~
    +      return unless collision
    +** Processing line: ~      return if collision.neighbors.t == :none~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +      return if collision.neighbors.t == :none
    +** Processing line: ~      player.dy = 0~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      # Sets dx to 3 in whatever direction the player chooses.~
    +      player.dy = 0
    +** Processing line: ~      player.y  = collision.rect.bottom - player.rect.h~
     - Inside source: true
     *** True Line Result
    -      # Sets dx to 3 in whatever direction the player chooses.
    -** Processing line: ~      if inputs.keyboard.key_held.right # if right key is pressed~
    +      player.y  = collision.rect.bottom - player.rect.h
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      if inputs.keyboard.key_held.right # if right key is pressed
    -** Processing line: ~        state.dx =  3~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        state.dx =  3
    -** Processing line: ~      elsif inputs.keyboard.key_held.left # if left key is pressed~
    +
    +** Processing line: ~    def calc_player_dx~
     - Inside source: true
     *** True Line Result
    -      elsif inputs.keyboard.key_held.left # if left key is pressed
    -** Processing line: ~        state.dx = -3~
    +    def calc_player_dx
    +** Processing line: ~      player.y  += player.dy~
     - Inside source: true
     *** True Line Result
    -        state.dx = -3
    -** Processing line: ~      end~
    +      player.y  += player.dy
    +** Processing line: ~      player.dy += state.gravity~
     - Inside source: true
     *** True Line Result
    -      end
    +      player.dy += state.gravity
    +** Processing line: ~      player.dy += player.dy * state.drag ** 2 * -1~
    +- Inside source: true
    +*** True Line Result
    +      player.dy += player.dy * state.drag ** 2 * -1
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      #Sets dy to 5 to make the player ~fly~ when they press the space bar~
    +** Processing line: ~    def calc_player_dy~
     - Inside source: true
     *** True Line Result
    -      #Sets dy to 5 to make the player ~fly~ when they press the space bar
    -** Processing line: ~      if inputs.keyboard.key_held.space~
    +    def calc_player_dy
    +** Processing line: ~      player.dx  = player.dx.clamp(-5,  5)~
     - Inside source: true
     *** True Line Result
    -      if inputs.keyboard.key_held.space
    -** Processing line: ~        state.dy = 5~
    +      player.dx  = player.dx.clamp(-5,  5)
    +** Processing line: ~      player.dx *= 0.9~
     - Inside source: true
     *** True Line Result
    -        state.dy = 5
    -** Processing line: ~      end~
    +      player.dx *= 0.9
    +** Processing line: ~      player.x  += player.dx~
     - Inside source: true
     *** True Line Result
    -      end
    +      player.x  += player.dx
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -25828,26 +26103,22 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def to_coord point~
    -- Inside source: true
    -*** True Line Result
    -    def to_coord point
    -** Processing line: ~~
    +** Processing line: ~    def reset_player~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      # Integer divides (idiv) point.x to turn into grid~
    +    def reset_player
    +** Processing line: ~      player.x  = 100~
     - Inside source: true
     *** True Line Result
    -      # Integer divides (idiv) point.x to turn into grid
    -** Processing line: ~      # Then, you can just multiply each integer by state.tile_size later so the grid coordinates.~
    +      player.x  = 100
    +** Processing line: ~      player.y  = 720~
     - Inside source: true
     *** True Line Result
    -      # Then, you can just multiply each integer by state.tile_size later so the grid coordinates.
    -** Processing line: ~      [point.x.idiv(state.tile_size), point.y.idiv(state.tile_size)]~
    +      player.y  = 720
    +** Processing line: ~      player.dy = 0~
     - Inside source: true
     *** True Line Result
    -      [point.x.idiv(state.tile_size), point.y.idiv(state.tile_size)]
    +      player.dy = 0
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -25856,102 +26127,126 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Represents the tolerance for a collision between the player's rect and another rect.~
    +** Processing line: ~    def recompute_tiles~
     - Inside source: true
     *** True Line Result
    -    # Represents the tolerance for a collision between the player's rect and another rect.
    -** Processing line: ~    def collision_tollerance~
    +    def recompute_tiles
    +** Processing line: ~      tiles.each do |t|~
     - Inside source: true
     *** True Line Result
    -    def collision_tollerance
    -** Processing line: ~      0.0~
    +      tiles.each do |t|
    +** Processing line: ~        t.w = state.tile_size~
     - Inside source: true
     *** True Line Result
    -      0.0
    -** Processing line: ~    end~
    +        t.w = state.tile_size
    +** Processing line: ~        t.h = state.tile_size~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~  end~
    +        t.h = state.tile_size
    +** Processing line: ~        t.neighbors = tile_neighbors t, tiles~
     - Inside source: true
     *** True Line Result
    -  end
    +        t.neighbors = tile_neighbors t, tiles
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  $platformer_physics = PoorManPlatformerPhysics.new~
    +** Processing line: ~        t.rect = [t.x * state.tile_size,~
     - Inside source: true
     *** True Line Result
    -  $platformer_physics = PoorManPlatformerPhysics.new
    +        t.rect = [t.x * state.tile_size,
    +** Processing line: ~                  t.y * state.tile_size,~
    +- Inside source: true
    +*** True Line Result
    +                  t.y * state.tile_size,
    +** Processing line: ~                  state.tile_size,~
    +- Inside source: true
    +*** True Line Result
    +                  state.tile_size,
    +** Processing line: ~                  state.tile_size].rect.to_hash~
    +- Inside source: true
    +*** True Line Result
    +                  state.tile_size].rect.to_hash
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def tick args~
    +** Processing line: ~        sprite_sub_path = t.neighbors.mask.map { |m| flip_bit m }.join("")~
     - Inside source: true
     *** True Line Result
    -  def tick args
    -** Processing line: ~    $platformer_physics.grid    = args.grid~
    +        sprite_sub_path = t.neighbors.mask.map { |m| flip_bit m }.join("")
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    $platformer_physics.grid    = args.grid
    -** Processing line: ~    $platformer_physics.inputs  = args.inputs~
    +
    +** Processing line: ~        t.sprite = {~
     - Inside source: true
     *** True Line Result
    -    $platformer_physics.inputs  = args.inputs
    -** Processing line: ~    $platformer_physics.state    = args.state~
    +        t.sprite = {
    +** Processing line: ~          x: t.x * state.tile_size,~
     - Inside source: true
     *** True Line Result
    -    $platformer_physics.state    = args.state
    -** Processing line: ~    $platformer_physics.outputs = args.outputs~
    +          x: t.x * state.tile_size,
    +** Processing line: ~          y: t.y * state.tile_size,~
     - Inside source: true
     *** True Line Result
    -    $platformer_physics.outputs = args.outputs
    -** Processing line: ~    $platformer_physics.tick~
    +          y: t.y * state.tile_size,
    +** Processing line: ~          w: state.tile_size,~
     - Inside source: true
     *** True Line Result
    -    $platformer_physics.tick
    -** Processing line: ~    tick_instructions args, "Sample app shows platformer collisions. CLICK to place box. ARROW keys to move around. SPACE to jump."~
    +          w: state.tile_size,
    +** Processing line: ~          h: state.tile_size,~
     - Inside source: true
     *** True Line Result
    -    tick_instructions args, "Sample app shows platformer collisions. CLICK to place box. ARROW keys to move around. SPACE to jump."
    -** Processing line: ~  end~
    +          h: state.tile_size,
    +** Processing line: ~          path: "sprites/tile/wall-#{sprite_sub_path}.png"~
     - Inside source: true
     *** True Line Result
    -  end
    +          path: "sprites/tile/wall-#{sprite_sub_path}.png"
    +** Processing line: ~        }~
    +- Inside source: true
    +*** True Line Result
    +        }
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def tick_instructions args, text, y = 715~
    +** Processing line: ~    def flip_bit bit~
     - Inside source: true
     *** True Line Result
    -  def tick_instructions args, text, y = 715
    -** Processing line: ~    return if args.state.key_event_occurred~
    +    def flip_bit bit
    +** Processing line: ~      return 0 if bit == 1~
     - Inside source: true
     *** True Line Result
    -    return if args.state.key_event_occurred
    -** Processing line: ~    if args.inputs.mouse.click ||~
    +      return 0 if bit == 1
    +** Processing line: ~      return 1~
     - Inside source: true
     *** True Line Result
    -    if args.inputs.mouse.click ||
    -** Processing line: ~       args.inputs.keyboard.directional_vector ||~
    +      return 1
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -       args.inputs.keyboard.directional_vector ||
    -** Processing line: ~       args.inputs.keyboard.key_down.enter ||~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -       args.inputs.keyboard.key_down.enter ||
    -** Processing line: ~       args.inputs.keyboard.key_down.escape~
    +
    +** Processing line: ~    def player~
     - Inside source: true
     *** True Line Result
    -       args.inputs.keyboard.key_down.escape
    -** Processing line: ~      args.state.key_event_occurred = true~
    +    def player
    +** Processing line: ~      state.player~
     - Inside source: true
     *** True Line Result
    -      args.state.key_event_occurred = true
    +      state.player
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -25960,302 +26255,370 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    args.outputs.debug << [0, y - 50, 1280, 60].solid~
    +** Processing line: ~    def player_off_stage?~
     - Inside source: true
     *** True Line Result
    -    args.outputs.debug << [0, y - 50, 1280, 60].solid
    -** Processing line: ~    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label~
    +    def player_off_stage?
    +** Processing line: ~      player.rect.top < grid.bottom ||~
     - Inside source: true
     *** True Line Result
    -    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label
    -** Processing line: ~    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label~
    +      player.rect.top < grid.bottom ||
    +** Processing line: ~      player.rect.right < grid.left ||~
     - Inside source: true
     *** True Line Result
    -    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label
    -** Processing line: ~  end~
    +      player.rect.right < grid.left ||
    +** Processing line: ~      player.rect.left > grid.right~
     - Inside source: true
     *** True Line Result
    -  end
    +      player.rect.left > grid.right
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~#+end_src~
    -- Line was identified as the end of a code block.
    +** Processing line: ~    def current_player_rect~
    +- Inside source: true
     *** True Line Result
    -#+end_src
    +    def current_player_rect
    +** Processing line: ~      { x: player.x, y: player.y, w: player.size, h: player.size }~
    +- Inside source: true
    +*** True Line Result
    +      { x: player.x, y: player.y, w: player.size, h: player.size }
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
     ** Processing line: ~~
    -- End of paragraph detected.
    +- Inside source: true
     *** True Line Result
     
    -** Processing line: ~*** Physics And Collisions - Box Collision 2 - main.rb~
    -- Header detected.
    +** Processing line: ~    def tiles~
    +- Inside source: true
     *** True Line Result
    -
    +    def tiles
    +** Processing line: ~      state.tiles~
    +- Inside source: true
     *** True Line Result
    -*** Physics And Collisions - Box Collision 2 - main.rb
    -** Processing line: ~#+begin_src ruby~
    -- Line was identified as the beginning of a code block.
    +      state.tiles
    +** Processing line: ~    end~
    +- Inside source: true
     *** True Line Result
    -
    +    end
    +** Processing line: ~~
    +- Inside source: true
     *** True Line Result
    -#+begin_src ruby
    -** Processing line: ~  # ./samples/04_physics_and_collisions/05_box_collision_2/app/main.rb~
    +
    +** Processing line: ~    def find_tile ordinal~
     - Inside source: true
     *** True Line Result
    -  # ./samples/04_physics_and_collisions/05_box_collision_2/app/main.rb
    -** Processing line: ~  =begin~
    +    def find_tile ordinal
    +** Processing line: ~      tiles.find { |t| t.x == ordinal.x && t.y == ordinal.y }~
     - Inside source: true
     *** True Line Result
    -  =begin
    -** Processing line: ~   APIs listing that haven't been encountered in previous sample apps:~
    +      tiles.find { |t| t.x == ordinal.x && t.y == ordinal.y }
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -   APIs listing that haven't been encountered in previous sample apps:
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~   - times: Performs an action a specific number of times.~
    +** Processing line: ~    def find_tiles &block~
     - Inside source: true
     *** True Line Result
    -   - times: Performs an action a specific number of times.
    -** Processing line: ~     For example, if we said~
    +    def find_tiles &block
    +** Processing line: ~      tiles.find_all(&block)~
     - Inside source: true
     *** True Line Result
    -     For example, if we said
    -** Processing line: ~     5.times puts "Hello DragonRuby",~
    +      tiles.find_all(&block)
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -     5.times puts "Hello DragonRuby",
    -** Processing line: ~     then we'd see the words "Hello DragonRuby" printed on the console 5 times.~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -     then we'd see the words "Hello DragonRuby" printed on the console 5 times.
    +
    +** Processing line: ~    def find_colliding_tile tiles, target~
    +- Inside source: true
    +*** True Line Result
    +    def find_colliding_tile tiles, target
    +** Processing line: ~      tiles.find { |t| t.rect.intersect_rect? target }~
    +- Inside source: true
    +*** True Line Result
    +      tiles.find { |t| t.rect.intersect_rect? target }
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~   - split: Divides a string into substrings based on a delimiter.~
    +** Processing line: ~    def tile_neighbors tile, other_points~
     - Inside source: true
     *** True Line Result
    -   - split: Divides a string into substrings based on a delimiter.
    -** Processing line: ~     For example, if we had a command~
    +    def tile_neighbors tile, other_points
    +** Processing line: ~      t = find_tile x: tile.x + 0, y: tile.y + 1~
     - Inside source: true
     *** True Line Result
    -     For example, if we had a command
    -** Processing line: ~     "DragonRuby is awesome".split(" ")~
    +      t = find_tile x: tile.x + 0, y: tile.y + 1
    +** Processing line: ~      r = find_tile x: tile.x + 1, y: tile.y + 0~
     - Inside source: true
     *** True Line Result
    -     "DragonRuby is awesome".split(" ")
    -** Processing line: ~     then the result would be~
    +      r = find_tile x: tile.x + 1, y: tile.y + 0
    +** Processing line: ~      b = find_tile x: tile.x + 0, y: tile.y - 1~
     - Inside source: true
     *** True Line Result
    -     then the result would be
    -** Processing line: ~     ["DragonRuby", "is", "awesome"] because the words are separated by a space delimiter.~
    +      b = find_tile x: tile.x + 0, y: tile.y - 1
    +** Processing line: ~      l = find_tile x: tile.x - 1, y: tile.y + 0~
     - Inside source: true
     *** True Line Result
    -     ["DragonRuby", "is", "awesome"] because the words are separated by a space delimiter.
    +      l = find_tile x: tile.x - 1, y: tile.y + 0
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~   - join: Opposite of split; converts each element of array to a string separated by delimiter.~
    +** Processing line: ~      tile_t, tile_r, tile_b, tile_l = 0~
     - Inside source: true
     *** True Line Result
    -   - join: Opposite of split; converts each element of array to a string separated by delimiter.
    -** Processing line: ~     For example, if we had a command~
    +      tile_t, tile_r, tile_b, tile_l = 0
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -     For example, if we had a command
    -** Processing line: ~     ["DragonRuby","is","awesome"].join(" ")~
    +
    +** Processing line: ~      tile_t = 1 if t~
     - Inside source: true
     *** True Line Result
    -     ["DragonRuby","is","awesome"].join(" ")
    -** Processing line: ~     then the result would be~
    +      tile_t = 1 if t
    +** Processing line: ~      tile_r = 1 if r~
     - Inside source: true
     *** True Line Result
    -     then the result would be
    -** Processing line: ~     "DragonRuby is awesome".~
    +      tile_r = 1 if r
    +** Processing line: ~      tile_b = 1 if b~
     - Inside source: true
     *** True Line Result
    -     "DragonRuby is awesome".
    +      tile_b = 1 if b
    +** Processing line: ~      tile_l = 1 if l~
    +- Inside source: true
    +*** True Line Result
    +      tile_l = 1 if l
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~   Reminders:~
    +** Processing line: ~      state.new_entity :neighbors, mask: [tile_t, tile_r, tile_b, tile_l],~
     - Inside source: true
     *** True Line Result
    -   Reminders:
    -** Processing line: ~~
    +      state.new_entity :neighbors, mask: [tile_t, tile_r, tile_b, tile_l],
    +** Processing line: ~                                   t:    t ? :some : :none,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   - to_s: Returns a string representation of an object.~
    +                                   t:    t ? :some : :none,
    +** Processing line: ~                                   b:    b ? :some : :none,~
     - Inside source: true
     *** True Line Result
    -   - to_s: Returns a string representation of an object.
    -** Processing line: ~     For example, if we had~
    +                                   b:    b ? :some : :none,
    +** Processing line: ~                                   l:    l ? :some : :none,~
     - Inside source: true
     *** True Line Result
    -     For example, if we had
    -** Processing line: ~     500.to_s~
    +                                   l:    l ? :some : :none,
    +** Processing line: ~                                   r:    r ? :some : :none~
     - Inside source: true
     *** True Line Result
    -     500.to_s
    -** Processing line: ~     the string "500" would be returned.~
    +                                   r:    r ? :some : :none
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -     the string "500" would be returned.
    -** Processing line: ~     Similar to to_i, which returns an integer representation of an object.~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -     Similar to to_i, which returns an integer representation of an object.
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~   - elapsed_time: How many frames have passed since the click event.~
    +** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
    -   - elapsed_time: How many frames have passed since the click event.
    -** Processing line: ~~
    +  def tick args
    +** Processing line: ~    $game ||= Game.new~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   - args.outputs.labels: An array. Values in the array generate labels on the screen.~
    +    $game ||= Game.new
    +** Processing line: ~    $game.args = args~
     - Inside source: true
     *** True Line Result
    -   - args.outputs.labels: An array. Values in the array generate labels on the screen.
    -** Processing line: ~     The parameters are: [X, Y, TEXT, SIZE, ALIGN, RED, GREEN, BLUE, ALPHA, FONT STYLE]~
    +    $game.args = args
    +** Processing line: ~    $game.tick~
     - Inside source: true
     *** True Line Result
    -     The parameters are: [X, Y, TEXT, SIZE, ALIGN, RED, GREEN, BLUE, ALPHA, FONT STYLE]
    -** Processing line: ~     For more information about labels, go to mygame/documentation/02-labels.md.~
    +    $game.tick
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -     For more information about labels, go to mygame/documentation/02-labels.md.
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~   - inputs.mouse.down: Determines whether or not the mouse is being pressed down.~
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
    +*** True Line Result
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +
    +** Processing line: ~*** Physics And Collisions - Jump Physics - main.rb~
    +- Header detected.
    +*** True Line Result
    +
    +*** True Line Result
    +*** Physics And Collisions - Jump Physics - main.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/04_physics_and_collisions/07_jump_physics/app/main.rb~
     - Inside source: true
     *** True Line Result
    -   - inputs.mouse.down: Determines whether or not the mouse is being pressed down.
    -** Processing line: ~     The position of the mouse when it is pressed down can be found using inputs.mouse.down.point.(x|y).~
    +  # ./samples/04_physics_and_collisions/07_jump_physics/app/main.rb
    +** Processing line: ~  =begin~
     - Inside source: true
     *** True Line Result
    -     The position of the mouse when it is pressed down can be found using inputs.mouse.down.point.(x|y).
    +  =begin
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~   - first: Returns the first element of the array.~
    +** Processing line: ~   Reminders:~
     - Inside source: true
     *** True Line Result
    -   - first: Returns the first element of the array.
    +   Reminders:
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~   - num1.idiv(num2): Divides two numbers and returns an integer.~
    +** Processing line: ~   - args.state.new_entity: Used when we want to create a new object, like a sprite or button.~
     - Inside source: true
     *** True Line Result
    -   - num1.idiv(num2): Divides two numbers and returns an integer.
    -** Processing line: ~~
    +   - args.state.new_entity: Used when we want to create a new object, like a sprite or button.
    +** Processing line: ~     For example, if we want to create a new button, we would declare it as a new entity and~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   - find_all: Finds all values that satisfy specific requirements.~
    +     For example, if we want to create a new button, we would declare it as a new entity and
    +** Processing line: ~     then define its properties. (Remember, you can use state to define ANY property and it will~
     - Inside source: true
     *** True Line Result
    -   - find_all: Finds all values that satisfy specific requirements.
    +     then define its properties. (Remember, you can use state to define ANY property and it will
    +** Processing line: ~     be retained across frames.)~
    +- Inside source: true
    +*** True Line Result
    +     be retained across frames.)
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~   - ARRAY#intersect_rect?: Returns true or false depending on if two rectangles intersect.~
    +** Processing line: ~   - args.outputs.solids: An array. The values generate a solid.~
     - Inside source: true
     *** True Line Result
    -   - ARRAY#intersect_rect?: Returns true or false depending on if two rectangles intersect.
    +   - args.outputs.solids: An array. The values generate a solid.
    +** Processing line: ~     The parameters for a solid are [X, Y, WIDTH, HEIGHT, RED, GREEN, BLUE]~
    +- Inside source: true
    +*** True Line Result
    +     The parameters for a solid are [X, Y, WIDTH, HEIGHT, RED, GREEN, BLUE]
    +** Processing line: ~     For more information about solids, go to mygame/documentation/03-solids-and-borders.md.~
    +- Inside source: true
    +*** True Line Result
    +     For more information about solids, go to mygame/documentation/03-solids-and-borders.md.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~   - reject: Removes elements from a collection if they meet certain requirements.~
    +** Processing line: ~   - num1.greater(num2): Returns the greater value.~
     - Inside source: true
     *** True Line Result
    -   - reject: Removes elements from a collection if they meet certain requirements.
    +   - num1.greater(num2): Returns the greater value.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~   - String interpolation: Uses #{} syntax; everything between the #{ and the } is evaluated~
    +** Processing line: ~   - Hashes: Collection of unique keys and their corresponding values. The value can be found~
     - Inside source: true
     *** True Line Result
    -   - String interpolation: Uses #{} syntax; everything between the #{ and the } is evaluated
    -** Processing line: ~     as Ruby code, and the placeholder is replaced with its corresponding value or result.~
    +   - Hashes: Collection of unique keys and their corresponding values. The value can be found
    +** Processing line: ~     using their keys.~
     - Inside source: true
     *** True Line Result
    -     as Ruby code, and the placeholder is replaced with its corresponding value or result.
    +     using their keys.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  =end~
    +** Processing line: ~   - ARRAY#inside_rect?: Returns true or false depending on if the point is inside the rect.~
     - Inside source: true
     *** True Line Result
    -  =end
    +   - ARRAY#inside_rect?: Returns true or false depending on if the point is inside the rect.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  MAP_FILE_PATH = 'app/map.txt' # the map.txt file in the app folder contains exported map~
    +** Processing line: ~  =end~
     - Inside source: true
     *** True Line Result
    -  MAP_FILE_PATH = 'app/map.txt' # the map.txt file in the app folder contains exported map
    +  =end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  class MetroidvaniaStarter~
    +** Processing line: ~  # This sample app is a game that requires the user to jump from one platform to the next.~
     - Inside source: true
     *** True Line Result
    -  class MetroidvaniaStarter
    -** Processing line: ~    attr_accessor :grid, :inputs, :state, :outputs, :gtk~
    +  # This sample app is a game that requires the user to jump from one platform to the next.
    +** Processing line: ~  # As the player successfully clears platforms, they become smaller and move faster.~
     - Inside source: true
     *** True Line Result
    -    attr_accessor :grid, :inputs, :state, :outputs, :gtk
    +  # As the player successfully clears platforms, they become smaller and move faster.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Calls methods needed to run the game properly.~
    +** Processing line: ~  class VerticalPlatformer~
     - Inside source: true
     *** True Line Result
    -    # Calls methods needed to run the game properly.
    -** Processing line: ~    def tick~
    +  class VerticalPlatformer
    +** Processing line: ~    attr_gtk~
     - Inside source: true
     *** True Line Result
    -    def tick
    -** Processing line: ~      defaults~
    +    attr_gtk
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      defaults
    -** Processing line: ~      render~
    +
    +** Processing line: ~    # declares vertical platformer as new entity~
     - Inside source: true
     *** True Line Result
    -      render
    -** Processing line: ~      calc~
    +    # declares vertical platformer as new entity
    +** Processing line: ~    def s~
     - Inside source: true
     *** True Line Result
    -      calc
    -** Processing line: ~      process_inputs~
    +    def s
    +** Processing line: ~      state.vertical_platformer ||= state.new_entity(:vertical_platformer)~
     - Inside source: true
     *** True Line Result
    -      process_inputs
    +      state.vertical_platformer ||= state.new_entity(:vertical_platformer)
    +** Processing line: ~      state.vertical_platformer~
    +- Inside source: true
    +*** True Line Result
    +      state.vertical_platformer
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -26264,366 +26627,354 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Sets all the default variables.~
    -- Inside source: true
    -*** True Line Result
    -    # Sets all the default variables.
    -** Processing line: ~    # '||' states that initialization occurs only in the first frame.~
    +** Processing line: ~    # creates a new platform using a hash~
     - Inside source: true
     *** True Line Result
    -    # '||' states that initialization occurs only in the first frame.
    -** Processing line: ~    def defaults~
    +    # creates a new platform using a hash
    +** Processing line: ~    def new_platform hash~
     - Inside source: true
     *** True Line Result
    -    def defaults
    -** Processing line: ~      state.tile_size                = 64~
    +    def new_platform hash
    +** Processing line: ~      s.new_entity_strict(:platform, hash) # platform key~
     - Inside source: true
     *** True Line Result
    -      state.tile_size                = 64
    -** Processing line: ~      state.gravity                  = -0.2~
    +      s.new_entity_strict(:platform, hash) # platform key
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      state.gravity                  = -0.2
    -** Processing line: ~      state.player_width             = 60~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      state.player_width             = 60
    -** Processing line: ~      state.player_height            = 64~
    +
    +** Processing line: ~    # calls methods needed for game to run properly~
     - Inside source: true
     *** True Line Result
    -      state.player_height            = 64
    -** Processing line: ~      state.collision_tolerance      = 0.0~
    +    # calls methods needed for game to run properly
    +** Processing line: ~    def tick~
     - Inside source: true
     *** True Line Result
    -      state.collision_tolerance      = 0.0
    -** Processing line: ~      state.previous_tile_size     ||= state.tile_size~
    +    def tick
    +** Processing line: ~      defaults~
     - Inside source: true
     *** True Line Result
    -      state.previous_tile_size     ||= state.tile_size
    -** Processing line: ~      state.x                      ||= 0~
    +      defaults
    +** Processing line: ~      render~
     - Inside source: true
     *** True Line Result
    -      state.x                      ||= 0
    -** Processing line: ~      state.y                      ||= 800~
    +      render
    +** Processing line: ~      calc~
     - Inside source: true
     *** True Line Result
    -      state.y                      ||= 800
    -** Processing line: ~      state.dy                     ||= 0~
    +      calc
    +** Processing line: ~      input~
     - Inside source: true
     *** True Line Result
    -      state.dy                     ||= 0
    -** Processing line: ~      state.dx                     ||= 0~
    +      input
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      state.dx                     ||= 0
    -** Processing line: ~      attempt_load_world_from_file~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      attempt_load_world_from_file
    -** Processing line: ~      state.world_lookup           ||= { }~
    +
    +** Processing line: ~    # Sets default values~
     - Inside source: true
     *** True Line Result
    -      state.world_lookup           ||= { }
    -** Processing line: ~      state.world_collision_rects  ||= []~
    +    # Sets default values
    +** Processing line: ~    def defaults~
     - Inside source: true
     *** True Line Result
    -      state.world_collision_rects  ||= []
    -** Processing line: ~      state.mode                   ||= :creating # alternates between :creating and :selecting for sprite selection~
    +    def defaults
    +** Processing line: ~      s.platforms ||= [ # initializes platforms collection with two platforms using hashes~
     - Inside source: true
     *** True Line Result
    -      state.mode                   ||= :creating # alternates between :creating and :selecting for sprite selection
    -** Processing line: ~      state.select_menu            ||= [0, 720, 1280, 720]~
    +      s.platforms ||= [ # initializes platforms collection with two platforms using hashes
    +** Processing line: ~        new_platform(x: 0, y: 0, w: 700, h: 32, dx: 1, speed: 0, rect: nil),~
     - Inside source: true
     *** True Line Result
    -      state.select_menu            ||= [0, 720, 1280, 720]
    -** Processing line: ~      #=======================================IMPORTANT=======================================#~
    +        new_platform(x: 0, y: 0, w: 700, h: 32, dx: 1, speed: 0, rect: nil),
    +** Processing line: ~        new_platform(x: 0, y: 300, w: 700, h: 32, dx: 1, speed: 0, rect: nil), # 300 pixels higher~
     - Inside source: true
     *** True Line Result
    -      #=======================================IMPORTANT=======================================#
    -** Processing line: ~      # When adding sprites, please label them "image1.png", "image2.png", image3".png", etc.~
    +        new_platform(x: 0, y: 300, w: 700, h: 32, dx: 1, speed: 0, rect: nil), # 300 pixels higher
    +** Processing line: ~      ]~
     - Inside source: true
     *** True Line Result
    -      # When adding sprites, please label them "image1.png", "image2.png", image3".png", etc.
    -** Processing line: ~      # Once you have done that, adjust "state.sprite_quantity" to how many sprites you have.~
    +      ]
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      # Once you have done that, adjust "state.sprite_quantity" to how many sprites you have.
    -** Processing line: ~      #=======================================================================================#~
    +
    +** Processing line: ~      s.tick_count  = args.state.tick_count~
     - Inside source: true
     *** True Line Result
    -      #=======================================================================================#
    -** Processing line: ~      state.sprite_quantity        ||= 20 # IMPORTANT TO ALTER IF SPRITES ADDED IF YOU ADD MORE SPRITES~
    +      s.tick_count  = args.state.tick_count
    +** Processing line: ~      s.gravity     = -0.3 # what goes up must come down because of gravity~
     - Inside source: true
     *** True Line Result
    -      state.sprite_quantity        ||= 20 # IMPORTANT TO ALTER IF SPRITES ADDED IF YOU ADD MORE SPRITES
    -** Processing line: ~      state.sprite_coords          ||= []~
    +      s.gravity     = -0.3 # what goes up must come down because of gravity
    +** Processing line: ~      s.player.platforms_cleared ||= 0 # counts how many platforms the player has successfully cleared~
     - Inside source: true
     *** True Line Result
    -      state.sprite_coords          ||= []
    -** Processing line: ~      state.banner_coords          ||= [640, 680 + 720]~
    +      s.player.platforms_cleared ||= 0 # counts how many platforms the player has successfully cleared
    +** Processing line: ~      s.player.x  ||= 0           # sets player values~
     - Inside source: true
     *** True Line Result
    -      state.banner_coords          ||= [640, 680 + 720]
    -** Processing line: ~      state.sprite_selected        ||= 1~
    +      s.player.x  ||= 0           # sets player values
    +** Processing line: ~      s.player.y  ||= 100~
     - Inside source: true
     *** True Line Result
    -      state.sprite_selected        ||= 1
    -** Processing line: ~      state.map_saved_at           ||= 0~
    +      s.player.y  ||= 100
    +** Processing line: ~      s.player.w  ||= 64~
     - Inside source: true
     *** True Line Result
    -      state.map_saved_at           ||= 0
    -** Processing line: ~~
    +      s.player.w  ||= 64
    +** Processing line: ~      s.player.h  ||= 64~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      # Sets all the cordinate values for the sprite selection screen into a grid~
    +      s.player.h  ||= 64
    +** Processing line: ~      s.player.dy ||= 0           # change in position~
     - Inside source: true
     *** True Line Result
    -      # Sets all the cordinate values for the sprite selection screen into a grid
    -** Processing line: ~      # Displayed when 's' is pressed by player to access sprites~
    +      s.player.dy ||= 0           # change in position
    +** Processing line: ~      s.player.dx ||= 0~
     - Inside source: true
     *** True Line Result
    -      # Displayed when 's' is pressed by player to access sprites
    -** Processing line: ~      if state.sprite_coords == [] # if sprite_coords is an empty array~
    +      s.player.dx ||= 0
    +** Processing line: ~      s.player_jump_power           = 15~
     - Inside source: true
     *** True Line Result
    -      if state.sprite_coords == [] # if sprite_coords is an empty array
    -** Processing line: ~        count = 1~
    +      s.player_jump_power           = 15
    +** Processing line: ~      s.player_jump_power_duration  = 10~
     - Inside source: true
     *** True Line Result
    -        count = 1
    -** Processing line: ~        temp_x = 165 # sets a starting x and y position for display~
    +      s.player_jump_power_duration  = 10
    +** Processing line: ~      s.player_max_run_speed        = 5~
     - Inside source: true
     *** True Line Result
    -        temp_x = 165 # sets a starting x and y position for display
    -** Processing line: ~        temp_y = 500 + 720~
    +      s.player_max_run_speed        = 5
    +** Processing line: ~      s.player_speed_slowdown_rate  = 0.9~
     - Inside source: true
     *** True Line Result
    -        temp_y = 500 + 720
    -** Processing line: ~        state.sprite_quantity.times do # for the number of sprites you have~
    +      s.player_speed_slowdown_rate  = 0.9
    +** Processing line: ~      s.player_acceleration         = 1~
     - Inside source: true
     *** True Line Result
    -        state.sprite_quantity.times do # for the number of sprites you have
    -** Processing line: ~          state.sprite_coords += [[temp_x, temp_y, count]] # add element to sprite_coords array~
    +      s.player_acceleration         = 1
    +** Processing line: ~      s.camera ||= { y: -100 } # shows view on screen (as the player moves upward, the camera does too)~
     - Inside source: true
     *** True Line Result
    -          state.sprite_coords += [[temp_x, temp_y, count]] # add element to sprite_coords array
    -** Processing line: ~          temp_x += 100 # increment temp_x~
    +      s.camera ||= { y: -100 } # shows view on screen (as the player moves upward, the camera does too)
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -          temp_x += 100 # increment temp_x
    -** Processing line: ~          count += 1 # increment count~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          count += 1 # increment count
    -** Processing line: ~          if temp_x > 1280 - (165 + 50) # if exceeding specific horizontal width on screen~
    +
    +** Processing line: ~    # Outputs objects onto the screen~
     - Inside source: true
     *** True Line Result
    -          if temp_x > 1280 - (165 + 50) # if exceeding specific horizontal width on screen
    -** Processing line: ~            temp_x = 165 # a new row of sprites starts~
    +    # Outputs objects onto the screen
    +** Processing line: ~    def render~
     - Inside source: true
     *** True Line Result
    -            temp_x = 165 # a new row of sprites starts
    -** Processing line: ~            temp_y -= 75 # new row of sprites starts 75 units lower than the previous row~
    +    def render
    +** Processing line: ~      outputs.solids << s.platforms.map do |p| # outputs platforms onto screen~
     - Inside source: true
     *** True Line Result
    -            temp_y -= 75 # new row of sprites starts 75 units lower than the previous row
    -** Processing line: ~          end~
    +      outputs.solids << s.platforms.map do |p| # outputs platforms onto screen
    +** Processing line: ~        [p.x + 300, p.y - s.camera[:y], p.w, p.h] # add 300 to place platform in horizontal center~
     - Inside source: true
     *** True Line Result
    -          end
    -** Processing line: ~        end~
    +        [p.x + 300, p.y - s.camera[:y], p.w, p.h] # add 300 to place platform in horizontal center
    +** Processing line: ~        # don't forget, position of platform is denoted by bottom left hand corner~
     - Inside source: true
     *** True Line Result
    -        end
    +        # don't forget, position of platform is denoted by bottom left hand corner
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
           end
    -** Processing line: ~    end~
    -- Inside source: true
    -*** True Line Result
    -    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Places sprites~
    +** Processing line: ~      # outputs player using hash~
     - Inside source: true
     *** True Line Result
    -    # Places sprites
    -** Processing line: ~    def render~
    +      # outputs player using hash
    +** Processing line: ~      outputs.solids << {~
     - Inside source: true
     *** True Line Result
    -    def render
    -** Processing line: ~~
    +      outputs.solids << {
    +** Processing line: ~        x: s.player.x + 300, # player positioned on top of platform~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      # Sets the x, y, width, height, and image path for each sprite in the world collection.~
    +        x: s.player.x + 300, # player positioned on top of platform
    +** Processing line: ~        y: s.player.y - s.camera[:y],~
     - Inside source: true
     *** True Line Result
    -      # Sets the x, y, width, height, and image path for each sprite in the world collection.
    -** Processing line: ~      outputs.sprites << state.world.map do |x, y, sprite|~
    +        y: s.player.y - s.camera[:y],
    +** Processing line: ~        w: s.player.w,~
     - Inside source: true
     *** True Line Result
    -      outputs.sprites << state.world.map do |x, y, sprite|
    -** Processing line: ~        [x * state.tile_size, # multiply by size so grid coordinates; pixel value of location~
    +        w: s.player.w,
    +** Processing line: ~        h: s.player.h,~
     - Inside source: true
     *** True Line Result
    -        [x * state.tile_size, # multiply by size so grid coordinates; pixel value of location
    -** Processing line: ~         y * state.tile_size,~
    +        h: s.player.h,
    +** Processing line: ~        r: 100,              # color saturation~
     - Inside source: true
     *** True Line Result
    -         y * state.tile_size,
    -** Processing line: ~         state.tile_size,~
    +        r: 100,              # color saturation
    +** Processing line: ~        g: 100,~
     - Inside source: true
     *** True Line Result
    -         state.tile_size,
    -** Processing line: ~         state.tile_size,~
    +        g: 100,
    +** Processing line: ~        b: 200~
     - Inside source: true
     *** True Line Result
    -         state.tile_size,
    -** Processing line: ~         'sprites/image' + sprite.to_s + '.png'] # uses concatenation to create unique image path~
    +        b: 200
    +** Processing line: ~      }~
     - Inside source: true
     *** True Line Result
    -         'sprites/image' + sprite.to_s + '.png'] # uses concatenation to create unique image path
    -** Processing line: ~      end~
    +      }
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      end
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      # Outputs sprite for the player by setting x, y, width, height, and image path~
    +** Processing line: ~    # Performs calculations~
     - Inside source: true
     *** True Line Result
    -      # Outputs sprite for the player by setting x, y, width, height, and image path
    -** Processing line: ~      outputs.sprites << [state.x,~
    +    # Performs calculations
    +** Processing line: ~    def calc~
     - Inside source: true
     *** True Line Result
    -      outputs.sprites << [state.x,
    -** Processing line: ~                          state.y,~
    +    def calc
    +** Processing line: ~      s.platforms.each do |p| # for each platform in the collection~
     - Inside source: true
     *** True Line Result
    -                          state.y,
    -** Processing line: ~                          state.player_width,~
    +      s.platforms.each do |p| # for each platform in the collection
    +** Processing line: ~        p.rect = [p.x, p.y, p.w, p.h] # set the definition~
     - Inside source: true
     *** True Line Result
    -                          state.player_width,
    -** Processing line: ~                          state.player_height,'sprites/player.png']~
    +        p.rect = [p.x, p.y, p.w, p.h] # set the definition
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -                          state.player_height,'sprites/player.png']
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      # Outputs labels as primitives in top right of the screen~
    -- Inside source: true
    -*** True Line Result
    -      # Outputs labels as primitives in top right of the screen
    -** Processing line: ~      outputs.primitives << [920, 700, 'Press \'s\' to access sprites.', 1, 0].label~
    +** Processing line: ~      # sets player point by adding half the player's width to the player's x~
     - Inside source: true
     *** True Line Result
    -      outputs.primitives << [920, 700, 'Press \'s\' to access sprites.', 1, 0].label
    -** Processing line: ~      outputs.primitives << [920, 675, 'Click existing sprite to delete.', 1, 0].label~
    +      # sets player point by adding half the player's width to the player's x
    +** Processing line: ~      s.player.point = [s.player.x + s.player.w.half, s.player.y] # change + to - and see what happens!~
     - Inside source: true
     *** True Line Result
    -      outputs.primitives << [920, 675, 'Click existing sprite to delete.', 1, 0].label
    +      s.player.point = [s.player.x + s.player.w.half, s.player.y] # change + to - and see what happens!
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      outputs.primitives << [920, 640, '<- and -> to move.', 1, 0].label~
    +** Processing line: ~      # search the platforms collection to find if the player's point is inside the rect of a platform~
     - Inside source: true
     *** True Line Result
    -      outputs.primitives << [920, 640, '<- and -> to move.', 1, 0].label
    -** Processing line: ~      outputs.primitives << [920, 615, 'Press and hold space to jump.', 1, 0].label~
    +      # search the platforms collection to find if the player's point is inside the rect of a platform
    +** Processing line: ~      collision = s.platforms.find { |p| s.player.point.inside_rect? p.rect }~
     - Inside source: true
     *** True Line Result
    -      outputs.primitives << [920, 615, 'Press and hold space to jump.', 1, 0].label
    +      collision = s.platforms.find { |p| s.player.point.inside_rect? p.rect }
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      outputs.primitives << [920, 580, 'Press \'e\' to export current map.', 1, 0].label~
    +** Processing line: ~      # if collision occurred and player is moving down (or not moving vertically at all)~
     - Inside source: true
     *** True Line Result
    -      outputs.primitives << [920, 580, 'Press \'e\' to export current map.', 1, 0].label
    -** Processing line: ~~
    +      # if collision occurred and player is moving down (or not moving vertically at all)
    +** Processing line: ~      if collision && s.player.dy <= 0~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      # if the map is saved and less than 120 frames have passed, the label is displayed~
    +      if collision && s.player.dy <= 0
    +** Processing line: ~        s.player.y = collision.rect.y + collision.rect.h - 2 # player positioned on top of platform~
     - Inside source: true
     *** True Line Result
    -      # if the map is saved and less than 120 frames have passed, the label is displayed
    -** Processing line: ~      if state.map_saved_at > 0 && state.map_saved_at.elapsed_time < 120~
    +        s.player.y = collision.rect.y + collision.rect.h - 2 # player positioned on top of platform
    +** Processing line: ~        s.player.dy = 0 if s.player.dy < 0 # player stops moving vertically~
     - Inside source: true
     *** True Line Result
    -      if state.map_saved_at > 0 && state.map_saved_at.elapsed_time < 120
    -** Processing line: ~        outputs.primitives << [920, 555, 'Map has been exported!', 1, 0, 50, 100, 50].label~
    +        s.player.dy = 0 if s.player.dy < 0 # player stops moving vertically
    +** Processing line: ~        if !s.player.platform~
     - Inside source: true
     *** True Line Result
    -        outputs.primitives << [920, 555, 'Map has been exported!', 1, 0, 50, 100, 50].label
    -** Processing line: ~      end~
    +        if !s.player.platform
    +** Processing line: ~          s.player.dx = 0 # no horizontal movement~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +          s.player.dx = 0 # no horizontal movement
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      # If player hits 's', following appears~
    +        end
    +** Processing line: ~        # changes horizontal position of player by multiplying collision change in x (dx) by speed and adding it to current x~
     - Inside source: true
     *** True Line Result
    -      # If player hits 's', following appears
    -** Processing line: ~      if state.mode == :selecting~
    +        # changes horizontal position of player by multiplying collision change in x (dx) by speed and adding it to current x
    +** Processing line: ~        s.player.x += collision.dx * collision.speed~
     - Inside source: true
     *** True Line Result
    -      if state.mode == :selecting
    -** Processing line: ~        # White background for sprite selection~
    +        s.player.x += collision.dx * collision.speed
    +** Processing line: ~        s.player.platform = collision # player is on the platform that it collided with (or landed on)~
     - Inside source: true
     *** True Line Result
    -        # White background for sprite selection
    -** Processing line: ~        outputs.primitives << [state.select_menu, 255, 255, 255].solid~
    +        s.player.platform = collision # player is on the platform that it collided with (or landed on)
    +** Processing line: ~        if s.player.falling # if player is falling~
     - Inside source: true
     *** True Line Result
    -        outputs.primitives << [state.select_menu, 255, 255, 255].solid
    -** Processing line: ~~
    +        if s.player.falling # if player is falling
    +** Processing line: ~          s.player.dx = 0  # no horizontal movement~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~        # Select tile label at the top of the screen~
    +          s.player.dx = 0  # no horizontal movement
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -        # Select tile label at the top of the screen
    -** Processing line: ~        outputs.primitives << [state.banner_coords.x, state.banner_coords.y, "Select Sprite (sprites located in \"sprites\" folder)", 10, 1, 0, 0, 0, 255].label~
    +        end
    +** Processing line: ~        s.player.falling = false~
     - Inside source: true
     *** True Line Result
    -        outputs.primitives << [state.banner_coords.x, state.banner_coords.y, "Select Sprite (sprites located in \"sprites\" folder)", 10, 1, 0, 0, 0, 255].label
    -** Processing line: ~~
    +        s.player.falling = false
    +** Processing line: ~        s.player.jumped_at = nil~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~        # Places sprites in locations calculated in the defaults function~
    +        s.player.jumped_at = nil
    +** Processing line: ~      else~
     - Inside source: true
     *** True Line Result
    -        # Places sprites in locations calculated in the defaults function
    -** Processing line: ~        outputs.primitives << state.sprite_coords.map do |x, y, order|~
    +      else
    +** Processing line: ~        s.player.platform = nil # player is not on a platform~
     - Inside source: true
     *** True Line Result
    -        outputs.primitives << state.sprite_coords.map do |x, y, order|
    -** Processing line: ~          [x, y, 50, 50, 'sprites/image' + order.to_s + ".png"].sprite~
    +        s.player.platform = nil # player is not on a platform
    +** Processing line: ~        s.player.y  += s.player.dy # velocity is the change in position~
     - Inside source: true
     *** True Line Result
    -          [x, y, 50, 50, 'sprites/image' + order.to_s + ".png"].sprite
    -** Processing line: ~        end~
    +        s.player.y  += s.player.dy # velocity is the change in position
    +** Processing line: ~        s.player.dy += s.gravity # acceleration is the change in velocity; what goes up must come down~
     - Inside source: true
     *** True Line Result
    -        end
    +        s.player.dy += s.gravity # acceleration is the change in velocity; what goes up must come down
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    @@ -26632,638 +26983,666 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      # Creates sprite following mouse to help indicate which sprite you have selected~
    +** Processing line: ~      s.platforms.each do |p| # for each platform in the collection~
     - Inside source: true
     *** True Line Result
    -      # Creates sprite following mouse to help indicate which sprite you have selected
    -** Processing line: ~      # 10 is subtracted from the mouse's x position so that the sprite is not covered by the mouse icon~
    +      s.platforms.each do |p| # for each platform in the collection
    +** Processing line: ~        p.x += p.dx * p.speed # x is incremented by product of dx and speed (causes platform to move horizontally)~
     - Inside source: true
     *** True Line Result
    -      # 10 is subtracted from the mouse's x position so that the sprite is not covered by the mouse icon
    -** Processing line: ~      outputs.primitives << [inputs.mouse.position.x - 10, inputs.mouse.position.y,~
    +        p.x += p.dx * p.speed # x is incremented by product of dx and speed (causes platform to move horizontally)
    +** Processing line: ~        # changes platform's x so it moves left and right across the screen (between -300 and 300 pixels)~
     - Inside source: true
     *** True Line Result
    -      outputs.primitives << [inputs.mouse.position.x - 10, inputs.mouse.position.y,
    -** Processing line: ~                             10, 10, 'sprites/image' + state.sprite_selected.to_s + ".png"].sprite~
    +        # changes platform's x so it moves left and right across the screen (between -300 and 300 pixels)
    +** Processing line: ~        if p.x < -300 # if platform goes too far left~
     - Inside source: true
     *** True Line Result
    -                             10, 10, 'sprites/image' + state.sprite_selected.to_s + ".png"].sprite
    -** Processing line: ~    end~
    +        if p.x < -300 # if platform goes too far left
    +** Processing line: ~          p.dx *= -1 # dx is scaled down~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +          p.dx *= -1 # dx is scaled down
    +** Processing line: ~          p.x = -300 # as far left as possible within scope~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # Calls methods that perform calculations~
    +          p.x = -300 # as far left as possible within scope
    +** Processing line: ~        elsif p.x > (1000 - p.w) # if platform's x is greater than 300~
     - Inside source: true
     *** True Line Result
    -    # Calls methods that perform calculations
    -** Processing line: ~    def calc~
    +        elsif p.x > (1000 - p.w) # if platform's x is greater than 300
    +** Processing line: ~          p.dx *= -1~
     - Inside source: true
     *** True Line Result
    -    def calc
    -** Processing line: ~      calc_in_game~
    +          p.dx *= -1
    +** Processing line: ~          p.x = (1000 - p.w) # set to 300 (as far right as possible within scope)~
     - Inside source: true
     *** True Line Result
    -      calc_in_game
    -** Processing line: ~      calc_sprite_selection~
    +          p.x = (1000 - p.w) # set to 300 (as far right as possible within scope)
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -      calc_sprite_selection
    -** Processing line: ~    end~
    +        end
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    end
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Calls methods that perform calculations (if in creating mode)~
    -- Inside source: true
    -*** True Line Result
    -    # Calls methods that perform calculations (if in creating mode)
    -** Processing line: ~    def calc_in_game~
    +** Processing line: ~      delta = (s.player.y - s.camera[:y] - 100) # used to position camera view~
     - Inside source: true
     *** True Line Result
    -    def calc_in_game
    -** Processing line: ~      return unless state.mode == :creating~
    +      delta = (s.player.y - s.camera[:y] - 100) # used to position camera view
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      return unless state.mode == :creating
    -** Processing line: ~      calc_world_lookup~
    +
    +** Processing line: ~      if delta > -200~
     - Inside source: true
     *** True Line Result
    -      calc_world_lookup
    -** Processing line: ~      calc_player~
    +      if delta > -200
    +** Processing line: ~        s.camera[:y] += delta * 0.01 # allows player to see view as they move upwards~
     - Inside source: true
     *** True Line Result
    -      calc_player
    -** Processing line: ~    end~
    +        s.camera[:y] += delta * 0.01 # allows player to see view as they move upwards
    +** Processing line: ~        s.player.x  += s.player.dx # velocity is change in position; change in x increases by dx~
     - Inside source: true
     *** True Line Result
    -    end
    +        s.player.x  += s.player.dx # velocity is change in position; change in x increases by dx
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def calc_world_lookup~
    +** Processing line: ~        # searches platform collection to find platforms located more than 300 pixels above the player~
     - Inside source: true
     *** True Line Result
    -    def calc_world_lookup
    -** Processing line: ~      # If the tile size isn't equal to the previous tile size,~
    +        # searches platform collection to find platforms located more than 300 pixels above the player
    +** Processing line: ~        has_platforms = s.platforms.find { |p| p.y > (s.player.y + 300) }~
     - Inside source: true
     *** True Line Result
    -      # If the tile size isn't equal to the previous tile size,
    -** Processing line: ~      # the previous tile size is set to the tile size,~
    +        has_platforms = s.platforms.find { |p| p.y > (s.player.y + 300) }
    +** Processing line: ~        if !has_platforms # if there are no platforms 300 pixels above the player~
     - Inside source: true
     *** True Line Result
    -      # the previous tile size is set to the tile size,
    -** Processing line: ~      # and world_lookup hash is set to empty.~
    +        if !has_platforms # if there are no platforms 300 pixels above the player
    +** Processing line: ~          width = 700 - (700 * (0.1 * s.player.platforms_cleared)) # the next platform is smaller than previous~
     - Inside source: true
     *** True Line Result
    -      # and world_lookup hash is set to empty.
    -** Processing line: ~      if state.tile_size != state.previous_tile_size~
    +          width = 700 - (700 * (0.1 * s.player.platforms_cleared)) # the next platform is smaller than previous
    +** Processing line: ~          s.player.platforms_cleared += 1 # player successfully cleared another platform~
     - Inside source: true
     *** True Line Result
    -      if state.tile_size != state.previous_tile_size
    -** Processing line: ~        state.previous_tile_size = state.tile_size~
    +          s.player.platforms_cleared += 1 # player successfully cleared another platform
    +** Processing line: ~          last_platform = s.platforms[-1] # platform just cleared becomes last platform~
     - Inside source: true
     *** True Line Result
    -        state.previous_tile_size = state.tile_size
    -** Processing line: ~        state.world_lookup = {}~
    +          last_platform = s.platforms[-1] # platform just cleared becomes last platform
    +** Processing line: ~          # another platform is created 300 pixels above the last platform, and this~
     - Inside source: true
     *** True Line Result
    -        state.world_lookup = {}
    -** Processing line: ~      end~
    +          # another platform is created 300 pixels above the last platform, and this
    +** Processing line: ~          # new platform has a smaller width and moves faster than all previous platforms~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +          # new platform has a smaller width and moves faster than all previous platforms
    +** Processing line: ~          s.platforms << new_platform(x: (700 - width) * rand, # random x position~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      # return if world_lookup is not empty or if world is empty~
    +          s.platforms << new_platform(x: (700 - width) * rand, # random x position
    +** Processing line: ~                                      y: last_platform.y + 300,~
     - Inside source: true
     *** True Line Result
    -      # return if world_lookup is not empty or if world is empty
    -** Processing line: ~      return if state.world_lookup.keys.length > 0~
    +                                      y: last_platform.y + 300,
    +** Processing line: ~                                      w: width,~
     - Inside source: true
     *** True Line Result
    -      return if state.world_lookup.keys.length > 0
    -** Processing line: ~      return unless state.world.length > 0~
    +                                      w: width,
    +** Processing line: ~                                      h: 32,~
     - Inside source: true
     *** True Line Result
    -      return unless state.world.length > 0
    -** Processing line: ~~
    +                                      h: 32,
    +** Processing line: ~                                      dx: 1.randomize(:sign), # random change in x~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      # Searches through the world and finds the coordinates that exist~
    +                                      dx: 1.randomize(:sign), # random change in x
    +** Processing line: ~                                      speed: 2 * s.player.platforms_cleared,~
     - Inside source: true
     *** True Line Result
    -      # Searches through the world and finds the coordinates that exist
    -** Processing line: ~      state.world_lookup = {}~
    +                                      speed: 2 * s.player.platforms_cleared,
    +** Processing line: ~                                      rect: nil)~
     - Inside source: true
     *** True Line Result
    -      state.world_lookup = {}
    -** Processing line: ~      state.world.each { |x, y| state.world_lookup[[x, y]] = true }~
    +                                      rect: nil)
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -      state.world.each { |x, y| state.world_lookup[[x, y]] = true }
    -** Processing line: ~~
    +        end
    +** Processing line: ~      else~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      # Assigns collision rects for every sprite drawn~
    +      else
    +** Processing line: ~        s.as_hash.clear # otherwise clear the hash (no new platform is necessary)~
     - Inside source: true
     *** True Line Result
    -      # Assigns collision rects for every sprite drawn
    -** Processing line: ~      state.world_collision_rects =~
    +        s.as_hash.clear # otherwise clear the hash (no new platform is necessary)
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -      state.world_collision_rects =
    -** Processing line: ~        state.world_lookup~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -        state.world_lookup
    -** Processing line: ~             .keys~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -             .keys
    -** Processing line: ~             .map do |coord_x, coord_y|~
    +
    +** Processing line: ~    # Takes input from the user to move the player~
     - Inside source: true
     *** True Line Result
    -             .map do |coord_x, coord_y|
    -** Processing line: ~               s = state.tile_size~
    +    # Takes input from the user to move the player
    +** Processing line: ~    def input~
     - Inside source: true
     *** True Line Result
    -               s = state.tile_size
    -** Processing line: ~               # Multiplying by s (the size of a tile) ensures that the rect is~
    +    def input
    +** Processing line: ~      if inputs.keyboard.space # if the space bar is pressed~
     - Inside source: true
     *** True Line Result
    -               # Multiplying by s (the size of a tile) ensures that the rect is
    -** Processing line: ~               # placed exactly where you want it to be placed (causes grid to coordinate)~
    +      if inputs.keyboard.space # if the space bar is pressed
    +** Processing line: ~        s.player.jumped_at ||= s.tick_count # set to current frame~
     - Inside source: true
     *** True Line Result
    -               # placed exactly where you want it to be placed (causes grid to coordinate)
    -** Processing line: ~               # How many pixels horizontally across and vertically up and down~
    +        s.player.jumped_at ||= s.tick_count # set to current frame
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -               # How many pixels horizontally across and vertically up and down
    -** Processing line: ~               x = s * coord_x~
    +
    +** Processing line: ~        # if the time that has passed since the jump is less than the duration of a jump (10 frames)~
     - Inside source: true
     *** True Line Result
    -               x = s * coord_x
    -** Processing line: ~               y = s * coord_y~
    +        # if the time that has passed since the jump is less than the duration of a jump (10 frames)
    +** Processing line: ~        # and the player is not falling~
     - Inside source: true
     *** True Line Result
    -               y = s * coord_y
    -** Processing line: ~               {~
    +        # and the player is not falling
    +** Processing line: ~        if s.player.jumped_at.elapsed_time < s.player_jump_power_duration && !s.player.falling~
     - Inside source: true
     *** True Line Result
    -               {
    -** Processing line: ~                 args:       [coord_x, coord_y],~
    +        if s.player.jumped_at.elapsed_time < s.player_jump_power_duration && !s.player.falling
    +** Processing line: ~          s.player.dy = s.player_jump_power # player jumps up~
     - Inside source: true
     *** True Line Result
    -                 args:       [coord_x, coord_y],
    -** Processing line: ~                 left_right: [x,     y + 4, s,     s - 6], # hash keys and values~
    +          s.player.dy = s.player_jump_power # player jumps up
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -                 left_right: [x,     y + 4, s,     s - 6], # hash keys and values
    -** Processing line: ~                 top:        [x + 4, y + 6, s - 8, s - 6],~
    +        end
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -                 top:        [x + 4, y + 6, s - 8, s - 6],
    -** Processing line: ~                 bottom:     [x + 1, y - 1, s - 2, s - 8],~
    +      end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -                 bottom:     [x + 1, y - 1, s - 2, s - 8],
    -** Processing line: ~               }~
    +
    +** Processing line: ~      if inputs.keyboard.key_up.space # if space bar is in "up" state~
     - Inside source: true
     *** True Line Result
    -               }
    -** Processing line: ~             end~
    +      if inputs.keyboard.key_up.space # if space bar is in "up" state
    +** Processing line: ~        s.player.falling = true # player is falling~
     - Inside source: true
     *** True Line Result
    -             end
    -** Processing line: ~    end~
    +        s.player.falling = true # player is falling
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    end
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Calculates movement of player and calls methods that perform collision calculations~
    +** Processing line: ~      if inputs.keyboard.left # if left key is pressed~
     - Inside source: true
     *** True Line Result
    -    # Calculates movement of player and calls methods that perform collision calculations
    -** Processing line: ~    def calc_player~
    +      if inputs.keyboard.left # if left key is pressed
    +** Processing line: ~        s.player.dx -= s.player_acceleration # player's position changes, decremented by acceleration~
     - Inside source: true
     *** True Line Result
    -    def calc_player
    -** Processing line: ~      state.dy += state.gravity  # what goes up must come down because of gravity~
    +        s.player.dx -= s.player_acceleration # player's position changes, decremented by acceleration
    +** Processing line: ~        s.player.dx = s.player.dx.greater(-s.player_max_run_speed) # dx is either current dx or -5, whichever is greater~
     - Inside source: true
     *** True Line Result
    -      state.dy += state.gravity  # what goes up must come down because of gravity
    -** Processing line: ~      calc_box_collision~
    +        s.player.dx = s.player.dx.greater(-s.player_max_run_speed) # dx is either current dx or -5, whichever is greater
    +** Processing line: ~      elsif inputs.keyboard.right # if right key is pressed~
     - Inside source: true
     *** True Line Result
    -      calc_box_collision
    -** Processing line: ~      calc_edge_collision~
    +      elsif inputs.keyboard.right # if right key is pressed
    +** Processing line: ~        s.player.dx += s.player_acceleration # player's position changes, incremented by acceleration~
     - Inside source: true
     *** True Line Result
    -      calc_edge_collision
    -** Processing line: ~      state.y  += state.dy       # Since velocity is the change in position, the change in y increases by dy~
    +        s.player.dx += s.player_acceleration # player's position changes, incremented by acceleration
    +** Processing line: ~        s.player.dx  = s.player.dx.lesser(s.player_max_run_speed) # dx is either current dx or 5, whichever is lesser~
     - Inside source: true
     *** True Line Result
    -      state.y  += state.dy       # Since velocity is the change in position, the change in y increases by dy
    -** Processing line: ~      state.x  += state.dx       # Ditto line above but dx and x~
    +        s.player.dx  = s.player.dx.lesser(s.player_max_run_speed) # dx is either current dx or 5, whichever is lesser
    +** Processing line: ~      else~
     - Inside source: true
     *** True Line Result
    -      state.x  += state.dx       # Ditto line above but dx and x
    -** Processing line: ~      state.dx *= 0.8            # Scales dx down~
    +      else
    +** Processing line: ~        s.player.dx *= s.player_speed_slowdown_rate # scales dx down~
     - Inside source: true
     *** True Line Result
    -      state.dx *= 0.8            # Scales dx down
    +        s.player.dx *= s.player_speed_slowdown_rate # scales dx down
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
         end
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Calls methods that determine whether the player collides with any world_collision_rects.~
    +** Processing line: ~  $game = VerticalPlatformer.new~
     - Inside source: true
     *** True Line Result
    -    # Calls methods that determine whether the player collides with any world_collision_rects.
    -** Processing line: ~    def calc_box_collision~
    +  $game = VerticalPlatformer.new
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    def calc_box_collision
    -** Processing line: ~      return unless state.world_lookup.keys.length > 0 # return unless hash has atleast 1 key~
    +
    +** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
    -      return unless state.world_lookup.keys.length > 0 # return unless hash has atleast 1 key
    -** Processing line: ~      collision_floor~
    +  def tick args
    +** Processing line: ~    $game.args = args~
     - Inside source: true
     *** True Line Result
    -      collision_floor
    -** Processing line: ~      collision_left~
    +    $game.args = args
    +** Processing line: ~    $game.tick~
     - Inside source: true
     *** True Line Result
    -      collision_left
    -** Processing line: ~      collision_right~
    +    $game.tick
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -      collision_right
    -** Processing line: ~      collision_ceiling~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      collision_ceiling
    -** Processing line: ~    end~
    -- Inside source: true
    +
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
     *** True Line Result
    -    end
    +#+end_src
     ** Processing line: ~~
    -- Inside source: true
    +- End of paragraph detected.
     *** True Line Result
     
    -** Processing line: ~    # Finds collisions between the bottom of the player's rect and the top of a world_collision_rect.~
    -- Inside source: true
    +** Processing line: ~*** Physics And Collisions - Bouncing On Collision - ball.rb~
    +- Header detected.
     *** True Line Result
    -    # Finds collisions between the bottom of the player's rect and the top of a world_collision_rect.
    -** Processing line: ~    def collision_floor~
    -- Inside source: true
    +
     *** True Line Result
    -    def collision_floor
    -** Processing line: ~      return unless state.dy <= 0 # return unless player is going down or is as far down as possible~
    +*** Physics And Collisions - Bouncing On Collision - ball.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/04_physics_and_collisions/08_bouncing_on_collision/app/ball.rb~
     - Inside source: true
     *** True Line Result
    -      return unless state.dy <= 0 # return unless player is going down or is as far down as possible
    -** Processing line: ~      player_rect = [state.x, next_y, state.tile_size, state.tile_size] # definition of player~
    +  # ./samples/04_physics_and_collisions/08_bouncing_on_collision/app/ball.rb
    +** Processing line: ~  GRAVITY = -0.08~
     - Inside source: true
     *** True Line Result
    -      player_rect = [state.x, next_y, state.tile_size, state.tile_size] # definition of player
    +  GRAVITY = -0.08
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      # Runs through all the sprites on the field and finds all intersections between player's~
    +** Processing line: ~  class Ball~
     - Inside source: true
     *** True Line Result
    -      # Runs through all the sprites on the field and finds all intersections between player's
    -** Processing line: ~      # bottom and the top of a rect.~
    +  class Ball
    +** Processing line: ~      attr_accessor :velocity, :center, :radius, :collision_enabled~
     - Inside source: true
     *** True Line Result
    -      # bottom and the top of a rect.
    -** Processing line: ~      floor_collisions = state.world_collision_rects~
    +      attr_accessor :velocity, :center, :radius, :collision_enabled
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      floor_collisions = state.world_collision_rects
    -** Processing line: ~                           .find_all { |r| r[:top].intersect_rect?(player_rect, state.collision_tolerance) }~
    +
    +** Processing line: ~      def initialize args~
     - Inside source: true
     *** True Line Result
    -                           .find_all { |r| r[:top].intersect_rect?(player_rect, state.collision_tolerance) }
    -** Processing line: ~                           .first~
    +      def initialize args
    +** Processing line: ~          #Start the ball in the top center~
     - Inside source: true
     *** True Line Result
    -                           .first
    +          #Start the ball in the top center
    +** Processing line: ~          #@x = args.grid.w / 2~
    +- Inside source: true
    +*** True Line Result
    +          #@x = args.grid.w / 2
    +** Processing line: ~          #@y = args.grid.h - 20~
    +- Inside source: true
    +*** True Line Result
    +          #@y = args.grid.h - 20
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      return unless floor_collisions # performs following changes if a collision has occurred~
    +** Processing line: ~          @velocity = {x: 0, y: 0}~
     - Inside source: true
     *** True Line Result
    -      return unless floor_collisions # performs following changes if a collision has occurred
    -** Processing line: ~      state.y = floor_collisions[:top].top # y of player is set to the y of the colliding rect's top~
    +          @velocity = {x: 0, y: 0}
    +** Processing line: ~          #@width =  20~
     - Inside source: true
     *** True Line Result
    -      state.y = floor_collisions[:top].top # y of player is set to the y of the colliding rect's top
    -** Processing line: ~      state.dy = 0 # no change in y because the player's path is blocked~
    +          #@width =  20
    +** Processing line: ~          #@height = @width~
     - Inside source: true
     *** True Line Result
    -      state.dy = 0 # no change in y because the player's path is blocked
    -** Processing line: ~    end~
    +          #@height = @width
    +** Processing line: ~          @radius = 20.0 / 2.0~
     - Inside source: true
     *** True Line Result
    -    end
    +          @radius = 20.0 / 2.0
    +** Processing line: ~          @center = {x: (args.grid.w / 2), y: (args.grid.h)}~
    +- Inside source: true
    +*** True Line Result
    +          @center = {x: (args.grid.w / 2), y: (args.grid.h)}
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Finds collisions between the player's left side and the right side of a world_collision_rect.~
    +** Processing line: ~          #@left_wall = (args.state.board_width + args.grid.w / 8)~
     - Inside source: true
     *** True Line Result
    -    # Finds collisions between the player's left side and the right side of a world_collision_rect.
    -** Processing line: ~    def collision_left~
    +          #@left_wall = (args.state.board_width + args.grid.w / 8)
    +** Processing line: ~          #@right_wall = @left_wall + args.state.board_width~
     - Inside source: true
     *** True Line Result
    -    def collision_left
    -** Processing line: ~      return unless state.dx < 0 # return unless player is moving left~
    +          #@right_wall = @left_wall + args.state.board_width
    +** Processing line: ~          @left_wall = 0~
     - Inside source: true
     *** True Line Result
    -      return unless state.dx < 0 # return unless player is moving left
    -** Processing line: ~      player_rect = [next_x, state.y, state.tile_size, state.tile_size]~
    +          @left_wall = 0
    +** Processing line: ~          @right_wall = $args.grid.right~
     - Inside source: true
     *** True Line Result
    -      player_rect = [next_x, state.y, state.tile_size, state.tile_size]
    +          @right_wall = $args.grid.right
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      # Runs through all the sprites on the field and finds all intersections between the player's left side~
    -- Inside source: true
    -*** True Line Result
    -      # Runs through all the sprites on the field and finds all intersections between the player's left side
    -** Processing line: ~      # and the right side of a rect.~
    -- Inside source: true
    -*** True Line Result
    -      # and the right side of a rect.
    -** Processing line: ~      left_side_collisions = state.world_collision_rects~
    +** Processing line: ~          @max_velocity = 7~
     - Inside source: true
     *** True Line Result
    -      left_side_collisions = state.world_collision_rects
    -** Processing line: ~                               .find_all { |r| r[:left_right].intersect_rect?(player_rect, state.collision_tolerance) }~
    +          @max_velocity = 7
    +** Processing line: ~          @collision_enabled = true~
     - Inside source: true
     *** True Line Result
    -                               .find_all { |r| r[:left_right].intersect_rect?(player_rect, state.collision_tolerance) }
    -** Processing line: ~                               .first~
    +          @collision_enabled = true
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -                               .first
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      return unless left_side_collisions # return unless collision occurred~
    +** Processing line: ~      #Move the ball according to its velocity~
     - Inside source: true
     *** True Line Result
    -      return unless left_side_collisions # return unless collision occurred
    -** Processing line: ~      state.x = left_side_collisions[:left_right].right # sets player's x to the x of the colliding rect's right side~
    +      #Move the ball according to its velocity
    +** Processing line: ~      def update args~
     - Inside source: true
     *** True Line Result
    -      state.x = left_side_collisions[:left_right].right # sets player's x to the x of the colliding rect's right side
    -** Processing line: ~      state.dx = 0 # no change in x because the player's path is blocked~
    +      def update args
    +** Processing line: ~        @center.x += @velocity.x~
     - Inside source: true
     *** True Line Result
    -      state.dx = 0 # no change in x because the player's path is blocked
    -** Processing line: ~    end~
    +        @center.x += @velocity.x
    +** Processing line: ~        @center.y += @velocity.y~
     - Inside source: true
     *** True Line Result
    -    end
    +        @center.y += @velocity.y
    +** Processing line: ~        @velocity.y += GRAVITY~
    +- Inside source: true
    +*** True Line Result
    +        @velocity.y += GRAVITY
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Finds collisions between the right side of the player and the left side of a world_collision_rect.~
    +** Processing line: ~        alpha = 0.2~
     - Inside source: true
     *** True Line Result
    -    # Finds collisions between the right side of the player and the left side of a world_collision_rect.
    -** Processing line: ~    def collision_right~
    +        alpha = 0.2
    +** Processing line: ~        if @center.y-@radius <= 0~
     - Inside source: true
     *** True Line Result
    -    def collision_right
    -** Processing line: ~      return unless state.dx > 0 # return unless player is moving right~
    +        if @center.y-@radius <= 0
    +** Processing line: ~          @velocity.y  = (@velocity.y.abs*0.7).abs~
     - Inside source: true
     *** True Line Result
    -      return unless state.dx > 0 # return unless player is moving right
    -** Processing line: ~      player_rect = [next_x, state.y, state.tile_size, state.tile_size]~
    +          @velocity.y  = (@velocity.y.abs*0.7).abs
    +** Processing line: ~          @velocity.x  = (@velocity.x.abs*0.9).abs * ((@velocity.x < 0) ? -1 : 1)~
     - Inside source: true
     *** True Line Result
    -      player_rect = [next_x, state.y, state.tile_size, state.tile_size]
    +          @velocity.x  = (@velocity.x.abs*0.9).abs * ((@velocity.x < 0) ? -1 : 1)
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      # Runs through all the sprites on the field and finds all intersections between the  player's~
    +** Processing line: ~          if @velocity.y.abs() < alpha~
     - Inside source: true
     *** True Line Result
    -      # Runs through all the sprites on the field and finds all intersections between the  player's
    -** Processing line: ~      # right side and the left side of a rect.~
    +          if @velocity.y.abs() < alpha
    +** Processing line: ~            @velocity.y=0~
     - Inside source: true
     *** True Line Result
    -      # right side and the left side of a rect.
    -** Processing line: ~      right_side_collisions = state.world_collision_rects~
    +            @velocity.y=0
    +** Processing line: ~          end~
     - Inside source: true
     *** True Line Result
    -      right_side_collisions = state.world_collision_rects
    -** Processing line: ~                                .find_all { |r| r[:left_right].intersect_rect?(player_rect, state.collision_tolerance) }~
    +          end
    +** Processing line: ~          if @velocity.x.abs() < alpha~
     - Inside source: true
     *** True Line Result
    -                                .find_all { |r| r[:left_right].intersect_rect?(player_rect, state.collision_tolerance) }
    -** Processing line: ~                                .first~
    +          if @velocity.x.abs() < alpha
    +** Processing line: ~            @velocity.x=0~
     - Inside source: true
     *** True Line Result
    -                                .first
    +            @velocity.x=0
    +** Processing line: ~          end~
    +- Inside source: true
    +*** True Line Result
    +          end
    +** Processing line: ~        end~
    +- Inside source: true
    +*** True Line Result
    +        end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      return unless right_side_collisions # return unless collision occurred~
    +** Processing line: ~        if @center.x > args.grid.right+@radius*2~
     - Inside source: true
     *** True Line Result
    -      return unless right_side_collisions # return unless collision occurred
    -** Processing line: ~      state.x = right_side_collisions[:left_right].left - state.tile_size # player's x is set to the x of colliding rect's left side (minus tile size since x is the player's bottom left corner)~
    +        if @center.x > args.grid.right+@radius*2
    +** Processing line: ~          @center.x = 0-@radius~
     - Inside source: true
     *** True Line Result
    -      state.x = right_side_collisions[:left_right].left - state.tile_size # player's x is set to the x of colliding rect's left side (minus tile size since x is the player's bottom left corner)
    -** Processing line: ~      state.dx = 0 # no change in x because the player's path is blocked~
    +          @center.x = 0-@radius
    +** Processing line: ~        elsif @center.x< 0-@radius*2~
     - Inside source: true
     *** True Line Result
    -      state.dx = 0 # no change in x because the player's path is blocked
    -** Processing line: ~    end~
    +        elsif @center.x< 0-@radius*2
    +** Processing line: ~          @center.x = args.grid.right + @radius~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +          @center.x = args.grid.right + @radius
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # Finds collisions between the top of the player's rect and the bottom of a world_collision_rect.~
    +        end
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    # Finds collisions between the top of the player's rect and the bottom of a world_collision_rect.
    -** Processing line: ~    def collision_ceiling~
    +      end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    def collision_ceiling
    -** Processing line: ~      return unless state.dy > 0 # return unless player is moving up~
    +
    +** Processing line: ~      def wallBounds args~
     - Inside source: true
     *** True Line Result
    -      return unless state.dy > 0 # return unless player is moving up
    -** Processing line: ~      player_rect = [state.x, next_y, state.player_width, state.player_height]~
    +      def wallBounds args
    +** Processing line: ~          #if @x < @left_wall || @x + @width > @right_wall~
     - Inside source: true
     *** True Line Result
    -      player_rect = [state.x, next_y, state.player_width, state.player_height]
    -** Processing line: ~~
    +          #if @x < @left_wall || @x + @width > @right_wall
    +** Processing line: ~              #@velocity.x *= -1.1~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      # Runs through all the sprites on the field and finds all intersections between the player's top~
    +              #@velocity.x *= -1.1
    +** Processing line: ~              #if @velocity.x > @max_velocity~
     - Inside source: true
     *** True Line Result
    -      # Runs through all the sprites on the field and finds all intersections between the player's top
    -** Processing line: ~      # and the bottom of a rect.~
    +              #if @velocity.x > @max_velocity
    +** Processing line: ~                  #@velocity.x = @max_velocity~
     - Inside source: true
     *** True Line Result
    -      # and the bottom of a rect.
    -** Processing line: ~      ceil_collisions = state.world_collision_rects~
    +                  #@velocity.x = @max_velocity
    +** Processing line: ~              #elsif @velocity.x < @max_velocity * -1~
     - Inside source: true
     *** True Line Result
    -      ceil_collisions = state.world_collision_rects
    -** Processing line: ~                          .find_all { |r| r[:bottom].intersect_rect?(player_rect, state.collision_tolerance) }~
    +              #elsif @velocity.x < @max_velocity * -1
    +** Processing line: ~                  #@velocity.x = @max_velocity * -1~
     - Inside source: true
     *** True Line Result
    -                          .find_all { |r| r[:bottom].intersect_rect?(player_rect, state.collision_tolerance) }
    -** Processing line: ~                          .first~
    +                  #@velocity.x = @max_velocity * -1
    +** Processing line: ~              #end~
     - Inside source: true
     *** True Line Result
    -                          .first
    -** Processing line: ~~
    +              #end
    +** Processing line: ~          #end~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      return unless ceil_collisions # return unless collision occurred~
    +          #end
    +** Processing line: ~          #if @y < 0 || @y + @height > args.grid.h~
     - Inside source: true
     *** True Line Result
    -      return unless ceil_collisions # return unless collision occurred
    -** Processing line: ~      state.y = ceil_collisions[:bottom].y - state.tile_size # player's y is set to the y of the colliding rect's bottom (minus tile size)~
    +          #if @y < 0 || @y + @height > args.grid.h
    +** Processing line: ~              #@velocity.y *= -1.1~
     - Inside source: true
     *** True Line Result
    -      state.y = ceil_collisions[:bottom].y - state.tile_size # player's y is set to the y of the colliding rect's bottom (minus tile size)
    -** Processing line: ~      state.dy = 0 # no change in y because the player's path is blocked~
    +              #@velocity.y *= -1.1
    +** Processing line: ~              #if @velocity.y > @max_velocity~
     - Inside source: true
     *** True Line Result
    -      state.dy = 0 # no change in y because the player's path is blocked
    -** Processing line: ~    end~
    +              #if @velocity.y > @max_velocity
    +** Processing line: ~                  #@velocity.y = @max_velocity~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +                  #@velocity.y = @max_velocity
    +** Processing line: ~              #elsif @velocity.y < @max_velocity * -1~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # Makes sure the player remains within the screen's dimensions.~
    +              #elsif @velocity.y < @max_velocity * -1
    +** Processing line: ~                  #@velocity.y = @max_velocity * -1~
     - Inside source: true
     *** True Line Result
    -    # Makes sure the player remains within the screen's dimensions.
    -** Processing line: ~    def calc_edge_collision~
    +                  #@velocity.y = @max_velocity * -1
    +** Processing line: ~              #end~
     - Inside source: true
     *** True Line Result
    -    def calc_edge_collision
    -** Processing line: ~      # Ensures that player doesn't fall below the map~
    +              #end
    +** Processing line: ~          #end~
     - Inside source: true
     *** True Line Result
    -      # Ensures that player doesn't fall below the map
    -** Processing line: ~      if next_y < 0 && state.dy < 0 # if player is moving down and is about to fall (next_y) below the map's scope~
    +          #end
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -      if next_y < 0 && state.dy < 0 # if player is moving down and is about to fall (next_y) below the map's scope
    -** Processing line: ~        state.y = 0 # 0 is the lowest the player can be while staying on the screen~
    +      end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        state.y = 0 # 0 is the lowest the player can be while staying on the screen
    -** Processing line: ~        state.dy = 0~
    +
    +** Processing line: ~      #render the ball to the screen~
     - Inside source: true
     *** True Line Result
    -        state.dy = 0
    -** Processing line: ~      # Ensures player doesn't go insanely high~
    +      #render the ball to the screen
    +** Processing line: ~      def draw args~
     - Inside source: true
     *** True Line Result
    -      # Ensures player doesn't go insanely high
    -** Processing line: ~      elsif next_y > 720 - state.tile_size && state.dy > 0 # if player is moving up, about to exceed map's scope~
    +      def draw args
    +** Processing line: ~          #args.outputs.solids << [@x, @y, @width, @height, 255, 255, 0];~
     - Inside source: true
     *** True Line Result
    -      elsif next_y > 720 - state.tile_size && state.dy > 0 # if player is moving up, about to exceed map's scope
    -** Processing line: ~        state.y = 720 - state.tile_size # if we don't subtract tile_size, we won't be able to see the player on the screen~
    +          #args.outputs.solids << [@x, @y, @width, @height, 255, 255, 0];
    +** Processing line: ~          args.outputs.sprites << [~
     - Inside source: true
     *** True Line Result
    -        state.y = 720 - state.tile_size # if we don't subtract tile_size, we won't be able to see the player on the screen
    -** Processing line: ~        state.dy = 0~
    +          args.outputs.sprites << [
    +** Processing line: ~            @center.x-@radius,~
     - Inside source: true
     *** True Line Result
    -        state.dy = 0
    -** Processing line: ~      end~
    +            @center.x-@radius,
    +** Processing line: ~            @center.y-@radius,~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +            @center.y-@radius,
    +** Processing line: ~            @radius*2,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      # Ensures that player remains in the horizontal range its supposed to~
    +            @radius*2,
    +** Processing line: ~            @radius*2,~
     - Inside source: true
     *** True Line Result
    -      # Ensures that player remains in the horizontal range its supposed to
    -** Processing line: ~      if state.x >= 1280 - state.tile_size && state.dx > 0 # if the player is moving too far right~
    +            @radius*2,
    +** Processing line: ~            "sprites/circle-white.png",~
     - Inside source: true
     *** True Line Result
    -      if state.x >= 1280 - state.tile_size && state.dx > 0 # if the player is moving too far right
    -** Processing line: ~        state.x = 1280 - state.tile_size # farthest right the player can be while remaining in the screen's scope~
    +            "sprites/circle-white.png",
    +** Processing line: ~            0,~
     - Inside source: true
     *** True Line Result
    -        state.x = 1280 - state.tile_size # farthest right the player can be while remaining in the screen's scope
    -** Processing line: ~        state.dx = 0~
    +            0,
    +** Processing line: ~            255,~
     - Inside source: true
     *** True Line Result
    -        state.dx = 0
    -** Processing line: ~      elsif state.x <= 0 && state.dx < 0 # if the player is moving too far left~
    +            255,
    +** Processing line: ~            255,    #r~
     - Inside source: true
     *** True Line Result
    -      elsif state.x <= 0 && state.dx < 0 # if the player is moving too far left
    -** Processing line: ~        state.x = 0 # farthest left the player can be while remaining in the screen's scope~
    +            255,    #r
    +** Processing line: ~            0,    #g~
     - Inside source: true
     *** True Line Result
    -        state.x = 0 # farthest left the player can be while remaining in the screen's scope
    -** Processing line: ~        state.dx = 0~
    +            0,    #g
    +** Processing line: ~            255   #b~
     - Inside source: true
     *** True Line Result
    -        state.dx = 0
    +            255   #b
    +** Processing line: ~          ]~
    +- Inside source: true
    +*** True Line Result
    +          ]
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    @@ -27276,166 +27655,178 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def calc_sprite_selection~
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
    +*** True Line Result
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +
    +** Processing line: ~*** Physics And Collisions - Bouncing On Collision - block.rb~
    +- Header detected.
    +*** True Line Result
    +
    +*** True Line Result
    +*** Physics And Collisions - Bouncing On Collision - block.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/04_physics_and_collisions/08_bouncing_on_collision/app/block.rb~
     - Inside source: true
     *** True Line Result
    -    def calc_sprite_selection
    -** Processing line: ~      # Does the transition to bring down the select sprite screen~
    +  # ./samples/04_physics_and_collisions/08_bouncing_on_collision/app/block.rb
    +** Processing line: ~  DEGREES_TO_RADIANS = Math::PI / 180~
     - Inside source: true
     *** True Line Result
    -      # Does the transition to bring down the select sprite screen
    -** Processing line: ~      if state.mode == :selecting && state.select_menu.y != 0~
    +  DEGREES_TO_RADIANS = Math::PI / 180
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      if state.mode == :selecting && state.select_menu.y != 0
    -** Processing line: ~        state.select_menu.y = 0  # sets y position of select menu (shown when 's' is pressed)~
    +
    +** Processing line: ~  class Block~
     - Inside source: true
     *** True Line Result
    -        state.select_menu.y = 0  # sets y position of select menu (shown when 's' is pressed)
    -** Processing line: ~        state.banner_coords.y = 680 # sets y position of Select Sprite banner~
    +  class Block
    +** Processing line: ~    def initialize(x, y, block_size, rotation)~
     - Inside source: true
     *** True Line Result
    -        state.banner_coords.y = 680 # sets y position of Select Sprite banner
    -** Processing line: ~        state.sprite_coords = state.sprite_coords.map do |x, y, w, h|~
    +    def initialize(x, y, block_size, rotation)
    +** Processing line: ~      @x = x~
     - Inside source: true
     *** True Line Result
    -        state.sprite_coords = state.sprite_coords.map do |x, y, w, h|
    -** Processing line: ~          [x, y - 720, w, h] # sets definition of sprites (change '-' to '+' and the sprites can't be seen)~
    +      @x = x
    +** Processing line: ~      @y = y~
     - Inside source: true
     *** True Line Result
    -          [x, y - 720, w, h] # sets definition of sprites (change '-' to '+' and the sprites can't be seen)
    -** Processing line: ~        end~
    +      @y = y
    +** Processing line: ~      @block_size = block_size~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~      end~
    +      @block_size = block_size
    +** Processing line: ~      @rotation = rotation~
     - Inside source: true
     *** True Line Result
    -      end
    +      @rotation = rotation
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      # Does the transition to leave the select sprite screen~
    -- Inside source: true
    -*** True Line Result
    -      # Does the transition to leave the select sprite screen
    -** Processing line: ~      if state.mode == :creating  && state.select_menu.y != 720~
    +** Processing line: ~      #The repel velocity?~
     - Inside source: true
     *** True Line Result
    -      if state.mode == :creating  && state.select_menu.y != 720
    -** Processing line: ~        state.select_menu.y = 720 # sets y position of select menu (menu is retreated back up)~
    +      #The repel velocity?
    +** Processing line: ~      @velocity = {x: 2, y: 0}~
     - Inside source: true
     *** True Line Result
    -        state.select_menu.y = 720 # sets y position of select menu (menu is retreated back up)
    -** Processing line: ~        state.banner_coords.y = 1000 # sets y position of Select Sprite banner~
    +      @velocity = {x: 2, y: 0}
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        state.banner_coords.y = 1000 # sets y position of Select Sprite banner
    -** Processing line: ~        state.sprite_coords = state.sprite_coords.map do |x, y, w, h|~
    +
    +** Processing line: ~      horizontal_offset = (3 * block_size) * Math.cos(rotation * DEGREES_TO_RADIANS)~
     - Inside source: true
     *** True Line Result
    -        state.sprite_coords = state.sprite_coords.map do |x, y, w, h|
    -** Processing line: ~          [x, y + 720, w, h] # sets definition of all elements in collection~
    +      horizontal_offset = (3 * block_size) * Math.cos(rotation * DEGREES_TO_RADIANS)
    +** Processing line: ~      vertical_offset = block_size * Math.sin(rotation * DEGREES_TO_RADIANS)~
     - Inside source: true
     *** True Line Result
    -          [x, y + 720, w, h] # sets definition of all elements in collection
    -** Processing line: ~        end~
    +      vertical_offset = block_size * Math.sin(rotation * DEGREES_TO_RADIANS)
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~      end~
    +
    +** Processing line: ~      if rotation >= 0~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +      if rotation >= 0
    +** Processing line: ~        theta = 90 - rotation~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +        theta = 90 - rotation
    +** Processing line: ~        #The line doesn't visually line up exactly with the edge of the sprite, so artificially move it a bit~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def process_inputs~
    +        #The line doesn't visually line up exactly with the edge of the sprite, so artificially move it a bit
    +** Processing line: ~        modifier = 5~
     - Inside source: true
     *** True Line Result
    -    def process_inputs
    -** Processing line: ~      # If the state.mode is back and if the menu has retreated back up~
    +        modifier = 5
    +** Processing line: ~        x_offset = modifier * Math.cos(theta * DEGREES_TO_RADIANS)~
     - Inside source: true
     *** True Line Result
    -      # If the state.mode is back and if the menu has retreated back up
    -** Processing line: ~      # call methods that process user inputs~
    +        x_offset = modifier * Math.cos(theta * DEGREES_TO_RADIANS)
    +** Processing line: ~        y_offset = modifier * Math.sin(theta * DEGREES_TO_RADIANS)~
     - Inside source: true
     *** True Line Result
    -      # call methods that process user inputs
    -** Processing line: ~      if state.mode == :creating~
    +        y_offset = modifier * Math.sin(theta * DEGREES_TO_RADIANS)
    +** Processing line: ~        @x1 = @x - x_offset~
     - Inside source: true
     *** True Line Result
    -      if state.mode == :creating
    -** Processing line: ~        process_inputs_player_movement~
    +        @x1 = @x - x_offset
    +** Processing line: ~        @y1 = @y + y_offset~
     - Inside source: true
     *** True Line Result
    -        process_inputs_player_movement
    -** Processing line: ~        process_inputs_place_tile~
    +        @y1 = @y + y_offset
    +** Processing line: ~        @x2 = @x1 + horizontal_offset~
     - Inside source: true
     *** True Line Result
    -        process_inputs_place_tile
    -** Processing line: ~      end~
    +        @x2 = @x1 + horizontal_offset
    +** Processing line: ~        @y2 = @y1 + (vertical_offset * 3)~
     - Inside source: true
     *** True Line Result
    -      end
    +        @y2 = @y1 + (vertical_offset * 3)
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      # For each sprite_coordinate added, check what sprite was selected~
    -- Inside source: true
    -*** True Line Result
    -      # For each sprite_coordinate added, check what sprite was selected
    -** Processing line: ~      if state.mode == :selecting~
    +** Processing line: ~        @imaginary_line = [ @x1, @y1, @x2, @y2 ]~
     - Inside source: true
     *** True Line Result
    -      if state.mode == :selecting
    -** Processing line: ~        state.sprite_coords.map do |x, y, order| # goes through all sprites in collection~
    +        @imaginary_line = [ @x1, @y1, @x2, @y2 ]
    +** Processing line: ~      else~
     - Inside source: true
     *** True Line Result
    -        state.sprite_coords.map do |x, y, order| # goes through all sprites in collection
    -** Processing line: ~          # checks that a specific sprite was pressed based on x, y position~
    +      else
    +** Processing line: ~        theta = 90 + rotation~
     - Inside source: true
     *** True Line Result
    -          # checks that a specific sprite was pressed based on x, y position
    -** Processing line: ~          if inputs.mouse.down && # the && (and) sign means ALL statements must be true for the evaluation to be true~
    +        theta = 90 + rotation
    +** Processing line: ~        x_offset = @block_size * Math.cos(theta * DEGREES_TO_RADIANS)~
     - Inside source: true
     *** True Line Result
    -          if inputs.mouse.down && # the && (and) sign means ALL statements must be true for the evaluation to be true
    -** Processing line: ~             inputs.mouse.down.point.x >= x      && # x is greater than or equal to sprite's x and~
    +        x_offset = @block_size * Math.cos(theta * DEGREES_TO_RADIANS)
    +** Processing line: ~        y_offset = @block_size * Math.sin(theta * DEGREES_TO_RADIANS)~
     - Inside source: true
     *** True Line Result
    -             inputs.mouse.down.point.x >= x      && # x is greater than or equal to sprite's x and
    -** Processing line: ~             inputs.mouse.down.point.x <= x + 50 && # x is less than or equal to 50 pixels to the right~
    +        y_offset = @block_size * Math.sin(theta * DEGREES_TO_RADIANS)
    +** Processing line: ~        @x1 = @x + x_offset~
     - Inside source: true
     *** True Line Result
    -             inputs.mouse.down.point.x <= x + 50 && # x is less than or equal to 50 pixels to the right
    -** Processing line: ~             inputs.mouse.down.point.y >= y      && # y is greater than or equal to sprite's y~
    +        @x1 = @x + x_offset
    +** Processing line: ~        @y1 = @y + y_offset + 19~
     - Inside source: true
     *** True Line Result
    -             inputs.mouse.down.point.y >= y      && # y is greater than or equal to sprite's y
    -** Processing line: ~             inputs.mouse.down.point.y <= y + 50 # y is less than or equal to 50 pixels up~
    +        @y1 = @y + y_offset + 19
    +** Processing line: ~        @x2 = @x1 + horizontal_offset~
     - Inside source: true
     *** True Line Result
    -             inputs.mouse.down.point.y <= y + 50 # y is less than or equal to 50 pixels up
    -** Processing line: ~            state.sprite_selected = order # sprite is chosen~
    +        @x2 = @x1 + horizontal_offset
    +** Processing line: ~        @y2 = @y1 + (vertical_offset * 3)~
     - Inside source: true
     *** True Line Result
    -            state.sprite_selected = order # sprite is chosen
    -** Processing line: ~          end~
    +        @y2 = @y1 + (vertical_offset * 3)
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          end
    -** Processing line: ~        end~
    +
    +** Processing line: ~        @imaginary_line = [ @x1, @y1, @x2, @y2 ]~
     - Inside source: true
     *** True Line Result
    -        end
    +        @imaginary_line = [ @x1, @y1, @x2, @y2 ]
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    @@ -27444,14 +27835,6 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      inputs_export_stage~
    -- Inside source: true
    -*** True Line Result
    -      inputs_export_stage
    -** Processing line: ~      process_inputs_show_available_sprites~
    -- Inside source: true
    -*** True Line Result
    -      process_inputs_show_available_sprites
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -27460,82 +27843,86 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Moves the player based on the keys they press on their keyboard~
    +** Processing line: ~    def draw args~
     - Inside source: true
     *** True Line Result
    -    # Moves the player based on the keys they press on their keyboard
    -** Processing line: ~    def process_inputs_player_movement~
    +    def draw args
    +** Processing line: ~      args.outputs.sprites << [~
     - Inside source: true
     *** True Line Result
    -    def process_inputs_player_movement
    -** Processing line: ~      # Sets dx to 0 if the player lets go of arrow keys (player won't move left or right)~
    +      args.outputs.sprites << [
    +** Processing line: ~        @x,~
     - Inside source: true
     *** True Line Result
    -      # Sets dx to 0 if the player lets go of arrow keys (player won't move left or right)
    -** Processing line: ~      if inputs.keyboard.key_up.right~
    +        @x,
    +** Processing line: ~        @y,~
     - Inside source: true
     *** True Line Result
    -      if inputs.keyboard.key_up.right
    -** Processing line: ~        state.dx = 0~
    +        @y,
    +** Processing line: ~        @block_size*3,~
     - Inside source: true
     *** True Line Result
    -        state.dx = 0
    -** Processing line: ~      elsif inputs.keyboard.key_up.left~
    +        @block_size*3,
    +** Processing line: ~        @block_size,~
     - Inside source: true
     *** True Line Result
    -      elsif inputs.keyboard.key_up.left
    -** Processing line: ~        state.dx = 0~
    +        @block_size,
    +** Processing line: ~        "sprites/square-green.png",~
     - Inside source: true
     *** True Line Result
    -        state.dx = 0
    -** Processing line: ~      end~
    +        "sprites/square-green.png",
    +** Processing line: ~        @rotation~
     - Inside source: true
     *** True Line Result
    -      end
    +        @rotation
    +** Processing line: ~      ]~
    +- Inside source: true
    +*** True Line Result
    +      ]
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      # Sets dx to 3 in whatever direction the player chooses when they hold down (or press) the left or right keys~
    +** Processing line: ~      args.outputs.lines << @imaginary_line~
     - Inside source: true
     *** True Line Result
    -      # Sets dx to 3 in whatever direction the player chooses when they hold down (or press) the left or right keys
    -** Processing line: ~      if inputs.keyboard.key_held.right~
    +      args.outputs.lines << @imaginary_line
    +** Processing line: ~      args.outputs.solids << @debug_shape~
     - Inside source: true
     *** True Line Result
    -      if inputs.keyboard.key_held.right
    -** Processing line: ~        state.dx =  3~
    +      args.outputs.solids << @debug_shape
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -        state.dx =  3
    -** Processing line: ~      elsif inputs.keyboard.key_held.left~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      elsif inputs.keyboard.key_held.left
    -** Processing line: ~        state.dx = -3~
    +
    +** Processing line: ~    def multiply_matricies~
     - Inside source: true
     *** True Line Result
    -        state.dx = -3
    -** Processing line: ~      end~
    +    def multiply_matricies
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      end
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      # Sets dy to 5 to make the player ~fly~ when they press the space bar on their keyboard~
    +** Processing line: ~    def calc args~
     - Inside source: true
     *** True Line Result
    -      # Sets dy to 5 to make the player ~fly~ when they press the space bar on their keyboard
    -** Processing line: ~      if inputs.keyboard.key_held.space~
    +    def calc args
    +** Processing line: ~      if collision? args~
     - Inside source: true
     *** True Line Result
    -      if inputs.keyboard.key_held.space
    -** Processing line: ~        state.dy = 5~
    +      if collision? args
    +** Processing line: ~          collide args~
     - Inside source: true
     *** True Line Result
    -        state.dy = 5
    +          collide args
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    @@ -27548,158 +27935,150 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Adds tile in the place the user holds down the mouse~
    +** Processing line: ~    #Determine if the ball and block are touching~
     - Inside source: true
     *** True Line Result
    -    # Adds tile in the place the user holds down the mouse
    -** Processing line: ~    def process_inputs_place_tile~
    +    #Determine if the ball and block are touching
    +** Processing line: ~    def collision? args~
     - Inside source: true
     *** True Line Result
    -    def process_inputs_place_tile
    -** Processing line: ~      if inputs.mouse.down # if mouse is pressed~
    +    def collision? args
    +** Processing line: ~      #The minimum area enclosed by the center of the ball and the 2 corners of the block~
     - Inside source: true
     *** True Line Result
    -      if inputs.mouse.down # if mouse is pressed
    -** Processing line: ~        state.world_lookup = {}~
    +      #The minimum area enclosed by the center of the ball and the 2 corners of the block
    +** Processing line: ~      #If the area ever drops below this value, we know there is a collision~
     - Inside source: true
     *** True Line Result
    -        state.world_lookup = {}
    -** Processing line: ~        x, y = to_coord inputs.mouse.down.point # gets x, y coordinates for the grid~
    +      #If the area ever drops below this value, we know there is a collision
    +** Processing line: ~      min_area = ((@block_size * 3) * args.state.ball.radius) / 2~
     - Inside source: true
     *** True Line Result
    -        x, y = to_coord inputs.mouse.down.point # gets x, y coordinates for the grid
    +      min_area = ((@block_size * 3) * args.state.ball.radius) / 2
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~        # Checks if any coordinates duplicate (already exist in world)~
    -- Inside source: true
    -*** True Line Result
    -        # Checks if any coordinates duplicate (already exist in world)
    -** Processing line: ~        if state.world.any? { |existing_x, existing_y, n| existing_x == x && existing_y == y }~
    -- Inside source: true
    -*** True Line Result
    -        if state.world.any? { |existing_x, existing_y, n| existing_x == x && existing_y == y }
    -** Processing line: ~          #erases existing tile space by rejecting them from world~
    +** Processing line: ~      #https://www.mathopenref.com/coordtrianglearea.html~
     - Inside source: true
     *** True Line Result
    -          #erases existing tile space by rejecting them from world
    -** Processing line: ~          state.world = state.world.reject do |existing_x, existing_y, n|~
    +      #https://www.mathopenref.com/coordtrianglearea.html
    +** Processing line: ~      ax = @x1~
     - Inside source: true
     *** True Line Result
    -          state.world = state.world.reject do |existing_x, existing_y, n|
    -** Processing line: ~            existing_x == x && existing_y == y~
    +      ax = @x1
    +** Processing line: ~      ay = @y1~
     - Inside source: true
     *** True Line Result
    -            existing_x == x && existing_y == y
    -** Processing line: ~          end~
    +      ay = @y1
    +** Processing line: ~      bx = @x2~
     - Inside source: true
     *** True Line Result
    -          end
    -** Processing line: ~        else~
    +      bx = @x2
    +** Processing line: ~      by = @y2~
     - Inside source: true
     *** True Line Result
    -        else
    -** Processing line: ~          state.world << [x, y, state.sprite_selected] # If no duplicates, add the sprite~
    +      by = @y2
    +** Processing line: ~      cx = args.state.ball.center.x~
     - Inside source: true
     *** True Line Result
    -          state.world << [x, y, state.sprite_selected] # If no duplicates, add the sprite
    -** Processing line: ~        end~
    +      cx = args.state.ball.center.x
    +** Processing line: ~      cy = args.state.ball.center.y~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~      end~
    +      cy = args.state.ball.center.y
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +
    +** Processing line: ~      current_area = (ax*(by-cy)+bx*(cy-ay)+cx*(ay-by))/2~
     - Inside source: true
     *** True Line Result
    -    end
    +      current_area = (ax*(by-cy)+bx*(cy-ay)+cx*(ay-by))/2
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Stores/exports world collection's info (coordinates, sprite number) into a file~
    +** Processing line: ~      collision = false~
     - Inside source: true
     *** True Line Result
    -    # Stores/exports world collection's info (coordinates, sprite number) into a file
    -** Processing line: ~    def inputs_export_stage~
    +      collision = false
    +** Processing line: ~      if @rotation >= 0~
     - Inside source: true
     *** True Line Result
    -    def inputs_export_stage
    -** Processing line: ~      if inputs.keyboard.key_down.e # if "e" is pressed~
    +      if @rotation >= 0
    +** Processing line: ~        if (current_area < min_area &&~
     - Inside source: true
     *** True Line Result
    -      if inputs.keyboard.key_down.e # if "e" is pressed
    -** Processing line: ~        export_string = state.world.map do |x, y, sprite_number| # stores world info in a string~
    +        if (current_area < min_area &&
    +** Processing line: ~          current_area > 0 &&~
     - Inside source: true
     *** True Line Result
    -        export_string = state.world.map do |x, y, sprite_number| # stores world info in a string
    -** Processing line: ~          "#{x},#{y},#{sprite_number}"                           # using string interpolation~
    +          current_area > 0 &&
    +** Processing line: ~          args.state.ball.center.y > @y1 &&~
     - Inside source: true
     *** True Line Result
    -          "#{x},#{y},#{sprite_number}"                           # using string interpolation
    -** Processing line: ~        end~
    +          args.state.ball.center.y > @y1 &&
    +** Processing line: ~          args.state.ball.center.x < @x2)~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~        gtk.write_file(MAP_FILE_PATH, export_string.join("\n")) # writes string into a file~
    +          args.state.ball.center.x < @x2)
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        gtk.write_file(MAP_FILE_PATH, export_string.join("\n")) # writes string into a file
    -** Processing line: ~        state.map_saved_at = state.tick_count # frame number (passage of time) when the map was saved~
    +
    +** Processing line: ~          collision = true~
     - Inside source: true
     *** True Line Result
    -        state.map_saved_at = state.tick_count # frame number (passage of time) when the map was saved
    -** Processing line: ~      end~
    +          collision = true
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +        end
    +** Processing line: ~      else~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +      else
    +** Processing line: ~        if (current_area < min_area &&~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def process_inputs_show_available_sprites~
    +        if (current_area < min_area &&
    +** Processing line: ~          current_area > 0 &&~
     - Inside source: true
     *** True Line Result
    -    def process_inputs_show_available_sprites
    -** Processing line: ~      # Based on keyboard input, the entity (:creating and :selecting) switch~
    +          current_area > 0 &&
    +** Processing line: ~          args.state.ball.center.y > @y2 &&~
     - Inside source: true
     *** True Line Result
    -      # Based on keyboard input, the entity (:creating and :selecting) switch
    -** Processing line: ~      if inputs.keyboard.key_held.s && state.mode == :creating # if "s" is pressed and currently creating~
    +          args.state.ball.center.y > @y2 &&
    +** Processing line: ~          args.state.ball.center.x > @x1)~
     - Inside source: true
     *** True Line Result
    -      if inputs.keyboard.key_held.s && state.mode == :creating # if "s" is pressed and currently creating
    -** Processing line: ~        state.mode = :selecting # will change to selecting~
    +          args.state.ball.center.x > @x1)
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        state.mode = :selecting # will change to selecting
    -** Processing line: ~        inputs.keyboard.clear # VERY IMPORTANT! If not present, it'll flicker between on and off~
    +
    +** Processing line: ~        collision = true~
     - Inside source: true
     *** True Line Result
    -        inputs.keyboard.clear # VERY IMPORTANT! If not present, it'll flicker between on and off
    -** Processing line: ~      elsif inputs.keyboard.key_held.s && state.mode == :selecting # if "s" is pressed and currently selecting~
    +        collision = true
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -      elsif inputs.keyboard.key_held.s && state.mode == :selecting # if "s" is pressed and currently selecting
    -** Processing line: ~        state.mode = :creating # will change to creating~
    +        end
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -        state.mode = :creating # will change to creating
    -** Processing line: ~        inputs.keyboard.clear # VERY IMPORTANT! If not present, it'll flicker between on and off~
    +      end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        inputs.keyboard.clear # VERY IMPORTANT! If not present, it'll flicker between on and off
    -** Processing line: ~      end~
    +
    +** Processing line: ~      return collision~
     - Inside source: true
     *** True Line Result
    -      end
    +      return collision
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -27708,178 +28087,230 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Loads the world collection by reading from the map.txt file in the app folder~
    +** Processing line: ~    def collide args~
     - Inside source: true
     *** True Line Result
    -    # Loads the world collection by reading from the map.txt file in the app folder
    -** Processing line: ~    def attempt_load_world_from_file~
    +    def collide args
    +** Processing line: ~      #Slope of the block~
     - Inside source: true
     *** True Line Result
    -    def attempt_load_world_from_file
    -** Processing line: ~      return if state.world # return if the world collection is already populated~
    +      #Slope of the block
    +** Processing line: ~      slope = (@y2 - @y1) / (@x2 - @x1)~
     - Inside source: true
     *** True Line Result
    -      return if state.world # return if the world collection is already populated
    -** Processing line: ~      state.world ||= [] # initialized as an empty collection~
    +      slope = (@y2 - @y1) / (@x2 - @x1)
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      state.world ||= [] # initialized as an empty collection
    -** Processing line: ~      exported_world = gtk.read_file(MAP_FILE_PATH) # reads the file using the path mentioned at top of code~
    +
    +** Processing line: ~      #Create a unit vector and tilt it (@rotation) number of degrees~
     - Inside source: true
     *** True Line Result
    -      exported_world = gtk.read_file(MAP_FILE_PATH) # reads the file using the path mentioned at top of code
    -** Processing line: ~      return unless exported_world # return unless the file read was successful~
    +      #Create a unit vector and tilt it (@rotation) number of degrees
    +** Processing line: ~      x = -Math.cos(@rotation * DEGREES_TO_RADIANS)~
     - Inside source: true
     *** True Line Result
    -      return unless exported_world # return unless the file read was successful
    -** Processing line: ~      state.world = exported_world.each_line.map do |l| # perform action on each line of exported_world~
    +      x = -Math.cos(@rotation * DEGREES_TO_RADIANS)
    +** Processing line: ~      y = Math.sin(@rotation * DEGREES_TO_RADIANS)~
     - Inside source: true
     *** True Line Result
    -      state.world = exported_world.each_line.map do |l| # perform action on each line of exported_world
    -** Processing line: ~          l.split(',').map(&:to_i) # calls split using ',' as a delimiter, and invokes .map on the collection,~
    +      y = Math.sin(@rotation * DEGREES_TO_RADIANS)
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          l.split(',').map(&:to_i) # calls split using ',' as a delimiter, and invokes .map on the collection,
    -** Processing line: ~                                   # calling to_i (converts to integers) on each element~
    +
    +** Processing line: ~      #Find the vector that is perpendicular to the slope~
     - Inside source: true
     *** True Line Result
    -                                   # calling to_i (converts to integers) on each element
    -** Processing line: ~      end~
    +      #Find the vector that is perpendicular to the slope
    +** Processing line: ~      perpVect = { x: x, y: y }~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +      perpVect = { x: x, y: y }
    +** Processing line: ~      mag  = (perpVect.x**2 + perpVect.y**2)**0.5                                 # find the magniude of the perpVect~
     - Inside source: true
     *** True Line Result
    -    end
    +      mag  = (perpVect.x**2 + perpVect.y**2)**0.5                                 # find the magniude of the perpVect
    +** Processing line: ~      perpVect = {x: perpVect.x/(mag), y: perpVect.y/(mag)}                       # divide the perpVect by the magniude to make it a unit vector~
    +- Inside source: true
    +*** True Line Result
    +      perpVect = {x: perpVect.x/(mag), y: perpVect.y/(mag)}                       # divide the perpVect by the magniude to make it a unit vector
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Adds the change in y to y to determine the next y position of the player.~
    +** Processing line: ~      previousPosition = {                                                        # calculate an ESTIMATE of the previousPosition of the ball~
     - Inside source: true
     *** True Line Result
    -    # Adds the change in y to y to determine the next y position of the player.
    -** Processing line: ~    def next_y~
    +      previousPosition = {                                                        # calculate an ESTIMATE of the previousPosition of the ball
    +** Processing line: ~        x:args.state.ball.center.x-args.state.ball.velocity.x,~
     - Inside source: true
     *** True Line Result
    -    def next_y
    -** Processing line: ~      state.y + state.dy~
    +        x:args.state.ball.center.x-args.state.ball.velocity.x,
    +** Processing line: ~        y:args.state.ball.center.y-args.state.ball.velocity.y~
     - Inside source: true
     *** True Line Result
    -      state.y + state.dy
    -** Processing line: ~    end~
    +        y:args.state.ball.center.y-args.state.ball.velocity.y
    +** Processing line: ~      }~
     - Inside source: true
     *** True Line Result
    -    end
    +      }
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Determines next x position of player~
    +** Processing line: ~      velocityMag = (args.state.ball.velocity.x**2 + args.state.ball.velocity.y**2)**0.5 # the current velocity magnitude of the ball~
     - Inside source: true
     *** True Line Result
    -    # Determines next x position of player
    -** Processing line: ~    def next_x~
    +      velocityMag = (args.state.ball.velocity.x**2 + args.state.ball.velocity.y**2)**0.5 # the current velocity magnitude of the ball
    +** Processing line: ~      theta_ball = Math.atan2(args.state.ball.velocity.y, args.state.ball.velocity.x)         #the angle of the ball's velocity~
     - Inside source: true
     *** True Line Result
    -    def next_x
    -** Processing line: ~      if state.dx < 0 # if the player moves left~
    +      theta_ball = Math.atan2(args.state.ball.velocity.y, args.state.ball.velocity.x)         #the angle of the ball's velocity
    +** Processing line: ~      theta_repel = (180 * DEGREES_TO_RADIANS) - theta_ball + (@rotation * DEGREES_TO_RADIANS)~
     - Inside source: true
     *** True Line Result
    -      if state.dx < 0 # if the player moves left
    -** Processing line: ~        return state.x - (state.tile_size - state.player_width) # subtracts since the change in x is negative (player is moving left)~
    +      theta_repel = (180 * DEGREES_TO_RADIANS) - theta_ball + (@rotation * DEGREES_TO_RADIANS)
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        return state.x - (state.tile_size - state.player_width) # subtracts since the change in x is negative (player is moving left)
    -** Processing line: ~      else~
    +
    +** Processing line: ~      fbx = velocityMag * Math.cos(theta_ball)                                    #the x component of the ball's velocity~
     - Inside source: true
     *** True Line Result
    -      else
    -** Processing line: ~        return state.x + (state.tile_size - state.player_width) # adds since the change in x is positive (player is moving right)~
    +      fbx = velocityMag * Math.cos(theta_ball)                                    #the x component of the ball's velocity
    +** Processing line: ~      fby = velocityMag * Math.sin(theta_ball)                                    #the y component of the ball's velocity~
     - Inside source: true
     *** True Line Result
    -        return state.x + (state.tile_size - state.player_width) # adds since the change in x is positive (player is moving right)
    -** Processing line: ~      end~
    +      fby = velocityMag * Math.sin(theta_ball)                                    #the y component of the ball's velocity
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +
    +** Processing line: ~      frx = velocityMag * Math.cos(theta_repel)                                       #the x component of the repel's velocity | magnitude is set to twice of fbx~
     - Inside source: true
     *** True Line Result
    -    end
    +      frx = velocityMag * Math.cos(theta_repel)                                       #the x component of the repel's velocity | magnitude is set to twice of fbx
    +** Processing line: ~      fry = velocityMag * Math.sin(theta_repel)                                       #the y component of the repel's velocity | magnitude is set to twice of fby~
    +- Inside source: true
    +*** True Line Result
    +      fry = velocityMag * Math.sin(theta_repel)                                       #the y component of the repel's velocity | magnitude is set to twice of fby
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def to_coord point~
    +** Processing line: ~      args.state.display_value = velocityMag~
     - Inside source: true
     *** True Line Result
    -    def to_coord point
    -** Processing line: ~      # Integer divides (idiv) point.x to turn into grid~
    +      args.state.display_value = velocityMag
    +** Processing line: ~      fsumx = fbx+frx                                                             #sum of x forces~
     - Inside source: true
     *** True Line Result
    -      # Integer divides (idiv) point.x to turn into grid
    -** Processing line: ~      # Then, you can just multiply each integer by state.tile_size~
    +      fsumx = fbx+frx                                                             #sum of x forces
    +** Processing line: ~      fsumy = fby+fry                                                             #sum of y forces~
     - Inside source: true
     *** True Line Result
    -      # Then, you can just multiply each integer by state.tile_size
    -** Processing line: ~      # later and huzzah. Grid coordinates~
    +      fsumy = fby+fry                                                             #sum of y forces
    +** Processing line: ~      fr = velocityMag                                                            #fr is the resulting magnitude~
     - Inside source: true
     *** True Line Result
    -      # later and huzzah. Grid coordinates
    -** Processing line: ~      [point.x.idiv(state.tile_size), point.y.idiv(state.tile_size)]~
    +      fr = velocityMag                                                            #fr is the resulting magnitude
    +** Processing line: ~      thetaNew = Math.atan2(fsumy, fsumx)                                         #thetaNew is the resulting angle~
     - Inside source: true
     *** True Line Result
    -      [point.x.idiv(state.tile_size), point.y.idiv(state.tile_size)]
    -** Processing line: ~    end~
    +      thetaNew = Math.atan2(fsumy, fsumx)                                         #thetaNew is the resulting angle
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~  end~
    +
    +** Processing line: ~      xnew = fr*Math.cos(thetaNew)                                                #resulting x velocity~
     - Inside source: true
     *** True Line Result
    -  end
    +      xnew = fr*Math.cos(thetaNew)                                                #resulting x velocity
    +** Processing line: ~      ynew = fr*Math.sin(thetaNew)                                                #resulting y velocity~
    +- Inside source: true
    +*** True Line Result
    +      ynew = fr*Math.sin(thetaNew)                                                #resulting y velocity
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  $metroidvania_starter = MetroidvaniaStarter.new~
    +** Processing line: ~      dampener = 0.3~
     - Inside source: true
     *** True Line Result
    -  $metroidvania_starter = MetroidvaniaStarter.new
    +      dampener = 0.3
    +** Processing line: ~      ynew *= dampener * 0.5~
    +- Inside source: true
    +*** True Line Result
    +      ynew *= dampener * 0.5
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def tick args~
    +** Processing line: ~      #If the bounce is very low, that means the ball is rolling and we don't want to dampenen the X velocity~
     - Inside source: true
     *** True Line Result
    -  def tick args
    -** Processing line: ~      $metroidvania_starter.grid    = args.grid~
    +      #If the bounce is very low, that means the ball is rolling and we don't want to dampenen the X velocity
    +** Processing line: ~      if ynew > -0.1~
     - Inside source: true
     *** True Line Result
    -      $metroidvania_starter.grid    = args.grid
    -** Processing line: ~      $metroidvania_starter.inputs  = args.inputs~
    +      if ynew > -0.1
    +** Processing line: ~        xnew *= dampener~
     - Inside source: true
     *** True Line Result
    -      $metroidvania_starter.inputs  = args.inputs
    -** Processing line: ~      $metroidvania_starter.state   = args.state~
    +        xnew *= dampener
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -      $metroidvania_starter.state   = args.state
    -** Processing line: ~      $metroidvania_starter.outputs = args.outputs~
    +      end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      $metroidvania_starter.outputs = args.outputs
    -** Processing line: ~      $metroidvania_starter.gtk     = args.gtk~
    +
    +** Processing line: ~      #Add the sine component of gravity back in (X component)~
     - Inside source: true
     *** True Line Result
    -      $metroidvania_starter.gtk     = args.gtk
    -** Processing line: ~      $metroidvania_starter.tick~
    +      #Add the sine component of gravity back in (X component)
    +** Processing line: ~      gravity_x = 4 * Math.sin(@rotation * DEGREES_TO_RADIANS)~
     - Inside source: true
     *** True Line Result
    -      $metroidvania_starter.tick
    +      gravity_x = 4 * Math.sin(@rotation * DEGREES_TO_RADIANS)
    +** Processing line: ~      xnew += gravity_x~
    +- Inside source: true
    +*** True Line Result
    +      xnew += gravity_x
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      args.state.ball.velocity.x = -xnew~
    +- Inside source: true
    +*** True Line Result
    +      args.state.ball.velocity.x = -xnew
    +** Processing line: ~      args.state.ball.velocity.y = -ynew~
    +- Inside source: true
    +*** True Line Result
    +      args.state.ball.velocity.y = -ynew
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      #Set the position of the ball to the previous position so it doesn't warp throught the block~
    +- Inside source: true
    +*** True Line Result
    +      #Set the position of the ball to the previous position so it doesn't warp throught the block
    +** Processing line: ~      args.state.ball.center.x = previousPosition.x~
    +- Inside source: true
    +*** True Line Result
    +      args.state.ball.center.x = previousPosition.x
    +** Processing line: ~      args.state.ball.center.y = previousPosition.y~
    +- Inside source: true
    +*** True Line Result
    +      args.state.ball.center.y = previousPosition.y
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -27896,270 +28327,306 @@ Follows is a source code listing for all files that have been open sourced. This
     - End of paragraph detected.
     *** True Line Result
     
    -** Processing line: ~*** Physics And Collisions - Box Collision 3 - main.rb~
    +** Processing line: ~*** Physics And Collisions - Bouncing On Collision - cannon.rb~
     - Header detected.
     *** True Line Result
     
     *** True Line Result
    -*** Physics And Collisions - Box Collision 3 - main.rb
    +*** Physics And Collisions - Bouncing On Collision - cannon.rb
     ** Processing line: ~#+begin_src ruby~
     - Line was identified as the beginning of a code block.
     *** True Line Result
     
     *** True Line Result
     #+begin_src ruby
    -** Processing line: ~  # ./samples/04_physics_and_collisions/06_box_collision_3/app/main.rb~
    +** Processing line: ~  # ./samples/04_physics_and_collisions/08_bouncing_on_collision/app/cannon.rb~
     - Inside source: true
     *** True Line Result
    -  # ./samples/04_physics_and_collisions/06_box_collision_3/app/main.rb
    -** Processing line: ~  class Game~
    +  # ./samples/04_physics_and_collisions/08_bouncing_on_collision/app/cannon.rb
    +** Processing line: ~  class Cannon~
     - Inside source: true
     *** True Line Result
    -  class Game
    -** Processing line: ~    attr_gtk~
    +  class Cannon
    +** Processing line: ~    def initialize args~
     - Inside source: true
     *** True Line Result
    -    attr_gtk
    -** Processing line: ~~
    +    def initialize args
    +** Processing line: ~      @pointA = {x: args.grid.right/2,y: args.grid.top}~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def tick~
    +      @pointA = {x: args.grid.right/2,y: args.grid.top}
    +** Processing line: ~      @pointB = {x: args.inputs.mouse.x, y: args.inputs.mouse.y}~
     - Inside source: true
     *** True Line Result
    -    def tick
    -** Processing line: ~      defaults~
    +      @pointB = {x: args.inputs.mouse.x, y: args.inputs.mouse.y}
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      defaults
    -** Processing line: ~      render~
    +    end
    +** Processing line: ~    def update args~
     - Inside source: true
     *** True Line Result
    -      render
    -** Processing line: ~      input_edit_map~
    +    def update args
    +** Processing line: ~      activeBall = args.state.ball~
     - Inside source: true
     *** True Line Result
    -      input_edit_map
    -** Processing line: ~      input_player~
    +      activeBall = args.state.ball
    +** Processing line: ~      @pointB = {x: args.inputs.mouse.x, y: args.inputs.mouse.y}~
     - Inside source: true
     *** True Line Result
    -      input_player
    -** Processing line: ~      calc_player~
    +      @pointB = {x: args.inputs.mouse.x, y: args.inputs.mouse.y}
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      calc_player
    -** Processing line: ~    end~
    +
    +** Processing line: ~      if args.inputs.mouse.click~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +      if args.inputs.mouse.click
    +** Processing line: ~        alpha = 0.01~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def defaults~
    +        alpha = 0.01
    +** Processing line: ~        activeBall.velocity.y = (@pointB.y - @pointA.y) * alpha~
     - Inside source: true
     *** True Line Result
    -    def defaults
    -** Processing line: ~      state.gravity           = -0.4~
    +        activeBall.velocity.y = (@pointB.y - @pointA.y) * alpha
    +** Processing line: ~        activeBall.velocity.x = (@pointB.x - @pointA.x) * alpha~
     - Inside source: true
     *** True Line Result
    -      state.gravity           = -0.4
    -** Processing line: ~      state.drag              = 0.15~
    +        activeBall.velocity.x = (@pointB.x - @pointA.x) * alpha
    +** Processing line: ~        activeBall.center = {x: (args.grid.w / 2), y: (args.grid.h)}~
     - Inside source: true
     *** True Line Result
    -      state.drag              = 0.15
    -** Processing line: ~      state.tile_size         = 32~
    +        activeBall.center = {x: (args.grid.w / 2), y: (args.grid.h)}
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -      state.tile_size         = 32
    -** Processing line: ~      state.player.size       = 16~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      state.player.size       = 16
    -** Processing line: ~      state.player.jump_power = 12~
    +    end
    +** Processing line: ~    def render args~
     - Inside source: true
     *** True Line Result
    -      state.player.jump_power = 12
    +    def render args
    +** Processing line: ~      args.outputs.lines << [@pointA.x, @pointA.y, @pointB.x, @pointB.y]~
    +- Inside source: true
    +*** True Line Result
    +      args.outputs.lines << [@pointA.x, @pointA.y, @pointB.x, @pointB.y]
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      state.tiles                 ||= []~
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
    +*** True Line Result
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +
    +** Processing line: ~*** Physics And Collisions - Bouncing On Collision - main.rb~
    +- Header detected.
    +*** True Line Result
    +
    +*** True Line Result
    +*** Physics And Collisions - Bouncing On Collision - main.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/04_physics_and_collisions/08_bouncing_on_collision/app/main.rb~
     - Inside source: true
     *** True Line Result
    -      state.tiles                 ||= []
    -** Processing line: ~      state.player.y              ||= 800~
    +  # ./samples/04_physics_and_collisions/08_bouncing_on_collision/app/main.rb
    +** Processing line: ~  INFINITY= 10**10~
     - Inside source: true
     *** True Line Result
    -      state.player.y              ||= 800
    -** Processing line: ~      state.player.x              ||= 100~
    +  INFINITY= 10**10
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      state.player.x              ||= 100
    -** Processing line: ~      state.player.dy             ||= 0~
    +
    +** Processing line: ~  require 'app/vector2d.rb'~
     - Inside source: true
     *** True Line Result
    -      state.player.dy             ||= 0
    -** Processing line: ~      state.player.dx             ||= 0~
    +  require 'app/vector2d.rb'
    +** Processing line: ~  require 'app/peg.rb'~
     - Inside source: true
     *** True Line Result
    -      state.player.dx             ||= 0
    -** Processing line: ~      state.player.jumped_down_at ||= 0~
    +  require 'app/peg.rb'
    +** Processing line: ~  require 'app/block.rb'~
     - Inside source: true
     *** True Line Result
    -      state.player.jumped_down_at ||= 0
    -** Processing line: ~      state.player.jumped_at      ||= 0~
    +  require 'app/block.rb'
    +** Processing line: ~  require 'app/ball.rb'~
     - Inside source: true
     *** True Line Result
    -      state.player.jumped_at      ||= 0
    +  require 'app/ball.rb'
    +** Processing line: ~  require 'app/cannon.rb'~
    +- Inside source: true
    +*** True Line Result
    +  require 'app/cannon.rb'
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      calc_player_rect if !state.player.rect~
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      calc_player_rect if !state.player.rect
    -** Processing line: ~    end~
    +
    +** Processing line: ~  #Method to init default values~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +  #Method to init default values
    +** Processing line: ~  def defaults args~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def render~
    +  def defaults args
    +** Processing line: ~    args.state.pegs ||= []~
     - Inside source: true
     *** True Line Result
    -    def render
    -** Processing line: ~      outputs.labels << [10, 10.from_top, "tile: click to add a tile, hold X key and click to delete a tile."]~
    +    args.state.pegs ||= []
    +** Processing line: ~    args.state.blocks ||= []~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << [10, 10.from_top, "tile: click to add a tile, hold X key and click to delete a tile."]
    -** Processing line: ~      outputs.labels << [10, 35.from_top, "move: use left and right to move, space to jump, down and space to jump down."]~
    +    args.state.blocks ||= []
    +** Processing line: ~    args.state.cannon ||= Cannon.new args~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << [10, 35.from_top, "move: use left and right to move, space to jump, down and space to jump down."]
    -** Processing line: ~      outputs.labels << [10, 55.from_top, "      You can jump through or jump down through tiles with a height of 1."]~
    +    args.state.cannon ||= Cannon.new args
    +** Processing line: ~    args.state.ball ||= Ball.new args~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << [10, 55.from_top, "      You can jump through or jump down through tiles with a height of 1."]
    -** Processing line: ~      outputs.background_color = [80, 80, 80]~
    +    args.state.ball ||= Ball.new args
    +** Processing line: ~    args.state.horizontal_offset ||= 0~
     - Inside source: true
     *** True Line Result
    -      outputs.background_color = [80, 80, 80]
    -** Processing line: ~      outputs.sprites << tiles.map(&:sprite)~
    +    args.state.horizontal_offset ||= 0
    +** Processing line: ~    init_pegs args~
     - Inside source: true
     *** True Line Result
    -      outputs.sprites << tiles.map(&:sprite)
    -** Processing line: ~      outputs.sprites << (player.rect.merge path: 'sprites/square/green.png')~
    +    init_pegs args
    +** Processing line: ~    init_blocks args~
     - Inside source: true
     *** True Line Result
    -      outputs.sprites << (player.rect.merge path: 'sprites/square/green.png')
    +    init_blocks args
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      mouse_overlay = {~
    +** Processing line: ~    args.state.display_value ||= "test"~
     - Inside source: true
     *** True Line Result
    -      mouse_overlay = {
    -** Processing line: ~        x: (inputs.mouse.x.ifloor state.tile_size),~
    +    args.state.display_value ||= "test"
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -        x: (inputs.mouse.x.ifloor state.tile_size),
    -** Processing line: ~        y: (inputs.mouse.y.ifloor state.tile_size),~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        y: (inputs.mouse.y.ifloor state.tile_size),
    -** Processing line: ~        w: state.tile_size,~
    +
    +** Processing line: ~  begin :default_methods~
     - Inside source: true
     *** True Line Result
    -        w: state.tile_size,
    -** Processing line: ~        h: state.tile_size,~
    +  begin :default_methods
    +** Processing line: ~    def init_pegs args~
     - Inside source: true
     *** True Line Result
    -        h: state.tile_size,
    -** Processing line: ~        a: 100~
    +    def init_pegs args
    +** Processing line: ~      num_horizontal_pegs = 14~
     - Inside source: true
     *** True Line Result
    -        a: 100
    -** Processing line: ~      }~
    +      num_horizontal_pegs = 14
    +** Processing line: ~      num_rows = 5~
     - Inside source: true
     *** True Line Result
    -      }
    +      num_rows = 5
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      mouse_overlay = mouse_overlay.merge r: 255 if state.delete_mode~
    +** Processing line: ~      return unless args.state.pegs.count < num_rows * num_horizontal_pegs~
     - Inside source: true
     *** True Line Result
    -      mouse_overlay = mouse_overlay.merge r: 255 if state.delete_mode
    +      return unless args.state.pegs.count < num_rows * num_horizontal_pegs
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      if state.mouse_held~
    +** Processing line: ~      block_size = 32~
     - Inside source: true
     *** True Line Result
    -      if state.mouse_held
    -** Processing line: ~        outputs.primitives << mouse_overlay.border~
    +      block_size = 32
    +** Processing line: ~      block_spacing = 50~
     - Inside source: true
     *** True Line Result
    -        outputs.primitives << mouse_overlay.border
    -** Processing line: ~      else~
    +      block_spacing = 50
    +** Processing line: ~      total_width = num_horizontal_pegs * (block_size + block_spacing)~
     - Inside source: true
     *** True Line Result
    -      else
    -** Processing line: ~        outputs.primitives << mouse_overlay.solid~
    +      total_width = num_horizontal_pegs * (block_size + block_spacing)
    +** Processing line: ~      starting_offset = (args.grid.w - total_width) / 2 + block_size~
     - Inside source: true
     *** True Line Result
    -        outputs.primitives << mouse_overlay.solid
    -** Processing line: ~      end~
    +      starting_offset = (args.grid.w - total_width) / 2 + block_size
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +
    +** Processing line: ~      for i in (0...num_rows)~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +      for i in (0...num_rows)
    +** Processing line: ~        for j in (0...num_horizontal_pegs)~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def input_edit_map~
    +        for j in (0...num_horizontal_pegs)
    +** Processing line: ~          row_offset = 0~
     - Inside source: true
     *** True Line Result
    -    def input_edit_map
    -** Processing line: ~      state.mouse_held = true  if inputs.mouse.down~
    +          row_offset = 0
    +** Processing line: ~          if i % 2 == 0~
     - Inside source: true
     *** True Line Result
    -      state.mouse_held = true  if inputs.mouse.down
    -** Processing line: ~      state.mouse_held = false if inputs.mouse.up~
    +          if i % 2 == 0
    +** Processing line: ~            row_offset = 20~
     - Inside source: true
     *** True Line Result
    -      state.mouse_held = false if inputs.mouse.up
    -** Processing line: ~~
    +            row_offset = 20
    +** Processing line: ~          else~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      if inputs.keyboard.x~
    +          else
    +** Processing line: ~            row_offset = -20~
     - Inside source: true
     *** True Line Result
    -      if inputs.keyboard.x
    -** Processing line: ~        state.delete_mode = true~
    +            row_offset = -20
    +** Processing line: ~          end~
     - Inside source: true
     *** True Line Result
    -        state.delete_mode = true
    -** Processing line: ~      elsif inputs.keyboard.key_up.x~
    +          end
    +** Processing line: ~          args.state.pegs.append(Peg.new(j * (block_size+block_spacing) + starting_offset + row_offset, (args.grid.h - block_size * 2) - (i * block_size * 2)-90, block_size))~
     - Inside source: true
     *** True Line Result
    -      elsif inputs.keyboard.key_up.x
    -** Processing line: ~        state.delete_mode = false~
    +          args.state.pegs.append(Peg.new(j * (block_size+block_spacing) + starting_offset + row_offset, (args.grid.h - block_size * 2) - (i * block_size * 2)-90, block_size))
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -        state.delete_mode = false
    +        end
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    @@ -28168,158 +28635,158 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      return unless state.mouse_held~
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      return unless state.mouse_held
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      ordinal = { x: (inputs.mouse.x.idiv state.tile_size),~
    +** Processing line: ~    def init_blocks args~
     - Inside source: true
     *** True Line Result
    -      ordinal = { x: (inputs.mouse.x.idiv state.tile_size),
    -** Processing line: ~                  y: (inputs.mouse.y.idiv state.tile_size) }~
    +    def init_blocks args
    +** Processing line: ~      return unless args.state.blocks.count < 10~
     - Inside source: true
     *** True Line Result
    -                  y: (inputs.mouse.y.idiv state.tile_size) }
    +      return unless args.state.blocks.count < 10
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      found = find_tile ordinal~
    +** Processing line: ~      #Sprites are rotated in degrees, but the Ruby math functions work on radians~
     - Inside source: true
     *** True Line Result
    -      found = find_tile ordinal
    -** Processing line: ~      if !found && !state.delete_mode~
    +      #Sprites are rotated in degrees, but the Ruby math functions work on radians
    +** Processing line: ~      radians_to_degrees = Math::PI / 180~
     - Inside source: true
     *** True Line Result
    -      if !found && !state.delete_mode
    -** Processing line: ~        tiles << (state.new_entity :tile, ordinal)~
    +      radians_to_degrees = Math::PI / 180
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        tiles << (state.new_entity :tile, ordinal)
    -** Processing line: ~        recompute_tiles~
    +
    +** Processing line: ~      block_size = 25~
     - Inside source: true
     *** True Line Result
    -        recompute_tiles
    -** Processing line: ~      elsif found && state.delete_mode~
    +      block_size = 25
    +** Processing line: ~      #Rotation angle (in degrees) of the blocks~
     - Inside source: true
     *** True Line Result
    -      elsif found && state.delete_mode
    -** Processing line: ~        tiles.delete found~
    +      #Rotation angle (in degrees) of the blocks
    +** Processing line: ~      rotation = 30~
     - Inside source: true
     *** True Line Result
    -        tiles.delete found
    -** Processing line: ~        recompute_tiles~
    +      rotation = 30
    +** Processing line: ~      vertical_offset = block_size * Math.sin(rotation * radians_to_degrees)~
     - Inside source: true
     *** True Line Result
    -        recompute_tiles
    -** Processing line: ~      end~
    +      vertical_offset = block_size * Math.sin(rotation * radians_to_degrees)
    +** Processing line: ~      horizontal_offset = (3 * block_size) * Math.cos(rotation * radians_to_degrees)~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +      horizontal_offset = (3 * block_size) * Math.cos(rotation * radians_to_degrees)
    +** Processing line: ~      center = args.grid.w / 2~
     - Inside source: true
     *** True Line Result
    -    end
    +      center = args.grid.w / 2
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def input_player~
    +** Processing line: ~      for i in (0...5)~
     - Inside source: true
     *** True Line Result
    -    def input_player
    -** Processing line: ~      player.dx += inputs.left_right~
    +      for i in (0...5)
    +** Processing line: ~        #Create a ramp of blocks. Not going to be perfect because of the float to integer conversion and anisotropic to isotropic coversion~
     - Inside source: true
     *** True Line Result
    -      player.dx += inputs.left_right
    -** Processing line: ~~
    +        #Create a ramp of blocks. Not going to be perfect because of the float to integer conversion and anisotropic to isotropic coversion
    +** Processing line: ~        args.state.blocks.append(Block.new((center + 100 + (i * horizontal_offset)).to_i, 100 + (vertical_offset * i) + (i * block_size), block_size, rotation))~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      if inputs.keyboard.key_down.space && inputs.keyboard.down~
    +        args.state.blocks.append(Block.new((center + 100 + (i * horizontal_offset)).to_i, 100 + (vertical_offset * i) + (i * block_size), block_size, rotation))
    +** Processing line: ~        args.state.blocks.append(Block.new((center - 100 - (i * horizontal_offset)).to_i, 100 + (vertical_offset * i) + (i * block_size), block_size, -rotation))~
     - Inside source: true
     *** True Line Result
    -      if inputs.keyboard.key_down.space && inputs.keyboard.down
    -** Processing line: ~        player.dy             = player.jump_power * -1~
    +        args.state.blocks.append(Block.new((center - 100 - (i * horizontal_offset)).to_i, 100 + (vertical_offset * i) + (i * block_size), block_size, -rotation))
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -        player.dy             = player.jump_power * -1
    -** Processing line: ~        player.jumped_at      = 0~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -        player.jumped_at      = 0
    -** Processing line: ~        player.jumped_down_at = state.tick_count~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -        player.jumped_down_at = state.tick_count
    -** Processing line: ~      elsif inputs.keyboard.key_down.space~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      elsif inputs.keyboard.key_down.space
    -** Processing line: ~        player.dy             = player.jump_power~
    +
    +** Processing line: ~  #Render loop~
     - Inside source: true
     *** True Line Result
    -        player.dy             = player.jump_power
    -** Processing line: ~        player.jumped_at      = state.tick_count~
    +  #Render loop
    +** Processing line: ~  def render args~
     - Inside source: true
     *** True Line Result
    -        player.jumped_at      = state.tick_count
    -** Processing line: ~        player.jumped_down_at = 0~
    +  def render args
    +** Processing line: ~    args.outputs.borders << args.state.game_area~
     - Inside source: true
     *** True Line Result
    -        player.jumped_down_at = 0
    -** Processing line: ~      end~
    +    args.outputs.borders << args.state.game_area
    +** Processing line: ~    render_pegs args~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +    render_pegs args
    +** Processing line: ~    render_blocks args~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +    render_blocks args
    +** Processing line: ~    args.state.cannon.render args~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def calc_player~
    +    args.state.cannon.render args
    +** Processing line: ~    args.state.ball.draw args~
     - Inside source: true
     *** True Line Result
    -    def calc_player
    -** Processing line: ~      calc_player_rect~
    +    args.state.ball.draw args
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -      calc_player_rect
    -** Processing line: ~      calc_below~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      calc_below
    -** Processing line: ~      calc_left~
    +
    +** Processing line: ~  begin :render_methods~
     - Inside source: true
     *** True Line Result
    -      calc_left
    -** Processing line: ~      calc_right~
    +  begin :render_methods
    +** Processing line: ~    #Draw the pegs in a grid pattern~
     - Inside source: true
     *** True Line Result
    -      calc_right
    -** Processing line: ~      calc_above~
    +    #Draw the pegs in a grid pattern
    +** Processing line: ~    def render_pegs args~
     - Inside source: true
     *** True Line Result
    -      calc_above
    -** Processing line: ~      calc_player_dy~
    +    def render_pegs args
    +** Processing line: ~      args.state.pegs.each do |peg|~
     - Inside source: true
     *** True Line Result
    -      calc_player_dy
    -** Processing line: ~      calc_player_dx~
    +      args.state.pegs.each do |peg|
    +** Processing line: ~        peg.draw args~
     - Inside source: true
     *** True Line Result
    -      calc_player_dx
    -** Processing line: ~      reset_player if player_off_stage?~
    +        peg.draw args
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -      reset_player if player_off_stage?
    +      end
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -28328,30 +28795,22 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def calc_player_rect~
    -- Inside source: true
    -*** True Line Result
    -    def calc_player_rect
    -** Processing line: ~      player.rect      = current_player_rect~
    -- Inside source: true
    -*** True Line Result
    -      player.rect      = current_player_rect
    -** Processing line: ~      player.next_rect = player.rect.merge x: player.x + player.dx,~
    +** Processing line: ~    def render_blocks args~
     - Inside source: true
     *** True Line Result
    -      player.next_rect = player.rect.merge x: player.x + player.dx,
    -** Processing line: ~                                           y: player.y + player.dy~
    +    def render_blocks args
    +** Processing line: ~      args.state.blocks.each do |block|~
     - Inside source: true
     *** True Line Result
    -                                           y: player.y + player.dy
    -** Processing line: ~      player.prev_rect = player.rect.merge x: player.x - player.dx,~
    +      args.state.blocks.each do |block|
    +** Processing line: ~        block.draw args~
     - Inside source: true
     *** True Line Result
    -      player.prev_rect = player.rect.merge x: player.x - player.dx,
    -** Processing line: ~                                           y: player.y - player.dy~
    +        block.draw args
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -                                           y: player.y - player.dy
    +      end
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -28360,50 +28819,46 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def calc_below~
    -- Inside source: true
    -*** True Line Result
    -    def calc_below
    -** Processing line: ~      return unless player.dy <= 0~
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -      return unless player.dy <= 0
    -** Processing line: ~      tiles_below = find_tiles { |t| t.rect.top <= player.y }~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      tiles_below = find_tiles { |t| t.rect.top <= player.y }
    -** Processing line: ~      collision = find_colliding_tile tiles_below, (player.rect.merge y: player.next_rect.y)~
    +
    +** Processing line: ~  #Calls all methods necessary for performing calculations~
     - Inside source: true
     *** True Line Result
    -      collision = find_colliding_tile tiles_below, (player.rect.merge y: player.next_rect.y)
    -** Processing line: ~      return unless collision~
    +  #Calls all methods necessary for performing calculations
    +** Processing line: ~  def calc args~
     - Inside source: true
     *** True Line Result
    -      return unless collision
    -** Processing line: ~      if collision.neighbors.b == :none && player.jumped_down_at.elapsed_time < 10~
    +  def calc args
    +** Processing line: ~    args.state.pegs.each do |peg|~
     - Inside source: true
     *** True Line Result
    -      if collision.neighbors.b == :none && player.jumped_down_at.elapsed_time < 10
    -** Processing line: ~        player.dy = -1~
    +    args.state.pegs.each do |peg|
    +** Processing line: ~      peg.calc args~
     - Inside source: true
     *** True Line Result
    -        player.dy = -1
    -** Processing line: ~      else~
    +      peg.calc args
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      else
    -** Processing line: ~        player.y  = collision.rect.y + state.tile_size~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        player.y  = collision.rect.y + state.tile_size
    -** Processing line: ~        player.dy = 0~
    +
    +** Processing line: ~    args.state.blocks.each do |block|~
     - Inside source: true
     *** True Line Result
    -        player.dy = 0
    -** Processing line: ~      end~
    +    args.state.blocks.each do |block|
    +** Processing line: ~      block.calc args~
     - Inside source: true
     *** True Line Result
    -      end
    +      block.calc args
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -28412,158 +28867,154 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def calc_left~
    -- Inside source: true
    -*** True Line Result
    -    def calc_left
    -** Processing line: ~      return unless player.dx < 0~
    +** Processing line: ~    args.state.ball.update args~
     - Inside source: true
     *** True Line Result
    -      return unless player.dx < 0
    -** Processing line: ~      tiles_left = find_tiles { |t| t.rect.right <= player.prev_rect.left }~
    +    args.state.ball.update args
    +** Processing line: ~    args.state.cannon.update args~
     - Inside source: true
     *** True Line Result
    -      tiles_left = find_tiles { |t| t.rect.right <= player.prev_rect.left }
    -** Processing line: ~      collision = find_colliding_tile tiles_left, (player.rect.merge x: player.next_rect.x)~
    +    args.state.cannon.update args
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -      collision = find_colliding_tile tiles_left, (player.rect.merge x: player.next_rect.x)
    -** Processing line: ~      return unless collision~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      return unless collision
    -** Processing line: ~      player.x  = collision.rect.right~
    +
    +** Processing line: ~  begin :calc_methods~
     - Inside source: true
     *** True Line Result
    -      player.x  = collision.rect.right
    -** Processing line: ~      player.dx = 0~
    +  begin :calc_methods
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      player.dx = 0
    -** Processing line: ~    end~
    +
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    end
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def calc_right~
    -- Inside source: true
    -*** True Line Result
    -    def calc_right
    -** Processing line: ~      return unless player.dx > 0~
    +** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
    -      return unless player.dx > 0
    -** Processing line: ~      tiles_right = find_tiles { |t| t.rect.left >= player.prev_rect.right }~
    +  def tick args
    +** Processing line: ~    defaults args~
     - Inside source: true
     *** True Line Result
    -      tiles_right = find_tiles { |t| t.rect.left >= player.prev_rect.right }
    -** Processing line: ~      collision = find_colliding_tile tiles_right, (player.rect.merge x: player.next_rect.x)~
    +    defaults args
    +** Processing line: ~    render args~
     - Inside source: true
     *** True Line Result
    -      collision = find_colliding_tile tiles_right, (player.rect.merge x: player.next_rect.x)
    -** Processing line: ~      return unless collision~
    +    render args
    +** Processing line: ~    calc args~
     - Inside source: true
     *** True Line Result
    -      return unless collision
    -** Processing line: ~      player.x  = collision.rect.left - player.rect.w~
    +    calc args
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -      player.x  = collision.rect.left - player.rect.w
    -** Processing line: ~      player.dx = 0~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      player.dx = 0
    -** Processing line: ~    end~
    -- Inside source: true
    +
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
     *** True Line Result
    -    end
    +#+end_src
     ** Processing line: ~~
    -- Inside source: true
    +- End of paragraph detected.
     *** True Line Result
     
    -** Processing line: ~    def calc_above~
    -- Inside source: true
    +** Processing line: ~*** Physics And Collisions - Bouncing On Collision - peg.rb~
    +- Header detected.
     *** True Line Result
    -    def calc_above
    -** Processing line: ~      return unless player.dy > 0~
    -- Inside source: true
    +
     *** True Line Result
    -      return unless player.dy > 0
    -** Processing line: ~      tiles_above = find_tiles { |t| t.rect.y >= player.y }~
    -- Inside source: true
    +*** Physics And Collisions - Bouncing On Collision - peg.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
     *** True Line Result
    -      tiles_above = find_tiles { |t| t.rect.y >= player.y }
    -** Processing line: ~      collision = find_colliding_tile tiles_above, (player.rect.merge y: player.next_rect.y)~
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/04_physics_and_collisions/08_bouncing_on_collision/app/peg.rb~
     - Inside source: true
     *** True Line Result
    -      collision = find_colliding_tile tiles_above, (player.rect.merge y: player.next_rect.y)
    -** Processing line: ~      return unless collision~
    +  # ./samples/04_physics_and_collisions/08_bouncing_on_collision/app/peg.rb
    +** Processing line: ~  class Peg~
     - Inside source: true
     *** True Line Result
    -      return unless collision
    -** Processing line: ~      return if collision.neighbors.t == :none~
    +  class Peg
    +** Processing line: ~    def initialize(x, y, block_size)~
     - Inside source: true
     *** True Line Result
    -      return if collision.neighbors.t == :none
    -** Processing line: ~      player.dy = 0~
    +    def initialize(x, y, block_size)
    +** Processing line: ~      @x = x                    # x cordinate of the LEFT side of the peg~
     - Inside source: true
     *** True Line Result
    -      player.dy = 0
    -** Processing line: ~      player.y  = collision.rect.bottom - player.rect.h~
    +      @x = x                    # x cordinate of the LEFT side of the peg
    +** Processing line: ~      @y = y                    # y cordinate of the RIGHT side of the peg~
     - Inside source: true
     *** True Line Result
    -      player.y  = collision.rect.bottom - player.rect.h
    -** Processing line: ~    end~
    +      @y = y                    # y cordinate of the RIGHT side of the peg
    +** Processing line: ~      @block_size = block_size  # diameter of the peg~
     - Inside source: true
     *** True Line Result
    -    end
    +      @block_size = block_size  # diameter of the peg
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def calc_player_dx~
    +** Processing line: ~      @radius = @block_size/2.0 # radius of the peg~
     - Inside source: true
     *** True Line Result
    -    def calc_player_dx
    -** Processing line: ~      player.y  += player.dy~
    +      @radius = @block_size/2.0 # radius of the peg
    +** Processing line: ~      @center = {               # cordinatees of the CENTER of the peg~
     - Inside source: true
     *** True Line Result
    -      player.y  += player.dy
    -** Processing line: ~      player.dy += state.gravity~
    +      @center = {               # cordinatees of the CENTER of the peg
    +** Processing line: ~        x: @x+@block_size/2.0,~
     - Inside source: true
     *** True Line Result
    -      player.dy += state.gravity
    -** Processing line: ~      player.dy += player.dy * state.drag ** 2 * -1~
    +        x: @x+@block_size/2.0,
    +** Processing line: ~        y: @y+@block_size/2.0~
     - Inside source: true
     *** True Line Result
    -      player.dy += player.dy * state.drag ** 2 * -1
    -** Processing line: ~    end~
    +        y: @y+@block_size/2.0
    +** Processing line: ~      }~
     - Inside source: true
     *** True Line Result
    -    end
    +      }
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def calc_player_dy~
    +** Processing line: ~      @r = 255 # color of the peg~
     - Inside source: true
     *** True Line Result
    -    def calc_player_dy
    -** Processing line: ~      player.dx  = player.dx.clamp(-5,  5)~
    +      @r = 255 # color of the peg
    +** Processing line: ~      @g = 0~
     - Inside source: true
     *** True Line Result
    -      player.dx  = player.dx.clamp(-5,  5)
    -** Processing line: ~      player.dx *= 0.9~
    +      @g = 0
    +** Processing line: ~      @b = 0~
     - Inside source: true
     *** True Line Result
    -      player.dx *= 0.9
    -** Processing line: ~      player.x  += player.dx~
    +      @b = 0
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      player.x  += player.dx
    +
    +** Processing line: ~      @velocity = {x: 2, y: 0}~
    +- Inside source: true
    +*** True Line Result
    +      @velocity = {x: 2, y: 0}
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -28572,110 +29023,98 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def reset_player~
    -- Inside source: true
    -*** True Line Result
    -    def reset_player
    -** Processing line: ~      player.x  = 100~
    -- Inside source: true
    -*** True Line Result
    -      player.x  = 100
    -** Processing line: ~      player.y  = 720~
    +** Processing line: ~    def draw args~
     - Inside source: true
     *** True Line Result
    -      player.y  = 720
    -** Processing line: ~      player.dy = 0~
    +    def draw args
    +** Processing line: ~      args.outputs.sprites << [ # draw the peg according to the @x, @y, @radius, and the RGB~
     - Inside source: true
     *** True Line Result
    -      player.dy = 0
    -** Processing line: ~    end~
    +      args.outputs.sprites << [ # draw the peg according to the @x, @y, @radius, and the RGB
    +** Processing line: ~        @x,~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +        @x,
    +** Processing line: ~        @y,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def recompute_tiles~
    +        @y,
    +** Processing line: ~        @radius*2.0,~
     - Inside source: true
     *** True Line Result
    -    def recompute_tiles
    -** Processing line: ~      tiles.each do |t|~
    +        @radius*2.0,
    +** Processing line: ~        @radius*2.0,~
     - Inside source: true
     *** True Line Result
    -      tiles.each do |t|
    -** Processing line: ~        t.w = state.tile_size~
    +        @radius*2.0,
    +** Processing line: ~        "sprites/circle-white.png",~
     - Inside source: true
     *** True Line Result
    -        t.w = state.tile_size
    -** Processing line: ~        t.h = state.tile_size~
    +        "sprites/circle-white.png",
    +** Processing line: ~        0,~
     - Inside source: true
     *** True Line Result
    -        t.h = state.tile_size
    -** Processing line: ~        t.neighbors = tile_neighbors t, tiles~
    +        0,
    +** Processing line: ~        255,~
     - Inside source: true
     *** True Line Result
    -        t.neighbors = tile_neighbors t, tiles
    -** Processing line: ~~
    +        255,
    +** Processing line: ~        @r,    #r~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~        t.rect = [t.x * state.tile_size,~
    +        @r,    #r
    +** Processing line: ~        @g,    #g~
     - Inside source: true
     *** True Line Result
    -        t.rect = [t.x * state.tile_size,
    -** Processing line: ~                  t.y * state.tile_size,~
    +        @g,    #g
    +** Processing line: ~        @b   #b~
     - Inside source: true
     *** True Line Result
    -                  t.y * state.tile_size,
    -** Processing line: ~                  state.tile_size,~
    +        @b   #b
    +** Processing line: ~      ]~
     - Inside source: true
     *** True Line Result
    -                  state.tile_size,
    -** Processing line: ~                  state.tile_size].rect.to_hash~
    +      ]
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -                  state.tile_size].rect.to_hash
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~        sprite_sub_path = t.neighbors.mask.map { |m| flip_bit m }.join("")~
    -- Inside source: true
    -*** True Line Result
    -        sprite_sub_path = t.neighbors.mask.map { |m| flip_bit m }.join("")
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~        t.sprite = {~
    +** Processing line: ~    def calc args~
     - Inside source: true
     *** True Line Result
    -        t.sprite = {
    -** Processing line: ~          x: t.x * state.tile_size,~
    +    def calc args
    +** Processing line: ~      if collisionWithBounce? args # if the is a collision with the bouncing ball~
     - Inside source: true
     *** True Line Result
    -          x: t.x * state.tile_size,
    -** Processing line: ~          y: t.y * state.tile_size,~
    +      if collisionWithBounce? args # if the is a collision with the bouncing ball
    +** Processing line: ~        collide args~
     - Inside source: true
     *** True Line Result
    -          y: t.y * state.tile_size,
    -** Processing line: ~          w: state.tile_size,~
    +        collide args
    +** Processing line: ~        @r = 0~
     - Inside source: true
     *** True Line Result
    -          w: state.tile_size,
    -** Processing line: ~          h: state.tile_size,~
    +        @r = 0
    +** Processing line: ~        @b = 0~
     - Inside source: true
     *** True Line Result
    -          h: state.tile_size,
    -** Processing line: ~          path: "sprites/tile/wall-#{sprite_sub_path}.png"~
    +        @b = 0
    +** Processing line: ~        @g = 255~
     - Inside source: true
     *** True Line Result
    -          path: "sprites/tile/wall-#{sprite_sub_path}.png"
    -** Processing line: ~        }~
    +        @g = 255
    +** Processing line: ~      else~
     - Inside source: true
     *** True Line Result
    -        }
    +      else
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    @@ -28688,58 +29127,54 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def flip_bit bit~
    -- Inside source: true
    -*** True Line Result
    -    def flip_bit bit
    -** Processing line: ~      return 0 if bit == 1~
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      return 0 if bit == 1
    -** Processing line: ~      return 1~
    +
    +** Processing line: ~    # do two circles (the ball and this peg) intersect~
     - Inside source: true
     *** True Line Result
    -      return 1
    -** Processing line: ~    end~
    +    # do two circles (the ball and this peg) intersect
    +** Processing line: ~    def collisionWithBounce? args~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +    def collisionWithBounce? args
    +** Processing line: ~      squareDistance = (  # the squared distance between the ball's center and this peg's center~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def player~
    +      squareDistance = (  # the squared distance between the ball's center and this peg's center
    +** Processing line: ~        (args.state.ball.center.x - @center.x) ** 2.0 +~
     - Inside source: true
     *** True Line Result
    -    def player
    -** Processing line: ~      state.player~
    +        (args.state.ball.center.x - @center.x) ** 2.0 +
    +** Processing line: ~        (args.state.ball.center.y - @center.y) ** 2.0~
     - Inside source: true
     *** True Line Result
    -      state.player
    -** Processing line: ~    end~
    +        (args.state.ball.center.y - @center.y) ** 2.0
    +** Processing line: ~      )~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +      )
    +** Processing line: ~      radiusSum = (  # the sum of the radius squared of the this peg and the ball~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def player_off_stage?~
    +      radiusSum = (  # the sum of the radius squared of the this peg and the ball
    +** Processing line: ~        (args.state.ball.radius + @radius) ** 2.0~
     - Inside source: true
     *** True Line Result
    -    def player_off_stage?
    -** Processing line: ~      player.rect.top < grid.bottom ||~
    +        (args.state.ball.radius + @radius) ** 2.0
    +** Processing line: ~      )~
     - Inside source: true
     *** True Line Result
    -      player.rect.top < grid.bottom ||
    -** Processing line: ~      player.rect.right < grid.left ||~
    +      )
    +** Processing line: ~      # if the squareDistance is less or equal to radiusSum, then there is a radial intersection between the ball and this peg~
     - Inside source: true
     *** True Line Result
    -      player.rect.right < grid.left ||
    -** Processing line: ~      player.rect.left > grid.right~
    +      # if the squareDistance is less or equal to radiusSum, then there is a radial intersection between the ball and this peg
    +** Processing line: ~      return (squareDistance <= radiusSum)~
     - Inside source: true
     *** True Line Result
    -      player.rect.left > grid.right
    +      return (squareDistance <= radiusSum)
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -28748,522 +29183,474 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def current_player_rect~
    -- Inside source: true
    -*** True Line Result
    -    def current_player_rect
    -** Processing line: ~      { x: player.x, y: player.y, w: player.size, h: player.size }~
    +** Processing line: ~    # ! The following links explain the getRepelMagnitude function !~
     - Inside source: true
     *** True Line Result
    -      { x: player.x, y: player.y, w: player.size, h: player.size }
    -** Processing line: ~    end~
    +    # ! The following links explain the getRepelMagnitude function !
    +** Processing line: ~    # https://raw.githubusercontent.com/DragonRuby/dragonruby-game-toolkit-physics/master/docs/docImages/LinearCollider_4.png~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +    # https://raw.githubusercontent.com/DragonRuby/dragonruby-game-toolkit-physics/master/docs/docImages/LinearCollider_4.png
    +** Processing line: ~    # https://raw.githubusercontent.com/DragonRuby/dragonruby-game-toolkit-physics/master/docs/docImages/LinearCollider_5.png~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def tiles~
    +    # https://raw.githubusercontent.com/DragonRuby/dragonruby-game-toolkit-physics/master/docs/docImages/LinearCollider_5.png
    +** Processing line: ~    # https://github.com/DragonRuby/dragonruby-game-toolkit-physics/blob/master/docs/LinearCollider.md~
     - Inside source: true
     *** True Line Result
    -    def tiles
    -** Processing line: ~      state.tiles~
    +    # https://github.com/DragonRuby/dragonruby-game-toolkit-physics/blob/master/docs/LinearCollider.md
    +** Processing line: ~    def getRepelMagnitude (args, fbx, fby, vrx, vry, ballMag)~
     - Inside source: true
     *** True Line Result
    -      state.tiles
    -** Processing line: ~    end~
    +    def getRepelMagnitude (args, fbx, fby, vrx, vry, ballMag)
    +** Processing line: ~      a = fbx ; b = vrx ; c = fby~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +      a = fbx ; b = vrx ; c = fby
    +** Processing line: ~      d = vry ; e = ballMag~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def find_tile ordinal~
    +      d = vry ; e = ballMag
    +** Processing line: ~      if b**2 + d**2 == 0~
     - Inside source: true
     *** True Line Result
    -    def find_tile ordinal
    -** Processing line: ~      tiles.find { |t| t.x == ordinal.x && t.y == ordinal.y }~
    +      if b**2 + d**2 == 0
    +** Processing line: ~        #unexpected~
     - Inside source: true
     *** True Line Result
    -      tiles.find { |t| t.x == ordinal.x && t.y == ordinal.y }
    -** Processing line: ~    end~
    +        #unexpected
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    end
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def find_tiles &block~
    -- Inside source: true
    -*** True Line Result
    -    def find_tiles &block
    -** Processing line: ~      tiles.find_all(&block)~
    +** Processing line: ~      x1 = (-a*b+-c*d + (e**2 * b**2 - b**2 * c**2 + 2*a*b*c*d + e**2 + d**2 - a**2 * d**2)**0.5)/(b**2 + d**2)~
     - Inside source: true
     *** True Line Result
    -      tiles.find_all(&block)
    -** Processing line: ~    end~
    +      x1 = (-a*b+-c*d + (e**2 * b**2 - b**2 * c**2 + 2*a*b*c*d + e**2 + d**2 - a**2 * d**2)**0.5)/(b**2 + d**2)
    +** Processing line: ~      x2 = -((a*b + c*d + (e**2 * b**2 - b**2 * c**2 + 2*a*b*c*d + e**2 * d**2 - a**2 * d**2)**0.5)/(b**2 + d**2))~
     - Inside source: true
     *** True Line Result
    -    end
    +      x2 = -((a*b + c*d + (e**2 * b**2 - b**2 * c**2 + 2*a*b*c*d + e**2 * d**2 - a**2 * d**2)**0.5)/(b**2 + d**2))
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def find_colliding_tile tiles, target~
    +** Processing line: ~      err = 0.00001~
     - Inside source: true
     *** True Line Result
    -    def find_colliding_tile tiles, target
    -** Processing line: ~      tiles.find { |t| t.rect.intersect_rect? target }~
    +      err = 0.00001
    +** Processing line: ~      o = ((fbx + x1*vrx)**2 + (fby + x1*vry)**2 ) ** 0.5~
     - Inside source: true
     *** True Line Result
    -      tiles.find { |t| t.rect.intersect_rect? target }
    -** Processing line: ~    end~
    +      o = ((fbx + x1*vrx)**2 + (fby + x1*vry)**2 ) ** 0.5
    +** Processing line: ~      p = ((fbx + x2*vrx)**2 + (fby + x2*vry)**2 ) ** 0.5~
     - Inside source: true
     *** True Line Result
    -    end
    +      p = ((fbx + x2*vrx)**2 + (fby + x2*vry)**2 ) ** 0.5
    +** Processing line: ~      r = 0~
    +- Inside source: true
    +*** True Line Result
    +      r = 0
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def tile_neighbors tile, other_points~
    +** Processing line: ~      if (ballMag >= o-err and ballMag <= o+err)~
     - Inside source: true
     *** True Line Result
    -    def tile_neighbors tile, other_points
    -** Processing line: ~      t = find_tile x: tile.x + 0, y: tile.y + 1~
    +      if (ballMag >= o-err and ballMag <= o+err)
    +** Processing line: ~        r = x1~
     - Inside source: true
     *** True Line Result
    -      t = find_tile x: tile.x + 0, y: tile.y + 1
    -** Processing line: ~      r = find_tile x: tile.x + 1, y: tile.y + 0~
    +        r = x1
    +** Processing line: ~      elsif (ballMag >= p-err and ballMag <= p+err)~
     - Inside source: true
     *** True Line Result
    -      r = find_tile x: tile.x + 1, y: tile.y + 0
    -** Processing line: ~      b = find_tile x: tile.x + 0, y: tile.y - 1~
    +      elsif (ballMag >= p-err and ballMag <= p+err)
    +** Processing line: ~        r = x2~
     - Inside source: true
     *** True Line Result
    -      b = find_tile x: tile.x + 0, y: tile.y - 1
    -** Processing line: ~      l = find_tile x: tile.x - 1, y: tile.y + 0~
    +        r = x2
    +** Processing line: ~      else~
     - Inside source: true
     *** True Line Result
    -      l = find_tile x: tile.x - 1, y: tile.y + 0
    -** Processing line: ~~
    +      else
    +** Processing line: ~        #unexpected~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      tile_t, tile_r, tile_b, tile_l = 0~
    +        #unexpected
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -      tile_t, tile_r, tile_b, tile_l = 0
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      tile_t = 1 if t~
    -- Inside source: true
    -*** True Line Result
    -      tile_t = 1 if t
    -** Processing line: ~      tile_r = 1 if r~
    +** Processing line: ~      if (args.state.ball.center.x > @center.x)~
     - Inside source: true
     *** True Line Result
    -      tile_r = 1 if r
    -** Processing line: ~      tile_b = 1 if b~
    +      if (args.state.ball.center.x > @center.x)
    +** Processing line: ~        return x2*-1~
     - Inside source: true
     *** True Line Result
    -      tile_b = 1 if b
    -** Processing line: ~      tile_l = 1 if l~
    +        return x2*-1
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -      tile_l = 1 if l
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      state.new_entity :neighbors, mask: [tile_t, tile_r, tile_b, tile_l],~
    -- Inside source: true
    -*** True Line Result
    -      state.new_entity :neighbors, mask: [tile_t, tile_r, tile_b, tile_l],
    -** Processing line: ~                                   t:    t ? :some : :none,~
    -- Inside source: true
    -*** True Line Result
    -                                   t:    t ? :some : :none,
    -** Processing line: ~                                   b:    b ? :some : :none,~
    +** Processing line: ~      return x2~
     - Inside source: true
     *** True Line Result
    -                                   b:    b ? :some : :none,
    -** Processing line: ~                                   l:    l ? :some : :none,~
    +      return x2
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -                                   l:    l ? :some : :none,
    -** Processing line: ~                                   r:    r ? :some : :none~
    +
    +** Processing line: ~      #return r~
     - Inside source: true
     *** True Line Result
    -                                   r:    r ? :some : :none
    +      #return r
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
         end
    -** Processing line: ~  end~
    -- Inside source: true
    -*** True Line Result
    -  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def tick args~
    +** Processing line: ~    #this sets the new velocity of the ball once it has collided with this peg~
     - Inside source: true
     *** True Line Result
    -  def tick args
    -** Processing line: ~    $game ||= Game.new~
    +    #this sets the new velocity of the ball once it has collided with this peg
    +** Processing line: ~    def collide args~
     - Inside source: true
     *** True Line Result
    -    $game ||= Game.new
    -** Processing line: ~    $game.args = args~
    +    def collide args
    +** Processing line: ~      normalOfRCCollision = [                                                     #this is the normal of the collision in COMPONENT FORM~
     - Inside source: true
     *** True Line Result
    -    $game.args = args
    -** Processing line: ~    $game.tick~
    +      normalOfRCCollision = [                                                     #this is the normal of the collision in COMPONENT FORM
    +** Processing line: ~        {x: @center.x, y: @center.y},                                             #see https://www.google.com/url?sa=i&url=https%3A%2F%2Fwww.mathscard.co.uk%2Fonline%2Fcircle-coordinate-geometry%2F&psig=AOvVaw2GcD-e2-nJR_IUKpw3hO98&ust=1605731315521000&source=images&cd=vfe&ved=0CAIQjRxqFwoTCMjBo7e1iu0CFQAAAAAdAAAAABAD~
     - Inside source: true
     *** True Line Result
    -    $game.tick
    -** Processing line: ~  end~
    +        {x: @center.x, y: @center.y},                                             #see https://www.google.com/url?sa=i&url=https%3A%2F%2Fwww.mathscard.co.uk%2Fonline%2Fcircle-coordinate-geometry%2F&psig=AOvVaw2GcD-e2-nJR_IUKpw3hO98&ust=1605731315521000&source=images&cd=vfe&ved=0CAIQjRxqFwoTCMjBo7e1iu0CFQAAAAAdAAAAABAD
    +** Processing line: ~        {x: args.state.ball.center.x, y: args.state.ball.center.y},~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +        {x: args.state.ball.center.x, y: args.state.ball.center.y},
    +** Processing line: ~      ]~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~#+end_src~
    -- Line was identified as the end of a code block.
    -*** True Line Result
    -#+end_src
    +      ]
     ** Processing line: ~~
    -- End of paragraph detected.
    -*** True Line Result
    -
    -** Processing line: ~*** Physics And Collisions - Jump Physics - main.rb~
    -- Header detected.
    -*** True Line Result
    -
    -*** True Line Result
    -*** Physics And Collisions - Jump Physics - main.rb
    -** Processing line: ~#+begin_src ruby~
    -- Line was identified as the beginning of a code block.
    +- Inside source: true
     *** True Line Result
     
    +** Processing line: ~      normalSlope = (                                                             #normalSlope is the slope of normalOfRCCollision~
    +- Inside source: true
     *** True Line Result
    -#+begin_src ruby
    -** Processing line: ~  # ./samples/04_physics_and_collisions/07_jump_physics/app/main.rb~
    +      normalSlope = (                                                             #normalSlope is the slope of normalOfRCCollision
    +** Processing line: ~        (normalOfRCCollision[1].y - normalOfRCCollision[0].y) /~
     - Inside source: true
     *** True Line Result
    -  # ./samples/04_physics_and_collisions/07_jump_physics/app/main.rb
    -** Processing line: ~  =begin~
    +        (normalOfRCCollision[1].y - normalOfRCCollision[0].y) /
    +** Processing line: ~        (normalOfRCCollision[1].x - normalOfRCCollision[0].x)~
     - Inside source: true
     *** True Line Result
    -  =begin
    -** Processing line: ~~
    +        (normalOfRCCollision[1].x - normalOfRCCollision[0].x)
    +** Processing line: ~      )~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   Reminders:~
    +      )
    +** Processing line: ~      slope = normalSlope**-1.0 * -1                                              # slope is the slope of the tangent~
     - Inside source: true
     *** True Line Result
    -   Reminders:
    -** Processing line: ~~
    +      slope = normalSlope**-1.0 * -1                                              # slope is the slope of the tangent
    +** Processing line: ~      # args.state.display_value = slope~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   - args.state.new_entity: Used when we want to create a new object, like a sprite or button.~
    +      # args.state.display_value = slope
    +** Processing line: ~      pointA = {                                                                  # pointA and pointB are using the var slope to tangent in COMPONENT FORM~
     - Inside source: true
     *** True Line Result
    -   - args.state.new_entity: Used when we want to create a new object, like a sprite or button.
    -** Processing line: ~     For example, if we want to create a new button, we would declare it as a new entity and~
    +      pointA = {                                                                  # pointA and pointB are using the var slope to tangent in COMPONENT FORM
    +** Processing line: ~        x: args.state.ball.center.x-1,~
     - Inside source: true
     *** True Line Result
    -     For example, if we want to create a new button, we would declare it as a new entity and
    -** Processing line: ~     then define its properties. (Remember, you can use state to define ANY property and it will~
    +        x: args.state.ball.center.x-1,
    +** Processing line: ~        y: -(slope-args.state.ball.center.y)~
     - Inside source: true
     *** True Line Result
    -     then define its properties. (Remember, you can use state to define ANY property and it will
    -** Processing line: ~     be retained across frames.)~
    +        y: -(slope-args.state.ball.center.y)
    +** Processing line: ~      }~
     - Inside source: true
     *** True Line Result
    -     be retained across frames.)
    -** Processing line: ~~
    +      }
    +** Processing line: ~      pointB = {~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   - args.outputs.solids: An array. The values generate a solid.~
    +      pointB = {
    +** Processing line: ~        x: args.state.ball.center.x+1,~
     - Inside source: true
     *** True Line Result
    -   - args.outputs.solids: An array. The values generate a solid.
    -** Processing line: ~     The parameters for a solid are [X, Y, WIDTH, HEIGHT, RED, GREEN, BLUE]~
    +        x: args.state.ball.center.x+1,
    +** Processing line: ~        y: slope+args.state.ball.center.y~
     - Inside source: true
     *** True Line Result
    -     The parameters for a solid are [X, Y, WIDTH, HEIGHT, RED, GREEN, BLUE]
    -** Processing line: ~     For more information about solids, go to mygame/documentation/03-solids-and-borders.md.~
    +        y: slope+args.state.ball.center.y
    +** Processing line: ~      }~
     - Inside source: true
     *** True Line Result
    -     For more information about solids, go to mygame/documentation/03-solids-and-borders.md.
    +      }
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~   - num1.greater(num2): Returns the greater value.~
    +** Processing line: ~      perpVect = {x: pointB.x - pointA.x, y:pointB.y - pointA.y}                  # perpVect is to be VECTOR of the perpendicular tangent~
     - Inside source: true
     *** True Line Result
    -   - num1.greater(num2): Returns the greater value.
    -** Processing line: ~~
    +      perpVect = {x: pointB.x - pointA.x, y:pointB.y - pointA.y}                  # perpVect is to be VECTOR of the perpendicular tangent
    +** Processing line: ~      mag  = (perpVect.x**2 + perpVect.y**2)**0.5                                 # find the magniude of the perpVect~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   - Hashes: Collection of unique keys and their corresponding values. The value can be found~
    +      mag  = (perpVect.x**2 + perpVect.y**2)**0.5                                 # find the magniude of the perpVect
    +** Processing line: ~      perpVect = {x: perpVect.x/(mag), y: perpVect.y/(mag)}                       # divide the perpVect by the magniude to make it a unit vector~
     - Inside source: true
     *** True Line Result
    -   - Hashes: Collection of unique keys and their corresponding values. The value can be found
    -** Processing line: ~     using their keys.~
    +      perpVect = {x: perpVect.x/(mag), y: perpVect.y/(mag)}                       # divide the perpVect by the magniude to make it a unit vector
    +** Processing line: ~      perpVect = {x: -perpVect.y, y: perpVect.x}                                  # swap the x and y and multiply by -1 to make the vector perpendicular~
     - Inside source: true
     *** True Line Result
    -     using their keys.
    -** Processing line: ~~
    +      perpVect = {x: -perpVect.y, y: perpVect.x}                                  # swap the x and y and multiply by -1 to make the vector perpendicular
    +** Processing line: ~      args.state.display_value = perpVect~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   - ARRAY#inside_rect?: Returns true or false depending on if the point is inside the rect.~
    +      args.state.display_value = perpVect
    +** Processing line: ~      if perpVect.y > 0                                                           #ensure perpVect points upward~
     - Inside source: true
     *** True Line Result
    -   - ARRAY#inside_rect?: Returns true or false depending on if the point is inside the rect.
    -** Processing line: ~~
    +      if perpVect.y > 0                                                           #ensure perpVect points upward
    +** Processing line: ~        perpVect = {x: perpVect.x*-1, y: perpVect.y*-1}~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  =end~
    +        perpVect = {x: perpVect.x*-1, y: perpVect.y*-1}
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -  =end
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # This sample app is a game that requires the user to jump from one platform to the next.~
    -- Inside source: true
    -*** True Line Result
    -  # This sample app is a game that requires the user to jump from one platform to the next.
    -** Processing line: ~  # As the player successfully clears platforms, they become smaller and move faster.~
    +** Processing line: ~      previousPosition = {                                                        # calculate an ESTIMATE of the previousPosition of the ball~
     - Inside source: true
     *** True Line Result
    -  # As the player successfully clears platforms, they become smaller and move faster.
    -** Processing line: ~~
    +      previousPosition = {                                                        # calculate an ESTIMATE of the previousPosition of the ball
    +** Processing line: ~        x:args.state.ball.center.x-args.state.ball.velocity.x,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  class VerticalPlatformer~
    +        x:args.state.ball.center.x-args.state.ball.velocity.x,
    +** Processing line: ~        y:args.state.ball.center.y-args.state.ball.velocity.y~
     - Inside source: true
     *** True Line Result
    -  class VerticalPlatformer
    -** Processing line: ~    attr_gtk~
    +        y:args.state.ball.center.y-args.state.ball.velocity.y
    +** Processing line: ~      }~
     - Inside source: true
     *** True Line Result
    -    attr_gtk
    +      }
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # declares vertical platformer as new entity~
    -- Inside source: true
    -*** True Line Result
    -    # declares vertical platformer as new entity
    -** Processing line: ~    def s~
    +** Processing line: ~      yInterc = pointA.y + -slope*pointA.x~
     - Inside source: true
     *** True Line Result
    -    def s
    -** Processing line: ~      state.vertical_platformer ||= state.new_entity(:vertical_platformer)~
    +      yInterc = pointA.y + -slope*pointA.x
    +** Processing line: ~      if slope == INFINITY                                                        # the perpVect presently either points in the correct dirrection or it is 180 degrees off we need to correct this~
     - Inside source: true
     *** True Line Result
    -      state.vertical_platformer ||= state.new_entity(:vertical_platformer)
    -** Processing line: ~      state.vertical_platformer~
    +      if slope == INFINITY                                                        # the perpVect presently either points in the correct dirrection or it is 180 degrees off we need to correct this
    +** Processing line: ~        if previousPosition.x < pointA.x~
     - Inside source: true
     *** True Line Result
    -      state.vertical_platformer
    -** Processing line: ~    end~
    +        if previousPosition.x < pointA.x
    +** Processing line: ~          perpVect = {x: perpVect.x*-1, y: perpVect.y*-1}~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +          perpVect = {x: perpVect.x*-1, y: perpVect.y*-1}
    +** Processing line: ~          yInterc = -INFINITY~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # creates a new platform using a hash~
    +          yInterc = -INFINITY
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -    # creates a new platform using a hash
    -** Processing line: ~    def new_platform hash~
    +        end
    +** Processing line: ~      elsif previousPosition.y < slope*previousPosition.x + yInterc               # check if ball is bellow or above the collider to determine if perpVect is - or +~
     - Inside source: true
     *** True Line Result
    -    def new_platform hash
    -** Processing line: ~      s.new_entity_strict(:platform, hash) # platform key~
    +      elsif previousPosition.y < slope*previousPosition.x + yInterc               # check if ball is bellow or above the collider to determine if perpVect is - or +
    +** Processing line: ~        perpVect = {x: perpVect.x*-1, y: perpVect.y*-1}~
     - Inside source: true
     *** True Line Result
    -      s.new_entity_strict(:platform, hash) # platform key
    -** Processing line: ~    end~
    +        perpVect = {x: perpVect.x*-1, y: perpVect.y*-1}
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    end
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # calls methods needed for game to run properly~
    -- Inside source: true
    -*** True Line Result
    -    # calls methods needed for game to run properly
    -** Processing line: ~    def tick~
    +** Processing line: ~      velocityMag =                                                               # the current velocity magnitude of the ball~
     - Inside source: true
     *** True Line Result
    -    def tick
    -** Processing line: ~      defaults~
    +      velocityMag =                                                               # the current velocity magnitude of the ball
    +** Processing line: ~        (args.state.ball.velocity.x**2 + args.state.ball.velocity.y**2)**0.5~
     - Inside source: true
     *** True Line Result
    -      defaults
    -** Processing line: ~      render~
    +        (args.state.ball.velocity.x**2 + args.state.ball.velocity.y**2)**0.5
    +** Processing line: ~      theta_ball=~
     - Inside source: true
     *** True Line Result
    -      render
    -** Processing line: ~      calc~
    +      theta_ball=
    +** Processing line: ~        Math.atan2(args.state.ball.velocity.y,args.state.ball.velocity.x)         #the angle of the ball's velocity~
     - Inside source: true
     *** True Line Result
    -      calc
    -** Processing line: ~      input~
    +        Math.atan2(args.state.ball.velocity.y,args.state.ball.velocity.x)         #the angle of the ball's velocity
    +** Processing line: ~      theta_repel=~
     - Inside source: true
     *** True Line Result
    -      input
    -** Processing line: ~    end~
    +      theta_repel=
    +** Processing line: ~        Math.atan2(args.state.ball.center.y,args.state.ball.center.x)             #the angle of the repelling force(perpVect)~
     - Inside source: true
     *** True Line Result
    -    end
    +        Math.atan2(args.state.ball.center.y,args.state.ball.center.x)             #the angle of the repelling force(perpVect)
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Sets default values~
    -- Inside source: true
    -*** True Line Result
    -    # Sets default values
    -** Processing line: ~    def defaults~
    +** Processing line: ~      fbx = velocityMag * Math.cos(theta_ball)                                    #the x component of the ball's velocity~
     - Inside source: true
     *** True Line Result
    -    def defaults
    -** Processing line: ~      s.platforms ||= [ # initializes platforms collection with two platforms using hashes~
    +      fbx = velocityMag * Math.cos(theta_ball)                                    #the x component of the ball's velocity
    +** Processing line: ~      fby = velocityMag * Math.sin(theta_ball)                                    #the y component of the ball's velocity~
     - Inside source: true
     *** True Line Result
    -      s.platforms ||= [ # initializes platforms collection with two platforms using hashes
    -** Processing line: ~        new_platform(x: 0, y: 0, w: 700, h: 32, dx: 1, speed: 0, rect: nil),~
    +      fby = velocityMag * Math.sin(theta_ball)                                    #the y component of the ball's velocity
    +** Processing line: ~      repelMag = getRepelMagnitude(                                               # the magniude of the collision vector~
     - Inside source: true
     *** True Line Result
    -        new_platform(x: 0, y: 0, w: 700, h: 32, dx: 1, speed: 0, rect: nil),
    -** Processing line: ~        new_platform(x: 0, y: 300, w: 700, h: 32, dx: 1, speed: 0, rect: nil), # 300 pixels higher~
    +      repelMag = getRepelMagnitude(                                               # the magniude of the collision vector
    +** Processing line: ~        args,~
     - Inside source: true
     *** True Line Result
    -        new_platform(x: 0, y: 300, w: 700, h: 32, dx: 1, speed: 0, rect: nil), # 300 pixels higher
    -** Processing line: ~      ]~
    +        args,
    +** Processing line: ~        fbx,~
     - Inside source: true
     *** True Line Result
    -      ]
    -** Processing line: ~~
    +        fbx,
    +** Processing line: ~        fby,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      s.tick_count  = args.state.tick_count~
    +        fby,
    +** Processing line: ~        perpVect.x,~
     - Inside source: true
     *** True Line Result
    -      s.tick_count  = args.state.tick_count
    -** Processing line: ~      s.gravity     = -0.3 # what goes up must come down because of gravity~
    +        perpVect.x,
    +** Processing line: ~        perpVect.y,~
     - Inside source: true
     *** True Line Result
    -      s.gravity     = -0.3 # what goes up must come down because of gravity
    -** Processing line: ~      s.player.platforms_cleared ||= 0 # counts how many platforms the player has successfully cleared~
    +        perpVect.y,
    +** Processing line: ~        (args.state.ball.velocity.x**2 + args.state.ball.velocity.y**2)**0.5~
     - Inside source: true
     *** True Line Result
    -      s.player.platforms_cleared ||= 0 # counts how many platforms the player has successfully cleared
    -** Processing line: ~      s.player.x  ||= 0           # sets player values~
    +        (args.state.ball.velocity.x**2 + args.state.ball.velocity.y**2)**0.5
    +** Processing line: ~      )~
     - Inside source: true
     *** True Line Result
    -      s.player.x  ||= 0           # sets player values
    -** Processing line: ~      s.player.y  ||= 100~
    +      )
    +** Processing line: ~      frx = repelMag* Math.cos(theta_repel)                                       #the x component of the repel's velocity | magnitude is set to twice of fbx~
     - Inside source: true
     *** True Line Result
    -      s.player.y  ||= 100
    -** Processing line: ~      s.player.w  ||= 64~
    +      frx = repelMag* Math.cos(theta_repel)                                       #the x component of the repel's velocity | magnitude is set to twice of fbx
    +** Processing line: ~      fry = repelMag* Math.sin(theta_repel)                                       #the y component of the repel's velocity | magnitude is set to twice of fby~
     - Inside source: true
     *** True Line Result
    -      s.player.w  ||= 64
    -** Processing line: ~      s.player.h  ||= 64~
    +      fry = repelMag* Math.sin(theta_repel)                                       #the y component of the repel's velocity | magnitude is set to twice of fby
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      s.player.h  ||= 64
    -** Processing line: ~      s.player.dy ||= 0           # change in position~
    +
    +** Processing line: ~      fsumx = fbx+frx                            # sum of x forces~
     - Inside source: true
     *** True Line Result
    -      s.player.dy ||= 0           # change in position
    -** Processing line: ~      s.player.dx ||= 0~
    +      fsumx = fbx+frx                            # sum of x forces
    +** Processing line: ~      fsumy = fby+fry                            # sum of y forces~
     - Inside source: true
     *** True Line Result
    -      s.player.dx ||= 0
    -** Processing line: ~      s.player_jump_power           = 15~
    +      fsumy = fby+fry                            # sum of y forces
    +** Processing line: ~      fr = velocityMag                           # fr is the resulting magnitude~
     - Inside source: true
     *** True Line Result
    -      s.player_jump_power           = 15
    -** Processing line: ~      s.player_jump_power_duration  = 10~
    +      fr = velocityMag                           # fr is the resulting magnitude
    +** Processing line: ~      thetaNew = Math.atan2(fsumy, fsumx)        # thetaNew is the resulting angle~
     - Inside source: true
     *** True Line Result
    -      s.player_jump_power_duration  = 10
    -** Processing line: ~      s.player_max_run_speed        = 5~
    +      thetaNew = Math.atan2(fsumy, fsumx)        # thetaNew is the resulting angle
    +** Processing line: ~      xnew = fr*Math.cos(thetaNew)               # resulting x velocity~
     - Inside source: true
     *** True Line Result
    -      s.player_max_run_speed        = 5
    -** Processing line: ~      s.player_speed_slowdown_rate  = 0.9~
    +      xnew = fr*Math.cos(thetaNew)               # resulting x velocity
    +** Processing line: ~      ynew = fr*Math.sin(thetaNew)               # resulting y velocity~
     - Inside source: true
     *** True Line Result
    -      s.player_speed_slowdown_rate  = 0.9
    -** Processing line: ~      s.player_acceleration         = 1~
    +      ynew = fr*Math.sin(thetaNew)               # resulting y velocity
    +** Processing line: ~      if (args.state.ball.center.x >= @center.x) # this is necessary for the ball colliding on the right side of the peg~
     - Inside source: true
     *** True Line Result
    -      s.player_acceleration         = 1
    -** Processing line: ~      s.camera ||= { y: -100 } # shows view on screen (as the player moves upward, the camera does too)~
    +      if (args.state.ball.center.x >= @center.x) # this is necessary for the ball colliding on the right side of the peg
    +** Processing line: ~        xnew=xnew.abs~
     - Inside source: true
     *** True Line Result
    -      s.camera ||= { y: -100 } # shows view on screen (as the player moves upward, the camera does too)
    -** Processing line: ~    end~
    +        xnew=xnew.abs
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    end
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Outputs objects onto the screen~
    +** Processing line: ~      args.state.ball.velocity.x = xnew                                           # set the x-velocity to the new velocity~
     - Inside source: true
     *** True Line Result
    -    # Outputs objects onto the screen
    -** Processing line: ~    def render~
    +      args.state.ball.velocity.x = xnew                                           # set the x-velocity to the new velocity
    +** Processing line: ~      if args.state.ball.center.y > @center.y                                     # if the ball is above the middle of the peg we need to temporarily ignore some of the gravity~
     - Inside source: true
     *** True Line Result
    -    def render
    -** Processing line: ~      outputs.solids << s.platforms.map do |p| # outputs platforms onto screen~
    +      if args.state.ball.center.y > @center.y                                     # if the ball is above the middle of the peg we need to temporarily ignore some of the gravity
    +** Processing line: ~        args.state.ball.velocity.y = ynew + GRAVITY * 0.01~
     - Inside source: true
     *** True Line Result
    -      outputs.solids << s.platforms.map do |p| # outputs platforms onto screen
    -** Processing line: ~        [p.x + 300, p.y - s.camera[:y], p.w, p.h] # add 300 to place platform in horizontal center~
    +        args.state.ball.velocity.y = ynew + GRAVITY * 0.01
    +** Processing line: ~      else~
     - Inside source: true
     *** True Line Result
    -        [p.x + 300, p.y - s.camera[:y], p.w, p.h] # add 300 to place platform in horizontal center
    -** Processing line: ~        # don't forget, position of platform is denoted by bottom left hand corner~
    +      else
    +** Processing line: ~        args.state.ball.velocity.y = ynew - GRAVITY * 0.01                        # if the ball is bellow the middle of the peg we need to temporarily increase the power of the gravity~
     - Inside source: true
     *** True Line Result
    -        # don't forget, position of platform is denoted by bottom left hand corner
    +        args.state.ball.velocity.y = ynew - GRAVITY * 0.01                        # if the ball is bellow the middle of the peg we need to temporarily increase the power of the gravity
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    @@ -29272,70 +29659,74 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      # outputs player using hash~
    +** Processing line: ~      args.state.ball.center.x+= args.state.ball.velocity.x                       # update the position of the ball so it never looks like the ball is intersecting the circle~
     - Inside source: true
     *** True Line Result
    -      # outputs player using hash
    -** Processing line: ~      outputs.solids << {~
    +      args.state.ball.center.x+= args.state.ball.velocity.x                       # update the position of the ball so it never looks like the ball is intersecting the circle
    +** Processing line: ~      args.state.ball.center.y+= args.state.ball.velocity.y~
     - Inside source: true
     *** True Line Result
    -      outputs.solids << {
    -** Processing line: ~        x: s.player.x + 300, # player positioned on top of platform~
    +      args.state.ball.center.y+= args.state.ball.velocity.y
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -        x: s.player.x + 300, # player positioned on top of platform
    -** Processing line: ~        y: s.player.y - s.camera[:y],~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -        y: s.player.y - s.camera[:y],
    -** Processing line: ~        w: s.player.w,~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        w: s.player.w,
    -** Processing line: ~        h: s.player.h,~
    -- Inside source: true
    +
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
     *** True Line Result
    -        h: s.player.h,
    -** Processing line: ~        r: 100,              # color saturation~
    -- Inside source: true
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
     *** True Line Result
    -        r: 100,              # color saturation
    -** Processing line: ~        g: 100,~
    -- Inside source: true
    +
    +** Processing line: ~*** Physics And Collisions - Bouncing On Collision - vector2d.rb~
    +- Header detected.
     *** True Line Result
    -        g: 100,
    -** Processing line: ~        b: 200~
    +
    +*** True Line Result
    +*** Physics And Collisions - Bouncing On Collision - vector2d.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/04_physics_and_collisions/08_bouncing_on_collision/app/vector2d.rb~
     - Inside source: true
     *** True Line Result
    -        b: 200
    -** Processing line: ~      }~
    +  # ./samples/04_physics_and_collisions/08_bouncing_on_collision/app/vector2d.rb
    +** Processing line: ~  class Vector2d~
     - Inside source: true
     *** True Line Result
    -      }
    -** Processing line: ~    end~
    +  class Vector2d
    +** Processing line: ~      attr_accessor :x, :y~
     - Inside source: true
     *** True Line Result
    -    end
    +      attr_accessor :x, :y
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Performs calculations~
    -- Inside source: true
    -*** True Line Result
    -    # Performs calculations
    -** Processing line: ~    def calc~
    +** Processing line: ~      def initialize x=0, y=0~
     - Inside source: true
     *** True Line Result
    -    def calc
    -** Processing line: ~      s.platforms.each do |p| # for each platform in the collection~
    +      def initialize x=0, y=0
    +** Processing line: ~        @x=x~
     - Inside source: true
     *** True Line Result
    -      s.platforms.each do |p| # for each platform in the collection
    -** Processing line: ~        p.rect = [p.x, p.y, p.w, p.h] # set the definition~
    +        @x=x
    +** Processing line: ~        @y=y~
     - Inside source: true
     *** True Line Result
    -        p.rect = [p.x, p.y, p.w, p.h] # set the definition
    +        @y=y
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    @@ -29344,106 +29735,102 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      # sets player point by adding half the player's width to the player's x~
    -- Inside source: true
    -*** True Line Result
    -      # sets player point by adding half the player's width to the player's x
    -** Processing line: ~      s.player.point = [s.player.x + s.player.w.half, s.player.y] # change + to - and see what happens!~
    +** Processing line: ~      #returns a vector multiplied by scalar x~
     - Inside source: true
     *** True Line Result
    -      s.player.point = [s.player.x + s.player.w.half, s.player.y] # change + to - and see what happens!
    -** Processing line: ~~
    +      #returns a vector multiplied by scalar x
    +** Processing line: ~      #x [float] scalar~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      # search the platforms collection to find if the player's point is inside the rect of a platform~
    +      #x [float] scalar
    +** Processing line: ~      def mult x~
     - Inside source: true
     *** True Line Result
    -      # search the platforms collection to find if the player's point is inside the rect of a platform
    -** Processing line: ~      collision = s.platforms.find { |p| s.player.point.inside_rect? p.rect }~
    +      def mult x
    +** Processing line: ~        r = Vector2d.new(0,0)~
     - Inside source: true
     *** True Line Result
    -      collision = s.platforms.find { |p| s.player.point.inside_rect? p.rect }
    -** Processing line: ~~
    +        r = Vector2d.new(0,0)
    +** Processing line: ~        r.x=@x*x~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      # if collision occurred and player is moving down (or not moving vertically at all)~
    +        r.x=@x*x
    +** Processing line: ~        r.y=@y*x~
     - Inside source: true
     *** True Line Result
    -      # if collision occurred and player is moving down (or not moving vertically at all)
    -** Processing line: ~      if collision && s.player.dy <= 0~
    +        r.y=@y*x
    +** Processing line: ~        r~
     - Inside source: true
     *** True Line Result
    -      if collision && s.player.dy <= 0
    -** Processing line: ~        s.player.y = collision.rect.y + collision.rect.h - 2 # player positioned on top of platform~
    +        r
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -        s.player.y = collision.rect.y + collision.rect.h - 2 # player positioned on top of platform
    -** Processing line: ~        s.player.dy = 0 if s.player.dy < 0 # player stops moving vertically~
    +      end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        s.player.dy = 0 if s.player.dy < 0 # player stops moving vertically
    -** Processing line: ~        if !s.player.platform~
    +
    +** Processing line: ~      # vect [Vector2d] vector to copy~
     - Inside source: true
     *** True Line Result
    -        if !s.player.platform
    -** Processing line: ~          s.player.dx = 0 # no horizontal movement~
    +      # vect [Vector2d] vector to copy
    +** Processing line: ~      def copy vect~
     - Inside source: true
     *** True Line Result
    -          s.player.dx = 0 # no horizontal movement
    -** Processing line: ~        end~
    +      def copy vect
    +** Processing line: ~        Vector2d.new(@x, @y)~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~        # changes horizontal position of player by multiplying collision change in x (dx) by speed and adding it to current x~
    +        Vector2d.new(@x, @y)
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -        # changes horizontal position of player by multiplying collision change in x (dx) by speed and adding it to current x
    -** Processing line: ~        s.player.x += collision.dx * collision.speed~
    +      end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        s.player.x += collision.dx * collision.speed
    -** Processing line: ~        s.player.platform = collision # player is on the platform that it collided with (or landed on)~
    +
    +** Processing line: ~      #returns a new vector equivalent to this+vect~
     - Inside source: true
     *** True Line Result
    -        s.player.platform = collision # player is on the platform that it collided with (or landed on)
    -** Processing line: ~        if s.player.falling # if player is falling~
    +      #returns a new vector equivalent to this+vect
    +** Processing line: ~      #vect [Vector2d] vector to add to self~
     - Inside source: true
     *** True Line Result
    -        if s.player.falling # if player is falling
    -** Processing line: ~          s.player.dx = 0  # no horizontal movement~
    +      #vect [Vector2d] vector to add to self
    +** Processing line: ~      def add vect~
     - Inside source: true
     *** True Line Result
    -          s.player.dx = 0  # no horizontal movement
    -** Processing line: ~        end~
    +      def add vect
    +** Processing line: ~        Vector2d.new(@x+vect.x,@y+vect.y)~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~        s.player.falling = false~
    +        Vector2d.new(@x+vect.x,@y+vect.y)
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -        s.player.falling = false
    -** Processing line: ~        s.player.jumped_at = nil~
    +      end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        s.player.jumped_at = nil
    -** Processing line: ~      else~
    +
    +** Processing line: ~      #returns a new vector equivalent to this-vect~
     - Inside source: true
     *** True Line Result
    -      else
    -** Processing line: ~        s.player.platform = nil # player is not on a platform~
    +      #returns a new vector equivalent to this-vect
    +** Processing line: ~      #vect [Vector2d] vector to subtract to self~
     - Inside source: true
     *** True Line Result
    -        s.player.platform = nil # player is not on a platform
    -** Processing line: ~        s.player.y  += s.player.dy # velocity is the change in position~
    +      #vect [Vector2d] vector to subtract to self
    +** Processing line: ~      def sub vect~
     - Inside source: true
     *** True Line Result
    -        s.player.y  += s.player.dy # velocity is the change in position
    -** Processing line: ~        s.player.dy += s.gravity # acceleration is the change in velocity; what goes up must come down~
    +      def sub vect
    +** Processing line: ~        Vector2d.new(@x-vect.c, @y-vect.y)~
     - Inside source: true
     *** True Line Result
    -        s.player.dy += s.gravity # acceleration is the change in velocity; what goes up must come down
    +        Vector2d.new(@x-vect.c, @y-vect.y)
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    @@ -29452,46 +29839,38 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      s.platforms.each do |p| # for each platform in the collection~
    -- Inside source: true
    -*** True Line Result
    -      s.platforms.each do |p| # for each platform in the collection
    -** Processing line: ~        p.x += p.dx * p.speed # x is incremented by product of dx and speed (causes platform to move horizontally)~
    -- Inside source: true
    -*** True Line Result
    -        p.x += p.dx * p.speed # x is incremented by product of dx and speed (causes platform to move horizontally)
    -** Processing line: ~        # changes platform's x so it moves left and right across the screen (between -300 and 300 pixels)~
    +** Processing line: ~      #return the magnitude of the vector~
     - Inside source: true
     *** True Line Result
    -        # changes platform's x so it moves left and right across the screen (between -300 and 300 pixels)
    -** Processing line: ~        if p.x < -300 # if platform goes too far left~
    +      #return the magnitude of the vector
    +** Processing line: ~      def mag~
     - Inside source: true
     *** True Line Result
    -        if p.x < -300 # if platform goes too far left
    -** Processing line: ~          p.dx *= -1 # dx is scaled down~
    +      def mag
    +** Processing line: ~        ((@x**2)+(@y**2))**0.5~
     - Inside source: true
     *** True Line Result
    -          p.dx *= -1 # dx is scaled down
    -** Processing line: ~          p.x = -300 # as far left as possible within scope~
    +        ((@x**2)+(@y**2))**0.5
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -          p.x = -300 # as far left as possible within scope
    -** Processing line: ~        elsif p.x > (1000 - p.w) # if platform's x is greater than 300~
    +      end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        elsif p.x > (1000 - p.w) # if platform's x is greater than 300
    -** Processing line: ~          p.dx *= -1~
    +
    +** Processing line: ~      #returns a new normalize version of the vector~
     - Inside source: true
     *** True Line Result
    -          p.dx *= -1
    -** Processing line: ~          p.x = (1000 - p.w) # set to 300 (as far right as possible within scope)~
    +      #returns a new normalize version of the vector
    +** Processing line: ~      def normalize~
     - Inside source: true
     *** True Line Result
    -          p.x = (1000 - p.w) # set to 300 (as far right as possible within scope)
    -** Processing line: ~        end~
    +      def normalize
    +** Processing line: ~        Vector2d.new(@x/mag, @y/mag)~
     - Inside source: true
     *** True Line Result
    -        end
    +        Vector2d.new(@x/mag, @y/mag)
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    @@ -29500,170 +29879,154 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      delta = (s.player.y - s.camera[:y] - 100) # used to position camera view~
    +** Processing line: ~      #TODO delet?~
     - Inside source: true
     *** True Line Result
    -      delta = (s.player.y - s.camera[:y] - 100) # used to position camera view
    -** Processing line: ~~
    +      #TODO delet?
    +** Processing line: ~      def distABS vect~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      if delta > -200~
    +      def distABS vect
    +** Processing line: ~        (((vect.x-@x)**2+(vect.y-@y)**2)**0.5).abs()~
     - Inside source: true
     *** True Line Result
    -      if delta > -200
    -** Processing line: ~        s.camera[:y] += delta * 0.01 # allows player to see view as they move upwards~
    +        (((vect.x-@x)**2+(vect.y-@y)**2)**0.5).abs()
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -        s.camera[:y] += delta * 0.01 # allows player to see view as they move upwards
    -** Processing line: ~        s.player.x  += s.player.dx # velocity is change in position; change in x increases by dx~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -        s.player.x  += s.player.dx # velocity is change in position; change in x increases by dx
    +    end
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
    +*** True Line Result
    +#+end_src
     ** Processing line: ~~
    -- Inside source: true
    +- End of paragraph detected.
     *** True Line Result
     
    -** Processing line: ~        # searches platform collection to find platforms located more than 300 pixels above the player~
    -- Inside source: true
    +** Processing line: ~*** Physics And Collisions - Arbitrary Collision - ball.rb~
    +- Header detected.
     *** True Line Result
    -        # searches platform collection to find platforms located more than 300 pixels above the player
    -** Processing line: ~        has_platforms = s.platforms.find { |p| p.y > (s.player.y + 300) }~
    -- Inside source: true
    +
     *** True Line Result
    -        has_platforms = s.platforms.find { |p| p.y > (s.player.y + 300) }
    -** Processing line: ~        if !has_platforms # if there are no platforms 300 pixels above the player~
    -- Inside source: true
    +*** Physics And Collisions - Arbitrary Collision - ball.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
     *** True Line Result
    -        if !has_platforms # if there are no platforms 300 pixels above the player
    -** Processing line: ~          width = 700 - (700 * (0.1 * s.player.platforms_cleared)) # the next platform is smaller than previous~
    -- Inside source: true
    +
     *** True Line Result
    -          width = 700 - (700 * (0.1 * s.player.platforms_cleared)) # the next platform is smaller than previous
    -** Processing line: ~          s.player.platforms_cleared += 1 # player successfully cleared another platform~
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/04_physics_and_collisions/09_arbitrary_collision/app/ball.rb~
     - Inside source: true
     *** True Line Result
    -          s.player.platforms_cleared += 1 # player successfully cleared another platform
    -** Processing line: ~          last_platform = s.platforms[-1] # platform just cleared becomes last platform~
    +  # ./samples/04_physics_and_collisions/09_arbitrary_collision/app/ball.rb
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          last_platform = s.platforms[-1] # platform just cleared becomes last platform
    -** Processing line: ~          # another platform is created 300 pixels above the last platform, and this~
    +
    +** Processing line: ~  class Ball~
     - Inside source: true
     *** True Line Result
    -          # another platform is created 300 pixels above the last platform, and this
    -** Processing line: ~          # new platform has a smaller width and moves faster than all previous platforms~
    +  class Ball
    +** Processing line: ~      attr_accessor :velocity, :child, :parent, :number, :leastChain~
     - Inside source: true
     *** True Line Result
    -          # new platform has a smaller width and moves faster than all previous platforms
    -** Processing line: ~          s.platforms << new_platform(x: (700 - width) * rand, # random x position~
    +      attr_accessor :velocity, :child, :parent, :number, :leastChain
    +** Processing line: ~      attr_reader :x, :y, :hypotenuse, :width, :height~
     - Inside source: true
     *** True Line Result
    -          s.platforms << new_platform(x: (700 - width) * rand, # random x position
    -** Processing line: ~                                      y: last_platform.y + 300,~
    +      attr_reader :x, :y, :hypotenuse, :width, :height
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -                                      y: last_platform.y + 300,
    -** Processing line: ~                                      w: width,~
    +
    +** Processing line: ~      def initialize args, number, leastChain, parent, child~
     - Inside source: true
     *** True Line Result
    -                                      w: width,
    -** Processing line: ~                                      h: 32,~
    +      def initialize args, number, leastChain, parent, child
    +** Processing line: ~          #Start the ball in the top center~
     - Inside source: true
     *** True Line Result
    -                                      h: 32,
    -** Processing line: ~                                      dx: 1.randomize(:sign), # random change in x~
    +          #Start the ball in the top center
    +** Processing line: ~          @number = number~
     - Inside source: true
     *** True Line Result
    -                                      dx: 1.randomize(:sign), # random change in x
    -** Processing line: ~                                      speed: 2 * s.player.platforms_cleared,~
    +          @number = number
    +** Processing line: ~          @leastChain = leastChain~
     - Inside source: true
     *** True Line Result
    -                                      speed: 2 * s.player.platforms_cleared,
    -** Processing line: ~                                      rect: nil)~
    +          @leastChain = leastChain
    +** Processing line: ~          @x = args.grid.w / 2~
     - Inside source: true
     *** True Line Result
    -                                      rect: nil)
    -** Processing line: ~        end~
    +          @x = args.grid.w / 2
    +** Processing line: ~          @y = args.grid.h - 20~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~      else~
    +          @y = args.grid.h - 20
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      else
    -** Processing line: ~        s.as_hash.clear # otherwise clear the hash (no new platform is necessary)~
    +
    +** Processing line: ~          @velocity = Vector2d.new(2, -2)~
     - Inside source: true
     *** True Line Result
    -        s.as_hash.clear # otherwise clear the hash (no new platform is necessary)
    -** Processing line: ~      end~
    +          @velocity = Vector2d.new(2, -2)
    +** Processing line: ~          @width =  10~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +          @width =  10
    +** Processing line: ~          @height = 10~
     - Inside source: true
     *** True Line Result
    -    end
    +          @height = 10
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Takes input from the user to move the player~
    -- Inside source: true
    -*** True Line Result
    -    # Takes input from the user to move the player
    -** Processing line: ~    def input~
    -- Inside source: true
    -*** True Line Result
    -    def input
    -** Processing line: ~      if inputs.keyboard.space # if the space bar is pressed~
    +** Processing line: ~          @left_wall = (args.state.board_width + args.grid.w / 8)~
     - Inside source: true
     *** True Line Result
    -      if inputs.keyboard.space # if the space bar is pressed
    -** Processing line: ~        s.player.jumped_at ||= s.tick_count # set to current frame~
    +          @left_wall = (args.state.board_width + args.grid.w / 8)
    +** Processing line: ~          @right_wall = @left_wall + args.state.board_width~
     - Inside source: true
     *** True Line Result
    -        s.player.jumped_at ||= s.tick_count # set to current frame
    +          @right_wall = @left_wall + args.state.board_width
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~        # if the time that has passed since the jump is less than the duration of a jump (10 frames)~
    -- Inside source: true
    -*** True Line Result
    -        # if the time that has passed since the jump is less than the duration of a jump (10 frames)
    -** Processing line: ~        # and the player is not falling~
    -- Inside source: true
    -*** True Line Result
    -        # and the player is not falling
    -** Processing line: ~        if s.player.jumped_at.elapsed_time < s.player_jump_power_duration && !s.player.falling~
    +** Processing line: ~          @max_velocity = MAX_VELOCITY~
     - Inside source: true
     *** True Line Result
    -        if s.player.jumped_at.elapsed_time < s.player_jump_power_duration && !s.player.falling
    -** Processing line: ~          s.player.dy = s.player_jump_power # player jumps up~
    +          @max_velocity = MAX_VELOCITY
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          s.player.dy = s.player_jump_power # player jumps up
    -** Processing line: ~        end~
    +
    +** Processing line: ~          @child = child~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~      end~
    +          @child = child
    +** Processing line: ~          @parent = parent~
     - Inside source: true
     *** True Line Result
    -      end
    +          @parent = parent
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      if inputs.keyboard.key_up.space # if space bar is in "up" state~
    +** Processing line: ~          @past = [{x: @x, y: @y}]~
     - Inside source: true
     *** True Line Result
    -      if inputs.keyboard.key_up.space # if space bar is in "up" state
    -** Processing line: ~        s.player.falling = true # player is falling~
    +          @past = [{x: @x, y: @y}]
    +** Processing line: ~          @next = nil~
     - Inside source: true
     *** True Line Result
    -        s.player.falling = true # player is falling
    +          @next = nil
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    @@ -29672,198 +30035,166 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      if inputs.keyboard.left # if left key is pressed~
    -- Inside source: true
    -*** True Line Result
    -      if inputs.keyboard.left # if left key is pressed
    -** Processing line: ~        s.player.dx -= s.player_acceleration # player's position changes, decremented by acceleration~
    -- Inside source: true
    -*** True Line Result
    -        s.player.dx -= s.player_acceleration # player's position changes, decremented by acceleration
    -** Processing line: ~        s.player.dx = s.player.dx.greater(-s.player_max_run_speed) # dx is either current dx or -5, whichever is greater~
    -- Inside source: true
    -*** True Line Result
    -        s.player.dx = s.player.dx.greater(-s.player_max_run_speed) # dx is either current dx or -5, whichever is greater
    -** Processing line: ~      elsif inputs.keyboard.right # if right key is pressed~
    +** Processing line: ~      def reassignLeastChain (lc=nil)~
     - Inside source: true
     *** True Line Result
    -      elsif inputs.keyboard.right # if right key is pressed
    -** Processing line: ~        s.player.dx += s.player_acceleration # player's position changes, incremented by acceleration~
    +      def reassignLeastChain (lc=nil)
    +** Processing line: ~        if (lc == nil)~
     - Inside source: true
     *** True Line Result
    -        s.player.dx += s.player_acceleration # player's position changes, incremented by acceleration
    -** Processing line: ~        s.player.dx  = s.player.dx.lesser(s.player_max_run_speed) # dx is either current dx or 5, whichever is lesser~
    +        if (lc == nil)
    +** Processing line: ~          lc = @number~
     - Inside source: true
     *** True Line Result
    -        s.player.dx  = s.player.dx.lesser(s.player_max_run_speed) # dx is either current dx or 5, whichever is lesser
    -** Processing line: ~      else~
    +          lc = @number
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -      else
    -** Processing line: ~        s.player.dx *= s.player_speed_slowdown_rate # scales dx down~
    +        end
    +** Processing line: ~        @leastChain = lc~
     - Inside source: true
     *** True Line Result
    -        s.player.dx *= s.player_speed_slowdown_rate # scales dx down
    -** Processing line: ~      end~
    +        @leastChain = lc
    +** Processing line: ~        if (parent != nil)~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +        if (parent != nil)
    +** Processing line: ~          @parent.reassignLeastChain(lc)~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~  end~
    +          @parent.reassignLeastChain(lc)
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -  end
    +        end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  $game = VerticalPlatformer.new~
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -  $game = VerticalPlatformer.new
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def tick args~
    +** Processing line: ~      def makeLeader args~
     - Inside source: true
     *** True Line Result
    -  def tick args
    -** Processing line: ~    $game.args = args~
    +      def makeLeader args
    +** Processing line: ~        if isLeader~
     - Inside source: true
     *** True Line Result
    -    $game.args = args
    -** Processing line: ~    $game.tick~
    +        if isLeader
    +** Processing line: ~          return~
     - Inside source: true
     *** True Line Result
    -    $game.tick
    -** Processing line: ~  end~
    +          return
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +        end
    +** Processing line: ~        @parent.reassignLeastChain~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~#+end_src~
    -- Line was identified as the end of a code block.
    -*** True Line Result
    -#+end_src
    -** Processing line: ~~
    -- End of paragraph detected.
    -*** True Line Result
    -
    -** Processing line: ~*** Physics And Collisions - Bouncing On Collision - ball.rb~
    -- Header detected.
    -*** True Line Result
    -
    -*** True Line Result
    -*** Physics And Collisions - Bouncing On Collision - ball.rb
    -** Processing line: ~#+begin_src ruby~
    -- Line was identified as the beginning of a code block.
    -*** True Line Result
    -
    -*** True Line Result
    -#+begin_src ruby
    -** Processing line: ~  # ./samples/04_physics_and_collisions/08_bouncing_on_collision/app/ball.rb~
    +        @parent.reassignLeastChain
    +** Processing line: ~        args.state.ballParents.push(self)~
     - Inside source: true
     *** True Line Result
    -  # ./samples/04_physics_and_collisions/08_bouncing_on_collision/app/ball.rb
    -** Processing line: ~  GRAVITY = -0.08~
    +        args.state.ballParents.push(self)
    +** Processing line: ~        @parent = nil~
     - Inside source: true
     *** True Line Result
    -  GRAVITY = -0.08
    +        @parent = nil
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  class Ball~
    -- Inside source: true
    -*** True Line Result
    -  class Ball
    -** Processing line: ~      attr_accessor :velocity, :center, :radius, :collision_enabled~
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -      attr_accessor :velocity, :center, :radius, :collision_enabled
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      def initialize args~
    -- Inside source: true
    -*** True Line Result
    -      def initialize args
    -** Processing line: ~          #Start the ball in the top center~
    +** Processing line: ~      def isLeader~
     - Inside source: true
     *** True Line Result
    -          #Start the ball in the top center
    -** Processing line: ~          #@x = args.grid.w / 2~
    +      def isLeader
    +** Processing line: ~        return (parent == nil)~
     - Inside source: true
     *** True Line Result
    -          #@x = args.grid.w / 2
    -** Processing line: ~          #@y = args.grid.h - 20~
    +        return (parent == nil)
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -          #@y = args.grid.h - 20
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~          @velocity = {x: 0, y: 0}~
    +** Processing line: ~      def receiveNext (p)~
     - Inside source: true
     *** True Line Result
    -          @velocity = {x: 0, y: 0}
    -** Processing line: ~          #@width =  20~
    +      def receiveNext (p)
    +** Processing line: ~        #trace!~
     - Inside source: true
     *** True Line Result
    -          #@width =  20
    -** Processing line: ~          #@height = @width~
    +        #trace!
    +** Processing line: ~        if parent != nil~
     - Inside source: true
     *** True Line Result
    -          #@height = @width
    -** Processing line: ~          @radius = 20.0 / 2.0~
    +        if parent != nil
    +** Processing line: ~          @x = p[:x]~
     - Inside source: true
     *** True Line Result
    -          @radius = 20.0 / 2.0
    -** Processing line: ~          @center = {x: (args.grid.w / 2), y: (args.grid.h)}~
    +          @x = p[:x]
    +** Processing line: ~          @y = p[:y]~
     - Inside source: true
     *** True Line Result
    -          @center = {x: (args.grid.w / 2), y: (args.grid.h)}
    -** Processing line: ~~
    +          @y = p[:y]
    +** Processing line: ~          @velocity = p[:velocity]~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~          #@left_wall = (args.state.board_width + args.grid.w / 8)~
    +          @velocity = p[:velocity]
    +** Processing line: ~          #puts @x.to_s + "|" + @y.to_s + "|"+@velocity.to_s~
     - Inside source: true
     *** True Line Result
    -          #@left_wall = (args.state.board_width + args.grid.w / 8)
    -** Processing line: ~          #@right_wall = @left_wall + args.state.board_width~
    +          #puts @x.to_s + "|" + @y.to_s + "|"+@velocity.to_s
    +** Processing line: ~          @past.append(p)~
     - Inside source: true
     *** True Line Result
    -          #@right_wall = @left_wall + args.state.board_width
    -** Processing line: ~          @left_wall = 0~
    +          @past.append(p)
    +** Processing line: ~          if (@past.length >= BALL_DISTANCE)~
     - Inside source: true
     *** True Line Result
    -          @left_wall = 0
    -** Processing line: ~          @right_wall = $args.grid.right~
    +          if (@past.length >= BALL_DISTANCE)
    +** Processing line: ~            if (@child != nil)~
     - Inside source: true
     *** True Line Result
    -          @right_wall = $args.grid.right
    -** Processing line: ~~
    +            if (@child != nil)
    +** Processing line: ~              @child.receiveNext(@past[0])~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~          @max_velocity = 7~
    +              @child.receiveNext(@past[0])
    +** Processing line: ~              @past.shift~
     - Inside source: true
     *** True Line Result
    -          @max_velocity = 7
    -** Processing line: ~          @collision_enabled = true~
    +              @past.shift
    +** Processing line: ~            end~
     - Inside source: true
     *** True Line Result
    -          @collision_enabled = true
    +            end
    +** Processing line: ~          end~
    +- Inside source: true
    +*** True Line Result
    +          end
    +** Processing line: ~        end~
    +- Inside source: true
    +*** True Line Result
    +        end
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    @@ -29880,94 +30211,82 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
           def update args
    -** Processing line: ~        @center.x += @velocity.x~
    -- Inside source: true
    -*** True Line Result
    -        @center.x += @velocity.x
    -** Processing line: ~        @center.y += @velocity.y~
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        @center.y += @velocity.y
    -** Processing line: ~        @velocity.y += GRAVITY~
    +
    +** Processing line: ~          if isLeader~
     - Inside source: true
     *** True Line Result
    -        @velocity.y += GRAVITY
    -** Processing line: ~~
    +          if isLeader
    +** Processing line: ~            wallBounds args~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~        alpha = 0.2~
    +            wallBounds args
    +** Processing line: ~            @x += @velocity.x~
     - Inside source: true
     *** True Line Result
    -        alpha = 0.2
    -** Processing line: ~        if @center.y-@radius <= 0~
    +            @x += @velocity.x
    +** Processing line: ~            @y += @velocity.y~
     - Inside source: true
     *** True Line Result
    -        if @center.y-@radius <= 0
    -** Processing line: ~          @velocity.y  = (@velocity.y.abs*0.7).abs~
    +            @y += @velocity.y
    +** Processing line: ~            @past.append({x: @x, y: @y, velocity: @velocity})~
     - Inside source: true
     *** True Line Result
    -          @velocity.y  = (@velocity.y.abs*0.7).abs
    -** Processing line: ~          @velocity.x  = (@velocity.x.abs*0.9).abs * ((@velocity.x < 0) ? -1 : 1)~
    +            @past.append({x: @x, y: @y, velocity: @velocity})
    +** Processing line: ~            #puts @past~
     - Inside source: true
     *** True Line Result
    -          @velocity.x  = (@velocity.x.abs*0.9).abs * ((@velocity.x < 0) ? -1 : 1)
    +            #puts @past
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~          if @velocity.y.abs() < alpha~
    -- Inside source: true
    -*** True Line Result
    -          if @velocity.y.abs() < alpha
    -** Processing line: ~            @velocity.y=0~
    +** Processing line: ~            if (@past.length >= BALL_DISTANCE)~
     - Inside source: true
     *** True Line Result
    -            @velocity.y=0
    -** Processing line: ~          end~
    +            if (@past.length >= BALL_DISTANCE)
    +** Processing line: ~              if (@child != nil)~
     - Inside source: true
     *** True Line Result
    -          end
    -** Processing line: ~          if @velocity.x.abs() < alpha~
    +              if (@child != nil)
    +** Processing line: ~                @child.receiveNext(@past[0])~
     - Inside source: true
     *** True Line Result
    -          if @velocity.x.abs() < alpha
    -** Processing line: ~            @velocity.x=0~
    +                @child.receiveNext(@past[0])
    +** Processing line: ~                @past.shift~
     - Inside source: true
     *** True Line Result
    -            @velocity.x=0
    -** Processing line: ~          end~
    +                @past.shift
    +** Processing line: ~              end~
     - Inside source: true
     *** True Line Result
    -          end
    -** Processing line: ~        end~
    +              end
    +** Processing line: ~            end~
     - Inside source: true
     *** True Line Result
    -        end
    +            end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~        if @center.x > args.grid.right+@radius*2~
    -- Inside source: true
    -*** True Line Result
    -        if @center.x > args.grid.right+@radius*2
    -** Processing line: ~          @center.x = 0-@radius~
    +** Processing line: ~          else~
     - Inside source: true
     *** True Line Result
    -          @center.x = 0-@radius
    -** Processing line: ~        elsif @center.x< 0-@radius*2~
    +          else
    +** Processing line: ~            puts "unexpected"~
     - Inside source: true
     *** True Line Result
    -        elsif @center.x< 0-@radius*2
    -** Processing line: ~          @center.x = args.grid.right + @radius~
    +            puts "unexpected"
    +** Processing line: ~            raise "unexpected"~
     - Inside source: true
     *** True Line Result
    -          @center.x = args.grid.right + @radius
    -** Processing line: ~        end~
    +            raise "unexpected"
    +** Processing line: ~          end~
     - Inside source: true
     *** True Line Result
    -        end
    +          end
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    @@ -29980,330 +30299,7942 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
           def wallBounds args
    -** Processing line: ~          #if @x < @left_wall || @x + @width > @right_wall~
    +** Processing line: ~          b= false~
     - Inside source: true
     *** True Line Result
    -          #if @x < @left_wall || @x + @width > @right_wall
    -** Processing line: ~              #@velocity.x *= -1.1~
    +          b= false
    +** Processing line: ~          if @x < @left_wall~
     - Inside source: true
     *** True Line Result
    -              #@velocity.x *= -1.1
    -** Processing line: ~              #if @velocity.x > @max_velocity~
    +          if @x < @left_wall
    +** Processing line: ~            @velocity.x = @velocity.x.abs() * 1~
     - Inside source: true
     *** True Line Result
    -              #if @velocity.x > @max_velocity
    -** Processing line: ~                  #@velocity.x = @max_velocity~
    +            @velocity.x = @velocity.x.abs() * 1
    +** Processing line: ~            b=true~
     - Inside source: true
     *** True Line Result
    -                  #@velocity.x = @max_velocity
    -** Processing line: ~              #elsif @velocity.x < @max_velocity * -1~
    +            b=true
    +** Processing line: ~          elsif @x + @width > @right_wall~
     - Inside source: true
     *** True Line Result
    -              #elsif @velocity.x < @max_velocity * -1
    -** Processing line: ~                  #@velocity.x = @max_velocity * -1~
    +          elsif @x + @width > @right_wall
    +** Processing line: ~            @velocity.x = @velocity.x.abs() * -1~
     - Inside source: true
     *** True Line Result
    -                  #@velocity.x = @max_velocity * -1
    -** Processing line: ~              #end~
    +            @velocity.x = @velocity.x.abs() * -1
    +** Processing line: ~            b=true~
     - Inside source: true
     *** True Line Result
    -              #end
    -** Processing line: ~          #end~
    +            b=true
    +** Processing line: ~          end~
     - Inside source: true
     *** True Line Result
    -          #end
    -** Processing line: ~          #if @y < 0 || @y + @height > args.grid.h~
    +          end
    +** Processing line: ~          if @y < 0~
     - Inside source: true
     *** True Line Result
    -          #if @y < 0 || @y + @height > args.grid.h
    -** Processing line: ~              #@velocity.y *= -1.1~
    +          if @y < 0
    +** Processing line: ~            @velocity.y = @velocity.y.abs() * 1~
     - Inside source: true
     *** True Line Result
    -              #@velocity.y *= -1.1
    -** Processing line: ~              #if @velocity.y > @max_velocity~
    +            @velocity.y = @velocity.y.abs() * 1
    +** Processing line: ~            b=true~
     - Inside source: true
     *** True Line Result
    -              #if @velocity.y > @max_velocity
    -** Processing line: ~                  #@velocity.y = @max_velocity~
    +            b=true
    +** Processing line: ~          elsif @y + @height > args.grid.h~
     - Inside source: true
     *** True Line Result
    -                  #@velocity.y = @max_velocity
    -** Processing line: ~              #elsif @velocity.y < @max_velocity * -1~
    +          elsif @y + @height > args.grid.h
    +** Processing line: ~            @velocity.y = @velocity.y.abs() * -1~
     - Inside source: true
     *** True Line Result
    -              #elsif @velocity.y < @max_velocity * -1
    -** Processing line: ~                  #@velocity.y = @max_velocity * -1~
    +            @velocity.y = @velocity.y.abs() * -1
    +** Processing line: ~            b=true~
     - Inside source: true
     *** True Line Result
    -                  #@velocity.y = @max_velocity * -1
    -** Processing line: ~              #end~
    +            b=true
    +** Processing line: ~          end~
     - Inside source: true
     *** True Line Result
    -              #end
    -** Processing line: ~          #end~
    +          end
    +** Processing line: ~          mag = (@velocity.x**2.0 + @velocity.y**2.0)**0.5~
     - Inside source: true
     *** True Line Result
    -          #end
    -** Processing line: ~      end~
    +          mag = (@velocity.x**2.0 + @velocity.y**2.0)**0.5
    +** Processing line: ~          if (b == true && mag < MAX_VELOCITY)~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +          if (b == true && mag < MAX_VELOCITY)
    +** Processing line: ~            @velocity.x*=1.1;~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      #render the ball to the screen~
    +            @velocity.x*=1.1;
    +** Processing line: ~            @velocity.y*=1.1;~
     - Inside source: true
     *** True Line Result
    -      #render the ball to the screen
    -** Processing line: ~      def draw args~
    +            @velocity.y*=1.1;
    +** Processing line: ~          end~
    +- Inside source: true
    +*** True Line Result
    +          end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      #render the ball to the screen~
    +- Inside source: true
    +*** True Line Result
    +      #render the ball to the screen
    +** Processing line: ~      def draw args~
     - Inside source: true
     *** True Line Result
           def draw args
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~          #update args~
    +- Inside source: true
    +*** True Line Result
    +          #update args
     ** Processing line: ~          #args.outputs.solids << [@x, @y, @width, @height, 255, 255, 0];~
     - Inside source: true
     *** True Line Result
    -          #args.outputs.solids << [@x, @y, @width, @height, 255, 255, 0];
    -** Processing line: ~          args.outputs.sprites << [~
    +          #args.outputs.solids << [@x, @y, @width, @height, 255, 255, 0];
    +** Processing line: ~          #args.outputs.sprits << {~
    +- Inside source: true
    +*** True Line Result
    +          #args.outputs.sprits << {
    +** Processing line: ~            #x: @x,~
    +- Inside source: true
    +*** True Line Result
    +            #x: @x,
    +** Processing line: ~            #y: @y,~
    +- Inside source: true
    +*** True Line Result
    +            #y: @y,
    +** Processing line: ~            #w: @width,~
    +- Inside source: true
    +*** True Line Result
    +            #w: @width,
    +** Processing line: ~            #h: @height,~
    +- Inside source: true
    +*** True Line Result
    +            #h: @height,
    +** Processing line: ~            #path: "sprites/ball10.png"~
    +- Inside source: true
    +*** True Line Result
    +            #path: "sprites/ball10.png"
    +** Processing line: ~          #}~
    +- Inside source: true
    +*** True Line Result
    +          #}
    +** Processing line: ~          #args.outputs.sprites <<[@x, @y, @width, @height, "sprites/ball10.png"]~
    +- Inside source: true
    +*** True Line Result
    +          #args.outputs.sprites <<[@x, @y, @width, @height, "sprites/ball10.png"]
    +** Processing line: ~          args.outputs.sprites << {x: @x, y: @y, w: @width, h: @height, path:"sprites/ball10.png" }~
    +- Inside source: true
    +*** True Line Result
    +          args.outputs.sprites << {x: @x, y: @y, w: @width, h: @height, path:"sprites/ball10.png" }
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      def getDraw args~
    +- Inside source: true
    +*** True Line Result
    +      def getDraw args
    +** Processing line: ~        #wallBounds args~
    +- Inside source: true
    +*** True Line Result
    +        #wallBounds args
    +** Processing line: ~        #update args~
    +- Inside source: true
    +*** True Line Result
    +        #update args
    +** Processing line: ~        #args.outputs.labels << [@x, @y, @number.to_s + "|" + @leastChain.to_s]~
    +- Inside source: true
    +*** True Line Result
    +        #args.outputs.labels << [@x, @y, @number.to_s + "|" + @leastChain.to_s]
    +** Processing line: ~        return [@x, @y, @width, @height, "sprites/ball10.png"]~
    +- Inside source: true
    +*** True Line Result
    +        return [@x, @y, @width, @height, "sprites/ball10.png"]
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      def getPoints args~
    +- Inside source: true
    +*** True Line Result
    +      def getPoints args
    +** Processing line: ~        points = [~
    +- Inside source: true
    +*** True Line Result
    +        points = [
    +** Processing line: ~          {x:@x+@width/2, y: @y},~
    +- Inside source: true
    +*** True Line Result
    +          {x:@x+@width/2, y: @y},
    +** Processing line: ~          {x:@x+@width, y:@y+@height/2},~
    +- Inside source: true
    +*** True Line Result
    +          {x:@x+@width, y:@y+@height/2},
    +** Processing line: ~          {x:@x+@width/2,y:@y+@height},~
    +- Inside source: true
    +*** True Line Result
    +          {x:@x+@width/2,y:@y+@height},
    +** Processing line: ~          {x:@x,y:@y+@height/2}~
    +- Inside source: true
    +*** True Line Result
    +          {x:@x,y:@y+@height/2}
    +** Processing line: ~        ]~
    +- Inside source: true
    +*** True Line Result
    +        ]
    +** Processing line: ~        #psize = 5.0~
    +- Inside source: true
    +*** True Line Result
    +        #psize = 5.0
    +** Processing line: ~        #for p in points~
    +- Inside source: true
    +*** True Line Result
    +        #for p in points
    +** Processing line: ~          #args.outputs.solids << [p.x-psize/2.0, p.y-psize/2.0, psize, psize, 0, 0, 0];~
    +- Inside source: true
    +*** True Line Result
    +          #args.outputs.solids << [p.x-psize/2.0, p.y-psize/2.0, psize, psize, 0, 0, 0];
    +** Processing line: ~        #end~
    +- Inside source: true
    +*** True Line Result
    +        #end
    +** Processing line: ~        return points~
    +- Inside source: true
    +*** True Line Result
    +        return points
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      def serialize~
    +- Inside source: true
    +*** True Line Result
    +      def serialize
    +** Processing line: ~        {x: @x, y:@y}~
    +- Inside source: true
    +*** True Line Result
    +        {x: @x, y:@y}
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      def inspect~
    +- Inside source: true
    +*** True Line Result
    +      def inspect
    +** Processing line: ~        serialize.to_s~
    +- Inside source: true
    +*** True Line Result
    +        serialize.to_s
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      def to_s~
    +- Inside source: true
    +*** True Line Result
    +      def to_s
    +** Processing line: ~        serialize.to_s~
    +- Inside source: true
    +*** True Line Result
    +        serialize.to_s
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
    +*** True Line Result
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +
    +** Processing line: ~*** Physics And Collisions - Arbitrary Collision - blocks.rb~
    +- Header detected.
    +*** True Line Result
    +
    +*** True Line Result
    +*** Physics And Collisions - Arbitrary Collision - blocks.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/04_physics_and_collisions/09_arbitrary_collision/app/blocks.rb~
    +- Inside source: true
    +*** True Line Result
    +  # ./samples/04_physics_and_collisions/09_arbitrary_collision/app/blocks.rb
    +** Processing line: ~  MAX_COUNT=100~
    +- Inside source: true
    +*** True Line Result
    +  MAX_COUNT=100
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~  def universalUpdateOne args, shape~
    +- Inside source: true
    +*** True Line Result
    +  def universalUpdateOne args, shape
    +** Processing line: ~    didHit = false~
    +- Inside source: true
    +*** True Line Result
    +    didHit = false
    +** Processing line: ~    hitters = []~
    +- Inside source: true
    +*** True Line Result
    +    hitters = []
    +** Processing line: ~    #puts shape.to_s~
    +- Inside source: true
    +*** True Line Result
    +    #puts shape.to_s
    +** Processing line: ~    toCollide = nil~
    +- Inside source: true
    +*** True Line Result
    +    toCollide = nil
    +** Processing line: ~    for b in args.state.balls~
    +- Inside source: true
    +*** True Line Result
    +    for b in args.state.balls
    +** Processing line: ~      if [b.x, b.y, b.width, b.height].intersect_rect?(shape.bold)~
    +- Inside source: true
    +*** True Line Result
    +      if [b.x, b.y, b.width, b.height].intersect_rect?(shape.bold)
    +** Processing line: ~        didSquare = false~
    +- Inside source: true
    +*** True Line Result
    +        didSquare = false
    +** Processing line: ~        for s in shape.squareColliders~
    +- Inside source: true
    +*** True Line Result
    +        for s in shape.squareColliders
    +** Processing line: ~          if (s.collision?(args, b))~
    +- Inside source: true
    +*** True Line Result
    +          if (s.collision?(args, b))
    +** Processing line: ~            didSquare = true~
    +- Inside source: true
    +*** True Line Result
    +            didSquare = true
    +** Processing line: ~            didHit = true~
    +- Inside source: true
    +*** True Line Result
    +            didHit = true
    +** Processing line: ~            #s.collide(args, b)~
    +- Inside source: true
    +*** True Line Result
    +            #s.collide(args, b)
    +** Processing line: ~            toCollide = s~
    +- Inside source: true
    +*** True Line Result
    +            toCollide = s
    +** Processing line: ~            #hitter = b~
    +- Inside source: true
    +*** True Line Result
    +            #hitter = b
    +** Processing line: ~            hitters.append(b)~
    +- Inside source: true
    +*** True Line Result
    +            hitters.append(b)
    +** Processing line: ~          end #end if~
    +- Inside source: true
    +*** True Line Result
    +          end #end if
    +** Processing line: ~        end #end for~
    +- Inside source: true
    +*** True Line Result
    +        end #end for
    +** Processing line: ~        if (didSquare == false)~
    +- Inside source: true
    +*** True Line Result
    +        if (didSquare == false)
    +** Processing line: ~          for c in shape.colliders~
    +- Inside source: true
    +*** True Line Result
    +          for c in shape.colliders
    +** Processing line: ~            #puts args.state.ball.velocity~
    +- Inside source: true
    +*** True Line Result
    +            #puts args.state.ball.velocity
    +** Processing line: ~            if c.collision?(args, b.getPoints(args),b)~
    +- Inside source: true
    +*** True Line Result
    +            if c.collision?(args, b.getPoints(args),b)
    +** Processing line: ~              #c.collide args, b~
    +- Inside source: true
    +*** True Line Result
    +              #c.collide args, b
    +** Processing line: ~              toCollide = c~
    +- Inside source: true
    +*** True Line Result
    +              toCollide = c
    +** Processing line: ~              didHit = true~
    +- Inside source: true
    +*** True Line Result
    +              didHit = true
    +** Processing line: ~              hitters.append(b)~
    +- Inside source: true
    +*** True Line Result
    +              hitters.append(b)
    +** Processing line: ~            end #end if~
    +- Inside source: true
    +*** True Line Result
    +            end #end if
    +** Processing line: ~          end #end for~
    +- Inside source: true
    +*** True Line Result
    +          end #end for
    +** Processing line: ~        end #end if~
    +- Inside source: true
    +*** True Line Result
    +        end #end if
    +** Processing line: ~      end#end if~
    +- Inside source: true
    +*** True Line Result
    +      end#end if
    +** Processing line: ~    end#end for~
    +- Inside source: true
    +*** True Line Result
    +    end#end for
    +** Processing line: ~    if (didHit)~
    +- Inside source: true
    +*** True Line Result
    +    if (didHit)
    +** Processing line: ~      shape.count=0~
    +- Inside source: true
    +*** True Line Result
    +      shape.count=0
    +** Processing line: ~      hitters = hitters.uniq~
    +- Inside source: true
    +*** True Line Result
    +      hitters = hitters.uniq
    +** Processing line: ~      for hitter in hitters~
    +- Inside source: true
    +*** True Line Result
    +      for hitter in hitters
    +** Processing line: ~        hitter.makeLeader args~
    +- Inside source: true
    +*** True Line Result
    +        hitter.makeLeader args
    +** Processing line: ~        #toCollide.collide(args, hitter)~
    +- Inside source: true
    +*** True Line Result
    +        #toCollide.collide(args, hitter)
    +** Processing line: ~        if shape.home == "squares"~
    +- Inside source: true
    +*** True Line Result
    +        if shape.home == "squares"
    +** Processing line: ~          args.state.squares.delete(shape)~
    +- Inside source: true
    +*** True Line Result
    +          args.state.squares.delete(shape)
    +** Processing line: ~        elsif shape.home == "tshapes"~
    +- Inside source: true
    +*** True Line Result
    +        elsif shape.home == "tshapes"
    +** Processing line: ~          args.state.tshapes.delete(shape)~
    +- Inside source: true
    +*** True Line Result
    +          args.state.tshapes.delete(shape)
    +** Processing line: ~        else shape.home == "lines"~
    +- Inside source: true
    +*** True Line Result
    +        else shape.home == "lines"
    +** Processing line: ~          args.state.lines.delete(shape)~
    +- Inside source: true
    +*** True Line Result
    +          args.state.lines.delete(shape)
    +** Processing line: ~        end~
    +- Inside source: true
    +*** True Line Result
    +        end
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      #puts "HIT!" + hitter.number~
    +- Inside source: true
    +*** True Line Result
    +      #puts "HIT!" + hitter.number
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~  def universalUpdate args, shape~
    +- Inside source: true
    +*** True Line Result
    +  def universalUpdate args, shape
    +** Processing line: ~    #puts shape.home~
    +- Inside source: true
    +*** True Line Result
    +    #puts shape.home
    +** Processing line: ~    if (shape.count <= 1)~
    +- Inside source: true
    +*** True Line Result
    +    if (shape.count <= 1)
    +** Processing line: ~      universalUpdateOne args, shape~
    +- Inside source: true
    +*** True Line Result
    +      universalUpdateOne args, shape
    +** Processing line: ~      return~
    +- Inside source: true
    +*** True Line Result
    +      return
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    didHit = false~
    +- Inside source: true
    +*** True Line Result
    +    didHit = false
    +** Processing line: ~    hitter = nil~
    +- Inside source: true
    +*** True Line Result
    +    hitter = nil
    +** Processing line: ~    for b in args.state.ballParents~
    +- Inside source: true
    +*** True Line Result
    +    for b in args.state.ballParents
    +** Processing line: ~      if [b.x, b.y, b.width, b.height].intersect_rect?(shape.bold)~
    +- Inside source: true
    +*** True Line Result
    +      if [b.x, b.y, b.width, b.height].intersect_rect?(shape.bold)
    +** Processing line: ~        didSquare = false~
    +- Inside source: true
    +*** True Line Result
    +        didSquare = false
    +** Processing line: ~        for s in shape.squareColliders~
    +- Inside source: true
    +*** True Line Result
    +        for s in shape.squareColliders
    +** Processing line: ~          if (s.collision?(args, b))~
    +- Inside source: true
    +*** True Line Result
    +          if (s.collision?(args, b))
    +** Processing line: ~            didSquare = true~
    +- Inside source: true
    +*** True Line Result
    +            didSquare = true
    +** Processing line: ~            didHit = true~
    +- Inside source: true
    +*** True Line Result
    +            didHit = true
    +** Processing line: ~            s.collide(args, b)~
    +- Inside source: true
    +*** True Line Result
    +            s.collide(args, b)
    +** Processing line: ~            hitter = b~
    +- Inside source: true
    +*** True Line Result
    +            hitter = b
    +** Processing line: ~          end~
    +- Inside source: true
    +*** True Line Result
    +          end
    +** Processing line: ~        end~
    +- Inside source: true
    +*** True Line Result
    +        end
    +** Processing line: ~        if (didSquare == false)~
    +- Inside source: true
    +*** True Line Result
    +        if (didSquare == false)
    +** Processing line: ~          for c in shape.colliders~
    +- Inside source: true
    +*** True Line Result
    +          for c in shape.colliders
    +** Processing line: ~            #puts args.state.ball.velocity~
    +- Inside source: true
    +*** True Line Result
    +            #puts args.state.ball.velocity
    +** Processing line: ~            if c.collision?(args, b.getPoints(args),b)~
    +- Inside source: true
    +*** True Line Result
    +            if c.collision?(args, b.getPoints(args),b)
    +** Processing line: ~              c.collide args, b~
    +- Inside source: true
    +*** True Line Result
    +              c.collide args, b
    +** Processing line: ~              didHit = true~
    +- Inside source: true
    +*** True Line Result
    +              didHit = true
    +** Processing line: ~              hitter = b~
    +- Inside source: true
    +*** True Line Result
    +              hitter = b
    +** Processing line: ~            end~
    +- Inside source: true
    +*** True Line Result
    +            end
    +** Processing line: ~          end~
    +- Inside source: true
    +*** True Line Result
    +          end
    +** Processing line: ~        end~
    +- Inside source: true
    +*** True Line Result
    +        end
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~    if (didHit)~
    +- Inside source: true
    +*** True Line Result
    +    if (didHit)
    +** Processing line: ~      shape.count=shape.count-1~
    +- Inside source: true
    +*** True Line Result
    +      shape.count=shape.count-1
    +** Processing line: ~      shape.damageCount.append([(hitter.leastChain+1 - hitter.number)-1, args.state.tick_count])~
    +- Inside source: true
    +*** True Line Result
    +      shape.damageCount.append([(hitter.leastChain+1 - hitter.number)-1, args.state.tick_count])
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~    i=0~
    +- Inside source: true
    +*** True Line Result
    +    i=0
    +** Processing line: ~    while i < shape.damageCount.length~
    +- Inside source: true
    +*** True Line Result
    +    while i < shape.damageCount.length
    +** Processing line: ~      if shape.damageCount[i][0] <= 0~
    +- Inside source: true
    +*** True Line Result
    +      if shape.damageCount[i][0] <= 0
    +** Processing line: ~        shape.damageCount.delete_at(i)~
    +- Inside source: true
    +*** True Line Result
    +        shape.damageCount.delete_at(i)
    +** Processing line: ~        i-=1~
    +- Inside source: true
    +*** True Line Result
    +        i-=1
    +** Processing line: ~      elsif shape.damageCount[i][1].elapsed_time > BALL_DISTANCE and shape.damageCount[i][0] > 1~
    +- Inside source: true
    +*** True Line Result
    +      elsif shape.damageCount[i][1].elapsed_time > BALL_DISTANCE and shape.damageCount[i][0] > 1
    +** Processing line: ~        shape.count-=1~
    +- Inside source: true
    +*** True Line Result
    +        shape.count-=1
    +** Processing line: ~        shape.damageCount[i][0]-=1~
    +- Inside source: true
    +*** True Line Result
    +        shape.damageCount[i][0]-=1
    +** Processing line: ~        shape.damageCount[i][1] = args.state.tick_count~
    +- Inside source: true
    +*** True Line Result
    +        shape.damageCount[i][1] = args.state.tick_count
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~      i+=1~
    +- Inside source: true
    +*** True Line Result
    +      i+=1
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~  class Square~
    +- Inside source: true
    +*** True Line Result
    +  class Square
    +** Processing line: ~     attr_accessor :count, :x, :y, :home, :bold, :squareColliders, :colliders, :damageCount~
    +- Inside source: true
    +*** True Line Result
    +     attr_accessor :count, :x, :y, :home, :bold, :squareColliders, :colliders, :damageCount
    +** Processing line: ~     def initialize(args, x, y, block_size, orientation, block_offset)~
    +- Inside source: true
    +*** True Line Result
    +     def initialize(args, x, y, block_size, orientation, block_offset)
    +** Processing line: ~          @x = x * block_size~
    +- Inside source: true
    +*** True Line Result
    +          @x = x * block_size
    +** Processing line: ~          @y = y * block_size~
    +- Inside source: true
    +*** True Line Result
    +          @y = y * block_size
    +** Processing line: ~          @block_size = block_size~
    +- Inside source: true
    +*** True Line Result
    +          @block_size = block_size
    +** Processing line: ~          @block_offset = block_offset~
    +- Inside source: true
    +*** True Line Result
    +          @block_offset = block_offset
    +** Processing line: ~          @orientation = orientation~
    +- Inside source: true
    +*** True Line Result
    +          @orientation = orientation
    +** Processing line: ~          @damageCount = []~
    +- Inside source: true
    +*** True Line Result
    +          @damageCount = []
    +** Processing line: ~          @home = 'squares'~
    +- Inside source: true
    +*** True Line Result
    +          @home = 'squares'
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~          Kernel.srand()~
    +- Inside source: true
    +*** True Line Result
    +          Kernel.srand()
    +** Processing line: ~          @r = rand(255)~
    +- Inside source: true
    +*** True Line Result
    +          @r = rand(255)
    +** Processing line: ~          @g = rand(255)~
    +- Inside source: true
    +*** True Line Result
    +          @g = rand(255)
    +** Processing line: ~          @b = rand(255)~
    +- Inside source: true
    +*** True Line Result
    +          @b = rand(255)
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~          @count = rand(MAX_COUNT)+1~
    +- Inside source: true
    +*** True Line Result
    +          @count = rand(MAX_COUNT)+1
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~          x_offset = (args.state.board_width + args.grid.w / 8) + @block_offset / 2~
    +- Inside source: true
    +*** True Line Result
    +          x_offset = (args.state.board_width + args.grid.w / 8) + @block_offset / 2
    +** Processing line: ~          @x_adjusted = @x + x_offset~
    +- Inside source: true
    +*** True Line Result
    +          @x_adjusted = @x + x_offset
    +** Processing line: ~          @y_adjusted = @y~
    +- Inside source: true
    +*** True Line Result
    +          @y_adjusted = @y
    +** Processing line: ~          @size_adjusted = @block_size * 2 - @block_offset~
    +- Inside source: true
    +*** True Line Result
    +          @size_adjusted = @block_size * 2 - @block_offset
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~          hypotenuse=args.state.ball_hypotenuse~
    +- Inside source: true
    +*** True Line Result
    +          hypotenuse=args.state.ball_hypotenuse
    +** Processing line: ~          @bold = [(@x_adjusted-hypotenuse/2)-1, (@y_adjusted-hypotenuse/2)-1, @size_adjusted + hypotenuse + 2, @size_adjusted + hypotenuse + 2]~
    +- Inside source: true
    +*** True Line Result
    +          @bold = [(@x_adjusted-hypotenuse/2)-1, (@y_adjusted-hypotenuse/2)-1, @size_adjusted + hypotenuse + 2, @size_adjusted + hypotenuse + 2]
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~          @points = [~
    +- Inside source: true
    +*** True Line Result
    +          @points = [
    +** Processing line: ~            {x:@x_adjusted, y:@y_adjusted},~
    +- Inside source: true
    +*** True Line Result
    +            {x:@x_adjusted, y:@y_adjusted},
    +** Processing line: ~            {x:@x_adjusted+@size_adjusted, y:@y_adjusted},~
    +- Inside source: true
    +*** True Line Result
    +            {x:@x_adjusted+@size_adjusted, y:@y_adjusted},
    +** Processing line: ~            {x:@x_adjusted+@size_adjusted, y:@y_adjusted+@size_adjusted},~
    +- Inside source: true
    +*** True Line Result
    +            {x:@x_adjusted+@size_adjusted, y:@y_adjusted+@size_adjusted},
    +** Processing line: ~            {x:@x_adjusted, y:@y_adjusted+@size_adjusted}~
    +- Inside source: true
    +*** True Line Result
    +            {x:@x_adjusted, y:@y_adjusted+@size_adjusted}
    +** Processing line: ~          ]~
    +- Inside source: true
    +*** True Line Result
    +          ]
    +** Processing line: ~          @squareColliders = [~
    +- Inside source: true
    +*** True Line Result
    +          @squareColliders = [
    +** Processing line: ~            SquareCollider.new(@points[0].x,@points[0].y,{x:-1,y:-1}),~
    +- Inside source: true
    +*** True Line Result
    +            SquareCollider.new(@points[0].x,@points[0].y,{x:-1,y:-1}),
    +** Processing line: ~            SquareCollider.new(@points[1].x-COLLISIONWIDTH,@points[1].y,{x:1,y:-1}),~
    +- Inside source: true
    +*** True Line Result
    +            SquareCollider.new(@points[1].x-COLLISIONWIDTH,@points[1].y,{x:1,y:-1}),
    +** Processing line: ~            SquareCollider.new(@points[2].x-COLLISIONWIDTH,@points[2].y-COLLISIONWIDTH,{x:1,y:1}),~
    +- Inside source: true
    +*** True Line Result
    +            SquareCollider.new(@points[2].x-COLLISIONWIDTH,@points[2].y-COLLISIONWIDTH,{x:1,y:1}),
    +** Processing line: ~            SquareCollider.new(@points[3].x,@points[3].y-COLLISIONWIDTH,{x:-1,y:1}),~
    +- Inside source: true
    +*** True Line Result
    +            SquareCollider.new(@points[3].x,@points[3].y-COLLISIONWIDTH,{x:-1,y:1}),
    +** Processing line: ~          ]~
    +- Inside source: true
    +*** True Line Result
    +          ]
    +** Processing line: ~          @colliders = [~
    +- Inside source: true
    +*** True Line Result
    +          @colliders = [
    +** Processing line: ~            LinearCollider.new(@points[0],@points[1], :neg),~
    +- Inside source: true
    +*** True Line Result
    +            LinearCollider.new(@points[0],@points[1], :neg),
    +** Processing line: ~            LinearCollider.new(@points[1],@points[2], :neg),~
    +- Inside source: true
    +*** True Line Result
    +            LinearCollider.new(@points[1],@points[2], :neg),
    +** Processing line: ~            LinearCollider.new(@points[2],@points[3], :pos),~
    +- Inside source: true
    +*** True Line Result
    +            LinearCollider.new(@points[2],@points[3], :pos),
    +** Processing line: ~            LinearCollider.new(@points[0],@points[3], :pos)~
    +- Inside source: true
    +*** True Line Result
    +            LinearCollider.new(@points[0],@points[3], :pos)
    +** Processing line: ~          ]~
    +- Inside source: true
    +*** True Line Result
    +          ]
    +** Processing line: ~     end~
    +- Inside source: true
    +*** True Line Result
    +     end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~     def draw(args)~
    +- Inside source: true
    +*** True Line Result
    +     def draw(args)
    +** Processing line: ~      #Offset the coordinates to the edge of the game area~
    +- Inside source: true
    +*** True Line Result
    +      #Offset the coordinates to the edge of the game area
    +** Processing line: ~      x_offset = (args.state.board_width + args.grid.w / 8) + @block_offset / 2~
    +- Inside source: true
    +*** True Line Result
    +      x_offset = (args.state.board_width + args.grid.w / 8) + @block_offset / 2
    +** Processing line: ~      #args.outputs.solids << [@x + x_offset, @y, @block_size * 2 - @block_offset, @block_size * 2 - @block_offset, @r, @g, @b]~
    +- Inside source: true
    +*** True Line Result
    +      #args.outputs.solids << [@x + x_offset, @y, @block_size * 2 - @block_offset, @block_size * 2 - @block_offset, @r, @g, @b]
    +** Processing line: ~      args.outputs.solids <<{x: (@x + x_offset), y: (@y), w: (@block_size * 2 - @block_offset), h: (@block_size * 2 - @block_offset), r: @r , g: @g , b: @b }~
    +- Inside source: true
    +*** True Line Result
    +      args.outputs.solids <<{x: (@x + x_offset), y: (@y), w: (@block_size * 2 - @block_offset), h: (@block_size * 2 - @block_offset), r: @r , g: @g , b: @b }
    +** Processing line: ~      #args.outputs.solids << @bold.append([255,0,0])~
    +- Inside source: true
    +*** True Line Result
    +      #args.outputs.solids << @bold.append([255,0,0])
    +** Processing line: ~      args.outputs.labels << [@x + x_offset + (@block_size * 2 - @block_offset)/2, (@y) + (@block_size * 2 - @block_offset)/2, @count.to_s]~
    +- Inside source: true
    +*** True Line Result
    +      args.outputs.labels << [@x + x_offset + (@block_size * 2 - @block_offset)/2, (@y) + (@block_size * 2 - @block_offset)/2, @count.to_s]
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~     end~
    +- Inside source: true
    +*** True Line Result
    +     end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~     def update args~
    +- Inside source: true
    +*** True Line Result
    +     def update args
    +** Processing line: ~       universalUpdate args, self~
    +- Inside source: true
    +*** True Line Result
    +       universalUpdate args, self
    +** Processing line: ~     end~
    +- Inside source: true
    +*** True Line Result
    +     end
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~  class TShape~
    +- Inside source: true
    +*** True Line Result
    +  class TShape
    +** Processing line: ~      attr_accessor :count, :x, :y, :home, :bold, :squareColliders, :colliders, :damageCount~
    +- Inside source: true
    +*** True Line Result
    +      attr_accessor :count, :x, :y, :home, :bold, :squareColliders, :colliders, :damageCount
    +** Processing line: ~      def initialize(args, x, y, block_size, orientation, block_offset)~
    +- Inside source: true
    +*** True Line Result
    +      def initialize(args, x, y, block_size, orientation, block_offset)
    +** Processing line: ~          @x = x * block_size~
    +- Inside source: true
    +*** True Line Result
    +          @x = x * block_size
    +** Processing line: ~          @y = y * block_size~
    +- Inside source: true
    +*** True Line Result
    +          @y = y * block_size
    +** Processing line: ~          @block_size = block_size~
    +- Inside source: true
    +*** True Line Result
    +          @block_size = block_size
    +** Processing line: ~          @block_offset = block_offset~
    +- Inside source: true
    +*** True Line Result
    +          @block_offset = block_offset
    +** Processing line: ~          @orientation = orientation~
    +- Inside source: true
    +*** True Line Result
    +          @orientation = orientation
    +** Processing line: ~          @damageCount = []~
    +- Inside source: true
    +*** True Line Result
    +          @damageCount = []
    +** Processing line: ~          @home = "tshapes"~
    +- Inside source: true
    +*** True Line Result
    +          @home = "tshapes"
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~          Kernel.srand()~
    +- Inside source: true
    +*** True Line Result
    +          Kernel.srand()
    +** Processing line: ~          @r = rand(255)~
    +- Inside source: true
    +*** True Line Result
    +          @r = rand(255)
    +** Processing line: ~          @g = rand(255)~
    +- Inside source: true
    +*** True Line Result
    +          @g = rand(255)
    +** Processing line: ~          @b = rand(255)~
    +- Inside source: true
    +*** True Line Result
    +          @b = rand(255)
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~          @count = rand(MAX_COUNT)+1~
    +- Inside source: true
    +*** True Line Result
    +          @count = rand(MAX_COUNT)+1
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~          @shapePoints = getShapePoints(args)~
    +- Inside source: true
    +*** True Line Result
    +          @shapePoints = getShapePoints(args)
    +** Processing line: ~          minX={x:INFINITY, y:0}~
    +- Inside source: true
    +*** True Line Result
    +          minX={x:INFINITY, y:0}
    +** Processing line: ~          minY={x:0, y:INFINITY}~
    +- Inside source: true
    +*** True Line Result
    +          minY={x:0, y:INFINITY}
    +** Processing line: ~          maxX={x:-INFINITY, y:0}~
    +- Inside source: true
    +*** True Line Result
    +          maxX={x:-INFINITY, y:0}
    +** Processing line: ~          maxY={x:0, y:-INFINITY}~
    +- Inside source: true
    +*** True Line Result
    +          maxY={x:0, y:-INFINITY}
    +** Processing line: ~          for p in @shapePoints~
    +- Inside source: true
    +*** True Line Result
    +          for p in @shapePoints
    +** Processing line: ~            if p.x < minX.x~
    +- Inside source: true
    +*** True Line Result
    +            if p.x < minX.x
    +** Processing line: ~              minX = p~
    +- Inside source: true
    +*** True Line Result
    +              minX = p
    +** Processing line: ~            end~
    +- Inside source: true
    +*** True Line Result
    +            end
    +** Processing line: ~            if p.x > maxX.x~
    +- Inside source: true
    +*** True Line Result
    +            if p.x > maxX.x
    +** Processing line: ~              maxX = p~
    +- Inside source: true
    +*** True Line Result
    +              maxX = p
    +** Processing line: ~            end~
    +- Inside source: true
    +*** True Line Result
    +            end
    +** Processing line: ~            if p.y < minY.y~
    +- Inside source: true
    +*** True Line Result
    +            if p.y < minY.y
    +** Processing line: ~              minY = p~
    +- Inside source: true
    +*** True Line Result
    +              minY = p
    +** Processing line: ~            end~
    +- Inside source: true
    +*** True Line Result
    +            end
    +** Processing line: ~            if p.y > maxY.y~
    +- Inside source: true
    +*** True Line Result
    +            if p.y > maxY.y
    +** Processing line: ~              maxY = p~
    +- Inside source: true
    +*** True Line Result
    +              maxY = p
    +** Processing line: ~            end~
    +- Inside source: true
    +*** True Line Result
    +            end
    +** Processing line: ~          end~
    +- Inside source: true
    +*** True Line Result
    +          end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~          hypotenuse=args.state.ball_hypotenuse~
    +- Inside source: true
    +*** True Line Result
    +          hypotenuse=args.state.ball_hypotenuse
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~          @bold = [(minX.x-hypotenuse/2)-1, (minY.y-hypotenuse/2)-1, -((minX.x-hypotenuse/2)-1)+(maxX.x + hypotenuse + 2), -((minY.y-hypotenuse/2)-1)+(maxY.y + hypotenuse + 2)]~
    +- Inside source: true
    +*** True Line Result
    +          @bold = [(minX.x-hypotenuse/2)-1, (minY.y-hypotenuse/2)-1, -((minX.x-hypotenuse/2)-1)+(maxX.x + hypotenuse + 2), -((minY.y-hypotenuse/2)-1)+(maxY.y + hypotenuse + 2)]
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~      def getShapePoints(args)~
    +- Inside source: true
    +*** True Line Result
    +      def getShapePoints(args)
    +** Processing line: ~        points=[]~
    +- Inside source: true
    +*** True Line Result
    +        points=[]
    +** Processing line: ~        x_offset = (args.state.board_width + args.grid.w / 8) + (@block_offset / 2)~
    +- Inside source: true
    +*** True Line Result
    +        x_offset = (args.state.board_width + args.grid.w / 8) + (@block_offset / 2)
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~        if @orientation == :right~
    +- Inside source: true
    +*** True Line Result
    +        if @orientation == :right
    +** Processing line: ~            #args.outputs.solids << [@x + x_offset, @y, @block_size - @block_offset, @block_size * 3 - @block_offset, @r, @g, @b]~
    +- Inside source: true
    +*** True Line Result
    +            #args.outputs.solids << [@x + x_offset, @y, @block_size - @block_offset, @block_size * 3 - @block_offset, @r, @g, @b]
    +** Processing line: ~            #args.outputs.solids << [@x + x_offset, @y + @block_size, @block_size * 2, @block_size, @r, @g, @b]~
    +- Inside source: true
    +*** True Line Result
    +            #args.outputs.solids << [@x + x_offset, @y + @block_size, @block_size * 2, @block_size, @r, @g, @b]
    +** Processing line: ~            points = [~
    +- Inside source: true
    +*** True Line Result
    +            points = [
    +** Processing line: ~              {x:@x + x_offset, y:@y},~
    +- Inside source: true
    +*** True Line Result
    +              {x:@x + x_offset, y:@y},
    +** Processing line: ~              {x:(@x + x_offset)+(@block_size - @block_offset), y:@y},~
    +- Inside source: true
    +*** True Line Result
    +              {x:(@x + x_offset)+(@block_size - @block_offset), y:@y},
    +** Processing line: ~              {x:(@x + x_offset)+(@block_size - @block_offset),y:@y + @block_size},~
    +- Inside source: true
    +*** True Line Result
    +              {x:(@x + x_offset)+(@block_size - @block_offset),y:@y + @block_size},
    +** Processing line: ~              {x:(@x + x_offset)+ @block_size * 2,y:@y + @block_size},~
    +- Inside source: true
    +*** True Line Result
    +              {x:(@x + x_offset)+ @block_size * 2,y:@y + @block_size},
    +** Processing line: ~              {x:(@x + x_offset)+ @block_size * 2,y:@y + @block_size+@block_size},~
    +- Inside source: true
    +*** True Line Result
    +              {x:(@x + x_offset)+ @block_size * 2,y:@y + @block_size+@block_size},
    +** Processing line: ~              {x:(@x + x_offset)+(@block_size - @block_offset),y:@y + @block_size+@block_size},~
    +- Inside source: true
    +*** True Line Result
    +              {x:(@x + x_offset)+(@block_size - @block_offset),y:@y + @block_size+@block_size},
    +** Processing line: ~              {x:(@x + x_offset)+(@block_size - @block_offset), y:@y+ @block_size * 3 - @block_offset},~
    +- Inside source: true
    +*** True Line Result
    +              {x:(@x + x_offset)+(@block_size - @block_offset), y:@y+ @block_size * 3 - @block_offset},
    +** Processing line: ~              {x:@x + x_offset , y:@y+ @block_size * 3 - @block_offset}~
    +- Inside source: true
    +*** True Line Result
    +              {x:@x + x_offset , y:@y+ @block_size * 3 - @block_offset}
    +** Processing line: ~            ]~
    +- Inside source: true
    +*** True Line Result
    +            ]
    +** Processing line: ~            @squareColliders = [~
    +- Inside source: true
    +*** True Line Result
    +            @squareColliders = [
    +** Processing line: ~              SquareCollider.new(points[0].x,points[0].y,{x:-1,y:-1}),~
    +- Inside source: true
    +*** True Line Result
    +              SquareCollider.new(points[0].x,points[0].y,{x:-1,y:-1}),
    +** Processing line: ~              SquareCollider.new(points[1].x-COLLISIONWIDTH,points[1].y,{x:1,y:-1}),~
    +- Inside source: true
    +*** True Line Result
    +              SquareCollider.new(points[1].x-COLLISIONWIDTH,points[1].y,{x:1,y:-1}),
    +** Processing line: ~              SquareCollider.new(points[2].x,points[2].y-COLLISIONWIDTH,{x:1,y:-1}),~
    +- Inside source: true
    +*** True Line Result
    +              SquareCollider.new(points[2].x,points[2].y-COLLISIONWIDTH,{x:1,y:-1}),
    +** Processing line: ~              SquareCollider.new(points[3].x-COLLISIONWIDTH,points[3].y,{x:1,y:-1}),~
    +- Inside source: true
    +*** True Line Result
    +              SquareCollider.new(points[3].x-COLLISIONWIDTH,points[3].y,{x:1,y:-1}),
    +** Processing line: ~              SquareCollider.new(points[4].x-COLLISIONWIDTH,points[4].y-COLLISIONWIDTH,{x:1,y:1}),~
    +- Inside source: true
    +*** True Line Result
    +              SquareCollider.new(points[4].x-COLLISIONWIDTH,points[4].y-COLLISIONWIDTH,{x:1,y:1}),
    +** Processing line: ~              SquareCollider.new(points[5].x,points[5].y,{x:1,y:1}),~
    +- Inside source: true
    +*** True Line Result
    +              SquareCollider.new(points[5].x,points[5].y,{x:1,y:1}),
    +** Processing line: ~              SquareCollider.new(points[6].x-COLLISIONWIDTH,points[6].y-COLLISIONWIDTH,{x:1,y:1}),~
    +- Inside source: true
    +*** True Line Result
    +              SquareCollider.new(points[6].x-COLLISIONWIDTH,points[6].y-COLLISIONWIDTH,{x:1,y:1}),
    +** Processing line: ~              SquareCollider.new(points[7].x,points[7].y-COLLISIONWIDTH,{x:-1,y:1}),~
    +- Inside source: true
    +*** True Line Result
    +              SquareCollider.new(points[7].x,points[7].y-COLLISIONWIDTH,{x:-1,y:1}),
    +** Processing line: ~            ]~
    +- Inside source: true
    +*** True Line Result
    +            ]
    +** Processing line: ~            @colliders = [~
    +- Inside source: true
    +*** True Line Result
    +            @colliders = [
    +** Processing line: ~              LinearCollider.new(points[0],points[1], :neg),~
    +- Inside source: true
    +*** True Line Result
    +              LinearCollider.new(points[0],points[1], :neg),
    +** Processing line: ~              LinearCollider.new(points[1],points[2], :neg),~
    +- Inside source: true
    +*** True Line Result
    +              LinearCollider.new(points[1],points[2], :neg),
    +** Processing line: ~              LinearCollider.new(points[2],points[3], :neg),~
    +- Inside source: true
    +*** True Line Result
    +              LinearCollider.new(points[2],points[3], :neg),
    +** Processing line: ~              LinearCollider.new(points[3],points[4], :neg),~
    +- Inside source: true
    +*** True Line Result
    +              LinearCollider.new(points[3],points[4], :neg),
    +** Processing line: ~              LinearCollider.new(points[4],points[5], :pos),~
    +- Inside source: true
    +*** True Line Result
    +              LinearCollider.new(points[4],points[5], :pos),
    +** Processing line: ~              LinearCollider.new(points[5],points[6], :neg),~
    +- Inside source: true
    +*** True Line Result
    +              LinearCollider.new(points[5],points[6], :neg),
    +** Processing line: ~              LinearCollider.new(points[6],points[7], :pos),~
    +- Inside source: true
    +*** True Line Result
    +              LinearCollider.new(points[6],points[7], :pos),
    +** Processing line: ~              LinearCollider.new(points[0],points[7], :pos)~
    +- Inside source: true
    +*** True Line Result
    +              LinearCollider.new(points[0],points[7], :pos)
    +** Processing line: ~            ]~
    +- Inside source: true
    +*** True Line Result
    +            ]
    +** Processing line: ~        elsif @orientation == :up~
    +- Inside source: true
    +*** True Line Result
    +        elsif @orientation == :up
    +** Processing line: ~            #args.outputs.solids << [@x + x_offset, @y, @block_size * 3 - @block_offset, @block_size - @block_offset, @r, @g, @b]~
    +- Inside source: true
    +*** True Line Result
    +            #args.outputs.solids << [@x + x_offset, @y, @block_size * 3 - @block_offset, @block_size - @block_offset, @r, @g, @b]
    +** Processing line: ~            #args.outputs.solids << [@x + x_offset + @block_size, @y, @block_size, @block_size * 2, @r, @g, @b]~
    +- Inside source: true
    +*** True Line Result
    +            #args.outputs.solids << [@x + x_offset + @block_size, @y, @block_size, @block_size * 2, @r, @g, @b]
    +** Processing line: ~            points = [~
    +- Inside source: true
    +*** True Line Result
    +            points = [
    +** Processing line: ~              {x:@x + x_offset, y:@y},~
    +- Inside source: true
    +*** True Line Result
    +              {x:@x + x_offset, y:@y},
    +** Processing line: ~              {x:(@x + x_offset)+(@block_size * 3 - @block_offset), y:@y},~
    +- Inside source: true
    +*** True Line Result
    +              {x:(@x + x_offset)+(@block_size * 3 - @block_offset), y:@y},
    +** Processing line: ~              {x:(@x + x_offset)+(@block_size * 3 - @block_offset), y:@y+(@block_size - @block_offset)},~
    +- Inside source: true
    +*** True Line Result
    +              {x:(@x + x_offset)+(@block_size * 3 - @block_offset), y:@y+(@block_size - @block_offset)},
    +** Processing line: ~              {x:@x + x_offset + @block_size + @block_size, y:@y+(@block_size - @block_offset)},~
    +- Inside source: true
    +*** True Line Result
    +              {x:@x + x_offset + @block_size + @block_size, y:@y+(@block_size - @block_offset)},
    +** Processing line: ~              {x:@x + x_offset + @block_size + @block_size, y:@y+@block_size*2},~
    +- Inside source: true
    +*** True Line Result
    +              {x:@x + x_offset + @block_size + @block_size, y:@y+@block_size*2},
    +** Processing line: ~              {x:@x + x_offset + @block_size, y:@y+@block_size*2},~
    +- Inside source: true
    +*** True Line Result
    +              {x:@x + x_offset + @block_size, y:@y+@block_size*2},
    +** Processing line: ~              {x:@x + x_offset + @block_size, y:@y+(@block_size - @block_offset)},~
    +- Inside source: true
    +*** True Line Result
    +              {x:@x + x_offset + @block_size, y:@y+(@block_size - @block_offset)},
    +** Processing line: ~              {x:@x + x_offset, y:@y+(@block_size - @block_offset)}~
    +- Inside source: true
    +*** True Line Result
    +              {x:@x + x_offset, y:@y+(@block_size - @block_offset)}
    +** Processing line: ~            ]~
    +- Inside source: true
    +*** True Line Result
    +            ]
    +** Processing line: ~            @squareColliders = [~
    +- Inside source: true
    +*** True Line Result
    +            @squareColliders = [
    +** Processing line: ~              SquareCollider.new(points[0].x,points[0].y,{x:-1,y:-1}),~
    +- Inside source: true
    +*** True Line Result
    +              SquareCollider.new(points[0].x,points[0].y,{x:-1,y:-1}),
    +** Processing line: ~              SquareCollider.new(points[1].x-COLLISIONWIDTH,points[1].y,{x:1,y:-1}),~
    +- Inside source: true
    +*** True Line Result
    +              SquareCollider.new(points[1].x-COLLISIONWIDTH,points[1].y,{x:1,y:-1}),
    +** Processing line: ~              SquareCollider.new(points[2].x-COLLISIONWIDTH,points[2].y-COLLISIONWIDTH,{x:1,y:1}),~
    +- Inside source: true
    +*** True Line Result
    +              SquareCollider.new(points[2].x-COLLISIONWIDTH,points[2].y-COLLISIONWIDTH,{x:1,y:1}),
    +** Processing line: ~              SquareCollider.new(points[3].x,points[3].y,{x:1,y:1}),~
    +- Inside source: true
    +*** True Line Result
    +              SquareCollider.new(points[3].x,points[3].y,{x:1,y:1}),
    +** Processing line: ~              SquareCollider.new(points[4].x-COLLISIONWIDTH,points[4].y-COLLISIONWIDTH,{x:1,y:1}),~
    +- Inside source: true
    +*** True Line Result
    +              SquareCollider.new(points[4].x-COLLISIONWIDTH,points[4].y-COLLISIONWIDTH,{x:1,y:1}),
    +** Processing line: ~              SquareCollider.new(points[5].x,points[5].y-COLLISIONWIDTH,{x:-1,y:1}),~
    +- Inside source: true
    +*** True Line Result
    +              SquareCollider.new(points[5].x,points[5].y-COLLISIONWIDTH,{x:-1,y:1}),
    +** Processing line: ~              SquareCollider.new(points[6].x-COLLISIONWIDTH,points[6].y,{x:-1,y:1}),~
    +- Inside source: true
    +*** True Line Result
    +              SquareCollider.new(points[6].x-COLLISIONWIDTH,points[6].y,{x:-1,y:1}),
    +** Processing line: ~              SquareCollider.new(points[7].x,points[7].y-COLLISIONWIDTH,{x:-1,y:1}),~
    +- Inside source: true
    +*** True Line Result
    +              SquareCollider.new(points[7].x,points[7].y-COLLISIONWIDTH,{x:-1,y:1}),
    +** Processing line: ~            ]~
    +- Inside source: true
    +*** True Line Result
    +            ]
    +** Processing line: ~            @colliders = [~
    +- Inside source: true
    +*** True Line Result
    +            @colliders = [
    +** Processing line: ~              LinearCollider.new(points[0],points[1], :neg),~
    +- Inside source: true
    +*** True Line Result
    +              LinearCollider.new(points[0],points[1], :neg),
    +** Processing line: ~              LinearCollider.new(points[1],points[2], :neg),~
    +- Inside source: true
    +*** True Line Result
    +              LinearCollider.new(points[1],points[2], :neg),
    +** Processing line: ~              LinearCollider.new(points[2],points[3], :pos),~
    +- Inside source: true
    +*** True Line Result
    +              LinearCollider.new(points[2],points[3], :pos),
    +** Processing line: ~              LinearCollider.new(points[3],points[4], :neg),~
    +- Inside source: true
    +*** True Line Result
    +              LinearCollider.new(points[3],points[4], :neg),
    +** Processing line: ~              LinearCollider.new(points[4],points[5], :pos),~
    +- Inside source: true
    +*** True Line Result
    +              LinearCollider.new(points[4],points[5], :pos),
    +** Processing line: ~              LinearCollider.new(points[5],points[6], :neg),~
    +- Inside source: true
    +*** True Line Result
    +              LinearCollider.new(points[5],points[6], :neg),
    +** Processing line: ~              LinearCollider.new(points[6],points[7], :pos),~
    +- Inside source: true
    +*** True Line Result
    +              LinearCollider.new(points[6],points[7], :pos),
    +** Processing line: ~              LinearCollider.new(points[0],points[7], :pos)~
    +- Inside source: true
    +*** True Line Result
    +              LinearCollider.new(points[0],points[7], :pos)
    +** Processing line: ~            ]~
    +- Inside source: true
    +*** True Line Result
    +            ]
    +** Processing line: ~        elsif @orientation == :left~
    +- Inside source: true
    +*** True Line Result
    +        elsif @orientation == :left
    +** Processing line: ~            #args.outputs.solids << [@x + x_offset + @block_size, @y, @block_size - @block_offset, @block_size * 3 - @block_offset, @r, @g, @b]~
    +- Inside source: true
    +*** True Line Result
    +            #args.outputs.solids << [@x + x_offset + @block_size, @y, @block_size - @block_offset, @block_size * 3 - @block_offset, @r, @g, @b]
    +** Processing line: ~            #args.outputs.solids << [@x + x_offset, @y + @block_size, @block_size * 2 - @block_offset, @block_size - @block_offset, @r, @g, @b]~
    +- Inside source: true
    +*** True Line Result
    +            #args.outputs.solids << [@x + x_offset, @y + @block_size, @block_size * 2 - @block_offset, @block_size - @block_offset, @r, @g, @b]
    +** Processing line: ~            xh = @x + x_offset~
    +- Inside source: true
    +*** True Line Result
    +            xh = @x + x_offset
    +** Processing line: ~            #points = [~
    +- Inside source: true
    +*** True Line Result
    +            #points = [
    +** Processing line: ~              #{x:@x + x_offset, y:@y},~
    +- Inside source: true
    +*** True Line Result
    +              #{x:@x + x_offset, y:@y},
    +** Processing line: ~              #{x:(@x + x_offset)+(@block_size - @block_offset), y:@y},~
    +- Inside source: true
    +*** True Line Result
    +              #{x:(@x + x_offset)+(@block_size - @block_offset), y:@y},
    +** Processing line: ~              #{x:(@x + x_offset)+(@block_size - @block_offset),y:@y + @block_size},~
    +- Inside source: true
    +*** True Line Result
    +              #{x:(@x + x_offset)+(@block_size - @block_offset),y:@y + @block_size},
    +** Processing line: ~              #{x:(@x + x_offset)+ @block_size * 2,y:@y + @block_size},~
    +- Inside source: true
    +*** True Line Result
    +              #{x:(@x + x_offset)+ @block_size * 2,y:@y + @block_size},
    +** Processing line: ~              #{x:(@x + x_offset)+ @block_size * 2,y:@y + @block_size+@block_size},~
    +- Inside source: true
    +*** True Line Result
    +              #{x:(@x + x_offset)+ @block_size * 2,y:@y + @block_size+@block_size},
    +** Processing line: ~              #{x:(@x + x_offset)+(@block_size - @block_offset),y:@y + @block_size+@block_size},~
    +- Inside source: true
    +*** True Line Result
    +              #{x:(@x + x_offset)+(@block_size - @block_offset),y:@y + @block_size+@block_size},
    +** Processing line: ~              #{x:(@x + x_offset)+(@block_size - @block_offset), y:@y+ @block_size * 3 - @block_offset},~
    +- Inside source: true
    +*** True Line Result
    +              #{x:(@x + x_offset)+(@block_size - @block_offset), y:@y+ @block_size * 3 - @block_offset},
    +** Processing line: ~              #{x:@x + x_offset , y:@y+ @block_size * 3 - @block_offset}~
    +- Inside source: true
    +*** True Line Result
    +              #{x:@x + x_offset , y:@y+ @block_size * 3 - @block_offset}
    +** Processing line: ~            #]~
    +- Inside source: true
    +*** True Line Result
    +            #]
    +** Processing line: ~            points = [~
    +- Inside source: true
    +*** True Line Result
    +            points = [
    +** Processing line: ~              {x:@x + x_offset + @block_size, y:@y},~
    +- Inside source: true
    +*** True Line Result
    +              {x:@x + x_offset + @block_size, y:@y},
    +** Processing line: ~              {x:@x + x_offset + @block_size + (@block_size - @block_offset), y:@y},~
    +- Inside source: true
    +*** True Line Result
    +              {x:@x + x_offset + @block_size + (@block_size - @block_offset), y:@y},
    +** Processing line: ~              {x:@x + x_offset + @block_size + (@block_size - @block_offset),y:@y+@block_size*3- @block_offset},~
    +- Inside source: true
    +*** True Line Result
    +              {x:@x + x_offset + @block_size + (@block_size - @block_offset),y:@y+@block_size*3- @block_offset},
    +** Processing line: ~              {x:@x + x_offset + @block_size, y:@y+@block_size*3- @block_offset},~
    +- Inside source: true
    +*** True Line Result
    +              {x:@x + x_offset + @block_size, y:@y+@block_size*3- @block_offset},
    +** Processing line: ~              {x:@x + x_offset+@block_size, y:@y+@block_size*2- @block_offset},~
    +- Inside source: true
    +*** True Line Result
    +              {x:@x + x_offset+@block_size, y:@y+@block_size*2- @block_offset},
    +** Processing line: ~              {x:@x + x_offset, y:@y+@block_size*2- @block_offset},~
    +- Inside source: true
    +*** True Line Result
    +              {x:@x + x_offset, y:@y+@block_size*2- @block_offset},
    +** Processing line: ~              {x:@x + x_offset, y:@y+@block_size},~
    +- Inside source: true
    +*** True Line Result
    +              {x:@x + x_offset, y:@y+@block_size},
    +** Processing line: ~              {x:@x + x_offset+@block_size, y:@y+@block_size}~
    +- Inside source: true
    +*** True Line Result
    +              {x:@x + x_offset+@block_size, y:@y+@block_size}
    +** Processing line: ~            ]~
    +- Inside source: true
    +*** True Line Result
    +            ]
    +** Processing line: ~            @squareColliders = [~
    +- Inside source: true
    +*** True Line Result
    +            @squareColliders = [
    +** Processing line: ~              SquareCollider.new(points[0].x,points[0].y,{x:-1,y:-1}),~
    +- Inside source: true
    +*** True Line Result
    +              SquareCollider.new(points[0].x,points[0].y,{x:-1,y:-1}),
    +** Processing line: ~              SquareCollider.new(points[1].x-COLLISIONWIDTH,points[1].y,{x:1,y:-1}),~
    +- Inside source: true
    +*** True Line Result
    +              SquareCollider.new(points[1].x-COLLISIONWIDTH,points[1].y,{x:1,y:-1}),
    +** Processing line: ~              SquareCollider.new(points[2].x-COLLISIONWIDTH,points[2].y-COLLISIONWIDTH,{x:1,y:1}),~
    +- Inside source: true
    +*** True Line Result
    +              SquareCollider.new(points[2].x-COLLISIONWIDTH,points[2].y-COLLISIONWIDTH,{x:1,y:1}),
    +** Processing line: ~              SquareCollider.new(points[3].x,points[3].y-COLLISIONWIDTH,{x:-1,y:1}),~
    +- Inside source: true
    +*** True Line Result
    +              SquareCollider.new(points[3].x,points[3].y-COLLISIONWIDTH,{x:-1,y:1}),
    +** Processing line: ~              SquareCollider.new(points[4].x-COLLISIONWIDTH,points[4].y,{x:-1,y:1}),~
    +- Inside source: true
    +*** True Line Result
    +              SquareCollider.new(points[4].x-COLLISIONWIDTH,points[4].y,{x:-1,y:1}),
    +** Processing line: ~              SquareCollider.new(points[5].x,points[5].y-COLLISIONWIDTH,{x:-1,y:1}),~
    +- Inside source: true
    +*** True Line Result
    +              SquareCollider.new(points[5].x,points[5].y-COLLISIONWIDTH,{x:-1,y:1}),
    +** Processing line: ~              SquareCollider.new(points[6].x,points[6].y,{x:-1,y:-1}),~
    +- Inside source: true
    +*** True Line Result
    +              SquareCollider.new(points[6].x,points[6].y,{x:-1,y:-1}),
    +** Processing line: ~              SquareCollider.new(points[7].x-COLLISIONWIDTH,points[7].y-COLLISIONWIDTH,{x:-1,y:-1}),~
    +- Inside source: true
    +*** True Line Result
    +              SquareCollider.new(points[7].x-COLLISIONWIDTH,points[7].y-COLLISIONWIDTH,{x:-1,y:-1}),
    +** Processing line: ~            ]~
    +- Inside source: true
    +*** True Line Result
    +            ]
    +** Processing line: ~            @colliders = [~
    +- Inside source: true
    +*** True Line Result
    +            @colliders = [
    +** Processing line: ~              LinearCollider.new(points[0],points[1], :neg),~
    +- Inside source: true
    +*** True Line Result
    +              LinearCollider.new(points[0],points[1], :neg),
    +** Processing line: ~              LinearCollider.new(points[1],points[2], :neg),~
    +- Inside source: true
    +*** True Line Result
    +              LinearCollider.new(points[1],points[2], :neg),
    +** Processing line: ~              LinearCollider.new(points[2],points[3], :pos),~
    +- Inside source: true
    +*** True Line Result
    +              LinearCollider.new(points[2],points[3], :pos),
    +** Processing line: ~              LinearCollider.new(points[3],points[4], :neg),~
    +- Inside source: true
    +*** True Line Result
    +              LinearCollider.new(points[3],points[4], :neg),
    +** Processing line: ~              LinearCollider.new(points[4],points[5], :pos),~
    +- Inside source: true
    +*** True Line Result
    +              LinearCollider.new(points[4],points[5], :pos),
    +** Processing line: ~              LinearCollider.new(points[5],points[6], :neg),~
    +- Inside source: true
    +*** True Line Result
    +              LinearCollider.new(points[5],points[6], :neg),
    +** Processing line: ~              LinearCollider.new(points[6],points[7], :neg),~
    +- Inside source: true
    +*** True Line Result
    +              LinearCollider.new(points[6],points[7], :neg),
    +** Processing line: ~              LinearCollider.new(points[0],points[7], :pos)~
    +- Inside source: true
    +*** True Line Result
    +              LinearCollider.new(points[0],points[7], :pos)
    +** Processing line: ~            ]~
    +- Inside source: true
    +*** True Line Result
    +            ]
    +** Processing line: ~        elsif @orientation == :down~
    +- Inside source: true
    +*** True Line Result
    +        elsif @orientation == :down
    +** Processing line: ~            #args.outputs.solids << [@x + x_offset, @y + @block_size, @block_size * 3 - @block_offset, @block_size - @block_offset, @r, @g, @b]~
    +- Inside source: true
    +*** True Line Result
    +            #args.outputs.solids << [@x + x_offset, @y + @block_size, @block_size * 3 - @block_offset, @block_size - @block_offset, @r, @g, @b]
    +** Processing line: ~            #args.outputs.solids << [@x + x_offset + @block_size, @y, @block_size - @block_offset, @block_size * 2 - @block_offset, @r, @g, @b]~
    +- Inside source: true
    +*** True Line Result
    +            #args.outputs.solids << [@x + x_offset + @block_size, @y, @block_size - @block_offset, @block_size * 2 - @block_offset, @r, @g, @b]
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~            points = [~
    +- Inside source: true
    +*** True Line Result
    +            points = [
    +** Processing line: ~              {x:@x + x_offset, y:@y+(@block_size*2)-@block_offset},~
    +- Inside source: true
    +*** True Line Result
    +              {x:@x + x_offset, y:@y+(@block_size*2)-@block_offset},
    +** Processing line: ~              {x:@x + x_offset+ @block_size*3-@block_offset, y:@y+(@block_size*2)-@block_offset},~
    +- Inside source: true
    +*** True Line Result
    +              {x:@x + x_offset+ @block_size*3-@block_offset, y:@y+(@block_size*2)-@block_offset},
    +** Processing line: ~              {x:@x + x_offset+ @block_size*3-@block_offset, y:@y+(@block_size)},~
    +- Inside source: true
    +*** True Line Result
    +              {x:@x + x_offset+ @block_size*3-@block_offset, y:@y+(@block_size)},
    +** Processing line: ~              {x:@x + x_offset+ @block_size*2-@block_offset, y:@y+(@block_size)},~
    +- Inside source: true
    +*** True Line Result
    +              {x:@x + x_offset+ @block_size*2-@block_offset, y:@y+(@block_size)},
    +** Processing line: ~              {x:@x + x_offset+ @block_size*2-@block_offset, y:@y},#~
    +- Inside source: true
    +*** True Line Result
    +              {x:@x + x_offset+ @block_size*2-@block_offset, y:@y},#
    +** Processing line: ~              {x:@x + x_offset+ @block_size, y:@y},#~
    +- Inside source: true
    +*** True Line Result
    +              {x:@x + x_offset+ @block_size, y:@y},#
    +** Processing line: ~              {x:@x + x_offset + @block_size, y:@y+(@block_size)},~
    +- Inside source: true
    +*** True Line Result
    +              {x:@x + x_offset + @block_size, y:@y+(@block_size)},
    +** Processing line: ~              {x:@x + x_offset, y:@y+(@block_size)}~
    +- Inside source: true
    +*** True Line Result
    +              {x:@x + x_offset, y:@y+(@block_size)}
    +** Processing line: ~            ]~
    +- Inside source: true
    +*** True Line Result
    +            ]
    +** Processing line: ~            @squareColliders = [~
    +- Inside source: true
    +*** True Line Result
    +            @squareColliders = [
    +** Processing line: ~              SquareCollider.new(points[0].x,points[0].y-COLLISIONWIDTH,{x:-1,y:1}),~
    +- Inside source: true
    +*** True Line Result
    +              SquareCollider.new(points[0].x,points[0].y-COLLISIONWIDTH,{x:-1,y:1}),
    +** Processing line: ~              SquareCollider.new(points[1].x-COLLISIONWIDTH,points[1].y-COLLISIONWIDTH,{x:1,y:1}),~
    +- Inside source: true
    +*** True Line Result
    +              SquareCollider.new(points[1].x-COLLISIONWIDTH,points[1].y-COLLISIONWIDTH,{x:1,y:1}),
    +** Processing line: ~              SquareCollider.new(points[2].x-COLLISIONWIDTH,points[2].y,{x:1,y:-1}),~
    +- Inside source: true
    +*** True Line Result
    +              SquareCollider.new(points[2].x-COLLISIONWIDTH,points[2].y,{x:1,y:-1}),
    +** Processing line: ~              SquareCollider.new(points[3].x,points[3].y-COLLISIONWIDTH,{x:1,y:-1}),~
    +- Inside source: true
    +*** True Line Result
    +              SquareCollider.new(points[3].x,points[3].y-COLLISIONWIDTH,{x:1,y:-1}),
    +** Processing line: ~              SquareCollider.new(points[4].x-COLLISIONWIDTH,points[4].y,{x:1,y:-1}),~
    +- Inside source: true
    +*** True Line Result
    +              SquareCollider.new(points[4].x-COLLISIONWIDTH,points[4].y,{x:1,y:-1}),
    +** Processing line: ~              SquareCollider.new(points[5].x,points[5].y,{x:-1,y:-1}),~
    +- Inside source: true
    +*** True Line Result
    +              SquareCollider.new(points[5].x,points[5].y,{x:-1,y:-1}),
    +** Processing line: ~              SquareCollider.new(points[6].x-COLLISIONWIDTH,points[6].y-COLLISIONWIDTH,{x:-1,y:-1}),~
    +- Inside source: true
    +*** True Line Result
    +              SquareCollider.new(points[6].x-COLLISIONWIDTH,points[6].y-COLLISIONWIDTH,{x:-1,y:-1}),
    +** Processing line: ~              SquareCollider.new(points[7].x,points[7].y,{x:-1,y:-1}),~
    +- Inside source: true
    +*** True Line Result
    +              SquareCollider.new(points[7].x,points[7].y,{x:-1,y:-1}),
    +** Processing line: ~            ]~
    +- Inside source: true
    +*** True Line Result
    +            ]
    +** Processing line: ~            @colliders = [~
    +- Inside source: true
    +*** True Line Result
    +            @colliders = [
    +** Processing line: ~              LinearCollider.new(points[0],points[1], :pos),~
    +- Inside source: true
    +*** True Line Result
    +              LinearCollider.new(points[0],points[1], :pos),
    +** Processing line: ~              LinearCollider.new(points[1],points[2], :pos),~
    +- Inside source: true
    +*** True Line Result
    +              LinearCollider.new(points[1],points[2], :pos),
    +** Processing line: ~              LinearCollider.new(points[2],points[3], :neg),~
    +- Inside source: true
    +*** True Line Result
    +              LinearCollider.new(points[2],points[3], :neg),
    +** Processing line: ~              LinearCollider.new(points[3],points[4], :pos),~
    +- Inside source: true
    +*** True Line Result
    +              LinearCollider.new(points[3],points[4], :pos),
    +** Processing line: ~              LinearCollider.new(points[4],points[5], :neg),~
    +- Inside source: true
    +*** True Line Result
    +              LinearCollider.new(points[4],points[5], :neg),
    +** Processing line: ~              LinearCollider.new(points[5],points[6], :pos),~
    +- Inside source: true
    +*** True Line Result
    +              LinearCollider.new(points[5],points[6], :pos),
    +** Processing line: ~              LinearCollider.new(points[6],points[7], :neg),~
    +- Inside source: true
    +*** True Line Result
    +              LinearCollider.new(points[6],points[7], :neg),
    +** Processing line: ~              LinearCollider.new(points[0],points[7], :neg)~
    +- Inside source: true
    +*** True Line Result
    +              LinearCollider.new(points[0],points[7], :neg)
    +** Processing line: ~            ]~
    +- Inside source: true
    +*** True Line Result
    +            ]
    +** Processing line: ~        end~
    +- Inside source: true
    +*** True Line Result
    +        end
    +** Processing line: ~        return points~
    +- Inside source: true
    +*** True Line Result
    +        return points
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      def draw(args)~
    +- Inside source: true
    +*** True Line Result
    +      def draw(args)
    +** Processing line: ~          #Offset the coordinates to the edge of the game area~
    +- Inside source: true
    +*** True Line Result
    +          #Offset the coordinates to the edge of the game area
    +** Processing line: ~          x_offset = (args.state.board_width + args.grid.w / 8) + (@block_offset / 2)~
    +- Inside source: true
    +*** True Line Result
    +          x_offset = (args.state.board_width + args.grid.w / 8) + (@block_offset / 2)
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~          if @orientation == :right~
    +- Inside source: true
    +*** True Line Result
    +          if @orientation == :right
    +** Processing line: ~              #args.outputs.solids << [@x + x_offset, @y, @block_size - @block_offset, @block_size * 3 - @block_offset, @r, @g, @b]~
    +- Inside source: true
    +*** True Line Result
    +              #args.outputs.solids << [@x + x_offset, @y, @block_size - @block_offset, @block_size * 3 - @block_offset, @r, @g, @b]
    +** Processing line: ~              args.outputs.solids << {x: (@x + x_offset), y: @y, w: @block_size - @block_offset, h: (@block_size * 3 - @block_offset), r: @r , g: @g, b: @b}~
    +- Inside source: true
    +*** True Line Result
    +              args.outputs.solids << {x: (@x + x_offset), y: @y, w: @block_size - @block_offset, h: (@block_size * 3 - @block_offset), r: @r , g: @g, b: @b}
    +** Processing line: ~              #args.outputs.solids << [@x + x_offset, @y + @block_size, @block_size * 2, @block_size, @r, @g, @b]~
    +- Inside source: true
    +*** True Line Result
    +              #args.outputs.solids << [@x + x_offset, @y + @block_size, @block_size * 2, @block_size, @r, @g, @b]
    +** Processing line: ~              args.outputs.solids << {x: (@x + x_offset), y: (@y + @block_size), w: (@block_size * 2), h: (@block_size), r: @r , g: @g, b: @b }~
    +- Inside source: true
    +*** True Line Result
    +              args.outputs.solids << {x: (@x + x_offset), y: (@y + @block_size), w: (@block_size * 2), h: (@block_size), r: @r , g: @g, b: @b }
    +** Processing line: ~          elsif @orientation == :up~
    +- Inside source: true
    +*** True Line Result
    +          elsif @orientation == :up
    +** Processing line: ~              #args.outputs.solids << [@x + x_offset, @y, @block_size * 3 - @block_offset, @block_size - @block_offset, @r, @g, @b]~
    +- Inside source: true
    +*** True Line Result
    +              #args.outputs.solids << [@x + x_offset, @y, @block_size * 3 - @block_offset, @block_size - @block_offset, @r, @g, @b]
    +** Processing line: ~              args.outputs.solids << {x: (@x + x_offset), y: (@y), w: (@block_size * 3 - @block_offset), h: (@block_size - @block_offset), r: @r , g: @g, b: @b}~
    +- Inside source: true
    +*** True Line Result
    +              args.outputs.solids << {x: (@x + x_offset), y: (@y), w: (@block_size * 3 - @block_offset), h: (@block_size - @block_offset), r: @r , g: @g, b: @b}
    +** Processing line: ~              #args.outputs.solids << [@x + x_offset + @block_size, @y, @block_size, @block_size * 2, @r, @g, @b]~
    +- Inside source: true
    +*** True Line Result
    +              #args.outputs.solids << [@x + x_offset + @block_size, @y, @block_size, @block_size * 2, @r, @g, @b]
    +** Processing line: ~              args.outputs.solids << {x: (@x + x_offset + @block_size), y: (@y), w: (@block_size), h: (@block_size * 2), r: @r , g: @g, b: @b}~
    +- Inside source: true
    +*** True Line Result
    +              args.outputs.solids << {x: (@x + x_offset + @block_size), y: (@y), w: (@block_size), h: (@block_size * 2), r: @r , g: @g, b: @b}
    +** Processing line: ~          elsif @orientation == :left~
    +- Inside source: true
    +*** True Line Result
    +          elsif @orientation == :left
    +** Processing line: ~              #args.outputs.solids << [@x + x_offset + @block_size, @y, @block_size - @block_offset, @block_size * 3 - @block_offset, @r, @g, @b]~
    +- Inside source: true
    +*** True Line Result
    +              #args.outputs.solids << [@x + x_offset + @block_size, @y, @block_size - @block_offset, @block_size * 3 - @block_offset, @r, @g, @b]
    +** Processing line: ~              args.outputs.solids << {x: (@x + x_offset + @block_size), y: (@y), w: (@block_size - @block_offset), h: (@block_size * 3 - @block_offset), r: @r , g: @g, b: @b}~
    +- Inside source: true
    +*** True Line Result
    +              args.outputs.solids << {x: (@x + x_offset + @block_size), y: (@y), w: (@block_size - @block_offset), h: (@block_size * 3 - @block_offset), r: @r , g: @g, b: @b}
    +** Processing line: ~              #args.outputs.solids << [@x + x_offset, @y + @block_size, @block_size * 2 - @block_offset, @block_size - @block_offset, @r, @g, @b]~
    +- Inside source: true
    +*** True Line Result
    +              #args.outputs.solids << [@x + x_offset, @y + @block_size, @block_size * 2 - @block_offset, @block_size - @block_offset, @r, @g, @b]
    +** Processing line: ~              args.outputs.solids << {x: (@x + x_offset), y: (@y + @block_size), w: (@block_size * 2 - @block_offset), h: (@block_size - @block_offset), r: @r , g: @g, b: @b}~
    +- Inside source: true
    +*** True Line Result
    +              args.outputs.solids << {x: (@x + x_offset), y: (@y + @block_size), w: (@block_size * 2 - @block_offset), h: (@block_size - @block_offset), r: @r , g: @g, b: @b}
    +** Processing line: ~          elsif @orientation == :down~
    +- Inside source: true
    +*** True Line Result
    +          elsif @orientation == :down
    +** Processing line: ~              #args.outputs.solids << [@x + x_offset, @y + @block_size, @block_size * 3 - @block_offset, @block_size - @block_offset, @r, @g, @b]~
    +- Inside source: true
    +*** True Line Result
    +              #args.outputs.solids << [@x + x_offset, @y + @block_size, @block_size * 3 - @block_offset, @block_size - @block_offset, @r, @g, @b]
    +** Processing line: ~              args.outputs.solids << {x: (@x + x_offset), y: (@y + @block_size), w: (@block_size * 3 - @block_offset), h: (@block_size - @block_offset), r: @r , g: @g, b: @b}~
    +- Inside source: true
    +*** True Line Result
    +              args.outputs.solids << {x: (@x + x_offset), y: (@y + @block_size), w: (@block_size * 3 - @block_offset), h: (@block_size - @block_offset), r: @r , g: @g, b: @b}
    +** Processing line: ~              #args.outputs.solids << [@x + x_offset + @block_size, @y, @block_size - @block_offset, @block_size * 2 - @block_offset, @r, @g, @b]~
    +- Inside source: true
    +*** True Line Result
    +              #args.outputs.solids << [@x + x_offset + @block_size, @y, @block_size - @block_offset, @block_size * 2 - @block_offset, @r, @g, @b]
    +** Processing line: ~              args.outputs.solids << {x: (@x + x_offset + @block_size), y: (@y), w: (@block_size - @block_offset), h: ( @block_size * 2 - @block_offset), r: @r , g: @g, b: @b}~
    +- Inside source: true
    +*** True Line Result
    +              args.outputs.solids << {x: (@x + x_offset + @block_size), y: (@y), w: (@block_size - @block_offset), h: ( @block_size * 2 - @block_offset), r: @r , g: @g, b: @b}
    +** Processing line: ~          end~
    +- Inside source: true
    +*** True Line Result
    +          end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~          #psize = 5.0~
    +- Inside source: true
    +*** True Line Result
    +          #psize = 5.0
    +** Processing line: ~          #for p in @shapePoints~
    +- Inside source: true
    +*** True Line Result
    +          #for p in @shapePoints
    +** Processing line: ~            #args.outputs.solids << [p.x-psize/2, p.y-psize/2, psize, psize, 0, 0, 0]~
    +- Inside source: true
    +*** True Line Result
    +            #args.outputs.solids << [p.x-psize/2, p.y-psize/2, psize, psize, 0, 0, 0]
    +** Processing line: ~          #end~
    +- Inside source: true
    +*** True Line Result
    +          #end
    +** Processing line: ~          args.outputs.labels << [@x + x_offset + (@block_size * 2 - @block_offset)/2, (@y) + (@block_size * 2 - @block_offset)/2, @count.to_s]~
    +- Inside source: true
    +*** True Line Result
    +          args.outputs.labels << [@x + x_offset + (@block_size * 2 - @block_offset)/2, (@y) + (@block_size * 2 - @block_offset)/2, @count.to_s]
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      def updateOne_old args~
    +- Inside source: true
    +*** True Line Result
    +      def updateOne_old args
    +** Processing line: ~        didHit = false~
    +- Inside source: true
    +*** True Line Result
    +        didHit = false
    +** Processing line: ~        hitter = nil~
    +- Inside source: true
    +*** True Line Result
    +        hitter = nil
    +** Processing line: ~        toCollide = nil~
    +- Inside source: true
    +*** True Line Result
    +        toCollide = nil
    +** Processing line: ~        for b in args.state.balls~
    +- Inside source: true
    +*** True Line Result
    +        for b in args.state.balls
    +** Processing line: ~          if [b.x, b.y, b.width, b.height].intersect_rect?(@bold)~
    +- Inside source: true
    +*** True Line Result
    +          if [b.x, b.y, b.width, b.height].intersect_rect?(@bold)
    +** Processing line: ~            didSquare = false~
    +- Inside source: true
    +*** True Line Result
    +            didSquare = false
    +** Processing line: ~            for s in @squareColliders~
    +- Inside source: true
    +*** True Line Result
    +            for s in @squareColliders
    +** Processing line: ~              if (s.collision?(args, b))~
    +- Inside source: true
    +*** True Line Result
    +              if (s.collision?(args, b))
    +** Processing line: ~                didSquare = true~
    +- Inside source: true
    +*** True Line Result
    +                didSquare = true
    +** Processing line: ~                didHit = true~
    +- Inside source: true
    +*** True Line Result
    +                didHit = true
    +** Processing line: ~                #s.collide(args, b)~
    +- Inside source: true
    +*** True Line Result
    +                #s.collide(args, b)
    +** Processing line: ~                toCollide = s~
    +- Inside source: true
    +*** True Line Result
    +                toCollide = s
    +** Processing line: ~                hitter = b~
    +- Inside source: true
    +*** True Line Result
    +                hitter = b
    +** Processing line: ~                break~
    +- Inside source: true
    +*** True Line Result
    +                break
    +** Processing line: ~              end~
    +- Inside source: true
    +*** True Line Result
    +              end
    +** Processing line: ~            end~
    +- Inside source: true
    +*** True Line Result
    +            end
    +** Processing line: ~            if (didSquare == false)~
    +- Inside source: true
    +*** True Line Result
    +            if (didSquare == false)
    +** Processing line: ~              for c in @colliders~
    +- Inside source: true
    +*** True Line Result
    +              for c in @colliders
    +** Processing line: ~                #puts args.state.ball.velocity~
    +- Inside source: true
    +*** True Line Result
    +                #puts args.state.ball.velocity
    +** Processing line: ~                if c.collision?(args, b.getPoints(args),b)~
    +- Inside source: true
    +*** True Line Result
    +                if c.collision?(args, b.getPoints(args),b)
    +** Processing line: ~                  #c.collide args, b~
    +- Inside source: true
    +*** True Line Result
    +                  #c.collide args, b
    +** Processing line: ~                  toCollide = c~
    +- Inside source: true
    +*** True Line Result
    +                  toCollide = c
    +** Processing line: ~                  didHit = true~
    +- Inside source: true
    +*** True Line Result
    +                  didHit = true
    +** Processing line: ~                  hitter = b~
    +- Inside source: true
    +*** True Line Result
    +                  hitter = b
    +** Processing line: ~                  break~
    +- Inside source: true
    +*** True Line Result
    +                  break
    +** Processing line: ~                end~
    +- Inside source: true
    +*** True Line Result
    +                end
    +** Processing line: ~              end~
    +- Inside source: true
    +*** True Line Result
    +              end
    +** Processing line: ~            end~
    +- Inside source: true
    +*** True Line Result
    +            end
    +** Processing line: ~          end~
    +- Inside source: true
    +*** True Line Result
    +          end
    +** Processing line: ~          if didHit~
    +- Inside source: true
    +*** True Line Result
    +          if didHit
    +** Processing line: ~            break~
    +- Inside source: true
    +*** True Line Result
    +            break
    +** Processing line: ~          end~
    +- Inside source: true
    +*** True Line Result
    +          end
    +** Processing line: ~        end~
    +- Inside source: true
    +*** True Line Result
    +        end
    +** Processing line: ~        if (didHit)~
    +- Inside source: true
    +*** True Line Result
    +        if (didHit)
    +** Processing line: ~          @count=0~
    +- Inside source: true
    +*** True Line Result
    +          @count=0
    +** Processing line: ~          hitter.makeLeader args~
    +- Inside source: true
    +*** True Line Result
    +          hitter.makeLeader args
    +** Processing line: ~          #toCollide.collide(args, hitter)~
    +- Inside source: true
    +*** True Line Result
    +          #toCollide.collide(args, hitter)
    +** Processing line: ~          args.state.tshapes.delete(self)~
    +- Inside source: true
    +*** True Line Result
    +          args.state.tshapes.delete(self)
    +** Processing line: ~          #puts "HIT!" + hitter.number~
    +- Inside source: true
    +*** True Line Result
    +          #puts "HIT!" + hitter.number
    +** Processing line: ~        end~
    +- Inside source: true
    +*** True Line Result
    +        end
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      def update_old args~
    +- Inside source: true
    +*** True Line Result
    +      def update_old args
    +** Processing line: ~        if (@count == 1)~
    +- Inside source: true
    +*** True Line Result
    +        if (@count == 1)
    +** Processing line: ~          updateOne args~
    +- Inside source: true
    +*** True Line Result
    +          updateOne args
    +** Processing line: ~          return~
    +- Inside source: true
    +*** True Line Result
    +          return
    +** Processing line: ~        end~
    +- Inside source: true
    +*** True Line Result
    +        end
    +** Processing line: ~        didHit = false~
    +- Inside source: true
    +*** True Line Result
    +        didHit = false
    +** Processing line: ~        hitter = nil~
    +- Inside source: true
    +*** True Line Result
    +        hitter = nil
    +** Processing line: ~        for b in args.state.ballParents~
    +- Inside source: true
    +*** True Line Result
    +        for b in args.state.ballParents
    +** Processing line: ~          if [b.x, b.y, b.width, b.height].intersect_rect?(@bold)~
    +- Inside source: true
    +*** True Line Result
    +          if [b.x, b.y, b.width, b.height].intersect_rect?(@bold)
    +** Processing line: ~            didSquare = false~
    +- Inside source: true
    +*** True Line Result
    +            didSquare = false
    +** Processing line: ~            for s in @squareColliders~
    +- Inside source: true
    +*** True Line Result
    +            for s in @squareColliders
    +** Processing line: ~              if (s.collision?(args, b))~
    +- Inside source: true
    +*** True Line Result
    +              if (s.collision?(args, b))
    +** Processing line: ~                didSquare = true~
    +- Inside source: true
    +*** True Line Result
    +                didSquare = true
    +** Processing line: ~                didHit=true~
    +- Inside source: true
    +*** True Line Result
    +                didHit=true
    +** Processing line: ~                s.collide(args, b)~
    +- Inside source: true
    +*** True Line Result
    +                s.collide(args, b)
    +** Processing line: ~                hitter = b~
    +- Inside source: true
    +*** True Line Result
    +                hitter = b
    +** Processing line: ~              end~
    +- Inside source: true
    +*** True Line Result
    +              end
    +** Processing line: ~            end~
    +- Inside source: true
    +*** True Line Result
    +            end
    +** Processing line: ~            if (didSquare == false)~
    +- Inside source: true
    +*** True Line Result
    +            if (didSquare == false)
    +** Processing line: ~              for c in @colliders~
    +- Inside source: true
    +*** True Line Result
    +              for c in @colliders
    +** Processing line: ~                #puts args.state.ball.velocity~
    +- Inside source: true
    +*** True Line Result
    +                #puts args.state.ball.velocity
    +** Processing line: ~                if c.collision?(args, b.getPoints(args), b)~
    +- Inside source: true
    +*** True Line Result
    +                if c.collision?(args, b.getPoints(args), b)
    +** Processing line: ~                  c.collide args, b~
    +- Inside source: true
    +*** True Line Result
    +                  c.collide args, b
    +** Processing line: ~                  didHit=true~
    +- Inside source: true
    +*** True Line Result
    +                  didHit=true
    +** Processing line: ~                  hitter = b~
    +- Inside source: true
    +*** True Line Result
    +                  hitter = b
    +** Processing line: ~                end~
    +- Inside source: true
    +*** True Line Result
    +                end
    +** Processing line: ~              end~
    +- Inside source: true
    +*** True Line Result
    +              end
    +** Processing line: ~            end~
    +- Inside source: true
    +*** True Line Result
    +            end
    +** Processing line: ~          end~
    +- Inside source: true
    +*** True Line Result
    +          end
    +** Processing line: ~        end~
    +- Inside source: true
    +*** True Line Result
    +        end
    +** Processing line: ~        if (didHit)~
    +- Inside source: true
    +*** True Line Result
    +        if (didHit)
    +** Processing line: ~          @count=@count-1~
    +- Inside source: true
    +*** True Line Result
    +          @count=@count-1
    +** Processing line: ~          @damageCount.append([(hitter.leastChain+1 - hitter.number)-1, args.state.tick_count])~
    +- Inside source: true
    +*** True Line Result
    +          @damageCount.append([(hitter.leastChain+1 - hitter.number)-1, args.state.tick_count])
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~          if (@count == 0)~
    +- Inside source: true
    +*** True Line Result
    +          if (@count == 0)
    +** Processing line: ~            args.state.tshapes.delete(self)~
    +- Inside source: true
    +*** True Line Result
    +            args.state.tshapes.delete(self)
    +** Processing line: ~            return~
    +- Inside source: true
    +*** True Line Result
    +            return
    +** Processing line: ~          end~
    +- Inside source: true
    +*** True Line Result
    +          end
    +** Processing line: ~        end~
    +- Inside source: true
    +*** True Line Result
    +        end
    +** Processing line: ~        i=0~
    +- Inside source: true
    +*** True Line Result
    +        i=0
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~        while i < @damageCount.length~
    +- Inside source: true
    +*** True Line Result
    +        while i < @damageCount.length
    +** Processing line: ~          if @damageCount[i][0] <= 0~
    +- Inside source: true
    +*** True Line Result
    +          if @damageCount[i][0] <= 0
    +** Processing line: ~            @damageCount.delete_at(i)~
    +- Inside source: true
    +*** True Line Result
    +            @damageCount.delete_at(i)
    +** Processing line: ~            i-=1~
    +- Inside source: true
    +*** True Line Result
    +            i-=1
    +** Processing line: ~          elsif @damageCount[i][1].elapsed_time > BALL_DISTANCE~
    +- Inside source: true
    +*** True Line Result
    +          elsif @damageCount[i][1].elapsed_time > BALL_DISTANCE
    +** Processing line: ~            @count-=1~
    +- Inside source: true
    +*** True Line Result
    +            @count-=1
    +** Processing line: ~            @damageCount[i][0]-=1~
    +- Inside source: true
    +*** True Line Result
    +            @damageCount[i][0]-=1
    +** Processing line: ~          end~
    +- Inside source: true
    +*** True Line Result
    +          end
    +** Processing line: ~          if (@count == 0)~
    +- Inside source: true
    +*** True Line Result
    +          if (@count == 0)
    +** Processing line: ~            args.state.tshapes.delete(self)~
    +- Inside source: true
    +*** True Line Result
    +            args.state.tshapes.delete(self)
    +** Processing line: ~            return~
    +- Inside source: true
    +*** True Line Result
    +            return
    +** Processing line: ~          end~
    +- Inside source: true
    +*** True Line Result
    +          end
    +** Processing line: ~          i+=1~
    +- Inside source: true
    +*** True Line Result
    +          i+=1
    +** Processing line: ~        end~
    +- Inside source: true
    +*** True Line Result
    +        end
    +** Processing line: ~      end #end update~
    +- Inside source: true
    +*** True Line Result
    +      end #end update
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      def update args~
    +- Inside source: true
    +*** True Line Result
    +      def update args
    +** Processing line: ~        universalUpdate args, self~
    +- Inside source: true
    +*** True Line Result
    +        universalUpdate args, self
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~  class Line~
    +- Inside source: true
    +*** True Line Result
    +  class Line
    +** Processing line: ~      attr_accessor :count, :x, :y, :home, :bold, :squareColliders, :colliders, :damageCount~
    +- Inside source: true
    +*** True Line Result
    +      attr_accessor :count, :x, :y, :home, :bold, :squareColliders, :colliders, :damageCount
    +** Processing line: ~      def initialize(args, x, y, block_size, orientation, block_offset)~
    +- Inside source: true
    +*** True Line Result
    +      def initialize(args, x, y, block_size, orientation, block_offset)
    +** Processing line: ~          @x = x * block_size~
    +- Inside source: true
    +*** True Line Result
    +          @x = x * block_size
    +** Processing line: ~          @y = y * block_size~
    +- Inside source: true
    +*** True Line Result
    +          @y = y * block_size
    +** Processing line: ~          @block_size = block_size~
    +- Inside source: true
    +*** True Line Result
    +          @block_size = block_size
    +** Processing line: ~          @block_offset = block_offset~
    +- Inside source: true
    +*** True Line Result
    +          @block_offset = block_offset
    +** Processing line: ~          @orientation = orientation~
    +- Inside source: true
    +*** True Line Result
    +          @orientation = orientation
    +** Processing line: ~          @damageCount = []~
    +- Inside source: true
    +*** True Line Result
    +          @damageCount = []
    +** Processing line: ~          @home = "lines"~
    +- Inside source: true
    +*** True Line Result
    +          @home = "lines"
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~          Kernel.srand()~
    +- Inside source: true
    +*** True Line Result
    +          Kernel.srand()
    +** Processing line: ~          @r = rand(255)~
    +- Inside source: true
    +*** True Line Result
    +          @r = rand(255)
    +** Processing line: ~          @g = rand(255)~
    +- Inside source: true
    +*** True Line Result
    +          @g = rand(255)
    +** Processing line: ~          @b = rand(255)~
    +- Inside source: true
    +*** True Line Result
    +          @b = rand(255)
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~          @count = rand(MAX_COUNT)+1~
    +- Inside source: true
    +*** True Line Result
    +          @count = rand(MAX_COUNT)+1
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~          @shapePoints = getShapePoints(args)~
    +- Inside source: true
    +*** True Line Result
    +          @shapePoints = getShapePoints(args)
    +** Processing line: ~          minX={x:INFINITY, y:0}~
    +- Inside source: true
    +*** True Line Result
    +          minX={x:INFINITY, y:0}
    +** Processing line: ~          minY={x:0, y:INFINITY}~
    +- Inside source: true
    +*** True Line Result
    +          minY={x:0, y:INFINITY}
    +** Processing line: ~          maxX={x:-INFINITY, y:0}~
    +- Inside source: true
    +*** True Line Result
    +          maxX={x:-INFINITY, y:0}
    +** Processing line: ~          maxY={x:0, y:-INFINITY}~
    +- Inside source: true
    +*** True Line Result
    +          maxY={x:0, y:-INFINITY}
    +** Processing line: ~          for p in @shapePoints~
    +- Inside source: true
    +*** True Line Result
    +          for p in @shapePoints
    +** Processing line: ~            if p.x < minX.x~
    +- Inside source: true
    +*** True Line Result
    +            if p.x < minX.x
    +** Processing line: ~              minX = p~
    +- Inside source: true
    +*** True Line Result
    +              minX = p
    +** Processing line: ~            end~
    +- Inside source: true
    +*** True Line Result
    +            end
    +** Processing line: ~            if p.x > maxX.x~
    +- Inside source: true
    +*** True Line Result
    +            if p.x > maxX.x
    +** Processing line: ~              maxX = p~
    +- Inside source: true
    +*** True Line Result
    +              maxX = p
    +** Processing line: ~            end~
    +- Inside source: true
    +*** True Line Result
    +            end
    +** Processing line: ~            if p.y < minY.y~
    +- Inside source: true
    +*** True Line Result
    +            if p.y < minY.y
    +** Processing line: ~              minY = p~
    +- Inside source: true
    +*** True Line Result
    +              minY = p
    +** Processing line: ~            end~
    +- Inside source: true
    +*** True Line Result
    +            end
    +** Processing line: ~            if p.y > maxY.y~
    +- Inside source: true
    +*** True Line Result
    +            if p.y > maxY.y
    +** Processing line: ~              maxY = p~
    +- Inside source: true
    +*** True Line Result
    +              maxY = p
    +** Processing line: ~            end~
    +- Inside source: true
    +*** True Line Result
    +            end
    +** Processing line: ~          end~
    +- Inside source: true
    +*** True Line Result
    +          end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~          hypotenuse=args.state.ball_hypotenuse~
    +- Inside source: true
    +*** True Line Result
    +          hypotenuse=args.state.ball_hypotenuse
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~          @bold = [(minX.x-hypotenuse/2)-1, (minY.y-hypotenuse/2)-1, -((minX.x-hypotenuse/2)-1)+(maxX.x + hypotenuse + 2), -((minY.y-hypotenuse/2)-1)+(maxY.y + hypotenuse + 2)]~
    +- Inside source: true
    +*** True Line Result
    +          @bold = [(minX.x-hypotenuse/2)-1, (minY.y-hypotenuse/2)-1, -((minX.x-hypotenuse/2)-1)+(maxX.x + hypotenuse + 2), -((minY.y-hypotenuse/2)-1)+(maxY.y + hypotenuse + 2)]
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      def getShapePoints(args)~
    +- Inside source: true
    +*** True Line Result
    +      def getShapePoints(args)
    +** Processing line: ~        points=[]~
    +- Inside source: true
    +*** True Line Result
    +        points=[]
    +** Processing line: ~        x_offset = (args.state.board_width + args.grid.w / 8) + (@block_offset / 2)~
    +- Inside source: true
    +*** True Line Result
    +        x_offset = (args.state.board_width + args.grid.w / 8) + (@block_offset / 2)
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~        if @orientation == :right~
    +- Inside source: true
    +*** True Line Result
    +        if @orientation == :right
    +** Processing line: ~          #args.outputs.solids << [@x + x_offset, @y, @block_size * 3 - @block_offset, @block_size - @block_offset, @r, @g, @b]~
    +- Inside source: true
    +*** True Line Result
    +          #args.outputs.solids << [@x + x_offset, @y, @block_size * 3 - @block_offset, @block_size - @block_offset, @r, @g, @b]
    +** Processing line: ~          xa =@x + x_offset~
    +- Inside source: true
    +*** True Line Result
    +          xa =@x + x_offset
    +** Processing line: ~          ya =@y~
    +- Inside source: true
    +*** True Line Result
    +          ya =@y
    +** Processing line: ~          wa =@block_size * 3 - @block_offset~
    +- Inside source: true
    +*** True Line Result
    +          wa =@block_size * 3 - @block_offset
    +** Processing line: ~          ha =(@block_size - @block_offset)~
    +- Inside source: true
    +*** True Line Result
    +          ha =(@block_size - @block_offset)
    +** Processing line: ~        elsif @orientation == :up~
    +- Inside source: true
    +*** True Line Result
    +        elsif @orientation == :up
    +** Processing line: ~          #args.outputs.solids << [@x + x_offset, @y, @block_size - @block_offset, @block_size * 3 - @block_offset, @r, @g, @b]~
    +- Inside source: true
    +*** True Line Result
    +          #args.outputs.solids << [@x + x_offset, @y, @block_size - @block_offset, @block_size * 3 - @block_offset, @r, @g, @b]
    +** Processing line: ~          xa =@x + x_offset~
    +- Inside source: true
    +*** True Line Result
    +          xa =@x + x_offset
    +** Processing line: ~          ya =@y~
    +- Inside source: true
    +*** True Line Result
    +          ya =@y
    +** Processing line: ~          wa =@block_size - @block_offset~
    +- Inside source: true
    +*** True Line Result
    +          wa =@block_size - @block_offset
    +** Processing line: ~          ha =@block_size * 3 - @block_offset~
    +- Inside source: true
    +*** True Line Result
    +          ha =@block_size * 3 - @block_offset
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~        elsif @orientation == :left~
    +- Inside source: true
    +*** True Line Result
    +        elsif @orientation == :left
    +** Processing line: ~          #args.outputs.solids << [@x + x_offset, @y, @block_size * 3 - @block_offset, @block_size - @block_offset, @r, @g, @b]~
    +- Inside source: true
    +*** True Line Result
    +          #args.outputs.solids << [@x + x_offset, @y, @block_size * 3 - @block_offset, @block_size - @block_offset, @r, @g, @b]
    +** Processing line: ~          xa =@x + x_offset~
    +- Inside source: true
    +*** True Line Result
    +          xa =@x + x_offset
    +** Processing line: ~          ya =@y~
    +- Inside source: true
    +*** True Line Result
    +          ya =@y
    +** Processing line: ~          wa =@block_size * 3 - @block_offset~
    +- Inside source: true
    +*** True Line Result
    +          wa =@block_size * 3 - @block_offset
    +** Processing line: ~          ha =@block_size - @block_offset~
    +- Inside source: true
    +*** True Line Result
    +          ha =@block_size - @block_offset
    +** Processing line: ~        elsif @orientation == :down~
    +- Inside source: true
    +*** True Line Result
    +        elsif @orientation == :down
    +** Processing line: ~          #args.outputs.solids << [@x + x_offset, @y, @block_size - @block_offset, @block_size * 3 - @block_offset, @r, @g, @b]~
    +- Inside source: true
    +*** True Line Result
    +          #args.outputs.solids << [@x + x_offset, @y, @block_size - @block_offset, @block_size * 3 - @block_offset, @r, @g, @b]
    +** Processing line: ~          xa =@x + x_offset~
    +- Inside source: true
    +*** True Line Result
    +          xa =@x + x_offset
    +** Processing line: ~          ya =@y~
    +- Inside source: true
    +*** True Line Result
    +          ya =@y
    +** Processing line: ~          wa =@block_size - @block_offset~
    +- Inside source: true
    +*** True Line Result
    +          wa =@block_size - @block_offset
    +** Processing line: ~          ha =@block_size * 3 - @block_offset~
    +- Inside source: true
    +*** True Line Result
    +          ha =@block_size * 3 - @block_offset
    +** Processing line: ~        end~
    +- Inside source: true
    +*** True Line Result
    +        end
    +** Processing line: ~        points = [~
    +- Inside source: true
    +*** True Line Result
    +        points = [
    +** Processing line: ~          {x: xa, y:ya},~
    +- Inside source: true
    +*** True Line Result
    +          {x: xa, y:ya},
    +** Processing line: ~          {x: xa + wa,y:ya},~
    +- Inside source: true
    +*** True Line Result
    +          {x: xa + wa,y:ya},
    +** Processing line: ~          {x: xa + wa,y:ya+ha},~
    +- Inside source: true
    +*** True Line Result
    +          {x: xa + wa,y:ya+ha},
    +** Processing line: ~          {x: xa, y:ya+ha},~
    +- Inside source: true
    +*** True Line Result
    +          {x: xa, y:ya+ha},
    +** Processing line: ~        ]~
    +- Inside source: true
    +*** True Line Result
    +        ]
    +** Processing line: ~        @squareColliders = [~
    +- Inside source: true
    +*** True Line Result
    +        @squareColliders = [
    +** Processing line: ~          SquareCollider.new(points[0].x,points[0].y,{x:-1,y:-1}),~
    +- Inside source: true
    +*** True Line Result
    +          SquareCollider.new(points[0].x,points[0].y,{x:-1,y:-1}),
    +** Processing line: ~          SquareCollider.new(points[1].x-COLLISIONWIDTH,points[1].y,{x:1,y:-1}),~
    +- Inside source: true
    +*** True Line Result
    +          SquareCollider.new(points[1].x-COLLISIONWIDTH,points[1].y,{x:1,y:-1}),
    +** Processing line: ~          SquareCollider.new(points[2].x-COLLISIONWIDTH,points[2].y-COLLISIONWIDTH,{x:1,y:1}),~
    +- Inside source: true
    +*** True Line Result
    +          SquareCollider.new(points[2].x-COLLISIONWIDTH,points[2].y-COLLISIONWIDTH,{x:1,y:1}),
    +** Processing line: ~          SquareCollider.new(points[3].x,points[3].y-COLLISIONWIDTH,{x:-1,y:1}),~
    +- Inside source: true
    +*** True Line Result
    +          SquareCollider.new(points[3].x,points[3].y-COLLISIONWIDTH,{x:-1,y:1}),
    +** Processing line: ~        ]~
    +- Inside source: true
    +*** True Line Result
    +        ]
    +** Processing line: ~        @colliders = [~
    +- Inside source: true
    +*** True Line Result
    +        @colliders = [
    +** Processing line: ~          LinearCollider.new(points[0],points[1], :neg),~
    +- Inside source: true
    +*** True Line Result
    +          LinearCollider.new(points[0],points[1], :neg),
    +** Processing line: ~          LinearCollider.new(points[1],points[2], :neg),~
    +- Inside source: true
    +*** True Line Result
    +          LinearCollider.new(points[1],points[2], :neg),
    +** Processing line: ~          LinearCollider.new(points[2],points[3], :pos),~
    +- Inside source: true
    +*** True Line Result
    +          LinearCollider.new(points[2],points[3], :pos),
    +** Processing line: ~          LinearCollider.new(points[0],points[3], :pos),~
    +- Inside source: true
    +*** True Line Result
    +          LinearCollider.new(points[0],points[3], :pos),
    +** Processing line: ~        ]~
    +- Inside source: true
    +*** True Line Result
    +        ]
    +** Processing line: ~        return points~
    +- Inside source: true
    +*** True Line Result
    +        return points
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      def update args~
    +- Inside source: true
    +*** True Line Result
    +      def update args
    +** Processing line: ~        universalUpdate args, self~
    +- Inside source: true
    +*** True Line Result
    +        universalUpdate args, self
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      def draw(args)~
    +- Inside source: true
    +*** True Line Result
    +      def draw(args)
    +** Processing line: ~          x_offset = (args.state.board_width + args.grid.w / 8) + @block_offset / 2~
    +- Inside source: true
    +*** True Line Result
    +          x_offset = (args.state.board_width + args.grid.w / 8) + @block_offset / 2
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~          if @orientation == :right~
    +- Inside source: true
    +*** True Line Result
    +          if @orientation == :right
    +** Processing line: ~              args.outputs.solids << [@x + x_offset, @y, @block_size * 3 - @block_offset, @block_size - @block_offset, @r, @g, @b]~
    +- Inside source: true
    +*** True Line Result
    +              args.outputs.solids << [@x + x_offset, @y, @block_size * 3 - @block_offset, @block_size - @block_offset, @r, @g, @b]
    +** Processing line: ~          elsif @orientation == :up~
    +- Inside source: true
    +*** True Line Result
    +          elsif @orientation == :up
    +** Processing line: ~              args.outputs.solids << [@x + x_offset, @y, @block_size - @block_offset, @block_size * 3 - @block_offset, @r, @g, @b]~
    +- Inside source: true
    +*** True Line Result
    +              args.outputs.solids << [@x + x_offset, @y, @block_size - @block_offset, @block_size * 3 - @block_offset, @r, @g, @b]
    +** Processing line: ~          elsif @orientation == :left~
    +- Inside source: true
    +*** True Line Result
    +          elsif @orientation == :left
    +** Processing line: ~              args.outputs.solids << [@x + x_offset, @y, @block_size * 3 - @block_offset, @block_size - @block_offset, @r, @g, @b]~
    +- Inside source: true
    +*** True Line Result
    +              args.outputs.solids << [@x + x_offset, @y, @block_size * 3 - @block_offset, @block_size - @block_offset, @r, @g, @b]
    +** Processing line: ~          elsif @orientation == :down~
    +- Inside source: true
    +*** True Line Result
    +          elsif @orientation == :down
    +** Processing line: ~              args.outputs.solids << [@x + x_offset, @y, @block_size - @block_offset, @block_size * 3 - @block_offset, @r, @g, @b]~
    +- Inside source: true
    +*** True Line Result
    +              args.outputs.solids << [@x + x_offset, @y, @block_size - @block_offset, @block_size * 3 - @block_offset, @r, @g, @b]
    +** Processing line: ~          end~
    +- Inside source: true
    +*** True Line Result
    +          end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~          args.outputs.labels << [@x + x_offset + (@block_size * 2 - @block_offset)/2, (@y) + (@block_size * 2 - @block_offset)/2, @count.to_s]~
    +- Inside source: true
    +*** True Line Result
    +          args.outputs.labels << [@x + x_offset + (@block_size * 2 - @block_offset)/2, (@y) + (@block_size * 2 - @block_offset)/2, @count.to_s]
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
    +*** True Line Result
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +
    +** Processing line: ~*** Physics And Collisions - Arbitrary Collision - linear_collider.rb~
    +- Header detected.
    +*** True Line Result
    +
    +*** True Line Result
    +*** Physics And Collisions - Arbitrary Collision - linear_collider.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/04_physics_and_collisions/09_arbitrary_collision/app/linear_collider.rb~
    +- Inside source: true
    +*** True Line Result
    +  # ./samples/04_physics_and_collisions/09_arbitrary_collision/app/linear_collider.rb
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~  COLLISIONWIDTH=8~
    +- Inside source: true
    +*** True Line Result
    +  COLLISIONWIDTH=8
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~  class LinearCollider~
    +- Inside source: true
    +*** True Line Result
    +  class LinearCollider
    +** Processing line: ~    attr_reader :pointA, :pointB~
    +- Inside source: true
    +*** True Line Result
    +    attr_reader :pointA, :pointB
    +** Processing line: ~    def initialize (pointA, pointB, mode,collisionWidth=COLLISIONWIDTH)~
    +- Inside source: true
    +*** True Line Result
    +    def initialize (pointA, pointB, mode,collisionWidth=COLLISIONWIDTH)
    +** Processing line: ~      @pointA = pointA~
    +- Inside source: true
    +*** True Line Result
    +      @pointA = pointA
    +** Processing line: ~      @pointB = pointB~
    +- Inside source: true
    +*** True Line Result
    +      @pointB = pointB
    +** Processing line: ~      @mode = mode~
    +- Inside source: true
    +*** True Line Result
    +      @mode = mode
    +** Processing line: ~      @collisionWidth = collisionWidth~
    +- Inside source: true
    +*** True Line Result
    +      @collisionWidth = collisionWidth
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      if (@pointA.x > @pointB.x)~
    +- Inside source: true
    +*** True Line Result
    +      if (@pointA.x > @pointB.x)
    +** Processing line: ~        @pointA, @pointB = @pointB, @pointA~
    +- Inside source: true
    +*** True Line Result
    +        @pointA, @pointB = @pointB, @pointA
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      @linearCollider_collision_once = false~
    +- Inside source: true
    +*** True Line Result
    +      @linearCollider_collision_once = false
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    def collisionSlope args~
    +- Inside source: true
    +*** True Line Result
    +    def collisionSlope args
    +** Processing line: ~      if (@pointB.x-@pointA.x == 0)~
    +- Inside source: true
    +*** True Line Result
    +      if (@pointB.x-@pointA.x == 0)
    +** Processing line: ~        return INFINITY~
    +- Inside source: true
    +*** True Line Result
    +        return INFINITY
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~      return (@pointB.y - @pointA.y) / (@pointB.x - @pointA.x)~
    +- Inside source: true
    +*** True Line Result
    +      return (@pointB.y - @pointA.y) / (@pointB.x - @pointA.x)
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    def collision? (args, points, ball=nil)~
    +- Inside source: true
    +*** True Line Result
    +    def collision? (args, points, ball=nil)
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      slope = collisionSlope args~
    +- Inside source: true
    +*** True Line Result
    +      slope = collisionSlope args
    +** Processing line: ~      result = false~
    +- Inside source: true
    +*** True Line Result
    +      result = false
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      # calculate a vector with a magnitude of (1/2)collisionWidth and a direction perpendicular to the collision line~
    +- Inside source: true
    +*** True Line Result
    +      # calculate a vector with a magnitude of (1/2)collisionWidth and a direction perpendicular to the collision line
    +** Processing line: ~      vect=nil;mag=nil;vect=nil;~
    +- Inside source: true
    +*** True Line Result
    +      vect=nil;mag=nil;vect=nil;
    +** Processing line: ~      if @mode == :both~
    +- Inside source: true
    +*** True Line Result
    +      if @mode == :both
    +** Processing line: ~        vect = {x: @pointB.x - @pointA.x, y:@pointB.y - @pointA.y}~
    +- Inside source: true
    +*** True Line Result
    +        vect = {x: @pointB.x - @pointA.x, y:@pointB.y - @pointA.y}
    +** Processing line: ~        mag  = (vect.x**2 + vect.y**2)**0.5~
    +- Inside source: true
    +*** True Line Result
    +        mag  = (vect.x**2 + vect.y**2)**0.5
    +** Processing line: ~        vect = {y: -1*(vect.x/(mag))*@collisionWidth*0.5, x: (vect.y/(mag))*@collisionWidth*0.5}~
    +- Inside source: true
    +*** True Line Result
    +        vect = {y: -1*(vect.x/(mag))*@collisionWidth*0.5, x: (vect.y/(mag))*@collisionWidth*0.5}
    +** Processing line: ~      else~
    +- Inside source: true
    +*** True Line Result
    +      else
    +** Processing line: ~        vect = {x: @pointB.x - @pointA.x, y:@pointB.y - @pointA.y}~
    +- Inside source: true
    +*** True Line Result
    +        vect = {x: @pointB.x - @pointA.x, y:@pointB.y - @pointA.y}
    +** Processing line: ~        mag  = (vect.x**2 + vect.y**2)**0.5~
    +- Inside source: true
    +*** True Line Result
    +        mag  = (vect.x**2 + vect.y**2)**0.5
    +** Processing line: ~        vect = {y: -1*(vect.x/(mag))*@collisionWidth, x: (vect.y/(mag))*@collisionWidth}~
    +- Inside source: true
    +*** True Line Result
    +        vect = {y: -1*(vect.x/(mag))*@collisionWidth, x: (vect.y/(mag))*@collisionWidth}
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      rpointA=nil;rpointB=nil;rpointC=nil;rpointD=nil;~
    +- Inside source: true
    +*** True Line Result
    +      rpointA=nil;rpointB=nil;rpointC=nil;rpointD=nil;
    +** Processing line: ~      if @mode == :pos~
    +- Inside source: true
    +*** True Line Result
    +      if @mode == :pos
    +** Processing line: ~        rpointA = {x:@pointA.x + vect.x, y:@pointA.y + vect.y}~
    +- Inside source: true
    +*** True Line Result
    +        rpointA = {x:@pointA.x + vect.x, y:@pointA.y + vect.y}
    +** Processing line: ~        rpointB = {x:@pointB.x + vect.x, y:@pointB.y + vect.y}~
    +- Inside source: true
    +*** True Line Result
    +        rpointB = {x:@pointB.x + vect.x, y:@pointB.y + vect.y}
    +** Processing line: ~        rpointC = {x:@pointB.x, y:@pointB.y}~
    +- Inside source: true
    +*** True Line Result
    +        rpointC = {x:@pointB.x, y:@pointB.y}
    +** Processing line: ~        rpointD = {x:@pointA.x, y:@pointA.y}~
    +- Inside source: true
    +*** True Line Result
    +        rpointD = {x:@pointA.x, y:@pointA.y}
    +** Processing line: ~      elsif @mode == :neg~
    +- Inside source: true
    +*** True Line Result
    +      elsif @mode == :neg
    +** Processing line: ~        rpointA = {x:@pointA.x, y:@pointA.y}~
    +- Inside source: true
    +*** True Line Result
    +        rpointA = {x:@pointA.x, y:@pointA.y}
    +** Processing line: ~        rpointB = {x:@pointB.x, y:@pointB.y}~
    +- Inside source: true
    +*** True Line Result
    +        rpointB = {x:@pointB.x, y:@pointB.y}
    +** Processing line: ~        rpointC = {x:@pointB.x - vect.x, y:@pointB.y - vect.y}~
    +- Inside source: true
    +*** True Line Result
    +        rpointC = {x:@pointB.x - vect.x, y:@pointB.y - vect.y}
    +** Processing line: ~        rpointD = {x:@pointA.x - vect.x, y:@pointA.y - vect.y}~
    +- Inside source: true
    +*** True Line Result
    +        rpointD = {x:@pointA.x - vect.x, y:@pointA.y - vect.y}
    +** Processing line: ~      elsif @mode == :both~
    +- Inside source: true
    +*** True Line Result
    +      elsif @mode == :both
    +** Processing line: ~        rpointA = {x:@pointA.x + vect.x, y:@pointA.y + vect.y}~
    +- Inside source: true
    +*** True Line Result
    +        rpointA = {x:@pointA.x + vect.x, y:@pointA.y + vect.y}
    +** Processing line: ~        rpointB = {x:@pointB.x + vect.x, y:@pointB.y + vect.y}~
    +- Inside source: true
    +*** True Line Result
    +        rpointB = {x:@pointB.x + vect.x, y:@pointB.y + vect.y}
    +** Processing line: ~        rpointC = {x:@pointB.x - vect.x, y:@pointB.y - vect.y}~
    +- Inside source: true
    +*** True Line Result
    +        rpointC = {x:@pointB.x - vect.x, y:@pointB.y - vect.y}
    +** Processing line: ~        rpointD = {x:@pointA.x - vect.x, y:@pointA.y - vect.y}~
    +- Inside source: true
    +*** True Line Result
    +        rpointD = {x:@pointA.x - vect.x, y:@pointA.y - vect.y}
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~      #four point rectangle~
    +- Inside source: true
    +*** True Line Result
    +      #four point rectangle
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      if ball != nil~
    +- Inside source: true
    +*** True Line Result
    +      if ball != nil
    +** Processing line: ~        xs = [rpointA.x,rpointB.x,rpointC.x,rpointD.x]~
    +- Inside source: true
    +*** True Line Result
    +        xs = [rpointA.x,rpointB.x,rpointC.x,rpointD.x]
    +** Processing line: ~        ys = [rpointA.y,rpointB.y,rpointC.y,rpointD.y]~
    +- Inside source: true
    +*** True Line Result
    +        ys = [rpointA.y,rpointB.y,rpointC.y,rpointD.y]
    +** Processing line: ~        correct = 1~
    +- Inside source: true
    +*** True Line Result
    +        correct = 1
    +** Processing line: ~        rect1 = [ball.x, ball.y, ball.width, ball.height]~
    +- Inside source: true
    +*** True Line Result
    +        rect1 = [ball.x, ball.y, ball.width, ball.height]
    +** Processing line: ~        #$r1 = rect1~
    +- Inside source: true
    +*** True Line Result
    +        #$r1 = rect1
    +** Processing line: ~        rect2 = [xs.min-correct,ys.min-correct,(xs.max-xs.min)+correct*2,(ys.max-ys.min)+correct*2]~
    +- Inside source: true
    +*** True Line Result
    +        rect2 = [xs.min-correct,ys.min-correct,(xs.max-xs.min)+correct*2,(ys.max-ys.min)+correct*2]
    +** Processing line: ~        #$r2 = rect2~
    +- Inside source: true
    +*** True Line Result
    +        #$r2 = rect2
    +** Processing line: ~        if rect1.intersect_rect?(rect2) == false~
    +- Inside source: true
    +*** True Line Result
    +        if rect1.intersect_rect?(rect2) == false
    +** Processing line: ~          return false~
    +- Inside source: true
    +*** True Line Result
    +          return false
    +** Processing line: ~        end~
    +- Inside source: true
    +*** True Line Result
    +        end
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      #area of a triangle~
    +- Inside source: true
    +*** True Line Result
    +      #area of a triangle
    +** Processing line: ~      triArea = -> (a,b,c) { ((a.x * (b.y - c.y) + b.x * (c.y - a.y) + c.x * (a.y - b.y))/2.0).abs }~
    +- Inside source: true
    +*** True Line Result
    +      triArea = -> (a,b,c) { ((a.x * (b.y - c.y) + b.x * (c.y - a.y) + c.x * (a.y - b.y))/2.0).abs }
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      #if at least on point is in the rectangle then collision? is true - otherwise false~
    +- Inside source: true
    +*** True Line Result
    +      #if at least on point is in the rectangle then collision? is true - otherwise false
    +** Processing line: ~      for point in points~
    +- Inside source: true
    +*** True Line Result
    +      for point in points
    +** Processing line: ~        #Check whether a given point lies inside a rectangle or not:~
    +- Inside source: true
    +*** True Line Result
    +        #Check whether a given point lies inside a rectangle or not:
    +** Processing line: ~        #if the sum of the area of traingls, PAB, PBC, PCD, PAD equal the area of the rec, then an intersection has occured~
    +- Inside source: true
    +*** True Line Result
    +        #if the sum of the area of traingls, PAB, PBC, PCD, PAD equal the area of the rec, then an intersection has occured
    +** Processing line: ~        areaRec =  triArea.call(rpointA, rpointB, rpointC)+triArea.call(rpointA, rpointC, rpointD)~
    +- Inside source: true
    +*** True Line Result
    +        areaRec =  triArea.call(rpointA, rpointB, rpointC)+triArea.call(rpointA, rpointC, rpointD)
    +** Processing line: ~        areaSum = [~
    +- Inside source: true
    +*** True Line Result
    +        areaSum = [
    +** Processing line: ~          triArea.call(point, rpointA, rpointB),triArea.call(point, rpointB, rpointC),~
    +- Inside source: true
    +*** True Line Result
    +          triArea.call(point, rpointA, rpointB),triArea.call(point, rpointB, rpointC),
    +** Processing line: ~          triArea.call(point, rpointC, rpointD),triArea.call(point, rpointA, rpointD)~
    +- Inside source: true
    +*** True Line Result
    +          triArea.call(point, rpointC, rpointD),triArea.call(point, rpointA, rpointD)
    +** Processing line: ~        ].inject(0){|sum,x| sum + x }~
    +- Inside source: true
    +*** True Line Result
    +        ].inject(0){|sum,x| sum + x }
    +** Processing line: ~        e = 0.0001 #allow for minor error~
    +- Inside source: true
    +*** True Line Result
    +        e = 0.0001 #allow for minor error
    +** Processing line: ~        if areaRec>= areaSum-e and areaRec<= areaSum+e~
    +- Inside source: true
    +*** True Line Result
    +        if areaRec>= areaSum-e and areaRec<= areaSum+e
    +** Processing line: ~          result = true~
    +- Inside source: true
    +*** True Line Result
    +          result = true
    +** Processing line: ~          #return true~
    +- Inside source: true
    +*** True Line Result
    +          #return true
    +** Processing line: ~          break~
    +- Inside source: true
    +*** True Line Result
    +          break
    +** Processing line: ~        end~
    +- Inside source: true
    +*** True Line Result
    +        end
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      #args.outputs.lines << [@pointA.x, @pointA.y, @pointB.x, @pointB.y,     000, 000, 000]~
    +- Inside source: true
    +*** True Line Result
    +      #args.outputs.lines << [@pointA.x, @pointA.y, @pointB.x, @pointB.y,     000, 000, 000]
    +** Processing line: ~      #args.outputs.lines << [rpointA.x, rpointA.y, rpointB.x, rpointB.y,     255, 000, 000]~
    +- Inside source: true
    +*** True Line Result
    +      #args.outputs.lines << [rpointA.x, rpointA.y, rpointB.x, rpointB.y,     255, 000, 000]
    +** Processing line: ~      #args.outputs.lines << [rpointC.x, rpointC.y, rpointD.x, rpointD.y,     000, 000, 255]~
    +- Inside source: true
    +*** True Line Result
    +      #args.outputs.lines << [rpointC.x, rpointC.y, rpointD.x, rpointD.y,     000, 000, 255]
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      #puts (rpointA.x.to_s + " " +  rpointA.y.to_s + " " + rpointB.x.to_s + " "+ rpointB.y.to_s)~
    +- Inside source: true
    +*** True Line Result
    +      #puts (rpointA.x.to_s + " " +  rpointA.y.to_s + " " + rpointB.x.to_s + " "+ rpointB.y.to_s)
    +** Processing line: ~      return result~
    +- Inside source: true
    +*** True Line Result
    +      return result
    +** Processing line: ~    end #end collision?~
    +- Inside source: true
    +*** True Line Result
    +    end #end collision?
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    def getRepelMagnitude (fbx, fby, vrx, vry, ballMag)~
    +- Inside source: true
    +*** True Line Result
    +    def getRepelMagnitude (fbx, fby, vrx, vry, ballMag)
    +** Processing line: ~      a = fbx ; b = vrx ; c = fby~
    +- Inside source: true
    +*** True Line Result
    +      a = fbx ; b = vrx ; c = fby
    +** Processing line: ~      d = vry ; e = ballMag~
    +- Inside source: true
    +*** True Line Result
    +      d = vry ; e = ballMag
    +** Processing line: ~      if b**2 + d**2 == 0~
    +- Inside source: true
    +*** True Line Result
    +      if b**2 + d**2 == 0
    +** Processing line: ~        #unexpected~
    +- Inside source: true
    +*** True Line Result
    +        #unexpected
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~      x1 = (-a*b+-c*d + (e**2 * b**2 - b**2 * c**2 + 2*a*b*c*d + e**2 + d**2 - a**2 * d**2)**0.5)/(b**2 + d**2)~
    +- Inside source: true
    +*** True Line Result
    +      x1 = (-a*b+-c*d + (e**2 * b**2 - b**2 * c**2 + 2*a*b*c*d + e**2 + d**2 - a**2 * d**2)**0.5)/(b**2 + d**2)
    +** Processing line: ~      x2 = -((a*b + c*d + (e**2 * b**2 - b**2 * c**2 + 2*a*b*c*d + e**2 * d**2 - a**2 * d**2)**0.5)/(b**2 + d**2))~
    +- Inside source: true
    +*** True Line Result
    +      x2 = -((a*b + c*d + (e**2 * b**2 - b**2 * c**2 + 2*a*b*c*d + e**2 * d**2 - a**2 * d**2)**0.5)/(b**2 + d**2))
    +** Processing line: ~      err = 0.00001~
    +- Inside source: true
    +*** True Line Result
    +      err = 0.00001
    +** Processing line: ~      o = ((fbx + x1*vrx)**2 + (fby + x1*vry)**2 ) ** 0.5~
    +- Inside source: true
    +*** True Line Result
    +      o = ((fbx + x1*vrx)**2 + (fby + x1*vry)**2 ) ** 0.5
    +** Processing line: ~      p = ((fbx + x2*vrx)**2 + (fby + x2*vry)**2 ) ** 0.5~
    +- Inside source: true
    +*** True Line Result
    +      p = ((fbx + x2*vrx)**2 + (fby + x2*vry)**2 ) ** 0.5
    +** Processing line: ~      r = 0~
    +- Inside source: true
    +*** True Line Result
    +      r = 0
    +** Processing line: ~      if (ballMag >= o-err and ballMag <= o+err)~
    +- Inside source: true
    +*** True Line Result
    +      if (ballMag >= o-err and ballMag <= o+err)
    +** Processing line: ~        r = x1~
    +- Inside source: true
    +*** True Line Result
    +        r = x1
    +** Processing line: ~      elsif (ballMag >= p-err and ballMag <= p+err)~
    +- Inside source: true
    +*** True Line Result
    +      elsif (ballMag >= p-err and ballMag <= p+err)
    +** Processing line: ~        r = x2~
    +- Inside source: true
    +*** True Line Result
    +        r = x2
    +** Processing line: ~      else~
    +- Inside source: true
    +*** True Line Result
    +      else
    +** Processing line: ~        #unexpected~
    +- Inside source: true
    +*** True Line Result
    +        #unexpected
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~      return r~
    +- Inside source: true
    +*** True Line Result
    +      return r
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    def collide args, ball~
    +- Inside source: true
    +*** True Line Result
    +    def collide args, ball
    +** Processing line: ~      slope = collisionSlope args~
    +- Inside source: true
    +*** True Line Result
    +      slope = collisionSlope args
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      # perpVect: normal vector perpendicular to collision~
    +- Inside source: true
    +*** True Line Result
    +      # perpVect: normal vector perpendicular to collision
    +** Processing line: ~      perpVect = {x: @pointB.x - @pointA.x, y:@pointB.y - @pointA.y}~
    +- Inside source: true
    +*** True Line Result
    +      perpVect = {x: @pointB.x - @pointA.x, y:@pointB.y - @pointA.y}
    +** Processing line: ~      mag  = (perpVect.x**2 + perpVect.y**2)**0.5~
    +- Inside source: true
    +*** True Line Result
    +      mag  = (perpVect.x**2 + perpVect.y**2)**0.5
    +** Processing line: ~      perpVect = {x: perpVect.x/(mag), y: perpVect.y/(mag)}~
    +- Inside source: true
    +*** True Line Result
    +      perpVect = {x: perpVect.x/(mag), y: perpVect.y/(mag)}
    +** Processing line: ~      perpVect = {x: -perpVect.y, y: perpVect.x}~
    +- Inside source: true
    +*** True Line Result
    +      perpVect = {x: -perpVect.y, y: perpVect.x}
    +** Processing line: ~      if perpVect.y > 0 #ensure perpVect points upward~
    +- Inside source: true
    +*** True Line Result
    +      if perpVect.y > 0 #ensure perpVect points upward
    +** Processing line: ~        perpVect = {x: perpVect.x*-1, y: perpVect.y*-1}~
    +- Inside source: true
    +*** True Line Result
    +        perpVect = {x: perpVect.x*-1, y: perpVect.y*-1}
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~      previousPosition = {~
    +- Inside source: true
    +*** True Line Result
    +      previousPosition = {
    +** Processing line: ~        x:ball.x-ball.velocity.x,~
    +- Inside source: true
    +*** True Line Result
    +        x:ball.x-ball.velocity.x,
    +** Processing line: ~        y:ball.y-ball.velocity.y~
    +- Inside source: true
    +*** True Line Result
    +        y:ball.y-ball.velocity.y
    +** Processing line: ~      }~
    +- Inside source: true
    +*** True Line Result
    +      }
    +** Processing line: ~      yInterc = @pointA.y + -slope*@pointA.x~
    +- Inside source: true
    +*** True Line Result
    +      yInterc = @pointA.y + -slope*@pointA.x
    +** Processing line: ~      if slope == INFINITY~
    +- Inside source: true
    +*** True Line Result
    +      if slope == INFINITY
    +** Processing line: ~        if previousPosition.x < @pointA.x~
    +- Inside source: true
    +*** True Line Result
    +        if previousPosition.x < @pointA.x
    +** Processing line: ~          perpVect = {x: perpVect.x*-1, y: perpVect.y*-1}~
    +- Inside source: true
    +*** True Line Result
    +          perpVect = {x: perpVect.x*-1, y: perpVect.y*-1}
    +** Processing line: ~          yInterc = -INFINITY~
    +- Inside source: true
    +*** True Line Result
    +          yInterc = -INFINITY
    +** Processing line: ~        end~
    +- Inside source: true
    +*** True Line Result
    +        end
    +** Processing line: ~      elsif previousPosition.y < slope*previousPosition.x + yInterc #check if ball is bellow or above the collider to determine if perpVect is - or +~
    +- Inside source: true
    +*** True Line Result
    +      elsif previousPosition.y < slope*previousPosition.x + yInterc #check if ball is bellow or above the collider to determine if perpVect is - or +
    +** Processing line: ~        perpVect = {x: perpVect.x*-1, y: perpVect.y*-1}~
    +- Inside source: true
    +*** True Line Result
    +        perpVect = {x: perpVect.x*-1, y: perpVect.y*-1}
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      velocityMag = (ball.velocity.x**2 + ball.velocity.y**2)**0.5~
    +- Inside source: true
    +*** True Line Result
    +      velocityMag = (ball.velocity.x**2 + ball.velocity.y**2)**0.5
    +** Processing line: ~      theta_ball=Math.atan2(ball.velocity.y,ball.velocity.x) #the angle of the ball's velocity~
    +- Inside source: true
    +*** True Line Result
    +      theta_ball=Math.atan2(ball.velocity.y,ball.velocity.x) #the angle of the ball's velocity
    +** Processing line: ~      theta_repel=Math.atan2(perpVect.y,perpVect.x) #the angle of the repelling force(perpVect)~
    +- Inside source: true
    +*** True Line Result
    +      theta_repel=Math.atan2(perpVect.y,perpVect.x) #the angle of the repelling force(perpVect)
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      fbx = velocityMag * Math.cos(theta_ball) #the x component of the ball's velocity~
    +- Inside source: true
    +*** True Line Result
    +      fbx = velocityMag * Math.cos(theta_ball) #the x component of the ball's velocity
    +** Processing line: ~      fby = velocityMag * Math.sin(theta_ball) #the y component of the ball's velocity~
    +- Inside source: true
    +*** True Line Result
    +      fby = velocityMag * Math.sin(theta_ball) #the y component of the ball's velocity
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      #the magnitude of the repelling force~
    +- Inside source: true
    +*** True Line Result
    +      #the magnitude of the repelling force
    +** Processing line: ~      repelMag = getRepelMagnitude(fbx, fby, perpVect.x, perpVect.y, (ball.velocity.x**2 + ball.velocity.y**2)**0.5)~
    +- Inside source: true
    +*** True Line Result
    +      repelMag = getRepelMagnitude(fbx, fby, perpVect.x, perpVect.y, (ball.velocity.x**2 + ball.velocity.y**2)**0.5)
    +** Processing line: ~      frx = repelMag* Math.cos(theta_repel) #the x component of the repel's velocity | magnitude is set to twice of fbx~
    +- Inside source: true
    +*** True Line Result
    +      frx = repelMag* Math.cos(theta_repel) #the x component of the repel's velocity | magnitude is set to twice of fbx
    +** Processing line: ~      fry = repelMag* Math.sin(theta_repel) #the y component of the repel's velocity | magnitude is set to twice of fby~
    +- Inside source: true
    +*** True Line Result
    +      fry = repelMag* Math.sin(theta_repel) #the y component of the repel's velocity | magnitude is set to twice of fby
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      fsumx = fbx+frx #sum of x forces~
    +- Inside source: true
    +*** True Line Result
    +      fsumx = fbx+frx #sum of x forces
    +** Processing line: ~      fsumy = fby+fry #sum of y forces~
    +- Inside source: true
    +*** True Line Result
    +      fsumy = fby+fry #sum of y forces
    +** Processing line: ~      fr = velocityMag#fr is the resulting magnitude~
    +- Inside source: true
    +*** True Line Result
    +      fr = velocityMag#fr is the resulting magnitude
    +** Processing line: ~      thetaNew = Math.atan2(fsumy, fsumx)  #thetaNew is the resulting angle~
    +- Inside source: true
    +*** True Line Result
    +      thetaNew = Math.atan2(fsumy, fsumx)  #thetaNew is the resulting angle
    +** Processing line: ~      xnew = fr*Math.cos(thetaNew)#resulting x velocity~
    +- Inside source: true
    +*** True Line Result
    +      xnew = fr*Math.cos(thetaNew)#resulting x velocity
    +** Processing line: ~      ynew = fr*Math.sin(thetaNew)#resulting y velocity~
    +- Inside source: true
    +*** True Line Result
    +      ynew = fr*Math.sin(thetaNew)#resulting y velocity
    +** Processing line: ~      if (velocityMag < MAX_VELOCITY)~
    +- Inside source: true
    +*** True Line Result
    +      if (velocityMag < MAX_VELOCITY)
    +** Processing line: ~        ball.velocity =  Vector2d.new(xnew*1.1, ynew*1.1)~
    +- Inside source: true
    +*** True Line Result
    +        ball.velocity =  Vector2d.new(xnew*1.1, ynew*1.1)
    +** Processing line: ~      else~
    +- Inside source: true
    +*** True Line Result
    +      else
    +** Processing line: ~        ball.velocity =  Vector2d.new(xnew, ynew)~
    +- Inside source: true
    +*** True Line Result
    +        ball.velocity =  Vector2d.new(xnew, ynew)
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
    +*** True Line Result
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +
    +** Processing line: ~*** Physics And Collisions - Arbitrary Collision - main.rb~
    +- Header detected.
    +*** True Line Result
    +
    +*** True Line Result
    +*** Physics And Collisions - Arbitrary Collision - main.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/04_physics_and_collisions/09_arbitrary_collision/app/main.rb~
    +- Inside source: true
    +*** True Line Result
    +  # ./samples/04_physics_and_collisions/09_arbitrary_collision/app/main.rb
    +** Processing line: ~  INFINITY= 10**10~
    +- Inside source: true
    +*** True Line Result
    +  INFINITY= 10**10
    +** Processing line: ~  MAX_VELOCITY = 8.0~
    +- Inside source: true
    +*** True Line Result
    +  MAX_VELOCITY = 8.0
    +** Processing line: ~  BALL_COUNT = 90~
    +- Inside source: true
    +*** True Line Result
    +  BALL_COUNT = 90
    +** Processing line: ~  BALL_DISTANCE = 20~
    +- Inside source: true
    +*** True Line Result
    +  BALL_DISTANCE = 20
    +** Processing line: ~  require 'app/vector2d.rb'~
    +- Inside source: true
    +*** True Line Result
    +  require 'app/vector2d.rb'
    +** Processing line: ~  require 'app/blocks.rb'~
    +- Inside source: true
    +*** True Line Result
    +  require 'app/blocks.rb'
    +** Processing line: ~  require 'app/ball.rb'~
    +- Inside source: true
    +*** True Line Result
    +  require 'app/ball.rb'
    +** Processing line: ~  require 'app/rectangle.rb'~
    +- Inside source: true
    +*** True Line Result
    +  require 'app/rectangle.rb'
    +** Processing line: ~  require 'app/linear_collider.rb'~
    +- Inside source: true
    +*** True Line Result
    +  require 'app/linear_collider.rb'
    +** Processing line: ~  require 'app/square_collider.rb'~
    +- Inside source: true
    +*** True Line Result
    +  require 'app/square_collider.rb'
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~  #Method to init default values~
    +- Inside source: true
    +*** True Line Result
    +  #Method to init default values
    +** Processing line: ~  def defaults args~
    +- Inside source: true
    +*** True Line Result
    +  def defaults args
    +** Processing line: ~    args.state.board_width ||= args.grid.w / 4~
    +- Inside source: true
    +*** True Line Result
    +    args.state.board_width ||= args.grid.w / 4
    +** Processing line: ~    args.state.board_height ||= args.grid.h~
    +- Inside source: true
    +*** True Line Result
    +    args.state.board_height ||= args.grid.h
    +** Processing line: ~    args.state.game_area ||= [(args.state.board_width + args.grid.w / 8), 0, args.state.board_width, args.grid.h]~
    +- Inside source: true
    +*** True Line Result
    +    args.state.game_area ||= [(args.state.board_width + args.grid.w / 8), 0, args.state.board_width, args.grid.h]
    +** Processing line: ~    args.state.balls ||= []~
    +- Inside source: true
    +*** True Line Result
    +    args.state.balls ||= []
    +** Processing line: ~    args.state.num_balls ||= 0~
    +- Inside source: true
    +*** True Line Result
    +    args.state.num_balls ||= 0
    +** Processing line: ~    args.state.ball_created_at ||= args.state.tick_count~
    +- Inside source: true
    +*** True Line Result
    +    args.state.ball_created_at ||= args.state.tick_count
    +** Processing line: ~    args.state.ball_hypotenuse = (10**2 + 10**2)**0.5~
    +- Inside source: true
    +*** True Line Result
    +    args.state.ball_hypotenuse = (10**2 + 10**2)**0.5
    +** Processing line: ~    args.state.ballParents ||=nil~
    +- Inside source: true
    +*** True Line Result
    +    args.state.ballParents ||=nil
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    init_blocks args~
    +- Inside source: true
    +*** True Line Result
    +    init_blocks args
    +** Processing line: ~    init_balls args~
    +- Inside source: true
    +*** True Line Result
    +    init_balls args
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~  begin :default_methods~
    +- Inside source: true
    +*** True Line Result
    +  begin :default_methods
    +** Processing line: ~    def init_blocks args~
    +- Inside source: true
    +*** True Line Result
    +    def init_blocks args
    +** Processing line: ~      block_size = args.state.board_width / 8~
    +- Inside source: true
    +*** True Line Result
    +      block_size = args.state.board_width / 8
    +** Processing line: ~      #Space inbetween each block~
    +- Inside source: true
    +*** True Line Result
    +      #Space inbetween each block
    +** Processing line: ~      block_offset = 4~
    +- Inside source: true
    +*** True Line Result
    +      block_offset = 4
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      args.state.squares ||=[~
    +- Inside source: true
    +*** True Line Result
    +      args.state.squares ||=[
    +** Processing line: ~        Square.new(args, 2, 0, block_size, :right, block_offset),~
    +- Inside source: true
    +*** True Line Result
    +        Square.new(args, 2, 0, block_size, :right, block_offset),
    +** Processing line: ~        Square.new(args, 5, 0, block_size, :right, block_offset),~
    +- Inside source: true
    +*** True Line Result
    +        Square.new(args, 5, 0, block_size, :right, block_offset),
    +** Processing line: ~        Square.new(args, 6, 7, block_size, :right, block_offset)~
    +- Inside source: true
    +*** True Line Result
    +        Square.new(args, 6, 7, block_size, :right, block_offset)
    +** Processing line: ~      ]~
    +- Inside source: true
    +*** True Line Result
    +      ]
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      #Possible orientations are :right, :left, :up, :down~
    +- Inside source: true
    +*** True Line Result
    +      #Possible orientations are :right, :left, :up, :down
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      args.state.tshapes ||= [~
    +- Inside source: true
    +*** True Line Result
    +      args.state.tshapes ||= [
    +** Processing line: ~        TShape.new(args, 0, 6, block_size, :left, block_offset),~
    +- Inside source: true
    +*** True Line Result
    +        TShape.new(args, 0, 6, block_size, :left, block_offset),
    +** Processing line: ~        TShape.new(args, 3, 3, block_size, :down, block_offset),~
    +- Inside source: true
    +*** True Line Result
    +        TShape.new(args, 3, 3, block_size, :down, block_offset),
    +** Processing line: ~        TShape.new(args, 0, 3, block_size, :right, block_offset),~
    +- Inside source: true
    +*** True Line Result
    +        TShape.new(args, 0, 3, block_size, :right, block_offset),
    +** Processing line: ~        TShape.new(args, 0, 11, block_size, :up, block_offset)~
    +- Inside source: true
    +*** True Line Result
    +        TShape.new(args, 0, 11, block_size, :up, block_offset)
    +** Processing line: ~      ]~
    +- Inside source: true
    +*** True Line Result
    +      ]
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      args.state.lines ||= [~
    +- Inside source: true
    +*** True Line Result
    +      args.state.lines ||= [
    +** Processing line: ~        Line.new(args,3, 8, block_size, :down, block_offset),~
    +- Inside source: true
    +*** True Line Result
    +        Line.new(args,3, 8, block_size, :down, block_offset),
    +** Processing line: ~        Line.new(args, 7, 3, block_size, :up, block_offset),~
    +- Inside source: true
    +*** True Line Result
    +        Line.new(args, 7, 3, block_size, :up, block_offset),
    +** Processing line: ~        Line.new(args, 3, 7, block_size, :right, block_offset)~
    +- Inside source: true
    +*** True Line Result
    +        Line.new(args, 3, 7, block_size, :right, block_offset)
    +** Processing line: ~      ]~
    +- Inside source: true
    +*** True Line Result
    +      ]
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      #exit()~
    +- Inside source: true
    +*** True Line Result
    +      #exit()
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    def init_balls args~
    +- Inside source: true
    +*** True Line Result
    +    def init_balls args
    +** Processing line: ~      return unless args.state.num_balls < BALL_COUNT~
    +- Inside source: true
    +*** True Line Result
    +      return unless args.state.num_balls < BALL_COUNT
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      #only create a new ball every 10 ticks~
    +- Inside source: true
    +*** True Line Result
    +      #only create a new ball every 10 ticks
    +** Processing line: ~      return unless args.state.ball_created_at.elapsed_time > 10~
    +- Inside source: true
    +*** True Line Result
    +      return unless args.state.ball_created_at.elapsed_time > 10
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      if (args.state.num_balls == 0)~
    +- Inside source: true
    +*** True Line Result
    +      if (args.state.num_balls == 0)
    +** Processing line: ~        args.state.balls.append(Ball.new(args,args.state.num_balls,BALL_COUNT-1, nil, nil))~
    +- Inside source: true
    +*** True Line Result
    +        args.state.balls.append(Ball.new(args,args.state.num_balls,BALL_COUNT-1, nil, nil))
    +** Processing line: ~        args.state.ballParents = [args.state.balls[0]]~
    +- Inside source: true
    +*** True Line Result
    +        args.state.ballParents = [args.state.balls[0]]
    +** Processing line: ~      else~
    +- Inside source: true
    +*** True Line Result
    +      else
    +** Processing line: ~        args.state.balls.append(Ball.new(args,args.state.num_balls,BALL_COUNT-1, args.state.balls.last, nil) )~
    +- Inside source: true
    +*** True Line Result
    +        args.state.balls.append(Ball.new(args,args.state.num_balls,BALL_COUNT-1, args.state.balls.last, nil) )
    +** Processing line: ~        args.state.balls[-2].child = args.state.balls[-1]~
    +- Inside source: true
    +*** True Line Result
    +        args.state.balls[-2].child = args.state.balls[-1]
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~      args.state.ball_created_at = args.state.tick_count~
    +- Inside source: true
    +*** True Line Result
    +      args.state.ball_created_at = args.state.tick_count
    +** Processing line: ~      args.state.num_balls += 1~
    +- Inside source: true
    +*** True Line Result
    +      args.state.num_balls += 1
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~  #Render loop~
    +- Inside source: true
    +*** True Line Result
    +  #Render loop
    +** Processing line: ~  def render args~
    +- Inside source: true
    +*** True Line Result
    +  def render args
    +** Processing line: ~    bgClr = {r:10, g:10, b:200}~
    +- Inside source: true
    +*** True Line Result
    +    bgClr = {r:10, g:10, b:200}
    +** Processing line: ~    bgClr = {r:255-30, g:255-30, b:255-30}~
    +- Inside source: true
    +*** True Line Result
    +    bgClr = {r:255-30, g:255-30, b:255-30}
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    args.outputs.solids << [0, 0, $args.grid.right, $args.grid.top, bgClr[:r], bgClr[:g], bgClr[:b]];~
    +- Inside source: true
    +*** True Line Result
    +    args.outputs.solids << [0, 0, $args.grid.right, $args.grid.top, bgClr[:r], bgClr[:g], bgClr[:b]];
    +** Processing line: ~    args.outputs.borders << args.state.game_area~
    +- Inside source: true
    +*** True Line Result
    +    args.outputs.borders << args.state.game_area
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    render_instructions args~
    +- Inside source: true
    +*** True Line Result
    +    render_instructions args
    +** Processing line: ~    render_shapes args~
    +- Inside source: true
    +*** True Line Result
    +    render_shapes args
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    render_balls args~
    +- Inside source: true
    +*** True Line Result
    +    render_balls args
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    #args.state.rectangle.draw args~
    +- Inside source: true
    +*** True Line Result
    +    #args.state.rectangle.draw args
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    args.outputs.sprites << [$args.grid.right-(args.state.board_width + args.grid.w / 8), 0, $args.grid.right, $args.grid.top, "sprites/square-white-2.png", 0, 255, bgClr[:r], bgClr[:g], bgClr[:b]]~
    +- Inside source: true
    +*** True Line Result
    +    args.outputs.sprites << [$args.grid.right-(args.state.board_width + args.grid.w / 8), 0, $args.grid.right, $args.grid.top, "sprites/square-white-2.png", 0, 255, bgClr[:r], bgClr[:g], bgClr[:b]]
    +** Processing line: ~    args.outputs.sprites << [0, 0, (args.state.board_width + args.grid.w / 8), $args.grid.top, "sprites/square-white-2.png", 0, 255, bgClr[:r], bgClr[:g], bgClr[:b]]~
    +- Inside source: true
    +*** True Line Result
    +    args.outputs.sprites << [0, 0, (args.state.board_width + args.grid.w / 8), $args.grid.top, "sprites/square-white-2.png", 0, 255, bgClr[:r], bgClr[:g], bgClr[:b]]
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~  begin :render_methods~
    +- Inside source: true
    +*** True Line Result
    +  begin :render_methods
    +** Processing line: ~    def render_instructions args~
    +- Inside source: true
    +*** True Line Result
    +    def render_instructions args
    +** Processing line: ~      #gtk.current_framerate~
    +- Inside source: true
    +*** True Line Result
    +      #gtk.current_framerate
    +** Processing line: ~      args.outputs.labels << [20, $args.grid.top-20, "FPS: " + $gtk.current_framerate.to_s]~
    +- Inside source: true
    +*** True Line Result
    +      args.outputs.labels << [20, $args.grid.top-20, "FPS: " + $gtk.current_framerate.to_s]
    +** Processing line: ~      if (args.state.balls != nil && args.state.balls[0] != nil)~
    +- Inside source: true
    +*** True Line Result
    +      if (args.state.balls != nil && args.state.balls[0] != nil)
    +** Processing line: ~          bx =  args.state.balls[0].velocity.x~
    +- Inside source: true
    +*** True Line Result
    +          bx =  args.state.balls[0].velocity.x
    +** Processing line: ~          by =  args.state.balls[0].velocity.y~
    +- Inside source: true
    +*** True Line Result
    +          by =  args.state.balls[0].velocity.y
    +** Processing line: ~          bmg = (bx**2.0 + by**2.0)**0.5~
    +- Inside source: true
    +*** True Line Result
    +          bmg = (bx**2.0 + by**2.0)**0.5
    +** Processing line: ~          args.outputs.labels << [20, $args.grid.top-20-20, "V: " + bmg.to_s ]~
    +- Inside source: true
    +*** True Line Result
    +          args.outputs.labels << [20, $args.grid.top-20-20, "V: " + bmg.to_s ]
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    def render_shapes args~
    +- Inside source: true
    +*** True Line Result
    +    def render_shapes args
    +** Processing line: ~      for s in args.state.squares~
    +- Inside source: true
    +*** True Line Result
    +      for s in args.state.squares
    +** Processing line: ~        s.draw args~
    +- Inside source: true
    +*** True Line Result
    +        s.draw args
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      for l in args.state.lines~
    +- Inside source: true
    +*** True Line Result
    +      for l in args.state.lines
    +** Processing line: ~        l.draw args~
    +- Inside source: true
    +*** True Line Result
    +        l.draw args
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      for t in args.state.tshapes~
    +- Inside source: true
    +*** True Line Result
    +      for t in args.state.tshapes
    +** Processing line: ~        t.draw args~
    +- Inside source: true
    +*** True Line Result
    +        t.draw args
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    def render_balls args~
    +- Inside source: true
    +*** True Line Result
    +    def render_balls args
    +** Processing line: ~      #args.state.balls.each do |ball|~
    +- Inside source: true
    +*** True Line Result
    +      #args.state.balls.each do |ball|
    +** Processing line: ~        #ball.draw args~
    +- Inside source: true
    +*** True Line Result
    +        #ball.draw args
    +** Processing line: ~      #end~
    +- Inside source: true
    +*** True Line Result
    +      #end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      args.outputs.sprites << args.state.balls.map do |ball|~
    +- Inside source: true
    +*** True Line Result
    +      args.outputs.sprites << args.state.balls.map do |ball|
    +** Processing line: ~        ball.getDraw args~
    +- Inside source: true
    +*** True Line Result
    +        ball.getDraw args
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~  #Calls all methods necessary for performing calculations~
    +- Inside source: true
    +*** True Line Result
    +  #Calls all methods necessary for performing calculations
    +** Processing line: ~  def calc args~
    +- Inside source: true
    +*** True Line Result
    +  def calc args
    +** Processing line: ~    for b in args.state.ballParents~
    +- Inside source: true
    +*** True Line Result
    +    for b in args.state.ballParents
    +** Processing line: ~      b.update args~
    +- Inside source: true
    +*** True Line Result
    +      b.update args
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    for s in args.state.squares~
    +- Inside source: true
    +*** True Line Result
    +    for s in args.state.squares
    +** Processing line: ~      s.update args~
    +- Inside source: true
    +*** True Line Result
    +      s.update args
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    for l in args.state.lines~
    +- Inside source: true
    +*** True Line Result
    +    for l in args.state.lines
    +** Processing line: ~      l.update args~
    +- Inside source: true
    +*** True Line Result
    +      l.update args
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    for t in args.state.tshapes~
    +- Inside source: true
    +*** True Line Result
    +    for t in args.state.tshapes
    +** Processing line: ~      t.update args~
    +- Inside source: true
    +*** True Line Result
    +      t.update args
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~  begin :calc_methods~
    +- Inside source: true
    +*** True Line Result
    +  begin :calc_methods
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~  def tick args~
    +- Inside source: true
    +*** True Line Result
    +  def tick args
    +** Processing line: ~    defaults args~
    +- Inside source: true
    +*** True Line Result
    +    defaults args
    +** Processing line: ~    render args~
    +- Inside source: true
    +*** True Line Result
    +    render args
    +** Processing line: ~    calc args~
    +- Inside source: true
    +*** True Line Result
    +    calc args
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
    +*** True Line Result
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +
    +** Processing line: ~*** Physics And Collisions - Arbitrary Collision - paddle.rb~
    +- Header detected.
    +*** True Line Result
    +
    +*** True Line Result
    +*** Physics And Collisions - Arbitrary Collision - paddle.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/04_physics_and_collisions/09_arbitrary_collision/app/paddle.rb~
    +- Inside source: true
    +*** True Line Result
    +  # ./samples/04_physics_and_collisions/09_arbitrary_collision/app/paddle.rb
    +** Processing line: ~  class Paddle~
    +- Inside source: true
    +*** True Line Result
    +  class Paddle
    +** Processing line: ~    attr_accessor :enabled~
    +- Inside source: true
    +*** True Line Result
    +    attr_accessor :enabled
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    def initialize ()~
    +- Inside source: true
    +*** True Line Result
    +    def initialize ()
    +** Processing line: ~      @x=WIDTH/2~
    +- Inside source: true
    +*** True Line Result
    +      @x=WIDTH/2
    +** Processing line: ~      @y=100~
    +- Inside source: true
    +*** True Line Result
    +      @y=100
    +** Processing line: ~      @width=100~
    +- Inside source: true
    +*** True Line Result
    +      @width=100
    +** Processing line: ~      @height=20~
    +- Inside source: true
    +*** True Line Result
    +      @height=20
    +** Processing line: ~      @speed=10~
    +- Inside source: true
    +*** True Line Result
    +      @speed=10
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      @xyCollision  = LinearCollider.new({x: @x,y: @y+@height+5}, {x: @x+@width, y: @y+@height+5})~
    +- Inside source: true
    +*** True Line Result
    +      @xyCollision  = LinearCollider.new({x: @x,y: @y+@height+5}, {x: @x+@width, y: @y+@height+5})
    +** Processing line: ~      @xyCollision2 = LinearCollider.new({x: @x,y: @y}, {x: @x+@width, y: @y}, :pos)~
    +- Inside source: true
    +*** True Line Result
    +      @xyCollision2 = LinearCollider.new({x: @x,y: @y}, {x: @x+@width, y: @y}, :pos)
    +** Processing line: ~      @xyCollision3 = LinearCollider.new({x: @x,y: @y}, {x: @x, y: @y+@height+5})~
    +- Inside source: true
    +*** True Line Result
    +      @xyCollision3 = LinearCollider.new({x: @x,y: @y}, {x: @x, y: @y+@height+5})
    +** Processing line: ~      @xyCollision4 = LinearCollider.new({x: @x+@width,y: @y}, {x: @x+@width, y: @y+@height+5}, :pos)~
    +- Inside source: true
    +*** True Line Result
    +      @xyCollision4 = LinearCollider.new({x: @x+@width,y: @y}, {x: @x+@width, y: @y+@height+5}, :pos)
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      @enabled = true~
    +- Inside source: true
    +*** True Line Result
    +      @enabled = true
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    def update args~
    +- Inside source: true
    +*** True Line Result
    +    def update args
    +** Processing line: ~      @xyCollision.resetPoints({x: @x,y: @y+@height+5}, {x: @x+@width, y: @y+@height+5})~
    +- Inside source: true
    +*** True Line Result
    +      @xyCollision.resetPoints({x: @x,y: @y+@height+5}, {x: @x+@width, y: @y+@height+5})
    +** Processing line: ~      @xyCollision2.resetPoints({x: @x,y: @y}, {x: @x+@width, y: @y})~
    +- Inside source: true
    +*** True Line Result
    +      @xyCollision2.resetPoints({x: @x,y: @y}, {x: @x+@width, y: @y})
    +** Processing line: ~      @xyCollision3.resetPoints({x: @x,y: @y}, {x: @x, y: @y+@height+5})~
    +- Inside source: true
    +*** True Line Result
    +      @xyCollision3.resetPoints({x: @x,y: @y}, {x: @x, y: @y+@height+5})
    +** Processing line: ~      @xyCollision4.resetPoints({x: @x+@width,y: @y}, {x: @x+@width, y: @y+@height+5})~
    +- Inside source: true
    +*** True Line Result
    +      @xyCollision4.resetPoints({x: @x+@width,y: @y}, {x: @x+@width, y: @y+@height+5})
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      @xyCollision.update  args~
    +- Inside source: true
    +*** True Line Result
    +      @xyCollision.update  args
    +** Processing line: ~      @xyCollision2.update args~
    +- Inside source: true
    +*** True Line Result
    +      @xyCollision2.update args
    +** Processing line: ~      @xyCollision3.update args~
    +- Inside source: true
    +*** True Line Result
    +      @xyCollision3.update args
    +** Processing line: ~      @xyCollision4.update args~
    +- Inside source: true
    +*** True Line Result
    +      @xyCollision4.update args
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      args.inputs.keyboard.key_held.left  ||= false~
    +- Inside source: true
    +*** True Line Result
    +      args.inputs.keyboard.key_held.left  ||= false
    +** Processing line: ~      args.inputs.keyboard.key_held.right  ||= false~
    +- Inside source: true
    +*** True Line Result
    +      args.inputs.keyboard.key_held.right  ||= false
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      if not (args.inputs.keyboard.key_held.left == args.inputs.keyboard.key_held.right)~
    +- Inside source: true
    +*** True Line Result
    +      if not (args.inputs.keyboard.key_held.left == args.inputs.keyboard.key_held.right)
    +** Processing line: ~        if args.inputs.keyboard.key_held.left && @enabled~
    +- Inside source: true
    +*** True Line Result
    +        if args.inputs.keyboard.key_held.left && @enabled
    +** Processing line: ~          @x-=@speed~
    +- Inside source: true
    +*** True Line Result
    +          @x-=@speed
    +** Processing line: ~        elsif args.inputs.keyboard.key_held.right && @enabled~
    +- Inside source: true
    +*** True Line Result
    +        elsif args.inputs.keyboard.key_held.right && @enabled
    +** Processing line: ~          @x+=@speed~
    +- Inside source: true
    +*** True Line Result
    +          @x+=@speed
    +** Processing line: ~        end~
    +- Inside source: true
    +*** True Line Result
    +        end
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      xmin =WIDTH/4~
    +- Inside source: true
    +*** True Line Result
    +      xmin =WIDTH/4
    +** Processing line: ~      xmax = 3*(WIDTH/4)~
    +- Inside source: true
    +*** True Line Result
    +      xmax = 3*(WIDTH/4)
    +** Processing line: ~      @x = (@x+@width > xmax) ? xmax-@width : (@x xmax) ? xmax-@width : (@x= [@pointA.x,@pointB.x].min+(@extension == :pos ? -@thickness : 0) &&~
    +- Inside source: true
    +*** True Line Result
    +        point.x >= [@pointA.x,@pointB.x].min+(@extension == :pos ? -@thickness : 0) &&
    +** Processing line: ~        point.x <= [@pointA.x,@pointB.x].max+(@extension == :neg ?  @thickness : 0) &&~
    +- Inside source: true
    +*** True Line Result
    +        point.x <= [@pointA.x,@pointB.x].max+(@extension == :neg ?  @thickness : 0) &&
    +** Processing line: ~        point.y >= [@pointA.y,@pointB.y].min && point.y <= [@pointA.y,@pointB.y].max~
    +- Inside source: true
    +*** True Line Result
    +        point.y >= [@pointA.y,@pointB.y].min && point.y <= [@pointA.y,@pointB.y].max
    +** Processing line: ~          return true~
    +- Inside source: true
    +*** True Line Result
    +          return true
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      isNegInLine   = @extension == :neg &&~
    +- Inside source: true
    +*** True Line Result
    +      isNegInLine   = @extension == :neg &&
    +** Processing line: ~                      point.y <= slope(@pointA, @pointB)*point.x+intercept(@pointA,@pointB) &&~
    +- Inside source: true
    +*** True Line Result
    +                      point.y <= slope(@pointA, @pointB)*point.x+intercept(@pointA,@pointB) &&
    +** Processing line: ~                      point.y >= point.x*slope(@pointAExtended, @pointBExtended)+intercept(@pointAExtended,@pointBExtended)~
    +- Inside source: true
    +*** True Line Result
    +                      point.y >= point.x*slope(@pointAExtended, @pointBExtended)+intercept(@pointAExtended,@pointBExtended)
    +** Processing line: ~      isPosInLine   = @extension == :pos &&~
    +- Inside source: true
    +*** True Line Result
    +      isPosInLine   = @extension == :pos &&
    +** Processing line: ~                      point.y >= slope(@pointA, @pointB)*point.x+intercept(@pointA,@pointB) &&~
    +- Inside source: true
    +*** True Line Result
    +                      point.y >= slope(@pointA, @pointB)*point.x+intercept(@pointA,@pointB) &&
    +** Processing line: ~                      point.y <= point.x*slope(@pointAExtended, @pointBExtended)+intercept(@pointAExtended,@pointBExtended)~
    +- Inside source: true
    +*** True Line Result
    +                      point.y <= point.x*slope(@pointAExtended, @pointBExtended)+intercept(@pointAExtended,@pointBExtended)
    +** Processing line: ~      isInBoxBounds = point.x >= [@pointA.x,@pointB.x].min &&~
    +- Inside source: true
    +*** True Line Result
    +      isInBoxBounds = point.x >= [@pointA.x,@pointB.x].min &&
    +** Processing line: ~                      point.x <= [@pointA.x,@pointB.x].max &&~
    +- Inside source: true
    +*** True Line Result
    +                      point.x <= [@pointA.x,@pointB.x].max &&
    +** Processing line: ~                      point.y >= [@pointA.y,@pointB.y].min+(@extension == :neg ? -@thickness : 0) &&~
    +- Inside source: true
    +*** True Line Result
    +                      point.y >= [@pointA.y,@pointB.y].min+(@extension == :neg ? -@thickness : 0) &&
    +** Processing line: ~                      point.y <= [@pointA.y,@pointB.y].max+(@extension == :pos ? @thickness : 0)~
    +- Inside source: true
    +*** True Line Result
    +                      point.y <= [@pointA.y,@pointB.y].max+(@extension == :pos ? @thickness : 0)
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      return isInBoxBounds && (isNegInLine || isPosInLine)~
    +- Inside source: true
    +*** True Line Result
    +      return isInBoxBounds && (isNegInLine || isPosInLine)
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    def getRepelMagnitude (fbx, fby, vrx, vry, args)~
    +- Inside source: true
    +*** True Line Result
    +    def getRepelMagnitude (fbx, fby, vrx, vry, args)
    +** Processing line: ~      a = fbx ; b = vrx ; c = fby~
    +- Inside source: true
    +*** True Line Result
    +      a = fbx ; b = vrx ; c = fby
    +** Processing line: ~      d = vry ; e = args.state.ball.velocity.mag~
    +- Inside source: true
    +*** True Line Result
    +      d = vry ; e = args.state.ball.velocity.mag
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      if b**2 + d**2 == 0~
    +- Inside source: true
    +*** True Line Result
    +      if b**2 + d**2 == 0
    +** Processing line: ~        puts "magnitude error"~
    +- Inside source: true
    +*** True Line Result
    +        puts "magnitude error"
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      x1 = (-a*b+-c*d + (e**2 * b**2 - b**2 * c**2 + 2*a*b*c*d + e**2 + d**2 - a**2 * d**2)**0.5)/(b**2 + d**2)~
    +- Inside source: true
    +*** True Line Result
    +      x1 = (-a*b+-c*d + (e**2 * b**2 - b**2 * c**2 + 2*a*b*c*d + e**2 + d**2 - a**2 * d**2)**0.5)/(b**2 + d**2)
    +** Processing line: ~      x2 = -((a*b + c*d + (e**2 * b**2 - b**2 * c**2 + 2*a*b*c*d + e**2 * d**2 - a**2 * d**2)**0.5)/(b**2 + d**2))~
    +- Inside source: true
    +*** True Line Result
    +      x2 = -((a*b + c*d + (e**2 * b**2 - b**2 * c**2 + 2*a*b*c*d + e**2 * d**2 - a**2 * d**2)**0.5)/(b**2 + d**2))
    +** Processing line: ~      return ((a+x1*b)**2 + (c+x1*d)**2 == e**2) ? x1 : x2~
    +- Inside source: true
    +*** True Line Result
    +      return ((a+x1*b)**2 + (c+x1*d)**2 == e**2) ? x1 : x2
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    def update args~
    +- Inside source: true
    +*** True Line Result
    +    def update args
    +** Processing line: ~      #each of the four points on the square ball - NOTE simple to extend to a circle~
    +- Inside source: true
    +*** True Line Result
    +      #each of the four points on the square ball - NOTE simple to extend to a circle
    +** Processing line: ~      points= [ {x: args.state.ball.xy.x,                          y: args.state.ball.xy.y},~
    +- Inside source: true
    +*** True Line Result
    +      points= [ {x: args.state.ball.xy.x,                          y: args.state.ball.xy.y},
    +** Processing line: ~                {x: args.state.ball.xy.x+args.state.ball.width,    y: args.state.ball.xy.y},~
    +- Inside source: true
    +*** True Line Result
    +                {x: args.state.ball.xy.x+args.state.ball.width,    y: args.state.ball.xy.y},
    +** Processing line: ~                {x: args.state.ball.xy.x,                          y: args.state.ball.xy.y+args.state.ball.height},~
    +- Inside source: true
    +*** True Line Result
    +                {x: args.state.ball.xy.x,                          y: args.state.ball.xy.y+args.state.ball.height},
    +** Processing line: ~                {x: args.state.ball.xy.x+args.state.ball.width,    y: args.state.ball.xy.y + args.state.ball.height}~
    +- Inside source: true
    +*** True Line Result
    +                {x: args.state.ball.xy.x+args.state.ball.width,    y: args.state.ball.xy.y + args.state.ball.height}
    +** Processing line: ~              ]~
    +- Inside source: true
    +*** True Line Result
    +              ]
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      #for each point p in points~
    +- Inside source: true
    +*** True Line Result
    +      #for each point p in points
    +** Processing line: ~      for point in points~
    +- Inside source: true
    +*** True Line Result
    +      for point in points
    +** Processing line: ~        #isCollision.md has more information on this section~
    +- Inside source: true
    +*** True Line Result
    +        #isCollision.md has more information on this section
    +** Processing line: ~        #TODO: section can certainly be simplifyed~
    +- Inside source: true
    +*** True Line Result
    +        #TODO: section can certainly be simplifyed
    +** Processing line: ~        if isCollision?(point)~
    +- Inside source: true
    +*** True Line Result
    +        if isCollision?(point)
    +** Processing line: ~          u = Vector2d.new(1.0,((slope(@pointA, @pointB)==0) ? INFINITY : -1/slope(@pointA, @pointB))*1.0).normalize #normal perpendicular (to line segment) vector~
    +- Inside source: true
    +*** True Line Result
    +          u = Vector2d.new(1.0,((slope(@pointA, @pointB)==0) ? INFINITY : -1/slope(@pointA, @pointB))*1.0).normalize #normal perpendicular (to line segment) vector
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~          #the vector with the repeling force can be u or -u depending of where the ball was coming from in relation to the line segment~
    +- Inside source: true
    +*** True Line Result
    +          #the vector with the repeling force can be u or -u depending of where the ball was coming from in relation to the line segment
    +** Processing line: ~          previousBallPosition=Vector2d.new(point.x-args.state.ball.velocity.x,point.y-args.state.ball.velocity.y)~
    +- Inside source: true
    +*** True Line Result
    +          previousBallPosition=Vector2d.new(point.x-args.state.ball.velocity.x,point.y-args.state.ball.velocity.y)
    +** Processing line: ~          choiceA = (u.mult(1))~
    +- Inside source: true
    +*** True Line Result
    +          choiceA = (u.mult(1))
    +** Processing line: ~          choiceB =  (u.mult(-1))~
    +- Inside source: true
    +*** True Line Result
    +          choiceB =  (u.mult(-1))
    +** Processing line: ~          vectorRepel = nil~
    +- Inside source: true
    +*** True Line Result
    +          vectorRepel = nil
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~          if (slope(@pointA, @pointB))!=INFINITY && u.y < 0~
    +- Inside source: true
    +*** True Line Result
    +          if (slope(@pointA, @pointB))!=INFINITY && u.y < 0
    +** Processing line: ~            choiceA, choiceB = choiceB, choiceA~
    +- Inside source: true
    +*** True Line Result
    +            choiceA, choiceB = choiceB, choiceA
    +** Processing line: ~          end~
    +- Inside source: true
    +*** True Line Result
    +          end
    +** Processing line: ~          vectorRepel = (previousBallPosition.y > calcY(@pointA, @pointB, previousBallPosition.x)) ? choiceA : choiceB~
    +- Inside source: true
    +*** True Line Result
    +          vectorRepel = (previousBallPosition.y > calcY(@pointA, @pointB, previousBallPosition.x)) ? choiceA : choiceB
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~          #vectorRepel = (previousBallPosition.y > slope(@pointA, @pointB)*previousBallPosition.x+intercept(@pointA,@pointB)) ? choiceA : choiceB)~
    +- Inside source: true
    +*** True Line Result
    +          #vectorRepel = (previousBallPosition.y > slope(@pointA, @pointB)*previousBallPosition.x+intercept(@pointA,@pointB)) ? choiceA : choiceB)
    +** Processing line: ~          if (slope(@pointA, @pointB) == INFINITY) #slope INFINITY breaks down in the above test, ergo it requires a custom test~
    +- Inside source: true
    +*** True Line Result
    +          if (slope(@pointA, @pointB) == INFINITY) #slope INFINITY breaks down in the above test, ergo it requires a custom test
    +** Processing line: ~            vectorRepel = (previousBallPosition.x > @pointA.x) ? (u.mult(1)) : (u.mult(-1))~
    +- Inside source: true
    +*** True Line Result
    +            vectorRepel = (previousBallPosition.x > @pointA.x) ? (u.mult(1)) : (u.mult(-1))
    +** Processing line: ~          end~
    +- Inside source: true
    +*** True Line Result
    +          end
    +** Processing line: ~          #puts ("     " + $t[0].to_s + "," + $t[1].to_s + "    " + $t[2].to_s + "," + $t[3].to_s + "     " + "   " + u.x.to_s + "," + u.y.to_s)~
    +- Inside source: true
    +*** True Line Result
    +          #puts ("     " + $t[0].to_s + "," + $t[1].to_s + "    " + $t[2].to_s + "," + $t[3].to_s + "     " + "   " + u.x.to_s + "," + u.y.to_s)
    +** Processing line: ~          #vectorRepel now has the repeling force~
    +- Inside source: true
    +*** True Line Result
    +          #vectorRepel now has the repeling force
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~          mag = args.state.ball.velocity.mag~
    +- Inside source: true
    +*** True Line Result
    +          mag = args.state.ball.velocity.mag
    +** Processing line: ~          theta_ball=Math.atan2(args.state.ball.velocity.y,args.state.ball.velocity.x) #the angle of the ball's velocity~
    +- Inside source: true
    +*** True Line Result
    +          theta_ball=Math.atan2(args.state.ball.velocity.y,args.state.ball.velocity.x) #the angle of the ball's velocity
    +** Processing line: ~          theta_repel=Math.atan2(vectorRepel.y,vectorRepel.x) #the angle of the repeling force~
    +- Inside source: true
    +*** True Line Result
    +          theta_repel=Math.atan2(vectorRepel.y,vectorRepel.x) #the angle of the repeling force
    +** Processing line: ~          #puts ("theta:" + theta_ball.to_s + " " + theta_repel.to_s) #theta okay~
    +- Inside source: true
    +*** True Line Result
    +          #puts ("theta:" + theta_ball.to_s + " " + theta_repel.to_s) #theta okay
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~          fbx = mag * Math.cos(theta_ball) #the x component of the ball's velocity~
    +- Inside source: true
    +*** True Line Result
    +          fbx = mag * Math.cos(theta_ball) #the x component of the ball's velocity
    +** Processing line: ~          fby = mag * Math.sin(theta_ball) #the y component of the ball's velocity~
    +- Inside source: true
    +*** True Line Result
    +          fby = mag * Math.sin(theta_ball) #the y component of the ball's velocity
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~          repelMag = getRepelMagnitude(fbx, fby, vectorRepel.x, vectorRepel.y, args)~
    +- Inside source: true
    +*** True Line Result
    +          repelMag = getRepelMagnitude(fbx, fby, vectorRepel.x, vectorRepel.y, args)
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~          frx = repelMag* Math.cos(theta_repel) #the x component of the repel's velocity | magnitude is set to twice of fbx~
    +- Inside source: true
    +*** True Line Result
    +          frx = repelMag* Math.cos(theta_repel) #the x component of the repel's velocity | magnitude is set to twice of fbx
    +** Processing line: ~          fry = repelMag* Math.sin(theta_repel) #the y component of the repel's velocity | magnitude is set to twice of fby~
    +- Inside source: true
    +*** True Line Result
    +          fry = repelMag* Math.sin(theta_repel) #the y component of the repel's velocity | magnitude is set to twice of fby
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~          fsumx = fbx+frx #sum of x forces~
    +- Inside source: true
    +*** True Line Result
    +          fsumx = fbx+frx #sum of x forces
    +** Processing line: ~          fsumy = fby+fry #sum of y forces~
    +- Inside source: true
    +*** True Line Result
    +          fsumy = fby+fry #sum of y forces
    +** Processing line: ~          fr = mag#fr is the resulting magnitude~
    +- Inside source: true
    +*** True Line Result
    +          fr = mag#fr is the resulting magnitude
    +** Processing line: ~          thetaNew = Math.atan2(fsumy, fsumx)  #thetaNew is the resulting angle~
    +- Inside source: true
    +*** True Line Result
    +          thetaNew = Math.atan2(fsumy, fsumx)  #thetaNew is the resulting angle
    +** Processing line: ~          xnew = fr*Math.cos(thetaNew) #resulting x velocity~
    +- Inside source: true
    +*** True Line Result
    +          xnew = fr*Math.cos(thetaNew) #resulting x velocity
    +** Processing line: ~          ynew = fr*Math.sin(thetaNew) #resulting y velocity~
    +- Inside source: true
    +*** True Line Result
    +          ynew = fr*Math.sin(thetaNew) #resulting y velocity
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~          args.state.ball.velocity = Vector2d.new(xnew,ynew)~
    +- Inside source: true
    +*** True Line Result
    +          args.state.ball.velocity = Vector2d.new(xnew,ynew)
    +** Processing line: ~          #args.state.ball.xy.add(args.state.ball.velocity)~
    +- Inside source: true
    +*** True Line Result
    +          #args.state.ball.xy.add(args.state.ball.velocity)
    +** Processing line: ~          break #no need to check the other points ?~
    +- Inside source: true
    +*** True Line Result
    +          break #no need to check the other points ?
    +** Processing line: ~        else~
    +- Inside source: true
    +*** True Line Result
    +        else
    +** Processing line: ~        end~
    +- Inside source: true
    +*** True Line Result
    +        end
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~    end #end update~
    +- Inside source: true
    +*** True Line Result
    +    end #end update
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
    +*** True Line Result
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +
    +** Processing line: ~*** Physics And Collisions - Collision With Object Removal - main.rb~
    +- Header detected.
    +*** True Line Result
    +
    +*** True Line Result
    +*** Physics And Collisions - Collision With Object Removal - main.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/04_physics_and_collisions/10_collision_with_object_removal/app/main.rb~
    +- Inside source: true
    +*** True Line Result
    +  # ./samples/04_physics_and_collisions/10_collision_with_object_removal/app/main.rb
    +** Processing line: ~  # coding: utf-8~
    +- Inside source: true
    +*** True Line Result
    +  # coding: utf-8
    +** Processing line: ~  INFINITY= 10**10~
    +- Inside source: true
    +*** True Line Result
    +  INFINITY= 10**10
    +** Processing line: ~  WIDTH=1280~
    +- Inside source: true
    +*** True Line Result
    +  WIDTH=1280
    +** Processing line: ~  HEIGHT=720~
    +- Inside source: true
    +*** True Line Result
    +  HEIGHT=720
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~  require 'app/vector2d.rb'~
    +- Inside source: true
    +*** True Line Result
    +  require 'app/vector2d.rb'
    +** Processing line: ~  require 'app/paddle.rb'~
    +- Inside source: true
    +*** True Line Result
    +  require 'app/paddle.rb'
    +** Processing line: ~  require 'app/ball.rb'~
    +- Inside source: true
    +*** True Line Result
    +  require 'app/ball.rb'
    +** Processing line: ~  require 'app/linear_collider.rb'~
    +- Inside source: true
    +*** True Line Result
    +  require 'app/linear_collider.rb'
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~  #Method to init default values~
    +- Inside source: true
    +*** True Line Result
    +  #Method to init default values
    +** Processing line: ~  def defaults args~
    +- Inside source: true
    +*** True Line Result
    +  def defaults args
    +** Processing line: ~    args.state.game_board ||= [(args.grid.w / 2 - args.grid.w / 4), 0, (args.grid.w / 2), args.grid.h]~
    +- Inside source: true
    +*** True Line Result
    +    args.state.game_board ||= [(args.grid.w / 2 - args.grid.w / 4), 0, (args.grid.w / 2), args.grid.h]
    +** Processing line: ~    args.state.bricks ||= []~
    +- Inside source: true
    +*** True Line Result
    +    args.state.bricks ||= []
    +** Processing line: ~    args.state.num_bricks ||= 0~
    +- Inside source: true
    +*** True Line Result
    +    args.state.num_bricks ||= 0
    +** Processing line: ~    args.state.game_over_at ||= 0~
    +- Inside source: true
    +*** True Line Result
    +    args.state.game_over_at ||= 0
    +** Processing line: ~    args.state.paddle ||= Paddle.new~
    +- Inside source: true
    +*** True Line Result
    +    args.state.paddle ||= Paddle.new
    +** Processing line: ~    args.state.ball   ||= Ball.new~
    +- Inside source: true
    +*** True Line Result
    +    args.state.ball   ||= Ball.new
    +** Processing line: ~    args.state.westWall  ||= LinearCollider.new({x: args.grid.w/4,      y: 0},          {x: args.grid.w/4,      y: args.grid.h}, :pos)~
    +- Inside source: true
    +*** True Line Result
    +    args.state.westWall  ||= LinearCollider.new({x: args.grid.w/4,      y: 0},          {x: args.grid.w/4,      y: args.grid.h}, :pos)
    +** Processing line: ~    args.state.eastWall  ||= LinearCollider.new({x: 3*args.grid.w*0.25, y: 0},          {x: 3*args.grid.w*0.25, y: args.grid.h})~
    +- Inside source: true
    +*** True Line Result
    +    args.state.eastWall  ||= LinearCollider.new({x: 3*args.grid.w*0.25, y: 0},          {x: 3*args.grid.w*0.25, y: args.grid.h})
    +** Processing line: ~    args.state.southWall ||= LinearCollider.new({x: 0,                  y: 0},          {x: args.grid.w,        y: 0})~
    +- Inside source: true
    +*** True Line Result
    +    args.state.southWall ||= LinearCollider.new({x: 0,                  y: 0},          {x: args.grid.w,        y: 0})
    +** Processing line: ~    args.state.northWall ||= LinearCollider.new({x: 0,                  y:args.grid.h}, {x: args.grid.w,        y: args.grid.h}, :pos)~
    +- Inside source: true
    +*** True Line Result
    +    args.state.northWall ||= LinearCollider.new({x: 0,                  y:args.grid.h}, {x: args.grid.w,        y: args.grid.h}, :pos)
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    #args.state.testWall ||= LinearCollider.new({x:0 , y:0},{x:args.grid.w, y:args.grid.h})~
    +- Inside source: true
    +*** True Line Result
    +    #args.state.testWall ||= LinearCollider.new({x:0 , y:0},{x:args.grid.w, y:args.grid.h})
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~  #Render loop~
    +- Inside source: true
    +*** True Line Result
    +  #Render loop
    +** Processing line: ~  def render args~
    +- Inside source: true
    +*** True Line Result
    +  def render args
    +** Processing line: ~    render_instructions args~
    +- Inside source: true
    +*** True Line Result
    +    render_instructions args
    +** Processing line: ~    render_board args~
    +- Inside source: true
    +*** True Line Result
    +    render_board args
    +** Processing line: ~    render_bricks args~
    +- Inside source: true
    +*** True Line Result
    +    render_bricks args
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~  begin :render_methods~
    +- Inside source: true
    +*** True Line Result
    +  begin :render_methods
    +** Processing line: ~    #Method to display the instructions of the game~
    +- Inside source: true
    +*** True Line Result
    +    #Method to display the instructions of the game
    +** Processing line: ~    def render_instructions args~
    +- Inside source: true
    +*** True Line Result
    +    def render_instructions args
    +** Processing line: ~      args.outputs.labels << [225, args.grid.h - 30, "← and → to move the paddle left and right",  0, 1]~
    +- Inside source: true
    +*** True Line Result
    +      args.outputs.labels << [225, args.grid.h - 30, "← and → to move the paddle left and right",  0, 1]
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    def render_board args~
    +- Inside source: true
    +*** True Line Result
    +    def render_board args
    +** Processing line: ~      args.outputs.borders << args.state.game_board~
    +- Inside source: true
    +*** True Line Result
    +      args.outputs.borders << args.state.game_board
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    def render_bricks args~
    +- Inside source: true
    +*** True Line Result
    +    def render_bricks args
    +** Processing line: ~      args.outputs.solids << args.state.bricks.map(&:rect)~
    +- Inside source: true
    +*** True Line Result
    +      args.outputs.solids << args.state.bricks.map(&:rect)
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~  #Calls all methods necessary for performing calculations~
    +- Inside source: true
    +*** True Line Result
    +  #Calls all methods necessary for performing calculations
    +** Processing line: ~  def calc args~
    +- Inside source: true
    +*** True Line Result
    +  def calc args
    +** Processing line: ~    add_new_bricks args~
    +- Inside source: true
    +*** True Line Result
    +    add_new_bricks args
    +** Processing line: ~    reset_game args~
    +- Inside source: true
    +*** True Line Result
    +    reset_game args
    +** Processing line: ~    calc_collision args~
    +- Inside source: true
    +*** True Line Result
    +    calc_collision args
    +** Processing line: ~    win_game args~
    +- Inside source: true
    +*** True Line Result
    +    win_game args
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    args.state.westWall.update args~
    +- Inside source: true
    +*** True Line Result
    +    args.state.westWall.update args
    +** Processing line: ~    args.state.eastWall.update args~
    +- Inside source: true
    +*** True Line Result
    +    args.state.eastWall.update args
    +** Processing line: ~    args.state.southWall.update args~
    +- Inside source: true
    +*** True Line Result
    +    args.state.southWall.update args
    +** Processing line: ~    args.state.northWall.update args~
    +- Inside source: true
    +*** True Line Result
    +    args.state.northWall.update args
    +** Processing line: ~    args.state.paddle.update args~
    +- Inside source: true
    +*** True Line Result
    +    args.state.paddle.update args
    +** Processing line: ~    args.state.ball.update args~
    +- Inside source: true
    +*** True Line Result
    +    args.state.ball.update args
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    #args.state.testWall.update args~
    +- Inside source: true
    +*** True Line Result
    +    #args.state.testWall.update args
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    args.state.paddle.render args~
    +- Inside source: true
    +*** True Line Result
    +    args.state.paddle.render args
    +** Processing line: ~    args.state.ball.render args~
    +- Inside source: true
    +*** True Line Result
    +    args.state.ball.render args
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~  begin :calc_methods~
    +- Inside source: true
    +*** True Line Result
    +  begin :calc_methods
    +** Processing line: ~    def add_new_bricks args~
    +- Inside source: true
    +*** True Line Result
    +    def add_new_bricks args
    +** Processing line: ~      return if args.state.num_bricks > 40~
    +- Inside source: true
    +*** True Line Result
    +      return if args.state.num_bricks > 40
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      #Width of the game board is 640px~
    +- Inside source: true
    +*** True Line Result
    +      #Width of the game board is 640px
    +** Processing line: ~      brick_width = (args.grid.w / 2) / 10~
    +- Inside source: true
    +*** True Line Result
    +      brick_width = (args.grid.w / 2) / 10
    +** Processing line: ~      brick_height = brick_width / 2~
    +- Inside source: true
    +*** True Line Result
    +      brick_height = brick_width / 2
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      (4).map_with_index do |y|~
    +- Inside source: true
    +*** True Line Result
    +      (4).map_with_index do |y|
    +** Processing line: ~        #Make a box that is 10 bricks wide and 4 bricks tall~
    +- Inside source: true
    +*** True Line Result
    +        #Make a box that is 10 bricks wide and 4 bricks tall
    +** Processing line: ~        args.state.bricks += (10).map_with_index do |x|~
    +- Inside source: true
    +*** True Line Result
    +        args.state.bricks += (10).map_with_index do |x|
    +** Processing line: ~          args.state.new_entity(:brick) do |b|~
    +- Inside source: true
    +*** True Line Result
    +          args.state.new_entity(:brick) do |b|
    +** Processing line: ~            b.x = x * brick_width + (args.grid.w / 2 - args.grid.w / 4)~
    +- Inside source: true
    +*** True Line Result
    +            b.x = x * brick_width + (args.grid.w / 2 - args.grid.w / 4)
    +** Processing line: ~            b.y = args.grid.h - ((y + 1) * brick_height)~
    +- Inside source: true
    +*** True Line Result
    +            b.y = args.grid.h - ((y + 1) * brick_height)
    +** Processing line: ~            b.rect = [b.x + 1, b.y - 1, brick_width - 2, brick_height - 2, 235, 50 * y, 52]~
    +- Inside source: true
    +*** True Line Result
    +            b.rect = [b.x + 1, b.y - 1, brick_width - 2, brick_height - 2, 235, 50 * y, 52]
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~            #Add linear colliders to the brick~
    +- Inside source: true
    +*** True Line Result
    +            #Add linear colliders to the brick
    +** Processing line: ~            b.collider_bottom = LinearCollider.new([(b.x-2), (b.y-5)], [(b.x+brick_width+1), (b.y-5)], :pos, brick_height)~
    +- Inside source: true
    +*** True Line Result
    +            b.collider_bottom = LinearCollider.new([(b.x-2), (b.y-5)], [(b.x+brick_width+1), (b.y-5)], :pos, brick_height)
    +** Processing line: ~            b.collider_right = LinearCollider.new([(b.x+brick_width+1), (b.y-5)], [(b.x+brick_width+1), (b.y+brick_height+1)], :pos)~
    +- Inside source: true
    +*** True Line Result
    +            b.collider_right = LinearCollider.new([(b.x+brick_width+1), (b.y-5)], [(b.x+brick_width+1), (b.y+brick_height+1)], :pos)
    +** Processing line: ~            b.collider_left = LinearCollider.new([(b.x-2), (b.y-5)], [(b.x-2), (b.y+brick_height+1)], :neg)~
    +- Inside source: true
    +*** True Line Result
    +            b.collider_left = LinearCollider.new([(b.x-2), (b.y-5)], [(b.x-2), (b.y+brick_height+1)], :neg)
    +** Processing line: ~            b.collider_top = LinearCollider.new([(b.x-2), (b.y+brick_height+1)], [(b.x+brick_width+1), (b.y+brick_height+1)], :neg)~
    +- Inside source: true
    +*** True Line Result
    +            b.collider_top = LinearCollider.new([(b.x-2), (b.y+brick_height+1)], [(b.x+brick_width+1), (b.y+brick_height+1)], :neg)
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~            # @xyCollision  = LinearCollider.new({x: @x,y: @y+@height}, {x: @x+@width, y: @y+@height})~
    +- Inside source: true
    +*** True Line Result
    +            # @xyCollision  = LinearCollider.new({x: @x,y: @y+@height}, {x: @x+@width, y: @y+@height})
    +** Processing line: ~            # @xyCollision2 = LinearCollider.new({x: @x,y: @y}, {x: @x+@width, y: @y}, :pos)~
    +- Inside source: true
    +*** True Line Result
    +            # @xyCollision2 = LinearCollider.new({x: @x,y: @y}, {x: @x+@width, y: @y}, :pos)
    +** Processing line: ~            # @xyCollision3 = LinearCollider.new({x: @x,y: @y}, {x: @x, y: @y+@height})~
    +- Inside source: true
    +*** True Line Result
    +            # @xyCollision3 = LinearCollider.new({x: @x,y: @y}, {x: @x, y: @y+@height})
    +** Processing line: ~            # @xyCollision4 = LinearCollider.new({x: @x+@width,y: @y}, {x: @x+@width, y: @y+@height}, :pos)~
    +- Inside source: true
    +*** True Line Result
    +            # @xyCollision4 = LinearCollider.new({x: @x+@width,y: @y}, {x: @x+@width, y: @y+@height}, :pos)
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~            b.broken = false~
    +- Inside source: true
    +*** True Line Result
    +            b.broken = false
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~            args.state.num_bricks += 1~
    +- Inside source: true
    +*** True Line Result
    +            args.state.num_bricks += 1
    +** Processing line: ~          end~
    +- Inside source: true
    +*** True Line Result
    +          end
    +** Processing line: ~        end~
    +- Inside source: true
    +*** True Line Result
    +        end
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    def reset_game args~
    +- Inside source: true
    +*** True Line Result
    +    def reset_game args
    +** Processing line: ~      if args.state.ball.xy.y < 20 && args.state.game_over_at.elapsed_time > 60~
    +- Inside source: true
    +*** True Line Result
    +      if args.state.ball.xy.y < 20 && args.state.game_over_at.elapsed_time > 60
    +** Processing line: ~        #Freeze the ball~
    +- Inside source: true
    +*** True Line Result
    +        #Freeze the ball
    +** Processing line: ~        args.state.ball.velocity.x = 0~
    +- Inside source: true
    +*** True Line Result
    +        args.state.ball.velocity.x = 0
    +** Processing line: ~        args.state.ball.velocity.y = 0~
    +- Inside source: true
    +*** True Line Result
    +        args.state.ball.velocity.y = 0
    +** Processing line: ~        #Freeze the paddle~
    +- Inside source: true
    +*** True Line Result
    +        #Freeze the paddle
    +** Processing line: ~        args.state.paddle.enabled = false~
    +- Inside source: true
    +*** True Line Result
    +        args.state.paddle.enabled = false
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~        args.state.game_over_at = args.state.tick_count~
    +- Inside source: true
    +*** True Line Result
    +        args.state.game_over_at = args.state.tick_count
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      if args.state.game_over_at.elapsed_time < 60 && args.state.tick_count > 60 && args.state.bricks.count != 0~
    +- Inside source: true
    +*** True Line Result
    +      if args.state.game_over_at.elapsed_time < 60 && args.state.tick_count > 60 && args.state.bricks.count != 0
    +** Processing line: ~        #Display a "Game over" message~
    +- Inside source: true
    +*** True Line Result
    +        #Display a "Game over" message
    +** Processing line: ~        args.outputs.labels << [100, 100, "GAME OVER", 10]~
    +- Inside source: true
    +*** True Line Result
    +        args.outputs.labels << [100, 100, "GAME OVER", 10]
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      #If 60 frames have passed since the game ended, restart the game~
    +- Inside source: true
    +*** True Line Result
    +      #If 60 frames have passed since the game ended, restart the game
    +** Processing line: ~      if args.state.game_over_at != 0 && args.state.game_over_at.elapsed_time == 60~
    +- Inside source: true
    +*** True Line Result
    +      if args.state.game_over_at != 0 && args.state.game_over_at.elapsed_time == 60
    +** Processing line: ~        # FIXME: only put value types in state~
    +- Inside source: true
    +*** True Line Result
    +        # FIXME: only put value types in state
    +** Processing line: ~        args.state.ball = Ball.new~
    +- Inside source: true
    +*** True Line Result
    +        args.state.ball = Ball.new
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~        # FIXME: only put value types in state~
    +- Inside source: true
    +*** True Line Result
    +        # FIXME: only put value types in state
    +** Processing line: ~        args.state.paddle = Paddle.new~
    +- Inside source: true
    +*** True Line Result
    +        args.state.paddle = Paddle.new
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~        args.state.bricks = []~
    +- Inside source: true
    +*** True Line Result
    +        args.state.bricks = []
    +** Processing line: ~        args.state.num_bricks = 0~
    +- Inside source: true
    +*** True Line Result
    +        args.state.num_bricks = 0
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    def calc_collision args~
    +- Inside source: true
    +*** True Line Result
    +    def calc_collision args
    +** Processing line: ~      #Remove the brick if it is hit with the ball~
    +- Inside source: true
    +*** True Line Result
    +      #Remove the brick if it is hit with the ball
    +** Processing line: ~      ball = args.state.ball~
    +- Inside source: true
    +*** True Line Result
    +      ball = args.state.ball
    +** Processing line: ~      ball_rect = [ball.xy.x, ball.xy.y, 20, 20]~
    +- Inside source: true
    +*** True Line Result
    +      ball_rect = [ball.xy.x, ball.xy.y, 20, 20]
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      #Loop through each brick to see if the ball is colliding with it~
    +- Inside source: true
    +*** True Line Result
    +      #Loop through each brick to see if the ball is colliding with it
    +** Processing line: ~      args.state.bricks.each do |b|~
    +- Inside source: true
    +*** True Line Result
    +      args.state.bricks.each do |b|
    +** Processing line: ~        if b.rect.intersect_rect?(ball_rect)~
    +- Inside source: true
    +*** True Line Result
    +        if b.rect.intersect_rect?(ball_rect)
    +** Processing line: ~          #Run the linear collider for the brick if there is a collision~
    +- Inside source: true
    +*** True Line Result
    +          #Run the linear collider for the brick if there is a collision
    +** Processing line: ~          b[:collider_bottom].update args~
    +- Inside source: true
    +*** True Line Result
    +          b[:collider_bottom].update args
    +** Processing line: ~          b[:collider_right].update args~
    +- Inside source: true
    +*** True Line Result
    +          b[:collider_right].update args
    +** Processing line: ~          b[:collider_left].update args~
    +- Inside source: true
    +*** True Line Result
    +          b[:collider_left].update args
    +** Processing line: ~          b[:collider_top].update args~
    +- Inside source: true
    +*** True Line Result
    +          b[:collider_top].update args
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~          b.broken = true~
    +- Inside source: true
    +*** True Line Result
    +          b.broken = true
    +** Processing line: ~        end~
    +- Inside source: true
    +*** True Line Result
    +        end
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      args.state.bricks = args.state.bricks.reject(&:broken)~
    +- Inside source: true
    +*** True Line Result
    +      args.state.bricks = args.state.bricks.reject(&:broken)
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    def win_game args~
    +- Inside source: true
    +*** True Line Result
    +    def win_game args
    +** Processing line: ~      if args.state.bricks.count == 0 && args.state.game_over_at.elapsed_time > 60~
    +- Inside source: true
    +*** True Line Result
    +      if args.state.bricks.count == 0 && args.state.game_over_at.elapsed_time > 60
    +** Processing line: ~        #Freeze the ball~
    +- Inside source: true
    +*** True Line Result
    +        #Freeze the ball
    +** Processing line: ~        args.state.ball.velocity.x = 0~
    +- Inside source: true
    +*** True Line Result
    +        args.state.ball.velocity.x = 0
    +** Processing line: ~        args.state.ball.velocity.y = 0~
    +- Inside source: true
    +*** True Line Result
    +        args.state.ball.velocity.y = 0
    +** Processing line: ~        #Freeze the paddle~
    +- Inside source: true
    +*** True Line Result
    +        #Freeze the paddle
    +** Processing line: ~        args.state.paddle.enabled = false~
    +- Inside source: true
    +*** True Line Result
    +        args.state.paddle.enabled = false
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~        args.state.game_over_at = args.state.tick_count~
    +- Inside source: true
    +*** True Line Result
    +        args.state.game_over_at = args.state.tick_count
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      if args.state.game_over_at.elapsed_time < 60 && args.state.tick_count > 60 && args.state.bricks.count == 0~
    +- Inside source: true
    +*** True Line Result
    +      if args.state.game_over_at.elapsed_time < 60 && args.state.tick_count > 60 && args.state.bricks.count == 0
    +** Processing line: ~        #Display a "Game over" message~
    +- Inside source: true
    +*** True Line Result
    +        #Display a "Game over" message
    +** Processing line: ~        args.outputs.labels << [100, 100, "CONGRATULATIONS!", 10]~
    +- Inside source: true
    +*** True Line Result
    +        args.outputs.labels << [100, 100, "CONGRATULATIONS!", 10]
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~  def tick args~
    +- Inside source: true
    +*** True Line Result
    +  def tick args
    +** Processing line: ~    defaults args~
    +- Inside source: true
    +*** True Line Result
    +    defaults args
    +** Processing line: ~    render args~
    +- Inside source: true
    +*** True Line Result
    +    render args
    +** Processing line: ~    calc args~
    +- Inside source: true
    +*** True Line Result
    +    calc args
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    #args.outputs.lines << [0, 0, args.grid.w, args.grid.h]~
    +- Inside source: true
    +*** True Line Result
    +    #args.outputs.lines << [0, 0, args.grid.w, args.grid.h]
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    #$tc+=1~
    +- Inside source: true
    +*** True Line Result
    +    #$tc+=1
    +** Processing line: ~    #if $tc == 5~
    +- Inside source: true
    +*** True Line Result
    +    #if $tc == 5
    +** Processing line: ~      #$train << [args.state.ball.xy.x, args.state.ball.xy.y]~
    +- Inside source: true
    +*** True Line Result
    +      #$train << [args.state.ball.xy.x, args.state.ball.xy.y]
    +** Processing line: ~      #$tc = 0~
    +- Inside source: true
    +*** True Line Result
    +      #$tc = 0
    +** Processing line: ~    #end~
    +- Inside source: true
    +*** True Line Result
    +    #end
    +** Processing line: ~    #for t in $train~
    +- Inside source: true
    +*** True Line Result
    +    #for t in $train
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      #args.outputs.solids << [t[0],t[1],5,5,255,0,0];~
    +- Inside source: true
    +*** True Line Result
    +      #args.outputs.solids << [t[0],t[1],5,5,255,0,0];
    +** Processing line: ~    #end~
    +- Inside source: true
    +*** True Line Result
    +    #end
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
    +*** True Line Result
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +
    +** Processing line: ~*** Physics And Collisions - Collision With Object Removal - paddle.rb~
    +- Header detected.
    +*** True Line Result
    +
    +*** True Line Result
    +*** Physics And Collisions - Collision With Object Removal - paddle.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/04_physics_and_collisions/10_collision_with_object_removal/app/paddle.rb~
    +- Inside source: true
    +*** True Line Result
    +  # ./samples/04_physics_and_collisions/10_collision_with_object_removal/app/paddle.rb
    +** Processing line: ~  class Paddle~
    +- Inside source: true
    +*** True Line Result
    +  class Paddle
    +** Processing line: ~    attr_accessor :enabled~
    +- Inside source: true
    +*** True Line Result
    +    attr_accessor :enabled
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    def initialize ()~
    +- Inside source: true
    +*** True Line Result
    +    def initialize ()
    +** Processing line: ~      @x=WIDTH/2~
    +- Inside source: true
    +*** True Line Result
    +      @x=WIDTH/2
    +** Processing line: ~      @y=100~
    +- Inside source: true
    +*** True Line Result
    +      @y=100
    +** Processing line: ~      @width=100~
    +- Inside source: true
    +*** True Line Result
    +      @width=100
    +** Processing line: ~      @height=20~
    +- Inside source: true
    +*** True Line Result
    +      @height=20
    +** Processing line: ~      @speed=10~
    +- Inside source: true
    +*** True Line Result
    +      @speed=10
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      @xyCollision  = LinearCollider.new({x: @x,y: @y+@height+5}, {x: @x+@width, y: @y+@height+5})~
    +- Inside source: true
    +*** True Line Result
    +      @xyCollision  = LinearCollider.new({x: @x,y: @y+@height+5}, {x: @x+@width, y: @y+@height+5})
    +** Processing line: ~      @xyCollision2 = LinearCollider.new({x: @x,y: @y}, {x: @x+@width, y: @y}, :pos)~
    +- Inside source: true
    +*** True Line Result
    +      @xyCollision2 = LinearCollider.new({x: @x,y: @y}, {x: @x+@width, y: @y}, :pos)
    +** Processing line: ~      @xyCollision3 = LinearCollider.new({x: @x,y: @y}, {x: @x, y: @y+@height+5})~
    +- Inside source: true
    +*** True Line Result
    +      @xyCollision3 = LinearCollider.new({x: @x,y: @y}, {x: @x, y: @y+@height+5})
    +** Processing line: ~      @xyCollision4 = LinearCollider.new({x: @x+@width,y: @y}, {x: @x+@width, y: @y+@height+5}, :pos)~
    +- Inside source: true
    +*** True Line Result
    +      @xyCollision4 = LinearCollider.new({x: @x+@width,y: @y}, {x: @x+@width, y: @y+@height+5}, :pos)
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      @enabled = true~
    +- Inside source: true
    +*** True Line Result
    +      @enabled = true
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    def update args~
    +- Inside source: true
    +*** True Line Result
    +    def update args
    +** Processing line: ~      @xyCollision.resetPoints({x: @x,y: @y+@height+5}, {x: @x+@width, y: @y+@height+5})~
    +- Inside source: true
    +*** True Line Result
    +      @xyCollision.resetPoints({x: @x,y: @y+@height+5}, {x: @x+@width, y: @y+@height+5})
    +** Processing line: ~      @xyCollision2.resetPoints({x: @x,y: @y}, {x: @x+@width, y: @y})~
    +- Inside source: true
    +*** True Line Result
    +      @xyCollision2.resetPoints({x: @x,y: @y}, {x: @x+@width, y: @y})
    +** Processing line: ~      @xyCollision3.resetPoints({x: @x,y: @y}, {x: @x, y: @y+@height+5})~
    +- Inside source: true
    +*** True Line Result
    +      @xyCollision3.resetPoints({x: @x,y: @y}, {x: @x, y: @y+@height+5})
    +** Processing line: ~      @xyCollision4.resetPoints({x: @x+@width,y: @y}, {x: @x+@width, y: @y+@height+5})~
    +- Inside source: true
    +*** True Line Result
    +      @xyCollision4.resetPoints({x: @x+@width,y: @y}, {x: @x+@width, y: @y+@height+5})
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      @xyCollision.update  args~
    +- Inside source: true
    +*** True Line Result
    +      @xyCollision.update  args
    +** Processing line: ~      @xyCollision2.update args~
    +- Inside source: true
    +*** True Line Result
    +      @xyCollision2.update args
    +** Processing line: ~      @xyCollision3.update args~
    +- Inside source: true
    +*** True Line Result
    +      @xyCollision3.update args
    +** Processing line: ~      @xyCollision4.update args~
    +- Inside source: true
    +*** True Line Result
    +      @xyCollision4.update args
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      args.inputs.keyboard.key_held.left  ||= false~
    +- Inside source: true
    +*** True Line Result
    +      args.inputs.keyboard.key_held.left  ||= false
    +** Processing line: ~      args.inputs.keyboard.key_held.right  ||= false~
    +- Inside source: true
    +*** True Line Result
    +      args.inputs.keyboard.key_held.right  ||= false
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      if not (args.inputs.keyboard.key_held.left == args.inputs.keyboard.key_held.right)~
    +- Inside source: true
    +*** True Line Result
    +      if not (args.inputs.keyboard.key_held.left == args.inputs.keyboard.key_held.right)
    +** Processing line: ~        if args.inputs.keyboard.key_held.left && @enabled~
    +- Inside source: true
    +*** True Line Result
    +        if args.inputs.keyboard.key_held.left && @enabled
    +** Processing line: ~          @x-=@speed~
    +- Inside source: true
    +*** True Line Result
    +          @x-=@speed
    +** Processing line: ~        elsif args.inputs.keyboard.key_held.right && @enabled~
    +- Inside source: true
    +*** True Line Result
    +        elsif args.inputs.keyboard.key_held.right && @enabled
    +** Processing line: ~          @x+=@speed~
    +- Inside source: true
    +*** True Line Result
    +          @x+=@speed
    +** Processing line: ~        end~
    +- Inside source: true
    +*** True Line Result
    +        end
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      xmin =WIDTH/4~
    +- Inside source: true
    +*** True Line Result
    +      xmin =WIDTH/4
    +** Processing line: ~      xmax = 3*(WIDTH/4)~
    +- Inside source: true
    +*** True Line Result
    +      xmax = 3*(WIDTH/4)
    +** Processing line: ~      @x = (@x+@width > xmax) ? xmax-@width : (@x xmax) ? xmax-@width : (@x= 0~
    +** Processing line: ~      # Again, the calculations ensure that the piece is placed in the center of the grid square.~
     - Inside source: true
     *** True Line Result
    -      if rotation >= 0
    -** Processing line: ~        theta = 90 - rotation~
    +      # Again, the calculations ensure that the piece is placed in the center of the grid square.
    +** Processing line: ~      # Remove the '- 20' and the piece will be placed at the top of the grid square instead of the center.~
     - Inside source: true
     *** True Line Result
    -        theta = 90 - rotation
    -** Processing line: ~        #The line doesn't visually line up exactly with the edge of the sprite, so artificially move it a bit~
    +      # Remove the '- 20' and the piece will be placed at the top of the grid square instead of the center.
    +** Processing line: ~      outputs.labels << filled_spaces do |x, y, space| # put label in each filled space of board~
     - Inside source: true
     *** True Line Result
    -        #The line doesn't visually line up exactly with the edge of the sprite, so artificially move it a bit
    -** Processing line: ~        modifier = 5~
    +      outputs.labels << filled_spaces do |x, y, space| # put label in each filled space of board
    +** Processing line: ~            label board_left + x.add(1) * square_size + square_size.fdiv(2),~
     - Inside source: true
     *** True Line Result
    -        modifier = 5
    -** Processing line: ~        x_offset = modifier * Math.cos(theta * DEGREES_TO_RADIANS)~
    +            label board_left + x.add(1) * square_size + square_size.fdiv(2),
    +** Processing line: ~            board_top  + y.add(1) * square_size + square_size - 20,~
     - Inside source: true
     *** True Line Result
    -        x_offset = modifier * Math.cos(theta * DEGREES_TO_RADIANS)
    -** Processing line: ~        y_offset = modifier * Math.sin(theta * DEGREES_TO_RADIANS)~
    +            board_top  + y.add(1) * square_size + square_size - 20,
    +** Processing line: ~            space.piece # text of label, either "x" or "o"~
     - Inside source: true
     *** True Line Result
    -        y_offset = modifier * Math.sin(theta * DEGREES_TO_RADIANS)
    -** Processing line: ~        @x1 = @x - x_offset~
    +            space.piece # text of label, either "x" or "o"
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -        @x1 = @x - x_offset
    -** Processing line: ~        @y1 = @y + y_offset~
    +      end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        @y1 = @y + y_offset
    -** Processing line: ~        @x2 = @x1 + horizontal_offset~
    +
    +** Processing line: ~      # Uses a label to output whether x or o won, or if a draw occurred.~
     - Inside source: true
     *** True Line Result
    -        @x2 = @x1 + horizontal_offset
    -** Processing line: ~        @y2 = @y1 + (vertical_offset * 3)~
    +      # Uses a label to output whether x or o won, or if a draw occurred.
    +** Processing line: ~      # If the game is ongoing, a label shows whose turn it currently is.~
     - Inside source: true
     *** True Line Result
    -        @y2 = @y1 + (vertical_offset * 3)
    -** Processing line: ~~
    +      # If the game is ongoing, a label shows whose turn it currently is.
    +** Processing line: ~      outputs.labels << if state.x_won~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~        @imaginary_line = [ @x1, @y1, @x2, @y2 ]~
    +      outputs.labels << if state.x_won
    +** Processing line: ~                          label grid.w_half, grid.top - 80, "x won" # the '-80' positions the label 80 pixels lower than top~
     - Inside source: true
     *** True Line Result
    -        @imaginary_line = [ @x1, @y1, @x2, @y2 ]
    -** Processing line: ~      else~
    +                          label grid.w_half, grid.top - 80, "x won" # the '-80' positions the label 80 pixels lower than top
    +** Processing line: ~                        elsif state.o_won~
     - Inside source: true
     *** True Line Result
    -      else
    -** Processing line: ~        theta = 90 + rotation~
    +                        elsif state.o_won
    +** Processing line: ~                          label grid.w_half, grid.top - 80, "o won" # grid.w_half positions the label in the center horizontally~
     - Inside source: true
     *** True Line Result
    -        theta = 90 + rotation
    -** Processing line: ~        x_offset = @block_size * Math.cos(theta * DEGREES_TO_RADIANS)~
    +                          label grid.w_half, grid.top - 80, "o won" # grid.w_half positions the label in the center horizontally
    +** Processing line: ~                        elsif state.draw~
     - Inside source: true
     *** True Line Result
    -        x_offset = @block_size * Math.cos(theta * DEGREES_TO_RADIANS)
    -** Processing line: ~        y_offset = @block_size * Math.sin(theta * DEGREES_TO_RADIANS)~
    +                        elsif state.draw
    +** Processing line: ~                          label grid.w_half, grid.top - 80, "a draw"~
     - Inside source: true
     *** True Line Result
    -        y_offset = @block_size * Math.sin(theta * DEGREES_TO_RADIANS)
    -** Processing line: ~        @x1 = @x + x_offset~
    +                          label grid.w_half, grid.top - 80, "a draw"
    +** Processing line: ~                        else # if no one won and the game is ongoing~
     - Inside source: true
     *** True Line Result
    -        @x1 = @x + x_offset
    -** Processing line: ~        @y1 = @y + y_offset + 19~
    +                        else # if no one won and the game is ongoing
    +** Processing line: ~                          label grid.w_half, grid.top - 80, "turn: #{state.current_turn}"~
     - Inside source: true
     *** True Line Result
    -        @y1 = @y + y_offset + 19
    -** Processing line: ~        @x2 = @x1 + horizontal_offset~
    +                          label grid.w_half, grid.top - 80, "turn: #{state.current_turn}"
    +** Processing line: ~                        end~
     - Inside source: true
     *** True Line Result
    -        @x2 = @x1 + horizontal_offset
    -** Processing line: ~        @y2 = @y1 + (vertical_offset * 3)~
    +                        end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -        @y2 = @y1 + (vertical_offset * 3)
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~        @imaginary_line = [ @x1, @y1, @x2, @y2 ]~
    +** Processing line: ~    # Calls the methods responsible for handling user input and determining the winner.~
     - Inside source: true
     *** True Line Result
    -        @imaginary_line = [ @x1, @y1, @x2, @y2 ]
    -** Processing line: ~      end~
    +    # Calls the methods responsible for handling user input and determining the winner.
    +** Processing line: ~    # Does nothing unless the mouse is clicked.~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +    # Does nothing unless the mouse is clicked.
    +** Processing line: ~    def input_board~
     - Inside source: true
     *** True Line Result
    -
    +    def input_board
    +** Processing line: ~      return unless inputs.mouse.click~
    +- Inside source: true
    +*** True Line Result
    +      return unless inputs.mouse.click
    +** Processing line: ~      input_place_piece~
    +- Inside source: true
    +*** True Line Result
    +      input_place_piece
    +** Processing line: ~      input_restart_game~
    +- Inside source: true
    +*** True Line Result
    +      input_restart_game
    +** Processing line: ~      determine_winner~
    +- Inside source: true
    +*** True Line Result
    +      determine_winner
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -30312,54 +38243,74 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def draw args~
    +** Processing line: ~    # Handles user input for placing pieces on the board.~
     - Inside source: true
     *** True Line Result
    -    def draw args
    -** Processing line: ~      args.outputs.sprites << [~
    +    # Handles user input for placing pieces on the board.
    +** Processing line: ~    def input_place_piece~
     - Inside source: true
     *** True Line Result
    -      args.outputs.sprites << [
    -** Processing line: ~        @x,~
    +    def input_place_piece
    +** Processing line: ~      return if state.game_over~
     - Inside source: true
     *** True Line Result
    -        @x,
    -** Processing line: ~        @y,~
    +      return if state.game_over
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        @y,
    -** Processing line: ~        @block_size*3,~
    +
    +** Processing line: ~      # Checks to find the space that the mouse was clicked inside of, and makes sure the space does not already~
     - Inside source: true
     *** True Line Result
    -        @block_size*3,
    -** Processing line: ~        @block_size,~
    +      # Checks to find the space that the mouse was clicked inside of, and makes sure the space does not already
    +** Processing line: ~      # have a piece in it.~
     - Inside source: true
     *** True Line Result
    -        @block_size,
    -** Processing line: ~        "sprites/square-green.png",~
    +      # have a piece in it.
    +** Processing line: ~      __, __, space = all_spaces.find do |__, __, space|~
     - Inside source: true
     *** True Line Result
    -        "sprites/square-green.png",
    -** Processing line: ~        @rotation~
    +      __, __, space = all_spaces.find do |__, __, space|
    +** Processing line: ~        inputs.mouse.click.point.inside_rect?(space.border) && !space.piece~
     - Inside source: true
     *** True Line Result
    -        @rotation
    -** Processing line: ~      ]~
    +        inputs.mouse.click.point.inside_rect?(space.border) && !space.piece
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -      ]
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      args.outputs.lines << @imaginary_line~
    +** Processing line: ~      # The piece that goes into the space belongs to the player whose turn it currently is.~
     - Inside source: true
     *** True Line Result
    -      args.outputs.lines << @imaginary_line
    -** Processing line: ~      args.outputs.solids << @debug_shape~
    +      # The piece that goes into the space belongs to the player whose turn it currently is.
    +** Processing line: ~      return unless space~
     - Inside source: true
     *** True Line Result
    -      args.outputs.solids << @debug_shape
    +      return unless space
    +** Processing line: ~      space.piece = state.current_turn~
    +- Inside source: true
    +*** True Line Result
    +      space.piece = state.current_turn
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      # This ternary operator statement allows us to change the current player's turn.~
    +- Inside source: true
    +*** True Line Result
    +      # This ternary operator statement allows us to change the current player's turn.
    +** Processing line: ~      # If it is currently x's turn, it becomes o's turn. If it is not x's turn, it become's x's turn.~
    +- Inside source: true
    +*** True Line Result
    +      # If it is currently x's turn, it becomes o's turn. If it is not x's turn, it become's x's turn.
    +** Processing line: ~      state.current_turn = state.current_turn == :x ? :o : :x~
    +- Inside source: true
    +*** True Line Result
    +      state.current_turn = state.current_turn == :x ? :o : :x
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -30368,10 +38319,22 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def multiply_matricies~
    +** Processing line: ~    # Resets the game.~
     - Inside source: true
     *** True Line Result
    -    def multiply_matricies
    +    # Resets the game.
    +** Processing line: ~    def input_restart_game~
    +- Inside source: true
    +*** True Line Result
    +    def input_restart_game
    +** Processing line: ~      return unless state.game_over~
    +- Inside source: true
    +*** True Line Result
    +      return unless state.game_over
    +** Processing line: ~      gtk.reset~
    +- Inside source: true
    +*** True Line Result
    +      gtk.reset
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -30380,22 +38343,38 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def calc args~
    +** Processing line: ~    # Checks if x or o won the game.~
     - Inside source: true
     *** True Line Result
    -    def calc args
    -** Processing line: ~      if collision? args~
    +    # Checks if x or o won the game.
    +** Processing line: ~    # If neither player wins and all nine squares are filled, a draw happens.~
     - Inside source: true
     *** True Line Result
    -      if collision? args
    -** Processing line: ~          collide args~
    +    # If neither player wins and all nine squares are filled, a draw happens.
    +** Processing line: ~    # Once a player is chosen as the winner or a draw happens, the game is over.~
     - Inside source: true
     *** True Line Result
    -          collide args
    -** Processing line: ~      end~
    +    # Once a player is chosen as the winner or a draw happens, the game is over.
    +** Processing line: ~    def determine_winner~
     - Inside source: true
     *** True Line Result
    -      end
    +    def determine_winner
    +** Processing line: ~      state.x_won = won? :x # evaluates to either true or false (boolean values)~
    +- Inside source: true
    +*** True Line Result
    +      state.x_won = won? :x # evaluates to either true or false (boolean values)
    +** Processing line: ~      state.o_won = won? :o~
    +- Inside source: true
    +*** True Line Result
    +      state.o_won = won? :o
    +** Processing line: ~      state.draw = true if filled_spaces.length == 9 && !state.x_won && !state.o_won~
    +- Inside source: true
    +*** True Line Result
    +      state.draw = true if filled_spaces.length == 9 && !state.x_won && !state.o_won
    +** Processing line: ~      state.game_over = state.x_won || state.o_won || state.draw~
    +- Inside source: true
    +*** True Line Result
    +      state.game_over = state.x_won || state.o_won || state.draw
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -30404,134 +38383,262 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    #Determine if the ball and block are touching~
    +** Processing line: ~    # Determines if a player won by checking if there is a horizontal match or vertical match.~
     - Inside source: true
     *** True Line Result
    -    #Determine if the ball and block are touching
    -** Processing line: ~    def collision? args~
    +    # Determines if a player won by checking if there is a horizontal match or vertical match.
    +** Processing line: ~    # Horizontal_match and vertical_match have boolean values. If either is true, the game has been won.~
     - Inside source: true
     *** True Line Result
    -    def collision? args
    -** Processing line: ~      #The minimum area enclosed by the center of the ball and the 2 corners of the block~
    +    # Horizontal_match and vertical_match have boolean values. If either is true, the game has been won.
    +** Processing line: ~    def won? piece~
     - Inside source: true
     *** True Line Result
    -      #The minimum area enclosed by the center of the ball and the 2 corners of the block
    -** Processing line: ~      #If the area ever drops below this value, we know there is a collision~
    +    def won? piece
    +** Processing line: ~      # performs action on all space combinations~
     - Inside source: true
     *** True Line Result
    -      #If the area ever drops below this value, we know there is a collision
    -** Processing line: ~      min_area = ((@block_size * 3) * args.state.ball.radius) / 2~
    +      # performs action on all space combinations
    +** Processing line: ~      won = [[-1, 0, 1]].product([-1, 0, 1]).map do |xs, y|~
     - Inside source: true
     *** True Line Result
    -      min_area = ((@block_size * 3) * args.state.ball.radius) / 2
    +      won = [[-1, 0, 1]].product([-1, 0, 1]).map do |xs, y|
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      #https://www.mathopenref.com/coordtrianglearea.html~
    +** Processing line: ~        # Checks if the 3 grid spaces with the same y value (or same row) and~
     - Inside source: true
     *** True Line Result
    -      #https://www.mathopenref.com/coordtrianglearea.html
    -** Processing line: ~      ax = @x1~
    +        # Checks if the 3 grid spaces with the same y value (or same row) and
    +** Processing line: ~        # x values that are next to each other have pieces that belong to the same player.~
     - Inside source: true
     *** True Line Result
    -      ax = @x1
    -** Processing line: ~      ay = @y1~
    +        # x values that are next to each other have pieces that belong to the same player.
    +** Processing line: ~        # Remember, the value of piece is equal to the current turn (which is the player).~
     - Inside source: true
     *** True Line Result
    -      ay = @y1
    -** Processing line: ~      bx = @x2~
    +        # Remember, the value of piece is equal to the current turn (which is the player).
    +** Processing line: ~        horizontal_match = state.spaces[xs[0]][y].piece == piece &&~
     - Inside source: true
     *** True Line Result
    -      bx = @x2
    -** Processing line: ~      by = @y2~
    +        horizontal_match = state.spaces[xs[0]][y].piece == piece &&
    +** Processing line: ~                           state.spaces[xs[1]][y].piece == piece &&~
     - Inside source: true
     *** True Line Result
    -      by = @y2
    -** Processing line: ~      cx = args.state.ball.center.x~
    +                           state.spaces[xs[1]][y].piece == piece &&
    +** Processing line: ~                           state.spaces[xs[2]][y].piece == piece~
     - Inside source: true
     *** True Line Result
    -      cx = args.state.ball.center.x
    -** Processing line: ~      cy = args.state.ball.center.y~
    +                           state.spaces[xs[2]][y].piece == piece
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      cy = args.state.ball.center.y
    +
    +** Processing line: ~        # Checks if the 3 grid spaces with the same x value (or same column) and~
    +- Inside source: true
    +*** True Line Result
    +        # Checks if the 3 grid spaces with the same x value (or same column) and
    +** Processing line: ~        # y values that are next to each other have pieces that belong to the same player.~
    +- Inside source: true
    +*** True Line Result
    +        # y values that are next to each other have pieces that belong to the same player.
    +** Processing line: ~        # The && represents an "and" statement: if even one part of the statement is false,~
    +- Inside source: true
    +*** True Line Result
    +        # The && represents an "and" statement: if even one part of the statement is false,
    +** Processing line: ~        # the entire statement evaluates to false.~
    +- Inside source: true
    +*** True Line Result
    +        # the entire statement evaluates to false.
    +** Processing line: ~        vertical_match = state.spaces[y][xs[0]].piece == piece &&~
    +- Inside source: true
    +*** True Line Result
    +        vertical_match = state.spaces[y][xs[0]].piece == piece &&
    +** Processing line: ~                         state.spaces[y][xs[1]].piece == piece &&~
    +- Inside source: true
    +*** True Line Result
    +                         state.spaces[y][xs[1]].piece == piece &&
    +** Processing line: ~                         state.spaces[y][xs[2]].piece == piece~
    +- Inside source: true
    +*** True Line Result
    +                         state.spaces[y][xs[2]].piece == piece
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      current_area = (ax*(by-cy)+bx*(cy-ay)+cx*(ay-by))/2~
    +** Processing line: ~        horizontal_match || vertical_match # if either is true, true is returned~
     - Inside source: true
     *** True Line Result
    -      current_area = (ax*(by-cy)+bx*(cy-ay)+cx*(ay-by))/2
    +        horizontal_match || vertical_match # if either is true, true is returned
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      collision = false~
    +** Processing line: ~      # Sees if there is a diagonal match, starting from the bottom left and ending at the top right.~
     - Inside source: true
     *** True Line Result
    -      collision = false
    -** Processing line: ~      if @rotation >= 0~
    +      # Sees if there is a diagonal match, starting from the bottom left and ending at the top right.
    +** Processing line: ~      # Is added to won regardless of whether the statement is true or false.~
     - Inside source: true
     *** True Line Result
    -      if @rotation >= 0
    -** Processing line: ~        if (current_area < min_area &&~
    +      # Is added to won regardless of whether the statement is true or false.
    +** Processing line: ~      won << (state.spaces[-1][-1].piece == piece && # bottom left~
     - Inside source: true
     *** True Line Result
    -        if (current_area < min_area &&
    -** Processing line: ~          current_area > 0 &&~
    +      won << (state.spaces[-1][-1].piece == piece && # bottom left
    +** Processing line: ~              state.spaces[ 0][ 0].piece == piece && # center~
     - Inside source: true
     *** True Line Result
    -          current_area > 0 &&
    -** Processing line: ~          args.state.ball.center.y > @y1 &&~
    +              state.spaces[ 0][ 0].piece == piece && # center
    +** Processing line: ~              state.spaces[ 1][ 1].piece == piece)   # top right~
     - Inside source: true
     *** True Line Result
    -          args.state.ball.center.y > @y1 &&
    -** Processing line: ~          args.state.ball.center.x < @x2)~
    +              state.spaces[ 1][ 1].piece == piece)   # top right
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          args.state.ball.center.x < @x2)
    +
    +** Processing line: ~      # Sees if there is a diagonal match, starting at the bottom right and ending at the top left~
    +- Inside source: true
    +*** True Line Result
    +      # Sees if there is a diagonal match, starting at the bottom right and ending at the top left
    +** Processing line: ~      # and is added to won.~
    +- Inside source: true
    +*** True Line Result
    +      # and is added to won.
    +** Processing line: ~      won << (state.spaces[ 1][-1].piece == piece && # bottom right~
    +- Inside source: true
    +*** True Line Result
    +      won << (state.spaces[ 1][-1].piece == piece && # bottom right
    +** Processing line: ~              state.spaces[ 0][ 0].piece == piece && # center~
    +- Inside source: true
    +*** True Line Result
    +              state.spaces[ 0][ 0].piece == piece && # center
    +** Processing line: ~              state.spaces[-1][ 1].piece == piece)   # top left~
    +- Inside source: true
    +*** True Line Result
    +              state.spaces[-1][ 1].piece == piece)   # top left
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~          collision = true~
    +** Processing line: ~      # Any false statements (meaning false diagonal matches) are rejected from won~
     - Inside source: true
     *** True Line Result
    -          collision = true
    -** Processing line: ~        end~
    +      # Any false statements (meaning false diagonal matches) are rejected from won
    +** Processing line: ~      won.reject_false.any?~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~      else~
    +      won.reject_false.any?
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      else
    -** Processing line: ~        if (current_area < min_area &&~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        if (current_area < min_area &&
    -** Processing line: ~          current_area > 0 &&~
    +
    +** Processing line: ~    # Defines filled spaces on the board by rejecting all spaces that do not have game pieces in them.~
     - Inside source: true
     *** True Line Result
    -          current_area > 0 &&
    -** Processing line: ~          args.state.ball.center.y > @y2 &&~
    +    # Defines filled spaces on the board by rejecting all spaces that do not have game pieces in them.
    +** Processing line: ~    # The ! before a statement means "not". For example, we are rejecting any space combinations that do~
     - Inside source: true
     *** True Line Result
    -          args.state.ball.center.y > @y2 &&
    -** Processing line: ~          args.state.ball.center.x > @x1)~
    +    # The ! before a statement means "not". For example, we are rejecting any space combinations that do
    +** Processing line: ~    # NOT have pieces in them.~
     - Inside source: true
     *** True Line Result
    -          args.state.ball.center.x > @x1)
    +    # NOT have pieces in them.
    +** Processing line: ~    def filled_spaces~
    +- Inside source: true
    +*** True Line Result
    +    def filled_spaces
    +** Processing line: ~      state.space_combinations~
    +- Inside source: true
    +*** True Line Result
    +      state.space_combinations
    +** Processing line: ~        .reject { |x, y| !state.spaces[x][y].piece } # reject spaces with no pieces in them~
    +- Inside source: true
    +*** True Line Result
    +        .reject { |x, y| !state.spaces[x][y].piece } # reject spaces with no pieces in them
    +** Processing line: ~        .map do |x, y|~
    +- Inside source: true
    +*** True Line Result
    +        .map do |x, y|
    +** Processing line: ~          if block_given?~
    +- Inside source: true
    +*** True Line Result
    +          if block_given?
    +** Processing line: ~            yield x, y, state.spaces[x][y]~
    +- Inside source: true
    +*** True Line Result
    +            yield x, y, state.spaces[x][y]
    +** Processing line: ~          else~
    +- Inside source: true
    +*** True Line Result
    +          else
    +** Processing line: ~            [x, y, state.spaces[x][y]] # sets definition of space~
    +- Inside source: true
    +*** True Line Result
    +            [x, y, state.spaces[x][y]] # sets definition of space
    +** Processing line: ~          end~
    +- Inside source: true
    +*** True Line Result
    +          end
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~        collision = true~
    +** Processing line: ~    # Defines all spaces on the board.~
     - Inside source: true
     *** True Line Result
    -        collision = true
    +    # Defines all spaces on the board.
    +** Processing line: ~    def all_spaces~
    +- Inside source: true
    +*** True Line Result
    +    def all_spaces
    +** Processing line: ~      if !block_given?~
    +- Inside source: true
    +*** True Line Result
    +      if !block_given?
    +** Processing line: ~        state.space_combinations.map do |x, y|~
    +- Inside source: true
    +*** True Line Result
    +        state.space_combinations.map do |x, y|
    +** Processing line: ~          [x, y, state.spaces[x][y]] # sets definition of space~
    +- Inside source: true
    +*** True Line Result
    +          [x, y, state.spaces[x][y]] # sets definition of space
    +** Processing line: ~        end~
    +- Inside source: true
    +*** True Line Result
    +        end
    +** Processing line: ~      else # if a block is given (block_given? is true)~
    +- Inside source: true
    +*** True Line Result
    +      else # if a block is given (block_given? is true)
    +** Processing line: ~        state.space_combinations.map do |x, y|~
    +- Inside source: true
    +*** True Line Result
    +        state.space_combinations.map do |x, y|
    +** Processing line: ~          yield x, y, state.spaces[x][y] # yield if a block is given~
    +- Inside source: true
    +*** True Line Result
    +          yield x, y, state.spaces[x][y] # yield if a block is given
     ** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    @@ -30540,570 +38647,702 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
           end
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      return collision~
    +** Processing line: ~    # Sets values for a label, such as the position, value, size, alignment, and color.~
     - Inside source: true
     *** True Line Result
    -      return collision
    +    # Sets values for a label, such as the position, value, size, alignment, and color.
    +** Processing line: ~    def label x, y, value~
    +- Inside source: true
    +*** True Line Result
    +    def label x, y, value
    +** Processing line: ~      [x, y + 10, value, 20, 1, 0, 0, 0]~
    +- Inside source: true
    +*** True Line Result
    +      [x, y + 10, value, 20, 1, 0, 0, 0]
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
         end
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def collide args~
    +** Processing line: ~  $tic_tac_toe = TicTacToe.new~
     - Inside source: true
     *** True Line Result
    -    def collide args
    -** Processing line: ~      #Slope of the block~
    +  $tic_tac_toe = TicTacToe.new
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      #Slope of the block
    -** Processing line: ~      slope = (@y2 - @y1) / (@x2 - @x1)~
    +
    +** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
    -      slope = (@y2 - @y1) / (@x2 - @x1)
    +  def tick args
    +** Processing line: ~    $tic_tac_toe._       = args~
    +- Inside source: true
    +*** True Line Result
    +    $tic_tac_toe._       = args
    +** Processing line: ~    $tic_tac_toe.state   = args.state~
    +- Inside source: true
    +*** True Line Result
    +    $tic_tac_toe.state   = args.state
    +** Processing line: ~    $tic_tac_toe.outputs = args.outputs~
    +- Inside source: true
    +*** True Line Result
    +    $tic_tac_toe.outputs = args.outputs
    +** Processing line: ~    $tic_tac_toe.inputs  = args.inputs~
    +- Inside source: true
    +*** True Line Result
    +    $tic_tac_toe.inputs  = args.inputs
    +** Processing line: ~    $tic_tac_toe.grid    = args.grid~
    +- Inside source: true
    +*** True Line Result
    +    $tic_tac_toe.grid    = args.grid
    +** Processing line: ~    $tic_tac_toe.gtk     = args.gtk~
    +- Inside source: true
    +*** True Line Result
    +    $tic_tac_toe.gtk     = args.gtk
    +** Processing line: ~    $tic_tac_toe.tick~
    +- Inside source: true
    +*** True Line Result
    +    $tic_tac_toe.tick
    +** Processing line: ~    tick_instructions args, "Sample app shows how to work with mouse clicks."~
    +- Inside source: true
    +*** True Line Result
    +    tick_instructions args, "Sample app shows how to work with mouse clicks."
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      #Create a unit vector and tilt it (@rotation) number of degrees~
    +** Processing line: ~  def tick_instructions args, text, y = 715~
     - Inside source: true
     *** True Line Result
    -      #Create a unit vector and tilt it (@rotation) number of degrees
    -** Processing line: ~      x = -Math.cos(@rotation * DEGREES_TO_RADIANS)~
    +  def tick_instructions args, text, y = 715
    +** Processing line: ~    return if args.state.key_event_occurred~
     - Inside source: true
     *** True Line Result
    -      x = -Math.cos(@rotation * DEGREES_TO_RADIANS)
    -** Processing line: ~      y = Math.sin(@rotation * DEGREES_TO_RADIANS)~
    +    return if args.state.key_event_occurred
    +** Processing line: ~    if args.inputs.mouse.click ||~
     - Inside source: true
     *** True Line Result
    -      y = Math.sin(@rotation * DEGREES_TO_RADIANS)
    +    if args.inputs.mouse.click ||
    +** Processing line: ~       args.inputs.keyboard.directional_vector ||~
    +- Inside source: true
    +*** True Line Result
    +       args.inputs.keyboard.directional_vector ||
    +** Processing line: ~       args.inputs.keyboard.key_down.enter ||~
    +- Inside source: true
    +*** True Line Result
    +       args.inputs.keyboard.key_down.enter ||
    +** Processing line: ~       args.inputs.keyboard.key_down.escape~
    +- Inside source: true
    +*** True Line Result
    +       args.inputs.keyboard.key_down.escape
    +** Processing line: ~      args.state.key_event_occurred = true~
    +- Inside source: true
    +*** True Line Result
    +      args.state.key_event_occurred = true
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      #Find the vector that is perpendicular to the slope~
    +** Processing line: ~    args.outputs.debug << [0, y - 50, 1280, 60].solid~
     - Inside source: true
     *** True Line Result
    -      #Find the vector that is perpendicular to the slope
    -** Processing line: ~      perpVect = { x: x, y: y }~
    +    args.outputs.debug << [0, y - 50, 1280, 60].solid
    +** Processing line: ~    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label~
     - Inside source: true
     *** True Line Result
    -      perpVect = { x: x, y: y }
    -** Processing line: ~      mag  = (perpVect.x**2 + perpVect.y**2)**0.5                                 # find the magniude of the perpVect~
    +    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label
    +** Processing line: ~    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label~
     - Inside source: true
     *** True Line Result
    -      mag  = (perpVect.x**2 + perpVect.y**2)**0.5                                 # find the magniude of the perpVect
    -** Processing line: ~      perpVect = {x: perpVect.x/(mag), y: perpVect.y/(mag)}                       # divide the perpVect by the magniude to make it a unit vector~
    +    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -      perpVect = {x: perpVect.x/(mag), y: perpVect.y/(mag)}                       # divide the perpVect by the magniude to make it a unit vector
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      previousPosition = {                                                        # calculate an ESTIMATE of the previousPosition of the ball~
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
    +*** True Line Result
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +
    +** Processing line: ~*** Mouse - Mouse Move - main.rb~
    +- Header detected.
    +*** True Line Result
    +
    +*** True Line Result
    +*** Mouse - Mouse Move - main.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/05_mouse/02_mouse_move/app/main.rb~
     - Inside source: true
     *** True Line Result
    -      previousPosition = {                                                        # calculate an ESTIMATE of the previousPosition of the ball
    -** Processing line: ~        x:args.state.ball.center.x-args.state.ball.velocity.x,~
    +  # ./samples/05_mouse/02_mouse_move/app/main.rb
    +** Processing line: ~  =begin~
     - Inside source: true
     *** True Line Result
    -        x:args.state.ball.center.x-args.state.ball.velocity.x,
    -** Processing line: ~        y:args.state.ball.center.y-args.state.ball.velocity.y~
    +  =begin
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        y:args.state.ball.center.y-args.state.ball.velocity.y
    -** Processing line: ~      }~
    +
    +** Processing line: ~   Reminders:~
     - Inside source: true
     *** True Line Result
    -      }
    +   Reminders:
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      velocityMag = (args.state.ball.velocity.x**2 + args.state.ball.velocity.y**2)**0.5 # the current velocity magnitude of the ball~
    +** Processing line: ~   - num1.greater(num2): Returns the greater value.~
     - Inside source: true
     *** True Line Result
    -      velocityMag = (args.state.ball.velocity.x**2 + args.state.ball.velocity.y**2)**0.5 # the current velocity magnitude of the ball
    -** Processing line: ~      theta_ball = Math.atan2(args.state.ball.velocity.y, args.state.ball.velocity.x)         #the angle of the ball's velocity~
    +   - num1.greater(num2): Returns the greater value.
    +** Processing line: ~     For example, if we have the command~
     - Inside source: true
     *** True Line Result
    -      theta_ball = Math.atan2(args.state.ball.velocity.y, args.state.ball.velocity.x)         #the angle of the ball's velocity
    -** Processing line: ~      theta_repel = (180 * DEGREES_TO_RADIANS) - theta_ball + (@rotation * DEGREES_TO_RADIANS)~
    +     For example, if we have the command
    +** Processing line: ~     puts 4.greater(3)~
     - Inside source: true
     *** True Line Result
    -      theta_repel = (180 * DEGREES_TO_RADIANS) - theta_ball + (@rotation * DEGREES_TO_RADIANS)
    +     puts 4.greater(3)
    +** Processing line: ~     the number 4 would be printed to the console since it has a greater value than 3.~
    +- Inside source: true
    +*** True Line Result
    +     the number 4 would be printed to the console since it has a greater value than 3.
    +** Processing line: ~     Similar to lesser, which returns the lesser value.~
    +- Inside source: true
    +*** True Line Result
    +     Similar to lesser, which returns the lesser value.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      fbx = velocityMag * Math.cos(theta_ball)                                    #the x component of the ball's velocity~
    +** Processing line: ~   - find_all: Finds all elements of a collection that meet certain requirements.~
     - Inside source: true
     *** True Line Result
    -      fbx = velocityMag * Math.cos(theta_ball)                                    #the x component of the ball's velocity
    -** Processing line: ~      fby = velocityMag * Math.sin(theta_ball)                                    #the y component of the ball's velocity~
    +   - find_all: Finds all elements of a collection that meet certain requirements.
    +** Processing line: ~     For example, in this sample app, we're using find_all to find all zombies that have intersected~
     - Inside source: true
     *** True Line Result
    -      fby = velocityMag * Math.sin(theta_ball)                                    #the y component of the ball's velocity
    +     For example, in this sample app, we're using find_all to find all zombies that have intersected
    +** Processing line: ~     or hit the player's sprite since these zombies have been killed.~
    +- Inside source: true
    +*** True Line Result
    +     or hit the player's sprite since these zombies have been killed.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      frx = velocityMag * Math.cos(theta_repel)                                       #the x component of the repel's velocity | magnitude is set to twice of fbx~
    +** Processing line: ~   - args.inputs.keyboard.key_down.KEY: Determines if a key is being held or pressed.~
     - Inside source: true
     *** True Line Result
    -      frx = velocityMag * Math.cos(theta_repel)                                       #the x component of the repel's velocity | magnitude is set to twice of fbx
    -** Processing line: ~      fry = velocityMag * Math.sin(theta_repel)                                       #the y component of the repel's velocity | magnitude is set to twice of fby~
    +   - args.inputs.keyboard.key_down.KEY: Determines if a key is being held or pressed.
    +** Processing line: ~     Stores the frame the "down" event occurred.~
     - Inside source: true
     *** True Line Result
    -      fry = velocityMag * Math.sin(theta_repel)                                       #the y component of the repel's velocity | magnitude is set to twice of fby
    +     Stores the frame the "down" event occurred.
    +** Processing line: ~     For more information about the keyboard, go to mygame/documentation/06-keyboard.md.~
    +- Inside source: true
    +*** True Line Result
    +     For more information about the keyboard, go to mygame/documentation/06-keyboard.md.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      args.state.display_value = velocityMag~
    +** Processing line: ~   - args.outputs.sprites: An array. The values generate a sprite.~
     - Inside source: true
     *** True Line Result
    -      args.state.display_value = velocityMag
    -** Processing line: ~      fsumx = fbx+frx                                                             #sum of x forces~
    +   - args.outputs.sprites: An array. The values generate a sprite.
    +** Processing line: ~     The parameters are [X, Y, WIDTH, HEIGHT, PATH, ANGLE, ALPHA, RED, GREEN, BLUE]~
     - Inside source: true
     *** True Line Result
    -      fsumx = fbx+frx                                                             #sum of x forces
    -** Processing line: ~      fsumy = fby+fry                                                             #sum of y forces~
    +     The parameters are [X, Y, WIDTH, HEIGHT, PATH, ANGLE, ALPHA, RED, GREEN, BLUE]
    +** Processing line: ~     For more information about sprites, go to mygame/documentation/05-sprites.md.~
     - Inside source: true
     *** True Line Result
    -      fsumy = fby+fry                                                             #sum of y forces
    -** Processing line: ~      fr = velocityMag                                                            #fr is the resulting magnitude~
    +     For more information about sprites, go to mygame/documentation/05-sprites.md.
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      fr = velocityMag                                                            #fr is the resulting magnitude
    -** Processing line: ~      thetaNew = Math.atan2(fsumy, fsumx)                                         #thetaNew is the resulting angle~
    +
    +** Processing line: ~   - args.state.new_entity: Used when we want to create a new object, like a sprite or button.~
     - Inside source: true
     *** True Line Result
    -      thetaNew = Math.atan2(fsumy, fsumx)                                         #thetaNew is the resulting angle
    +   - args.state.new_entity: Used when we want to create a new object, like a sprite or button.
    +** Processing line: ~     When we want to create a new object, we can declare it as a new entity and then define~
    +- Inside source: true
    +*** True Line Result
    +     When we want to create a new object, we can declare it as a new entity and then define
    +** Processing line: ~     its properties. (Remember, you can use state to define ANY property and it will~
    +- Inside source: true
    +*** True Line Result
    +     its properties. (Remember, you can use state to define ANY property and it will
    +** Processing line: ~     be retained across frames.)~
    +- Inside source: true
    +*** True Line Result
    +     be retained across frames.)
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      xnew = fr*Math.cos(thetaNew)                                                #resulting x velocity~
    +** Processing line: ~   - String interpolation: Uses #{} syntax; everything between the #{ and the } is evaluated~
     - Inside source: true
     *** True Line Result
    -      xnew = fr*Math.cos(thetaNew)                                                #resulting x velocity
    -** Processing line: ~      ynew = fr*Math.sin(thetaNew)                                                #resulting y velocity~
    +   - String interpolation: Uses #{} syntax; everything between the #{ and the } is evaluated
    +** Processing line: ~     as Ruby code, and the placeholder is replaced with its corresponding value or result.~
     - Inside source: true
     *** True Line Result
    -      ynew = fr*Math.sin(thetaNew)                                                #resulting y velocity
    +     as Ruby code, and the placeholder is replaced with its corresponding value or result.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      dampener = 0.3~
    +** Processing line: ~   - map: Ruby method used to transform data; used in arrays, hashes, and collections.~
     - Inside source: true
     *** True Line Result
    -      dampener = 0.3
    -** Processing line: ~      ynew *= dampener * 0.5~
    +   - map: Ruby method used to transform data; used in arrays, hashes, and collections.
    +** Processing line: ~     Can be used to perform an action on every element of a collection, such as multiplying~
     - Inside source: true
     *** True Line Result
    -      ynew *= dampener * 0.5
    +     Can be used to perform an action on every element of a collection, such as multiplying
    +** Processing line: ~     each element by 2 or declaring every element as a new entity.~
    +- Inside source: true
    +*** True Line Result
    +     each element by 2 or declaring every element as a new entity.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      #If the bounce is very low, that means the ball is rolling and we don't want to dampenen the X velocity~
    +** Processing line: ~   - sample: Chooses a random element from the array.~
     - Inside source: true
     *** True Line Result
    -      #If the bounce is very low, that means the ball is rolling and we don't want to dampenen the X velocity
    -** Processing line: ~      if ynew > -0.1~
    +   - sample: Chooses a random element from the array.
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      if ynew > -0.1
    -** Processing line: ~        xnew *= dampener~
    +
    +** Processing line: ~   - reject: Removes elements that meet certain requirements.~
     - Inside source: true
     *** True Line Result
    -        xnew *= dampener
    -** Processing line: ~      end~
    +   - reject: Removes elements that meet certain requirements.
    +** Processing line: ~     In this sample app, we're removing/rejecting zombies that reach the center of the screen. We're also~
     - Inside source: true
     *** True Line Result
    -      end
    +     In this sample app, we're removing/rejecting zombies that reach the center of the screen. We're also
    +** Processing line: ~     rejecting zombies that were killed more than 30 frames ago.~
    +- Inside source: true
    +*** True Line Result
    +     rejecting zombies that were killed more than 30 frames ago.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      #Add the sine component of gravity back in (X component)~
    +** Processing line: ~  =end~
     - Inside source: true
     *** True Line Result
    -      #Add the sine component of gravity back in (X component)
    -** Processing line: ~      gravity_x = 4 * Math.sin(@rotation * DEGREES_TO_RADIANS)~
    +  =end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      gravity_x = 4 * Math.sin(@rotation * DEGREES_TO_RADIANS)
    -** Processing line: ~      xnew += gravity_x~
    +
    +** Processing line: ~  # This sample app allows users to move around the screen in order to kill zombies. Zombies appear from every direction so the goal~
     - Inside source: true
     *** True Line Result
    -      xnew += gravity_x
    +  # This sample app allows users to move around the screen in order to kill zombies. Zombies appear from every direction so the goal
    +** Processing line: ~  # is to kill the zombies as fast as possible!~
    +- Inside source: true
    +*** True Line Result
    +  # is to kill the zombies as fast as possible!
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      args.state.ball.velocity.x = -xnew~
    +** Processing line: ~  class ProtectThePuppiesFromTheZombies~
     - Inside source: true
     *** True Line Result
    -      args.state.ball.velocity.x = -xnew
    -** Processing line: ~      args.state.ball.velocity.y = -ynew~
    +  class ProtectThePuppiesFromTheZombies
    +** Processing line: ~    attr_accessor :grid, :inputs, :state, :outputs~
     - Inside source: true
     *** True Line Result
    -      args.state.ball.velocity.y = -ynew
    +    attr_accessor :grid, :inputs, :state, :outputs
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      #Set the position of the ball to the previous position so it doesn't warp throught the block~
    +** Processing line: ~    # Calls the methods necessary for the game to run properly.~
     - Inside source: true
     *** True Line Result
    -      #Set the position of the ball to the previous position so it doesn't warp throught the block
    -** Processing line: ~      args.state.ball.center.x = previousPosition.x~
    +    # Calls the methods necessary for the game to run properly.
    +** Processing line: ~    def tick~
     - Inside source: true
     *** True Line Result
    -      args.state.ball.center.x = previousPosition.x
    -** Processing line: ~      args.state.ball.center.y = previousPosition.y~
    +    def tick
    +** Processing line: ~      defaults~
     - Inside source: true
     *** True Line Result
    -      args.state.ball.center.y = previousPosition.y
    -** Processing line: ~    end~
    +      defaults
    +** Processing line: ~      render~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~  end~
    +      render
    +** Processing line: ~      calc~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +      calc
    +** Processing line: ~      input~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~#+end_src~
    -- Line was identified as the end of a code block.
    +      input
    +** Processing line: ~    end~
    +- Inside source: true
     *** True Line Result
    -#+end_src
    +    end
     ** Processing line: ~~
    -- End of paragraph detected.
    +- Inside source: true
     *** True Line Result
     
    -** Processing line: ~*** Physics And Collisions - Bouncing On Collision - cannon.rb~
    -- Header detected.
    +** Processing line: ~    # Sets default values for the zombies and for the player.~
    +- Inside source: true
     *** True Line Result
    -
    +    # Sets default values for the zombies and for the player.
    +** Processing line: ~    # Initialization happens only in the first frame.~
    +- Inside source: true
     *** True Line Result
    -*** Physics And Collisions - Bouncing On Collision - cannon.rb
    -** Processing line: ~#+begin_src ruby~
    -- Line was identified as the beginning of a code block.
    +    # Initialization happens only in the first frame.
    +** Processing line: ~    def defaults~
    +- Inside source: true
     *** True Line Result
    -
    +    def defaults
    +** Processing line: ~      state.flash_at               ||= 0~
    +- Inside source: true
     *** True Line Result
    -#+begin_src ruby
    -** Processing line: ~  # ./samples/04_physics_and_collisions/08_bouncing_on_collision/app/cannon.rb~
    +      state.flash_at               ||= 0
    +** Processing line: ~      state.zombie_min_spawn_rate  ||= 60~
     - Inside source: true
     *** True Line Result
    -  # ./samples/04_physics_and_collisions/08_bouncing_on_collision/app/cannon.rb
    -** Processing line: ~  class Cannon~
    +      state.zombie_min_spawn_rate  ||= 60
    +** Processing line: ~      state.zombie_spawn_countdown ||= random_spawn_countdown state.zombie_min_spawn_rate~
     - Inside source: true
     *** True Line Result
    -  class Cannon
    -** Processing line: ~    def initialize args~
    +      state.zombie_spawn_countdown ||= random_spawn_countdown state.zombie_min_spawn_rate
    +** Processing line: ~      state.zombies                ||= []~
     - Inside source: true
     *** True Line Result
    -    def initialize args
    -** Processing line: ~      @pointA = {x: args.grid.right/2,y: args.grid.top}~
    +      state.zombies                ||= []
    +** Processing line: ~      state.killed_zombies         ||= []~
     - Inside source: true
     *** True Line Result
    -      @pointA = {x: args.grid.right/2,y: args.grid.top}
    -** Processing line: ~      @pointB = {x: args.inputs.mouse.x, y: args.inputs.mouse.y}~
    +      state.killed_zombies         ||= []
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      @pointB = {x: args.inputs.mouse.x, y: args.inputs.mouse.y}
    -** Processing line: ~    end~
    +
    +** Processing line: ~      # Declares player as a new entity and sets its properties.~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~    def update args~
    +      # Declares player as a new entity and sets its properties.
    +** Processing line: ~      # The player begins the game in the center of the screen, not moving in any direction.~
     - Inside source: true
     *** True Line Result
    -    def update args
    -** Processing line: ~      activeBall = args.state.ball~
    +      # The player begins the game in the center of the screen, not moving in any direction.
    +** Processing line: ~      state.player ||= state.new_entity(:player, { x: 640,~
     - Inside source: true
     *** True Line Result
    -      activeBall = args.state.ball
    -** Processing line: ~      @pointB = {x: args.inputs.mouse.x, y: args.inputs.mouse.y}~
    +      state.player ||= state.new_entity(:player, { x: 640,
    +** Processing line: ~                                                 y: 360,~
    +- Inside source: true
    +*** True Line Result
    +                                                 y: 360,
    +** Processing line: ~                                                 attack_angle: 0,~
    +- Inside source: true
    +*** True Line Result
    +                                                 attack_angle: 0,
    +** Processing line: ~                                                 dx: 0,~
    +- Inside source: true
    +*** True Line Result
    +                                                 dx: 0,
    +** Processing line: ~                                                 dy: 0 })~
    +- Inside source: true
    +*** True Line Result
    +                                                 dy: 0 })
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      @pointB = {x: args.inputs.mouse.x, y: args.inputs.mouse.y}
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      if args.inputs.mouse.click~
    -- Inside source: true
    -*** True Line Result
    -      if args.inputs.mouse.click
    -** Processing line: ~        alpha = 0.01~
    +** Processing line: ~    # Outputs a gray background.~
     - Inside source: true
     *** True Line Result
    -        alpha = 0.01
    -** Processing line: ~        activeBall.velocity.y = (@pointB.y - @pointA.y) * alpha~
    +    # Outputs a gray background.
    +** Processing line: ~    # Calls the methods needed to output the player, zombies, etc onto the screen.~
     - Inside source: true
     *** True Line Result
    -        activeBall.velocity.y = (@pointB.y - @pointA.y) * alpha
    -** Processing line: ~        activeBall.velocity.x = (@pointB.x - @pointA.x) * alpha~
    +    # Calls the methods needed to output the player, zombies, etc onto the screen.
    +** Processing line: ~    def render~
     - Inside source: true
     *** True Line Result
    -        activeBall.velocity.x = (@pointB.x - @pointA.x) * alpha
    -** Processing line: ~        activeBall.center = {x: (args.grid.w / 2), y: (args.grid.h)}~
    +    def render
    +** Processing line: ~      outputs.solids << [grid.rect, 100, 100, 100]~
     - Inside source: true
     *** True Line Result
    -        activeBall.center = {x: (args.grid.w / 2), y: (args.grid.h)}
    -** Processing line: ~      end~
    +      outputs.solids << [grid.rect, 100, 100, 100]
    +** Processing line: ~      render_zombies~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +      render_zombies
    +** Processing line: ~      render_killed_zombies~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~    def render args~
    +      render_killed_zombies
    +** Processing line: ~      render_player~
     - Inside source: true
     *** True Line Result
    -    def render args
    -** Processing line: ~      args.outputs.lines << [@pointA.x, @pointA.y, @pointB.x, @pointB.y]~
    +      render_player
    +** Processing line: ~      render_flash~
     - Inside source: true
     *** True Line Result
    -      args.outputs.lines << [@pointA.x, @pointA.y, @pointB.x, @pointB.y]
    +      render_flash
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
         end
    -** Processing line: ~  end~
    -- Inside source: true
    -*** True Line Result
    -  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~#+end_src~
    -- Line was identified as the end of a code block.
    -*** True Line Result
    -#+end_src
    -** Processing line: ~~
    -- End of paragraph detected.
    -*** True Line Result
    -
    -** Processing line: ~*** Physics And Collisions - Bouncing On Collision - main.rb~
    -- Header detected.
    -*** True Line Result
    -
    -*** True Line Result
    -*** Physics And Collisions - Bouncing On Collision - main.rb
    -** Processing line: ~#+begin_src ruby~
    -- Line was identified as the beginning of a code block.
    -*** True Line Result
    -
    -*** True Line Result
    -#+begin_src ruby
    -** Processing line: ~  # ./samples/04_physics_and_collisions/08_bouncing_on_collision/app/main.rb~
    -- Inside source: true
    -*** True Line Result
    -  # ./samples/04_physics_and_collisions/08_bouncing_on_collision/app/main.rb
    -** Processing line: ~  INFINITY= 10**10~
    +** Processing line: ~    # Outputs the zombies on the screen and sets values for the sprites, such as the position, width, height, and animation.~
     - Inside source: true
     *** True Line Result
    -  INFINITY= 10**10
    -** Processing line: ~~
    +    # Outputs the zombies on the screen and sets values for the sprites, such as the position, width, height, and animation.
    +** Processing line: ~    def render_zombies~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  require 'app/vector2d.rb'~
    +    def render_zombies
    +** Processing line: ~      outputs.sprites << state.zombies.map do |z| # performs action on all zombies in the collection~
     - Inside source: true
     *** True Line Result
    -  require 'app/vector2d.rb'
    -** Processing line: ~  require 'app/peg.rb'~
    +      outputs.sprites << state.zombies.map do |z| # performs action on all zombies in the collection
    +** Processing line: ~        z.sprite = [z.x, z.y, 4 * 3, 8 * 3, animation_sprite(z)].sprite # sets definition for sprite, calls animation_sprite method~
     - Inside source: true
     *** True Line Result
    -  require 'app/peg.rb'
    -** Processing line: ~  require 'app/block.rb'~
    +        z.sprite = [z.x, z.y, 4 * 3, 8 * 3, animation_sprite(z)].sprite # sets definition for sprite, calls animation_sprite method
    +** Processing line: ~        z.sprite~
     - Inside source: true
     *** True Line Result
    -  require 'app/block.rb'
    -** Processing line: ~  require 'app/ball.rb'~
    +        z.sprite
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -  require 'app/ball.rb'
    -** Processing line: ~  require 'app/cannon.rb'~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  require 'app/cannon.rb'
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~~
    +** Processing line: ~    # Outputs sprites of killed zombies, and displays a slash image to show that a zombie has been killed.~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  #Method to init default values~
    +    # Outputs sprites of killed zombies, and displays a slash image to show that a zombie has been killed.
    +** Processing line: ~    def render_killed_zombies~
     - Inside source: true
     *** True Line Result
    -  #Method to init default values
    -** Processing line: ~  def defaults args~
    +    def render_killed_zombies
    +** Processing line: ~      outputs.sprites << state.killed_zombies.map do |z| # performs action on all killed zombies in collection~
     - Inside source: true
     *** True Line Result
    -  def defaults args
    -** Processing line: ~    args.state.pegs ||= []~
    +      outputs.sprites << state.killed_zombies.map do |z| # performs action on all killed zombies in collection
    +** Processing line: ~        z.sprite = [z.x,~
     - Inside source: true
     *** True Line Result
    -    args.state.pegs ||= []
    -** Processing line: ~    args.state.blocks ||= []~
    +        z.sprite = [z.x,
    +** Processing line: ~                    z.y,~
     - Inside source: true
     *** True Line Result
    -    args.state.blocks ||= []
    -** Processing line: ~    args.state.cannon ||= Cannon.new args~
    +                    z.y,
    +** Processing line: ~                    4 * 3,~
     - Inside source: true
     *** True Line Result
    -    args.state.cannon ||= Cannon.new args
    -** Processing line: ~    args.state.ball ||= Ball.new args~
    +                    4 * 3,
    +** Processing line: ~                    8 * 3,~
     - Inside source: true
     *** True Line Result
    -    args.state.ball ||= Ball.new args
    -** Processing line: ~    args.state.horizontal_offset ||= 0~
    +                    8 * 3,
    +** Processing line: ~                    animation_sprite(z, z.death_at), # calls animation_sprite method~
     - Inside source: true
     *** True Line Result
    -    args.state.horizontal_offset ||= 0
    -** Processing line: ~    init_pegs args~
    +                    animation_sprite(z, z.death_at), # calls animation_sprite method
    +** Processing line: ~                    0, # angle~
     - Inside source: true
     *** True Line Result
    -    init_pegs args
    -** Processing line: ~    init_blocks args~
    +                    0, # angle
    +** Processing line: ~                    255 * z.death_at.ease(30, :flip)].sprite # transparency of a zombie changes when they die~
     - Inside source: true
     *** True Line Result
    -    init_blocks args
    +                    255 * z.death_at.ease(30, :flip)].sprite # transparency of a zombie changes when they die
    +** Processing line: ~                    # change the value of 30 and see what happens when a zombie is killed~
    +- Inside source: true
    +*** True Line Result
    +                    # change the value of 30 and see what happens when a zombie is killed
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    args.state.display_value ||= "test"~
    +** Processing line: ~        # Sets values to output the slash over the zombie's sprite when a zombie is killed.~
     - Inside source: true
     *** True Line Result
    -    args.state.display_value ||= "test"
    -** Processing line: ~  end~
    +        # Sets values to output the slash over the zombie's sprite when a zombie is killed.
    +** Processing line: ~        # The slash is tilted 45 degrees from the angle of the player's attack.~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +        # The slash is tilted 45 degrees from the angle of the player's attack.
    +** Processing line: ~        # Change the 3 inside scale_rect to 30 and the slash will be HUGE! Scale_rect positions~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  begin :default_methods~
    +        # Change the 3 inside scale_rect to 30 and the slash will be HUGE! Scale_rect positions
    +** Processing line: ~        # the slash over the killed zombie's sprite.~
     - Inside source: true
     *** True Line Result
    -  begin :default_methods
    -** Processing line: ~    def init_pegs args~
    +        # the slash over the killed zombie's sprite.
    +** Processing line: ~        [z.sprite, [z.sprite.rect, 'sprites/slash.png', 45 + state.player.attack_angle_on_click, z.sprite.a].scale_rect(3, 0.5, 0.5)]~
     - Inside source: true
     *** True Line Result
    -    def init_pegs args
    -** Processing line: ~      num_horizontal_pegs = 14~
    +        [z.sprite, [z.sprite.rect, 'sprites/slash.png', 45 + state.player.attack_angle_on_click, z.sprite.a].scale_rect(3, 0.5, 0.5)]
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -      num_horizontal_pegs = 14
    -** Processing line: ~      num_rows = 5~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      num_rows = 5
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      return unless args.state.pegs.count < num_rows * num_horizontal_pegs~
    +** Processing line: ~    # Outputs the player sprite using the images in the sprites folder.~
     - Inside source: true
     *** True Line Result
    -      return unless args.state.pegs.count < num_rows * num_horizontal_pegs
    -** Processing line: ~~
    +    # Outputs the player sprite using the images in the sprites folder.
    +** Processing line: ~    def render_player~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      block_size = 32~
    +    def render_player
    +** Processing line: ~      state.player_sprite = [state.player.x,~
     - Inside source: true
     *** True Line Result
    -      block_size = 32
    -** Processing line: ~      block_spacing = 50~
    +      state.player_sprite = [state.player.x,
    +** Processing line: ~                             state.player.y,~
     - Inside source: true
     *** True Line Result
    -      block_spacing = 50
    -** Processing line: ~      total_width = num_horizontal_pegs * (block_size + block_spacing)~
    +                             state.player.y,
    +** Processing line: ~                            4 * 3,~
     - Inside source: true
     *** True Line Result
    -      total_width = num_horizontal_pegs * (block_size + block_spacing)
    -** Processing line: ~      starting_offset = (args.grid.w - total_width) / 2 + block_size~
    +                            4 * 3,
    +** Processing line: ~                            8 * 3, "sprites/player-#{animation_index(state.player.created_at_elapsed)}.png"] # string interpolation~
     - Inside source: true
     *** True Line Result
    -      starting_offset = (args.grid.w - total_width) / 2 + block_size
    +                            8 * 3, "sprites/player-#{animation_index(state.player.created_at_elapsed)}.png"] # string interpolation
    +** Processing line: ~      outputs.sprites << state.player_sprite~
    +- Inside source: true
    +*** True Line Result
    +      outputs.sprites << state.player_sprite
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      for i in (0...num_rows)~
    +** Processing line: ~      # Outputs a small red square that previews the angles that the player can attack in.~
     - Inside source: true
     *** True Line Result
    -      for i in (0...num_rows)
    -** Processing line: ~        for j in (0...num_horizontal_pegs)~
    +      # Outputs a small red square that previews the angles that the player can attack in.
    +** Processing line: ~      # It can be moved in a perfect circle around the player to show possible movements.~
     - Inside source: true
     *** True Line Result
    -        for j in (0...num_horizontal_pegs)
    -** Processing line: ~          row_offset = 0~
    +      # It can be moved in a perfect circle around the player to show possible movements.
    +** Processing line: ~      # Change the 60 in the parenthesis and see what happens to the movement of the red square.~
     - Inside source: true
     *** True Line Result
    -          row_offset = 0
    -** Processing line: ~          if i % 2 == 0~
    +      # Change the 60 in the parenthesis and see what happens to the movement of the red square.
    +** Processing line: ~      outputs.solids <<  [state.player.x + state.player.attack_angle.vector_x(60),~
     - Inside source: true
     *** True Line Result
    -          if i % 2 == 0
    -** Processing line: ~            row_offset = 20~
    +      outputs.solids <<  [state.player.x + state.player.attack_angle.vector_x(60),
    +** Processing line: ~                          state.player.y + state.player.attack_angle.vector_y(60),~
     - Inside source: true
     *** True Line Result
    -            row_offset = 20
    -** Processing line: ~          else~
    +                          state.player.y + state.player.attack_angle.vector_y(60),
    +** Processing line: ~                          3, 3, 255, 0, 0]~
     - Inside source: true
     *** True Line Result
    -          else
    -** Processing line: ~            row_offset = -20~
    +                          3, 3, 255, 0, 0]
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -            row_offset = -20
    -** Processing line: ~          end~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          end
    -** Processing line: ~          args.state.pegs.append(Peg.new(j * (block_size+block_spacing) + starting_offset + row_offset, (args.grid.h - block_size * 2) - (i * block_size * 2)-90, block_size))~
    +
    +** Processing line: ~    # Renders flash as a solid. The screen turns white for 10 frames when a zombie is killed.~
     - Inside source: true
     *** True Line Result
    -          args.state.pegs.append(Peg.new(j * (block_size+block_spacing) + starting_offset + row_offset, (args.grid.h - block_size * 2) - (i * block_size * 2)-90, block_size))
    -** Processing line: ~        end~
    +    # Renders flash as a solid. The screen turns white for 10 frames when a zombie is killed.
    +** Processing line: ~    def render_flash~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~      end~
    +    def render_flash
    +** Processing line: ~      return if state.flash_at.elapsed_time > 10 # return if more than 10 frames have passed since flash.~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +      return if state.flash_at.elapsed_time > 10 # return if more than 10 frames have passed since flash.
    +** Processing line: ~      # Transparency gradually changes (or eases) during the 10 frames of flash.~
     - Inside source: true
     *** True Line Result
    -
    +      # Transparency gradually changes (or eases) during the 10 frames of flash.
    +** Processing line: ~      outputs.primitives << [grid.rect, 255, 255, 255, 255 * state.flash_at.ease(10, :flip)].solid~
    +- Inside source: true
    +*** True Line Result
    +      outputs.primitives << [grid.rect, 255, 255, 255, 255 * state.flash_at.ease(10, :flip)].solid
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -31112,150 +39351,174 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def init_blocks args~
    +** Processing line: ~    # Calls all methods necessary for performing calculations.~
     - Inside source: true
     *** True Line Result
    -    def init_blocks args
    -** Processing line: ~      return unless args.state.blocks.count < 10~
    +    # Calls all methods necessary for performing calculations.
    +** Processing line: ~    def calc~
     - Inside source: true
     *** True Line Result
    -      return unless args.state.blocks.count < 10
    -** Processing line: ~~
    +    def calc
    +** Processing line: ~      calc_spawn_zombie~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      #Sprites are rotated in degrees, but the Ruby math functions work on radians~
    +      calc_spawn_zombie
    +** Processing line: ~      calc_move_zombies~
     - Inside source: true
     *** True Line Result
    -      #Sprites are rotated in degrees, but the Ruby math functions work on radians
    -** Processing line: ~      radians_to_degrees = Math::PI / 180~
    +      calc_move_zombies
    +** Processing line: ~      calc_player~
     - Inside source: true
     *** True Line Result
    -      radians_to_degrees = Math::PI / 180
    +      calc_player
    +** Processing line: ~      calc_kill_zombie~
    +- Inside source: true
    +*** True Line Result
    +      calc_kill_zombie
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      block_size = 25~
    +** Processing line: ~    # Decreases the zombie spawn countdown by 1 if it has a value greater than 0.~
     - Inside source: true
     *** True Line Result
    -      block_size = 25
    -** Processing line: ~      #Rotation angle (in degrees) of the blocks~
    +    # Decreases the zombie spawn countdown by 1 if it has a value greater than 0.
    +** Processing line: ~    def calc_spawn_zombie~
     - Inside source: true
     *** True Line Result
    -      #Rotation angle (in degrees) of the blocks
    -** Processing line: ~      rotation = 30~
    +    def calc_spawn_zombie
    +** Processing line: ~      if state.zombie_spawn_countdown > 0~
     - Inside source: true
     *** True Line Result
    -      rotation = 30
    -** Processing line: ~      vertical_offset = block_size * Math.sin(rotation * radians_to_degrees)~
    +      if state.zombie_spawn_countdown > 0
    +** Processing line: ~        state.zombie_spawn_countdown -= 1~
     - Inside source: true
     *** True Line Result
    -      vertical_offset = block_size * Math.sin(rotation * radians_to_degrees)
    -** Processing line: ~      horizontal_offset = (3 * block_size) * Math.cos(rotation * radians_to_degrees)~
    +        state.zombie_spawn_countdown -= 1
    +** Processing line: ~        return~
     - Inside source: true
     *** True Line Result
    -      horizontal_offset = (3 * block_size) * Math.cos(rotation * radians_to_degrees)
    -** Processing line: ~      center = args.grid.w / 2~
    +        return
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -      center = args.grid.w / 2
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      for i in (0...5)~
    +** Processing line: ~      # New zombies are created, positioned on the screen, and added to the zombies collection.~
     - Inside source: true
     *** True Line Result
    -      for i in (0...5)
    -** Processing line: ~        #Create a ramp of blocks. Not going to be perfect because of the float to integer conversion and anisotropic to isotropic coversion~
    +      # New zombies are created, positioned on the screen, and added to the zombies collection.
    +** Processing line: ~      state.zombies << state.new_entity(:zombie) do |z| # each zombie is declared a new entity~
     - Inside source: true
     *** True Line Result
    -        #Create a ramp of blocks. Not going to be perfect because of the float to integer conversion and anisotropic to isotropic coversion
    -** Processing line: ~        args.state.blocks.append(Block.new((center + 100 + (i * horizontal_offset)).to_i, 100 + (vertical_offset * i) + (i * block_size), block_size, rotation))~
    +      state.zombies << state.new_entity(:zombie) do |z| # each zombie is declared a new entity
    +** Processing line: ~        if rand > 0.5~
     - Inside source: true
     *** True Line Result
    -        args.state.blocks.append(Block.new((center + 100 + (i * horizontal_offset)).to_i, 100 + (vertical_offset * i) + (i * block_size), block_size, rotation))
    -** Processing line: ~        args.state.blocks.append(Block.new((center - 100 - (i * horizontal_offset)).to_i, 100 + (vertical_offset * i) + (i * block_size), block_size, -rotation))~
    +        if rand > 0.5
    +** Processing line: ~          z.x = grid.rect.w.randomize(:ratio) # random x position on screen (within grid scope)~
     - Inside source: true
     *** True Line Result
    -        args.state.blocks.append(Block.new((center - 100 - (i * horizontal_offset)).to_i, 100 + (vertical_offset * i) + (i * block_size), block_size, -rotation))
    -** Processing line: ~      end~
    +          z.x = grid.rect.w.randomize(:ratio) # random x position on screen (within grid scope)
    +** Processing line: ~          z.y = [-10, 730].sample # y position is set to either -10 or 730 (randomly chosen)~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +          z.y = [-10, 730].sample # y position is set to either -10 or 730 (randomly chosen)
    +** Processing line: ~          # the possible values exceed the screen's scope so zombies appear to be coming from far away~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~  end~
    +          # the possible values exceed the screen's scope so zombies appear to be coming from far away
    +** Processing line: ~        else~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +        else
    +** Processing line: ~          z.x = [-10, 1290].sample # x position is set to either -10 or 1290 (randomly chosen)~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  #Render loop~
    +          z.x = [-10, 1290].sample # x position is set to either -10 or 1290 (randomly chosen)
    +** Processing line: ~          z.y = grid.rect.w.randomize(:ratio) # random y position on screen~
     - Inside source: true
     *** True Line Result
    -  #Render loop
    -** Processing line: ~  def render args~
    +          z.y = grid.rect.w.randomize(:ratio) # random y position on screen
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -  def render args
    -** Processing line: ~    args.outputs.borders << args.state.game_area~
    +        end
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    args.outputs.borders << args.state.game_area
    -** Processing line: ~    render_pegs args~
    +      end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    render_pegs args
    -** Processing line: ~    render_blocks args~
    +
    +** Processing line: ~      # Calls random_spawn_countdown method (determines how fast new zombies appear)~
     - Inside source: true
     *** True Line Result
    -    render_blocks args
    -** Processing line: ~    args.state.cannon.render args~
    +      # Calls random_spawn_countdown method (determines how fast new zombies appear)
    +** Processing line: ~      state.zombie_spawn_countdown = random_spawn_countdown state.zombie_min_spawn_rate~
     - Inside source: true
     *** True Line Result
    -    args.state.cannon.render args
    -** Processing line: ~    args.state.ball.draw args~
    +      state.zombie_spawn_countdown = random_spawn_countdown state.zombie_min_spawn_rate
    +** Processing line: ~      state.zombie_min_spawn_rate -= 1~
     - Inside source: true
     *** True Line Result
    -    args.state.ball.draw args
    -** Processing line: ~  end~
    +      state.zombie_min_spawn_rate -= 1
    +** Processing line: ~      # set to either the current zombie_min_spawn_rate or 0, depending on which value is greater~
     - Inside source: true
     *** True Line Result
    -  end
    +      # set to either the current zombie_min_spawn_rate or 0, depending on which value is greater
    +** Processing line: ~      state.zombie_min_spawn_rate  = state.zombie_min_spawn_rate.greater(0)~
    +- Inside source: true
    +*** True Line Result
    +      state.zombie_min_spawn_rate  = state.zombie_min_spawn_rate.greater(0)
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  begin :render_methods~
    +** Processing line: ~    # Moves all zombies towards the center of the screen.~
     - Inside source: true
     *** True Line Result
    -  begin :render_methods
    -** Processing line: ~    #Draw the pegs in a grid pattern~
    +    # Moves all zombies towards the center of the screen.
    +** Processing line: ~    # All zombies that reach the center (640, 360) are rejected from the zombies collection and disappear.~
     - Inside source: true
     *** True Line Result
    -    #Draw the pegs in a grid pattern
    -** Processing line: ~    def render_pegs args~
    +    # All zombies that reach the center (640, 360) are rejected from the zombies collection and disappear.
    +** Processing line: ~    def calc_move_zombies~
     - Inside source: true
     *** True Line Result
    -    def render_pegs args
    -** Processing line: ~      args.state.pegs.each do |peg|~
    +    def calc_move_zombies
    +** Processing line: ~      state.zombies.each do |z| # for each zombie in the collection~
     - Inside source: true
     *** True Line Result
    -      args.state.pegs.each do |peg|
    -** Processing line: ~        peg.draw args~
    +      state.zombies.each do |z| # for each zombie in the collection
    +** Processing line: ~        z.y = z.y.towards(360, 0.1) # move the zombie towards the center (640, 360) at a rate of 0.1~
     - Inside source: true
     *** True Line Result
    -        peg.draw args
    +        z.y = z.y.towards(360, 0.1) # move the zombie towards the center (640, 360) at a rate of 0.1
    +** Processing line: ~        z.x = z.x.towards(640, 0.1) # change 0.1 to 1.1 and see how much faster the zombies move to the center~
    +- Inside source: true
    +*** True Line Result
    +        z.x = z.x.towards(640, 0.1) # change 0.1 to 1.1 and see how much faster the zombies move to the center
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
           end
    +** Processing line: ~      state.zombies = state.zombies.reject { |z| z.y == 360 && z.x == 640 } # remove zombies that are in center~
    +- Inside source: true
    +*** True Line Result
    +      state.zombies = state.zombies.reject { |z| z.y == 360 && z.x == 640 } # remove zombies that are in center
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -31264,54 +39527,54 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def render_blocks args~
    -- Inside source: true
    -*** True Line Result
    -    def render_blocks args
    -** Processing line: ~      args.state.blocks.each do |block|~
    +** Processing line: ~    # Calculates the position and movement of the player on the screen.~
     - Inside source: true
     *** True Line Result
    -      args.state.blocks.each do |block|
    -** Processing line: ~        block.draw args~
    +    # Calculates the position and movement of the player on the screen.
    +** Processing line: ~    def calc_player~
     - Inside source: true
     *** True Line Result
    -        block.draw args
    -** Processing line: ~      end~
    +    def calc_player
    +** Processing line: ~      state.player.x += state.player.dx # changes x based on dx (change in x)~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +      state.player.x += state.player.dx # changes x based on dx (change in x)
    +** Processing line: ~      state.player.y += state.player.dy # changes y based on dy (change in y)~
     - Inside source: true
     *** True Line Result
    -    end
    +      state.player.y += state.player.dy # changes y based on dy (change in y)
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  end~
    +** Processing line: ~      state.player.dx *= 0.9 # scales dx down~
     - Inside source: true
     *** True Line Result
    -  end
    +      state.player.dx *= 0.9 # scales dx down
    +** Processing line: ~      state.player.dy *= 0.9 # scales dy down~
    +- Inside source: true
    +*** True Line Result
    +      state.player.dy *= 0.9 # scales dy down
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  #Calls all methods necessary for performing calculations~
    +** Processing line: ~      # Compares player's x to 1280 to find lesser value, then compares result to 0 to find greater value.~
     - Inside source: true
     *** True Line Result
    -  #Calls all methods necessary for performing calculations
    -** Processing line: ~  def calc args~
    +      # Compares player's x to 1280 to find lesser value, then compares result to 0 to find greater value.
    +** Processing line: ~      # This ensures that the player remains within the screen's scope.~
     - Inside source: true
     *** True Line Result
    -  def calc args
    -** Processing line: ~    args.state.pegs.each do |peg|~
    +      # This ensures that the player remains within the screen's scope.
    +** Processing line: ~      state.player.x = state.player.x.lesser(1280).greater(0)~
     - Inside source: true
     *** True Line Result
    -    args.state.pegs.each do |peg|
    -** Processing line: ~      peg.calc args~
    +      state.player.x = state.player.x.lesser(1280).greater(0)
    +** Processing line: ~      state.player.y = state.player.y.lesser(720).greater(0) # same with player's y~
     - Inside source: true
     *** True Line Result
    -      peg.calc args
    +      state.player.y = state.player.y.lesser(720).greater(0) # same with player's y
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -31320,230 +39583,234 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    args.state.blocks.each do |block|~
    +** Processing line: ~    # Finds all zombies that intersect with the player's sprite. These zombies are removed from the zombies collection~
     - Inside source: true
     *** True Line Result
    -    args.state.blocks.each do |block|
    -** Processing line: ~      block.calc args~
    +    # Finds all zombies that intersect with the player's sprite. These zombies are removed from the zombies collection
    +** Processing line: ~    # and added to the killed_zombies collection since any zombie that intersects with the player is killed.~
     - Inside source: true
     *** True Line Result
    -      block.calc args
    -** Processing line: ~    end~
    +    # and added to the killed_zombies collection since any zombie that intersects with the player is killed.
    +** Processing line: ~    def calc_kill_zombie~
     - Inside source: true
     *** True Line Result
    -    end
    +    def calc_kill_zombie
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    args.state.ball.update args~
    +** Processing line: ~      # Find all zombies that intersect with the player. They are considered killed.~
     - Inside source: true
     *** True Line Result
    -    args.state.ball.update args
    -** Processing line: ~    args.state.cannon.update args~
    +      # Find all zombies that intersect with the player. They are considered killed.
    +** Processing line: ~      killed_this_frame = state.zombies.find_all { |z| z.sprite.intersect_rect? state.player_sprite }~
     - Inside source: true
     *** True Line Result
    -    args.state.cannon.update args
    -** Processing line: ~  end~
    +      killed_this_frame = state.zombies.find_all { |z| z.sprite.intersect_rect? state.player_sprite }
    +** Processing line: ~      state.zombies = state.zombies - killed_this_frame # remove newly killed zombies from zombies collection~
     - Inside source: true
     *** True Line Result
    -  end
    +      state.zombies = state.zombies - killed_this_frame # remove newly killed zombies from zombies collection
    +** Processing line: ~      state.killed_zombies += killed_this_frame # add newly killed zombies to killed zombies~
    +- Inside source: true
    +*** True Line Result
    +      state.killed_zombies += killed_this_frame # add newly killed zombies to killed zombies
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  begin :calc_methods~
    +** Processing line: ~      if killed_this_frame.length > 0 # if atleast one zombie was killed in the frame~
     - Inside source: true
     *** True Line Result
    -  begin :calc_methods
    -** Processing line: ~~
    +      if killed_this_frame.length > 0 # if atleast one zombie was killed in the frame
    +** Processing line: ~        state.flash_at = state.tick_count # flash_at set to the frame when the zombie was killed~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  end~
    +        state.flash_at = state.tick_count # flash_at set to the frame when the zombie was killed
    +** Processing line: ~      # Don't forget, the rendered flash lasts for 10 frames after the zombie is killed (look at render_flash method)~
     - Inside source: true
     *** True Line Result
    -  end
    +      # Don't forget, the rendered flash lasts for 10 frames after the zombie is killed (look at render_flash method)
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def tick args~
    +** Processing line: ~      # Sets the tick_count (passage of time) as the value of the death_at variable for each killed zombie.~
     - Inside source: true
     *** True Line Result
    -  def tick args
    -** Processing line: ~    defaults args~
    +      # Sets the tick_count (passage of time) as the value of the death_at variable for each killed zombie.
    +** Processing line: ~      # Death_at stores the frame a zombie was killed.~
     - Inside source: true
     *** True Line Result
    -    defaults args
    -** Processing line: ~    render args~
    +      # Death_at stores the frame a zombie was killed.
    +** Processing line: ~      killed_this_frame.each do |z|~
     - Inside source: true
     *** True Line Result
    -    render args
    -** Processing line: ~    calc args~
    +      killed_this_frame.each do |z|
    +** Processing line: ~        z.death_at = state.tick_count~
     - Inside source: true
     *** True Line Result
    -    calc args
    -** Processing line: ~  end~
    +        z.death_at = state.tick_count
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -  end
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~#+end_src~
    -- Line was identified as the end of a code block.
    -*** True Line Result
    -#+end_src
    -** Processing line: ~~
    -- End of paragraph detected.
    -*** True Line Result
    -
    -** Processing line: ~*** Physics And Collisions - Bouncing On Collision - peg.rb~
    -- Header detected.
    -*** True Line Result
    -
    -*** True Line Result
    -*** Physics And Collisions - Bouncing On Collision - peg.rb
    -** Processing line: ~#+begin_src ruby~
    -- Line was identified as the beginning of a code block.
    -*** True Line Result
    -
    +** Processing line: ~      # Zombies are rejected from the killed_zombies collection depending on when they were killed.~
    +- Inside source: true
     *** True Line Result
    -#+begin_src ruby
    -** Processing line: ~  # ./samples/04_physics_and_collisions/08_bouncing_on_collision/app/peg.rb~
    +      # Zombies are rejected from the killed_zombies collection depending on when they were killed.
    +** Processing line: ~      # They are rejected if more than 30 frames have passed since their death.~
     - Inside source: true
     *** True Line Result
    -  # ./samples/04_physics_and_collisions/08_bouncing_on_collision/app/peg.rb
    -** Processing line: ~  class Peg~
    +      # They are rejected if more than 30 frames have passed since their death.
    +** Processing line: ~      state.killed_zombies = state.killed_zombies.reject { |z| state.tick_count - z.death_at > 30 }~
     - Inside source: true
     *** True Line Result
    -  class Peg
    -** Processing line: ~    def initialize(x, y, block_size)~
    +      state.killed_zombies = state.killed_zombies.reject { |z| state.tick_count - z.death_at > 30 }
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    def initialize(x, y, block_size)
    -** Processing line: ~      @x = x                    # x cordinate of the LEFT side of the peg~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      @x = x                    # x cordinate of the LEFT side of the peg
    -** Processing line: ~      @y = y                    # y cordinate of the RIGHT side of the peg~
    +
    +** Processing line: ~    # Uses input from the user to move the player around the screen.~
     - Inside source: true
     *** True Line Result
    -      @y = y                    # y cordinate of the RIGHT side of the peg
    -** Processing line: ~      @block_size = block_size  # diameter of the peg~
    +    # Uses input from the user to move the player around the screen.
    +** Processing line: ~    def input~
     - Inside source: true
     *** True Line Result
    -      @block_size = block_size  # diameter of the peg
    +    def input
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      @radius = @block_size/2.0 # radius of the peg~
    +** Processing line: ~      # If the "a" key or left key is pressed, the x position of the player decreases.~
     - Inside source: true
     *** True Line Result
    -      @radius = @block_size/2.0 # radius of the peg
    -** Processing line: ~      @center = {               # cordinatees of the CENTER of the peg~
    +      # If the "a" key or left key is pressed, the x position of the player decreases.
    +** Processing line: ~      # Otherwise, if the "d" key or right key is pressed, the x position of the player increases.~
     - Inside source: true
     *** True Line Result
    -      @center = {               # cordinatees of the CENTER of the peg
    -** Processing line: ~        x: @x+@block_size/2.0,~
    +      # Otherwise, if the "d" key or right key is pressed, the x position of the player increases.
    +** Processing line: ~      if inputs.keyboard.key_held.a || inputs.keyboard.key_held.left~
     - Inside source: true
     *** True Line Result
    -        x: @x+@block_size/2.0,
    -** Processing line: ~        y: @y+@block_size/2.0~
    +      if inputs.keyboard.key_held.a || inputs.keyboard.key_held.left
    +** Processing line: ~        state.player.x -= 5~
     - Inside source: true
     *** True Line Result
    -        y: @y+@block_size/2.0
    -** Processing line: ~      }~
    +        state.player.x -= 5
    +** Processing line: ~      elsif inputs.keyboard.key_held.d || inputs.keyboard.key_held.right~
     - Inside source: true
     *** True Line Result
    -      }
    +      elsif inputs.keyboard.key_held.d || inputs.keyboard.key_held.right
    +** Processing line: ~        state.player.x += 5~
    +- Inside source: true
    +*** True Line Result
    +        state.player.x += 5
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      @r = 255 # color of the peg~
    +** Processing line: ~      # If the "w" or up key is pressed, the y position of the player increases.~
     - Inside source: true
     *** True Line Result
    -      @r = 255 # color of the peg
    -** Processing line: ~      @g = 0~
    +      # If the "w" or up key is pressed, the y position of the player increases.
    +** Processing line: ~      # Otherwise, if the "s" or down key is pressed, the y position of the player decreases.~
     - Inside source: true
     *** True Line Result
    -      @g = 0
    -** Processing line: ~      @b = 0~
    +      # Otherwise, if the "s" or down key is pressed, the y position of the player decreases.
    +** Processing line: ~      if inputs.keyboard.key_held.w || inputs.keyboard.key_held.up~
     - Inside source: true
     *** True Line Result
    -      @b = 0
    -** Processing line: ~~
    +      if inputs.keyboard.key_held.w || inputs.keyboard.key_held.up
    +** Processing line: ~        state.player.y += 5~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      @velocity = {x: 2, y: 0}~
    +        state.player.y += 5
    +** Processing line: ~      elsif inputs.keyboard.key_held.s || inputs.keyboard.key_held.down~
     - Inside source: true
     *** True Line Result
    -      @velocity = {x: 2, y: 0}
    -** Processing line: ~    end~
    +      elsif inputs.keyboard.key_held.s || inputs.keyboard.key_held.down
    +** Processing line: ~        state.player.y -= 5~
     - Inside source: true
     *** True Line Result
    -    end
    +        state.player.y -= 5
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def draw args~
    +** Processing line: ~      # Sets the attack angle so the player can move and attack in the precise direction it wants to go.~
     - Inside source: true
     *** True Line Result
    -    def draw args
    -** Processing line: ~      args.outputs.sprites << [ # draw the peg according to the @x, @y, @radius, and the RGB~
    +      # Sets the attack angle so the player can move and attack in the precise direction it wants to go.
    +** Processing line: ~      # If the mouse is moved, the attack angle is changed (based on the player's position and mouse position).~
     - Inside source: true
     *** True Line Result
    -      args.outputs.sprites << [ # draw the peg according to the @x, @y, @radius, and the RGB
    -** Processing line: ~        @x,~
    +      # If the mouse is moved, the attack angle is changed (based on the player's position and mouse position).
    +** Processing line: ~      # Attack angle also contributes to the position of red square.~
     - Inside source: true
     *** True Line Result
    -        @x,
    -** Processing line: ~        @y,~
    +      # Attack angle also contributes to the position of red square.
    +** Processing line: ~      if inputs.mouse.moved~
     - Inside source: true
     *** True Line Result
    -        @y,
    -** Processing line: ~        @radius*2.0,~
    +      if inputs.mouse.moved
    +** Processing line: ~        state.player.attack_angle = inputs.mouse.position.angle_from [state.player.x, state.player.y]~
     - Inside source: true
     *** True Line Result
    -        @radius*2.0,
    -** Processing line: ~        @radius*2.0,~
    +        state.player.attack_angle = inputs.mouse.position.angle_from [state.player.x, state.player.y]
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -        @radius*2.0,
    -** Processing line: ~        "sprites/circle-white.png",~
    +      end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        "sprites/circle-white.png",
    -** Processing line: ~        0,~
    +
    +** Processing line: ~      if inputs.mouse.click && state.player.dx < 0.5 && state.player.dy < 0.5~
     - Inside source: true
     *** True Line Result
    -        0,
    -** Processing line: ~        255,~
    +      if inputs.mouse.click && state.player.dx < 0.5 && state.player.dy < 0.5
    +** Processing line: ~        state.player.attack_angle_on_click = inputs.mouse.position.angle_from [state.player.x, state.player.y]~
     - Inside source: true
     *** True Line Result
    -        255,
    -** Processing line: ~        @r,    #r~
    +        state.player.attack_angle_on_click = inputs.mouse.position.angle_from [state.player.x, state.player.y]
    +** Processing line: ~        state.player.attack_angle = state.player.attack_angle_on_click # player's attack angle is set~
     - Inside source: true
     *** True Line Result
    -        @r,    #r
    -** Processing line: ~        @g,    #g~
    +        state.player.attack_angle = state.player.attack_angle_on_click # player's attack angle is set
    +** Processing line: ~        state.player.dx = state.player.attack_angle.vector_x(25) # change in player's position~
     - Inside source: true
     *** True Line Result
    -        @g,    #g
    -** Processing line: ~        @b   #b~
    +        state.player.dx = state.player.attack_angle.vector_x(25) # change in player's position
    +** Processing line: ~        state.player.dy = state.player.attack_angle.vector_y(25)~
     - Inside source: true
     *** True Line Result
    -        @b   #b
    -** Processing line: ~      ]~
    +        state.player.dy = state.player.attack_angle.vector_y(25)
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -      ]
    +      end
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -31552,42 +39819,46 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~~
    +** Processing line: ~    # Sets the zombie spawn's countdown to a random number.~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def calc args~
    +    # Sets the zombie spawn's countdown to a random number.
    +** Processing line: ~    # How fast zombies appear (change the 60 to 6 and too many zombies will appear at once!)~
     - Inside source: true
     *** True Line Result
    -    def calc args
    -** Processing line: ~      if collisionWithBounce? args # if the is a collision with the bouncing ball~
    +    # How fast zombies appear (change the 60 to 6 and too many zombies will appear at once!)
    +** Processing line: ~    def random_spawn_countdown minimum~
     - Inside source: true
     *** True Line Result
    -      if collisionWithBounce? args # if the is a collision with the bouncing ball
    -** Processing line: ~        collide args~
    +    def random_spawn_countdown minimum
    +** Processing line: ~      10.randomize(:ratio, :sign).to_i + 60~
     - Inside source: true
     *** True Line Result
    -        collide args
    -** Processing line: ~        @r = 0~
    +      10.randomize(:ratio, :sign).to_i + 60
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -        @r = 0
    -** Processing line: ~        @b = 0~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        @b = 0
    -** Processing line: ~        @g = 255~
    +
    +** Processing line: ~    # Helps to iterate through the images in the sprites folder by setting the animation index.~
     - Inside source: true
     *** True Line Result
    -        @g = 255
    -** Processing line: ~      else~
    +    # Helps to iterate through the images in the sprites folder by setting the animation index.
    +** Processing line: ~    # 3 frames is how long to show an image, and 6 is how many images to flip through.~
     - Inside source: true
     *** True Line Result
    -      else
    -** Processing line: ~      end~
    +    # 3 frames is how long to show an image, and 6 is how many images to flip through.
    +** Processing line: ~    def animation_index at~
     - Inside source: true
     *** True Line Result
    -      end
    +    def animation_index at
    +** Processing line: ~      at.idiv(3).mod(6)~
    +- Inside source: true
    +*** True Line Result
    +      at.idiv(3).mod(6)
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -31596,606 +39867,602 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~~
    +** Processing line: ~    # Animates the zombies by using the animation index to go through the images in the sprites folder.~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # do two circles (the ball and this peg) intersect~
    +    # Animates the zombies by using the animation index to go through the images in the sprites folder.
    +** Processing line: ~    def animation_sprite zombie, at = nil~
     - Inside source: true
     *** True Line Result
    -    # do two circles (the ball and this peg) intersect
    -** Processing line: ~    def collisionWithBounce? args~
    +    def animation_sprite zombie, at = nil
    +** Processing line: ~      at ||= zombie.created_at_elapsed # how long it is has been since a zombie was created~
     - Inside source: true
     *** True Line Result
    -    def collisionWithBounce? args
    -** Processing line: ~      squareDistance = (  # the squared distance between the ball's center and this peg's center~
    +      at ||= zombie.created_at_elapsed # how long it is has been since a zombie was created
    +** Processing line: ~      index = animation_index at~
     - Inside source: true
     *** True Line Result
    -      squareDistance = (  # the squared distance between the ball's center and this peg's center
    -** Processing line: ~        (args.state.ball.center.x - @center.x) ** 2.0 +~
    +      index = animation_index at
    +** Processing line: ~      "sprites/zombie-#{index}.png" # string interpolation to iterate through images~
     - Inside source: true
     *** True Line Result
    -        (args.state.ball.center.x - @center.x) ** 2.0 +
    -** Processing line: ~        (args.state.ball.center.y - @center.y) ** 2.0~
    +      "sprites/zombie-#{index}.png" # string interpolation to iterate through images
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -        (args.state.ball.center.y - @center.y) ** 2.0
    -** Processing line: ~      )~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -      )
    -** Processing line: ~      radiusSum = (  # the sum of the radius squared of the this peg and the ball~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      radiusSum = (  # the sum of the radius squared of the this peg and the ball
    -** Processing line: ~        (args.state.ball.radius + @radius) ** 2.0~
    +
    +** Processing line: ~  $protect_the_puppies_from_the_zombies = ProtectThePuppiesFromTheZombies.new~
     - Inside source: true
     *** True Line Result
    -        (args.state.ball.radius + @radius) ** 2.0
    -** Processing line: ~      )~
    +  $protect_the_puppies_from_the_zombies = ProtectThePuppiesFromTheZombies.new
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      )
    -** Processing line: ~      # if the squareDistance is less or equal to radiusSum, then there is a radial intersection between the ball and this peg~
    +
    +** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
    -      # if the squareDistance is less or equal to radiusSum, then there is a radial intersection between the ball and this peg
    -** Processing line: ~      return (squareDistance <= radiusSum)~
    +  def tick args
    +** Processing line: ~    $protect_the_puppies_from_the_zombies.grid    = args.grid~
     - Inside source: true
     *** True Line Result
    -      return (squareDistance <= radiusSum)
    -** Processing line: ~    end~
    +    $protect_the_puppies_from_the_zombies.grid    = args.grid
    +** Processing line: ~    $protect_the_puppies_from_the_zombies.inputs  = args.inputs~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +    $protect_the_puppies_from_the_zombies.inputs  = args.inputs
    +** Processing line: ~    $protect_the_puppies_from_the_zombies.state    = args.state~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # ! The following links explain the getRepelMagnitude function !~
    +    $protect_the_puppies_from_the_zombies.state    = args.state
    +** Processing line: ~    $protect_the_puppies_from_the_zombies.outputs = args.outputs~
     - Inside source: true
     *** True Line Result
    -    # ! The following links explain the getRepelMagnitude function !
    -** Processing line: ~    # https://raw.githubusercontent.com/DragonRuby/dragonruby-game-toolkit-physics/master/docs/docImages/LinearCollider_4.png~
    +    $protect_the_puppies_from_the_zombies.outputs = args.outputs
    +** Processing line: ~    $protect_the_puppies_from_the_zombies.tick~
     - Inside source: true
     *** True Line Result
    -    # https://raw.githubusercontent.com/DragonRuby/dragonruby-game-toolkit-physics/master/docs/docImages/LinearCollider_4.png
    -** Processing line: ~    # https://raw.githubusercontent.com/DragonRuby/dragonruby-game-toolkit-physics/master/docs/docImages/LinearCollider_5.png~
    +    $protect_the_puppies_from_the_zombies.tick
    +** Processing line: ~    tick_instructions args, "How to get the mouse position and translate it to an x, y position using .vector_x and .vector_y. CLICK to play."~
     - Inside source: true
     *** True Line Result
    -    # https://raw.githubusercontent.com/DragonRuby/dragonruby-game-toolkit-physics/master/docs/docImages/LinearCollider_5.png
    -** Processing line: ~    # https://github.com/DragonRuby/dragonruby-game-toolkit-physics/blob/master/docs/LinearCollider.md~
    +    tick_instructions args, "How to get the mouse position and translate it to an x, y position using .vector_x and .vector_y. CLICK to play."
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    # https://github.com/DragonRuby/dragonruby-game-toolkit-physics/blob/master/docs/LinearCollider.md
    -** Processing line: ~    def getRepelMagnitude (args, fbx, fby, vrx, vry, ballMag)~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    def getRepelMagnitude (args, fbx, fby, vrx, vry, ballMag)
    -** Processing line: ~      a = fbx ; b = vrx ; c = fby~
    +
    +** Processing line: ~  def tick_instructions args, text, y = 715~
     - Inside source: true
     *** True Line Result
    -      a = fbx ; b = vrx ; c = fby
    -** Processing line: ~      d = vry ; e = ballMag~
    +  def tick_instructions args, text, y = 715
    +** Processing line: ~    return if args.state.key_event_occurred~
     - Inside source: true
     *** True Line Result
    -      d = vry ; e = ballMag
    -** Processing line: ~      if b**2 + d**2 == 0~
    +    return if args.state.key_event_occurred
    +** Processing line: ~    if args.inputs.mouse.click ||~
     - Inside source: true
     *** True Line Result
    -      if b**2 + d**2 == 0
    -** Processing line: ~        #unexpected~
    +    if args.inputs.mouse.click ||
    +** Processing line: ~       args.inputs.keyboard.directional_vector ||~
     - Inside source: true
     *** True Line Result
    -        #unexpected
    -** Processing line: ~      end~
    +       args.inputs.keyboard.directional_vector ||
    +** Processing line: ~       args.inputs.keyboard.key_down.enter ||~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +       args.inputs.keyboard.key_down.enter ||
    +** Processing line: ~       args.inputs.keyboard.key_down.escape~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      x1 = (-a*b+-c*d + (e**2 * b**2 - b**2 * c**2 + 2*a*b*c*d + e**2 + d**2 - a**2 * d**2)**0.5)/(b**2 + d**2)~
    +       args.inputs.keyboard.key_down.escape
    +** Processing line: ~      args.state.key_event_occurred = true~
     - Inside source: true
     *** True Line Result
    -      x1 = (-a*b+-c*d + (e**2 * b**2 - b**2 * c**2 + 2*a*b*c*d + e**2 + d**2 - a**2 * d**2)**0.5)/(b**2 + d**2)
    -** Processing line: ~      x2 = -((a*b + c*d + (e**2 * b**2 - b**2 * c**2 + 2*a*b*c*d + e**2 * d**2 - a**2 * d**2)**0.5)/(b**2 + d**2))~
    +      args.state.key_event_occurred = true
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      x2 = -((a*b + c*d + (e**2 * b**2 - b**2 * c**2 + 2*a*b*c*d + e**2 * d**2 - a**2 * d**2)**0.5)/(b**2 + d**2))
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      err = 0.00001~
    +** Processing line: ~    args.outputs.debug << [0, y - 50, 1280, 60].solid~
     - Inside source: true
     *** True Line Result
    -      err = 0.00001
    -** Processing line: ~      o = ((fbx + x1*vrx)**2 + (fby + x1*vry)**2 ) ** 0.5~
    +    args.outputs.debug << [0, y - 50, 1280, 60].solid
    +** Processing line: ~    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label~
     - Inside source: true
     *** True Line Result
    -      o = ((fbx + x1*vrx)**2 + (fby + x1*vry)**2 ) ** 0.5
    -** Processing line: ~      p = ((fbx + x2*vrx)**2 + (fby + x2*vry)**2 ) ** 0.5~
    +    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label
    +** Processing line: ~    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label~
     - Inside source: true
     *** True Line Result
    -      p = ((fbx + x2*vrx)**2 + (fby + x2*vry)**2 ) ** 0.5
    -** Processing line: ~      r = 0~
    +    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -      r = 0
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      if (ballMag >= o-err and ballMag <= o+err)~
    -- Inside source: true
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
     *** True Line Result
    -      if (ballMag >= o-err and ballMag <= o+err)
    -** Processing line: ~        r = x1~
    -- Inside source: true
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
     *** True Line Result
    -        r = x1
    -** Processing line: ~      elsif (ballMag >= p-err and ballMag <= p+err)~
    -- Inside source: true
    +
    +** Processing line: ~*** Mouse - Mouse Move Paint App - main.rb~
    +- Header detected.
     *** True Line Result
    -      elsif (ballMag >= p-err and ballMag <= p+err)
    -** Processing line: ~        r = x2~
    -- Inside source: true
    +
     *** True Line Result
    -        r = x2
    -** Processing line: ~      else~
    -- Inside source: true
    +*** Mouse - Mouse Move Paint App - main.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
     *** True Line Result
    -      else
    -** Processing line: ~        #unexpected~
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/05_mouse/03_mouse_move_paint_app/app/main.rb~
     - Inside source: true
     *** True Line Result
    -        #unexpected
    -** Processing line: ~      end~
    +  # ./samples/05_mouse/03_mouse_move_paint_app/app/main.rb
    +** Processing line: ~  =begin~
     - Inside source: true
     *** True Line Result
    -      end
    +  =begin
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      if (args.state.ball.center.x > @center.x)~
    -- Inside source: true
    -*** True Line Result
    -      if (args.state.ball.center.x > @center.x)
    -** Processing line: ~        return x2*-1~
    -- Inside source: true
    -*** True Line Result
    -        return x2*-1
    -** Processing line: ~      end~
    +** Processing line: ~   APIs listing that haven't been encountered in previous sample apps:~
     - Inside source: true
     *** True Line Result
    -      end
    +   APIs listing that haven't been encountered in previous sample apps:
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      return x2~
    +** Processing line: ~   - Floor: Method that returns an integer number smaller than or equal to the original with no decimal.~
     - Inside source: true
     *** True Line Result
    -      return x2
    +   - Floor: Method that returns an integer number smaller than or equal to the original with no decimal.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      #return r~
    +** Processing line: ~     For example, if we have a variable, a = 13.7, and we called floor on it, it would look like this...~
     - Inside source: true
     *** True Line Result
    -      #return r
    -** Processing line: ~    end~
    +     For example, if we have a variable, a = 13.7, and we called floor on it, it would look like this...
    +** Processing line: ~     puts a.floor()~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +     puts a.floor()
    +** Processing line: ~     which would print out 13.~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    #this sets the new velocity of the ball once it has collided with this peg~
    +     which would print out 13.
    +** Processing line: ~     (There is also a ceil method, which returns an integer number greater than or equal to the original~
     - Inside source: true
     *** True Line Result
    -    #this sets the new velocity of the ball once it has collided with this peg
    -** Processing line: ~    def collide args~
    +     (There is also a ceil method, which returns an integer number greater than or equal to the original
    +** Processing line: ~     with no decimal. If we had called ceil on the variable a, the result would have been 14.)~
     - Inside source: true
     *** True Line Result
    -    def collide args
    -** Processing line: ~      normalOfRCCollision = [                                                     #this is the normal of the collision in COMPONENT FORM~
    +     with no decimal. If we had called ceil on the variable a, the result would have been 14.)
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      normalOfRCCollision = [                                                     #this is the normal of the collision in COMPONENT FORM
    -** Processing line: ~        {x: @center.x, y: @center.y},                                             #see https://www.google.com/url?sa=i&url=https%3A%2F%2Fwww.mathscard.co.uk%2Fonline%2Fcircle-coordinate-geometry%2F&psig=AOvVaw2GcD-e2-nJR_IUKpw3hO98&ust=1605731315521000&source=images&cd=vfe&ved=0CAIQjRxqFwoTCMjBo7e1iu0CFQAAAAAdAAAAABAD~
    +
    +** Processing line: ~   Reminders:~
     - Inside source: true
     *** True Line Result
    -        {x: @center.x, y: @center.y},                                             #see https://www.google.com/url?sa=i&url=https%3A%2F%2Fwww.mathscard.co.uk%2Fonline%2Fcircle-coordinate-geometry%2F&psig=AOvVaw2GcD-e2-nJR_IUKpw3hO98&ust=1605731315521000&source=images&cd=vfe&ved=0CAIQjRxqFwoTCMjBo7e1iu0CFQAAAAAdAAAAABAD
    -** Processing line: ~        {x: args.state.ball.center.x, y: args.state.ball.center.y},~
    +   Reminders:
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        {x: args.state.ball.center.x, y: args.state.ball.center.y},
    -** Processing line: ~      ]~
    +
    +** Processing line: ~   - Hashes: Collection of unique keys and their corresponding values. The value can be found~
     - Inside source: true
     *** True Line Result
    -      ]
    +   - Hashes: Collection of unique keys and their corresponding values. The value can be found
    +** Processing line: ~     using their keys.~
    +- Inside source: true
    +*** True Line Result
    +     using their keys.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      normalSlope = (                                                             #normalSlope is the slope of normalOfRCCollision~
    +** Processing line: ~     For example, if we have a "numbers" hash that stores numbers in English as the~
     - Inside source: true
     *** True Line Result
    -      normalSlope = (                                                             #normalSlope is the slope of normalOfRCCollision
    -** Processing line: ~        (normalOfRCCollision[1].y - normalOfRCCollision[0].y) /~
    +     For example, if we have a "numbers" hash that stores numbers in English as the
    +** Processing line: ~     key and numbers in Spanish as the value, we'd have a hash that looks like this...~
     - Inside source: true
     *** True Line Result
    -        (normalOfRCCollision[1].y - normalOfRCCollision[0].y) /
    -** Processing line: ~        (normalOfRCCollision[1].x - normalOfRCCollision[0].x)~
    +     key and numbers in Spanish as the value, we'd have a hash that looks like this...
    +** Processing line: ~     numbers = { "one" => "uno", "two" => "dos", "three" => "tres" }~
     - Inside source: true
     *** True Line Result
    -        (normalOfRCCollision[1].x - normalOfRCCollision[0].x)
    -** Processing line: ~      )~
    +     numbers = { "one" => "uno", "two" => "dos", "three" => "tres" }
    +** Processing line: ~     and on it goes.~
     - Inside source: true
     *** True Line Result
    -      )
    -** Processing line: ~      slope = normalSlope**-1.0 * -1                                              # slope is the slope of the tangent~
    +     and on it goes.
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      slope = normalSlope**-1.0 * -1                                              # slope is the slope of the tangent
    -** Processing line: ~      # args.state.display_value = slope~
    +
    +** Processing line: ~     Now if we wanted to find the corresponding value of the "one" key, we could say~
     - Inside source: true
     *** True Line Result
    -      # args.state.display_value = slope
    -** Processing line: ~      pointA = {                                                                  # pointA and pointB are using the var slope to tangent in COMPONENT FORM~
    +     Now if we wanted to find the corresponding value of the "one" key, we could say
    +** Processing line: ~     puts numbers["one"]~
     - Inside source: true
     *** True Line Result
    -      pointA = {                                                                  # pointA and pointB are using the var slope to tangent in COMPONENT FORM
    -** Processing line: ~        x: args.state.ball.center.x-1,~
    +     puts numbers["one"]
    +** Processing line: ~     which would print "uno" to the console.~
     - Inside source: true
     *** True Line Result
    -        x: args.state.ball.center.x-1,
    -** Processing line: ~        y: -(slope-args.state.ball.center.y)~
    +     which would print "uno" to the console.
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        y: -(slope-args.state.ball.center.y)
    -** Processing line: ~      }~
    +
    +** Processing line: ~   - args.state.new_entity: Used when we want to create a new object, like a sprite or button.~
     - Inside source: true
     *** True Line Result
    -      }
    -** Processing line: ~      pointB = {~
    +   - args.state.new_entity: Used when we want to create a new object, like a sprite or button.
    +** Processing line: ~     In this sample app, new_entity is used to create a new button that clears the grid.~
     - Inside source: true
     *** True Line Result
    -      pointB = {
    -** Processing line: ~        x: args.state.ball.center.x+1,~
    +     In this sample app, new_entity is used to create a new button that clears the grid.
    +** Processing line: ~     (Remember, you can use state to define ANY property and it will be retained across frames.)~
     - Inside source: true
     *** True Line Result
    -        x: args.state.ball.center.x+1,
    -** Processing line: ~        y: slope+args.state.ball.center.y~
    +     (Remember, you can use state to define ANY property and it will be retained across frames.)
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        y: slope+args.state.ball.center.y
    -** Processing line: ~      }~
    +
    +** Processing line: ~   - args.inputs.mouse.click.point.(x|y): The x and y location of the mouse.~
     - Inside source: true
     *** True Line Result
    -      }
    +   - args.inputs.mouse.click.point.(x|y): The x and y location of the mouse.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      perpVect = {x: pointB.x - pointA.x, y:pointB.y - pointA.y}                  # perpVect is to be VECTOR of the perpendicular tangent~
    -- Inside source: true
    -*** True Line Result
    -      perpVect = {x: pointB.x - pointA.x, y:pointB.y - pointA.y}                  # perpVect is to be VECTOR of the perpendicular tangent
    -** Processing line: ~      mag  = (perpVect.x**2 + perpVect.y**2)**0.5                                 # find the magniude of the perpVect~
    +** Processing line: ~   - args.inputs.mouse.click.point.created_at: The frame the mouse click occurred in.~
     - Inside source: true
     *** True Line Result
    -      mag  = (perpVect.x**2 + perpVect.y**2)**0.5                                 # find the magniude of the perpVect
    -** Processing line: ~      perpVect = {x: perpVect.x/(mag), y: perpVect.y/(mag)}                       # divide the perpVect by the magniude to make it a unit vector~
    +   - args.inputs.mouse.click.point.created_at: The frame the mouse click occurred in.
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      perpVect = {x: perpVect.x/(mag), y: perpVect.y/(mag)}                       # divide the perpVect by the magniude to make it a unit vector
    -** Processing line: ~      perpVect = {x: -perpVect.y, y: perpVect.x}                                  # swap the x and y and multiply by -1 to make the vector perpendicular~
    +
    +** Processing line: ~   - args.outputs.labels: An array. The values in the array generate a label.~
     - Inside source: true
     *** True Line Result
    -      perpVect = {x: -perpVect.y, y: perpVect.x}                                  # swap the x and y and multiply by -1 to make the vector perpendicular
    -** Processing line: ~      args.state.display_value = perpVect~
    +   - args.outputs.labels: An array. The values in the array generate a label.
    +** Processing line: ~     The parameters are [X, Y, TEXT, SIZE, ALIGN, RED, GREEN, BLUE, ALPHA, FONT STYLE]~
     - Inside source: true
     *** True Line Result
    -      args.state.display_value = perpVect
    -** Processing line: ~      if perpVect.y > 0                                                           #ensure perpVect points upward~
    +     The parameters are [X, Y, TEXT, SIZE, ALIGN, RED, GREEN, BLUE, ALPHA, FONT STYLE]
    +** Processing line: ~     For more information about labels, go to mygame/documentation/02-labels.md.~
     - Inside source: true
     *** True Line Result
    -      if perpVect.y > 0                                                           #ensure perpVect points upward
    -** Processing line: ~        perpVect = {x: perpVect.x*-1, y: perpVect.y*-1}~
    +     For more information about labels, go to mygame/documentation/02-labels.md.
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        perpVect = {x: perpVect.x*-1, y: perpVect.y*-1}
    -** Processing line: ~      end~
    +
    +** Processing line: ~   - ARRAY#inside_rect?: Returns true or false depending on if the point is inside the rect.~
     - Inside source: true
     *** True Line Result
    -      end
    +   - ARRAY#inside_rect?: Returns true or false depending on if the point is inside the rect.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      previousPosition = {                                                        # calculate an ESTIMATE of the previousPosition of the ball~
    +** Processing line: ~  =end~
     - Inside source: true
     *** True Line Result
    -      previousPosition = {                                                        # calculate an ESTIMATE of the previousPosition of the ball
    -** Processing line: ~        x:args.state.ball.center.x-args.state.ball.velocity.x,~
    +  =end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        x:args.state.ball.center.x-args.state.ball.velocity.x,
    -** Processing line: ~        y:args.state.ball.center.y-args.state.ball.velocity.y~
    +
    +** Processing line: ~  # This sample app shows an empty grid that the user can paint on.~
     - Inside source: true
     *** True Line Result
    -        y:args.state.ball.center.y-args.state.ball.velocity.y
    -** Processing line: ~      }~
    +  # This sample app shows an empty grid that the user can paint on.
    +** Processing line: ~  # To paint, the user must keep their mouse presssed and drag it around the grid.~
    +- Inside source: true
    +*** True Line Result
    +  # To paint, the user must keep their mouse presssed and drag it around the grid.
    +** Processing line: ~  # The "clear" button allows users to clear the grid so they can start over.~
     - Inside source: true
     *** True Line Result
    -      }
    +  # The "clear" button allows users to clear the grid so they can start over.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      yInterc = pointA.y + -slope*pointA.x~
    +** Processing line: ~  class PaintApp~
     - Inside source: true
     *** True Line Result
    -      yInterc = pointA.y + -slope*pointA.x
    -** Processing line: ~      if slope == INFINITY                                                        # the perpVect presently either points in the correct dirrection or it is 180 degrees off we need to correct this~
    +  class PaintApp
    +** Processing line: ~    attr_accessor :inputs, :state, :outputs, :grid, :args~
     - Inside source: true
     *** True Line Result
    -      if slope == INFINITY                                                        # the perpVect presently either points in the correct dirrection or it is 180 degrees off we need to correct this
    -** Processing line: ~        if previousPosition.x < pointA.x~
    +    attr_accessor :inputs, :state, :outputs, :grid, :args
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        if previousPosition.x < pointA.x
    -** Processing line: ~          perpVect = {x: perpVect.x*-1, y: perpVect.y*-1}~
    +
    +** Processing line: ~    # Runs methods necessary for the game to function properly.~
     - Inside source: true
     *** True Line Result
    -          perpVect = {x: perpVect.x*-1, y: perpVect.y*-1}
    -** Processing line: ~          yInterc = -INFINITY~
    +    # Runs methods necessary for the game to function properly.
    +** Processing line: ~    def tick~
     - Inside source: true
     *** True Line Result
    -          yInterc = -INFINITY
    -** Processing line: ~        end~
    +    def tick
    +** Processing line: ~      print_title~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~      elsif previousPosition.y < slope*previousPosition.x + yInterc               # check if ball is bellow or above the collider to determine if perpVect is - or +~
    +      print_title
    +** Processing line: ~      add_grid~
     - Inside source: true
     *** True Line Result
    -      elsif previousPosition.y < slope*previousPosition.x + yInterc               # check if ball is bellow or above the collider to determine if perpVect is - or +
    -** Processing line: ~        perpVect = {x: perpVect.x*-1, y: perpVect.y*-1}~
    +      add_grid
    +** Processing line: ~      check_click~
     - Inside source: true
     *** True Line Result
    -        perpVect = {x: perpVect.x*-1, y: perpVect.y*-1}
    -** Processing line: ~      end~
    +      check_click
    +** Processing line: ~      draw_buttons~
     - Inside source: true
     *** True Line Result
    -      end
    +      draw_buttons
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      velocityMag =                                                               # the current velocity magnitude of the ball~
    +** Processing line: ~    # Prints the title onto the screen by using a label.~
     - Inside source: true
     *** True Line Result
    -      velocityMag =                                                               # the current velocity magnitude of the ball
    -** Processing line: ~        (args.state.ball.velocity.x**2 + args.state.ball.velocity.y**2)**0.5~
    +    # Prints the title onto the screen by using a label.
    +** Processing line: ~    # Also separates the title from the grid with a line as a horizontal separator.~
     - Inside source: true
     *** True Line Result
    -        (args.state.ball.velocity.x**2 + args.state.ball.velocity.y**2)**0.5
    -** Processing line: ~      theta_ball=~
    +    # Also separates the title from the grid with a line as a horizontal separator.
    +** Processing line: ~    def print_title~
     - Inside source: true
     *** True Line Result
    -      theta_ball=
    -** Processing line: ~        Math.atan2(args.state.ball.velocity.y,args.state.ball.velocity.x)         #the angle of the ball's velocity~
    +    def print_title
    +** Processing line: ~      args.outputs.labels << [ 640, 700, 'Paint!', 0, 1 ]~
     - Inside source: true
     *** True Line Result
    -        Math.atan2(args.state.ball.velocity.y,args.state.ball.velocity.x)         #the angle of the ball's velocity
    -** Processing line: ~      theta_repel=~
    +      args.outputs.labels << [ 640, 700, 'Paint!', 0, 1 ]
    +** Processing line: ~      outputs.lines << horizontal_separator(660, 0, 1280)~
     - Inside source: true
     *** True Line Result
    -      theta_repel=
    -** Processing line: ~        Math.atan2(args.state.ball.center.y,args.state.ball.center.x)             #the angle of the repelling force(perpVect)~
    +      outputs.lines << horizontal_separator(660, 0, 1280)
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -        Math.atan2(args.state.ball.center.y,args.state.ball.center.x)             #the angle of the repelling force(perpVect)
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      fbx = velocityMag * Math.cos(theta_ball)                                    #the x component of the ball's velocity~
    -- Inside source: true
    -*** True Line Result
    -      fbx = velocityMag * Math.cos(theta_ball)                                    #the x component of the ball's velocity
    -** Processing line: ~      fby = velocityMag * Math.sin(theta_ball)                                    #the y component of the ball's velocity~
    +** Processing line: ~    # Sets the starting position, ending position, and color for the horizontal separator.~
     - Inside source: true
     *** True Line Result
    -      fby = velocityMag * Math.sin(theta_ball)                                    #the y component of the ball's velocity
    -** Processing line: ~      repelMag = getRepelMagnitude(                                               # the magniude of the collision vector~
    +    # Sets the starting position, ending position, and color for the horizontal separator.
    +** Processing line: ~    # The starting and ending positions have the same y values.~
     - Inside source: true
     *** True Line Result
    -      repelMag = getRepelMagnitude(                                               # the magniude of the collision vector
    -** Processing line: ~        args,~
    +    # The starting and ending positions have the same y values.
    +** Processing line: ~    def horizontal_separator y, x, x2~
     - Inside source: true
     *** True Line Result
    -        args,
    -** Processing line: ~        fbx,~
    +    def horizontal_separator y, x, x2
    +** Processing line: ~      [x, y, x2, y, 150, 150, 150]~
     - Inside source: true
     *** True Line Result
    -        fbx,
    -** Processing line: ~        fby,~
    +      [x, y, x2, y, 150, 150, 150]
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -        fby,
    -** Processing line: ~        perpVect.x,~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        perpVect.x,
    -** Processing line: ~        perpVect.y,~
    +
    +** Processing line: ~    # Sets the starting position, ending position, and color for the vertical separator.~
     - Inside source: true
     *** True Line Result
    -        perpVect.y,
    -** Processing line: ~        (args.state.ball.velocity.x**2 + args.state.ball.velocity.y**2)**0.5~
    +    # Sets the starting position, ending position, and color for the vertical separator.
    +** Processing line: ~    # The starting and ending positions have the same x values.~
     - Inside source: true
     *** True Line Result
    -        (args.state.ball.velocity.x**2 + args.state.ball.velocity.y**2)**0.5
    -** Processing line: ~      )~
    +    # The starting and ending positions have the same x values.
    +** Processing line: ~    def vertical_separator x, y, y2~
     - Inside source: true
     *** True Line Result
    -      )
    -** Processing line: ~      frx = repelMag* Math.cos(theta_repel)                                       #the x component of the repel's velocity | magnitude is set to twice of fbx~
    +    def vertical_separator x, y, y2
    +** Processing line: ~      [x, y, x, y2, 150, 150, 150]~
     - Inside source: true
     *** True Line Result
    -      frx = repelMag* Math.cos(theta_repel)                                       #the x component of the repel's velocity | magnitude is set to twice of fbx
    -** Processing line: ~      fry = repelMag* Math.sin(theta_repel)                                       #the y component of the repel's velocity | magnitude is set to twice of fby~
    +      [x, y, x, y2, 150, 150, 150]
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      fry = repelMag* Math.sin(theta_repel)                                       #the y component of the repel's velocity | magnitude is set to twice of fby
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      fsumx = fbx+frx                            # sum of x forces~
    +** Processing line: ~    # Outputs a border and a grid containing empty squares onto the screen.~
     - Inside source: true
     *** True Line Result
    -      fsumx = fbx+frx                            # sum of x forces
    -** Processing line: ~      fsumy = fby+fry                            # sum of y forces~
    +    # Outputs a border and a grid containing empty squares onto the screen.
    +** Processing line: ~    def add_grid~
     - Inside source: true
     *** True Line Result
    -      fsumy = fby+fry                            # sum of y forces
    -** Processing line: ~      fr = velocityMag                           # fr is the resulting magnitude~
    +    def add_grid
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      fr = velocityMag                           # fr is the resulting magnitude
    -** Processing line: ~      thetaNew = Math.atan2(fsumy, fsumx)        # thetaNew is the resulting angle~
    +
    +** Processing line: ~      # Sets the x, y, height, and width of the grid.~
     - Inside source: true
     *** True Line Result
    -      thetaNew = Math.atan2(fsumy, fsumx)        # thetaNew is the resulting angle
    -** Processing line: ~      xnew = fr*Math.cos(thetaNew)               # resulting x velocity~
    +      # Sets the x, y, height, and width of the grid.
    +** Processing line: ~      # There are 31 horizontal lines and 31 vertical lines in the grid.~
     - Inside source: true
     *** True Line Result
    -      xnew = fr*Math.cos(thetaNew)               # resulting x velocity
    -** Processing line: ~      ynew = fr*Math.sin(thetaNew)               # resulting y velocity~
    +      # There are 31 horizontal lines and 31 vertical lines in the grid.
    +** Processing line: ~      # Feel free to count them yourself before continuing!~
     - Inside source: true
     *** True Line Result
    -      ynew = fr*Math.sin(thetaNew)               # resulting y velocity
    -** Processing line: ~      if (args.state.ball.center.x >= @center.x) # this is necessary for the ball colliding on the right side of the peg~
    +      # Feel free to count them yourself before continuing!
    +** Processing line: ~      x, y, h, w = 640 - 500/2, 640 - 500, 500, 500 # calculations done so the grid appears in screen's center~
     - Inside source: true
     *** True Line Result
    -      if (args.state.ball.center.x >= @center.x) # this is necessary for the ball colliding on the right side of the peg
    -** Processing line: ~        xnew=xnew.abs~
    +      x, y, h, w = 640 - 500/2, 640 - 500, 500, 500 # calculations done so the grid appears in screen's center
    +** Processing line: ~      lines_h = 31~
     - Inside source: true
     *** True Line Result
    -        xnew=xnew.abs
    -** Processing line: ~      end~
    +      lines_h = 31
    +** Processing line: ~      lines_v = 31~
     - Inside source: true
     *** True Line Result
    -      end
    +      lines_v = 31
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      args.state.ball.velocity.x = xnew                                           # set the x-velocity to the new velocity~
    -- Inside source: true
    -*** True Line Result
    -      args.state.ball.velocity.x = xnew                                           # set the x-velocity to the new velocity
    -** Processing line: ~      if args.state.ball.center.y > @center.y                                     # if the ball is above the middle of the peg we need to temporarily ignore some of the gravity~
    +** Processing line: ~      # Sets values for the grid's border, grid lines, and filled squares.~
     - Inside source: true
     *** True Line Result
    -      if args.state.ball.center.y > @center.y                                     # if the ball is above the middle of the peg we need to temporarily ignore some of the gravity
    -** Processing line: ~        args.state.ball.velocity.y = ynew + GRAVITY * 0.01~
    +      # Sets values for the grid's border, grid lines, and filled squares.
    +** Processing line: ~      # The filled_squares variable is initially set to an empty array.~
     - Inside source: true
     *** True Line Result
    -        args.state.ball.velocity.y = ynew + GRAVITY * 0.01
    -** Processing line: ~      else~
    +      # The filled_squares variable is initially set to an empty array.
    +** Processing line: ~      state.grid_border ||= [ x, y, h, w ] # definition of grid's outer border~
     - Inside source: true
     *** True Line Result
    -      else
    -** Processing line: ~        args.state.ball.velocity.y = ynew - GRAVITY * 0.01                        # if the ball is bellow the middle of the peg we need to temporarily increase the power of the gravity~
    +      state.grid_border ||= [ x, y, h, w ] # definition of grid's outer border
    +** Processing line: ~      state.grid_lines ||= draw_grid(x, y, h, w, lines_h, lines_v) # calls draw_grid method~
     - Inside source: true
     *** True Line Result
    -        args.state.ball.velocity.y = ynew - GRAVITY * 0.01                        # if the ball is bellow the middle of the peg we need to temporarily increase the power of the gravity
    -** Processing line: ~      end~
    +      state.grid_lines ||= draw_grid(x, y, h, w, lines_h, lines_v) # calls draw_grid method
    +** Processing line: ~      state.filled_squares ||= [] # there are no filled squares until the user fills them in~
     - Inside source: true
     *** True Line Result
    -      end
    +      state.filled_squares ||= [] # there are no filled squares until the user fills them in
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      args.state.ball.center.x+= args.state.ball.velocity.x                       # update the position of the ball so it never looks like the ball is intersecting the circle~
    +** Processing line: ~      # Outputs the grid lines, border, and filled squares onto the screen.~
     - Inside source: true
     *** True Line Result
    -      args.state.ball.center.x+= args.state.ball.velocity.x                       # update the position of the ball so it never looks like the ball is intersecting the circle
    -** Processing line: ~      args.state.ball.center.y+= args.state.ball.velocity.y~
    +      # Outputs the grid lines, border, and filled squares onto the screen.
    +** Processing line: ~      outputs.lines.concat state.grid_lines~
     - Inside source: true
     *** True Line Result
    -      args.state.ball.center.y+= args.state.ball.velocity.y
    -** Processing line: ~    end~
    +      outputs.lines.concat state.grid_lines
    +** Processing line: ~      outputs.borders << state.grid_border~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~  end~
    +      outputs.borders << state.grid_border
    +** Processing line: ~      outputs.solids << state.filled_squares~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +      outputs.solids << state.filled_squares
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~#+end_src~
    -- Line was identified as the end of a code block.
    -*** True Line Result
    -#+end_src
    +    end
     ** Processing line: ~~
    -- End of paragraph detected.
    +- Inside source: true
     *** True Line Result
     
    -** Processing line: ~*** Physics And Collisions - Bouncing On Collision - vector2d.rb~
    -- Header detected.
    +** Processing line: ~    # Draws the grid by adding in vertical and horizontal separators.~
    +- Inside source: true
     *** True Line Result
    -
    +    # Draws the grid by adding in vertical and horizontal separators.
    +** Processing line: ~    def draw_grid x, y, h, w, lines_h, lines_v~
    +- Inside source: true
     *** True Line Result
    -*** Physics And Collisions - Bouncing On Collision - vector2d.rb
    -** Processing line: ~#+begin_src ruby~
    -- Line was identified as the beginning of a code block.
    +    def draw_grid x, y, h, w, lines_h, lines_v
    +** Processing line: ~~
    +- Inside source: true
     *** True Line Result
     
    +** Processing line: ~      # The grid starts off empty.~
    +- Inside source: true
     *** True Line Result
    -#+begin_src ruby
    -** Processing line: ~  # ./samples/04_physics_and_collisions/08_bouncing_on_collision/app/vector2d.rb~
    +      # The grid starts off empty.
    +** Processing line: ~      grid = []~
     - Inside source: true
     *** True Line Result
    -  # ./samples/04_physics_and_collisions/08_bouncing_on_collision/app/vector2d.rb
    -** Processing line: ~  class Vector2d~
    +      grid = []
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  class Vector2d
    -** Processing line: ~      attr_accessor :x, :y~
    +
    +** Processing line: ~      # Calculates the placement and adds horizontal lines or separators into the grid.~
     - Inside source: true
     *** True Line Result
    -      attr_accessor :x, :y
    -** Processing line: ~~
    +      # Calculates the placement and adds horizontal lines or separators into the grid.
    +** Processing line: ~      curr_y = y # start at the bottom of the box~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      def initialize x=0, y=0~
    +      curr_y = y # start at the bottom of the box
    +** Processing line: ~      dist_y = h / (lines_h + 1) # finds distance to place horizontal lines evenly throughout 500 height of grid~
     - Inside source: true
     *** True Line Result
    -      def initialize x=0, y=0
    -** Processing line: ~        @x=x~
    +      dist_y = h / (lines_h + 1) # finds distance to place horizontal lines evenly throughout 500 height of grid
    +** Processing line: ~      lines_h.times do~
     - Inside source: true
     *** True Line Result
    -        @x=x
    -** Processing line: ~        @y=y~
    +      lines_h.times do
    +** Processing line: ~        curr_y += dist_y # increment curr_y by the distance between the horizontal lines~
     - Inside source: true
     *** True Line Result
    -        @y=y
    +        curr_y += dist_y # increment curr_y by the distance between the horizontal lines
    +** Processing line: ~        grid << horizontal_separator(curr_y, x, x + w - 1) # add a separator into the grid~
    +- Inside source: true
    +*** True Line Result
    +        grid << horizontal_separator(curr_y, x, x + w - 1) # add a separator into the grid
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    @@ -32204,34 +40471,30 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      #returns a vector multiplied by scalar x~
    -- Inside source: true
    -*** True Line Result
    -      #returns a vector multiplied by scalar x
    -** Processing line: ~      #x [float] scalar~
    +** Processing line: ~      # Calculates the placement and adds vertical lines or separators into the grid.~
     - Inside source: true
     *** True Line Result
    -      #x [float] scalar
    -** Processing line: ~      def mult x~
    +      # Calculates the placement and adds vertical lines or separators into the grid.
    +** Processing line: ~      curr_x = x # now start at the left of the box~
     - Inside source: true
     *** True Line Result
    -      def mult x
    -** Processing line: ~        r = Vector2d.new(0,0)~
    +      curr_x = x # now start at the left of the box
    +** Processing line: ~      dist_x = w / (lines_v + 1) # finds distance to place vertical lines evenly throughout 500 width of grid~
     - Inside source: true
     *** True Line Result
    -        r = Vector2d.new(0,0)
    -** Processing line: ~        r.x=@x*x~
    +      dist_x = w / (lines_v + 1) # finds distance to place vertical lines evenly throughout 500 width of grid
    +** Processing line: ~      lines_v.times do~
     - Inside source: true
     *** True Line Result
    -        r.x=@x*x
    -** Processing line: ~        r.y=@y*x~
    +      lines_v.times do
    +** Processing line: ~        curr_x += dist_x # increment curr_x by the distance between the vertical lines~
     - Inside source: true
     *** True Line Result
    -        r.y=@y*x
    -** Processing line: ~        r~
    +        curr_x += dist_x # increment curr_x by the distance between the vertical lines
    +** Processing line: ~        grid << vertical_separator(curr_x, y + 1, y  + h) # add separator~
     - Inside source: true
     *** True Line Result
    -        r
    +        grid << vertical_separator(curr_x, y + 1, y  + h) # add separator
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    @@ -32240,66 +40503,70 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      # vect [Vector2d] vector to copy~
    +** Processing line: ~      # paint_grid uses a hash to assign values to keys.~
     - Inside source: true
     *** True Line Result
    -      # vect [Vector2d] vector to copy
    -** Processing line: ~      def copy vect~
    +      # paint_grid uses a hash to assign values to keys.
    +** Processing line: ~      state.paint_grid ||= {"x" => x, "y" => y, "h" => h, "w" => w, "lines_h" => lines_h,~
     - Inside source: true
     *** True Line Result
    -      def copy vect
    -** Processing line: ~        Vector2d.new(@x, @y)~
    +      state.paint_grid ||= {"x" => x, "y" => y, "h" => h, "w" => w, "lines_h" => lines_h,
    +** Processing line: ~                            "lines_v" => lines_v, "dist_x" => dist_x,~
     - Inside source: true
     *** True Line Result
    -        Vector2d.new(@x, @y)
    -** Processing line: ~      end~
    +                            "lines_v" => lines_v, "dist_x" => dist_x,
    +** Processing line: ~                            "dist_y" => dist_y }~
     - Inside source: true
     *** True Line Result
    -      end
    +                            "dist_y" => dist_y }
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      #returns a new vector equivalent to this+vect~
    +** Processing line: ~      return grid~
     - Inside source: true
     *** True Line Result
    -      #returns a new vector equivalent to this+vect
    -** Processing line: ~      #vect [Vector2d] vector to add to self~
    +      return grid
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      #vect [Vector2d] vector to add to self
    -** Processing line: ~      def add vect~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      def add vect
    -** Processing line: ~        Vector2d.new(@x+vect.x,@y+vect.y)~
    +
    +** Processing line: ~    # Checks if the user is keeping the mouse pressed down and sets the mouse_hold variable accordingly using boolean values.~
     - Inside source: true
     *** True Line Result
    -        Vector2d.new(@x+vect.x,@y+vect.y)
    -** Processing line: ~      end~
    +    # Checks if the user is keeping the mouse pressed down and sets the mouse_hold variable accordingly using boolean values.
    +** Processing line: ~    # If the mouse is up, the user cannot drag the mouse.~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +    # If the mouse is up, the user cannot drag the mouse.
    +** Processing line: ~    def check_click~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      #returns a new vector equivalent to this-vect~
    +    def check_click
    +** Processing line: ~      if inputs.mouse.down #is mouse up or down?~
     - Inside source: true
     *** True Line Result
    -      #returns a new vector equivalent to this-vect
    -** Processing line: ~      #vect [Vector2d] vector to subtract to self~
    +      if inputs.mouse.down #is mouse up or down?
    +** Processing line: ~        state.mouse_held = true # mouse is being held down~
     - Inside source: true
     *** True Line Result
    -      #vect [Vector2d] vector to subtract to self
    -** Processing line: ~      def sub vect~
    +        state.mouse_held = true # mouse is being held down
    +** Processing line: ~      elsif inputs.mouse.up # if mouse is up~
     - Inside source: true
     *** True Line Result
    -      def sub vect
    -** Processing line: ~        Vector2d.new(@x-vect.c, @y-vect.y)~
    +      elsif inputs.mouse.up # if mouse is up
    +** Processing line: ~      state.mouse_held = false # mouse is not being held down or dragged~
     - Inside source: true
     *** True Line Result
    -        Vector2d.new(@x-vect.c, @y-vect.y)
    +      state.mouse_held = false # mouse is not being held down or dragged
    +** Processing line: ~        state.mouse_dragging = false~
    +- Inside source: true
    +*** True Line Result
    +        state.mouse_dragging = false
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    @@ -32308,18 +40575,22 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      #return the magnitude of the vector~
    +** Processing line: ~      if state.mouse_held &&    # mouse needs to be down~
     - Inside source: true
     *** True Line Result
    -      #return the magnitude of the vector
    -** Processing line: ~      def mag~
    +      if state.mouse_held &&    # mouse needs to be down
    +** Processing line: ~        !inputs.mouse.click &&     # must not be first click~
     - Inside source: true
     *** True Line Result
    -      def mag
    -** Processing line: ~        ((@x**2)+(@y**2))**0.5~
    +        !inputs.mouse.click &&     # must not be first click
    +** Processing line: ~        ((inputs.mouse.previous_click.point.x - inputs.mouse.position.x).abs > 15) # Need to move 15 pixels before "drag"~
     - Inside source: true
     *** True Line Result
    -        ((@x**2)+(@y**2))**0.5
    +        ((inputs.mouse.previous_click.point.x - inputs.mouse.position.x).abs > 15) # Need to move 15 pixels before "drag"
    +** Processing line: ~        state.mouse_dragging = true~
    +- Inside source: true
    +*** True Line Result
    +        state.mouse_dragging = true
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    @@ -32328,38 +40599,34 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      #returns a new normalize version of the vector~
    -- Inside source: true
    -*** True Line Result
    -      #returns a new normalize version of the vector
    -** Processing line: ~      def normalize~
    +** Processing line: ~      # If the user clicks their mouse inside the grid, the search_lines method is called with a click input type.~
     - Inside source: true
     *** True Line Result
    -      def normalize
    -** Processing line: ~        Vector2d.new(@x/mag, @y/mag)~
    +      # If the user clicks their mouse inside the grid, the search_lines method is called with a click input type.
    +** Processing line: ~      if ((inputs.mouse.click) && (inputs.mouse.click.point.inside_rect? state.grid_border))~
     - Inside source: true
     *** True Line Result
    -        Vector2d.new(@x/mag, @y/mag)
    -** Processing line: ~      end~
    +      if ((inputs.mouse.click) && (inputs.mouse.click.point.inside_rect? state.grid_border))
    +** Processing line: ~        search_lines(inputs.mouse.click.point, :click)~
     - Inside source: true
     *** True Line Result
    -      end
    +        search_lines(inputs.mouse.click.point, :click)
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      #TODO delet?~
    +** Processing line: ~      # If the user drags their mouse inside the grid, the search_lines method is called with a drag input type.~
     - Inside source: true
     *** True Line Result
    -      #TODO delet?
    -** Processing line: ~      def distABS vect~
    +      # If the user drags their mouse inside the grid, the search_lines method is called with a drag input type.
    +** Processing line: ~      elsif ((state.mouse_dragging) && (inputs.mouse.position.inside_rect? state.grid_border))~
     - Inside source: true
     *** True Line Result
    -      def distABS vect
    -** Processing line: ~        (((vect.x-@x)**2+(vect.y-@y)**2)**0.5).abs()~
    +      elsif ((state.mouse_dragging) && (inputs.mouse.position.inside_rect? state.grid_border))
    +** Processing line: ~        search_lines(inputs.mouse.position, :drag)~
     - Inside source: true
     *** True Line Result
    -        (((vect.x-@x)**2+(vect.y-@y)**2)**0.5).abs()
    +        search_lines(inputs.mouse.position, :drag)
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    @@ -32368,694 +40635,702 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
         end
    -** Processing line: ~#+end_src~
    -- Line was identified as the end of a code block.
    -*** True Line Result
    -#+end_src
     ** Processing line: ~~
    -- End of paragraph detected.
    -*** True Line Result
    -
    -** Processing line: ~*** Physics And Collisions - Arbitrary Collision - ball.rb~
    -- Header detected.
    -*** True Line Result
    -
    -*** True Line Result
    -*** Physics And Collisions - Arbitrary Collision - ball.rb
    -** Processing line: ~#+begin_src ruby~
    -- Line was identified as the beginning of a code block.
    -*** True Line Result
    -
    -*** True Line Result
    -#+begin_src ruby
    -** Processing line: ~  # ./samples/04_physics_and_collisions/09_arbitrary_collision/app/ball.rb~
     - Inside source: true
     *** True Line Result
    -  # ./samples/04_physics_and_collisions/09_arbitrary_collision/app/ball.rb
    -** Processing line: ~~
    +
    +** Processing line: ~    # Sets the definition of a grid box and handles user input to fill in or clear grid boxes.~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  class Ball~
    +    # Sets the definition of a grid box and handles user input to fill in or clear grid boxes.
    +** Processing line: ~    def search_lines (point, input_type)~
     - Inside source: true
     *** True Line Result
    -  class Ball
    -** Processing line: ~      attr_accessor :velocity, :child, :parent, :number, :leastChain~
    +    def search_lines (point, input_type)
    +** Processing line: ~      point.x -= state.paint_grid["x"] # subtracts the value assigned to the "x" key in the paint_grid hash~
     - Inside source: true
     *** True Line Result
    -      attr_accessor :velocity, :child, :parent, :number, :leastChain
    -** Processing line: ~      attr_reader :x, :y, :hypotenuse, :width, :height~
    +      point.x -= state.paint_grid["x"] # subtracts the value assigned to the "x" key in the paint_grid hash
    +** Processing line: ~      point.y -= state.paint_grid["y"] # subtracts the value assigned to the "y" key in the paint_grid hash~
     - Inside source: true
     *** True Line Result
    -      attr_reader :x, :y, :hypotenuse, :width, :height
    +      point.y -= state.paint_grid["y"] # subtracts the value assigned to the "y" key in the paint_grid hash
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      def initialize args, number, leastChain, parent, child~
    +** Processing line: ~      # Remove code following the .floor and see what happens when you try to fill in grid squares~
     - Inside source: true
     *** True Line Result
    -      def initialize args, number, leastChain, parent, child
    -** Processing line: ~          #Start the ball in the top center~
    +      # Remove code following the .floor and see what happens when you try to fill in grid squares
    +** Processing line: ~      point.x = (point.x / state.paint_grid["dist_x"]).floor * state.paint_grid["dist_x"]~
     - Inside source: true
     *** True Line Result
    -          #Start the ball in the top center
    -** Processing line: ~          @number = number~
    +      point.x = (point.x / state.paint_grid["dist_x"]).floor * state.paint_grid["dist_x"]
    +** Processing line: ~      point.y = (point.y / state.paint_grid["dist_y"]).floor * state.paint_grid["dist_y"]~
     - Inside source: true
     *** True Line Result
    -          @number = number
    -** Processing line: ~          @leastChain = leastChain~
    +      point.y = (point.y / state.paint_grid["dist_y"]).floor * state.paint_grid["dist_y"]
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          @leastChain = leastChain
    -** Processing line: ~          @x = args.grid.w / 2~
    +
    +** Processing line: ~      point.x += state.paint_grid["x"]~
     - Inside source: true
     *** True Line Result
    -          @x = args.grid.w / 2
    -** Processing line: ~          @y = args.grid.h - 20~
    +      point.x += state.paint_grid["x"]
    +** Processing line: ~      point.y += state.paint_grid["y"]~
     - Inside source: true
     *** True Line Result
    -          @y = args.grid.h - 20
    +      point.y += state.paint_grid["y"]
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~          @velocity = Vector2d.new(2, -2)~
    +** Processing line: ~      # Sets definition of a grid box, meaning its x, y, width, and height.~
     - Inside source: true
     *** True Line Result
    -          @velocity = Vector2d.new(2, -2)
    -** Processing line: ~          @width =  10~
    +      # Sets definition of a grid box, meaning its x, y, width, and height.
    +** Processing line: ~      # Floor is called on the point.x and point.y variables.~
     - Inside source: true
     *** True Line Result
    -          @width =  10
    -** Processing line: ~          @height = 10~
    +      # Floor is called on the point.x and point.y variables.
    +** Processing line: ~      # Ceil method is called on values of the distance hash keys, setting the width and height of a box.~
     - Inside source: true
     *** True Line Result
    -          @height = 10
    +      # Ceil method is called on values of the distance hash keys, setting the width and height of a box.
    +** Processing line: ~      grid_box = [ point.x.floor, point.y.floor, state.paint_grid["dist_x"].ceil, state.paint_grid["dist_y"].ceil ]~
    +- Inside source: true
    +*** True Line Result
    +      grid_box = [ point.x.floor, point.y.floor, state.paint_grid["dist_x"].ceil, state.paint_grid["dist_y"].ceil ]
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~          @left_wall = (args.state.board_width + args.grid.w / 8)~
    +** Processing line: ~      if input_type == :click # if user clicks their mouse~
     - Inside source: true
     *** True Line Result
    -          @left_wall = (args.state.board_width + args.grid.w / 8)
    -** Processing line: ~          @right_wall = @left_wall + args.state.board_width~
    +      if input_type == :click # if user clicks their mouse
    +** Processing line: ~        if state.filled_squares.include? grid_box # if grid box is already filled in~
     - Inside source: true
     *** True Line Result
    -          @right_wall = @left_wall + args.state.board_width
    -** Processing line: ~~
    +        if state.filled_squares.include? grid_box # if grid box is already filled in
    +** Processing line: ~          state.filled_squares.delete grid_box # box is cleared and removed from filled_squares~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~          @max_velocity = MAX_VELOCITY~
    +          state.filled_squares.delete grid_box # box is cleared and removed from filled_squares
    +** Processing line: ~        else~
     - Inside source: true
     *** True Line Result
    -          @max_velocity = MAX_VELOCITY
    -** Processing line: ~~
    +        else
    +** Processing line: ~          state.filled_squares << grid_box # otherwise, box is filled in and added to filled_squares~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~          @child = child~
    +          state.filled_squares << grid_box # otherwise, box is filled in and added to filled_squares
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -          @child = child
    -** Processing line: ~          @parent = parent~
    +        end
    +** Processing line: ~      elsif input_type == :drag # if user drags mouse~
     - Inside source: true
     *** True Line Result
    -          @parent = parent
    -** Processing line: ~~
    +      elsif input_type == :drag # if user drags mouse
    +** Processing line: ~        unless state.filled_squares.include? grid_box # unless the grid box dragged over is already filled in~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~          @past = [{x: @x, y: @y}]~
    +        unless state.filled_squares.include? grid_box # unless the grid box dragged over is already filled in
    +** Processing line: ~          state.filled_squares << grid_box # the box is filled in and added to filled_squares~
     - Inside source: true
     *** True Line Result
    -          @past = [{x: @x, y: @y}]
    -** Processing line: ~          @next = nil~
    +          state.filled_squares << grid_box # the box is filled in and added to filled_squares
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -          @next = nil
    +        end
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
           end
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      def reassignLeastChain (lc=nil)~
    +** Processing line: ~    # Creates and outputs a "Clear" button on the screen using a label and a border.~
     - Inside source: true
     *** True Line Result
    -      def reassignLeastChain (lc=nil)
    -** Processing line: ~        if (lc == nil)~
    +    # Creates and outputs a "Clear" button on the screen using a label and a border.
    +** Processing line: ~    # If the button is clicked, the filled squares are cleared, making the filled_squares collection empty.~
     - Inside source: true
     *** True Line Result
    -        if (lc == nil)
    -** Processing line: ~          lc = @number~
    +    # If the button is clicked, the filled squares are cleared, making the filled_squares collection empty.
    +** Processing line: ~    def draw_buttons~
     - Inside source: true
     *** True Line Result
    -          lc = @number
    -** Processing line: ~        end~
    +    def draw_buttons
    +** Processing line: ~      x, y, w, h = 390, 50, 240, 50~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~        @leastChain = lc~
    +      x, y, w, h = 390, 50, 240, 50
    +** Processing line: ~      state.clear_button        ||= state.new_entity(:button_with_fade)~
     - Inside source: true
     *** True Line Result
    -        @leastChain = lc
    -** Processing line: ~        if (parent != nil)~
    +      state.clear_button        ||= state.new_entity(:button_with_fade)
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        if (parent != nil)
    -** Processing line: ~          @parent.reassignLeastChain(lc)~
    +
    +** Processing line: ~      # The x and y positions are set to display the label in the center of the button.~
     - Inside source: true
     *** True Line Result
    -          @parent.reassignLeastChain(lc)
    -** Processing line: ~        end~
    +      # The x and y positions are set to display the label in the center of the button.
    +** Processing line: ~      # Try changing the first two parameters to simply x, y and see what happens to the text placement!~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~~
    +      # Try changing the first two parameters to simply x, y and see what happens to the text placement!
    +** Processing line: ~      state.clear_button.label  ||= [x + w.half, y + h.half + 10, "Clear", 0, 1] # placed in center of border~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      end~
    +      state.clear_button.label  ||= [x + w.half, y + h.half + 10, "Clear", 0, 1] # placed in center of border
    +** Processing line: ~      state.clear_button.border ||= [x, y, w, h]~
     - Inside source: true
     *** True Line Result
    -      end
    +      state.clear_button.border ||= [x, y, w, h]
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      def makeLeader args~
    +** Processing line: ~      # If the mouse is clicked inside the borders of the clear button,~
     - Inside source: true
     *** True Line Result
    -      def makeLeader args
    -** Processing line: ~        if isLeader~
    +      # If the mouse is clicked inside the borders of the clear button,
    +** Processing line: ~      # the filled_squares collection is emptied and the squares are cleared.~
     - Inside source: true
     *** True Line Result
    -        if isLeader
    -** Processing line: ~          return~
    +      # the filled_squares collection is emptied and the squares are cleared.
    +** Processing line: ~      if inputs.mouse.click && inputs.mouse.click.point.inside_rect?(state.clear_button.border)~
     - Inside source: true
     *** True Line Result
    -          return
    -** Processing line: ~        end~
    +      if inputs.mouse.click && inputs.mouse.click.point.inside_rect?(state.clear_button.border)
    +** Processing line: ~        state.clear_button.clicked_at = inputs.mouse.click.created_at # time (frame) the click occurred~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~        @parent.reassignLeastChain~
    +        state.clear_button.clicked_at = inputs.mouse.click.created_at # time (frame) the click occurred
    +** Processing line: ~        state.filled_squares.clear~
     - Inside source: true
     *** True Line Result
    -        @parent.reassignLeastChain
    -** Processing line: ~        args.state.ballParents.push(self)~
    +        state.filled_squares.clear
    +** Processing line: ~        inputs.mouse.previous_click = nil~
     - Inside source: true
     *** True Line Result
    -        args.state.ballParents.push(self)
    -** Processing line: ~        @parent = nil~
    +        inputs.mouse.previous_click = nil
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -        @parent = nil
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      end~
    +** Processing line: ~      outputs.labels << state.clear_button.label~
     - Inside source: true
     *** True Line Result
    -      end
    +      outputs.labels << state.clear_button.label
    +** Processing line: ~      outputs.borders << state.clear_button.border~
    +- Inside source: true
    +*** True Line Result
    +      outputs.borders << state.clear_button.border
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      def isLeader~
    +** Processing line: ~      # When the clear button is clicked, the color of the button changes~
     - Inside source: true
     *** True Line Result
    -      def isLeader
    -** Processing line: ~        return (parent == nil)~
    +      # When the clear button is clicked, the color of the button changes
    +** Processing line: ~      # and the transparency changes, as well. If you change the time from~
     - Inside source: true
     *** True Line Result
    -        return (parent == nil)
    -** Processing line: ~      end~
    +      # and the transparency changes, as well. If you change the time from
    +** Processing line: ~      # 0.25.seconds to 1.25.seconds or more, the change will last longer.~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +      # 0.25.seconds to 1.25.seconds or more, the change will last longer.
    +** Processing line: ~      if state.clear_button.clicked_at~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      def receiveNext (p)~
    +      if state.clear_button.clicked_at
    +** Processing line: ~        outputs.solids << [x, y, w, h, 0, 180, 80, 255 * state.clear_button.clicked_at.ease(0.25.seconds, :flip)]~
     - Inside source: true
     *** True Line Result
    -      def receiveNext (p)
    -** Processing line: ~        #trace!~
    +        outputs.solids << [x, y, w, h, 0, 180, 80, 255 * state.clear_button.clicked_at.ease(0.25.seconds, :flip)]
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -        #trace!
    -** Processing line: ~        if parent != nil~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -        if parent != nil
    -** Processing line: ~          @x = p[:x]~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -          @x = p[:x]
    -** Processing line: ~          @y = p[:y]~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          @y = p[:y]
    -** Processing line: ~          @velocity = p[:velocity]~
    +
    +** Processing line: ~  $paint_app = PaintApp.new~
     - Inside source: true
     *** True Line Result
    -          @velocity = p[:velocity]
    -** Processing line: ~          #puts @x.to_s + "|" + @y.to_s + "|"+@velocity.to_s~
    +  $paint_app = PaintApp.new
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          #puts @x.to_s + "|" + @y.to_s + "|"+@velocity.to_s
    -** Processing line: ~          @past.append(p)~
    +
    +** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
    -          @past.append(p)
    -** Processing line: ~          if (@past.length >= BALL_DISTANCE)~
    +  def tick args
    +** Processing line: ~    $paint_app.inputs = args.inputs~
     - Inside source: true
     *** True Line Result
    -          if (@past.length >= BALL_DISTANCE)
    -** Processing line: ~            if (@child != nil)~
    +    $paint_app.inputs = args.inputs
    +** Processing line: ~    $paint_app.state = args.state~
     - Inside source: true
     *** True Line Result
    -            if (@child != nil)
    -** Processing line: ~              @child.receiveNext(@past[0])~
    +    $paint_app.state = args.state
    +** Processing line: ~    $paint_app.grid = args.grid~
     - Inside source: true
     *** True Line Result
    -              @child.receiveNext(@past[0])
    -** Processing line: ~              @past.shift~
    +    $paint_app.grid = args.grid
    +** Processing line: ~    $paint_app.args = args~
     - Inside source: true
     *** True Line Result
    -              @past.shift
    -** Processing line: ~            end~
    +    $paint_app.args = args
    +** Processing line: ~    $paint_app.outputs = args.outputs~
     - Inside source: true
     *** True Line Result
    -            end
    -** Processing line: ~          end~
    +    $paint_app.outputs = args.outputs
    +** Processing line: ~    $paint_app.tick~
     - Inside source: true
     *** True Line Result
    -          end
    -** Processing line: ~        end~
    +    $paint_app.tick
    +** Processing line: ~    tick_instructions args, "How to create a simple paint app. CLICK and HOLD to draw."~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~      end~
    +    tick_instructions args, "How to create a simple paint app. CLICK and HOLD to draw."
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -      end
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      #Move the ball according to its velocity~
    -- Inside source: true
    -*** True Line Result
    -      #Move the ball according to its velocity
    -** Processing line: ~      def update args~
    +** Processing line: ~  def tick_instructions args, text, y = 715~
     - Inside source: true
     *** True Line Result
    -      def update args
    -** Processing line: ~~
    +  def tick_instructions args, text, y = 715
    +** Processing line: ~    return if args.state.key_event_occurred~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~          if isLeader~
    +    return if args.state.key_event_occurred
    +** Processing line: ~    if args.inputs.mouse.click ||~
     - Inside source: true
     *** True Line Result
    -          if isLeader
    -** Processing line: ~            wallBounds args~
    +    if args.inputs.mouse.click ||
    +** Processing line: ~       args.inputs.keyboard.directional_vector ||~
     - Inside source: true
     *** True Line Result
    -            wallBounds args
    -** Processing line: ~            @x += @velocity.x~
    +       args.inputs.keyboard.directional_vector ||
    +** Processing line: ~       args.inputs.keyboard.key_down.enter ||~
     - Inside source: true
     *** True Line Result
    -            @x += @velocity.x
    -** Processing line: ~            @y += @velocity.y~
    +       args.inputs.keyboard.key_down.enter ||
    +** Processing line: ~       args.inputs.keyboard.key_down.escape~
     - Inside source: true
     *** True Line Result
    -            @y += @velocity.y
    -** Processing line: ~            @past.append({x: @x, y: @y, velocity: @velocity})~
    +       args.inputs.keyboard.key_down.escape
    +** Processing line: ~      args.state.key_event_occurred = true~
     - Inside source: true
     *** True Line Result
    -            @past.append({x: @x, y: @y, velocity: @velocity})
    -** Processing line: ~            #puts @past~
    +      args.state.key_event_occurred = true
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -            #puts @past
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~            if (@past.length >= BALL_DISTANCE)~
    +** Processing line: ~    args.outputs.debug << [0, y - 50, 1280, 60].solid~
     - Inside source: true
     *** True Line Result
    -            if (@past.length >= BALL_DISTANCE)
    -** Processing line: ~              if (@child != nil)~
    +    args.outputs.debug << [0, y - 50, 1280, 60].solid
    +** Processing line: ~    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label~
     - Inside source: true
     *** True Line Result
    -              if (@child != nil)
    -** Processing line: ~                @child.receiveNext(@past[0])~
    +    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label
    +** Processing line: ~    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label~
     - Inside source: true
     *** True Line Result
    -                @child.receiveNext(@past[0])
    -** Processing line: ~                @past.shift~
    +    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -                @past.shift
    -** Processing line: ~              end~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -              end
    -** Processing line: ~            end~
    -- Inside source: true
    +
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
     *** True Line Result
    -            end
    +#+end_src
     ** Processing line: ~~
    -- Inside source: true
    +- End of paragraph detected.
     *** True Line Result
     
    -** Processing line: ~          else~
    -- Inside source: true
    +** Processing line: ~*** Mouse - Coordinate Systems - main.rb~
    +- Header detected.
     *** True Line Result
    -          else
    -** Processing line: ~            puts "unexpected"~
    -- Inside source: true
    +
     *** True Line Result
    -            puts "unexpected"
    -** Processing line: ~            raise "unexpected"~
    -- Inside source: true
    +*** Mouse - Coordinate Systems - main.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
     *** True Line Result
    -            raise "unexpected"
    -** Processing line: ~          end~
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/05_mouse/04_coordinate_systems/app/main.rb~
     - Inside source: true
     *** True Line Result
    -          end
    -** Processing line: ~      end~
    +  # ./samples/05_mouse/04_coordinate_systems/app/main.rb
    +** Processing line: ~  =begin~
     - Inside source: true
     *** True Line Result
    -      end
    +  =begin
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      def wallBounds args~
    +** Processing line: ~   APIs listing that haven't been encountered in previous sample apps:~
     - Inside source: true
     *** True Line Result
    -      def wallBounds args
    -** Processing line: ~          b= false~
    +   APIs listing that haven't been encountered in previous sample apps:
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          b= false
    -** Processing line: ~          if @x < @left_wall~
    +
    +** Processing line: ~   - args.inputs.mouse.click.position: Coordinates of the mouse's position on the screen.~
     - Inside source: true
     *** True Line Result
    -          if @x < @left_wall
    -** Processing line: ~            @velocity.x = @velocity.x.abs() * 1~
    +   - args.inputs.mouse.click.position: Coordinates of the mouse's position on the screen.
    +** Processing line: ~     Unlike args.inputs.mouse.click.point, the mouse does not need to be pressed down for~
     - Inside source: true
     *** True Line Result
    -            @velocity.x = @velocity.x.abs() * 1
    -** Processing line: ~            b=true~
    +     Unlike args.inputs.mouse.click.point, the mouse does not need to be pressed down for
    +** Processing line: ~     position to know the mouse's coordinates.~
     - Inside source: true
     *** True Line Result
    -            b=true
    -** Processing line: ~          elsif @x + @width > @right_wall~
    +     position to know the mouse's coordinates.
    +** Processing line: ~     For more information about the mouse, go to mygame/documentation/07-mouse.md.~
     - Inside source: true
     *** True Line Result
    -          elsif @x + @width > @right_wall
    -** Processing line: ~            @velocity.x = @velocity.x.abs() * -1~
    +     For more information about the mouse, go to mygame/documentation/07-mouse.md.
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -            @velocity.x = @velocity.x.abs() * -1
    -** Processing line: ~            b=true~
    +
    +** Processing line: ~   Reminders:~
     - Inside source: true
     *** True Line Result
    -            b=true
    -** Processing line: ~          end~
    +   Reminders:
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          end
    -** Processing line: ~          if @y < 0~
    +
    +** Processing line: ~   - args.inputs.mouse.click: This property will be set if the mouse was clicked.~
     - Inside source: true
     *** True Line Result
    -          if @y < 0
    -** Processing line: ~            @velocity.y = @velocity.y.abs() * 1~
    +   - args.inputs.mouse.click: This property will be set if the mouse was clicked.
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -            @velocity.y = @velocity.y.abs() * 1
    -** Processing line: ~            b=true~
    +
    +** Processing line: ~   - args.inputs.mouse.click.point.(x|y): The x and y location of the mouse.~
     - Inside source: true
     *** True Line Result
    -            b=true
    -** Processing line: ~          elsif @y + @height > args.grid.h~
    +   - args.inputs.mouse.click.point.(x|y): The x and y location of the mouse.
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          elsif @y + @height > args.grid.h
    -** Processing line: ~            @velocity.y = @velocity.y.abs() * -1~
    +
    +** Processing line: ~   - String interpolation: Uses #{} syntax; everything between the #{ and the } is evaluated~
     - Inside source: true
     *** True Line Result
    -            @velocity.y = @velocity.y.abs() * -1
    -** Processing line: ~            b=true~
    +   - String interpolation: Uses #{} syntax; everything between the #{ and the } is evaluated
    +** Processing line: ~     as Ruby code, and the placeholder is replaced with its corresponding value or result.~
     - Inside source: true
     *** True Line Result
    -            b=true
    -** Processing line: ~          end~
    +     as Ruby code, and the placeholder is replaced with its corresponding value or result.
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          end
    -** Processing line: ~          mag = (@velocity.x**2.0 + @velocity.y**2.0)**0.5~
    +
    +** Processing line: ~     In this sample app, string interpolation is used to show the current position of the mouse~
     - Inside source: true
     *** True Line Result
    -          mag = (@velocity.x**2.0 + @velocity.y**2.0)**0.5
    -** Processing line: ~          if (b == true && mag < MAX_VELOCITY)~
    +     In this sample app, string interpolation is used to show the current position of the mouse
    +** Processing line: ~     in a label.~
     - Inside source: true
     *** True Line Result
    -          if (b == true && mag < MAX_VELOCITY)
    -** Processing line: ~            @velocity.x*=1.1;~
    +     in a label.
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -            @velocity.x*=1.1;
    -** Processing line: ~            @velocity.y*=1.1;~
    +
    +** Processing line: ~   - args.outputs.labels: An array that generates a label.~
     - Inside source: true
     *** True Line Result
    -            @velocity.y*=1.1;
    -** Processing line: ~          end~
    +   - args.outputs.labels: An array that generates a label.
    +** Processing line: ~     The parameters are [X, Y, TEXT, SIZE, ALIGN, RED, GREEN, BLUE, ALPHA, FONT STYLE]~
     - Inside source: true
     *** True Line Result
    -          end
    +     The parameters are [X, Y, TEXT, SIZE, ALIGN, RED, GREEN, BLUE, ALPHA, FONT STYLE]
    +** Processing line: ~     For more information about labels, go to mygame/documentation/02-labels.md.~
    +- Inside source: true
    +*** True Line Result
    +     For more information about labels, go to mygame/documentation/02-labels.md.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      end~
    +** Processing line: ~   - args.outputs.solids: An array that generates a solid.~
     - Inside source: true
     *** True Line Result
    -      end
    +   - args.outputs.solids: An array that generates a solid.
    +** Processing line: ~     The parameters are [X, Y, WIDTH, HEIGHT, RED, GREEN, BLUE, ALPHA]~
    +- Inside source: true
    +*** True Line Result
    +     The parameters are [X, Y, WIDTH, HEIGHT, RED, GREEN, BLUE, ALPHA]
    +** Processing line: ~     For more information about solids, go to mygame/documentation/03-solids-and-borders.md.~
    +- Inside source: true
    +*** True Line Result
    +     For more information about solids, go to mygame/documentation/03-solids-and-borders.md.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      #render the ball to the screen~
    +** Processing line: ~   - args.outputs.lines: An array that generates a line.~
     - Inside source: true
     *** True Line Result
    -      #render the ball to the screen
    -** Processing line: ~      def draw args~
    +   - args.outputs.lines: An array that generates a line.
    +** Processing line: ~     The parameters are [X, Y, X2, Y2, RED, GREEN, BLUE, ALPHA]~
     - Inside source: true
     *** True Line Result
    -      def draw args
    +     The parameters are [X, Y, X2, Y2, RED, GREEN, BLUE, ALPHA]
    +** Processing line: ~     For more information about lines, go to mygame/documentation/04-lines.md.~
    +- Inside source: true
    +*** True Line Result
    +     For more information about lines, go to mygame/documentation/04-lines.md.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~          #update args~
    +** Processing line: ~  =end~
     - Inside source: true
     *** True Line Result
    -          #update args
    -** Processing line: ~          #args.outputs.solids << [@x, @y, @width, @height, 255, 255, 0];~
    +  =end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          #args.outputs.solids << [@x, @y, @width, @height, 255, 255, 0];
    -** Processing line: ~          #args.outputs.sprits << {~
    +
    +** Processing line: ~  # This sample app shows a coordinate system or grid. The user can move their mouse around the screen and the~
     - Inside source: true
     *** True Line Result
    -          #args.outputs.sprits << {
    -** Processing line: ~            #x: @x,~
    +  # This sample app shows a coordinate system or grid. The user can move their mouse around the screen and the
    +** Processing line: ~  # coordinates of their position on the screen will be displayed. Users can choose to view one quadrant or~
     - Inside source: true
     *** True Line Result
    -            #x: @x,
    -** Processing line: ~            #y: @y,~
    +  # coordinates of their position on the screen will be displayed. Users can choose to view one quadrant or
    +** Processing line: ~  # four quadrants by pressing the button.~
     - Inside source: true
     *** True Line Result
    -            #y: @y,
    -** Processing line: ~            #w: @width,~
    +  # four quadrants by pressing the button.
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -            #w: @width,
    -** Processing line: ~            #h: @height,~
    +
    +** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
    -            #h: @height,
    -** Processing line: ~            #path: "sprites/ball10.png"~
    +  def tick args
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -            #path: "sprites/ball10.png"
    -** Processing line: ~          #}~
    +
    +** Processing line: ~    # The addition and subtraction in the first two parameters of the label and solid~
     - Inside source: true
     *** True Line Result
    -          #}
    -** Processing line: ~          #args.outputs.sprites <<[@x, @y, @width, @height, "sprites/ball10.png"]~
    +    # The addition and subtraction in the first two parameters of the label and solid
    +** Processing line: ~    # ensure that the outputs don't overlap each other. Try removing them and see what happens.~
     - Inside source: true
     *** True Line Result
    -          #args.outputs.sprites <<[@x, @y, @width, @height, "sprites/ball10.png"]
    -** Processing line: ~          args.outputs.sprites << {x: @x, y: @y, w: @width, h: @height, path:"sprites/ball10.png" }~
    +    # ensure that the outputs don't overlap each other. Try removing them and see what happens.
    +** Processing line: ~    pos = args.inputs.mouse.position # stores coordinates of mouse's position~
     - Inside source: true
     *** True Line Result
    -          args.outputs.sprites << {x: @x, y: @y, w: @width, h: @height, path:"sprites/ball10.png" }
    -** Processing line: ~      end~
    +    pos = args.inputs.mouse.position # stores coordinates of mouse's position
    +** Processing line: ~    args.outputs.labels << [pos.x + 10, pos.y + 10, "#{pos}"] # outputs label of coordinates~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +    args.outputs.labels << [pos.x + 10, pos.y + 10, "#{pos}"] # outputs label of coordinates
    +** Processing line: ~    args.outputs.solids << [pos.x -  2, pos.y - 2, 5, 5] # outputs small blackk box placed where mouse is hovering~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      def getDraw args~
    +    args.outputs.solids << [pos.x -  2, pos.y - 2, 5, 5] # outputs small blackk box placed where mouse is hovering
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      def getDraw args
    -** Processing line: ~        #wallBounds args~
    +
    +** Processing line: ~    button = [0, 0, 370, 50] # sets definition of toggle button~
     - Inside source: true
     *** True Line Result
    -        #wallBounds args
    -** Processing line: ~        #update args~
    +    button = [0, 0, 370, 50] # sets definition of toggle button
    +** Processing line: ~    args.outputs.borders << button # outputs button as border (not filled in)~
     - Inside source: true
     *** True Line Result
    -        #update args
    -** Processing line: ~        #args.outputs.labels << [@x, @y, @number.to_s + "|" + @leastChain.to_s]~
    +    args.outputs.borders << button # outputs button as border (not filled in)
    +** Processing line: ~    args.outputs.labels << [10, 35, "click here toggle coordinate system"] # label of button~
     - Inside source: true
     *** True Line Result
    -        #args.outputs.labels << [@x, @y, @number.to_s + "|" + @leastChain.to_s]
    -** Processing line: ~        return [@x, @y, @width, @height, "sprites/ball10.png"]~
    +    args.outputs.labels << [10, 35, "click here toggle coordinate system"] # label of button
    +** Processing line: ~    args.outputs.lines << [    0, -720,    0, 720] # vertical line dividing quadrants~
     - Inside source: true
     *** True Line Result
    -        return [@x, @y, @width, @height, "sprites/ball10.png"]
    -** Processing line: ~      end~
    +    args.outputs.lines << [    0, -720,    0, 720] # vertical line dividing quadrants
    +** Processing line: ~    args.outputs.lines << [-1280,    0, 1280,   0] # horizontal line dividing quadrants~
     - Inside source: true
     *** True Line Result
    -      end
    +    args.outputs.lines << [-1280,    0, 1280,   0] # horizontal line dividing quadrants
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      def getPoints args~
    +** Processing line: ~    if args.inputs.mouse.click # if the user clicks the mouse~
     - Inside source: true
     *** True Line Result
    -      def getPoints args
    -** Processing line: ~        points = [~
    +    if args.inputs.mouse.click # if the user clicks the mouse
    +** Processing line: ~      pos = args.inputs.mouse.click.point # pos's value is point where user clicked (coordinates)~
     - Inside source: true
     *** True Line Result
    -        points = [
    -** Processing line: ~          {x:@x+@width/2, y: @y},~
    +      pos = args.inputs.mouse.click.point # pos's value is point where user clicked (coordinates)
    +** Processing line: ~      if pos.inside_rect? button # if the click occurred inside the button~
     - Inside source: true
     *** True Line Result
    -          {x:@x+@width/2, y: @y},
    -** Processing line: ~          {x:@x+@width, y:@y+@height/2},~
    +      if pos.inside_rect? button # if the click occurred inside the button
    +** Processing line: ~        if args.grid.name == :bottom_left # if the grid shows bottom left as origin~
     - Inside source: true
     *** True Line Result
    -          {x:@x+@width, y:@y+@height/2},
    -** Processing line: ~          {x:@x+@width/2,y:@y+@height},~
    +        if args.grid.name == :bottom_left # if the grid shows bottom left as origin
    +** Processing line: ~          args.grid.origin_center! # origin will be shown in center~
     - Inside source: true
     *** True Line Result
    -          {x:@x+@width/2,y:@y+@height},
    -** Processing line: ~          {x:@x,y:@y+@height/2}~
    +          args.grid.origin_center! # origin will be shown in center
    +** Processing line: ~        else~
     - Inside source: true
     *** True Line Result
    -          {x:@x,y:@y+@height/2}
    -** Processing line: ~        ]~
    +        else
    +** Processing line: ~          args.grid.origin_bottom_left! # otherwise, the view will change to show bottom left as origin~
     - Inside source: true
     *** True Line Result
    -        ]
    -** Processing line: ~        #psize = 5.0~
    +          args.grid.origin_bottom_left! # otherwise, the view will change to show bottom left as origin
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -        #psize = 5.0
    -** Processing line: ~        #for p in points~
    +        end
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -        #for p in points
    -** Processing line: ~          #args.outputs.solids << [p.x-psize/2.0, p.y-psize/2.0, psize, psize, 0, 0, 0];~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -          #args.outputs.solids << [p.x-psize/2.0, p.y-psize/2.0, psize, psize, 0, 0, 0];
    -** Processing line: ~        #end~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        #end
    -** Processing line: ~        return points~
    +
    +** Processing line: ~    tick_instructions args, "Sample app shows the two supported coordinate systems in Game Toolkit."~
     - Inside source: true
     *** True Line Result
    -        return points
    -** Processing line: ~      end~
    +    tick_instructions args, "Sample app shows the two supported coordinate systems in Game Toolkit."
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -      end
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      def serialize~
    +** Processing line: ~  def tick_instructions args, text, y = 715~
     - Inside source: true
     *** True Line Result
    -      def serialize
    -** Processing line: ~        {x: @x, y:@y}~
    +  def tick_instructions args, text, y = 715
    +** Processing line: ~    return if args.state.key_event_occurred~
     - Inside source: true
     *** True Line Result
    -        {x: @x, y:@y}
    -** Processing line: ~      end~
    +    return if args.state.key_event_occurred
    +** Processing line: ~    if args.inputs.mouse.click ||~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +    if args.inputs.mouse.click ||
    +** Processing line: ~       args.inputs.keyboard.directional_vector ||~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      def inspect~
    +       args.inputs.keyboard.directional_vector ||
    +** Processing line: ~       args.inputs.keyboard.key_down.enter ||~
     - Inside source: true
     *** True Line Result
    -      def inspect
    -** Processing line: ~        serialize.to_s~
    +       args.inputs.keyboard.key_down.enter ||
    +** Processing line: ~       args.inputs.keyboard.key_down.escape~
     - Inside source: true
     *** True Line Result
    -        serialize.to_s
    -** Processing line: ~      end~
    +       args.inputs.keyboard.key_down.escape
    +** Processing line: ~      args.state.key_event_occurred = true~
     - Inside source: true
     *** True Line Result
    -      end
    +      args.state.key_event_occurred = true
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      def to_s~
    +** Processing line: ~    args.outputs.debug << [0, y - 50, 1280, 60].solid~
     - Inside source: true
     *** True Line Result
    -      def to_s
    -** Processing line: ~        serialize.to_s~
    +    args.outputs.debug << [0, y - 50, 1280, 60].solid
    +** Processing line: ~    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label~
     - Inside source: true
     *** True Line Result
    -        serialize.to_s
    -** Processing line: ~      end~
    +    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label
    +** Processing line: ~    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    end
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
    @@ -33068,250 +41343,254 @@ Follows is a source code listing for all files that have been open sourced. This
     - End of paragraph detected.
     *** True Line Result
     
    -** Processing line: ~*** Physics And Collisions - Arbitrary Collision - blocks.rb~
    +** Processing line: ~*** Save Load - Save Load Game - main.rb~
     - Header detected.
     *** True Line Result
     
     *** True Line Result
    -*** Physics And Collisions - Arbitrary Collision - blocks.rb
    +*** Save Load - Save Load Game - main.rb
     ** Processing line: ~#+begin_src ruby~
     - Line was identified as the beginning of a code block.
     *** True Line Result
     
     *** True Line Result
     #+begin_src ruby
    -** Processing line: ~  # ./samples/04_physics_and_collisions/09_arbitrary_collision/app/blocks.rb~
    +** Processing line: ~  # ./samples/06_save_load/01_save_load_game/app/main.rb~
     - Inside source: true
     *** True Line Result
    -  # ./samples/04_physics_and_collisions/09_arbitrary_collision/app/blocks.rb
    -** Processing line: ~  MAX_COUNT=100~
    +  # ./samples/06_save_load/01_save_load_game/app/main.rb
    +** Processing line: ~  =begin~
     - Inside source: true
     *** True Line Result
    -  MAX_COUNT=100
    +  =begin
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def universalUpdateOne args, shape~
    +** Processing line: ~   APIs listing that haven't been encountered in previous sample apps:~
     - Inside source: true
     *** True Line Result
    -  def universalUpdateOne args, shape
    -** Processing line: ~    didHit = false~
    +   APIs listing that haven't been encountered in previous sample apps:
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    didHit = false
    -** Processing line: ~    hitters = []~
    +
    +** Processing line: ~   - Symbol (:): Ruby object with a name and an internal ID. Symbols are useful~
     - Inside source: true
     *** True Line Result
    -    hitters = []
    -** Processing line: ~    #puts shape.to_s~
    +   - Symbol (:): Ruby object with a name and an internal ID. Symbols are useful
    +** Processing line: ~     because with a given symbol name, you can refer to the same object throughout~
     - Inside source: true
     *** True Line Result
    -    #puts shape.to_s
    -** Processing line: ~    toCollide = nil~
    +     because with a given symbol name, you can refer to the same object throughout
    +** Processing line: ~     a Ruby program.~
     - Inside source: true
     *** True Line Result
    -    toCollide = nil
    -** Processing line: ~    for b in args.state.balls~
    +     a Ruby program.
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    for b in args.state.balls
    -** Processing line: ~      if [b.x, b.y, b.width, b.height].intersect_rect?(shape.bold)~
    +
    +** Processing line: ~     In this sample app, we're using symbols for our buttons. We have buttons that~
     - Inside source: true
     *** True Line Result
    -      if [b.x, b.y, b.width, b.height].intersect_rect?(shape.bold)
    -** Processing line: ~        didSquare = false~
    +     In this sample app, we're using symbols for our buttons. We have buttons that
    +** Processing line: ~     light fires, save, load, etc. Each of these buttons has a distinct symbol like~
     - Inside source: true
     *** True Line Result
    -        didSquare = false
    -** Processing line: ~        for s in shape.squareColliders~
    +     light fires, save, load, etc. Each of these buttons has a distinct symbol like
    +** Processing line: ~     :light_fire, :save_game, :load_game, etc.~
     - Inside source: true
     *** True Line Result
    -        for s in shape.squareColliders
    -** Processing line: ~          if (s.collision?(args, b))~
    +     :light_fire, :save_game, :load_game, etc.
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          if (s.collision?(args, b))
    -** Processing line: ~            didSquare = true~
    +
    +** Processing line: ~   - to_sym: Returns the symbol corresponding to the given string; creates the symbol~
     - Inside source: true
     *** True Line Result
    -            didSquare = true
    -** Processing line: ~            didHit = true~
    +   - to_sym: Returns the symbol corresponding to the given string; creates the symbol
    +** Processing line: ~     if it does not already exist.~
     - Inside source: true
     *** True Line Result
    -            didHit = true
    -** Processing line: ~            #s.collide(args, b)~
    +     if it does not already exist.
    +** Processing line: ~     For example,~
     - Inside source: true
     *** True Line Result
    -            #s.collide(args, b)
    -** Processing line: ~            toCollide = s~
    +     For example,
    +** Processing line: ~     'car'.to_sym~
     - Inside source: true
     *** True Line Result
    -            toCollide = s
    -** Processing line: ~            #hitter = b~
    +     'car'.to_sym
    +** Processing line: ~     would return the symbol :car.~
     - Inside source: true
     *** True Line Result
    -            #hitter = b
    -** Processing line: ~            hitters.append(b)~
    +     would return the symbol :car.
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -            hitters.append(b)
    -** Processing line: ~          end #end if~
    +
    +** Processing line: ~   - last: Returns the last element of an array.~
     - Inside source: true
     *** True Line Result
    -          end #end if
    -** Processing line: ~        end #end for~
    +   - last: Returns the last element of an array.
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        end #end for
    -** Processing line: ~        if (didSquare == false)~
    +
    +** Processing line: ~   Reminders:~
     - Inside source: true
     *** True Line Result
    -        if (didSquare == false)
    -** Processing line: ~          for c in shape.colliders~
    +   Reminders:
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          for c in shape.colliders
    -** Processing line: ~            #puts args.state.ball.velocity~
    +
    +** Processing line: ~   - num1.lesser(num2): finds the lower value of the given options.~
     - Inside source: true
     *** True Line Result
    -            #puts args.state.ball.velocity
    -** Processing line: ~            if c.collision?(args, b.getPoints(args),b)~
    +   - num1.lesser(num2): finds the lower value of the given options.
    +** Processing line: ~     For example, in the statement~
     - Inside source: true
     *** True Line Result
    -            if c.collision?(args, b.getPoints(args),b)
    -** Processing line: ~              #c.collide args, b~
    +     For example, in the statement
    +** Processing line: ~     a = 4.lesser(3)~
     - Inside source: true
     *** True Line Result
    -              #c.collide args, b
    -** Processing line: ~              toCollide = c~
    +     a = 4.lesser(3)
    +** Processing line: ~     3 has a lower value than 4, which means that the value of a would be set to 3,~
     - Inside source: true
     *** True Line Result
    -              toCollide = c
    -** Processing line: ~              didHit = true~
    +     3 has a lower value than 4, which means that the value of a would be set to 3,
    +** Processing line: ~     but if the statement had been~
     - Inside source: true
     *** True Line Result
    -              didHit = true
    -** Processing line: ~              hitters.append(b)~
    +     but if the statement had been
    +** Processing line: ~     a = 4.lesser(5)~
     - Inside source: true
     *** True Line Result
    -              hitters.append(b)
    -** Processing line: ~            end #end if~
    +     a = 4.lesser(5)
    +** Processing line: ~     4 has a lower value than 5, which means that the value of a would be set to 4.~
     - Inside source: true
     *** True Line Result
    -            end #end if
    -** Processing line: ~          end #end for~
    +     4 has a lower value than 5, which means that the value of a would be set to 4.
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          end #end for
    -** Processing line: ~        end #end if~
    +
    +** Processing line: ~   - num1.fdiv(num2): returns the float division (will have a decimal) of the two given numbers.~
     - Inside source: true
     *** True Line Result
    -        end #end if
    -** Processing line: ~      end#end if~
    +   - num1.fdiv(num2): returns the float division (will have a decimal) of the two given numbers.
    +** Processing line: ~     For example, 5.fdiv(2) = 2.5 and 5.fdiv(5) = 1.0~
     - Inside source: true
     *** True Line Result
    -      end#end if
    -** Processing line: ~    end#end for~
    +     For example, 5.fdiv(2) = 2.5 and 5.fdiv(5) = 1.0
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    end#end for
    -** Processing line: ~    if (didHit)~
    +
    +** Processing line: ~   - String interpolation: uses #{} syntax; everything between the #{ and the } is evaluated~
     - Inside source: true
     *** True Line Result
    -    if (didHit)
    -** Processing line: ~      shape.count=0~
    +   - String interpolation: uses #{} syntax; everything between the #{ and the } is evaluated
    +** Processing line: ~     as Ruby code, and the placeholder is replaced with its corresponding value or result.~
     - Inside source: true
     *** True Line Result
    -      shape.count=0
    -** Processing line: ~      hitters = hitters.uniq~
    +     as Ruby code, and the placeholder is replaced with its corresponding value or result.
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      hitters = hitters.uniq
    -** Processing line: ~      for hitter in hitters~
    +
    +** Processing line: ~   - args.outputs.labels: An array. Values generate a label.~
     - Inside source: true
     *** True Line Result
    -      for hitter in hitters
    -** Processing line: ~        hitter.makeLeader args~
    +   - args.outputs.labels: An array. Values generate a label.
    +** Processing line: ~     Parameters are [X, Y, TEXT, SIZE, ALIGN, RED, GREEN, BLUE, ALPHA, FONT STYLE]~
     - Inside source: true
     *** True Line Result
    -        hitter.makeLeader args
    -** Processing line: ~        #toCollide.collide(args, hitter)~
    +     Parameters are [X, Y, TEXT, SIZE, ALIGN, RED, GREEN, BLUE, ALPHA, FONT STYLE]
    +** Processing line: ~     For more information, go to mygame/documentation/02-labels.md.~
     - Inside source: true
     *** True Line Result
    -        #toCollide.collide(args, hitter)
    -** Processing line: ~        if shape.home == "squares"~
    +     For more information, go to mygame/documentation/02-labels.md.
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        if shape.home == "squares"
    -** Processing line: ~          args.state.squares.delete(shape)~
    +
    +** Processing line: ~   - ARRAY#inside_rect?: An array with at least two values is considered a point. An array~
     - Inside source: true
     *** True Line Result
    -          args.state.squares.delete(shape)
    -** Processing line: ~        elsif shape.home == "tshapes"~
    +   - ARRAY#inside_rect?: An array with at least two values is considered a point. An array
    +** Processing line: ~     with at least four values is considered a rect. The inside_rect? function returns true~
     - Inside source: true
     *** True Line Result
    -        elsif shape.home == "tshapes"
    -** Processing line: ~          args.state.tshapes.delete(shape)~
    +     with at least four values is considered a rect. The inside_rect? function returns true
    +** Processing line: ~     or false depending on if the point is inside the rect.~
     - Inside source: true
     *** True Line Result
    -          args.state.tshapes.delete(shape)
    -** Processing line: ~        else shape.home == "lines"~
    +     or false depending on if the point is inside the rect.
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        else shape.home == "lines"
    -** Processing line: ~          args.state.lines.delete(shape)~
    +
    +** Processing line: ~  =end~
     - Inside source: true
     *** True Line Result
    -          args.state.lines.delete(shape)
    -** Processing line: ~        end~
    +  =end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~      end~
    +
    +** Processing line: ~  # This code allows users to perform different tasks, such as saving and loading the game.~
     - Inside source: true
     *** True Line Result
    -      end
    +  # This code allows users to perform different tasks, such as saving and loading the game.
    +** Processing line: ~  # Users also have options to reset the game and light a fire.~
    +- Inside source: true
    +*** True Line Result
    +  # Users also have options to reset the game and light a fire.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      #puts "HIT!" + hitter.number~
    +** Processing line: ~  class TextedBasedGame~
     - Inside source: true
     *** True Line Result
    -      #puts "HIT!" + hitter.number
    -** Processing line: ~    end~
    +  class TextedBasedGame
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~  end~
    +
    +** Processing line: ~    # Contains methods needed for game to run properly.~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +    # Contains methods needed for game to run properly.
    +** Processing line: ~    # Increments tick count by 1 each time it runs (60 times in a single second)~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def universalUpdate args, shape~
    +    # Increments tick count by 1 each time it runs (60 times in a single second)
    +** Processing line: ~    def tick~
     - Inside source: true
     *** True Line Result
    -  def universalUpdate args, shape
    -** Processing line: ~    #puts shape.home~
    +    def tick
    +** Processing line: ~      default~
     - Inside source: true
     *** True Line Result
    -    #puts shape.home
    -** Processing line: ~    if (shape.count <= 1)~
    +      default
    +** Processing line: ~      show_intro~
     - Inside source: true
     *** True Line Result
    -    if (shape.count <= 1)
    -** Processing line: ~      universalUpdateOne args, shape~
    +      show_intro
    +** Processing line: ~      state.engine_tick_count += 1~
     - Inside source: true
     *** True Line Result
    -      universalUpdateOne args, shape
    -** Processing line: ~      return~
    +      state.engine_tick_count += 1
    +** Processing line: ~      tick_fire~
     - Inside source: true
     *** True Line Result
    -      return
    +      tick_fire
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -33320,1770 +41599,1654 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    didHit = false~
    -- Inside source: true
    -*** True Line Result
    -    didHit = false
    -** Processing line: ~    hitter = nil~
    -- Inside source: true
    -*** True Line Result
    -    hitter = nil
    -** Processing line: ~    for b in args.state.ballParents~
    -- Inside source: true
    -*** True Line Result
    -    for b in args.state.ballParents
    -** Processing line: ~      if [b.x, b.y, b.width, b.height].intersect_rect?(shape.bold)~
    +** Processing line: ~    # Sets default values.~
     - Inside source: true
     *** True Line Result
    -      if [b.x, b.y, b.width, b.height].intersect_rect?(shape.bold)
    -** Processing line: ~        didSquare = false~
    +    # Sets default values.
    +** Processing line: ~    # The ||= ensures that a variable's value is only set to the value following the = sign~
     - Inside source: true
     *** True Line Result
    -        didSquare = false
    -** Processing line: ~        for s in shape.squareColliders~
    +    # The ||= ensures that a variable's value is only set to the value following the = sign
    +** Processing line: ~    # if the value has not already been set before. Intialization happens only in the first frame.~
     - Inside source: true
     *** True Line Result
    -        for s in shape.squareColliders
    -** Processing line: ~          if (s.collision?(args, b))~
    +    # if the value has not already been set before. Intialization happens only in the first frame.
    +** Processing line: ~    def default~
     - Inside source: true
     *** True Line Result
    -          if (s.collision?(args, b))
    -** Processing line: ~            didSquare = true~
    +    def default
    +** Processing line: ~      state.engine_tick_count ||= 0~
     - Inside source: true
     *** True Line Result
    -            didSquare = true
    -** Processing line: ~            didHit = true~
    +      state.engine_tick_count ||= 0
    +** Processing line: ~      state.active_module     ||= :room~
     - Inside source: true
     *** True Line Result
    -            didHit = true
    -** Processing line: ~            s.collide(args, b)~
    +      state.active_module     ||= :room
    +** Processing line: ~      state.fire_progress     ||= 0~
     - Inside source: true
     *** True Line Result
    -            s.collide(args, b)
    -** Processing line: ~            hitter = b~
    +      state.fire_progress     ||= 0
    +** Processing line: ~      state.fire_ready_in     ||= 10~
     - Inside source: true
     *** True Line Result
    -            hitter = b
    -** Processing line: ~          end~
    +      state.fire_ready_in     ||= 10
    +** Processing line: ~      state.previous_fire     ||= :dead~
     - Inside source: true
     *** True Line Result
    -          end
    -** Processing line: ~        end~
    +      state.previous_fire     ||= :dead
    +** Processing line: ~      state.fire              ||= :dead~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~        if (didSquare == false)~
    +      state.fire              ||= :dead
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -        if (didSquare == false)
    -** Processing line: ~          for c in shape.colliders~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          for c in shape.colliders
    -** Processing line: ~            #puts args.state.ball.velocity~
    +
    +** Processing line: ~    def show_intro~
     - Inside source: true
     *** True Line Result
    -            #puts args.state.ball.velocity
    -** Processing line: ~            if c.collision?(args, b.getPoints(args),b)~
    +    def show_intro
    +** Processing line: ~      return unless state.engine_tick_count == 0 # return unless the game just started~
     - Inside source: true
     *** True Line Result
    -            if c.collision?(args, b.getPoints(args),b)
    -** Processing line: ~              c.collide args, b~
    +      return unless state.engine_tick_count == 0 # return unless the game just started
    +** Processing line: ~      set_story_line "awake." # calls set_story_line method, sets to "awake"~
     - Inside source: true
     *** True Line Result
    -              c.collide args, b
    -** Processing line: ~              didHit = true~
    +      set_story_line "awake." # calls set_story_line method, sets to "awake"
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -              didHit = true
    -** Processing line: ~              hitter = b~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -              hitter = b
    -** Processing line: ~            end~
    +
    +** Processing line: ~    # Sets story line.~
     - Inside source: true
     *** True Line Result
    -            end
    -** Processing line: ~          end~
    +    # Sets story line.
    +** Processing line: ~    def set_story_line story_line~
     - Inside source: true
     *** True Line Result
    -          end
    -** Processing line: ~        end~
    +    def set_story_line story_line
    +** Processing line: ~      state.story_line    = story_line # story line set to value of parameter~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~      end~
    +      state.story_line    = story_line # story line set to value of parameter
    +** Processing line: ~      state.active_module = :alert # active module set to alert~
     - Inside source: true
     *** True Line Result
    -      end
    +      state.active_module = :alert # active module set to alert
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
         end
    -** Processing line: ~    if (didHit)~
    -- Inside source: true
    -*** True Line Result
    -    if (didHit)
    -** Processing line: ~      shape.count=shape.count-1~
    -- Inside source: true
    -*** True Line Result
    -      shape.count=shape.count-1
    -** Processing line: ~      shape.damageCount.append([(hitter.leastChain+1 - hitter.number)-1, args.state.tick_count])~
    -- Inside source: true
    -*** True Line Result
    -      shape.damageCount.append([(hitter.leastChain+1 - hitter.number)-1, args.state.tick_count])
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    end~
    +** Processing line: ~    # Clears story line.~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~    i=0~
    +    # Clears story line.
    +** Processing line: ~    def clear_storyline~
     - Inside source: true
     *** True Line Result
    -    i=0
    -** Processing line: ~    while i < shape.damageCount.length~
    +    def clear_storyline
    +** Processing line: ~      state.active_module = :none # active module set to none~
     - Inside source: true
     *** True Line Result
    -    while i < shape.damageCount.length
    -** Processing line: ~      if shape.damageCount[i][0] <= 0~
    +      state.active_module = :none # active module set to none
    +** Processing line: ~      state.story_line = nil # story line is cleared, set to nil (or empty)~
     - Inside source: true
     *** True Line Result
    -      if shape.damageCount[i][0] <= 0
    -** Processing line: ~        shape.damageCount.delete_at(i)~
    +      state.story_line = nil # story line is cleared, set to nil (or empty)
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -        shape.damageCount.delete_at(i)
    -** Processing line: ~        i-=1~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        i-=1
    -** Processing line: ~      elsif shape.damageCount[i][1].elapsed_time > BALL_DISTANCE and shape.damageCount[i][0] > 1~
    +
    +** Processing line: ~    # Determines fire progress (how close the fire is to being ready to light).~
     - Inside source: true
     *** True Line Result
    -      elsif shape.damageCount[i][1].elapsed_time > BALL_DISTANCE and shape.damageCount[i][0] > 1
    -** Processing line: ~        shape.count-=1~
    +    # Determines fire progress (how close the fire is to being ready to light).
    +** Processing line: ~    def tick_fire~
     - Inside source: true
     *** True Line Result
    -        shape.count-=1
    -** Processing line: ~        shape.damageCount[i][0]-=1~
    +    def tick_fire
    +** Processing line: ~      return if state.active_module == :alert # return if active module is alert~
     - Inside source: true
     *** True Line Result
    -        shape.damageCount[i][0]-=1
    -** Processing line: ~        shape.damageCount[i][1] = args.state.tick_count~
    +      return if state.active_module == :alert # return if active module is alert
    +** Processing line: ~      state.fire_progress += 1 # increment fire progress~
     - Inside source: true
     *** True Line Result
    -        shape.damageCount[i][1] = args.state.tick_count
    -** Processing line: ~      end~
    +      state.fire_progress += 1 # increment fire progress
    +** Processing line: ~      # fire_ready_in is 10. The fire_progress is either the current value or 10, whichever has a lower value.~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~      i+=1~
    +      # fire_ready_in is 10. The fire_progress is either the current value or 10, whichever has a lower value.
    +** Processing line: ~      state.fire_progress = state.fire_progress.lesser(state.fire_ready_in)~
     - Inside source: true
     *** True Line Result
    -      i+=1
    +      state.fire_progress = state.fire_progress.lesser(state.fire_ready_in)
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
         end
    -** Processing line: ~  end~
    -- Inside source: true
    -*** True Line Result
    -  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~~
    -- Inside source: true
    -*** True Line Result
    -
    -** Processing line: ~  class Square~
    -- Inside source: true
    -*** True Line Result
    -  class Square
    -** Processing line: ~     attr_accessor :count, :x, :y, :home, :bold, :squareColliders, :colliders, :damageCount~
    +** Processing line: ~    # Sets the value of fire (whether it is dead or roaring), and the story line~
     - Inside source: true
     *** True Line Result
    -     attr_accessor :count, :x, :y, :home, :bold, :squareColliders, :colliders, :damageCount
    -** Processing line: ~     def initialize(args, x, y, block_size, orientation, block_offset)~
    +    # Sets the value of fire (whether it is dead or roaring), and the story line
    +** Processing line: ~    def light_fire~
     - Inside source: true
     *** True Line Result
    -     def initialize(args, x, y, block_size, orientation, block_offset)
    -** Processing line: ~          @x = x * block_size~
    +    def light_fire
    +** Processing line: ~      return unless fire_ready? # returns unless the fire is ready to be lit~
     - Inside source: true
     *** True Line Result
    -          @x = x * block_size
    -** Processing line: ~          @y = y * block_size~
    +      return unless fire_ready? # returns unless the fire is ready to be lit
    +** Processing line: ~      state.fire = :roaring # fire is lit, set to roaring~
     - Inside source: true
     *** True Line Result
    -          @y = y * block_size
    -** Processing line: ~          @block_size = block_size~
    +      state.fire = :roaring # fire is lit, set to roaring
    +** Processing line: ~      state.fire_progress = 0 # the fire progress returns to 0, since the fire has been lit~
     - Inside source: true
     *** True Line Result
    -          @block_size = block_size
    -** Processing line: ~          @block_offset = block_offset~
    +      state.fire_progress = 0 # the fire progress returns to 0, since the fire has been lit
    +** Processing line: ~      if state.fire != state.previous_fire~
     - Inside source: true
     *** True Line Result
    -          @block_offset = block_offset
    -** Processing line: ~          @orientation = orientation~
    +      if state.fire != state.previous_fire
    +** Processing line: ~        set_story_line "the fire is #{state.fire}." # the story line is set using string interpolation~
     - Inside source: true
     *** True Line Result
    -          @orientation = orientation
    -** Processing line: ~          @damageCount = []~
    +        set_story_line "the fire is #{state.fire}." # the story line is set using string interpolation
    +** Processing line: ~        state.previous_fire = state.fire~
     - Inside source: true
     *** True Line Result
    -          @damageCount = []
    -** Processing line: ~          @home = 'squares'~
    +        state.previous_fire = state.fire
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -          @home = 'squares'
    -** Processing line: ~~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~          Kernel.srand()~
    +** Processing line: ~    # Checks if the fire is ready to be lit. Returns a boolean value.~
     - Inside source: true
     *** True Line Result
    -          Kernel.srand()
    -** Processing line: ~          @r = rand(255)~
    +    # Checks if the fire is ready to be lit. Returns a boolean value.
    +** Processing line: ~    def fire_ready?~
     - Inside source: true
     *** True Line Result
    -          @r = rand(255)
    -** Processing line: ~          @g = rand(255)~
    +    def fire_ready?
    +** Processing line: ~      # If fire_progress (value between 0 and 10) is equal to fire_ready_in (value of 10),~
     - Inside source: true
     *** True Line Result
    -          @g = rand(255)
    -** Processing line: ~          @b = rand(255)~
    +      # If fire_progress (value between 0 and 10) is equal to fire_ready_in (value of 10),
    +** Processing line: ~      # the fire is ready to be lit.~
     - Inside source: true
     *** True Line Result
    -          @b = rand(255)
    -** Processing line: ~~
    +      # the fire is ready to be lit.
    +** Processing line: ~      state.fire_progress == state.fire_ready_in~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~          @count = rand(MAX_COUNT)+1~
    +      state.fire_progress == state.fire_ready_in
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -          @count = rand(MAX_COUNT)+1
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~          x_offset = (args.state.board_width + args.grid.w / 8) + @block_offset / 2~
    -- Inside source: true
    -*** True Line Result
    -          x_offset = (args.state.board_width + args.grid.w / 8) + @block_offset / 2
    -** Processing line: ~          @x_adjusted = @x + x_offset~
    -- Inside source: true
    -*** True Line Result
    -          @x_adjusted = @x + x_offset
    -** Processing line: ~          @y_adjusted = @y~
    +** Processing line: ~    # Divides the value of the fire_progress variable by 10 to determine how close the user is to~
     - Inside source: true
     *** True Line Result
    -          @y_adjusted = @y
    -** Processing line: ~          @size_adjusted = @block_size * 2 - @block_offset~
    +    # Divides the value of the fire_progress variable by 10 to determine how close the user is to
    +** Processing line: ~    # being able to light a fire.~
     - Inside source: true
     *** True Line Result
    -          @size_adjusted = @block_size * 2 - @block_offset
    -** Processing line: ~~
    +    # being able to light a fire.
    +** Processing line: ~    def light_fire_progress~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~          hypotenuse=args.state.ball_hypotenuse~
    +    def light_fire_progress
    +** Processing line: ~      state.fire_progress.fdiv(10) # float division~
     - Inside source: true
     *** True Line Result
    -          hypotenuse=args.state.ball_hypotenuse
    -** Processing line: ~          @bold = [(@x_adjusted-hypotenuse/2)-1, (@y_adjusted-hypotenuse/2)-1, @size_adjusted + hypotenuse + 2, @size_adjusted + hypotenuse + 2]~
    +      state.fire_progress.fdiv(10) # float division
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -          @bold = [(@x_adjusted-hypotenuse/2)-1, (@y_adjusted-hypotenuse/2)-1, @size_adjusted + hypotenuse + 2, @size_adjusted + hypotenuse + 2]
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~          @points = [~
    -- Inside source: true
    -*** True Line Result
    -          @points = [
    -** Processing line: ~            {x:@x_adjusted, y:@y_adjusted},~
    -- Inside source: true
    -*** True Line Result
    -            {x:@x_adjusted, y:@y_adjusted},
    -** Processing line: ~            {x:@x_adjusted+@size_adjusted, y:@y_adjusted},~
    -- Inside source: true
    -*** True Line Result
    -            {x:@x_adjusted+@size_adjusted, y:@y_adjusted},
    -** Processing line: ~            {x:@x_adjusted+@size_adjusted, y:@y_adjusted+@size_adjusted},~
    -- Inside source: true
    -*** True Line Result
    -            {x:@x_adjusted+@size_adjusted, y:@y_adjusted+@size_adjusted},
    -** Processing line: ~            {x:@x_adjusted, y:@y_adjusted+@size_adjusted}~
    +** Processing line: ~    # Defines fire as the state.fire variable.~
     - Inside source: true
     *** True Line Result
    -            {x:@x_adjusted, y:@y_adjusted+@size_adjusted}
    -** Processing line: ~          ]~
    +    # Defines fire as the state.fire variable.
    +** Processing line: ~    def fire~
     - Inside source: true
     *** True Line Result
    -          ]
    -** Processing line: ~          @squareColliders = [~
    +    def fire
    +** Processing line: ~      state.fire~
     - Inside source: true
     *** True Line Result
    -          @squareColliders = [
    -** Processing line: ~            SquareCollider.new(@points[0].x,@points[0].y,{x:-1,y:-1}),~
    +      state.fire
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -            SquareCollider.new(@points[0].x,@points[0].y,{x:-1,y:-1}),
    -** Processing line: ~            SquareCollider.new(@points[1].x-COLLISIONWIDTH,@points[1].y,{x:1,y:-1}),~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -            SquareCollider.new(@points[1].x-COLLISIONWIDTH,@points[1].y,{x:1,y:-1}),
    -** Processing line: ~            SquareCollider.new(@points[2].x-COLLISIONWIDTH,@points[2].y-COLLISIONWIDTH,{x:1,y:1}),~
    +
    +** Processing line: ~    # Sets the title of the room.~
     - Inside source: true
     *** True Line Result
    -            SquareCollider.new(@points[2].x-COLLISIONWIDTH,@points[2].y-COLLISIONWIDTH,{x:1,y:1}),
    -** Processing line: ~            SquareCollider.new(@points[3].x,@points[3].y-COLLISIONWIDTH,{x:-1,y:1}),~
    +    # Sets the title of the room.
    +** Processing line: ~    def room_title~
     - Inside source: true
     *** True Line Result
    -            SquareCollider.new(@points[3].x,@points[3].y-COLLISIONWIDTH,{x:-1,y:1}),
    -** Processing line: ~          ]~
    +    def room_title
    +** Processing line: ~      return "a room that is dark" if state.fire == :dead # room is dark if the fire is dead~
     - Inside source: true
     *** True Line Result
    -          ]
    -** Processing line: ~          @colliders = [~
    +      return "a room that is dark" if state.fire == :dead # room is dark if the fire is dead
    +** Processing line: ~      return "a room that is lit" # room is lit if the fire is not dead~
     - Inside source: true
     *** True Line Result
    -          @colliders = [
    -** Processing line: ~            LinearCollider.new(@points[0],@points[1], :neg),~
    +      return "a room that is lit" # room is lit if the fire is not dead
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -            LinearCollider.new(@points[0],@points[1], :neg),
    -** Processing line: ~            LinearCollider.new(@points[1],@points[2], :neg),~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -            LinearCollider.new(@points[1],@points[2], :neg),
    -** Processing line: ~            LinearCollider.new(@points[2],@points[3], :pos),~
    +
    +** Processing line: ~    # Sets the active_module to room.~
     - Inside source: true
     *** True Line Result
    -            LinearCollider.new(@points[2],@points[3], :pos),
    -** Processing line: ~            LinearCollider.new(@points[0],@points[3], :pos)~
    +    # Sets the active_module to room.
    +** Processing line: ~    def go_to_room~
     - Inside source: true
     *** True Line Result
    -            LinearCollider.new(@points[0],@points[3], :pos)
    -** Processing line: ~          ]~
    +    def go_to_room
    +** Processing line: ~      state.active_module = :room~
     - Inside source: true
     *** True Line Result
    -          ]
    -** Processing line: ~     end~
    +      state.active_module = :room
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -     end
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~     def draw(args)~
    +** Processing line: ~    # Defines active_module as the state.active_module variable.~
     - Inside source: true
     *** True Line Result
    -     def draw(args)
    -** Processing line: ~      #Offset the coordinates to the edge of the game area~
    +    # Defines active_module as the state.active_module variable.
    +** Processing line: ~    def active_module~
     - Inside source: true
     *** True Line Result
    -      #Offset the coordinates to the edge of the game area
    -** Processing line: ~      x_offset = (args.state.board_width + args.grid.w / 8) + @block_offset / 2~
    +    def active_module
    +** Processing line: ~      state.active_module~
     - Inside source: true
     *** True Line Result
    -      x_offset = (args.state.board_width + args.grid.w / 8) + @block_offset / 2
    -** Processing line: ~      #args.outputs.solids << [@x + x_offset, @y, @block_size * 2 - @block_offset, @block_size * 2 - @block_offset, @r, @g, @b]~
    +      state.active_module
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      #args.outputs.solids << [@x + x_offset, @y, @block_size * 2 - @block_offset, @block_size * 2 - @block_offset, @r, @g, @b]
    -** Processing line: ~      args.outputs.solids <<{x: (@x + x_offset), y: (@y), w: (@block_size * 2 - @block_offset), h: (@block_size * 2 - @block_offset), r: @r , g: @g , b: @b }~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      args.outputs.solids <<{x: (@x + x_offset), y: (@y), w: (@block_size * 2 - @block_offset), h: (@block_size * 2 - @block_offset), r: @r , g: @g , b: @b }
    -** Processing line: ~      #args.outputs.solids << @bold.append([255,0,0])~
    +
    +** Processing line: ~    # Defines story_line as the state.story_line variable.~
     - Inside source: true
     *** True Line Result
    -      #args.outputs.solids << @bold.append([255,0,0])
    -** Processing line: ~      args.outputs.labels << [@x + x_offset + (@block_size * 2 - @block_offset)/2, (@y) + (@block_size * 2 - @block_offset)/2, @count.to_s]~
    +    # Defines story_line as the state.story_line variable.
    +** Processing line: ~    def story_line~
     - Inside source: true
     *** True Line Result
    -      args.outputs.labels << [@x + x_offset + (@block_size * 2 - @block_offset)/2, (@y) + (@block_size * 2 - @block_offset)/2, @count.to_s]
    -** Processing line: ~~
    +    def story_line
    +** Processing line: ~      state.story_line~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~     end~
    +      state.story_line
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -     end
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~     def update args~
    +** Processing line: ~    # Update every 60 frames (or every second)~
     - Inside source: true
     *** True Line Result
    -     def update args
    -** Processing line: ~       universalUpdate args, self~
    +    # Update every 60 frames (or every second)
    +** Processing line: ~    def should_tick?~
     - Inside source: true
     *** True Line Result
    -       universalUpdate args, self
    -** Processing line: ~     end~
    +    def should_tick?
    +** Processing line: ~      state.tick_count.mod_zero?(60)~
     - Inside source: true
     *** True Line Result
    -     end
    -** Processing line: ~  end~
    +      state.tick_count.mod_zero?(60)
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  end
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  class TShape~
    +** Processing line: ~    # Sets the value of the game state provider.~
     - Inside source: true
     *** True Line Result
    -  class TShape
    -** Processing line: ~      attr_accessor :count, :x, :y, :home, :bold, :squareColliders, :colliders, :damageCount~
    +    # Sets the value of the game state provider.
    +** Processing line: ~    def initialize game_state_provider~
     - Inside source: true
     *** True Line Result
    -      attr_accessor :count, :x, :y, :home, :bold, :squareColliders, :colliders, :damageCount
    -** Processing line: ~      def initialize(args, x, y, block_size, orientation, block_offset)~
    +    def initialize game_state_provider
    +** Processing line: ~      @game_state_provider = game_state_provider~
     - Inside source: true
     *** True Line Result
    -      def initialize(args, x, y, block_size, orientation, block_offset)
    -** Processing line: ~          @x = x * block_size~
    +      @game_state_provider = game_state_provider
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -          @x = x * block_size
    -** Processing line: ~          @y = y * block_size~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          @y = y * block_size
    -** Processing line: ~          @block_size = block_size~
    +
    +** Processing line: ~    # Defines the game state.~
     - Inside source: true
     *** True Line Result
    -          @block_size = block_size
    -** Processing line: ~          @block_offset = block_offset~
    +    # Defines the game state.
    +** Processing line: ~    # Any variable prefixed with an @ symbol is an instance variable.~
     - Inside source: true
     *** True Line Result
    -          @block_offset = block_offset
    -** Processing line: ~          @orientation = orientation~
    +    # Any variable prefixed with an @ symbol is an instance variable.
    +** Processing line: ~    def state~
     - Inside source: true
     *** True Line Result
    -          @orientation = orientation
    -** Processing line: ~          @damageCount = []~
    +    def state
    +** Processing line: ~      @game_state_provider.state~
     - Inside source: true
     *** True Line Result
    -          @damageCount = []
    -** Processing line: ~          @home = "tshapes"~
    +      @game_state_provider.state
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -          @home = "tshapes"
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~          Kernel.srand()~
    -- Inside source: true
    -*** True Line Result
    -          Kernel.srand()
    -** Processing line: ~          @r = rand(255)~
    -- Inside source: true
    -*** True Line Result
    -          @r = rand(255)
    -** Processing line: ~          @g = rand(255)~
    -- Inside source: true
    -*** True Line Result
    -          @g = rand(255)
    -** Processing line: ~          @b = rand(255)~
    +** Processing line: ~    # Saves the state of the game in a text file called game_state.txt.~
     - Inside source: true
     *** True Line Result
    -          @b = rand(255)
    -** Processing line: ~~
    +    # Saves the state of the game in a text file called game_state.txt.
    +** Processing line: ~    def save~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~          @count = rand(MAX_COUNT)+1~
    +    def save
    +** Processing line: ~      $gtk.serialize_state('game_state.txt', state)~
     - Inside source: true
     *** True Line Result
    -          @count = rand(MAX_COUNT)+1
    -** Processing line: ~~
    +      $gtk.serialize_state('game_state.txt', state)
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~          @shapePoints = getShapePoints(args)~
    -- Inside source: true
    -*** True Line Result
    -          @shapePoints = getShapePoints(args)
    -** Processing line: ~          minX={x:INFINITY, y:0}~
    -- Inside source: true
    -*** True Line Result
    -          minX={x:INFINITY, y:0}
    -** Processing line: ~          minY={x:0, y:INFINITY}~
    -- Inside source: true
    -*** True Line Result
    -          minY={x:0, y:INFINITY}
    -** Processing line: ~          maxX={x:-INFINITY, y:0}~
    +** Processing line: ~    # Loads the game state from the game_state.txt text file.~
     - Inside source: true
     *** True Line Result
    -          maxX={x:-INFINITY, y:0}
    -** Processing line: ~          maxY={x:0, y:-INFINITY}~
    +    # Loads the game state from the game_state.txt text file.
    +** Processing line: ~    # If the load is unsuccessful, the user is informed since the story line indicates the failure.~
     - Inside source: true
     *** True Line Result
    -          maxY={x:0, y:-INFINITY}
    -** Processing line: ~          for p in @shapePoints~
    +    # If the load is unsuccessful, the user is informed since the story line indicates the failure.
    +** Processing line: ~    def load~
     - Inside source: true
     *** True Line Result
    -          for p in @shapePoints
    -** Processing line: ~            if p.x < minX.x~
    +    def load
    +** Processing line: ~      parsed_state = $gtk.deserialize_state('game_state.txt')~
     - Inside source: true
     *** True Line Result
    -            if p.x < minX.x
    -** Processing line: ~              minX = p~
    +      parsed_state = $gtk.deserialize_state('game_state.txt')
    +** Processing line: ~      if !parsed_state~
     - Inside source: true
     *** True Line Result
    -              minX = p
    -** Processing line: ~            end~
    +      if !parsed_state
    +** Processing line: ~        set_story_line "no game to load. press save first."~
     - Inside source: true
     *** True Line Result
    -            end
    -** Processing line: ~            if p.x > maxX.x~
    +        set_story_line "no game to load. press save first."
    +** Processing line: ~      else~
     - Inside source: true
     *** True Line Result
    -            if p.x > maxX.x
    -** Processing line: ~              maxX = p~
    +      else
    +** Processing line: ~        $gtk.args.state = parsed_state~
     - Inside source: true
     *** True Line Result
    -              maxX = p
    -** Processing line: ~            end~
    +        $gtk.args.state = parsed_state
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -            end
    -** Processing line: ~            if p.y < minY.y~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -            if p.y < minY.y
    -** Processing line: ~              minY = p~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -              minY = p
    -** Processing line: ~            end~
    +
    +** Processing line: ~    # Resets the game.~
     - Inside source: true
     *** True Line Result
    -            end
    -** Processing line: ~            if p.y > maxY.y~
    +    # Resets the game.
    +** Processing line: ~    def reset~
     - Inside source: true
     *** True Line Result
    -            if p.y > maxY.y
    -** Processing line: ~              maxY = p~
    +    def reset
    +** Processing line: ~      $gtk.reset~
     - Inside source: true
     *** True Line Result
    -              maxY = p
    -** Processing line: ~            end~
    +      $gtk.reset
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -            end
    -** Processing line: ~          end~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -          end
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~~
    +** Processing line: ~  class TextedBasedGamePresenter~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~          hypotenuse=args.state.ball_hypotenuse~
    +  class TextedBasedGamePresenter
    +** Processing line: ~    attr_accessor :state, :outputs, :inputs~
     - Inside source: true
     *** True Line Result
    -          hypotenuse=args.state.ball_hypotenuse
    +    attr_accessor :state, :outputs, :inputs
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~          @bold = [(minX.x-hypotenuse/2)-1, (minY.y-hypotenuse/2)-1, -((minX.x-hypotenuse/2)-1)+(maxX.x + hypotenuse + 2), -((minY.y-hypotenuse/2)-1)+(maxY.y + hypotenuse + 2)]~
    -- Inside source: true
    -*** True Line Result
    -          @bold = [(minX.x-hypotenuse/2)-1, (minY.y-hypotenuse/2)-1, -((minX.x-hypotenuse/2)-1)+(maxX.x + hypotenuse + 2), -((minY.y-hypotenuse/2)-1)+(maxY.y + hypotenuse + 2)]
    -** Processing line: ~      end~
    -- Inside source: true
    -*** True Line Result
    -      end
    -** Processing line: ~      def getShapePoints(args)~
    -- Inside source: true
    -*** True Line Result
    -      def getShapePoints(args)
    -** Processing line: ~        points=[]~
    +** Processing line: ~    # Creates empty collection called highlights.~
     - Inside source: true
     *** True Line Result
    -        points=[]
    -** Processing line: ~        x_offset = (args.state.board_width + args.grid.w / 8) + (@block_offset / 2)~
    +    # Creates empty collection called highlights.
    +** Processing line: ~    # Calls methods necessary to run the game.~
     - Inside source: true
     *** True Line Result
    -        x_offset = (args.state.board_width + args.grid.w / 8) + (@block_offset / 2)
    -** Processing line: ~~
    +    # Calls methods necessary to run the game.
    +** Processing line: ~    def tick~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~        if @orientation == :right~
    +    def tick
    +** Processing line: ~      state.layout.highlights ||= []~
     - Inside source: true
     *** True Line Result
    -        if @orientation == :right
    -** Processing line: ~            #args.outputs.solids << [@x + x_offset, @y, @block_size - @block_offset, @block_size * 3 - @block_offset, @r, @g, @b]~
    +      state.layout.highlights ||= []
    +** Processing line: ~      game.tick if game.should_tick?~
     - Inside source: true
     *** True Line Result
    -            #args.outputs.solids << [@x + x_offset, @y, @block_size - @block_offset, @block_size * 3 - @block_offset, @r, @g, @b]
    -** Processing line: ~            #args.outputs.solids << [@x + x_offset, @y + @block_size, @block_size * 2, @block_size, @r, @g, @b]~
    +      game.tick if game.should_tick?
    +** Processing line: ~      render~
     - Inside source: true
     *** True Line Result
    -            #args.outputs.solids << [@x + x_offset, @y + @block_size, @block_size * 2, @block_size, @r, @g, @b]
    -** Processing line: ~            points = [~
    +      render
    +** Processing line: ~      process_input~
     - Inside source: true
     *** True Line Result
    -            points = [
    -** Processing line: ~              {x:@x + x_offset, y:@y},~
    +      process_input
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -              {x:@x + x_offset, y:@y},
    -** Processing line: ~              {x:(@x + x_offset)+(@block_size - @block_offset), y:@y},~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -              {x:(@x + x_offset)+(@block_size - @block_offset), y:@y},
    -** Processing line: ~              {x:(@x + x_offset)+(@block_size - @block_offset),y:@y + @block_size},~
    +
    +** Processing line: ~    # Outputs a label of the tick count (passage of time) and calls all render methods.~
     - Inside source: true
     *** True Line Result
    -              {x:(@x + x_offset)+(@block_size - @block_offset),y:@y + @block_size},
    -** Processing line: ~              {x:(@x + x_offset)+ @block_size * 2,y:@y + @block_size},~
    +    # Outputs a label of the tick count (passage of time) and calls all render methods.
    +** Processing line: ~    def render~
     - Inside source: true
     *** True Line Result
    -              {x:(@x + x_offset)+ @block_size * 2,y:@y + @block_size},
    -** Processing line: ~              {x:(@x + x_offset)+ @block_size * 2,y:@y + @block_size+@block_size},~
    +    def render
    +** Processing line: ~      outputs.labels << [10, 30, state.tick_count]~
     - Inside source: true
     *** True Line Result
    -              {x:(@x + x_offset)+ @block_size * 2,y:@y + @block_size+@block_size},
    -** Processing line: ~              {x:(@x + x_offset)+(@block_size - @block_offset),y:@y + @block_size+@block_size},~
    +      outputs.labels << [10, 30, state.tick_count]
    +** Processing line: ~      render_alert~
     - Inside source: true
     *** True Line Result
    -              {x:(@x + x_offset)+(@block_size - @block_offset),y:@y + @block_size+@block_size},
    -** Processing line: ~              {x:(@x + x_offset)+(@block_size - @block_offset), y:@y+ @block_size * 3 - @block_offset},~
    +      render_alert
    +** Processing line: ~      render_room~
     - Inside source: true
     *** True Line Result
    -              {x:(@x + x_offset)+(@block_size - @block_offset), y:@y+ @block_size * 3 - @block_offset},
    -** Processing line: ~              {x:@x + x_offset , y:@y+ @block_size * 3 - @block_offset}~
    +      render_room
    +** Processing line: ~      render_highlights~
     - Inside source: true
     *** True Line Result
    -              {x:@x + x_offset , y:@y+ @block_size * 3 - @block_offset}
    -** Processing line: ~            ]~
    +      render_highlights
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -            ]
    -** Processing line: ~            @squareColliders = [~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -            @squareColliders = [
    -** Processing line: ~              SquareCollider.new(points[0].x,points[0].y,{x:-1,y:-1}),~
    +
    +** Processing line: ~    # Outputs a label onto the screen that shows the story line, and also outputs a "close" button.~
     - Inside source: true
     *** True Line Result
    -              SquareCollider.new(points[0].x,points[0].y,{x:-1,y:-1}),
    -** Processing line: ~              SquareCollider.new(points[1].x-COLLISIONWIDTH,points[1].y,{x:1,y:-1}),~
    +    # Outputs a label onto the screen that shows the story line, and also outputs a "close" button.
    +** Processing line: ~    def render_alert~
     - Inside source: true
     *** True Line Result
    -              SquareCollider.new(points[1].x-COLLISIONWIDTH,points[1].y,{x:1,y:-1}),
    -** Processing line: ~              SquareCollider.new(points[2].x,points[2].y-COLLISIONWIDTH,{x:1,y:-1}),~
    +    def render_alert
    +** Processing line: ~      return unless game.active_module == :alert~
     - Inside source: true
     *** True Line Result
    -              SquareCollider.new(points[2].x,points[2].y-COLLISIONWIDTH,{x:1,y:-1}),
    -** Processing line: ~              SquareCollider.new(points[3].x-COLLISIONWIDTH,points[3].y,{x:1,y:-1}),~
    +      return unless game.active_module == :alert
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -              SquareCollider.new(points[3].x-COLLISIONWIDTH,points[3].y,{x:1,y:-1}),
    -** Processing line: ~              SquareCollider.new(points[4].x-COLLISIONWIDTH,points[4].y-COLLISIONWIDTH,{x:1,y:1}),~
    +
    +** Processing line: ~      outputs.labels << [640, 480, game.story_line, 5, 1]  # outputs story line label~
     - Inside source: true
     *** True Line Result
    -              SquareCollider.new(points[4].x-COLLISIONWIDTH,points[4].y-COLLISIONWIDTH,{x:1,y:1}),
    -** Processing line: ~              SquareCollider.new(points[5].x,points[5].y,{x:1,y:1}),~
    +      outputs.labels << [640, 480, game.story_line, 5, 1]  # outputs story line label
    +** Processing line: ~      outputs.primitives << button(:alert_dismiss, 490, 380, "close")  # positions "close" button under story line~
     - Inside source: true
     *** True Line Result
    -              SquareCollider.new(points[5].x,points[5].y,{x:1,y:1}),
    -** Processing line: ~              SquareCollider.new(points[6].x-COLLISIONWIDTH,points[6].y-COLLISIONWIDTH,{x:1,y:1}),~
    +      outputs.primitives << button(:alert_dismiss, 490, 380, "close")  # positions "close" button under story line
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -              SquareCollider.new(points[6].x-COLLISIONWIDTH,points[6].y-COLLISIONWIDTH,{x:1,y:1}),
    -** Processing line: ~              SquareCollider.new(points[7].x,points[7].y-COLLISIONWIDTH,{x:-1,y:1}),~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -              SquareCollider.new(points[7].x,points[7].y-COLLISIONWIDTH,{x:-1,y:1}),
    -** Processing line: ~            ]~
    +
    +** Processing line: ~    def render_room~
     - Inside source: true
     *** True Line Result
    -            ]
    -** Processing line: ~            @colliders = [~
    +    def render_room
    +** Processing line: ~      return unless game.active_module == :room~
     - Inside source: true
     *** True Line Result
    -            @colliders = [
    -** Processing line: ~              LinearCollider.new(points[0],points[1], :neg),~
    +      return unless game.active_module == :room
    +** Processing line: ~      outputs.labels << [640, 700, game.room_title, 4, 1] # outputs room title label at top of screen~
     - Inside source: true
     *** True Line Result
    -              LinearCollider.new(points[0],points[1], :neg),
    -** Processing line: ~              LinearCollider.new(points[1],points[2], :neg),~
    +      outputs.labels << [640, 700, game.room_title, 4, 1] # outputs room title label at top of screen
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -              LinearCollider.new(points[1],points[2], :neg),
    -** Processing line: ~              LinearCollider.new(points[2],points[3], :neg),~
    +
    +** Processing line: ~      # The parameters for these outputs are (symbol, x, y, text, value/percentage) and each has a y value~
     - Inside source: true
     *** True Line Result
    -              LinearCollider.new(points[2],points[3], :neg),
    -** Processing line: ~              LinearCollider.new(points[3],points[4], :neg),~
    +      # The parameters for these outputs are (symbol, x, y, text, value/percentage) and each has a y value
    +** Processing line: ~      # that positions it 60 pixels lower than the previous output.~
     - Inside source: true
     *** True Line Result
    -              LinearCollider.new(points[3],points[4], :neg),
    -** Processing line: ~              LinearCollider.new(points[4],points[5], :pos),~
    +      # that positions it 60 pixels lower than the previous output.
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -              LinearCollider.new(points[4],points[5], :pos),
    -** Processing line: ~              LinearCollider.new(points[5],points[6], :neg),~
    +
    +** Processing line: ~      # outputs the light_fire_progress bar, uses light_fire_progress for its percentage (which changes bar's appearance)~
     - Inside source: true
     *** True Line Result
    -              LinearCollider.new(points[5],points[6], :neg),
    -** Processing line: ~              LinearCollider.new(points[6],points[7], :pos),~
    +      # outputs the light_fire_progress bar, uses light_fire_progress for its percentage (which changes bar's appearance)
    +** Processing line: ~      outputs.primitives << progress_bar(:light_fire, 490, 600, "light fire", game.light_fire_progress)~
     - Inside source: true
     *** True Line Result
    -              LinearCollider.new(points[6],points[7], :pos),
    -** Processing line: ~              LinearCollider.new(points[0],points[7], :pos)~
    +      outputs.primitives << progress_bar(:light_fire, 490, 600, "light fire", game.light_fire_progress)
    +** Processing line: ~      outputs.primitives << button(       :save_game, 490, 540, "save") # outputs save button~
     - Inside source: true
     *** True Line Result
    -              LinearCollider.new(points[0],points[7], :pos)
    -** Processing line: ~            ]~
    +      outputs.primitives << button(       :save_game, 490, 540, "save") # outputs save button
    +** Processing line: ~      outputs.primitives << button(       :load_game, 490, 480, "load") # outputs load button~
     - Inside source: true
     *** True Line Result
    -            ]
    -** Processing line: ~        elsif @orientation == :up~
    +      outputs.primitives << button(       :load_game, 490, 480, "load") # outputs load button
    +** Processing line: ~      outputs.primitives << button(      :reset_game, 490, 420, "reset") # outputs reset button~
     - Inside source: true
     *** True Line Result
    -        elsif @orientation == :up
    -** Processing line: ~            #args.outputs.solids << [@x + x_offset, @y, @block_size * 3 - @block_offset, @block_size - @block_offset, @r, @g, @b]~
    +      outputs.primitives << button(      :reset_game, 490, 420, "reset") # outputs reset button
    +** Processing line: ~      outputs.labels << [640, 30, "the fire is #{game.fire}", 0, 1] # outputs fire label at bottom of screen~
     - Inside source: true
     *** True Line Result
    -            #args.outputs.solids << [@x + x_offset, @y, @block_size * 3 - @block_offset, @block_size - @block_offset, @r, @g, @b]
    -** Processing line: ~            #args.outputs.solids << [@x + x_offset + @block_size, @y, @block_size, @block_size * 2, @r, @g, @b]~
    +      outputs.labels << [640, 30, "the fire is #{game.fire}", 0, 1] # outputs fire label at bottom of screen
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -            #args.outputs.solids << [@x + x_offset + @block_size, @y, @block_size, @block_size * 2, @r, @g, @b]
    -** Processing line: ~            points = [~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -            points = [
    -** Processing line: ~              {x:@x + x_offset, y:@y},~
    +
    +** Processing line: ~    # Outputs a collection of highlights using an array to set their values, and also rejects certain values from the collection.~
     - Inside source: true
     *** True Line Result
    -              {x:@x + x_offset, y:@y},
    -** Processing line: ~              {x:(@x + x_offset)+(@block_size * 3 - @block_offset), y:@y},~
    +    # Outputs a collection of highlights using an array to set their values, and also rejects certain values from the collection.
    +** Processing line: ~    def render_highlights~
     - Inside source: true
     *** True Line Result
    -              {x:(@x + x_offset)+(@block_size * 3 - @block_offset), y:@y},
    -** Processing line: ~              {x:(@x + x_offset)+(@block_size * 3 - @block_offset), y:@y+(@block_size - @block_offset)},~
    +    def render_highlights
    +** Processing line: ~      state.layout.highlights.each do |h| # for each highlight in the collection~
     - Inside source: true
     *** True Line Result
    -              {x:(@x + x_offset)+(@block_size * 3 - @block_offset), y:@y+(@block_size - @block_offset)},
    -** Processing line: ~              {x:@x + x_offset + @block_size + @block_size, y:@y+(@block_size - @block_offset)},~
    +      state.layout.highlights.each do |h| # for each highlight in the collection
    +** Processing line: ~          h.lifetime -= 1 # decrease the value of its lifetime~
     - Inside source: true
     *** True Line Result
    -              {x:@x + x_offset + @block_size + @block_size, y:@y+(@block_size - @block_offset)},
    -** Processing line: ~              {x:@x + x_offset + @block_size + @block_size, y:@y+@block_size*2},~
    +          h.lifetime -= 1 # decrease the value of its lifetime
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -              {x:@x + x_offset + @block_size + @block_size, y:@y+@block_size*2},
    -** Processing line: ~              {x:@x + x_offset + @block_size, y:@y+@block_size*2},~
    +        end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -              {x:@x + x_offset + @block_size, y:@y+@block_size*2},
    -** Processing line: ~              {x:@x + x_offset + @block_size, y:@y+(@block_size - @block_offset)},~
    +
    +** Processing line: ~        outputs.solids << state.layout.highlights.map do |h| # outputs highlights collection~
     - Inside source: true
     *** True Line Result
    -              {x:@x + x_offset + @block_size, y:@y+(@block_size - @block_offset)},
    -** Processing line: ~              {x:@x + x_offset, y:@y+(@block_size - @block_offset)}~
    +        outputs.solids << state.layout.highlights.map do |h| # outputs highlights collection
    +** Processing line: ~          [h.x, h.y, h.w, h.h, h.color, 255 * h.lifetime / h.max_lifetime] # sets definition for each highlight~
     - Inside source: true
     *** True Line Result
    -              {x:@x + x_offset, y:@y+(@block_size - @block_offset)}
    -** Processing line: ~            ]~
    +          [h.x, h.y, h.w, h.h, h.color, 255 * h.lifetime / h.max_lifetime] # sets definition for each highlight
    +** Processing line: ~          # transparency changes; divide lifetime by max_lifetime, multiply result by 255~
     - Inside source: true
     *** True Line Result
    -            ]
    -** Processing line: ~            @squareColliders = [~
    +          # transparency changes; divide lifetime by max_lifetime, multiply result by 255
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -            @squareColliders = [
    -** Processing line: ~              SquareCollider.new(points[0].x,points[0].y,{x:-1,y:-1}),~
    +        end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -              SquareCollider.new(points[0].x,points[0].y,{x:-1,y:-1}),
    -** Processing line: ~              SquareCollider.new(points[1].x-COLLISIONWIDTH,points[1].y,{x:1,y:-1}),~
    +
    +** Processing line: ~        # reject highlights from collection that have no remaining lifetime~
     - Inside source: true
     *** True Line Result
    -              SquareCollider.new(points[1].x-COLLISIONWIDTH,points[1].y,{x:1,y:-1}),
    -** Processing line: ~              SquareCollider.new(points[2].x-COLLISIONWIDTH,points[2].y-COLLISIONWIDTH,{x:1,y:1}),~
    +        # reject highlights from collection that have no remaining lifetime
    +** Processing line: ~        state.layout.highlights = state.layout.highlights.reject { |h| h.lifetime <= 0 }~
     - Inside source: true
     *** True Line Result
    -              SquareCollider.new(points[2].x-COLLISIONWIDTH,points[2].y-COLLISIONWIDTH,{x:1,y:1}),
    -** Processing line: ~              SquareCollider.new(points[3].x,points[3].y,{x:1,y:1}),~
    +        state.layout.highlights = state.layout.highlights.reject { |h| h.lifetime <= 0 }
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -              SquareCollider.new(points[3].x,points[3].y,{x:1,y:1}),
    -** Processing line: ~              SquareCollider.new(points[4].x-COLLISIONWIDTH,points[4].y-COLLISIONWIDTH,{x:1,y:1}),~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -              SquareCollider.new(points[4].x-COLLISIONWIDTH,points[4].y-COLLISIONWIDTH,{x:1,y:1}),
    -** Processing line: ~              SquareCollider.new(points[5].x,points[5].y-COLLISIONWIDTH,{x:-1,y:1}),~
    +
    +** Processing line: ~    # Checks whether or not a button was clicked.~
     - Inside source: true
     *** True Line Result
    -              SquareCollider.new(points[5].x,points[5].y-COLLISIONWIDTH,{x:-1,y:1}),
    -** Processing line: ~              SquareCollider.new(points[6].x-COLLISIONWIDTH,points[6].y,{x:-1,y:1}),~
    +    # Checks whether or not a button was clicked.
    +** Processing line: ~    # Returns a boolean value.~
     - Inside source: true
     *** True Line Result
    -              SquareCollider.new(points[6].x-COLLISIONWIDTH,points[6].y,{x:-1,y:1}),
    -** Processing line: ~              SquareCollider.new(points[7].x,points[7].y-COLLISIONWIDTH,{x:-1,y:1}),~
    +    # Returns a boolean value.
    +** Processing line: ~    def process_input~
     - Inside source: true
     *** True Line Result
    -              SquareCollider.new(points[7].x,points[7].y-COLLISIONWIDTH,{x:-1,y:1}),
    -** Processing line: ~            ]~
    +    def process_input
    +** Processing line: ~      button = button_clicked? # calls button_clicked? method~
     - Inside source: true
     *** True Line Result
    -            ]
    -** Processing line: ~            @colliders = [~
    +      button = button_clicked? # calls button_clicked? method
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -            @colliders = [
    -** Processing line: ~              LinearCollider.new(points[0],points[1], :neg),~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -              LinearCollider.new(points[0],points[1], :neg),
    -** Processing line: ~              LinearCollider.new(points[1],points[2], :neg),~
    +
    +** Processing line: ~    # Returns a boolean value.~
     - Inside source: true
     *** True Line Result
    -              LinearCollider.new(points[1],points[2], :neg),
    -** Processing line: ~              LinearCollider.new(points[2],points[3], :pos),~
    +    # Returns a boolean value.
    +** Processing line: ~    # Finds the button that was clicked from the button list and determines what method to call.~
     - Inside source: true
     *** True Line Result
    -              LinearCollider.new(points[2],points[3], :pos),
    -** Processing line: ~              LinearCollider.new(points[3],points[4], :neg),~
    +    # Finds the button that was clicked from the button list and determines what method to call.
    +** Processing line: ~    # Adds a highlight to the highlights collection.~
     - Inside source: true
     *** True Line Result
    -              LinearCollider.new(points[3],points[4], :neg),
    -** Processing line: ~              LinearCollider.new(points[4],points[5], :pos),~
    +    # Adds a highlight to the highlights collection.
    +** Processing line: ~    def button_clicked?~
     - Inside source: true
     *** True Line Result
    -              LinearCollider.new(points[4],points[5], :pos),
    -** Processing line: ~              LinearCollider.new(points[5],points[6], :neg),~
    +    def button_clicked?
    +** Processing line: ~      return nil unless click_pos # return nil unless click_pos holds coordinates of mouse click~
     - Inside source: true
     *** True Line Result
    -              LinearCollider.new(points[5],points[6], :neg),
    -** Processing line: ~              LinearCollider.new(points[6],points[7], :pos),~
    +      return nil unless click_pos # return nil unless click_pos holds coordinates of mouse click
    +** Processing line: ~        button = @button_list.find do |k, v| # goes through button_list to find button clicked~
     - Inside source: true
     *** True Line Result
    -              LinearCollider.new(points[6],points[7], :pos),
    -** Processing line: ~              LinearCollider.new(points[0],points[7], :pos)~
    +        button = @button_list.find do |k, v| # goes through button_list to find button clicked
    +** Processing line: ~          click_pos.inside_rect? v[:primitives].last.rect # was the mouse clicked inside the rect of button?~
     - Inside source: true
     *** True Line Result
    -              LinearCollider.new(points[0],points[7], :pos)
    -** Processing line: ~            ]~
    +          click_pos.inside_rect? v[:primitives].last.rect # was the mouse clicked inside the rect of button?
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -            ]
    -** Processing line: ~        elsif @orientation == :left~
    +        end
    +** Processing line: ~        return unless button # return unless a button was clicked~
     - Inside source: true
     *** True Line Result
    -        elsif @orientation == :left
    -** Processing line: ~            #args.outputs.solids << [@x + x_offset + @block_size, @y, @block_size - @block_offset, @block_size * 3 - @block_offset, @r, @g, @b]~
    +        return unless button # return unless a button was clicked
    +** Processing line: ~        method_to_call = "#{button[0]}_clicked".to_sym # sets method_to_call to symbol (like :save_game or :load_game)~
     - Inside source: true
     *** True Line Result
    -            #args.outputs.solids << [@x + x_offset + @block_size, @y, @block_size - @block_offset, @block_size * 3 - @block_offset, @r, @g, @b]
    -** Processing line: ~            #args.outputs.solids << [@x + x_offset, @y + @block_size, @block_size * 2 - @block_offset, @block_size - @block_offset, @r, @g, @b]~
    +        method_to_call = "#{button[0]}_clicked".to_sym # sets method_to_call to symbol (like :save_game or :load_game)
    +** Processing line: ~        if self.respond_to? method_to_call # returns true if self responds to the given method (method actually exists)~
     - Inside source: true
     *** True Line Result
    -            #args.outputs.solids << [@x + x_offset, @y + @block_size, @block_size * 2 - @block_offset, @block_size - @block_offset, @r, @g, @b]
    -** Processing line: ~            xh = @x + x_offset~
    +        if self.respond_to? method_to_call # returns true if self responds to the given method (method actually exists)
    +** Processing line: ~          border = button[1][:primitives].last # sets border definition using value of last key in button list hash~
     - Inside source: true
     *** True Line Result
    -            xh = @x + x_offset
    -** Processing line: ~            #points = [~
    +          border = button[1][:primitives].last # sets border definition using value of last key in button list hash
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -            #points = [
    -** Processing line: ~              #{x:@x + x_offset, y:@y},~
    +
    +** Processing line: ~          # declares each highlight as a new entity, sets properties~
     - Inside source: true
     *** True Line Result
    -              #{x:@x + x_offset, y:@y},
    -** Processing line: ~              #{x:(@x + x_offset)+(@block_size - @block_offset), y:@y},~
    +          # declares each highlight as a new entity, sets properties
    +** Processing line: ~          state.layout.highlights << state.new_entity(:highlight) do |h|~
     - Inside source: true
     *** True Line Result
    -              #{x:(@x + x_offset)+(@block_size - @block_offset), y:@y},
    -** Processing line: ~              #{x:(@x + x_offset)+(@block_size - @block_offset),y:@y + @block_size},~
    +          state.layout.highlights << state.new_entity(:highlight) do |h|
    +** Processing line: ~              h.x = border.x~
     - Inside source: true
     *** True Line Result
    -              #{x:(@x + x_offset)+(@block_size - @block_offset),y:@y + @block_size},
    -** Processing line: ~              #{x:(@x + x_offset)+ @block_size * 2,y:@y + @block_size},~
    +              h.x = border.x
    +** Processing line: ~              h.y = border.y~
     - Inside source: true
     *** True Line Result
    -              #{x:(@x + x_offset)+ @block_size * 2,y:@y + @block_size},
    -** Processing line: ~              #{x:(@x + x_offset)+ @block_size * 2,y:@y + @block_size+@block_size},~
    +              h.y = border.y
    +** Processing line: ~              h.w = border.w~
     - Inside source: true
     *** True Line Result
    -              #{x:(@x + x_offset)+ @block_size * 2,y:@y + @block_size+@block_size},
    -** Processing line: ~              #{x:(@x + x_offset)+(@block_size - @block_offset),y:@y + @block_size+@block_size},~
    +              h.w = border.w
    +** Processing line: ~              h.h = border.h~
     - Inside source: true
     *** True Line Result
    -              #{x:(@x + x_offset)+(@block_size - @block_offset),y:@y + @block_size+@block_size},
    -** Processing line: ~              #{x:(@x + x_offset)+(@block_size - @block_offset), y:@y+ @block_size * 3 - @block_offset},~
    +              h.h = border.h
    +** Processing line: ~              h.max_lifetime = 10~
     - Inside source: true
     *** True Line Result
    -              #{x:(@x + x_offset)+(@block_size - @block_offset), y:@y+ @block_size * 3 - @block_offset},
    -** Processing line: ~              #{x:@x + x_offset , y:@y+ @block_size * 3 - @block_offset}~
    +              h.max_lifetime = 10
    +** Processing line: ~              h.lifetime = h.max_lifetime~
     - Inside source: true
     *** True Line Result
    -              #{x:@x + x_offset , y:@y+ @block_size * 3 - @block_offset}
    -** Processing line: ~            #]~
    +              h.lifetime = h.max_lifetime
    +** Processing line: ~              h.color = [120, 120, 180] # sets color to shade of purple~
     - Inside source: true
     *** True Line Result
    -            #]
    -** Processing line: ~            points = [~
    +              h.color = [120, 120, 180] # sets color to shade of purple
    +** Processing line: ~            end~
     - Inside source: true
     *** True Line Result
    -            points = [
    -** Processing line: ~              {x:@x + x_offset + @block_size, y:@y},~
    +            end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -              {x:@x + x_offset + @block_size, y:@y},
    -** Processing line: ~              {x:@x + x_offset + @block_size + (@block_size - @block_offset), y:@y},~
    +
    +** Processing line: ~            self.send method_to_call # invoke method identified by symbol~
     - Inside source: true
     *** True Line Result
    -              {x:@x + x_offset + @block_size + (@block_size - @block_offset), y:@y},
    -** Processing line: ~              {x:@x + x_offset + @block_size + (@block_size - @block_offset),y:@y+@block_size*3- @block_offset},~
    +            self.send method_to_call # invoke method identified by symbol
    +** Processing line: ~          else # otherwise, if self doesn't respond to given method~
     - Inside source: true
     *** True Line Result
    -              {x:@x + x_offset + @block_size + (@block_size - @block_offset),y:@y+@block_size*3- @block_offset},
    -** Processing line: ~              {x:@x + x_offset + @block_size, y:@y+@block_size*3- @block_offset},~
    +          else # otherwise, if self doesn't respond to given method
    +** Processing line: ~            border = button[1][:primitives].last # sets border definition using value of last key in hash~
     - Inside source: true
     *** True Line Result
    -              {x:@x + x_offset + @block_size, y:@y+@block_size*3- @block_offset},
    -** Processing line: ~              {x:@x + x_offset+@block_size, y:@y+@block_size*2- @block_offset},~
    +            border = button[1][:primitives].last # sets border definition using value of last key in hash
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -              {x:@x + x_offset+@block_size, y:@y+@block_size*2- @block_offset},
    -** Processing line: ~              {x:@x + x_offset, y:@y+@block_size*2- @block_offset},~
    +
    +** Processing line: ~            # declares each highlight as a new entity, sets properties~
     - Inside source: true
     *** True Line Result
    -              {x:@x + x_offset, y:@y+@block_size*2- @block_offset},
    -** Processing line: ~              {x:@x + x_offset, y:@y+@block_size},~
    +            # declares each highlight as a new entity, sets properties
    +** Processing line: ~            state.layout.highlights << state.new_entity(:highlight) do |h|~
     - Inside source: true
     *** True Line Result
    -              {x:@x + x_offset, y:@y+@block_size},
    -** Processing line: ~              {x:@x + x_offset+@block_size, y:@y+@block_size}~
    +            state.layout.highlights << state.new_entity(:highlight) do |h|
    +** Processing line: ~              h.x = border.x~
     - Inside source: true
     *** True Line Result
    -              {x:@x + x_offset+@block_size, y:@y+@block_size}
    -** Processing line: ~            ]~
    +              h.x = border.x
    +** Processing line: ~              h.y = border.y~
     - Inside source: true
     *** True Line Result
    -            ]
    -** Processing line: ~            @squareColliders = [~
    +              h.y = border.y
    +** Processing line: ~              h.w = border.w~
     - Inside source: true
     *** True Line Result
    -            @squareColliders = [
    -** Processing line: ~              SquareCollider.new(points[0].x,points[0].y,{x:-1,y:-1}),~
    +              h.w = border.w
    +** Processing line: ~              h.h = border.h~
     - Inside source: true
     *** True Line Result
    -              SquareCollider.new(points[0].x,points[0].y,{x:-1,y:-1}),
    -** Processing line: ~              SquareCollider.new(points[1].x-COLLISIONWIDTH,points[1].y,{x:1,y:-1}),~
    +              h.h = border.h
    +** Processing line: ~              h.max_lifetime = 4 # different max_lifetime than the one set if respond_to? had been true~
     - Inside source: true
     *** True Line Result
    -              SquareCollider.new(points[1].x-COLLISIONWIDTH,points[1].y,{x:1,y:-1}),
    -** Processing line: ~              SquareCollider.new(points[2].x-COLLISIONWIDTH,points[2].y-COLLISIONWIDTH,{x:1,y:1}),~
    +              h.max_lifetime = 4 # different max_lifetime than the one set if respond_to? had been true
    +** Processing line: ~              h.lifetime = h.max_lifetime~
     - Inside source: true
     *** True Line Result
    -              SquareCollider.new(points[2].x-COLLISIONWIDTH,points[2].y-COLLISIONWIDTH,{x:1,y:1}),
    -** Processing line: ~              SquareCollider.new(points[3].x,points[3].y-COLLISIONWIDTH,{x:-1,y:1}),~
    +              h.lifetime = h.max_lifetime
    +** Processing line: ~              h.color = [120, 80, 80] # sets color to dark color~
     - Inside source: true
     *** True Line Result
    -              SquareCollider.new(points[3].x,points[3].y-COLLISIONWIDTH,{x:-1,y:1}),
    -** Processing line: ~              SquareCollider.new(points[4].x-COLLISIONWIDTH,points[4].y,{x:-1,y:1}),~
    +              h.color = [120, 80, 80] # sets color to dark color
    +** Processing line: ~            end~
     - Inside source: true
     *** True Line Result
    -              SquareCollider.new(points[4].x-COLLISIONWIDTH,points[4].y,{x:-1,y:1}),
    -** Processing line: ~              SquareCollider.new(points[5].x,points[5].y-COLLISIONWIDTH,{x:-1,y:1}),~
    +            end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -              SquareCollider.new(points[5].x,points[5].y-COLLISIONWIDTH,{x:-1,y:1}),
    -** Processing line: ~              SquareCollider.new(points[6].x,points[6].y,{x:-1,y:-1}),~
    +
    +** Processing line: ~            # instructions for users on how to add the missing method_to_call to the code~
     - Inside source: true
     *** True Line Result
    -              SquareCollider.new(points[6].x,points[6].y,{x:-1,y:-1}),
    -** Processing line: ~              SquareCollider.new(points[7].x-COLLISIONWIDTH,points[7].y-COLLISIONWIDTH,{x:-1,y:-1}),~
    +            # instructions for users on how to add the missing method_to_call to the code
    +** Processing line: ~            puts "It looks like #{method_to_call} doesn't exists on TextedBasedGamePresenter. Please add this method:"~
     - Inside source: true
     *** True Line Result
    -              SquareCollider.new(points[7].x-COLLISIONWIDTH,points[7].y-COLLISIONWIDTH,{x:-1,y:-1}),
    -** Processing line: ~            ]~
    +            puts "It looks like #{method_to_call} doesn't exists on TextedBasedGamePresenter. Please add this method:"
    +** Processing line: ~            puts "Just copy the code below and put it in the #{TextedBasedGamePresenter} class definition."~
     - Inside source: true
     *** True Line Result
    -            ]
    -** Processing line: ~            @colliders = [~
    +            puts "Just copy the code below and put it in the #{TextedBasedGamePresenter} class definition."
    +** Processing line: ~            puts ""~
     - Inside source: true
     *** True Line Result
    -            @colliders = [
    -** Processing line: ~              LinearCollider.new(points[0],points[1], :neg),~
    +            puts ""
    +** Processing line: ~            puts "```"~
     - Inside source: true
     *** True Line Result
    -              LinearCollider.new(points[0],points[1], :neg),
    -** Processing line: ~              LinearCollider.new(points[1],points[2], :neg),~
    +            puts "```"
    +** Processing line: ~            puts "class TextedBasedGamePresenter <--- find this class and put the method below in it"~
     - Inside source: true
     *** True Line Result
    -              LinearCollider.new(points[1],points[2], :neg),
    -** Processing line: ~              LinearCollider.new(points[2],points[3], :pos),~
    +            puts "class TextedBasedGamePresenter <--- find this class and put the method below in it"
    +** Processing line: ~            puts ""~
     - Inside source: true
     *** True Line Result
    -              LinearCollider.new(points[2],points[3], :pos),
    -** Processing line: ~              LinearCollider.new(points[3],points[4], :neg),~
    +            puts ""
    +** Processing line: ~            puts "  def #{method_to_call}"~
     - Inside source: true
     *** True Line Result
    -              LinearCollider.new(points[3],points[4], :neg),
    -** Processing line: ~              LinearCollider.new(points[4],points[5], :pos),~
    +            puts "  def #{method_to_call}"
    +** Processing line: ~            puts "    puts 'Yay that worked!'"~
     - Inside source: true
     *** True Line Result
    -              LinearCollider.new(points[4],points[5], :pos),
    -** Processing line: ~              LinearCollider.new(points[5],points[6], :neg),~
    +            puts "    puts 'Yay that worked!'"
    +** Processing line: ~            puts "  end"~
     - Inside source: true
     *** True Line Result
    -              LinearCollider.new(points[5],points[6], :neg),
    -** Processing line: ~              LinearCollider.new(points[6],points[7], :neg),~
    +            puts "  end"
    +** Processing line: ~            puts ""~
     - Inside source: true
     *** True Line Result
    -              LinearCollider.new(points[6],points[7], :neg),
    -** Processing line: ~              LinearCollider.new(points[0],points[7], :pos)~
    +            puts ""
    +** Processing line: ~            puts "end <-- make sure to put the #{method_to_call} method in between the `class` word and the final `end` statement."~
     - Inside source: true
     *** True Line Result
    -              LinearCollider.new(points[0],points[7], :pos)
    -** Processing line: ~            ]~
    +            puts "end <-- make sure to put the #{method_to_call} method in between the `class` word and the final `end` statement."
    +** Processing line: ~            puts "```"~
     - Inside source: true
     *** True Line Result
    -            ]
    -** Processing line: ~        elsif @orientation == :down~
    +            puts "```"
    +** Processing line: ~            puts ""~
     - Inside source: true
     *** True Line Result
    -        elsif @orientation == :down
    -** Processing line: ~            #args.outputs.solids << [@x + x_offset, @y + @block_size, @block_size * 3 - @block_offset, @block_size - @block_offset, @r, @g, @b]~
    +            puts ""
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -            #args.outputs.solids << [@x + x_offset, @y + @block_size, @block_size * 3 - @block_offset, @block_size - @block_offset, @r, @g, @b]
    -** Processing line: ~            #args.outputs.solids << [@x + x_offset + @block_size, @y, @block_size - @block_offset, @block_size * 2 - @block_offset, @r, @g, @b]~
    +        end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -            #args.outputs.solids << [@x + x_offset + @block_size, @y, @block_size - @block_offset, @block_size * 2 - @block_offset, @r, @g, @b]
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~            points = [~
    +** Processing line: ~    # Returns the position of the mouse when it is clicked.~
     - Inside source: true
     *** True Line Result
    -            points = [
    -** Processing line: ~              {x:@x + x_offset, y:@y+(@block_size*2)-@block_offset},~
    +    # Returns the position of the mouse when it is clicked.
    +** Processing line: ~    def click_pos~
     - Inside source: true
     *** True Line Result
    -              {x:@x + x_offset, y:@y+(@block_size*2)-@block_offset},
    -** Processing line: ~              {x:@x + x_offset+ @block_size*3-@block_offset, y:@y+(@block_size*2)-@block_offset},~
    +    def click_pos
    +** Processing line: ~      return nil unless inputs.mouse.click # returns nil unless the mouse was clicked~
     - Inside source: true
     *** True Line Result
    -              {x:@x + x_offset+ @block_size*3-@block_offset, y:@y+(@block_size*2)-@block_offset},
    -** Processing line: ~              {x:@x + x_offset+ @block_size*3-@block_offset, y:@y+(@block_size)},~
    +      return nil unless inputs.mouse.click # returns nil unless the mouse was clicked
    +** Processing line: ~      return inputs.mouse.click.point # returns location of mouse click (coordinates)~
     - Inside source: true
     *** True Line Result
    -              {x:@x + x_offset+ @block_size*3-@block_offset, y:@y+(@block_size)},
    -** Processing line: ~              {x:@x + x_offset+ @block_size*2-@block_offset, y:@y+(@block_size)},~
    +      return inputs.mouse.click.point # returns location of mouse click (coordinates)
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -              {x:@x + x_offset+ @block_size*2-@block_offset, y:@y+(@block_size)},
    -** Processing line: ~              {x:@x + x_offset+ @block_size*2-@block_offset, y:@y},#~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -              {x:@x + x_offset+ @block_size*2-@block_offset, y:@y},#
    -** Processing line: ~              {x:@x + x_offset+ @block_size, y:@y},#~
    +
    +** Processing line: ~    # Creates buttons for the button_list and sets their values using a hash (uses symbols as keys)~
     - Inside source: true
     *** True Line Result
    -              {x:@x + x_offset+ @block_size, y:@y},#
    -** Processing line: ~              {x:@x + x_offset + @block_size, y:@y+(@block_size)},~
    +    # Creates buttons for the button_list and sets their values using a hash (uses symbols as keys)
    +** Processing line: ~    def button id, x, y, text~
     - Inside source: true
     *** True Line Result
    -              {x:@x + x_offset + @block_size, y:@y+(@block_size)},
    -** Processing line: ~              {x:@x + x_offset, y:@y+(@block_size)}~
    +    def button id, x, y, text
    +** Processing line: ~      @button_list[id] ||= { # assigns values to hash keys~
     - Inside source: true
     *** True Line Result
    -              {x:@x + x_offset, y:@y+(@block_size)}
    -** Processing line: ~            ]~
    +      @button_list[id] ||= { # assigns values to hash keys
    +** Processing line: ~        id: id,~
     - Inside source: true
     *** True Line Result
    -            ]
    -** Processing line: ~            @squareColliders = [~
    +        id: id,
    +** Processing line: ~        text: text,~
     - Inside source: true
     *** True Line Result
    -            @squareColliders = [
    -** Processing line: ~              SquareCollider.new(points[0].x,points[0].y-COLLISIONWIDTH,{x:-1,y:1}),~
    +        text: text,
    +** Processing line: ~        primitives: [~
     - Inside source: true
     *** True Line Result
    -              SquareCollider.new(points[0].x,points[0].y-COLLISIONWIDTH,{x:-1,y:1}),
    -** Processing line: ~              SquareCollider.new(points[1].x-COLLISIONWIDTH,points[1].y-COLLISIONWIDTH,{x:1,y:1}),~
    +        primitives: [
    +** Processing line: ~          [x + 10, y + 30, text, 2, 0].label, # positions label inside border~
     - Inside source: true
     *** True Line Result
    -              SquareCollider.new(points[1].x-COLLISIONWIDTH,points[1].y-COLLISIONWIDTH,{x:1,y:1}),
    -** Processing line: ~              SquareCollider.new(points[2].x-COLLISIONWIDTH,points[2].y,{x:1,y:-1}),~
    +          [x + 10, y + 30, text, 2, 0].label, # positions label inside border
    +** Processing line: ~          [x, y, 300, 50].border,             # sets definition of border~
     - Inside source: true
     *** True Line Result
    -              SquareCollider.new(points[2].x-COLLISIONWIDTH,points[2].y,{x:1,y:-1}),
    -** Processing line: ~              SquareCollider.new(points[3].x,points[3].y-COLLISIONWIDTH,{x:1,y:-1}),~
    +          [x, y, 300, 50].border,             # sets definition of border
    +** Processing line: ~        ]~
     - Inside source: true
     *** True Line Result
    -              SquareCollider.new(points[3].x,points[3].y-COLLISIONWIDTH,{x:1,y:-1}),
    -** Processing line: ~              SquareCollider.new(points[4].x-COLLISIONWIDTH,points[4].y,{x:1,y:-1}),~
    +        ]
    +** Processing line: ~      }~
     - Inside source: true
     *** True Line Result
    -              SquareCollider.new(points[4].x-COLLISIONWIDTH,points[4].y,{x:1,y:-1}),
    -** Processing line: ~              SquareCollider.new(points[5].x,points[5].y,{x:-1,y:-1}),~
    +      }
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -              SquareCollider.new(points[5].x,points[5].y,{x:-1,y:-1}),
    -** Processing line: ~              SquareCollider.new(points[6].x-COLLISIONWIDTH,points[6].y-COLLISIONWIDTH,{x:-1,y:-1}),~
    +
    +** Processing line: ~      @button_list[id][:primitives] # returns label and border for buttons~
     - Inside source: true
     *** True Line Result
    -              SquareCollider.new(points[6].x-COLLISIONWIDTH,points[6].y-COLLISIONWIDTH,{x:-1,y:-1}),
    -** Processing line: ~              SquareCollider.new(points[7].x,points[7].y,{x:-1,y:-1}),~
    +      @button_list[id][:primitives] # returns label and border for buttons
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -              SquareCollider.new(points[7].x,points[7].y,{x:-1,y:-1}),
    -** Processing line: ~            ]~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -            ]
    -** Processing line: ~            @colliders = [~
    +
    +** Processing line: ~    # Creates a progress bar (used for lighting the fire) and sets its values.~
     - Inside source: true
     *** True Line Result
    -            @colliders = [
    -** Processing line: ~              LinearCollider.new(points[0],points[1], :pos),~
    +    # Creates a progress bar (used for lighting the fire) and sets its values.
    +** Processing line: ~    def progress_bar id, x, y, text, percentage~
     - Inside source: true
     *** True Line Result
    -              LinearCollider.new(points[0],points[1], :pos),
    -** Processing line: ~              LinearCollider.new(points[1],points[2], :pos),~
    +    def progress_bar id, x, y, text, percentage
    +** Processing line: ~      @button_list[id] = { # assigns values to hash keys~
     - Inside source: true
     *** True Line Result
    -              LinearCollider.new(points[1],points[2], :pos),
    -** Processing line: ~              LinearCollider.new(points[2],points[3], :neg),~
    +      @button_list[id] = { # assigns values to hash keys
    +** Processing line: ~        id: id,~
     - Inside source: true
     *** True Line Result
    -              LinearCollider.new(points[2],points[3], :neg),
    -** Processing line: ~              LinearCollider.new(points[3],points[4], :pos),~
    +        id: id,
    +** Processing line: ~        text: text,~
     - Inside source: true
     *** True Line Result
    -              LinearCollider.new(points[3],points[4], :pos),
    -** Processing line: ~              LinearCollider.new(points[4],points[5], :neg),~
    +        text: text,
    +** Processing line: ~        primitives: [~
     - Inside source: true
     *** True Line Result
    -              LinearCollider.new(points[4],points[5], :neg),
    -** Processing line: ~              LinearCollider.new(points[5],points[6], :pos),~
    +        primitives: [
    +** Processing line: ~          [x, y, 300, 50, 100, 100, 100].solid, # sets definition for solid (which fills the bar with gray)~
     - Inside source: true
     *** True Line Result
    -              LinearCollider.new(points[5],points[6], :pos),
    -** Processing line: ~              LinearCollider.new(points[6],points[7], :neg),~
    +          [x, y, 300, 50, 100, 100, 100].solid, # sets definition for solid (which fills the bar with gray)
    +** Processing line: ~          [x + 10, y + 30, text, 2, 0].label, # sets definition for label, positions inside border~
     - Inside source: true
     *** True Line Result
    -              LinearCollider.new(points[6],points[7], :neg),
    -** Processing line: ~              LinearCollider.new(points[0],points[7], :neg)~
    +          [x + 10, y + 30, text, 2, 0].label, # sets definition for label, positions inside border
    +** Processing line: ~          [x, y, 300, 50].border, # sets definition of border~
     - Inside source: true
     *** True Line Result
    -              LinearCollider.new(points[0],points[7], :neg)
    -** Processing line: ~            ]~
    +          [x, y, 300, 50].border, # sets definition of border
    +** Processing line: ~        ]~
     - Inside source: true
     *** True Line Result
    -            ]
    -** Processing line: ~        end~
    +        ]
    +** Processing line: ~      }~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~        return points~
    +      }
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        return points
    -** Processing line: ~      end~
    +
    +** Processing line: ~      # Fills progress bar based on percentage. If the fire was ready to be lit (100%) and we multiplied by~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +      # Fills progress bar based on percentage. If the fire was ready to be lit (100%) and we multiplied by
    +** Processing line: ~      # 100, only 1/3 of the bar would only be filled in. 200 would cause only 2/3 to be filled in.~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      def draw(args)~
    +      # 100, only 1/3 of the bar would only be filled in. 200 would cause only 2/3 to be filled in.
    +** Processing line: ~      @button_list[id][:primitives][0][2] = 300 * percentage~
     - Inside source: true
     *** True Line Result
    -      def draw(args)
    -** Processing line: ~          #Offset the coordinates to the edge of the game area~
    +      @button_list[id][:primitives][0][2] = 300 * percentage
    +** Processing line: ~      @button_list[id][:primitives]~
     - Inside source: true
     *** True Line Result
    -          #Offset the coordinates to the edge of the game area
    -** Processing line: ~          x_offset = (args.state.board_width + args.grid.w / 8) + (@block_offset / 2)~
    +      @button_list[id][:primitives]
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -          x_offset = (args.state.board_width + args.grid.w / 8) + (@block_offset / 2)
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~          if @orientation == :right~
    +** Processing line: ~    # Defines the game.~
     - Inside source: true
     *** True Line Result
    -          if @orientation == :right
    -** Processing line: ~              #args.outputs.solids << [@x + x_offset, @y, @block_size - @block_offset, @block_size * 3 - @block_offset, @r, @g, @b]~
    +    # Defines the game.
    +** Processing line: ~    def game~
     - Inside source: true
     *** True Line Result
    -              #args.outputs.solids << [@x + x_offset, @y, @block_size - @block_offset, @block_size * 3 - @block_offset, @r, @g, @b]
    -** Processing line: ~              args.outputs.solids << {x: (@x + x_offset), y: @y, w: @block_size - @block_offset, h: (@block_size * 3 - @block_offset), r: @r , g: @g, b: @b}~
    +    def game
    +** Processing line: ~      @game~
     - Inside source: true
     *** True Line Result
    -              args.outputs.solids << {x: (@x + x_offset), y: @y, w: @block_size - @block_offset, h: (@block_size * 3 - @block_offset), r: @r , g: @g, b: @b}
    -** Processing line: ~              #args.outputs.solids << [@x + x_offset, @y + @block_size, @block_size * 2, @block_size, @r, @g, @b]~
    +      @game
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -              #args.outputs.solids << [@x + x_offset, @y + @block_size, @block_size * 2, @block_size, @r, @g, @b]
    -** Processing line: ~              args.outputs.solids << {x: (@x + x_offset), y: (@y + @block_size), w: (@block_size * 2), h: (@block_size), r: @r , g: @g, b: @b }~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -              args.outputs.solids << {x: (@x + x_offset), y: (@y + @block_size), w: (@block_size * 2), h: (@block_size), r: @r , g: @g, b: @b }
    -** Processing line: ~          elsif @orientation == :up~
    +
    +** Processing line: ~    # Initalizes the game and creates an empty list of buttons.~
     - Inside source: true
     *** True Line Result
    -          elsif @orientation == :up
    -** Processing line: ~              #args.outputs.solids << [@x + x_offset, @y, @block_size * 3 - @block_offset, @block_size - @block_offset, @r, @g, @b]~
    +    # Initalizes the game and creates an empty list of buttons.
    +** Processing line: ~    def initialize~
     - Inside source: true
     *** True Line Result
    -              #args.outputs.solids << [@x + x_offset, @y, @block_size * 3 - @block_offset, @block_size - @block_offset, @r, @g, @b]
    -** Processing line: ~              args.outputs.solids << {x: (@x + x_offset), y: (@y), w: (@block_size * 3 - @block_offset), h: (@block_size - @block_offset), r: @r , g: @g, b: @b}~
    +    def initialize
    +** Processing line: ~      @game = TextedBasedGame.new self~
     - Inside source: true
     *** True Line Result
    -              args.outputs.solids << {x: (@x + x_offset), y: (@y), w: (@block_size * 3 - @block_offset), h: (@block_size - @block_offset), r: @r , g: @g, b: @b}
    -** Processing line: ~              #args.outputs.solids << [@x + x_offset + @block_size, @y, @block_size, @block_size * 2, @r, @g, @b]~
    +      @game = TextedBasedGame.new self
    +** Processing line: ~      @button_list ||= {}~
     - Inside source: true
     *** True Line Result
    -              #args.outputs.solids << [@x + x_offset + @block_size, @y, @block_size, @block_size * 2, @r, @g, @b]
    -** Processing line: ~              args.outputs.solids << {x: (@x + x_offset + @block_size), y: (@y), w: (@block_size), h: (@block_size * 2), r: @r , g: @g, b: @b}~
    +      @button_list ||= {}
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -              args.outputs.solids << {x: (@x + x_offset + @block_size), y: (@y), w: (@block_size), h: (@block_size * 2), r: @r , g: @g, b: @b}
    -** Processing line: ~          elsif @orientation == :left~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          elsif @orientation == :left
    -** Processing line: ~              #args.outputs.solids << [@x + x_offset + @block_size, @y, @block_size - @block_offset, @block_size * 3 - @block_offset, @r, @g, @b]~
    +
    +** Processing line: ~    # Clears the storyline and takes the user to the room.~
     - Inside source: true
     *** True Line Result
    -              #args.outputs.solids << [@x + x_offset + @block_size, @y, @block_size - @block_offset, @block_size * 3 - @block_offset, @r, @g, @b]
    -** Processing line: ~              args.outputs.solids << {x: (@x + x_offset + @block_size), y: (@y), w: (@block_size - @block_offset), h: (@block_size * 3 - @block_offset), r: @r , g: @g, b: @b}~
    +    # Clears the storyline and takes the user to the room.
    +** Processing line: ~    def alert_dismiss_clicked~
     - Inside source: true
     *** True Line Result
    -              args.outputs.solids << {x: (@x + x_offset + @block_size), y: (@y), w: (@block_size - @block_offset), h: (@block_size * 3 - @block_offset), r: @r , g: @g, b: @b}
    -** Processing line: ~              #args.outputs.solids << [@x + x_offset, @y + @block_size, @block_size * 2 - @block_offset, @block_size - @block_offset, @r, @g, @b]~
    +    def alert_dismiss_clicked
    +** Processing line: ~      game.clear_storyline~
     - Inside source: true
     *** True Line Result
    -              #args.outputs.solids << [@x + x_offset, @y + @block_size, @block_size * 2 - @block_offset, @block_size - @block_offset, @r, @g, @b]
    -** Processing line: ~              args.outputs.solids << {x: (@x + x_offset), y: (@y + @block_size), w: (@block_size * 2 - @block_offset), h: (@block_size - @block_offset), r: @r , g: @g, b: @b}~
    +      game.clear_storyline
    +** Processing line: ~      game.go_to_room~
     - Inside source: true
     *** True Line Result
    -              args.outputs.solids << {x: (@x + x_offset), y: (@y + @block_size), w: (@block_size * 2 - @block_offset), h: (@block_size - @block_offset), r: @r , g: @g, b: @b}
    -** Processing line: ~          elsif @orientation == :down~
    +      game.go_to_room
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -          elsif @orientation == :down
    -** Processing line: ~              #args.outputs.solids << [@x + x_offset, @y + @block_size, @block_size * 3 - @block_offset, @block_size - @block_offset, @r, @g, @b]~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -              #args.outputs.solids << [@x + x_offset, @y + @block_size, @block_size * 3 - @block_offset, @block_size - @block_offset, @r, @g, @b]
    -** Processing line: ~              args.outputs.solids << {x: (@x + x_offset), y: (@y + @block_size), w: (@block_size * 3 - @block_offset), h: (@block_size - @block_offset), r: @r , g: @g, b: @b}~
    +
    +** Processing line: ~    # Lights the fire when the user clicks the "light fire" option.~
     - Inside source: true
     *** True Line Result
    -              args.outputs.solids << {x: (@x + x_offset), y: (@y + @block_size), w: (@block_size * 3 - @block_offset), h: (@block_size - @block_offset), r: @r , g: @g, b: @b}
    -** Processing line: ~              #args.outputs.solids << [@x + x_offset + @block_size, @y, @block_size - @block_offset, @block_size * 2 - @block_offset, @r, @g, @b]~
    +    # Lights the fire when the user clicks the "light fire" option.
    +** Processing line: ~    def light_fire_clicked~
     - Inside source: true
     *** True Line Result
    -              #args.outputs.solids << [@x + x_offset + @block_size, @y, @block_size - @block_offset, @block_size * 2 - @block_offset, @r, @g, @b]
    -** Processing line: ~              args.outputs.solids << {x: (@x + x_offset + @block_size), y: (@y), w: (@block_size - @block_offset), h: ( @block_size * 2 - @block_offset), r: @r , g: @g, b: @b}~
    +    def light_fire_clicked
    +** Processing line: ~      game.light_fire~
     - Inside source: true
     *** True Line Result
    -              args.outputs.solids << {x: (@x + x_offset + @block_size), y: (@y), w: (@block_size - @block_offset), h: ( @block_size * 2 - @block_offset), r: @r , g: @g, b: @b}
    -** Processing line: ~          end~
    +      game.light_fire
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -          end
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~          #psize = 5.0~
    -- Inside source: true
    -*** True Line Result
    -          #psize = 5.0
    -** Processing line: ~          #for p in @shapePoints~
    +** Processing line: ~    # Saves the game when the user clicks the "save" option.~
     - Inside source: true
     *** True Line Result
    -          #for p in @shapePoints
    -** Processing line: ~            #args.outputs.solids << [p.x-psize/2, p.y-psize/2, psize, psize, 0, 0, 0]~
    +    # Saves the game when the user clicks the "save" option.
    +** Processing line: ~    def save_game_clicked~
     - Inside source: true
     *** True Line Result
    -            #args.outputs.solids << [p.x-psize/2, p.y-psize/2, psize, psize, 0, 0, 0]
    -** Processing line: ~          #end~
    +    def save_game_clicked
    +** Processing line: ~      game.save~
     - Inside source: true
     *** True Line Result
    -          #end
    -** Processing line: ~          args.outputs.labels << [@x + x_offset + (@block_size * 2 - @block_offset)/2, (@y) + (@block_size * 2 - @block_offset)/2, @count.to_s]~
    +      game.save
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -          args.outputs.labels << [@x + x_offset + (@block_size * 2 - @block_offset)/2, (@y) + (@block_size * 2 - @block_offset)/2, @count.to_s]
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      end~
    +** Processing line: ~    # Resets the game when the user clicks the "reset" option.~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +    # Resets the game when the user clicks the "reset" option.
    +** Processing line: ~    def reset_game_clicked~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      def updateOne_old args~
    +    def reset_game_clicked
    +** Processing line: ~      game.reset~
     - Inside source: true
     *** True Line Result
    -      def updateOne_old args
    -** Processing line: ~        didHit = false~
    +      game.reset
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -        didHit = false
    -** Processing line: ~        hitter = nil~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        hitter = nil
    -** Processing line: ~        toCollide = nil~
    +
    +** Processing line: ~    # Loads the game when the user clicks the "load" option.~
     - Inside source: true
     *** True Line Result
    -        toCollide = nil
    -** Processing line: ~        for b in args.state.balls~
    +    # Loads the game when the user clicks the "load" option.
    +** Processing line: ~    def load_game_clicked~
     - Inside source: true
     *** True Line Result
    -        for b in args.state.balls
    -** Processing line: ~          if [b.x, b.y, b.width, b.height].intersect_rect?(@bold)~
    +    def load_game_clicked
    +** Processing line: ~      game.load~
     - Inside source: true
     *** True Line Result
    -          if [b.x, b.y, b.width, b.height].intersect_rect?(@bold)
    -** Processing line: ~            didSquare = false~
    +      game.load
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -            didSquare = false
    -** Processing line: ~            for s in @squareColliders~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -            for s in @squareColliders
    -** Processing line: ~              if (s.collision?(args, b))~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -              if (s.collision?(args, b))
    -** Processing line: ~                didSquare = true~
    +
    +** Processing line: ~  $text_based_rpg = TextedBasedGamePresenter.new~
     - Inside source: true
     *** True Line Result
    -                didSquare = true
    -** Processing line: ~                didHit = true~
    +  $text_based_rpg = TextedBasedGamePresenter.new
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -                didHit = true
    -** Processing line: ~                #s.collide(args, b)~
    +
    +** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
    -                #s.collide(args, b)
    -** Processing line: ~                toCollide = s~
    +  def tick args
    +** Processing line: ~    $text_based_rpg.state = args.state~
     - Inside source: true
     *** True Line Result
    -                toCollide = s
    -** Processing line: ~                hitter = b~
    +    $text_based_rpg.state = args.state
    +** Processing line: ~    $text_based_rpg.outputs = args.outputs~
     - Inside source: true
     *** True Line Result
    -                hitter = b
    -** Processing line: ~                break~
    +    $text_based_rpg.outputs = args.outputs
    +** Processing line: ~    $text_based_rpg.inputs = args.inputs~
     - Inside source: true
     *** True Line Result
    -                break
    -** Processing line: ~              end~
    +    $text_based_rpg.inputs = args.inputs
    +** Processing line: ~    $text_based_rpg.tick~
     - Inside source: true
     *** True Line Result
    -              end
    -** Processing line: ~            end~
    +    $text_based_rpg.tick
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -            end
    -** Processing line: ~            if (didSquare == false)~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -            if (didSquare == false)
    -** Processing line: ~              for c in @colliders~
    -- Inside source: true
    +
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
     *** True Line Result
    -              for c in @colliders
    -** Processing line: ~                #puts args.state.ball.velocity~
    -- Inside source: true
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
     *** True Line Result
    -                #puts args.state.ball.velocity
    -** Processing line: ~                if c.collision?(args, b.getPoints(args),b)~
    -- Inside source: true
    +
    +** Processing line: ~*** Advanced Audio - Audio Mixer - main.rb~
    +- Header detected.
     *** True Line Result
    -                if c.collision?(args, b.getPoints(args),b)
    -** Processing line: ~                  #c.collide args, b~
    -- Inside source: true
    +
     *** True Line Result
    -                  #c.collide args, b
    -** Processing line: ~                  toCollide = c~
    -- Inside source: true
    +*** Advanced Audio - Audio Mixer - main.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
     *** True Line Result
    -                  toCollide = c
    -** Processing line: ~                  didHit = true~
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/07_advanced_audio/01_audio_mixer/app/main.rb~
     - Inside source: true
     *** True Line Result
    -                  didHit = true
    -** Processing line: ~                  hitter = b~
    +  # ./samples/07_advanced_audio/01_audio_mixer/app/main.rb
    +** Processing line: ~  # these are the properties that you can sent on args.audio~
     - Inside source: true
     *** True Line Result
    -                  hitter = b
    -** Processing line: ~                  break~
    +  # these are the properties that you can sent on args.audio
    +** Processing line: ~  def spawn_new_sound args, name, path~
     - Inside source: true
     *** True Line Result
    -                  break
    -** Processing line: ~                end~
    +  def spawn_new_sound args, name, path
    +** Processing line: ~    # Spawn randomly in an area that won't be covered by UI.~
     - Inside source: true
     *** True Line Result
    -                end
    -** Processing line: ~              end~
    +    # Spawn randomly in an area that won't be covered by UI.
    +** Processing line: ~    screenx = (rand * 600.0) + 200.0~
     - Inside source: true
     *** True Line Result
    -              end
    -** Processing line: ~            end~
    +    screenx = (rand * 600.0) + 200.0
    +** Processing line: ~    screeny = (rand * 400.0) + 100.0~
     - Inside source: true
     *** True Line Result
    -            end
    -** Processing line: ~          end~
    +    screeny = (rand * 400.0) + 100.0
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          end
    -** Processing line: ~          if didHit~
    +
    +** Processing line: ~    id = new_sound_id! args~
     - Inside source: true
     *** True Line Result
    -          if didHit
    -** Processing line: ~            break~
    +    id = new_sound_id! args
    +** Processing line: ~    # you can hang anything on the audio hashes you want, so we store the~
     - Inside source: true
     *** True Line Result
    -            break
    -** Processing line: ~          end~
    +    # you can hang anything on the audio hashes you want, so we store the
    +** Processing line: ~    #  actual screen position in here for convenience.~
     - Inside source: true
     *** True Line Result
    -          end
    -** Processing line: ~        end~
    +    #  actual screen position in here for convenience.
    +** Processing line: ~    args.audio[id] = {~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~        if (didHit)~
    +    args.audio[id] = {
    +** Processing line: ~      name: name,~
     - Inside source: true
     *** True Line Result
    -        if (didHit)
    -** Processing line: ~          @count=0~
    +      name: name,
    +** Processing line: ~      input: path,~
     - Inside source: true
     *** True Line Result
    -          @count=0
    -** Processing line: ~          hitter.makeLeader args~
    +      input: path,
    +** Processing line: ~      screenx: screenx,~
     - Inside source: true
     *** True Line Result
    -          hitter.makeLeader args
    -** Processing line: ~          #toCollide.collide(args, hitter)~
    +      screenx: screenx,
    +** Processing line: ~      screeny: screeny,~
     - Inside source: true
     *** True Line Result
    -          #toCollide.collide(args, hitter)
    -** Processing line: ~          args.state.tshapes.delete(self)~
    +      screeny: screeny,
    +** Processing line: ~      x: ((screenx / 1279.0) * 2.0) - 1.0,  # scale to -1.0 - 1.0 range~
     - Inside source: true
     *** True Line Result
    -          args.state.tshapes.delete(self)
    -** Processing line: ~          #puts "HIT!" + hitter.number~
    +      x: ((screenx / 1279.0) * 2.0) - 1.0,  # scale to -1.0 - 1.0 range
    +** Processing line: ~      y: ((screeny / 719.0) * 2.0) - 1.0,   # scale to -1.0 - 1.0 range~
     - Inside source: true
     *** True Line Result
    -          #puts "HIT!" + hitter.number
    -** Processing line: ~        end~
    +      y: ((screeny / 719.0) * 2.0) - 1.0,   # scale to -1.0 - 1.0 range
    +** Processing line: ~      z: 0.0,~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~      end~
    +      z: 0.0,
    +** Processing line: ~      gain: 1.0,~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +      gain: 1.0,
    +** Processing line: ~      pitch: 1.0,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      def update_old args~
    +      pitch: 1.0,
    +** Processing line: ~      looping: true,~
     - Inside source: true
     *** True Line Result
    -      def update_old args
    -** Processing line: ~        if (@count == 1)~
    +      looping: true,
    +** Processing line: ~      paused: false~
     - Inside source: true
     *** True Line Result
    -        if (@count == 1)
    -** Processing line: ~          updateOne args~
    +      paused: false
    +** Processing line: ~    }~
     - Inside source: true
     *** True Line Result
    -          updateOne args
    -** Processing line: ~          return~
    +    }
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          return
    -** Processing line: ~        end~
    +
    +** Processing line: ~    args.state.selected = id~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~        didHit = false~
    +    args.state.selected = id
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -        didHit = false
    -** Processing line: ~        hitter = nil~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        hitter = nil
    -** Processing line: ~        for b in args.state.ballParents~
    +
    +** Processing line: ~  # these are values you can change on the ~args.audio~ data structure~
     - Inside source: true
     *** True Line Result
    -        for b in args.state.ballParents
    -** Processing line: ~          if [b.x, b.y, b.width, b.height].intersect_rect?(@bold)~
    +  # these are values you can change on the ~args.audio~ data structure
    +** Processing line: ~  def input_panel args~
     - Inside source: true
     *** True Line Result
    -          if [b.x, b.y, b.width, b.height].intersect_rect?(@bold)
    -** Processing line: ~            didSquare = false~
    +  def input_panel args
    +** Processing line: ~    return unless args.state.panel~
     - Inside source: true
     *** True Line Result
    -            didSquare = false
    -** Processing line: ~            for s in @squareColliders~
    +    return unless args.state.panel
    +** Processing line: ~    return if args.state.dragging~
     - Inside source: true
     *** True Line Result
    -            for s in @squareColliders
    -** Processing line: ~              if (s.collision?(args, b))~
    +    return if args.state.dragging
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -              if (s.collision?(args, b))
    -** Processing line: ~                didSquare = true~
    +
    +** Processing line: ~    audio_entry = args.audio[args.state.selected]~
     - Inside source: true
     *** True Line Result
    -                didSquare = true
    -** Processing line: ~                didHit=true~
    +    audio_entry = args.audio[args.state.selected]
    +** Processing line: ~    results = args.state.panel~
     - Inside source: true
     *** True Line Result
    -                didHit=true
    -** Processing line: ~                s.collide(args, b)~
    +    results = args.state.panel
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -                s.collide(args, b)
    -** Processing line: ~                hitter = b~
    +
    +** Processing line: ~    if args.state.mouse_state == :held && args.inputs.mouse.position.inside_rect?(results.pitch_slider_rect.rect)~
     - Inside source: true
     *** True Line Result
    -                hitter = b
    -** Processing line: ~              end~
    +    if args.state.mouse_state == :held && args.inputs.mouse.position.inside_rect?(results.pitch_slider_rect.rect)
    +** Processing line: ~      audio_entry.pitch = 2.0 * ((args.inputs.mouse.x - results.pitch_slider_rect.x).to_f / (results.pitch_slider_rect.w - 1.0))~
     - Inside source: true
     *** True Line Result
    -              end
    -** Processing line: ~            end~
    +      audio_entry.pitch = 2.0 * ((args.inputs.mouse.x - results.pitch_slider_rect.x).to_f / (results.pitch_slider_rect.w - 1.0))
    +** Processing line: ~    elsif args.state.mouse_state == :held && args.inputs.mouse.position.inside_rect?(results.playtime_slider_rect.rect)~
     - Inside source: true
     *** True Line Result
    -            end
    -** Processing line: ~            if (didSquare == false)~
    +    elsif args.state.mouse_state == :held && args.inputs.mouse.position.inside_rect?(results.playtime_slider_rect.rect)
    +** Processing line: ~      audio_entry.playtime = audio_entry.length_ * ((args.inputs.mouse.x - results.playtime_slider_rect.x).to_f / (results.playtime_slider_rect.w - 1.0))~
     - Inside source: true
     *** True Line Result
    -            if (didSquare == false)
    -** Processing line: ~              for c in @colliders~
    +      audio_entry.playtime = audio_entry.length_ * ((args.inputs.mouse.x - results.playtime_slider_rect.x).to_f / (results.playtime_slider_rect.w - 1.0))
    +** Processing line: ~    elsif args.state.mouse_state == :held && args.inputs.mouse.position.inside_rect?(results.gain_slider_rect.rect)~
     - Inside source: true
     *** True Line Result
    -              for c in @colliders
    -** Processing line: ~                #puts args.state.ball.velocity~
    +    elsif args.state.mouse_state == :held && args.inputs.mouse.position.inside_rect?(results.gain_slider_rect.rect)
    +** Processing line: ~      audio_entry.gain = (args.inputs.mouse.x - results.gain_slider_rect.x).to_f / (results.gain_slider_rect.w - 1.0)~
     - Inside source: true
     *** True Line Result
    -                #puts args.state.ball.velocity
    -** Processing line: ~                if c.collision?(args, b.getPoints(args), b)~
    +      audio_entry.gain = (args.inputs.mouse.x - results.gain_slider_rect.x).to_f / (results.gain_slider_rect.w - 1.0)
    +** Processing line: ~    elsif args.inputs.mouse.click && args.inputs.mouse.position.inside_rect?(results.looping_checkbox_rect.rect)~
     - Inside source: true
     *** True Line Result
    -                if c.collision?(args, b.getPoints(args), b)
    -** Processing line: ~                  c.collide args, b~
    +    elsif args.inputs.mouse.click && args.inputs.mouse.position.inside_rect?(results.looping_checkbox_rect.rect)
    +** Processing line: ~      audio_entry.looping = !audio_entry.looping~
     - Inside source: true
     *** True Line Result
    -                  c.collide args, b
    -** Processing line: ~                  didHit=true~
    +      audio_entry.looping = !audio_entry.looping
    +** Processing line: ~    elsif args.inputs.mouse.click && args.inputs.mouse.position.inside_rect?(results.paused_checkbox_rect.rect)~
     - Inside source: true
     *** True Line Result
    -                  didHit=true
    -** Processing line: ~                  hitter = b~
    +    elsif args.inputs.mouse.click && args.inputs.mouse.position.inside_rect?(results.paused_checkbox_rect.rect)
    +** Processing line: ~      audio_entry.paused = !audio_entry.paused~
     - Inside source: true
     *** True Line Result
    -                  hitter = b
    -** Processing line: ~                end~
    +      audio_entry.paused = !audio_entry.paused
    +** Processing line: ~    elsif args.inputs.mouse.click && args.inputs.mouse.position.inside_rect?(results.delete_button_rect.rect)~
     - Inside source: true
     *** True Line Result
    -                end
    -** Processing line: ~              end~
    +    elsif args.inputs.mouse.click && args.inputs.mouse.position.inside_rect?(results.delete_button_rect.rect)
    +** Processing line: ~      args.audio.delete args.state.selected~
     - Inside source: true
     *** True Line Result
    -              end
    -** Processing line: ~            end~
    +      args.audio.delete args.state.selected
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -            end
    -** Processing line: ~          end~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -          end
    -** Processing line: ~        end~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~        if (didHit)~
    +
    +** Processing line: ~  def render_sources args~
     - Inside source: true
     *** True Line Result
    -        if (didHit)
    -** Processing line: ~          @count=@count-1~
    +  def render_sources args
    +** Processing line: ~    args.outputs.primitives << args.audio.keys.map do |k|~
     - Inside source: true
     *** True Line Result
    -          @count=@count-1
    -** Processing line: ~          @damageCount.append([(hitter.leastChain+1 - hitter.number)-1, args.state.tick_count])~
    +    args.outputs.primitives << args.audio.keys.map do |k|
    +** Processing line: ~      s = args.audio[k]~
     - Inside source: true
     *** True Line Result
    -          @damageCount.append([(hitter.leastChain+1 - hitter.number)-1, args.state.tick_count])
    +      s = args.audio[k]
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~          if (@count == 0)~
    -- Inside source: true
    -*** True Line Result
    -          if (@count == 0)
    -** Processing line: ~            args.state.tshapes.delete(self)~
    +** Processing line: ~      isselected = (k == args.state.selected)~
     - Inside source: true
     *** True Line Result
    -            args.state.tshapes.delete(self)
    -** Processing line: ~            return~
    +      isselected = (k == args.state.selected)
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -            return
    -** Processing line: ~          end~
    +
    +** Processing line: ~      color = isselected ? [ 0, 255, 0, 255 ] : [ 0, 0, 255, 255 ]~
     - Inside source: true
     *** True Line Result
    -          end
    -** Processing line: ~        end~
    +      color = isselected ? [ 0, 255, 0, 255 ] : [ 0, 0, 255, 255 ]
    +** Processing line: ~      [~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~        i=0~
    +      [
    +** Processing line: ~        [s.screenx, s.screeny, args.state.boxsize, args.state.boxsize, *color].solid,~
     - Inside source: true
     *** True Line Result
    -        i=0
    +        [s.screenx, s.screeny, args.state.boxsize, args.state.boxsize, *color].solid,
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~        while i < @damageCount.length~
    -- Inside source: true
    -*** True Line Result
    -        while i < @damageCount.length
    -** Processing line: ~          if @damageCount[i][0] <= 0~
    -- Inside source: true
    -*** True Line Result
    -          if @damageCount[i][0] <= 0
    -** Processing line: ~            @damageCount.delete_at(i)~
    -- Inside source: true
    -*** True Line Result
    -            @damageCount.delete_at(i)
    -** Processing line: ~            i-=1~
    +** Processing line: ~        {~
     - Inside source: true
     *** True Line Result
    -            i-=1
    -** Processing line: ~          elsif @damageCount[i][1].elapsed_time > BALL_DISTANCE~
    +        {
    +** Processing line: ~          x: s.screenx + args.state.boxsize.half,~
     - Inside source: true
     *** True Line Result
    -          elsif @damageCount[i][1].elapsed_time > BALL_DISTANCE
    -** Processing line: ~            @count-=1~
    +          x: s.screenx + args.state.boxsize.half,
    +** Processing line: ~          y: s.screeny,~
     - Inside source: true
     *** True Line Result
    -            @count-=1
    -** Processing line: ~            @damageCount[i][0]-=1~
    +          y: s.screeny,
    +** Processing line: ~          text: s.name,~
     - Inside source: true
     *** True Line Result
    -            @damageCount[i][0]-=1
    -** Processing line: ~          end~
    +          text: s.name,
    +** Processing line: ~          r: 255,~
     - Inside source: true
     *** True Line Result
    -          end
    -** Processing line: ~          if (@count == 0)~
    +          r: 255,
    +** Processing line: ~          g: 255,~
     - Inside source: true
     *** True Line Result
    -          if (@count == 0)
    -** Processing line: ~            args.state.tshapes.delete(self)~
    +          g: 255,
    +** Processing line: ~          b: 255,~
     - Inside source: true
     *** True Line Result
    -            args.state.tshapes.delete(self)
    -** Processing line: ~            return~
    +          b: 255,
    +** Processing line: ~          alignment_enum: 1~
     - Inside source: true
     *** True Line Result
    -            return
    -** Processing line: ~          end~
    +          alignment_enum: 1
    +** Processing line: ~        }.label!~
     - Inside source: true
     *** True Line Result
    -          end
    -** Processing line: ~          i+=1~
    +        }.label!
    +** Processing line: ~      ]~
     - Inside source: true
     *** True Line Result
    -          i+=1
    -** Processing line: ~        end~
    +      ]
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~      end #end update~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -      end #end update
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      def update args~
    +** Processing line: ~  def playtime_str t~
     - Inside source: true
     *** True Line Result
    -      def update args
    -** Processing line: ~        universalUpdate args, self~
    +  def playtime_str t
    +** Processing line: ~    minutes = (t / 60.0).floor~
     - Inside source: true
     *** True Line Result
    -        universalUpdate args, self
    -** Processing line: ~      end~
    +    minutes = (t / 60.0).floor
    +** Processing line: ~    seconds = t - (minutes * 60.0).to_f~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +    seconds = t - (minutes * 60.0).to_f
    +** Processing line: ~    return minutes.to_s + ':' + seconds.floor.to_s + ((seconds - seconds.floor).to_s + "000")[1..3]~
     - Inside source: true
     *** True Line Result
    -
    +    return minutes.to_s + ':' + seconds.floor.to_s + ((seconds - seconds.floor).to_s + "000")[1..3]
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -35092,798 +43255,794 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  class Line~
    +** Processing line: ~  def label_with_drop_shadow x, y, text~
     - Inside source: true
     *** True Line Result
    -  class Line
    -** Processing line: ~      attr_accessor :count, :x, :y, :home, :bold, :squareColliders, :colliders, :damageCount~
    +  def label_with_drop_shadow x, y, text
    +** Processing line: ~    [~
     - Inside source: true
     *** True Line Result
    -      attr_accessor :count, :x, :y, :home, :bold, :squareColliders, :colliders, :damageCount
    -** Processing line: ~      def initialize(args, x, y, block_size, orientation, block_offset)~
    +    [
    +** Processing line: ~      { x: x + 1, y: y + 1, text: text, vertical_alignment_enum: 1, alignment_enum: 1, r:   0, g:   0, b:   0 }.label!,~
     - Inside source: true
     *** True Line Result
    -      def initialize(args, x, y, block_size, orientation, block_offset)
    -** Processing line: ~          @x = x * block_size~
    +      { x: x + 1, y: y + 1, text: text, vertical_alignment_enum: 1, alignment_enum: 1, r:   0, g:   0, b:   0 }.label!,
    +** Processing line: ~      { x: x + 2, y: y + 0, text: text, vertical_alignment_enum: 1, alignment_enum: 1, r:   0, g:   0, b:   0 }.label!,~
     - Inside source: true
     *** True Line Result
    -          @x = x * block_size
    -** Processing line: ~          @y = y * block_size~
    +      { x: x + 2, y: y + 0, text: text, vertical_alignment_enum: 1, alignment_enum: 1, r:   0, g:   0, b:   0 }.label!,
    +** Processing line: ~      { x: x + 0, y: y + 1, text: text, vertical_alignment_enum: 1, alignment_enum: 1, r: 200, g: 200, b: 200 }.label!~
     - Inside source: true
     *** True Line Result
    -          @y = y * block_size
    -** Processing line: ~          @block_size = block_size~
    +      { x: x + 0, y: y + 1, text: text, vertical_alignment_enum: 1, alignment_enum: 1, r: 200, g: 200, b: 200 }.label!
    +** Processing line: ~    ]~
     - Inside source: true
     *** True Line Result
    -          @block_size = block_size
    -** Processing line: ~          @block_offset = block_offset~
    +    ]
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -          @block_offset = block_offset
    -** Processing line: ~          @orientation = orientation~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          @orientation = orientation
    -** Processing line: ~          @damageCount = []~
    +
    +** Processing line: ~  def check_box opts = {}~
     - Inside source: true
     *** True Line Result
    -          @damageCount = []
    -** Processing line: ~          @home = "lines"~
    +  def check_box opts = {}
    +** Processing line: ~    checkbox_template = opts.args.layout.rect(w: 0.5, h: 0.5, col: 2)~
     - Inside source: true
     *** True Line Result
    -          @home = "lines"
    -** Processing line: ~~
    +    checkbox_template = opts.args.layout.rect(w: 0.5, h: 0.5, col: 2)
    +** Processing line: ~    final_rect = checkbox_template.center_inside_rect_y(opts.args.layout.rect(row: opts.row, col: opts.col))~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~          Kernel.srand()~
    +    final_rect = checkbox_template.center_inside_rect_y(opts.args.layout.rect(row: opts.row, col: opts.col))
    +** Processing line: ~    color = { r:   0, g:   0, b:   0 }~
     - Inside source: true
     *** True Line Result
    -          Kernel.srand()
    -** Processing line: ~          @r = rand(255)~
    +    color = { r:   0, g:   0, b:   0 }
    +** Processing line: ~    color = { r: 255, g: 255, b: 255 } if opts.checked~
     - Inside source: true
     *** True Line Result
    -          @r = rand(255)
    -** Processing line: ~          @g = rand(255)~
    +    color = { r: 255, g: 255, b: 255 } if opts.checked
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          @g = rand(255)
    -** Processing line: ~          @b = rand(255)~
    +
    +** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
    -          @b = rand(255)
    -** Processing line: ~~
    +    {
    +** Processing line: ~      rect: final_rect,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~          @count = rand(MAX_COUNT)+1~
    +      rect: final_rect,
    +** Processing line: ~      primitives: [~
     - Inside source: true
     *** True Line Result
    -          @count = rand(MAX_COUNT)+1
    -** Processing line: ~~
    +      primitives: [
    +** Processing line: ~        (final_rect.to_solid color)~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~          @shapePoints = getShapePoints(args)~
    +        (final_rect.to_solid color)
    +** Processing line: ~      ]~
     - Inside source: true
     *** True Line Result
    -          @shapePoints = getShapePoints(args)
    -** Processing line: ~          minX={x:INFINITY, y:0}~
    +      ]
    +** Processing line: ~    }~
     - Inside source: true
     *** True Line Result
    -          minX={x:INFINITY, y:0}
    -** Processing line: ~          minY={x:0, y:INFINITY}~
    +    }
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -          minY={x:0, y:INFINITY}
    -** Processing line: ~          maxX={x:-INFINITY, y:0}~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          maxX={x:-INFINITY, y:0}
    -** Processing line: ~          maxY={x:0, y:-INFINITY}~
    +
    +** Processing line: ~  def progress_bar opts = {}~
     - Inside source: true
     *** True Line Result
    -          maxY={x:0, y:-INFINITY}
    -** Processing line: ~          for p in @shapePoints~
    +  def progress_bar opts = {}
    +** Processing line: ~    outer_rect  = opts.args.layout.rect(row: opts.row, col: opts.col, w: 5, h: 1)~
     - Inside source: true
     *** True Line Result
    -          for p in @shapePoints
    -** Processing line: ~            if p.x < minX.x~
    +    outer_rect  = opts.args.layout.rect(row: opts.row, col: opts.col, w: 5, h: 1)
    +** Processing line: ~    color = opts.percentage * 255~
     - Inside source: true
     *** True Line Result
    -            if p.x < minX.x
    -** Processing line: ~              minX = p~
    +    color = opts.percentage * 255
    +** Processing line: ~    baseline_progress_bar = opts.args~
     - Inside source: true
     *** True Line Result
    -              minX = p
    -** Processing line: ~            end~
    +    baseline_progress_bar = opts.args
    +** Processing line: ~                                .layout~
     - Inside source: true
     *** True Line Result
    -            end
    -** Processing line: ~            if p.x > maxX.x~
    +                                .layout
    +** Processing line: ~                                .rect(w: 5, h: 0.5)~
     - Inside source: true
     *** True Line Result
    -            if p.x > maxX.x
    -** Processing line: ~              maxX = p~
    +                                .rect(w: 5, h: 0.5)
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -              maxX = p
    -** Processing line: ~            end~
    +
    +** Processing line: ~    final_rect = baseline_progress_bar.center_inside_rect(outer_rect)~
     - Inside source: true
     *** True Line Result
    -            end
    -** Processing line: ~            if p.y < minY.y~
    +    final_rect = baseline_progress_bar.center_inside_rect(outer_rect)
    +** Processing line: ~    center = final_rect.rect_center_point~
     - Inside source: true
     *** True Line Result
    -            if p.y < minY.y
    -** Processing line: ~              minY = p~
    +    center = final_rect.rect_center_point
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -              minY = p
    -** Processing line: ~            end~
    +
    +** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
    -            end
    -** Processing line: ~            if p.y > maxY.y~
    +    {
    +** Processing line: ~      rect: final_rect,~
     - Inside source: true
     *** True Line Result
    -            if p.y > maxY.y
    -** Processing line: ~              maxY = p~
    +      rect: final_rect,
    +** Processing line: ~      primitives: [~
     - Inside source: true
     *** True Line Result
    -              maxY = p
    -** Processing line: ~            end~
    +      primitives: [
    +** Processing line: ~        final_rect.merge(r: color, g: color, b: color, a: 128).solid!,~
     - Inside source: true
     *** True Line Result
    -            end
    -** Processing line: ~          end~
    +        final_rect.merge(r: color, g: color, b: color, a: 128).solid!,
    +** Processing line: ~        label_with_drop_shadow(center.x, center.y, opts.text)~
     - Inside source: true
     *** True Line Result
    -          end
    -** Processing line: ~~
    +        label_with_drop_shadow(center.x, center.y, opts.text)
    +** Processing line: ~      ]~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~~
    +      ]
    +** Processing line: ~    }~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~          hypotenuse=args.state.ball_hypotenuse~
    +    }
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -          hypotenuse=args.state.ball_hypotenuse
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~          @bold = [(minX.x-hypotenuse/2)-1, (minY.y-hypotenuse/2)-1, -((minX.x-hypotenuse/2)-1)+(maxX.x + hypotenuse + 2), -((minY.y-hypotenuse/2)-1)+(maxY.y + hypotenuse + 2)]~
    +** Processing line: ~  def panel_primitives args, audio_entry~
     - Inside source: true
     *** True Line Result
    -          @bold = [(minX.x-hypotenuse/2)-1, (minY.y-hypotenuse/2)-1, -((minX.x-hypotenuse/2)-1)+(maxX.x + hypotenuse + 2), -((minY.y-hypotenuse/2)-1)+(maxY.y + hypotenuse + 2)]
    -** Processing line: ~      end~
    +  def panel_primitives args, audio_entry
    +** Processing line: ~    results = { primitives: [] }~
     - Inside source: true
     *** True Line Result
    -      end
    +    results = { primitives: [] }
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      def getShapePoints(args)~
    -- Inside source: true
    -*** True Line Result
    -      def getShapePoints(args)
    -** Processing line: ~        points=[]~
    -- Inside source: true
    -*** True Line Result
    -        points=[]
    -** Processing line: ~        x_offset = (args.state.board_width + args.grid.w / 8) + (@block_offset / 2)~
    +** Processing line: ~    return results unless audio_entry~
     - Inside source: true
     *** True Line Result
    -        x_offset = (args.state.board_width + args.grid.w / 8) + (@block_offset / 2)
    +    return results unless audio_entry
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~        if @orientation == :right~
    +** Processing line: ~    # this uses DRGTK's layout apis to layout the controls~
     - Inside source: true
     *** True Line Result
    -        if @orientation == :right
    -** Processing line: ~          #args.outputs.solids << [@x + x_offset, @y, @block_size * 3 - @block_offset, @block_size - @block_offset, @r, @g, @b]~
    +    # this uses DRGTK's layout apis to layout the controls
    +** Processing line: ~    # imagine the screen is split into equal cells (24 cells across, 12 cells up and down)~
     - Inside source: true
     *** True Line Result
    -          #args.outputs.solids << [@x + x_offset, @y, @block_size * 3 - @block_offset, @block_size - @block_offset, @r, @g, @b]
    -** Processing line: ~          xa =@x + x_offset~
    +    # imagine the screen is split into equal cells (24 cells across, 12 cells up and down)
    +** Processing line: ~    # args.layout.rect returns a hash which we merge values with to create primitives~
     - Inside source: true
     *** True Line Result
    -          xa =@x + x_offset
    -** Processing line: ~          ya =@y~
    +    # args.layout.rect returns a hash which we merge values with to create primitives
    +** Processing line: ~    # using args.layout.rect removes the need for pixel pushing~
     - Inside source: true
     *** True Line Result
    -          ya =@y
    -** Processing line: ~          wa =@block_size * 3 - @block_offset~
    +    # using args.layout.rect removes the need for pixel pushing
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          wa =@block_size * 3 - @block_offset
    -** Processing line: ~          ha =(@block_size - @block_offset)~
    +
    +** Processing line: ~    # args.outputs.debug << args.layout.debug_primitives(r: 255, g: 255, b: 255)~
     - Inside source: true
     *** True Line Result
    -          ha =(@block_size - @block_offset)
    -** Processing line: ~        elsif @orientation == :up~
    +    # args.outputs.debug << args.layout.debug_primitives(r: 255, g: 255, b: 255)
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        elsif @orientation == :up
    -** Processing line: ~          #args.outputs.solids << [@x + x_offset, @y, @block_size - @block_offset, @block_size * 3 - @block_offset, @r, @g, @b]~
    +
    +** Processing line: ~    white_color = { r: 255, g: 255, b: 255 }~
     - Inside source: true
     *** True Line Result
    -          #args.outputs.solids << [@x + x_offset, @y, @block_size - @block_offset, @block_size * 3 - @block_offset, @r, @g, @b]
    -** Processing line: ~          xa =@x + x_offset~
    +    white_color = { r: 255, g: 255, b: 255 }
    +** Processing line: ~    label_style = white_color.merge(vertical_alignment_enum: 1)~
     - Inside source: true
     *** True Line Result
    -          xa =@x + x_offset
    -** Processing line: ~          ya =@y~
    +    label_style = white_color.merge(vertical_alignment_enum: 1)
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          ya =@y
    -** Processing line: ~          wa =@block_size - @block_offset~
    +
    +** Processing line: ~    # panel background~
     - Inside source: true
     *** True Line Result
    -          wa =@block_size - @block_offset
    -** Processing line: ~          ha =@block_size * 3 - @block_offset~
    +    # panel background
    +** Processing line: ~    results.primitives << args.layout.rect(row: 0, col: 0, w: 7, h: 6, include_col_gutter: true, include_row_gutter: true)~
     - Inside source: true
     *** True Line Result
    -          ha =@block_size * 3 - @block_offset
    -** Processing line: ~~
    +    results.primitives << args.layout.rect(row: 0, col: 0, w: 7, h: 6, include_col_gutter: true, include_row_gutter: true)
    +** Processing line: ~                                     .border!(r: 255, g: 255, b: 255)~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~        elsif @orientation == :left~
    +                                     .border!(r: 255, g: 255, b: 255)
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        elsif @orientation == :left
    -** Processing line: ~          #args.outputs.solids << [@x + x_offset, @y, @block_size * 3 - @block_offset, @block_size - @block_offset, @r, @g, @b]~
    +
    +** Processing line: ~    # title~
     - Inside source: true
     *** True Line Result
    -          #args.outputs.solids << [@x + x_offset, @y, @block_size * 3 - @block_offset, @block_size - @block_offset, @r, @g, @b]
    -** Processing line: ~          xa =@x + x_offset~
    +    # title
    +** Processing line: ~    results.primitives << args.layout.point(row: 0, col: 3.5, row_anchor: 0.5)~
     - Inside source: true
     *** True Line Result
    -          xa =@x + x_offset
    -** Processing line: ~          ya =@y~
    +    results.primitives << args.layout.point(row: 0, col: 3.5, row_anchor: 0.5)
    +** Processing line: ~                                     .merge(label_style)~
     - Inside source: true
     *** True Line Result
    -          ya =@y
    -** Processing line: ~          wa =@block_size * 3 - @block_offset~
    +                                     .merge(label_style)
    +** Processing line: ~                                     .merge(text:           "Source #{args.state.selected} (#{args.audio[args.state.selected].name})",~
     - Inside source: true
     *** True Line Result
    -          wa =@block_size * 3 - @block_offset
    -** Processing line: ~          ha =@block_size - @block_offset~
    +                                     .merge(text:           "Source #{args.state.selected} (#{args.audio[args.state.selected].name})",
    +** Processing line: ~                                            size_enum:      3,~
     - Inside source: true
     *** True Line Result
    -          ha =@block_size - @block_offset
    -** Processing line: ~        elsif @orientation == :down~
    +                                            size_enum:      3,
    +** Processing line: ~                                            alignment_enum: 1)~
     - Inside source: true
     *** True Line Result
    -        elsif @orientation == :down
    -** Processing line: ~          #args.outputs.solids << [@x + x_offset, @y, @block_size - @block_offset, @block_size * 3 - @block_offset, @r, @g, @b]~
    +                                            alignment_enum: 1)
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          #args.outputs.solids << [@x + x_offset, @y, @block_size - @block_offset, @block_size * 3 - @block_offset, @r, @g, @b]
    -** Processing line: ~          xa =@x + x_offset~
    +
    +** Processing line: ~    # seperator line~
     - Inside source: true
     *** True Line Result
    -          xa =@x + x_offset
    -** Processing line: ~          ya =@y~
    +    # seperator line
    +** Processing line: ~    results.primitives << args.layout.rect(row: 1, col: 0, w: 7, h: 0)~
     - Inside source: true
     *** True Line Result
    -          ya =@y
    -** Processing line: ~          wa =@block_size - @block_offset~
    +    results.primitives << args.layout.rect(row: 1, col: 0, w: 7, h: 0)
    +** Processing line: ~                                     .line!(white_color)~
     - Inside source: true
     *** True Line Result
    -          wa =@block_size - @block_offset
    -** Processing line: ~          ha =@block_size * 3 - @block_offset~
    +                                     .line!(white_color)
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          ha =@block_size * 3 - @block_offset
    -** Processing line: ~        end~
    +
    +** Processing line: ~    # screen location~
     - Inside source: true
    -*** True Line Result
    -        end
    -** Processing line: ~        points = [~
    +*** True Line Result
    +    # screen location
    +** Processing line: ~    results.primitives << args.layout.point(row: 1.0, col: 0, row_anchor: 0.5)~
     - Inside source: true
     *** True Line Result
    -        points = [
    -** Processing line: ~          {x: xa, y:ya},~
    +    results.primitives << args.layout.point(row: 1.0, col: 0, row_anchor: 0.5)
    +** Processing line: ~                                     .merge(label_style)~
     - Inside source: true
     *** True Line Result
    -          {x: xa, y:ya},
    -** Processing line: ~          {x: xa + wa,y:ya},~
    +                                     .merge(label_style)
    +** Processing line: ~                                     .merge(text: "screen:")~
     - Inside source: true
     *** True Line Result
    -          {x: xa + wa,y:ya},
    -** Processing line: ~          {x: xa + wa,y:ya+ha},~
    +                                     .merge(text: "screen:")
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          {x: xa + wa,y:ya+ha},
    -** Processing line: ~          {x: xa, y:ya+ha},~
    +
    +** Processing line: ~    results.primitives << args.layout.point(row: 1.0, col: 2, row_anchor: 0.5)~
     - Inside source: true
     *** True Line Result
    -          {x: xa, y:ya+ha},
    -** Processing line: ~        ]~
    +    results.primitives << args.layout.point(row: 1.0, col: 2, row_anchor: 0.5)
    +** Processing line: ~                                     .merge(label_style)~
     - Inside source: true
     *** True Line Result
    -        ]
    -** Processing line: ~        @squareColliders = [~
    +                                     .merge(label_style)
    +** Processing line: ~                                     .merge(text: "(#{audio_entry.screenx.to_i}, #{audio_entry.screeny.to_i})")~
     - Inside source: true
     *** True Line Result
    -        @squareColliders = [
    -** Processing line: ~          SquareCollider.new(points[0].x,points[0].y,{x:-1,y:-1}),~
    +                                     .merge(text: "(#{audio_entry.screenx.to_i}, #{audio_entry.screeny.to_i})")
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          SquareCollider.new(points[0].x,points[0].y,{x:-1,y:-1}),
    -** Processing line: ~          SquareCollider.new(points[1].x-COLLISIONWIDTH,points[1].y,{x:1,y:-1}),~
    +
    +** Processing line: ~    # position~
     - Inside source: true
     *** True Line Result
    -          SquareCollider.new(points[1].x-COLLISIONWIDTH,points[1].y,{x:1,y:-1}),
    -** Processing line: ~          SquareCollider.new(points[2].x-COLLISIONWIDTH,points[2].y-COLLISIONWIDTH,{x:1,y:1}),~
    +    # position
    +** Processing line: ~    results.primitives << args.layout.point(row: 1.5, col: 0, row_anchor: 0.5)~
     - Inside source: true
     *** True Line Result
    -          SquareCollider.new(points[2].x-COLLISIONWIDTH,points[2].y-COLLISIONWIDTH,{x:1,y:1}),
    -** Processing line: ~          SquareCollider.new(points[3].x,points[3].y-COLLISIONWIDTH,{x:-1,y:1}),~
    +    results.primitives << args.layout.point(row: 1.5, col: 0, row_anchor: 0.5)
    +** Processing line: ~                                     .merge(label_style)~
     - Inside source: true
     *** True Line Result
    -          SquareCollider.new(points[3].x,points[3].y-COLLISIONWIDTH,{x:-1,y:1}),
    -** Processing line: ~        ]~
    +                                     .merge(label_style)
    +** Processing line: ~                                     .merge(text: "position:")~
     - Inside source: true
     *** True Line Result
    -        ]
    -** Processing line: ~        @colliders = [~
    +                                     .merge(text: "position:")
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        @colliders = [
    -** Processing line: ~          LinearCollider.new(points[0],points[1], :neg),~
    +
    +** Processing line: ~    results.primitives << args.layout.point(row: 1.5, col: 2, row_anchor: 0.5)~
     - Inside source: true
     *** True Line Result
    -          LinearCollider.new(points[0],points[1], :neg),
    -** Processing line: ~          LinearCollider.new(points[1],points[2], :neg),~
    +    results.primitives << args.layout.point(row: 1.5, col: 2, row_anchor: 0.5)
    +** Processing line: ~                                     .merge(label_style)~
     - Inside source: true
     *** True Line Result
    -          LinearCollider.new(points[1],points[2], :neg),
    -** Processing line: ~          LinearCollider.new(points[2],points[3], :pos),~
    +                                     .merge(label_style)
    +** Processing line: ~                                     .merge(text: "(#{audio_entry[:x].round(5).to_s[0..6]}, #{audio_entry[:y].round(5).to_s[0..6]})")~
     - Inside source: true
     *** True Line Result
    -          LinearCollider.new(points[2],points[3], :pos),
    -** Processing line: ~          LinearCollider.new(points[0],points[3], :pos),~
    +                                     .merge(text: "(#{audio_entry[:x].round(5).to_s[0..6]}, #{audio_entry[:y].round(5).to_s[0..6]})")
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          LinearCollider.new(points[0],points[3], :pos),
    -** Processing line: ~        ]~
    +
    +** Processing line: ~    results.primitives << args.layout.point(row: 2.0, col: 0, row_anchor: 0.5)~
     - Inside source: true
     *** True Line Result
    -        ]
    -** Processing line: ~        return points~
    +    results.primitives << args.layout.point(row: 2.0, col: 0, row_anchor: 0.5)
    +** Processing line: ~                                     .merge(label_style)~
     - Inside source: true
     *** True Line Result
    -        return points
    -** Processing line: ~      end~
    +                                     .merge(label_style)
    +** Processing line: ~                                     .merge(text: "pitch:")~
     - Inside source: true
     *** True Line Result
    -      end
    +                                     .merge(text: "pitch:")
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      def update args~
    +** Processing line: ~    results.pitch_slider_rect = progress_bar(row: 2.0, col: 2,~
     - Inside source: true
     *** True Line Result
    -      def update args
    -** Processing line: ~        universalUpdate args, self~
    +    results.pitch_slider_rect = progress_bar(row: 2.0, col: 2,
    +** Processing line: ~                                             percentage: audio_entry.pitch / 2.0,~
     - Inside source: true
     *** True Line Result
    -        universalUpdate args, self
    -** Processing line: ~      end~
    +                                             percentage: audio_entry.pitch / 2.0,
    +** Processing line: ~                                             text: "#{audio_entry.pitch.to_sf}",~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +                                             text: "#{audio_entry.pitch.to_sf}",
    +** Processing line: ~                                             args: args)~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      def draw(args)~
    +                                             args: args)
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      def draw(args)
    -** Processing line: ~          x_offset = (args.state.board_width + args.grid.w / 8) + @block_offset / 2~
    +
    +** Processing line: ~    results.primitives << results.pitch_slider_rect.primitives~
     - Inside source: true
     *** True Line Result
    -          x_offset = (args.state.board_width + args.grid.w / 8) + @block_offset / 2
    +    results.primitives << results.pitch_slider_rect.primitives
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~          if @orientation == :right~
    +** Processing line: ~    results.primitives << args.layout.point(row: 2.5, col: 0, row_anchor: 0.5)~
     - Inside source: true
     *** True Line Result
    -          if @orientation == :right
    -** Processing line: ~              args.outputs.solids << [@x + x_offset, @y, @block_size * 3 - @block_offset, @block_size - @block_offset, @r, @g, @b]~
    +    results.primitives << args.layout.point(row: 2.5, col: 0, row_anchor: 0.5)
    +** Processing line: ~                                     .merge(label_style)~
     - Inside source: true
     *** True Line Result
    -              args.outputs.solids << [@x + x_offset, @y, @block_size * 3 - @block_offset, @block_size - @block_offset, @r, @g, @b]
    -** Processing line: ~          elsif @orientation == :up~
    +                                     .merge(label_style)
    +** Processing line: ~                                     .merge(text: "playtime:")~
     - Inside source: true
     *** True Line Result
    -          elsif @orientation == :up
    -** Processing line: ~              args.outputs.solids << [@x + x_offset, @y, @block_size - @block_offset, @block_size * 3 - @block_offset, @r, @g, @b]~
    +                                     .merge(text: "playtime:")
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -              args.outputs.solids << [@x + x_offset, @y, @block_size - @block_offset, @block_size * 3 - @block_offset, @r, @g, @b]
    -** Processing line: ~          elsif @orientation == :left~
    +
    +** Processing line: ~    results.playtime_slider_rect = progress_bar(args: args,~
     - Inside source: true
     *** True Line Result
    -          elsif @orientation == :left
    -** Processing line: ~              args.outputs.solids << [@x + x_offset, @y, @block_size * 3 - @block_offset, @block_size - @block_offset, @r, @g, @b]~
    +    results.playtime_slider_rect = progress_bar(args: args,
    +** Processing line: ~                                                row:  2.5,~
     - Inside source: true
     *** True Line Result
    -              args.outputs.solids << [@x + x_offset, @y, @block_size * 3 - @block_offset, @block_size - @block_offset, @r, @g, @b]
    -** Processing line: ~          elsif @orientation == :down~
    +                                                row:  2.5,
    +** Processing line: ~                                                col:  2,~
     - Inside source: true
     *** True Line Result
    -          elsif @orientation == :down
    -** Processing line: ~              args.outputs.solids << [@x + x_offset, @y, @block_size - @block_offset, @block_size * 3 - @block_offset, @r, @g, @b]~
    +                                                col:  2,
    +** Processing line: ~                                                percentage: audio_entry.playtime / audio_entry.length_,~
     - Inside source: true
     *** True Line Result
    -              args.outputs.solids << [@x + x_offset, @y, @block_size - @block_offset, @block_size * 3 - @block_offset, @r, @g, @b]
    -** Processing line: ~          end~
    +                                                percentage: audio_entry.playtime / audio_entry.length_,
    +** Processing line: ~                                                text: "#{playtime_str(audio_entry.playtime)} / #{playtime_str(audio_entry.length_)}")~
     - Inside source: true
     *** True Line Result
    -          end
    +                                                text: "#{playtime_str(audio_entry.playtime)} / #{playtime_str(audio_entry.length_)}")
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~          args.outputs.labels << [@x + x_offset + (@block_size * 2 - @block_offset)/2, (@y) + (@block_size * 2 - @block_offset)/2, @count.to_s]~
    +** Processing line: ~    results.primitives << results.playtime_slider_rect.primitives~
     - Inside source: true
     *** True Line Result
    -          args.outputs.labels << [@x + x_offset + (@block_size * 2 - @block_offset)/2, (@y) + (@block_size * 2 - @block_offset)/2, @count.to_s]
    +    results.primitives << results.playtime_slider_rect.primitives
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      end~
    +** Processing line: ~    results.primitives << args.layout.point(row: 3.0, col: 0, row_anchor: 0.5)~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~  end~
    +    results.primitives << args.layout.point(row: 3.0, col: 0, row_anchor: 0.5)
    +** Processing line: ~                                     .merge(label_style)~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +                                     .merge(label_style)
    +** Processing line: ~                                     .merge(text: "gain:")~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~#+end_src~
    -- Line was identified as the end of a code block.
    -*** True Line Result
    -#+end_src
    +                                     .merge(text: "gain:")
     ** Processing line: ~~
    -- End of paragraph detected.
    +- Inside source: true
     *** True Line Result
     
    -** Processing line: ~*** Physics And Collisions - Arbitrary Collision - linear_collider.rb~
    -- Header detected.
    +** Processing line: ~    results.gain_slider_rect = progress_bar(args: args,~
    +- Inside source: true
     *** True Line Result
    -
    +    results.gain_slider_rect = progress_bar(args: args,
    +** Processing line: ~                                            row:  3.0,~
    +- Inside source: true
     *** True Line Result
    -*** Physics And Collisions - Arbitrary Collision - linear_collider.rb
    -** Processing line: ~#+begin_src ruby~
    -- Line was identified as the beginning of a code block.
    +                                            row:  3.0,
    +** Processing line: ~                                            col:  2,~
    +- Inside source: true
     *** True Line Result
    -
    +                                            col:  2,
    +** Processing line: ~                                            percentage: audio_entry.gain,~
    +- Inside source: true
     *** True Line Result
    -#+begin_src ruby
    -** Processing line: ~  # ./samples/04_physics_and_collisions/09_arbitrary_collision/app/linear_collider.rb~
    +                                            percentage: audio_entry.gain,
    +** Processing line: ~                                            text: "#{audio_entry.gain.to_sf}")~
     - Inside source: true
     *** True Line Result
    -  # ./samples/04_physics_and_collisions/09_arbitrary_collision/app/linear_collider.rb
    +                                            text: "#{audio_entry.gain.to_sf}")
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  COLLISIONWIDTH=8~
    +** Processing line: ~    results.primitives << results.gain_slider_rect.primitives~
     - Inside source: true
     *** True Line Result
    -  COLLISIONWIDTH=8
    +    results.primitives << results.gain_slider_rect.primitives
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  class LinearCollider~
    -- Inside source: true
    -*** True Line Result
    -  class LinearCollider
    -** Processing line: ~    attr_reader :pointA, :pointB~
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    attr_reader :pointA, :pointB
    -** Processing line: ~    def initialize (pointA, pointB, mode,collisionWidth=COLLISIONWIDTH)~
    +
    +** Processing line: ~    results.primitives << args.layout.point(row: 3.5, col: 0, row_anchor: 0.5)~
     - Inside source: true
     *** True Line Result
    -    def initialize (pointA, pointB, mode,collisionWidth=COLLISIONWIDTH)
    -** Processing line: ~      @pointA = pointA~
    +    results.primitives << args.layout.point(row: 3.5, col: 0, row_anchor: 0.5)
    +** Processing line: ~                                     .merge(label_style)~
     - Inside source: true
     *** True Line Result
    -      @pointA = pointA
    -** Processing line: ~      @pointB = pointB~
    +                                     .merge(label_style)
    +** Processing line: ~                                     .merge(text: "looping:")~
     - Inside source: true
     *** True Line Result
    -      @pointB = pointB
    -** Processing line: ~      @mode = mode~
    +                                     .merge(text: "looping:")
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      @mode = mode
    -** Processing line: ~      @collisionWidth = collisionWidth~
    +
    +** Processing line: ~    checkbox_template = args.layout.rect(w: 0.5, h: 0.5, col: 2)~
     - Inside source: true
     *** True Line Result
    -      @collisionWidth = collisionWidth
    +    checkbox_template = args.layout.rect(w: 0.5, h: 0.5, col: 2)
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      if (@pointA.x > @pointB.x)~
    -- Inside source: true
    -*** True Line Result
    -      if (@pointA.x > @pointB.x)
    -** Processing line: ~        @pointA, @pointB = @pointB, @pointA~
    +** Processing line: ~    results.looping_checkbox_rect = check_box(args: args, row: 3.5, col: 2, checked: audio_entry.looping)~
     - Inside source: true
     *** True Line Result
    -        @pointA, @pointB = @pointB, @pointA
    -** Processing line: ~      end~
    +    results.looping_checkbox_rect = check_box(args: args, row: 3.5, col: 2, checked: audio_entry.looping)
    +** Processing line: ~    results.primitives << results.looping_checkbox_rect.primitives~
     - Inside source: true
     *** True Line Result
    -      end
    +    results.primitives << results.looping_checkbox_rect.primitives
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      @linearCollider_collision_once = false~
    -- Inside source: true
    -*** True Line Result
    -      @linearCollider_collision_once = false
    -** Processing line: ~    end~
    +** Processing line: ~    results.primitives << args.layout.point(row: 4.0, col: 0, row_anchor: 0.5)~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +    results.primitives << args.layout.point(row: 4.0, col: 0, row_anchor: 0.5)
    +** Processing line: ~                                     .merge(label_style)~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def collisionSlope args~
    +                                     .merge(label_style)
    +** Processing line: ~                                     .merge(text: "paused:")~
     - Inside source: true
     *** True Line Result
    -    def collisionSlope args
    -** Processing line: ~      if (@pointB.x-@pointA.x == 0)~
    +                                     .merge(text: "paused:")
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      if (@pointB.x-@pointA.x == 0)
    -** Processing line: ~        return INFINITY~
    +
    +** Processing line: ~    checkbox_template = args.layout.rect(w: 0.5, h: 0.5, col: 2)~
     - Inside source: true
     *** True Line Result
    -        return INFINITY
    -** Processing line: ~      end~
    +    checkbox_template = args.layout.rect(w: 0.5, h: 0.5, col: 2)
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~      return (@pointB.y - @pointA.y) / (@pointB.x - @pointA.x)~
    +
    +** Processing line: ~    results.paused_checkbox_rect = check_box(args: args, row: 4.0, col: 2, checked: !audio_entry.paused)~
     - Inside source: true
     *** True Line Result
    -      return (@pointB.y - @pointA.y) / (@pointB.x - @pointA.x)
    -** Processing line: ~    end~
    +    results.paused_checkbox_rect = check_box(args: args, row: 4.0, col: 2, checked: !audio_entry.paused)
    +** Processing line: ~    results.primitives << results.paused_checkbox_rect.primitives~
     - Inside source: true
     *** True Line Result
    -    end
    +    results.primitives << results.paused_checkbox_rect.primitives
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    +** Processing line: ~    results.delete_button_rect = { rect: args.layout.rect(row: 5, col: 0, w: 7, h: 1) }~
    +- Inside source: true
    +*** True Line Result
    +    results.delete_button_rect = { rect: args.layout.rect(row: 5, col: 0, w: 7, h: 1) }
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def collision? (args, points, ball=nil)~
    +** Processing line: ~    results.primitives << results.delete_button_rect.to_solid(r: 180)~
     - Inside source: true
     *** True Line Result
    -    def collision? (args, points, ball=nil)
    +    results.primitives << results.delete_button_rect.to_solid(r: 180)
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      slope = collisionSlope args~
    +** Processing line: ~    results.primitives << args.layout.point(row: 5, col: 3.5, row_anchor: 0.5)~
     - Inside source: true
     *** True Line Result
    -      slope = collisionSlope args
    -** Processing line: ~      result = false~
    +    results.primitives << args.layout.point(row: 5, col: 3.5, row_anchor: 0.5)
    +** Processing line: ~                                     .merge(label_style)~
     - Inside source: true
     *** True Line Result
    -      result = false
    +                                     .merge(label_style)
    +** Processing line: ~                                     .merge(text: "DELETE", alignment_enum: 1)~
    +- Inside source: true
    +*** True Line Result
    +                                     .merge(text: "DELETE", alignment_enum: 1)
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      # calculate a vector with a magnitude of (1/2)collisionWidth and a direction perpendicular to the collision line~
    +** Processing line: ~    return results~
     - Inside source: true
     *** True Line Result
    -      # calculate a vector with a magnitude of (1/2)collisionWidth and a direction perpendicular to the collision line
    -** Processing line: ~      vect=nil;mag=nil;vect=nil;~
    +    return results
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -      vect=nil;mag=nil;vect=nil;
    -** Processing line: ~      if @mode == :both~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      if @mode == :both
    -** Processing line: ~        vect = {x: @pointB.x - @pointA.x, y:@pointB.y - @pointA.y}~
    +
    +** Processing line: ~  def render_panel args~
     - Inside source: true
     *** True Line Result
    -        vect = {x: @pointB.x - @pointA.x, y:@pointB.y - @pointA.y}
    -** Processing line: ~        mag  = (vect.x**2 + vect.y**2)**0.5~
    +  def render_panel args
    +** Processing line: ~    args.state.panel = nil~
     - Inside source: true
     *** True Line Result
    -        mag  = (vect.x**2 + vect.y**2)**0.5
    -** Processing line: ~        vect = {y: -1*(vect.x/(mag))*@collisionWidth*0.5, x: (vect.y/(mag))*@collisionWidth*0.5}~
    +    args.state.panel = nil
    +** Processing line: ~    audio_entry = args.audio[args.state.selected]~
     - Inside source: true
     *** True Line Result
    -        vect = {y: -1*(vect.x/(mag))*@collisionWidth*0.5, x: (vect.y/(mag))*@collisionWidth*0.5}
    -** Processing line: ~      else~
    +    audio_entry = args.audio[args.state.selected]
    +** Processing line: ~    return unless audio_entry~
     - Inside source: true
     *** True Line Result
    -      else
    -** Processing line: ~        vect = {x: @pointB.x - @pointA.x, y:@pointB.y - @pointA.y}~
    +    return unless audio_entry
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        vect = {x: @pointB.x - @pointA.x, y:@pointB.y - @pointA.y}
    -** Processing line: ~        mag  = (vect.x**2 + vect.y**2)**0.5~
    +
    +** Processing line: ~    mouse_down = (args.state.mouse_held >= 0)~
     - Inside source: true
     *** True Line Result
    -        mag  = (vect.x**2 + vect.y**2)**0.5
    -** Processing line: ~        vect = {y: -1*(vect.x/(mag))*@collisionWidth, x: (vect.y/(mag))*@collisionWidth}~
    +    mouse_down = (args.state.mouse_held >= 0)
    +** Processing line: ~    args.state.panel = panel_primitives args, audio_entry~
     - Inside source: true
     *** True Line Result
    -        vect = {y: -1*(vect.x/(mag))*@collisionWidth, x: (vect.y/(mag))*@collisionWidth}
    -** Processing line: ~      end~
    +    args.state.panel = panel_primitives args, audio_entry
    +** Processing line: ~    args.outputs.primitives << args.state.panel.primitives~
     - Inside source: true
     *** True Line Result
    -      end
    +    args.outputs.primitives << args.state.panel.primitives
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      rpointA=nil;rpointB=nil;rpointC=nil;rpointD=nil;~
    +** Processing line: ~  def new_sound_id! args~
     - Inside source: true
     *** True Line Result
    -      rpointA=nil;rpointB=nil;rpointC=nil;rpointD=nil;
    -** Processing line: ~      if @mode == :pos~
    +  def new_sound_id! args
    +** Processing line: ~    args.state.sound_id ||= 0~
     - Inside source: true
     *** True Line Result
    -      if @mode == :pos
    -** Processing line: ~        rpointA = {x:@pointA.x + vect.x, y:@pointA.y + vect.y}~
    +    args.state.sound_id ||= 0
    +** Processing line: ~    args.state.sound_id  += 1~
     - Inside source: true
     *** True Line Result
    -        rpointA = {x:@pointA.x + vect.x, y:@pointA.y + vect.y}
    -** Processing line: ~        rpointB = {x:@pointB.x + vect.x, y:@pointB.y + vect.y}~
    +    args.state.sound_id  += 1
    +** Processing line: ~    args.state.sound_id~
     - Inside source: true
     *** True Line Result
    -        rpointB = {x:@pointB.x + vect.x, y:@pointB.y + vect.y}
    -** Processing line: ~        rpointC = {x:@pointB.x, y:@pointB.y}~
    +    args.state.sound_id
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -        rpointC = {x:@pointB.x, y:@pointB.y}
    -** Processing line: ~        rpointD = {x:@pointA.x, y:@pointA.y}~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        rpointD = {x:@pointA.x, y:@pointA.y}
    -** Processing line: ~      elsif @mode == :neg~
    +
    +** Processing line: ~  def render_launcher args~
     - Inside source: true
     *** True Line Result
    -      elsif @mode == :neg
    -** Processing line: ~        rpointA = {x:@pointA.x, y:@pointA.y}~
    +  def render_launcher args
    +** Processing line: ~    args.outputs.primitives << args.state.spawn_sound_buttons.map(&:primitives)~
     - Inside source: true
     *** True Line Result
    -        rpointA = {x:@pointA.x, y:@pointA.y}
    -** Processing line: ~        rpointB = {x:@pointB.x, y:@pointB.y}~
    +    args.outputs.primitives << args.state.spawn_sound_buttons.map(&:primitives)
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -        rpointB = {x:@pointB.x, y:@pointB.y}
    -** Processing line: ~        rpointC = {x:@pointB.x - vect.x, y:@pointB.y - vect.y}~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        rpointC = {x:@pointB.x - vect.x, y:@pointB.y - vect.y}
    -** Processing line: ~        rpointD = {x:@pointA.x - vect.x, y:@pointA.y - vect.y}~
    +
    +** Processing line: ~  def render_ui args~
     - Inside source: true
     *** True Line Result
    -        rpointD = {x:@pointA.x - vect.x, y:@pointA.y - vect.y}
    -** Processing line: ~      elsif @mode == :both~
    +  def render_ui args
    +** Processing line: ~    render_launcher args~
     - Inside source: true
     *** True Line Result
    -      elsif @mode == :both
    -** Processing line: ~        rpointA = {x:@pointA.x + vect.x, y:@pointA.y + vect.y}~
    +    render_launcher args
    +** Processing line: ~    render_panel args~
     - Inside source: true
     *** True Line Result
    -        rpointA = {x:@pointA.x + vect.x, y:@pointA.y + vect.y}
    -** Processing line: ~        rpointB = {x:@pointB.x + vect.x, y:@pointB.y + vect.y}~
    +    render_panel args
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -        rpointB = {x:@pointB.x + vect.x, y:@pointB.y + vect.y}
    -** Processing line: ~        rpointC = {x:@pointB.x - vect.x, y:@pointB.y - vect.y}~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        rpointC = {x:@pointB.x - vect.x, y:@pointB.y - vect.y}
    -** Processing line: ~        rpointD = {x:@pointA.x - vect.x, y:@pointA.y - vect.y}~
    +
    +** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
    -        rpointD = {x:@pointA.x - vect.x, y:@pointA.y - vect.y}
    -** Processing line: ~      end~
    +  def tick args
    +** Processing line: ~    defaults args~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~      #four point rectangle~
    +    defaults args
    +** Processing line: ~    render args~
     - Inside source: true
     *** True Line Result
    -      #four point rectangle
    -** Processing line: ~~
    +    render args
    +** Processing line: ~    input args~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~~
    +    input args
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      if ball != nil~
    +** Processing line: ~  def input args~
     - Inside source: true
     *** True Line Result
    -      if ball != nil
    -** Processing line: ~        xs = [rpointA.x,rpointB.x,rpointC.x,rpointD.x]~
    +  def input args
    +** Processing line: ~    if !args.audio[args.state.selected]~
     - Inside source: true
     *** True Line Result
    -        xs = [rpointA.x,rpointB.x,rpointC.x,rpointD.x]
    -** Processing line: ~        ys = [rpointA.y,rpointB.y,rpointC.y,rpointD.y]~
    +    if !args.audio[args.state.selected]
    +** Processing line: ~      args.state.selected = nil~
     - Inside source: true
     *** True Line Result
    -        ys = [rpointA.y,rpointB.y,rpointC.y,rpointD.y]
    -** Processing line: ~        correct = 1~
    +      args.state.selected = nil
    +** Processing line: ~      args.state.dragging = nil~
     - Inside source: true
     *** True Line Result
    -        correct = 1
    -** Processing line: ~        rect1 = [ball.x, ball.y, ball.width, ball.height]~
    +      args.state.dragging = nil
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -        rect1 = [ball.x, ball.y, ball.width, ball.height]
    -** Processing line: ~        #$r1 = rect1~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        #$r1 = rect1
    -** Processing line: ~        rect2 = [xs.min-correct,ys.min-correct,(xs.max-xs.min)+correct*2,(ys.max-ys.min)+correct*2]~
    +
    +** Processing line: ~    # spawn button and node interaction~
     - Inside source: true
     *** True Line Result
    -        rect2 = [xs.min-correct,ys.min-correct,(xs.max-xs.min)+correct*2,(ys.max-ys.min)+correct*2]
    -** Processing line: ~        #$r2 = rect2~
    +    # spawn button and node interaction
    +** Processing line: ~    if args.inputs.mouse.click~
     - Inside source: true
     *** True Line Result
    -        #$r2 = rect2
    -** Processing line: ~        if rect1.intersect_rect?(rect2) == false~
    +    if args.inputs.mouse.click
    +** Processing line: ~      spawn_sound_button = args.state.spawn_sound_buttons.find { |b| args.inputs.mouse.inside_rect? b.rect }~
     - Inside source: true
     *** True Line Result
    -        if rect1.intersect_rect?(rect2) == false
    -** Processing line: ~          return false~
    +      spawn_sound_button = args.state.spawn_sound_buttons.find { |b| args.inputs.mouse.inside_rect? b.rect }
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          return false
    -** Processing line: ~        end~
    +
    +** Processing line: ~      audio_click_key, audio_click_value = args.audio.find do |k, v|~
     - Inside source: true
     *** True Line Result
    -        end
    +      audio_click_key, audio_click_value = args.audio.find do |k, v|
    +** Processing line: ~        args.inputs.mouse.inside_rect? [v.screenx, v.screeny, args.state.boxsize, args.state.boxsize]~
    +- Inside source: true
    +*** True Line Result
    +        args.inputs.mouse.inside_rect? [v.screenx, v.screeny, args.state.boxsize, args.state.boxsize]
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    @@ -35892,418 +44051,494 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~~
    +** Processing line: ~      if spawn_sound_button~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      #area of a triangle~
    +      if spawn_sound_button
    +** Processing line: ~        args.state.selected = nil~
     - Inside source: true
     *** True Line Result
    -      #area of a triangle
    -** Processing line: ~      triArea = -> (a,b,c) { ((a.x * (b.y - c.y) + b.x * (c.y - a.y) + c.x * (a.y - b.y))/2.0).abs }~
    +        args.state.selected = nil
    +** Processing line: ~        spawn_new_sound args, spawn_sound_button.name, spawn_sound_button.path~
     - Inside source: true
     *** True Line Result
    -      triArea = -> (a,b,c) { ((a.x * (b.y - c.y) + b.x * (c.y - a.y) + c.x * (a.y - b.y))/2.0).abs }
    -** Processing line: ~~
    +        spawn_new_sound args, spawn_sound_button.name, spawn_sound_button.path
    +** Processing line: ~      elsif audio_click_key~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      #if at least on point is in the rectangle then collision? is true - otherwise false~
    +      elsif audio_click_key
    +** Processing line: ~        args.state.selected = audio_click_key~
     - Inside source: true
     *** True Line Result
    -      #if at least on point is in the rectangle then collision? is true - otherwise false
    -** Processing line: ~      for point in points~
    +        args.state.selected = audio_click_key
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -      for point in points
    -** Processing line: ~        #Check whether a given point lies inside a rectangle or not:~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -        #Check whether a given point lies inside a rectangle or not:
    -** Processing line: ~        #if the sum of the area of traingls, PAB, PBC, PCD, PAD equal the area of the rec, then an intersection has occured~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        #if the sum of the area of traingls, PAB, PBC, PCD, PAD equal the area of the rec, then an intersection has occured
    -** Processing line: ~        areaRec =  triArea.call(rpointA, rpointB, rpointC)+triArea.call(rpointA, rpointC, rpointD)~
    +
    +** Processing line: ~    if args.state.mouse_state == :held && args.state.selected~
     - Inside source: true
     *** True Line Result
    -        areaRec =  triArea.call(rpointA, rpointB, rpointC)+triArea.call(rpointA, rpointC, rpointD)
    -** Processing line: ~        areaSum = [~
    +    if args.state.mouse_state == :held && args.state.selected
    +** Processing line: ~      v = args.audio[args.state.selected]~
     - Inside source: true
     *** True Line Result
    -        areaSum = [
    -** Processing line: ~          triArea.call(point, rpointA, rpointB),triArea.call(point, rpointB, rpointC),~
    +      v = args.audio[args.state.selected]
    +** Processing line: ~      if args.inputs.mouse.inside_rect? [v.screenx, v.screeny, args.state.boxsize, args.state.boxsize]~
     - Inside source: true
     *** True Line Result
    -          triArea.call(point, rpointA, rpointB),triArea.call(point, rpointB, rpointC),
    -** Processing line: ~          triArea.call(point, rpointC, rpointD),triArea.call(point, rpointA, rpointD)~
    +      if args.inputs.mouse.inside_rect? [v.screenx, v.screeny, args.state.boxsize, args.state.boxsize]
    +** Processing line: ~        args.state.dragging = args.state.selected~
     - Inside source: true
     *** True Line Result
    -          triArea.call(point, rpointC, rpointD),triArea.call(point, rpointA, rpointD)
    -** Processing line: ~        ].inject(0){|sum,x| sum + x }~
    +        args.state.dragging = args.state.selected
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -        ].inject(0){|sum,x| sum + x }
    -** Processing line: ~        e = 0.0001 #allow for minor error~
    +      end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        e = 0.0001 #allow for minor error
    -** Processing line: ~        if areaRec>= areaSum-e and areaRec<= areaSum+e~
    +
    +** Processing line: ~      if args.state.dragging~
     - Inside source: true
     *** True Line Result
    -        if areaRec>= areaSum-e and areaRec<= areaSum+e
    -** Processing line: ~          result = true~
    +      if args.state.dragging
    +** Processing line: ~        s = args.audio[args.state.selected]~
     - Inside source: true
     *** True Line Result
    -          result = true
    -** Processing line: ~          #return true~
    +        s = args.audio[args.state.selected]
    +** Processing line: ~        # you can hang anything on the audio hashes you want, so we store the~
     - Inside source: true
     *** True Line Result
    -          #return true
    -** Processing line: ~          break~
    +        # you can hang anything on the audio hashes you want, so we store the
    +** Processing line: ~        #  actual screen position so it doesn't scale weirdly vs your mouse.~
     - Inside source: true
     *** True Line Result
    -          break
    -** Processing line: ~        end~
    +        #  actual screen position so it doesn't scale weirdly vs your mouse.
    +** Processing line: ~        s.screenx = args.inputs.mouse.x - (args.state.boxsize / 2)~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~      end~
    +        s.screenx = args.inputs.mouse.x - (args.state.boxsize / 2)
    +** Processing line: ~        s.screeny = args.inputs.mouse.y - (args.state.boxsize / 2)~
     - Inside source: true
     *** True Line Result
    -      end
    +        s.screeny = args.inputs.mouse.y - (args.state.boxsize / 2)
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      #args.outputs.lines << [@pointA.x, @pointA.y, @pointB.x, @pointB.y,     000, 000, 000]~
    +** Processing line: ~        s.screeny = 50 if s.screeny < 50~
     - Inside source: true
     *** True Line Result
    -      #args.outputs.lines << [@pointA.x, @pointA.y, @pointB.x, @pointB.y,     000, 000, 000]
    -** Processing line: ~      #args.outputs.lines << [rpointA.x, rpointA.y, rpointB.x, rpointB.y,     255, 000, 000]~
    +        s.screeny = 50 if s.screeny < 50
    +** Processing line: ~        s.screeny = (719 - args.state.boxsize) if s.screeny > (719 - args.state.boxsize)~
     - Inside source: true
     *** True Line Result
    -      #args.outputs.lines << [rpointA.x, rpointA.y, rpointB.x, rpointB.y,     255, 000, 000]
    -** Processing line: ~      #args.outputs.lines << [rpointC.x, rpointC.y, rpointD.x, rpointD.y,     000, 000, 255]~
    +        s.screeny = (719 - args.state.boxsize) if s.screeny > (719 - args.state.boxsize)
    +** Processing line: ~        s.screenx = 0 if s.screenx < 0~
     - Inside source: true
     *** True Line Result
    -      #args.outputs.lines << [rpointC.x, rpointC.y, rpointD.x, rpointD.y,     000, 000, 255]
    -** Processing line: ~~
    +        s.screenx = 0 if s.screenx < 0
    +** Processing line: ~        s.screenx = (1279 - args.state.boxsize) if s.screenx > (1279 - args.state.boxsize)~
     - Inside source: true
     *** True Line Result
    -
    +        s.screenx = (1279 - args.state.boxsize) if s.screenx > (1279 - args.state.boxsize)
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      #puts (rpointA.x.to_s + " " +  rpointA.y.to_s + " " + rpointB.x.to_s + " "+ rpointB.y.to_s)~
    +** Processing line: ~        s.x = ((s.screenx / 1279.0) * 2.0) - 1.0  # scale to -1.0 - 1.0 range~
     - Inside source: true
     *** True Line Result
    -      #puts (rpointA.x.to_s + " " +  rpointA.y.to_s + " " + rpointB.x.to_s + " "+ rpointB.y.to_s)
    -** Processing line: ~      return result~
    +        s.x = ((s.screenx / 1279.0) * 2.0) - 1.0  # scale to -1.0 - 1.0 range
    +** Processing line: ~        s.y = ((s.screeny / 719.0) * 2.0) - 1.0   # scale to -1.0 - 1.0 range~
     - Inside source: true
     *** True Line Result
    -      return result
    -** Processing line: ~    end #end collision?~
    +        s.y = ((s.screeny / 719.0) * 2.0) - 1.0   # scale to -1.0 - 1.0 range
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    end #end collision?
    +      end
    +** Processing line: ~    elsif args.state.mouse_state == :released~
    +- Inside source: true
    +*** True Line Result
    +    elsif args.state.mouse_state == :released
    +** Processing line: ~      args.state.dragging = nil~
    +- Inside source: true
    +*** True Line Result
    +      args.state.dragging = nil
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def getRepelMagnitude (fbx, fby, vrx, vry, ballMag)~
    +** Processing line: ~    input_panel args~
     - Inside source: true
     *** True Line Result
    -    def getRepelMagnitude (fbx, fby, vrx, vry, ballMag)
    -** Processing line: ~      a = fbx ; b = vrx ; c = fby~
    +    input_panel args
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -      a = fbx ; b = vrx ; c = fby
    -** Processing line: ~      d = vry ; e = ballMag~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      d = vry ; e = ballMag
    -** Processing line: ~      if b**2 + d**2 == 0~
    +
    +** Processing line: ~  def defaults args~
     - Inside source: true
     *** True Line Result
    -      if b**2 + d**2 == 0
    -** Processing line: ~        #unexpected~
    +  def defaults args
    +** Processing line: ~    args.state.mouse_state      ||= :released~
     - Inside source: true
     *** True Line Result
    -        #unexpected
    -** Processing line: ~      end~
    +    args.state.mouse_state      ||= :released
    +** Processing line: ~    args.state.dragging_source  ||= false~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~      x1 = (-a*b+-c*d + (e**2 * b**2 - b**2 * c**2 + 2*a*b*c*d + e**2 + d**2 - a**2 * d**2)**0.5)/(b**2 + d**2)~
    +    args.state.dragging_source  ||= false
    +** Processing line: ~    args.state.selected         ||= 0~
     - Inside source: true
     *** True Line Result
    -      x1 = (-a*b+-c*d + (e**2 * b**2 - b**2 * c**2 + 2*a*b*c*d + e**2 + d**2 - a**2 * d**2)**0.5)/(b**2 + d**2)
    -** Processing line: ~      x2 = -((a*b + c*d + (e**2 * b**2 - b**2 * c**2 + 2*a*b*c*d + e**2 * d**2 - a**2 * d**2)**0.5)/(b**2 + d**2))~
    +    args.state.selected         ||= 0
    +** Processing line: ~    args.state.next_sound_index ||= 0~
     - Inside source: true
     *** True Line Result
    -      x2 = -((a*b + c*d + (e**2 * b**2 - b**2 * c**2 + 2*a*b*c*d + e**2 * d**2 - a**2 * d**2)**0.5)/(b**2 + d**2))
    -** Processing line: ~      err = 0.00001~
    +    args.state.next_sound_index ||= 0
    +** Processing line: ~    args.state.boxsize          ||= 30~
     - Inside source: true
     *** True Line Result
    -      err = 0.00001
    -** Processing line: ~      o = ((fbx + x1*vrx)**2 + (fby + x1*vry)**2 ) ** 0.5~
    +    args.state.boxsize          ||= 30
    +** Processing line: ~    args.state.sound_files      ||= [~
     - Inside source: true
     *** True Line Result
    -      o = ((fbx + x1*vrx)**2 + (fby + x1*vry)**2 ) ** 0.5
    -** Processing line: ~      p = ((fbx + x2*vrx)**2 + (fby + x2*vry)**2 ) ** 0.5~
    +    args.state.sound_files      ||= [
    +** Processing line: ~      { name: :tada,   path: "sounds/tada.wav"   },~
     - Inside source: true
     *** True Line Result
    -      p = ((fbx + x2*vrx)**2 + (fby + x2*vry)**2 ) ** 0.5
    -** Processing line: ~      r = 0~
    +      { name: :tada,   path: "sounds/tada.wav"   },
    +** Processing line: ~      { name: :splash, path: "sounds/splash.wav" },~
     - Inside source: true
     *** True Line Result
    -      r = 0
    -** Processing line: ~      if (ballMag >= o-err and ballMag <= o+err)~
    +      { name: :splash, path: "sounds/splash.wav" },
    +** Processing line: ~      { name: :drum,   path: "sounds/drum.wav"   },~
     - Inside source: true
     *** True Line Result
    -      if (ballMag >= o-err and ballMag <= o+err)
    -** Processing line: ~        r = x1~
    +      { name: :drum,   path: "sounds/drum.wav"   },
    +** Processing line: ~      { name: :spring, path: "sounds/spring.wav" },~
     - Inside source: true
     *** True Line Result
    -        r = x1
    -** Processing line: ~      elsif (ballMag >= p-err and ballMag <= p+err)~
    +      { name: :spring, path: "sounds/spring.wav" },
    +** Processing line: ~      { name: :music,  path: "sounds/music.ogg"  }~
     - Inside source: true
     *** True Line Result
    -      elsif (ballMag >= p-err and ballMag <= p+err)
    -** Processing line: ~        r = x2~
    +      { name: :music,  path: "sounds/music.ogg"  }
    +** Processing line: ~    ]~
     - Inside source: true
     *** True Line Result
    -        r = x2
    -** Processing line: ~      else~
    +    ]
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      else
    -** Processing line: ~        #unexpected~
    +
    +** Processing line: ~    # generate buttons based off the sound collection above~
     - Inside source: true
     *** True Line Result
    -        #unexpected
    -** Processing line: ~      end~
    +    # generate buttons based off the sound collection above
    +** Processing line: ~    args.state.spawn_sound_buttons ||= begin~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~      return r~
    +    args.state.spawn_sound_buttons ||= begin
    +** Processing line: ~      # create a group of buttons~
     - Inside source: true
     *** True Line Result
    -      return r
    -** Processing line: ~    end~
    +      # create a group of buttons
    +** Processing line: ~      # column centered (using col_offset to calculate the column offset)~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +      # column centered (using col_offset to calculate the column offset)
    +** Processing line: ~      # where each item is 2 columns apart~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def collide args, ball~
    +      # where each item is 2 columns apart
    +** Processing line: ~      rects = args.layout.rect_group row:   11,~
     - Inside source: true
     *** True Line Result
    -    def collide args, ball
    -** Processing line: ~      slope = collisionSlope args~
    +      rects = args.layout.rect_group row:   11,
    +** Processing line: ~                                     col_offset: {~
     - Inside source: true
     *** True Line Result
    -      slope = collisionSlope args
    -** Processing line: ~~
    +                                     col_offset: {
    +** Processing line: ~                                       count: args.state.sound_files.length,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      # perpVect: normal vector perpendicular to collision~
    +                                       count: args.state.sound_files.length,
    +** Processing line: ~                                       w:     2~
     - Inside source: true
     *** True Line Result
    -      # perpVect: normal vector perpendicular to collision
    -** Processing line: ~      perpVect = {x: @pointB.x - @pointA.x, y:@pointB.y - @pointA.y}~
    +                                       w:     2
    +** Processing line: ~                                     },~
     - Inside source: true
     *** True Line Result
    -      perpVect = {x: @pointB.x - @pointA.x, y:@pointB.y - @pointA.y}
    -** Processing line: ~      mag  = (perpVect.x**2 + perpVect.y**2)**0.5~
    +                                     },
    +** Processing line: ~                                     dcol:  2,~
     - Inside source: true
     *** True Line Result
    -      mag  = (perpVect.x**2 + perpVect.y**2)**0.5
    -** Processing line: ~      perpVect = {x: perpVect.x/(mag), y: perpVect.y/(mag)}~
    +                                     dcol:  2,
    +** Processing line: ~                                     w:     2,~
     - Inside source: true
     *** True Line Result
    -      perpVect = {x: perpVect.x/(mag), y: perpVect.y/(mag)}
    -** Processing line: ~      perpVect = {x: -perpVect.y, y: perpVect.x}~
    +                                     w:     2,
    +** Processing line: ~                                     h:     1,~
     - Inside source: true
     *** True Line Result
    -      perpVect = {x: -perpVect.y, y: perpVect.x}
    -** Processing line: ~      if perpVect.y > 0 #ensure perpVect points upward~
    +                                     h:     1,
    +** Processing line: ~                                     group: args.state.sound_files~
     - Inside source: true
     *** True Line Result
    -      if perpVect.y > 0 #ensure perpVect points upward
    -** Processing line: ~        perpVect = {x: perpVect.x*-1, y: perpVect.y*-1}~
    +                                     group: args.state.sound_files
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        perpVect = {x: perpVect.x*-1, y: perpVect.y*-1}
    -** Processing line: ~      end~
    +
    +** Processing line: ~      # now that you have the rects~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~      previousPosition = {~
    +      # now that you have the rects
    +** Processing line: ~      # construct the metadata for the buttons~
     - Inside source: true
     *** True Line Result
    -      previousPosition = {
    -** Processing line: ~        x:ball.x-ball.velocity.x,~
    +      # construct the metadata for the buttons
    +** Processing line: ~      rects.map do |rect|~
     - Inside source: true
     *** True Line Result
    -        x:ball.x-ball.velocity.x,
    -** Processing line: ~        y:ball.y-ball.velocity.y~
    +      rects.map do |rect|
    +** Processing line: ~        {~
     - Inside source: true
     *** True Line Result
    -        y:ball.y-ball.velocity.y
    -** Processing line: ~      }~
    +        {
    +** Processing line: ~          rect: rect,~
     - Inside source: true
     *** True Line Result
    -      }
    -** Processing line: ~      yInterc = @pointA.y + -slope*@pointA.x~
    +          rect: rect,
    +** Processing line: ~          name: rect.name,~
     - Inside source: true
     *** True Line Result
    -      yInterc = @pointA.y + -slope*@pointA.x
    -** Processing line: ~      if slope == INFINITY~
    +          name: rect.name,
    +** Processing line: ~          path: rect.path,~
     - Inside source: true
     *** True Line Result
    -      if slope == INFINITY
    -** Processing line: ~        if previousPosition.x < @pointA.x~
    +          path: rect.path,
    +** Processing line: ~          primitives: [~
     - Inside source: true
     *** True Line Result
    -        if previousPosition.x < @pointA.x
    -** Processing line: ~          perpVect = {x: perpVect.x*-1, y: perpVect.y*-1}~
    +          primitives: [
    +** Processing line: ~            rect.to_border(r: 255, g: 255, b: 255),~
     - Inside source: true
     *** True Line Result
    -          perpVect = {x: perpVect.x*-1, y: perpVect.y*-1}
    -** Processing line: ~          yInterc = -INFINITY~
    +            rect.to_border(r: 255, g: 255, b: 255),
    +** Processing line: ~            rect.to_label(x: rect.center_x,~
     - Inside source: true
     *** True Line Result
    -          yInterc = -INFINITY
    -** Processing line: ~        end~
    +            rect.to_label(x: rect.center_x,
    +** Processing line: ~                          y: rect.center_y,~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~      elsif previousPosition.y < slope*previousPosition.x + yInterc #check if ball is bellow or above the collider to determine if perpVect is - or +~
    +                          y: rect.center_y,
    +** Processing line: ~                          text: "#{rect.name}",~
     - Inside source: true
     *** True Line Result
    -      elsif previousPosition.y < slope*previousPosition.x + yInterc #check if ball is bellow or above the collider to determine if perpVect is - or +
    -** Processing line: ~        perpVect = {x: perpVect.x*-1, y: perpVect.y*-1}~
    +                          text: "#{rect.name}",
    +** Processing line: ~                          alignment_enum: 1,~
     - Inside source: true
     *** True Line Result
    -        perpVect = {x: perpVect.x*-1, y: perpVect.y*-1}
    +                          alignment_enum: 1,
    +** Processing line: ~                          vertical_alignment_enum: 1,~
    +- Inside source: true
    +*** True Line Result
    +                          vertical_alignment_enum: 1,
    +** Processing line: ~                          r: 255, g: 255, b: 255)~
    +- Inside source: true
    +*** True Line Result
    +                          r: 255, g: 255, b: 255)
    +** Processing line: ~          ]~
    +- Inside source: true
    +*** True Line Result
    +          ]
    +** Processing line: ~        }~
    +- Inside source: true
    +*** True Line Result
    +        }
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
           end
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      velocityMag = (ball.velocity.x**2 + ball.velocity.y**2)**0.5~
    +** Processing line: ~    if args.inputs.mouse.up~
     - Inside source: true
     *** True Line Result
    -      velocityMag = (ball.velocity.x**2 + ball.velocity.y**2)**0.5
    -** Processing line: ~      theta_ball=Math.atan2(ball.velocity.y,ball.velocity.x) #the angle of the ball's velocity~
    +    if args.inputs.mouse.up
    +** Processing line: ~      args.state.mouse_state = :released~
     - Inside source: true
     *** True Line Result
    -      theta_ball=Math.atan2(ball.velocity.y,ball.velocity.x) #the angle of the ball's velocity
    -** Processing line: ~      theta_repel=Math.atan2(perpVect.y,perpVect.x) #the angle of the repelling force(perpVect)~
    +      args.state.mouse_state = :released
    +** Processing line: ~      args.state.dragging_source = false~
     - Inside source: true
     *** True Line Result
    -      theta_repel=Math.atan2(perpVect.y,perpVect.x) #the angle of the repelling force(perpVect)
    +      args.state.dragging_source = false
    +** Processing line: ~    elsif args.inputs.mouse.down~
    +- Inside source: true
    +*** True Line Result
    +    elsif args.inputs.mouse.down
    +** Processing line: ~      args.state.mouse_state = :held~
    +- Inside source: true
    +*** True Line Result
    +      args.state.mouse_state = :held
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      fbx = velocityMag * Math.cos(theta_ball) #the x component of the ball's velocity~
    +** Processing line: ~    args.outputs.background_color = [ 0, 0, 0, 255 ]~
     - Inside source: true
     *** True Line Result
    -      fbx = velocityMag * Math.cos(theta_ball) #the x component of the ball's velocity
    -** Processing line: ~      fby = velocityMag * Math.sin(theta_ball) #the y component of the ball's velocity~
    +    args.outputs.background_color = [ 0, 0, 0, 255 ]
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -      fby = velocityMag * Math.sin(theta_ball) #the y component of the ball's velocity
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      #the magnitude of the repelling force~
    +** Processing line: ~  def render args~
     - Inside source: true
     *** True Line Result
    -      #the magnitude of the repelling force
    -** Processing line: ~      repelMag = getRepelMagnitude(fbx, fby, perpVect.x, perpVect.y, (ball.velocity.x**2 + ball.velocity.y**2)**0.5)~
    +  def render args
    +** Processing line: ~    render_ui args~
     - Inside source: true
     *** True Line Result
    -      repelMag = getRepelMagnitude(fbx, fby, perpVect.x, perpVect.y, (ball.velocity.x**2 + ball.velocity.y**2)**0.5)
    -** Processing line: ~      frx = repelMag* Math.cos(theta_repel) #the x component of the repel's velocity | magnitude is set to twice of fbx~
    +    render_ui args
    +** Processing line: ~    render_sources args~
     - Inside source: true
     *** True Line Result
    -      frx = repelMag* Math.cos(theta_repel) #the x component of the repel's velocity | magnitude is set to twice of fbx
    -** Processing line: ~      fry = repelMag* Math.sin(theta_repel) #the y component of the repel's velocity | magnitude is set to twice of fby~
    +    render_sources args
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -      fry = repelMag* Math.sin(theta_repel) #the y component of the repel's velocity | magnitude is set to twice of fby
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      fsumx = fbx+frx #sum of x forces~
    -- Inside source: true
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
     *** True Line Result
    -      fsumx = fbx+frx #sum of x forces
    -** Processing line: ~      fsumy = fby+fry #sum of y forces~
    -- Inside source: true
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
     *** True Line Result
    -      fsumy = fby+fry #sum of y forces
    -** Processing line: ~      fr = velocityMag#fr is the resulting magnitude~
    +
    +** Processing line: ~*** Advanced Audio - Audio Mixer - server_ip_address.txt~
    +- Header detected.
    +*** True Line Result
    +
    +*** True Line Result
    +*** Advanced Audio - Audio Mixer - server_ip_address.txt
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/07_advanced_audio/01_audio_mixer/app/server_ip_address.txt~
     - Inside source: true
     *** True Line Result
    -      fr = velocityMag#fr is the resulting magnitude
    -** Processing line: ~      thetaNew = Math.atan2(fsumy, fsumx)  #thetaNew is the resulting angle~
    +  # ./samples/07_advanced_audio/01_audio_mixer/app/server_ip_address.txt
    +** Processing line: ~  192.168.1.65~
     - Inside source: true
     *** True Line Result
    -      thetaNew = Math.atan2(fsumy, fsumx)  #thetaNew is the resulting angle
    -** Processing line: ~      xnew = fr*Math.cos(thetaNew)#resulting x velocity~
    +  192.168.1.65
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
    +*** True Line Result
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +
    +** Processing line: ~*** Advanced Audio - Audio Mixer - Metadata - ios_metadata.txt~
    +- Header detected.
    +*** True Line Result
    +
    +*** True Line Result
    +*** Advanced Audio - Audio Mixer - Metadata - ios_metadata.txt
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/07_advanced_audio/01_audio_mixer/metadata/ios_metadata.txt~
     - Inside source: true
     *** True Line Result
    -      xnew = fr*Math.cos(thetaNew)#resulting x velocity
    -** Processing line: ~      ynew = fr*Math.sin(thetaNew)#resulting y velocity~
    +  # ./samples/07_advanced_audio/01_audio_mixer/metadata/ios_metadata.txt
    +** Processing line: ~  # ios_metadata.txt is used by the Pro version of DragonRuby Game Toolkit to create iOS apps.~
     - Inside source: true
     *** True Line Result
    -      ynew = fr*Math.sin(thetaNew)#resulting y velocity
    -** Processing line: ~      if (velocityMag < MAX_VELOCITY)~
    +  # ios_metadata.txt is used by the Pro version of DragonRuby Game Toolkit to create iOS apps.
    +** Processing line: ~  # Information about the Pro version can be found at: http://dragonruby.org/toolkit/game#purchase~
     - Inside source: true
     *** True Line Result
    -      if (velocityMag < MAX_VELOCITY)
    -** Processing line: ~        ball.velocity =  Vector2d.new(xnew*1.1, ynew*1.1)~
    +  # Information about the Pro version can be found at: http://dragonruby.org/toolkit/game#purchase
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        ball.velocity =  Vector2d.new(xnew*1.1, ynew*1.1)
    -** Processing line: ~      else~
    +
    +** Processing line: ~  # teamid needs to be set to your assigned Team Id which can be found at https://developer.apple.com/account/#/membership/~
     - Inside source: true
     *** True Line Result
    -      else
    -** Processing line: ~        ball.velocity =  Vector2d.new(xnew, ynew)~
    +  # teamid needs to be set to your assigned Team Id which can be found at https://developer.apple.com/account/#/membership/
    +** Processing line: ~  teamid=~
     - Inside source: true
     *** True Line Result
    -        ball.velocity =  Vector2d.new(xnew, ynew)
    -** Processing line: ~      end~
    +  teamid=
    +** Processing line: ~  # appid needs to be set to your application identifier which can be found at https://developer.apple.com/account/resources/identifiers/list~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +  # appid needs to be set to your application identifier which can be found at https://developer.apple.com/account/resources/identifiers/list
    +** Processing line: ~  appid=~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    end~
    +  appid=
    +** Processing line: ~  # appname is the name you want to show up underneath the app icon on the device. Keep it under 10 characters.~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~  end~
    +  # appname is the name you want to show up underneath the app icon on the device. Keep it under 10 characters.
    +** Processing line: ~  appname=~
     - Inside source: true
     *** True Line Result
    -  end
    +  appname=
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
    @@ -36316,938 +44551,1066 @@ Follows is a source code listing for all files that have been open sourced. This
     - End of paragraph detected.
     *** True Line Result
     
    -** Processing line: ~*** Physics And Collisions - Arbitrary Collision - main.rb~
    +** Processing line: ~*** Advanced Audio - Sound Synthesis - main.rb~
     - Header detected.
     *** True Line Result
     
     *** True Line Result
    -*** Physics And Collisions - Arbitrary Collision - main.rb
    +*** Advanced Audio - Sound Synthesis - main.rb
     ** Processing line: ~#+begin_src ruby~
     - Line was identified as the beginning of a code block.
     *** True Line Result
     
     *** True Line Result
     #+begin_src ruby
    -** Processing line: ~  # ./samples/04_physics_and_collisions/09_arbitrary_collision/app/main.rb~
    +** Processing line: ~  # ./samples/07_advanced_audio/02_sound_synthesis/app/main.rb~
     - Inside source: true
     *** True Line Result
    -  # ./samples/04_physics_and_collisions/09_arbitrary_collision/app/main.rb
    -** Processing line: ~  INFINITY= 10**10~
    +  # ./samples/07_advanced_audio/02_sound_synthesis/app/main.rb
    +** Processing line: ~  begin # region: top level tick methods~
     - Inside source: true
     *** True Line Result
    -  INFINITY= 10**10
    -** Processing line: ~  MAX_VELOCITY = 8.0~
    +  begin # region: top level tick methods
    +** Processing line: ~    def tick args~
     - Inside source: true
     *** True Line Result
    -  MAX_VELOCITY = 8.0
    -** Processing line: ~  BALL_COUNT = 90~
    +    def tick args
    +** Processing line: ~      defaults args~
     - Inside source: true
     *** True Line Result
    -  BALL_COUNT = 90
    -** Processing line: ~  BALL_DISTANCE = 20~
    +      defaults args
    +** Processing line: ~      render args~
     - Inside source: true
     *** True Line Result
    -  BALL_DISTANCE = 20
    -** Processing line: ~  require 'app/vector2d.rb'~
    +      render args
    +** Processing line: ~      input args~
     - Inside source: true
     *** True Line Result
    -  require 'app/vector2d.rb'
    -** Processing line: ~  require 'app/blocks.rb'~
    +      input args
    +** Processing line: ~      process_audio_queue args~
     - Inside source: true
     *** True Line Result
    -  require 'app/blocks.rb'
    -** Processing line: ~  require 'app/ball.rb'~
    +      process_audio_queue args
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  require 'app/ball.rb'
    -** Processing line: ~  require 'app/rectangle.rb'~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  require 'app/rectangle.rb'
    -** Processing line: ~  require 'app/linear_collider.rb'~
    +
    +** Processing line: ~    def defaults args~
     - Inside source: true
     *** True Line Result
    -  require 'app/linear_collider.rb'
    -** Processing line: ~  require 'app/square_collider.rb'~
    +    def defaults args
    +** Processing line: ~      args.state.sine_waves      ||= {}~
     - Inside source: true
     *** True Line Result
    -  require 'app/square_collider.rb'
    -** Processing line: ~~
    +      args.state.sine_waves      ||= {}
    +** Processing line: ~      args.state.square_waves    ||= {}~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~~
    +      args.state.square_waves    ||= {}
    +** Processing line: ~      args.state.saw_tooth_waves ||= {}~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~~
    +      args.state.saw_tooth_waves ||= {}
    +** Processing line: ~      args.state.triangle_waves  ||= {}~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  #Method to init default values~
    +      args.state.triangle_waves  ||= {}
    +** Processing line: ~      args.state.audio_queue     ||= []~
     - Inside source: true
     *** True Line Result
    -  #Method to init default values
    -** Processing line: ~  def defaults args~
    +      args.state.audio_queue     ||= []
    +** Processing line: ~      args.state.buttons         ||= [~
     - Inside source: true
     *** True Line Result
    -  def defaults args
    -** Processing line: ~    args.state.board_width ||= args.grid.w / 4~
    +      args.state.buttons         ||= [
    +** Processing line: ~        (frequency_buttons args),~
     - Inside source: true
     *** True Line Result
    -    args.state.board_width ||= args.grid.w / 4
    -** Processing line: ~    args.state.board_height ||= args.grid.h~
    +        (frequency_buttons args),
    +** Processing line: ~        (sine_wave_note_buttons args),~
     - Inside source: true
     *** True Line Result
    -    args.state.board_height ||= args.grid.h
    -** Processing line: ~    args.state.game_area ||= [(args.state.board_width + args.grid.w / 8), 0, args.state.board_width, args.grid.h]~
    +        (sine_wave_note_buttons args),
    +** Processing line: ~        (bell_buttons args),~
     - Inside source: true
     *** True Line Result
    -    args.state.game_area ||= [(args.state.board_width + args.grid.w / 8), 0, args.state.board_width, args.grid.h]
    -** Processing line: ~    args.state.balls ||= []~
    +        (bell_buttons args),
    +** Processing line: ~        (square_wave_note_buttons args),~
     - Inside source: true
     *** True Line Result
    -    args.state.balls ||= []
    -** Processing line: ~    args.state.num_balls ||= 0~
    +        (square_wave_note_buttons args),
    +** Processing line: ~        (saw_tooth_wave_note_buttons args),~
     - Inside source: true
     *** True Line Result
    -    args.state.num_balls ||= 0
    -** Processing line: ~    args.state.ball_created_at ||= args.state.tick_count~
    +        (saw_tooth_wave_note_buttons args),
    +** Processing line: ~        (triangle_wave_note_buttons args),~
     - Inside source: true
     *** True Line Result
    -    args.state.ball_created_at ||= args.state.tick_count
    -** Processing line: ~    args.state.ball_hypotenuse = (10**2 + 10**2)**0.5~
    +        (triangle_wave_note_buttons args),
    +** Processing line: ~      ].flatten~
     - Inside source: true
     *** True Line Result
    -    args.state.ball_hypotenuse = (10**2 + 10**2)**0.5
    -** Processing line: ~    args.state.ballParents ||=nil~
    +      ].flatten
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    args.state.ballParents ||=nil
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    init_blocks args~
    +** Processing line: ~    def render args~
     - Inside source: true
     *** True Line Result
    -    init_blocks args
    -** Processing line: ~    init_balls args~
    +    def render args
    +** Processing line: ~      args.outputs.borders << args.state.buttons.map { |b| b[:border] }~
     - Inside source: true
     *** True Line Result
    -    init_balls args
    -** Processing line: ~  end~
    +      args.outputs.borders << args.state.buttons.map { |b| b[:border] }
    +** Processing line: ~      args.outputs.labels  << args.state.buttons.map { |b| b[:label]  }~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +      args.outputs.labels  << args.state.buttons.map { |b| b[:label]  }
    +** Processing line: ~      args.outputs.labels  << args.layout~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  begin :default_methods~
    +      args.outputs.labels  << args.layout
    +** Processing line: ~                                .rect(row: 0, col: 11.5)~
     - Inside source: true
     *** True Line Result
    -  begin :default_methods
    -** Processing line: ~    def init_blocks args~
    +                                .rect(row: 0, col: 11.5)
    +** Processing line: ~                                .yield_self { |r| r.merge y: r.y + r.h }~
     - Inside source: true
     *** True Line Result
    -    def init_blocks args
    -** Processing line: ~      block_size = args.state.board_width / 8~
    +                                .yield_self { |r| r.merge y: r.y + r.h }
    +** Processing line: ~                                .merge(text: "This is a Pro only feature. Click here to watch the YouTube video if you are on the Standard License.",~
     - Inside source: true
     *** True Line Result
    -      block_size = args.state.board_width / 8
    -** Processing line: ~      #Space inbetween each block~
    +                                .merge(text: "This is a Pro only feature. Click here to watch the YouTube video if you are on the Standard License.",
    +** Processing line: ~                                       alignment_enum: 1)~
     - Inside source: true
     *** True Line Result
    -      #Space inbetween each block
    -** Processing line: ~      block_offset = 4~
    +                                       alignment_enum: 1)
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      block_offset = 4
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      args.state.squares ||=[~
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      args.state.squares ||=[
    -** Processing line: ~        Square.new(args, 2, 0, block_size, :right, block_offset),~
    +
    +** Processing line: ~    def input args~
     - Inside source: true
     *** True Line Result
    -        Square.new(args, 2, 0, block_size, :right, block_offset),
    -** Processing line: ~        Square.new(args, 5, 0, block_size, :right, block_offset),~
    +    def input args
    +** Processing line: ~      args.state.buttons.each do |b|~
     - Inside source: true
     *** True Line Result
    -        Square.new(args, 5, 0, block_size, :right, block_offset),
    -** Processing line: ~        Square.new(args, 6, 7, block_size, :right, block_offset)~
    +      args.state.buttons.each do |b|
    +** Processing line: ~        if args.inputs.mouse.click && (args.inputs.mouse.click.inside_rect? b[:rect])~
     - Inside source: true
     *** True Line Result
    -        Square.new(args, 6, 7, block_size, :right, block_offset)
    -** Processing line: ~      ]~
    +        if args.inputs.mouse.click && (args.inputs.mouse.click.inside_rect? b[:rect])
    +** Processing line: ~          parameter_string = (b.slice :frequency, :note, :octave).map { |k, v| "#{k}: #{v}" }.join ", "~
     - Inside source: true
     *** True Line Result
    -      ]
    -** Processing line: ~~
    +          parameter_string = (b.slice :frequency, :note, :octave).map { |k, v| "#{k}: #{v}" }.join ", "
    +** Processing line: ~          args.gtk.notify! "#{b[:method_to_call]} #{parameter_string}"~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~~
    +          args.gtk.notify! "#{b[:method_to_call]} #{parameter_string}"
    +** Processing line: ~          send b[:method_to_call], args, b~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      #Possible orientations are :right, :left, :up, :down~
    +          send b[:method_to_call], args, b
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -      #Possible orientations are :right, :left, :up, :down
    -** Processing line: ~~
    +        end
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      args.state.tshapes ||= [~
    +** Processing line: ~      if args.inputs.mouse.click && (args.inputs.mouse.click.inside_rect? (args.layout.rect(row: 0).yield_self { |r| r.merge y: r.y + r.h.half, h: r.h.half }))~
     - Inside source: true
     *** True Line Result
    -      args.state.tshapes ||= [
    -** Processing line: ~        TShape.new(args, 0, 6, block_size, :left, block_offset),~
    +      if args.inputs.mouse.click && (args.inputs.mouse.click.inside_rect? (args.layout.rect(row: 0).yield_self { |r| r.merge y: r.y + r.h.half, h: r.h.half }))
    +** Processing line: ~        args.gtk.openurl 'https://www.youtube.com/watch?v=zEzovM5jT-k&ab_channel=AmirRajan'~
     - Inside source: true
     *** True Line Result
    -        TShape.new(args, 0, 6, block_size, :left, block_offset),
    -** Processing line: ~        TShape.new(args, 3, 3, block_size, :down, block_offset),~
    +        args.gtk.openurl 'https://www.youtube.com/watch?v=zEzovM5jT-k&ab_channel=AmirRajan'
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -        TShape.new(args, 3, 3, block_size, :down, block_offset),
    -** Processing line: ~        TShape.new(args, 0, 3, block_size, :right, block_offset),~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -        TShape.new(args, 0, 3, block_size, :right, block_offset),
    -** Processing line: ~        TShape.new(args, 0, 11, block_size, :up, block_offset)~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        TShape.new(args, 0, 11, block_size, :up, block_offset)
    -** Processing line: ~      ]~
    +
    +** Processing line: ~    def process_audio_queue args~
     - Inside source: true
     *** True Line Result
    -      ]
    +    def process_audio_queue args
    +** Processing line: ~      to_queue = args.state.audio_queue.find_all { |v| v[:queue_at] <= args.tick_count }~
    +- Inside source: true
    +*** True Line Result
    +      to_queue = args.state.audio_queue.find_all { |v| v[:queue_at] <= args.tick_count }
    +** Processing line: ~      args.state.audio_queue -= to_queue~
    +- Inside source: true
    +*** True Line Result
    +      args.state.audio_queue -= to_queue
    +** Processing line: ~      to_queue.each { |a| args.audio[a[:id]] = a }~
    +- Inside source: true
    +*** True Line Result
    +      to_queue.each { |a| args.audio[a[:id]] = a }
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      args.state.lines ||= [~
    +** Processing line: ~      args.audio.find_all { |k, v| v[:decay_rate] }~
     - Inside source: true
     *** True Line Result
    -      args.state.lines ||= [
    -** Processing line: ~        Line.new(args,3, 8, block_size, :down, block_offset),~
    +      args.audio.find_all { |k, v| v[:decay_rate] }
    +** Processing line: ~        .each     { |k, v| v[:gain] -= v[:decay_rate] }~
     - Inside source: true
     *** True Line Result
    -        Line.new(args,3, 8, block_size, :down, block_offset),
    -** Processing line: ~        Line.new(args, 7, 3, block_size, :up, block_offset),~
    +        .each     { |k, v| v[:gain] -= v[:decay_rate] }
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        Line.new(args, 7, 3, block_size, :up, block_offset),
    -** Processing line: ~        Line.new(args, 3, 7, block_size, :right, block_offset)~
    +
    +** Processing line: ~      sounds_to_stop = args.audio~
     - Inside source: true
     *** True Line Result
    -        Line.new(args, 3, 7, block_size, :right, block_offset)
    -** Processing line: ~      ]~
    +      sounds_to_stop = args.audio
    +** Processing line: ~                         .find_all { |k, v| v[:stop_at] && args.state.tick_count >= v[:stop_at] }~
     - Inside source: true
     *** True Line Result
    -      ]
    +                         .find_all { |k, v| v[:stop_at] && args.state.tick_count >= v[:stop_at] }
    +** Processing line: ~                         .map { |k, v| k }~
    +- Inside source: true
    +*** True Line Result
    +                         .map { |k, v| k }
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      #exit()~
    +** Processing line: ~      sounds_to_stop.each { |k| args.audio.delete k }~
     - Inside source: true
     *** True Line Result
    -      #exit()
    +      sounds_to_stop.each { |k| args.audio.delete k }
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
         end
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def init_balls args~
    +** Processing line: ~  begin # region: button definitions, ui layout, callback functions~
     - Inside source: true
     *** True Line Result
    -    def init_balls args
    -** Processing line: ~      return unless args.state.num_balls < BALL_COUNT~
    +  begin # region: button definitions, ui layout, callback functions
    +** Processing line: ~    def button args, opts~
     - Inside source: true
     *** True Line Result
    -      return unless args.state.num_balls < BALL_COUNT
    +    def button args, opts
    +** Processing line: ~      button_def = opts.merge rect: (args.layout.rect (opts.merge w: 2, h: 1))~
    +- Inside source: true
    +*** True Line Result
    +      button_def = opts.merge rect: (args.layout.rect (opts.merge w: 2, h: 1))
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    +** Processing line: ~      button_def[:border] = button_def[:rect].merge r: 0, g: 0, b: 0~
    +- Inside source: true
    +*** True Line Result
    +      button_def[:border] = button_def[:rect].merge r: 0, g: 0, b: 0
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      #only create a new ball every 10 ticks~
    +** Processing line: ~      label_offset_x = 5~
     - Inside source: true
     *** True Line Result
    -      #only create a new ball every 10 ticks
    -** Processing line: ~      return unless args.state.ball_created_at.elapsed_time > 10~
    +      label_offset_x = 5
    +** Processing line: ~      label_offset_y = 30~
     - Inside source: true
     *** True Line Result
    -      return unless args.state.ball_created_at.elapsed_time > 10
    +      label_offset_y = 30
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      if (args.state.num_balls == 0)~
    +** Processing line: ~      button_def[:label]  = button_def[:rect].merge text: opts[:text],~
     - Inside source: true
     *** True Line Result
    -      if (args.state.num_balls == 0)
    -** Processing line: ~        args.state.balls.append(Ball.new(args,args.state.num_balls,BALL_COUNT-1, nil, nil))~
    +      button_def[:label]  = button_def[:rect].merge text: opts[:text],
    +** Processing line: ~                                                    size_enum: -2.5,~
     - Inside source: true
     *** True Line Result
    -        args.state.balls.append(Ball.new(args,args.state.num_balls,BALL_COUNT-1, nil, nil))
    -** Processing line: ~        args.state.ballParents = [args.state.balls[0]]~
    +                                                    size_enum: -2.5,
    +** Processing line: ~                                                    x: button_def[:rect].x + label_offset_x,~
     - Inside source: true
     *** True Line Result
    -        args.state.ballParents = [args.state.balls[0]]
    -** Processing line: ~      else~
    +                                                    x: button_def[:rect].x + label_offset_x,
    +** Processing line: ~                                                    y: button_def[:rect].y + label_offset_y~
     - Inside source: true
     *** True Line Result
    -      else
    -** Processing line: ~        args.state.balls.append(Ball.new(args,args.state.num_balls,BALL_COUNT-1, args.state.balls.last, nil) )~
    +                                                    y: button_def[:rect].y + label_offset_y
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        args.state.balls.append(Ball.new(args,args.state.num_balls,BALL_COUNT-1, args.state.balls.last, nil) )
    -** Processing line: ~        args.state.balls[-2].child = args.state.balls[-1]~
    +
    +** Processing line: ~      button_def~
     - Inside source: true
     *** True Line Result
    -        args.state.balls[-2].child = args.state.balls[-1]
    -** Processing line: ~      end~
    +      button_def
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~      args.state.ball_created_at = args.state.tick_count~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      args.state.ball_created_at = args.state.tick_count
    -** Processing line: ~      args.state.num_balls += 1~
    +
    +** Processing line: ~    def play_sine_wave args, sender~
     - Inside source: true
     *** True Line Result
    -      args.state.num_balls += 1
    +    def play_sine_wave args, sender
    +** Processing line: ~      queue_sine_wave args,~
    +- Inside source: true
    +*** True Line Result
    +      queue_sine_wave args,
    +** Processing line: ~                      frequency: sender[:frequency],~
    +- Inside source: true
    +*** True Line Result
    +                      frequency: sender[:frequency],
    +** Processing line: ~                      duration: 1.seconds,~
    +- Inside source: true
    +*** True Line Result
    +                      duration: 1.seconds,
    +** Processing line: ~                      fade_out: true~
    +- Inside source: true
    +*** True Line Result
    +                      fade_out: true
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
         end
    -** Processing line: ~  end~
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  end
    +
    +** Processing line: ~    def play_note args, sender~
    +- Inside source: true
    +*** True Line Result
    +    def play_note args, sender
    +** Processing line: ~      method_to_call = :queue_sine_wave~
    +- Inside source: true
    +*** True Line Result
    +      method_to_call = :queue_sine_wave
    +** Processing line: ~      method_to_call = :queue_square_wave    if sender[:type] == :square~
    +- Inside source: true
    +*** True Line Result
    +      method_to_call = :queue_square_wave    if sender[:type] == :square
    +** Processing line: ~      method_to_call = :queue_saw_tooth_wave if sender[:type] == :saw_tooth~
    +- Inside source: true
    +*** True Line Result
    +      method_to_call = :queue_saw_tooth_wave if sender[:type] == :saw_tooth
    +** Processing line: ~      method_to_call = :queue_triangle_wave  if sender[:type] == :triangle~
    +- Inside source: true
    +*** True Line Result
    +      method_to_call = :queue_triangle_wave  if sender[:type] == :triangle
    +** Processing line: ~      method_to_call = :queue_bell           if sender[:type] == :bell~
    +- Inside source: true
    +*** True Line Result
    +      method_to_call = :queue_bell           if sender[:type] == :bell
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  #Render loop~
    +** Processing line: ~      send method_to_call, args,~
     - Inside source: true
     *** True Line Result
    -  #Render loop
    -** Processing line: ~  def render args~
    +      send method_to_call, args,
    +** Processing line: ~           frequency: (frequency_for note: sender[:note], octave: sender[:octave]),~
     - Inside source: true
     *** True Line Result
    -  def render args
    -** Processing line: ~    bgClr = {r:10, g:10, b:200}~
    +           frequency: (frequency_for note: sender[:note], octave: sender[:octave]),
    +** Processing line: ~           duration: 1.seconds,~
     - Inside source: true
     *** True Line Result
    -    bgClr = {r:10, g:10, b:200}
    -** Processing line: ~    bgClr = {r:255-30, g:255-30, b:255-30}~
    +           duration: 1.seconds,
    +** Processing line: ~           fade_out: true~
     - Inside source: true
     *** True Line Result
    -    bgClr = {r:255-30, g:255-30, b:255-30}
    +           fade_out: true
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    args.outputs.solids << [0, 0, $args.grid.right, $args.grid.top, bgClr[:r], bgClr[:g], bgClr[:b]];~
    +** Processing line: ~    def frequency_buttons args~
    +- Inside source: true
    +*** True Line Result
    +    def frequency_buttons args
    +** Processing line: ~      [~
    +- Inside source: true
    +*** True Line Result
    +      [
    +** Processing line: ~        (button args,~
    +- Inside source: true
    +*** True Line Result
    +        (button args,
    +** Processing line: ~                row: 4.0, col: 0, text: "300hz",~
    +- Inside source: true
    +*** True Line Result
    +                row: 4.0, col: 0, text: "300hz",
    +** Processing line: ~                frequency: 300,~
    +- Inside source: true
    +*** True Line Result
    +                frequency: 300,
    +** Processing line: ~                method_to_call: :play_sine_wave),~
    +- Inside source: true
    +*** True Line Result
    +                method_to_call: :play_sine_wave),
    +** Processing line: ~        (button args,~
    +- Inside source: true
    +*** True Line Result
    +        (button args,
    +** Processing line: ~                row: 5.0, col: 0, text: "400hz",~
    +- Inside source: true
    +*** True Line Result
    +                row: 5.0, col: 0, text: "400hz",
    +** Processing line: ~                frequency: 400,~
    +- Inside source: true
    +*** True Line Result
    +                frequency: 400,
    +** Processing line: ~                method_to_call: :play_sine_wave),~
    +- Inside source: true
    +*** True Line Result
    +                method_to_call: :play_sine_wave),
    +** Processing line: ~        (button args,~
    +- Inside source: true
    +*** True Line Result
    +        (button args,
    +** Processing line: ~                row: 6.0, col: 0, text: "500hz",~
     - Inside source: true
     *** True Line Result
    -    args.outputs.solids << [0, 0, $args.grid.right, $args.grid.top, bgClr[:r], bgClr[:g], bgClr[:b]];
    -** Processing line: ~    args.outputs.borders << args.state.game_area~
    +                row: 6.0, col: 0, text: "500hz",
    +** Processing line: ~                frequency: 500,~
     - Inside source: true
     *** True Line Result
    -    args.outputs.borders << args.state.game_area
    -** Processing line: ~~
    +                frequency: 500,
    +** Processing line: ~                method_to_call: :play_sine_wave),~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    render_instructions args~
    +                method_to_call: :play_sine_wave),
    +** Processing line: ~      ]~
     - Inside source: true
     *** True Line Result
    -    render_instructions args
    -** Processing line: ~    render_shapes args~
    +      ]
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    render_shapes args
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    render_balls args~
    +** Processing line: ~    def sine_wave_note_buttons args~
     - Inside source: true
     *** True Line Result
    -    render_balls args
    -** Processing line: ~~
    +    def sine_wave_note_buttons args
    +** Processing line: ~      [~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    #args.state.rectangle.draw args~
    +      [
    +** Processing line: ~        (button args,~
     - Inside source: true
     *** True Line Result
    -    #args.state.rectangle.draw args
    -** Processing line: ~~
    +        (button args,
    +** Processing line: ~                row: 1.5, col: 2, text: "Sine C4",~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    args.outputs.sprites << [$args.grid.right-(args.state.board_width + args.grid.w / 8), 0, $args.grid.right, $args.grid.top, "sprites/square-white-2.png", 0, 255, bgClr[:r], bgClr[:g], bgClr[:b]]~
    +                row: 1.5, col: 2, text: "Sine C4",
    +** Processing line: ~                note: :c, octave: 4, type: :sine, method_to_call: :play_note),~
     - Inside source: true
     *** True Line Result
    -    args.outputs.sprites << [$args.grid.right-(args.state.board_width + args.grid.w / 8), 0, $args.grid.right, $args.grid.top, "sprites/square-white-2.png", 0, 255, bgClr[:r], bgClr[:g], bgClr[:b]]
    -** Processing line: ~    args.outputs.sprites << [0, 0, (args.state.board_width + args.grid.w / 8), $args.grid.top, "sprites/square-white-2.png", 0, 255, bgClr[:r], bgClr[:g], bgClr[:b]]~
    +                note: :c, octave: 4, type: :sine, method_to_call: :play_note),
    +** Processing line: ~        (button args,~
     - Inside source: true
     *** True Line Result
    -    args.outputs.sprites << [0, 0, (args.state.board_width + args.grid.w / 8), $args.grid.top, "sprites/square-white-2.png", 0, 255, bgClr[:r], bgClr[:g], bgClr[:b]]
    -** Processing line: ~~
    +        (button args,
    +** Processing line: ~                row: 2.5, col: 2, text: "Sine D4",~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  end~
    +                row: 2.5, col: 2, text: "Sine D4",
    +** Processing line: ~                note: :d, octave: 4, type: :sine, method_to_call: :play_note),~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +                note: :d, octave: 4, type: :sine, method_to_call: :play_note),
    +** Processing line: ~        (button args,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  begin :render_methods~
    +        (button args,
    +** Processing line: ~                row: 3.5, col: 2, text: "Sine E4",~
     - Inside source: true
     *** True Line Result
    -  begin :render_methods
    -** Processing line: ~    def render_instructions args~
    +                row: 3.5, col: 2, text: "Sine E4",
    +** Processing line: ~                note: :e, octave: 4, type: :sine, method_to_call: :play_note),~
     - Inside source: true
     *** True Line Result
    -    def render_instructions args
    -** Processing line: ~      #gtk.current_framerate~
    +                note: :e, octave: 4, type: :sine, method_to_call: :play_note),
    +** Processing line: ~        (button args,~
     - Inside source: true
     *** True Line Result
    -      #gtk.current_framerate
    -** Processing line: ~      args.outputs.labels << [20, $args.grid.top-20, "FPS: " + $gtk.current_framerate.to_s]~
    +        (button args,
    +** Processing line: ~                row: 4.5, col: 2, text: "Sine F4",~
     - Inside source: true
     *** True Line Result
    -      args.outputs.labels << [20, $args.grid.top-20, "FPS: " + $gtk.current_framerate.to_s]
    -** Processing line: ~      if (args.state.balls != nil && args.state.balls[0] != nil)~
    +                row: 4.5, col: 2, text: "Sine F4",
    +** Processing line: ~                note: :f, octave: 4, type: :sine, method_to_call: :play_note),~
     - Inside source: true
     *** True Line Result
    -      if (args.state.balls != nil && args.state.balls[0] != nil)
    -** Processing line: ~          bx =  args.state.balls[0].velocity.x~
    +                note: :f, octave: 4, type: :sine, method_to_call: :play_note),
    +** Processing line: ~        (button args,~
     - Inside source: true
     *** True Line Result
    -          bx =  args.state.balls[0].velocity.x
    -** Processing line: ~          by =  args.state.balls[0].velocity.y~
    +        (button args,
    +** Processing line: ~                row: 5.5, col: 2, text: "Sine G4",~
     - Inside source: true
     *** True Line Result
    -          by =  args.state.balls[0].velocity.y
    -** Processing line: ~          bmg = (bx**2.0 + by**2.0)**0.5~
    +                row: 5.5, col: 2, text: "Sine G4",
    +** Processing line: ~                note: :g, octave: 4, type: :sine, method_to_call: :play_note),~
     - Inside source: true
     *** True Line Result
    -          bmg = (bx**2.0 + by**2.0)**0.5
    -** Processing line: ~          args.outputs.labels << [20, $args.grid.top-20-20, "V: " + bmg.to_s ]~
    +                note: :g, octave: 4, type: :sine, method_to_call: :play_note),
    +** Processing line: ~        (button args,~
     - Inside source: true
     *** True Line Result
    -          args.outputs.labels << [20, $args.grid.top-20-20, "V: " + bmg.to_s ]
    -** Processing line: ~      end~
    +        (button args,
    +** Processing line: ~                row: 6.5, col: 2, text: "Sine A5",~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +                row: 6.5, col: 2, text: "Sine A5",
    +** Processing line: ~                note: :a, octave: 5, type: :sine, method_to_call: :play_note),~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~~
    +                note: :a, octave: 5, type: :sine, method_to_call: :play_note),
    +** Processing line: ~        (button args,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    end~
    +        (button args,
    +** Processing line: ~                row: 7.5, col: 2, text: "Sine B5",~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +                row: 7.5, col: 2, text: "Sine B5",
    +** Processing line: ~                note: :b, octave: 5, type: :sine, method_to_call: :play_note),~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def render_shapes args~
    +                note: :b, octave: 5, type: :sine, method_to_call: :play_note),
    +** Processing line: ~        (button args,~
     - Inside source: true
     *** True Line Result
    -    def render_shapes args
    -** Processing line: ~      for s in args.state.squares~
    +        (button args,
    +** Processing line: ~                row: 8.5, col: 2, text: "Sine C5",~
     - Inside source: true
     *** True Line Result
    -      for s in args.state.squares
    -** Processing line: ~        s.draw args~
    +                row: 8.5, col: 2, text: "Sine C5",
    +** Processing line: ~                note: :c, octave: 5, type: :sine, method_to_call: :play_note),~
     - Inside source: true
     *** True Line Result
    -        s.draw args
    -** Processing line: ~      end~
    +                note: :c, octave: 5, type: :sine, method_to_call: :play_note),
    +** Processing line: ~      ]~
     - Inside source: true
     *** True Line Result
    -      end
    +      ]
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      for l in args.state.lines~
    +** Processing line: ~    def square_wave_note_buttons args~
     - Inside source: true
     *** True Line Result
    -      for l in args.state.lines
    -** Processing line: ~        l.draw args~
    +    def square_wave_note_buttons args
    +** Processing line: ~      [~
     - Inside source: true
     *** True Line Result
    -        l.draw args
    -** Processing line: ~      end~
    +      [
    +** Processing line: ~        (button args,~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +        (button args,
    +** Processing line: ~                row: 1.5, col: 6, text: "Square C4",~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      for t in args.state.tshapes~
    +                row: 1.5, col: 6, text: "Square C4",
    +** Processing line: ~                note: :c, octave: 4, type: :square, method_to_call: :play_note),~
     - Inside source: true
     *** True Line Result
    -      for t in args.state.tshapes
    -** Processing line: ~        t.draw args~
    +                note: :c, octave: 4, type: :square, method_to_call: :play_note),
    +** Processing line: ~        (button args,~
     - Inside source: true
     *** True Line Result
    -        t.draw args
    -** Processing line: ~      end~
    +        (button args,
    +** Processing line: ~                row: 2.5, col: 6, text: "Square D4",~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +                row: 2.5, col: 6, text: "Square D4",
    +** Processing line: ~                note: :d, octave: 4, type: :square, method_to_call: :play_note),~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~~
    +                note: :d, octave: 4, type: :square, method_to_call: :play_note),
    +** Processing line: ~        (button args,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    end~
    +        (button args,
    +** Processing line: ~                row: 3.5, col: 6, text: "Square E4",~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +                row: 3.5, col: 6, text: "Square E4",
    +** Processing line: ~                note: :e, octave: 4, type: :square, method_to_call: :play_note),~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def render_balls args~
    +                note: :e, octave: 4, type: :square, method_to_call: :play_note),
    +** Processing line: ~        (button args,~
     - Inside source: true
     *** True Line Result
    -    def render_balls args
    -** Processing line: ~      #args.state.balls.each do |ball|~
    +        (button args,
    +** Processing line: ~                row: 4.5, col: 6, text: "Square F4",~
     - Inside source: true
     *** True Line Result
    -      #args.state.balls.each do |ball|
    -** Processing line: ~        #ball.draw args~
    +                row: 4.5, col: 6, text: "Square F4",
    +** Processing line: ~                note: :f, octave: 4, type: :square, method_to_call: :play_note),~
     - Inside source: true
     *** True Line Result
    -        #ball.draw args
    -** Processing line: ~      #end~
    +                note: :f, octave: 4, type: :square, method_to_call: :play_note),
    +** Processing line: ~        (button args,~
     - Inside source: true
     *** True Line Result
    -      #end
    -** Processing line: ~~
    +        (button args,
    +** Processing line: ~                row: 5.5, col: 6, text: "Square G4",~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      args.outputs.sprites << args.state.balls.map do |ball|~
    +                row: 5.5, col: 6, text: "Square G4",
    +** Processing line: ~                note: :g, octave: 4, type: :square, method_to_call: :play_note),~
     - Inside source: true
     *** True Line Result
    -      args.outputs.sprites << args.state.balls.map do |ball|
    -** Processing line: ~        ball.getDraw args~
    +                note: :g, octave: 4, type: :square, method_to_call: :play_note),
    +** Processing line: ~        (button args,~
     - Inside source: true
     *** True Line Result
    -        ball.getDraw args
    -** Processing line: ~      end~
    +        (button args,
    +** Processing line: ~                row: 6.5, col: 6, text: "Square A5",~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +                row: 6.5, col: 6, text: "Square A5",
    +** Processing line: ~                note: :a, octave: 5, type: :square, method_to_call: :play_note),~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~  end~
    +                note: :a, octave: 5, type: :square, method_to_call: :play_note),
    +** Processing line: ~        (button args,~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +        (button args,
    +** Processing line: ~                row: 7.5, col: 6, text: "Square B5",~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  #Calls all methods necessary for performing calculations~
    +                row: 7.5, col: 6, text: "Square B5",
    +** Processing line: ~                note: :b, octave: 5, type: :square, method_to_call: :play_note),~
     - Inside source: true
     *** True Line Result
    -  #Calls all methods necessary for performing calculations
    -** Processing line: ~  def calc args~
    +                note: :b, octave: 5, type: :square, method_to_call: :play_note),
    +** Processing line: ~        (button args,~
     - Inside source: true
     *** True Line Result
    -  def calc args
    -** Processing line: ~    for b in args.state.ballParents~
    +        (button args,
    +** Processing line: ~                row: 8.5, col: 6, text: "Square C5",~
     - Inside source: true
     *** True Line Result
    -    for b in args.state.ballParents
    -** Processing line: ~      b.update args~
    +                row: 8.5, col: 6, text: "Square C5",
    +** Processing line: ~                note: :c, octave: 5, type: :square, method_to_call: :play_note),~
     - Inside source: true
     *** True Line Result
    -      b.update args
    +                note: :c, octave: 5, type: :square, method_to_call: :play_note),
    +** Processing line: ~      ]~
    +- Inside source: true
    +*** True Line Result
    +      ]
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
         end
    -** Processing line: ~~
    +** Processing line: ~    def saw_tooth_wave_note_buttons args~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    for s in args.state.squares~
    +    def saw_tooth_wave_note_buttons args
    +** Processing line: ~      [~
     - Inside source: true
     *** True Line Result
    -    for s in args.state.squares
    -** Processing line: ~      s.update args~
    +      [
    +** Processing line: ~        (button args,~
     - Inside source: true
     *** True Line Result
    -      s.update args
    -** Processing line: ~    end~
    +        (button args,
    +** Processing line: ~                row: 1.5, col: 8, text: "Saw C4",~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +                row: 1.5, col: 8, text: "Saw C4",
    +** Processing line: ~                note: :c, octave: 4, type: :saw_tooth, method_to_call: :play_note),~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    for l in args.state.lines~
    +                note: :c, octave: 4, type: :saw_tooth, method_to_call: :play_note),
    +** Processing line: ~        (button args,~
     - Inside source: true
     *** True Line Result
    -    for l in args.state.lines
    -** Processing line: ~      l.update args~
    +        (button args,
    +** Processing line: ~                row: 2.5, col: 8, text: "Saw D4",~
     - Inside source: true
     *** True Line Result
    -      l.update args
    -** Processing line: ~    end~
    +                row: 2.5, col: 8, text: "Saw D4",
    +** Processing line: ~                note: :d, octave: 4, type: :saw_tooth, method_to_call: :play_note),~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +                note: :d, octave: 4, type: :saw_tooth, method_to_call: :play_note),
    +** Processing line: ~        (button args,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    for t in args.state.tshapes~
    +        (button args,
    +** Processing line: ~                row: 3.5, col: 8, text: "Saw E4",~
     - Inside source: true
     *** True Line Result
    -    for t in args.state.tshapes
    -** Processing line: ~      t.update args~
    +                row: 3.5, col: 8, text: "Saw E4",
    +** Processing line: ~                note: :e, octave: 4, type: :saw_tooth, method_to_call: :play_note),~
     - Inside source: true
     *** True Line Result
    -      t.update args
    -** Processing line: ~    end~
    +                note: :e, octave: 4, type: :saw_tooth, method_to_call: :play_note),
    +** Processing line: ~        (button args,~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +        (button args,
    +** Processing line: ~                row: 4.5, col: 8, text: "Saw F4",~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~~
    +                row: 4.5, col: 8, text: "Saw F4",
    +** Processing line: ~                note: :f, octave: 4, type: :saw_tooth, method_to_call: :play_note),~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~~
    +                note: :f, octave: 4, type: :saw_tooth, method_to_call: :play_note),
    +** Processing line: ~        (button args,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  end~
    +        (button args,
    +** Processing line: ~                row: 5.5, col: 8, text: "Saw G4",~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +                row: 5.5, col: 8, text: "Saw G4",
    +** Processing line: ~                note: :g, octave: 4, type: :saw_tooth, method_to_call: :play_note),~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  begin :calc_methods~
    +                note: :g, octave: 4, type: :saw_tooth, method_to_call: :play_note),
    +** Processing line: ~        (button args,~
     - Inside source: true
     *** True Line Result
    -  begin :calc_methods
    -** Processing line: ~~
    +        (button args,
    +** Processing line: ~                row: 6.5, col: 8, text: "Saw A5",~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  end~
    +                row: 6.5, col: 8, text: "Saw A5",
    +** Processing line: ~                note: :a, octave: 5, type: :saw_tooth, method_to_call: :play_note),~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +                note: :a, octave: 5, type: :saw_tooth, method_to_call: :play_note),
    +** Processing line: ~        (button args,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def tick args~
    +        (button args,
    +** Processing line: ~                row: 7.5, col: 8, text: "Saw B5",~
     - Inside source: true
     *** True Line Result
    -  def tick args
    -** Processing line: ~    defaults args~
    +                row: 7.5, col: 8, text: "Saw B5",
    +** Processing line: ~                note: :b, octave: 5, type: :saw_tooth, method_to_call: :play_note),~
     - Inside source: true
     *** True Line Result
    -    defaults args
    -** Processing line: ~    render args~
    +                note: :b, octave: 5, type: :saw_tooth, method_to_call: :play_note),
    +** Processing line: ~        (button args,~
     - Inside source: true
     *** True Line Result
    -    render args
    -** Processing line: ~    calc args~
    +        (button args,
    +** Processing line: ~                row: 8.5, col: 8, text: "Saw C5",~
     - Inside source: true
     *** True Line Result
    -    calc args
    -** Processing line: ~  end~
    +                row: 8.5, col: 8, text: "Saw C5",
    +** Processing line: ~                note: :c, octave: 5, type: :saw_tooth, method_to_call: :play_note),~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +                note: :c, octave: 5, type: :saw_tooth, method_to_call: :play_note),
    +** Processing line: ~      ]~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~#+end_src~
    -- Line was identified as the end of a code block.
    +      ]
    +** Processing line: ~    end~
    +- Inside source: true
     *** True Line Result
    -#+end_src
    +    end
     ** Processing line: ~~
    -- End of paragraph detected.
    +- Inside source: true
     *** True Line Result
     
    -** Processing line: ~*** Physics And Collisions - Arbitrary Collision - paddle.rb~
    -- Header detected.
    +** Processing line: ~    def triangle_wave_note_buttons args~
    +- Inside source: true
     *** True Line Result
    -
    +    def triangle_wave_note_buttons args
    +** Processing line: ~      [~
    +- Inside source: true
     *** True Line Result
    -*** Physics And Collisions - Arbitrary Collision - paddle.rb
    -** Processing line: ~#+begin_src ruby~
    -- Line was identified as the beginning of a code block.
    +      [
    +** Processing line: ~        (button args,~
    +- Inside source: true
     *** True Line Result
    -
    +        (button args,
    +** Processing line: ~                row: 1.5, col: 10, text: "Triangle C4",~
    +- Inside source: true
     *** True Line Result
    -#+begin_src ruby
    -** Processing line: ~  # ./samples/04_physics_and_collisions/09_arbitrary_collision/app/paddle.rb~
    +                row: 1.5, col: 10, text: "Triangle C4",
    +** Processing line: ~                note: :c, octave: 4, type: :triangle, method_to_call: :play_note),~
     - Inside source: true
     *** True Line Result
    -  # ./samples/04_physics_and_collisions/09_arbitrary_collision/app/paddle.rb
    -** Processing line: ~  class Paddle~
    +                note: :c, octave: 4, type: :triangle, method_to_call: :play_note),
    +** Processing line: ~        (button args,~
     - Inside source: true
     *** True Line Result
    -  class Paddle
    -** Processing line: ~    attr_accessor :enabled~
    +        (button args,
    +** Processing line: ~                row: 2.5, col: 10, text: "Triangle D4",~
     - Inside source: true
     *** True Line Result
    -    attr_accessor :enabled
    -** Processing line: ~~
    +                row: 2.5, col: 10, text: "Triangle D4",
    +** Processing line: ~                note: :d, octave: 4, type: :triangle, method_to_call: :play_note),~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def initialize ()~
    +                note: :d, octave: 4, type: :triangle, method_to_call: :play_note),
    +** Processing line: ~        (button args,~
     - Inside source: true
     *** True Line Result
    -    def initialize ()
    -** Processing line: ~      @x=WIDTH/2~
    +        (button args,
    +** Processing line: ~                row: 3.5, col: 10, text: "Triangle E4",~
     - Inside source: true
     *** True Line Result
    -      @x=WIDTH/2
    -** Processing line: ~      @y=100~
    +                row: 3.5, col: 10, text: "Triangle E4",
    +** Processing line: ~                note: :e, octave: 4, type: :triangle, method_to_call: :play_note),~
     - Inside source: true
     *** True Line Result
    -      @y=100
    -** Processing line: ~      @width=100~
    +                note: :e, octave: 4, type: :triangle, method_to_call: :play_note),
    +** Processing line: ~        (button args,~
     - Inside source: true
     *** True Line Result
    -      @width=100
    -** Processing line: ~      @height=20~
    +        (button args,
    +** Processing line: ~                row: 4.5, col: 10, text: "Triangle F4",~
     - Inside source: true
     *** True Line Result
    -      @height=20
    -** Processing line: ~      @speed=10~
    +                row: 4.5, col: 10, text: "Triangle F4",
    +** Processing line: ~                note: :f, octave: 4, type: :triangle, method_to_call: :play_note),~
     - Inside source: true
     *** True Line Result
    -      @speed=10
    -** Processing line: ~~
    +                note: :f, octave: 4, type: :triangle, method_to_call: :play_note),
    +** Processing line: ~        (button args,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      @xyCollision  = LinearCollider.new({x: @x,y: @y+@height+5}, {x: @x+@width, y: @y+@height+5})~
    +        (button args,
    +** Processing line: ~                row: 5.5, col: 10, text: "Triangle G4",~
     - Inside source: true
     *** True Line Result
    -      @xyCollision  = LinearCollider.new({x: @x,y: @y+@height+5}, {x: @x+@width, y: @y+@height+5})
    -** Processing line: ~      @xyCollision2 = LinearCollider.new({x: @x,y: @y}, {x: @x+@width, y: @y}, :pos)~
    +                row: 5.5, col: 10, text: "Triangle G4",
    +** Processing line: ~                note: :g, octave: 4, type: :triangle, method_to_call: :play_note),~
     - Inside source: true
     *** True Line Result
    -      @xyCollision2 = LinearCollider.new({x: @x,y: @y}, {x: @x+@width, y: @y}, :pos)
    -** Processing line: ~      @xyCollision3 = LinearCollider.new({x: @x,y: @y}, {x: @x, y: @y+@height+5})~
    +                note: :g, octave: 4, type: :triangle, method_to_call: :play_note),
    +** Processing line: ~        (button args,~
     - Inside source: true
     *** True Line Result
    -      @xyCollision3 = LinearCollider.new({x: @x,y: @y}, {x: @x, y: @y+@height+5})
    -** Processing line: ~      @xyCollision4 = LinearCollider.new({x: @x+@width,y: @y}, {x: @x+@width, y: @y+@height+5}, :pos)~
    +        (button args,
    +** Processing line: ~                row: 6.5, col: 10, text: "Triangle A5",~
     - Inside source: true
     *** True Line Result
    -      @xyCollision4 = LinearCollider.new({x: @x+@width,y: @y}, {x: @x+@width, y: @y+@height+5}, :pos)
    -** Processing line: ~~
    +                row: 6.5, col: 10, text: "Triangle A5",
    +** Processing line: ~                note: :a, octave: 5, type: :triangle, method_to_call: :play_note),~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      @enabled = true~
    +                note: :a, octave: 5, type: :triangle, method_to_call: :play_note),
    +** Processing line: ~        (button args,~
     - Inside source: true
     *** True Line Result
    -      @enabled = true
    -** Processing line: ~    end~
    +        (button args,
    +** Processing line: ~                row: 7.5, col: 10, text: "Triangle B5",~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +                row: 7.5, col: 10, text: "Triangle B5",
    +** Processing line: ~                note: :b, octave: 5, type: :triangle, method_to_call: :play_note),~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def update args~
    +                note: :b, octave: 5, type: :triangle, method_to_call: :play_note),
    +** Processing line: ~        (button args,~
     - Inside source: true
     *** True Line Result
    -    def update args
    -** Processing line: ~      @xyCollision.resetPoints({x: @x,y: @y+@height+5}, {x: @x+@width, y: @y+@height+5})~
    +        (button args,
    +** Processing line: ~                row: 8.5, col: 10, text: "Triangle C5",~
     - Inside source: true
     *** True Line Result
    -      @xyCollision.resetPoints({x: @x,y: @y+@height+5}, {x: @x+@width, y: @y+@height+5})
    -** Processing line: ~      @xyCollision2.resetPoints({x: @x,y: @y}, {x: @x+@width, y: @y})~
    +                row: 8.5, col: 10, text: "Triangle C5",
    +** Processing line: ~                note: :c, octave: 5, type: :triangle, method_to_call: :play_note),~
     - Inside source: true
     *** True Line Result
    -      @xyCollision2.resetPoints({x: @x,y: @y}, {x: @x+@width, y: @y})
    -** Processing line: ~      @xyCollision3.resetPoints({x: @x,y: @y}, {x: @x, y: @y+@height+5})~
    +                note: :c, octave: 5, type: :triangle, method_to_call: :play_note),
    +** Processing line: ~      ]~
     - Inside source: true
     *** True Line Result
    -      @xyCollision3.resetPoints({x: @x,y: @y}, {x: @x, y: @y+@height+5})
    -** Processing line: ~      @xyCollision4.resetPoints({x: @x+@width,y: @y}, {x: @x+@width, y: @y+@height+5})~
    +      ]
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      @xyCollision4.resetPoints({x: @x+@width,y: @y}, {x: @x+@width, y: @y+@height+5})
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      @xyCollision.update  args~
    +** Processing line: ~    def bell_buttons args~
     - Inside source: true
     *** True Line Result
    -      @xyCollision.update  args
    -** Processing line: ~      @xyCollision2.update args~
    +    def bell_buttons args
    +** Processing line: ~      [~
     - Inside source: true
     *** True Line Result
    -      @xyCollision2.update args
    -** Processing line: ~      @xyCollision3.update args~
    +      [
    +** Processing line: ~        (button args,~
     - Inside source: true
     *** True Line Result
    -      @xyCollision3.update args
    -** Processing line: ~      @xyCollision4.update args~
    +        (button args,
    +** Processing line: ~                row: 1.5, col: 4, text: "Bell C4",~
     - Inside source: true
     *** True Line Result
    -      @xyCollision4.update args
    -** Processing line: ~~
    +                row: 1.5, col: 4, text: "Bell C4",
    +** Processing line: ~                note: :c, octave: 4, type: :bell, method_to_call: :play_note),~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      args.inputs.keyboard.key_held.left  ||= false~
    +                note: :c, octave: 4, type: :bell, method_to_call: :play_note),
    +** Processing line: ~        (button args,~
     - Inside source: true
     *** True Line Result
    -      args.inputs.keyboard.key_held.left  ||= false
    -** Processing line: ~      args.inputs.keyboard.key_held.right  ||= false~
    +        (button args,
    +** Processing line: ~                row: 2.5, col: 4, text: "Bell D4",~
     - Inside source: true
     *** True Line Result
    -      args.inputs.keyboard.key_held.right  ||= false
    -** Processing line: ~~
    +                row: 2.5, col: 4, text: "Bell D4",
    +** Processing line: ~                note: :d, octave: 4, type: :bell, method_to_call: :play_note),~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      if not (args.inputs.keyboard.key_held.left == args.inputs.keyboard.key_held.right)~
    +                note: :d, octave: 4, type: :bell, method_to_call: :play_note),
    +** Processing line: ~        (button args,~
     - Inside source: true
     *** True Line Result
    -      if not (args.inputs.keyboard.key_held.left == args.inputs.keyboard.key_held.right)
    -** Processing line: ~        if args.inputs.keyboard.key_held.left && @enabled~
    +        (button args,
    +** Processing line: ~                row: 3.5, col: 4, text: "Bell E4",~
     - Inside source: true
     *** True Line Result
    -        if args.inputs.keyboard.key_held.left && @enabled
    -** Processing line: ~          @x-=@speed~
    +                row: 3.5, col: 4, text: "Bell E4",
    +** Processing line: ~                note: :e, octave: 4, type: :bell, method_to_call: :play_note),~
     - Inside source: true
     *** True Line Result
    -          @x-=@speed
    -** Processing line: ~        elsif args.inputs.keyboard.key_held.right && @enabled~
    +                note: :e, octave: 4, type: :bell, method_to_call: :play_note),
    +** Processing line: ~        (button args,~
     - Inside source: true
     *** True Line Result
    -        elsif args.inputs.keyboard.key_held.right && @enabled
    -** Processing line: ~          @x+=@speed~
    +        (button args,
    +** Processing line: ~                row: 4.5, col: 4, text: "Bell F4",~
     - Inside source: true
     *** True Line Result
    -          @x+=@speed
    -** Processing line: ~        end~
    +                row: 4.5, col: 4, text: "Bell F4",
    +** Processing line: ~                note: :f, octave: 4, type: :bell, method_to_call: :play_note),~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~      end~
    +                note: :f, octave: 4, type: :bell, method_to_call: :play_note),
    +** Processing line: ~        (button args,~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +        (button args,
    +** Processing line: ~                row: 5.5, col: 4, text: "Bell G4",~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      xmin =WIDTH/4~
    +                row: 5.5, col: 4, text: "Bell G4",
    +** Processing line: ~                note: :g, octave: 4, type: :bell, method_to_call: :play_note),~
     - Inside source: true
     *** True Line Result
    -      xmin =WIDTH/4
    -** Processing line: ~      xmax = 3*(WIDTH/4)~
    +                note: :g, octave: 4, type: :bell, method_to_call: :play_note),
    +** Processing line: ~        (button args,~
     - Inside source: true
     *** True Line Result
    -      xmax = 3*(WIDTH/4)
    -** Processing line: ~      @x = (@x+@width > xmax) ? xmax-@width : (@x xmax) ? xmax-@width : (@x= 0~
     - Inside source: true
     *** True Line Result
    -      @colliders.append(LinearCollider.new(@points[1],@points[2], :neg))
    -** Processing line: ~      @colliders.append(LinearCollider.new(@points[2],@points[3], :neg))~
    +          if v >= 0
    +** Processing line: ~            1.0~
     - Inside source: true
     *** True Line Result
    -      @colliders.append(LinearCollider.new(@points[2],@points[3], :neg))
    -** Processing line: ~      @colliders.append(LinearCollider.new(@points[3],@points[4], :neg))~
    +            1.0
    +** Processing line: ~          else~
     - Inside source: true
     *** True Line Result
    -      @colliders.append(LinearCollider.new(@points[3],@points[4], :neg))
    -** Processing line: ~      @colliders.append(LinearCollider.new(@points[4],@points[5], :pos))~
    +          else
    +** Processing line: ~            -1.0~
     - Inside source: true
     *** True Line Result
    -      @colliders.append(LinearCollider.new(@points[4],@points[5], :pos))
    -** Processing line: ~      @colliders.append(LinearCollider.new(@points[5],@points[6], :pos))~
    +            -1.0
    +** Processing line: ~          end~
     - Inside source: true
     *** True Line Result
    -      @colliders.append(LinearCollider.new(@points[5],@points[6], :pos))
    -** Processing line: ~      @colliders.append(LinearCollider.new(@points[6],@points[7], :pos))~
    +          end
    +** Processing line: ~        end.to_a~
     - Inside source: true
     *** True Line Result
    -      @colliders.append(LinearCollider.new(@points[6],@points[7], :pos))
    -** Processing line: ~      @colliders.append(LinearCollider.new(@points[0],@points[7], :pos))~
    +        end.to_a
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -      @colliders.append(LinearCollider.new(@points[0],@points[7], :pos))
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    end~
    +** Processing line: ~      def defaults_queue_square_wave~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +      def defaults_queue_square_wave
    +** Processing line: ~        { frequency: 440, duration: 60, gain: 0.3, fade_out: false, queue_in: 0 }~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def update args~
    +        { frequency: 440, duration: 60, gain: 0.3, fade_out: false, queue_in: 0 }
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    def update args
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      for b in args.state.balls~
    +** Processing line: ~      def queue_square_wave args, opts = {}~
     - Inside source: true
     *** True Line Result
    -      for b in args.state.balls
    -** Processing line: ~        if [b.x, b.y, b.width, b.height].intersect_rect?(@bold)~
    +      def queue_square_wave args, opts = {}
    +** Processing line: ~        opts        = defaults_queue_square_wave.merge opts~
     - Inside source: true
     *** True Line Result
    -        if [b.x, b.y, b.width, b.height].intersect_rect?(@bold)
    -** Processing line: ~          for c in @colliders~
    +        opts        = defaults_queue_square_wave.merge opts
    +** Processing line: ~        frequency   = opts[:frequency]~
     - Inside source: true
     *** True Line Result
    -          for c in @colliders
    -** Processing line: ~            if c.collision?(args, b.getPoints(args),b)~
    +        frequency   = opts[:frequency]
    +** Processing line: ~        sample_rate = 48000~
     - Inside source: true
     *** True Line Result
    -            if c.collision?(args, b.getPoints(args),b)
    -** Processing line: ~              c.collide args, b~
    +        sample_rate = 48000
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -              c.collide args, b
    -** Processing line: ~            end~
    +
    +** Processing line: ~        square_wave = square_wave_for frequency: frequency, sample_rate: sample_rate~
     - Inside source: true
     *** True Line Result
    -            end
    -** Processing line: ~          end~
    +        square_wave = square_wave_for frequency: frequency, sample_rate: sample_rate
    +** Processing line: ~        args.state.square_waves[frequency] ||= square_wave_for frequency: frequency, sample_rate: sample_rate~
     - Inside source: true
     *** True Line Result
    -          end
    -** Processing line: ~        end~
    +        args.state.square_waves[frequency] ||= square_wave_for frequency: frequency, sample_rate: sample_rate
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~      end~
    +
    +** Processing line: ~        proc = lambda do~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +        proc = lambda do
    +** Processing line: ~          generate_audio_data args.state.square_waves[frequency], sample_rate~
     - Inside source: true
     *** True Line Result
    -    end
    +          generate_audio_data args.state.square_waves[frequency], sample_rate
    +** Processing line: ~        end~
    +- Inside source: true
    +*** True Line Result
    +        end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def draw args~
    +** Processing line: ~        audio_state = new_audio_state args, opts~
     - Inside source: true
     *** True Line Result
    -    def draw args
    -** Processing line: ~      args.outputs.sprites << [~
    +        audio_state = new_audio_state args, opts
    +** Processing line: ~        audio_state[:input] = [1, sample_rate, proc]~
     - Inside source: true
     *** True Line Result
    -      args.outputs.sprites << [
    -** Processing line: ~        @x,                                       # X~
    +        audio_state[:input] = [1, sample_rate, proc]
    +** Processing line: ~        queue_audio args, audio_state: audio_state, wave: square_wave~
     - Inside source: true
     *** True Line Result
    -        @x,                                       # X
    -** Processing line: ~        @y,                                       # Y~
    +        queue_audio args, audio_state: audio_state, wave: square_wave
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -        @y,                                       # Y
    -** Processing line: ~        @width,                                   # W~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -        @width,                                   # W
    -** Processing line: ~        @height,                                  # H~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        @height,                                  # H
    -** Processing line: ~        @image,                                   # PATH~
    +
    +** Processing line: ~    begin # region: saw tooth wave~
     - Inside source: true
     *** True Line Result
    -        @image,                                   # PATH
    -** Processing line: ~        0,                                        # ANGLE~
    +    begin # region: saw tooth wave
    +** Processing line: ~      def defaults_saw_tooth_wave_for~
     - Inside source: true
     *** True Line Result
    -        0,                                        # ANGLE
    -** Processing line: ~        255,                                      # ALPHA~
    +      def defaults_saw_tooth_wave_for
    +** Processing line: ~        { frequency: 440, sample_rate: 48000 }~
     - Inside source: true
     *** True Line Result
    -        255,                                      # ALPHA
    -** Processing line: ~        219,                                      # RED_SATURATION~
    +        { frequency: 440, sample_rate: 48000 }
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -        219,                                      # RED_SATURATION
    -** Processing line: ~        112,                                      # GREEN_SATURATION~
    +      end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        112,                                      # GREEN_SATURATION
    -** Processing line: ~        147                                       # BLUE_SATURATION~
    +
    +** Processing line: ~      def saw_tooth_wave_for opts = {}~
     - Inside source: true
     *** True Line Result
    -        147                                       # BLUE_SATURATION
    -** Processing line: ~      ]~
    +      def saw_tooth_wave_for opts = {}
    +** Processing line: ~        opts = defaults_saw_tooth_wave_for.merge opts~
     - Inside source: true
     *** True Line Result
    -      ]
    -** Processing line: ~      #args.outputs.sprites << [@x, @y, @width, @height, "sprites/roundSquare_small_black.png"]~
    +        opts = defaults_saw_tooth_wave_for.merge opts
    +** Processing line: ~        sine_wave = sine_wave_for opts~
     - Inside source: true
     *** True Line Result
    -      #args.outputs.sprites << [@x, @y, @width, @height, "sprites/roundSquare_small_black.png"]
    -** Processing line: ~    end~
    +        sine_wave = sine_wave_for opts
    +** Processing line: ~        period_size = sine_wave.length~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +        period_size = sine_wave.length
    +** Processing line: ~        sine_wave.map_with_index do |v, i|~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def serialize~
    +        sine_wave.map_with_index do |v, i|
    +** Processing line: ~          (((i % period_size).fdiv period_size) * 2) - 1~
     - Inside source: true
     *** True Line Result
    -    def serialize
    -** Processing line: ~    	{x: @x, y:@y}~
    +          (((i % period_size).fdiv period_size) * 2) - 1
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -    	{x: @x, y:@y}
    -** Processing line: ~    end~
    +        end
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    end
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def inspect~
    +** Processing line: ~      def defaults_queue_saw_tooth_wave~
     - Inside source: true
     *** True Line Result
    -    def inspect
    -** Processing line: ~    	serialize.to_s~
    +      def defaults_queue_saw_tooth_wave
    +** Processing line: ~        { frequency: 440, duration: 60, gain: 0.3, fade_out: false, queue_in: 0 }~
     - Inside source: true
     *** True Line Result
    -    	serialize.to_s
    -** Processing line: ~    end~
    +        { frequency: 440, duration: 60, gain: 0.3, fade_out: false, queue_in: 0 }
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    end
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def to_s~
    +** Processing line: ~      def queue_saw_tooth_wave args, opts = {}~
     - Inside source: true
     *** True Line Result
    -    def to_s
    -** Processing line: ~    	serialize.to_s~
    +      def queue_saw_tooth_wave args, opts = {}
    +** Processing line: ~        opts        = defaults_queue_saw_tooth_wave.merge opts~
     - Inside source: true
     *** True Line Result
    -    	serialize.to_s
    -** Processing line: ~    end~
    +        opts        = defaults_queue_saw_tooth_wave.merge opts
    +** Processing line: ~        frequency   = opts[:frequency]~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~  end~
    +        frequency   = opts[:frequency]
    +** Processing line: ~        sample_rate = 48000~
     - Inside source: true
     *** True Line Result
    -  end
    +        sample_rate = 48000
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~#+end_src~
    -- Line was identified as the end of a code block.
    +** Processing line: ~        saw_tooth_wave = saw_tooth_wave_for frequency: frequency, sample_rate: sample_rate~
    +- Inside source: true
     *** True Line Result
    -#+end_src
    -** Processing line: ~~
    -- End of paragraph detected.
    +        saw_tooth_wave = saw_tooth_wave_for frequency: frequency, sample_rate: sample_rate
    +** Processing line: ~        args.state.saw_tooth_waves[frequency] ||= saw_tooth_wave_for frequency: frequency, sample_rate: sample_rate~
    +- Inside source: true
     *** True Line Result
    -
    -** Processing line: ~*** Physics And Collisions - Arbitrary Collision - square_collider.rb~
    -- Header detected.
    +        args.state.saw_tooth_waves[frequency] ||= saw_tooth_wave_for frequency: frequency, sample_rate: sample_rate
    +** Processing line: ~~
    +- Inside source: true
     *** True Line Result
     
    +** Processing line: ~        proc = lambda do~
    +- Inside source: true
     *** True Line Result
    -*** Physics And Collisions - Arbitrary Collision - square_collider.rb
    -** Processing line: ~#+begin_src ruby~
    -- Line was identified as the beginning of a code block.
    -*** True Line Result
    -
    +        proc = lambda do
    +** Processing line: ~          generate_audio_data args.state.saw_tooth_waves[frequency], sample_rate~
    +- Inside source: true
     *** True Line Result
    -#+begin_src ruby
    -** Processing line: ~  # ./samples/04_physics_and_collisions/09_arbitrary_collision/app/square_collider.rb~
    +          generate_audio_data args.state.saw_tooth_waves[frequency], sample_rate
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -  # ./samples/04_physics_and_collisions/09_arbitrary_collision/app/square_collider.rb
    +        end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  class SquareCollider~
    -- Inside source: true
    -*** True Line Result
    -  class SquareCollider
    -** Processing line: ~    def initialize x,y,direction,size=COLLISIONWIDTH~
    +** Processing line: ~        audio_state = new_audio_state args, opts~
     - Inside source: true
     *** True Line Result
    -    def initialize x,y,direction,size=COLLISIONWIDTH
    -** Processing line: ~      @x = x~
    +        audio_state = new_audio_state args, opts
    +** Processing line: ~        audio_state[:input] = [1, sample_rate, proc]~
     - Inside source: true
     *** True Line Result
    -      @x = x
    -** Processing line: ~      @y = y~
    +        audio_state[:input] = [1, sample_rate, proc]
    +** Processing line: ~        queue_audio args, audio_state: audio_state, wave: saw_tooth_wave~
     - Inside source: true
     *** True Line Result
    -      @y = y
    -** Processing line: ~      @size = size~
    +        queue_audio args, audio_state: audio_state, wave: saw_tooth_wave
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -      @size = size
    -** Processing line: ~      @direction = direction~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      @direction = direction
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    end~
    +** Processing line: ~    begin # region: triangle wave~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~    def collision? args, ball~
    +    begin # region: triangle wave
    +** Processing line: ~      def defaults_triangle_wave_for~
     - Inside source: true
     *** True Line Result
    -    def collision? args, ball
    -** Processing line: ~      #args.outputs.solids <<  [@x, @y, @size, @size,     000, 255, 255]~
    +      def defaults_triangle_wave_for
    +** Processing line: ~        { frequency: 440, sample_rate: 48000 }~
     - Inside source: true
     *** True Line Result
    -      #args.outputs.solids <<  [@x, @y, @size, @size,     000, 255, 255]
    +        { frequency: 440, sample_rate: 48000 }
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~~
    +** Processing line: ~      def triangle_wave_for opts = {}~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      return [@x,@y,@size,@size].intersect_rect?([ball.x,ball.y,ball.width,ball.height])~
    +      def triangle_wave_for opts = {}
    +** Processing line: ~        opts = defaults_saw_tooth_wave_for.merge opts~
     - Inside source: true
     *** True Line Result
    -      return [@x,@y,@size,@size].intersect_rect?([ball.x,ball.y,ball.width,ball.height])
    -** Processing line: ~    end~
    +        opts = defaults_saw_tooth_wave_for.merge opts
    +** Processing line: ~        sine_wave = sine_wave_for opts~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +        sine_wave = sine_wave_for opts
    +** Processing line: ~        period_size = sine_wave.length~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def collide args, ball~
    +        period_size = sine_wave.length
    +** Processing line: ~        sine_wave.map_with_index do |v, i|~
     - Inside source: true
     *** True Line Result
    -    def collide args, ball
    -** Processing line: ~      vmag = (ball.velocity.x**2.0 +ball.velocity.y**2.0)**0.5~
    +        sine_wave.map_with_index do |v, i|
    +** Processing line: ~          ratio = (i.fdiv period_size)~
     - Inside source: true
     *** True Line Result
    -      vmag = (ball.velocity.x**2.0 +ball.velocity.y**2.0)**0.5
    -** Processing line: ~      a = ((2.0**0.5)*vmag)/2.0~
    +          ratio = (i.fdiv period_size)
    +** Processing line: ~          if ratio <= 0.5~
     - Inside source: true
     *** True Line Result
    -      a = ((2.0**0.5)*vmag)/2.0
    -** Processing line: ~      if vmag < MAX_VELOCITY~
    +          if ratio <= 0.5
    +** Processing line: ~            (ratio * 4) - 1~
     - Inside source: true
     *** True Line Result
    -      if vmag < MAX_VELOCITY
    -** Processing line: ~        ball.velocity.x = (a) * @direction.x * 1.1~
    +            (ratio * 4) - 1
    +** Processing line: ~          else~
     - Inside source: true
     *** True Line Result
    -        ball.velocity.x = (a) * @direction.x * 1.1
    -** Processing line: ~        ball.velocity.y = (a) * @direction.y * 1.1~
    +          else
    +** Processing line: ~            ratio -= 0.5~
     - Inside source: true
     *** True Line Result
    -        ball.velocity.y = (a) * @direction.y * 1.1
    -** Processing line: ~      else~
    +            ratio -= 0.5
    +** Processing line: ~            1 - (ratio * 4)~
     - Inside source: true
     *** True Line Result
    -      else
    -** Processing line: ~        ball.velocity.x = (a) * @direction.x~
    +            1 - (ratio * 4)
    +** Processing line: ~          end~
     - Inside source: true
     *** True Line Result
    -        ball.velocity.x = (a) * @direction.x
    -** Processing line: ~        ball.velocity.y = (a) * @direction.y~
    +          end
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -        ball.velocity.y = (a) * @direction.y
    +        end
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    @@ -37780,122 +46155,106 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    end~
    +** Processing line: ~      def defaults_queue_triangle_wave~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~  end~
    +      def defaults_queue_triangle_wave
    +** Processing line: ~        { frequency: 440, duration: 60, gain: 1.0, fade_out: false, queue_in: 0 }~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +        { frequency: 440, duration: 60, gain: 1.0, fade_out: false, queue_in: 0 }
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~#+end_src~
    -- Line was identified as the end of a code block.
    -*** True Line Result
    -#+end_src
    +      end
     ** Processing line: ~~
    -- End of paragraph detected.
    -*** True Line Result
    -
    -** Processing line: ~*** Physics And Collisions - Arbitrary Collision - vector2d.rb~
    -- Header detected.
    -*** True Line Result
    -
    -*** True Line Result
    -*** Physics And Collisions - Arbitrary Collision - vector2d.rb
    -** Processing line: ~#+begin_src ruby~
    -- Line was identified as the beginning of a code block.
    +- Inside source: true
     *** True Line Result
     
    +** Processing line: ~      def queue_triangle_wave args, opts = {}~
    +- Inside source: true
     *** True Line Result
    -#+begin_src ruby
    -** Processing line: ~  # ./samples/04_physics_and_collisions/09_arbitrary_collision/app/vector2d.rb~
    +      def queue_triangle_wave args, opts = {}
    +** Processing line: ~        opts        = defaults_queue_triangle_wave.merge opts~
     - Inside source: true
     *** True Line Result
    -  # ./samples/04_physics_and_collisions/09_arbitrary_collision/app/vector2d.rb
    -** Processing line: ~  class Vector2d~
    +        opts        = defaults_queue_triangle_wave.merge opts
    +** Processing line: ~        frequency   = opts[:frequency]~
     - Inside source: true
     *** True Line Result
    -  class Vector2d
    -** Processing line: ~      attr_accessor :x, :y~
    +        frequency   = opts[:frequency]
    +** Processing line: ~        sample_rate = 48000~
     - Inside source: true
     *** True Line Result
    -      attr_accessor :x, :y
    +        sample_rate = 48000
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      def initialize x=0, y=0~
    -- Inside source: true
    -*** True Line Result
    -      def initialize x=0, y=0
    -** Processing line: ~        @x=x~
    -- Inside source: true
    -*** True Line Result
    -        @x=x
    -** Processing line: ~        @y=y~
    +** Processing line: ~        triangle_wave = triangle_wave_for frequency: frequency, sample_rate: sample_rate~
     - Inside source: true
     *** True Line Result
    -        @y=y
    -** Processing line: ~      end~
    +        triangle_wave = triangle_wave_for frequency: frequency, sample_rate: sample_rate
    +** Processing line: ~        args.state.triangle_waves[frequency] ||= triangle_wave_for frequency: frequency, sample_rate: sample_rate~
     - Inside source: true
     *** True Line Result
    -      end
    +        args.state.triangle_waves[frequency] ||= triangle_wave_for frequency: frequency, sample_rate: sample_rate
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      #returns a vector multiplied by scalar x~
    +** Processing line: ~        proc = lambda do~
     - Inside source: true
     *** True Line Result
    -      #returns a vector multiplied by scalar x
    -** Processing line: ~      #x [float] scalar~
    +        proc = lambda do
    +** Processing line: ~          generate_audio_data args.state.triangle_waves[frequency], sample_rate~
     - Inside source: true
     *** True Line Result
    -      #x [float] scalar
    -** Processing line: ~      def mult x~
    +          generate_audio_data args.state.triangle_waves[frequency], sample_rate
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -      def mult x
    -** Processing line: ~        r = Vector2d.new(0,0)~
    +        end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        r = Vector2d.new(0,0)
    -** Processing line: ~        r.x=@x*x~
    +
    +** Processing line: ~        audio_state = new_audio_state args, opts~
     - Inside source: true
     *** True Line Result
    -        r.x=@x*x
    -** Processing line: ~        r.y=@y*x~
    +        audio_state = new_audio_state args, opts
    +** Processing line: ~        audio_state[:input] = [1, sample_rate, proc]~
     - Inside source: true
     *** True Line Result
    -        r.y=@y*x
    -** Processing line: ~        r~
    +        audio_state[:input] = [1, sample_rate, proc]
    +** Processing line: ~        queue_audio args, audio_state: audio_state, wave: triangle_wave~
     - Inside source: true
     *** True Line Result
    -        r
    +        queue_audio args, audio_state: audio_state, wave: triangle_wave
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
           end
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      # vect [Vector2d] vector to copy~
    +** Processing line: ~    begin # region: bell~
     - Inside source: true
     *** True Line Result
    -      # vect [Vector2d] vector to copy
    -** Processing line: ~      def copy vect~
    +    begin # region: bell
    +** Processing line: ~      def defaults_queue_bell~
     - Inside source: true
     *** True Line Result
    -      def copy vect
    -** Processing line: ~        Vector2d.new(@x, @y)~
    +      def defaults_queue_bell
    +** Processing line: ~        { frequency: 440, duration: 1.seconds, queue_in: 0 }~
     - Inside source: true
     *** True Line Result
    -        Vector2d.new(@x, @y)
    +        { frequency: 440, duration: 1.seconds, queue_in: 0 }
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    @@ -37904,22 +46263,14 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      #returns a new vector equivalent to this+vect~
    -- Inside source: true
    -*** True Line Result
    -      #returns a new vector equivalent to this+vect
    -** Processing line: ~      #vect [Vector2d] vector to add to self~
    -- Inside source: true
    -*** True Line Result
    -      #vect [Vector2d] vector to add to self
    -** Processing line: ~      def add vect~
    +** Processing line: ~      def queue_bell args, opts = {}~
     - Inside source: true
     *** True Line Result
    -      def add vect
    -** Processing line: ~        Vector2d.new(@x+vect.x,@y+vect.y)~
    +      def queue_bell args, opts = {}
    +** Processing line: ~        (bell_to_sine_waves (defaults_queue_bell.merge opts)).each { |b| queue_sine_wave args, b }~
     - Inside source: true
     *** True Line Result
    -        Vector2d.new(@x+vect.x,@y+vect.y)
    +        (bell_to_sine_waves (defaults_queue_bell.merge opts)).each { |b| queue_sine_wave args, b }
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    @@ -37928,42 +46279,46 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      #returns a new vector equivalent to this-vect~
    +** Processing line: ~      def bell_harmonics~
     - Inside source: true
     *** True Line Result
    -      #returns a new vector equivalent to this-vect
    -** Processing line: ~      #vect [Vector2d] vector to subtract to self~
    +      def bell_harmonics
    +** Processing line: ~        [~
     - Inside source: true
     *** True Line Result
    -      #vect [Vector2d] vector to subtract to self
    -** Processing line: ~      def sub vect~
    +        [
    +** Processing line: ~          { frequency_ratio: 0.5, duration_ratio: 1.00 },~
     - Inside source: true
     *** True Line Result
    -      def sub vect
    -** Processing line: ~        Vector2d.new(@x-vect.c, @y-vect.y)~
    +          { frequency_ratio: 0.5, duration_ratio: 1.00 },
    +** Processing line: ~          { frequency_ratio: 1.0, duration_ratio: 0.80 },~
     - Inside source: true
     *** True Line Result
    -        Vector2d.new(@x-vect.c, @y-vect.y)
    -** Processing line: ~      end~
    +          { frequency_ratio: 1.0, duration_ratio: 0.80 },
    +** Processing line: ~          { frequency_ratio: 2.0, duration_ratio: 0.60 },~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +          { frequency_ratio: 2.0, duration_ratio: 0.60 },
    +** Processing line: ~          { frequency_ratio: 3.0, duration_ratio: 0.40 },~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      #return the magnitude of the vector~
    +          { frequency_ratio: 3.0, duration_ratio: 0.40 },
    +** Processing line: ~          { frequency_ratio: 4.2, duration_ratio: 0.25 },~
     - Inside source: true
     *** True Line Result
    -      #return the magnitude of the vector
    -** Processing line: ~      def mag~
    +          { frequency_ratio: 4.2, duration_ratio: 0.25 },
    +** Processing line: ~          { frequency_ratio: 5.4, duration_ratio: 0.20 },~
     - Inside source: true
     *** True Line Result
    -      def mag
    -** Processing line: ~        ((@x**2)+(@y**2))**0.5~
    +          { frequency_ratio: 5.4, duration_ratio: 0.20 },
    +** Processing line: ~          { frequency_ratio: 6.8, duration_ratio: 0.15 }~
     - Inside source: true
     *** True Line Result
    -        ((@x**2)+(@y**2))**0.5
    +          { frequency_ratio: 6.8, duration_ratio: 0.15 }
    +** Processing line: ~        ]~
    +- Inside source: true
    +*** True Line Result
    +        ]
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    @@ -37972,18 +46327,14 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      #returns a new normalize version of the vector~
    -- Inside source: true
    -*** True Line Result
    -      #returns a new normalize version of the vector
    -** Processing line: ~      def normalize~
    +** Processing line: ~      def defaults_bell_to_sine_waves~
     - Inside source: true
     *** True Line Result
    -      def normalize
    -** Processing line: ~        Vector2d.new(@x/mag, @y/mag)~
    +      def defaults_bell_to_sine_waves
    +** Processing line: ~        { frequency: 440, duration: 1.seconds, queue_in: 0 }~
     - Inside source: true
     *** True Line Result
    -        Vector2d.new(@x/mag, @y/mag)
    +        { frequency: 440, duration: 1.seconds, queue_in: 0 }
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    @@ -37992,458 +46343,446 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      #TODO delet?~
    +** Processing line: ~      def bell_to_sine_waves opts = {}~
     - Inside source: true
     *** True Line Result
    -      #TODO delet?
    -** Processing line: ~      def distABS vect~
    +      def bell_to_sine_waves opts = {}
    +** Processing line: ~        opts = defaults_bell_to_sine_waves.merge opts~
     - Inside source: true
     *** True Line Result
    -      def distABS vect
    -** Processing line: ~        (((vect.x-@x)**2+(vect.y-@y)**2)**0.5).abs()~
    +        opts = defaults_bell_to_sine_waves.merge opts
    +** Processing line: ~        bell_harmonics.map do |b|~
     - Inside source: true
     *** True Line Result
    -        (((vect.x-@x)**2+(vect.y-@y)**2)**0.5).abs()
    -** Processing line: ~      end~
    +        bell_harmonics.map do |b|
    +** Processing line: ~          {~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +          {
    +** Processing line: ~            frequency: opts[:frequency] * b[:frequency_ratio],~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~#+end_src~
    -- Line was identified as the end of a code block.
    -*** True Line Result
    -#+end_src
    -** Processing line: ~~
    -- End of paragraph detected.
    -*** True Line Result
    -
    -** Processing line: ~*** Physics And Collisions - Collision With Object Removal - ball.rb~
    -- Header detected.
    +            frequency: opts[:frequency] * b[:frequency_ratio],
    +** Processing line: ~            duration:  opts[:duration] * b[:duration_ratio],~
    +- Inside source: true
     *** True Line Result
    -
    +            duration:  opts[:duration] * b[:duration_ratio],
    +** Processing line: ~            queue_in:  opts[:queue_in],~
    +- Inside source: true
     *** True Line Result
    -*** Physics And Collisions - Collision With Object Removal - ball.rb
    -** Processing line: ~#+begin_src ruby~
    -- Line was identified as the beginning of a code block.
    +            queue_in:  opts[:queue_in],
    +** Processing line: ~            gain:      (1.fdiv bell_harmonics.length),~
    +- Inside source: true
     *** True Line Result
    -
    +            gain:      (1.fdiv bell_harmonics.length),
    +** Processing line: ~            fade_out:  true~
    +- Inside source: true
     *** True Line Result
    -#+begin_src ruby
    -** Processing line: ~  # ./samples/04_physics_and_collisions/10_collision_with_object_removal/app/ball.rb~
    +            fade_out:  true
    +** Processing line: ~          }~
     - Inside source: true
     *** True Line Result
    -  # ./samples/04_physics_and_collisions/10_collision_with_object_removal/app/ball.rb
    -** Processing line: ~  class Ball~
    +          }
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -  class Ball
    -** Processing line: ~    #TODO limit accessors?~
    +        end
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    #TODO limit accessors?
    -** Processing line: ~    attr_accessor :xy, :width, :height, :velocity~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    attr_accessor :xy, :width, :height, :velocity
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~~
    +** Processing line: ~    begin # audio entity construction~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    #@xy [Vector2d] x,y position~
    +    begin # audio entity construction
    +** Processing line: ~      def generate_audio_data sine_wave, sample_rate~
     - Inside source: true
     *** True Line Result
    -    #@xy [Vector2d] x,y position
    -** Processing line: ~    #@velocity [Vector2d] velocity of ball~
    +      def generate_audio_data sine_wave, sample_rate
    +** Processing line: ~        sample_size = (sample_rate.fdiv (1000.fdiv 60)).ceil~
     - Inside source: true
     *** True Line Result
    -    #@velocity [Vector2d] velocity of ball
    -** Processing line: ~    def initialize~
    +        sample_size = (sample_rate.fdiv (1000.fdiv 60)).ceil
    +** Processing line: ~        copy_count  = (sample_size.fdiv sine_wave.length).ceil~
     - Inside source: true
     *** True Line Result
    -    def initialize
    -** Processing line: ~      @xy = Vector2d.new(WIDTH/2,500)~
    +        copy_count  = (sample_size.fdiv sine_wave.length).ceil
    +** Processing line: ~        sine_wave * copy_count~
     - Inside source: true
     *** True Line Result
    -      @xy = Vector2d.new(WIDTH/2,500)
    -** Processing line: ~      @velocity = Vector2d.new(4,-4)~
    +        sine_wave * copy_count
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -      @velocity = Vector2d.new(4,-4)
    -** Processing line: ~      @width =  20~
    +      end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      @width =  20
    -** Processing line: ~      @height = 20~
    +
    +** Processing line: ~      def defaults_new_audio_state~
     - Inside source: true
     *** True Line Result
    -      @height = 20
    -** Processing line: ~    end~
    +      def defaults_new_audio_state
    +** Processing line: ~        { frequency: 440, duration: 60, gain: 1.0, fade_out: false, queue_in: 0 }~
     - Inside source: true
     *** True Line Result
    -    end
    +        { frequency: 440, duration: 60, gain: 1.0, fade_out: false, queue_in: 0 }
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    #move the ball according to its velocity~
    +** Processing line: ~      def new_audio_state args, opts = {}~
     - Inside source: true
     *** True Line Result
    -    #move the ball according to its velocity
    -** Processing line: ~    def update args~
    +      def new_audio_state args, opts = {}
    +** Processing line: ~        opts        = defaults_new_audio_state.merge opts~
     - Inside source: true
     *** True Line Result
    -    def update args
    -** Processing line: ~      @xy.x+=@velocity.x~
    +        opts        = defaults_new_audio_state.merge opts
    +** Processing line: ~        decay_rate  = 0~
     - Inside source: true
     *** True Line Result
    -      @xy.x+=@velocity.x
    -** Processing line: ~      @xy.y+=@velocity.y~
    +        decay_rate  = 0
    +** Processing line: ~        decay_rate  = 1.fdiv(opts[:duration]) * opts[:gain] if opts[:fade_out]~
     - Inside source: true
     *** True Line Result
    -      @xy.y+=@velocity.y
    -** Processing line: ~    end~
    +        decay_rate  = 1.fdiv(opts[:duration]) * opts[:gain] if opts[:fade_out]
    +** Processing line: ~        frequency   = opts[:frequency]~
     - Inside source: true
     *** True Line Result
    -    end
    +        frequency   = opts[:frequency]
    +** Processing line: ~        sample_rate = 48000~
    +- Inside source: true
    +*** True Line Result
    +        sample_rate = 48000
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    #render the ball to the screen~
    +** Processing line: ~        {~
     - Inside source: true
     *** True Line Result
    -    #render the ball to the screen
    -** Processing line: ~    def render args~
    +        {
    +** Processing line: ~          id:               (new_id! args),~
     - Inside source: true
     *** True Line Result
    -    def render args
    -** Processing line: ~      args.outputs.solids << [@xy.x,@xy.y,@width,@height,255,0,255];~
    +          id:               (new_id! args),
    +** Processing line: ~          frequency:        frequency,~
     - Inside source: true
     *** True Line Result
    -      args.outputs.solids << [@xy.x,@xy.y,@width,@height,255,0,255];
    -** Processing line: ~      #args.outputs.labels << [20,HEIGHT-50,"velocity: " +@velocity.x.to_s+","+@velocity.y.to_s + "   magnitude:" + @velocity.mag.to_s]~
    +          frequency:        frequency,
    +** Processing line: ~          sample_rate:      48000,~
     - Inside source: true
     *** True Line Result
    -      #args.outputs.labels << [20,HEIGHT-50,"velocity: " +@velocity.x.to_s+","+@velocity.y.to_s + "   magnitude:" + @velocity.mag.to_s]
    -** Processing line: ~    end~
    +          sample_rate:      48000,
    +** Processing line: ~          stop_at:          args.tick_count + opts[:queue_in] + opts[:duration],~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +          stop_at:          args.tick_count + opts[:queue_in] + opts[:duration],
    +** Processing line: ~          gain:             opts[:gain].to_f,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def rect~
    +          gain:             opts[:gain].to_f,
    +** Processing line: ~          queue_at:         args.state.tick_count + opts[:queue_in],~
     - Inside source: true
     *** True Line Result
    -    def rect
    -** Processing line: ~      [@xy.x,@xy.y,@width,@height]~
    +          queue_at:         args.state.tick_count + opts[:queue_in],
    +** Processing line: ~          decay_rate:       decay_rate,~
     - Inside source: true
     *** True Line Result
    -      [@xy.x,@xy.y,@width,@height]
    -** Processing line: ~    end~
    +          decay_rate:       decay_rate,
    +** Processing line: ~          pitch:            1.0,~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +          pitch:            1.0,
    +** Processing line: ~          looping:          true,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  end~
    +          looping:          true,
    +** Processing line: ~          paused:           false~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +          paused:           false
    +** Processing line: ~        }~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~#+end_src~
    -- Line was identified as the end of a code block.
    +        }
    +** Processing line: ~      end~
    +- Inside source: true
     *** True Line Result
    -#+end_src
    +      end
     ** Processing line: ~~
    -- End of paragraph detected.
    -*** True Line Result
    -
    -** Processing line: ~*** Physics And Collisions - Collision With Object Removal - linear_collider.rb~
    -- Header detected.
    +- Inside source: true
     *** True Line Result
     
    +** Processing line: ~      def queue_audio args, opts = {}~
    +- Inside source: true
     *** True Line Result
    -*** Physics And Collisions - Collision With Object Removal - linear_collider.rb
    -** Processing line: ~#+begin_src ruby~
    -- Line was identified as the beginning of a code block.
    -*** True Line Result
    -
    +      def queue_audio args, opts = {}
    +** Processing line: ~        graph_wave args, opts[:wave], opts[:audio_state][:frequency]~
    +- Inside source: true
     *** True Line Result
    -#+begin_src ruby
    -** Processing line: ~  # ./samples/04_physics_and_collisions/10_collision_with_object_removal/app/linear_collider.rb~
    +        graph_wave args, opts[:wave], opts[:audio_state][:frequency]
    +** Processing line: ~        args.state.audio_queue << opts[:audio_state]~
     - Inside source: true
     *** True Line Result
    -  # ./samples/04_physics_and_collisions/10_collision_with_object_removal/app/linear_collider.rb
    -** Processing line: ~  #The LinearCollider (theoretically) produces collisions upon a line segment defined point.y two x,y cordinates~
    +        args.state.audio_queue << opts[:audio_state]
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -  #The LinearCollider (theoretically) produces collisions upon a line segment defined point.y two x,y cordinates
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  class LinearCollider~
    +** Processing line: ~      def new_id! args~
     - Inside source: true
     *** True Line Result
    -  class LinearCollider
    -** Processing line: ~~
    +      def new_id! args
    +** Processing line: ~        args.state.audio_id ||= 0~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    #start [Array of length 2] start of the line segment as a x,y cordinate~
    +        args.state.audio_id ||= 0
    +** Processing line: ~        args.state.audio_id  += 1~
     - Inside source: true
     *** True Line Result
    -    #start [Array of length 2] start of the line segment as a x,y cordinate
    -** Processing line: ~    #last [Array of length 2] end of the line segment as a x,y cordinate~
    +        args.state.audio_id  += 1
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    #last [Array of length 2] end of the line segment as a x,y cordinate
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    #inorder for the LinearCollider to be functional the line segment must be said to have a thickness~
    -- Inside source: true
    -*** True Line Result
    -    #inorder for the LinearCollider to be functional the line segment must be said to have a thickness
    -** Processing line: ~    #(as it is unlikly that a colliding object will land exactly on the linesegment)~
    +** Processing line: ~      def graph_wave args, wave, frequency~
     - Inside source: true
     *** True Line Result
    -    #(as it is unlikly that a colliding object will land exactly on the linesegment)
    -** Processing line: ~~
    +      def graph_wave args, wave, frequency
    +** Processing line: ~        if args.state.tick_count != args.state.graphed_at~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    #extension defines if the line's thickness extends negatively or positively~
    +        if args.state.tick_count != args.state.graphed_at
    +** Processing line: ~          args.outputs.static_lines.clear~
     - Inside source: true
     *** True Line Result
    -    #extension defines if the line's thickness extends negatively or positively
    -** Processing line: ~    #extension :pos     extends positively~
    +          args.outputs.static_lines.clear
    +** Processing line: ~          args.outputs.static_sprites.clear~
     - Inside source: true
     *** True Line Result
    -    #extension :pos     extends positively
    -** Processing line: ~    #extension :neg     extends negatively~
    +          args.outputs.static_sprites.clear
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -    #extension :neg     extends negatively
    +        end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    #thickness [float] how thick the line should be (should always be atleast as large as the magnitude of the colliding object)~
    -- Inside source: true
    -*** True Line Result
    -    #thickness [float] how thick the line should be (should always be atleast as large as the magnitude of the colliding object)
    -** Processing line: ~    def initialize (pointA, pointB, extension=:neg, thickness=10)~
    +** Processing line: ~        wave = wave~
     - Inside source: true
     *** True Line Result
    -    def initialize (pointA, pointB, extension=:neg, thickness=10)
    -** Processing line: ~      @pointA = pointA~
    +        wave = wave
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      @pointA = pointA
    -** Processing line: ~      @pointB = pointB~
    +
    +** Processing line: ~        r, g, b = frequency.to_i % 85,~
     - Inside source: true
     *** True Line Result
    -      @pointB = pointB
    -** Processing line: ~      @thickness = thickness~
    +        r, g, b = frequency.to_i % 85,
    +** Processing line: ~                  frequency.to_i % 170,~
     - Inside source: true
     *** True Line Result
    -      @thickness = thickness
    -** Processing line: ~      @extension = extension~
    +                  frequency.to_i % 170,
    +** Processing line: ~                  frequency.to_i % 255~
     - Inside source: true
     *** True Line Result
    -      @extension = extension
    +                  frequency.to_i % 255
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      @pointAExtended={~
    +** Processing line: ~        starting_rect = args.layout.rect(row: 5, col: 13)~
     - Inside source: true
     *** True Line Result
    -      @pointAExtended={
    -** Processing line: ~        x: @pointA.x + @thickness*(@extension == :neg ? -1 : 1),~
    +        starting_rect = args.layout.rect(row: 5, col: 13)
    +** Processing line: ~        x_scale    = 10~
     - Inside source: true
     *** True Line Result
    -        x: @pointA.x + @thickness*(@extension == :neg ? -1 : 1),
    -** Processing line: ~        y: @pointA.y + @thickness*(@extension == :neg ? -1 : 1)~
    +        x_scale    = 10
    +** Processing line: ~        y_scale    = 100~
     - Inside source: true
     *** True Line Result
    -        y: @pointA.y + @thickness*(@extension == :neg ? -1 : 1)
    -** Processing line: ~      }~
    +        y_scale    = 100
    +** Processing line: ~        max_points = 25~
     - Inside source: true
     *** True Line Result
    -      }
    -** Processing line: ~      @pointBExtended={~
    +        max_points = 25
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      @pointBExtended={
    -** Processing line: ~        x: @pointB.x + @thickness*(@extension == :neg ? -1 : 1),~
    +
    +** Processing line: ~        points = wave~
     - Inside source: true
     *** True Line Result
    -        x: @pointB.x + @thickness*(@extension == :neg ? -1 : 1),
    -** Processing line: ~        y: @pointB.y + @thickness*(@extension == :neg ? -1 : 1)~
    +        points = wave
    +** Processing line: ~        if wave.length > max_points~
     - Inside source: true
     *** True Line Result
    -        y: @pointB.y + @thickness*(@extension == :neg ? -1 : 1)
    -** Processing line: ~      }~
    +        if wave.length > max_points
    +** Processing line: ~          resolution = wave.length.idiv max_points~
     - Inside source: true
     *** True Line Result
    -      }
    -** Processing line: ~~
    +          resolution = wave.length.idiv max_points
    +** Processing line: ~          points = wave.find_all.with_index { |y, i| (i % resolution == 0) }~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    end~
    +          points = wave.find_all.with_index { |y, i| (i % resolution == 0) }
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -    end
    +        end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def resetPoints(pointA,pointB)~
    -- Inside source: true
    -*** True Line Result
    -    def resetPoints(pointA,pointB)
    -** Processing line: ~      @pointA = pointA~
    +** Processing line: ~        args.outputs.static_lines << points.map_with_index do |y, x|~
     - Inside source: true
     *** True Line Result
    -      @pointA = pointA
    -** Processing line: ~      @pointB = pointB~
    +        args.outputs.static_lines << points.map_with_index do |y, x|
    +** Processing line: ~          next_y = points[x + 1]~
     - Inside source: true
     *** True Line Result
    -      @pointB = pointB
    +          next_y = points[x + 1]
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      @pointAExtended={~
    +** Processing line: ~          if next_y~
     - Inside source: true
     *** True Line Result
    -      @pointAExtended={
    -** Processing line: ~        x:@pointA.x + @thickness*(@extension == :neg ? -1 : 1),~
    +          if next_y
    +** Processing line: ~            {~
     - Inside source: true
     *** True Line Result
    -        x:@pointA.x + @thickness*(@extension == :neg ? -1 : 1),
    -** Processing line: ~        y:@pointA.y + @thickness*(@extension == :neg ? -1 : 1)~
    +            {
    +** Processing line: ~              x:  starting_rect.x + (x * x_scale),~
     - Inside source: true
     *** True Line Result
    -        y:@pointA.y + @thickness*(@extension == :neg ? -1 : 1)
    -** Processing line: ~      }~
    +              x:  starting_rect.x + (x * x_scale),
    +** Processing line: ~              y:  starting_rect.y + starting_rect.h.half + y_scale * y,~
     - Inside source: true
     *** True Line Result
    -      }
    -** Processing line: ~      @pointBExtended={~
    +              y:  starting_rect.y + starting_rect.h.half + y_scale * y,
    +** Processing line: ~              x2: starting_rect.x + ((x + 1) * x_scale),~
     - Inside source: true
     *** True Line Result
    -      @pointBExtended={
    -** Processing line: ~        x:@pointB.x + @thickness*(@extension == :neg ? -1 : 1),~
    +              x2: starting_rect.x + ((x + 1) * x_scale),
    +** Processing line: ~              y2: starting_rect.y + starting_rect.h.half + y_scale * next_y,~
     - Inside source: true
     *** True Line Result
    -        x:@pointB.x + @thickness*(@extension == :neg ? -1 : 1),
    -** Processing line: ~        y:@pointB.y + @thickness*(@extension == :neg ? -1 : 1)~
    +              y2: starting_rect.y + starting_rect.h.half + y_scale * next_y,
    +** Processing line: ~              r:  r,~
     - Inside source: true
     *** True Line Result
    -        y:@pointB.y + @thickness*(@extension == :neg ? -1 : 1)
    -** Processing line: ~      }~
    +              r:  r,
    +** Processing line: ~              g:  g,~
     - Inside source: true
     *** True Line Result
    -      }
    -** Processing line: ~    end~
    +              g:  g,
    +** Processing line: ~              b:  b~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +              b:  b
    +** Processing line: ~            }~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    #TODO: Ugly function~
    +            }
    +** Processing line: ~          end~
     - Inside source: true
     *** True Line Result
    -    #TODO: Ugly function
    -** Processing line: ~    def slope (pointA, pointB)~
    +          end
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -    def slope (pointA, pointB)
    -** Processing line: ~      return (pointB.x==pointA.x) ? INFINITY : (pointB.y+-pointA.y)/(pointB.x+-pointA.x)~
    +        end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      return (pointB.x==pointA.x) ? INFINITY : (pointB.y+-pointA.y)/(pointB.x+-pointA.x)
    -** Processing line: ~    end~
    +
    +** Processing line: ~        args.outputs.static_sprites << points.map_with_index do |y, x|~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +        args.outputs.static_sprites << points.map_with_index do |y, x|
    +** Processing line: ~          {~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    #TODO: Ugly function~
    +          {
    +** Processing line: ~            x:  (starting_rect.x + (x * x_scale)) - 2,~
     - Inside source: true
     *** True Line Result
    -    #TODO: Ugly function
    -** Processing line: ~    def intercept(pointA, pointB)~
    +            x:  (starting_rect.x + (x * x_scale)) - 2,
    +** Processing line: ~            y:  (starting_rect.y + starting_rect.h.half + y_scale * y) - 2,~
     - Inside source: true
     *** True Line Result
    -    def intercept(pointA, pointB)
    -** Processing line: ~      if (slope(pointA, pointB) == INFINITY)~
    +            y:  (starting_rect.y + starting_rect.h.half + y_scale * y) - 2,
    +** Processing line: ~            w:  4,~
     - Inside source: true
     *** True Line Result
    -      if (slope(pointA, pointB) == INFINITY)
    -** Processing line: ~        -INFINITY~
    +            w:  4,
    +** Processing line: ~            h:  4,~
     - Inside source: true
     *** True Line Result
    -        -INFINITY
    -** Processing line: ~      elsif slope(pointA, pointB) == -1*INFINITY~
    +            h:  4,
    +** Processing line: ~            path: 'sprites/square-white.png',~
     - Inside source: true
     *** True Line Result
    -      elsif slope(pointA, pointB) == -1*INFINITY
    -** Processing line: ~        INFINITY~
    +            path: 'sprites/square-white.png',
    +** Processing line: ~            r: r,~
     - Inside source: true
     *** True Line Result
    -        INFINITY
    -** Processing line: ~      else~
    +            r: r,
    +** Processing line: ~            g: g,~
     - Inside source: true
     *** True Line Result
    -      else
    -** Processing line: ~        pointA.y+-1.0*(slope(pointA, pointB)*pointA.x)~
    +            g: g,
    +** Processing line: ~            b: b~
     - Inside source: true
     *** True Line Result
    -        pointA.y+-1.0*(slope(pointA, pointB)*pointA.x)
    -** Processing line: ~      end~
    +            b: b
    +** Processing line: ~          }~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +          }
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -    end
    +        end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def calcY(pointA, pointB, x)~
    +** Processing line: ~        args.state.graphed_at = args.state.tick_count~
     - Inside source: true
     *** True Line Result
    -    def calcY(pointA, pointB, x)
    -** Processing line: ~      return slope(pointA, pointB)*x + intercept(pointA, pointB)~
    +        args.state.graphed_at = args.state.tick_count
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -      return slope(pointA, pointB)*x + intercept(pointA, pointB)
    +      end
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -38452,38 +46791,18 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    #test if a collision has occurred~
    -- Inside source: true
    -*** True Line Result
    -    #test if a collision has occurred
    -** Processing line: ~    def isCollision? (point)~
    -- Inside source: true
    -*** True Line Result
    -    def isCollision? (point)
    -** Processing line: ~      #INFINITY slop breaks down when trying to determin collision, ergo it requires a special test~
    -- Inside source: true
    -*** True Line Result
    -      #INFINITY slop breaks down when trying to determin collision, ergo it requires a special test
    -** Processing line: ~      if slope(@pointA, @pointB) ==  INFINITY &&~
    -- Inside source: true
    -*** True Line Result
    -      if slope(@pointA, @pointB) ==  INFINITY &&
    -** Processing line: ~        point.x >= [@pointA.x,@pointB.x].min+(@extension == :pos ? -@thickness : 0) &&~
    -- Inside source: true
    -*** True Line Result
    -        point.x >= [@pointA.x,@pointB.x].min+(@extension == :pos ? -@thickness : 0) &&
    -** Processing line: ~        point.x <= [@pointA.x,@pointB.x].max+(@extension == :neg ?  @thickness : 0) &&~
    +** Processing line: ~    begin # region: musical note mapping~
     - Inside source: true
     *** True Line Result
    -        point.x <= [@pointA.x,@pointB.x].max+(@extension == :neg ?  @thickness : 0) &&
    -** Processing line: ~        point.y >= [@pointA.y,@pointB.y].min && point.y <= [@pointA.y,@pointB.y].max~
    +    begin # region: musical note mapping
    +** Processing line: ~      def defaults_frequency_for~
     - Inside source: true
     *** True Line Result
    -        point.y >= [@pointA.y,@pointB.y].min && point.y <= [@pointA.y,@pointB.y].max
    -** Processing line: ~          return true~
    +      def defaults_frequency_for
    +** Processing line: ~        { note: :a, octave: 5, sharp:  false, flat:   false }~
     - Inside source: true
     *** True Line Result
    -          return true
    +        { note: :a, octave: 5, sharp:  false, flat:   false }
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    @@ -38492,366 +46811,370 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      isNegInLine   = @extension == :neg &&~
    -- Inside source: true
    -*** True Line Result
    -      isNegInLine   = @extension == :neg &&
    -** Processing line: ~                      point.y <= slope(@pointA, @pointB)*point.x+intercept(@pointA,@pointB) &&~
    +** Processing line: ~      def frequency_for opts = {}~
     - Inside source: true
     *** True Line Result
    -                      point.y <= slope(@pointA, @pointB)*point.x+intercept(@pointA,@pointB) &&
    -** Processing line: ~                      point.y >= point.x*slope(@pointAExtended, @pointBExtended)+intercept(@pointAExtended,@pointBExtended)~
    +      def frequency_for opts = {}
    +** Processing line: ~        opts = defaults_frequency_for.merge opts~
     - Inside source: true
     *** True Line Result
    -                      point.y >= point.x*slope(@pointAExtended, @pointBExtended)+intercept(@pointAExtended,@pointBExtended)
    -** Processing line: ~      isPosInLine   = @extension == :pos &&~
    +        opts = defaults_frequency_for.merge opts
    +** Processing line: ~        octave_offset_multiplier  = opts[:octave] - 5~
     - Inside source: true
     *** True Line Result
    -      isPosInLine   = @extension == :pos &&
    -** Processing line: ~                      point.y >= slope(@pointA, @pointB)*point.x+intercept(@pointA,@pointB) &&~
    +        octave_offset_multiplier  = opts[:octave] - 5
    +** Processing line: ~        note = note_frequencies_octave_5[opts[:note]]~
     - Inside source: true
     *** True Line Result
    -                      point.y >= slope(@pointA, @pointB)*point.x+intercept(@pointA,@pointB) &&
    -** Processing line: ~                      point.y <= point.x*slope(@pointAExtended, @pointBExtended)+intercept(@pointAExtended,@pointBExtended)~
    +        note = note_frequencies_octave_5[opts[:note]]
    +** Processing line: ~        if octave_offset_multiplier < 0~
     - Inside source: true
     *** True Line Result
    -                      point.y <= point.x*slope(@pointAExtended, @pointBExtended)+intercept(@pointAExtended,@pointBExtended)
    -** Processing line: ~      isInBoxBounds = point.x >= [@pointA.x,@pointB.x].min &&~
    +        if octave_offset_multiplier < 0
    +** Processing line: ~          note = note * 1 / (octave_offset_multiplier.abs + 1)~
     - Inside source: true
     *** True Line Result
    -      isInBoxBounds = point.x >= [@pointA.x,@pointB.x].min &&
    -** Processing line: ~                      point.x <= [@pointA.x,@pointB.x].max &&~
    +          note = note * 1 / (octave_offset_multiplier.abs + 1)
    +** Processing line: ~        elsif octave_offset_multiplier > 0~
     - Inside source: true
     *** True Line Result
    -                      point.x <= [@pointA.x,@pointB.x].max &&
    -** Processing line: ~                      point.y >= [@pointA.y,@pointB.y].min+(@extension == :neg ? -@thickness : 0) &&~
    +        elsif octave_offset_multiplier > 0
    +** Processing line: ~          note = note * (octave_offset_multiplier.abs + 1) / 1~
     - Inside source: true
     *** True Line Result
    -                      point.y >= [@pointA.y,@pointB.y].min+(@extension == :neg ? -@thickness : 0) &&
    -** Processing line: ~                      point.y <= [@pointA.y,@pointB.y].max+(@extension == :pos ? @thickness : 0)~
    +          note = note * (octave_offset_multiplier.abs + 1) / 1
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -                      point.y <= [@pointA.y,@pointB.y].max+(@extension == :pos ? @thickness : 0)
    -** Processing line: ~~
    +        end
    +** Processing line: ~        note~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      return isInBoxBounds && (isNegInLine || isPosInLine)~
    +        note
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -      return isInBoxBounds && (isNegInLine || isPosInLine)
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    end~
    +** Processing line: ~      def note_frequencies_octave_5~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +      def note_frequencies_octave_5
    +** Processing line: ~        {~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def getRepelMagnitude (fbx, fby, vrx, vry, args)~
    +        {
    +** Processing line: ~          a: 440.0,~
     - Inside source: true
     *** True Line Result
    -    def getRepelMagnitude (fbx, fby, vrx, vry, args)
    -** Processing line: ~      a = fbx ; b = vrx ; c = fby~
    +          a: 440.0,
    +** Processing line: ~          a_sharp: 466.16, b_flat: 466.16,~
     - Inside source: true
     *** True Line Result
    -      a = fbx ; b = vrx ; c = fby
    -** Processing line: ~      d = vry ; e = args.state.ball.velocity.mag~
    +          a_sharp: 466.16, b_flat: 466.16,
    +** Processing line: ~          b: 493.88,~
     - Inside source: true
     *** True Line Result
    -      d = vry ; e = args.state.ball.velocity.mag
    -** Processing line: ~~
    +          b: 493.88,
    +** Processing line: ~          c: 523.25,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      if b**2 + d**2 == 0~
    +          c: 523.25,
    +** Processing line: ~          c_sharp: 554.37, d_flat: 587.33,~
     - Inside source: true
     *** True Line Result
    -      if b**2 + d**2 == 0
    -** Processing line: ~        puts "magnitude error"~
    +          c_sharp: 554.37, d_flat: 587.33,
    +** Processing line: ~          d: 587.33,~
     - Inside source: true
     *** True Line Result
    -        puts "magnitude error"
    -** Processing line: ~      end~
    +          d: 587.33,
    +** Processing line: ~          d_sharp: 622.25, e_flat: 659.25,~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +          d_sharp: 622.25, e_flat: 659.25,
    +** Processing line: ~          e: 659.25,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      x1 = (-a*b+-c*d + (e**2 * b**2 - b**2 * c**2 + 2*a*b*c*d + e**2 + d**2 - a**2 * d**2)**0.5)/(b**2 + d**2)~
    +          e: 659.25,
    +** Processing line: ~          f: 698.25,~
     - Inside source: true
     *** True Line Result
    -      x1 = (-a*b+-c*d + (e**2 * b**2 - b**2 * c**2 + 2*a*b*c*d + e**2 + d**2 - a**2 * d**2)**0.5)/(b**2 + d**2)
    -** Processing line: ~      x2 = -((a*b + c*d + (e**2 * b**2 - b**2 * c**2 + 2*a*b*c*d + e**2 * d**2 - a**2 * d**2)**0.5)/(b**2 + d**2))~
    +          f: 698.25,
    +** Processing line: ~          f_sharp: 739.99, g_flat: 739.99,~
     - Inside source: true
     *** True Line Result
    -      x2 = -((a*b + c*d + (e**2 * b**2 - b**2 * c**2 + 2*a*b*c*d + e**2 * d**2 - a**2 * d**2)**0.5)/(b**2 + d**2))
    -** Processing line: ~      return ((a+x1*b)**2 + (c+x1*d)**2 == e**2) ? x1 : x2~
    +          f_sharp: 739.99, g_flat: 739.99,
    +** Processing line: ~          g: 783.99,~
     - Inside source: true
     *** True Line Result
    -      return ((a+x1*b)**2 + (c+x1*d)**2 == e**2) ? x1 : x2
    -** Processing line: ~    end~
    +          g: 783.99,
    +** Processing line: ~          g_sharp: 830.61, a_flat: 830.61~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +          g_sharp: 830.61, a_flat: 830.61
    +** Processing line: ~        }~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def update args~
    +        }
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    def update args
    -** Processing line: ~      #each of the four points on the square ball - NOTE simple to extend to a circle~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      #each of the four points on the square ball - NOTE simple to extend to a circle
    -** Processing line: ~      points= [ {x: args.state.ball.xy.x,                          y: args.state.ball.xy.y},~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -      points= [ {x: args.state.ball.xy.x,                          y: args.state.ball.xy.y},
    -** Processing line: ~                {x: args.state.ball.xy.x+args.state.ball.width,    y: args.state.ball.xy.y},~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -                {x: args.state.ball.xy.x+args.state.ball.width,    y: args.state.ball.xy.y},
    -** Processing line: ~                {x: args.state.ball.xy.x,                          y: args.state.ball.xy.y+args.state.ball.height},~
    +
    +** Processing line: ~  $gtk.reset~
     - Inside source: true
     *** True Line Result
    -                {x: args.state.ball.xy.x,                          y: args.state.ball.xy.y+args.state.ball.height},
    -** Processing line: ~                {x: args.state.ball.xy.x+args.state.ball.width,    y: args.state.ball.xy.y + args.state.ball.height}~
    +  $gtk.reset
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -                {x: args.state.ball.xy.x+args.state.ball.width,    y: args.state.ball.xy.y + args.state.ball.height}
    -** Processing line: ~              ]~
    -- Inside source: true
    +
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
     *** True Line Result
    -              ]
    +#+end_src
     ** Processing line: ~~
    -- Inside source: true
    +- End of paragraph detected.
     *** True Line Result
     
    -** Processing line: ~      #for each point p in points~
    -- Inside source: true
    +** Processing line: ~*** Advanced Rendering - Simple Render Targets - main.rb~
    +- Header detected.
     *** True Line Result
    -      #for each point p in points
    -** Processing line: ~      for point in points~
    -- Inside source: true
    +
     *** True Line Result
    -      for point in points
    -** Processing line: ~        #isCollision.md has more information on this section~
    +*** Advanced Rendering - Simple Render Targets - main.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/07_advanced_rendering/01_simple_render_targets/app/main.rb~
     - Inside source: true
     *** True Line Result
    -        #isCollision.md has more information on this section
    -** Processing line: ~        #TODO: section can certainly be simplifyed~
    +  # ./samples/07_advanced_rendering/01_simple_render_targets/app/main.rb
    +** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
    -        #TODO: section can certainly be simplifyed
    -** Processing line: ~        if isCollision?(point)~
    +  def tick args
    +** Processing line: ~    # args.outputs.render_targets are really really powerful.~
     - Inside source: true
     *** True Line Result
    -        if isCollision?(point)
    -** Processing line: ~          u = Vector2d.new(1.0,((slope(@pointA, @pointB)==0) ? INFINITY : -1/slope(@pointA, @pointB))*1.0).normalize #normal perpendicular (to line segment) vector~
    +    # args.outputs.render_targets are really really powerful.
    +** Processing line: ~    # They essentially allow you to create a sprite programmatically and cache the result.~
     - Inside source: true
     *** True Line Result
    -          u = Vector2d.new(1.0,((slope(@pointA, @pointB)==0) ? INFINITY : -1/slope(@pointA, @pointB))*1.0).normalize #normal perpendicular (to line segment) vector
    +    # They essentially allow you to create a sprite programmatically and cache the result.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~          #the vector with the repeling force can be u or -u depending of where the ball was coming from in relation to the line segment~
    +** Processing line: ~    # Create a render_target of a :block and a :gradient on tick zero.~
     - Inside source: true
     *** True Line Result
    -          #the vector with the repeling force can be u or -u depending of where the ball was coming from in relation to the line segment
    -** Processing line: ~          previousBallPosition=Vector2d.new(point.x-args.state.ball.velocity.x,point.y-args.state.ball.velocity.y)~
    +    # Create a render_target of a :block and a :gradient on tick zero.
    +** Processing line: ~    if args.state.tick_count == 0~
     - Inside source: true
     *** True Line Result
    -          previousBallPosition=Vector2d.new(point.x-args.state.ball.velocity.x,point.y-args.state.ball.velocity.y)
    -** Processing line: ~          choiceA = (u.mult(1))~
    +    if args.state.tick_count == 0
    +** Processing line: ~      args.render_target(:block).solids << [0, 0, 1280, 100]~
     - Inside source: true
     *** True Line Result
    -          choiceA = (u.mult(1))
    -** Processing line: ~          choiceB =  (u.mult(-1))~
    +      args.render_target(:block).solids << [0, 0, 1280, 100]
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          choiceB =  (u.mult(-1))
    -** Processing line: ~          vectorRepel = nil~
    +
    +** Processing line: ~      # The gradient is actually just a collection of black solids with increasing~
     - Inside source: true
     *** True Line Result
    -          vectorRepel = nil
    -** Processing line: ~~
    +      # The gradient is actually just a collection of black solids with increasing
    +** Processing line: ~      # opacities.~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~          if (slope(@pointA, @pointB))!=INFINITY && u.y < 0~
    +      # opacities.
    +** Processing line: ~      args.render_target(:gradient).solids << 90.map_with_index do |x|~
     - Inside source: true
     *** True Line Result
    -          if (slope(@pointA, @pointB))!=INFINITY && u.y < 0
    -** Processing line: ~            choiceA, choiceB = choiceB, choiceA~
    +      args.render_target(:gradient).solids << 90.map_with_index do |x|
    +** Processing line: ~        50.map_with_index do |y|~
     - Inside source: true
     *** True Line Result
    -            choiceA, choiceB = choiceB, choiceA
    -** Processing line: ~          end~
    +        50.map_with_index do |y|
    +** Processing line: ~          [x * 15, y * 15, 15, 15, 0, 0, 0, (x * 3).fdiv(255) * 255]~
     - Inside source: true
     *** True Line Result
    -          end
    -** Processing line: ~          vectorRepel = (previousBallPosition.y > calcY(@pointA, @pointB, previousBallPosition.x)) ? choiceA : choiceB~
    +          [x * 15, y * 15, 15, 15, 0, 0, 0, (x * 3).fdiv(255) * 255]
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -          vectorRepel = (previousBallPosition.y > calcY(@pointA, @pointB, previousBallPosition.x)) ? choiceA : choiceB
    -** Processing line: ~~
    +        end
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~          #vectorRepel = (previousBallPosition.y > slope(@pointA, @pointB)*previousBallPosition.x+intercept(@pointA,@pointB)) ? choiceA : choiceB)~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -          #vectorRepel = (previousBallPosition.y > slope(@pointA, @pointB)*previousBallPosition.x+intercept(@pointA,@pointB)) ? choiceA : choiceB)
    -** Processing line: ~          if (slope(@pointA, @pointB) == INFINITY) #slope INFINITY breaks down in the above test, ergo it requires a custom test~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          if (slope(@pointA, @pointB) == INFINITY) #slope INFINITY breaks down in the above test, ergo it requires a custom test
    -** Processing line: ~            vectorRepel = (previousBallPosition.x > @pointA.x) ? (u.mult(1)) : (u.mult(-1))~
    +
    +** Processing line: ~    # Take the :block render_target and present it horizontally centered.~
     - Inside source: true
     *** True Line Result
    -            vectorRepel = (previousBallPosition.x > @pointA.x) ? (u.mult(1)) : (u.mult(-1))
    -** Processing line: ~          end~
    +    # Take the :block render_target and present it horizontally centered.
    +** Processing line: ~    # Use a subsection of the render_targetd specified by source_x,~
     - Inside source: true
     *** True Line Result
    -          end
    -** Processing line: ~          #puts ("     " + $t[0].to_s + "," + $t[1].to_s + "    " + $t[2].to_s + "," + $t[3].to_s + "     " + "   " + u.x.to_s + "," + u.y.to_s)~
    +    # Use a subsection of the render_targetd specified by source_x,
    +** Processing line: ~    # source_y, source_w, source_h.~
     - Inside source: true
     *** True Line Result
    -          #puts ("     " + $t[0].to_s + "," + $t[1].to_s + "    " + $t[2].to_s + "," + $t[3].to_s + "     " + "   " + u.x.to_s + "," + u.y.to_s)
    -** Processing line: ~          #vectorRepel now has the repeling force~
    +    # source_y, source_w, source_h.
    +** Processing line: ~    args.outputs.sprites << { x: 0,~
     - Inside source: true
     *** True Line Result
    -          #vectorRepel now has the repeling force
    -** Processing line: ~~
    +    args.outputs.sprites << { x: 0,
    +** Processing line: ~                              y: 310,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~          mag = args.state.ball.velocity.mag~
    +                              y: 310,
    +** Processing line: ~                              w: 1280,~
     - Inside source: true
     *** True Line Result
    -          mag = args.state.ball.velocity.mag
    -** Processing line: ~          theta_ball=Math.atan2(args.state.ball.velocity.y,args.state.ball.velocity.x) #the angle of the ball's velocity~
    +                              w: 1280,
    +** Processing line: ~                              h: 100,~
     - Inside source: true
     *** True Line Result
    -          theta_ball=Math.atan2(args.state.ball.velocity.y,args.state.ball.velocity.x) #the angle of the ball's velocity
    -** Processing line: ~          theta_repel=Math.atan2(vectorRepel.y,vectorRepel.x) #the angle of the repeling force~
    +                              h: 100,
    +** Processing line: ~                              path: :block,~
     - Inside source: true
     *** True Line Result
    -          theta_repel=Math.atan2(vectorRepel.y,vectorRepel.x) #the angle of the repeling force
    -** Processing line: ~          #puts ("theta:" + theta_ball.to_s + " " + theta_repel.to_s) #theta okay~
    +                              path: :block,
    +** Processing line: ~                              source_x: 0,~
     - Inside source: true
     *** True Line Result
    -          #puts ("theta:" + theta_ball.to_s + " " + theta_repel.to_s) #theta okay
    -** Processing line: ~~
    +                              source_x: 0,
    +** Processing line: ~                              source_y: 0,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~          fbx = mag * Math.cos(theta_ball) #the x component of the ball's velocity~
    +                              source_y: 0,
    +** Processing line: ~                              source_w: 1280,~
     - Inside source: true
     *** True Line Result
    -          fbx = mag * Math.cos(theta_ball) #the x component of the ball's velocity
    -** Processing line: ~          fby = mag * Math.sin(theta_ball) #the y component of the ball's velocity~
    +                              source_w: 1280,
    +** Processing line: ~                              source_h: 100 }~
     - Inside source: true
     *** True Line Result
    -          fby = mag * Math.sin(theta_ball) #the y component of the ball's velocity
    +                              source_h: 100 }
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~          repelMag = getRepelMagnitude(fbx, fby, vectorRepel.x, vectorRepel.y, args)~
    +** Processing line: ~    # After rendering :block, render gradient on top of :block.~
     - Inside source: true
     *** True Line Result
    -          repelMag = getRepelMagnitude(fbx, fby, vectorRepel.x, vectorRepel.y, args)
    +    # After rendering :block, render gradient on top of :block.
    +** Processing line: ~    args.outputs.sprites << [0, 0, 1280, 720, :gradient]~
    +- Inside source: true
    +*** True Line Result
    +    args.outputs.sprites << [0, 0, 1280, 720, :gradient]
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~          frx = repelMag* Math.cos(theta_repel) #the x component of the repel's velocity | magnitude is set to twice of fbx~
    +** Processing line: ~    args.outputs.labels  << [1270, 710, args.gtk.current_framerate, 0, 2, 255, 255, 255]~
     - Inside source: true
     *** True Line Result
    -          frx = repelMag* Math.cos(theta_repel) #the x component of the repel's velocity | magnitude is set to twice of fbx
    -** Processing line: ~          fry = repelMag* Math.sin(theta_repel) #the y component of the repel's velocity | magnitude is set to twice of fby~
    +    args.outputs.labels  << [1270, 710, args.gtk.current_framerate, 0, 2, 255, 255, 255]
    +** Processing line: ~    tick_instructions args, "Sample app shows how to use render_targets (programmatically create cached sprites)."~
     - Inside source: true
     *** True Line Result
    -          fry = repelMag* Math.sin(theta_repel) #the y component of the repel's velocity | magnitude is set to twice of fby
    -** Processing line: ~~
    +    tick_instructions args, "Sample app shows how to use render_targets (programmatically create cached sprites)."
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~          fsumx = fbx+frx #sum of x forces~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          fsumx = fbx+frx #sum of x forces
    -** Processing line: ~          fsumy = fby+fry #sum of y forces~
    +
    +** Processing line: ~  def tick_instructions args, text, y = 715~
     - Inside source: true
     *** True Line Result
    -          fsumy = fby+fry #sum of y forces
    -** Processing line: ~          fr = mag#fr is the resulting magnitude~
    +  def tick_instructions args, text, y = 715
    +** Processing line: ~    return if args.state.key_event_occurred~
     - Inside source: true
     *** True Line Result
    -          fr = mag#fr is the resulting magnitude
    -** Processing line: ~          thetaNew = Math.atan2(fsumy, fsumx)  #thetaNew is the resulting angle~
    +    return if args.state.key_event_occurred
    +** Processing line: ~    if args.inputs.mouse.click ||~
     - Inside source: true
     *** True Line Result
    -          thetaNew = Math.atan2(fsumy, fsumx)  #thetaNew is the resulting angle
    -** Processing line: ~          xnew = fr*Math.cos(thetaNew) #resulting x velocity~
    +    if args.inputs.mouse.click ||
    +** Processing line: ~       args.inputs.keyboard.directional_vector ||~
     - Inside source: true
     *** True Line Result
    -          xnew = fr*Math.cos(thetaNew) #resulting x velocity
    -** Processing line: ~          ynew = fr*Math.sin(thetaNew) #resulting y velocity~
    +       args.inputs.keyboard.directional_vector ||
    +** Processing line: ~       args.inputs.keyboard.key_down.enter ||~
     - Inside source: true
     *** True Line Result
    -          ynew = fr*Math.sin(thetaNew) #resulting y velocity
    -** Processing line: ~~
    +       args.inputs.keyboard.key_down.enter ||
    +** Processing line: ~       args.inputs.keyboard.key_down.escape~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~          args.state.ball.velocity = Vector2d.new(xnew,ynew)~
    +       args.inputs.keyboard.key_down.escape
    +** Processing line: ~      args.state.key_event_occurred = true~
     - Inside source: true
     *** True Line Result
    -          args.state.ball.velocity = Vector2d.new(xnew,ynew)
    -** Processing line: ~          #args.state.ball.xy.add(args.state.ball.velocity)~
    +      args.state.key_event_occurred = true
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -          #args.state.ball.xy.add(args.state.ball.velocity)
    -** Processing line: ~          break #no need to check the other points ?~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          break #no need to check the other points ?
    -** Processing line: ~        else~
    +
    +** Processing line: ~    args.outputs.debug << [0, y - 50, 1280, 60].solid~
     - Inside source: true
     *** True Line Result
    -        else
    -** Processing line: ~        end~
    +    args.outputs.debug << [0, y - 50, 1280, 60].solid
    +** Processing line: ~    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~      end~
    +    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label
    +** Processing line: ~    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end #end update~
    +    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    end #end update
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  end~
    +** Processing line: ~  $gtk.reset~
     - Inside source: true
     *** True Line Result
    -  end
    +  $gtk.reset
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
    @@ -38864,146 +47187,150 @@ Follows is a source code listing for all files that have been open sourced. This
     - End of paragraph detected.
     *** True Line Result
     
    -** Processing line: ~*** Physics And Collisions - Collision With Object Removal - main.rb~
    +** Processing line: ~*** Advanced Rendering - Render Targets With Tile Manipulation - main.rb~
     - Header detected.
     *** True Line Result
     
     *** True Line Result
    -*** Physics And Collisions - Collision With Object Removal - main.rb
    +*** Advanced Rendering - Render Targets With Tile Manipulation - main.rb
     ** Processing line: ~#+begin_src ruby~
     - Line was identified as the beginning of a code block.
     *** True Line Result
     
     *** True Line Result
     #+begin_src ruby
    -** Processing line: ~  # ./samples/04_physics_and_collisions/10_collision_with_object_removal/app/main.rb~
    +** Processing line: ~  # ./samples/07_advanced_rendering/02_render_targets_with_tile_manipulation/app/main.rb~
     - Inside source: true
     *** True Line Result
    -  # ./samples/04_physics_and_collisions/10_collision_with_object_removal/app/main.rb
    -** Processing line: ~  # coding: utf-8~
    +  # ./samples/07_advanced_rendering/02_render_targets_with_tile_manipulation/app/main.rb
    +** Processing line: ~  # This sample is meant to show you how to do that dripping transition thing~
     - Inside source: true
     *** True Line Result
    -  # coding: utf-8
    -** Processing line: ~  INFINITY= 10**10~
    +  # This sample is meant to show you how to do that dripping transition thing
    +** Processing line: ~  #  at the start of the original Doom. Most of this file is here to animate~
     - Inside source: true
     *** True Line Result
    -  INFINITY= 10**10
    -** Processing line: ~  WIDTH=1280~
    +  #  at the start of the original Doom. Most of this file is here to animate
    +** Processing line: ~  #  a scene to wipe away; the actual wipe effect is in the last 20 lines or~
     - Inside source: true
     *** True Line Result
    -  WIDTH=1280
    -** Processing line: ~  HEIGHT=720~
    +  #  a scene to wipe away; the actual wipe effect is in the last 20 lines or
    +** Processing line: ~  #  so.~
     - Inside source: true
     *** True Line Result
    -  HEIGHT=720
    +  #  so.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  require 'app/vector2d.rb'~
    +** Processing line: ~  $gtk.reset   # reset all game state if reloaded.~
     - Inside source: true
     *** True Line Result
    -  require 'app/vector2d.rb'
    -** Processing line: ~  require 'app/paddle.rb'~
    +  $gtk.reset   # reset all game state if reloaded.
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  require 'app/paddle.rb'
    -** Processing line: ~  require 'app/ball.rb'~
    +
    +** Processing line: ~  def circle_of_blocks pass, xoffset, yoffset, angleoffset, blocksize, distance~
     - Inside source: true
     *** True Line Result
    -  require 'app/ball.rb'
    -** Processing line: ~  require 'app/linear_collider.rb'~
    +  def circle_of_blocks pass, xoffset, yoffset, angleoffset, blocksize, distance
    +** Processing line: ~    numblocks = 10~
     - Inside source: true
     *** True Line Result
    -  require 'app/linear_collider.rb'
    +    numblocks = 10
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  #Method to init default values~
    +** Processing line: ~    for i in 1..numblocks do~
     - Inside source: true
     *** True Line Result
    -  #Method to init default values
    -** Processing line: ~  def defaults args~
    +    for i in 1..numblocks do
    +** Processing line: ~      angle = ((360 / numblocks) * i) + angleoffset~
     - Inside source: true
     *** True Line Result
    -  def defaults args
    -** Processing line: ~    args.state.game_board ||= [(args.grid.w / 2 - args.grid.w / 4), 0, (args.grid.w / 2), args.grid.h]~
    +      angle = ((360 / numblocks) * i) + angleoffset
    +** Processing line: ~      radians = angle * (Math::PI / 180)~
     - Inside source: true
     *** True Line Result
    -    args.state.game_board ||= [(args.grid.w / 2 - args.grid.w / 4), 0, (args.grid.w / 2), args.grid.h]
    -** Processing line: ~    args.state.bricks ||= []~
    +      radians = angle * (Math::PI / 180)
    +** Processing line: ~      x = (xoffset + (distance * Math.cos(radians))).round~
     - Inside source: true
     *** True Line Result
    -    args.state.bricks ||= []
    -** Processing line: ~    args.state.num_bricks ||= 0~
    +      x = (xoffset + (distance * Math.cos(radians))).round
    +** Processing line: ~      y = (yoffset + (distance * Math.sin(radians))).round~
     - Inside source: true
     *** True Line Result
    -    args.state.num_bricks ||= 0
    -** Processing line: ~    args.state.game_over_at ||= 0~
    +      y = (yoffset + (distance * Math.sin(radians))).round
    +** Processing line: ~      pass.solids << [ x, y, blocksize, blocksize, 255, 255, 0 ]~
     - Inside source: true
     *** True Line Result
    -    args.state.game_over_at ||= 0
    -** Processing line: ~    args.state.paddle ||= Paddle.new~
    +      pass.solids << [ x, y, blocksize, blocksize, 255, 255, 0 ]
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    args.state.paddle ||= Paddle.new
    -** Processing line: ~    args.state.ball   ||= Ball.new~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    args.state.ball   ||= Ball.new
    -** Processing line: ~    args.state.westWall  ||= LinearCollider.new({x: args.grid.w/4,      y: 0},          {x: args.grid.w/4,      y: args.grid.h}, :pos)~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    args.state.westWall  ||= LinearCollider.new({x: args.grid.w/4,      y: 0},          {x: args.grid.w/4,      y: args.grid.h}, :pos)
    -** Processing line: ~    args.state.eastWall  ||= LinearCollider.new({x: 3*args.grid.w*0.25, y: 0},          {x: 3*args.grid.w*0.25, y: args.grid.h})~
    +
    +** Processing line: ~  def draw_scene args, pass~
     - Inside source: true
     *** True Line Result
    -    args.state.eastWall  ||= LinearCollider.new({x: 3*args.grid.w*0.25, y: 0},          {x: 3*args.grid.w*0.25, y: args.grid.h})
    -** Processing line: ~    args.state.southWall ||= LinearCollider.new({x: 0,                  y: 0},          {x: args.grid.w,        y: 0})~
    +  def draw_scene args, pass
    +** Processing line: ~    pass.solids << [0, 360, 1280, 360, 0, 0, 200]~
     - Inside source: true
     *** True Line Result
    -    args.state.southWall ||= LinearCollider.new({x: 0,                  y: 0},          {x: args.grid.w,        y: 0})
    -** Processing line: ~    args.state.northWall ||= LinearCollider.new({x: 0,                  y:args.grid.h}, {x: args.grid.w,        y: args.grid.h}, :pos)~
    +    pass.solids << [0, 360, 1280, 360, 0, 0, 200]
    +** Processing line: ~    pass.solids << [0, 0, 1280, 360, 0, 127, 0]~
     - Inside source: true
     *** True Line Result
    -    args.state.northWall ||= LinearCollider.new({x: 0,                  y:args.grid.h}, {x: args.grid.w,        y: args.grid.h}, :pos)
    +    pass.solids << [0, 0, 1280, 360, 0, 127, 0]
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    #args.state.testWall ||= LinearCollider.new({x:0 , y:0},{x:args.grid.w, y:args.grid.h})~
    +** Processing line: ~    blocksize = 100~
     - Inside source: true
     *** True Line Result
    -    #args.state.testWall ||= LinearCollider.new({x:0 , y:0},{x:args.grid.w, y:args.grid.h})
    -** Processing line: ~  end~
    +    blocksize = 100
    +** Processing line: ~    angleoffset = args.state.tick_count * 2.5~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +    angleoffset = args.state.tick_count * 2.5
    +** Processing line: ~    centerx = (1280 - blocksize) / 2~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  #Render loop~
    +    centerx = (1280 - blocksize) / 2
    +** Processing line: ~    centery = (720 - blocksize) / 2~
     - Inside source: true
     *** True Line Result
    -  #Render loop
    -** Processing line: ~  def render args~
    +    centery = (720 - blocksize) / 2
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  def render args
    -** Processing line: ~    render_instructions args~
    +
    +** Processing line: ~    circle_of_blocks pass, centerx, centery, angleoffset, blocksize * 2, 500~
     - Inside source: true
     *** True Line Result
    -    render_instructions args
    -** Processing line: ~    render_board args~
    +    circle_of_blocks pass, centerx, centery, angleoffset, blocksize * 2, 500
    +** Processing line: ~    circle_of_blocks pass, centerx, centery, angleoffset, blocksize, 325~
     - Inside source: true
     *** True Line Result
    -    render_board args
    -** Processing line: ~    render_bricks args~
    +    circle_of_blocks pass, centerx, centery, angleoffset, blocksize, 325
    +** Processing line: ~    circle_of_blocks pass, centerx, centery, angleoffset, blocksize / 2, 200~
     - Inside source: true
     *** True Line Result
    -    render_bricks args
    +    circle_of_blocks pass, centerx, centery, angleoffset, blocksize / 2, 200
    +** Processing line: ~    circle_of_blocks pass, centerx, centery, angleoffset, blocksize / 4, 100~
    +- Inside source: true
    +*** True Line Result
    +    circle_of_blocks pass, centerx, centery, angleoffset, blocksize / 4, 100
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -39012,38 +47339,46 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  begin :render_methods~
    +** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
    -  begin :render_methods
    -** Processing line: ~    #Method to display the instructions of the game~
    +  def tick args
    +** Processing line: ~    segments = 160~
     - Inside source: true
     *** True Line Result
    -    #Method to display the instructions of the game
    -** Processing line: ~    def render_instructions args~
    +    segments = 160
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    def render_instructions args
    -** Processing line: ~      args.outputs.labels << [225, args.grid.h - 30, "← and → to move the paddle left and right",  0, 1]~
    +
    +** Processing line: ~    # On the first tick, initialize some stuff.~
     - Inside source: true
     *** True Line Result
    -      args.outputs.labels << [225, args.grid.h - 30, "← and → to move the paddle left and right",  0, 1]
    -** Processing line: ~    end~
    +    # On the first tick, initialize some stuff.
    +** Processing line: ~    if !args.state.yoffsets~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +    if !args.state.yoffsets
    +** Processing line: ~      args.state.baseyoff = 0~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def render_board args~
    +      args.state.baseyoff = 0
    +** Processing line: ~      args.state.yoffsets = []~
     - Inside source: true
     *** True Line Result
    -    def render_board args
    -** Processing line: ~      args.outputs.borders << args.state.game_board~
    +      args.state.yoffsets = []
    +** Processing line: ~      for i in 0..segments do~
     - Inside source: true
     *** True Line Result
    -      args.outputs.borders << args.state.game_board
    +      for i in 0..segments do
    +** Processing line: ~        args.state.yoffsets << rand * 100~
    +- Inside source: true
    +*** True Line Result
    +        args.state.yoffsets << rand * 100
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -39052,806 +47387,782 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def render_bricks args~
    +** Processing line: ~    # Just draw some random stuff for a few seconds.~
     - Inside source: true
     *** True Line Result
    -    def render_bricks args
    -** Processing line: ~      args.outputs.solids << args.state.bricks.map(&:rect)~
    +    # Just draw some random stuff for a few seconds.
    +** Processing line: ~    args.state.static_debounce ||= 60 * 2.5~
     - Inside source: true
     *** True Line Result
    -      args.outputs.solids << args.state.bricks.map(&:rect)
    -** Processing line: ~    end~
    +    args.state.static_debounce ||= 60 * 2.5
    +** Processing line: ~    if args.state.static_debounce > 0~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~  end~
    +    if args.state.static_debounce > 0
    +** Processing line: ~      last_frame = args.state.static_debounce == 1~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +      last_frame = args.state.static_debounce == 1
    +** Processing line: ~      target = last_frame ? args.render_target(:last_frame) : args.outputs~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  #Calls all methods necessary for performing calculations~
    +      target = last_frame ? args.render_target(:last_frame) : args.outputs
    +** Processing line: ~      draw_scene args, target~
     - Inside source: true
     *** True Line Result
    -  #Calls all methods necessary for performing calculations
    -** Processing line: ~  def calc args~
    +      draw_scene args, target
    +** Processing line: ~      args.state.static_debounce -= 1~
     - Inside source: true
     *** True Line Result
    -  def calc args
    -** Processing line: ~    add_new_bricks args~
    +      args.state.static_debounce -= 1
    +** Processing line: ~      return unless last_frame~
     - Inside source: true
     *** True Line Result
    -    add_new_bricks args
    -** Processing line: ~    reset_game args~
    +      return unless last_frame
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    reset_game args
    -** Processing line: ~    calc_collision args~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    calc_collision args
    -** Processing line: ~    win_game args~
    +
    +** Processing line: ~    # build up the wipe...~
     - Inside source: true
     *** True Line Result
    -    win_game args
    +    # build up the wipe...
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    args.state.westWall.update args~
    +** Processing line: ~    # this is the thing we're wiping to.~
     - Inside source: true
     *** True Line Result
    -    args.state.westWall.update args
    -** Processing line: ~    args.state.eastWall.update args~
    +    # this is the thing we're wiping to.
    +** Processing line: ~    args.outputs.sprites << [ 0, 0, 1280, 720, 'dragonruby.png' ]~
     - Inside source: true
     *** True Line Result
    -    args.state.eastWall.update args
    -** Processing line: ~    args.state.southWall.update args~
    +    args.outputs.sprites << [ 0, 0, 1280, 720, 'dragonruby.png' ]
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    args.state.southWall.update args
    -** Processing line: ~    args.state.northWall.update args~
    +
    +** Processing line: ~    return if (args.state.baseyoff > (1280 + 100))  # stop when done sliding~
     - Inside source: true
     *** True Line Result
    -    args.state.northWall.update args
    -** Processing line: ~    args.state.paddle.update args~
    +    return if (args.state.baseyoff > (1280 + 100))  # stop when done sliding
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    args.state.paddle.update args
    -** Processing line: ~    args.state.ball.update args~
    +
    +** Processing line: ~    segmentw = 1280 / segments~
     - Inside source: true
     *** True Line Result
    -    args.state.ball.update args
    +    segmentw = 1280 / segments
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    #args.state.testWall.update args~
    +** Processing line: ~    x = 0~
     - Inside source: true
     *** True Line Result
    -    #args.state.testWall.update args
    -** Processing line: ~~
    +    x = 0
    +** Processing line: ~    for i in 0..segments do~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    args.state.paddle.render args~
    +    for i in 0..segments do
    +** Processing line: ~      yoffset = 0~
     - Inside source: true
     *** True Line Result
    -    args.state.paddle.render args
    -** Processing line: ~    args.state.ball.render args~
    +      yoffset = 0
    +** Processing line: ~      if args.state.yoffsets[i] < args.state.baseyoff~
     - Inside source: true
     *** True Line Result
    -    args.state.ball.render args
    -** Processing line: ~  end~
    +      if args.state.yoffsets[i] < args.state.baseyoff
    +** Processing line: ~        yoffset = args.state.baseyoff - args.state.yoffsets[i]~
     - Inside source: true
     *** True Line Result
    -  end
    +        yoffset = args.state.baseyoff - args.state.yoffsets[i]
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  begin :calc_methods~
    +** Processing line: ~      # (720 - yoffset) flips the coordinate system, (- 720) adjusts for the height of the segment.~
     - Inside source: true
     *** True Line Result
    -  begin :calc_methods
    -** Processing line: ~    def add_new_bricks args~
    +      # (720 - yoffset) flips the coordinate system, (- 720) adjusts for the height of the segment.
    +** Processing line: ~      args.outputs.sprites << [ x, (720 - yoffset) - 720, segmentw, 720, 'last_frame', 0, 255, 255, 255, 255, x, 0, segmentw, 720 ]~
     - Inside source: true
     *** True Line Result
    -    def add_new_bricks args
    -** Processing line: ~      return if args.state.num_bricks > 40~
    +      args.outputs.sprites << [ x, (720 - yoffset) - 720, segmentw, 720, 'last_frame', 0, 255, 255, 255, 255, x, 0, segmentw, 720 ]
    +** Processing line: ~      x += segmentw~
     - Inside source: true
     *** True Line Result
    -      return if args.state.num_bricks > 40
    +      x += segmentw
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      #Width of the game board is 640px~
    +** Processing line: ~    args.state.baseyoff += 4~
     - Inside source: true
     *** True Line Result
    -      #Width of the game board is 640px
    -** Processing line: ~      brick_width = (args.grid.w / 2) / 10~
    +    args.state.baseyoff += 4
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      brick_width = (args.grid.w / 2) / 10
    -** Processing line: ~      brick_height = brick_width / 2~
    +
    +** Processing line: ~    tick_instructions args, "Sample app shows an advanced usage of render_target."~
     - Inside source: true
     *** True Line Result
    -      brick_height = brick_width / 2
    +    tick_instructions args, "Sample app shows an advanced usage of render_target."
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      (4).map_with_index do |y|~
    +** Processing line: ~  def tick_instructions args, text, y = 715~
     - Inside source: true
     *** True Line Result
    -      (4).map_with_index do |y|
    -** Processing line: ~        #Make a box that is 10 bricks wide and 4 bricks tall~
    +  def tick_instructions args, text, y = 715
    +** Processing line: ~    return if args.state.key_event_occurred~
     - Inside source: true
     *** True Line Result
    -        #Make a box that is 10 bricks wide and 4 bricks tall
    -** Processing line: ~        args.state.bricks += (10).map_with_index do |x|~
    +    return if args.state.key_event_occurred
    +** Processing line: ~    if args.inputs.mouse.click ||~
     - Inside source: true
     *** True Line Result
    -        args.state.bricks += (10).map_with_index do |x|
    -** Processing line: ~          args.state.new_entity(:brick) do |b|~
    +    if args.inputs.mouse.click ||
    +** Processing line: ~       args.inputs.keyboard.directional_vector ||~
     - Inside source: true
     *** True Line Result
    -          args.state.new_entity(:brick) do |b|
    -** Processing line: ~            b.x = x * brick_width + (args.grid.w / 2 - args.grid.w / 4)~
    +       args.inputs.keyboard.directional_vector ||
    +** Processing line: ~       args.inputs.keyboard.key_down.enter ||~
     - Inside source: true
     *** True Line Result
    -            b.x = x * brick_width + (args.grid.w / 2 - args.grid.w / 4)
    -** Processing line: ~            b.y = args.grid.h - ((y + 1) * brick_height)~
    +       args.inputs.keyboard.key_down.enter ||
    +** Processing line: ~       args.inputs.keyboard.key_down.escape~
     - Inside source: true
     *** True Line Result
    -            b.y = args.grid.h - ((y + 1) * brick_height)
    -** Processing line: ~            b.rect = [b.x + 1, b.y - 1, brick_width - 2, brick_height - 2, 235, 50 * y, 52]~
    +       args.inputs.keyboard.key_down.escape
    +** Processing line: ~      args.state.key_event_occurred = true~
     - Inside source: true
     *** True Line Result
    -            b.rect = [b.x + 1, b.y - 1, brick_width - 2, brick_height - 2, 235, 50 * y, 52]
    +      args.state.key_event_occurred = true
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~            #Add linear colliders to the brick~
    +** Processing line: ~    args.outputs.debug << [0, y - 50, 1280, 60].solid~
     - Inside source: true
     *** True Line Result
    -            #Add linear colliders to the brick
    -** Processing line: ~            b.collider_bottom = LinearCollider.new([(b.x-2), (b.y-5)], [(b.x+brick_width+1), (b.y-5)], :pos, brick_height)~
    +    args.outputs.debug << [0, y - 50, 1280, 60].solid
    +** Processing line: ~    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label~
     - Inside source: true
     *** True Line Result
    -            b.collider_bottom = LinearCollider.new([(b.x-2), (b.y-5)], [(b.x+brick_width+1), (b.y-5)], :pos, brick_height)
    -** Processing line: ~            b.collider_right = LinearCollider.new([(b.x+brick_width+1), (b.y-5)], [(b.x+brick_width+1), (b.y+brick_height+1)], :pos)~
    +    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label
    +** Processing line: ~    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label~
     - Inside source: true
     *** True Line Result
    -            b.collider_right = LinearCollider.new([(b.x+brick_width+1), (b.y-5)], [(b.x+brick_width+1), (b.y+brick_height+1)], :pos)
    -** Processing line: ~            b.collider_left = LinearCollider.new([(b.x-2), (b.y-5)], [(b.x-2), (b.y+brick_height+1)], :neg)~
    +    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -            b.collider_left = LinearCollider.new([(b.x-2), (b.y-5)], [(b.x-2), (b.y+brick_height+1)], :neg)
    -** Processing line: ~            b.collider_top = LinearCollider.new([(b.x-2), (b.y+brick_height+1)], [(b.x+brick_width+1), (b.y+brick_height+1)], :neg)~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -            b.collider_top = LinearCollider.new([(b.x-2), (b.y+brick_height+1)], [(b.x+brick_width+1), (b.y+brick_height+1)], :neg)
    +
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
    +*** True Line Result
    +#+end_src
     ** Processing line: ~~
    -- Inside source: true
    +- End of paragraph detected.
     *** True Line Result
     
    -** Processing line: ~            # @xyCollision  = LinearCollider.new({x: @x,y: @y+@height}, {x: @x+@width, y: @y+@height})~
    -- Inside source: true
    +** Processing line: ~*** Advanced Rendering - Render Target Viewports - main.rb~
    +- Header detected.
     *** True Line Result
    -            # @xyCollision  = LinearCollider.new({x: @x,y: @y+@height}, {x: @x+@width, y: @y+@height})
    -** Processing line: ~            # @xyCollision2 = LinearCollider.new({x: @x,y: @y}, {x: @x+@width, y: @y}, :pos)~
    -- Inside source: true
    +
     *** True Line Result
    -            # @xyCollision2 = LinearCollider.new({x: @x,y: @y}, {x: @x+@width, y: @y}, :pos)
    -** Processing line: ~            # @xyCollision3 = LinearCollider.new({x: @x,y: @y}, {x: @x, y: @y+@height})~
    +*** Advanced Rendering - Render Target Viewports - main.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/07_advanced_rendering/03_render_target_viewports/app/main.rb~
     - Inside source: true
     *** True Line Result
    -            # @xyCollision3 = LinearCollider.new({x: @x,y: @y}, {x: @x, y: @y+@height})
    -** Processing line: ~            # @xyCollision4 = LinearCollider.new({x: @x+@width,y: @y}, {x: @x+@width, y: @y+@height}, :pos)~
    +  # ./samples/07_advanced_rendering/03_render_target_viewports/app/main.rb
    +** Processing line: ~  =begin~
     - Inside source: true
     *** True Line Result
    -            # @xyCollision4 = LinearCollider.new({x: @x+@width,y: @y}, {x: @x+@width, y: @y+@height}, :pos)
    +  =begin
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~            b.broken = false~
    +** Processing line: ~   APIs listing that haven't been encountered in previous sample apps:~
     - Inside source: true
     *** True Line Result
    -            b.broken = false
    +   APIs listing that haven't been encountered in previous sample apps:
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~            args.state.num_bricks += 1~
    -- Inside source: true
    -*** True Line Result
    -            args.state.num_bricks += 1
    -** Processing line: ~          end~
    +** Processing line: ~   - args.state.new_entity: Used when we want to create a new object, like a sprite or button.~
     - Inside source: true
     *** True Line Result
    -          end
    -** Processing line: ~        end~
    +   - args.state.new_entity: Used when we want to create a new object, like a sprite or button.
    +** Processing line: ~     For example, if we want to create a new button, we would declare it as a new entity and~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~      end~
    +     For example, if we want to create a new button, we would declare it as a new entity and
    +** Processing line: ~     then define its properties. (Remember, you can use state to define ANY property and it will~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +     then define its properties. (Remember, you can use state to define ANY property and it will
    +** Processing line: ~     be retained across frames.)~
     - Inside source: true
     *** True Line Result
    -    end
    +     be retained across frames.)
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def reset_game args~
    +** Processing line: ~     If you have a solar system and you're creating args.state.sun and setting its image path to an~
     - Inside source: true
     *** True Line Result
    -    def reset_game args
    -** Processing line: ~      if args.state.ball.xy.y < 20 && args.state.game_over_at.elapsed_time > 60~
    +     If you have a solar system and you're creating args.state.sun and setting its image path to an
    +** Processing line: ~     image in the sprites folder, you would do the following:~
     - Inside source: true
     *** True Line Result
    -      if args.state.ball.xy.y < 20 && args.state.game_over_at.elapsed_time > 60
    -** Processing line: ~        #Freeze the ball~
    +     image in the sprites folder, you would do the following:
    +** Processing line: ~     (See samples/99_sample_nddnug_workshop for more details.)~
     - Inside source: true
     *** True Line Result
    -        #Freeze the ball
    -** Processing line: ~        args.state.ball.velocity.x = 0~
    +     (See samples/99_sample_nddnug_workshop for more details.)
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        args.state.ball.velocity.x = 0
    -** Processing line: ~        args.state.ball.velocity.y = 0~
    +
    +** Processing line: ~     args.state.sun ||= args.state.new_entity(:sun) do |s|~
     - Inside source: true
     *** True Line Result
    -        args.state.ball.velocity.y = 0
    -** Processing line: ~        #Freeze the paddle~
    +     args.state.sun ||= args.state.new_entity(:sun) do |s|
    +** Processing line: ~     s.path = 'sprites/sun.png'~
     - Inside source: true
     *** True Line Result
    -        #Freeze the paddle
    -** Processing line: ~        args.state.paddle.enabled = false~
    +     s.path = 'sprites/sun.png'
    +** Processing line: ~     end~
     - Inside source: true
     *** True Line Result
    -        args.state.paddle.enabled = false
    +     end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~        args.state.game_over_at = args.state.tick_count~
    +** Processing line: ~   - String interpolation: Uses #{} syntax; everything between the #{ and the } is evaluated~
     - Inside source: true
     *** True Line Result
    -        args.state.game_over_at = args.state.tick_count
    -** Processing line: ~      end~
    +   - String interpolation: Uses #{} syntax; everything between the #{ and the } is evaluated
    +** Processing line: ~     as Ruby code, and the placeholder is replaced with its corresponding value or result.~
     - Inside source: true
     *** True Line Result
    -      end
    +     as Ruby code, and the placeholder is replaced with its corresponding value or result.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      if args.state.game_over_at.elapsed_time < 60 && args.state.tick_count > 60 && args.state.bricks.count != 0~
    +** Processing line: ~     For example, if we have a variable~
     - Inside source: true
     *** True Line Result
    -      if args.state.game_over_at.elapsed_time < 60 && args.state.tick_count > 60 && args.state.bricks.count != 0
    -** Processing line: ~        #Display a "Game over" message~
    +     For example, if we have a variable
    +** Processing line: ~     name = "Ruby"~
     - Inside source: true
     *** True Line Result
    -        #Display a "Game over" message
    -** Processing line: ~        args.outputs.labels << [100, 100, "GAME OVER", 10]~
    +     name = "Ruby"
    +** Processing line: ~     then the line~
     - Inside source: true
     *** True Line Result
    -        args.outputs.labels << [100, 100, "GAME OVER", 10]
    -** Processing line: ~      end~
    +     then the line
    +** Processing line: ~     puts "How are you, #{name}?"~
     - Inside source: true
     *** True Line Result
    -      end
    +     puts "How are you, #{name}?"
    +** Processing line: ~     would print "How are you, Ruby?" to the console.~
    +- Inside source: true
    +*** True Line Result
    +     would print "How are you, Ruby?" to the console.
    +** Processing line: ~     (Remember, string interpolation only works with double quotes!)~
    +- Inside source: true
    +*** True Line Result
    +     (Remember, string interpolation only works with double quotes!)
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      #If 60 frames have passed since the game ended, restart the game~
    +** Processing line: ~   - Ternary operator (?): Similar to if statement; first evalulates whether a statement is~
     - Inside source: true
     *** True Line Result
    -      #If 60 frames have passed since the game ended, restart the game
    -** Processing line: ~      if args.state.game_over_at != 0 && args.state.game_over_at.elapsed_time == 60~
    +   - Ternary operator (?): Similar to if statement; first evalulates whether a statement is
    +** Processing line: ~     true or false, and then executes a command depending on that result.~
     - Inside source: true
     *** True Line Result
    -      if args.state.game_over_at != 0 && args.state.game_over_at.elapsed_time == 60
    -** Processing line: ~        # FIXME: only put value types in state~
    +     true or false, and then executes a command depending on that result.
    +** Processing line: ~     For example, if we had a variable~
     - Inside source: true
     *** True Line Result
    -        # FIXME: only put value types in state
    -** Processing line: ~        args.state.ball = Ball.new~
    +     For example, if we had a variable
    +** Processing line: ~     grade = 75~
     - Inside source: true
     *** True Line Result
    -        args.state.ball = Ball.new
    -** Processing line: ~~
    +     grade = 75
    +** Processing line: ~     and used the ternary operator in the command~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~        # FIXME: only put value types in state~
    +     and used the ternary operator in the command
    +** Processing line: ~     pass_or_fail = grade > 65 ? "pass" : "fail"~
     - Inside source: true
     *** True Line Result
    -        # FIXME: only put value types in state
    -** Processing line: ~        args.state.paddle = Paddle.new~
    +     pass_or_fail = grade > 65 ? "pass" : "fail"
    +** Processing line: ~     then the value of pass_or_fail would be "pass" since grade's value was greater than 65.~
     - Inside source: true
     *** True Line Result
    -        args.state.paddle = Paddle.new
    +     then the value of pass_or_fail would be "pass" since grade's value was greater than 65.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~        args.state.bricks = []~
    +** Processing line: ~   Reminders:~
     - Inside source: true
     *** True Line Result
    -        args.state.bricks = []
    -** Processing line: ~        args.state.num_bricks = 0~
    +   Reminders:
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        args.state.num_bricks = 0
    -** Processing line: ~      end~
    +
    +** Processing line: ~   - args.grid.(left|right|top|bottom): Pixel value for the boundaries of the virtual~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +   - args.grid.(left|right|top|bottom): Pixel value for the boundaries of the virtual
    +** Processing line: ~     720 p screen (Dragon Ruby Game Toolkits's virtual resolution is always 1280x720).~
     - Inside source: true
     *** True Line Result
    -    end
    +     720 p screen (Dragon Ruby Game Toolkits's virtual resolution is always 1280x720).
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def calc_collision args~
    -- Inside source: true
    -*** True Line Result
    -    def calc_collision args
    -** Processing line: ~      #Remove the brick if it is hit with the ball~
    -- Inside source: true
    -*** True Line Result
    -      #Remove the brick if it is hit with the ball
    -** Processing line: ~      ball = args.state.ball~
    +** Processing line: ~   - Numeric#shift_(left|right|up|down): Shifts the Numeric in the correct direction~
     - Inside source: true
     *** True Line Result
    -      ball = args.state.ball
    -** Processing line: ~      ball_rect = [ball.xy.x, ball.xy.y, 20, 20]~
    +   - Numeric#shift_(left|right|up|down): Shifts the Numeric in the correct direction
    +** Processing line: ~     by adding or subracting.~
     - Inside source: true
     *** True Line Result
    -      ball_rect = [ball.xy.x, ball.xy.y, 20, 20]
    +     by adding or subracting.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      #Loop through each brick to see if the ball is colliding with it~
    +** Processing line: ~   - ARRAY#inside_rect?: An array with at least two values is considered a point. An array~
     - Inside source: true
     *** True Line Result
    -      #Loop through each brick to see if the ball is colliding with it
    -** Processing line: ~      args.state.bricks.each do |b|~
    +   - ARRAY#inside_rect?: An array with at least two values is considered a point. An array
    +** Processing line: ~     with at least four values is considered a rect. The inside_rect? function returns true~
     - Inside source: true
     *** True Line Result
    -      args.state.bricks.each do |b|
    -** Processing line: ~        if b.rect.intersect_rect?(ball_rect)~
    +     with at least four values is considered a rect. The inside_rect? function returns true
    +** Processing line: ~     or false depending on if the point is inside the rect.~
     - Inside source: true
     *** True Line Result
    -        if b.rect.intersect_rect?(ball_rect)
    -** Processing line: ~          #Run the linear collider for the brick if there is a collision~
    +     or false depending on if the point is inside the rect.
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          #Run the linear collider for the brick if there is a collision
    -** Processing line: ~          b[:collider_bottom].update args~
    +
    +** Processing line: ~   - ARRAY#intersect_rect?: Returns true or false depending on if the two rectangles intersect.~
     - Inside source: true
     *** True Line Result
    -          b[:collider_bottom].update args
    -** Processing line: ~          b[:collider_right].update args~
    +   - ARRAY#intersect_rect?: Returns true or false depending on if the two rectangles intersect.
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          b[:collider_right].update args
    -** Processing line: ~          b[:collider_left].update args~
    +
    +** Processing line: ~   - args.inputs.mouse.click: This property will be set if the mouse was clicked.~
     - Inside source: true
     *** True Line Result
    -          b[:collider_left].update args
    -** Processing line: ~          b[:collider_top].update args~
    +   - args.inputs.mouse.click: This property will be set if the mouse was clicked.
    +** Processing line: ~     For more information about the mouse, go to mygame/documentation/07-mouse.md.~
     - Inside source: true
     *** True Line Result
    -          b[:collider_top].update args
    +     For more information about the mouse, go to mygame/documentation/07-mouse.md.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~          b.broken = true~
    +** Processing line: ~   - args.inputs.keyboard.key_up.KEY: The value of the properties will be set~
     - Inside source: true
     *** True Line Result
    -          b.broken = true
    -** Processing line: ~        end~
    +   - args.inputs.keyboard.key_up.KEY: The value of the properties will be set
    +** Processing line: ~     to the frame  that the key_up event occurred (the frame correlates~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~      end~
    +     to the frame  that the key_up event occurred (the frame correlates
    +** Processing line: ~     to args.state.tick_count).~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +     to args.state.tick_count).
    +** Processing line: ~     For more information about the keyboard, go to mygame/documentation/06-keyboard.md.~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      args.state.bricks = args.state.bricks.reject(&:broken)~
    +     For more information about the keyboard, go to mygame/documentation/06-keyboard.md.
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      args.state.bricks = args.state.bricks.reject(&:broken)
    -** Processing line: ~    end~
    +
    +** Processing line: ~   - args.state.labels:~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +   - args.state.labels:
    +** Processing line: ~     The parameters for a label are~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def win_game args~
    +     The parameters for a label are
    +** Processing line: ~     1. the position (x, y)~
     - Inside source: true
     *** True Line Result
    -    def win_game args
    -** Processing line: ~      if args.state.bricks.count == 0 && args.state.game_over_at.elapsed_time > 60~
    +     1. the position (x, y)
    +** Processing line: ~     2. the text~
     - Inside source: true
     *** True Line Result
    -      if args.state.bricks.count == 0 && args.state.game_over_at.elapsed_time > 60
    -** Processing line: ~        #Freeze the ball~
    +     2. the text
    +** Processing line: ~     3. the size~
     - Inside source: true
     *** True Line Result
    -        #Freeze the ball
    -** Processing line: ~        args.state.ball.velocity.x = 0~
    +     3. the size
    +** Processing line: ~     4. the alignment~
     - Inside source: true
     *** True Line Result
    -        args.state.ball.velocity.x = 0
    -** Processing line: ~        args.state.ball.velocity.y = 0~
    +     4. the alignment
    +** Processing line: ~     5. the color (red, green, and blue saturations)~
     - Inside source: true
     *** True Line Result
    -        args.state.ball.velocity.y = 0
    -** Processing line: ~        #Freeze the paddle~
    +     5. the color (red, green, and blue saturations)
    +** Processing line: ~     6. the alpha (or transparency)~
     - Inside source: true
     *** True Line Result
    -        #Freeze the paddle
    -** Processing line: ~        args.state.paddle.enabled = false~
    +     6. the alpha (or transparency)
    +** Processing line: ~     For more information about labels, go to mygame/documentation/02-labels.md.~
     - Inside source: true
     *** True Line Result
    -        args.state.paddle.enabled = false
    +     For more information about labels, go to mygame/documentation/02-labels.md.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~        args.state.game_over_at = args.state.tick_count~
    -- Inside source: true
    -*** True Line Result
    -        args.state.game_over_at = args.state.tick_count
    -** Processing line: ~      end~
    +** Processing line: ~   - args.state.lines:~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +   - args.state.lines:
    +** Processing line: ~     The parameters for a line are~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      if args.state.game_over_at.elapsed_time < 60 && args.state.tick_count > 60 && args.state.bricks.count == 0~
    +     The parameters for a line are
    +** Processing line: ~     1. the starting position (x, y)~
     - Inside source: true
     *** True Line Result
    -      if args.state.game_over_at.elapsed_time < 60 && args.state.tick_count > 60 && args.state.bricks.count == 0
    -** Processing line: ~        #Display a "Game over" message~
    +     1. the starting position (x, y)
    +** Processing line: ~     2. the ending position (x2, y2)~
     - Inside source: true
     *** True Line Result
    -        #Display a "Game over" message
    -** Processing line: ~        args.outputs.labels << [100, 100, "CONGRATULATIONS!", 10]~
    +     2. the ending position (x2, y2)
    +** Processing line: ~     3. the color (red, green, and blue saturations)~
     - Inside source: true
     *** True Line Result
    -        args.outputs.labels << [100, 100, "CONGRATULATIONS!", 10]
    -** Processing line: ~      end~
    +     3. the color (red, green, and blue saturations)
    +** Processing line: ~     4. the alpha (or transparency)~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +     4. the alpha (or transparency)
    +** Processing line: ~     For more information about lines, go to mygame/documentation/04-lines.md.~
     - Inside source: true
     *** True Line Result
    -    end
    +     For more information about lines, go to mygame/documentation/04-lines.md.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  end~
    +** Processing line: ~   - args.state.solids (and args.state.borders):~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +   - args.state.solids (and args.state.borders):
    +** Processing line: ~     The parameters for a solid (or border) are~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def tick args~
    +     The parameters for a solid (or border) are
    +** Processing line: ~     1. the position (x, y)~
     - Inside source: true
     *** True Line Result
    -  def tick args
    -** Processing line: ~    defaults args~
    +     1. the position (x, y)
    +** Processing line: ~     2. the width (w)~
     - Inside source: true
     *** True Line Result
    -    defaults args
    -** Processing line: ~    render args~
    +     2. the width (w)
    +** Processing line: ~     3. the height (h)~
     - Inside source: true
     *** True Line Result
    -    render args
    -** Processing line: ~    calc args~
    +     3. the height (h)
    +** Processing line: ~     4. the color (r, g, b)~
     - Inside source: true
     *** True Line Result
    -    calc args
    -** Processing line: ~~
    +     4. the color (r, g, b)
    +** Processing line: ~     5. the alpha (or transparency)~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    #args.outputs.lines << [0, 0, args.grid.w, args.grid.h]~
    +     5. the alpha (or transparency)
    +** Processing line: ~     For more information about solids and borders, go to mygame/documentation/03-solids-and-borders.md.~
     - Inside source: true
     *** True Line Result
    -    #args.outputs.lines << [0, 0, args.grid.w, args.grid.h]
    +     For more information about solids and borders, go to mygame/documentation/03-solids-and-borders.md.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    #$tc+=1~
    +** Processing line: ~   - args.state.sprites:~
     - Inside source: true
     *** True Line Result
    -    #$tc+=1
    -** Processing line: ~    #if $tc == 5~
    +   - args.state.sprites:
    +** Processing line: ~     The parameters for a sprite are~
     - Inside source: true
     *** True Line Result
    -    #if $tc == 5
    -** Processing line: ~      #$train << [args.state.ball.xy.x, args.state.ball.xy.y]~
    +     The parameters for a sprite are
    +** Processing line: ~     1. the position (x, y)~
     - Inside source: true
     *** True Line Result
    -      #$train << [args.state.ball.xy.x, args.state.ball.xy.y]
    -** Processing line: ~      #$tc = 0~
    +     1. the position (x, y)
    +** Processing line: ~     2. the width (w)~
     - Inside source: true
     *** True Line Result
    -      #$tc = 0
    -** Processing line: ~    #end~
    +     2. the width (w)
    +** Processing line: ~     3. the height (h)~
     - Inside source: true
     *** True Line Result
    -    #end
    -** Processing line: ~    #for t in $train~
    +     3. the height (h)
    +** Processing line: ~     4. the image path~
     - Inside source: true
     *** True Line Result
    -    #for t in $train
    -** Processing line: ~~
    +     4. the image path
    +** Processing line: ~     5. the angle~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      #args.outputs.solids << [t[0],t[1],5,5,255,0,0];~
    +     5. the angle
    +** Processing line: ~     6. the alpha (or transparency)~
     - Inside source: true
     *** True Line Result
    -      #args.outputs.solids << [t[0],t[1],5,5,255,0,0];
    -** Processing line: ~    #end~
    +     6. the alpha (or transparency)
    +** Processing line: ~     For more information about sprites, go to mygame/documentation/05-sprites.md.~
     - Inside source: true
     *** True Line Result
    -    #end
    -** Processing line: ~  end~
    +     For more information about sprites, go to mygame/documentation/05-sprites.md.
    +** Processing line: ~  =end~
     - Inside source: true
     *** True Line Result
    -  end
    +  =end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~#+end_src~
    -- Line was identified as the end of a code block.
    -*** True Line Result
    -#+end_src
    -** Processing line: ~~
    -- End of paragraph detected.
    -*** True Line Result
    -
    -** Processing line: ~*** Physics And Collisions - Collision With Object Removal - paddle.rb~
    -- Header detected.
    -*** True Line Result
    -
    -*** True Line Result
    -*** Physics And Collisions - Collision With Object Removal - paddle.rb
    -** Processing line: ~#+begin_src ruby~
    -- Line was identified as the beginning of a code block.
    -*** True Line Result
    -
    -*** True Line Result
    -#+begin_src ruby
    -** Processing line: ~  # ./samples/04_physics_and_collisions/10_collision_with_object_removal/app/paddle.rb~
    -- Inside source: true
    -*** True Line Result
    -  # ./samples/04_physics_and_collisions/10_collision_with_object_removal/app/paddle.rb
    -** Processing line: ~  class Paddle~
    +** Processing line: ~  # This sample app shows different objects that can be used when making games, such as labels,~
     - Inside source: true
     *** True Line Result
    -  class Paddle
    -** Processing line: ~    attr_accessor :enabled~
    +  # This sample app shows different objects that can be used when making games, such as labels,
    +** Processing line: ~  # lines, sprites, solids, buttons, etc. Each demo section shows how these objects can be used.~
     - Inside source: true
     *** True Line Result
    -    attr_accessor :enabled
    +  # lines, sprites, solids, buttons, etc. Each demo section shows how these objects can be used.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def initialize ()~
    -- Inside source: true
    -*** True Line Result
    -    def initialize ()
    -** Processing line: ~      @x=WIDTH/2~
    -- Inside source: true
    -*** True Line Result
    -      @x=WIDTH/2
    -** Processing line: ~      @y=100~
    +** Processing line: ~  # Also note that state.tick_count refers to the passage of time, or current frame.~
     - Inside source: true
     *** True Line Result
    -      @y=100
    -** Processing line: ~      @width=100~
    +  # Also note that state.tick_count refers to the passage of time, or current frame.
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      @width=100
    -** Processing line: ~      @height=20~
    +
    +** Processing line: ~  class TechDemo~
     - Inside source: true
     *** True Line Result
    -      @height=20
    -** Processing line: ~      @speed=10~
    +  class TechDemo
    +** Processing line: ~    attr_accessor :inputs, :state, :outputs, :grid, :args~
     - Inside source: true
     *** True Line Result
    -      @speed=10
    +    attr_accessor :inputs, :state, :outputs, :grid, :args
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      @xyCollision  = LinearCollider.new({x: @x,y: @y+@height+5}, {x: @x+@width, y: @y+@height+5})~
    -- Inside source: true
    -*** True Line Result
    -      @xyCollision  = LinearCollider.new({x: @x,y: @y+@height+5}, {x: @x+@width, y: @y+@height+5})
    -** Processing line: ~      @xyCollision2 = LinearCollider.new({x: @x,y: @y}, {x: @x+@width, y: @y}, :pos)~
    +** Processing line: ~    # Calls all methods necessary for the app to run properly.~
     - Inside source: true
     *** True Line Result
    -      @xyCollision2 = LinearCollider.new({x: @x,y: @y}, {x: @x+@width, y: @y}, :pos)
    -** Processing line: ~      @xyCollision3 = LinearCollider.new({x: @x,y: @y}, {x: @x, y: @y+@height+5})~
    +    # Calls all methods necessary for the app to run properly.
    +** Processing line: ~    def tick~
     - Inside source: true
     *** True Line Result
    -      @xyCollision3 = LinearCollider.new({x: @x,y: @y}, {x: @x, y: @y+@height+5})
    -** Processing line: ~      @xyCollision4 = LinearCollider.new({x: @x+@width,y: @y}, {x: @x+@width, y: @y+@height+5}, :pos)~
    +    def tick
    +** Processing line: ~      labels_tech_demo~
     - Inside source: true
     *** True Line Result
    -      @xyCollision4 = LinearCollider.new({x: @x+@width,y: @y}, {x: @x+@width, y: @y+@height+5}, :pos)
    -** Processing line: ~~
    +      labels_tech_demo
    +** Processing line: ~      lines_tech_demo~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      @enabled = true~
    +      lines_tech_demo
    +** Processing line: ~      solids_tech_demo~
     - Inside source: true
     *** True Line Result
    -      @enabled = true
    -** Processing line: ~    end~
    +      solids_tech_demo
    +** Processing line: ~      borders_tech_demo~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +      borders_tech_demo
    +** Processing line: ~      sprites_tech_demo~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def update args~
    +      sprites_tech_demo
    +** Processing line: ~      keyboards_tech_demo~
     - Inside source: true
     *** True Line Result
    -    def update args
    -** Processing line: ~      @xyCollision.resetPoints({x: @x,y: @y+@height+5}, {x: @x+@width, y: @y+@height+5})~
    +      keyboards_tech_demo
    +** Processing line: ~      controller_tech_demo~
     - Inside source: true
     *** True Line Result
    -      @xyCollision.resetPoints({x: @x,y: @y+@height+5}, {x: @x+@width, y: @y+@height+5})
    -** Processing line: ~      @xyCollision2.resetPoints({x: @x,y: @y}, {x: @x+@width, y: @y})~
    +      controller_tech_demo
    +** Processing line: ~      mouse_tech_demo~
     - Inside source: true
     *** True Line Result
    -      @xyCollision2.resetPoints({x: @x,y: @y}, {x: @x+@width, y: @y})
    -** Processing line: ~      @xyCollision3.resetPoints({x: @x,y: @y}, {x: @x, y: @y+@height+5})~
    +      mouse_tech_demo
    +** Processing line: ~      point_to_rect_tech_demo~
     - Inside source: true
     *** True Line Result
    -      @xyCollision3.resetPoints({x: @x,y: @y}, {x: @x, y: @y+@height+5})
    -** Processing line: ~      @xyCollision4.resetPoints({x: @x+@width,y: @y}, {x: @x+@width, y: @y+@height+5})~
    +      point_to_rect_tech_demo
    +** Processing line: ~      rect_to_rect_tech_demo~
     - Inside source: true
     *** True Line Result
    -      @xyCollision4.resetPoints({x: @x+@width,y: @y}, {x: @x+@width, y: @y+@height+5})
    -** Processing line: ~~
    +      rect_to_rect_tech_demo
    +** Processing line: ~      button_tech_demo~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      @xyCollision.update  args~
    +      button_tech_demo
    +** Processing line: ~      export_game_state_demo~
     - Inside source: true
     *** True Line Result
    -      @xyCollision.update  args
    -** Processing line: ~      @xyCollision2.update args~
    +      export_game_state_demo
    +** Processing line: ~      window_state_demo~
     - Inside source: true
     *** True Line Result
    -      @xyCollision2.update args
    -** Processing line: ~      @xyCollision3.update args~
    +      window_state_demo
    +** Processing line: ~      render_seperators~
     - Inside source: true
     *** True Line Result
    -      @xyCollision3.update args
    -** Processing line: ~      @xyCollision4.update args~
    +      render_seperators
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      @xyCollision4.update args
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      args.inputs.keyboard.key_held.left  ||= false~
    -- Inside source: true
    -*** True Line Result
    -      args.inputs.keyboard.key_held.left  ||= false
    -** Processing line: ~      args.inputs.keyboard.key_held.right  ||= false~
    +** Processing line: ~    # Shows output of different kinds of labels on the screen~
     - Inside source: true
     *** True Line Result
    -      args.inputs.keyboard.key_held.right  ||= false
    -** Processing line: ~~
    +    # Shows output of different kinds of labels on the screen
    +** Processing line: ~    def labels_tech_demo~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      if not (args.inputs.keyboard.key_held.left == args.inputs.keyboard.key_held.right)~
    +    def labels_tech_demo
    +** Processing line: ~      outputs.labels << [grid.left.shift_right(5), grid.top.shift_down(5), "This is a label located at the top left."]~
     - Inside source: true
     *** True Line Result
    -      if not (args.inputs.keyboard.key_held.left == args.inputs.keyboard.key_held.right)
    -** Processing line: ~        if args.inputs.keyboard.key_held.left && @enabled~
    +      outputs.labels << [grid.left.shift_right(5), grid.top.shift_down(5), "This is a label located at the top left."]
    +** Processing line: ~      outputs.labels << [grid.left.shift_right(5), grid.bottom.shift_up(30), "This is a label located at the bottom left."]~
     - Inside source: true
     *** True Line Result
    -        if args.inputs.keyboard.key_held.left && @enabled
    -** Processing line: ~          @x-=@speed~
    +      outputs.labels << [grid.left.shift_right(5), grid.bottom.shift_up(30), "This is a label located at the bottom left."]
    +** Processing line: ~      outputs.labels << [ 5, 690, "Labels (x, y, text, size, align, r, g, b, a)"]~
     - Inside source: true
     *** True Line Result
    -          @x-=@speed
    -** Processing line: ~        elsif args.inputs.keyboard.key_held.right && @enabled~
    +      outputs.labels << [ 5, 690, "Labels (x, y, text, size, align, r, g, b, a)"]
    +** Processing line: ~      outputs.labels << [ 5, 660, "Smaller label.",  -2]~
     - Inside source: true
     *** True Line Result
    -        elsif args.inputs.keyboard.key_held.right && @enabled
    -** Processing line: ~          @x+=@speed~
    +      outputs.labels << [ 5, 660, "Smaller label.",  -2]
    +** Processing line: ~      outputs.labels << [ 5, 630, "Small label.",    -1]~
     - Inside source: true
     *** True Line Result
    -          @x+=@speed
    -** Processing line: ~        end~
    +      outputs.labels << [ 5, 630, "Small label.",    -1]
    +** Processing line: ~      outputs.labels << [ 5, 600, "Medium label.",    0]~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~      end~
    +      outputs.labels << [ 5, 600, "Medium label.",    0]
    +** Processing line: ~      outputs.labels << [ 5, 570, "Large label.",     1]~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +      outputs.labels << [ 5, 570, "Large label.",     1]
    +** Processing line: ~      outputs.labels << [ 5, 540, "Larger label.",    2]~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      xmin =WIDTH/4~
    +      outputs.labels << [ 5, 540, "Larger label.",    2]
    +** Processing line: ~      outputs.labels << [300, 660, "Left aligned.",    0, 2]~
     - Inside source: true
     *** True Line Result
    -      xmin =WIDTH/4
    -** Processing line: ~      xmax = 3*(WIDTH/4)~
    +      outputs.labels << [300, 660, "Left aligned.",    0, 2]
    +** Processing line: ~      outputs.labels << [300, 640, "Center aligned.",  0, 1]~
     - Inside source: true
     *** True Line Result
    -      xmax = 3*(WIDTH/4)
    -** Processing line: ~      @x = (@x+@width > xmax) ? xmax-@width : (@x xmax) ? xmax-@width : (@x")~
     - Inside source: true
     *** True Line Result
    -  # This sample app is a classic game of Tic Tac Toe.
    +      outputs.labels << small_label(x, 15, "Click inside the blue box maybe ---->")
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  class TicTacToe~
    +** Processing line: ~      box = [765, 370, 50, 50, 0, 0, 170] # blue box~
     - Inside source: true
     *** True Line Result
    -  class TicTacToe
    -** Processing line: ~    attr_accessor :_, :state, :outputs, :inputs, :grid, :gtk~
    +      box = [765, 370, 50, 50, 0, 0, 170] # blue box
    +** Processing line: ~      outputs.borders << box~
     - Inside source: true
     *** True Line Result
    -    attr_accessor :_, :state, :outputs, :inputs, :grid, :gtk
    +      outputs.borders << box
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Starts the game with player x's turn and creates an array (to_a) for space combinations.~
    +** Processing line: ~      if state.last_mouse_click # if the mouse was clicked~
     - Inside source: true
     *** True Line Result
    -    # Starts the game with player x's turn and creates an array (to_a) for space combinations.
    -** Processing line: ~    # Calls methods necessary for the game to run properly.~
    +      if state.last_mouse_click # if the mouse was clicked
    +** Processing line: ~        if state.last_mouse_click.point.inside_rect? box # if mouse clicked inside box~
     - Inside source: true
     *** True Line Result
    -    # Calls methods necessary for the game to run properly.
    -** Processing line: ~    def tick~
    +        if state.last_mouse_click.point.inside_rect? box # if mouse clicked inside box
    +** Processing line: ~          outputs.labels << small_label(x, 16, "Mouse click happened inside the box.")~
     - Inside source: true
     *** True Line Result
    -    def tick
    -** Processing line: ~      state.current_turn ||= :x~
    +          outputs.labels << small_label(x, 16, "Mouse click happened inside the box.")
    +** Processing line: ~        else # otherwise, if mouse was clicked outside the box~
     - Inside source: true
     *** True Line Result
    -      state.current_turn ||= :x
    -** Processing line: ~      state.space_combinations = [-1, 0, 1].product([-1, 0, 1]).to_a~
    +        else # otherwise, if mouse was clicked outside the box
    +** Processing line: ~          outputs.labels << small_label(x, 16, "Mouse click happened outside the box.")~
     - Inside source: true
     *** True Line Result
    -      state.space_combinations = [-1, 0, 1].product([-1, 0, 1]).to_a
    -** Processing line: ~      render_board~
    +          outputs.labels << small_label(x, 16, "Mouse click happened outside the box.")
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -      render_board
    -** Processing line: ~      input_board~
    +        end
    +** Processing line: ~      else # otherwise, if was not clicked at all~
     - Inside source: true
     *** True Line Result
    -      input_board
    -** Processing line: ~    end~
    +      else # otherwise, if was not clicked at all
    +** Processing line: ~        outputs.labels << small_label(x, 16, "Mouse click has not occurred yet.") # output if the mouse was not clicked~
     - Inside source: true
     *** True Line Result
    -    end
    +        outputs.labels << small_label(x, 16, "Mouse click has not occurred yet.") # output if the mouse was not clicked
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Uses borders to create grid squares for the game's board. Also outputs the game pieces using labels.~
    +** Processing line: ~      # border around mouse input demo section~
     - Inside source: true
     *** True Line Result
    -    # Uses borders to create grid squares for the game's board. Also outputs the game pieces using labels.
    -** Processing line: ~    def render_board~
    +      # border around mouse input demo section
    +** Processing line: ~      outputs.borders << [455, row_to_px(14), 360, row_to_px(11).shift_up(5) - row_to_px(14)]~
     - Inside source: true
     *** True Line Result
    -    def render_board
    -** Processing line: ~      square_size = 80~
    +      outputs.borders << [455, row_to_px(14), 360, row_to_px(11).shift_up(5) - row_to_px(14)]
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      square_size = 80
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      # Positions the game's board in the center of the screen.~
    +** Processing line: ~    # Outputs a red box onto the screen. A mouse click from the user inside of the red box will output~
     - Inside source: true
     *** True Line Result
    -      # Positions the game's board in the center of the screen.
    -** Processing line: ~      # Try removing what follows grid.w_half or grid.h_half and see how the position changes!~
    +    # Outputs a red box onto the screen. A mouse click from the user inside of the red box will output
    +** Processing line: ~    # a smaller box. If two small boxes are inside of the red box, it will be determined whether or not~
     - Inside source: true
     *** True Line Result
    -      # Try removing what follows grid.w_half or grid.h_half and see how the position changes!
    -** Processing line: ~      board_left = grid.w_half - square_size * 1.5~
    +    # a smaller box. If two small boxes are inside of the red box, it will be determined whether or not
    +** Processing line: ~    # they intersect.~
     - Inside source: true
     *** True Line Result
    -      board_left = grid.w_half - square_size * 1.5
    -** Processing line: ~      board_top  = grid.h_half - square_size * 1.5~
    +    # they intersect.
    +** Processing line: ~    def rect_to_rect_tech_demo~
     - Inside source: true
     *** True Line Result
    -      board_top  = grid.h_half - square_size * 1.5
    -** Processing line: ~~
    +    def rect_to_rect_tech_demo
    +** Processing line: ~      x = 460~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      # At first glance, the add(1) looks pretty trivial. But if you remove it,~
    +      x = 460
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      # At first glance, the add(1) looks pretty trivial. But if you remove it,
    -** Processing line: ~      # you'll see that the positioning of the board would be skewed without it!~
    +
    +** Processing line: ~      outputs.labels << small_label(x, 17.5, "Click inside the red box below.") # label with instructions~
     - Inside source: true
     *** True Line Result
    -      # you'll see that the positioning of the board would be skewed without it!
    -** Processing line: ~      # Or if you put 2 in the parenthesis, the pieces will be placed in the wrong squares~
    +      outputs.labels << small_label(x, 17.5, "Click inside the red box below.") # label with instructions
    +** Processing line: ~      red_box = [460, 250, 355, 90, 170, 0, 0] # definition of the red box~
     - Inside source: true
     *** True Line Result
    -      # Or if you put 2 in the parenthesis, the pieces will be placed in the wrong squares
    -** Processing line: ~      # due to the change in board placement.~
    +      red_box = [460, 250, 355, 90, 170, 0, 0] # definition of the red box
    +** Processing line: ~      outputs.borders << red_box # output as a border (not filled in)~
     - Inside source: true
     *** True Line Result
    -      # due to the change in board placement.
    -** Processing line: ~      outputs.borders << all_spaces do |x, y, space| # outputs borders for all board spaces~
    +      outputs.borders << red_box # output as a border (not filled in)
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      outputs.borders << all_spaces do |x, y, space| # outputs borders for all board spaces
    -** Processing line: ~        space.border ||= [~
    +
    +** Processing line: ~      # If the mouse is clicked inside the red box, two collision boxes are created.~
     - Inside source: true
     *** True Line Result
    -        space.border ||= [
    -** Processing line: ~          board_left + x.add(1) * square_size, # space.border is initialized using this definition~
    +      # If the mouse is clicked inside the red box, two collision boxes are created.
    +** Processing line: ~      if inputs.mouse.click~
     - Inside source: true
     *** True Line Result
    -          board_left + x.add(1) * square_size, # space.border is initialized using this definition
    -** Processing line: ~          board_top  + y.add(1) * square_size,~
    +      if inputs.mouse.click
    +** Processing line: ~        if inputs.mouse.click.point.inside_rect? red_box~
     - Inside source: true
     *** True Line Result
    -          board_top  + y.add(1) * square_size,
    -** Processing line: ~          square_size,~
    +        if inputs.mouse.click.point.inside_rect? red_box
    +** Processing line: ~          if !state.box_collision_one # if the collision_one box does not yet have a definition~
     - Inside source: true
     *** True Line Result
    -          square_size,
    -** Processing line: ~          square_size~
    +          if !state.box_collision_one # if the collision_one box does not yet have a definition
    +** Processing line: ~            # Subtracts 25 from the x and y positions of the click point in order to make the click point the center of the box.~
     - Inside source: true
     *** True Line Result
    -          square_size
    -** Processing line: ~        ]~
    +            # Subtracts 25 from the x and y positions of the click point in order to make the click point the center of the box.
    +** Processing line: ~            # You can try deleting the subtraction to see how it impacts the box placement.~
     - Inside source: true
     *** True Line Result
    -        ]
    -** Processing line: ~      end~
    +            # You can try deleting the subtraction to see how it impacts the box placement.
    +** Processing line: ~            state.box_collision_one = [inputs.mouse.click.point.x - 25, inputs.mouse.click.point.y - 25, 50, 50, 180, 0,   0, 180]  # sets definition~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +            state.box_collision_one = [inputs.mouse.click.point.x - 25, inputs.mouse.click.point.y - 25, 50, 50, 180, 0,   0, 180]  # sets definition
    +** Processing line: ~          elsif !state.box_collision_two # if collision_two does not yet have a definition~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      # Again, the calculations ensure that the piece is placed in the center of the grid square.~
    +          elsif !state.box_collision_two # if collision_two does not yet have a definition
    +** Processing line: ~            state.box_collision_two = [inputs.mouse.click.point.x - 25, inputs.mouse.click.point.y - 25, 50, 50,   0, 0, 180, 180] # sets definition~
     - Inside source: true
     *** True Line Result
    -      # Again, the calculations ensure that the piece is placed in the center of the grid square.
    -** Processing line: ~      # Remove the '- 20' and the piece will be placed at the top of the grid square instead of the center.~
    +            state.box_collision_two = [inputs.mouse.click.point.x - 25, inputs.mouse.click.point.y - 25, 50, 50,   0, 0, 180, 180] # sets definition
    +** Processing line: ~          else~
     - Inside source: true
     *** True Line Result
    -      # Remove the '- 20' and the piece will be placed at the top of the grid square instead of the center.
    -** Processing line: ~      outputs.labels << filled_spaces do |x, y, space| # put label in each filled space of board~
    +          else
    +** Processing line: ~            state.box_collision_one = nil # both boxes are empty~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << filled_spaces do |x, y, space| # put label in each filled space of board
    -** Processing line: ~            label board_left + x.add(1) * square_size + square_size.fdiv(2),~
    +            state.box_collision_one = nil # both boxes are empty
    +** Processing line: ~            state.box_collision_two = nil~
     - Inside source: true
     *** True Line Result
    -            label board_left + x.add(1) * square_size + square_size.fdiv(2),
    -** Processing line: ~            board_top  + y.add(1) * square_size + square_size - 20,~
    +            state.box_collision_two = nil
    +** Processing line: ~          end~
     - Inside source: true
     *** True Line Result
    -            board_top  + y.add(1) * square_size + square_size - 20,
    -** Processing line: ~            space.piece # text of label, either "x" or "o"~
    +          end
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -            space.piece # text of label, either "x" or "o"
    +        end
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    @@ -40624,86 +48891,82 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      # Uses a label to output whether x or o won, or if a draw occurred.~
    -- Inside source: true
    -*** True Line Result
    -      # Uses a label to output whether x or o won, or if a draw occurred.
    -** Processing line: ~      # If the game is ongoing, a label shows whose turn it currently is.~
    +** Processing line: ~      # If collision boxes exist, they are output onto screen inside the red box as solids~
     - Inside source: true
     *** True Line Result
    -      # If the game is ongoing, a label shows whose turn it currently is.
    -** Processing line: ~      outputs.labels << if state.x_won~
    +      # If collision boxes exist, they are output onto screen inside the red box as solids
    +** Processing line: ~      if state.box_collision_one~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << if state.x_won
    -** Processing line: ~                          label grid.w_half, grid.top - 80, "x won" # the '-80' positions the label 80 pixels lower than top~
    +      if state.box_collision_one
    +** Processing line: ~        outputs.solids << state.box_collision_one~
     - Inside source: true
     *** True Line Result
    -                          label grid.w_half, grid.top - 80, "x won" # the '-80' positions the label 80 pixels lower than top
    -** Processing line: ~                        elsif state.o_won~
    +        outputs.solids << state.box_collision_one
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -                        elsif state.o_won
    -** Processing line: ~                          label grid.w_half, grid.top - 80, "o won" # grid.w_half positions the label in the center horizontally~
    +      end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -                          label grid.w_half, grid.top - 80, "o won" # grid.w_half positions the label in the center horizontally
    -** Processing line: ~                        elsif state.draw~
    +
    +** Processing line: ~      if state.box_collision_two~
     - Inside source: true
     *** True Line Result
    -                        elsif state.draw
    -** Processing line: ~                          label grid.w_half, grid.top - 80, "a draw"~
    +      if state.box_collision_two
    +** Processing line: ~        outputs.solids << state.box_collision_two~
     - Inside source: true
     *** True Line Result
    -                          label grid.w_half, grid.top - 80, "a draw"
    -** Processing line: ~                        else # if no one won and the game is ongoing~
    +        outputs.solids << state.box_collision_two
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -                        else # if no one won and the game is ongoing
    -** Processing line: ~                          label grid.w_half, grid.top - 80, "turn: #{state.current_turn}"~
    +      end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -                          label grid.w_half, grid.top - 80, "turn: #{state.current_turn}"
    -** Processing line: ~                        end~
    +
    +** Processing line: ~      # Outputs whether or not the two collision boxes intersect.~
     - Inside source: true
     *** True Line Result
    -                        end
    -** Processing line: ~    end~
    +      # Outputs whether or not the two collision boxes intersect.
    +** Processing line: ~      if state.box_collision_one && state.box_collision_two # if both collision_boxes are defined (and not nil or empty)~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +      if state.box_collision_one && state.box_collision_two # if both collision_boxes are defined (and not nil or empty)
    +** Processing line: ~        if state.box_collision_one.intersect_rect? state.box_collision_two # if the two boxes intersect~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # Calls the methods responsible for handling user input and determining the winner.~
    +        if state.box_collision_one.intersect_rect? state.box_collision_two # if the two boxes intersect
    +** Processing line: ~          outputs.labels << small_label(x, 23.5, 'The boxes intersect.')~
     - Inside source: true
     *** True Line Result
    -    # Calls the methods responsible for handling user input and determining the winner.
    -** Processing line: ~    # Does nothing unless the mouse is clicked.~
    +          outputs.labels << small_label(x, 23.5, 'The boxes intersect.')
    +** Processing line: ~        else # otherwise, if the two boxes do not intersect~
     - Inside source: true
     *** True Line Result
    -    # Does nothing unless the mouse is clicked.
    -** Processing line: ~    def input_board~
    +        else # otherwise, if the two boxes do not intersect
    +** Processing line: ~          outputs.labels << small_label(x, 23.5, 'The boxes do not intersect.')~
     - Inside source: true
     *** True Line Result
    -    def input_board
    -** Processing line: ~      return unless inputs.mouse.click~
    +          outputs.labels << small_label(x, 23.5, 'The boxes do not intersect.')
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -      return unless inputs.mouse.click
    -** Processing line: ~      input_place_piece~
    +        end
    +** Processing line: ~      else~
     - Inside source: true
     *** True Line Result
    -      input_place_piece
    -** Processing line: ~      input_restart_game~
    +      else
    +** Processing line: ~        outputs.labels << small_label(x, 23.5, '--') # if the two boxes are not defined (are nil or empty), this label is output~
     - Inside source: true
     *** True Line Result
    -      input_restart_game
    -** Processing line: ~      determine_winner~
    +        outputs.labels << small_label(x, 23.5, '--') # if the two boxes are not defined (are nil or empty), this label is output
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -      determine_winner
    +      end
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -40712,98 +48975,102 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Handles user input for placing pieces on the board.~
    +** Processing line: ~    # Creates a button and outputs it onto the screen using labels and borders.~
     - Inside source: true
     *** True Line Result
    -    # Handles user input for placing pieces on the board.
    -** Processing line: ~    def input_place_piece~
    +    # Creates a button and outputs it onto the screen using labels and borders.
    +** Processing line: ~    # If the button is clicked, the color changes to make it look faded.~
     - Inside source: true
     *** True Line Result
    -    def input_place_piece
    -** Processing line: ~      return if state.game_over~
    +    # If the button is clicked, the color changes to make it look faded.
    +** Processing line: ~    def button_tech_demo~
     - Inside source: true
     *** True Line Result
    -      return if state.game_over
    -** Processing line: ~~
    +    def button_tech_demo
    +** Processing line: ~      x, y, w, h = 460, 160, 300, 50~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      # Checks to find the space that the mouse was clicked inside of, and makes sure the space does not already~
    +      x, y, w, h = 460, 160, 300, 50
    +** Processing line: ~      state.button        ||= state.new_entity(:button_with_fade)~
     - Inside source: true
     *** True Line Result
    -      # Checks to find the space that the mouse was clicked inside of, and makes sure the space does not already
    -** Processing line: ~      # have a piece in it.~
    +      state.button        ||= state.new_entity(:button_with_fade)
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      # have a piece in it.
    -** Processing line: ~      __, __, space = all_spaces.find do |__, __, space|~
    +
    +** Processing line: ~      # Adds w.half to x and h.half + 10 to y in order to display the text inside the button's borders.~
     - Inside source: true
     *** True Line Result
    -      __, __, space = all_spaces.find do |__, __, space|
    -** Processing line: ~        inputs.mouse.click.point.inside_rect?(space.border) && !space.piece~
    +      # Adds w.half to x and h.half + 10 to y in order to display the text inside the button's borders.
    +** Processing line: ~      state.button.label  ||= [x + w.half, y + h.half + 10, "click me and watch me fade", 0, 1]~
     - Inside source: true
     *** True Line Result
    -        inputs.mouse.click.point.inside_rect?(space.border) && !space.piece
    -** Processing line: ~      end~
    +      state.button.label  ||= [x + w.half, y + h.half + 10, "click me and watch me fade", 0, 1]
    +** Processing line: ~      state.button.border ||= [x, y, w, h]~
     - Inside source: true
     *** True Line Result
    -      end
    +      state.button.border ||= [x, y, w, h]
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      # The piece that goes into the space belongs to the player whose turn it currently is.~
    +** Processing line: ~      if inputs.mouse.click && inputs.mouse.click.point.inside_rect?(state.button.border) # if mouse is clicked, and clicked inside button's border~
     - Inside source: true
     *** True Line Result
    -      # The piece that goes into the space belongs to the player whose turn it currently is.
    -** Processing line: ~      return unless space~
    +      if inputs.mouse.click && inputs.mouse.click.point.inside_rect?(state.button.border) # if mouse is clicked, and clicked inside button's border
    +** Processing line: ~        state.button.clicked_at = inputs.mouse.click.created_at # stores the time the click occurred~
     - Inside source: true
     *** True Line Result
    -      return unless space
    -** Processing line: ~      space.piece = state.current_turn~
    +        state.button.clicked_at = inputs.mouse.click.created_at # stores the time the click occurred
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -      space.piece = state.current_turn
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      # This ternary operator statement allows us to change the current player's turn.~
    +** Processing line: ~      outputs.labels << state.button.label~
     - Inside source: true
     *** True Line Result
    -      # This ternary operator statement allows us to change the current player's turn.
    -** Processing line: ~      # If it is currently x's turn, it becomes o's turn. If it is not x's turn, it become's x's turn.~
    +      outputs.labels << state.button.label
    +** Processing line: ~      outputs.borders << state.button.border~
     - Inside source: true
     *** True Line Result
    -      # If it is currently x's turn, it becomes o's turn. If it is not x's turn, it become's x's turn.
    -** Processing line: ~      state.current_turn = state.current_turn == :x ? :o : :x~
    +      outputs.borders << state.button.border
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      state.current_turn = state.current_turn == :x ? :o : :x
    -** Processing line: ~    end~
    +
    +** Processing line: ~      if state.button.clicked_at # if button was clicked (variable has a value and is not nil)~
     - Inside source: true
     *** True Line Result
    -    end
    +      if state.button.clicked_at # if button was clicked (variable has a value and is not nil)
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Resets the game.~
    +** Processing line: ~        # The appearance of the button changes for 0.25 seconds after the time the button is clicked at.~
     - Inside source: true
     *** True Line Result
    -    # Resets the game.
    -** Processing line: ~    def input_restart_game~
    +        # The appearance of the button changes for 0.25 seconds after the time the button is clicked at.
    +** Processing line: ~        # The color changes (rgb is set to 0, 180, 80) and the transparency gradually changes.~
     - Inside source: true
     *** True Line Result
    -    def input_restart_game
    -** Processing line: ~      return unless state.game_over~
    +        # The color changes (rgb is set to 0, 180, 80) and the transparency gradually changes.
    +** Processing line: ~        # Change 0.25 to 1.25 and notice that the transparency takes longer to return to normal.~
     - Inside source: true
     *** True Line Result
    -      return unless state.game_over
    -** Processing line: ~      gtk.reset~
    +        # Change 0.25 to 1.25 and notice that the transparency takes longer to return to normal.
    +** Processing line: ~        outputs.solids << [x, y, w, h, 0, 180, 80, 255 * state.button.clicked_at.ease(0.25.seconds, :flip)]~
     - Inside source: true
     *** True Line Result
    -      gtk.reset
    +        outputs.solids << [x, y, w, h, 0, 180, 80, 255 * state.button.clicked_at.ease(0.25.seconds, :flip)]
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -40812,38 +49079,34 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Checks if x or o won the game.~
    -- Inside source: true
    -*** True Line Result
    -    # Checks if x or o won the game.
    -** Processing line: ~    # If neither player wins and all nine squares are filled, a draw happens.~
    +** Processing line: ~    # Creates a new button by declaring it as a new entity, and sets values.~
     - Inside source: true
     *** True Line Result
    -    # If neither player wins and all nine squares are filled, a draw happens.
    -** Processing line: ~    # Once a player is chosen as the winner or a draw happens, the game is over.~
    +    # Creates a new button by declaring it as a new entity, and sets values.
    +** Processing line: ~    def new_button_prefab x, y, message~
     - Inside source: true
     *** True Line Result
    -    # Once a player is chosen as the winner or a draw happens, the game is over.
    -** Processing line: ~    def determine_winner~
    +    def new_button_prefab x, y, message
    +** Processing line: ~      w, h = 300, 50~
     - Inside source: true
     *** True Line Result
    -    def determine_winner
    -** Processing line: ~      state.x_won = won? :x # evaluates to either true or false (boolean values)~
    +      w, h = 300, 50
    +** Processing line: ~      button        = state.new_entity(:button_with_fade)~
     - Inside source: true
     *** True Line Result
    -      state.x_won = won? :x # evaluates to either true or false (boolean values)
    -** Processing line: ~      state.o_won = won? :o~
    +      button        = state.new_entity(:button_with_fade)
    +** Processing line: ~      button.label  = [x + w.half, y + h.half + 10, message, 0, 1] # '+ 10' keeps label's text within button's borders~
     - Inside source: true
     *** True Line Result
    -      state.o_won = won? :o
    -** Processing line: ~      state.draw = true if filled_spaces.length == 9 && !state.x_won && !state.o_won~
    +      button.label  = [x + w.half, y + h.half + 10, message, 0, 1] # '+ 10' keeps label's text within button's borders
    +** Processing line: ~      button.border = [x, y, w, h] # sets border definition~
     - Inside source: true
     *** True Line Result
    -      state.draw = true if filled_spaces.length == 9 && !state.x_won && !state.o_won
    -** Processing line: ~      state.game_over = state.x_won || state.o_won || state.draw~
    +      button.border = [x, y, w, h] # sets border definition
    +** Processing line: ~      button~
     - Inside source: true
     *** True Line Result
    -      state.game_over = state.x_won || state.o_won || state.draw
    +      button
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -40852,94 +49115,58 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Determines if a player won by checking if there is a horizontal match or vertical match.~
    +** Processing line: ~    # If the mouse has been clicked and the click's location is inside of the button's border, that means~
     - Inside source: true
     *** True Line Result
    -    # Determines if a player won by checking if there is a horizontal match or vertical match.
    -** Processing line: ~    # Horizontal_match and vertical_match have boolean values. If either is true, the game has been won.~
    +    # If the mouse has been clicked and the click's location is inside of the button's border, that means
    +** Processing line: ~    # that the button has been clicked. This method returns a boolean value.~
     - Inside source: true
     *** True Line Result
    -    # Horizontal_match and vertical_match have boolean values. If either is true, the game has been won.
    -** Processing line: ~    def won? piece~
    +    # that the button has been clicked. This method returns a boolean value.
    +** Processing line: ~    def button_clicked? button~
     - Inside source: true
     *** True Line Result
    -    def won? piece
    -** Processing line: ~      # performs action on all space combinations~
    +    def button_clicked? button
    +** Processing line: ~      inputs.mouse.click && inputs.mouse.click.point.inside_rect?(button.border)~
     - Inside source: true
     *** True Line Result
    -      # performs action on all space combinations
    -** Processing line: ~      won = [[-1, 0, 1]].product([-1, 0, 1]).map do |xs, y|~
    +      inputs.mouse.click && inputs.mouse.click.point.inside_rect?(button.border)
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      won = [[-1, 0, 1]].product([-1, 0, 1]).map do |xs, y|
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~        # Checks if the 3 grid spaces with the same y value (or same row) and~
    -- Inside source: true
    -*** True Line Result
    -        # Checks if the 3 grid spaces with the same y value (or same row) and
    -** Processing line: ~        # x values that are next to each other have pieces that belong to the same player.~
    -- Inside source: true
    -*** True Line Result
    -        # x values that are next to each other have pieces that belong to the same player.
    -** Processing line: ~        # Remember, the value of piece is equal to the current turn (which is the player).~
    +** Processing line: ~    # Determines if button was clicked, and changes its appearance if it is clicked~
     - Inside source: true
     *** True Line Result
    -        # Remember, the value of piece is equal to the current turn (which is the player).
    -** Processing line: ~        horizontal_match = state.spaces[xs[0]][y].piece == piece &&~
    +    # Determines if button was clicked, and changes its appearance if it is clicked
    +** Processing line: ~    def tick_button_prefab button~
     - Inside source: true
     *** True Line Result
    -        horizontal_match = state.spaces[xs[0]][y].piece == piece &&
    -** Processing line: ~                           state.spaces[xs[1]][y].piece == piece &&~
    +    def tick_button_prefab button
    +** Processing line: ~      outputs.labels << button.label # outputs button's label and border~
     - Inside source: true
     *** True Line Result
    -                           state.spaces[xs[1]][y].piece == piece &&
    -** Processing line: ~                           state.spaces[xs[2]][y].piece == piece~
    +      outputs.labels << button.label # outputs button's label and border
    +** Processing line: ~      outputs.borders << button.border~
     - Inside source: true
     *** True Line Result
    -                           state.spaces[xs[2]][y].piece == piece
    +      outputs.borders << button.border
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~        # Checks if the 3 grid spaces with the same x value (or same column) and~
    -- Inside source: true
    -*** True Line Result
    -        # Checks if the 3 grid spaces with the same x value (or same column) and
    -** Processing line: ~        # y values that are next to each other have pieces that belong to the same player.~
    -- Inside source: true
    -*** True Line Result
    -        # y values that are next to each other have pieces that belong to the same player.
    -** Processing line: ~        # The && represents an "and" statement: if even one part of the statement is false,~
    -- Inside source: true
    -*** True Line Result
    -        # The && represents an "and" statement: if even one part of the statement is false,
    -** Processing line: ~        # the entire statement evaluates to false.~
    -- Inside source: true
    -*** True Line Result
    -        # the entire statement evaluates to false.
    -** Processing line: ~        vertical_match = state.spaces[y][xs[0]].piece == piece &&~
    -- Inside source: true
    -*** True Line Result
    -        vertical_match = state.spaces[y][xs[0]].piece == piece &&
    -** Processing line: ~                         state.spaces[y][xs[1]].piece == piece &&~
    -- Inside source: true
    -*** True Line Result
    -                         state.spaces[y][xs[1]].piece == piece &&
    -** Processing line: ~                         state.spaces[y][xs[2]].piece == piece~
    -- Inside source: true
    -*** True Line Result
    -                         state.spaces[y][xs[2]].piece == piece
    -** Processing line: ~~
    +** Processing line: ~      if button_clicked? button # if button is clicked~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~        horizontal_match || vertical_match # if either is true, true is returned~
    +      if button_clicked? button # if button is clicked
    +** Processing line: ~        button.clicked_at = inputs.mouse.click.created_at # stores the time that the button was clicked~
     - Inside source: true
     *** True Line Result
    -        horizontal_match || vertical_match # if either is true, true is returned
    +        button.clicked_at = inputs.mouse.click.created_at # stores the time that the button was clicked
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    @@ -40948,62 +49175,62 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      # Sees if there is a diagonal match, starting from the bottom left and ending at the top right.~
    +** Processing line: ~      if button.clicked_at # if clicked_at has a frame value and is not nil~
     - Inside source: true
     *** True Line Result
    -      # Sees if there is a diagonal match, starting from the bottom left and ending at the top right.
    -** Processing line: ~      # Is added to won regardless of whether the statement is true or false.~
    +      if button.clicked_at # if clicked_at has a frame value and is not nil
    +** Processing line: ~        # button is output; color changes and transparency changes for 0.25 seconds after click occurs~
     - Inside source: true
     *** True Line Result
    -      # Is added to won regardless of whether the statement is true or false.
    -** Processing line: ~      won << (state.spaces[-1][-1].piece == piece && # bottom left~
    +        # button is output; color changes and transparency changes for 0.25 seconds after click occurs
    +** Processing line: ~        outputs.solids << [button.border.x, button.border.y, button.border.w, button.border.h,~
     - Inside source: true
     *** True Line Result
    -      won << (state.spaces[-1][-1].piece == piece && # bottom left
    -** Processing line: ~              state.spaces[ 0][ 0].piece == piece && # center~
    +        outputs.solids << [button.border.x, button.border.y, button.border.w, button.border.h,
    +** Processing line: ~                           0, 180, 80, 255 * button.clicked_at.ease(0.25.seconds, :flip)] # transparency changes for 0.25 seconds~
     - Inside source: true
     *** True Line Result
    -              state.spaces[ 0][ 0].piece == piece && # center
    -** Processing line: ~              state.spaces[ 1][ 1].piece == piece)   # top right~
    +                           0, 180, 80, 255 * button.clicked_at.ease(0.25.seconds, :flip)] # transparency changes for 0.25 seconds
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -              state.spaces[ 1][ 1].piece == piece)   # top right
    -** Processing line: ~~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      # Sees if there is a diagonal match, starting at the bottom right and ending at the top left~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      # Sees if there is a diagonal match, starting at the bottom right and ending at the top left
    -** Processing line: ~      # and is added to won.~
    +
    +** Processing line: ~    # Exports the app's game state if the export button is clicked.~
     - Inside source: true
     *** True Line Result
    -      # and is added to won.
    -** Processing line: ~      won << (state.spaces[ 1][-1].piece == piece && # bottom right~
    +    # Exports the app's game state if the export button is clicked.
    +** Processing line: ~    def export_game_state_demo~
     - Inside source: true
     *** True Line Result
    -      won << (state.spaces[ 1][-1].piece == piece && # bottom right
    -** Processing line: ~              state.spaces[ 0][ 0].piece == piece && # center~
    +    def export_game_state_demo
    +** Processing line: ~      state.export_game_state_button ||= new_button_prefab(460, 100, "click to export app state")~
     - Inside source: true
     *** True Line Result
    -              state.spaces[ 0][ 0].piece == piece && # center
    -** Processing line: ~              state.spaces[-1][ 1].piece == piece)   # top left~
    +      state.export_game_state_button ||= new_button_prefab(460, 100, "click to export app state")
    +** Processing line: ~      tick_button_prefab(state.export_game_state_button) # calls method to output button~
     - Inside source: true
     *** True Line Result
    -              state.spaces[-1][ 1].piece == piece)   # top left
    -** Processing line: ~~
    +      tick_button_prefab(state.export_game_state_button) # calls method to output button
    +** Processing line: ~      if button_clicked? state.export_game_state_button # if the export button is clicked~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      # Any false statements (meaning false diagonal matches) are rejected from won~
    +      if button_clicked? state.export_game_state_button # if the export button is clicked
    +** Processing line: ~        args.gtk.export! "Exported from clicking the export button in the tech demo." # the export occurs~
     - Inside source: true
     *** True Line Result
    -      # Any false statements (meaning false diagonal matches) are rejected from won
    -** Processing line: ~      won.reject_false.any?~
    +        args.gtk.export! "Exported from clicking the export button in the tech demo." # the export occurs
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -      won.reject_false.any?
    +      end
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -41012,58 +49239,46 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Defines filled spaces on the board by rejecting all spaces that do not have game pieces in them.~
    -- Inside source: true
    -*** True Line Result
    -    # Defines filled spaces on the board by rejecting all spaces that do not have game pieces in them.
    -** Processing line: ~    # The ! before a statement means "not". For example, we are rejecting any space combinations that do~
    -- Inside source: true
    -*** True Line Result
    -    # The ! before a statement means "not". For example, we are rejecting any space combinations that do
    -** Processing line: ~    # NOT have pieces in them.~
    -- Inside source: true
    -*** True Line Result
    -    # NOT have pieces in them.
    -** Processing line: ~    def filled_spaces~
    +** Processing line: ~    # The mouse and keyboard focus are set to "yes" when the Dragonruby window is the active window.~
     - Inside source: true
     *** True Line Result
    -    def filled_spaces
    -** Processing line: ~      state.space_combinations~
    +    # The mouse and keyboard focus are set to "yes" when the Dragonruby window is the active window.
    +** Processing line: ~    def window_state_demo~
     - Inside source: true
     *** True Line Result
    -      state.space_combinations
    -** Processing line: ~        .reject { |x, y| !state.spaces[x][y].piece } # reject spaces with no pieces in them~
    +    def window_state_demo
    +** Processing line: ~      m = $gtk.args.inputs.mouse.has_focus ? 'Y' : 'N' # ternary operator (similar to if statement)~
     - Inside source: true
     *** True Line Result
    -        .reject { |x, y| !state.spaces[x][y].piece } # reject spaces with no pieces in them
    -** Processing line: ~        .map do |x, y|~
    +      m = $gtk.args.inputs.mouse.has_focus ? 'Y' : 'N' # ternary operator (similar to if statement)
    +** Processing line: ~      k = $gtk.args.inputs.keyboard.has_focus ? 'Y' : 'N'~
     - Inside source: true
     *** True Line Result
    -        .map do |x, y|
    -** Processing line: ~          if block_given?~
    +      k = $gtk.args.inputs.keyboard.has_focus ? 'Y' : 'N'
    +** Processing line: ~      outputs.labels << [460, 20, "mouse focus: #{m}   keyboard focus: #{k}", small_font]~
     - Inside source: true
     *** True Line Result
    -          if block_given?
    -** Processing line: ~            yield x, y, state.spaces[x][y]~
    +      outputs.labels << [460, 20, "mouse focus: #{m}   keyboard focus: #{k}", small_font]
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -            yield x, y, state.spaces[x][y]
    -** Processing line: ~          else~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          else
    -** Processing line: ~            [x, y, state.spaces[x][y]] # sets definition of space~
    +
    +** Processing line: ~    #Sets values for the horizontal separator (divides demo sections)~
     - Inside source: true
     *** True Line Result
    -            [x, y, state.spaces[x][y]] # sets definition of space
    -** Processing line: ~          end~
    +    #Sets values for the horizontal separator (divides demo sections)
    +** Processing line: ~    def horizontal_seperator y, x, x2~
     - Inside source: true
     *** True Line Result
    -          end
    -** Processing line: ~      end~
    +    def horizontal_seperator y, x, x2
    +** Processing line: ~      [x, y, x2, y, 150, 150, 150]~
     - Inside source: true
     *** True Line Result
    -      end
    +      [x, y, x2, y, 150, 150, 150]
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -41072,70 +49287,78 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Defines all spaces on the board.~
    +** Processing line: ~    #Sets the values for the vertical separator (divides demo sections)~
     - Inside source: true
     *** True Line Result
    -    # Defines all spaces on the board.
    -** Processing line: ~    def all_spaces~
    +    #Sets the values for the vertical separator (divides demo sections)
    +** Processing line: ~    def vertical_seperator x, y, y2~
     - Inside source: true
     *** True Line Result
    -    def all_spaces
    -** Processing line: ~      if !block_given?~
    +    def vertical_seperator x, y, y2
    +** Processing line: ~      [x, y, x, y2, 150, 150, 150]~
     - Inside source: true
     *** True Line Result
    -      if !block_given?
    -** Processing line: ~        state.space_combinations.map do |x, y|~
    +      [x, y, x, y2, 150, 150, 150]
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -        state.space_combinations.map do |x, y|
    -** Processing line: ~          [x, y, state.spaces[x][y]] # sets definition of space~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          [x, y, state.spaces[x][y]] # sets definition of space
    -** Processing line: ~        end~
    +
    +** Processing line: ~    # Outputs vertical and horizontal separators onto the screen to separate each demo section.~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~      else # if a block is given (block_given? is true)~
    +    # Outputs vertical and horizontal separators onto the screen to separate each demo section.
    +** Processing line: ~    def render_seperators~
     - Inside source: true
     *** True Line Result
    -      else # if a block is given (block_given? is true)
    -** Processing line: ~        state.space_combinations.map do |x, y|~
    +    def render_seperators
    +** Processing line: ~      outputs.lines << horizontal_seperator(505, grid.left, 445)~
     - Inside source: true
     *** True Line Result
    -        state.space_combinations.map do |x, y|
    -** Processing line: ~          yield x, y, state.spaces[x][y] # yield if a block is given~
    +      outputs.lines << horizontal_seperator(505, grid.left, 445)
    +** Processing line: ~      outputs.lines << horizontal_seperator(353, grid.left, 445)~
     - Inside source: true
     *** True Line Result
    -          yield x, y, state.spaces[x][y] # yield if a block is given
    -** Processing line: ~        end~
    +      outputs.lines << horizontal_seperator(353, grid.left, 445)
    +** Processing line: ~      outputs.lines << horizontal_seperator(264, grid.left, 445)~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~      end~
    +      outputs.lines << horizontal_seperator(264, grid.left, 445)
    +** Processing line: ~      outputs.lines << horizontal_seperator(174, grid.left, 445)~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +      outputs.lines << horizontal_seperator(174, grid.left, 445)
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    end
    +
    +** Processing line: ~      outputs.lines << vertical_seperator(445, grid.top, grid.bottom)~
    +- Inside source: true
    +*** True Line Result
    +      outputs.lines << vertical_seperator(445, grid.top, grid.bottom)
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Sets values for a label, such as the position, value, size, alignment, and color.~
    +** Processing line: ~      outputs.lines << horizontal_seperator(690, 445, 820)~
     - Inside source: true
     *** True Line Result
    -    # Sets values for a label, such as the position, value, size, alignment, and color.
    -** Processing line: ~    def label x, y, value~
    +      outputs.lines << horizontal_seperator(690, 445, 820)
    +** Processing line: ~      outputs.lines << horizontal_seperator(426, 445, 820)~
    +- Inside source: true
    +*** True Line Result
    +      outputs.lines << horizontal_seperator(426, 445, 820)
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    def label x, y, value
    -** Processing line: ~      [x, y + 10, value, 20, 1, 0, 0, 0]~
    +
    +** Processing line: ~      outputs.lines << vertical_seperator(820, grid.top, grid.bottom)~
     - Inside source: true
     *** True Line Result
    -      [x, y + 10, value, 20, 1, 0, 0, 0]
    +      outputs.lines << vertical_seperator(820, grid.top, grid.bottom)
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -41148,10 +49371,10 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  $tic_tac_toe = TicTacToe.new~
    +** Processing line: ~  $tech_demo = TechDemo.new~
     - Inside source: true
     *** True Line Result
    -  $tic_tac_toe = TicTacToe.new
    +  $tech_demo = TechDemo.new
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
    @@ -41160,38 +49383,46 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
       def tick args
    -** Processing line: ~    $tic_tac_toe._       = args~
    +** Processing line: ~    $tech_demo.inputs = args.inputs~
     - Inside source: true
     *** True Line Result
    -    $tic_tac_toe._       = args
    -** Processing line: ~    $tic_tac_toe.state   = args.state~
    +    $tech_demo.inputs = args.inputs
    +** Processing line: ~    $tech_demo.state = args.state~
     - Inside source: true
     *** True Line Result
    -    $tic_tac_toe.state   = args.state
    -** Processing line: ~    $tic_tac_toe.outputs = args.outputs~
    +    $tech_demo.state = args.state
    +** Processing line: ~    $tech_demo.grid = args.grid~
     - Inside source: true
     *** True Line Result
    -    $tic_tac_toe.outputs = args.outputs
    -** Processing line: ~    $tic_tac_toe.inputs  = args.inputs~
    +    $tech_demo.grid = args.grid
    +** Processing line: ~    $tech_demo.args = args~
     - Inside source: true
     *** True Line Result
    -    $tic_tac_toe.inputs  = args.inputs
    -** Processing line: ~    $tic_tac_toe.grid    = args.grid~
    +    $tech_demo.args = args
    +** Processing line: ~    $tech_demo.outputs = args.render_target(:mini_map)~
     - Inside source: true
     *** True Line Result
    -    $tic_tac_toe.grid    = args.grid
    -** Processing line: ~    $tic_tac_toe.gtk     = args.gtk~
    +    $tech_demo.outputs = args.render_target(:mini_map)
    +** Processing line: ~    $tech_demo.tick~
     - Inside source: true
     *** True Line Result
    -    $tic_tac_toe.gtk     = args.gtk
    -** Processing line: ~    $tic_tac_toe.tick~
    +    $tech_demo.tick
    +** Processing line: ~    args.outputs.labels  << [830, 715, "Render target:", [-2, 0, 0, 0, 0, 255]]~
     - Inside source: true
     *** True Line Result
    -    $tic_tac_toe.tick
    -** Processing line: ~    tick_instructions args, "Sample app shows how to work with mouse clicks."~
    +    args.outputs.labels  << [830, 715, "Render target:", [-2, 0, 0, 0, 0, 255]]
    +** Processing line: ~    args.outputs.sprites << [0, 0, 1280, 720, :mini_map]~
     - Inside source: true
     *** True Line Result
    -    tick_instructions args, "Sample app shows how to work with mouse clicks."
    +    args.outputs.sprites << [0, 0, 1280, 720, :mini_map]
    +** Processing line: ~    args.outputs.sprites << [830, 300, 675, 379, :mini_map]~
    +- Inside source: true
    +*** True Line Result
    +    args.outputs.sprites << [830, 300, 675, 379, :mini_map]
    +** Processing line: ~    tick_instructions args, "Sample app shows all the rendering apis available."~
    +- Inside source: true
    +*** True Line Result
    +    tick_instructions args, "Sample app shows all the rendering apis available."
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -41264,22 +49495,22 @@ Follows is a source code listing for all files that have been open sourced. This
     - End of paragraph detected.
     *** True Line Result
     
    -** Processing line: ~*** Mouse - Mouse Move - main.rb~
    +** Processing line: ~*** Advanced Rendering - Render Primitive Hierarchies - main.rb~
     - Header detected.
     *** True Line Result
     
     *** True Line Result
    -*** Mouse - Mouse Move - main.rb
    +*** Advanced Rendering - Render Primitive Hierarchies - main.rb
     ** Processing line: ~#+begin_src ruby~
     - Line was identified as the beginning of a code block.
     *** True Line Result
     
     *** True Line Result
     #+begin_src ruby
    -** Processing line: ~  # ./samples/05_mouse/02_mouse_move/app/main.rb~
    +** Processing line: ~  # ./samples/07_advanced_rendering/04_render_primitive_hierarchies/app/main.rb~
     - Inside source: true
     *** True Line Result
    -  # ./samples/05_mouse/02_mouse_move/app/main.rb
    +  # ./samples/07_advanced_rendering/04_render_primitive_hierarchies/app/main.rb
     ** Processing line: ~  =begin~
     - Inside source: true
     *** True Line Result
    @@ -41288,1594 +49519,1606 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~   Reminders:~
    +** Processing line: ~   APIs listing that haven't been encountered in previous sample apps:~
     - Inside source: true
     *** True Line Result
    -   Reminders:
    +   APIs listing that haven't been encountered in previous sample apps:
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~   - num1.greater(num2): Returns the greater value.~
    -- Inside source: true
    -*** True Line Result
    -   - num1.greater(num2): Returns the greater value.
    -** Processing line: ~     For example, if we have the command~
    -- Inside source: true
    -*** True Line Result
    -     For example, if we have the command
    -** Processing line: ~     puts 4.greater(3)~
    -- Inside source: true
    -*** True Line Result
    -     puts 4.greater(3)
    -** Processing line: ~     the number 4 would be printed to the console since it has a greater value than 3.~
    +** Processing line: ~   - Nested array: An array whose individual elements are also arrays; useful for~
     - Inside source: true
     *** True Line Result
    -     the number 4 would be printed to the console since it has a greater value than 3.
    -** Processing line: ~     Similar to lesser, which returns the lesser value.~
    +   - Nested array: An array whose individual elements are also arrays; useful for
    +** Processing line: ~     storing groups of similar data.  Also called multidimensional arrays.~
     - Inside source: true
     *** True Line Result
    -     Similar to lesser, which returns the lesser value.
    +     storing groups of similar data.  Also called multidimensional arrays.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~   - find_all: Finds all elements of a collection that meet certain requirements.~
    +** Processing line: ~     In this sample app, we see nested arrays being used in object definitions.~
     - Inside source: true
     *** True Line Result
    -   - find_all: Finds all elements of a collection that meet certain requirements.
    -** Processing line: ~     For example, in this sample app, we're using find_all to find all zombies that have intersected~
    +     In this sample app, we see nested arrays being used in object definitions.
    +** Processing line: ~     Notice the parameters for solids, listed below. Parameters 1-3 set the~
     - Inside source: true
     *** True Line Result
    -     For example, in this sample app, we're using find_all to find all zombies that have intersected
    -** Processing line: ~     or hit the player's sprite since these zombies have been killed.~
    +     Notice the parameters for solids, listed below. Parameters 1-3 set the
    +** Processing line: ~     definition for the rect, and parameter 4 sets the definition of the color.~
     - Inside source: true
     *** True Line Result
    -     or hit the player's sprite since these zombies have been killed.
    +     definition for the rect, and parameter 4 sets the definition of the color.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~   - args.inputs.keyboard.key_down.KEY: Determines if a key is being held or pressed.~
    +** Processing line: ~     Instead of having a solid definition that looks like this,~
     - Inside source: true
     *** True Line Result
    -   - args.inputs.keyboard.key_down.KEY: Determines if a key is being held or pressed.
    -** Processing line: ~     Stores the frame the "down" event occurred.~
    +     Instead of having a solid definition that looks like this,
    +** Processing line: ~     [X, Y, W, H, R, G, B]~
     - Inside source: true
     *** True Line Result
    -     Stores the frame the "down" event occurred.
    -** Processing line: ~     For more information about the keyboard, go to mygame/documentation/06-keyboard.md.~
    +     [X, Y, W, H, R, G, B]
    +** Processing line: ~     we can separate it into two separate array definitions in one, like this~
     - Inside source: true
     *** True Line Result
    -     For more information about the keyboard, go to mygame/documentation/06-keyboard.md.
    -** Processing line: ~~
    +     we can separate it into two separate array definitions in one, like this
    +** Processing line: ~     [[X, Y, W, H], [R, G, B]]~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   - args.outputs.sprites: An array. The values generate a sprite.~
    +     [[X, Y, W, H], [R, G, B]]
    +** Processing line: ~     and both options work fine in defining our solid (or any object).~
     - Inside source: true
     *** True Line Result
    -   - args.outputs.sprites: An array. The values generate a sprite.
    -** Processing line: ~     The parameters are [X, Y, WIDTH, HEIGHT, PATH, ANGLE, ALPHA, RED, GREEN, BLUE]~
    +     and both options work fine in defining our solid (or any object).
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -     The parameters are [X, Y, WIDTH, HEIGHT, PATH, ANGLE, ALPHA, RED, GREEN, BLUE]
    -** Processing line: ~     For more information about sprites, go to mygame/documentation/05-sprites.md.~
    +
    +** Processing line: ~   - Collections: Lists of data; useful for organizing large amounts of data.~
     - Inside source: true
     *** True Line Result
    -     For more information about sprites, go to mygame/documentation/05-sprites.md.
    -** Processing line: ~~
    +   - Collections: Lists of data; useful for organizing large amounts of data.
    +** Processing line: ~     One element of a collection could be an array (which itself contains many elements).~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   - args.state.new_entity: Used when we want to create a new object, like a sprite or button.~
    +     One element of a collection could be an array (which itself contains many elements).
    +** Processing line: ~     For example, a collection that stores two solid objects would look like this:~
     - Inside source: true
     *** True Line Result
    -   - args.state.new_entity: Used when we want to create a new object, like a sprite or button.
    -** Processing line: ~     When we want to create a new object, we can declare it as a new entity and then define~
    +     For example, a collection that stores two solid objects would look like this:
    +** Processing line: ~     [~
     - Inside source: true
     *** True Line Result
    -     When we want to create a new object, we can declare it as a new entity and then define
    -** Processing line: ~     its properties. (Remember, you can use state to define ANY property and it will~
    +     [
    +** Processing line: ~      [100, 100, 50, 50, 0, 0, 0],~
     - Inside source: true
     *** True Line Result
    -     its properties. (Remember, you can use state to define ANY property and it will
    -** Processing line: ~     be retained across frames.)~
    +      [100, 100, 50, 50, 0, 0, 0],
    +** Processing line: ~      [100, 150, 50, 50, 255, 255, 255]~
     - Inside source: true
     *** True Line Result
    -     be retained across frames.)
    -** Processing line: ~~
    +      [100, 150, 50, 50, 255, 255, 255]
    +** Processing line: ~     ]~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   - String interpolation: Uses #{} syntax; everything between the #{ and the } is evaluated~
    +     ]
    +** Processing line: ~     If this collection was added to args.outputs.solids, two solids would be output~
     - Inside source: true
     *** True Line Result
    -   - String interpolation: Uses #{} syntax; everything between the #{ and the } is evaluated
    -** Processing line: ~     as Ruby code, and the placeholder is replaced with its corresponding value or result.~
    +     If this collection was added to args.outputs.solids, two solids would be output
    +** Processing line: ~     next to each other, one black and one white.~
     - Inside source: true
     *** True Line Result
    -     as Ruby code, and the placeholder is replaced with its corresponding value or result.
    +     next to each other, one black and one white.
    +** Processing line: ~     Nested arrays can be used in collections, as you will see in this sample app.~
    +- Inside source: true
    +*** True Line Result
    +     Nested arrays can be used in collections, as you will see in this sample app.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~   - map: Ruby method used to transform data; used in arrays, hashes, and collections.~
    +** Processing line: ~   Reminders:~
     - Inside source: true
     *** True Line Result
    -   - map: Ruby method used to transform data; used in arrays, hashes, and collections.
    -** Processing line: ~     Can be used to perform an action on every element of a collection, such as multiplying~
    +   Reminders:
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -     Can be used to perform an action on every element of a collection, such as multiplying
    -** Processing line: ~     each element by 2 or declaring every element as a new entity.~
    +
    +** Processing line: ~   - args.outputs.solids: An array. The values generate a solid.~
     - Inside source: true
     *** True Line Result
    -     each element by 2 or declaring every element as a new entity.
    -** Processing line: ~~
    +   - args.outputs.solids: An array. The values generate a solid.
    +** Processing line: ~     The parameters for a solid are~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   - sample: Chooses a random element from the array.~
    +     The parameters for a solid are
    +** Processing line: ~     1. The position on the screen (x, y)~
     - Inside source: true
     *** True Line Result
    -   - sample: Chooses a random element from the array.
    -** Processing line: ~~
    +     1. The position on the screen (x, y)
    +** Processing line: ~     2. The width (w)~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   - reject: Removes elements that meet certain requirements.~
    +     2. The width (w)
    +** Processing line: ~     3. The height (h)~
     - Inside source: true
     *** True Line Result
    -   - reject: Removes elements that meet certain requirements.
    -** Processing line: ~     In this sample app, we're removing/rejecting zombies that reach the center of the screen. We're also~
    +     3. The height (h)
    +** Processing line: ~     4. The color (r, g, b) (if a color is not assigned, the object's default color will be black)~
     - Inside source: true
     *** True Line Result
    -     In this sample app, we're removing/rejecting zombies that reach the center of the screen. We're also
    -** Processing line: ~     rejecting zombies that were killed more than 30 frames ago.~
    +     4. The color (r, g, b) (if a color is not assigned, the object's default color will be black)
    +** Processing line: ~     NOTE: THE PARAMETERS ARE THE SAME FOR BORDERS!~
     - Inside source: true
     *** True Line Result
    -     rejecting zombies that were killed more than 30 frames ago.
    +     NOTE: THE PARAMETERS ARE THE SAME FOR BORDERS!
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  =end~
    +** Processing line: ~     Here is an example of a (red) border or solid definition:~
     - Inside source: true
     *** True Line Result
    -  =end
    -** Processing line: ~~
    +     Here is an example of a (red) border or solid definition:
    +** Processing line: ~     [100, 100, 400, 500, 255, 0, 0]~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  # This sample app allows users to move around the screen in order to kill zombies. Zombies appear from every direction so the goal~
    +     [100, 100, 400, 500, 255, 0, 0]
    +** Processing line: ~     It will be a solid or border depending on if it is added to args.outputs.solids or args.outputs.borders.~
     - Inside source: true
     *** True Line Result
    -  # This sample app allows users to move around the screen in order to kill zombies. Zombies appear from every direction so the goal
    -** Processing line: ~  # is to kill the zombies as fast as possible!~
    +     It will be a solid or border depending on if it is added to args.outputs.solids or args.outputs.borders.
    +** Processing line: ~     For more information about solids and borders, go to mygame/documentation/03-solids-and-borders.md.~
     - Inside source: true
     *** True Line Result
    -  # is to kill the zombies as fast as possible!
    +     For more information about solids and borders, go to mygame/documentation/03-solids-and-borders.md.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  class ProtectThePuppiesFromTheZombies~
    +** Processing line: ~   - args.outputs.sprites: An array. The values generate a sprite.~
     - Inside source: true
     *** True Line Result
    -  class ProtectThePuppiesFromTheZombies
    -** Processing line: ~    attr_accessor :grid, :inputs, :state, :outputs~
    +   - args.outputs.sprites: An array. The values generate a sprite.
    +** Processing line: ~     The parameters for sprites are~
     - Inside source: true
     *** True Line Result
    -    attr_accessor :grid, :inputs, :state, :outputs
    -** Processing line: ~~
    +     The parameters for sprites are
    +** Processing line: ~     1. The position on the screen (x, y)~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # Calls the methods necessary for the game to run properly.~
    +     1. The position on the screen (x, y)
    +** Processing line: ~     2. The width (w)~
     - Inside source: true
     *** True Line Result
    -    # Calls the methods necessary for the game to run properly.
    -** Processing line: ~    def tick~
    +     2. The width (w)
    +** Processing line: ~     3. The height (h)~
     - Inside source: true
     *** True Line Result
    -    def tick
    -** Processing line: ~      defaults~
    +     3. The height (h)
    +** Processing line: ~     4. The image path (p)~
     - Inside source: true
     *** True Line Result
    -      defaults
    -** Processing line: ~      render~
    +     4. The image path (p)
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      render
    -** Processing line: ~      calc~
    +
    +** Processing line: ~     Here is an example of a sprite definition:~
     - Inside source: true
     *** True Line Result
    -      calc
    -** Processing line: ~      input~
    +     Here is an example of a sprite definition:
    +** Processing line: ~     [100, 100, 400, 500, 'sprites/dragonruby.png']~
     - Inside source: true
     *** True Line Result
    -      input
    -** Processing line: ~    end~
    +     [100, 100, 400, 500, 'sprites/dragonruby.png']
    +** Processing line: ~     For more information about sprites, go to mygame/documentation/05-sprites.md.~
     - Inside source: true
     *** True Line Result
    -    end
    +     For more information about sprites, go to mygame/documentation/05-sprites.md.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Sets default values for the zombies and for the player.~
    +** Processing line: ~  =end~
     - Inside source: true
     *** True Line Result
    -    # Sets default values for the zombies and for the player.
    -** Processing line: ~    # Initialization happens only in the first frame.~
    +  =end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    # Initialization happens only in the first frame.
    -** Processing line: ~    def defaults~
    +
    +** Processing line: ~  # This code demonstrates the creation and output of objects like sprites, borders, and solids~
     - Inside source: true
     *** True Line Result
    -    def defaults
    -** Processing line: ~      state.flash_at               ||= 0~
    +  # This code demonstrates the creation and output of objects like sprites, borders, and solids
    +** Processing line: ~  # If filled in, they are solids~
     - Inside source: true
     *** True Line Result
    -      state.flash_at               ||= 0
    -** Processing line: ~      state.zombie_min_spawn_rate  ||= 60~
    +  # If filled in, they are solids
    +** Processing line: ~  # If hollow, they are borders~
     - Inside source: true
     *** True Line Result
    -      state.zombie_min_spawn_rate  ||= 60
    -** Processing line: ~      state.zombie_spawn_countdown ||= random_spawn_countdown state.zombie_min_spawn_rate~
    +  # If hollow, they are borders
    +** Processing line: ~  # If images, they are sprites~
     - Inside source: true
     *** True Line Result
    -      state.zombie_spawn_countdown ||= random_spawn_countdown state.zombie_min_spawn_rate
    -** Processing line: ~      state.zombies                ||= []~
    +  # If images, they are sprites
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      state.zombies                ||= []
    -** Processing line: ~      state.killed_zombies         ||= []~
    +
    +** Processing line: ~  # Solids are added to args.outputs.solids~
     - Inside source: true
     *** True Line Result
    -      state.killed_zombies         ||= []
    +  # Solids are added to args.outputs.solids
    +** Processing line: ~  # Borders are added to args.outputs.borders~
    +- Inside source: true
    +*** True Line Result
    +  # Borders are added to args.outputs.borders
    +** Processing line: ~  # Sprites are added to args.outputs.sprites~
    +- Inside source: true
    +*** True Line Result
    +  # Sprites are added to args.outputs.sprites
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      # Declares player as a new entity and sets its properties.~
    +** Processing line: ~  # The tick method runs 60 frames every second.~
     - Inside source: true
     *** True Line Result
    -      # Declares player as a new entity and sets its properties.
    -** Processing line: ~      # The player begins the game in the center of the screen, not moving in any direction.~
    +  # The tick method runs 60 frames every second.
    +** Processing line: ~  # Your game is going to happen under this one function.~
     - Inside source: true
     *** True Line Result
    -      # The player begins the game in the center of the screen, not moving in any direction.
    -** Processing line: ~      state.player ||= state.new_entity(:player, { x: 640,~
    +  # Your game is going to happen under this one function.
    +** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
    -      state.player ||= state.new_entity(:player, { x: 640,
    -** Processing line: ~                                                 y: 360,~
    +  def tick args
    +** Processing line: ~    border_as_solid_and_solid_as_border args~
     - Inside source: true
     *** True Line Result
    -                                                 y: 360,
    -** Processing line: ~                                                 attack_angle: 0,~
    +    border_as_solid_and_solid_as_border args
    +** Processing line: ~    sprite_as_border_or_solids args~
     - Inside source: true
     *** True Line Result
    -                                                 attack_angle: 0,
    -** Processing line: ~                                                 dx: 0,~
    +    sprite_as_border_or_solids args
    +** Processing line: ~    collection_of_borders_and_solids args~
     - Inside source: true
     *** True Line Result
    -                                                 dx: 0,
    -** Processing line: ~                                                 dy: 0 })~
    +    collection_of_borders_and_solids args
    +** Processing line: ~    collection_of_sprites args~
     - Inside source: true
     *** True Line Result
    -                                                 dy: 0 })
    -** Processing line: ~    end~
    +    collection_of_sprites args
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    end
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Outputs a gray background.~
    +** Processing line: ~  # Shows a border being output onto the screen as a border and a solid~
     - Inside source: true
     *** True Line Result
    -    # Outputs a gray background.
    -** Processing line: ~    # Calls the methods needed to output the player, zombies, etc onto the screen.~
    +  # Shows a border being output onto the screen as a border and a solid
    +** Processing line: ~  # Also shows how colors can be set~
     - Inside source: true
     *** True Line Result
    -    # Calls the methods needed to output the player, zombies, etc onto the screen.
    -** Processing line: ~    def render~
    +  # Also shows how colors can be set
    +** Processing line: ~  def border_as_solid_and_solid_as_border args~
     - Inside source: true
     *** True Line Result
    -    def render
    -** Processing line: ~      outputs.solids << [grid.rect, 100, 100, 100]~
    +  def border_as_solid_and_solid_as_border args
    +** Processing line: ~    border = [0, 0, 50, 50]~
     - Inside source: true
     *** True Line Result
    -      outputs.solids << [grid.rect, 100, 100, 100]
    -** Processing line: ~      render_zombies~
    +    border = [0, 0, 50, 50]
    +** Processing line: ~    args.outputs.borders << border~
     - Inside source: true
     *** True Line Result
    -      render_zombies
    -** Processing line: ~      render_killed_zombies~
    +    args.outputs.borders << border
    +** Processing line: ~    args.outputs.solids  << border~
     - Inside source: true
     *** True Line Result
    -      render_killed_zombies
    -** Processing line: ~      render_player~
    +    args.outputs.solids  << border
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      render_player
    -** Processing line: ~      render_flash~
    +
    +** Processing line: ~    # Red, green, blue saturations (last three parameters) can be any number between 0 and 255~
     - Inside source: true
     *** True Line Result
    -      render_flash
    -** Processing line: ~    end~
    +    # Red, green, blue saturations (last three parameters) can be any number between 0 and 255
    +** Processing line: ~    border_with_color = [0, 100, 50, 50, 255, 0, 0]~
     - Inside source: true
     *** True Line Result
    -    end
    +    border_with_color = [0, 100, 50, 50, 255, 0, 0]
    +** Processing line: ~    args.outputs.borders << border_with_color~
    +- Inside source: true
    +*** True Line Result
    +    args.outputs.borders << border_with_color
    +** Processing line: ~    args.outputs.solids  << border_with_color~
    +- Inside source: true
    +*** True Line Result
    +    args.outputs.solids  << border_with_color
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Outputs the zombies on the screen and sets values for the sprites, such as the position, width, height, and animation.~
    +** Processing line: ~    border_with_nested_color = [0, 200, 50, 50, [0, 255, 0]] # nested color~
     - Inside source: true
     *** True Line Result
    -    # Outputs the zombies on the screen and sets values for the sprites, such as the position, width, height, and animation.
    -** Processing line: ~    def render_zombies~
    +    border_with_nested_color = [0, 200, 50, 50, [0, 255, 0]] # nested color
    +** Processing line: ~    args.outputs.borders << border_with_nested_color~
     - Inside source: true
     *** True Line Result
    -    def render_zombies
    -** Processing line: ~      outputs.sprites << state.zombies.map do |z| # performs action on all zombies in the collection~
    +    args.outputs.borders << border_with_nested_color
    +** Processing line: ~    args.outputs.solids  << border_with_nested_color~
     - Inside source: true
     *** True Line Result
    -      outputs.sprites << state.zombies.map do |z| # performs action on all zombies in the collection
    -** Processing line: ~        z.sprite = [z.x, z.y, 4 * 3, 8 * 3, animation_sprite(z)].sprite # sets definition for sprite, calls animation_sprite method~
    +    args.outputs.solids  << border_with_nested_color
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        z.sprite = [z.x, z.y, 4 * 3, 8 * 3, animation_sprite(z)].sprite # sets definition for sprite, calls animation_sprite method
    -** Processing line: ~        z.sprite~
    +
    +** Processing line: ~    border_with_nested_rect = [[0, 300, 50, 50], 0, 0, 255] # nested rect~
     - Inside source: true
     *** True Line Result
    -        z.sprite
    -** Processing line: ~      end~
    +    border_with_nested_rect = [[0, 300, 50, 50], 0, 0, 255] # nested rect
    +** Processing line: ~    args.outputs.borders << border_with_nested_rect~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +    args.outputs.borders << border_with_nested_rect
    +** Processing line: ~    args.outputs.solids  << border_with_nested_rect~
     - Inside source: true
     *** True Line Result
    -    end
    +    args.outputs.solids  << border_with_nested_rect
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Outputs sprites of killed zombies, and displays a slash image to show that a zombie has been killed.~
    -- Inside source: true
    -*** True Line Result
    -    # Outputs sprites of killed zombies, and displays a slash image to show that a zombie has been killed.
    -** Processing line: ~    def render_killed_zombies~
    +** Processing line: ~    border_with_nested_color_and_rect = [[0, 400, 50, 50], [255, 0, 255]] # nested rect and color~
     - Inside source: true
     *** True Line Result
    -    def render_killed_zombies
    -** Processing line: ~      outputs.sprites << state.killed_zombies.map do |z| # performs action on all killed zombies in collection~
    +    border_with_nested_color_and_rect = [[0, 400, 50, 50], [255, 0, 255]] # nested rect and color
    +** Processing line: ~    args.outputs.borders << border_with_nested_color_and_rect~
     - Inside source: true
     *** True Line Result
    -      outputs.sprites << state.killed_zombies.map do |z| # performs action on all killed zombies in collection
    -** Processing line: ~        z.sprite = [z.x,~
    +    args.outputs.borders << border_with_nested_color_and_rect
    +** Processing line: ~    args.outputs.solids  << border_with_nested_color_and_rect~
     - Inside source: true
     *** True Line Result
    -        z.sprite = [z.x,
    -** Processing line: ~                    z.y,~
    +    args.outputs.solids  << border_with_nested_color_and_rect
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -                    z.y,
    -** Processing line: ~                    4 * 3,~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -                    4 * 3,
    -** Processing line: ~                    8 * 3,~
    +
    +** Processing line: ~  # Shows a sprite output onto the screen as a sprite, border, and solid~
     - Inside source: true
     *** True Line Result
    -                    8 * 3,
    -** Processing line: ~                    animation_sprite(z, z.death_at), # calls animation_sprite method~
    +  # Shows a sprite output onto the screen as a sprite, border, and solid
    +** Processing line: ~  # Demonstrates that all three outputs appear differently on screen~
     - Inside source: true
     *** True Line Result
    -                    animation_sprite(z, z.death_at), # calls animation_sprite method
    -** Processing line: ~                    0, # angle~
    +  # Demonstrates that all three outputs appear differently on screen
    +** Processing line: ~  def sprite_as_border_or_solids args~
     - Inside source: true
     *** True Line Result
    -                    0, # angle
    -** Processing line: ~                    255 * z.death_at.ease(30, :flip)].sprite # transparency of a zombie changes when they die~
    +  def sprite_as_border_or_solids args
    +** Processing line: ~    sprite = [100, 0, 50, 50, 'sprites/ship.png']~
     - Inside source: true
     *** True Line Result
    -                    255 * z.death_at.ease(30, :flip)].sprite # transparency of a zombie changes when they die
    -** Processing line: ~                    # change the value of 30 and see what happens when a zombie is killed~
    +    sprite = [100, 0, 50, 50, 'sprites/ship.png']
    +** Processing line: ~    args.outputs.sprites << sprite~
     - Inside source: true
     *** True Line Result
    -                    # change the value of 30 and see what happens when a zombie is killed
    +    args.outputs.sprites << sprite
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~        # Sets values to output the slash over the zombie's sprite when a zombie is killed.~
    +** Processing line: ~    # Sprite_as_border variable has same parameters (excluding position) as above object,~
     - Inside source: true
     *** True Line Result
    -        # Sets values to output the slash over the zombie's sprite when a zombie is killed.
    -** Processing line: ~        # The slash is tilted 45 degrees from the angle of the player's attack.~
    +    # Sprite_as_border variable has same parameters (excluding position) as above object,
    +** Processing line: ~    # but will appear differently on screen because it is added to args.outputs.borders~
     - Inside source: true
     *** True Line Result
    -        # The slash is tilted 45 degrees from the angle of the player's attack.
    -** Processing line: ~        # Change the 3 inside scale_rect to 30 and the slash will be HUGE! Scale_rect positions~
    +    # but will appear differently on screen because it is added to args.outputs.borders
    +** Processing line: ~    sprite_as_border = [100, 100, 50, 50, 'sprites/ship.png']~
     - Inside source: true
     *** True Line Result
    -        # Change the 3 inside scale_rect to 30 and the slash will be HUGE! Scale_rect positions
    -** Processing line: ~        # the slash over the killed zombie's sprite.~
    +    sprite_as_border = [100, 100, 50, 50, 'sprites/ship.png']
    +** Processing line: ~    args.outputs.borders << sprite_as_border~
     - Inside source: true
     *** True Line Result
    -        # the slash over the killed zombie's sprite.
    -** Processing line: ~        [z.sprite, [z.sprite.rect, 'sprites/slash.png', 45 + state.player.attack_angle_on_click, z.sprite.a].scale_rect(3, 0.5, 0.5)]~
    +    args.outputs.borders << sprite_as_border
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        [z.sprite, [z.sprite.rect, 'sprites/slash.png', 45 + state.player.attack_angle_on_click, z.sprite.a].scale_rect(3, 0.5, 0.5)]
    -** Processing line: ~      end~
    +
    +** Processing line: ~    # Sprite_as_solid variable has same parameters (excluding position) as above object,~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +    # Sprite_as_solid variable has same parameters (excluding position) as above object,
    +** Processing line: ~    # but will appear differently on screen because it is added to args.outputs.solids~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +    # but will appear differently on screen because it is added to args.outputs.solids
    +** Processing line: ~    sprite_as_solid = [100, 200, 50, 50, 'sprites/ship.png']~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # Outputs the player sprite using the images in the sprites folder.~
    +    sprite_as_solid = [100, 200, 50, 50, 'sprites/ship.png']
    +** Processing line: ~    args.outputs.solids << sprite_as_solid~
     - Inside source: true
     *** True Line Result
    -    # Outputs the player sprite using the images in the sprites folder.
    -** Processing line: ~    def render_player~
    +    args.outputs.solids << sprite_as_solid
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    def render_player
    -** Processing line: ~      state.player_sprite = [state.player.x,~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      state.player_sprite = [state.player.x,
    -** Processing line: ~                             state.player.y,~
    +
    +** Processing line: ~  # Holds and outputs a collection of borders and a collection of solids~
     - Inside source: true
     *** True Line Result
    -                             state.player.y,
    -** Processing line: ~                            4 * 3,~
    +  # Holds and outputs a collection of borders and a collection of solids
    +** Processing line: ~  # Collections are created by using arrays to hold parameters of each individual object~
     - Inside source: true
     *** True Line Result
    -                            4 * 3,
    -** Processing line: ~                            8 * 3, "sprites/player-#{animation_index(state.player.created_at_elapsed)}.png"] # string interpolation~
    +  # Collections are created by using arrays to hold parameters of each individual object
    +** Processing line: ~  def collection_of_borders_and_solids args~
     - Inside source: true
     *** True Line Result
    -                            8 * 3, "sprites/player-#{animation_index(state.player.created_at_elapsed)}.png"] # string interpolation
    -** Processing line: ~      outputs.sprites << state.player_sprite~
    +  def collection_of_borders_and_solids args
    +** Processing line: ~    collection_borders = [~
     - Inside source: true
     *** True Line Result
    -      outputs.sprites << state.player_sprite
    -** Processing line: ~~
    +    collection_borders = [
    +** Processing line: ~      [~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      # Outputs a small red square that previews the angles that the player can attack in.~
    +      [
    +** Processing line: ~        [200,  0, 50, 50],                    # black border~
     - Inside source: true
     *** True Line Result
    -      # Outputs a small red square that previews the angles that the player can attack in.
    -** Processing line: ~      # It can be moved in a perfect circle around the player to show possible movements.~
    +        [200,  0, 50, 50],                    # black border
    +** Processing line: ~        [200,  100, 50, 50, 255, 0, 0],       # red border~
     - Inside source: true
     *** True Line Result
    -      # It can be moved in a perfect circle around the player to show possible movements.
    -** Processing line: ~      # Change the 60 in the parenthesis and see what happens to the movement of the red square.~
    +        [200,  100, 50, 50, 255, 0, 0],       # red border
    +** Processing line: ~        [200,  200, 50, 50, [0, 255, 0]],     # nested color~
     - Inside source: true
     *** True Line Result
    -      # Change the 60 in the parenthesis and see what happens to the movement of the red square.
    -** Processing line: ~      outputs.solids <<  [state.player.x + state.player.attack_angle.vector_x(60),~
    +        [200,  200, 50, 50, [0, 255, 0]],     # nested color
    +** Processing line: ~      ],~
     - Inside source: true
     *** True Line Result
    -      outputs.solids <<  [state.player.x + state.player.attack_angle.vector_x(60),
    -** Processing line: ~                          state.player.y + state.player.attack_angle.vector_y(60),~
    +      ],
    +** Processing line: ~      [[200, 300, 50, 50], 0, 0, 255],        # nested rect~
     - Inside source: true
     *** True Line Result
    -                          state.player.y + state.player.attack_angle.vector_y(60),
    -** Processing line: ~                          3, 3, 255, 0, 0]~
    +      [[200, 300, 50, 50], 0, 0, 255],        # nested rect
    +** Processing line: ~      [[200, 400, 50, 50], [255, 0, 255]]     # nested rect and nested color~
     - Inside source: true
     *** True Line Result
    -                          3, 3, 255, 0, 0]
    -** Processing line: ~    end~
    +      [[200, 400, 50, 50], [255, 0, 255]]     # nested rect and nested color
    +** Processing line: ~    ]~
     - Inside source: true
     *** True Line Result
    -    end
    +    ]
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Renders flash as a solid. The screen turns white for 10 frames when a zombie is killed.~
    +** Processing line: ~    args.outputs.borders << collection_borders~
     - Inside source: true
     *** True Line Result
    -    # Renders flash as a solid. The screen turns white for 10 frames when a zombie is killed.
    -** Processing line: ~    def render_flash~
    +    args.outputs.borders << collection_borders
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    def render_flash
    -** Processing line: ~      return if state.flash_at.elapsed_time > 10 # return if more than 10 frames have passed since flash.~
    +
    +** Processing line: ~    collection_solids = [~
     - Inside source: true
     *** True Line Result
    -      return if state.flash_at.elapsed_time > 10 # return if more than 10 frames have passed since flash.
    -** Processing line: ~      # Transparency gradually changes (or eases) during the 10 frames of flash.~
    +    collection_solids = [
    +** Processing line: ~      [~
     - Inside source: true
     *** True Line Result
    -      # Transparency gradually changes (or eases) during the 10 frames of flash.
    -** Processing line: ~      outputs.primitives << [grid.rect, 255, 255, 255, 255 * state.flash_at.ease(10, :flip)].solid~
    +      [
    +** Processing line: ~        [[300, 300, 50, 50], 0, 0, 255],      # nested rect~
     - Inside source: true
     *** True Line Result
    -      outputs.primitives << [grid.rect, 255, 255, 255, 255 * state.flash_at.ease(10, :flip)].solid
    -** Processing line: ~    end~
    +        [[300, 300, 50, 50], 0, 0, 255],      # nested rect
    +** Processing line: ~        [[300, 400, 50, 50], [255, 0, 255]]   # nested rect and nested color~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +        [[300, 400, 50, 50], [255, 0, 255]]   # nested rect and nested color
    +** Processing line: ~      ],~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # Calls all methods necessary for performing calculations.~
    +      ],
    +** Processing line: ~      [300,  0, 50, 50],~
     - Inside source: true
     *** True Line Result
    -    # Calls all methods necessary for performing calculations.
    -** Processing line: ~    def calc~
    +      [300,  0, 50, 50],
    +** Processing line: ~      [300,  100, 50, 50, 255, 0, 0],~
     - Inside source: true
     *** True Line Result
    -    def calc
    -** Processing line: ~      calc_spawn_zombie~
    +      [300,  100, 50, 50, 255, 0, 0],
    +** Processing line: ~      [300,  200, 50, 50, [0, 255, 0]],       # nested color~
     - Inside source: true
     *** True Line Result
    -      calc_spawn_zombie
    -** Processing line: ~      calc_move_zombies~
    +      [300,  200, 50, 50, [0, 255, 0]],       # nested color
    +** Processing line: ~    ]~
     - Inside source: true
     *** True Line Result
    -      calc_move_zombies
    -** Processing line: ~      calc_player~
    +    ]
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      calc_player
    -** Processing line: ~      calc_kill_zombie~
    +
    +** Processing line: ~    args.outputs.solids << collection_solids~
     - Inside source: true
     *** True Line Result
    -      calc_kill_zombie
    -** Processing line: ~    end~
    +    args.outputs.solids << collection_solids
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    end
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Decreases the zombie spawn countdown by 1 if it has a value greater than 0.~
    +** Processing line: ~  # Holds and outputs a collection of sprites by adding it to args.outputs.sprites~
     - Inside source: true
     *** True Line Result
    -    # Decreases the zombie spawn countdown by 1 if it has a value greater than 0.
    -** Processing line: ~    def calc_spawn_zombie~
    +  # Holds and outputs a collection of sprites by adding it to args.outputs.sprites
    +** Processing line: ~  # Also outputs a collection with same parameters (excluding position) by adding~
     - Inside source: true
     *** True Line Result
    -    def calc_spawn_zombie
    -** Processing line: ~      if state.zombie_spawn_countdown > 0~
    +  # Also outputs a collection with same parameters (excluding position) by adding
    +** Processing line: ~  # it to args.outputs.solids and another to args.outputs.borders~
     - Inside source: true
     *** True Line Result
    -      if state.zombie_spawn_countdown > 0
    -** Processing line: ~        state.zombie_spawn_countdown -= 1~
    +  # it to args.outputs.solids and another to args.outputs.borders
    +** Processing line: ~  def collection_of_sprites args~
     - Inside source: true
     *** True Line Result
    -        state.zombie_spawn_countdown -= 1
    -** Processing line: ~        return~
    +  def collection_of_sprites args
    +** Processing line: ~    sprites_collection = [~
     - Inside source: true
     *** True Line Result
    -        return
    -** Processing line: ~      end~
    +    sprites_collection = [
    +** Processing line: ~      [~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +      [
    +** Processing line: ~        [400, 0, 50, 50, 'sprites/ship.png'],~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      # New zombies are created, positioned on the screen, and added to the zombies collection.~
    +        [400, 0, 50, 50, 'sprites/ship.png'],
    +** Processing line: ~        [400, 100, 50, 50, 'sprites/ship.png'],~
     - Inside source: true
     *** True Line Result
    -      # New zombies are created, positioned on the screen, and added to the zombies collection.
    -** Processing line: ~      state.zombies << state.new_entity(:zombie) do |z| # each zombie is declared a new entity~
    +        [400, 100, 50, 50, 'sprites/ship.png'],
    +** Processing line: ~      ],~
     - Inside source: true
     *** True Line Result
    -      state.zombies << state.new_entity(:zombie) do |z| # each zombie is declared a new entity
    -** Processing line: ~        if rand > 0.5~
    +      ],
    +** Processing line: ~      [400, 200, 50, 50, 'sprites/ship.png']~
     - Inside source: true
     *** True Line Result
    -        if rand > 0.5
    -** Processing line: ~          z.x = grid.rect.w.randomize(:ratio) # random x position on screen (within grid scope)~
    +      [400, 200, 50, 50, 'sprites/ship.png']
    +** Processing line: ~    ]~
     - Inside source: true
     *** True Line Result
    -          z.x = grid.rect.w.randomize(:ratio) # random x position on screen (within grid scope)
    -** Processing line: ~          z.y = [-10, 730].sample # y position is set to either -10 or 730 (randomly chosen)~
    +    ]
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          z.y = [-10, 730].sample # y position is set to either -10 or 730 (randomly chosen)
    -** Processing line: ~          # the possible values exceed the screen's scope so zombies appear to be coming from far away~
    +
    +** Processing line: ~    args.outputs.sprites << sprites_collection~
     - Inside source: true
     *** True Line Result
    -          # the possible values exceed the screen's scope so zombies appear to be coming from far away
    -** Processing line: ~        else~
    +    args.outputs.sprites << sprites_collection
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        else
    -** Processing line: ~          z.x = [-10, 1290].sample # x position is set to either -10 or 1290 (randomly chosen)~
    +
    +** Processing line: ~    args.outputs.solids << [~
     - Inside source: true
     *** True Line Result
    -          z.x = [-10, 1290].sample # x position is set to either -10 or 1290 (randomly chosen)
    -** Processing line: ~          z.y = grid.rect.w.randomize(:ratio) # random y position on screen~
    +    args.outputs.solids << [
    +** Processing line: ~      [500, 0, 50, 50, 'sprites/ship.png'],~
     - Inside source: true
     *** True Line Result
    -          z.y = grid.rect.w.randomize(:ratio) # random y position on screen
    -** Processing line: ~        end~
    +      [500, 0, 50, 50, 'sprites/ship.png'],
    +** Processing line: ~      [500, 100, 50, 50, 'sprites/ship.png'],~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~      end~
    +      [500, 100, 50, 50, 'sprites/ship.png'],
    +** Processing line: ~      [[[500, 200, 50, 50, 'sprites/ship.png']]]~
     - Inside source: true
     *** True Line Result
    -      end
    +      [[[500, 200, 50, 50, 'sprites/ship.png']]]
    +** Processing line: ~    ]~
    +- Inside source: true
    +*** True Line Result
    +    ]
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      # Calls random_spawn_countdown method (determines how fast new zombies appear)~
    +** Processing line: ~    args.outputs.borders << [~
     - Inside source: true
     *** True Line Result
    -      # Calls random_spawn_countdown method (determines how fast new zombies appear)
    -** Processing line: ~      state.zombie_spawn_countdown = random_spawn_countdown state.zombie_min_spawn_rate~
    +    args.outputs.borders << [
    +** Processing line: ~      [~
     - Inside source: true
     *** True Line Result
    -      state.zombie_spawn_countdown = random_spawn_countdown state.zombie_min_spawn_rate
    -** Processing line: ~      state.zombie_min_spawn_rate -= 1~
    +      [
    +** Processing line: ~        [600, 0, 50, 50, 'sprites/ship.png'],~
     - Inside source: true
     *** True Line Result
    -      state.zombie_min_spawn_rate -= 1
    -** Processing line: ~      # set to either the current zombie_min_spawn_rate or 0, depending on which value is greater~
    +        [600, 0, 50, 50, 'sprites/ship.png'],
    +** Processing line: ~        [600, 100, 50, 50, 'sprites/ship.png'],~
     - Inside source: true
     *** True Line Result
    -      # set to either the current zombie_min_spawn_rate or 0, depending on which value is greater
    -** Processing line: ~      state.zombie_min_spawn_rate  = state.zombie_min_spawn_rate.greater(0)~
    +        [600, 100, 50, 50, 'sprites/ship.png'],
    +** Processing line: ~      ],~
     - Inside source: true
     *** True Line Result
    -      state.zombie_min_spawn_rate  = state.zombie_min_spawn_rate.greater(0)
    -** Processing line: ~    end~
    +      ],
    +** Processing line: ~      [600, 200, 50, 50, 'sprites/ship.png']~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +      [600, 200, 50, 50, 'sprites/ship.png']
    +** Processing line: ~    ]~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # Moves all zombies towards the center of the screen.~
    +    ]
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    # Moves all zombies towards the center of the screen.
    -** Processing line: ~    # All zombies that reach the center (640, 360) are rejected from the zombies collection and disappear.~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    # All zombies that reach the center (640, 360) are rejected from the zombies collection and disappear.
    -** Processing line: ~    def calc_move_zombies~
    -- Inside source: true
    +
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
     *** True Line Result
    -    def calc_move_zombies
    -** Processing line: ~      state.zombies.each do |z| # for each zombie in the collection~
    -- Inside source: true
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
     *** True Line Result
    -      state.zombies.each do |z| # for each zombie in the collection
    -** Processing line: ~        z.y = z.y.towards(360, 0.1) # move the zombie towards the center (640, 360) at a rate of 0.1~
    -- Inside source: true
    +
    +** Processing line: ~*** Advanced Rendering - Render Primitives As Hash - main.rb~
    +- Header detected.
     *** True Line Result
    -        z.y = z.y.towards(360, 0.1) # move the zombie towards the center (640, 360) at a rate of 0.1
    -** Processing line: ~        z.x = z.x.towards(640, 0.1) # change 0.1 to 1.1 and see how much faster the zombies move to the center~
    -- Inside source: true
    +
     *** True Line Result
    -        z.x = z.x.towards(640, 0.1) # change 0.1 to 1.1 and see how much faster the zombies move to the center
    -** Processing line: ~      end~
    -- Inside source: true
    +*** Advanced Rendering - Render Primitives As Hash - main.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
     *** True Line Result
    -      end
    -** Processing line: ~      state.zombies = state.zombies.reject { |z| z.y == 360 && z.x == 640 } # remove zombies that are in center~
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/07_advanced_rendering/05_render_primitives_as_hash/app/main.rb~
     - Inside source: true
     *** True Line Result
    -      state.zombies = state.zombies.reject { |z| z.y == 360 && z.x == 640 } # remove zombies that are in center
    -** Processing line: ~    end~
    +  # ./samples/07_advanced_rendering/05_render_primitives_as_hash/app/main.rb
    +** Processing line: ~  =begin~
     - Inside source: true
     *** True Line Result
    -    end
    +  =begin
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Calculates the position and movement of the player on the screen.~
    +** Processing line: ~   Reminders:~
     - Inside source: true
     *** True Line Result
    -    # Calculates the position and movement of the player on the screen.
    -** Processing line: ~    def calc_player~
    +   Reminders:
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    def calc_player
    -** Processing line: ~      state.player.x += state.player.dx # changes x based on dx (change in x)~
    +
    +** Processing line: ~   - Hashes: Collection of unique keys and their corresponding values. The value can be found~
     - Inside source: true
     *** True Line Result
    -      state.player.x += state.player.dx # changes x based on dx (change in x)
    -** Processing line: ~      state.player.y += state.player.dy # changes y based on dy (change in y)~
    +   - Hashes: Collection of unique keys and their corresponding values. The value can be found
    +** Processing line: ~     using their keys.~
     - Inside source: true
     *** True Line Result
    -      state.player.y += state.player.dy # changes y based on dy (change in y)
    +     using their keys.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      state.player.dx *= 0.9 # scales dx down~
    +** Processing line: ~     For example, if we have a "numbers" hash that stores numbers in English as the~
     - Inside source: true
     *** True Line Result
    -      state.player.dx *= 0.9 # scales dx down
    -** Processing line: ~      state.player.dy *= 0.9 # scales dy down~
    +     For example, if we have a "numbers" hash that stores numbers in English as the
    +** Processing line: ~     key and numbers in Spanish as the value, we'd have a hash that looks like this...~
     - Inside source: true
     *** True Line Result
    -      state.player.dy *= 0.9 # scales dy down
    -** Processing line: ~~
    +     key and numbers in Spanish as the value, we'd have a hash that looks like this...
    +** Processing line: ~     numbers = { "one" => "uno", "two" => "dos", "three" => "tres" }~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      # Compares player's x to 1280 to find lesser value, then compares result to 0 to find greater value.~
    +     numbers = { "one" => "uno", "two" => "dos", "three" => "tres" }
    +** Processing line: ~     and on it goes.~
     - Inside source: true
     *** True Line Result
    -      # Compares player's x to 1280 to find lesser value, then compares result to 0 to find greater value.
    -** Processing line: ~      # This ensures that the player remains within the screen's scope.~
    +     and on it goes.
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      # This ensures that the player remains within the screen's scope.
    -** Processing line: ~      state.player.x = state.player.x.lesser(1280).greater(0)~
    +
    +** Processing line: ~     Now if we wanted to find the corresponding value of the "one" key, we could say~
     - Inside source: true
     *** True Line Result
    -      state.player.x = state.player.x.lesser(1280).greater(0)
    -** Processing line: ~      state.player.y = state.player.y.lesser(720).greater(0) # same with player's y~
    +     Now if we wanted to find the corresponding value of the "one" key, we could say
    +** Processing line: ~     puts numbers["one"]~
     - Inside source: true
     *** True Line Result
    -      state.player.y = state.player.y.lesser(720).greater(0) # same with player's y
    -** Processing line: ~    end~
    +     puts numbers["one"]
    +** Processing line: ~     which would print "uno" to the console.~
     - Inside source: true
     *** True Line Result
    -    end
    +     which would print "uno" to the console.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Finds all zombies that intersect with the player's sprite. These zombies are removed from the zombies collection~
    +** Processing line: ~   - args.outputs.sprites: An array. The values generate a sprite.~
     - Inside source: true
     *** True Line Result
    -    # Finds all zombies that intersect with the player's sprite. These zombies are removed from the zombies collection
    -** Processing line: ~    # and added to the killed_zombies collection since any zombie that intersects with the player is killed.~
    +   - args.outputs.sprites: An array. The values generate a sprite.
    +** Processing line: ~     The parameters are [X, Y, WIDTH, HEIGHT, PATH, ANGLE, ALPHA, RED, GREEN, BLUE]~
     - Inside source: true
     *** True Line Result
    -    # and added to the killed_zombies collection since any zombie that intersects with the player is killed.
    -** Processing line: ~    def calc_kill_zombie~
    +     The parameters are [X, Y, WIDTH, HEIGHT, PATH, ANGLE, ALPHA, RED, GREEN, BLUE]
    +** Processing line: ~     For more information about sprites, go to mygame/documentation/05-sprites.md.~
     - Inside source: true
     *** True Line Result
    -    def calc_kill_zombie
    +     For more information about sprites, go to mygame/documentation/05-sprites.md.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      # Find all zombies that intersect with the player. They are considered killed.~
    -- Inside source: true
    -*** True Line Result
    -      # Find all zombies that intersect with the player. They are considered killed.
    -** Processing line: ~      killed_this_frame = state.zombies.find_all { |z| z.sprite.intersect_rect? state.player_sprite }~
    +** Processing line: ~   - args.outputs.labels: An array. The values generate a label.~
     - Inside source: true
     *** True Line Result
    -      killed_this_frame = state.zombies.find_all { |z| z.sprite.intersect_rect? state.player_sprite }
    -** Processing line: ~      state.zombies = state.zombies - killed_this_frame # remove newly killed zombies from zombies collection~
    +   - args.outputs.labels: An array. The values generate a label.
    +** Processing line: ~     The parameters are [X, Y, TEXT, SIZE, ALIGNMENT, RED, GREEN, BLUE, ALPHA, FONT STYLE]~
     - Inside source: true
     *** True Line Result
    -      state.zombies = state.zombies - killed_this_frame # remove newly killed zombies from zombies collection
    -** Processing line: ~      state.killed_zombies += killed_this_frame # add newly killed zombies to killed zombies~
    +     The parameters are [X, Y, TEXT, SIZE, ALIGNMENT, RED, GREEN, BLUE, ALPHA, FONT STYLE]
    +** Processing line: ~     For more information about labels, go to mygame/documentation/02-labels.md.~
     - Inside source: true
     *** True Line Result
    -      state.killed_zombies += killed_this_frame # add newly killed zombies to killed zombies
    +     For more information about labels, go to mygame/documentation/02-labels.md.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      if killed_this_frame.length > 0 # if atleast one zombie was killed in the frame~
    -- Inside source: true
    -*** True Line Result
    -      if killed_this_frame.length > 0 # if atleast one zombie was killed in the frame
    -** Processing line: ~        state.flash_at = state.tick_count # flash_at set to the frame when the zombie was killed~
    +** Processing line: ~   - args.outputs.solids: An array. The values generate a solid.~
     - Inside source: true
     *** True Line Result
    -        state.flash_at = state.tick_count # flash_at set to the frame when the zombie was killed
    -** Processing line: ~      # Don't forget, the rendered flash lasts for 10 frames after the zombie is killed (look at render_flash method)~
    +   - args.outputs.solids: An array. The values generate a solid.
    +** Processing line: ~     The parameters are [X, Y, WIDTH, HEIGHT, RED, GREEN, BLUE, ALPHA]~
     - Inside source: true
     *** True Line Result
    -      # Don't forget, the rendered flash lasts for 10 frames after the zombie is killed (look at render_flash method)
    -** Processing line: ~      end~
    +     The parameters are [X, Y, WIDTH, HEIGHT, RED, GREEN, BLUE, ALPHA]
    +** Processing line: ~     For more information about solids, go to mygame/documentation/03-solids-and-borders.md.~
     - Inside source: true
     *** True Line Result
    -      end
    +     For more information about solids, go to mygame/documentation/03-solids-and-borders.md.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      # Sets the tick_count (passage of time) as the value of the death_at variable for each killed zombie.~
    +** Processing line: ~   - args.outputs.borders: An array. The values generate a border.~
     - Inside source: true
     *** True Line Result
    -      # Sets the tick_count (passage of time) as the value of the death_at variable for each killed zombie.
    -** Processing line: ~      # Death_at stores the frame a zombie was killed.~
    +   - args.outputs.borders: An array. The values generate a border.
    +** Processing line: ~     The parameters are the same as a solid.~
     - Inside source: true
     *** True Line Result
    -      # Death_at stores the frame a zombie was killed.
    -** Processing line: ~      killed_this_frame.each do |z|~
    +     The parameters are the same as a solid.
    +** Processing line: ~     For more information about borders, go to mygame/documentation/03-solids-and-borders.md.~
     - Inside source: true
     *** True Line Result
    -      killed_this_frame.each do |z|
    -** Processing line: ~        z.death_at = state.tick_count~
    +     For more information about borders, go to mygame/documentation/03-solids-and-borders.md.
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        z.death_at = state.tick_count
    -** Processing line: ~      end~
    +
    +** Processing line: ~   - args.outputs.lines: An array. The values generate a line.~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +   - args.outputs.lines: An array. The values generate a line.
    +** Processing line: ~     The parameters are [X1, Y1, X2, Y2, RED, GREEN, BLUE]~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      # Zombies are rejected from the killed_zombies collection depending on when they were killed.~
    +     The parameters are [X1, Y1, X2, Y2, RED, GREEN, BLUE]
    +** Processing line: ~     For more information about labels, go to mygame/documentation/02-labels.md.~
     - Inside source: true
     *** True Line Result
    -      # Zombies are rejected from the killed_zombies collection depending on when they were killed.
    -** Processing line: ~      # They are rejected if more than 30 frames have passed since their death.~
    +     For more information about labels, go to mygame/documentation/02-labels.md.
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      # They are rejected if more than 30 frames have passed since their death.
    -** Processing line: ~      state.killed_zombies = state.killed_zombies.reject { |z| state.tick_count - z.death_at > 30 }~
    +
    +** Processing line: ~  =end~
     - Inside source: true
     *** True Line Result
    -      state.killed_zombies = state.killed_zombies.reject { |z| state.tick_count - z.death_at > 30 }
    -** Processing line: ~    end~
    +  =end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    end
    +
    +** Processing line: ~  # This sample app demonstrates how hashes can be used to output different kinds of objects.~
    +- Inside source: true
    +*** True Line Result
    +  # This sample app demonstrates how hashes can be used to output different kinds of objects.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Uses input from the user to move the player around the screen.~
    +** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
    -    # Uses input from the user to move the player around the screen.
    -** Processing line: ~    def input~
    +  def tick args
    +** Processing line: ~    args.state.angle ||= 0 # initializes angle to 0~
     - Inside source: true
     *** True Line Result
    -    def input
    -** Processing line: ~~
    +    args.state.angle ||= 0 # initializes angle to 0
    +** Processing line: ~    args.state.angle  += 1 # increments angle by 1 every frame (60 times a second)~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      # If the "a" key or left key is pressed, the x position of the player decreases.~
    +    args.state.angle  += 1 # increments angle by 1 every frame (60 times a second)
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      # If the "a" key or left key is pressed, the x position of the player decreases.
    -** Processing line: ~      # Otherwise, if the "d" key or right key is pressed, the x position of the player increases.~
    +
    +** Processing line: ~    # Outputs sprite using a hash~
     - Inside source: true
     *** True Line Result
    -      # Otherwise, if the "d" key or right key is pressed, the x position of the player increases.
    -** Processing line: ~      if inputs.keyboard.key_held.a || inputs.keyboard.key_held.left~
    +    # Outputs sprite using a hash
    +** Processing line: ~    args.outputs.sprites << {~
     - Inside source: true
     *** True Line Result
    -      if inputs.keyboard.key_held.a || inputs.keyboard.key_held.left
    -** Processing line: ~        state.player.x -= 5~
    +    args.outputs.sprites << {
    +** Processing line: ~      x: 30,                          # sprite position~
     - Inside source: true
     *** True Line Result
    -        state.player.x -= 5
    -** Processing line: ~      elsif inputs.keyboard.key_held.d || inputs.keyboard.key_held.right~
    +      x: 30,                          # sprite position
    +** Processing line: ~      y: 550,~
     - Inside source: true
     *** True Line Result
    -      elsif inputs.keyboard.key_held.d || inputs.keyboard.key_held.right
    -** Processing line: ~        state.player.x += 5~
    +      y: 550,
    +** Processing line: ~      w: 128,                         # sprite size~
     - Inside source: true
     *** True Line Result
    -        state.player.x += 5
    -** Processing line: ~      end~
    +      w: 128,                         # sprite size
    +** Processing line: ~      h: 101,~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +      h: 101,
    +** Processing line: ~      path: "dragonruby.png",         # image path~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      # If the "w" or up key is pressed, the y position of the player increases.~
    +      path: "dragonruby.png",         # image path
    +** Processing line: ~      angle: args.state.angle,        # angle~
     - Inside source: true
     *** True Line Result
    -      # If the "w" or up key is pressed, the y position of the player increases.
    -** Processing line: ~      # Otherwise, if the "s" or down key is pressed, the y position of the player decreases.~
    +      angle: args.state.angle,        # angle
    +** Processing line: ~      a: 255,                         # alpha (transparency)~
     - Inside source: true
     *** True Line Result
    -      # Otherwise, if the "s" or down key is pressed, the y position of the player decreases.
    -** Processing line: ~      if inputs.keyboard.key_held.w || inputs.keyboard.key_held.up~
    +      a: 255,                         # alpha (transparency)
    +** Processing line: ~      r: 255,                         # color saturation~
     - Inside source: true
     *** True Line Result
    -      if inputs.keyboard.key_held.w || inputs.keyboard.key_held.up
    -** Processing line: ~        state.player.y += 5~
    +      r: 255,                         # color saturation
    +** Processing line: ~      g: 255,~
     - Inside source: true
     *** True Line Result
    -        state.player.y += 5
    -** Processing line: ~      elsif inputs.keyboard.key_held.s || inputs.keyboard.key_held.down~
    +      g: 255,
    +** Processing line: ~      b: 255,~
     - Inside source: true
     *** True Line Result
    -      elsif inputs.keyboard.key_held.s || inputs.keyboard.key_held.down
    -** Processing line: ~        state.player.y -= 5~
    +      b: 255,
    +** Processing line: ~      tile_x:  0,                     # sprite sub division/tile~
     - Inside source: true
     *** True Line Result
    -        state.player.y -= 5
    -** Processing line: ~      end~
    +      tile_x:  0,                     # sprite sub division/tile
    +** Processing line: ~      tile_y:  0,~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +      tile_y:  0,
    +** Processing line: ~      tile_w: -1,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      # Sets the attack angle so the player can move and attack in the precise direction it wants to go.~
    +      tile_w: -1,
    +** Processing line: ~      tile_h: -1,~
     - Inside source: true
     *** True Line Result
    -      # Sets the attack angle so the player can move and attack in the precise direction it wants to go.
    -** Processing line: ~      # If the mouse is moved, the attack angle is changed (based on the player's position and mouse position).~
    +      tile_h: -1,
    +** Processing line: ~      flip_vertically: false,         # don't flip sprite~
     - Inside source: true
     *** True Line Result
    -      # If the mouse is moved, the attack angle is changed (based on the player's position and mouse position).
    -** Processing line: ~      # Attack angle also contributes to the position of red square.~
    +      flip_vertically: false,         # don't flip sprite
    +** Processing line: ~      flip_horizontally: false,~
     - Inside source: true
     *** True Line Result
    -      # Attack angle also contributes to the position of red square.
    -** Processing line: ~      if inputs.mouse.moved~
    +      flip_horizontally: false,
    +** Processing line: ~      angle_anchor_x: 0.5,            # rotation center set to middle~
     - Inside source: true
     *** True Line Result
    -      if inputs.mouse.moved
    -** Processing line: ~        state.player.attack_angle = inputs.mouse.position.angle_from [state.player.x, state.player.y]~
    +      angle_anchor_x: 0.5,            # rotation center set to middle
    +** Processing line: ~      angle_anchor_y: 0.5~
     - Inside source: true
     *** True Line Result
    -        state.player.attack_angle = inputs.mouse.position.angle_from [state.player.x, state.player.y]
    -** Processing line: ~      end~
    +      angle_anchor_y: 0.5
    +** Processing line: ~    }~
     - Inside source: true
     *** True Line Result
    -      end
    +    }
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      if inputs.mouse.click && state.player.dx < 0.5 && state.player.dy < 0.5~
    +** Processing line: ~    # Outputs label using a hash~
     - Inside source: true
     *** True Line Result
    -      if inputs.mouse.click && state.player.dx < 0.5 && state.player.dy < 0.5
    -** Processing line: ~        state.player.attack_angle_on_click = inputs.mouse.position.angle_from [state.player.x, state.player.y]~
    +    # Outputs label using a hash
    +** Processing line: ~    args.outputs.labels << {~
     - Inside source: true
     *** True Line Result
    -        state.player.attack_angle_on_click = inputs.mouse.position.angle_from [state.player.x, state.player.y]
    -** Processing line: ~        state.player.attack_angle = state.player.attack_angle_on_click # player's attack angle is set~
    +    args.outputs.labels << {
    +** Processing line: ~      x:              200,                 # label position~
     - Inside source: true
     *** True Line Result
    -        state.player.attack_angle = state.player.attack_angle_on_click # player's attack angle is set
    -** Processing line: ~        state.player.dx = state.player.attack_angle.vector_x(25) # change in player's position~
    +      x:              200,                 # label position
    +** Processing line: ~      y:              550,~
     - Inside source: true
     *** True Line Result
    -        state.player.dx = state.player.attack_angle.vector_x(25) # change in player's position
    -** Processing line: ~        state.player.dy = state.player.attack_angle.vector_y(25)~
    +      y:              550,
    +** Processing line: ~      text:           "dragonruby",        # label text~
     - Inside source: true
     *** True Line Result
    -        state.player.dy = state.player.attack_angle.vector_y(25)
    -** Processing line: ~      end~
    +      text:           "dragonruby",        # label text
    +** Processing line: ~      size_enum:      2,~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +      size_enum:      2,
    +** Processing line: ~      alignment_enum: 1,~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +      alignment_enum: 1,
    +** Processing line: ~      r:              155,                 # color saturation~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # Sets the zombie spawn's countdown to a random number.~
    +      r:              155,                 # color saturation
    +** Processing line: ~      g:              50,~
     - Inside source: true
     *** True Line Result
    -    # Sets the zombie spawn's countdown to a random number.
    -** Processing line: ~    # How fast zombies appear (change the 60 to 6 and too many zombies will appear at once!)~
    +      g:              50,
    +** Processing line: ~      b:              50,~
     - Inside source: true
     *** True Line Result
    -    # How fast zombies appear (change the 60 to 6 and too many zombies will appear at once!)
    -** Processing line: ~    def random_spawn_countdown minimum~
    +      b:              50,
    +** Processing line: ~      a:              255,                 # transparency~
     - Inside source: true
     *** True Line Result
    -    def random_spawn_countdown minimum
    -** Processing line: ~      10.randomize(:ratio, :sign).to_i + 60~
    +      a:              255,                 # transparency
    +** Processing line: ~      font:           "fonts/manaspc.ttf"  # font style; without mentioned file, label won't output correctly~
     - Inside source: true
     *** True Line Result
    -      10.randomize(:ratio, :sign).to_i + 60
    -** Processing line: ~    end~
    +      font:           "fonts/manaspc.ttf"  # font style; without mentioned file, label won't output correctly
    +** Processing line: ~    }~
     - Inside source: true
     *** True Line Result
    -    end
    +    }
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Helps to iterate through the images in the sprites folder by setting the animation index.~
    -- Inside source: true
    -*** True Line Result
    -    # Helps to iterate through the images in the sprites folder by setting the animation index.
    -** Processing line: ~    # 3 frames is how long to show an image, and 6 is how many images to flip through.~
    +** Processing line: ~    # Outputs solid using a hash~
     - Inside source: true
     *** True Line Result
    -    # 3 frames is how long to show an image, and 6 is how many images to flip through.
    -** Processing line: ~    def animation_index at~
    +    # Outputs solid using a hash
    +** Processing line: ~    # [X, Y, WIDTH, HEIGHT, RED, GREEN, BLUE, ALPHA]~
     - Inside source: true
     *** True Line Result
    -    def animation_index at
    -** Processing line: ~      at.idiv(3).mod(6)~
    +    # [X, Y, WIDTH, HEIGHT, RED, GREEN, BLUE, ALPHA]
    +** Processing line: ~    args.outputs.solids << {~
     - Inside source: true
     *** True Line Result
    -      at.idiv(3).mod(6)
    -** Processing line: ~    end~
    +    args.outputs.solids << {
    +** Processing line: ~      x: 400,                         # position~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +      x: 400,                         # position
    +** Processing line: ~      y: 550,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # Animates the zombies by using the animation index to go through the images in the sprites folder.~
    +      y: 550,
    +** Processing line: ~      w: 160,                         # size~
     - Inside source: true
     *** True Line Result
    -    # Animates the zombies by using the animation index to go through the images in the sprites folder.
    -** Processing line: ~    def animation_sprite zombie, at = nil~
    +      w: 160,                         # size
    +** Processing line: ~      h:  90,~
     - Inside source: true
     *** True Line Result
    -    def animation_sprite zombie, at = nil
    -** Processing line: ~      at ||= zombie.created_at_elapsed # how long it is has been since a zombie was created~
    +      h:  90,
    +** Processing line: ~      r: 120,                         # color saturation~
     - Inside source: true
     *** True Line Result
    -      at ||= zombie.created_at_elapsed # how long it is has been since a zombie was created
    -** Processing line: ~      index = animation_index at~
    +      r: 120,                         # color saturation
    +** Processing line: ~      g:  50,~
     - Inside source: true
     *** True Line Result
    -      index = animation_index at
    -** Processing line: ~      "sprites/zombie-#{index}.png" # string interpolation to iterate through images~
    +      g:  50,
    +** Processing line: ~      b:  50,~
     - Inside source: true
     *** True Line Result
    -      "sprites/zombie-#{index}.png" # string interpolation to iterate through images
    -** Processing line: ~    end~
    +      b:  50,
    +** Processing line: ~      a: 255                          # transparency~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~  end~
    +      a: 255                          # transparency
    +** Processing line: ~    }~
     - Inside source: true
     *** True Line Result
    -  end
    +    }
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  $protect_the_puppies_from_the_zombies = ProtectThePuppiesFromTheZombies.new~
    +** Processing line: ~    # Outputs border using a hash~
     - Inside source: true
     *** True Line Result
    -  $protect_the_puppies_from_the_zombies = ProtectThePuppiesFromTheZombies.new
    -** Processing line: ~~
    +    # Outputs border using a hash
    +** Processing line: ~    # Same parameters as a solid~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def tick args~
    +    # Same parameters as a solid
    +** Processing line: ~    args.outputs.borders << {~
     - Inside source: true
     *** True Line Result
    -  def tick args
    -** Processing line: ~    $protect_the_puppies_from_the_zombies.grid    = args.grid~
    +    args.outputs.borders << {
    +** Processing line: ~      x: 600,~
     - Inside source: true
     *** True Line Result
    -    $protect_the_puppies_from_the_zombies.grid    = args.grid
    -** Processing line: ~    $protect_the_puppies_from_the_zombies.inputs  = args.inputs~
    +      x: 600,
    +** Processing line: ~      y: 550,~
     - Inside source: true
     *** True Line Result
    -    $protect_the_puppies_from_the_zombies.inputs  = args.inputs
    -** Processing line: ~    $protect_the_puppies_from_the_zombies.state    = args.state~
    +      y: 550,
    +** Processing line: ~      w: 160,~
     - Inside source: true
     *** True Line Result
    -    $protect_the_puppies_from_the_zombies.state    = args.state
    -** Processing line: ~    $protect_the_puppies_from_the_zombies.outputs = args.outputs~
    +      w: 160,
    +** Processing line: ~      h:  90,~
     - Inside source: true
     *** True Line Result
    -    $protect_the_puppies_from_the_zombies.outputs = args.outputs
    -** Processing line: ~    $protect_the_puppies_from_the_zombies.tick~
    +      h:  90,
    +** Processing line: ~      r: 120,~
     - Inside source: true
     *** True Line Result
    -    $protect_the_puppies_from_the_zombies.tick
    -** Processing line: ~    tick_instructions args, "How to get the mouse position and translate it to an x, y position using .vector_x and .vector_y. CLICK to play."~
    +      r: 120,
    +** Processing line: ~      g:  50,~
     - Inside source: true
     *** True Line Result
    -    tick_instructions args, "How to get the mouse position and translate it to an x, y position using .vector_x and .vector_y. CLICK to play."
    -** Processing line: ~  end~
    +      g:  50,
    +** Processing line: ~      b:  50,~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +      b:  50,
    +** Processing line: ~      a: 255~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def tick_instructions args, text, y = 715~
    +      a: 255
    +** Processing line: ~    }~
     - Inside source: true
     *** True Line Result
    -  def tick_instructions args, text, y = 715
    -** Processing line: ~    return if args.state.key_event_occurred~
    +    }
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    return if args.state.key_event_occurred
    -** Processing line: ~    if args.inputs.mouse.click ||~
    +
    +** Processing line: ~    # Outputs line using a hash~
     - Inside source: true
     *** True Line Result
    -    if args.inputs.mouse.click ||
    -** Processing line: ~       args.inputs.keyboard.directional_vector ||~
    +    # Outputs line using a hash
    +** Processing line: ~    args.outputs.lines << {~
     - Inside source: true
     *** True Line Result
    -       args.inputs.keyboard.directional_vector ||
    -** Processing line: ~       args.inputs.keyboard.key_down.enter ||~
    +    args.outputs.lines << {
    +** Processing line: ~      x:  900,                        # starting position~
     - Inside source: true
     *** True Line Result
    -       args.inputs.keyboard.key_down.enter ||
    -** Processing line: ~       args.inputs.keyboard.key_down.escape~
    +      x:  900,                        # starting position
    +** Processing line: ~      y:  550,~
     - Inside source: true
     *** True Line Result
    -       args.inputs.keyboard.key_down.escape
    -** Processing line: ~      args.state.key_event_occurred = true~
    +      y:  550,
    +** Processing line: ~      x2: 1200,                       # ending position~
     - Inside source: true
     *** True Line Result
    -      args.state.key_event_occurred = true
    -** Processing line: ~    end~
    +      x2: 1200,                       # ending position
    +** Processing line: ~      y2: 550,~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +      y2: 550,
    +** Processing line: ~      r:  120,                        # color saturation~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    args.outputs.debug << [0, y - 50, 1280, 60].solid~
    +      r:  120,                        # color saturation
    +** Processing line: ~      g:   50,~
     - Inside source: true
     *** True Line Result
    -    args.outputs.debug << [0, y - 50, 1280, 60].solid
    -** Processing line: ~    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label~
    +      g:   50,
    +** Processing line: ~      b:   50,~
     - Inside source: true
     *** True Line Result
    -    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label
    -** Processing line: ~    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label~
    +      b:   50,
    +** Processing line: ~      a:  255                         # transparency~
     - Inside source: true
     *** True Line Result
    -    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label
    -** Processing line: ~  end~
    +      a:  255                         # transparency
    +** Processing line: ~    }~
     - Inside source: true
     *** True Line Result
    -  end
    +    }
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~#+end_src~
    -- Line was identified as the end of a code block.
    -*** True Line Result
    -#+end_src
    -** Processing line: ~~
    -- End of paragraph detected.
    -*** True Line Result
    -
    -** Processing line: ~*** Mouse - Mouse Move Paint App - main.rb~
    -- Header detected.
    +** Processing line: ~    # Outputs sprite as a primitive using a hash~
    +- Inside source: true
     *** True Line Result
    -
    +    # Outputs sprite as a primitive using a hash
    +** Processing line: ~    args.outputs.primitives << {~
    +- Inside source: true
     *** True Line Result
    -*** Mouse - Mouse Move Paint App - main.rb
    -** Processing line: ~#+begin_src ruby~
    -- Line was identified as the beginning of a code block.
    +    args.outputs.primitives << {
    +** Processing line: ~      x: 30,                          # position~
    +- Inside source: true
     *** True Line Result
    -
    +      x: 30,                          # position
    +** Processing line: ~      y: 200,~
    +- Inside source: true
     *** True Line Result
    -#+begin_src ruby
    -** Processing line: ~  # ./samples/05_mouse/03_mouse_move_paint_app/app/main.rb~
    +      y: 200,
    +** Processing line: ~      w: 128,                         # size~
     - Inside source: true
     *** True Line Result
    -  # ./samples/05_mouse/03_mouse_move_paint_app/app/main.rb
    -** Processing line: ~  =begin~
    +      w: 128,                         # size
    +** Processing line: ~      h: 101,~
     - Inside source: true
     *** True Line Result
    -  =begin
    -** Processing line: ~~
    +      h: 101,
    +** Processing line: ~      path: "dragonruby.png",         # image path~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   APIs listing that haven't been encountered in previous sample apps:~
    +      path: "dragonruby.png",         # image path
    +** Processing line: ~      angle: args.state.angle,        # angle~
     - Inside source: true
     *** True Line Result
    -   APIs listing that haven't been encountered in previous sample apps:
    -** Processing line: ~~
    +      angle: args.state.angle,        # angle
    +** Processing line: ~      a: 255,                         # transparency~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   - Floor: Method that returns an integer number smaller than or equal to the original with no decimal.~
    +      a: 255,                         # transparency
    +** Processing line: ~      r: 255,                         # color saturation~
     - Inside source: true
     *** True Line Result
    -   - Floor: Method that returns an integer number smaller than or equal to the original with no decimal.
    -** Processing line: ~~
    +      r: 255,                         # color saturation
    +** Processing line: ~      g: 255,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~     For example, if we have a variable, a = 13.7, and we called floor on it, it would look like this...~
    +      g: 255,
    +** Processing line: ~      b: 255,~
     - Inside source: true
     *** True Line Result
    -     For example, if we have a variable, a = 13.7, and we called floor on it, it would look like this...
    -** Processing line: ~     puts a.floor()~
    +      b: 255,
    +** Processing line: ~      tile_x:  0,                     # sprite sub division/tile~
     - Inside source: true
     *** True Line Result
    -     puts a.floor()
    -** Processing line: ~     which would print out 13.~
    +      tile_x:  0,                     # sprite sub division/tile
    +** Processing line: ~      tile_y:  0,~
     - Inside source: true
     *** True Line Result
    -     which would print out 13.
    -** Processing line: ~     (There is also a ceil method, which returns an integer number greater than or equal to the original~
    +      tile_y:  0,
    +** Processing line: ~      tile_w: -1,~
     - Inside source: true
     *** True Line Result
    -     (There is also a ceil method, which returns an integer number greater than or equal to the original
    -** Processing line: ~     with no decimal. If we had called ceil on the variable a, the result would have been 14.)~
    +      tile_w: -1,
    +** Processing line: ~      tile_h: -1,~
     - Inside source: true
     *** True Line Result
    -     with no decimal. If we had called ceil on the variable a, the result would have been 14.)
    -** Processing line: ~~
    +      tile_h: -1,
    +** Processing line: ~      flip_vertically: false,         # don't flip~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   Reminders:~
    +      flip_vertically: false,         # don't flip
    +** Processing line: ~      flip_horizontally: false,~
     - Inside source: true
     *** True Line Result
    -   Reminders:
    -** Processing line: ~~
    +      flip_horizontally: false,
    +** Processing line: ~      angle_anchor_x: 0.5,            # rotation center set to middle~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   - Hashes: Collection of unique keys and their corresponding values. The value can be found~
    +      angle_anchor_x: 0.5,            # rotation center set to middle
    +** Processing line: ~      angle_anchor_y: 0.5~
     - Inside source: true
     *** True Line Result
    -   - Hashes: Collection of unique keys and their corresponding values. The value can be found
    -** Processing line: ~     using their keys.~
    +      angle_anchor_y: 0.5
    +** Processing line: ~    }.sprite!~
     - Inside source: true
     *** True Line Result
    -     using their keys.
    +    }.sprite!
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~     For example, if we have a "numbers" hash that stores numbers in English as the~
    -- Inside source: true
    -*** True Line Result
    -     For example, if we have a "numbers" hash that stores numbers in English as the
    -** Processing line: ~     key and numbers in Spanish as the value, we'd have a hash that looks like this...~
    +** Processing line: ~    # Outputs label as primitive using a hash~
     - Inside source: true
     *** True Line Result
    -     key and numbers in Spanish as the value, we'd have a hash that looks like this...
    -** Processing line: ~     numbers = { "one" => "uno", "two" => "dos", "three" => "tres" }~
    +    # Outputs label as primitive using a hash
    +** Processing line: ~    args.outputs.primitives << {~
     - Inside source: true
     *** True Line Result
    -     numbers = { "one" => "uno", "two" => "dos", "three" => "tres" }
    -** Processing line: ~     and on it goes.~
    +    args.outputs.primitives << {
    +** Processing line: ~      x:         200,                 # position~
     - Inside source: true
     *** True Line Result
    -     and on it goes.
    -** Processing line: ~~
    +      x:         200,                 # position
    +** Processing line: ~      y:         200,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~     Now if we wanted to find the corresponding value of the "one" key, we could say~
    +      y:         200,
    +** Processing line: ~      text:      "dragonruby",        # text~
     - Inside source: true
     *** True Line Result
    -     Now if we wanted to find the corresponding value of the "one" key, we could say
    -** Processing line: ~     puts numbers["one"]~
    +      text:      "dragonruby",        # text
    +** Processing line: ~      size:      2,~
     - Inside source: true
     *** True Line Result
    -     puts numbers["one"]
    -** Processing line: ~     which would print "uno" to the console.~
    +      size:      2,
    +** Processing line: ~      alignment: 1,~
     - Inside source: true
     *** True Line Result
    -     which would print "uno" to the console.
    -** Processing line: ~~
    +      alignment: 1,
    +** Processing line: ~      r:         155,                 # color saturation~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   - args.state.new_entity: Used when we want to create a new object, like a sprite or button.~
    +      r:         155,                 # color saturation
    +** Processing line: ~      g:         50,~
     - Inside source: true
     *** True Line Result
    -   - args.state.new_entity: Used when we want to create a new object, like a sprite or button.
    -** Processing line: ~     In this sample app, new_entity is used to create a new button that clears the grid.~
    +      g:         50,
    +** Processing line: ~      b:         50,~
     - Inside source: true
     *** True Line Result
    -     In this sample app, new_entity is used to create a new button that clears the grid.
    -** Processing line: ~     (Remember, you can use state to define ANY property and it will be retained across frames.)~
    +      b:         50,
    +** Processing line: ~      a:         255,                 # transparency~
     - Inside source: true
     *** True Line Result
    -     (Remember, you can use state to define ANY property and it will be retained across frames.)
    -** Processing line: ~~
    +      a:         255,                 # transparency
    +** Processing line: ~      font:      "fonts/manaspc.ttf"  # font style~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   - args.inputs.mouse.click.point.(x|y): The x and y location of the mouse.~
    +      font:      "fonts/manaspc.ttf"  # font style
    +** Processing line: ~    }.label!~
     - Inside source: true
     *** True Line Result
    -   - args.inputs.mouse.click.point.(x|y): The x and y location of the mouse.
    +    }.label!
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~   - args.inputs.mouse.click.point.created_at: The frame the mouse click occurred in.~
    +** Processing line: ~    # Outputs solid as primitive using a hash~
     - Inside source: true
     *** True Line Result
    -   - args.inputs.mouse.click.point.created_at: The frame the mouse click occurred in.
    -** Processing line: ~~
    +    # Outputs solid as primitive using a hash
    +** Processing line: ~    args.outputs.primitives << {~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   - args.outputs.labels: An array. The values in the array generate a label.~
    +    args.outputs.primitives << {
    +** Processing line: ~      x: 400,                         # position~
     - Inside source: true
     *** True Line Result
    -   - args.outputs.labels: An array. The values in the array generate a label.
    -** Processing line: ~     The parameters are [X, Y, TEXT, SIZE, ALIGN, RED, GREEN, BLUE, ALPHA, FONT STYLE]~
    +      x: 400,                         # position
    +** Processing line: ~      y: 200,~
     - Inside source: true
     *** True Line Result
    -     The parameters are [X, Y, TEXT, SIZE, ALIGN, RED, GREEN, BLUE, ALPHA, FONT STYLE]
    -** Processing line: ~     For more information about labels, go to mygame/documentation/02-labels.md.~
    +      y: 200,
    +** Processing line: ~      w: 160,                         # size~
     - Inside source: true
     *** True Line Result
    -     For more information about labels, go to mygame/documentation/02-labels.md.
    -** Processing line: ~~
    +      w: 160,                         # size
    +** Processing line: ~      h:  90,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   - ARRAY#inside_rect?: Returns true or false depending on if the point is inside the rect.~
    +      h:  90,
    +** Processing line: ~      r: 120,                         # color saturation~
     - Inside source: true
     *** True Line Result
    -   - ARRAY#inside_rect?: Returns true or false depending on if the point is inside the rect.
    -** Processing line: ~~
    +      r: 120,                         # color saturation
    +** Processing line: ~      g:  50,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  =end~
    +      g:  50,
    +** Processing line: ~      b:  50,~
     - Inside source: true
     *** True Line Result
    -  =end
    -** Processing line: ~~
    +      b:  50,
    +** Processing line: ~      a: 255                          # transparency~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  # This sample app shows an empty grid that the user can paint on.~
    +      a: 255                          # transparency
    +** Processing line: ~    }.solid!~
     - Inside source: true
     *** True Line Result
    -  # This sample app shows an empty grid that the user can paint on.
    -** Processing line: ~  # To paint, the user must keep their mouse presssed and drag it around the grid.~
    +    }.solid!
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  # To paint, the user must keep their mouse presssed and drag it around the grid.
    -** Processing line: ~  # The "clear" button allows users to clear the grid so they can start over.~
    +
    +** Processing line: ~    # Outputs border as primitive using a hash~
     - Inside source: true
     *** True Line Result
    -  # The "clear" button allows users to clear the grid so they can start over.
    -** Processing line: ~~
    +    # Outputs border as primitive using a hash
    +** Processing line: ~    # Same parameters as solid~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  class PaintApp~
    +    # Same parameters as solid
    +** Processing line: ~    args.outputs.primitives << {~
     - Inside source: true
     *** True Line Result
    -  class PaintApp
    -** Processing line: ~    attr_accessor :inputs, :state, :outputs, :grid, :args~
    +    args.outputs.primitives << {
    +** Processing line: ~      x: 600,                         # position~
     - Inside source: true
     *** True Line Result
    -    attr_accessor :inputs, :state, :outputs, :grid, :args
    -** Processing line: ~~
    +      x: 600,                         # position
    +** Processing line: ~      y: 200,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # Runs methods necessary for the game to function properly.~
    +      y: 200,
    +** Processing line: ~      w: 160,                         # size~
     - Inside source: true
     *** True Line Result
    -    # Runs methods necessary for the game to function properly.
    -** Processing line: ~    def tick~
    +      w: 160,                         # size
    +** Processing line: ~      h:  90,~
     - Inside source: true
     *** True Line Result
    -    def tick
    -** Processing line: ~      print_title~
    +      h:  90,
    +** Processing line: ~      r: 120,                         # color saturation~
     - Inside source: true
     *** True Line Result
    -      print_title
    -** Processing line: ~      add_grid~
    +      r: 120,                         # color saturation
    +** Processing line: ~      g:  50,~
     - Inside source: true
     *** True Line Result
    -      add_grid
    -** Processing line: ~      check_click~
    +      g:  50,
    +** Processing line: ~      b:  50,~
     - Inside source: true
     *** True Line Result
    -      check_click
    -** Processing line: ~      draw_buttons~
    +      b:  50,
    +** Processing line: ~      a: 255                          # transparency~
     - Inside source: true
     *** True Line Result
    -      draw_buttons
    -** Processing line: ~    end~
    +      a: 255                          # transparency
    +** Processing line: ~    }.border!~
     - Inside source: true
     *** True Line Result
    -    end
    +    }.border!
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Prints the title onto the screen by using a label.~
    +** Processing line: ~    # Outputs line as primitive using a hash~
     - Inside source: true
     *** True Line Result
    -    # Prints the title onto the screen by using a label.
    -** Processing line: ~    # Also separates the title from the grid with a line as a horizontal separator.~
    +    # Outputs line as primitive using a hash
    +** Processing line: ~    args.outputs.primitives << {~
     - Inside source: true
     *** True Line Result
    -    # Also separates the title from the grid with a line as a horizontal separator.
    -** Processing line: ~    def print_title~
    +    args.outputs.primitives << {
    +** Processing line: ~      x:  900,                        # starting position~
     - Inside source: true
     *** True Line Result
    -    def print_title
    -** Processing line: ~      args.outputs.labels << [ 640, 700, 'Paint!', 0, 1 ]~
    +      x:  900,                        # starting position
    +** Processing line: ~      y:  200,~
     - Inside source: true
     *** True Line Result
    -      args.outputs.labels << [ 640, 700, 'Paint!', 0, 1 ]
    -** Processing line: ~      outputs.lines << horizontal_separator(660, 0, 1280)~
    +      y:  200,
    +** Processing line: ~      x2: 1200,                       # ending position~
     - Inside source: true
     *** True Line Result
    -      outputs.lines << horizontal_separator(660, 0, 1280)
    -** Processing line: ~    end~
    +      x2: 1200,                       # ending position
    +** Processing line: ~      y2: 200,~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +      y2: 200,
    +** Processing line: ~      r:  120,                        # color saturation~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # Sets the starting position, ending position, and color for the horizontal separator.~
    +      r:  120,                        # color saturation
    +** Processing line: ~      g:   50,~
     - Inside source: true
     *** True Line Result
    -    # Sets the starting position, ending position, and color for the horizontal separator.
    -** Processing line: ~    # The starting and ending positions have the same y values.~
    +      g:   50,
    +** Processing line: ~      b:   50,~
     - Inside source: true
     *** True Line Result
    -    # The starting and ending positions have the same y values.
    -** Processing line: ~    def horizontal_separator y, x, x2~
    +      b:   50,
    +** Processing line: ~      a:  255                         # transparency~
     - Inside source: true
     *** True Line Result
    -    def horizontal_separator y, x, x2
    -** Processing line: ~      [x, y, x2, y, 150, 150, 150]~
    +      a:  255                         # transparency
    +** Processing line: ~    }.line!~
     - Inside source: true
     *** True Line Result
    -      [x, y, x2, y, 150, 150, 150]
    -** Processing line: ~    end~
    +    }.line!
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    end
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Sets the starting position, ending position, and color for the vertical separator.~
    -- Inside source: true
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
     *** True Line Result
    -    # Sets the starting position, ending position, and color for the vertical separator.
    -** Processing line: ~    # The starting and ending positions have the same x values.~
    -- Inside source: true
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
     *** True Line Result
    -    # The starting and ending positions have the same x values.
    -** Processing line: ~    def vertical_separator x, y, y2~
    -- Inside source: true
    +
    +** Processing line: ~*** Advanced Rendering - Pixel Arrays - main.rb~
    +- Header detected.
     *** True Line Result
    -    def vertical_separator x, y, y2
    -** Processing line: ~      [x, y, x, y2, 150, 150, 150]~
    +
    +*** True Line Result
    +*** Advanced Rendering - Pixel Arrays - main.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/07_advanced_rendering/06_pixel_arrays/app/main.rb~
     - Inside source: true
     *** True Line Result
    -      [x, y, x, y2, 150, 150, 150]
    -** Processing line: ~    end~
    +  # ./samples/07_advanced_rendering/06_pixel_arrays/app/main.rb
    +** Processing line: ~  $gtk.reset~
     - Inside source: true
     *** True Line Result
    -    end
    +  $gtk.reset
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Outputs a border and a grid containing empty squares onto the screen.~
    +** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
    -    # Outputs a border and a grid containing empty squares onto the screen.
    -** Processing line: ~    def add_grid~
    +  def tick args
    +** Processing line: ~    args.state.posinc ||= 1~
     - Inside source: true
     *** True Line Result
    -    def add_grid
    +    args.state.posinc ||= 1
    +** Processing line: ~    args.state.pos ||= 0~
    +- Inside source: true
    +*** True Line Result
    +    args.state.pos ||= 0
    +** Processing line: ~    args.state.rotation ||= 0~
    +- Inside source: true
    +*** True Line Result
    +    args.state.rotation ||= 0
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      # Sets the x, y, height, and width of the grid.~
    +** Processing line: ~    dimension = 10  # keep it small and let the GPU scale it when rendering the sprite.~
     - Inside source: true
     *** True Line Result
    -      # Sets the x, y, height, and width of the grid.
    -** Processing line: ~      # There are 31 horizontal lines and 31 vertical lines in the grid.~
    +    dimension = 10  # keep it small and let the GPU scale it when rendering the sprite.
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      # There are 31 horizontal lines and 31 vertical lines in the grid.
    -** Processing line: ~      # Feel free to count them yourself before continuing!~
    +
    +** Processing line: ~    # Set up our "scanner" pixel array and fill it with black pixels.~
     - Inside source: true
     *** True Line Result
    -      # Feel free to count them yourself before continuing!
    -** Processing line: ~      x, y, h, w = 640 - 500/2, 640 - 500, 500, 500 # calculations done so the grid appears in screen's center~
    +    # Set up our "scanner" pixel array and fill it with black pixels.
    +** Processing line: ~    args.pixel_array(:scanner).width = dimension~
     - Inside source: true
     *** True Line Result
    -      x, y, h, w = 640 - 500/2, 640 - 500, 500, 500 # calculations done so the grid appears in screen's center
    -** Processing line: ~      lines_h = 31~
    +    args.pixel_array(:scanner).width = dimension
    +** Processing line: ~    args.pixel_array(:scanner).height = dimension~
     - Inside source: true
     *** True Line Result
    -      lines_h = 31
    -** Processing line: ~      lines_v = 31~
    +    args.pixel_array(:scanner).height = dimension
    +** Processing line: ~    args.pixel_array(:scanner).pixels.fill(0xFF000000, 0, dimension * dimension)  # black, full alpha~
     - Inside source: true
     *** True Line Result
    -      lines_v = 31
    +    args.pixel_array(:scanner).pixels.fill(0xFF000000, 0, dimension * dimension)  # black, full alpha
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      # Sets values for the grid's border, grid lines, and filled squares.~
    +** Processing line: ~    # Draw a green line that bounces up and down the sprite.~
     - Inside source: true
     *** True Line Result
    -      # Sets values for the grid's border, grid lines, and filled squares.
    -** Processing line: ~      # The filled_squares variable is initially set to an empty array.~
    +    # Draw a green line that bounces up and down the sprite.
    +** Processing line: ~    args.pixel_array(:scanner).pixels.fill(0xFF00FF00, dimension * args.state.pos, dimension)  # green, full alpha~
     - Inside source: true
     *** True Line Result
    -      # The filled_squares variable is initially set to an empty array.
    -** Processing line: ~      state.grid_border ||= [ x, y, h, w ] # definition of grid's outer border~
    +    args.pixel_array(:scanner).pixels.fill(0xFF00FF00, dimension * args.state.pos, dimension)  # green, full alpha
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      state.grid_border ||= [ x, y, h, w ] # definition of grid's outer border
    -** Processing line: ~      state.grid_lines ||= draw_grid(x, y, h, w, lines_h, lines_v) # calls draw_grid method~
    +
    +** Processing line: ~    # Adjust position for next frame.~
     - Inside source: true
     *** True Line Result
    -      state.grid_lines ||= draw_grid(x, y, h, w, lines_h, lines_v) # calls draw_grid method
    -** Processing line: ~      state.filled_squares ||= [] # there are no filled squares until the user fills them in~
    +    # Adjust position for next frame.
    +** Processing line: ~    args.state.pos += args.state.posinc~
     - Inside source: true
     *** True Line Result
    -      state.filled_squares ||= [] # there are no filled squares until the user fills them in
    -** Processing line: ~~
    +    args.state.pos += args.state.posinc
    +** Processing line: ~    if args.state.posinc > 0 && args.state.pos >= dimension~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      # Outputs the grid lines, border, and filled squares onto the screen.~
    +    if args.state.posinc > 0 && args.state.pos >= dimension
    +** Processing line: ~      args.state.posinc = -1~
     - Inside source: true
     *** True Line Result
    -      # Outputs the grid lines, border, and filled squares onto the screen.
    -** Processing line: ~      outputs.lines.concat state.grid_lines~
    +      args.state.posinc = -1
    +** Processing line: ~      args.state.pos = dimension - 1~
     - Inside source: true
     *** True Line Result
    -      outputs.lines.concat state.grid_lines
    -** Processing line: ~      outputs.borders << state.grid_border~
    +      args.state.pos = dimension - 1
    +** Processing line: ~    elsif args.state.posinc < 0 && args.state.pos < 0~
     - Inside source: true
     *** True Line Result
    -      outputs.borders << state.grid_border
    -** Processing line: ~      outputs.solids << state.filled_squares~
    +    elsif args.state.posinc < 0 && args.state.pos < 0
    +** Processing line: ~      args.state.posinc = 1~
     - Inside source: true
     *** True Line Result
    -      outputs.solids << state.filled_squares
    +      args.state.posinc = 1
    +** Processing line: ~      args.state.pos = 1~
    +- Inside source: true
    +*** True Line Result
    +      args.state.pos = 1
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -42884,338 +51127,330 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Draws the grid by adding in vertical and horizontal separators.~
    +** Processing line: ~    # New/changed pixel arrays get uploaded to the GPU before we render~
     - Inside source: true
     *** True Line Result
    -    # Draws the grid by adding in vertical and horizontal separators.
    -** Processing line: ~    def draw_grid x, y, h, w, lines_h, lines_v~
    +    # New/changed pixel arrays get uploaded to the GPU before we render
    +** Processing line: ~    #  anything. At that point, they can be scaled, rotated, and otherwise~
     - Inside source: true
     *** True Line Result
    -    def draw_grid x, y, h, w, lines_h, lines_v
    -** Processing line: ~~
    +    #  anything. At that point, they can be scaled, rotated, and otherwise
    +** Processing line: ~    #  used like any other sprite.~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      # The grid starts off empty.~
    +    #  used like any other sprite.
    +** Processing line: ~    w = 100~
     - Inside source: true
     *** True Line Result
    -      # The grid starts off empty.
    -** Processing line: ~      grid = []~
    +    w = 100
    +** Processing line: ~    h = 100~
     - Inside source: true
     *** True Line Result
    -      grid = []
    -** Processing line: ~~
    +    h = 100
    +** Processing line: ~    x = (1280 - w) / 2~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      # Calculates the placement and adds horizontal lines or separators into the grid.~
    +    x = (1280 - w) / 2
    +** Processing line: ~    y = (720 - h) / 2~
     - Inside source: true
     *** True Line Result
    -      # Calculates the placement and adds horizontal lines or separators into the grid.
    -** Processing line: ~      curr_y = y # start at the bottom of the box~
    +    y = (720 - h) / 2
    +** Processing line: ~    args.outputs.background_color = [64, 0, 128]~
     - Inside source: true
     *** True Line Result
    -      curr_y = y # start at the bottom of the box
    -** Processing line: ~      dist_y = h / (lines_h + 1) # finds distance to place horizontal lines evenly throughout 500 height of grid~
    +    args.outputs.background_color = [64, 0, 128]
    +** Processing line: ~    args.outputs.primitives << [x, y, w, h, :scanner, args.state.rotation].sprite~
     - Inside source: true
     *** True Line Result
    -      dist_y = h / (lines_h + 1) # finds distance to place horizontal lines evenly throughout 500 height of grid
    -** Processing line: ~      lines_h.times do~
    +    args.outputs.primitives << [x, y, w, h, :scanner, args.state.rotation].sprite
    +** Processing line: ~    args.state.rotation += 1~
     - Inside source: true
     *** True Line Result
    -      lines_h.times do
    -** Processing line: ~        curr_y += dist_y # increment curr_y by the distance between the horizontal lines~
    +    args.state.rotation += 1
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        curr_y += dist_y # increment curr_y by the distance between the horizontal lines
    -** Processing line: ~        grid << horizontal_separator(curr_y, x, x + w - 1) # add a separator into the grid~
    +
    +** Processing line: ~    args.outputs.primitives << args.gtk.current_framerate_primitives~
     - Inside source: true
     *** True Line Result
    -        grid << horizontal_separator(curr_y, x, x + w - 1) # add a separator into the grid
    -** Processing line: ~      end~
    +    args.outputs.primitives << args.gtk.current_framerate_primitives
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -      end
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      # Calculates the placement and adds vertical lines or separators into the grid.~
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      # Calculates the placement and adds vertical lines or separators into the grid.
    -** Processing line: ~      curr_x = x # now start at the left of the box~
    -- Inside source: true
    +
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
     *** True Line Result
    -      curr_x = x # now start at the left of the box
    -** Processing line: ~      dist_x = w / (lines_v + 1) # finds distance to place vertical lines evenly throughout 500 width of grid~
    -- Inside source: true
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
     *** True Line Result
    -      dist_x = w / (lines_v + 1) # finds distance to place vertical lines evenly throughout 500 width of grid
    -** Processing line: ~      lines_v.times do~
    -- Inside source: true
    +
    +** Processing line: ~*** Advanced Rendering - Simple Camera - main.rb~
    +- Header detected.
     *** True Line Result
    -      lines_v.times do
    -** Processing line: ~        curr_x += dist_x # increment curr_x by the distance between the vertical lines~
    -- Inside source: true
    +
     *** True Line Result
    -        curr_x += dist_x # increment curr_x by the distance between the vertical lines
    -** Processing line: ~        grid << vertical_separator(curr_x, y + 1, y  + h) # add separator~
    -- Inside source: true
    +*** Advanced Rendering - Simple Camera - main.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
     *** True Line Result
    -        grid << vertical_separator(curr_x, y + 1, y  + h) # add separator
    -** Processing line: ~      end~
    -- Inside source: true
    +
     *** True Line Result
    -      end
    -** Processing line: ~~
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/07_advanced_rendering/07_simple_camera/app/main.rb~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      # paint_grid uses a hash to assign values to keys.~
    +  # ./samples/07_advanced_rendering/07_simple_camera/app/main.rb
    +** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
    -      # paint_grid uses a hash to assign values to keys.
    -** Processing line: ~      state.paint_grid ||= {"x" => x, "y" => y, "h" => h, "w" => w, "lines_h" => lines_h,~
    +  def tick args
    +** Processing line: ~    # variables you can play around with~
     - Inside source: true
     *** True Line Result
    -      state.paint_grid ||= {"x" => x, "y" => y, "h" => h, "w" => w, "lines_h" => lines_h,
    -** Processing line: ~                            "lines_v" => lines_v, "dist_x" => dist_x,~
    +    # variables you can play around with
    +** Processing line: ~    args.state.world.w      ||= 1280~
     - Inside source: true
     *** True Line Result
    -                            "lines_v" => lines_v, "dist_x" => dist_x,
    -** Processing line: ~                            "dist_y" => dist_y }~
    +    args.state.world.w      ||= 1280
    +** Processing line: ~    args.state.world.h      ||= 720~
     - Inside source: true
     *** True Line Result
    -                            "dist_y" => dist_y }
    +    args.state.world.h      ||= 720
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      return grid~
    +** Processing line: ~    args.state.player.x     ||= 0~
     - Inside source: true
     *** True Line Result
    -      return grid
    -** Processing line: ~    end~
    +    args.state.player.x     ||= 0
    +** Processing line: ~    args.state.player.y     ||= 0~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +    args.state.player.y     ||= 0
    +** Processing line: ~    args.state.player.size  ||= 32~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # Checks if the user is keeping the mouse pressed down and sets the mouse_hold variable accordingly using boolean values.~
    +    args.state.player.size  ||= 32
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    # Checks if the user is keeping the mouse pressed down and sets the mouse_hold variable accordingly using boolean values.
    -** Processing line: ~    # If the mouse is up, the user cannot drag the mouse.~
    +
    +** Processing line: ~    args.state.enemy.x      ||= 700~
     - Inside source: true
     *** True Line Result
    -    # If the mouse is up, the user cannot drag the mouse.
    -** Processing line: ~    def check_click~
    +    args.state.enemy.x      ||= 700
    +** Processing line: ~    args.state.enemy.y      ||= 700~
     - Inside source: true
     *** True Line Result
    -    def check_click
    -** Processing line: ~      if inputs.mouse.down #is mouse up or down?~
    +    args.state.enemy.y      ||= 700
    +** Processing line: ~    args.state.enemy.size   ||= 16~
     - Inside source: true
     *** True Line Result
    -      if inputs.mouse.down #is mouse up or down?
    -** Processing line: ~        state.mouse_held = true # mouse is being held down~
    +    args.state.enemy.size   ||= 16
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        state.mouse_held = true # mouse is being held down
    -** Processing line: ~      elsif inputs.mouse.up # if mouse is up~
    +
    +** Processing line: ~    args.state.camera.x                ||= 640~
     - Inside source: true
     *** True Line Result
    -      elsif inputs.mouse.up # if mouse is up
    -** Processing line: ~      state.mouse_held = false # mouse is not being held down or dragged~
    +    args.state.camera.x                ||= 640
    +** Processing line: ~    args.state.camera.y                ||= 300~
     - Inside source: true
     *** True Line Result
    -      state.mouse_held = false # mouse is not being held down or dragged
    -** Processing line: ~        state.mouse_dragging = false~
    +    args.state.camera.y                ||= 300
    +** Processing line: ~    args.state.camera.scale            ||= 1.0~
     - Inside source: true
     *** True Line Result
    -        state.mouse_dragging = false
    -** Processing line: ~      end~
    +    args.state.camera.scale            ||= 1.0
    +** Processing line: ~    args.state.camera.show_empty_space ||= :yes~
     - Inside source: true
     *** True Line Result
    -      end
    +    args.state.camera.show_empty_space ||= :yes
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      if state.mouse_held &&    # mouse needs to be down~
    +** Processing line: ~    # instructions~
     - Inside source: true
     *** True Line Result
    -      if state.mouse_held &&    # mouse needs to be down
    -** Processing line: ~        !inputs.mouse.click &&     # must not be first click~
    +    # instructions
    +** Processing line: ~    args.outputs.primitives << { x: 0, y:  80.from_top, w: 360, h: 80, r: 0, g: 0, b: 0, a: 128 }.solid!~
     - Inside source: true
     *** True Line Result
    -        !inputs.mouse.click &&     # must not be first click
    -** Processing line: ~        ((inputs.mouse.previous_click.point.x - inputs.mouse.position.x).abs > 15) # Need to move 15 pixels before "drag"~
    +    args.outputs.primitives << { x: 0, y:  80.from_top, w: 360, h: 80, r: 0, g: 0, b: 0, a: 128 }.solid!
    +** Processing line: ~    args.outputs.primitives << { x: 10, y: 10.from_top, text: "arrow keys to move around", r: 255, g: 255, b: 255}.label!~
     - Inside source: true
     *** True Line Result
    -        ((inputs.mouse.previous_click.point.x - inputs.mouse.position.x).abs > 15) # Need to move 15 pixels before "drag"
    -** Processing line: ~        state.mouse_dragging = true~
    +    args.outputs.primitives << { x: 10, y: 10.from_top, text: "arrow keys to move around", r: 255, g: 255, b: 255}.label!
    +** Processing line: ~    args.outputs.primitives << { x: 10, y: 30.from_top, text: "+/- to change zoom of camera", r: 255, g: 255, b: 255}.label!~
     - Inside source: true
     *** True Line Result
    -        state.mouse_dragging = true
    -** Processing line: ~      end~
    +    args.outputs.primitives << { x: 10, y: 30.from_top, text: "+/- to change zoom of camera", r: 255, g: 255, b: 255}.label!
    +** Processing line: ~    args.outputs.primitives << { x: 10, y: 50.from_top, text: "tab to change camera edge behavior", r: 255, g: 255, b: 255}.label!~
     - Inside source: true
     *** True Line Result
    -      end
    +    args.outputs.primitives << { x: 10, y: 50.from_top, text: "tab to change camera edge behavior", r: 255, g: 255, b: 255}.label!
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      # If the user clicks their mouse inside the grid, the search_lines method is called with a click input type.~
    +** Processing line: ~    # render scene~
     - Inside source: true
     *** True Line Result
    -      # If the user clicks their mouse inside the grid, the search_lines method is called with a click input type.
    -** Processing line: ~      if ((inputs.mouse.click) && (inputs.mouse.click.point.inside_rect? state.grid_border))~
    +    # render scene
    +** Processing line: ~    args.outputs[:scene].w = args.state.world.w~
     - Inside source: true
     *** True Line Result
    -      if ((inputs.mouse.click) && (inputs.mouse.click.point.inside_rect? state.grid_border))
    -** Processing line: ~        search_lines(inputs.mouse.click.point, :click)~
    +    args.outputs[:scene].w = args.state.world.w
    +** Processing line: ~    args.outputs[:scene].h = args.state.world.h~
     - Inside source: true
     *** True Line Result
    -        search_lines(inputs.mouse.click.point, :click)
    +    args.outputs[:scene].h = args.state.world.h
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      # If the user drags their mouse inside the grid, the search_lines method is called with a drag input type.~
    +** Processing line: ~    args.outputs[:scene].solids << { x: 0, y: 0, w: args.state.world.w, h: args.state.world.h, r: 20, g: 60, b: 80 }~
     - Inside source: true
     *** True Line Result
    -      # If the user drags their mouse inside the grid, the search_lines method is called with a drag input type.
    -** Processing line: ~      elsif ((state.mouse_dragging) && (inputs.mouse.position.inside_rect? state.grid_border))~
    +    args.outputs[:scene].solids << { x: 0, y: 0, w: args.state.world.w, h: args.state.world.h, r: 20, g: 60, b: 80 }
    +** Processing line: ~    args.outputs[:scene].solids << { x: args.state.player.x, y: args.state.player.y,~
     - Inside source: true
     *** True Line Result
    -      elsif ((state.mouse_dragging) && (inputs.mouse.position.inside_rect? state.grid_border))
    -** Processing line: ~        search_lines(inputs.mouse.position, :drag)~
    +    args.outputs[:scene].solids << { x: args.state.player.x, y: args.state.player.y,
    +** Processing line: ~                                     w: args.state.player.size, h: args.state.player.size, r: 80, g: 155, b: 80 }~
     - Inside source: true
     *** True Line Result
    -        search_lines(inputs.mouse.position, :drag)
    -** Processing line: ~      end~
    +                                     w: args.state.player.size, h: args.state.player.size, r: 80, g: 155, b: 80 }
    +** Processing line: ~    args.outputs[:scene].solids << { x: args.state.enemy.x, y: args.state.enemy.y,~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +    args.outputs[:scene].solids << { x: args.state.enemy.x, y: args.state.enemy.y,
    +** Processing line: ~                                     w: args.state.enemy.size, h: args.state.enemy.size, r: 155, g: 80, b: 80 }~
     - Inside source: true
     *** True Line Result
    -    end
    +                                     w: args.state.enemy.size, h: args.state.enemy.size, r: 155, g: 80, b: 80 }
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Sets the definition of a grid box and handles user input to fill in or clear grid boxes.~
    -- Inside source: true
    -*** True Line Result
    -    # Sets the definition of a grid box and handles user input to fill in or clear grid boxes.
    -** Processing line: ~    def search_lines (point, input_type)~
    +** Processing line: ~    # render camera~
     - Inside source: true
     *** True Line Result
    -    def search_lines (point, input_type)
    -** Processing line: ~      point.x -= state.paint_grid["x"] # subtracts the value assigned to the "x" key in the paint_grid hash~
    +    # render camera
    +** Processing line: ~    scene_position = calc_scene_position args~
     - Inside source: true
     *** True Line Result
    -      point.x -= state.paint_grid["x"] # subtracts the value assigned to the "x" key in the paint_grid hash
    -** Processing line: ~      point.y -= state.paint_grid["y"] # subtracts the value assigned to the "y" key in the paint_grid hash~
    +    scene_position = calc_scene_position args
    +** Processing line: ~    args.outputs.sprites << { x: scene_position.x,~
     - Inside source: true
     *** True Line Result
    -      point.y -= state.paint_grid["y"] # subtracts the value assigned to the "y" key in the paint_grid hash
    -** Processing line: ~~
    +    args.outputs.sprites << { x: scene_position.x,
    +** Processing line: ~                              y: scene_position.y,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      # Remove code following the .floor and see what happens when you try to fill in grid squares~
    +                              y: scene_position.y,
    +** Processing line: ~                              w: scene_position.w,~
     - Inside source: true
     *** True Line Result
    -      # Remove code following the .floor and see what happens when you try to fill in grid squares
    -** Processing line: ~      point.x = (point.x / state.paint_grid["dist_x"]).floor * state.paint_grid["dist_x"]~
    +                              w: scene_position.w,
    +** Processing line: ~                              h: scene_position.h,~
     - Inside source: true
     *** True Line Result
    -      point.x = (point.x / state.paint_grid["dist_x"]).floor * state.paint_grid["dist_x"]
    -** Processing line: ~      point.y = (point.y / state.paint_grid["dist_y"]).floor * state.paint_grid["dist_y"]~
    +                              h: scene_position.h,
    +** Processing line: ~                              path: :scene }~
     - Inside source: true
     *** True Line Result
    -      point.y = (point.y / state.paint_grid["dist_y"]).floor * state.paint_grid["dist_y"]
    +                              path: :scene }
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      point.x += state.paint_grid["x"]~
    +** Processing line: ~    # move player~
     - Inside source: true
     *** True Line Result
    -      point.x += state.paint_grid["x"]
    -** Processing line: ~      point.y += state.paint_grid["y"]~
    +    # move player
    +** Processing line: ~    if args.inputs.directional_angle~
     - Inside source: true
     *** True Line Result
    -      point.y += state.paint_grid["y"]
    -** Processing line: ~~
    +    if args.inputs.directional_angle
    +** Processing line: ~      args.state.player.x += args.inputs.directional_angle.vector_x * 5~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      # Sets definition of a grid box, meaning its x, y, width, and height.~
    +      args.state.player.x += args.inputs.directional_angle.vector_x * 5
    +** Processing line: ~      args.state.player.y += args.inputs.directional_angle.vector_y * 5~
     - Inside source: true
     *** True Line Result
    -      # Sets definition of a grid box, meaning its x, y, width, and height.
    -** Processing line: ~      # Floor is called on the point.x and point.y variables.~
    +      args.state.player.y += args.inputs.directional_angle.vector_y * 5
    +** Processing line: ~      args.state.player.x  = args.state.player.x.clamp(0, args.state.world.w - args.state.player.size)~
     - Inside source: true
     *** True Line Result
    -      # Floor is called on the point.x and point.y variables.
    -** Processing line: ~      # Ceil method is called on values of the distance hash keys, setting the width and height of a box.~
    +      args.state.player.x  = args.state.player.x.clamp(0, args.state.world.w - args.state.player.size)
    +** Processing line: ~      args.state.player.y  = args.state.player.y.clamp(0, args.state.world.h - args.state.player.size)~
     - Inside source: true
     *** True Line Result
    -      # Ceil method is called on values of the distance hash keys, setting the width and height of a box.
    -** Processing line: ~      grid_box = [ point.x.floor, point.y.floor, state.paint_grid["dist_x"].ceil, state.paint_grid["dist_y"].ceil ]~
    +      args.state.player.y  = args.state.player.y.clamp(0, args.state.world.h - args.state.player.size)
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      grid_box = [ point.x.floor, point.y.floor, state.paint_grid["dist_x"].ceil, state.paint_grid["dist_y"].ceil ]
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      if input_type == :click # if user clicks their mouse~
    +** Processing line: ~    # +/- to zoom in and out~
     - Inside source: true
     *** True Line Result
    -      if input_type == :click # if user clicks their mouse
    -** Processing line: ~        if state.filled_squares.include? grid_box # if grid box is already filled in~
    +    # +/- to zoom in and out
    +** Processing line: ~    if args.inputs.keyboard.plus && args.state.tick_count.zmod?(3)~
     - Inside source: true
     *** True Line Result
    -        if state.filled_squares.include? grid_box # if grid box is already filled in
    -** Processing line: ~          state.filled_squares.delete grid_box # box is cleared and removed from filled_squares~
    +    if args.inputs.keyboard.plus && args.state.tick_count.zmod?(3)
    +** Processing line: ~      args.state.camera.scale += 0.05~
     - Inside source: true
     *** True Line Result
    -          state.filled_squares.delete grid_box # box is cleared and removed from filled_squares
    -** Processing line: ~        else~
    +      args.state.camera.scale += 0.05
    +** Processing line: ~    elsif args.inputs.keyboard.hyphen && args.state.tick_count.zmod?(3)~
     - Inside source: true
     *** True Line Result
    -        else
    -** Processing line: ~          state.filled_squares << grid_box # otherwise, box is filled in and added to filled_squares~
    +    elsif args.inputs.keyboard.hyphen && args.state.tick_count.zmod?(3)
    +** Processing line: ~      args.state.camera.scale -= 0.05~
     - Inside source: true
     *** True Line Result
    -          state.filled_squares << grid_box # otherwise, box is filled in and added to filled_squares
    -** Processing line: ~        end~
    +      args.state.camera.scale -= 0.05
    +** Processing line: ~    elsif args.inputs.keyboard.key_down.tab~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~      elsif input_type == :drag # if user drags mouse~
    +    elsif args.inputs.keyboard.key_down.tab
    +** Processing line: ~      if args.state.camera.show_empty_space == :yes~
     - Inside source: true
     *** True Line Result
    -      elsif input_type == :drag # if user drags mouse
    -** Processing line: ~        unless state.filled_squares.include? grid_box # unless the grid box dragged over is already filled in~
    +      if args.state.camera.show_empty_space == :yes
    +** Processing line: ~        args.state.camera.show_empty_space = :no~
     - Inside source: true
     *** True Line Result
    -        unless state.filled_squares.include? grid_box # unless the grid box dragged over is already filled in
    -** Processing line: ~          state.filled_squares << grid_box # the box is filled in and added to filled_squares~
    +        args.state.camera.show_empty_space = :no
    +** Processing line: ~      else~
     - Inside source: true
     *** True Line Result
    -          state.filled_squares << grid_box # the box is filled in and added to filled_squares
    -** Processing line: ~        end~
    +      else
    +** Processing line: ~        args.state.camera.show_empty_space = :yes~
     - Inside source: true
     *** True Line Result
    -        end
    +        args.state.camera.show_empty_space = :yes
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    @@ -43228,122 +51463,122 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Creates and outputs a "Clear" button on the screen using a label and a border.~
    -- Inside source: true
    -*** True Line Result
    -    # Creates and outputs a "Clear" button on the screen using a label and a border.
    -** Processing line: ~    # If the button is clicked, the filled squares are cleared, making the filled_squares collection empty.~
    +** Processing line: ~    args.state.camera.scale = args.state.camera.scale.greater(0.1)~
     - Inside source: true
     *** True Line Result
    -    # If the button is clicked, the filled squares are cleared, making the filled_squares collection empty.
    -** Processing line: ~    def draw_buttons~
    +    args.state.camera.scale = args.state.camera.scale.greater(0.1)
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    def draw_buttons
    -** Processing line: ~      x, y, w, h = 390, 50, 240, 50~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      x, y, w, h = 390, 50, 240, 50
    -** Processing line: ~      state.clear_button        ||= state.new_entity(:button_with_fade)~
    +
    +** Processing line: ~  def calc_scene_position args~
     - Inside source: true
     *** True Line Result
    -      state.clear_button        ||= state.new_entity(:button_with_fade)
    -** Processing line: ~~
    +  def calc_scene_position args
    +** Processing line: ~    result = { x: args.state.camera.x - (args.state.player.x * args.state.camera.scale),~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      # The x and y positions are set to display the label in the center of the button.~
    +    result = { x: args.state.camera.x - (args.state.player.x * args.state.camera.scale),
    +** Processing line: ~               y: args.state.camera.y - (args.state.player.y * args.state.camera.scale),~
     - Inside source: true
     *** True Line Result
    -      # The x and y positions are set to display the label in the center of the button.
    -** Processing line: ~      # Try changing the first two parameters to simply x, y and see what happens to the text placement!~
    +               y: args.state.camera.y - (args.state.player.y * args.state.camera.scale),
    +** Processing line: ~               w: args.state.world.w * args.state.camera.scale,~
     - Inside source: true
     *** True Line Result
    -      # Try changing the first two parameters to simply x, y and see what happens to the text placement!
    -** Processing line: ~      state.clear_button.label  ||= [x + w.half, y + h.half + 10, "Clear", 0, 1] # placed in center of border~
    +               w: args.state.world.w * args.state.camera.scale,
    +** Processing line: ~               h: args.state.world.h * args.state.camera.scale,~
     - Inside source: true
     *** True Line Result
    -      state.clear_button.label  ||= [x + w.half, y + h.half + 10, "Clear", 0, 1] # placed in center of border
    -** Processing line: ~      state.clear_button.border ||= [x, y, w, h]~
    +               h: args.state.world.h * args.state.camera.scale,
    +** Processing line: ~               scale: args.state.camera.scale }~
     - Inside source: true
     *** True Line Result
    -      state.clear_button.border ||= [x, y, w, h]
    +               scale: args.state.camera.scale }
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      # If the mouse is clicked inside the borders of the clear button,~
    -- Inside source: true
    -*** True Line Result
    -      # If the mouse is clicked inside the borders of the clear button,
    -** Processing line: ~      # the filled_squares collection is emptied and the squares are cleared.~
    +** Processing line: ~    return result if args.state.camera.show_empty_space == :yes~
     - Inside source: true
     *** True Line Result
    -      # the filled_squares collection is emptied and the squares are cleared.
    -** Processing line: ~      if inputs.mouse.click && inputs.mouse.click.point.inside_rect?(state.clear_button.border)~
    +    return result if args.state.camera.show_empty_space == :yes
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      if inputs.mouse.click && inputs.mouse.click.point.inside_rect?(state.clear_button.border)
    -** Processing line: ~        state.clear_button.clicked_at = inputs.mouse.click.created_at # time (frame) the click occurred~
    +
    +** Processing line: ~    if result.w < args.grid.w~
     - Inside source: true
     *** True Line Result
    -        state.clear_button.clicked_at = inputs.mouse.click.created_at # time (frame) the click occurred
    -** Processing line: ~        state.filled_squares.clear~
    +    if result.w < args.grid.w
    +** Processing line: ~      result.merge!(x: (args.grid.w - result.w).half)~
     - Inside source: true
     *** True Line Result
    -        state.filled_squares.clear
    -** Processing line: ~        inputs.mouse.previous_click = nil~
    +      result.merge!(x: (args.grid.w - result.w).half)
    +** Processing line: ~    elsif (args.state.player.x * result.scale) < args.grid.w.half~
     - Inside source: true
     *** True Line Result
    -        inputs.mouse.previous_click = nil
    -** Processing line: ~      end~
    +    elsif (args.state.player.x * result.scale) < args.grid.w.half
    +** Processing line: ~      result.merge!(x: 10)~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +      result.merge!(x: 10)
    +** Processing line: ~    elsif (result.x + result.w) < args.grid.w~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      outputs.labels << state.clear_button.label~
    +    elsif (result.x + result.w) < args.grid.w
    +** Processing line: ~      result.merge!(x: - result.w + (args.grid.w - 10))~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << state.clear_button.label
    -** Processing line: ~      outputs.borders << state.clear_button.border~
    +      result.merge!(x: - result.w + (args.grid.w - 10))
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      outputs.borders << state.clear_button.border
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      # When the clear button is clicked, the color of the button changes~
    +** Processing line: ~    if result.h < args.grid.h~
     - Inside source: true
     *** True Line Result
    -      # When the clear button is clicked, the color of the button changes
    -** Processing line: ~      # and the transparency changes, as well. If you change the time from~
    +    if result.h < args.grid.h
    +** Processing line: ~      result.merge!(y: (args.grid.h - result.h).half)~
     - Inside source: true
     *** True Line Result
    -      # and the transparency changes, as well. If you change the time from
    -** Processing line: ~      # 0.25.seconds to 1.25.seconds or more, the change will last longer.~
    +      result.merge!(y: (args.grid.h - result.h).half)
    +** Processing line: ~    elsif (result.y) > 10~
     - Inside source: true
     *** True Line Result
    -      # 0.25.seconds to 1.25.seconds or more, the change will last longer.
    -** Processing line: ~      if state.clear_button.clicked_at~
    +    elsif (result.y) > 10
    +** Processing line: ~      result.merge!(y: 10)~
     - Inside source: true
     *** True Line Result
    -      if state.clear_button.clicked_at
    -** Processing line: ~        outputs.solids << [x, y, w, h, 0, 180, 80, 255 * state.clear_button.clicked_at.ease(0.25.seconds, :flip)]~
    +      result.merge!(y: 10)
    +** Processing line: ~    elsif (result.y + result.h) < args.grid.h~
     - Inside source: true
     *** True Line Result
    -        outputs.solids << [x, y, w, h, 0, 180, 80, 255 * state.clear_button.clicked_at.ease(0.25.seconds, :flip)]
    -** Processing line: ~      end~
    +    elsif (result.y + result.h) < args.grid.h
    +** Processing line: ~      result.merge!(y: - result.h + (args.grid.h - 10))~
     - Inside source: true
     *** True Line Result
    -      end
    +      result.merge!(y: - result.h + (args.grid.h - 10))
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
         end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    result~
    +- Inside source: true
    +*** True Line Result
    +    result
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -43352,82 +51587,90 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  $paint_app = PaintApp.new~
    -- Inside source: true
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
     *** True Line Result
    -  $paint_app = PaintApp.new
    +#+end_src
     ** Processing line: ~~
    -- Inside source: true
    +- End of paragraph detected.
     *** True Line Result
     
    -** Processing line: ~  def tick args~
    +** Processing line: ~*** Advanced Rendering - Splitscreen Camera - main.rb~
    +- Header detected.
    +*** True Line Result
    +
    +*** True Line Result
    +*** Advanced Rendering - Splitscreen Camera - main.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/07_advanced_rendering/08_splitscreen_camera/app/main.rb~
     - Inside source: true
     *** True Line Result
    -  def tick args
    -** Processing line: ~    $paint_app.inputs = args.inputs~
    +  # ./samples/07_advanced_rendering/08_splitscreen_camera/app/main.rb
    +** Processing line: ~  class CameraMovement~
     - Inside source: true
     *** True Line Result
    -    $paint_app.inputs = args.inputs
    -** Processing line: ~    $paint_app.state = args.state~
    +  class CameraMovement
    +** Processing line: ~    attr_accessor :state, :inputs, :outputs, :grid~
     - Inside source: true
     *** True Line Result
    -    $paint_app.state = args.state
    -** Processing line: ~    $paint_app.grid = args.grid~
    +    attr_accessor :state, :inputs, :outputs, :grid
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    $paint_app.grid = args.grid
    -** Processing line: ~    $paint_app.args = args~
    +
    +** Processing line: ~    #==============================================================================================~
     - Inside source: true
     *** True Line Result
    -    $paint_app.args = args
    -** Processing line: ~    $paint_app.outputs = args.outputs~
    +    #==============================================================================================
    +** Processing line: ~    #Serialize~
     - Inside source: true
     *** True Line Result
    -    $paint_app.outputs = args.outputs
    -** Processing line: ~    $paint_app.tick~
    +    #Serialize
    +** Processing line: ~    def serialize~
     - Inside source: true
     *** True Line Result
    -    $paint_app.tick
    -** Processing line: ~    tick_instructions args, "How to create a simple paint app. CLICK and HOLD to draw."~
    +    def serialize
    +** Processing line: ~      {state: state, inputs: inputs, outputs: outputs, grid: grid }~
     - Inside source: true
     *** True Line Result
    -    tick_instructions args, "How to create a simple paint app. CLICK and HOLD to draw."
    -** Processing line: ~  end~
    +      {state: state, inputs: inputs, outputs: outputs, grid: grid }
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  end
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def tick_instructions args, text, y = 715~
    -- Inside source: true
    -*** True Line Result
    -  def tick_instructions args, text, y = 715
    -** Processing line: ~    return if args.state.key_event_occurred~
    +** Processing line: ~    def inspect~
     - Inside source: true
     *** True Line Result
    -    return if args.state.key_event_occurred
    -** Processing line: ~    if args.inputs.mouse.click ||~
    +    def inspect
    +** Processing line: ~      serialize.to_s~
     - Inside source: true
     *** True Line Result
    -    if args.inputs.mouse.click ||
    -** Processing line: ~       args.inputs.keyboard.directional_vector ||~
    +      serialize.to_s
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -       args.inputs.keyboard.directional_vector ||
    -** Processing line: ~       args.inputs.keyboard.key_down.enter ||~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -       args.inputs.keyboard.key_down.enter ||
    -** Processing line: ~       args.inputs.keyboard.key_down.escape~
    +
    +** Processing line: ~    def to_s~
     - Inside source: true
     *** True Line Result
    -       args.inputs.keyboard.key_down.escape
    -** Processing line: ~      args.state.key_event_occurred = true~
    +    def to_s
    +** Processing line: ~      serialize.to_s~
     - Inside source: true
     *** True Line Result
    -      args.state.key_event_occurred = true
    +      serialize.to_s
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -43436,298 +51679,330 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    args.outputs.debug << [0, y - 50, 1280, 60].solid~
    +** Processing line: ~    #==============================================================================================~
     - Inside source: true
     *** True Line Result
    -    args.outputs.debug << [0, y - 50, 1280, 60].solid
    -** Processing line: ~    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label~
    +    #==============================================================================================
    +** Processing line: ~    #Tick~
     - Inside source: true
     *** True Line Result
    -    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label
    -** Processing line: ~    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label~
    +    #Tick
    +** Processing line: ~    def tick~
     - Inside source: true
     *** True Line Result
    -    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label
    -** Processing line: ~  end~
    +    def tick
    +** Processing line: ~      defaults~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +      defaults
    +** Processing line: ~      calc~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~#+end_src~
    -- Line was identified as the end of a code block.
    +      calc
    +** Processing line: ~      render~
    +- Inside source: true
     *** True Line Result
    -#+end_src
    +      render
    +** Processing line: ~      input~
    +- Inside source: true
    +*** True Line Result
    +      input
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
     ** Processing line: ~~
    -- End of paragraph detected.
    +- Inside source: true
     *** True Line Result
     
    -** Processing line: ~*** Mouse - Coordinate Systems - main.rb~
    -- Header detected.
    +** Processing line: ~    #==============================================================================================~
    +- Inside source: true
     *** True Line Result
    -
    +    #==============================================================================================
    +** Processing line: ~    #Default functions~
    +- Inside source: true
     *** True Line Result
    -*** Mouse - Coordinate Systems - main.rb
    -** Processing line: ~#+begin_src ruby~
    -- Line was identified as the beginning of a code block.
    +    #Default functions
    +** Processing line: ~    def defaults~
    +- Inside source: true
     *** True Line Result
    -
    +    def defaults
    +** Processing line: ~      outputs[:scene].background_color = [0,0,0]~
    +- Inside source: true
     *** True Line Result
    -#+begin_src ruby
    -** Processing line: ~  # ./samples/05_mouse/04_coordinate_systems/app/main.rb~
    +      outputs[:scene].background_color = [0,0,0]
    +** Processing line: ~      state.trauma ||= 0.0~
     - Inside source: true
     *** True Line Result
    -  # ./samples/05_mouse/04_coordinate_systems/app/main.rb
    -** Processing line: ~  =begin~
    +      state.trauma ||= 0.0
    +** Processing line: ~      state.trauma_power ||= 2~
     - Inside source: true
     *** True Line Result
    -  =begin
    -** Processing line: ~~
    +      state.trauma_power ||= 2
    +** Processing line: ~      state.player_cyan ||= new_player_cyan~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   APIs listing that haven't been encountered in previous sample apps:~
    +      state.player_cyan ||= new_player_cyan
    +** Processing line: ~      state.player_magenta ||= new_player_magenta~
     - Inside source: true
     *** True Line Result
    -   APIs listing that haven't been encountered in previous sample apps:
    -** Processing line: ~~
    +      state.player_magenta ||= new_player_magenta
    +** Processing line: ~      state.camera_magenta ||= new_camera_magenta~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   - args.inputs.mouse.click.position: Coordinates of the mouse's position on the screen.~
    +      state.camera_magenta ||= new_camera_magenta
    +** Processing line: ~      state.camera_cyan ||= new_camera_cyan~
     - Inside source: true
     *** True Line Result
    -   - args.inputs.mouse.click.position: Coordinates of the mouse's position on the screen.
    -** Processing line: ~     Unlike args.inputs.mouse.click.point, the mouse does not need to be pressed down for~
    +      state.camera_cyan ||= new_camera_cyan
    +** Processing line: ~      state.camera_center ||= new_camera_center~
     - Inside source: true
     *** True Line Result
    -     Unlike args.inputs.mouse.click.point, the mouse does not need to be pressed down for
    -** Processing line: ~     position to know the mouse's coordinates.~
    +      state.camera_center ||= new_camera_center
    +** Processing line: ~      state.room ||= new_room~
     - Inside source: true
     *** True Line Result
    -     position to know the mouse's coordinates.
    -** Processing line: ~     For more information about the mouse, go to mygame/documentation/07-mouse.md.~
    +      state.room ||= new_room
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -     For more information about the mouse, go to mygame/documentation/07-mouse.md.
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~   Reminders:~
    +** Processing line: ~    def default_player x, y, w, h, sprite_path~
     - Inside source: true
     *** True Line Result
    -   Reminders:
    -** Processing line: ~~
    +    def default_player x, y, w, h, sprite_path
    +** Processing line: ~      state.new_entity(:player,~
    +- Inside source: true
    +*** True Line Result
    +      state.new_entity(:player,
    +** Processing line: ~                       { x: x,~
    +- Inside source: true
    +*** True Line Result
    +                       { x: x,
    +** Processing line: ~                         y: y,~
    +- Inside source: true
    +*** True Line Result
    +                         y: y,
    +** Processing line: ~                         dy: 0,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   - args.inputs.mouse.click: This property will be set if the mouse was clicked.~
    +                         dy: 0,
    +** Processing line: ~                         dx: 0,~
     - Inside source: true
     *** True Line Result
    -   - args.inputs.mouse.click: This property will be set if the mouse was clicked.
    -** Processing line: ~~
    +                         dx: 0,
    +** Processing line: ~                         w: w,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   - args.inputs.mouse.click.point.(x|y): The x and y location of the mouse.~
    +                         w: w,
    +** Processing line: ~                         h: h,~
     - Inside source: true
     *** True Line Result
    -   - args.inputs.mouse.click.point.(x|y): The x and y location of the mouse.
    -** Processing line: ~~
    +                         h: h,
    +** Processing line: ~                         damage: 0,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   - String interpolation: Uses #{} syntax; everything between the #{ and the } is evaluated~
    +                         damage: 0,
    +** Processing line: ~                         dead: false,~
     - Inside source: true
     *** True Line Result
    -   - String interpolation: Uses #{} syntax; everything between the #{ and the } is evaluated
    -** Processing line: ~     as Ruby code, and the placeholder is replaced with its corresponding value or result.~
    +                         dead: false,
    +** Processing line: ~                         orientation: "down",~
     - Inside source: true
     *** True Line Result
    -     as Ruby code, and the placeholder is replaced with its corresponding value or result.
    -** Processing line: ~~
    +                         orientation: "down",
    +** Processing line: ~                         max_alpha: 255,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~     In this sample app, string interpolation is used to show the current position of the mouse~
    +                         max_alpha: 255,
    +** Processing line: ~                         sprite_path: sprite_path})~
     - Inside source: true
     *** True Line Result
    -     In this sample app, string interpolation is used to show the current position of the mouse
    -** Processing line: ~     in a label.~
    +                         sprite_path: sprite_path})
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -     in a label.
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~   - args.outputs.labels: An array that generates a label.~
    +** Processing line: ~    def default_floor_tile x, y, w, h, sprite_path~
     - Inside source: true
     *** True Line Result
    -   - args.outputs.labels: An array that generates a label.
    -** Processing line: ~     The parameters are [X, Y, TEXT, SIZE, ALIGN, RED, GREEN, BLUE, ALPHA, FONT STYLE]~
    +    def default_floor_tile x, y, w, h, sprite_path
    +** Processing line: ~      state.new_entity(:room,~
     - Inside source: true
     *** True Line Result
    -     The parameters are [X, Y, TEXT, SIZE, ALIGN, RED, GREEN, BLUE, ALPHA, FONT STYLE]
    -** Processing line: ~     For more information about labels, go to mygame/documentation/02-labels.md.~
    +      state.new_entity(:room,
    +** Processing line: ~                       { x: x,~
     - Inside source: true
     *** True Line Result
    -     For more information about labels, go to mygame/documentation/02-labels.md.
    -** Processing line: ~~
    +                       { x: x,
    +** Processing line: ~                         y: y,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   - args.outputs.solids: An array that generates a solid.~
    +                         y: y,
    +** Processing line: ~                         w: w,~
     - Inside source: true
     *** True Line Result
    -   - args.outputs.solids: An array that generates a solid.
    -** Processing line: ~     The parameters are [X, Y, WIDTH, HEIGHT, RED, GREEN, BLUE, ALPHA]~
    +                         w: w,
    +** Processing line: ~                         h: h,~
     - Inside source: true
     *** True Line Result
    -     The parameters are [X, Y, WIDTH, HEIGHT, RED, GREEN, BLUE, ALPHA]
    -** Processing line: ~     For more information about solids, go to mygame/documentation/03-solids-and-borders.md.~
    +                         h: h,
    +** Processing line: ~                         sprite_path: sprite_path})~
     - Inside source: true
     *** True Line Result
    -     For more information about solids, go to mygame/documentation/03-solids-and-borders.md.
    +                         sprite_path: sprite_path})
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~   - args.outputs.lines: An array that generates a line.~
    +** Processing line: ~    def default_camera x, y, w, h~
     - Inside source: true
     *** True Line Result
    -   - args.outputs.lines: An array that generates a line.
    -** Processing line: ~     The parameters are [X, Y, X2, Y2, RED, GREEN, BLUE, ALPHA]~
    +    def default_camera x, y, w, h
    +** Processing line: ~      state.new_entity(:camera,~
     - Inside source: true
     *** True Line Result
    -     The parameters are [X, Y, X2, Y2, RED, GREEN, BLUE, ALPHA]
    -** Processing line: ~     For more information about lines, go to mygame/documentation/04-lines.md.~
    +      state.new_entity(:camera,
    +** Processing line: ~                       { x: x,~
     - Inside source: true
     *** True Line Result
    -     For more information about lines, go to mygame/documentation/04-lines.md.
    -** Processing line: ~~
    +                       { x: x,
    +** Processing line: ~                         y: y,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  =end~
    +                         y: y,
    +** Processing line: ~                         dx: 0,~
     - Inside source: true
     *** True Line Result
    -  =end
    -** Processing line: ~~
    +                         dx: 0,
    +** Processing line: ~                         dy: 0,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  # This sample app shows a coordinate system or grid. The user can move their mouse around the screen and the~
    +                         dy: 0,
    +** Processing line: ~                         w: w,~
     - Inside source: true
     *** True Line Result
    -  # This sample app shows a coordinate system or grid. The user can move their mouse around the screen and the
    -** Processing line: ~  # coordinates of their position on the screen will be displayed. Users can choose to view one quadrant or~
    +                         w: w,
    +** Processing line: ~                         h: h})~
     - Inside source: true
     *** True Line Result
    -  # coordinates of their position on the screen will be displayed. Users can choose to view one quadrant or
    -** Processing line: ~  # four quadrants by pressing the button.~
    +                         h: h})
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  # four quadrants by pressing the button.
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def tick args~
    +** Processing line: ~    def new_player_cyan~
     - Inside source: true
     *** True Line Result
    -  def tick args
    -** Processing line: ~~
    +    def new_player_cyan
    +** Processing line: ~      default_player(0, 0, 64, 64,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # The addition and subtraction in the first two parameters of the label and solid~
    +      default_player(0, 0, 64, 64,
    +** Processing line: ~                     "sprites/player/player_#{state.player_cyan.orientation}_standing.png")~
     - Inside source: true
     *** True Line Result
    -    # The addition and subtraction in the first two parameters of the label and solid
    -** Processing line: ~    # ensure that the outputs don't overlap each other. Try removing them and see what happens.~
    +                     "sprites/player/player_#{state.player_cyan.orientation}_standing.png")
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    # ensure that the outputs don't overlap each other. Try removing them and see what happens.
    -** Processing line: ~    pos = args.inputs.mouse.position # stores coordinates of mouse's position~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    pos = args.inputs.mouse.position # stores coordinates of mouse's position
    -** Processing line: ~    args.outputs.labels << [pos.x + 10, pos.y + 10, "#{pos}"] # outputs label of coordinates~
    +
    +** Processing line: ~    def new_player_magenta~
     - Inside source: true
     *** True Line Result
    -    args.outputs.labels << [pos.x + 10, pos.y + 10, "#{pos}"] # outputs label of coordinates
    -** Processing line: ~    args.outputs.solids << [pos.x -  2, pos.y - 2, 5, 5] # outputs small blackk box placed where mouse is hovering~
    +    def new_player_magenta
    +** Processing line: ~      default_player(64, 0, 64, 64,~
     - Inside source: true
     *** True Line Result
    -    args.outputs.solids << [pos.x -  2, pos.y - 2, 5, 5] # outputs small blackk box placed where mouse is hovering
    -** Processing line: ~~
    +      default_player(64, 0, 64, 64,
    +** Processing line: ~                     "sprites/player/player_#{state.player_magenta.orientation}_standing.png")~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    button = [0, 0, 370, 50] # sets definition of toggle button~
    +                     "sprites/player/player_#{state.player_magenta.orientation}_standing.png")
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    button = [0, 0, 370, 50] # sets definition of toggle button
    -** Processing line: ~    args.outputs.borders << button # outputs button as border (not filled in)~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    args.outputs.borders << button # outputs button as border (not filled in)
    -** Processing line: ~    args.outputs.labels << [10, 35, "click here toggle coordinate system"] # label of button~
    +
    +** Processing line: ~    def new_camera_magenta~
     - Inside source: true
     *** True Line Result
    -    args.outputs.labels << [10, 35, "click here toggle coordinate system"] # label of button
    -** Processing line: ~    args.outputs.lines << [    0, -720,    0, 720] # vertical line dividing quadrants~
    +    def new_camera_magenta
    +** Processing line: ~      default_camera(0,0,720,720)~
     - Inside source: true
     *** True Line Result
    -    args.outputs.lines << [    0, -720,    0, 720] # vertical line dividing quadrants
    -** Processing line: ~    args.outputs.lines << [-1280,    0, 1280,   0] # horizontal line dividing quadrants~
    +      default_camera(0,0,720,720)
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    args.outputs.lines << [-1280,    0, 1280,   0] # horizontal line dividing quadrants
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    if args.inputs.mouse.click # if the user clicks the mouse~
    +** Processing line: ~    def new_camera_cyan~
     - Inside source: true
     *** True Line Result
    -    if args.inputs.mouse.click # if the user clicks the mouse
    -** Processing line: ~      pos = args.inputs.mouse.click.point # pos's value is point where user clicked (coordinates)~
    +    def new_camera_cyan
    +** Processing line: ~      default_camera(0,0,720,720)~
     - Inside source: true
     *** True Line Result
    -      pos = args.inputs.mouse.click.point # pos's value is point where user clicked (coordinates)
    -** Processing line: ~      if pos.inside_rect? button # if the click occurred inside the button~
    +      default_camera(0,0,720,720)
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      if pos.inside_rect? button # if the click occurred inside the button
    -** Processing line: ~        if args.grid.name == :bottom_left # if the grid shows bottom left as origin~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        if args.grid.name == :bottom_left # if the grid shows bottom left as origin
    -** Processing line: ~          args.grid.origin_center! # origin will be shown in center~
    +
    +** Processing line: ~    def new_camera_center~
     - Inside source: true
     *** True Line Result
    -          args.grid.origin_center! # origin will be shown in center
    -** Processing line: ~        else~
    +    def new_camera_center
    +** Processing line: ~      default_camera(0,0,1280,720)~
     - Inside source: true
     *** True Line Result
    -        else
    -** Processing line: ~          args.grid.origin_bottom_left! # otherwise, the view will change to show bottom left as origin~
    +      default_camera(0,0,1280,720)
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -          args.grid.origin_bottom_left! # otherwise, the view will change to show bottom left as origin
    -** Processing line: ~        end~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~      end~
    +
    +** Processing line: ~    def new_room~
     - Inside source: true
     *** True Line Result
    -      end
    +    def new_room
    +** Processing line: ~      default_floor_tile(0,0,1024,1024,'sprites/rooms/camera_room.png')~
    +- Inside source: true
    +*** True Line Result
    +      default_floor_tile(0,0,1024,1024,'sprites/rooms/camera_room.png')
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -43736,46 +52011,42 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    tick_instructions args, "Sample app shows the two supported coordinate systems in Game Toolkit."~
    -- Inside source: true
    -*** True Line Result
    -    tick_instructions args, "Sample app shows the two supported coordinate systems in Game Toolkit."
    -** Processing line: ~  end~
    +** Processing line: ~    #==============================================================================================~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +    #==============================================================================================
    +** Processing line: ~    #Calculation functions~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def tick_instructions args, text, y = 715~
    +    #Calculation functions
    +** Processing line: ~    def calc~
     - Inside source: true
     *** True Line Result
    -  def tick_instructions args, text, y = 715
    -** Processing line: ~    return if args.state.key_event_occurred~
    +    def calc
    +** Processing line: ~      calc_camera_magenta~
     - Inside source: true
     *** True Line Result
    -    return if args.state.key_event_occurred
    -** Processing line: ~    if args.inputs.mouse.click ||~
    +      calc_camera_magenta
    +** Processing line: ~      calc_camera_cyan~
     - Inside source: true
     *** True Line Result
    -    if args.inputs.mouse.click ||
    -** Processing line: ~       args.inputs.keyboard.directional_vector ||~
    +      calc_camera_cyan
    +** Processing line: ~      calc_camera_center~
     - Inside source: true
     *** True Line Result
    -       args.inputs.keyboard.directional_vector ||
    -** Processing line: ~       args.inputs.keyboard.key_down.enter ||~
    +      calc_camera_center
    +** Processing line: ~      calc_player_cyan~
     - Inside source: true
     *** True Line Result
    -       args.inputs.keyboard.key_down.enter ||
    -** Processing line: ~       args.inputs.keyboard.key_down.escape~
    +      calc_player_cyan
    +** Processing line: ~      calc_player_magenta~
     - Inside source: true
     *** True Line Result
    -       args.inputs.keyboard.key_down.escape
    -** Processing line: ~      args.state.key_event_occurred = true~
    +      calc_player_magenta
    +** Processing line: ~      calc_trauma_decay~
     - Inside source: true
     *** True Line Result
    -      args.state.key_event_occurred = true
    +      calc_trauma_decay
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -43784,282 +52055,262 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    args.outputs.debug << [0, y - 50, 1280, 60].solid~
    +** Processing line: ~    def center_camera_tolerance~
     - Inside source: true
     *** True Line Result
    -    args.outputs.debug << [0, y - 50, 1280, 60].solid
    -** Processing line: ~    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label~
    +    def center_camera_tolerance
    +** Processing line: ~      return Math.sqrt(((state.player_magenta.x - state.player_cyan.x) ** 2) +~
     - Inside source: true
     *** True Line Result
    -    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label
    -** Processing line: ~    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label~
    +      return Math.sqrt(((state.player_magenta.x - state.player_cyan.x) ** 2) +
    +** Processing line: ~                ((state.player_magenta.y - state.player_cyan.y) ** 2)) > 640~
     - Inside source: true
     *** True Line Result
    -    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label
    -** Processing line: ~  end~
    +                ((state.player_magenta.y - state.player_cyan.y) ** 2)) > 640
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  end
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~#+end_src~
    -- Line was identified as the end of a code block.
    -*** True Line Result
    -#+end_src
    -** Processing line: ~~
    -- End of paragraph detected.
    -*** True Line Result
    -
    -** Processing line: ~*** Save Load - Save Load Game - main.rb~
    -- Header detected.
    -*** True Line Result
    -
    -*** True Line Result
    -*** Save Load - Save Load Game - main.rb
    -** Processing line: ~#+begin_src ruby~
    -- Line was identified as the beginning of a code block.
    -*** True Line Result
    -
    -*** True Line Result
    -#+begin_src ruby
    -** Processing line: ~  # ./samples/06_save_load/01_save_load_game/app/main.rb~
    +** Processing line: ~    def calc_player_cyan~
     - Inside source: true
     *** True Line Result
    -  # ./samples/06_save_load/01_save_load_game/app/main.rb
    -** Processing line: ~  =begin~
    +    def calc_player_cyan
    +** Processing line: ~      state.player_cyan.x += state.player_cyan.dx~
     - Inside source: true
     *** True Line Result
    -  =begin
    -** Processing line: ~~
    +      state.player_cyan.x += state.player_cyan.dx
    +** Processing line: ~      state.player_cyan.y += state.player_cyan.dy~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   APIs listing that haven't been encountered in previous sample apps:~
    +      state.player_cyan.y += state.player_cyan.dy
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -   APIs listing that haven't been encountered in previous sample apps:
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~   - Symbol (:): Ruby object with a name and an internal ID. Symbols are useful~
    +** Processing line: ~    def calc_player_magenta~
     - Inside source: true
     *** True Line Result
    -   - Symbol (:): Ruby object with a name and an internal ID. Symbols are useful
    -** Processing line: ~     because with a given symbol name, you can refer to the same object throughout~
    +    def calc_player_magenta
    +** Processing line: ~      state.player_magenta.x += state.player_magenta.dx~
     - Inside source: true
     *** True Line Result
    -     because with a given symbol name, you can refer to the same object throughout
    -** Processing line: ~     a Ruby program.~
    +      state.player_magenta.x += state.player_magenta.dx
    +** Processing line: ~      state.player_magenta.y += state.player_magenta.dy~
     - Inside source: true
     *** True Line Result
    -     a Ruby program.
    +      state.player_magenta.y += state.player_magenta.dy
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~     In this sample app, we're using symbols for our buttons. We have buttons that~
    +** Processing line: ~    def calc_camera_center~
     - Inside source: true
     *** True Line Result
    -     In this sample app, we're using symbols for our buttons. We have buttons that
    -** Processing line: ~     light fires, save, load, etc. Each of these buttons has a distinct symbol like~
    +    def calc_camera_center
    +** Processing line: ~      timeScale = 1~
     - Inside source: true
     *** True Line Result
    -     light fires, save, load, etc. Each of these buttons has a distinct symbol like
    -** Processing line: ~     :light_fire, :save_game, :load_game, etc.~
    +      timeScale = 1
    +** Processing line: ~      midX = (state.player_magenta.x + state.player_cyan.x)/2~
     - Inside source: true
     *** True Line Result
    -     :light_fire, :save_game, :load_game, etc.
    -** Processing line: ~~
    +      midX = (state.player_magenta.x + state.player_cyan.x)/2
    +** Processing line: ~      midY = (state.player_magenta.y + state.player_cyan.y)/2~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   - to_sym: Returns the symbol corresponding to the given string; creates the symbol~
    +      midY = (state.player_magenta.y + state.player_cyan.y)/2
    +** Processing line: ~      targetX = midX - state.camera_center.w/2~
     - Inside source: true
     *** True Line Result
    -   - to_sym: Returns the symbol corresponding to the given string; creates the symbol
    -** Processing line: ~     if it does not already exist.~
    +      targetX = midX - state.camera_center.w/2
    +** Processing line: ~      targetY = midY - state.camera_center.h/2~
     - Inside source: true
     *** True Line Result
    -     if it does not already exist.
    -** Processing line: ~     For example,~
    +      targetY = midY - state.camera_center.h/2
    +** Processing line: ~      state.camera_center.x += (targetX - state.camera_center.x) * 0.1 * timeScale~
     - Inside source: true
     *** True Line Result
    -     For example,
    -** Processing line: ~     'car'.to_sym~
    +      state.camera_center.x += (targetX - state.camera_center.x) * 0.1 * timeScale
    +** Processing line: ~      state.camera_center.y += (targetY - state.camera_center.y) * 0.1 * timeScale~
     - Inside source: true
     *** True Line Result
    -     'car'.to_sym
    -** Processing line: ~     would return the symbol :car.~
    +      state.camera_center.y += (targetY - state.camera_center.y) * 0.1 * timeScale
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -     would return the symbol :car.
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~   - last: Returns the last element of an array.~
    -- Inside source: true
    -*** True Line Result
    -   - last: Returns the last element of an array.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~   Reminders:~
    +** Processing line: ~    def calc_camera_magenta~
     - Inside source: true
     *** True Line Result
    -   Reminders:
    -** Processing line: ~~
    +    def calc_camera_magenta
    +** Processing line: ~      timeScale = 1~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   - num1.lesser(num2): finds the lower value of the given options.~
    +      timeScale = 1
    +** Processing line: ~      targetX = state.player_magenta.x + state.player_magenta.w - state.camera_magenta.w/2~
     - Inside source: true
     *** True Line Result
    -   - num1.lesser(num2): finds the lower value of the given options.
    -** Processing line: ~     For example, in the statement~
    +      targetX = state.player_magenta.x + state.player_magenta.w - state.camera_magenta.w/2
    +** Processing line: ~      targetY = state.player_magenta.y + state.player_magenta.h - state.camera_magenta.h/2~
     - Inside source: true
     *** True Line Result
    -     For example, in the statement
    -** Processing line: ~     a = 4.lesser(3)~
    +      targetY = state.player_magenta.y + state.player_magenta.h - state.camera_magenta.h/2
    +** Processing line: ~      state.camera_magenta.x += (targetX - state.camera_magenta.x) * 0.1 * timeScale~
     - Inside source: true
     *** True Line Result
    -     a = 4.lesser(3)
    -** Processing line: ~     3 has a lower value than 4, which means that the value of a would be set to 3,~
    +      state.camera_magenta.x += (targetX - state.camera_magenta.x) * 0.1 * timeScale
    +** Processing line: ~      state.camera_magenta.y += (targetY - state.camera_magenta.y) * 0.1 * timeScale~
     - Inside source: true
     *** True Line Result
    -     3 has a lower value than 4, which means that the value of a would be set to 3,
    -** Processing line: ~     but if the statement had been~
    +      state.camera_magenta.y += (targetY - state.camera_magenta.y) * 0.1 * timeScale
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -     but if the statement had been
    -** Processing line: ~     a = 4.lesser(5)~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -     a = 4.lesser(5)
    -** Processing line: ~     4 has a lower value than 5, which means that the value of a would be set to 4.~
    +
    +** Processing line: ~    def calc_camera_cyan~
     - Inside source: true
     *** True Line Result
    -     4 has a lower value than 5, which means that the value of a would be set to 4.
    -** Processing line: ~~
    +    def calc_camera_cyan
    +** Processing line: ~      timeScale = 1~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   - num1.fdiv(num2): returns the float division (will have a decimal) of the two given numbers.~
    +      timeScale = 1
    +** Processing line: ~      targetX = state.player_cyan.x + state.player_cyan.w - state.camera_cyan.w/2~
     - Inside source: true
     *** True Line Result
    -   - num1.fdiv(num2): returns the float division (will have a decimal) of the two given numbers.
    -** Processing line: ~     For example, 5.fdiv(2) = 2.5 and 5.fdiv(5) = 1.0~
    +      targetX = state.player_cyan.x + state.player_cyan.w - state.camera_cyan.w/2
    +** Processing line: ~      targetY = state.player_cyan.y + state.player_cyan.h - state.camera_cyan.h/2~
     - Inside source: true
     *** True Line Result
    -     For example, 5.fdiv(2) = 2.5 and 5.fdiv(5) = 1.0
    -** Processing line: ~~
    +      targetY = state.player_cyan.y + state.player_cyan.h - state.camera_cyan.h/2
    +** Processing line: ~      state.camera_cyan.x += (targetX - state.camera_cyan.x) * 0.1 * timeScale~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   - String interpolation: uses #{} syntax; everything between the #{ and the } is evaluated~
    +      state.camera_cyan.x += (targetX - state.camera_cyan.x) * 0.1 * timeScale
    +** Processing line: ~      state.camera_cyan.y += (targetY - state.camera_cyan.y) * 0.1 * timeScale~
     - Inside source: true
     *** True Line Result
    -   - String interpolation: uses #{} syntax; everything between the #{ and the } is evaluated
    -** Processing line: ~     as Ruby code, and the placeholder is replaced with its corresponding value or result.~
    +      state.camera_cyan.y += (targetY - state.camera_cyan.y) * 0.1 * timeScale
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -     as Ruby code, and the placeholder is replaced with its corresponding value or result.
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~   - args.outputs.labels: An array. Values generate a label.~
    -- Inside source: true
    -*** True Line Result
    -   - args.outputs.labels: An array. Values generate a label.
    -** Processing line: ~     Parameters are [X, Y, TEXT, SIZE, ALIGN, RED, GREEN, BLUE, ALPHA, FONT STYLE]~
    +** Processing line: ~    def calc_player_quadrant angle~
     - Inside source: true
     *** True Line Result
    -     Parameters are [X, Y, TEXT, SIZE, ALIGN, RED, GREEN, BLUE, ALPHA, FONT STYLE]
    -** Processing line: ~     For more information, go to mygame/documentation/02-labels.md.~
    +    def calc_player_quadrant angle
    +** Processing line: ~      if angle < 45 and angle > -45 and state.player_cyan.x < state.player_magenta.x~
     - Inside source: true
     *** True Line Result
    -     For more information, go to mygame/documentation/02-labels.md.
    -** Processing line: ~~
    +      if angle < 45 and angle > -45 and state.player_cyan.x < state.player_magenta.x
    +** Processing line: ~        return 1~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   - ARRAY#inside_rect?: An array with at least two values is considered a point. An array~
    +        return 1
    +** Processing line: ~      elsif angle < 45 and angle > -45 and state.player_cyan.x > state.player_magenta.x~
     - Inside source: true
     *** True Line Result
    -   - ARRAY#inside_rect?: An array with at least two values is considered a point. An array
    -** Processing line: ~     with at least four values is considered a rect. The inside_rect? function returns true~
    +      elsif angle < 45 and angle > -45 and state.player_cyan.x > state.player_magenta.x
    +** Processing line: ~        return 3~
     - Inside source: true
     *** True Line Result
    -     with at least four values is considered a rect. The inside_rect? function returns true
    -** Processing line: ~     or false depending on if the point is inside the rect.~
    +        return 3
    +** Processing line: ~      elsif (angle > 45 or angle < -45) and state.player_cyan.y < state.player_magenta.y~
     - Inside source: true
     *** True Line Result
    -     or false depending on if the point is inside the rect.
    -** Processing line: ~~
    +      elsif (angle > 45 or angle < -45) and state.player_cyan.y < state.player_magenta.y
    +** Processing line: ~        return 2~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  =end~
    +        return 2
    +** Processing line: ~      elsif (angle > 45 or angle < -45) and state.player_cyan.y > state.player_magenta.y~
     - Inside source: true
     *** True Line Result
    -  =end
    -** Processing line: ~~
    +      elsif (angle > 45 or angle < -45) and state.player_cyan.y > state.player_magenta.y
    +** Processing line: ~        return 4~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  # This code allows users to perform different tasks, such as saving and loading the game.~
    +        return 4
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -  # This code allows users to perform different tasks, such as saving and loading the game.
    -** Processing line: ~  # Users also have options to reset the game and light a fire.~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  # Users also have options to reset the game and light a fire.
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  class TextedBasedGame~
    +** Processing line: ~    def calc_camera_shake~
     - Inside source: true
     *** True Line Result
    -  class TextedBasedGame
    -** Processing line: ~~
    +    def calc_camera_shake
    +** Processing line: ~      state.trauma~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # Contains methods needed for game to run properly.~
    +      state.trauma
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    # Contains methods needed for game to run properly.
    -** Processing line: ~    # Increments tick count by 1 each time it runs (60 times in a single second)~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    # Increments tick count by 1 each time it runs (60 times in a single second)
    -** Processing line: ~    def tick~
    +
    +** Processing line: ~    def calc_trauma_decay~
     - Inside source: true
     *** True Line Result
    -    def tick
    -** Processing line: ~      default~
    +    def calc_trauma_decay
    +** Processing line: ~      state.trauma = state.trauma * 0.9~
     - Inside source: true
     *** True Line Result
    -      default
    -** Processing line: ~      show_intro~
    +      state.trauma = state.trauma * 0.9
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      show_intro
    -** Processing line: ~      state.engine_tick_count += 1~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      state.engine_tick_count += 1
    -** Processing line: ~      tick_fire~
    +
    +** Processing line: ~    def calc_random_float_range(min, max)~
     - Inside source: true
     *** True Line Result
    -      tick_fire
    +    def calc_random_float_range(min, max)
    +** Processing line: ~      rand * (max-min) + min~
    +- Inside source: true
    +*** True Line Result
    +      rand * (max-min) + min
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -44068,46 +52319,50 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Sets default values.~
    +** Processing line: ~    #==============================================================================================~
     - Inside source: true
     *** True Line Result
    -    # Sets default values.
    -** Processing line: ~    # The ||= ensures that a variable's value is only set to the value following the = sign~
    +    #==============================================================================================
    +** Processing line: ~    #Render Functions~
     - Inside source: true
     *** True Line Result
    -    # The ||= ensures that a variable's value is only set to the value following the = sign
    -** Processing line: ~    # if the value has not already been set before. Intialization happens only in the first frame.~
    +    #Render Functions
    +** Processing line: ~    def render~
     - Inside source: true
     *** True Line Result
    -    # if the value has not already been set before. Intialization happens only in the first frame.
    -** Processing line: ~    def default~
    +    def render
    +** Processing line: ~      render_floor~
     - Inside source: true
     *** True Line Result
    -    def default
    -** Processing line: ~      state.engine_tick_count ||= 0~
    +      render_floor
    +** Processing line: ~      render_player_cyan~
     - Inside source: true
     *** True Line Result
    -      state.engine_tick_count ||= 0
    -** Processing line: ~      state.active_module     ||= :room~
    +      render_player_cyan
    +** Processing line: ~      render_player_magenta~
     - Inside source: true
     *** True Line Result
    -      state.active_module     ||= :room
    -** Processing line: ~      state.fire_progress     ||= 0~
    +      render_player_magenta
    +** Processing line: ~      if center_camera_tolerance~
     - Inside source: true
     *** True Line Result
    -      state.fire_progress     ||= 0
    -** Processing line: ~      state.fire_ready_in     ||= 10~
    +      if center_camera_tolerance
    +** Processing line: ~        render_split_camera_scene~
     - Inside source: true
     *** True Line Result
    -      state.fire_ready_in     ||= 10
    -** Processing line: ~      state.previous_fire     ||= :dead~
    +        render_split_camera_scene
    +** Processing line: ~      else~
     - Inside source: true
     *** True Line Result
    -      state.previous_fire     ||= :dead
    -** Processing line: ~      state.fire              ||= :dead~
    +      else
    +** Processing line: ~        render_camera_center_scene~
     - Inside source: true
     *** True Line Result
    -      state.fire              ||= :dead
    +        render_camera_center_scene
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -44116,42 +52371,42 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def show_intro~
    +** Processing line: ~    def render_player_cyan~
     - Inside source: true
     *** True Line Result
    -    def show_intro
    -** Processing line: ~      return unless state.engine_tick_count == 0 # return unless the game just started~
    +    def render_player_cyan
    +** Processing line: ~      outputs[:scene].sprites << {x: state.player_cyan.x,~
     - Inside source: true
     *** True Line Result
    -      return unless state.engine_tick_count == 0 # return unless the game just started
    -** Processing line: ~      set_story_line "awake." # calls set_story_line method, sets to "awake"~
    +      outputs[:scene].sprites << {x: state.player_cyan.x,
    +** Processing line: ~                                  y: state.player_cyan.y,~
     - Inside source: true
     *** True Line Result
    -      set_story_line "awake." # calls set_story_line method, sets to "awake"
    -** Processing line: ~    end~
    +                                  y: state.player_cyan.y,
    +** Processing line: ~                                  w: state.player_cyan.w,~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +                                  w: state.player_cyan.w,
    +** Processing line: ~                                  h: state.player_cyan.h,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # Sets story line.~
    +                                  h: state.player_cyan.h,
    +** Processing line: ~                                  path: "sprites/player/player_#{state.player_cyan.orientation}_standing.png",~
     - Inside source: true
     *** True Line Result
    -    # Sets story line.
    -** Processing line: ~    def set_story_line story_line~
    +                                  path: "sprites/player/player_#{state.player_cyan.orientation}_standing.png",
    +** Processing line: ~                                  r: 0,~
     - Inside source: true
     *** True Line Result
    -    def set_story_line story_line
    -** Processing line: ~      state.story_line    = story_line # story line set to value of parameter~
    +                                  r: 0,
    +** Processing line: ~                                  g: 255,~
     - Inside source: true
     *** True Line Result
    -      state.story_line    = story_line # story line set to value of parameter
    -** Processing line: ~      state.active_module = :alert # active module set to alert~
    +                                  g: 255,
    +** Processing line: ~                                  b: 255}~
     - Inside source: true
     *** True Line Result
    -      state.active_module = :alert # active module set to alert
    +                                  b: 255}
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -44160,54 +52415,42 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Clears story line.~
    -- Inside source: true
    -*** True Line Result
    -    # Clears story line.
    -** Processing line: ~    def clear_storyline~
    -- Inside source: true
    -*** True Line Result
    -    def clear_storyline
    -** Processing line: ~      state.active_module = :none # active module set to none~
    -- Inside source: true
    -*** True Line Result
    -      state.active_module = :none # active module set to none
    -** Processing line: ~      state.story_line = nil # story line is cleared, set to nil (or empty)~
    +** Processing line: ~    def render_player_magenta~
     - Inside source: true
     *** True Line Result
    -      state.story_line = nil # story line is cleared, set to nil (or empty)
    -** Processing line: ~    end~
    +    def render_player_magenta
    +** Processing line: ~      outputs[:scene].sprites << {x: state.player_magenta.x,~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +      outputs[:scene].sprites << {x: state.player_magenta.x,
    +** Processing line: ~                                  y: state.player_magenta.y,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # Determines fire progress (how close the fire is to being ready to light).~
    +                                  y: state.player_magenta.y,
    +** Processing line: ~                                  w: state.player_magenta.w,~
     - Inside source: true
     *** True Line Result
    -    # Determines fire progress (how close the fire is to being ready to light).
    -** Processing line: ~    def tick_fire~
    +                                  w: state.player_magenta.w,
    +** Processing line: ~                                  h: state.player_magenta.h,~
     - Inside source: true
     *** True Line Result
    -    def tick_fire
    -** Processing line: ~      return if state.active_module == :alert # return if active module is alert~
    +                                  h: state.player_magenta.h,
    +** Processing line: ~                                  path: "sprites/player/player_#{state.player_magenta.orientation}_standing.png",~
     - Inside source: true
     *** True Line Result
    -      return if state.active_module == :alert # return if active module is alert
    -** Processing line: ~      state.fire_progress += 1 # increment fire progress~
    +                                  path: "sprites/player/player_#{state.player_magenta.orientation}_standing.png",
    +** Processing line: ~                                  r: 255,~
     - Inside source: true
     *** True Line Result
    -      state.fire_progress += 1 # increment fire progress
    -** Processing line: ~      # fire_ready_in is 10. The fire_progress is either the current value or 10, whichever has a lower value.~
    +                                  r: 255,
    +** Processing line: ~                                  g: 0,~
     - Inside source: true
     *** True Line Result
    -      # fire_ready_in is 10. The fire_progress is either the current value or 10, whichever has a lower value.
    -** Processing line: ~      state.fire_progress = state.fire_progress.lesser(state.fire_ready_in)~
    +                                  g: 0,
    +** Processing line: ~                                  b: 255}~
     - Inside source: true
     *** True Line Result
    -      state.fire_progress = state.fire_progress.lesser(state.fire_ready_in)
    +                                  b: 255}
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -44216,114 +52459,110 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Sets the value of fire (whether it is dead or roaring), and the story line~
    +** Processing line: ~    def render_floor~
     - Inside source: true
     *** True Line Result
    -    # Sets the value of fire (whether it is dead or roaring), and the story line
    -** Processing line: ~    def light_fire~
    +    def render_floor
    +** Processing line: ~      outputs[:scene].sprites << [state.room.x, state.room.y,~
     - Inside source: true
     *** True Line Result
    -    def light_fire
    -** Processing line: ~      return unless fire_ready? # returns unless the fire is ready to be lit~
    +      outputs[:scene].sprites << [state.room.x, state.room.y,
    +** Processing line: ~                                  state.room.w, state.room.h,~
     - Inside source: true
     *** True Line Result
    -      return unless fire_ready? # returns unless the fire is ready to be lit
    -** Processing line: ~      state.fire = :roaring # fire is lit, set to roaring~
    +                                  state.room.w, state.room.h,
    +** Processing line: ~                                  state.room.sprite_path]~
     - Inside source: true
     *** True Line Result
    -      state.fire = :roaring # fire is lit, set to roaring
    -** Processing line: ~      state.fire_progress = 0 # the fire progress returns to 0, since the fire has been lit~
    +                                  state.room.sprite_path]
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      state.fire_progress = 0 # the fire progress returns to 0, since the fire has been lit
    -** Processing line: ~      if state.fire != state.previous_fire~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      if state.fire != state.previous_fire
    -** Processing line: ~        set_story_line "the fire is #{state.fire}." # the story line is set using string interpolation~
    +
    +** Processing line: ~    def render_camera_center_scene~
     - Inside source: true
     *** True Line Result
    -        set_story_line "the fire is #{state.fire}." # the story line is set using string interpolation
    -** Processing line: ~        state.previous_fire = state.fire~
    +    def render_camera_center_scene
    +** Processing line: ~      zoomFactor = 1~
     - Inside source: true
     *** True Line Result
    -        state.previous_fire = state.fire
    -** Processing line: ~      end~
    +      zoomFactor = 1
    +** Processing line: ~      outputs[:scene].width = state.room.w~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +      outputs[:scene].width = state.room.w
    +** Processing line: ~      outputs[:scene].height = state.room.h~
     - Inside source: true
     *** True Line Result
    -    end
    +      outputs[:scene].height = state.room.h
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Checks if the fire is ready to be lit. Returns a boolean value.~
    -- Inside source: true
    -*** True Line Result
    -    # Checks if the fire is ready to be lit. Returns a boolean value.
    -** Processing line: ~    def fire_ready?~
    +** Processing line: ~      maxAngle = 10.0~
     - Inside source: true
     *** True Line Result
    -    def fire_ready?
    -** Processing line: ~      # If fire_progress (value between 0 and 10) is equal to fire_ready_in (value of 10),~
    +      maxAngle = 10.0
    +** Processing line: ~      maxOffset = 20.0~
     - Inside source: true
     *** True Line Result
    -      # If fire_progress (value between 0 and 10) is equal to fire_ready_in (value of 10),
    -** Processing line: ~      # the fire is ready to be lit.~
    +      maxOffset = 20.0
    +** Processing line: ~      angle = maxAngle * calc_camera_shake * calc_random_float_range(-1,1)~
     - Inside source: true
     *** True Line Result
    -      # the fire is ready to be lit.
    -** Processing line: ~      state.fire_progress == state.fire_ready_in~
    +      angle = maxAngle * calc_camera_shake * calc_random_float_range(-1,1)
    +** Processing line: ~      offsetX = 32 - (maxOffset * calc_camera_shake * calc_random_float_range(-1,1))~
     - Inside source: true
     *** True Line Result
    -      state.fire_progress == state.fire_ready_in
    -** Processing line: ~    end~
    +      offsetX = 32 - (maxOffset * calc_camera_shake * calc_random_float_range(-1,1))
    +** Processing line: ~      offsetY = 32 - (maxOffset * calc_camera_shake * calc_random_float_range(-1,1))~
     - Inside source: true
     *** True Line Result
    -    end
    +      offsetY = 32 - (maxOffset * calc_camera_shake * calc_random_float_range(-1,1))
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Divides the value of the fire_progress variable by 10 to determine how close the user is to~
    +** Processing line: ~      outputs.sprites << {x: (-state.camera_center.x - offsetX)/zoomFactor,~
     - Inside source: true
     *** True Line Result
    -    # Divides the value of the fire_progress variable by 10 to determine how close the user is to
    -** Processing line: ~    # being able to light a fire.~
    +      outputs.sprites << {x: (-state.camera_center.x - offsetX)/zoomFactor,
    +** Processing line: ~                          y: (-state.camera_center.y - offsetY)/zoomFactor,~
     - Inside source: true
     *** True Line Result
    -    # being able to light a fire.
    -** Processing line: ~    def light_fire_progress~
    +                          y: (-state.camera_center.y - offsetY)/zoomFactor,
    +** Processing line: ~                          w: outputs[:scene].width/zoomFactor,~
     - Inside source: true
     *** True Line Result
    -    def light_fire_progress
    -** Processing line: ~      state.fire_progress.fdiv(10) # float division~
    +                          w: outputs[:scene].width/zoomFactor,
    +** Processing line: ~                          h: outputs[:scene].height/zoomFactor,~
     - Inside source: true
     *** True Line Result
    -      state.fire_progress.fdiv(10) # float division
    -** Processing line: ~    end~
    +                          h: outputs[:scene].height/zoomFactor,
    +** Processing line: ~                          path: :scene,~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +                          path: :scene,
    +** Processing line: ~                          angle: angle,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # Defines fire as the state.fire variable.~
    +                          angle: angle,
    +** Processing line: ~                          source_w: -1,~
     - Inside source: true
     *** True Line Result
    -    # Defines fire as the state.fire variable.
    -** Processing line: ~    def fire~
    +                          source_w: -1,
    +** Processing line: ~                          source_h: -1}~
     - Inside source: true
     *** True Line Result
    -    def fire
    -** Processing line: ~      state.fire~
    +                          source_h: -1}
    +** Processing line: ~      outputs.labels << [128,64,"#{state.trauma.round(1)}",8,2,255,0,255,255]~
     - Inside source: true
     *** True Line Result
    -      state.fire
    +      outputs.labels << [128,64,"#{state.trauma.round(1)}",8,2,255,0,255,255]
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -44332,42 +52571,42 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Sets the title of the room.~
    +** Processing line: ~    def render_split_camera_scene~
     - Inside source: true
     *** True Line Result
    -    # Sets the title of the room.
    -** Processing line: ~    def room_title~
    +    def render_split_camera_scene
    +** Processing line: ~       outputs[:scene].width = state.room.w~
     - Inside source: true
     *** True Line Result
    -    def room_title
    -** Processing line: ~      return "a room that is dark" if state.fire == :dead # room is dark if the fire is dead~
    +       outputs[:scene].width = state.room.w
    +** Processing line: ~       outputs[:scene].height = state.room.h~
     - Inside source: true
     *** True Line Result
    -      return "a room that is dark" if state.fire == :dead # room is dark if the fire is dead
    -** Processing line: ~      return "a room that is lit" # room is lit if the fire is not dead~
    +       outputs[:scene].height = state.room.h
    +** Processing line: ~       render_camera_magenta_scene~
     - Inside source: true
     *** True Line Result
    -      return "a room that is lit" # room is lit if the fire is not dead
    -** Processing line: ~    end~
    +       render_camera_magenta_scene
    +** Processing line: ~       render_camera_cyan_scene~
     - Inside source: true
     *** True Line Result
    -    end
    +       render_camera_cyan_scene
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Sets the active_module to room.~
    +** Processing line: ~       angle = Math.atan((state.player_magenta.y - state.player_cyan.y)/(state.player_magenta.x- state.player_cyan.x)) * 180/Math::PI~
     - Inside source: true
     *** True Line Result
    -    # Sets the active_module to room.
    -** Processing line: ~    def go_to_room~
    +       angle = Math.atan((state.player_magenta.y - state.player_cyan.y)/(state.player_magenta.x- state.player_cyan.x)) * 180/Math::PI
    +** Processing line: ~       output_split_camera angle~
     - Inside source: true
     *** True Line Result
    -    def go_to_room
    -** Processing line: ~      state.active_module = :room~
    +       output_split_camera angle
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      state.active_module = :room
    +
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -44376,58 +52615,50 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Defines active_module as the state.active_module variable.~
    +** Processing line: ~    def render_camera_magenta_scene~
     - Inside source: true
     *** True Line Result
    -    # Defines active_module as the state.active_module variable.
    -** Processing line: ~    def active_module~
    +    def render_camera_magenta_scene
    +** Processing line: ~       zoomFactor = 1~
     - Inside source: true
     *** True Line Result
    -    def active_module
    -** Processing line: ~      state.active_module~
    +       zoomFactor = 1
    +** Processing line: ~       offsetX = 32~
     - Inside source: true
     *** True Line Result
    -      state.active_module
    -** Processing line: ~    end~
    +       offsetX = 32
    +** Processing line: ~       offsetY = 32~
     - Inside source: true
     *** True Line Result
    -    end
    +       offsetY = 32
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Defines story_line as the state.story_line variable.~
    -- Inside source: true
    -*** True Line Result
    -    # Defines story_line as the state.story_line variable.
    -** Processing line: ~    def story_line~
    -- Inside source: true
    -*** True Line Result
    -    def story_line
    -** Processing line: ~      state.story_line~
    +** Processing line: ~       outputs[:scene_magenta].sprites << {x: (-state.camera_magenta.x*2),~
     - Inside source: true
     *** True Line Result
    -      state.story_line
    -** Processing line: ~    end~
    +       outputs[:scene_magenta].sprites << {x: (-state.camera_magenta.x*2),
    +** Processing line: ~                                           y: (-state.camera_magenta.y),~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +                                           y: (-state.camera_magenta.y),
    +** Processing line: ~                                           w: outputs[:scene].width*2,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # Update every 60 frames (or every second)~
    +                                           w: outputs[:scene].width*2,
    +** Processing line: ~                                           h: outputs[:scene].height,~
     - Inside source: true
     *** True Line Result
    -    # Update every 60 frames (or every second)
    -** Processing line: ~    def should_tick?~
    +                                           h: outputs[:scene].height,
    +** Processing line: ~                                           path: :scene}~
     - Inside source: true
     *** True Line Result
    -    def should_tick?
    -** Processing line: ~      state.tick_count.mod_zero?(60)~
    +                                           path: :scene}
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      state.tick_count.mod_zero?(60)
    +
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -44436,42 +52667,42 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Sets the value of the game state provider.~
    +** Processing line: ~    def render_camera_cyan_scene~
     - Inside source: true
     *** True Line Result
    -    # Sets the value of the game state provider.
    -** Processing line: ~    def initialize game_state_provider~
    +    def render_camera_cyan_scene
    +** Processing line: ~      zoomFactor = 1~
     - Inside source: true
     *** True Line Result
    -    def initialize game_state_provider
    -** Processing line: ~      @game_state_provider = game_state_provider~
    +      zoomFactor = 1
    +** Processing line: ~      offsetX = 32~
     - Inside source: true
     *** True Line Result
    -      @game_state_provider = game_state_provider
    -** Processing line: ~    end~
    +      offsetX = 32
    +** Processing line: ~      offsetY = 32~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +      offsetY = 32
    +** Processing line: ~      outputs[:scene_cyan].sprites << {x: (-state.camera_cyan.x*2),~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # Defines the game state.~
    +      outputs[:scene_cyan].sprites << {x: (-state.camera_cyan.x*2),
    +** Processing line: ~                                       y: (-state.camera_cyan.y),~
     - Inside source: true
     *** True Line Result
    -    # Defines the game state.
    -** Processing line: ~    # Any variable prefixed with an @ symbol is an instance variable.~
    +                                       y: (-state.camera_cyan.y),
    +** Processing line: ~                                       w: outputs[:scene].width*2,~
     - Inside source: true
     *** True Line Result
    -    # Any variable prefixed with an @ symbol is an instance variable.
    -** Processing line: ~    def state~
    +                                       w: outputs[:scene].width*2,
    +** Processing line: ~                                       h: outputs[:scene].height,~
     - Inside source: true
     *** True Line Result
    -    def state
    -** Processing line: ~      @game_state_provider.state~
    +                                       h: outputs[:scene].height,
    +** Processing line: ~                                       path: :scene}~
     - Inside source: true
     *** True Line Result
    -      @game_state_provider.state
    +                                       path: :scene}
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -44480,58 +52711,70 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Saves the state of the game in a text file called game_state.txt.~
    +** Processing line: ~    def output_split_camera angle~
     - Inside source: true
     *** True Line Result
    -    # Saves the state of the game in a text file called game_state.txt.
    -** Processing line: ~    def save~
    +    def output_split_camera angle
    +** Processing line: ~      #TODO: Clean this up!~
     - Inside source: true
     *** True Line Result
    -    def save
    -** Processing line: ~      $gtk.serialize_state('game_state.txt', state)~
    +      #TODO: Clean this up!
    +** Processing line: ~      quadrant = calc_player_quadrant angle~
     - Inside source: true
     *** True Line Result
    -      $gtk.serialize_state('game_state.txt', state)
    -** Processing line: ~    end~
    +      quadrant = calc_player_quadrant angle
    +** Processing line: ~      outputs.labels << [128,64,"#{quadrant}",8,2,255,0,255,255]~
     - Inside source: true
     *** True Line Result
    -    end
    +      outputs.labels << [128,64,"#{quadrant}",8,2,255,0,255,255]
    +** Processing line: ~      if quadrant == 1~
    +- Inside source: true
    +*** True Line Result
    +      if quadrant == 1
    +** Processing line: ~        set_camera_attributes(w: 640, h: 720, m_x: 640, m_y: 0, c_x: 0, c_y: 0)~
    +- Inside source: true
    +*** True Line Result
    +        set_camera_attributes(w: 640, h: 720, m_x: 640, m_y: 0, c_x: 0, c_y: 0)
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Loads the game state from the game_state.txt text file.~
    +** Processing line: ~      elsif quadrant == 2~
     - Inside source: true
     *** True Line Result
    -    # Loads the game state from the game_state.txt text file.
    -** Processing line: ~    # If the load is unsuccessful, the user is informed since the story line indicates the failure.~
    +      elsif quadrant == 2
    +** Processing line: ~        set_camera_attributes(w: 1280, h: 360, m_x: 0, m_y: 360, c_x: 0, c_y: 0)~
     - Inside source: true
     *** True Line Result
    -    # If the load is unsuccessful, the user is informed since the story line indicates the failure.
    -** Processing line: ~    def load~
    +        set_camera_attributes(w: 1280, h: 360, m_x: 0, m_y: 360, c_x: 0, c_y: 0)
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    def load
    -** Processing line: ~      parsed_state = $gtk.deserialize_state('game_state.txt')~
    +
    +** Processing line: ~      elsif quadrant == 3~
     - Inside source: true
     *** True Line Result
    -      parsed_state = $gtk.deserialize_state('game_state.txt')
    -** Processing line: ~      if !parsed_state~
    +      elsif quadrant == 3
    +** Processing line: ~        set_camera_attributes(w: 640, h: 720, m_x: 0, m_y: 0, c_x: 640, c_y: 0)~
     - Inside source: true
     *** True Line Result
    -      if !parsed_state
    -** Processing line: ~        set_story_line "no game to load. press save first."~
    +        set_camera_attributes(w: 640, h: 720, m_x: 0, m_y: 0, c_x: 640, c_y: 0)
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        set_story_line "no game to load. press save first."
    -** Processing line: ~      else~
    +
    +** Processing line: ~      elsif quadrant == 4~
     - Inside source: true
     *** True Line Result
    -      else
    -** Processing line: ~        $gtk.args.state = parsed_state~
    +      elsif quadrant == 4
    +** Processing line: ~        set_camera_attributes(w: 1280, h: 360, m_x: 0, m_y: 0, c_x: 0, c_y: 360)~
     - Inside source: true
     *** True Line Result
    -        $gtk.args.state = parsed_state
    +        set_camera_attributes(w: 1280, h: 360, m_x: 0, m_y: 0, c_x: 0, c_y: 360)
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    @@ -44544,102 +52787,102 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Resets the game.~
    +** Processing line: ~    def set_camera_attributes(w: 0, h: 0, m_x: 0, m_y: 0, c_x: 0, c_y: 0)~
     - Inside source: true
     *** True Line Result
    -    # Resets the game.
    -** Processing line: ~    def reset~
    +    def set_camera_attributes(w: 0, h: 0, m_x: 0, m_y: 0, c_x: 0, c_y: 0)
    +** Processing line: ~      state.camera_cyan.w = w + 64~
     - Inside source: true
     *** True Line Result
    -    def reset
    -** Processing line: ~      $gtk.reset~
    +      state.camera_cyan.w = w + 64
    +** Processing line: ~      state.camera_cyan.h = h + 64~
     - Inside source: true
     *** True Line Result
    -      $gtk.reset
    -** Processing line: ~    end~
    +      state.camera_cyan.h = h + 64
    +** Processing line: ~      outputs[:scene_cyan].width = (w) * 2~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~  end~
    +      outputs[:scene_cyan].width = (w) * 2
    +** Processing line: ~      outputs[:scene_cyan].height = h~
     - Inside source: true
     *** True Line Result
    -  end
    +      outputs[:scene_cyan].height = h
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  class TextedBasedGamePresenter~
    +** Processing line: ~      state.camera_magenta.w = w + 64~
     - Inside source: true
     *** True Line Result
    -  class TextedBasedGamePresenter
    -** Processing line: ~    attr_accessor :state, :outputs, :inputs~
    +      state.camera_magenta.w = w + 64
    +** Processing line: ~      state.camera_magenta.h = h + 64~
     - Inside source: true
     *** True Line Result
    -    attr_accessor :state, :outputs, :inputs
    -** Processing line: ~~
    +      state.camera_magenta.h = h + 64
    +** Processing line: ~      outputs[:scene_magenta].width = (w) * 2~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # Creates empty collection called highlights.~
    +      outputs[:scene_magenta].width = (w) * 2
    +** Processing line: ~      outputs[:scene_magenta].height = h~
     - Inside source: true
     *** True Line Result
    -    # Creates empty collection called highlights.
    -** Processing line: ~    # Calls methods necessary to run the game.~
    +      outputs[:scene_magenta].height = h
    +** Processing line: ~      outputs.sprites << {x: m_x,~
     - Inside source: true
     *** True Line Result
    -    # Calls methods necessary to run the game.
    -** Processing line: ~    def tick~
    +      outputs.sprites << {x: m_x,
    +** Processing line: ~                          y: m_y,~
     - Inside source: true
     *** True Line Result
    -    def tick
    -** Processing line: ~      state.layout.highlights ||= []~
    +                          y: m_y,
    +** Processing line: ~                          w: w,~
     - Inside source: true
     *** True Line Result
    -      state.layout.highlights ||= []
    -** Processing line: ~      game.tick if game.should_tick?~
    +                          w: w,
    +** Processing line: ~                          h: h,~
     - Inside source: true
     *** True Line Result
    -      game.tick if game.should_tick?
    -** Processing line: ~      render~
    +                          h: h,
    +** Processing line: ~                          path: :scene_magenta}~
     - Inside source: true
     *** True Line Result
    -      render
    -** Processing line: ~      process_input~
    +                          path: :scene_magenta}
    +** Processing line: ~      outputs.sprites << {x: c_x,~
     - Inside source: true
     *** True Line Result
    -      process_input
    -** Processing line: ~    end~
    +      outputs.sprites << {x: c_x,
    +** Processing line: ~                          y: c_y,~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +                          y: c_y,
    +** Processing line: ~                          w: w,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # Outputs a label of the tick count (passage of time) and calls all render methods.~
    +                          w: w,
    +** Processing line: ~                          h: h,~
     - Inside source: true
     *** True Line Result
    -    # Outputs a label of the tick count (passage of time) and calls all render methods.
    -** Processing line: ~    def render~
    +                          h: h,
    +** Processing line: ~                          path: :scene_cyan}~
     - Inside source: true
     *** True Line Result
    -    def render
    -** Processing line: ~      outputs.labels << [10, 30, state.tick_count]~
    +                          path: :scene_cyan}
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << [10, 30, state.tick_count]
    -** Processing line: ~      render_alert~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      render_alert
    -** Processing line: ~      render_room~
    +
    +** Processing line: ~    def add_trauma amount~
     - Inside source: true
     *** True Line Result
    -      render_room
    -** Processing line: ~      render_highlights~
    +    def add_trauma amount
    +** Processing line: ~      state.trauma = [state.trauma + amount, 1.0].min~
     - Inside source: true
     *** True Line Result
    -      render_highlights
    +      state.trauma = [state.trauma + amount, 1.0].min
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -44648,150 +52891,158 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Outputs a label onto the screen that shows the story line, and also outputs a "close" button.~
    +** Processing line: ~    def remove_trauma amount~
     - Inside source: true
     *** True Line Result
    -    # Outputs a label onto the screen that shows the story line, and also outputs a "close" button.
    -** Processing line: ~    def render_alert~
    +    def remove_trauma amount
    +** Processing line: ~      state.trauma = [state.trauma - amount, 0.0].max~
     - Inside source: true
     *** True Line Result
    -    def render_alert
    -** Processing line: ~      return unless game.active_module == :alert~
    +      state.trauma = [state.trauma - amount, 0.0].max
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      return unless game.active_module == :alert
    -** Processing line: ~~
    +    end
    +** Processing line: ~    #==============================================================================================~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      outputs.labels << [640, 480, game.story_line, 5, 1]  # outputs story line label~
    +    #==============================================================================================
    +** Processing line: ~    #Input functions~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << [640, 480, game.story_line, 5, 1]  # outputs story line label
    -** Processing line: ~      outputs.primitives << button(:alert_dismiss, 490, 380, "close")  # positions "close" button under story line~
    +    #Input functions
    +** Processing line: ~    def input~
     - Inside source: true
     *** True Line Result
    -      outputs.primitives << button(:alert_dismiss, 490, 380, "close")  # positions "close" button under story line
    -** Processing line: ~    end~
    +    def input
    +** Processing line: ~      input_move_cyan~
     - Inside source: true
     *** True Line Result
    -    end
    +      input_move_cyan
    +** Processing line: ~      input_move_magenta~
    +- Inside source: true
    +*** True Line Result
    +      input_move_magenta
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def render_room~
    +** Processing line: ~      if inputs.keyboard.key_down.t~
     - Inside source: true
     *** True Line Result
    -    def render_room
    -** Processing line: ~      return unless game.active_module == :room~
    +      if inputs.keyboard.key_down.t
    +** Processing line: ~        add_trauma(0.5)~
     - Inside source: true
     *** True Line Result
    -      return unless game.active_module == :room
    -** Processing line: ~      outputs.labels << [640, 700, game.room_title, 4, 1] # outputs room title label at top of screen~
    +        add_trauma(0.5)
    +** Processing line: ~      elsif inputs.keyboard.key_down.y~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << [640, 700, game.room_title, 4, 1] # outputs room title label at top of screen
    -** Processing line: ~~
    +      elsif inputs.keyboard.key_down.y
    +** Processing line: ~        remove_trauma(0.1)~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      # The parameters for these outputs are (symbol, x, y, text, value/percentage) and each has a y value~
    +        remove_trauma(0.1)
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -      # The parameters for these outputs are (symbol, x, y, text, value/percentage) and each has a y value
    -** Processing line: ~      # that positions it 60 pixels lower than the previous output.~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      # that positions it 60 pixels lower than the previous output.
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      # outputs the light_fire_progress bar, uses light_fire_progress for its percentage (which changes bar's appearance)~
    +** Processing line: ~    def input_move_cyan~
     - Inside source: true
     *** True Line Result
    -      # outputs the light_fire_progress bar, uses light_fire_progress for its percentage (which changes bar's appearance)
    -** Processing line: ~      outputs.primitives << progress_bar(:light_fire, 490, 600, "light fire", game.light_fire_progress)~
    +    def input_move_cyan
    +** Processing line: ~      if inputs.keyboard.key_held.up~
     - Inside source: true
     *** True Line Result
    -      outputs.primitives << progress_bar(:light_fire, 490, 600, "light fire", game.light_fire_progress)
    -** Processing line: ~      outputs.primitives << button(       :save_game, 490, 540, "save") # outputs save button~
    +      if inputs.keyboard.key_held.up
    +** Processing line: ~        state.player_cyan.dy = 5~
     - Inside source: true
     *** True Line Result
    -      outputs.primitives << button(       :save_game, 490, 540, "save") # outputs save button
    -** Processing line: ~      outputs.primitives << button(       :load_game, 490, 480, "load") # outputs load button~
    +        state.player_cyan.dy = 5
    +** Processing line: ~        state.player_cyan.orientation = "up"~
     - Inside source: true
     *** True Line Result
    -      outputs.primitives << button(       :load_game, 490, 480, "load") # outputs load button
    -** Processing line: ~      outputs.primitives << button(      :reset_game, 490, 420, "reset") # outputs reset button~
    +        state.player_cyan.orientation = "up"
    +** Processing line: ~      elsif inputs.keyboard.key_held.down~
     - Inside source: true
     *** True Line Result
    -      outputs.primitives << button(      :reset_game, 490, 420, "reset") # outputs reset button
    -** Processing line: ~      outputs.labels << [640, 30, "the fire is #{game.fire}", 0, 1] # outputs fire label at bottom of screen~
    +      elsif inputs.keyboard.key_held.down
    +** Processing line: ~        state.player_cyan.dy = -5~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << [640, 30, "the fire is #{game.fire}", 0, 1] # outputs fire label at bottom of screen
    -** Processing line: ~    end~
    +        state.player_cyan.dy = -5
    +** Processing line: ~        state.player_cyan.orientation = "down"~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +        state.player_cyan.orientation = "down"
    +** Processing line: ~      else~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # Outputs a collection of highlights using an array to set their values, and also rejects certain values from the collection.~
    +      else
    +** Processing line: ~        state.player_cyan.dy *= 0.8~
     - Inside source: true
     *** True Line Result
    -    # Outputs a collection of highlights using an array to set their values, and also rejects certain values from the collection.
    -** Processing line: ~    def render_highlights~
    +        state.player_cyan.dy *= 0.8
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    def render_highlights
    -** Processing line: ~      state.layout.highlights.each do |h| # for each highlight in the collection~
    +      end
    +** Processing line: ~      if inputs.keyboard.key_held.left~
     - Inside source: true
     *** True Line Result
    -      state.layout.highlights.each do |h| # for each highlight in the collection
    -** Processing line: ~          h.lifetime -= 1 # decrease the value of its lifetime~
    +      if inputs.keyboard.key_held.left
    +** Processing line: ~        state.player_cyan.dx = -5~
     - Inside source: true
     *** True Line Result
    -          h.lifetime -= 1 # decrease the value of its lifetime
    -** Processing line: ~        end~
    +        state.player_cyan.dx = -5
    +** Processing line: ~        state.player_cyan.orientation = "left"~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~~
    +        state.player_cyan.orientation = "left"
    +** Processing line: ~      elsif inputs.keyboard.key_held.right~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~        outputs.solids << state.layout.highlights.map do |h| # outputs highlights collection~
    +      elsif inputs.keyboard.key_held.right
    +** Processing line: ~        state.player_cyan.dx = 5~
     - Inside source: true
     *** True Line Result
    -        outputs.solids << state.layout.highlights.map do |h| # outputs highlights collection
    -** Processing line: ~          [h.x, h.y, h.w, h.h, h.color, 255 * h.lifetime / h.max_lifetime] # sets definition for each highlight~
    +        state.player_cyan.dx = 5
    +** Processing line: ~        state.player_cyan.orientation = "right"~
     - Inside source: true
     *** True Line Result
    -          [h.x, h.y, h.w, h.h, h.color, 255 * h.lifetime / h.max_lifetime] # sets definition for each highlight
    -** Processing line: ~          # transparency changes; divide lifetime by max_lifetime, multiply result by 255~
    +        state.player_cyan.orientation = "right"
    +** Processing line: ~      else~
     - Inside source: true
     *** True Line Result
    -          # transparency changes; divide lifetime by max_lifetime, multiply result by 255
    -** Processing line: ~        end~
    +      else
    +** Processing line: ~        state.player_cyan.dx *= 0.8~
     - Inside source: true
     *** True Line Result
    -        end
    +        state.player_cyan.dx *= 0.8
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~        # reject highlights from collection that have no remaining lifetime~
    +** Processing line: ~      outputs.labels << [128,512,"#{state.player_cyan.x.round()}",8,2,0,255,255,255]~
     - Inside source: true
     *** True Line Result
    -        # reject highlights from collection that have no remaining lifetime
    -** Processing line: ~        state.layout.highlights = state.layout.highlights.reject { |h| h.lifetime <= 0 }~
    +      outputs.labels << [128,512,"#{state.player_cyan.x.round()}",8,2,0,255,255,255]
    +** Processing line: ~      outputs.labels << [128,480,"#{state.player_cyan.y.round()}",8,2,0,255,255,255]~
     - Inside source: true
     *** True Line Result
    -        state.layout.highlights = state.layout.highlights.reject { |h| h.lifetime <= 0 }
    +      outputs.labels << [128,480,"#{state.player_cyan.y.round()}",8,2,0,255,255,255]
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -44800,246 +53051,274 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Checks whether or not a button was clicked.~
    +** Processing line: ~    def input_move_magenta~
     - Inside source: true
     *** True Line Result
    -    # Checks whether or not a button was clicked.
    -** Processing line: ~    # Returns a boolean value.~
    +    def input_move_magenta
    +** Processing line: ~      if inputs.keyboard.key_held.w~
     - Inside source: true
     *** True Line Result
    -    # Returns a boolean value.
    -** Processing line: ~    def process_input~
    +      if inputs.keyboard.key_held.w
    +** Processing line: ~        state.player_magenta.dy = 5~
     - Inside source: true
     *** True Line Result
    -    def process_input
    -** Processing line: ~      button = button_clicked? # calls button_clicked? method~
    +        state.player_magenta.dy = 5
    +** Processing line: ~        state.player_magenta.orientation = "up"~
     - Inside source: true
     *** True Line Result
    -      button = button_clicked? # calls button_clicked? method
    -** Processing line: ~    end~
    +        state.player_magenta.orientation = "up"
    +** Processing line: ~      elsif inputs.keyboard.key_held.s~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +      elsif inputs.keyboard.key_held.s
    +** Processing line: ~        state.player_magenta.dy = -5~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # Returns a boolean value.~
    +        state.player_magenta.dy = -5
    +** Processing line: ~        state.player_magenta.orientation = "down"~
     - Inside source: true
     *** True Line Result
    -    # Returns a boolean value.
    -** Processing line: ~    # Finds the button that was clicked from the button list and determines what method to call.~
    +        state.player_magenta.orientation = "down"
    +** Processing line: ~      else~
     - Inside source: true
     *** True Line Result
    -    # Finds the button that was clicked from the button list and determines what method to call.
    -** Processing line: ~    # Adds a highlight to the highlights collection.~
    +      else
    +** Processing line: ~        state.player_magenta.dy *= 0.8~
     - Inside source: true
     *** True Line Result
    -    # Adds a highlight to the highlights collection.
    -** Processing line: ~    def button_clicked?~
    +        state.player_magenta.dy *= 0.8
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    def button_clicked?
    -** Processing line: ~      return nil unless click_pos # return nil unless click_pos holds coordinates of mouse click~
    +      end
    +** Processing line: ~      if inputs.keyboard.key_held.a~
     - Inside source: true
     *** True Line Result
    -      return nil unless click_pos # return nil unless click_pos holds coordinates of mouse click
    -** Processing line: ~        button = @button_list.find do |k, v| # goes through button_list to find button clicked~
    +      if inputs.keyboard.key_held.a
    +** Processing line: ~        state.player_magenta.dx = -5~
     - Inside source: true
     *** True Line Result
    -        button = @button_list.find do |k, v| # goes through button_list to find button clicked
    -** Processing line: ~          click_pos.inside_rect? v[:primitives].last.rect # was the mouse clicked inside the rect of button?~
    +        state.player_magenta.dx = -5
    +** Processing line: ~        state.player_magenta.orientation = "left"~
     - Inside source: true
     *** True Line Result
    -          click_pos.inside_rect? v[:primitives].last.rect # was the mouse clicked inside the rect of button?
    -** Processing line: ~        end~
    +        state.player_magenta.orientation = "left"
    +** Processing line: ~      elsif inputs.keyboard.key_held.d~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~        return unless button # return unless a button was clicked~
    +      elsif inputs.keyboard.key_held.d
    +** Processing line: ~        state.player_magenta.dx = 5~
     - Inside source: true
     *** True Line Result
    -        return unless button # return unless a button was clicked
    -** Processing line: ~        method_to_call = "#{button[0]}_clicked".to_sym # sets method_to_call to symbol (like :save_game or :load_game)~
    +        state.player_magenta.dx = 5
    +** Processing line: ~        state.player_magenta.orientation = "right"~
     - Inside source: true
     *** True Line Result
    -        method_to_call = "#{button[0]}_clicked".to_sym # sets method_to_call to symbol (like :save_game or :load_game)
    -** Processing line: ~        if self.respond_to? method_to_call # returns true if self responds to the given method (method actually exists)~
    +        state.player_magenta.orientation = "right"
    +** Processing line: ~      else~
     - Inside source: true
     *** True Line Result
    -        if self.respond_to? method_to_call # returns true if self responds to the given method (method actually exists)
    -** Processing line: ~          border = button[1][:primitives].last # sets border definition using value of last key in button list hash~
    +      else
    +** Processing line: ~        state.player_magenta.dx *= 0.8~
     - Inside source: true
     *** True Line Result
    -          border = button[1][:primitives].last # sets border definition using value of last key in button list hash
    +        state.player_magenta.dx *= 0.8
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~          # declares each highlight as a new entity, sets properties~
    +** Processing line: ~      outputs.labels << [128,360,"#{state.player_magenta.x.round()}",8,2,255,0,255,255]~
     - Inside source: true
     *** True Line Result
    -          # declares each highlight as a new entity, sets properties
    -** Processing line: ~          state.layout.highlights << state.new_entity(:highlight) do |h|~
    +      outputs.labels << [128,360,"#{state.player_magenta.x.round()}",8,2,255,0,255,255]
    +** Processing line: ~      outputs.labels << [128,328,"#{state.player_magenta.y.round()}",8,2,255,0,255,255]~
     - Inside source: true
     *** True Line Result
    -          state.layout.highlights << state.new_entity(:highlight) do |h|
    -** Processing line: ~              h.x = border.x~
    +      outputs.labels << [128,328,"#{state.player_magenta.y.round()}",8,2,255,0,255,255]
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -              h.x = border.x
    -** Processing line: ~              h.y = border.y~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -              h.y = border.y
    -** Processing line: ~              h.w = border.w~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -              h.w = border.w
    -** Processing line: ~              h.h = border.h~
    +
    +** Processing line: ~  $camera_movement = CameraMovement.new~
     - Inside source: true
     *** True Line Result
    -              h.h = border.h
    -** Processing line: ~              h.max_lifetime = 10~
    +  $camera_movement = CameraMovement.new
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -              h.max_lifetime = 10
    -** Processing line: ~              h.lifetime = h.max_lifetime~
    +
    +** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
    -              h.lifetime = h.max_lifetime
    -** Processing line: ~              h.color = [120, 120, 180] # sets color to shade of purple~
    +  def tick args
    +** Processing line: ~    args.outputs.background_color = [0,0,0]~
     - Inside source: true
     *** True Line Result
    -              h.color = [120, 120, 180] # sets color to shade of purple
    -** Processing line: ~            end~
    +    args.outputs.background_color = [0,0,0]
    +** Processing line: ~    $camera_movement.inputs  = args.inputs~
     - Inside source: true
     *** True Line Result
    -            end
    -** Processing line: ~~
    +    $camera_movement.inputs  = args.inputs
    +** Processing line: ~    $camera_movement.outputs = args.outputs~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~            self.send method_to_call # invoke method identified by symbol~
    +    $camera_movement.outputs = args.outputs
    +** Processing line: ~    $camera_movement.state   = args.state~
     - Inside source: true
     *** True Line Result
    -            self.send method_to_call # invoke method identified by symbol
    -** Processing line: ~          else # otherwise, if self doesn't respond to given method~
    +    $camera_movement.state   = args.state
    +** Processing line: ~    $camera_movement.grid    = args.grid~
     - Inside source: true
     *** True Line Result
    -          else # otherwise, if self doesn't respond to given method
    -** Processing line: ~            border = button[1][:primitives].last # sets border definition using value of last key in hash~
    +    $camera_movement.grid    = args.grid
    +** Processing line: ~    $camera_movement.tick~
     - Inside source: true
     *** True Line Result
    -            border = button[1][:primitives].last # sets border definition using value of last key in hash
    +    $camera_movement.tick
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~            # declares each highlight as a new entity, sets properties~
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
    +*** True Line Result
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +
    +** Processing line: ~*** Advanced Rendering - Z Targeting Camera - main.rb~
    +- Header detected.
    +*** True Line Result
    +
    +*** True Line Result
    +*** Advanced Rendering - Z Targeting Camera - main.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/07_advanced_rendering/09_z_targeting_camera/app/main.rb~
     - Inside source: true
     *** True Line Result
    -            # declares each highlight as a new entity, sets properties
    -** Processing line: ~            state.layout.highlights << state.new_entity(:highlight) do |h|~
    +  # ./samples/07_advanced_rendering/09_z_targeting_camera/app/main.rb
    +** Processing line: ~  class Game~
     - Inside source: true
     *** True Line Result
    -            state.layout.highlights << state.new_entity(:highlight) do |h|
    -** Processing line: ~              h.x = border.x~
    +  class Game
    +** Processing line: ~    attr_gtk~
     - Inside source: true
     *** True Line Result
    -              h.x = border.x
    -** Processing line: ~              h.y = border.y~
    +    attr_gtk
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -              h.y = border.y
    -** Processing line: ~              h.w = border.w~
    +
    +** Processing line: ~    def tick~
     - Inside source: true
     *** True Line Result
    -              h.w = border.w
    -** Processing line: ~              h.h = border.h~
    +    def tick
    +** Processing line: ~      defaults~
     - Inside source: true
     *** True Line Result
    -              h.h = border.h
    -** Processing line: ~              h.max_lifetime = 4 # different max_lifetime than the one set if respond_to? had been true~
    +      defaults
    +** Processing line: ~      render~
     - Inside source: true
     *** True Line Result
    -              h.max_lifetime = 4 # different max_lifetime than the one set if respond_to? had been true
    -** Processing line: ~              h.lifetime = h.max_lifetime~
    +      render
    +** Processing line: ~      input~
     - Inside source: true
     *** True Line Result
    -              h.lifetime = h.max_lifetime
    -** Processing line: ~              h.color = [120, 80, 80] # sets color to dark color~
    +      input
    +** Processing line: ~      calc~
     - Inside source: true
     *** True Line Result
    -              h.color = [120, 80, 80] # sets color to dark color
    -** Processing line: ~            end~
    +      calc
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -            end
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~            # instructions for users on how to add the missing method_to_call to the code~
    +** Processing line: ~    def defaults~
     - Inside source: true
     *** True Line Result
    -            # instructions for users on how to add the missing method_to_call to the code
    -** Processing line: ~            puts "It looks like #{method_to_call} doesn't exists on TextedBasedGamePresenter. Please add this method:"~
    +    def defaults
    +** Processing line: ~      outputs.background_color = [219, 208, 191]~
     - Inside source: true
     *** True Line Result
    -            puts "It looks like #{method_to_call} doesn't exists on TextedBasedGamePresenter. Please add this method:"
    -** Processing line: ~            puts "Just copy the code below and put it in the #{TextedBasedGamePresenter} class definition."~
    +      outputs.background_color = [219, 208, 191]
    +** Processing line: ~      player.x        ||= 634~
     - Inside source: true
     *** True Line Result
    -            puts "Just copy the code below and put it in the #{TextedBasedGamePresenter} class definition."
    -** Processing line: ~            puts ""~
    +      player.x        ||= 634
    +** Processing line: ~      player.y        ||= 153~
     - Inside source: true
     *** True Line Result
    -            puts ""
    -** Processing line: ~            puts "```"~
    +      player.y        ||= 153
    +** Processing line: ~      player.angle    ||= 90~
     - Inside source: true
     *** True Line Result
    -            puts "```"
    -** Processing line: ~            puts "class TextedBasedGamePresenter <--- find this class and put the method below in it"~
    +      player.angle    ||= 90
    +** Processing line: ~      player.distance ||= arena_radius~
     - Inside source: true
     *** True Line Result
    -            puts "class TextedBasedGamePresenter <--- find this class and put the method below in it"
    -** Processing line: ~            puts ""~
    +      player.distance ||= arena_radius
    +** Processing line: ~      target.x        ||= 634~
     - Inside source: true
     *** True Line Result
    -            puts ""
    -** Processing line: ~            puts "  def #{method_to_call}"~
    +      target.x        ||= 634
    +** Processing line: ~      target.y        ||= 359~
     - Inside source: true
     *** True Line Result
    -            puts "  def #{method_to_call}"
    -** Processing line: ~            puts "    puts 'Yay that worked!'"~
    +      target.y        ||= 359
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -            puts "    puts 'Yay that worked!'"
    -** Processing line: ~            puts "  end"~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -            puts "  end"
    -** Processing line: ~            puts ""~
    +
    +** Processing line: ~    def render~
     - Inside source: true
     *** True Line Result
    -            puts ""
    -** Processing line: ~            puts "end <-- make sure to put the #{method_to_call} method in between the `class` word and the final `end` statement."~
    +    def render
    +** Processing line: ~      outputs[:scene].sprites << ([0, 0, 933, 700, 'sprites/arena.png'].center_inside_rect grid.rect)~
     - Inside source: true
     *** True Line Result
    -            puts "end <-- make sure to put the #{method_to_call} method in between the `class` word and the final `end` statement."
    -** Processing line: ~            puts "```"~
    +      outputs[:scene].sprites << ([0, 0, 933, 700, 'sprites/arena.png'].center_inside_rect grid.rect)
    +** Processing line: ~      outputs[:scene].sprites << target_sprite~
     - Inside source: true
     *** True Line Result
    -            puts "```"
    -** Processing line: ~            puts ""~
    +      outputs[:scene].sprites << target_sprite
    +** Processing line: ~      outputs[:scene].sprites << player_sprite~
     - Inside source: true
     *** True Line Result
    -            puts ""
    -** Processing line: ~        end~
    +      outputs[:scene].sprites << player_sprite
    +** Processing line: ~      outputs.sprites << scene~
     - Inside source: true
     *** True Line Result
    -        end
    +      outputs.sprites << scene
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -45048,22 +53327,30 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Returns the position of the mouse when it is clicked.~
    +** Processing line: ~    def target_sprite~
     - Inside source: true
     *** True Line Result
    -    # Returns the position of the mouse when it is clicked.
    -** Processing line: ~    def click_pos~
    +    def target_sprite
    +** Processing line: ~      {~
     - Inside source: true
     *** True Line Result
    -    def click_pos
    -** Processing line: ~      return nil unless inputs.mouse.click # returns nil unless the mouse was clicked~
    +      {
    +** Processing line: ~        x: target.x, y: target.y,~
     - Inside source: true
     *** True Line Result
    -      return nil unless inputs.mouse.click # returns nil unless the mouse was clicked
    -** Processing line: ~      return inputs.mouse.click.point # returns location of mouse click (coordinates)~
    +        x: target.x, y: target.y,
    +** Processing line: ~        w: 10, h: 10,~
     - Inside source: true
     *** True Line Result
    -      return inputs.mouse.click.point # returns location of mouse click (coordinates)
    +        w: 10, h: 10,
    +** Processing line: ~        path: 'sprites/square/black.png'~
    +- Inside source: true
    +*** True Line Result
    +        path: 'sprites/square/black.png'
    +** Processing line: ~      }.anchor_rect 0.5, 0.5~
    +- Inside source: true
    +*** True Line Result
    +      }.anchor_rect 0.5, 0.5
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -45072,54 +53359,58 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Creates buttons for the button_list and sets their values using a hash (uses symbols as keys)~
    -- Inside source: true
    -*** True Line Result
    -    # Creates buttons for the button_list and sets their values using a hash (uses symbols as keys)
    -** Processing line: ~    def button id, x, y, text~
    +** Processing line: ~    def input~
     - Inside source: true
     *** True Line Result
    -    def button id, x, y, text
    -** Processing line: ~      @button_list[id] ||= { # assigns values to hash keys~
    +    def input
    +** Processing line: ~      if inputs.up && player.distance > 30~
     - Inside source: true
     *** True Line Result
    -      @button_list[id] ||= { # assigns values to hash keys
    -** Processing line: ~        id: id,~
    +      if inputs.up && player.distance > 30
    +** Processing line: ~        player.distance -= 2~
     - Inside source: true
     *** True Line Result
    -        id: id,
    -** Processing line: ~        text: text,~
    +        player.distance -= 2
    +** Processing line: ~      elsif inputs.down && player.distance < 200~
     - Inside source: true
     *** True Line Result
    -        text: text,
    -** Processing line: ~        primitives: [~
    +      elsif inputs.down && player.distance < 200
    +** Processing line: ~        player.distance += 2~
     - Inside source: true
     *** True Line Result
    -        primitives: [
    -** Processing line: ~          [x + 10, y + 30, text, 2, 0].label, # positions label inside border~
    +        player.distance += 2
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -          [x + 10, y + 30, text, 2, 0].label, # positions label inside border
    -** Processing line: ~          [x, y, 300, 50].border,             # sets definition of border~
    +      end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          [x, y, 300, 50].border,             # sets definition of border
    -** Processing line: ~        ]~
    +
    +** Processing line: ~      player.angle += inputs.left_right * -1~
     - Inside source: true
     *** True Line Result
    -        ]
    -** Processing line: ~      }~
    +      player.angle += inputs.left_right * -1
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      }
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      @button_list[id][:primitives] # returns label and border for buttons~
    +** Processing line: ~    def calc~
     - Inside source: true
     *** True Line Result
    -      @button_list[id][:primitives] # returns label and border for buttons
    +    def calc
    +** Processing line: ~      player.x = target.x + ((player.angle *  1).vector_x player.distance)~
    +- Inside source: true
    +*** True Line Result
    +      player.x = target.x + ((player.angle *  1).vector_x player.distance)
    +** Processing line: ~      player.y = target.y + ((player.angle * -1).vector_y player.distance)~
    +- Inside source: true
    +*** True Line Result
    +      player.y = target.y + ((player.angle * -1).vector_y player.distance)
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -45128,70 +53419,58 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Creates a progress bar (used for lighting the fire) and sets its values.~
    -- Inside source: true
    -*** True Line Result
    -    # Creates a progress bar (used for lighting the fire) and sets its values.
    -** Processing line: ~    def progress_bar id, x, y, text, percentage~
    +** Processing line: ~    def player_sprite~
     - Inside source: true
     *** True Line Result
    -    def progress_bar id, x, y, text, percentage
    -** Processing line: ~      @button_list[id] = { # assigns values to hash keys~
    +    def player_sprite
    +** Processing line: ~      {~
     - Inside source: true
     *** True Line Result
    -      @button_list[id] = { # assigns values to hash keys
    -** Processing line: ~        id: id,~
    +      {
    +** Processing line: ~        x: player.x,~
     - Inside source: true
     *** True Line Result
    -        id: id,
    -** Processing line: ~        text: text,~
    +        x: player.x,
    +** Processing line: ~        y: player.y,~
     - Inside source: true
     *** True Line Result
    -        text: text,
    -** Processing line: ~        primitives: [~
    +        y: player.y,
    +** Processing line: ~        w: 50,~
     - Inside source: true
     *** True Line Result
    -        primitives: [
    -** Processing line: ~          [x, y, 300, 50, 100, 100, 100].solid, # sets definition for solid (which fills the bar with gray)~
    +        w: 50,
    +** Processing line: ~        h: 100,~
     - Inside source: true
     *** True Line Result
    -          [x, y, 300, 50, 100, 100, 100].solid, # sets definition for solid (which fills the bar with gray)
    -** Processing line: ~          [x + 10, y + 30, text, 2, 0].label, # sets definition for label, positions inside border~
    +        h: 100,
    +** Processing line: ~        path: 'sprites/player.png',~
     - Inside source: true
     *** True Line Result
    -          [x + 10, y + 30, text, 2, 0].label, # sets definition for label, positions inside border
    -** Processing line: ~          [x, y, 300, 50].border, # sets definition of border~
    +        path: 'sprites/player.png',
    +** Processing line: ~        angle: (player.angle * -1) + 90~
     - Inside source: true
     *** True Line Result
    -          [x, y, 300, 50].border, # sets definition of border
    -** Processing line: ~        ]~
    +        angle: (player.angle * -1) + 90
    +** Processing line: ~      }.anchor_rect 0.5, 0~
     - Inside source: true
     *** True Line Result
    -        ]
    -** Processing line: ~      }~
    +      }.anchor_rect 0.5, 0
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      }
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      # Fills progress bar based on percentage. If the fire was ready to be lit (100%) and we multiplied by~
    -- Inside source: true
    -*** True Line Result
    -      # Fills progress bar based on percentage. If the fire was ready to be lit (100%) and we multiplied by
    -** Processing line: ~      # 100, only 1/3 of the bar would only be filled in. 200 would cause only 2/3 to be filled in.~
    -- Inside source: true
    -*** True Line Result
    -      # 100, only 1/3 of the bar would only be filled in. 200 would cause only 2/3 to be filled in.
    -** Processing line: ~      @button_list[id][:primitives][0][2] = 300 * percentage~
    +** Processing line: ~    def center_map~
     - Inside source: true
     *** True Line Result
    -      @button_list[id][:primitives][0][2] = 300 * percentage
    -** Processing line: ~      @button_list[id][:primitives]~
    +    def center_map
    +** Processing line: ~      { x: 634, y: 359 }~
     - Inside source: true
     *** True Line Result
    -      @button_list[id][:primitives]
    +      { x: 634, y: 359 }
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -45200,18 +53479,14 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Defines the game.~
    -- Inside source: true
    -*** True Line Result
    -    # Defines the game.
    -** Processing line: ~    def game~
    +** Processing line: ~    def zoom_factor_single~
     - Inside source: true
     *** True Line Result
    -    def game
    -** Processing line: ~      @game~
    +    def zoom_factor_single
    +** Processing line: ~      2 - ((args.geometry.distance player, center_map).fdiv arena_radius)~
     - Inside source: true
     *** True Line Result
    -      @game
    +      2 - ((args.geometry.distance player, center_map).fdiv arena_radius)
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -45220,22 +53495,14 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Initalizes the game and creates an empty list of buttons.~
    -- Inside source: true
    -*** True Line Result
    -    # Initalizes the game and creates an empty list of buttons.
    -** Processing line: ~    def initialize~
    -- Inside source: true
    -*** True Line Result
    -    def initialize
    -** Processing line: ~      @game = TextedBasedGame.new self~
    +** Processing line: ~    def zoom_factor~
     - Inside source: true
     *** True Line Result
    -      @game = TextedBasedGame.new self
    -** Processing line: ~      @button_list ||= {}~
    +    def zoom_factor
    +** Processing line: ~      zoom_factor_single ** 2~
     - Inside source: true
     *** True Line Result
    -      @button_list ||= {}
    +      zoom_factor_single ** 2
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -45244,22 +53511,14 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Clears the storyline and takes the user to the room.~
    -- Inside source: true
    -*** True Line Result
    -    # Clears the storyline and takes the user to the room.
    -** Processing line: ~    def alert_dismiss_clicked~
    -- Inside source: true
    -*** True Line Result
    -    def alert_dismiss_clicked
    -** Processing line: ~      game.clear_storyline~
    +** Processing line: ~    def arena_radius~
     - Inside source: true
     *** True Line Result
    -      game.clear_storyline
    -** Processing line: ~      game.go_to_room~
    +    def arena_radius
    +** Processing line: ~      206~
     - Inside source: true
     *** True Line Result
    -      game.go_to_room
    +      206
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -45268,38 +53527,50 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Lights the fire when the user clicks the "light fire" option.~
    +** Processing line: ~    def scene~
     - Inside source: true
     *** True Line Result
    -    # Lights the fire when the user clicks the "light fire" option.
    -** Processing line: ~    def light_fire_clicked~
    +    def scene
    +** Processing line: ~      {~
     - Inside source: true
     *** True Line Result
    -    def light_fire_clicked
    -** Processing line: ~      game.light_fire~
    +      {
    +** Processing line: ~        x:    (640 - player.x) + (640 - (640 * zoom_factor)),~
     - Inside source: true
     *** True Line Result
    -      game.light_fire
    -** Processing line: ~    end~
    +        x:    (640 - player.x) + (640 - (640 * zoom_factor)),
    +** Processing line: ~        y:    (360 - player.y - (75 * zoom_factor)) + (320 - (320 * zoom_factor)),~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +        y:    (360 - player.y - (75 * zoom_factor)) + (320 - (320 * zoom_factor)),
    +** Processing line: ~        w:    1280 * zoom_factor,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # Saves the game when the user clicks the "save" option.~
    +        w:    1280 * zoom_factor,
    +** Processing line: ~        h:     720 * zoom_factor,~
     - Inside source: true
     *** True Line Result
    -    # Saves the game when the user clicks the "save" option.
    -** Processing line: ~    def save_game_clicked~
    +        h:     720 * zoom_factor,
    +** Processing line: ~        path: :scene,~
     - Inside source: true
     *** True Line Result
    -    def save_game_clicked
    -** Processing line: ~      game.save~
    +        path: :scene,
    +** Processing line: ~        angle: player.angle - 90,~
     - Inside source: true
     *** True Line Result
    -      game.save
    +        angle: player.angle - 90,
    +** Processing line: ~        angle_anchor_x: (player.x.fdiv 1280),~
    +- Inside source: true
    +*** True Line Result
    +        angle_anchor_x: (player.x.fdiv 1280),
    +** Processing line: ~        angle_anchor_y: (player.y.fdiv 720)~
    +- Inside source: true
    +*** True Line Result
    +        angle_anchor_y: (player.y.fdiv 720)
    +** Processing line: ~      }~
    +- Inside source: true
    +*** True Line Result
    +      }
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -45308,18 +53579,14 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Resets the game when the user clicks the "reset" option.~
    -- Inside source: true
    -*** True Line Result
    -    # Resets the game when the user clicks the "reset" option.
    -** Processing line: ~    def reset_game_clicked~
    +** Processing line: ~    def player~
     - Inside source: true
     *** True Line Result
    -    def reset_game_clicked
    -** Processing line: ~      game.reset~
    +    def player
    +** Processing line: ~      state.player~
     - Inside source: true
     *** True Line Result
    -      game.reset
    +      state.player
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -45328,18 +53595,14 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Loads the game when the user clicks the "load" option.~
    -- Inside source: true
    -*** True Line Result
    -    # Loads the game when the user clicks the "load" option.
    -** Processing line: ~    def load_game_clicked~
    +** Processing line: ~    def target~
     - Inside source: true
     *** True Line Result
    -    def load_game_clicked
    -** Processing line: ~      game.load~
    +    def target
    +** Processing line: ~      state.target~
     - Inside source: true
     *** True Line Result
    -      game.load
    +      state.target
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -45352,34 +53615,22 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  $text_based_rpg = TextedBasedGamePresenter.new~
    -- Inside source: true
    -*** True Line Result
    -  $text_based_rpg = TextedBasedGamePresenter.new
    -** Processing line: ~~
    -- Inside source: true
    -*** True Line Result
    -
     ** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
       def tick args
    -** Processing line: ~    $text_based_rpg.state = args.state~
    -- Inside source: true
    -*** True Line Result
    -    $text_based_rpg.state = args.state
    -** Processing line: ~    $text_based_rpg.outputs = args.outputs~
    +** Processing line: ~    $game ||= Game.new~
     - Inside source: true
     *** True Line Result
    -    $text_based_rpg.outputs = args.outputs
    -** Processing line: ~    $text_based_rpg.inputs = args.inputs~
    +    $game ||= Game.new
    +** Processing line: ~    $game.args = args~
     - Inside source: true
     *** True Line Result
    -    $text_based_rpg.inputs = args.inputs
    -** Processing line: ~    $text_based_rpg.tick~
    +    $game.args = args
    +** Processing line: ~    $game.tick~
     - Inside source: true
     *** True Line Result
    -    $text_based_rpg.tick
    +    $game.tick
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -45388,6 +53639,14 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    +** Processing line: ~  $gtk.reset~
    +- Inside source: true
    +*** True Line Result
    +  $gtk.reset
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
     ** Processing line: ~#+end_src~
     - Line was identified as the end of a code block.
     *** True Line Result
    @@ -45396,218 +53655,214 @@ Follows is a source code listing for all files that have been open sourced. This
     - End of paragraph detected.
     *** True Line Result
     
    -** Processing line: ~*** Advanced Rendering - Simple Render Targets - main.rb~
    +** Processing line: ~*** Advanced Rendering - Blend Modes - main.rb~
     - Header detected.
     *** True Line Result
     
     *** True Line Result
    -*** Advanced Rendering - Simple Render Targets - main.rb
    +*** Advanced Rendering - Blend Modes - main.rb
     ** Processing line: ~#+begin_src ruby~
     - Line was identified as the beginning of a code block.
     *** True Line Result
     
     *** True Line Result
     #+begin_src ruby
    -** Processing line: ~  # ./samples/07_advanced_rendering/01_simple_render_targets/app/main.rb~
    -- Inside source: true
    -*** True Line Result
    -  # ./samples/07_advanced_rendering/01_simple_render_targets/app/main.rb
    -** Processing line: ~  def tick args~
    -- Inside source: true
    -*** True Line Result
    -  def tick args
    -** Processing line: ~    # args.outputs.render_targets are really really powerful.~
    +** Processing line: ~  # ./samples/07_advanced_rendering/10_blend_modes/app/main.rb~
     - Inside source: true
     *** True Line Result
    -    # args.outputs.render_targets are really really powerful.
    -** Processing line: ~    # They essentially allow you to create a sprite programmatically and cache the result.~
    +  # ./samples/07_advanced_rendering/10_blend_modes/app/main.rb
    +** Processing line: ~  $gtk.reset~
     - Inside source: true
     *** True Line Result
    -    # They essentially allow you to create a sprite programmatically and cache the result.
    +  $gtk.reset
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Create a render_target of a :block and a :gradient on tick zero.~
    +** Processing line: ~  def draw_blendmode args, mode~
     - Inside source: true
     *** True Line Result
    -    # Create a render_target of a :block and a :gradient on tick zero.
    -** Processing line: ~    if args.state.tick_count == 0~
    +  def draw_blendmode args, mode
    +** Processing line: ~    w = 160~
     - Inside source: true
     *** True Line Result
    -    if args.state.tick_count == 0
    -** Processing line: ~      args.render_target(:block).solids << [0, 0, 1280, 100]~
    +    w = 160
    +** Processing line: ~    h = w~
     - Inside source: true
     *** True Line Result
    -      args.render_target(:block).solids << [0, 0, 1280, 100]
    -** Processing line: ~~
    +    h = w
    +** Processing line: ~    args.state.x += (1280-w) / (args.state.blendmodes.length + 1)~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      # The gradient is actually just a collection of black solids with increasing~
    +    args.state.x += (1280-w) / (args.state.blendmodes.length + 1)
    +** Processing line: ~    x = args.state.x~
     - Inside source: true
     *** True Line Result
    -      # The gradient is actually just a collection of black solids with increasing
    -** Processing line: ~      # opacities.~
    +    x = args.state.x
    +** Processing line: ~    y = (720 - h) / 2~
     - Inside source: true
     *** True Line Result
    -      # opacities.
    -** Processing line: ~      args.render_target(:gradient).solids << 90.map_with_index do |x|~
    +    y = (720 - h) / 2
    +** Processing line: ~    s = 'sprites/blue-feathered.png'~
     - Inside source: true
     *** True Line Result
    -      args.render_target(:gradient).solids << 90.map_with_index do |x|
    -** Processing line: ~        50.map_with_index do |y|~
    +    s = 'sprites/blue-feathered.png'
    +** Processing line: ~    args.outputs.sprites << { blendmode_enum: mode.value, x: x, y: y, w: w, h: h, path: s }~
     - Inside source: true
     *** True Line Result
    -        50.map_with_index do |y|
    -** Processing line: ~          [x * 15, y * 15, 15, 15, 0, 0, 0, (x * 3).fdiv(255) * 255]~
    +    args.outputs.sprites << { blendmode_enum: mode.value, x: x, y: y, w: w, h: h, path: s }
    +** Processing line: ~    args.outputs.labels << [x + (w/2), y, mode.name.to_s, 1, 1, 255, 255, 255]~
     - Inside source: true
     *** True Line Result
    -          [x * 15, y * 15, 15, 15, 0, 0, 0, (x * 3).fdiv(255) * 255]
    -** Processing line: ~        end~
    +    args.outputs.labels << [x + (w/2), y, mode.name.to_s, 1, 1, 255, 255, 255]
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~      end~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +
    +** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
    -    end
    +  def tick args
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Take the :block render_target and present it horizontally centered.~
    +** Processing line: ~    # Different blend modes do different things, depending on what they~
     - Inside source: true
     *** True Line Result
    -    # Take the :block render_target and present it horizontally centered.
    -** Processing line: ~    # Use a subsection of the render_targetd specified by source_x,~
    +    # Different blend modes do different things, depending on what they
    +** Processing line: ~    # blend against (in this case, the pixels of the background color).~
     - Inside source: true
     *** True Line Result
    -    # Use a subsection of the render_targetd specified by source_x,
    -** Processing line: ~    # source_y, source_w, source_h.~
    +    # blend against (in this case, the pixels of the background color).
    +** Processing line: ~    args.state.bg_element ||= 1~
     - Inside source: true
     *** True Line Result
    -    # source_y, source_w, source_h.
    -** Processing line: ~    args.outputs.sprites << { x: 0,~
    +    args.state.bg_element ||= 1
    +** Processing line: ~    args.state.bg_color ||= 255~
     - Inside source: true
     *** True Line Result
    -    args.outputs.sprites << { x: 0,
    -** Processing line: ~                              y: 310,~
    +    args.state.bg_color ||= 255
    +** Processing line: ~    args.state.bg_color_direction ||= 1~
     - Inside source: true
     *** True Line Result
    -                              y: 310,
    -** Processing line: ~                              w: 1280,~
    +    args.state.bg_color_direction ||= 1
    +** Processing line: ~    bg_r = (args.state.bg_element == 1) ? args.state.bg_color : 0~
     - Inside source: true
     *** True Line Result
    -                              w: 1280,
    -** Processing line: ~                              h: 100,~
    +    bg_r = (args.state.bg_element == 1) ? args.state.bg_color : 0
    +** Processing line: ~    bg_g = (args.state.bg_element == 2) ? args.state.bg_color : 0~
     - Inside source: true
     *** True Line Result
    -                              h: 100,
    -** Processing line: ~                              path: :block,~
    +    bg_g = (args.state.bg_element == 2) ? args.state.bg_color : 0
    +** Processing line: ~    bg_b = (args.state.bg_element == 3) ? args.state.bg_color : 0~
     - Inside source: true
     *** True Line Result
    -                              path: :block,
    -** Processing line: ~                              source_x: 0,~
    +    bg_b = (args.state.bg_element == 3) ? args.state.bg_color : 0
    +** Processing line: ~    args.state.bg_color += args.state.bg_color_direction~
     - Inside source: true
     *** True Line Result
    -                              source_x: 0,
    -** Processing line: ~                              source_y: 0,~
    +    args.state.bg_color += args.state.bg_color_direction
    +** Processing line: ~    if (args.state.bg_color_direction > 0) && (args.state.bg_color >= 255)~
     - Inside source: true
     *** True Line Result
    -                              source_y: 0,
    -** Processing line: ~                              source_w: 1280,~
    +    if (args.state.bg_color_direction > 0) && (args.state.bg_color >= 255)
    +** Processing line: ~      args.state.bg_color_direction = -1~
     - Inside source: true
     *** True Line Result
    -                              source_w: 1280,
    -** Processing line: ~                              source_h: 100 }~
    +      args.state.bg_color_direction = -1
    +** Processing line: ~      args.state.bg_color = 255~
     - Inside source: true
     *** True Line Result
    -                              source_h: 100 }
    -** Processing line: ~~
    +      args.state.bg_color = 255
    +** Processing line: ~    elsif (args.state.bg_color_direction < 0) && (args.state.bg_color <= 0)~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # After rendering :block, render gradient on top of :block.~
    +    elsif (args.state.bg_color_direction < 0) && (args.state.bg_color <= 0)
    +** Processing line: ~      args.state.bg_color_direction = 1~
     - Inside source: true
     *** True Line Result
    -    # After rendering :block, render gradient on top of :block.
    -** Processing line: ~    args.outputs.sprites << [0, 0, 1280, 720, :gradient]~
    +      args.state.bg_color_direction = 1
    +** Processing line: ~      args.state.bg_color = 0~
     - Inside source: true
     *** True Line Result
    -    args.outputs.sprites << [0, 0, 1280, 720, :gradient]
    -** Processing line: ~~
    +      args.state.bg_color = 0
    +** Processing line: ~      args.state.bg_element += 1~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    args.outputs.labels  << [1270, 710, args.gtk.current_framerate, 0, 2, 255, 255, 255]~
    +      args.state.bg_element += 1
    +** Processing line: ~      if args.state.bg_element >= 4~
     - Inside source: true
     *** True Line Result
    -    args.outputs.labels  << [1270, 710, args.gtk.current_framerate, 0, 2, 255, 255, 255]
    -** Processing line: ~    tick_instructions args, "Sample app shows how to use render_targets (programmatically create cached sprites)."~
    +      if args.state.bg_element >= 4
    +** Processing line: ~        args.state.bg_element = 1~
     - Inside source: true
     *** True Line Result
    -    tick_instructions args, "Sample app shows how to use render_targets (programmatically create cached sprites)."
    -** Processing line: ~  end~
    +        args.state.bg_element = 1
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -  end
    +      end
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def tick_instructions args, text, y = 715~
    +** Processing line: ~    args.outputs.background_color = [ bg_r, bg_g, bg_b, 255 ]~
     - Inside source: true
     *** True Line Result
    -  def tick_instructions args, text, y = 715
    -** Processing line: ~    return if args.state.key_event_occurred~
    +    args.outputs.background_color = [ bg_r, bg_g, bg_b, 255 ]
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    return if args.state.key_event_occurred
    -** Processing line: ~    if args.inputs.mouse.click ||~
    +
    +** Processing line: ~    args.state.blendmodes ||= [~
     - Inside source: true
     *** True Line Result
    -    if args.inputs.mouse.click ||
    -** Processing line: ~       args.inputs.keyboard.directional_vector ||~
    +    args.state.blendmodes ||= [
    +** Processing line: ~      { name: :none,  value: 0 },~
     - Inside source: true
     *** True Line Result
    -       args.inputs.keyboard.directional_vector ||
    -** Processing line: ~       args.inputs.keyboard.key_down.enter ||~
    +      { name: :none,  value: 0 },
    +** Processing line: ~      { name: :blend, value: 1 },~
     - Inside source: true
     *** True Line Result
    -       args.inputs.keyboard.key_down.enter ||
    -** Processing line: ~       args.inputs.keyboard.key_down.escape~
    +      { name: :blend, value: 1 },
    +** Processing line: ~      { name: :add,   value: 2 },~
     - Inside source: true
     *** True Line Result
    -       args.inputs.keyboard.key_down.escape
    -** Processing line: ~      args.state.key_event_occurred = true~
    +      { name: :add,   value: 2 },
    +** Processing line: ~      { name: :mod,   value: 3 },~
     - Inside source: true
     *** True Line Result
    -      args.state.key_event_occurred = true
    -** Processing line: ~    end~
    +      { name: :mod,   value: 3 },
    +** Processing line: ~      { name: :mul,   value: 4 }~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +      { name: :mul,   value: 4 }
    +** Processing line: ~    ]~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    args.outputs.debug << [0, y - 50, 1280, 60].solid~
    +    ]
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    args.outputs.debug << [0, y - 50, 1280, 60].solid
    -** Processing line: ~    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label~
    +
    +** Processing line: ~    args.state.x = 0  # reset this, draw_blendmode will increment it.~
     - Inside source: true
     *** True Line Result
    -    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label
    -** Processing line: ~    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label~
    +    args.state.x = 0  # reset this, draw_blendmode will increment it.
    +** Processing line: ~    args.state.blendmodes.each { |blendmode| draw_blendmode args, blendmode }~
     - Inside source: true
     *** True Line Result
    -    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label
    +    args.state.blendmodes.each { |blendmode| draw_blendmode args, blendmode }
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -45616,14 +53871,6 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  $gtk.reset~
    -- Inside source: true
    -*** True Line Result
    -  $gtk.reset
    -** Processing line: ~~
    -- Inside source: true
    -*** True Line Result
    -
     ** Processing line: ~#+end_src~
     - Line was identified as the end of a code block.
     *** True Line Result
    @@ -45632,342 +53879,390 @@ Follows is a source code listing for all files that have been open sourced. This
     - End of paragraph detected.
     *** True Line Result
     
    -** Processing line: ~*** Advanced Rendering - Render Targets With Tile Manipulation - main.rb~
    +** Processing line: ~*** Tweening Lerping Easing Functions - Easing Functions - main.rb~
     - Header detected.
     *** True Line Result
     
     *** True Line Result
    -*** Advanced Rendering - Render Targets With Tile Manipulation - main.rb
    +*** Tweening Lerping Easing Functions - Easing Functions - main.rb
     ** Processing line: ~#+begin_src ruby~
     - Line was identified as the beginning of a code block.
     *** True Line Result
     
     *** True Line Result
     #+begin_src ruby
    -** Processing line: ~  # ./samples/07_advanced_rendering/02_render_targets_with_tile_manipulation/app/main.rb~
    +** Processing line: ~  # ./samples/08_tweening_lerping_easing_functions/01_easing_functions/app/main.rb~
     - Inside source: true
     *** True Line Result
    -  # ./samples/07_advanced_rendering/02_render_targets_with_tile_manipulation/app/main.rb
    -** Processing line: ~  # This sample is meant to show you how to do that dripping transition thing~
    +  # ./samples/08_tweening_lerping_easing_functions/01_easing_functions/app/main.rb
    +** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
    -  # This sample is meant to show you how to do that dripping transition thing
    -** Processing line: ~  #  at the start of the original Doom. Most of this file is here to animate~
    +  def tick args
    +** Processing line: ~    # STOP! Watch the following presentation first!!!!~
     - Inside source: true
     *** True Line Result
    -  #  at the start of the original Doom. Most of this file is here to animate
    -** Processing line: ~  #  a scene to wipe away; the actual wipe effect is in the last 20 lines or~
    +    # STOP! Watch the following presentation first!!!!
    +** Processing line: ~    # Math for Game Programmers: Fast and Funky 1D Nonlinear Transformations~
     - Inside source: true
     *** True Line Result
    -  #  a scene to wipe away; the actual wipe effect is in the last 20 lines or
    -** Processing line: ~  #  so.~
    +    # Math for Game Programmers: Fast and Funky 1D Nonlinear Transformations
    +** Processing line: ~    # https://www.youtube.com/watch?v=mr5xkf6zSzk~
     - Inside source: true
     *** True Line Result
    -  #  so.
    +    # https://www.youtube.com/watch?v=mr5xkf6zSzk
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  $gtk.reset   # reset all game state if reloaded.~
    +** Processing line: ~    # You've watched the talk, yes? YES???~
     - Inside source: true
     *** True Line Result
    -  $gtk.reset   # reset all game state if reloaded.
    +    # You've watched the talk, yes? YES???
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def circle_of_blocks pass, xoffset, yoffset, angleoffset, blocksize, distance~
    +** Processing line: ~    # define starting and ending points of properties to animate~
     - Inside source: true
     *** True Line Result
    -  def circle_of_blocks pass, xoffset, yoffset, angleoffset, blocksize, distance
    -** Processing line: ~    numblocks = 10~
    +    # define starting and ending points of properties to animate
    +** Processing line: ~    args.state.target_x = 1180~
     - Inside source: true
     *** True Line Result
    -    numblocks = 10
    -** Processing line: ~~
    +    args.state.target_x = 1180
    +** Processing line: ~    args.state.target_y = 620~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    for i in 1..numblocks do~
    +    args.state.target_y = 620
    +** Processing line: ~    args.state.target_w = 100~
     - Inside source: true
     *** True Line Result
    -    for i in 1..numblocks do
    -** Processing line: ~      angle = ((360 / numblocks) * i) + angleoffset~
    +    args.state.target_w = 100
    +** Processing line: ~    args.state.target_h = 100~
     - Inside source: true
     *** True Line Result
    -      angle = ((360 / numblocks) * i) + angleoffset
    -** Processing line: ~      radians = angle * (Math::PI / 180)~
    +    args.state.target_h = 100
    +** Processing line: ~    args.state.starting_x = 0~
     - Inside source: true
     *** True Line Result
    -      radians = angle * (Math::PI / 180)
    -** Processing line: ~      x = (xoffset + (distance * Math.cos(radians))).round~
    +    args.state.starting_x = 0
    +** Processing line: ~    args.state.starting_y = 0~
     - Inside source: true
     *** True Line Result
    -      x = (xoffset + (distance * Math.cos(radians))).round
    -** Processing line: ~      y = (yoffset + (distance * Math.sin(radians))).round~
    +    args.state.starting_y = 0
    +** Processing line: ~    args.state.starting_w = 300~
     - Inside source: true
     *** True Line Result
    -      y = (yoffset + (distance * Math.sin(radians))).round
    -** Processing line: ~      pass.solids << [ x, y, blocksize, blocksize, 255, 255, 0 ]~
    +    args.state.starting_w = 300
    +** Processing line: ~    args.state.starting_h = 300~
     - Inside source: true
     *** True Line Result
    -      pass.solids << [ x, y, blocksize, blocksize, 255, 255, 0 ]
    -** Processing line: ~    end~
    +    args.state.starting_h = 300
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~  end~
    +
    +** Processing line: ~    # define start time and duration of animation~
     - Inside source: true
     *** True Line Result
    -  end
    +    # define start time and duration of animation
    +** Processing line: ~    args.state.start_animate_at = 3.seconds # this is the same as writing 60 * 5 (or 300)~
    +- Inside source: true
    +*** True Line Result
    +    args.state.start_animate_at = 3.seconds # this is the same as writing 60 * 5 (or 300)
    +** Processing line: ~    args.state.duration = 2.seconds # this is the same as writing 60 * 2 (or 120)~
    +- Inside source: true
    +*** True Line Result
    +    args.state.duration = 2.seconds # this is the same as writing 60 * 2 (or 120)
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def draw_scene args, pass~
    +** Processing line: ~    # define type of animations~
     - Inside source: true
     *** True Line Result
    -  def draw_scene args, pass
    -** Processing line: ~    pass.solids << [0, 360, 1280, 360, 0, 0, 200]~
    +    # define type of animations
    +** Processing line: ~    # Here are all the options you have for values you can put in the array:~
     - Inside source: true
     *** True Line Result
    -    pass.solids << [0, 360, 1280, 360, 0, 0, 200]
    -** Processing line: ~    pass.solids << [0, 0, 1280, 360, 0, 127, 0]~
    +    # Here are all the options you have for values you can put in the array:
    +** Processing line: ~    # :identity, :quad, :cube, :quart, :quint, :flip~
     - Inside source: true
     *** True Line Result
    -    pass.solids << [0, 0, 1280, 360, 0, 127, 0]
    +    # :identity, :quad, :cube, :quart, :quint, :flip
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    blocksize = 100~
    +** Processing line: ~    # Linear is defined as:~
     - Inside source: true
     *** True Line Result
    -    blocksize = 100
    -** Processing line: ~    angleoffset = args.state.tick_count * 2.5~
    +    # Linear is defined as:
    +** Processing line: ~    # [:identity]~
     - Inside source: true
     *** True Line Result
    -    angleoffset = args.state.tick_count * 2.5
    -** Processing line: ~    centerx = (1280 - blocksize) / 2~
    +    # [:identity]
    +** Processing line: ~    #~
     - Inside source: true
     *** True Line Result
    -    centerx = (1280 - blocksize) / 2
    -** Processing line: ~    centery = (720 - blocksize) / 2~
    +    #
    +** Processing line: ~    # Smooth start variations are:~
     - Inside source: true
     *** True Line Result
    -    centery = (720 - blocksize) / 2
    +    # Smooth start variations are:
    +** Processing line: ~    # [:quad]~
    +- Inside source: true
    +*** True Line Result
    +    # [:quad]
    +** Processing line: ~    # [:cube]~
    +- Inside source: true
    +*** True Line Result
    +    # [:cube]
    +** Processing line: ~    # [:quart]~
    +- Inside source: true
    +*** True Line Result
    +    # [:quart]
    +** Processing line: ~    # [:quint]~
    +- Inside source: true
    +*** True Line Result
    +    # [:quint]
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    circle_of_blocks pass, centerx, centery, angleoffset, blocksize * 2, 500~
    +** Processing line: ~    # Linear reversed, and smooth stop are the same as the animations defined above, but reversed:~
     - Inside source: true
     *** True Line Result
    -    circle_of_blocks pass, centerx, centery, angleoffset, blocksize * 2, 500
    -** Processing line: ~    circle_of_blocks pass, centerx, centery, angleoffset, blocksize, 325~
    +    # Linear reversed, and smooth stop are the same as the animations defined above, but reversed:
    +** Processing line: ~    # [:flip, :identity]~
     - Inside source: true
     *** True Line Result
    -    circle_of_blocks pass, centerx, centery, angleoffset, blocksize, 325
    -** Processing line: ~    circle_of_blocks pass, centerx, centery, angleoffset, blocksize / 2, 200~
    +    # [:flip, :identity]
    +** Processing line: ~    # [:flip, :quad, :flip]~
     - Inside source: true
     *** True Line Result
    -    circle_of_blocks pass, centerx, centery, angleoffset, blocksize / 2, 200
    -** Processing line: ~    circle_of_blocks pass, centerx, centery, angleoffset, blocksize / 4, 100~
    +    # [:flip, :quad, :flip]
    +** Processing line: ~    # [:flip, :cube, :flip]~
     - Inside source: true
     *** True Line Result
    -    circle_of_blocks pass, centerx, centery, angleoffset, blocksize / 4, 100
    -** Processing line: ~  end~
    +    # [:flip, :cube, :flip]
    +** Processing line: ~    # [:flip, :quart, :flip]~
     - Inside source: true
     *** True Line Result
    -  end
    +    # [:flip, :quart, :flip]
    +** Processing line: ~    # [:flip, :quint, :flip]~
    +- Inside source: true
    +*** True Line Result
    +    # [:flip, :quint, :flip]
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def tick args~
    +** Processing line: ~    # You can also do custom definitions. See the bottom of the file details~
     - Inside source: true
     *** True Line Result
    -  def tick args
    -** Processing line: ~    segments = 160~
    +    # You can also do custom definitions. See the bottom of the file details
    +** Processing line: ~    # on how to do that. I've defined a couple for you:~
     - Inside source: true
     *** True Line Result
    -    segments = 160
    +    # on how to do that. I've defined a couple for you:
    +** Processing line: ~    # [:smoothest_start]~
    +- Inside source: true
    +*** True Line Result
    +    # [:smoothest_start]
    +** Processing line: ~    # [:smoothest_stop]~
    +- Inside source: true
    +*** True Line Result
    +    # [:smoothest_stop]
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # On the first tick, initialize some stuff.~
    +** Processing line: ~    # CHANGE THIS LINE TO ONE OF THE LINES ABOVE TO SEE VARIATIONS~
     - Inside source: true
     *** True Line Result
    -    # On the first tick, initialize some stuff.
    -** Processing line: ~    if !args.state.yoffsets~
    +    # CHANGE THIS LINE TO ONE OF THE LINES ABOVE TO SEE VARIATIONS
    +** Processing line: ~    args.state.animation_type = [:identity]~
     - Inside source: true
     *** True Line Result
    -    if !args.state.yoffsets
    -** Processing line: ~      args.state.baseyoff = 0~
    +    args.state.animation_type = [:identity]
    +** Processing line: ~    # args.state.animation_type = [:quad]~
     - Inside source: true
     *** True Line Result
    -      args.state.baseyoff = 0
    -** Processing line: ~      args.state.yoffsets = []~
    +    # args.state.animation_type = [:quad]
    +** Processing line: ~    # args.state.animation_type = [:cube]~
     - Inside source: true
     *** True Line Result
    -      args.state.yoffsets = []
    -** Processing line: ~      for i in 0..segments do~
    +    # args.state.animation_type = [:cube]
    +** Processing line: ~    # args.state.animation_type = [:quart]~
     - Inside source: true
     *** True Line Result
    -      for i in 0..segments do
    -** Processing line: ~        args.state.yoffsets << rand * 100~
    +    # args.state.animation_type = [:quart]
    +** Processing line: ~    # args.state.animation_type = [:quint]~
     - Inside source: true
     *** True Line Result
    -        args.state.yoffsets << rand * 100
    -** Processing line: ~      end~
    +    # args.state.animation_type = [:quint]
    +** Processing line: ~    # args.state.animation_type = [:flip, :identity]~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +    # args.state.animation_type = [:flip, :identity]
    +** Processing line: ~    # args.state.animation_type = [:flip, :quad, :flip]~
     - Inside source: true
     *** True Line Result
    -    end
    +    # args.state.animation_type = [:flip, :quad, :flip]
    +** Processing line: ~    # args.state.animation_type = [:flip, :cube, :flip]~
    +- Inside source: true
    +*** True Line Result
    +    # args.state.animation_type = [:flip, :cube, :flip]
    +** Processing line: ~    # args.state.animation_type = [:flip, :quart, :flip]~
    +- Inside source: true
    +*** True Line Result
    +    # args.state.animation_type = [:flip, :quart, :flip]
    +** Processing line: ~    # args.state.animation_type = [:flip, :quint, :flip]~
    +- Inside source: true
    +*** True Line Result
    +    # args.state.animation_type = [:flip, :quint, :flip]
    +** Processing line: ~    # args.state.animation_type = [:smoothest_start]~
    +- Inside source: true
    +*** True Line Result
    +    # args.state.animation_type = [:smoothest_start]
    +** Processing line: ~    # args.state.animation_type = [:smoothest_stop]~
    +- Inside source: true
    +*** True Line Result
    +    # args.state.animation_type = [:smoothest_stop]
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Just draw some random stuff for a few seconds.~
    +** Processing line: ~    # THIS IS WHERE THE MAGIC HAPPENS!~
     - Inside source: true
     *** True Line Result
    -    # Just draw some random stuff for a few seconds.
    -** Processing line: ~    args.state.static_debounce ||= 60 * 2.5~
    +    # THIS IS WHERE THE MAGIC HAPPENS!
    +** Processing line: ~    # Numeric#ease~
     - Inside source: true
     *** True Line Result
    -    args.state.static_debounce ||= 60 * 2.5
    -** Processing line: ~    if args.state.static_debounce > 0~
    +    # Numeric#ease
    +** Processing line: ~    progress = args.state.start_animate_at.ease(args.state.duration, args.state.animation_type)~
     - Inside source: true
     *** True Line Result
    -    if args.state.static_debounce > 0
    -** Processing line: ~      last_frame = args.state.static_debounce == 1~
    +    progress = args.state.start_animate_at.ease(args.state.duration, args.state.animation_type)
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      last_frame = args.state.static_debounce == 1
    -** Processing line: ~      target = last_frame ? args.render_target(:last_frame) : args.outputs~
    +
    +** Processing line: ~    # Numeric#ease needs to called:~
     - Inside source: true
     *** True Line Result
    -      target = last_frame ? args.render_target(:last_frame) : args.outputs
    -** Processing line: ~      draw_scene args, target~
    +    # Numeric#ease needs to called:
    +** Processing line: ~    # 1. On the number that represents the point in time you want to start, and takes two parameters:~
     - Inside source: true
     *** True Line Result
    -      draw_scene args, target
    -** Processing line: ~      args.state.static_debounce -= 1~
    +    # 1. On the number that represents the point in time you want to start, and takes two parameters:
    +** Processing line: ~    #   a. The first parameter is how long the animation should take.~
     - Inside source: true
     *** True Line Result
    -      args.state.static_debounce -= 1
    -** Processing line: ~      return unless last_frame~
    +    #   a. The first parameter is how long the animation should take.
    +** Processing line: ~    #   b. The second parameter represents the functions that need to be called.~
     - Inside source: true
     *** True Line Result
    -      return unless last_frame
    -** Processing line: ~    end~
    +    #   b. The second parameter represents the functions that need to be called.
    +** Processing line: ~    #~
    +- Inside source: true
    +*** True Line Result
    +    #
    +** Processing line: ~    # For example, if I wanted an animate to start 3 seconds in, and last for 10 seconds,~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +    # For example, if I wanted an animate to start 3 seconds in, and last for 10 seconds,
    +** Processing line: ~    # and I want to animation to start fast and end slow, I would do:~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # build up the wipe...~
    +    # and I want to animation to start fast and end slow, I would do:
    +** Processing line: ~    # (60 * 3).ease(60 * 10, :flip, :quint, :flip)~
     - Inside source: true
     *** True Line Result
    -    # build up the wipe...
    +    # (60 * 3).ease(60 * 10, :flip, :quint, :flip)
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # this is the thing we're wiping to.~
    +** Processing line: ~    #        initial value           delta to the final value~
     - Inside source: true
     *** True Line Result
    -    # this is the thing we're wiping to.
    -** Processing line: ~    args.outputs.sprites << [ 0, 0, 1280, 720, 'dragonruby.png' ]~
    +    #        initial value           delta to the final value
    +** Processing line: ~    calc_x = args.state.starting_x + (args.state.target_x - args.state.starting_x) * progress~
     - Inside source: true
     *** True Line Result
    -    args.outputs.sprites << [ 0, 0, 1280, 720, 'dragonruby.png' ]
    -** Processing line: ~~
    +    calc_x = args.state.starting_x + (args.state.target_x - args.state.starting_x) * progress
    +** Processing line: ~    calc_y = args.state.starting_y + (args.state.target_y - args.state.starting_y) * progress~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    return if (args.state.baseyoff > (1280 + 100))  # stop when done sliding~
    +    calc_y = args.state.starting_y + (args.state.target_y - args.state.starting_y) * progress
    +** Processing line: ~    calc_w = args.state.starting_w + (args.state.target_w - args.state.starting_w) * progress~
     - Inside source: true
     *** True Line Result
    -    return if (args.state.baseyoff > (1280 + 100))  # stop when done sliding
    +    calc_w = args.state.starting_w + (args.state.target_w - args.state.starting_w) * progress
    +** Processing line: ~    calc_h = args.state.starting_h + (args.state.target_h - args.state.starting_h) * progress~
    +- Inside source: true
    +*** True Line Result
    +    calc_h = args.state.starting_h + (args.state.target_h - args.state.starting_h) * progress
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    segmentw = 1280 / segments~
    +** Processing line: ~    args.outputs.solids << [calc_x, calc_y, calc_w, calc_h, 0, 0, 0]~
     - Inside source: true
     *** True Line Result
    -    segmentw = 1280 / segments
    +    args.outputs.solids << [calc_x, calc_y, calc_w, calc_h, 0, 0, 0]
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    x = 0~
    +** Processing line: ~    # count down~
     - Inside source: true
     *** True Line Result
    -    x = 0
    -** Processing line: ~    for i in 0..segments do~
    +    # count down
    +** Processing line: ~    count_down = args.state.start_animate_at - args.state.tick_count~
     - Inside source: true
     *** True Line Result
    -    for i in 0..segments do
    -** Processing line: ~      yoffset = 0~
    +    count_down = args.state.start_animate_at - args.state.tick_count
    +** Processing line: ~    if count_down > 0~
     - Inside source: true
     *** True Line Result
    -      yoffset = 0
    -** Processing line: ~      if args.state.yoffsets[i] < args.state.baseyoff~
    +    if count_down > 0
    +** Processing line: ~      args.outputs.labels << [640, 375, "Running: #{args.state.animation_type} in...", 3, 1]~
     - Inside source: true
     *** True Line Result
    -      if args.state.yoffsets[i] < args.state.baseyoff
    -** Processing line: ~        yoffset = args.state.baseyoff - args.state.yoffsets[i]~
    +      args.outputs.labels << [640, 375, "Running: #{args.state.animation_type} in...", 3, 1]
    +** Processing line: ~      args.outputs.labels << [640, 345, "%.2f" % count_down.fdiv(60), 3, 1]~
     - Inside source: true
     *** True Line Result
    -        yoffset = args.state.baseyoff - args.state.yoffsets[i]
    -** Processing line: ~      end~
    +      args.outputs.labels << [640, 345, "%.2f" % count_down.fdiv(60), 3, 1]
    +** Processing line: ~    elsif progress >= 1~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +    elsif progress >= 1
    +** Processing line: ~      args.outputs.labels << [640, 360, "Click screen to reset.", 3, 1]~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      # (720 - yoffset) flips the coordinate system, (- 720) adjusts for the height of the segment.~
    +      args.outputs.labels << [640, 360, "Click screen to reset.", 3, 1]
    +** Processing line: ~      if args.inputs.click~
     - Inside source: true
     *** True Line Result
    -      # (720 - yoffset) flips the coordinate system, (- 720) adjusts for the height of the segment.
    -** Processing line: ~      args.outputs.sprites << [ x, (720 - yoffset) - 720, segmentw, 720, 'last_frame', 0, 255, 255, 255, 255, x, 0, segmentw, 720 ]~
    +      if args.inputs.click
    +** Processing line: ~        $gtk.reset~
     - Inside source: true
     *** True Line Result
    -      args.outputs.sprites << [ x, (720 - yoffset) - 720, segmentw, 720, 'last_frame', 0, 255, 255, 255, 255, x, 0, segmentw, 720 ]
    -** Processing line: ~      x += segmentw~
    +        $gtk.reset
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -      x += segmentw
    +      end
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
         end
    -** Processing line: ~~
    -- Inside source: true
    -*** True Line Result
    -
    -** Processing line: ~    args.state.baseyoff += 4~
    -- Inside source: true
    -*** True Line Result
    -    args.state.baseyoff += 4
    -** Processing line: ~~
    -- Inside source: true
    -*** True Line Result
    -
    -** Processing line: ~    tick_instructions args, "Sample app shows an advanced usage of render_target."~
    -- Inside source: true
    -*** True Line Result
    -    tick_instructions args, "Sample app shows an advanced usage of render_target."
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -45976,34 +54271,34 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def tick_instructions args, text, y = 715~
    +** Processing line: ~  # $gtk.reset~
     - Inside source: true
     *** True Line Result
    -  def tick_instructions args, text, y = 715
    -** Processing line: ~    return if args.state.key_event_occurred~
    +  # $gtk.reset
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    return if args.state.key_event_occurred
    -** Processing line: ~    if args.inputs.mouse.click ||~
    +
    +** Processing line: ~  # you can make own variations of animations using this~
     - Inside source: true
     *** True Line Result
    -    if args.inputs.mouse.click ||
    -** Processing line: ~       args.inputs.keyboard.directional_vector ||~
    +  # you can make own variations of animations using this
    +** Processing line: ~  module Easing~
     - Inside source: true
     *** True Line Result
    -       args.inputs.keyboard.directional_vector ||
    -** Processing line: ~       args.inputs.keyboard.key_down.enter ||~
    +  module Easing
    +** Processing line: ~    # you have access to all the built in functions: identity, flip, quad, cube, quart, quint~
     - Inside source: true
     *** True Line Result
    -       args.inputs.keyboard.key_down.enter ||
    -** Processing line: ~       args.inputs.keyboard.key_down.escape~
    +    # you have access to all the built in functions: identity, flip, quad, cube, quart, quint
    +** Processing line: ~    def self.smoothest_start x~
     - Inside source: true
     *** True Line Result
    -       args.inputs.keyboard.key_down.escape
    -** Processing line: ~      args.state.key_event_occurred = true~
    +    def self.smoothest_start x
    +** Processing line: ~      quad(quint(x))~
     - Inside source: true
     *** True Line Result
    -      args.state.key_event_occurred = true
    +      quad(quint(x))
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -46012,822 +54307,782 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    args.outputs.debug << [0, y - 50, 1280, 60].solid~
    -- Inside source: true
    -*** True Line Result
    -    args.outputs.debug << [0, y - 50, 1280, 60].solid
    -** Processing line: ~    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label~
    +** Processing line: ~    def self.smoothest_stop x~
     - Inside source: true
     *** True Line Result
    -    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label
    -** Processing line: ~    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label~
    +    def self.smoothest_stop x
    +** Processing line: ~      flip(quad(quint(flip(x))))~
     - Inside source: true
     *** True Line Result
    -    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label
    -** Processing line: ~  end~
    +      flip(quad(quint(flip(x))))
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  end
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~#+end_src~
    -- Line was identified as the end of a code block.
    -*** True Line Result
    -#+end_src
    -** Processing line: ~~
    -- End of paragraph detected.
    -*** True Line Result
    -
    -** Processing line: ~*** Advanced Rendering - Render Target Viewports - main.rb~
    -- Header detected.
    -*** True Line Result
    -
    -*** True Line Result
    -*** Advanced Rendering - Render Target Viewports - main.rb
    -** Processing line: ~#+begin_src ruby~
    -- Line was identified as the beginning of a code block.
    -*** True Line Result
    -
    -*** True Line Result
    -#+begin_src ruby
    -** Processing line: ~  # ./samples/07_advanced_rendering/03_render_target_viewports/app/main.rb~
    +** Processing line: ~    # this is the source for the existing easing functions~
     - Inside source: true
     *** True Line Result
    -  # ./samples/07_advanced_rendering/03_render_target_viewports/app/main.rb
    -** Processing line: ~  =begin~
    +    # this is the source for the existing easing functions
    +** Processing line: ~    def self.identity x~
     - Inside source: true
     *** True Line Result
    -  =begin
    -** Processing line: ~~
    +    def self.identity x
    +** Processing line: ~      x~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   APIs listing that haven't been encountered in previous sample apps:~
    +      x
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -   APIs listing that haven't been encountered in previous sample apps:
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~   - args.state.new_entity: Used when we want to create a new object, like a sprite or button.~
    -- Inside source: true
    -*** True Line Result
    -   - args.state.new_entity: Used when we want to create a new object, like a sprite or button.
    -** Processing line: ~     For example, if we want to create a new button, we would declare it as a new entity and~
    +** Processing line: ~    def self.flip x~
     - Inside source: true
     *** True Line Result
    -     For example, if we want to create a new button, we would declare it as a new entity and
    -** Processing line: ~     then define its properties. (Remember, you can use state to define ANY property and it will~
    +    def self.flip x
    +** Processing line: ~      1 - x~
     - Inside source: true
     *** True Line Result
    -     then define its properties. (Remember, you can use state to define ANY property and it will
    -** Processing line: ~     be retained across frames.)~
    +      1 - x
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -     be retained across frames.)
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~     If you have a solar system and you're creating args.state.sun and setting its image path to an~
    +** Processing line: ~    def self.quad x~
     - Inside source: true
     *** True Line Result
    -     If you have a solar system and you're creating args.state.sun and setting its image path to an
    -** Processing line: ~     image in the sprites folder, you would do the following:~
    +    def self.quad x
    +** Processing line: ~      x * x~
     - Inside source: true
     *** True Line Result
    -     image in the sprites folder, you would do the following:
    -** Processing line: ~     (See samples/99_sample_nddnug_workshop for more details.)~
    +      x * x
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -     (See samples/99_sample_nddnug_workshop for more details.)
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~     args.state.sun ||= args.state.new_entity(:sun) do |s|~
    +** Processing line: ~    def self.cube x~
     - Inside source: true
     *** True Line Result
    -     args.state.sun ||= args.state.new_entity(:sun) do |s|
    -** Processing line: ~     s.path = 'sprites/sun.png'~
    +    def self.cube x
    +** Processing line: ~      x * x * x~
     - Inside source: true
     *** True Line Result
    -     s.path = 'sprites/sun.png'
    -** Processing line: ~     end~
    +      x * x * x
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -     end
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~   - String interpolation: Uses #{} syntax; everything between the #{ and the } is evaluated~
    +** Processing line: ~    def self.quart x~
     - Inside source: true
     *** True Line Result
    -   - String interpolation: Uses #{} syntax; everything between the #{ and the } is evaluated
    -** Processing line: ~     as Ruby code, and the placeholder is replaced with its corresponding value or result.~
    +    def self.quart x
    +** Processing line: ~      x * x * x * x * x~
     - Inside source: true
     *** True Line Result
    -     as Ruby code, and the placeholder is replaced with its corresponding value or result.
    +      x * x * x * x * x
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~     For example, if we have a variable~
    +** Processing line: ~    def self.quint x~
     - Inside source: true
     *** True Line Result
    -     For example, if we have a variable
    -** Processing line: ~     name = "Ruby"~
    +    def self.quint x
    +** Processing line: ~      x * x * x * x * x * x~
     - Inside source: true
     *** True Line Result
    -     name = "Ruby"
    -** Processing line: ~     then the line~
    +      x * x * x * x * x * x
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -     then the line
    -** Processing line: ~     puts "How are you, #{name}?"~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -     puts "How are you, #{name}?"
    -** Processing line: ~     would print "How are you, Ruby?" to the console.~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -     would print "How are you, Ruby?" to the console.
    -** Processing line: ~     (Remember, string interpolation only works with double quotes!)~
    -- Inside source: true
    +
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
     *** True Line Result
    -     (Remember, string interpolation only works with double quotes!)
    +#+end_src
     ** Processing line: ~~
    -- Inside source: true
    +- End of paragraph detected.
     *** True Line Result
     
    -** Processing line: ~   - Ternary operator (?): Similar to if statement; first evalulates whether a statement is~
    -- Inside source: true
    +** Processing line: ~*** Tweening Lerping Easing Functions - Cubic Bezier - main.rb~
    +- Header detected.
     *** True Line Result
    -   - Ternary operator (?): Similar to if statement; first evalulates whether a statement is
    -** Processing line: ~     true or false, and then executes a command depending on that result.~
    -- Inside source: true
    +
     *** True Line Result
    -     true or false, and then executes a command depending on that result.
    -** Processing line: ~     For example, if we had a variable~
    -- Inside source: true
    +*** Tweening Lerping Easing Functions - Cubic Bezier - main.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
     *** True Line Result
    -     For example, if we had a variable
    -** Processing line: ~     grade = 75~
    -- Inside source: true
    +
     *** True Line Result
    -     grade = 75
    -** Processing line: ~     and used the ternary operator in the command~
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/08_tweening_lerping_easing_functions/02_cubic_bezier/app/main.rb~
     - Inside source: true
     *** True Line Result
    -     and used the ternary operator in the command
    -** Processing line: ~     pass_or_fail = grade > 65 ? "pass" : "fail"~
    +  # ./samples/08_tweening_lerping_easing_functions/02_cubic_bezier/app/main.rb
    +** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
    -     pass_or_fail = grade > 65 ? "pass" : "fail"
    -** Processing line: ~     then the value of pass_or_fail would be "pass" since grade's value was greater than 65.~
    +  def tick args
    +** Processing line: ~    args.outputs.background_color = [33, 33, 33]~
     - Inside source: true
     *** True Line Result
    -     then the value of pass_or_fail would be "pass" since grade's value was greater than 65.
    -** Processing line: ~~
    +    args.outputs.background_color = [33, 33, 33]
    +** Processing line: ~    args.outputs.lines << bezier(100, 100,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   Reminders:~
    +    args.outputs.lines << bezier(100, 100,
    +** Processing line: ~                                 100, 620,~
     - Inside source: true
     *** True Line Result
    -   Reminders:
    -** Processing line: ~~
    +                                 100, 620,
    +** Processing line: ~                                 1180, 620,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   - args.grid.(left|right|top|bottom): Pixel value for the boundaries of the virtual~
    +                                 1180, 620,
    +** Processing line: ~                                 1180, 100,~
     - Inside source: true
     *** True Line Result
    -   - args.grid.(left|right|top|bottom): Pixel value for the boundaries of the virtual
    -** Processing line: ~     720 p screen (Dragon Ruby Game Toolkits's virtual resolution is always 1280x720).~
    +                                 1180, 100,
    +** Processing line: ~                                 0)~
     - Inside source: true
     *** True Line Result
    -     720 p screen (Dragon Ruby Game Toolkits's virtual resolution is always 1280x720).
    +                                 0)
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~   - Numeric#shift_(left|right|up|down): Shifts the Numeric in the correct direction~
    +** Processing line: ~    args.outputs.lines << bezier(100, 100,~
     - Inside source: true
     *** True Line Result
    -   - Numeric#shift_(left|right|up|down): Shifts the Numeric in the correct direction
    -** Processing line: ~     by adding or subracting.~
    +    args.outputs.lines << bezier(100, 100,
    +** Processing line: ~                                 100, 620,~
     - Inside source: true
     *** True Line Result
    -     by adding or subracting.
    -** Processing line: ~~
    +                                 100, 620,
    +** Processing line: ~                                 1180, 620,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   - ARRAY#inside_rect?: An array with at least two values is considered a point. An array~
    +                                 1180, 620,
    +** Processing line: ~                                 1180, 100,~
     - Inside source: true
     *** True Line Result
    -   - ARRAY#inside_rect?: An array with at least two values is considered a point. An array
    -** Processing line: ~     with at least four values is considered a rect. The inside_rect? function returns true~
    +                                 1180, 100,
    +** Processing line: ~                                 20)~
     - Inside source: true
     *** True Line Result
    -     with at least four values is considered a rect. The inside_rect? function returns true
    -** Processing line: ~     or false depending on if the point is inside the rect.~
    +                                 20)
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -     or false depending on if the point is inside the rect.
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~   - ARRAY#intersect_rect?: Returns true or false depending on if the two rectangles intersect.~
    -- Inside source: true
    -*** True Line Result
    -   - ARRAY#intersect_rect?: Returns true or false depending on if the two rectangles intersect.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~   - args.inputs.mouse.click: This property will be set if the mouse was clicked.~
    +** Processing line: ~  def bezier x1, y1, x2, y2, x3, y3, x4, y4, step~
     - Inside source: true
     *** True Line Result
    -   - args.inputs.mouse.click: This property will be set if the mouse was clicked.
    -** Processing line: ~     For more information about the mouse, go to mygame/documentation/07-mouse.md.~
    +  def bezier x1, y1, x2, y2, x3, y3, x4, y4, step
    +** Processing line: ~    step ||= 0~
     - Inside source: true
     *** True Line Result
    -     For more information about the mouse, go to mygame/documentation/07-mouse.md.
    +    step ||= 0
    +** Processing line: ~    color = [200, 200, 200]~
    +- Inside source: true
    +*** True Line Result
    +    color = [200, 200, 200]
    +** Processing line: ~    points = points_for_bezier [x1, y1], [x2, y2], [x3, y3], [x4, y4], step~
    +- Inside source: true
    +*** True Line Result
    +    points = points_for_bezier [x1, y1], [x2, y2], [x3, y3], [x4, y4], step
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~   - args.inputs.keyboard.key_up.KEY: The value of the properties will be set~
    +** Processing line: ~    points.each_cons(2).map do |p1, p2|~
     - Inside source: true
     *** True Line Result
    -   - args.inputs.keyboard.key_up.KEY: The value of the properties will be set
    -** Processing line: ~     to the frame  that the key_up event occurred (the frame correlates~
    +    points.each_cons(2).map do |p1, p2|
    +** Processing line: ~      [p1, p2, color]~
     - Inside source: true
     *** True Line Result
    -     to the frame  that the key_up event occurred (the frame correlates
    -** Processing line: ~     to args.state.tick_count).~
    +      [p1, p2, color]
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -     to args.state.tick_count).
    -** Processing line: ~     For more information about the keyboard, go to mygame/documentation/06-keyboard.md.~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -     For more information about the keyboard, go to mygame/documentation/06-keyboard.md.
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~   - args.state.labels:~
    -- Inside source: true
    -*** True Line Result
    -   - args.state.labels:
    -** Processing line: ~     The parameters for a label are~
    +** Processing line: ~  def points_for_bezier p1, p2, p3, p4, step~
     - Inside source: true
     *** True Line Result
    -     The parameters for a label are
    -** Processing line: ~     1. the position (x, y)~
    +  def points_for_bezier p1, p2, p3, p4, step
    +** Processing line: ~    points = []~
     - Inside source: true
     *** True Line Result
    -     1. the position (x, y)
    -** Processing line: ~     2. the text~
    +    points = []
    +** Processing line: ~    if step == 0~
     - Inside source: true
     *** True Line Result
    -     2. the text
    -** Processing line: ~     3. the size~
    +    if step == 0
    +** Processing line: ~      [p1, p2, p3, p4]~
     - Inside source: true
     *** True Line Result
    -     3. the size
    -** Processing line: ~     4. the alignment~
    +      [p1, p2, p3, p4]
    +** Processing line: ~    else~
     - Inside source: true
     *** True Line Result
    -     4. the alignment
    -** Processing line: ~     5. the color (red, green, and blue saturations)~
    +    else
    +** Processing line: ~      t_step = 1.fdiv(step + 1)~
     - Inside source: true
     *** True Line Result
    -     5. the color (red, green, and blue saturations)
    -** Processing line: ~     6. the alpha (or transparency)~
    +      t_step = 1.fdiv(step + 1)
    +** Processing line: ~      t = 0~
     - Inside source: true
     *** True Line Result
    -     6. the alpha (or transparency)
    -** Processing line: ~     For more information about labels, go to mygame/documentation/02-labels.md.~
    +      t = 0
    +** Processing line: ~      t += t_step~
     - Inside source: true
     *** True Line Result
    -     For more information about labels, go to mygame/documentation/02-labels.md.
    -** Processing line: ~~
    +      t += t_step
    +** Processing line: ~      points = []~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   - args.state.lines:~
    +      points = []
    +** Processing line: ~      while t < 1~
     - Inside source: true
     *** True Line Result
    -   - args.state.lines:
    -** Processing line: ~     The parameters for a line are~
    +      while t < 1
    +** Processing line: ~        points << [~
     - Inside source: true
     *** True Line Result
    -     The parameters for a line are
    -** Processing line: ~     1. the starting position (x, y)~
    +        points << [
    +** Processing line: ~          b_for_t(p1.x, p2.x, p3.x, p4.x, t),~
     - Inside source: true
     *** True Line Result
    -     1. the starting position (x, y)
    -** Processing line: ~     2. the ending position (x2, y2)~
    +          b_for_t(p1.x, p2.x, p3.x, p4.x, t),
    +** Processing line: ~          b_for_t(p1.y, p2.y, p3.y, p4.y, t),~
     - Inside source: true
     *** True Line Result
    -     2. the ending position (x2, y2)
    -** Processing line: ~     3. the color (red, green, and blue saturations)~
    +          b_for_t(p1.y, p2.y, p3.y, p4.y, t),
    +** Processing line: ~        ]~
     - Inside source: true
     *** True Line Result
    -     3. the color (red, green, and blue saturations)
    -** Processing line: ~     4. the alpha (or transparency)~
    +        ]
    +** Processing line: ~        t += t_step~
     - Inside source: true
     *** True Line Result
    -     4. the alpha (or transparency)
    -** Processing line: ~     For more information about lines, go to mygame/documentation/04-lines.md.~
    +        t += t_step
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -     For more information about lines, go to mygame/documentation/04-lines.md.
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~   - args.state.solids (and args.state.borders):~
    -- Inside source: true
    -*** True Line Result
    -   - args.state.solids (and args.state.borders):
    -** Processing line: ~     The parameters for a solid (or border) are~
    +** Processing line: ~      [~
     - Inside source: true
     *** True Line Result
    -     The parameters for a solid (or border) are
    -** Processing line: ~     1. the position (x, y)~
    +      [
    +** Processing line: ~        p1,~
     - Inside source: true
     *** True Line Result
    -     1. the position (x, y)
    -** Processing line: ~     2. the width (w)~
    +        p1,
    +** Processing line: ~        *points,~
     - Inside source: true
     *** True Line Result
    -     2. the width (w)
    -** Processing line: ~     3. the height (h)~
    +        *points,
    +** Processing line: ~        p4~
     - Inside source: true
     *** True Line Result
    -     3. the height (h)
    -** Processing line: ~     4. the color (r, g, b)~
    +        p4
    +** Processing line: ~      ]~
     - Inside source: true
     *** True Line Result
    -     4. the color (r, g, b)
    -** Processing line: ~     5. the alpha (or transparency)~
    +      ]
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -     5. the alpha (or transparency)
    -** Processing line: ~     For more information about solids and borders, go to mygame/documentation/03-solids-and-borders.md.~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -     For more information about solids and borders, go to mygame/documentation/03-solids-and-borders.md.
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~   - args.state.sprites:~
    +** Processing line: ~  def b_for_t v0, v1, v2, v3, t~
     - Inside source: true
     *** True Line Result
    -   - args.state.sprites:
    -** Processing line: ~     The parameters for a sprite are~
    +  def b_for_t v0, v1, v2, v3, t
    +** Processing line: ~    pow(1 - t, 3) * v0 +~
     - Inside source: true
     *** True Line Result
    -     The parameters for a sprite are
    -** Processing line: ~     1. the position (x, y)~
    +    pow(1 - t, 3) * v0 +
    +** Processing line: ~    3 * pow(1 - t, 2) * t * v1 +~
     - Inside source: true
     *** True Line Result
    -     1. the position (x, y)
    -** Processing line: ~     2. the width (w)~
    +    3 * pow(1 - t, 2) * t * v1 +
    +** Processing line: ~    3 * (1 - t) * pow(t, 2) * v2 +~
     - Inside source: true
     *** True Line Result
    -     2. the width (w)
    -** Processing line: ~     3. the height (h)~
    +    3 * (1 - t) * pow(t, 2) * v2 +
    +** Processing line: ~    pow(t, 3) * v3~
     - Inside source: true
     *** True Line Result
    -     3. the height (h)
    -** Processing line: ~     4. the image path~
    +    pow(t, 3) * v3
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -     4. the image path
    -** Processing line: ~     5. the angle~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -     5. the angle
    -** Processing line: ~     6. the alpha (or transparency)~
    +
    +** Processing line: ~  def pow n, to~
     - Inside source: true
     *** True Line Result
    -     6. the alpha (or transparency)
    -** Processing line: ~     For more information about sprites, go to mygame/documentation/05-sprites.md.~
    +  def pow n, to
    +** Processing line: ~    n ** to~
     - Inside source: true
     *** True Line Result
    -     For more information about sprites, go to mygame/documentation/05-sprites.md.
    -** Processing line: ~  =end~
    +    n ** to
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -  =end
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # This sample app shows different objects that can be used when making games, such as labels,~
    -- Inside source: true
    -*** True Line Result
    -  # This sample app shows different objects that can be used when making games, such as labels,
    -** Processing line: ~  # lines, sprites, solids, buttons, etc. Each demo section shows how these objects can be used.~
    -- Inside source: true
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
     *** True Line Result
    -  # lines, sprites, solids, buttons, etc. Each demo section shows how these objects can be used.
    +#+end_src
     ** Processing line: ~~
    -- Inside source: true
    +- End of paragraph detected.
     *** True Line Result
     
    -** Processing line: ~  # Also note that state.tick_count refers to the passage of time, or current frame.~
    -- Inside source: true
    +** Processing line: ~*** Tweening Lerping Easing Functions - Easing Using Spline - main.rb~
    +- Header detected.
     *** True Line Result
    -  # Also note that state.tick_count refers to the passage of time, or current frame.
    -** Processing line: ~~
    -- Inside source: true
    +
    +*** True Line Result
    +*** Tweening Lerping Easing Functions - Easing Using Spline - main.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
     *** True Line Result
     
    -** Processing line: ~  class TechDemo~
    -- Inside source: true
     *** True Line Result
    -  class TechDemo
    -** Processing line: ~    attr_accessor :inputs, :state, :outputs, :grid, :args~
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/08_tweening_lerping_easing_functions/03_easing_using_spline/app/main.rb~
     - Inside source: true
     *** True Line Result
    -    attr_accessor :inputs, :state, :outputs, :grid, :args
    -** Processing line: ~~
    +  # ./samples/08_tweening_lerping_easing_functions/03_easing_using_spline/app/main.rb
    +** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # Calls all methods necessary for the app to run properly.~
    +  def tick args
    +** Processing line: ~    args.state.duration = 10.seconds~
     - Inside source: true
     *** True Line Result
    -    # Calls all methods necessary for the app to run properly.
    -** Processing line: ~    def tick~
    +    args.state.duration = 10.seconds
    +** Processing line: ~    args.state.spline = [~
     - Inside source: true
     *** True Line Result
    -    def tick
    -** Processing line: ~      labels_tech_demo~
    +    args.state.spline = [
    +** Processing line: ~      [0.0, 0.33, 0.66, 1.0],~
     - Inside source: true
     *** True Line Result
    -      labels_tech_demo
    -** Processing line: ~      lines_tech_demo~
    +      [0.0, 0.33, 0.66, 1.0],
    +** Processing line: ~      [1.0, 1.0,  1.0,  1.0],~
     - Inside source: true
     *** True Line Result
    -      lines_tech_demo
    -** Processing line: ~      solids_tech_demo~
    +      [1.0, 1.0,  1.0,  1.0],
    +** Processing line: ~      [1.0, 0.66, 0.33, 0.0],~
     - Inside source: true
     *** True Line Result
    -      solids_tech_demo
    -** Processing line: ~      borders_tech_demo~
    +      [1.0, 0.66, 0.33, 0.0],
    +** Processing line: ~    ]~
     - Inside source: true
     *** True Line Result
    -      borders_tech_demo
    -** Processing line: ~      sprites_tech_demo~
    +    ]
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      sprites_tech_demo
    -** Processing line: ~      keyboards_tech_demo~
    +
    +** Processing line: ~    args.state.simulation_tick = args.state.tick_count % args.state.duration~
     - Inside source: true
     *** True Line Result
    -      keyboards_tech_demo
    -** Processing line: ~      controller_tech_demo~
    +    args.state.simulation_tick = args.state.tick_count % args.state.duration
    +** Processing line: ~    progress = 0.ease_spline_extended args.state.simulation_tick, args.state.duration, args.state.spline~
     - Inside source: true
     *** True Line Result
    -      controller_tech_demo
    -** Processing line: ~      mouse_tech_demo~
    +    progress = 0.ease_spline_extended args.state.simulation_tick, args.state.duration, args.state.spline
    +** Processing line: ~    args.outputs.borders << args.grid.rect~
     - Inside source: true
     *** True Line Result
    -      mouse_tech_demo
    -** Processing line: ~      point_to_rect_tech_demo~
    +    args.outputs.borders << args.grid.rect
    +** Processing line: ~    args.outputs.solids << [20 + 1240 * progress,~
     - Inside source: true
     *** True Line Result
    -      point_to_rect_tech_demo
    -** Processing line: ~      rect_to_rect_tech_demo~
    +    args.outputs.solids << [20 + 1240 * progress,
    +** Processing line: ~                            20 +  680 * progress,~
     - Inside source: true
     *** True Line Result
    -      rect_to_rect_tech_demo
    -** Processing line: ~      button_tech_demo~
    +                            20 +  680 * progress,
    +** Processing line: ~                            20, 20].anchor_rect(0.5, 0.5)~
     - Inside source: true
     *** True Line Result
    -      button_tech_demo
    -** Processing line: ~      export_game_state_demo~
    +                            20, 20].anchor_rect(0.5, 0.5)
    +** Processing line: ~    args.outputs.labels << [10,~
     - Inside source: true
     *** True Line Result
    -      export_game_state_demo
    -** Processing line: ~      window_state_demo~
    +    args.outputs.labels << [10,
    +** Processing line: ~                            710,~
     - Inside source: true
     *** True Line Result
    -      window_state_demo
    -** Processing line: ~      render_seperators~
    +                            710,
    +** Processing line: ~                            "perc: #{"%.2f" % (args.state.simulation_tick / args.state.duration)} t: #{args.state.simulation_tick}"]~
     - Inside source: true
     *** True Line Result
    -      render_seperators
    -** Processing line: ~    end~
    +                            "perc: #{"%.2f" % (args.state.simulation_tick / args.state.duration)} t: #{args.state.simulation_tick}"]
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    end
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Shows output of different kinds of labels on the screen~
    -- Inside source: true
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
     *** True Line Result
    -    # Shows output of different kinds of labels on the screen
    -** Processing line: ~    def labels_tech_demo~
    -- Inside source: true
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
     *** True Line Result
    -    def labels_tech_demo
    -** Processing line: ~      outputs.labels << [grid.left.shift_right(5), grid.top.shift_down(5), "This is a label located at the top left."]~
    -- Inside source: true
    +
    +** Processing line: ~*** Tweening Lerping Easing Functions - Parametric Enemy Movement - main.rb~
    +- Header detected.
     *** True Line Result
    -      outputs.labels << [grid.left.shift_right(5), grid.top.shift_down(5), "This is a label located at the top left."]
    -** Processing line: ~      outputs.labels << [grid.left.shift_right(5), grid.bottom.shift_up(30), "This is a label located at the bottom left."]~
    -- Inside source: true
    +
     *** True Line Result
    -      outputs.labels << [grid.left.shift_right(5), grid.bottom.shift_up(30), "This is a label located at the bottom left."]
    -** Processing line: ~      outputs.labels << [ 5, 690, "Labels (x, y, text, size, align, r, g, b, a)"]~
    -- Inside source: true
    +*** Tweening Lerping Easing Functions - Parametric Enemy Movement - main.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
     *** True Line Result
    -      outputs.labels << [ 5, 690, "Labels (x, y, text, size, align, r, g, b, a)"]
    -** Processing line: ~      outputs.labels << [ 5, 660, "Smaller label.",  -2]~
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/08_tweening_lerping_easing_functions/04_parametric_enemy_movement/app/main.rb~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << [ 5, 660, "Smaller label.",  -2]
    -** Processing line: ~      outputs.labels << [ 5, 630, "Small label.",    -1]~
    +  # ./samples/08_tweening_lerping_easing_functions/04_parametric_enemy_movement/app/main.rb
    +** Processing line: ~  def new_star args~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << [ 5, 630, "Small label.",    -1]
    -** Processing line: ~      outputs.labels << [ 5, 600, "Medium label.",    0]~
    +  def new_star args
    +** Processing line: ~    { x: 1280.randomize(:ratio),~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << [ 5, 600, "Medium label.",    0]
    -** Processing line: ~      outputs.labels << [ 5, 570, "Large label.",     1]~
    +    { x: 1280.randomize(:ratio),
    +** Processing line: ~      starting_y: 800,~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << [ 5, 570, "Large label.",     1]
    -** Processing line: ~      outputs.labels << [ 5, 540, "Larger label.",    2]~
    +      starting_y: 800,
    +** Processing line: ~      distance_to_travel: 900 + 100.randomize(:ratio),~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << [ 5, 540, "Larger label.",    2]
    -** Processing line: ~      outputs.labels << [300, 660, "Left aligned.",    0, 2]~
    +      distance_to_travel: 900 + 100.randomize(:ratio),
    +** Processing line: ~      duration: 100.randomize(:ratio) + 60,~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << [300, 660, "Left aligned.",    0, 2]
    -** Processing line: ~      outputs.labels << [300, 640, "Center aligned.",  0, 1]~
    +      duration: 100.randomize(:ratio) + 60,
    +** Processing line: ~      created_at: args.state.tick_count,~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << [300, 640, "Center aligned.",  0, 1]
    -** Processing line: ~      outputs.labels << [300, 620, "Right aligned.",   0, 0]~
    +      created_at: args.state.tick_count,
    +** Processing line: ~      max_alpha: 128.randomize(:ratio) + 128,~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << [300, 620, "Right aligned.",   0, 0]
    -** Processing line: ~      outputs.labels << [175, 595, "Red Label.",       0, 0, 255,   0,   0]~
    +      max_alpha: 128.randomize(:ratio) + 128,
    +** Processing line: ~      b: 255.randomize(:ratio),~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << [175, 595, "Red Label.",       0, 0, 255,   0,   0]
    -** Processing line: ~      outputs.labels << [175, 575, "Green Label.",     0, 0,   0, 255,   0]~
    +      b: 255.randomize(:ratio),
    +** Processing line: ~      g: 200.randomize(:ratio),~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << [175, 575, "Green Label.",     0, 0,   0, 255,   0]
    -** Processing line: ~      outputs.labels << [175, 555, "Blue Label.",      0, 0,   0,   0, 255]~
    +      g: 200.randomize(:ratio),
    +** Processing line: ~      w: 1.randomize(:ratio) + 1,~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << [175, 555, "Blue Label.",      0, 0,   0,   0, 255]
    -** Processing line: ~      outputs.labels << [175, 535, "Faded Label.",     0, 0,   0,   0,   0, 128]~
    +      w: 1.randomize(:ratio) + 1,
    +** Processing line: ~      h: 1.randomize(:ratio) + 1 }~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << [175, 535, "Faded Label.",     0, 0,   0,   0,   0, 128]
    -** Processing line: ~    end~
    +      h: 1.randomize(:ratio) + 1 }
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    end
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Shows output of lines on the screen~
    +** Processing line: ~  def new_enemy args~
     - Inside source: true
     *** True Line Result
    -    # Shows output of lines on the screen
    -** Processing line: ~    def lines_tech_demo~
    +  def new_enemy args
    +** Processing line: ~    { x: 1280.randomize(:ratio),~
     - Inside source: true
     *** True Line Result
    -    def lines_tech_demo
    -** Processing line: ~      outputs.labels << [5, 500, "Lines (x, y, x2, y2, r, g, b, a)"]~
    +    { x: 1280.randomize(:ratio),
    +** Processing line: ~      starting_y: 800,~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << [5, 500, "Lines (x, y, x2, y2, r, g, b, a)"]
    -** Processing line: ~      outputs.lines  << [5, 450, 100, 450]~
    +      starting_y: 800,
    +** Processing line: ~      distance_to_travel: -900,~
     - Inside source: true
     *** True Line Result
    -      outputs.lines  << [5, 450, 100, 450]
    -** Processing line: ~      outputs.lines  << [5, 430, 300, 430]~
    +      distance_to_travel: -900,
    +** Processing line: ~      duration: 60.randomize(:ratio) + 180,~
     - Inside source: true
     *** True Line Result
    -      outputs.lines  << [5, 430, 300, 430]
    -** Processing line: ~      outputs.lines  << [5, 410, 300, 410, state.tick_count % 255, 0, 0, 255] # red saturation changes~
    +      duration: 60.randomize(:ratio) + 180,
    +** Processing line: ~      created_at: args.state.tick_count,~
     - Inside source: true
     *** True Line Result
    -      outputs.lines  << [5, 410, 300, 410, state.tick_count % 255, 0, 0, 255] # red saturation changes
    -** Processing line: ~      outputs.lines  << [5, 390 - state.tick_count % 25, 300, 390, 0, 0, 0, 255] # y position changes~
    +      created_at: args.state.tick_count,
    +** Processing line: ~      w: 32,~
     - Inside source: true
     *** True Line Result
    -      outputs.lines  << [5, 390 - state.tick_count % 25, 300, 390, 0, 0, 0, 255] # y position changes
    -** Processing line: ~      outputs.lines  << [5 + state.tick_count % 200, 360, 300, 360, 0, 0, 0, 255] # x position changes~
    +      w: 32,
    +** Processing line: ~      h: 32,~
     - Inside source: true
     *** True Line Result
    -      outputs.lines  << [5 + state.tick_count % 200, 360, 300, 360, 0, 0, 0, 255] # x position changes
    -** Processing line: ~    end~
    +      h: 32,
    +** Processing line: ~      fire_rate: (30.randomize(:ratio) + (60 - args.state.score)).to_i }~
     - Inside source: true
     *** True Line Result
    -    end
    +      fire_rate: (30.randomize(:ratio) + (60 - args.state.score)).to_i }
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Shows output of different kinds of solids on the screen~
    +** Processing line: ~  def new_bullet args, starting_x, starting_y, enemy_speed~
     - Inside source: true
     *** True Line Result
    -    # Shows output of different kinds of solids on the screen
    -** Processing line: ~    def solids_tech_demo~
    +  def new_bullet args, starting_x, starting_y, enemy_speed
    +** Processing line: ~    { x: starting_x,~
     - Inside source: true
     *** True Line Result
    -    def solids_tech_demo
    -** Processing line: ~      outputs.labels << [  5, 350, "Solids (x, y, w, h, r, g, b, a)"]~
    +    { x: starting_x,
    +** Processing line: ~      starting_y: starting_y,~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << [  5, 350, "Solids (x, y, w, h, r, g, b, a)"]
    -** Processing line: ~      outputs.solids << [ 10, 270, 50, 50]~
    +      starting_y: starting_y,
    +** Processing line: ~      distance_to_travel: -900,~
     - Inside source: true
     *** True Line Result
    -      outputs.solids << [ 10, 270, 50, 50]
    -** Processing line: ~      outputs.solids << [ 70, 270, 50, 50, 0, 0, 0]~
    +      distance_to_travel: -900,
    +** Processing line: ~      created_at: args.state.tick_count,~
     - Inside source: true
     *** True Line Result
    -      outputs.solids << [ 70, 270, 50, 50, 0, 0, 0]
    -** Processing line: ~      outputs.solids << [130, 270, 50, 50, 255, 0, 0]~
    +      created_at: args.state.tick_count,
    +** Processing line: ~      duration: 900 / (enemy_speed.abs + 2.0 + (5.0 * args.state.score.fdiv(100))).abs,~
     - Inside source: true
     *** True Line Result
    -      outputs.solids << [130, 270, 50, 50, 255, 0, 0]
    -** Processing line: ~      outputs.solids << [190, 270, 50, 50, 255, 0, 0, 128]~
    +      duration: 900 / (enemy_speed.abs + 2.0 + (5.0 * args.state.score.fdiv(100))).abs,
    +** Processing line: ~      w: 5,~
     - Inside source: true
     *** True Line Result
    -      outputs.solids << [190, 270, 50, 50, 255, 0, 0, 128]
    -** Processing line: ~      outputs.solids << [250, 270, 50, 50, 0, 0, 0, 128 + state.tick_count % 128] # transparency changes~
    +      w: 5,
    +** Processing line: ~      h: 5 }~
     - Inside source: true
     *** True Line Result
    -      outputs.solids << [250, 270, 50, 50, 0, 0, 0, 128 + state.tick_count % 128] # transparency changes
    -** Processing line: ~    end~
    +      h: 5 }
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    end
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Shows output of different kinds of borders on the screen~
    -- Inside source: true
    -*** True Line Result
    -    # Shows output of different kinds of borders on the screen
    -** Processing line: ~    # The parameters for a border are the same as the parameters for a solid~
    +** Processing line: ~  def new_player_bullet args, starting_x, starting_y, player_speed~
     - Inside source: true
     *** True Line Result
    -    # The parameters for a border are the same as the parameters for a solid
    -** Processing line: ~    def borders_tech_demo~
    +  def new_player_bullet args, starting_x, starting_y, player_speed
    +** Processing line: ~    { x: starting_x,~
     - Inside source: true
     *** True Line Result
    -    def borders_tech_demo
    -** Processing line: ~      outputs.labels <<  [  5, 260, "Borders (x, y, w, h, r, g, b, a)"]~
    +    { x: starting_x,
    +** Processing line: ~      starting_y: starting_y,~
     - Inside source: true
     *** True Line Result
    -      outputs.labels <<  [  5, 260, "Borders (x, y, w, h, r, g, b, a)"]
    -** Processing line: ~      outputs.borders << [ 10, 180, 50, 50]~
    +      starting_y: starting_y,
    +** Processing line: ~      distance_to_travel: 900,~
     - Inside source: true
     *** True Line Result
    -      outputs.borders << [ 10, 180, 50, 50]
    -** Processing line: ~      outputs.borders << [ 70, 180, 50, 50, 0, 0, 0]~
    +      distance_to_travel: 900,
    +** Processing line: ~      created_at: args.state.tick_count,~
     - Inside source: true
     *** True Line Result
    -      outputs.borders << [ 70, 180, 50, 50, 0, 0, 0]
    -** Processing line: ~      outputs.borders << [130, 180, 50, 50, 255, 0, 0]~
    +      created_at: args.state.tick_count,
    +** Processing line: ~      duration: 900 / (player_speed + 2.0),~
     - Inside source: true
     *** True Line Result
    -      outputs.borders << [130, 180, 50, 50, 255, 0, 0]
    -** Processing line: ~      outputs.borders << [190, 180, 50, 50, 255, 0, 0, 128]~
    +      duration: 900 / (player_speed + 2.0),
    +** Processing line: ~      w: 5,~
     - Inside source: true
     *** True Line Result
    -      outputs.borders << [190, 180, 50, 50, 255, 0, 0, 128]
    -** Processing line: ~      outputs.borders << [250, 180, 50, 50, 0, 0, 0, 128 + state.tick_count % 128] # transparency changes~
    +      w: 5,
    +** Processing line: ~      h: 5 }~
     - Inside source: true
     *** True Line Result
    -      outputs.borders << [250, 180, 50, 50, 0, 0, 0, 128 + state.tick_count % 128] # transparency changes
    -** Processing line: ~    end~
    +      h: 5 }
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    end
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Shows output of different kinds of sprites on the screen~
    -- Inside source: true
    -*** True Line Result
    -    # Shows output of different kinds of sprites on the screen
    -** Processing line: ~    def sprites_tech_demo~
    +** Processing line: ~  def defaults args~
     - Inside source: true
     *** True Line Result
    -    def sprites_tech_demo
    -** Processing line: ~      outputs.labels <<  [   5, 170, "Sprites (x, y, w, h, path, angle, a)"]~
    +  def defaults args
    +** Processing line: ~    args.outputs.background_color  = [0, 0, 0]~
     - Inside source: true
     *** True Line Result
    -      outputs.labels <<  [   5, 170, "Sprites (x, y, w, h, path, angle, a)"]
    -** Processing line: ~      outputs.sprites << [  10, 40, 128, 101, 'dragonruby.png']~
    +    args.outputs.background_color  = [0, 0, 0]
    +** Processing line: ~    args.state.score             ||= 0~
     - Inside source: true
     *** True Line Result
    -      outputs.sprites << [  10, 40, 128, 101, 'dragonruby.png']
    -** Processing line: ~      outputs.sprites << [ 150, 40, 128, 101, 'dragonruby.png', state.tick_count % 360] # angle changes~
    +    args.state.score             ||= 0
    +** Processing line: ~    args.state.stars             ||= []~
     - Inside source: true
     *** True Line Result
    -      outputs.sprites << [ 150, 40, 128, 101, 'dragonruby.png', state.tick_count % 360] # angle changes
    -** Processing line: ~      outputs.sprites << [ 300, 40, 128, 101, 'dragonruby.png', 0, state.tick_count % 255] # transparency changes~
    +    args.state.stars             ||= []
    +** Processing line: ~    args.state.enemies           ||= []~
     - Inside source: true
     *** True Line Result
    -      outputs.sprites << [ 300, 40, 128, 101, 'dragonruby.png', 0, state.tick_count % 255] # transparency changes
    -** Processing line: ~    end~
    +    args.state.enemies           ||= []
    +** Processing line: ~    args.state.bullets           ||= []~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +    args.state.bullets           ||= []
    +** Processing line: ~    args.state.player_bullets    ||= []~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # Holds size, alignment, color (black), and alpha (transparency) parameters~
    +    args.state.player_bullets    ||= []
    +** Processing line: ~    args.state.max_stars           = 50~
     - Inside source: true
     *** True Line Result
    -    # Holds size, alignment, color (black), and alpha (transparency) parameters
    -** Processing line: ~    # Using small_font as a parameter accounts for all remaining parameters~
    +    args.state.max_stars           = 50
    +** Processing line: ~    args.state.max_enemies         = 10~
     - Inside source: true
     *** True Line Result
    -    # Using small_font as a parameter accounts for all remaining parameters
    -** Processing line: ~    # so they don't have to be repeatedly typed~
    +    args.state.max_enemies         = 10
    +** Processing line: ~    args.state.player.x          ||= 640~
     - Inside source: true
     *** True Line Result
    -    # so they don't have to be repeatedly typed
    -** Processing line: ~    def small_font~
    +    args.state.player.x          ||= 640
    +** Processing line: ~    args.state.player.y          ||= 100~
     - Inside source: true
     *** True Line Result
    -    def small_font
    -** Processing line: ~      [-2, 0, 0, 0, 0, 255]~
    +    args.state.player.y          ||= 100
    +** Processing line: ~    args.state.player.w          ||= 32~
     - Inside source: true
     *** True Line Result
    -      [-2, 0, 0, 0, 0, 255]
    -** Processing line: ~    end~
    +    args.state.player.w          ||= 32
    +** Processing line: ~    args.state.player.h          ||= 32~
     - Inside source: true
     *** True Line Result
    -    end
    +    args.state.player.h          ||= 32
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Sets position of each row~
    +** Processing line: ~    if args.state.tick_count == 0~
     - Inside source: true
     *** True Line Result
    -    # Sets position of each row
    -** Processing line: ~    # Converts given row value to pixels that DragonRuby understands~
    +    if args.state.tick_count == 0
    +** Processing line: ~      args.state.stars.clear~
     - Inside source: true
     *** True Line Result
    -    # Converts given row value to pixels that DragonRuby understands
    -** Processing line: ~    def row_to_px row_number~
    +      args.state.stars.clear
    +** Processing line: ~      args.state.max_stars.times do~
     - Inside source: true
     *** True Line Result
    -    def row_to_px row_number
    -** Processing line: ~~
    +      args.state.max_stars.times do
    +** Processing line: ~        s = new_star args~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      # Row 0 starts 5 units below the top of the grid.~
    +        s = new_star args
    +** Processing line: ~        s[:created_at] += s[:duration].randomize(:ratio)~
     - Inside source: true
     *** True Line Result
    -      # Row 0 starts 5 units below the top of the grid.
    -** Processing line: ~      # Each row afterward is 20 units lower.~
    +        s[:created_at] += s[:duration].randomize(:ratio)
    +** Processing line: ~        args.state.stars << s~
     - Inside source: true
     *** True Line Result
    -      # Each row afterward is 20 units lower.
    -** Processing line: ~      grid.top.shift_down(5).shift_down(20 * row_number)~
    +        args.state.stars << s
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -      grid.top.shift_down(5).shift_down(20 * row_number)
    +      end
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -46836,118 +55091,66 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Uses labels to output current game time (passage of time), and whether or not "h" was pressed~
    -- Inside source: true
    -*** True Line Result
    -    # Uses labels to output current game time (passage of time), and whether or not "h" was pressed
    -** Processing line: ~    # If "h" is pressed, the frame is output when the key_up event occurred~
    -- Inside source: true
    -*** True Line Result
    -    # If "h" is pressed, the frame is output when the key_up event occurred
    -** Processing line: ~    def keyboards_tech_demo~
    -- Inside source: true
    -*** True Line Result
    -    def keyboards_tech_demo
    -** Processing line: ~      outputs.labels << [460, row_to_px(0), "Current game time: #{state.tick_count}", small_font]~
    +** Processing line: ~    if args.state.tick_count == 0~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << [460, row_to_px(0), "Current game time: #{state.tick_count}", small_font]
    -** Processing line: ~      outputs.labels << [460, row_to_px(2), "Keyboard input: inputs.keyboard.key_up.h", small_font]~
    +    if args.state.tick_count == 0
    +** Processing line: ~      args.state.enemies.clear~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << [460, row_to_px(2), "Keyboard input: inputs.keyboard.key_up.h", small_font]
    -** Processing line: ~      outputs.labels << [460, row_to_px(3), "Press \"h\" on the keyboard.", small_font]~
    +      args.state.enemies.clear
    +** Processing line: ~      args.state.max_enemies.times do~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << [460, row_to_px(3), "Press \"h\" on the keyboard.", small_font]
    -** Processing line: ~~
    +      args.state.max_enemies.times do
    +** Processing line: ~        s = new_enemy args~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      if inputs.keyboard.key_up.h # if "h" key_up event occurs~
    +        s = new_enemy args
    +** Processing line: ~        s[:created_at] += s[:duration].randomize(:ratio)~
     - Inside source: true
     *** True Line Result
    -      if inputs.keyboard.key_up.h # if "h" key_up event occurs
    -** Processing line: ~        state.h_pressed_at = state.tick_count # frame it occurred is stored~
    +        s[:created_at] += s[:duration].randomize(:ratio)
    +** Processing line: ~        args.state.enemies << s~
     - Inside source: true
     *** True Line Result
    -        state.h_pressed_at = state.tick_count # frame it occurred is stored
    +        args.state.enemies << s
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
           end
    -** Processing line: ~~
    -- Inside source: true
    -*** True Line Result
    -
    -** Processing line: ~      # h_pressed_at is initially set to false, and changes once the user presses the "h" key.~
    -- Inside source: true
    -*** True Line Result
    -      # h_pressed_at is initially set to false, and changes once the user presses the "h" key.
    -** Processing line: ~      state.h_pressed_at ||= false~
    -- Inside source: true
    -*** True Line Result
    -      state.h_pressed_at ||= false
    -** Processing line: ~~
    -- Inside source: true
    -*** True Line Result
    -
    -** Processing line: ~      if state.h_pressed_at # if h is pressed (pressed_at has a frame number and is no longer false)~
    -- Inside source: true
    -*** True Line Result
    -      if state.h_pressed_at # if h is pressed (pressed_at has a frame number and is no longer false)
    -** Processing line: ~        outputs.labels << [460, row_to_px(4), "\"h\" was pressed at time: #{state.h_pressed_at}", small_font]~
    -- Inside source: true
    -*** True Line Result
    -        outputs.labels << [460, row_to_px(4), "\"h\" was pressed at time: #{state.h_pressed_at}", small_font]
    -** Processing line: ~      else # otherwise, label says "h" was never pressed~
    -- Inside source: true
    -*** True Line Result
    -      else # otherwise, label says "h" was never pressed
    -** Processing line: ~        outputs.labels << [460, row_to_px(4), "\"h\" has never been pressed.", small_font]~
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -        outputs.labels << [460, row_to_px(4), "\"h\" has never been pressed.", small_font]
    -** Processing line: ~      end~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -      end
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      # border around keyboard input demo section~
    -- Inside source: true
    -*** True Line Result
    -      # border around keyboard input demo section
    -** Processing line: ~      outputs.borders << [455, row_to_px(5), 360, row_to_px(2).shift_up(5) - row_to_px(5)]~
    -- Inside source: true
    -*** True Line Result
    -      outputs.borders << [455, row_to_px(5), 360, row_to_px(2).shift_up(5) - row_to_px(5)]
    -** Processing line: ~    end~
    -- Inside source: true
    -*** True Line Result
    -    end
    -** Processing line: ~~
    +** Processing line: ~  def input args~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # Sets definition for a small label~
    +  def input args
    +** Processing line: ~    if args.inputs.keyboard.left~
     - Inside source: true
     *** True Line Result
    -    # Sets definition for a small label
    -** Processing line: ~    # Makes it easier to position labels in respect to the position of other labels~
    +    if args.inputs.keyboard.left
    +** Processing line: ~      args.state.player.x -= 5~
     - Inside source: true
     *** True Line Result
    -    # Makes it easier to position labels in respect to the position of other labels
    -** Processing line: ~    def small_label x, row, message~
    +      args.state.player.x -= 5
    +** Processing line: ~    elsif args.inputs.keyboard.right~
     - Inside source: true
     *** True Line Result
    -    def small_label x, row, message
    -** Processing line: ~      [x, row_to_px(row), message, small_font]~
    +    elsif args.inputs.keyboard.right
    +** Processing line: ~      args.state.player.x += 5~
     - Inside source: true
     *** True Line Result
    -      [x, row_to_px(row), message, small_font]
    +      args.state.player.x += 5
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -46956,178 +55159,162 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Uses small labels to show whether the "a" button on the controller is down, held, or up.~
    -- Inside source: true
    -*** True Line Result
    -    # Uses small labels to show whether the "a" button on the controller is down, held, or up.
    -** Processing line: ~    # y value of each small label is set by calling the row_to_px method~
    -- Inside source: true
    -*** True Line Result
    -    # y value of each small label is set by calling the row_to_px method
    -** Processing line: ~    def controller_tech_demo~
    -- Inside source: true
    -*** True Line Result
    -    def controller_tech_demo
    -** Processing line: ~      x = 460~
    -- Inside source: true
    -*** True Line Result
    -      x = 460
    -** Processing line: ~      outputs.labels << small_label(x, 6, "Controller one input: inputs.controller_one")~
    +** Processing line: ~    if args.inputs.keyboard.up~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << small_label(x, 6, "Controller one input: inputs.controller_one")
    -** Processing line: ~      outputs.labels << small_label(x, 7, "Current state of the \"a\" button.")~
    +    if args.inputs.keyboard.up
    +** Processing line: ~      args.state.player.y += 5~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << small_label(x, 7, "Current state of the \"a\" button.")
    -** Processing line: ~      outputs.labels << small_label(x, 8, "Check console window for more info.")~
    +      args.state.player.y += 5
    +** Processing line: ~    elsif args.inputs.keyboard.down~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << small_label(x, 8, "Check console window for more info.")
    -** Processing line: ~~
    +    elsif args.inputs.keyboard.down
    +** Processing line: ~      args.state.player.y -= 5~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      if inputs.controller_one.key_down.a # if "a" is in "down" state~
    +      args.state.player.y -= 5
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      if inputs.controller_one.key_down.a # if "a" is in "down" state
    -** Processing line: ~        outputs.labels << small_label(x, 9, "\"a\" button down: #{inputs.controller_one.key_down.a}")~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        outputs.labels << small_label(x, 9, "\"a\" button down: #{inputs.controller_one.key_down.a}")
    -** Processing line: ~        puts "\"a\" button down at #{inputs.controller_one.key_down.a}" # prints frame the event occurred~
    +
    +** Processing line: ~    if args.inputs.keyboard.key_down.space~
     - Inside source: true
     *** True Line Result
    -        puts "\"a\" button down at #{inputs.controller_one.key_down.a}" # prints frame the event occurred
    -** Processing line: ~      elsif inputs.controller_one.key_held.a # if "a" is held down~
    +    if args.inputs.keyboard.key_down.space
    +** Processing line: ~      args.state.player_bullets << new_player_bullet(args,~
     - Inside source: true
     *** True Line Result
    -      elsif inputs.controller_one.key_held.a # if "a" is held down
    -** Processing line: ~        outputs.labels << small_label(x, 9, "\"a\" button held: #{inputs.controller_one.key_held.a}")~
    +      args.state.player_bullets << new_player_bullet(args,
    +** Processing line: ~                                                     args.state.player.x + args.state.player.w.half,~
     - Inside source: true
     *** True Line Result
    -        outputs.labels << small_label(x, 9, "\"a\" button held: #{inputs.controller_one.key_held.a}")
    -** Processing line: ~      elsif inputs.controller_one.key_up.a # if "a" is in up state~
    +                                                     args.state.player.x + args.state.player.w.half,
    +** Processing line: ~                                                     args.state.player.y + args.state.player.h, 5)~
     - Inside source: true
     *** True Line Result
    -      elsif inputs.controller_one.key_up.a # if "a" is in up state
    -** Processing line: ~        outputs.labels << small_label(x, 9, "\"a\" button up: #{inputs.controller_one.key_up.a}")~
    +                                                     args.state.player.y + args.state.player.h, 5)
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -        outputs.labels << small_label(x, 9, "\"a\" button up: #{inputs.controller_one.key_up.a}")
    -** Processing line: ~        puts "\"a\" key up at #{inputs.controller_one.key_up.a}"~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        puts "\"a\" key up at #{inputs.controller_one.key_up.a}"
    -** Processing line: ~      else # if no event has occurred~
    +
    +** Processing line: ~    args.state.player.y = args.state.player.y.greater(0).lesser(720 - args.state.player.w)~
     - Inside source: true
     *** True Line Result
    -      else # if no event has occurred
    -** Processing line: ~        outputs.labels << small_label(x, 9, "\"a\" button state is nil.")~
    +    args.state.player.y = args.state.player.y.greater(0).lesser(720 - args.state.player.w)
    +** Processing line: ~    args.state.player.x = args.state.player.x.greater(0).lesser(1280 - args.state.player.h)~
     - Inside source: true
     *** True Line Result
    -        outputs.labels << small_label(x, 9, "\"a\" button state is nil.")
    -** Processing line: ~      end~
    +    args.state.player.x = args.state.player.x.greater(0).lesser(1280 - args.state.player.h)
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -      end
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      # border around controller input demo section~
    +** Processing line: ~  def completed? entity~
     - Inside source: true
     *** True Line Result
    -      # border around controller input demo section
    -** Processing line: ~      outputs.borders << [455, row_to_px(10), 360, row_to_px(6).shift_up(5) - row_to_px(10)]~
    +  def completed? entity
    +** Processing line: ~    (entity[:created_at] + entity[:duration]).elapsed_time > 0~
     - Inside source: true
     *** True Line Result
    -      outputs.borders << [455, row_to_px(10), 360, row_to_px(6).shift_up(5) - row_to_px(10)]
    -** Processing line: ~    end~
    +    (entity[:created_at] + entity[:duration]).elapsed_time > 0
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    end
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Outputs when the mouse was clicked, as well as the coordinates on the screen~
    +** Processing line: ~  def calc_stars args~
     - Inside source: true
     *** True Line Result
    -    # Outputs when the mouse was clicked, as well as the coordinates on the screen
    -** Processing line: ~    # of where the click occurred~
    +  def calc_stars args
    +** Processing line: ~    if (stars_to_add = args.state.max_stars - args.state.stars.length) > 0~
     - Inside source: true
     *** True Line Result
    -    # of where the click occurred
    -** Processing line: ~    def mouse_tech_demo~
    +    if (stars_to_add = args.state.max_stars - args.state.stars.length) > 0
    +** Processing line: ~      stars_to_add.times { args.state.stars << new_star(args) }~
     - Inside source: true
     *** True Line Result
    -    def mouse_tech_demo
    -** Processing line: ~      x = 460~
    +      stars_to_add.times { args.state.stars << new_star(args) }
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      x = 460
    -** Processing line: ~~
    +    end
    +** Processing line: ~    args.state.stars = args.state.stars.reject { |s| completed? s }~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      outputs.labels << small_label(x, 11, "Mouse input: inputs.mouse")~
    +    args.state.stars = args.state.stars.reject { |s| completed? s }
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << small_label(x, 11, "Mouse input: inputs.mouse")
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      if inputs.mouse.click # if click has a value and is not nil~
    +** Processing line: ~  def move_enemies args~
     - Inside source: true
     *** True Line Result
    -      if inputs.mouse.click # if click has a value and is not nil
    -** Processing line: ~        state.last_mouse_click = inputs.mouse.click # coordinates of click are stored~
    +  def move_enemies args
    +** Processing line: ~    if (enemies_to_add = args.state.max_enemies - args.state.enemies.length) > 0~
     - Inside source: true
     *** True Line Result
    -        state.last_mouse_click = inputs.mouse.click # coordinates of click are stored
    -** Processing line: ~      end~
    +    if (enemies_to_add = args.state.max_enemies - args.state.enemies.length) > 0
    +** Processing line: ~      enemies_to_add.times { args.state.enemies << new_enemy(args) }~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +      enemies_to_add.times { args.state.enemies << new_enemy(args) }
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      if state.last_mouse_click # if mouse is clicked (has coordinates as value)~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      if state.last_mouse_click # if mouse is clicked (has coordinates as value)
    -** Processing line: ~        # outputs the time (frame) the click occurred, as well as how many frames have passed since the event~
    +
    +** Processing line: ~    args.state.enemies = args.state.enemies.reject { |s| completed? s }~
     - Inside source: true
     *** True Line Result
    -        # outputs the time (frame) the click occurred, as well as how many frames have passed since the event
    -** Processing line: ~        outputs.labels << small_label(x, 12, "Mouse click happened at: #{state.last_mouse_click.created_at}, #{state.last_mouse_click.created_at_elapsed}")~
    +    args.state.enemies = args.state.enemies.reject { |s| completed? s }
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -        outputs.labels << small_label(x, 12, "Mouse click happened at: #{state.last_mouse_click.created_at}, #{state.last_mouse_click.created_at_elapsed}")
    -** Processing line: ~        # outputs coordinates of click~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        # outputs coordinates of click
    -** Processing line: ~        outputs.labels << small_label(x, 13, "Mouse click location: #{state.last_mouse_click.point.x}, #{state.last_mouse_click.point.y}")~
    +
    +** Processing line: ~  def move_bullets args~
     - Inside source: true
     *** True Line Result
    -        outputs.labels << small_label(x, 13, "Mouse click location: #{state.last_mouse_click.point.x}, #{state.last_mouse_click.point.y}")
    -** Processing line: ~      else # otherwise if the mouse has not been clicked~
    +  def move_bullets args
    +** Processing line: ~    args.state.enemies.each do |e|~
     - Inside source: true
     *** True Line Result
    -      else # otherwise if the mouse has not been clicked
    -** Processing line: ~        outputs.labels << small_label(x, 12, "Mouse click has not occurred yet.")~
    +    args.state.enemies.each do |e|
    +** Processing line: ~      if args.state.tick_count.mod_zero?(e[:fire_rate])~
     - Inside source: true
     *** True Line Result
    -        outputs.labels << small_label(x, 12, "Mouse click has not occurred yet.")
    -** Processing line: ~        outputs.labels << small_label(x, 13, "Please click mouse.")~
    +      if args.state.tick_count.mod_zero?(e[:fire_rate])
    +** Processing line: ~        args.state.bullets << new_bullet(args, e[:x] + e[:w].half, current_y(e), e[:distance_to_travel] / e[:duration])~
     - Inside source: true
     *** True Line Result
    -        outputs.labels << small_label(x, 13, "Please click mouse.")
    +        args.state.bullets << new_bullet(args, e[:x] + e[:w].half, current_y(e), e[:distance_to_travel] / e[:duration])
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    @@ -47140,90 +55327,90 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Outputs whether a mouse click occurred inside or outside of a box~
    +** Processing line: ~    args.state.bullets = args.state.bullets.reject { |s| completed? s }~
     - Inside source: true
     *** True Line Result
    -    # Outputs whether a mouse click occurred inside or outside of a box
    -** Processing line: ~    def point_to_rect_tech_demo~
    +    args.state.bullets = args.state.bullets.reject { |s| completed? s }
    +** Processing line: ~    args.state.player_bullets = args.state.player_bullets.reject { |s| completed? s }~
     - Inside source: true
     *** True Line Result
    -    def point_to_rect_tech_demo
    -** Processing line: ~      x = 460~
    +    args.state.player_bullets = args.state.player_bullets.reject { |s| completed? s }
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -      x = 460
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      outputs.labels << small_label(x, 15, "Click inside the blue box maybe ---->")~
    +** Processing line: ~  def intersect? entity_one, entity_two~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << small_label(x, 15, "Click inside the blue box maybe ---->")
    -** Processing line: ~~
    +  def intersect? entity_one, entity_two
    +** Processing line: ~    entity_one.merge(y: current_y(entity_one))~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      box = [765, 370, 50, 50, 0, 0, 170] # blue box~
    +    entity_one.merge(y: current_y(entity_one))
    +** Processing line: ~              .intersect_rect? entity_two.merge(y: current_y(entity_two))~
     - Inside source: true
     *** True Line Result
    -      box = [765, 370, 50, 50, 0, 0, 170] # blue box
    -** Processing line: ~      outputs.borders << box~
    +              .intersect_rect? entity_two.merge(y: current_y(entity_two))
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -      outputs.borders << box
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      if state.last_mouse_click # if the mouse was clicked~
    +** Processing line: ~  def kill args~
     - Inside source: true
     *** True Line Result
    -      if state.last_mouse_click # if the mouse was clicked
    -** Processing line: ~        if state.last_mouse_click.point.inside_rect? box # if mouse clicked inside box~
    +  def kill args
    +** Processing line: ~    bullets_hitting_enemies = []~
     - Inside source: true
     *** True Line Result
    -        if state.last_mouse_click.point.inside_rect? box # if mouse clicked inside box
    -** Processing line: ~          outputs.labels << small_label(x, 16, "Mouse click happened inside the box.")~
    +    bullets_hitting_enemies = []
    +** Processing line: ~    dead_bullets = []~
     - Inside source: true
     *** True Line Result
    -          outputs.labels << small_label(x, 16, "Mouse click happened inside the box.")
    -** Processing line: ~        else # otherwise, if mouse was clicked outside the box~
    +    dead_bullets = []
    +** Processing line: ~    dead_enemies = []~
     - Inside source: true
     *** True Line Result
    -        else # otherwise, if mouse was clicked outside the box
    -** Processing line: ~          outputs.labels << small_label(x, 16, "Mouse click happened outside the box.")~
    +    dead_enemies = []
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          outputs.labels << small_label(x, 16, "Mouse click happened outside the box.")
    -** Processing line: ~        end~
    +
    +** Processing line: ~    args.state.player_bullets.each do |b|~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~      else # otherwise, if was not clicked at all~
    +    args.state.player_bullets.each do |b|
    +** Processing line: ~      args.state.enemies.each do |e|~
     - Inside source: true
     *** True Line Result
    -      else # otherwise, if was not clicked at all
    -** Processing line: ~        outputs.labels << small_label(x, 16, "Mouse click has not occurred yet.") # output if the mouse was not clicked~
    +      args.state.enemies.each do |e|
    +** Processing line: ~        if intersect? b, e~
     - Inside source: true
     *** True Line Result
    -        outputs.labels << small_label(x, 16, "Mouse click has not occurred yet.") # output if the mouse was not clicked
    -** Processing line: ~      end~
    +        if intersect? b, e
    +** Processing line: ~          dead_bullets << b~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +          dead_bullets << b
    +** Processing line: ~          dead_enemies << e~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      # border around mouse input demo section~
    +          dead_enemies << e
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -      # border around mouse input demo section
    -** Processing line: ~      outputs.borders << [455, row_to_px(14), 360, row_to_px(11).shift_up(5) - row_to_px(14)]~
    +        end
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -      outputs.borders << [455, row_to_px(14), 360, row_to_px(11).shift_up(5) - row_to_px(14)]
    +      end
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -47232,186 +55419,182 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Outputs a red box onto the screen. A mouse click from the user inside of the red box will output~
    -- Inside source: true
    -*** True Line Result
    -    # Outputs a red box onto the screen. A mouse click from the user inside of the red box will output
    -** Processing line: ~    # a smaller box. If two small boxes are inside of the red box, it will be determined whether or not~
    +** Processing line: ~    args.state.score += dead_enemies.length~
     - Inside source: true
     *** True Line Result
    -    # a smaller box. If two small boxes are inside of the red box, it will be determined whether or not
    -** Processing line: ~    # they intersect.~
    +    args.state.score += dead_enemies.length
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    # they intersect.
    -** Processing line: ~    def rect_to_rect_tech_demo~
    +
    +** Processing line: ~    args.state.player_bullets.reject! { |b| dead_bullets.include? b }~
     - Inside source: true
     *** True Line Result
    -    def rect_to_rect_tech_demo
    -** Processing line: ~      x = 460~
    +    args.state.player_bullets.reject! { |b| dead_bullets.include? b }
    +** Processing line: ~    args.state.enemies.reject! { |e| dead_enemies.include? e }~
     - Inside source: true
     *** True Line Result
    -      x = 460
    +    args.state.enemies.reject! { |e| dead_enemies.include? e }
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      outputs.labels << small_label(x, 17.5, "Click inside the red box below.") # label with instructions~
    +** Processing line: ~    dead = args.state.bullets.any? do |b|~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << small_label(x, 17.5, "Click inside the red box below.") # label with instructions
    -** Processing line: ~      red_box = [460, 250, 355, 90, 170, 0, 0] # definition of the red box~
    +    dead = args.state.bullets.any? do |b|
    +** Processing line: ~      [args.state.player.x,~
     - Inside source: true
     *** True Line Result
    -      red_box = [460, 250, 355, 90, 170, 0, 0] # definition of the red box
    -** Processing line: ~      outputs.borders << red_box # output as a border (not filled in)~
    +      [args.state.player.x,
    +** Processing line: ~       args.state.player.y,~
     - Inside source: true
     *** True Line Result
    -      outputs.borders << red_box # output as a border (not filled in)
    -** Processing line: ~~
    +       args.state.player.y,
    +** Processing line: ~       args.state.player.w,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      # If the mouse is clicked inside the red box, two collision boxes are created.~
    +       args.state.player.w,
    +** Processing line: ~       args.state.player.h].intersect_rect? b.merge(y: current_y(b))~
     - Inside source: true
     *** True Line Result
    -      # If the mouse is clicked inside the red box, two collision boxes are created.
    -** Processing line: ~      if inputs.mouse.click~
    +       args.state.player.h].intersect_rect? b.merge(y: current_y(b))
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      if inputs.mouse.click
    -** Processing line: ~        if inputs.mouse.click.point.inside_rect? red_box~
    +    end
    +** Processing line: ~    return unless dead~
     - Inside source: true
     *** True Line Result
    -        if inputs.mouse.click.point.inside_rect? red_box
    -** Processing line: ~          if !state.box_collision_one # if the collision_one box does not yet have a definition~
    +    return unless dead
    +** Processing line: ~    args.gtk.reset~
     - Inside source: true
     *** True Line Result
    -          if !state.box_collision_one # if the collision_one box does not yet have a definition
    -** Processing line: ~            # Subtracts 25 from the x and y positions of the click point in order to make the click point the center of the box.~
    +    args.gtk.reset
    +** Processing line: ~    defaults args~
     - Inside source: true
     *** True Line Result
    -            # Subtracts 25 from the x and y positions of the click point in order to make the click point the center of the box.
    -** Processing line: ~            # You can try deleting the subtraction to see how it impacts the box placement.~
    +    defaults args
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -            # You can try deleting the subtraction to see how it impacts the box placement.
    -** Processing line: ~            state.box_collision_one = [inputs.mouse.click.point.x - 25, inputs.mouse.click.point.y - 25, 50, 50, 180, 0,   0, 180]  # sets definition~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -            state.box_collision_one = [inputs.mouse.click.point.x - 25, inputs.mouse.click.point.y - 25, 50, 50, 180, 0,   0, 180]  # sets definition
    -** Processing line: ~          elsif !state.box_collision_two # if collision_two does not yet have a definition~
    +
    +** Processing line: ~  def calc args~
     - Inside source: true
     *** True Line Result
    -          elsif !state.box_collision_two # if collision_two does not yet have a definition
    -** Processing line: ~            state.box_collision_two = [inputs.mouse.click.point.x - 25, inputs.mouse.click.point.y - 25, 50, 50,   0, 0, 180, 180] # sets definition~
    +  def calc args
    +** Processing line: ~    calc_stars args~
     - Inside source: true
     *** True Line Result
    -            state.box_collision_two = [inputs.mouse.click.point.x - 25, inputs.mouse.click.point.y - 25, 50, 50,   0, 0, 180, 180] # sets definition
    -** Processing line: ~          else~
    +    calc_stars args
    +** Processing line: ~    move_enemies args~
     - Inside source: true
     *** True Line Result
    -          else
    -** Processing line: ~            state.box_collision_one = nil # both boxes are empty~
    +    move_enemies args
    +** Processing line: ~    move_bullets args~
     - Inside source: true
     *** True Line Result
    -            state.box_collision_one = nil # both boxes are empty
    -** Processing line: ~            state.box_collision_two = nil~
    +    move_bullets args
    +** Processing line: ~    kill args~
     - Inside source: true
     *** True Line Result
    -            state.box_collision_two = nil
    -** Processing line: ~          end~
    +    kill args
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -          end
    -** Processing line: ~        end~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~      end~
    +
    +** Processing line: ~  def current_y entity~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +  def current_y entity
    +** Processing line: ~    entity[:starting_y] + (entity[:distance_to_travel] * entity[:created_at].ease(entity[:duration], :identity))~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      # If collision boxes exist, they are output onto screen inside the red box as solids~
    +    entity[:starting_y] + (entity[:distance_to_travel] * entity[:created_at].ease(entity[:duration], :identity))
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -      # If collision boxes exist, they are output onto screen inside the red box as solids
    -** Processing line: ~      if state.box_collision_one~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      if state.box_collision_one
    -** Processing line: ~        outputs.solids << state.box_collision_one~
    +
    +** Processing line: ~  def render args~
     - Inside source: true
     *** True Line Result
    -        outputs.solids << state.box_collision_one
    -** Processing line: ~      end~
    +  def render args
    +** Processing line: ~    args.outputs.solids << args.state.stars.map do |s|~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +    args.outputs.solids << args.state.stars.map do |s|
    +** Processing line: ~      [s[:x],~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      if state.box_collision_two~
    +      [s[:x],
    +** Processing line: ~       current_y(s),~
     - Inside source: true
     *** True Line Result
    -      if state.box_collision_two
    -** Processing line: ~        outputs.solids << state.box_collision_two~
    +       current_y(s),
    +** Processing line: ~       s[:w], s[:h], 0, s[:g], s[:b], s[:max_alpha] * s[:created_at].ease(20, :identity)]~
     - Inside source: true
     *** True Line Result
    -        outputs.solids << state.box_collision_two
    -** Processing line: ~      end~
    +       s[:w], s[:h], 0, s[:g], s[:b], s[:max_alpha] * s[:created_at].ease(20, :identity)]
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      end
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      # Outputs whether or not the two collision boxes intersect.~
    +** Processing line: ~    args.outputs.borders << args.state.enemies.map do |s|~
     - Inside source: true
     *** True Line Result
    -      # Outputs whether or not the two collision boxes intersect.
    -** Processing line: ~      if state.box_collision_one && state.box_collision_two # if both collision_boxes are defined (and not nil or empty)~
    +    args.outputs.borders << args.state.enemies.map do |s|
    +** Processing line: ~      [s[:x],~
     - Inside source: true
     *** True Line Result
    -      if state.box_collision_one && state.box_collision_two # if both collision_boxes are defined (and not nil or empty)
    -** Processing line: ~        if state.box_collision_one.intersect_rect? state.box_collision_two # if the two boxes intersect~
    +      [s[:x],
    +** Processing line: ~       current_y(s),~
     - Inside source: true
     *** True Line Result
    -        if state.box_collision_one.intersect_rect? state.box_collision_two # if the two boxes intersect
    -** Processing line: ~          outputs.labels << small_label(x, 23.5, 'The boxes intersect.')~
    +       current_y(s),
    +** Processing line: ~       s[:w], s[:h], 255, 0, 0]~
     - Inside source: true
     *** True Line Result
    -          outputs.labels << small_label(x, 23.5, 'The boxes intersect.')
    -** Processing line: ~        else # otherwise, if the two boxes do not intersect~
    +       s[:w], s[:h], 255, 0, 0]
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -        else # otherwise, if the two boxes do not intersect
    -** Processing line: ~          outputs.labels << small_label(x, 23.5, 'The boxes do not intersect.')~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          outputs.labels << small_label(x, 23.5, 'The boxes do not intersect.')
    -** Processing line: ~        end~
    +
    +** Processing line: ~    args.outputs.borders << args.state.bullets.map do |b|~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~      else~
    +    args.outputs.borders << args.state.bullets.map do |b|
    +** Processing line: ~      [b[:x],~
     - Inside source: true
     *** True Line Result
    -      else
    -** Processing line: ~        outputs.labels << small_label(x, 23.5, '--') # if the two boxes are not defined (are nil or empty), this label is output~
    +      [b[:x],
    +** Processing line: ~       current_y(b),~
     - Inside source: true
     *** True Line Result
    -        outputs.labels << small_label(x, 23.5, '--') # if the two boxes are not defined (are nil or empty), this label is output
    -** Processing line: ~      end~
    +       current_y(b),
    +** Processing line: ~       b[:w], b[:h], 255, 0, 0]~
     - Inside source: true
     *** True Line Result
    -      end
    +       b[:w], b[:h], 255, 0, 0]
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -47420,310 +55603,294 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Creates a button and outputs it onto the screen using labels and borders.~
    +** Processing line: ~    args.outputs.borders << args.state.player_bullets.map do |b|~
     - Inside source: true
     *** True Line Result
    -    # Creates a button and outputs it onto the screen using labels and borders.
    -** Processing line: ~    # If the button is clicked, the color changes to make it look faded.~
    +    args.outputs.borders << args.state.player_bullets.map do |b|
    +** Processing line: ~      [b[:x],~
     - Inside source: true
     *** True Line Result
    -    # If the button is clicked, the color changes to make it look faded.
    -** Processing line: ~    def button_tech_demo~
    +      [b[:x],
    +** Processing line: ~       current_y(b),~
     - Inside source: true
     *** True Line Result
    -    def button_tech_demo
    -** Processing line: ~      x, y, w, h = 460, 160, 300, 50~
    +       current_y(b),
    +** Processing line: ~       b[:w], b[:h], 255, 255, 255]~
     - Inside source: true
     *** True Line Result
    -      x, y, w, h = 460, 160, 300, 50
    -** Processing line: ~      state.button        ||= state.new_entity(:button_with_fade)~
    +       b[:w], b[:h], 255, 255, 255]
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      state.button        ||= state.new_entity(:button_with_fade)
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      # Adds w.half to x and h.half + 10 to y in order to display the text inside the button's borders.~
    +** Processing line: ~    args.borders << [args.state.player.x,~
     - Inside source: true
     *** True Line Result
    -      # Adds w.half to x and h.half + 10 to y in order to display the text inside the button's borders.
    -** Processing line: ~      state.button.label  ||= [x + w.half, y + h.half + 10, "click me and watch me fade", 0, 1]~
    +    args.borders << [args.state.player.x,
    +** Processing line: ~                     args.state.player.y,~
     - Inside source: true
     *** True Line Result
    -      state.button.label  ||= [x + w.half, y + h.half + 10, "click me and watch me fade", 0, 1]
    -** Processing line: ~      state.button.border ||= [x, y, w, h]~
    +                     args.state.player.y,
    +** Processing line: ~                     args.state.player.w,~
     - Inside source: true
     *** True Line Result
    -      state.button.border ||= [x, y, w, h]
    +                     args.state.player.w,
    +** Processing line: ~                     args.state.player.h, 255, 255, 255]~
    +- Inside source: true
    +*** True Line Result
    +                     args.state.player.h, 255, 255, 255]
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      if inputs.mouse.click && inputs.mouse.click.point.inside_rect?(state.button.border) # if mouse is clicked, and clicked inside button's border~
    +** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
    -      if inputs.mouse.click && inputs.mouse.click.point.inside_rect?(state.button.border) # if mouse is clicked, and clicked inside button's border
    -** Processing line: ~        state.button.clicked_at = inputs.mouse.click.created_at # stores the time the click occurred~
    +  def tick args
    +** Processing line: ~    defaults args~
     - Inside source: true
     *** True Line Result
    -        state.button.clicked_at = inputs.mouse.click.created_at # stores the time the click occurred
    -** Processing line: ~      end~
    +    defaults args
    +** Processing line: ~    input args~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +    input args
    +** Processing line: ~    calc args~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      outputs.labels << state.button.label~
    +    calc args
    +** Processing line: ~    render args~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << state.button.label
    -** Processing line: ~      outputs.borders << state.button.border~
    +    render args
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -      outputs.borders << state.button.border
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      if state.button.clicked_at # if button was clicked (variable has a value and is not nil)~
    -- Inside source: true
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
     *** True Line Result
    -      if state.button.clicked_at # if button was clicked (variable has a value and is not nil)
    +#+end_src
     ** Processing line: ~~
    -- Inside source: true
    +- End of paragraph detected.
     *** True Line Result
     
    -** Processing line: ~        # The appearance of the button changes for 0.25 seconds after the time the button is clicked at.~
    -- Inside source: true
    -*** True Line Result
    -        # The appearance of the button changes for 0.25 seconds after the time the button is clicked at.
    -** Processing line: ~        # The color changes (rgb is set to 0, 180, 80) and the transparency gradually changes.~
    -- Inside source: true
    +** Processing line: ~*** Performance - Sprites As Hash - main.rb~
    +- Header detected.
     *** True Line Result
    -        # The color changes (rgb is set to 0, 180, 80) and the transparency gradually changes.
    -** Processing line: ~        # Change 0.25 to 1.25 and notice that the transparency takes longer to return to normal.~
    -- Inside source: true
    +
     *** True Line Result
    -        # Change 0.25 to 1.25 and notice that the transparency takes longer to return to normal.
    -** Processing line: ~        outputs.solids << [x, y, w, h, 0, 180, 80, 255 * state.button.clicked_at.ease(0.25.seconds, :flip)]~
    -- Inside source: true
    +*** Performance - Sprites As Hash - main.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
     *** True Line Result
    -        outputs.solids << [x, y, w, h, 0, 180, 80, 255 * state.button.clicked_at.ease(0.25.seconds, :flip)]
    -** Processing line: ~      end~
    -- Inside source: true
    +
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/09_performance/01_sprites_as_hash/app/main.rb~
     - Inside source: true
     *** True Line Result
    -    end
    +  # ./samples/09_performance/01_sprites_as_hash/app/main.rb
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Creates a new button by declaring it as a new entity, and sets values.~
    -- Inside source: true
    -*** True Line Result
    -    # Creates a new button by declaring it as a new entity, and sets values.
    -** Processing line: ~    def new_button_prefab x, y, message~
    +** Processing line: ~  # Sprites represented as Hashes using the queue ~args.outputs.sprites~~
     - Inside source: true
     *** True Line Result
    -    def new_button_prefab x, y, message
    -** Processing line: ~      w, h = 300, 50~
    +  # Sprites represented as Hashes using the queue ~args.outputs.sprites~
    +** Processing line: ~  # code up, but are the "slowest" to render.~
     - Inside source: true
     *** True Line Result
    -      w, h = 300, 50
    -** Processing line: ~      button        = state.new_entity(:button_with_fade)~
    +  # code up, but are the "slowest" to render.
    +** Processing line: ~  # The reason for this is the access of the key in the Hash and also~
     - Inside source: true
     *** True Line Result
    -      button        = state.new_entity(:button_with_fade)
    -** Processing line: ~      button.label  = [x + w.half, y + h.half + 10, message, 0, 1] # '+ 10' keeps label's text within button's borders~
    +  # The reason for this is the access of the key in the Hash and also
    +** Processing line: ~  # because the data args.outputs.sprites is cleared every tick.~
     - Inside source: true
     *** True Line Result
    -      button.label  = [x + w.half, y + h.half + 10, message, 0, 1] # '+ 10' keeps label's text within button's borders
    -** Processing line: ~      button.border = [x, y, w, h] # sets border definition~
    +  # because the data args.outputs.sprites is cleared every tick.
    +** Processing line: ~  def random_x args~
     - Inside source: true
     *** True Line Result
    -      button.border = [x, y, w, h] # sets border definition
    -** Processing line: ~      button~
    +  def random_x args
    +** Processing line: ~    (args.grid.w.randomize :ratio) * -1~
     - Inside source: true
     *** True Line Result
    -      button
    -** Processing line: ~    end~
    +    (args.grid.w.randomize :ratio) * -1
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    end
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # If the mouse has been clicked and the click's location is inside of the button's border, that means~
    -- Inside source: true
    -*** True Line Result
    -    # If the mouse has been clicked and the click's location is inside of the button's border, that means
    -** Processing line: ~    # that the button has been clicked. This method returns a boolean value.~
    -- Inside source: true
    -*** True Line Result
    -    # that the button has been clicked. This method returns a boolean value.
    -** Processing line: ~    def button_clicked? button~
    +** Processing line: ~  def random_y args~
     - Inside source: true
     *** True Line Result
    -    def button_clicked? button
    -** Processing line: ~      inputs.mouse.click && inputs.mouse.click.point.inside_rect?(button.border)~
    +  def random_y args
    +** Processing line: ~    (args.grid.h.randomize :ratio) * -1~
     - Inside source: true
     *** True Line Result
    -      inputs.mouse.click && inputs.mouse.click.point.inside_rect?(button.border)
    -** Processing line: ~    end~
    +    (args.grid.h.randomize :ratio) * -1
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    end
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Determines if button was clicked, and changes its appearance if it is clicked~
    -- Inside source: true
    -*** True Line Result
    -    # Determines if button was clicked, and changes its appearance if it is clicked
    -** Processing line: ~    def tick_button_prefab button~
    +** Processing line: ~  def random_speed~
     - Inside source: true
     *** True Line Result
    -    def tick_button_prefab button
    -** Processing line: ~      outputs.labels << button.label # outputs button's label and border~
    +  def random_speed
    +** Processing line: ~    1 + (4.randomize :ratio)~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << button.label # outputs button's label and border
    -** Processing line: ~      outputs.borders << button.border~
    +    1 + (4.randomize :ratio)
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -      outputs.borders << button.border
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      if button_clicked? button # if button is clicked~
    -- Inside source: true
    -*** True Line Result
    -      if button_clicked? button # if button is clicked
    -** Processing line: ~        button.clicked_at = inputs.mouse.click.created_at # stores the time that the button was clicked~
    -- Inside source: true
    -*** True Line Result
    -        button.clicked_at = inputs.mouse.click.created_at # stores the time that the button was clicked
    -** Processing line: ~      end~
    +** Processing line: ~  def new_star args~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +  def new_star args
    +** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      if button.clicked_at # if clicked_at has a frame value and is not nil~
    +    {
    +** Processing line: ~      x: (random_x args),~
     - Inside source: true
     *** True Line Result
    -      if button.clicked_at # if clicked_at has a frame value and is not nil
    -** Processing line: ~        # button is output; color changes and transparency changes for 0.25 seconds after click occurs~
    +      x: (random_x args),
    +** Processing line: ~      y: (random_y args),~
     - Inside source: true
     *** True Line Result
    -        # button is output; color changes and transparency changes for 0.25 seconds after click occurs
    -** Processing line: ~        outputs.solids << [button.border.x, button.border.y, button.border.w, button.border.h,~
    +      y: (random_y args),
    +** Processing line: ~      w: 4, h: 4, path: 'sprites/tiny-star.png',~
     - Inside source: true
     *** True Line Result
    -        outputs.solids << [button.border.x, button.border.y, button.border.w, button.border.h,
    -** Processing line: ~                           0, 180, 80, 255 * button.clicked_at.ease(0.25.seconds, :flip)] # transparency changes for 0.25 seconds~
    +      w: 4, h: 4, path: 'sprites/tiny-star.png',
    +** Processing line: ~      s: random_speed~
     - Inside source: true
     *** True Line Result
    -                           0, 180, 80, 255 * button.clicked_at.ease(0.25.seconds, :flip)] # transparency changes for 0.25 seconds
    -** Processing line: ~      end~
    +      s: random_speed
    +** Processing line: ~    }~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +    }
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    end
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Exports the app's game state if the export button is clicked.~
    +** Processing line: ~  def move_star args, star~
     - Inside source: true
     *** True Line Result
    -    # Exports the app's game state if the export button is clicked.
    -** Processing line: ~    def export_game_state_demo~
    +  def move_star args, star
    +** Processing line: ~    star.x += star[:s]~
     - Inside source: true
     *** True Line Result
    -    def export_game_state_demo
    -** Processing line: ~      state.export_game_state_button ||= new_button_prefab(460, 100, "click to export app state")~
    +    star.x += star[:s]
    +** Processing line: ~    star.y += star[:s]~
     - Inside source: true
     *** True Line Result
    -      state.export_game_state_button ||= new_button_prefab(460, 100, "click to export app state")
    -** Processing line: ~      tick_button_prefab(state.export_game_state_button) # calls method to output button~
    +    star.y += star[:s]
    +** Processing line: ~    if star.x > args.grid.w || star.y > args.grid.h~
     - Inside source: true
     *** True Line Result
    -      tick_button_prefab(state.export_game_state_button) # calls method to output button
    -** Processing line: ~      if button_clicked? state.export_game_state_button # if the export button is clicked~
    +    if star.x > args.grid.w || star.y > args.grid.h
    +** Processing line: ~      star.x = (random_x args)~
     - Inside source: true
     *** True Line Result
    -      if button_clicked? state.export_game_state_button # if the export button is clicked
    -** Processing line: ~        args.gtk.export! "Exported from clicking the export button in the tech demo." # the export occurs~
    +      star.x = (random_x args)
    +** Processing line: ~      star.y = (random_y args)~
     - Inside source: true
     *** True Line Result
    -        args.gtk.export! "Exported from clicking the export button in the tech demo." # the export occurs
    -** Processing line: ~      end~
    +      star.y = (random_y args)
    +** Processing line: ~      star[:s] = random_speed~
     - Inside source: true
     *** True Line Result
    -      end
    +      star[:s] = random_speed
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
         end
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # The mouse and keyboard focus are set to "yes" when the Dragonruby window is the active window.~
    +** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
    -    # The mouse and keyboard focus are set to "yes" when the Dragonruby window is the active window.
    -** Processing line: ~    def window_state_demo~
    +  def tick args
    +** Processing line: ~    args.state.star_count ||= 0~
     - Inside source: true
     *** True Line Result
    -    def window_state_demo
    -** Processing line: ~      m = $gtk.args.inputs.mouse.has_focus ? 'Y' : 'N' # ternary operator (similar to if statement)~
    +    args.state.star_count ||= 0
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      m = $gtk.args.inputs.mouse.has_focus ? 'Y' : 'N' # ternary operator (similar to if statement)
    -** Processing line: ~      k = $gtk.args.inputs.keyboard.has_focus ? 'Y' : 'N'~
    +
    +** Processing line: ~    # sets console command when sample app initially opens~
     - Inside source: true
     *** True Line Result
    -      k = $gtk.args.inputs.keyboard.has_focus ? 'Y' : 'N'
    -** Processing line: ~      outputs.labels << [460, 20, "mouse focus: #{m}   keyboard focus: #{k}", small_font]~
    +    # sets console command when sample app initially opens
    +** Processing line: ~    if Kernel.global_tick_count == 0~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << [460, 20, "mouse focus: #{m}   keyboard focus: #{k}", small_font]
    -** Processing line: ~    end~
    +    if Kernel.global_tick_count == 0
    +** Processing line: ~      puts ""~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +      puts ""
    +** Processing line: ~      puts ""~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    #Sets values for the horizontal separator (divides demo sections)~
    +      puts ""
    +** Processing line: ~      puts "========================================================="~
     - Inside source: true
     *** True Line Result
    -    #Sets values for the horizontal separator (divides demo sections)
    -** Processing line: ~    def horizontal_seperator y, x, x2~
    +      puts "========================================================="
    +** Processing line: ~      puts "* INFO: Sprites, Hashes"~
     - Inside source: true
     *** True Line Result
    -    def horizontal_seperator y, x, x2
    -** Processing line: ~      [x, y, x2, y, 150, 150, 150]~
    +      puts "* INFO: Sprites, Hashes"
    +** Processing line: ~      puts "* INFO: Please specify the number of sprites to render."~
     - Inside source: true
     *** True Line Result
    -      [x, y, x2, y, 150, 150, 150]
    +      puts "* INFO: Please specify the number of sprites to render."
    +** Processing line: ~      args.gtk.console.set_command "reset_with count: 100"~
    +- Inside source: true
    +*** True Line Result
    +      args.gtk.console.set_command "reset_with count: 100"
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -47732,18 +55899,18 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    #Sets the values for the vertical separator (divides demo sections)~
    +** Processing line: ~    # init~
     - Inside source: true
     *** True Line Result
    -    #Sets the values for the vertical separator (divides demo sections)
    -** Processing line: ~    def vertical_seperator x, y, y2~
    +    # init
    +** Processing line: ~    if args.state.tick_count == 0~
     - Inside source: true
     *** True Line Result
    -    def vertical_seperator x, y, y2
    -** Processing line: ~      [x, y, x, y2, 150, 150, 150]~
    +    if args.state.tick_count == 0
    +** Processing line: ~      args.state.stars = args.state.star_count.map { |i| new_star args }~
     - Inside source: true
     *** True Line Result
    -      [x, y, x, y2, 150, 150, 150]
    +      args.state.stars = args.state.star_count.map { |i| new_star args }
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -47752,62 +55919,58 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Outputs vertical and horizontal separators onto the screen to separate each demo section.~
    +** Processing line: ~    # update~
     - Inside source: true
     *** True Line Result
    -    # Outputs vertical and horizontal separators onto the screen to separate each demo section.
    -** Processing line: ~    def render_seperators~
    +    # update
    +** Processing line: ~    args.state.stars.each { |s| move_star args, s }~
     - Inside source: true
     *** True Line Result
    -    def render_seperators
    -** Processing line: ~      outputs.lines << horizontal_seperator(505, grid.left, 445)~
    +    args.state.stars.each { |s| move_star args, s }
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      outputs.lines << horizontal_seperator(505, grid.left, 445)
    -** Processing line: ~      outputs.lines << horizontal_seperator(353, grid.left, 445)~
    +
    +** Processing line: ~    # render~
     - Inside source: true
     *** True Line Result
    -      outputs.lines << horizontal_seperator(353, grid.left, 445)
    -** Processing line: ~      outputs.lines << horizontal_seperator(264, grid.left, 445)~
    +    # render
    +** Processing line: ~    args.outputs.sprites << args.state.stars~
     - Inside source: true
     *** True Line Result
    -      outputs.lines << horizontal_seperator(264, grid.left, 445)
    -** Processing line: ~      outputs.lines << horizontal_seperator(174, grid.left, 445)~
    +    args.outputs.sprites << args.state.stars
    +** Processing line: ~    args.outputs.background_color = [0, 0, 0]~
     - Inside source: true
     *** True Line Result
    -      outputs.lines << horizontal_seperator(174, grid.left, 445)
    -** Processing line: ~~
    +    args.outputs.background_color = [0, 0, 0]
    +** Processing line: ~    args.outputs.primitives << args.gtk.current_framerate_primitives~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      outputs.lines << vertical_seperator(445, grid.top, grid.bottom)~
    +    args.outputs.primitives << args.gtk.current_framerate_primitives
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -      outputs.lines << vertical_seperator(445, grid.top, grid.bottom)
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      outputs.lines << horizontal_seperator(690, 445, 820)~
    -- Inside source: true
    -*** True Line Result
    -      outputs.lines << horizontal_seperator(690, 445, 820)
    -** Processing line: ~      outputs.lines << horizontal_seperator(426, 445, 820)~
    +** Processing line: ~  # resets game, and assigns star count given by user~
     - Inside source: true
     *** True Line Result
    -      outputs.lines << horizontal_seperator(426, 445, 820)
    -** Processing line: ~~
    +  # resets game, and assigns star count given by user
    +** Processing line: ~  def reset_with count: count~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      outputs.lines << vertical_seperator(820, grid.top, grid.bottom)~
    +  def reset_with count: count
    +** Processing line: ~    $gtk.reset~
     - Inside source: true
     *** True Line Result
    -      outputs.lines << vertical_seperator(820, grid.top, grid.bottom)
    -** Processing line: ~    end~
    +    $gtk.reset
    +** Processing line: ~    $gtk.args.state.star_count = count~
     - Inside source: true
     *** True Line Result
    -    end
    +    $gtk.args.state.star_count = count
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -47816,58 +55979,70 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  $tech_demo = TechDemo.new~
    -- Inside source: true
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
     *** True Line Result
    -  $tech_demo = TechDemo.new
    +#+end_src
     ** Processing line: ~~
    -- Inside source: true
    +- End of paragraph detected.
     *** True Line Result
     
    -** Processing line: ~  def tick args~
    +** Processing line: ~*** Performance - Sprites As Entities - main.rb~
    +- Header detected.
    +*** True Line Result
    +
    +*** True Line Result
    +*** Performance - Sprites As Entities - main.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/09_performance/02_sprites_as_entities/app/main.rb~
     - Inside source: true
     *** True Line Result
    -  def tick args
    -** Processing line: ~    $tech_demo.inputs = args.inputs~
    +  # ./samples/09_performance/02_sprites_as_entities/app/main.rb
    +** Processing line: ~  # Sprites represented as Entities using the queue ~args.outputs.sprites~~
     - Inside source: true
     *** True Line Result
    -    $tech_demo.inputs = args.inputs
    -** Processing line: ~    $tech_demo.state = args.state~
    +  # Sprites represented as Entities using the queue ~args.outputs.sprites~
    +** Processing line: ~  # yields nicer access apis over Hashes, but require a bit more code upfront.~
     - Inside source: true
     *** True Line Result
    -    $tech_demo.state = args.state
    -** Processing line: ~    $tech_demo.grid = args.grid~
    +  # yields nicer access apis over Hashes, but require a bit more code upfront.
    +** Processing line: ~  # The hash sample has to use star[:s] to get the speed of the star, but~
     - Inside source: true
     *** True Line Result
    -    $tech_demo.grid = args.grid
    -** Processing line: ~    $tech_demo.args = args~
    +  # The hash sample has to use star[:s] to get the speed of the star, but
    +** Processing line: ~  # an entity can use .s instead.~
     - Inside source: true
     *** True Line Result
    -    $tech_demo.args = args
    -** Processing line: ~    $tech_demo.outputs = args.render_target(:mini_map)~
    +  # an entity can use .s instead.
    +** Processing line: ~  def random_x args~
     - Inside source: true
     *** True Line Result
    -    $tech_demo.outputs = args.render_target(:mini_map)
    -** Processing line: ~    $tech_demo.tick~
    +  def random_x args
    +** Processing line: ~    (args.grid.w.randomize :ratio) * -1~
     - Inside source: true
     *** True Line Result
    -    $tech_demo.tick
    -** Processing line: ~    args.outputs.labels  << [830, 715, "Render target:", [-2, 0, 0, 0, 0, 255]]~
    +    (args.grid.w.randomize :ratio) * -1
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    args.outputs.labels  << [830, 715, "Render target:", [-2, 0, 0, 0, 0, 255]]
    -** Processing line: ~    args.outputs.sprites << [0, 0, 1280, 720, :mini_map]~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    args.outputs.sprites << [0, 0, 1280, 720, :mini_map]
    -** Processing line: ~    args.outputs.sprites << [830, 300, 675, 379, :mini_map]~
    +
    +** Processing line: ~  def random_y args~
     - Inside source: true
     *** True Line Result
    -    args.outputs.sprites << [830, 300, 675, 379, :mini_map]
    -** Processing line: ~    tick_instructions args, "Sample app shows all the rendering apis available."~
    +  def random_y args
    +** Processing line: ~    (args.grid.h.randomize :ratio) * -1~
     - Inside source: true
     *** True Line Result
    -    tick_instructions args, "Sample app shows all the rendering apis available."
    +    (args.grid.h.randomize :ratio) * -1
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -47876,54 +56051,54 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def tick_instructions args, text, y = 715~
    +** Processing line: ~  def random_speed~
     - Inside source: true
     *** True Line Result
    -  def tick_instructions args, text, y = 715
    -** Processing line: ~    return if args.state.key_event_occurred~
    +  def random_speed
    +** Processing line: ~    1 + (4.randomize :ratio)~
     - Inside source: true
     *** True Line Result
    -    return if args.state.key_event_occurred
    -** Processing line: ~    if args.inputs.mouse.click ||~
    +    1 + (4.randomize :ratio)
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    if args.inputs.mouse.click ||
    -** Processing line: ~       args.inputs.keyboard.directional_vector ||~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -       args.inputs.keyboard.directional_vector ||
    -** Processing line: ~       args.inputs.keyboard.key_down.enter ||~
    +
    +** Processing line: ~  def new_star args~
     - Inside source: true
     *** True Line Result
    -       args.inputs.keyboard.key_down.enter ||
    -** Processing line: ~       args.inputs.keyboard.key_down.escape~
    +  def new_star args
    +** Processing line: ~    args.state.new_entity :star, {~
     - Inside source: true
     *** True Line Result
    -       args.inputs.keyboard.key_down.escape
    -** Processing line: ~      args.state.key_event_occurred = true~
    +    args.state.new_entity :star, {
    +** Processing line: ~      x: (random_x args),~
     - Inside source: true
     *** True Line Result
    -      args.state.key_event_occurred = true
    -** Processing line: ~    end~
    +      x: (random_x args),
    +** Processing line: ~      y: (random_y args),~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +      y: (random_y args),
    +** Processing line: ~      w: 4, h: 4,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    args.outputs.debug << [0, y - 50, 1280, 60].solid~
    +      w: 4, h: 4,
    +** Processing line: ~      path: 'sprites/tiny-star.png',~
     - Inside source: true
     *** True Line Result
    -    args.outputs.debug << [0, y - 50, 1280, 60].solid
    -** Processing line: ~    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label~
    +      path: 'sprites/tiny-star.png',
    +** Processing line: ~      s: random_speed~
     - Inside source: true
     *** True Line Result
    -    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label
    -** Processing line: ~    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label~
    +      s: random_speed
    +** Processing line: ~    }~
     - Inside source: true
     *** True Line Result
    -    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label
    +    }
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -47932,318 +56107,314 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~#+end_src~
    -- Line was identified as the end of a code block.
    -*** True Line Result
    -#+end_src
    -** Processing line: ~~
    -- End of paragraph detected.
    +** Processing line: ~  def move_star args, star~
    +- Inside source: true
     *** True Line Result
    -
    -** Processing line: ~*** Advanced Rendering - Render Primitive Hierarchies - main.rb~
    -- Header detected.
    +  def move_star args, star
    +** Processing line: ~    star.x += star.s~
    +- Inside source: true
     *** True Line Result
    -
    +    star.x += star.s
    +** Processing line: ~    star.y += star.s~
    +- Inside source: true
     *** True Line Result
    -*** Advanced Rendering - Render Primitive Hierarchies - main.rb
    -** Processing line: ~#+begin_src ruby~
    -- Line was identified as the beginning of a code block.
    +    star.y += star.s
    +** Processing line: ~    if star.x > args.grid.w || star.y > args.grid.h~
    +- Inside source: true
     *** True Line Result
    -
    +    if star.x > args.grid.w || star.y > args.grid.h
    +** Processing line: ~      star.x = (random_x args)~
    +- Inside source: true
     *** True Line Result
    -#+begin_src ruby
    -** Processing line: ~  # ./samples/07_advanced_rendering/04_render_primitive_hierarchies/app/main.rb~
    +      star.x = (random_x args)
    +** Processing line: ~      star.y = (random_y args)~
     - Inside source: true
     *** True Line Result
    -  # ./samples/07_advanced_rendering/04_render_primitive_hierarchies/app/main.rb
    -** Processing line: ~  =begin~
    +      star.y = (random_y args)
    +** Processing line: ~      star.s = random_speed~
     - Inside source: true
     *** True Line Result
    -  =begin
    -** Processing line: ~~
    +      star.s = random_speed
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   APIs listing that haven't been encountered in previous sample apps:~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -   APIs listing that haven't been encountered in previous sample apps:
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~   - Nested array: An array whose individual elements are also arrays; useful for~
    +** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
    -   - Nested array: An array whose individual elements are also arrays; useful for
    -** Processing line: ~     storing groups of similar data.  Also called multidimensional arrays.~
    +  def tick args
    +** Processing line: ~    args.state.star_count ||= 0~
     - Inside source: true
     *** True Line Result
    -     storing groups of similar data.  Also called multidimensional arrays.
    +    args.state.star_count ||= 0
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~     In this sample app, we see nested arrays being used in object definitions.~
    +** Processing line: ~    # sets console command when sample app initially opens~
     - Inside source: true
     *** True Line Result
    -     In this sample app, we see nested arrays being used in object definitions.
    -** Processing line: ~     Notice the parameters for solids, listed below. Parameters 1-3 set the~
    +    # sets console command when sample app initially opens
    +** Processing line: ~    if Kernel.global_tick_count == 0~
     - Inside source: true
     *** True Line Result
    -     Notice the parameters for solids, listed below. Parameters 1-3 set the
    -** Processing line: ~     definition for the rect, and parameter 4 sets the definition of the color.~
    +    if Kernel.global_tick_count == 0
    +** Processing line: ~      puts ""~
     - Inside source: true
     *** True Line Result
    -     definition for the rect, and parameter 4 sets the definition of the color.
    -** Processing line: ~~
    +      puts ""
    +** Processing line: ~      puts ""~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~     Instead of having a solid definition that looks like this,~
    +      puts ""
    +** Processing line: ~      puts "========================================================="~
     - Inside source: true
     *** True Line Result
    -     Instead of having a solid definition that looks like this,
    -** Processing line: ~     [X, Y, W, H, R, G, B]~
    +      puts "========================================================="
    +** Processing line: ~      puts "* INFO: Sprites, Open Entities"~
     - Inside source: true
     *** True Line Result
    -     [X, Y, W, H, R, G, B]
    -** Processing line: ~     we can separate it into two separate array definitions in one, like this~
    +      puts "* INFO: Sprites, Open Entities"
    +** Processing line: ~      puts "* INFO: Please specify the number of sprites to render."~
     - Inside source: true
     *** True Line Result
    -     we can separate it into two separate array definitions in one, like this
    -** Processing line: ~     [[X, Y, W, H], [R, G, B]]~
    +      puts "* INFO: Please specify the number of sprites to render."
    +** Processing line: ~      args.gtk.console.set_command "reset_with count: 100"~
     - Inside source: true
     *** True Line Result
    -     [[X, Y, W, H], [R, G, B]]
    -** Processing line: ~     and both options work fine in defining our solid (or any object).~
    +      args.gtk.console.set_command "reset_with count: 100"
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -     and both options work fine in defining our solid (or any object).
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~   - Collections: Lists of data; useful for organizing large amounts of data.~
    -- Inside source: true
    -*** True Line Result
    -   - Collections: Lists of data; useful for organizing large amounts of data.
    -** Processing line: ~     One element of a collection could be an array (which itself contains many elements).~
    +** Processing line: ~    # init~
     - Inside source: true
     *** True Line Result
    -     One element of a collection could be an array (which itself contains many elements).
    -** Processing line: ~     For example, a collection that stores two solid objects would look like this:~
    +    # init
    +** Processing line: ~    if args.state.tick_count == 0~
     - Inside source: true
     *** True Line Result
    -     For example, a collection that stores two solid objects would look like this:
    -** Processing line: ~     [~
    +    if args.state.tick_count == 0
    +** Processing line: ~      args.state.stars = args.state.star_count.map { |i| new_star args }~
     - Inside source: true
     *** True Line Result
    -     [
    -** Processing line: ~      [100, 100, 50, 50, 0, 0, 0],~
    +      args.state.stars = args.state.star_count.map { |i| new_star args }
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      [100, 100, 50, 50, 0, 0, 0],
    -** Processing line: ~      [100, 150, 50, 50, 255, 255, 255]~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      [100, 150, 50, 50, 255, 255, 255]
    -** Processing line: ~     ]~
    +
    +** Processing line: ~    # update~
     - Inside source: true
     *** True Line Result
    -     ]
    -** Processing line: ~     If this collection was added to args.outputs.solids, two solids would be output~
    +    # update
    +** Processing line: ~    args.state.stars.each { |s| move_star args, s }~
     - Inside source: true
     *** True Line Result
    -     If this collection was added to args.outputs.solids, two solids would be output
    -** Processing line: ~     next to each other, one black and one white.~
    +    args.state.stars.each { |s| move_star args, s }
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -     next to each other, one black and one white.
    -** Processing line: ~     Nested arrays can be used in collections, as you will see in this sample app.~
    +
    +** Processing line: ~    # render~
     - Inside source: true
     *** True Line Result
    -     Nested arrays can be used in collections, as you will see in this sample app.
    -** Processing line: ~~
    +    # render
    +** Processing line: ~    args.outputs.sprites << args.state.stars~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   Reminders:~
    +    args.outputs.sprites << args.state.stars
    +** Processing line: ~    args.outputs.background_color = [0, 0, 0]~
     - Inside source: true
     *** True Line Result
    -   Reminders:
    -** Processing line: ~~
    +    args.outputs.background_color = [0, 0, 0]
    +** Processing line: ~    args.outputs.primitives << args.gtk.current_framerate_primitives~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   - args.outputs.solids: An array. The values generate a solid.~
    +    args.outputs.primitives << args.gtk.current_framerate_primitives
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -   - args.outputs.solids: An array. The values generate a solid.
    -** Processing line: ~     The parameters for a solid are~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -     The parameters for a solid are
    -** Processing line: ~     1. The position on the screen (x, y)~
    +
    +** Processing line: ~  # resets game, and assigns star count given by user~
     - Inside source: true
     *** True Line Result
    -     1. The position on the screen (x, y)
    -** Processing line: ~     2. The width (w)~
    +  # resets game, and assigns star count given by user
    +** Processing line: ~  def reset_with count: count~
     - Inside source: true
     *** True Line Result
    -     2. The width (w)
    -** Processing line: ~     3. The height (h)~
    +  def reset_with count: count
    +** Processing line: ~    $gtk.reset~
     - Inside source: true
     *** True Line Result
    -     3. The height (h)
    -** Processing line: ~     4. The color (r, g, b) (if a color is not assigned, the object's default color will be black)~
    +    $gtk.reset
    +** Processing line: ~    $gtk.args.state.star_count = count~
     - Inside source: true
     *** True Line Result
    -     4. The color (r, g, b) (if a color is not assigned, the object's default color will be black)
    -** Processing line: ~     NOTE: THE PARAMETERS ARE THE SAME FOR BORDERS!~
    +    $gtk.args.state.star_count = count
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -     NOTE: THE PARAMETERS ARE THE SAME FOR BORDERS!
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~     Here is an example of a (red) border or solid definition:~
    -- Inside source: true
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
     *** True Line Result
    -     Here is an example of a (red) border or solid definition:
    -** Processing line: ~     [100, 100, 400, 500, 255, 0, 0]~
    -- Inside source: true
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
     *** True Line Result
    -     [100, 100, 400, 500, 255, 0, 0]
    -** Processing line: ~     It will be a solid or border depending on if it is added to args.outputs.solids or args.outputs.borders.~
    -- Inside source: true
    +
    +** Processing line: ~*** Performance - Sprites As Strict Entities - main.rb~
    +- Header detected.
     *** True Line Result
    -     It will be a solid or border depending on if it is added to args.outputs.solids or args.outputs.borders.
    -** Processing line: ~     For more information about solids and borders, go to mygame/documentation/03-solids-and-borders.md.~
    -- Inside source: true
    +
     *** True Line Result
    -     For more information about solids and borders, go to mygame/documentation/03-solids-and-borders.md.
    -** Processing line: ~~
    -- Inside source: true
    +*** Performance - Sprites As Strict Entities - main.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
     *** True Line Result
     
    -** Processing line: ~   - args.outputs.sprites: An array. The values generate a sprite.~
    -- Inside source: true
     *** True Line Result
    -   - args.outputs.sprites: An array. The values generate a sprite.
    -** Processing line: ~     The parameters for sprites are~
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/09_performance/03_sprites_as_strict_entities/app/main.rb~
     - Inside source: true
     *** True Line Result
    -     The parameters for sprites are
    -** Processing line: ~     1. The position on the screen (x, y)~
    +  # ./samples/09_performance/03_sprites_as_strict_entities/app/main.rb
    +** Processing line: ~  # Sprites represented as StrictEntities using the queue ~args.outputs.sprites~~
     - Inside source: true
     *** True Line Result
    -     1. The position on the screen (x, y)
    -** Processing line: ~     2. The width (w)~
    +  # Sprites represented as StrictEntities using the queue ~args.outputs.sprites~
    +** Processing line: ~  # yields apis access similar to Entities, but all properties that can be set on the~
     - Inside source: true
     *** True Line Result
    -     2. The width (w)
    -** Processing line: ~     3. The height (h)~
    +  # yields apis access similar to Entities, but all properties that can be set on the
    +** Processing line: ~  # entity must be predefined with a default value. Strict entities do not support the~
     - Inside source: true
     *** True Line Result
    -     3. The height (h)
    -** Processing line: ~     4. The image path (p)~
    +  # entity must be predefined with a default value. Strict entities do not support the
    +** Processing line: ~  # addition of new properties after the fact. They are more performant than OpenEntities~
     - Inside source: true
     *** True Line Result
    -     4. The image path (p)
    -** Processing line: ~~
    +  # addition of new properties after the fact. They are more performant than OpenEntities
    +** Processing line: ~  # because of this constraint.~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~     Here is an example of a sprite definition:~
    +  # because of this constraint.
    +** Processing line: ~  def random_x args~
     - Inside source: true
     *** True Line Result
    -     Here is an example of a sprite definition:
    -** Processing line: ~     [100, 100, 400, 500, 'sprites/dragonruby.png']~
    +  def random_x args
    +** Processing line: ~    (args.grid.w.randomize :ratio) * -1~
     - Inside source: true
     *** True Line Result
    -     [100, 100, 400, 500, 'sprites/dragonruby.png']
    -** Processing line: ~     For more information about sprites, go to mygame/documentation/05-sprites.md.~
    +    (args.grid.w.randomize :ratio) * -1
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -     For more information about sprites, go to mygame/documentation/05-sprites.md.
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  =end~
    +** Processing line: ~  def random_y args~
     - Inside source: true
     *** True Line Result
    -  =end
    -** Processing line: ~~
    +  def random_y args
    +** Processing line: ~    (args.grid.h.randomize :ratio) * -1~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  # This code demonstrates the creation and output of objects like sprites, borders, and solids~
    +    (args.grid.h.randomize :ratio) * -1
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -  # This code demonstrates the creation and output of objects like sprites, borders, and solids
    -** Processing line: ~  # If filled in, they are solids~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  # If filled in, they are solids
    -** Processing line: ~  # If hollow, they are borders~
    +
    +** Processing line: ~  def random_speed~
     - Inside source: true
     *** True Line Result
    -  # If hollow, they are borders
    -** Processing line: ~  # If images, they are sprites~
    +  def random_speed
    +** Processing line: ~    1 + (4.randomize :ratio)~
     - Inside source: true
     *** True Line Result
    -  # If images, they are sprites
    +    1 + (4.randomize :ratio)
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # Solids are added to args.outputs.solids~
    +** Processing line: ~  def new_star args~
     - Inside source: true
     *** True Line Result
    -  # Solids are added to args.outputs.solids
    -** Processing line: ~  # Borders are added to args.outputs.borders~
    +  def new_star args
    +** Processing line: ~    args.state.new_entity_strict(:star,~
     - Inside source: true
     *** True Line Result
    -  # Borders are added to args.outputs.borders
    -** Processing line: ~  # Sprites are added to args.outputs.sprites~
    +    args.state.new_entity_strict(:star,
    +** Processing line: ~                                 x: (random_x args),~
     - Inside source: true
     *** True Line Result
    -  # Sprites are added to args.outputs.sprites
    -** Processing line: ~~
    +                                 x: (random_x args),
    +** Processing line: ~                                 y: (random_y args),~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  # The tick method runs 60 frames every second.~
    +                                 y: (random_y args),
    +** Processing line: ~                                 w: 4, h: 4,~
     - Inside source: true
     *** True Line Result
    -  # The tick method runs 60 frames every second.
    -** Processing line: ~  # Your game is going to happen under this one function.~
    +                                 w: 4, h: 4,
    +** Processing line: ~                                 path: 'sprites/tiny-star.png',~
     - Inside source: true
     *** True Line Result
    -  # Your game is going to happen under this one function.
    -** Processing line: ~  def tick args~
    +                                 path: 'sprites/tiny-star.png',
    +** Processing line: ~                                 s: random_speed) do |entity|~
     - Inside source: true
     *** True Line Result
    -  def tick args
    -** Processing line: ~    border_as_solid_and_solid_as_border args~
    +                                 s: random_speed) do |entity|
    +** Processing line: ~      # invoke attr_sprite so that it responds to~
     - Inside source: true
     *** True Line Result
    -    border_as_solid_and_solid_as_border args
    -** Processing line: ~    sprite_as_border_or_solids args~
    +      # invoke attr_sprite so that it responds to
    +** Processing line: ~      # all properties that are required to render a sprite~
     - Inside source: true
     *** True Line Result
    -    sprite_as_border_or_solids args
    -** Processing line: ~    collection_of_borders_and_solids args~
    +      # all properties that are required to render a sprite
    +** Processing line: ~      entity.attr_sprite~
     - Inside source: true
     *** True Line Result
    -    collection_of_borders_and_solids args
    -** Processing line: ~    collection_of_sprites args~
    +      entity.attr_sprite
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    collection_of_sprites args
    +    end
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -48252,166 +56423,170 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # Shows a border being output onto the screen as a border and a solid~
    -- Inside source: true
    -*** True Line Result
    -  # Shows a border being output onto the screen as a border and a solid
    -** Processing line: ~  # Also shows how colors can be set~
    -- Inside source: true
    -*** True Line Result
    -  # Also shows how colors can be set
    -** Processing line: ~  def border_as_solid_and_solid_as_border args~
    +** Processing line: ~  def move_star args, star~
     - Inside source: true
     *** True Line Result
    -  def border_as_solid_and_solid_as_border args
    -** Processing line: ~    border = [0, 0, 50, 50]~
    +  def move_star args, star
    +** Processing line: ~    star.x += star.s~
     - Inside source: true
     *** True Line Result
    -    border = [0, 0, 50, 50]
    -** Processing line: ~    args.outputs.borders << border~
    +    star.x += star.s
    +** Processing line: ~    star.y += star.s~
     - Inside source: true
     *** True Line Result
    -    args.outputs.borders << border
    -** Processing line: ~    args.outputs.solids  << border~
    +    star.y += star.s
    +** Processing line: ~    if star.x > args.grid.w || star.y > args.grid.h~
     - Inside source: true
     *** True Line Result
    -    args.outputs.solids  << border
    -** Processing line: ~~
    +    if star.x > args.grid.w || star.y > args.grid.h
    +** Processing line: ~      star.x = (random_x args)~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # Red, green, blue saturations (last three parameters) can be any number between 0 and 255~
    +      star.x = (random_x args)
    +** Processing line: ~      star.y = (random_y args)~
     - Inside source: true
     *** True Line Result
    -    # Red, green, blue saturations (last three parameters) can be any number between 0 and 255
    -** Processing line: ~    border_with_color = [0, 100, 50, 50, 255, 0, 0]~
    +      star.y = (random_y args)
    +** Processing line: ~      star.s = random_speed~
     - Inside source: true
     *** True Line Result
    -    border_with_color = [0, 100, 50, 50, 255, 0, 0]
    -** Processing line: ~    args.outputs.borders << border_with_color~
    +      star.s = random_speed
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    args.outputs.borders << border_with_color
    -** Processing line: ~    args.outputs.solids  << border_with_color~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    args.outputs.solids  << border_with_color
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    border_with_nested_color = [0, 200, 50, 50, [0, 255, 0]] # nested color~
    -- Inside source: true
    -*** True Line Result
    -    border_with_nested_color = [0, 200, 50, 50, [0, 255, 0]] # nested color
    -** Processing line: ~    args.outputs.borders << border_with_nested_color~
    +** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
    -    args.outputs.borders << border_with_nested_color
    -** Processing line: ~    args.outputs.solids  << border_with_nested_color~
    +  def tick args
    +** Processing line: ~    args.state.star_count ||= 0~
     - Inside source: true
     *** True Line Result
    -    args.outputs.solids  << border_with_nested_color
    +    args.state.star_count ||= 0
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    border_with_nested_rect = [[0, 300, 50, 50], 0, 0, 255] # nested rect~
    +** Processing line: ~    # sets console command when sample app initially opens~
     - Inside source: true
     *** True Line Result
    -    border_with_nested_rect = [[0, 300, 50, 50], 0, 0, 255] # nested rect
    -** Processing line: ~    args.outputs.borders << border_with_nested_rect~
    +    # sets console command when sample app initially opens
    +** Processing line: ~    if Kernel.global_tick_count == 0~
     - Inside source: true
     *** True Line Result
    -    args.outputs.borders << border_with_nested_rect
    -** Processing line: ~    args.outputs.solids  << border_with_nested_rect~
    +    if Kernel.global_tick_count == 0
    +** Processing line: ~      puts ""~
     - Inside source: true
     *** True Line Result
    -    args.outputs.solids  << border_with_nested_rect
    -** Processing line: ~~
    +      puts ""
    +** Processing line: ~      puts ""~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    border_with_nested_color_and_rect = [[0, 400, 50, 50], [255, 0, 255]] # nested rect and color~
    +      puts ""
    +** Processing line: ~      puts "========================================================="~
     - Inside source: true
     *** True Line Result
    -    border_with_nested_color_and_rect = [[0, 400, 50, 50], [255, 0, 255]] # nested rect and color
    -** Processing line: ~    args.outputs.borders << border_with_nested_color_and_rect~
    +      puts "========================================================="
    +** Processing line: ~      puts "* INFO: Sprites, Strict Entities"~
     - Inside source: true
     *** True Line Result
    -    args.outputs.borders << border_with_nested_color_and_rect
    -** Processing line: ~    args.outputs.solids  << border_with_nested_color_and_rect~
    +      puts "* INFO: Sprites, Strict Entities"
    +** Processing line: ~      puts "* INFO: Please specify the number of sprites to render."~
     - Inside source: true
     *** True Line Result
    -    args.outputs.solids  << border_with_nested_color_and_rect
    -** Processing line: ~  end~
    +      puts "* INFO: Please specify the number of sprites to render."
    +** Processing line: ~      args.gtk.console.set_command "reset_with count: 100"~
     - Inside source: true
     *** True Line Result
    -  end
    +      args.gtk.console.set_command "reset_with count: 100"
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # Shows a sprite output onto the screen as a sprite, border, and solid~
    +** Processing line: ~    # init~
     - Inside source: true
     *** True Line Result
    -  # Shows a sprite output onto the screen as a sprite, border, and solid
    -** Processing line: ~  # Demonstrates that all three outputs appear differently on screen~
    +    # init
    +** Processing line: ~    if args.state.tick_count == 0~
     - Inside source: true
     *** True Line Result
    -  # Demonstrates that all three outputs appear differently on screen
    -** Processing line: ~  def sprite_as_border_or_solids args~
    +    if args.state.tick_count == 0
    +** Processing line: ~      args.state.stars = args.state.star_count.map { |i| new_star args }~
     - Inside source: true
     *** True Line Result
    -  def sprite_as_border_or_solids args
    -** Processing line: ~    sprite = [100, 0, 50, 50, 'sprites/ship.png']~
    +      args.state.stars = args.state.star_count.map { |i| new_star args }
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    sprite = [100, 0, 50, 50, 'sprites/ship.png']
    -** Processing line: ~    args.outputs.sprites << sprite~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    args.outputs.sprites << sprite
    +
    +** Processing line: ~    # update~
    +- Inside source: true
    +*** True Line Result
    +    # update
    +** Processing line: ~    args.state.stars.each { |s| move_star args, s }~
    +- Inside source: true
    +*** True Line Result
    +    args.state.stars.each { |s| move_star args, s }
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Sprite_as_border variable has same parameters (excluding position) as above object,~
    +** Processing line: ~    # render~
     - Inside source: true
     *** True Line Result
    -    # Sprite_as_border variable has same parameters (excluding position) as above object,
    -** Processing line: ~    # but will appear differently on screen because it is added to args.outputs.borders~
    +    # render
    +** Processing line: ~    args.outputs.sprites << args.state.stars~
     - Inside source: true
     *** True Line Result
    -    # but will appear differently on screen because it is added to args.outputs.borders
    -** Processing line: ~    sprite_as_border = [100, 100, 50, 50, 'sprites/ship.png']~
    +    args.outputs.sprites << args.state.stars
    +** Processing line: ~    args.outputs.background_color = [0, 0, 0]~
     - Inside source: true
     *** True Line Result
    -    sprite_as_border = [100, 100, 50, 50, 'sprites/ship.png']
    -** Processing line: ~    args.outputs.borders << sprite_as_border~
    +    args.outputs.background_color = [0, 0, 0]
    +** Processing line: ~    args.outputs.primitives << args.gtk.current_framerate_primitives~
     - Inside source: true
     *** True Line Result
    -    args.outputs.borders << sprite_as_border
    +    args.outputs.primitives << args.gtk.current_framerate_primitives
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Sprite_as_solid variable has same parameters (excluding position) as above object,~
    +** Processing line: ~  # resets game, and assigns star count given by user~
     - Inside source: true
     *** True Line Result
    -    # Sprite_as_solid variable has same parameters (excluding position) as above object,
    -** Processing line: ~    # but will appear differently on screen because it is added to args.outputs.solids~
    +  # resets game, and assigns star count given by user
    +** Processing line: ~  def reset_with count: count~
     - Inside source: true
     *** True Line Result
    -    # but will appear differently on screen because it is added to args.outputs.solids
    -** Processing line: ~    sprite_as_solid = [100, 200, 50, 50, 'sprites/ship.png']~
    +  def reset_with count: count
    +** Processing line: ~    $gtk.reset~
     - Inside source: true
     *** True Line Result
    -    sprite_as_solid = [100, 200, 50, 50, 'sprites/ship.png']
    -** Processing line: ~    args.outputs.solids << sprite_as_solid~
    +    $gtk.reset
    +** Processing line: ~    $gtk.args.state.star_count = count~
     - Inside source: true
     *** True Line Result
    -    args.outputs.solids << sprite_as_solid
    +    $gtk.args.state.star_count = count
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -48420,110 +56595,118 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # Holds and outputs a collection of borders and a collection of solids~
    -- Inside source: true
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
     *** True Line Result
    -  # Holds and outputs a collection of borders and a collection of solids
    -** Processing line: ~  # Collections are created by using arrays to hold parameters of each individual object~
    -- Inside source: true
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
     *** True Line Result
    -  # Collections are created by using arrays to hold parameters of each individual object
    -** Processing line: ~  def collection_of_borders_and_solids args~
    -- Inside source: true
    +
    +** Processing line: ~*** Performance - Sprites As Classes - main.rb~
    +- Header detected.
     *** True Line Result
    -  def collection_of_borders_and_solids args
    -** Processing line: ~    collection_borders = [~
    +
    +*** True Line Result
    +*** Performance - Sprites As Classes - main.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/09_performance/04_sprites_as_classes/app/main.rb~
     - Inside source: true
     *** True Line Result
    -    collection_borders = [
    -** Processing line: ~      [~
    +  # ./samples/09_performance/04_sprites_as_classes/app/main.rb
    +** Processing line: ~  # Sprites represented as Classes using the queue ~args.outputs.sprites~.~
     - Inside source: true
     *** True Line Result
    -      [
    -** Processing line: ~        [200,  0, 50, 50],                    # black border~
    +  # Sprites represented as Classes using the queue ~args.outputs.sprites~.
    +** Processing line: ~  # gives you full control of property declaration and method invocation.~
     - Inside source: true
     *** True Line Result
    -        [200,  0, 50, 50],                    # black border
    -** Processing line: ~        [200,  100, 50, 50, 255, 0, 0],       # red border~
    +  # gives you full control of property declaration and method invocation.
    +** Processing line: ~  # They are more performant than OpenEntities and StrictEntities, but more code upfront.~
     - Inside source: true
     *** True Line Result
    -        [200,  100, 50, 50, 255, 0, 0],       # red border
    -** Processing line: ~        [200,  200, 50, 50, [0, 255, 0]],     # nested color~
    +  # They are more performant than OpenEntities and StrictEntities, but more code upfront.
    +** Processing line: ~  class Star~
     - Inside source: true
     *** True Line Result
    -        [200,  200, 50, 50, [0, 255, 0]],     # nested color
    -** Processing line: ~      ],~
    +  class Star
    +** Processing line: ~    attr_sprite~
     - Inside source: true
     *** True Line Result
    -      ],
    -** Processing line: ~      [[200, 300, 50, 50], 0, 0, 255],        # nested rect~
    +    attr_sprite
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      [[200, 300, 50, 50], 0, 0, 255],        # nested rect
    -** Processing line: ~      [[200, 400, 50, 50], [255, 0, 255]]     # nested rect and nested color~
    +
    +** Processing line: ~    def initialize grid~
     - Inside source: true
     *** True Line Result
    -      [[200, 400, 50, 50], [255, 0, 255]]     # nested rect and nested color
    -** Processing line: ~    ]~
    +    def initialize grid
    +** Processing line: ~      @grid = grid~
     - Inside source: true
     *** True Line Result
    -    ]
    -** Processing line: ~~
    +      @grid = grid
    +** Processing line: ~      @x = (rand @grid.w) * -1~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    args.outputs.borders << collection_borders~
    +      @x = (rand @grid.w) * -1
    +** Processing line: ~      @y = (rand @grid.h) * -1~
     - Inside source: true
     *** True Line Result
    -    args.outputs.borders << collection_borders
    -** Processing line: ~~
    +      @y = (rand @grid.h) * -1
    +** Processing line: ~      @w    = 4~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    collection_solids = [~
    +      @w    = 4
    +** Processing line: ~      @h    = 4~
     - Inside source: true
     *** True Line Result
    -    collection_solids = [
    -** Processing line: ~      [~
    +      @h    = 4
    +** Processing line: ~      @s    = 1 + (4.randomize :ratio)~
     - Inside source: true
     *** True Line Result
    -      [
    -** Processing line: ~        [[300, 300, 50, 50], 0, 0, 255],      # nested rect~
    +      @s    = 1 + (4.randomize :ratio)
    +** Processing line: ~      @path = 'sprites/tiny-star.png'~
     - Inside source: true
     *** True Line Result
    -        [[300, 300, 50, 50], 0, 0, 255],      # nested rect
    -** Processing line: ~        [[300, 400, 50, 50], [255, 0, 255]]   # nested rect and nested color~
    +      @path = 'sprites/tiny-star.png'
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -        [[300, 400, 50, 50], [255, 0, 255]]   # nested rect and nested color
    -** Processing line: ~      ],~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      ],
    -** Processing line: ~      [300,  0, 50, 50],~
    +
    +** Processing line: ~    def move~
     - Inside source: true
     *** True Line Result
    -      [300,  0, 50, 50],
    -** Processing line: ~      [300,  100, 50, 50, 255, 0, 0],~
    +    def move
    +** Processing line: ~      @x += @s~
     - Inside source: true
     *** True Line Result
    -      [300,  100, 50, 50, 255, 0, 0],
    -** Processing line: ~      [300,  200, 50, 50, [0, 255, 0]],       # nested color~
    +      @x += @s
    +** Processing line: ~      @y += @s~
     - Inside source: true
     *** True Line Result
    -      [300,  200, 50, 50, [0, 255, 0]],       # nested color
    -** Processing line: ~    ]~
    +      @y += @s
    +** Processing line: ~      @x = (rand @grid.w) * -1 if @x > @grid.right~
     - Inside source: true
     *** True Line Result
    -    ]
    -** Processing line: ~~
    +      @x = (rand @grid.w) * -1 if @x > @grid.right
    +** Processing line: ~      @y = (rand @grid.h) * -1 if @y > @grid.top~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    args.outputs.solids << collection_solids~
    +      @y = (rand @grid.h) * -1 if @y > @grid.top
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    args.outputs.solids << collection_solids
    +    end
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -48532,114 +56715,126 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # Holds and outputs a collection of sprites by adding it to args.outputs.sprites~
    +** Processing line: ~  # calls methods needed for game to run properly~
     - Inside source: true
     *** True Line Result
    -  # Holds and outputs a collection of sprites by adding it to args.outputs.sprites
    -** Processing line: ~  # Also outputs a collection with same parameters (excluding position) by adding~
    +  # calls methods needed for game to run properly
    +** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
    -  # Also outputs a collection with same parameters (excluding position) by adding
    -** Processing line: ~  # it to args.outputs.solids and another to args.outputs.borders~
    +  def tick args
    +** Processing line: ~    # sets console command when sample app initially opens~
     - Inside source: true
     *** True Line Result
    -  # it to args.outputs.solids and another to args.outputs.borders
    -** Processing line: ~  def collection_of_sprites args~
    +    # sets console command when sample app initially opens
    +** Processing line: ~    if Kernel.global_tick_count == 0~
     - Inside source: true
     *** True Line Result
    -  def collection_of_sprites args
    -** Processing line: ~    sprites_collection = [~
    +    if Kernel.global_tick_count == 0
    +** Processing line: ~      puts ""~
     - Inside source: true
     *** True Line Result
    -    sprites_collection = [
    -** Processing line: ~      [~
    +      puts ""
    +** Processing line: ~      puts ""~
     - Inside source: true
     *** True Line Result
    -      [
    -** Processing line: ~        [400, 0, 50, 50, 'sprites/ship.png'],~
    +      puts ""
    +** Processing line: ~      puts "========================================================="~
     - Inside source: true
     *** True Line Result
    -        [400, 0, 50, 50, 'sprites/ship.png'],
    -** Processing line: ~        [400, 100, 50, 50, 'sprites/ship.png'],~
    +      puts "========================================================="
    +** Processing line: ~      puts "* INFO: Sprites, Classes"~
     - Inside source: true
     *** True Line Result
    -        [400, 100, 50, 50, 'sprites/ship.png'],
    -** Processing line: ~      ],~
    +      puts "* INFO: Sprites, Classes"
    +** Processing line: ~      puts "* INFO: Please specify the number of sprites to render."~
     - Inside source: true
     *** True Line Result
    -      ],
    -** Processing line: ~      [400, 200, 50, 50, 'sprites/ship.png']~
    +      puts "* INFO: Please specify the number of sprites to render."
    +** Processing line: ~      args.gtk.console.set_command "reset_with count: 100"~
     - Inside source: true
     *** True Line Result
    -      [400, 200, 50, 50, 'sprites/ship.png']
    -** Processing line: ~    ]~
    +      args.gtk.console.set_command "reset_with count: 100"
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    ]
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    args.outputs.sprites << sprites_collection~
    +** Processing line: ~    # init~
     - Inside source: true
     *** True Line Result
    -    args.outputs.sprites << sprites_collection
    -** Processing line: ~~
    +    # init
    +** Processing line: ~    if args.state.tick_count == 0~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    args.outputs.solids << [~
    +    if args.state.tick_count == 0
    +** Processing line: ~      args.state.stars = args.state.star_count.map { |i| Star.new args.grid }~
     - Inside source: true
     *** True Line Result
    -    args.outputs.solids << [
    -** Processing line: ~      [500, 0, 50, 50, 'sprites/ship.png'],~
    +      args.state.stars = args.state.star_count.map { |i| Star.new args.grid }
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      [500, 0, 50, 50, 'sprites/ship.png'],
    -** Processing line: ~      [500, 100, 50, 50, 'sprites/ship.png'],~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      [500, 100, 50, 50, 'sprites/ship.png'],
    -** Processing line: ~      [[[500, 200, 50, 50, 'sprites/ship.png']]]~
    +
    +** Processing line: ~    # update~
     - Inside source: true
     *** True Line Result
    -      [[[500, 200, 50, 50, 'sprites/ship.png']]]
    -** Processing line: ~    ]~
    +    # update
    +** Processing line: ~    args.state.stars.each(&:move)~
     - Inside source: true
     *** True Line Result
    -    ]
    +    args.state.stars.each(&:move)
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    args.outputs.borders << [~
    +** Processing line: ~    # render~
     - Inside source: true
     *** True Line Result
    -    args.outputs.borders << [
    -** Processing line: ~      [~
    +    # render
    +** Processing line: ~    args.outputs.sprites << args.state.stars~
     - Inside source: true
     *** True Line Result
    -      [
    -** Processing line: ~        [600, 0, 50, 50, 'sprites/ship.png'],~
    +    args.outputs.sprites << args.state.stars
    +** Processing line: ~    args.outputs.background_color = [0, 0, 0]~
     - Inside source: true
     *** True Line Result
    -        [600, 0, 50, 50, 'sprites/ship.png'],
    -** Processing line: ~        [600, 100, 50, 50, 'sprites/ship.png'],~
    +    args.outputs.background_color = [0, 0, 0]
    +** Processing line: ~    args.outputs.primitives << args.gtk.current_framerate_primitives~
     - Inside source: true
     *** True Line Result
    -        [600, 100, 50, 50, 'sprites/ship.png'],
    -** Processing line: ~      ],~
    +    args.outputs.primitives << args.gtk.current_framerate_primitives
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -      ],
    -** Processing line: ~      [600, 200, 50, 50, 'sprites/ship.png']~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      [600, 200, 50, 50, 'sprites/ship.png']
    -** Processing line: ~    ]~
    +
    +** Processing line: ~  # resets game, and assigns star count given by user~
     - Inside source: true
     *** True Line Result
    -    ]
    +  # resets game, and assigns star count given by user
    +** Processing line: ~  def reset_with count: count~
    +- Inside source: true
    +*** True Line Result
    +  def reset_with count: count
    +** Processing line: ~    $gtk.reset~
    +- Inside source: true
    +*** True Line Result
    +    $gtk.reset
    +** Processing line: ~    $gtk.args.state.star_count = count~
    +- Inside source: true
    +*** True Line Result
    +    $gtk.args.state.star_count = count
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -48656,786 +56851,874 @@ Follows is a source code listing for all files that have been open sourced. This
     - End of paragraph detected.
     *** True Line Result
     
    -** Processing line: ~*** Advanced Rendering - Render Primitives As Hash - main.rb~
    +** Processing line: ~*** Performance - Static Sprites As Classes - main.rb~
     - Header detected.
     *** True Line Result
     
     *** True Line Result
    -*** Advanced Rendering - Render Primitives As Hash - main.rb
    +*** Performance - Static Sprites As Classes - main.rb
     ** Processing line: ~#+begin_src ruby~
     - Line was identified as the beginning of a code block.
     *** True Line Result
     
     *** True Line Result
     #+begin_src ruby
    -** Processing line: ~  # ./samples/07_advanced_rendering/05_render_primitives_as_hash/app/main.rb~
    +** Processing line: ~  # ./samples/09_performance/05_static_sprites_as_classes/app/main.rb~
     - Inside source: true
     *** True Line Result
    -  # ./samples/07_advanced_rendering/05_render_primitives_as_hash/app/main.rb
    -** Processing line: ~  =begin~
    +  # ./samples/09_performance/05_static_sprites_as_classes/app/main.rb
    +** Processing line: ~  # Sprites represented as Classes using the queue ~args.outputs.static_sprites~.~
     - Inside source: true
     *** True Line Result
    -  =begin
    -** Processing line: ~~
    +  # Sprites represented as Classes using the queue ~args.outputs.static_sprites~.
    +** Processing line: ~  # bypasses the queue behavior of ~args.outputs.sprites~. All instances are held~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   Reminders:~
    +  # bypasses the queue behavior of ~args.outputs.sprites~. All instances are held
    +** Processing line: ~  # by reference. You get better performance, but you are mutating state of held objects~
     - Inside source: true
     *** True Line Result
    -   Reminders:
    -** Processing line: ~~
    +  # by reference. You get better performance, but you are mutating state of held objects
    +** Processing line: ~  # which is less functional/data oriented.~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   - Hashes: Collection of unique keys and their corresponding values. The value can be found~
    +  # which is less functional/data oriented.
    +** Processing line: ~  class Star~
     - Inside source: true
     *** True Line Result
    -   - Hashes: Collection of unique keys and their corresponding values. The value can be found
    -** Processing line: ~     using their keys.~
    +  class Star
    +** Processing line: ~    attr_sprite~
     - Inside source: true
     *** True Line Result
    -     using their keys.
    +    attr_sprite
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~     For example, if we have a "numbers" hash that stores numbers in English as the~
    +** Processing line: ~    def initialize grid~
     - Inside source: true
     *** True Line Result
    -     For example, if we have a "numbers" hash that stores numbers in English as the
    -** Processing line: ~     key and numbers in Spanish as the value, we'd have a hash that looks like this...~
    +    def initialize grid
    +** Processing line: ~      @grid = grid~
     - Inside source: true
     *** True Line Result
    -     key and numbers in Spanish as the value, we'd have a hash that looks like this...
    -** Processing line: ~     numbers = { "one" => "uno", "two" => "dos", "three" => "tres" }~
    +      @grid = grid
    +** Processing line: ~      @x = (rand @grid.w) * -1~
     - Inside source: true
     *** True Line Result
    -     numbers = { "one" => "uno", "two" => "dos", "three" => "tres" }
    -** Processing line: ~     and on it goes.~
    +      @x = (rand @grid.w) * -1
    +** Processing line: ~      @y = (rand @grid.h) * -1~
     - Inside source: true
     *** True Line Result
    -     and on it goes.
    -** Processing line: ~~
    +      @y = (rand @grid.h) * -1
    +** Processing line: ~      @w    = 4~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~     Now if we wanted to find the corresponding value of the "one" key, we could say~
    +      @w    = 4
    +** Processing line: ~      @h    = 4~
     - Inside source: true
     *** True Line Result
    -     Now if we wanted to find the corresponding value of the "one" key, we could say
    -** Processing line: ~     puts numbers["one"]~
    +      @h    = 4
    +** Processing line: ~      @s    = 1 + (4.randomize :ratio)~
     - Inside source: true
     *** True Line Result
    -     puts numbers["one"]
    -** Processing line: ~     which would print "uno" to the console.~
    +      @s    = 1 + (4.randomize :ratio)
    +** Processing line: ~      @path = 'sprites/tiny-star.png'~
     - Inside source: true
     *** True Line Result
    -     which would print "uno" to the console.
    +      @path = 'sprites/tiny-star.png'
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~   - args.outputs.sprites: An array. The values generate a sprite.~
    +** Processing line: ~    def move~
     - Inside source: true
     *** True Line Result
    -   - args.outputs.sprites: An array. The values generate a sprite.
    -** Processing line: ~     The parameters are [X, Y, WIDTH, HEIGHT, PATH, ANGLE, ALPHA, RED, GREEN, BLUE]~
    +    def move
    +** Processing line: ~      @x += @s~
     - Inside source: true
     *** True Line Result
    -     The parameters are [X, Y, WIDTH, HEIGHT, PATH, ANGLE, ALPHA, RED, GREEN, BLUE]
    -** Processing line: ~     For more information about sprites, go to mygame/documentation/05-sprites.md.~
    +      @x += @s
    +** Processing line: ~      @y += @s~
     - Inside source: true
     *** True Line Result
    -     For more information about sprites, go to mygame/documentation/05-sprites.md.
    -** Processing line: ~~
    +      @y += @s
    +** Processing line: ~      @x = (rand @grid.w) * -1 if @x > @grid.right~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   - args.outputs.labels: An array. The values generate a label.~
    +      @x = (rand @grid.w) * -1 if @x > @grid.right
    +** Processing line: ~      @y = (rand @grid.h) * -1 if @y > @grid.top~
     - Inside source: true
     *** True Line Result
    -   - args.outputs.labels: An array. The values generate a label.
    -** Processing line: ~     The parameters are [X, Y, TEXT, SIZE, ALIGNMENT, RED, GREEN, BLUE, ALPHA, FONT STYLE]~
    +      @y = (rand @grid.h) * -1 if @y > @grid.top
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -     The parameters are [X, Y, TEXT, SIZE, ALIGNMENT, RED, GREEN, BLUE, ALPHA, FONT STYLE]
    -** Processing line: ~     For more information about labels, go to mygame/documentation/02-labels.md.~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -     For more information about labels, go to mygame/documentation/02-labels.md.
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~   - args.outputs.solids: An array. The values generate a solid.~
    +** Processing line: ~  # calls methods needed for game to run properly~
     - Inside source: true
     *** True Line Result
    -   - args.outputs.solids: An array. The values generate a solid.
    -** Processing line: ~     The parameters are [X, Y, WIDTH, HEIGHT, RED, GREEN, BLUE, ALPHA]~
    +  # calls methods needed for game to run properly
    +** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
    -     The parameters are [X, Y, WIDTH, HEIGHT, RED, GREEN, BLUE, ALPHA]
    -** Processing line: ~     For more information about solids, go to mygame/documentation/03-solids-and-borders.md.~
    +  def tick args
    +** Processing line: ~    # sets console command when sample app initially opens~
     - Inside source: true
     *** True Line Result
    -     For more information about solids, go to mygame/documentation/03-solids-and-borders.md.
    -** Processing line: ~~
    +    # sets console command when sample app initially opens
    +** Processing line: ~    if Kernel.global_tick_count == 0~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   - args.outputs.borders: An array. The values generate a border.~
    +    if Kernel.global_tick_count == 0
    +** Processing line: ~      puts ""~
     - Inside source: true
     *** True Line Result
    -   - args.outputs.borders: An array. The values generate a border.
    -** Processing line: ~     The parameters are the same as a solid.~
    +      puts ""
    +** Processing line: ~      puts ""~
     - Inside source: true
     *** True Line Result
    -     The parameters are the same as a solid.
    -** Processing line: ~     For more information about borders, go to mygame/documentation/03-solids-and-borders.md.~
    +      puts ""
    +** Processing line: ~      puts "========================================================="~
     - Inside source: true
     *** True Line Result
    -     For more information about borders, go to mygame/documentation/03-solids-and-borders.md.
    -** Processing line: ~~
    +      puts "========================================================="
    +** Processing line: ~      puts "* INFO: Static Sprites, Classes"~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   - args.outputs.lines: An array. The values generate a line.~
    +      puts "* INFO: Static Sprites, Classes"
    +** Processing line: ~      puts "* INFO: Please specify the number of sprites to render."~
     - Inside source: true
     *** True Line Result
    -   - args.outputs.lines: An array. The values generate a line.
    -** Processing line: ~     The parameters are [X1, Y1, X2, Y2, RED, GREEN, BLUE]~
    +      puts "* INFO: Please specify the number of sprites to render."
    +** Processing line: ~      args.gtk.console.set_command "reset_with count: 100"~
     - Inside source: true
     *** True Line Result
    -     The parameters are [X1, Y1, X2, Y2, RED, GREEN, BLUE]
    -** Processing line: ~     For more information about labels, go to mygame/documentation/02-labels.md.~
    +      args.gtk.console.set_command "reset_with count: 100"
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -     For more information about labels, go to mygame/documentation/02-labels.md.
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  =end~
    +** Processing line: ~    # init~
     - Inside source: true
     *** True Line Result
    -  =end
    +    # init
    +** Processing line: ~    if args.state.tick_count == 0~
    +- Inside source: true
    +*** True Line Result
    +    if args.state.tick_count == 0
    +** Processing line: ~      args.state.stars = args.state.star_count.map { |i| Star.new args.grid }~
    +- Inside source: true
    +*** True Line Result
    +      args.state.stars = args.state.star_count.map { |i| Star.new args.grid }
    +** Processing line: ~      args.outputs.static_sprites << args.state.stars~
    +- Inside source: true
    +*** True Line Result
    +      args.outputs.static_sprites << args.state.stars
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # This sample app demonstrates how hashes can be used to output different kinds of objects.~
    +** Processing line: ~    # update~
     - Inside source: true
     *** True Line Result
    -  # This sample app demonstrates how hashes can be used to output different kinds of objects.
    +    # update
    +** Processing line: ~    args.state.stars.each(&:move)~
    +- Inside source: true
    +*** True Line Result
    +    args.state.stars.each(&:move)
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def tick args~
    +** Processing line: ~    # render~
     - Inside source: true
     *** True Line Result
    -  def tick args
    -** Processing line: ~    args.state.angle ||= 0 # initializes angle to 0~
    +    # render
    +** Processing line: ~    args.outputs.background_color = [0, 0, 0]~
     - Inside source: true
     *** True Line Result
    -    args.state.angle ||= 0 # initializes angle to 0
    -** Processing line: ~    args.state.angle  += 1 # increments angle by 1 every frame (60 times a second)~
    +    args.outputs.background_color = [0, 0, 0]
    +** Processing line: ~    args.outputs.primitives << args.gtk.current_framerate_primitives~
     - Inside source: true
     *** True Line Result
    -    args.state.angle  += 1 # increments angle by 1 every frame (60 times a second)
    +    args.outputs.primitives << args.gtk.current_framerate_primitives
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Outputs sprite using a hash~
    +** Processing line: ~  # resets game, and assigns star count given by user~
     - Inside source: true
     *** True Line Result
    -    # Outputs sprite using a hash
    -** Processing line: ~    args.outputs.sprites << {~
    +  # resets game, and assigns star count given by user
    +** Processing line: ~  def reset_with count: count~
     - Inside source: true
     *** True Line Result
    -    args.outputs.sprites << {
    -** Processing line: ~      x: 30,                          # sprite position~
    +  def reset_with count: count
    +** Processing line: ~    $gtk.reset~
     - Inside source: true
     *** True Line Result
    -      x: 30,                          # sprite position
    -** Processing line: ~      y: 550,~
    +    $gtk.reset
    +** Processing line: ~    $gtk.args.state.star_count = count~
     - Inside source: true
     *** True Line Result
    -      y: 550,
    -** Processing line: ~      w: 128,                         # sprite size~
    +    $gtk.args.state.star_count = count
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -      w: 128,                         # sprite size
    -** Processing line: ~      h: 101,~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      h: 101,
    -** Processing line: ~      path: "dragonruby.png",         # image path~
    +
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
    +*** True Line Result
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +
    +** Processing line: ~*** Performance - Static Sprites As Classes With Custom Drawing - main.rb~
    +- Header detected.
    +*** True Line Result
    +
    +*** True Line Result
    +*** Performance - Static Sprites As Classes With Custom Drawing - main.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/09_performance/06_static_sprites_as_classes_with_custom_drawing/app/main.rb~
     - Inside source: true
     *** True Line Result
    -      path: "dragonruby.png",         # image path
    -** Processing line: ~      angle: args.state.angle,        # angle~
    +  # ./samples/09_performance/06_static_sprites_as_classes_with_custom_drawing/app/main.rb
    +** Processing line: ~  # Sprites represented as Classes, with a draw_override method, and using the queue ~args.outputs.static_sprites~.~
     - Inside source: true
     *** True Line Result
    -      angle: args.state.angle,        # angle
    -** Processing line: ~      a: 255,                         # alpha (transparency)~
    +  # Sprites represented as Classes, with a draw_override method, and using the queue ~args.outputs.static_sprites~.
    +** Processing line: ~  # is the fastest approach. This is comparable to what other game engines set as the default behavior.~
     - Inside source: true
     *** True Line Result
    -      a: 255,                         # alpha (transparency)
    -** Processing line: ~      r: 255,                         # color saturation~
    +  # is the fastest approach. This is comparable to what other game engines set as the default behavior.
    +** Processing line: ~  # There are tradeoffs for all this speed if the creation of a full blown class, and bypassing~
     - Inside source: true
     *** True Line Result
    -      r: 255,                         # color saturation
    -** Processing line: ~      g: 255,~
    +  # There are tradeoffs for all this speed if the creation of a full blown class, and bypassing
    +** Processing line: ~  # functional/data-oriented practices.~
     - Inside source: true
     *** True Line Result
    -      g: 255,
    -** Processing line: ~      b: 255,~
    +  # functional/data-oriented practices.
    +** Processing line: ~  class Star~
     - Inside source: true
     *** True Line Result
    -      b: 255,
    -** Processing line: ~      tile_x:  0,                     # sprite sub division/tile~
    +  class Star
    +** Processing line: ~    def initialize grid~
     - Inside source: true
     *** True Line Result
    -      tile_x:  0,                     # sprite sub division/tile
    -** Processing line: ~      tile_y:  0,~
    +    def initialize grid
    +** Processing line: ~      @grid = grid~
     - Inside source: true
     *** True Line Result
    -      tile_y:  0,
    -** Processing line: ~      tile_w: -1,~
    +      @grid = grid
    +** Processing line: ~      @x = (rand @grid.w) * -1~
     - Inside source: true
     *** True Line Result
    -      tile_w: -1,
    -** Processing line: ~      tile_h: -1,~
    +      @x = (rand @grid.w) * -1
    +** Processing line: ~      @y = (rand @grid.h) * -1~
     - Inside source: true
     *** True Line Result
    -      tile_h: -1,
    -** Processing line: ~      flip_vertically: false,         # don't flip sprite~
    +      @y = (rand @grid.h) * -1
    +** Processing line: ~      @w    = 4~
     - Inside source: true
     *** True Line Result
    -      flip_vertically: false,         # don't flip sprite
    -** Processing line: ~      flip_horizontally: false,~
    +      @w    = 4
    +** Processing line: ~      @h    = 4~
     - Inside source: true
     *** True Line Result
    -      flip_horizontally: false,
    -** Processing line: ~      angle_anchor_x: 0.5,            # rotation center set to middle~
    +      @h    = 4
    +** Processing line: ~      @s    = 1 + (4.randomize :ratio)~
     - Inside source: true
     *** True Line Result
    -      angle_anchor_x: 0.5,            # rotation center set to middle
    -** Processing line: ~      angle_anchor_y: 0.5~
    +      @s    = 1 + (4.randomize :ratio)
    +** Processing line: ~      @path = 'sprites/tiny-star.png'~
     - Inside source: true
     *** True Line Result
    -      angle_anchor_y: 0.5
    -** Processing line: ~    }~
    +      @path = 'sprites/tiny-star.png'
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    }
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Outputs label using a hash~
    +** Processing line: ~    def move~
     - Inside source: true
     *** True Line Result
    -    # Outputs label using a hash
    -** Processing line: ~    args.outputs.labels << {~
    +    def move
    +** Processing line: ~      @x += @s~
     - Inside source: true
     *** True Line Result
    -    args.outputs.labels << {
    -** Processing line: ~      x:              200,                 # label position~
    +      @x += @s
    +** Processing line: ~      @y += @s~
     - Inside source: true
     *** True Line Result
    -      x:              200,                 # label position
    -** Processing line: ~      y:              550,~
    +      @y += @s
    +** Processing line: ~      @x = (rand @grid.w) * -1 if @x > @grid.right~
     - Inside source: true
     *** True Line Result
    -      y:              550,
    -** Processing line: ~      text:           "dragonruby",        # label text~
    +      @x = (rand @grid.w) * -1 if @x > @grid.right
    +** Processing line: ~      @y = (rand @grid.h) * -1 if @y > @grid.top~
     - Inside source: true
     *** True Line Result
    -      text:           "dragonruby",        # label text
    -** Processing line: ~      size_enum:      2,~
    +      @y = (rand @grid.h) * -1 if @y > @grid.top
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      size_enum:      2,
    -** Processing line: ~      alignment_enum: 1,~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      alignment_enum: 1,
    -** Processing line: ~      r:              155,                 # color saturation~
    +
    +** Processing line: ~    # if the object that is in args.outputs.sprites (or static_sprites)~
     - Inside source: true
     *** True Line Result
    -      r:              155,                 # color saturation
    -** Processing line: ~      g:              50,~
    +    # if the object that is in args.outputs.sprites (or static_sprites)
    +** Processing line: ~    # respond_to? :draw_override, then the method is invoked giving you~
     - Inside source: true
     *** True Line Result
    -      g:              50,
    -** Processing line: ~      b:              50,~
    +    # respond_to? :draw_override, then the method is invoked giving you
    +** Processing line: ~    # access to the class used to draw to the canvas.~
     - Inside source: true
     *** True Line Result
    -      b:              50,
    -** Processing line: ~      a:              255,                 # transparency~
    +    # access to the class used to draw to the canvas.
    +** Processing line: ~    def draw_override ffi_draw~
     - Inside source: true
     *** True Line Result
    -      a:              255,                 # transparency
    -** Processing line: ~      font:           "fonts/manaspc.ttf"  # font style; without mentioned file, label won't output correctly~
    +    def draw_override ffi_draw
    +** Processing line: ~      # first move then draw~
     - Inside source: true
     *** True Line Result
    -      font:           "fonts/manaspc.ttf"  # font style; without mentioned file, label won't output correctly
    -** Processing line: ~    }~
    +      # first move then draw
    +** Processing line: ~      move~
     - Inside source: true
     *** True Line Result
    -    }
    +      move
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Outputs solid using a hash~
    +** Processing line: ~      # The argument order for ffi.draw_sprite is:~
     - Inside source: true
     *** True Line Result
    -    # Outputs solid using a hash
    -** Processing line: ~    # [X, Y, WIDTH, HEIGHT, RED, GREEN, BLUE, ALPHA]~
    +      # The argument order for ffi.draw_sprite is:
    +** Processing line: ~      # x, y, w, h, path~
     - Inside source: true
     *** True Line Result
    -    # [X, Y, WIDTH, HEIGHT, RED, GREEN, BLUE, ALPHA]
    -** Processing line: ~    args.outputs.solids << {~
    +      # x, y, w, h, path
    +** Processing line: ~      ffi_draw.draw_sprite @x, @y, @w, @h, @path~
     - Inside source: true
     *** True Line Result
    -    args.outputs.solids << {
    -** Processing line: ~      x: 400,                         # position~
    +      ffi_draw.draw_sprite @x, @y, @w, @h, @path
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      x: 400,                         # position
    -** Processing line: ~      y: 550,~
    +
    +** Processing line: ~      # The argument order for ffi_draw.draw_sprite_2 is (pass in nil for default value):~
     - Inside source: true
     *** True Line Result
    -      y: 550,
    -** Processing line: ~      w: 160,                         # size~
    +      # The argument order for ffi_draw.draw_sprite_2 is (pass in nil for default value):
    +** Processing line: ~      # x, y, w, h, path,~
     - Inside source: true
     *** True Line Result
    -      w: 160,                         # size
    -** Processing line: ~      h:  90,~
    +      # x, y, w, h, path,
    +** Processing line: ~      # angle, alpha~
     - Inside source: true
     *** True Line Result
    -      h:  90,
    -** Processing line: ~      r: 120,                         # color saturation~
    +      # angle, alpha
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      r: 120,                         # color saturation
    -** Processing line: ~      g:  50,~
    +
    +** Processing line: ~      # The argument order for ffi_draw.draw_sprite_3 is:~
     - Inside source: true
     *** True Line Result
    -      g:  50,
    -** Processing line: ~      b:  50,~
    +      # The argument order for ffi_draw.draw_sprite_3 is:
    +** Processing line: ~      # x, y, w, h,~
     - Inside source: true
     *** True Line Result
    -      b:  50,
    -** Processing line: ~      a: 255                          # transparency~
    +      # x, y, w, h,
    +** Processing line: ~      # path,~
     - Inside source: true
     *** True Line Result
    -      a: 255                          # transparency
    -** Processing line: ~    }~
    +      # path,
    +** Processing line: ~      # angle,~
     - Inside source: true
     *** True Line Result
    -    }
    +      # angle,
    +** Processing line: ~      # alpha, red_saturation, green_saturation, blue_saturation~
    +- Inside source: true
    +*** True Line Result
    +      # alpha, red_saturation, green_saturation, blue_saturation
    +** Processing line: ~      # tile_x, tile_y, tile_w, tile_h,~
    +- Inside source: true
    +*** True Line Result
    +      # tile_x, tile_y, tile_w, tile_h,
    +** Processing line: ~      # flip_horizontally, flip_vertically,~
    +- Inside source: true
    +*** True Line Result
    +      # flip_horizontally, flip_vertically,
    +** Processing line: ~      # angle_anchor_x, angle_anchor_y,~
    +- Inside source: true
    +*** True Line Result
    +      # angle_anchor_x, angle_anchor_y,
    +** Processing line: ~      # source_x, source_y, source_w, source_h~
    +- Inside source: true
    +*** True Line Result
    +      # source_x, source_y, source_w, source_h
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Outputs border using a hash~
    +** Processing line: ~      # The argument order for ffi_draw.draw_sprite_4 is:~
     - Inside source: true
     *** True Line Result
    -    # Outputs border using a hash
    -** Processing line: ~    # Same parameters as a solid~
    +      # The argument order for ffi_draw.draw_sprite_4 is:
    +** Processing line: ~      # x, y, w, h,~
     - Inside source: true
     *** True Line Result
    -    # Same parameters as a solid
    -** Processing line: ~    args.outputs.borders << {~
    +      # x, y, w, h,
    +** Processing line: ~      # path,~
     - Inside source: true
     *** True Line Result
    -    args.outputs.borders << {
    -** Processing line: ~      x: 600,~
    +      # path,
    +** Processing line: ~      # angle,~
     - Inside source: true
     *** True Line Result
    -      x: 600,
    -** Processing line: ~      y: 550,~
    +      # angle,
    +** Processing line: ~      # alpha, red_saturation, green_saturation, blue_saturation~
     - Inside source: true
     *** True Line Result
    -      y: 550,
    -** Processing line: ~      w: 160,~
    +      # alpha, red_saturation, green_saturation, blue_saturation
    +** Processing line: ~      # tile_x, tile_y, tile_w, tile_h,~
     - Inside source: true
     *** True Line Result
    -      w: 160,
    -** Processing line: ~      h:  90,~
    +      # tile_x, tile_y, tile_w, tile_h,
    +** Processing line: ~      # flip_horizontally, flip_vertically,~
     - Inside source: true
     *** True Line Result
    -      h:  90,
    -** Processing line: ~      r: 120,~
    +      # flip_horizontally, flip_vertically,
    +** Processing line: ~      # angle_anchor_x, angle_anchor_y,~
     - Inside source: true
     *** True Line Result
    -      r: 120,
    -** Processing line: ~      g:  50,~
    +      # angle_anchor_x, angle_anchor_y,
    +** Processing line: ~      # source_x, source_y, source_w, source_h,~
     - Inside source: true
     *** True Line Result
    -      g:  50,
    -** Processing line: ~      b:  50,~
    +      # source_x, source_y, source_w, source_h,
    +** Processing line: ~      # blendmode_enum~
     - Inside source: true
     *** True Line Result
    -      b:  50,
    -** Processing line: ~      a: 255~
    +      # blendmode_enum
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      a: 255
    -** Processing line: ~    }~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    }
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Outputs line using a hash~
    +** Processing line: ~  # calls methods needed for game to run properly~
     - Inside source: true
     *** True Line Result
    -    # Outputs line using a hash
    -** Processing line: ~    args.outputs.lines << {~
    +  # calls methods needed for game to run properly
    +** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
    -    args.outputs.lines << {
    -** Processing line: ~      x:  900,                        # starting position~
    +  def tick args
    +** Processing line: ~    # sets console command when sample app initially opens~
     - Inside source: true
     *** True Line Result
    -      x:  900,                        # starting position
    -** Processing line: ~      y:  550,~
    +    # sets console command when sample app initially opens
    +** Processing line: ~    if Kernel.global_tick_count == 0~
     - Inside source: true
     *** True Line Result
    -      y:  550,
    -** Processing line: ~      x2: 1200,                       # ending position~
    +    if Kernel.global_tick_count == 0
    +** Processing line: ~      puts ""~
     - Inside source: true
     *** True Line Result
    -      x2: 1200,                       # ending position
    -** Processing line: ~      y2: 550,~
    +      puts ""
    +** Processing line: ~      puts ""~
     - Inside source: true
     *** True Line Result
    -      y2: 550,
    -** Processing line: ~      r:  120,                        # color saturation~
    +      puts ""
    +** Processing line: ~      puts "========================================================="~
     - Inside source: true
     *** True Line Result
    -      r:  120,                        # color saturation
    -** Processing line: ~      g:   50,~
    +      puts "========================================================="
    +** Processing line: ~      puts "* INFO: Static Sprites, Classes, Draw Override"~
     - Inside source: true
     *** True Line Result
    -      g:   50,
    -** Processing line: ~      b:   50,~
    +      puts "* INFO: Static Sprites, Classes, Draw Override"
    +** Processing line: ~      puts "* INFO: Please specify the number of sprites to render."~
     - Inside source: true
     *** True Line Result
    -      b:   50,
    -** Processing line: ~      a:  255                         # transparency~
    +      puts "* INFO: Please specify the number of sprites to render."
    +** Processing line: ~      args.gtk.console.set_command "reset_with count: 100"~
     - Inside source: true
     *** True Line Result
    -      a:  255                         # transparency
    -** Processing line: ~    }~
    +      args.gtk.console.set_command "reset_with count: 100"
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    }
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Outputs sprite as a primitive using a hash~
    +** Processing line: ~    # init~
     - Inside source: true
     *** True Line Result
    -    # Outputs sprite as a primitive using a hash
    -** Processing line: ~    args.outputs.primitives << {~
    +    # init
    +** Processing line: ~    if args.state.tick_count == 0~
     - Inside source: true
     *** True Line Result
    -    args.outputs.primitives << {
    -** Processing line: ~      x: 30,                          # position~
    +    if args.state.tick_count == 0
    +** Processing line: ~      args.state.stars = args.state.star_count.map { |i| Star.new args.grid }~
     - Inside source: true
     *** True Line Result
    -      x: 30,                          # position
    -** Processing line: ~      y: 200,~
    +      args.state.stars = args.state.star_count.map { |i| Star.new args.grid }
    +** Processing line: ~      args.outputs.static_sprites << args.state.stars~
     - Inside source: true
     *** True Line Result
    -      y: 200,
    -** Processing line: ~      w: 128,                         # size~
    +      args.outputs.static_sprites << args.state.stars
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      w: 128,                         # size
    -** Processing line: ~      h: 101,~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      h: 101,
    -** Processing line: ~      path: "dragonruby.png",         # image path~
    +
    +** Processing line: ~    # render framerate~
     - Inside source: true
     *** True Line Result
    -      path: "dragonruby.png",         # image path
    -** Processing line: ~      angle: args.state.angle,        # angle~
    +    # render framerate
    +** Processing line: ~    args.outputs.background_color = [0, 0, 0]~
     - Inside source: true
     *** True Line Result
    -      angle: args.state.angle,        # angle
    -** Processing line: ~      a: 255,                         # transparency~
    +    args.outputs.background_color = [0, 0, 0]
    +** Processing line: ~    args.outputs.primitives << args.gtk.current_framerate_primitives~
     - Inside source: true
     *** True Line Result
    -      a: 255,                         # transparency
    -** Processing line: ~      r: 255,                         # color saturation~
    +    args.outputs.primitives << args.gtk.current_framerate_primitives
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -      r: 255,                         # color saturation
    -** Processing line: ~      g: 255,~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      g: 255,
    -** Processing line: ~      b: 255,~
    +
    +** Processing line: ~  # resets game, and assigns star count given by user~
     - Inside source: true
     *** True Line Result
    -      b: 255,
    -** Processing line: ~      tile_x:  0,                     # sprite sub division/tile~
    +  # resets game, and assigns star count given by user
    +** Processing line: ~  def reset_with count: count~
     - Inside source: true
     *** True Line Result
    -      tile_x:  0,                     # sprite sub division/tile
    -** Processing line: ~      tile_y:  0,~
    +  def reset_with count: count
    +** Processing line: ~    $gtk.reset~
     - Inside source: true
     *** True Line Result
    -      tile_y:  0,
    -** Processing line: ~      tile_w: -1,~
    +    $gtk.reset
    +** Processing line: ~    $gtk.args.state.star_count = count~
     - Inside source: true
     *** True Line Result
    -      tile_w: -1,
    -** Processing line: ~      tile_h: -1,~
    +    $gtk.args.state.star_count = count
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
    +*** True Line Result
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +
    +** Processing line: ~*** Performance - Collision Limits - main.rb~
    +- Header detected.
    +*** True Line Result
    +
    +*** True Line Result
    +*** Performance - Collision Limits - main.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/09_performance/07_collision_limits/app/main.rb~
     - Inside source: true
     *** True Line Result
    -      tile_h: -1,
    -** Processing line: ~      flip_vertically: false,         # don't flip~
    +  # ./samples/09_performance/07_collision_limits/app/main.rb
    +** Processing line: ~  =begin~
     - Inside source: true
     *** True Line Result
    -      flip_vertically: false,         # don't flip
    -** Processing line: ~      flip_horizontally: false,~
    +  =begin
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      flip_horizontally: false,
    -** Processing line: ~      angle_anchor_x: 0.5,            # rotation center set to middle~
    +
    +** Processing line: ~   Reminders:~
     - Inside source: true
     *** True Line Result
    -      angle_anchor_x: 0.5,            # rotation center set to middle
    -** Processing line: ~      angle_anchor_y: 0.5~
    +   Reminders:
    +** Processing line: ~   - find_all: Finds all elements of a collection that meet certain requirements.~
     - Inside source: true
     *** True Line Result
    -      angle_anchor_y: 0.5
    -** Processing line: ~    }.sprite~
    +   - find_all: Finds all elements of a collection that meet certain requirements.
    +** Processing line: ~     In this sample app, we're finding all bodies that intersect with the center body.~
     - Inside source: true
     *** True Line Result
    -    }.sprite
    +     In this sample app, we're finding all bodies that intersect with the center body.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Outputs label as primitive using a hash~
    +** Processing line: ~   - args.outputs.solids: An array. The values generate a solid.~
     - Inside source: true
     *** True Line Result
    -    # Outputs label as primitive using a hash
    -** Processing line: ~    args.outputs.primitives << {~
    +   - args.outputs.solids: An array. The values generate a solid.
    +** Processing line: ~     The parameters are [X, Y, WIDTH, HEIGHT, RED, GREEN, BLUE]~
     - Inside source: true
     *** True Line Result
    -    args.outputs.primitives << {
    -** Processing line: ~      x:         200,                 # position~
    +     The parameters are [X, Y, WIDTH, HEIGHT, RED, GREEN, BLUE]
    +** Processing line: ~     For more information about solids, go to mygame/documentation/03-solids-and-borders.md.~
     - Inside source: true
     *** True Line Result
    -      x:         200,                 # position
    -** Processing line: ~      y:         200,~
    +     For more information about solids, go to mygame/documentation/03-solids-and-borders.md.
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      y:         200,
    -** Processing line: ~      text:      "dragonruby",        # text~
    +
    +** Processing line: ~   - args.outputs.labels: An array. The values generate a label.~
     - Inside source: true
     *** True Line Result
    -      text:      "dragonruby",        # text
    -** Processing line: ~      size:      2,~
    +   - args.outputs.labels: An array. The values generate a label.
    +** Processing line: ~     The parameters are [X, Y, TEXT, SIZE, ALIGNMENT, RED, GREEN, BLUE, ALPHA, FONT STYLE]~
     - Inside source: true
     *** True Line Result
    -      size:      2,
    -** Processing line: ~      alignment: 1,~
    +     The parameters are [X, Y, TEXT, SIZE, ALIGNMENT, RED, GREEN, BLUE, ALPHA, FONT STYLE]
    +** Processing line: ~     For more information about labels, go to mygame/documentation/02-labels.md.~
     - Inside source: true
     *** True Line Result
    -      alignment: 1,
    -** Processing line: ~      r:         155,                 # color saturation~
    +     For more information about labels, go to mygame/documentation/02-labels.md.
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      r:         155,                 # color saturation
    -** Processing line: ~      g:         50,~
    +
    +** Processing line: ~   - ARRAY#intersect_rect?: Returns true or false depending on if two rectangles intersect.~
     - Inside source: true
     *** True Line Result
    -      g:         50,
    -** Processing line: ~      b:         50,~
    +   - ARRAY#intersect_rect?: Returns true or false depending on if two rectangles intersect.
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      b:         50,
    -** Processing line: ~      a:         255,                 # transparency~
    +
    +** Processing line: ~  =end~
     - Inside source: true
     *** True Line Result
    -      a:         255,                 # transparency
    -** Processing line: ~      font:      "fonts/manaspc.ttf"  # font style~
    +  =end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      font:      "fonts/manaspc.ttf"  # font style
    -** Processing line: ~    }.label~
    +
    +** Processing line: ~  # This code demonstrates moving objects that loop around once they exceed the scope of the screen,~
    +- Inside source: true
    +*** True Line Result
    +  # This code demonstrates moving objects that loop around once they exceed the scope of the screen,
    +** Processing line: ~  # which has dimensions of 1280 by 720, and also detects collisions between objects called "bodies".~
     - Inside source: true
     *** True Line Result
    -    }.label
    +  # which has dimensions of 1280 by 720, and also detects collisions between objects called "bodies".
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Outputs solid as primitive using a hash~
    +** Processing line: ~  def body_count num~
     - Inside source: true
     *** True Line Result
    -    # Outputs solid as primitive using a hash
    -** Processing line: ~    args.outputs.primitives << {~
    +  def body_count num
    +** Processing line: ~    $gtk.args.state.other_bodies = num.map { [1280 * rand, 720 * rand, 10, 10] } # other_bodies set using num collection~
     - Inside source: true
     *** True Line Result
    -    args.outputs.primitives << {
    -** Processing line: ~      x: 400,                         # position~
    +    $gtk.args.state.other_bodies = num.map { [1280 * rand, 720 * rand, 10, 10] } # other_bodies set using num collection
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -      x: 400,                         # position
    -** Processing line: ~      y: 200,~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      y: 200,
    -** Processing line: ~      w: 160,                         # size~
    +
    +** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
    -      w: 160,                         # size
    -** Processing line: ~      h:  90,~
    +  def tick args
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      h:  90,
    -** Processing line: ~      r: 120,                         # color saturation~
    +
    +** Processing line: ~    # Center body's values are set using an array~
     - Inside source: true
     *** True Line Result
    -      r: 120,                         # color saturation
    -** Processing line: ~      g:  50,~
    +    # Center body's values are set using an array
    +** Processing line: ~    # Map is used to set values of 2000 other bodies~
     - Inside source: true
     *** True Line Result
    -      g:  50,
    -** Processing line: ~      b:  50,~
    +    # Map is used to set values of 2000 other bodies
    +** Processing line: ~    # All bodies that intersect with center body are stored in collisions collection~
     - Inside source: true
     *** True Line Result
    -      b:  50,
    -** Processing line: ~      a: 255                          # transparency~
    +    # All bodies that intersect with center body are stored in collisions collection
    +** Processing line: ~    args.state.center_body  ||= [640 - 100, 360 - 100, 200, 200] # calculations done to place body in center~
     - Inside source: true
     *** True Line Result
    -      a: 255                          # transparency
    -** Processing line: ~    }.solid~
    +    args.state.center_body  ||= [640 - 100, 360 - 100, 200, 200] # calculations done to place body in center
    +** Processing line: ~    args.state.other_bodies ||= 2000.map { [1280 * rand, 720 * rand, 10, 10] } # 2000 bodies given random position on screen~
     - Inside source: true
     *** True Line Result
    -    }.solid
    +    args.state.other_bodies ||= 2000.map { [1280 * rand, 720 * rand, 10, 10] } # 2000 bodies given random position on screen
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Outputs border as primitive using a hash~
    -- Inside source: true
    -*** True Line Result
    -    # Outputs border as primitive using a hash
    -** Processing line: ~    # Same parameters as solid~
    -- Inside source: true
    -*** True Line Result
    -    # Same parameters as solid
    -** Processing line: ~    args.outputs.primitives << {~
    +** Processing line: ~    # finds all bodies that intersect with center body, stores them in collisions~
     - Inside source: true
     *** True Line Result
    -    args.outputs.primitives << {
    -** Processing line: ~      x: 600,                         # position~
    +    # finds all bodies that intersect with center body, stores them in collisions
    +** Processing line: ~    collisions = args.state.other_bodies.find_all { |b| b.intersect_rect? args.state.center_body }~
     - Inside source: true
     *** True Line Result
    -      x: 600,                         # position
    -** Processing line: ~      y: 200,~
    +    collisions = args.state.other_bodies.find_all { |b| b.intersect_rect? args.state.center_body }
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      y: 200,
    -** Processing line: ~      w: 160,                         # size~
    +
    +** Processing line: ~    args.borders << args.state.center_body # outputs center body as a black border~
     - Inside source: true
     *** True Line Result
    -      w: 160,                         # size
    -** Processing line: ~      h:  90,~
    +    args.borders << args.state.center_body # outputs center body as a black border
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      h:  90,
    -** Processing line: ~      r: 120,                         # color saturation~
    +
    +** Processing line: ~    # transparency changes based on number of collisions; the more collisions, the redder (more transparent) the box becomes~
     - Inside source: true
     *** True Line Result
    -      r: 120,                         # color saturation
    -** Processing line: ~      g:  50,~
    +    # transparency changes based on number of collisions; the more collisions, the redder (more transparent) the box becomes
    +** Processing line: ~    args.solids  << [args.state.center_body, 255, 0, 0, collisions.length * 5] # center body is red solid~
     - Inside source: true
     *** True Line Result
    -      g:  50,
    -** Processing line: ~      b:  50,~
    +    args.solids  << [args.state.center_body, 255, 0, 0, collisions.length * 5] # center body is red solid
    +** Processing line: ~    args.solids  << args.state.other_bodies # other bodies are output as (black) solids, as well~
     - Inside source: true
     *** True Line Result
    -      b:  50,
    -** Processing line: ~      a: 255                          # transparency~
    +    args.solids  << args.state.other_bodies # other bodies are output as (black) solids, as well
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      a: 255                          # transparency
    -** Processing line: ~    }.border~
    +
    +** Processing line: ~    args.labels  << [10, 30, args.gtk.current_framerate] # outputs frame rate in bottom left corner~
     - Inside source: true
     *** True Line Result
    -    }.border
    +    args.labels  << [10, 30, args.gtk.current_framerate] # outputs frame rate in bottom left corner
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Outputs line as primitive using a hash~
    -- Inside source: true
    -*** True Line Result
    -    # Outputs line as primitive using a hash
    -** Processing line: ~    args.outputs.primitives << {~
    +** Processing line: ~    # Bodies are returned to bottom left corner if positions exceed scope of screen~
     - Inside source: true
     *** True Line Result
    -    args.outputs.primitives << {
    -** Processing line: ~      x:  900,                        # starting position~
    +    # Bodies are returned to bottom left corner if positions exceed scope of screen
    +** Processing line: ~    args.state.other_bodies.each do |b| # for each body in the other_bodies collection~
     - Inside source: true
     *** True Line Result
    -      x:  900,                        # starting position
    -** Processing line: ~      y:  200,~
    +    args.state.other_bodies.each do |b| # for each body in the other_bodies collection
    +** Processing line: ~      b.x += 5 # x and y are both incremented by 5~
     - Inside source: true
     *** True Line Result
    -      y:  200,
    -** Processing line: ~      x2: 1200,                       # ending position~
    +      b.x += 5 # x and y are both incremented by 5
    +** Processing line: ~      b.y += 5~
     - Inside source: true
     *** True Line Result
    -      x2: 1200,                       # ending position
    -** Processing line: ~      y2: 200,~
    +      b.y += 5
    +** Processing line: ~      b.x = 0 if b.x > 1280 # x becomes 0 if star exceeds scope of screen (goes too far right)~
     - Inside source: true
     *** True Line Result
    -      y2: 200,
    -** Processing line: ~      r:  120,                        # color saturation~
    +      b.x = 0 if b.x > 1280 # x becomes 0 if star exceeds scope of screen (goes too far right)
    +** Processing line: ~      b.y = 0 if b.y > 720 # y becomes 0 if star exceeds scope of screen (goes too far up)~
     - Inside source: true
     *** True Line Result
    -      r:  120,                        # color saturation
    -** Processing line: ~      g:   50,~
    +      b.y = 0 if b.y > 720 # y becomes 0 if star exceeds scope of screen (goes too far up)
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      g:   50,
    -** Processing line: ~      b:   50,~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -      b:   50,
    -** Processing line: ~      a:  255                         # transparency~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      a:  255                         # transparency
    -** Processing line: ~    }.line~
    +
    +** Processing line: ~  # Resets the game.~
     - Inside source: true
     *** True Line Result
    -    }.line
    -** Processing line: ~  end~
    +  # Resets the game.
    +** Processing line: ~  $gtk.reset~
     - Inside source: true
     *** True Line Result
    -  end
    +  $gtk.reset
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
    @@ -49448,122 +57731,122 @@ Follows is a source code listing for all files that have been open sourced. This
     - End of paragraph detected.
     *** True Line Result
     
    -** Processing line: ~*** Advanced Rendering - Pixel Arrays - main.rb~
    +** Processing line: ~*** Advanced Debugging - Trace Debugging - main.rb~
     - Header detected.
     *** True Line Result
     
     *** True Line Result
    -*** Advanced Rendering - Pixel Arrays - main.rb
    +*** Advanced Debugging - Trace Debugging - main.rb
     ** Processing line: ~#+begin_src ruby~
     - Line was identified as the beginning of a code block.
     *** True Line Result
     
     *** True Line Result
     #+begin_src ruby
    -** Processing line: ~  # ./samples/07_advanced_rendering/06_pixel_arrays/app/main.rb~
    +** Processing line: ~  # ./samples/10_advanced_debugging/01_trace_debugging/app/main.rb~
     - Inside source: true
     *** True Line Result
    -  # ./samples/07_advanced_rendering/06_pixel_arrays/app/main.rb
    -** Processing line: ~  $gtk.reset~
    +  # ./samples/10_advanced_debugging/01_trace_debugging/app/main.rb
    +** Processing line: ~  class Game~
     - Inside source: true
     *** True Line Result
    -  $gtk.reset
    -** Processing line: ~~
    +  class Game
    +** Processing line: ~    attr_gtk~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def tick args~
    +    attr_gtk
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  def tick args
    -** Processing line: ~    args.state.posinc ||= 1~
    +
    +** Processing line: ~    def method1 num~
     - Inside source: true
     *** True Line Result
    -    args.state.posinc ||= 1
    -** Processing line: ~    args.state.pos ||= 0~
    +    def method1 num
    +** Processing line: ~      method2 num~
     - Inside source: true
     *** True Line Result
    -    args.state.pos ||= 0
    -** Processing line: ~    args.state.rotation ||= 0~
    +      method2 num
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    args.state.rotation ||= 0
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    dimension = 10  # keep it small and let the GPU scale it when rendering the sprite.~
    +** Processing line: ~    def method2 num~
     - Inside source: true
     *** True Line Result
    -    dimension = 10  # keep it small and let the GPU scale it when rendering the sprite.
    -** Processing line: ~~
    +    def method2 num
    +** Processing line: ~      method3 num~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # Set up our "scanner" pixel array and fill it with black pixels.~
    +      method3 num
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    # Set up our "scanner" pixel array and fill it with black pixels.
    -** Processing line: ~    args.pixel_array(:scanner).width = dimension~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    args.pixel_array(:scanner).width = dimension
    -** Processing line: ~    args.pixel_array(:scanner).height = dimension~
    +
    +** Processing line: ~    def method3 num~
     - Inside source: true
     *** True Line Result
    -    args.pixel_array(:scanner).height = dimension
    -** Processing line: ~    args.pixel_array(:scanner).pixels.fill(0xFF000000, 0, dimension * dimension)  # black, full alpha~
    +    def method3 num
    +** Processing line: ~      method4 num~
     - Inside source: true
     *** True Line Result
    -    args.pixel_array(:scanner).pixels.fill(0xFF000000, 0, dimension * dimension)  # black, full alpha
    -** Processing line: ~~
    +      method4 num
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # Draw a green line that bounces up and down the sprite.~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    # Draw a green line that bounces up and down the sprite.
    -** Processing line: ~    args.pixel_array(:scanner).pixels.fill(0xFF00FF00, dimension * args.state.pos, dimension)  # green, full alpha~
    +
    +** Processing line: ~    def method4 num~
     - Inside source: true
     *** True Line Result
    -    args.pixel_array(:scanner).pixels.fill(0xFF00FF00, dimension * args.state.pos, dimension)  # green, full alpha
    -** Processing line: ~~
    +    def method4 num
    +** Processing line: ~      if num == 1~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # Adjust position for next frame.~
    +      if num == 1
    +** Processing line: ~        puts "UNLUCKY #{num}."~
     - Inside source: true
     *** True Line Result
    -    # Adjust position for next frame.
    -** Processing line: ~    args.state.pos += args.state.posinc~
    +        puts "UNLUCKY #{num}."
    +** Processing line: ~        state.unlucky_count += 1~
     - Inside source: true
     *** True Line Result
    -    args.state.pos += args.state.posinc
    -** Processing line: ~    if args.state.posinc > 0 && args.state.pos >= dimension~
    +        state.unlucky_count += 1
    +** Processing line: ~        if state.unlucky_count > 3~
     - Inside source: true
     *** True Line Result
    -    if args.state.posinc > 0 && args.state.pos >= dimension
    -** Processing line: ~      args.state.posinc = -1~
    +        if state.unlucky_count > 3
    +** Processing line: ~          raise "NAT 1 finally occurred. Check app/trace.txt for all method invocation history."~
     - Inside source: true
     *** True Line Result
    -      args.state.posinc = -1
    -** Processing line: ~      args.state.pos = dimension - 1~
    +          raise "NAT 1 finally occurred. Check app/trace.txt for all method invocation history."
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -      args.state.pos = dimension - 1
    -** Processing line: ~    elsif args.state.posinc < 0 && args.state.pos < 0~
    +        end
    +** Processing line: ~      else~
     - Inside source: true
     *** True Line Result
    -    elsif args.state.posinc < 0 && args.state.pos < 0
    -** Processing line: ~      args.state.posinc = 1~
    +      else
    +** Processing line: ~        puts "LUCKY #{num}."~
     - Inside source: true
     *** True Line Result
    -      args.state.posinc = 1
    -** Processing line: ~      args.state.pos = 1~
    +        puts "LUCKY #{num}."
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -      args.state.pos = 1
    +      end
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -49572,54 +57855,74 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # New/changed pixel arrays get uploaded to the GPU before we render~
    +** Processing line: ~    def tick~
     - Inside source: true
     *** True Line Result
    -    # New/changed pixel arrays get uploaded to the GPU before we render
    -** Processing line: ~    #  anything. At that point, they can be scaled, rotated, and otherwise~
    +    def tick
    +** Processing line: ~      state.roll_history ||= []~
     - Inside source: true
     *** True Line Result
    -    #  anything. At that point, they can be scaled, rotated, and otherwise
    -** Processing line: ~    #  used like any other sprite.~
    +      state.roll_history ||= []
    +** Processing line: ~      state.roll_history << rand(20) + 1~
     - Inside source: true
     *** True Line Result
    -    #  used like any other sprite.
    -** Processing line: ~    w = 100~
    +      state.roll_history << rand(20) + 1
    +** Processing line: ~      state.countdown ||= 600~
     - Inside source: true
     *** True Line Result
    -    w = 100
    -** Processing line: ~    h = 100~
    +      state.countdown ||= 600
    +** Processing line: ~      state.countdown  -= 1~
     - Inside source: true
     *** True Line Result
    -    h = 100
    -** Processing line: ~    x = (1280 - w) / 2~
    +      state.countdown  -= 1
    +** Processing line: ~      state.unlucky_count ||= 0~
     - Inside source: true
     *** True Line Result
    -    x = (1280 - w) / 2
    -** Processing line: ~    y = (720 - h) / 2~
    +      state.unlucky_count ||= 0
    +** Processing line: ~      outputs.labels << [640, 360, "A dice roll of 1 will cause an exception.", 0, 1]~
     - Inside source: true
     *** True Line Result
    -    y = (720 - h) / 2
    -** Processing line: ~    args.outputs.background_color = [64, 0, 128]~
    +      outputs.labels << [640, 360, "A dice roll of 1 will cause an exception.", 0, 1]
    +** Processing line: ~      if state.countdown > 0~
     - Inside source: true
     *** True Line Result
    -    args.outputs.background_color = [64, 0, 128]
    -** Processing line: ~    args.outputs.primitives << [x, y, w, h, :scanner, args.state.rotation].sprite~
    +      if state.countdown > 0
    +** Processing line: ~        outputs.labels << [640, 340, "Dice roll countdown: #{state.countdown}", 0, 1]~
     - Inside source: true
     *** True Line Result
    -    args.outputs.primitives << [x, y, w, h, :scanner, args.state.rotation].sprite
    -** Processing line: ~    args.state.rotation += 1~
    +        outputs.labels << [640, 340, "Dice roll countdown: #{state.countdown}", 0, 1]
    +** Processing line: ~      else~
     - Inside source: true
     *** True Line Result
    -    args.state.rotation += 1
    -** Processing line: ~~
    +      else
    +** Processing line: ~        state.attempts ||= 0~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    args.outputs.primitives << args.gtk.current_framerate_primitives~
    +        state.attempts ||= 0
    +** Processing line: ~        state.attempts  += 1~
     - Inside source: true
     *** True Line Result
    -    args.outputs.primitives << args.gtk.current_framerate_primitives
    +        state.attempts  += 1
    +** Processing line: ~        outputs.labels << [640, 340, "ROLLING! #{state.attempts}", 0, 1]~
    +- Inside source: true
    +*** True Line Result
    +        outputs.labels << [640, 340, "ROLLING! #{state.attempts}", 0, 1]
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~      return if state.countdown > 0~
    +- Inside source: true
    +*** True Line Result
    +      return if state.countdown > 0
    +** Processing line: ~      method1 state.roll_history[-1]~
    +- Inside source: true
    +*** True Line Result
    +      method1 state.roll_history[-1]
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -49628,6 +57931,34 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    +** Processing line: ~  $game = Game.new~
    +- Inside source: true
    +*** True Line Result
    +  $game = Game.new
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~  def tick args~
    +- Inside source: true
    +*** True Line Result
    +  def tick args
    +** Processing line: ~    trace! $game # <------------------- TRACING ENABLED FOR THIS OBJECT~
    +- Inside source: true
    +*** True Line Result
    +    trace! $game # <------------------- TRACING ENABLED FOR THIS OBJECT
    +** Processing line: ~    $game.args = args~
    +- Inside source: true
    +*** True Line Result
    +    $game.args = args
    +** Processing line: ~    $game.tick~
    +- Inside source: true
    +*** True Line Result
    +    $game.tick
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
    @@ -49640,50 +57971,54 @@ Follows is a source code listing for all files that have been open sourced. This
     - End of paragraph detected.
     *** True Line Result
     
    -** Processing line: ~*** Advanced Rendering - Splitscreen Camera - main.rb~
    +** Processing line: ~*** Advanced Debugging - Trace Debugging Classes - main.rb~
     - Header detected.
     *** True Line Result
     
     *** True Line Result
    -*** Advanced Rendering - Splitscreen Camera - main.rb
    +*** Advanced Debugging - Trace Debugging Classes - main.rb
     ** Processing line: ~#+begin_src ruby~
     - Line was identified as the beginning of a code block.
     *** True Line Result
     
     *** True Line Result
     #+begin_src ruby
    -** Processing line: ~  # ./samples/07_advanced_rendering/07_splitscreen_camera/app/main.rb~
    +** Processing line: ~  # ./samples/10_advanced_debugging/02_trace_debugging_classes/app/main.rb~
     - Inside source: true
     *** True Line Result
    -  # ./samples/07_advanced_rendering/07_splitscreen_camera/app/main.rb
    -** Processing line: ~  class CameraMovement~
    +  # ./samples/10_advanced_debugging/02_trace_debugging_classes/app/main.rb
    +** Processing line: ~  class Foobar~
     - Inside source: true
     *** True Line Result
    -  class CameraMovement
    -** Processing line: ~    attr_accessor :state, :inputs, :outputs, :grid~
    +  class Foobar
    +** Processing line: ~    def initialize~
     - Inside source: true
     *** True Line Result
    -    attr_accessor :state, :inputs, :outputs, :grid
    -** Processing line: ~~
    +    def initialize
    +** Processing line: ~      trace! # Trace is added to the constructor.~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    #==============================================================================================~
    +      trace! # Trace is added to the constructor.
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    #==============================================================================================
    -** Processing line: ~    #Serialize~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    #Serialize
    -** Processing line: ~    def serialize~
    +
    +** Processing line: ~    def clicky args~
     - Inside source: true
     *** True Line Result
    -    def serialize
    -** Processing line: ~      {state: state, inputs: inputs, outputs: outputs, grid: grid }~
    +    def clicky args
    +** Processing line: ~      return unless args.inputs.mouse.click~
     - Inside source: true
     *** True Line Result
    -      {state: state, inputs: inputs, outputs: outputs, grid: grid }
    +      return unless args.inputs.mouse.click
    +** Processing line: ~      try_rand rand~
    +- Inside source: true
    +*** True Line Result
    +      try_rand rand
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -49692,1018 +58027,1198 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def inspect~
    +** Processing line: ~    def try_rand num~
     - Inside source: true
     *** True Line Result
    -    def inspect
    -** Processing line: ~      serialize.to_s~
    +    def try_rand num
    +** Processing line: ~      return if num < 0.9~
     - Inside source: true
     *** True Line Result
    -      serialize.to_s
    +      return if num < 0.9
    +** Processing line: ~      raise "Exception finally occurred. Take a look at logs/trace.txt #{num}."~
    +- Inside source: true
    +*** True Line Result
    +      raise "Exception finally occurred. Take a look at logs/trace.txt #{num}."
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
         end
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def to_s~
    +** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
    -    def to_s
    -** Processing line: ~      serialize.to_s~
    +  def tick args
    +** Processing line: ~    args.labels << [640, 360, "Start clicking. Eventually an exception will be thrown. Then look at logs/trace.txt.", 0, 1]~
     - Inside source: true
     *** True Line Result
    -      serialize.to_s
    -** Processing line: ~    end~
    +    args.labels << [640, 360, "Start clicking. Eventually an exception will be thrown. Then look at logs/trace.txt.", 0, 1]
    +** Processing line: ~    args.state.foobar = Foobar.new if args.tick_count~
     - Inside source: true
     *** True Line Result
    -    end
    +    args.state.foobar = Foobar.new if args.tick_count
    +** Processing line: ~    return unless args.state.foobar~
    +- Inside source: true
    +*** True Line Result
    +    return unless args.state.foobar
    +** Processing line: ~    args.state.foobar.clicky args~
    +- Inside source: true
    +*** True Line Result
    +    args.state.foobar.clicky args
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    #==============================================================================================~
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
    +*** True Line Result
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +
    +** Processing line: ~*** Advanced Debugging - Unit Tests - benchmark_api_tests.rb~
    +- Header detected.
    +*** True Line Result
    +
    +*** True Line Result
    +*** Advanced Debugging - Unit Tests - benchmark_api_tests.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/10_advanced_debugging/03_unit_tests/benchmark_api_tests.rb~
     - Inside source: true
     *** True Line Result
    -    #==============================================================================================
    -** Processing line: ~    #Tick~
    +  # ./samples/10_advanced_debugging/03_unit_tests/benchmark_api_tests.rb
    +** Processing line: ~  def test_benchmark_api args, assert~
     - Inside source: true
     *** True Line Result
    -    #Tick
    -** Processing line: ~    def tick~
    +  def test_benchmark_api args, assert
    +** Processing line: ~    result = args.gtk.benchmark iterations: 100,~
     - Inside source: true
     *** True Line Result
    -    def tick
    -** Processing line: ~      defaults~
    +    result = args.gtk.benchmark iterations: 100,
    +** Processing line: ~                                only_one: -> () {~
     - Inside source: true
     *** True Line Result
    -      defaults
    -** Processing line: ~      calc~
    +                                only_one: -> () {
    +** Processing line: ~                                  r = 0~
     - Inside source: true
     *** True Line Result
    -      calc
    -** Processing line: ~      render~
    +                                  r = 0
    +** Processing line: ~                                  (1..100).each do |i|~
     - Inside source: true
     *** True Line Result
    -      render
    -** Processing line: ~      input~
    +                                  (1..100).each do |i|
    +** Processing line: ~                                    r += 1~
     - Inside source: true
     *** True Line Result
    -      input
    -** Processing line: ~    end~
    +                                    r += 1
    +** Processing line: ~                                  end~
     - Inside source: true
     *** True Line Result
    -    end
    +                                  end
    +** Processing line: ~                                }~
    +- Inside source: true
    +*** True Line Result
    +                                }
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    #==============================================================================================~
    +** Processing line: ~    assert.equal! result.first_place.name, :only_one~
     - Inside source: true
     *** True Line Result
    -    #==============================================================================================
    -** Processing line: ~    #Default functions~
    +    assert.equal! result.first_place.name, :only_one
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    #Default functions
    -** Processing line: ~    def defaults~
    +
    +** Processing line: ~    result = args.gtk.benchmark iterations: 100,~
     - Inside source: true
     *** True Line Result
    -    def defaults
    -** Processing line: ~      outputs[:scene].background_color = [0,0,0]~
    +    result = args.gtk.benchmark iterations: 100,
    +** Processing line: ~                                iterations_100: -> () {~
     - Inside source: true
     *** True Line Result
    -      outputs[:scene].background_color = [0,0,0]
    -** Processing line: ~      state.trauma ||= 0.0~
    +                                iterations_100: -> () {
    +** Processing line: ~                                  r = 0~
     - Inside source: true
     *** True Line Result
    -      state.trauma ||= 0.0
    -** Processing line: ~      state.trauma_power ||= 2~
    +                                  r = 0
    +** Processing line: ~                                  (1..100).each do |i|~
     - Inside source: true
     *** True Line Result
    -      state.trauma_power ||= 2
    -** Processing line: ~      state.player_cyan ||= new_player_cyan~
    +                                  (1..100).each do |i|
    +** Processing line: ~                                    r += 1~
     - Inside source: true
     *** True Line Result
    -      state.player_cyan ||= new_player_cyan
    -** Processing line: ~      state.player_magenta ||= new_player_magenta~
    +                                    r += 1
    +** Processing line: ~                                  end~
     - Inside source: true
     *** True Line Result
    -      state.player_magenta ||= new_player_magenta
    -** Processing line: ~      state.camera_magenta ||= new_camera_magenta~
    +                                  end
    +** Processing line: ~                                },~
     - Inside source: true
     *** True Line Result
    -      state.camera_magenta ||= new_camera_magenta
    -** Processing line: ~      state.camera_cyan ||= new_camera_cyan~
    +                                },
    +** Processing line: ~                                iterations_50: -> () {~
     - Inside source: true
     *** True Line Result
    -      state.camera_cyan ||= new_camera_cyan
    -** Processing line: ~      state.camera_center ||= new_camera_center~
    +                                iterations_50: -> () {
    +** Processing line: ~                                  r = 0~
     - Inside source: true
     *** True Line Result
    -      state.camera_center ||= new_camera_center
    -** Processing line: ~      state.room ||= new_room~
    +                                  r = 0
    +** Processing line: ~                                  (1..50).each do |i|~
     - Inside source: true
     *** True Line Result
    -      state.room ||= new_room
    -** Processing line: ~    end~
    +                                  (1..50).each do |i|
    +** Processing line: ~                                    r += 1~
     - Inside source: true
     *** True Line Result
    -    end
    +                                    r += 1
    +** Processing line: ~                                  end~
    +- Inside source: true
    +*** True Line Result
    +                                  end
    +** Processing line: ~                                }~
    +- Inside source: true
    +*** True Line Result
    +                                }
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def default_player x, y, w, h, sprite_path~
    +** Processing line: ~    assert.equal! result.first_place.name, :iterations_50~
     - Inside source: true
     *** True Line Result
    -    def default_player x, y, w, h, sprite_path
    -** Processing line: ~      state.new_entity(:player,~
    +    assert.equal! result.first_place.name, :iterations_50
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      state.new_entity(:player,
    -** Processing line: ~                       { x: x,~
    +
    +** Processing line: ~    result = args.gtk.benchmark iterations: 1,~
     - Inside source: true
     *** True Line Result
    -                       { x: x,
    -** Processing line: ~                         y: y,~
    +    result = args.gtk.benchmark iterations: 1,
    +** Processing line: ~                                iterations_100: -> () {~
     - Inside source: true
     *** True Line Result
    -                         y: y,
    -** Processing line: ~                         dy: 0,~
    +                                iterations_100: -> () {
    +** Processing line: ~                                  r = 0~
     - Inside source: true
     *** True Line Result
    -                         dy: 0,
    -** Processing line: ~                         dx: 0,~
    +                                  r = 0
    +** Processing line: ~                                  (1..100).each do |i|~
     - Inside source: true
     *** True Line Result
    -                         dx: 0,
    -** Processing line: ~                         w: w,~
    +                                  (1..100).each do |i|
    +** Processing line: ~                                    r += 1~
     - Inside source: true
     *** True Line Result
    -                         w: w,
    -** Processing line: ~                         h: h,~
    +                                    r += 1
    +** Processing line: ~                                  end~
     - Inside source: true
     *** True Line Result
    -                         h: h,
    -** Processing line: ~                         damage: 0,~
    +                                  end
    +** Processing line: ~                                },~
     - Inside source: true
     *** True Line Result
    -                         damage: 0,
    -** Processing line: ~                         dead: false,~
    +                                },
    +** Processing line: ~                                iterations_50: -> () {~
     - Inside source: true
     *** True Line Result
    -                         dead: false,
    -** Processing line: ~                         orientation: "down",~
    +                                iterations_50: -> () {
    +** Processing line: ~                                  r = 0~
     - Inside source: true
     *** True Line Result
    -                         orientation: "down",
    -** Processing line: ~                         max_alpha: 255,~
    +                                  r = 0
    +** Processing line: ~                                  (1..50).each do |i|~
     - Inside source: true
     *** True Line Result
    -                         max_alpha: 255,
    -** Processing line: ~                         sprite_path: sprite_path})~
    +                                  (1..50).each do |i|
    +** Processing line: ~                                    r += 1~
     - Inside source: true
     *** True Line Result
    -                         sprite_path: sprite_path})
    -** Processing line: ~    end~
    +                                    r += 1
    +** Processing line: ~                                  end~
     - Inside source: true
     *** True Line Result
    -    end
    +                                  end
    +** Processing line: ~                                }~
    +- Inside source: true
    +*** True Line Result
    +                                }
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def default_floor_tile x, y, w, h, sprite_path~
    +** Processing line: ~    assert.equal! result.too_small_to_measure, true~
     - Inside source: true
     *** True Line Result
    -    def default_floor_tile x, y, w, h, sprite_path
    -** Processing line: ~      state.new_entity(:room,~
    +    assert.equal! result.too_small_to_measure, true
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -      state.new_entity(:room,
    -** Processing line: ~                       { x: x,~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -                       { x: x,
    -** Processing line: ~                         y: y,~
    +
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
    +*** True Line Result
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +
    +** Processing line: ~*** Advanced Debugging - Unit Tests - exception_raising_tests.rb~
    +- Header detected.
    +*** True Line Result
    +
    +*** True Line Result
    +*** Advanced Debugging - Unit Tests - exception_raising_tests.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/10_advanced_debugging/03_unit_tests/exception_raising_tests.rb~
     - Inside source: true
     *** True Line Result
    -                         y: y,
    -** Processing line: ~                         w: w,~
    +  # ./samples/10_advanced_debugging/03_unit_tests/exception_raising_tests.rb
    +** Processing line: ~  begin :shared~
     - Inside source: true
     *** True Line Result
    -                         w: w,
    -** Processing line: ~                         h: h,~
    +  begin :shared
    +** Processing line: ~    class ExceptionalClass~
     - Inside source: true
     *** True Line Result
    -                         h: h,
    -** Processing line: ~                         sprite_path: sprite_path})~
    +    class ExceptionalClass
    +** Processing line: ~      def initialize exception_to_throw = nil~
     - Inside source: true
     *** True Line Result
    -                         sprite_path: sprite_path})
    -** Processing line: ~    end~
    +      def initialize exception_to_throw = nil
    +** Processing line: ~        raise exception_to_throw if exception_to_throw~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +        raise exception_to_throw if exception_to_throw
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def default_camera x, y, w, h~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    def default_camera x, y, w, h
    -** Processing line: ~      state.new_entity(:camera,~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -      state.new_entity(:camera,
    -** Processing line: ~                       { x: x,~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -                       { x: x,
    -** Processing line: ~                         y: y,~
    +
    +** Processing line: ~  def test_exception_in_newing_object args, assert~
     - Inside source: true
     *** True Line Result
    -                         y: y,
    -** Processing line: ~                         dx: 0,~
    +  def test_exception_in_newing_object args, assert
    +** Processing line: ~    begin~
     - Inside source: true
     *** True Line Result
    -                         dx: 0,
    -** Processing line: ~                         dy: 0,~
    +    begin
    +** Processing line: ~      ExceptionalClass.new TypeError~
     - Inside source: true
     *** True Line Result
    -                         dy: 0,
    -** Processing line: ~                         w: w,~
    +      ExceptionalClass.new TypeError
    +** Processing line: ~      raise "Exception wasn't thrown!"~
     - Inside source: true
     *** True Line Result
    -                         w: w,
    -** Processing line: ~                         h: h})~
    +      raise "Exception wasn't thrown!"
    +** Processing line: ~    rescue Exception => e~
     - Inside source: true
     *** True Line Result
    -                         h: h})
    +    rescue Exception => e
    +** Processing line: ~      assert.equal! e.class, TypeError, "Exceptions within constructor should be retained."~
    +- Inside source: true
    +*** True Line Result
    +      assert.equal! e.class, TypeError, "Exceptions within constructor should be retained."
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
         end
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def new_player_cyan~
    +** Processing line: ~  $gtk.reset 100~
     - Inside source: true
     *** True Line Result
    -    def new_player_cyan
    -** Processing line: ~      default_player(0, 0, 64, 64,~
    +  $gtk.reset 100
    +** Processing line: ~  $gtk.log_level = :off~
     - Inside source: true
     *** True Line Result
    -      default_player(0, 0, 64, 64,
    -** Processing line: ~                     "sprites/player/player_#{state.player_cyan.orientation}_standing.png")~
    +  $gtk.log_level = :off
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -                     "sprites/player/player_#{state.player_cyan.orientation}_standing.png")
    -** Processing line: ~    end~
    -- Inside source: true
    +
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
     *** True Line Result
    -    end
    +#+end_src
     ** Processing line: ~~
    -- Inside source: true
    +- End of paragraph detected.
     *** True Line Result
     
    -** Processing line: ~    def new_player_magenta~
    +** Processing line: ~*** Advanced Debugging - Unit Tests - fn_tests.rb~
    +- Header detected.
    +*** True Line Result
    +
    +*** True Line Result
    +*** Advanced Debugging - Unit Tests - fn_tests.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/10_advanced_debugging/03_unit_tests/fn_tests.rb~
     - Inside source: true
     *** True Line Result
    -    def new_player_magenta
    -** Processing line: ~      default_player(64, 0, 64, 64,~
    +  # ./samples/10_advanced_debugging/03_unit_tests/fn_tests.rb
    +** Processing line: ~  def infinity~
     - Inside source: true
     *** True Line Result
    -      default_player(64, 0, 64, 64,
    -** Processing line: ~                     "sprites/player/player_#{state.player_magenta.orientation}_standing.png")~
    +  def infinity
    +** Processing line: ~    1 / 0~
     - Inside source: true
     *** True Line Result
    -                     "sprites/player/player_#{state.player_magenta.orientation}_standing.png")
    -** Processing line: ~    end~
    +    1 / 0
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    end
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def new_camera_magenta~
    +** Processing line: ~  def neg_infinity~
     - Inside source: true
     *** True Line Result
    -    def new_camera_magenta
    -** Processing line: ~      default_camera(0,0,720,720)~
    +  def neg_infinity
    +** Processing line: ~    -1 / 0~
     - Inside source: true
     *** True Line Result
    -      default_camera(0,0,720,720)
    -** Processing line: ~    end~
    +    -1 / 0
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    end
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def new_camera_cyan~
    +** Processing line: ~  def nan~
     - Inside source: true
     *** True Line Result
    -    def new_camera_cyan
    -** Processing line: ~      default_camera(0,0,720,720)~
    +  def nan
    +** Processing line: ~    0.0 / 0~
     - Inside source: true
     *** True Line Result
    -      default_camera(0,0,720,720)
    -** Processing line: ~    end~
    +    0.0 / 0
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    end
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def new_camera_center~
    +** Processing line: ~  def test_add args, assert~
     - Inside source: true
     *** True Line Result
    -    def new_camera_center
    -** Processing line: ~      default_camera(0,0,1280,720)~
    +  def test_add args, assert
    +** Processing line: ~    assert.equal! (args.fn.add), 0~
     - Inside source: true
     *** True Line Result
    -      default_camera(0,0,1280,720)
    -** Processing line: ~    end~
    +    assert.equal! (args.fn.add), 0
    +** Processing line: ~    assert.equal! (args.fn.+), 0~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +    assert.equal! (args.fn.+), 0
    +** Processing line: ~    assert.equal! (args.fn.+ 1, 2, 3), 6~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def new_room~
    +    assert.equal! (args.fn.+ 1, 2, 3), 6
    +** Processing line: ~    assert.equal! (args.fn.+ 0), 0~
     - Inside source: true
     *** True Line Result
    -    def new_room
    -** Processing line: ~      default_floor_tile(0,0,1024,1024,'sprites/rooms/camera_room.png')~
    +    assert.equal! (args.fn.+ 0), 0
    +** Processing line: ~    assert.equal! (args.fn.+ 0, nil), 0~
     - Inside source: true
     *** True Line Result
    -      default_floor_tile(0,0,1024,1024,'sprites/rooms/camera_room.png')
    -** Processing line: ~    end~
    +    assert.equal! (args.fn.+ 0, nil), 0
    +** Processing line: ~    assert.equal! (args.fn.+ 0, nan), nil~
     - Inside source: true
     *** True Line Result
    -    end
    +    assert.equal! (args.fn.+ 0, nan), nil
    +** Processing line: ~    assert.equal! (args.fn.+ 0, nil, infinity), nil~
    +- Inside source: true
    +*** True Line Result
    +    assert.equal! (args.fn.+ 0, nil, infinity), nil
    +** Processing line: ~    assert.equal! (args.fn.+ [1, 2, 3, [4, 5, 6]]), 21~
    +- Inside source: true
    +*** True Line Result
    +    assert.equal! (args.fn.+ [1, 2, 3, [4, 5, 6]]), 21
    +** Processing line: ~    assert.equal! (args.fn.+ [nil, [4, 5, 6]]), 15~
    +- Inside source: true
    +*** True Line Result
    +    assert.equal! (args.fn.+ [nil, [4, 5, 6]]), 15
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    #==============================================================================================~
    +** Processing line: ~  def test_sub args, assert~
     - Inside source: true
     *** True Line Result
    -    #==============================================================================================
    -** Processing line: ~    #Calculation functions~
    +  def test_sub args, assert
    +** Processing line: ~    neg_infinity = infinity * -1~
     - Inside source: true
     *** True Line Result
    -    #Calculation functions
    -** Processing line: ~    def calc~
    +    neg_infinity = infinity * -1
    +** Processing line: ~    assert.equal! (args.fn.+), 0~
     - Inside source: true
     *** True Line Result
    -    def calc
    -** Processing line: ~      calc_camera_magenta~
    +    assert.equal! (args.fn.+), 0
    +** Processing line: ~    assert.equal! (args.fn.- 1, 2, 3), -4~
     - Inside source: true
     *** True Line Result
    -      calc_camera_magenta
    -** Processing line: ~      calc_camera_cyan~
    +    assert.equal! (args.fn.- 1, 2, 3), -4
    +** Processing line: ~    assert.equal! (args.fn.- 4), -4~
     - Inside source: true
     *** True Line Result
    -      calc_camera_cyan
    -** Processing line: ~      calc_camera_center~
    +    assert.equal! (args.fn.- 4), -4
    +** Processing line: ~    assert.equal! (args.fn.- 4, nan), nil~
     - Inside source: true
     *** True Line Result
    -      calc_camera_center
    -** Processing line: ~      calc_player_cyan~
    +    assert.equal! (args.fn.- 4, nan), nil
    +** Processing line: ~    assert.equal! (args.fn.- 0, nil), 0~
     - Inside source: true
     *** True Line Result
    -      calc_player_cyan
    -** Processing line: ~      calc_player_magenta~
    +    assert.equal! (args.fn.- 0, nil), 0
    +** Processing line: ~    assert.equal! (args.fn.- 0, nil, infinity), nil~
     - Inside source: true
     *** True Line Result
    -      calc_player_magenta
    -** Processing line: ~      calc_trauma_decay~
    +    assert.equal! (args.fn.- 0, nil, infinity), nil
    +** Processing line: ~    assert.equal! (args.fn.- [0, 1, 2, 3, [4, 5, 6]]), -21~
     - Inside source: true
     *** True Line Result
    -      calc_trauma_decay
    -** Processing line: ~    end~
    +    assert.equal! (args.fn.- [0, 1, 2, 3, [4, 5, 6]]), -21
    +** Processing line: ~    assert.equal! (args.fn.- [nil, 0, [4, 5, 6]]), -15~
     - Inside source: true
     *** True Line Result
    -    end
    +    assert.equal! (args.fn.- [nil, 0, [4, 5, 6]]), -15
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def center_camera_tolerance~
    +** Processing line: ~  def test_div args, assert~
     - Inside source: true
     *** True Line Result
    -    def center_camera_tolerance
    -** Processing line: ~      return Math.sqrt(((state.player_magenta.x - state.player_cyan.x) ** 2) +~
    +  def test_div args, assert
    +** Processing line: ~    assert.equal! (args.fn.div), 1~
     - Inside source: true
     *** True Line Result
    -      return Math.sqrt(((state.player_magenta.x - state.player_cyan.x) ** 2) +
    -** Processing line: ~                ((state.player_magenta.y - state.player_cyan.y) ** 2)) > 640~
    +    assert.equal! (args.fn.div), 1
    +** Processing line: ~    assert.equal! (args.fn./), 1~
     - Inside source: true
     *** True Line Result
    -                ((state.player_magenta.y - state.player_cyan.y) ** 2)) > 640
    -** Processing line: ~    end~
    +    assert.equal! (args.fn./), 1
    +** Processing line: ~    assert.equal! (args.fn./ 6, 3), 2~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +    assert.equal! (args.fn./ 6, 3), 2
    +** Processing line: ~    assert.equal! (args.fn./ 6, infinity), nil~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def calc_player_cyan~
    +    assert.equal! (args.fn./ 6, infinity), nil
    +** Processing line: ~    assert.equal! (args.fn./ 6, nan), nil~
     - Inside source: true
     *** True Line Result
    -    def calc_player_cyan
    -** Processing line: ~      state.player_cyan.x += state.player_cyan.dx~
    +    assert.equal! (args.fn./ 6, nan), nil
    +** Processing line: ~    assert.equal! (args.fn./ infinity), nil~
     - Inside source: true
     *** True Line Result
    -      state.player_cyan.x += state.player_cyan.dx
    -** Processing line: ~      state.player_cyan.y += state.player_cyan.dy~
    +    assert.equal! (args.fn./ infinity), nil
    +** Processing line: ~    assert.equal! (args.fn./ 0), nil~
     - Inside source: true
     *** True Line Result
    -      state.player_cyan.y += state.player_cyan.dy
    -** Processing line: ~    end~
    +    assert.equal! (args.fn./ 0), nil
    +** Processing line: ~    assert.equal! (args.fn./ 6, [3]), 2~
     - Inside source: true
     *** True Line Result
    -    end
    +    assert.equal! (args.fn./ 6, [3]), 2
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def calc_player_magenta~
    +** Processing line: ~  def test_idiv args, assert~
     - Inside source: true
     *** True Line Result
    -    def calc_player_magenta
    -** Processing line: ~      state.player_magenta.x += state.player_magenta.dx~
    +  def test_idiv args, assert
    +** Processing line: ~    assert.equal! (args.fn.idiv), 1~
     - Inside source: true
     *** True Line Result
    -      state.player_magenta.x += state.player_magenta.dx
    -** Processing line: ~      state.player_magenta.y += state.player_magenta.dy~
    +    assert.equal! (args.fn.idiv), 1
    +** Processing line: ~    assert.equal! (args.fn.idiv 7, 3), 2~
     - Inside source: true
     *** True Line Result
    -      state.player_magenta.y += state.player_magenta.dy
    -** Processing line: ~    end~
    +    assert.equal! (args.fn.idiv 7, 3), 2
    +** Processing line: ~    assert.equal! (args.fn.idiv 6, infinity), nil~
     - Inside source: true
     *** True Line Result
    -    end
    +    assert.equal! (args.fn.idiv 6, infinity), nil
    +** Processing line: ~    assert.equal! (args.fn.idiv 6, nan), nil~
    +- Inside source: true
    +*** True Line Result
    +    assert.equal! (args.fn.idiv 6, nan), nil
    +** Processing line: ~    assert.equal! (args.fn.idiv infinity), nil~
    +- Inside source: true
    +*** True Line Result
    +    assert.equal! (args.fn.idiv infinity), nil
    +** Processing line: ~    assert.equal! (args.fn.idiv 0), nil~
    +- Inside source: true
    +*** True Line Result
    +    assert.equal! (args.fn.idiv 0), nil
    +** Processing line: ~    assert.equal! (args.fn.idiv 7, [3]), 2~
    +- Inside source: true
    +*** True Line Result
    +    assert.equal! (args.fn.idiv 7, [3]), 2
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def calc_camera_center~
    +** Processing line: ~  def test_mul args, assert~
     - Inside source: true
     *** True Line Result
    -    def calc_camera_center
    -** Processing line: ~      timeScale = 1~
    +  def test_mul args, assert
    +** Processing line: ~    assert.equal! (args.fn.mul), 1~
     - Inside source: true
     *** True Line Result
    -      timeScale = 1
    -** Processing line: ~      midX = (state.player_magenta.x + state.player_cyan.x)/2~
    +    assert.equal! (args.fn.mul), 1
    +** Processing line: ~    assert.equal! (args.fn.*), 1~
     - Inside source: true
     *** True Line Result
    -      midX = (state.player_magenta.x + state.player_cyan.x)/2
    -** Processing line: ~      midY = (state.player_magenta.y + state.player_cyan.y)/2~
    +    assert.equal! (args.fn.*), 1
    +** Processing line: ~    assert.equal! (args.fn.* 7, 3), 21~
     - Inside source: true
     *** True Line Result
    -      midY = (state.player_magenta.y + state.player_cyan.y)/2
    -** Processing line: ~      targetX = midX - state.camera_center.w/2~
    +    assert.equal! (args.fn.* 7, 3), 21
    +** Processing line: ~    assert.equal! (args.fn.* 6, nan), nil~
     - Inside source: true
     *** True Line Result
    -      targetX = midX - state.camera_center.w/2
    -** Processing line: ~      targetY = midY - state.camera_center.h/2~
    +    assert.equal! (args.fn.* 6, nan), nil
    +** Processing line: ~    assert.equal! (args.fn.* 6, infinity), nil~
     - Inside source: true
     *** True Line Result
    -      targetY = midY - state.camera_center.h/2
    -** Processing line: ~      state.camera_center.x += (targetX - state.camera_center.x) * 0.1 * timeScale~
    +    assert.equal! (args.fn.* 6, infinity), nil
    +** Processing line: ~    assert.equal! (args.fn.* infinity), nil~
     - Inside source: true
     *** True Line Result
    -      state.camera_center.x += (targetX - state.camera_center.x) * 0.1 * timeScale
    -** Processing line: ~      state.camera_center.y += (targetY - state.camera_center.y) * 0.1 * timeScale~
    +    assert.equal! (args.fn.* infinity), nil
    +** Processing line: ~    assert.equal! (args.fn.* 0), 0~
     - Inside source: true
     *** True Line Result
    -      state.camera_center.y += (targetY - state.camera_center.y) * 0.1 * timeScale
    -** Processing line: ~    end~
    +    assert.equal! (args.fn.* 0), 0
    +** Processing line: ~    assert.equal! (args.fn.* 7, [3]), 21~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +    assert.equal! (args.fn.* 7, [3]), 21
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def calc_camera_magenta~
    +** Processing line: ~  def test_lt args, assert~
     - Inside source: true
     *** True Line Result
    -    def calc_camera_magenta
    -** Processing line: ~      timeScale = 1~
    +  def test_lt args, assert
    +** Processing line: ~    assert.equal! (args.fn.lt 1), 1~
     - Inside source: true
     *** True Line Result
    -      timeScale = 1
    -** Processing line: ~      targetX = state.player_magenta.x + state.player_magenta.w - state.camera_magenta.w/2~
    +    assert.equal! (args.fn.lt 1), 1
    +** Processing line: ~    assert.equal! (args.fn.lt), nil~
     - Inside source: true
     *** True Line Result
    -      targetX = state.player_magenta.x + state.player_magenta.w - state.camera_magenta.w/2
    -** Processing line: ~      targetY = state.player_magenta.y + state.player_magenta.h - state.camera_magenta.h/2~
    +    assert.equal! (args.fn.lt), nil
    +** Processing line: ~    assert.equal! (args.fn.lt infinity), nil~
     - Inside source: true
     *** True Line Result
    -      targetY = state.player_magenta.y + state.player_magenta.h - state.camera_magenta.h/2
    -** Processing line: ~      state.camera_magenta.x += (targetX - state.camera_magenta.x) * 0.1 * timeScale~
    +    assert.equal! (args.fn.lt infinity), nil
    +** Processing line: ~    assert.equal! (args.fn.lt nan), nil~
     - Inside source: true
     *** True Line Result
    -      state.camera_magenta.x += (targetX - state.camera_magenta.x) * 0.1 * timeScale
    -** Processing line: ~      state.camera_magenta.y += (targetY - state.camera_magenta.y) * 0.1 * timeScale~
    +    assert.equal! (args.fn.lt nan), nil
    +** Processing line: ~    assert.equal! (args.fn.lt 10, 9, 8), 8~
     - Inside source: true
     *** True Line Result
    -      state.camera_magenta.y += (targetY - state.camera_magenta.y) * 0.1 * timeScale
    -** Processing line: ~    end~
    +    assert.equal! (args.fn.lt 10, 9, 8), 8
    +** Processing line: ~    assert.equal! (args.fn.< 10, 9, 8), 8~
     - Inside source: true
     *** True Line Result
    -    end
    +    assert.equal! (args.fn.< 10, 9, 8), 8
    +** Processing line: ~    assert.equal! (args.fn.< [10, 9, [8]]), 8~
    +- Inside source: true
    +*** True Line Result
    +    assert.equal! (args.fn.< [10, 9, [8]]), 8
    +** Processing line: ~    assert.equal! (args.fn.< 10, 10), nil~
    +- Inside source: true
    +*** True Line Result
    +    assert.equal! (args.fn.< 10, 10), nil
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def calc_camera_cyan~
    +** Processing line: ~  def test_lte args, assert~
     - Inside source: true
     *** True Line Result
    -    def calc_camera_cyan
    -** Processing line: ~      timeScale = 1~
    +  def test_lte args, assert
    +** Processing line: ~    assert.equal! (args.fn.lte 1), 1~
     - Inside source: true
     *** True Line Result
    -      timeScale = 1
    -** Processing line: ~      targetX = state.player_cyan.x + state.player_cyan.w - state.camera_cyan.w/2~
    +    assert.equal! (args.fn.lte 1), 1
    +** Processing line: ~    assert.equal! (args.fn.lte), nil~
     - Inside source: true
     *** True Line Result
    -      targetX = state.player_cyan.x + state.player_cyan.w - state.camera_cyan.w/2
    -** Processing line: ~      targetY = state.player_cyan.y + state.player_cyan.h - state.camera_cyan.h/2~
    +    assert.equal! (args.fn.lte), nil
    +** Processing line: ~    assert.equal! (args.fn.lte infinity), nil~
     - Inside source: true
     *** True Line Result
    -      targetY = state.player_cyan.y + state.player_cyan.h - state.camera_cyan.h/2
    -** Processing line: ~      state.camera_cyan.x += (targetX - state.camera_cyan.x) * 0.1 * timeScale~
    +    assert.equal! (args.fn.lte infinity), nil
    +** Processing line: ~    assert.equal! (args.fn.lte nan), nil~
     - Inside source: true
     *** True Line Result
    -      state.camera_cyan.x += (targetX - state.camera_cyan.x) * 0.1 * timeScale
    -** Processing line: ~      state.camera_cyan.y += (targetY - state.camera_cyan.y) * 0.1 * timeScale~
    +    assert.equal! (args.fn.lte nan), nil
    +** Processing line: ~    assert.equal! (args.fn.lte 10, 9, 8), 8~
     - Inside source: true
     *** True Line Result
    -      state.camera_cyan.y += (targetY - state.camera_cyan.y) * 0.1 * timeScale
    -** Processing line: ~    end~
    +    assert.equal! (args.fn.lte 10, 9, 8), 8
    +** Processing line: ~    assert.equal! (args.fn.lte 10, 10), 10~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +    assert.equal! (args.fn.lte 10, 10), 10
    +** Processing line: ~    assert.equal! (args.fn.lte  10, 9, [8]), 8~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def calc_player_quadrant angle~
    +    assert.equal! (args.fn.lte  10, 9, [8]), 8
    +** Processing line: ~    assert.equal! (args.fn.<=  10, 9, 8), 8~
     - Inside source: true
     *** True Line Result
    -    def calc_player_quadrant angle
    -** Processing line: ~      if angle < 45 and angle > -45 and state.player_cyan.x < state.player_magenta.x~
    +    assert.equal! (args.fn.<=  10, 9, 8), 8
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -      if angle < 45 and angle > -45 and state.player_cyan.x < state.player_magenta.x
    -** Processing line: ~        return 1~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        return 1
    -** Processing line: ~      elsif angle < 45 and angle > -45 and state.player_cyan.x > state.player_magenta.x~
    +
    +** Processing line: ~  def test_gt args, assert~
     - Inside source: true
     *** True Line Result
    -      elsif angle < 45 and angle > -45 and state.player_cyan.x > state.player_magenta.x
    -** Processing line: ~        return 3~
    +  def test_gt args, assert
    +** Processing line: ~    assert.equal! (args.fn.gt 1), 1~
     - Inside source: true
     *** True Line Result
    -        return 3
    -** Processing line: ~      elsif (angle > 45 or angle < -45) and state.player_cyan.y < state.player_magenta.y~
    +    assert.equal! (args.fn.gt 1), 1
    +** Processing line: ~    assert.equal! (args.fn.gt), nil~
     - Inside source: true
     *** True Line Result
    -      elsif (angle > 45 or angle < -45) and state.player_cyan.y < state.player_magenta.y
    -** Processing line: ~        return 2~
    +    assert.equal! (args.fn.gt), nil
    +** Processing line: ~    assert.equal! (args.fn.gt infinity), nil~
     - Inside source: true
     *** True Line Result
    -        return 2
    -** Processing line: ~      elsif (angle > 45 or angle < -45) and state.player_cyan.y > state.player_magenta.y~
    +    assert.equal! (args.fn.gt infinity), nil
    +** Processing line: ~    assert.equal! (args.fn.gt nan), nil~
     - Inside source: true
     *** True Line Result
    -      elsif (angle > 45 or angle < -45) and state.player_cyan.y > state.player_magenta.y
    -** Processing line: ~        return 4~
    +    assert.equal! (args.fn.gt nan), nil
    +** Processing line: ~    assert.equal! (args.fn.gt 8, 9, 10), 10~
     - Inside source: true
     *** True Line Result
    -        return 4
    -** Processing line: ~      end~
    +    assert.equal! (args.fn.gt 8, 9, 10), 10
    +** Processing line: ~    assert.equal! (args.fn.gt [8, 9, [10]]), 10~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +    assert.equal! (args.fn.gt [8, 9, [10]]), 10
    +** Processing line: ~    assert.equal! (args.fn.gt 10, 10), nil~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +    assert.equal! (args.fn.gt 10, 10), nil
    +** Processing line: ~    assert.equal! (args.fn.gt 10, 10), nil~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def calc_camera_shake~
    +    assert.equal! (args.fn.gt 10, 10), nil
    +** Processing line: ~    assert.equal! (args.fn.gt 10, 9), nil~
     - Inside source: true
     *** True Line Result
    -    def calc_camera_shake
    -** Processing line: ~      state.trauma~
    +    assert.equal! (args.fn.gt 10, 9), nil
    +** Processing line: ~    assert.equal! (args.fn.>  8, 9, 10), 10~
     - Inside source: true
     *** True Line Result
    -      state.trauma
    -** Processing line: ~    end~
    +    assert.equal! (args.fn.>  8, 9, 10), 10
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    end
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def calc_trauma_decay~
    +** Processing line: ~  def test_gte args, assert~
     - Inside source: true
     *** True Line Result
    -    def calc_trauma_decay
    -** Processing line: ~      state.trauma = state.trauma * 0.9~
    +  def test_gte args, assert
    +** Processing line: ~    assert.equal! (args.fn.gte 1), 1~
     - Inside source: true
     *** True Line Result
    -      state.trauma = state.trauma * 0.9
    -** Processing line: ~    end~
    +    assert.equal! (args.fn.gte 1), 1
    +** Processing line: ~    assert.equal! (args.fn.gte), nil~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +    assert.equal! (args.fn.gte), nil
    +** Processing line: ~    assert.equal! (args.fn.gte infinity), nil~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def calc_random_float_range(min, max)~
    +    assert.equal! (args.fn.gte infinity), nil
    +** Processing line: ~    assert.equal! (args.fn.gte nan), nil~
     - Inside source: true
     *** True Line Result
    -    def calc_random_float_range(min, max)
    -** Processing line: ~      rand * (max-min) + min~
    +    assert.equal! (args.fn.gte nan), nil
    +** Processing line: ~    assert.equal! (args.fn.gte 8, 9, 10), 10~
     - Inside source: true
     *** True Line Result
    -      rand * (max-min) + min
    -** Processing line: ~    end~
    +    assert.equal! (args.fn.gte 8, 9, 10), 10
    +** Processing line: ~    assert.equal! (args.fn.gte 10, 10), 10~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +    assert.equal! (args.fn.gte 10, 10), 10
    +** Processing line: ~    assert.equal! (args.fn.gte 8, 9, [10]), 10~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    #==============================================================================================~
    +    assert.equal! (args.fn.gte 8, 9, [10]), 10
    +** Processing line: ~    assert.equal! (args.fn.gte 10, 9), nil~
     - Inside source: true
     *** True Line Result
    -    #==============================================================================================
    -** Processing line: ~    #Render Functions~
    +    assert.equal! (args.fn.gte 10, 9), nil
    +** Processing line: ~    assert.equal! (args.fn.>=  8, 9, 10), 10~
     - Inside source: true
     *** True Line Result
    -    #Render Functions
    -** Processing line: ~    def render~
    +    assert.equal! (args.fn.>=  8, 9, 10), 10
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    def render
    -** Processing line: ~      render_floor~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      render_floor
    -** Processing line: ~      render_player_cyan~
    +
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      render_player_cyan
    -** Processing line: ~      render_player_magenta~
    +
    +** Processing line: ~  def test_acopy args, assert~
     - Inside source: true
     *** True Line Result
    -      render_player_magenta
    -** Processing line: ~      if center_camera_tolerance~
    +  def test_acopy args, assert
    +** Processing line: ~    orig  = [1, 2, 3]~
     - Inside source: true
     *** True Line Result
    -      if center_camera_tolerance
    -** Processing line: ~        render_split_camera_scene~
    +    orig  = [1, 2, 3]
    +** Processing line: ~    clone = args.fn.acopy orig~
     - Inside source: true
     *** True Line Result
    -        render_split_camera_scene
    -** Processing line: ~      else~
    +    clone = args.fn.acopy orig
    +** Processing line: ~    assert.equal! clone, [1, 2, 3]~
     - Inside source: true
     *** True Line Result
    -      else
    -** Processing line: ~        render_camera_center_scene~
    +    assert.equal! clone, [1, 2, 3]
    +** Processing line: ~    assert.equal! clone, orig~
     - Inside source: true
     *** True Line Result
    -        render_camera_center_scene
    -** Processing line: ~      end~
    +    assert.equal! clone, orig
    +** Processing line: ~    assert.not_equal! clone.object_id, orig.object_id~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +    assert.not_equal! clone.object_id, orig.object_id
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    end
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def render_player_cyan~
    +** Processing line: ~  def test_aget args, assert~
     - Inside source: true
     *** True Line Result
    -    def render_player_cyan
    -** Processing line: ~      outputs[:scene].sprites << {x: state.player_cyan.x,~
    +  def test_aget args, assert
    +** Processing line: ~    assert.equal! (args.fn.aget [:a, :b, :c], 1), :b~
     - Inside source: true
     *** True Line Result
    -      outputs[:scene].sprites << {x: state.player_cyan.x,
    -** Processing line: ~                                  y: state.player_cyan.y,~
    +    assert.equal! (args.fn.aget [:a, :b, :c], 1), :b
    +** Processing line: ~    assert.equal! (args.fn.aget [:a, :b, :c], nil), nil~
     - Inside source: true
     *** True Line Result
    -                                  y: state.player_cyan.y,
    -** Processing line: ~                                  w: state.player_cyan.w,~
    +    assert.equal! (args.fn.aget [:a, :b, :c], nil), nil
    +** Processing line: ~    assert.equal! (args.fn.aget nil, 1), nil~
     - Inside source: true
     *** True Line Result
    -                                  w: state.player_cyan.w,
    -** Processing line: ~                                  h: state.player_cyan.h,~
    +    assert.equal! (args.fn.aget nil, 1), nil
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -                                  h: state.player_cyan.h,
    -** Processing line: ~                                  path: "sprites/player/player_#{state.player_cyan.orientation}_standing.png",~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -                                  path: "sprites/player/player_#{state.player_cyan.orientation}_standing.png",
    -** Processing line: ~                                  r: 0,~
    +
    +** Processing line: ~  def test_alength args, assert~
     - Inside source: true
     *** True Line Result
    -                                  r: 0,
    -** Processing line: ~                                  g: 255,~
    +  def test_alength args, assert
    +** Processing line: ~    assert.equal! (args.fn.alength [:a, :b, :c]), 3~
     - Inside source: true
     *** True Line Result
    -                                  g: 255,
    -** Processing line: ~                                  b: 255}~
    +    assert.equal! (args.fn.alength [:a, :b, :c]), 3
    +** Processing line: ~    assert.equal! (args.fn.alength nil), nil~
     - Inside source: true
     *** True Line Result
    -                                  b: 255}
    -** Processing line: ~    end~
    +    assert.equal! (args.fn.alength nil), nil
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    end
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def render_player_magenta~
    -- Inside source: true
    -*** True Line Result
    -    def render_player_magenta
    -** Processing line: ~      outputs[:scene].sprites << {x: state.player_magenta.x,~
    -- Inside source: true
    -*** True Line Result
    -      outputs[:scene].sprites << {x: state.player_magenta.x,
    -** Processing line: ~                                  y: state.player_magenta.y,~
    +** Processing line: ~  def test_amap args, assert~
     - Inside source: true
     *** True Line Result
    -                                  y: state.player_magenta.y,
    -** Processing line: ~                                  w: state.player_magenta.w,~
    +  def test_amap args, assert
    +** Processing line: ~    inc = lambda { |i| i + 1 }~
     - Inside source: true
     *** True Line Result
    -                                  w: state.player_magenta.w,
    -** Processing line: ~                                  h: state.player_magenta.h,~
    +    inc = lambda { |i| i + 1 }
    +** Processing line: ~    ary = [1, 2, 3]~
     - Inside source: true
     *** True Line Result
    -                                  h: state.player_magenta.h,
    -** Processing line: ~                                  path: "sprites/player/player_#{state.player_magenta.orientation}_standing.png",~
    +    ary = [1, 2, 3]
    +** Processing line: ~    assert.equal! (args.fn.amap ary, inc), [2, 3, 4]~
     - Inside source: true
     *** True Line Result
    -                                  path: "sprites/player/player_#{state.player_magenta.orientation}_standing.png",
    -** Processing line: ~                                  r: 255,~
    +    assert.equal! (args.fn.amap ary, inc), [2, 3, 4]
    +** Processing line: ~    assert.equal! (args.fn.amap nil, inc), nil~
     - Inside source: true
     *** True Line Result
    -                                  r: 255,
    -** Processing line: ~                                  g: 0,~
    +    assert.equal! (args.fn.amap nil, inc), nil
    +** Processing line: ~    assert.equal! (args.fn.amap ary, nil), nil~
     - Inside source: true
     *** True Line Result
    -                                  g: 0,
    -** Processing line: ~                                  b: 255}~
    +    assert.equal! (args.fn.amap ary, nil), nil
    +** Processing line: ~    assert.equal! (args.fn.amap ary, inc).class, Array~
     - Inside source: true
     *** True Line Result
    -                                  b: 255}
    -** Processing line: ~    end~
    +    assert.equal! (args.fn.amap ary, inc).class, Array
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    end
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def render_floor~
    +** Processing line: ~  def test_and args, assert~
     - Inside source: true
     *** True Line Result
    -    def render_floor
    -** Processing line: ~      outputs[:scene].sprites << [state.room.x, state.room.y,~
    +  def test_and args, assert
    +** Processing line: ~    assert.equal! (args.fn.and 1, 2, 3, 4), 4~
     - Inside source: true
     *** True Line Result
    -      outputs[:scene].sprites << [state.room.x, state.room.y,
    -** Processing line: ~                                  state.room.w, state.room.h,~
    +    assert.equal! (args.fn.and 1, 2, 3, 4), 4
    +** Processing line: ~    assert.equal! (args.fn.and 1, 2, nil, 4), nil~
     - Inside source: true
     *** True Line Result
    -                                  state.room.w, state.room.h,
    -** Processing line: ~                                  state.room.sprite_path]~
    +    assert.equal! (args.fn.and 1, 2, nil, 4), nil
    +** Processing line: ~    assert.equal! (args.fn.and), true~
     - Inside source: true
     *** True Line Result
    -                                  state.room.sprite_path]
    -** Processing line: ~    end~
    +    assert.equal! (args.fn.and), true
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    end
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def render_camera_center_scene~
    +** Processing line: ~  def test_or args, assert~
     - Inside source: true
     *** True Line Result
    -    def render_camera_center_scene
    -** Processing line: ~      zoomFactor = 1~
    +  def test_or args, assert
    +** Processing line: ~    assert.equal! (args.fn.or 1, 2, 3, 4), 1~
     - Inside source: true
     *** True Line Result
    -      zoomFactor = 1
    -** Processing line: ~      outputs[:scene].width = state.room.w~
    +    assert.equal! (args.fn.or 1, 2, 3, 4), 1
    +** Processing line: ~    assert.equal! (args.fn.or 1, 2, nil, 4), 1~
     - Inside source: true
     *** True Line Result
    -      outputs[:scene].width = state.room.w
    -** Processing line: ~      outputs[:scene].height = state.room.h~
    +    assert.equal! (args.fn.or 1, 2, nil, 4), 1
    +** Processing line: ~    assert.equal! (args.fn.or), nil~
     - Inside source: true
     *** True Line Result
    -      outputs[:scene].height = state.room.h
    +    assert.equal! (args.fn.or), nil
    +** Processing line: ~    assert.equal! (args.fn.or nil, nil, false, 5, 10), 5~
    +- Inside source: true
    +*** True Line Result
    +    assert.equal! (args.fn.or nil, nil, false, 5, 10), 5
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      maxAngle = 10.0~
    +** Processing line: ~  def test_eq_eq args, assert~
     - Inside source: true
     *** True Line Result
    -      maxAngle = 10.0
    -** Processing line: ~      maxOffset = 20.0~
    +  def test_eq_eq args, assert
    +** Processing line: ~    assert.equal! (args.fn.eq?), true~
     - Inside source: true
     *** True Line Result
    -      maxOffset = 20.0
    -** Processing line: ~      angle = maxAngle * calc_camera_shake * calc_random_float_range(-1,1)~
    +    assert.equal! (args.fn.eq?), true
    +** Processing line: ~    assert.equal! (args.fn.eq? 1, 0), false~
     - Inside source: true
     *** True Line Result
    -      angle = maxAngle * calc_camera_shake * calc_random_float_range(-1,1)
    -** Processing line: ~      offsetX = 32 - (maxOffset * calc_camera_shake * calc_random_float_range(-1,1))~
    +    assert.equal! (args.fn.eq? 1, 0), false
    +** Processing line: ~    assert.equal! (args.fn.eq? 1, 1, 1), true~
     - Inside source: true
     *** True Line Result
    -      offsetX = 32 - (maxOffset * calc_camera_shake * calc_random_float_range(-1,1))
    -** Processing line: ~      offsetY = 32 - (maxOffset * calc_camera_shake * calc_random_float_range(-1,1))~
    +    assert.equal! (args.fn.eq? 1, 1, 1), true
    +** Processing line: ~    assert.equal! (args.fn.== 1, 1, 1), true~
     - Inside source: true
     *** True Line Result
    -      offsetY = 32 - (maxOffset * calc_camera_shake * calc_random_float_range(-1,1))
    +    assert.equal! (args.fn.== 1, 1, 1), true
    +** Processing line: ~    assert.equal! (args.fn.== nil, nil), true~
    +- Inside source: true
    +*** True Line Result
    +    assert.equal! (args.fn.== nil, nil), true
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      outputs.sprites << {x: (-state.camera_center.x - offsetX)/zoomFactor,~
    +** Processing line: ~  def test_apply args, assert~
     - Inside source: true
     *** True Line Result
    -      outputs.sprites << {x: (-state.camera_center.x - offsetX)/zoomFactor,
    -** Processing line: ~                          y: (-state.camera_center.y - offsetY)/zoomFactor,~
    +  def test_apply args, assert
    +** Processing line: ~    assert.equal! (args.fn.and [nil, nil, nil]), [nil, nil, nil]~
     - Inside source: true
     *** True Line Result
    -                          y: (-state.camera_center.y - offsetY)/zoomFactor,
    -** Processing line: ~                          w: outputs[:scene].width/zoomFactor,~
    +    assert.equal! (args.fn.and [nil, nil, nil]), [nil, nil, nil]
    +** Processing line: ~    assert.equal! (args.fn.apply [nil, nil, nil], args.fn.method(:and)), nil~
     - Inside source: true
     *** True Line Result
    -                          w: outputs[:scene].width/zoomFactor,
    -** Processing line: ~                          h: outputs[:scene].height/zoomFactor,~
    +    assert.equal! (args.fn.apply [nil, nil, nil], args.fn.method(:and)), nil
    +** Processing line: ~    and_lambda = lambda {|*xs| args.fn.and(*xs)}~
     - Inside source: true
     *** True Line Result
    -                          h: outputs[:scene].height/zoomFactor,
    -** Processing line: ~                          path: :scene,~
    +    and_lambda = lambda {|*xs| args.fn.and(*xs)}
    +** Processing line: ~    assert.equal! (args.fn.apply [nil, nil, nil], and_lambda), nil~
     - Inside source: true
     *** True Line Result
    -                          path: :scene,
    -** Processing line: ~                          angle: angle,~
    +    assert.equal! (args.fn.apply [nil, nil, nil], and_lambda), nil
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -                          angle: angle,
    -** Processing line: ~                          source_w: -1,~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -                          source_w: -1,
    -** Processing line: ~                          source_h: -1}~
    +
    +** Processing line: ~  def test_areduce args, assert~
     - Inside source: true
     *** True Line Result
    -                          source_h: -1}
    -** Processing line: ~      outputs.labels << [128,64,"#{state.trauma.round(1)}",8,2,255,0,255,255]~
    +  def test_areduce args, assert
    +** Processing line: ~    assert.equal! (args.fn.areduce [1, 2, 3], 0, lambda { |i, a| i + a }), 6~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << [128,64,"#{state.trauma.round(1)}",8,2,255,0,255,255]
    -** Processing line: ~    end~
    +    assert.equal! (args.fn.areduce [1, 2, 3], 0, lambda { |i, a| i + a }), 6
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    end
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def render_split_camera_scene~
    +** Processing line: ~  def test_array_hash args, assert~
     - Inside source: true
     *** True Line Result
    -    def render_split_camera_scene
    -** Processing line: ~       outputs[:scene].width = state.room.w~
    +  def test_array_hash args, assert
    +** Processing line: ~    assert.equal! (args.fn.array_hash :a, 1, :b, 2), { a: 1, b: 2 }~
     - Inside source: true
     *** True Line Result
    -       outputs[:scene].width = state.room.w
    -** Processing line: ~       outputs[:scene].height = state.room.h~
    +    assert.equal! (args.fn.array_hash :a, 1, :b, 2), { a: 1, b: 2 }
    +** Processing line: ~    assert.equal! (args.fn.array_hash), { }~
     - Inside source: true
     *** True Line Result
    -       outputs[:scene].height = state.room.h
    -** Processing line: ~       render_camera_magenta_scene~
    +    assert.equal! (args.fn.array_hash), { }
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -       render_camera_magenta_scene
    -** Processing line: ~       render_camera_cyan_scene~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -       render_camera_cyan_scene
    +
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
    +*** True Line Result
    +#+end_src
     ** Processing line: ~~
    -- Inside source: true
    +- End of paragraph detected.
     *** True Line Result
     
    -** Processing line: ~       angle = Math.atan((state.player_magenta.y - state.player_cyan.y)/(state.player_magenta.x- state.player_cyan.x)) * 180/Math::PI~
    +** Processing line: ~*** Advanced Debugging - Unit Tests - gen_docs.rb~
    +- Header detected.
    +*** True Line Result
    +
    +*** True Line Result
    +*** Advanced Debugging - Unit Tests - gen_docs.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/10_advanced_debugging/03_unit_tests/gen_docs.rb~
     - Inside source: true
     *** True Line Result
    -       angle = Math.atan((state.player_magenta.y - state.player_cyan.y)/(state.player_magenta.x- state.player_cyan.x)) * 180/Math::PI
    -** Processing line: ~       output_split_camera angle~
    +  # ./samples/10_advanced_debugging/03_unit_tests/gen_docs.rb
    +** Processing line: ~  # ./dragonruby mygame --eval samples/99_zz_gtk_unit_tests/gen_docs.rb --no-tick~
     - Inside source: true
     *** True Line Result
    -       output_split_camera angle
    +  # ./dragonruby mygame --eval samples/99_zz_gtk_unit_tests/gen_docs.rb --no-tick
    +** Processing line: ~  Kernel.export_docs!~
    +- Inside source: true
    +*** True Line Result
    +  Kernel.export_docs!
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    end~
    -- Inside source: true
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
     *** True Line Result
    -    end
    +#+end_src
     ** Processing line: ~~
    -- Inside source: true
    +- End of paragraph detected.
     *** True Line Result
     
    -** Processing line: ~    def render_camera_magenta_scene~
    -- Inside source: true
    +** Processing line: ~*** Advanced Debugging - Unit Tests - geometry_tests.rb~
    +- Header detected.
     *** True Line Result
    -    def render_camera_magenta_scene
    -** Processing line: ~       zoomFactor = 1~
    -- Inside source: true
    +
     *** True Line Result
    -       zoomFactor = 1
    -** Processing line: ~       offsetX = 32~
    -- Inside source: true
    +*** Advanced Debugging - Unit Tests - geometry_tests.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
     *** True Line Result
    -       offsetX = 32
    -** Processing line: ~       offsetY = 32~
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/10_advanced_debugging/03_unit_tests/geometry_tests.rb~
     - Inside source: true
     *** True Line Result
    -       offsetY = 32
    -** Processing line: ~~
    +  # ./samples/10_advanced_debugging/03_unit_tests/geometry_tests.rb
    +** Processing line: ~  begin :shared~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~       outputs[:scene_magenta].sprites << {x: (-state.camera_magenta.x*2),~
    +  begin :shared
    +** Processing line: ~    def primitive_representations x, y, w, h~
     - Inside source: true
     *** True Line Result
    -       outputs[:scene_magenta].sprites << {x: (-state.camera_magenta.x*2),
    -** Processing line: ~                                           y: (-state.camera_magenta.y),~
    +    def primitive_representations x, y, w, h
    +** Processing line: ~      [~
     - Inside source: true
     *** True Line Result
    -                                           y: (-state.camera_magenta.y),
    -** Processing line: ~                                           w: outputs[:scene].width*2,~
    +      [
    +** Processing line: ~        [x, y, w, h],~
     - Inside source: true
     *** True Line Result
    -                                           w: outputs[:scene].width*2,
    -** Processing line: ~                                           h: outputs[:scene].height,~
    +        [x, y, w, h],
    +** Processing line: ~        { x: x, y: y, w: w, h: h },~
     - Inside source: true
     *** True Line Result
    -                                           h: outputs[:scene].height,
    -** Processing line: ~                                           path: :scene}~
    +        { x: x, y: y, w: w, h: h },
    +** Processing line: ~        RectForTest.new(x, y, w, h)~
     - Inside source: true
     *** True Line Result
    -                                           path: :scene}
    -** Processing line: ~~
    +        RectForTest.new(x, y, w, h)
    +** Processing line: ~      ]~
     - Inside source: true
     *** True Line Result
    -
    +      ]
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -50712,206 +59227,202 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def render_camera_cyan_scene~
    -- Inside source: true
    -*** True Line Result
    -    def render_camera_cyan_scene
    -** Processing line: ~      zoomFactor = 1~
    +** Processing line: ~    class RectForTest~
     - Inside source: true
     *** True Line Result
    -      zoomFactor = 1
    -** Processing line: ~      offsetX = 32~
    +    class RectForTest
    +** Processing line: ~      attr_sprite~
     - Inside source: true
     *** True Line Result
    -      offsetX = 32
    -** Processing line: ~      offsetY = 32~
    +      attr_sprite
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      offsetY = 32
    -** Processing line: ~      outputs[:scene_cyan].sprites << {x: (-state.camera_cyan.x*2),~
    +
    +** Processing line: ~      def initialize x, y, w, h~
     - Inside source: true
     *** True Line Result
    -      outputs[:scene_cyan].sprites << {x: (-state.camera_cyan.x*2),
    -** Processing line: ~                                       y: (-state.camera_cyan.y),~
    +      def initialize x, y, w, h
    +** Processing line: ~        @x = x~
     - Inside source: true
     *** True Line Result
    -                                       y: (-state.camera_cyan.y),
    -** Processing line: ~                                       w: outputs[:scene].width*2,~
    +        @x = x
    +** Processing line: ~        @y = y~
     - Inside source: true
     *** True Line Result
    -                                       w: outputs[:scene].width*2,
    -** Processing line: ~                                       h: outputs[:scene].height,~
    +        @y = y
    +** Processing line: ~        @w = w~
     - Inside source: true
     *** True Line Result
    -                                       h: outputs[:scene].height,
    -** Processing line: ~                                       path: :scene}~
    +        @w = w
    +** Processing line: ~        @h = h~
     - Inside source: true
     *** True Line Result
    -                                       path: :scene}
    -** Processing line: ~    end~
    +        @h = h
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    end
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def output_split_camera angle~
    -- Inside source: true
    -*** True Line Result
    -    def output_split_camera angle
    -** Processing line: ~      #TODO: Clean this up!~
    +** Processing line: ~      def to_s~
     - Inside source: true
     *** True Line Result
    -      #TODO: Clean this up!
    -** Processing line: ~      quadrant = calc_player_quadrant angle~
    +      def to_s
    +** Processing line: ~        "RectForTest: #{[x, y, w, h]}"~
     - Inside source: true
     *** True Line Result
    -      quadrant = calc_player_quadrant angle
    -** Processing line: ~      outputs.labels << [128,64,"#{quadrant}",8,2,255,0,255,255]~
    +        "RectForTest: #{[x, y, w, h]}"
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << [128,64,"#{quadrant}",8,2,255,0,255,255]
    -** Processing line: ~      if quadrant == 1~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      if quadrant == 1
    -** Processing line: ~        set_camera_attributes(w: 640, h: 720, m_x: 640, m_y: 0, c_x: 0, c_y: 0)~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -        set_camera_attributes(w: 640, h: 720, m_x: 640, m_y: 0, c_x: 0, c_y: 0)
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      elsif quadrant == 2~
    +** Processing line: ~  begin :intersect_rect?~
     - Inside source: true
     *** True Line Result
    -      elsif quadrant == 2
    -** Processing line: ~        set_camera_attributes(w: 1280, h: 360, m_x: 0, m_y: 360, c_x: 0, c_y: 0)~
    +  begin :intersect_rect?
    +** Processing line: ~    def test_intersect_rect_point args, assert~
     - Inside source: true
     *** True Line Result
    -        set_camera_attributes(w: 1280, h: 360, m_x: 0, m_y: 360, c_x: 0, c_y: 0)
    +    def test_intersect_rect_point args, assert
    +** Processing line: ~      assert.true! [16, 13].intersect_rect?([13, 12, 4, 4]), "point intersects with rect."~
    +- Inside source: true
    +*** True Line Result
    +      assert.true! [16, 13].intersect_rect?([13, 12, 4, 4]), "point intersects with rect."
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      elsif quadrant == 3~
    +** Processing line: ~    def test_intersect_rect args, assert~
     - Inside source: true
     *** True Line Result
    -      elsif quadrant == 3
    -** Processing line: ~        set_camera_attributes(w: 640, h: 720, m_x: 0, m_y: 0, c_x: 640, c_y: 0)~
    +    def test_intersect_rect args, assert
    +** Processing line: ~      intersecting = primitive_representations(0, 0, 100, 100) +~
     - Inside source: true
     *** True Line Result
    -        set_camera_attributes(w: 640, h: 720, m_x: 0, m_y: 0, c_x: 640, c_y: 0)
    +      intersecting = primitive_representations(0, 0, 100, 100) +
    +** Processing line: ~                     primitive_representations(20, 20, 20, 20)~
    +- Inside source: true
    +*** True Line Result
    +                     primitive_representations(20, 20, 20, 20)
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      elsif quadrant == 4~
    +** Processing line: ~      intersecting.product(intersecting).each do |rect_one, rect_two|~
     - Inside source: true
     *** True Line Result
    -      elsif quadrant == 4
    -** Processing line: ~        set_camera_attributes(w: 1280, h: 360, m_x: 0, m_y: 0, c_x: 0, c_y: 360)~
    +      intersecting.product(intersecting).each do |rect_one, rect_two|
    +** Processing line: ~        assert.true! rect_one.intersect_rect?(rect_two),~
     - Inside source: true
     *** True Line Result
    -        set_camera_attributes(w: 1280, h: 360, m_x: 0, m_y: 0, c_x: 0, c_y: 360)
    -** Processing line: ~~
    +        assert.true! rect_one.intersect_rect?(rect_two),
    +** Processing line: ~                     "intersect_rect? assertion failed for #{rect_one}, #{rect_two} (expected true)."~
     - Inside source: true
     *** True Line Result
    -
    +                     "intersect_rect? assertion failed for #{rect_one}, #{rect_two} (expected true)."
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
           end
    -** Processing line: ~    end~
    -- Inside source: true
    -*** True Line Result
    -    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def set_camera_attributes(w: 0, h: 0, m_x: 0, m_y: 0, c_x: 0, c_y: 0)~
    +** Processing line: ~      not_intersecting = [~
     - Inside source: true
     *** True Line Result
    -    def set_camera_attributes(w: 0, h: 0, m_x: 0, m_y: 0, c_x: 0, c_y: 0)
    -** Processing line: ~      state.camera_cyan.w = w + 64~
    +      not_intersecting = [
    +** Processing line: ~        [ 0, 0, 5, 5],~
     - Inside source: true
     *** True Line Result
    -      state.camera_cyan.w = w + 64
    -** Processing line: ~      state.camera_cyan.h = h + 64~
    +        [ 0, 0, 5, 5],
    +** Processing line: ~        { x: 10, y: 10, w: 5, h: 5 },~
     - Inside source: true
     *** True Line Result
    -      state.camera_cyan.h = h + 64
    -** Processing line: ~      outputs[:scene_cyan].width = (w) * 2~
    +        { x: 10, y: 10, w: 5, h: 5 },
    +** Processing line: ~        RectForTest.new(20, 20, 5, 5)~
     - Inside source: true
     *** True Line Result
    -      outputs[:scene_cyan].width = (w) * 2
    -** Processing line: ~      outputs[:scene_cyan].height = h~
    +        RectForTest.new(20, 20, 5, 5)
    +** Processing line: ~      ]~
     - Inside source: true
     *** True Line Result
    -      outputs[:scene_cyan].height = h
    +      ]
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      state.camera_magenta.w = w + 64~
    -- Inside source: true
    -*** True Line Result
    -      state.camera_magenta.w = w + 64
    -** Processing line: ~      state.camera_magenta.h = h + 64~
    +** Processing line: ~      not_intersecting.product(not_intersecting)~
     - Inside source: true
     *** True Line Result
    -      state.camera_magenta.h = h + 64
    -** Processing line: ~      outputs[:scene_magenta].width = (w) * 2~
    +      not_intersecting.product(not_intersecting)
    +** Processing line: ~        .reject { |rect_one, rect_two| rect_one == rect_two }~
     - Inside source: true
     *** True Line Result
    -      outputs[:scene_magenta].width = (w) * 2
    -** Processing line: ~      outputs[:scene_magenta].height = h~
    +        .reject { |rect_one, rect_two| rect_one == rect_two }
    +** Processing line: ~        .each do |rect_one, rect_two|~
     - Inside source: true
     *** True Line Result
    -      outputs[:scene_magenta].height = h
    -** Processing line: ~      outputs.sprites << {x: m_x,~
    +        .each do |rect_one, rect_two|
    +** Processing line: ~        assert.false! rect_one.intersect_rect?(rect_two),~
     - Inside source: true
     *** True Line Result
    -      outputs.sprites << {x: m_x,
    -** Processing line: ~                          y: m_y,~
    +        assert.false! rect_one.intersect_rect?(rect_two),
    +** Processing line: ~                      "intersect_rect? assertion failed for #{rect_one}, #{rect_two} (expected false)."~
     - Inside source: true
     *** True Line Result
    -                          y: m_y,
    -** Processing line: ~                          w: w,~
    +                      "intersect_rect? assertion failed for #{rect_one}, #{rect_two} (expected false)."
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -                          w: w,
    -** Processing line: ~                          h: h,~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -                          h: h,
    -** Processing line: ~                          path: :scene_magenta}~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -                          path: :scene_magenta}
    -** Processing line: ~      outputs.sprites << {x: c_x,~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      outputs.sprites << {x: c_x,
    -** Processing line: ~                          y: c_y,~
    +
    +** Processing line: ~  begin :inside_rect?~
     - Inside source: true
     *** True Line Result
    -                          y: c_y,
    -** Processing line: ~                          w: w,~
    +  begin :inside_rect?
    +** Processing line: ~    def assert_inside_rect outer: nil, inner: nil, expected: nil, assert: nil~
     - Inside source: true
     *** True Line Result
    -                          w: w,
    -** Processing line: ~                          h: h,~
    +    def assert_inside_rect outer: nil, inner: nil, expected: nil, assert: nil
    +** Processing line: ~      assert.true! inner.inside_rect?(outer) == expected,~
     - Inside source: true
     *** True Line Result
    -                          h: h,
    -** Processing line: ~                          path: :scene_cyan}~
    +      assert.true! inner.inside_rect?(outer) == expected,
    +** Processing line: ~                   "inside_rect? assertion failed for outer: #{outer} inner: #{inner} (expected #{expected})."~
     - Inside source: true
     *** True Line Result
    -                          path: :scene_cyan}
    +                   "inside_rect? assertion failed for outer: #{outer} inner: #{inner} (expected #{expected})."
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -50920,322 +59431,338 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def add_trauma amount~
    +** Processing line: ~    def test_inside_rect args, assert~
     - Inside source: true
     *** True Line Result
    -    def add_trauma amount
    -** Processing line: ~      state.trauma = [state.trauma + amount, 1.0].min~
    +    def test_inside_rect args, assert
    +** Processing line: ~      outer_rects = primitive_representations(0, 0, 10, 10)~
     - Inside source: true
     *** True Line Result
    -      state.trauma = [state.trauma + amount, 1.0].min
    -** Processing line: ~    end~
    +      outer_rects = primitive_representations(0, 0, 10, 10)
    +** Processing line: ~      inner_rects = primitive_representations(1, 1, 5, 5)~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +      inner_rects = primitive_representations(1, 1, 5, 5)
    +** Processing line: ~      primitive_representations(0, 0, 10, 10).product(primitive_representations(1, 1, 5, 5))~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def remove_trauma amount~
    +      primitive_representations(0, 0, 10, 10).product(primitive_representations(1, 1, 5, 5))
    +** Processing line: ~        .each do |outer, inner|~
     - Inside source: true
     *** True Line Result
    -    def remove_trauma amount
    -** Processing line: ~      state.trauma = [state.trauma - amount, 0.0].max~
    +        .each do |outer, inner|
    +** Processing line: ~        assert_inside_rect outer: outer, inner: inner,~
     - Inside source: true
     *** True Line Result
    -      state.trauma = [state.trauma - amount, 0.0].max
    -** Processing line: ~    end~
    +        assert_inside_rect outer: outer, inner: inner,
    +** Processing line: ~                           expected: true, assert: assert~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~    #==============================================================================================~
    +                           expected: true, assert: assert
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    #==============================================================================================
    -** Processing line: ~    #Input functions~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    #Input functions
    -** Processing line: ~    def input~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    def input
    -** Processing line: ~      input_move_cyan~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      input_move_cyan
    -** Processing line: ~      input_move_magenta~
    +
    +** Processing line: ~  begin :angle_to~
     - Inside source: true
     *** True Line Result
    -      input_move_magenta
    -** Processing line: ~~
    +  begin :angle_to
    +** Processing line: ~    def test_angle_to args, assert~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      if inputs.keyboard.key_down.t~
    +    def test_angle_to args, assert
    +** Processing line: ~      origins = primitive_representations(0, 0, 0, 0)~
     - Inside source: true
     *** True Line Result
    -      if inputs.keyboard.key_down.t
    -** Processing line: ~        add_trauma(0.5)~
    +      origins = primitive_representations(0, 0, 0, 0)
    +** Processing line: ~      rights = primitive_representations(1, 0, 0, 0)~
     - Inside source: true
     *** True Line Result
    -        add_trauma(0.5)
    -** Processing line: ~      elsif inputs.keyboard.key_down.y~
    +      rights = primitive_representations(1, 0, 0, 0)
    +** Processing line: ~      aboves = primitive_representations(0, 1, 0, 0)~
     - Inside source: true
     *** True Line Result
    -      elsif inputs.keyboard.key_down.y
    -** Processing line: ~        remove_trauma(0.1)~
    +      aboves = primitive_representations(0, 1, 0, 0)
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        remove_trauma(0.1)
    -** Processing line: ~      end~
    +
    +** Processing line: ~      origins.product(aboves).each do |origin, above|~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +      origins.product(aboves).each do |origin, above|
    +** Processing line: ~        assert.equal! origin.angle_to(above), 90,~
     - Inside source: true
     *** True Line Result
    -    end
    +        assert.equal! origin.angle_to(above), 90,
    +** Processing line: ~                      "A point directly above should be 90 degrees."~
    +- Inside source: true
    +*** True Line Result
    +                      "A point directly above should be 90 degrees."
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def input_move_cyan~
    +** Processing line: ~        assert.equal! above.angle_from(origin), 90,~
     - Inside source: true
     *** True Line Result
    -    def input_move_cyan
    -** Processing line: ~      if inputs.keyboard.key_held.up~
    +        assert.equal! above.angle_from(origin), 90,
    +** Processing line: ~                      "A point coming from above should be 90 degrees."~
     - Inside source: true
     *** True Line Result
    -      if inputs.keyboard.key_held.up
    -** Processing line: ~        state.player_cyan.dy = 5~
    +                      "A point coming from above should be 90 degrees."
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -        state.player_cyan.dy = 5
    -** Processing line: ~        state.player_cyan.orientation = "up"~
    +      end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        state.player_cyan.orientation = "up"
    -** Processing line: ~      elsif inputs.keyboard.key_held.down~
    +
    +** Processing line: ~      origins.product(rights).each do |origin, right|~
     - Inside source: true
     *** True Line Result
    -      elsif inputs.keyboard.key_held.down
    -** Processing line: ~        state.player_cyan.dy = -5~
    +      origins.product(rights).each do |origin, right|
    +** Processing line: ~        assert.equal! origin.angle_to(right) % 360, 0,~
     - Inside source: true
     *** True Line Result
    -        state.player_cyan.dy = -5
    -** Processing line: ~        state.player_cyan.orientation = "down"~
    +        assert.equal! origin.angle_to(right) % 360, 0,
    +** Processing line: ~                      "A point directly to the right should be 0 degrees."~
     - Inside source: true
     *** True Line Result
    -        state.player_cyan.orientation = "down"
    -** Processing line: ~      else~
    +                      "A point directly to the right should be 0 degrees."
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      else
    -** Processing line: ~        state.player_cyan.dy *= 0.8~
    +
    +** Processing line: ~        assert.equal! right.angle_from(origin) % 360, 0,~
     - Inside source: true
     *** True Line Result
    -        state.player_cyan.dy *= 0.8
    -** Processing line: ~      end~
    +        assert.equal! right.angle_from(origin) % 360, 0,
    +** Processing line: ~                      "A point coming from the right should be 0 degrees."~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~      if inputs.keyboard.key_held.left~
    +                      "A point coming from the right should be 0 degrees."
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      if inputs.keyboard.key_held.left
    -** Processing line: ~        state.player_cyan.dx = -5~
    +
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -        state.player_cyan.dx = -5
    -** Processing line: ~        state.player_cyan.orientation = "left"~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -        state.player_cyan.orientation = "left"
    -** Processing line: ~      elsif inputs.keyboard.key_held.right~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -      elsif inputs.keyboard.key_held.right
    -** Processing line: ~        state.player_cyan.dx = 5~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        state.player_cyan.dx = 5
    -** Processing line: ~        state.player_cyan.orientation = "right"~
    +
    +** Processing line: ~  begin :scale_rect~
     - Inside source: true
     *** True Line Result
    -        state.player_cyan.orientation = "right"
    -** Processing line: ~      else~
    +  begin :scale_rect
    +** Processing line: ~    def test_scale_rect args, assert~
     - Inside source: true
     *** True Line Result
    -      else
    -** Processing line: ~        state.player_cyan.dx *= 0.8~
    +    def test_scale_rect args, assert
    +** Processing line: ~      assert.equal! [0, 0, 100, 100].scale_rect(0.5, 0.5),~
     - Inside source: true
     *** True Line Result
    -        state.player_cyan.dx *= 0.8
    -** Processing line: ~      end~
    +      assert.equal! [0, 0, 100, 100].scale_rect(0.5, 0.5),
    +** Processing line: ~                    [25.0, 25.0, 50.0, 50.0]~
     - Inside source: true
     *** True Line Result
    -      end
    +                    [25.0, 25.0, 50.0, 50.0]
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      outputs.labels << [128,512,"#{state.player_cyan.x.round()}",8,2,0,255,255,255]~
    -- Inside source: true
    -*** True Line Result
    -      outputs.labels << [128,512,"#{state.player_cyan.x.round()}",8,2,0,255,255,255]
    -** Processing line: ~      outputs.labels << [128,480,"#{state.player_cyan.y.round()}",8,2,0,255,255,255]~
    +** Processing line: ~      assert.equal! [0, 0, 100, 100].scale_rect(0.5),~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << [128,480,"#{state.player_cyan.y.round()}",8,2,0,255,255,255]
    -** Processing line: ~    end~
    +      assert.equal! [0, 0, 100, 100].scale_rect(0.5),
    +** Processing line: ~                    [0.0, 0.0, 50.0, 50.0]~
     - Inside source: true
     *** True Line Result
    -    end
    +                    [0.0, 0.0, 50.0, 50.0]
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def input_move_magenta~
    +** Processing line: ~      assert.equal! [0, 0, 100, 100].scale_rect_extended(percentage_x: 0.5, percentage_y: 0.5, anchor_x: 0.5, anchor_y: 0.5),~
     - Inside source: true
     *** True Line Result
    -    def input_move_magenta
    -** Processing line: ~      if inputs.keyboard.key_held.w~
    +      assert.equal! [0, 0, 100, 100].scale_rect_extended(percentage_x: 0.5, percentage_y: 0.5, anchor_x: 0.5, anchor_y: 0.5),
    +** Processing line: ~                    [25.0, 25.0, 50.0, 50.0]~
     - Inside source: true
     *** True Line Result
    -      if inputs.keyboard.key_held.w
    -** Processing line: ~        state.player_magenta.dy = 5~
    +                    [25.0, 25.0, 50.0, 50.0]
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        state.player_magenta.dy = 5
    -** Processing line: ~        state.player_magenta.orientation = "up"~
    +
    +** Processing line: ~      assert.equal! [0, 0, 100, 100].scale_rect_extended(percentage_x: 0.5, percentage_y: 0.5, anchor_x: 0, anchor_y: 0),~
     - Inside source: true
     *** True Line Result
    -        state.player_magenta.orientation = "up"
    -** Processing line: ~      elsif inputs.keyboard.key_held.s~
    +      assert.equal! [0, 0, 100, 100].scale_rect_extended(percentage_x: 0.5, percentage_y: 0.5, anchor_x: 0, anchor_y: 0),
    +** Processing line: ~                    [0.0, 0.0, 50.0, 50.0]~
     - Inside source: true
     *** True Line Result
    -      elsif inputs.keyboard.key_held.s
    -** Processing line: ~        state.player_magenta.dy = -5~
    +                    [0.0, 0.0, 50.0, 50.0]
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -        state.player_magenta.dy = -5
    -** Processing line: ~        state.player_magenta.orientation = "down"~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -        state.player_magenta.orientation = "down"
    -** Processing line: ~      else~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      else
    -** Processing line: ~        state.player_magenta.dy *= 0.8~
    +
    +** Processing line: ~  $gtk.reset 100~
     - Inside source: true
     *** True Line Result
    -        state.player_magenta.dy *= 0.8
    -** Processing line: ~      end~
    +  $gtk.reset 100
    +** Processing line: ~  $gtk.log_level = :off~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~      if inputs.keyboard.key_held.a~
    +  $gtk.log_level = :off
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      if inputs.keyboard.key_held.a
    -** Processing line: ~        state.player_magenta.dx = -5~
    +
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
    +*** True Line Result
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +
    +** Processing line: ~*** Advanced Debugging - Unit Tests - http_tests.rb~
    +- Header detected.
    +*** True Line Result
    +
    +*** True Line Result
    +*** Advanced Debugging - Unit Tests - http_tests.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/10_advanced_debugging/03_unit_tests/http_tests.rb~
     - Inside source: true
     *** True Line Result
    -        state.player_magenta.dx = -5
    -** Processing line: ~        state.player_magenta.orientation = "left"~
    +  # ./samples/10_advanced_debugging/03_unit_tests/http_tests.rb
    +** Processing line: ~  def try_assert_or_schedule args, assert~
     - Inside source: true
     *** True Line Result
    -        state.player_magenta.orientation = "left"
    -** Processing line: ~      elsif inputs.keyboard.key_held.d~
    +  def try_assert_or_schedule args, assert
    +** Processing line: ~    if $result[:complete]~
     - Inside source: true
     *** True Line Result
    -      elsif inputs.keyboard.key_held.d
    -** Processing line: ~        state.player_magenta.dx = 5~
    +    if $result[:complete]
    +** Processing line: ~      log_info "Request completed! Verifying."~
     - Inside source: true
     *** True Line Result
    -        state.player_magenta.dx = 5
    -** Processing line: ~        state.player_magenta.orientation = "right"~
    +      log_info "Request completed! Verifying."
    +** Processing line: ~      if $result[:http_response_code] != 200~
     - Inside source: true
     *** True Line Result
    -        state.player_magenta.orientation = "right"
    -** Processing line: ~      else~
    +      if $result[:http_response_code] != 200
    +** Processing line: ~        log_info "The request yielded a result of #{$result[:http_response_code]} instead of 200."~
     - Inside source: true
     *** True Line Result
    -      else
    -** Processing line: ~        state.player_magenta.dx *= 0.8~
    +        log_info "The request yielded a result of #{$result[:http_response_code]} instead of 200."
    +** Processing line: ~        exit~
     - Inside source: true
     *** True Line Result
    -        state.player_magenta.dx *= 0.8
    +        exit
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
           end
    -** Processing line: ~~
    +** Processing line: ~      log_info ":try_assert_or_schedule succeeded!"~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      outputs.labels << [128,360,"#{state.player_magenta.x.round()}",8,2,255,0,255,255]~
    +      log_info ":try_assert_or_schedule succeeded!"
    +** Processing line: ~    else~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << [128,360,"#{state.player_magenta.x.round()}",8,2,255,0,255,255]
    -** Processing line: ~      outputs.labels << [128,328,"#{state.player_magenta.y.round()}",8,2,255,0,255,255]~
    +    else
    +** Processing line: ~      args.gtk.schedule_callback Kernel.tick_count + 10 do~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << [128,328,"#{state.player_magenta.y.round()}",8,2,255,0,255,255]
    -** Processing line: ~    end~
    +      args.gtk.schedule_callback Kernel.tick_count + 10 do
    +** Processing line: ~        try_assert_or_schedule args, assert~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~  end~
    +        try_assert_or_schedule args, assert
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  $camera_movement = CameraMovement.new~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -  $camera_movement = CameraMovement.new
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def tick args~
    -- Inside source: true
    -*** True Line Result
    -  def tick args
    -** Processing line: ~    args.outputs.background_color = [0,0,0]~
    +** Processing line: ~  def test_http args, assert~
     - Inside source: true
     *** True Line Result
    -    args.outputs.background_color = [0,0,0]
    -** Processing line: ~    $camera_movement.inputs  = args.inputs~
    +  def test_http args, assert
    +** Processing line: ~    $result = $gtk.http_get 'http://dragonruby.org'~
     - Inside source: true
     *** True Line Result
    -    $camera_movement.inputs  = args.inputs
    -** Processing line: ~    $camera_movement.outputs = args.outputs~
    +    $result = $gtk.http_get 'http://dragonruby.org'
    +** Processing line: ~    try_assert_or_schedule args, assert~
     - Inside source: true
     *** True Line Result
    -    $camera_movement.outputs = args.outputs
    -** Processing line: ~    $camera_movement.state   = args.state~
    +    try_assert_or_schedule args, assert
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    $camera_movement.state   = args.state
    -** Processing line: ~    $camera_movement.grid    = args.grid~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    $camera_movement.grid    = args.grid
    -** Processing line: ~    $camera_movement.tick~
    +
    +** Processing line: ~  $gtk.reset 100~
     - Inside source: true
     *** True Line Result
    -    $camera_movement.tick
    -** Processing line: ~  end~
    +  $gtk.reset 100
    +** Processing line: ~  $gtk.log_level = :off~
     - Inside source: true
     *** True Line Result
    -  end
    +  $gtk.log_level = :off
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
    @@ -51248,410 +59775,442 @@ Follows is a source code listing for all files that have been open sourced. This
     - End of paragraph detected.
     *** True Line Result
     
    -** Processing line: ~*** Advanced Rendering - Z Targeting Camera - main.rb~
    +** Processing line: ~*** Advanced Debugging - Unit Tests - nil_coercion_tests.rb~
     - Header detected.
     *** True Line Result
     
     *** True Line Result
    -*** Advanced Rendering - Z Targeting Camera - main.rb
    +*** Advanced Debugging - Unit Tests - nil_coercion_tests.rb
     ** Processing line: ~#+begin_src ruby~
     - Line was identified as the beginning of a code block.
     *** True Line Result
     
     *** True Line Result
     #+begin_src ruby
    -** Processing line: ~  # ./samples/07_advanced_rendering/08_z_targeting_camera/app/main.rb~
    +** Processing line: ~  # ./samples/10_advanced_debugging/03_unit_tests/nil_coercion_tests.rb~
     - Inside source: true
     *** True Line Result
    -  # ./samples/07_advanced_rendering/08_z_targeting_camera/app/main.rb
    -** Processing line: ~  class Game~
    +  # ./samples/10_advanced_debugging/03_unit_tests/nil_coercion_tests.rb
    +** Processing line: ~  # numbers~
     - Inside source: true
     *** True Line Result
    -  class Game
    -** Processing line: ~    attr_gtk~
    +  # numbers
    +** Processing line: ~  def test_open_entity_add_number args, assert~
     - Inside source: true
     *** True Line Result
    -    attr_gtk
    +  def test_open_entity_add_number args, assert
    +** Processing line: ~    assert.nil! args.state.i_value~
    +- Inside source: true
    +*** True Line Result
    +    assert.nil! args.state.i_value
    +** Processing line: ~    args.state.i_value += 5~
    +- Inside source: true
    +*** True Line Result
    +    args.state.i_value += 5
    +** Processing line: ~    assert.equal! args.state.i_value, 5~
    +- Inside source: true
    +*** True Line Result
    +    assert.equal! args.state.i_value, 5
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def tick~
    +** Processing line: ~    assert.nil! args.state.f_value~
     - Inside source: true
     *** True Line Result
    -    def tick
    -** Processing line: ~      defaults~
    +    assert.nil! args.state.f_value
    +** Processing line: ~    args.state.f_value += 5.5~
     - Inside source: true
     *** True Line Result
    -      defaults
    -** Processing line: ~      render~
    +    args.state.f_value += 5.5
    +** Processing line: ~    assert.equal! args.state.f_value, 5.5~
     - Inside source: true
     *** True Line Result
    -      render
    -** Processing line: ~      input~
    +    assert.equal! args.state.f_value, 5.5
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -      input
    -** Processing line: ~      calc~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      calc
    -** Processing line: ~    end~
    +
    +** Processing line: ~  def test_open_entity_subtract_number args, assert~
     - Inside source: true
     *** True Line Result
    -    end
    +  def test_open_entity_subtract_number args, assert
    +** Processing line: ~    assert.nil! args.state.i_value~
    +- Inside source: true
    +*** True Line Result
    +    assert.nil! args.state.i_value
    +** Processing line: ~    args.state.i_value -= 5~
    +- Inside source: true
    +*** True Line Result
    +    args.state.i_value -= 5
    +** Processing line: ~    assert.equal! args.state.i_value, -5~
    +- Inside source: true
    +*** True Line Result
    +    assert.equal! args.state.i_value, -5
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def defaults~
    +** Processing line: ~    assert.nil! args.state.f_value~
     - Inside source: true
     *** True Line Result
    -    def defaults
    -** Processing line: ~      outputs.background_color = [219, 208, 191]~
    +    assert.nil! args.state.f_value
    +** Processing line: ~    args.state.f_value -= 5.5~
     - Inside source: true
     *** True Line Result
    -      outputs.background_color = [219, 208, 191]
    -** Processing line: ~      player.x        ||= 634~
    +    args.state.f_value -= 5.5
    +** Processing line: ~    assert.equal! args.state.f_value, -5.5~
     - Inside source: true
     *** True Line Result
    -      player.x        ||= 634
    -** Processing line: ~      player.y        ||= 153~
    +    assert.equal! args.state.f_value, -5.5
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -      player.y        ||= 153
    -** Processing line: ~      player.angle    ||= 90~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      player.angle    ||= 90
    -** Processing line: ~      player.distance ||= arena_radius~
    +
    +** Processing line: ~  def test_open_entity_multiply_number args, assert~
     - Inside source: true
     *** True Line Result
    -      player.distance ||= arena_radius
    -** Processing line: ~      target.x        ||= 634~
    +  def test_open_entity_multiply_number args, assert
    +** Processing line: ~    assert.nil! args.state.i_value~
     - Inside source: true
     *** True Line Result
    -      target.x        ||= 634
    -** Processing line: ~      target.y        ||= 359~
    +    assert.nil! args.state.i_value
    +** Processing line: ~    args.state.i_value *= 5~
     - Inside source: true
     *** True Line Result
    -      target.y        ||= 359
    -** Processing line: ~    end~
    +    args.state.i_value *= 5
    +** Processing line: ~    assert.equal! args.state.i_value, 0~
     - Inside source: true
     *** True Line Result
    -    end
    +    assert.equal! args.state.i_value, 0
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def render~
    +** Processing line: ~    assert.nil! args.state.f_value~
     - Inside source: true
     *** True Line Result
    -    def render
    -** Processing line: ~      outputs[:scene].sprites << ([0, 0, 933, 700, 'sprites/arena.png'].center_inside_rect grid.rect)~
    +    assert.nil! args.state.f_value
    +** Processing line: ~    args.state.f_value *= 5.5~
     - Inside source: true
     *** True Line Result
    -      outputs[:scene].sprites << ([0, 0, 933, 700, 'sprites/arena.png'].center_inside_rect grid.rect)
    -** Processing line: ~      outputs[:scene].sprites << target_sprite~
    +    args.state.f_value *= 5.5
    +** Processing line: ~    assert.equal! args.state.f_value, 0~
     - Inside source: true
     *** True Line Result
    -      outputs[:scene].sprites << target_sprite
    -** Processing line: ~      outputs[:scene].sprites << player_sprite~
    +    assert.equal! args.state.f_value, 0
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -      outputs[:scene].sprites << player_sprite
    -** Processing line: ~      outputs.sprites << scene~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      outputs.sprites << scene
    -** Processing line: ~    end~
    +
    +** Processing line: ~  def test_open_entity_divide_number args, assert~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +  def test_open_entity_divide_number args, assert
    +** Processing line: ~    assert.nil! args.state.i_value~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def target_sprite~
    +    assert.nil! args.state.i_value
    +** Processing line: ~    args.state.i_value /= 5~
     - Inside source: true
     *** True Line Result
    -    def target_sprite
    -** Processing line: ~      {~
    +    args.state.i_value /= 5
    +** Processing line: ~    assert.equal! args.state.i_value, 0~
     - Inside source: true
     *** True Line Result
    -      {
    -** Processing line: ~        x: target.x, y: target.y,~
    +    assert.equal! args.state.i_value, 0
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        x: target.x, y: target.y,
    -** Processing line: ~        w: 10, h: 10,~
    +
    +** Processing line: ~    assert.nil! args.state.f_value~
     - Inside source: true
     *** True Line Result
    -        w: 10, h: 10,
    -** Processing line: ~        path: 'sprites/square/black.png'~
    +    assert.nil! args.state.f_value
    +** Processing line: ~    args.state.f_value /= 5.5~
     - Inside source: true
     *** True Line Result
    -        path: 'sprites/square/black.png'
    -** Processing line: ~      }.anchor_rect 0.5, 0.5~
    +    args.state.f_value /= 5.5
    +** Processing line: ~    assert.equal! args.state.f_value, 0~
     - Inside source: true
     *** True Line Result
    -      }.anchor_rect 0.5, 0.5
    -** Processing line: ~    end~
    +    assert.equal! args.state.f_value, 0
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    end
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def input~
    +** Processing line: ~  # array~
     - Inside source: true
     *** True Line Result
    -    def input
    -** Processing line: ~      if inputs.up && player.distance > 30~
    +  # array
    +** Processing line: ~  def test_open_entity_add_array args, assert~
     - Inside source: true
     *** True Line Result
    -      if inputs.up && player.distance > 30
    -** Processing line: ~        player.distance -= 2~
    +  def test_open_entity_add_array args, assert
    +** Processing line: ~    assert.nil! args.state.values~
     - Inside source: true
     *** True Line Result
    -        player.distance -= 2
    -** Processing line: ~      elsif inputs.down && player.distance < 200~
    +    assert.nil! args.state.values
    +** Processing line: ~    args.state.values += [:a, :b, :c]~
     - Inside source: true
     *** True Line Result
    -      elsif inputs.down && player.distance < 200
    -** Processing line: ~        player.distance += 2~
    +    args.state.values += [:a, :b, :c]
    +** Processing line: ~    assert.equal! args.state.values, [:a, :b, :c]~
     - Inside source: true
     *** True Line Result
    -        player.distance += 2
    -** Processing line: ~      end~
    +    assert.equal! args.state.values, [:a, :b, :c]
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -      end
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      player.angle += inputs.left_right * -1~
    -- Inside source: true
    -*** True Line Result
    -      player.angle += inputs.left_right * -1
    -** Processing line: ~    end~
    -- Inside source: true
    -*** True Line Result
    -    end
    -** Processing line: ~~
    +** Processing line: ~  def test_open_entity_subtract_array args, assert~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def calc~
    +  def test_open_entity_subtract_array args, assert
    +** Processing line: ~    assert.nil! args.state.values~
     - Inside source: true
     *** True Line Result
    -    def calc
    -** Processing line: ~      player.x = target.x + ((player.angle *  1).vector_x player.distance)~
    +    assert.nil! args.state.values
    +** Processing line: ~    args.state.values -= [:a, :b, :c]~
     - Inside source: true
     *** True Line Result
    -      player.x = target.x + ((player.angle *  1).vector_x player.distance)
    -** Processing line: ~      player.y = target.y + ((player.angle * -1).vector_y player.distance)~
    +    args.state.values -= [:a, :b, :c]
    +** Processing line: ~    assert.equal! args.state.values, []~
     - Inside source: true
     *** True Line Result
    -      player.y = target.y + ((player.angle * -1).vector_y player.distance)
    -** Processing line: ~    end~
    +    assert.equal! args.state.values, []
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    end
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def player_sprite~
    +** Processing line: ~  def test_open_entity_shovel_array args, assert~
     - Inside source: true
     *** True Line Result
    -    def player_sprite
    -** Processing line: ~      {~
    +  def test_open_entity_shovel_array args, assert
    +** Processing line: ~    assert.nil! args.state.values~
     - Inside source: true
     *** True Line Result
    -      {
    -** Processing line: ~        x: player.x,~
    +    assert.nil! args.state.values
    +** Processing line: ~    args.state.values << :a~
     - Inside source: true
     *** True Line Result
    -        x: player.x,
    -** Processing line: ~        y: player.y,~
    +    args.state.values << :a
    +** Processing line: ~    assert.equal! args.state.values, [:a]~
     - Inside source: true
     *** True Line Result
    -        y: player.y,
    -** Processing line: ~        w: 50,~
    +    assert.equal! args.state.values, [:a]
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -        w: 50,
    -** Processing line: ~        h: 100,~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        h: 100,
    -** Processing line: ~        path: 'sprites/player.png',~
    +
    +** Processing line: ~  def test_open_entity_enumerate args, assert~
     - Inside source: true
     *** True Line Result
    -        path: 'sprites/player.png',
    -** Processing line: ~        angle: (player.angle * -1) + 90~
    +  def test_open_entity_enumerate args, assert
    +** Processing line: ~    assert.nil! args.state.values~
     - Inside source: true
     *** True Line Result
    -        angle: (player.angle * -1) + 90
    -** Processing line: ~      }.anchor_rect 0.5, 0~
    +    assert.nil! args.state.values
    +** Processing line: ~    args.state.values = args.state.values.map_with_index { |i| i }~
     - Inside source: true
     *** True Line Result
    -      }.anchor_rect 0.5, 0
    -** Processing line: ~    end~
    +    args.state.values = args.state.values.map_with_index { |i| i }
    +** Processing line: ~    assert.equal! args.state.values, []~
     - Inside source: true
     *** True Line Result
    -    end
    +    assert.equal! args.state.values, []
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def center_map~
    +** Processing line: ~    assert.nil! args.state.values_2~
     - Inside source: true
     *** True Line Result
    -    def center_map
    -** Processing line: ~      { x: 634, y: 359 }~
    +    assert.nil! args.state.values_2
    +** Processing line: ~    args.state.values_2 = args.state.values_2.map { |i| i }~
     - Inside source: true
     *** True Line Result
    -      { x: 634, y: 359 }
    -** Processing line: ~    end~
    +    args.state.values_2 = args.state.values_2.map { |i| i }
    +** Processing line: ~    assert.equal! args.state.values_2, []~
     - Inside source: true
     *** True Line Result
    -    end
    +    assert.equal! args.state.values_2, []
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def zoom_factor_single~
    +** Processing line: ~    assert.nil! args.state.values_3~
     - Inside source: true
     *** True Line Result
    -    def zoom_factor_single
    -** Processing line: ~      2 - ((args.geometry.distance player, center_map).fdiv arena_radius)~
    +    assert.nil! args.state.values_3
    +** Processing line: ~    args.state.values_3 = args.state.values_3.flat_map { |i| i }~
     - Inside source: true
     *** True Line Result
    -      2 - ((args.geometry.distance player, center_map).fdiv arena_radius)
    -** Processing line: ~    end~
    +    args.state.values_3 = args.state.values_3.flat_map { |i| i }
    +** Processing line: ~    assert.equal! args.state.values_3, []~
     - Inside source: true
     *** True Line Result
    -    end
    +    assert.equal! args.state.values_3, []
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def zoom_factor~
    +** Processing line: ~  # hashes~
     - Inside source: true
     *** True Line Result
    -    def zoom_factor
    -** Processing line: ~      zoom_factor_single ** 2~
    +  # hashes
    +** Processing line: ~  def test_open_entity_indexer args, assert~
     - Inside source: true
     *** True Line Result
    -      zoom_factor_single ** 2
    -** Processing line: ~    end~
    +  def test_open_entity_indexer args, assert
    +** Processing line: ~    GTK::Entity.__reset_id__!~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +    GTK::Entity.__reset_id__!
    +** Processing line: ~    assert.nil! args.state.values~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def arena_radius~
    +    assert.nil! args.state.values
    +** Processing line: ~    args.state.values[:test] = :value~
     - Inside source: true
     *** True Line Result
    -    def arena_radius
    -** Processing line: ~      206~
    +    args.state.values[:test] = :value
    +** Processing line: ~    assert.equal! args.state.values.to_s, { entity_id: 1, entity_name: :values, entity_keys_by_ref: {}, test: :value }.to_s~
     - Inside source: true
     *** True Line Result
    -      206
    -** Processing line: ~    end~
    +    assert.equal! args.state.values.to_s, { entity_id: 1, entity_name: :values, entity_keys_by_ref: {}, test: :value }.to_s
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    end
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def scene~
    +** Processing line: ~  # bug~
     - Inside source: true
     *** True Line Result
    -    def scene
    -** Processing line: ~      {~
    +  # bug
    +** Processing line: ~  def test_open_entity_nil_bug args, assert~
     - Inside source: true
     *** True Line Result
    -      {
    -** Processing line: ~        x:    (640 - player.x) + (640 - (640 * zoom_factor)),~
    +  def test_open_entity_nil_bug args, assert
    +** Processing line: ~    GTK::Entity.__reset_id__!~
     - Inside source: true
     *** True Line Result
    -        x:    (640 - player.x) + (640 - (640 * zoom_factor)),
    -** Processing line: ~        y:    (360 - player.y - (75 * zoom_factor)) + (320 - (320 * zoom_factor)),~
    +    GTK::Entity.__reset_id__!
    +** Processing line: ~    args.state.foo.a~
     - Inside source: true
     *** True Line Result
    -        y:    (360 - player.y - (75 * zoom_factor)) + (320 - (320 * zoom_factor)),
    -** Processing line: ~        w:    1280 * zoom_factor,~
    +    args.state.foo.a
    +** Processing line: ~    args.state.foo.b~
     - Inside source: true
     *** True Line Result
    -        w:    1280 * zoom_factor,
    -** Processing line: ~        h:     720 * zoom_factor,~
    +    args.state.foo.b
    +** Processing line: ~    @hello[:foobar]~
     - Inside source: true
     *** True Line Result
    -        h:     720 * zoom_factor,
    -** Processing line: ~        path: :scene,~
    +    @hello[:foobar]
    +** Processing line: ~    assert.nil! args.state.foo.a, "a was not nil."~
     - Inside source: true
     *** True Line Result
    -        path: :scene,
    -** Processing line: ~        angle: player.angle - 90,~
    +    assert.nil! args.state.foo.a, "a was not nil."
    +** Processing line: ~    # the line below fails~
     - Inside source: true
     *** True Line Result
    -        angle: player.angle - 90,
    -** Processing line: ~        angle_anchor_x: (player.x.fdiv 1280),~
    +    # the line below fails
    +** Processing line: ~    # assert.nil! args.state.foo.b, "b was not nil."~
     - Inside source: true
     *** True Line Result
    -        angle_anchor_x: (player.x.fdiv 1280),
    -** Processing line: ~        angle_anchor_y: (player.y.fdiv 720)~
    +    # assert.nil! args.state.foo.b, "b was not nil."
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -        angle_anchor_y: (player.y.fdiv 720)
    -** Processing line: ~      }~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      }
    -** Processing line: ~    end~
    -- Inside source: true
    +
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
     *** True Line Result
    -    end
    +#+end_src
     ** Processing line: ~~
    -- Inside source: true
    +- End of paragraph detected.
     *** True Line Result
     
    -** Processing line: ~    def player~
    +** Processing line: ~*** Advanced Debugging - Unit Tests - object_to_primitive_tests.rb~
    +- Header detected.
    +*** True Line Result
    +
    +*** True Line Result
    +*** Advanced Debugging - Unit Tests - object_to_primitive_tests.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/10_advanced_debugging/03_unit_tests/object_to_primitive_tests.rb~
     - Inside source: true
     *** True Line Result
    -    def player
    -** Processing line: ~      state.player~
    +  # ./samples/10_advanced_debugging/03_unit_tests/object_to_primitive_tests.rb
    +** Processing line: ~  class PlayerSpriteForTest~
     - Inside source: true
     *** True Line Result
    -      state.player
    -** Processing line: ~    end~
    +  class PlayerSpriteForTest
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    end
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def target~
    +** Processing line: ~  def test_array_to_sprite args, assert~
     - Inside source: true
     *** True Line Result
    -    def target
    -** Processing line: ~      state.target~
    +  def test_array_to_sprite args, assert
    +** Processing line: ~    array = [[0, 0, 100, 100, "test.png"]].sprites~
     - Inside source: true
     *** True Line Result
    -      state.target
    -** Processing line: ~    end~
    +    array = [[0, 0, 100, 100, "test.png"]].sprites
    +** Processing line: ~    puts "No exception was thrown. Sweet!"~
     - Inside source: true
     *** True Line Result
    -    end
    +    puts "No exception was thrown. Sweet!"
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -51660,22 +60219,22 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def tick args~
    +** Processing line: ~  def test_class_to_sprite args, assert~
     - Inside source: true
     *** True Line Result
    -  def tick args
    -** Processing line: ~    $game ||= Game.new~
    +  def test_class_to_sprite args, assert
    +** Processing line: ~    array = [PlayerSprite.new].sprites~
     - Inside source: true
     *** True Line Result
    -    $game ||= Game.new
    -** Processing line: ~    $game.args = args~
    +    array = [PlayerSprite.new].sprites
    +** Processing line: ~    assert.true! array.first.is_a?(PlayerSprite)~
     - Inside source: true
     *** True Line Result
    -    $game.args = args
    -** Processing line: ~    $game.tick~
    +    assert.true! array.first.is_a?(PlayerSprite)
    +** Processing line: ~    puts "No exception was thrown. Sweet!"~
     - Inside source: true
     *** True Line Result
    -    $game.tick
    +    puts "No exception was thrown. Sweet!"
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -51684,10 +60243,14 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  $gtk.reset~
    +** Processing line: ~  $gtk.reset 100~
     - Inside source: true
     *** True Line Result
    -  $gtk.reset
    +  $gtk.reset 100
    +** Processing line: ~  $gtk.log_level = :off~
    +- Inside source: true
    +*** True Line Result
    +  $gtk.log_level = :off
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
    @@ -51700,546 +60263,522 @@ Follows is a source code listing for all files that have been open sourced. This
     - End of paragraph detected.
     *** True Line Result
     
    -** Processing line: ~*** Tweening Lerping Easing Functions - Easing Functions - main.rb~
    +** Processing line: ~*** Advanced Debugging - Unit Tests - parsing_tests.rb~
     - Header detected.
     *** True Line Result
     
     *** True Line Result
    -*** Tweening Lerping Easing Functions - Easing Functions - main.rb
    +*** Advanced Debugging - Unit Tests - parsing_tests.rb
     ** Processing line: ~#+begin_src ruby~
     - Line was identified as the beginning of a code block.
     *** True Line Result
     
     *** True Line Result
     #+begin_src ruby
    -** Processing line: ~  # ./samples/08_tweening_lerping_easing_functions/01_easing_functions/app/main.rb~
    +** Processing line: ~  # ./samples/10_advanced_debugging/03_unit_tests/parsing_tests.rb~
     - Inside source: true
     *** True Line Result
    -  # ./samples/08_tweening_lerping_easing_functions/01_easing_functions/app/main.rb
    -** Processing line: ~  def tick args~
    +  # ./samples/10_advanced_debugging/03_unit_tests/parsing_tests.rb
    +** Processing line: ~  def test_parse_json args, assert~
     - Inside source: true
     *** True Line Result
    -  def tick args
    -** Processing line: ~    # STOP! Watch the following presentation first!!!!~
    +  def test_parse_json args, assert
    +** Processing line: ~    result = args.gtk.parse_json '{ "name": "John Doe", "aliases": ["JD"] }'~
     - Inside source: true
     *** True Line Result
    -    # STOP! Watch the following presentation first!!!!
    -** Processing line: ~    # Math for Game Programmers: Fast and Funky 1D Nonlinear Transformations~
    +    result = args.gtk.parse_json '{ "name": "John Doe", "aliases": ["JD"] }'
    +** Processing line: ~    assert.equal! result, { "name"=>"John Doe", "aliases"=>["JD"] }, "Parsing JSON failed."~
     - Inside source: true
     *** True Line Result
    -    # Math for Game Programmers: Fast and Funky 1D Nonlinear Transformations
    -** Processing line: ~    # https://www.youtube.com/watch?v=mr5xkf6zSzk~
    +    assert.equal! result, { "name"=>"John Doe", "aliases"=>["JD"] }, "Parsing JSON failed."
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    # https://www.youtube.com/watch?v=mr5xkf6zSzk
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # You've watched the talk, yes? YES???~
    +** Processing line: ~  def test_parse_xml args, assert~
     - Inside source: true
     *** True Line Result
    -    # You've watched the talk, yes? YES???
    -** Processing line: ~~
    +  def test_parse_xml args, assert
    +** Processing line: ~    result = args.gtk.parse_xml <<-S~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # define starting and ending points of properties to animate~
    +    result = args.gtk.parse_xml <<-S
    +** Processing line: ~  ~
     - Inside source: true
     *** True Line Result
    -    # define starting and ending points of properties to animate
    -** Processing line: ~    args.state.target_x = 1180~
    +  
    +** Processing line: ~    John Doe~
     - Inside source: true
     *** True Line Result
    -    args.state.target_x = 1180
    -** Processing line: ~    args.state.target_y = 620~
    +    John Doe
    +** Processing line: ~  ~
     - Inside source: true
     *** True Line Result
    -    args.state.target_y = 620
    -** Processing line: ~    args.state.target_w = 100~
    +  
    +** Processing line: ~  S~
     - Inside source: true
     *** True Line Result
    -    args.state.target_w = 100
    -** Processing line: ~    args.state.target_h = 100~
    +  S
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    args.state.target_h = 100
    -** Processing line: ~    args.state.starting_x = 0~
    +
    +** Processing line: ~   expected = {:type=>:element,~
     - Inside source: true
     *** True Line Result
    -    args.state.starting_x = 0
    -** Processing line: ~    args.state.starting_y = 0~
    +   expected = {:type=>:element,
    +** Processing line: ~               :name=>nil,~
     - Inside source: true
     *** True Line Result
    -    args.state.starting_y = 0
    -** Processing line: ~    args.state.starting_w = 300~
    +               :name=>nil,
    +** Processing line: ~               :children=>[{:type=>:element,~
     - Inside source: true
     *** True Line Result
    -    args.state.starting_w = 300
    -** Processing line: ~    args.state.starting_h = 300~
    +               :children=>[{:type=>:element,
    +** Processing line: ~                            :name=>"Person",~
     - Inside source: true
     *** True Line Result
    -    args.state.starting_h = 300
    -** Processing line: ~~
    +                            :name=>"Person",
    +** Processing line: ~                            :children=>[{:type=>:element,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # define start time and duration of animation~
    +                            :children=>[{:type=>:element,
    +** Processing line: ~                                         :name=>"Name",~
     - Inside source: true
     *** True Line Result
    -    # define start time and duration of animation
    -** Processing line: ~    args.state.start_animate_at = 3.seconds # this is the same as writing 60 * 5 (or 300)~
    +                                         :name=>"Name",
    +** Processing line: ~                                         :children=>[{:type=>:content,~
     - Inside source: true
     *** True Line Result
    -    args.state.start_animate_at = 3.seconds # this is the same as writing 60 * 5 (or 300)
    -** Processing line: ~    args.state.duration = 2.seconds # this is the same as writing 60 * 2 (or 120)~
    +                                         :children=>[{:type=>:content,
    +** Processing line: ~                                                      :data=>"John Doe"}]}],~
     - Inside source: true
     *** True Line Result
    -    args.state.duration = 2.seconds # this is the same as writing 60 * 2 (or 120)
    -** Processing line: ~~
    +                                                      :data=>"John Doe"}]}],
    +** Processing line: ~                            :attributes=>{"id"=>"100"}}]}~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # define type of animations~
    +                            :attributes=>{"id"=>"100"}}]}
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    # define type of animations
    -** Processing line: ~    # Here are all the options you have for values you can put in the array:~
    +
    +** Processing line: ~   assert.equal! result, expected, "Parsing xml failed."~
     - Inside source: true
     *** True Line Result
    -    # Here are all the options you have for values you can put in the array:
    -** Processing line: ~    # :identity, :quad, :cube, :quart, :quint, :flip~
    +   assert.equal! result, expected, "Parsing xml failed."
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    # :identity, :quad, :cube, :quart, :quint, :flip
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Linear is defined as:~
    -- Inside source: true
    -*** True Line Result
    -    # Linear is defined as:
    -** Processing line: ~    # [:identity]~
    +** Processing line: ~  $gtk.reset 100~
     - Inside source: true
     *** True Line Result
    -    # [:identity]
    -** Processing line: ~    #~
    +  $gtk.reset 100
    +** Processing line: ~  $gtk.log_level = :off~
     - Inside source: true
     *** True Line Result
    -    #
    -** Processing line: ~    # Smooth start variations are:~
    +  $gtk.log_level = :off
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    # Smooth start variations are:
    -** Processing line: ~    # [:quad]~
    -- Inside source: true
    +
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
     *** True Line Result
    -    # [:quad]
    -** Processing line: ~    # [:cube]~
    -- Inside source: true
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
     *** True Line Result
    -    # [:cube]
    -** Processing line: ~    # [:quart]~
    -- Inside source: true
    +
    +** Processing line: ~*** Advanced Debugging - Unit Tests - pretty_format_tests.rb~
    +- Header detected.
     *** True Line Result
    -    # [:quart]
    -** Processing line: ~    # [:quint]~
    -- Inside source: true
    +
     *** True Line Result
    -    # [:quint]
    -** Processing line: ~~
    -- Inside source: true
    +*** Advanced Debugging - Unit Tests - pretty_format_tests.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
     *** True Line Result
     
    -** Processing line: ~    # Linear reversed, and smooth stop are the same as the animations defined above, but reversed:~
    -- Inside source: true
    -*** True Line Result
    -    # Linear reversed, and smooth stop are the same as the animations defined above, but reversed:
    -** Processing line: ~    # [:flip, :identity]~
    -- Inside source: true
     *** True Line Result
    -    # [:flip, :identity]
    -** Processing line: ~    # [:flip, :quad, :flip]~
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/10_advanced_debugging/03_unit_tests/pretty_format_tests.rb~
     - Inside source: true
     *** True Line Result
    -    # [:flip, :quad, :flip]
    -** Processing line: ~    # [:flip, :cube, :flip]~
    +  # ./samples/10_advanced_debugging/03_unit_tests/pretty_format_tests.rb
    +** Processing line: ~  def H opts~
     - Inside source: true
     *** True Line Result
    -    # [:flip, :cube, :flip]
    -** Processing line: ~    # [:flip, :quart, :flip]~
    +  def H opts
    +** Processing line: ~    opts~
     - Inside source: true
     *** True Line Result
    -    # [:flip, :quart, :flip]
    -** Processing line: ~    # [:flip, :quint, :flip]~
    +    opts
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    # [:flip, :quint, :flip]
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # You can also do custom definitions. See the bottom of the file details~
    -- Inside source: true
    -*** True Line Result
    -    # You can also do custom definitions. See the bottom of the file details
    -** Processing line: ~    # on how to do that. I've defined a couple for you:~
    +** Processing line: ~  def A *opts~
     - Inside source: true
     *** True Line Result
    -    # on how to do that. I've defined a couple for you:
    -** Processing line: ~    # [:smoothest_start]~
    +  def A *opts
    +** Processing line: ~    opts~
     - Inside source: true
     *** True Line Result
    -    # [:smoothest_start]
    -** Processing line: ~    # [:smoothest_stop]~
    +    opts
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    # [:smoothest_stop]
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # CHANGE THIS LINE TO ONE OF THE LINES ABOVE TO SEE VARIATIONS~
    -- Inside source: true
    -*** True Line Result
    -    # CHANGE THIS LINE TO ONE OF THE LINES ABOVE TO SEE VARIATIONS
    -** Processing line: ~    args.state.animation_type = [:identity]~
    +** Processing line: ~  def assert_format args, assert, hash, expected~
     - Inside source: true
     *** True Line Result
    -    args.state.animation_type = [:identity]
    -** Processing line: ~    # args.state.animation_type = [:quad]~
    +  def assert_format args, assert, hash, expected
    +** Processing line: ~    actual = args.fn.pretty_format hash~
     - Inside source: true
     *** True Line Result
    -    # args.state.animation_type = [:quad]
    -** Processing line: ~    # args.state.animation_type = [:cube]~
    +    actual = args.fn.pretty_format hash
    +** Processing line: ~    assert.are_equal! actual, expected~
     - Inside source: true
     *** True Line Result
    -    # args.state.animation_type = [:cube]
    -** Processing line: ~    # args.state.animation_type = [:quart]~
    +    assert.are_equal! actual, expected
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    # args.state.animation_type = [:quart]
    -** Processing line: ~    # args.state.animation_type = [:quint]~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    # args.state.animation_type = [:quint]
    -** Processing line: ~    # args.state.animation_type = [:flip, :identity]~
    +
    +** Processing line: ~  def test_pretty_print args, assert~
     - Inside source: true
     *** True Line Result
    -    # args.state.animation_type = [:flip, :identity]
    -** Processing line: ~    # args.state.animation_type = [:flip, :quad, :flip]~
    +  def test_pretty_print args, assert
    +** Processing line: ~    # =============================~
     - Inside source: true
     *** True Line Result
    -    # args.state.animation_type = [:flip, :quad, :flip]
    -** Processing line: ~    # args.state.animation_type = [:flip, :cube, :flip]~
    +    # =============================
    +** Processing line: ~    # hash with single value~
     - Inside source: true
     *** True Line Result
    -    # args.state.animation_type = [:flip, :cube, :flip]
    -** Processing line: ~    # args.state.animation_type = [:flip, :quart, :flip]~
    +    # hash with single value
    +** Processing line: ~    # =============================~
     - Inside source: true
     *** True Line Result
    -    # args.state.animation_type = [:flip, :quart, :flip]
    -** Processing line: ~    # args.state.animation_type = [:flip, :quint, :flip]~
    +    # =============================
    +** Processing line: ~    input = (H first_name: "John")~
     - Inside source: true
     *** True Line Result
    -    # args.state.animation_type = [:flip, :quint, :flip]
    -** Processing line: ~    # args.state.animation_type = [:smoothest_start]~
    +    input = (H first_name: "John")
    +** Processing line: ~    expected = <<-S~
     - Inside source: true
     *** True Line Result
    -    # args.state.animation_type = [:smoothest_start]
    -** Processing line: ~    # args.state.animation_type = [:smoothest_stop]~
    +    expected = <<-S
    +** Processing line: ~  {:first_name "John"}~
     - Inside source: true
     *** True Line Result
    -    # args.state.animation_type = [:smoothest_stop]
    -** Processing line: ~~
    +  {:first_name "John"}
    +** Processing line: ~  S~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # THIS IS WHERE THE MAGIC HAPPENS!~
    +  S
    +** Processing line: ~    (assert_format args, assert, input, expected)~
     - Inside source: true
     *** True Line Result
    -    # THIS IS WHERE THE MAGIC HAPPENS!
    -** Processing line: ~    # Numeric#ease~
    +    (assert_format args, assert, input, expected)
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    # Numeric#ease
    -** Processing line: ~    progress = args.state.start_animate_at.ease(args.state.duration, args.state.animation_type)~
    +
    +** Processing line: ~    # =============================~
     - Inside source: true
     *** True Line Result
    -    progress = args.state.start_animate_at.ease(args.state.duration, args.state.animation_type)
    -** Processing line: ~~
    +    # =============================
    +** Processing line: ~    # hash with two values~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # Numeric#ease needs to called:~
    +    # hash with two values
    +** Processing line: ~    # =============================~
     - Inside source: true
     *** True Line Result
    -    # Numeric#ease needs to called:
    -** Processing line: ~    # 1. On the number that represents the point in time you want to start, and takes two parameters:~
    +    # =============================
    +** Processing line: ~    input = (H first_name: "John", last_name: "Smith")~
     - Inside source: true
     *** True Line Result
    -    # 1. On the number that represents the point in time you want to start, and takes two parameters:
    -** Processing line: ~    #   a. The first parameter is how long the animation should take.~
    +    input = (H first_name: "John", last_name: "Smith")
    +** Processing line: ~    expected = <<-S~
     - Inside source: true
     *** True Line Result
    -    #   a. The first parameter is how long the animation should take.
    -** Processing line: ~    #   b. The second parameter represents the functions that need to be called.~
    +    expected = <<-S
    +** Processing line: ~  {:first_name "John"~
     - Inside source: true
     *** True Line Result
    -    #   b. The second parameter represents the functions that need to be called.
    -** Processing line: ~    #~
    +  {:first_name "John"
    +** Processing line: ~   :last_name "Smith"}~
     - Inside source: true
     *** True Line Result
    -    #
    -** Processing line: ~    # For example, if I wanted an animate to start 3 seconds in, and last for 10 seconds,~
    +   :last_name "Smith"}
    +** Processing line: ~  S~
     - Inside source: true
     *** True Line Result
    -    # For example, if I wanted an animate to start 3 seconds in, and last for 10 seconds,
    -** Processing line: ~    # and I want to animation to start fast and end slow, I would do:~
    +  S
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    # and I want to animation to start fast and end slow, I would do:
    -** Processing line: ~    # (60 * 3).ease(60 * 10, :flip, :quint, :flip)~
    +
    +** Processing line: ~    (assert_format args, assert, input, expected)~
     - Inside source: true
     *** True Line Result
    -    # (60 * 3).ease(60 * 10, :flip, :quint, :flip)
    +    (assert_format args, assert, input, expected)
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    #        initial value           delta to the final value~
    +** Processing line: ~    # =============================~
     - Inside source: true
     *** True Line Result
    -    #        initial value           delta to the final value
    -** Processing line: ~    calc_x = args.state.starting_x + (args.state.target_x - args.state.starting_x) * progress~
    +    # =============================
    +** Processing line: ~    # hash with inner hash~
     - Inside source: true
     *** True Line Result
    -    calc_x = args.state.starting_x + (args.state.target_x - args.state.starting_x) * progress
    -** Processing line: ~    calc_y = args.state.starting_y + (args.state.target_y - args.state.starting_y) * progress~
    +    # hash with inner hash
    +** Processing line: ~    # =============================~
     - Inside source: true
     *** True Line Result
    -    calc_y = args.state.starting_y + (args.state.target_y - args.state.starting_y) * progress
    -** Processing line: ~    calc_w = args.state.starting_w + (args.state.target_w - args.state.starting_w) * progress~
    +    # =============================
    +** Processing line: ~    input = (H first_name: "John",~
     - Inside source: true
     *** True Line Result
    -    calc_w = args.state.starting_w + (args.state.target_w - args.state.starting_w) * progress
    -** Processing line: ~    calc_h = args.state.starting_h + (args.state.target_h - args.state.starting_h) * progress~
    +    input = (H first_name: "John",
    +** Processing line: ~               last_name: "Smith",~
     - Inside source: true
     *** True Line Result
    -    calc_h = args.state.starting_h + (args.state.target_h - args.state.starting_h) * progress
    -** Processing line: ~~
    +               last_name: "Smith",
    +** Processing line: ~               middle_initial: "I",~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    args.outputs.solids << [calc_x, calc_y, calc_w, calc_h, 0, 0, 0]~
    +               middle_initial: "I",
    +** Processing line: ~               so: (H first_name: "Pocahontas",~
     - Inside source: true
     *** True Line Result
    -    args.outputs.solids << [calc_x, calc_y, calc_w, calc_h, 0, 0, 0]
    -** Processing line: ~~
    +               so: (H first_name: "Pocahontas",
    +** Processing line: ~                      last_name: "Tsenacommacah"),~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # count down~
    +                      last_name: "Tsenacommacah"),
    +** Processing line: ~               friends: (A (H first_name: "Side", last_name: "Kick"),~
     - Inside source: true
     *** True Line Result
    -    # count down
    -** Processing line: ~    count_down = args.state.start_animate_at - args.state.tick_count~
    +               friends: (A (H first_name: "Side", last_name: "Kick"),
    +** Processing line: ~                           (H first_name: "Tim", last_name: "Wizard")))~
     - Inside source: true
     *** True Line Result
    -    count_down = args.state.start_animate_at - args.state.tick_count
    -** Processing line: ~    if count_down > 0~
    +                           (H first_name: "Tim", last_name: "Wizard")))
    +** Processing line: ~    expected = <<-S~
     - Inside source: true
     *** True Line Result
    -    if count_down > 0
    -** Processing line: ~      args.outputs.labels << [640, 375, "Running: #{args.state.animation_type} in...", 3, 1]~
    +    expected = <<-S
    +** Processing line: ~  {:first_name "John"~
     - Inside source: true
     *** True Line Result
    -      args.outputs.labels << [640, 375, "Running: #{args.state.animation_type} in...", 3, 1]
    -** Processing line: ~      args.outputs.labels << [640, 345, "%.2f" % count_down.fdiv(60), 3, 1]~
    +  {:first_name "John"
    +** Processing line: ~   :last_name "Smith"~
     - Inside source: true
     *** True Line Result
    -      args.outputs.labels << [640, 345, "%.2f" % count_down.fdiv(60), 3, 1]
    -** Processing line: ~    elsif progress >= 1~
    +   :last_name "Smith"
    +** Processing line: ~   :middle_initial "I"~
     - Inside source: true
     *** True Line Result
    -    elsif progress >= 1
    -** Processing line: ~      args.outputs.labels << [640, 360, "Click screen to reset.", 3, 1]~
    +   :middle_initial "I"
    +** Processing line: ~   :so {:first_name "Pocahontas"~
     - Inside source: true
     *** True Line Result
    -      args.outputs.labels << [640, 360, "Click screen to reset.", 3, 1]
    -** Processing line: ~      if args.inputs.click~
    +   :so {:first_name "Pocahontas"
    +** Processing line: ~        :last_name "Tsenacommacah"}~
     - Inside source: true
     *** True Line Result
    -      if args.inputs.click
    -** Processing line: ~        $gtk.reset~
    +        :last_name "Tsenacommacah"}
    +** Processing line: ~   :friends [{:first_name "Side"~
     - Inside source: true
     *** True Line Result
    -        $gtk.reset
    -** Processing line: ~      end~
    +   :friends [{:first_name "Side"
    +** Processing line: ~              :last_name "Kick"}~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +              :last_name "Kick"}
    +** Processing line: ~             {:first_name "Tim"~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~  end~
    +             {:first_name "Tim"
    +** Processing line: ~              :last_name "Wizard"}]}~
     - Inside source: true
     *** True Line Result
    -  end
    +              :last_name "Wizard"}]}
    +** Processing line: ~  S~
    +- Inside source: true
    +*** True Line Result
    +  S
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # $gtk.reset~
    +** Processing line: ~    (assert_format args, assert, input, expected)~
     - Inside source: true
     *** True Line Result
    -  # $gtk.reset
    +    (assert_format args, assert, input, expected)
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # you can make own variations of animations using this~
    +** Processing line: ~    # =============================~
     - Inside source: true
     *** True Line Result
    -  # you can make own variations of animations using this
    -** Processing line: ~  module Easing~
    +    # =============================
    +** Processing line: ~    # array with one value~
     - Inside source: true
     *** True Line Result
    -  module Easing
    -** Processing line: ~    # you have access to all the built in functions: identity, flip, quad, cube, quart, quint~
    +    # array with one value
    +** Processing line: ~    # =============================~
     - Inside source: true
     *** True Line Result
    -    # you have access to all the built in functions: identity, flip, quad, cube, quart, quint
    -** Processing line: ~    def self.smoothest_start x~
    +    # =============================
    +** Processing line: ~    input = (A 1)~
     - Inside source: true
     *** True Line Result
    -    def self.smoothest_start x
    -** Processing line: ~      quad(quint(x))~
    +    input = (A 1)
    +** Processing line: ~    expected = <<-S~
     - Inside source: true
     *** True Line Result
    -      quad(quint(x))
    -** Processing line: ~    end~
    +    expected = <<-S
    +** Processing line: ~  [1]~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +  [1]
    +** Processing line: ~  S~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def self.smoothest_stop x~
    +  S
    +** Processing line: ~    (assert_format args, assert, input, expected)~
     - Inside source: true
     *** True Line Result
    -    def self.smoothest_stop x
    -** Processing line: ~      flip(quad(quint(flip(x))))~
    +    (assert_format args, assert, input, expected)
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      flip(quad(quint(flip(x))))
    -** Processing line: ~    end~
    +
    +** Processing line: ~    # =============================~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +    # =============================
    +** Processing line: ~    # array with multiple values~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # this is the source for the existing easing functions~
    +    # array with multiple values
    +** Processing line: ~    # =============================~
     - Inside source: true
     *** True Line Result
    -    # this is the source for the existing easing functions
    -** Processing line: ~    def self.identity x~
    +    # =============================
    +** Processing line: ~    input = (A 1, 2, 3)~
     - Inside source: true
     *** True Line Result
    -    def self.identity x
    -** Processing line: ~      x~
    +    input = (A 1, 2, 3)
    +** Processing line: ~    expected = <<-S~
     - Inside source: true
     *** True Line Result
    -      x
    -** Processing line: ~    end~
    +    expected = <<-S
    +** Processing line: ~  [1~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +  [1
    +** Processing line: ~   2~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def self.flip x~
    +   2
    +** Processing line: ~   3]~
     - Inside source: true
     *** True Line Result
    -    def self.flip x
    -** Processing line: ~      1 - x~
    +   3]
    +** Processing line: ~  S~
     - Inside source: true
     *** True Line Result
    -      1 - x
    -** Processing line: ~    end~
    +  S
    +** Processing line: ~    (assert_format args, assert, input, expected)~
     - Inside source: true
     *** True Line Result
    -    end
    +    (assert_format args, assert, input, expected)
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def self.quad x~
    +** Processing line: ~    # =============================~
     - Inside source: true
     *** True Line Result
    -    def self.quad x
    -** Processing line: ~      x * x~
    +    # =============================
    +** Processing line: ~    # array with multiple values hashes~
     - Inside source: true
     *** True Line Result
    -      x * x
    -** Processing line: ~    end~
    +    # array with multiple values hashes
    +** Processing line: ~    # =============================~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +    # =============================
    +** Processing line: ~    input = (A (H first_name: "Side", last_name: "Kick"),~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def self.cube x~
    +    input = (A (H first_name: "Side", last_name: "Kick"),
    +** Processing line: ~               (H first_name: "Tim", last_name: "Wizard"))~
     - Inside source: true
     *** True Line Result
    -    def self.cube x
    -** Processing line: ~      x * x * x~
    +               (H first_name: "Tim", last_name: "Wizard"))
    +** Processing line: ~    expected = <<-S~
     - Inside source: true
     *** True Line Result
    -      x * x * x
    -** Processing line: ~    end~
    +    expected = <<-S
    +** Processing line: ~  [{:first_name "Side"~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +  [{:first_name "Side"
    +** Processing line: ~    :last_name "Kick"}~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def self.quart x~
    +    :last_name "Kick"}
    +** Processing line: ~   {:first_name "Tim"~
     - Inside source: true
     *** True Line Result
    -    def self.quart x
    -** Processing line: ~      x * x * x * x * x~
    +   {:first_name "Tim"
    +** Processing line: ~    :last_name "Wizard"}]~
     - Inside source: true
     *** True Line Result
    -      x * x * x * x * x
    -** Processing line: ~    end~
    +    :last_name "Wizard"}]
    +** Processing line: ~  S~
     - Inside source: true
     *** True Line Result
    -    end
    +  S
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def self.quint x~
    -- Inside source: true
    -*** True Line Result
    -    def self.quint x
    -** Processing line: ~      x * x * x * x * x * x~
    -- Inside source: true
    -*** True Line Result
    -      x * x * x * x * x * x
    -** Processing line: ~    end~
    +** Processing line: ~    (assert_format args, assert, input, expected)~
     - Inside source: true
     *** True Line Result
    -    end
    +    (assert_format args, assert, input, expected)
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -52248,126 +60787,102 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~#+end_src~
    -- Line was identified as the end of a code block.
    -*** True Line Result
    -#+end_src
    -** Processing line: ~~
    -- End of paragraph detected.
    -*** True Line Result
    -
    -** Processing line: ~*** Tweening Lerping Easing Functions - Cubic Bezier - main.rb~
    -- Header detected.
    -*** True Line Result
    -
    -*** True Line Result
    -*** Tweening Lerping Easing Functions - Cubic Bezier - main.rb
    -** Processing line: ~#+begin_src ruby~
    -- Line was identified as the beginning of a code block.
    -*** True Line Result
    -
    -*** True Line Result
    -#+begin_src ruby
    -** Processing line: ~  # ./samples/08_tweening_lerping_easing_functions/02_cubic_bezier/app/main.rb~
    -- Inside source: true
    -*** True Line Result
    -  # ./samples/08_tweening_lerping_easing_functions/02_cubic_bezier/app/main.rb
    -** Processing line: ~  def tick args~
    +** Processing line: ~  def test_nested_nested args, assert~
     - Inside source: true
     *** True Line Result
    -  def tick args
    -** Processing line: ~    args.outputs.background_color = [33, 33, 33]~
    +  def test_nested_nested args, assert
    +** Processing line: ~    # =============================~
     - Inside source: true
     *** True Line Result
    -    args.outputs.background_color = [33, 33, 33]
    -** Processing line: ~    args.outputs.lines << bezier(100, 100,~
    +    # =============================
    +** Processing line: ~    # nested array in nested hash~
     - Inside source: true
     *** True Line Result
    -    args.outputs.lines << bezier(100, 100,
    -** Processing line: ~                                 100, 620,~
    +    # nested array in nested hash
    +** Processing line: ~    # =============================~
     - Inside source: true
     *** True Line Result
    -                                 100, 620,
    -** Processing line: ~                                 1180, 620,~
    +    # =============================
    +** Processing line: ~    input = (H type: :root,~
     - Inside source: true
     *** True Line Result
    -                                 1180, 620,
    -** Processing line: ~                                 1180, 100,~
    +    input = (H type: :root,
    +** Processing line: ~               text: "Root",~
     - Inside source: true
     *** True Line Result
    -                                 1180, 100,
    -** Processing line: ~                                 0)~
    +               text: "Root",
    +** Processing line: ~               children: (A (H level: 1,~
     - Inside source: true
     *** True Line Result
    -                                 0)
    -** Processing line: ~~
    +               children: (A (H level: 1,
    +** Processing line: ~                               text: "Level 1",~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    args.outputs.lines << bezier(100, 100,~
    +                               text: "Level 1",
    +** Processing line: ~                               children: (A (H level: 2,~
     - Inside source: true
     *** True Line Result
    -    args.outputs.lines << bezier(100, 100,
    -** Processing line: ~                                 100, 620,~
    +                               children: (A (H level: 2,
    +** Processing line: ~                                               text: "Level 2",~
     - Inside source: true
     *** True Line Result
    -                                 100, 620,
    -** Processing line: ~                                 1180, 620,~
    +                                               text: "Level 2",
    +** Processing line: ~                                               children: [])))))~
     - Inside source: true
     *** True Line Result
    -                                 1180, 620,
    -** Processing line: ~                                 1180, 100,~
    +                                               children: [])))))
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -                                 1180, 100,
    -** Processing line: ~                                 20)~
    +
    +** Processing line: ~    expected = <<-S~
     - Inside source: true
     *** True Line Result
    -                                 20)
    -** Processing line: ~  end~
    +    expected = <<-S
    +** Processing line: ~  {:type :root~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +  {:type :root
    +** Processing line: ~   :text "Root"~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~~
    +   :text "Root"
    +** Processing line: ~   :children [{:level 1~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def bezier x1, y1, x2, y2, x3, y3, x4, y4, step~
    +   :children [{:level 1
    +** Processing line: ~               :text "Level 1"~
     - Inside source: true
     *** True Line Result
    -  def bezier x1, y1, x2, y2, x3, y3, x4, y4, step
    -** Processing line: ~    step ||= 0~
    +               :text "Level 1"
    +** Processing line: ~               :children [{:level 2~
     - Inside source: true
     *** True Line Result
    -    step ||= 0
    -** Processing line: ~    color = [200, 200, 200]~
    +               :children [{:level 2
    +** Processing line: ~                           :text "Level 2"~
     - Inside source: true
     *** True Line Result
    -    color = [200, 200, 200]
    -** Processing line: ~    points = points_for_bezier [x1, y1], [x2, y2], [x3, y3], [x4, y4], step~
    +                           :text "Level 2"
    +** Processing line: ~                           :children []}]}]}~
     - Inside source: true
     *** True Line Result
    -    points = points_for_bezier [x1, y1], [x2, y2], [x3, y3], [x4, y4], step
    +                           :children []}]}]}
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    points.each_cons(2).map do |p1, p2|~
    +** Processing line: ~  S~
     - Inside source: true
     *** True Line Result
    -    points.each_cons(2).map do |p1, p2|
    -** Processing line: ~      [p1, p2, color]~
    +  S
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      [p1, p2, color]
    -** Processing line: ~    end~
    +
    +** Processing line: ~    (assert_format args, assert, input, expected)~
     - Inside source: true
     *** True Line Result
    -    end
    +    (assert_format args, assert, input, expected)
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -52376,98 +60891,86 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def points_for_bezier p1, p2, p3, p4, step~
    -- Inside source: true
    -*** True Line Result
    -  def points_for_bezier p1, p2, p3, p4, step
    -** Processing line: ~    points = []~
    -- Inside source: true
    -*** True Line Result
    -    points = []
    -** Processing line: ~    if step == 0~
    -- Inside source: true
    -*** True Line Result
    -    if step == 0
    -** Processing line: ~      [p1, p2, p3, p4]~
    +** Processing line: ~  def test_scene args, assert~
     - Inside source: true
     *** True Line Result
    -      [p1, p2, p3, p4]
    -** Processing line: ~    else~
    +  def test_scene args, assert
    +** Processing line: ~    script = <<-S~
     - Inside source: true
     *** True Line Result
    -    else
    -** Processing line: ~      t_step = 1.fdiv(step + 1)~
    +    script = <<-S
    +** Processing line: ~  * Scene 1~
     - Inside source: true
     *** True Line Result
    -      t_step = 1.fdiv(step + 1)
    -** Processing line: ~      t = 0~
    +  * Scene 1
    +** Processing line: ~  ** Narrator~
     - Inside source: true
     *** True Line Result
    -      t = 0
    -** Processing line: ~      t += t_step~
    +  ** Narrator
    +** Processing line: ~  They say happy endings don't exist.~
     - Inside source: true
     *** True Line Result
    -      t += t_step
    -** Processing line: ~      points = []~
    +  They say happy endings don't exist.
    +** Processing line: ~  ** Narrator~
     - Inside source: true
     *** True Line Result
    -      points = []
    -** Processing line: ~      while t < 1~
    +  ** Narrator
    +** Processing line: ~  They say true love is a lie.~
     - Inside source: true
     *** True Line Result
    -      while t < 1
    -** Processing line: ~        points << [~
    +  They say true love is a lie.
    +** Processing line: ~  S~
     - Inside source: true
     *** True Line Result
    -        points << [
    -** Processing line: ~          b_for_t(p1.x, p2.x, p3.x, p4.x, t),~
    +  S
    +** Processing line: ~    input = parse_org args, script~
     - Inside source: true
     *** True Line Result
    -          b_for_t(p1.x, p2.x, p3.x, p4.x, t),
    -** Processing line: ~          b_for_t(p1.y, p2.y, p3.y, p4.y, t),~
    +    input = parse_org args, script
    +** Processing line: ~    puts (args.fn.pretty_format input)~
     - Inside source: true
     *** True Line Result
    -          b_for_t(p1.y, p2.y, p3.y, p4.y, t),
    -** Processing line: ~        ]~
    +    puts (args.fn.pretty_format input)
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -        ]
    -** Processing line: ~        t += t_step~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        t += t_step
    -** Processing line: ~      end~
    -- Inside source: true
    +
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
     *** True Line Result
    -      end
    +#+end_src
     ** Processing line: ~~
    -- Inside source: true
    +- End of paragraph detected.
     *** True Line Result
     
    -** Processing line: ~      [~
    -- Inside source: true
    +** Processing line: ~*** Advanced Debugging - Unit Tests - require_tests.rb~
    +- Header detected.
     *** True Line Result
    -      [
    -** Processing line: ~        p1,~
    -- Inside source: true
    +
     *** True Line Result
    -        p1,
    -** Processing line: ~        *points,~
    -- Inside source: true
    +*** Advanced Debugging - Unit Tests - require_tests.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
     *** True Line Result
    -        *points,
    -** Processing line: ~        p4~
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/10_advanced_debugging/03_unit_tests/require_tests.rb~
     - Inside source: true
     *** True Line Result
    -        p4
    -** Processing line: ~      ]~
    +  # ./samples/10_advanced_debugging/03_unit_tests/require_tests.rb
    +** Processing line: ~  def write_src path, src~
     - Inside source: true
     *** True Line Result
    -      ]
    -** Processing line: ~    end~
    +  def write_src path, src
    +** Processing line: ~    $gtk.write_file path, src~
     - Inside source: true
     *** True Line Result
    -    end
    +    $gtk.write_file path, src
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -52476,142 +60979,138 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def b_for_t v0, v1, v2, v3, t~
    -- Inside source: true
    -*** True Line Result
    -  def b_for_t v0, v1, v2, v3, t
    -** Processing line: ~    pow(1 - t, 3) * v0 +~
    +** Processing line: ~  write_src 'app/unit_testing_game.rb', <<-S~
     - Inside source: true
     *** True Line Result
    -    pow(1 - t, 3) * v0 +
    -** Processing line: ~    3 * pow(1 - t, 2) * t * v1 +~
    +  write_src 'app/unit_testing_game.rb', <<-S
    +** Processing line: ~  module UnitTesting~
     - Inside source: true
     *** True Line Result
    -    3 * pow(1 - t, 2) * t * v1 +
    -** Processing line: ~    3 * (1 - t) * pow(t, 2) * v2 +~
    +  module UnitTesting
    +** Processing line: ~    class Game~
     - Inside source: true
     *** True Line Result
    -    3 * (1 - t) * pow(t, 2) * v2 +
    -** Processing line: ~    pow(t, 3) * v3~
    +    class Game
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    pow(t, 3) * v3
    +    end
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
       end
    +** Processing line: ~  S~
    +- Inside source: true
    +*** True Line Result
    +  S
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def pow n, to~
    +** Processing line: ~  write_src 'lib/unit_testing_lib.rb', <<-S~
     - Inside source: true
     *** True Line Result
    -  def pow n, to
    -** Processing line: ~    n ** to~
    +  write_src 'lib/unit_testing_lib.rb', <<-S
    +** Processing line: ~  module UnitTesting~
     - Inside source: true
     *** True Line Result
    -    n ** to
    +  module UnitTesting
    +** Processing line: ~    class Lib~
    +- Inside source: true
    +*** True Line Result
    +    class Lib
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
       end
    -** Processing line: ~~
    +** Processing line: ~  S~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~#+end_src~
    -- Line was identified as the end of a code block.
    -*** True Line Result
    -#+end_src
    +  S
     ** Processing line: ~~
    -- End of paragraph detected.
    -*** True Line Result
    -
    -** Processing line: ~*** Tweening Lerping Easing Functions - Easing Using Spline - main.rb~
    -- Header detected.
    +- Inside source: true
     *** True Line Result
     
    +** Processing line: ~  write_src 'app/nested/unit_testing_nested.rb', <<-S~
    +- Inside source: true
     *** True Line Result
    -*** Tweening Lerping Easing Functions - Easing Using Spline - main.rb
    -** Processing line: ~#+begin_src ruby~
    -- Line was identified as the beginning of a code block.
    -*** True Line Result
    -
    +  write_src 'app/nested/unit_testing_nested.rb', <<-S
    +** Processing line: ~  module UnitTesting~
    +- Inside source: true
     *** True Line Result
    -#+begin_src ruby
    -** Processing line: ~  # ./samples/08_tweening_lerping_easing_functions/03_easing_using_spline/app/main.rb~
    +  module UnitTesting
    +** Processing line: ~    class Nested~
     - Inside source: true
     *** True Line Result
    -  # ./samples/08_tweening_lerping_easing_functions/03_easing_using_spline/app/main.rb
    -** Processing line: ~  def tick args~
    +    class Nested
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  def tick args
    -** Processing line: ~    args.state.duration = 10.seconds~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    args.state.duration = 10.seconds
    -** Processing line: ~    args.state.spline = [~
    +  end
    +** Processing line: ~  S~
     - Inside source: true
     *** True Line Result
    -    args.state.spline = [
    -** Processing line: ~      [0.0, 0.33, 0.66, 1.0],~
    +  S
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      [0.0, 0.33, 0.66, 1.0],
    -** Processing line: ~      [1.0, 1.0,  1.0,  1.0],~
    +
    +** Processing line: ~  require 'app/unit_testing_game.rb'~
     - Inside source: true
     *** True Line Result
    -      [1.0, 1.0,  1.0,  1.0],
    -** Processing line: ~      [1.0, 0.66, 0.33, 0.0],~
    +  require 'app/unit_testing_game.rb'
    +** Processing line: ~  require 'app/nested/unit_testing_nested.rb'~
     - Inside source: true
     *** True Line Result
    -      [1.0, 0.66, 0.33, 0.0],
    -** Processing line: ~    ]~
    +  require 'app/nested/unit_testing_nested.rb'
    +** Processing line: ~  require 'lib/unit_testing_lib.rb'~
     - Inside source: true
     *** True Line Result
    -    ]
    +  require 'lib/unit_testing_lib.rb'
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    args.state.simulation_tick = args.state.tick_count % args.state.duration~
    -- Inside source: true
    -*** True Line Result
    -    args.state.simulation_tick = args.state.tick_count % args.state.duration
    -** Processing line: ~    progress = 0.ease_spline_extended args.state.simulation_tick, args.state.duration, args.state.spline~
    +** Processing line: ~  def test_require args, assert~
     - Inside source: true
     *** True Line Result
    -    progress = 0.ease_spline_extended args.state.simulation_tick, args.state.duration, args.state.spline
    -** Processing line: ~    args.outputs.borders << args.grid.rect~
    +  def test_require args, assert
    +** Processing line: ~    UnitTesting::Game.new~
     - Inside source: true
     *** True Line Result
    -    args.outputs.borders << args.grid.rect
    -** Processing line: ~    args.outputs.solids << [20 + 1240 * progress,~
    +    UnitTesting::Game.new
    +** Processing line: ~    UnitTesting::Lib.new~
     - Inside source: true
     *** True Line Result
    -    args.outputs.solids << [20 + 1240 * progress,
    -** Processing line: ~                            20 +  680 * progress,~
    +    UnitTesting::Lib.new
    +** Processing line: ~    UnitTesting::Nested.new~
     - Inside source: true
     *** True Line Result
    -                            20 +  680 * progress,
    -** Processing line: ~                            20, 20].anchor_rect(0.5, 0.5)~
    +    UnitTesting::Nested.new
    +** Processing line: ~    $gtk.exec 'rm ./mygame/app/unit_testing_game.rb'~
     - Inside source: true
     *** True Line Result
    -                            20, 20].anchor_rect(0.5, 0.5)
    -** Processing line: ~    args.outputs.labels << [10,~
    +    $gtk.exec 'rm ./mygame/app/unit_testing_game.rb'
    +** Processing line: ~    $gtk.exec 'rm ./mygame/app/nested/unit_testing_nested.rb'~
     - Inside source: true
     *** True Line Result
    -    args.outputs.labels << [10,
    -** Processing line: ~                            710,~
    +    $gtk.exec 'rm ./mygame/app/nested/unit_testing_nested.rb'
    +** Processing line: ~    $gtk.exec 'rm ./mygame/lib/unit_testing_lib.rb'~
     - Inside source: true
     *** True Line Result
    -                            710,
    -** Processing line: ~                            "perc: #{"%.2f" % (args.state.simulation_tick / args.state.duration)} t: #{args.state.simulation_tick}"]~
    +    $gtk.exec 'rm ./mygame/lib/unit_testing_lib.rb'
    +** Processing line: ~    assert.ok!~
     - Inside source: true
     *** True Line Result
    -                            "perc: #{"%.2f" % (args.state.simulation_tick / args.state.duration)} t: #{args.state.simulation_tick}"]
    +    assert.ok!
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -52628,66 +61127,106 @@ Follows is a source code listing for all files that have been open sourced. This
     - End of paragraph detected.
     *** True Line Result
     
    -** Processing line: ~*** Tweening Lerping Easing Functions - Parametric Enemy Movement - main.rb~
    +** Processing line: ~*** Advanced Debugging - Unit Tests - serialize_deserialize_tests.rb~
     - Header detected.
     *** True Line Result
     
     *** True Line Result
    -*** Tweening Lerping Easing Functions - Parametric Enemy Movement - main.rb
    -** Processing line: ~#+begin_src ruby~
    -- Line was identified as the beginning of a code block.
    +*** Advanced Debugging - Unit Tests - serialize_deserialize_tests.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/10_advanced_debugging/03_unit_tests/serialize_deserialize_tests.rb~
    +- Inside source: true
    +*** True Line Result
    +  # ./samples/10_advanced_debugging/03_unit_tests/serialize_deserialize_tests.rb
    +** Processing line: ~  def test_serialize args, assert~
    +- Inside source: true
    +*** True Line Result
    +  def test_serialize args, assert
    +** Processing line: ~    GTK::Entity.__reset_id__!~
    +- Inside source: true
    +*** True Line Result
    +    GTK::Entity.__reset_id__!
    +** Processing line: ~    args.state.player_one = "test"~
    +- Inside source: true
    +*** True Line Result
    +    args.state.player_one = "test"
    +** Processing line: ~    result = args.gtk.serialize_state args.state~
    +- Inside source: true
    +*** True Line Result
    +    result = args.gtk.serialize_state args.state
    +** Processing line: ~    assert.equal! result, "{:entity_id=>3, :entity_keys_by_ref=>{}, :tick_count=>-1, :player_one=>\"test\"}"~
    +- Inside source: true
    +*** True Line Result
    +    assert.equal! result, "{:entity_id=>3, :entity_keys_by_ref=>{}, :tick_count=>-1, :player_one=>\"test\"}"
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    GTK::Entity.__reset_id__!~
    +- Inside source: true
    +*** True Line Result
    +    GTK::Entity.__reset_id__!
    +** Processing line: ~    args.gtk.write_file 'state.txt', ''~
    +- Inside source: true
     *** True Line Result
    -
    +    args.gtk.write_file 'state.txt', ''
    +** Processing line: ~    result = args.gtk.serialize_state 'state.txt', args.state~
    +- Inside source: true
     *** True Line Result
    -#+begin_src ruby
    -** Processing line: ~  # ./samples/08_tweening_lerping_easing_functions/04_parametric_enemy_movement/app/main.rb~
    +    result = args.gtk.serialize_state 'state.txt', args.state
    +** Processing line: ~    assert.equal! result, "{:entity_id=>3, :entity_keys_by_ref=>{}, :tick_count=>-1, :player_one=>\"test\"}"~
     - Inside source: true
     *** True Line Result
    -  # ./samples/08_tweening_lerping_easing_functions/04_parametric_enemy_movement/app/main.rb
    -** Processing line: ~  def new_star args~
    +    assert.equal! result, "{:entity_id=>3, :entity_keys_by_ref=>{}, :tick_count=>-1, :player_one=>\"test\"}"
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -  def new_star args
    -** Processing line: ~    { x: 1280.randomize(:ratio),~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    { x: 1280.randomize(:ratio),
    -** Processing line: ~      starting_y: 800,~
    +
    +** Processing line: ~  def test_deserialize args, assert~
     - Inside source: true
     *** True Line Result
    -      starting_y: 800,
    -** Processing line: ~      distance_to_travel: 900 + 100.randomize(:ratio),~
    +  def test_deserialize args, assert
    +** Processing line: ~    GTK::Entity.__reset_id__!~
     - Inside source: true
     *** True Line Result
    -      distance_to_travel: 900 + 100.randomize(:ratio),
    -** Processing line: ~      duration: 100.randomize(:ratio) + 60,~
    +    GTK::Entity.__reset_id__!
    +** Processing line: ~    result = args.gtk.deserialize_state '{:entity_id=>3, :tick_count=>-1, :player_one=>"test"}'~
     - Inside source: true
     *** True Line Result
    -      duration: 100.randomize(:ratio) + 60,
    -** Processing line: ~      created_at: args.state.tick_count,~
    +    result = args.gtk.deserialize_state '{:entity_id=>3, :tick_count=>-1, :player_one=>"test"}'
    +** Processing line: ~    assert.equal! result.player_one, "test"~
     - Inside source: true
     *** True Line Result
    -      created_at: args.state.tick_count,
    -** Processing line: ~      max_alpha: 128.randomize(:ratio) + 128,~
    +    assert.equal! result.player_one, "test"
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      max_alpha: 128.randomize(:ratio) + 128,
    -** Processing line: ~      b: 255.randomize(:ratio),~
    +
    +** Processing line: ~    GTK::Entity.__reset_id__!~
     - Inside source: true
     *** True Line Result
    -      b: 255.randomize(:ratio),
    -** Processing line: ~      g: 200.randomize(:ratio),~
    +    GTK::Entity.__reset_id__!
    +** Processing line: ~    args.gtk.write_file 'state.txt',  '{:entity_id=>3, :tick_count=>-1, :player_one=>"test"}'~
     - Inside source: true
     *** True Line Result
    -      g: 200.randomize(:ratio),
    -** Processing line: ~      w: 1.randomize(:ratio) + 1,~
    +    args.gtk.write_file 'state.txt',  '{:entity_id=>3, :tick_count=>-1, :player_one=>"test"}'
    +** Processing line: ~    result = args.gtk.deserialize_state 'state.txt'~
     - Inside source: true
     *** True Line Result
    -      w: 1.randomize(:ratio) + 1,
    -** Processing line: ~      h: 1.randomize(:ratio) + 1 }~
    +    result = args.gtk.deserialize_state 'state.txt'
    +** Processing line: ~    assert.equal! result.player_one, "test"~
     - Inside source: true
     *** True Line Result
    -      h: 1.randomize(:ratio) + 1 }
    +    assert.equal! result.player_one, "test"
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -52696,42 +61235,42 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def new_enemy args~
    +** Processing line: ~  def test_very_large_serialization args, assert~
     - Inside source: true
     *** True Line Result
    -  def new_enemy args
    -** Processing line: ~    { x: 1280.randomize(:ratio),~
    +  def test_very_large_serialization args, assert
    +** Processing line: ~    GTK::Entity.__reset_id__!~
     - Inside source: true
     *** True Line Result
    -    { x: 1280.randomize(:ratio),
    -** Processing line: ~      starting_y: 800,~
    +    GTK::Entity.__reset_id__!
    +** Processing line: ~    size = 3000~
     - Inside source: true
     *** True Line Result
    -      starting_y: 800,
    -** Processing line: ~      distance_to_travel: -900,~
    +    size = 3000
    +** Processing line: ~    size.map_with_index do |i|~
     - Inside source: true
     *** True Line Result
    -      distance_to_travel: -900,
    -** Processing line: ~      duration: 60.randomize(:ratio) + 180,~
    +    size.map_with_index do |i|
    +** Processing line: ~      args.state.send("k#{i}=".to_sym, i)~
     - Inside source: true
     *** True Line Result
    -      duration: 60.randomize(:ratio) + 180,
    -** Processing line: ~      created_at: args.state.tick_count,~
    +      args.state.send("k#{i}=".to_sym, i)
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      created_at: args.state.tick_count,
    -** Processing line: ~      w: 32,~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      w: 32,
    -** Processing line: ~      h: 32,~
    +
    +** Processing line: ~    result = args.gtk.serialize_state args.state~
     - Inside source: true
     *** True Line Result
    -      h: 32,
    -** Processing line: ~      fire_rate: (30.randomize(:ratio) + (60 - args.state.score)).to_i }~
    +    result = args.gtk.serialize_state args.state
    +** Processing line: ~    assert.true! (args.gtk.console.log.join.include? "unlikely a string this large will deserialize correctly")~
     - Inside source: true
     *** True Line Result
    -      fire_rate: (30.randomize(:ratio) + (60 - args.state.score)).to_i }
    +    assert.true! (args.gtk.console.log.join.include? "unlikely a string this large will deserialize correctly")
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -52740,78 +61279,70 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def new_bullet args, starting_x, starting_y, enemy_speed~
    -- Inside source: true
    -*** True Line Result
    -  def new_bullet args, starting_x, starting_y, enemy_speed
    -** Processing line: ~    { x: starting_x,~
    -- Inside source: true
    -*** True Line Result
    -    { x: starting_x,
    -** Processing line: ~      starting_y: starting_y,~
    +** Processing line: ~  def test_strict_entity_serialization args, assert~
     - Inside source: true
     *** True Line Result
    -      starting_y: starting_y,
    -** Processing line: ~      distance_to_travel: -900,~
    +  def test_strict_entity_serialization args, assert
    +** Processing line: ~    GTK::Entity.__reset_id__!~
     - Inside source: true
     *** True Line Result
    -      distance_to_travel: -900,
    -** Processing line: ~      created_at: args.state.tick_count,~
    +    GTK::Entity.__reset_id__!
    +** Processing line: ~    args.state.player_one = args.state.new_entity(:player, name: "Ryu")~
     - Inside source: true
     *** True Line Result
    -      created_at: args.state.tick_count,
    -** Processing line: ~      duration: 900 / (enemy_speed.abs + 2.0 + (5.0 * args.state.score.fdiv(100))).abs,~
    +    args.state.player_one = args.state.new_entity(:player, name: "Ryu")
    +** Processing line: ~    args.state.player_two = args.state.new_entity_strict(:player_strict, name: "Ken")~
     - Inside source: true
     *** True Line Result
    -      duration: 900 / (enemy_speed.abs + 2.0 + (5.0 * args.state.score.fdiv(100))).abs,
    -** Processing line: ~      w: 5,~
    +    args.state.player_two = args.state.new_entity_strict(:player_strict, name: "Ken")
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      w: 5,
    -** Processing line: ~      h: 5 }~
    +
    +** Processing line: ~    serialized_state = args.gtk.serialize_state args.state~
     - Inside source: true
     *** True Line Result
    -      h: 5 }
    -** Processing line: ~  end~
    +    serialized_state = args.gtk.serialize_state args.state
    +** Processing line: ~    assert.equal! serialized_state, '{:entity_id=>1, :entity_keys_by_ref=>{}, :tick_count=>-1, :player_one=>{:entity_id=>1, :entity_name=>:player, :entity_keys_by_ref=>{}, :entity_type=>:player, :created_at=>-1, :global_created_at=>-1, :name=>"Ryu"}, :player_two=>{:entity_id=>3, :entity_name=>:player_strict, :entity_type=>:player_strict, :created_at=>-1, :global_created_at_elapsed=>-1, :entity_strict=>true, :entity_keys_by_ref=>{:entity_type=>:entity_name, :global_created_at_elapsed=>:created_at}, :name=>"Ken"}}'~
     - Inside source: true
     *** True Line Result
    -  end
    +    assert.equal! serialized_state, '{:entity_id=>1, :entity_keys_by_ref=>{}, :tick_count=>-1, :player_one=>{:entity_id=>1, :entity_name=>:player, :entity_keys_by_ref=>{}, :entity_type=>:player, :created_at=>-1, :global_created_at=>-1, :name=>"Ryu"}, :player_two=>{:entity_id=>3, :entity_name=>:player_strict, :entity_type=>:player_strict, :created_at=>-1, :global_created_at_elapsed=>-1, :entity_strict=>true, :entity_keys_by_ref=>{:entity_type=>:entity_name, :global_created_at_elapsed=>:created_at}, :name=>"Ken"}}'
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def new_player_bullet args, starting_x, starting_y, player_speed~
    +** Processing line: ~    GTK::Entity.__reset_id__!~
     - Inside source: true
     *** True Line Result
    -  def new_player_bullet args, starting_x, starting_y, player_speed
    -** Processing line: ~    { x: starting_x,~
    +    GTK::Entity.__reset_id__!
    +** Processing line: ~    deserialize_state = args.gtk.deserialize_state serialized_state~
     - Inside source: true
     *** True Line Result
    -    { x: starting_x,
    -** Processing line: ~      starting_y: starting_y,~
    +    deserialize_state = args.gtk.deserialize_state serialized_state
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      starting_y: starting_y,
    -** Processing line: ~      distance_to_travel: 900,~
    +
    +** Processing line: ~    assert.equal! args.state.player_one.name, deserialize_state.player_one.name~
     - Inside source: true
     *** True Line Result
    -      distance_to_travel: 900,
    -** Processing line: ~      created_at: args.state.tick_count,~
    +    assert.equal! args.state.player_one.name, deserialize_state.player_one.name
    +** Processing line: ~    assert.true! args.state.player_one.is_a? GTK::OpenEntity~
     - Inside source: true
     *** True Line Result
    -      created_at: args.state.tick_count,
    -** Processing line: ~      duration: 900 / (player_speed + 2.0),~
    +    assert.true! args.state.player_one.is_a? GTK::OpenEntity
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      duration: 900 / (player_speed + 2.0),
    -** Processing line: ~      w: 5,~
    +
    +** Processing line: ~    assert.equal! args.state.player_two.name, deserialize_state.player_two.name~
     - Inside source: true
     *** True Line Result
    -      w: 5,
    -** Processing line: ~      h: 5 }~
    +    assert.equal! args.state.player_two.name, deserialize_state.player_two.name
    +** Processing line: ~    assert.true! args.state.player_two.is_a? GTK::StrictEntity~
     - Inside source: true
     *** True Line Result
    -      h: 5 }
    +    assert.true! args.state.player_two.is_a? GTK::StrictEntity
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -52820,130 +61351,146 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def defaults args~
    +** Processing line: ~  def test_strict_entity_serialization_with_nil args, assert~
     - Inside source: true
     *** True Line Result
    -  def defaults args
    -** Processing line: ~    args.outputs.background_color  = [0, 0, 0]~
    +  def test_strict_entity_serialization_with_nil args, assert
    +** Processing line: ~    GTK::Entity.__reset_id__!~
     - Inside source: true
     *** True Line Result
    -    args.outputs.background_color  = [0, 0, 0]
    -** Processing line: ~    args.state.score             ||= 0~
    +    GTK::Entity.__reset_id__!
    +** Processing line: ~    args.state.player_one = args.state.new_entity(:player, name: "Ryu")~
     - Inside source: true
     *** True Line Result
    -    args.state.score             ||= 0
    -** Processing line: ~    args.state.stars             ||= []~
    +    args.state.player_one = args.state.new_entity(:player, name: "Ryu")
    +** Processing line: ~    args.state.player_two = args.state.new_entity_strict(:player_strict, name: "Ken", blood_type: nil)~
     - Inside source: true
     *** True Line Result
    -    args.state.stars             ||= []
    -** Processing line: ~    args.state.enemies           ||= []~
    +    args.state.player_two = args.state.new_entity_strict(:player_strict, name: "Ken", blood_type: nil)
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    args.state.enemies           ||= []
    -** Processing line: ~    args.state.bullets           ||= []~
    +
    +** Processing line: ~    serialized_state = args.gtk.serialize_state args.state~
     - Inside source: true
     *** True Line Result
    -    args.state.bullets           ||= []
    -** Processing line: ~    args.state.player_bullets    ||= []~
    +    serialized_state = args.gtk.serialize_state args.state
    +** Processing line: ~    assert.equal! serialized_state, '{:entity_id=>9, :entity_keys_by_ref=>{}, :tick_count=>-1, :player_one=>{:entity_id=>1, :entity_name=>:player, :entity_keys_by_ref=>{}, :entity_type=>:player, :created_at=>-1, :global_created_at=>-1, :name=>"Ryu"}, :player_two=>{:entity_id=>2, :entity_name=>:player_strict, :entity_type=>:player_strict, :created_at=>-1, :global_created_at_elapsed=>-1, :entity_strict=>true, :entity_keys_by_ref=>{:entity_type=>:entity_name, :global_created_at_elapsed=>:created_at}, :name=>"Ken", :blood_type=>nil}}'~
     - Inside source: true
     *** True Line Result
    -    args.state.player_bullets    ||= []
    -** Processing line: ~    args.state.max_stars           = 50~
    +    assert.equal! serialized_state, '{:entity_id=>9, :entity_keys_by_ref=>{}, :tick_count=>-1, :player_one=>{:entity_id=>1, :entity_name=>:player, :entity_keys_by_ref=>{}, :entity_type=>:player, :created_at=>-1, :global_created_at=>-1, :name=>"Ryu"}, :player_two=>{:entity_id=>2, :entity_name=>:player_strict, :entity_type=>:player_strict, :created_at=>-1, :global_created_at_elapsed=>-1, :entity_strict=>true, :entity_keys_by_ref=>{:entity_type=>:entity_name, :global_created_at_elapsed=>:created_at}, :name=>"Ken", :blood_type=>nil}}'
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    args.state.max_stars           = 50
    -** Processing line: ~    args.state.max_enemies         = 10~
    +
    +** Processing line: ~    GTK::Entity.__reset_id__!~
     - Inside source: true
     *** True Line Result
    -    args.state.max_enemies         = 10
    -** Processing line: ~    args.state.player.x          ||= 640~
    +    GTK::Entity.__reset_id__!
    +** Processing line: ~    deserialized_state = args.gtk.deserialize_state serialized_state~
     - Inside source: true
     *** True Line Result
    -    args.state.player.x          ||= 640
    -** Processing line: ~    args.state.player.y          ||= 100~
    +    deserialized_state = args.gtk.deserialize_state serialized_state
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    args.state.player.y          ||= 100
    -** Processing line: ~    args.state.player.w          ||= 32~
    +
    +** Processing line: ~    assert.equal! args.state.player_one.name, deserialized_state.player_one.name~
     - Inside source: true
     *** True Line Result
    -    args.state.player.w          ||= 32
    -** Processing line: ~    args.state.player.h          ||= 32~
    +    assert.equal! args.state.player_one.name, deserialized_state.player_one.name
    +** Processing line: ~    assert.true! args.state.player_one.is_a? GTK::OpenEntity~
     - Inside source: true
     *** True Line Result
    -    args.state.player.h          ||= 32
    +    assert.true! args.state.player_one.is_a? GTK::OpenEntity
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    if args.state.tick_count == 0~
    +** Processing line: ~    assert.equal! args.state.player_two.name, deserialized_state.player_two.name~
     - Inside source: true
     *** True Line Result
    -    if args.state.tick_count == 0
    -** Processing line: ~      args.state.stars.clear~
    +    assert.equal! args.state.player_two.name, deserialized_state.player_two.name
    +** Processing line: ~    assert.equal! args.state.player_two.blood_type, deserialized_state.player_two.blood_type~
     - Inside source: true
     *** True Line Result
    -      args.state.stars.clear
    -** Processing line: ~      args.state.max_stars.times do~
    +    assert.equal! args.state.player_two.blood_type, deserialized_state.player_two.blood_type
    +** Processing line: ~    assert.equal! deserialized_state.player_two.blood_type, nil~
     - Inside source: true
     *** True Line Result
    -      args.state.max_stars.times do
    -** Processing line: ~        s = new_star args~
    +    assert.equal! deserialized_state.player_two.blood_type, nil
    +** Processing line: ~    assert.true! args.state.player_two.is_a? GTK::StrictEntity~
     - Inside source: true
     *** True Line Result
    -        s = new_star args
    -** Processing line: ~        s[:created_at] += s[:duration].randomize(:ratio)~
    +    assert.true! args.state.player_two.is_a? GTK::StrictEntity
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        s[:created_at] += s[:duration].randomize(:ratio)
    -** Processing line: ~        args.state.stars << s~
    +
    +** Processing line: ~    deserialized_state.player_two.blood_type = :O~
     - Inside source: true
     *** True Line Result
    -        args.state.stars << s
    -** Processing line: ~      end~
    +    deserialized_state.player_two.blood_type = :O
    +** Processing line: ~    assert.equal! deserialized_state.player_two.blood_type, :O~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +    assert.equal! deserialized_state.player_two.blood_type, :O
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    end
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    if args.state.tick_count == 0~
    +** Processing line: ~  def test_multiple_strict_entities args, assert~
     - Inside source: true
     *** True Line Result
    -    if args.state.tick_count == 0
    -** Processing line: ~      args.state.enemies.clear~
    +  def test_multiple_strict_entities args, assert
    +** Processing line: ~    GTK::Entity.__reset_id__!~
     - Inside source: true
     *** True Line Result
    -      args.state.enemies.clear
    -** Processing line: ~      args.state.max_enemies.times do~
    +    GTK::Entity.__reset_id__!
    +** Processing line: ~    args.state.player = args.state.new_entity_strict(:player_one, name: "Ryu")~
     - Inside source: true
     *** True Line Result
    -      args.state.max_enemies.times do
    -** Processing line: ~        s = new_enemy args~
    +    args.state.player = args.state.new_entity_strict(:player_one, name: "Ryu")
    +** Processing line: ~    args.state.enemy = args.state.new_entity_strict(:enemy, name: "Bison", other_property: 'extra mean')~
     - Inside source: true
     *** True Line Result
    -        s = new_enemy args
    -** Processing line: ~        s[:created_at] += s[:duration].randomize(:ratio)~
    +    args.state.enemy = args.state.new_entity_strict(:enemy, name: "Bison", other_property: 'extra mean')
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        s[:created_at] += s[:duration].randomize(:ratio)
    -** Processing line: ~        args.state.enemies << s~
    +
    +** Processing line: ~    serialized_state = args.gtk.serialize_state args.state~
     - Inside source: true
     *** True Line Result
    -        args.state.enemies << s
    -** Processing line: ~      end~
    +    serialized_state = args.gtk.serialize_state args.state
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +
    +** Processing line: ~    GTK::Entity.__reset_id__!~
     - Inside source: true
     *** True Line Result
    -    end
    +    GTK::Entity.__reset_id__!
    +** Processing line: ~    deserialized_state = args.gtk.deserialize_state serialized_state~
    +- Inside source: true
    +*** True Line Result
    +    deserialized_state = args.gtk.deserialize_state serialized_state
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    assert.equal! deserialized_state.player.name, "Ryu"~
    +- Inside source: true
    +*** True Line Result
    +    assert.equal! deserialized_state.player.name, "Ryu"
    +** Processing line: ~    assert.equal! deserialized_state.enemy.other_property, "extra mean"~
    +- Inside source: true
    +*** True Line Result
    +    assert.equal! deserialized_state.enemy.other_property, "extra mean"
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -52952,106 +61499,106 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def input args~
    +** Processing line: ~  def test_by_reference_state args, assert~
     - Inside source: true
     *** True Line Result
    -  def input args
    -** Processing line: ~    if args.inputs.keyboard.left~
    +  def test_by_reference_state args, assert
    +** Processing line: ~    GTK::Entity.__reset_id__!~
     - Inside source: true
     *** True Line Result
    -    if args.inputs.keyboard.left
    -** Processing line: ~      args.state.player.x -= 5~
    +    GTK::Entity.__reset_id__!
    +** Processing line: ~    args.state.a = { name: "Jane Doe" }~
     - Inside source: true
     *** True Line Result
    -      args.state.player.x -= 5
    -** Processing line: ~    elsif args.inputs.keyboard.right~
    +    args.state.a = { name: "Jane Doe" }
    +** Processing line: ~    args.state.b = args.state.a~
     - Inside source: true
     *** True Line Result
    -    elsif args.inputs.keyboard.right
    -** Processing line: ~      args.state.player.x += 5~
    +    args.state.b = args.state.a
    +** Processing line: ~    assert.equal! args.state.a.object_id, args.state.b.object_id~
     - Inside source: true
     *** True Line Result
    -      args.state.player.x += 5
    -** Processing line: ~    end~
    +    assert.equal! args.state.a.object_id, args.state.b.object_id
    +** Processing line: ~    serialized_state = args.gtk.serialize_state args.state~
     - Inside source: true
     *** True Line Result
    -    end
    +    serialized_state = args.gtk.serialize_state args.state
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    if args.inputs.keyboard.up~
    -- Inside source: true
    -*** True Line Result
    -    if args.inputs.keyboard.up
    -** Processing line: ~      args.state.player.y += 5~
    +** Processing line: ~    GTK::Entity.__reset_id__!~
     - Inside source: true
     *** True Line Result
    -      args.state.player.y += 5
    -** Processing line: ~    elsif args.inputs.keyboard.down~
    +    GTK::Entity.__reset_id__!
    +** Processing line: ~    deserialized_state = args.gtk.deserialize_state serialized_state~
     - Inside source: true
     *** True Line Result
    -    elsif args.inputs.keyboard.down
    -** Processing line: ~      args.state.player.y -= 5~
    +    deserialized_state = args.gtk.deserialize_state serialized_state
    +** Processing line: ~    assert.equal! deserialized_state.a.object_id, deserialized_state.b.object_id~
     - Inside source: true
     *** True Line Result
    -      args.state.player.y -= 5
    -** Processing line: ~    end~
    +    assert.equal! deserialized_state.a.object_id, deserialized_state.b.object_id
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    end
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    if args.inputs.keyboard.key_down.space~
    +** Processing line: ~  def test_by_reference_state_strict_entities args, assert~
     - Inside source: true
     *** True Line Result
    -    if args.inputs.keyboard.key_down.space
    -** Processing line: ~      args.state.player_bullets << new_player_bullet(args,~
    +  def test_by_reference_state_strict_entities args, assert
    +** Processing line: ~    GTK::Entity.__reset_id__!~
     - Inside source: true
     *** True Line Result
    -      args.state.player_bullets << new_player_bullet(args,
    -** Processing line: ~                                                     args.state.player.x + args.state.player.w.half,~
    +    GTK::Entity.__reset_id__!
    +** Processing line: ~    args.state.a = { name: "Jane Doe" }~
     - Inside source: true
     *** True Line Result
    -                                                     args.state.player.x + args.state.player.w.half,
    -** Processing line: ~                                                     args.state.player.y + args.state.player.h, 5)~
    +    args.state.a = { name: "Jane Doe" }
    +** Processing line: ~    args.state.strict_entity = args.state.new_entity_strict(:couple) do |e|~
     - Inside source: true
     *** True Line Result
    -                                                     args.state.player.y + args.state.player.h, 5)
    -** Processing line: ~    end~
    +    args.state.strict_entity = args.state.new_entity_strict(:couple) do |e|
    +** Processing line: ~      e.one = args.state.new_entity_strict(:person, name: "Jane")~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +      e.one = args.state.new_entity_strict(:person, name: "Jane")
    +** Processing line: ~      e.two = e.one~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    args.state.player.y = args.state.player.y.greater(0).lesser(720 - args.state.player.w)~
    +      e.two = e.one
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    args.state.player.y = args.state.player.y.greater(0).lesser(720 - args.state.player.w)
    -** Processing line: ~    args.state.player.x = args.state.player.x.greater(0).lesser(1280 - args.state.player.h)~
    +    end
    +** Processing line: ~    assert.equal! args.state.strict_entity.one, args.state.strict_entity.two~
     - Inside source: true
     *** True Line Result
    -    args.state.player.x = args.state.player.x.greater(0).lesser(1280 - args.state.player.h)
    -** Processing line: ~  end~
    +    assert.equal! args.state.strict_entity.one, args.state.strict_entity.two
    +** Processing line: ~    serialized_state = args.gtk.serialize_state args.state~
     - Inside source: true
     *** True Line Result
    -  end
    +    serialized_state = args.gtk.serialize_state args.state
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def completed? entity~
    +** Processing line: ~    GTK::Entity.__reset_id__!~
     - Inside source: true
     *** True Line Result
    -  def completed? entity
    -** Processing line: ~    (entity[:created_at] + entity[:duration]).elapsed_time > 0~
    +    GTK::Entity.__reset_id__!
    +** Processing line: ~    deserialized_state = args.gtk.deserialize_state serialized_state~
     - Inside source: true
     *** True Line Result
    -    (entity[:created_at] + entity[:duration]).elapsed_time > 0
    +    deserialized_state = args.gtk.deserialize_state serialized_state
    +** Processing line: ~    assert.equal! deserialized_state.strict_entity.one, deserialized_state.strict_entity.two~
    +- Inside source: true
    +*** True Line Result
    +    assert.equal! deserialized_state.strict_entity.one, deserialized_state.strict_entity.two
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -53060,102 +61607,122 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def calc_stars args~
    -- Inside source: true
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
     *** True Line Result
    -  def calc_stars args
    -** Processing line: ~    if (stars_to_add = args.state.max_stars - args.state.stars.length) > 0~
    -- Inside source: true
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
     *** True Line Result
    -    if (stars_to_add = args.state.max_stars - args.state.stars.length) > 0
    -** Processing line: ~      stars_to_add.times { args.state.stars << new_star(args) }~
    -- Inside source: true
    +
    +** Processing line: ~*** Advanced Debugging - Unit Tests - state_serialization_experimental_tests.rb~
    +- Header detected.
     *** True Line Result
    -      stars_to_add.times { args.state.stars << new_star(args) }
    -** Processing line: ~    end~
    -- Inside source: true
    +
     *** True Line Result
    -    end
    -** Processing line: ~    args.state.stars = args.state.stars.reject { |s| completed? s }~
    +*** Advanced Debugging - Unit Tests - state_serialization_experimental_tests.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/10_advanced_debugging/03_unit_tests/state_serialization_experimental_tests.rb~
     - Inside source: true
     *** True Line Result
    -    args.state.stars = args.state.stars.reject { |s| completed? s }
    -** Processing line: ~  end~
    +  # ./samples/10_advanced_debugging/03_unit_tests/state_serialization_experimental_tests.rb
    +** Processing line: ~  MAX_CODE_GEN_LENGTH = 50~
     - Inside source: true
     *** True Line Result
    -  end
    +  MAX_CODE_GEN_LENGTH = 50
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def move_enemies args~
    +** Processing line: ~  # NOTE: This is experimental/advanced stuff.~
     - Inside source: true
     *** True Line Result
    -  def move_enemies args
    -** Processing line: ~    if (enemies_to_add = args.state.max_enemies - args.state.enemies.length) > 0~
    +  # NOTE: This is experimental/advanced stuff.
    +** Processing line: ~  def needs_partitioning? target~
     - Inside source: true
     *** True Line Result
    -    if (enemies_to_add = args.state.max_enemies - args.state.enemies.length) > 0
    -** Processing line: ~      enemies_to_add.times { args.state.enemies << new_enemy(args) }~
    +  def needs_partitioning? target
    +** Processing line: ~    target[:value].to_s.length > MAX_CODE_GEN_LENGTH~
     - Inside source: true
     *** True Line Result
    -      enemies_to_add.times { args.state.enemies << new_enemy(args) }
    -** Processing line: ~    end~
    +    target[:value].to_s.length > MAX_CODE_GEN_LENGTH
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    end
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    args.state.enemies = args.state.enemies.reject { |s| completed? s }~
    +** Processing line: ~  def partition target~
     - Inside source: true
     *** True Line Result
    -    args.state.enemies = args.state.enemies.reject { |s| completed? s }
    -** Processing line: ~  end~
    +  def partition target
    +** Processing line: ~    return [] unless needs_partitioning? target~
     - Inside source: true
     *** True Line Result
    -  end
    +    return [] unless needs_partitioning? target
    +** Processing line: ~    if target[:value].is_a? GTK::OpenEntity~
    +- Inside source: true
    +*** True Line Result
    +    if target[:value].is_a? GTK::OpenEntity
    +** Processing line: ~      target[:value] = target[:value].hash~
    +- Inside source: true
    +*** True Line Result
    +      target[:value] = target[:value].hash
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def move_bullets args~
    +** Processing line: ~    results = []~
     - Inside source: true
     *** True Line Result
    -  def move_bullets args
    -** Processing line: ~    args.state.enemies.each do |e|~
    +    results = []
    +** Processing line: ~    idx = 0~
     - Inside source: true
     *** True Line Result
    -    args.state.enemies.each do |e|
    -** Processing line: ~      if args.state.tick_count.mod_zero?(e[:fire_rate])~
    +    idx = 0
    +** Processing line: ~    left, right = target[:value].partition do~
     - Inside source: true
     *** True Line Result
    -      if args.state.tick_count.mod_zero?(e[:fire_rate])
    -** Processing line: ~        args.state.bullets << new_bullet(args, e[:x] + e[:w].half, current_y(e), e[:distance_to_travel] / e[:duration])~
    +    left, right = target[:value].partition do
    +** Processing line: ~      idx += 1~
     - Inside source: true
     *** True Line Result
    -        args.state.bullets << new_bullet(args, e[:x] + e[:w].half, current_y(e), e[:distance_to_travel] / e[:duration])
    -** Processing line: ~      end~
    +      idx += 1
    +** Processing line: ~      idx.even?~
     - Inside source: true
     *** True Line Result
    -      end
    +      idx.even?
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
         end
    -** Processing line: ~~
    +** Processing line: ~    left, right = Hash[left], Hash[right]~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    args.state.bullets = args.state.bullets.reject { |s| completed? s }~
    +    left, right = Hash[left], Hash[right]
    +** Processing line: ~    left = { value: left }~
     - Inside source: true
     *** True Line Result
    -    args.state.bullets = args.state.bullets.reject { |s| completed? s }
    -** Processing line: ~    args.state.player_bullets = args.state.player_bullets.reject { |s| completed? s }~
    +    left = { value: left }
    +** Processing line: ~    right = { value: right}~
     - Inside source: true
     *** True Line Result
    -    args.state.player_bullets = args.state.player_bullets.reject { |s| completed? s }
    +    right = { value: right}
    +** Processing line: ~    [left, right]~
    +- Inside source: true
    +*** True Line Result
    +    [left, right]
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -53164,70 +61731,70 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def intersect? entity_one, entity_two~
    +** Processing line: ~  def add_partition target, path, aggregate, final_result~
     - Inside source: true
     *** True Line Result
    -  def intersect? entity_one, entity_two
    -** Processing line: ~    entity_one.merge(y: current_y(entity_one))~
    +  def add_partition target, path, aggregate, final_result
    +** Processing line: ~    partitions = partition target~
     - Inside source: true
     *** True Line Result
    -    entity_one.merge(y: current_y(entity_one))
    -** Processing line: ~              .intersect_rect? entity_two.merge(y: current_y(entity_two))~
    +    partitions = partition target
    +** Processing line: ~    partitions.each do |part|~
     - Inside source: true
     *** True Line Result
    -              .intersect_rect? entity_two.merge(y: current_y(entity_two))
    -** Processing line: ~  end~
    +    partitions.each do |part|
    +** Processing line: ~      if needs_partitioning? part~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +      if needs_partitioning? part
    +** Processing line: ~        if part[:value].keys.length == 1~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def kill args~
    +        if part[:value].keys.length == 1
    +** Processing line: ~          first_key = part[:value].keys[0]~
     - Inside source: true
     *** True Line Result
    -  def kill args
    -** Processing line: ~    bullets_hitting_enemies = []~
    +          first_key = part[:value].keys[0]
    +** Processing line: ~          new_part = { value: part[:value][first_key] }~
     - Inside source: true
     *** True Line Result
    -    bullets_hitting_enemies = []
    -** Processing line: ~    dead_bullets = []~
    +          new_part = { value: part[:value][first_key] }
    +** Processing line: ~          path.push first_key~
     - Inside source: true
     *** True Line Result
    -    dead_bullets = []
    -** Processing line: ~    dead_enemies = []~
    +          path.push first_key
    +** Processing line: ~          add_partition new_part, path, aggregate, final_result~
     - Inside source: true
     *** True Line Result
    -    dead_enemies = []
    -** Processing line: ~~
    +          add_partition new_part, path, aggregate, final_result
    +** Processing line: ~          path.pop~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    args.state.player_bullets.each do |b|~
    +          path.pop
    +** Processing line: ~        else~
     - Inside source: true
     *** True Line Result
    -    args.state.player_bullets.each do |b|
    -** Processing line: ~      args.state.enemies.each do |e|~
    +        else
    +** Processing line: ~          add_partition part, path, aggregate, final_result~
     - Inside source: true
     *** True Line Result
    -      args.state.enemies.each do |e|
    -** Processing line: ~        if intersect? b, e~
    +          add_partition part, path, aggregate, final_result
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -        if intersect? b, e
    -** Processing line: ~          dead_bullets << b~
    +        end
    +** Processing line: ~      else~
     - Inside source: true
     *** True Line Result
    -          dead_bullets << b
    -** Processing line: ~          dead_enemies << e~
    +      else
    +** Processing line: ~        final_result << { value: { __path__: [*path] } }~
     - Inside source: true
     *** True Line Result
    -          dead_enemies << e
    -** Processing line: ~        end~
    +        final_result << { value: { __path__: [*path] } }
    +** Processing line: ~        final_result << { value: part[:value] }~
     - Inside source: true
     *** True Line Result
    -        end
    +        final_result << { value: part[:value] }
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    @@ -53236,66 +61803,54 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
         end
    -** Processing line: ~~
    -- Inside source: true
    -*** True Line Result
    -
    -** Processing line: ~    args.state.score += dead_enemies.length~
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    args.state.score += dead_enemies.length
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    args.state.player_bullets.reject! { |b| dead_bullets.include? b }~
    -- Inside source: true
    -*** True Line Result
    -    args.state.player_bullets.reject! { |b| dead_bullets.include? b }
    -** Processing line: ~    args.state.enemies.reject! { |e| dead_enemies.include? e }~
    -- Inside source: true
    -*** True Line Result
    -    args.state.enemies.reject! { |e| dead_enemies.include? e }
    -** Processing line: ~~
    +** Processing line: ~  def state_to_string state~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    dead = args.state.bullets.any? do |b|~
    +  def state_to_string state
    +** Processing line: ~    parts_queue = []~
     - Inside source: true
     *** True Line Result
    -    dead = args.state.bullets.any? do |b|
    -** Processing line: ~      [args.state.player.x,~
    +    parts_queue = []
    +** Processing line: ~    final_queue = []~
     - Inside source: true
     *** True Line Result
    -      [args.state.player.x,
    -** Processing line: ~       args.state.player.y,~
    +    final_queue = []
    +** Processing line: ~    add_partition({ value: state.hash },~
     - Inside source: true
     *** True Line Result
    -       args.state.player.y,
    -** Processing line: ~       args.state.player.w,~
    +    add_partition({ value: state.hash },
    +** Processing line: ~                  [],~
     - Inside source: true
     *** True Line Result
    -       args.state.player.w,
    -** Processing line: ~       args.state.player.h].intersect_rect? b.merge(y: current_y(b))~
    +                  [],
    +** Processing line: ~                  parts_queue,~
     - Inside source: true
     *** True Line Result
    -       args.state.player.h].intersect_rect? b.merge(y: current_y(b))
    -** Processing line: ~    end~
    +                  parts_queue,
    +** Processing line: ~                  final_queue)~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~    return unless dead~
    +                  final_queue)
    +** Processing line: ~    final_queue.reject {|i| i[:value].keys.length == 0}.map do |i|~
     - Inside source: true
     *** True Line Result
    -    return unless dead
    -** Processing line: ~    args.gtk.reset~
    +    final_queue.reject {|i| i[:value].keys.length == 0}.map do |i|
    +** Processing line: ~      i[:value].to_s~
     - Inside source: true
     *** True Line Result
    -    args.gtk.reset
    -** Processing line: ~    defaults args~
    +      i[:value].to_s
    +** Processing line: ~    end.join("\n#==================================================#\n")~
     - Inside source: true
     *** True Line Result
    -    defaults args
    +    end.join("\n#==================================================#\n")
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -53304,42 +61859,38 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def calc args~
    +** Processing line: ~  def state_from_string string~
     - Inside source: true
     *** True Line Result
    -  def calc args
    -** Processing line: ~    calc_stars args~
    +  def state_from_string string
    +** Processing line: ~    Kernel.eval("$load_data = {}")~
     - Inside source: true
     *** True Line Result
    -    calc_stars args
    -** Processing line: ~    move_enemies args~
    +    Kernel.eval("$load_data = {}")
    +** Processing line: ~    lines = string.split("\n#==================================================#\n")~
     - Inside source: true
     *** True Line Result
    -    move_enemies args
    -** Processing line: ~    move_bullets args~
    +    lines = string.split("\n#==================================================#\n")
    +** Processing line: ~    lines.each do |l|~
     - Inside source: true
     *** True Line Result
    -    move_bullets args
    -** Processing line: ~    kill args~
    +    lines.each do |l|
    +** Processing line: ~      puts "todo: #{l}"~
     - Inside source: true
     *** True Line Result
    -    kill args
    -** Processing line: ~  end~
    +      puts "todo: #{l}"
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  end
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def current_y entity~
    -- Inside source: true
    -*** True Line Result
    -  def current_y entity
    -** Processing line: ~    entity[:starting_y] + (entity[:distance_to_travel] * entity[:created_at].ease(entity[:duration], :identity))~
    +** Processing line: ~    GTK::OpenEntity.parse_from_hash $load_data~
     - Inside source: true
     *** True Line Result
    -    entity[:starting_y] + (entity[:distance_to_travel] * entity[:created_at].ease(entity[:duration], :identity))
    +    GTK::OpenEntity.parse_from_hash $load_data
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -53348,50 +61899,50 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def render args~
    +** Processing line: ~  def test_save_and_load args, assert~
     - Inside source: true
     *** True Line Result
    -  def render args
    -** Processing line: ~    args.outputs.solids << args.state.stars.map do |s|~
    +  def test_save_and_load args, assert
    +** Processing line: ~    args.state.item_1.name = "Jane"~
     - Inside source: true
     *** True Line Result
    -    args.outputs.solids << args.state.stars.map do |s|
    -** Processing line: ~      [s[:x],~
    +    args.state.item_1.name = "Jane"
    +** Processing line: ~    string = state_to_string args.state~
     - Inside source: true
     *** True Line Result
    -      [s[:x],
    -** Processing line: ~       current_y(s),~
    +    string = state_to_string args.state
    +** Processing line: ~    state = state_from_string string~
     - Inside source: true
     *** True Line Result
    -       current_y(s),
    -** Processing line: ~       s[:w], s[:h], 0, s[:g], s[:b], s[:max_alpha] * s[:created_at].ease(20, :identity)]~
    +    state = state_from_string string
    +** Processing line: ~    assert.equal! args.state.item_1.name, state.item_1.name~
     - Inside source: true
     *** True Line Result
    -       s[:w], s[:h], 0, s[:g], s[:b], s[:max_alpha] * s[:created_at].ease(20, :identity)]
    -** Processing line: ~    end~
    +    assert.equal! args.state.item_1.name, state.item_1.name
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    end
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    args.outputs.borders << args.state.enemies.map do |s|~
    +** Processing line: ~  def test_save_and_load_big args, assert~
     - Inside source: true
     *** True Line Result
    -    args.outputs.borders << args.state.enemies.map do |s|
    -** Processing line: ~      [s[:x],~
    +  def test_save_and_load_big args, assert
    +** Processing line: ~    size = 1000~
     - Inside source: true
     *** True Line Result
    -      [s[:x],
    -** Processing line: ~       current_y(s),~
    +    size = 1000
    +** Processing line: ~    size.map_with_index do |i|~
     - Inside source: true
     *** True Line Result
    -       current_y(s),
    -** Processing line: ~       s[:w], s[:h], 255, 0, 0]~
    +    size.map_with_index do |i|
    +** Processing line: ~      args.state.send("k#{i}=".to_sym, i)~
     - Inside source: true
     *** True Line Result
    -       s[:w], s[:h], 255, 0, 0]
    +      args.state.send("k#{i}=".to_sym, i)
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -53400,102 +61951,110 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    args.outputs.borders << args.state.bullets.map do |b|~
    +** Processing line: ~    string = state_to_string args.state~
     - Inside source: true
     *** True Line Result
    -    args.outputs.borders << args.state.bullets.map do |b|
    -** Processing line: ~      [b[:x],~
    +    string = state_to_string args.state
    +** Processing line: ~    state = state_from_string string~
     - Inside source: true
     *** True Line Result
    -      [b[:x],
    -** Processing line: ~       current_y(b),~
    +    state = state_from_string string
    +** Processing line: ~    size.map_with_index do |i|~
     - Inside source: true
     *** True Line Result
    -       current_y(b),
    -** Processing line: ~       b[:w], b[:h], 255, 0, 0]~
    +    size.map_with_index do |i|
    +** Processing line: ~      assert.equal! args.state.send("k#{i}".to_sym), state.send("k#{i}".to_sym)~
     - Inside source: true
     *** True Line Result
    -       b[:w], b[:h], 255, 0, 0]
    +      assert.equal! args.state.send("k#{i}".to_sym), state.send("k#{i}".to_sym)
    +** Processing line: ~      assert.equal! args.state.send("k#{i}".to_sym), i~
    +- Inside source: true
    +*** True Line Result
    +      assert.equal! args.state.send("k#{i}".to_sym), i
    +** Processing line: ~      assert.equal! state.send("k#{i}".to_sym), i~
    +- Inside source: true
    +*** True Line Result
    +      assert.equal! state.send("k#{i}".to_sym), i
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
         end
    -** Processing line: ~~
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    args.outputs.borders << args.state.player_bullets.map do |b|~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    args.outputs.borders << args.state.player_bullets.map do |b|
    -** Processing line: ~      [b[:x],~
    +
    +** Processing line: ~  def test_save_and_load_big_nested args, assert~
     - Inside source: true
     *** True Line Result
    -      [b[:x],
    -** Processing line: ~       current_y(b),~
    +  def test_save_and_load_big_nested args, assert
    +** Processing line: ~    args.state.player_one.friend.nested_hash.k0 = 0~
     - Inside source: true
     *** True Line Result
    -       current_y(b),
    -** Processing line: ~       b[:w], b[:h], 255, 255, 255]~
    +    args.state.player_one.friend.nested_hash.k0 = 0
    +** Processing line: ~    args.state.player_one.friend.nested_hash.k1 = 1~
     - Inside source: true
     *** True Line Result
    -       b[:w], b[:h], 255, 255, 255]
    -** Processing line: ~    end~
    +    args.state.player_one.friend.nested_hash.k1 = 1
    +** Processing line: ~    args.state.player_one.friend.nested_hash.k2 = 2~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +    args.state.player_one.friend.nested_hash.k2 = 2
    +** Processing line: ~    args.state.player_one.friend.nested_hash.k3 = 3~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    args.borders << [args.state.player.x,~
    +    args.state.player_one.friend.nested_hash.k3 = 3
    +** Processing line: ~    args.state.player_one.friend.nested_hash.k4 = 4~
     - Inside source: true
     *** True Line Result
    -    args.borders << [args.state.player.x,
    -** Processing line: ~                     args.state.player.y,~
    +    args.state.player_one.friend.nested_hash.k4 = 4
    +** Processing line: ~    args.state.player_one.friend.nested_hash.k5 = 5~
     - Inside source: true
     *** True Line Result
    -                     args.state.player.y,
    -** Processing line: ~                     args.state.player.w,~
    +    args.state.player_one.friend.nested_hash.k5 = 5
    +** Processing line: ~    args.state.player_one.friend.nested_hash.k6 = 6~
     - Inside source: true
     *** True Line Result
    -                     args.state.player.w,
    -** Processing line: ~                     args.state.player.h, 255, 255, 255]~
    +    args.state.player_one.friend.nested_hash.k6 = 6
    +** Processing line: ~    args.state.player_one.friend.nested_hash.k7 = 7~
     - Inside source: true
     *** True Line Result
    -                     args.state.player.h, 255, 255, 255]
    -** Processing line: ~  end~
    +    args.state.player_one.friend.nested_hash.k7 = 7
    +** Processing line: ~    args.state.player_one.friend.nested_hash.k8 = 8~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +    args.state.player_one.friend.nested_hash.k8 = 8
    +** Processing line: ~    args.state.player_one.friend.nested_hash.k9 = 9~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def tick args~
    +    args.state.player_one.friend.nested_hash.k9 = 9
    +** Processing line: ~    string = state_to_string args.state~
     - Inside source: true
     *** True Line Result
    -  def tick args
    -** Processing line: ~    defaults args~
    +    string = state_to_string args.state
    +** Processing line: ~    state = state_from_string string~
     - Inside source: true
     *** True Line Result
    -    defaults args
    -** Processing line: ~    input args~
    +    state = state_from_string string
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    input args
    -** Processing line: ~    calc args~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    calc args
    -** Processing line: ~    render args~
    +
    +** Processing line: ~  $gtk.reset 100~
     - Inside source: true
     *** True Line Result
    -    render args
    -** Processing line: ~  end~
    +  $gtk.reset 100
    +** Processing line: ~  $gtk.log_level = :off~
     - Inside source: true
     *** True Line Result
    -  end
    +  $gtk.log_level = :off
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
    @@ -53508,82 +62067,74 @@ Follows is a source code listing for all files that have been open sourced. This
     - End of paragraph detected.
     *** True Line Result
     
    -** Processing line: ~*** Performance - Sprites As Hash - main.rb~
    +** Processing line: ~*** Advanced Debugging - Unit Tests - suggest_autocompletion_tests.rb~
     - Header detected.
     *** True Line Result
     
     *** True Line Result
    -*** Performance - Sprites As Hash - main.rb
    +*** Advanced Debugging - Unit Tests - suggest_autocompletion_tests.rb
     ** Processing line: ~#+begin_src ruby~
     - Line was identified as the beginning of a code block.
     *** True Line Result
     
     *** True Line Result
     #+begin_src ruby
    -** Processing line: ~  # ./samples/09_performance/01_sprites_as_hash/app/main.rb~
    -- Inside source: true
    -*** True Line Result
    -  # ./samples/09_performance/01_sprites_as_hash/app/main.rb
    -** Processing line: ~~
    -- Inside source: true
    -*** True Line Result
    -
    -** Processing line: ~  # Sprites represented as Hashes using the queue ~args.outputs.sprites~~
    +** Processing line: ~  # ./samples/10_advanced_debugging/03_unit_tests/suggest_autocompletion_tests.rb~
     - Inside source: true
     *** True Line Result
    -  # Sprites represented as Hashes using the queue ~args.outputs.sprites~
    -** Processing line: ~  # code up, but are the "slowest" to render.~
    +  # ./samples/10_advanced_debugging/03_unit_tests/suggest_autocompletion_tests.rb
    +** Processing line: ~  def default_suggest_autocompletion args~
     - Inside source: true
     *** True Line Result
    -  # code up, but are the "slowest" to render.
    -** Processing line: ~  # The reason for this is the access of the key in the Hash and also~
    +  def default_suggest_autocompletion args
    +** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
    -  # The reason for this is the access of the key in the Hash and also
    -** Processing line: ~  # because the data args.outputs.sprites is cleared every tick.~
    +    {
    +** Processing line: ~      index: 4,~
     - Inside source: true
     *** True Line Result
    -  # because the data args.outputs.sprites is cleared every tick.
    -** Processing line: ~  def random_x args~
    +      index: 4,
    +** Processing line: ~      text: "args.",~
     - Inside source: true
     *** True Line Result
    -  def random_x args
    -** Processing line: ~    (args.grid.w.randomize :ratio) * -1~
    +      text: "args.",
    +** Processing line: ~      __meta__: {~
     - Inside source: true
     *** True Line Result
    -    (args.grid.w.randomize :ratio) * -1
    -** Processing line: ~  end~
    +      __meta__: {
    +** Processing line: ~        other_options: [~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +        other_options: [
    +** Processing line: ~          {~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def random_y args~
    +          {
    +** Processing line: ~            index: Fixnum,~
     - Inside source: true
     *** True Line Result
    -  def random_y args
    -** Processing line: ~    (args.grid.h.randomize :ratio) * -1~
    +            index: Fixnum,
    +** Processing line: ~            file: "app/main.rb"~
     - Inside source: true
     *** True Line Result
    -    (args.grid.h.randomize :ratio) * -1
    -** Processing line: ~  end~
    +            file: "app/main.rb"
    +** Processing line: ~          }~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +          }
    +** Processing line: ~        ]~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def random_speed~
    +        ]
    +** Processing line: ~      }~
     - Inside source: true
     *** True Line Result
    -  def random_speed
    -** Processing line: ~    1 + (4.randomize :ratio)~
    +      }
    +** Processing line: ~    }~
     - Inside source: true
     *** True Line Result
    -    1 + (4.randomize :ratio)
    +    }
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -53592,34 +62143,26 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def new_star args~
    -- Inside source: true
    -*** True Line Result
    -  def new_star args
    -** Processing line: ~    {~
    -- Inside source: true
    -*** True Line Result
    -    {
    -** Processing line: ~      x: (random_x args),~
    +** Processing line: ~  def assert_completion source, *expected~
     - Inside source: true
     *** True Line Result
    -      x: (random_x args),
    -** Processing line: ~      y: (random_y args),~
    +  def assert_completion source, *expected
    +** Processing line: ~    results = suggest_autocompletion text:  (source.strip.gsub  ":cursor", ""),~
     - Inside source: true
     *** True Line Result
    -      y: (random_y args),
    -** Processing line: ~      w: 4, h: 4, path: 'sprites/tiny-star.png',~
    +    results = suggest_autocompletion text:  (source.strip.gsub  ":cursor", ""),
    +** Processing line: ~                                     index: (source.strip.index ":cursor")~
     - Inside source: true
     *** True Line Result
    -      w: 4, h: 4, path: 'sprites/tiny-star.png',
    -** Processing line: ~      s: random_speed~
    +                                     index: (source.strip.index ":cursor")
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      s: random_speed
    -** Processing line: ~    }~
    +
    +** Processing line: ~    puts results~
     - Inside source: true
     *** True Line Result
    -    }
    +    puts results
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -53628,42 +62171,18 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def move_star args, star~
    -- Inside source: true
    -*** True Line Result
    -  def move_star args, star
    -** Processing line: ~    star.x += star[:s]~
    -- Inside source: true
    -*** True Line Result
    -    star.x += star[:s]
    -** Processing line: ~    star.y += star[:s]~
    -- Inside source: true
    -*** True Line Result
    -    star.y += star[:s]
    -** Processing line: ~    if star.x > args.grid.w || star.y > args.grid.h~
    -- Inside source: true
    -*** True Line Result
    -    if star.x > args.grid.w || star.y > args.grid.h
    -** Processing line: ~      star.x = (random_x args)~
    -- Inside source: true
    -*** True Line Result
    -      star.x = (random_x args)
    -** Processing line: ~      star.y = (random_y args)~
    -- Inside source: true
    -*** True Line Result
    -      star.y = (random_y args)
    -** Processing line: ~      star[:s] = random_speed~
    +** Processing line: ~  def test_args_completion args, assert~
     - Inside source: true
     *** True Line Result
    -      star[:s] = random_speed
    -** Processing line: ~    end~
    +  def test_args_completion args, assert
    +** Processing line: ~    $gtk.write_file_root "autocomplete.txt", ($gtk.suggest_autocompletion text: <<-S, index: 128).join("\n")~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~  end~
    +    $gtk.write_file_root "autocomplete.txt", ($gtk.suggest_autocompletion text: <<-S, index: 128).join("\n")
    +** Processing line: ~  require 'app/game.rb'~
     - Inside source: true
     *** True Line Result
    -  end
    +  require 'app/game.rb'
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
    @@ -53672,274 +62191,282 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
       def tick args
    -** Processing line: ~    args.state.star_count ||= 0~
    +** Processing line: ~    args.gtk.suppress_mailbox = false~
     - Inside source: true
     *** True Line Result
    -    args.state.star_count ||= 0
    -** Processing line: ~~
    +    args.gtk.suppress_mailbox = false
    +** Processing line: ~    $game ||= Game.new~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # sets console command when sample app initially opens~
    +    $game ||= Game.new
    +** Processing line: ~    $game.args = args~
     - Inside source: true
     *** True Line Result
    -    # sets console command when sample app initially opens
    -** Processing line: ~    if Kernel.global_tick_count == 0~
    +    $game.args = args
    +** Processing line: ~    $game.args.~
     - Inside source: true
     *** True Line Result
    -    if Kernel.global_tick_count == 0
    -** Processing line: ~      puts "* INFO - Please specify the number of sprites to render."~
    +    $game.args.
    +** Processing line: ~    $game.tick~
     - Inside source: true
     *** True Line Result
    -      puts "* INFO - Please specify the number of sprites to render."
    -** Processing line: ~      args.gtk.console.set_command "reset_with count: 100"~
    +    $game.tick
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -      args.gtk.console.set_command "reset_with count: 100"
    -** Processing line: ~    end~
    +  end
    +** Processing line: ~  S~
     - Inside source: true
     *** True Line Result
    -    end
    +  S
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # init~
    +** Processing line: ~    puts "contents:"~
     - Inside source: true
     *** True Line Result
    -    # init
    -** Processing line: ~    if args.state.tick_count == 0~
    +    puts "contents:"
    +** Processing line: ~    puts ($gtk.read_file "autocomplete.txt")~
     - Inside source: true
     *** True Line Result
    -    if args.state.tick_count == 0
    -** Processing line: ~      args.state.stars = args.state.star_count.map { |i| new_star args }~
    +    puts ($gtk.read_file "autocomplete.txt")
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -      args.state.stars = args.state.star_count.map { |i| new_star args }
    -** Processing line: ~    end~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    end
    +
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
    +*** True Line Result
    +#+end_src
     ** Processing line: ~~
    -- Inside source: true
    +- End of paragraph detected.
     *** True Line Result
     
    -** Processing line: ~    # update~
    -- Inside source: true
    +** Processing line: ~*** Http - Retrieve Images - main.rb~
    +- Header detected.
     *** True Line Result
    -    # update
    -** Processing line: ~    args.state.stars.each { |s| move_star args, s }~
    -- Inside source: true
    +
     *** True Line Result
    -    args.state.stars.each { |s| move_star args, s }
    -** Processing line: ~~
    -- Inside source: true
    +*** Http - Retrieve Images - main.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
     *** True Line Result
     
    -** Processing line: ~    # render~
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/11_http/01_retrieve_images/app/main.rb~
     - Inside source: true
     *** True Line Result
    -    # render
    -** Processing line: ~    args.outputs.sprites << args.state.stars~
    +  # ./samples/11_http/01_retrieve_images/app/main.rb
    +** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
    -    args.outputs.sprites << args.state.stars
    +  def tick args
     ** Processing line: ~    args.outputs.background_color = [0, 0, 0]~
     - Inside source: true
     *** True Line Result
         args.outputs.background_color = [0, 0, 0]
    -** Processing line: ~    args.outputs.primitives << args.gtk.current_framerate_primitives~
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    args.outputs.primitives << args.gtk.current_framerate_primitives
    -** Processing line: ~  end~
    +
    +** Processing line: ~    # Show a warning at the start.~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +    # Show a warning at the start.
    +** Processing line: ~    args.state.warning_debounce ||= 11 * 60~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  # resets game, and assigns star count given by user~
    +    args.state.warning_debounce ||= 11 * 60
    +** Processing line: ~    if args.state.warning_debounce > 0~
     - Inside source: true
     *** True Line Result
    -  # resets game, and assigns star count given by user
    -** Processing line: ~  def reset_with count: count~
    +    if args.state.warning_debounce > 0
    +** Processing line: ~      args.state.warning_debounce -= 1~
     - Inside source: true
     *** True Line Result
    -  def reset_with count: count
    -** Processing line: ~    $gtk.reset~
    +      args.state.warning_debounce -= 1
    +** Processing line: ~      args.outputs.labels << [640, 600, "This app shows random images from the Internet.", 10, 1, 255, 255, 255]~
    +- Inside source: true
    +*** True Line Result
    +      args.outputs.labels << [640, 600, "This app shows random images from the Internet.", 10, 1, 255, 255, 255]
    +** Processing line: ~      args.outputs.labels << [640, 500, "Quit in the next few seconds if this is a problem.", 10, 1, 255, 255, 255]~
     - Inside source: true
     *** True Line Result
    -    $gtk.reset
    -** Processing line: ~    $gtk.args.state.star_count = count~
    +      args.outputs.labels << [640, 500, "Quit in the next few seconds if this is a problem.", 10, 1, 255, 255, 255]
    +** Processing line: ~      args.outputs.labels << [640, 350, "#{(args.state.warning_debounce / 60.0).to_i}", 10, 1, 255, 255, 255]~
     - Inside source: true
     *** True Line Result
    -    $gtk.args.state.star_count = count
    -** Processing line: ~  end~
    +      args.outputs.labels << [640, 350, "#{(args.state.warning_debounce / 60.0).to_i}", 10, 1, 255, 255, 255]
    +** Processing line: ~      return~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +      return
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~#+end_src~
    -- Line was identified as the end of a code block.
    -*** True Line Result
    -#+end_src
    +    end
     ** Processing line: ~~
    -- End of paragraph detected.
    +- Inside source: true
     *** True Line Result
     
    -** Processing line: ~*** Performance - Sprites As Entities - main.rb~
    -- Header detected.
    +** Processing line: ~    args.state.download_debounce ||= 0   # start immediately, reset to non zero later.~
    +- Inside source: true
     *** True Line Result
    -
    +    args.state.download_debounce ||= 0   # start immediately, reset to non zero later.
    +** Processing line: ~    args.state.photos ||= []~
    +- Inside source: true
     *** True Line Result
    -*** Performance - Sprites As Entities - main.rb
    -** Processing line: ~#+begin_src ruby~
    -- Line was identified as the beginning of a code block.
    +    args.state.photos ||= []
    +** Processing line: ~~
    +- Inside source: true
     *** True Line Result
     
    -*** True Line Result
    -#+begin_src ruby
    -** Processing line: ~  # ./samples/09_performance/02_sprites_as_entities/app/main.rb~
    +** Processing line: ~    # Put a little pause between each download.~
     - Inside source: true
     *** True Line Result
    -  # ./samples/09_performance/02_sprites_as_entities/app/main.rb
    -** Processing line: ~  # Sprites represented as Entities using the queue ~args.outputs.sprites~~
    +    # Put a little pause between each download.
    +** Processing line: ~    if args.state.download.nil?~
     - Inside source: true
     *** True Line Result
    -  # Sprites represented as Entities using the queue ~args.outputs.sprites~
    -** Processing line: ~  # yields nicer access apis over Hashes, but require a bit more code upfront.~
    +    if args.state.download.nil?
    +** Processing line: ~      if args.state.download_debounce > 0~
     - Inside source: true
     *** True Line Result
    -  # yields nicer access apis over Hashes, but require a bit more code upfront.
    -** Processing line: ~  # The hash sample has to use star[:s] to get the speed of the star, but~
    +      if args.state.download_debounce > 0
    +** Processing line: ~        args.state.download_debounce -= 1~
     - Inside source: true
     *** True Line Result
    -  # The hash sample has to use star[:s] to get the speed of the star, but
    -** Processing line: ~  # an entity can use .s instead.~
    +        args.state.download_debounce -= 1
    +** Processing line: ~      else~
     - Inside source: true
     *** True Line Result
    -  # an entity can use .s instead.
    -** Processing line: ~  def random_x args~
    +      else
    +** Processing line: ~        args.state.download = $gtk.http_get 'https://picsum.photos/200/300.jpg'~
     - Inside source: true
     *** True Line Result
    -  def random_x args
    -** Processing line: ~    (args.grid.w.randomize :ratio) * -1~
    +        args.state.download = $gtk.http_get 'https://picsum.photos/200/300.jpg'
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    (args.grid.w.randomize :ratio) * -1
    -** Processing line: ~  end~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  end
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def random_y args~
    +** Processing line: ~    if !args.state.download.nil?~
     - Inside source: true
     *** True Line Result
    -  def random_y args
    -** Processing line: ~    (args.grid.h.randomize :ratio) * -1~
    +    if !args.state.download.nil?
    +** Processing line: ~      if args.state.download[:complete]~
     - Inside source: true
     *** True Line Result
    -    (args.grid.h.randomize :ratio) * -1
    -** Processing line: ~  end~
    +      if args.state.download[:complete]
    +** Processing line: ~        if args.state.download[:http_response_code] == 200~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +        if args.state.download[:http_response_code] == 200
    +** Processing line: ~          fname = "sprites/#{args.state.photos.length}.jpg"~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def random_speed~
    +          fname = "sprites/#{args.state.photos.length}.jpg"
    +** Processing line: ~          $gtk.write_file fname, args.state.download[:response_data]~
     - Inside source: true
     *** True Line Result
    -  def random_speed
    -** Processing line: ~    1 + (4.randomize :ratio)~
    +          $gtk.write_file fname, args.state.download[:response_data]
    +** Processing line: ~          args.state.photos << [ 100 + rand(1080), 500 - rand(480), fname, rand(80) - 40 ]~
     - Inside source: true
     *** True Line Result
    -    1 + (4.randomize :ratio)
    -** Processing line: ~  end~
    +          args.state.photos << [ 100 + rand(1080), 500 - rand(480), fname, rand(80) - 40 ]
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +        end
    +** Processing line: ~        args.state.download = nil~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def new_star args~
    +        args.state.download = nil
    +** Processing line: ~        args.state.download_debounce = (rand(3) + 2) * 60~
     - Inside source: true
     *** True Line Result
    -  def new_star args
    -** Processing line: ~    args.state.new_entity :star, {~
    +        args.state.download_debounce = (rand(3) + 2) * 60
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    args.state.new_entity :star, {
    -** Processing line: ~      x: (random_x args),~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      x: (random_x args),
    -** Processing line: ~      y: (random_y args),~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      y: (random_y args),
    -** Processing line: ~      w: 4, h: 4,~
    +
    +** Processing line: ~    # draw any downloaded photos...~
     - Inside source: true
     *** True Line Result
    -      w: 4, h: 4,
    -** Processing line: ~      path: 'sprites/tiny-star.png',~
    +    # draw any downloaded photos...
    +** Processing line: ~    args.state.photos.each { |i|~
     - Inside source: true
     *** True Line Result
    -      path: 'sprites/tiny-star.png',
    -** Processing line: ~      s: random_speed~
    +    args.state.photos.each { |i|
    +** Processing line: ~      args.outputs.primitives << [i[0], i[1], 200, 300, i[2], i[3]].sprite~
     - Inside source: true
     *** True Line Result
    -      s: random_speed
    +      args.outputs.primitives << [i[0], i[1], 200, 300, i[2], i[3]].sprite
     ** Processing line: ~    }~
     - Inside source: true
     *** True Line Result
         }
    -** Processing line: ~  end~
    -- Inside source: true
    -*** True Line Result
    -  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def move_star args, star~
    +** Processing line: ~    # Draw a download progress bar...~
     - Inside source: true
     *** True Line Result
    -  def move_star args, star
    -** Processing line: ~    star.x += star.s~
    +    # Draw a download progress bar...
    +** Processing line: ~    args.outputs.primitives << [0, 0, 1280, 30, 0, 0, 0, 255].solid~
     - Inside source: true
     *** True Line Result
    -    star.x += star.s
    -** Processing line: ~    star.y += star.s~
    +    args.outputs.primitives << [0, 0, 1280, 30, 0, 0, 0, 255].solid
    +** Processing line: ~    if !args.state.download.nil?~
     - Inside source: true
     *** True Line Result
    -    star.y += star.s
    -** Processing line: ~    if star.x > args.grid.w || star.y > args.grid.h~
    +    if !args.state.download.nil?
    +** Processing line: ~      br = args.state.download[:response_read]~
     - Inside source: true
     *** True Line Result
    -    if star.x > args.grid.w || star.y > args.grid.h
    -** Processing line: ~      star.x = (random_x args)~
    +      br = args.state.download[:response_read]
    +** Processing line: ~      total = args.state.download[:response_total]~
     - Inside source: true
     *** True Line Result
    -      star.x = (random_x args)
    -** Processing line: ~      star.y = (random_y args)~
    +      total = args.state.download[:response_total]
    +** Processing line: ~      if total != 0~
     - Inside source: true
     *** True Line Result
    -      star.y = (random_y args)
    -** Processing line: ~      star.s = random_speed~
    +      if total != 0
    +** Processing line: ~        pct = br.to_f / total.to_f~
     - Inside source: true
     *** True Line Result
    -      star.s = random_speed
    +        pct = br.to_f / total.to_f
    +** Processing line: ~        args.outputs.primitives << [0, 0, 1280 * pct, 30, 0, 0, 255, 255].solid~
    +- Inside source: true
    +*** True Line Result
    +        args.outputs.primitives << [0, 0, 1280 * pct, 30, 0, 0, 255, 255].solid
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -53952,114 +62479,134 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
    +*** True Line Result
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +
    +** Processing line: ~*** Http - Web Server - main.rb~
    +- Header detected.
    +*** True Line Result
    +
    +*** True Line Result
    +*** Http - Web Server - main.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/11_http/02_web_server/app/main.rb~
    +- Inside source: true
    +*** True Line Result
    +  # ./samples/11_http/02_web_server/app/main.rb
     ** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
       def tick args
    -** Processing line: ~    args.state.star_count ||= 0~
    +** Processing line: ~    args.state.port ||= 3000~
     - Inside source: true
     *** True Line Result
    -    args.state.star_count ||= 0
    -** Processing line: ~~
    +    args.state.port ||= 3000
    +** Processing line: ~    # by default the embedded webserver runs on port 9001 (the port number is over 9000) and is disabled in a production build~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # sets console command when sample app initially opens~
    +    # by default the embedded webserver runs on port 9001 (the port number is over 9000) and is disabled in a production build
    +** Processing line: ~    # to enable the http server in a production build, you need to manually start~
     - Inside source: true
     *** True Line Result
    -    # sets console command when sample app initially opens
    -** Processing line: ~    if Kernel.global_tick_count == 0~
    +    # to enable the http server in a production build, you need to manually start
    +** Processing line: ~    # the server up:~
     - Inside source: true
     *** True Line Result
    -    if Kernel.global_tick_count == 0
    -** Processing line: ~      puts "* INFO - Please specify the number of sprites to render."~
    +    # the server up:
    +** Processing line: ~    args.gtk.start_server! port: args.state.port, enable_in_prod: true~
     - Inside source: true
     *** True Line Result
    -      puts "* INFO - Please specify the number of sprites to render."
    -** Processing line: ~      args.gtk.console.set_command "reset_with count: 100"~
    +    args.gtk.start_server! port: args.state.port, enable_in_prod: true
    +** Processing line: ~    args.outputs.background_color = [0, 0, 0]~
     - Inside source: true
     *** True Line Result
    -      args.gtk.console.set_command "reset_with count: 100"
    -** Processing line: ~    end~
    +    args.outputs.background_color = [0, 0, 0]
    +** Processing line: ~    args.outputs.labels << [640, 600, "Point your web browser at http://localhost:#{args.state.port}/", 10, 1, 255, 255, 255]~
     - Inside source: true
     *** True Line Result
    -    end
    +    args.outputs.labels << [640, 600, "Point your web browser at http://localhost:#{args.state.port}/", 10, 1, 255, 255, 255]
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # init~
    -- Inside source: true
    -*** True Line Result
    -    # init
    -** Processing line: ~    if args.state.tick_count == 0~
    -- Inside source: true
    -*** True Line Result
    -    if args.state.tick_count == 0
    -** Processing line: ~      args.state.stars = args.state.star_count.map { |i| new_star args }~
    +** Processing line: ~    args.inputs.http_requests.each { |req|~
     - Inside source: true
     *** True Line Result
    -      args.state.stars = args.state.star_count.map { |i| new_star args }
    -** Processing line: ~    end~
    +    args.inputs.http_requests.each { |req|
    +** Processing line: ~      puts("METHOD: #{req.method}");~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +      puts("METHOD: #{req.method}");
    +** Processing line: ~      puts("URI: #{req.uri}");~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # update~
    +      puts("URI: #{req.uri}");
    +** Processing line: ~      puts("HEADERS:");~
     - Inside source: true
     *** True Line Result
    -    # update
    -** Processing line: ~    args.state.stars.each { |s| move_star args, s }~
    +      puts("HEADERS:");
    +** Processing line: ~      req.headers.each { |k,v| puts("  #{k}: #{v}") }~
     - Inside source: true
     *** True Line Result
    -    args.state.stars.each { |s| move_star args, s }
    +      req.headers.each { |k,v| puts("  #{k}: #{v}") }
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # render~
    +** Processing line: ~      if (req.uri == '/')~
     - Inside source: true
     *** True Line Result
    -    # render
    -** Processing line: ~    args.outputs.sprites << args.state.stars~
    +      if (req.uri == '/')
    +** Processing line: ~        # headers and body can be nil if you don't care about them.~
     - Inside source: true
     *** True Line Result
    -    args.outputs.sprites << args.state.stars
    -** Processing line: ~    args.outputs.background_color = [0, 0, 0]~
    +        # headers and body can be nil if you don't care about them.
    +** Processing line: ~        # If you don't set the Content-Type, it will default to~
     - Inside source: true
     *** True Line Result
    -    args.outputs.background_color = [0, 0, 0]
    -** Processing line: ~    args.outputs.primitives << args.gtk.current_framerate_primitives~
    +        # If you don't set the Content-Type, it will default to
    +** Processing line: ~        #  "text/html; charset=utf-8".~
     - Inside source: true
     *** True Line Result
    -    args.outputs.primitives << args.gtk.current_framerate_primitives
    -** Processing line: ~  end~
    +        #  "text/html; charset=utf-8".
    +** Processing line: ~        # Don't set Content-Length; we'll ignore it and calculate it for you~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +        # Don't set Content-Length; we'll ignore it and calculate it for you
    +** Processing line: ~        args.state.reqnum += 1~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  # resets game, and assigns star count given by user~
    +        args.state.reqnum += 1
    +** Processing line: ~        req.respond 200, "hello

    This #{req.method} was request number #{args.state.reqnum}!

    \n", { 'X-DRGTK-header' => 'Powered by DragonRuby!' }~ - Inside source: true *** True Line Result - # resets game, and assigns star count given by user -** Processing line: ~ def reset_with count: count~ + req.respond 200, "hello

    This #{req.method} was request number #{args.state.reqnum}!

    \n", { 'X-DRGTK-header' => 'Powered by DragonRuby!' } +** Processing line: ~ else~ - Inside source: true *** True Line Result - def reset_with count: count -** Processing line: ~ $gtk.reset~ + else +** Processing line: ~ req.reject~ - Inside source: true *** True Line Result - $gtk.reset -** Processing line: ~ $gtk.args.state.star_count = count~ + req.reject +** Processing line: ~ end~ - Inside source: true *** True Line Result - $gtk.args.state.star_count = count + end +** Processing line: ~ }~ +- Inside source: true +*** True Line Result + } ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -54076,50 +62623,54 @@ Follows is a source code listing for all files that have been open sourced. This - End of paragraph detected. *** True Line Result -** Processing line: ~*** Performance - Sprites As Strict Entities - main.rb~ +** Processing line: ~*** C Extensions - Basics - main.rb~ - Header detected. *** True Line Result *** True Line Result -*** Performance - Sprites As Strict Entities - main.rb +*** C Extensions - Basics - main.rb ** Processing line: ~#+begin_src ruby~ - Line was identified as the beginning of a code block. *** True Line Result *** True Line Result #+begin_src ruby -** Processing line: ~ # ./samples/09_performance/03_sprites_as_strict_entities/app/main.rb~ +** Processing line: ~ # ./samples/12_c_extensions/01_basics/app/main.rb~ - Inside source: true *** True Line Result - # ./samples/09_performance/03_sprites_as_strict_entities/app/main.rb -** Processing line: ~ # Sprites represented as StrictEntities using the queue ~args.outputs.sprites~~ + # ./samples/12_c_extensions/01_basics/app/main.rb +** Processing line: ~ $gtk.ffi_misc.gtk_dlopen("ext")~ - Inside source: true *** True Line Result - # Sprites represented as StrictEntities using the queue ~args.outputs.sprites~ -** Processing line: ~ # yields apis access similar to Entities, but all properties that can be set on the~ + $gtk.ffi_misc.gtk_dlopen("ext") +** Processing line: ~ include FFI::CExt~ - Inside source: true *** True Line Result - # yields apis access similar to Entities, but all properties that can be set on the -** Processing line: ~ # entity must be predefined with a default value. Strict entities do not support the~ + include FFI::CExt +** Processing line: ~~ - Inside source: true *** True Line Result - # entity must be predefined with a default value. Strict entities do not support the -** Processing line: ~ # addition of new properties after the fact. They are more performant than OpenEntities~ + +** Processing line: ~ def tick args~ - Inside source: true *** True Line Result - # addition of new properties after the fact. They are more performant than OpenEntities -** Processing line: ~ # because of this constraint.~ + def tick args +** Processing line: ~ args.outputs.labels << [640, 500, "mouse.x = #{args.mouse.x.to_i}", 5, 1]~ - Inside source: true *** True Line Result - # because of this constraint. -** Processing line: ~ def random_x args~ + args.outputs.labels << [640, 500, "mouse.x = #{args.mouse.x.to_i}", 5, 1] +** Processing line: ~ args.outputs.labels << [640, 460, "square(mouse.x) = #{square(args.mouse.x.to_i)}", 5, 1]~ - Inside source: true *** True Line Result - def random_x args -** Processing line: ~ (args.grid.w.randomize :ratio) * -1~ + args.outputs.labels << [640, 460, "square(mouse.x) = #{square(args.mouse.x.to_i)}", 5, 1] +** Processing line: ~ args.outputs.labels << [640, 420, "mouse.y = #{args.mouse.y.to_i}", 5, 1]~ - Inside source: true *** True Line Result - (args.grid.w.randomize :ratio) * -1 + args.outputs.labels << [640, 420, "mouse.y = #{args.mouse.y.to_i}", 5, 1] +** Processing line: ~ args.outputs.labels << [640, 380, "square(mouse.y) = #{square(args.mouse.y.to_i)}", 5, 1]~ +- Inside source: true +*** True Line Result + args.outputs.labels << [640, 380, "square(mouse.y) = #{square(args.mouse.y.to_i)}", 5, 1] ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -54128,82 +62679,90 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def random_y args~ -- Inside source: true -*** True Line Result - def random_y args -** Processing line: ~ (args.grid.h.randomize :ratio) * -1~ +** Processing line: ~~ - Inside source: true *** True Line Result - (args.grid.h.randomize :ratio) * -1 -** Processing line: ~ end~ -- Inside source: true + +** Processing line: ~#+end_src~ +- Line was identified as the end of a code block. *** True Line Result - end +#+end_src ** Processing line: ~~ -- Inside source: true +- End of paragraph detected. *** True Line Result -** Processing line: ~ def random_speed~ +** Processing line: ~*** C Extensions - Intermediate - main.rb~ +- Header detected. +*** True Line Result + +*** True Line Result +*** C Extensions - Intermediate - main.rb +** Processing line: ~#+begin_src ruby~ +- Line was identified as the beginning of a code block. +*** True Line Result + +*** True Line Result +#+begin_src ruby +** Processing line: ~ # ./samples/12_c_extensions/02_intermediate/app/main.rb~ - Inside source: true *** True Line Result - def random_speed -** Processing line: ~ 1 + (4.randomize :ratio)~ + # ./samples/12_c_extensions/02_intermediate/app/main.rb +** Processing line: ~ $gtk.ffi_misc.gtk_dlopen("ext")~ - Inside source: true *** True Line Result - 1 + (4.randomize :ratio) -** Processing line: ~ end~ + $gtk.ffi_misc.gtk_dlopen("ext") +** Processing line: ~ include FFI::RE~ - Inside source: true *** True Line Result - end + include FFI::RE ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def new_star args~ -- Inside source: true -*** True Line Result - def new_star args -** Processing line: ~ args.state.new_entity_strict(:star,~ +** Processing line: ~ def split_words(input)~ - Inside source: true *** True Line Result - args.state.new_entity_strict(:star, -** Processing line: ~ x: (random_x args),~ + def split_words(input) +** Processing line: ~ words = []~ - Inside source: true *** True Line Result - x: (random_x args), -** Processing line: ~ y: (random_y args),~ + words = [] +** Processing line: ~ last = IntPointer.new~ - Inside source: true *** True Line Result - y: (random_y args), -** Processing line: ~ w: 4, h: 4,~ + last = IntPointer.new +** Processing line: ~ re = re_compile("\\w+")~ - Inside source: true *** True Line Result - w: 4, h: 4, -** Processing line: ~ path: 'sprites/tiny-star.png',~ + re = re_compile("\\w+") +** Processing line: ~ first = re_matchp(re, input, last)~ - Inside source: true *** True Line Result - path: 'sprites/tiny-star.png', -** Processing line: ~ s: random_speed) do |entity|~ + first = re_matchp(re, input, last) +** Processing line: ~ while first != -1~ - Inside source: true *** True Line Result - s: random_speed) do |entity| -** Processing line: ~ # invoke attr_sprite so that it responds to~ + while first != -1 +** Processing line: ~ words << input.slice(first, last.value)~ - Inside source: true *** True Line Result - # invoke attr_sprite so that it responds to -** Processing line: ~ # all properties that are required to render a sprite~ + words << input.slice(first, last.value) +** Processing line: ~ input = input.slice(last.value + first, input.length)~ - Inside source: true *** True Line Result - # all properties that are required to render a sprite -** Processing line: ~ entity.attr_sprite~ + input = input.slice(last.value + first, input.length) +** Processing line: ~ first = re_matchp(re, input, last)~ - Inside source: true *** True Line Result - entity.attr_sprite + first = re_matchp(re, input, last) ** Processing line: ~ end~ - Inside source: true *** True Line Result end +** Processing line: ~ words~ +- Inside source: true +*** True Line Result + words ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -54212,42 +62771,54 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def move_star args, star~ +** Processing line: ~ def tick args~ - Inside source: true *** True Line Result - def move_star args, star -** Processing line: ~ star.x += star.s~ + def tick args +** Processing line: ~ args.outputs.labels << [640, 500, split_words("hello, dragonriders!").join(' '), 5, 1]~ - Inside source: true *** True Line Result - star.x += star.s -** Processing line: ~ star.y += star.s~ + args.outputs.labels << [640, 500, split_words("hello, dragonriders!").join(' '), 5, 1] +** Processing line: ~ end~ - Inside source: true *** True Line Result - star.y += star.s -** Processing line: ~ if star.x > args.grid.w || star.y > args.grid.h~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - if star.x > args.grid.w || star.y > args.grid.h -** Processing line: ~ star.x = (random_x args)~ -- Inside source: true + +** Processing line: ~#+end_src~ +- Line was identified as the end of a code block. *** True Line Result - star.x = (random_x args) -** Processing line: ~ star.y = (random_y args)~ -- Inside source: true +#+end_src +** Processing line: ~~ +- End of paragraph detected. *** True Line Result - star.y = (random_y args) -** Processing line: ~ star.s = random_speed~ + +** Processing line: ~*** C Extensions - Native Pixel Arrays - main.rb~ +- Header detected. +*** True Line Result + +*** True Line Result +*** C Extensions - Native Pixel Arrays - main.rb +** Processing line: ~#+begin_src ruby~ +- Line was identified as the beginning of a code block. +*** True Line Result + +*** True Line Result +#+begin_src ruby +** Processing line: ~ # ./samples/12_c_extensions/03_native_pixel_arrays/app/main.rb~ - Inside source: true *** True Line Result - star.s = random_speed -** Processing line: ~ end~ + # ./samples/12_c_extensions/03_native_pixel_arrays/app/main.rb +** Processing line: ~ $gtk.ffi_misc.gtk_dlopen("ext")~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + $gtk.ffi_misc.gtk_dlopen("ext") +** Processing line: ~ include FFI::CExt~ - Inside source: true *** True Line Result - end + include FFI::CExt ** Processing line: ~~ - Inside source: true *** True Line Result @@ -54256,82 +62827,66 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result def tick args -** Processing line: ~ args.state.star_count ||= 0~ +** Processing line: ~ args.state.rotation ||= 0~ - Inside source: true *** True Line Result - args.state.star_count ||= 0 + args.state.rotation ||= 0 ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # sets console command when sample app initially opens~ -- Inside source: true -*** True Line Result - # sets console command when sample app initially opens -** Processing line: ~ if Kernel.global_tick_count == 0~ -- Inside source: true -*** True Line Result - if Kernel.global_tick_count == 0 -** Processing line: ~ puts "* INFO - Please specify the number of sprites to render."~ -- Inside source: true -*** True Line Result - puts "* INFO - Please specify the number of sprites to render." -** Processing line: ~ args.gtk.console.set_command "reset_with count: 100"~ -- Inside source: true -*** True Line Result - args.gtk.console.set_command "reset_with count: 100" -** Processing line: ~ end~ +** Processing line: ~ update_scanner_texture # this calls into a C extension!~ - Inside source: true *** True Line Result - end + update_scanner_texture # this calls into a C extension! ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # init~ +** Processing line: ~ # New/changed pixel arrays get uploaded to the GPU before we render~ - Inside source: true *** True Line Result - # init -** Processing line: ~ if args.state.tick_count == 0~ + # New/changed pixel arrays get uploaded to the GPU before we render +** Processing line: ~ # anything. At that point, they can be scaled, rotated, and otherwise~ - Inside source: true *** True Line Result - if args.state.tick_count == 0 -** Processing line: ~ args.state.stars = args.state.star_count.map { |i| new_star args }~ + # anything. At that point, they can be scaled, rotated, and otherwise +** Processing line: ~ # used like any other sprite.~ - Inside source: true *** True Line Result - args.state.stars = args.state.star_count.map { |i| new_star args } -** Processing line: ~ end~ + # used like any other sprite. +** Processing line: ~ w = 100~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + w = 100 +** Processing line: ~ h = 100~ - Inside source: true *** True Line Result - -** Processing line: ~ # update~ + h = 100 +** Processing line: ~ x = (1280 - w) / 2~ - Inside source: true *** True Line Result - # update -** Processing line: ~ args.state.stars.each { |s| move_star args, s }~ + x = (1280 - w) / 2 +** Processing line: ~ y = (720 - h) / 2~ - Inside source: true *** True Line Result - args.state.stars.each { |s| move_star args, s } -** Processing line: ~~ + y = (720 - h) / 2 +** Processing line: ~ args.outputs.background_color = [64, 0, 128]~ - Inside source: true *** True Line Result - -** Processing line: ~ # render~ + args.outputs.background_color = [64, 0, 128] +** Processing line: ~ args.outputs.primitives << [x, y, w, h, :scanner, args.state.rotation].sprite~ - Inside source: true *** True Line Result - # render -** Processing line: ~ args.outputs.sprites << args.state.stars~ + args.outputs.primitives << [x, y, w, h, :scanner, args.state.rotation].sprite +** Processing line: ~ args.state.rotation += 1~ - Inside source: true *** True Line Result - args.outputs.sprites << args.state.stars -** Processing line: ~ args.outputs.background_color = [0, 0, 0]~ + args.state.rotation += 1 +** Processing line: ~~ - Inside source: true *** True Line Result - args.outputs.background_color = [0, 0, 0] + ** Processing line: ~ args.outputs.primitives << args.gtk.current_framerate_primitives~ - Inside source: true *** True Line Result @@ -54344,26 +62899,6 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # resets game, and assigns star count given by user~ -- Inside source: true -*** True Line Result - # resets game, and assigns star count given by user -** Processing line: ~ def reset_with count: count~ -- Inside source: true -*** True Line Result - def reset_with count: count -** Processing line: ~ $gtk.reset~ -- Inside source: true -*** True Line Result - $gtk.reset -** Processing line: ~ $gtk.args.state.star_count = count~ -- Inside source: true -*** True Line Result - $gtk.args.state.star_count = count -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end ** Processing line: ~~ - Inside source: true *** True Line Result @@ -54376,722 +62911,730 @@ Follows is a source code listing for all files that have been open sourced. This - End of paragraph detected. *** True Line Result -** Processing line: ~*** Performance - Sprites As Classes - main.rb~ +** Processing line: ~*** Path Finding Algorithms - Breadth First Search - main.rb~ - Header detected. *** True Line Result *** True Line Result -*** Performance - Sprites As Classes - main.rb +*** Path Finding Algorithms - Breadth First Search - main.rb ** Processing line: ~#+begin_src ruby~ - Line was identified as the beginning of a code block. *** True Line Result *** True Line Result #+begin_src ruby -** Processing line: ~ # ./samples/09_performance/04_sprites_as_classes/app/main.rb~ -- Inside source: true -*** True Line Result - # ./samples/09_performance/04_sprites_as_classes/app/main.rb -** Processing line: ~ # Sprites represented as Classes using the queue ~args.outputs.sprites~.~ +** Processing line: ~ # ./samples/13_path_finding_algorithms/01_breadth_first_search/app/main.rb~ - Inside source: true *** True Line Result - # Sprites represented as Classes using the queue ~args.outputs.sprites~. -** Processing line: ~ # gives you full control of property declaration and method invocation.~ + # ./samples/13_path_finding_algorithms/01_breadth_first_search/app/main.rb +** Processing line: ~ # A visual demonstration of a breadth first search~ - Inside source: true *** True Line Result - # gives you full control of property declaration and method invocation. -** Processing line: ~ # They are more performant than OpenEntities and StrictEntities, but more code upfront.~ + # A visual demonstration of a breadth first search +** Processing line: ~ # Inspired by https://www.redblobgames.com/pathfinding/a-star/introduction.html~ - Inside source: true *** True Line Result - # They are more performant than OpenEntities and StrictEntities, but more code upfront. -** Processing line: ~ class Star~ + # Inspired by https://www.redblobgames.com/pathfinding/a-star/introduction.html +** Processing line: ~~ - Inside source: true *** True Line Result - class Star -** Processing line: ~ attr_sprite~ + +** Processing line: ~ # An animation that can respond to user input in real time~ - Inside source: true *** True Line Result - attr_sprite + # An animation that can respond to user input in real time ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def initialize grid~ +** Processing line: ~ # A breadth first search expands in all directions one step at a time~ - Inside source: true *** True Line Result - def initialize grid -** Processing line: ~ @grid = grid~ + # A breadth first search expands in all directions one step at a time +** Processing line: ~ # The frontier is a queue of cells to be expanded from~ - Inside source: true *** True Line Result - @grid = grid -** Processing line: ~ @x = (rand @grid.w) * -1~ + # The frontier is a queue of cells to be expanded from +** Processing line: ~ # The visited hash allows quick lookups of cells that have been expanded from~ - Inside source: true *** True Line Result - @x = (rand @grid.w) * -1 -** Processing line: ~ @y = (rand @grid.h) * -1~ + # The visited hash allows quick lookups of cells that have been expanded from +** Processing line: ~ # The walls hash allows quick lookup of whether a cell is a wall~ - Inside source: true *** True Line Result - @y = (rand @grid.h) * -1 -** Processing line: ~ @w = 4~ + # The walls hash allows quick lookup of whether a cell is a wall +** Processing line: ~~ - Inside source: true *** True Line Result - @w = 4 -** Processing line: ~ @h = 4~ + +** Processing line: ~ # The breadth first search starts by adding the red star to the frontier array~ - Inside source: true *** True Line Result - @h = 4 -** Processing line: ~ @s = 1 + (4.randomize :ratio)~ + # The breadth first search starts by adding the red star to the frontier array +** Processing line: ~ # and marking it as visited~ - Inside source: true *** True Line Result - @s = 1 + (4.randomize :ratio) -** Processing line: ~ @path = 'sprites/tiny-star.png'~ + # and marking it as visited +** Processing line: ~ # Each step a cell is removed from the front of the frontier array (queue)~ - Inside source: true *** True Line Result - @path = 'sprites/tiny-star.png' -** Processing line: ~ end~ + # Each step a cell is removed from the front of the frontier array (queue) +** Processing line: ~ # Unless the neighbor is a wall or visited, it is added to the frontier array~ - Inside source: true *** True Line Result - end + # Unless the neighbor is a wall or visited, it is added to the frontier array +** Processing line: ~ # The neighbor is then marked as visited~ +- Inside source: true +*** True Line Result + # The neighbor is then marked as visited ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def move~ +** Processing line: ~ # The frontier is blue~ - Inside source: true *** True Line Result - def move -** Processing line: ~ @x += @s~ + # The frontier is blue +** Processing line: ~ # Visited cells are light brown~ - Inside source: true *** True Line Result - @x += @s -** Processing line: ~ @y += @s~ + # Visited cells are light brown +** Processing line: ~ # Walls are camo green~ - Inside source: true *** True Line Result - @y += @s -** Processing line: ~ @x = (rand @grid.w) * -1 if @x > @grid.right~ + # Walls are camo green +** Processing line: ~ # Even when walls are visited, they will maintain their wall color~ - Inside source: true *** True Line Result - @x = (rand @grid.w) * -1 if @x > @grid.right -** Processing line: ~ @y = (rand @grid.h) * -1 if @y > @grid.top~ + # Even when walls are visited, they will maintain their wall color +** Processing line: ~~ - Inside source: true *** True Line Result - @y = (rand @grid.h) * -1 if @y > @grid.top -** Processing line: ~ end~ + +** Processing line: ~ # The star can be moved by clicking and dragging~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + # The star can be moved by clicking and dragging +** Processing line: ~ # Walls can be added and removed by clicking and dragging~ - Inside source: true *** True Line Result - end + # Walls can be added and removed by clicking and dragging ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # calls methods needed for game to run properly~ +** Processing line: ~ class BreadthFirstSearch~ - Inside source: true *** True Line Result - # calls methods needed for game to run properly -** Processing line: ~ def tick args~ + class BreadthFirstSearch +** Processing line: ~ attr_gtk~ - Inside source: true *** True Line Result - def tick args -** Processing line: ~ # sets console command when sample app initially opens~ + attr_gtk +** Processing line: ~~ - Inside source: true *** True Line Result - # sets console command when sample app initially opens -** Processing line: ~ if Kernel.global_tick_count == 0~ + +** Processing line: ~ def initialize(args)~ - Inside source: true *** True Line Result - if Kernel.global_tick_count == 0 -** Processing line: ~ args.gtk.console.set_command "reset_with count: 100"~ + def initialize(args) +** Processing line: ~ # Variables to edit the size and appearance of the grid~ - Inside source: true *** True Line Result - args.gtk.console.set_command "reset_with count: 100" -** Processing line: ~ end~ + # Variables to edit the size and appearance of the grid +** Processing line: ~ # Freely customizable to user's liking~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + # Freely customizable to user's liking +** Processing line: ~ args.state.grid.width = 30~ - Inside source: true *** True Line Result - -** Processing line: ~ # init~ + args.state.grid.width = 30 +** Processing line: ~ args.state.grid.height = 15~ - Inside source: true *** True Line Result - # init -** Processing line: ~ if args.state.tick_count == 0~ + args.state.grid.height = 15 +** Processing line: ~ args.state.grid.cell_size = 40~ - Inside source: true *** True Line Result - if args.state.tick_count == 0 -** Processing line: ~ args.state.stars = args.state.star_count.map { |i| Star.new args.grid }~ + args.state.grid.cell_size = 40 +** Processing line: ~~ - Inside source: true *** True Line Result - args.state.stars = args.state.star_count.map { |i| Star.new args.grid } -** Processing line: ~ end~ + +** Processing line: ~ # Stores which step of the animation is being rendered~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + # Stores which step of the animation is being rendered +** Processing line: ~ # When the user moves the star or messes with the walls,~ - Inside source: true *** True Line Result - -** Processing line: ~ # update~ + # When the user moves the star or messes with the walls, +** Processing line: ~ # the breadth first search is recalculated up to this step~ - Inside source: true *** True Line Result - # update -** Processing line: ~ args.state.stars.each(&:move)~ + # the breadth first search is recalculated up to this step +** Processing line: ~ args.state.anim_steps = 0~ - Inside source: true *** True Line Result - args.state.stars.each(&:move) + args.state.anim_steps = 0 ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # render~ +** Processing line: ~ # At some step the animation will end,~ - Inside source: true *** True Line Result - # render -** Processing line: ~ args.outputs.sprites << args.state.stars~ + # At some step the animation will end, +** Processing line: ~ # and further steps won't change anything (the whole grid will be explored)~ - Inside source: true *** True Line Result - args.outputs.sprites << args.state.stars -** Processing line: ~ args.outputs.background_color = [0, 0, 0]~ + # and further steps won't change anything (the whole grid will be explored) +** Processing line: ~ # This step is roughly the grid's width * height~ - Inside source: true *** True Line Result - args.outputs.background_color = [0, 0, 0] -** Processing line: ~ args.outputs.primitives << args.gtk.current_framerate_primitives~ + # This step is roughly the grid's width * height +** Processing line: ~ # When anim_steps equals max_steps no more calculations will occur~ - Inside source: true *** True Line Result - args.outputs.primitives << args.gtk.current_framerate_primitives -** Processing line: ~ end~ + # When anim_steps equals max_steps no more calculations will occur +** Processing line: ~ # and the slider will be at the end~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + # and the slider will be at the end +** Processing line: ~ args.state.max_steps = args.state.grid.width * args.state.grid.height~ - Inside source: true *** True Line Result - -** Processing line: ~ # resets game, and assigns star count given by user~ + args.state.max_steps = args.state.grid.width * args.state.grid.height +** Processing line: ~~ - Inside source: true *** True Line Result - # resets game, and assigns star count given by user -** Processing line: ~ def reset_with count: count~ + +** Processing line: ~ # Whether the animation should play or not~ - Inside source: true *** True Line Result - def reset_with count: count -** Processing line: ~ $gtk.reset~ + # Whether the animation should play or not +** Processing line: ~ # If true, every tick moves anim_steps forward one~ - Inside source: true *** True Line Result - $gtk.reset -** Processing line: ~ $gtk.args.state.star_count = count~ + # If true, every tick moves anim_steps forward one +** Processing line: ~ # Pressing the stepwise animation buttons will pause the animation~ - Inside source: true *** True Line Result - $gtk.args.state.star_count = count -** Processing line: ~ end~ + # Pressing the stepwise animation buttons will pause the animation +** Processing line: ~ args.state.play = true~ - Inside source: true *** True Line Result - end + args.state.play = true ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~#+end_src~ -- Line was identified as the end of a code block. +** Processing line: ~ # The location of the star and walls of the grid~ +- Inside source: true *** True Line Result -#+end_src -** Processing line: ~~ -- End of paragraph detected. + # The location of the star and walls of the grid +** Processing line: ~ # They can be modified to have a different initial grid~ +- Inside source: true *** True Line Result - -** Processing line: ~*** Performance - Static Sprites As Classes - main.rb~ -- Header detected. + # They can be modified to have a different initial grid +** Processing line: ~ # Walls are stored in a hash for quick look up when doing the search~ +- Inside source: true *** True Line Result - + # Walls are stored in a hash for quick look up when doing the search +** Processing line: ~ args.state.star = [0, 0]~ +- Inside source: true *** True Line Result -*** Performance - Static Sprites As Classes - main.rb -** Processing line: ~#+begin_src ruby~ -- Line was identified as the beginning of a code block. + args.state.star = [0, 0] +** Processing line: ~ args.state.walls = {~ +- Inside source: true *** True Line Result - + args.state.walls = { +** Processing line: ~ [3, 3] => true,~ +- Inside source: true *** True Line Result -#+begin_src ruby -** Processing line: ~ # ./samples/09_performance/05_static_sprites_as_classes/app/main.rb~ + [3, 3] => true, +** Processing line: ~ [3, 4] => true,~ - Inside source: true *** True Line Result - # ./samples/09_performance/05_static_sprites_as_classes/app/main.rb -** Processing line: ~ # Sprites represented as Classes using the queue ~args.outputs.static_sprites~.~ + [3, 4] => true, +** Processing line: ~ [3, 5] => true,~ - Inside source: true *** True Line Result - # Sprites represented as Classes using the queue ~args.outputs.static_sprites~. -** Processing line: ~ # bypasses the queue behavior of ~args.outputs.sprites~. All instances are held~ + [3, 5] => true, +** Processing line: ~ [3, 6] => true,~ - Inside source: true *** True Line Result - # bypasses the queue behavior of ~args.outputs.sprites~. All instances are held -** Processing line: ~ # by reference. You get better performance, but you are mutating state of held objects~ + [3, 6] => true, +** Processing line: ~ [3, 7] => true,~ - Inside source: true *** True Line Result - # by reference. You get better performance, but you are mutating state of held objects -** Processing line: ~ # which is less functional/data oriented.~ + [3, 7] => true, +** Processing line: ~ [3, 8] => true,~ - Inside source: true *** True Line Result - # which is less functional/data oriented. -** Processing line: ~ class Star~ + [3, 8] => true, +** Processing line: ~ [3, 9] => true,~ - Inside source: true *** True Line Result - class Star -** Processing line: ~ attr_sprite~ + [3, 9] => true, +** Processing line: ~ [3, 10] => true,~ - Inside source: true *** True Line Result - attr_sprite -** Processing line: ~~ + [3, 10] => true, +** Processing line: ~ [3, 11] => true,~ - Inside source: true *** True Line Result - -** Processing line: ~ def initialize grid~ + [3, 11] => true, +** Processing line: ~ [4, 3] => true,~ - Inside source: true *** True Line Result - def initialize grid -** Processing line: ~ @grid = grid~ + [4, 3] => true, +** Processing line: ~ [4, 4] => true,~ - Inside source: true *** True Line Result - @grid = grid -** Processing line: ~ @x = (rand @grid.w) * -1~ + [4, 4] => true, +** Processing line: ~ [4, 5] => true,~ - Inside source: true *** True Line Result - @x = (rand @grid.w) * -1 -** Processing line: ~ @y = (rand @grid.h) * -1~ + [4, 5] => true, +** Processing line: ~ [4, 6] => true,~ - Inside source: true *** True Line Result - @y = (rand @grid.h) * -1 -** Processing line: ~ @w = 4~ + [4, 6] => true, +** Processing line: ~ [4, 7] => true,~ - Inside source: true *** True Line Result - @w = 4 -** Processing line: ~ @h = 4~ + [4, 7] => true, +** Processing line: ~ [4, 8] => true,~ - Inside source: true *** True Line Result - @h = 4 -** Processing line: ~ @s = 1 + (4.randomize :ratio)~ + [4, 8] => true, +** Processing line: ~ [4, 9] => true,~ - Inside source: true *** True Line Result - @s = 1 + (4.randomize :ratio) -** Processing line: ~ @path = 'sprites/tiny-star.png'~ + [4, 9] => true, +** Processing line: ~ [4, 10] => true,~ - Inside source: true *** True Line Result - @path = 'sprites/tiny-star.png' -** Processing line: ~ end~ + [4, 10] => true, +** Processing line: ~ [4, 11] => true,~ - Inside source: true *** True Line Result - end + [4, 11] => true, ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def move~ +** Processing line: ~ [13, 0] => true,~ - Inside source: true *** True Line Result - def move -** Processing line: ~ @x += @s~ + [13, 0] => true, +** Processing line: ~ [13, 1] => true,~ - Inside source: true *** True Line Result - @x += @s -** Processing line: ~ @y += @s~ + [13, 1] => true, +** Processing line: ~ [13, 2] => true,~ - Inside source: true *** True Line Result - @y += @s -** Processing line: ~ @x = (rand @grid.w) * -1 if @x > @grid.right~ + [13, 2] => true, +** Processing line: ~ [13, 3] => true,~ - Inside source: true *** True Line Result - @x = (rand @grid.w) * -1 if @x > @grid.right -** Processing line: ~ @y = (rand @grid.h) * -1 if @y > @grid.top~ + [13, 3] => true, +** Processing line: ~ [13, 4] => true,~ - Inside source: true *** True Line Result - @y = (rand @grid.h) * -1 if @y > @grid.top -** Processing line: ~ end~ + [13, 4] => true, +** Processing line: ~ [13, 5] => true,~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + [13, 5] => true, +** Processing line: ~ [13, 6] => true,~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + [13, 6] => true, +** Processing line: ~ [13, 7] => true,~ - Inside source: true *** True Line Result - -** Processing line: ~ # calls methods needed for game to run properly~ + [13, 7] => true, +** Processing line: ~ [13, 8] => true,~ - Inside source: true *** True Line Result - # calls methods needed for game to run properly -** Processing line: ~ def tick args~ + [13, 8] => true, +** Processing line: ~ [13, 9] => true,~ - Inside source: true *** True Line Result - def tick args -** Processing line: ~ # sets console command when sample app initially opens~ + [13, 9] => true, +** Processing line: ~ [13, 10] => true,~ - Inside source: true *** True Line Result - # sets console command when sample app initially opens -** Processing line: ~ if Kernel.global_tick_count == 0~ + [13, 10] => true, +** Processing line: ~ [14, 0] => true,~ - Inside source: true *** True Line Result - if Kernel.global_tick_count == 0 -** Processing line: ~ args.gtk.console.set_command "reset_with count: 100"~ + [14, 0] => true, +** Processing line: ~ [14, 1] => true,~ - Inside source: true *** True Line Result - args.gtk.console.set_command "reset_with count: 100" -** Processing line: ~ end~ + [14, 1] => true, +** Processing line: ~ [14, 2] => true,~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + [14, 2] => true, +** Processing line: ~ [14, 3] => true,~ - Inside source: true *** True Line Result - -** Processing line: ~ # init~ + [14, 3] => true, +** Processing line: ~ [14, 4] => true,~ - Inside source: true *** True Line Result - # init -** Processing line: ~ if args.state.tick_count == 0~ + [14, 4] => true, +** Processing line: ~ [14, 5] => true,~ - Inside source: true *** True Line Result - if args.state.tick_count == 0 -** Processing line: ~ args.state.stars = args.state.star_count.map { |i| Star.new args.grid }~ + [14, 5] => true, +** Processing line: ~ [14, 6] => true,~ - Inside source: true *** True Line Result - args.state.stars = args.state.star_count.map { |i| Star.new args.grid } -** Processing line: ~ end~ + [14, 6] => true, +** Processing line: ~ [14, 7] => true,~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + [14, 7] => true, +** Processing line: ~ [14, 8] => true,~ - Inside source: true *** True Line Result - -** Processing line: ~ # update~ + [14, 8] => true, +** Processing line: ~ [14, 9] => true,~ - Inside source: true *** True Line Result - # update -** Processing line: ~ args.state.stars.each(&:move)~ + [14, 9] => true, +** Processing line: ~ [14, 10] => true,~ - Inside source: true *** True Line Result - args.state.stars.each(&:move) + [14, 10] => true, ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # render~ +** Processing line: ~ [21, 8] => true,~ - Inside source: true *** True Line Result - # render -** Processing line: ~ args.outputs.sprites << args.state.stars~ + [21, 8] => true, +** Processing line: ~ [21, 9] => true,~ - Inside source: true *** True Line Result - args.outputs.sprites << args.state.stars -** Processing line: ~ args.outputs.background_color = [0, 0, 0]~ + [21, 9] => true, +** Processing line: ~ [21, 10] => true,~ - Inside source: true *** True Line Result - args.outputs.background_color = [0, 0, 0] -** Processing line: ~ args.outputs.primitives << args.gtk.current_framerate_primitives~ + [21, 10] => true, +** Processing line: ~ [21, 11] => true,~ - Inside source: true *** True Line Result - args.outputs.primitives << args.gtk.current_framerate_primitives -** Processing line: ~ end~ + [21, 11] => true, +** Processing line: ~ [21, 12] => true,~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + [21, 12] => true, +** Processing line: ~ [21, 13] => true,~ - Inside source: true *** True Line Result - -** Processing line: ~ # resets game, and assigns star count given by user~ + [21, 13] => true, +** Processing line: ~ [21, 14] => true,~ - Inside source: true *** True Line Result - # resets game, and assigns star count given by user -** Processing line: ~ def reset_with count: count~ + [21, 14] => true, +** Processing line: ~ [22, 8] => true,~ - Inside source: true *** True Line Result - def reset_with count: count -** Processing line: ~ $gtk.reset~ + [22, 8] => true, +** Processing line: ~ [22, 9] => true,~ - Inside source: true *** True Line Result - $gtk.reset -** Processing line: ~ $gtk.args.state.star_count = count~ + [22, 9] => true, +** Processing line: ~ [22, 10] => true,~ - Inside source: true *** True Line Result - $gtk.args.state.star_count = count -** Processing line: ~ end~ + [22, 10] => true, +** Processing line: ~ [22, 11] => true,~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + [22, 11] => true, +** Processing line: ~ [22, 12] => true,~ - Inside source: true *** True Line Result - -** Processing line: ~#+end_src~ -- Line was identified as the end of a code block. -*** True Line Result -#+end_src -** Processing line: ~~ -- End of paragraph detected. -*** True Line Result - -** Processing line: ~*** Performance - Static Sprites As Classes With Custom Drawing - main.rb~ -- Header detected. -*** True Line Result - -*** True Line Result -*** Performance - Static Sprites As Classes With Custom Drawing - main.rb -** Processing line: ~#+begin_src ruby~ -- Line was identified as the beginning of a code block. + [22, 12] => true, +** Processing line: ~ [22, 13] => true,~ +- Inside source: true *** True Line Result - + [22, 13] => true, +** Processing line: ~ [22, 14] => true,~ +- Inside source: true *** True Line Result -#+begin_src ruby -** Processing line: ~ # ./samples/09_performance/06_static_sprites_as_classes_with_custom_drawing/app/main.rb~ + [22, 14] => true, +** Processing line: ~ [23, 8] => true,~ - Inside source: true *** True Line Result - # ./samples/09_performance/06_static_sprites_as_classes_with_custom_drawing/app/main.rb -** Processing line: ~ # Sprites represented as Classes, with a draw_override method, and using the queue ~args.outputs.static_sprites~.~ + [23, 8] => true, +** Processing line: ~ [23, 9] => true,~ - Inside source: true *** True Line Result - # Sprites represented as Classes, with a draw_override method, and using the queue ~args.outputs.static_sprites~. -** Processing line: ~ # is the fastest approach. This is comparable to what other game engines set as the default behavior.~ + [23, 9] => true, +** Processing line: ~ [24, 8] => true,~ - Inside source: true *** True Line Result - # is the fastest approach. This is comparable to what other game engines set as the default behavior. -** Processing line: ~ # There are tradeoffs for all this speed if the creation of a full blown class, and bypassing~ + [24, 8] => true, +** Processing line: ~ [24, 9] => true,~ - Inside source: true *** True Line Result - # There are tradeoffs for all this speed if the creation of a full blown class, and bypassing -** Processing line: ~ # functional/data-oriented practices.~ + [24, 9] => true, +** Processing line: ~ [25, 8] => true,~ - Inside source: true *** True Line Result - # functional/data-oriented practices. -** Processing line: ~ class Star~ + [25, 8] => true, +** Processing line: ~ [25, 9] => true,~ - Inside source: true *** True Line Result - class Star -** Processing line: ~ def initialize grid~ + [25, 9] => true, +** Processing line: ~ }~ - Inside source: true *** True Line Result - def initialize grid -** Processing line: ~ @grid = grid~ + } +** Processing line: ~~ - Inside source: true *** True Line Result - @grid = grid -** Processing line: ~ @x = (rand @grid.w) * -1~ + +** Processing line: ~ # Variables that are used by the breadth first search~ - Inside source: true *** True Line Result - @x = (rand @grid.w) * -1 -** Processing line: ~ @y = (rand @grid.h) * -1~ + # Variables that are used by the breadth first search +** Processing line: ~ # Storing cells that the search has visited, prevents unnecessary steps~ - Inside source: true *** True Line Result - @y = (rand @grid.h) * -1 -** Processing line: ~ @w = 4~ + # Storing cells that the search has visited, prevents unnecessary steps +** Processing line: ~ # Expanding the frontier of the search in order makes the search expand~ - Inside source: true *** True Line Result - @w = 4 -** Processing line: ~ @h = 4~ + # Expanding the frontier of the search in order makes the search expand +** Processing line: ~ # from the center outward~ - Inside source: true *** True Line Result - @h = 4 -** Processing line: ~ @s = 1 + (4.randomize :ratio)~ + # from the center outward +** Processing line: ~ args.state.visited = {}~ - Inside source: true *** True Line Result - @s = 1 + (4.randomize :ratio) -** Processing line: ~ @path = 'sprites/tiny-star.png'~ + args.state.visited = {} +** Processing line: ~ args.state.frontier = []~ - Inside source: true *** True Line Result - @path = 'sprites/tiny-star.png' -** Processing line: ~ end~ + args.state.frontier = [] +** Processing line: ~~ - Inside source: true *** True Line Result - end + ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def move~ +** Processing line: ~ # What the user is currently editing on the grid~ - Inside source: true *** True Line Result - def move -** Processing line: ~ @x += @s~ + # What the user is currently editing on the grid +** Processing line: ~ # Possible values are: :none, :slider, :star, :remove_wall, :add_wall~ - Inside source: true *** True Line Result - @x += @s -** Processing line: ~ @y += @s~ + # Possible values are: :none, :slider, :star, :remove_wall, :add_wall +** Processing line: ~~ - Inside source: true *** True Line Result - @y += @s -** Processing line: ~ @x = (rand @grid.w) * -1 if @x > @grid.right~ + +** Processing line: ~ # We store this value, because we want to remember the value even when~ - Inside source: true *** True Line Result - @x = (rand @grid.w) * -1 if @x > @grid.right -** Processing line: ~ @y = (rand @grid.h) * -1 if @y > @grid.top~ + # We store this value, because we want to remember the value even when +** Processing line: ~ # the user's cursor is no longer over what they're interacting with, but~ - Inside source: true *** True Line Result - @y = (rand @grid.h) * -1 if @y > @grid.top -** Processing line: ~ end~ + # the user's cursor is no longer over what they're interacting with, but +** Processing line: ~ # they are still clicking down on the mouse.~ - Inside source: true *** True Line Result - end + # they are still clicking down on the mouse. +** Processing line: ~ args.state.click_and_drag = :none~ +- Inside source: true +*** True Line Result + args.state.click_and_drag = :none ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # if the object that is in args.outputs.sprites (or static_sprites)~ +** Processing line: ~ # Store the rects of the buttons that control the animation~ - Inside source: true *** True Line Result - # if the object that is in args.outputs.sprites (or static_sprites) -** Processing line: ~ # respond_to? :draw_override, then the method is invoked giving you~ + # Store the rects of the buttons that control the animation +** Processing line: ~ # They are here for user customization~ - Inside source: true *** True Line Result - # respond_to? :draw_override, then the method is invoked giving you -** Processing line: ~ # access to the class used to draw to the canvas.~ + # They are here for user customization +** Processing line: ~ # Editing these might require recentering the text inside them~ - Inside source: true *** True Line Result - # access to the class used to draw to the canvas. -** Processing line: ~ def draw_override ffi_draw~ + # Editing these might require recentering the text inside them +** Processing line: ~ # Those values can be found in the render_button methods~ - Inside source: true *** True Line Result - def draw_override ffi_draw -** Processing line: ~ # first move then draw~ + # Those values can be found in the render_button methods +** Processing line: ~ args.state.buttons.left = [450, 600, 50, 50]~ - Inside source: true *** True Line Result - # first move then draw -** Processing line: ~ move~ + args.state.buttons.left = [450, 600, 50, 50] +** Processing line: ~ args.state.buttons.center = [500, 600, 200, 50]~ - Inside source: true *** True Line Result - move + args.state.buttons.center = [500, 600, 200, 50] +** Processing line: ~ args.state.buttons.right = [700, 600, 50, 50]~ +- Inside source: true +*** True Line Result + args.state.buttons.right = [700, 600, 50, 50] ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # The argument order for ffi.draw_sprite is:~ +** Processing line: ~ # The variables below are related to the slider~ - Inside source: true *** True Line Result - # The argument order for ffi.draw_sprite is: -** Processing line: ~ # x, y, w, h, path~ + # The variables below are related to the slider +** Processing line: ~ # They allow the user to customize them~ - Inside source: true *** True Line Result - # x, y, w, h, path -** Processing line: ~ ffi_draw.draw_sprite @x, @y, @w, @h, @path~ + # They allow the user to customize them +** Processing line: ~ # They also give a central location for the render and input methods to get~ - Inside source: true *** True Line Result - ffi_draw.draw_sprite @x, @y, @w, @h, @path -** Processing line: ~~ + # They also give a central location for the render and input methods to get +** Processing line: ~ # information from~ - Inside source: true *** True Line Result - -** Processing line: ~ # The argument order for ffi_draw.draw_sprite_2 is (pass in nil for default value):~ + # information from +** Processing line: ~ # x & y are the coordinates of the leftmost part of the slider line~ - Inside source: true *** True Line Result - # The argument order for ffi_draw.draw_sprite_2 is (pass in nil for default value): -** Processing line: ~ # x, y, w, h, path,~ + # x & y are the coordinates of the leftmost part of the slider line +** Processing line: ~ args.state.slider.x = 400~ - Inside source: true *** True Line Result - # x, y, w, h, path, -** Processing line: ~ # angle, alpha~ + args.state.slider.x = 400 +** Processing line: ~ args.state.slider.y = 675~ - Inside source: true *** True Line Result - # angle, alpha -** Processing line: ~~ + args.state.slider.y = 675 +** Processing line: ~ # This is the width of the line~ - Inside source: true *** True Line Result - -** Processing line: ~ # The argument order for ffi_draw.draw_sprite_3 is:~ + # This is the width of the line +** Processing line: ~ args.state.slider.w = 360~ - Inside source: true *** True Line Result - # The argument order for ffi_draw.draw_sprite_3 is: -** Processing line: ~ # x, y, w, h,~ + args.state.slider.w = 360 +** Processing line: ~ # This is the offset for the circle~ - Inside source: true *** True Line Result - # x, y, w, h, -** Processing line: ~ # path,~ + # This is the offset for the circle +** Processing line: ~ # Allows the center of the circle to be on the line,~ - Inside source: true *** True Line Result - # path, -** Processing line: ~ # angle,~ + # Allows the center of the circle to be on the line, +** Processing line: ~ # as opposed to the upper right corner~ - Inside source: true *** True Line Result - # angle, -** Processing line: ~ # alpha, red_saturation, green_saturation, blue_saturation~ + # as opposed to the upper right corner +** Processing line: ~ args.state.slider.offset = 20~ - Inside source: true *** True Line Result - # alpha, red_saturation, green_saturation, blue_saturation -** Processing line: ~ # flip_horizontally, flip_vertically,~ + args.state.slider.offset = 20 +** Processing line: ~ # This is the spacing between each of the notches on the slider~ - Inside source: true *** True Line Result - # flip_horizontally, flip_vertically, -** Processing line: ~ # tile_x, tile_y, tile_w, tile_h~ + # This is the spacing between each of the notches on the slider +** Processing line: ~ # Notches are places where the circle can rest on the slider line~ - Inside source: true *** True Line Result - # tile_x, tile_y, tile_w, tile_h -** Processing line: ~ # angle_anchor_x, angle_anchor_y,~ + # Notches are places where the circle can rest on the slider line +** Processing line: ~ # There needs to be a notch for each step before the maximum number of steps~ - Inside source: true *** True Line Result - # angle_anchor_x, angle_anchor_y, -** Processing line: ~ # source_x, source_y, source_w, source_h~ + # There needs to be a notch for each step before the maximum number of steps +** Processing line: ~ args.state.slider.spacing = args.state.slider.w.to_f / args.state.max_steps.to_f~ - Inside source: true *** True Line Result - # source_x, source_y, source_w, source_h + args.state.slider.spacing = args.state.slider.w.to_f / args.state.max_steps.to_f ** Processing line: ~ end~ - Inside source: true *** True Line Result end -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # calls methods needed for game to run properly~ +** Processing line: ~ # This method is called every frame/tick~ - Inside source: true *** True Line Result - # calls methods needed for game to run properly -** Processing line: ~ def tick args~ + # This method is called every frame/tick +** Processing line: ~ # Every tick, the current state of the search is rendered on the screen,~ - Inside source: true *** True Line Result - def tick args -** Processing line: ~ # sets console command when sample app initially opens~ + # Every tick, the current state of the search is rendered on the screen, +** Processing line: ~ # User input is processed, and~ - Inside source: true *** True Line Result - # sets console command when sample app initially opens -** Processing line: ~ if Kernel.global_tick_count == 0~ + # User input is processed, and +** Processing line: ~ # The next step in the search is calculated~ - Inside source: true *** True Line Result - if Kernel.global_tick_count == 0 -** Processing line: ~ args.gtk.console.set_command "reset_with count: 100"~ + # The next step in the search is calculated +** Processing line: ~ def tick~ - Inside source: true *** True Line Result - args.gtk.console.set_command "reset_with count: 100" -** Processing line: ~ end~ + def tick +** Processing line: ~ render~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + render +** Processing line: ~ input~ - Inside source: true *** True Line Result - -** Processing line: ~ # init~ + input +** Processing line: ~ # If animation is playing, and max steps have not been reached~ - Inside source: true *** True Line Result - # init -** Processing line: ~ if args.state.tick_count == 0~ + # If animation is playing, and max steps have not been reached +** Processing line: ~ # Move the search a step forward~ - Inside source: true *** True Line Result - if args.state.tick_count == 0 -** Processing line: ~ args.state.stars = args.state.star_count.map { |i| Star.new args.grid }~ + # Move the search a step forward +** Processing line: ~ if state.play && state.anim_steps < state.max_steps~ - Inside source: true *** True Line Result - args.state.stars = args.state.star_count.map { |i| Star.new args.grid } -** Processing line: ~ args.outputs.static_sprites << args.state.stars~ + if state.play && state.anim_steps < state.max_steps +** Processing line: ~ # Variable that tells the program what step to recalculate up to~ - Inside source: true *** True Line Result - args.outputs.static_sprites << args.state.stars + # Variable that tells the program what step to recalculate up to +** Processing line: ~ state.anim_steps += 1~ +- Inside source: true +*** True Line Result + state.anim_steps += 1 +** Processing line: ~ calc~ +- Inside source: true +*** True Line Result + calc +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -55100,342 +63643,322 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # render framerate~ +** Processing line: ~ # Draws everything onto the screen~ - Inside source: true *** True Line Result - # render framerate -** Processing line: ~ args.outputs.background_color = [0, 0, 0]~ + # Draws everything onto the screen +** Processing line: ~ def render~ - Inside source: true *** True Line Result - args.outputs.background_color = [0, 0, 0] -** Processing line: ~ args.outputs.primitives << args.gtk.current_framerate_primitives~ + def render +** Processing line: ~ render_buttons~ - Inside source: true *** True Line Result - args.outputs.primitives << args.gtk.current_framerate_primitives -** Processing line: ~ end~ + render_buttons +** Processing line: ~ render_slider~ - Inside source: true *** True Line Result - end + render_slider ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # resets game, and assigns star count given by user~ +** Processing line: ~ render_background~ - Inside source: true *** True Line Result - # resets game, and assigns star count given by user -** Processing line: ~ def reset_with count: count~ + render_background +** Processing line: ~ render_visited~ - Inside source: true *** True Line Result - def reset_with count: count -** Processing line: ~ $gtk.reset~ + render_visited +** Processing line: ~ render_frontier~ - Inside source: true *** True Line Result - $gtk.reset -** Processing line: ~ $gtk.args.state.star_count = count~ + render_frontier +** Processing line: ~ render_walls~ - Inside source: true *** True Line Result - $gtk.args.state.star_count = count -** Processing line: ~ end~ + render_walls +** Processing line: ~ render_star~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + render_star +** Processing line: ~ end~ - Inside source: true *** True Line Result - -** Processing line: ~#+end_src~ -- Line was identified as the end of a code block. -*** True Line Result -#+end_src + end ** Processing line: ~~ -- End of paragraph detected. -*** True Line Result - -** Processing line: ~*** Performance - Collision Limits - main.rb~ -- Header detected. +- Inside source: true *** True Line Result +** Processing line: ~ # The methods below subdivide the task of drawing everything to the screen~ +- Inside source: true *** True Line Result -*** Performance - Collision Limits - main.rb -** Processing line: ~#+begin_src ruby~ -- Line was identified as the beginning of a code block. + # The methods below subdivide the task of drawing everything to the screen +** Processing line: ~~ +- Inside source: true *** True Line Result -*** True Line Result -#+begin_src ruby -** Processing line: ~ # ./samples/09_performance/07_collision_limits/app/main.rb~ +** Processing line: ~ # Draws the buttons that control the animation step and state~ - Inside source: true *** True Line Result - # ./samples/09_performance/07_collision_limits/app/main.rb -** Processing line: ~ =begin~ + # Draws the buttons that control the animation step and state +** Processing line: ~ def render_buttons~ - Inside source: true *** True Line Result - =begin -** Processing line: ~~ + def render_buttons +** Processing line: ~ render_left_button~ - Inside source: true *** True Line Result - -** Processing line: ~ Reminders:~ + render_left_button +** Processing line: ~ render_center_button~ - Inside source: true *** True Line Result - Reminders: -** Processing line: ~ - find_all: Finds all elements of a collection that meet certain requirements.~ + render_center_button +** Processing line: ~ render_right_button~ - Inside source: true *** True Line Result - - find_all: Finds all elements of a collection that meet certain requirements. -** Processing line: ~ In this sample app, we're finding all bodies that intersect with the center body.~ + render_right_button +** Processing line: ~ end~ - Inside source: true *** True Line Result - In this sample app, we're finding all bodies that intersect with the center body. + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ - args.outputs.solids: An array. The values generate a solid.~ +** Processing line: ~ # Draws the button which steps the search backward~ - Inside source: true *** True Line Result - - args.outputs.solids: An array. The values generate a solid. -** Processing line: ~ The parameters are [X, Y, WIDTH, HEIGHT, RED, GREEN, BLUE]~ + # Draws the button which steps the search backward +** Processing line: ~ # Shows the user where to click to move the search backward~ - Inside source: true *** True Line Result - The parameters are [X, Y, WIDTH, HEIGHT, RED, GREEN, BLUE] -** Processing line: ~ For more information about solids, go to mygame/documentation/03-solids-and-borders.md.~ + # Shows the user where to click to move the search backward +** Processing line: ~ def render_left_button~ - Inside source: true *** True Line Result - For more information about solids, go to mygame/documentation/03-solids-and-borders.md. -** Processing line: ~~ + def render_left_button +** Processing line: ~ # Draws the gray button, and a black border~ - Inside source: true *** True Line Result - -** Processing line: ~ - args.outputs.labels: An array. The values generate a label.~ + # Draws the gray button, and a black border +** Processing line: ~ # The border separates the buttons visually~ - Inside source: true *** True Line Result - - args.outputs.labels: An array. The values generate a label. -** Processing line: ~ The parameters are [X, Y, TEXT, SIZE, ALIGNMENT, RED, GREEN, BLUE, ALPHA, FONT STYLE]~ + # The border separates the buttons visually +** Processing line: ~ outputs.solids << [buttons.left, gray]~ - Inside source: true *** True Line Result - The parameters are [X, Y, TEXT, SIZE, ALIGNMENT, RED, GREEN, BLUE, ALPHA, FONT STYLE] -** Processing line: ~ For more information about labels, go to mygame/documentation/02-labels.md.~ + outputs.solids << [buttons.left, gray] +** Processing line: ~ outputs.borders << [buttons.left, black]~ - Inside source: true *** True Line Result - For more information about labels, go to mygame/documentation/02-labels.md. + outputs.borders << [buttons.left, black] ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ - ARRAY#intersect_rect?: Returns true or false depending on if two rectangles intersect.~ +** Processing line: ~ # Renders an explanatory label in the center of the button~ - Inside source: true *** True Line Result - - ARRAY#intersect_rect?: Returns true or false depending on if two rectangles intersect. -** Processing line: ~~ + # Renders an explanatory label in the center of the button +** Processing line: ~ # Explains to the user what the button does~ - Inside source: true *** True Line Result - -** Processing line: ~ =end~ + # Explains to the user what the button does +** Processing line: ~ # If the button size is changed, the label might need to be edited as well~ - Inside source: true *** True Line Result - =end -** Processing line: ~~ + # If the button size is changed, the label might need to be edited as well +** Processing line: ~ # to keep the label in the center of the button~ - Inside source: true *** True Line Result - -** Processing line: ~ # This code demonstrates moving objects that loop around once they exceed the scope of the screen,~ + # to keep the label in the center of the button +** Processing line: ~ label_x = buttons.left.x + 20~ - Inside source: true *** True Line Result - # This code demonstrates moving objects that loop around once they exceed the scope of the screen, -** Processing line: ~ # which has dimensions of 1280 by 720, and also detects collisions between objects called "bodies".~ + label_x = buttons.left.x + 20 +** Processing line: ~ label_y = buttons.left.y + 35~ - Inside source: true *** True Line Result - # which has dimensions of 1280 by 720, and also detects collisions between objects called "bodies". + label_y = buttons.left.y + 35 +** Processing line: ~ outputs.labels << [label_x, label_y, "<"]~ +- Inside source: true +*** True Line Result + outputs.labels << [label_x, label_y, "<"] +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def body_count num~ +** Processing line: ~ def render_center_button~ - Inside source: true *** True Line Result - def body_count num -** Processing line: ~ $gtk.args.state.other_bodies = num.map { [1280 * rand, 720 * rand, 10, 10] } # other_bodies set using num collection~ + def render_center_button +** Processing line: ~ # Draws the gray button, and a black border~ - Inside source: true *** True Line Result - $gtk.args.state.other_bodies = num.map { [1280 * rand, 720 * rand, 10, 10] } # other_bodies set using num collection -** Processing line: ~ end~ + # Draws the gray button, and a black border +** Processing line: ~ # The border separates the buttons visually~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + # The border separates the buttons visually +** Processing line: ~ outputs.solids << [buttons.center, gray]~ - Inside source: true *** True Line Result - -** Processing line: ~ def tick args~ + outputs.solids << [buttons.center, gray] +** Processing line: ~ outputs.borders << [buttons.center, black]~ - Inside source: true *** True Line Result - def tick args + outputs.borders << [buttons.center, black] ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Center body's values are set using an array~ -- Inside source: true -*** True Line Result - # Center body's values are set using an array -** Processing line: ~ # Map is used to set values of 2000 other bodies~ +** Processing line: ~ # Renders an explanatory label in the center of the button~ - Inside source: true *** True Line Result - # Map is used to set values of 2000 other bodies -** Processing line: ~ # All bodies that intersect with center body are stored in collisions collection~ + # Renders an explanatory label in the center of the button +** Processing line: ~ # Explains to the user what the button does~ - Inside source: true *** True Line Result - # All bodies that intersect with center body are stored in collisions collection -** Processing line: ~ args.state.center_body ||= [640 - 100, 360 - 100, 200, 200] # calculations done to place body in center~ + # Explains to the user what the button does +** Processing line: ~ # If the button size is changed, the label might need to be edited as well~ - Inside source: true *** True Line Result - args.state.center_body ||= [640 - 100, 360 - 100, 200, 200] # calculations done to place body in center -** Processing line: ~ args.state.other_bodies ||= 2000.map { [1280 * rand, 720 * rand, 10, 10] } # 2000 bodies given random position on screen~ + # If the button size is changed, the label might need to be edited as well +** Processing line: ~ # to keep the label in the center of the button~ - Inside source: true *** True Line Result - args.state.other_bodies ||= 2000.map { [1280 * rand, 720 * rand, 10, 10] } # 2000 bodies given random position on screen -** Processing line: ~~ + # to keep the label in the center of the button +** Processing line: ~ label_x = buttons.center.x + 37~ - Inside source: true *** True Line Result - -** Processing line: ~ # finds all bodies that intersect with center body, stores them in collisions~ + label_x = buttons.center.x + 37 +** Processing line: ~ label_y = buttons.center.y + 35~ - Inside source: true *** True Line Result - # finds all bodies that intersect with center body, stores them in collisions -** Processing line: ~ collisions = args.state.other_bodies.find_all { |b| b.intersect_rect? args.state.center_body }~ + label_y = buttons.center.y + 35 +** Processing line: ~ label_text = state.play ? "Pause Animation" : "Play Animation"~ - Inside source: true *** True Line Result - collisions = args.state.other_bodies.find_all { |b| b.intersect_rect? args.state.center_body } -** Processing line: ~~ + label_text = state.play ? "Pause Animation" : "Play Animation" +** Processing line: ~ outputs.labels << [label_x, label_y, label_text]~ - Inside source: true *** True Line Result - -** Processing line: ~ args.borders << args.state.center_body # outputs center body as a black border~ + outputs.labels << [label_x, label_y, label_text] +** Processing line: ~ end~ - Inside source: true *** True Line Result - args.borders << args.state.center_body # outputs center body as a black border + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # transparency changes based on number of collisions; the more collisions, the redder (more transparent) the box becomes~ +** Processing line: ~ def render_right_button~ - Inside source: true *** True Line Result - # transparency changes based on number of collisions; the more collisions, the redder (more transparent) the box becomes -** Processing line: ~ args.solids << [args.state.center_body, 255, 0, 0, collisions.length * 5] # center body is red solid~ + def render_right_button +** Processing line: ~ # Draws the gray button, and a black border~ - Inside source: true *** True Line Result - args.solids << [args.state.center_body, 255, 0, 0, collisions.length * 5] # center body is red solid -** Processing line: ~ args.solids << args.state.other_bodies # other bodies are output as (black) solids, as well~ + # Draws the gray button, and a black border +** Processing line: ~ # The border separates the buttons visually~ - Inside source: true *** True Line Result - args.solids << args.state.other_bodies # other bodies are output as (black) solids, as well -** Processing line: ~~ + # The border separates the buttons visually +** Processing line: ~ outputs.solids << [buttons.right, gray]~ - Inside source: true *** True Line Result - -** Processing line: ~ args.labels << [10, 30, args.gtk.current_framerate] # outputs frame rate in bottom left corner~ + outputs.solids << [buttons.right, gray] +** Processing line: ~ outputs.borders << [buttons.right, black]~ - Inside source: true *** True Line Result - args.labels << [10, 30, args.gtk.current_framerate] # outputs frame rate in bottom left corner + outputs.borders << [buttons.right, black] ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Bodies are returned to bottom left corner if positions exceed scope of screen~ -- Inside source: true -*** True Line Result - # Bodies are returned to bottom left corner if positions exceed scope of screen -** Processing line: ~ args.state.other_bodies.each do |b| # for each body in the other_bodies collection~ +** Processing line: ~ # Renders an explanatory label in the center of the button~ - Inside source: true *** True Line Result - args.state.other_bodies.each do |b| # for each body in the other_bodies collection -** Processing line: ~ b.x += 5 # x and y are both incremented by 5~ + # Renders an explanatory label in the center of the button +** Processing line: ~ # Explains to the user what the button does~ - Inside source: true *** True Line Result - b.x += 5 # x and y are both incremented by 5 -** Processing line: ~ b.y += 5~ + # Explains to the user what the button does +** Processing line: ~ label_x = buttons.right.x + 20~ - Inside source: true *** True Line Result - b.y += 5 -** Processing line: ~ b.x = 0 if b.x > 1280 # x becomes 0 if star exceeds scope of screen (goes too far right)~ + label_x = buttons.right.x + 20 +** Processing line: ~ label_y = buttons.right.y + 35~ - Inside source: true *** True Line Result - b.x = 0 if b.x > 1280 # x becomes 0 if star exceeds scope of screen (goes too far right) -** Processing line: ~ b.y = 0 if b.y > 720 # y becomes 0 if star exceeds scope of screen (goes too far up)~ + label_y = buttons.right.y + 35 +** Processing line: ~ outputs.labels << [label_x, label_y, ">"]~ - Inside source: true *** True Line Result - b.y = 0 if b.y > 720 # y becomes 0 if star exceeds scope of screen (goes too far up) + outputs.labels << [label_x, label_y, ">"] ** Processing line: ~ end~ - Inside source: true *** True Line Result end -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Resets the game.~ +** Processing line: ~ # Draws the slider so the user can move it and see the progress of the search~ - Inside source: true *** True Line Result - # Resets the game. -** Processing line: ~ $gtk.reset~ + # Draws the slider so the user can move it and see the progress of the search +** Processing line: ~ def render_slider~ - Inside source: true *** True Line Result - $gtk.reset -** Processing line: ~~ + def render_slider +** Processing line: ~ # Using primitives hides the line under the white circle of the slider~ - Inside source: true *** True Line Result - -** Processing line: ~#+end_src~ -- Line was identified as the end of a code block. -*** True Line Result -#+end_src -** Processing line: ~~ -- End of paragraph detected. -*** True Line Result - -** Processing line: ~*** Advanced Debugging - Trace Debugging - main.rb~ -- Header detected. -*** True Line Result - + # Using primitives hides the line under the white circle of the slider +** Processing line: ~ # Draws the line~ +- Inside source: true *** True Line Result -*** Advanced Debugging - Trace Debugging - main.rb -** Processing line: ~#+begin_src ruby~ -- Line was identified as the beginning of a code block. + # Draws the line +** Processing line: ~ outputs.primitives << [slider.x, slider.y, slider.x + slider.w, slider.y].line~ +- Inside source: true *** True Line Result - + outputs.primitives << [slider.x, slider.y, slider.x + slider.w, slider.y].line +** Processing line: ~ # The circle needs to be offset so that the center of the circle~ +- Inside source: true *** True Line Result -#+begin_src ruby -** Processing line: ~ # ./samples/10_advanced_debugging/01_trace_debugging/app/main.rb~ + # The circle needs to be offset so that the center of the circle +** Processing line: ~ # overlaps the line instead of the upper right corner of the circle~ - Inside source: true *** True Line Result - # ./samples/10_advanced_debugging/01_trace_debugging/app/main.rb -** Processing line: ~ class Game~ + # overlaps the line instead of the upper right corner of the circle +** Processing line: ~ # The circle's x value is also moved based on the current seach step~ - Inside source: true *** True Line Result - class Game -** Processing line: ~ attr_gtk~ + # The circle's x value is also moved based on the current seach step +** Processing line: ~ circle_x = (slider.x - slider.offset) + (state.anim_steps * slider.spacing)~ - Inside source: true *** True Line Result - attr_gtk -** Processing line: ~~ + circle_x = (slider.x - slider.offset) + (state.anim_steps * slider.spacing) +** Processing line: ~ circle_y = (slider.y - slider.offset)~ - Inside source: true *** True Line Result - -** Processing line: ~ def method1 num~ + circle_y = (slider.y - slider.offset) +** Processing line: ~ circle_rect = [circle_x, circle_y, 37, 37]~ - Inside source: true *** True Line Result - def method1 num -** Processing line: ~ method2 num~ + circle_rect = [circle_x, circle_y, 37, 37] +** Processing line: ~ outputs.primitives << [circle_rect, 'circle-white.png'].sprite~ - Inside source: true *** True Line Result - method2 num + outputs.primitives << [circle_rect, 'circle-white.png'].sprite ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -55444,14 +63967,22 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def method2 num~ +** Processing line: ~ # Draws what the grid looks like with nothing on it~ - Inside source: true *** True Line Result - def method2 num -** Processing line: ~ method3 num~ + # Draws what the grid looks like with nothing on it +** Processing line: ~ def render_background~ - Inside source: true *** True Line Result - method3 num + def render_background +** Processing line: ~ render_unvisited~ +- Inside source: true +*** True Line Result + render_unvisited +** Processing line: ~ render_grid_lines~ +- Inside source: true +*** True Line Result + render_grid_lines ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -55460,14 +63991,18 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def method3 num~ +** Processing line: ~ # Draws a rectangle the size of the entire grid to represent unvisited cells~ - Inside source: true *** True Line Result - def method3 num -** Processing line: ~ method4 num~ + # Draws a rectangle the size of the entire grid to represent unvisited cells +** Processing line: ~ def render_unvisited~ - Inside source: true *** True Line Result - method4 num + def render_unvisited +** Processing line: ~ outputs.solids << [scale_up([0, 0, grid.width, grid.height]), unvisited_color]~ +- Inside source: true +*** True Line Result + outputs.solids << [scale_up([0, 0, grid.width, grid.height]), unvisited_color] ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -55476,42 +64011,38 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def method4 num~ -- Inside source: true -*** True Line Result - def method4 num -** Processing line: ~ if num == 1~ +** Processing line: ~ # Draws grid lines to show the division of the grid into cells~ - Inside source: true *** True Line Result - if num == 1 -** Processing line: ~ puts "UNLUCKY #{num}."~ + # Draws grid lines to show the division of the grid into cells +** Processing line: ~ def render_grid_lines~ - Inside source: true *** True Line Result - puts "UNLUCKY #{num}." -** Processing line: ~ state.unlucky_count += 1~ + def render_grid_lines +** Processing line: ~ for x in 0..grid.width~ - Inside source: true *** True Line Result - state.unlucky_count += 1 -** Processing line: ~ if state.unlucky_count > 3~ + for x in 0..grid.width +** Processing line: ~ outputs.lines << vertical_line(x)~ - Inside source: true *** True Line Result - if state.unlucky_count > 3 -** Processing line: ~ raise "NAT 1 finally occurred. Check app/trace.txt for all method invocation history."~ + outputs.lines << vertical_line(x) +** Processing line: ~ end~ - Inside source: true *** True Line Result - raise "NAT 1 finally occurred. Check app/trace.txt for all method invocation history." -** Processing line: ~ end~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - end -** Processing line: ~ else~ + +** Processing line: ~ for y in 0..grid.height~ - Inside source: true *** True Line Result - else -** Processing line: ~ puts "LUCKY #{num}."~ + for y in 0..grid.height +** Processing line: ~ outputs.lines << horizontal_line(y)~ - Inside source: true *** True Line Result - puts "LUCKY #{num}." + outputs.lines << horizontal_line(y) ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -55524,150 +64055,126 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def tick~ +** Processing line: ~ # Easy way to draw vertical lines given an index~ - Inside source: true *** True Line Result - def tick -** Processing line: ~ state.roll_history ||= []~ + # Easy way to draw vertical lines given an index +** Processing line: ~ def vertical_line column~ - Inside source: true *** True Line Result - state.roll_history ||= [] -** Processing line: ~ state.roll_history << rand(20) + 1~ + def vertical_line column +** Processing line: ~ scale_up([column, 0, column, grid.height])~ - Inside source: true *** True Line Result - state.roll_history << rand(20) + 1 -** Processing line: ~ state.countdown ||= 600~ + scale_up([column, 0, column, grid.height]) +** Processing line: ~ end~ - Inside source: true *** True Line Result - state.countdown ||= 600 -** Processing line: ~ state.countdown -= 1~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - state.countdown -= 1 -** Processing line: ~ state.unlucky_count ||= 0~ + +** Processing line: ~ # Easy way to draw horizontal lines given an index~ - Inside source: true *** True Line Result - state.unlucky_count ||= 0 -** Processing line: ~ outputs.labels << [640, 360, "A dice roll of 1 will cause an exception.", 0, 1]~ + # Easy way to draw horizontal lines given an index +** Processing line: ~ def horizontal_line row~ - Inside source: true *** True Line Result - outputs.labels << [640, 360, "A dice roll of 1 will cause an exception.", 0, 1] -** Processing line: ~ if state.countdown > 0~ + def horizontal_line row +** Processing line: ~ scale_up([0, row, grid.width, row])~ - Inside source: true *** True Line Result - if state.countdown > 0 -** Processing line: ~ outputs.labels << [640, 340, "Dice roll countdown: #{state.countdown}", 0, 1]~ + scale_up([0, row, grid.width, row]) +** Processing line: ~ end~ - Inside source: true *** True Line Result - outputs.labels << [640, 340, "Dice roll countdown: #{state.countdown}", 0, 1] -** Processing line: ~ else~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - else -** Processing line: ~ state.attempts ||= 0~ + +** Processing line: ~ # Draws the area that is going to be searched from~ - Inside source: true *** True Line Result - state.attempts ||= 0 -** Processing line: ~ state.attempts += 1~ + # Draws the area that is going to be searched from +** Processing line: ~ # The frontier is the most outward parts of the search~ - Inside source: true *** True Line Result - state.attempts += 1 -** Processing line: ~ outputs.labels << [640, 340, "ROLLING! #{state.attempts}", 0, 1]~ + # The frontier is the most outward parts of the search +** Processing line: ~ def render_frontier~ - Inside source: true *** True Line Result - outputs.labels << [640, 340, "ROLLING! #{state.attempts}", 0, 1] -** Processing line: ~ end~ + def render_frontier +** Processing line: ~ outputs.solids << state.frontier.map do |cell|~ - Inside source: true *** True Line Result - end -** Processing line: ~ return if state.countdown > 0~ + outputs.solids << state.frontier.map do |cell| +** Processing line: ~ [scale_up([cell.x, cell.y]), frontier_color]~ - Inside source: true *** True Line Result - return if state.countdown > 0 -** Processing line: ~ method1 state.roll_history[-1]~ + [scale_up([cell.x, cell.y]), frontier_color] +** Processing line: ~ end~ - Inside source: true *** True Line Result - method1 state.roll_history[-1] + end ** Processing line: ~ end~ - Inside source: true *** True Line Result end -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ $game = Game.new~ -- Inside source: true -*** True Line Result - $game = Game.new -** Processing line: ~~ +** Processing line: ~ # Draws the walls~ - Inside source: true *** True Line Result - -** Processing line: ~ def tick args~ + # Draws the walls +** Processing line: ~ def render_walls~ - Inside source: true *** True Line Result - def tick args -** Processing line: ~ trace! $game # <------------------- TRACING ENABLED FOR THIS OBJECT~ + def render_walls +** Processing line: ~ outputs.solids << state.walls.map do |wall|~ - Inside source: true *** True Line Result - trace! $game # <------------------- TRACING ENABLED FOR THIS OBJECT -** Processing line: ~ $game.args = args~ + outputs.solids << state.walls.map do |wall| +** Processing line: ~ [scale_up([wall.x, wall.y]), wall_color]~ - Inside source: true *** True Line Result - $game.args = args -** Processing line: ~ $game.tick~ + [scale_up([wall.x, wall.y]), wall_color] +** Processing line: ~ end~ - Inside source: true *** True Line Result - $game.tick -** Processing line: ~ end~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - end + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~#+end_src~ -- Line was identified as the end of a code block. -*** True Line Result -#+end_src -** Processing line: ~~ -- End of paragraph detected. -*** True Line Result - -** Processing line: ~*** Advanced Debugging - Trace Debugging Classes - main.rb~ -- Header detected. -*** True Line Result - -*** True Line Result -*** Advanced Debugging - Trace Debugging Classes - main.rb -** Processing line: ~#+begin_src ruby~ -- Line was identified as the beginning of a code block. -*** True Line Result - +** Processing line: ~ # Renders cells that have been searched in the appropriate color~ +- Inside source: true *** True Line Result -#+begin_src ruby -** Processing line: ~ # ./samples/10_advanced_debugging/02_trace_debugging_classes/app/main.rb~ + # Renders cells that have been searched in the appropriate color +** Processing line: ~ def render_visited~ - Inside source: true *** True Line Result - # ./samples/10_advanced_debugging/02_trace_debugging_classes/app/main.rb -** Processing line: ~ class Foobar~ + def render_visited +** Processing line: ~ outputs.solids << state.visited.map do |cell|~ - Inside source: true *** True Line Result - class Foobar -** Processing line: ~ def initialize~ + outputs.solids << state.visited.map do |cell| +** Processing line: ~ [scale_up([cell.x, cell.y]), visited_color]~ - Inside source: true *** True Line Result - def initialize -** Processing line: ~ trace! # Trace is added to the constructor.~ + [scale_up([cell.x, cell.y]), visited_color] +** Processing line: ~ end~ - Inside source: true *** True Line Result - trace! # Trace is added to the constructor. + end ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -55676,18 +64183,18 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def clicky args~ +** Processing line: ~ # Renders the star~ - Inside source: true *** True Line Result - def clicky args -** Processing line: ~ return unless args.inputs.mouse.click~ + # Renders the star +** Processing line: ~ def render_star~ - Inside source: true *** True Line Result - return unless args.inputs.mouse.click -** Processing line: ~ try_rand rand~ + def render_star +** Processing line: ~ outputs.sprites << [scale_up(state.star), 'star.png']~ - Inside source: true *** True Line Result - try_rand rand + outputs.sprites << [scale_up(state.star), 'star.png'] ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -55696,998 +64203,986 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def try_rand num~ +** Processing line: ~ # In code, the cells are represented as 1x1 rectangles~ - Inside source: true *** True Line Result - def try_rand num -** Processing line: ~ return if num < 0.9~ + # In code, the cells are represented as 1x1 rectangles +** Processing line: ~ # When drawn, the cells are larger than 1x1 rectangles~ - Inside source: true *** True Line Result - return if num < 0.9 -** Processing line: ~ raise "Exception finally occurred. Take a look at logs/trace.txt #{num}."~ + # When drawn, the cells are larger than 1x1 rectangles +** Processing line: ~ # This method is used to scale up cells, and lines~ - Inside source: true *** True Line Result - raise "Exception finally occurred. Take a look at logs/trace.txt #{num}." -** Processing line: ~ end~ + # This method is used to scale up cells, and lines +** Processing line: ~ # Objects are scaled up according to the grid.cell_size variable~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + # Objects are scaled up according to the grid.cell_size variable +** Processing line: ~ # This allows for easy customization of the visual scale of the grid~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + # This allows for easy customization of the visual scale of the grid +** Processing line: ~ def scale_up(cell)~ - Inside source: true *** True Line Result - -** Processing line: ~ def tick args~ + def scale_up(cell) +** Processing line: ~ # Prevents the original value of cell from being edited~ - Inside source: true *** True Line Result - def tick args -** Processing line: ~ args.labels << [640, 360, "Start clicking. Eventually an exception will be thrown. Then look at logs/trace.txt.", 0, 1]~ + # Prevents the original value of cell from being edited +** Processing line: ~ cell = cell.clone~ - Inside source: true *** True Line Result - args.labels << [640, 360, "Start clicking. Eventually an exception will be thrown. Then look at logs/trace.txt.", 0, 1] -** Processing line: ~ args.state.foobar = Foobar.new if args.tick_count~ + cell = cell.clone +** Processing line: ~~ - Inside source: true *** True Line Result - args.state.foobar = Foobar.new if args.tick_count -** Processing line: ~ return unless args.state.foobar~ + +** Processing line: ~ # If cell is just an x and y coordinate~ - Inside source: true *** True Line Result - return unless args.state.foobar -** Processing line: ~ args.state.foobar.clicky args~ + # If cell is just an x and y coordinate +** Processing line: ~ if cell.size == 2~ - Inside source: true *** True Line Result - args.state.foobar.clicky args -** Processing line: ~ end~ + if cell.size == 2 +** Processing line: ~ # Add a width and height of 1~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + # Add a width and height of 1 +** Processing line: ~ cell << 1~ - Inside source: true *** True Line Result - -** Processing line: ~#+end_src~ -- Line was identified as the end of a code block. -*** True Line Result -#+end_src -** Processing line: ~~ -- End of paragraph detected. -*** True Line Result - -** Processing line: ~*** Advanced Debugging - Unit Tests - exception_raising_tests.rb~ -- Header detected. -*** True Line Result - -*** True Line Result -*** Advanced Debugging - Unit Tests - exception_raising_tests.rb -** Processing line: ~#+begin_src ruby~ -- Line was identified as the beginning of a code block. + cell << 1 +** Processing line: ~ cell << 1~ +- Inside source: true *** True Line Result - + cell << 1 +** Processing line: ~ end~ +- Inside source: true *** True Line Result -#+begin_src ruby -** Processing line: ~ # ./samples/10_advanced_debugging/03_unit_tests/exception_raising_tests.rb~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - # ./samples/10_advanced_debugging/03_unit_tests/exception_raising_tests.rb -** Processing line: ~ begin :shared~ + +** Processing line: ~ # Scale all the values up~ - Inside source: true *** True Line Result - begin :shared -** Processing line: ~ class ExceptionalClass~ + # Scale all the values up +** Processing line: ~ cell.map! { |value| value * grid.cell_size }~ - Inside source: true *** True Line Result - class ExceptionalClass -** Processing line: ~ def initialize exception_to_throw = nil~ + cell.map! { |value| value * grid.cell_size } +** Processing line: ~~ - Inside source: true *** True Line Result - def initialize exception_to_throw = nil -** Processing line: ~ raise exception_to_throw if exception_to_throw~ + +** Processing line: ~ # Returns the scaled up cell~ - Inside source: true *** True Line Result - raise exception_to_throw if exception_to_throw -** Processing line: ~ end~ + # Returns the scaled up cell +** Processing line: ~ cell~ - Inside source: true *** True Line Result - end + cell ** Processing line: ~ end~ - Inside source: true *** True Line Result end -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def test_exception_in_newing_object args, assert~ +** Processing line: ~ # This method processes user input every tick~ - Inside source: true *** True Line Result - def test_exception_in_newing_object args, assert -** Processing line: ~ begin~ + # This method processes user input every tick +** Processing line: ~ # This method allows the user to use the buttons, slider, and edit the grid~ - Inside source: true *** True Line Result - begin -** Processing line: ~ ExceptionalClass.new TypeError~ + # This method allows the user to use the buttons, slider, and edit the grid +** Processing line: ~ # There are 2 types of input:~ - Inside source: true *** True Line Result - ExceptionalClass.new TypeError -** Processing line: ~ raise "Exception wasn't thrown!"~ + # There are 2 types of input: +** Processing line: ~ # Button Input~ - Inside source: true *** True Line Result - raise "Exception wasn't thrown!" -** Processing line: ~ rescue Exception => e~ + # Button Input +** Processing line: ~ # Click and Drag Input~ - Inside source: true *** True Line Result - rescue Exception => e -** Processing line: ~ assert.equal! e.class, TypeError, "Exceptions within constructor should be retained."~ + # Click and Drag Input +** Processing line: ~ #~ - Inside source: true *** True Line Result - assert.equal! e.class, TypeError, "Exceptions within constructor should be retained." -** Processing line: ~ end~ + # +** Processing line: ~ # Button Input is used for the backward step and forward step buttons~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + # Button Input is used for the backward step and forward step buttons +** Processing line: ~ # Input is detected by mouse up within the bounds of the rect~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + # Input is detected by mouse up within the bounds of the rect +** Processing line: ~ #~ - Inside source: true *** True Line Result - -** Processing line: ~ $gtk.reset 100~ + # +** Processing line: ~ # Click and Drag Input is used for moving the star, adding walls,~ - Inside source: true *** True Line Result - $gtk.reset 100 -** Processing line: ~ $gtk.log_level = :off~ + # Click and Drag Input is used for moving the star, adding walls, +** Processing line: ~ # removing walls, and the slider~ - Inside source: true *** True Line Result - $gtk.log_level = :off -** Processing line: ~~ + # removing walls, and the slider +** Processing line: ~ #~ - Inside source: true *** True Line Result - -** Processing line: ~#+end_src~ -- Line was identified as the end of a code block. -*** True Line Result -#+end_src -** Processing line: ~~ -- End of paragraph detected. -*** True Line Result - -** Processing line: ~*** Advanced Debugging - Unit Tests - fn_tests.rb~ -- Header detected. -*** True Line Result - -*** True Line Result -*** Advanced Debugging - Unit Tests - fn_tests.rb -** Processing line: ~#+begin_src ruby~ -- Line was identified as the beginning of a code block. -*** True Line Result - + # +** Processing line: ~ # When the mouse is down on the star, the click_and_drag variable is set to :star~ +- Inside source: true *** True Line Result -#+begin_src ruby -** Processing line: ~ # ./samples/10_advanced_debugging/03_unit_tests/fn_tests.rb~ + # When the mouse is down on the star, the click_and_drag variable is set to :star +** Processing line: ~ # While click_and_drag equals :star, the cursor's position is used to calculate the~ - Inside source: true *** True Line Result - # ./samples/10_advanced_debugging/03_unit_tests/fn_tests.rb -** Processing line: ~ def infinity~ + # While click_and_drag equals :star, the cursor's position is used to calculate the +** Processing line: ~ # appropriate drag behavior~ - Inside source: true *** True Line Result - def infinity -** Processing line: ~ 1 / 0~ + # appropriate drag behavior +** Processing line: ~ #~ - Inside source: true *** True Line Result - 1 / 0 -** Processing line: ~ end~ + # +** Processing line: ~ # When the mouse goes up click_and_drag is set to :none~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + # When the mouse goes up click_and_drag is set to :none +** Processing line: ~ #~ - Inside source: true *** True Line Result - -** Processing line: ~ def neg_infinity~ + # +** Processing line: ~ # A variable has to be used because the star has to continue being edited even~ - Inside source: true *** True Line Result - def neg_infinity -** Processing line: ~ -1 / 0~ + # A variable has to be used because the star has to continue being edited even +** Processing line: ~ # when the cursor is no longer over the star~ - Inside source: true *** True Line Result - -1 / 0 -** Processing line: ~ end~ + # when the cursor is no longer over the star +** Processing line: ~ #~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + # +** Processing line: ~ # Similar things occur for the other Click and Drag inputs~ - Inside source: true *** True Line Result - -** Processing line: ~ def nan~ + # Similar things occur for the other Click and Drag inputs +** Processing line: ~ def input~ - Inside source: true *** True Line Result - def nan -** Processing line: ~ 0.0 / 0~ + def input +** Processing line: ~ # Checks whether any of the buttons are being clicked~ - Inside source: true *** True Line Result - 0.0 / 0 -** Processing line: ~ end~ + # Checks whether any of the buttons are being clicked +** Processing line: ~ input_buttons~ - Inside source: true *** True Line Result - end + input_buttons ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def test_add args, assert~ +** Processing line: ~ # The detection and processing of click and drag inputs are separate~ - Inside source: true *** True Line Result - def test_add args, assert -** Processing line: ~ assert.equal! (args.fn.add), 0~ + # The detection and processing of click and drag inputs are separate +** Processing line: ~ # The program has to remember that the user is dragging an object~ - Inside source: true *** True Line Result - assert.equal! (args.fn.add), 0 -** Processing line: ~ assert.equal! (args.fn.+), 0~ + # The program has to remember that the user is dragging an object +** Processing line: ~ # even when the mouse is no longer over that object~ - Inside source: true *** True Line Result - assert.equal! (args.fn.+), 0 -** Processing line: ~ assert.equal! (args.fn.+ 1, 2, 3), 6~ + # even when the mouse is no longer over that object +** Processing line: ~ detect_click_and_drag~ - Inside source: true *** True Line Result - assert.equal! (args.fn.+ 1, 2, 3), 6 -** Processing line: ~ assert.equal! (args.fn.+ 0), 0~ + detect_click_and_drag +** Processing line: ~ process_click_and_drag~ - Inside source: true *** True Line Result - assert.equal! (args.fn.+ 0), 0 -** Processing line: ~ assert.equal! (args.fn.+ 0, nil), 0~ + process_click_and_drag +** Processing line: ~ end~ - Inside source: true *** True Line Result - assert.equal! (args.fn.+ 0, nil), 0 -** Processing line: ~ assert.equal! (args.fn.+ 0, nan), nil~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - assert.equal! (args.fn.+ 0, nan), nil -** Processing line: ~ assert.equal! (args.fn.+ 0, nil, infinity), nil~ + +** Processing line: ~ # Detects and Process input for each button~ - Inside source: true *** True Line Result - assert.equal! (args.fn.+ 0, nil, infinity), nil -** Processing line: ~ assert.equal! (args.fn.+ [1, 2, 3, [4, 5, 6]]), 21~ + # Detects and Process input for each button +** Processing line: ~ def input_buttons~ - Inside source: true *** True Line Result - assert.equal! (args.fn.+ [1, 2, 3, [4, 5, 6]]), 21 -** Processing line: ~ assert.equal! (args.fn.+ [nil, [4, 5, 6]]), 15~ + def input_buttons +** Processing line: ~ input_left_button~ - Inside source: true *** True Line Result - assert.equal! (args.fn.+ [nil, [4, 5, 6]]), 15 -** Processing line: ~ end~ + input_left_button +** Processing line: ~ input_center_button~ - Inside source: true *** True Line Result - end + input_center_button +** Processing line: ~ input_next_step_button~ +- Inside source: true +*** True Line Result + input_next_step_button +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def test_sub args, assert~ +** Processing line: ~ # Checks if the previous step button is clicked~ - Inside source: true *** True Line Result - def test_sub args, assert -** Processing line: ~ neg_infinity = infinity * -1~ + # Checks if the previous step button is clicked +** Processing line: ~ # If it is, it pauses the animation and moves the search one step backward~ - Inside source: true *** True Line Result - neg_infinity = infinity * -1 -** Processing line: ~ assert.equal! (args.fn.+), 0~ + # If it is, it pauses the animation and moves the search one step backward +** Processing line: ~ def input_left_button~ - Inside source: true *** True Line Result - assert.equal! (args.fn.+), 0 -** Processing line: ~ assert.equal! (args.fn.- 1, 2, 3), -4~ + def input_left_button +** Processing line: ~ if left_button_clicked?~ - Inside source: true *** True Line Result - assert.equal! (args.fn.- 1, 2, 3), -4 -** Processing line: ~ assert.equal! (args.fn.- 4), -4~ + if left_button_clicked? +** Processing line: ~ state.play = false~ - Inside source: true *** True Line Result - assert.equal! (args.fn.- 4), -4 -** Processing line: ~ assert.equal! (args.fn.- 4, nan), nil~ + state.play = false +** Processing line: ~ state.anim_steps -= 1~ - Inside source: true *** True Line Result - assert.equal! (args.fn.- 4, nan), nil -** Processing line: ~ assert.equal! (args.fn.- 0, nil), 0~ + state.anim_steps -= 1 +** Processing line: ~ recalculate~ - Inside source: true *** True Line Result - assert.equal! (args.fn.- 0, nil), 0 -** Processing line: ~ assert.equal! (args.fn.- 0, nil, infinity), nil~ + recalculate +** Processing line: ~ end~ - Inside source: true *** True Line Result - assert.equal! (args.fn.- 0, nil, infinity), nil -** Processing line: ~ assert.equal! (args.fn.- [0, 1, 2, 3, [4, 5, 6]]), -21~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - assert.equal! (args.fn.- [0, 1, 2, 3, [4, 5, 6]]), -21 -** Processing line: ~ assert.equal! (args.fn.- [nil, 0, [4, 5, 6]]), -15~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - assert.equal! (args.fn.- [nil, 0, [4, 5, 6]]), -15 -** Processing line: ~ end~ + +** Processing line: ~ # Controls the play/pause button~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + # Controls the play/pause button +** Processing line: ~ # Inverses whether the animation is playing or not when clicked~ - Inside source: true *** True Line Result - -** Processing line: ~ def test_div args, assert~ + # Inverses whether the animation is playing or not when clicked +** Processing line: ~ def input_center_button~ - Inside source: true *** True Line Result - def test_div args, assert -** Processing line: ~ assert.equal! (args.fn.div), 1~ + def input_center_button +** Processing line: ~ if center_button_clicked? or inputs.keyboard.key_down.space~ - Inside source: true *** True Line Result - assert.equal! (args.fn.div), 1 -** Processing line: ~ assert.equal! (args.fn./), 1~ + if center_button_clicked? or inputs.keyboard.key_down.space +** Processing line: ~ state.play = !state.play~ - Inside source: true *** True Line Result - assert.equal! (args.fn./), 1 -** Processing line: ~ assert.equal! (args.fn./ 6, 3), 2~ + state.play = !state.play +** Processing line: ~ end~ - Inside source: true *** True Line Result - assert.equal! (args.fn./ 6, 3), 2 -** Processing line: ~ assert.equal! (args.fn./ 6, infinity), nil~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - assert.equal! (args.fn./ 6, infinity), nil -** Processing line: ~ assert.equal! (args.fn./ 6, nan), nil~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - assert.equal! (args.fn./ 6, nan), nil -** Processing line: ~ assert.equal! (args.fn./ infinity), nil~ + +** Processing line: ~ # Checks if the next step button is clicked~ - Inside source: true *** True Line Result - assert.equal! (args.fn./ infinity), nil -** Processing line: ~ assert.equal! (args.fn./ 0), nil~ + # Checks if the next step button is clicked +** Processing line: ~ # If it is, it pauses the animation and moves the search one step forward~ - Inside source: true *** True Line Result - assert.equal! (args.fn./ 0), nil -** Processing line: ~ assert.equal! (args.fn./ 6, [3]), 2~ + # If it is, it pauses the animation and moves the search one step forward +** Processing line: ~ def input_next_step_button~ - Inside source: true *** True Line Result - assert.equal! (args.fn./ 6, [3]), 2 -** Processing line: ~ end~ + def input_next_step_button +** Processing line: ~ if right_button_clicked?~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + if right_button_clicked? +** Processing line: ~ state.play = false~ - Inside source: true *** True Line Result - -** Processing line: ~ def test_idiv args, assert~ + state.play = false +** Processing line: ~ state.anim_steps += 1~ - Inside source: true *** True Line Result - def test_idiv args, assert -** Processing line: ~ assert.equal! (args.fn.idiv), 1~ + state.anim_steps += 1 +** Processing line: ~ calc~ - Inside source: true *** True Line Result - assert.equal! (args.fn.idiv), 1 -** Processing line: ~ assert.equal! (args.fn.idiv 7, 3), 2~ + calc +** Processing line: ~ end~ - Inside source: true *** True Line Result - assert.equal! (args.fn.idiv 7, 3), 2 -** Processing line: ~ assert.equal! (args.fn.idiv 6, infinity), nil~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - assert.equal! (args.fn.idiv 6, infinity), nil -** Processing line: ~ assert.equal! (args.fn.idiv 6, nan), nil~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - assert.equal! (args.fn.idiv 6, nan), nil -** Processing line: ~ assert.equal! (args.fn.idiv infinity), nil~ + +** Processing line: ~ # Determines what the user is editing and stores the value~ - Inside source: true *** True Line Result - assert.equal! (args.fn.idiv infinity), nil -** Processing line: ~ assert.equal! (args.fn.idiv 0), nil~ + # Determines what the user is editing and stores the value +** Processing line: ~ # Storing the value allows the user to continue the same edit as long as the~ - Inside source: true *** True Line Result - assert.equal! (args.fn.idiv 0), nil -** Processing line: ~ assert.equal! (args.fn.idiv 7, [3]), 2~ + # Storing the value allows the user to continue the same edit as long as the +** Processing line: ~ # mouse left click is held~ - Inside source: true *** True Line Result - assert.equal! (args.fn.idiv 7, [3]), 2 -** Processing line: ~ end~ + # mouse left click is held +** Processing line: ~ def detect_click_and_drag~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + def detect_click_and_drag +** Processing line: ~ if inputs.mouse.up~ - Inside source: true *** True Line Result - -** Processing line: ~ def test_mul args, assert~ + if inputs.mouse.up +** Processing line: ~ state.click_and_drag = :none~ - Inside source: true *** True Line Result - def test_mul args, assert -** Processing line: ~ assert.equal! (args.fn.mul), 1~ + state.click_and_drag = :none +** Processing line: ~ elsif star_clicked?~ - Inside source: true *** True Line Result - assert.equal! (args.fn.mul), 1 -** Processing line: ~ assert.equal! (args.fn.*), 1~ + elsif star_clicked? +** Processing line: ~ state.click_and_drag = :star~ - Inside source: true *** True Line Result - assert.equal! (args.fn.*), 1 -** Processing line: ~ assert.equal! (args.fn.* 7, 3), 21~ + state.click_and_drag = :star +** Processing line: ~ elsif wall_clicked?~ - Inside source: true *** True Line Result - assert.equal! (args.fn.* 7, 3), 21 -** Processing line: ~ assert.equal! (args.fn.* 6, nan), nil~ + elsif wall_clicked? +** Processing line: ~ state.click_and_drag = :remove_wall~ - Inside source: true *** True Line Result - assert.equal! (args.fn.* 6, nan), nil -** Processing line: ~ assert.equal! (args.fn.* 6, infinity), nil~ + state.click_and_drag = :remove_wall +** Processing line: ~ elsif grid_clicked?~ - Inside source: true *** True Line Result - assert.equal! (args.fn.* 6, infinity), nil -** Processing line: ~ assert.equal! (args.fn.* infinity), nil~ + elsif grid_clicked? +** Processing line: ~ state.click_and_drag = :add_wall~ - Inside source: true *** True Line Result - assert.equal! (args.fn.* infinity), nil -** Processing line: ~ assert.equal! (args.fn.* 0), 0~ + state.click_and_drag = :add_wall +** Processing line: ~ elsif slider_clicked?~ - Inside source: true *** True Line Result - assert.equal! (args.fn.* 0), 0 -** Processing line: ~ assert.equal! (args.fn.* 7, [3]), 21~ + elsif slider_clicked? +** Processing line: ~ state.click_and_drag = :slider~ - Inside source: true *** True Line Result - assert.equal! (args.fn.* 7, [3]), 21 -** Processing line: ~ end~ + state.click_and_drag = :slider +** Processing line: ~ end~ - Inside source: true *** True Line Result - end + end +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def test_lt args, assert~ +** Processing line: ~ # Processes click and drag based on what the user is currently dragging~ - Inside source: true *** True Line Result - def test_lt args, assert -** Processing line: ~ assert.equal! (args.fn.lt 1), 1~ + # Processes click and drag based on what the user is currently dragging +** Processing line: ~ def process_click_and_drag~ - Inside source: true *** True Line Result - assert.equal! (args.fn.lt 1), 1 -** Processing line: ~ assert.equal! (args.fn.lt), nil~ + def process_click_and_drag +** Processing line: ~ if state.click_and_drag == :star~ - Inside source: true *** True Line Result - assert.equal! (args.fn.lt), nil -** Processing line: ~ assert.equal! (args.fn.lt infinity), nil~ + if state.click_and_drag == :star +** Processing line: ~ input_star~ - Inside source: true *** True Line Result - assert.equal! (args.fn.lt infinity), nil -** Processing line: ~ assert.equal! (args.fn.lt nan), nil~ + input_star +** Processing line: ~ elsif state.click_and_drag == :remove_wall~ - Inside source: true *** True Line Result - assert.equal! (args.fn.lt nan), nil -** Processing line: ~ assert.equal! (args.fn.lt 10, 9, 8), 8~ + elsif state.click_and_drag == :remove_wall +** Processing line: ~ input_remove_wall~ - Inside source: true *** True Line Result - assert.equal! (args.fn.lt 10, 9, 8), 8 -** Processing line: ~ assert.equal! (args.fn.< 10, 9, 8), 8~ + input_remove_wall +** Processing line: ~ elsif state.click_and_drag == :add_wall~ - Inside source: true *** True Line Result - assert.equal! (args.fn.< 10, 9, 8), 8 -** Processing line: ~ assert.equal! (args.fn.< [10, 9, [8]]), 8~ + elsif state.click_and_drag == :add_wall +** Processing line: ~ input_add_wall~ - Inside source: true *** True Line Result - assert.equal! (args.fn.< [10, 9, [8]]), 8 -** Processing line: ~ assert.equal! (args.fn.< 10, 10), nil~ + input_add_wall +** Processing line: ~ elsif state.click_and_drag == :slider~ - Inside source: true *** True Line Result - assert.equal! (args.fn.< 10, 10), nil -** Processing line: ~ end~ + elsif state.click_and_drag == :slider +** Processing line: ~ input_slider~ - Inside source: true *** True Line Result - end + input_slider +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def test_lte args, assert~ +** Processing line: ~ # Moves the star to the grid closest to the mouse~ - Inside source: true *** True Line Result - def test_lte args, assert -** Processing line: ~ assert.equal! (args.fn.lte 1), 1~ + # Moves the star to the grid closest to the mouse +** Processing line: ~ # Only recalculates the search if the star changes position~ - Inside source: true *** True Line Result - assert.equal! (args.fn.lte 1), 1 -** Processing line: ~ assert.equal! (args.fn.lte), nil~ + # Only recalculates the search if the star changes position +** Processing line: ~ # Called whenever the user is editing the star (puts mouse down on star)~ - Inside source: true *** True Line Result - assert.equal! (args.fn.lte), nil -** Processing line: ~ assert.equal! (args.fn.lte infinity), nil~ + # Called whenever the user is editing the star (puts mouse down on star) +** Processing line: ~ def input_star~ - Inside source: true *** True Line Result - assert.equal! (args.fn.lte infinity), nil -** Processing line: ~ assert.equal! (args.fn.lte nan), nil~ + def input_star +** Processing line: ~ old_star = state.star.clone~ - Inside source: true *** True Line Result - assert.equal! (args.fn.lte nan), nil -** Processing line: ~ assert.equal! (args.fn.lte 10, 9, 8), 8~ + old_star = state.star.clone +** Processing line: ~ state.star = cell_closest_to_mouse~ - Inside source: true *** True Line Result - assert.equal! (args.fn.lte 10, 9, 8), 8 -** Processing line: ~ assert.equal! (args.fn.lte 10, 10), 10~ + state.star = cell_closest_to_mouse +** Processing line: ~ unless old_star == state.star~ - Inside source: true *** True Line Result - assert.equal! (args.fn.lte 10, 10), 10 -** Processing line: ~ assert.equal! (args.fn.lte 10, 9, [8]), 8~ + unless old_star == state.star +** Processing line: ~ recalculate~ - Inside source: true *** True Line Result - assert.equal! (args.fn.lte 10, 9, [8]), 8 -** Processing line: ~ assert.equal! (args.fn.<= 10, 9, 8), 8~ + recalculate +** Processing line: ~ end~ - Inside source: true *** True Line Result - assert.equal! (args.fn.<= 10, 9, 8), 8 -** Processing line: ~ end~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - end + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def test_gt args, assert~ +** Processing line: ~ # Removes walls that are under the cursor~ - Inside source: true *** True Line Result - def test_gt args, assert -** Processing line: ~ assert.equal! (args.fn.gt 1), 1~ + # Removes walls that are under the cursor +** Processing line: ~ def input_remove_wall~ - Inside source: true *** True Line Result - assert.equal! (args.fn.gt 1), 1 -** Processing line: ~ assert.equal! (args.fn.gt), nil~ + def input_remove_wall +** Processing line: ~ # The mouse needs to be inside the grid, because we only want to remove walls~ - Inside source: true *** True Line Result - assert.equal! (args.fn.gt), nil -** Processing line: ~ assert.equal! (args.fn.gt infinity), nil~ + # The mouse needs to be inside the grid, because we only want to remove walls +** Processing line: ~ # the cursor is directly over~ - Inside source: true *** True Line Result - assert.equal! (args.fn.gt infinity), nil -** Processing line: ~ assert.equal! (args.fn.gt nan), nil~ + # the cursor is directly over +** Processing line: ~ # Recalculations should only occur when a wall is actually deleted~ - Inside source: true *** True Line Result - assert.equal! (args.fn.gt nan), nil -** Processing line: ~ assert.equal! (args.fn.gt 8, 9, 10), 10~ + # Recalculations should only occur when a wall is actually deleted +** Processing line: ~ if mouse_inside_grid?~ - Inside source: true *** True Line Result - assert.equal! (args.fn.gt 8, 9, 10), 10 -** Processing line: ~ assert.equal! (args.fn.gt [8, 9, [10]]), 10~ + if mouse_inside_grid? +** Processing line: ~ if state.walls.has_key?(cell_closest_to_mouse)~ - Inside source: true *** True Line Result - assert.equal! (args.fn.gt [8, 9, [10]]), 10 -** Processing line: ~ assert.equal! (args.fn.gt 10, 10), nil~ + if state.walls.has_key?(cell_closest_to_mouse) +** Processing line: ~ state.walls.delete(cell_closest_to_mouse)~ - Inside source: true *** True Line Result - assert.equal! (args.fn.gt 10, 10), nil -** Processing line: ~ assert.equal! (args.fn.gt 10, 10), nil~ + state.walls.delete(cell_closest_to_mouse) +** Processing line: ~ recalculate~ - Inside source: true *** True Line Result - assert.equal! (args.fn.gt 10, 10), nil -** Processing line: ~ assert.equal! (args.fn.gt 10, 9), nil~ + recalculate +** Processing line: ~ end~ - Inside source: true *** True Line Result - assert.equal! (args.fn.gt 10, 9), nil -** Processing line: ~ assert.equal! (args.fn.> 8, 9, 10), 10~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - assert.equal! (args.fn.> 8, 9, 10), 10 -** Processing line: ~ end~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - end + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def test_gte args, assert~ -- Inside source: true -*** True Line Result - def test_gte args, assert -** Processing line: ~ assert.equal! (args.fn.gte 1), 1~ -- Inside source: true -*** True Line Result - assert.equal! (args.fn.gte 1), 1 -** Processing line: ~ assert.equal! (args.fn.gte), nil~ -- Inside source: true -*** True Line Result - assert.equal! (args.fn.gte), nil -** Processing line: ~ assert.equal! (args.fn.gte infinity), nil~ +** Processing line: ~ # Adds walls at cells under the cursor~ - Inside source: true *** True Line Result - assert.equal! (args.fn.gte infinity), nil -** Processing line: ~ assert.equal! (args.fn.gte nan), nil~ + # Adds walls at cells under the cursor +** Processing line: ~ def input_add_wall~ - Inside source: true *** True Line Result - assert.equal! (args.fn.gte nan), nil -** Processing line: ~ assert.equal! (args.fn.gte 8, 9, 10), 10~ + def input_add_wall +** Processing line: ~ if mouse_inside_grid?~ - Inside source: true *** True Line Result - assert.equal! (args.fn.gte 8, 9, 10), 10 -** Processing line: ~ assert.equal! (args.fn.gte 10, 10), 10~ + if mouse_inside_grid? +** Processing line: ~ unless state.walls.has_key?(cell_closest_to_mouse)~ - Inside source: true *** True Line Result - assert.equal! (args.fn.gte 10, 10), 10 -** Processing line: ~ assert.equal! (args.fn.gte 8, 9, [10]), 10~ + unless state.walls.has_key?(cell_closest_to_mouse) +** Processing line: ~ state.walls[cell_closest_to_mouse] = true~ - Inside source: true *** True Line Result - assert.equal! (args.fn.gte 8, 9, [10]), 10 -** Processing line: ~ assert.equal! (args.fn.gte 10, 9), nil~ + state.walls[cell_closest_to_mouse] = true +** Processing line: ~ recalculate~ - Inside source: true *** True Line Result - assert.equal! (args.fn.gte 10, 9), nil -** Processing line: ~ assert.equal! (args.fn.>= 8, 9, 10), 10~ + recalculate +** Processing line: ~ end~ - Inside source: true *** True Line Result - assert.equal! (args.fn.>= 8, 9, 10), 10 -** Processing line: ~ end~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def test_acopy args, assert~ +** Processing line: ~ # This method is called when the user is editing the slider~ - Inside source: true *** True Line Result - def test_acopy args, assert -** Processing line: ~ orig = [1, 2, 3]~ + # This method is called when the user is editing the slider +** Processing line: ~ # It pauses the animation and moves the white circle to the closest integer point~ - Inside source: true *** True Line Result - orig = [1, 2, 3] -** Processing line: ~ clone = args.fn.acopy orig~ + # It pauses the animation and moves the white circle to the closest integer point +** Processing line: ~ # on the slider~ - Inside source: true *** True Line Result - clone = args.fn.acopy orig -** Processing line: ~ assert.equal! clone, [1, 2, 3]~ + # on the slider +** Processing line: ~ # Changes the step of the search to be animated~ - Inside source: true *** True Line Result - assert.equal! clone, [1, 2, 3] -** Processing line: ~ assert.equal! clone, orig~ + # Changes the step of the search to be animated +** Processing line: ~ def input_slider~ - Inside source: true *** True Line Result - assert.equal! clone, orig -** Processing line: ~ assert.not_equal! clone.object_id, orig.object_id~ + def input_slider +** Processing line: ~ state.play = false~ - Inside source: true *** True Line Result - assert.not_equal! clone.object_id, orig.object_id -** Processing line: ~ end~ + state.play = false +** Processing line: ~ mouse_x = inputs.mouse.point.x~ - Inside source: true *** True Line Result - end + mouse_x = inputs.mouse.point.x ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def test_aget args, assert~ +** Processing line: ~ # Bounds the mouse_x to the closest x value on the slider line~ - Inside source: true *** True Line Result - def test_aget args, assert -** Processing line: ~ assert.equal! (args.fn.aget [:a, :b, :c], 1), :b~ + # Bounds the mouse_x to the closest x value on the slider line +** Processing line: ~ mouse_x = slider.x if mouse_x < slider.x~ - Inside source: true *** True Line Result - assert.equal! (args.fn.aget [:a, :b, :c], 1), :b -** Processing line: ~ assert.equal! (args.fn.aget [:a, :b, :c], nil), nil~ + mouse_x = slider.x if mouse_x < slider.x +** Processing line: ~ mouse_x = slider.x + slider.w if mouse_x > slider.x + slider.w~ - Inside source: true *** True Line Result - assert.equal! (args.fn.aget [:a, :b, :c], nil), nil -** Processing line: ~ assert.equal! (args.fn.aget nil, 1), nil~ + mouse_x = slider.x + slider.w if mouse_x > slider.x + slider.w +** Processing line: ~~ - Inside source: true *** True Line Result - assert.equal! (args.fn.aget nil, 1), nil -** Processing line: ~ end~ + +** Processing line: ~ # Sets the current search step to the one represented by the mouse x value~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + # Sets the current search step to the one represented by the mouse x value +** Processing line: ~ # The slider's circle moves due to the render_slider method using anim_steps~ - Inside source: true *** True Line Result - -** Processing line: ~ def test_alength args, assert~ + # The slider's circle moves due to the render_slider method using anim_steps +** Processing line: ~ state.anim_steps = ((mouse_x - slider.x) / slider.spacing).to_i~ - Inside source: true *** True Line Result - def test_alength args, assert -** Processing line: ~ assert.equal! (args.fn.alength [:a, :b, :c]), 3~ + state.anim_steps = ((mouse_x - slider.x) / slider.spacing).to_i +** Processing line: ~~ - Inside source: true *** True Line Result - assert.equal! (args.fn.alength [:a, :b, :c]), 3 -** Processing line: ~ assert.equal! (args.fn.alength nil), nil~ + +** Processing line: ~ recalculate~ - Inside source: true *** True Line Result - assert.equal! (args.fn.alength nil), nil -** Processing line: ~ end~ + recalculate +** Processing line: ~ end~ - Inside source: true *** True Line Result - end + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def test_amap args, assert~ -- Inside source: true -*** True Line Result - def test_amap args, assert -** Processing line: ~ inc = lambda { |i| i + 1 }~ +** Processing line: ~ # Whenever the user edits the grid,~ - Inside source: true *** True Line Result - inc = lambda { |i| i + 1 } -** Processing line: ~ ary = [1, 2, 3]~ + # Whenever the user edits the grid, +** Processing line: ~ # The search has to be recalculated upto the current step~ - Inside source: true *** True Line Result - ary = [1, 2, 3] -** Processing line: ~ assert.equal! (args.fn.amap ary, inc), [2, 3, 4]~ + # The search has to be recalculated upto the current step +** Processing line: ~ # with the current grid as the initial state of the grid~ - Inside source: true *** True Line Result - assert.equal! (args.fn.amap ary, inc), [2, 3, 4] -** Processing line: ~ assert.equal! (args.fn.amap nil, inc), nil~ + # with the current grid as the initial state of the grid +** Processing line: ~ def recalculate~ - Inside source: true *** True Line Result - assert.equal! (args.fn.amap nil, inc), nil -** Processing line: ~ assert.equal! (args.fn.amap ary, nil), nil~ + def recalculate +** Processing line: ~ # Resets the search~ - Inside source: true *** True Line Result - assert.equal! (args.fn.amap ary, nil), nil -** Processing line: ~ assert.equal! (args.fn.amap ary, inc).class, Array~ + # Resets the search +** Processing line: ~ state.frontier = []~ - Inside source: true *** True Line Result - assert.equal! (args.fn.amap ary, inc).class, Array -** Processing line: ~ end~ + state.frontier = [] +** Processing line: ~ state.visited = {}~ - Inside source: true *** True Line Result - end + state.visited = {} ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def test_and args, assert~ -- Inside source: true -*** True Line Result - def test_and args, assert -** Processing line: ~ assert.equal! (args.fn.and 1, 2, 3, 4), 4~ +** Processing line: ~ # Moves the animation forward one step at a time~ - Inside source: true *** True Line Result - assert.equal! (args.fn.and 1, 2, 3, 4), 4 -** Processing line: ~ assert.equal! (args.fn.and 1, 2, nil, 4), nil~ + # Moves the animation forward one step at a time +** Processing line: ~ state.anim_steps.times { calc }~ - Inside source: true *** True Line Result - assert.equal! (args.fn.and 1, 2, nil, 4), nil -** Processing line: ~ assert.equal! (args.fn.and), true~ + state.anim_steps.times { calc } +** Processing line: ~ end~ - Inside source: true *** True Line Result - assert.equal! (args.fn.and), true -** Processing line: ~ end~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - end + ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def test_or args, assert~ +** Processing line: ~ # This method moves the search forward one step~ - Inside source: true *** True Line Result - def test_or args, assert -** Processing line: ~ assert.equal! (args.fn.or 1, 2, 3, 4), 1~ + # This method moves the search forward one step +** Processing line: ~ # When the animation is playing it is called every tick~ - Inside source: true *** True Line Result - assert.equal! (args.fn.or 1, 2, 3, 4), 1 -** Processing line: ~ assert.equal! (args.fn.or 1, 2, nil, 4), 1~ + # When the animation is playing it is called every tick +** Processing line: ~ # And called whenever the current step of the animation needs to be recalculated~ - Inside source: true *** True Line Result - assert.equal! (args.fn.or 1, 2, nil, 4), 1 -** Processing line: ~ assert.equal! (args.fn.or), nil~ + # And called whenever the current step of the animation needs to be recalculated +** Processing line: ~~ - Inside source: true *** True Line Result - assert.equal! (args.fn.or), nil -** Processing line: ~ assert.equal! (args.fn.or nil, nil, false, 5, 10), 5~ + +** Processing line: ~ # Moves the search forward one step~ - Inside source: true *** True Line Result - assert.equal! (args.fn.or nil, nil, false, 5, 10), 5 -** Processing line: ~ end~ + # Moves the search forward one step +** Processing line: ~ # Parameter called_from_tick is true if it is called from the tick method~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + # Parameter called_from_tick is true if it is called from the tick method +** Processing line: ~ # It is false when the search is being recalculated after user editing the grid~ - Inside source: true *** True Line Result - -** Processing line: ~ def test_eq_eq args, assert~ + # It is false when the search is being recalculated after user editing the grid +** Processing line: ~ def calc~ - Inside source: true *** True Line Result - def test_eq_eq args, assert -** Processing line: ~ assert.equal! (args.fn.eq?), true~ + def calc +** Processing line: ~~ - Inside source: true *** True Line Result - assert.equal! (args.fn.eq?), true -** Processing line: ~ assert.equal! (args.fn.eq? 1, 0), false~ + +** Processing line: ~ # The setup to the search~ - Inside source: true *** True Line Result - assert.equal! (args.fn.eq? 1, 0), false -** Processing line: ~ assert.equal! (args.fn.eq? 1, 1, 1), true~ + # The setup to the search +** Processing line: ~ # Runs once when the there is no frontier or visited cells~ - Inside source: true *** True Line Result - assert.equal! (args.fn.eq? 1, 1, 1), true -** Processing line: ~ assert.equal! (args.fn.== 1, 1, 1), true~ + # Runs once when the there is no frontier or visited cells +** Processing line: ~ if state.frontier.empty? && state.visited.empty?~ - Inside source: true *** True Line Result - assert.equal! (args.fn.== 1, 1, 1), true -** Processing line: ~ assert.equal! (args.fn.== nil, nil), true~ + if state.frontier.empty? && state.visited.empty? +** Processing line: ~ state.frontier << state.star~ - Inside source: true *** True Line Result - assert.equal! (args.fn.== nil, nil), true -** Processing line: ~ end~ + state.frontier << state.star +** Processing line: ~ state.visited[state.star] = true~ - Inside source: true *** True Line Result - end + state.visited[state.star] = true +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def test_apply args, assert~ +** Processing line: ~ # A step in the search~ - Inside source: true *** True Line Result - def test_apply args, assert -** Processing line: ~ assert.equal! (args.fn.and [nil, nil, nil]), [nil, nil, nil]~ + # A step in the search +** Processing line: ~ unless state.frontier.empty?~ - Inside source: true *** True Line Result - assert.equal! (args.fn.and [nil, nil, nil]), [nil, nil, nil] -** Processing line: ~ assert.equal! (args.fn.apply [nil, nil, nil], args.fn.method(:and)), nil~ + unless state.frontier.empty? +** Processing line: ~ # Takes the next frontier cell~ - Inside source: true *** True Line Result - assert.equal! (args.fn.apply [nil, nil, nil], args.fn.method(:and)), nil -** Processing line: ~ and_lambda = lambda {|*xs| args.fn.and(*xs)}~ + # Takes the next frontier cell +** Processing line: ~ new_frontier = state.frontier.shift~ - Inside source: true *** True Line Result - and_lambda = lambda {|*xs| args.fn.and(*xs)} -** Processing line: ~ assert.equal! (args.fn.apply [nil, nil, nil], and_lambda), nil~ + new_frontier = state.frontier.shift +** Processing line: ~ # For each of its neighbors~ - Inside source: true *** True Line Result - assert.equal! (args.fn.apply [nil, nil, nil], and_lambda), nil -** Processing line: ~ end~ + # For each of its neighbors +** Processing line: ~ adjacent_neighbors(new_frontier).each do |neighbor|~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + adjacent_neighbors(new_frontier).each do |neighbor| +** Processing line: ~ # That have not been visited and are not walls~ - Inside source: true *** True Line Result - -** Processing line: ~ def test_areduce args, assert~ + # That have not been visited and are not walls +** Processing line: ~ unless state.visited.has_key?(neighbor) || state.walls.has_key?(neighbor)~ - Inside source: true *** True Line Result - def test_areduce args, assert -** Processing line: ~ assert.equal! (args.fn.areduce [1, 2, 3], 0, lambda { |i, a| i + a }), 6~ + unless state.visited.has_key?(neighbor) || state.walls.has_key?(neighbor) +** Processing line: ~ # Add them to the frontier and mark them as visited~ - Inside source: true *** True Line Result - assert.equal! (args.fn.areduce [1, 2, 3], 0, lambda { |i, a| i + a }), 6 -** Processing line: ~ end~ + # Add them to the frontier and mark them as visited +** Processing line: ~ state.frontier << neighbor~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + state.frontier << neighbor +** Processing line: ~ state.visited[neighbor] = true~ - Inside source: true *** True Line Result - -** Processing line: ~ def test_array_hash args, assert~ + state.visited[neighbor] = true +** Processing line: ~ end~ - Inside source: true *** True Line Result - def test_array_hash args, assert -** Processing line: ~ assert.equal! (args.fn.array_hash :a, 1, :b, 2), { a: 1, b: 2 }~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - assert.equal! (args.fn.array_hash :a, 1, :b, 2), { a: 1, b: 2 } -** Processing line: ~ assert.equal! (args.fn.array_hash), { }~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - assert.equal! (args.fn.array_hash), { } -** Processing line: ~ end~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - end + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~#+end_src~ -- Line was identified as the end of a code block. -*** True Line Result -#+end_src ** Processing line: ~~ -- End of paragraph detected. +- Inside source: true *** True Line Result -** Processing line: ~*** Advanced Debugging - Unit Tests - gen_docs.rb~ -- Header detected. +** Processing line: ~ # Returns a list of adjacent cells~ +- Inside source: true *** True Line Result - + # Returns a list of adjacent cells +** Processing line: ~ # Used to determine what the next cells to be added to the frontier are~ +- Inside source: true *** True Line Result -*** Advanced Debugging - Unit Tests - gen_docs.rb -** Processing line: ~#+begin_src ruby~ -- Line was identified as the beginning of a code block. + # Used to determine what the next cells to be added to the frontier are +** Processing line: ~ def adjacent_neighbors(cell)~ +- Inside source: true +*** True Line Result + def adjacent_neighbors(cell) +** Processing line: ~ neighbors = []~ +- Inside source: true +*** True Line Result + neighbors = [] +** Processing line: ~~ +- Inside source: true *** True Line Result +** Processing line: ~ neighbors << [cell.x, cell.y + 1] unless cell.y == grid.height - 1~ +- Inside source: true *** True Line Result -#+begin_src ruby -** Processing line: ~ # ./samples/10_advanced_debugging/03_unit_tests/gen_docs.rb~ + neighbors << [cell.x, cell.y + 1] unless cell.y == grid.height - 1 +** Processing line: ~ neighbors << [cell.x + 1, cell.y] unless cell.x == grid.width - 1~ - Inside source: true *** True Line Result - # ./samples/10_advanced_debugging/03_unit_tests/gen_docs.rb -** Processing line: ~ # ./dragonruby mygame --eval samples/99_zz_gtk_unit_tests/gen_docs.rb --no-tick~ + neighbors << [cell.x + 1, cell.y] unless cell.x == grid.width - 1 +** Processing line: ~ neighbors << [cell.x, cell.y - 1] unless cell.y == 0~ - Inside source: true *** True Line Result - # ./dragonruby mygame --eval samples/99_zz_gtk_unit_tests/gen_docs.rb --no-tick -** Processing line: ~ Kernel.export_docs!~ + neighbors << [cell.x, cell.y - 1] unless cell.y == 0 +** Processing line: ~ neighbors << [cell.x - 1, cell.y] unless cell.x == 0~ - Inside source: true *** True Line Result - Kernel.export_docs! + neighbors << [cell.x - 1, cell.y] unless cell.x == 0 ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~#+end_src~ -- Line was identified as the end of a code block. +** Processing line: ~ neighbors~ +- Inside source: true *** True Line Result -#+end_src + neighbors +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ -- End of paragraph detected. +- Inside source: true *** True Line Result -** Processing line: ~*** Advanced Debugging - Unit Tests - geometry_tests.rb~ -- Header detected. +** Processing line: ~ # When the user grabs the star and puts their cursor to the far right~ +- Inside source: true *** True Line Result - + # When the user grabs the star and puts their cursor to the far right +** Processing line: ~ # and moves up and down, the star is supposed to move along the grid as well~ +- Inside source: true *** True Line Result -*** Advanced Debugging - Unit Tests - geometry_tests.rb -** Processing line: ~#+begin_src ruby~ -- Line was identified as the beginning of a code block. + # and moves up and down, the star is supposed to move along the grid as well +** Processing line: ~ # Finding the cell closest to the mouse helps with this~ +- Inside source: true *** True Line Result - + # Finding the cell closest to the mouse helps with this +** Processing line: ~ def cell_closest_to_mouse~ +- Inside source: true *** True Line Result -#+begin_src ruby -** Processing line: ~ # ./samples/10_advanced_debugging/03_unit_tests/geometry_tests.rb~ + def cell_closest_to_mouse +** Processing line: ~ # Closest cell to the mouse~ - Inside source: true *** True Line Result - # ./samples/10_advanced_debugging/03_unit_tests/geometry_tests.rb -** Processing line: ~ begin :shared~ + # Closest cell to the mouse +** Processing line: ~ x = (inputs.mouse.point.x / grid.cell_size).to_i~ - Inside source: true *** True Line Result - begin :shared -** Processing line: ~ def primitive_representations x, y, w, h~ + x = (inputs.mouse.point.x / grid.cell_size).to_i +** Processing line: ~ y = (inputs.mouse.point.y / grid.cell_size).to_i~ - Inside source: true *** True Line Result - def primitive_representations x, y, w, h -** Processing line: ~ [~ + y = (inputs.mouse.point.y / grid.cell_size).to_i +** Processing line: ~ # Bound x and y to the grid~ - Inside source: true *** True Line Result - [ -** Processing line: ~ [x, y, w, h],~ + # Bound x and y to the grid +** Processing line: ~ x = grid.width - 1 if x > grid.width - 1~ - Inside source: true *** True Line Result - [x, y, w, h], -** Processing line: ~ { x: x, y: y, w: w, h: h },~ + x = grid.width - 1 if x > grid.width - 1 +** Processing line: ~ y = grid.height - 1 if y > grid.height - 1~ - Inside source: true *** True Line Result - { x: x, y: y, w: w, h: h }, -** Processing line: ~ RectForTest.new(x, y, w, h)~ + y = grid.height - 1 if y > grid.height - 1 +** Processing line: ~ # Return closest cell~ - Inside source: true *** True Line Result - RectForTest.new(x, y, w, h) -** Processing line: ~ ]~ + # Return closest cell +** Processing line: ~ [x, y]~ - Inside source: true *** True Line Result - ] + [x, y] ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -56696,82 +65191,86 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ class RectForTest~ -- Inside source: true -*** True Line Result - class RectForTest -** Processing line: ~ attr_sprite~ +** Processing line: ~ # These methods detect when the buttons are clicked~ - Inside source: true *** True Line Result - attr_sprite -** Processing line: ~~ + # These methods detect when the buttons are clicked +** Processing line: ~ def left_button_clicked?~ - Inside source: true *** True Line Result - -** Processing line: ~ def initialize x, y, w, h~ + def left_button_clicked? +** Processing line: ~ inputs.mouse.up && inputs.mouse.point.inside_rect?(buttons.left)~ - Inside source: true *** True Line Result - def initialize x, y, w, h -** Processing line: ~ @x = x~ + inputs.mouse.up && inputs.mouse.point.inside_rect?(buttons.left) +** Processing line: ~ end~ - Inside source: true *** True Line Result - @x = x -** Processing line: ~ @y = y~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - @y = y -** Processing line: ~ @w = w~ + +** Processing line: ~ def center_button_clicked?~ - Inside source: true *** True Line Result - @w = w -** Processing line: ~ @h = h~ + def center_button_clicked? +** Processing line: ~ inputs.mouse.up && inputs.mouse.point.inside_rect?(buttons.center)~ - Inside source: true *** True Line Result - @h = h -** Processing line: ~ end~ + inputs.mouse.up && inputs.mouse.point.inside_rect?(buttons.center) +** Processing line: ~ end~ - Inside source: true *** True Line Result - end + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def to_s~ -- Inside source: true -*** True Line Result - def to_s -** Processing line: ~ "RectForTest: #{[x, y, w, h]}"~ +** Processing line: ~ def right_button_clicked?~ - Inside source: true *** True Line Result - "RectForTest: #{[x, y, w, h]}" -** Processing line: ~ end~ + def right_button_clicked? +** Processing line: ~ inputs.mouse.up && inputs.mouse.point.inside_rect?(buttons.right)~ - Inside source: true *** True Line Result - end + inputs.mouse.up && inputs.mouse.point.inside_rect?(buttons.right) ** Processing line: ~ end~ - Inside source: true *** True Line Result end -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ begin :intersect_rect?~ +** Processing line: ~ # Signal that the user is going to be moving the slider~ - Inside source: true *** True Line Result - begin :intersect_rect? -** Processing line: ~ def test_intersect_rect_point args, assert~ + # Signal that the user is going to be moving the slider +** Processing line: ~ # Is the mouse down on the circle of the slider?~ - Inside source: true *** True Line Result - def test_intersect_rect_point args, assert -** Processing line: ~ assert.true! [16, 13].intersect_rect?([13, 12, 4, 4]), "point intersects with rect."~ + # Is the mouse down on the circle of the slider? +** Processing line: ~ def slider_clicked?~ - Inside source: true *** True Line Result - assert.true! [16, 13].intersect_rect?([13, 12, 4, 4]), "point intersects with rect." + def slider_clicked? +** Processing line: ~ circle_x = (slider.x - slider.offset) + (state.anim_steps * slider.spacing)~ +- Inside source: true +*** True Line Result + circle_x = (slider.x - slider.offset) + (state.anim_steps * slider.spacing) +** Processing line: ~ circle_y = (slider.y - slider.offset)~ +- Inside source: true +*** True Line Result + circle_y = (slider.y - slider.offset) +** Processing line: ~ circle_rect = [circle_x, circle_y, 37, 37]~ +- Inside source: true +*** True Line Result + circle_rect = [circle_x, circle_y, 37, 37] +** Processing line: ~ inputs.mouse.down && inputs.mouse.point.inside_rect?(circle_rect)~ +- Inside source: true +*** True Line Result + inputs.mouse.down && inputs.mouse.point.inside_rect?(circle_rect) ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -56780,118 +65279,122 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def test_intersect_rect args, assert~ +** Processing line: ~ # Signal that the user is going to be moving the star~ - Inside source: true *** True Line Result - def test_intersect_rect args, assert -** Processing line: ~ intersecting = primitive_representations(0, 0, 100, 100) +~ + # Signal that the user is going to be moving the star +** Processing line: ~ def star_clicked?~ - Inside source: true *** True Line Result - intersecting = primitive_representations(0, 0, 100, 100) + -** Processing line: ~ primitive_representations(20, 20, 20, 20)~ + def star_clicked? +** Processing line: ~ inputs.mouse.down && inputs.mouse.point.inside_rect?(scale_up(state.star))~ - Inside source: true *** True Line Result - primitive_representations(20, 20, 20, 20) + inputs.mouse.down && inputs.mouse.point.inside_rect?(scale_up(state.star)) +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ intersecting.product(intersecting).each do |rect_one, rect_two|~ +** Processing line: ~ # Signal that the user is going to be removing walls~ - Inside source: true *** True Line Result - intersecting.product(intersecting).each do |rect_one, rect_two| -** Processing line: ~ assert.true! rect_one.intersect_rect?(rect_two),~ + # Signal that the user is going to be removing walls +** Processing line: ~ def wall_clicked?~ - Inside source: true *** True Line Result - assert.true! rect_one.intersect_rect?(rect_two), -** Processing line: ~ "intersect_rect? assertion failed for #{rect_one}, #{rect_two} (expected true)."~ + def wall_clicked? +** Processing line: ~ inputs.mouse.down && mouse_inside_a_wall?~ - Inside source: true *** True Line Result - "intersect_rect? assertion failed for #{rect_one}, #{rect_two} (expected true)." -** Processing line: ~ end~ + inputs.mouse.down && mouse_inside_a_wall? +** Processing line: ~ end~ - Inside source: true *** True Line Result - end + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ not_intersecting = [~ -- Inside source: true -*** True Line Result - not_intersecting = [ -** Processing line: ~ [ 0, 0, 5, 5],~ +** Processing line: ~ # Signal that the user is going to be adding walls~ - Inside source: true *** True Line Result - [ 0, 0, 5, 5], -** Processing line: ~ { x: 10, y: 10, w: 5, h: 5 },~ + # Signal that the user is going to be adding walls +** Processing line: ~ def grid_clicked?~ - Inside source: true *** True Line Result - { x: 10, y: 10, w: 5, h: 5 }, -** Processing line: ~ RectForTest.new(20, 20, 5, 5)~ + def grid_clicked? +** Processing line: ~ inputs.mouse.down && mouse_inside_grid?~ - Inside source: true *** True Line Result - RectForTest.new(20, 20, 5, 5) -** Processing line: ~ ]~ + inputs.mouse.down && mouse_inside_grid? +** Processing line: ~ end~ - Inside source: true *** True Line Result - ] + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ not_intersecting.product(not_intersecting)~ +** Processing line: ~ # Returns whether the mouse is inside of a wall~ - Inside source: true *** True Line Result - not_intersecting.product(not_intersecting) -** Processing line: ~ .reject { |rect_one, rect_two| rect_one == rect_two }~ + # Returns whether the mouse is inside of a wall +** Processing line: ~ # Part of the condition that checks whether the user is removing a wall~ - Inside source: true *** True Line Result - .reject { |rect_one, rect_two| rect_one == rect_two } -** Processing line: ~ .each do |rect_one, rect_two|~ + # Part of the condition that checks whether the user is removing a wall +** Processing line: ~ def mouse_inside_a_wall?~ - Inside source: true *** True Line Result - .each do |rect_one, rect_two| -** Processing line: ~ assert.false! rect_one.intersect_rect?(rect_two),~ + def mouse_inside_a_wall? +** Processing line: ~ state.walls.each_key do | wall |~ - Inside source: true *** True Line Result - assert.false! rect_one.intersect_rect?(rect_two), -** Processing line: ~ "intersect_rect? assertion failed for #{rect_one}, #{rect_two} (expected false)."~ + state.walls.each_key do | wall | +** Processing line: ~ return true if inputs.mouse.point.inside_rect?(scale_up([wall.x, wall.y]))~ - Inside source: true *** True Line Result - "intersect_rect? assertion failed for #{rect_one}, #{rect_two} (expected false)." + return true if inputs.mouse.point.inside_rect?(scale_up([wall.x, wall.y])) ** Processing line: ~ end~ - Inside source: true *** True Line Result end -** Processing line: ~ end~ +** Processing line: ~~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + +** Processing line: ~ false~ - Inside source: true *** True Line Result - end + false +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ begin :inside_rect?~ +** Processing line: ~ # Returns whether the mouse is inside of a grid~ - Inside source: true *** True Line Result - begin :inside_rect? -** Processing line: ~ def assert_inside_rect outer: nil, inner: nil, expected: nil, assert: nil~ + # Returns whether the mouse is inside of a grid +** Processing line: ~ # Part of the condition that checks whether the user is adding a wall~ - Inside source: true *** True Line Result - def assert_inside_rect outer: nil, inner: nil, expected: nil, assert: nil -** Processing line: ~ assert.true! inner.inside_rect?(outer) == expected,~ + # Part of the condition that checks whether the user is adding a wall +** Processing line: ~ def mouse_inside_grid?~ - Inside source: true *** True Line Result - assert.true! inner.inside_rect?(outer) == expected, -** Processing line: ~ "inside_rect? assertion failed for outer: #{outer} inner: #{inner} (expected #{expected})."~ + def mouse_inside_grid? +** Processing line: ~ inputs.mouse.point.inside_rect?(scale_up([0, 0, grid.width, grid.height]))~ - Inside source: true *** True Line Result - "inside_rect? assertion failed for outer: #{outer} inner: #{inner} (expected #{expected})." + inputs.mouse.point.inside_rect?(scale_up([0, 0, grid.width, grid.height])) ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -56900,302 +65403,274 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def test_inside_rect args, assert~ -- Inside source: true -*** True Line Result - def test_inside_rect args, assert -** Processing line: ~ outer_rects = primitive_representations(0, 0, 10, 10)~ -- Inside source: true -*** True Line Result - outer_rects = primitive_representations(0, 0, 10, 10) -** Processing line: ~ inner_rects = primitive_representations(1, 1, 5, 5)~ +** Processing line: ~~ - Inside source: true *** True Line Result - inner_rects = primitive_representations(1, 1, 5, 5) -** Processing line: ~ primitive_representations(0, 0, 10, 10).product(primitive_representations(1, 1, 5, 5))~ + +** Processing line: ~ # These methods provide handy aliases to colors~ - Inside source: true *** True Line Result - primitive_representations(0, 0, 10, 10).product(primitive_representations(1, 1, 5, 5)) -** Processing line: ~ .each do |outer, inner|~ + # These methods provide handy aliases to colors +** Processing line: ~~ - Inside source: true *** True Line Result - .each do |outer, inner| -** Processing line: ~ assert_inside_rect outer: outer, inner: inner,~ + +** Processing line: ~ # Light brown~ - Inside source: true *** True Line Result - assert_inside_rect outer: outer, inner: inner, -** Processing line: ~ expected: true, assert: assert~ + # Light brown +** Processing line: ~ def unvisited_color~ - Inside source: true *** True Line Result - expected: true, assert: assert -** Processing line: ~ end~ + def unvisited_color +** Processing line: ~ [221, 212, 213]~ - Inside source: true *** True Line Result - end + [221, 212, 213] ** Processing line: ~ end~ - Inside source: true *** True Line Result end -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ begin :angle_to~ -- Inside source: true -*** True Line Result - begin :angle_to -** Processing line: ~ def test_angle_to args, assert~ +** Processing line: ~ # Black~ - Inside source: true *** True Line Result - def test_angle_to args, assert -** Processing line: ~ origins = primitive_representations(0, 0, 0, 0)~ + # Black +** Processing line: ~ def grid_line_color~ - Inside source: true *** True Line Result - origins = primitive_representations(0, 0, 0, 0) -** Processing line: ~ rights = primitive_representations(1, 0, 0, 0)~ + def grid_line_color +** Processing line: ~ [255, 255, 255]~ - Inside source: true *** True Line Result - rights = primitive_representations(1, 0, 0, 0) -** Processing line: ~ aboves = primitive_representations(0, 1, 0, 0)~ + [255, 255, 255] +** Processing line: ~ end~ - Inside source: true *** True Line Result - aboves = primitive_representations(0, 1, 0, 0) + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ origins.product(aboves).each do |origin, above|~ +** Processing line: ~ # Dark Brown~ - Inside source: true *** True Line Result - origins.product(aboves).each do |origin, above| -** Processing line: ~ assert.equal! origin.angle_to(above), 90,~ + # Dark Brown +** Processing line: ~ def visited_color~ - Inside source: true *** True Line Result - assert.equal! origin.angle_to(above), 90, -** Processing line: ~ "A point directly above should be 90 degrees."~ + def visited_color +** Processing line: ~ [204, 191, 179]~ - Inside source: true *** True Line Result - "A point directly above should be 90 degrees." + [204, 191, 179] +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ assert.equal! above.angle_from(origin), 90,~ +** Processing line: ~ # Blue~ - Inside source: true *** True Line Result - assert.equal! above.angle_from(origin), 90, -** Processing line: ~ "A point coming from above should be 90 degrees."~ + # Blue +** Processing line: ~ def frontier_color~ - Inside source: true *** True Line Result - "A point coming from above should be 90 degrees." -** Processing line: ~ end~ + def frontier_color +** Processing line: ~ [103, 136, 204]~ - Inside source: true *** True Line Result - end + [103, 136, 204] +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ origins.product(rights).each do |origin, right|~ +** Processing line: ~ # Camo Green~ - Inside source: true *** True Line Result - origins.product(rights).each do |origin, right| -** Processing line: ~ assert.equal! origin.angle_to(right) % 360, 0,~ + # Camo Green +** Processing line: ~ def wall_color~ - Inside source: true *** True Line Result - assert.equal! origin.angle_to(right) % 360, 0, -** Processing line: ~ "A point directly to the right should be 0 degrees."~ + def wall_color +** Processing line: ~ [134, 134, 120]~ - Inside source: true *** True Line Result - "A point directly to the right should be 0 degrees." -** Processing line: ~~ + [134, 134, 120] +** Processing line: ~ end~ - Inside source: true *** True Line Result - -** Processing line: ~ assert.equal! right.angle_from(origin) % 360, 0,~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - assert.equal! right.angle_from(origin) % 360, 0, -** Processing line: ~ "A point coming from the right should be 0 degrees."~ + +** Processing line: ~ # Button Background~ - Inside source: true *** True Line Result - "A point coming from the right should be 0 degrees." -** Processing line: ~~ + # Button Background +** Processing line: ~ def gray~ - Inside source: true *** True Line Result - -** Processing line: ~ end~ + def gray +** Processing line: ~ [190, 190, 190]~ - Inside source: true *** True Line Result - end + [190, 190, 190] ** Processing line: ~ end~ - Inside source: true *** True Line Result end -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ begin :scale_rect~ +** Processing line: ~ # Button Outline~ - Inside source: true *** True Line Result - begin :scale_rect -** Processing line: ~ def test_scale_rect args, assert~ + # Button Outline +** Processing line: ~ def black~ - Inside source: true *** True Line Result - def test_scale_rect args, assert -** Processing line: ~ assert.equal! [0, 0, 100, 100].scale_rect(0.5, 0.5),~ + def black +** Processing line: ~ [0, 0, 0]~ - Inside source: true *** True Line Result - assert.equal! [0, 0, 100, 100].scale_rect(0.5, 0.5), -** Processing line: ~ [25.0, 25.0, 50.0, 50.0]~ + [0, 0, 0] +** Processing line: ~ end~ - Inside source: true *** True Line Result - [25.0, 25.0, 50.0, 50.0] + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ assert.equal! [0, 0, 100, 100].scale_rect(0.5),~ -- Inside source: true -*** True Line Result - assert.equal! [0, 0, 100, 100].scale_rect(0.5), -** Processing line: ~ [0.0, 0.0, 50.0, 50.0]~ +** Processing line: ~ # These methods make the code more concise~ - Inside source: true *** True Line Result - [0.0, 0.0, 50.0, 50.0] -** Processing line: ~~ + # These methods make the code more concise +** Processing line: ~ def grid~ - Inside source: true *** True Line Result - -** Processing line: ~ assert.equal! [0, 0, 100, 100].scale_rect_extended(percentage_x: 0.5, percentage_y: 0.5, anchor_x: 0.5, anchor_y: 0.5),~ + def grid +** Processing line: ~ state.grid~ - Inside source: true *** True Line Result - assert.equal! [0, 0, 100, 100].scale_rect_extended(percentage_x: 0.5, percentage_y: 0.5, anchor_x: 0.5, anchor_y: 0.5), -** Processing line: ~ [25.0, 25.0, 50.0, 50.0]~ + state.grid +** Processing line: ~ end~ - Inside source: true *** True Line Result - [25.0, 25.0, 50.0, 50.0] + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ assert.equal! [0, 0, 100, 100].scale_rect_extended(percentage_x: 0.5, percentage_y: 0.5, anchor_x: 0, anchor_y: 0),~ +** Processing line: ~ def buttons~ - Inside source: true *** True Line Result - assert.equal! [0, 0, 100, 100].scale_rect_extended(percentage_x: 0.5, percentage_y: 0.5, anchor_x: 0, anchor_y: 0), -** Processing line: ~ [0.0, 0.0, 50.0, 50.0]~ + def buttons +** Processing line: ~ state.buttons~ - Inside source: true *** True Line Result - [0.0, 0.0, 50.0, 50.0] + state.buttons ** Processing line: ~ end~ - Inside source: true *** True Line Result end -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ $gtk.reset 100~ +** Processing line: ~ def slider~ - Inside source: true *** True Line Result - $gtk.reset 100 -** Processing line: ~ $gtk.log_level = :off~ + def slider +** Processing line: ~ state.slider~ - Inside source: true *** True Line Result - $gtk.log_level = :off -** Processing line: ~~ + state.slider +** Processing line: ~ end~ - Inside source: true *** True Line Result - -** Processing line: ~#+end_src~ -- Line was identified as the end of a code block. + end +** Processing line: ~ end~ +- Inside source: true *** True Line Result -#+end_src + end ** Processing line: ~~ -- End of paragraph detected. -*** True Line Result - -** Processing line: ~*** Advanced Debugging - Unit Tests - http_tests.rb~ -- Header detected. -*** True Line Result - -*** True Line Result -*** Advanced Debugging - Unit Tests - http_tests.rb -** Processing line: ~#+begin_src ruby~ -- Line was identified as the beginning of a code block. +- Inside source: true *** True Line Result +** Processing line: ~ # Method that is called by DragonRuby periodically~ +- Inside source: true *** True Line Result -#+begin_src ruby -** Processing line: ~ # ./samples/10_advanced_debugging/03_unit_tests/http_tests.rb~ + # Method that is called by DragonRuby periodically +** Processing line: ~ # Used for updating animations and calculations~ - Inside source: true *** True Line Result - # ./samples/10_advanced_debugging/03_unit_tests/http_tests.rb -** Processing line: ~ def try_assert_or_schedule args, assert~ + # Used for updating animations and calculations +** Processing line: ~ def tick args~ - Inside source: true *** True Line Result - def try_assert_or_schedule args, assert -** Processing line: ~ if $result[:complete]~ + def tick args +** Processing line: ~~ - Inside source: true *** True Line Result - if $result[:complete] -** Processing line: ~ log_info "Request completed! Verifying."~ + +** Processing line: ~ # Pressing r will reset the application~ - Inside source: true *** True Line Result - log_info "Request completed! Verifying." -** Processing line: ~ if $result[:http_response_code] != 200~ + # Pressing r will reset the application +** Processing line: ~ if args.inputs.keyboard.key_down.r~ - Inside source: true *** True Line Result - if $result[:http_response_code] != 200 -** Processing line: ~ log_info "The request yielded a result of #{$result[:http_response_code]} instead of 200."~ + if args.inputs.keyboard.key_down.r +** Processing line: ~ args.gtk.reset~ - Inside source: true *** True Line Result - log_info "The request yielded a result of #{$result[:http_response_code]} instead of 200." -** Processing line: ~ exit~ + args.gtk.reset +** Processing line: ~ reset~ - Inside source: true *** True Line Result - exit -** Processing line: ~ end~ + reset +** Processing line: ~ return~ - Inside source: true *** True Line Result - end -** Processing line: ~ log_info ":try_assert_or_schedule succeeded!"~ + return +** Processing line: ~ end~ - Inside source: true *** True Line Result - log_info ":try_assert_or_schedule succeeded!" -** Processing line: ~ else~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - else -** Processing line: ~ args.gtk.schedule_callback Kernel.tick_count + 10 do~ + +** Processing line: ~ # Every tick, new args are passed, and the Breadth First Search tick is called~ - Inside source: true *** True Line Result - args.gtk.schedule_callback Kernel.tick_count + 10 do -** Processing line: ~ try_assert_or_schedule args, assert~ + # Every tick, new args are passed, and the Breadth First Search tick is called +** Processing line: ~ $breadth_first_search ||= BreadthFirstSearch.new(args)~ - Inside source: true *** True Line Result - try_assert_or_schedule args, assert -** Processing line: ~ end~ + $breadth_first_search ||= BreadthFirstSearch.new(args) +** Processing line: ~ $breadth_first_search.args = args~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + $breadth_first_search.args = args +** Processing line: ~ $breadth_first_search.tick~ - Inside source: true *** True Line Result - end + $breadth_first_search.tick ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -57204,18 +65679,18 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def test_http args, assert~ +** Processing line: ~~ - Inside source: true *** True Line Result - def test_http args, assert -** Processing line: ~ $result = $gtk.http_get 'http://dragonruby.org'~ + +** Processing line: ~ def reset~ - Inside source: true *** True Line Result - $result = $gtk.http_get 'http://dragonruby.org' -** Processing line: ~ try_assert_or_schedule args, assert~ + def reset +** Processing line: ~ $breadth_first_search = nil~ - Inside source: true *** True Line Result - try_assert_or_schedule args, assert + $breadth_first_search = nil ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -57224,18 +65699,6 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ $gtk.reset 100~ -- Inside source: true -*** True Line Result - $gtk.reset 100 -** Processing line: ~ $gtk.log_level = :off~ -- Inside source: true -*** True Line Result - $gtk.log_level = :off -** Processing line: ~~ -- Inside source: true -*** True Line Result - ** Processing line: ~#+end_src~ - Line was identified as the end of a code block. *** True Line Result @@ -57244,938 +65707,962 @@ Follows is a source code listing for all files that have been open sourced. This - End of paragraph detected. *** True Line Result -** Processing line: ~*** Advanced Debugging - Unit Tests - nil_coercion_tests.rb~ +** Processing line: ~*** Path Finding Algorithms - Detailed Breadth First Search - main.rb~ - Header detected. *** True Line Result *** True Line Result -*** Advanced Debugging - Unit Tests - nil_coercion_tests.rb +*** Path Finding Algorithms - Detailed Breadth First Search - main.rb ** Processing line: ~#+begin_src ruby~ - Line was identified as the beginning of a code block. *** True Line Result *** True Line Result #+begin_src ruby -** Processing line: ~ # ./samples/10_advanced_debugging/03_unit_tests/nil_coercion_tests.rb~ -- Inside source: true -*** True Line Result - # ./samples/10_advanced_debugging/03_unit_tests/nil_coercion_tests.rb -** Processing line: ~ # numbers~ +** Processing line: ~ # ./samples/13_path_finding_algorithms/02_detailed_breadth_first_search/app/main.rb~ - Inside source: true *** True Line Result - # numbers -** Processing line: ~ def test_open_entity_add_number args, assert~ + # ./samples/13_path_finding_algorithms/02_detailed_breadth_first_search/app/main.rb +** Processing line: ~ # A visual demonstration of a breadth first search~ - Inside source: true *** True Line Result - def test_open_entity_add_number args, assert -** Processing line: ~ assert.nil! args.state.i_value~ + # A visual demonstration of a breadth first search +** Processing line: ~ # Inspired by https://www.redblobgames.com/pathfinding/a-star/introduction.html~ - Inside source: true *** True Line Result - assert.nil! args.state.i_value -** Processing line: ~ args.state.i_value += 5~ + # Inspired by https://www.redblobgames.com/pathfinding/a-star/introduction.html +** Processing line: ~~ - Inside source: true *** True Line Result - args.state.i_value += 5 -** Processing line: ~ assert.equal! args.state.i_value, 5~ + +** Processing line: ~ # An animation that can respond to user input in real time~ - Inside source: true *** True Line Result - assert.equal! args.state.i_value, 5 + # An animation that can respond to user input in real time ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ assert.nil! args.state.f_value~ +** Processing line: ~ # A breadth first search expands in all directions one step at a time~ - Inside source: true *** True Line Result - assert.nil! args.state.f_value -** Processing line: ~ args.state.f_value += 5.5~ + # A breadth first search expands in all directions one step at a time +** Processing line: ~ # The frontier is a queue of cells to be expanded from~ - Inside source: true *** True Line Result - args.state.f_value += 5.5 -** Processing line: ~ assert.equal! args.state.f_value, 5.5~ + # The frontier is a queue of cells to be expanded from +** Processing line: ~ # The visited hash allows quick lookups of cells that have been expanded from~ - Inside source: true *** True Line Result - assert.equal! args.state.f_value, 5.5 -** Processing line: ~ end~ + # The visited hash allows quick lookups of cells that have been expanded from +** Processing line: ~ # The walls hash allows quick lookup of whether a cell is a wall~ - Inside source: true *** True Line Result - end + # The walls hash allows quick lookup of whether a cell is a wall ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def test_open_entity_subtract_number args, assert~ +** Processing line: ~ # The breadth first search starts by adding the red star to the frontier array~ - Inside source: true *** True Line Result - def test_open_entity_subtract_number args, assert -** Processing line: ~ assert.nil! args.state.i_value~ + # The breadth first search starts by adding the red star to the frontier array +** Processing line: ~ # and marking it as visited~ - Inside source: true *** True Line Result - assert.nil! args.state.i_value -** Processing line: ~ args.state.i_value -= 5~ + # and marking it as visited +** Processing line: ~ # Each step a cell is removed from the front of the frontier array (queue)~ - Inside source: true *** True Line Result - args.state.i_value -= 5 -** Processing line: ~ assert.equal! args.state.i_value, -5~ + # Each step a cell is removed from the front of the frontier array (queue) +** Processing line: ~ # Unless the neighbor is a wall or visited, it is added to the frontier array~ - Inside source: true *** True Line Result - assert.equal! args.state.i_value, -5 + # Unless the neighbor is a wall or visited, it is added to the frontier array +** Processing line: ~ # The neighbor is then marked as visited~ +- Inside source: true +*** True Line Result + # The neighbor is then marked as visited ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ assert.nil! args.state.f_value~ +** Processing line: ~ # The frontier is blue~ - Inside source: true *** True Line Result - assert.nil! args.state.f_value -** Processing line: ~ args.state.f_value -= 5.5~ + # The frontier is blue +** Processing line: ~ # Visited cells are light brown~ - Inside source: true *** True Line Result - args.state.f_value -= 5.5 -** Processing line: ~ assert.equal! args.state.f_value, -5.5~ + # Visited cells are light brown +** Processing line: ~ # Walls are camo green~ - Inside source: true *** True Line Result - assert.equal! args.state.f_value, -5.5 -** Processing line: ~ end~ + # Walls are camo green +** Processing line: ~ # Even when walls are visited, they will maintain their wall color~ - Inside source: true *** True Line Result - end + # Even when walls are visited, they will maintain their wall color ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def test_open_entity_multiply_number args, assert~ -- Inside source: true -*** True Line Result - def test_open_entity_multiply_number args, assert -** Processing line: ~ assert.nil! args.state.i_value~ +** Processing line: ~ # This search numbers the order in which new cells are explored~ - Inside source: true *** True Line Result - assert.nil! args.state.i_value -** Processing line: ~ args.state.i_value *= 5~ + # This search numbers the order in which new cells are explored +** Processing line: ~ # The next cell from where the search will continue is highlighted yellow~ - Inside source: true *** True Line Result - args.state.i_value *= 5 -** Processing line: ~ assert.equal! args.state.i_value, 0~ + # The next cell from where the search will continue is highlighted yellow +** Processing line: ~ # And the cells that will be considered for expansion are in semi-transparent green~ - Inside source: true *** True Line Result - assert.equal! args.state.i_value, 0 + # And the cells that will be considered for expansion are in semi-transparent green ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ assert.nil! args.state.f_value~ +** Processing line: ~ # The star can be moved by clicking and dragging~ - Inside source: true *** True Line Result - assert.nil! args.state.f_value -** Processing line: ~ args.state.f_value *= 5.5~ + # The star can be moved by clicking and dragging +** Processing line: ~ # Walls can be added and removed by clicking and dragging~ - Inside source: true *** True Line Result - args.state.f_value *= 5.5 -** Processing line: ~ assert.equal! args.state.f_value, 0~ + # Walls can be added and removed by clicking and dragging +** Processing line: ~~ - Inside source: true *** True Line Result - assert.equal! args.state.f_value, 0 -** Processing line: ~ end~ + +** Processing line: ~ class DetailedBreadthFirstSearch~ - Inside source: true *** True Line Result - end + class DetailedBreadthFirstSearch +** Processing line: ~ attr_gtk~ +- Inside source: true +*** True Line Result + attr_gtk ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def test_open_entity_divide_number args, assert~ +** Processing line: ~ def initialize(args)~ - Inside source: true *** True Line Result - def test_open_entity_divide_number args, assert -** Processing line: ~ assert.nil! args.state.i_value~ + def initialize(args) +** Processing line: ~ # Variables to edit the size and appearance of the grid~ - Inside source: true *** True Line Result - assert.nil! args.state.i_value -** Processing line: ~ args.state.i_value /= 5~ + # Variables to edit the size and appearance of the grid +** Processing line: ~ # Freely customizable to user's liking~ - Inside source: true *** True Line Result - args.state.i_value /= 5 -** Processing line: ~ assert.equal! args.state.i_value, 0~ + # Freely customizable to user's liking +** Processing line: ~ args.state.grid.width = 9~ - Inside source: true *** True Line Result - assert.equal! args.state.i_value, 0 + args.state.grid.width = 9 +** Processing line: ~ args.state.grid.height = 4~ +- Inside source: true +*** True Line Result + args.state.grid.height = 4 +** Processing line: ~ args.state.grid.cell_size = 90~ +- Inside source: true +*** True Line Result + args.state.grid.cell_size = 90 ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ assert.nil! args.state.f_value~ +** Processing line: ~ # Stores which step of the animation is being rendered~ - Inside source: true *** True Line Result - assert.nil! args.state.f_value -** Processing line: ~ args.state.f_value /= 5.5~ + # Stores which step of the animation is being rendered +** Processing line: ~ # When the user moves the star or messes with the walls,~ - Inside source: true *** True Line Result - args.state.f_value /= 5.5 -** Processing line: ~ assert.equal! args.state.f_value, 0~ + # When the user moves the star or messes with the walls, +** Processing line: ~ # the breadth first search is recalculated up to this step~ - Inside source: true *** True Line Result - assert.equal! args.state.f_value, 0 -** Processing line: ~ end~ + # the breadth first search is recalculated up to this step +** Processing line: ~ args.state.anim_steps = 0~ - Inside source: true *** True Line Result - end + args.state.anim_steps = 0 ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # array~ +** Processing line: ~ # At some step the animation will end,~ - Inside source: true *** True Line Result - # array -** Processing line: ~ def test_open_entity_add_array args, assert~ + # At some step the animation will end, +** Processing line: ~ # and further steps won't change anything (the whole grid will be explored)~ - Inside source: true *** True Line Result - def test_open_entity_add_array args, assert -** Processing line: ~ assert.nil! args.state.values~ + # and further steps won't change anything (the whole grid will be explored) +** Processing line: ~ # This step is roughly the grid's width * height~ - Inside source: true *** True Line Result - assert.nil! args.state.values -** Processing line: ~ args.state.values += [:a, :b, :c]~ + # This step is roughly the grid's width * height +** Processing line: ~ # When anim_steps equals max_steps no more calculations will occur~ - Inside source: true *** True Line Result - args.state.values += [:a, :b, :c] -** Processing line: ~ assert.equal! args.state.values, [:a, :b, :c]~ + # When anim_steps equals max_steps no more calculations will occur +** Processing line: ~ # and the slider will be at the end~ - Inside source: true *** True Line Result - assert.equal! args.state.values, [:a, :b, :c] -** Processing line: ~ end~ + # and the slider will be at the end +** Processing line: ~ args.state.max_steps = args.state.grid.width * args.state.grid.height~ - Inside source: true *** True Line Result - end + args.state.max_steps = args.state.grid.width * args.state.grid.height ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def test_open_entity_subtract_array args, assert~ +** Processing line: ~ # The location of the star and walls of the grid~ - Inside source: true *** True Line Result - def test_open_entity_subtract_array args, assert -** Processing line: ~ assert.nil! args.state.values~ + # The location of the star and walls of the grid +** Processing line: ~ # They can be modified to have a different initial grid~ - Inside source: true *** True Line Result - assert.nil! args.state.values -** Processing line: ~ args.state.values -= [:a, :b, :c]~ + # They can be modified to have a different initial grid +** Processing line: ~ # Walls are stored in a hash for quick look up when doing the search~ - Inside source: true *** True Line Result - args.state.values -= [:a, :b, :c] -** Processing line: ~ assert.equal! args.state.values, []~ + # Walls are stored in a hash for quick look up when doing the search +** Processing line: ~ args.state.star = [3, 2]~ - Inside source: true *** True Line Result - assert.equal! args.state.values, [] -** Processing line: ~ end~ + args.state.star = [3, 2] +** Processing line: ~ args.state.walls = {}~ - Inside source: true *** True Line Result - end + args.state.walls = {} ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def test_open_entity_shovel_array args, assert~ +** Processing line: ~ # Variables that are used by the breadth first search~ - Inside source: true *** True Line Result - def test_open_entity_shovel_array args, assert -** Processing line: ~ assert.nil! args.state.values~ + # Variables that are used by the breadth first search +** Processing line: ~ # Storing cells that the search has visited, prevents unnecessary steps~ - Inside source: true *** True Line Result - assert.nil! args.state.values -** Processing line: ~ args.state.values << :a~ + # Storing cells that the search has visited, prevents unnecessary steps +** Processing line: ~ # Expanding the frontier of the search in order makes the search expand~ - Inside source: true *** True Line Result - args.state.values << :a -** Processing line: ~ assert.equal! args.state.values, [:a]~ + # Expanding the frontier of the search in order makes the search expand +** Processing line: ~ # from the center outward~ - Inside source: true *** True Line Result - assert.equal! args.state.values, [:a] -** Processing line: ~ end~ + # from the center outward +** Processing line: ~ args.state.visited = {}~ - Inside source: true *** True Line Result - end + args.state.visited = {} +** Processing line: ~ args.state.frontier = []~ +- Inside source: true +*** True Line Result + args.state.frontier = [] +** Processing line: ~ args.state.cell_numbers = []~ +- Inside source: true +*** True Line Result + args.state.cell_numbers = [] ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def test_open_entity_enumerate args, assert~ +** Processing line: ~~ - Inside source: true *** True Line Result - def test_open_entity_enumerate args, assert -** Processing line: ~ assert.nil! args.state.values~ + +** Processing line: ~~ - Inside source: true *** True Line Result - assert.nil! args.state.values -** Processing line: ~ args.state.values = args.state.values.map_with_index { |i| i }~ + +** Processing line: ~ # What the user is currently editing on the grid~ - Inside source: true *** True Line Result - args.state.values = args.state.values.map_with_index { |i| i } -** Processing line: ~ assert.equal! args.state.values, []~ + # What the user is currently editing on the grid +** Processing line: ~ # Possible values are: :none, :slider, :star, :remove_wall, :add_wall~ - Inside source: true *** True Line Result - assert.equal! args.state.values, [] + # Possible values are: :none, :slider, :star, :remove_wall, :add_wall ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ assert.nil! args.state.values_2~ +** Processing line: ~ # We store this value, because we want to remember the value even when~ - Inside source: true *** True Line Result - assert.nil! args.state.values_2 -** Processing line: ~ args.state.values_2 = args.state.values_2.map { |i| i }~ + # We store this value, because we want to remember the value even when +** Processing line: ~ # the user's cursor is no longer over what they're interacting with, but~ - Inside source: true *** True Line Result - args.state.values_2 = args.state.values_2.map { |i| i } -** Processing line: ~ assert.equal! args.state.values_2, []~ + # the user's cursor is no longer over what they're interacting with, but +** Processing line: ~ # they are still clicking down on the mouse.~ - Inside source: true *** True Line Result - assert.equal! args.state.values_2, [] + # they are still clicking down on the mouse. +** Processing line: ~ args.state.click_and_drag = :none~ +- Inside source: true +*** True Line Result + args.state.click_and_drag = :none ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ assert.nil! args.state.values_3~ +** Processing line: ~ # The x, y, w, h values for the buttons~ - Inside source: true *** True Line Result - assert.nil! args.state.values_3 -** Processing line: ~ args.state.values_3 = args.state.values_3.flat_map { |i| i }~ + # The x, y, w, h values for the buttons +** Processing line: ~ # Allow easy movement of the buttons location~ - Inside source: true *** True Line Result - args.state.values_3 = args.state.values_3.flat_map { |i| i } -** Processing line: ~ assert.equal! args.state.values_3, []~ + # Allow easy movement of the buttons location +** Processing line: ~ # A centralized location to get values to detect input and draw the buttons~ - Inside source: true *** True Line Result - assert.equal! args.state.values_3, [] -** Processing line: ~ end~ + # A centralized location to get values to detect input and draw the buttons +** Processing line: ~ # Editing these values might mean needing to edit the label offsets~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + # Editing these values might mean needing to edit the label offsets +** Processing line: ~ # which can be found in the appropriate render button methods~ - Inside source: true *** True Line Result - -** Processing line: ~ # hashes~ + # which can be found in the appropriate render button methods +** Processing line: ~ args.state.buttons.left = [450, 600, 160, 50]~ - Inside source: true *** True Line Result - # hashes -** Processing line: ~ def test_open_entity_indexer args, assert~ + args.state.buttons.left = [450, 600, 160, 50] +** Processing line: ~ args.state.buttons.right = [610, 600, 160, 50]~ - Inside source: true *** True Line Result - def test_open_entity_indexer args, assert -** Processing line: ~ GTK::Entity.__reset_id__!~ + args.state.buttons.right = [610, 600, 160, 50] +** Processing line: ~~ - Inside source: true *** True Line Result - GTK::Entity.__reset_id__! -** Processing line: ~ assert.nil! args.state.values~ + +** Processing line: ~ # The variables below are related to the slider~ - Inside source: true *** True Line Result - assert.nil! args.state.values -** Processing line: ~ args.state.values[:test] = :value~ + # The variables below are related to the slider +** Processing line: ~ # They allow the user to customize them~ - Inside source: true *** True Line Result - args.state.values[:test] = :value -** Processing line: ~ assert.equal! args.state.values.to_s, { entity_id: 1, entity_name: :values, entity_keys_by_ref: {}, test: :value }.to_s~ + # They allow the user to customize them +** Processing line: ~ # They also give a central location for the render and input methods to get~ - Inside source: true *** True Line Result - assert.equal! args.state.values.to_s, { entity_id: 1, entity_name: :values, entity_keys_by_ref: {}, test: :value }.to_s -** Processing line: ~ end~ + # They also give a central location for the render and input methods to get +** Processing line: ~ # information from~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + # information from +** Processing line: ~ # x & y are the coordinates of the leftmost part of the slider line~ - Inside source: true *** True Line Result - -** Processing line: ~ # bug~ + # x & y are the coordinates of the leftmost part of the slider line +** Processing line: ~ args.state.slider.x = 400~ - Inside source: true *** True Line Result - # bug -** Processing line: ~ def test_open_entity_nil_bug args, assert~ + args.state.slider.x = 400 +** Processing line: ~ args.state.slider.y = 675~ - Inside source: true *** True Line Result - def test_open_entity_nil_bug args, assert -** Processing line: ~ GTK::Entity.__reset_id__!~ + args.state.slider.y = 675 +** Processing line: ~ # This is the width of the line~ - Inside source: true *** True Line Result - GTK::Entity.__reset_id__! -** Processing line: ~ args.state.foo.a~ + # This is the width of the line +** Processing line: ~ args.state.slider.w = 360~ - Inside source: true *** True Line Result - args.state.foo.a -** Processing line: ~ args.state.foo.b~ + args.state.slider.w = 360 +** Processing line: ~ # This is the offset for the circle~ - Inside source: true *** True Line Result - args.state.foo.b -** Processing line: ~ @hello[:foobar]~ + # This is the offset for the circle +** Processing line: ~ # Allows the center of the circle to be on the line,~ - Inside source: true *** True Line Result - @hello[:foobar] -** Processing line: ~ assert.nil! args.state.foo.a, "a was not nil."~ + # Allows the center of the circle to be on the line, +** Processing line: ~ # as opposed to the upper right corner~ - Inside source: true *** True Line Result - assert.nil! args.state.foo.a, "a was not nil." -** Processing line: ~ # the line below fails~ + # as opposed to the upper right corner +** Processing line: ~ args.state.slider.offset = 20~ - Inside source: true *** True Line Result - # the line below fails -** Processing line: ~ # assert.nil! args.state.foo.b, "b was not nil."~ + args.state.slider.offset = 20 +** Processing line: ~ # This is the spacing between each of the notches on the slider~ - Inside source: true *** True Line Result - # assert.nil! args.state.foo.b, "b was not nil." -** Processing line: ~ end~ + # This is the spacing between each of the notches on the slider +** Processing line: ~ # Notches are places where the circle can rest on the slider line~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + # Notches are places where the circle can rest on the slider line +** Processing line: ~ # There needs to be a notch for each step before the maximum number of steps~ - Inside source: true *** True Line Result - -** Processing line: ~#+end_src~ -- Line was identified as the end of a code block. + # There needs to be a notch for each step before the maximum number of steps +** Processing line: ~ args.state.slider.spacing = args.state.slider.w.to_f / args.state.max_steps.to_f~ +- Inside source: true *** True Line Result -#+end_src + args.state.slider.spacing = args.state.slider.w.to_f / args.state.max_steps.to_f +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ -- End of paragraph detected. +- Inside source: true *** True Line Result -** Processing line: ~*** Advanced Debugging - Unit Tests - object_to_primitive_tests.rb~ -- Header detected. +** Processing line: ~ # This method is called every frame/tick~ +- Inside source: true *** True Line Result - + # This method is called every frame/tick +** Processing line: ~ # Every tick, the current state of the search is rendered on the screen,~ +- Inside source: true *** True Line Result -*** Advanced Debugging - Unit Tests - object_to_primitive_tests.rb -** Processing line: ~#+begin_src ruby~ -- Line was identified as the beginning of a code block. + # Every tick, the current state of the search is rendered on the screen, +** Processing line: ~ # User input is processed, and~ +- Inside source: true *** True Line Result - + # User input is processed, and +** Processing line: ~ def tick~ +- Inside source: true *** True Line Result -#+begin_src ruby -** Processing line: ~ # ./samples/10_advanced_debugging/03_unit_tests/object_to_primitive_tests.rb~ + def tick +** Processing line: ~ render~ - Inside source: true *** True Line Result - # ./samples/10_advanced_debugging/03_unit_tests/object_to_primitive_tests.rb -** Processing line: ~ class PlayerSpriteForTest~ + render +** Processing line: ~ input~ - Inside source: true *** True Line Result - class PlayerSpriteForTest -** Processing line: ~ end~ + input +** Processing line: ~ end~ - Inside source: true *** True Line Result - end + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def test_array_to_sprite args, assert~ +** Processing line: ~ # This method is called from tick and renders everything every tick~ - Inside source: true *** True Line Result - def test_array_to_sprite args, assert -** Processing line: ~ array = [[0, 0, 100, 100, "test.png"]].sprites~ + # This method is called from tick and renders everything every tick +** Processing line: ~ def render~ - Inside source: true *** True Line Result - array = [[0, 0, 100, 100, "test.png"]].sprites -** Processing line: ~ puts "No exception was thrown. Sweet!"~ + def render +** Processing line: ~ render_buttons~ - Inside source: true *** True Line Result - puts "No exception was thrown. Sweet!" -** Processing line: ~ end~ + render_buttons +** Processing line: ~ render_slider~ - Inside source: true *** True Line Result - end + render_slider ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def test_class_to_sprite args, assert~ +** Processing line: ~ render_background~ - Inside source: true *** True Line Result - def test_class_to_sprite args, assert -** Processing line: ~ array = [PlayerSprite.new].sprites~ + render_background +** Processing line: ~ render_visited~ - Inside source: true *** True Line Result - array = [PlayerSprite.new].sprites -** Processing line: ~ assert.true! array.first.is_a?(PlayerSprite)~ + render_visited +** Processing line: ~ render_frontier~ - Inside source: true *** True Line Result - assert.true! array.first.is_a?(PlayerSprite) -** Processing line: ~ puts "No exception was thrown. Sweet!"~ + render_frontier +** Processing line: ~ render_walls~ - Inside source: true *** True Line Result - puts "No exception was thrown. Sweet!" -** Processing line: ~ end~ + render_walls +** Processing line: ~ render_star~ - Inside source: true *** True Line Result - end + render_star ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ $gtk.reset 100~ +** Processing line: ~ render_highlights~ - Inside source: true *** True Line Result - $gtk.reset 100 -** Processing line: ~ $gtk.log_level = :off~ + render_highlights +** Processing line: ~ render_cell_numbers~ - Inside source: true *** True Line Result - $gtk.log_level = :off -** Processing line: ~~ + render_cell_numbers +** Processing line: ~ end~ - Inside source: true *** True Line Result - -** Processing line: ~#+end_src~ -- Line was identified as the end of a code block. -*** True Line Result -#+end_src + end ** Processing line: ~~ -- End of paragraph detected. -*** True Line Result - -** Processing line: ~*** Advanced Debugging - Unit Tests - parsing_tests.rb~ -- Header detected. +- Inside source: true *** True Line Result +** Processing line: ~ # The methods below subdivide the task of drawing everything to the screen~ +- Inside source: true *** True Line Result -*** Advanced Debugging - Unit Tests - parsing_tests.rb -** Processing line: ~#+begin_src ruby~ -- Line was identified as the beginning of a code block. + # The methods below subdivide the task of drawing everything to the screen +** Processing line: ~~ +- Inside source: true *** True Line Result +** Processing line: ~ # Draws the buttons that move the search backward or forward~ +- Inside source: true *** True Line Result -#+begin_src ruby -** Processing line: ~ # ./samples/10_advanced_debugging/03_unit_tests/parsing_tests.rb~ + # Draws the buttons that move the search backward or forward +** Processing line: ~ # These buttons are rendered so the user knows where to click to move the search~ - Inside source: true *** True Line Result - # ./samples/10_advanced_debugging/03_unit_tests/parsing_tests.rb -** Processing line: ~ def test_parse_json args, assert~ + # These buttons are rendered so the user knows where to click to move the search +** Processing line: ~ def render_buttons~ - Inside source: true *** True Line Result - def test_parse_json args, assert -** Processing line: ~ result = args.gtk.parse_json '{ "name": "John Doe", "aliases": ["JD"] }'~ + def render_buttons +** Processing line: ~ render_left_button~ - Inside source: true *** True Line Result - result = args.gtk.parse_json '{ "name": "John Doe", "aliases": ["JD"] }' -** Processing line: ~ assert.equal! result, { "name"=>"John Doe", "aliases"=>["JD"] }, "Parsing JSON failed."~ + render_left_button +** Processing line: ~ render_right_button~ - Inside source: true *** True Line Result - assert.equal! result, { "name"=>"John Doe", "aliases"=>["JD"] }, "Parsing JSON failed." -** Processing line: ~ end~ + render_right_button +** Processing line: ~ end~ - Inside source: true *** True Line Result - end + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def test_parse_xml args, assert~ -- Inside source: true -*** True Line Result - def test_parse_xml args, assert -** Processing line: ~ result = args.gtk.parse_xml <<-S~ -- Inside source: true -*** True Line Result - result = args.gtk.parse_xml <<-S -** Processing line: ~ ~ +** Processing line: ~ # Renders the button which steps the search backward~ - Inside source: true *** True Line Result - -** Processing line: ~ John Doe~ + # Renders the button which steps the search backward +** Processing line: ~ # Shows the user where to click to move the search backward~ - Inside source: true *** True Line Result - John Doe -** Processing line: ~ ~ + # Shows the user where to click to move the search backward +** Processing line: ~ def render_left_button~ - Inside source: true *** True Line Result - -** Processing line: ~ S~ + def render_left_button +** Processing line: ~ # Draws the gray button, and a black border~ - Inside source: true *** True Line Result - S -** Processing line: ~~ + # Draws the gray button, and a black border +** Processing line: ~ # The border separates the buttons visually~ - Inside source: true *** True Line Result - -** Processing line: ~ expected = {:type=>:element,~ + # The border separates the buttons visually +** Processing line: ~ outputs.solids << [buttons.left, gray]~ - Inside source: true *** True Line Result - expected = {:type=>:element, -** Processing line: ~ :name=>nil,~ + outputs.solids << [buttons.left, gray] +** Processing line: ~ outputs.borders << [buttons.left, black]~ - Inside source: true *** True Line Result - :name=>nil, -** Processing line: ~ :children=>[{:type=>:element,~ + outputs.borders << [buttons.left, black] +** Processing line: ~~ - Inside source: true *** True Line Result - :children=>[{:type=>:element, -** Processing line: ~ :name=>"Person",~ + +** Processing line: ~ # Renders an explanatory label in the center of the button~ - Inside source: true *** True Line Result - :name=>"Person", -** Processing line: ~ :children=>[{:type=>:element,~ + # Renders an explanatory label in the center of the button +** Processing line: ~ # Explains to the user what the button does~ - Inside source: true *** True Line Result - :children=>[{:type=>:element, -** Processing line: ~ :name=>"Name",~ + # Explains to the user what the button does +** Processing line: ~ label_x = buttons.left.x + 05~ - Inside source: true *** True Line Result - :name=>"Name", -** Processing line: ~ :children=>[{:type=>:content,~ + label_x = buttons.left.x + 05 +** Processing line: ~ label_y = buttons.left.y + 35~ - Inside source: true *** True Line Result - :children=>[{:type=>:content, -** Processing line: ~ :data=>"John Doe"}]}],~ + label_y = buttons.left.y + 35 +** Processing line: ~ outputs.labels << [label_x, label_y, "< Step backward"]~ - Inside source: true *** True Line Result - :data=>"John Doe"}]}], -** Processing line: ~ :attributes=>{"id"=>"100"}}]}~ + outputs.labels << [label_x, label_y, "< Step backward"] +** Processing line: ~ end~ - Inside source: true *** True Line Result - :attributes=>{"id"=>"100"}}]} + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ assert.equal! result, expected, "Parsing xml failed."~ +** Processing line: ~ # Renders the button which steps the search forward~ - Inside source: true *** True Line Result - assert.equal! result, expected, "Parsing xml failed." -** Processing line: ~ end~ + # Renders the button which steps the search forward +** Processing line: ~ # Shows the user where to click to move the search forward~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + # Shows the user where to click to move the search forward +** Processing line: ~ def render_right_button~ - Inside source: true *** True Line Result - -** Processing line: ~ $gtk.reset 100~ + def render_right_button +** Processing line: ~ # Draws the gray button, and a black border~ - Inside source: true *** True Line Result - $gtk.reset 100 -** Processing line: ~ $gtk.log_level = :off~ + # Draws the gray button, and a black border +** Processing line: ~ # The border separates the buttons visually~ - Inside source: true *** True Line Result - $gtk.log_level = :off -** Processing line: ~~ + # The border separates the buttons visually +** Processing line: ~ outputs.solids << [buttons.right, gray]~ - Inside source: true *** True Line Result - -** Processing line: ~#+end_src~ -- Line was identified as the end of a code block. + outputs.solids << [buttons.right, gray] +** Processing line: ~ outputs.borders << [buttons.right, black]~ +- Inside source: true *** True Line Result -#+end_src + outputs.borders << [buttons.right, black] ** Processing line: ~~ -- End of paragraph detected. -*** True Line Result - -** Processing line: ~*** Advanced Debugging - Unit Tests - require_tests.rb~ -- Header detected. +- Inside source: true *** True Line Result +** Processing line: ~ # Renders an explanatory label in the center of the button~ +- Inside source: true *** True Line Result -*** Advanced Debugging - Unit Tests - require_tests.rb -** Processing line: ~#+begin_src ruby~ -- Line was identified as the beginning of a code block. -*** True Line Result - + # Renders an explanatory label in the center of the button +** Processing line: ~ # Explains to the user what the button does~ +- Inside source: true *** True Line Result -#+begin_src ruby -** Processing line: ~ # ./samples/10_advanced_debugging/03_unit_tests/require_tests.rb~ + # Explains to the user what the button does +** Processing line: ~ label_x = buttons.right.x + 10~ - Inside source: true *** True Line Result - # ./samples/10_advanced_debugging/03_unit_tests/require_tests.rb -** Processing line: ~ def write_src path, src~ + label_x = buttons.right.x + 10 +** Processing line: ~ label_y = buttons.right.y + 35~ - Inside source: true *** True Line Result - def write_src path, src -** Processing line: ~ $gtk.write_file path, src~ + label_y = buttons.right.y + 35 +** Processing line: ~ outputs.labels << [label_x, label_y, "Step forward >"]~ - Inside source: true *** True Line Result - $gtk.write_file path, src -** Processing line: ~ end~ + outputs.labels << [label_x, label_y, "Step forward >"] +** Processing line: ~ end~ - Inside source: true *** True Line Result - end + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ write_src 'app/unit_testing_game.rb', <<-S~ +** Processing line: ~ # Draws the slider so the user can move it and see the progress of the search~ - Inside source: true *** True Line Result - write_src 'app/unit_testing_game.rb', <<-S -** Processing line: ~ module UnitTesting~ + # Draws the slider so the user can move it and see the progress of the search +** Processing line: ~ def render_slider~ - Inside source: true *** True Line Result - module UnitTesting -** Processing line: ~ class Game~ + def render_slider +** Processing line: ~ # Using primitives hides the line under the white circle of the slider~ - Inside source: true *** True Line Result - class Game -** Processing line: ~ end~ + # Using primitives hides the line under the white circle of the slider +** Processing line: ~ # Draws the line~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + # Draws the line +** Processing line: ~ outputs.primitives << [slider.x, slider.y, slider.x + slider.w, slider.y].line~ - Inside source: true *** True Line Result - end -** Processing line: ~ S~ + outputs.primitives << [slider.x, slider.y, slider.x + slider.w, slider.y].line +** Processing line: ~ # The circle needs to be offset so that the center of the circle~ - Inside source: true *** True Line Result - S -** Processing line: ~~ + # The circle needs to be offset so that the center of the circle +** Processing line: ~ # overlaps the line instead of the upper right corner of the circle~ - Inside source: true *** True Line Result - -** Processing line: ~ write_src 'lib/unit_testing_lib.rb', <<-S~ + # overlaps the line instead of the upper right corner of the circle +** Processing line: ~ # The circle's x value is also moved based on the current seach step~ - Inside source: true *** True Line Result - write_src 'lib/unit_testing_lib.rb', <<-S -** Processing line: ~ module UnitTesting~ + # The circle's x value is also moved based on the current seach step +** Processing line: ~ circle_x = (slider.x - slider.offset) + (state.anim_steps * slider.spacing)~ - Inside source: true *** True Line Result - module UnitTesting -** Processing line: ~ class Lib~ + circle_x = (slider.x - slider.offset) + (state.anim_steps * slider.spacing) +** Processing line: ~ circle_y = (slider.y - slider.offset)~ - Inside source: true *** True Line Result - class Lib -** Processing line: ~ end~ + circle_y = (slider.y - slider.offset) +** Processing line: ~ circle_rect = [circle_x, circle_y, 37, 37]~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + circle_rect = [circle_x, circle_y, 37, 37] +** Processing line: ~ outputs.primitives << [circle_rect, 'circle-white.png'].sprite~ - Inside source: true *** True Line Result - end -** Processing line: ~ S~ + outputs.primitives << [circle_rect, 'circle-white.png'].sprite +** Processing line: ~ end~ - Inside source: true *** True Line Result - S + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ write_src 'app/nested/unit_testing_nested.rb', <<-S~ -- Inside source: true -*** True Line Result - write_src 'app/nested/unit_testing_nested.rb', <<-S -** Processing line: ~ module UnitTesting~ +** Processing line: ~ # Draws what the grid looks like with nothing on it~ - Inside source: true *** True Line Result - module UnitTesting -** Processing line: ~ class Nested~ + # Draws what the grid looks like with nothing on it +** Processing line: ~ # Which is a bunch of unvisited cells~ - Inside source: true *** True Line Result - class Nested -** Processing line: ~ end~ + # Which is a bunch of unvisited cells +** Processing line: ~ # Drawn first so other things can draw on top of it~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + # Drawn first so other things can draw on top of it +** Processing line: ~ def render_background~ - Inside source: true *** True Line Result - end -** Processing line: ~ S~ + def render_background +** Processing line: ~ render_unvisited~ - Inside source: true *** True Line Result - S + render_unvisited ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ require 'app/unit_testing_game.rb'~ +** Processing line: ~ # The grid lines make the cells appear separate~ - Inside source: true *** True Line Result - require 'app/unit_testing_game.rb' -** Processing line: ~ require 'app/nested/unit_testing_nested.rb'~ + # The grid lines make the cells appear separate +** Processing line: ~ render_grid_lines~ - Inside source: true *** True Line Result - require 'app/nested/unit_testing_nested.rb' -** Processing line: ~ require 'lib/unit_testing_lib.rb'~ + render_grid_lines +** Processing line: ~ end~ - Inside source: true *** True Line Result - require 'lib/unit_testing_lib.rb' + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def test_require args, assert~ +** Processing line: ~ # Draws a rectangle the size of the entire grid to represent unvisited cells~ - Inside source: true *** True Line Result - def test_require args, assert -** Processing line: ~ UnitTesting::Game.new~ + # Draws a rectangle the size of the entire grid to represent unvisited cells +** Processing line: ~ # Unvisited cells are the default cell~ - Inside source: true *** True Line Result - UnitTesting::Game.new -** Processing line: ~ UnitTesting::Lib.new~ + # Unvisited cells are the default cell +** Processing line: ~ def render_unvisited~ - Inside source: true *** True Line Result - UnitTesting::Lib.new -** Processing line: ~ UnitTesting::Nested.new~ + def render_unvisited +** Processing line: ~ background = [0, 0, grid.width, grid.height]~ - Inside source: true *** True Line Result - UnitTesting::Nested.new -** Processing line: ~ $gtk.exec 'rm ./mygame/app/unit_testing_game.rb'~ + background = [0, 0, grid.width, grid.height] +** Processing line: ~ outputs.solids << [scale_up(background), unvisited_color]~ - Inside source: true *** True Line Result - $gtk.exec 'rm ./mygame/app/unit_testing_game.rb' -** Processing line: ~ $gtk.exec 'rm ./mygame/app/nested/unit_testing_nested.rb'~ + outputs.solids << [scale_up(background), unvisited_color] +** Processing line: ~ end~ - Inside source: true *** True Line Result - $gtk.exec 'rm ./mygame/app/nested/unit_testing_nested.rb' -** Processing line: ~ $gtk.exec 'rm ./mygame/lib/unit_testing_lib.rb'~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - $gtk.exec 'rm ./mygame/lib/unit_testing_lib.rb' -** Processing line: ~ assert.ok!~ + +** Processing line: ~ # Draws grid lines to show the division of the grid into cells~ - Inside source: true *** True Line Result - assert.ok! -** Processing line: ~ end~ + # Draws grid lines to show the division of the grid into cells +** Processing line: ~ def render_grid_lines~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + def render_grid_lines +** Processing line: ~ for x in 0..grid.width~ - Inside source: true *** True Line Result - -** Processing line: ~#+end_src~ -- Line was identified as the end of a code block. + for x in 0..grid.width +** Processing line: ~ outputs.lines << [scale_up(vertical_line(x)), grid_line_color]~ +- Inside source: true *** True Line Result -#+end_src -** Processing line: ~~ -- End of paragraph detected. + outputs.lines << [scale_up(vertical_line(x)), grid_line_color] +** Processing line: ~ end~ +- Inside source: true *** True Line Result - -** Processing line: ~*** Advanced Debugging - Unit Tests - serialize_deserialize_tests.rb~ -- Header detected. + end +** Processing line: ~~ +- Inside source: true *** True Line Result +** Processing line: ~ for y in 0..grid.height~ +- Inside source: true *** True Line Result -*** Advanced Debugging - Unit Tests - serialize_deserialize_tests.rb -** Processing line: ~#+begin_src ruby~ -- Line was identified as the beginning of a code block. + for y in 0..grid.height +** Processing line: ~ outputs.lines << [scale_up(horizontal_line(y)), grid_line_color]~ +- Inside source: true *** True Line Result - + outputs.lines << [scale_up(horizontal_line(y)), grid_line_color] +** Processing line: ~ end~ +- Inside source: true *** True Line Result -#+begin_src ruby -** Processing line: ~ # ./samples/10_advanced_debugging/03_unit_tests/serialize_deserialize_tests.rb~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - # ./samples/10_advanced_debugging/03_unit_tests/serialize_deserialize_tests.rb -** Processing line: ~ def test_serialize args, assert~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - def test_serialize args, assert -** Processing line: ~ GTK::Entity.__reset_id__!~ + +** Processing line: ~ # Easy way to get a vertical line given an index~ - Inside source: true *** True Line Result - GTK::Entity.__reset_id__! -** Processing line: ~ args.state.player_one = "test"~ + # Easy way to get a vertical line given an index +** Processing line: ~ def vertical_line column~ - Inside source: true *** True Line Result - args.state.player_one = "test" -** Processing line: ~ result = args.gtk.serialize_state args.state~ + def vertical_line column +** Processing line: ~ [column, 0, column, grid.height]~ - Inside source: true *** True Line Result - result = args.gtk.serialize_state args.state -** Processing line: ~ assert.equal! result, "{:entity_id=>3, :entity_keys_by_ref=>{}, :tick_count=>-1, :player_one=>\"test\"}"~ + [column, 0, column, grid.height] +** Processing line: ~ end~ - Inside source: true *** True Line Result - assert.equal! result, "{:entity_id=>3, :entity_keys_by_ref=>{}, :tick_count=>-1, :player_one=>\"test\"}" + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ GTK::Entity.__reset_id__!~ -- Inside source: true -*** True Line Result - GTK::Entity.__reset_id__! -** Processing line: ~ args.gtk.write_file 'state.txt', ''~ +** Processing line: ~ # Easy way to get a horizontal line given an index~ - Inside source: true *** True Line Result - args.gtk.write_file 'state.txt', '' -** Processing line: ~ result = args.gtk.serialize_state 'state.txt', args.state~ + # Easy way to get a horizontal line given an index +** Processing line: ~ def horizontal_line row~ - Inside source: true *** True Line Result - result = args.gtk.serialize_state 'state.txt', args.state -** Processing line: ~ assert.equal! result, "{:entity_id=>3, :entity_keys_by_ref=>{}, :tick_count=>-1, :player_one=>\"test\"}"~ + def horizontal_line row +** Processing line: ~ [0, row, grid.width, row]~ - Inside source: true *** True Line Result - assert.equal! result, "{:entity_id=>3, :entity_keys_by_ref=>{}, :tick_count=>-1, :player_one=>\"test\"}" -** Processing line: ~ end~ + [0, row, grid.width, row] +** Processing line: ~ end~ - Inside source: true *** True Line Result - end + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def test_deserialize args, assert~ +** Processing line: ~ # Draws the area that is going to be searched from~ - Inside source: true *** True Line Result - def test_deserialize args, assert -** Processing line: ~ GTK::Entity.__reset_id__!~ + # Draws the area that is going to be searched from +** Processing line: ~ # The frontier is the most outward parts of the search~ - Inside source: true *** True Line Result - GTK::Entity.__reset_id__! -** Processing line: ~ result = args.gtk.deserialize_state '{:entity_id=>3, :tick_count=>-1, :player_one=>"test"}'~ + # The frontier is the most outward parts of the search +** Processing line: ~ def render_frontier~ - Inside source: true *** True Line Result - result = args.gtk.deserialize_state '{:entity_id=>3, :tick_count=>-1, :player_one=>"test"}' -** Processing line: ~ assert.equal! result.player_one, "test"~ + def render_frontier +** Processing line: ~ state.frontier.each do |cell|~ - Inside source: true *** True Line Result - assert.equal! result.player_one, "test" + state.frontier.each do |cell| +** Processing line: ~ outputs.solids << [scale_up(cell), frontier_color]~ +- Inside source: true +*** True Line Result + outputs.solids << [scale_up(cell), frontier_color] +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ GTK::Entity.__reset_id__!~ +** Processing line: ~ # Draws the walls~ - Inside source: true *** True Line Result - GTK::Entity.__reset_id__! -** Processing line: ~ args.gtk.write_file 'state.txt', '{:entity_id=>3, :tick_count=>-1, :player_one=>"test"}'~ + # Draws the walls +** Processing line: ~ def render_walls~ - Inside source: true *** True Line Result - args.gtk.write_file 'state.txt', '{:entity_id=>3, :tick_count=>-1, :player_one=>"test"}' -** Processing line: ~ result = args.gtk.deserialize_state 'state.txt'~ + def render_walls +** Processing line: ~ state.walls.each_key do |wall|~ - Inside source: true *** True Line Result - result = args.gtk.deserialize_state 'state.txt' -** Processing line: ~ assert.equal! result.player_one, "test"~ + state.walls.each_key do |wall| +** Processing line: ~ outputs.solids << [scale_up(wall), wall_color]~ - Inside source: true *** True Line Result - assert.equal! result.player_one, "test" -** Processing line: ~ end~ + outputs.solids << [scale_up(wall), wall_color] +** Processing line: ~ end~ - Inside source: true *** True Line Result - end + end +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def test_very_large_serialization args, assert~ +** Processing line: ~ # Renders cells that have been searched in the appropriate color~ - Inside source: true *** True Line Result - def test_very_large_serialization args, assert -** Processing line: ~ GTK::Entity.__reset_id__!~ + # Renders cells that have been searched in the appropriate color +** Processing line: ~ def render_visited~ - Inside source: true *** True Line Result - GTK::Entity.__reset_id__! -** Processing line: ~ size = 3000~ + def render_visited +** Processing line: ~ state.visited.each_key do |cell|~ - Inside source: true *** True Line Result - size = 3000 -** Processing line: ~ size.map_with_index do |i|~ + state.visited.each_key do |cell| +** Processing line: ~ outputs.solids << [scale_up(cell), visited_color]~ - Inside source: true *** True Line Result - size.map_with_index do |i| -** Processing line: ~ args.state.send("k#{i}=".to_sym, i)~ + outputs.solids << [scale_up(cell), visited_color] +** Processing line: ~ end~ - Inside source: true *** True Line Result - args.state.send("k#{i}=".to_sym, i) + end ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -58184,418 +66671,394 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ result = args.gtk.serialize_state args.state~ +** Processing line: ~ # Renders the star~ - Inside source: true *** True Line Result - result = args.gtk.serialize_state args.state -** Processing line: ~ assert.true! (args.gtk.console.log.join.include? "unlikely a string this large will deserialize correctly")~ + # Renders the star +** Processing line: ~ def render_star~ - Inside source: true *** True Line Result - assert.true! (args.gtk.console.log.join.include? "unlikely a string this large will deserialize correctly") -** Processing line: ~ end~ + def render_star +** Processing line: ~ outputs.sprites << [scale_up(state.star), 'star.png']~ - Inside source: true *** True Line Result - end + outputs.sprites << [scale_up(state.star), 'star.png'] +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def test_strict_entity_serialization args, assert~ +** Processing line: ~ # Cells have a number rendered in them based on when they were explored~ - Inside source: true *** True Line Result - def test_strict_entity_serialization args, assert -** Processing line: ~ GTK::Entity.__reset_id__!~ + # Cells have a number rendered in them based on when they were explored +** Processing line: ~ # This is based off of their index in the cell_numbers array~ - Inside source: true *** True Line Result - GTK::Entity.__reset_id__! -** Processing line: ~ args.state.player_one = args.state.new_entity(:player, name: "Ryu")~ + # This is based off of their index in the cell_numbers array +** Processing line: ~ # Cells are added to this array the same time they are added to the frontier array~ - Inside source: true *** True Line Result - args.state.player_one = args.state.new_entity(:player, name: "Ryu") -** Processing line: ~ args.state.player_two = args.state.new_entity_strict(:player_strict, name: "Ken")~ + # Cells are added to this array the same time they are added to the frontier array +** Processing line: ~ def render_cell_numbers~ - Inside source: true *** True Line Result - args.state.player_two = args.state.new_entity_strict(:player_strict, name: "Ken") -** Processing line: ~~ + def render_cell_numbers +** Processing line: ~ state.cell_numbers.each_with_index do |cell, index|~ - Inside source: true *** True Line Result - -** Processing line: ~ serialized_state = args.gtk.serialize_state args.state~ + state.cell_numbers.each_with_index do |cell, index| +** Processing line: ~ # Math that approx centers the number in the cell~ - Inside source: true *** True Line Result - serialized_state = args.gtk.serialize_state args.state -** Processing line: ~ assert.equal! serialized_state, '{:entity_id=>1, :entity_keys_by_ref=>{}, :tick_count=>-1, :player_one=>{:entity_id=>1, :entity_name=>:player, :entity_keys_by_ref=>{}, :entity_type=>:player, :created_at=>-1, :global_created_at=>-1, :name=>"Ryu"}, :player_two=>{:entity_id=>3, :entity_name=>:player_strict, :entity_type=>:player_strict, :created_at=>-1, :global_created_at_elapsed=>-1, :entity_strict=>true, :entity_keys_by_ref=>{:entity_type=>:entity_name, :global_created_at_elapsed=>:created_at}, :name=>"Ken"}}'~ + # Math that approx centers the number in the cell +** Processing line: ~ label_x = (cell.x * grid.cell_size) + grid.cell_size / 2 - 5~ - Inside source: true *** True Line Result - assert.equal! serialized_state, '{:entity_id=>1, :entity_keys_by_ref=>{}, :tick_count=>-1, :player_one=>{:entity_id=>1, :entity_name=>:player, :entity_keys_by_ref=>{}, :entity_type=>:player, :created_at=>-1, :global_created_at=>-1, :name=>"Ryu"}, :player_two=>{:entity_id=>3, :entity_name=>:player_strict, :entity_type=>:player_strict, :created_at=>-1, :global_created_at_elapsed=>-1, :entity_strict=>true, :entity_keys_by_ref=>{:entity_type=>:entity_name, :global_created_at_elapsed=>:created_at}, :name=>"Ken"}}' + label_x = (cell.x * grid.cell_size) + grid.cell_size / 2 - 5 +** Processing line: ~ label_y = (cell.y * grid.cell_size) + (grid.cell_size / 2) + 5~ +- Inside source: true +*** True Line Result + label_y = (cell.y * grid.cell_size) + (grid.cell_size / 2) + 5 ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ GTK::Entity.__reset_id__!~ +** Processing line: ~ outputs.labels << [label_x, label_y, (index + 1).to_s]~ - Inside source: true *** True Line Result - GTK::Entity.__reset_id__! -** Processing line: ~ deserialize_state = args.gtk.deserialize_state serialized_state~ + outputs.labels << [label_x, label_y, (index + 1).to_s] +** Processing line: ~ end~ - Inside source: true *** True Line Result - deserialize_state = args.gtk.deserialize_state serialized_state -** Processing line: ~~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - -** Processing line: ~ assert.equal! args.state.player_one.name, deserialize_state.player_one.name~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - assert.equal! args.state.player_one.name, deserialize_state.player_one.name -** Processing line: ~ assert.true! args.state.player_one.is_a? GTK::OpenEntity~ + +** Processing line: ~ # The next frontier to be expanded is highlighted yellow~ - Inside source: true *** True Line Result - assert.true! args.state.player_one.is_a? GTK::OpenEntity -** Processing line: ~~ + # The next frontier to be expanded is highlighted yellow +** Processing line: ~ # Its adjacent non-wall neighbors have their border highlighted green~ - Inside source: true *** True Line Result - -** Processing line: ~ assert.equal! args.state.player_two.name, deserialize_state.player_two.name~ + # Its adjacent non-wall neighbors have their border highlighted green +** Processing line: ~ # This is to show the user how the search expands~ - Inside source: true *** True Line Result - assert.equal! args.state.player_two.name, deserialize_state.player_two.name -** Processing line: ~ assert.true! args.state.player_two.is_a? GTK::StrictEntity~ + # This is to show the user how the search expands +** Processing line: ~ def render_highlights~ - Inside source: true *** True Line Result - assert.true! args.state.player_two.is_a? GTK::StrictEntity -** Processing line: ~ end~ + def render_highlights +** Processing line: ~ return if state.frontier.empty?~ - Inside source: true *** True Line Result - end + return if state.frontier.empty? ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def test_strict_entity_serialization_with_nil args, assert~ -- Inside source: true -*** True Line Result - def test_strict_entity_serialization_with_nil args, assert -** Processing line: ~ GTK::Entity.__reset_id__!~ +** Processing line: ~ # Highlight the next frontier to be expanded yellow~ - Inside source: true *** True Line Result - GTK::Entity.__reset_id__! -** Processing line: ~ args.state.player_one = args.state.new_entity(:player, name: "Ryu")~ + # Highlight the next frontier to be expanded yellow +** Processing line: ~ next_frontier = state.frontier[0]~ - Inside source: true *** True Line Result - args.state.player_one = args.state.new_entity(:player, name: "Ryu") -** Processing line: ~ args.state.player_two = args.state.new_entity_strict(:player_strict, name: "Ken", blood_type: nil)~ + next_frontier = state.frontier[0] +** Processing line: ~ outputs.solids << [scale_up(next_frontier), highlighter_yellow]~ - Inside source: true *** True Line Result - args.state.player_two = args.state.new_entity_strict(:player_strict, name: "Ken", blood_type: nil) + outputs.solids << [scale_up(next_frontier), highlighter_yellow] ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ serialized_state = args.gtk.serialize_state args.state~ +** Processing line: ~ # Neighbors have a semi-transparent green layer over them~ - Inside source: true *** True Line Result - serialized_state = args.gtk.serialize_state args.state -** Processing line: ~ assert.equal! serialized_state, '{:entity_id=>9, :entity_keys_by_ref=>{}, :tick_count=>-1, :player_one=>{:entity_id=>1, :entity_name=>:player, :entity_keys_by_ref=>{}, :entity_type=>:player, :created_at=>-1, :global_created_at=>-1, :name=>"Ryu"}, :player_two=>{:entity_id=>2, :entity_name=>:player_strict, :entity_type=>:player_strict, :created_at=>-1, :global_created_at_elapsed=>-1, :entity_strict=>true, :entity_keys_by_ref=>{:entity_type=>:entity_name, :global_created_at_elapsed=>:created_at}, :name=>"Ken", :blood_type=>nil}}'~ + # Neighbors have a semi-transparent green layer over them +** Processing line: ~ # Unless the neighbor is a wall~ - Inside source: true *** True Line Result - assert.equal! serialized_state, '{:entity_id=>9, :entity_keys_by_ref=>{}, :tick_count=>-1, :player_one=>{:entity_id=>1, :entity_name=>:player, :entity_keys_by_ref=>{}, :entity_type=>:player, :created_at=>-1, :global_created_at=>-1, :name=>"Ryu"}, :player_two=>{:entity_id=>2, :entity_name=>:player_strict, :entity_type=>:player_strict, :created_at=>-1, :global_created_at_elapsed=>-1, :entity_strict=>true, :entity_keys_by_ref=>{:entity_type=>:entity_name, :global_created_at_elapsed=>:created_at}, :name=>"Ken", :blood_type=>nil}}' -** Processing line: ~~ + # Unless the neighbor is a wall +** Processing line: ~ adjacent_neighbors(next_frontier).each do |neighbor|~ - Inside source: true *** True Line Result - -** Processing line: ~ GTK::Entity.__reset_id__!~ + adjacent_neighbors(next_frontier).each do |neighbor| +** Processing line: ~ unless state.walls.has_key?(neighbor)~ - Inside source: true *** True Line Result - GTK::Entity.__reset_id__! -** Processing line: ~ deserialized_state = args.gtk.deserialize_state serialized_state~ + unless state.walls.has_key?(neighbor) +** Processing line: ~ outputs.solids << [scale_up(neighbor), highlighter_green, 70]~ - Inside source: true *** True Line Result - deserialized_state = args.gtk.deserialize_state serialized_state -** Processing line: ~~ + outputs.solids << [scale_up(neighbor), highlighter_green, 70] +** Processing line: ~ end~ - Inside source: true *** True Line Result - -** Processing line: ~ assert.equal! args.state.player_one.name, deserialized_state.player_one.name~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - assert.equal! args.state.player_one.name, deserialized_state.player_one.name -** Processing line: ~ assert.true! args.state.player_one.is_a? GTK::OpenEntity~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - assert.true! args.state.player_one.is_a? GTK::OpenEntity + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ assert.equal! args.state.player_two.name, deserialized_state.player_two.name~ -- Inside source: true -*** True Line Result - assert.equal! args.state.player_two.name, deserialized_state.player_two.name -** Processing line: ~ assert.equal! args.state.player_two.blood_type, deserialized_state.player_two.blood_type~ +** Processing line: ~~ - Inside source: true *** True Line Result - assert.equal! args.state.player_two.blood_type, deserialized_state.player_two.blood_type -** Processing line: ~ assert.equal! deserialized_state.player_two.blood_type, nil~ + +** Processing line: ~ # Cell Size is used when rendering to allow the grid to be scaled up or down~ - Inside source: true *** True Line Result - assert.equal! deserialized_state.player_two.blood_type, nil -** Processing line: ~ assert.true! args.state.player_two.is_a? GTK::StrictEntity~ + # Cell Size is used when rendering to allow the grid to be scaled up or down +** Processing line: ~ # Cells in the frontier array and visited hash and walls hash are stored as x & y~ - Inside source: true *** True Line Result - assert.true! args.state.player_two.is_a? GTK::StrictEntity -** Processing line: ~~ + # Cells in the frontier array and visited hash and walls hash are stored as x & y +** Processing line: ~ # Scaling up cells and lines when rendering allows omitting of width and height~ - Inside source: true *** True Line Result - -** Processing line: ~ deserialized_state.player_two.blood_type = :O~ + # Scaling up cells and lines when rendering allows omitting of width and height +** Processing line: ~ def scale_up(cell)~ - Inside source: true *** True Line Result - deserialized_state.player_two.blood_type = :O -** Processing line: ~ assert.equal! deserialized_state.player_two.blood_type, :O~ + def scale_up(cell) +** Processing line: ~ # Prevents the original value of cell from being edited~ - Inside source: true *** True Line Result - assert.equal! deserialized_state.player_two.blood_type, :O -** Processing line: ~ end~ + # Prevents the original value of cell from being edited +** Processing line: ~ cell = cell.clone~ - Inside source: true *** True Line Result - end + cell = cell.clone ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def test_multiple_strict_entities args, assert~ +** Processing line: ~ # If cell is just an x and y coordinate~ - Inside source: true *** True Line Result - def test_multiple_strict_entities args, assert -** Processing line: ~ GTK::Entity.__reset_id__!~ + # If cell is just an x and y coordinate +** Processing line: ~ if cell.size == 2~ - Inside source: true *** True Line Result - GTK::Entity.__reset_id__! -** Processing line: ~ args.state.player = args.state.new_entity_strict(:player_one, name: "Ryu")~ + if cell.size == 2 +** Processing line: ~ # Add a width and height of 1~ - Inside source: true *** True Line Result - args.state.player = args.state.new_entity_strict(:player_one, name: "Ryu") -** Processing line: ~ args.state.enemy = args.state.new_entity_strict(:enemy, name: "Bison", other_property: 'extra mean')~ + # Add a width and height of 1 +** Processing line: ~ cell << 1~ - Inside source: true *** True Line Result - args.state.enemy = args.state.new_entity_strict(:enemy, name: "Bison", other_property: 'extra mean') -** Processing line: ~~ + cell << 1 +** Processing line: ~ cell << 1~ - Inside source: true *** True Line Result - -** Processing line: ~ serialized_state = args.gtk.serialize_state args.state~ + cell << 1 +** Processing line: ~ end~ - Inside source: true *** True Line Result - serialized_state = args.gtk.serialize_state args.state + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ GTK::Entity.__reset_id__!~ +** Processing line: ~ # Scale all the values up~ - Inside source: true *** True Line Result - GTK::Entity.__reset_id__! -** Processing line: ~ deserialized_state = args.gtk.deserialize_state serialized_state~ + # Scale all the values up +** Processing line: ~ cell.map! { |value| value * grid.cell_size }~ - Inside source: true *** True Line Result - deserialized_state = args.gtk.deserialize_state serialized_state + cell.map! { |value| value * grid.cell_size } ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ assert.equal! deserialized_state.player.name, "Ryu"~ +** Processing line: ~ # Returns the scaled up cell~ - Inside source: true *** True Line Result - assert.equal! deserialized_state.player.name, "Ryu" -** Processing line: ~ assert.equal! deserialized_state.enemy.other_property, "extra mean"~ + # Returns the scaled up cell +** Processing line: ~ cell~ - Inside source: true *** True Line Result - assert.equal! deserialized_state.enemy.other_property, "extra mean" -** Processing line: ~ end~ + cell +** Processing line: ~ end~ - Inside source: true *** True Line Result - end + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def test_by_reference_state args, assert~ +** Processing line: ~~ - Inside source: true *** True Line Result - def test_by_reference_state args, assert -** Processing line: ~ GTK::Entity.__reset_id__!~ + +** Processing line: ~ # This method processes user input every tick~ - Inside source: true *** True Line Result - GTK::Entity.__reset_id__! -** Processing line: ~ args.state.a = { name: "Jane Doe" }~ + # This method processes user input every tick +** Processing line: ~ # This method allows the user to use the buttons, slider, and edit the grid~ - Inside source: true *** True Line Result - args.state.a = { name: "Jane Doe" } -** Processing line: ~ args.state.b = args.state.a~ + # This method allows the user to use the buttons, slider, and edit the grid +** Processing line: ~ # There are 2 types of input:~ - Inside source: true *** True Line Result - args.state.b = args.state.a -** Processing line: ~ assert.equal! args.state.a.object_id, args.state.b.object_id~ + # There are 2 types of input: +** Processing line: ~ # Button Input~ - Inside source: true *** True Line Result - assert.equal! args.state.a.object_id, args.state.b.object_id -** Processing line: ~ serialized_state = args.gtk.serialize_state args.state~ + # Button Input +** Processing line: ~ # Click and Drag Input~ - Inside source: true *** True Line Result - serialized_state = args.gtk.serialize_state args.state -** Processing line: ~~ + # Click and Drag Input +** Processing line: ~ #~ - Inside source: true *** True Line Result - -** Processing line: ~ GTK::Entity.__reset_id__!~ + # +** Processing line: ~ # Button Input is used for the backward step and forward step buttons~ - Inside source: true *** True Line Result - GTK::Entity.__reset_id__! -** Processing line: ~ deserialized_state = args.gtk.deserialize_state serialized_state~ + # Button Input is used for the backward step and forward step buttons +** Processing line: ~ # Input is detected by mouse up within the bounds of the rect~ - Inside source: true *** True Line Result - deserialized_state = args.gtk.deserialize_state serialized_state -** Processing line: ~ assert.equal! deserialized_state.a.object_id, deserialized_state.b.object_id~ + # Input is detected by mouse up within the bounds of the rect +** Processing line: ~ #~ - Inside source: true *** True Line Result - assert.equal! deserialized_state.a.object_id, deserialized_state.b.object_id -** Processing line: ~ end~ + # +** Processing line: ~ # Click and Drag Input is used for moving the star, adding walls,~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + # Click and Drag Input is used for moving the star, adding walls, +** Processing line: ~ # removing walls, and the slider~ - Inside source: true *** True Line Result - -** Processing line: ~ def test_by_reference_state_strict_entities args, assert~ + # removing walls, and the slider +** Processing line: ~ #~ - Inside source: true *** True Line Result - def test_by_reference_state_strict_entities args, assert -** Processing line: ~ GTK::Entity.__reset_id__!~ + # +** Processing line: ~ # When the mouse is down on the star, the click_and_drag variable is set to :star~ - Inside source: true *** True Line Result - GTK::Entity.__reset_id__! -** Processing line: ~ args.state.a = { name: "Jane Doe" }~ + # When the mouse is down on the star, the click_and_drag variable is set to :star +** Processing line: ~ # While click_and_drag equals :star, the cursor's position is used to calculate the~ - Inside source: true *** True Line Result - args.state.a = { name: "Jane Doe" } -** Processing line: ~ args.state.strict_entity = args.state.new_entity_strict(:couple) do |e|~ + # While click_and_drag equals :star, the cursor's position is used to calculate the +** Processing line: ~ # appropriate drag behavior~ - Inside source: true *** True Line Result - args.state.strict_entity = args.state.new_entity_strict(:couple) do |e| -** Processing line: ~ e.one = args.state.new_entity_strict(:person, name: "Jane")~ + # appropriate drag behavior +** Processing line: ~ #~ - Inside source: true *** True Line Result - e.one = args.state.new_entity_strict(:person, name: "Jane") -** Processing line: ~ e.two = e.one~ + # +** Processing line: ~ # When the mouse goes up click_and_drag is set to :none~ - Inside source: true *** True Line Result - e.two = e.one -** Processing line: ~ end~ + # When the mouse goes up click_and_drag is set to :none +** Processing line: ~ #~ - Inside source: true *** True Line Result - end -** Processing line: ~ assert.equal! args.state.strict_entity.one, args.state.strict_entity.two~ + # +** Processing line: ~ # A variable has to be used because the star has to continue being edited even~ - Inside source: true *** True Line Result - assert.equal! args.state.strict_entity.one, args.state.strict_entity.two -** Processing line: ~ serialized_state = args.gtk.serialize_state args.state~ + # A variable has to be used because the star has to continue being edited even +** Processing line: ~ # when the cursor is no longer over the star~ - Inside source: true *** True Line Result - serialized_state = args.gtk.serialize_state args.state -** Processing line: ~~ + # when the cursor is no longer over the star +** Processing line: ~ #~ - Inside source: true *** True Line Result - -** Processing line: ~ GTK::Entity.__reset_id__!~ + # +** Processing line: ~ # Similar things occur for the other Click and Drag inputs~ - Inside source: true *** True Line Result - GTK::Entity.__reset_id__! -** Processing line: ~ deserialized_state = args.gtk.deserialize_state serialized_state~ + # Similar things occur for the other Click and Drag inputs +** Processing line: ~ def input~ - Inside source: true *** True Line Result - deserialized_state = args.gtk.deserialize_state serialized_state -** Processing line: ~ assert.equal! deserialized_state.strict_entity.one, deserialized_state.strict_entity.two~ + def input +** Processing line: ~ # Processes inputs for the buttons~ - Inside source: true *** True Line Result - assert.equal! deserialized_state.strict_entity.one, deserialized_state.strict_entity.two -** Processing line: ~ end~ + # Processes inputs for the buttons +** Processing line: ~ input_buttons~ - Inside source: true *** True Line Result - end + input_buttons ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~#+end_src~ -- Line was identified as the end of a code block. -*** True Line Result -#+end_src -** Processing line: ~~ -- End of paragraph detected. -*** True Line Result - -** Processing line: ~*** Advanced Debugging - Unit Tests - state_serialization_experimental_tests.rb~ -- Header detected. -*** True Line Result - -*** True Line Result -*** Advanced Debugging - Unit Tests - state_serialization_experimental_tests.rb -** Processing line: ~#+begin_src ruby~ -- Line was identified as the beginning of a code block. -*** True Line Result - -*** True Line Result -#+begin_src ruby -** Processing line: ~ # ./samples/10_advanced_debugging/03_unit_tests/state_serialization_experimental_tests.rb~ +** Processing line: ~ # Detects which if any click and drag input is occurring~ - Inside source: true *** True Line Result - # ./samples/10_advanced_debugging/03_unit_tests/state_serialization_experimental_tests.rb -** Processing line: ~ MAX_CODE_GEN_LENGTH = 50~ + # Detects which if any click and drag input is occurring +** Processing line: ~ detect_click_and_drag~ - Inside source: true *** True Line Result - MAX_CODE_GEN_LENGTH = 50 + detect_click_and_drag ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # NOTE: This is experimental/advanced stuff.~ -- Inside source: true -*** True Line Result - # NOTE: This is experimental/advanced stuff. -** Processing line: ~ def needs_partitioning? target~ +** Processing line: ~ # Does the appropriate click and drag input based on the click_and_drag variable~ - Inside source: true *** True Line Result - def needs_partitioning? target -** Processing line: ~ target[:value].to_s.length > MAX_CODE_GEN_LENGTH~ + # Does the appropriate click and drag input based on the click_and_drag variable +** Processing line: ~ process_click_and_drag~ - Inside source: true *** True Line Result - target[:value].to_s.length > MAX_CODE_GEN_LENGTH -** Processing line: ~ end~ + process_click_and_drag +** Processing line: ~ end~ - Inside source: true *** True Line Result - end + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def partition target~ +** Processing line: ~ # Detects and Process input for each button~ - Inside source: true *** True Line Result - def partition target -** Processing line: ~ return [] unless needs_partitioning? target~ + # Detects and Process input for each button +** Processing line: ~ def input_buttons~ - Inside source: true *** True Line Result - return [] unless needs_partitioning? target -** Processing line: ~ if target[:value].is_a? GTK::OpenEntity~ + def input_buttons +** Processing line: ~ input_left_button~ - Inside source: true *** True Line Result - if target[:value].is_a? GTK::OpenEntity -** Processing line: ~ target[:value] = target[:value].hash~ + input_left_button +** Processing line: ~ input_right_button~ - Inside source: true *** True Line Result - target[:value] = target[:value].hash + input_right_button ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -58604,118 +67067,94 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ results = []~ -- Inside source: true -*** True Line Result - results = [] -** Processing line: ~ idx = 0~ +** Processing line: ~ # Checks if the previous step button is clicked~ - Inside source: true *** True Line Result - idx = 0 -** Processing line: ~ left, right = target[:value].partition do~ + # Checks if the previous step button is clicked +** Processing line: ~ # If it is, it pauses the animation and moves the search one step backward~ - Inside source: true *** True Line Result - left, right = target[:value].partition do -** Processing line: ~ idx += 1~ + # If it is, it pauses the animation and moves the search one step backward +** Processing line: ~ def input_left_button~ - Inside source: true *** True Line Result - idx += 1 -** Processing line: ~ idx.even?~ + def input_left_button +** Processing line: ~ if left_button_clicked?~ - Inside source: true *** True Line Result - idx.even? -** Processing line: ~ end~ + if left_button_clicked? +** Processing line: ~ unless state.anim_steps == 0~ - Inside source: true *** True Line Result - end -** Processing line: ~ left, right = Hash[left], Hash[right]~ + unless state.anim_steps == 0 +** Processing line: ~ state.anim_steps -= 1~ - Inside source: true *** True Line Result - left, right = Hash[left], Hash[right] -** Processing line: ~ left = { value: left }~ + state.anim_steps -= 1 +** Processing line: ~ recalculate~ - Inside source: true *** True Line Result - left = { value: left } -** Processing line: ~ right = { value: right}~ + recalculate +** Processing line: ~ end~ - Inside source: true *** True Line Result - right = { value: right} -** Processing line: ~ [left, right]~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - [left, right] -** Processing line: ~ end~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - end + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def add_partition target, path, aggregate, final_result~ -- Inside source: true -*** True Line Result - def add_partition target, path, aggregate, final_result -** Processing line: ~ partitions = partition target~ -- Inside source: true -*** True Line Result - partitions = partition target -** Processing line: ~ partitions.each do |part|~ +** Processing line: ~ # Checks if the next step button is clicked~ - Inside source: true *** True Line Result - partitions.each do |part| -** Processing line: ~ if needs_partitioning? part~ + # Checks if the next step button is clicked +** Processing line: ~ # If it is, it pauses the animation and moves the search one step forward~ - Inside source: true *** True Line Result - if needs_partitioning? part -** Processing line: ~ if part[:value].keys.length == 1~ + # If it is, it pauses the animation and moves the search one step forward +** Processing line: ~ def input_right_button~ - Inside source: true *** True Line Result - if part[:value].keys.length == 1 -** Processing line: ~ first_key = part[:value].keys[0]~ + def input_right_button +** Processing line: ~ if right_button_clicked?~ - Inside source: true *** True Line Result - first_key = part[:value].keys[0] -** Processing line: ~ new_part = { value: part[:value][first_key] }~ + if right_button_clicked? +** Processing line: ~ unless state.anim_steps == state.max_steps~ - Inside source: true *** True Line Result - new_part = { value: part[:value][first_key] } -** Processing line: ~ path.push first_key~ + unless state.anim_steps == state.max_steps +** Processing line: ~ state.anim_steps += 1~ - Inside source: true *** True Line Result - path.push first_key -** Processing line: ~ add_partition new_part, path, aggregate, final_result~ + state.anim_steps += 1 +** Processing line: ~ # Although normally recalculate would be called here~ - Inside source: true *** True Line Result - add_partition new_part, path, aggregate, final_result -** Processing line: ~ path.pop~ + # Although normally recalculate would be called here +** Processing line: ~ # because the right button only moves the search forward~ - Inside source: true *** True Line Result - path.pop -** Processing line: ~ else~ + # because the right button only moves the search forward +** Processing line: ~ # We can just do that~ - Inside source: true *** True Line Result - else -** Processing line: ~ add_partition part, path, aggregate, final_result~ + # We can just do that +** Processing line: ~ calc~ - Inside source: true *** True Line Result - add_partition part, path, aggregate, final_result + calc ** Processing line: ~ end~ - Inside source: true *** True Line Result end -** Processing line: ~ else~ -- Inside source: true -*** True Line Result - else -** Processing line: ~ final_result << { value: { __path__: [*path] } }~ -- Inside source: true -*** True Line Result - final_result << { value: { __path__: [*path] } } -** Processing line: ~ final_result << { value: part[:value] }~ -- Inside source: true -*** True Line Result - final_result << { value: part[:value] } ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -58724,146 +67163,134 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result end -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def state_to_string state~ -- Inside source: true -*** True Line Result - def state_to_string state -** Processing line: ~ parts_queue = []~ -- Inside source: true -*** True Line Result - parts_queue = [] -** Processing line: ~ final_queue = []~ -- Inside source: true -*** True Line Result - final_queue = [] -** Processing line: ~ add_partition({ value: state.hash },~ +** Processing line: ~ # Whenever the user edits the grid,~ - Inside source: true *** True Line Result - add_partition({ value: state.hash }, -** Processing line: ~ [],~ + # Whenever the user edits the grid, +** Processing line: ~ # The search has to be recalculated upto the current step~ - Inside source: true *** True Line Result - [], -** Processing line: ~ parts_queue,~ + # The search has to be recalculated upto the current step +** Processing line: ~~ - Inside source: true *** True Line Result - parts_queue, -** Processing line: ~ final_queue)~ + +** Processing line: ~ def recalculate~ - Inside source: true *** True Line Result - final_queue) -** Processing line: ~ final_queue.reject {|i| i[:value].keys.length == 0}.map do |i|~ + def recalculate +** Processing line: ~ # Resets the search~ - Inside source: true *** True Line Result - final_queue.reject {|i| i[:value].keys.length == 0}.map do |i| -** Processing line: ~ i[:value].to_s~ + # Resets the search +** Processing line: ~ state.frontier = []~ - Inside source: true *** True Line Result - i[:value].to_s -** Processing line: ~ end.join("\n#==================================================#\n")~ + state.frontier = [] +** Processing line: ~ state.visited = {}~ - Inside source: true *** True Line Result - end.join("\n#==================================================#\n") -** Processing line: ~ end~ + state.visited = {} +** Processing line: ~ state.cell_numbers = []~ - Inside source: true *** True Line Result - end + state.cell_numbers = [] ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def state_from_string string~ +** Processing line: ~ # Moves the animation forward one step at a time~ - Inside source: true *** True Line Result - def state_from_string string -** Processing line: ~ Kernel.eval("$load_data = {}")~ + # Moves the animation forward one step at a time +** Processing line: ~ state.anim_steps.times { calc }~ - Inside source: true *** True Line Result - Kernel.eval("$load_data = {}") -** Processing line: ~ lines = string.split("\n#==================================================#\n")~ + state.anim_steps.times { calc } +** Processing line: ~ end~ - Inside source: true *** True Line Result - lines = string.split("\n#==================================================#\n") -** Processing line: ~ lines.each do |l|~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - lines.each do |l| -** Processing line: ~ puts "todo: #{l}"~ + +** Processing line: ~~ - Inside source: true *** True Line Result - puts "todo: #{l}" -** Processing line: ~ end~ + +** Processing line: ~ # Determines what the user is clicking and planning on dragging~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + # Determines what the user is clicking and planning on dragging +** Processing line: ~ # Click and drag input is initiated by a click on the appropriate item~ - Inside source: true *** True Line Result - -** Processing line: ~ GTK::OpenEntity.parse_from_hash $load_data~ + # Click and drag input is initiated by a click on the appropriate item +** Processing line: ~ # and ended by mouse up~ - Inside source: true *** True Line Result - GTK::OpenEntity.parse_from_hash $load_data -** Processing line: ~ end~ + # and ended by mouse up +** Processing line: ~ # Storing the value allows the user to continue the same edit as long as the~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + # Storing the value allows the user to continue the same edit as long as the +** Processing line: ~ # mouse left click is held~ - Inside source: true *** True Line Result - -** Processing line: ~ def test_save_and_load args, assert~ + # mouse left click is held +** Processing line: ~ def detect_click_and_drag~ - Inside source: true *** True Line Result - def test_save_and_load args, assert -** Processing line: ~ args.state.item_1.name = "Jane"~ + def detect_click_and_drag +** Processing line: ~ if inputs.mouse.up~ - Inside source: true *** True Line Result - args.state.item_1.name = "Jane" -** Processing line: ~ string = state_to_string args.state~ + if inputs.mouse.up +** Processing line: ~ state.click_and_drag = :none~ - Inside source: true *** True Line Result - string = state_to_string args.state -** Processing line: ~ state = state_from_string string~ + state.click_and_drag = :none +** Processing line: ~ elsif star_clicked?~ - Inside source: true *** True Line Result - state = state_from_string string -** Processing line: ~ assert.equal! args.state.item_1.name, state.item_1.name~ + elsif star_clicked? +** Processing line: ~ state.click_and_drag = :star~ - Inside source: true *** True Line Result - assert.equal! args.state.item_1.name, state.item_1.name -** Processing line: ~ end~ + state.click_and_drag = :star +** Processing line: ~ elsif wall_clicked?~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + elsif wall_clicked? +** Processing line: ~ state.click_and_drag = :remove_wall~ - Inside source: true *** True Line Result - -** Processing line: ~ def test_save_and_load_big args, assert~ + state.click_and_drag = :remove_wall +** Processing line: ~ elsif grid_clicked?~ - Inside source: true *** True Line Result - def test_save_and_load_big args, assert -** Processing line: ~ size = 1000~ + elsif grid_clicked? +** Processing line: ~ state.click_and_drag = :add_wall~ - Inside source: true *** True Line Result - size = 1000 -** Processing line: ~ size.map_with_index do |i|~ + state.click_and_drag = :add_wall +** Processing line: ~ elsif slider_clicked?~ - Inside source: true *** True Line Result - size.map_with_index do |i| -** Processing line: ~ args.state.send("k#{i}=".to_sym, i)~ + elsif slider_clicked? +** Processing line: ~ state.click_and_drag = :slider~ - Inside source: true *** True Line Result - args.state.send("k#{i}=".to_sym, i) + state.click_and_drag = :slider +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -58872,406 +67299,390 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ string = state_to_string args.state~ -- Inside source: true -*** True Line Result - string = state_to_string args.state -** Processing line: ~ state = state_from_string string~ -- Inside source: true -*** True Line Result - state = state_from_string string -** Processing line: ~ size.map_with_index do |i|~ +** Processing line: ~ # Processes input based on what the user is currently dragging~ - Inside source: true *** True Line Result - size.map_with_index do |i| -** Processing line: ~ assert.equal! args.state.send("k#{i}".to_sym), state.send("k#{i}".to_sym)~ + # Processes input based on what the user is currently dragging +** Processing line: ~ def process_click_and_drag~ - Inside source: true *** True Line Result - assert.equal! args.state.send("k#{i}".to_sym), state.send("k#{i}".to_sym) -** Processing line: ~ assert.equal! args.state.send("k#{i}".to_sym), i~ + def process_click_and_drag +** Processing line: ~ if state.click_and_drag == :slider~ - Inside source: true *** True Line Result - assert.equal! args.state.send("k#{i}".to_sym), i -** Processing line: ~ assert.equal! state.send("k#{i}".to_sym), i~ + if state.click_and_drag == :slider +** Processing line: ~ input_slider~ - Inside source: true *** True Line Result - assert.equal! state.send("k#{i}".to_sym), i -** Processing line: ~ end~ + input_slider +** Processing line: ~ elsif state.click_and_drag == :star~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + elsif state.click_and_drag == :star +** Processing line: ~ input_star~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + input_star +** Processing line: ~ elsif state.click_and_drag == :remove_wall~ - Inside source: true *** True Line Result - -** Processing line: ~ def test_save_and_load_big_nested args, assert~ + elsif state.click_and_drag == :remove_wall +** Processing line: ~ input_remove_wall~ - Inside source: true *** True Line Result - def test_save_and_load_big_nested args, assert -** Processing line: ~ args.state.player_one.friend.nested_hash.k0 = 0~ + input_remove_wall +** Processing line: ~ elsif state.click_and_drag == :add_wall~ - Inside source: true *** True Line Result - args.state.player_one.friend.nested_hash.k0 = 0 -** Processing line: ~ args.state.player_one.friend.nested_hash.k1 = 1~ + elsif state.click_and_drag == :add_wall +** Processing line: ~ input_add_wall~ - Inside source: true *** True Line Result - args.state.player_one.friend.nested_hash.k1 = 1 -** Processing line: ~ args.state.player_one.friend.nested_hash.k2 = 2~ + input_add_wall +** Processing line: ~ end~ - Inside source: true *** True Line Result - args.state.player_one.friend.nested_hash.k2 = 2 -** Processing line: ~ args.state.player_one.friend.nested_hash.k3 = 3~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - args.state.player_one.friend.nested_hash.k3 = 3 -** Processing line: ~ args.state.player_one.friend.nested_hash.k4 = 4~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - args.state.player_one.friend.nested_hash.k4 = 4 -** Processing line: ~ args.state.player_one.friend.nested_hash.k5 = 5~ + +** Processing line: ~ # This method is called when the user is dragging the slider~ - Inside source: true *** True Line Result - args.state.player_one.friend.nested_hash.k5 = 5 -** Processing line: ~ args.state.player_one.friend.nested_hash.k6 = 6~ + # This method is called when the user is dragging the slider +** Processing line: ~ # It moves the current animation step to the point represented by the slider~ - Inside source: true *** True Line Result - args.state.player_one.friend.nested_hash.k6 = 6 -** Processing line: ~ args.state.player_one.friend.nested_hash.k7 = 7~ + # It moves the current animation step to the point represented by the slider +** Processing line: ~ def input_slider~ - Inside source: true *** True Line Result - args.state.player_one.friend.nested_hash.k7 = 7 -** Processing line: ~ args.state.player_one.friend.nested_hash.k8 = 8~ + def input_slider +** Processing line: ~ mouse_x = inputs.mouse.point.x~ - Inside source: true *** True Line Result - args.state.player_one.friend.nested_hash.k8 = 8 -** Processing line: ~ args.state.player_one.friend.nested_hash.k9 = 9~ + mouse_x = inputs.mouse.point.x +** Processing line: ~~ - Inside source: true *** True Line Result - args.state.player_one.friend.nested_hash.k9 = 9 -** Processing line: ~ string = state_to_string args.state~ + +** Processing line: ~ # Bounds the mouse_x to the closest x value on the slider line~ - Inside source: true *** True Line Result - string = state_to_string args.state -** Processing line: ~ state = state_from_string string~ + # Bounds the mouse_x to the closest x value on the slider line +** Processing line: ~ mouse_x = slider.x if mouse_x < slider.x~ - Inside source: true *** True Line Result - state = state_from_string string -** Processing line: ~ end~ + mouse_x = slider.x if mouse_x < slider.x +** Processing line: ~ mouse_x = slider.x + slider.w if mouse_x > slider.x + slider.w~ - Inside source: true *** True Line Result - end + mouse_x = slider.x + slider.w if mouse_x > slider.x + slider.w ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ $gtk.reset 100~ +** Processing line: ~ # Sets the current search step to the one represented by the mouse x value~ - Inside source: true *** True Line Result - $gtk.reset 100 -** Processing line: ~ $gtk.log_level = :off~ + # Sets the current search step to the one represented by the mouse x value +** Processing line: ~ # The slider's circle moves due to the render_slider method using anim_steps~ - Inside source: true *** True Line Result - $gtk.log_level = :off -** Processing line: ~~ + # The slider's circle moves due to the render_slider method using anim_steps +** Processing line: ~ state.anim_steps = ((mouse_x - slider.x) / slider.spacing).to_i~ - Inside source: true *** True Line Result - -** Processing line: ~#+end_src~ -- Line was identified as the end of a code block. -*** True Line Result -#+end_src + state.anim_steps = ((mouse_x - slider.x) / slider.spacing).to_i ** Processing line: ~~ -- End of paragraph detected. +- Inside source: true *** True Line Result -** Processing line: ~*** Advanced Debugging - Unit Tests - suggest_autocompletion_tests.rb~ -- Header detected. +** Processing line: ~ recalculate~ +- Inside source: true *** True Line Result - + recalculate +** Processing line: ~ end~ +- Inside source: true *** True Line Result -*** Advanced Debugging - Unit Tests - suggest_autocompletion_tests.rb -** Processing line: ~#+begin_src ruby~ -- Line was identified as the beginning of a code block. + end +** Processing line: ~~ +- Inside source: true *** True Line Result +** Processing line: ~ # Moves the star to the grid closest to the mouse~ +- Inside source: true *** True Line Result -#+begin_src ruby -** Processing line: ~ # ./samples/10_advanced_debugging/03_unit_tests/suggest_autocompletion_tests.rb~ + # Moves the star to the grid closest to the mouse +** Processing line: ~ # Only recalculates the search if the star changes position~ - Inside source: true *** True Line Result - # ./samples/10_advanced_debugging/03_unit_tests/suggest_autocompletion_tests.rb -** Processing line: ~ def default_suggest_autocompletion args~ + # Only recalculates the search if the star changes position +** Processing line: ~ # Called whenever the user is dragging the star~ - Inside source: true *** True Line Result - def default_suggest_autocompletion args -** Processing line: ~ {~ + # Called whenever the user is dragging the star +** Processing line: ~ def input_star~ - Inside source: true *** True Line Result - { -** Processing line: ~ index: 4,~ + def input_star +** Processing line: ~ old_star = state.star.clone~ - Inside source: true *** True Line Result - index: 4, -** Processing line: ~ text: "args.",~ + old_star = state.star.clone +** Processing line: ~ state.star = cell_closest_to_mouse~ - Inside source: true *** True Line Result - text: "args.", -** Processing line: ~ __meta__: {~ + state.star = cell_closest_to_mouse +** Processing line: ~ unless old_star == state.star~ - Inside source: true *** True Line Result - __meta__: { -** Processing line: ~ other_options: [~ + unless old_star == state.star +** Processing line: ~ recalculate~ - Inside source: true *** True Line Result - other_options: [ -** Processing line: ~ {~ + recalculate +** Processing line: ~ end~ - Inside source: true *** True Line Result - { -** Processing line: ~ index: Fixnum,~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - index: Fixnum, -** Processing line: ~ file: "app/main.rb"~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - file: "app/main.rb" -** Processing line: ~ }~ + +** Processing line: ~ # Removes walls that are under the cursor~ - Inside source: true *** True Line Result - } -** Processing line: ~ ]~ + # Removes walls that are under the cursor +** Processing line: ~ def input_remove_wall~ - Inside source: true *** True Line Result - ] -** Processing line: ~ }~ + def input_remove_wall +** Processing line: ~ # The mouse needs to be inside the grid, because we only want to remove walls~ - Inside source: true *** True Line Result - } -** Processing line: ~ }~ + # The mouse needs to be inside the grid, because we only want to remove walls +** Processing line: ~ # the cursor is directly over~ - Inside source: true *** True Line Result - } -** Processing line: ~ end~ + # the cursor is directly over +** Processing line: ~ # Recalculations should only occur when a wall is actually deleted~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + # Recalculations should only occur when a wall is actually deleted +** Processing line: ~ if mouse_inside_grid?~ - Inside source: true *** True Line Result - -** Processing line: ~ def assert_completion source, *expected~ + if mouse_inside_grid? +** Processing line: ~ if state.walls.has_key?(cell_closest_to_mouse)~ - Inside source: true *** True Line Result - def assert_completion source, *expected -** Processing line: ~ results = suggest_autocompletion text: (source.strip.gsub ":cursor", ""),~ + if state.walls.has_key?(cell_closest_to_mouse) +** Processing line: ~ state.walls.delete(cell_closest_to_mouse)~ - Inside source: true *** True Line Result - results = suggest_autocompletion text: (source.strip.gsub ":cursor", ""), -** Processing line: ~ index: (source.strip.index ":cursor")~ + state.walls.delete(cell_closest_to_mouse) +** Processing line: ~ recalculate~ - Inside source: true *** True Line Result - index: (source.strip.index ":cursor") -** Processing line: ~~ + recalculate +** Processing line: ~ end~ - Inside source: true *** True Line Result - -** Processing line: ~ puts results~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - puts results -** Processing line: ~ end~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - end + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def test_args_completion args, assert~ -- Inside source: true -*** True Line Result - def test_args_completion args, assert -** Processing line: ~ $gtk.write_file_root "autocomplete.txt", ($gtk.suggest_autocompletion text: <<-S, index: 128).join("\n")~ +** Processing line: ~ # Adds walls at cells under the cursor~ - Inside source: true *** True Line Result - $gtk.write_file_root "autocomplete.txt", ($gtk.suggest_autocompletion text: <<-S, index: 128).join("\n") -** Processing line: ~ require 'app/game.rb'~ + # Adds walls at cells under the cursor +** Processing line: ~ def input_add_wall~ - Inside source: true *** True Line Result - require 'app/game.rb' -** Processing line: ~~ + def input_add_wall +** Processing line: ~ # Adds a wall to the hash~ - Inside source: true *** True Line Result - -** Processing line: ~ def tick args~ + # Adds a wall to the hash +** Processing line: ~ # We can use the grid closest to mouse, because the cursor is inside the grid~ - Inside source: true *** True Line Result - def tick args -** Processing line: ~ args.gtk.suppress_mailbox = false~ + # We can use the grid closest to mouse, because the cursor is inside the grid +** Processing line: ~ if mouse_inside_grid?~ - Inside source: true *** True Line Result - args.gtk.suppress_mailbox = false -** Processing line: ~ $game ||= Game.new~ + if mouse_inside_grid? +** Processing line: ~ unless state.walls.has_key?(cell_closest_to_mouse)~ - Inside source: true *** True Line Result - $game ||= Game.new -** Processing line: ~ $game.args = args~ + unless state.walls.has_key?(cell_closest_to_mouse) +** Processing line: ~ state.walls[cell_closest_to_mouse] = true~ - Inside source: true *** True Line Result - $game.args = args -** Processing line: ~ $game.args.~ + state.walls[cell_closest_to_mouse] = true +** Processing line: ~ recalculate~ - Inside source: true *** True Line Result - $game.args. -** Processing line: ~ $game.tick~ + recalculate +** Processing line: ~ end~ - Inside source: true *** True Line Result - $game.tick -** Processing line: ~ end~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - end -** Processing line: ~ S~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - S + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ puts "contents:"~ +** Processing line: ~ # This method moves the search forward one step~ - Inside source: true *** True Line Result - puts "contents:" -** Processing line: ~ puts ($gtk.read_file "autocomplete.txt")~ + # This method moves the search forward one step +** Processing line: ~ # When the animation is playing it is called every tick~ - Inside source: true *** True Line Result - puts ($gtk.read_file "autocomplete.txt") -** Processing line: ~ end~ + # When the animation is playing it is called every tick +** Processing line: ~ # And called whenever the current step of the animation needs to be recalculated~ - Inside source: true *** True Line Result - end + # And called whenever the current step of the animation needs to be recalculated ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~#+end_src~ -- Line was identified as the end of a code block. -*** True Line Result -#+end_src -** Processing line: ~~ -- End of paragraph detected. -*** True Line Result - -** Processing line: ~*** Http - Retrieve Images - main.rb~ -- Header detected. +** Processing line: ~ # Moves the search forward one step~ +- Inside source: true *** True Line Result - + # Moves the search forward one step +** Processing line: ~ # Parameter called_from_tick is true if it is called from the tick method~ +- Inside source: true *** True Line Result -*** Http - Retrieve Images - main.rb -** Processing line: ~#+begin_src ruby~ -- Line was identified as the beginning of a code block. + # Parameter called_from_tick is true if it is called from the tick method +** Processing line: ~ # It is false when the search is being recalculated after user editing the grid~ +- Inside source: true *** True Line Result - + # It is false when the search is being recalculated after user editing the grid +** Processing line: ~ def calc~ +- Inside source: true *** True Line Result -#+begin_src ruby -** Processing line: ~ # ./samples/11_http/01_retrieve_images/app/main.rb~ + def calc +** Processing line: ~ # The setup to the search~ - Inside source: true *** True Line Result - # ./samples/11_http/01_retrieve_images/app/main.rb -** Processing line: ~ def tick args~ + # The setup to the search +** Processing line: ~ # Runs once when the there is no frontier or visited cells~ - Inside source: true *** True Line Result - def tick args -** Processing line: ~ args.outputs.background_color = [0, 0, 0]~ + # Runs once when the there is no frontier or visited cells +** Processing line: ~ if state.frontier.empty? && state.visited.empty?~ - Inside source: true *** True Line Result - args.outputs.background_color = [0, 0, 0] -** Processing line: ~~ + if state.frontier.empty? && state.visited.empty? +** Processing line: ~ state.frontier << state.star~ - Inside source: true *** True Line Result - -** Processing line: ~ # Show a warning at the start.~ + state.frontier << state.star +** Processing line: ~ state.visited[state.star] = true~ - Inside source: true *** True Line Result - # Show a warning at the start. -** Processing line: ~ args.state.warning_debounce ||= 11 * 60~ + state.visited[state.star] = true +** Processing line: ~ end~ - Inside source: true *** True Line Result - args.state.warning_debounce ||= 11 * 60 -** Processing line: ~ if args.state.warning_debounce > 0~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - if args.state.warning_debounce > 0 -** Processing line: ~ args.state.warning_debounce -= 1~ + +** Processing line: ~ # A step in the search~ - Inside source: true *** True Line Result - args.state.warning_debounce -= 1 -** Processing line: ~ args.outputs.labels << [640, 600, "This app shows random images from the Internet.", 10, 1, 255, 255, 255]~ + # A step in the search +** Processing line: ~ unless state.frontier.empty?~ - Inside source: true *** True Line Result - args.outputs.labels << [640, 600, "This app shows random images from the Internet.", 10, 1, 255, 255, 255] -** Processing line: ~ args.outputs.labels << [640, 500, "Quit in the next few seconds if this is a problem.", 10, 1, 255, 255, 255]~ + unless state.frontier.empty? +** Processing line: ~ # Takes the next frontier cell~ - Inside source: true *** True Line Result - args.outputs.labels << [640, 500, "Quit in the next few seconds if this is a problem.", 10, 1, 255, 255, 255] -** Processing line: ~ args.outputs.labels << [640, 350, "#{(args.state.warning_debounce / 60.0).to_i}", 10, 1, 255, 255, 255]~ + # Takes the next frontier cell +** Processing line: ~ new_frontier = state.frontier.shift~ - Inside source: true *** True Line Result - args.outputs.labels << [640, 350, "#{(args.state.warning_debounce / 60.0).to_i}", 10, 1, 255, 255, 255] -** Processing line: ~ return~ + new_frontier = state.frontier.shift +** Processing line: ~ # For each of its neighbors~ - Inside source: true *** True Line Result - return -** Processing line: ~ end~ + # For each of its neighbors +** Processing line: ~ adjacent_neighbors(new_frontier).each do |neighbor|~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + adjacent_neighbors(new_frontier).each do |neighbor| +** Processing line: ~ # That have not been visited and are not walls~ - Inside source: true *** True Line Result - -** Processing line: ~ args.state.download_debounce ||= 0 # start immediately, reset to non zero later.~ + # That have not been visited and are not walls +** Processing line: ~ unless state.visited.has_key?(neighbor) || state.walls.has_key?(neighbor)~ - Inside source: true *** True Line Result - args.state.download_debounce ||= 0 # start immediately, reset to non zero later. -** Processing line: ~ args.state.photos ||= []~ + unless state.visited.has_key?(neighbor) || state.walls.has_key?(neighbor) +** Processing line: ~ # Add them to the frontier and mark them as visited~ - Inside source: true *** True Line Result - args.state.photos ||= [] -** Processing line: ~~ + # Add them to the frontier and mark them as visited +** Processing line: ~ state.frontier << neighbor~ - Inside source: true *** True Line Result - -** Processing line: ~ # Put a little pause between each download.~ + state.frontier << neighbor +** Processing line: ~ state.visited[neighbor] = true~ - Inside source: true *** True Line Result - # Put a little pause between each download. -** Processing line: ~ if args.state.download.nil?~ + state.visited[neighbor] = true +** Processing line: ~~ - Inside source: true *** True Line Result - if args.state.download.nil? -** Processing line: ~ if args.state.download_debounce > 0~ + +** Processing line: ~ # Also assign them a frontier number~ - Inside source: true *** True Line Result - if args.state.download_debounce > 0 -** Processing line: ~ args.state.download_debounce -= 1~ + # Also assign them a frontier number +** Processing line: ~ state.cell_numbers << neighbor~ - Inside source: true *** True Line Result - args.state.download_debounce -= 1 -** Processing line: ~ else~ + state.cell_numbers << neighbor +** Processing line: ~ end~ - Inside source: true *** True Line Result - else -** Processing line: ~ args.state.download = $gtk.http_get 'https://picsum.photos/200/300.jpg'~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - args.state.download = $gtk.http_get 'https://picsum.photos/200/300.jpg' + end ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -59284,46 +67695,54 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ if !args.state.download.nil?~ +** Processing line: ~~ - Inside source: true *** True Line Result - if !args.state.download.nil? -** Processing line: ~ if args.state.download[:complete]~ + +** Processing line: ~ # Returns a list of adjacent cells~ - Inside source: true *** True Line Result - if args.state.download[:complete] -** Processing line: ~ if args.state.download[:http_response_code] == 200~ + # Returns a list of adjacent cells +** Processing line: ~ # Used to determine what the next cells to be added to the frontier are~ - Inside source: true *** True Line Result - if args.state.download[:http_response_code] == 200 -** Processing line: ~ fname = "sprites/#{args.state.photos.length}.jpg"~ + # Used to determine what the next cells to be added to the frontier are +** Processing line: ~ def adjacent_neighbors cell~ - Inside source: true *** True Line Result - fname = "sprites/#{args.state.photos.length}.jpg" -** Processing line: ~ $gtk.write_file fname, args.state.download[:response_data]~ + def adjacent_neighbors cell +** Processing line: ~ neighbors = []~ - Inside source: true *** True Line Result - $gtk.write_file fname, args.state.download[:response_data] -** Processing line: ~ args.state.photos << [ 100 + rand(1080), 500 - rand(480), fname, rand(80) - 40 ]~ + neighbors = [] +** Processing line: ~~ - Inside source: true *** True Line Result - args.state.photos << [ 100 + rand(1080), 500 - rand(480), fname, rand(80) - 40 ] -** Processing line: ~ end~ + +** Processing line: ~ neighbors << [cell.x, cell.y + 1] unless cell.y == grid.height - 1~ - Inside source: true *** True Line Result - end -** Processing line: ~ args.state.download = nil~ + neighbors << [cell.x, cell.y + 1] unless cell.y == grid.height - 1 +** Processing line: ~ neighbors << [cell.x + 1, cell.y] unless cell.x == grid.width - 1~ - Inside source: true *** True Line Result - args.state.download = nil -** Processing line: ~ args.state.download_debounce = (rand(3) + 2) * 60~ + neighbors << [cell.x + 1, cell.y] unless cell.x == grid.width - 1 +** Processing line: ~ neighbors << [cell.x, cell.y - 1] unless cell.y == 0~ - Inside source: true *** True Line Result - args.state.download_debounce = (rand(3) + 2) * 60 -** Processing line: ~ end~ + neighbors << [cell.x, cell.y - 1] unless cell.y == 0 +** Processing line: ~ neighbors << [cell.x - 1, cell.y] unless cell.x == 0~ - Inside source: true *** True Line Result - end + neighbors << [cell.x - 1, cell.y] unless cell.x == 0 +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ neighbors~ +- Inside source: true +*** True Line Result + neighbors ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -59332,486 +67751,482 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # draw any downloaded photos...~ +** Processing line: ~ # When the user grabs the star and puts their cursor to the far right~ - Inside source: true *** True Line Result - # draw any downloaded photos... -** Processing line: ~ args.state.photos.each { |i|~ + # When the user grabs the star and puts their cursor to the far right +** Processing line: ~ # and moves up and down, the star is supposed to move along the grid as well~ - Inside source: true *** True Line Result - args.state.photos.each { |i| -** Processing line: ~ args.outputs.primitives << [i[0], i[1], 200, 300, i[2], i[3]].sprite~ + # and moves up and down, the star is supposed to move along the grid as well +** Processing line: ~ # Finding the grid closest to the mouse helps with this~ - Inside source: true *** True Line Result - args.outputs.primitives << [i[0], i[1], 200, 300, i[2], i[3]].sprite -** Processing line: ~ }~ + # Finding the grid closest to the mouse helps with this +** Processing line: ~ def cell_closest_to_mouse~ - Inside source: true *** True Line Result - } -** Processing line: ~~ + def cell_closest_to_mouse +** Processing line: ~ x = (inputs.mouse.point.x / grid.cell_size).to_i~ - Inside source: true *** True Line Result - -** Processing line: ~ # Draw a download progress bar...~ + x = (inputs.mouse.point.x / grid.cell_size).to_i +** Processing line: ~ y = (inputs.mouse.point.y / grid.cell_size).to_i~ - Inside source: true *** True Line Result - # Draw a download progress bar... -** Processing line: ~ args.outputs.primitives << [0, 0, 1280, 30, 0, 0, 0, 255].solid~ + y = (inputs.mouse.point.y / grid.cell_size).to_i +** Processing line: ~ x = grid.width - 1 if x > grid.width - 1~ - Inside source: true *** True Line Result - args.outputs.primitives << [0, 0, 1280, 30, 0, 0, 0, 255].solid -** Processing line: ~ if !args.state.download.nil?~ + x = grid.width - 1 if x > grid.width - 1 +** Processing line: ~ y = grid.height - 1 if y > grid.height - 1~ - Inside source: true *** True Line Result - if !args.state.download.nil? -** Processing line: ~ br = args.state.download[:response_read]~ + y = grid.height - 1 if y > grid.height - 1 +** Processing line: ~ [x, y]~ - Inside source: true *** True Line Result - br = args.state.download[:response_read] -** Processing line: ~ total = args.state.download[:response_total]~ + [x, y] +** Processing line: ~ end~ - Inside source: true *** True Line Result - total = args.state.download[:response_total] -** Processing line: ~ if total != 0~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - if total != 0 -** Processing line: ~ pct = br.to_f / total.to_f~ + +** Processing line: ~~ - Inside source: true *** True Line Result - pct = br.to_f / total.to_f -** Processing line: ~ args.outputs.primitives << [0, 0, 1280 * pct, 30, 0, 0, 255, 255].solid~ + +** Processing line: ~ # These methods detect when the buttons are clicked~ - Inside source: true *** True Line Result - args.outputs.primitives << [0, 0, 1280 * pct, 30, 0, 0, 255, 255].solid -** Processing line: ~ end~ + # These methods detect when the buttons are clicked +** Processing line: ~ def left_button_clicked?~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + def left_button_clicked? +** Processing line: ~ (inputs.mouse.up && inputs.mouse.point.inside_rect?(buttons.left)) || inputs.keyboard.key_up.left~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + (inputs.mouse.up && inputs.mouse.point.inside_rect?(buttons.left)) || inputs.keyboard.key_up.left +** Processing line: ~ end~ - Inside source: true *** True Line Result - end + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~#+end_src~ -- Line was identified as the end of a code block. +** Processing line: ~ def right_button_clicked?~ +- Inside source: true *** True Line Result -#+end_src -** Processing line: ~~ -- End of paragraph detected. + def right_button_clicked? +** Processing line: ~ (inputs.mouse.up && inputs.mouse.point.inside_rect?(buttons.right)) || inputs.keyboard.key_up.right~ +- Inside source: true *** True Line Result - -** Processing line: ~*** Http - Web Server - main.rb~ -- Header detected. + (inputs.mouse.up && inputs.mouse.point.inside_rect?(buttons.right)) || inputs.keyboard.key_up.right +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true *** True Line Result +** Processing line: ~ # Signal that the user is going to be moving the slider~ +- Inside source: true *** True Line Result -*** Http - Web Server - main.rb -** Processing line: ~#+begin_src ruby~ -- Line was identified as the beginning of a code block. + # Signal that the user is going to be moving the slider +** Processing line: ~ def slider_clicked?~ +- Inside source: true *** True Line Result - + def slider_clicked? +** Processing line: ~ circle_x = (slider.x - slider.offset) + (state.anim_steps * slider.spacing)~ +- Inside source: true *** True Line Result -#+begin_src ruby -** Processing line: ~ # ./samples/11_http/02_web_server/app/main.rb~ + circle_x = (slider.x - slider.offset) + (state.anim_steps * slider.spacing) +** Processing line: ~ circle_y = (slider.y - slider.offset)~ - Inside source: true *** True Line Result - # ./samples/11_http/02_web_server/app/main.rb -** Processing line: ~ def tick args~ + circle_y = (slider.y - slider.offset) +** Processing line: ~ circle_rect = [circle_x, circle_y, 37, 37]~ - Inside source: true *** True Line Result - def tick args -** Processing line: ~ args.state.port ||= 3000~ + circle_rect = [circle_x, circle_y, 37, 37] +** Processing line: ~ inputs.mouse.down && inputs.mouse.point.inside_rect?(circle_rect)~ - Inside source: true *** True Line Result - args.state.port ||= 3000 -** Processing line: ~ # by default the embedded webserver runs on port 9001 (the port number is over 9000) and is disabled in a production build~ + inputs.mouse.down && inputs.mouse.point.inside_rect?(circle_rect) +** Processing line: ~ end~ - Inside source: true *** True Line Result - # by default the embedded webserver runs on port 9001 (the port number is over 9000) and is disabled in a production build -** Processing line: ~ # to enable the http server in a production build, you need to manually start~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - # to enable the http server in a production build, you need to manually start -** Processing line: ~ # the server up:~ + +** Processing line: ~ # Signal that the user is going to be moving the star~ - Inside source: true *** True Line Result - # the server up: -** Processing line: ~ args.gtk.start_server! port: args.state.port, enable_in_prod: true~ + # Signal that the user is going to be moving the star +** Processing line: ~ def star_clicked?~ - Inside source: true *** True Line Result - args.gtk.start_server! port: args.state.port, enable_in_prod: true -** Processing line: ~ args.outputs.background_color = [0, 0, 0]~ + def star_clicked? +** Processing line: ~ inputs.mouse.down && inputs.mouse.point.inside_rect?(scale_up(state.star))~ - Inside source: true *** True Line Result - args.outputs.background_color = [0, 0, 0] -** Processing line: ~ args.outputs.labels << [640, 600, "Point your web browser at http://localhost:#{args.state.port}/", 10, 1, 255, 255, 255]~ + inputs.mouse.down && inputs.mouse.point.inside_rect?(scale_up(state.star)) +** Processing line: ~ end~ - Inside source: true *** True Line Result - args.outputs.labels << [640, 600, "Point your web browser at http://localhost:#{args.state.port}/", 10, 1, 255, 255, 255] + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ args.inputs.http_requests.each { |req|~ -- Inside source: true -*** True Line Result - args.inputs.http_requests.each { |req| -** Processing line: ~ puts("METHOD: #{req.method}");~ +** Processing line: ~ # Signal that the user is going to be removing walls~ - Inside source: true *** True Line Result - puts("METHOD: #{req.method}"); -** Processing line: ~ puts("URI: #{req.uri}");~ + # Signal that the user is going to be removing walls +** Processing line: ~ def wall_clicked?~ - Inside source: true *** True Line Result - puts("URI: #{req.uri}"); -** Processing line: ~ puts("HEADERS:");~ + def wall_clicked? +** Processing line: ~ inputs.mouse.down && mouse_inside_a_wall?~ - Inside source: true *** True Line Result - puts("HEADERS:"); -** Processing line: ~ req.headers.each { |k,v| puts(" #{k}: #{v}") }~ + inputs.mouse.down && mouse_inside_a_wall? +** Processing line: ~ end~ - Inside source: true *** True Line Result - req.headers.each { |k,v| puts(" #{k}: #{v}") } + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ if (req.uri == '/')~ +** Processing line: ~ # Signal that the user is going to be adding walls~ - Inside source: true *** True Line Result - if (req.uri == '/') -** Processing line: ~ # headers and body can be nil if you don't care about them.~ + # Signal that the user is going to be adding walls +** Processing line: ~ def grid_clicked?~ - Inside source: true *** True Line Result - # headers and body can be nil if you don't care about them. -** Processing line: ~ # If you don't set the Content-Type, it will default to~ + def grid_clicked? +** Processing line: ~ inputs.mouse.down && mouse_inside_grid?~ - Inside source: true *** True Line Result - # If you don't set the Content-Type, it will default to -** Processing line: ~ # "text/html; charset=utf-8".~ + inputs.mouse.down && mouse_inside_grid? +** Processing line: ~ end~ - Inside source: true *** True Line Result - # "text/html; charset=utf-8". -** Processing line: ~ # Don't set Content-Length; we'll ignore it and calculate it for you~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - # Don't set Content-Length; we'll ignore it and calculate it for you -** Processing line: ~ args.state.reqnum += 1~ + +** Processing line: ~ # Returns whether the mouse is inside of a wall~ - Inside source: true *** True Line Result - args.state.reqnum += 1 -** Processing line: ~ req.respond 200, "hello

    This #{req.method} was request number #{args.state.reqnum}!

    \n", { 'X-DRGTK-header' => 'Powered by DragonRuby!' }~ + # Returns whether the mouse is inside of a wall +** Processing line: ~ # Part of the condition that checks whether the user is removing a wall~ - Inside source: true *** True Line Result - req.respond 200, "hello

    This #{req.method} was request number #{args.state.reqnum}!

    \n", { 'X-DRGTK-header' => 'Powered by DragonRuby!' } -** Processing line: ~ else~ + # Part of the condition that checks whether the user is removing a wall +** Processing line: ~ def mouse_inside_a_wall?~ - Inside source: true *** True Line Result - else -** Processing line: ~ req.reject~ + def mouse_inside_a_wall? +** Processing line: ~ state.walls.each_key do | wall |~ - Inside source: true *** True Line Result - req.reject + state.walls.each_key do | wall | +** Processing line: ~ return true if inputs.mouse.point.inside_rect?(scale_up(wall))~ +- Inside source: true +*** True Line Result + return true if inputs.mouse.point.inside_rect?(scale_up(wall)) ** Processing line: ~ end~ - Inside source: true *** True Line Result end -** Processing line: ~ }~ +** Processing line: ~~ - Inside source: true *** True Line Result - } -** Processing line: ~ end~ + +** Processing line: ~ false~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + false +** Processing line: ~ end~ - Inside source: true *** True Line Result - -** Processing line: ~#+end_src~ -- Line was identified as the end of a code block. -*** True Line Result -#+end_src + end ** Processing line: ~~ -- End of paragraph detected. -*** True Line Result - -** Processing line: ~*** C Extensions - Basics - main.rb~ -- Header detected. +- Inside source: true *** True Line Result +** Processing line: ~ # Returns whether the mouse is inside of a grid~ +- Inside source: true *** True Line Result -*** C Extensions - Basics - main.rb -** Processing line: ~#+begin_src ruby~ -- Line was identified as the beginning of a code block. -*** True Line Result - + # Returns whether the mouse is inside of a grid +** Processing line: ~ # Part of the condition that checks whether the user is adding a wall~ +- Inside source: true *** True Line Result -#+begin_src ruby -** Processing line: ~ # ./samples/12_c_extensions/01_basics/app/main.rb~ + # Part of the condition that checks whether the user is adding a wall +** Processing line: ~ def mouse_inside_grid?~ - Inside source: true *** True Line Result - # ./samples/12_c_extensions/01_basics/app/main.rb -** Processing line: ~ $gtk.ffi_misc.gtk_dlopen("ext")~ + def mouse_inside_grid? +** Processing line: ~ inputs.mouse.point.inside_rect?(scale_up([0, 0, grid.width, grid.height]))~ - Inside source: true *** True Line Result - $gtk.ffi_misc.gtk_dlopen("ext") -** Processing line: ~ include FFI::CExt~ + inputs.mouse.point.inside_rect?(scale_up([0, 0, grid.width, grid.height])) +** Processing line: ~ end~ - Inside source: true *** True Line Result - include FFI::CExt + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def tick args~ +** Processing line: ~ # These methods provide handy aliases to colors~ - Inside source: true *** True Line Result - def tick args -** Processing line: ~ args.outputs.labels << [640, 500, "mouse.x = #{args.mouse.x.to_i}", 5, 1]~ + # These methods provide handy aliases to colors +** Processing line: ~~ - Inside source: true *** True Line Result - args.outputs.labels << [640, 500, "mouse.x = #{args.mouse.x.to_i}", 5, 1] -** Processing line: ~ args.outputs.labels << [640, 460, "square(mouse.x) = #{square(args.mouse.x.to_i)}", 5, 1]~ + +** Processing line: ~ # Light brown~ - Inside source: true *** True Line Result - args.outputs.labels << [640, 460, "square(mouse.x) = #{square(args.mouse.x.to_i)}", 5, 1] -** Processing line: ~ args.outputs.labels << [640, 420, "mouse.y = #{args.mouse.y.to_i}", 5, 1]~ + # Light brown +** Processing line: ~ def unvisited_color~ - Inside source: true *** True Line Result - args.outputs.labels << [640, 420, "mouse.y = #{args.mouse.y.to_i}", 5, 1] -** Processing line: ~ args.outputs.labels << [640, 380, "square(mouse.y) = #{square(args.mouse.y.to_i)}", 5, 1]~ + def unvisited_color +** Processing line: ~ [221, 212, 213]~ - Inside source: true *** True Line Result - args.outputs.labels << [640, 380, "square(mouse.y) = #{square(args.mouse.y.to_i)}", 5, 1] -** Processing line: ~ end~ + [221, 212, 213] +** Processing line: ~ end~ - Inside source: true *** True Line Result - end + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~~ +** Processing line: ~ # Black~ - Inside source: true *** True Line Result - -** Processing line: ~#+end_src~ -- Line was identified as the end of a code block. -*** True Line Result -#+end_src -** Processing line: ~~ -- End of paragraph detected. + # Black +** Processing line: ~ def grid_line_color~ +- Inside source: true *** True Line Result - -** Processing line: ~*** C Extensions - Intermediate - main.rb~ -- Header detected. + def grid_line_color +** Processing line: ~ [255, 255, 255]~ +- Inside source: true *** True Line Result - + [255, 255, 255] +** Processing line: ~ end~ +- Inside source: true *** True Line Result -*** C Extensions - Intermediate - main.rb -** Processing line: ~#+begin_src ruby~ -- Line was identified as the beginning of a code block. + end +** Processing line: ~~ +- Inside source: true *** True Line Result +** Processing line: ~ # Dark Brown~ +- Inside source: true *** True Line Result -#+begin_src ruby -** Processing line: ~ # ./samples/12_c_extensions/02_intermediate/app/main.rb~ + # Dark Brown +** Processing line: ~ def visited_color~ - Inside source: true *** True Line Result - # ./samples/12_c_extensions/02_intermediate/app/main.rb -** Processing line: ~ $gtk.ffi_misc.gtk_dlopen("ext")~ + def visited_color +** Processing line: ~ [204, 191, 179]~ - Inside source: true *** True Line Result - $gtk.ffi_misc.gtk_dlopen("ext") -** Processing line: ~ include FFI::RE~ + [204, 191, 179] +** Processing line: ~ end~ - Inside source: true *** True Line Result - include FFI::RE + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def split_words(input)~ -- Inside source: true -*** True Line Result - def split_words(input) -** Processing line: ~ words = []~ +** Processing line: ~ # Blue~ - Inside source: true *** True Line Result - words = [] -** Processing line: ~ last = IntPointer.new~ + # Blue +** Processing line: ~ def frontier_color~ - Inside source: true *** True Line Result - last = IntPointer.new -** Processing line: ~ re = re_compile("\\w+")~ + def frontier_color +** Processing line: ~ [103, 136, 204]~ - Inside source: true *** True Line Result - re = re_compile("\\w+") -** Processing line: ~ first = re_matchp(re, input, last)~ + [103, 136, 204] +** Processing line: ~ end~ - Inside source: true *** True Line Result - first = re_matchp(re, input, last) -** Processing line: ~ while first != -1~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - while first != -1 -** Processing line: ~ words << input.slice(first, last.value)~ + +** Processing line: ~ # Camo Green~ - Inside source: true *** True Line Result - words << input.slice(first, last.value) -** Processing line: ~ input = input.slice(last.value + first, input.length)~ + # Camo Green +** Processing line: ~ def wall_color~ - Inside source: true *** True Line Result - input = input.slice(last.value + first, input.length) -** Processing line: ~ first = re_matchp(re, input, last)~ + def wall_color +** Processing line: ~ [134, 134, 120]~ - Inside source: true *** True Line Result - first = re_matchp(re, input, last) + [134, 134, 120] ** Processing line: ~ end~ - Inside source: true *** True Line Result end -** Processing line: ~ words~ -- Inside source: true -*** True Line Result - words -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def tick args~ +** Processing line: ~ # Next frontier to be expanded~ - Inside source: true *** True Line Result - def tick args -** Processing line: ~ args.outputs.labels << [640, 500, split_words("hello, dragonriders!").join(' '), 5, 1]~ + # Next frontier to be expanded +** Processing line: ~ def highlighter_yellow~ - Inside source: true *** True Line Result - args.outputs.labels << [640, 500, split_words("hello, dragonriders!").join(' '), 5, 1] -** Processing line: ~ end~ + def highlighter_yellow +** Processing line: ~ [214, 231, 125]~ - Inside source: true *** True Line Result - end + [214, 231, 125] +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~#+end_src~ -- Line was identified as the end of a code block. +** Processing line: ~ # The neighbors of the next frontier to be expanded~ +- Inside source: true *** True Line Result -#+end_src -** Processing line: ~~ -- End of paragraph detected. + # The neighbors of the next frontier to be expanded +** Processing line: ~ def highlighter_green~ +- Inside source: true *** True Line Result - -** Processing line: ~*** C Extensions - Native Pixel Arrays - main.rb~ -- Header detected. + def highlighter_green +** Processing line: ~ [65, 191, 127]~ +- Inside source: true *** True Line Result - + [65, 191, 127] +** Processing line: ~ end~ +- Inside source: true *** True Line Result -*** C Extensions - Native Pixel Arrays - main.rb -** Processing line: ~#+begin_src ruby~ -- Line was identified as the beginning of a code block. + end +** Processing line: ~~ +- Inside source: true *** True Line Result +** Processing line: ~ # Button background~ +- Inside source: true *** True Line Result -#+begin_src ruby -** Processing line: ~ # ./samples/12_c_extensions/03_native_pixel_arrays/app/main.rb~ + # Button background +** Processing line: ~ def gray~ - Inside source: true *** True Line Result - # ./samples/12_c_extensions/03_native_pixel_arrays/app/main.rb -** Processing line: ~ $gtk.ffi_misc.gtk_dlopen("ext")~ + def gray +** Processing line: ~ [190, 190, 190]~ - Inside source: true *** True Line Result - $gtk.ffi_misc.gtk_dlopen("ext") -** Processing line: ~ include FFI::CExt~ + [190, 190, 190] +** Processing line: ~ end~ - Inside source: true *** True Line Result - include FFI::CExt + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def tick args~ +** Processing line: ~ # Button outline~ - Inside source: true *** True Line Result - def tick args -** Processing line: ~ args.state.rotation ||= 0~ + # Button outline +** Processing line: ~ def black~ - Inside source: true *** True Line Result - args.state.rotation ||= 0 -** Processing line: ~~ + def black +** Processing line: ~ [0, 0, 0]~ - Inside source: true *** True Line Result - -** Processing line: ~ update_scanner_texture # this calls into a C extension!~ + [0, 0, 0] +** Processing line: ~ end~ - Inside source: true *** True Line Result - update_scanner_texture # this calls into a C extension! + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # New/changed pixel arrays get uploaded to the GPU before we render~ +** Processing line: ~ # These methods make the code more concise~ - Inside source: true *** True Line Result - # New/changed pixel arrays get uploaded to the GPU before we render -** Processing line: ~ # anything. At that point, they can be scaled, rotated, and otherwise~ + # These methods make the code more concise +** Processing line: ~ def grid~ - Inside source: true *** True Line Result - # anything. At that point, they can be scaled, rotated, and otherwise -** Processing line: ~ # used like any other sprite.~ + def grid +** Processing line: ~ state.grid~ - Inside source: true *** True Line Result - # used like any other sprite. -** Processing line: ~ w = 100~ + state.grid +** Processing line: ~ end~ - Inside source: true *** True Line Result - w = 100 -** Processing line: ~ h = 100~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - h = 100 -** Processing line: ~ x = (1280 - w) / 2~ + +** Processing line: ~ def buttons~ - Inside source: true *** True Line Result - x = (1280 - w) / 2 -** Processing line: ~ y = (720 - h) / 2~ + def buttons +** Processing line: ~ state.buttons~ - Inside source: true *** True Line Result - y = (720 - h) / 2 -** Processing line: ~ args.outputs.background_color = [64, 0, 128]~ + state.buttons +** Processing line: ~ end~ - Inside source: true *** True Line Result - args.outputs.background_color = [64, 0, 128] -** Processing line: ~ args.outputs.primitives << [x, y, w, h, :scanner, args.state.rotation].sprite~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - args.outputs.primitives << [x, y, w, h, :scanner, args.state.rotation].sprite -** Processing line: ~ args.state.rotation += 1~ + +** Processing line: ~ def slider~ - Inside source: true *** True Line Result - args.state.rotation += 1 -** Processing line: ~~ + def slider +** Processing line: ~ state.slider~ - Inside source: true *** True Line Result - -** Processing line: ~ args.outputs.primitives << args.gtk.current_framerate_primitives~ + state.slider +** Processing line: ~ end~ - Inside source: true *** True Line Result - args.outputs.primitives << args.gtk.current_framerate_primitives + end ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -59824,130 +68239,106 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~#+end_src~ -- Line was identified as the end of a code block. -*** True Line Result -#+end_src -** Processing line: ~~ -- End of paragraph detected. -*** True Line Result - -** Processing line: ~*** Path Finding Algorithms - Breadth First Search - main.rb~ -- Header detected. -*** True Line Result - -*** True Line Result -*** Path Finding Algorithms - Breadth First Search - main.rb -** Processing line: ~#+begin_src ruby~ -- Line was identified as the beginning of a code block. +** Processing line: ~ def tick args~ +- Inside source: true *** True Line Result - + def tick args +** Processing line: ~ # Pressing r resets the program~ +- Inside source: true *** True Line Result -#+begin_src ruby -** Processing line: ~ # ./samples/13_path_finding_algorithms/01_breadth_first_search/app/main.rb~ + # Pressing r resets the program +** Processing line: ~ if args.inputs.keyboard.key_down.r~ - Inside source: true *** True Line Result - # ./samples/13_path_finding_algorithms/01_breadth_first_search/app/main.rb -** Processing line: ~ # A visual demonstration of a breadth first search~ + if args.inputs.keyboard.key_down.r +** Processing line: ~ args.gtk.reset~ - Inside source: true *** True Line Result - # A visual demonstration of a breadth first search -** Processing line: ~ # Inspired by https://www.redblobgames.com/pathfinding/a-star/introduction.html~ + args.gtk.reset +** Processing line: ~ reset~ - Inside source: true *** True Line Result - # Inspired by https://www.redblobgames.com/pathfinding/a-star/introduction.html -** Processing line: ~~ + reset +** Processing line: ~ return~ - Inside source: true *** True Line Result - -** Processing line: ~ # An animation that can respond to user input in real time~ + return +** Processing line: ~ end~ - Inside source: true *** True Line Result - # An animation that can respond to user input in real time + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # A breadth first search expands in all directions one step at a time~ +** Processing line: ~ $detailed_breadth_first_search ||= DetailedBreadthFirstSearch.new(args)~ - Inside source: true *** True Line Result - # A breadth first search expands in all directions one step at a time -** Processing line: ~ # The frontier is a queue of cells to be expanded from~ + $detailed_breadth_first_search ||= DetailedBreadthFirstSearch.new(args) +** Processing line: ~ $detailed_breadth_first_search.args = args~ - Inside source: true *** True Line Result - # The frontier is a queue of cells to be expanded from -** Processing line: ~ # The visited hash allows quick lookups of cells that have been expanded from~ + $detailed_breadth_first_search.args = args +** Processing line: ~ $detailed_breadth_first_search.tick~ - Inside source: true *** True Line Result - # The visited hash allows quick lookups of cells that have been expanded from -** Processing line: ~ # The walls hash allows quick lookup of whether a cell is a wall~ + $detailed_breadth_first_search.tick +** Processing line: ~ end~ - Inside source: true *** True Line Result - # The walls hash allows quick lookup of whether a cell is a wall + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # The breadth first search starts by adding the red star to the frontier array~ -- Inside source: true -*** True Line Result - # The breadth first search starts by adding the red star to the frontier array -** Processing line: ~ # and marking it as visited~ +** Processing line: ~~ - Inside source: true *** True Line Result - # and marking it as visited -** Processing line: ~ # Each step a cell is removed from the front of the frontier array (queue)~ + +** Processing line: ~ def reset~ - Inside source: true *** True Line Result - # Each step a cell is removed from the front of the frontier array (queue) -** Processing line: ~ # Unless the neighbor is a wall or visited, it is added to the frontier array~ + def reset +** Processing line: ~ $detailed_breadth_first_search = nil~ - Inside source: true *** True Line Result - # Unless the neighbor is a wall or visited, it is added to the frontier array -** Processing line: ~ # The neighbor is then marked as visited~ + $detailed_breadth_first_search = nil +** Processing line: ~ end~ - Inside source: true *** True Line Result - # The neighbor is then marked as visited + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # The frontier is blue~ -- Inside source: true +** Processing line: ~#+end_src~ +- Line was identified as the end of a code block. *** True Line Result - # The frontier is blue -** Processing line: ~ # Visited cells are light brown~ -- Inside source: true +#+end_src +** Processing line: ~~ +- End of paragraph detected. *** True Line Result - # Visited cells are light brown -** Processing line: ~ # Walls are camo green~ -- Inside source: true + +** Processing line: ~*** Path Finding Algorithms - Breadcrumbs - main.rb~ +- Header detected. *** True Line Result - # Walls are camo green -** Processing line: ~ # Even when walls are visited, they will maintain their wall color~ -- Inside source: true + *** True Line Result - # Even when walls are visited, they will maintain their wall color -** Processing line: ~~ -- Inside source: true +*** Path Finding Algorithms - Breadcrumbs - main.rb +** Processing line: ~#+begin_src ruby~ +- Line was identified as the beginning of a code block. *** True Line Result -** Processing line: ~ # The star can be moved by clicking and dragging~ -- Inside source: true *** True Line Result - # The star can be moved by clicking and dragging -** Processing line: ~ # Walls can be added and removed by clicking and dragging~ -- Inside source: true -*** True Line Result - # Walls can be added and removed by clicking and dragging -** Processing line: ~~ +#+begin_src ruby +** Processing line: ~ # ./samples/13_path_finding_algorithms/03_breadcrumbs/app/main.rb~ - Inside source: true *** True Line Result - -** Processing line: ~ class BreadthFirstSearch~ + # ./samples/13_path_finding_algorithms/03_breadcrumbs/app/main.rb +** Processing line: ~ class Breadcrumbs~ - Inside source: true *** True Line Result - class BreadthFirstSearch + class Breadcrumbs ** Processing line: ~ attr_gtk~ - Inside source: true *** True Line Result @@ -59956,98 +68347,94 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def initialize(args)~ -- Inside source: true -*** True Line Result - def initialize(args) -** Processing line: ~ # Variables to edit the size and appearance of the grid~ +** Processing line: ~ # This method is called every frame/tick~ - Inside source: true *** True Line Result - # Variables to edit the size and appearance of the grid -** Processing line: ~ # Freely customizable to user's liking~ + # This method is called every frame/tick +** Processing line: ~ # Every tick, the current state of the search is rendered on the screen,~ - Inside source: true *** True Line Result - # Freely customizable to user's liking -** Processing line: ~ args.state.grid.width = 30~ + # Every tick, the current state of the search is rendered on the screen, +** Processing line: ~ # User input is processed, and~ - Inside source: true *** True Line Result - args.state.grid.width = 30 -** Processing line: ~ args.state.grid.height = 15~ + # User input is processed, and +** Processing line: ~ # The next step in the search is calculated~ - Inside source: true *** True Line Result - args.state.grid.height = 15 -** Processing line: ~ args.state.grid.cell_size = 40~ + # The next step in the search is calculated +** Processing line: ~ def tick~ - Inside source: true *** True Line Result - args.state.grid.cell_size = 40 -** Processing line: ~~ + def tick +** Processing line: ~ defaults~ - Inside source: true *** True Line Result - -** Processing line: ~ # Stores which step of the animation is being rendered~ + defaults +** Processing line: ~ # If the grid has not been searched~ - Inside source: true *** True Line Result - # Stores which step of the animation is being rendered -** Processing line: ~ # When the user moves the star or messes with the walls,~ + # If the grid has not been searched +** Processing line: ~ if search.came_from.empty?~ - Inside source: true *** True Line Result - # When the user moves the star or messes with the walls, -** Processing line: ~ # the breadth first search is recalculated up to this step~ + if search.came_from.empty? +** Processing line: ~ calc~ - Inside source: true *** True Line Result - # the breadth first search is recalculated up to this step -** Processing line: ~ args.state.anim_steps = 0~ + calc +** Processing line: ~ # Calc Path~ - Inside source: true *** True Line Result - args.state.anim_steps = 0 -** Processing line: ~~ + # Calc Path +** Processing line: ~ end~ - Inside source: true *** True Line Result - -** Processing line: ~ # At some step the animation will end,~ + end +** Processing line: ~ render~ - Inside source: true *** True Line Result - # At some step the animation will end, -** Processing line: ~ # and further steps won't change anything (the whole grid will be explored)~ + render +** Processing line: ~ input~ - Inside source: true *** True Line Result - # and further steps won't change anything (the whole grid will be explored) -** Processing line: ~ # This step is roughly the grid's width * height~ + input +** Processing line: ~ end~ - Inside source: true *** True Line Result - # This step is roughly the grid's width * height -** Processing line: ~ # When anim_steps equals max_steps no more calculations will occur~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - # When anim_steps equals max_steps no more calculations will occur -** Processing line: ~ # and the slider will be at the end~ + +** Processing line: ~ def defaults~ - Inside source: true *** True Line Result - # and the slider will be at the end -** Processing line: ~ args.state.max_steps = args.state.grid.width * args.state.grid.height~ + def defaults +** Processing line: ~ # Variables to edit the size and appearance of the grid~ - Inside source: true *** True Line Result - args.state.max_steps = args.state.grid.width * args.state.grid.height -** Processing line: ~~ + # Variables to edit the size and appearance of the grid +** Processing line: ~ # Freely customizable to user's liking~ - Inside source: true *** True Line Result - -** Processing line: ~ # Whether the animation should play or not~ + # Freely customizable to user's liking +** Processing line: ~ grid.width ||= 30~ - Inside source: true *** True Line Result - # Whether the animation should play or not -** Processing line: ~ # If true, every tick moves anim_steps forward one~ + grid.width ||= 30 +** Processing line: ~ grid.height ||= 15~ - Inside source: true *** True Line Result - # If true, every tick moves anim_steps forward one -** Processing line: ~ # Pressing the stepwise animation buttons will pause the animation~ + grid.height ||= 15 +** Processing line: ~ grid.cell_size ||= 40~ - Inside source: true *** True Line Result - # Pressing the stepwise animation buttons will pause the animation -** Processing line: ~ args.state.play = true~ + grid.cell_size ||= 40 +** Processing line: ~ grid.rect ||= [0, 0, grid.width, grid.height]~ - Inside source: true *** True Line Result - args.state.play = true + grid.rect ||= [0, 0, grid.width, grid.height] ** Processing line: ~~ - Inside source: true *** True Line Result @@ -60064,14 +68451,18 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result # Walls are stored in a hash for quick look up when doing the search -** Processing line: ~ args.state.star = [0, 0]~ +** Processing line: ~ grid.star ||= [2, 8]~ - Inside source: true *** True Line Result - args.state.star = [0, 0] -** Processing line: ~ args.state.walls = {~ + grid.star ||= [2, 8] +** Processing line: ~ grid.target ||= [10, 5]~ - Inside source: true *** True Line Result - args.state.walls = { + grid.target ||= [10, 5] +** Processing line: ~ grid.walls ||= {~ +- Inside source: true +*** True Line Result + grid.walls ||= { ** Processing line: ~ [3, 3] => true,~ - Inside source: true *** True Line Result @@ -60144,10 +68535,6 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result [4, 11] => true, -** Processing line: ~~ -- Inside source: true -*** True Line Result - ** Processing line: ~ [13, 0] => true,~ - Inside source: true *** True Line Result @@ -60236,10 +68623,6 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result [14, 10] => true, -** Processing line: ~~ -- Inside source: true -*** True Line Result - ** Processing line: ~ [21, 8] => true,~ - Inside source: true *** True Line Result @@ -60344,370 +68727,154 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result # from the center outward -** Processing line: ~ args.state.visited = {}~ -- Inside source: true -*** True Line Result - args.state.visited = {} -** Processing line: ~ args.state.frontier = []~ -- Inside source: true -*** True Line Result - args.state.frontier = [] -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ # What the user is currently editing on the grid~ -- Inside source: true -*** True Line Result - # What the user is currently editing on the grid -** Processing line: ~ # Possible values are: :none, :slider, :star, :remove_wall, :add_wall~ -- Inside source: true -*** True Line Result - # Possible values are: :none, :slider, :star, :remove_wall, :add_wall -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ # We store this value, because we want to remember the value even when~ -- Inside source: true -*** True Line Result - # We store this value, because we want to remember the value even when -** Processing line: ~ # the user's cursor is no longer over what they're interacting with, but~ -- Inside source: true -*** True Line Result - # the user's cursor is no longer over what they're interacting with, but -** Processing line: ~ # they are still clicking down on the mouse.~ -- Inside source: true -*** True Line Result - # they are still clicking down on the mouse. -** Processing line: ~ args.state.click_and_drag = :none~ -- Inside source: true -*** True Line Result - args.state.click_and_drag = :none -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ # Store the rects of the buttons that control the animation~ -- Inside source: true -*** True Line Result - # Store the rects of the buttons that control the animation -** Processing line: ~ # They are here for user customization~ -- Inside source: true -*** True Line Result - # They are here for user customization -** Processing line: ~ # Editing these might require recentering the text inside them~ -- Inside source: true -*** True Line Result - # Editing these might require recentering the text inside them -** Processing line: ~ # Those values can be found in the render_button methods~ -- Inside source: true -*** True Line Result - # Those values can be found in the render_button methods -** Processing line: ~ args.state.buttons.left = [450, 600, 50, 50]~ -- Inside source: true -*** True Line Result - args.state.buttons.left = [450, 600, 50, 50] -** Processing line: ~ args.state.buttons.center = [500, 600, 200, 50]~ -- Inside source: true -*** True Line Result - args.state.buttons.center = [500, 600, 200, 50] -** Processing line: ~ args.state.buttons.right = [700, 600, 50, 50]~ -- Inside source: true -*** True Line Result - args.state.buttons.right = [700, 600, 50, 50] -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ # The variables below are related to the slider~ -- Inside source: true -*** True Line Result - # The variables below are related to the slider -** Processing line: ~ # They allow the user to customize them~ -- Inside source: true -*** True Line Result - # They allow the user to customize them -** Processing line: ~ # They also give a central location for the render and input methods to get~ -- Inside source: true -*** True Line Result - # They also give a central location for the render and input methods to get -** Processing line: ~ # information from~ -- Inside source: true -*** True Line Result - # information from -** Processing line: ~ # x & y are the coordinates of the leftmost part of the slider line~ -- Inside source: true -*** True Line Result - # x & y are the coordinates of the leftmost part of the slider line -** Processing line: ~ args.state.slider.x = 400~ -- Inside source: true -*** True Line Result - args.state.slider.x = 400 -** Processing line: ~ args.state.slider.y = 675~ -- Inside source: true -*** True Line Result - args.state.slider.y = 675 -** Processing line: ~ # This is the width of the line~ -- Inside source: true -*** True Line Result - # This is the width of the line -** Processing line: ~ args.state.slider.w = 360~ -- Inside source: true -*** True Line Result - args.state.slider.w = 360 -** Processing line: ~ # This is the offset for the circle~ -- Inside source: true -*** True Line Result - # This is the offset for the circle -** Processing line: ~ # Allows the center of the circle to be on the line,~ -- Inside source: true -*** True Line Result - # Allows the center of the circle to be on the line, -** Processing line: ~ # as opposed to the upper right corner~ -- Inside source: true -*** True Line Result - # as opposed to the upper right corner -** Processing line: ~ args.state.slider.offset = 20~ -- Inside source: true -*** True Line Result - args.state.slider.offset = 20 -** Processing line: ~ # This is the spacing between each of the notches on the slider~ -- Inside source: true -*** True Line Result - # This is the spacing between each of the notches on the slider -** Processing line: ~ # Notches are places where the circle can rest on the slider line~ -- Inside source: true -*** True Line Result - # Notches are places where the circle can rest on the slider line -** Processing line: ~ # There needs to be a notch for each step before the maximum number of steps~ -- Inside source: true -*** True Line Result - # There needs to be a notch for each step before the maximum number of steps -** Processing line: ~ args.state.slider.spacing = args.state.slider.w.to_f / args.state.max_steps.to_f~ -- Inside source: true -*** True Line Result - args.state.slider.spacing = args.state.slider.w.to_f / args.state.max_steps.to_f -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # This method is called every frame/tick~ -- Inside source: true -*** True Line Result - # This method is called every frame/tick -** Processing line: ~ # Every tick, the current state of the search is rendered on the screen,~ -- Inside source: true -*** True Line Result - # Every tick, the current state of the search is rendered on the screen, -** Processing line: ~ # User input is processed, and~ -- Inside source: true -*** True Line Result - # User input is processed, and -** Processing line: ~ # The next step in the search is calculated~ -- Inside source: true -*** True Line Result - # The next step in the search is calculated -** Processing line: ~ def tick~ -- Inside source: true -*** True Line Result - def tick -** Processing line: ~ render~ -- Inside source: true -*** True Line Result - render -** Processing line: ~ input~ -- Inside source: true -*** True Line Result - input -** Processing line: ~ # If animation is playing, and max steps have not been reached~ -- Inside source: true -*** True Line Result - # If animation is playing, and max steps have not been reached -** Processing line: ~ # Move the search a step forward~ -- Inside source: true -*** True Line Result - # Move the search a step forward -** Processing line: ~ if state.play && state.anim_steps < state.max_steps~ -- Inside source: true -*** True Line Result - if state.play && state.anim_steps < state.max_steps -** Processing line: ~ # Variable that tells the program what step to recalculate up to~ -- Inside source: true -*** True Line Result - # Variable that tells the program what step to recalculate up to -** Processing line: ~ state.anim_steps += 1~ -- Inside source: true -*** True Line Result - state.anim_steps += 1 -** Processing line: ~ calc~ -- Inside source: true -*** True Line Result - calc -** Processing line: ~ end~ +** Processing line: ~ # The cells from which the search is to expand~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + # The cells from which the search is to expand +** Processing line: ~ search.frontier ||= []~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + search.frontier ||= [] +** Processing line: ~ # A hash of where each cell was expanded from~ - Inside source: true *** True Line Result - -** Processing line: ~ # Draws everything onto the screen~ + # A hash of where each cell was expanded from +** Processing line: ~ # The key is a cell, and the value is the cell it came from~ - Inside source: true *** True Line Result - # Draws everything onto the screen -** Processing line: ~ def render~ + # The key is a cell, and the value is the cell it came from +** Processing line: ~ search.came_from ||= {}~ - Inside source: true *** True Line Result - def render -** Processing line: ~ render_buttons~ + search.came_from ||= {} +** Processing line: ~ # Cells that are part of the path from the target to the star~ - Inside source: true *** True Line Result - render_buttons -** Processing line: ~ render_slider~ + # Cells that are part of the path from the target to the star +** Processing line: ~ search.path ||= {}~ - Inside source: true *** True Line Result - render_slider + search.path ||= {} ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ render_background~ -- Inside source: true -*** True Line Result - render_background -** Processing line: ~ render_visited~ -- Inside source: true -*** True Line Result - render_visited -** Processing line: ~ render_frontier~ -- Inside source: true -*** True Line Result - render_frontier -** Processing line: ~ render_walls~ -- Inside source: true -*** True Line Result - render_walls -** Processing line: ~ render_star~ +** Processing line: ~ # What the user is currently editing on the grid~ - Inside source: true *** True Line Result - render_star -** Processing line: ~ end~ + # What the user is currently editing on the grid +** Processing line: ~ # We store this value, because we want to remember the value even when~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + # We store this value, because we want to remember the value even when +** Processing line: ~ # the user's cursor is no longer over what they're interacting with, but~ - Inside source: true *** True Line Result - -** Processing line: ~ # The methods below subdivide the task of drawing everything to the screen~ + # the user's cursor is no longer over what they're interacting with, but +** Processing line: ~ # they are still clicking down on the mouse.~ - Inside source: true *** True Line Result - # The methods below subdivide the task of drawing everything to the screen -** Processing line: ~~ + # they are still clicking down on the mouse. +** Processing line: ~ state.current_input ||= :none~ - Inside source: true *** True Line Result - -** Processing line: ~ # Draws the buttons that control the animation step and state~ + state.current_input ||= :none +** Processing line: ~ end~ - Inside source: true *** True Line Result - # Draws the buttons that control the animation step and state -** Processing line: ~ def render_buttons~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - def render_buttons -** Processing line: ~ render_left_button~ + +** Processing line: ~ def calc~ - Inside source: true *** True Line Result - render_left_button -** Processing line: ~ render_center_button~ + def calc +** Processing line: ~ # Setup the search to start from the star~ - Inside source: true *** True Line Result - render_center_button -** Processing line: ~ render_right_button~ + # Setup the search to start from the star +** Processing line: ~ search.frontier << grid.star~ - Inside source: true *** True Line Result - render_right_button -** Processing line: ~ end~ + search.frontier << grid.star +** Processing line: ~ search.came_from[grid.star] = nil~ - Inside source: true *** True Line Result - end + search.came_from[grid.star] = nil ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Draws the button which steps the search backward~ +** Processing line: ~ # Until there are no more cells to expand from~ - Inside source: true *** True Line Result - # Draws the button which steps the search backward -** Processing line: ~ # Shows the user where to click to move the search backward~ + # Until there are no more cells to expand from +** Processing line: ~ until search.frontier.empty?~ - Inside source: true *** True Line Result - # Shows the user where to click to move the search backward -** Processing line: ~ def render_left_button~ + until search.frontier.empty? +** Processing line: ~ # Takes the next frontier cell~ - Inside source: true *** True Line Result - def render_left_button -** Processing line: ~ # Draws the gray button, and a black border~ + # Takes the next frontier cell +** Processing line: ~ new_frontier = search.frontier.shift~ - Inside source: true *** True Line Result - # Draws the gray button, and a black border -** Processing line: ~ # The border separates the buttons visually~ + new_frontier = search.frontier.shift +** Processing line: ~ # For each of its neighbors~ - Inside source: true *** True Line Result - # The border separates the buttons visually -** Processing line: ~ outputs.solids << [buttons.left, gray]~ + # For each of its neighbors +** Processing line: ~ adjacent_neighbors(new_frontier).each do |neighbor|~ - Inside source: true *** True Line Result - outputs.solids << [buttons.left, gray] -** Processing line: ~ outputs.borders << [buttons.left, black]~ + adjacent_neighbors(new_frontier).each do |neighbor| +** Processing line: ~ # That have not been visited and are not walls~ - Inside source: true *** True Line Result - outputs.borders << [buttons.left, black] -** Processing line: ~~ + # That have not been visited and are not walls +** Processing line: ~ unless search.came_from.has_key?(neighbor) || grid.walls.has_key?(neighbor)~ - Inside source: true *** True Line Result - -** Processing line: ~ # Renders an explanatory label in the center of the button~ + unless search.came_from.has_key?(neighbor) || grid.walls.has_key?(neighbor) +** Processing line: ~ # Add them to the frontier and mark them as visited in the first grid~ - Inside source: true *** True Line Result - # Renders an explanatory label in the center of the button -** Processing line: ~ # Explains to the user what the button does~ + # Add them to the frontier and mark them as visited in the first grid +** Processing line: ~ # Unless the target has been visited~ - Inside source: true *** True Line Result - # Explains to the user what the button does -** Processing line: ~ # If the button size is changed, the label might need to be edited as well~ + # Unless the target has been visited +** Processing line: ~ # Add the neighbor to the frontier and remember which cell it came from~ - Inside source: true *** True Line Result - # If the button size is changed, the label might need to be edited as well -** Processing line: ~ # to keep the label in the center of the button~ + # Add the neighbor to the frontier and remember which cell it came from +** Processing line: ~ search.frontier << neighbor~ - Inside source: true *** True Line Result - # to keep the label in the center of the button -** Processing line: ~ label_x = buttons.left.x + 20~ + search.frontier << neighbor +** Processing line: ~ search.came_from[neighbor] = new_frontier~ - Inside source: true *** True Line Result - label_x = buttons.left.x + 20 -** Processing line: ~ label_y = buttons.left.y + 35~ + search.came_from[neighbor] = new_frontier +** Processing line: ~ end~ - Inside source: true *** True Line Result - label_y = buttons.left.y + 35 -** Processing line: ~ outputs.labels << [label_x, label_y, "<"]~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - outputs.labels << [label_x, label_y, "<"] + end +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -60716,62 +68883,62 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def render_center_button~ +** Processing line: ~~ - Inside source: true *** True Line Result - def render_center_button -** Processing line: ~ # Draws the gray button, and a black border~ + +** Processing line: ~ # Draws everything onto the screen~ - Inside source: true *** True Line Result - # Draws the gray button, and a black border -** Processing line: ~ # The border separates the buttons visually~ + # Draws everything onto the screen +** Processing line: ~ def render~ - Inside source: true *** True Line Result - # The border separates the buttons visually -** Processing line: ~ outputs.solids << [buttons.center, gray]~ + def render +** Processing line: ~ render_background~ - Inside source: true *** True Line Result - outputs.solids << [buttons.center, gray] -** Processing line: ~ outputs.borders << [buttons.center, black]~ + render_background +** Processing line: ~ # render_heat_map~ - Inside source: true *** True Line Result - outputs.borders << [buttons.center, black] -** Processing line: ~~ + # render_heat_map +** Processing line: ~ render_walls~ - Inside source: true *** True Line Result - -** Processing line: ~ # Renders an explanatory label in the center of the button~ + render_walls +** Processing line: ~ # render_path~ - Inside source: true *** True Line Result - # Renders an explanatory label in the center of the button -** Processing line: ~ # Explains to the user what the button does~ + # render_path +** Processing line: ~ # render_labels~ - Inside source: true *** True Line Result - # Explains to the user what the button does -** Processing line: ~ # If the button size is changed, the label might need to be edited as well~ + # render_labels +** Processing line: ~ render_arrows~ - Inside source: true *** True Line Result - # If the button size is changed, the label might need to be edited as well -** Processing line: ~ # to keep the label in the center of the button~ + render_arrows +** Processing line: ~ render_star~ - Inside source: true *** True Line Result - # to keep the label in the center of the button -** Processing line: ~ label_x = buttons.center.x + 37~ + render_star +** Processing line: ~ render_target~ - Inside source: true *** True Line Result - label_x = buttons.center.x + 37 -** Processing line: ~ label_y = buttons.center.y + 35~ + render_target +** Processing line: ~ unless grid.walls.has_key?(grid.target)~ - Inside source: true *** True Line Result - label_y = buttons.center.y + 35 -** Processing line: ~ label_text = state.play ? "Pause Animation" : "Play Animation"~ + unless grid.walls.has_key?(grid.target) +** Processing line: ~ render_trail~ - Inside source: true *** True Line Result - label_text = state.play ? "Pause Animation" : "Play Animation" -** Processing line: ~ outputs.labels << [label_x, label_y, label_text]~ + render_trail +** Processing line: ~ end~ - Inside source: true *** True Line Result - outputs.labels << [label_x, label_y, label_text] + end ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -60780,106 +68947,110 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def render_right_button~ +** Processing line: ~ def render_trail(current_cell=grid.target)~ - Inside source: true *** True Line Result - def render_right_button -** Processing line: ~ # Draws the gray button, and a black border~ + def render_trail(current_cell=grid.target) +** Processing line: ~ return if current_cell == grid.star~ - Inside source: true *** True Line Result - # Draws the gray button, and a black border -** Processing line: ~ # The border separates the buttons visually~ + return if current_cell == grid.star +** Processing line: ~ parent_cell = search.came_from[current_cell]~ - Inside source: true *** True Line Result - # The border separates the buttons visually -** Processing line: ~ outputs.solids << [buttons.right, gray]~ + parent_cell = search.came_from[current_cell] +** Processing line: ~ if current_cell && parent_cell~ - Inside source: true *** True Line Result - outputs.solids << [buttons.right, gray] -** Processing line: ~ outputs.borders << [buttons.right, black]~ + if current_cell && parent_cell +** Processing line: ~ outputs.lines << [(current_cell.x + 0.5) * grid.cell_size, (current_cell.y + 0.5) * grid.cell_size,~ - Inside source: true *** True Line Result - outputs.borders << [buttons.right, black] + outputs.lines << [(current_cell.x + 0.5) * grid.cell_size, (current_cell.y + 0.5) * grid.cell_size, +** Processing line: ~ (parent_cell.x + 0.5) * grid.cell_size, (parent_cell.y + 0.5) * grid.cell_size, purple]~ +- Inside source: true +*** True Line Result + (parent_cell.x + 0.5) * grid.cell_size, (parent_cell.y + 0.5) * grid.cell_size, purple] ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Renders an explanatory label in the center of the button~ +** Processing line: ~ end~ - Inside source: true *** True Line Result - # Renders an explanatory label in the center of the button -** Processing line: ~ # Explains to the user what the button does~ + end +** Processing line: ~ render_trail(parent_cell)~ - Inside source: true *** True Line Result - # Explains to the user what the button does -** Processing line: ~ label_x = buttons.right.x + 20~ + render_trail(parent_cell) +** Processing line: ~ end~ - Inside source: true *** True Line Result - label_x = buttons.right.x + 20 -** Processing line: ~ label_y = buttons.right.y + 35~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - label_y = buttons.right.y + 35 -** Processing line: ~ outputs.labels << [label_x, label_y, ">"]~ + +** Processing line: ~ def render_arrows~ - Inside source: true *** True Line Result - outputs.labels << [label_x, label_y, ">"] -** Processing line: ~ end~ + def render_arrows +** Processing line: ~ search.came_from.each do |child, parent|~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + search.came_from.each do |child, parent| +** Processing line: ~ if parent && child~ - Inside source: true *** True Line Result - -** Processing line: ~ # Draws the slider so the user can move it and see the progress of the search~ + if parent && child +** Processing line: ~ arrow_cell = [(child.x + parent.x) / 2, (child.y + parent.y) / 2]~ - Inside source: true *** True Line Result - # Draws the slider so the user can move it and see the progress of the search -** Processing line: ~ def render_slider~ + arrow_cell = [(child.x + parent.x) / 2, (child.y + parent.y) / 2] +** Processing line: ~ if parent.x > child.x # If the parent cell is to the right of the child cell~ - Inside source: true *** True Line Result - def render_slider -** Processing line: ~ # Using primitives hides the line under the white circle of the slider~ + if parent.x > child.x # If the parent cell is to the right of the child cell +** Processing line: ~ outputs.sprites << [scale_up(arrow_cell), 'arrow.png', 0] # Point the arrow to the right~ - Inside source: true *** True Line Result - # Using primitives hides the line under the white circle of the slider -** Processing line: ~ # Draws the line~ + outputs.sprites << [scale_up(arrow_cell), 'arrow.png', 0] # Point the arrow to the right +** Processing line: ~ elsif parent.x < child.x # If the parent cell is to the right of the child cell~ - Inside source: true *** True Line Result - # Draws the line -** Processing line: ~ outputs.primitives << [slider.x, slider.y, slider.x + slider.w, slider.y].line~ + elsif parent.x < child.x # If the parent cell is to the right of the child cell +** Processing line: ~ outputs.sprites << [scale_up(arrow_cell), 'arrow.png', 180] # Point the arrow to the right~ - Inside source: true *** True Line Result - outputs.primitives << [slider.x, slider.y, slider.x + slider.w, slider.y].line -** Processing line: ~ # The circle needs to be offset so that the center of the circle~ + outputs.sprites << [scale_up(arrow_cell), 'arrow.png', 180] # Point the arrow to the right +** Processing line: ~ elsif parent.y > child.y # If the parent cell is to the right of the child cell~ - Inside source: true *** True Line Result - # The circle needs to be offset so that the center of the circle -** Processing line: ~ # overlaps the line instead of the upper right corner of the circle~ + elsif parent.y > child.y # If the parent cell is to the right of the child cell +** Processing line: ~ outputs.sprites << [scale_up(arrow_cell), 'arrow.png', 90] # Point the arrow to the right~ - Inside source: true *** True Line Result - # overlaps the line instead of the upper right corner of the circle -** Processing line: ~ # The circle's x value is also moved based on the current seach step~ + outputs.sprites << [scale_up(arrow_cell), 'arrow.png', 90] # Point the arrow to the right +** Processing line: ~ elsif parent.y < child.y # If the parent cell is to the right of the child cell~ - Inside source: true *** True Line Result - # The circle's x value is also moved based on the current seach step -** Processing line: ~ circle_x = (slider.x - slider.offset) + (state.anim_steps * slider.spacing)~ + elsif parent.y < child.y # If the parent cell is to the right of the child cell +** Processing line: ~ outputs.sprites << [scale_up(arrow_cell), 'arrow.png', 270] # Point the arrow to the right~ - Inside source: true *** True Line Result - circle_x = (slider.x - slider.offset) + (state.anim_steps * slider.spacing) -** Processing line: ~ circle_y = (slider.y - slider.offset)~ + outputs.sprites << [scale_up(arrow_cell), 'arrow.png', 270] # Point the arrow to the right +** Processing line: ~ end~ - Inside source: true *** True Line Result - circle_y = (slider.y - slider.offset) -** Processing line: ~ circle_rect = [circle_x, circle_y, 37, 37]~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - circle_rect = [circle_x, circle_y, 37, 37] -** Processing line: ~ outputs.primitives << [circle_rect, 'circle-white.png'].sprite~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - outputs.primitives << [circle_rect, 'circle-white.png'].sprite + end ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -60888,6 +69059,14 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result +** Processing line: ~ # The methods below subdivide the task of drawing everything to the screen~ +- Inside source: true +*** True Line Result + # The methods below subdivide the task of drawing everything to the screen +** Processing line: ~~ +- Inside source: true +*** True Line Result + ** Processing line: ~ # Draws what the grid looks like with nothing on it~ - Inside source: true *** True Line Result @@ -60912,18 +69091,18 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Draws a rectangle the size of the entire grid to represent unvisited cells~ +** Processing line: ~ # Draws both grids~ - Inside source: true *** True Line Result - # Draws a rectangle the size of the entire grid to represent unvisited cells + # Draws both grids ** Processing line: ~ def render_unvisited~ - Inside source: true *** True Line Result def render_unvisited -** Processing line: ~ outputs.solids << [scale_up([0, 0, grid.width, grid.height]), unvisited_color]~ +** Processing line: ~ outputs.solids << [scale_up(grid.rect), unvisited_color]~ - Inside source: true *** True Line Result - outputs.solids << [scale_up([0, 0, grid.width, grid.height]), unvisited_color] + outputs.solids << [scale_up(grid.rect), unvisited_color] ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -61016,26 +69195,22 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Draws the area that is going to be searched from~ -- Inside source: true -*** True Line Result - # Draws the area that is going to be searched from -** Processing line: ~ # The frontier is the most outward parts of the search~ +** Processing line: ~ # Draws the walls on both grids~ - Inside source: true *** True Line Result - # The frontier is the most outward parts of the search -** Processing line: ~ def render_frontier~ + # Draws the walls on both grids +** Processing line: ~ def render_walls~ - Inside source: true *** True Line Result - def render_frontier -** Processing line: ~ outputs.solids << state.frontier.map do |cell|~ + def render_walls +** Processing line: ~ grid.walls.each_key do |wall|~ - Inside source: true *** True Line Result - outputs.solids << state.frontier.map do |cell| -** Processing line: ~ [scale_up([cell.x, cell.y]), frontier_color]~ + grid.walls.each_key do |wall| +** Processing line: ~ outputs.solids << [scale_up(wall), wall_color]~ - Inside source: true *** True Line Result - [scale_up([cell.x, cell.y]), frontier_color] + outputs.solids << [scale_up(wall), wall_color] ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -61048,26 +69223,38 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Draws the walls~ +** Processing line: ~ # Renders the star on both grids~ - Inside source: true *** True Line Result - # Draws the walls -** Processing line: ~ def render_walls~ + # Renders the star on both grids +** Processing line: ~ def render_star~ - Inside source: true *** True Line Result - def render_walls -** Processing line: ~ outputs.solids << state.walls.map do |wall|~ + def render_star +** Processing line: ~ outputs.sprites << [scale_up(grid.star), 'star.png']~ - Inside source: true *** True Line Result - outputs.solids << state.walls.map do |wall| -** Processing line: ~ [scale_up([wall.x, wall.y]), wall_color]~ + outputs.sprites << [scale_up(grid.star), 'star.png'] +** Processing line: ~ end~ - Inside source: true *** True Line Result - [scale_up([wall.x, wall.y]), wall_color] -** Processing line: ~ end~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - end + +** Processing line: ~ # Renders the target on both grids~ +- Inside source: true +*** True Line Result + # Renders the target on both grids +** Processing line: ~ def render_target~ +- Inside source: true +*** True Line Result + def render_target +** Processing line: ~ outputs.sprites << [scale_up(grid.target), 'target.png']~ +- Inside source: true +*** True Line Result + outputs.sprites << [scale_up(grid.target), 'target.png'] ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -61076,22 +69263,62 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Renders cells that have been searched in the appropriate color~ +** Processing line: ~ # Labels the grids~ - Inside source: true *** True Line Result - # Renders cells that have been searched in the appropriate color -** Processing line: ~ def render_visited~ + # Labels the grids +** Processing line: ~ def render_labels~ - Inside source: true *** True Line Result - def render_visited -** Processing line: ~ outputs.solids << state.visited.map do |cell|~ + def render_labels +** Processing line: ~ outputs.labels << [200, 625, "Without early exit"]~ - Inside source: true *** True Line Result - outputs.solids << state.visited.map do |cell| -** Processing line: ~ [scale_up([cell.x, cell.y]), visited_color]~ + outputs.labels << [200, 625, "Without early exit"] +** Processing line: ~ end~ - Inside source: true *** True Line Result - [scale_up([cell.x, cell.y]), visited_color] + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ # Renders the path based off of the search.path hash~ +- Inside source: true +*** True Line Result + # Renders the path based off of the search.path hash +** Processing line: ~ def render_path~ +- Inside source: true +*** True Line Result + def render_path +** Processing line: ~ # If the star and target are disconnected there will only be one path~ +- Inside source: true +*** True Line Result + # If the star and target are disconnected there will only be one path +** Processing line: ~ # The path should not render in that case~ +- Inside source: true +*** True Line Result + # The path should not render in that case +** Processing line: ~ unless search.path.size == 1~ +- Inside source: true +*** True Line Result + unless search.path.size == 1 +** Processing line: ~ search.path.each_key do | cell |~ +- Inside source: true +*** True Line Result + search.path.each_key do | cell | +** Processing line: ~ # Renders path on both grids~ +- Inside source: true +*** True Line Result + # Renders path on both grids +** Processing line: ~ outputs.solids << [scale_up(cell), path_color]~ +- Inside source: true +*** True Line Result + outputs.solids << [scale_up(cell), path_color] +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -61104,18 +69331,42 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Renders the star~ +** Processing line: ~ # Calculates the path from the target to the star after the search is over~ - Inside source: true *** True Line Result - # Renders the star -** Processing line: ~ def render_star~ + # Calculates the path from the target to the star after the search is over +** Processing line: ~ # Relies on the came_from hash~ - Inside source: true *** True Line Result - def render_star -** Processing line: ~ outputs.sprites << [scale_up(state.star), 'star.png']~ + # Relies on the came_from hash +** Processing line: ~ # Fills the search.path hash, which is later rendered on screen~ - Inside source: true *** True Line Result - outputs.sprites << [scale_up(state.star), 'star.png'] + # Fills the search.path hash, which is later rendered on screen +** Processing line: ~ def calc_path~ +- Inside source: true +*** True Line Result + def calc_path +** Processing line: ~ endpoint = grid.target~ +- Inside source: true +*** True Line Result + endpoint = grid.target +** Processing line: ~ while endpoint~ +- Inside source: true +*** True Line Result + while endpoint +** Processing line: ~ search.path[endpoint] = true~ +- Inside source: true +*** True Line Result + search.path[endpoint] = true +** Processing line: ~ endpoint = search.came_from[endpoint]~ +- Inside source: true +*** True Line Result + endpoint = search.came_from[endpoint] +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -61220,110 +69471,18 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result # This method processes user input every tick -** Processing line: ~ # This method allows the user to use the buttons, slider, and edit the grid~ -- Inside source: true -*** True Line Result - # This method allows the user to use the buttons, slider, and edit the grid -** Processing line: ~ # There are 2 types of input:~ -- Inside source: true -*** True Line Result - # There are 2 types of input: -** Processing line: ~ # Button Input~ -- Inside source: true -*** True Line Result - # Button Input -** Processing line: ~ # Click and Drag Input~ -- Inside source: true -*** True Line Result - # Click and Drag Input -** Processing line: ~ #~ -- Inside source: true -*** True Line Result - # -** Processing line: ~ # Button Input is used for the backward step and forward step buttons~ -- Inside source: true -*** True Line Result - # Button Input is used for the backward step and forward step buttons -** Processing line: ~ # Input is detected by mouse up within the bounds of the rect~ -- Inside source: true -*** True Line Result - # Input is detected by mouse up within the bounds of the rect -** Processing line: ~ #~ -- Inside source: true -*** True Line Result - # -** Processing line: ~ # Click and Drag Input is used for moving the star, adding walls,~ -- Inside source: true -*** True Line Result - # Click and Drag Input is used for moving the star, adding walls, -** Processing line: ~ # removing walls, and the slider~ -- Inside source: true -*** True Line Result - # removing walls, and the slider -** Processing line: ~ #~ -- Inside source: true -*** True Line Result - # -** Processing line: ~ # When the mouse is down on the star, the click_and_drag variable is set to :star~ -- Inside source: true -*** True Line Result - # When the mouse is down on the star, the click_and_drag variable is set to :star -** Processing line: ~ # While click_and_drag equals :star, the cursor's position is used to calculate the~ -- Inside source: true -*** True Line Result - # While click_and_drag equals :star, the cursor's position is used to calculate the -** Processing line: ~ # appropriate drag behavior~ -- Inside source: true -*** True Line Result - # appropriate drag behavior -** Processing line: ~ #~ -- Inside source: true -*** True Line Result - # -** Processing line: ~ # When the mouse goes up click_and_drag is set to :none~ -- Inside source: true -*** True Line Result - # When the mouse goes up click_and_drag is set to :none -** Processing line: ~ #~ -- Inside source: true -*** True Line Result - # -** Processing line: ~ # A variable has to be used because the star has to continue being edited even~ -- Inside source: true -*** True Line Result - # A variable has to be used because the star has to continue being edited even -** Processing line: ~ # when the cursor is no longer over the star~ -- Inside source: true -*** True Line Result - # when the cursor is no longer over the star -** Processing line: ~ #~ +** Processing line: ~ # Any method with "1" is related to the first grid~ - Inside source: true *** True Line Result - # -** Processing line: ~ # Similar things occur for the other Click and Drag inputs~ + # Any method with "1" is related to the first grid +** Processing line: ~ # Any method with "2" is related to the second grid~ - Inside source: true *** True Line Result - # Similar things occur for the other Click and Drag inputs + # Any method with "2" is related to the second grid ** Processing line: ~ def input~ - Inside source: true *** True Line Result def input -** Processing line: ~ # Checks whether any of the buttons are being clicked~ -- Inside source: true -*** True Line Result - # Checks whether any of the buttons are being clicked -** Processing line: ~ input_buttons~ -- Inside source: true -*** True Line Result - input_buttons -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ # The detection and processing of click and drag inputs are separate~ -- Inside source: true -*** True Line Result - # The detection and processing of click and drag inputs are separate ** Processing line: ~ # The program has to remember that the user is dragging an object~ - Inside source: true *** True Line Result @@ -61332,78 +69491,78 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result # even when the mouse is no longer over that object -** Processing line: ~ detect_click_and_drag~ +** Processing line: ~ # So detecting input and processing input is separate~ - Inside source: true *** True Line Result - detect_click_and_drag -** Processing line: ~ process_click_and_drag~ + # So detecting input and processing input is separate +** Processing line: ~ # detect_input~ - Inside source: true *** True Line Result - process_click_and_drag -** Processing line: ~ end~ + # detect_input +** Processing line: ~ # process_input~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + # process_input +** Processing line: ~ if inputs.mouse.up~ - Inside source: true *** True Line Result - -** Processing line: ~ # Detects and Process input for each button~ + if inputs.mouse.up +** Processing line: ~ state.current_input = :none~ - Inside source: true *** True Line Result - # Detects and Process input for each button -** Processing line: ~ def input_buttons~ + state.current_input = :none +** Processing line: ~ elsif star_clicked?~ - Inside source: true *** True Line Result - def input_buttons -** Processing line: ~ input_left_button~ + elsif star_clicked? +** Processing line: ~ state.current_input = :star~ - Inside source: true *** True Line Result - input_left_button -** Processing line: ~ input_center_button~ + state.current_input = :star +** Processing line: ~ end~ - Inside source: true *** True Line Result - input_center_button -** Processing line: ~ input_next_step_button~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - input_next_step_button -** Processing line: ~ end~ + +** Processing line: ~ if mouse_inside_grid?~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + if mouse_inside_grid? +** Processing line: ~ unless grid.target == cell_closest_to_mouse~ - Inside source: true *** True Line Result - -** Processing line: ~ # Checks if the previous step button is clicked~ + unless grid.target == cell_closest_to_mouse +** Processing line: ~ grid.target = cell_closest_to_mouse~ - Inside source: true *** True Line Result - # Checks if the previous step button is clicked -** Processing line: ~ # If it is, it pauses the animation and moves the search one step backward~ + grid.target = cell_closest_to_mouse +** Processing line: ~ end~ - Inside source: true *** True Line Result - # If it is, it pauses the animation and moves the search one step backward -** Processing line: ~ def input_left_button~ + end +** Processing line: ~ if state.current_input == :star~ - Inside source: true *** True Line Result - def input_left_button -** Processing line: ~ if left_button_clicked?~ + if state.current_input == :star +** Processing line: ~ unless grid.star == cell_closest_to_mouse~ - Inside source: true *** True Line Result - if left_button_clicked? -** Processing line: ~ state.play = false~ + unless grid.star == cell_closest_to_mouse +** Processing line: ~ grid.star = cell_closest_to_mouse~ - Inside source: true *** True Line Result - state.play = false -** Processing line: ~ state.anim_steps -= 1~ + grid.star = cell_closest_to_mouse +** Processing line: ~ end~ - Inside source: true *** True Line Result - state.anim_steps -= 1 -** Processing line: ~ recalculate~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - recalculate + end ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -61416,134 +69575,134 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Controls the play/pause button~ +** Processing line: ~ # Determines what the user is editing and stores the value~ - Inside source: true *** True Line Result - # Controls the play/pause button -** Processing line: ~ # Inverses whether the animation is playing or not when clicked~ + # Determines what the user is editing and stores the value +** Processing line: ~ # Storing the value allows the user to continue the same edit as long as the~ - Inside source: true *** True Line Result - # Inverses whether the animation is playing or not when clicked -** Processing line: ~ def input_center_button~ + # Storing the value allows the user to continue the same edit as long as the +** Processing line: ~ # mouse left click is held~ - Inside source: true *** True Line Result - def input_center_button -** Processing line: ~ if center_button_clicked? or inputs.keyboard.key_down.space~ + # mouse left click is held +** Processing line: ~ def detect_input~ - Inside source: true *** True Line Result - if center_button_clicked? or inputs.keyboard.key_down.space -** Processing line: ~ state.play = !state.play~ + def detect_input +** Processing line: ~ # When the mouse is up, nothing is being edited~ - Inside source: true *** True Line Result - state.play = !state.play -** Processing line: ~ end~ + # When the mouse is up, nothing is being edited +** Processing line: ~ if inputs.mouse.up~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + if inputs.mouse.up +** Processing line: ~ state.current_input = :none~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + state.current_input = :none +** Processing line: ~ # When the star in the no second grid is clicked~ - Inside source: true *** True Line Result - -** Processing line: ~ # Checks if the next step button is clicked~ + # When the star in the no second grid is clicked +** Processing line: ~ elsif star_clicked?~ - Inside source: true *** True Line Result - # Checks if the next step button is clicked -** Processing line: ~ # If it is, it pauses the animation and moves the search one step forward~ + elsif star_clicked? +** Processing line: ~ state.current_input = :star~ - Inside source: true *** True Line Result - # If it is, it pauses the animation and moves the search one step forward -** Processing line: ~ def input_next_step_button~ + state.current_input = :star +** Processing line: ~ # When the target in the no second grid is clicked~ - Inside source: true *** True Line Result - def input_next_step_button -** Processing line: ~ if right_button_clicked?~ + # When the target in the no second grid is clicked +** Processing line: ~ elsif target_clicked?~ - Inside source: true *** True Line Result - if right_button_clicked? -** Processing line: ~ state.play = false~ + elsif target_clicked? +** Processing line: ~ state.current_input = :target~ - Inside source: true *** True Line Result - state.play = false -** Processing line: ~ state.anim_steps += 1~ + state.current_input = :target +** Processing line: ~ # When a wall in the first grid is clicked~ - Inside source: true *** True Line Result - state.anim_steps += 1 -** Processing line: ~ calc~ + # When a wall in the first grid is clicked +** Processing line: ~ elsif wall_clicked?~ - Inside source: true *** True Line Result - calc -** Processing line: ~ end~ + elsif wall_clicked? +** Processing line: ~ state.current_input = :remove_wall~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + state.current_input = :remove_wall +** Processing line: ~ # When the first grid is clicked~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + # When the first grid is clicked +** Processing line: ~ elsif grid_clicked?~ - Inside source: true *** True Line Result - -** Processing line: ~ # Determines what the user is editing and stores the value~ + elsif grid_clicked? +** Processing line: ~ state.current_input = :add_wall~ - Inside source: true *** True Line Result - # Determines what the user is editing and stores the value -** Processing line: ~ # Storing the value allows the user to continue the same edit as long as the~ + state.current_input = :add_wall +** Processing line: ~ end~ - Inside source: true *** True Line Result - # Storing the value allows the user to continue the same edit as long as the -** Processing line: ~ # mouse left click is held~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - # mouse left click is held -** Processing line: ~ def detect_click_and_drag~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - def detect_click_and_drag -** Processing line: ~ if inputs.mouse.up~ + +** Processing line: ~ # Processes click and drag based on what the user is currently dragging~ - Inside source: true *** True Line Result - if inputs.mouse.up -** Processing line: ~ state.click_and_drag = :none~ + # Processes click and drag based on what the user is currently dragging +** Processing line: ~ def process_input~ - Inside source: true *** True Line Result - state.click_and_drag = :none -** Processing line: ~ elsif star_clicked?~ + def process_input +** Processing line: ~ if state.current_input == :star~ - Inside source: true *** True Line Result - elsif star_clicked? -** Processing line: ~ state.click_and_drag = :star~ + if state.current_input == :star +** Processing line: ~ input_star~ - Inside source: true *** True Line Result - state.click_and_drag = :star -** Processing line: ~ elsif wall_clicked?~ + input_star +** Processing line: ~ elsif state.current_input == :target~ - Inside source: true *** True Line Result - elsif wall_clicked? -** Processing line: ~ state.click_and_drag = :remove_wall~ + elsif state.current_input == :target +** Processing line: ~ input_target~ - Inside source: true *** True Line Result - state.click_and_drag = :remove_wall -** Processing line: ~ elsif grid_clicked?~ + input_target +** Processing line: ~ elsif state.current_input == :remove_wall~ - Inside source: true *** True Line Result - elsif grid_clicked? -** Processing line: ~ state.click_and_drag = :add_wall~ + elsif state.current_input == :remove_wall +** Processing line: ~ input_remove_wall~ - Inside source: true *** True Line Result - state.click_and_drag = :add_wall -** Processing line: ~ elsif slider_clicked?~ + input_remove_wall +** Processing line: ~ elsif state.current_input == :add_wall~ - Inside source: true *** True Line Result - elsif slider_clicked? -** Processing line: ~ state.click_and_drag = :slider~ + elsif state.current_input == :add_wall +** Processing line: ~ input_add_wall~ - Inside source: true *** True Line Result - state.click_and_drag = :slider + input_add_wall ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -61556,46 +69715,38 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Processes click and drag based on what the user is currently dragging~ -- Inside source: true -*** True Line Result - # Processes click and drag based on what the user is currently dragging -** Processing line: ~ def process_click_and_drag~ -- Inside source: true -*** True Line Result - def process_click_and_drag -** Processing line: ~ if state.click_and_drag == :star~ +** Processing line: ~ # Moves the star to the cell closest to the mouse in the first grid~ - Inside source: true *** True Line Result - if state.click_and_drag == :star -** Processing line: ~ input_star~ + # Moves the star to the cell closest to the mouse in the first grid +** Processing line: ~ # Only resets the search if the star changes position~ - Inside source: true *** True Line Result - input_star -** Processing line: ~ elsif state.click_and_drag == :remove_wall~ + # Only resets the search if the star changes position +** Processing line: ~ # Called whenever the user is editing the star (puts mouse down on star)~ - Inside source: true *** True Line Result - elsif state.click_and_drag == :remove_wall -** Processing line: ~ input_remove_wall~ + # Called whenever the user is editing the star (puts mouse down on star) +** Processing line: ~ def input_star~ - Inside source: true *** True Line Result - input_remove_wall -** Processing line: ~ elsif state.click_and_drag == :add_wall~ + def input_star +** Processing line: ~ old_star = grid.star.clone~ - Inside source: true *** True Line Result - elsif state.click_and_drag == :add_wall -** Processing line: ~ input_add_wall~ + old_star = grid.star.clone +** Processing line: ~ grid.star = cell_closest_to_mouse~ - Inside source: true *** True Line Result - input_add_wall -** Processing line: ~ elsif state.click_and_drag == :slider~ + grid.star = cell_closest_to_mouse +** Processing line: ~ unless old_star == grid.star~ - Inside source: true *** True Line Result - elsif state.click_and_drag == :slider -** Processing line: ~ input_slider~ + unless old_star == grid.star +** Processing line: ~ reset_search~ - Inside source: true *** True Line Result - input_slider + reset_search ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -61608,38 +69759,38 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Moves the star to the grid closest to the mouse~ +** Processing line: ~ # Moves the target to the grid closest to the mouse in the first grid~ - Inside source: true *** True Line Result - # Moves the star to the grid closest to the mouse -** Processing line: ~ # Only recalculates the search if the star changes position~ + # Moves the target to the grid closest to the mouse in the first grid +** Processing line: ~ # Only reset_searchs the search if the target changes position~ - Inside source: true *** True Line Result - # Only recalculates the search if the star changes position -** Processing line: ~ # Called whenever the user is editing the star (puts mouse down on star)~ + # Only reset_searchs the search if the target changes position +** Processing line: ~ # Called whenever the user is editing the target (puts mouse down on target)~ - Inside source: true *** True Line Result - # Called whenever the user is editing the star (puts mouse down on star) -** Processing line: ~ def input_star~ + # Called whenever the user is editing the target (puts mouse down on target) +** Processing line: ~ def input_target~ - Inside source: true *** True Line Result - def input_star -** Processing line: ~ old_star = state.star.clone~ + def input_target +** Processing line: ~ old_target = grid.target.clone~ - Inside source: true *** True Line Result - old_star = state.star.clone -** Processing line: ~ state.star = cell_closest_to_mouse~ + old_target = grid.target.clone +** Processing line: ~ grid.target = cell_closest_to_mouse~ - Inside source: true *** True Line Result - state.star = cell_closest_to_mouse -** Processing line: ~ unless old_star == state.star~ + grid.target = cell_closest_to_mouse +** Processing line: ~ unless old_target == grid.target~ - Inside source: true *** True Line Result - unless old_star == state.star -** Processing line: ~ recalculate~ + unless old_target == grid.target +** Processing line: ~ reset_search~ - Inside source: true *** True Line Result - recalculate + reset_search ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -61652,10 +69803,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Removes walls that are under the cursor~ +** Processing line: ~ # Removes walls in the first grid that are under the cursor~ - Inside source: true *** True Line Result - # Removes walls that are under the cursor + # Removes walls in the first grid that are under the cursor ** Processing line: ~ def input_remove_wall~ - Inside source: true *** True Line Result @@ -61676,18 +69827,18 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result if mouse_inside_grid? -** Processing line: ~ if state.walls.has_key?(cell_closest_to_mouse)~ +** Processing line: ~ if grid.walls.has_key?(cell_closest_to_mouse)~ - Inside source: true *** True Line Result - if state.walls.has_key?(cell_closest_to_mouse) -** Processing line: ~ state.walls.delete(cell_closest_to_mouse)~ + if grid.walls.has_key?(cell_closest_to_mouse) +** Processing line: ~ grid.walls.delete(cell_closest_to_mouse)~ - Inside source: true *** True Line Result - state.walls.delete(cell_closest_to_mouse) -** Processing line: ~ recalculate~ + grid.walls.delete(cell_closest_to_mouse) +** Processing line: ~ reset_search~ - Inside source: true *** True Line Result - recalculate + reset_search ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -61704,10 +69855,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Adds walls at cells under the cursor~ +** Processing line: ~ # Adds a wall in the first grid in the cell the mouse is over~ - Inside source: true *** True Line Result - # Adds walls at cells under the cursor + # Adds a wall in the first grid in the cell the mouse is over ** Processing line: ~ def input_add_wall~ - Inside source: true *** True Line Result @@ -61716,18 +69867,18 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result if mouse_inside_grid? -** Processing line: ~ unless state.walls.has_key?(cell_closest_to_mouse)~ +** Processing line: ~ unless grid.walls.has_key?(cell_closest_to_mouse)~ - Inside source: true *** True Line Result - unless state.walls.has_key?(cell_closest_to_mouse) -** Processing line: ~ state.walls[cell_closest_to_mouse] = true~ + unless grid.walls.has_key?(cell_closest_to_mouse) +** Processing line: ~ grid.walls[cell_closest_to_mouse] = true~ - Inside source: true *** True Line Result - state.walls[cell_closest_to_mouse] = true -** Processing line: ~ recalculate~ + grid.walls[cell_closest_to_mouse] = true +** Processing line: ~ reset_search~ - Inside source: true *** True Line Result - recalculate + reset_search ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -61739,259 +69890,47 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ end~ - Inside source: true *** True Line Result - end -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ # This method is called when the user is editing the slider~ -- Inside source: true -*** True Line Result - # This method is called when the user is editing the slider -** Processing line: ~ # It pauses the animation and moves the white circle to the closest integer point~ -- Inside source: true -*** True Line Result - # It pauses the animation and moves the white circle to the closest integer point -** Processing line: ~ # on the slider~ -- Inside source: true -*** True Line Result - # on the slider -** Processing line: ~ # Changes the step of the search to be animated~ -- Inside source: true -*** True Line Result - # Changes the step of the search to be animated -** Processing line: ~ def input_slider~ -- Inside source: true -*** True Line Result - def input_slider -** Processing line: ~ state.play = false~ -- Inside source: true -*** True Line Result - state.play = false -** Processing line: ~ mouse_x = inputs.mouse.point.x~ -- Inside source: true -*** True Line Result - mouse_x = inputs.mouse.point.x -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ # Bounds the mouse_x to the closest x value on the slider line~ -- Inside source: true -*** True Line Result - # Bounds the mouse_x to the closest x value on the slider line -** Processing line: ~ mouse_x = slider.x if mouse_x < slider.x~ -- Inside source: true -*** True Line Result - mouse_x = slider.x if mouse_x < slider.x -** Processing line: ~ mouse_x = slider.x + slider.w if mouse_x > slider.x + slider.w~ -- Inside source: true -*** True Line Result - mouse_x = slider.x + slider.w if mouse_x > slider.x + slider.w -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ # Sets the current search step to the one represented by the mouse x value~ -- Inside source: true -*** True Line Result - # Sets the current search step to the one represented by the mouse x value -** Processing line: ~ # The slider's circle moves due to the render_slider method using anim_steps~ -- Inside source: true -*** True Line Result - # The slider's circle moves due to the render_slider method using anim_steps -** Processing line: ~ state.anim_steps = ((mouse_x - slider.x) / slider.spacing).to_i~ -- Inside source: true -*** True Line Result - state.anim_steps = ((mouse_x - slider.x) / slider.spacing).to_i -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ recalculate~ -- Inside source: true -*** True Line Result - recalculate -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ # Whenever the user edits the grid,~ -- Inside source: true -*** True Line Result - # Whenever the user edits the grid, -** Processing line: ~ # The search has to be recalculated upto the current step~ -- Inside source: true -*** True Line Result - # The search has to be recalculated upto the current step -** Processing line: ~ # with the current grid as the initial state of the grid~ -- Inside source: true -*** True Line Result - # with the current grid as the initial state of the grid -** Processing line: ~ def recalculate~ -- Inside source: true -*** True Line Result - def recalculate -** Processing line: ~ # Resets the search~ -- Inside source: true -*** True Line Result - # Resets the search -** Processing line: ~ state.frontier = []~ -- Inside source: true -*** True Line Result - state.frontier = [] -** Processing line: ~ state.visited = {}~ -- Inside source: true -*** True Line Result - state.visited = {} -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ # Moves the animation forward one step at a time~ -- Inside source: true -*** True Line Result - # Moves the animation forward one step at a time -** Processing line: ~ state.anim_steps.times { calc }~ -- Inside source: true -*** True Line Result - state.anim_steps.times { calc } -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ # This method moves the search forward one step~ -- Inside source: true -*** True Line Result - # This method moves the search forward one step -** Processing line: ~ # When the animation is playing it is called every tick~ -- Inside source: true -*** True Line Result - # When the animation is playing it is called every tick -** Processing line: ~ # And called whenever the current step of the animation needs to be recalculated~ -- Inside source: true -*** True Line Result - # And called whenever the current step of the animation needs to be recalculated -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ # Moves the search forward one step~ -- Inside source: true -*** True Line Result - # Moves the search forward one step -** Processing line: ~ # Parameter called_from_tick is true if it is called from the tick method~ -- Inside source: true -*** True Line Result - # Parameter called_from_tick is true if it is called from the tick method -** Processing line: ~ # It is false when the search is being recalculated after user editing the grid~ -- Inside source: true -*** True Line Result - # It is false when the search is being recalculated after user editing the grid -** Processing line: ~ def calc~ -- Inside source: true -*** True Line Result - def calc -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ # The setup to the search~ -- Inside source: true -*** True Line Result - # The setup to the search -** Processing line: ~ # Runs once when the there is no frontier or visited cells~ -- Inside source: true -*** True Line Result - # Runs once when the there is no frontier or visited cells -** Processing line: ~ if state.frontier.empty? && state.visited.empty?~ -- Inside source: true -*** True Line Result - if state.frontier.empty? && state.visited.empty? -** Processing line: ~ state.frontier << state.star~ -- Inside source: true -*** True Line Result - state.frontier << state.star -** Processing line: ~ state.visited[state.star] = true~ -- Inside source: true -*** True Line Result - state.visited[state.star] = true -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ # A step in the search~ -- Inside source: true -*** True Line Result - # A step in the search -** Processing line: ~ unless state.frontier.empty?~ -- Inside source: true -*** True Line Result - unless state.frontier.empty? -** Processing line: ~ # Takes the next frontier cell~ -- Inside source: true -*** True Line Result - # Takes the next frontier cell -** Processing line: ~ new_frontier = state.frontier.shift~ -- Inside source: true -*** True Line Result - new_frontier = state.frontier.shift -** Processing line: ~ # For each of its neighbors~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - # For each of its neighbors -** Processing line: ~ adjacent_neighbors(new_frontier).each do |neighbor|~ + +** Processing line: ~~ - Inside source: true *** True Line Result - adjacent_neighbors(new_frontier).each do |neighbor| -** Processing line: ~ # That have not been visited and are not walls~ + +** Processing line: ~ # Whenever the user edits the grid,~ - Inside source: true *** True Line Result - # That have not been visited and are not walls -** Processing line: ~ unless state.visited.has_key?(neighbor) || state.walls.has_key?(neighbor)~ + # Whenever the user edits the grid, +** Processing line: ~ # The search has to be reset_searchd upto the current step~ - Inside source: true *** True Line Result - unless state.visited.has_key?(neighbor) || state.walls.has_key?(neighbor) -** Processing line: ~ # Add them to the frontier and mark them as visited~ + # The search has to be reset_searchd upto the current step +** Processing line: ~ # with the current grid as the initial state of the grid~ - Inside source: true *** True Line Result - # Add them to the frontier and mark them as visited -** Processing line: ~ state.frontier << neighbor~ + # with the current grid as the initial state of the grid +** Processing line: ~ def reset_search~ - Inside source: true *** True Line Result - state.frontier << neighbor -** Processing line: ~ state.visited[neighbor] = true~ + def reset_search +** Processing line: ~ # Reset_Searchs the search~ - Inside source: true *** True Line Result - state.visited[neighbor] = true -** Processing line: ~ end~ + # Reset_Searchs the search +** Processing line: ~ search.frontier = []~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + search.frontier = [] +** Processing line: ~ search.came_from = {}~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + search.came_from = {} +** Processing line: ~ search.path = {}~ - Inside source: true *** True Line Result - end + search.path = {} ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -62024,14 +69963,14 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ neighbors << [cell.x, cell.y + 1] unless cell.y == grid.height - 1~ +** Processing line: ~ # Gets all the valid neighbors into the array~ - Inside source: true *** True Line Result - neighbors << [cell.x, cell.y + 1] unless cell.y == grid.height - 1 -** Processing line: ~ neighbors << [cell.x + 1, cell.y] unless cell.x == grid.width - 1~ + # Gets all the valid neighbors into the array +** Processing line: ~ # From southern neighbor, clockwise~ - Inside source: true *** True Line Result - neighbors << [cell.x + 1, cell.y] unless cell.x == grid.width - 1 + # From southern neighbor, clockwise ** Processing line: ~ neighbors << [cell.x, cell.y - 1] unless cell.y == 0~ - Inside source: true *** True Line Result @@ -62040,122 +69979,110 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result neighbors << [cell.x - 1, cell.y] unless cell.x == 0 -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ neighbors~ +** Processing line: ~ neighbors << [cell.x, cell.y + 1] unless cell.y == grid.height - 1~ - Inside source: true *** True Line Result - neighbors -** Processing line: ~ end~ + neighbors << [cell.x, cell.y + 1] unless cell.y == grid.height - 1 +** Processing line: ~ neighbors << [cell.x + 1, cell.y] unless cell.x == grid.width - 1~ - Inside source: true *** True Line Result - end + neighbors << [cell.x + 1, cell.y] unless cell.x == grid.width - 1 ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # When the user grabs the star and puts their cursor to the far right~ -- Inside source: true -*** True Line Result - # When the user grabs the star and puts their cursor to the far right -** Processing line: ~ # and moves up and down, the star is supposed to move along the grid as well~ +** Processing line: ~ # Sorts the neighbors so the rendered path is a zigzag path~ - Inside source: true *** True Line Result - # and moves up and down, the star is supposed to move along the grid as well -** Processing line: ~ # Finding the cell closest to the mouse helps with this~ + # Sorts the neighbors so the rendered path is a zigzag path +** Processing line: ~ # Cells in a diagonal direction are given priority~ - Inside source: true *** True Line Result - # Finding the cell closest to the mouse helps with this -** Processing line: ~ def cell_closest_to_mouse~ + # Cells in a diagonal direction are given priority +** Processing line: ~ # Comment this line to see the difference~ - Inside source: true *** True Line Result - def cell_closest_to_mouse -** Processing line: ~ # Closest cell to the mouse~ + # Comment this line to see the difference +** Processing line: ~ neighbors = neighbors.sort_by { |neighbor_x, neighbor_y| proximity_to_star(neighbor_x, neighbor_y) }~ - Inside source: true *** True Line Result - # Closest cell to the mouse -** Processing line: ~ x = (inputs.mouse.point.x / grid.cell_size).to_i~ + neighbors = neighbors.sort_by { |neighbor_x, neighbor_y| proximity_to_star(neighbor_x, neighbor_y) } +** Processing line: ~~ - Inside source: true *** True Line Result - x = (inputs.mouse.point.x / grid.cell_size).to_i -** Processing line: ~ y = (inputs.mouse.point.y / grid.cell_size).to_i~ + +** Processing line: ~ neighbors~ - Inside source: true *** True Line Result - y = (inputs.mouse.point.y / grid.cell_size).to_i -** Processing line: ~ # Bound x and y to the grid~ + neighbors +** Processing line: ~ end~ - Inside source: true *** True Line Result - # Bound x and y to the grid -** Processing line: ~ x = grid.width - 1 if x > grid.width - 1~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - x = grid.width - 1 if x > grid.width - 1 -** Processing line: ~ y = grid.height - 1 if y > grid.height - 1~ + +** Processing line: ~ # Finds the vertical and horizontal distance of a cell from the star~ - Inside source: true *** True Line Result - y = grid.height - 1 if y > grid.height - 1 -** Processing line: ~ # Return closest cell~ + # Finds the vertical and horizontal distance of a cell from the star +** Processing line: ~ # and returns the larger value~ - Inside source: true *** True Line Result - # Return closest cell -** Processing line: ~ [x, y]~ + # and returns the larger value +** Processing line: ~ # This method is used to have a zigzag pattern in the rendered path~ - Inside source: true *** True Line Result - [x, y] -** Processing line: ~ end~ + # This method is used to have a zigzag pattern in the rendered path +** Processing line: ~ # A cell that is [5, 5] from the star,~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + # A cell that is [5, 5] from the star, +** Processing line: ~ # is explored before over a cell that is [0, 7] away.~ - Inside source: true *** True Line Result - -** Processing line: ~ # These methods detect when the buttons are clicked~ + # is explored before over a cell that is [0, 7] away. +** Processing line: ~ # So, if possible, the search tries to go diagonal (zigzag) first~ - Inside source: true *** True Line Result - # These methods detect when the buttons are clicked -** Processing line: ~ def left_button_clicked?~ + # So, if possible, the search tries to go diagonal (zigzag) first +** Processing line: ~ def proximity_to_star(x, y)~ - Inside source: true *** True Line Result - def left_button_clicked? -** Processing line: ~ inputs.mouse.up && inputs.mouse.point.inside_rect?(buttons.left)~ + def proximity_to_star(x, y) +** Processing line: ~ distance_x = (grid.star.x - x).abs~ - Inside source: true *** True Line Result - inputs.mouse.up && inputs.mouse.point.inside_rect?(buttons.left) -** Processing line: ~ end~ + distance_x = (grid.star.x - x).abs +** Processing line: ~ distance_y = (grid.star.y - y).abs~ - Inside source: true *** True Line Result - end + distance_y = (grid.star.y - y).abs ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def center_button_clicked?~ -- Inside source: true -*** True Line Result - def center_button_clicked? -** Processing line: ~ inputs.mouse.up && inputs.mouse.point.inside_rect?(buttons.center)~ +** Processing line: ~ if distance_x > distance_y~ - Inside source: true *** True Line Result - inputs.mouse.up && inputs.mouse.point.inside_rect?(buttons.center) -** Processing line: ~ end~ + if distance_x > distance_y +** Processing line: ~ return distance_x~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + return distance_x +** Processing line: ~ else~ - Inside source: true *** True Line Result - -** Processing line: ~ def right_button_clicked?~ + else +** Processing line: ~ return distance_y~ - Inside source: true *** True Line Result - def right_button_clicked? -** Processing line: ~ inputs.mouse.up && inputs.mouse.point.inside_rect?(buttons.right)~ + return distance_y +** Processing line: ~ end~ - Inside source: true *** True Line Result - inputs.mouse.up && inputs.mouse.point.inside_rect?(buttons.right) + end ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -62164,54 +70091,54 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Signal that the user is going to be moving the slider~ +** Processing line: ~ # When the user grabs the star and puts their cursor to the far right~ - Inside source: true *** True Line Result - # Signal that the user is going to be moving the slider -** Processing line: ~ # Is the mouse down on the circle of the slider?~ + # When the user grabs the star and puts their cursor to the far right +** Processing line: ~ # and moves up and down, the star is supposed to move along the grid as well~ - Inside source: true *** True Line Result - # Is the mouse down on the circle of the slider? -** Processing line: ~ def slider_clicked?~ + # and moves up and down, the star is supposed to move along the grid as well +** Processing line: ~ # Finding the cell closest to the mouse helps with this~ - Inside source: true *** True Line Result - def slider_clicked? -** Processing line: ~ circle_x = (slider.x - slider.offset) + (state.anim_steps * slider.spacing)~ + # Finding the cell closest to the mouse helps with this +** Processing line: ~ def cell_closest_to_mouse~ - Inside source: true *** True Line Result - circle_x = (slider.x - slider.offset) + (state.anim_steps * slider.spacing) -** Processing line: ~ circle_y = (slider.y - slider.offset)~ + def cell_closest_to_mouse +** Processing line: ~ # Closest cell to the mouse in the first grid~ - Inside source: true *** True Line Result - circle_y = (slider.y - slider.offset) -** Processing line: ~ circle_rect = [circle_x, circle_y, 37, 37]~ + # Closest cell to the mouse in the first grid +** Processing line: ~ x = (inputs.mouse.point.x / grid.cell_size).to_i~ - Inside source: true *** True Line Result - circle_rect = [circle_x, circle_y, 37, 37] -** Processing line: ~ inputs.mouse.down && inputs.mouse.point.inside_rect?(circle_rect)~ + x = (inputs.mouse.point.x / grid.cell_size).to_i +** Processing line: ~ y = (inputs.mouse.point.y / grid.cell_size).to_i~ - Inside source: true *** True Line Result - inputs.mouse.down && inputs.mouse.point.inside_rect?(circle_rect) -** Processing line: ~ end~ + y = (inputs.mouse.point.y / grid.cell_size).to_i +** Processing line: ~ # Bound x and y to the grid~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + # Bound x and y to the grid +** Processing line: ~ x = grid.width - 1 if x > grid.width - 1~ - Inside source: true *** True Line Result - -** Processing line: ~ # Signal that the user is going to be moving the star~ + x = grid.width - 1 if x > grid.width - 1 +** Processing line: ~ y = grid.height - 1 if y > grid.height - 1~ - Inside source: true *** True Line Result - # Signal that the user is going to be moving the star -** Processing line: ~ def star_clicked?~ + y = grid.height - 1 if y > grid.height - 1 +** Processing line: ~ # Return closest cell~ - Inside source: true *** True Line Result - def star_clicked? -** Processing line: ~ inputs.mouse.down && inputs.mouse.point.inside_rect?(scale_up(state.star))~ + # Return closest cell +** Processing line: ~ [x, y]~ - Inside source: true *** True Line Result - inputs.mouse.down && inputs.mouse.point.inside_rect?(scale_up(state.star)) + [x, y] ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -62220,18 +70147,18 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Signal that the user is going to be removing walls~ +** Processing line: ~ # Signal that the user is going to be moving the star from the first grid~ - Inside source: true *** True Line Result - # Signal that the user is going to be removing walls -** Processing line: ~ def wall_clicked?~ + # Signal that the user is going to be moving the star from the first grid +** Processing line: ~ def star_clicked?~ - Inside source: true *** True Line Result - def wall_clicked? -** Processing line: ~ inputs.mouse.down && mouse_inside_a_wall?~ + def star_clicked? +** Processing line: ~ inputs.mouse.down && inputs.mouse.point.inside_rect?(scale_up(grid.star))~ - Inside source: true *** True Line Result - inputs.mouse.down && mouse_inside_a_wall? + inputs.mouse.down && inputs.mouse.point.inside_rect?(scale_up(grid.star)) ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -62240,18 +70167,18 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Signal that the user is going to be adding walls~ +** Processing line: ~ # Signal that the user is going to be moving the target from the first grid~ - Inside source: true *** True Line Result - # Signal that the user is going to be adding walls -** Processing line: ~ def grid_clicked?~ + # Signal that the user is going to be moving the target from the first grid +** Processing line: ~ def target_clicked?~ - Inside source: true *** True Line Result - def grid_clicked? -** Processing line: ~ inputs.mouse.down && mouse_inside_grid?~ + def target_clicked? +** Processing line: ~ inputs.mouse.down && inputs.mouse.point.inside_rect?(scale_up(grid.target))~ - Inside source: true *** True Line Result - inputs.mouse.down && mouse_inside_grid? + inputs.mouse.down && inputs.mouse.point.inside_rect?(scale_up(grid.target)) ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -62260,38 +70187,18 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Returns whether the mouse is inside of a wall~ -- Inside source: true -*** True Line Result - # Returns whether the mouse is inside of a wall -** Processing line: ~ # Part of the condition that checks whether the user is removing a wall~ -- Inside source: true -*** True Line Result - # Part of the condition that checks whether the user is removing a wall -** Processing line: ~ def mouse_inside_a_wall?~ -- Inside source: true -*** True Line Result - def mouse_inside_a_wall? -** Processing line: ~ state.walls.each_key do | wall |~ -- Inside source: true -*** True Line Result - state.walls.each_key do | wall | -** Processing line: ~ return true if inputs.mouse.point.inside_rect?(scale_up([wall.x, wall.y]))~ -- Inside source: true -*** True Line Result - return true if inputs.mouse.point.inside_rect?(scale_up([wall.x, wall.y])) -** Processing line: ~ end~ +** Processing line: ~ # Signal that the user is going to be adding walls from the first grid~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + # Signal that the user is going to be adding walls from the first grid +** Processing line: ~ def grid_clicked?~ - Inside source: true *** True Line Result - -** Processing line: ~ false~ + def grid_clicked? +** Processing line: ~ inputs.mouse.down && mouse_inside_grid?~ - Inside source: true *** True Line Result - false + inputs.mouse.down && mouse_inside_grid? ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -62300,10 +70207,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Returns whether the mouse is inside of a grid~ +** Processing line: ~ # Returns whether the mouse is inside of the first grid~ - Inside source: true *** True Line Result - # Returns whether the mouse is inside of a grid + # Returns whether the mouse is inside of the first grid ** Processing line: ~ # Part of the condition that checks whether the user is adding a wall~ - Inside source: true *** True Line Result @@ -62312,10 +70219,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result def mouse_inside_grid? -** Processing line: ~ inputs.mouse.point.inside_rect?(scale_up([0, 0, grid.width, grid.height]))~ +** Processing line: ~ inputs.mouse.point.inside_rect?(scale_up(grid.rect))~ - Inside source: true *** True Line Result - inputs.mouse.point.inside_rect?(scale_up([0, 0, grid.width, grid.height])) + inputs.mouse.point.inside_rect?(scale_up(grid.rect)) ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -62324,10 +70231,6 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~~ -- Inside source: true -*** True Line Result - ** Processing line: ~ # These methods provide handy aliases to colors~ - Inside source: true *** True Line Result @@ -62348,66 +70251,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result [221, 212, 213] -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ # Black~ -- Inside source: true -*** True Line Result - # Black -** Processing line: ~ def grid_line_color~ -- Inside source: true -*** True Line Result - def grid_line_color -** Processing line: ~ [255, 255, 255]~ -- Inside source: true -*** True Line Result - [255, 255, 255] -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ # Dark Brown~ -- Inside source: true -*** True Line Result - # Dark Brown -** Processing line: ~ def visited_color~ -- Inside source: true -*** True Line Result - def visited_color -** Processing line: ~ [204, 191, 179]~ -- Inside source: true -*** True Line Result - [204, 191, 179] -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ # Blue~ -- Inside source: true -*** True Line Result - # Blue -** Processing line: ~ def frontier_color~ -- Inside source: true -*** True Line Result - def frontier_color -** Processing line: ~ [103, 136, 204]~ +** Processing line: ~ # [255, 255, 255]~ - Inside source: true *** True Line Result - [103, 136, 204] + # [255, 255, 255] ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -62436,18 +70283,18 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Button Background~ +** Processing line: ~ # Pastel White~ - Inside source: true *** True Line Result - # Button Background -** Processing line: ~ def gray~ + # Pastel White +** Processing line: ~ def path_color~ - Inside source: true *** True Line Result - def gray -** Processing line: ~ [190, 190, 190]~ + def path_color +** Processing line: ~ [231, 230, 228]~ - Inside source: true *** True Line Result - [190, 190, 190] + [231, 230, 228] ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -62456,18 +70303,14 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Button Outline~ -- Inside source: true -*** True Line Result - # Button Outline -** Processing line: ~ def black~ +** Processing line: ~ def red~ - Inside source: true *** True Line Result - def black -** Processing line: ~ [0, 0, 0]~ + def red +** Processing line: ~ [255, 0, 0]~ - Inside source: true *** True Line Result - [0, 0, 0] + [255, 0, 0] ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -62476,18 +70319,14 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # These methods make the code more concise~ -- Inside source: true -*** True Line Result - # These methods make the code more concise -** Processing line: ~ def grid~ +** Processing line: ~ def purple~ - Inside source: true *** True Line Result - def grid -** Processing line: ~ state.grid~ + def purple +** Processing line: ~ [149, 64, 191]~ - Inside source: true *** True Line Result - state.grid + [149, 64, 191] ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -62496,14 +70335,18 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def buttons~ +** Processing line: ~ # Makes code more concise~ - Inside source: true *** True Line Result - def buttons -** Processing line: ~ state.buttons~ + # Makes code more concise +** Processing line: ~ def grid~ - Inside source: true *** True Line Result - state.buttons + def grid +** Processing line: ~ state.grid~ +- Inside source: true +*** True Line Result + state.grid ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -62512,14 +70355,14 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def slider~ +** Processing line: ~ def search~ - Inside source: true *** True Line Result - def slider -** Processing line: ~ state.slider~ + def search +** Processing line: ~ state.search~ - Inside source: true *** True Line Result - state.slider + state.search ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -62580,18 +70423,18 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result # Every tick, new args are passed, and the Breadth First Search tick is called -** Processing line: ~ $breadth_first_search ||= BreadthFirstSearch.new(args)~ +** Processing line: ~ $breadcrumbs ||= Breadcrumbs.new(args)~ - Inside source: true *** True Line Result - $breadth_first_search ||= BreadthFirstSearch.new(args) -** Processing line: ~ $breadth_first_search.args = args~ + $breadcrumbs ||= Breadcrumbs.new(args) +** Processing line: ~ $breadcrumbs.args = args~ - Inside source: true *** True Line Result - $breadth_first_search.args = args -** Processing line: ~ $breadth_first_search.tick~ + $breadcrumbs.args = args +** Processing line: ~ $breadcrumbs.tick~ - Inside source: true *** True Line Result - $breadth_first_search.tick + $breadcrumbs.tick ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -62608,10 +70451,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result def reset -** Processing line: ~ $breadth_first_search = nil~ +** Processing line: ~ $breadcrumbs = nil~ - Inside source: true *** True Line Result - $breadth_first_search = nil + $breadcrumbs = nil ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -62620,450 +70463,198 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~#+end_src~ -- Line was identified as the end of a code block. -*** True Line Result -#+end_src -** Processing line: ~~ -- End of paragraph detected. -*** True Line Result - -** Processing line: ~*** Path Finding Algorithms - Detailed Breadth First Search - main.rb~ -- Header detected. -*** True Line Result - -*** True Line Result -*** Path Finding Algorithms - Detailed Breadth First Search - main.rb -** Processing line: ~#+begin_src ruby~ -- Line was identified as the beginning of a code block. -*** True Line Result - -*** True Line Result -#+begin_src ruby -** Processing line: ~ # ./samples/13_path_finding_algorithms/02_detailed_breadth_first_search/app/main.rb~ -- Inside source: true -*** True Line Result - # ./samples/13_path_finding_algorithms/02_detailed_breadth_first_search/app/main.rb -** Processing line: ~ # A visual demonstration of a breadth first search~ -- Inside source: true -*** True Line Result - # A visual demonstration of a breadth first search -** Processing line: ~ # Inspired by https://www.redblobgames.com/pathfinding/a-star/introduction.html~ -- Inside source: true -*** True Line Result - # Inspired by https://www.redblobgames.com/pathfinding/a-star/introduction.html -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ # An animation that can respond to user input in real time~ -- Inside source: true -*** True Line Result - # An animation that can respond to user input in real time -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ # A breadth first search expands in all directions one step at a time~ -- Inside source: true -*** True Line Result - # A breadth first search expands in all directions one step at a time -** Processing line: ~ # The frontier is a queue of cells to be expanded from~ -- Inside source: true -*** True Line Result - # The frontier is a queue of cells to be expanded from -** Processing line: ~ # The visited hash allows quick lookups of cells that have been expanded from~ -- Inside source: true -*** True Line Result - # The visited hash allows quick lookups of cells that have been expanded from -** Processing line: ~ # The walls hash allows quick lookup of whether a cell is a wall~ -- Inside source: true -*** True Line Result - # The walls hash allows quick lookup of whether a cell is a wall -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ # The breadth first search starts by adding the red star to the frontier array~ -- Inside source: true -*** True Line Result - # The breadth first search starts by adding the red star to the frontier array -** Processing line: ~ # and marking it as visited~ -- Inside source: true -*** True Line Result - # and marking it as visited -** Processing line: ~ # Each step a cell is removed from the front of the frontier array (queue)~ -- Inside source: true -*** True Line Result - # Each step a cell is removed from the front of the frontier array (queue) -** Processing line: ~ # Unless the neighbor is a wall or visited, it is added to the frontier array~ -- Inside source: true -*** True Line Result - # Unless the neighbor is a wall or visited, it is added to the frontier array -** Processing line: ~ # The neighbor is then marked as visited~ -- Inside source: true -*** True Line Result - # The neighbor is then marked as visited -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ # The frontier is blue~ -- Inside source: true -*** True Line Result - # The frontier is blue -** Processing line: ~ # Visited cells are light brown~ -- Inside source: true -*** True Line Result - # Visited cells are light brown -** Processing line: ~ # Walls are camo green~ -- Inside source: true -*** True Line Result - # Walls are camo green -** Processing line: ~ # Even when walls are visited, they will maintain their wall color~ -- Inside source: true -*** True Line Result - # Even when walls are visited, they will maintain their wall color -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ # This search numbers the order in which new cells are explored~ -- Inside source: true -*** True Line Result - # This search numbers the order in which new cells are explored -** Processing line: ~ # The next cell from where the search will continue is highlighted yellow~ -- Inside source: true -*** True Line Result - # The next cell from where the search will continue is highlighted yellow -** Processing line: ~ # And the cells that will be considered for expansion are in semi-transparent green~ -- Inside source: true -*** True Line Result - # And the cells that will be considered for expansion are in semi-transparent green -** Processing line: ~~ +** Processing line: ~ # # Representation of how far away visited cells are from the star~ - Inside source: true *** True Line Result - -** Processing line: ~ # The star can be moved by clicking and dragging~ + # # Representation of how far away visited cells are from the star +** Processing line: ~ # # Replaces the render_visited method~ - Inside source: true *** True Line Result - # The star can be moved by clicking and dragging -** Processing line: ~ # Walls can be added and removed by clicking and dragging~ + # # Replaces the render_visited method +** Processing line: ~ # # Visually demonstrates the effectiveness of early exit for pathfinding~ - Inside source: true *** True Line Result - # Walls can be added and removed by clicking and dragging -** Processing line: ~~ + # # Visually demonstrates the effectiveness of early exit for pathfinding +** Processing line: ~ # def render_heat_map~ - Inside source: true *** True Line Result - -** Processing line: ~ class DetailedBreadthFirstSearch~ + # def render_heat_map +** Processing line: ~ # # THIS CODE NEEDS SOME FIXING DUE TO REFACTORING~ - Inside source: true *** True Line Result - class DetailedBreadthFirstSearch -** Processing line: ~ attr_gtk~ + # # THIS CODE NEEDS SOME FIXING DUE TO REFACTORING +** Processing line: ~ # search.came_from.each_key do | cell |~ - Inside source: true *** True Line Result - attr_gtk -** Processing line: ~~ + # search.came_from.each_key do | cell | +** Processing line: ~ # distance = (grid.star.x - visited_cell.x).abs + (state.star.y - visited_cell.y).abs~ - Inside source: true *** True Line Result - -** Processing line: ~ def initialize(args)~ + # distance = (grid.star.x - visited_cell.x).abs + (state.star.y - visited_cell.y).abs +** Processing line: ~ # max_distance = grid.width + grid.height~ - Inside source: true *** True Line Result - def initialize(args) -** Processing line: ~ # Variables to edit the size and appearance of the grid~ + # max_distance = grid.width + grid.height +** Processing line: ~ # alpha = 255.to_i * distance.to_i / max_distance.to_i~ - Inside source: true *** True Line Result - # Variables to edit the size and appearance of the grid -** Processing line: ~ # Freely customizable to user's liking~ + # alpha = 255.to_i * distance.to_i / max_distance.to_i +** Processing line: ~ # outputs.solids << [scale_up(visited_cell), red, alpha]~ - Inside source: true *** True Line Result - # Freely customizable to user's liking -** Processing line: ~ args.state.grid.width = 9~ + # outputs.solids << [scale_up(visited_cell), red, alpha] +** Processing line: ~ # # outputs.solids << [early_exit_scale_up(visited_cell), red, alpha]~ - Inside source: true *** True Line Result - args.state.grid.width = 9 -** Processing line: ~ args.state.grid.height = 4~ + # # outputs.solids << [early_exit_scale_up(visited_cell), red, alpha] +** Processing line: ~ # end~ - Inside source: true *** True Line Result - args.state.grid.height = 4 -** Processing line: ~ args.state.grid.cell_size = 90~ + # end +** Processing line: ~ # end~ - Inside source: true *** True Line Result - args.state.grid.cell_size = 90 + # end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Stores which step of the animation is being rendered~ -- Inside source: true -*** True Line Result - # Stores which step of the animation is being rendered -** Processing line: ~ # When the user moves the star or messes with the walls,~ -- Inside source: true -*** True Line Result - # When the user moves the star or messes with the walls, -** Processing line: ~ # the breadth first search is recalculated up to this step~ -- Inside source: true -*** True Line Result - # the breadth first search is recalculated up to this step -** Processing line: ~ args.state.anim_steps = 0~ -- Inside source: true +** Processing line: ~#+end_src~ +- Line was identified as the end of a code block. *** True Line Result - args.state.anim_steps = 0 +#+end_src ** Processing line: ~~ -- Inside source: true +- End of paragraph detected. *** True Line Result -** Processing line: ~ # At some step the animation will end,~ -- Inside source: true -*** True Line Result - # At some step the animation will end, -** Processing line: ~ # and further steps won't change anything (the whole grid will be explored)~ -- Inside source: true -*** True Line Result - # and further steps won't change anything (the whole grid will be explored) -** Processing line: ~ # This step is roughly the grid's width * height~ -- Inside source: true -*** True Line Result - # This step is roughly the grid's width * height -** Processing line: ~ # When anim_steps equals max_steps no more calculations will occur~ -- Inside source: true -*** True Line Result - # When anim_steps equals max_steps no more calculations will occur -** Processing line: ~ # and the slider will be at the end~ -- Inside source: true -*** True Line Result - # and the slider will be at the end -** Processing line: ~ args.state.max_steps = args.state.grid.width * args.state.grid.height~ -- Inside source: true -*** True Line Result - args.state.max_steps = args.state.grid.width * args.state.grid.height -** Processing line: ~~ -- Inside source: true +** Processing line: ~*** Path Finding Algorithms - Early Exit - main.rb~ +- Header detected. *** True Line Result -** Processing line: ~ # The location of the star and walls of the grid~ -- Inside source: true -*** True Line Result - # The location of the star and walls of the grid -** Processing line: ~ # They can be modified to have a different initial grid~ -- Inside source: true -*** True Line Result - # They can be modified to have a different initial grid -** Processing line: ~ # Walls are stored in a hash for quick look up when doing the search~ -- Inside source: true -*** True Line Result - # Walls are stored in a hash for quick look up when doing the search -** Processing line: ~ args.state.star = [3, 2]~ -- Inside source: true -*** True Line Result - args.state.star = [3, 2] -** Processing line: ~ args.state.walls = {}~ -- Inside source: true *** True Line Result - args.state.walls = {} -** Processing line: ~~ -- Inside source: true +*** Path Finding Algorithms - Early Exit - main.rb +** Processing line: ~#+begin_src ruby~ +- Line was identified as the beginning of a code block. *** True Line Result -** Processing line: ~ # Variables that are used by the breadth first search~ -- Inside source: true -*** True Line Result - # Variables that are used by the breadth first search -** Processing line: ~ # Storing cells that the search has visited, prevents unnecessary steps~ -- Inside source: true -*** True Line Result - # Storing cells that the search has visited, prevents unnecessary steps -** Processing line: ~ # Expanding the frontier of the search in order makes the search expand~ -- Inside source: true -*** True Line Result - # Expanding the frontier of the search in order makes the search expand -** Processing line: ~ # from the center outward~ -- Inside source: true -*** True Line Result - # from the center outward -** Processing line: ~ args.state.visited = {}~ -- Inside source: true -*** True Line Result - args.state.visited = {} -** Processing line: ~ args.state.frontier = []~ -- Inside source: true *** True Line Result - args.state.frontier = [] -** Processing line: ~ args.state.cell_numbers = []~ +#+begin_src ruby +** Processing line: ~ # ./samples/13_path_finding_algorithms/04_early_exit/app/main.rb~ - Inside source: true *** True Line Result - args.state.cell_numbers = [] -** Processing line: ~~ + # ./samples/13_path_finding_algorithms/04_early_exit/app/main.rb +** Processing line: ~ # Comparison of a breadth first search with and without early exit~ - Inside source: true *** True Line Result - -** Processing line: ~~ + # Comparison of a breadth first search with and without early exit +** Processing line: ~ # Inspired by https://www.redblobgames.com/pathfinding/a-star/introduction.html~ - Inside source: true *** True Line Result - + # Inspired by https://www.redblobgames.com/pathfinding/a-star/introduction.html ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # What the user is currently editing on the grid~ +** Processing line: ~ # Demonstrates the exploration difference caused by early exit~ - Inside source: true *** True Line Result - # What the user is currently editing on the grid -** Processing line: ~ # Possible values are: :none, :slider, :star, :remove_wall, :add_wall~ + # Demonstrates the exploration difference caused by early exit +** Processing line: ~ # Also demonstrates how breadth first search is used for path generation~ - Inside source: true *** True Line Result - # Possible values are: :none, :slider, :star, :remove_wall, :add_wall + # Also demonstrates how breadth first search is used for path generation ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # We store this value, because we want to remember the value even when~ -- Inside source: true -*** True Line Result - # We store this value, because we want to remember the value even when -** Processing line: ~ # the user's cursor is no longer over what they're interacting with, but~ -- Inside source: true -*** True Line Result - # the user's cursor is no longer over what they're interacting with, but -** Processing line: ~ # they are still clicking down on the mouse.~ -- Inside source: true -*** True Line Result - # they are still clicking down on the mouse. -** Processing line: ~ args.state.click_and_drag = :none~ -- Inside source: true -*** True Line Result - args.state.click_and_drag = :none -** Processing line: ~~ +** Processing line: ~ # The left grid is a breadth first search without early exit~ - Inside source: true *** True Line Result - -** Processing line: ~ # The x, y, w, h values for the buttons~ + # The left grid is a breadth first search without early exit +** Processing line: ~ # The right grid is a breadth first search with early exit~ - Inside source: true *** True Line Result - # The x, y, w, h values for the buttons -** Processing line: ~ # Allow easy movement of the buttons location~ + # The right grid is a breadth first search with early exit +** Processing line: ~ # The red squares represent how far the search expanded~ - Inside source: true *** True Line Result - # Allow easy movement of the buttons location -** Processing line: ~ # A centralized location to get values to detect input and draw the buttons~ + # The red squares represent how far the search expanded +** Processing line: ~ # The darker the red, the farther the search proceeded~ - Inside source: true *** True Line Result - # A centralized location to get values to detect input and draw the buttons -** Processing line: ~ # Editing these values might mean needing to edit the label offsets~ + # The darker the red, the farther the search proceeded +** Processing line: ~ # Comparison of the heat map reveals how much searching can be saved by early exit~ - Inside source: true *** True Line Result - # Editing these values might mean needing to edit the label offsets -** Processing line: ~ # which can be found in the appropriate render button methods~ + # Comparison of the heat map reveals how much searching can be saved by early exit +** Processing line: ~ # The white path shows path generation via breadth first search~ - Inside source: true *** True Line Result - # which can be found in the appropriate render button methods -** Processing line: ~ args.state.buttons.left = [450, 600, 160, 50]~ + # The white path shows path generation via breadth first search +** Processing line: ~ class EarlyExitBreadthFirstSearch~ - Inside source: true *** True Line Result - args.state.buttons.left = [450, 600, 160, 50] -** Processing line: ~ args.state.buttons.right = [610, 600, 160, 50]~ + class EarlyExitBreadthFirstSearch +** Processing line: ~ attr_gtk~ - Inside source: true *** True Line Result - args.state.buttons.right = [610, 600, 160, 50] + attr_gtk ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # The variables below are related to the slider~ -- Inside source: true -*** True Line Result - # The variables below are related to the slider -** Processing line: ~ # They allow the user to customize them~ -- Inside source: true -*** True Line Result - # They allow the user to customize them -** Processing line: ~ # They also give a central location for the render and input methods to get~ -- Inside source: true -*** True Line Result - # They also give a central location for the render and input methods to get -** Processing line: ~ # information from~ -- Inside source: true -*** True Line Result - # information from -** Processing line: ~ # x & y are the coordinates of the leftmost part of the slider line~ -- Inside source: true -*** True Line Result - # x & y are the coordinates of the leftmost part of the slider line -** Processing line: ~ args.state.slider.x = 400~ -- Inside source: true -*** True Line Result - args.state.slider.x = 400 -** Processing line: ~ args.state.slider.y = 675~ -- Inside source: true -*** True Line Result - args.state.slider.y = 675 -** Processing line: ~ # This is the width of the line~ -- Inside source: true -*** True Line Result - # This is the width of the line -** Processing line: ~ args.state.slider.w = 360~ -- Inside source: true -*** True Line Result - args.state.slider.w = 360 -** Processing line: ~ # This is the offset for the circle~ -- Inside source: true -*** True Line Result - # This is the offset for the circle -** Processing line: ~ # Allows the center of the circle to be on the line,~ +** Processing line: ~ # This method is called every frame/tick~ - Inside source: true *** True Line Result - # Allows the center of the circle to be on the line, -** Processing line: ~ # as opposed to the upper right corner~ + # This method is called every frame/tick +** Processing line: ~ # Every tick, the current state of the search is rendered on the screen,~ - Inside source: true *** True Line Result - # as opposed to the upper right corner -** Processing line: ~ args.state.slider.offset = 20~ + # Every tick, the current state of the search is rendered on the screen, +** Processing line: ~ # User input is processed, and~ - Inside source: true *** True Line Result - args.state.slider.offset = 20 -** Processing line: ~ # This is the spacing between each of the notches on the slider~ + # User input is processed, and +** Processing line: ~ # The next step in the search is calculated~ - Inside source: true *** True Line Result - # This is the spacing between each of the notches on the slider -** Processing line: ~ # Notches are places where the circle can rest on the slider line~ + # The next step in the search is calculated +** Processing line: ~ def tick~ - Inside source: true *** True Line Result - # Notches are places where the circle can rest on the slider line -** Processing line: ~ # There needs to be a notch for each step before the maximum number of steps~ + def tick +** Processing line: ~ defaults~ - Inside source: true *** True Line Result - # There needs to be a notch for each step before the maximum number of steps -** Processing line: ~ args.state.slider.spacing = args.state.slider.w.to_f / args.state.max_steps.to_f~ + defaults +** Processing line: ~ # If the grid has not been searched~ - Inside source: true *** True Line Result - args.state.slider.spacing = args.state.slider.w.to_f / args.state.max_steps.to_f -** Processing line: ~ end~ + # If the grid has not been searched +** Processing line: ~ if state.visited.empty?~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + if state.visited.empty? +** Processing line: ~ # Complete the search~ - Inside source: true *** True Line Result - -** Processing line: ~ # This method is called every frame/tick~ + # Complete the search +** Processing line: ~ state.max_steps.times { step }~ - Inside source: true *** True Line Result - # This method is called every frame/tick -** Processing line: ~ # Every tick, the current state of the search is rendered on the screen,~ + state.max_steps.times { step } +** Processing line: ~ # And calculate the path~ - Inside source: true *** True Line Result - # Every tick, the current state of the search is rendered on the screen, -** Processing line: ~ # User input is processed, and~ + # And calculate the path +** Processing line: ~ calc_path~ - Inside source: true *** True Line Result - # User input is processed, and -** Processing line: ~ def tick~ + calc_path +** Processing line: ~ end~ - Inside source: true *** True Line Result - def tick + end ** Processing line: ~ render~ - Inside source: true *** True Line Result @@ -63080,214 +70671,182 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # This method is called from tick and renders everything every tick~ -- Inside source: true -*** True Line Result - # This method is called from tick and renders everything every tick -** Processing line: ~ def render~ -- Inside source: true -*** True Line Result - def render -** Processing line: ~ render_buttons~ -- Inside source: true -*** True Line Result - render_buttons -** Processing line: ~ render_slider~ +** Processing line: ~ def defaults~ - Inside source: true *** True Line Result - render_slider -** Processing line: ~~ + def defaults +** Processing line: ~ # Variables to edit the size and appearance of the grid~ - Inside source: true *** True Line Result - -** Processing line: ~ render_background~ + # Variables to edit the size and appearance of the grid +** Processing line: ~ # Freely customizable to user's liking~ - Inside source: true *** True Line Result - render_background -** Processing line: ~ render_visited~ + # Freely customizable to user's liking +** Processing line: ~ grid.width ||= 15~ - Inside source: true *** True Line Result - render_visited -** Processing line: ~ render_frontier~ + grid.width ||= 15 +** Processing line: ~ grid.height ||= 15~ - Inside source: true *** True Line Result - render_frontier -** Processing line: ~ render_walls~ + grid.height ||= 15 +** Processing line: ~ grid.cell_size ||= 40~ - Inside source: true *** True Line Result - render_walls -** Processing line: ~ render_star~ + grid.cell_size ||= 40 +** Processing line: ~ grid.rect ||= [0, 0, grid.width, grid.height]~ - Inside source: true *** True Line Result - render_star + grid.rect ||= [0, 0, grid.width, grid.height] ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ render_highlights~ +** Processing line: ~ # At some step the animation will end,~ - Inside source: true *** True Line Result - render_highlights -** Processing line: ~ render_cell_numbers~ + # At some step the animation will end, +** Processing line: ~ # and further steps won't change anything (the whole grid.widthill be explored)~ - Inside source: true *** True Line Result - render_cell_numbers -** Processing line: ~ end~ + # and further steps won't change anything (the whole grid.widthill be explored) +** Processing line: ~ # This step is roughly the grid's width * height~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + # This step is roughly the grid's width * height +** Processing line: ~ # When anim_steps equals max_steps no more calculations will occur~ - Inside source: true *** True Line Result - -** Processing line: ~ # The methods below subdivide the task of drawing everything to the screen~ + # When anim_steps equals max_steps no more calculations will occur +** Processing line: ~ # and the slider will be at the end~ - Inside source: true *** True Line Result - # The methods below subdivide the task of drawing everything to the screen + # and the slider will be at the end +** Processing line: ~ state.max_steps ||= args.state.grid.width * args.state.grid.height~ +- Inside source: true +*** True Line Result + state.max_steps ||= args.state.grid.width * args.state.grid.height ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Draws the buttons that move the search backward or forward~ +** Processing line: ~ # The location of the star and walls of the grid~ - Inside source: true *** True Line Result - # Draws the buttons that move the search backward or forward -** Processing line: ~ # These buttons are rendered so the user knows where to click to move the search~ + # The location of the star and walls of the grid +** Processing line: ~ # They can be modified to have a different initial grid~ - Inside source: true *** True Line Result - # These buttons are rendered so the user knows where to click to move the search -** Processing line: ~ def render_buttons~ + # They can be modified to have a different initial grid +** Processing line: ~ # Walls are stored in a hash for quick look up when doing the search~ - Inside source: true *** True Line Result - def render_buttons -** Processing line: ~ render_left_button~ + # Walls are stored in a hash for quick look up when doing the search +** Processing line: ~ state.star ||= [2, 8]~ - Inside source: true *** True Line Result - render_left_button -** Processing line: ~ render_right_button~ + state.star ||= [2, 8] +** Processing line: ~ state.target ||= [10, 5]~ - Inside source: true *** True Line Result - render_right_button -** Processing line: ~ end~ + state.target ||= [10, 5] +** Processing line: ~ state.walls ||= {}~ - Inside source: true *** True Line Result - end + state.walls ||= {} ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Renders the button which steps the search backward~ -- Inside source: true -*** True Line Result - # Renders the button which steps the search backward -** Processing line: ~ # Shows the user where to click to move the search backward~ -- Inside source: true -*** True Line Result - # Shows the user where to click to move the search backward -** Processing line: ~ def render_left_button~ -- Inside source: true -*** True Line Result - def render_left_button -** Processing line: ~ # Draws the gray button, and a black border~ +** Processing line: ~ # Variables that are used by the breadth first search~ - Inside source: true *** True Line Result - # Draws the gray button, and a black border -** Processing line: ~ # The border separates the buttons visually~ + # Variables that are used by the breadth first search +** Processing line: ~ # Storing cells that the search has visited, prevents unnecessary steps~ - Inside source: true *** True Line Result - # The border separates the buttons visually -** Processing line: ~ outputs.solids << [buttons.left, gray]~ + # Storing cells that the search has visited, prevents unnecessary steps +** Processing line: ~ # Expanding the frontier of the search in order makes the search expand~ - Inside source: true *** True Line Result - outputs.solids << [buttons.left, gray] -** Processing line: ~ outputs.borders << [buttons.left, black]~ + # Expanding the frontier of the search in order makes the search expand +** Processing line: ~ # from the center outward~ - Inside source: true *** True Line Result - outputs.borders << [buttons.left, black] + # from the center outward ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Renders an explanatory label in the center of the button~ -- Inside source: true -*** True Line Result - # Renders an explanatory label in the center of the button -** Processing line: ~ # Explains to the user what the button does~ -- Inside source: true -*** True Line Result - # Explains to the user what the button does -** Processing line: ~ label_x = buttons.left.x + 05~ -- Inside source: true -*** True Line Result - label_x = buttons.left.x + 05 -** Processing line: ~ label_y = buttons.left.y + 35~ +** Processing line: ~ # Visited cells in the first grid~ - Inside source: true *** True Line Result - label_y = buttons.left.y + 35 -** Processing line: ~ outputs.labels << [label_x, label_y, "< Step backward"]~ + # Visited cells in the first grid +** Processing line: ~ state.visited ||= {}~ - Inside source: true *** True Line Result - outputs.labels << [label_x, label_y, "< Step backward"] -** Processing line: ~ end~ + state.visited ||= {} +** Processing line: ~ # Visited cells in the second grid~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + # Visited cells in the second grid +** Processing line: ~ state.early_exit_visited ||= {}~ - Inside source: true *** True Line Result - -** Processing line: ~ # Renders the button which steps the search forward~ + state.early_exit_visited ||= {} +** Processing line: ~ # The cells from which the search is to expand~ - Inside source: true *** True Line Result - # Renders the button which steps the search forward -** Processing line: ~ # Shows the user where to click to move the search forward~ + # The cells from which the search is to expand +** Processing line: ~ state.frontier ||= []~ - Inside source: true *** True Line Result - # Shows the user where to click to move the search forward -** Processing line: ~ def render_right_button~ + state.frontier ||= [] +** Processing line: ~ # A hash of where each cell was expanded from~ - Inside source: true *** True Line Result - def render_right_button -** Processing line: ~ # Draws the gray button, and a black border~ + # A hash of where each cell was expanded from +** Processing line: ~ # The key is a cell, and the value is the cell it came from~ - Inside source: true *** True Line Result - # Draws the gray button, and a black border -** Processing line: ~ # The border separates the buttons visually~ + # The key is a cell, and the value is the cell it came from +** Processing line: ~ state.came_from ||= {}~ - Inside source: true *** True Line Result - # The border separates the buttons visually -** Processing line: ~ outputs.solids << [buttons.right, gray]~ + state.came_from ||= {} +** Processing line: ~ # Cells that are part of the path from the target to the star~ - Inside source: true *** True Line Result - outputs.solids << [buttons.right, gray] -** Processing line: ~ outputs.borders << [buttons.right, black]~ + # Cells that are part of the path from the target to the star +** Processing line: ~ state.path ||= {}~ - Inside source: true *** True Line Result - outputs.borders << [buttons.right, black] + state.path ||= {} ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Renders an explanatory label in the center of the button~ +** Processing line: ~ # What the user is currently editing on the grid~ - Inside source: true *** True Line Result - # Renders an explanatory label in the center of the button -** Processing line: ~ # Explains to the user what the button does~ + # What the user is currently editing on the grid +** Processing line: ~ # We store this value, because we want to remember the value even when~ - Inside source: true *** True Line Result - # Explains to the user what the button does -** Processing line: ~ label_x = buttons.right.x + 10~ + # We store this value, because we want to remember the value even when +** Processing line: ~ # the user's cursor is no longer over what they're interacting with, but~ - Inside source: true *** True Line Result - label_x = buttons.right.x + 10 -** Processing line: ~ label_y = buttons.right.y + 35~ + # the user's cursor is no longer over what they're interacting with, but +** Processing line: ~ # they are still clicking down on the mouse.~ - Inside source: true *** True Line Result - label_y = buttons.right.y + 35 -** Processing line: ~ outputs.labels << [label_x, label_y, "Step forward >"]~ + # they are still clicking down on the mouse. +** Processing line: ~ state.current_input ||= :none~ - Inside source: true *** True Line Result - outputs.labels << [label_x, label_y, "Step forward >"] + state.current_input ||= :none ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -63296,54 +70855,42 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Draws the slider so the user can move it and see the progress of the search~ -- Inside source: true -*** True Line Result - # Draws the slider so the user can move it and see the progress of the search -** Processing line: ~ def render_slider~ -- Inside source: true -*** True Line Result - def render_slider -** Processing line: ~ # Using primitives hides the line under the white circle of the slider~ -- Inside source: true -*** True Line Result - # Using primitives hides the line under the white circle of the slider -** Processing line: ~ # Draws the line~ +** Processing line: ~ # Draws everything onto the screen~ - Inside source: true *** True Line Result - # Draws the line -** Processing line: ~ outputs.primitives << [slider.x, slider.y, slider.x + slider.w, slider.y].line~ + # Draws everything onto the screen +** Processing line: ~ def render~ - Inside source: true *** True Line Result - outputs.primitives << [slider.x, slider.y, slider.x + slider.w, slider.y].line -** Processing line: ~ # The circle needs to be offset so that the center of the circle~ + def render +** Processing line: ~ render_background~ - Inside source: true *** True Line Result - # The circle needs to be offset so that the center of the circle -** Processing line: ~ # overlaps the line instead of the upper right corner of the circle~ + render_background +** Processing line: ~ render_heat_map~ - Inside source: true *** True Line Result - # overlaps the line instead of the upper right corner of the circle -** Processing line: ~ # The circle's x value is also moved based on the current seach step~ + render_heat_map +** Processing line: ~ render_walls~ - Inside source: true *** True Line Result - # The circle's x value is also moved based on the current seach step -** Processing line: ~ circle_x = (slider.x - slider.offset) + (state.anim_steps * slider.spacing)~ + render_walls +** Processing line: ~ render_path~ - Inside source: true *** True Line Result - circle_x = (slider.x - slider.offset) + (state.anim_steps * slider.spacing) -** Processing line: ~ circle_y = (slider.y - slider.offset)~ + render_path +** Processing line: ~ render_star~ - Inside source: true *** True Line Result - circle_y = (slider.y - slider.offset) -** Processing line: ~ circle_rect = [circle_x, circle_y, 37, 37]~ + render_star +** Processing line: ~ render_target~ - Inside source: true *** True Line Result - circle_rect = [circle_x, circle_y, 37, 37] -** Processing line: ~ outputs.primitives << [circle_rect, 'circle-white.png'].sprite~ + render_target +** Processing line: ~ render_labels~ - Inside source: true *** True Line Result - outputs.primitives << [circle_rect, 'circle-white.png'].sprite + render_labels ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -63352,18 +70899,18 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Draws what the grid looks like with nothing on it~ +** Processing line: ~ # The methods below subdivide the task of drawing everything to the screen~ - Inside source: true *** True Line Result - # Draws what the grid looks like with nothing on it -** Processing line: ~ # Which is a bunch of unvisited cells~ + # The methods below subdivide the task of drawing everything to the screen +** Processing line: ~~ - Inside source: true *** True Line Result - # Which is a bunch of unvisited cells -** Processing line: ~ # Drawn first so other things can draw on top of it~ + +** Processing line: ~ # Draws what the grid looks like with nothing on it~ - Inside source: true *** True Line Result - # Drawn first so other things can draw on top of it + # Draws what the grid looks like with nothing on it ** Processing line: ~ def render_background~ - Inside source: true *** True Line Result @@ -63372,14 +70919,6 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result render_unvisited -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ # The grid lines make the cells appear separate~ -- Inside source: true -*** True Line Result - # The grid lines make the cells appear separate ** Processing line: ~ render_grid_lines~ - Inside source: true *** True Line Result @@ -63392,26 +70931,22 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Draws a rectangle the size of the entire grid to represent unvisited cells~ -- Inside source: true -*** True Line Result - # Draws a rectangle the size of the entire grid to represent unvisited cells -** Processing line: ~ # Unvisited cells are the default cell~ +** Processing line: ~ # Draws both grids~ - Inside source: true *** True Line Result - # Unvisited cells are the default cell + # Draws both grids ** Processing line: ~ def render_unvisited~ - Inside source: true *** True Line Result def render_unvisited -** Processing line: ~ background = [0, 0, grid.width, grid.height]~ +** Processing line: ~ outputs.solids << [scale_up(grid.rect), unvisited_color]~ - Inside source: true *** True Line Result - background = [0, 0, grid.width, grid.height] -** Processing line: ~ outputs.solids << [scale_up(background), unvisited_color]~ + outputs.solids << [scale_up(grid.rect), unvisited_color] +** Processing line: ~ outputs.solids << [early_exit_scale_up(grid.rect), unvisited_color]~ - Inside source: true *** True Line Result - outputs.solids << [scale_up(background), unvisited_color] + outputs.solids << [early_exit_scale_up(grid.rect), unvisited_color] ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -63432,10 +70967,14 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result for x in 0..grid.width -** Processing line: ~ outputs.lines << [scale_up(vertical_line(x)), grid_line_color]~ +** Processing line: ~ outputs.lines << vertical_line(x)~ - Inside source: true *** True Line Result - outputs.lines << [scale_up(vertical_line(x)), grid_line_color] + outputs.lines << vertical_line(x) +** Processing line: ~ outputs.lines << early_exit_vertical_line(x)~ +- Inside source: true +*** True Line Result + outputs.lines << early_exit_vertical_line(x) ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -63448,10 +70987,14 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result for y in 0..grid.height -** Processing line: ~ outputs.lines << [scale_up(horizontal_line(y)), grid_line_color]~ +** Processing line: ~ outputs.lines << horizontal_line(y)~ - Inside source: true *** True Line Result - outputs.lines << [scale_up(horizontal_line(y)), grid_line_color] + outputs.lines << horizontal_line(y) +** Processing line: ~ outputs.lines << early_exit_horizontal_line(y)~ +- Inside source: true +*** True Line Result + outputs.lines << early_exit_horizontal_line(y) ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -63464,18 +71007,18 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Easy way to get a vertical line given an index~ +** Processing line: ~ # Easy way to draw vertical lines given an index~ - Inside source: true *** True Line Result - # Easy way to get a vertical line given an index + # Easy way to draw vertical lines given an index ** Processing line: ~ def vertical_line column~ - Inside source: true *** True Line Result def vertical_line column -** Processing line: ~ [column, 0, column, grid.height]~ +** Processing line: ~ scale_up([column, 0, column, grid.height])~ - Inside source: true *** True Line Result - [column, 0, column, grid.height] + scale_up([column, 0, column, grid.height]) ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -63484,18 +71027,18 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Easy way to get a horizontal line given an index~ +** Processing line: ~ # Easy way to draw horizontal lines given an index~ - Inside source: true *** True Line Result - # Easy way to get a horizontal line given an index + # Easy way to draw horizontal lines given an index ** Processing line: ~ def horizontal_line row~ - Inside source: true *** True Line Result def horizontal_line row -** Processing line: ~ [0, row, grid.width, row]~ +** Processing line: ~ scale_up([0, row, grid.width, row])~ - Inside source: true *** True Line Result - [0, row, grid.width, row] + scale_up([0, row, grid.width, row]) ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -63504,30 +71047,38 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Draws the area that is going to be searched from~ +** Processing line: ~ # Easy way to draw vertical lines given an index~ - Inside source: true *** True Line Result - # Draws the area that is going to be searched from -** Processing line: ~ # The frontier is the most outward parts of the search~ + # Easy way to draw vertical lines given an index +** Processing line: ~ def early_exit_vertical_line column~ - Inside source: true *** True Line Result - # The frontier is the most outward parts of the search -** Processing line: ~ def render_frontier~ + def early_exit_vertical_line column +** Processing line: ~ scale_up([column + grid.width + 1, 0, column + grid.width + 1, grid.height])~ - Inside source: true *** True Line Result - def render_frontier -** Processing line: ~ state.frontier.each do |cell|~ + scale_up([column + grid.width + 1, 0, column + grid.width + 1, grid.height]) +** Processing line: ~ end~ - Inside source: true *** True Line Result - state.frontier.each do |cell| -** Processing line: ~ outputs.solids << [scale_up(cell), frontier_color]~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - outputs.solids << [scale_up(cell), frontier_color] -** Processing line: ~ end~ + +** Processing line: ~ # Easy way to draw horizontal lines given an index~ - Inside source: true *** True Line Result - end + # Easy way to draw horizontal lines given an index +** Processing line: ~ def early_exit_horizontal_line row~ +- Inside source: true +*** True Line Result + def early_exit_horizontal_line row +** Processing line: ~ scale_up([grid.width + 1, row, grid.width + grid.width + 1, row])~ +- Inside source: true +*** True Line Result + scale_up([grid.width + 1, row, grid.width + grid.width + 1, row]) ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -63536,10 +71087,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Draws the walls~ +** Processing line: ~ # Draws the walls on both grids~ - Inside source: true *** True Line Result - # Draws the walls + # Draws the walls on both grids ** Processing line: ~ def render_walls~ - Inside source: true *** True Line Result @@ -63552,6 +71103,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result outputs.solids << [scale_up(wall), wall_color] +** Processing line: ~ outputs.solids << [early_exit_scale_up(wall), wall_color]~ +- Inside source: true +*** True Line Result + outputs.solids << [early_exit_scale_up(wall), wall_color] ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -63564,26 +71119,46 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Renders cells that have been searched in the appropriate color~ +** Processing line: ~ # Renders the star on both grids~ - Inside source: true *** True Line Result - # Renders cells that have been searched in the appropriate color -** Processing line: ~ def render_visited~ + # Renders the star on both grids +** Processing line: ~ def render_star~ - Inside source: true *** True Line Result - def render_visited -** Processing line: ~ state.visited.each_key do |cell|~ + def render_star +** Processing line: ~ outputs.sprites << [scale_up(state.star), 'star.png']~ - Inside source: true *** True Line Result - state.visited.each_key do |cell| -** Processing line: ~ outputs.solids << [scale_up(cell), visited_color]~ + outputs.sprites << [scale_up(state.star), 'star.png'] +** Processing line: ~ outputs.sprites << [early_exit_scale_up(state.star), 'star.png']~ - Inside source: true *** True Line Result - outputs.solids << [scale_up(cell), visited_color] -** Processing line: ~ end~ + outputs.sprites << [early_exit_scale_up(state.star), 'star.png'] +** Processing line: ~ end~ - Inside source: true *** True Line Result - end + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ # Renders the target on both grids~ +- Inside source: true +*** True Line Result + # Renders the target on both grids +** Processing line: ~ def render_target~ +- Inside source: true +*** True Line Result + def render_target +** Processing line: ~ outputs.sprites << [scale_up(state.target), 'target.png']~ +- Inside source: true +*** True Line Result + outputs.sprites << [scale_up(state.target), 'target.png'] +** Processing line: ~ outputs.sprites << [early_exit_scale_up(state.target), 'target.png']~ +- Inside source: true +*** True Line Result + outputs.sprites << [early_exit_scale_up(state.target), 'target.png'] ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -63592,18 +71167,22 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Renders the star~ +** Processing line: ~ # Labels the grids~ - Inside source: true *** True Line Result - # Renders the star -** Processing line: ~ def render_star~ + # Labels the grids +** Processing line: ~ def render_labels~ - Inside source: true *** True Line Result - def render_star -** Processing line: ~ outputs.sprites << [scale_up(state.star), 'star.png']~ + def render_labels +** Processing line: ~ outputs.labels << [200, 625, "Without early exit"]~ - Inside source: true *** True Line Result - outputs.sprites << [scale_up(state.star), 'star.png'] + outputs.labels << [200, 625, "Without early exit"] +** Processing line: ~ outputs.labels << [875, 625, "With early exit"]~ +- Inside source: true +*** True Line Result + outputs.labels << [875, 625, "With early exit"] ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -63612,46 +71191,46 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Cells have a number rendered in them based on when they were explored~ +** Processing line: ~ # Renders the path based off of the state.path hash~ - Inside source: true *** True Line Result - # Cells have a number rendered in them based on when they were explored -** Processing line: ~ # This is based off of their index in the cell_numbers array~ + # Renders the path based off of the state.path hash +** Processing line: ~ def render_path~ - Inside source: true *** True Line Result - # This is based off of their index in the cell_numbers array -** Processing line: ~ # Cells are added to this array the same time they are added to the frontier array~ + def render_path +** Processing line: ~ # If the star and target are disconnected there will only be one path~ - Inside source: true *** True Line Result - # Cells are added to this array the same time they are added to the frontier array -** Processing line: ~ def render_cell_numbers~ + # If the star and target are disconnected there will only be one path +** Processing line: ~ # The path should not render in that case~ - Inside source: true *** True Line Result - def render_cell_numbers -** Processing line: ~ state.cell_numbers.each_with_index do |cell, index|~ + # The path should not render in that case +** Processing line: ~ unless state.path.size == 1~ - Inside source: true *** True Line Result - state.cell_numbers.each_with_index do |cell, index| -** Processing line: ~ # Math that approx centers the number in the cell~ + unless state.path.size == 1 +** Processing line: ~ state.path.each_key do | cell |~ - Inside source: true *** True Line Result - # Math that approx centers the number in the cell -** Processing line: ~ label_x = (cell.x * grid.cell_size) + grid.cell_size / 2 - 5~ + state.path.each_key do | cell | +** Processing line: ~ # Renders path on both grids~ - Inside source: true *** True Line Result - label_x = (cell.x * grid.cell_size) + grid.cell_size / 2 - 5 -** Processing line: ~ label_y = (cell.y * grid.cell_size) + (grid.cell_size / 2) + 5~ + # Renders path on both grids +** Processing line: ~ outputs.solids << [scale_up(cell), path_color]~ - Inside source: true *** True Line Result - label_y = (cell.y * grid.cell_size) + (grid.cell_size / 2) + 5 -** Processing line: ~~ + outputs.solids << [scale_up(cell), path_color] +** Processing line: ~ outputs.solids << [early_exit_scale_up(cell), path_color]~ - Inside source: true *** True Line Result - -** Processing line: ~ outputs.labels << [label_x, label_y, (index + 1).to_s]~ + outputs.solids << [early_exit_scale_up(cell), path_color] +** Processing line: ~ end~ - Inside source: true *** True Line Result - outputs.labels << [label_x, label_y, (index + 1).to_s] + end ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -63664,70 +71243,118 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # The next frontier to be expanded is highlighted yellow~ +** Processing line: ~ # Calculates the path from the target to the star after the search is over~ - Inside source: true *** True Line Result - # The next frontier to be expanded is highlighted yellow -** Processing line: ~ # Its adjacent non-wall neighbors have their border highlighted green~ + # Calculates the path from the target to the star after the search is over +** Processing line: ~ # Relies on the came_from hash~ - Inside source: true *** True Line Result - # Its adjacent non-wall neighbors have their border highlighted green -** Processing line: ~ # This is to show the user how the search expands~ + # Relies on the came_from hash +** Processing line: ~ # Fills the state.path hash, which is later rendered on screen~ - Inside source: true *** True Line Result - # This is to show the user how the search expands -** Processing line: ~ def render_highlights~ + # Fills the state.path hash, which is later rendered on screen +** Processing line: ~ def calc_path~ - Inside source: true *** True Line Result - def render_highlights -** Processing line: ~ return if state.frontier.empty?~ + def calc_path +** Processing line: ~ endpoint = state.target~ - Inside source: true *** True Line Result - return if state.frontier.empty? -** Processing line: ~~ + endpoint = state.target +** Processing line: ~ while endpoint~ - Inside source: true *** True Line Result - -** Processing line: ~ # Highlight the next frontier to be expanded yellow~ + while endpoint +** Processing line: ~ state.path[endpoint] = true~ - Inside source: true *** True Line Result - # Highlight the next frontier to be expanded yellow -** Processing line: ~ next_frontier = state.frontier[0]~ + state.path[endpoint] = true +** Processing line: ~ endpoint = state.came_from[endpoint]~ - Inside source: true *** True Line Result - next_frontier = state.frontier[0] -** Processing line: ~ outputs.solids << [scale_up(next_frontier), highlighter_yellow]~ + endpoint = state.came_from[endpoint] +** Processing line: ~ end~ - Inside source: true *** True Line Result - outputs.solids << [scale_up(next_frontier), highlighter_yellow] + end +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Neighbors have a semi-transparent green layer over them~ +** Processing line: ~ # Representation of how far away visited cells are from the star~ - Inside source: true *** True Line Result - # Neighbors have a semi-transparent green layer over them -** Processing line: ~ # Unless the neighbor is a wall~ + # Representation of how far away visited cells are from the star +** Processing line: ~ # Replaces the render_visited method~ - Inside source: true *** True Line Result - # Unless the neighbor is a wall -** Processing line: ~ adjacent_neighbors(next_frontier).each do |neighbor|~ + # Replaces the render_visited method +** Processing line: ~ # Visually demonstrates the effectiveness of early exit for pathfinding~ - Inside source: true *** True Line Result - adjacent_neighbors(next_frontier).each do |neighbor| -** Processing line: ~ unless state.walls.has_key?(neighbor)~ + # Visually demonstrates the effectiveness of early exit for pathfinding +** Processing line: ~ def render_heat_map~ - Inside source: true *** True Line Result - unless state.walls.has_key?(neighbor) -** Processing line: ~ outputs.solids << [scale_up(neighbor), highlighter_green, 70]~ + def render_heat_map +** Processing line: ~ state.visited.each_key do | visited_cell |~ - Inside source: true *** True Line Result - outputs.solids << [scale_up(neighbor), highlighter_green, 70] -** Processing line: ~ end~ + state.visited.each_key do | visited_cell | +** Processing line: ~ distance = (state.star.x - visited_cell.x).abs + (state.star.y - visited_cell.y).abs~ - Inside source: true *** True Line Result - end + distance = (state.star.x - visited_cell.x).abs + (state.star.y - visited_cell.y).abs +** Processing line: ~ max_distance = grid.width + grid.height~ +- Inside source: true +*** True Line Result + max_distance = grid.width + grid.height +** Processing line: ~ alpha = 255.to_i * distance.to_i / max_distance.to_i~ +- Inside source: true +*** True Line Result + alpha = 255.to_i * distance.to_i / max_distance.to_i +** Processing line: ~ outputs.solids << [scale_up(visited_cell), red, alpha]~ +- Inside source: true +*** True Line Result + outputs.solids << [scale_up(visited_cell), red, alpha] +** Processing line: ~ # outputs.solids << [early_exit_scale_up(visited_cell), red, alpha]~ +- Inside source: true +*** True Line Result + # outputs.solids << [early_exit_scale_up(visited_cell), red, alpha] +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ state.early_exit_visited.each_key do | visited_cell |~ +- Inside source: true +*** True Line Result + state.early_exit_visited.each_key do | visited_cell | +** Processing line: ~ distance = (state.star.x - visited_cell.x).abs + (state.star.y - visited_cell.y).abs~ +- Inside source: true +*** True Line Result + distance = (state.star.x - visited_cell.x).abs + (state.star.y - visited_cell.y).abs +** Processing line: ~ max_distance = grid.width + grid.height~ +- Inside source: true +*** True Line Result + max_distance = grid.width + grid.height +** Processing line: ~ alpha = 255.to_i * distance.to_i / max_distance.to_i~ +- Inside source: true +*** True Line Result + alpha = 255.to_i * distance.to_i / max_distance.to_i +** Processing line: ~ outputs.solids << [early_exit_scale_up(visited_cell), red, alpha]~ +- Inside source: true +*** True Line Result + outputs.solids << [early_exit_scale_up(visited_cell), red, alpha] ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -63740,22 +71367,66 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result +** Processing line: ~ # Translates the given cell grid.width + 1 to the right and then scales up~ +- Inside source: true +*** True Line Result + # Translates the given cell grid.width + 1 to the right and then scales up +** Processing line: ~ # Used to draw cells for the second grid~ +- Inside source: true +*** True Line Result + # Used to draw cells for the second grid +** Processing line: ~ # This method does not work for lines,~ +- Inside source: true +*** True Line Result + # This method does not work for lines, +** Processing line: ~ # so separate methods exist for the grid lines~ +- Inside source: true +*** True Line Result + # so separate methods exist for the grid lines +** Processing line: ~ def early_exit_scale_up(cell)~ +- Inside source: true +*** True Line Result + def early_exit_scale_up(cell) +** Processing line: ~ cell_clone = cell.clone~ +- Inside source: true +*** True Line Result + cell_clone = cell.clone +** Processing line: ~ cell_clone.x += grid.width + 1~ +- Inside source: true +*** True Line Result + cell_clone.x += grid.width + 1 +** Processing line: ~ scale_up(cell_clone)~ +- Inside source: true +*** True Line Result + scale_up(cell_clone) +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Cell Size is used when rendering to allow the grid to be scaled up or down~ +** Processing line: ~ # In code, the cells are represented as 1x1 rectangles~ - Inside source: true *** True Line Result - # Cell Size is used when rendering to allow the grid to be scaled up or down -** Processing line: ~ # Cells in the frontier array and visited hash and walls hash are stored as x & y~ + # In code, the cells are represented as 1x1 rectangles +** Processing line: ~ # When drawn, the cells are larger than 1x1 rectangles~ - Inside source: true *** True Line Result - # Cells in the frontier array and visited hash and walls hash are stored as x & y -** Processing line: ~ # Scaling up cells and lines when rendering allows omitting of width and height~ + # When drawn, the cells are larger than 1x1 rectangles +** Processing line: ~ # This method is used to scale up cells, and lines~ - Inside source: true *** True Line Result - # Scaling up cells and lines when rendering allows omitting of width and height + # This method is used to scale up cells, and lines +** Processing line: ~ # Objects are scaled up according to the grid.cell_size variable~ +- Inside source: true +*** True Line Result + # Objects are scaled up according to the grid.cell_size variable +** Processing line: ~ # This allows for easy customization of the visual scale of the grid~ +- Inside source: true +*** True Line Result + # This allows for easy customization of the visual scale of the grid ** Processing line: ~ def scale_up(cell)~ - Inside source: true *** True Line Result @@ -63828,254 +71499,258 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~~ -- Inside source: true -*** True Line Result - ** Processing line: ~ # This method processes user input every tick~ - Inside source: true *** True Line Result # This method processes user input every tick -** Processing line: ~ # This method allows the user to use the buttons, slider, and edit the grid~ +** Processing line: ~ # Any method with "1" is related to the first grid~ - Inside source: true *** True Line Result - # This method allows the user to use the buttons, slider, and edit the grid -** Processing line: ~ # There are 2 types of input:~ + # Any method with "1" is related to the first grid +** Processing line: ~ # Any method with "2" is related to the second grid~ - Inside source: true *** True Line Result - # There are 2 types of input: -** Processing line: ~ # Button Input~ + # Any method with "2" is related to the second grid +** Processing line: ~ def input~ - Inside source: true *** True Line Result - # Button Input -** Processing line: ~ # Click and Drag Input~ + def input +** Processing line: ~ # The program has to remember that the user is dragging an object~ - Inside source: true *** True Line Result - # Click and Drag Input -** Processing line: ~ #~ + # The program has to remember that the user is dragging an object +** Processing line: ~ # even when the mouse is no longer over that object~ - Inside source: true *** True Line Result - # -** Processing line: ~ # Button Input is used for the backward step and forward step buttons~ + # even when the mouse is no longer over that object +** Processing line: ~ # So detecting input and processing input is separate~ - Inside source: true *** True Line Result - # Button Input is used for the backward step and forward step buttons -** Processing line: ~ # Input is detected by mouse up within the bounds of the rect~ + # So detecting input and processing input is separate +** Processing line: ~ detect_input~ - Inside source: true *** True Line Result - # Input is detected by mouse up within the bounds of the rect -** Processing line: ~ #~ + detect_input +** Processing line: ~ process_input~ - Inside source: true *** True Line Result - # -** Processing line: ~ # Click and Drag Input is used for moving the star, adding walls,~ + process_input +** Processing line: ~ end~ - Inside source: true *** True Line Result - # Click and Drag Input is used for moving the star, adding walls, -** Processing line: ~ # removing walls, and the slider~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - # removing walls, and the slider -** Processing line: ~ #~ + +** Processing line: ~ # Determines what the user is editing and stores the value~ - Inside source: true *** True Line Result - # -** Processing line: ~ # When the mouse is down on the star, the click_and_drag variable is set to :star~ + # Determines what the user is editing and stores the value +** Processing line: ~ # Storing the value allows the user to continue the same edit as long as the~ - Inside source: true *** True Line Result - # When the mouse is down on the star, the click_and_drag variable is set to :star -** Processing line: ~ # While click_and_drag equals :star, the cursor's position is used to calculate the~ + # Storing the value allows the user to continue the same edit as long as the +** Processing line: ~ # mouse left click is held~ - Inside source: true *** True Line Result - # While click_and_drag equals :star, the cursor's position is used to calculate the -** Processing line: ~ # appropriate drag behavior~ + # mouse left click is held +** Processing line: ~ def detect_input~ - Inside source: true *** True Line Result - # appropriate drag behavior -** Processing line: ~ #~ + def detect_input +** Processing line: ~ # When the mouse is up, nothing is being edited~ - Inside source: true *** True Line Result - # -** Processing line: ~ # When the mouse goes up click_and_drag is set to :none~ + # When the mouse is up, nothing is being edited +** Processing line: ~ if inputs.mouse.up~ - Inside source: true *** True Line Result - # When the mouse goes up click_and_drag is set to :none -** Processing line: ~ #~ + if inputs.mouse.up +** Processing line: ~ state.current_input = :none~ - Inside source: true *** True Line Result - # -** Processing line: ~ # A variable has to be used because the star has to continue being edited even~ + state.current_input = :none +** Processing line: ~ # When the star in the no second grid is clicked~ - Inside source: true *** True Line Result - # A variable has to be used because the star has to continue being edited even -** Processing line: ~ # when the cursor is no longer over the star~ + # When the star in the no second grid is clicked +** Processing line: ~ elsif star_clicked?~ - Inside source: true *** True Line Result - # when the cursor is no longer over the star -** Processing line: ~ #~ + elsif star_clicked? +** Processing line: ~ state.current_input = :star~ - Inside source: true *** True Line Result - # -** Processing line: ~ # Similar things occur for the other Click and Drag inputs~ + state.current_input = :star +** Processing line: ~ # When the star in the second grid is clicked~ - Inside source: true *** True Line Result - # Similar things occur for the other Click and Drag inputs -** Processing line: ~ def input~ + # When the star in the second grid is clicked +** Processing line: ~ elsif star2_clicked?~ - Inside source: true *** True Line Result - def input -** Processing line: ~ # Processes inputs for the buttons~ + elsif star2_clicked? +** Processing line: ~ state.current_input = :star2~ - Inside source: true *** True Line Result - # Processes inputs for the buttons -** Processing line: ~ input_buttons~ + state.current_input = :star2 +** Processing line: ~ # When the target in the no second grid is clicked~ - Inside source: true *** True Line Result - input_buttons -** Processing line: ~~ + # When the target in the no second grid is clicked +** Processing line: ~ elsif target_clicked?~ - Inside source: true *** True Line Result - -** Processing line: ~ # Detects which if any click and drag input is occurring~ + elsif target_clicked? +** Processing line: ~ state.current_input = :target~ - Inside source: true *** True Line Result - # Detects which if any click and drag input is occurring -** Processing line: ~ detect_click_and_drag~ + state.current_input = :target +** Processing line: ~ # When the target in the second grid is clicked~ - Inside source: true *** True Line Result - detect_click_and_drag -** Processing line: ~~ + # When the target in the second grid is clicked +** Processing line: ~ elsif target2_clicked?~ - Inside source: true *** True Line Result - -** Processing line: ~ # Does the appropriate click and drag input based on the click_and_drag variable~ + elsif target2_clicked? +** Processing line: ~ state.current_input = :target2~ - Inside source: true *** True Line Result - # Does the appropriate click and drag input based on the click_and_drag variable -** Processing line: ~ process_click_and_drag~ + state.current_input = :target2 +** Processing line: ~ # When a wall in the first grid is clicked~ - Inside source: true *** True Line Result - process_click_and_drag -** Processing line: ~ end~ + # When a wall in the first grid is clicked +** Processing line: ~ elsif wall_clicked?~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + elsif wall_clicked? +** Processing line: ~ state.current_input = :remove_wall~ - Inside source: true *** True Line Result - -** Processing line: ~ # Detects and Process input for each button~ + state.current_input = :remove_wall +** Processing line: ~ # When a wall in the second grid is clicked~ - Inside source: true *** True Line Result - # Detects and Process input for each button -** Processing line: ~ def input_buttons~ + # When a wall in the second grid is clicked +** Processing line: ~ elsif wall2_clicked?~ - Inside source: true *** True Line Result - def input_buttons -** Processing line: ~ input_left_button~ + elsif wall2_clicked? +** Processing line: ~ state.current_input = :remove_wall2~ - Inside source: true *** True Line Result - input_left_button -** Processing line: ~ input_right_button~ + state.current_input = :remove_wall2 +** Processing line: ~ # When the first grid is clicked~ - Inside source: true *** True Line Result - input_right_button -** Processing line: ~ end~ + # When the first grid is clicked +** Processing line: ~ elsif grid_clicked?~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + elsif grid_clicked? +** Processing line: ~ state.current_input = :add_wall~ - Inside source: true *** True Line Result - -** Processing line: ~ # Checks if the previous step button is clicked~ + state.current_input = :add_wall +** Processing line: ~ # When the second grid is clicked~ - Inside source: true *** True Line Result - # Checks if the previous step button is clicked -** Processing line: ~ # If it is, it pauses the animation and moves the search one step backward~ + # When the second grid is clicked +** Processing line: ~ elsif grid2_clicked?~ - Inside source: true *** True Line Result - # If it is, it pauses the animation and moves the search one step backward -** Processing line: ~ def input_left_button~ + elsif grid2_clicked? +** Processing line: ~ state.current_input = :add_wall2~ - Inside source: true *** True Line Result - def input_left_button -** Processing line: ~ if left_button_clicked?~ + state.current_input = :add_wall2 +** Processing line: ~ end~ - Inside source: true *** True Line Result - if left_button_clicked? -** Processing line: ~ unless state.anim_steps == 0~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - unless state.anim_steps == 0 -** Processing line: ~ state.anim_steps -= 1~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - state.anim_steps -= 1 -** Processing line: ~ recalculate~ + +** Processing line: ~ # Processes click and drag based on what the user is currently dragging~ - Inside source: true *** True Line Result - recalculate -** Processing line: ~ end~ + # Processes click and drag based on what the user is currently dragging +** Processing line: ~ def process_input~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + def process_input +** Processing line: ~ if state.current_input == :star~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + if state.current_input == :star +** Processing line: ~ input_star~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + input_star +** Processing line: ~ elsif state.current_input == :star2~ - Inside source: true *** True Line Result - -** Processing line: ~ # Checks if the next step button is clicked~ + elsif state.current_input == :star2 +** Processing line: ~ input_star2~ - Inside source: true *** True Line Result - # Checks if the next step button is clicked -** Processing line: ~ # If it is, it pauses the animation and moves the search one step forward~ + input_star2 +** Processing line: ~ elsif state.current_input == :target~ - Inside source: true *** True Line Result - # If it is, it pauses the animation and moves the search one step forward -** Processing line: ~ def input_right_button~ + elsif state.current_input == :target +** Processing line: ~ input_target~ - Inside source: true *** True Line Result - def input_right_button -** Processing line: ~ if right_button_clicked?~ + input_target +** Processing line: ~ elsif state.current_input == :target2~ - Inside source: true *** True Line Result - if right_button_clicked? -** Processing line: ~ unless state.anim_steps == state.max_steps~ + elsif state.current_input == :target2 +** Processing line: ~ input_target2~ - Inside source: true *** True Line Result - unless state.anim_steps == state.max_steps -** Processing line: ~ state.anim_steps += 1~ + input_target2 +** Processing line: ~ elsif state.current_input == :remove_wall~ - Inside source: true *** True Line Result - state.anim_steps += 1 -** Processing line: ~ # Although normally recalculate would be called here~ + elsif state.current_input == :remove_wall +** Processing line: ~ input_remove_wall~ - Inside source: true *** True Line Result - # Although normally recalculate would be called here -** Processing line: ~ # because the right button only moves the search forward~ + input_remove_wall +** Processing line: ~ elsif state.current_input == :remove_wall2~ - Inside source: true *** True Line Result - # because the right button only moves the search forward -** Processing line: ~ # We can just do that~ + elsif state.current_input == :remove_wall2 +** Processing line: ~ input_remove_wall2~ - Inside source: true *** True Line Result - # We can just do that -** Processing line: ~ calc~ + input_remove_wall2 +** Processing line: ~ elsif state.current_input == :add_wall~ - Inside source: true *** True Line Result - calc -** Processing line: ~ end~ + elsif state.current_input == :add_wall +** Processing line: ~ input_add_wall~ - Inside source: true *** True Line Result - end + input_add_wall +** Processing line: ~ elsif state.current_input == :add_wall2~ +- Inside source: true +*** True Line Result + elsif state.current_input == :add_wall2 +** Processing line: ~ input_add_wall2~ +- Inside source: true +*** True Line Result + input_add_wall2 ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -64088,50 +71763,42 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Whenever the user edits the grid,~ -- Inside source: true -*** True Line Result - # Whenever the user edits the grid, -** Processing line: ~ # The search has to be recalculated upto the current step~ -- Inside source: true -*** True Line Result - # The search has to be recalculated upto the current step -** Processing line: ~~ +** Processing line: ~ # Moves the star to the cell closest to the mouse in the first grid~ - Inside source: true *** True Line Result - -** Processing line: ~ def recalculate~ + # Moves the star to the cell closest to the mouse in the first grid +** Processing line: ~ # Only resets the search if the star changes position~ - Inside source: true *** True Line Result - def recalculate -** Processing line: ~ # Resets the search~ + # Only resets the search if the star changes position +** Processing line: ~ # Called whenever the user is editing the star (puts mouse down on star)~ - Inside source: true *** True Line Result - # Resets the search -** Processing line: ~ state.frontier = []~ + # Called whenever the user is editing the star (puts mouse down on star) +** Processing line: ~ def input_star~ - Inside source: true *** True Line Result - state.frontier = [] -** Processing line: ~ state.visited = {}~ + def input_star +** Processing line: ~ old_star = state.star.clone~ - Inside source: true *** True Line Result - state.visited = {} -** Processing line: ~ state.cell_numbers = []~ + old_star = state.star.clone +** Processing line: ~ state.star = cell_closest_to_mouse~ - Inside source: true *** True Line Result - state.cell_numbers = [] -** Processing line: ~~ + state.star = cell_closest_to_mouse +** Processing line: ~ unless old_star == state.star~ - Inside source: true *** True Line Result - -** Processing line: ~ # Moves the animation forward one step at a time~ + unless old_star == state.star +** Processing line: ~ reset_search~ - Inside source: true *** True Line Result - # Moves the animation forward one step at a time -** Processing line: ~ state.anim_steps.times { calc }~ + reset_search +** Processing line: ~ end~ - Inside source: true *** True Line Result - state.anim_steps.times { calc } + end ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -64140,74 +71807,82 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~~ +** Processing line: ~ # Moves the star to the cell closest to the mouse in the second grid~ - Inside source: true *** True Line Result - -** Processing line: ~ # Determines what the user is clicking and planning on dragging~ + # Moves the star to the cell closest to the mouse in the second grid +** Processing line: ~ # Only resets the search if the star changes position~ - Inside source: true *** True Line Result - # Determines what the user is clicking and planning on dragging -** Processing line: ~ # Click and drag input is initiated by a click on the appropriate item~ + # Only resets the search if the star changes position +** Processing line: ~ # Called whenever the user is editing the star (puts mouse down on star)~ - Inside source: true *** True Line Result - # Click and drag input is initiated by a click on the appropriate item -** Processing line: ~ # and ended by mouse up~ + # Called whenever the user is editing the star (puts mouse down on star) +** Processing line: ~ def input_star2~ - Inside source: true *** True Line Result - # and ended by mouse up -** Processing line: ~ # Storing the value allows the user to continue the same edit as long as the~ + def input_star2 +** Processing line: ~ old_star = state.star.clone~ - Inside source: true *** True Line Result - # Storing the value allows the user to continue the same edit as long as the -** Processing line: ~ # mouse left click is held~ + old_star = state.star.clone +** Processing line: ~ state.star = cell_closest_to_mouse2~ - Inside source: true *** True Line Result - # mouse left click is held -** Processing line: ~ def detect_click_and_drag~ + state.star = cell_closest_to_mouse2 +** Processing line: ~ unless old_star == state.star~ - Inside source: true *** True Line Result - def detect_click_and_drag -** Processing line: ~ if inputs.mouse.up~ + unless old_star == state.star +** Processing line: ~ reset_search~ - Inside source: true *** True Line Result - if inputs.mouse.up -** Processing line: ~ state.click_and_drag = :none~ + reset_search +** Processing line: ~ end~ - Inside source: true *** True Line Result - state.click_and_drag = :none -** Processing line: ~ elsif star_clicked?~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - elsif star_clicked? -** Processing line: ~ state.click_and_drag = :star~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - state.click_and_drag = :star -** Processing line: ~ elsif wall_clicked?~ + +** Processing line: ~ # Moves the target to the grid closest to the mouse in the first grid~ - Inside source: true *** True Line Result - elsif wall_clicked? -** Processing line: ~ state.click_and_drag = :remove_wall~ + # Moves the target to the grid closest to the mouse in the first grid +** Processing line: ~ # Only reset_searchs the search if the target changes position~ - Inside source: true *** True Line Result - state.click_and_drag = :remove_wall -** Processing line: ~ elsif grid_clicked?~ + # Only reset_searchs the search if the target changes position +** Processing line: ~ # Called whenever the user is editing the target (puts mouse down on target)~ - Inside source: true *** True Line Result - elsif grid_clicked? -** Processing line: ~ state.click_and_drag = :add_wall~ + # Called whenever the user is editing the target (puts mouse down on target) +** Processing line: ~ def input_target~ - Inside source: true *** True Line Result - state.click_and_drag = :add_wall -** Processing line: ~ elsif slider_clicked?~ + def input_target +** Processing line: ~ old_target = state.target.clone~ - Inside source: true *** True Line Result - elsif slider_clicked? -** Processing line: ~ state.click_and_drag = :slider~ + old_target = state.target.clone +** Processing line: ~ state.target = cell_closest_to_mouse~ - Inside source: true *** True Line Result - state.click_and_drag = :slider + state.target = cell_closest_to_mouse +** Processing line: ~ unless old_target == state.target~ +- Inside source: true +*** True Line Result + unless old_target == state.target +** Processing line: ~ reset_search~ +- Inside source: true +*** True Line Result + reset_search ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -64220,46 +71895,38 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Processes input based on what the user is currently dragging~ -- Inside source: true -*** True Line Result - # Processes input based on what the user is currently dragging -** Processing line: ~ def process_click_and_drag~ -- Inside source: true -*** True Line Result - def process_click_and_drag -** Processing line: ~ if state.click_and_drag == :slider~ +** Processing line: ~ # Moves the target to the cell closest to the mouse in the second grid~ - Inside source: true *** True Line Result - if state.click_and_drag == :slider -** Processing line: ~ input_slider~ + # Moves the target to the cell closest to the mouse in the second grid +** Processing line: ~ # Only reset_searchs the search if the target changes position~ - Inside source: true *** True Line Result - input_slider -** Processing line: ~ elsif state.click_and_drag == :star~ + # Only reset_searchs the search if the target changes position +** Processing line: ~ # Called whenever the user is editing the target (puts mouse down on target)~ - Inside source: true *** True Line Result - elsif state.click_and_drag == :star -** Processing line: ~ input_star~ + # Called whenever the user is editing the target (puts mouse down on target) +** Processing line: ~ def input_target2~ - Inside source: true *** True Line Result - input_star -** Processing line: ~ elsif state.click_and_drag == :remove_wall~ + def input_target2 +** Processing line: ~ old_target = state.target.clone~ - Inside source: true *** True Line Result - elsif state.click_and_drag == :remove_wall -** Processing line: ~ input_remove_wall~ + old_target = state.target.clone +** Processing line: ~ state.target = cell_closest_to_mouse2~ - Inside source: true *** True Line Result - input_remove_wall -** Processing line: ~ elsif state.click_and_drag == :add_wall~ + state.target = cell_closest_to_mouse2 +** Processing line: ~ unless old_target == state.target~ - Inside source: true *** True Line Result - elsif state.click_and_drag == :add_wall -** Processing line: ~ input_add_wall~ + unless old_target == state.target +** Processing line: ~ reset_search~ - Inside source: true *** True Line Result - input_add_wall + reset_search ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -64272,102 +71939,98 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # This method is called when the user is dragging the slider~ +** Processing line: ~ # Removes walls in the first grid that are under the cursor~ - Inside source: true *** True Line Result - # This method is called when the user is dragging the slider -** Processing line: ~ # It moves the current animation step to the point represented by the slider~ + # Removes walls in the first grid that are under the cursor +** Processing line: ~ def input_remove_wall~ - Inside source: true *** True Line Result - # It moves the current animation step to the point represented by the slider -** Processing line: ~ def input_slider~ + def input_remove_wall +** Processing line: ~ # The mouse needs to be inside the grid, because we only want to remove walls~ - Inside source: true *** True Line Result - def input_slider -** Processing line: ~ mouse_x = inputs.mouse.point.x~ + # The mouse needs to be inside the grid, because we only want to remove walls +** Processing line: ~ # the cursor is directly over~ - Inside source: true *** True Line Result - mouse_x = inputs.mouse.point.x -** Processing line: ~~ + # the cursor is directly over +** Processing line: ~ # Recalculations should only occur when a wall is actually deleted~ - Inside source: true *** True Line Result - -** Processing line: ~ # Bounds the mouse_x to the closest x value on the slider line~ + # Recalculations should only occur when a wall is actually deleted +** Processing line: ~ if mouse_inside_grid?~ - Inside source: true *** True Line Result - # Bounds the mouse_x to the closest x value on the slider line -** Processing line: ~ mouse_x = slider.x if mouse_x < slider.x~ + if mouse_inside_grid? +** Processing line: ~ if state.walls.has_key?(cell_closest_to_mouse)~ - Inside source: true *** True Line Result - mouse_x = slider.x if mouse_x < slider.x -** Processing line: ~ mouse_x = slider.x + slider.w if mouse_x > slider.x + slider.w~ + if state.walls.has_key?(cell_closest_to_mouse) +** Processing line: ~ state.walls.delete(cell_closest_to_mouse)~ - Inside source: true *** True Line Result - mouse_x = slider.x + slider.w if mouse_x > slider.x + slider.w -** Processing line: ~~ + state.walls.delete(cell_closest_to_mouse) +** Processing line: ~ reset_search~ - Inside source: true *** True Line Result - -** Processing line: ~ # Sets the current search step to the one represented by the mouse x value~ + reset_search +** Processing line: ~ end~ - Inside source: true *** True Line Result - # Sets the current search step to the one represented by the mouse x value -** Processing line: ~ # The slider's circle moves due to the render_slider method using anim_steps~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - # The slider's circle moves due to the render_slider method using anim_steps -** Processing line: ~ state.anim_steps = ((mouse_x - slider.x) / slider.spacing).to_i~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - state.anim_steps = ((mouse_x - slider.x) / slider.spacing).to_i + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ recalculate~ -- Inside source: true -*** True Line Result - recalculate -** Processing line: ~ end~ +** Processing line: ~ # Removes walls in the second grid that are under the cursor~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + # Removes walls in the second grid that are under the cursor +** Processing line: ~ def input_remove_wall2~ - Inside source: true *** True Line Result - -** Processing line: ~ # Moves the star to the grid closest to the mouse~ + def input_remove_wall2 +** Processing line: ~ # The mouse needs to be inside the grid, because we only want to remove walls~ - Inside source: true *** True Line Result - # Moves the star to the grid closest to the mouse -** Processing line: ~ # Only recalculates the search if the star changes position~ + # The mouse needs to be inside the grid, because we only want to remove walls +** Processing line: ~ # the cursor is directly over~ - Inside source: true *** True Line Result - # Only recalculates the search if the star changes position -** Processing line: ~ # Called whenever the user is dragging the star~ + # the cursor is directly over +** Processing line: ~ # Recalculations should only occur when a wall is actually deleted~ - Inside source: true *** True Line Result - # Called whenever the user is dragging the star -** Processing line: ~ def input_star~ + # Recalculations should only occur when a wall is actually deleted +** Processing line: ~ if mouse_inside_grid2?~ - Inside source: true *** True Line Result - def input_star -** Processing line: ~ old_star = state.star.clone~ + if mouse_inside_grid2? +** Processing line: ~ if state.walls.has_key?(cell_closest_to_mouse2)~ - Inside source: true *** True Line Result - old_star = state.star.clone -** Processing line: ~ state.star = cell_closest_to_mouse~ + if state.walls.has_key?(cell_closest_to_mouse2) +** Processing line: ~ state.walls.delete(cell_closest_to_mouse2)~ - Inside source: true *** True Line Result - state.star = cell_closest_to_mouse -** Processing line: ~ unless old_star == state.star~ + state.walls.delete(cell_closest_to_mouse2) +** Processing line: ~ reset_search~ - Inside source: true *** True Line Result - unless old_star == state.star -** Processing line: ~ recalculate~ + reset_search +** Processing line: ~ end~ - Inside source: true *** True Line Result - recalculate + end ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -64380,42 +72043,30 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Removes walls that are under the cursor~ -- Inside source: true -*** True Line Result - # Removes walls that are under the cursor -** Processing line: ~ def input_remove_wall~ -- Inside source: true -*** True Line Result - def input_remove_wall -** Processing line: ~ # The mouse needs to be inside the grid, because we only want to remove walls~ -- Inside source: true -*** True Line Result - # The mouse needs to be inside the grid, because we only want to remove walls -** Processing line: ~ # the cursor is directly over~ +** Processing line: ~ # Adds a wall in the first grid in the cell the mouse is over~ - Inside source: true *** True Line Result - # the cursor is directly over -** Processing line: ~ # Recalculations should only occur when a wall is actually deleted~ + # Adds a wall in the first grid in the cell the mouse is over +** Processing line: ~ def input_add_wall~ - Inside source: true *** True Line Result - # Recalculations should only occur when a wall is actually deleted + def input_add_wall ** Processing line: ~ if mouse_inside_grid?~ - Inside source: true *** True Line Result if mouse_inside_grid? -** Processing line: ~ if state.walls.has_key?(cell_closest_to_mouse)~ +** Processing line: ~ unless state.walls.has_key?(cell_closest_to_mouse)~ - Inside source: true *** True Line Result - if state.walls.has_key?(cell_closest_to_mouse) -** Processing line: ~ state.walls.delete(cell_closest_to_mouse)~ + unless state.walls.has_key?(cell_closest_to_mouse) +** Processing line: ~ state.walls[cell_closest_to_mouse] = true~ - Inside source: true *** True Line Result - state.walls.delete(cell_closest_to_mouse) -** Processing line: ~ recalculate~ + state.walls[cell_closest_to_mouse] = true +** Processing line: ~ reset_search~ - Inside source: true *** True Line Result - recalculate + reset_search ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -64432,38 +72083,34 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Adds walls at cells under the cursor~ -- Inside source: true -*** True Line Result - # Adds walls at cells under the cursor -** Processing line: ~ def input_add_wall~ +** Processing line: ~~ - Inside source: true *** True Line Result - def input_add_wall -** Processing line: ~ # Adds a wall to the hash~ + +** Processing line: ~ # Adds a wall in the second grid in the cell the mouse is over~ - Inside source: true *** True Line Result - # Adds a wall to the hash -** Processing line: ~ # We can use the grid closest to mouse, because the cursor is inside the grid~ + # Adds a wall in the second grid in the cell the mouse is over +** Processing line: ~ def input_add_wall2~ - Inside source: true *** True Line Result - # We can use the grid closest to mouse, because the cursor is inside the grid -** Processing line: ~ if mouse_inside_grid?~ + def input_add_wall2 +** Processing line: ~ if mouse_inside_grid2?~ - Inside source: true *** True Line Result - if mouse_inside_grid? -** Processing line: ~ unless state.walls.has_key?(cell_closest_to_mouse)~ + if mouse_inside_grid2? +** Processing line: ~ unless state.walls.has_key?(cell_closest_to_mouse2)~ - Inside source: true *** True Line Result - unless state.walls.has_key?(cell_closest_to_mouse) -** Processing line: ~ state.walls[cell_closest_to_mouse] = true~ + unless state.walls.has_key?(cell_closest_to_mouse2) +** Processing line: ~ state.walls[cell_closest_to_mouse2] = true~ - Inside source: true *** True Line Result - state.walls[cell_closest_to_mouse] = true -** Processing line: ~ recalculate~ + state.walls[cell_closest_to_mouse2] = true +** Processing line: ~ reset_search~ - Inside source: true *** True Line Result - recalculate + reset_search ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -64480,18 +72127,50 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # This method moves the search forward one step~ +** Processing line: ~ # Whenever the user edits the grid,~ - Inside source: true *** True Line Result - # This method moves the search forward one step -** Processing line: ~ # When the animation is playing it is called every tick~ + # Whenever the user edits the grid, +** Processing line: ~ # The search has to be reset_searchd upto the current step~ - Inside source: true *** True Line Result - # When the animation is playing it is called every tick -** Processing line: ~ # And called whenever the current step of the animation needs to be recalculated~ + # The search has to be reset_searchd upto the current step +** Processing line: ~ # with the current grid as the initial state of the grid~ +- Inside source: true +*** True Line Result + # with the current grid as the initial state of the grid +** Processing line: ~ def reset_search~ +- Inside source: true +*** True Line Result + def reset_search +** Processing line: ~ # Reset_Searchs the search~ +- Inside source: true +*** True Line Result + # Reset_Searchs the search +** Processing line: ~ state.frontier = []~ +- Inside source: true +*** True Line Result + state.frontier = [] +** Processing line: ~ state.visited = {}~ +- Inside source: true +*** True Line Result + state.visited = {} +** Processing line: ~ state.early_exit_visited = {}~ +- Inside source: true +*** True Line Result + state.early_exit_visited = {} +** Processing line: ~ state.came_from = {}~ +- Inside source: true +*** True Line Result + state.came_from = {} +** Processing line: ~ state.path = {}~ +- Inside source: true +*** True Line Result + state.path = {} +** Processing line: ~ end~ - Inside source: true *** True Line Result - # And called whenever the current step of the animation needs to be recalculated + end ** Processing line: ~~ - Inside source: true *** True Line Result @@ -64500,38 +72179,38 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result # Moves the search forward one step -** Processing line: ~ # Parameter called_from_tick is true if it is called from the tick method~ +** Processing line: ~ def step~ - Inside source: true *** True Line Result - # Parameter called_from_tick is true if it is called from the tick method -** Processing line: ~ # It is false when the search is being recalculated after user editing the grid~ + def step +** Processing line: ~ # The setup to the search~ - Inside source: true *** True Line Result - # It is false when the search is being recalculated after user editing the grid -** Processing line: ~ def calc~ + # The setup to the search +** Processing line: ~ # Runs once when there are no visited cells~ - Inside source: true *** True Line Result - def calc -** Processing line: ~ # The setup to the search~ + # Runs once when there are no visited cells +** Processing line: ~ if state.visited.empty?~ - Inside source: true *** True Line Result - # The setup to the search -** Processing line: ~ # Runs once when the there is no frontier or visited cells~ + if state.visited.empty? +** Processing line: ~ state.visited[state.star] = true~ - Inside source: true *** True Line Result - # Runs once when the there is no frontier or visited cells -** Processing line: ~ if state.frontier.empty? && state.visited.empty?~ + state.visited[state.star] = true +** Processing line: ~ state.early_exit_visited[state.star] = true~ - Inside source: true *** True Line Result - if state.frontier.empty? && state.visited.empty? + state.early_exit_visited[state.star] = true ** Processing line: ~ state.frontier << state.star~ - Inside source: true *** True Line Result state.frontier << state.star -** Processing line: ~ state.visited[state.star] = true~ +** Processing line: ~ state.came_from[state.star] = nil~ - Inside source: true *** True Line Result - state.visited[state.star] = true + state.came_from[state.star] = nil ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -64572,30 +72251,50 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result unless state.visited.has_key?(neighbor) || state.walls.has_key?(neighbor) -** Processing line: ~ # Add them to the frontier and mark them as visited~ -- Inside source: true -*** True Line Result - # Add them to the frontier and mark them as visited -** Processing line: ~ state.frontier << neighbor~ +** Processing line: ~ # Add them to the frontier and mark them as visited in the first grid~ - Inside source: true *** True Line Result - state.frontier << neighbor + # Add them to the frontier and mark them as visited in the first grid ** Processing line: ~ state.visited[neighbor] = true~ - Inside source: true *** True Line Result state.visited[neighbor] = true +** Processing line: ~ # Unless the target has been visited~ +- Inside source: true +*** True Line Result + # Unless the target has been visited +** Processing line: ~ unless state.visited.has_key?(state.target)~ +- Inside source: true +*** True Line Result + unless state.visited.has_key?(state.target) +** Processing line: ~ # Mark the neighbor as visited in the second grid as well~ +- Inside source: true +*** True Line Result + # Mark the neighbor as visited in the second grid as well +** Processing line: ~ state.early_exit_visited[neighbor] = true~ +- Inside source: true +*** True Line Result + state.early_exit_visited[neighbor] = true +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Also assign them a frontier number~ +** Processing line: ~ # Add the neighbor to the frontier and remember which cell it came from~ - Inside source: true *** True Line Result - # Also assign them a frontier number -** Processing line: ~ state.cell_numbers << neighbor~ + # Add the neighbor to the frontier and remember which cell it came from +** Processing line: ~ state.frontier << neighbor~ - Inside source: true *** True Line Result - state.cell_numbers << neighbor + state.frontier << neighbor +** Processing line: ~ state.came_from[neighbor] = new_frontier~ +- Inside source: true +*** True Line Result + state.came_from[neighbor] = new_frontier ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -64628,10 +72327,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result # Used to determine what the next cells to be added to the frontier are -** Processing line: ~ def adjacent_neighbors cell~ +** Processing line: ~ def adjacent_neighbors(cell)~ - Inside source: true *** True Line Result - def adjacent_neighbors cell + def adjacent_neighbors(cell) ** Processing line: ~ neighbors = []~ - Inside source: true *** True Line Result @@ -64640,14 +72339,14 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ neighbors << [cell.x, cell.y + 1] unless cell.y == grid.height - 1~ +** Processing line: ~ # Gets all the valid neighbors into the array~ - Inside source: true *** True Line Result - neighbors << [cell.x, cell.y + 1] unless cell.y == grid.height - 1 -** Processing line: ~ neighbors << [cell.x + 1, cell.y] unless cell.x == grid.width - 1~ + # Gets all the valid neighbors into the array +** Processing line: ~ # From southern neighbor, clockwise~ - Inside source: true *** True Line Result - neighbors << [cell.x + 1, cell.y] unless cell.x == grid.width - 1 + # From southern neighbor, clockwise ** Processing line: ~ neighbors << [cell.x, cell.y - 1] unless cell.y == 0~ - Inside source: true *** True Line Result @@ -64656,6 +72355,34 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result neighbors << [cell.x - 1, cell.y] unless cell.x == 0 +** Processing line: ~ neighbors << [cell.x, cell.y + 1] unless cell.y == grid.height - 1~ +- Inside source: true +*** True Line Result + neighbors << [cell.x, cell.y + 1] unless cell.y == grid.height - 1 +** Processing line: ~ neighbors << [cell.x + 1, cell.y] unless cell.x == grid.width - 1~ +- Inside source: true +*** True Line Result + neighbors << [cell.x + 1, cell.y] unless cell.x == grid.width - 1 +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ # Sorts the neighbors so the rendered path is a zigzag path~ +- Inside source: true +*** True Line Result + # Sorts the neighbors so the rendered path is a zigzag path +** Processing line: ~ # Cells in a diagonal direction are given priority~ +- Inside source: true +*** True Line Result + # Cells in a diagonal direction are given priority +** Processing line: ~ # Comment this line to see the difference~ +- Inside source: true +*** True Line Result + # Comment this line to see the difference +** Processing line: ~ neighbors = neighbors.sort_by { |neighbor_x, neighbor_y| proximity_to_star(neighbor_x, neighbor_y) }~ +- Inside source: true +*** True Line Result + neighbors = neighbors.sort_by { |neighbor_x, neighbor_y| proximity_to_star(neighbor_x, neighbor_y) } ** Processing line: ~~ - Inside source: true *** True Line Result @@ -64672,6 +72399,74 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result +** Processing line: ~ # Finds the vertical and horizontal distance of a cell from the star~ +- Inside source: true +*** True Line Result + # Finds the vertical and horizontal distance of a cell from the star +** Processing line: ~ # and returns the larger value~ +- Inside source: true +*** True Line Result + # and returns the larger value +** Processing line: ~ # This method is used to have a zigzag pattern in the rendered path~ +- Inside source: true +*** True Line Result + # This method is used to have a zigzag pattern in the rendered path +** Processing line: ~ # A cell that is [5, 5] from the star,~ +- Inside source: true +*** True Line Result + # A cell that is [5, 5] from the star, +** Processing line: ~ # is explored before over a cell that is [0, 7] away.~ +- Inside source: true +*** True Line Result + # is explored before over a cell that is [0, 7] away. +** Processing line: ~ # So, if possible, the search tries to go diagonal (zigzag) first~ +- Inside source: true +*** True Line Result + # So, if possible, the search tries to go diagonal (zigzag) first +** Processing line: ~ def proximity_to_star(x, y)~ +- Inside source: true +*** True Line Result + def proximity_to_star(x, y) +** Processing line: ~ distance_x = (state.star.x - x).abs~ +- Inside source: true +*** True Line Result + distance_x = (state.star.x - x).abs +** Processing line: ~ distance_y = (state.star.y - y).abs~ +- Inside source: true +*** True Line Result + distance_y = (state.star.y - y).abs +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ if distance_x > distance_y~ +- Inside source: true +*** True Line Result + if distance_x > distance_y +** Processing line: ~ return distance_x~ +- Inside source: true +*** True Line Result + return distance_x +** Processing line: ~ else~ +- Inside source: true +*** True Line Result + else +** Processing line: ~ return distance_y~ +- Inside source: true +*** True Line Result + return distance_y +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + ** Processing line: ~ # When the user grabs the star and puts their cursor to the far right~ - Inside source: true *** True Line Result @@ -64680,14 +72475,18 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result # and moves up and down, the star is supposed to move along the grid as well -** Processing line: ~ # Finding the grid closest to the mouse helps with this~ +** Processing line: ~ # Finding the cell closest to the mouse helps with this~ - Inside source: true *** True Line Result - # Finding the grid closest to the mouse helps with this + # Finding the cell closest to the mouse helps with this ** Processing line: ~ def cell_closest_to_mouse~ - Inside source: true *** True Line Result def cell_closest_to_mouse +** Processing line: ~ # Closest cell to the mouse in the first grid~ +- Inside source: true +*** True Line Result + # Closest cell to the mouse in the first grid ** Processing line: ~ x = (inputs.mouse.point.x / grid.cell_size).to_i~ - Inside source: true *** True Line Result @@ -64696,6 +72495,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result y = (inputs.mouse.point.y / grid.cell_size).to_i +** Processing line: ~ # Bound x and y to the grid~ +- Inside source: true +*** True Line Result + # Bound x and y to the grid ** Processing line: ~ x = grid.width - 1 if x > grid.width - 1~ - Inside source: true *** True Line Result @@ -64704,6 +72507,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result y = grid.height - 1 if y > grid.height - 1 +** Processing line: ~ # Return closest cell~ +- Inside source: true +*** True Line Result + # Return closest cell ** Processing line: ~ [x, y]~ - Inside source: true *** True Line Result @@ -64716,70 +72523,62 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ # These methods detect when the buttons are clicked~ -- Inside source: true -*** True Line Result - # These methods detect when the buttons are clicked -** Processing line: ~ def left_button_clicked?~ +** Processing line: ~ # When the user grabs the star and puts their cursor to the far right~ - Inside source: true *** True Line Result - def left_button_clicked? -** Processing line: ~ (inputs.mouse.up && inputs.mouse.point.inside_rect?(buttons.left)) || inputs.keyboard.key_up.left~ + # When the user grabs the star and puts their cursor to the far right +** Processing line: ~ # and moves up and down, the star is supposed to move along the grid as well~ - Inside source: true *** True Line Result - (inputs.mouse.up && inputs.mouse.point.inside_rect?(buttons.left)) || inputs.keyboard.key_up.left -** Processing line: ~ end~ + # and moves up and down, the star is supposed to move along the grid as well +** Processing line: ~ # Finding the cell closest to the mouse in the second grid helps with this~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + # Finding the cell closest to the mouse in the second grid helps with this +** Processing line: ~ def cell_closest_to_mouse2~ - Inside source: true *** True Line Result - -** Processing line: ~ def right_button_clicked?~ + def cell_closest_to_mouse2 +** Processing line: ~ # Closest cell grid to the mouse in the second~ - Inside source: true *** True Line Result - def right_button_clicked? -** Processing line: ~ (inputs.mouse.up && inputs.mouse.point.inside_rect?(buttons.right)) || inputs.keyboard.key_up.right~ + # Closest cell grid to the mouse in the second +** Processing line: ~ x = (inputs.mouse.point.x / grid.cell_size).to_i~ - Inside source: true *** True Line Result - (inputs.mouse.up && inputs.mouse.point.inside_rect?(buttons.right)) || inputs.keyboard.key_up.right -** Processing line: ~ end~ + x = (inputs.mouse.point.x / grid.cell_size).to_i +** Processing line: ~ y = (inputs.mouse.point.y / grid.cell_size).to_i~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + y = (inputs.mouse.point.y / grid.cell_size).to_i +** Processing line: ~ # Translate the cell to the first grid~ - Inside source: true *** True Line Result - -** Processing line: ~ # Signal that the user is going to be moving the slider~ + # Translate the cell to the first grid +** Processing line: ~ x -= grid.width + 1~ - Inside source: true *** True Line Result - # Signal that the user is going to be moving the slider -** Processing line: ~ def slider_clicked?~ + x -= grid.width + 1 +** Processing line: ~ # Bound x and y to the first grid~ - Inside source: true *** True Line Result - def slider_clicked? -** Processing line: ~ circle_x = (slider.x - slider.offset) + (state.anim_steps * slider.spacing)~ + # Bound x and y to the first grid +** Processing line: ~ x = grid.width - 1 if x > grid.width - 1~ - Inside source: true *** True Line Result - circle_x = (slider.x - slider.offset) + (state.anim_steps * slider.spacing) -** Processing line: ~ circle_y = (slider.y - slider.offset)~ + x = grid.width - 1 if x > grid.width - 1 +** Processing line: ~ y = grid.height - 1 if y > grid.height - 1~ - Inside source: true *** True Line Result - circle_y = (slider.y - slider.offset) -** Processing line: ~ circle_rect = [circle_x, circle_y, 37, 37]~ + y = grid.height - 1 if y > grid.height - 1 +** Processing line: ~ # Return closest cell~ - Inside source: true *** True Line Result - circle_rect = [circle_x, circle_y, 37, 37] -** Processing line: ~ inputs.mouse.down && inputs.mouse.point.inside_rect?(circle_rect)~ + # Return closest cell +** Processing line: ~ [x, y]~ - Inside source: true *** True Line Result - inputs.mouse.down && inputs.mouse.point.inside_rect?(circle_rect) + [x, y] ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -64788,10 +72587,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Signal that the user is going to be moving the star~ +** Processing line: ~ # Signal that the user is going to be moving the star from the first grid~ - Inside source: true *** True Line Result - # Signal that the user is going to be moving the star + # Signal that the user is going to be moving the star from the first grid ** Processing line: ~ def star_clicked?~ - Inside source: true *** True Line Result @@ -64808,18 +72607,18 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Signal that the user is going to be removing walls~ +** Processing line: ~ # Signal that the user is going to be moving the star from the second grid~ - Inside source: true *** True Line Result - # Signal that the user is going to be removing walls -** Processing line: ~ def wall_clicked?~ + # Signal that the user is going to be moving the star from the second grid +** Processing line: ~ def star2_clicked?~ - Inside source: true *** True Line Result - def wall_clicked? -** Processing line: ~ inputs.mouse.down && mouse_inside_a_wall?~ + def star2_clicked? +** Processing line: ~ inputs.mouse.down && inputs.mouse.point.inside_rect?(early_exit_scale_up(state.star))~ - Inside source: true *** True Line Result - inputs.mouse.down && mouse_inside_a_wall? + inputs.mouse.down && inputs.mouse.point.inside_rect?(early_exit_scale_up(state.star)) ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -64828,18 +72627,18 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Signal that the user is going to be adding walls~ +** Processing line: ~ # Signal that the user is going to be moving the target from the first grid~ - Inside source: true *** True Line Result - # Signal that the user is going to be adding walls -** Processing line: ~ def grid_clicked?~ + # Signal that the user is going to be moving the target from the first grid +** Processing line: ~ def target_clicked?~ - Inside source: true *** True Line Result - def grid_clicked? -** Processing line: ~ inputs.mouse.down && mouse_inside_grid?~ + def target_clicked? +** Processing line: ~ inputs.mouse.down && inputs.mouse.point.inside_rect?(scale_up(state.target))~ - Inside source: true *** True Line Result - inputs.mouse.down && mouse_inside_grid? + inputs.mouse.down && inputs.mouse.point.inside_rect?(scale_up(state.target)) ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -64848,38 +72647,38 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Returns whether the mouse is inside of a wall~ +** Processing line: ~ # Signal that the user is going to be moving the target from the second grid~ - Inside source: true *** True Line Result - # Returns whether the mouse is inside of a wall -** Processing line: ~ # Part of the condition that checks whether the user is removing a wall~ + # Signal that the user is going to be moving the target from the second grid +** Processing line: ~ def target2_clicked?~ - Inside source: true *** True Line Result - # Part of the condition that checks whether the user is removing a wall -** Processing line: ~ def mouse_inside_a_wall?~ + def target2_clicked? +** Processing line: ~ inputs.mouse.down && inputs.mouse.point.inside_rect?(early_exit_scale_up(state.target))~ - Inside source: true *** True Line Result - def mouse_inside_a_wall? -** Processing line: ~ state.walls.each_key do | wall |~ + inputs.mouse.down && inputs.mouse.point.inside_rect?(early_exit_scale_up(state.target)) +** Processing line: ~ end~ - Inside source: true *** True Line Result - state.walls.each_key do | wall | -** Processing line: ~ return true if inputs.mouse.point.inside_rect?(scale_up(wall))~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - return true if inputs.mouse.point.inside_rect?(scale_up(wall)) -** Processing line: ~ end~ + +** Processing line: ~ # Signal that the user is going to be removing walls from the first grid~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + # Signal that the user is going to be removing walls from the first grid +** Processing line: ~ def wall_clicked?~ - Inside source: true *** True Line Result - -** Processing line: ~ false~ + def wall_clicked? +** Processing line: ~ inputs.mouse.down && mouse_inside_wall?~ - Inside source: true *** True Line Result - false + inputs.mouse.down && mouse_inside_wall? ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -64888,22 +72687,18 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Returns whether the mouse is inside of a grid~ -- Inside source: true -*** True Line Result - # Returns whether the mouse is inside of a grid -** Processing line: ~ # Part of the condition that checks whether the user is adding a wall~ +** Processing line: ~ # Signal that the user is going to be removing walls from the second grid~ - Inside source: true *** True Line Result - # Part of the condition that checks whether the user is adding a wall -** Processing line: ~ def mouse_inside_grid?~ + # Signal that the user is going to be removing walls from the second grid +** Processing line: ~ def wall2_clicked?~ - Inside source: true *** True Line Result - def mouse_inside_grid? -** Processing line: ~ inputs.mouse.point.inside_rect?(scale_up([0, 0, grid.width, grid.height]))~ + def wall2_clicked? +** Processing line: ~ inputs.mouse.down && mouse_inside_wall2?~ - Inside source: true *** True Line Result - inputs.mouse.point.inside_rect?(scale_up([0, 0, grid.width, grid.height])) + inputs.mouse.down && mouse_inside_wall2? ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -64912,26 +72707,38 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # These methods provide handy aliases to colors~ +** Processing line: ~ # Signal that the user is going to be adding walls from the first grid~ - Inside source: true *** True Line Result - # These methods provide handy aliases to colors + # Signal that the user is going to be adding walls from the first grid +** Processing line: ~ def grid_clicked?~ +- Inside source: true +*** True Line Result + def grid_clicked? +** Processing line: ~ inputs.mouse.down && mouse_inside_grid?~ +- Inside source: true +*** True Line Result + inputs.mouse.down && mouse_inside_grid? +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Light brown~ +** Processing line: ~ # Signal that the user is going to be adding walls from the second grid~ - Inside source: true *** True Line Result - # Light brown -** Processing line: ~ def unvisited_color~ + # Signal that the user is going to be adding walls from the second grid +** Processing line: ~ def grid2_clicked?~ - Inside source: true *** True Line Result - def unvisited_color -** Processing line: ~ [221, 212, 213]~ + def grid2_clicked? +** Processing line: ~ inputs.mouse.down && mouse_inside_grid2?~ - Inside source: true *** True Line Result - [221, 212, 213] + inputs.mouse.down && mouse_inside_grid2? ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -64940,38 +72747,38 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Black~ +** Processing line: ~ # Returns whether the mouse is inside of a wall in the first grid~ - Inside source: true *** True Line Result - # Black -** Processing line: ~ def grid_line_color~ + # Returns whether the mouse is inside of a wall in the first grid +** Processing line: ~ # Part of the condition that checks whether the user is removing a wall~ - Inside source: true *** True Line Result - def grid_line_color -** Processing line: ~ [255, 255, 255]~ + # Part of the condition that checks whether the user is removing a wall +** Processing line: ~ def mouse_inside_wall?~ - Inside source: true *** True Line Result - [255, 255, 255] -** Processing line: ~ end~ + def mouse_inside_wall? +** Processing line: ~ state.walls.each_key do | wall |~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + state.walls.each_key do | wall | +** Processing line: ~ return true if inputs.mouse.point.inside_rect?(scale_up(wall))~ - Inside source: true *** True Line Result - -** Processing line: ~ # Dark Brown~ + return true if inputs.mouse.point.inside_rect?(scale_up(wall)) +** Processing line: ~ end~ - Inside source: true *** True Line Result - # Dark Brown -** Processing line: ~ def visited_color~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - def visited_color -** Processing line: ~ [204, 191, 179]~ + +** Processing line: ~ false~ - Inside source: true *** True Line Result - [204, 191, 179] + false ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -64980,38 +72787,38 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Blue~ +** Processing line: ~ # Returns whether the mouse is inside of a wall in the second grid~ - Inside source: true *** True Line Result - # Blue -** Processing line: ~ def frontier_color~ + # Returns whether the mouse is inside of a wall in the second grid +** Processing line: ~ # Part of the condition that checks whether the user is removing a wall~ - Inside source: true *** True Line Result - def frontier_color -** Processing line: ~ [103, 136, 204]~ + # Part of the condition that checks whether the user is removing a wall +** Processing line: ~ def mouse_inside_wall2?~ - Inside source: true *** True Line Result - [103, 136, 204] -** Processing line: ~ end~ + def mouse_inside_wall2? +** Processing line: ~ state.walls.each_key do | wall |~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + state.walls.each_key do | wall | +** Processing line: ~ return true if inputs.mouse.point.inside_rect?(early_exit_scale_up(wall))~ - Inside source: true *** True Line Result - -** Processing line: ~ # Camo Green~ + return true if inputs.mouse.point.inside_rect?(early_exit_scale_up(wall)) +** Processing line: ~ end~ - Inside source: true *** True Line Result - # Camo Green -** Processing line: ~ def wall_color~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - def wall_color -** Processing line: ~ [134, 134, 120]~ + +** Processing line: ~ false~ - Inside source: true *** True Line Result - [134, 134, 120] + false ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -65020,18 +72827,22 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Next frontier to be expanded~ +** Processing line: ~ # Returns whether the mouse is inside of the first grid~ - Inside source: true *** True Line Result - # Next frontier to be expanded -** Processing line: ~ def highlighter_yellow~ + # Returns whether the mouse is inside of the first grid +** Processing line: ~ # Part of the condition that checks whether the user is adding a wall~ - Inside source: true *** True Line Result - def highlighter_yellow -** Processing line: ~ [214, 231, 125]~ + # Part of the condition that checks whether the user is adding a wall +** Processing line: ~ def mouse_inside_grid?~ - Inside source: true *** True Line Result - [214, 231, 125] + def mouse_inside_grid? +** Processing line: ~ inputs.mouse.point.inside_rect?(scale_up(grid.rect))~ +- Inside source: true +*** True Line Result + inputs.mouse.point.inside_rect?(scale_up(grid.rect)) ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -65040,18 +72851,22 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # The neighbors of the next frontier to be expanded~ +** Processing line: ~ # Returns whether the mouse is inside of the second grid~ - Inside source: true *** True Line Result - # The neighbors of the next frontier to be expanded -** Processing line: ~ def highlighter_green~ + # Returns whether the mouse is inside of the second grid +** Processing line: ~ # Part of the condition that checks whether the user is adding a wall~ - Inside source: true *** True Line Result - def highlighter_green -** Processing line: ~ [65, 191, 127]~ + # Part of the condition that checks whether the user is adding a wall +** Processing line: ~ def mouse_inside_grid2?~ - Inside source: true *** True Line Result - [65, 191, 127] + def mouse_inside_grid2? +** Processing line: ~ inputs.mouse.point.inside_rect?(early_exit_scale_up(grid.rect))~ +- Inside source: true +*** True Line Result + inputs.mouse.point.inside_rect?(early_exit_scale_up(grid.rect)) ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -65060,18 +72875,26 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Button background~ +** Processing line: ~ # These methods provide handy aliases to colors~ - Inside source: true *** True Line Result - # Button background -** Processing line: ~ def gray~ + # These methods provide handy aliases to colors +** Processing line: ~~ - Inside source: true *** True Line Result - def gray -** Processing line: ~ [190, 190, 190]~ + +** Processing line: ~ # Light brown~ - Inside source: true *** True Line Result - [190, 190, 190] + # Light brown +** Processing line: ~ def unvisited_color~ +- Inside source: true +*** True Line Result + def unvisited_color +** Processing line: ~ [221, 212, 213]~ +- Inside source: true +*** True Line Result + [221, 212, 213] ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -65080,18 +72903,18 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Button outline~ +** Processing line: ~ # Camo Green~ - Inside source: true *** True Line Result - # Button outline -** Processing line: ~ def black~ + # Camo Green +** Processing line: ~ def wall_color~ - Inside source: true *** True Line Result - def black -** Processing line: ~ [0, 0, 0]~ + def wall_color +** Processing line: ~ [134, 134, 120]~ - Inside source: true *** True Line Result - [0, 0, 0] + [134, 134, 120] ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -65100,18 +72923,18 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # These methods make the code more concise~ +** Processing line: ~ # Pastel White~ - Inside source: true *** True Line Result - # These methods make the code more concise -** Processing line: ~ def grid~ + # Pastel White +** Processing line: ~ def path_color~ - Inside source: true *** True Line Result - def grid -** Processing line: ~ state.grid~ + def path_color +** Processing line: ~ [231, 230, 228]~ - Inside source: true *** True Line Result - state.grid + [231, 230, 228] ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -65120,14 +72943,14 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def buttons~ +** Processing line: ~ def red~ - Inside source: true *** True Line Result - def buttons -** Processing line: ~ state.buttons~ + def red +** Processing line: ~ [255, 0, 0]~ - Inside source: true *** True Line Result - state.buttons + [255, 0, 0] ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -65136,14 +72959,18 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def slider~ +** Processing line: ~ # Makes code more concise~ - Inside source: true *** True Line Result - def slider -** Processing line: ~ state.slider~ + # Makes code more concise +** Processing line: ~ def grid~ - Inside source: true *** True Line Result - state.slider + def grid +** Processing line: ~ state.grid~ +- Inside source: true +*** True Line Result + state.grid ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -65156,18 +72983,26 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~~ +** Processing line: ~ # Method that is called by DragonRuby periodically~ - Inside source: true *** True Line Result - + # Method that is called by DragonRuby periodically +** Processing line: ~ # Used for updating animations and calculations~ +- Inside source: true +*** True Line Result + # Used for updating animations and calculations ** Processing line: ~ def tick args~ - Inside source: true *** True Line Result def tick args -** Processing line: ~ # Pressing r resets the program~ +** Processing line: ~~ - Inside source: true *** True Line Result - # Pressing r resets the program + +** Processing line: ~ # Pressing r will reset the application~ +- Inside source: true +*** True Line Result + # Pressing r will reset the application ** Processing line: ~ if args.inputs.keyboard.key_down.r~ - Inside source: true *** True Line Result @@ -65192,18 +73027,22 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ $detailed_breadth_first_search ||= DetailedBreadthFirstSearch.new(args)~ +** Processing line: ~ # Every tick, new args are passed, and the Breadth First Search tick is called~ - Inside source: true *** True Line Result - $detailed_breadth_first_search ||= DetailedBreadthFirstSearch.new(args) -** Processing line: ~ $detailed_breadth_first_search.args = args~ + # Every tick, new args are passed, and the Breadth First Search tick is called +** Processing line: ~ $early_exit_breadth_first_search ||= EarlyExitBreadthFirstSearch.new(args)~ - Inside source: true *** True Line Result - $detailed_breadth_first_search.args = args -** Processing line: ~ $detailed_breadth_first_search.tick~ + $early_exit_breadth_first_search ||= EarlyExitBreadthFirstSearch.new(args) +** Processing line: ~ $early_exit_breadth_first_search.args = args~ - Inside source: true *** True Line Result - $detailed_breadth_first_search.tick + $early_exit_breadth_first_search.args = args +** Processing line: ~ $early_exit_breadth_first_search.tick~ +- Inside source: true +*** True Line Result + $early_exit_breadth_first_search.tick ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -65220,10 +73059,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result def reset -** Processing line: ~ $detailed_breadth_first_search = nil~ +** Processing line: ~ $early_exit_breadth_first_search = nil~ - Inside source: true *** True Line Result - $detailed_breadth_first_search = nil + $early_exit_breadth_first_search = nil ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -65240,26 +73079,74 @@ Follows is a source code listing for all files that have been open sourced. This - End of paragraph detected. *** True Line Result -** Processing line: ~*** Path Finding Algorithms - Breadcrumbs - main.rb~ +** Processing line: ~*** Path Finding Algorithms - Dijkstra - main.rb~ - Header detected. *** True Line Result *** True Line Result -*** Path Finding Algorithms - Breadcrumbs - main.rb +*** Path Finding Algorithms - Dijkstra - main.rb ** Processing line: ~#+begin_src ruby~ - Line was identified as the beginning of a code block. *** True Line Result *** True Line Result #+begin_src ruby -** Processing line: ~ # ./samples/13_path_finding_algorithms/03_breadcrumbs/app/main.rb~ +** Processing line: ~ # ./samples/13_path_finding_algorithms/05_dijkstra/app/main.rb~ - Inside source: true *** True Line Result - # ./samples/13_path_finding_algorithms/03_breadcrumbs/app/main.rb -** Processing line: ~ class Breadcrumbs~ + # ./samples/13_path_finding_algorithms/05_dijkstra/app/main.rb +** Processing line: ~ # Demonstrates how Dijkstra's Algorithm allows movement costs to be considered~ - Inside source: true *** True Line Result - class Breadcrumbs + # Demonstrates how Dijkstra's Algorithm allows movement costs to be considered +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ # Inspired by https://www.redblobgames.com/pathfinding/a-star/introduction.html~ +- Inside source: true +*** True Line Result + # Inspired by https://www.redblobgames.com/pathfinding/a-star/introduction.html +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ # The first grid is a breadth first search with an early exit.~ +- Inside source: true +*** True Line Result + # The first grid is a breadth first search with an early exit. +** Processing line: ~ # It shows a heat map of all the cells that were visited by the search and their relative distance.~ +- Inside source: true +*** True Line Result + # It shows a heat map of all the cells that were visited by the search and their relative distance. +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ # The second grid is an implementation of Dijkstra's algorithm.~ +- Inside source: true +*** True Line Result + # The second grid is an implementation of Dijkstra's algorithm. +** Processing line: ~ # Light green cells have 5 times the movement cost of regular cells.~ +- Inside source: true +*** True Line Result + # Light green cells have 5 times the movement cost of regular cells. +** Processing line: ~ # The heat map will darken based on movement cost.~ +- Inside source: true +*** True Line Result + # The heat map will darken based on movement cost. +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ # Dark green cells are walls, and the search cannot go through them.~ +- Inside source: true +*** True Line Result + # Dark green cells are walls, and the search cannot go through them. +** Processing line: ~ class Movement_Costs~ +- Inside source: true +*** True Line Result + class Movement_Costs ** Processing line: ~ attr_gtk~ - Inside source: true *** True Line Result @@ -65292,26 +73179,6 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result defaults -** Processing line: ~ # If the grid has not been searched~ -- Inside source: true -*** True Line Result - # If the grid has not been searched -** Processing line: ~ if search.came_from.empty?~ -- Inside source: true -*** True Line Result - if search.came_from.empty? -** Processing line: ~ calc~ -- Inside source: true -*** True Line Result - calc -** Processing line: ~ # Calc Path~ -- Inside source: true -*** True Line Result - # Calc Path -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end ** Processing line: ~ render~ - Inside source: true *** True Line Result @@ -65320,6 +73187,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result input +** Processing line: ~ calc~ +- Inside source: true +*** True Line Result + calc ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -65340,18 +73211,18 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result # Freely customizable to user's liking -** Processing line: ~ grid.width ||= 30~ +** Processing line: ~ grid.width ||= 10~ - Inside source: true *** True Line Result - grid.width ||= 30 -** Processing line: ~ grid.height ||= 15~ + grid.width ||= 10 +** Processing line: ~ grid.height ||= 10~ - Inside source: true *** True Line Result - grid.height ||= 15 -** Processing line: ~ grid.cell_size ||= 40~ + grid.height ||= 10 +** Processing line: ~ grid.cell_size ||= 60~ - Inside source: true *** True Line Result - grid.cell_size ||= 40 + grid.cell_size ||= 60 ** Processing line: ~ grid.rect ||= [0, 0, grid.width, grid.height]~ - Inside source: true *** True Line Result @@ -65372,538 +73243,234 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result # Walls are stored in a hash for quick look up when doing the search -** Processing line: ~ grid.star ||= [2, 8]~ -- Inside source: true -*** True Line Result - grid.star ||= [2, 8] -** Processing line: ~ grid.target ||= [10, 5]~ -- Inside source: true -*** True Line Result - grid.target ||= [10, 5] -** Processing line: ~ grid.walls ||= {~ -- Inside source: true -*** True Line Result - grid.walls ||= { -** Processing line: ~ [3, 3] => true,~ +** Processing line: ~ state.star ||= [1, 5]~ - Inside source: true *** True Line Result - [3, 3] => true, -** Processing line: ~ [3, 4] => true,~ + state.star ||= [1, 5] +** Processing line: ~ state.target ||= [8, 4]~ - Inside source: true *** True Line Result - [3, 4] => true, -** Processing line: ~ [3, 5] => true,~ + state.target ||= [8, 4] +** Processing line: ~ state.walls ||= {[1, 1] => true, [2, 1] => true, [3, 1] => true, [1, 2] => true, [2, 2] => true, [3, 2] => true}~ - Inside source: true *** True Line Result - [3, 5] => true, -** Processing line: ~ [3, 6] => true,~ + state.walls ||= {[1, 1] => true, [2, 1] => true, [3, 1] => true, [1, 2] => true, [2, 2] => true, [3, 2] => true} +** Processing line: ~ state.hills ||= {~ - Inside source: true *** True Line Result - [3, 6] => true, -** Processing line: ~ [3, 7] => true,~ + state.hills ||= { +** Processing line: ~ [4, 1] => true,~ - Inside source: true *** True Line Result - [3, 7] => true, -** Processing line: ~ [3, 8] => true,~ + [4, 1] => true, +** Processing line: ~ [5, 1] => true,~ - Inside source: true *** True Line Result - [3, 8] => true, -** Processing line: ~ [3, 9] => true,~ + [5, 1] => true, +** Processing line: ~ [4, 2] => true,~ - Inside source: true *** True Line Result - [3, 9] => true, -** Processing line: ~ [3, 10] => true,~ + [4, 2] => true, +** Processing line: ~ [5, 2] => true,~ - Inside source: true *** True Line Result - [3, 10] => true, -** Processing line: ~ [3, 11] => true,~ + [5, 2] => true, +** Processing line: ~ [6, 2] => true,~ - Inside source: true *** True Line Result - [3, 11] => true, + [6, 2] => true, ** Processing line: ~ [4, 3] => true,~ - Inside source: true *** True Line Result [4, 3] => true, -** Processing line: ~ [4, 4] => true,~ -- Inside source: true -*** True Line Result - [4, 4] => true, -** Processing line: ~ [4, 5] => true,~ -- Inside source: true -*** True Line Result - [4, 5] => true, -** Processing line: ~ [4, 6] => true,~ -- Inside source: true -*** True Line Result - [4, 6] => true, -** Processing line: ~ [4, 7] => true,~ -- Inside source: true -*** True Line Result - [4, 7] => true, -** Processing line: ~ [4, 8] => true,~ -- Inside source: true -*** True Line Result - [4, 8] => true, -** Processing line: ~ [4, 9] => true,~ -- Inside source: true -*** True Line Result - [4, 9] => true, -** Processing line: ~ [4, 10] => true,~ -- Inside source: true -*** True Line Result - [4, 10] => true, -** Processing line: ~ [4, 11] => true,~ -- Inside source: true -*** True Line Result - [4, 11] => true, -** Processing line: ~ [13, 0] => true,~ -- Inside source: true -*** True Line Result - [13, 0] => true, -** Processing line: ~ [13, 1] => true,~ -- Inside source: true -*** True Line Result - [13, 1] => true, -** Processing line: ~ [13, 2] => true,~ -- Inside source: true -*** True Line Result - [13, 2] => true, -** Processing line: ~ [13, 3] => true,~ -- Inside source: true -*** True Line Result - [13, 3] => true, -** Processing line: ~ [13, 4] => true,~ -- Inside source: true -*** True Line Result - [13, 4] => true, -** Processing line: ~ [13, 5] => true,~ -- Inside source: true -*** True Line Result - [13, 5] => true, -** Processing line: ~ [13, 6] => true,~ -- Inside source: true -*** True Line Result - [13, 6] => true, -** Processing line: ~ [13, 7] => true,~ -- Inside source: true -*** True Line Result - [13, 7] => true, -** Processing line: ~ [13, 8] => true,~ -- Inside source: true -*** True Line Result - [13, 8] => true, -** Processing line: ~ [13, 9] => true,~ -- Inside source: true -*** True Line Result - [13, 9] => true, -** Processing line: ~ [13, 10] => true,~ -- Inside source: true -*** True Line Result - [13, 10] => true, -** Processing line: ~ [14, 0] => true,~ -- Inside source: true -*** True Line Result - [14, 0] => true, -** Processing line: ~ [14, 1] => true,~ -- Inside source: true -*** True Line Result - [14, 1] => true, -** Processing line: ~ [14, 2] => true,~ -- Inside source: true -*** True Line Result - [14, 2] => true, -** Processing line: ~ [14, 3] => true,~ -- Inside source: true -*** True Line Result - [14, 3] => true, -** Processing line: ~ [14, 4] => true,~ -- Inside source: true -*** True Line Result - [14, 4] => true, -** Processing line: ~ [14, 5] => true,~ -- Inside source: true -*** True Line Result - [14, 5] => true, -** Processing line: ~ [14, 6] => true,~ -- Inside source: true -*** True Line Result - [14, 6] => true, -** Processing line: ~ [14, 7] => true,~ -- Inside source: true -*** True Line Result - [14, 7] => true, -** Processing line: ~ [14, 8] => true,~ -- Inside source: true -*** True Line Result - [14, 8] => true, -** Processing line: ~ [14, 9] => true,~ -- Inside source: true -*** True Line Result - [14, 9] => true, -** Processing line: ~ [14, 10] => true,~ -- Inside source: true -*** True Line Result - [14, 10] => true, -** Processing line: ~ [21, 8] => true,~ -- Inside source: true -*** True Line Result - [21, 8] => true, -** Processing line: ~ [21, 9] => true,~ -- Inside source: true -*** True Line Result - [21, 9] => true, -** Processing line: ~ [21, 10] => true,~ -- Inside source: true -*** True Line Result - [21, 10] => true, -** Processing line: ~ [21, 11] => true,~ -- Inside source: true -*** True Line Result - [21, 11] => true, -** Processing line: ~ [21, 12] => true,~ -- Inside source: true -*** True Line Result - [21, 12] => true, -** Processing line: ~ [21, 13] => true,~ -- Inside source: true -*** True Line Result - [21, 13] => true, -** Processing line: ~ [21, 14] => true,~ -- Inside source: true -*** True Line Result - [21, 14] => true, -** Processing line: ~ [22, 8] => true,~ -- Inside source: true -*** True Line Result - [22, 8] => true, -** Processing line: ~ [22, 9] => true,~ -- Inside source: true -*** True Line Result - [22, 9] => true, -** Processing line: ~ [22, 10] => true,~ -- Inside source: true -*** True Line Result - [22, 10] => true, -** Processing line: ~ [22, 11] => true,~ -- Inside source: true -*** True Line Result - [22, 11] => true, -** Processing line: ~ [22, 12] => true,~ -- Inside source: true -*** True Line Result - [22, 12] => true, -** Processing line: ~ [22, 13] => true,~ -- Inside source: true -*** True Line Result - [22, 13] => true, -** Processing line: ~ [22, 14] => true,~ -- Inside source: true -*** True Line Result - [22, 14] => true, -** Processing line: ~ [23, 8] => true,~ -- Inside source: true -*** True Line Result - [23, 8] => true, -** Processing line: ~ [23, 9] => true,~ -- Inside source: true -*** True Line Result - [23, 9] => true, -** Processing line: ~ [24, 8] => true,~ -- Inside source: true -*** True Line Result - [24, 8] => true, -** Processing line: ~ [24, 9] => true,~ -- Inside source: true -*** True Line Result - [24, 9] => true, -** Processing line: ~ [25, 8] => true,~ -- Inside source: true -*** True Line Result - [25, 8] => true, -** Processing line: ~ [25, 9] => true,~ -- Inside source: true -*** True Line Result - [25, 9] => true, -** Processing line: ~ }~ -- Inside source: true -*** True Line Result - } -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ # Variables that are used by the breadth first search~ -- Inside source: true -*** True Line Result - # Variables that are used by the breadth first search -** Processing line: ~ # Storing cells that the search has visited, prevents unnecessary steps~ -- Inside source: true -*** True Line Result - # Storing cells that the search has visited, prevents unnecessary steps -** Processing line: ~ # Expanding the frontier of the search in order makes the search expand~ -- Inside source: true -*** True Line Result - # Expanding the frontier of the search in order makes the search expand -** Processing line: ~ # from the center outward~ -- Inside source: true -*** True Line Result - # from the center outward -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ # The cells from which the search is to expand~ -- Inside source: true -*** True Line Result - # The cells from which the search is to expand -** Processing line: ~ search.frontier ||= []~ -- Inside source: true -*** True Line Result - search.frontier ||= [] -** Processing line: ~ # A hash of where each cell was expanded from~ -- Inside source: true -*** True Line Result - # A hash of where each cell was expanded from -** Processing line: ~ # The key is a cell, and the value is the cell it came from~ -- Inside source: true -*** True Line Result - # The key is a cell, and the value is the cell it came from -** Processing line: ~ search.came_from ||= {}~ -- Inside source: true -*** True Line Result - search.came_from ||= {} -** Processing line: ~ # Cells that are part of the path from the target to the star~ -- Inside source: true -*** True Line Result - # Cells that are part of the path from the target to the star -** Processing line: ~ search.path ||= {}~ -- Inside source: true -*** True Line Result - search.path ||= {} -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ # What the user is currently editing on the grid~ -- Inside source: true -*** True Line Result - # What the user is currently editing on the grid -** Processing line: ~ # We store this value, because we want to remember the value even when~ -- Inside source: true -*** True Line Result - # We store this value, because we want to remember the value even when -** Processing line: ~ # the user's cursor is no longer over what they're interacting with, but~ -- Inside source: true -*** True Line Result - # the user's cursor is no longer over what they're interacting with, but -** Processing line: ~ # they are still clicking down on the mouse.~ -- Inside source: true -*** True Line Result - # they are still clicking down on the mouse. -** Processing line: ~ state.current_input ||= :none~ -- Inside source: true -*** True Line Result - state.current_input ||= :none -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ def calc~ -- Inside source: true -*** True Line Result - def calc -** Processing line: ~ # Setup the search to start from the star~ +** Processing line: ~ [5, 3] => true,~ - Inside source: true *** True Line Result - # Setup the search to start from the star -** Processing line: ~ search.frontier << grid.star~ + [5, 3] => true, +** Processing line: ~ [6, 3] => true,~ - Inside source: true *** True Line Result - search.frontier << grid.star -** Processing line: ~ search.came_from[grid.star] = nil~ + [6, 3] => true, +** Processing line: ~ [3, 4] => true,~ - Inside source: true *** True Line Result - search.came_from[grid.star] = nil -** Processing line: ~~ + [3, 4] => true, +** Processing line: ~ [4, 4] => true,~ - Inside source: true *** True Line Result - -** Processing line: ~ # Until there are no more cells to expand from~ + [4, 4] => true, +** Processing line: ~ [5, 4] => true,~ - Inside source: true *** True Line Result - # Until there are no more cells to expand from -** Processing line: ~ until search.frontier.empty?~ + [5, 4] => true, +** Processing line: ~ [6, 4] => true,~ - Inside source: true *** True Line Result - until search.frontier.empty? -** Processing line: ~ # Takes the next frontier cell~ + [6, 4] => true, +** Processing line: ~ [7, 4] => true,~ - Inside source: true *** True Line Result - # Takes the next frontier cell -** Processing line: ~ new_frontier = search.frontier.shift~ + [7, 4] => true, +** Processing line: ~ [3, 5] => true,~ - Inside source: true *** True Line Result - new_frontier = search.frontier.shift -** Processing line: ~ # For each of its neighbors~ + [3, 5] => true, +** Processing line: ~ [4, 5] => true,~ - Inside source: true *** True Line Result - # For each of its neighbors -** Processing line: ~ adjacent_neighbors(new_frontier).each do |neighbor|~ + [4, 5] => true, +** Processing line: ~ [5, 5] => true,~ - Inside source: true *** True Line Result - adjacent_neighbors(new_frontier).each do |neighbor| -** Processing line: ~ # That have not been visited and are not walls~ + [5, 5] => true, +** Processing line: ~ [6, 5] => true,~ - Inside source: true *** True Line Result - # That have not been visited and are not walls -** Processing line: ~ unless search.came_from.has_key?(neighbor) || grid.walls.has_key?(neighbor)~ + [6, 5] => true, +** Processing line: ~ [7, 5] => true,~ - Inside source: true *** True Line Result - unless search.came_from.has_key?(neighbor) || grid.walls.has_key?(neighbor) -** Processing line: ~ # Add them to the frontier and mark them as visited in the first grid~ + [7, 5] => true, +** Processing line: ~ [4, 6] => true,~ - Inside source: true *** True Line Result - # Add them to the frontier and mark them as visited in the first grid -** Processing line: ~ # Unless the target has been visited~ + [4, 6] => true, +** Processing line: ~ [5, 6] => true,~ - Inside source: true *** True Line Result - # Unless the target has been visited -** Processing line: ~ # Add the neighbor to the frontier and remember which cell it came from~ + [5, 6] => true, +** Processing line: ~ [6, 6] => true,~ - Inside source: true *** True Line Result - # Add the neighbor to the frontier and remember which cell it came from -** Processing line: ~ search.frontier << neighbor~ + [6, 6] => true, +** Processing line: ~ [7, 6] => true,~ - Inside source: true *** True Line Result - search.frontier << neighbor -** Processing line: ~ search.came_from[neighbor] = new_frontier~ + [7, 6] => true, +** Processing line: ~ [4, 7] => true,~ - Inside source: true *** True Line Result - search.came_from[neighbor] = new_frontier -** Processing line: ~ end~ + [4, 7] => true, +** Processing line: ~ [5, 7] => true,~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + [5, 7] => true, +** Processing line: ~ [6, 7] => true,~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + [6, 7] => true, +** Processing line: ~ [4, 8] => true,~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + [4, 8] => true, +** Processing line: ~ [5, 8] => true,~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + [5, 8] => true, +** Processing line: ~ }~ - Inside source: true *** True Line Result - + } ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Draws everything onto the screen~ +** Processing line: ~ # What the user is currently editing on the grid~ - Inside source: true *** True Line Result - # Draws everything onto the screen -** Processing line: ~ def render~ + # What the user is currently editing on the grid +** Processing line: ~ # We store this value, because we want to remember the value even when~ - Inside source: true *** True Line Result - def render -** Processing line: ~ render_background~ + # We store this value, because we want to remember the value even when +** Processing line: ~ # the user's cursor is no longer over what they're interacting with, but~ - Inside source: true *** True Line Result - render_background -** Processing line: ~ # render_heat_map~ + # the user's cursor is no longer over what they're interacting with, but +** Processing line: ~ # they are still clicking down on the mouse.~ - Inside source: true *** True Line Result - # render_heat_map -** Processing line: ~ render_walls~ + # they are still clicking down on the mouse. +** Processing line: ~ state.user_input ||= :none~ - Inside source: true *** True Line Result - render_walls -** Processing line: ~ # render_path~ + state.user_input ||= :none +** Processing line: ~~ - Inside source: true *** True Line Result - # render_path -** Processing line: ~ # render_labels~ + +** Processing line: ~ # Values that are used for the breadth first search~ - Inside source: true *** True Line Result - # render_labels -** Processing line: ~ render_arrows~ + # Values that are used for the breadth first search +** Processing line: ~ # Keeping track of what cells were visited prevents counting cells multiple times~ - Inside source: true *** True Line Result - render_arrows -** Processing line: ~ render_star~ + # Keeping track of what cells were visited prevents counting cells multiple times +** Processing line: ~ breadth_first_search.visited ||= {}~ - Inside source: true *** True Line Result - render_star -** Processing line: ~ render_target~ + breadth_first_search.visited ||= {} +** Processing line: ~ # The cells from which the breadth first search will expand~ - Inside source: true *** True Line Result - render_target -** Processing line: ~ unless grid.walls.has_key?(grid.target)~ + # The cells from which the breadth first search will expand +** Processing line: ~ breadth_first_search.frontier ||= []~ - Inside source: true *** True Line Result - unless grid.walls.has_key?(grid.target) -** Processing line: ~ render_trail~ + breadth_first_search.frontier ||= [] +** Processing line: ~ # Keeps track of which cell all cells were searched from~ - Inside source: true *** True Line Result - render_trail -** Processing line: ~ end~ + # Keeps track of which cell all cells were searched from +** Processing line: ~ # Used to recreate the path from the target to the star~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + # Used to recreate the path from the target to the star +** Processing line: ~ breadth_first_search.came_from ||= {}~ - Inside source: true *** True Line Result - end + breadth_first_search.came_from ||= {} ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def render_trail(current_cell=grid.target)~ +** Processing line: ~ # Keeps track of the movement cost so far to be at a cell~ - Inside source: true *** True Line Result - def render_trail(current_cell=grid.target) -** Processing line: ~ return if current_cell == grid.star~ + # Keeps track of the movement cost so far to be at a cell +** Processing line: ~ # Allows the costs of new cells to be quickly calculated~ - Inside source: true *** True Line Result - return if current_cell == grid.star -** Processing line: ~ parent_cell = search.came_from[current_cell]~ + # Allows the costs of new cells to be quickly calculated +** Processing line: ~ # Also doubles as a way to check if cells have already been visited~ - Inside source: true *** True Line Result - parent_cell = search.came_from[current_cell] -** Processing line: ~ if current_cell && parent_cell~ + # Also doubles as a way to check if cells have already been visited +** Processing line: ~ dijkstra_search.cost_so_far ||= {}~ - Inside source: true *** True Line Result - if current_cell && parent_cell -** Processing line: ~ outputs.lines << [(current_cell.x + 0.5) * grid.cell_size, (current_cell.y + 0.5) * grid.cell_size,~ + dijkstra_search.cost_so_far ||= {} +** Processing line: ~ # The cells from which the Dijkstra search will expand~ - Inside source: true *** True Line Result - outputs.lines << [(current_cell.x + 0.5) * grid.cell_size, (current_cell.y + 0.5) * grid.cell_size, -** Processing line: ~ (parent_cell.x + 0.5) * grid.cell_size, (parent_cell.y + 0.5) * grid.cell_size, purple]~ + # The cells from which the Dijkstra search will expand +** Processing line: ~ dijkstra_search.frontier ||= []~ - Inside source: true *** True Line Result - (parent_cell.x + 0.5) * grid.cell_size, (parent_cell.y + 0.5) * grid.cell_size, purple] -** Processing line: ~~ + dijkstra_search.frontier ||= [] +** Processing line: ~ # Keeps track of which cell all cells were searched from~ - Inside source: true *** True Line Result - -** Processing line: ~ end~ + # Keeps track of which cell all cells were searched from +** Processing line: ~ # Used to recreate the path from the target to the star~ - Inside source: true *** True Line Result - end -** Processing line: ~ render_trail(parent_cell)~ + # Used to recreate the path from the target to the star +** Processing line: ~ dijkstra_search.came_from ||= {}~ - Inside source: true *** True Line Result - render_trail(parent_cell) + dijkstra_search.came_from ||= {} ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -65912,74 +73479,58 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def render_arrows~ -- Inside source: true -*** True Line Result - def render_arrows -** Processing line: ~ search.came_from.each do |child, parent|~ -- Inside source: true -*** True Line Result - search.came_from.each do |child, parent| -** Processing line: ~ if parent && child~ -- Inside source: true -*** True Line Result - if parent && child -** Processing line: ~ arrow_cell = [(child.x + parent.x) / 2, (child.y + parent.y) / 2]~ +** Processing line: ~ # Draws everything onto the screen~ - Inside source: true *** True Line Result - arrow_cell = [(child.x + parent.x) / 2, (child.y + parent.y) / 2] -** Processing line: ~ if parent.x > child.x # If the parent cell is to the right of the child cell~ + # Draws everything onto the screen +** Processing line: ~ def render~ - Inside source: true *** True Line Result - if parent.x > child.x # If the parent cell is to the right of the child cell -** Processing line: ~ outputs.sprites << [scale_up(arrow_cell), 'arrow.png', 0] # Point the arrow to the right~ + def render +** Processing line: ~ render_background~ - Inside source: true *** True Line Result - outputs.sprites << [scale_up(arrow_cell), 'arrow.png', 0] # Point the arrow to the right -** Processing line: ~ elsif parent.x < child.x # If the parent cell is to the right of the child cell~ + render_background +** Processing line: ~~ - Inside source: true *** True Line Result - elsif parent.x < child.x # If the parent cell is to the right of the child cell -** Processing line: ~ outputs.sprites << [scale_up(arrow_cell), 'arrow.png', 180] # Point the arrow to the right~ + +** Processing line: ~ render_heat_maps~ - Inside source: true *** True Line Result - outputs.sprites << [scale_up(arrow_cell), 'arrow.png', 180] # Point the arrow to the right -** Processing line: ~ elsif parent.y > child.y # If the parent cell is to the right of the child cell~ + render_heat_maps +** Processing line: ~~ - Inside source: true *** True Line Result - elsif parent.y > child.y # If the parent cell is to the right of the child cell -** Processing line: ~ outputs.sprites << [scale_up(arrow_cell), 'arrow.png', 90] # Point the arrow to the right~ + +** Processing line: ~ render_star~ - Inside source: true *** True Line Result - outputs.sprites << [scale_up(arrow_cell), 'arrow.png', 90] # Point the arrow to the right -** Processing line: ~ elsif parent.y < child.y # If the parent cell is to the right of the child cell~ + render_star +** Processing line: ~ render_target~ - Inside source: true *** True Line Result - elsif parent.y < child.y # If the parent cell is to the right of the child cell -** Processing line: ~ outputs.sprites << [scale_up(arrow_cell), 'arrow.png', 270] # Point the arrow to the right~ + render_target +** Processing line: ~ render_hills~ - Inside source: true *** True Line Result - outputs.sprites << [scale_up(arrow_cell), 'arrow.png', 270] # Point the arrow to the right -** Processing line: ~ end~ + render_hills +** Processing line: ~ render_walls~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + render_walls +** Processing line: ~~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + +** Processing line: ~ render_paths~ - Inside source: true *** True Line Result - end + render_paths ** Processing line: ~ end~ - Inside source: true *** True Line Result end -** Processing line: ~~ -- Inside source: true -*** True Line Result - ** Processing line: ~ # The methods below subdivide the task of drawing everything to the screen~ - Inside source: true *** True Line Result @@ -66004,6 +73555,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result render_grid_lines +** Processing line: ~ render_labels~ +- Inside source: true +*** True Line Result + render_labels ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -66012,10 +73567,14 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Draws both grids~ +** Processing line: ~ # Draws two rectangles the size of the grid in the default cell color~ - Inside source: true *** True Line Result - # Draws both grids + # Draws two rectangles the size of the grid in the default cell color +** Processing line: ~ # Used as part of the background~ +- Inside source: true +*** True Line Result + # Used as part of the background ** Processing line: ~ def render_unvisited~ - Inside source: true *** True Line Result @@ -66024,6 +73583,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result outputs.solids << [scale_up(grid.rect), unvisited_color] +** Processing line: ~ outputs.solids << [move_and_scale_up(grid.rect), unvisited_color]~ +- Inside source: true +*** True Line Result + outputs.solids << [move_and_scale_up(grid.rect), unvisited_color] ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -66048,6 +73611,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result outputs.lines << vertical_line(x) +** Processing line: ~ outputs.lines << shifted_vertical_line(x)~ +- Inside source: true +*** True Line Result + outputs.lines << shifted_vertical_line(x) ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -66064,6 +73631,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result outputs.lines << horizontal_line(y) +** Processing line: ~ outputs.lines << shifted_horizontal_line(y)~ +- Inside source: true +*** True Line Result + outputs.lines << shifted_horizontal_line(y) ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -66076,10 +73647,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Easy way to draw vertical lines given an index~ +** Processing line: ~ # Easy way to draw vertical lines given an index for the first grid~ - Inside source: true *** True Line Result - # Easy way to draw vertical lines given an index + # Easy way to draw vertical lines given an index for the first grid ** Processing line: ~ def vertical_line column~ - Inside source: true *** True Line Result @@ -66096,10 +73667,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Easy way to draw horizontal lines given an index~ +** Processing line: ~ # Easy way to draw horizontal lines given an index for the second grid~ - Inside source: true *** True Line Result - # Easy way to draw horizontal lines given an index + # Easy way to draw horizontal lines given an index for the second grid ** Processing line: ~ def horizontal_line row~ - Inside source: true *** True Line Result @@ -66116,46 +73687,18 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Draws the walls on both grids~ -- Inside source: true -*** True Line Result - # Draws the walls on both grids -** Processing line: ~ def render_walls~ -- Inside source: true -*** True Line Result - def render_walls -** Processing line: ~ grid.walls.each_key do |wall|~ -- Inside source: true -*** True Line Result - grid.walls.each_key do |wall| -** Processing line: ~ outputs.solids << [scale_up(wall), wall_color]~ -- Inside source: true -*** True Line Result - outputs.solids << [scale_up(wall), wall_color] -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ # Renders the star on both grids~ +** Processing line: ~ # Easy way to draw vertical lines given an index for the first grid~ - Inside source: true *** True Line Result - # Renders the star on both grids -** Processing line: ~ def render_star~ + # Easy way to draw vertical lines given an index for the first grid +** Processing line: ~ def shifted_vertical_line column~ - Inside source: true *** True Line Result - def render_star -** Processing line: ~ outputs.sprites << [scale_up(grid.star), 'star.png']~ + def shifted_vertical_line column +** Processing line: ~ scale_up([column + grid.width + 1, 0, column + grid.width + 1, grid.height])~ - Inside source: true *** True Line Result - outputs.sprites << [scale_up(grid.star), 'star.png'] + scale_up([column + grid.width + 1, 0, column + grid.width + 1, grid.height]) ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -66164,18 +73707,18 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Renders the target on both grids~ +** Processing line: ~ # Easy way to draw horizontal lines given an index for the second grid~ - Inside source: true *** True Line Result - # Renders the target on both grids -** Processing line: ~ def render_target~ + # Easy way to draw horizontal lines given an index for the second grid +** Processing line: ~ def shifted_horizontal_line row~ - Inside source: true *** True Line Result - def render_target -** Processing line: ~ outputs.sprites << [scale_up(grid.target), 'target.png']~ + def shifted_horizontal_line row +** Processing line: ~ scale_up([grid.width + 1, row, grid.width + grid.width + 1, row])~ - Inside source: true *** True Line Result - outputs.sprites << [scale_up(grid.target), 'target.png'] + scale_up([grid.width + 1, row, grid.width + grid.width + 1, row]) ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -66192,10 +73735,14 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result def render_labels -** Processing line: ~ outputs.labels << [200, 625, "Without early exit"]~ +** Processing line: ~ outputs.labels << [175, 650, "Number of steps", 3]~ - Inside source: true *** True Line Result - outputs.labels << [200, 625, "Without early exit"] + outputs.labels << [175, 650, "Number of steps", 3] +** Processing line: ~ outputs.labels << [925, 650, "Distance", 3]~ +- Inside source: true +*** True Line Result + outputs.labels << [925, 650, "Distance", 3] ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -66204,46 +73751,18 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Renders the path based off of the search.path hash~ -- Inside source: true -*** True Line Result - # Renders the path based off of the search.path hash -** Processing line: ~ def render_path~ -- Inside source: true -*** True Line Result - def render_path -** Processing line: ~ # If the star and target are disconnected there will only be one path~ -- Inside source: true -*** True Line Result - # If the star and target are disconnected there will only be one path -** Processing line: ~ # The path should not render in that case~ -- Inside source: true -*** True Line Result - # The path should not render in that case -** Processing line: ~ unless search.path.size == 1~ -- Inside source: true -*** True Line Result - unless search.path.size == 1 -** Processing line: ~ search.path.each_key do | cell |~ -- Inside source: true -*** True Line Result - search.path.each_key do | cell | -** Processing line: ~ # Renders path on both grids~ -- Inside source: true -*** True Line Result - # Renders path on both grids -** Processing line: ~ outputs.solids << [scale_up(cell), path_color]~ +** Processing line: ~ def render_paths~ - Inside source: true *** True Line Result - outputs.solids << [scale_up(cell), path_color] -** Processing line: ~ end~ + def render_paths +** Processing line: ~ render_breadth_first_search_path~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + render_breadth_first_search_path +** Processing line: ~ render_dijkstra_path~ - Inside source: true *** True Line Result - end + render_dijkstra_path ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -66252,42 +73771,18 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Calculates the path from the target to the star after the search is over~ -- Inside source: true -*** True Line Result - # Calculates the path from the target to the star after the search is over -** Processing line: ~ # Relies on the came_from hash~ -- Inside source: true -*** True Line Result - # Relies on the came_from hash -** Processing line: ~ # Fills the search.path hash, which is later rendered on screen~ -- Inside source: true -*** True Line Result - # Fills the search.path hash, which is later rendered on screen -** Processing line: ~ def calc_path~ -- Inside source: true -*** True Line Result - def calc_path -** Processing line: ~ endpoint = grid.target~ -- Inside source: true -*** True Line Result - endpoint = grid.target -** Processing line: ~ while endpoint~ -- Inside source: true -*** True Line Result - while endpoint -** Processing line: ~ search.path[endpoint] = true~ +** Processing line: ~ def render_heat_maps~ - Inside source: true *** True Line Result - search.path[endpoint] = true -** Processing line: ~ endpoint = search.came_from[endpoint]~ + def render_heat_maps +** Processing line: ~ render_breadth_first_search_heat_map~ - Inside source: true *** True Line Result - endpoint = search.came_from[endpoint] -** Processing line: ~ end~ + render_breadth_first_search_heat_map +** Processing line: ~ render_dijkstra_heat_map~ - Inside source: true *** True Line Result - end + render_dijkstra_heat_map ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -66296,194 +73791,186 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # In code, the cells are represented as 1x1 rectangles~ +** Processing line: ~ # Renders the breadth first search on the first grid~ - Inside source: true *** True Line Result - # In code, the cells are represented as 1x1 rectangles -** Processing line: ~ # When drawn, the cells are larger than 1x1 rectangles~ + # Renders the breadth first search on the first grid +** Processing line: ~ def render_breadth_first_search~ - Inside source: true *** True Line Result - # When drawn, the cells are larger than 1x1 rectangles -** Processing line: ~ # This method is used to scale up cells, and lines~ + def render_breadth_first_search +** Processing line: ~ end~ - Inside source: true *** True Line Result - # This method is used to scale up cells, and lines -** Processing line: ~ # Objects are scaled up according to the grid.cell_size variable~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - # Objects are scaled up according to the grid.cell_size variable -** Processing line: ~ # This allows for easy customization of the visual scale of the grid~ + +** Processing line: ~ # This heat map shows the cells explored by the breadth first search and how far they are from the star.~ - Inside source: true *** True Line Result - # This allows for easy customization of the visual scale of the grid -** Processing line: ~ def scale_up(cell)~ + # This heat map shows the cells explored by the breadth first search and how far they are from the star. +** Processing line: ~ def render_breadth_first_search_heat_map~ - Inside source: true *** True Line Result - def scale_up(cell) -** Processing line: ~ # Prevents the original value of cell from being edited~ + def render_breadth_first_search_heat_map +** Processing line: ~ # For each cell explored~ - Inside source: true *** True Line Result - # Prevents the original value of cell from being edited -** Processing line: ~ cell = cell.clone~ + # For each cell explored +** Processing line: ~ breadth_first_search.visited.each_key do | visited_cell |~ - Inside source: true *** True Line Result - cell = cell.clone -** Processing line: ~~ + breadth_first_search.visited.each_key do | visited_cell | +** Processing line: ~ # Find its distance from the star~ - Inside source: true *** True Line Result - -** Processing line: ~ # If cell is just an x and y coordinate~ + # Find its distance from the star +** Processing line: ~ distance = (state.star.x - visited_cell.x).abs + (state.star.y - visited_cell.y).abs~ - Inside source: true *** True Line Result - # If cell is just an x and y coordinate -** Processing line: ~ if cell.size == 2~ + distance = (state.star.x - visited_cell.x).abs + (state.star.y - visited_cell.y).abs +** Processing line: ~ max_distance = grid.width + grid.height~ - Inside source: true *** True Line Result - if cell.size == 2 -** Processing line: ~ # Add a width and height of 1~ + max_distance = grid.width + grid.height +** Processing line: ~ # Get it as a percent of the maximum distance and scale to 255 for use as an alpha value~ - Inside source: true *** True Line Result - # Add a width and height of 1 -** Processing line: ~ cell << 1~ + # Get it as a percent of the maximum distance and scale to 255 for use as an alpha value +** Processing line: ~ alpha = 255.to_i * distance.to_i / max_distance.to_i~ - Inside source: true *** True Line Result - cell << 1 -** Processing line: ~ cell << 1~ + alpha = 255.to_i * distance.to_i / max_distance.to_i +** Processing line: ~ outputs.solids << [scale_up(visited_cell), red, alpha]~ - Inside source: true *** True Line Result - cell << 1 + outputs.solids << [scale_up(visited_cell), red, alpha] ** Processing line: ~ end~ - Inside source: true *** True Line Result end -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ # Scale all the values up~ -- Inside source: true -*** True Line Result - # Scale all the values up -** Processing line: ~ cell.map! { |value| value * grid.cell_size }~ +** Processing line: ~ end~ - Inside source: true *** True Line Result - cell.map! { |value| value * grid.cell_size } + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Returns the scaled up cell~ -- Inside source: true -*** True Line Result - # Returns the scaled up cell -** Processing line: ~ cell~ +** Processing line: ~ def render_breadth_first_search_path~ - Inside source: true *** True Line Result - cell -** Processing line: ~ end~ + def render_breadth_first_search_path +** Processing line: ~ # If the search found the target~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + # If the search found the target +** Processing line: ~ if breadth_first_search.visited.has_key?(state.target)~ - Inside source: true *** True Line Result - -** Processing line: ~ # This method processes user input every tick~ + if breadth_first_search.visited.has_key?(state.target) +** Processing line: ~ # Start from the target~ - Inside source: true *** True Line Result - # This method processes user input every tick -** Processing line: ~ # Any method with "1" is related to the first grid~ + # Start from the target +** Processing line: ~ endpoint = state.target~ - Inside source: true *** True Line Result - # Any method with "1" is related to the first grid -** Processing line: ~ # Any method with "2" is related to the second grid~ + endpoint = state.target +** Processing line: ~ # And the cell it came from~ - Inside source: true *** True Line Result - # Any method with "2" is related to the second grid -** Processing line: ~ def input~ + # And the cell it came from +** Processing line: ~ next_endpoint = breadth_first_search.came_from[endpoint]~ - Inside source: true *** True Line Result - def input -** Processing line: ~ # The program has to remember that the user is dragging an object~ + next_endpoint = breadth_first_search.came_from[endpoint] +** Processing line: ~ while endpoint and next_endpoint~ - Inside source: true *** True Line Result - # The program has to remember that the user is dragging an object -** Processing line: ~ # even when the mouse is no longer over that object~ + while endpoint and next_endpoint +** Processing line: ~ # Draw a path between these two cells~ - Inside source: true *** True Line Result - # even when the mouse is no longer over that object -** Processing line: ~ # So detecting input and processing input is separate~ + # Draw a path between these two cells +** Processing line: ~ path = get_path_between(endpoint, next_endpoint)~ - Inside source: true *** True Line Result - # So detecting input and processing input is separate -** Processing line: ~ # detect_input~ + path = get_path_between(endpoint, next_endpoint) +** Processing line: ~ outputs.solids << [scale_up(path), path_color]~ - Inside source: true *** True Line Result - # detect_input -** Processing line: ~ # process_input~ + outputs.solids << [scale_up(path), path_color] +** Processing line: ~ # And get the next pair of cells~ - Inside source: true *** True Line Result - # process_input -** Processing line: ~ if inputs.mouse.up~ + # And get the next pair of cells +** Processing line: ~ endpoint = next_endpoint~ - Inside source: true *** True Line Result - if inputs.mouse.up -** Processing line: ~ state.current_input = :none~ + endpoint = next_endpoint +** Processing line: ~ next_endpoint = breadth_first_search.came_from[endpoint]~ - Inside source: true *** True Line Result - state.current_input = :none -** Processing line: ~ elsif star_clicked?~ + next_endpoint = breadth_first_search.came_from[endpoint] +** Processing line: ~ # Continue till there are no more cells~ - Inside source: true *** True Line Result - elsif star_clicked? -** Processing line: ~ state.current_input = :star~ + # Continue till there are no more cells +** Processing line: ~ end~ - Inside source: true *** True Line Result - state.current_input = :star + end ** Processing line: ~ end~ - Inside source: true *** True Line Result end +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ if mouse_inside_grid?~ +** Processing line: ~ # Renders the Dijkstra search on the second grid~ - Inside source: true *** True Line Result - if mouse_inside_grid? -** Processing line: ~ unless grid.target == cell_closest_to_mouse~ + # Renders the Dijkstra search on the second grid +** Processing line: ~ def render_dijkstra~ - Inside source: true *** True Line Result - unless grid.target == cell_closest_to_mouse -** Processing line: ~ grid.target = cell_closest_to_mouse~ + def render_dijkstra +** Processing line: ~ end~ - Inside source: true *** True Line Result - grid.target = cell_closest_to_mouse -** Processing line: ~ end~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - end -** Processing line: ~ if state.current_input == :star~ + +** Processing line: ~ def render_dijkstra_heat_map~ - Inside source: true *** True Line Result - if state.current_input == :star -** Processing line: ~ unless grid.star == cell_closest_to_mouse~ + def render_dijkstra_heat_map +** Processing line: ~ dijkstra_search.cost_so_far.each do |visited_cell, cost|~ - Inside source: true *** True Line Result - unless grid.star == cell_closest_to_mouse -** Processing line: ~ grid.star = cell_closest_to_mouse~ + dijkstra_search.cost_so_far.each do |visited_cell, cost| +** Processing line: ~ max_cost = (grid.width + grid.height) #* 5~ - Inside source: true *** True Line Result - grid.star = cell_closest_to_mouse -** Processing line: ~ end~ + max_cost = (grid.width + grid.height) #* 5 +** Processing line: ~ alpha = 255.to_i * cost.to_i / max_cost.to_i~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + alpha = 255.to_i * cost.to_i / max_cost.to_i +** Processing line: ~ outputs.solids << [move_and_scale_up(visited_cell), red, alpha]~ - Inside source: true *** True Line Result - end + outputs.solids << [move_and_scale_up(visited_cell), red, alpha] ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -66496,82 +73983,74 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Determines what the user is editing and stores the value~ -- Inside source: true -*** True Line Result - # Determines what the user is editing and stores the value -** Processing line: ~ # Storing the value allows the user to continue the same edit as long as the~ -- Inside source: true -*** True Line Result - # Storing the value allows the user to continue the same edit as long as the -** Processing line: ~ # mouse left click is held~ +** Processing line: ~ def render_dijkstra_path~ - Inside source: true *** True Line Result - # mouse left click is held -** Processing line: ~ def detect_input~ + def render_dijkstra_path +** Processing line: ~ # If the search found the target~ - Inside source: true *** True Line Result - def detect_input -** Processing line: ~ # When the mouse is up, nothing is being edited~ + # If the search found the target +** Processing line: ~ if dijkstra_search.came_from.has_key?(state.target)~ - Inside source: true *** True Line Result - # When the mouse is up, nothing is being edited -** Processing line: ~ if inputs.mouse.up~ + if dijkstra_search.came_from.has_key?(state.target) +** Processing line: ~ # Get the target and the cell it came from~ - Inside source: true *** True Line Result - if inputs.mouse.up -** Processing line: ~ state.current_input = :none~ + # Get the target and the cell it came from +** Processing line: ~ endpoint = state.target~ - Inside source: true *** True Line Result - state.current_input = :none -** Processing line: ~ # When the star in the no second grid is clicked~ + endpoint = state.target +** Processing line: ~ next_endpoint = dijkstra_search.came_from[endpoint]~ - Inside source: true *** True Line Result - # When the star in the no second grid is clicked -** Processing line: ~ elsif star_clicked?~ + next_endpoint = dijkstra_search.came_from[endpoint] +** Processing line: ~ while endpoint and next_endpoint~ - Inside source: true *** True Line Result - elsif star_clicked? -** Processing line: ~ state.current_input = :star~ + while endpoint and next_endpoint +** Processing line: ~ # Draw a path between them~ - Inside source: true *** True Line Result - state.current_input = :star -** Processing line: ~ # When the target in the no second grid is clicked~ + # Draw a path between them +** Processing line: ~ path = get_path_between(endpoint, next_endpoint)~ - Inside source: true *** True Line Result - # When the target in the no second grid is clicked -** Processing line: ~ elsif target_clicked?~ + path = get_path_between(endpoint, next_endpoint) +** Processing line: ~ outputs.solids << [move_and_scale_up(path), path_color]~ - Inside source: true *** True Line Result - elsif target_clicked? -** Processing line: ~ state.current_input = :target~ + outputs.solids << [move_and_scale_up(path), path_color] +** Processing line: ~~ - Inside source: true *** True Line Result - state.current_input = :target -** Processing line: ~ # When a wall in the first grid is clicked~ + +** Processing line: ~ # Shift one cell down the path~ - Inside source: true *** True Line Result - # When a wall in the first grid is clicked -** Processing line: ~ elsif wall_clicked?~ + # Shift one cell down the path +** Processing line: ~ endpoint = next_endpoint~ - Inside source: true *** True Line Result - elsif wall_clicked? -** Processing line: ~ state.current_input = :remove_wall~ + endpoint = next_endpoint +** Processing line: ~ next_endpoint = dijkstra_search.came_from[endpoint]~ - Inside source: true *** True Line Result - state.current_input = :remove_wall -** Processing line: ~ # When the first grid is clicked~ + next_endpoint = dijkstra_search.came_from[endpoint] +** Processing line: ~~ - Inside source: true *** True Line Result - # When the first grid is clicked -** Processing line: ~ elsif grid_clicked?~ + +** Processing line: ~ # Repeat till the end of the path~ - Inside source: true *** True Line Result - elsif grid_clicked? -** Processing line: ~ state.current_input = :add_wall~ + # Repeat till the end of the path +** Processing line: ~ end~ - Inside source: true *** True Line Result - state.current_input = :add_wall + end ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -66584,50 +74063,46 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Processes click and drag based on what the user is currently dragging~ -- Inside source: true -*** True Line Result - # Processes click and drag based on what the user is currently dragging -** Processing line: ~ def process_input~ +** Processing line: ~ # Renders the star on both grids~ - Inside source: true *** True Line Result - def process_input -** Processing line: ~ if state.current_input == :star~ + # Renders the star on both grids +** Processing line: ~ def render_star~ - Inside source: true *** True Line Result - if state.current_input == :star -** Processing line: ~ input_star~ + def render_star +** Processing line: ~ outputs.sprites << [scale_up(state.star), 'star.png']~ - Inside source: true *** True Line Result - input_star -** Processing line: ~ elsif state.current_input == :target~ + outputs.sprites << [scale_up(state.star), 'star.png'] +** Processing line: ~ outputs.sprites << [move_and_scale_up(state.star), 'star.png']~ - Inside source: true *** True Line Result - elsif state.current_input == :target -** Processing line: ~ input_target~ + outputs.sprites << [move_and_scale_up(state.star), 'star.png'] +** Processing line: ~ end~ - Inside source: true *** True Line Result - input_target -** Processing line: ~ elsif state.current_input == :remove_wall~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - elsif state.current_input == :remove_wall -** Processing line: ~ input_remove_wall~ + +** Processing line: ~ # Renders the target on both grids~ - Inside source: true *** True Line Result - input_remove_wall -** Processing line: ~ elsif state.current_input == :add_wall~ + # Renders the target on both grids +** Processing line: ~ def render_target~ - Inside source: true *** True Line Result - elsif state.current_input == :add_wall -** Processing line: ~ input_add_wall~ + def render_target +** Processing line: ~ outputs.sprites << [scale_up(state.target), 'target.png']~ - Inside source: true *** True Line Result - input_add_wall -** Processing line: ~ end~ + outputs.sprites << [scale_up(state.target), 'target.png'] +** Processing line: ~ outputs.sprites << [move_and_scale_up(state.target), 'target.png']~ - Inside source: true *** True Line Result - end + outputs.sprites << [move_and_scale_up(state.target), 'target.png'] ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -66636,38 +74111,22 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Moves the star to the cell closest to the mouse in the first grid~ -- Inside source: true -*** True Line Result - # Moves the star to the cell closest to the mouse in the first grid -** Processing line: ~ # Only resets the search if the star changes position~ -- Inside source: true -*** True Line Result - # Only resets the search if the star changes position -** Processing line: ~ # Called whenever the user is editing the star (puts mouse down on star)~ -- Inside source: true -*** True Line Result - # Called whenever the user is editing the star (puts mouse down on star) -** Processing line: ~ def input_star~ -- Inside source: true -*** True Line Result - def input_star -** Processing line: ~ old_star = grid.star.clone~ +** Processing line: ~ def render_hills~ - Inside source: true *** True Line Result - old_star = grid.star.clone -** Processing line: ~ grid.star = cell_closest_to_mouse~ + def render_hills +** Processing line: ~ state.hills.each_key do |hill|~ - Inside source: true *** True Line Result - grid.star = cell_closest_to_mouse -** Processing line: ~ unless old_star == grid.star~ + state.hills.each_key do |hill| +** Processing line: ~ outputs.solids << [scale_up(hill), hill_color]~ - Inside source: true *** True Line Result - unless old_star == grid.star -** Processing line: ~ reset_search~ + outputs.solids << [scale_up(hill), hill_color] +** Processing line: ~ outputs.solids << [move_and_scale_up(hill), hill_color]~ - Inside source: true *** True Line Result - reset_search + outputs.solids << [move_and_scale_up(hill), hill_color] ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -66680,38 +74139,26 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Moves the target to the grid closest to the mouse in the first grid~ -- Inside source: true -*** True Line Result - # Moves the target to the grid closest to the mouse in the first grid -** Processing line: ~ # Only reset_searchs the search if the target changes position~ -- Inside source: true -*** True Line Result - # Only reset_searchs the search if the target changes position -** Processing line: ~ # Called whenever the user is editing the target (puts mouse down on target)~ -- Inside source: true -*** True Line Result - # Called whenever the user is editing the target (puts mouse down on target) -** Processing line: ~ def input_target~ +** Processing line: ~ # Draws the walls on both grids~ - Inside source: true *** True Line Result - def input_target -** Processing line: ~ old_target = grid.target.clone~ + # Draws the walls on both grids +** Processing line: ~ def render_walls~ - Inside source: true *** True Line Result - old_target = grid.target.clone -** Processing line: ~ grid.target = cell_closest_to_mouse~ + def render_walls +** Processing line: ~ state.walls.each_key do |wall|~ - Inside source: true *** True Line Result - grid.target = cell_closest_to_mouse -** Processing line: ~ unless old_target == grid.target~ + state.walls.each_key do |wall| +** Processing line: ~ outputs.solids << [scale_up(wall), wall_color]~ - Inside source: true *** True Line Result - unless old_target == grid.target -** Processing line: ~ reset_search~ + outputs.solids << [scale_up(wall), wall_color] +** Processing line: ~ outputs.solids << [move_and_scale_up(wall), wall_color]~ - Inside source: true *** True Line Result - reset_search + outputs.solids << [move_and_scale_up(wall), wall_color] ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -66724,82 +74171,58 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Removes walls in the first grid that are under the cursor~ -- Inside source: true -*** True Line Result - # Removes walls in the first grid that are under the cursor -** Processing line: ~ def input_remove_wall~ -- Inside source: true -*** True Line Result - def input_remove_wall -** Processing line: ~ # The mouse needs to be inside the grid, because we only want to remove walls~ +** Processing line: ~ def get_path_between(cell_one, cell_two)~ - Inside source: true *** True Line Result - # The mouse needs to be inside the grid, because we only want to remove walls -** Processing line: ~ # the cursor is directly over~ + def get_path_between(cell_one, cell_two) +** Processing line: ~ path = nil~ - Inside source: true *** True Line Result - # the cursor is directly over -** Processing line: ~ # Recalculations should only occur when a wall is actually deleted~ + path = nil +** Processing line: ~ if cell_one.x == cell_two.x~ - Inside source: true *** True Line Result - # Recalculations should only occur when a wall is actually deleted -** Processing line: ~ if mouse_inside_grid?~ + if cell_one.x == cell_two.x +** Processing line: ~ if cell_one.y < cell_two.y~ - Inside source: true *** True Line Result - if mouse_inside_grid? -** Processing line: ~ if grid.walls.has_key?(cell_closest_to_mouse)~ + if cell_one.y < cell_two.y +** Processing line: ~ path = [cell_one.x + 0.3, cell_one.y + 0.3, 0.4, 1.4]~ - Inside source: true *** True Line Result - if grid.walls.has_key?(cell_closest_to_mouse) -** Processing line: ~ grid.walls.delete(cell_closest_to_mouse)~ + path = [cell_one.x + 0.3, cell_one.y + 0.3, 0.4, 1.4] +** Processing line: ~ else~ - Inside source: true *** True Line Result - grid.walls.delete(cell_closest_to_mouse) -** Processing line: ~ reset_search~ + else +** Processing line: ~ path = [cell_two.x + 0.3, cell_two.y + 0.3, 0.4, 1.4]~ - Inside source: true *** True Line Result - reset_search + path = [cell_two.x + 0.3, cell_two.y + 0.3, 0.4, 1.4] ** Processing line: ~ end~ - Inside source: true *** True Line Result end -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ # Adds a wall in the first grid in the cell the mouse is over~ -- Inside source: true -*** True Line Result - # Adds a wall in the first grid in the cell the mouse is over -** Processing line: ~ def input_add_wall~ +** Processing line: ~ else~ - Inside source: true *** True Line Result - def input_add_wall -** Processing line: ~ if mouse_inside_grid?~ + else +** Processing line: ~ if cell_one.x < cell_two.x~ - Inside source: true *** True Line Result - if mouse_inside_grid? -** Processing line: ~ unless grid.walls.has_key?(cell_closest_to_mouse)~ + if cell_one.x < cell_two.x +** Processing line: ~ path = [cell_one.x + 0.3, cell_one.y + 0.3, 1.4, 0.4]~ - Inside source: true *** True Line Result - unless grid.walls.has_key?(cell_closest_to_mouse) -** Processing line: ~ grid.walls[cell_closest_to_mouse] = true~ + path = [cell_one.x + 0.3, cell_one.y + 0.3, 1.4, 0.4] +** Processing line: ~ else~ - Inside source: true *** True Line Result - grid.walls[cell_closest_to_mouse] = true -** Processing line: ~ reset_search~ + else +** Processing line: ~ path = [cell_two.x + 0.3, cell_two.y + 0.3, 1.4, 0.4]~ - Inside source: true *** True Line Result - reset_search + path = [cell_two.x + 0.3, cell_two.y + 0.3, 1.4, 0.4] ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -66808,134 +74231,98 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result end -** Processing line: ~ end~ +** Processing line: ~ path~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + path +** Processing line: ~ end~ - Inside source: true *** True Line Result - + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Whenever the user edits the grid,~ -- Inside source: true -*** True Line Result - # Whenever the user edits the grid, -** Processing line: ~ # The search has to be reset_searchd upto the current step~ -- Inside source: true -*** True Line Result - # The search has to be reset_searchd upto the current step -** Processing line: ~ # with the current grid as the initial state of the grid~ -- Inside source: true -*** True Line Result - # with the current grid as the initial state of the grid -** Processing line: ~ def reset_search~ -- Inside source: true -*** True Line Result - def reset_search -** Processing line: ~ # Reset_Searchs the search~ +** Processing line: ~ # Representation of how far away visited cells are from the star~ - Inside source: true *** True Line Result - # Reset_Searchs the search -** Processing line: ~ search.frontier = []~ + # Representation of how far away visited cells are from the star +** Processing line: ~ # Replaces the render_visited method~ - Inside source: true *** True Line Result - search.frontier = [] -** Processing line: ~ search.came_from = {}~ + # Replaces the render_visited method +** Processing line: ~ # Visually demonstrates the effectiveness of early exit for pathfinding~ - Inside source: true *** True Line Result - search.came_from = {} -** Processing line: ~ search.path = {}~ + # Visually demonstrates the effectiveness of early exit for pathfinding +** Processing line: ~ def render_breadth_first_search_heat_map~ - Inside source: true *** True Line Result - search.path = {} -** Processing line: ~ end~ + def render_breadth_first_search_heat_map +** Processing line: ~ breadth_first_search.visited.each_key do | visited_cell |~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + breadth_first_search.visited.each_key do | visited_cell | +** Processing line: ~ distance = (state.star.x - visited_cell.x).abs + (state.star.y - visited_cell.y).abs~ - Inside source: true *** True Line Result - -** Processing line: ~~ + distance = (state.star.x - visited_cell.x).abs + (state.star.y - visited_cell.y).abs +** Processing line: ~ max_distance = grid.width + grid.height~ - Inside source: true *** True Line Result - -** Processing line: ~ # Returns a list of adjacent cells~ + max_distance = grid.width + grid.height +** Processing line: ~ alpha = 255.to_i * distance.to_i / max_distance.to_i~ - Inside source: true *** True Line Result - # Returns a list of adjacent cells -** Processing line: ~ # Used to determine what the next cells to be added to the frontier are~ + alpha = 255.to_i * distance.to_i / max_distance.to_i +** Processing line: ~ outputs.solids << [scale_up(visited_cell), red, alpha]~ - Inside source: true *** True Line Result - # Used to determine what the next cells to be added to the frontier are -** Processing line: ~ def adjacent_neighbors(cell)~ + outputs.solids << [scale_up(visited_cell), red, alpha] +** Processing line: ~ end~ - Inside source: true *** True Line Result - def adjacent_neighbors(cell) -** Processing line: ~ neighbors = []~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - neighbors = [] + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Gets all the valid neighbors into the array~ -- Inside source: true -*** True Line Result - # Gets all the valid neighbors into the array -** Processing line: ~ # From southern neighbor, clockwise~ -- Inside source: true -*** True Line Result - # From southern neighbor, clockwise -** Processing line: ~ neighbors << [cell.x, cell.y - 1] unless cell.y == 0~ -- Inside source: true -*** True Line Result - neighbors << [cell.x, cell.y - 1] unless cell.y == 0 -** Processing line: ~ neighbors << [cell.x - 1, cell.y] unless cell.x == 0~ -- Inside source: true -*** True Line Result - neighbors << [cell.x - 1, cell.y] unless cell.x == 0 -** Processing line: ~ neighbors << [cell.x, cell.y + 1] unless cell.y == grid.height - 1~ -- Inside source: true -*** True Line Result - neighbors << [cell.x, cell.y + 1] unless cell.y == grid.height - 1 -** Processing line: ~ neighbors << [cell.x + 1, cell.y] unless cell.x == grid.width - 1~ +** Processing line: ~ # Translates the given cell grid.width + 1 to the right and then scales up~ - Inside source: true *** True Line Result - neighbors << [cell.x + 1, cell.y] unless cell.x == grid.width - 1 -** Processing line: ~~ + # Translates the given cell grid.width + 1 to the right and then scales up +** Processing line: ~ # Used to draw cells for the second grid~ - Inside source: true *** True Line Result - -** Processing line: ~ # Sorts the neighbors so the rendered path is a zigzag path~ + # Used to draw cells for the second grid +** Processing line: ~ # This method does not work for lines,~ - Inside source: true *** True Line Result - # Sorts the neighbors so the rendered path is a zigzag path -** Processing line: ~ # Cells in a diagonal direction are given priority~ + # This method does not work for lines, +** Processing line: ~ # so separate methods exist for the grid lines~ - Inside source: true *** True Line Result - # Cells in a diagonal direction are given priority -** Processing line: ~ # Comment this line to see the difference~ + # so separate methods exist for the grid lines +** Processing line: ~ def move_and_scale_up(cell)~ - Inside source: true *** True Line Result - # Comment this line to see the difference -** Processing line: ~ neighbors = neighbors.sort_by { |neighbor_x, neighbor_y| proximity_to_star(neighbor_x, neighbor_y) }~ + def move_and_scale_up(cell) +** Processing line: ~ cell_clone = cell.clone~ - Inside source: true *** True Line Result - neighbors = neighbors.sort_by { |neighbor_x, neighbor_y| proximity_to_star(neighbor_x, neighbor_y) } -** Processing line: ~~ + cell_clone = cell.clone +** Processing line: ~ cell_clone.x += grid.width + 1~ - Inside source: true *** True Line Result - -** Processing line: ~ neighbors~ + cell_clone.x += grid.width + 1 +** Processing line: ~ scale_up(cell_clone)~ - Inside source: true *** True Line Result - neighbors + scale_up(cell_clone) ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -66944,122 +74331,90 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Finds the vertical and horizontal distance of a cell from the star~ -- Inside source: true -*** True Line Result - # Finds the vertical and horizontal distance of a cell from the star -** Processing line: ~ # and returns the larger value~ -- Inside source: true -*** True Line Result - # and returns the larger value -** Processing line: ~ # This method is used to have a zigzag pattern in the rendered path~ -- Inside source: true -*** True Line Result - # This method is used to have a zigzag pattern in the rendered path -** Processing line: ~ # A cell that is [5, 5] from the star,~ -- Inside source: true -*** True Line Result - # A cell that is [5, 5] from the star, -** Processing line: ~ # is explored before over a cell that is [0, 7] away.~ -- Inside source: true -*** True Line Result - # is explored before over a cell that is [0, 7] away. -** Processing line: ~ # So, if possible, the search tries to go diagonal (zigzag) first~ -- Inside source: true -*** True Line Result - # So, if possible, the search tries to go diagonal (zigzag) first -** Processing line: ~ def proximity_to_star(x, y)~ -- Inside source: true -*** True Line Result - def proximity_to_star(x, y) -** Processing line: ~ distance_x = (grid.star.x - x).abs~ -- Inside source: true -*** True Line Result - distance_x = (grid.star.x - x).abs -** Processing line: ~ distance_y = (grid.star.y - y).abs~ +** Processing line: ~ # In code, the cells are represented as 1x1 rectangles~ - Inside source: true *** True Line Result - distance_y = (grid.star.y - y).abs -** Processing line: ~~ + # In code, the cells are represented as 1x1 rectangles +** Processing line: ~ # When drawn, the cells are larger than 1x1 rectangles~ - Inside source: true *** True Line Result - -** Processing line: ~ if distance_x > distance_y~ + # When drawn, the cells are larger than 1x1 rectangles +** Processing line: ~ # This method is used to scale up cells, and lines~ - Inside source: true *** True Line Result - if distance_x > distance_y -** Processing line: ~ return distance_x~ + # This method is used to scale up cells, and lines +** Processing line: ~ # Objects are scaled up according to the grid.cell_size variable~ - Inside source: true *** True Line Result - return distance_x -** Processing line: ~ else~ + # Objects are scaled up according to the grid.cell_size variable +** Processing line: ~ # This allows for easy customization of the visual scale of the grid~ - Inside source: true *** True Line Result - else -** Processing line: ~ return distance_y~ + # This allows for easy customization of the visual scale of the grid +** Processing line: ~ def scale_up(cell)~ - Inside source: true *** True Line Result - return distance_y -** Processing line: ~ end~ + def scale_up(cell) +** Processing line: ~ # Prevents the original value of cell from being edited~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + # Prevents the original value of cell from being edited +** Processing line: ~ cell = cell.clone~ - Inside source: true *** True Line Result - end + cell = cell.clone ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # When the user grabs the star and puts their cursor to the far right~ +** Processing line: ~ # If cell is just an x and y coordinate~ - Inside source: true *** True Line Result - # When the user grabs the star and puts their cursor to the far right -** Processing line: ~ # and moves up and down, the star is supposed to move along the grid as well~ + # If cell is just an x and y coordinate +** Processing line: ~ if cell.size == 2~ - Inside source: true *** True Line Result - # and moves up and down, the star is supposed to move along the grid as well -** Processing line: ~ # Finding the cell closest to the mouse helps with this~ + if cell.size == 2 +** Processing line: ~ # Add a width and height of 1~ - Inside source: true *** True Line Result - # Finding the cell closest to the mouse helps with this -** Processing line: ~ def cell_closest_to_mouse~ + # Add a width and height of 1 +** Processing line: ~ cell << 1~ - Inside source: true *** True Line Result - def cell_closest_to_mouse -** Processing line: ~ # Closest cell to the mouse in the first grid~ + cell << 1 +** Processing line: ~ cell << 1~ - Inside source: true *** True Line Result - # Closest cell to the mouse in the first grid -** Processing line: ~ x = (inputs.mouse.point.x / grid.cell_size).to_i~ + cell << 1 +** Processing line: ~ end~ - Inside source: true *** True Line Result - x = (inputs.mouse.point.x / grid.cell_size).to_i -** Processing line: ~ y = (inputs.mouse.point.y / grid.cell_size).to_i~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - y = (inputs.mouse.point.y / grid.cell_size).to_i -** Processing line: ~ # Bound x and y to the grid~ + +** Processing line: ~ # Scale all the values up~ - Inside source: true *** True Line Result - # Bound x and y to the grid -** Processing line: ~ x = grid.width - 1 if x > grid.width - 1~ + # Scale all the values up +** Processing line: ~ cell.map! { |value| value * grid.cell_size }~ - Inside source: true *** True Line Result - x = grid.width - 1 if x > grid.width - 1 -** Processing line: ~ y = grid.height - 1 if y > grid.height - 1~ + cell.map! { |value| value * grid.cell_size } +** Processing line: ~~ - Inside source: true *** True Line Result - y = grid.height - 1 if y > grid.height - 1 -** Processing line: ~ # Return closest cell~ + +** Processing line: ~ # Returns the scaled up cell~ - Inside source: true *** True Line Result - # Return closest cell -** Processing line: ~ [x, y]~ + # Returns the scaled up cell +** Processing line: ~ cell~ - Inside source: true *** True Line Result - [x, y] + cell ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -67068,82 +74423,82 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Signal that the user is going to be moving the star from the first grid~ +** Processing line: ~ # Handles user input every tick so the grid can be edited~ - Inside source: true *** True Line Result - # Signal that the user is going to be moving the star from the first grid -** Processing line: ~ def star_clicked?~ + # Handles user input every tick so the grid can be edited +** Processing line: ~ # Separate input detection and processing is needed~ - Inside source: true *** True Line Result - def star_clicked? -** Processing line: ~ inputs.mouse.down && inputs.mouse.point.inside_rect?(scale_up(grid.star))~ + # Separate input detection and processing is needed +** Processing line: ~ # For example: Adding walls is started by clicking down on a hill,~ - Inside source: true *** True Line Result - inputs.mouse.down && inputs.mouse.point.inside_rect?(scale_up(grid.star)) -** Processing line: ~ end~ + # For example: Adding walls is started by clicking down on a hill, +** Processing line: ~ # but the mouse doesn't need to remain over hills to add walls~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + # but the mouse doesn't need to remain over hills to add walls +** Processing line: ~ def input~ - Inside source: true *** True Line Result - -** Processing line: ~ # Signal that the user is going to be moving the target from the first grid~ + def input +** Processing line: ~ # If the mouse was lifted this tick~ - Inside source: true *** True Line Result - # Signal that the user is going to be moving the target from the first grid -** Processing line: ~ def target_clicked?~ + # If the mouse was lifted this tick +** Processing line: ~ if inputs.mouse.up~ - Inside source: true *** True Line Result - def target_clicked? -** Processing line: ~ inputs.mouse.down && inputs.mouse.point.inside_rect?(scale_up(grid.target))~ + if inputs.mouse.up +** Processing line: ~ # Set current input to none~ - Inside source: true *** True Line Result - inputs.mouse.down && inputs.mouse.point.inside_rect?(scale_up(grid.target)) -** Processing line: ~ end~ + # Set current input to none +** Processing line: ~ state.user_input = :none~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + state.user_input = :none +** Processing line: ~ end~ - Inside source: true *** True Line Result - -** Processing line: ~ # Signal that the user is going to be adding walls from the first grid~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - # Signal that the user is going to be adding walls from the first grid -** Processing line: ~ def grid_clicked?~ + +** Processing line: ~ # If the mouse was clicked this tick~ - Inside source: true *** True Line Result - def grid_clicked? -** Processing line: ~ inputs.mouse.down && mouse_inside_grid?~ + # If the mouse was clicked this tick +** Processing line: ~ if inputs.mouse.down~ - Inside source: true *** True Line Result - inputs.mouse.down && mouse_inside_grid? -** Processing line: ~ end~ + if inputs.mouse.down +** Processing line: ~ # Determine what the user is editing and edit the state.user_input variable~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + # Determine what the user is editing and edit the state.user_input variable +** Processing line: ~ determine_input~ - Inside source: true *** True Line Result - -** Processing line: ~ # Returns whether the mouse is inside of the first grid~ + determine_input +** Processing line: ~ end~ - Inside source: true *** True Line Result - # Returns whether the mouse is inside of the first grid -** Processing line: ~ # Part of the condition that checks whether the user is adding a wall~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - # Part of the condition that checks whether the user is adding a wall -** Processing line: ~ def mouse_inside_grid?~ + +** Processing line: ~ # Process user input based on user_input variable and current mouse position~ - Inside source: true *** True Line Result - def mouse_inside_grid? -** Processing line: ~ inputs.mouse.point.inside_rect?(scale_up(grid.rect))~ + # Process user input based on user_input variable and current mouse position +** Processing line: ~ process_input~ - Inside source: true *** True Line Result - inputs.mouse.point.inside_rect?(scale_up(grid.rect)) + process_input ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -67152,186 +74507,190 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # These methods provide handy aliases to colors~ +** Processing line: ~ # Determines what the user is editing and stores the value~ - Inside source: true *** True Line Result - # These methods provide handy aliases to colors -** Processing line: ~~ + # Determines what the user is editing and stores the value +** Processing line: ~ # This method is called the tick the mouse is clicked~ - Inside source: true *** True Line Result - -** Processing line: ~ # Light brown~ + # This method is called the tick the mouse is clicked +** Processing line: ~ # Storing the value allows the user to continue the same edit as long as the~ - Inside source: true *** True Line Result - # Light brown -** Processing line: ~ def unvisited_color~ + # Storing the value allows the user to continue the same edit as long as the +** Processing line: ~ # mouse left click is held~ - Inside source: true *** True Line Result - def unvisited_color -** Processing line: ~ [221, 212, 213]~ + # mouse left click is held +** Processing line: ~ def determine_input~ - Inside source: true *** True Line Result - [221, 212, 213] -** Processing line: ~ # [255, 255, 255]~ + def determine_input +** Processing line: ~ # If the mouse is over the star in the first grid~ - Inside source: true *** True Line Result - # [255, 255, 255] -** Processing line: ~ end~ + # If the mouse is over the star in the first grid +** Processing line: ~ if mouse_over_star?~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + if mouse_over_star? +** Processing line: ~ # The user is editing the star from the first grid~ - Inside source: true *** True Line Result - -** Processing line: ~ # Camo Green~ + # The user is editing the star from the first grid +** Processing line: ~ state.user_input = :star~ - Inside source: true *** True Line Result - # Camo Green -** Processing line: ~ def wall_color~ + state.user_input = :star +** Processing line: ~ # If the mouse is over the star in the second grid~ - Inside source: true *** True Line Result - def wall_color -** Processing line: ~ [134, 134, 120]~ + # If the mouse is over the star in the second grid +** Processing line: ~ elsif mouse_over_star2?~ - Inside source: true *** True Line Result - [134, 134, 120] -** Processing line: ~ end~ + elsif mouse_over_star2? +** Processing line: ~ # The user is editing the star from the second grid~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + # The user is editing the star from the second grid +** Processing line: ~ state.user_input = :star2~ - Inside source: true *** True Line Result - -** Processing line: ~ # Pastel White~ + state.user_input = :star2 +** Processing line: ~ # If the mouse is over the target in the first grid~ - Inside source: true *** True Line Result - # Pastel White -** Processing line: ~ def path_color~ + # If the mouse is over the target in the first grid +** Processing line: ~ elsif mouse_over_target?~ - Inside source: true *** True Line Result - def path_color -** Processing line: ~ [231, 230, 228]~ + elsif mouse_over_target? +** Processing line: ~ # The user is editing the target from the first grid~ - Inside source: true *** True Line Result - [231, 230, 228] -** Processing line: ~ end~ + # The user is editing the target from the first grid +** Processing line: ~ state.user_input = :target~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + state.user_input = :target +** Processing line: ~ # If the mouse is over the target in the second grid~ - Inside source: true *** True Line Result - -** Processing line: ~ def red~ + # If the mouse is over the target in the second grid +** Processing line: ~ elsif mouse_over_target2?~ - Inside source: true *** True Line Result - def red -** Processing line: ~ [255, 0, 0]~ + elsif mouse_over_target2? +** Processing line: ~ # The user is editing the target from the second grid~ - Inside source: true *** True Line Result - [255, 0, 0] -** Processing line: ~ end~ + # The user is editing the target from the second grid +** Processing line: ~ state.user_input = :target2~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + state.user_input = :target2 +** Processing line: ~ # If the mouse is over a wall in the first grid~ - Inside source: true *** True Line Result - -** Processing line: ~ def purple~ + # If the mouse is over a wall in the first grid +** Processing line: ~ elsif mouse_over_wall?~ - Inside source: true *** True Line Result - def purple -** Processing line: ~ [149, 64, 191]~ + elsif mouse_over_wall? +** Processing line: ~ # The user is removing a wall from the first grid~ - Inside source: true *** True Line Result - [149, 64, 191] -** Processing line: ~ end~ + # The user is removing a wall from the first grid +** Processing line: ~ state.user_input = :remove_wall~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + state.user_input = :remove_wall +** Processing line: ~ # If the mouse is over a wall in the second grid~ - Inside source: true *** True Line Result - -** Processing line: ~ # Makes code more concise~ + # If the mouse is over a wall in the second grid +** Processing line: ~ elsif mouse_over_wall2?~ - Inside source: true *** True Line Result - # Makes code more concise -** Processing line: ~ def grid~ + elsif mouse_over_wall2? +** Processing line: ~ # The user is removing a wall from the second grid~ - Inside source: true *** True Line Result - def grid -** Processing line: ~ state.grid~ + # The user is removing a wall from the second grid +** Processing line: ~ state.user_input = :remove_wall2~ - Inside source: true *** True Line Result - state.grid -** Processing line: ~ end~ + state.user_input = :remove_wall2 +** Processing line: ~ # If the mouse is over a hill in the first grid~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + # If the mouse is over a hill in the first grid +** Processing line: ~ elsif mouse_over_hill?~ - Inside source: true *** True Line Result - -** Processing line: ~ def search~ + elsif mouse_over_hill? +** Processing line: ~ # The user is adding a wall from the first grid~ - Inside source: true *** True Line Result - def search -** Processing line: ~ state.search~ + # The user is adding a wall from the first grid +** Processing line: ~ state.user_input = :add_wall~ - Inside source: true *** True Line Result - state.search -** Processing line: ~ end~ + state.user_input = :add_wall +** Processing line: ~ # If the mouse is over a hill in the second grid~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + # If the mouse is over a hill in the second grid +** Processing line: ~ elsif mouse_over_hill2?~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + elsif mouse_over_hill2? +** Processing line: ~ # The user is adding a wall from the second grid~ - Inside source: true *** True Line Result - -** Processing line: ~ # Method that is called by DragonRuby periodically~ + # The user is adding a wall from the second grid +** Processing line: ~ state.user_input = :add_wall2~ - Inside source: true *** True Line Result - # Method that is called by DragonRuby periodically -** Processing line: ~ # Used for updating animations and calculations~ + state.user_input = :add_wall2 +** Processing line: ~ # If the mouse is over the first grid~ - Inside source: true *** True Line Result - # Used for updating animations and calculations -** Processing line: ~ def tick args~ + # If the mouse is over the first grid +** Processing line: ~ elsif mouse_over_grid?~ - Inside source: true *** True Line Result - def tick args -** Processing line: ~~ + elsif mouse_over_grid? +** Processing line: ~ # The user is adding a hill from the first grid~ - Inside source: true *** True Line Result - -** Processing line: ~ # Pressing r will reset the application~ + # The user is adding a hill from the first grid +** Processing line: ~ state.user_input = :add_hill~ - Inside source: true *** True Line Result - # Pressing r will reset the application -** Processing line: ~ if args.inputs.keyboard.key_down.r~ + state.user_input = :add_hill +** Processing line: ~ # If the mouse is over the second grid~ - Inside source: true *** True Line Result - if args.inputs.keyboard.key_down.r -** Processing line: ~ args.gtk.reset~ + # If the mouse is over the second grid +** Processing line: ~ elsif mouse_over_grid2?~ - Inside source: true *** True Line Result - args.gtk.reset -** Processing line: ~ reset~ + elsif mouse_over_grid2? +** Processing line: ~ # The user is adding a hill from the second grid~ - Inside source: true *** True Line Result - reset -** Processing line: ~ return~ + # The user is adding a hill from the second grid +** Processing line: ~ state.user_input = :add_hill2~ - Inside source: true *** True Line Result - return + state.user_input = :add_hill2 +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -67340,250 +74699,242 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Every tick, new args are passed, and the Breadth First Search tick is called~ +** Processing line: ~ # Processes click and drag based on what the user is currently dragging~ - Inside source: true *** True Line Result - # Every tick, new args are passed, and the Breadth First Search tick is called -** Processing line: ~ $breadcrumbs ||= Breadcrumbs.new(args)~ + # Processes click and drag based on what the user is currently dragging +** Processing line: ~ def process_input~ - Inside source: true *** True Line Result - $breadcrumbs ||= Breadcrumbs.new(args) -** Processing line: ~ $breadcrumbs.args = args~ + def process_input +** Processing line: ~ if state.user_input == :star~ - Inside source: true *** True Line Result - $breadcrumbs.args = args -** Processing line: ~ $breadcrumbs.tick~ + if state.user_input == :star +** Processing line: ~ input_star~ - Inside source: true *** True Line Result - $breadcrumbs.tick -** Processing line: ~ end~ + input_star +** Processing line: ~ elsif state.user_input == :star2~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + elsif state.user_input == :star2 +** Processing line: ~ input_star2~ - Inside source: true *** True Line Result - -** Processing line: ~~ + input_star2 +** Processing line: ~ elsif state.user_input == :target~ - Inside source: true *** True Line Result - -** Processing line: ~ def reset~ + elsif state.user_input == :target +** Processing line: ~ input_target~ - Inside source: true *** True Line Result - def reset -** Processing line: ~ $breadcrumbs = nil~ + input_target +** Processing line: ~ elsif state.user_input == :target2~ - Inside source: true *** True Line Result - $breadcrumbs = nil -** Processing line: ~ end~ + elsif state.user_input == :target2 +** Processing line: ~ input_target2~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + input_target2 +** Processing line: ~ elsif state.user_input == :remove_wall~ - Inside source: true *** True Line Result - -** Processing line: ~ # # Representation of how far away visited cells are from the star~ + elsif state.user_input == :remove_wall +** Processing line: ~ input_remove_wall~ - Inside source: true *** True Line Result - # # Representation of how far away visited cells are from the star -** Processing line: ~ # # Replaces the render_visited method~ + input_remove_wall +** Processing line: ~ elsif state.user_input == :remove_wall2~ - Inside source: true *** True Line Result - # # Replaces the render_visited method -** Processing line: ~ # # Visually demonstrates the effectiveness of early exit for pathfinding~ + elsif state.user_input == :remove_wall2 +** Processing line: ~ input_remove_wall2~ - Inside source: true *** True Line Result - # # Visually demonstrates the effectiveness of early exit for pathfinding -** Processing line: ~ # def render_heat_map~ + input_remove_wall2 +** Processing line: ~ elsif state.user_input == :add_hill~ - Inside source: true *** True Line Result - # def render_heat_map -** Processing line: ~ # # THIS CODE NEEDS SOME FIXING DUE TO REFACTORING~ + elsif state.user_input == :add_hill +** Processing line: ~ input_add_hill~ - Inside source: true *** True Line Result - # # THIS CODE NEEDS SOME FIXING DUE TO REFACTORING -** Processing line: ~ # search.came_from.each_key do | cell |~ + input_add_hill +** Processing line: ~ elsif state.user_input == :add_hill2~ - Inside source: true *** True Line Result - # search.came_from.each_key do | cell | -** Processing line: ~ # distance = (grid.star.x - visited_cell.x).abs + (state.star.y - visited_cell.y).abs~ + elsif state.user_input == :add_hill2 +** Processing line: ~ input_add_hill2~ - Inside source: true *** True Line Result - # distance = (grid.star.x - visited_cell.x).abs + (state.star.y - visited_cell.y).abs -** Processing line: ~ # max_distance = grid.width + grid.height~ + input_add_hill2 +** Processing line: ~ elsif state.user_input == :add_wall~ - Inside source: true *** True Line Result - # max_distance = grid.width + grid.height -** Processing line: ~ # alpha = 255.to_i * distance.to_i / max_distance.to_i~ + elsif state.user_input == :add_wall +** Processing line: ~ input_add_wall~ - Inside source: true *** True Line Result - # alpha = 255.to_i * distance.to_i / max_distance.to_i -** Processing line: ~ # outputs.solids << [scale_up(visited_cell), red, alpha]~ + input_add_wall +** Processing line: ~ elsif state.user_input == :add_wall2~ - Inside source: true *** True Line Result - # outputs.solids << [scale_up(visited_cell), red, alpha] -** Processing line: ~ # # outputs.solids << [early_exit_scale_up(visited_cell), red, alpha]~ + elsif state.user_input == :add_wall2 +** Processing line: ~ input_add_wall2~ - Inside source: true *** True Line Result - # # outputs.solids << [early_exit_scale_up(visited_cell), red, alpha] -** Processing line: ~ # end~ + input_add_wall2 +** Processing line: ~ end~ - Inside source: true *** True Line Result - # end -** Processing line: ~ # end~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - # end + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~#+end_src~ -- Line was identified as the end of a code block. -*** True Line Result -#+end_src -** Processing line: ~~ -- End of paragraph detected. -*** True Line Result - -** Processing line: ~*** Path Finding Algorithms - Early Exit - main.rb~ -- Header detected. -*** True Line Result - +** Processing line: ~ # Calculates the two searches~ +- Inside source: true *** True Line Result -*** Path Finding Algorithms - Early Exit - main.rb -** Processing line: ~#+begin_src ruby~ -- Line was identified as the beginning of a code block. + # Calculates the two searches +** Processing line: ~ def calc~ +- Inside source: true *** True Line Result - + def calc +** Processing line: ~ # If the searches have not started~ +- Inside source: true *** True Line Result -#+begin_src ruby -** Processing line: ~ # ./samples/13_path_finding_algorithms/04_early_exit/app/main.rb~ + # If the searches have not started +** Processing line: ~ if breadth_first_search.visited.empty?~ - Inside source: true *** True Line Result - # ./samples/13_path_finding_algorithms/04_early_exit/app/main.rb -** Processing line: ~ # Comparison of a breadth first search with and without early exit~ + if breadth_first_search.visited.empty? +** Processing line: ~ # Calculate the two searches~ - Inside source: true *** True Line Result - # Comparison of a breadth first search with and without early exit -** Processing line: ~ # Inspired by https://www.redblobgames.com/pathfinding/a-star/introduction.html~ + # Calculate the two searches +** Processing line: ~ calc_breadth_first~ - Inside source: true *** True Line Result - # Inspired by https://www.redblobgames.com/pathfinding/a-star/introduction.html -** Processing line: ~~ + calc_breadth_first +** Processing line: ~ calc_dijkstra~ - Inside source: true *** True Line Result - -** Processing line: ~ # Demonstrates the exploration difference caused by early exit~ + calc_dijkstra +** Processing line: ~ end~ - Inside source: true *** True Line Result - # Demonstrates the exploration difference caused by early exit -** Processing line: ~ # Also demonstrates how breadth first search is used for path generation~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - # Also demonstrates how breadth first search is used for path generation + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # The left grid is a breadth first search without early exit~ +** Processing line: ~~ - Inside source: true *** True Line Result - # The left grid is a breadth first search without early exit -** Processing line: ~ # The right grid is a breadth first search with early exit~ + +** Processing line: ~ def calc_breadth_first~ - Inside source: true *** True Line Result - # The right grid is a breadth first search with early exit -** Processing line: ~ # The red squares represent how far the search expanded~ + def calc_breadth_first +** Processing line: ~ # Sets up the Breadth First Search~ - Inside source: true *** True Line Result - # The red squares represent how far the search expanded -** Processing line: ~ # The darker the red, the farther the search proceeded~ + # Sets up the Breadth First Search +** Processing line: ~ breadth_first_search.visited[state.star] = true~ - Inside source: true *** True Line Result - # The darker the red, the farther the search proceeded -** Processing line: ~ # Comparison of the heat map reveals how much searching can be saved by early exit~ + breadth_first_search.visited[state.star] = true +** Processing line: ~ breadth_first_search.frontier << state.star~ - Inside source: true *** True Line Result - # Comparison of the heat map reveals how much searching can be saved by early exit -** Processing line: ~ # The white path shows path generation via breadth first search~ + breadth_first_search.frontier << state.star +** Processing line: ~ breadth_first_search.came_from[state.star] = nil~ - Inside source: true *** True Line Result - # The white path shows path generation via breadth first search -** Processing line: ~ class EarlyExitBreadthFirstSearch~ + breadth_first_search.came_from[state.star] = nil +** Processing line: ~~ - Inside source: true *** True Line Result - class EarlyExitBreadthFirstSearch -** Processing line: ~ attr_gtk~ + +** Processing line: ~ until breadth_first_search.frontier.empty?~ - Inside source: true *** True Line Result - attr_gtk -** Processing line: ~~ + until breadth_first_search.frontier.empty? +** Processing line: ~ return if breadth_first_search.visited.has_key?(state.target)~ - Inside source: true *** True Line Result - -** Processing line: ~ # This method is called every frame/tick~ + return if breadth_first_search.visited.has_key?(state.target) +** Processing line: ~ # A step in the search~ - Inside source: true *** True Line Result - # This method is called every frame/tick -** Processing line: ~ # Every tick, the current state of the search is rendered on the screen,~ + # A step in the search +** Processing line: ~ # Takes the next frontier cell~ - Inside source: true *** True Line Result - # Every tick, the current state of the search is rendered on the screen, -** Processing line: ~ # User input is processed, and~ + # Takes the next frontier cell +** Processing line: ~ new_frontier = breadth_first_search.frontier.shift~ - Inside source: true *** True Line Result - # User input is processed, and -** Processing line: ~ # The next step in the search is calculated~ + new_frontier = breadth_first_search.frontier.shift +** Processing line: ~ # For each of its neighbors~ - Inside source: true *** True Line Result - # The next step in the search is calculated -** Processing line: ~ def tick~ + # For each of its neighbors +** Processing line: ~ adjacent_neighbors(new_frontier).each do | neighbor |~ - Inside source: true *** True Line Result - def tick -** Processing line: ~ defaults~ + adjacent_neighbors(new_frontier).each do | neighbor | +** Processing line: ~ # That have not been visited and are not walls~ - Inside source: true *** True Line Result - defaults -** Processing line: ~ # If the grid has not been searched~ + # That have not been visited and are not walls +** Processing line: ~ unless breadth_first_search.visited.has_key?(neighbor) || state.walls.has_key?(neighbor)~ - Inside source: true *** True Line Result - # If the grid has not been searched -** Processing line: ~ if state.visited.empty?~ + unless breadth_first_search.visited.has_key?(neighbor) || state.walls.has_key?(neighbor) +** Processing line: ~ # Add them to the frontier and mark them as visited in the first grid~ - Inside source: true *** True Line Result - if state.visited.empty? -** Processing line: ~ # Complete the search~ + # Add them to the frontier and mark them as visited in the first grid +** Processing line: ~ breadth_first_search.visited[neighbor] = true~ - Inside source: true *** True Line Result - # Complete the search -** Processing line: ~ state.max_steps.times { step }~ + breadth_first_search.visited[neighbor] = true +** Processing line: ~ breadth_first_search.frontier << neighbor~ - Inside source: true *** True Line Result - state.max_steps.times { step } -** Processing line: ~ # And calculate the path~ + breadth_first_search.frontier << neighbor +** Processing line: ~ # Remember which cell the neighbor came from~ - Inside source: true *** True Line Result - # And calculate the path -** Processing line: ~ calc_path~ + # Remember which cell the neighbor came from +** Processing line: ~ breadth_first_search.came_from[neighbor] = new_frontier~ - Inside source: true *** True Line Result - calc_path -** Processing line: ~ end~ + breadth_first_search.came_from[neighbor] = new_frontier +** Processing line: ~ end~ - Inside source: true *** True Line Result - end -** Processing line: ~ render~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - render -** Processing line: ~ input~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - input + end ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -67592,182 +74943,178 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def defaults~ +** Processing line: ~ # Calculates the Dijkstra Search from the beginning to the end~ - Inside source: true *** True Line Result - def defaults -** Processing line: ~ # Variables to edit the size and appearance of the grid~ + # Calculates the Dijkstra Search from the beginning to the end +** Processing line: ~~ - Inside source: true *** True Line Result - # Variables to edit the size and appearance of the grid -** Processing line: ~ # Freely customizable to user's liking~ + +** Processing line: ~ def calc_dijkstra~ - Inside source: true *** True Line Result - # Freely customizable to user's liking -** Processing line: ~ grid.width ||= 15~ + def calc_dijkstra +** Processing line: ~ # The initial values for the Dijkstra search~ - Inside source: true *** True Line Result - grid.width ||= 15 -** Processing line: ~ grid.height ||= 15~ + # The initial values for the Dijkstra search +** Processing line: ~ dijkstra_search.frontier << [state.star, 0]~ - Inside source: true *** True Line Result - grid.height ||= 15 -** Processing line: ~ grid.cell_size ||= 40~ + dijkstra_search.frontier << [state.star, 0] +** Processing line: ~ dijkstra_search.came_from[state.star] = nil~ - Inside source: true *** True Line Result - grid.cell_size ||= 40 -** Processing line: ~ grid.rect ||= [0, 0, grid.width, grid.height]~ + dijkstra_search.came_from[state.star] = nil +** Processing line: ~ dijkstra_search.cost_so_far[state.star] = 0~ - Inside source: true *** True Line Result - grid.rect ||= [0, 0, grid.width, grid.height] + dijkstra_search.cost_so_far[state.star] = 0 ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # At some step the animation will end,~ -- Inside source: true -*** True Line Result - # At some step the animation will end, -** Processing line: ~ # and further steps won't change anything (the whole grid.widthill be explored)~ +** Processing line: ~ # Until their are no more cells to be explored~ - Inside source: true *** True Line Result - # and further steps won't change anything (the whole grid.widthill be explored) -** Processing line: ~ # This step is roughly the grid's width * height~ + # Until their are no more cells to be explored +** Processing line: ~ until dijkstra_search.frontier.empty?~ - Inside source: true *** True Line Result - # This step is roughly the grid's width * height -** Processing line: ~ # When anim_steps equals max_steps no more calculations will occur~ + until dijkstra_search.frontier.empty? +** Processing line: ~ # Get the next cell to be explored from~ - Inside source: true *** True Line Result - # When anim_steps equals max_steps no more calculations will occur -** Processing line: ~ # and the slider will be at the end~ + # Get the next cell to be explored from +** Processing line: ~ # We get the first element of the array which is the cell. The second element is the priority.~ - Inside source: true *** True Line Result - # and the slider will be at the end -** Processing line: ~ state.max_steps ||= args.state.grid.width * args.state.grid.height~ + # We get the first element of the array which is the cell. The second element is the priority. +** Processing line: ~ current = dijkstra_search.frontier.shift[0]~ - Inside source: true *** True Line Result - state.max_steps ||= args.state.grid.width * args.state.grid.height + current = dijkstra_search.frontier.shift[0] ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # The location of the star and walls of the grid~ -- Inside source: true -*** True Line Result - # The location of the star and walls of the grid -** Processing line: ~ # They can be modified to have a different initial grid~ +** Processing line: ~ # Stop the search if we found the target~ - Inside source: true *** True Line Result - # They can be modified to have a different initial grid -** Processing line: ~ # Walls are stored in a hash for quick look up when doing the search~ + # Stop the search if we found the target +** Processing line: ~ return if current == state.target~ - Inside source: true *** True Line Result - # Walls are stored in a hash for quick look up when doing the search -** Processing line: ~ state.star ||= [2, 8]~ + return if current == state.target +** Processing line: ~~ - Inside source: true *** True Line Result - state.star ||= [2, 8] -** Processing line: ~ state.target ||= [10, 5]~ + +** Processing line: ~ # For each of the neighbors~ - Inside source: true *** True Line Result - state.target ||= [10, 5] -** Processing line: ~ state.walls ||= {}~ + # For each of the neighbors +** Processing line: ~ adjacent_neighbors(current).each do | neighbor |~ - Inside source: true *** True Line Result - state.walls ||= {} -** Processing line: ~~ + adjacent_neighbors(current).each do | neighbor | +** Processing line: ~ # Unless this cell is a wall or has already been explored.~ - Inside source: true *** True Line Result - -** Processing line: ~ # Variables that are used by the breadth first search~ + # Unless this cell is a wall or has already been explored. +** Processing line: ~ unless dijkstra_search.came_from.has_key?(neighbor) or state.walls.has_key?(neighbor)~ - Inside source: true *** True Line Result - # Variables that are used by the breadth first search -** Processing line: ~ # Storing cells that the search has visited, prevents unnecessary steps~ + unless dijkstra_search.came_from.has_key?(neighbor) or state.walls.has_key?(neighbor) +** Processing line: ~ # Calculate the movement cost of getting to this cell and memo~ - Inside source: true *** True Line Result - # Storing cells that the search has visited, prevents unnecessary steps -** Processing line: ~ # Expanding the frontier of the search in order makes the search expand~ + # Calculate the movement cost of getting to this cell and memo +** Processing line: ~ new_cost = dijkstra_search.cost_so_far[current] + cost(neighbor)~ - Inside source: true *** True Line Result - # Expanding the frontier of the search in order makes the search expand -** Processing line: ~ # from the center outward~ + new_cost = dijkstra_search.cost_so_far[current] + cost(neighbor) +** Processing line: ~ dijkstra_search.cost_so_far[neighbor] = new_cost~ - Inside source: true *** True Line Result - # from the center outward + dijkstra_search.cost_so_far[neighbor] = new_cost ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Visited cells in the first grid~ +** Processing line: ~ # Add this neighbor to the cells too be explored~ - Inside source: true *** True Line Result - # Visited cells in the first grid -** Processing line: ~ state.visited ||= {}~ + # Add this neighbor to the cells too be explored +** Processing line: ~ dijkstra_search.frontier << [neighbor, new_cost]~ - Inside source: true *** True Line Result - state.visited ||= {} -** Processing line: ~ # Visited cells in the second grid~ + dijkstra_search.frontier << [neighbor, new_cost] +** Processing line: ~ dijkstra_search.came_from[neighbor] = current~ - Inside source: true *** True Line Result - # Visited cells in the second grid -** Processing line: ~ state.early_exit_visited ||= {}~ + dijkstra_search.came_from[neighbor] = current +** Processing line: ~ end~ - Inside source: true *** True Line Result - state.early_exit_visited ||= {} -** Processing line: ~ # The cells from which the search is to expand~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - # The cells from which the search is to expand -** Processing line: ~ state.frontier ||= []~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - state.frontier ||= [] -** Processing line: ~ # A hash of where each cell was expanded from~ + +** Processing line: ~ # Sort the frontier so exploration occurs that have a low cost so far.~ - Inside source: true *** True Line Result - # A hash of where each cell was expanded from -** Processing line: ~ # The key is a cell, and the value is the cell it came from~ + # Sort the frontier so exploration occurs that have a low cost so far. +** Processing line: ~ # My implementation of a priority queue~ - Inside source: true *** True Line Result - # The key is a cell, and the value is the cell it came from -** Processing line: ~ state.came_from ||= {}~ + # My implementation of a priority queue +** Processing line: ~ dijkstra_search.frontier = dijkstra_search.frontier.sort_by {|cell, priority| priority}~ - Inside source: true *** True Line Result - state.came_from ||= {} -** Processing line: ~ # Cells that are part of the path from the target to the star~ + dijkstra_search.frontier = dijkstra_search.frontier.sort_by {|cell, priority| priority} +** Processing line: ~ end~ - Inside source: true *** True Line Result - # Cells that are part of the path from the target to the star -** Processing line: ~ state.path ||= {}~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - state.path ||= {} + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # What the user is currently editing on the grid~ +** Processing line: ~ def cost(cell)~ - Inside source: true *** True Line Result - # What the user is currently editing on the grid -** Processing line: ~ # We store this value, because we want to remember the value even when~ + def cost(cell) +** Processing line: ~ if state.hills.has_key?(cell)~ - Inside source: true *** True Line Result - # We store this value, because we want to remember the value even when -** Processing line: ~ # the user's cursor is no longer over what they're interacting with, but~ + if state.hills.has_key?(cell) +** Processing line: ~ return 5~ - Inside source: true *** True Line Result - # the user's cursor is no longer over what they're interacting with, but -** Processing line: ~ # they are still clicking down on the mouse.~ + return 5 +** Processing line: ~ else~ - Inside source: true *** True Line Result - # they are still clicking down on the mouse. -** Processing line: ~ state.current_input ||= :none~ + else +** Processing line: ~ return 1~ - Inside source: true *** True Line Result - state.current_input ||= :none + return 1 +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -67776,98 +75123,114 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Draws everything onto the screen~ +** Processing line: ~~ - Inside source: true *** True Line Result - # Draws everything onto the screen -** Processing line: ~ def render~ + +** Processing line: ~~ - Inside source: true *** True Line Result - def render -** Processing line: ~ render_background~ + +** Processing line: ~~ - Inside source: true *** True Line Result - render_background -** Processing line: ~ render_heat_map~ + +** Processing line: ~ # Moves the star to the cell closest to the mouse in the first grid~ - Inside source: true *** True Line Result - render_heat_map -** Processing line: ~ render_walls~ + # Moves the star to the cell closest to the mouse in the first grid +** Processing line: ~ # Only resets the search if the star changes position~ - Inside source: true *** True Line Result - render_walls -** Processing line: ~ render_path~ + # Only resets the search if the star changes position +** Processing line: ~ # Called whenever the user is editing the star (puts mouse down on star)~ - Inside source: true *** True Line Result - render_path -** Processing line: ~ render_star~ + # Called whenever the user is editing the star (puts mouse down on star) +** Processing line: ~ def input_star~ - Inside source: true *** True Line Result - render_star -** Processing line: ~ render_target~ + def input_star +** Processing line: ~ old_star = state.star.clone~ - Inside source: true *** True Line Result - render_target -** Processing line: ~ render_labels~ + old_star = state.star.clone +** Processing line: ~ unless cell_closest_to_mouse == state.target~ - Inside source: true *** True Line Result - render_labels -** Processing line: ~ end~ + unless cell_closest_to_mouse == state.target +** Processing line: ~ state.star = cell_closest_to_mouse~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + state.star = cell_closest_to_mouse +** Processing line: ~ end~ - Inside source: true *** True Line Result - -** Processing line: ~ # The methods below subdivide the task of drawing everything to the screen~ + end +** Processing line: ~ unless old_star == state.star~ - Inside source: true *** True Line Result - # The methods below subdivide the task of drawing everything to the screen + unless old_star == state.star +** Processing line: ~ reset_search~ +- Inside source: true +*** True Line Result + reset_search +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Draws what the grid looks like with nothing on it~ +** Processing line: ~ # Moves the star to the cell closest to the mouse in the second grid~ - Inside source: true *** True Line Result - # Draws what the grid looks like with nothing on it -** Processing line: ~ def render_background~ + # Moves the star to the cell closest to the mouse in the second grid +** Processing line: ~ # Only resets the search if the star changes position~ - Inside source: true *** True Line Result - def render_background -** Processing line: ~ render_unvisited~ + # Only resets the search if the star changes position +** Processing line: ~ # Called whenever the user is editing the star (puts mouse down on star)~ - Inside source: true *** True Line Result - render_unvisited -** Processing line: ~ render_grid_lines~ + # Called whenever the user is editing the star (puts mouse down on star) +** Processing line: ~ def input_star2~ - Inside source: true *** True Line Result - render_grid_lines -** Processing line: ~ end~ + def input_star2 +** Processing line: ~ old_star = state.star.clone~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + old_star = state.star.clone +** Processing line: ~ unless cell_closest_to_mouse2 == state.target~ - Inside source: true *** True Line Result - -** Processing line: ~ # Draws both grids~ + unless cell_closest_to_mouse2 == state.target +** Processing line: ~ state.star = cell_closest_to_mouse2~ - Inside source: true *** True Line Result - # Draws both grids -** Processing line: ~ def render_unvisited~ + state.star = cell_closest_to_mouse2 +** Processing line: ~ end~ - Inside source: true *** True Line Result - def render_unvisited -** Processing line: ~ outputs.solids << [scale_up(grid.rect), unvisited_color]~ + end +** Processing line: ~ unless old_star == state.star~ - Inside source: true *** True Line Result - outputs.solids << [scale_up(grid.rect), unvisited_color] -** Processing line: ~ outputs.solids << [early_exit_scale_up(grid.rect), unvisited_color]~ + unless old_star == state.star +** Processing line: ~ reset_search~ - Inside source: true *** True Line Result - outputs.solids << [early_exit_scale_up(grid.rect), unvisited_color] + reset_search +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -67876,46 +75239,46 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Draws grid lines to show the division of the grid into cells~ +** Processing line: ~ # Moves the target to the grid closest to the mouse in the first grid~ - Inside source: true *** True Line Result - # Draws grid lines to show the division of the grid into cells -** Processing line: ~ def render_grid_lines~ + # Moves the target to the grid closest to the mouse in the first grid +** Processing line: ~ # Only reset_searchs the search if the target changes position~ - Inside source: true *** True Line Result - def render_grid_lines -** Processing line: ~ for x in 0..grid.width~ + # Only reset_searchs the search if the target changes position +** Processing line: ~ # Called whenever the user is editing the target (puts mouse down on target)~ - Inside source: true *** True Line Result - for x in 0..grid.width -** Processing line: ~ outputs.lines << vertical_line(x)~ + # Called whenever the user is editing the target (puts mouse down on target) +** Processing line: ~ def input_target~ - Inside source: true *** True Line Result - outputs.lines << vertical_line(x) -** Processing line: ~ outputs.lines << early_exit_vertical_line(x)~ + def input_target +** Processing line: ~ old_target = state.target.clone~ - Inside source: true *** True Line Result - outputs.lines << early_exit_vertical_line(x) -** Processing line: ~ end~ + old_target = state.target.clone +** Processing line: ~ unless cell_closest_to_mouse == state.star~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + unless cell_closest_to_mouse == state.star +** Processing line: ~ state.target = cell_closest_to_mouse~ - Inside source: true *** True Line Result - -** Processing line: ~ for y in 0..grid.height~ + state.target = cell_closest_to_mouse +** Processing line: ~ end~ - Inside source: true *** True Line Result - for y in 0..grid.height -** Processing line: ~ outputs.lines << horizontal_line(y)~ + end +** Processing line: ~ unless old_target == state.target~ - Inside source: true *** True Line Result - outputs.lines << horizontal_line(y) -** Processing line: ~ outputs.lines << early_exit_horizontal_line(y)~ + unless old_target == state.target +** Processing line: ~ reset_search~ - Inside source: true *** True Line Result - outputs.lines << early_exit_horizontal_line(y) + reset_search ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -67928,58 +75291,50 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Easy way to draw vertical lines given an index~ -- Inside source: true -*** True Line Result - # Easy way to draw vertical lines given an index -** Processing line: ~ def vertical_line column~ -- Inside source: true -*** True Line Result - def vertical_line column -** Processing line: ~ scale_up([column, 0, column, grid.height])~ +** Processing line: ~ # Moves the target to the cell closest to the mouse in the second grid~ - Inside source: true *** True Line Result - scale_up([column, 0, column, grid.height]) -** Processing line: ~ end~ + # Moves the target to the cell closest to the mouse in the second grid +** Processing line: ~ # Only reset_searchs the search if the target changes position~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + # Only reset_searchs the search if the target changes position +** Processing line: ~ # Called whenever the user is editing the target (puts mouse down on target)~ - Inside source: true *** True Line Result - -** Processing line: ~ # Easy way to draw horizontal lines given an index~ + # Called whenever the user is editing the target (puts mouse down on target) +** Processing line: ~ def input_target2~ - Inside source: true *** True Line Result - # Easy way to draw horizontal lines given an index -** Processing line: ~ def horizontal_line row~ + def input_target2 +** Processing line: ~ old_target = state.target.clone~ - Inside source: true *** True Line Result - def horizontal_line row -** Processing line: ~ scale_up([0, row, grid.width, row])~ + old_target = state.target.clone +** Processing line: ~ unless cell_closest_to_mouse2 == state.star~ - Inside source: true *** True Line Result - scale_up([0, row, grid.width, row]) -** Processing line: ~ end~ + unless cell_closest_to_mouse2 == state.star +** Processing line: ~ state.target = cell_closest_to_mouse2~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + state.target = cell_closest_to_mouse2 +** Processing line: ~ end~ - Inside source: true *** True Line Result - -** Processing line: ~ # Easy way to draw vertical lines given an index~ + end +** Processing line: ~ unless old_target == state.target~ - Inside source: true *** True Line Result - # Easy way to draw vertical lines given an index -** Processing line: ~ def early_exit_vertical_line column~ + unless old_target == state.target +** Processing line: ~ reset_search~ - Inside source: true *** True Line Result - def early_exit_vertical_line column -** Processing line: ~ scale_up([column + grid.width + 1, 0, column + grid.width + 1, grid.height])~ + reset_search +** Processing line: ~ end~ - Inside source: true *** True Line Result - scale_up([column + grid.width + 1, 0, column + grid.width + 1, grid.height]) + end ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -67988,46 +75343,50 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Easy way to draw horizontal lines given an index~ +** Processing line: ~ # Removes walls in the first grid that are under the cursor~ - Inside source: true *** True Line Result - # Easy way to draw horizontal lines given an index -** Processing line: ~ def early_exit_horizontal_line row~ + # Removes walls in the first grid that are under the cursor +** Processing line: ~ def input_remove_wall~ - Inside source: true *** True Line Result - def early_exit_horizontal_line row -** Processing line: ~ scale_up([grid.width + 1, row, grid.width + grid.width + 1, row])~ + def input_remove_wall +** Processing line: ~ # The mouse needs to be inside the grid, because we only want to remove walls~ - Inside source: true *** True Line Result - scale_up([grid.width + 1, row, grid.width + grid.width + 1, row]) -** Processing line: ~ end~ + # The mouse needs to be inside the grid, because we only want to remove walls +** Processing line: ~ # the cursor is directly over~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + # the cursor is directly over +** Processing line: ~ # Recalculations should only occur when a wall is actually deleted~ - Inside source: true *** True Line Result - -** Processing line: ~ # Draws the walls on both grids~ + # Recalculations should only occur when a wall is actually deleted +** Processing line: ~ if mouse_over_grid?~ - Inside source: true *** True Line Result - # Draws the walls on both grids -** Processing line: ~ def render_walls~ + if mouse_over_grid? +** Processing line: ~ if state.walls.has_key?(cell_closest_to_mouse) or state.hills.has_key?(cell_closest_to_mouse)~ - Inside source: true *** True Line Result - def render_walls -** Processing line: ~ state.walls.each_key do |wall|~ + if state.walls.has_key?(cell_closest_to_mouse) or state.hills.has_key?(cell_closest_to_mouse) +** Processing line: ~ state.walls.delete(cell_closest_to_mouse)~ - Inside source: true *** True Line Result - state.walls.each_key do |wall| -** Processing line: ~ outputs.solids << [scale_up(wall), wall_color]~ + state.walls.delete(cell_closest_to_mouse) +** Processing line: ~ state.hills.delete(cell_closest_to_mouse)~ - Inside source: true *** True Line Result - outputs.solids << [scale_up(wall), wall_color] -** Processing line: ~ outputs.solids << [early_exit_scale_up(wall), wall_color]~ + state.hills.delete(cell_closest_to_mouse) +** Processing line: ~ reset_search~ - Inside source: true *** True Line Result - outputs.solids << [early_exit_scale_up(wall), wall_color] + reset_search +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -68040,70 +75399,54 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Renders the star on both grids~ -- Inside source: true -*** True Line Result - # Renders the star on both grids -** Processing line: ~ def render_star~ -- Inside source: true -*** True Line Result - def render_star -** Processing line: ~ outputs.sprites << [scale_up(state.star), 'star.png']~ -- Inside source: true -*** True Line Result - outputs.sprites << [scale_up(state.star), 'star.png'] -** Processing line: ~ outputs.sprites << [early_exit_scale_up(state.star), 'star.png']~ -- Inside source: true -*** True Line Result - outputs.sprites << [early_exit_scale_up(state.star), 'star.png'] -** Processing line: ~ end~ +** Processing line: ~ # Removes walls in the second grid that are under the cursor~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + # Removes walls in the second grid that are under the cursor +** Processing line: ~ def input_remove_wall2~ - Inside source: true *** True Line Result - -** Processing line: ~ # Renders the target on both grids~ + def input_remove_wall2 +** Processing line: ~ # The mouse needs to be inside the grid, because we only want to remove walls~ - Inside source: true *** True Line Result - # Renders the target on both grids -** Processing line: ~ def render_target~ + # The mouse needs to be inside the grid, because we only want to remove walls +** Processing line: ~ # the cursor is directly over~ - Inside source: true *** True Line Result - def render_target -** Processing line: ~ outputs.sprites << [scale_up(state.target), 'target.png']~ + # the cursor is directly over +** Processing line: ~ # Recalculations should only occur when a wall is actually deleted~ - Inside source: true *** True Line Result - outputs.sprites << [scale_up(state.target), 'target.png'] -** Processing line: ~ outputs.sprites << [early_exit_scale_up(state.target), 'target.png']~ + # Recalculations should only occur when a wall is actually deleted +** Processing line: ~ if mouse_over_grid2?~ - Inside source: true *** True Line Result - outputs.sprites << [early_exit_scale_up(state.target), 'target.png'] -** Processing line: ~ end~ + if mouse_over_grid2? +** Processing line: ~ if state.walls.has_key?(cell_closest_to_mouse2) or state.hills.has_key?(cell_closest_to_mouse2)~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + if state.walls.has_key?(cell_closest_to_mouse2) or state.hills.has_key?(cell_closest_to_mouse2) +** Processing line: ~ state.walls.delete(cell_closest_to_mouse2)~ - Inside source: true *** True Line Result - -** Processing line: ~ # Labels the grids~ + state.walls.delete(cell_closest_to_mouse2) +** Processing line: ~ state.hills.delete(cell_closest_to_mouse2)~ - Inside source: true *** True Line Result - # Labels the grids -** Processing line: ~ def render_labels~ + state.hills.delete(cell_closest_to_mouse2) +** Processing line: ~ reset_search~ - Inside source: true *** True Line Result - def render_labels -** Processing line: ~ outputs.labels << [200, 625, "Without early exit"]~ + reset_search +** Processing line: ~ end~ - Inside source: true *** True Line Result - outputs.labels << [200, 625, "Without early exit"] -** Processing line: ~ outputs.labels << [875, 625, "With early exit"]~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - outputs.labels << [875, 625, "With early exit"] + end ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -68112,42 +75455,30 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Renders the path based off of the state.path hash~ -- Inside source: true -*** True Line Result - # Renders the path based off of the state.path hash -** Processing line: ~ def render_path~ -- Inside source: true -*** True Line Result - def render_path -** Processing line: ~ # If the star and target are disconnected there will only be one path~ -- Inside source: true -*** True Line Result - # If the star and target are disconnected there will only be one path -** Processing line: ~ # The path should not render in that case~ +** Processing line: ~ # Adds a hill in the first grid in the cell the mouse is over~ - Inside source: true *** True Line Result - # The path should not render in that case -** Processing line: ~ unless state.path.size == 1~ + # Adds a hill in the first grid in the cell the mouse is over +** Processing line: ~ def input_add_hill~ - Inside source: true *** True Line Result - unless state.path.size == 1 -** Processing line: ~ state.path.each_key do | cell |~ + def input_add_hill +** Processing line: ~ if mouse_over_grid?~ - Inside source: true *** True Line Result - state.path.each_key do | cell | -** Processing line: ~ # Renders path on both grids~ + if mouse_over_grid? +** Processing line: ~ unless state.hills.has_key?(cell_closest_to_mouse)~ - Inside source: true *** True Line Result - # Renders path on both grids -** Processing line: ~ outputs.solids << [scale_up(cell), path_color]~ + unless state.hills.has_key?(cell_closest_to_mouse) +** Processing line: ~ state.hills[cell_closest_to_mouse] = true~ - Inside source: true *** True Line Result - outputs.solids << [scale_up(cell), path_color] -** Processing line: ~ outputs.solids << [early_exit_scale_up(cell), path_color]~ + state.hills[cell_closest_to_mouse] = true +** Processing line: ~ reset_search~ - Inside source: true *** True Line Result - outputs.solids << [early_exit_scale_up(cell), path_color] + reset_search ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -68164,38 +75495,38 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Calculates the path from the target to the star after the search is over~ +** Processing line: ~~ - Inside source: true *** True Line Result - # Calculates the path from the target to the star after the search is over -** Processing line: ~ # Relies on the came_from hash~ + +** Processing line: ~ # Adds a hill in the second grid in the cell the mouse is over~ - Inside source: true *** True Line Result - # Relies on the came_from hash -** Processing line: ~ # Fills the state.path hash, which is later rendered on screen~ + # Adds a hill in the second grid in the cell the mouse is over +** Processing line: ~ def input_add_hill2~ - Inside source: true *** True Line Result - # Fills the state.path hash, which is later rendered on screen -** Processing line: ~ def calc_path~ + def input_add_hill2 +** Processing line: ~ if mouse_over_grid2?~ - Inside source: true *** True Line Result - def calc_path -** Processing line: ~ endpoint = state.target~ + if mouse_over_grid2? +** Processing line: ~ unless state.hills.has_key?(cell_closest_to_mouse2)~ - Inside source: true *** True Line Result - endpoint = state.target -** Processing line: ~ while endpoint~ + unless state.hills.has_key?(cell_closest_to_mouse2) +** Processing line: ~ state.hills[cell_closest_to_mouse2] = true~ - Inside source: true *** True Line Result - while endpoint -** Processing line: ~ state.path[endpoint] = true~ + state.hills[cell_closest_to_mouse2] = true +** Processing line: ~ reset_search~ - Inside source: true *** True Line Result - state.path[endpoint] = true -** Processing line: ~ endpoint = state.came_from[endpoint]~ + reset_search +** Processing line: ~ end~ - Inside source: true *** True Line Result - endpoint = state.came_from[endpoint] + end ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -68208,74 +75539,82 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Representation of how far away visited cells are from the star~ -- Inside source: true -*** True Line Result - # Representation of how far away visited cells are from the star -** Processing line: ~ # Replaces the render_visited method~ -- Inside source: true -*** True Line Result - # Replaces the render_visited method -** Processing line: ~ # Visually demonstrates the effectiveness of early exit for pathfinding~ +** Processing line: ~ # Adds a wall in the first grid in the cell the mouse is over~ - Inside source: true *** True Line Result - # Visually demonstrates the effectiveness of early exit for pathfinding -** Processing line: ~ def render_heat_map~ + # Adds a wall in the first grid in the cell the mouse is over +** Processing line: ~ def input_add_wall~ - Inside source: true *** True Line Result - def render_heat_map -** Processing line: ~ state.visited.each_key do | visited_cell |~ + def input_add_wall +** Processing line: ~ if mouse_over_grid?~ - Inside source: true *** True Line Result - state.visited.each_key do | visited_cell | -** Processing line: ~ distance = (state.star.x - visited_cell.x).abs + (state.star.y - visited_cell.y).abs~ + if mouse_over_grid? +** Processing line: ~ unless state.walls.has_key?(cell_closest_to_mouse)~ - Inside source: true *** True Line Result - distance = (state.star.x - visited_cell.x).abs + (state.star.y - visited_cell.y).abs -** Processing line: ~ max_distance = grid.width + grid.height~ + unless state.walls.has_key?(cell_closest_to_mouse) +** Processing line: ~ state.hills.delete(cell_closest_to_mouse)~ - Inside source: true *** True Line Result - max_distance = grid.width + grid.height -** Processing line: ~ alpha = 255.to_i * distance.to_i / max_distance.to_i~ + state.hills.delete(cell_closest_to_mouse) +** Processing line: ~ state.walls[cell_closest_to_mouse] = true~ - Inside source: true *** True Line Result - alpha = 255.to_i * distance.to_i / max_distance.to_i -** Processing line: ~ outputs.solids << [scale_up(visited_cell), red, alpha]~ + state.walls[cell_closest_to_mouse] = true +** Processing line: ~ reset_search~ - Inside source: true *** True Line Result - outputs.solids << [scale_up(visited_cell), red, alpha] -** Processing line: ~ # outputs.solids << [early_exit_scale_up(visited_cell), red, alpha]~ + reset_search +** Processing line: ~ end~ - Inside source: true *** True Line Result - # outputs.solids << [early_exit_scale_up(visited_cell), red, alpha] + end ** Processing line: ~ end~ - Inside source: true *** True Line Result end +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ state.early_exit_visited.each_key do | visited_cell |~ +** Processing line: ~ # Adds a wall in the second grid in the cell the mouse is over~ - Inside source: true *** True Line Result - state.early_exit_visited.each_key do | visited_cell | -** Processing line: ~ distance = (state.star.x - visited_cell.x).abs + (state.star.y - visited_cell.y).abs~ + # Adds a wall in the second grid in the cell the mouse is over +** Processing line: ~ def input_add_wall2~ - Inside source: true *** True Line Result - distance = (state.star.x - visited_cell.x).abs + (state.star.y - visited_cell.y).abs -** Processing line: ~ max_distance = grid.width + grid.height~ + def input_add_wall2 +** Processing line: ~ if mouse_over_grid2?~ - Inside source: true *** True Line Result - max_distance = grid.width + grid.height -** Processing line: ~ alpha = 255.to_i * distance.to_i / max_distance.to_i~ + if mouse_over_grid2? +** Processing line: ~ unless state.walls.has_key?(cell_closest_to_mouse2)~ - Inside source: true *** True Line Result - alpha = 255.to_i * distance.to_i / max_distance.to_i -** Processing line: ~ outputs.solids << [early_exit_scale_up(visited_cell), red, alpha]~ + unless state.walls.has_key?(cell_closest_to_mouse2) +** Processing line: ~ state.hills.delete(cell_closest_to_mouse2)~ - Inside source: true *** True Line Result - outputs.solids << [early_exit_scale_up(visited_cell), red, alpha] + state.hills.delete(cell_closest_to_mouse2) +** Processing line: ~ state.walls[cell_closest_to_mouse2] = true~ +- Inside source: true +*** True Line Result + state.walls[cell_closest_to_mouse2] = true +** Processing line: ~ reset_search~ +- Inside source: true +*** True Line Result + reset_search +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -68288,130 +75627,138 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Translates the given cell grid.width + 1 to the right and then scales up~ +** Processing line: ~ # Whenever the user edits the grid,~ - Inside source: true *** True Line Result - # Translates the given cell grid.width + 1 to the right and then scales up -** Processing line: ~ # Used to draw cells for the second grid~ + # Whenever the user edits the grid, +** Processing line: ~ # The search has to be reset_searchd upto the current step~ - Inside source: true *** True Line Result - # Used to draw cells for the second grid -** Processing line: ~ # This method does not work for lines,~ + # The search has to be reset_searchd upto the current step +** Processing line: ~ # with the current grid as the initial state of the grid~ - Inside source: true *** True Line Result - # This method does not work for lines, -** Processing line: ~ # so separate methods exist for the grid lines~ + # with the current grid as the initial state of the grid +** Processing line: ~ def reset_search~ - Inside source: true *** True Line Result - # so separate methods exist for the grid lines -** Processing line: ~ def early_exit_scale_up(cell)~ + def reset_search +** Processing line: ~ breadth_first_search.visited = {}~ - Inside source: true *** True Line Result - def early_exit_scale_up(cell) -** Processing line: ~ cell_clone = cell.clone~ + breadth_first_search.visited = {} +** Processing line: ~ breadth_first_search.frontier = []~ - Inside source: true *** True Line Result - cell_clone = cell.clone -** Processing line: ~ cell_clone.x += grid.width + 1~ + breadth_first_search.frontier = [] +** Processing line: ~ breadth_first_search.came_from = {}~ - Inside source: true *** True Line Result - cell_clone.x += grid.width + 1 -** Processing line: ~ scale_up(cell_clone)~ + breadth_first_search.came_from = {} +** Processing line: ~~ - Inside source: true *** True Line Result - scale_up(cell_clone) -** Processing line: ~ end~ + +** Processing line: ~ dijkstra_search.frontier = []~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + dijkstra_search.frontier = [] +** Processing line: ~ dijkstra_search.came_from = {}~ - Inside source: true *** True Line Result - -** Processing line: ~ # In code, the cells are represented as 1x1 rectangles~ + dijkstra_search.came_from = {} +** Processing line: ~ dijkstra_search.cost_so_far = {}~ - Inside source: true *** True Line Result - # In code, the cells are represented as 1x1 rectangles -** Processing line: ~ # When drawn, the cells are larger than 1x1 rectangles~ + dijkstra_search.cost_so_far = {} +** Processing line: ~ end~ - Inside source: true *** True Line Result - # When drawn, the cells are larger than 1x1 rectangles -** Processing line: ~ # This method is used to scale up cells, and lines~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - # This method is used to scale up cells, and lines -** Processing line: ~ # Objects are scaled up according to the grid.cell_size variable~ + +** Processing line: ~~ - Inside source: true *** True Line Result - # Objects are scaled up according to the grid.cell_size variable -** Processing line: ~ # This allows for easy customization of the visual scale of the grid~ + +** Processing line: ~~ - Inside source: true *** True Line Result - # This allows for easy customization of the visual scale of the grid -** Processing line: ~ def scale_up(cell)~ + +** Processing line: ~ # Returns a list of adjacent cells~ - Inside source: true *** True Line Result - def scale_up(cell) -** Processing line: ~ # Prevents the original value of cell from being edited~ + # Returns a list of adjacent cells +** Processing line: ~ # Used to determine what the next cells to be added to the frontier are~ - Inside source: true *** True Line Result - # Prevents the original value of cell from being edited -** Processing line: ~ cell = cell.clone~ + # Used to determine what the next cells to be added to the frontier are +** Processing line: ~ def adjacent_neighbors(cell)~ - Inside source: true *** True Line Result - cell = cell.clone + def adjacent_neighbors(cell) +** Processing line: ~ neighbors = []~ +- Inside source: true +*** True Line Result + neighbors = [] ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # If cell is just an x and y coordinate~ +** Processing line: ~ # Gets all the valid neighbors into the array~ - Inside source: true *** True Line Result - # If cell is just an x and y coordinate -** Processing line: ~ if cell.size == 2~ + # Gets all the valid neighbors into the array +** Processing line: ~ # From southern neighbor, clockwise~ - Inside source: true *** True Line Result - if cell.size == 2 -** Processing line: ~ # Add a width and height of 1~ + # From southern neighbor, clockwise +** Processing line: ~ neighbors << [cell.x , cell.y - 1] unless cell.y == 0~ - Inside source: true *** True Line Result - # Add a width and height of 1 -** Processing line: ~ cell << 1~ + neighbors << [cell.x , cell.y - 1] unless cell.y == 0 +** Processing line: ~ neighbors << [cell.x - 1, cell.y ] unless cell.x == 0~ - Inside source: true *** True Line Result - cell << 1 -** Processing line: ~ cell << 1~ + neighbors << [cell.x - 1, cell.y ] unless cell.x == 0 +** Processing line: ~ neighbors << [cell.x , cell.y + 1] unless cell.y == grid.height - 1~ - Inside source: true *** True Line Result - cell << 1 -** Processing line: ~ end~ + neighbors << [cell.x , cell.y + 1] unless cell.y == grid.height - 1 +** Processing line: ~ neighbors << [cell.x + 1, cell.y ] unless cell.x == grid.width - 1~ - Inside source: true *** True Line Result - end + neighbors << [cell.x + 1, cell.y ] unless cell.x == grid.width - 1 ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Scale all the values up~ +** Processing line: ~ # Sorts the neighbors so the rendered path is a zigzag path~ - Inside source: true *** True Line Result - # Scale all the values up -** Processing line: ~ cell.map! { |value| value * grid.cell_size }~ + # Sorts the neighbors so the rendered path is a zigzag path +** Processing line: ~ # Cells in a diagonal direction are given priority~ - Inside source: true *** True Line Result - cell.map! { |value| value * grid.cell_size } -** Processing line: ~~ + # Cells in a diagonal direction are given priority +** Processing line: ~ # Comment this line to see the difference~ - Inside source: true *** True Line Result - -** Processing line: ~ # Returns the scaled up cell~ + # Comment this line to see the difference +** Processing line: ~ neighbors = neighbors.sort_by { |neighbor_x, neighbor_y| proximity_to_star(neighbor_x, neighbor_y) }~ - Inside source: true *** True Line Result - # Returns the scaled up cell -** Processing line: ~ cell~ + neighbors = neighbors.sort_by { |neighbor_x, neighbor_y| proximity_to_star(neighbor_x, neighbor_y) } +** Processing line: ~~ - Inside source: true *** True Line Result - cell + +** Processing line: ~ neighbors~ +- Inside source: true +*** True Line Result + neighbors ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -68420,262 +75767,254 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # This method processes user input every tick~ -- Inside source: true -*** True Line Result - # This method processes user input every tick -** Processing line: ~ # Any method with "1" is related to the first grid~ +** Processing line: ~ # Finds the vertical and horizontal distance of a cell from the star~ - Inside source: true *** True Line Result - # Any method with "1" is related to the first grid -** Processing line: ~ # Any method with "2" is related to the second grid~ + # Finds the vertical and horizontal distance of a cell from the star +** Processing line: ~ # and returns the larger value~ - Inside source: true *** True Line Result - # Any method with "2" is related to the second grid -** Processing line: ~ def input~ + # and returns the larger value +** Processing line: ~ # This method is used to have a zigzag pattern in the rendered path~ - Inside source: true *** True Line Result - def input -** Processing line: ~ # The program has to remember that the user is dragging an object~ + # This method is used to have a zigzag pattern in the rendered path +** Processing line: ~ # A cell that is [5, 5] from the star,~ - Inside source: true *** True Line Result - # The program has to remember that the user is dragging an object -** Processing line: ~ # even when the mouse is no longer over that object~ + # A cell that is [5, 5] from the star, +** Processing line: ~ # is explored before over a cell that is [0, 7] away.~ - Inside source: true *** True Line Result - # even when the mouse is no longer over that object -** Processing line: ~ # So detecting input and processing input is separate~ + # is explored before over a cell that is [0, 7] away. +** Processing line: ~ # So, if possible, the search tries to go diagonal (zigzag) first~ - Inside source: true *** True Line Result - # So detecting input and processing input is separate -** Processing line: ~ detect_input~ + # So, if possible, the search tries to go diagonal (zigzag) first +** Processing line: ~ def proximity_to_star(x, y)~ - Inside source: true *** True Line Result - detect_input -** Processing line: ~ process_input~ + def proximity_to_star(x, y) +** Processing line: ~ distance_x = (state.star.x - x).abs~ - Inside source: true *** True Line Result - process_input -** Processing line: ~ end~ + distance_x = (state.star.x - x).abs +** Processing line: ~ distance_y = (state.star.y - y).abs~ - Inside source: true *** True Line Result - end + distance_y = (state.star.y - y).abs ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Determines what the user is editing and stores the value~ -- Inside source: true -*** True Line Result - # Determines what the user is editing and stores the value -** Processing line: ~ # Storing the value allows the user to continue the same edit as long as the~ +** Processing line: ~ if distance_x > distance_y~ - Inside source: true *** True Line Result - # Storing the value allows the user to continue the same edit as long as the -** Processing line: ~ # mouse left click is held~ + if distance_x > distance_y +** Processing line: ~ return distance_x~ - Inside source: true *** True Line Result - # mouse left click is held -** Processing line: ~ def detect_input~ + return distance_x +** Processing line: ~ else~ - Inside source: true *** True Line Result - def detect_input -** Processing line: ~ # When the mouse is up, nothing is being edited~ + else +** Processing line: ~ return distance_y~ - Inside source: true *** True Line Result - # When the mouse is up, nothing is being edited -** Processing line: ~ if inputs.mouse.up~ + return distance_y +** Processing line: ~ end~ - Inside source: true *** True Line Result - if inputs.mouse.up -** Processing line: ~ state.current_input = :none~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - state.current_input = :none -** Processing line: ~ # When the star in the no second grid is clicked~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - # When the star in the no second grid is clicked -** Processing line: ~ elsif star_clicked?~ + +** Processing line: ~ # When the user grabs the star and puts their cursor to the far right~ - Inside source: true *** True Line Result - elsif star_clicked? -** Processing line: ~ state.current_input = :star~ + # When the user grabs the star and puts their cursor to the far right +** Processing line: ~ # and moves up and down, the star is supposed to move along the grid as well~ - Inside source: true *** True Line Result - state.current_input = :star -** Processing line: ~ # When the star in the second grid is clicked~ + # and moves up and down, the star is supposed to move along the grid as well +** Processing line: ~ # Finding the cell closest to the mouse helps with this~ - Inside source: true *** True Line Result - # When the star in the second grid is clicked -** Processing line: ~ elsif star2_clicked?~ + # Finding the cell closest to the mouse helps with this +** Processing line: ~ def cell_closest_to_mouse~ - Inside source: true *** True Line Result - elsif star2_clicked? -** Processing line: ~ state.current_input = :star2~ + def cell_closest_to_mouse +** Processing line: ~ # Closest cell to the mouse in the first grid~ - Inside source: true *** True Line Result - state.current_input = :star2 -** Processing line: ~ # When the target in the no second grid is clicked~ + # Closest cell to the mouse in the first grid +** Processing line: ~ x = (inputs.mouse.point.x / grid.cell_size).to_i~ - Inside source: true *** True Line Result - # When the target in the no second grid is clicked -** Processing line: ~ elsif target_clicked?~ + x = (inputs.mouse.point.x / grid.cell_size).to_i +** Processing line: ~ y = (inputs.mouse.point.y / grid.cell_size).to_i~ - Inside source: true *** True Line Result - elsif target_clicked? -** Processing line: ~ state.current_input = :target~ + y = (inputs.mouse.point.y / grid.cell_size).to_i +** Processing line: ~ # Bound x and y to the grid~ - Inside source: true *** True Line Result - state.current_input = :target -** Processing line: ~ # When the target in the second grid is clicked~ + # Bound x and y to the grid +** Processing line: ~ x = grid.width - 1 if x > grid.width - 1~ - Inside source: true *** True Line Result - # When the target in the second grid is clicked -** Processing line: ~ elsif target2_clicked?~ + x = grid.width - 1 if x > grid.width - 1 +** Processing line: ~ y = grid.height - 1 if y > grid.height - 1~ - Inside source: true *** True Line Result - elsif target2_clicked? -** Processing line: ~ state.current_input = :target2~ + y = grid.height - 1 if y > grid.height - 1 +** Processing line: ~ # Return closest cell~ - Inside source: true *** True Line Result - state.current_input = :target2 -** Processing line: ~ # When a wall in the first grid is clicked~ + # Return closest cell +** Processing line: ~ [x, y]~ - Inside source: true *** True Line Result - # When a wall in the first grid is clicked -** Processing line: ~ elsif wall_clicked?~ + [x, y] +** Processing line: ~ end~ - Inside source: true *** True Line Result - elsif wall_clicked? -** Processing line: ~ state.current_input = :remove_wall~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - state.current_input = :remove_wall -** Processing line: ~ # When a wall in the second grid is clicked~ + +** Processing line: ~ # When the user grabs the star and puts their cursor to the far right~ - Inside source: true *** True Line Result - # When a wall in the second grid is clicked -** Processing line: ~ elsif wall2_clicked?~ + # When the user grabs the star and puts their cursor to the far right +** Processing line: ~ # and moves up and down, the star is supposed to move along the grid as well~ - Inside source: true *** True Line Result - elsif wall2_clicked? -** Processing line: ~ state.current_input = :remove_wall2~ + # and moves up and down, the star is supposed to move along the grid as well +** Processing line: ~ # Finding the cell closest to the mouse in the second grid helps with this~ - Inside source: true *** True Line Result - state.current_input = :remove_wall2 -** Processing line: ~ # When the first grid is clicked~ + # Finding the cell closest to the mouse in the second grid helps with this +** Processing line: ~ def cell_closest_to_mouse2~ - Inside source: true *** True Line Result - # When the first grid is clicked -** Processing line: ~ elsif grid_clicked?~ + def cell_closest_to_mouse2 +** Processing line: ~ # Closest cell grid to the mouse in the second~ - Inside source: true *** True Line Result - elsif grid_clicked? -** Processing line: ~ state.current_input = :add_wall~ + # Closest cell grid to the mouse in the second +** Processing line: ~ x = (inputs.mouse.point.x / grid.cell_size).to_i~ - Inside source: true *** True Line Result - state.current_input = :add_wall -** Processing line: ~ # When the second grid is clicked~ + x = (inputs.mouse.point.x / grid.cell_size).to_i +** Processing line: ~ y = (inputs.mouse.point.y / grid.cell_size).to_i~ - Inside source: true *** True Line Result - # When the second grid is clicked -** Processing line: ~ elsif grid2_clicked?~ + y = (inputs.mouse.point.y / grid.cell_size).to_i +** Processing line: ~ # Translate the cell to the first grid~ - Inside source: true *** True Line Result - elsif grid2_clicked? -** Processing line: ~ state.current_input = :add_wall2~ + # Translate the cell to the first grid +** Processing line: ~ x -= grid.width + 1~ - Inside source: true *** True Line Result - state.current_input = :add_wall2 -** Processing line: ~ end~ + x -= grid.width + 1 +** Processing line: ~ # Bound x and y to the first grid~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + # Bound x and y to the first grid +** Processing line: ~ x = 0 if x < 0~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + x = 0 if x < 0 +** Processing line: ~ y = 0 if y < 0~ - Inside source: true *** True Line Result - -** Processing line: ~ # Processes click and drag based on what the user is currently dragging~ + y = 0 if y < 0 +** Processing line: ~ x = grid.width - 1 if x > grid.width - 1~ - Inside source: true *** True Line Result - # Processes click and drag based on what the user is currently dragging -** Processing line: ~ def process_input~ + x = grid.width - 1 if x > grid.width - 1 +** Processing line: ~ y = grid.height - 1 if y > grid.height - 1~ - Inside source: true *** True Line Result - def process_input -** Processing line: ~ if state.current_input == :star~ + y = grid.height - 1 if y > grid.height - 1 +** Processing line: ~ # Return closest cell~ - Inside source: true *** True Line Result - if state.current_input == :star -** Processing line: ~ input_star~ + # Return closest cell +** Processing line: ~ [x, y]~ - Inside source: true *** True Line Result - input_star -** Processing line: ~ elsif state.current_input == :star2~ + [x, y] +** Processing line: ~ end~ - Inside source: true *** True Line Result - elsif state.current_input == :star2 -** Processing line: ~ input_star2~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - input_star2 -** Processing line: ~ elsif state.current_input == :target~ + +** Processing line: ~ # Signal that the user is going to be moving the star from the first grid~ - Inside source: true *** True Line Result - elsif state.current_input == :target -** Processing line: ~ input_target~ + # Signal that the user is going to be moving the star from the first grid +** Processing line: ~ def mouse_over_star?~ - Inside source: true *** True Line Result - input_target -** Processing line: ~ elsif state.current_input == :target2~ + def mouse_over_star? +** Processing line: ~ inputs.mouse.point.inside_rect?(scale_up(state.star))~ - Inside source: true *** True Line Result - elsif state.current_input == :target2 -** Processing line: ~ input_target2~ + inputs.mouse.point.inside_rect?(scale_up(state.star)) +** Processing line: ~ end~ - Inside source: true *** True Line Result - input_target2 -** Processing line: ~ elsif state.current_input == :remove_wall~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - elsif state.current_input == :remove_wall -** Processing line: ~ input_remove_wall~ + +** Processing line: ~ # Signal that the user is going to be moving the star from the second grid~ - Inside source: true *** True Line Result - input_remove_wall -** Processing line: ~ elsif state.current_input == :remove_wall2~ + # Signal that the user is going to be moving the star from the second grid +** Processing line: ~ def mouse_over_star2?~ - Inside source: true *** True Line Result - elsif state.current_input == :remove_wall2 -** Processing line: ~ input_remove_wall2~ + def mouse_over_star2? +** Processing line: ~ inputs.mouse.point.inside_rect?(move_and_scale_up(state.star))~ - Inside source: true *** True Line Result - input_remove_wall2 -** Processing line: ~ elsif state.current_input == :add_wall~ + inputs.mouse.point.inside_rect?(move_and_scale_up(state.star)) +** Processing line: ~ end~ - Inside source: true *** True Line Result - elsif state.current_input == :add_wall -** Processing line: ~ input_add_wall~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - input_add_wall -** Processing line: ~ elsif state.current_input == :add_wall2~ + +** Processing line: ~ # Signal that the user is going to be moving the target from the first grid~ - Inside source: true *** True Line Result - elsif state.current_input == :add_wall2 -** Processing line: ~ input_add_wall2~ + # Signal that the user is going to be moving the target from the first grid +** Processing line: ~ def mouse_over_target?~ - Inside source: true *** True Line Result - input_add_wall2 -** Processing line: ~ end~ + def mouse_over_target? +** Processing line: ~ inputs.mouse.point.inside_rect?(scale_up(state.target))~ - Inside source: true *** True Line Result - end + inputs.mouse.point.inside_rect?(scale_up(state.target)) ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -68684,130 +76023,126 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Moves the star to the cell closest to the mouse in the first grid~ +** Processing line: ~ # Signal that the user is going to be moving the target from the second grid~ - Inside source: true *** True Line Result - # Moves the star to the cell closest to the mouse in the first grid -** Processing line: ~ # Only resets the search if the star changes position~ + # Signal that the user is going to be moving the target from the second grid +** Processing line: ~ def mouse_over_target2?~ - Inside source: true *** True Line Result - # Only resets the search if the star changes position -** Processing line: ~ # Called whenever the user is editing the star (puts mouse down on star)~ + def mouse_over_target2? +** Processing line: ~ inputs.mouse.point.inside_rect?(move_and_scale_up(state.target))~ - Inside source: true *** True Line Result - # Called whenever the user is editing the star (puts mouse down on star) -** Processing line: ~ def input_star~ + inputs.mouse.point.inside_rect?(move_and_scale_up(state.target)) +** Processing line: ~ end~ - Inside source: true *** True Line Result - def input_star -** Processing line: ~ old_star = state.star.clone~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - old_star = state.star.clone -** Processing line: ~ state.star = cell_closest_to_mouse~ + +** Processing line: ~ # Signal that the user is going to be removing walls from the first grid~ - Inside source: true *** True Line Result - state.star = cell_closest_to_mouse -** Processing line: ~ unless old_star == state.star~ + # Signal that the user is going to be removing walls from the first grid +** Processing line: ~ def mouse_over_wall?~ - Inside source: true *** True Line Result - unless old_star == state.star -** Processing line: ~ reset_search~ + def mouse_over_wall? +** Processing line: ~ state.walls.each_key do | wall |~ - Inside source: true *** True Line Result - reset_search -** Processing line: ~ end~ + state.walls.each_key do | wall | +** Processing line: ~ return true if inputs.mouse.point.inside_rect?(scale_up(wall))~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + return true if inputs.mouse.point.inside_rect?(scale_up(wall)) +** Processing line: ~ end~ - Inside source: true *** True Line Result - end + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Moves the star to the cell closest to the mouse in the second grid~ -- Inside source: true -*** True Line Result - # Moves the star to the cell closest to the mouse in the second grid -** Processing line: ~ # Only resets the search if the star changes position~ +** Processing line: ~ false~ - Inside source: true *** True Line Result - # Only resets the search if the star changes position -** Processing line: ~ # Called whenever the user is editing the star (puts mouse down on star)~ + false +** Processing line: ~ end~ - Inside source: true *** True Line Result - # Called whenever the user is editing the star (puts mouse down on star) -** Processing line: ~ def input_star2~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - def input_star2 -** Processing line: ~ old_star = state.star.clone~ + +** Processing line: ~ # Signal that the user is going to be removing walls from the second grid~ - Inside source: true *** True Line Result - old_star = state.star.clone -** Processing line: ~ state.star = cell_closest_to_mouse2~ + # Signal that the user is going to be removing walls from the second grid +** Processing line: ~ def mouse_over_wall2?~ - Inside source: true *** True Line Result - state.star = cell_closest_to_mouse2 -** Processing line: ~ unless old_star == state.star~ + def mouse_over_wall2? +** Processing line: ~ state.walls.each_key do | wall |~ - Inside source: true *** True Line Result - unless old_star == state.star -** Processing line: ~ reset_search~ + state.walls.each_key do | wall | +** Processing line: ~ return true if inputs.mouse.point.inside_rect?(move_and_scale_up(wall))~ - Inside source: true *** True Line Result - reset_search + return true if inputs.mouse.point.inside_rect?(move_and_scale_up(wall)) ** Processing line: ~ end~ - Inside source: true *** True Line Result end -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Moves the target to the grid closest to the mouse in the first grid~ -- Inside source: true -*** True Line Result - # Moves the target to the grid closest to the mouse in the first grid -** Processing line: ~ # Only reset_searchs the search if the target changes position~ +** Processing line: ~ false~ - Inside source: true *** True Line Result - # Only reset_searchs the search if the target changes position -** Processing line: ~ # Called whenever the user is editing the target (puts mouse down on target)~ + false +** Processing line: ~ end~ - Inside source: true *** True Line Result - # Called whenever the user is editing the target (puts mouse down on target) -** Processing line: ~ def input_target~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - def input_target -** Processing line: ~ old_target = state.target.clone~ + +** Processing line: ~ # Signal that the user is going to be removing hills from the first grid~ - Inside source: true *** True Line Result - old_target = state.target.clone -** Processing line: ~ state.target = cell_closest_to_mouse~ + # Signal that the user is going to be removing hills from the first grid +** Processing line: ~ def mouse_over_hill?~ - Inside source: true *** True Line Result - state.target = cell_closest_to_mouse -** Processing line: ~ unless old_target == state.target~ + def mouse_over_hill? +** Processing line: ~ state.hills.each_key do | hill |~ - Inside source: true *** True Line Result - unless old_target == state.target -** Processing line: ~ reset_search~ + state.hills.each_key do | hill | +** Processing line: ~ return true if inputs.mouse.point.inside_rect?(scale_up(hill))~ - Inside source: true *** True Line Result - reset_search + return true if inputs.mouse.point.inside_rect?(scale_up(hill)) ** Processing line: ~ end~ - Inside source: true *** True Line Result end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ false~ +- Inside source: true +*** True Line Result + false ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -68816,42 +76151,54 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Moves the target to the cell closest to the mouse in the second grid~ +** Processing line: ~ # Signal that the user is going to be removing hills from the second grid~ - Inside source: true *** True Line Result - # Moves the target to the cell closest to the mouse in the second grid -** Processing line: ~ # Only reset_searchs the search if the target changes position~ + # Signal that the user is going to be removing hills from the second grid +** Processing line: ~ def mouse_over_hill2?~ - Inside source: true *** True Line Result - # Only reset_searchs the search if the target changes position -** Processing line: ~ # Called whenever the user is editing the target (puts mouse down on target)~ + def mouse_over_hill2? +** Processing line: ~ state.hills.each_key do | hill |~ - Inside source: true *** True Line Result - # Called whenever the user is editing the target (puts mouse down on target) -** Processing line: ~ def input_target2~ + state.hills.each_key do | hill | +** Processing line: ~ return true if inputs.mouse.point.inside_rect?(move_and_scale_up(hill))~ - Inside source: true *** True Line Result - def input_target2 -** Processing line: ~ old_target = state.target.clone~ + return true if inputs.mouse.point.inside_rect?(move_and_scale_up(hill)) +** Processing line: ~ end~ - Inside source: true *** True Line Result - old_target = state.target.clone -** Processing line: ~ state.target = cell_closest_to_mouse2~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - state.target = cell_closest_to_mouse2 -** Processing line: ~ unless old_target == state.target~ + +** Processing line: ~ false~ - Inside source: true *** True Line Result - unless old_target == state.target -** Processing line: ~ reset_search~ + false +** Processing line: ~ end~ - Inside source: true *** True Line Result - reset_search -** Processing line: ~ end~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - end + +** Processing line: ~ # Signal that the user is going to be adding walls from the first grid~ +- Inside source: true +*** True Line Result + # Signal that the user is going to be adding walls from the first grid +** Processing line: ~ def mouse_over_grid?~ +- Inside source: true +*** True Line Result + def mouse_over_grid? +** Processing line: ~ inputs.mouse.point.inside_rect?(scale_up(grid.rect))~ +- Inside source: true +*** True Line Result + inputs.mouse.point.inside_rect?(scale_up(grid.rect)) ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -68860,50 +76207,46 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Removes walls in the first grid that are under the cursor~ -- Inside source: true -*** True Line Result - # Removes walls in the first grid that are under the cursor -** Processing line: ~ def input_remove_wall~ +** Processing line: ~ # Signal that the user is going to be adding walls from the second grid~ - Inside source: true *** True Line Result - def input_remove_wall -** Processing line: ~ # The mouse needs to be inside the grid, because we only want to remove walls~ + # Signal that the user is going to be adding walls from the second grid +** Processing line: ~ def mouse_over_grid2?~ - Inside source: true *** True Line Result - # The mouse needs to be inside the grid, because we only want to remove walls -** Processing line: ~ # the cursor is directly over~ + def mouse_over_grid2? +** Processing line: ~ inputs.mouse.point.inside_rect?(move_and_scale_up(grid.rect))~ - Inside source: true *** True Line Result - # the cursor is directly over -** Processing line: ~ # Recalculations should only occur when a wall is actually deleted~ + inputs.mouse.point.inside_rect?(move_and_scale_up(grid.rect)) +** Processing line: ~ end~ - Inside source: true *** True Line Result - # Recalculations should only occur when a wall is actually deleted -** Processing line: ~ if mouse_inside_grid?~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - if mouse_inside_grid? -** Processing line: ~ if state.walls.has_key?(cell_closest_to_mouse)~ + +** Processing line: ~ # These methods provide handy aliases to colors~ - Inside source: true *** True Line Result - if state.walls.has_key?(cell_closest_to_mouse) -** Processing line: ~ state.walls.delete(cell_closest_to_mouse)~ + # These methods provide handy aliases to colors +** Processing line: ~~ - Inside source: true *** True Line Result - state.walls.delete(cell_closest_to_mouse) -** Processing line: ~ reset_search~ + +** Processing line: ~ # Light brown~ - Inside source: true *** True Line Result - reset_search -** Processing line: ~ end~ + # Light brown +** Processing line: ~ def unvisited_color~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + def unvisited_color +** Processing line: ~ [221, 212, 213]~ - Inside source: true *** True Line Result - end + [221, 212, 213] ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -68912,50 +76255,54 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Removes walls in the second grid that are under the cursor~ +** Processing line: ~ # Camo Green~ - Inside source: true *** True Line Result - # Removes walls in the second grid that are under the cursor -** Processing line: ~ def input_remove_wall2~ + # Camo Green +** Processing line: ~ def wall_color~ - Inside source: true *** True Line Result - def input_remove_wall2 -** Processing line: ~ # The mouse needs to be inside the grid, because we only want to remove walls~ + def wall_color +** Processing line: ~ [134, 134, 120]~ - Inside source: true *** True Line Result - # The mouse needs to be inside the grid, because we only want to remove walls -** Processing line: ~ # the cursor is directly over~ + [134, 134, 120] +** Processing line: ~ end~ - Inside source: true *** True Line Result - # the cursor is directly over -** Processing line: ~ # Recalculations should only occur when a wall is actually deleted~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - # Recalculations should only occur when a wall is actually deleted -** Processing line: ~ if mouse_inside_grid2?~ + +** Processing line: ~ # Pastel White~ - Inside source: true *** True Line Result - if mouse_inside_grid2? -** Processing line: ~ if state.walls.has_key?(cell_closest_to_mouse2)~ + # Pastel White +** Processing line: ~ def path_color~ - Inside source: true *** True Line Result - if state.walls.has_key?(cell_closest_to_mouse2) -** Processing line: ~ state.walls.delete(cell_closest_to_mouse2)~ + def path_color +** Processing line: ~ [231, 230, 228]~ - Inside source: true *** True Line Result - state.walls.delete(cell_closest_to_mouse2) -** Processing line: ~ reset_search~ + [231, 230, 228] +** Processing line: ~ end~ - Inside source: true *** True Line Result - reset_search -** Processing line: ~ end~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + +** Processing line: ~ def red~ - Inside source: true *** True Line Result - end + def red +** Processing line: ~ [255, 0, 0]~ +- Inside source: true +*** True Line Result + [255, 0, 0] ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -68964,38 +76311,38 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Adds a wall in the first grid in the cell the mouse is over~ +** Processing line: ~ # A Green~ - Inside source: true *** True Line Result - # Adds a wall in the first grid in the cell the mouse is over -** Processing line: ~ def input_add_wall~ + # A Green +** Processing line: ~ def hill_color~ - Inside source: true *** True Line Result - def input_add_wall -** Processing line: ~ if mouse_inside_grid?~ + def hill_color +** Processing line: ~ [139, 173, 132]~ - Inside source: true *** True Line Result - if mouse_inside_grid? -** Processing line: ~ unless state.walls.has_key?(cell_closest_to_mouse)~ + [139, 173, 132] +** Processing line: ~ end~ - Inside source: true *** True Line Result - unless state.walls.has_key?(cell_closest_to_mouse) -** Processing line: ~ state.walls[cell_closest_to_mouse] = true~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - state.walls[cell_closest_to_mouse] = true -** Processing line: ~ reset_search~ + +** Processing line: ~ # Makes code more concise~ - Inside source: true *** True Line Result - reset_search -** Processing line: ~ end~ + # Makes code more concise +** Processing line: ~ def grid~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + def grid +** Processing line: ~ state.grid~ - Inside source: true *** True Line Result - end + state.grid ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -69004,90 +76351,78 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ # Adds a wall in the second grid in the cell the mouse is over~ -- Inside source: true -*** True Line Result - # Adds a wall in the second grid in the cell the mouse is over -** Processing line: ~ def input_add_wall2~ -- Inside source: true -*** True Line Result - def input_add_wall2 -** Processing line: ~ if mouse_inside_grid2?~ +** Processing line: ~ def breadth_first_search~ - Inside source: true *** True Line Result - if mouse_inside_grid2? -** Processing line: ~ unless state.walls.has_key?(cell_closest_to_mouse2)~ + def breadth_first_search +** Processing line: ~ state.breadth_first_search~ - Inside source: true *** True Line Result - unless state.walls.has_key?(cell_closest_to_mouse2) -** Processing line: ~ state.walls[cell_closest_to_mouse2] = true~ + state.breadth_first_search +** Processing line: ~ end~ - Inside source: true *** True Line Result - state.walls[cell_closest_to_mouse2] = true -** Processing line: ~ reset_search~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - reset_search -** Processing line: ~ end~ + +** Processing line: ~ def dijkstra_search~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + def dijkstra_search +** Processing line: ~ state.dijkstra_search~ - Inside source: true *** True Line Result - end + state.dijkstra_search ** Processing line: ~ end~ - Inside source: true *** True Line Result end -** Processing line: ~~ +** Processing line: ~ end~ - Inside source: true *** True Line Result - -** Processing line: ~ # Whenever the user edits the grid,~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - # Whenever the user edits the grid, -** Processing line: ~ # The search has to be reset_searchd upto the current step~ + +** Processing line: ~ # Method that is called by DragonRuby periodically~ - Inside source: true *** True Line Result - # The search has to be reset_searchd upto the current step -** Processing line: ~ # with the current grid as the initial state of the grid~ + # Method that is called by DragonRuby periodically +** Processing line: ~ # Used for updating animations and calculations~ - Inside source: true *** True Line Result - # with the current grid as the initial state of the grid -** Processing line: ~ def reset_search~ + # Used for updating animations and calculations +** Processing line: ~ def tick args~ - Inside source: true *** True Line Result - def reset_search -** Processing line: ~ # Reset_Searchs the search~ + def tick args +** Processing line: ~~ - Inside source: true *** True Line Result - # Reset_Searchs the search -** Processing line: ~ state.frontier = []~ + +** Processing line: ~ # Pressing r will reset the application~ - Inside source: true *** True Line Result - state.frontier = [] -** Processing line: ~ state.visited = {}~ + # Pressing r will reset the application +** Processing line: ~ if args.inputs.keyboard.key_down.r~ - Inside source: true *** True Line Result - state.visited = {} -** Processing line: ~ state.early_exit_visited = {}~ + if args.inputs.keyboard.key_down.r +** Processing line: ~ args.gtk.reset~ - Inside source: true *** True Line Result - state.early_exit_visited = {} -** Processing line: ~ state.came_from = {}~ + args.gtk.reset +** Processing line: ~ reset~ - Inside source: true *** True Line Result - state.came_from = {} -** Processing line: ~ state.path = {}~ + reset +** Processing line: ~ return~ - Inside source: true *** True Line Result - state.path = {} + return ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -69096,134 +76431,154 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Moves the search forward one step~ +** Processing line: ~ # Every tick, new args are passed, and the Dijkstra tick method is called~ - Inside source: true *** True Line Result - # Moves the search forward one step -** Processing line: ~ def step~ + # Every tick, new args are passed, and the Dijkstra tick method is called +** Processing line: ~ $movement_costs ||= Movement_Costs.new(args)~ - Inside source: true *** True Line Result - def step -** Processing line: ~ # The setup to the search~ + $movement_costs ||= Movement_Costs.new(args) +** Processing line: ~ $movement_costs.args = args~ - Inside source: true *** True Line Result - # The setup to the search -** Processing line: ~ # Runs once when there are no visited cells~ + $movement_costs.args = args +** Processing line: ~ $movement_costs.tick~ - Inside source: true *** True Line Result - # Runs once when there are no visited cells -** Processing line: ~ if state.visited.empty?~ + $movement_costs.tick +** Processing line: ~ end~ - Inside source: true *** True Line Result - if state.visited.empty? -** Processing line: ~ state.visited[state.star] = true~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - state.visited[state.star] = true -** Processing line: ~ state.early_exit_visited[state.star] = true~ + +** Processing line: ~~ - Inside source: true *** True Line Result - state.early_exit_visited[state.star] = true -** Processing line: ~ state.frontier << state.star~ + +** Processing line: ~ def reset~ - Inside source: true *** True Line Result - state.frontier << state.star -** Processing line: ~ state.came_from[state.star] = nil~ + def reset +** Processing line: ~ $movement_costs = nil~ - Inside source: true *** True Line Result - state.came_from[state.star] = nil -** Processing line: ~ end~ + $movement_costs = nil +** Processing line: ~ end~ - Inside source: true *** True Line Result - end + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # A step in the search~ +** Processing line: ~#+end_src~ +- Line was identified as the end of a code block. +*** True Line Result +#+end_src +** Processing line: ~~ +- End of paragraph detected. +*** True Line Result + +** Processing line: ~*** Path Finding Algorithms - Heuristic - main.rb~ +- Header detected. +*** True Line Result + +*** True Line Result +*** Path Finding Algorithms - Heuristic - main.rb +** Processing line: ~#+begin_src ruby~ +- Line was identified as the beginning of a code block. +*** True Line Result + +*** True Line Result +#+begin_src ruby +** Processing line: ~ # ./samples/13_path_finding_algorithms/06_heuristic/app/main.rb~ - Inside source: true *** True Line Result - # A step in the search -** Processing line: ~ unless state.frontier.empty?~ + # ./samples/13_path_finding_algorithms/06_heuristic/app/main.rb +** Processing line: ~ # This program is inspired by https://www.redblobgames.com/pathfinding/a-star/introduction.html~ - Inside source: true *** True Line Result - unless state.frontier.empty? -** Processing line: ~ # Takes the next frontier cell~ + # This program is inspired by https://www.redblobgames.com/pathfinding/a-star/introduction.html +** Processing line: ~~ - Inside source: true *** True Line Result - # Takes the next frontier cell -** Processing line: ~ new_frontier = state.frontier.shift~ + +** Processing line: ~ # This time the heuristic search still explored less of the grid, hence finishing faster.~ - Inside source: true *** True Line Result - new_frontier = state.frontier.shift -** Processing line: ~ # For each of its neighbors~ + # This time the heuristic search still explored less of the grid, hence finishing faster. +** Processing line: ~ # However, it did not find the shortest path between the star and the target.~ - Inside source: true *** True Line Result - # For each of its neighbors -** Processing line: ~ adjacent_neighbors(new_frontier).each do |neighbor|~ + # However, it did not find the shortest path between the star and the target. +** Processing line: ~~ - Inside source: true *** True Line Result - adjacent_neighbors(new_frontier).each do |neighbor| -** Processing line: ~ # That have not been visited and are not walls~ + +** Processing line: ~ # The only difference between this app and Heuristic is the change of the starting position.~ - Inside source: true *** True Line Result - # That have not been visited and are not walls -** Processing line: ~ unless state.visited.has_key?(neighbor) || state.walls.has_key?(neighbor)~ + # The only difference between this app and Heuristic is the change of the starting position. +** Processing line: ~~ - Inside source: true *** True Line Result - unless state.visited.has_key?(neighbor) || state.walls.has_key?(neighbor) -** Processing line: ~ # Add them to the frontier and mark them as visited in the first grid~ + +** Processing line: ~ class Heuristic_With_Walls~ - Inside source: true *** True Line Result - # Add them to the frontier and mark them as visited in the first grid -** Processing line: ~ state.visited[neighbor] = true~ + class Heuristic_With_Walls +** Processing line: ~ attr_gtk~ - Inside source: true *** True Line Result - state.visited[neighbor] = true -** Processing line: ~ # Unless the target has been visited~ + attr_gtk +** Processing line: ~~ - Inside source: true *** True Line Result - # Unless the target has been visited -** Processing line: ~ unless state.visited.has_key?(state.target)~ + +** Processing line: ~ def tick~ - Inside source: true *** True Line Result - unless state.visited.has_key?(state.target) -** Processing line: ~ # Mark the neighbor as visited in the second grid as well~ + def tick +** Processing line: ~ defaults~ - Inside source: true *** True Line Result - # Mark the neighbor as visited in the second grid as well -** Processing line: ~ state.early_exit_visited[neighbor] = true~ + defaults +** Processing line: ~ render~ - Inside source: true *** True Line Result - state.early_exit_visited[neighbor] = true -** Processing line: ~ end~ + render +** Processing line: ~ input~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + input +** Processing line: ~ # If animation is playing, and max steps have not been reached~ - Inside source: true *** True Line Result - -** Processing line: ~ # Add the neighbor to the frontier and remember which cell it came from~ + # If animation is playing, and max steps have not been reached +** Processing line: ~ # Move the search a step forward~ - Inside source: true *** True Line Result - # Add the neighbor to the frontier and remember which cell it came from -** Processing line: ~ state.frontier << neighbor~ + # Move the search a step forward +** Processing line: ~ if state.play && state.current_step < state.max_steps~ - Inside source: true *** True Line Result - state.frontier << neighbor -** Processing line: ~ state.came_from[neighbor] = new_frontier~ + if state.play && state.current_step < state.max_steps +** Processing line: ~ # Variable that tells the program what step to recalculate up to~ - Inside source: true *** True Line Result - state.came_from[neighbor] = new_frontier -** Processing line: ~ end~ + # Variable that tells the program what step to recalculate up to +** Processing line: ~ state.current_step += 1~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + state.current_step += 1 +** Processing line: ~ move_searches_one_step_forward~ - Inside source: true *** True Line Result - end + move_searches_one_step_forward ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -69236,350 +76591,358 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~~ +** Processing line: ~ def defaults~ - Inside source: true *** True Line Result - -** Processing line: ~ # Returns a list of adjacent cells~ + def defaults +** Processing line: ~ # Variables to edit the size and appearance of the grid~ - Inside source: true *** True Line Result - # Returns a list of adjacent cells -** Processing line: ~ # Used to determine what the next cells to be added to the frontier are~ + # Variables to edit the size and appearance of the grid +** Processing line: ~ # Freely customizable to user's liking~ - Inside source: true *** True Line Result - # Used to determine what the next cells to be added to the frontier are -** Processing line: ~ def adjacent_neighbors(cell)~ + # Freely customizable to user's liking +** Processing line: ~ grid.width ||= 15~ - Inside source: true *** True Line Result - def adjacent_neighbors(cell) -** Processing line: ~ neighbors = []~ + grid.width ||= 15 +** Processing line: ~ grid.height ||= 15~ - Inside source: true *** True Line Result - neighbors = [] -** Processing line: ~~ + grid.height ||= 15 +** Processing line: ~ grid.cell_size ||= 40~ - Inside source: true *** True Line Result - -** Processing line: ~ # Gets all the valid neighbors into the array~ + grid.cell_size ||= 40 +** Processing line: ~ grid.rect ||= [0, 0, grid.width, grid.height]~ - Inside source: true *** True Line Result - # Gets all the valid neighbors into the array -** Processing line: ~ # From southern neighbor, clockwise~ + grid.rect ||= [0, 0, grid.width, grid.height] +** Processing line: ~~ - Inside source: true *** True Line Result - # From southern neighbor, clockwise -** Processing line: ~ neighbors << [cell.x, cell.y - 1] unless cell.y == 0~ + +** Processing line: ~ grid.star ||= [0, 2]~ - Inside source: true *** True Line Result - neighbors << [cell.x, cell.y - 1] unless cell.y == 0 -** Processing line: ~ neighbors << [cell.x - 1, cell.y] unless cell.x == 0~ + grid.star ||= [0, 2] +** Processing line: ~ grid.target ||= [14, 12]~ - Inside source: true *** True Line Result - neighbors << [cell.x - 1, cell.y] unless cell.x == 0 -** Processing line: ~ neighbors << [cell.x, cell.y + 1] unless cell.y == grid.height - 1~ + grid.target ||= [14, 12] +** Processing line: ~ grid.walls ||= {}~ - Inside source: true *** True Line Result - neighbors << [cell.x, cell.y + 1] unless cell.y == grid.height - 1 -** Processing line: ~ neighbors << [cell.x + 1, cell.y] unless cell.x == grid.width - 1~ + grid.walls ||= {} +** Processing line: ~ # There are no hills in the Heuristic Search Demo~ - Inside source: true *** True Line Result - neighbors << [cell.x + 1, cell.y] unless cell.x == grid.width - 1 + # There are no hills in the Heuristic Search Demo ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Sorts the neighbors so the rendered path is a zigzag path~ +** Processing line: ~ # What the user is currently editing on the grid~ - Inside source: true *** True Line Result - # Sorts the neighbors so the rendered path is a zigzag path -** Processing line: ~ # Cells in a diagonal direction are given priority~ + # What the user is currently editing on the grid +** Processing line: ~ # We store this value, because we want to remember the value even when~ - Inside source: true *** True Line Result - # Cells in a diagonal direction are given priority -** Processing line: ~ # Comment this line to see the difference~ + # We store this value, because we want to remember the value even when +** Processing line: ~ # the user's cursor is no longer over what they're interacting with, but~ - Inside source: true *** True Line Result - # Comment this line to see the difference -** Processing line: ~ neighbors = neighbors.sort_by { |neighbor_x, neighbor_y| proximity_to_star(neighbor_x, neighbor_y) }~ + # the user's cursor is no longer over what they're interacting with, but +** Processing line: ~ # they are still clicking down on the mouse.~ - Inside source: true *** True Line Result - neighbors = neighbors.sort_by { |neighbor_x, neighbor_y| proximity_to_star(neighbor_x, neighbor_y) } -** Processing line: ~~ + # they are still clicking down on the mouse. +** Processing line: ~ state.user_input ||= :none~ - Inside source: true *** True Line Result - -** Processing line: ~ neighbors~ + state.user_input ||= :none +** Processing line: ~~ - Inside source: true *** True Line Result - neighbors -** Processing line: ~ end~ + +** Processing line: ~ # These variables allow the breadth first search to take place~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + # These variables allow the breadth first search to take place +** Processing line: ~ # Came_from is a hash with a key of a cell and a value of the cell that was expanded from to find the key.~ - Inside source: true *** True Line Result - -** Processing line: ~ # Finds the vertical and horizontal distance of a cell from the star~ + # Came_from is a hash with a key of a cell and a value of the cell that was expanded from to find the key. +** Processing line: ~ # Used to prevent searching cells that have already been found~ - Inside source: true *** True Line Result - # Finds the vertical and horizontal distance of a cell from the star -** Processing line: ~ # and returns the larger value~ + # Used to prevent searching cells that have already been found +** Processing line: ~ # and to trace a path from the target back to the starting point.~ - Inside source: true *** True Line Result - # and returns the larger value -** Processing line: ~ # This method is used to have a zigzag pattern in the rendered path~ + # and to trace a path from the target back to the starting point. +** Processing line: ~ # Frontier is an array of cells to expand the search from.~ - Inside source: true *** True Line Result - # This method is used to have a zigzag pattern in the rendered path -** Processing line: ~ # A cell that is [5, 5] from the star,~ + # Frontier is an array of cells to expand the search from. +** Processing line: ~ # The search is over when there are no more cells to search from.~ - Inside source: true *** True Line Result - # A cell that is [5, 5] from the star, -** Processing line: ~ # is explored before over a cell that is [0, 7] away.~ + # The search is over when there are no more cells to search from. +** Processing line: ~ # Path stores the path from the target to the star, once the target has been found~ - Inside source: true *** True Line Result - # is explored before over a cell that is [0, 7] away. -** Processing line: ~ # So, if possible, the search tries to go diagonal (zigzag) first~ + # Path stores the path from the target to the star, once the target has been found +** Processing line: ~ # It prevents calculating the path every tick.~ - Inside source: true *** True Line Result - # So, if possible, the search tries to go diagonal (zigzag) first -** Processing line: ~ def proximity_to_star(x, y)~ + # It prevents calculating the path every tick. +** Processing line: ~ bfs.came_from ||= {}~ - Inside source: true *** True Line Result - def proximity_to_star(x, y) -** Processing line: ~ distance_x = (state.star.x - x).abs~ + bfs.came_from ||= {} +** Processing line: ~ bfs.frontier ||= []~ - Inside source: true *** True Line Result - distance_x = (state.star.x - x).abs -** Processing line: ~ distance_y = (state.star.y - y).abs~ + bfs.frontier ||= [] +** Processing line: ~ bfs.path ||= []~ - Inside source: true *** True Line Result - distance_y = (state.star.y - y).abs + bfs.path ||= [] ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ if distance_x > distance_y~ +** Processing line: ~ heuristic.came_from ||= {}~ - Inside source: true *** True Line Result - if distance_x > distance_y -** Processing line: ~ return distance_x~ + heuristic.came_from ||= {} +** Processing line: ~ heuristic.frontier ||= []~ - Inside source: true *** True Line Result - return distance_x -** Processing line: ~ else~ + heuristic.frontier ||= [] +** Processing line: ~ heuristic.path ||= []~ - Inside source: true *** True Line Result - else -** Processing line: ~ return distance_y~ + heuristic.path ||= [] +** Processing line: ~~ - Inside source: true *** True Line Result - return distance_y -** Processing line: ~ end~ + +** Processing line: ~ # Stores which step of the animation is being rendered~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + # Stores which step of the animation is being rendered +** Processing line: ~ # When the user moves the star or messes with the walls,~ - Inside source: true *** True Line Result - end + # When the user moves the star or messes with the walls, +** Processing line: ~ # the searches are recalculated up to this step~ +- Inside source: true +*** True Line Result + # the searches are recalculated up to this step ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # When the user grabs the star and puts their cursor to the far right~ +** Processing line: ~ # Unless the current step has a value~ - Inside source: true *** True Line Result - # When the user grabs the star and puts their cursor to the far right -** Processing line: ~ # and moves up and down, the star is supposed to move along the grid as well~ + # Unless the current step has a value +** Processing line: ~ unless state.current_step~ - Inside source: true *** True Line Result - # and moves up and down, the star is supposed to move along the grid as well -** Processing line: ~ # Finding the cell closest to the mouse helps with this~ + unless state.current_step +** Processing line: ~ # Set the current step to 10~ - Inside source: true *** True Line Result - # Finding the cell closest to the mouse helps with this -** Processing line: ~ def cell_closest_to_mouse~ + # Set the current step to 10 +** Processing line: ~ state.current_step = 10~ - Inside source: true *** True Line Result - def cell_closest_to_mouse -** Processing line: ~ # Closest cell to the mouse in the first grid~ + state.current_step = 10 +** Processing line: ~ # And calculate the searches up to step 10~ - Inside source: true *** True Line Result - # Closest cell to the mouse in the first grid -** Processing line: ~ x = (inputs.mouse.point.x / grid.cell_size).to_i~ + # And calculate the searches up to step 10 +** Processing line: ~ recalculate_searches~ - Inside source: true *** True Line Result - x = (inputs.mouse.point.x / grid.cell_size).to_i -** Processing line: ~ y = (inputs.mouse.point.y / grid.cell_size).to_i~ + recalculate_searches +** Processing line: ~ end~ - Inside source: true *** True Line Result - y = (inputs.mouse.point.y / grid.cell_size).to_i -** Processing line: ~ # Bound x and y to the grid~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - # Bound x and y to the grid -** Processing line: ~ x = grid.width - 1 if x > grid.width - 1~ + +** Processing line: ~ # At some step the animation will end,~ - Inside source: true *** True Line Result - x = grid.width - 1 if x > grid.width - 1 -** Processing line: ~ y = grid.height - 1 if y > grid.height - 1~ + # At some step the animation will end, +** Processing line: ~ # and further steps won't change anything (the whole grid will be explored)~ - Inside source: true *** True Line Result - y = grid.height - 1 if y > grid.height - 1 -** Processing line: ~ # Return closest cell~ + # and further steps won't change anything (the whole grid will be explored) +** Processing line: ~ # This step is roughly the grid's width * height~ - Inside source: true *** True Line Result - # Return closest cell -** Processing line: ~ [x, y]~ + # This step is roughly the grid's width * height +** Processing line: ~ # When anim_steps equals max_steps no more calculations will occur~ - Inside source: true *** True Line Result - [x, y] -** Processing line: ~ end~ + # When anim_steps equals max_steps no more calculations will occur +** Processing line: ~ # and the slider will be at the end~ - Inside source: true *** True Line Result - end + # and the slider will be at the end +** Processing line: ~ state.max_steps = grid.width * grid.height~ +- Inside source: true +*** True Line Result + state.max_steps = grid.width * grid.height ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # When the user grabs the star and puts their cursor to the far right~ +** Processing line: ~ # Whether the animation should play or not~ - Inside source: true *** True Line Result - # When the user grabs the star and puts their cursor to the far right -** Processing line: ~ # and moves up and down, the star is supposed to move along the grid as well~ + # Whether the animation should play or not +** Processing line: ~ # If true, every tick moves anim_steps forward one~ - Inside source: true *** True Line Result - # and moves up and down, the star is supposed to move along the grid as well -** Processing line: ~ # Finding the cell closest to the mouse in the second grid helps with this~ + # If true, every tick moves anim_steps forward one +** Processing line: ~ # Pressing the stepwise animation buttons will pause the animation~ - Inside source: true *** True Line Result - # Finding the cell closest to the mouse in the second grid helps with this -** Processing line: ~ def cell_closest_to_mouse2~ + # Pressing the stepwise animation buttons will pause the animation +** Processing line: ~ # An if statement instead of the ||= operator is used for assigning a boolean value.~ - Inside source: true *** True Line Result - def cell_closest_to_mouse2 -** Processing line: ~ # Closest cell grid to the mouse in the second~ + # An if statement instead of the ||= operator is used for assigning a boolean value. +** Processing line: ~ # The || operator does not differentiate between nil and false.~ - Inside source: true *** True Line Result - # Closest cell grid to the mouse in the second -** Processing line: ~ x = (inputs.mouse.point.x / grid.cell_size).to_i~ + # The || operator does not differentiate between nil and false. +** Processing line: ~ if state.play == nil~ - Inside source: true *** True Line Result - x = (inputs.mouse.point.x / grid.cell_size).to_i -** Processing line: ~ y = (inputs.mouse.point.y / grid.cell_size).to_i~ + if state.play == nil +** Processing line: ~ state.play = false~ - Inside source: true *** True Line Result - y = (inputs.mouse.point.y / grid.cell_size).to_i -** Processing line: ~ # Translate the cell to the first grid~ + state.play = false +** Processing line: ~ end~ - Inside source: true *** True Line Result - # Translate the cell to the first grid -** Processing line: ~ x -= grid.width + 1~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - x -= grid.width + 1 -** Processing line: ~ # Bound x and y to the first grid~ + +** Processing line: ~ # Store the rects of the buttons that control the animation~ - Inside source: true *** True Line Result - # Bound x and y to the first grid -** Processing line: ~ x = grid.width - 1 if x > grid.width - 1~ + # Store the rects of the buttons that control the animation +** Processing line: ~ # They are here for user customization~ - Inside source: true *** True Line Result - x = grid.width - 1 if x > grid.width - 1 -** Processing line: ~ y = grid.height - 1 if y > grid.height - 1~ + # They are here for user customization +** Processing line: ~ # Editing these might require recentering the text inside them~ - Inside source: true *** True Line Result - y = grid.height - 1 if y > grid.height - 1 -** Processing line: ~ # Return closest cell~ + # Editing these might require recentering the text inside them +** Processing line: ~ # Those values can be found in the render_button methods~ - Inside source: true *** True Line Result - # Return closest cell -** Processing line: ~ [x, y]~ + # Those values can be found in the render_button methods +** Processing line: ~ buttons.left = [470, 600, 50, 50]~ - Inside source: true *** True Line Result - [x, y] -** Processing line: ~ end~ + buttons.left = [470, 600, 50, 50] +** Processing line: ~ buttons.center = [520, 600, 200, 50]~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + buttons.center = [520, 600, 200, 50] +** Processing line: ~ buttons.right = [720, 600, 50, 50]~ - Inside source: true *** True Line Result - -** Processing line: ~ # Signal that the user is going to be moving the star from the first grid~ + buttons.right = [720, 600, 50, 50] +** Processing line: ~~ - Inside source: true *** True Line Result - # Signal that the user is going to be moving the star from the first grid -** Processing line: ~ def star_clicked?~ + +** Processing line: ~ # The variables below are related to the slider~ - Inside source: true *** True Line Result - def star_clicked? -** Processing line: ~ inputs.mouse.down && inputs.mouse.point.inside_rect?(scale_up(state.star))~ + # The variables below are related to the slider +** Processing line: ~ # They allow the user to customize them~ - Inside source: true *** True Line Result - inputs.mouse.down && inputs.mouse.point.inside_rect?(scale_up(state.star)) -** Processing line: ~ end~ + # They allow the user to customize them +** Processing line: ~ # They also give a central location for the render and input methods to get~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + # They also give a central location for the render and input methods to get +** Processing line: ~ # information from~ - Inside source: true *** True Line Result - -** Processing line: ~ # Signal that the user is going to be moving the star from the second grid~ + # information from +** Processing line: ~ # x & y are the coordinates of the leftmost part of the slider line~ - Inside source: true *** True Line Result - # Signal that the user is going to be moving the star from the second grid -** Processing line: ~ def star2_clicked?~ + # x & y are the coordinates of the leftmost part of the slider line +** Processing line: ~ slider.x = 440~ - Inside source: true *** True Line Result - def star2_clicked? -** Processing line: ~ inputs.mouse.down && inputs.mouse.point.inside_rect?(early_exit_scale_up(state.star))~ + slider.x = 440 +** Processing line: ~ slider.y = 675~ - Inside source: true *** True Line Result - inputs.mouse.down && inputs.mouse.point.inside_rect?(early_exit_scale_up(state.star)) -** Processing line: ~ end~ + slider.y = 675 +** Processing line: ~ # This is the width of the line~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + # This is the width of the line +** Processing line: ~ slider.w = 360~ - Inside source: true *** True Line Result - -** Processing line: ~ # Signal that the user is going to be moving the target from the first grid~ + slider.w = 360 +** Processing line: ~ # This is the offset for the circle~ - Inside source: true *** True Line Result - # Signal that the user is going to be moving the target from the first grid -** Processing line: ~ def target_clicked?~ + # This is the offset for the circle +** Processing line: ~ # Allows the center of the circle to be on the line,~ - Inside source: true *** True Line Result - def target_clicked? -** Processing line: ~ inputs.mouse.down && inputs.mouse.point.inside_rect?(scale_up(state.target))~ + # Allows the center of the circle to be on the line, +** Processing line: ~ # as opposed to the upper right corner~ - Inside source: true *** True Line Result - inputs.mouse.down && inputs.mouse.point.inside_rect?(scale_up(state.target)) -** Processing line: ~ end~ + # as opposed to the upper right corner +** Processing line: ~ slider.offset = 20~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + slider.offset = 20 +** Processing line: ~ # This is the spacing between each of the notches on the slider~ - Inside source: true *** True Line Result - -** Processing line: ~ # Signal that the user is going to be moving the target from the second grid~ + # This is the spacing between each of the notches on the slider +** Processing line: ~ # Notches are places where the circle can rest on the slider line~ - Inside source: true *** True Line Result - # Signal that the user is going to be moving the target from the second grid -** Processing line: ~ def target2_clicked?~ + # Notches are places where the circle can rest on the slider line +** Processing line: ~ # There needs to be a notch for each step before the maximum number of steps~ - Inside source: true *** True Line Result - def target2_clicked? -** Processing line: ~ inputs.mouse.down && inputs.mouse.point.inside_rect?(early_exit_scale_up(state.target))~ + # There needs to be a notch for each step before the maximum number of steps +** Processing line: ~ slider.spacing = slider.w.to_f / state.max_steps.to_f~ - Inside source: true *** True Line Result - inputs.mouse.down && inputs.mouse.point.inside_rect?(early_exit_scale_up(state.target)) + slider.spacing = slider.w.to_f / state.max_steps.to_f ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -69588,38 +76951,34 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Signal that the user is going to be removing walls from the first grid~ -- Inside source: true -*** True Line Result - # Signal that the user is going to be removing walls from the first grid -** Processing line: ~ def wall_clicked?~ +** Processing line: ~ # All methods with render draw stuff on the screen~ - Inside source: true *** True Line Result - def wall_clicked? -** Processing line: ~ inputs.mouse.down && mouse_inside_wall?~ + # All methods with render draw stuff on the screen +** Processing line: ~ # UI has buttons, the slider, and labels~ - Inside source: true *** True Line Result - inputs.mouse.down && mouse_inside_wall? -** Processing line: ~ end~ + # UI has buttons, the slider, and labels +** Processing line: ~ # The search specific rendering occurs in the respective methods~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + # The search specific rendering occurs in the respective methods +** Processing line: ~ def render~ - Inside source: true *** True Line Result - -** Processing line: ~ # Signal that the user is going to be removing walls from the second grid~ + def render +** Processing line: ~ render_ui~ - Inside source: true *** True Line Result - # Signal that the user is going to be removing walls from the second grid -** Processing line: ~ def wall2_clicked?~ + render_ui +** Processing line: ~ render_bfs~ - Inside source: true *** True Line Result - def wall2_clicked? -** Processing line: ~ inputs.mouse.down && mouse_inside_wall2?~ + render_bfs +** Processing line: ~ render_heuristic~ - Inside source: true *** True Line Result - inputs.mouse.down && mouse_inside_wall2? + render_heuristic ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -69628,18 +76987,22 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Signal that the user is going to be adding walls from the first grid~ +** Processing line: ~ def render_ui~ - Inside source: true *** True Line Result - # Signal that the user is going to be adding walls from the first grid -** Processing line: ~ def grid_clicked?~ + def render_ui +** Processing line: ~ render_buttons~ - Inside source: true *** True Line Result - def grid_clicked? -** Processing line: ~ inputs.mouse.down && mouse_inside_grid?~ + render_buttons +** Processing line: ~ render_slider~ - Inside source: true *** True Line Result - inputs.mouse.down && mouse_inside_grid? + render_slider +** Processing line: ~ render_labels~ +- Inside source: true +*** True Line Result + render_labels ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -69648,18 +77011,22 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Signal that the user is going to be adding walls from the second grid~ +** Processing line: ~ def render_buttons~ - Inside source: true *** True Line Result - # Signal that the user is going to be adding walls from the second grid -** Processing line: ~ def grid2_clicked?~ + def render_buttons +** Processing line: ~ render_left_button~ - Inside source: true *** True Line Result - def grid2_clicked? -** Processing line: ~ inputs.mouse.down && mouse_inside_grid2?~ + render_left_button +** Processing line: ~ render_center_button~ - Inside source: true *** True Line Result - inputs.mouse.down && mouse_inside_grid2? + render_center_button +** Processing line: ~ render_right_button~ +- Inside source: true +*** True Line Result + render_right_button ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -69668,38 +77035,38 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Returns whether the mouse is inside of a wall in the first grid~ +** Processing line: ~ def render_bfs~ - Inside source: true *** True Line Result - # Returns whether the mouse is inside of a wall in the first grid -** Processing line: ~ # Part of the condition that checks whether the user is removing a wall~ + def render_bfs +** Processing line: ~ render_bfs_grid~ - Inside source: true *** True Line Result - # Part of the condition that checks whether the user is removing a wall -** Processing line: ~ def mouse_inside_wall?~ + render_bfs_grid +** Processing line: ~ render_bfs_star~ - Inside source: true *** True Line Result - def mouse_inside_wall? -** Processing line: ~ state.walls.each_key do | wall |~ + render_bfs_star +** Processing line: ~ render_bfs_target~ - Inside source: true *** True Line Result - state.walls.each_key do | wall | -** Processing line: ~ return true if inputs.mouse.point.inside_rect?(scale_up(wall))~ + render_bfs_target +** Processing line: ~ render_bfs_visited~ - Inside source: true *** True Line Result - return true if inputs.mouse.point.inside_rect?(scale_up(wall)) -** Processing line: ~ end~ + render_bfs_visited +** Processing line: ~ render_bfs_walls~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + render_bfs_walls +** Processing line: ~ render_bfs_frontier~ - Inside source: true *** True Line Result - -** Processing line: ~ false~ + render_bfs_frontier +** Processing line: ~ render_bfs_path~ - Inside source: true *** True Line Result - false + render_bfs_path ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -69708,38 +77075,38 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Returns whether the mouse is inside of a wall in the second grid~ +** Processing line: ~ def render_heuristic~ - Inside source: true *** True Line Result - # Returns whether the mouse is inside of a wall in the second grid -** Processing line: ~ # Part of the condition that checks whether the user is removing a wall~ + def render_heuristic +** Processing line: ~ render_heuristic_grid~ - Inside source: true *** True Line Result - # Part of the condition that checks whether the user is removing a wall -** Processing line: ~ def mouse_inside_wall2?~ + render_heuristic_grid +** Processing line: ~ render_heuristic_star~ - Inside source: true *** True Line Result - def mouse_inside_wall2? -** Processing line: ~ state.walls.each_key do | wall |~ + render_heuristic_star +** Processing line: ~ render_heuristic_target~ - Inside source: true *** True Line Result - state.walls.each_key do | wall | -** Processing line: ~ return true if inputs.mouse.point.inside_rect?(early_exit_scale_up(wall))~ + render_heuristic_target +** Processing line: ~ render_heuristic_visited~ - Inside source: true *** True Line Result - return true if inputs.mouse.point.inside_rect?(early_exit_scale_up(wall)) -** Processing line: ~ end~ + render_heuristic_visited +** Processing line: ~ render_heuristic_walls~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + render_heuristic_walls +** Processing line: ~ render_heuristic_frontier~ - Inside source: true *** True Line Result - -** Processing line: ~ false~ + render_heuristic_frontier +** Processing line: ~ render_heuristic_path~ - Inside source: true *** True Line Result - false + render_heuristic_path ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -69748,94 +77115,82 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Returns whether the mouse is inside of the first grid~ -- Inside source: true -*** True Line Result - # Returns whether the mouse is inside of the first grid -** Processing line: ~ # Part of the condition that checks whether the user is adding a wall~ +** Processing line: ~ # This method handles user input every tick~ - Inside source: true *** True Line Result - # Part of the condition that checks whether the user is adding a wall -** Processing line: ~ def mouse_inside_grid?~ + # This method handles user input every tick +** Processing line: ~ def input~ - Inside source: true *** True Line Result - def mouse_inside_grid? -** Processing line: ~ inputs.mouse.point.inside_rect?(scale_up(grid.rect))~ + def input +** Processing line: ~ # Check and handle button input~ - Inside source: true *** True Line Result - inputs.mouse.point.inside_rect?(scale_up(grid.rect)) -** Processing line: ~ end~ + # Check and handle button input +** Processing line: ~ input_buttons~ - Inside source: true *** True Line Result - end + input_buttons ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Returns whether the mouse is inside of the second grid~ +** Processing line: ~ # If the mouse was lifted this tick~ - Inside source: true *** True Line Result - # Returns whether the mouse is inside of the second grid -** Processing line: ~ # Part of the condition that checks whether the user is adding a wall~ + # If the mouse was lifted this tick +** Processing line: ~ if inputs.mouse.up~ - Inside source: true *** True Line Result - # Part of the condition that checks whether the user is adding a wall -** Processing line: ~ def mouse_inside_grid2?~ + if inputs.mouse.up +** Processing line: ~ # Set current input to none~ - Inside source: true *** True Line Result - def mouse_inside_grid2? -** Processing line: ~ inputs.mouse.point.inside_rect?(early_exit_scale_up(grid.rect))~ + # Set current input to none +** Processing line: ~ state.user_input = :none~ - Inside source: true *** True Line Result - inputs.mouse.point.inside_rect?(early_exit_scale_up(grid.rect)) -** Processing line: ~ end~ + state.user_input = :none +** Processing line: ~ end~ - Inside source: true *** True Line Result - end + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # These methods provide handy aliases to colors~ -- Inside source: true -*** True Line Result - # These methods provide handy aliases to colors -** Processing line: ~~ +** Processing line: ~ # If the mouse was clicked this tick~ - Inside source: true *** True Line Result - -** Processing line: ~ # Light brown~ + # If the mouse was clicked this tick +** Processing line: ~ if inputs.mouse.down~ - Inside source: true *** True Line Result - # Light brown -** Processing line: ~ def unvisited_color~ + if inputs.mouse.down +** Processing line: ~ # Determine what the user is editing and appropriately edit the state.user_input variable~ - Inside source: true *** True Line Result - def unvisited_color -** Processing line: ~ [221, 212, 213]~ + # Determine what the user is editing and appropriately edit the state.user_input variable +** Processing line: ~ determine_input~ - Inside source: true *** True Line Result - [221, 212, 213] -** Processing line: ~ end~ + determine_input +** Processing line: ~ end~ - Inside source: true *** True Line Result - end + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Camo Green~ -- Inside source: true -*** True Line Result - # Camo Green -** Processing line: ~ def wall_color~ +** Processing line: ~ # Process user input based on user_input variable and current mouse position~ - Inside source: true *** True Line Result - def wall_color -** Processing line: ~ [134, 134, 120]~ + # Process user input based on user_input variable and current mouse position +** Processing line: ~ process_input~ - Inside source: true *** True Line Result - [134, 134, 120] + process_input ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -69844,554 +77199,558 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Pastel White~ +** Processing line: ~ # Determines what the user is editing~ - Inside source: true *** True Line Result - # Pastel White -** Processing line: ~ def path_color~ + # Determines what the user is editing +** Processing line: ~ # This method is called when the mouse is clicked down~ - Inside source: true *** True Line Result - def path_color -** Processing line: ~ [231, 230, 228]~ + # This method is called when the mouse is clicked down +** Processing line: ~ def determine_input~ - Inside source: true *** True Line Result - [231, 230, 228] -** Processing line: ~ end~ + def determine_input +** Processing line: ~ if mouse_over_slider?~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + if mouse_over_slider? +** Processing line: ~ state.user_input = :slider~ - Inside source: true *** True Line Result - -** Processing line: ~ def red~ + state.user_input = :slider +** Processing line: ~ # If the mouse is over the star in the first grid~ - Inside source: true *** True Line Result - def red -** Processing line: ~ [255, 0, 0]~ + # If the mouse is over the star in the first grid +** Processing line: ~ elsif bfs_mouse_over_star?~ - Inside source: true *** True Line Result - [255, 0, 0] -** Processing line: ~ end~ + elsif bfs_mouse_over_star? +** Processing line: ~ # The user is editing the star from the first grid~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + # The user is editing the star from the first grid +** Processing line: ~ state.user_input = :bfs_star~ - Inside source: true *** True Line Result - -** Processing line: ~ # Makes code more concise~ + state.user_input = :bfs_star +** Processing line: ~ # If the mouse is over the star in the second grid~ - Inside source: true *** True Line Result - # Makes code more concise -** Processing line: ~ def grid~ + # If the mouse is over the star in the second grid +** Processing line: ~ elsif heuristic_mouse_over_star?~ - Inside source: true *** True Line Result - def grid -** Processing line: ~ state.grid~ + elsif heuristic_mouse_over_star? +** Processing line: ~ # The user is editing the star from the second grid~ - Inside source: true *** True Line Result - state.grid -** Processing line: ~ end~ + # The user is editing the star from the second grid +** Processing line: ~ state.user_input = :heuristic_star~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + state.user_input = :heuristic_star +** Processing line: ~ # If the mouse is over the target in the first grid~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + # If the mouse is over the target in the first grid +** Processing line: ~ elsif bfs_mouse_over_target?~ - Inside source: true *** True Line Result - -** Processing line: ~ # Method that is called by DragonRuby periodically~ + elsif bfs_mouse_over_target? +** Processing line: ~ # The user is editing the target from the first grid~ - Inside source: true *** True Line Result - # Method that is called by DragonRuby periodically -** Processing line: ~ # Used for updating animations and calculations~ + # The user is editing the target from the first grid +** Processing line: ~ state.user_input = :bfs_target~ - Inside source: true *** True Line Result - # Used for updating animations and calculations -** Processing line: ~ def tick args~ + state.user_input = :bfs_target +** Processing line: ~ # If the mouse is over the target in the second grid~ - Inside source: true *** True Line Result - def tick args -** Processing line: ~~ + # If the mouse is over the target in the second grid +** Processing line: ~ elsif heuristic_mouse_over_target?~ - Inside source: true *** True Line Result - -** Processing line: ~ # Pressing r will reset the application~ + elsif heuristic_mouse_over_target? +** Processing line: ~ # The user is editing the target from the second grid~ - Inside source: true *** True Line Result - # Pressing r will reset the application -** Processing line: ~ if args.inputs.keyboard.key_down.r~ + # The user is editing the target from the second grid +** Processing line: ~ state.user_input = :heuristic_target~ - Inside source: true *** True Line Result - if args.inputs.keyboard.key_down.r -** Processing line: ~ args.gtk.reset~ + state.user_input = :heuristic_target +** Processing line: ~ # If the mouse is over a wall in the first grid~ - Inside source: true *** True Line Result - args.gtk.reset -** Processing line: ~ reset~ + # If the mouse is over a wall in the first grid +** Processing line: ~ elsif bfs_mouse_over_wall?~ - Inside source: true *** True Line Result - reset -** Processing line: ~ return~ + elsif bfs_mouse_over_wall? +** Processing line: ~ # The user is removing a wall from the first grid~ - Inside source: true *** True Line Result - return -** Processing line: ~ end~ + # The user is removing a wall from the first grid +** Processing line: ~ state.user_input = :bfs_remove_wall~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + state.user_input = :bfs_remove_wall +** Processing line: ~ # If the mouse is over a wall in the second grid~ - Inside source: true *** True Line Result - -** Processing line: ~ # Every tick, new args are passed, and the Breadth First Search tick is called~ + # If the mouse is over a wall in the second grid +** Processing line: ~ elsif heuristic_mouse_over_wall?~ - Inside source: true *** True Line Result - # Every tick, new args are passed, and the Breadth First Search tick is called -** Processing line: ~ $early_exit_breadth_first_search ||= EarlyExitBreadthFirstSearch.new(args)~ + elsif heuristic_mouse_over_wall? +** Processing line: ~ # The user is removing a wall from the second grid~ - Inside source: true *** True Line Result - $early_exit_breadth_first_search ||= EarlyExitBreadthFirstSearch.new(args) -** Processing line: ~ $early_exit_breadth_first_search.args = args~ + # The user is removing a wall from the second grid +** Processing line: ~ state.user_input = :heuristic_remove_wall~ - Inside source: true *** True Line Result - $early_exit_breadth_first_search.args = args -** Processing line: ~ $early_exit_breadth_first_search.tick~ + state.user_input = :heuristic_remove_wall +** Processing line: ~ # If the mouse is over the first grid~ - Inside source: true *** True Line Result - $early_exit_breadth_first_search.tick -** Processing line: ~ end~ + # If the mouse is over the first grid +** Processing line: ~ elsif bfs_mouse_over_grid?~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + elsif bfs_mouse_over_grid? +** Processing line: ~ # The user is adding a wall from the first grid~ - Inside source: true *** True Line Result - -** Processing line: ~~ + # The user is adding a wall from the first grid +** Processing line: ~ state.user_input = :bfs_add_wall~ - Inside source: true *** True Line Result - -** Processing line: ~ def reset~ + state.user_input = :bfs_add_wall +** Processing line: ~ # If the mouse is over the second grid~ - Inside source: true *** True Line Result - def reset -** Processing line: ~ $early_exit_breadth_first_search = nil~ + # If the mouse is over the second grid +** Processing line: ~ elsif heuristic_mouse_over_grid?~ - Inside source: true *** True Line Result - $early_exit_breadth_first_search = nil -** Processing line: ~ end~ + elsif heuristic_mouse_over_grid? +** Processing line: ~ # The user is adding a wall from the second grid~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + # The user is adding a wall from the second grid +** Processing line: ~ state.user_input = :heuristic_add_wall~ - Inside source: true *** True Line Result - -** Processing line: ~#+end_src~ -- Line was identified as the end of a code block. -*** True Line Result -#+end_src -** Processing line: ~~ -- End of paragraph detected. -*** True Line Result - -** Processing line: ~*** Path Finding Algorithms - Dijkstra - main.rb~ -- Header detected. + state.user_input = :heuristic_add_wall +** Processing line: ~ end~ +- Inside source: true *** True Line Result - + end +** Processing line: ~ end~ +- Inside source: true *** True Line Result -*** Path Finding Algorithms - Dijkstra - main.rb -** Processing line: ~#+begin_src ruby~ -- Line was identified as the beginning of a code block. + end +** Processing line: ~~ +- Inside source: true *** True Line Result +** Processing line: ~ # Processes click and drag based on what the user is currently dragging~ +- Inside source: true *** True Line Result -#+begin_src ruby -** Processing line: ~ # ./samples/13_path_finding_algorithms/05_dijkstra/app/main.rb~ + # Processes click and drag based on what the user is currently dragging +** Processing line: ~ def process_input~ - Inside source: true *** True Line Result - # ./samples/13_path_finding_algorithms/05_dijkstra/app/main.rb -** Processing line: ~ # Demonstrates how Dijkstra's Algorithm allows movement costs to be considered~ + def process_input +** Processing line: ~ if state.user_input == :slider~ - Inside source: true *** True Line Result - # Demonstrates how Dijkstra's Algorithm allows movement costs to be considered -** Processing line: ~~ + if state.user_input == :slider +** Processing line: ~ process_input_slider~ - Inside source: true *** True Line Result - -** Processing line: ~ # Inspired by https://www.redblobgames.com/pathfinding/a-star/introduction.html~ + process_input_slider +** Processing line: ~ elsif state.user_input == :bfs_star~ - Inside source: true *** True Line Result - # Inspired by https://www.redblobgames.com/pathfinding/a-star/introduction.html -** Processing line: ~~ + elsif state.user_input == :bfs_star +** Processing line: ~ process_input_bfs_star~ - Inside source: true *** True Line Result - -** Processing line: ~ # The first grid is a breadth first search with an early exit.~ + process_input_bfs_star +** Processing line: ~ elsif state.user_input == :heuristic_star~ - Inside source: true *** True Line Result - # The first grid is a breadth first search with an early exit. -** Processing line: ~ # It shows a heat map of all the cells that were visited by the search and their relative distance.~ + elsif state.user_input == :heuristic_star +** Processing line: ~ process_input_heuristic_star~ - Inside source: true *** True Line Result - # It shows a heat map of all the cells that were visited by the search and their relative distance. -** Processing line: ~~ + process_input_heuristic_star +** Processing line: ~ elsif state.user_input == :bfs_target~ - Inside source: true *** True Line Result - -** Processing line: ~ # The second grid is an implementation of Dijkstra's algorithm.~ + elsif state.user_input == :bfs_target +** Processing line: ~ process_input_bfs_target~ - Inside source: true *** True Line Result - # The second grid is an implementation of Dijkstra's algorithm. -** Processing line: ~ # Light green cells have 5 times the movement cost of regular cells.~ + process_input_bfs_target +** Processing line: ~ elsif state.user_input == :heuristic_target~ - Inside source: true *** True Line Result - # Light green cells have 5 times the movement cost of regular cells. -** Processing line: ~ # The heat map will darken based on movement cost.~ + elsif state.user_input == :heuristic_target +** Processing line: ~ process_input_heuristic_target~ - Inside source: true *** True Line Result - # The heat map will darken based on movement cost. -** Processing line: ~~ + process_input_heuristic_target +** Processing line: ~ elsif state.user_input == :bfs_remove_wall~ - Inside source: true *** True Line Result - -** Processing line: ~ # Dark green cells are walls, and the search cannot go through them.~ + elsif state.user_input == :bfs_remove_wall +** Processing line: ~ process_input_bfs_remove_wall~ - Inside source: true *** True Line Result - # Dark green cells are walls, and the search cannot go through them. -** Processing line: ~ class Movement_Costs~ + process_input_bfs_remove_wall +** Processing line: ~ elsif state.user_input == :heuristic_remove_wall~ - Inside source: true *** True Line Result - class Movement_Costs -** Processing line: ~ attr_gtk~ + elsif state.user_input == :heuristic_remove_wall +** Processing line: ~ process_input_heuristic_remove_wall~ - Inside source: true *** True Line Result - attr_gtk -** Processing line: ~~ + process_input_heuristic_remove_wall +** Processing line: ~ elsif state.user_input == :bfs_add_wall~ - Inside source: true *** True Line Result - -** Processing line: ~ # This method is called every frame/tick~ + elsif state.user_input == :bfs_add_wall +** Processing line: ~ process_input_bfs_add_wall~ - Inside source: true *** True Line Result - # This method is called every frame/tick -** Processing line: ~ # Every tick, the current state of the search is rendered on the screen,~ + process_input_bfs_add_wall +** Processing line: ~ elsif state.user_input == :heuristic_add_wall~ - Inside source: true *** True Line Result - # Every tick, the current state of the search is rendered on the screen, -** Processing line: ~ # User input is processed, and~ + elsif state.user_input == :heuristic_add_wall +** Processing line: ~ process_input_heuristic_add_wall~ - Inside source: true *** True Line Result - # User input is processed, and -** Processing line: ~ # The next step in the search is calculated~ + process_input_heuristic_add_wall +** Processing line: ~ end~ - Inside source: true *** True Line Result - # The next step in the search is calculated -** Processing line: ~ def tick~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - def tick -** Processing line: ~ defaults~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - defaults -** Processing line: ~ render~ + +** Processing line: ~ def render_slider~ - Inside source: true *** True Line Result - render -** Processing line: ~ input~ + def render_slider +** Processing line: ~ # Using primitives hides the line under the white circle of the slider~ - Inside source: true *** True Line Result - input -** Processing line: ~ calc~ + # Using primitives hides the line under the white circle of the slider +** Processing line: ~ # Draws the line~ - Inside source: true *** True Line Result - calc -** Processing line: ~ end~ + # Draws the line +** Processing line: ~ outputs.primitives << [slider.x, slider.y, slider.x + slider.w, slider.y].line~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + outputs.primitives << [slider.x, slider.y, slider.x + slider.w, slider.y].line +** Processing line: ~ # The circle needs to be offset so that the center of the circle~ - Inside source: true *** True Line Result - -** Processing line: ~ def defaults~ + # The circle needs to be offset so that the center of the circle +** Processing line: ~ # overlaps the line instead of the upper right corner of the circle~ - Inside source: true *** True Line Result - def defaults -** Processing line: ~ # Variables to edit the size and appearance of the grid~ + # overlaps the line instead of the upper right corner of the circle +** Processing line: ~ # The circle's x value is also moved based on the current seach step~ - Inside source: true *** True Line Result - # Variables to edit the size and appearance of the grid -** Processing line: ~ # Freely customizable to user's liking~ + # The circle's x value is also moved based on the current seach step +** Processing line: ~ circle_x = (slider.x - slider.offset) + (state.current_step * slider.spacing)~ - Inside source: true *** True Line Result - # Freely customizable to user's liking -** Processing line: ~ grid.width ||= 10~ + circle_x = (slider.x - slider.offset) + (state.current_step * slider.spacing) +** Processing line: ~ circle_y = (slider.y - slider.offset)~ - Inside source: true *** True Line Result - grid.width ||= 10 -** Processing line: ~ grid.height ||= 10~ + circle_y = (slider.y - slider.offset) +** Processing line: ~ circle_rect = [circle_x, circle_y, 37, 37]~ - Inside source: true *** True Line Result - grid.height ||= 10 -** Processing line: ~ grid.cell_size ||= 60~ + circle_rect = [circle_x, circle_y, 37, 37] +** Processing line: ~ outputs.primitives << [circle_rect, 'circle-white.png'].sprite~ - Inside source: true *** True Line Result - grid.cell_size ||= 60 -** Processing line: ~ grid.rect ||= [0, 0, grid.width, grid.height]~ + outputs.primitives << [circle_rect, 'circle-white.png'].sprite +** Processing line: ~ end~ - Inside source: true *** True Line Result - grid.rect ||= [0, 0, grid.width, grid.height] + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # The location of the star and walls of the grid~ +** Processing line: ~ def render_labels~ - Inside source: true *** True Line Result - # The location of the star and walls of the grid -** Processing line: ~ # They can be modified to have a different initial grid~ + def render_labels +** Processing line: ~ outputs.labels << [205, 625, "Breadth First Search"]~ - Inside source: true *** True Line Result - # They can be modified to have a different initial grid -** Processing line: ~ # Walls are stored in a hash for quick look up when doing the search~ + outputs.labels << [205, 625, "Breadth First Search"] +** Processing line: ~ outputs.labels << [820, 625, "Heuristic Best-First Search"]~ - Inside source: true *** True Line Result - # Walls are stored in a hash for quick look up when doing the search -** Processing line: ~ state.star ||= [1, 5]~ + outputs.labels << [820, 625, "Heuristic Best-First Search"] +** Processing line: ~ end~ - Inside source: true *** True Line Result - state.star ||= [1, 5] -** Processing line: ~ state.target ||= [8, 4]~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - state.target ||= [8, 4] -** Processing line: ~ state.walls ||= {[1, 1] => true, [2, 1] => true, [3, 1] => true, [1, 2] => true, [2, 2] => true, [3, 2] => true}~ + +** Processing line: ~ def render_left_button~ - Inside source: true *** True Line Result - state.walls ||= {[1, 1] => true, [2, 1] => true, [3, 1] => true, [1, 2] => true, [2, 2] => true, [3, 2] => true} -** Processing line: ~ state.hills ||= {~ + def render_left_button +** Processing line: ~ # Draws the button_color button, and a black border~ - Inside source: true *** True Line Result - state.hills ||= { -** Processing line: ~ [4, 1] => true,~ + # Draws the button_color button, and a black border +** Processing line: ~ # The border separates the buttons visually~ - Inside source: true *** True Line Result - [4, 1] => true, -** Processing line: ~ [5, 1] => true,~ + # The border separates the buttons visually +** Processing line: ~ outputs.solids << [buttons.left, button_color]~ - Inside source: true *** True Line Result - [5, 1] => true, -** Processing line: ~ [4, 2] => true,~ + outputs.solids << [buttons.left, button_color] +** Processing line: ~ outputs.borders << [buttons.left]~ - Inside source: true *** True Line Result - [4, 2] => true, -** Processing line: ~ [5, 2] => true,~ + outputs.borders << [buttons.left] +** Processing line: ~~ - Inside source: true *** True Line Result - [5, 2] => true, -** Processing line: ~ [6, 2] => true,~ + +** Processing line: ~ # Renders an explanatory label in the center of the button~ - Inside source: true *** True Line Result - [6, 2] => true, -** Processing line: ~ [4, 3] => true,~ + # Renders an explanatory label in the center of the button +** Processing line: ~ # Explains to the user what the button does~ - Inside source: true *** True Line Result - [4, 3] => true, -** Processing line: ~ [5, 3] => true,~ + # Explains to the user what the button does +** Processing line: ~ # If the button size is changed, the label might need to be edited as well~ - Inside source: true *** True Line Result - [5, 3] => true, -** Processing line: ~ [6, 3] => true,~ + # If the button size is changed, the label might need to be edited as well +** Processing line: ~ # to keep the label in the center of the button~ - Inside source: true *** True Line Result - [6, 3] => true, -** Processing line: ~ [3, 4] => true,~ + # to keep the label in the center of the button +** Processing line: ~ label_x = buttons.left.x + 20~ - Inside source: true *** True Line Result - [3, 4] => true, -** Processing line: ~ [4, 4] => true,~ + label_x = buttons.left.x + 20 +** Processing line: ~ label_y = buttons.left.y + 35~ - Inside source: true *** True Line Result - [4, 4] => true, -** Processing line: ~ [5, 4] => true,~ + label_y = buttons.left.y + 35 +** Processing line: ~ outputs.labels << [label_x, label_y, "<"]~ - Inside source: true *** True Line Result - [5, 4] => true, -** Processing line: ~ [6, 4] => true,~ + outputs.labels << [label_x, label_y, "<"] +** Processing line: ~ end~ - Inside source: true *** True Line Result - [6, 4] => true, -** Processing line: ~ [7, 4] => true,~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - [7, 4] => true, -** Processing line: ~ [3, 5] => true,~ + +** Processing line: ~ def render_center_button~ - Inside source: true *** True Line Result - [3, 5] => true, -** Processing line: ~ [4, 5] => true,~ + def render_center_button +** Processing line: ~ # Draws the button_color button, and a black border~ - Inside source: true *** True Line Result - [4, 5] => true, -** Processing line: ~ [5, 5] => true,~ + # Draws the button_color button, and a black border +** Processing line: ~ # The border separates the buttons visually~ - Inside source: true *** True Line Result - [5, 5] => true, -** Processing line: ~ [6, 5] => true,~ + # The border separates the buttons visually +** Processing line: ~ outputs.solids << [buttons.center, button_color]~ - Inside source: true *** True Line Result - [6, 5] => true, -** Processing line: ~ [7, 5] => true,~ + outputs.solids << [buttons.center, button_color] +** Processing line: ~ outputs.borders << [buttons.center]~ - Inside source: true *** True Line Result - [7, 5] => true, -** Processing line: ~ [4, 6] => true,~ + outputs.borders << [buttons.center] +** Processing line: ~~ - Inside source: true *** True Line Result - [4, 6] => true, -** Processing line: ~ [5, 6] => true,~ + +** Processing line: ~ # Renders an explanatory label in the center of the button~ - Inside source: true *** True Line Result - [5, 6] => true, -** Processing line: ~ [6, 6] => true,~ + # Renders an explanatory label in the center of the button +** Processing line: ~ # Explains to the user what the button does~ - Inside source: true *** True Line Result - [6, 6] => true, -** Processing line: ~ [7, 6] => true,~ + # Explains to the user what the button does +** Processing line: ~ # If the button size is changed, the label might need to be edited as well~ - Inside source: true *** True Line Result - [7, 6] => true, -** Processing line: ~ [4, 7] => true,~ + # If the button size is changed, the label might need to be edited as well +** Processing line: ~ # to keep the label in the center of the button~ - Inside source: true *** True Line Result - [4, 7] => true, -** Processing line: ~ [5, 7] => true,~ + # to keep the label in the center of the button +** Processing line: ~ label_x = buttons.center.x + 37~ - Inside source: true *** True Line Result - [5, 7] => true, -** Processing line: ~ [6, 7] => true,~ + label_x = buttons.center.x + 37 +** Processing line: ~ label_y = buttons.center.y + 35~ - Inside source: true *** True Line Result - [6, 7] => true, -** Processing line: ~ [4, 8] => true,~ + label_y = buttons.center.y + 35 +** Processing line: ~ label_text = state.play ? "Pause Animation" : "Play Animation"~ - Inside source: true *** True Line Result - [4, 8] => true, -** Processing line: ~ [5, 8] => true,~ + label_text = state.play ? "Pause Animation" : "Play Animation" +** Processing line: ~ outputs.labels << [label_x, label_y, label_text]~ - Inside source: true *** True Line Result - [5, 8] => true, -** Processing line: ~ }~ + outputs.labels << [label_x, label_y, label_text] +** Processing line: ~ end~ - Inside source: true *** True Line Result - } + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # What the user is currently editing on the grid~ +** Processing line: ~ def render_right_button~ - Inside source: true *** True Line Result - # What the user is currently editing on the grid -** Processing line: ~ # We store this value, because we want to remember the value even when~ + def render_right_button +** Processing line: ~ # Draws the button_color button, and a black border~ - Inside source: true *** True Line Result - # We store this value, because we want to remember the value even when -** Processing line: ~ # the user's cursor is no longer over what they're interacting with, but~ + # Draws the button_color button, and a black border +** Processing line: ~ # The border separates the buttons visually~ - Inside source: true *** True Line Result - # the user's cursor is no longer over what they're interacting with, but -** Processing line: ~ # they are still clicking down on the mouse.~ + # The border separates the buttons visually +** Processing line: ~ outputs.solids << [buttons.right, button_color]~ - Inside source: true *** True Line Result - # they are still clicking down on the mouse. -** Processing line: ~ state.user_input ||= :none~ + outputs.solids << [buttons.right, button_color] +** Processing line: ~ outputs.borders << [buttons.right]~ - Inside source: true *** True Line Result - state.user_input ||= :none + outputs.borders << [buttons.right] ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Values that are used for the breadth first search~ +** Processing line: ~ # Renders an explanatory label in the center of the button~ - Inside source: true *** True Line Result - # Values that are used for the breadth first search -** Processing line: ~ # Keeping track of what cells were visited prevents counting cells multiple times~ + # Renders an explanatory label in the center of the button +** Processing line: ~ # Explains to the user what the button does~ - Inside source: true *** True Line Result - # Keeping track of what cells were visited prevents counting cells multiple times -** Processing line: ~ breadth_first_search.visited ||= {}~ + # Explains to the user what the button does +** Processing line: ~ label_x = buttons.right.x + 20~ - Inside source: true *** True Line Result - breadth_first_search.visited ||= {} -** Processing line: ~ # The cells from which the breadth first search will expand~ + label_x = buttons.right.x + 20 +** Processing line: ~ label_y = buttons.right.y + 35~ - Inside source: true *** True Line Result - # The cells from which the breadth first search will expand -** Processing line: ~ breadth_first_search.frontier ||= []~ + label_y = buttons.right.y + 35 +** Processing line: ~ outputs.labels << [label_x, label_y, ">"]~ - Inside source: true *** True Line Result - breadth_first_search.frontier ||= [] -** Processing line: ~ # Keeps track of which cell all cells were searched from~ + outputs.labels << [label_x, label_y, ">"] +** Processing line: ~ end~ - Inside source: true *** True Line Result - # Keeps track of which cell all cells were searched from -** Processing line: ~ # Used to recreate the path from the target to the star~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - # Used to recreate the path from the target to the star -** Processing line: ~ breadth_first_search.came_from ||= {}~ + +** Processing line: ~ def render_bfs_grid~ +- Inside source: true +*** True Line Result + def render_bfs_grid +** Processing line: ~ # A large rect the size of the grid~ +- Inside source: true +*** True Line Result + # A large rect the size of the grid +** Processing line: ~ outputs.solids << [bfs_scale_up(grid.rect), default_color]~ - Inside source: true *** True Line Result - breadth_first_search.came_from ||= {} + outputs.solids << [bfs_scale_up(grid.rect), default_color] ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Keeps track of the movement cost so far to be at a cell~ +** Processing line: ~ # The vertical grid lines~ - Inside source: true *** True Line Result - # Keeps track of the movement cost so far to be at a cell -** Processing line: ~ # Allows the costs of new cells to be quickly calculated~ + # The vertical grid lines +** Processing line: ~ for x in 0..grid.width~ - Inside source: true *** True Line Result - # Allows the costs of new cells to be quickly calculated -** Processing line: ~ # Also doubles as a way to check if cells have already been visited~ + for x in 0..grid.width +** Processing line: ~ outputs.lines << bfs_vertical_line(x)~ - Inside source: true *** True Line Result - # Also doubles as a way to check if cells have already been visited -** Processing line: ~ dijkstra_search.cost_so_far ||= {}~ + outputs.lines << bfs_vertical_line(x) +** Processing line: ~ end~ - Inside source: true *** True Line Result - dijkstra_search.cost_so_far ||= {} -** Processing line: ~ # The cells from which the Dijkstra search will expand~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - # The cells from which the Dijkstra search will expand -** Processing line: ~ dijkstra_search.frontier ||= []~ + +** Processing line: ~ # The horizontal grid lines~ - Inside source: true *** True Line Result - dijkstra_search.frontier ||= [] -** Processing line: ~ # Keeps track of which cell all cells were searched from~ + # The horizontal grid lines +** Processing line: ~ for y in 0..grid.height~ - Inside source: true *** True Line Result - # Keeps track of which cell all cells were searched from -** Processing line: ~ # Used to recreate the path from the target to the star~ + for y in 0..grid.height +** Processing line: ~ outputs.lines << bfs_horizontal_line(y)~ - Inside source: true *** True Line Result - # Used to recreate the path from the target to the star -** Processing line: ~ dijkstra_search.came_from ||= {}~ + outputs.lines << bfs_horizontal_line(y) +** Processing line: ~ end~ - Inside source: true *** True Line Result - dijkstra_search.came_from ||= {} + end ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -70400,86 +77759,78 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Draws everything onto the screen~ -- Inside source: true -*** True Line Result - # Draws everything onto the screen -** Processing line: ~ def render~ -- Inside source: true -*** True Line Result - def render -** Processing line: ~ render_background~ +** Processing line: ~ def render_heuristic_grid~ - Inside source: true *** True Line Result - render_background -** Processing line: ~~ + def render_heuristic_grid +** Processing line: ~ # A large rect the size of the grid~ - Inside source: true *** True Line Result - -** Processing line: ~ render_heat_maps~ + # A large rect the size of the grid +** Processing line: ~ outputs.solids << [heuristic_scale_up(grid.rect), default_color]~ - Inside source: true *** True Line Result - render_heat_maps + outputs.solids << [heuristic_scale_up(grid.rect), default_color] ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ render_star~ +** Processing line: ~ # The vertical grid lines~ - Inside source: true *** True Line Result - render_star -** Processing line: ~ render_target~ + # The vertical grid lines +** Processing line: ~ for x in 0..grid.width~ - Inside source: true *** True Line Result - render_target -** Processing line: ~ render_hills~ + for x in 0..grid.width +** Processing line: ~ outputs.lines << heuristic_vertical_line(x)~ - Inside source: true *** True Line Result - render_hills -** Processing line: ~ render_walls~ + outputs.lines << heuristic_vertical_line(x) +** Processing line: ~ end~ - Inside source: true *** True Line Result - render_walls + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ render_paths~ +** Processing line: ~ # The horizontal grid lines~ - Inside source: true *** True Line Result - render_paths -** Processing line: ~ end~ + # The horizontal grid lines +** Processing line: ~ for y in 0..grid.height~ - Inside source: true *** True Line Result - end -** Processing line: ~ # The methods below subdivide the task of drawing everything to the screen~ + for y in 0..grid.height +** Processing line: ~ outputs.lines << heuristic_horizontal_line(y)~ - Inside source: true *** True Line Result - # The methods below subdivide the task of drawing everything to the screen -** Processing line: ~~ + outputs.lines << heuristic_horizontal_line(y) +** Processing line: ~ end~ - Inside source: true *** True Line Result - -** Processing line: ~ # Draws what the grid looks like with nothing on it~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - # Draws what the grid looks like with nothing on it -** Processing line: ~ def render_background~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - def render_background -** Processing line: ~ render_unvisited~ + +** Processing line: ~ # Returns a vertical line for a column of the first grid~ - Inside source: true *** True Line Result - render_unvisited -** Processing line: ~ render_grid_lines~ + # Returns a vertical line for a column of the first grid +** Processing line: ~ def bfs_vertical_line column~ - Inside source: true *** True Line Result - render_grid_lines -** Processing line: ~ render_labels~ + def bfs_vertical_line column +** Processing line: ~ bfs_scale_up([column, 0, column, grid.height])~ - Inside source: true *** True Line Result - render_labels + bfs_scale_up([column, 0, column, grid.height]) ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -70488,26 +77839,18 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Draws two rectangles the size of the grid in the default cell color~ -- Inside source: true -*** True Line Result - # Draws two rectangles the size of the grid in the default cell color -** Processing line: ~ # Used as part of the background~ -- Inside source: true -*** True Line Result - # Used as part of the background -** Processing line: ~ def render_unvisited~ +** Processing line: ~ # Returns a horizontal line for a column of the first grid~ - Inside source: true *** True Line Result - def render_unvisited -** Processing line: ~ outputs.solids << [scale_up(grid.rect), unvisited_color]~ + # Returns a horizontal line for a column of the first grid +** Processing line: ~ def bfs_horizontal_line row~ - Inside source: true *** True Line Result - outputs.solids << [scale_up(grid.rect), unvisited_color] -** Processing line: ~ outputs.solids << [move_and_scale_up(grid.rect), unvisited_color]~ + def bfs_horizontal_line row +** Processing line: ~ bfs_scale_up([0, row, grid.width, row])~ - Inside source: true *** True Line Result - outputs.solids << [move_and_scale_up(grid.rect), unvisited_color] + bfs_scale_up([0, row, grid.width, row]) ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -70516,50 +77859,58 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Draws grid lines to show the division of the grid into cells~ +** Processing line: ~ # Returns a vertical line for a column of the second grid~ - Inside source: true *** True Line Result - # Draws grid lines to show the division of the grid into cells -** Processing line: ~ def render_grid_lines~ + # Returns a vertical line for a column of the second grid +** Processing line: ~ def heuristic_vertical_line column~ - Inside source: true *** True Line Result - def render_grid_lines -** Processing line: ~ for x in 0..grid.width~ + def heuristic_vertical_line column +** Processing line: ~ bfs_scale_up([column + grid.width + 1, 0, column + grid.width + 1, grid.height])~ - Inside source: true *** True Line Result - for x in 0..grid.width -** Processing line: ~ outputs.lines << vertical_line(x)~ + bfs_scale_up([column + grid.width + 1, 0, column + grid.width + 1, grid.height]) +** Processing line: ~ end~ - Inside source: true *** True Line Result - outputs.lines << vertical_line(x) -** Processing line: ~ outputs.lines << shifted_vertical_line(x)~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - outputs.lines << shifted_vertical_line(x) -** Processing line: ~ end~ + +** Processing line: ~ # Returns a horizontal line for a column of the second grid~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + # Returns a horizontal line for a column of the second grid +** Processing line: ~ def heuristic_horizontal_line row~ - Inside source: true *** True Line Result - -** Processing line: ~ for y in 0..grid.height~ + def heuristic_horizontal_line row +** Processing line: ~ bfs_scale_up([grid.width + 1, row, grid.width + grid.width + 1, row])~ - Inside source: true *** True Line Result - for y in 0..grid.height -** Processing line: ~ outputs.lines << horizontal_line(y)~ + bfs_scale_up([grid.width + 1, row, grid.width + grid.width + 1, row]) +** Processing line: ~ end~ - Inside source: true *** True Line Result - outputs.lines << horizontal_line(y) -** Processing line: ~ outputs.lines << shifted_horizontal_line(y)~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - outputs.lines << shifted_horizontal_line(y) -** Processing line: ~ end~ + +** Processing line: ~ # Renders the star on the first grid~ - Inside source: true *** True Line Result - end + # Renders the star on the first grid +** Processing line: ~ def render_bfs_star~ +- Inside source: true +*** True Line Result + def render_bfs_star +** Processing line: ~ outputs.sprites << [bfs_scale_up(grid.star), 'star.png']~ +- Inside source: true +*** True Line Result + outputs.sprites << [bfs_scale_up(grid.star), 'star.png'] ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -70568,18 +77919,18 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Easy way to draw vertical lines given an index for the first grid~ +** Processing line: ~ # Renders the star on the second grid~ - Inside source: true *** True Line Result - # Easy way to draw vertical lines given an index for the first grid -** Processing line: ~ def vertical_line column~ + # Renders the star on the second grid +** Processing line: ~ def render_heuristic_star~ - Inside source: true *** True Line Result - def vertical_line column -** Processing line: ~ scale_up([column, 0, column, grid.height])~ + def render_heuristic_star +** Processing line: ~ outputs.sprites << [heuristic_scale_up(grid.star), 'star.png']~ - Inside source: true *** True Line Result - scale_up([column, 0, column, grid.height]) + outputs.sprites << [heuristic_scale_up(grid.star), 'star.png'] ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -70588,18 +77939,18 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Easy way to draw horizontal lines given an index for the second grid~ +** Processing line: ~ # Renders the target on the first grid~ - Inside source: true *** True Line Result - # Easy way to draw horizontal lines given an index for the second grid -** Processing line: ~ def horizontal_line row~ + # Renders the target on the first grid +** Processing line: ~ def render_bfs_target~ - Inside source: true *** True Line Result - def horizontal_line row -** Processing line: ~ scale_up([0, row, grid.width, row])~ + def render_bfs_target +** Processing line: ~ outputs.sprites << [bfs_scale_up(grid.target), 'target.png']~ - Inside source: true *** True Line Result - scale_up([0, row, grid.width, row]) + outputs.sprites << [bfs_scale_up(grid.target), 'target.png'] ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -70608,18 +77959,18 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Easy way to draw vertical lines given an index for the first grid~ +** Processing line: ~ # Renders the target on the second grid~ - Inside source: true *** True Line Result - # Easy way to draw vertical lines given an index for the first grid -** Processing line: ~ def shifted_vertical_line column~ + # Renders the target on the second grid +** Processing line: ~ def render_heuristic_target~ - Inside source: true *** True Line Result - def shifted_vertical_line column -** Processing line: ~ scale_up([column + grid.width + 1, 0, column + grid.width + 1, grid.height])~ + def render_heuristic_target +** Processing line: ~ outputs.sprites << [heuristic_scale_up(grid.target), 'target.png']~ - Inside source: true *** True Line Result - scale_up([column + grid.width + 1, 0, column + grid.width + 1, grid.height]) + outputs.sprites << [heuristic_scale_up(grid.target), 'target.png'] ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -70628,18 +77979,26 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Easy way to draw horizontal lines given an index for the second grid~ +** Processing line: ~ # Renders the walls on the first grid~ - Inside source: true *** True Line Result - # Easy way to draw horizontal lines given an index for the second grid -** Processing line: ~ def shifted_horizontal_line row~ + # Renders the walls on the first grid +** Processing line: ~ def render_bfs_walls~ - Inside source: true *** True Line Result - def shifted_horizontal_line row -** Processing line: ~ scale_up([grid.width + 1, row, grid.width + grid.width + 1, row])~ + def render_bfs_walls +** Processing line: ~ grid.walls.each_key do | wall |~ - Inside source: true *** True Line Result - scale_up([grid.width + 1, row, grid.width + grid.width + 1, row]) + grid.walls.each_key do | wall | +** Processing line: ~ outputs.solids << [bfs_scale_up(wall), wall_color]~ +- Inside source: true +*** True Line Result + outputs.solids << [bfs_scale_up(wall), wall_color] +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -70648,22 +78007,26 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Labels the grids~ +** Processing line: ~ # Renders the walls on the second grid~ - Inside source: true *** True Line Result - # Labels the grids -** Processing line: ~ def render_labels~ + # Renders the walls on the second grid +** Processing line: ~ def render_heuristic_walls~ - Inside source: true *** True Line Result - def render_labels -** Processing line: ~ outputs.labels << [175, 650, "Number of steps", 3]~ + def render_heuristic_walls +** Processing line: ~ grid.walls.each_key do | wall |~ - Inside source: true *** True Line Result - outputs.labels << [175, 650, "Number of steps", 3] -** Processing line: ~ outputs.labels << [925, 650, "Distance", 3]~ + grid.walls.each_key do | wall | +** Processing line: ~ outputs.solids << [heuristic_scale_up(wall), wall_color]~ - Inside source: true *** True Line Result - outputs.labels << [925, 650, "Distance", 3] + outputs.solids << [heuristic_scale_up(wall), wall_color] +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -70672,18 +78035,26 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def render_paths~ +** Processing line: ~ # Renders the visited cells on the first grid~ - Inside source: true *** True Line Result - def render_paths -** Processing line: ~ render_breadth_first_search_path~ + # Renders the visited cells on the first grid +** Processing line: ~ def render_bfs_visited~ - Inside source: true *** True Line Result - render_breadth_first_search_path -** Processing line: ~ render_dijkstra_path~ + def render_bfs_visited +** Processing line: ~ bfs.came_from.each_key do | visited_cell |~ - Inside source: true *** True Line Result - render_dijkstra_path + bfs.came_from.each_key do | visited_cell | +** Processing line: ~ outputs.solids << [bfs_scale_up(visited_cell), visited_color]~ +- Inside source: true +*** True Line Result + outputs.solids << [bfs_scale_up(visited_cell), visited_color] +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -70692,18 +78063,26 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def render_heat_maps~ +** Processing line: ~ # Renders the visited cells on the second grid~ - Inside source: true *** True Line Result - def render_heat_maps -** Processing line: ~ render_breadth_first_search_heat_map~ + # Renders the visited cells on the second grid +** Processing line: ~ def render_heuristic_visited~ - Inside source: true *** True Line Result - render_breadth_first_search_heat_map -** Processing line: ~ render_dijkstra_heat_map~ + def render_heuristic_visited +** Processing line: ~ heuristic.came_from.each_key do | visited_cell |~ - Inside source: true *** True Line Result - render_dijkstra_heat_map + heuristic.came_from.each_key do | visited_cell | +** Processing line: ~ outputs.solids << [heuristic_scale_up(visited_cell), visited_color]~ +- Inside source: true +*** True Line Result + outputs.solids << [heuristic_scale_up(visited_cell), visited_color] +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -70712,14 +78091,26 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Renders the breadth first search on the first grid~ +** Processing line: ~ # Renders the frontier cells on the first grid~ - Inside source: true *** True Line Result - # Renders the breadth first search on the first grid -** Processing line: ~ def render_breadth_first_search~ + # Renders the frontier cells on the first grid +** Processing line: ~ def render_bfs_frontier~ - Inside source: true *** True Line Result - def render_breadth_first_search + def render_bfs_frontier +** Processing line: ~ bfs.frontier.each do | frontier_cell |~ +- Inside source: true +*** True Line Result + bfs.frontier.each do | frontier_cell | +** Processing line: ~ outputs.solids << [bfs_scale_up(frontier_cell), frontier_color, 200]~ +- Inside source: true +*** True Line Result + outputs.solids << [bfs_scale_up(frontier_cell), frontier_color, 200] +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -70728,46 +78119,50 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # This heat map shows the cells explored by the breadth first search and how far they are from the star.~ +** Processing line: ~ # Renders the frontier cells on the second grid~ - Inside source: true *** True Line Result - # This heat map shows the cells explored by the breadth first search and how far they are from the star. -** Processing line: ~ def render_breadth_first_search_heat_map~ + # Renders the frontier cells on the second grid +** Processing line: ~ def render_heuristic_frontier~ - Inside source: true *** True Line Result - def render_breadth_first_search_heat_map -** Processing line: ~ # For each cell explored~ + def render_heuristic_frontier +** Processing line: ~ heuristic.frontier.each do | frontier_cell |~ - Inside source: true *** True Line Result - # For each cell explored -** Processing line: ~ breadth_first_search.visited.each_key do | visited_cell |~ + heuristic.frontier.each do | frontier_cell | +** Processing line: ~ outputs.solids << [heuristic_scale_up(frontier_cell), frontier_color, 200]~ - Inside source: true *** True Line Result - breadth_first_search.visited.each_key do | visited_cell | -** Processing line: ~ # Find its distance from the star~ + outputs.solids << [heuristic_scale_up(frontier_cell), frontier_color, 200] +** Processing line: ~ end~ - Inside source: true *** True Line Result - # Find its distance from the star -** Processing line: ~ distance = (state.star.x - visited_cell.x).abs + (state.star.y - visited_cell.y).abs~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - distance = (state.star.x - visited_cell.x).abs + (state.star.y - visited_cell.y).abs -** Processing line: ~ max_distance = grid.width + grid.height~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - max_distance = grid.width + grid.height -** Processing line: ~ # Get it as a percent of the maximum distance and scale to 255 for use as an alpha value~ + +** Processing line: ~ # Renders the path found by the breadth first search on the first grid~ - Inside source: true *** True Line Result - # Get it as a percent of the maximum distance and scale to 255 for use as an alpha value -** Processing line: ~ alpha = 255.to_i * distance.to_i / max_distance.to_i~ + # Renders the path found by the breadth first search on the first grid +** Processing line: ~ def render_bfs_path~ - Inside source: true *** True Line Result - alpha = 255.to_i * distance.to_i / max_distance.to_i -** Processing line: ~ outputs.solids << [scale_up(visited_cell), red, alpha]~ + def render_bfs_path +** Processing line: ~ bfs.path.each do | path |~ - Inside source: true *** True Line Result - outputs.solids << [scale_up(visited_cell), red, alpha] + bfs.path.each do | path | +** Processing line: ~ outputs.solids << [bfs_scale_up(path), path_color]~ +- Inside source: true +*** True Line Result + outputs.solids << [bfs_scale_up(path), path_color] ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -70780,122 +78175,126 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def render_breadth_first_search_path~ -- Inside source: true -*** True Line Result - def render_breadth_first_search_path -** Processing line: ~ # If the search found the target~ +** Processing line: ~ # Renders the path found by the heuristic search on the second grid~ - Inside source: true *** True Line Result - # If the search found the target -** Processing line: ~ if breadth_first_search.visited.has_key?(state.target)~ + # Renders the path found by the heuristic search on the second grid +** Processing line: ~ def render_heuristic_path~ - Inside source: true *** True Line Result - if breadth_first_search.visited.has_key?(state.target) -** Processing line: ~ # Start from the target~ + def render_heuristic_path +** Processing line: ~ heuristic.path.each do | path |~ - Inside source: true *** True Line Result - # Start from the target -** Processing line: ~ endpoint = state.target~ + heuristic.path.each do | path | +** Processing line: ~ outputs.solids << [heuristic_scale_up(path), path_color]~ - Inside source: true *** True Line Result - endpoint = state.target -** Processing line: ~ # And the cell it came from~ + outputs.solids << [heuristic_scale_up(path), path_color] +** Processing line: ~ end~ - Inside source: true *** True Line Result - # And the cell it came from -** Processing line: ~ next_endpoint = breadth_first_search.came_from[endpoint]~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - next_endpoint = breadth_first_search.came_from[endpoint] -** Processing line: ~ while endpoint and next_endpoint~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - while endpoint and next_endpoint -** Processing line: ~ # Draw a path between these two cells~ + +** Processing line: ~ # Returns the rect for the path between two cells based on their relative positions~ - Inside source: true *** True Line Result - # Draw a path between these two cells -** Processing line: ~ path = get_path_between(endpoint, next_endpoint)~ + # Returns the rect for the path between two cells based on their relative positions +** Processing line: ~ def get_path_between(cell_one, cell_two)~ - Inside source: true *** True Line Result - path = get_path_between(endpoint, next_endpoint) -** Processing line: ~ outputs.solids << [scale_up(path), path_color]~ + def get_path_between(cell_one, cell_two) +** Processing line: ~ path = nil~ - Inside source: true *** True Line Result - outputs.solids << [scale_up(path), path_color] -** Processing line: ~ # And get the next pair of cells~ + path = nil +** Processing line: ~~ - Inside source: true *** True Line Result - # And get the next pair of cells -** Processing line: ~ endpoint = next_endpoint~ + +** Processing line: ~ # If cell one is above cell two~ - Inside source: true *** True Line Result - endpoint = next_endpoint -** Processing line: ~ next_endpoint = breadth_first_search.came_from[endpoint]~ + # If cell one is above cell two +** Processing line: ~ if cell_one.x == cell_two.x and cell_one.y > cell_two.y~ - Inside source: true *** True Line Result - next_endpoint = breadth_first_search.came_from[endpoint] -** Processing line: ~ # Continue till there are no more cells~ + if cell_one.x == cell_two.x and cell_one.y > cell_two.y +** Processing line: ~ # Path starts from the center of cell two and moves upward to the center of cell one~ - Inside source: true *** True Line Result - # Continue till there are no more cells -** Processing line: ~ end~ + # Path starts from the center of cell two and moves upward to the center of cell one +** Processing line: ~ path = [cell_two.x + 0.3, cell_two.y + 0.3, 0.4, 1.4]~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + path = [cell_two.x + 0.3, cell_two.y + 0.3, 0.4, 1.4] +** Processing line: ~ # If cell one is below cell two~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + # If cell one is below cell two +** Processing line: ~ elsif cell_one.x == cell_two.x and cell_one.y < cell_two.y~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + elsif cell_one.x == cell_two.x and cell_one.y < cell_two.y +** Processing line: ~ # Path starts from the center of cell one and moves upward to the center of cell two~ - Inside source: true *** True Line Result - -** Processing line: ~ # Renders the Dijkstra search on the second grid~ + # Path starts from the center of cell one and moves upward to the center of cell two +** Processing line: ~ path = [cell_one.x + 0.3, cell_one.y + 0.3, 0.4, 1.4]~ - Inside source: true *** True Line Result - # Renders the Dijkstra search on the second grid -** Processing line: ~ def render_dijkstra~ + path = [cell_one.x + 0.3, cell_one.y + 0.3, 0.4, 1.4] +** Processing line: ~ # If cell one is to the left of cell two~ - Inside source: true *** True Line Result - def render_dijkstra -** Processing line: ~ end~ + # If cell one is to the left of cell two +** Processing line: ~ elsif cell_one.x > cell_two.x and cell_one.y == cell_two.y~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + elsif cell_one.x > cell_two.x and cell_one.y == cell_two.y +** Processing line: ~ # Path starts from the center of cell two and moves rightward to the center of cell one~ - Inside source: true *** True Line Result - -** Processing line: ~ def render_dijkstra_heat_map~ + # Path starts from the center of cell two and moves rightward to the center of cell one +** Processing line: ~ path = [cell_two.x + 0.3, cell_two.y + 0.3, 1.4, 0.4]~ - Inside source: true *** True Line Result - def render_dijkstra_heat_map -** Processing line: ~ dijkstra_search.cost_so_far.each do |visited_cell, cost|~ + path = [cell_two.x + 0.3, cell_two.y + 0.3, 1.4, 0.4] +** Processing line: ~ # If cell one is to the right of cell two~ - Inside source: true *** True Line Result - dijkstra_search.cost_so_far.each do |visited_cell, cost| -** Processing line: ~ max_cost = (grid.width + grid.height) #* 5~ + # If cell one is to the right of cell two +** Processing line: ~ elsif cell_one.x < cell_two.x and cell_one.y == cell_two.y~ - Inside source: true *** True Line Result - max_cost = (grid.width + grid.height) #* 5 -** Processing line: ~ alpha = 255.to_i * cost.to_i / max_cost.to_i~ + elsif cell_one.x < cell_two.x and cell_one.y == cell_two.y +** Processing line: ~ # Path starts from the center of cell one and moves rightward to the center of cell two~ - Inside source: true *** True Line Result - alpha = 255.to_i * cost.to_i / max_cost.to_i -** Processing line: ~ outputs.solids << [move_and_scale_up(visited_cell), red, alpha]~ + # Path starts from the center of cell one and moves rightward to the center of cell two +** Processing line: ~ path = [cell_one.x + 0.3, cell_one.y + 0.3, 1.4, 0.4]~ - Inside source: true *** True Line Result - outputs.solids << [move_and_scale_up(visited_cell), red, alpha] + path = [cell_one.x + 0.3, cell_one.y + 0.3, 1.4, 0.4] ** Processing line: ~ end~ - Inside source: true *** True Line Result end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ path~ +- Inside source: true +*** True Line Result + path ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -70904,102 +78303,94 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def render_dijkstra_path~ -- Inside source: true -*** True Line Result - def render_dijkstra_path -** Processing line: ~ # If the search found the target~ +** Processing line: ~ # In code, the cells are represented as 1x1 rectangles~ - Inside source: true *** True Line Result - # If the search found the target -** Processing line: ~ if dijkstra_search.came_from.has_key?(state.target)~ + # In code, the cells are represented as 1x1 rectangles +** Processing line: ~ # When drawn, the cells are larger than 1x1 rectangles~ - Inside source: true *** True Line Result - if dijkstra_search.came_from.has_key?(state.target) -** Processing line: ~ # Get the target and the cell it came from~ + # When drawn, the cells are larger than 1x1 rectangles +** Processing line: ~ # This method is used to scale up cells, and lines~ - Inside source: true *** True Line Result - # Get the target and the cell it came from -** Processing line: ~ endpoint = state.target~ + # This method is used to scale up cells, and lines +** Processing line: ~ # Objects are scaled up according to the grid.cell_size variable~ - Inside source: true *** True Line Result - endpoint = state.target -** Processing line: ~ next_endpoint = dijkstra_search.came_from[endpoint]~ + # Objects are scaled up according to the grid.cell_size variable +** Processing line: ~ # This allows for easy customization of the visual scale of the grid~ - Inside source: true *** True Line Result - next_endpoint = dijkstra_search.came_from[endpoint] -** Processing line: ~ while endpoint and next_endpoint~ + # This allows for easy customization of the visual scale of the grid +** Processing line: ~ # This method scales up cells for the first grid~ - Inside source: true *** True Line Result - while endpoint and next_endpoint -** Processing line: ~ # Draw a path between them~ + # This method scales up cells for the first grid +** Processing line: ~ def bfs_scale_up(cell)~ - Inside source: true *** True Line Result - # Draw a path between them -** Processing line: ~ path = get_path_between(endpoint, next_endpoint)~ + def bfs_scale_up(cell) +** Processing line: ~ # Prevents the original value of cell from being edited~ - Inside source: true *** True Line Result - path = get_path_between(endpoint, next_endpoint) -** Processing line: ~ outputs.solids << [move_and_scale_up(path), path_color]~ + # Prevents the original value of cell from being edited +** Processing line: ~ cell = cell.clone~ - Inside source: true *** True Line Result - outputs.solids << [move_and_scale_up(path), path_color] + cell = cell.clone ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Shift one cell down the path~ -- Inside source: true -*** True Line Result - # Shift one cell down the path -** Processing line: ~ endpoint = next_endpoint~ +** Processing line: ~ # If cell is just an x and y coordinate~ - Inside source: true *** True Line Result - endpoint = next_endpoint -** Processing line: ~ next_endpoint = dijkstra_search.came_from[endpoint]~ + # If cell is just an x and y coordinate +** Processing line: ~ if cell.size == 2~ - Inside source: true *** True Line Result - next_endpoint = dijkstra_search.came_from[endpoint] -** Processing line: ~~ + if cell.size == 2 +** Processing line: ~ # Add a width and height of 1~ - Inside source: true *** True Line Result - -** Processing line: ~ # Repeat till the end of the path~ + # Add a width and height of 1 +** Processing line: ~ cell << 1~ - Inside source: true *** True Line Result - # Repeat till the end of the path -** Processing line: ~ end~ + cell << 1 +** Processing line: ~ cell << 1~ - Inside source: true *** True Line Result - end + cell << 1 ** Processing line: ~ end~ - Inside source: true *** True Line Result end -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Renders the star on both grids~ +** Processing line: ~ # Scale all the values up~ - Inside source: true *** True Line Result - # Renders the star on both grids -** Processing line: ~ def render_star~ + # Scale all the values up +** Processing line: ~ cell.map! { |value| value * grid.cell_size }~ - Inside source: true *** True Line Result - def render_star -** Processing line: ~ outputs.sprites << [scale_up(state.star), 'star.png']~ + cell.map! { |value| value * grid.cell_size } +** Processing line: ~~ - Inside source: true *** True Line Result - outputs.sprites << [scale_up(state.star), 'star.png'] -** Processing line: ~ outputs.sprites << [move_and_scale_up(state.star), 'star.png']~ + +** Processing line: ~ # Returns the scaled up cell~ - Inside source: true *** True Line Result - outputs.sprites << [move_and_scale_up(state.star), 'star.png'] + # Returns the scaled up cell +** Processing line: ~ cell~ +- Inside source: true +*** True Line Result + cell ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -71008,50 +78399,50 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Renders the target on both grids~ +** Processing line: ~ # Translates the given cell grid.width + 1 to the right and then scales up~ - Inside source: true *** True Line Result - # Renders the target on both grids -** Processing line: ~ def render_target~ + # Translates the given cell grid.width + 1 to the right and then scales up +** Processing line: ~ # Used to draw cells for the second grid~ - Inside source: true *** True Line Result - def render_target -** Processing line: ~ outputs.sprites << [scale_up(state.target), 'target.png']~ + # Used to draw cells for the second grid +** Processing line: ~ # This method does not work for lines,~ - Inside source: true *** True Line Result - outputs.sprites << [scale_up(state.target), 'target.png'] -** Processing line: ~ outputs.sprites << [move_and_scale_up(state.target), 'target.png']~ + # This method does not work for lines, +** Processing line: ~ # so separate methods exist for the grid lines~ - Inside source: true *** True Line Result - outputs.sprites << [move_and_scale_up(state.target), 'target.png'] -** Processing line: ~ end~ + # so separate methods exist for the grid lines +** Processing line: ~ def heuristic_scale_up(cell)~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + def heuristic_scale_up(cell) +** Processing line: ~ # Prevents the original value of cell from being edited~ - Inside source: true *** True Line Result - -** Processing line: ~ def render_hills~ + # Prevents the original value of cell from being edited +** Processing line: ~ cell = cell.clone~ - Inside source: true *** True Line Result - def render_hills -** Processing line: ~ state.hills.each_key do |hill|~ + cell = cell.clone +** Processing line: ~ # Translates the cell to the second grid equivalent~ - Inside source: true *** True Line Result - state.hills.each_key do |hill| -** Processing line: ~ outputs.solids << [scale_up(hill), hill_color]~ + # Translates the cell to the second grid equivalent +** Processing line: ~ cell.x += grid.width + 1~ - Inside source: true *** True Line Result - outputs.solids << [scale_up(hill), hill_color] -** Processing line: ~ outputs.solids << [move_and_scale_up(hill), hill_color]~ + cell.x += grid.width + 1 +** Processing line: ~ # Proceeds as if scaling up for the first grid~ - Inside source: true *** True Line Result - outputs.solids << [move_and_scale_up(hill), hill_color] -** Processing line: ~ end~ + # Proceeds as if scaling up for the first grid +** Processing line: ~ bfs_scale_up(cell)~ - Inside source: true *** True Line Result - end + bfs_scale_up(cell) ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -71060,30 +78451,30 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Draws the walls on both grids~ +** Processing line: ~ # Checks and handles input for the buttons~ - Inside source: true *** True Line Result - # Draws the walls on both grids -** Processing line: ~ def render_walls~ + # Checks and handles input for the buttons +** Processing line: ~ # Called when the mouse is lifted~ - Inside source: true *** True Line Result - def render_walls -** Processing line: ~ state.walls.each_key do |wall|~ + # Called when the mouse is lifted +** Processing line: ~ def input_buttons~ - Inside source: true *** True Line Result - state.walls.each_key do |wall| -** Processing line: ~ outputs.solids << [scale_up(wall), wall_color]~ + def input_buttons +** Processing line: ~ input_left_button~ - Inside source: true *** True Line Result - outputs.solids << [scale_up(wall), wall_color] -** Processing line: ~ outputs.solids << [move_and_scale_up(wall), wall_color]~ + input_left_button +** Processing line: ~ input_center_button~ - Inside source: true *** True Line Result - outputs.solids << [move_and_scale_up(wall), wall_color] -** Processing line: ~ end~ + input_center_button +** Processing line: ~ input_right_button~ - Inside source: true *** True Line Result - end + input_right_button ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -71092,70 +78483,70 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def get_path_between(cell_one, cell_two)~ +** Processing line: ~ # Checks if the previous step button is clicked~ - Inside source: true *** True Line Result - def get_path_between(cell_one, cell_two) -** Processing line: ~ path = nil~ + # Checks if the previous step button is clicked +** Processing line: ~ # If it is, it pauses the animation and moves the search one step backward~ - Inside source: true *** True Line Result - path = nil -** Processing line: ~ if cell_one.x == cell_two.x~ + # If it is, it pauses the animation and moves the search one step backward +** Processing line: ~ def input_left_button~ - Inside source: true *** True Line Result - if cell_one.x == cell_two.x -** Processing line: ~ if cell_one.y < cell_two.y~ + def input_left_button +** Processing line: ~ if left_button_clicked?~ - Inside source: true *** True Line Result - if cell_one.y < cell_two.y -** Processing line: ~ path = [cell_one.x + 0.3, cell_one.y + 0.3, 0.4, 1.4]~ + if left_button_clicked? +** Processing line: ~ state.play = false~ - Inside source: true *** True Line Result - path = [cell_one.x + 0.3, cell_one.y + 0.3, 0.4, 1.4] -** Processing line: ~ else~ + state.play = false +** Processing line: ~ state.current_step -= 1~ - Inside source: true *** True Line Result - else -** Processing line: ~ path = [cell_two.x + 0.3, cell_two.y + 0.3, 0.4, 1.4]~ + state.current_step -= 1 +** Processing line: ~ recalculate_searches~ - Inside source: true *** True Line Result - path = [cell_two.x + 0.3, cell_two.y + 0.3, 0.4, 1.4] -** Processing line: ~ end~ + recalculate_searches +** Processing line: ~ end~ - Inside source: true *** True Line Result - end -** Processing line: ~ else~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - else -** Processing line: ~ if cell_one.x < cell_two.x~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - if cell_one.x < cell_two.x -** Processing line: ~ path = [cell_one.x + 0.3, cell_one.y + 0.3, 1.4, 0.4]~ + +** Processing line: ~ # Controls the play/pause button~ - Inside source: true *** True Line Result - path = [cell_one.x + 0.3, cell_one.y + 0.3, 1.4, 0.4] -** Processing line: ~ else~ + # Controls the play/pause button +** Processing line: ~ # Inverses whether the animation is playing or not when clicked~ - Inside source: true *** True Line Result - else -** Processing line: ~ path = [cell_two.x + 0.3, cell_two.y + 0.3, 1.4, 0.4]~ + # Inverses whether the animation is playing or not when clicked +** Processing line: ~ def input_center_button~ - Inside source: true *** True Line Result - path = [cell_two.x + 0.3, cell_two.y + 0.3, 1.4, 0.4] -** Processing line: ~ end~ + def input_center_button +** Processing line: ~ if center_button_clicked? || inputs.keyboard.key_down.space~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + if center_button_clicked? || inputs.keyboard.key_down.space +** Processing line: ~ state.play = !state.play~ - Inside source: true *** True Line Result - end -** Processing line: ~ path~ + state.play = !state.play +** Processing line: ~ end~ - Inside source: true *** True Line Result - path + end ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -71164,42 +78555,34 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Representation of how far away visited cells are from the star~ -- Inside source: true -*** True Line Result - # Representation of how far away visited cells are from the star -** Processing line: ~ # Replaces the render_visited method~ -- Inside source: true -*** True Line Result - # Replaces the render_visited method -** Processing line: ~ # Visually demonstrates the effectiveness of early exit for pathfinding~ +** Processing line: ~ # Checks if the next step button is clicked~ - Inside source: true *** True Line Result - # Visually demonstrates the effectiveness of early exit for pathfinding -** Processing line: ~ def render_breadth_first_search_heat_map~ + # Checks if the next step button is clicked +** Processing line: ~ # If it is, it pauses the animation and moves the search one step forward~ - Inside source: true *** True Line Result - def render_breadth_first_search_heat_map -** Processing line: ~ breadth_first_search.visited.each_key do | visited_cell |~ + # If it is, it pauses the animation and moves the search one step forward +** Processing line: ~ def input_right_button~ - Inside source: true *** True Line Result - breadth_first_search.visited.each_key do | visited_cell | -** Processing line: ~ distance = (state.star.x - visited_cell.x).abs + (state.star.y - visited_cell.y).abs~ + def input_right_button +** Processing line: ~ if right_button_clicked?~ - Inside source: true *** True Line Result - distance = (state.star.x - visited_cell.x).abs + (state.star.y - visited_cell.y).abs -** Processing line: ~ max_distance = grid.width + grid.height~ + if right_button_clicked? +** Processing line: ~ state.play = false~ - Inside source: true *** True Line Result - max_distance = grid.width + grid.height -** Processing line: ~ alpha = 255.to_i * distance.to_i / max_distance.to_i~ + state.play = false +** Processing line: ~ state.current_step += 1~ - Inside source: true *** True Line Result - alpha = 255.to_i * distance.to_i / max_distance.to_i -** Processing line: ~ outputs.solids << [scale_up(visited_cell), red, alpha]~ + state.current_step += 1 +** Processing line: ~ move_searches_one_step_forward~ - Inside source: true *** True Line Result - outputs.solids << [scale_up(visited_cell), red, alpha] + move_searches_one_step_forward ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -71212,38 +78595,34 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Translates the given cell grid.width + 1 to the right and then scales up~ -- Inside source: true -*** True Line Result - # Translates the given cell grid.width + 1 to the right and then scales up -** Processing line: ~ # Used to draw cells for the second grid~ +** Processing line: ~ # These methods detect when the buttons are clicked~ - Inside source: true *** True Line Result - # Used to draw cells for the second grid -** Processing line: ~ # This method does not work for lines,~ + # These methods detect when the buttons are clicked +** Processing line: ~ def left_button_clicked?~ - Inside source: true *** True Line Result - # This method does not work for lines, -** Processing line: ~ # so separate methods exist for the grid lines~ + def left_button_clicked? +** Processing line: ~ inputs.mouse.point.inside_rect?(buttons.left) && inputs.mouse.up~ - Inside source: true *** True Line Result - # so separate methods exist for the grid lines -** Processing line: ~ def move_and_scale_up(cell)~ + inputs.mouse.point.inside_rect?(buttons.left) && inputs.mouse.up +** Processing line: ~ end~ - Inside source: true *** True Line Result - def move_and_scale_up(cell) -** Processing line: ~ cell_clone = cell.clone~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - cell_clone = cell.clone -** Processing line: ~ cell_clone.x += grid.width + 1~ + +** Processing line: ~ def center_button_clicked?~ - Inside source: true *** True Line Result - cell_clone.x += grid.width + 1 -** Processing line: ~ scale_up(cell_clone)~ + def center_button_clicked? +** Processing line: ~ inputs.mouse.point.inside_rect?(buttons.center) && inputs.mouse.up~ - Inside source: true *** True Line Result - scale_up(cell_clone) + inputs.mouse.point.inside_rect?(buttons.center) && inputs.mouse.up ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -71252,90 +78631,94 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # In code, the cells are represented as 1x1 rectangles~ +** Processing line: ~ def right_button_clicked?~ - Inside source: true *** True Line Result - # In code, the cells are represented as 1x1 rectangles -** Processing line: ~ # When drawn, the cells are larger than 1x1 rectangles~ + def right_button_clicked? +** Processing line: ~ inputs.mouse.point.inside_rect?(buttons.right) && inputs.mouse.up~ - Inside source: true *** True Line Result - # When drawn, the cells are larger than 1x1 rectangles -** Processing line: ~ # This method is used to scale up cells, and lines~ + inputs.mouse.point.inside_rect?(buttons.right) && inputs.mouse.up +** Processing line: ~ end~ - Inside source: true *** True Line Result - # This method is used to scale up cells, and lines -** Processing line: ~ # Objects are scaled up according to the grid.cell_size variable~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - # Objects are scaled up according to the grid.cell_size variable -** Processing line: ~ # This allows for easy customization of the visual scale of the grid~ + +** Processing line: ~~ - Inside source: true *** True Line Result - # This allows for easy customization of the visual scale of the grid -** Processing line: ~ def scale_up(cell)~ + +** Processing line: ~ # Signal that the user is going to be moving the slider~ - Inside source: true *** True Line Result - def scale_up(cell) -** Processing line: ~ # Prevents the original value of cell from being edited~ + # Signal that the user is going to be moving the slider +** Processing line: ~ # Is the mouse over the circle of the slider?~ - Inside source: true *** True Line Result - # Prevents the original value of cell from being edited -** Processing line: ~ cell = cell.clone~ + # Is the mouse over the circle of the slider? +** Processing line: ~ def mouse_over_slider?~ - Inside source: true *** True Line Result - cell = cell.clone -** Processing line: ~~ + def mouse_over_slider? +** Processing line: ~ circle_x = (slider.x - slider.offset) + (state.current_step * slider.spacing)~ - Inside source: true *** True Line Result - -** Processing line: ~ # If cell is just an x and y coordinate~ + circle_x = (slider.x - slider.offset) + (state.current_step * slider.spacing) +** Processing line: ~ circle_y = (slider.y - slider.offset)~ - Inside source: true *** True Line Result - # If cell is just an x and y coordinate -** Processing line: ~ if cell.size == 2~ + circle_y = (slider.y - slider.offset) +** Processing line: ~ circle_rect = [circle_x, circle_y, 37, 37]~ - Inside source: true *** True Line Result - if cell.size == 2 -** Processing line: ~ # Add a width and height of 1~ + circle_rect = [circle_x, circle_y, 37, 37] +** Processing line: ~ inputs.mouse.point.inside_rect?(circle_rect)~ - Inside source: true *** True Line Result - # Add a width and height of 1 -** Processing line: ~ cell << 1~ + inputs.mouse.point.inside_rect?(circle_rect) +** Processing line: ~ end~ - Inside source: true *** True Line Result - cell << 1 -** Processing line: ~ cell << 1~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - cell << 1 -** Processing line: ~ end~ + +** Processing line: ~ # Signal that the user is going to be moving the star from the first grid~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + # Signal that the user is going to be moving the star from the first grid +** Processing line: ~ def bfs_mouse_over_star?~ - Inside source: true *** True Line Result - -** Processing line: ~ # Scale all the values up~ + def bfs_mouse_over_star? +** Processing line: ~ inputs.mouse.point.inside_rect?(bfs_scale_up(grid.star))~ - Inside source: true *** True Line Result - # Scale all the values up -** Processing line: ~ cell.map! { |value| value * grid.cell_size }~ + inputs.mouse.point.inside_rect?(bfs_scale_up(grid.star)) +** Processing line: ~ end~ - Inside source: true *** True Line Result - cell.map! { |value| value * grid.cell_size } + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Returns the scaled up cell~ +** Processing line: ~ # Signal that the user is going to be moving the star from the second grid~ - Inside source: true *** True Line Result - # Returns the scaled up cell -** Processing line: ~ cell~ + # Signal that the user is going to be moving the star from the second grid +** Processing line: ~ def heuristic_mouse_over_star?~ - Inside source: true *** True Line Result - cell + def heuristic_mouse_over_star? +** Processing line: ~ inputs.mouse.point.inside_rect?(heuristic_scale_up(grid.star))~ +- Inside source: true +*** True Line Result + inputs.mouse.point.inside_rect?(heuristic_scale_up(grid.star)) ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -71344,66 +78727,62 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Handles user input every tick so the grid can be edited~ -- Inside source: true -*** True Line Result - # Handles user input every tick so the grid can be edited -** Processing line: ~ # Separate input detection and processing is needed~ +** Processing line: ~ # Signal that the user is going to be moving the target from the first grid~ - Inside source: true *** True Line Result - # Separate input detection and processing is needed -** Processing line: ~ # For example: Adding walls is started by clicking down on a hill,~ + # Signal that the user is going to be moving the target from the first grid +** Processing line: ~ def bfs_mouse_over_target?~ - Inside source: true *** True Line Result - # For example: Adding walls is started by clicking down on a hill, -** Processing line: ~ # but the mouse doesn't need to remain over hills to add walls~ + def bfs_mouse_over_target? +** Processing line: ~ inputs.mouse.point.inside_rect?(bfs_scale_up(grid.target))~ - Inside source: true *** True Line Result - # but the mouse doesn't need to remain over hills to add walls -** Processing line: ~ def input~ + inputs.mouse.point.inside_rect?(bfs_scale_up(grid.target)) +** Processing line: ~ end~ - Inside source: true *** True Line Result - def input -** Processing line: ~ # If the mouse was lifted this tick~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - # If the mouse was lifted this tick -** Processing line: ~ if inputs.mouse.up~ + +** Processing line: ~ # Signal that the user is going to be moving the target from the second grid~ - Inside source: true *** True Line Result - if inputs.mouse.up -** Processing line: ~ # Set current input to none~ + # Signal that the user is going to be moving the target from the second grid +** Processing line: ~ def heuristic_mouse_over_target?~ - Inside source: true *** True Line Result - # Set current input to none -** Processing line: ~ state.user_input = :none~ + def heuristic_mouse_over_target? +** Processing line: ~ inputs.mouse.point.inside_rect?(heuristic_scale_up(grid.target))~ - Inside source: true *** True Line Result - state.user_input = :none -** Processing line: ~ end~ + inputs.mouse.point.inside_rect?(heuristic_scale_up(grid.target)) +** Processing line: ~ end~ - Inside source: true *** True Line Result - end + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # If the mouse was clicked this tick~ +** Processing line: ~ # Signal that the user is going to be removing walls from the first grid~ - Inside source: true *** True Line Result - # If the mouse was clicked this tick -** Processing line: ~ if inputs.mouse.down~ + # Signal that the user is going to be removing walls from the first grid +** Processing line: ~ def bfs_mouse_over_wall?~ - Inside source: true *** True Line Result - if inputs.mouse.down -** Processing line: ~ # Determine what the user is editing and edit the state.user_input variable~ + def bfs_mouse_over_wall? +** Processing line: ~ grid.walls.each_key do | wall |~ - Inside source: true *** True Line Result - # Determine what the user is editing and edit the state.user_input variable -** Processing line: ~ determine_input~ + grid.walls.each_key do | wall | +** Processing line: ~ return true if inputs.mouse.point.inside_rect?(bfs_scale_up(wall))~ - Inside source: true *** True Line Result - determine_input + return true if inputs.mouse.point.inside_rect?(bfs_scale_up(wall)) ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -71412,14 +78791,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Process user input based on user_input variable and current mouse position~ -- Inside source: true -*** True Line Result - # Process user input based on user_input variable and current mouse position -** Processing line: ~ process_input~ +** Processing line: ~ false~ - Inside source: true *** True Line Result - process_input + false ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -71428,186 +78803,198 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Determines what the user is editing and stores the value~ +** Processing line: ~ # Signal that the user is going to be removing walls from the second grid~ - Inside source: true *** True Line Result - # Determines what the user is editing and stores the value -** Processing line: ~ # This method is called the tick the mouse is clicked~ + # Signal that the user is going to be removing walls from the second grid +** Processing line: ~ def heuristic_mouse_over_wall?~ - Inside source: true *** True Line Result - # This method is called the tick the mouse is clicked -** Processing line: ~ # Storing the value allows the user to continue the same edit as long as the~ + def heuristic_mouse_over_wall? +** Processing line: ~ grid.walls.each_key do | wall |~ - Inside source: true *** True Line Result - # Storing the value allows the user to continue the same edit as long as the -** Processing line: ~ # mouse left click is held~ + grid.walls.each_key do | wall | +** Processing line: ~ return true if inputs.mouse.point.inside_rect?(heuristic_scale_up(wall))~ - Inside source: true *** True Line Result - # mouse left click is held -** Processing line: ~ def determine_input~ + return true if inputs.mouse.point.inside_rect?(heuristic_scale_up(wall)) +** Processing line: ~ end~ - Inside source: true *** True Line Result - def determine_input -** Processing line: ~ # If the mouse is over the star in the first grid~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - # If the mouse is over the star in the first grid -** Processing line: ~ if mouse_over_star?~ + +** Processing line: ~ false~ - Inside source: true *** True Line Result - if mouse_over_star? -** Processing line: ~ # The user is editing the star from the first grid~ + false +** Processing line: ~ end~ - Inside source: true *** True Line Result - # The user is editing the star from the first grid -** Processing line: ~ state.user_input = :star~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - state.user_input = :star -** Processing line: ~ # If the mouse is over the star in the second grid~ + +** Processing line: ~ # Signal that the user is going to be adding walls from the first grid~ - Inside source: true *** True Line Result - # If the mouse is over the star in the second grid -** Processing line: ~ elsif mouse_over_star2?~ + # Signal that the user is going to be adding walls from the first grid +** Processing line: ~ def bfs_mouse_over_grid?~ - Inside source: true *** True Line Result - elsif mouse_over_star2? -** Processing line: ~ # The user is editing the star from the second grid~ + def bfs_mouse_over_grid? +** Processing line: ~ inputs.mouse.point.inside_rect?(bfs_scale_up(grid.rect))~ - Inside source: true *** True Line Result - # The user is editing the star from the second grid -** Processing line: ~ state.user_input = :star2~ + inputs.mouse.point.inside_rect?(bfs_scale_up(grid.rect)) +** Processing line: ~ end~ - Inside source: true *** True Line Result - state.user_input = :star2 -** Processing line: ~ # If the mouse is over the target in the first grid~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - # If the mouse is over the target in the first grid -** Processing line: ~ elsif mouse_over_target?~ + +** Processing line: ~ # Signal that the user is going to be adding walls from the second grid~ - Inside source: true *** True Line Result - elsif mouse_over_target? -** Processing line: ~ # The user is editing the target from the first grid~ + # Signal that the user is going to be adding walls from the second grid +** Processing line: ~ def heuristic_mouse_over_grid?~ - Inside source: true *** True Line Result - # The user is editing the target from the first grid -** Processing line: ~ state.user_input = :target~ + def heuristic_mouse_over_grid? +** Processing line: ~ inputs.mouse.point.inside_rect?(heuristic_scale_up(grid.rect))~ - Inside source: true *** True Line Result - state.user_input = :target -** Processing line: ~ # If the mouse is over the target in the second grid~ + inputs.mouse.point.inside_rect?(heuristic_scale_up(grid.rect)) +** Processing line: ~ end~ - Inside source: true *** True Line Result - # If the mouse is over the target in the second grid -** Processing line: ~ elsif mouse_over_target2?~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - elsif mouse_over_target2? -** Processing line: ~ # The user is editing the target from the second grid~ + +** Processing line: ~ # This method is called when the user is editing the slider~ - Inside source: true *** True Line Result - # The user is editing the target from the second grid -** Processing line: ~ state.user_input = :target2~ + # This method is called when the user is editing the slider +** Processing line: ~ # It pauses the animation and moves the white circle to the closest integer point~ - Inside source: true *** True Line Result - state.user_input = :target2 -** Processing line: ~ # If the mouse is over a wall in the first grid~ + # It pauses the animation and moves the white circle to the closest integer point +** Processing line: ~ # on the slider~ - Inside source: true *** True Line Result - # If the mouse is over a wall in the first grid -** Processing line: ~ elsif mouse_over_wall?~ + # on the slider +** Processing line: ~ # Changes the step of the search to be animated~ - Inside source: true *** True Line Result - elsif mouse_over_wall? -** Processing line: ~ # The user is removing a wall from the first grid~ + # Changes the step of the search to be animated +** Processing line: ~ def process_input_slider~ +- Inside source: true +*** True Line Result + def process_input_slider +** Processing line: ~ state.play = false~ +- Inside source: true +*** True Line Result + state.play = false +** Processing line: ~ mouse_x = inputs.mouse.point.x~ +- Inside source: true +*** True Line Result + mouse_x = inputs.mouse.point.x +** Processing line: ~~ - Inside source: true *** True Line Result - # The user is removing a wall from the first grid -** Processing line: ~ state.user_input = :remove_wall~ + +** Processing line: ~ # Bounds the mouse_x to the closest x value on the slider line~ - Inside source: true *** True Line Result - state.user_input = :remove_wall -** Processing line: ~ # If the mouse is over a wall in the second grid~ + # Bounds the mouse_x to the closest x value on the slider line +** Processing line: ~ mouse_x = slider.x if mouse_x < slider.x~ - Inside source: true *** True Line Result - # If the mouse is over a wall in the second grid -** Processing line: ~ elsif mouse_over_wall2?~ + mouse_x = slider.x if mouse_x < slider.x +** Processing line: ~ mouse_x = slider.x + slider.w if mouse_x > slider.x + slider.w~ - Inside source: true *** True Line Result - elsif mouse_over_wall2? -** Processing line: ~ # The user is removing a wall from the second grid~ + mouse_x = slider.x + slider.w if mouse_x > slider.x + slider.w +** Processing line: ~~ - Inside source: true *** True Line Result - # The user is removing a wall from the second grid -** Processing line: ~ state.user_input = :remove_wall2~ + +** Processing line: ~ # Sets the current search step to the one represented by the mouse x value~ - Inside source: true *** True Line Result - state.user_input = :remove_wall2 -** Processing line: ~ # If the mouse is over a hill in the first grid~ + # Sets the current search step to the one represented by the mouse x value +** Processing line: ~ # The slider's circle moves due to the render_slider method using anim_steps~ - Inside source: true *** True Line Result - # If the mouse is over a hill in the first grid -** Processing line: ~ elsif mouse_over_hill?~ + # The slider's circle moves due to the render_slider method using anim_steps +** Processing line: ~ state.current_step = ((mouse_x - slider.x) / slider.spacing).to_i~ - Inside source: true *** True Line Result - elsif mouse_over_hill? -** Processing line: ~ # The user is adding a wall from the first grid~ + state.current_step = ((mouse_x - slider.x) / slider.spacing).to_i +** Processing line: ~~ - Inside source: true *** True Line Result - # The user is adding a wall from the first grid -** Processing line: ~ state.user_input = :add_wall~ + +** Processing line: ~ recalculate_searches~ - Inside source: true *** True Line Result - state.user_input = :add_wall -** Processing line: ~ # If the mouse is over a hill in the second grid~ + recalculate_searches +** Processing line: ~ end~ - Inside source: true *** True Line Result - # If the mouse is over a hill in the second grid -** Processing line: ~ elsif mouse_over_hill2?~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - elsif mouse_over_hill2? -** Processing line: ~ # The user is adding a wall from the second grid~ + +** Processing line: ~ # Moves the star to the cell closest to the mouse in the first grid~ - Inside source: true *** True Line Result - # The user is adding a wall from the second grid -** Processing line: ~ state.user_input = :add_wall2~ + # Moves the star to the cell closest to the mouse in the first grid +** Processing line: ~ # Only resets the search if the star changes position~ - Inside source: true *** True Line Result - state.user_input = :add_wall2 -** Processing line: ~ # If the mouse is over the first grid~ + # Only resets the search if the star changes position +** Processing line: ~ # Called whenever the user is editing the star (puts mouse down on star)~ - Inside source: true *** True Line Result - # If the mouse is over the first grid -** Processing line: ~ elsif mouse_over_grid?~ + # Called whenever the user is editing the star (puts mouse down on star) +** Processing line: ~ def process_input_bfs_star~ - Inside source: true *** True Line Result - elsif mouse_over_grid? -** Processing line: ~ # The user is adding a hill from the first grid~ + def process_input_bfs_star +** Processing line: ~ old_star = grid.star.clone~ - Inside source: true *** True Line Result - # The user is adding a hill from the first grid -** Processing line: ~ state.user_input = :add_hill~ + old_star = grid.star.clone +** Processing line: ~ unless bfs_cell_closest_to_mouse == grid.target~ - Inside source: true *** True Line Result - state.user_input = :add_hill -** Processing line: ~ # If the mouse is over the second grid~ + unless bfs_cell_closest_to_mouse == grid.target +** Processing line: ~ grid.star = bfs_cell_closest_to_mouse~ - Inside source: true *** True Line Result - # If the mouse is over the second grid -** Processing line: ~ elsif mouse_over_grid2?~ + grid.star = bfs_cell_closest_to_mouse +** Processing line: ~ end~ - Inside source: true *** True Line Result - elsif mouse_over_grid2? -** Processing line: ~ # The user is adding a hill from the second grid~ + end +** Processing line: ~ unless old_star == grid.star~ - Inside source: true *** True Line Result - # The user is adding a hill from the second grid -** Processing line: ~ state.user_input = :add_hill2~ + unless old_star == grid.star +** Processing line: ~ recalculate_searches~ - Inside source: true *** True Line Result - state.user_input = :add_hill2 + recalculate_searches ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -71620,94 +79007,98 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Processes click and drag based on what the user is currently dragging~ +** Processing line: ~ # Moves the star to the cell closest to the mouse in the second grid~ - Inside source: true *** True Line Result - # Processes click and drag based on what the user is currently dragging -** Processing line: ~ def process_input~ + # Moves the star to the cell closest to the mouse in the second grid +** Processing line: ~ # Only resets the search if the star changes position~ - Inside source: true *** True Line Result - def process_input -** Processing line: ~ if state.user_input == :star~ + # Only resets the search if the star changes position +** Processing line: ~ # Called whenever the user is editing the star (puts mouse down on star)~ - Inside source: true *** True Line Result - if state.user_input == :star -** Processing line: ~ input_star~ + # Called whenever the user is editing the star (puts mouse down on star) +** Processing line: ~ def process_input_heuristic_star~ - Inside source: true *** True Line Result - input_star -** Processing line: ~ elsif state.user_input == :star2~ + def process_input_heuristic_star +** Processing line: ~ old_star = grid.star.clone~ - Inside source: true *** True Line Result - elsif state.user_input == :star2 -** Processing line: ~ input_star2~ + old_star = grid.star.clone +** Processing line: ~ unless heuristic_cell_closest_to_mouse == grid.target~ - Inside source: true *** True Line Result - input_star2 -** Processing line: ~ elsif state.user_input == :target~ + unless heuristic_cell_closest_to_mouse == grid.target +** Processing line: ~ grid.star = heuristic_cell_closest_to_mouse~ - Inside source: true *** True Line Result - elsif state.user_input == :target -** Processing line: ~ input_target~ + grid.star = heuristic_cell_closest_to_mouse +** Processing line: ~ end~ - Inside source: true *** True Line Result - input_target -** Processing line: ~ elsif state.user_input == :target2~ + end +** Processing line: ~ unless old_star == grid.star~ - Inside source: true *** True Line Result - elsif state.user_input == :target2 -** Processing line: ~ input_target2~ + unless old_star == grid.star +** Processing line: ~ recalculate_searches~ - Inside source: true *** True Line Result - input_target2 -** Processing line: ~ elsif state.user_input == :remove_wall~ + recalculate_searches +** Processing line: ~ end~ - Inside source: true *** True Line Result - elsif state.user_input == :remove_wall -** Processing line: ~ input_remove_wall~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - input_remove_wall -** Processing line: ~ elsif state.user_input == :remove_wall2~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - elsif state.user_input == :remove_wall2 -** Processing line: ~ input_remove_wall2~ + +** Processing line: ~ # Moves the target to the grid closest to the mouse in the first grid~ - Inside source: true *** True Line Result - input_remove_wall2 -** Processing line: ~ elsif state.user_input == :add_hill~ + # Moves the target to the grid closest to the mouse in the first grid +** Processing line: ~ # Only recalculate_searchess the search if the target changes position~ - Inside source: true *** True Line Result - elsif state.user_input == :add_hill -** Processing line: ~ input_add_hill~ + # Only recalculate_searchess the search if the target changes position +** Processing line: ~ # Called whenever the user is editing the target (puts mouse down on target)~ - Inside source: true *** True Line Result - input_add_hill -** Processing line: ~ elsif state.user_input == :add_hill2~ + # Called whenever the user is editing the target (puts mouse down on target) +** Processing line: ~ def process_input_bfs_target~ - Inside source: true *** True Line Result - elsif state.user_input == :add_hill2 -** Processing line: ~ input_add_hill2~ + def process_input_bfs_target +** Processing line: ~ old_target = grid.target.clone~ - Inside source: true *** True Line Result - input_add_hill2 -** Processing line: ~ elsif state.user_input == :add_wall~ + old_target = grid.target.clone +** Processing line: ~ unless bfs_cell_closest_to_mouse == grid.star~ - Inside source: true *** True Line Result - elsif state.user_input == :add_wall -** Processing line: ~ input_add_wall~ + unless bfs_cell_closest_to_mouse == grid.star +** Processing line: ~ grid.target = bfs_cell_closest_to_mouse~ - Inside source: true *** True Line Result - input_add_wall -** Processing line: ~ elsif state.user_input == :add_wall2~ + grid.target = bfs_cell_closest_to_mouse +** Processing line: ~ end~ - Inside source: true *** True Line Result - elsif state.user_input == :add_wall2 -** Processing line: ~ input_add_wall2~ + end +** Processing line: ~ unless old_target == grid.target~ - Inside source: true *** True Line Result - input_add_wall2 + unless old_target == grid.target +** Processing line: ~ recalculate_searches~ +- Inside source: true +*** True Line Result + recalculate_searches ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -71720,34 +79111,46 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Calculates the two searches~ +** Processing line: ~ # Moves the target to the cell closest to the mouse in the second grid~ - Inside source: true *** True Line Result - # Calculates the two searches -** Processing line: ~ def calc~ + # Moves the target to the cell closest to the mouse in the second grid +** Processing line: ~ # Only recalculate_searchess the search if the target changes position~ - Inside source: true *** True Line Result - def calc -** Processing line: ~ # If the searches have not started~ + # Only recalculate_searchess the search if the target changes position +** Processing line: ~ # Called whenever the user is editing the target (puts mouse down on target)~ - Inside source: true *** True Line Result - # If the searches have not started -** Processing line: ~ if breadth_first_search.visited.empty?~ + # Called whenever the user is editing the target (puts mouse down on target) +** Processing line: ~ def process_input_heuristic_target~ - Inside source: true *** True Line Result - if breadth_first_search.visited.empty? -** Processing line: ~ # Calculate the two searches~ + def process_input_heuristic_target +** Processing line: ~ old_target = grid.target.clone~ - Inside source: true *** True Line Result - # Calculate the two searches -** Processing line: ~ calc_breadth_first~ + old_target = grid.target.clone +** Processing line: ~ unless heuristic_cell_closest_to_mouse == grid.star~ - Inside source: true *** True Line Result - calc_breadth_first -** Processing line: ~ calc_dijkstra~ + unless heuristic_cell_closest_to_mouse == grid.star +** Processing line: ~ grid.target = heuristic_cell_closest_to_mouse~ - Inside source: true *** True Line Result - calc_dijkstra + grid.target = heuristic_cell_closest_to_mouse +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~ unless old_target == grid.target~ +- Inside source: true +*** True Line Result + unless old_target == grid.target +** Processing line: ~ recalculate_searches~ +- Inside source: true +*** True Line Result + recalculate_searches ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -71760,94 +79163,94 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~~ +** Processing line: ~ # Removes walls in the first grid that are under the cursor~ - Inside source: true *** True Line Result - -** Processing line: ~ def calc_breadth_first~ + # Removes walls in the first grid that are under the cursor +** Processing line: ~ def process_input_bfs_remove_wall~ - Inside source: true *** True Line Result - def calc_breadth_first -** Processing line: ~ # Sets up the Breadth First Search~ + def process_input_bfs_remove_wall +** Processing line: ~ # The mouse needs to be inside the grid, because we only want to remove walls~ - Inside source: true *** True Line Result - # Sets up the Breadth First Search -** Processing line: ~ breadth_first_search.visited[state.star] = true~ + # The mouse needs to be inside the grid, because we only want to remove walls +** Processing line: ~ # the cursor is directly over~ - Inside source: true *** True Line Result - breadth_first_search.visited[state.star] = true -** Processing line: ~ breadth_first_search.frontier << state.star~ + # the cursor is directly over +** Processing line: ~ # Recalculations should only occur when a wall is actually deleted~ - Inside source: true *** True Line Result - breadth_first_search.frontier << state.star -** Processing line: ~ breadth_first_search.came_from[state.star] = nil~ + # Recalculations should only occur when a wall is actually deleted +** Processing line: ~ if bfs_mouse_over_grid?~ - Inside source: true *** True Line Result - breadth_first_search.came_from[state.star] = nil -** Processing line: ~~ + if bfs_mouse_over_grid? +** Processing line: ~ if grid.walls.has_key?(bfs_cell_closest_to_mouse)~ - Inside source: true *** True Line Result - -** Processing line: ~ until breadth_first_search.frontier.empty?~ + if grid.walls.has_key?(bfs_cell_closest_to_mouse) +** Processing line: ~ grid.walls.delete(bfs_cell_closest_to_mouse)~ - Inside source: true *** True Line Result - until breadth_first_search.frontier.empty? -** Processing line: ~ return if breadth_first_search.visited.has_key?(state.target)~ + grid.walls.delete(bfs_cell_closest_to_mouse) +** Processing line: ~ recalculate_searches~ - Inside source: true *** True Line Result - return if breadth_first_search.visited.has_key?(state.target) -** Processing line: ~ # A step in the search~ + recalculate_searches +** Processing line: ~ end~ - Inside source: true *** True Line Result - # A step in the search -** Processing line: ~ # Takes the next frontier cell~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - # Takes the next frontier cell -** Processing line: ~ new_frontier = breadth_first_search.frontier.shift~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - new_frontier = breadth_first_search.frontier.shift -** Processing line: ~ # For each of its neighbors~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - # For each of its neighbors -** Processing line: ~ adjacent_neighbors(new_frontier).each do | neighbor |~ + +** Processing line: ~ # Removes walls in the second grid that are under the cursor~ - Inside source: true *** True Line Result - adjacent_neighbors(new_frontier).each do | neighbor | -** Processing line: ~ # That have not been visited and are not walls~ + # Removes walls in the second grid that are under the cursor +** Processing line: ~ def process_input_heuristic_remove_wall~ - Inside source: true *** True Line Result - # That have not been visited and are not walls -** Processing line: ~ unless breadth_first_search.visited.has_key?(neighbor) || state.walls.has_key?(neighbor)~ + def process_input_heuristic_remove_wall +** Processing line: ~ # The mouse needs to be inside the grid, because we only want to remove walls~ - Inside source: true *** True Line Result - unless breadth_first_search.visited.has_key?(neighbor) || state.walls.has_key?(neighbor) -** Processing line: ~ # Add them to the frontier and mark them as visited in the first grid~ + # The mouse needs to be inside the grid, because we only want to remove walls +** Processing line: ~ # the cursor is directly over~ - Inside source: true *** True Line Result - # Add them to the frontier and mark them as visited in the first grid -** Processing line: ~ breadth_first_search.visited[neighbor] = true~ + # the cursor is directly over +** Processing line: ~ # Recalculations should only occur when a wall is actually deleted~ - Inside source: true *** True Line Result - breadth_first_search.visited[neighbor] = true -** Processing line: ~ breadth_first_search.frontier << neighbor~ + # Recalculations should only occur when a wall is actually deleted +** Processing line: ~ if heuristic_mouse_over_grid?~ - Inside source: true *** True Line Result - breadth_first_search.frontier << neighbor -** Processing line: ~ # Remember which cell the neighbor came from~ + if heuristic_mouse_over_grid? +** Processing line: ~ if grid.walls.has_key?(heuristic_cell_closest_to_mouse)~ - Inside source: true *** True Line Result - # Remember which cell the neighbor came from -** Processing line: ~ breadth_first_search.came_from[neighbor] = new_frontier~ + if grid.walls.has_key?(heuristic_cell_closest_to_mouse) +** Processing line: ~ grid.walls.delete(heuristic_cell_closest_to_mouse)~ - Inside source: true *** True Line Result - breadth_first_search.came_from[neighbor] = new_frontier -** Processing line: ~ end~ + grid.walls.delete(heuristic_cell_closest_to_mouse) +** Processing line: ~ recalculate_searches~ - Inside source: true *** True Line Result - end + recalculate_searches ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -71860,246 +79263,258 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result end -** Processing line: ~~ +** Processing line: ~ # Adds a wall in the first grid in the cell the mouse is over~ - Inside source: true *** True Line Result - -** Processing line: ~ # Calculates the Dijkstra Search from the beginning to the end~ + # Adds a wall in the first grid in the cell the mouse is over +** Processing line: ~ def process_input_bfs_add_wall~ - Inside source: true *** True Line Result - # Calculates the Dijkstra Search from the beginning to the end -** Processing line: ~~ + def process_input_bfs_add_wall +** Processing line: ~ if bfs_mouse_over_grid?~ - Inside source: true *** True Line Result - -** Processing line: ~ def calc_dijkstra~ + if bfs_mouse_over_grid? +** Processing line: ~ unless grid.walls.has_key?(bfs_cell_closest_to_mouse)~ - Inside source: true *** True Line Result - def calc_dijkstra -** Processing line: ~ # The initial values for the Dijkstra search~ + unless grid.walls.has_key?(bfs_cell_closest_to_mouse) +** Processing line: ~ grid.walls[bfs_cell_closest_to_mouse] = true~ - Inside source: true *** True Line Result - # The initial values for the Dijkstra search -** Processing line: ~ dijkstra_search.frontier << [state.star, 0]~ + grid.walls[bfs_cell_closest_to_mouse] = true +** Processing line: ~ recalculate_searches~ - Inside source: true *** True Line Result - dijkstra_search.frontier << [state.star, 0] -** Processing line: ~ dijkstra_search.came_from[state.star] = nil~ + recalculate_searches +** Processing line: ~ end~ - Inside source: true *** True Line Result - dijkstra_search.came_from[state.star] = nil -** Processing line: ~ dijkstra_search.cost_so_far[state.star] = 0~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - dijkstra_search.cost_so_far[state.star] = 0 + end +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Until their are no more cells to be explored~ +** Processing line: ~ # Adds a wall in the second grid in the cell the mouse is over~ - Inside source: true *** True Line Result - # Until their are no more cells to be explored -** Processing line: ~ until dijkstra_search.frontier.empty?~ + # Adds a wall in the second grid in the cell the mouse is over +** Processing line: ~ def process_input_heuristic_add_wall~ - Inside source: true *** True Line Result - until dijkstra_search.frontier.empty? -** Processing line: ~ # Get the next cell to be explored from~ + def process_input_heuristic_add_wall +** Processing line: ~ if heuristic_mouse_over_grid?~ - Inside source: true *** True Line Result - # Get the next cell to be explored from -** Processing line: ~ # We get the first element of the array which is the cell. The second element is the priority.~ + if heuristic_mouse_over_grid? +** Processing line: ~ unless grid.walls.has_key?(heuristic_cell_closest_to_mouse)~ - Inside source: true *** True Line Result - # We get the first element of the array which is the cell. The second element is the priority. -** Processing line: ~ current = dijkstra_search.frontier.shift[0]~ + unless grid.walls.has_key?(heuristic_cell_closest_to_mouse) +** Processing line: ~ grid.walls[heuristic_cell_closest_to_mouse] = true~ - Inside source: true *** True Line Result - current = dijkstra_search.frontier.shift[0] -** Processing line: ~~ + grid.walls[heuristic_cell_closest_to_mouse] = true +** Processing line: ~ recalculate_searches~ - Inside source: true *** True Line Result - -** Processing line: ~ # Stop the search if we found the target~ + recalculate_searches +** Processing line: ~ end~ - Inside source: true *** True Line Result - # Stop the search if we found the target -** Processing line: ~ return if current == state.target~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - return if current == state.target + end +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # For each of the neighbors~ +** Processing line: ~ # When the user grabs the star and puts their cursor to the far right~ - Inside source: true *** True Line Result - # For each of the neighbors -** Processing line: ~ adjacent_neighbors(current).each do | neighbor |~ + # When the user grabs the star and puts their cursor to the far right +** Processing line: ~ # and moves up and down, the star is supposed to move along the grid as well~ - Inside source: true *** True Line Result - adjacent_neighbors(current).each do | neighbor | -** Processing line: ~ # Unless this cell is a wall or has already been explored.~ + # and moves up and down, the star is supposed to move along the grid as well +** Processing line: ~ # Finding the cell closest to the mouse helps with this~ - Inside source: true *** True Line Result - # Unless this cell is a wall or has already been explored. -** Processing line: ~ unless dijkstra_search.came_from.has_key?(neighbor) or state.walls.has_key?(neighbor)~ + # Finding the cell closest to the mouse helps with this +** Processing line: ~ def bfs_cell_closest_to_mouse~ - Inside source: true *** True Line Result - unless dijkstra_search.came_from.has_key?(neighbor) or state.walls.has_key?(neighbor) -** Processing line: ~ # Calculate the movement cost of getting to this cell and memo~ + def bfs_cell_closest_to_mouse +** Processing line: ~ # Closest cell to the mouse in the first grid~ - Inside source: true *** True Line Result - # Calculate the movement cost of getting to this cell and memo -** Processing line: ~ new_cost = dijkstra_search.cost_so_far[current] + cost(neighbor)~ + # Closest cell to the mouse in the first grid +** Processing line: ~ x = (inputs.mouse.point.x / grid.cell_size).to_i~ - Inside source: true *** True Line Result - new_cost = dijkstra_search.cost_so_far[current] + cost(neighbor) -** Processing line: ~ dijkstra_search.cost_so_far[neighbor] = new_cost~ + x = (inputs.mouse.point.x / grid.cell_size).to_i +** Processing line: ~ y = (inputs.mouse.point.y / grid.cell_size).to_i~ - Inside source: true *** True Line Result - dijkstra_search.cost_so_far[neighbor] = new_cost -** Processing line: ~~ + y = (inputs.mouse.point.y / grid.cell_size).to_i +** Processing line: ~ # Bound x and y to the grid~ - Inside source: true *** True Line Result - -** Processing line: ~ # Add this neighbor to the cells too be explored~ + # Bound x and y to the grid +** Processing line: ~ x = grid.width - 1 if x > grid.width - 1~ - Inside source: true *** True Line Result - # Add this neighbor to the cells too be explored -** Processing line: ~ dijkstra_search.frontier << [neighbor, new_cost]~ + x = grid.width - 1 if x > grid.width - 1 +** Processing line: ~ y = grid.height - 1 if y > grid.height - 1~ - Inside source: true *** True Line Result - dijkstra_search.frontier << [neighbor, new_cost] -** Processing line: ~ dijkstra_search.came_from[neighbor] = current~ + y = grid.height - 1 if y > grid.height - 1 +** Processing line: ~ # Return closest cell~ - Inside source: true *** True Line Result - dijkstra_search.came_from[neighbor] = current -** Processing line: ~ end~ + # Return closest cell +** Processing line: ~ [x, y]~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + [x, y] +** Processing line: ~ end~ - Inside source: true *** True Line Result - end + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Sort the frontier so exploration occurs that have a low cost so far.~ +** Processing line: ~ # When the user grabs the star and puts their cursor to the far right~ - Inside source: true *** True Line Result - # Sort the frontier so exploration occurs that have a low cost so far. -** Processing line: ~ # My implementation of a priority queue~ + # When the user grabs the star and puts their cursor to the far right +** Processing line: ~ # and moves up and down, the star is supposed to move along the grid as well~ - Inside source: true *** True Line Result - # My implementation of a priority queue -** Processing line: ~ dijkstra_search.frontier = dijkstra_search.frontier.sort_by {|cell, priority| priority}~ + # and moves up and down, the star is supposed to move along the grid as well +** Processing line: ~ # Finding the cell closest to the mouse in the second grid helps with this~ - Inside source: true *** True Line Result - dijkstra_search.frontier = dijkstra_search.frontier.sort_by {|cell, priority| priority} -** Processing line: ~ end~ + # Finding the cell closest to the mouse in the second grid helps with this +** Processing line: ~ def heuristic_cell_closest_to_mouse~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + def heuristic_cell_closest_to_mouse +** Processing line: ~ # Closest cell grid to the mouse in the second~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + # Closest cell grid to the mouse in the second +** Processing line: ~ x = (inputs.mouse.point.x / grid.cell_size).to_i~ - Inside source: true *** True Line Result - -** Processing line: ~ def cost(cell)~ + x = (inputs.mouse.point.x / grid.cell_size).to_i +** Processing line: ~ y = (inputs.mouse.point.y / grid.cell_size).to_i~ - Inside source: true *** True Line Result - def cost(cell) -** Processing line: ~ if state.hills.has_key?(cell)~ + y = (inputs.mouse.point.y / grid.cell_size).to_i +** Processing line: ~ # Translate the cell to the first grid~ - Inside source: true *** True Line Result - if state.hills.has_key?(cell) -** Processing line: ~ return 5~ + # Translate the cell to the first grid +** Processing line: ~ x -= grid.width + 1~ - Inside source: true *** True Line Result - return 5 -** Processing line: ~ else~ + x -= grid.width + 1 +** Processing line: ~ # Bound x and y to the first grid~ - Inside source: true *** True Line Result - else -** Processing line: ~ return 1~ + # Bound x and y to the first grid +** Processing line: ~ x = 0 if x < 0~ - Inside source: true *** True Line Result - return 1 -** Processing line: ~ end~ + x = 0 if x < 0 +** Processing line: ~ y = 0 if y < 0~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + y = 0 if y < 0 +** Processing line: ~ x = grid.width - 1 if x > grid.width - 1~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + x = grid.width - 1 if x > grid.width - 1 +** Processing line: ~ y = grid.height - 1 if y > grid.height - 1~ - Inside source: true *** True Line Result - -** Processing line: ~~ + y = grid.height - 1 if y > grid.height - 1 +** Processing line: ~ # Return closest cell~ - Inside source: true *** True Line Result - -** Processing line: ~~ + # Return closest cell +** Processing line: ~ [x, y]~ - Inside source: true *** True Line Result - + [x, y] +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Moves the star to the cell closest to the mouse in the first grid~ +** Processing line: ~ def recalculate_searches~ - Inside source: true *** True Line Result - # Moves the star to the cell closest to the mouse in the first grid -** Processing line: ~ # Only resets the search if the star changes position~ + def recalculate_searches +** Processing line: ~ # Reset the searches~ - Inside source: true *** True Line Result - # Only resets the search if the star changes position -** Processing line: ~ # Called whenever the user is editing the star (puts mouse down on star)~ + # Reset the searches +** Processing line: ~ bfs.came_from = {}~ - Inside source: true *** True Line Result - # Called whenever the user is editing the star (puts mouse down on star) -** Processing line: ~ def input_star~ + bfs.came_from = {} +** Processing line: ~ bfs.frontier = []~ - Inside source: true *** True Line Result - def input_star -** Processing line: ~ old_star = state.star.clone~ + bfs.frontier = [] +** Processing line: ~ bfs.path = []~ - Inside source: true *** True Line Result - old_star = state.star.clone -** Processing line: ~ unless cell_closest_to_mouse == state.target~ + bfs.path = [] +** Processing line: ~ heuristic.came_from = {}~ - Inside source: true *** True Line Result - unless cell_closest_to_mouse == state.target -** Processing line: ~ state.star = cell_closest_to_mouse~ + heuristic.came_from = {} +** Processing line: ~ heuristic.frontier = []~ - Inside source: true *** True Line Result - state.star = cell_closest_to_mouse -** Processing line: ~ end~ + heuristic.frontier = [] +** Processing line: ~ heuristic.path = []~ - Inside source: true *** True Line Result - end -** Processing line: ~ unless old_star == state.star~ + heuristic.path = [] +** Processing line: ~~ - Inside source: true *** True Line Result - unless old_star == state.star -** Processing line: ~ reset_search~ + +** Processing line: ~ # Move the searches forward to the current step~ - Inside source: true *** True Line Result - reset_search -** Processing line: ~ end~ + # Move the searches forward to the current step +** Processing line: ~ state.current_step.times { move_searches_one_step_forward }~ - Inside source: true *** True Line Result - end + state.current_step.times { move_searches_one_step_forward } ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -72108,150 +79523,154 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Moves the star to the cell closest to the mouse in the second grid~ +** Processing line: ~ def move_searches_one_step_forward~ - Inside source: true *** True Line Result - # Moves the star to the cell closest to the mouse in the second grid -** Processing line: ~ # Only resets the search if the star changes position~ + def move_searches_one_step_forward +** Processing line: ~ bfs_one_step_forward~ - Inside source: true *** True Line Result - # Only resets the search if the star changes position -** Processing line: ~ # Called whenever the user is editing the star (puts mouse down on star)~ + bfs_one_step_forward +** Processing line: ~ heuristic_one_step_forward~ - Inside source: true *** True Line Result - # Called whenever the user is editing the star (puts mouse down on star) -** Processing line: ~ def input_star2~ + heuristic_one_step_forward +** Processing line: ~ end~ - Inside source: true *** True Line Result - def input_star2 -** Processing line: ~ old_star = state.star.clone~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - old_star = state.star.clone -** Processing line: ~ unless cell_closest_to_mouse2 == state.target~ + +** Processing line: ~ def bfs_one_step_forward~ - Inside source: true *** True Line Result - unless cell_closest_to_mouse2 == state.target -** Processing line: ~ state.star = cell_closest_to_mouse2~ + def bfs_one_step_forward +** Processing line: ~ return if bfs.came_from.has_key?(grid.target)~ - Inside source: true *** True Line Result - state.star = cell_closest_to_mouse2 -** Processing line: ~ end~ + return if bfs.came_from.has_key?(grid.target) +** Processing line: ~~ - Inside source: true *** True Line Result - end -** Processing line: ~ unless old_star == state.star~ + +** Processing line: ~ # Only runs at the beginning of the search as setup.~ - Inside source: true *** True Line Result - unless old_star == state.star -** Processing line: ~ reset_search~ + # Only runs at the beginning of the search as setup. +** Processing line: ~ if bfs.came_from.empty?~ - Inside source: true *** True Line Result - reset_search -** Processing line: ~ end~ + if bfs.came_from.empty? +** Processing line: ~ bfs.frontier << grid.star~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + bfs.frontier << grid.star +** Processing line: ~ bfs.came_from[grid.star] = nil~ - Inside source: true *** True Line Result - end + bfs.came_from[grid.star] = nil +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Moves the target to the grid closest to the mouse in the first grid~ +** Processing line: ~ # A step in the search~ - Inside source: true *** True Line Result - # Moves the target to the grid closest to the mouse in the first grid -** Processing line: ~ # Only reset_searchs the search if the target changes position~ + # A step in the search +** Processing line: ~ unless bfs.frontier.empty?~ - Inside source: true *** True Line Result - # Only reset_searchs the search if the target changes position -** Processing line: ~ # Called whenever the user is editing the target (puts mouse down on target)~ + unless bfs.frontier.empty? +** Processing line: ~ # Takes the next frontier cell~ - Inside source: true *** True Line Result - # Called whenever the user is editing the target (puts mouse down on target) -** Processing line: ~ def input_target~ + # Takes the next frontier cell +** Processing line: ~ new_frontier = bfs.frontier.shift~ - Inside source: true *** True Line Result - def input_target -** Processing line: ~ old_target = state.target.clone~ + new_frontier = bfs.frontier.shift +** Processing line: ~ # For each of its neighbors~ - Inside source: true *** True Line Result - old_target = state.target.clone -** Processing line: ~ unless cell_closest_to_mouse == state.star~ + # For each of its neighbors +** Processing line: ~ adjacent_neighbors(new_frontier).each do |neighbor|~ - Inside source: true *** True Line Result - unless cell_closest_to_mouse == state.star -** Processing line: ~ state.target = cell_closest_to_mouse~ + adjacent_neighbors(new_frontier).each do |neighbor| +** Processing line: ~ # That have not been visited and are not walls~ - Inside source: true *** True Line Result - state.target = cell_closest_to_mouse -** Processing line: ~ end~ + # That have not been visited and are not walls +** Processing line: ~ unless bfs.came_from.has_key?(neighbor) || grid.walls.has_key?(neighbor)~ - Inside source: true *** True Line Result - end -** Processing line: ~ unless old_target == state.target~ + unless bfs.came_from.has_key?(neighbor) || grid.walls.has_key?(neighbor) +** Processing line: ~ # Add them to the frontier and mark them as visited~ - Inside source: true *** True Line Result - unless old_target == state.target -** Processing line: ~ reset_search~ + # Add them to the frontier and mark them as visited +** Processing line: ~ bfs.frontier << neighbor~ - Inside source: true *** True Line Result - reset_search -** Processing line: ~ end~ + bfs.frontier << neighbor +** Processing line: ~ bfs.came_from[neighbor] = new_frontier~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + bfs.came_from[neighbor] = new_frontier +** Processing line: ~ end~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - -** Processing line: ~ # Moves the target to the cell closest to the mouse in the second grid~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - # Moves the target to the cell closest to the mouse in the second grid -** Processing line: ~ # Only reset_searchs the search if the target changes position~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - # Only reset_searchs the search if the target changes position -** Processing line: ~ # Called whenever the user is editing the target (puts mouse down on target)~ + +** Processing line: ~ # Sort the frontier so that cells that are in a zigzag pattern are prioritized over those in an line~ - Inside source: true *** True Line Result - # Called whenever the user is editing the target (puts mouse down on target) -** Processing line: ~ def input_target2~ + # Sort the frontier so that cells that are in a zigzag pattern are prioritized over those in an line +** Processing line: ~ # Comment this line and let a path generate to see the difference~ - Inside source: true *** True Line Result - def input_target2 -** Processing line: ~ old_target = state.target.clone~ + # Comment this line and let a path generate to see the difference +** Processing line: ~ bfs.frontier = bfs.frontier.sort_by {| cell | proximity_to_star(cell) }~ - Inside source: true *** True Line Result - old_target = state.target.clone -** Processing line: ~ unless cell_closest_to_mouse2 == state.star~ + bfs.frontier = bfs.frontier.sort_by {| cell | proximity_to_star(cell) } +** Processing line: ~~ - Inside source: true *** True Line Result - unless cell_closest_to_mouse2 == state.star -** Processing line: ~ state.target = cell_closest_to_mouse2~ + +** Processing line: ~ # If the search found the target~ - Inside source: true *** True Line Result - state.target = cell_closest_to_mouse2 -** Processing line: ~ end~ + # If the search found the target +** Processing line: ~ if bfs.came_from.has_key?(grid.target)~ - Inside source: true *** True Line Result - end -** Processing line: ~ unless old_target == state.target~ + if bfs.came_from.has_key?(grid.target) +** Processing line: ~ # Calculate the path between the target and star~ - Inside source: true *** True Line Result - unless old_target == state.target -** Processing line: ~ reset_search~ + # Calculate the path between the target and star +** Processing line: ~ bfs_calc_path~ - Inside source: true *** True Line Result - reset_search + bfs_calc_path ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -72264,50 +79683,66 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Removes walls in the first grid that are under the cursor~ +** Processing line: ~ # Calculates the path between the target and star for the breadth first search~ - Inside source: true *** True Line Result - # Removes walls in the first grid that are under the cursor -** Processing line: ~ def input_remove_wall~ + # Calculates the path between the target and star for the breadth first search +** Processing line: ~ # Only called when the breadth first search finds the target~ - Inside source: true *** True Line Result - def input_remove_wall -** Processing line: ~ # The mouse needs to be inside the grid, because we only want to remove walls~ + # Only called when the breadth first search finds the target +** Processing line: ~ def bfs_calc_path~ - Inside source: true *** True Line Result - # The mouse needs to be inside the grid, because we only want to remove walls -** Processing line: ~ # the cursor is directly over~ + def bfs_calc_path +** Processing line: ~ # Start from the target~ - Inside source: true *** True Line Result - # the cursor is directly over -** Processing line: ~ # Recalculations should only occur when a wall is actually deleted~ + # Start from the target +** Processing line: ~ endpoint = grid.target~ - Inside source: true *** True Line Result - # Recalculations should only occur when a wall is actually deleted -** Processing line: ~ if mouse_over_grid?~ + endpoint = grid.target +** Processing line: ~ # And the cell it came from~ - Inside source: true *** True Line Result - if mouse_over_grid? -** Processing line: ~ if state.walls.has_key?(cell_closest_to_mouse) or state.hills.has_key?(cell_closest_to_mouse)~ + # And the cell it came from +** Processing line: ~ next_endpoint = bfs.came_from[endpoint]~ - Inside source: true *** True Line Result - if state.walls.has_key?(cell_closest_to_mouse) or state.hills.has_key?(cell_closest_to_mouse) -** Processing line: ~ state.walls.delete(cell_closest_to_mouse)~ + next_endpoint = bfs.came_from[endpoint] +** Processing line: ~ while endpoint and next_endpoint~ - Inside source: true *** True Line Result - state.walls.delete(cell_closest_to_mouse) -** Processing line: ~ state.hills.delete(cell_closest_to_mouse)~ + while endpoint and next_endpoint +** Processing line: ~ # Draw a path between these two cells and store it~ - Inside source: true *** True Line Result - state.hills.delete(cell_closest_to_mouse) -** Processing line: ~ reset_search~ + # Draw a path between these two cells and store it +** Processing line: ~ path = get_path_between(endpoint, next_endpoint)~ - Inside source: true *** True Line Result - reset_search -** Processing line: ~ end~ + path = get_path_between(endpoint, next_endpoint) +** Processing line: ~ bfs.path << path~ - Inside source: true *** True Line Result - end + bfs.path << path +** Processing line: ~ # And get the next pair of cells~ +- Inside source: true +*** True Line Result + # And get the next pair of cells +** Processing line: ~ endpoint = next_endpoint~ +- Inside source: true +*** True Line Result + endpoint = next_endpoint +** Processing line: ~ next_endpoint = bfs.came_from[endpoint]~ +- Inside source: true +*** True Line Result + next_endpoint = bfs.came_from[endpoint] +** Processing line: ~ # Continue till there are no more cells~ +- Inside source: true +*** True Line Result + # Continue till there are no more cells ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -72320,130 +79755,118 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Removes walls in the second grid that are under the cursor~ +** Processing line: ~ # Moves the heuristic search forward one step~ - Inside source: true *** True Line Result - # Removes walls in the second grid that are under the cursor -** Processing line: ~ def input_remove_wall2~ + # Moves the heuristic search forward one step +** Processing line: ~ # Can be called from tick while the animation is playing~ - Inside source: true *** True Line Result - def input_remove_wall2 -** Processing line: ~ # The mouse needs to be inside the grid, because we only want to remove walls~ + # Can be called from tick while the animation is playing +** Processing line: ~ # Can also be called when recalculating the searches after the user edited the grid~ - Inside source: true *** True Line Result - # The mouse needs to be inside the grid, because we only want to remove walls -** Processing line: ~ # the cursor is directly over~ + # Can also be called when recalculating the searches after the user edited the grid +** Processing line: ~ def heuristic_one_step_forward~ - Inside source: true *** True Line Result - # the cursor is directly over -** Processing line: ~ # Recalculations should only occur when a wall is actually deleted~ + def heuristic_one_step_forward +** Processing line: ~ # Stop the search if the target has been found~ - Inside source: true *** True Line Result - # Recalculations should only occur when a wall is actually deleted -** Processing line: ~ if mouse_over_grid2?~ + # Stop the search if the target has been found +** Processing line: ~ return if heuristic.came_from.has_key?(grid.target)~ - Inside source: true *** True Line Result - if mouse_over_grid2? -** Processing line: ~ if state.walls.has_key?(cell_closest_to_mouse2) or state.hills.has_key?(cell_closest_to_mouse2)~ + return if heuristic.came_from.has_key?(grid.target) +** Processing line: ~~ - Inside source: true *** True Line Result - if state.walls.has_key?(cell_closest_to_mouse2) or state.hills.has_key?(cell_closest_to_mouse2) -** Processing line: ~ state.walls.delete(cell_closest_to_mouse2)~ + +** Processing line: ~ # If the search has not begun~ - Inside source: true *** True Line Result - state.walls.delete(cell_closest_to_mouse2) -** Processing line: ~ state.hills.delete(cell_closest_to_mouse2)~ + # If the search has not begun +** Processing line: ~ if heuristic.came_from.empty?~ - Inside source: true *** True Line Result - state.hills.delete(cell_closest_to_mouse2) -** Processing line: ~ reset_search~ + if heuristic.came_from.empty? +** Processing line: ~ # Setup the search to begin from the star~ - Inside source: true *** True Line Result - reset_search -** Processing line: ~ end~ + # Setup the search to begin from the star +** Processing line: ~ heuristic.frontier << grid.star~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + heuristic.frontier << grid.star +** Processing line: ~ heuristic.came_from[grid.star] = nil~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + heuristic.came_from[grid.star] = nil +** Processing line: ~ end~ - Inside source: true *** True Line Result - end + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Adds a hill in the first grid in the cell the mouse is over~ -- Inside source: true -*** True Line Result - # Adds a hill in the first grid in the cell the mouse is over -** Processing line: ~ def input_add_hill~ -- Inside source: true -*** True Line Result - def input_add_hill -** Processing line: ~ if mouse_over_grid?~ -- Inside source: true -*** True Line Result - if mouse_over_grid? -** Processing line: ~ unless state.hills.has_key?(cell_closest_to_mouse)~ +** Processing line: ~ # One step in the heuristic search~ - Inside source: true *** True Line Result - unless state.hills.has_key?(cell_closest_to_mouse) -** Processing line: ~ state.hills[cell_closest_to_mouse] = true~ + # One step in the heuristic search +** Processing line: ~~ - Inside source: true *** True Line Result - state.hills[cell_closest_to_mouse] = true -** Processing line: ~ reset_search~ + +** Processing line: ~ # Unless there are no more cells to explore from~ - Inside source: true *** True Line Result - reset_search -** Processing line: ~ end~ + # Unless there are no more cells to explore from +** Processing line: ~ unless heuristic.frontier.empty?~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + unless heuristic.frontier.empty? +** Processing line: ~ # Get the next cell to explore from~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + # Get the next cell to explore from +** Processing line: ~ new_frontier = heuristic.frontier.shift~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + new_frontier = heuristic.frontier.shift +** Processing line: ~ # For each of its neighbors~ - Inside source: true *** True Line Result - -** Processing line: ~~ + # For each of its neighbors +** Processing line: ~ adjacent_neighbors(new_frontier).each do |neighbor|~ - Inside source: true *** True Line Result - -** Processing line: ~ # Adds a hill in the second grid in the cell the mouse is over~ + adjacent_neighbors(new_frontier).each do |neighbor| +** Processing line: ~ # That have not been visited and are not walls~ - Inside source: true *** True Line Result - # Adds a hill in the second grid in the cell the mouse is over -** Processing line: ~ def input_add_hill2~ + # That have not been visited and are not walls +** Processing line: ~ unless heuristic.came_from.has_key?(neighbor) || grid.walls.has_key?(neighbor)~ - Inside source: true *** True Line Result - def input_add_hill2 -** Processing line: ~ if mouse_over_grid2?~ + unless heuristic.came_from.has_key?(neighbor) || grid.walls.has_key?(neighbor) +** Processing line: ~ # Add them to the frontier and mark them as visited~ - Inside source: true *** True Line Result - if mouse_over_grid2? -** Processing line: ~ unless state.hills.has_key?(cell_closest_to_mouse2)~ + # Add them to the frontier and mark them as visited +** Processing line: ~ heuristic.frontier << neighbor~ - Inside source: true *** True Line Result - unless state.hills.has_key?(cell_closest_to_mouse2) -** Processing line: ~ state.hills[cell_closest_to_mouse2] = true~ + heuristic.frontier << neighbor +** Processing line: ~ heuristic.came_from[neighbor] = new_frontier~ - Inside source: true *** True Line Result - state.hills[cell_closest_to_mouse2] = true -** Processing line: ~ reset_search~ + heuristic.came_from[neighbor] = new_frontier +** Processing line: ~ end~ - Inside source: true *** True Line Result - reset_search + end ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -72452,46 +79875,46 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result end -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Adds a wall in the first grid in the cell the mouse is over~ +** Processing line: ~ # Sort the frontier so that cells that are in a zigzag pattern are prioritized over those in an line~ - Inside source: true *** True Line Result - # Adds a wall in the first grid in the cell the mouse is over -** Processing line: ~ def input_add_wall~ + # Sort the frontier so that cells that are in a zigzag pattern are prioritized over those in an line +** Processing line: ~ heuristic.frontier = heuristic.frontier.sort_by {| cell | proximity_to_star(cell) }~ - Inside source: true *** True Line Result - def input_add_wall -** Processing line: ~ if mouse_over_grid?~ + heuristic.frontier = heuristic.frontier.sort_by {| cell | proximity_to_star(cell) } +** Processing line: ~ # Sort the frontier so cells that are close to the target are then prioritized~ - Inside source: true *** True Line Result - if mouse_over_grid? -** Processing line: ~ unless state.walls.has_key?(cell_closest_to_mouse)~ + # Sort the frontier so cells that are close to the target are then prioritized +** Processing line: ~ heuristic.frontier = heuristic.frontier.sort_by {| cell | heuristic_heuristic(cell) }~ - Inside source: true *** True Line Result - unless state.walls.has_key?(cell_closest_to_mouse) -** Processing line: ~ state.hills.delete(cell_closest_to_mouse)~ + heuristic.frontier = heuristic.frontier.sort_by {| cell | heuristic_heuristic(cell) } +** Processing line: ~~ - Inside source: true *** True Line Result - state.hills.delete(cell_closest_to_mouse) -** Processing line: ~ state.walls[cell_closest_to_mouse] = true~ + +** Processing line: ~ # If the search found the target~ - Inside source: true *** True Line Result - state.walls[cell_closest_to_mouse] = true -** Processing line: ~ reset_search~ + # If the search found the target +** Processing line: ~ if heuristic.came_from.has_key?(grid.target)~ - Inside source: true *** True Line Result - reset_search -** Processing line: ~ end~ + if heuristic.came_from.has_key?(grid.target) +** Processing line: ~ # Calculate the path between the target and star~ - Inside source: true *** True Line Result - end + # Calculate the path between the target and star +** Processing line: ~ heuristic_calc_path~ +- Inside source: true +*** True Line Result + heuristic_calc_path ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -72504,94 +79927,94 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Adds a wall in the second grid in the cell the mouse is over~ +** Processing line: ~ # Returns one-dimensional absolute distance between cell and target~ - Inside source: true *** True Line Result - # Adds a wall in the second grid in the cell the mouse is over -** Processing line: ~ def input_add_wall2~ + # Returns one-dimensional absolute distance between cell and target +** Processing line: ~ # Returns a number to compare distances between cells and the target~ - Inside source: true *** True Line Result - def input_add_wall2 -** Processing line: ~ if mouse_over_grid2?~ + # Returns a number to compare distances between cells and the target +** Processing line: ~ def heuristic_heuristic(cell)~ - Inside source: true *** True Line Result - if mouse_over_grid2? -** Processing line: ~ unless state.walls.has_key?(cell_closest_to_mouse2)~ + def heuristic_heuristic(cell) +** Processing line: ~ (grid.target.x - cell.x).abs + (grid.target.y - cell.y).abs~ - Inside source: true *** True Line Result - unless state.walls.has_key?(cell_closest_to_mouse2) -** Processing line: ~ state.hills.delete(cell_closest_to_mouse2)~ + (grid.target.x - cell.x).abs + (grid.target.y - cell.y).abs +** Processing line: ~ end~ - Inside source: true *** True Line Result - state.hills.delete(cell_closest_to_mouse2) -** Processing line: ~ state.walls[cell_closest_to_mouse2] = true~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - state.walls[cell_closest_to_mouse2] = true -** Processing line: ~ reset_search~ + +** Processing line: ~ # Calculates the path between the target and star for the heuristic search~ - Inside source: true *** True Line Result - reset_search -** Processing line: ~ end~ + # Calculates the path between the target and star for the heuristic search +** Processing line: ~ # Only called when the heuristic search finds the target~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + # Only called when the heuristic search finds the target +** Processing line: ~ def heuristic_calc_path~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + def heuristic_calc_path +** Processing line: ~ # Start from the target~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + # Start from the target +** Processing line: ~ endpoint = grid.target~ - Inside source: true *** True Line Result - -** Processing line: ~ # Whenever the user edits the grid,~ + endpoint = grid.target +** Processing line: ~ # And the cell it came from~ - Inside source: true *** True Line Result - # Whenever the user edits the grid, -** Processing line: ~ # The search has to be reset_searchd upto the current step~ + # And the cell it came from +** Processing line: ~ next_endpoint = heuristic.came_from[endpoint]~ - Inside source: true *** True Line Result - # The search has to be reset_searchd upto the current step -** Processing line: ~ # with the current grid as the initial state of the grid~ + next_endpoint = heuristic.came_from[endpoint] +** Processing line: ~ while endpoint and next_endpoint~ - Inside source: true *** True Line Result - # with the current grid as the initial state of the grid -** Processing line: ~ def reset_search~ + while endpoint and next_endpoint +** Processing line: ~ # Draw a path between these two cells and store it~ - Inside source: true *** True Line Result - def reset_search -** Processing line: ~ breadth_first_search.visited = {}~ + # Draw a path between these two cells and store it +** Processing line: ~ path = get_path_between(endpoint, next_endpoint)~ - Inside source: true *** True Line Result - breadth_first_search.visited = {} -** Processing line: ~ breadth_first_search.frontier = []~ + path = get_path_between(endpoint, next_endpoint) +** Processing line: ~ heuristic.path << path~ - Inside source: true *** True Line Result - breadth_first_search.frontier = [] -** Processing line: ~ breadth_first_search.came_from = {}~ + heuristic.path << path +** Processing line: ~ # And get the next pair of cells~ - Inside source: true *** True Line Result - breadth_first_search.came_from = {} -** Processing line: ~~ + # And get the next pair of cells +** Processing line: ~ endpoint = next_endpoint~ - Inside source: true *** True Line Result - -** Processing line: ~ dijkstra_search.frontier = []~ + endpoint = next_endpoint +** Processing line: ~ next_endpoint = heuristic.came_from[endpoint]~ - Inside source: true *** True Line Result - dijkstra_search.frontier = [] -** Processing line: ~ dijkstra_search.came_from = {}~ + next_endpoint = heuristic.came_from[endpoint] +** Processing line: ~ # Continue till there are no more cells~ - Inside source: true *** True Line Result - dijkstra_search.came_from = {} -** Processing line: ~ dijkstra_search.cost_so_far = {}~ + # Continue till there are no more cells +** Processing line: ~ end~ - Inside source: true *** True Line Result - dijkstra_search.cost_so_far = {} + end ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -72600,14 +80023,6 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~~ -- Inside source: true -*** True Line Result - ** Processing line: ~ # Returns a list of adjacent cells~ - Inside source: true *** True Line Result @@ -72656,26 +80071,6 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Sorts the neighbors so the rendered path is a zigzag path~ -- Inside source: true -*** True Line Result - # Sorts the neighbors so the rendered path is a zigzag path -** Processing line: ~ # Cells in a diagonal direction are given priority~ -- Inside source: true -*** True Line Result - # Cells in a diagonal direction are given priority -** Processing line: ~ # Comment this line to see the difference~ -- Inside source: true -*** True Line Result - # Comment this line to see the difference -** Processing line: ~ neighbors = neighbors.sort_by { |neighbor_x, neighbor_y| proximity_to_star(neighbor_x, neighbor_y) }~ -- Inside source: true -*** True Line Result - neighbors = neighbors.sort_by { |neighbor_x, neighbor_y| proximity_to_star(neighbor_x, neighbor_y) } -** Processing line: ~~ -- Inside source: true -*** True Line Result - ** Processing line: ~ neighbors~ - Inside source: true *** True Line Result @@ -72712,18 +80107,18 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result # So, if possible, the search tries to go diagonal (zigzag) first -** Processing line: ~ def proximity_to_star(x, y)~ +** Processing line: ~ def proximity_to_star(cell)~ - Inside source: true *** True Line Result - def proximity_to_star(x, y) -** Processing line: ~ distance_x = (state.star.x - x).abs~ + def proximity_to_star(cell) +** Processing line: ~ distance_x = (grid.star.x - cell.x).abs~ - Inside source: true *** True Line Result - distance_x = (state.star.x - x).abs -** Processing line: ~ distance_y = (state.star.y - y).abs~ + distance_x = (grid.star.x - cell.x).abs +** Processing line: ~ distance_y = (grid.star.y - cell.y).abs~ - Inside source: true *** True Line Result - distance_y = (state.star.y - y).abs + distance_y = (grid.star.y - cell.y).abs ** Processing line: ~~ - Inside source: true *** True Line Result @@ -72756,278 +80151,18 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # When the user grabs the star and puts their cursor to the far right~ -- Inside source: true -*** True Line Result - # When the user grabs the star and puts their cursor to the far right -** Processing line: ~ # and moves up and down, the star is supposed to move along the grid as well~ -- Inside source: true -*** True Line Result - # and moves up and down, the star is supposed to move along the grid as well -** Processing line: ~ # Finding the cell closest to the mouse helps with this~ -- Inside source: true -*** True Line Result - # Finding the cell closest to the mouse helps with this -** Processing line: ~ def cell_closest_to_mouse~ -- Inside source: true -*** True Line Result - def cell_closest_to_mouse -** Processing line: ~ # Closest cell to the mouse in the first grid~ -- Inside source: true -*** True Line Result - # Closest cell to the mouse in the first grid -** Processing line: ~ x = (inputs.mouse.point.x / grid.cell_size).to_i~ -- Inside source: true -*** True Line Result - x = (inputs.mouse.point.x / grid.cell_size).to_i -** Processing line: ~ y = (inputs.mouse.point.y / grid.cell_size).to_i~ -- Inside source: true -*** True Line Result - y = (inputs.mouse.point.y / grid.cell_size).to_i -** Processing line: ~ # Bound x and y to the grid~ -- Inside source: true -*** True Line Result - # Bound x and y to the grid -** Processing line: ~ x = grid.width - 1 if x > grid.width - 1~ -- Inside source: true -*** True Line Result - x = grid.width - 1 if x > grid.width - 1 -** Processing line: ~ y = grid.height - 1 if y > grid.height - 1~ -- Inside source: true -*** True Line Result - y = grid.height - 1 if y > grid.height - 1 -** Processing line: ~ # Return closest cell~ -- Inside source: true -*** True Line Result - # Return closest cell -** Processing line: ~ [x, y]~ -- Inside source: true -*** True Line Result - [x, y] -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ # When the user grabs the star and puts their cursor to the far right~ -- Inside source: true -*** True Line Result - # When the user grabs the star and puts their cursor to the far right -** Processing line: ~ # and moves up and down, the star is supposed to move along the grid as well~ -- Inside source: true -*** True Line Result - # and moves up and down, the star is supposed to move along the grid as well -** Processing line: ~ # Finding the cell closest to the mouse in the second grid helps with this~ -- Inside source: true -*** True Line Result - # Finding the cell closest to the mouse in the second grid helps with this -** Processing line: ~ def cell_closest_to_mouse2~ -- Inside source: true -*** True Line Result - def cell_closest_to_mouse2 -** Processing line: ~ # Closest cell grid to the mouse in the second~ -- Inside source: true -*** True Line Result - # Closest cell grid to the mouse in the second -** Processing line: ~ x = (inputs.mouse.point.x / grid.cell_size).to_i~ -- Inside source: true -*** True Line Result - x = (inputs.mouse.point.x / grid.cell_size).to_i -** Processing line: ~ y = (inputs.mouse.point.y / grid.cell_size).to_i~ -- Inside source: true -*** True Line Result - y = (inputs.mouse.point.y / grid.cell_size).to_i -** Processing line: ~ # Translate the cell to the first grid~ -- Inside source: true -*** True Line Result - # Translate the cell to the first grid -** Processing line: ~ x -= grid.width + 1~ -- Inside source: true -*** True Line Result - x -= grid.width + 1 -** Processing line: ~ # Bound x and y to the first grid~ -- Inside source: true -*** True Line Result - # Bound x and y to the first grid -** Processing line: ~ x = 0 if x < 0~ -- Inside source: true -*** True Line Result - x = 0 if x < 0 -** Processing line: ~ y = 0 if y < 0~ -- Inside source: true -*** True Line Result - y = 0 if y < 0 -** Processing line: ~ x = grid.width - 1 if x > grid.width - 1~ -- Inside source: true -*** True Line Result - x = grid.width - 1 if x > grid.width - 1 -** Processing line: ~ y = grid.height - 1 if y > grid.height - 1~ -- Inside source: true -*** True Line Result - y = grid.height - 1 if y > grid.height - 1 -** Processing line: ~ # Return closest cell~ -- Inside source: true -*** True Line Result - # Return closest cell -** Processing line: ~ [x, y]~ -- Inside source: true -*** True Line Result - [x, y] -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ # Signal that the user is going to be moving the star from the first grid~ -- Inside source: true -*** True Line Result - # Signal that the user is going to be moving the star from the first grid -** Processing line: ~ def mouse_over_star?~ -- Inside source: true -*** True Line Result - def mouse_over_star? -** Processing line: ~ inputs.mouse.point.inside_rect?(scale_up(state.star))~ -- Inside source: true -*** True Line Result - inputs.mouse.point.inside_rect?(scale_up(state.star)) -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ # Signal that the user is going to be moving the star from the second grid~ -- Inside source: true -*** True Line Result - # Signal that the user is going to be moving the star from the second grid -** Processing line: ~ def mouse_over_star2?~ -- Inside source: true -*** True Line Result - def mouse_over_star2? -** Processing line: ~ inputs.mouse.point.inside_rect?(move_and_scale_up(state.star))~ -- Inside source: true -*** True Line Result - inputs.mouse.point.inside_rect?(move_and_scale_up(state.star)) -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ # Signal that the user is going to be moving the target from the first grid~ -- Inside source: true -*** True Line Result - # Signal that the user is going to be moving the target from the first grid -** Processing line: ~ def mouse_over_target?~ -- Inside source: true -*** True Line Result - def mouse_over_target? -** Processing line: ~ inputs.mouse.point.inside_rect?(scale_up(state.target))~ -- Inside source: true -*** True Line Result - inputs.mouse.point.inside_rect?(scale_up(state.target)) -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ # Signal that the user is going to be moving the target from the second grid~ -- Inside source: true -*** True Line Result - # Signal that the user is going to be moving the target from the second grid -** Processing line: ~ def mouse_over_target2?~ -- Inside source: true -*** True Line Result - def mouse_over_target2? -** Processing line: ~ inputs.mouse.point.inside_rect?(move_and_scale_up(state.target))~ -- Inside source: true -*** True Line Result - inputs.mouse.point.inside_rect?(move_and_scale_up(state.target)) -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ # Signal that the user is going to be removing walls from the first grid~ -- Inside source: true -*** True Line Result - # Signal that the user is going to be removing walls from the first grid -** Processing line: ~ def mouse_over_wall?~ -- Inside source: true -*** True Line Result - def mouse_over_wall? -** Processing line: ~ state.walls.each_key do | wall |~ -- Inside source: true -*** True Line Result - state.walls.each_key do | wall | -** Processing line: ~ return true if inputs.mouse.point.inside_rect?(scale_up(wall))~ -- Inside source: true -*** True Line Result - return true if inputs.mouse.point.inside_rect?(scale_up(wall)) -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ false~ -- Inside source: true -*** True Line Result - false -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ # Signal that the user is going to be removing walls from the second grid~ -- Inside source: true -*** True Line Result - # Signal that the user is going to be removing walls from the second grid -** Processing line: ~ def mouse_over_wall2?~ -- Inside source: true -*** True Line Result - def mouse_over_wall2? -** Processing line: ~ state.walls.each_key do | wall |~ -- Inside source: true -*** True Line Result - state.walls.each_key do | wall | -** Processing line: ~ return true if inputs.mouse.point.inside_rect?(move_and_scale_up(wall))~ -- Inside source: true -*** True Line Result - return true if inputs.mouse.point.inside_rect?(move_and_scale_up(wall)) -** Processing line: ~ end~ +** Processing line: ~ # Methods that allow code to be more concise. Subdivides args.state, which is where all variables are stored.~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + # Methods that allow code to be more concise. Subdivides args.state, which is where all variables are stored. +** Processing line: ~ def grid~ - Inside source: true *** True Line Result - -** Processing line: ~ false~ + def grid +** Processing line: ~ state.grid~ - Inside source: true *** True Line Result - false + state.grid ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -73036,34 +80171,14 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Signal that the user is going to be removing hills from the first grid~ -- Inside source: true -*** True Line Result - # Signal that the user is going to be removing hills from the first grid -** Processing line: ~ def mouse_over_hill?~ -- Inside source: true -*** True Line Result - def mouse_over_hill? -** Processing line: ~ state.hills.each_key do | hill |~ -- Inside source: true -*** True Line Result - state.hills.each_key do | hill | -** Processing line: ~ return true if inputs.mouse.point.inside_rect?(scale_up(hill))~ -- Inside source: true -*** True Line Result - return true if inputs.mouse.point.inside_rect?(scale_up(hill)) -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end -** Processing line: ~~ +** Processing line: ~ def buttons~ - Inside source: true *** True Line Result - -** Processing line: ~ false~ + def buttons +** Processing line: ~ state.buttons~ - Inside source: true *** True Line Result - false + state.buttons ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -73072,34 +80187,14 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Signal that the user is going to be removing hills from the second grid~ -- Inside source: true -*** True Line Result - # Signal that the user is going to be removing hills from the second grid -** Processing line: ~ def mouse_over_hill2?~ -- Inside source: true -*** True Line Result - def mouse_over_hill2? -** Processing line: ~ state.hills.each_key do | hill |~ -- Inside source: true -*** True Line Result - state.hills.each_key do | hill | -** Processing line: ~ return true if inputs.mouse.point.inside_rect?(move_and_scale_up(hill))~ -- Inside source: true -*** True Line Result - return true if inputs.mouse.point.inside_rect?(move_and_scale_up(hill)) -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end -** Processing line: ~~ +** Processing line: ~ def slider~ - Inside source: true *** True Line Result - -** Processing line: ~ false~ + def slider +** Processing line: ~ state.slider~ - Inside source: true *** True Line Result - false + state.slider ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -73108,18 +80203,14 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Signal that the user is going to be adding walls from the first grid~ -- Inside source: true -*** True Line Result - # Signal that the user is going to be adding walls from the first grid -** Processing line: ~ def mouse_over_grid?~ +** Processing line: ~ def bfs~ - Inside source: true *** True Line Result - def mouse_over_grid? -** Processing line: ~ inputs.mouse.point.inside_rect?(scale_up(grid.rect))~ + def bfs +** Processing line: ~ state.bfs~ - Inside source: true *** True Line Result - inputs.mouse.point.inside_rect?(scale_up(grid.rect)) + state.bfs ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -73128,18 +80219,14 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Signal that the user is going to be adding walls from the second grid~ -- Inside source: true -*** True Line Result - # Signal that the user is going to be adding walls from the second grid -** Processing line: ~ def mouse_over_grid2?~ +** Processing line: ~ def heuristic~ - Inside source: true *** True Line Result - def mouse_over_grid2? -** Processing line: ~ inputs.mouse.point.inside_rect?(move_and_scale_up(grid.rect))~ + def heuristic +** Processing line: ~ state.heuristic~ - Inside source: true *** True Line Result - inputs.mouse.point.inside_rect?(move_and_scale_up(grid.rect)) + state.heuristic ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -73148,26 +80235,18 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # These methods provide handy aliases to colors~ -- Inside source: true -*** True Line Result - # These methods provide handy aliases to colors -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ # Light brown~ +** Processing line: ~ # Descriptive aliases for colors~ - Inside source: true *** True Line Result - # Light brown -** Processing line: ~ def unvisited_color~ + # Descriptive aliases for colors +** Processing line: ~ def default_color~ - Inside source: true *** True Line Result - def unvisited_color -** Processing line: ~ [221, 212, 213]~ + def default_color +** Processing line: ~ [221, 212, 213] # Light Brown~ - Inside source: true *** True Line Result - [221, 212, 213] + [221, 212, 213] # Light Brown ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -73176,54 +80255,14 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Camo Green~ -- Inside source: true -*** True Line Result - # Camo Green ** Processing line: ~ def wall_color~ - Inside source: true *** True Line Result def wall_color -** Processing line: ~ [134, 134, 120]~ -- Inside source: true -*** True Line Result - [134, 134, 120] -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ # Pastel White~ -- Inside source: true -*** True Line Result - # Pastel White -** Processing line: ~ def path_color~ -- Inside source: true -*** True Line Result - def path_color -** Processing line: ~ [231, 230, 228]~ -- Inside source: true -*** True Line Result - [231, 230, 228] -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ def red~ -- Inside source: true -*** True Line Result - def red -** Processing line: ~ [255, 0, 0]~ +** Processing line: ~ [134, 134, 120] # Camo Green~ - Inside source: true *** True Line Result - [255, 0, 0] + [134, 134, 120] # Camo Green ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -73232,18 +80271,14 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # A Green~ -- Inside source: true -*** True Line Result - # A Green -** Processing line: ~ def hill_color~ +** Processing line: ~ def visited_color~ - Inside source: true *** True Line Result - def hill_color -** Processing line: ~ [139, 173, 132]~ + def visited_color +** Processing line: ~ [204, 191, 179] # Dark Brown~ - Inside source: true *** True Line Result - [139, 173, 132] + [204, 191, 179] # Dark Brown ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -73252,18 +80287,14 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Makes code more concise~ -- Inside source: true -*** True Line Result - # Makes code more concise -** Processing line: ~ def grid~ +** Processing line: ~ def frontier_color~ - Inside source: true *** True Line Result - def grid -** Processing line: ~ state.grid~ + def frontier_color +** Processing line: ~ [103, 136, 204] # Blue~ - Inside source: true *** True Line Result - state.grid + [103, 136, 204] # Blue ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -73272,14 +80303,14 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def breadth_first_search~ +** Processing line: ~ def path_color~ - Inside source: true *** True Line Result - def breadth_first_search -** Processing line: ~ state.breadth_first_search~ + def path_color +** Processing line: ~ [231, 230, 228] # Pastel White~ - Inside source: true *** True Line Result - state.breadth_first_search + [231, 230, 228] # Pastel White ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -73288,14 +80319,14 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def dijkstra_search~ +** Processing line: ~ def button_color~ - Inside source: true *** True Line Result - def dijkstra_search -** Processing line: ~ state.dijkstra_search~ + def button_color +** Processing line: ~ [190, 190, 190] # Gray~ - Inside source: true *** True Line Result - state.dijkstra_search + [190, 190, 190] # Gray ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -73304,10 +80335,6 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result end -** Processing line: ~~ -- Inside source: true -*** True Line Result - ** Processing line: ~ # Method that is called by DragonRuby periodically~ - Inside source: true *** True Line Result @@ -73352,22 +80379,22 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Every tick, new args are passed, and the Dijkstra tick method is called~ +** Processing line: ~ # Every tick, new args are passed, and the Breadth First Search tick is called~ - Inside source: true *** True Line Result - # Every tick, new args are passed, and the Dijkstra tick method is called -** Processing line: ~ $movement_costs ||= Movement_Costs.new(args)~ + # Every tick, new args are passed, and the Breadth First Search tick is called +** Processing line: ~ $heuristic_with_walls ||= Heuristic_With_Walls.new(args)~ - Inside source: true *** True Line Result - $movement_costs ||= Movement_Costs.new(args) -** Processing line: ~ $movement_costs.args = args~ + $heuristic_with_walls ||= Heuristic_With_Walls.new(args) +** Processing line: ~ $heuristic_with_walls.args = args~ - Inside source: true *** True Line Result - $movement_costs.args = args -** Processing line: ~ $movement_costs.tick~ + $heuristic_with_walls.args = args +** Processing line: ~ $heuristic_with_walls.tick~ - Inside source: true *** True Line Result - $movement_costs.tick + $heuristic_with_walls.tick ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -73384,10 +80411,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result def reset -** Processing line: ~ $movement_costs = nil~ +** Processing line: ~ $heuristic_with_walls = nil~ - Inside source: true *** True Line Result - $movement_costs = nil + $heuristic_with_walls = nil ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -73404,54 +80431,54 @@ Follows is a source code listing for all files that have been open sourced. This - End of paragraph detected. *** True Line Result -** Processing line: ~*** Path Finding Algorithms - Heuristic - main.rb~ +** Processing line: ~*** Path Finding Algorithms - Heuristic With Walls - main.rb~ - Header detected. *** True Line Result *** True Line Result -*** Path Finding Algorithms - Heuristic - main.rb +*** Path Finding Algorithms - Heuristic With Walls - main.rb ** Processing line: ~#+begin_src ruby~ - Line was identified as the beginning of a code block. *** True Line Result *** True Line Result #+begin_src ruby -** Processing line: ~ # ./samples/13_path_finding_algorithms/06_heuristic/app/main.rb~ +** Processing line: ~ # ./samples/13_path_finding_algorithms/07_heuristic_with_walls/app/main.rb~ - Inside source: true *** True Line Result - # ./samples/13_path_finding_algorithms/06_heuristic/app/main.rb + # ./samples/13_path_finding_algorithms/07_heuristic_with_walls/app/main.rb ** Processing line: ~ # This program is inspired by https://www.redblobgames.com/pathfinding/a-star/introduction.html~ - Inside source: true *** True Line Result # This program is inspired by https://www.redblobgames.com/pathfinding/a-star/introduction.html -** Processing line: ~~ +** Processing line: ~ # The effectiveness of the Heuristic search algorithm is shown through this demonstration.~ - Inside source: true *** True Line Result - -** Processing line: ~ # This time the heuristic search still explored less of the grid, hence finishing faster.~ + # The effectiveness of the Heuristic search algorithm is shown through this demonstration. +** Processing line: ~ # Notice that both searches find the shortest path~ - Inside source: true *** True Line Result - # This time the heuristic search still explored less of the grid, hence finishing faster. -** Processing line: ~ # However, it did not find the shortest path between the star and the target.~ + # Notice that both searches find the shortest path +** Processing line: ~ # The heuristic search, however, explores less of the grid, and is therefore faster.~ - Inside source: true *** True Line Result - # However, it did not find the shortest path between the star and the target. -** Processing line: ~~ + # The heuristic search, however, explores less of the grid, and is therefore faster. +** Processing line: ~ # The heuristic search prioritizes searching cells that are closer to the target.~ - Inside source: true *** True Line Result - -** Processing line: ~ # The only difference between this app and Heuristic is the change of the starting position.~ + # The heuristic search prioritizes searching cells that are closer to the target. +** Processing line: ~ # Make sure to look at the Heuristic with walls program to see some of the downsides of the heuristic algorithm.~ - Inside source: true *** True Line Result - # The only difference between this app and Heuristic is the change of the starting position. + # Make sure to look at the Heuristic with walls program to see some of the downsides of the heuristic algorithm. ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ class Heuristic_With_Walls~ +** Processing line: ~ class Heuristic~ - Inside source: true *** True Line Result - class Heuristic_With_Walls + class Heuristic ** Processing line: ~ attr_gtk~ - Inside source: true *** True Line Result @@ -73552,10 +80579,142 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result grid.target ||= [14, 12] -** Processing line: ~ grid.walls ||= {}~ +** Processing line: ~ grid.walls ||= {~ - Inside source: true *** True Line Result - grid.walls ||= {} + grid.walls ||= { +** Processing line: ~ [2, 2] => true,~ +- Inside source: true +*** True Line Result + [2, 2] => true, +** Processing line: ~ [3, 2] => true,~ +- Inside source: true +*** True Line Result + [3, 2] => true, +** Processing line: ~ [4, 2] => true,~ +- Inside source: true +*** True Line Result + [4, 2] => true, +** Processing line: ~ [5, 2] => true,~ +- Inside source: true +*** True Line Result + [5, 2] => true, +** Processing line: ~ [6, 2] => true,~ +- Inside source: true +*** True Line Result + [6, 2] => true, +** Processing line: ~ [7, 2] => true,~ +- Inside source: true +*** True Line Result + [7, 2] => true, +** Processing line: ~ [8, 2] => true,~ +- Inside source: true +*** True Line Result + [8, 2] => true, +** Processing line: ~ [9, 2] => true,~ +- Inside source: true +*** True Line Result + [9, 2] => true, +** Processing line: ~ [10, 2] => true,~ +- Inside source: true +*** True Line Result + [10, 2] => true, +** Processing line: ~ [11, 2] => true,~ +- Inside source: true +*** True Line Result + [11, 2] => true, +** Processing line: ~ [12, 2] => true,~ +- Inside source: true +*** True Line Result + [12, 2] => true, +** Processing line: ~ [12, 3] => true,~ +- Inside source: true +*** True Line Result + [12, 3] => true, +** Processing line: ~ [12, 4] => true,~ +- Inside source: true +*** True Line Result + [12, 4] => true, +** Processing line: ~ [12, 5] => true,~ +- Inside source: true +*** True Line Result + [12, 5] => true, +** Processing line: ~ [12, 6] => true,~ +- Inside source: true +*** True Line Result + [12, 6] => true, +** Processing line: ~ [12, 7] => true,~ +- Inside source: true +*** True Line Result + [12, 7] => true, +** Processing line: ~ [12, 8] => true,~ +- Inside source: true +*** True Line Result + [12, 8] => true, +** Processing line: ~ [12, 9] => true,~ +- Inside source: true +*** True Line Result + [12, 9] => true, +** Processing line: ~ [12, 10] => true,~ +- Inside source: true +*** True Line Result + [12, 10] => true, +** Processing line: ~ [12, 11] => true,~ +- Inside source: true +*** True Line Result + [12, 11] => true, +** Processing line: ~ [12, 12] => true,~ +- Inside source: true +*** True Line Result + [12, 12] => true, +** Processing line: ~ [2, 12] => true,~ +- Inside source: true +*** True Line Result + [2, 12] => true, +** Processing line: ~ [3, 12] => true,~ +- Inside source: true +*** True Line Result + [3, 12] => true, +** Processing line: ~ [4, 12] => true,~ +- Inside source: true +*** True Line Result + [4, 12] => true, +** Processing line: ~ [5, 12] => true,~ +- Inside source: true +*** True Line Result + [5, 12] => true, +** Processing line: ~ [6, 12] => true,~ +- Inside source: true +*** True Line Result + [6, 12] => true, +** Processing line: ~ [7, 12] => true,~ +- Inside source: true +*** True Line Result + [7, 12] => true, +** Processing line: ~ [8, 12] => true,~ +- Inside source: true +*** True Line Result + [8, 12] => true, +** Processing line: ~ [9, 12] => true,~ +- Inside source: true +*** True Line Result + [9, 12] => true, +** Processing line: ~ [10, 12] => true,~ +- Inside source: true +*** True Line Result + [10, 12] => true, +** Processing line: ~ [11, 12] => true,~ +- Inside source: true +*** True Line Result + [11, 12] => true, +** Processing line: ~ [12, 12] => true~ +- Inside source: true +*** True Line Result + [12, 12] => true +** Processing line: ~ }~ +- Inside source: true +*** True Line Result + } ** Processing line: ~ # There are no hills in the Heuristic Search Demo~ - Inside source: true *** True Line Result @@ -75132,10 +82291,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result def get_path_between(cell_one, cell_two) -** Processing line: ~ path = nil~ +** Processing line: ~ path = []~ - Inside source: true *** True Line Result - path = nil + path = [] ** Processing line: ~~ - Inside source: true *** True Line Result @@ -77304,18 +84463,18 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result # Every tick, new args are passed, and the Breadth First Search tick is called -** Processing line: ~ $heuristic_with_walls ||= Heuristic_With_Walls.new(args)~ +** Processing line: ~ $heuristic ||= Heuristic.new(args)~ - Inside source: true *** True Line Result - $heuristic_with_walls ||= Heuristic_With_Walls.new(args) -** Processing line: ~ $heuristic_with_walls.args = args~ + $heuristic ||= Heuristic.new(args) +** Processing line: ~ $heuristic.args = args~ - Inside source: true *** True Line Result - $heuristic_with_walls.args = args -** Processing line: ~ $heuristic_with_walls.tick~ + $heuristic.args = args +** Processing line: ~ $heuristic.tick~ - Inside source: true *** True Line Result - $heuristic_with_walls.tick + $heuristic.tick ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -77332,10 +84491,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result def reset -** Processing line: ~ $heuristic_with_walls = nil~ +** Processing line: ~ $heuristic = nil~ - Inside source: true *** True Line Result - $heuristic_with_walls = nil + $heuristic = nil ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -77352,54 +84511,58 @@ Follows is a source code listing for all files that have been open sourced. This - End of paragraph detected. *** True Line Result -** Processing line: ~*** Path Finding Algorithms - Heuristic With Walls - main.rb~ +** Processing line: ~*** Path Finding Algorithms - A Star - main.rb~ - Header detected. *** True Line Result *** True Line Result -*** Path Finding Algorithms - Heuristic With Walls - main.rb +*** Path Finding Algorithms - A Star - main.rb ** Processing line: ~#+begin_src ruby~ - Line was identified as the beginning of a code block. *** True Line Result *** True Line Result #+begin_src ruby -** Processing line: ~ # ./samples/13_path_finding_algorithms/07_heuristic_with_walls/app/main.rb~ +** Processing line: ~ # ./samples/13_path_finding_algorithms/08_a_star/app/main.rb~ - Inside source: true *** True Line Result - # ./samples/13_path_finding_algorithms/07_heuristic_with_walls/app/main.rb + # ./samples/13_path_finding_algorithms/08_a_star/app/main.rb ** Processing line: ~ # This program is inspired by https://www.redblobgames.com/pathfinding/a-star/introduction.html~ - Inside source: true *** True Line Result # This program is inspired by https://www.redblobgames.com/pathfinding/a-star/introduction.html -** Processing line: ~ # The effectiveness of the Heuristic search algorithm is shown through this demonstration.~ +** Processing line: ~~ - Inside source: true *** True Line Result - # The effectiveness of the Heuristic search algorithm is shown through this demonstration. -** Processing line: ~ # Notice that both searches find the shortest path~ + +** Processing line: ~ # The A* Search works by incorporating both the distance from the starting point~ - Inside source: true *** True Line Result - # Notice that both searches find the shortest path -** Processing line: ~ # The heuristic search, however, explores less of the grid, and is therefore faster.~ + # The A* Search works by incorporating both the distance from the starting point +** Processing line: ~ # and the distance from the target in its heurisitic.~ - Inside source: true *** True Line Result - # The heuristic search, however, explores less of the grid, and is therefore faster. -** Processing line: ~ # The heuristic search prioritizes searching cells that are closer to the target.~ + # and the distance from the target in its heurisitic. +** Processing line: ~~ - Inside source: true *** True Line Result - # The heuristic search prioritizes searching cells that are closer to the target. -** Processing line: ~ # Make sure to look at the Heuristic with walls program to see some of the downsides of the heuristic algorithm.~ + +** Processing line: ~ # It tends to find the correct (shortest) path even when the Greedy Best-First Search does not,~ - Inside source: true *** True Line Result - # Make sure to look at the Heuristic with walls program to see some of the downsides of the heuristic algorithm. + # It tends to find the correct (shortest) path even when the Greedy Best-First Search does not, +** Processing line: ~ # and it explores less of the grid, and is therefore faster, than Dijkstra's Search.~ +- Inside source: true +*** True Line Result + # and it explores less of the grid, and is therefore faster, than Dijkstra's Search. ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ class Heuristic~ +** Processing line: ~ class A_Star_Algorithm~ - Inside source: true *** True Line Result - class Heuristic + class A_Star_Algorithm ** Processing line: ~ attr_gtk~ - Inside source: true *** True Line Result @@ -77424,30 +84587,18 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result input -** Processing line: ~ # If animation is playing, and max steps have not been reached~ -- Inside source: true -*** True Line Result - # If animation is playing, and max steps have not been reached -** Processing line: ~ # Move the search a step forward~ -- Inside source: true -*** True Line Result - # Move the search a step forward -** Processing line: ~ if state.play && state.current_step < state.max_steps~ -- Inside source: true -*** True Line Result - if state.play && state.current_step < state.max_steps -** Processing line: ~ # Variable that tells the program what step to recalculate up to~ +** Processing line: ~~ - Inside source: true *** True Line Result - # Variable that tells the program what step to recalculate up to -** Processing line: ~ state.current_step += 1~ + +** Processing line: ~ if dijkstra.came_from.empty?~ - Inside source: true *** True Line Result - state.current_step += 1 -** Processing line: ~ move_searches_one_step_forward~ + if dijkstra.came_from.empty? +** Processing line: ~ calc_searches~ - Inside source: true *** True Line Result - move_searches_one_step_forward + calc_searches ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -77480,10 +84631,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result grid.height ||= 15 -** Processing line: ~ grid.cell_size ||= 40~ +** Processing line: ~ grid.cell_size ||= 27~ - Inside source: true *** True Line Result - grid.cell_size ||= 40 + grid.cell_size ||= 27 ** Processing line: ~ grid.rect ||= [0, 0, grid.width, grid.height]~ - Inside source: true *** True Line Result @@ -77496,10 +84647,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result grid.star ||= [0, 2] -** Processing line: ~ grid.target ||= [14, 12]~ +** Processing line: ~ grid.target ||= [11, 13]~ - Inside source: true *** True Line Result - grid.target ||= [14, 12] + grid.target ||= [11, 13] ** Processing line: ~ grid.walls ||= {~ - Inside source: true *** True Line Result @@ -77588,18 +84739,6 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result [12, 12] => true, -** Processing line: ~ [2, 12] => true,~ -- Inside source: true -*** True Line Result - [2, 12] => true, -** Processing line: ~ [3, 12] => true,~ -- Inside source: true -*** True Line Result - [3, 12] => true, -** Processing line: ~ [4, 12] => true,~ -- Inside source: true -*** True Line Result - [4, 12] => true, ** Processing line: ~ [5, 12] => true,~ - Inside source: true *** True Line Result @@ -77636,10 +84775,6 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result } -** Processing line: ~ # There are no hills in the Heuristic Search Demo~ -- Inside source: true -*** True Line Result - # There are no hills in the Heuristic Search Demo ** Processing line: ~~ - Inside source: true *** True Line Result @@ -77700,250 +84835,54 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result # It prevents calculating the path every tick. -** Processing line: ~ bfs.came_from ||= {}~ -- Inside source: true -*** True Line Result - bfs.came_from ||= {} -** Processing line: ~ bfs.frontier ||= []~ -- Inside source: true -*** True Line Result - bfs.frontier ||= [] -** Processing line: ~ bfs.path ||= []~ -- Inside source: true -*** True Line Result - bfs.path ||= [] -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ heuristic.came_from ||= {}~ -- Inside source: true -*** True Line Result - heuristic.came_from ||= {} -** Processing line: ~ heuristic.frontier ||= []~ -- Inside source: true -*** True Line Result - heuristic.frontier ||= [] -** Processing line: ~ heuristic.path ||= []~ -- Inside source: true -*** True Line Result - heuristic.path ||= [] -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ # Stores which step of the animation is being rendered~ -- Inside source: true -*** True Line Result - # Stores which step of the animation is being rendered -** Processing line: ~ # When the user moves the star or messes with the walls,~ -- Inside source: true -*** True Line Result - # When the user moves the star or messes with the walls, -** Processing line: ~ # the searches are recalculated up to this step~ -- Inside source: true -*** True Line Result - # the searches are recalculated up to this step -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ # Unless the current step has a value~ -- Inside source: true -*** True Line Result - # Unless the current step has a value -** Processing line: ~ unless state.current_step~ -- Inside source: true -*** True Line Result - unless state.current_step -** Processing line: ~ # Set the current step to 10~ -- Inside source: true -*** True Line Result - # Set the current step to 10 -** Processing line: ~ state.current_step = 10~ -- Inside source: true -*** True Line Result - state.current_step = 10 -** Processing line: ~ # And calculate the searches up to step 10~ -- Inside source: true -*** True Line Result - # And calculate the searches up to step 10 -** Processing line: ~ recalculate_searches~ -- Inside source: true -*** True Line Result - recalculate_searches -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ # At some step the animation will end,~ -- Inside source: true -*** True Line Result - # At some step the animation will end, -** Processing line: ~ # and further steps won't change anything (the whole grid will be explored)~ -- Inside source: true -*** True Line Result - # and further steps won't change anything (the whole grid will be explored) -** Processing line: ~ # This step is roughly the grid's width * height~ -- Inside source: true -*** True Line Result - # This step is roughly the grid's width * height -** Processing line: ~ # When anim_steps equals max_steps no more calculations will occur~ -- Inside source: true -*** True Line Result - # When anim_steps equals max_steps no more calculations will occur -** Processing line: ~ # and the slider will be at the end~ -- Inside source: true -*** True Line Result - # and the slider will be at the end -** Processing line: ~ state.max_steps = grid.width * grid.height~ -- Inside source: true -*** True Line Result - state.max_steps = grid.width * grid.height -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ # Whether the animation should play or not~ -- Inside source: true -*** True Line Result - # Whether the animation should play or not -** Processing line: ~ # If true, every tick moves anim_steps forward one~ -- Inside source: true -*** True Line Result - # If true, every tick moves anim_steps forward one -** Processing line: ~ # Pressing the stepwise animation buttons will pause the animation~ -- Inside source: true -*** True Line Result - # Pressing the stepwise animation buttons will pause the animation -** Processing line: ~ # An if statement instead of the ||= operator is used for assigning a boolean value.~ -- Inside source: true -*** True Line Result - # An if statement instead of the ||= operator is used for assigning a boolean value. -** Processing line: ~ # The || operator does not differentiate between nil and false.~ +** Processing line: ~ dijkstra.came_from ||= {}~ - Inside source: true *** True Line Result - # The || operator does not differentiate between nil and false. -** Processing line: ~ if state.play == nil~ + dijkstra.came_from ||= {} +** Processing line: ~ dijkstra.cost_so_far ||= {}~ - Inside source: true *** True Line Result - if state.play == nil -** Processing line: ~ state.play = false~ + dijkstra.cost_so_far ||= {} +** Processing line: ~ dijkstra.frontier ||= []~ - Inside source: true *** True Line Result - state.play = false -** Processing line: ~ end~ + dijkstra.frontier ||= [] +** Processing line: ~ dijkstra.path ||= []~ - Inside source: true *** True Line Result - end + dijkstra.path ||= [] ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Store the rects of the buttons that control the animation~ -- Inside source: true -*** True Line Result - # Store the rects of the buttons that control the animation -** Processing line: ~ # They are here for user customization~ -- Inside source: true -*** True Line Result - # They are here for user customization -** Processing line: ~ # Editing these might require recentering the text inside them~ -- Inside source: true -*** True Line Result - # Editing these might require recentering the text inside them -** Processing line: ~ # Those values can be found in the render_button methods~ -- Inside source: true -*** True Line Result - # Those values can be found in the render_button methods -** Processing line: ~ buttons.left = [470, 600, 50, 50]~ +** Processing line: ~ greedy.came_from ||= {}~ - Inside source: true *** True Line Result - buttons.left = [470, 600, 50, 50] -** Processing line: ~ buttons.center = [520, 600, 200, 50]~ + greedy.came_from ||= {} +** Processing line: ~ greedy.frontier ||= []~ - Inside source: true *** True Line Result - buttons.center = [520, 600, 200, 50] -** Processing line: ~ buttons.right = [720, 600, 50, 50]~ + greedy.frontier ||= [] +** Processing line: ~ greedy.path ||= []~ - Inside source: true *** True Line Result - buttons.right = [720, 600, 50, 50] + greedy.path ||= [] ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # The variables below are related to the slider~ -- Inside source: true -*** True Line Result - # The variables below are related to the slider -** Processing line: ~ # They allow the user to customize them~ -- Inside source: true -*** True Line Result - # They allow the user to customize them -** Processing line: ~ # They also give a central location for the render and input methods to get~ -- Inside source: true -*** True Line Result - # They also give a central location for the render and input methods to get -** Processing line: ~ # information from~ -- Inside source: true -*** True Line Result - # information from -** Processing line: ~ # x & y are the coordinates of the leftmost part of the slider line~ -- Inside source: true -*** True Line Result - # x & y are the coordinates of the leftmost part of the slider line -** Processing line: ~ slider.x = 440~ -- Inside source: true -*** True Line Result - slider.x = 440 -** Processing line: ~ slider.y = 675~ -- Inside source: true -*** True Line Result - slider.y = 675 -** Processing line: ~ # This is the width of the line~ -- Inside source: true -*** True Line Result - # This is the width of the line -** Processing line: ~ slider.w = 360~ -- Inside source: true -*** True Line Result - slider.w = 360 -** Processing line: ~ # This is the offset for the circle~ -- Inside source: true -*** True Line Result - # This is the offset for the circle -** Processing line: ~ # Allows the center of the circle to be on the line,~ -- Inside source: true -*** True Line Result - # Allows the center of the circle to be on the line, -** Processing line: ~ # as opposed to the upper right corner~ -- Inside source: true -*** True Line Result - # as opposed to the upper right corner -** Processing line: ~ slider.offset = 20~ -- Inside source: true -*** True Line Result - slider.offset = 20 -** Processing line: ~ # This is the spacing between each of the notches on the slider~ -- Inside source: true -*** True Line Result - # This is the spacing between each of the notches on the slider -** Processing line: ~ # Notches are places where the circle can rest on the slider line~ +** Processing line: ~ a_star.frontier ||= []~ - Inside source: true *** True Line Result - # Notches are places where the circle can rest on the slider line -** Processing line: ~ # There needs to be a notch for each step before the maximum number of steps~ + a_star.frontier ||= [] +** Processing line: ~ a_star.came_from ||= {}~ - Inside source: true *** True Line Result - # There needs to be a notch for each step before the maximum number of steps -** Processing line: ~ slider.spacing = slider.w.to_f / state.max_steps.to_f~ + a_star.came_from ||= {} +** Processing line: ~ a_star.path ||= []~ - Inside source: true *** True Line Result - slider.spacing = slider.w.to_f / state.max_steps.to_f + a_star.path ||= [] ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -77968,18 +84907,22 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result def render -** Processing line: ~ render_ui~ +** Processing line: ~ render_labels~ - Inside source: true *** True Line Result - render_ui -** Processing line: ~ render_bfs~ + render_labels +** Processing line: ~ render_dijkstra~ - Inside source: true *** True Line Result - render_bfs -** Processing line: ~ render_heuristic~ + render_dijkstra +** Processing line: ~ render_greedy~ - Inside source: true *** True Line Result - render_heuristic + render_greedy +** Processing line: ~ render_a_star~ +- Inside source: true +*** True Line Result + render_a_star ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -77988,22 +84931,22 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def render_ui~ +** Processing line: ~ def render_labels~ - Inside source: true *** True Line Result - def render_ui -** Processing line: ~ render_buttons~ + def render_labels +** Processing line: ~ outputs.labels << [150, 450, "Dijkstra's"]~ - Inside source: true *** True Line Result - render_buttons -** Processing line: ~ render_slider~ + outputs.labels << [150, 450, "Dijkstra's"] +** Processing line: ~ outputs.labels << [550, 450, "Greedy Best-First"]~ - Inside source: true *** True Line Result - render_slider -** Processing line: ~ render_labels~ + outputs.labels << [550, 450, "Greedy Best-First"] +** Processing line: ~ outputs.labels << [1025, 450, "A* Search"]~ - Inside source: true *** True Line Result - render_labels + outputs.labels << [1025, 450, "A* Search"] ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -78012,22 +84955,34 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def render_buttons~ +** Processing line: ~ def render_dijkstra~ - Inside source: true *** True Line Result - def render_buttons -** Processing line: ~ render_left_button~ + def render_dijkstra +** Processing line: ~ render_dijkstra_grid~ - Inside source: true *** True Line Result - render_left_button -** Processing line: ~ render_center_button~ + render_dijkstra_grid +** Processing line: ~ render_dijkstra_star~ - Inside source: true *** True Line Result - render_center_button -** Processing line: ~ render_right_button~ + render_dijkstra_star +** Processing line: ~ render_dijkstra_target~ - Inside source: true *** True Line Result - render_right_button + render_dijkstra_target +** Processing line: ~ render_dijkstra_visited~ +- Inside source: true +*** True Line Result + render_dijkstra_visited +** Processing line: ~ render_dijkstra_walls~ +- Inside source: true +*** True Line Result + render_dijkstra_walls +** Processing line: ~ render_dijkstra_path~ +- Inside source: true +*** True Line Result + render_dijkstra_path ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -78036,38 +84991,34 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def render_bfs~ -- Inside source: true -*** True Line Result - def render_bfs -** Processing line: ~ render_bfs_grid~ +** Processing line: ~ def render_greedy~ - Inside source: true *** True Line Result - render_bfs_grid -** Processing line: ~ render_bfs_star~ + def render_greedy +** Processing line: ~ render_greedy_grid~ - Inside source: true *** True Line Result - render_bfs_star -** Processing line: ~ render_bfs_target~ + render_greedy_grid +** Processing line: ~ render_greedy_star~ - Inside source: true *** True Line Result - render_bfs_target -** Processing line: ~ render_bfs_visited~ + render_greedy_star +** Processing line: ~ render_greedy_target~ - Inside source: true *** True Line Result - render_bfs_visited -** Processing line: ~ render_bfs_walls~ + render_greedy_target +** Processing line: ~ render_greedy_visited~ - Inside source: true *** True Line Result - render_bfs_walls -** Processing line: ~ render_bfs_frontier~ + render_greedy_visited +** Processing line: ~ render_greedy_walls~ - Inside source: true *** True Line Result - render_bfs_frontier -** Processing line: ~ render_bfs_path~ + render_greedy_walls +** Processing line: ~ render_greedy_path~ - Inside source: true *** True Line Result - render_bfs_path + render_greedy_path ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -78076,38 +85027,34 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def render_heuristic~ -- Inside source: true -*** True Line Result - def render_heuristic -** Processing line: ~ render_heuristic_grid~ +** Processing line: ~ def render_a_star~ - Inside source: true *** True Line Result - render_heuristic_grid -** Processing line: ~ render_heuristic_star~ + def render_a_star +** Processing line: ~ render_a_star_grid~ - Inside source: true *** True Line Result - render_heuristic_star -** Processing line: ~ render_heuristic_target~ + render_a_star_grid +** Processing line: ~ render_a_star_star~ - Inside source: true *** True Line Result - render_heuristic_target -** Processing line: ~ render_heuristic_visited~ + render_a_star_star +** Processing line: ~ render_a_star_target~ - Inside source: true *** True Line Result - render_heuristic_visited -** Processing line: ~ render_heuristic_walls~ + render_a_star_target +** Processing line: ~ render_a_star_visited~ - Inside source: true *** True Line Result - render_heuristic_walls -** Processing line: ~ render_heuristic_frontier~ + render_a_star_visited +** Processing line: ~ render_a_star_walls~ - Inside source: true *** True Line Result - render_heuristic_frontier -** Processing line: ~ render_heuristic_path~ + render_a_star_walls +** Processing line: ~ render_a_star_path~ - Inside source: true *** True Line Result - render_heuristic_path + render_a_star_path ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -78124,18 +85071,6 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result def input -** Processing line: ~ # Check and handle button input~ -- Inside source: true -*** True Line Result - # Check and handle button input -** Processing line: ~ input_buttons~ -- Inside source: true -*** True Line Result - input_buttons -** Processing line: ~~ -- Inside source: true -*** True Line Result - ** Processing line: ~ # If the mouse was lifted this tick~ - Inside source: true *** True Line Result @@ -78212,234 +85147,198 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result def determine_input -** Processing line: ~ if mouse_over_slider?~ -- Inside source: true -*** True Line Result - if mouse_over_slider? -** Processing line: ~ state.user_input = :slider~ -- Inside source: true -*** True Line Result - state.user_input = :slider ** Processing line: ~ # If the mouse is over the star in the first grid~ - Inside source: true *** True Line Result # If the mouse is over the star in the first grid -** Processing line: ~ elsif bfs_mouse_over_star?~ +** Processing line: ~ if dijkstra_mouse_over_star?~ - Inside source: true *** True Line Result - elsif bfs_mouse_over_star? + if dijkstra_mouse_over_star? ** Processing line: ~ # The user is editing the star from the first grid~ - Inside source: true *** True Line Result # The user is editing the star from the first grid -** Processing line: ~ state.user_input = :bfs_star~ +** Processing line: ~ state.user_input = :dijkstra_star~ - Inside source: true *** True Line Result - state.user_input = :bfs_star + state.user_input = :dijkstra_star ** Processing line: ~ # If the mouse is over the star in the second grid~ - Inside source: true *** True Line Result # If the mouse is over the star in the second grid -** Processing line: ~ elsif heuristic_mouse_over_star?~ +** Processing line: ~ elsif greedy_mouse_over_star?~ - Inside source: true *** True Line Result - elsif heuristic_mouse_over_star? + elsif greedy_mouse_over_star? ** Processing line: ~ # The user is editing the star from the second grid~ - Inside source: true *** True Line Result # The user is editing the star from the second grid -** Processing line: ~ state.user_input = :heuristic_star~ -- Inside source: true -*** True Line Result - state.user_input = :heuristic_star -** Processing line: ~ # If the mouse is over the target in the first grid~ -- Inside source: true -*** True Line Result - # If the mouse is over the target in the first grid -** Processing line: ~ elsif bfs_mouse_over_target?~ -- Inside source: true -*** True Line Result - elsif bfs_mouse_over_target? -** Processing line: ~ # The user is editing the target from the first grid~ -- Inside source: true -*** True Line Result - # The user is editing the target from the first grid -** Processing line: ~ state.user_input = :bfs_target~ -- Inside source: true -*** True Line Result - state.user_input = :bfs_target -** Processing line: ~ # If the mouse is over the target in the second grid~ -- Inside source: true -*** True Line Result - # If the mouse is over the target in the second grid -** Processing line: ~ elsif heuristic_mouse_over_target?~ -- Inside source: true -*** True Line Result - elsif heuristic_mouse_over_target? -** Processing line: ~ # The user is editing the target from the second grid~ +** Processing line: ~ state.user_input = :greedy_star~ - Inside source: true *** True Line Result - # The user is editing the target from the second grid -** Processing line: ~ state.user_input = :heuristic_target~ + state.user_input = :greedy_star +** Processing line: ~ # If the mouse is over the star in the third grid~ - Inside source: true *** True Line Result - state.user_input = :heuristic_target -** Processing line: ~ # If the mouse is over a wall in the first grid~ + # If the mouse is over the star in the third grid +** Processing line: ~ elsif a_star_mouse_over_star?~ - Inside source: true *** True Line Result - # If the mouse is over a wall in the first grid -** Processing line: ~ elsif bfs_mouse_over_wall?~ + elsif a_star_mouse_over_star? +** Processing line: ~ # The user is editing the star from the third grid~ - Inside source: true *** True Line Result - elsif bfs_mouse_over_wall? -** Processing line: ~ # The user is removing a wall from the first grid~ + # The user is editing the star from the third grid +** Processing line: ~ state.user_input = :a_star_star~ - Inside source: true *** True Line Result - # The user is removing a wall from the first grid -** Processing line: ~ state.user_input = :bfs_remove_wall~ + state.user_input = :a_star_star +** Processing line: ~ # If the mouse is over the target in the first grid~ - Inside source: true *** True Line Result - state.user_input = :bfs_remove_wall -** Processing line: ~ # If the mouse is over a wall in the second grid~ + # If the mouse is over the target in the first grid +** Processing line: ~ elsif dijkstra_mouse_over_target?~ - Inside source: true *** True Line Result - # If the mouse is over a wall in the second grid -** Processing line: ~ elsif heuristic_mouse_over_wall?~ + elsif dijkstra_mouse_over_target? +** Processing line: ~ # The user is editing the target from the first grid~ - Inside source: true *** True Line Result - elsif heuristic_mouse_over_wall? -** Processing line: ~ # The user is removing a wall from the second grid~ + # The user is editing the target from the first grid +** Processing line: ~ state.user_input = :dijkstra_target~ - Inside source: true *** True Line Result - # The user is removing a wall from the second grid -** Processing line: ~ state.user_input = :heuristic_remove_wall~ + state.user_input = :dijkstra_target +** Processing line: ~ # If the mouse is over the target in the second grid~ - Inside source: true *** True Line Result - state.user_input = :heuristic_remove_wall -** Processing line: ~ # If the mouse is over the first grid~ + # If the mouse is over the target in the second grid +** Processing line: ~ elsif greedy_mouse_over_target?~ - Inside source: true *** True Line Result - # If the mouse is over the first grid -** Processing line: ~ elsif bfs_mouse_over_grid?~ + elsif greedy_mouse_over_target? +** Processing line: ~ # The user is editing the target from the second grid~ - Inside source: true *** True Line Result - elsif bfs_mouse_over_grid? -** Processing line: ~ # The user is adding a wall from the first grid~ + # The user is editing the target from the second grid +** Processing line: ~ state.user_input = :greedy_target~ - Inside source: true *** True Line Result - # The user is adding a wall from the first grid -** Processing line: ~ state.user_input = :bfs_add_wall~ + state.user_input = :greedy_target +** Processing line: ~ # If the mouse is over the target in the third grid~ - Inside source: true *** True Line Result - state.user_input = :bfs_add_wall -** Processing line: ~ # If the mouse is over the second grid~ + # If the mouse is over the target in the third grid +** Processing line: ~ elsif a_star_mouse_over_target?~ - Inside source: true *** True Line Result - # If the mouse is over the second grid -** Processing line: ~ elsif heuristic_mouse_over_grid?~ + elsif a_star_mouse_over_target? +** Processing line: ~ # The user is editing the target from the third grid~ - Inside source: true *** True Line Result - elsif heuristic_mouse_over_grid? -** Processing line: ~ # The user is adding a wall from the second grid~ + # The user is editing the target from the third grid +** Processing line: ~ state.user_input = :a_star_target~ - Inside source: true *** True Line Result - # The user is adding a wall from the second grid -** Processing line: ~ state.user_input = :heuristic_add_wall~ + state.user_input = :a_star_target +** Processing line: ~ # If the mouse is over a wall in the first grid~ - Inside source: true *** True Line Result - state.user_input = :heuristic_add_wall -** Processing line: ~ end~ + # If the mouse is over a wall in the first grid +** Processing line: ~ elsif dijkstra_mouse_over_wall?~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + elsif dijkstra_mouse_over_wall? +** Processing line: ~ # The user is removing a wall from the first grid~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + # The user is removing a wall from the first grid +** Processing line: ~ state.user_input = :dijkstra_remove_wall~ - Inside source: true *** True Line Result - -** Processing line: ~ # Processes click and drag based on what the user is currently dragging~ + state.user_input = :dijkstra_remove_wall +** Processing line: ~ # If the mouse is over a wall in the second grid~ - Inside source: true *** True Line Result - # Processes click and drag based on what the user is currently dragging -** Processing line: ~ def process_input~ + # If the mouse is over a wall in the second grid +** Processing line: ~ elsif greedy_mouse_over_wall?~ - Inside source: true *** True Line Result - def process_input -** Processing line: ~ if state.user_input == :slider~ + elsif greedy_mouse_over_wall? +** Processing line: ~ # The user is removing a wall from the second grid~ - Inside source: true *** True Line Result - if state.user_input == :slider -** Processing line: ~ process_input_slider~ + # The user is removing a wall from the second grid +** Processing line: ~ state.user_input = :greedy_remove_wall~ - Inside source: true *** True Line Result - process_input_slider -** Processing line: ~ elsif state.user_input == :bfs_star~ + state.user_input = :greedy_remove_wall +** Processing line: ~ # If the mouse is over a wall in the third grid~ - Inside source: true *** True Line Result - elsif state.user_input == :bfs_star -** Processing line: ~ process_input_bfs_star~ + # If the mouse is over a wall in the third grid +** Processing line: ~ elsif a_star_mouse_over_wall?~ - Inside source: true *** True Line Result - process_input_bfs_star -** Processing line: ~ elsif state.user_input == :heuristic_star~ + elsif a_star_mouse_over_wall? +** Processing line: ~ # The user is removing a wall from the third grid~ - Inside source: true *** True Line Result - elsif state.user_input == :heuristic_star -** Processing line: ~ process_input_heuristic_star~ + # The user is removing a wall from the third grid +** Processing line: ~ state.user_input = :a_star_remove_wall~ - Inside source: true *** True Line Result - process_input_heuristic_star -** Processing line: ~ elsif state.user_input == :bfs_target~ + state.user_input = :a_star_remove_wall +** Processing line: ~ # If the mouse is over the first grid~ - Inside source: true *** True Line Result - elsif state.user_input == :bfs_target -** Processing line: ~ process_input_bfs_target~ + # If the mouse is over the first grid +** Processing line: ~ elsif dijkstra_mouse_over_grid?~ - Inside source: true *** True Line Result - process_input_bfs_target -** Processing line: ~ elsif state.user_input == :heuristic_target~ + elsif dijkstra_mouse_over_grid? +** Processing line: ~ # The user is adding a wall from the first grid~ - Inside source: true *** True Line Result - elsif state.user_input == :heuristic_target -** Processing line: ~ process_input_heuristic_target~ + # The user is adding a wall from the first grid +** Processing line: ~ state.user_input = :dijkstra_add_wall~ - Inside source: true *** True Line Result - process_input_heuristic_target -** Processing line: ~ elsif state.user_input == :bfs_remove_wall~ + state.user_input = :dijkstra_add_wall +** Processing line: ~ # If the mouse is over the second grid~ - Inside source: true *** True Line Result - elsif state.user_input == :bfs_remove_wall -** Processing line: ~ process_input_bfs_remove_wall~ + # If the mouse is over the second grid +** Processing line: ~ elsif greedy_mouse_over_grid?~ - Inside source: true *** True Line Result - process_input_bfs_remove_wall -** Processing line: ~ elsif state.user_input == :heuristic_remove_wall~ + elsif greedy_mouse_over_grid? +** Processing line: ~ # The user is adding a wall from the second grid~ - Inside source: true *** True Line Result - elsif state.user_input == :heuristic_remove_wall -** Processing line: ~ process_input_heuristic_remove_wall~ + # The user is adding a wall from the second grid +** Processing line: ~ state.user_input = :greedy_add_wall~ - Inside source: true *** True Line Result - process_input_heuristic_remove_wall -** Processing line: ~ elsif state.user_input == :bfs_add_wall~ + state.user_input = :greedy_add_wall +** Processing line: ~ # If the mouse is over the third grid~ - Inside source: true *** True Line Result - elsif state.user_input == :bfs_add_wall -** Processing line: ~ process_input_bfs_add_wall~ + # If the mouse is over the third grid +** Processing line: ~ elsif a_star_mouse_over_grid?~ - Inside source: true *** True Line Result - process_input_bfs_add_wall -** Processing line: ~ elsif state.user_input == :heuristic_add_wall~ + elsif a_star_mouse_over_grid? +** Processing line: ~ # The user is adding a wall from the third grid~ - Inside source: true *** True Line Result - elsif state.user_input == :heuristic_add_wall -** Processing line: ~ process_input_heuristic_add_wall~ + # The user is adding a wall from the third grid +** Processing line: ~ state.user_input = :a_star_add_wall~ - Inside source: true *** True Line Result - process_input_heuristic_add_wall + state.user_input = :a_star_add_wall ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -78452,194 +85351,114 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def render_slider~ -- Inside source: true -*** True Line Result - def render_slider -** Processing line: ~ # Using primitives hides the line under the white circle of the slider~ -- Inside source: true -*** True Line Result - # Using primitives hides the line under the white circle of the slider -** Processing line: ~ # Draws the line~ -- Inside source: true -*** True Line Result - # Draws the line -** Processing line: ~ outputs.primitives << [slider.x, slider.y, slider.x + slider.w, slider.y].line~ -- Inside source: true -*** True Line Result - outputs.primitives << [slider.x, slider.y, slider.x + slider.w, slider.y].line -** Processing line: ~ # The circle needs to be offset so that the center of the circle~ -- Inside source: true -*** True Line Result - # The circle needs to be offset so that the center of the circle -** Processing line: ~ # overlaps the line instead of the upper right corner of the circle~ -- Inside source: true -*** True Line Result - # overlaps the line instead of the upper right corner of the circle -** Processing line: ~ # The circle's x value is also moved based on the current seach step~ -- Inside source: true -*** True Line Result - # The circle's x value is also moved based on the current seach step -** Processing line: ~ circle_x = (slider.x - slider.offset) + (state.current_step * slider.spacing)~ -- Inside source: true -*** True Line Result - circle_x = (slider.x - slider.offset) + (state.current_step * slider.spacing) -** Processing line: ~ circle_y = (slider.y - slider.offset)~ -- Inside source: true -*** True Line Result - circle_y = (slider.y - slider.offset) -** Processing line: ~ circle_rect = [circle_x, circle_y, 37, 37]~ -- Inside source: true -*** True Line Result - circle_rect = [circle_x, circle_y, 37, 37] -** Processing line: ~ outputs.primitives << [circle_rect, 'circle-white.png'].sprite~ -- Inside source: true -*** True Line Result - outputs.primitives << [circle_rect, 'circle-white.png'].sprite -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ def render_labels~ -- Inside source: true -*** True Line Result - def render_labels -** Processing line: ~ outputs.labels << [205, 625, "Breadth First Search"]~ -- Inside source: true -*** True Line Result - outputs.labels << [205, 625, "Breadth First Search"] -** Processing line: ~ outputs.labels << [820, 625, "Heuristic Best-First Search"]~ -- Inside source: true -*** True Line Result - outputs.labels << [820, 625, "Heuristic Best-First Search"] -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ def render_left_button~ -- Inside source: true -*** True Line Result - def render_left_button -** Processing line: ~ # Draws the button_color button, and a black border~ -- Inside source: true -*** True Line Result - # Draws the button_color button, and a black border -** Processing line: ~ # The border separates the buttons visually~ +** Processing line: ~ # Processes click and drag based on what the user is currently dragging~ - Inside source: true *** True Line Result - # The border separates the buttons visually -** Processing line: ~ outputs.solids << [buttons.left, button_color]~ + # Processes click and drag based on what the user is currently dragging +** Processing line: ~ def process_input~ - Inside source: true *** True Line Result - outputs.solids << [buttons.left, button_color] -** Processing line: ~ outputs.borders << [buttons.left]~ + def process_input +** Processing line: ~ if state.user_input == :dijkstra_star~ - Inside source: true *** True Line Result - outputs.borders << [buttons.left] -** Processing line: ~~ + if state.user_input == :dijkstra_star +** Processing line: ~ process_input_dijkstra_star~ - Inside source: true *** True Line Result - -** Processing line: ~ # Renders an explanatory label in the center of the button~ + process_input_dijkstra_star +** Processing line: ~ elsif state.user_input == :greedy_star~ - Inside source: true *** True Line Result - # Renders an explanatory label in the center of the button -** Processing line: ~ # Explains to the user what the button does~ + elsif state.user_input == :greedy_star +** Processing line: ~ process_input_greedy_star~ - Inside source: true *** True Line Result - # Explains to the user what the button does -** Processing line: ~ # If the button size is changed, the label might need to be edited as well~ + process_input_greedy_star +** Processing line: ~ elsif state.user_input == :a_star_star~ - Inside source: true *** True Line Result - # If the button size is changed, the label might need to be edited as well -** Processing line: ~ # to keep the label in the center of the button~ + elsif state.user_input == :a_star_star +** Processing line: ~ process_input_a_star_star~ - Inside source: true *** True Line Result - # to keep the label in the center of the button -** Processing line: ~ label_x = buttons.left.x + 20~ + process_input_a_star_star +** Processing line: ~ elsif state.user_input == :dijkstra_target~ - Inside source: true *** True Line Result - label_x = buttons.left.x + 20 -** Processing line: ~ label_y = buttons.left.y + 35~ + elsif state.user_input == :dijkstra_target +** Processing line: ~ process_input_dijkstra_target~ - Inside source: true *** True Line Result - label_y = buttons.left.y + 35 -** Processing line: ~ outputs.labels << [label_x, label_y, "<"]~ + process_input_dijkstra_target +** Processing line: ~ elsif state.user_input == :greedy_target~ - Inside source: true *** True Line Result - outputs.labels << [label_x, label_y, "<"] -** Processing line: ~ end~ + elsif state.user_input == :greedy_target +** Processing line: ~ process_input_greedy_target~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + process_input_greedy_target +** Processing line: ~ elsif state.user_input == :a_star_target~ - Inside source: true *** True Line Result - -** Processing line: ~ def render_center_button~ + elsif state.user_input == :a_star_target +** Processing line: ~ process_input_a_star_target~ - Inside source: true *** True Line Result - def render_center_button -** Processing line: ~ # Draws the button_color button, and a black border~ + process_input_a_star_target +** Processing line: ~ elsif state.user_input == :dijkstra_remove_wall~ - Inside source: true *** True Line Result - # Draws the button_color button, and a black border -** Processing line: ~ # The border separates the buttons visually~ + elsif state.user_input == :dijkstra_remove_wall +** Processing line: ~ process_input_dijkstra_remove_wall~ - Inside source: true *** True Line Result - # The border separates the buttons visually -** Processing line: ~ outputs.solids << [buttons.center, button_color]~ + process_input_dijkstra_remove_wall +** Processing line: ~ elsif state.user_input == :greedy_remove_wall~ - Inside source: true *** True Line Result - outputs.solids << [buttons.center, button_color] -** Processing line: ~ outputs.borders << [buttons.center]~ + elsif state.user_input == :greedy_remove_wall +** Processing line: ~ process_input_greedy_remove_wall~ - Inside source: true *** True Line Result - outputs.borders << [buttons.center] -** Processing line: ~~ + process_input_greedy_remove_wall +** Processing line: ~ elsif state.user_input == :a_star_remove_wall~ - Inside source: true *** True Line Result - -** Processing line: ~ # Renders an explanatory label in the center of the button~ + elsif state.user_input == :a_star_remove_wall +** Processing line: ~ process_input_a_star_remove_wall~ - Inside source: true *** True Line Result - # Renders an explanatory label in the center of the button -** Processing line: ~ # Explains to the user what the button does~ + process_input_a_star_remove_wall +** Processing line: ~ elsif state.user_input == :dijkstra_add_wall~ - Inside source: true *** True Line Result - # Explains to the user what the button does -** Processing line: ~ # If the button size is changed, the label might need to be edited as well~ + elsif state.user_input == :dijkstra_add_wall +** Processing line: ~ process_input_dijkstra_add_wall~ - Inside source: true *** True Line Result - # If the button size is changed, the label might need to be edited as well -** Processing line: ~ # to keep the label in the center of the button~ + process_input_dijkstra_add_wall +** Processing line: ~ elsif state.user_input == :greedy_add_wall~ - Inside source: true *** True Line Result - # to keep the label in the center of the button -** Processing line: ~ label_x = buttons.center.x + 37~ + elsif state.user_input == :greedy_add_wall +** Processing line: ~ process_input_greedy_add_wall~ - Inside source: true *** True Line Result - label_x = buttons.center.x + 37 -** Processing line: ~ label_y = buttons.center.y + 35~ + process_input_greedy_add_wall +** Processing line: ~ elsif state.user_input == :a_star_add_wall~ - Inside source: true *** True Line Result - label_y = buttons.center.y + 35 -** Processing line: ~ label_text = state.play ? "Pause Animation" : "Play Animation"~ + elsif state.user_input == :a_star_add_wall +** Processing line: ~ process_input_a_star_add_wall~ - Inside source: true *** True Line Result - label_text = state.play ? "Pause Animation" : "Play Animation" -** Processing line: ~ outputs.labels << [label_x, label_y, label_text]~ + process_input_a_star_add_wall +** Processing line: ~ end~ - Inside source: true *** True Line Result - outputs.labels << [label_x, label_y, label_text] + end ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -78648,50 +85467,58 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def render_right_button~ +** Processing line: ~ def render_dijkstra_grid~ - Inside source: true *** True Line Result - def render_right_button -** Processing line: ~ # Draws the button_color button, and a black border~ + def render_dijkstra_grid +** Processing line: ~ # A large rect the size of the grid~ - Inside source: true *** True Line Result - # Draws the button_color button, and a black border -** Processing line: ~ # The border separates the buttons visually~ + # A large rect the size of the grid +** Processing line: ~ outputs.solids << [dijkstra_scale_up(grid.rect), default_color]~ - Inside source: true *** True Line Result - # The border separates the buttons visually -** Processing line: ~ outputs.solids << [buttons.right, button_color]~ + outputs.solids << [dijkstra_scale_up(grid.rect), default_color] +** Processing line: ~~ - Inside source: true *** True Line Result - outputs.solids << [buttons.right, button_color] -** Processing line: ~ outputs.borders << [buttons.right]~ + +** Processing line: ~ # The vertical grid lines~ - Inside source: true *** True Line Result - outputs.borders << [buttons.right] -** Processing line: ~~ + # The vertical grid lines +** Processing line: ~ for x in 0..grid.width~ - Inside source: true *** True Line Result - -** Processing line: ~ # Renders an explanatory label in the center of the button~ + for x in 0..grid.width +** Processing line: ~ outputs.lines << dijkstra_vertical_line(x)~ - Inside source: true *** True Line Result - # Renders an explanatory label in the center of the button -** Processing line: ~ # Explains to the user what the button does~ + outputs.lines << dijkstra_vertical_line(x) +** Processing line: ~ end~ - Inside source: true *** True Line Result - # Explains to the user what the button does -** Processing line: ~ label_x = buttons.right.x + 20~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - label_x = buttons.right.x + 20 -** Processing line: ~ label_y = buttons.right.y + 35~ + +** Processing line: ~ # The horizontal grid lines~ - Inside source: true *** True Line Result - label_y = buttons.right.y + 35 -** Processing line: ~ outputs.labels << [label_x, label_y, ">"]~ + # The horizontal grid lines +** Processing line: ~ for y in 0..grid.height~ - Inside source: true *** True Line Result - outputs.labels << [label_x, label_y, ">"] + for y in 0..grid.height +** Processing line: ~ outputs.lines << dijkstra_horizontal_line(y)~ +- Inside source: true +*** True Line Result + outputs.lines << dijkstra_horizontal_line(y) +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -78700,18 +85527,18 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def render_bfs_grid~ +** Processing line: ~ def render_greedy_grid~ - Inside source: true *** True Line Result - def render_bfs_grid + def render_greedy_grid ** Processing line: ~ # A large rect the size of the grid~ - Inside source: true *** True Line Result # A large rect the size of the grid -** Processing line: ~ outputs.solids << [bfs_scale_up(grid.rect), default_color]~ +** Processing line: ~ outputs.solids << [greedy_scale_up(grid.rect), default_color]~ - Inside source: true *** True Line Result - outputs.solids << [bfs_scale_up(grid.rect), default_color] + outputs.solids << [greedy_scale_up(grid.rect), default_color] ** Processing line: ~~ - Inside source: true *** True Line Result @@ -78724,10 +85551,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result for x in 0..grid.width -** Processing line: ~ outputs.lines << bfs_vertical_line(x)~ +** Processing line: ~ outputs.lines << greedy_vertical_line(x)~ - Inside source: true *** True Line Result - outputs.lines << bfs_vertical_line(x) + outputs.lines << greedy_vertical_line(x) ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -78744,10 +85571,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result for y in 0..grid.height -** Processing line: ~ outputs.lines << bfs_horizontal_line(y)~ +** Processing line: ~ outputs.lines << greedy_horizontal_line(y)~ - Inside source: true *** True Line Result - outputs.lines << bfs_horizontal_line(y) + outputs.lines << greedy_horizontal_line(y) ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -78760,18 +85587,18 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def render_heuristic_grid~ +** Processing line: ~ def render_a_star_grid~ - Inside source: true *** True Line Result - def render_heuristic_grid + def render_a_star_grid ** Processing line: ~ # A large rect the size of the grid~ - Inside source: true *** True Line Result # A large rect the size of the grid -** Processing line: ~ outputs.solids << [heuristic_scale_up(grid.rect), default_color]~ +** Processing line: ~ outputs.solids << [a_star_scale_up(grid.rect), default_color]~ - Inside source: true *** True Line Result - outputs.solids << [heuristic_scale_up(grid.rect), default_color] + outputs.solids << [a_star_scale_up(grid.rect), default_color] ** Processing line: ~~ - Inside source: true *** True Line Result @@ -78784,10 +85611,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result for x in 0..grid.width -** Processing line: ~ outputs.lines << heuristic_vertical_line(x)~ +** Processing line: ~ outputs.lines << a_star_vertical_line(x)~ - Inside source: true *** True Line Result - outputs.lines << heuristic_vertical_line(x) + outputs.lines << a_star_vertical_line(x) ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -78804,10 +85631,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result for y in 0..grid.height -** Processing line: ~ outputs.lines << heuristic_horizontal_line(y)~ +** Processing line: ~ outputs.lines << a_star_horizontal_line(y)~ - Inside source: true *** True Line Result - outputs.lines << heuristic_horizontal_line(y) + outputs.lines << a_star_horizontal_line(y) ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -78824,14 +85651,14 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result # Returns a vertical line for a column of the first grid -** Processing line: ~ def bfs_vertical_line column~ +** Processing line: ~ def dijkstra_vertical_line column~ - Inside source: true *** True Line Result - def bfs_vertical_line column -** Processing line: ~ bfs_scale_up([column, 0, column, grid.height])~ + def dijkstra_vertical_line column +** Processing line: ~ dijkstra_scale_up([column, 0, column, grid.height])~ - Inside source: true *** True Line Result - bfs_scale_up([column, 0, column, grid.height]) + dijkstra_scale_up([column, 0, column, grid.height]) ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -78844,14 +85671,14 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result # Returns a horizontal line for a column of the first grid -** Processing line: ~ def bfs_horizontal_line row~ +** Processing line: ~ def dijkstra_horizontal_line row~ - Inside source: true *** True Line Result - def bfs_horizontal_line row -** Processing line: ~ bfs_scale_up([0, row, grid.width, row])~ + def dijkstra_horizontal_line row +** Processing line: ~ dijkstra_scale_up([0, row, grid.width, row])~ - Inside source: true *** True Line Result - bfs_scale_up([0, row, grid.width, row]) + dijkstra_scale_up([0, row, grid.width, row]) ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -78864,14 +85691,14 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result # Returns a vertical line for a column of the second grid -** Processing line: ~ def heuristic_vertical_line column~ +** Processing line: ~ def greedy_vertical_line column~ - Inside source: true *** True Line Result - def heuristic_vertical_line column -** Processing line: ~ bfs_scale_up([column + grid.width + 1, 0, column + grid.width + 1, grid.height])~ + def greedy_vertical_line column +** Processing line: ~ dijkstra_scale_up([column + grid.width + 1, 0, column + grid.width + 1, grid.height])~ - Inside source: true *** True Line Result - bfs_scale_up([column + grid.width + 1, 0, column + grid.width + 1, grid.height]) + dijkstra_scale_up([column + grid.width + 1, 0, column + grid.width + 1, grid.height]) ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -78884,14 +85711,54 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result # Returns a horizontal line for a column of the second grid -** Processing line: ~ def heuristic_horizontal_line row~ +** Processing line: ~ def greedy_horizontal_line row~ - Inside source: true *** True Line Result - def heuristic_horizontal_line row -** Processing line: ~ bfs_scale_up([grid.width + 1, row, grid.width + grid.width + 1, row])~ + def greedy_horizontal_line row +** Processing line: ~ dijkstra_scale_up([grid.width + 1, row, grid.width + grid.width + 1, row])~ - Inside source: true *** True Line Result - bfs_scale_up([grid.width + 1, row, grid.width + grid.width + 1, row]) + dijkstra_scale_up([grid.width + 1, row, grid.width + grid.width + 1, row]) +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ # Returns a vertical line for a column of the third grid~ +- Inside source: true +*** True Line Result + # Returns a vertical line for a column of the third grid +** Processing line: ~ def a_star_vertical_line column~ +- Inside source: true +*** True Line Result + def a_star_vertical_line column +** Processing line: ~ dijkstra_scale_up([column + (grid.width * 2) + 2, 0, column + (grid.width * 2) + 2, grid.height])~ +- Inside source: true +*** True Line Result + dijkstra_scale_up([column + (grid.width * 2) + 2, 0, column + (grid.width * 2) + 2, grid.height]) +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ # Returns a horizontal line for a column of the third grid~ +- Inside source: true +*** True Line Result + # Returns a horizontal line for a column of the third grid +** Processing line: ~ def a_star_horizontal_line row~ +- Inside source: true +*** True Line Result + def a_star_horizontal_line row +** Processing line: ~ dijkstra_scale_up([(grid.width * 2) + 2, row, (grid.width * 2) + grid.width + 2, row])~ +- Inside source: true +*** True Line Result + dijkstra_scale_up([(grid.width * 2) + 2, row, (grid.width * 2) + grid.width + 2, row]) ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -78904,14 +85771,14 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result # Renders the star on the first grid -** Processing line: ~ def render_bfs_star~ +** Processing line: ~ def render_dijkstra_star~ - Inside source: true *** True Line Result - def render_bfs_star -** Processing line: ~ outputs.sprites << [bfs_scale_up(grid.star), 'star.png']~ + def render_dijkstra_star +** Processing line: ~ outputs.sprites << [dijkstra_scale_up(grid.star), 'star.png']~ - Inside source: true *** True Line Result - outputs.sprites << [bfs_scale_up(grid.star), 'star.png'] + outputs.sprites << [dijkstra_scale_up(grid.star), 'star.png'] ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -78924,14 +85791,34 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result # Renders the star on the second grid -** Processing line: ~ def render_heuristic_star~ +** Processing line: ~ def render_greedy_star~ - Inside source: true *** True Line Result - def render_heuristic_star -** Processing line: ~ outputs.sprites << [heuristic_scale_up(grid.star), 'star.png']~ + def render_greedy_star +** Processing line: ~ outputs.sprites << [greedy_scale_up(grid.star), 'star.png']~ - Inside source: true *** True Line Result - outputs.sprites << [heuristic_scale_up(grid.star), 'star.png'] + outputs.sprites << [greedy_scale_up(grid.star), 'star.png'] +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ # Renders the star on the third grid~ +- Inside source: true +*** True Line Result + # Renders the star on the third grid +** Processing line: ~ def render_a_star_star~ +- Inside source: true +*** True Line Result + def render_a_star_star +** Processing line: ~ outputs.sprites << [a_star_scale_up(grid.star), 'star.png']~ +- Inside source: true +*** True Line Result + outputs.sprites << [a_star_scale_up(grid.star), 'star.png'] ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -78944,14 +85831,14 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result # Renders the target on the first grid -** Processing line: ~ def render_bfs_target~ +** Processing line: ~ def render_dijkstra_target~ - Inside source: true *** True Line Result - def render_bfs_target -** Processing line: ~ outputs.sprites << [bfs_scale_up(grid.target), 'target.png']~ + def render_dijkstra_target +** Processing line: ~ outputs.sprites << [dijkstra_scale_up(grid.target), 'target.png']~ - Inside source: true *** True Line Result - outputs.sprites << [bfs_scale_up(grid.target), 'target.png'] + outputs.sprites << [dijkstra_scale_up(grid.target), 'target.png'] ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -78964,14 +85851,34 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result # Renders the target on the second grid -** Processing line: ~ def render_heuristic_target~ +** Processing line: ~ def render_greedy_target~ - Inside source: true *** True Line Result - def render_heuristic_target -** Processing line: ~ outputs.sprites << [heuristic_scale_up(grid.target), 'target.png']~ + def render_greedy_target +** Processing line: ~ outputs.sprites << [greedy_scale_up(grid.target), 'target.png']~ - Inside source: true *** True Line Result - outputs.sprites << [heuristic_scale_up(grid.target), 'target.png'] + outputs.sprites << [greedy_scale_up(grid.target), 'target.png'] +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ # Renders the target on the third grid~ +- Inside source: true +*** True Line Result + # Renders the target on the third grid +** Processing line: ~ def render_a_star_target~ +- Inside source: true +*** True Line Result + def render_a_star_target +** Processing line: ~ outputs.sprites << [a_star_scale_up(grid.target), 'target.png']~ +- Inside source: true +*** True Line Result + outputs.sprites << [a_star_scale_up(grid.target), 'target.png'] ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -78984,18 +85891,18 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result # Renders the walls on the first grid -** Processing line: ~ def render_bfs_walls~ +** Processing line: ~ def render_dijkstra_walls~ - Inside source: true *** True Line Result - def render_bfs_walls + def render_dijkstra_walls ** Processing line: ~ grid.walls.each_key do | wall |~ - Inside source: true *** True Line Result grid.walls.each_key do | wall | -** Processing line: ~ outputs.solids << [bfs_scale_up(wall), wall_color]~ +** Processing line: ~ outputs.solids << [dijkstra_scale_up(wall), wall_color]~ - Inside source: true *** True Line Result - outputs.solids << [bfs_scale_up(wall), wall_color] + outputs.solids << [dijkstra_scale_up(wall), wall_color] ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -79012,18 +85919,46 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result # Renders the walls on the second grid -** Processing line: ~ def render_heuristic_walls~ +** Processing line: ~ def render_greedy_walls~ - Inside source: true *** True Line Result - def render_heuristic_walls + def render_greedy_walls ** Processing line: ~ grid.walls.each_key do | wall |~ - Inside source: true *** True Line Result grid.walls.each_key do | wall | -** Processing line: ~ outputs.solids << [heuristic_scale_up(wall), wall_color]~ +** Processing line: ~ outputs.solids << [greedy_scale_up(wall), wall_color]~ - Inside source: true *** True Line Result - outputs.solids << [heuristic_scale_up(wall), wall_color] + outputs.solids << [greedy_scale_up(wall), wall_color] +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ # Renders the walls on the third grid~ +- Inside source: true +*** True Line Result + # Renders the walls on the third grid +** Processing line: ~ def render_a_star_walls~ +- Inside source: true +*** True Line Result + def render_a_star_walls +** Processing line: ~ grid.walls.each_key do | wall |~ +- Inside source: true +*** True Line Result + grid.walls.each_key do | wall | +** Processing line: ~ outputs.solids << [a_star_scale_up(wall), wall_color]~ +- Inside source: true +*** True Line Result + outputs.solids << [a_star_scale_up(wall), wall_color] ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -79040,18 +85975,18 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result # Renders the visited cells on the first grid -** Processing line: ~ def render_bfs_visited~ +** Processing line: ~ def render_dijkstra_visited~ - Inside source: true *** True Line Result - def render_bfs_visited -** Processing line: ~ bfs.came_from.each_key do | visited_cell |~ + def render_dijkstra_visited +** Processing line: ~ dijkstra.came_from.each_key do | visited_cell |~ - Inside source: true *** True Line Result - bfs.came_from.each_key do | visited_cell | -** Processing line: ~ outputs.solids << [bfs_scale_up(visited_cell), visited_color]~ + dijkstra.came_from.each_key do | visited_cell | +** Processing line: ~ outputs.solids << [dijkstra_scale_up(visited_cell), visited_color]~ - Inside source: true *** True Line Result - outputs.solids << [bfs_scale_up(visited_cell), visited_color] + outputs.solids << [dijkstra_scale_up(visited_cell), visited_color] ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -79068,18 +86003,18 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result # Renders the visited cells on the second grid -** Processing line: ~ def render_heuristic_visited~ +** Processing line: ~ def render_greedy_visited~ - Inside source: true *** True Line Result - def render_heuristic_visited -** Processing line: ~ heuristic.came_from.each_key do | visited_cell |~ + def render_greedy_visited +** Processing line: ~ greedy.came_from.each_key do | visited_cell |~ - Inside source: true *** True Line Result - heuristic.came_from.each_key do | visited_cell | -** Processing line: ~ outputs.solids << [heuristic_scale_up(visited_cell), visited_color]~ + greedy.came_from.each_key do | visited_cell | +** Processing line: ~ outputs.solids << [greedy_scale_up(visited_cell), visited_color]~ - Inside source: true *** True Line Result - outputs.solids << [heuristic_scale_up(visited_cell), visited_color] + outputs.solids << [greedy_scale_up(visited_cell), visited_color] ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -79092,22 +86027,22 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Renders the frontier cells on the first grid~ +** Processing line: ~ # Renders the visited cells on the third grid~ - Inside source: true *** True Line Result - # Renders the frontier cells on the first grid -** Processing line: ~ def render_bfs_frontier~ + # Renders the visited cells on the third grid +** Processing line: ~ def render_a_star_visited~ - Inside source: true *** True Line Result - def render_bfs_frontier -** Processing line: ~ bfs.frontier.each do | frontier_cell |~ + def render_a_star_visited +** Processing line: ~ a_star.came_from.each_key do | visited_cell |~ - Inside source: true *** True Line Result - bfs.frontier.each do | frontier_cell | -** Processing line: ~ outputs.solids << [bfs_scale_up(frontier_cell), frontier_color, 200]~ + a_star.came_from.each_key do | visited_cell | +** Processing line: ~ outputs.solids << [a_star_scale_up(visited_cell), visited_color]~ - Inside source: true *** True Line Result - outputs.solids << [bfs_scale_up(frontier_cell), frontier_color, 200] + outputs.solids << [a_star_scale_up(visited_cell), visited_color] ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -79120,22 +86055,22 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Renders the frontier cells on the second grid~ +** Processing line: ~ # Renders the path found by the breadth first search on the first grid~ - Inside source: true *** True Line Result - # Renders the frontier cells on the second grid -** Processing line: ~ def render_heuristic_frontier~ + # Renders the path found by the breadth first search on the first grid +** Processing line: ~ def render_dijkstra_path~ - Inside source: true *** True Line Result - def render_heuristic_frontier -** Processing line: ~ heuristic.frontier.each do | frontier_cell |~ + def render_dijkstra_path +** Processing line: ~ dijkstra.path.each do | path |~ - Inside source: true *** True Line Result - heuristic.frontier.each do | frontier_cell | -** Processing line: ~ outputs.solids << [heuristic_scale_up(frontier_cell), frontier_color, 200]~ + dijkstra.path.each do | path | +** Processing line: ~ outputs.solids << [dijkstra_scale_up(path), path_color]~ - Inside source: true *** True Line Result - outputs.solids << [heuristic_scale_up(frontier_cell), frontier_color, 200] + outputs.solids << [dijkstra_scale_up(path), path_color] ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -79148,22 +86083,22 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Renders the path found by the breadth first search on the first grid~ +** Processing line: ~ # Renders the path found by the greedy search on the second grid~ - Inside source: true *** True Line Result - # Renders the path found by the breadth first search on the first grid -** Processing line: ~ def render_bfs_path~ + # Renders the path found by the greedy search on the second grid +** Processing line: ~ def render_greedy_path~ - Inside source: true *** True Line Result - def render_bfs_path -** Processing line: ~ bfs.path.each do | path |~ + def render_greedy_path +** Processing line: ~ greedy.path.each do | path |~ - Inside source: true *** True Line Result - bfs.path.each do | path | -** Processing line: ~ outputs.solids << [bfs_scale_up(path), path_color]~ + greedy.path.each do | path | +** Processing line: ~ outputs.solids << [greedy_scale_up(path), path_color]~ - Inside source: true *** True Line Result - outputs.solids << [bfs_scale_up(path), path_color] + outputs.solids << [greedy_scale_up(path), path_color] ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -79176,22 +86111,22 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Renders the path found by the heuristic search on the second grid~ +** Processing line: ~ # Renders the path found by the a_star search on the third grid~ - Inside source: true *** True Line Result - # Renders the path found by the heuristic search on the second grid -** Processing line: ~ def render_heuristic_path~ + # Renders the path found by the a_star search on the third grid +** Processing line: ~ def render_a_star_path~ - Inside source: true *** True Line Result - def render_heuristic_path -** Processing line: ~ heuristic.path.each do | path |~ + def render_a_star_path +** Processing line: ~ a_star.path.each do | path |~ - Inside source: true *** True Line Result - heuristic.path.each do | path | -** Processing line: ~ outputs.solids << [heuristic_scale_up(path), path_color]~ + a_star.path.each do | path | +** Processing line: ~ outputs.solids << [a_star_scale_up(path), path_color]~ - Inside source: true *** True Line Result - outputs.solids << [heuristic_scale_up(path), path_color] + outputs.solids << [a_star_scale_up(path), path_color] ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -79328,10 +86263,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result # This method scales up cells for the first grid -** Processing line: ~ def bfs_scale_up(cell)~ +** Processing line: ~ def dijkstra_scale_up(cell)~ - Inside source: true *** True Line Result - def bfs_scale_up(cell) + def dijkstra_scale_up(cell) ** Processing line: ~ # Prevents the original value of cell from being edited~ - Inside source: true *** True Line Result @@ -79416,10 +86351,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result # so separate methods exist for the grid lines -** Processing line: ~ def heuristic_scale_up(cell)~ +** Processing line: ~ def greedy_scale_up(cell)~ - Inside source: true *** True Line Result - def heuristic_scale_up(cell) + def greedy_scale_up(cell) ** Processing line: ~ # Prevents the original value of cell from being edited~ - Inside source: true *** True Line Result @@ -79440,10 +86375,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result # Proceeds as if scaling up for the first grid -** Processing line: ~ bfs_scale_up(cell)~ +** Processing line: ~ dijkstra_scale_up(cell)~ - Inside source: true *** True Line Result - bfs_scale_up(cell) + dijkstra_scale_up(cell) ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -79452,70 +86387,58 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Checks and handles input for the buttons~ -- Inside source: true -*** True Line Result - # Checks and handles input for the buttons -** Processing line: ~ # Called when the mouse is lifted~ -- Inside source: true -*** True Line Result - # Called when the mouse is lifted -** Processing line: ~ def input_buttons~ -- Inside source: true -*** True Line Result - def input_buttons -** Processing line: ~ input_left_button~ +** Processing line: ~ # Translates the given cell (grid.width + 1) * 2 to the right and then scales up~ - Inside source: true *** True Line Result - input_left_button -** Processing line: ~ input_center_button~ + # Translates the given cell (grid.width + 1) * 2 to the right and then scales up +** Processing line: ~ # Used to draw cells for the third grid~ - Inside source: true *** True Line Result - input_center_button -** Processing line: ~ input_right_button~ + # Used to draw cells for the third grid +** Processing line: ~ # This method does not work for lines,~ - Inside source: true *** True Line Result - input_right_button -** Processing line: ~ end~ + # This method does not work for lines, +** Processing line: ~ # so separate methods exist for the grid lines~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + # so separate methods exist for the grid lines +** Processing line: ~ def a_star_scale_up(cell)~ - Inside source: true *** True Line Result - -** Processing line: ~ # Checks if the previous step button is clicked~ + def a_star_scale_up(cell) +** Processing line: ~ # Prevents the original value of cell from being edited~ - Inside source: true *** True Line Result - # Checks if the previous step button is clicked -** Processing line: ~ # If it is, it pauses the animation and moves the search one step backward~ + # Prevents the original value of cell from being edited +** Processing line: ~ cell = cell.clone~ - Inside source: true *** True Line Result - # If it is, it pauses the animation and moves the search one step backward -** Processing line: ~ def input_left_button~ + cell = cell.clone +** Processing line: ~ # Translates the cell to the second grid equivalent~ - Inside source: true *** True Line Result - def input_left_button -** Processing line: ~ if left_button_clicked?~ + # Translates the cell to the second grid equivalent +** Processing line: ~ cell.x += grid.width + 1~ - Inside source: true *** True Line Result - if left_button_clicked? -** Processing line: ~ state.play = false~ + cell.x += grid.width + 1 +** Processing line: ~ # Translates the cell to the third grid equivalent~ - Inside source: true *** True Line Result - state.play = false -** Processing line: ~ state.current_step -= 1~ + # Translates the cell to the third grid equivalent +** Processing line: ~ cell.x += grid.width + 1~ - Inside source: true *** True Line Result - state.current_step -= 1 -** Processing line: ~ recalculate_searches~ + cell.x += grid.width + 1 +** Processing line: ~ # Proceeds as if scaling up for the first grid~ - Inside source: true *** True Line Result - recalculate_searches -** Processing line: ~ end~ + # Proceeds as if scaling up for the first grid +** Processing line: ~ dijkstra_scale_up(cell)~ - Inside source: true *** True Line Result - end + dijkstra_scale_up(cell) ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -79524,30 +86447,18 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Controls the play/pause button~ -- Inside source: true -*** True Line Result - # Controls the play/pause button -** Processing line: ~ # Inverses whether the animation is playing or not when clicked~ -- Inside source: true -*** True Line Result - # Inverses whether the animation is playing or not when clicked -** Processing line: ~ def input_center_button~ -- Inside source: true -*** True Line Result - def input_center_button -** Processing line: ~ if center_button_clicked? || inputs.keyboard.key_down.space~ +** Processing line: ~ # Signal that the user is going to be moving the star from the first grid~ - Inside source: true *** True Line Result - if center_button_clicked? || inputs.keyboard.key_down.space -** Processing line: ~ state.play = !state.play~ + # Signal that the user is going to be moving the star from the first grid +** Processing line: ~ def dijkstra_mouse_over_star?~ - Inside source: true *** True Line Result - state.play = !state.play -** Processing line: ~ end~ + def dijkstra_mouse_over_star? +** Processing line: ~ inputs.mouse.point.inside_rect?(dijkstra_scale_up(grid.star))~ - Inside source: true *** True Line Result - end + inputs.mouse.point.inside_rect?(dijkstra_scale_up(grid.star)) ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -79556,38 +86467,18 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Checks if the next step button is clicked~ -- Inside source: true -*** True Line Result - # Checks if the next step button is clicked -** Processing line: ~ # If it is, it pauses the animation and moves the search one step forward~ -- Inside source: true -*** True Line Result - # If it is, it pauses the animation and moves the search one step forward -** Processing line: ~ def input_right_button~ -- Inside source: true -*** True Line Result - def input_right_button -** Processing line: ~ if right_button_clicked?~ -- Inside source: true -*** True Line Result - if right_button_clicked? -** Processing line: ~ state.play = false~ -- Inside source: true -*** True Line Result - state.play = false -** Processing line: ~ state.current_step += 1~ +** Processing line: ~ # Signal that the user is going to be moving the star from the second grid~ - Inside source: true *** True Line Result - state.current_step += 1 -** Processing line: ~ move_searches_one_step_forward~ + # Signal that the user is going to be moving the star from the second grid +** Processing line: ~ def greedy_mouse_over_star?~ - Inside source: true *** True Line Result - move_searches_one_step_forward -** Processing line: ~ end~ + def greedy_mouse_over_star? +** Processing line: ~ inputs.mouse.point.inside_rect?(greedy_scale_up(grid.star))~ - Inside source: true *** True Line Result - end + inputs.mouse.point.inside_rect?(greedy_scale_up(grid.star)) ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -79596,18 +86487,18 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # These methods detect when the buttons are clicked~ +** Processing line: ~ # Signal that the user is going to be moving the star from the third grid~ - Inside source: true *** True Line Result - # These methods detect when the buttons are clicked -** Processing line: ~ def left_button_clicked?~ + # Signal that the user is going to be moving the star from the third grid +** Processing line: ~ def a_star_mouse_over_star?~ - Inside source: true *** True Line Result - def left_button_clicked? -** Processing line: ~ inputs.mouse.point.inside_rect?(buttons.left) && inputs.mouse.up~ + def a_star_mouse_over_star? +** Processing line: ~ inputs.mouse.point.inside_rect?(a_star_scale_up(grid.star))~ - Inside source: true *** True Line Result - inputs.mouse.point.inside_rect?(buttons.left) && inputs.mouse.up + inputs.mouse.point.inside_rect?(a_star_scale_up(grid.star)) ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -79616,30 +86507,18 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def center_button_clicked?~ -- Inside source: true -*** True Line Result - def center_button_clicked? -** Processing line: ~ inputs.mouse.point.inside_rect?(buttons.center) && inputs.mouse.up~ -- Inside source: true -*** True Line Result - inputs.mouse.point.inside_rect?(buttons.center) && inputs.mouse.up -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end -** Processing line: ~~ +** Processing line: ~ # Signal that the user is going to be moving the target from the first grid~ - Inside source: true *** True Line Result - -** Processing line: ~ def right_button_clicked?~ + # Signal that the user is going to be moving the target from the first grid +** Processing line: ~ def dijkstra_mouse_over_target?~ - Inside source: true *** True Line Result - def right_button_clicked? -** Processing line: ~ inputs.mouse.point.inside_rect?(buttons.right) && inputs.mouse.up~ + def dijkstra_mouse_over_target? +** Processing line: ~ inputs.mouse.point.inside_rect?(dijkstra_scale_up(grid.target))~ - Inside source: true *** True Line Result - inputs.mouse.point.inside_rect?(buttons.right) && inputs.mouse.up + inputs.mouse.point.inside_rect?(dijkstra_scale_up(grid.target)) ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -79648,38 +86527,18 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ # Signal that the user is going to be moving the slider~ -- Inside source: true -*** True Line Result - # Signal that the user is going to be moving the slider -** Processing line: ~ # Is the mouse over the circle of the slider?~ -- Inside source: true -*** True Line Result - # Is the mouse over the circle of the slider? -** Processing line: ~ def mouse_over_slider?~ -- Inside source: true -*** True Line Result - def mouse_over_slider? -** Processing line: ~ circle_x = (slider.x - slider.offset) + (state.current_step * slider.spacing)~ -- Inside source: true -*** True Line Result - circle_x = (slider.x - slider.offset) + (state.current_step * slider.spacing) -** Processing line: ~ circle_y = (slider.y - slider.offset)~ +** Processing line: ~ # Signal that the user is going to be moving the target from the second grid~ - Inside source: true *** True Line Result - circle_y = (slider.y - slider.offset) -** Processing line: ~ circle_rect = [circle_x, circle_y, 37, 37]~ + # Signal that the user is going to be moving the target from the second grid +** Processing line: ~ def greedy_mouse_over_target?~ - Inside source: true *** True Line Result - circle_rect = [circle_x, circle_y, 37, 37] -** Processing line: ~ inputs.mouse.point.inside_rect?(circle_rect)~ + def greedy_mouse_over_target? +** Processing line: ~ inputs.mouse.point.inside_rect?(greedy_scale_up(grid.target))~ - Inside source: true *** True Line Result - inputs.mouse.point.inside_rect?(circle_rect) + inputs.mouse.point.inside_rect?(greedy_scale_up(grid.target)) ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -79688,18 +86547,18 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Signal that the user is going to be moving the star from the first grid~ +** Processing line: ~ # Signal that the user is going to be moving the target from the third grid~ - Inside source: true *** True Line Result - # Signal that the user is going to be moving the star from the first grid -** Processing line: ~ def bfs_mouse_over_star?~ + # Signal that the user is going to be moving the target from the third grid +** Processing line: ~ def a_star_mouse_over_target?~ - Inside source: true *** True Line Result - def bfs_mouse_over_star? -** Processing line: ~ inputs.mouse.point.inside_rect?(bfs_scale_up(grid.star))~ + def a_star_mouse_over_target? +** Processing line: ~ inputs.mouse.point.inside_rect?(a_star_scale_up(grid.target))~ - Inside source: true *** True Line Result - inputs.mouse.point.inside_rect?(bfs_scale_up(grid.star)) + inputs.mouse.point.inside_rect?(a_star_scale_up(grid.target)) ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -79708,58 +86567,34 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Signal that the user is going to be moving the star from the second grid~ -- Inside source: true -*** True Line Result - # Signal that the user is going to be moving the star from the second grid -** Processing line: ~ def heuristic_mouse_over_star?~ -- Inside source: true -*** True Line Result - def heuristic_mouse_over_star? -** Processing line: ~ inputs.mouse.point.inside_rect?(heuristic_scale_up(grid.star))~ -- Inside source: true -*** True Line Result - inputs.mouse.point.inside_rect?(heuristic_scale_up(grid.star)) -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end -** Processing line: ~~ +** Processing line: ~ # Signal that the user is going to be removing walls from the first grid~ - Inside source: true *** True Line Result - -** Processing line: ~ # Signal that the user is going to be moving the target from the first grid~ + # Signal that the user is going to be removing walls from the first grid +** Processing line: ~ def dijkstra_mouse_over_wall?~ - Inside source: true *** True Line Result - # Signal that the user is going to be moving the target from the first grid -** Processing line: ~ def bfs_mouse_over_target?~ + def dijkstra_mouse_over_wall? +** Processing line: ~ grid.walls.each_key do | wall |~ - Inside source: true *** True Line Result - def bfs_mouse_over_target? -** Processing line: ~ inputs.mouse.point.inside_rect?(bfs_scale_up(grid.target))~ + grid.walls.each_key do | wall | +** Processing line: ~ return true if inputs.mouse.point.inside_rect?(dijkstra_scale_up(wall))~ - Inside source: true *** True Line Result - inputs.mouse.point.inside_rect?(bfs_scale_up(grid.target)) -** Processing line: ~ end~ + return true if inputs.mouse.point.inside_rect?(dijkstra_scale_up(wall)) +** Processing line: ~ end~ - Inside source: true *** True Line Result - end + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Signal that the user is going to be moving the target from the second grid~ -- Inside source: true -*** True Line Result - # Signal that the user is going to be moving the target from the second grid -** Processing line: ~ def heuristic_mouse_over_target?~ -- Inside source: true -*** True Line Result - def heuristic_mouse_over_target? -** Processing line: ~ inputs.mouse.point.inside_rect?(heuristic_scale_up(grid.target))~ +** Processing line: ~ false~ - Inside source: true *** True Line Result - inputs.mouse.point.inside_rect?(heuristic_scale_up(grid.target)) + false ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -79768,22 +86603,22 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Signal that the user is going to be removing walls from the first grid~ +** Processing line: ~ # Signal that the user is going to be removing walls from the second grid~ - Inside source: true *** True Line Result - # Signal that the user is going to be removing walls from the first grid -** Processing line: ~ def bfs_mouse_over_wall?~ + # Signal that the user is going to be removing walls from the second grid +** Processing line: ~ def greedy_mouse_over_wall?~ - Inside source: true *** True Line Result - def bfs_mouse_over_wall? + def greedy_mouse_over_wall? ** Processing line: ~ grid.walls.each_key do | wall |~ - Inside source: true *** True Line Result grid.walls.each_key do | wall | -** Processing line: ~ return true if inputs.mouse.point.inside_rect?(bfs_scale_up(wall))~ +** Processing line: ~ return true if inputs.mouse.point.inside_rect?(greedy_scale_up(wall))~ - Inside source: true *** True Line Result - return true if inputs.mouse.point.inside_rect?(bfs_scale_up(wall)) + return true if inputs.mouse.point.inside_rect?(greedy_scale_up(wall)) ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -79804,22 +86639,22 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Signal that the user is going to be removing walls from the second grid~ +** Processing line: ~ # Signal that the user is going to be removing walls from the third grid~ - Inside source: true *** True Line Result - # Signal that the user is going to be removing walls from the second grid -** Processing line: ~ def heuristic_mouse_over_wall?~ + # Signal that the user is going to be removing walls from the third grid +** Processing line: ~ def a_star_mouse_over_wall?~ - Inside source: true *** True Line Result - def heuristic_mouse_over_wall? + def a_star_mouse_over_wall? ** Processing line: ~ grid.walls.each_key do | wall |~ - Inside source: true *** True Line Result grid.walls.each_key do | wall | -** Processing line: ~ return true if inputs.mouse.point.inside_rect?(heuristic_scale_up(wall))~ +** Processing line: ~ return true if inputs.mouse.point.inside_rect?(a_star_scale_up(wall))~ - Inside source: true *** True Line Result - return true if inputs.mouse.point.inside_rect?(heuristic_scale_up(wall)) + return true if inputs.mouse.point.inside_rect?(a_star_scale_up(wall)) ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -79844,14 +86679,14 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result # Signal that the user is going to be adding walls from the first grid -** Processing line: ~ def bfs_mouse_over_grid?~ +** Processing line: ~ def dijkstra_mouse_over_grid?~ - Inside source: true *** True Line Result - def bfs_mouse_over_grid? -** Processing line: ~ inputs.mouse.point.inside_rect?(bfs_scale_up(grid.rect))~ + def dijkstra_mouse_over_grid? +** Processing line: ~ inputs.mouse.point.inside_rect?(dijkstra_scale_up(grid.rect))~ - Inside source: true *** True Line Result - inputs.mouse.point.inside_rect?(bfs_scale_up(grid.rect)) + inputs.mouse.point.inside_rect?(dijkstra_scale_up(grid.rect)) ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -79864,14 +86699,14 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result # Signal that the user is going to be adding walls from the second grid -** Processing line: ~ def heuristic_mouse_over_grid?~ +** Processing line: ~ def greedy_mouse_over_grid?~ - Inside source: true *** True Line Result - def heuristic_mouse_over_grid? -** Processing line: ~ inputs.mouse.point.inside_rect?(heuristic_scale_up(grid.rect))~ + def greedy_mouse_over_grid? +** Processing line: ~ inputs.mouse.point.inside_rect?(greedy_scale_up(grid.rect))~ - Inside source: true *** True Line Result - inputs.mouse.point.inside_rect?(heuristic_scale_up(grid.rect)) + inputs.mouse.point.inside_rect?(greedy_scale_up(grid.rect)) ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -79880,74 +86715,70 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # This method is called when the user is editing the slider~ -- Inside source: true -*** True Line Result - # This method is called when the user is editing the slider -** Processing line: ~ # It pauses the animation and moves the white circle to the closest integer point~ +** Processing line: ~ # Signal that the user is going to be adding walls from the third grid~ - Inside source: true *** True Line Result - # It pauses the animation and moves the white circle to the closest integer point -** Processing line: ~ # on the slider~ + # Signal that the user is going to be adding walls from the third grid +** Processing line: ~ def a_star_mouse_over_grid?~ - Inside source: true *** True Line Result - # on the slider -** Processing line: ~ # Changes the step of the search to be animated~ + def a_star_mouse_over_grid? +** Processing line: ~ inputs.mouse.point.inside_rect?(a_star_scale_up(grid.rect))~ - Inside source: true *** True Line Result - # Changes the step of the search to be animated -** Processing line: ~ def process_input_slider~ + inputs.mouse.point.inside_rect?(a_star_scale_up(grid.rect)) +** Processing line: ~ end~ - Inside source: true *** True Line Result - def process_input_slider -** Processing line: ~ state.play = false~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - state.play = false -** Processing line: ~ mouse_x = inputs.mouse.point.x~ + +** Processing line: ~ # Moves the star to the cell closest to the mouse in the first grid~ - Inside source: true *** True Line Result - mouse_x = inputs.mouse.point.x -** Processing line: ~~ + # Moves the star to the cell closest to the mouse in the first grid +** Processing line: ~ # Only resets the search if the star changes position~ - Inside source: true *** True Line Result - -** Processing line: ~ # Bounds the mouse_x to the closest x value on the slider line~ + # Only resets the search if the star changes position +** Processing line: ~ # Called whenever the user is editing the star (puts mouse down on star)~ - Inside source: true *** True Line Result - # Bounds the mouse_x to the closest x value on the slider line -** Processing line: ~ mouse_x = slider.x if mouse_x < slider.x~ + # Called whenever the user is editing the star (puts mouse down on star) +** Processing line: ~ def process_input_dijkstra_star~ - Inside source: true *** True Line Result - mouse_x = slider.x if mouse_x < slider.x -** Processing line: ~ mouse_x = slider.x + slider.w if mouse_x > slider.x + slider.w~ + def process_input_dijkstra_star +** Processing line: ~ old_star = grid.star.clone~ - Inside source: true *** True Line Result - mouse_x = slider.x + slider.w if mouse_x > slider.x + slider.w -** Processing line: ~~ + old_star = grid.star.clone +** Processing line: ~ unless dijkstra_cell_closest_to_mouse == grid.target~ - Inside source: true *** True Line Result - -** Processing line: ~ # Sets the current search step to the one represented by the mouse x value~ + unless dijkstra_cell_closest_to_mouse == grid.target +** Processing line: ~ grid.star = dijkstra_cell_closest_to_mouse~ - Inside source: true *** True Line Result - # Sets the current search step to the one represented by the mouse x value -** Processing line: ~ # The slider's circle moves due to the render_slider method using anim_steps~ + grid.star = dijkstra_cell_closest_to_mouse +** Processing line: ~ end~ - Inside source: true *** True Line Result - # The slider's circle moves due to the render_slider method using anim_steps -** Processing line: ~ state.current_step = ((mouse_x - slider.x) / slider.spacing).to_i~ + end +** Processing line: ~ unless old_star == grid.star~ - Inside source: true *** True Line Result - state.current_step = ((mouse_x - slider.x) / slider.spacing).to_i -** Processing line: ~~ + unless old_star == grid.star +** Processing line: ~ reset_searches~ - Inside source: true *** True Line Result - -** Processing line: ~ recalculate_searches~ + reset_searches +** Processing line: ~ end~ - Inside source: true *** True Line Result - recalculate_searches + end ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -79956,10 +86787,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Moves the star to the cell closest to the mouse in the first grid~ +** Processing line: ~ # Moves the star to the cell closest to the mouse in the second grid~ - Inside source: true *** True Line Result - # Moves the star to the cell closest to the mouse in the first grid + # Moves the star to the cell closest to the mouse in the second grid ** Processing line: ~ # Only resets the search if the star changes position~ - Inside source: true *** True Line Result @@ -79968,22 +86799,22 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result # Called whenever the user is editing the star (puts mouse down on star) -** Processing line: ~ def process_input_bfs_star~ +** Processing line: ~ def process_input_greedy_star~ - Inside source: true *** True Line Result - def process_input_bfs_star + def process_input_greedy_star ** Processing line: ~ old_star = grid.star.clone~ - Inside source: true *** True Line Result old_star = grid.star.clone -** Processing line: ~ unless bfs_cell_closest_to_mouse == grid.target~ +** Processing line: ~ unless greedy_cell_closest_to_mouse == grid.target~ - Inside source: true *** True Line Result - unless bfs_cell_closest_to_mouse == grid.target -** Processing line: ~ grid.star = bfs_cell_closest_to_mouse~ + unless greedy_cell_closest_to_mouse == grid.target +** Processing line: ~ grid.star = greedy_cell_closest_to_mouse~ - Inside source: true *** True Line Result - grid.star = bfs_cell_closest_to_mouse + grid.star = greedy_cell_closest_to_mouse ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -79992,10 +86823,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result unless old_star == grid.star -** Processing line: ~ recalculate_searches~ +** Processing line: ~ reset_searches~ - Inside source: true *** True Line Result - recalculate_searches + reset_searches ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -80008,10 +86839,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Moves the star to the cell closest to the mouse in the second grid~ +** Processing line: ~ # Moves the star to the cell closest to the mouse in the third grid~ - Inside source: true *** True Line Result - # Moves the star to the cell closest to the mouse in the second grid + # Moves the star to the cell closest to the mouse in the third grid ** Processing line: ~ # Only resets the search if the star changes position~ - Inside source: true *** True Line Result @@ -80020,22 +86851,22 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result # Called whenever the user is editing the star (puts mouse down on star) -** Processing line: ~ def process_input_heuristic_star~ +** Processing line: ~ def process_input_a_star_star~ - Inside source: true *** True Line Result - def process_input_heuristic_star + def process_input_a_star_star ** Processing line: ~ old_star = grid.star.clone~ - Inside source: true *** True Line Result old_star = grid.star.clone -** Processing line: ~ unless heuristic_cell_closest_to_mouse == grid.target~ +** Processing line: ~ unless a_star_cell_closest_to_mouse == grid.target~ - Inside source: true *** True Line Result - unless heuristic_cell_closest_to_mouse == grid.target -** Processing line: ~ grid.star = heuristic_cell_closest_to_mouse~ + unless a_star_cell_closest_to_mouse == grid.target +** Processing line: ~ grid.star = a_star_cell_closest_to_mouse~ - Inside source: true *** True Line Result - grid.star = heuristic_cell_closest_to_mouse + grid.star = a_star_cell_closest_to_mouse ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -80044,10 +86875,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result unless old_star == grid.star -** Processing line: ~ recalculate_searches~ +** Processing line: ~ reset_searches~ - Inside source: true *** True Line Result - recalculate_searches + reset_searches ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -80064,30 +86895,30 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result # Moves the target to the grid closest to the mouse in the first grid -** Processing line: ~ # Only recalculate_searchess the search if the target changes position~ +** Processing line: ~ # Only reset_searchess the search if the target changes position~ - Inside source: true *** True Line Result - # Only recalculate_searchess the search if the target changes position + # Only reset_searchess the search if the target changes position ** Processing line: ~ # Called whenever the user is editing the target (puts mouse down on target)~ - Inside source: true *** True Line Result # Called whenever the user is editing the target (puts mouse down on target) -** Processing line: ~ def process_input_bfs_target~ +** Processing line: ~ def process_input_dijkstra_target~ - Inside source: true *** True Line Result - def process_input_bfs_target + def process_input_dijkstra_target ** Processing line: ~ old_target = grid.target.clone~ - Inside source: true *** True Line Result old_target = grid.target.clone -** Processing line: ~ unless bfs_cell_closest_to_mouse == grid.star~ +** Processing line: ~ unless dijkstra_cell_closest_to_mouse == grid.star~ - Inside source: true *** True Line Result - unless bfs_cell_closest_to_mouse == grid.star -** Processing line: ~ grid.target = bfs_cell_closest_to_mouse~ + unless dijkstra_cell_closest_to_mouse == grid.star +** Processing line: ~ grid.target = dijkstra_cell_closest_to_mouse~ - Inside source: true *** True Line Result - grid.target = bfs_cell_closest_to_mouse + grid.target = dijkstra_cell_closest_to_mouse ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -80096,10 +86927,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result unless old_target == grid.target -** Processing line: ~ recalculate_searches~ +** Processing line: ~ reset_searches~ - Inside source: true *** True Line Result - recalculate_searches + reset_searches ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -80116,30 +86947,30 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result # Moves the target to the cell closest to the mouse in the second grid -** Processing line: ~ # Only recalculate_searchess the search if the target changes position~ +** Processing line: ~ # Only reset_searchess the search if the target changes position~ - Inside source: true *** True Line Result - # Only recalculate_searchess the search if the target changes position + # Only reset_searchess the search if the target changes position ** Processing line: ~ # Called whenever the user is editing the target (puts mouse down on target)~ - Inside source: true *** True Line Result # Called whenever the user is editing the target (puts mouse down on target) -** Processing line: ~ def process_input_heuristic_target~ +** Processing line: ~ def process_input_greedy_target~ - Inside source: true *** True Line Result - def process_input_heuristic_target + def process_input_greedy_target ** Processing line: ~ old_target = grid.target.clone~ - Inside source: true *** True Line Result old_target = grid.target.clone -** Processing line: ~ unless heuristic_cell_closest_to_mouse == grid.star~ +** Processing line: ~ unless greedy_cell_closest_to_mouse == grid.star~ - Inside source: true *** True Line Result - unless heuristic_cell_closest_to_mouse == grid.star -** Processing line: ~ grid.target = heuristic_cell_closest_to_mouse~ + unless greedy_cell_closest_to_mouse == grid.star +** Processing line: ~ grid.target = greedy_cell_closest_to_mouse~ - Inside source: true *** True Line Result - grid.target = heuristic_cell_closest_to_mouse + grid.target = greedy_cell_closest_to_mouse ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -80148,10 +86979,62 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result unless old_target == grid.target -** Processing line: ~ recalculate_searches~ +** Processing line: ~ reset_searches~ - Inside source: true *** True Line Result - recalculate_searches + reset_searches +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ # Moves the target to the cell closest to the mouse in the third grid~ +- Inside source: true +*** True Line Result + # Moves the target to the cell closest to the mouse in the third grid +** Processing line: ~ # Only reset_searchess the search if the target changes position~ +- Inside source: true +*** True Line Result + # Only reset_searchess the search if the target changes position +** Processing line: ~ # Called whenever the user is editing the target (puts mouse down on target)~ +- Inside source: true +*** True Line Result + # Called whenever the user is editing the target (puts mouse down on target) +** Processing line: ~ def process_input_a_star_target~ +- Inside source: true +*** True Line Result + def process_input_a_star_target +** Processing line: ~ old_target = grid.target.clone~ +- Inside source: true +*** True Line Result + old_target = grid.target.clone +** Processing line: ~ unless a_star_cell_closest_to_mouse == grid.star~ +- Inside source: true +*** True Line Result + unless a_star_cell_closest_to_mouse == grid.star +** Processing line: ~ grid.target = a_star_cell_closest_to_mouse~ +- Inside source: true +*** True Line Result + grid.target = a_star_cell_closest_to_mouse +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~ unless old_target == grid.target~ +- Inside source: true +*** True Line Result + unless old_target == grid.target +** Processing line: ~ reset_searches~ +- Inside source: true +*** True Line Result + reset_searches ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -80168,10 +87051,114 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result # Removes walls in the first grid that are under the cursor -** Processing line: ~ def process_input_bfs_remove_wall~ +** Processing line: ~ def process_input_dijkstra_remove_wall~ +- Inside source: true +*** True Line Result + def process_input_dijkstra_remove_wall +** Processing line: ~ # The mouse needs to be inside the grid, because we only want to remove walls~ +- Inside source: true +*** True Line Result + # The mouse needs to be inside the grid, because we only want to remove walls +** Processing line: ~ # the cursor is directly over~ +- Inside source: true +*** True Line Result + # the cursor is directly over +** Processing line: ~ # Recalculations should only occur when a wall is actually deleted~ +- Inside source: true +*** True Line Result + # Recalculations should only occur when a wall is actually deleted +** Processing line: ~ if dijkstra_mouse_over_grid?~ +- Inside source: true +*** True Line Result + if dijkstra_mouse_over_grid? +** Processing line: ~ if grid.walls.has_key?(dijkstra_cell_closest_to_mouse)~ +- Inside source: true +*** True Line Result + if grid.walls.has_key?(dijkstra_cell_closest_to_mouse) +** Processing line: ~ grid.walls.delete(dijkstra_cell_closest_to_mouse)~ +- Inside source: true +*** True Line Result + grid.walls.delete(dijkstra_cell_closest_to_mouse) +** Processing line: ~ reset_searches~ +- Inside source: true +*** True Line Result + reset_searches +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ # Removes walls in the second grid that are under the cursor~ +- Inside source: true +*** True Line Result + # Removes walls in the second grid that are under the cursor +** Processing line: ~ def process_input_greedy_remove_wall~ +- Inside source: true +*** True Line Result + def process_input_greedy_remove_wall +** Processing line: ~ # The mouse needs to be inside the grid, because we only want to remove walls~ +- Inside source: true +*** True Line Result + # The mouse needs to be inside the grid, because we only want to remove walls +** Processing line: ~ # the cursor is directly over~ +- Inside source: true +*** True Line Result + # the cursor is directly over +** Processing line: ~ # Recalculations should only occur when a wall is actually deleted~ +- Inside source: true +*** True Line Result + # Recalculations should only occur when a wall is actually deleted +** Processing line: ~ if greedy_mouse_over_grid?~ +- Inside source: true +*** True Line Result + if greedy_mouse_over_grid? +** Processing line: ~ if grid.walls.has_key?(greedy_cell_closest_to_mouse)~ +- Inside source: true +*** True Line Result + if grid.walls.has_key?(greedy_cell_closest_to_mouse) +** Processing line: ~ grid.walls.delete(greedy_cell_closest_to_mouse)~ +- Inside source: true +*** True Line Result + grid.walls.delete(greedy_cell_closest_to_mouse) +** Processing line: ~ reset_searches~ +- Inside source: true +*** True Line Result + reset_searches +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ # Removes walls in the third grid that are under the cursor~ +- Inside source: true +*** True Line Result + # Removes walls in the third grid that are under the cursor +** Processing line: ~ def process_input_a_star_remove_wall~ - Inside source: true *** True Line Result - def process_input_bfs_remove_wall + def process_input_a_star_remove_wall ** Processing line: ~ # The mouse needs to be inside the grid, because we only want to remove walls~ - Inside source: true *** True Line Result @@ -80184,22 +87171,22 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result # Recalculations should only occur when a wall is actually deleted -** Processing line: ~ if bfs_mouse_over_grid?~ +** Processing line: ~ if a_star_mouse_over_grid?~ - Inside source: true *** True Line Result - if bfs_mouse_over_grid? -** Processing line: ~ if grid.walls.has_key?(bfs_cell_closest_to_mouse)~ + if a_star_mouse_over_grid? +** Processing line: ~ if grid.walls.has_key?(a_star_cell_closest_to_mouse)~ - Inside source: true *** True Line Result - if grid.walls.has_key?(bfs_cell_closest_to_mouse) -** Processing line: ~ grid.walls.delete(bfs_cell_closest_to_mouse)~ + if grid.walls.has_key?(a_star_cell_closest_to_mouse) +** Processing line: ~ grid.walls.delete(a_star_cell_closest_to_mouse)~ - Inside source: true *** True Line Result - grid.walls.delete(bfs_cell_closest_to_mouse) -** Processing line: ~ recalculate_searches~ + grid.walls.delete(a_star_cell_closest_to_mouse) +** Processing line: ~ reset_searches~ - Inside source: true *** True Line Result - recalculate_searches + reset_searches ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -80216,42 +87203,30 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Removes walls in the second grid that are under the cursor~ -- Inside source: true -*** True Line Result - # Removes walls in the second grid that are under the cursor -** Processing line: ~ def process_input_heuristic_remove_wall~ -- Inside source: true -*** True Line Result - def process_input_heuristic_remove_wall -** Processing line: ~ # The mouse needs to be inside the grid, because we only want to remove walls~ -- Inside source: true -*** True Line Result - # The mouse needs to be inside the grid, because we only want to remove walls -** Processing line: ~ # the cursor is directly over~ +** Processing line: ~ # Adds a wall in the first grid in the cell the mouse is over~ - Inside source: true *** True Line Result - # the cursor is directly over -** Processing line: ~ # Recalculations should only occur when a wall is actually deleted~ + # Adds a wall in the first grid in the cell the mouse is over +** Processing line: ~ def process_input_dijkstra_add_wall~ - Inside source: true *** True Line Result - # Recalculations should only occur when a wall is actually deleted -** Processing line: ~ if heuristic_mouse_over_grid?~ + def process_input_dijkstra_add_wall +** Processing line: ~ if dijkstra_mouse_over_grid?~ - Inside source: true *** True Line Result - if heuristic_mouse_over_grid? -** Processing line: ~ if grid.walls.has_key?(heuristic_cell_closest_to_mouse)~ + if dijkstra_mouse_over_grid? +** Processing line: ~ unless grid.walls.has_key?(dijkstra_cell_closest_to_mouse)~ - Inside source: true *** True Line Result - if grid.walls.has_key?(heuristic_cell_closest_to_mouse) -** Processing line: ~ grid.walls.delete(heuristic_cell_closest_to_mouse)~ + unless grid.walls.has_key?(dijkstra_cell_closest_to_mouse) +** Processing line: ~ grid.walls[dijkstra_cell_closest_to_mouse] = true~ - Inside source: true *** True Line Result - grid.walls.delete(heuristic_cell_closest_to_mouse) -** Processing line: ~ recalculate_searches~ + grid.walls[dijkstra_cell_closest_to_mouse] = true +** Processing line: ~ reset_searches~ - Inside source: true *** True Line Result - recalculate_searches + reset_searches ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -80264,30 +87239,34 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result end -** Processing line: ~ # Adds a wall in the first grid in the cell the mouse is over~ +** Processing line: ~~ - Inside source: true *** True Line Result - # Adds a wall in the first grid in the cell the mouse is over -** Processing line: ~ def process_input_bfs_add_wall~ + +** Processing line: ~ # Adds a wall in the second grid in the cell the mouse is over~ - Inside source: true *** True Line Result - def process_input_bfs_add_wall -** Processing line: ~ if bfs_mouse_over_grid?~ + # Adds a wall in the second grid in the cell the mouse is over +** Processing line: ~ def process_input_greedy_add_wall~ - Inside source: true *** True Line Result - if bfs_mouse_over_grid? -** Processing line: ~ unless grid.walls.has_key?(bfs_cell_closest_to_mouse)~ + def process_input_greedy_add_wall +** Processing line: ~ if greedy_mouse_over_grid?~ - Inside source: true *** True Line Result - unless grid.walls.has_key?(bfs_cell_closest_to_mouse) -** Processing line: ~ grid.walls[bfs_cell_closest_to_mouse] = true~ + if greedy_mouse_over_grid? +** Processing line: ~ unless grid.walls.has_key?(greedy_cell_closest_to_mouse)~ - Inside source: true *** True Line Result - grid.walls[bfs_cell_closest_to_mouse] = true -** Processing line: ~ recalculate_searches~ + unless grid.walls.has_key?(greedy_cell_closest_to_mouse) +** Processing line: ~ grid.walls[greedy_cell_closest_to_mouse] = true~ - Inside source: true *** True Line Result - recalculate_searches + grid.walls[greedy_cell_closest_to_mouse] = true +** Processing line: ~ reset_searches~ +- Inside source: true +*** True Line Result + reset_searches ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -80304,30 +87283,30 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Adds a wall in the second grid in the cell the mouse is over~ +** Processing line: ~ # Adds a wall in the third grid in the cell the mouse is over~ - Inside source: true *** True Line Result - # Adds a wall in the second grid in the cell the mouse is over -** Processing line: ~ def process_input_heuristic_add_wall~ + # Adds a wall in the third grid in the cell the mouse is over +** Processing line: ~ def process_input_a_star_add_wall~ - Inside source: true *** True Line Result - def process_input_heuristic_add_wall -** Processing line: ~ if heuristic_mouse_over_grid?~ + def process_input_a_star_add_wall +** Processing line: ~ if a_star_mouse_over_grid?~ - Inside source: true *** True Line Result - if heuristic_mouse_over_grid? -** Processing line: ~ unless grid.walls.has_key?(heuristic_cell_closest_to_mouse)~ + if a_star_mouse_over_grid? +** Processing line: ~ unless grid.walls.has_key?(a_star_cell_closest_to_mouse)~ - Inside source: true *** True Line Result - unless grid.walls.has_key?(heuristic_cell_closest_to_mouse) -** Processing line: ~ grid.walls[heuristic_cell_closest_to_mouse] = true~ + unless grid.walls.has_key?(a_star_cell_closest_to_mouse) +** Processing line: ~ grid.walls[a_star_cell_closest_to_mouse] = true~ - Inside source: true *** True Line Result - grid.walls[heuristic_cell_closest_to_mouse] = true -** Processing line: ~ recalculate_searches~ + grid.walls[a_star_cell_closest_to_mouse] = true +** Processing line: ~ reset_searches~ - Inside source: true *** True Line Result - recalculate_searches + reset_searches ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -80356,10 +87335,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result # Finding the cell closest to the mouse helps with this -** Processing line: ~ def bfs_cell_closest_to_mouse~ +** Processing line: ~ def dijkstra_cell_closest_to_mouse~ - Inside source: true *** True Line Result - def bfs_cell_closest_to_mouse + def dijkstra_cell_closest_to_mouse ** Processing line: ~ # Closest cell to the mouse in the first grid~ - Inside source: true *** True Line Result @@ -80412,10 +87391,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result # Finding the cell closest to the mouse in the second grid helps with this -** Processing line: ~ def heuristic_cell_closest_to_mouse~ +** Processing line: ~ def greedy_cell_closest_to_mouse~ - Inside source: true *** True Line Result - def heuristic_cell_closest_to_mouse + def greedy_cell_closest_to_mouse ** Processing line: ~ # Closest cell grid to the mouse in the second~ - Inside source: true *** True Line Result @@ -80472,50 +87451,70 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def recalculate_searches~ +** Processing line: ~ # When the user grabs the star and puts their cursor to the far right~ - Inside source: true *** True Line Result - def recalculate_searches -** Processing line: ~ # Reset the searches~ + # When the user grabs the star and puts their cursor to the far right +** Processing line: ~ # and moves up and down, the star is supposed to move along the grid as well~ - Inside source: true *** True Line Result - # Reset the searches -** Processing line: ~ bfs.came_from = {}~ + # and moves up and down, the star is supposed to move along the grid as well +** Processing line: ~ # Finding the cell closest to the mouse in the third grid helps with this~ - Inside source: true *** True Line Result - bfs.came_from = {} -** Processing line: ~ bfs.frontier = []~ + # Finding the cell closest to the mouse in the third grid helps with this +** Processing line: ~ def a_star_cell_closest_to_mouse~ - Inside source: true *** True Line Result - bfs.frontier = [] -** Processing line: ~ bfs.path = []~ + def a_star_cell_closest_to_mouse +** Processing line: ~ # Closest cell grid to the mouse in the second~ - Inside source: true *** True Line Result - bfs.path = [] -** Processing line: ~ heuristic.came_from = {}~ + # Closest cell grid to the mouse in the second +** Processing line: ~ x = (inputs.mouse.point.x / grid.cell_size).to_i~ - Inside source: true *** True Line Result - heuristic.came_from = {} -** Processing line: ~ heuristic.frontier = []~ + x = (inputs.mouse.point.x / grid.cell_size).to_i +** Processing line: ~ y = (inputs.mouse.point.y / grid.cell_size).to_i~ - Inside source: true *** True Line Result - heuristic.frontier = [] -** Processing line: ~ heuristic.path = []~ + y = (inputs.mouse.point.y / grid.cell_size).to_i +** Processing line: ~ # Translate the cell to the first grid~ - Inside source: true *** True Line Result - heuristic.path = [] -** Processing line: ~~ + # Translate the cell to the first grid +** Processing line: ~ x -= (grid.width + 1) * 2~ - Inside source: true *** True Line Result - -** Processing line: ~ # Move the searches forward to the current step~ + x -= (grid.width + 1) * 2 +** Processing line: ~ # Bound x and y to the first grid~ - Inside source: true *** True Line Result - # Move the searches forward to the current step -** Processing line: ~ state.current_step.times { move_searches_one_step_forward }~ + # Bound x and y to the first grid +** Processing line: ~ x = 0 if x < 0~ - Inside source: true *** True Line Result - state.current_step.times { move_searches_one_step_forward } + x = 0 if x < 0 +** Processing line: ~ y = 0 if y < 0~ +- Inside source: true +*** True Line Result + y = 0 if y < 0 +** Processing line: ~ x = grid.width - 1 if x > grid.width - 1~ +- Inside source: true +*** True Line Result + x = grid.width - 1 if x > grid.width - 1 +** Processing line: ~ y = grid.height - 1 if y > grid.height - 1~ +- Inside source: true +*** True Line Result + y = grid.height - 1 if y > grid.height - 1 +** Processing line: ~ # Return closest cell~ +- Inside source: true +*** True Line Result + # Return closest cell +** Processing line: ~ [x, y]~ +- Inside source: true +*** True Line Result + [x, y] ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -80524,18 +87523,58 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def move_searches_one_step_forward~ +** Processing line: ~ def reset_searches~ - Inside source: true *** True Line Result - def move_searches_one_step_forward -** Processing line: ~ bfs_one_step_forward~ + def reset_searches +** Processing line: ~ # Reset the searches~ - Inside source: true *** True Line Result - bfs_one_step_forward -** Processing line: ~ heuristic_one_step_forward~ + # Reset the searches +** Processing line: ~ dijkstra.came_from = {}~ - Inside source: true *** True Line Result - heuristic_one_step_forward + dijkstra.came_from = {} +** Processing line: ~ dijkstra.cost_so_far = {}~ +- Inside source: true +*** True Line Result + dijkstra.cost_so_far = {} +** Processing line: ~ dijkstra.frontier = []~ +- Inside source: true +*** True Line Result + dijkstra.frontier = [] +** Processing line: ~ dijkstra.path = []~ +- Inside source: true +*** True Line Result + dijkstra.path = [] +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ greedy.came_from = {}~ +- Inside source: true +*** True Line Result + greedy.came_from = {} +** Processing line: ~ greedy.frontier = []~ +- Inside source: true +*** True Line Result + greedy.frontier = [] +** Processing line: ~ greedy.path = []~ +- Inside source: true +*** True Line Result + greedy.path = [] +** Processing line: ~ a_star.came_from = {}~ +- Inside source: true +*** True Line Result + a_star.came_from = {} +** Processing line: ~ a_star.frontier = []~ +- Inside source: true +*** True Line Result + a_star.frontier = [] +** Processing line: ~ a_star.path = []~ +- Inside source: true +*** True Line Result + a_star.path = [] ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -80544,86 +87583,110 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def bfs_one_step_forward~ +** Processing line: ~ def calc_searches~ - Inside source: true *** True Line Result - def bfs_one_step_forward -** Processing line: ~ return if bfs.came_from.has_key?(grid.target)~ + def calc_searches +** Processing line: ~ calc_dijkstra~ - Inside source: true *** True Line Result - return if bfs.came_from.has_key?(grid.target) + calc_dijkstra +** Processing line: ~ calc_greedy~ +- Inside source: true +*** True Line Result + calc_greedy +** Processing line: ~ calc_a_star~ +- Inside source: true +*** True Line Result + calc_a_star +** Processing line: ~ # Move the searches forward to the current step~ +- Inside source: true +*** True Line Result + # Move the searches forward to the current step +** Processing line: ~ # state.current_step.times { move_searches_one_step_forward }~ +- Inside source: true +*** True Line Result + # state.current_step.times { move_searches_one_step_forward } +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Only runs at the beginning of the search as setup.~ +** Processing line: ~ def calc_dijkstra~ - Inside source: true *** True Line Result - # Only runs at the beginning of the search as setup. -** Processing line: ~ if bfs.came_from.empty?~ + def calc_dijkstra +** Processing line: ~ # Sets up the search to begin from the star~ - Inside source: true *** True Line Result - if bfs.came_from.empty? -** Processing line: ~ bfs.frontier << grid.star~ + # Sets up the search to begin from the star +** Processing line: ~ dijkstra.frontier << grid.star~ - Inside source: true *** True Line Result - bfs.frontier << grid.star -** Processing line: ~ bfs.came_from[grid.star] = nil~ + dijkstra.frontier << grid.star +** Processing line: ~ dijkstra.came_from[grid.star] = nil~ - Inside source: true *** True Line Result - bfs.came_from[grid.star] = nil -** Processing line: ~ end~ + dijkstra.came_from[grid.star] = nil +** Processing line: ~ dijkstra.cost_so_far[grid.star] = 0~ - Inside source: true *** True Line Result - end + dijkstra.cost_so_far[grid.star] = 0 ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # A step in the search~ +** Processing line: ~ # Until the target is found or there are no more cells to explore from~ - Inside source: true *** True Line Result - # A step in the search -** Processing line: ~ unless bfs.frontier.empty?~ + # Until the target is found or there are no more cells to explore from +** Processing line: ~ until dijkstra.came_from.has_key?(grid.target) or dijkstra.frontier.empty?~ - Inside source: true *** True Line Result - unless bfs.frontier.empty? -** Processing line: ~ # Takes the next frontier cell~ + until dijkstra.came_from.has_key?(grid.target) or dijkstra.frontier.empty? +** Processing line: ~ # Take the next frontier cell. The first element is the cell, the second is the priority.~ - Inside source: true *** True Line Result - # Takes the next frontier cell -** Processing line: ~ new_frontier = bfs.frontier.shift~ + # Take the next frontier cell. The first element is the cell, the second is the priority. +** Processing line: ~ new_frontier = dijkstra.frontier.shift#[0]~ - Inside source: true *** True Line Result - new_frontier = bfs.frontier.shift + new_frontier = dijkstra.frontier.shift#[0] ** Processing line: ~ # For each of its neighbors~ - Inside source: true *** True Line Result # For each of its neighbors -** Processing line: ~ adjacent_neighbors(new_frontier).each do |neighbor|~ +** Processing line: ~ adjacent_neighbors(new_frontier).each do | neighbor |~ - Inside source: true *** True Line Result - adjacent_neighbors(new_frontier).each do |neighbor| + adjacent_neighbors(new_frontier).each do | neighbor | ** Processing line: ~ # That have not been visited and are not walls~ - Inside source: true *** True Line Result # That have not been visited and are not walls -** Processing line: ~ unless bfs.came_from.has_key?(neighbor) || grid.walls.has_key?(neighbor)~ +** Processing line: ~ unless dijkstra.came_from.has_key?(neighbor) or grid.walls.has_key?(neighbor)~ - Inside source: true *** True Line Result - unless bfs.came_from.has_key?(neighbor) || grid.walls.has_key?(neighbor) + unless dijkstra.came_from.has_key?(neighbor) or grid.walls.has_key?(neighbor) ** Processing line: ~ # Add them to the frontier and mark them as visited~ - Inside source: true *** True Line Result # Add them to the frontier and mark them as visited -** Processing line: ~ bfs.frontier << neighbor~ +** Processing line: ~ dijkstra.frontier << neighbor~ - Inside source: true *** True Line Result - bfs.frontier << neighbor -** Processing line: ~ bfs.came_from[neighbor] = new_frontier~ + dijkstra.frontier << neighbor +** Processing line: ~ dijkstra.came_from[neighbor] = new_frontier~ - Inside source: true *** True Line Result - bfs.came_from[neighbor] = new_frontier + dijkstra.came_from[neighbor] = new_frontier +** Processing line: ~ dijkstra.cost_so_far[neighbor] = dijkstra.cost_so_far[new_frontier] + 1~ +- Inside source: true +*** True Line Result + dijkstra.cost_so_far[neighbor] = dijkstra.cost_so_far[new_frontier] + 1 ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -80632,26 +87695,34 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result end -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Sort the frontier so that cells that are in a zigzag pattern are prioritized over those in an line~ +** Processing line: ~ # Sort the frontier so that cells that are in a zigzag pattern are prioritized over those in an line~ - Inside source: true *** True Line Result - # Sort the frontier so that cells that are in a zigzag pattern are prioritized over those in an line -** Processing line: ~ # Comment this line and let a path generate to see the difference~ + # Sort the frontier so that cells that are in a zigzag pattern are prioritized over those in an line +** Processing line: ~ # Comment this line and let a path generate to see the difference~ - Inside source: true *** True Line Result - # Comment this line and let a path generate to see the difference -** Processing line: ~ bfs.frontier = bfs.frontier.sort_by {| cell | proximity_to_star(cell) }~ + # Comment this line and let a path generate to see the difference +** Processing line: ~ dijkstra.frontier = dijkstra.frontier.sort_by {| cell | proximity_to_star(cell) }~ - Inside source: true *** True Line Result - bfs.frontier = bfs.frontier.sort_by {| cell | proximity_to_star(cell) } + dijkstra.frontier = dijkstra.frontier.sort_by {| cell | proximity_to_star(cell) } +** Processing line: ~ dijkstra.frontier = dijkstra.frontier.sort_by {| cell | dijkstra.cost_so_far[cell] }~ +- Inside source: true +*** True Line Result + dijkstra.frontier = dijkstra.frontier.sort_by {| cell | dijkstra.cost_so_far[cell] } +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + ** Processing line: ~~ - Inside source: true *** True Line Result @@ -80660,18 +87731,18 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result # If the search found the target -** Processing line: ~ if bfs.came_from.has_key?(grid.target)~ +** Processing line: ~ if dijkstra.came_from.has_key?(grid.target)~ - Inside source: true *** True Line Result - if bfs.came_from.has_key?(grid.target) + if dijkstra.came_from.has_key?(grid.target) ** Processing line: ~ # Calculate the path between the target and star~ - Inside source: true *** True Line Result # Calculate the path between the target and star -** Processing line: ~ bfs_calc_path~ +** Processing line: ~ dijkstra_calc_path~ - Inside source: true *** True Line Result - bfs_calc_path + dijkstra_calc_path ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -80684,186 +87755,214 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Calculates the path between the target and star for the breadth first search~ +** Processing line: ~ def calc_greedy~ - Inside source: true *** True Line Result - # Calculates the path between the target and star for the breadth first search -** Processing line: ~ # Only called when the breadth first search finds the target~ + def calc_greedy +** Processing line: ~ # Sets up the search to begin from the star~ - Inside source: true *** True Line Result - # Only called when the breadth first search finds the target -** Processing line: ~ def bfs_calc_path~ + # Sets up the search to begin from the star +** Processing line: ~ greedy.frontier << grid.star~ - Inside source: true *** True Line Result - def bfs_calc_path -** Processing line: ~ # Start from the target~ + greedy.frontier << grid.star +** Processing line: ~ greedy.came_from[grid.star] = nil~ - Inside source: true *** True Line Result - # Start from the target -** Processing line: ~ endpoint = grid.target~ + greedy.came_from[grid.star] = nil +** Processing line: ~~ - Inside source: true *** True Line Result - endpoint = grid.target -** Processing line: ~ # And the cell it came from~ + +** Processing line: ~ # Until the target is found or there are no more cells to explore from~ - Inside source: true *** True Line Result - # And the cell it came from -** Processing line: ~ next_endpoint = bfs.came_from[endpoint]~ + # Until the target is found or there are no more cells to explore from +** Processing line: ~ until greedy.came_from.has_key?(grid.target) or greedy.frontier.empty?~ - Inside source: true *** True Line Result - next_endpoint = bfs.came_from[endpoint] -** Processing line: ~ while endpoint and next_endpoint~ + until greedy.came_from.has_key?(grid.target) or greedy.frontier.empty? +** Processing line: ~ # Take the next frontier cell~ - Inside source: true *** True Line Result - while endpoint and next_endpoint -** Processing line: ~ # Draw a path between these two cells and store it~ + # Take the next frontier cell +** Processing line: ~ new_frontier = greedy.frontier.shift~ - Inside source: true *** True Line Result - # Draw a path between these two cells and store it -** Processing line: ~ path = get_path_between(endpoint, next_endpoint)~ + new_frontier = greedy.frontier.shift +** Processing line: ~ # For each of its neighbors~ - Inside source: true *** True Line Result - path = get_path_between(endpoint, next_endpoint) -** Processing line: ~ bfs.path << path~ + # For each of its neighbors +** Processing line: ~ adjacent_neighbors(new_frontier).each do | neighbor |~ - Inside source: true *** True Line Result - bfs.path << path -** Processing line: ~ # And get the next pair of cells~ + adjacent_neighbors(new_frontier).each do | neighbor | +** Processing line: ~ # That have not been visited and are not walls~ - Inside source: true *** True Line Result - # And get the next pair of cells -** Processing line: ~ endpoint = next_endpoint~ + # That have not been visited and are not walls +** Processing line: ~ unless greedy.came_from.has_key?(neighbor) or grid.walls.has_key?(neighbor)~ - Inside source: true *** True Line Result - endpoint = next_endpoint -** Processing line: ~ next_endpoint = bfs.came_from[endpoint]~ + unless greedy.came_from.has_key?(neighbor) or grid.walls.has_key?(neighbor) +** Processing line: ~ # Add them to the frontier and mark them as visited~ - Inside source: true *** True Line Result - next_endpoint = bfs.came_from[endpoint] -** Processing line: ~ # Continue till there are no more cells~ + # Add them to the frontier and mark them as visited +** Processing line: ~ greedy.frontier << neighbor~ - Inside source: true *** True Line Result - # Continue till there are no more cells -** Processing line: ~ end~ + greedy.frontier << neighbor +** Processing line: ~ greedy.came_from[neighbor] = new_frontier~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + greedy.came_from[neighbor] = new_frontier +** Processing line: ~ end~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - -** Processing line: ~ # Moves the heuristic search forward one step~ + end +** Processing line: ~ # Sort the frontier so that cells that are in a zigzag pattern are prioritized over those in an line~ - Inside source: true *** True Line Result - # Moves the heuristic search forward one step -** Processing line: ~ # Can be called from tick while the animation is playing~ + # Sort the frontier so that cells that are in a zigzag pattern are prioritized over those in an line +** Processing line: ~ # Comment this line and let a path generate to see the difference~ - Inside source: true *** True Line Result - # Can be called from tick while the animation is playing -** Processing line: ~ # Can also be called when recalculating the searches after the user edited the grid~ + # Comment this line and let a path generate to see the difference +** Processing line: ~ greedy.frontier = greedy.frontier.sort_by {| cell | proximity_to_star(cell) }~ - Inside source: true *** True Line Result - # Can also be called when recalculating the searches after the user edited the grid -** Processing line: ~ def heuristic_one_step_forward~ + greedy.frontier = greedy.frontier.sort_by {| cell | proximity_to_star(cell) } +** Processing line: ~ # Sort the frontier so cells that are close to the target are then prioritized~ - Inside source: true *** True Line Result - def heuristic_one_step_forward -** Processing line: ~ # Stop the search if the target has been found~ + # Sort the frontier so cells that are close to the target are then prioritized +** Processing line: ~ greedy.frontier = greedy.frontier.sort_by {| cell | greedy_heuristic(cell) }~ - Inside source: true *** True Line Result - # Stop the search if the target has been found -** Processing line: ~ return if heuristic.came_from.has_key?(grid.target)~ + greedy.frontier = greedy.frontier.sort_by {| cell | greedy_heuristic(cell) } +** Processing line: ~ end~ - Inside source: true *** True Line Result - return if heuristic.came_from.has_key?(grid.target) + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # If the search has not begun~ +** Processing line: ~~ - Inside source: true *** True Line Result - # If the search has not begun -** Processing line: ~ if heuristic.came_from.empty?~ + +** Processing line: ~ # If the search found the target~ - Inside source: true *** True Line Result - if heuristic.came_from.empty? -** Processing line: ~ # Setup the search to begin from the star~ + # If the search found the target +** Processing line: ~ if greedy.came_from.has_key?(grid.target)~ - Inside source: true *** True Line Result - # Setup the search to begin from the star -** Processing line: ~ heuristic.frontier << grid.star~ + if greedy.came_from.has_key?(grid.target) +** Processing line: ~ # Calculate the path between the target and star~ - Inside source: true *** True Line Result - heuristic.frontier << grid.star -** Processing line: ~ heuristic.came_from[grid.star] = nil~ + # Calculate the path between the target and star +** Processing line: ~ greedy_calc_path~ - Inside source: true *** True Line Result - heuristic.came_from[grid.star] = nil + greedy_calc_path ** Processing line: ~ end~ - Inside source: true *** True Line Result end +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # One step in the heuristic search~ +** Processing line: ~ def calc_a_star~ - Inside source: true *** True Line Result - # One step in the heuristic search + def calc_a_star +** Processing line: ~ # Setup the search to start from the star~ +- Inside source: true +*** True Line Result + # Setup the search to start from the star +** Processing line: ~ a_star.came_from[grid.star] = nil~ +- Inside source: true +*** True Line Result + a_star.came_from[grid.star] = nil +** Processing line: ~ a_star.cost_so_far[grid.star] = 0~ +- Inside source: true +*** True Line Result + a_star.cost_so_far[grid.star] = 0 +** Processing line: ~ a_star.frontier << grid.star~ +- Inside source: true +*** True Line Result + a_star.frontier << grid.star ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Unless there are no more cells to explore from~ +** Processing line: ~ # Until there are no more cells to explore from or the search has found the target~ - Inside source: true *** True Line Result - # Unless there are no more cells to explore from -** Processing line: ~ unless heuristic.frontier.empty?~ + # Until there are no more cells to explore from or the search has found the target +** Processing line: ~ until a_star.frontier.empty? or a_star.came_from.has_key?(grid.target)~ - Inside source: true *** True Line Result - unless heuristic.frontier.empty? -** Processing line: ~ # Get the next cell to explore from~ + until a_star.frontier.empty? or a_star.came_from.has_key?(grid.target) +** Processing line: ~ # Get the next cell to expand from~ - Inside source: true *** True Line Result - # Get the next cell to explore from -** Processing line: ~ new_frontier = heuristic.frontier.shift~ + # Get the next cell to expand from +** Processing line: ~ current_frontier = a_star.frontier.shift~ - Inside source: true *** True Line Result - new_frontier = heuristic.frontier.shift -** Processing line: ~ # For each of its neighbors~ + current_frontier = a_star.frontier.shift +** Processing line: ~~ - Inside source: true *** True Line Result - # For each of its neighbors -** Processing line: ~ adjacent_neighbors(new_frontier).each do |neighbor|~ + +** Processing line: ~ # For each of that cells neighbors~ - Inside source: true *** True Line Result - adjacent_neighbors(new_frontier).each do |neighbor| + # For each of that cells neighbors +** Processing line: ~ adjacent_neighbors(current_frontier).each do | neighbor |~ +- Inside source: true +*** True Line Result + adjacent_neighbors(current_frontier).each do | neighbor | ** Processing line: ~ # That have not been visited and are not walls~ - Inside source: true *** True Line Result # That have not been visited and are not walls -** Processing line: ~ unless heuristic.came_from.has_key?(neighbor) || grid.walls.has_key?(neighbor)~ +** Processing line: ~ unless a_star.came_from.has_key?(neighbor) or grid.walls.has_key?(neighbor)~ - Inside source: true *** True Line Result - unless heuristic.came_from.has_key?(neighbor) || grid.walls.has_key?(neighbor) + unless a_star.came_from.has_key?(neighbor) or grid.walls.has_key?(neighbor) ** Processing line: ~ # Add them to the frontier and mark them as visited~ - Inside source: true *** True Line Result # Add them to the frontier and mark them as visited -** Processing line: ~ heuristic.frontier << neighbor~ +** Processing line: ~ a_star.frontier << neighbor~ - Inside source: true *** True Line Result - heuristic.frontier << neighbor -** Processing line: ~ heuristic.came_from[neighbor] = new_frontier~ + a_star.frontier << neighbor +** Processing line: ~ a_star.came_from[neighbor] = current_frontier~ - Inside source: true *** True Line Result - heuristic.came_from[neighbor] = new_frontier + a_star.came_from[neighbor] = current_frontier +** Processing line: ~ a_star.cost_so_far[neighbor] = a_star.cost_so_far[current_frontier] + 1~ +- Inside source: true +*** True Line Result + a_star.cost_so_far[neighbor] = a_star.cost_so_far[current_frontier] + 1 ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -80872,30 +87971,30 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result end -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Sort the frontier so that cells that are in a zigzag pattern are prioritized over those in an line~ +** Processing line: ~ # Sort the frontier so that cells that are in a zigzag pattern are prioritized over those in an line~ - Inside source: true *** True Line Result - # Sort the frontier so that cells that are in a zigzag pattern are prioritized over those in an line -** Processing line: ~ heuristic.frontier = heuristic.frontier.sort_by {| cell | proximity_to_star(cell) }~ + # Sort the frontier so that cells that are in a zigzag pattern are prioritized over those in an line +** Processing line: ~ # Comment this line and let a path generate to see the difference~ - Inside source: true *** True Line Result - heuristic.frontier = heuristic.frontier.sort_by {| cell | proximity_to_star(cell) } -** Processing line: ~ # Sort the frontier so cells that are close to the target are then prioritized~ + # Comment this line and let a path generate to see the difference +** Processing line: ~ a_star.frontier = a_star.frontier.sort_by {| cell | proximity_to_star(cell) }~ - Inside source: true *** True Line Result - # Sort the frontier so cells that are close to the target are then prioritized -** Processing line: ~ heuristic.frontier = heuristic.frontier.sort_by {| cell | heuristic_heuristic(cell) }~ + a_star.frontier = a_star.frontier.sort_by {| cell | proximity_to_star(cell) } +** Processing line: ~ a_star.frontier = a_star.frontier.sort_by {| cell | a_star.cost_so_far[cell] + greedy_heuristic(cell) }~ - Inside source: true *** True Line Result - heuristic.frontier = heuristic.frontier.sort_by {| cell | heuristic_heuristic(cell) } + a_star.frontier = a_star.frontier.sort_by {| cell | a_star.cost_so_far[cell] + greedy_heuristic(cell) } +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result @@ -80904,18 +88003,90 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result # If the search found the target -** Processing line: ~ if heuristic.came_from.has_key?(grid.target)~ +** Processing line: ~ if a_star.came_from.has_key?(grid.target)~ - Inside source: true *** True Line Result - if heuristic.came_from.has_key?(grid.target) + if a_star.came_from.has_key?(grid.target) ** Processing line: ~ # Calculate the path between the target and star~ - Inside source: true *** True Line Result # Calculate the path between the target and star -** Processing line: ~ heuristic_calc_path~ +** Processing line: ~ a_star_calc_path~ - Inside source: true *** True Line Result - heuristic_calc_path + a_star_calc_path +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ # Calculates the path between the target and star for the breadth first search~ +- Inside source: true +*** True Line Result + # Calculates the path between the target and star for the breadth first search +** Processing line: ~ # Only called when the breadth first search finds the target~ +- Inside source: true +*** True Line Result + # Only called when the breadth first search finds the target +** Processing line: ~ def dijkstra_calc_path~ +- Inside source: true +*** True Line Result + def dijkstra_calc_path +** Processing line: ~ # Start from the target~ +- Inside source: true +*** True Line Result + # Start from the target +** Processing line: ~ endpoint = grid.target~ +- Inside source: true +*** True Line Result + endpoint = grid.target +** Processing line: ~ # And the cell it came from~ +- Inside source: true +*** True Line Result + # And the cell it came from +** Processing line: ~ next_endpoint = dijkstra.came_from[endpoint]~ +- Inside source: true +*** True Line Result + next_endpoint = dijkstra.came_from[endpoint] +** Processing line: ~ while endpoint and next_endpoint~ +- Inside source: true +*** True Line Result + while endpoint and next_endpoint +** Processing line: ~ # Draw a path between these two cells and store it~ +- Inside source: true +*** True Line Result + # Draw a path between these two cells and store it +** Processing line: ~ path = get_path_between(endpoint, next_endpoint)~ +- Inside source: true +*** True Line Result + path = get_path_between(endpoint, next_endpoint) +** Processing line: ~ dijkstra.path << path~ +- Inside source: true +*** True Line Result + dijkstra.path << path +** Processing line: ~ # And get the next pair of cells~ +- Inside source: true +*** True Line Result + # And get the next pair of cells +** Processing line: ~ endpoint = next_endpoint~ +- Inside source: true +*** True Line Result + endpoint = next_endpoint +** Processing line: ~ next_endpoint = dijkstra.came_from[endpoint]~ +- Inside source: true +*** True Line Result + next_endpoint = dijkstra.came_from[endpoint] +** Processing line: ~ # Continue till there are no more cells~ +- Inside source: true +*** True Line Result + # Continue till there are no more cells ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -80936,10 +88107,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result # Returns a number to compare distances between cells and the target -** Processing line: ~ def heuristic_heuristic(cell)~ +** Processing line: ~ def greedy_heuristic(cell)~ - Inside source: true *** True Line Result - def heuristic_heuristic(cell) + def greedy_heuristic(cell) ** Processing line: ~ (grid.target.x - cell.x).abs + (grid.target.y - cell.y).abs~ - Inside source: true *** True Line Result @@ -80952,18 +88123,18 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Calculates the path between the target and star for the heuristic search~ +** Processing line: ~ # Calculates the path between the target and star for the greedy search~ - Inside source: true *** True Line Result - # Calculates the path between the target and star for the heuristic search -** Processing line: ~ # Only called when the heuristic search finds the target~ + # Calculates the path between the target and star for the greedy search +** Processing line: ~ # Only called when the greedy search finds the target~ - Inside source: true *** True Line Result - # Only called when the heuristic search finds the target -** Processing line: ~ def heuristic_calc_path~ + # Only called when the greedy search finds the target +** Processing line: ~ def greedy_calc_path~ - Inside source: true *** True Line Result - def heuristic_calc_path + def greedy_calc_path ** Processing line: ~ # Start from the target~ - Inside source: true *** True Line Result @@ -80976,10 +88147,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result # And the cell it came from -** Processing line: ~ next_endpoint = heuristic.came_from[endpoint]~ +** Processing line: ~ next_endpoint = greedy.came_from[endpoint]~ - Inside source: true *** True Line Result - next_endpoint = heuristic.came_from[endpoint] + next_endpoint = greedy.came_from[endpoint] ** Processing line: ~ while endpoint and next_endpoint~ - Inside source: true *** True Line Result @@ -80992,10 +88163,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result path = get_path_between(endpoint, next_endpoint) -** Processing line: ~ heuristic.path << path~ +** Processing line: ~ greedy.path << path~ - Inside source: true *** True Line Result - heuristic.path << path + greedy.path << path ** Processing line: ~ # And get the next pair of cells~ - Inside source: true *** True Line Result @@ -81004,10 +88175,86 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result endpoint = next_endpoint -** Processing line: ~ next_endpoint = heuristic.came_from[endpoint]~ +** Processing line: ~ next_endpoint = greedy.came_from[endpoint]~ - Inside source: true *** True Line Result - next_endpoint = heuristic.came_from[endpoint] + next_endpoint = greedy.came_from[endpoint] +** Processing line: ~ # Continue till there are no more cells~ +- Inside source: true +*** True Line Result + # Continue till there are no more cells +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ # Calculates the path between the target and star for the a_star search~ +- Inside source: true +*** True Line Result + # Calculates the path between the target and star for the a_star search +** Processing line: ~ # Only called when the a_star search finds the target~ +- Inside source: true +*** True Line Result + # Only called when the a_star search finds the target +** Processing line: ~ def a_star_calc_path~ +- Inside source: true +*** True Line Result + def a_star_calc_path +** Processing line: ~ # Start from the target~ +- Inside source: true +*** True Line Result + # Start from the target +** Processing line: ~ endpoint = grid.target~ +- Inside source: true +*** True Line Result + endpoint = grid.target +** Processing line: ~ # And the cell it came from~ +- Inside source: true +*** True Line Result + # And the cell it came from +** Processing line: ~ next_endpoint = a_star.came_from[endpoint]~ +- Inside source: true +*** True Line Result + next_endpoint = a_star.came_from[endpoint] +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ while endpoint and next_endpoint~ +- Inside source: true +*** True Line Result + while endpoint and next_endpoint +** Processing line: ~ # Draw a path between these two cells and store it~ +- Inside source: true +*** True Line Result + # Draw a path between these two cells and store it +** Processing line: ~ path = get_path_between(endpoint, next_endpoint)~ +- Inside source: true +*** True Line Result + path = get_path_between(endpoint, next_endpoint) +** Processing line: ~ a_star.path << path~ +- Inside source: true +*** True Line Result + a_star.path << path +** Processing line: ~ # And get the next pair of cells~ +- Inside source: true +*** True Line Result + # And get the next pair of cells +** Processing line: ~ endpoint = next_endpoint~ +- Inside source: true +*** True Line Result + endpoint = next_endpoint +** Processing line: ~ next_endpoint = a_star.came_from[endpoint]~ +- Inside source: true +*** True Line Result + next_endpoint = a_star.came_from[endpoint] ** Processing line: ~ # Continue till there are no more cells~ - Inside source: true *** True Line Result @@ -81172,30 +88419,14 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def buttons~ -- Inside source: true -*** True Line Result - def buttons -** Processing line: ~ state.buttons~ -- Inside source: true -*** True Line Result - state.buttons -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ def slider~ +** Processing line: ~ def dijkstra~ - Inside source: true *** True Line Result - def slider -** Processing line: ~ state.slider~ + def dijkstra +** Processing line: ~ state.dijkstra~ - Inside source: true *** True Line Result - state.slider + state.dijkstra ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -81204,14 +88435,14 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def bfs~ +** Processing line: ~ def greedy~ - Inside source: true *** True Line Result - def bfs -** Processing line: ~ state.bfs~ + def greedy +** Processing line: ~ state.greedy~ - Inside source: true *** True Line Result - state.bfs + state.greedy ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -81220,14 +88451,14 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def heuristic~ +** Processing line: ~ def a_star~ - Inside source: true *** True Line Result - def heuristic -** Processing line: ~ state.heuristic~ + def a_star +** Processing line: ~ state.a_star~ - Inside source: true *** True Line Result - state.heuristic + state.a_star ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -81288,22 +88519,6 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def frontier_color~ -- Inside source: true -*** True Line Result - def frontier_color -** Processing line: ~ [103, 136, 204] # Blue~ -- Inside source: true -*** True Line Result - [103, 136, 204] # Blue -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end -** Processing line: ~~ -- Inside source: true -*** True Line Result - ** Processing line: ~ def path_color~ - Inside source: true *** True Line Result @@ -81336,6 +88551,14 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~~ +- Inside source: true +*** True Line Result + ** Processing line: ~ # Method that is called by DragonRuby periodically~ - Inside source: true *** True Line Result @@ -81384,18 +88607,18 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result # Every tick, new args are passed, and the Breadth First Search tick is called -** Processing line: ~ $heuristic ||= Heuristic.new(args)~ +** Processing line: ~ $a_star_algorithm ||= A_Star_Algorithm.new(args)~ - Inside source: true *** True Line Result - $heuristic ||= Heuristic.new(args) -** Processing line: ~ $heuristic.args = args~ + $a_star_algorithm ||= A_Star_Algorithm.new(args) +** Processing line: ~ $a_star_algorithm.args = args~ - Inside source: true *** True Line Result - $heuristic.args = args -** Processing line: ~ $heuristic.tick~ + $a_star_algorithm.args = args +** Processing line: ~ $a_star_algorithm.tick~ - Inside source: true *** True Line Result - $heuristic.tick + $a_star_algorithm.tick ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -81412,10 +88635,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result def reset -** Processing line: ~ $heuristic = nil~ +** Processing line: ~ $a_star_algorithm = nil~ - Inside source: true *** True Line Result - $heuristic = nil + $a_star_algorithm = nil ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -81432,418 +88655,222 @@ Follows is a source code listing for all files that have been open sourced. This - End of paragraph detected. *** True Line Result -** Processing line: ~*** Path Finding Algorithms - A Star - main.rb~ +** Processing line: ~*** Path Finding Algorithms - Tower Defense - main.rb~ - Header detected. *** True Line Result - -*** True Line Result -*** Path Finding Algorithms - A Star - main.rb -** Processing line: ~#+begin_src ruby~ -- Line was identified as the beginning of a code block. -*** True Line Result - -*** True Line Result -#+begin_src ruby -** Processing line: ~ # ./samples/13_path_finding_algorithms/08_a_star/app/main.rb~ -- Inside source: true -*** True Line Result - # ./samples/13_path_finding_algorithms/08_a_star/app/main.rb -** Processing line: ~ # This program is inspired by https://www.redblobgames.com/pathfinding/a-star/introduction.html~ -- Inside source: true -*** True Line Result - # This program is inspired by https://www.redblobgames.com/pathfinding/a-star/introduction.html -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ # The A* Search works by incorporating both the distance from the starting point~ -- Inside source: true -*** True Line Result - # The A* Search works by incorporating both the distance from the starting point -** Processing line: ~ # and the distance from the target in its heurisitic.~ -- Inside source: true -*** True Line Result - # and the distance from the target in its heurisitic. -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ # It tends to find the correct (shortest) path even when the Greedy Best-First Search does not,~ -- Inside source: true -*** True Line Result - # It tends to find the correct (shortest) path even when the Greedy Best-First Search does not, -** Processing line: ~ # and it explores less of the grid, and is therefore faster, than Dijkstra's Search.~ -- Inside source: true -*** True Line Result - # and it explores less of the grid, and is therefore faster, than Dijkstra's Search. -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ class A_Star_Algorithm~ -- Inside source: true -*** True Line Result - class A_Star_Algorithm -** Processing line: ~ attr_gtk~ -- Inside source: true -*** True Line Result - attr_gtk -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ def tick~ -- Inside source: true -*** True Line Result - def tick -** Processing line: ~ defaults~ -- Inside source: true -*** True Line Result - defaults -** Processing line: ~ render~ -- Inside source: true -*** True Line Result - render -** Processing line: ~ input~ -- Inside source: true -*** True Line Result - input -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ if dijkstra.came_from.empty?~ -- Inside source: true -*** True Line Result - if dijkstra.came_from.empty? -** Processing line: ~ calc_searches~ -- Inside source: true -*** True Line Result - calc_searches -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ def defaults~ -- Inside source: true -*** True Line Result - def defaults -** Processing line: ~ # Variables to edit the size and appearance of the grid~ -- Inside source: true -*** True Line Result - # Variables to edit the size and appearance of the grid -** Processing line: ~ # Freely customizable to user's liking~ -- Inside source: true -*** True Line Result - # Freely customizable to user's liking -** Processing line: ~ grid.width ||= 15~ -- Inside source: true -*** True Line Result - grid.width ||= 15 -** Processing line: ~ grid.height ||= 15~ -- Inside source: true -*** True Line Result - grid.height ||= 15 -** Processing line: ~ grid.cell_size ||= 27~ -- Inside source: true -*** True Line Result - grid.cell_size ||= 27 -** Processing line: ~ grid.rect ||= [0, 0, grid.width, grid.height]~ -- Inside source: true -*** True Line Result - grid.rect ||= [0, 0, grid.width, grid.height] -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ grid.star ||= [0, 2]~ -- Inside source: true -*** True Line Result - grid.star ||= [0, 2] -** Processing line: ~ grid.target ||= [11, 13]~ -- Inside source: true -*** True Line Result - grid.target ||= [11, 13] -** Processing line: ~ grid.walls ||= {~ -- Inside source: true -*** True Line Result - grid.walls ||= { -** Processing line: ~ [2, 2] => true,~ -- Inside source: true -*** True Line Result - [2, 2] => true, -** Processing line: ~ [3, 2] => true,~ -- Inside source: true -*** True Line Result - [3, 2] => true, -** Processing line: ~ [4, 2] => true,~ -- Inside source: true -*** True Line Result - [4, 2] => true, -** Processing line: ~ [5, 2] => true,~ -- Inside source: true -*** True Line Result - [5, 2] => true, -** Processing line: ~ [6, 2] => true,~ -- Inside source: true -*** True Line Result - [6, 2] => true, -** Processing line: ~ [7, 2] => true,~ -- Inside source: true -*** True Line Result - [7, 2] => true, -** Processing line: ~ [8, 2] => true,~ -- Inside source: true -*** True Line Result - [8, 2] => true, -** Processing line: ~ [9, 2] => true,~ -- Inside source: true -*** True Line Result - [9, 2] => true, -** Processing line: ~ [10, 2] => true,~ -- Inside source: true -*** True Line Result - [10, 2] => true, -** Processing line: ~ [11, 2] => true,~ -- Inside source: true -*** True Line Result - [11, 2] => true, -** Processing line: ~ [12, 2] => true,~ -- Inside source: true -*** True Line Result - [12, 2] => true, -** Processing line: ~ [12, 3] => true,~ -- Inside source: true -*** True Line Result - [12, 3] => true, -** Processing line: ~ [12, 4] => true,~ -- Inside source: true -*** True Line Result - [12, 4] => true, -** Processing line: ~ [12, 5] => true,~ -- Inside source: true -*** True Line Result - [12, 5] => true, -** Processing line: ~ [12, 6] => true,~ -- Inside source: true -*** True Line Result - [12, 6] => true, -** Processing line: ~ [12, 7] => true,~ -- Inside source: true + *** True Line Result - [12, 7] => true, -** Processing line: ~ [12, 8] => true,~ -- Inside source: true +*** Path Finding Algorithms - Tower Defense - main.rb +** Processing line: ~#+begin_src ruby~ +- Line was identified as the beginning of a code block. *** True Line Result - [12, 8] => true, -** Processing line: ~ [12, 9] => true,~ -- Inside source: true + *** True Line Result - [12, 9] => true, -** Processing line: ~ [12, 10] => true,~ +#+begin_src ruby +** Processing line: ~ # ./samples/13_path_finding_algorithms/09_tower_defense/app/main.rb~ - Inside source: true *** True Line Result - [12, 10] => true, -** Processing line: ~ [12, 11] => true,~ + # ./samples/13_path_finding_algorithms/09_tower_defense/app/main.rb +** Processing line: ~ # An example of some major components in a tower defence game~ - Inside source: true *** True Line Result - [12, 11] => true, -** Processing line: ~ [12, 12] => true,~ + # An example of some major components in a tower defence game +** Processing line: ~ # The pathing of the tanks is determined by A* algorithm -- try editing the walls~ - Inside source: true *** True Line Result - [12, 12] => true, -** Processing line: ~ [5, 12] => true,~ + # The pathing of the tanks is determined by A* algorithm -- try editing the walls +** Processing line: ~~ - Inside source: true *** True Line Result - [5, 12] => true, -** Processing line: ~ [6, 12] => true,~ + +** Processing line: ~ # The turrets shoot bullets at the closest tank. The bullets are heat-seeking~ - Inside source: true *** True Line Result - [6, 12] => true, -** Processing line: ~ [7, 12] => true,~ + # The turrets shoot bullets at the closest tank. The bullets are heat-seeking +** Processing line: ~~ - Inside source: true *** True Line Result - [7, 12] => true, -** Processing line: ~ [8, 12] => true,~ + +** Processing line: ~ def tick args~ - Inside source: true *** True Line Result - [8, 12] => true, -** Processing line: ~ [9, 12] => true,~ + def tick args +** Processing line: ~ $gtk.reset if args.inputs.keyboard.key_down.r~ - Inside source: true *** True Line Result - [9, 12] => true, -** Processing line: ~ [10, 12] => true,~ + $gtk.reset if args.inputs.keyboard.key_down.r +** Processing line: ~ defaults args~ - Inside source: true *** True Line Result - [10, 12] => true, -** Processing line: ~ [11, 12] => true,~ + defaults args +** Processing line: ~ render args~ - Inside source: true *** True Line Result - [11, 12] => true, -** Processing line: ~ [12, 12] => true~ + render args +** Processing line: ~ calc args~ - Inside source: true *** True Line Result - [12, 12] => true -** Processing line: ~ }~ + calc args +** Processing line: ~ end~ - Inside source: true *** True Line Result - } + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # What the user is currently editing on the grid~ +** Processing line: ~ def defaults args~ - Inside source: true *** True Line Result - # What the user is currently editing on the grid -** Processing line: ~ # We store this value, because we want to remember the value even when~ + def defaults args +** Processing line: ~ args.outputs.background_color = wall_color~ - Inside source: true *** True Line Result - # We store this value, because we want to remember the value even when -** Processing line: ~ # the user's cursor is no longer over what they're interacting with, but~ + args.outputs.background_color = wall_color +** Processing line: ~ args.state.grid_size = 5~ - Inside source: true *** True Line Result - # the user's cursor is no longer over what they're interacting with, but -** Processing line: ~ # they are still clicking down on the mouse.~ + args.state.grid_size = 5 +** Processing line: ~ args.state.tile_size = 50~ - Inside source: true *** True Line Result - # they are still clicking down on the mouse. -** Processing line: ~ state.user_input ||= :none~ + args.state.tile_size = 50 +** Processing line: ~ args.state.grid_start ||= [0, 0]~ - Inside source: true *** True Line Result - state.user_input ||= :none -** Processing line: ~~ + args.state.grid_start ||= [0, 0] +** Processing line: ~ args.state.grid_goal ||= [4, 4]~ - Inside source: true *** True Line Result - -** Processing line: ~ # These variables allow the breadth first search to take place~ + args.state.grid_goal ||= [4, 4] +** Processing line: ~~ - Inside source: true *** True Line Result - # These variables allow the breadth first search to take place -** Processing line: ~ # Came_from is a hash with a key of a cell and a value of the cell that was expanded from to find the key.~ + +** Processing line: ~ # Try editing these walls to see the path change!~ - Inside source: true *** True Line Result - # Came_from is a hash with a key of a cell and a value of the cell that was expanded from to find the key. -** Processing line: ~ # Used to prevent searching cells that have already been found~ + # Try editing these walls to see the path change! +** Processing line: ~ args.state.walls ||= {~ - Inside source: true *** True Line Result - # Used to prevent searching cells that have already been found -** Processing line: ~ # and to trace a path from the target back to the starting point.~ + args.state.walls ||= { +** Processing line: ~ [0, 4] => true,~ - Inside source: true *** True Line Result - # and to trace a path from the target back to the starting point. -** Processing line: ~ # Frontier is an array of cells to expand the search from.~ + [0, 4] => true, +** Processing line: ~ [1, 3] => true,~ - Inside source: true *** True Line Result - # Frontier is an array of cells to expand the search from. -** Processing line: ~ # The search is over when there are no more cells to search from.~ + [1, 3] => true, +** Processing line: ~ [3, 1] => true,~ - Inside source: true *** True Line Result - # The search is over when there are no more cells to search from. -** Processing line: ~ # Path stores the path from the target to the star, once the target has been found~ + [3, 1] => true, +** Processing line: ~ # [4, 0] => true,~ - Inside source: true *** True Line Result - # Path stores the path from the target to the star, once the target has been found -** Processing line: ~ # It prevents calculating the path every tick.~ + # [4, 0] => true, +** Processing line: ~ }~ - Inside source: true *** True Line Result - # It prevents calculating the path every tick. -** Processing line: ~ dijkstra.came_from ||= {}~ + } +** Processing line: ~~ - Inside source: true *** True Line Result - dijkstra.came_from ||= {} -** Processing line: ~ dijkstra.cost_so_far ||= {}~ + +** Processing line: ~ args.state.a_star.frontier ||= []~ - Inside source: true *** True Line Result - dijkstra.cost_so_far ||= {} -** Processing line: ~ dijkstra.frontier ||= []~ + args.state.a_star.frontier ||= [] +** Processing line: ~ args.state.a_star.came_from ||= {}~ - Inside source: true *** True Line Result - dijkstra.frontier ||= [] -** Processing line: ~ dijkstra.path ||= []~ + args.state.a_star.came_from ||= {} +** Processing line: ~ args.state.a_star.path ||= []~ - Inside source: true *** True Line Result - dijkstra.path ||= [] + args.state.a_star.path ||= [] ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ greedy.came_from ||= {}~ +** Processing line: ~ args.state.tanks ||= []~ - Inside source: true *** True Line Result - greedy.came_from ||= {} -** Processing line: ~ greedy.frontier ||= []~ + args.state.tanks ||= [] +** Processing line: ~ args.state.tank_spawn_period ||= 60~ - Inside source: true *** True Line Result - greedy.frontier ||= [] -** Processing line: ~ greedy.path ||= []~ + args.state.tank_spawn_period ||= 60 +** Processing line: ~ args.state.tank_sprite_path ||= 'sprites/circle/white.png'~ - Inside source: true *** True Line Result - greedy.path ||= [] + args.state.tank_sprite_path ||= 'sprites/circle/white.png' +** Processing line: ~ args.state.tank_speed ||= 1~ +- Inside source: true +*** True Line Result + args.state.tank_speed ||= 1 ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ a_star.frontier ||= []~ +** Processing line: ~ args.state.turret_shoot_period = 10~ - Inside source: true *** True Line Result - a_star.frontier ||= [] -** Processing line: ~ a_star.came_from ||= {}~ + args.state.turret_shoot_period = 10 +** Processing line: ~ # Turrets can be entered as [x, y] but are immediately mapped to hashes~ - Inside source: true *** True Line Result - a_star.came_from ||= {} -** Processing line: ~ a_star.path ||= []~ + # Turrets can be entered as [x, y] but are immediately mapped to hashes +** Processing line: ~ # Walls are also added where the turrets are to prevent tanks from pathing over them~ - Inside source: true *** True Line Result - a_star.path ||= [] -** Processing line: ~ end~ + # Walls are also added where the turrets are to prevent tanks from pathing over them +** Processing line: ~ args.state.turrets ||= [~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + args.state.turrets ||= [ +** Processing line: ~ [2, 2]~ - Inside source: true *** True Line Result - -** Processing line: ~ # All methods with render draw stuff on the screen~ + [2, 2] +** Processing line: ~ ].each { |turret| args.state.walls[turret] = true}.map do |x, y|~ - Inside source: true *** True Line Result - # All methods with render draw stuff on the screen -** Processing line: ~ # UI has buttons, the slider, and labels~ + ].each { |turret| args.state.walls[turret] = true}.map do |x, y| +** Processing line: ~ {~ - Inside source: true *** True Line Result - # UI has buttons, the slider, and labels -** Processing line: ~ # The search specific rendering occurs in the respective methods~ + { +** Processing line: ~ x: x * args.state.tile_size,~ - Inside source: true *** True Line Result - # The search specific rendering occurs in the respective methods -** Processing line: ~ def render~ + x: x * args.state.tile_size, +** Processing line: ~ y: y * args.state.tile_size,~ - Inside source: true *** True Line Result - def render -** Processing line: ~ render_labels~ + y: y * args.state.tile_size, +** Processing line: ~ w: args.state.tile_size,~ - Inside source: true *** True Line Result - render_labels -** Processing line: ~ render_dijkstra~ + w: args.state.tile_size, +** Processing line: ~ h: args.state.tile_size,~ - Inside source: true *** True Line Result - render_dijkstra -** Processing line: ~ render_greedy~ + h: args.state.tile_size, +** Processing line: ~ path: 'sprites/circle/gray.png',~ - Inside source: true *** True Line Result - render_greedy -** Processing line: ~ render_a_star~ + path: 'sprites/circle/gray.png', +** Processing line: ~ range: 100~ - Inside source: true *** True Line Result - render_a_star + range: 100 +** Processing line: ~ }~ +- Inside source: true +*** True Line Result + } ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -81852,130 +88879,118 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def render_labels~ +** Processing line: ~ args.state.bullet_size ||= 25~ - Inside source: true *** True Line Result - def render_labels -** Processing line: ~ outputs.labels << [150, 450, "Dijkstra's"]~ + args.state.bullet_size ||= 25 +** Processing line: ~ args.state.bullets ||= []~ - Inside source: true *** True Line Result - outputs.labels << [150, 450, "Dijkstra's"] -** Processing line: ~ outputs.labels << [550, 450, "Greedy Best-First"]~ + args.state.bullets ||= [] +** Processing line: ~ args.state.bullet_path ||= 'sprites/circle/orange.png'~ - Inside source: true *** True Line Result - outputs.labels << [550, 450, "Greedy Best-First"] -** Processing line: ~ outputs.labels << [1025, 450, "A* Search"]~ + args.state.bullet_path ||= 'sprites/circle/orange.png' +** Processing line: ~ #~ - Inside source: true *** True Line Result - outputs.labels << [1025, 450, "A* Search"] -** Processing line: ~ end~ + # +** Processing line: ~ end~ - Inside source: true *** True Line Result - end + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def render_dijkstra~ -- Inside source: true -*** True Line Result - def render_dijkstra -** Processing line: ~ render_dijkstra_grid~ +** Processing line: ~ def render args~ - Inside source: true *** True Line Result - render_dijkstra_grid -** Processing line: ~ render_dijkstra_star~ + def render args +** Processing line: ~ render_grid args~ - Inside source: true *** True Line Result - render_dijkstra_star -** Processing line: ~ render_dijkstra_target~ + render_grid args +** Processing line: ~ render_a_star args~ - Inside source: true *** True Line Result - render_dijkstra_target -** Processing line: ~ render_dijkstra_visited~ + render_a_star args +** Processing line: ~ args.outputs.sprites << args.state.tanks~ - Inside source: true *** True Line Result - render_dijkstra_visited -** Processing line: ~ render_dijkstra_walls~ + args.outputs.sprites << args.state.tanks +** Processing line: ~ args.outputs.sprites << args.state.turrets~ - Inside source: true *** True Line Result - render_dijkstra_walls -** Processing line: ~ render_dijkstra_path~ + args.outputs.sprites << args.state.turrets +** Processing line: ~ args.outputs.sprites << args.state.bullets~ - Inside source: true *** True Line Result - render_dijkstra_path -** Processing line: ~ end~ + args.outputs.sprites << args.state.bullets +** Processing line: ~ end~ - Inside source: true *** True Line Result - end + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def render_greedy~ -- Inside source: true -*** True Line Result - def render_greedy -** Processing line: ~ render_greedy_grid~ -- Inside source: true -*** True Line Result - render_greedy_grid -** Processing line: ~ render_greedy_star~ +** Processing line: ~ def render_grid args~ - Inside source: true *** True Line Result - render_greedy_star -** Processing line: ~ render_greedy_target~ + def render_grid args +** Processing line: ~ # Draw a square the size and color of the grid~ - Inside source: true *** True Line Result - render_greedy_target -** Processing line: ~ render_greedy_visited~ + # Draw a square the size and color of the grid +** Processing line: ~ args.outputs.solids << [~ - Inside source: true *** True Line Result - render_greedy_visited -** Processing line: ~ render_greedy_walls~ + args.outputs.solids << [ +** Processing line: ~ 0,~ - Inside source: true *** True Line Result - render_greedy_walls -** Processing line: ~ render_greedy_path~ + 0, +** Processing line: ~ 0,~ - Inside source: true *** True Line Result - render_greedy_path -** Processing line: ~ end~ + 0, +** Processing line: ~ args.state.grid_size * args.state.tile_size,~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + args.state.grid_size * args.state.tile_size, +** Processing line: ~ args.state.grid_size * args.state.tile_size,~ - Inside source: true *** True Line Result - -** Processing line: ~ def render_a_star~ + args.state.grid_size * args.state.tile_size, +** Processing line: ~ grid_color~ - Inside source: true *** True Line Result - def render_a_star -** Processing line: ~ render_a_star_grid~ + grid_color +** Processing line: ~ ]~ - Inside source: true *** True Line Result - render_a_star_grid -** Processing line: ~ render_a_star_star~ + ] +** Processing line: ~~ - Inside source: true *** True Line Result - render_a_star_star -** Processing line: ~ render_a_star_target~ + +** Processing line: ~ # Draw lines across the grid to show tiles~ - Inside source: true *** True Line Result - render_a_star_target -** Processing line: ~ render_a_star_visited~ + # Draw lines across the grid to show tiles +** Processing line: ~ (args.state.grid_size + 1).times do | value |~ - Inside source: true *** True Line Result - render_a_star_visited -** Processing line: ~ render_a_star_walls~ + (args.state.grid_size + 1).times do | value | +** Processing line: ~ render_horizontal_line(args, value)~ - Inside source: true *** True Line Result - render_a_star_walls -** Processing line: ~ render_a_star_path~ + render_horizontal_line(args, value) +** Processing line: ~ render_vertical_line(args, value)~ - Inside source: true *** True Line Result - render_a_star_path + render_vertical_line(args, value) ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -81984,286 +88999,278 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # This method handles user input every tick~ -- Inside source: true -*** True Line Result - # This method handles user input every tick -** Processing line: ~ def input~ -- Inside source: true -*** True Line Result - def input -** Processing line: ~ # If the mouse was lifted this tick~ +** Processing line: ~ # Render special tiles~ - Inside source: true *** True Line Result - # If the mouse was lifted this tick -** Processing line: ~ if inputs.mouse.up~ + # Render special tiles +** Processing line: ~ render_tile(args, args.state.grid_start, start_color)~ - Inside source: true *** True Line Result - if inputs.mouse.up -** Processing line: ~ # Set current input to none~ + render_tile(args, args.state.grid_start, start_color) +** Processing line: ~ render_tile(args, args.state.grid_goal, goal_color)~ - Inside source: true *** True Line Result - # Set current input to none -** Processing line: ~ state.user_input = :none~ + render_tile(args, args.state.grid_goal, goal_color) +** Processing line: ~ args.state.walls.keys.each { |wall| render_tile(args, wall, wall_color) }~ - Inside source: true *** True Line Result - state.user_input = :none -** Processing line: ~ end~ + args.state.walls.keys.each { |wall| render_tile(args, wall, wall_color) } +** Processing line: ~ end~ - Inside source: true *** True Line Result - end + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # If the mouse was clicked this tick~ -- Inside source: true -*** True Line Result - # If the mouse was clicked this tick -** Processing line: ~ if inputs.mouse.down~ +** Processing line: ~ def render_vertical_line args, x~ - Inside source: true *** True Line Result - if inputs.mouse.down -** Processing line: ~ # Determine what the user is editing and appropriately edit the state.user_input variable~ + def render_vertical_line args, x +** Processing line: ~ args.outputs.lines << [~ - Inside source: true *** True Line Result - # Determine what the user is editing and appropriately edit the state.user_input variable -** Processing line: ~ determine_input~ + args.outputs.lines << [ +** Processing line: ~ x * args.state.tile_size,~ - Inside source: true *** True Line Result - determine_input -** Processing line: ~ end~ + x * args.state.tile_size, +** Processing line: ~ 0,~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + 0, +** Processing line: ~ x * args.state.tile_size,~ - Inside source: true *** True Line Result - -** Processing line: ~ # Process user input based on user_input variable and current mouse position~ + x * args.state.tile_size, +** Processing line: ~ args.state.tile_size * args.state.grid_size,~ - Inside source: true *** True Line Result - # Process user input based on user_input variable and current mouse position -** Processing line: ~ process_input~ + args.state.tile_size * args.state.grid_size, +** Processing line: ~ ]~ - Inside source: true *** True Line Result - process_input -** Processing line: ~ end~ + ] +** Processing line: ~ end~ - Inside source: true *** True Line Result - end + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Determines what the user is editing~ +** Processing line: ~ def render_horizontal_line args, y~ - Inside source: true *** True Line Result - # Determines what the user is editing -** Processing line: ~ # This method is called when the mouse is clicked down~ + def render_horizontal_line args, y +** Processing line: ~ args.outputs.lines << [~ - Inside source: true *** True Line Result - # This method is called when the mouse is clicked down -** Processing line: ~ def determine_input~ + args.outputs.lines << [ +** Processing line: ~ 0,~ - Inside source: true *** True Line Result - def determine_input -** Processing line: ~ # If the mouse is over the star in the first grid~ + 0, +** Processing line: ~ y * args.state.tile_size,~ - Inside source: true *** True Line Result - # If the mouse is over the star in the first grid -** Processing line: ~ if dijkstra_mouse_over_star?~ + y * args.state.tile_size, +** Processing line: ~ args.state.tile_size * args.state.grid_size,~ - Inside source: true *** True Line Result - if dijkstra_mouse_over_star? -** Processing line: ~ # The user is editing the star from the first grid~ + args.state.tile_size * args.state.grid_size, +** Processing line: ~ y * args.state.tile_size,~ - Inside source: true *** True Line Result - # The user is editing the star from the first grid -** Processing line: ~ state.user_input = :dijkstra_star~ + y * args.state.tile_size, +** Processing line: ~ ]~ - Inside source: true *** True Line Result - state.user_input = :dijkstra_star -** Processing line: ~ # If the mouse is over the star in the second grid~ + ] +** Processing line: ~ end~ - Inside source: true *** True Line Result - # If the mouse is over the star in the second grid -** Processing line: ~ elsif greedy_mouse_over_star?~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - elsif greedy_mouse_over_star? -** Processing line: ~ # The user is editing the star from the second grid~ + +** Processing line: ~ def render_tile args, tile, color~ - Inside source: true *** True Line Result - # The user is editing the star from the second grid -** Processing line: ~ state.user_input = :greedy_star~ + def render_tile args, tile, color +** Processing line: ~ args.outputs.solids << [~ - Inside source: true *** True Line Result - state.user_input = :greedy_star -** Processing line: ~ # If the mouse is over the star in the third grid~ + args.outputs.solids << [ +** Processing line: ~ tile.x * args.state.tile_size,~ - Inside source: true *** True Line Result - # If the mouse is over the star in the third grid -** Processing line: ~ elsif a_star_mouse_over_star?~ + tile.x * args.state.tile_size, +** Processing line: ~ tile.y * args.state.tile_size,~ - Inside source: true *** True Line Result - elsif a_star_mouse_over_star? -** Processing line: ~ # The user is editing the star from the third grid~ + tile.y * args.state.tile_size, +** Processing line: ~ args.state.tile_size,~ - Inside source: true *** True Line Result - # The user is editing the star from the third grid -** Processing line: ~ state.user_input = :a_star_star~ + args.state.tile_size, +** Processing line: ~ args.state.tile_size,~ - Inside source: true *** True Line Result - state.user_input = :a_star_star -** Processing line: ~ # If the mouse is over the target in the first grid~ + args.state.tile_size, +** Processing line: ~ color~ - Inside source: true *** True Line Result - # If the mouse is over the target in the first grid -** Processing line: ~ elsif dijkstra_mouse_over_target?~ + color +** Processing line: ~ ]~ - Inside source: true *** True Line Result - elsif dijkstra_mouse_over_target? -** Processing line: ~ # The user is editing the target from the first grid~ + ] +** Processing line: ~ end~ - Inside source: true *** True Line Result - # The user is editing the target from the first grid -** Processing line: ~ state.user_input = :dijkstra_target~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - state.user_input = :dijkstra_target -** Processing line: ~ # If the mouse is over the target in the second grid~ + +** Processing line: ~ def calc args~ - Inside source: true *** True Line Result - # If the mouse is over the target in the second grid -** Processing line: ~ elsif greedy_mouse_over_target?~ + def calc args +** Processing line: ~ calc_a_star args~ - Inside source: true *** True Line Result - elsif greedy_mouse_over_target? -** Processing line: ~ # The user is editing the target from the second grid~ + calc_a_star args +** Processing line: ~ calc_tanks args~ - Inside source: true *** True Line Result - # The user is editing the target from the second grid -** Processing line: ~ state.user_input = :greedy_target~ + calc_tanks args +** Processing line: ~ calc_turrets args~ - Inside source: true *** True Line Result - state.user_input = :greedy_target -** Processing line: ~ # If the mouse is over the target in the third grid~ + calc_turrets args +** Processing line: ~ calc_bullets args~ - Inside source: true *** True Line Result - # If the mouse is over the target in the third grid -** Processing line: ~ elsif a_star_mouse_over_target?~ + calc_bullets args +** Processing line: ~ end~ - Inside source: true *** True Line Result - elsif a_star_mouse_over_target? -** Processing line: ~ # The user is editing the target from the third grid~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - # The user is editing the target from the third grid -** Processing line: ~ state.user_input = :a_star_target~ + +** Processing line: ~ def calc_a_star args~ - Inside source: true *** True Line Result - state.user_input = :a_star_target -** Processing line: ~ # If the mouse is over a wall in the first grid~ + def calc_a_star args +** Processing line: ~ # Only does this one time~ - Inside source: true *** True Line Result - # If the mouse is over a wall in the first grid -** Processing line: ~ elsif dijkstra_mouse_over_wall?~ + # Only does this one time +** Processing line: ~ return unless args.state.a_star.path.empty?~ - Inside source: true *** True Line Result - elsif dijkstra_mouse_over_wall? -** Processing line: ~ # The user is removing a wall from the first grid~ + return unless args.state.a_star.path.empty? +** Processing line: ~~ - Inside source: true *** True Line Result - # The user is removing a wall from the first grid -** Processing line: ~ state.user_input = :dijkstra_remove_wall~ + +** Processing line: ~ # Start the search from the grid start~ - Inside source: true *** True Line Result - state.user_input = :dijkstra_remove_wall -** Processing line: ~ # If the mouse is over a wall in the second grid~ + # Start the search from the grid start +** Processing line: ~ args.state.a_star.frontier << args.state.grid_start~ - Inside source: true *** True Line Result - # If the mouse is over a wall in the second grid -** Processing line: ~ elsif greedy_mouse_over_wall?~ + args.state.a_star.frontier << args.state.grid_start +** Processing line: ~ args.state.a_star.came_from[args.state.grid_start] = nil~ - Inside source: true *** True Line Result - elsif greedy_mouse_over_wall? -** Processing line: ~ # The user is removing a wall from the second grid~ + args.state.a_star.came_from[args.state.grid_start] = nil +** Processing line: ~~ - Inside source: true *** True Line Result - # The user is removing a wall from the second grid -** Processing line: ~ state.user_input = :greedy_remove_wall~ + +** Processing line: ~ # Until a path to the goal has been found or there are no more tiles to explore~ - Inside source: true *** True Line Result - state.user_input = :greedy_remove_wall -** Processing line: ~ # If the mouse is over a wall in the third grid~ + # Until a path to the goal has been found or there are no more tiles to explore +** Processing line: ~ until (args.state.a_star.came_from.has_key?(args.state.grid_goal)|| args.state.a_star.frontier.empty?)~ - Inside source: true *** True Line Result - # If the mouse is over a wall in the third grid -** Processing line: ~ elsif a_star_mouse_over_wall?~ + until (args.state.a_star.came_from.has_key?(args.state.grid_goal)|| args.state.a_star.frontier.empty?) +** Processing line: ~ # For the first tile in the frontier~ - Inside source: true *** True Line Result - elsif a_star_mouse_over_wall? -** Processing line: ~ # The user is removing a wall from the third grid~ + # For the first tile in the frontier +** Processing line: ~ tile_to_expand_from = args.state.a_star.frontier.shift~ - Inside source: true *** True Line Result - # The user is removing a wall from the third grid -** Processing line: ~ state.user_input = :a_star_remove_wall~ + tile_to_expand_from = args.state.a_star.frontier.shift +** Processing line: ~ # Add each of its neighbors to the frontier~ - Inside source: true *** True Line Result - state.user_input = :a_star_remove_wall -** Processing line: ~ # If the mouse is over the first grid~ + # Add each of its neighbors to the frontier +** Processing line: ~ neighbors(args, tile_to_expand_from).each do | tile |~ - Inside source: true *** True Line Result - # If the mouse is over the first grid -** Processing line: ~ elsif dijkstra_mouse_over_grid?~ + neighbors(args, tile_to_expand_from).each do | tile | +** Processing line: ~ args.state.a_star.frontier << tile~ - Inside source: true *** True Line Result - elsif dijkstra_mouse_over_grid? -** Processing line: ~ # The user is adding a wall from the first grid~ + args.state.a_star.frontier << tile +** Processing line: ~ args.state.a_star.came_from[tile] = tile_to_expand_from~ - Inside source: true *** True Line Result - # The user is adding a wall from the first grid -** Processing line: ~ state.user_input = :dijkstra_add_wall~ + args.state.a_star.came_from[tile] = tile_to_expand_from +** Processing line: ~ end~ - Inside source: true *** True Line Result - state.user_input = :dijkstra_add_wall -** Processing line: ~ # If the mouse is over the second grid~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - # If the mouse is over the second grid -** Processing line: ~ elsif greedy_mouse_over_grid?~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - elsif greedy_mouse_over_grid? -** Processing line: ~ # The user is adding a wall from the second grid~ + +** Processing line: ~ # Stop calculating a path if the goal was never reached~ - Inside source: true *** True Line Result - # The user is adding a wall from the second grid -** Processing line: ~ state.user_input = :greedy_add_wall~ + # Stop calculating a path if the goal was never reached +** Processing line: ~ return unless args.state.a_star.came_from.has_key? args.state.grid_goal~ - Inside source: true *** True Line Result - state.user_input = :greedy_add_wall -** Processing line: ~ # If the mouse is over the third grid~ + return unless args.state.a_star.came_from.has_key? args.state.grid_goal +** Processing line: ~~ - Inside source: true *** True Line Result - # If the mouse is over the third grid -** Processing line: ~ elsif a_star_mouse_over_grid?~ + +** Processing line: ~ # Fill path by tracing back from the goal~ - Inside source: true *** True Line Result - elsif a_star_mouse_over_grid? -** Processing line: ~ # The user is adding a wall from the third grid~ + # Fill path by tracing back from the goal +** Processing line: ~ current_cell = args.state.grid_goal~ - Inside source: true *** True Line Result - # The user is adding a wall from the third grid -** Processing line: ~ state.user_input = :a_star_add_wall~ + current_cell = args.state.grid_goal +** Processing line: ~ while current_cell~ - Inside source: true *** True Line Result - state.user_input = :a_star_add_wall -** Processing line: ~ end~ + while current_cell +** Processing line: ~ args.state.a_star.path.unshift current_cell~ - Inside source: true *** True Line Result - end + args.state.a_star.path.unshift current_cell +** Processing line: ~ current_cell = args.state.a_star.came_from[current_cell]~ +- Inside source: true +*** True Line Result + current_cell = args.state.a_star.came_from[current_cell] ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -82272,110 +89279,102 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Processes click and drag based on what the user is currently dragging~ -- Inside source: true -*** True Line Result - # Processes click and drag based on what the user is currently dragging -** Processing line: ~ def process_input~ -- Inside source: true -*** True Line Result - def process_input -** Processing line: ~ if state.user_input == :dijkstra_star~ +** Processing line: ~ puts "The path has been calculated"~ - Inside source: true *** True Line Result - if state.user_input == :dijkstra_star -** Processing line: ~ process_input_dijkstra_star~ + puts "The path has been calculated" +** Processing line: ~ puts args.state.a_star.path~ - Inside source: true *** True Line Result - process_input_dijkstra_star -** Processing line: ~ elsif state.user_input == :greedy_star~ + puts args.state.a_star.path +** Processing line: ~ end~ - Inside source: true *** True Line Result - elsif state.user_input == :greedy_star -** Processing line: ~ process_input_greedy_star~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - process_input_greedy_star -** Processing line: ~ elsif state.user_input == :a_star_star~ + +** Processing line: ~ def calc_tanks args~ - Inside source: true *** True Line Result - elsif state.user_input == :a_star_star -** Processing line: ~ process_input_a_star_star~ + def calc_tanks args +** Processing line: ~ spawn_tank args~ - Inside source: true *** True Line Result - process_input_a_star_star -** Processing line: ~ elsif state.user_input == :dijkstra_target~ + spawn_tank args +** Processing line: ~ move_tanks args~ - Inside source: true *** True Line Result - elsif state.user_input == :dijkstra_target -** Processing line: ~ process_input_dijkstra_target~ + move_tanks args +** Processing line: ~ end~ - Inside source: true *** True Line Result - process_input_dijkstra_target -** Processing line: ~ elsif state.user_input == :greedy_target~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - elsif state.user_input == :greedy_target -** Processing line: ~ process_input_greedy_target~ + +** Processing line: ~ def move_tanks args~ - Inside source: true *** True Line Result - process_input_greedy_target -** Processing line: ~ elsif state.user_input == :a_star_target~ + def move_tanks args +** Processing line: ~ # Remove tanks that have reached the end of their path~ - Inside source: true *** True Line Result - elsif state.user_input == :a_star_target -** Processing line: ~ process_input_a_star_target~ + # Remove tanks that have reached the end of their path +** Processing line: ~ args.state.tanks.reject! { |tank| tank[:a_star].empty? }~ - Inside source: true *** True Line Result - process_input_a_star_target -** Processing line: ~ elsif state.user_input == :dijkstra_remove_wall~ + args.state.tanks.reject! { |tank| tank[:a_star].empty? } +** Processing line: ~~ - Inside source: true *** True Line Result - elsif state.user_input == :dijkstra_remove_wall -** Processing line: ~ process_input_dijkstra_remove_wall~ + +** Processing line: ~ # Tanks have an array that has each tile it has to go to in order from a* path~ - Inside source: true *** True Line Result - process_input_dijkstra_remove_wall -** Processing line: ~ elsif state.user_input == :greedy_remove_wall~ + # Tanks have an array that has each tile it has to go to in order from a* path +** Processing line: ~ args.state.tanks.each do | tank |~ - Inside source: true *** True Line Result - elsif state.user_input == :greedy_remove_wall -** Processing line: ~ process_input_greedy_remove_wall~ + args.state.tanks.each do | tank | +** Processing line: ~ destination = tank[:a_star][0]~ - Inside source: true *** True Line Result - process_input_greedy_remove_wall -** Processing line: ~ elsif state.user_input == :a_star_remove_wall~ + destination = tank[:a_star][0] +** Processing line: ~ # Move the tank towards the destination~ - Inside source: true *** True Line Result - elsif state.user_input == :a_star_remove_wall -** Processing line: ~ process_input_a_star_remove_wall~ + # Move the tank towards the destination +** Processing line: ~ tank[:x] += copy_sign(args.state.tank_speed, ((destination.x * args.state.tile_size) - tank[:x]))~ - Inside source: true *** True Line Result - process_input_a_star_remove_wall -** Processing line: ~ elsif state.user_input == :dijkstra_add_wall~ + tank[:x] += copy_sign(args.state.tank_speed, ((destination.x * args.state.tile_size) - tank[:x])) +** Processing line: ~ tank[:y] += copy_sign(args.state.tank_speed, ((destination.y * args.state.tile_size) - tank[:y]))~ - Inside source: true *** True Line Result - elsif state.user_input == :dijkstra_add_wall -** Processing line: ~ process_input_dijkstra_add_wall~ + tank[:y] += copy_sign(args.state.tank_speed, ((destination.y * args.state.tile_size) - tank[:y])) +** Processing line: ~ # If the tank has reached its destination~ - Inside source: true *** True Line Result - process_input_dijkstra_add_wall -** Processing line: ~ elsif state.user_input == :greedy_add_wall~ + # If the tank has reached its destination +** Processing line: ~ if (destination.x * args.state.tile_size) == tank[:x] and~ - Inside source: true *** True Line Result - elsif state.user_input == :greedy_add_wall -** Processing line: ~ process_input_greedy_add_wall~ + if (destination.x * args.state.tile_size) == tank[:x] and +** Processing line: ~ (destination.y * args.state.tile_size) == tank[:y]~ - Inside source: true *** True Line Result - process_input_greedy_add_wall -** Processing line: ~ elsif state.user_input == :a_star_add_wall~ + (destination.y * args.state.tile_size) == tank[:y] +** Processing line: ~ # Set the destination to the next point in the path~ - Inside source: true *** True Line Result - elsif state.user_input == :a_star_add_wall -** Processing line: ~ process_input_a_star_add_wall~ + # Set the destination to the next point in the path +** Processing line: ~ tank[:a_star].shift~ - Inside source: true *** True Line Result - process_input_a_star_add_wall + tank[:a_star].shift ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -82384,118 +89383,114 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result end +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def render_dijkstra_grid~ +** Processing line: ~ def calc_turrets args~ - Inside source: true *** True Line Result - def render_dijkstra_grid -** Processing line: ~ # A large rect the size of the grid~ + def calc_turrets args +** Processing line: ~ return unless args.state.tick_count.mod_zero? args.state.turret_shoot_period~ - Inside source: true *** True Line Result - # A large rect the size of the grid -** Processing line: ~ outputs.solids << [dijkstra_scale_up(grid.rect), default_color]~ + return unless args.state.tick_count.mod_zero? args.state.turret_shoot_period +** Processing line: ~ args.state.turrets.each do | turret |~ - Inside source: true *** True Line Result - outputs.solids << [dijkstra_scale_up(grid.rect), default_color] -** Processing line: ~~ + args.state.turrets.each do | turret | +** Processing line: ~ # Finds the closest tank~ - Inside source: true *** True Line Result - -** Processing line: ~ # The vertical grid lines~ + # Finds the closest tank +** Processing line: ~ target = nil~ - Inside source: true *** True Line Result - # The vertical grid lines -** Processing line: ~ for x in 0..grid.width~ + target = nil +** Processing line: ~ shortest_distance = turret[:range] + 1~ - Inside source: true *** True Line Result - for x in 0..grid.width -** Processing line: ~ outputs.lines << dijkstra_vertical_line(x)~ + shortest_distance = turret[:range] + 1 +** Processing line: ~ args.state.tanks.each do | tank |~ - Inside source: true *** True Line Result - outputs.lines << dijkstra_vertical_line(x) -** Processing line: ~ end~ + args.state.tanks.each do | tank | +** Processing line: ~ distance = distance_between(turret[:x], turret[:y], tank[:x], tank[:y])~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + distance = distance_between(turret[:x], turret[:y], tank[:x], tank[:y]) +** Processing line: ~ if distance < shortest_distance~ - Inside source: true *** True Line Result - -** Processing line: ~ # The horizontal grid lines~ + if distance < shortest_distance +** Processing line: ~ target = tank~ - Inside source: true *** True Line Result - # The horizontal grid lines -** Processing line: ~ for y in 0..grid.height~ + target = tank +** Processing line: ~ shortest_distance = distance~ - Inside source: true *** True Line Result - for y in 0..grid.height -** Processing line: ~ outputs.lines << dijkstra_horizontal_line(y)~ + shortest_distance = distance +** Processing line: ~ end~ - Inside source: true *** True Line Result - outputs.lines << dijkstra_horizontal_line(y) + end ** Processing line: ~ end~ - Inside source: true *** True Line Result end -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ def render_greedy_grid~ +** Processing line: ~ # If there is a tank in range, fires a bullet~ - Inside source: true *** True Line Result - def render_greedy_grid -** Processing line: ~ # A large rect the size of the grid~ + # If there is a tank in range, fires a bullet +** Processing line: ~ if target~ - Inside source: true *** True Line Result - # A large rect the size of the grid -** Processing line: ~ outputs.solids << [greedy_scale_up(grid.rect), default_color]~ + if target +** Processing line: ~ args.state.bullets << {~ - Inside source: true *** True Line Result - outputs.solids << [greedy_scale_up(grid.rect), default_color] -** Processing line: ~~ + args.state.bullets << { +** Processing line: ~ x: turret[:x],~ - Inside source: true *** True Line Result - -** Processing line: ~ # The vertical grid lines~ + x: turret[:x], +** Processing line: ~ y: turret[:y],~ - Inside source: true *** True Line Result - # The vertical grid lines -** Processing line: ~ for x in 0..grid.width~ + y: turret[:y], +** Processing line: ~ w: args.state.bullet_size,~ - Inside source: true *** True Line Result - for x in 0..grid.width -** Processing line: ~ outputs.lines << greedy_vertical_line(x)~ + w: args.state.bullet_size, +** Processing line: ~ h: args.state.bullet_size,~ - Inside source: true *** True Line Result - outputs.lines << greedy_vertical_line(x) -** Processing line: ~ end~ + h: args.state.bullet_size, +** Processing line: ~ path: args.state.bullet_path,~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + path: args.state.bullet_path, +** Processing line: ~ # Note that this makes it heat-seeking, because target is passed by reference~ - Inside source: true *** True Line Result - -** Processing line: ~ # The horizontal grid lines~ + # Note that this makes it heat-seeking, because target is passed by reference +** Processing line: ~ # Could do target.clone to make the bullet go to where the tank initially was~ - Inside source: true *** True Line Result - # The horizontal grid lines -** Processing line: ~ for y in 0..grid.height~ + # Could do target.clone to make the bullet go to where the tank initially was +** Processing line: ~ target: target~ - Inside source: true *** True Line Result - for y in 0..grid.height -** Processing line: ~ outputs.lines << greedy_horizontal_line(y)~ + target: target +** Processing line: ~ }~ - Inside source: true *** True Line Result - outputs.lines << greedy_horizontal_line(y) + } ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -82504,802 +89499,858 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result end +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def render_a_star_grid~ +** Processing line: ~ def calc_bullets args~ - Inside source: true *** True Line Result - def render_a_star_grid -** Processing line: ~ # A large rect the size of the grid~ + def calc_bullets args +** Processing line: ~ # Bullets aim for the center of their targets~ - Inside source: true *** True Line Result - # A large rect the size of the grid -** Processing line: ~ outputs.solids << [a_star_scale_up(grid.rect), default_color]~ + # Bullets aim for the center of their targets +** Processing line: ~ args.state.bullets.each { |bullet| move bullet, center_of(bullet[:target])}~ - Inside source: true *** True Line Result - outputs.solids << [a_star_scale_up(grid.rect), default_color] + args.state.bullets.each { |bullet| move bullet, center_of(bullet[:target])} +** Processing line: ~ args.state.bullets.reject! { |b| b.intersect_rect? b[:target] }~ +- Inside source: true +*** True Line Result + args.state.bullets.reject! { |b| b.intersect_rect? b[:target] } +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # The vertical grid lines~ +** Processing line: ~ def center_of object~ - Inside source: true *** True Line Result - # The vertical grid lines -** Processing line: ~ for x in 0..grid.width~ + def center_of object +** Processing line: ~ object = object.clone~ - Inside source: true *** True Line Result - for x in 0..grid.width -** Processing line: ~ outputs.lines << a_star_vertical_line(x)~ + object = object.clone +** Processing line: ~ object[:x] += 0.5~ - Inside source: true *** True Line Result - outputs.lines << a_star_vertical_line(x) -** Processing line: ~ end~ + object[:x] += 0.5 +** Processing line: ~ object[:y] += 0.5~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + object[:y] += 0.5 +** Processing line: ~ object~ - Inside source: true *** True Line Result - -** Processing line: ~ # The horizontal grid lines~ + object +** Processing line: ~ end~ - Inside source: true *** True Line Result - # The horizontal grid lines -** Processing line: ~ for y in 0..grid.height~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - for y in 0..grid.height -** Processing line: ~ outputs.lines << a_star_horizontal_line(y)~ + +** Processing line: ~ def render_a_star args~ - Inside source: true *** True Line Result - outputs.lines << a_star_horizontal_line(y) -** Processing line: ~ end~ + def render_a_star args +** Processing line: ~ args.state.a_star.path.map do |tile|~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + args.state.a_star.path.map do |tile| +** Processing line: ~ # Map each x, y coordinate to the center of the tile and scale up~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + # Map each x, y coordinate to the center of the tile and scale up +** Processing line: ~ [(tile.x + 0.5) * args.state.tile_size, (tile.y + 0.5) * args.state.tile_size]~ - Inside source: true *** True Line Result - -** Processing line: ~ # Returns a vertical line for a column of the first grid~ + [(tile.x + 0.5) * args.state.tile_size, (tile.y + 0.5) * args.state.tile_size] +** Processing line: ~ end.inject do | point_a, point_b |~ - Inside source: true *** True Line Result - # Returns a vertical line for a column of the first grid -** Processing line: ~ def dijkstra_vertical_line column~ + end.inject do | point_a, point_b | +** Processing line: ~ # Render the line between each point~ - Inside source: true *** True Line Result - def dijkstra_vertical_line column -** Processing line: ~ dijkstra_scale_up([column, 0, column, grid.height])~ + # Render the line between each point +** Processing line: ~ args.outputs.lines << [point_a.x, point_a.y, point_b.x, point_b.y, a_star_color]~ - Inside source: true *** True Line Result - dijkstra_scale_up([column, 0, column, grid.height]) + args.outputs.lines << [point_a.x, point_a.y, point_b.x, point_b.y, a_star_color] +** Processing line: ~ point_b~ +- Inside source: true +*** True Line Result + point_b ** Processing line: ~ end~ - Inside source: true *** True Line Result end +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Returns a horizontal line for a column of the first grid~ +** Processing line: ~ # Moves object to target at speed~ - Inside source: true *** True Line Result - # Returns a horizontal line for a column of the first grid -** Processing line: ~ def dijkstra_horizontal_line row~ + # Moves object to target at speed +** Processing line: ~ def move object, target, speed = 1~ - Inside source: true *** True Line Result - def dijkstra_horizontal_line row -** Processing line: ~ dijkstra_scale_up([0, row, grid.width, row])~ + def move object, target, speed = 1 +** Processing line: ~ if target.is_a? Hash~ - Inside source: true *** True Line Result - dijkstra_scale_up([0, row, grid.width, row]) -** Processing line: ~ end~ + if target.is_a? Hash +** Processing line: ~ object[:x] += copy_sign(speed, target[:x] - object[:x])~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + object[:x] += copy_sign(speed, target[:x] - object[:x]) +** Processing line: ~ object[:y] += copy_sign(speed, target[:y] - object[:y])~ - Inside source: true *** True Line Result - -** Processing line: ~ # Returns a vertical line for a column of the second grid~ + object[:y] += copy_sign(speed, target[:y] - object[:y]) +** Processing line: ~ else~ - Inside source: true *** True Line Result - # Returns a vertical line for a column of the second grid -** Processing line: ~ def greedy_vertical_line column~ + else +** Processing line: ~ object[:x] += copy_sign(speed, target.x - object[:x])~ - Inside source: true *** True Line Result - def greedy_vertical_line column -** Processing line: ~ dijkstra_scale_up([column + grid.width + 1, 0, column + grid.width + 1, grid.height])~ + object[:x] += copy_sign(speed, target.x - object[:x]) +** Processing line: ~ object[:y] += copy_sign(speed, target.y - object[:y])~ - Inside source: true *** True Line Result - dijkstra_scale_up([column + grid.width + 1, 0, column + grid.width + 1, grid.height]) + object[:y] += copy_sign(speed, target.y - object[:y]) ** Processing line: ~ end~ - Inside source: true *** True Line Result end -** Processing line: ~~ +** Processing line: ~ end~ - Inside source: true *** True Line Result - -** Processing line: ~ # Returns a horizontal line for a column of the second grid~ + end +** Processing line: ~ #~ - Inside source: true *** True Line Result - # Returns a horizontal line for a column of the second grid -** Processing line: ~ def greedy_horizontal_line row~ + # +** Processing line: ~ #~ - Inside source: true *** True Line Result - def greedy_horizontal_line row -** Processing line: ~ dijkstra_scale_up([grid.width + 1, row, grid.width + grid.width + 1, row])~ + # +** Processing line: ~ def distance_between a_x, a_y, b_x, b_y~ - Inside source: true *** True Line Result - dijkstra_scale_up([grid.width + 1, row, grid.width + grid.width + 1, row]) -** Processing line: ~ end~ + def distance_between a_x, a_y, b_x, b_y +** Processing line: ~ (((b_x - a_x) ** 2) + ((b_y - a_y) ** 2)) ** 0.5~ - Inside source: true *** True Line Result - end + (((b_x - a_x) ** 2) + ((b_y - a_y) ** 2)) ** 0.5 +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Returns a vertical line for a column of the third grid~ +** Processing line: ~ def copy_sign value, sign~ - Inside source: true *** True Line Result - # Returns a vertical line for a column of the third grid -** Processing line: ~ def a_star_vertical_line column~ + def copy_sign value, sign +** Processing line: ~ return 0 if sign == 0~ - Inside source: true *** True Line Result - def a_star_vertical_line column -** Processing line: ~ dijkstra_scale_up([column + (grid.width * 2) + 2, 0, column + (grid.width * 2) + 2, grid.height])~ + return 0 if sign == 0 +** Processing line: ~ return value if sign > 0~ - Inside source: true *** True Line Result - dijkstra_scale_up([column + (grid.width * 2) + 2, 0, column + (grid.width * 2) + 2, grid.height]) -** Processing line: ~ end~ + return value if sign > 0 +** Processing line: ~ -value~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + -value +** Processing line: ~ end~ - Inside source: true *** True Line Result - -** Processing line: ~ # Returns a horizontal line for a column of the third grid~ + end +** Processing line: ~ #~ - Inside source: true *** True Line Result - # Returns a horizontal line for a column of the third grid -** Processing line: ~ def a_star_horizontal_line row~ + # +** Processing line: ~ def spawn_tank args~ - Inside source: true *** True Line Result - def a_star_horizontal_line row -** Processing line: ~ dijkstra_scale_up([(grid.width * 2) + 2, row, (grid.width * 2) + grid.width + 2, row])~ + def spawn_tank args +** Processing line: ~ return unless args.state.tick_count.mod_zero? args.state.tank_spawn_period~ - Inside source: true *** True Line Result - dijkstra_scale_up([(grid.width * 2) + 2, row, (grid.width * 2) + grid.width + 2, row]) -** Processing line: ~ end~ + return unless args.state.tick_count.mod_zero? args.state.tank_spawn_period +** Processing line: ~ args.state.tanks << {~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + args.state.tanks << { +** Processing line: ~ x: args.state.grid_start.x,~ - Inside source: true *** True Line Result - -** Processing line: ~ # Renders the star on the first grid~ + x: args.state.grid_start.x, +** Processing line: ~ y: args.state.grid_start.y,~ - Inside source: true *** True Line Result - # Renders the star on the first grid -** Processing line: ~ def render_dijkstra_star~ + y: args.state.grid_start.y, +** Processing line: ~ w: args.state.tile_size,~ - Inside source: true *** True Line Result - def render_dijkstra_star -** Processing line: ~ outputs.sprites << [dijkstra_scale_up(grid.star), 'star.png']~ + w: args.state.tile_size, +** Processing line: ~ h: args.state.tile_size,~ - Inside source: true *** True Line Result - outputs.sprites << [dijkstra_scale_up(grid.star), 'star.png'] -** Processing line: ~ end~ + h: args.state.tile_size, +** Processing line: ~ path: args.state.tank_sprite_path,~ - Inside source: true *** True Line Result - end + path: args.state.tank_sprite_path, +** Processing line: ~ a_star: args.state.a_star.path.clone~ +- Inside source: true +*** True Line Result + a_star: args.state.a_star.path.clone +** Processing line: ~ }~ +- Inside source: true +*** True Line Result + } +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Renders the star on the second grid~ +** Processing line: ~ def neighbors args, tile~ - Inside source: true *** True Line Result - # Renders the star on the second grid -** Processing line: ~ def render_greedy_star~ + def neighbors args, tile +** Processing line: ~ [[tile.x, tile.y - 1],~ - Inside source: true *** True Line Result - def render_greedy_star -** Processing line: ~ outputs.sprites << [greedy_scale_up(grid.star), 'star.png']~ + [[tile.x, tile.y - 1], +** Processing line: ~ [tile.x, tile.y + 1],~ - Inside source: true *** True Line Result - outputs.sprites << [greedy_scale_up(grid.star), 'star.png'] -** Processing line: ~ end~ + [tile.x, tile.y + 1], +** Processing line: ~ [tile.x + 1, tile.y],~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + [tile.x + 1, tile.y], +** Processing line: ~ [tile.x - 1, tile.y]].reject do | neighbor |~ - Inside source: true *** True Line Result - -** Processing line: ~ # Renders the star on the third grid~ + [tile.x - 1, tile.y]].reject do | neighbor | +** Processing line: ~ args.state.a_star.came_from.has_key?(neighbor) or~ - Inside source: true *** True Line Result - # Renders the star on the third grid -** Processing line: ~ def render_a_star_star~ + args.state.a_star.came_from.has_key?(neighbor) or +** Processing line: ~ tile_out_of_bounds?(args, neighbor) or~ - Inside source: true *** True Line Result - def render_a_star_star -** Processing line: ~ outputs.sprites << [a_star_scale_up(grid.star), 'star.png']~ + tile_out_of_bounds?(args, neighbor) or +** Processing line: ~ args.state.walls.has_key? neighbor~ - Inside source: true *** True Line Result - outputs.sprites << [a_star_scale_up(grid.star), 'star.png'] + args.state.walls.has_key? neighbor ** Processing line: ~ end~ - Inside source: true *** True Line Result end -** Processing line: ~~ +** Processing line: ~ end~ - Inside source: true *** True Line Result - -** Processing line: ~ # Renders the target on the first grid~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - # Renders the target on the first grid -** Processing line: ~ def render_dijkstra_target~ + +** Processing line: ~ def tile_out_of_bounds? args, tile~ - Inside source: true *** True Line Result - def render_dijkstra_target -** Processing line: ~ outputs.sprites << [dijkstra_scale_up(grid.target), 'target.png']~ + def tile_out_of_bounds? args, tile +** Processing line: ~ tile.x < 0 or tile.y < 0 or tile.x >= args.state.grid_size or tile.y >= args.state.grid_size~ - Inside source: true *** True Line Result - outputs.sprites << [dijkstra_scale_up(grid.target), 'target.png'] -** Processing line: ~ end~ + tile.x < 0 or tile.y < 0 or tile.x >= args.state.grid_size or tile.y >= args.state.grid_size +** Processing line: ~ end~ - Inside source: true *** True Line Result - end + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Renders the target on the second grid~ -- Inside source: true -*** True Line Result - # Renders the target on the second grid -** Processing line: ~ def render_greedy_target~ +** Processing line: ~ def grid_color~ - Inside source: true *** True Line Result - def render_greedy_target -** Processing line: ~ outputs.sprites << [greedy_scale_up(grid.target), 'target.png']~ + def grid_color +** Processing line: ~ [133, 226, 144]~ - Inside source: true *** True Line Result - outputs.sprites << [greedy_scale_up(grid.target), 'target.png'] -** Processing line: ~ end~ + [133, 226, 144] +** Processing line: ~ end~ - Inside source: true *** True Line Result - end + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Renders the target on the third grid~ -- Inside source: true -*** True Line Result - # Renders the target on the third grid -** Processing line: ~ def render_a_star_target~ +** Processing line: ~ def start_color~ - Inside source: true *** True Line Result - def render_a_star_target -** Processing line: ~ outputs.sprites << [a_star_scale_up(grid.target), 'target.png']~ + def start_color +** Processing line: ~ [226, 144, 133]~ - Inside source: true *** True Line Result - outputs.sprites << [a_star_scale_up(grid.target), 'target.png'] -** Processing line: ~ end~ + [226, 144, 133] +** Processing line: ~ end~ - Inside source: true *** True Line Result - end + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Renders the walls on the first grid~ +** Processing line: ~ def goal_color~ - Inside source: true *** True Line Result - # Renders the walls on the first grid -** Processing line: ~ def render_dijkstra_walls~ + def goal_color +** Processing line: ~ [226, 133, 144]~ - Inside source: true *** True Line Result - def render_dijkstra_walls -** Processing line: ~ grid.walls.each_key do | wall |~ + [226, 133, 144] +** Processing line: ~ end~ - Inside source: true *** True Line Result - grid.walls.each_key do | wall | -** Processing line: ~ outputs.solids << [dijkstra_scale_up(wall), wall_color]~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - outputs.solids << [dijkstra_scale_up(wall), wall_color] -** Processing line: ~ end~ + +** Processing line: ~ def wall_color~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + def wall_color +** Processing line: ~ [133, 144, 226]~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + [133, 144, 226] +** Processing line: ~ end~ - Inside source: true *** True Line Result - -** Processing line: ~ # Renders the walls on the second grid~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - # Renders the walls on the second grid -** Processing line: ~ def render_greedy_walls~ + +** Processing line: ~ def a_star_color~ - Inside source: true *** True Line Result - def render_greedy_walls -** Processing line: ~ grid.walls.each_key do | wall |~ + def a_star_color +** Processing line: ~ [0, 0, 255]~ - Inside source: true *** True Line Result - grid.walls.each_key do | wall | -** Processing line: ~ outputs.solids << [greedy_scale_up(wall), wall_color]~ + [0, 0, 255] +** Processing line: ~ end~ - Inside source: true *** True Line Result - outputs.solids << [greedy_scale_up(wall), wall_color] -** Processing line: ~ end~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ -- Inside source: true + +** Processing line: ~#+end_src~ +- Line was identified as the end of a code block. *** True Line Result - end +#+end_src ** Processing line: ~~ -- Inside source: true +- End of paragraph detected. *** True Line Result -** Processing line: ~ # Renders the walls on the third grid~ -- Inside source: true +** Processing line: ~*** 3d - 3d Cube - main.rb~ +- Header detected. *** True Line Result - # Renders the walls on the third grid -** Processing line: ~ def render_a_star_walls~ -- Inside source: true + *** True Line Result - def render_a_star_walls -** Processing line: ~ grid.walls.each_key do | wall |~ +*** 3d - 3d Cube - main.rb +** Processing line: ~#+begin_src ruby~ +- Line was identified as the beginning of a code block. +*** True Line Result + +*** True Line Result +#+begin_src ruby +** Processing line: ~ # ./samples/99_genre_3d/01_3d_cube/app/main.rb~ - Inside source: true *** True Line Result - grid.walls.each_key do | wall | -** Processing line: ~ outputs.solids << [a_star_scale_up(wall), wall_color]~ + # ./samples/99_genre_3d/01_3d_cube/app/main.rb +** Processing line: ~ STARTX = 0.0~ - Inside source: true *** True Line Result - outputs.solids << [a_star_scale_up(wall), wall_color] -** Processing line: ~ end~ + STARTX = 0.0 +** Processing line: ~ STARTY = 0.0~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + STARTY = 0.0 +** Processing line: ~ ENDY = 20.0~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + ENDY = 20.0 +** Processing line: ~ ENDX = 20.0~ - Inside source: true *** True Line Result - -** Processing line: ~ # Renders the visited cells on the first grid~ + ENDX = 20.0 +** Processing line: ~ SPINPOINT = 10~ - Inside source: true *** True Line Result - # Renders the visited cells on the first grid -** Processing line: ~ def render_dijkstra_visited~ + SPINPOINT = 10 +** Processing line: ~ SPINDURATION = 400~ - Inside source: true *** True Line Result - def render_dijkstra_visited -** Processing line: ~ dijkstra.came_from.each_key do | visited_cell |~ + SPINDURATION = 400 +** Processing line: ~ POINTSIZE = 8~ - Inside source: true *** True Line Result - dijkstra.came_from.each_key do | visited_cell | -** Processing line: ~ outputs.solids << [dijkstra_scale_up(visited_cell), visited_color]~ + POINTSIZE = 8 +** Processing line: ~ BOXDEPTH = 40~ - Inside source: true *** True Line Result - outputs.solids << [dijkstra_scale_up(visited_cell), visited_color] -** Processing line: ~ end~ + BOXDEPTH = 40 +** Processing line: ~ YAW = 1~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + YAW = 1 +** Processing line: ~ DISTANCE = 10~ - Inside source: true *** True Line Result - end + DISTANCE = 10 ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Renders the visited cells on the second grid~ +** Processing line: ~ def tick args~ - Inside source: true *** True Line Result - # Renders the visited cells on the second grid -** Processing line: ~ def render_greedy_visited~ + def tick args +** Processing line: ~ args.outputs.background_color = [0, 0, 0]~ - Inside source: true *** True Line Result - def render_greedy_visited -** Processing line: ~ greedy.came_from.each_key do | visited_cell |~ + args.outputs.background_color = [0, 0, 0] +** Processing line: ~ a = Math.sin(args.state.tick_count / SPINDURATION) * Math.tan(args.state.tick_count / SPINDURATION)~ - Inside source: true *** True Line Result - greedy.came_from.each_key do | visited_cell | -** Processing line: ~ outputs.solids << [greedy_scale_up(visited_cell), visited_color]~ + a = Math.sin(args.state.tick_count / SPINDURATION) * Math.tan(args.state.tick_count / SPINDURATION) +** Processing line: ~ s = Math.sin(a)~ - Inside source: true *** True Line Result - outputs.solids << [greedy_scale_up(visited_cell), visited_color] -** Processing line: ~ end~ + s = Math.sin(a) +** Processing line: ~ c = Math.cos(a)~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + c = Math.cos(a) +** Processing line: ~ x = STARTX~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + x = STARTX +** Processing line: ~ y = STARTY~ - Inside source: true *** True Line Result - -** Processing line: ~ # Renders the visited cells on the third grid~ + y = STARTY +** Processing line: ~ offset_x = (1280 - (ENDX - STARTX)) / 2~ - Inside source: true *** True Line Result - # Renders the visited cells on the third grid -** Processing line: ~ def render_a_star_visited~ + offset_x = (1280 - (ENDX - STARTX)) / 2 +** Processing line: ~ offset_y = (360 - (ENDY - STARTY)) / 2~ - Inside source: true *** True Line Result - def render_a_star_visited -** Processing line: ~ a_star.came_from.each_key do | visited_cell |~ + offset_y = (360 - (ENDY - STARTY)) / 2 +** Processing line: ~~ - Inside source: true *** True Line Result - a_star.came_from.each_key do | visited_cell | -** Processing line: ~ outputs.solids << [a_star_scale_up(visited_cell), visited_color]~ + +** Processing line: ~ srand(1)~ - Inside source: true *** True Line Result - outputs.solids << [a_star_scale_up(visited_cell), visited_color] -** Processing line: ~ end~ + srand(1) +** Processing line: ~ while y < ENDY do~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + while y < ENDY do +** Processing line: ~ while x < ENDX do~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + while x < ENDX do +** Processing line: ~ if (y == STARTY ||~ - Inside source: true *** True Line Result - -** Processing line: ~ # Renders the path found by the breadth first search on the first grid~ + if (y == STARTY || +** Processing line: ~ y == (ENDY / 0.5) * 2 ||~ - Inside source: true *** True Line Result - # Renders the path found by the breadth first search on the first grid -** Processing line: ~ def render_dijkstra_path~ + y == (ENDY / 0.5) * 2 || +** Processing line: ~ y == (ENDY / 0.5) * 2 + 0.5 ||~ - Inside source: true *** True Line Result - def render_dijkstra_path -** Processing line: ~ dijkstra.path.each do | path |~ + y == (ENDY / 0.5) * 2 + 0.5 || +** Processing line: ~ y == ENDY - 0.5 ||~ - Inside source: true *** True Line Result - dijkstra.path.each do | path | -** Processing line: ~ outputs.solids << [dijkstra_scale_up(path), path_color]~ + y == ENDY - 0.5 || +** Processing line: ~ x == STARTX ||~ - Inside source: true *** True Line Result - outputs.solids << [dijkstra_scale_up(path), path_color] -** Processing line: ~ end~ + x == STARTX || +** Processing line: ~ x == ENDX - 0.5)~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + x == ENDX - 0.5) +** Processing line: ~ z = rand(BOXDEPTH)~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + z = rand(BOXDEPTH) +** Processing line: ~ z *= Math.sin(a / 2)~ - Inside source: true *** True Line Result - -** Processing line: ~ # Renders the path found by the greedy search on the second grid~ + z *= Math.sin(a / 2) +** Processing line: ~ x -= SPINPOINT~ - Inside source: true *** True Line Result - # Renders the path found by the greedy search on the second grid -** Processing line: ~ def render_greedy_path~ + x -= SPINPOINT +** Processing line: ~ u = (x * c) - (z * s)~ - Inside source: true *** True Line Result - def render_greedy_path -** Processing line: ~ greedy.path.each do | path |~ + u = (x * c) - (z * s) +** Processing line: ~ v = (x * s) + (z * c)~ - Inside source: true *** True Line Result - greedy.path.each do | path | -** Processing line: ~ outputs.solids << [greedy_scale_up(path), path_color]~ + v = (x * s) + (z * c) +** Processing line: ~ k = DISTANCE.fdiv(100) + (v / 500 * YAW)~ - Inside source: true *** True Line Result - outputs.solids << [greedy_scale_up(path), path_color] -** Processing line: ~ end~ + k = DISTANCE.fdiv(100) + (v / 500 * YAW) +** Processing line: ~ u = u / k~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + u = u / k +** Processing line: ~ v = y / k~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + v = y / k +** Processing line: ~ w = POINTSIZE / 10 / k~ - Inside source: true *** True Line Result - -** Processing line: ~ # Renders the path found by the a_star search on the third grid~ + w = POINTSIZE / 10 / k +** Processing line: ~ args.outputs.sprites << { x: offset_x + u - w, y: offset_y + v - w, w: w, h: w, path: 'sprites/square-blue.png'}~ - Inside source: true *** True Line Result - # Renders the path found by the a_star search on the third grid -** Processing line: ~ def render_a_star_path~ + args.outputs.sprites << { x: offset_x + u - w, y: offset_y + v - w, w: w, h: w, path: 'sprites/square-blue.png'} +** Processing line: ~ x += SPINPOINT~ - Inside source: true *** True Line Result - def render_a_star_path -** Processing line: ~ a_star.path.each do | path |~ + x += SPINPOINT +** Processing line: ~ end~ - Inside source: true *** True Line Result - a_star.path.each do | path | -** Processing line: ~ outputs.solids << [a_star_scale_up(path), path_color]~ + end +** Processing line: ~ x += 0.5~ - Inside source: true *** True Line Result - outputs.solids << [a_star_scale_up(path), path_color] + x += 0.5 ** Processing line: ~ end~ - Inside source: true *** True Line Result end +** Processing line: ~ y += 0.5~ +- Inside source: true +*** True Line Result + y += 0.5 +** Processing line: ~ x = STARTX~ +- Inside source: true +*** True Line Result + x = STARTX ** Processing line: ~ end~ - Inside source: true *** True Line Result end +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Returns the rect for the path between two cells based on their relative positions~ +** Processing line: ~ $gtk.reset~ - Inside source: true *** True Line Result - # Returns the rect for the path between two cells based on their relative positions -** Processing line: ~ def get_path_between(cell_one, cell_two)~ + $gtk.reset +** Processing line: ~~ - Inside source: true *** True Line Result - def get_path_between(cell_one, cell_two) -** Processing line: ~ path = []~ -- Inside source: true + +** Processing line: ~#+end_src~ +- Line was identified as the end of a code block. *** True Line Result - path = [] +#+end_src ** Processing line: ~~ -- Inside source: true +- End of paragraph detected. *** True Line Result -** Processing line: ~ # If cell one is above cell two~ +** Processing line: ~*** 3d - Wireframe - main.rb~ +- Header detected. +*** True Line Result + +*** True Line Result +*** 3d - Wireframe - main.rb +** Processing line: ~#+begin_src ruby~ +- Line was identified as the beginning of a code block. +*** True Line Result + +*** True Line Result +#+begin_src ruby +** Processing line: ~ # ./samples/99_genre_3d/02_wireframe/app/main.rb~ - Inside source: true *** True Line Result - # If cell one is above cell two -** Processing line: ~ if cell_one.x == cell_two.x and cell_one.y > cell_two.y~ + # ./samples/99_genre_3d/02_wireframe/app/main.rb +** Processing line: ~ def tick args~ - Inside source: true *** True Line Result - if cell_one.x == cell_two.x and cell_one.y > cell_two.y -** Processing line: ~ # Path starts from the center of cell two and moves upward to the center of cell one~ + def tick args +** Processing line: ~ args.state.model ||= Object3D.new('data/shuttle.off')~ - Inside source: true *** True Line Result - # Path starts from the center of cell two and moves upward to the center of cell one -** Processing line: ~ path = [cell_two.x + 0.3, cell_two.y + 0.3, 0.4, 1.4]~ + args.state.model ||= Object3D.new('data/shuttle.off') +** Processing line: ~ args.state.mtx ||= rotate3D(0, 0, 0)~ - Inside source: true *** True Line Result - path = [cell_two.x + 0.3, cell_two.y + 0.3, 0.4, 1.4] -** Processing line: ~ # If cell one is below cell two~ + args.state.mtx ||= rotate3D(0, 0, 0) +** Processing line: ~ args.state.inv_mtx ||= rotate3D(0, 0, 0)~ - Inside source: true *** True Line Result - # If cell one is below cell two -** Processing line: ~ elsif cell_one.x == cell_two.x and cell_one.y < cell_two.y~ + args.state.inv_mtx ||= rotate3D(0, 0, 0) +** Processing line: ~ delta_mtx = rotate3D(args.inputs.up_down * 0.01, input_roll(args) * 0.01, args.inputs.left_right * 0.01)~ - Inside source: true *** True Line Result - elsif cell_one.x == cell_two.x and cell_one.y < cell_two.y -** Processing line: ~ # Path starts from the center of cell one and moves upward to the center of cell two~ + delta_mtx = rotate3D(args.inputs.up_down * 0.01, input_roll(args) * 0.01, args.inputs.left_right * 0.01) +** Processing line: ~ args.outputs.lines << args.state.model.edges~ - Inside source: true *** True Line Result - # Path starts from the center of cell one and moves upward to the center of cell two -** Processing line: ~ path = [cell_one.x + 0.3, cell_one.y + 0.3, 0.4, 1.4]~ + args.outputs.lines << args.state.model.edges +** Processing line: ~ args.state.model.fast_3x3_transform! args.state.inv_mtx~ - Inside source: true *** True Line Result - path = [cell_one.x + 0.3, cell_one.y + 0.3, 0.4, 1.4] -** Processing line: ~ # If cell one is to the left of cell two~ + args.state.model.fast_3x3_transform! args.state.inv_mtx +** Processing line: ~ args.state.inv_mtx = mtx_mul(delta_mtx.transpose, args.state.inv_mtx)~ - Inside source: true *** True Line Result - # If cell one is to the left of cell two -** Processing line: ~ elsif cell_one.x > cell_two.x and cell_one.y == cell_two.y~ + args.state.inv_mtx = mtx_mul(delta_mtx.transpose, args.state.inv_mtx) +** Processing line: ~ args.state.mtx = mtx_mul(args.state.mtx, delta_mtx)~ - Inside source: true *** True Line Result - elsif cell_one.x > cell_two.x and cell_one.y == cell_two.y -** Processing line: ~ # Path starts from the center of cell two and moves rightward to the center of cell one~ + args.state.mtx = mtx_mul(args.state.mtx, delta_mtx) +** Processing line: ~ args.state.model.fast_3x3_transform! args.state.mtx~ - Inside source: true *** True Line Result - # Path starts from the center of cell two and moves rightward to the center of cell one -** Processing line: ~ path = [cell_two.x + 0.3, cell_two.y + 0.3, 1.4, 0.4]~ + args.state.model.fast_3x3_transform! args.state.mtx +** Processing line: ~ args.outputs.background_color = [0, 0, 0]~ - Inside source: true *** True Line Result - path = [cell_two.x + 0.3, cell_two.y + 0.3, 1.4, 0.4] -** Processing line: ~ # If cell one is to the right of cell two~ + args.outputs.background_color = [0, 0, 0] +** Processing line: ~ args.outputs.debug << args.gtk.framerate_diagnostics_primitives~ - Inside source: true *** True Line Result - # If cell one is to the right of cell two -** Processing line: ~ elsif cell_one.x < cell_two.x and cell_one.y == cell_two.y~ + args.outputs.debug << args.gtk.framerate_diagnostics_primitives +** Processing line: ~ end~ - Inside source: true *** True Line Result - elsif cell_one.x < cell_two.x and cell_one.y == cell_two.y -** Processing line: ~ # Path starts from the center of cell one and moves rightward to the center of cell two~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - # Path starts from the center of cell one and moves rightward to the center of cell two -** Processing line: ~ path = [cell_one.x + 0.3, cell_one.y + 0.3, 1.4, 0.4]~ + +** Processing line: ~ def input_roll args~ - Inside source: true *** True Line Result - path = [cell_one.x + 0.3, cell_one.y + 0.3, 1.4, 0.4] -** Processing line: ~ end~ + def input_roll args +** Processing line: ~ roll = 0~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + roll = 0 +** Processing line: ~ roll += 1 if args.inputs.keyboard.e~ - Inside source: true *** True Line Result - -** Processing line: ~ path~ + roll += 1 if args.inputs.keyboard.e +** Processing line: ~ roll -= 1 if args.inputs.keyboard.q~ - Inside source: true *** True Line Result - path -** Processing line: ~ end~ + roll -= 1 if args.inputs.keyboard.q +** Processing line: ~ roll~ - Inside source: true *** True Line Result - end + roll +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # In code, the cells are represented as 1x1 rectangles~ +** Processing line: ~ def rotate3D(theta_x = 0.1, theta_y = 0.1, theta_z = 0.1)~ - Inside source: true *** True Line Result - # In code, the cells are represented as 1x1 rectangles -** Processing line: ~ # When drawn, the cells are larger than 1x1 rectangles~ + def rotate3D(theta_x = 0.1, theta_y = 0.1, theta_z = 0.1) +** Processing line: ~ c_x, s_x = Math.cos(theta_x), Math.sin(theta_x)~ - Inside source: true *** True Line Result - # When drawn, the cells are larger than 1x1 rectangles -** Processing line: ~ # This method is used to scale up cells, and lines~ + c_x, s_x = Math.cos(theta_x), Math.sin(theta_x) +** Processing line: ~ c_y, s_y = Math.cos(theta_y), Math.sin(theta_y)~ - Inside source: true *** True Line Result - # This method is used to scale up cells, and lines -** Processing line: ~ # Objects are scaled up according to the grid.cell_size variable~ + c_y, s_y = Math.cos(theta_y), Math.sin(theta_y) +** Processing line: ~ c_z, s_z = Math.cos(theta_z), Math.sin(theta_z)~ - Inside source: true *** True Line Result - # Objects are scaled up according to the grid.cell_size variable -** Processing line: ~ # This allows for easy customization of the visual scale of the grid~ + c_z, s_z = Math.cos(theta_z), Math.sin(theta_z) +** Processing line: ~ rot_x = [[1, 0, 0], [0, c_x, -s_x], [0, s_x, c_x]]~ - Inside source: true *** True Line Result - # This allows for easy customization of the visual scale of the grid -** Processing line: ~ # This method scales up cells for the first grid~ + rot_x = [[1, 0, 0], [0, c_x, -s_x], [0, s_x, c_x]] +** Processing line: ~ rot_y = [[c_y, 0, s_y], [0, 1, 0], [-s_y, 0, c_y]]~ - Inside source: true *** True Line Result - # This method scales up cells for the first grid -** Processing line: ~ def dijkstra_scale_up(cell)~ + rot_y = [[c_y, 0, s_y], [0, 1, 0], [-s_y, 0, c_y]] +** Processing line: ~ rot_z = [[c_z, -s_z, 0], [s_z, c_z, 0], [0, 0, 1]]~ - Inside source: true *** True Line Result - def dijkstra_scale_up(cell) -** Processing line: ~ # Prevents the original value of cell from being edited~ + rot_z = [[c_z, -s_z, 0], [s_z, c_z, 0], [0, 0, 1]] +** Processing line: ~ mtx_mul(mtx_mul(rot_x, rot_y), rot_z)~ - Inside source: true *** True Line Result - # Prevents the original value of cell from being edited -** Processing line: ~ cell = cell.clone~ + mtx_mul(mtx_mul(rot_x, rot_y), rot_z) +** Processing line: ~ end~ - Inside source: true *** True Line Result - cell = cell.clone + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # If cell is just an x and y coordinate~ -- Inside source: true -*** True Line Result - # If cell is just an x and y coordinate -** Processing line: ~ if cell.size == 2~ -- Inside source: true -*** True Line Result - if cell.size == 2 -** Processing line: ~ # Add a width and height of 1~ +** Processing line: ~ def mtx_mul(a, b)~ - Inside source: true *** True Line Result - # Add a width and height of 1 -** Processing line: ~ cell << 1~ + def mtx_mul(a, b) +** Processing line: ~ is = (0...a.length)~ - Inside source: true *** True Line Result - cell << 1 -** Processing line: ~ cell << 1~ + is = (0...a.length) +** Processing line: ~ js = (0...b[0].length)~ - Inside source: true *** True Line Result - cell << 1 -** Processing line: ~ end~ + js = (0...b[0].length) +** Processing line: ~ ks = (0...b.length)~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + ks = (0...b.length) +** Processing line: ~ is.map do |i|~ - Inside source: true *** True Line Result - -** Processing line: ~ # Scale all the values up~ + is.map do |i| +** Processing line: ~ js.map do |j|~ - Inside source: true *** True Line Result - # Scale all the values up -** Processing line: ~ cell.map! { |value| value * grid.cell_size }~ + js.map do |j| +** Processing line: ~ ks.map do |k|~ - Inside source: true *** True Line Result - cell.map! { |value| value * grid.cell_size } -** Processing line: ~~ + ks.map do |k| +** Processing line: ~ a[i][k] * b[k][j]~ - Inside source: true *** True Line Result - -** Processing line: ~ # Returns the scaled up cell~ + a[i][k] * b[k][j] +** Processing line: ~ end.reduce(&:plus)~ - Inside source: true *** True Line Result - # Returns the scaled up cell -** Processing line: ~ cell~ + end.reduce(&:plus) +** Processing line: ~ end~ - Inside source: true *** True Line Result - cell + end ** Processing line: ~ end~ - Inside source: true *** True Line Result end +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Translates the given cell grid.width + 1 to the right and then scales up~ +** Processing line: ~ class Object3D~ - Inside source: true *** True Line Result - # Translates the given cell grid.width + 1 to the right and then scales up -** Processing line: ~ # Used to draw cells for the second grid~ + class Object3D +** Processing line: ~ attr_reader :vert_count, :face_count, :edge_count, :verts, :faces, :edges~ - Inside source: true *** True Line Result - # Used to draw cells for the second grid -** Processing line: ~ # This method does not work for lines,~ + attr_reader :vert_count, :face_count, :edge_count, :verts, :faces, :edges +** Processing line: ~~ - Inside source: true *** True Line Result - # This method does not work for lines, -** Processing line: ~ # so separate methods exist for the grid lines~ + +** Processing line: ~ def initialize(path)~ - Inside source: true *** True Line Result - # so separate methods exist for the grid lines -** Processing line: ~ def greedy_scale_up(cell)~ + def initialize(path) +** Processing line: ~ @vert_count = 0~ - Inside source: true *** True Line Result - def greedy_scale_up(cell) -** Processing line: ~ # Prevents the original value of cell from being edited~ + @vert_count = 0 +** Processing line: ~ @face_count = 0~ - Inside source: true *** True Line Result - # Prevents the original value of cell from being edited -** Processing line: ~ cell = cell.clone~ + @face_count = 0 +** Processing line: ~ @edge_count = 0~ - Inside source: true *** True Line Result - cell = cell.clone -** Processing line: ~ # Translates the cell to the second grid equivalent~ + @edge_count = 0 +** Processing line: ~ @verts = []~ - Inside source: true *** True Line Result - # Translates the cell to the second grid equivalent -** Processing line: ~ cell.x += grid.width + 1~ + @verts = [] +** Processing line: ~ @faces = []~ - Inside source: true *** True Line Result - cell.x += grid.width + 1 -** Processing line: ~ # Proceeds as if scaling up for the first grid~ + @faces = [] +** Processing line: ~ @edges = []~ - Inside source: true *** True Line Result - # Proceeds as if scaling up for the first grid -** Processing line: ~ dijkstra_scale_up(cell)~ + @edges = [] +** Processing line: ~ _init_from_file path~ - Inside source: true *** True Line Result - dijkstra_scale_up(cell) + _init_from_file path ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -83308,98 +90359,98 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Translates the given cell (grid.width + 1) * 2 to the right and then scales up~ +** Processing line: ~ def _init_from_file path~ - Inside source: true *** True Line Result - # Translates the given cell (grid.width + 1) * 2 to the right and then scales up -** Processing line: ~ # Used to draw cells for the third grid~ + def _init_from_file path +** Processing line: ~ file_lines = $gtk.read_file(path).split("\n")~ - Inside source: true *** True Line Result - # Used to draw cells for the third grid -** Processing line: ~ # This method does not work for lines,~ + file_lines = $gtk.read_file(path).split("\n") +** Processing line: ~ .reject { |line| line.start_with?('#') || line.split(' ').length == 0 } # Strip out simple comments and blank lines~ - Inside source: true *** True Line Result - # This method does not work for lines, -** Processing line: ~ # so separate methods exist for the grid lines~ + .reject { |line| line.start_with?('#') || line.split(' ').length == 0 } # Strip out simple comments and blank lines +** Processing line: ~ .map { |line| line.split('#')[0] } # Strip out end of line comments~ - Inside source: true *** True Line Result - # so separate methods exist for the grid lines -** Processing line: ~ def a_star_scale_up(cell)~ + .map { |line| line.split('#')[0] } # Strip out end of line comments +** Processing line: ~ .map { |line| line.split(' ') } # Tokenize by splitting on whitespace~ - Inside source: true *** True Line Result - def a_star_scale_up(cell) -** Processing line: ~ # Prevents the original value of cell from being edited~ + .map { |line| line.split(' ') } # Tokenize by splitting on whitespace +** Processing line: ~ raise "OFF file did not start with OFF." if file_lines.shift != ["OFF"] # OFF meshes are supposed to begin with "OFF" as the first line.~ - Inside source: true *** True Line Result - # Prevents the original value of cell from being edited -** Processing line: ~ cell = cell.clone~ + raise "OFF file did not start with OFF." if file_lines.shift != ["OFF"] # OFF meshes are supposed to begin with "OFF" as the first line. +** Processing line: ~ raise " line malformed" if file_lines[0].length != 3 # The second line needs to have 3 numbers. Raise an error if it doesn't.~ - Inside source: true *** True Line Result - cell = cell.clone -** Processing line: ~ # Translates the cell to the second grid equivalent~ + raise " line malformed" if file_lines[0].length != 3 # The second line needs to have 3 numbers. Raise an error if it doesn't. +** Processing line: ~ @vert_count, @face_count, @edge_count = file_lines.shift&.map(&:to_i) # Update the counts~ - Inside source: true *** True Line Result - # Translates the cell to the second grid equivalent -** Processing line: ~ cell.x += grid.width + 1~ + @vert_count, @face_count, @edge_count = file_lines.shift&.map(&:to_i) # Update the counts +** Processing line: ~ # Only the vertex and face counts need to be accurate. Raise an error if they are inaccurate.~ - Inside source: true *** True Line Result - cell.x += grid.width + 1 -** Processing line: ~ # Translates the cell to the third grid equivalent~ + # Only the vertex and face counts need to be accurate. Raise an error if they are inaccurate. +** Processing line: ~ raise "Incorrect number of vertices and/or faces (Parsed VFE header: #{@vert_count} #{@face_count} #{@edge_count})" if file_lines.length != @vert_count + @face_count~ - Inside source: true *** True Line Result - # Translates the cell to the third grid equivalent -** Processing line: ~ cell.x += grid.width + 1~ + raise "Incorrect number of vertices and/or faces (Parsed VFE header: #{@vert_count} #{@face_count} #{@edge_count})" if file_lines.length != @vert_count + @face_count +** Processing line: ~ # Grab all the lines describing vertices.~ - Inside source: true *** True Line Result - cell.x += grid.width + 1 -** Processing line: ~ # Proceeds as if scaling up for the first grid~ + # Grab all the lines describing vertices. +** Processing line: ~ vert_lines = file_lines[0, @vert_count]~ - Inside source: true *** True Line Result - # Proceeds as if scaling up for the first grid -** Processing line: ~ dijkstra_scale_up(cell)~ + vert_lines = file_lines[0, @vert_count] +** Processing line: ~ # Grab all the lines describing faces.~ - Inside source: true *** True Line Result - dijkstra_scale_up(cell) -** Processing line: ~ end~ + # Grab all the lines describing faces. +** Processing line: ~ face_lines = file_lines[@vert_count, @face_count]~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + face_lines = file_lines[@vert_count, @face_count] +** Processing line: ~ # Create all the vertices~ - Inside source: true *** True Line Result - -** Processing line: ~ # Signal that the user is going to be moving the star from the first grid~ + # Create all the vertices +** Processing line: ~ @verts = vert_lines.map_with_index { |line, id| Vertex.new(line, id) }~ - Inside source: true *** True Line Result - # Signal that the user is going to be moving the star from the first grid -** Processing line: ~ def dijkstra_mouse_over_star?~ + @verts = vert_lines.map_with_index { |line, id| Vertex.new(line, id) } +** Processing line: ~ # Create all the faces~ - Inside source: true *** True Line Result - def dijkstra_mouse_over_star? -** Processing line: ~ inputs.mouse.point.inside_rect?(dijkstra_scale_up(grid.star))~ + # Create all the faces +** Processing line: ~ @faces = face_lines.map { |line| Face.new(line, @verts) }~ - Inside source: true *** True Line Result - inputs.mouse.point.inside_rect?(dijkstra_scale_up(grid.star)) -** Processing line: ~ end~ + @faces = face_lines.map { |line| Face.new(line, @verts) } +** Processing line: ~ # Create all the edges~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + # Create all the edges +** Processing line: ~ @edges = @faces.flat_map(&:edges).uniq do |edge|~ - Inside source: true *** True Line Result - -** Processing line: ~ # Signal that the user is going to be moving the star from the second grid~ + @edges = @faces.flat_map(&:edges).uniq do |edge| +** Processing line: ~ sorted = edge.sorted~ - Inside source: true *** True Line Result - # Signal that the user is going to be moving the star from the second grid -** Processing line: ~ def greedy_mouse_over_star?~ + sorted = edge.sorted +** Processing line: ~ [sorted.point_a, sorted.point_b]~ - Inside source: true *** True Line Result - def greedy_mouse_over_star? -** Processing line: ~ inputs.mouse.point.inside_rect?(greedy_scale_up(grid.star))~ + [sorted.point_a, sorted.point_b] +** Processing line: ~ end~ - Inside source: true *** True Line Result - inputs.mouse.point.inside_rect?(greedy_scale_up(grid.star)) + end ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -83408,150 +90459,122 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Signal that the user is going to be moving the star from the third grid~ -- Inside source: true -*** True Line Result - # Signal that the user is going to be moving the star from the third grid -** Processing line: ~ def a_star_mouse_over_star?~ +** Processing line: ~ def fast_3x3_transform! mtx~ - Inside source: true *** True Line Result - def a_star_mouse_over_star? -** Processing line: ~ inputs.mouse.point.inside_rect?(a_star_scale_up(grid.star))~ + def fast_3x3_transform! mtx +** Processing line: ~ @verts.each { |vert| vert.fast_3x3_transform! mtx }~ - Inside source: true *** True Line Result - inputs.mouse.point.inside_rect?(a_star_scale_up(grid.star)) + @verts.each { |vert| vert.fast_3x3_transform! mtx } ** Processing line: ~ end~ - Inside source: true *** True Line Result end -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ # Signal that the user is going to be moving the target from the first grid~ -- Inside source: true -*** True Line Result - # Signal that the user is going to be moving the target from the first grid -** Processing line: ~ def dijkstra_mouse_over_target?~ -- Inside source: true -*** True Line Result - def dijkstra_mouse_over_target? -** Processing line: ~ inputs.mouse.point.inside_rect?(dijkstra_scale_up(grid.target))~ -- Inside source: true -*** True Line Result - inputs.mouse.point.inside_rect?(dijkstra_scale_up(grid.target)) -** Processing line: ~ end~ +** Processing line: ~ end~ - Inside source: true *** True Line Result - end + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Signal that the user is going to be moving the target from the second grid~ -- Inside source: true -*** True Line Result - # Signal that the user is going to be moving the target from the second grid -** Processing line: ~ def greedy_mouse_over_target?~ +** Processing line: ~ class Face~ - Inside source: true *** True Line Result - def greedy_mouse_over_target? -** Processing line: ~ inputs.mouse.point.inside_rect?(greedy_scale_up(grid.target))~ + class Face +** Processing line: ~~ - Inside source: true *** True Line Result - inputs.mouse.point.inside_rect?(greedy_scale_up(grid.target)) -** Processing line: ~ end~ + +** Processing line: ~ attr_reader :verts, :edges~ - Inside source: true *** True Line Result - end + attr_reader :verts, :edges ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Signal that the user is going to be moving the target from the third grid~ -- Inside source: true -*** True Line Result - # Signal that the user is going to be moving the target from the third grid -** Processing line: ~ def a_star_mouse_over_target?~ +** Processing line: ~ def initialize(data, verts)~ - Inside source: true *** True Line Result - def a_star_mouse_over_target? -** Processing line: ~ inputs.mouse.point.inside_rect?(a_star_scale_up(grid.target))~ + def initialize(data, verts) +** Processing line: ~ vert_count = data[0].to_i~ - Inside source: true *** True Line Result - inputs.mouse.point.inside_rect?(a_star_scale_up(grid.target)) -** Processing line: ~ end~ + vert_count = data[0].to_i +** Processing line: ~ vert_ids = data[1, vert_count].map(&:to_i)~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + vert_ids = data[1, vert_count].map(&:to_i) +** Processing line: ~ @verts = vert_ids.map { |i| verts[i] }~ - Inside source: true *** True Line Result - -** Processing line: ~ # Signal that the user is going to be removing walls from the first grid~ + @verts = vert_ids.map { |i| verts[i] } +** Processing line: ~ @edges = []~ - Inside source: true *** True Line Result - # Signal that the user is going to be removing walls from the first grid -** Processing line: ~ def dijkstra_mouse_over_wall?~ + @edges = [] +** Processing line: ~ (0...vert_count).each { |i| @edges[i] = Edge.new(verts[vert_ids[i - 1]], verts[vert_ids[i]]) }~ - Inside source: true *** True Line Result - def dijkstra_mouse_over_wall? -** Processing line: ~ grid.walls.each_key do | wall |~ + (0...vert_count).each { |i| @edges[i] = Edge.new(verts[vert_ids[i - 1]], verts[vert_ids[i]]) } +** Processing line: ~ @edges.rotate! 1~ - Inside source: true *** True Line Result - grid.walls.each_key do | wall | -** Processing line: ~ return true if inputs.mouse.point.inside_rect?(dijkstra_scale_up(wall))~ + @edges.rotate! 1 +** Processing line: ~ end~ - Inside source: true *** True Line Result - return true if inputs.mouse.point.inside_rect?(dijkstra_scale_up(wall)) -** Processing line: ~ end~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - end + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ false~ +** Processing line: ~ class Edge~ - Inside source: true *** True Line Result - false -** Processing line: ~ end~ + class Edge +** Processing line: ~ attr_reader :point_a, :point_b~ - Inside source: true *** True Line Result - end + attr_reader :point_a, :point_b ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Signal that the user is going to be removing walls from the second grid~ -- Inside source: true -*** True Line Result - # Signal that the user is going to be removing walls from the second grid -** Processing line: ~ def greedy_mouse_over_wall?~ +** Processing line: ~ def initialize(point_a, point_b)~ - Inside source: true *** True Line Result - def greedy_mouse_over_wall? -** Processing line: ~ grid.walls.each_key do | wall |~ + def initialize(point_a, point_b) +** Processing line: ~ @point_a = point_a~ - Inside source: true *** True Line Result - grid.walls.each_key do | wall | -** Processing line: ~ return true if inputs.mouse.point.inside_rect?(greedy_scale_up(wall))~ + @point_a = point_a +** Processing line: ~ @point_b = point_b~ - Inside source: true *** True Line Result - return true if inputs.mouse.point.inside_rect?(greedy_scale_up(wall)) -** Processing line: ~ end~ + @point_b = point_b +** Processing line: ~ end~ - Inside source: true *** True Line Result - end + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ false~ +** Processing line: ~ def sorted~ - Inside source: true *** True Line Result - false + def sorted +** Processing line: ~ @point_a.id < @point_b.id ? self : Edge.new(@point_b, @point_a)~ +- Inside source: true +*** True Line Result + @point_a.id < @point_b.id ? self : Edge.new(@point_b, @point_a) ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -83560,34 +90583,26 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Signal that the user is going to be removing walls from the third grid~ -- Inside source: true -*** True Line Result - # Signal that the user is going to be removing walls from the third grid -** Processing line: ~ def a_star_mouse_over_wall?~ -- Inside source: true -*** True Line Result - def a_star_mouse_over_wall? -** Processing line: ~ grid.walls.each_key do | wall |~ +** Processing line: ~ def draw_override ffi~ - Inside source: true *** True Line Result - grid.walls.each_key do | wall | -** Processing line: ~ return true if inputs.mouse.point.inside_rect?(a_star_scale_up(wall))~ + def draw_override ffi +** Processing line: ~ ffi.draw_line(@point_a.render_x, @point_a.render_y, @point_b.render_x, @point_b.render_y, 255, 0, 0, 128)~ - Inside source: true *** True Line Result - return true if inputs.mouse.point.inside_rect?(a_star_scale_up(wall)) -** Processing line: ~ end~ + ffi.draw_line(@point_a.render_x, @point_a.render_y, @point_b.render_x, @point_b.render_y, 255, 0, 0, 128) +** Processing line: ~ ffi.draw_line(@point_a.render_x+1, @point_a.render_y, @point_b.render_x+1, @point_b.render_y, 255, 0, 0, 128)~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + ffi.draw_line(@point_a.render_x+1, @point_a.render_y, @point_b.render_x+1, @point_b.render_y, 255, 0, 0, 128) +** Processing line: ~ ffi.draw_line(@point_a.render_x, @point_a.render_y+1, @point_b.render_x, @point_b.render_y+1, 255, 0, 0, 128)~ - Inside source: true *** True Line Result - -** Processing line: ~ false~ + ffi.draw_line(@point_a.render_x, @point_a.render_y+1, @point_b.render_x, @point_b.render_y+1, 255, 0, 0, 128) +** Processing line: ~ ffi.draw_line(@point_a.render_x+1, @point_a.render_y+1, @point_b.render_x+1, @point_b.render_y+1, 255, 0, 0, 128)~ - Inside source: true *** True Line Result - false + ffi.draw_line(@point_a.render_x+1, @point_a.render_y+1, @point_b.render_x+1, @point_b.render_y+1, 255, 0, 0, 128) ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -83596,58 +90611,58 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Signal that the user is going to be adding walls from the first grid~ -- Inside source: true -*** True Line Result - # Signal that the user is going to be adding walls from the first grid -** Processing line: ~ def dijkstra_mouse_over_grid?~ +** Processing line: ~ def primitive_marker~ - Inside source: true *** True Line Result - def dijkstra_mouse_over_grid? -** Processing line: ~ inputs.mouse.point.inside_rect?(dijkstra_scale_up(grid.rect))~ + def primitive_marker +** Processing line: ~ :line~ - Inside source: true *** True Line Result - inputs.mouse.point.inside_rect?(dijkstra_scale_up(grid.rect)) + :line ** Processing line: ~ end~ - Inside source: true *** True Line Result end +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Signal that the user is going to be adding walls from the second grid~ +** Processing line: ~ class Vertex~ - Inside source: true *** True Line Result - # Signal that the user is going to be adding walls from the second grid -** Processing line: ~ def greedy_mouse_over_grid?~ + class Vertex +** Processing line: ~ attr_accessor :x, :y, :z, :id~ - Inside source: true *** True Line Result - def greedy_mouse_over_grid? -** Processing line: ~ inputs.mouse.point.inside_rect?(greedy_scale_up(grid.rect))~ + attr_accessor :x, :y, :z, :id +** Processing line: ~~ - Inside source: true *** True Line Result - inputs.mouse.point.inside_rect?(greedy_scale_up(grid.rect)) -** Processing line: ~ end~ + +** Processing line: ~ def initialize(data, id)~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + def initialize(data, id) +** Processing line: ~ @x = data[0].to_f~ - Inside source: true *** True Line Result - -** Processing line: ~ # Signal that the user is going to be adding walls from the third grid~ + @x = data[0].to_f +** Processing line: ~ @y = data[1].to_f~ - Inside source: true *** True Line Result - # Signal that the user is going to be adding walls from the third grid -** Processing line: ~ def a_star_mouse_over_grid?~ + @y = data[1].to_f +** Processing line: ~ @z = data[2].to_f~ - Inside source: true *** True Line Result - def a_star_mouse_over_grid? -** Processing line: ~ inputs.mouse.point.inside_rect?(a_star_scale_up(grid.rect))~ + @z = data[2].to_f +** Processing line: ~ @id = id~ - Inside source: true *** True Line Result - inputs.mouse.point.inside_rect?(a_star_scale_up(grid.rect)) + @id = id ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -83656,50 +90671,42 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Moves the star to the cell closest to the mouse in the first grid~ -- Inside source: true -*** True Line Result - # Moves the star to the cell closest to the mouse in the first grid -** Processing line: ~ # Only resets the search if the star changes position~ -- Inside source: true -*** True Line Result - # Only resets the search if the star changes position -** Processing line: ~ # Called whenever the user is editing the star (puts mouse down on star)~ +** Processing line: ~ def fast_3x3_transform! mtx~ - Inside source: true *** True Line Result - # Called whenever the user is editing the star (puts mouse down on star) -** Processing line: ~ def process_input_dijkstra_star~ + def fast_3x3_transform! mtx +** Processing line: ~ _x, _y, _z = @x, @y, @z~ - Inside source: true *** True Line Result - def process_input_dijkstra_star -** Processing line: ~ old_star = grid.star.clone~ + _x, _y, _z = @x, @y, @z +** Processing line: ~ @x = mtx[0][0] * _x + mtx[0][1] * _y + mtx[0][2] * _z~ - Inside source: true *** True Line Result - old_star = grid.star.clone -** Processing line: ~ unless dijkstra_cell_closest_to_mouse == grid.target~ + @x = mtx[0][0] * _x + mtx[0][1] * _y + mtx[0][2] * _z +** Processing line: ~ @y = mtx[1][0] * _x + mtx[1][1] * _y + mtx[1][2] * _z~ - Inside source: true *** True Line Result - unless dijkstra_cell_closest_to_mouse == grid.target -** Processing line: ~ grid.star = dijkstra_cell_closest_to_mouse~ + @y = mtx[1][0] * _x + mtx[1][1] * _y + mtx[1][2] * _z +** Processing line: ~ @z = mtx[2][0] * _x + mtx[2][1] * _y + mtx[2][2] * _z~ - Inside source: true *** True Line Result - grid.star = dijkstra_cell_closest_to_mouse -** Processing line: ~ end~ + @z = mtx[2][0] * _x + mtx[2][1] * _y + mtx[2][2] * _z +** Processing line: ~ end~ - Inside source: true *** True Line Result - end -** Processing line: ~ unless old_star == grid.star~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - unless old_star == grid.star -** Processing line: ~ reset_searches~ + +** Processing line: ~ def render_x~ - Inside source: true *** True Line Result - reset_searches -** Processing line: ~ end~ + def render_x +** Processing line: ~ @x * (10 / (5 - @y)) * 170 + 640~ - Inside source: true *** True Line Result - end + @x * (10 / (5 - @y)) * 170 + 640 ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -83708,258 +90715,234 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Moves the star to the cell closest to the mouse in the second grid~ +** Processing line: ~ def render_y~ - Inside source: true *** True Line Result - # Moves the star to the cell closest to the mouse in the second grid -** Processing line: ~ # Only resets the search if the star changes position~ + def render_y +** Processing line: ~ @z * (10 / (5 - @y)) * 170 + 360~ - Inside source: true *** True Line Result - # Only resets the search if the star changes position -** Processing line: ~ # Called whenever the user is editing the star (puts mouse down on star)~ + @z * (10 / (5 - @y)) * 170 + 360 +** Processing line: ~ end~ - Inside source: true *** True Line Result - # Called whenever the user is editing the star (puts mouse down on star) -** Processing line: ~ def process_input_greedy_star~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - def process_input_greedy_star -** Processing line: ~ old_star = grid.star.clone~ -- Inside source: true + end +** Processing line: ~#+end_src~ +- Line was identified as the end of a code block. *** True Line Result - old_star = grid.star.clone -** Processing line: ~ unless greedy_cell_closest_to_mouse == grid.target~ -- Inside source: true +#+end_src +** Processing line: ~~ +- End of paragraph detected. *** True Line Result - unless greedy_cell_closest_to_mouse == grid.target -** Processing line: ~ grid.star = greedy_cell_closest_to_mouse~ -- Inside source: true + +** Processing line: ~*** 3d - Wireframe - Data - what-is-this.txt~ +- Header detected. *** True Line Result - grid.star = greedy_cell_closest_to_mouse -** Processing line: ~ end~ -- Inside source: true + *** True Line Result - end -** Processing line: ~ unless old_star == grid.star~ -- Inside source: true +*** 3d - Wireframe - Data - what-is-this.txt +** Processing line: ~#+begin_src ruby~ +- Line was identified as the beginning of a code block. *** True Line Result - unless old_star == grid.star -** Processing line: ~ reset_searches~ -- Inside source: true + *** True Line Result - reset_searches -** Processing line: ~ end~ +#+begin_src ruby +** Processing line: ~ # ./samples/99_genre_3d/02_wireframe/data/what-is-this.txt~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + # ./samples/99_genre_3d/02_wireframe/data/what-is-this.txt +** Processing line: ~ https://en.wikipedia.org/wiki/OFF_(file_format)~ - Inside source: true *** True Line Result - end + https://en.wikipedia.org/wiki/OFF_(file_format) +** Processing line: ~#+end_src~ +- Line was identified as the end of a code block. +*** True Line Result +#+end_src ** Processing line: ~~ -- Inside source: true +- End of paragraph detected. *** True Line Result -** Processing line: ~ # Moves the star to the cell closest to the mouse in the third grid~ -- Inside source: true -*** True Line Result - # Moves the star to the cell closest to the mouse in the third grid -** Processing line: ~ # Only resets the search if the star changes position~ -- Inside source: true -*** True Line Result - # Only resets the search if the star changes position -** Processing line: ~ # Called whenever the user is editing the star (puts mouse down on star)~ -- Inside source: true -*** True Line Result - # Called whenever the user is editing the star (puts mouse down on star) -** Processing line: ~ def process_input_a_star_star~ -- Inside source: true -*** True Line Result - def process_input_a_star_star -** Processing line: ~ old_star = grid.star.clone~ -- Inside source: true +** Processing line: ~*** Arcade - Bullet Hell - main.rb~ +- Header detected. *** True Line Result - old_star = grid.star.clone -** Processing line: ~ unless a_star_cell_closest_to_mouse == grid.target~ -- Inside source: true + *** True Line Result - unless a_star_cell_closest_to_mouse == grid.target -** Processing line: ~ grid.star = a_star_cell_closest_to_mouse~ -- Inside source: true +*** Arcade - Bullet Hell - main.rb +** Processing line: ~#+begin_src ruby~ +- Line was identified as the beginning of a code block. *** True Line Result - grid.star = a_star_cell_closest_to_mouse -** Processing line: ~ end~ -- Inside source: true + *** True Line Result - end -** Processing line: ~ unless old_star == grid.star~ +#+begin_src ruby +** Processing line: ~ # ./samples/99_genre_arcade/bullet_hell/app/main.rb~ - Inside source: true *** True Line Result - unless old_star == grid.star -** Processing line: ~ reset_searches~ + # ./samples/99_genre_arcade/bullet_hell/app/main.rb +** Processing line: ~ def tick args~ - Inside source: true *** True Line Result - reset_searches -** Processing line: ~ end~ + def tick args +** Processing line: ~ args.state.base_columns ||= 10.times.map { |n| 50 * n + 1280 / 2 - 5 * 50 + 5 }~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + args.state.base_columns ||= 10.times.map { |n| 50 * n + 1280 / 2 - 5 * 50 + 5 } +** Processing line: ~ args.state.base_rows ||= 5.times.map { |n| 50 * n + 720 - 5 * 50 }~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + args.state.base_rows ||= 5.times.map { |n| 50 * n + 720 - 5 * 50 } +** Processing line: ~ args.state.offset_columns = 10.times.map { |n| (n - 4.5) * Math.sin(Kernel.tick_count.to_radians) * 12 }~ - Inside source: true *** True Line Result - -** Processing line: ~ # Moves the target to the grid closest to the mouse in the first grid~ + args.state.offset_columns = 10.times.map { |n| (n - 4.5) * Math.sin(Kernel.tick_count.to_radians) * 12 } +** Processing line: ~ args.state.offset_rows = 5.map { 0 }~ - Inside source: true *** True Line Result - # Moves the target to the grid closest to the mouse in the first grid -** Processing line: ~ # Only reset_searchess the search if the target changes position~ + args.state.offset_rows = 5.map { 0 } +** Processing line: ~ args.state.columns = 10.times.map { |i| args.state.base_columns[i] + args.state.offset_columns[i] }~ - Inside source: true *** True Line Result - # Only reset_searchess the search if the target changes position -** Processing line: ~ # Called whenever the user is editing the target (puts mouse down on target)~ + args.state.columns = 10.times.map { |i| args.state.base_columns[i] + args.state.offset_columns[i] } +** Processing line: ~ args.state.rows = 5.times.map { |i| args.state.base_rows[i] + args.state.offset_rows[i] }~ - Inside source: true *** True Line Result - # Called whenever the user is editing the target (puts mouse down on target) -** Processing line: ~ def process_input_dijkstra_target~ + args.state.rows = 5.times.map { |i| args.state.base_rows[i] + args.state.offset_rows[i] } +** Processing line: ~ args.state.explosions ||= []~ - Inside source: true *** True Line Result - def process_input_dijkstra_target -** Processing line: ~ old_target = grid.target.clone~ + args.state.explosions ||= [] +** Processing line: ~ args.state.enemies ||= []~ - Inside source: true *** True Line Result - old_target = grid.target.clone -** Processing line: ~ unless dijkstra_cell_closest_to_mouse == grid.star~ + args.state.enemies ||= [] +** Processing line: ~ args.state.score ||= 0~ - Inside source: true *** True Line Result - unless dijkstra_cell_closest_to_mouse == grid.star -** Processing line: ~ grid.target = dijkstra_cell_closest_to_mouse~ + args.state.score ||= 0 +** Processing line: ~ args.state.wave ||= 0~ - Inside source: true *** True Line Result - grid.target = dijkstra_cell_closest_to_mouse -** Processing line: ~ end~ + args.state.wave ||= 0 +** Processing line: ~ if args.state.enemies.empty?~ - Inside source: true *** True Line Result - end -** Processing line: ~ unless old_target == grid.target~ + if args.state.enemies.empty? +** Processing line: ~ args.state.wave += 1~ - Inside source: true *** True Line Result - unless old_target == grid.target -** Processing line: ~ reset_searches~ + args.state.wave += 1 +** Processing line: ~ args.state.wave_root = Math.sqrt(args.state.wave)~ - Inside source: true *** True Line Result - reset_searches -** Processing line: ~ end~ + args.state.wave_root = Math.sqrt(args.state.wave) +** Processing line: ~ args.state.enemies = make_enemies~ - Inside source: true *** True Line Result - end + args.state.enemies = make_enemies ** Processing line: ~ end~ - Inside source: true *** True Line Result end -** Processing line: ~~ +** Processing line: ~ args.state.player ||= {x: 620, y: 80, w: 40, h: 40, path: 'sprites/circle-gray.png', angle: 90, cooldown: 0, alive: true}~ - Inside source: true *** True Line Result - -** Processing line: ~ # Moves the target to the cell closest to the mouse in the second grid~ + args.state.player ||= {x: 620, y: 80, w: 40, h: 40, path: 'sprites/circle-gray.png', angle: 90, cooldown: 0, alive: true} +** Processing line: ~ args.state.enemy_bullets ||= []~ - Inside source: true *** True Line Result - # Moves the target to the cell closest to the mouse in the second grid -** Processing line: ~ # Only reset_searchess the search if the target changes position~ + args.state.enemy_bullets ||= [] +** Processing line: ~ args.state.player_bullets ||= []~ - Inside source: true *** True Line Result - # Only reset_searchess the search if the target changes position -** Processing line: ~ # Called whenever the user is editing the target (puts mouse down on target)~ + args.state.player_bullets ||= [] +** Processing line: ~ args.state.lives ||= 3~ - Inside source: true *** True Line Result - # Called whenever the user is editing the target (puts mouse down on target) -** Processing line: ~ def process_input_greedy_target~ + args.state.lives ||= 3 +** Processing line: ~ args.state.missed_shots ||= 0~ - Inside source: true *** True Line Result - def process_input_greedy_target -** Processing line: ~ old_target = grid.target.clone~ + args.state.missed_shots ||= 0 +** Processing line: ~ args.state.fired_shots ||= 0~ - Inside source: true *** True Line Result - old_target = grid.target.clone -** Processing line: ~ unless greedy_cell_closest_to_mouse == grid.star~ + args.state.fired_shots ||= 0 +** Processing line: ~~ - Inside source: true *** True Line Result - unless greedy_cell_closest_to_mouse == grid.star -** Processing line: ~ grid.target = greedy_cell_closest_to_mouse~ + +** Processing line: ~ update_explosions args~ - Inside source: true *** True Line Result - grid.target = greedy_cell_closest_to_mouse -** Processing line: ~ end~ + update_explosions args +** Processing line: ~ update_enemy_positions args~ - Inside source: true *** True Line Result - end -** Processing line: ~ unless old_target == grid.target~ + update_enemy_positions args +** Processing line: ~~ - Inside source: true *** True Line Result - unless old_target == grid.target -** Processing line: ~ reset_searches~ + +** Processing line: ~ if args.inputs.left && args.state.player[:x] > (300 + 5)~ - Inside source: true *** True Line Result - reset_searches -** Processing line: ~ end~ + if args.inputs.left && args.state.player[:x] > (300 + 5) +** Processing line: ~ args.state.player[:x] -= 5~ - Inside source: true *** True Line Result - end + args.state.player[:x] -= 5 ** Processing line: ~ end~ - Inside source: true *** True Line Result end -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ # Moves the target to the cell closest to the mouse in the third grid~ +** Processing line: ~ if args.inputs.right && args.state.player[:x] < (1280 - args.state.player[:w] - 300 - 5)~ - Inside source: true *** True Line Result - # Moves the target to the cell closest to the mouse in the third grid -** Processing line: ~ # Only reset_searchess the search if the target changes position~ + if args.inputs.right && args.state.player[:x] < (1280 - args.state.player[:w] - 300 - 5) +** Processing line: ~ args.state.player[:x] += 5~ - Inside source: true *** True Line Result - # Only reset_searchess the search if the target changes position -** Processing line: ~ # Called whenever the user is editing the target (puts mouse down on target)~ + args.state.player[:x] += 5 +** Processing line: ~ end~ - Inside source: true *** True Line Result - # Called whenever the user is editing the target (puts mouse down on target) -** Processing line: ~ def process_input_a_star_target~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - def process_input_a_star_target -** Processing line: ~ old_target = grid.target.clone~ + +** Processing line: ~ args.state.enemy_bullets.each do |bullet|~ - Inside source: true *** True Line Result - old_target = grid.target.clone -** Processing line: ~ unless a_star_cell_closest_to_mouse == grid.star~ + args.state.enemy_bullets.each do |bullet| +** Processing line: ~ bullet[:x] += bullet[:dx]~ - Inside source: true *** True Line Result - unless a_star_cell_closest_to_mouse == grid.star -** Processing line: ~ grid.target = a_star_cell_closest_to_mouse~ + bullet[:x] += bullet[:dx] +** Processing line: ~ bullet[:y] += bullet[:dy]~ - Inside source: true *** True Line Result - grid.target = a_star_cell_closest_to_mouse -** Processing line: ~ end~ + bullet[:y] += bullet[:dy] +** Processing line: ~ end~ - Inside source: true *** True Line Result - end -** Processing line: ~ unless old_target == grid.target~ + end +** Processing line: ~ args.state.player_bullets.each do |bullet|~ - Inside source: true *** True Line Result - unless old_target == grid.target -** Processing line: ~ reset_searches~ + args.state.player_bullets.each do |bullet| +** Processing line: ~ bullet[:x] += bullet[:dx]~ - Inside source: true *** True Line Result - reset_searches -** Processing line: ~ end~ + bullet[:x] += bullet[:dx] +** Processing line: ~ bullet[:y] += bullet[:dy]~ - Inside source: true *** True Line Result - end + bullet[:y] += bullet[:dy] ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -83968,46 +90951,34 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Removes walls in the first grid that are under the cursor~ -- Inside source: true -*** True Line Result - # Removes walls in the first grid that are under the cursor -** Processing line: ~ def process_input_dijkstra_remove_wall~ -- Inside source: true -*** True Line Result - def process_input_dijkstra_remove_wall -** Processing line: ~ # The mouse needs to be inside the grid, because we only want to remove walls~ -- Inside source: true -*** True Line Result - # The mouse needs to be inside the grid, because we only want to remove walls -** Processing line: ~ # the cursor is directly over~ +** Processing line: ~ args.state.enemy_bullets = args.state.enemy_bullets.find_all { |bullet| bullet[:y].between?(-16, 736) }~ - Inside source: true *** True Line Result - # the cursor is directly over -** Processing line: ~ # Recalculations should only occur when a wall is actually deleted~ + args.state.enemy_bullets = args.state.enemy_bullets.find_all { |bullet| bullet[:y].between?(-16, 736) } +** Processing line: ~ args.state.player_bullets = args.state.player_bullets.find_all do |bullet|~ - Inside source: true *** True Line Result - # Recalculations should only occur when a wall is actually deleted -** Processing line: ~ if dijkstra_mouse_over_grid?~ + args.state.player_bullets = args.state.player_bullets.find_all do |bullet| +** Processing line: ~ if bullet[:y].between?(-16, 736)~ - Inside source: true *** True Line Result - if dijkstra_mouse_over_grid? -** Processing line: ~ if grid.walls.has_key?(dijkstra_cell_closest_to_mouse)~ + if bullet[:y].between?(-16, 736) +** Processing line: ~ true~ - Inside source: true *** True Line Result - if grid.walls.has_key?(dijkstra_cell_closest_to_mouse) -** Processing line: ~ grid.walls.delete(dijkstra_cell_closest_to_mouse)~ + true +** Processing line: ~ else~ - Inside source: true *** True Line Result - grid.walls.delete(dijkstra_cell_closest_to_mouse) -** Processing line: ~ reset_searches~ + else +** Processing line: ~ args.state.missed_shots += 1~ - Inside source: true *** True Line Result - reset_searches -** Processing line: ~ end~ + args.state.missed_shots += 1 +** Processing line: ~ false~ - Inside source: true *** True Line Result - end + false ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -84020,46 +90991,38 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Removes walls in the second grid that are under the cursor~ -- Inside source: true -*** True Line Result - # Removes walls in the second grid that are under the cursor -** Processing line: ~ def process_input_greedy_remove_wall~ -- Inside source: true -*** True Line Result - def process_input_greedy_remove_wall -** Processing line: ~ # The mouse needs to be inside the grid, because we only want to remove walls~ +** Processing line: ~ args.state.enemies = args.state.enemies.reject do |enemy|~ - Inside source: true *** True Line Result - # The mouse needs to be inside the grid, because we only want to remove walls -** Processing line: ~ # the cursor is directly over~ + args.state.enemies = args.state.enemies.reject do |enemy| +** Processing line: ~ if args.state.player[:alive] && 1500 > (args.state.player[:x] - enemy[:x]) ** 2 + (args.state.player[:y] - enemy[:y]) ** 2~ - Inside source: true *** True Line Result - # the cursor is directly over -** Processing line: ~ # Recalculations should only occur when a wall is actually deleted~ + if args.state.player[:alive] && 1500 > (args.state.player[:x] - enemy[:x]) ** 2 + (args.state.player[:y] - enemy[:y]) ** 2 +** Processing line: ~ args.state.explosions << {x: enemy[:x] + 4, y: enemy[:y] + 4, w: 32, h: 32, path: 'sprites/explosion-0.png', age: 0}~ - Inside source: true *** True Line Result - # Recalculations should only occur when a wall is actually deleted -** Processing line: ~ if greedy_mouse_over_grid?~ + args.state.explosions << {x: enemy[:x] + 4, y: enemy[:y] + 4, w: 32, h: 32, path: 'sprites/explosion-0.png', age: 0} +** Processing line: ~ args.state.explosions << {x: args.state.player[:x] + 4, y: args.state.player[:y] + 4, w: 32, h: 32, path: 'sprites/explosion-0.png', age: 0}~ - Inside source: true *** True Line Result - if greedy_mouse_over_grid? -** Processing line: ~ if grid.walls.has_key?(greedy_cell_closest_to_mouse)~ + args.state.explosions << {x: args.state.player[:x] + 4, y: args.state.player[:y] + 4, w: 32, h: 32, path: 'sprites/explosion-0.png', age: 0} +** Processing line: ~ args.state.player[:alive] = false~ - Inside source: true *** True Line Result - if grid.walls.has_key?(greedy_cell_closest_to_mouse) -** Processing line: ~ grid.walls.delete(greedy_cell_closest_to_mouse)~ + args.state.player[:alive] = false +** Processing line: ~ true~ - Inside source: true *** True Line Result - grid.walls.delete(greedy_cell_closest_to_mouse) -** Processing line: ~ reset_searches~ + true +** Processing line: ~ else~ - Inside source: true *** True Line Result - reset_searches -** Processing line: ~ end~ + else +** Processing line: ~ false~ - Inside source: true *** True Line Result - end + false ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -84068,50 +91031,26 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result end -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ # Removes walls in the third grid that are under the cursor~ -- Inside source: true -*** True Line Result - # Removes walls in the third grid that are under the cursor -** Processing line: ~ def process_input_a_star_remove_wall~ -- Inside source: true -*** True Line Result - def process_input_a_star_remove_wall -** Processing line: ~ # The mouse needs to be inside the grid, because we only want to remove walls~ -- Inside source: true -*** True Line Result - # The mouse needs to be inside the grid, because we only want to remove walls -** Processing line: ~ # the cursor is directly over~ -- Inside source: true -*** True Line Result - # the cursor is directly over -** Processing line: ~ # Recalculations should only occur when a wall is actually deleted~ -- Inside source: true -*** True Line Result - # Recalculations should only occur when a wall is actually deleted -** Processing line: ~ if a_star_mouse_over_grid?~ +** Processing line: ~ args.state.enemy_bullets.each do |bullet|~ - Inside source: true *** True Line Result - if a_star_mouse_over_grid? -** Processing line: ~ if grid.walls.has_key?(a_star_cell_closest_to_mouse)~ + args.state.enemy_bullets.each do |bullet| +** Processing line: ~ if args.state.player[:alive] && 400 > (args.state.player[:x] - bullet[:x] + 12) ** 2 + (args.state.player[:y] - bullet[:y] + 12) ** 2~ - Inside source: true *** True Line Result - if grid.walls.has_key?(a_star_cell_closest_to_mouse) -** Processing line: ~ grid.walls.delete(a_star_cell_closest_to_mouse)~ + if args.state.player[:alive] && 400 > (args.state.player[:x] - bullet[:x] + 12) ** 2 + (args.state.player[:y] - bullet[:y] + 12) ** 2 +** Processing line: ~ args.state.explosions << {x: args.state.player[:x] + 4, y: args.state.player[:y] + 4, w: 32, h: 32, path: 'sprites/explosion-0.png', age: 0}~ - Inside source: true *** True Line Result - grid.walls.delete(a_star_cell_closest_to_mouse) -** Processing line: ~ reset_searches~ + args.state.explosions << {x: args.state.player[:x] + 4, y: args.state.player[:y] + 4, w: 32, h: 32, path: 'sprites/explosion-0.png', age: 0} +** Processing line: ~ args.state.player[:alive] = false~ - Inside source: true *** True Line Result - reset_searches -** Processing line: ~ end~ + args.state.player[:alive] = false +** Processing line: ~ bullet[:despawn] = true~ - Inside source: true *** True Line Result - end + bullet[:despawn] = true ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -84120,34 +91059,42 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result end -** Processing line: ~~ +** Processing line: ~ args.state.enemies = args.state.enemies.reject do |enemy|~ - Inside source: true *** True Line Result - -** Processing line: ~ # Adds a wall in the first grid in the cell the mouse is over~ + args.state.enemies = args.state.enemies.reject do |enemy| +** Processing line: ~ args.state.player_bullets.any? do |bullet|~ - Inside source: true *** True Line Result - # Adds a wall in the first grid in the cell the mouse is over -** Processing line: ~ def process_input_dijkstra_add_wall~ + args.state.player_bullets.any? do |bullet| +** Processing line: ~ if 400 > (enemy[:x] - bullet[:x] + 12) ** 2 + (enemy[:y] - bullet[:y] + 12) ** 2~ - Inside source: true *** True Line Result - def process_input_dijkstra_add_wall -** Processing line: ~ if dijkstra_mouse_over_grid?~ + if 400 > (enemy[:x] - bullet[:x] + 12) ** 2 + (enemy[:y] - bullet[:y] + 12) ** 2 +** Processing line: ~ args.state.explosions << {x: enemy[:x] + 4, y: enemy[:y] + 4, w: 32, h: 32, path: 'sprites/explosion-0.png', age: 0}~ - Inside source: true *** True Line Result - if dijkstra_mouse_over_grid? -** Processing line: ~ unless grid.walls.has_key?(dijkstra_cell_closest_to_mouse)~ + args.state.explosions << {x: enemy[:x] + 4, y: enemy[:y] + 4, w: 32, h: 32, path: 'sprites/explosion-0.png', age: 0} +** Processing line: ~ bullet[:despawn] = true~ - Inside source: true *** True Line Result - unless grid.walls.has_key?(dijkstra_cell_closest_to_mouse) -** Processing line: ~ grid.walls[dijkstra_cell_closest_to_mouse] = true~ + bullet[:despawn] = true +** Processing line: ~ args.state.score += 1000 * args.state.wave~ - Inside source: true *** True Line Result - grid.walls[dijkstra_cell_closest_to_mouse] = true -** Processing line: ~ reset_searches~ + args.state.score += 1000 * args.state.wave +** Processing line: ~ true~ - Inside source: true *** True Line Result - reset_searches + true +** Processing line: ~ else~ +- Inside source: true +*** True Line Result + else +** Processing line: ~ false~ +- Inside source: true +*** True Line Result + false ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -84164,74 +91111,54 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Adds a wall in the second grid in the cell the mouse is over~ +** Processing line: ~ args.state.player_bullets = args.state.player_bullets.reject { |bullet| bullet[:despawn] }~ - Inside source: true *** True Line Result - # Adds a wall in the second grid in the cell the mouse is over -** Processing line: ~ def process_input_greedy_add_wall~ + args.state.player_bullets = args.state.player_bullets.reject { |bullet| bullet[:despawn] } +** Processing line: ~ args.state.enemy_bullets = args.state.enemy_bullets.reject { |bullet| bullet[:despawn] }~ - Inside source: true *** True Line Result - def process_input_greedy_add_wall -** Processing line: ~ if greedy_mouse_over_grid?~ + args.state.enemy_bullets = args.state.enemy_bullets.reject { |bullet| bullet[:despawn] } +** Processing line: ~~ - Inside source: true *** True Line Result - if greedy_mouse_over_grid? -** Processing line: ~ unless grid.walls.has_key?(greedy_cell_closest_to_mouse)~ + +** Processing line: ~ args.state.player[:cooldown] -= 1~ - Inside source: true *** True Line Result - unless grid.walls.has_key?(greedy_cell_closest_to_mouse) -** Processing line: ~ grid.walls[greedy_cell_closest_to_mouse] = true~ + args.state.player[:cooldown] -= 1 +** Processing line: ~ if args.inputs.keyboard.key_held.space && args.state.player[:cooldown] <= 0 && args.state.player[:alive]~ - Inside source: true *** True Line Result - grid.walls[greedy_cell_closest_to_mouse] = true -** Processing line: ~ reset_searches~ + if args.inputs.keyboard.key_held.space && args.state.player[:cooldown] <= 0 && args.state.player[:alive] +** Processing line: ~ args.state.player_bullets << {x: args.state.player[:x] + 12, y: args.state.player[:y] + 28, w: 16, h: 16, path: 'sprites/star.png', dx: 0, dy: 8}.sprite~ - Inside source: true *** True Line Result - reset_searches -** Processing line: ~ end~ + args.state.player_bullets << {x: args.state.player[:x] + 12, y: args.state.player[:y] + 28, w: 16, h: 16, path: 'sprites/star.png', dx: 0, dy: 8}.sprite +** Processing line: ~ args.state.fired_shots += 1~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + args.state.fired_shots += 1 +** Processing line: ~ args.state.player[:cooldown] = 10 + 20 / args.state.wave~ - Inside source: true *** True Line Result - end + args.state.player[:cooldown] = 10 + 20 / args.state.wave ** Processing line: ~ end~ - Inside source: true *** True Line Result end -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ # Adds a wall in the third grid in the cell the mouse is over~ -- Inside source: true -*** True Line Result - # Adds a wall in the third grid in the cell the mouse is over -** Processing line: ~ def process_input_a_star_add_wall~ -- Inside source: true -*** True Line Result - def process_input_a_star_add_wall -** Processing line: ~ if a_star_mouse_over_grid?~ -- Inside source: true -*** True Line Result - if a_star_mouse_over_grid? -** Processing line: ~ unless grid.walls.has_key?(a_star_cell_closest_to_mouse)~ -- Inside source: true -*** True Line Result - unless grid.walls.has_key?(a_star_cell_closest_to_mouse) -** Processing line: ~ grid.walls[a_star_cell_closest_to_mouse] = true~ +** Processing line: ~ args.state.enemies.each do |enemy|~ - Inside source: true *** True Line Result - grid.walls[a_star_cell_closest_to_mouse] = true -** Processing line: ~ reset_searches~ + args.state.enemies.each do |enemy| +** Processing line: ~ if Math.rand < 0.0005 + 0.0005 * args.state.wave && args.state.player[:alive] && enemy[:move_state] == :normal~ - Inside source: true *** True Line Result - reset_searches -** Processing line: ~ end~ + if Math.rand < 0.0005 + 0.0005 * args.state.wave && args.state.player[:alive] && enemy[:move_state] == :normal +** Processing line: ~ args.state.enemy_bullets << {x: enemy[:x] + 12, y: enemy[:y] - 8, w: 16, h: 16, path: 'sprites/star.png', dx: 0, dy: -3 - args.state.wave_root}.sprite~ - Inside source: true *** True Line Result - end + args.state.enemy_bullets << {x: enemy[:x] + 12, y: enemy[:y] - 8, w: 16, h: 16, path: 'sprites/star.png', dx: 0, dy: -3 - args.state.wave_root}.sprite ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -84244,430 +91171,434 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # When the user grabs the star and puts their cursor to the far right~ -- Inside source: true -*** True Line Result - # When the user grabs the star and puts their cursor to the far right -** Processing line: ~ # and moves up and down, the star is supposed to move along the grid as well~ +** Processing line: ~ args.outputs.background_color = [0, 0, 0]~ - Inside source: true *** True Line Result - # and moves up and down, the star is supposed to move along the grid as well -** Processing line: ~ # Finding the cell closest to the mouse helps with this~ + args.outputs.background_color = [0, 0, 0] +** Processing line: ~ args.outputs.primitives << args.state.enemies.map do |enemy|~ - Inside source: true *** True Line Result - # Finding the cell closest to the mouse helps with this -** Processing line: ~ def dijkstra_cell_closest_to_mouse~ + args.outputs.primitives << args.state.enemies.map do |enemy| +** Processing line: ~ [enemy[:x], enemy[:y], 40, 40, enemy[:path], -90].sprite~ - Inside source: true *** True Line Result - def dijkstra_cell_closest_to_mouse -** Processing line: ~ # Closest cell to the mouse in the first grid~ + [enemy[:x], enemy[:y], 40, 40, enemy[:path], -90].sprite +** Processing line: ~ end~ - Inside source: true *** True Line Result - # Closest cell to the mouse in the first grid -** Processing line: ~ x = (inputs.mouse.point.x / grid.cell_size).to_i~ + end +** Processing line: ~ args.outputs.primitives << args.state.player if args.state.player[:alive]~ - Inside source: true *** True Line Result - x = (inputs.mouse.point.x / grid.cell_size).to_i -** Processing line: ~ y = (inputs.mouse.point.y / grid.cell_size).to_i~ + args.outputs.primitives << args.state.player if args.state.player[:alive] +** Processing line: ~ args.outputs.primitives << args.state.explosions~ - Inside source: true *** True Line Result - y = (inputs.mouse.point.y / grid.cell_size).to_i -** Processing line: ~ # Bound x and y to the grid~ + args.outputs.primitives << args.state.explosions +** Processing line: ~ args.outputs.primitives << args.state.player_bullets~ - Inside source: true *** True Line Result - # Bound x and y to the grid -** Processing line: ~ x = grid.width - 1 if x > grid.width - 1~ + args.outputs.primitives << args.state.player_bullets +** Processing line: ~ args.outputs.primitives << args.state.enemy_bullets~ - Inside source: true *** True Line Result - x = grid.width - 1 if x > grid.width - 1 -** Processing line: ~ y = grid.height - 1 if y > grid.height - 1~ + args.outputs.primitives << args.state.enemy_bullets +** Processing line: ~ accuracy = args.state.fired_shots.zero? ? 1 : (args.state.fired_shots - args.state.missed_shots) / args.state.fired_shots~ - Inside source: true *** True Line Result - y = grid.height - 1 if y > grid.height - 1 -** Processing line: ~ # Return closest cell~ + accuracy = args.state.fired_shots.zero? ? 1 : (args.state.fired_shots - args.state.missed_shots) / args.state.fired_shots +** Processing line: ~ args.outputs.primitives << [~ - Inside source: true *** True Line Result - # Return closest cell -** Processing line: ~ [x, y]~ + args.outputs.primitives << [ +** Processing line: ~ [0, 0, 300, 720, 96, 0, 0].solid,~ - Inside source: true *** True Line Result - [x, y] -** Processing line: ~ end~ + [0, 0, 300, 720, 96, 0, 0].solid, +** Processing line: ~ [1280 - 300, 0, 300, 720, 96, 0, 0].solid,~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + [1280 - 300, 0, 300, 720, 96, 0, 0].solid, +** Processing line: ~ [1280 - 290, 60, "Wave #{args.state.wave}", 255, 255, 255].label,~ - Inside source: true *** True Line Result - -** Processing line: ~ # When the user grabs the star and puts their cursor to the far right~ + [1280 - 290, 60, "Wave #{args.state.wave}", 255, 255, 255].label, +** Processing line: ~ [1280 - 290, 40, "Accuracy #{(accuracy * 100).floor}%", 255, 255, 255].label,~ - Inside source: true *** True Line Result - # When the user grabs the star and puts their cursor to the far right -** Processing line: ~ # and moves up and down, the star is supposed to move along the grid as well~ + [1280 - 290, 40, "Accuracy #{(accuracy * 100).floor}%", 255, 255, 255].label, +** Processing line: ~ [1280 - 290, 20, "Score #{(args.state.score * accuracy).floor}", 255, 255, 255].label,~ - Inside source: true *** True Line Result - # and moves up and down, the star is supposed to move along the grid as well -** Processing line: ~ # Finding the cell closest to the mouse in the second grid helps with this~ + [1280 - 290, 20, "Score #{(args.state.score * accuracy).floor}", 255, 255, 255].label, +** Processing line: ~ ]~ - Inside source: true *** True Line Result - # Finding the cell closest to the mouse in the second grid helps with this -** Processing line: ~ def greedy_cell_closest_to_mouse~ + ] +** Processing line: ~ args.outputs.primitives << args.state.lives.times.map do |n|~ - Inside source: true *** True Line Result - def greedy_cell_closest_to_mouse -** Processing line: ~ # Closest cell grid to the mouse in the second~ + args.outputs.primitives << args.state.lives.times.map do |n| +** Processing line: ~ [1280 - 290 + 50 * n, 80, 40, 40, 'sprites/circle-gray.png', 90].sprite~ - Inside source: true *** True Line Result - # Closest cell grid to the mouse in the second -** Processing line: ~ x = (inputs.mouse.point.x / grid.cell_size).to_i~ + [1280 - 290 + 50 * n, 80, 40, 40, 'sprites/circle-gray.png', 90].sprite +** Processing line: ~ end~ - Inside source: true *** True Line Result - x = (inputs.mouse.point.x / grid.cell_size).to_i -** Processing line: ~ y = (inputs.mouse.point.y / grid.cell_size).to_i~ + end +** Processing line: ~ #args.outputs.debug << args.gtk.framerate_diagnostics_primitives~ - Inside source: true *** True Line Result - y = (inputs.mouse.point.y / grid.cell_size).to_i -** Processing line: ~ # Translate the cell to the first grid~ + #args.outputs.debug << args.gtk.framerate_diagnostics_primitives +** Processing line: ~~ - Inside source: true *** True Line Result - # Translate the cell to the first grid -** Processing line: ~ x -= grid.width + 1~ + +** Processing line: ~ if (!args.state.player[:alive]) && args.state.enemy_bullets.empty? && args.state.explosions.empty? && args.state.enemies.all? { |enemy| enemy[:move_state] == :normal }~ - Inside source: true *** True Line Result - x -= grid.width + 1 -** Processing line: ~ # Bound x and y to the first grid~ + if (!args.state.player[:alive]) && args.state.enemy_bullets.empty? && args.state.explosions.empty? && args.state.enemies.all? { |enemy| enemy[:move_state] == :normal } +** Processing line: ~ args.state.player[:alive] = true~ - Inside source: true *** True Line Result - # Bound x and y to the first grid -** Processing line: ~ x = 0 if x < 0~ + args.state.player[:alive] = true +** Processing line: ~ args.state.player[:x] = 624~ - Inside source: true *** True Line Result - x = 0 if x < 0 -** Processing line: ~ y = 0 if y < 0~ + args.state.player[:x] = 624 +** Processing line: ~ args.state.player[:y] = 80~ - Inside source: true *** True Line Result - y = 0 if y < 0 -** Processing line: ~ x = grid.width - 1 if x > grid.width - 1~ + args.state.player[:y] = 80 +** Processing line: ~ args.state.lives -= 1~ - Inside source: true *** True Line Result - x = grid.width - 1 if x > grid.width - 1 -** Processing line: ~ y = grid.height - 1 if y > grid.height - 1~ + args.state.lives -= 1 +** Processing line: ~ if args.state.lives == -1~ - Inside source: true *** True Line Result - y = grid.height - 1 if y > grid.height - 1 -** Processing line: ~ # Return closest cell~ + if args.state.lives == -1 +** Processing line: ~ args.state.clear!~ - Inside source: true *** True Line Result - # Return closest cell -** Processing line: ~ [x, y]~ + args.state.clear! +** Processing line: ~ end~ - Inside source: true *** True Line Result - [x, y] + end ** Processing line: ~ end~ - Inside source: true *** True Line Result end +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # When the user grabs the star and puts their cursor to the far right~ +** Processing line: ~ def make_enemies~ - Inside source: true *** True Line Result - # When the user grabs the star and puts their cursor to the far right -** Processing line: ~ # and moves up and down, the star is supposed to move along the grid as well~ + def make_enemies +** Processing line: ~ enemies = []~ - Inside source: true *** True Line Result - # and moves up and down, the star is supposed to move along the grid as well -** Processing line: ~ # Finding the cell closest to the mouse in the third grid helps with this~ + enemies = [] +** Processing line: ~ enemies += 10.times.map { |n| {x: Math.rand * 1280 * 2 - 640, y: Math.rand * 720 * 2 + 720, row: 0, col: n, path: 'sprites/circle-orange.png', move_state: :retreat} }~ - Inside source: true *** True Line Result - # Finding the cell closest to the mouse in the third grid helps with this -** Processing line: ~ def a_star_cell_closest_to_mouse~ + enemies += 10.times.map { |n| {x: Math.rand * 1280 * 2 - 640, y: Math.rand * 720 * 2 + 720, row: 0, col: n, path: 'sprites/circle-orange.png', move_state: :retreat} } +** Processing line: ~ enemies += 10.times.map { |n| {x: Math.rand * 1280 * 2 - 640, y: Math.rand * 720 * 2 + 720, row: 1, col: n, path: 'sprites/circle-orange.png', move_state: :retreat} }~ - Inside source: true *** True Line Result - def a_star_cell_closest_to_mouse -** Processing line: ~ # Closest cell grid to the mouse in the second~ + enemies += 10.times.map { |n| {x: Math.rand * 1280 * 2 - 640, y: Math.rand * 720 * 2 + 720, row: 1, col: n, path: 'sprites/circle-orange.png', move_state: :retreat} } +** Processing line: ~ enemies += 8.times.map { |n| {x: Math.rand * 1280 * 2 - 640, y: Math.rand * 720 * 2 + 720, row: 2, col: n + 1, path: 'sprites/circle-blue.png', move_state: :retreat} }~ - Inside source: true *** True Line Result - # Closest cell grid to the mouse in the second -** Processing line: ~ x = (inputs.mouse.point.x / grid.cell_size).to_i~ + enemies += 8.times.map { |n| {x: Math.rand * 1280 * 2 - 640, y: Math.rand * 720 * 2 + 720, row: 2, col: n + 1, path: 'sprites/circle-blue.png', move_state: :retreat} } +** Processing line: ~ enemies += 8.times.map { |n| {x: Math.rand * 1280 * 2 - 640, y: Math.rand * 720 * 2 + 720, row: 3, col: n + 1, path: 'sprites/circle-blue.png', move_state: :retreat} }~ - Inside source: true *** True Line Result - x = (inputs.mouse.point.x / grid.cell_size).to_i -** Processing line: ~ y = (inputs.mouse.point.y / grid.cell_size).to_i~ + enemies += 8.times.map { |n| {x: Math.rand * 1280 * 2 - 640, y: Math.rand * 720 * 2 + 720, row: 3, col: n + 1, path: 'sprites/circle-blue.png', move_state: :retreat} } +** Processing line: ~ enemies += 4.times.map { |n| {x: Math.rand * 1280 * 2 - 640, y: Math.rand * 720 * 2 + 720, row: 4, col: n + 3, path: 'sprites/circle-green.png', move_state: :retreat} }~ - Inside source: true *** True Line Result - y = (inputs.mouse.point.y / grid.cell_size).to_i -** Processing line: ~ # Translate the cell to the first grid~ + enemies += 4.times.map { |n| {x: Math.rand * 1280 * 2 - 640, y: Math.rand * 720 * 2 + 720, row: 4, col: n + 3, path: 'sprites/circle-green.png', move_state: :retreat} } +** Processing line: ~ enemies~ - Inside source: true *** True Line Result - # Translate the cell to the first grid -** Processing line: ~ x -= (grid.width + 1) * 2~ + enemies +** Processing line: ~ end~ - Inside source: true *** True Line Result - x -= (grid.width + 1) * 2 -** Processing line: ~ # Bound x and y to the first grid~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - # Bound x and y to the first grid -** Processing line: ~ x = 0 if x < 0~ + +** Processing line: ~ def update_explosions args~ - Inside source: true *** True Line Result - x = 0 if x < 0 -** Processing line: ~ y = 0 if y < 0~ + def update_explosions args +** Processing line: ~ args.state.explosions.each do |explosion|~ - Inside source: true *** True Line Result - y = 0 if y < 0 -** Processing line: ~ x = grid.width - 1 if x > grid.width - 1~ + args.state.explosions.each do |explosion| +** Processing line: ~ explosion[:age] += 0.5~ - Inside source: true *** True Line Result - x = grid.width - 1 if x > grid.width - 1 -** Processing line: ~ y = grid.height - 1 if y > grid.height - 1~ + explosion[:age] += 0.5 +** Processing line: ~ explosion[:path] = "sprites/explosion-#{explosion[:age].floor}.png"~ - Inside source: true *** True Line Result - y = grid.height - 1 if y > grid.height - 1 -** Processing line: ~ # Return closest cell~ + explosion[:path] = "sprites/explosion-#{explosion[:age].floor}.png" +** Processing line: ~ end~ - Inside source: true *** True Line Result - # Return closest cell -** Processing line: ~ [x, y]~ + end +** Processing line: ~ args.state.explosions = args.state.explosions.reject { |explosion| explosion[:age] >= 7 }~ - Inside source: true *** True Line Result - [x, y] -** Processing line: ~ end~ + args.state.explosions = args.state.explosions.reject { |explosion| explosion[:age] >= 7 } +** Processing line: ~ end~ - Inside source: true *** True Line Result - end + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def reset_searches~ +** Processing line: ~ def update_enemy_positions args~ - Inside source: true *** True Line Result - def reset_searches -** Processing line: ~ # Reset the searches~ + def update_enemy_positions args +** Processing line: ~ args.state.enemies.each do |enemy|~ - Inside source: true *** True Line Result - # Reset the searches -** Processing line: ~ dijkstra.came_from = {}~ + args.state.enemies.each do |enemy| +** Processing line: ~ if enemy[:move_state] == :normal~ - Inside source: true *** True Line Result - dijkstra.came_from = {} -** Processing line: ~ dijkstra.cost_so_far = {}~ + if enemy[:move_state] == :normal +** Processing line: ~ enemy[:x] = args.state.columns[enemy[:col]]~ - Inside source: true *** True Line Result - dijkstra.cost_so_far = {} -** Processing line: ~ dijkstra.frontier = []~ + enemy[:x] = args.state.columns[enemy[:col]] +** Processing line: ~ enemy[:y] = args.state.rows[enemy[:row]]~ - Inside source: true *** True Line Result - dijkstra.frontier = [] -** Processing line: ~ dijkstra.path = []~ + enemy[:y] = args.state.rows[enemy[:row]] +** Processing line: ~ enemy[:move_state] = :dive if Math.rand < 0.0002 + 0.00005 * args.state.wave && args.state.player[:alive]~ - Inside source: true *** True Line Result - dijkstra.path = [] -** Processing line: ~~ + enemy[:move_state] = :dive if Math.rand < 0.0002 + 0.00005 * args.state.wave && args.state.player[:alive] +** Processing line: ~ elsif enemy[:move_state] == :dive~ - Inside source: true *** True Line Result - -** Processing line: ~ greedy.came_from = {}~ + elsif enemy[:move_state] == :dive +** Processing line: ~ enemy[:target_x] ||= args.state.player[:x]~ - Inside source: true *** True Line Result - greedy.came_from = {} -** Processing line: ~ greedy.frontier = []~ + enemy[:target_x] ||= args.state.player[:x] +** Processing line: ~ enemy[:target_y] ||= args.state.player[:y]~ - Inside source: true *** True Line Result - greedy.frontier = [] -** Processing line: ~ greedy.path = []~ + enemy[:target_y] ||= args.state.player[:y] +** Processing line: ~ dx = enemy[:target_x] - enemy[:x]~ - Inside source: true *** True Line Result - greedy.path = [] -** Processing line: ~ a_star.came_from = {}~ + dx = enemy[:target_x] - enemy[:x] +** Processing line: ~ dy = enemy[:target_y] - enemy[:y]~ - Inside source: true *** True Line Result - a_star.came_from = {} -** Processing line: ~ a_star.frontier = []~ + dy = enemy[:target_y] - enemy[:y] +** Processing line: ~ vel = Math.sqrt(dx * dx + dy * dy)~ - Inside source: true *** True Line Result - a_star.frontier = [] -** Processing line: ~ a_star.path = []~ + vel = Math.sqrt(dx * dx + dy * dy) +** Processing line: ~ speed_limit = 2 + args.state.wave_root~ - Inside source: true *** True Line Result - a_star.path = [] -** Processing line: ~ end~ + speed_limit = 2 + args.state.wave_root +** Processing line: ~ if vel > speed_limit~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + if vel > speed_limit +** Processing line: ~ dx /= vel / speed_limit~ - Inside source: true *** True Line Result - -** Processing line: ~ def calc_searches~ + dx /= vel / speed_limit +** Processing line: ~ dy /= vel / speed_limit~ - Inside source: true *** True Line Result - def calc_searches -** Processing line: ~ calc_dijkstra~ + dy /= vel / speed_limit +** Processing line: ~ end~ - Inside source: true *** True Line Result - calc_dijkstra -** Processing line: ~ calc_greedy~ + end +** Processing line: ~ if vel < 1 || !args.state.player[:alive]~ - Inside source: true *** True Line Result - calc_greedy -** Processing line: ~ calc_a_star~ + if vel < 1 || !args.state.player[:alive] +** Processing line: ~ enemy[:move_state] = :retreat~ - Inside source: true *** True Line Result - calc_a_star -** Processing line: ~ # Move the searches forward to the current step~ + enemy[:move_state] = :retreat +** Processing line: ~ end~ - Inside source: true *** True Line Result - # Move the searches forward to the current step -** Processing line: ~ # state.current_step.times { move_searches_one_step_forward }~ + end +** Processing line: ~ enemy[:x] += dx~ - Inside source: true *** True Line Result - # state.current_step.times { move_searches_one_step_forward } -** Processing line: ~ end~ + enemy[:x] += dx +** Processing line: ~ enemy[:y] += dy~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + enemy[:y] += dy +** Processing line: ~ elsif enemy[:move_state] == :retreat~ - Inside source: true *** True Line Result - -** Processing line: ~ def calc_dijkstra~ + elsif enemy[:move_state] == :retreat +** Processing line: ~ enemy[:target_x] = args.state.columns[enemy[:col]]~ - Inside source: true *** True Line Result - def calc_dijkstra -** Processing line: ~ # Sets up the search to begin from the star~ + enemy[:target_x] = args.state.columns[enemy[:col]] +** Processing line: ~ enemy[:target_y] = args.state.rows[enemy[:row]]~ - Inside source: true *** True Line Result - # Sets up the search to begin from the star -** Processing line: ~ dijkstra.frontier << grid.star~ + enemy[:target_y] = args.state.rows[enemy[:row]] +** Processing line: ~ dx = enemy[:target_x] - enemy[:x]~ - Inside source: true *** True Line Result - dijkstra.frontier << grid.star -** Processing line: ~ dijkstra.came_from[grid.star] = nil~ + dx = enemy[:target_x] - enemy[:x] +** Processing line: ~ dy = enemy[:target_y] - enemy[:y]~ - Inside source: true *** True Line Result - dijkstra.came_from[grid.star] = nil -** Processing line: ~ dijkstra.cost_so_far[grid.star] = 0~ + dy = enemy[:target_y] - enemy[:y] +** Processing line: ~ vel = Math.sqrt(dx * dx + dy * dy)~ - Inside source: true *** True Line Result - dijkstra.cost_so_far[grid.star] = 0 -** Processing line: ~~ + vel = Math.sqrt(dx * dx + dy * dy) +** Processing line: ~ speed_limit = 2 + args.state.wave_root~ - Inside source: true *** True Line Result - -** Processing line: ~ # Until the target is found or there are no more cells to explore from~ + speed_limit = 2 + args.state.wave_root +** Processing line: ~ if vel > speed_limit~ - Inside source: true *** True Line Result - # Until the target is found or there are no more cells to explore from -** Processing line: ~ until dijkstra.came_from.has_key?(grid.target) or dijkstra.frontier.empty?~ + if vel > speed_limit +** Processing line: ~ dx /= vel / speed_limit~ - Inside source: true *** True Line Result - until dijkstra.came_from.has_key?(grid.target) or dijkstra.frontier.empty? -** Processing line: ~ # Take the next frontier cell. The first element is the cell, the second is the priority.~ + dx /= vel / speed_limit +** Processing line: ~ dy /= vel / speed_limit~ - Inside source: true *** True Line Result - # Take the next frontier cell. The first element is the cell, the second is the priority. -** Processing line: ~ new_frontier = dijkstra.frontier.shift#[0]~ + dy /= vel / speed_limit +** Processing line: ~ elsif vel < 1~ - Inside source: true *** True Line Result - new_frontier = dijkstra.frontier.shift#[0] -** Processing line: ~ # For each of its neighbors~ + elsif vel < 1 +** Processing line: ~ enemy[:move_state] = :normal~ - Inside source: true *** True Line Result - # For each of its neighbors -** Processing line: ~ adjacent_neighbors(new_frontier).each do | neighbor |~ + enemy[:move_state] = :normal +** Processing line: ~ enemy[:target_x] = nil~ - Inside source: true *** True Line Result - adjacent_neighbors(new_frontier).each do | neighbor | -** Processing line: ~ # That have not been visited and are not walls~ + enemy[:target_x] = nil +** Processing line: ~ enemy[:target_y] = nil~ - Inside source: true *** True Line Result - # That have not been visited and are not walls -** Processing line: ~ unless dijkstra.came_from.has_key?(neighbor) or grid.walls.has_key?(neighbor)~ + enemy[:target_y] = nil +** Processing line: ~ end~ - Inside source: true *** True Line Result - unless dijkstra.came_from.has_key?(neighbor) or grid.walls.has_key?(neighbor) -** Processing line: ~ # Add them to the frontier and mark them as visited~ + end +** Processing line: ~ enemy[:x] += dx~ - Inside source: true *** True Line Result - # Add them to the frontier and mark them as visited -** Processing line: ~ dijkstra.frontier << neighbor~ + enemy[:x] += dx +** Processing line: ~ enemy[:y] += dy~ - Inside source: true *** True Line Result - dijkstra.frontier << neighbor -** Processing line: ~ dijkstra.came_from[neighbor] = new_frontier~ + enemy[:y] += dy +** Processing line: ~ end~ - Inside source: true *** True Line Result - dijkstra.came_from[neighbor] = new_frontier -** Processing line: ~ dijkstra.cost_so_far[neighbor] = dijkstra.cost_so_far[new_frontier] + 1~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - dijkstra.cost_so_far[neighbor] = dijkstra.cost_so_far[new_frontier] + 1 -** Processing line: ~ end~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - end + +** Processing line: ~#+end_src~ +- Line was identified as the end of a code block. +*** True Line Result +#+end_src ** Processing line: ~~ -- Inside source: true +- End of paragraph detected. *** True Line Result -** Processing line: ~ # Sort the frontier so that cells that are in a zigzag pattern are prioritized over those in an line~ -- Inside source: true +** Processing line: ~*** Arcade - Dueling Starships - main.rb~ +- Header detected. *** True Line Result - # Sort the frontier so that cells that are in a zigzag pattern are prioritized over those in an line -** Processing line: ~ # Comment this line and let a path generate to see the difference~ -- Inside source: true + *** True Line Result - # Comment this line and let a path generate to see the difference -** Processing line: ~ dijkstra.frontier = dijkstra.frontier.sort_by {| cell | proximity_to_star(cell) }~ -- Inside source: true +*** Arcade - Dueling Starships - main.rb +** Processing line: ~#+begin_src ruby~ +- Line was identified as the beginning of a code block. *** True Line Result - dijkstra.frontier = dijkstra.frontier.sort_by {| cell | proximity_to_star(cell) } -** Processing line: ~ dijkstra.frontier = dijkstra.frontier.sort_by {| cell | dijkstra.cost_so_far[cell] }~ + +*** True Line Result +#+begin_src ruby +** Processing line: ~ # ./samples/99_genre_arcade/dueling_starships/app/main.rb~ - Inside source: true *** True Line Result - dijkstra.frontier = dijkstra.frontier.sort_by {| cell | dijkstra.cost_so_far[cell] } -** Processing line: ~ end~ + # ./samples/99_genre_arcade/dueling_starships/app/main.rb +** Processing line: ~ class DuelingSpaceships~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + class DuelingSpaceships +** Processing line: ~ attr_accessor :state, :inputs, :outputs, :grid~ - Inside source: true *** True Line Result - + attr_accessor :state, :inputs, :outputs, :grid ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # If the search found the target~ +** Processing line: ~ def tick~ - Inside source: true *** True Line Result - # If the search found the target -** Processing line: ~ if dijkstra.came_from.has_key?(grid.target)~ + def tick +** Processing line: ~ defaults~ - Inside source: true *** True Line Result - if dijkstra.came_from.has_key?(grid.target) -** Processing line: ~ # Calculate the path between the target and star~ + defaults +** Processing line: ~ render~ - Inside source: true *** True Line Result - # Calculate the path between the target and star -** Processing line: ~ dijkstra_calc_path~ + render +** Processing line: ~ calc~ - Inside source: true *** True Line Result - dijkstra_calc_path -** Processing line: ~ end~ + calc +** Processing line: ~ input~ - Inside source: true *** True Line Result - end + input ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -84676,130 +91607,142 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def calc_greedy~ +** Processing line: ~ def defaults~ - Inside source: true *** True Line Result - def calc_greedy -** Processing line: ~ # Sets up the search to begin from the star~ + def defaults +** Processing line: ~ outputs.background_color = [0, 0, 0]~ - Inside source: true *** True Line Result - # Sets up the search to begin from the star -** Processing line: ~ greedy.frontier << grid.star~ + outputs.background_color = [0, 0, 0] +** Processing line: ~ state.ship_blue ||= new_blue_ship~ - Inside source: true *** True Line Result - greedy.frontier << grid.star -** Processing line: ~ greedy.came_from[grid.star] = nil~ + state.ship_blue ||= new_blue_ship +** Processing line: ~ state.ship_red ||= new_red_ship~ - Inside source: true *** True Line Result - greedy.came_from[grid.star] = nil -** Processing line: ~~ + state.ship_red ||= new_red_ship +** Processing line: ~ state.flames ||= []~ - Inside source: true *** True Line Result - -** Processing line: ~ # Until the target is found or there are no more cells to explore from~ + state.flames ||= [] +** Processing line: ~ state.bullets ||= []~ - Inside source: true *** True Line Result - # Until the target is found or there are no more cells to explore from -** Processing line: ~ until greedy.came_from.has_key?(grid.target) or greedy.frontier.empty?~ + state.bullets ||= [] +** Processing line: ~ state.ship_blue_score ||= 0~ - Inside source: true *** True Line Result - until greedy.came_from.has_key?(grid.target) or greedy.frontier.empty? -** Processing line: ~ # Take the next frontier cell~ + state.ship_blue_score ||= 0 +** Processing line: ~ state.ship_red_score ||= 0~ - Inside source: true *** True Line Result - # Take the next frontier cell -** Processing line: ~ new_frontier = greedy.frontier.shift~ + state.ship_red_score ||= 0 +** Processing line: ~ state.stars ||= 100.map do~ - Inside source: true *** True Line Result - new_frontier = greedy.frontier.shift -** Processing line: ~ # For each of its neighbors~ + state.stars ||= 100.map do +** Processing line: ~ [rand.add(2).to_square(grid.w_half.randomize(:sign, :ratio),~ - Inside source: true *** True Line Result - # For each of its neighbors -** Processing line: ~ adjacent_neighbors(new_frontier).each do | neighbor |~ + [rand.add(2).to_square(grid.w_half.randomize(:sign, :ratio), +** Processing line: ~ grid.h_half.randomize(:sign, :ratio)),~ - Inside source: true *** True Line Result - adjacent_neighbors(new_frontier).each do | neighbor | -** Processing line: ~ # That have not been visited and are not walls~ + grid.h_half.randomize(:sign, :ratio)), +** Processing line: ~ 128 + 128.randomize(:ratio), 255, 255]~ - Inside source: true *** True Line Result - # That have not been visited and are not walls -** Processing line: ~ unless greedy.came_from.has_key?(neighbor) or grid.walls.has_key?(neighbor)~ + 128 + 128.randomize(:ratio), 255, 255] +** Processing line: ~ end~ - Inside source: true *** True Line Result - unless greedy.came_from.has_key?(neighbor) or grid.walls.has_key?(neighbor) -** Processing line: ~ # Add them to the frontier and mark them as visited~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - # Add them to the frontier and mark them as visited -** Processing line: ~ greedy.frontier << neighbor~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - greedy.frontier << neighbor -** Processing line: ~ greedy.came_from[neighbor] = new_frontier~ + +** Processing line: ~ def default_ship x, y, angle, sprite_path, bullet_sprite_path, color~ - Inside source: true *** True Line Result - greedy.came_from[neighbor] = new_frontier -** Processing line: ~ end~ + def default_ship x, y, angle, sprite_path, bullet_sprite_path, color +** Processing line: ~ state.new_entity(:ship,~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + state.new_entity(:ship, +** Processing line: ~ { x: x,~ - Inside source: true *** True Line Result - end -** Processing line: ~ # Sort the frontier so that cells that are in a zigzag pattern are prioritized over those in an line~ + { x: x, +** Processing line: ~ y: y,~ - Inside source: true *** True Line Result - # Sort the frontier so that cells that are in a zigzag pattern are prioritized over those in an line -** Processing line: ~ # Comment this line and let a path generate to see the difference~ + y: y, +** Processing line: ~ dy: 0,~ - Inside source: true *** True Line Result - # Comment this line and let a path generate to see the difference -** Processing line: ~ greedy.frontier = greedy.frontier.sort_by {| cell | proximity_to_star(cell) }~ + dy: 0, +** Processing line: ~ dx: 0,~ - Inside source: true *** True Line Result - greedy.frontier = greedy.frontier.sort_by {| cell | proximity_to_star(cell) } -** Processing line: ~ # Sort the frontier so cells that are close to the target are then prioritized~ + dx: 0, +** Processing line: ~ damage: 0,~ - Inside source: true *** True Line Result - # Sort the frontier so cells that are close to the target are then prioritized -** Processing line: ~ greedy.frontier = greedy.frontier.sort_by {| cell | greedy_heuristic(cell) }~ + damage: 0, +** Processing line: ~ dead: false,~ - Inside source: true *** True Line Result - greedy.frontier = greedy.frontier.sort_by {| cell | greedy_heuristic(cell) } -** Processing line: ~ end~ + dead: false, +** Processing line: ~ angle: angle,~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + angle: angle, +** Processing line: ~ max_alpha: 255,~ - Inside source: true *** True Line Result - -** Processing line: ~~ + max_alpha: 255, +** Processing line: ~ sprite_path: sprite_path,~ - Inside source: true *** True Line Result - -** Processing line: ~ # If the search found the target~ + sprite_path: sprite_path, +** Processing line: ~ bullet_sprite_path: bullet_sprite_path,~ - Inside source: true *** True Line Result - # If the search found the target -** Processing line: ~ if greedy.came_from.has_key?(grid.target)~ + bullet_sprite_path: bullet_sprite_path, +** Processing line: ~ color: color })~ - Inside source: true *** True Line Result - if greedy.came_from.has_key?(grid.target) -** Processing line: ~ # Calculate the path between the target and star~ + color: color }) +** Processing line: ~ end~ - Inside source: true *** True Line Result - # Calculate the path between the target and star -** Processing line: ~ greedy_calc_path~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - greedy_calc_path -** Processing line: ~ end~ + +** Processing line: ~ def new_red_ship~ - Inside source: true *** True Line Result - end + def new_red_ship +** Processing line: ~ default_ship(400, 250.randomize(:sign, :ratio),~ +- Inside source: true +*** True Line Result + default_ship(400, 250.randomize(:sign, :ratio), +** Processing line: ~ 180, 'sprites/ship_red.png', 'sprites/red_bullet.png',~ +- Inside source: true +*** True Line Result + 180, 'sprites/ship_red.png', 'sprites/red_bullet.png', +** Processing line: ~ [255, 90, 90])~ +- Inside source: true +*** True Line Result + [255, 90, 90]) ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -84808,138 +91751,158 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def calc_a_star~ +** Processing line: ~ def new_blue_ship~ - Inside source: true *** True Line Result - def calc_a_star -** Processing line: ~ # Setup the search to start from the star~ + def new_blue_ship +** Processing line: ~ default_ship(-400, 250.randomize(:sign, :ratio),~ - Inside source: true *** True Line Result - # Setup the search to start from the star -** Processing line: ~ a_star.came_from[grid.star] = nil~ + default_ship(-400, 250.randomize(:sign, :ratio), +** Processing line: ~ 0, 'sprites/ship_blue.png', 'sprites/blue_bullet.png',~ - Inside source: true *** True Line Result - a_star.came_from[grid.star] = nil -** Processing line: ~ a_star.cost_so_far[grid.star] = 0~ + 0, 'sprites/ship_blue.png', 'sprites/blue_bullet.png', +** Processing line: ~ [110, 140, 255])~ - Inside source: true *** True Line Result - a_star.cost_so_far[grid.star] = 0 -** Processing line: ~ a_star.frontier << grid.star~ + [110, 140, 255]) +** Processing line: ~ end~ - Inside source: true *** True Line Result - a_star.frontier << grid.star + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Until there are no more cells to explore from or the search has found the target~ +** Processing line: ~ def render~ - Inside source: true *** True Line Result - # Until there are no more cells to explore from or the search has found the target -** Processing line: ~ until a_star.frontier.empty? or a_star.came_from.has_key?(grid.target)~ + def render +** Processing line: ~ render_instructions~ - Inside source: true *** True Line Result - until a_star.frontier.empty? or a_star.came_from.has_key?(grid.target) -** Processing line: ~ # Get the next cell to expand from~ + render_instructions +** Processing line: ~ render_score~ - Inside source: true *** True Line Result - # Get the next cell to expand from -** Processing line: ~ current_frontier = a_star.frontier.shift~ + render_score +** Processing line: ~ render_universe~ - Inside source: true *** True Line Result - current_frontier = a_star.frontier.shift + render_universe +** Processing line: ~ render_flames~ +- Inside source: true +*** True Line Result + render_flames +** Processing line: ~ render_ships~ +- Inside source: true +*** True Line Result + render_ships +** Processing line: ~ render_bullets~ +- Inside source: true +*** True Line Result + render_bullets +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # For each of that cells neighbors~ +** Processing line: ~ def render_ships~ - Inside source: true *** True Line Result - # For each of that cells neighbors -** Processing line: ~ adjacent_neighbors(current_frontier).each do | neighbor |~ + def render_ships +** Processing line: ~ update_ship_outputs(state.ship_blue)~ - Inside source: true *** True Line Result - adjacent_neighbors(current_frontier).each do | neighbor | -** Processing line: ~ # That have not been visited and are not walls~ + update_ship_outputs(state.ship_blue) +** Processing line: ~ update_ship_outputs(state.ship_red)~ - Inside source: true *** True Line Result - # That have not been visited and are not walls -** Processing line: ~ unless a_star.came_from.has_key?(neighbor) or grid.walls.has_key?(neighbor)~ + update_ship_outputs(state.ship_red) +** Processing line: ~ outputs.sprites << [state.ship_blue.sprite, state.ship_red.sprite]~ - Inside source: true *** True Line Result - unless a_star.came_from.has_key?(neighbor) or grid.walls.has_key?(neighbor) -** Processing line: ~ # Add them to the frontier and mark them as visited~ + outputs.sprites << [state.ship_blue.sprite, state.ship_red.sprite] +** Processing line: ~ outputs.labels << [state.ship_blue.label, state.ship_red.label]~ - Inside source: true *** True Line Result - # Add them to the frontier and mark them as visited -** Processing line: ~ a_star.frontier << neighbor~ + outputs.labels << [state.ship_blue.label, state.ship_red.label] +** Processing line: ~ end~ - Inside source: true *** True Line Result - a_star.frontier << neighbor -** Processing line: ~ a_star.came_from[neighbor] = current_frontier~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - a_star.came_from[neighbor] = current_frontier -** Processing line: ~ a_star.cost_so_far[neighbor] = a_star.cost_so_far[current_frontier] + 1~ + +** Processing line: ~ def render_instructions~ - Inside source: true *** True Line Result - a_star.cost_so_far[neighbor] = a_star.cost_so_far[current_frontier] + 1 -** Processing line: ~ end~ + def render_instructions +** Processing line: ~ return if state.ship_blue.dx > 0 || state.ship_blue.dy > 0 ||~ +- Inside source: true +*** True Line Result + return if state.ship_blue.dx > 0 || state.ship_blue.dy > 0 || +** Processing line: ~ state.ship_red.dx > 0 || state.ship_red.dy > 0 ||~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + state.ship_red.dx > 0 || state.ship_red.dy > 0 || +** Processing line: ~ state.flames.length > 0~ - Inside source: true *** True Line Result - end + state.flames.length > 0 ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Sort the frontier so that cells that are in a zigzag pattern are prioritized over those in an line~ +** Processing line: ~ outputs.labels << [grid.left.shift_right(30),~ - Inside source: true *** True Line Result - # Sort the frontier so that cells that are in a zigzag pattern are prioritized over those in an line -** Processing line: ~ # Comment this line and let a path generate to see the difference~ + outputs.labels << [grid.left.shift_right(30), +** Processing line: ~ grid.bottom.shift_up(30),~ - Inside source: true *** True Line Result - # Comment this line and let a path generate to see the difference -** Processing line: ~ a_star.frontier = a_star.frontier.sort_by {| cell | proximity_to_star(cell) }~ + grid.bottom.shift_up(30), +** Processing line: ~ "Two gamepads needed to play. R1 to accelerate. Left and right on D-PAD to turn ship. Hold A to shoot. Press B to drop mines.",~ - Inside source: true *** True Line Result - a_star.frontier = a_star.frontier.sort_by {| cell | proximity_to_star(cell) } -** Processing line: ~ a_star.frontier = a_star.frontier.sort_by {| cell | a_star.cost_so_far[cell] + greedy_heuristic(cell) }~ + "Two gamepads needed to play. R1 to accelerate. Left and right on D-PAD to turn ship. Hold A to shoot. Press B to drop mines.", +** Processing line: ~ 0, 0, 255, 255, 255]~ - Inside source: true *** True Line Result - a_star.frontier = a_star.frontier.sort_by {| cell | a_star.cost_so_far[cell] + greedy_heuristic(cell) } -** Processing line: ~ end~ + 0, 0, 255, 255, 255] +** Processing line: ~ end~ - Inside source: true *** True Line Result - end + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # If the search found the target~ +** Processing line: ~ def calc~ - Inside source: true *** True Line Result - # If the search found the target -** Processing line: ~ if a_star.came_from.has_key?(grid.target)~ + def calc +** Processing line: ~ calc_thrusts~ - Inside source: true *** True Line Result - if a_star.came_from.has_key?(grid.target) -** Processing line: ~ # Calculate the path between the target and star~ + calc_thrusts +** Processing line: ~ calc_ships~ - Inside source: true *** True Line Result - # Calculate the path between the target and star -** Processing line: ~ a_star_calc_path~ + calc_ships +** Processing line: ~ calc_bullets~ - Inside source: true *** True Line Result - a_star_calc_path -** Processing line: ~ end~ + calc_bullets +** Processing line: ~ calc_winner~ - Inside source: true *** True Line Result - end + calc_winner ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -84948,70 +91911,62 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Calculates the path between the target and star for the breadth first search~ -- Inside source: true -*** True Line Result - # Calculates the path between the target and star for the breadth first search -** Processing line: ~ # Only called when the breadth first search finds the target~ -- Inside source: true -*** True Line Result - # Only called when the breadth first search finds the target -** Processing line: ~ def dijkstra_calc_path~ +** Processing line: ~ def input~ - Inside source: true *** True Line Result - def dijkstra_calc_path -** Processing line: ~ # Start from the target~ + def input +** Processing line: ~ input_accelerate~ - Inside source: true *** True Line Result - # Start from the target -** Processing line: ~ endpoint = grid.target~ + input_accelerate +** Processing line: ~ input_turn~ - Inside source: true *** True Line Result - endpoint = grid.target -** Processing line: ~ # And the cell it came from~ + input_turn +** Processing line: ~ input_bullets_and_mines~ - Inside source: true *** True Line Result - # And the cell it came from -** Processing line: ~ next_endpoint = dijkstra.came_from[endpoint]~ + input_bullets_and_mines +** Processing line: ~ end~ - Inside source: true *** True Line Result - next_endpoint = dijkstra.came_from[endpoint] -** Processing line: ~ while endpoint and next_endpoint~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - while endpoint and next_endpoint -** Processing line: ~ # Draw a path between these two cells and store it~ + +** Processing line: ~ def render_score~ - Inside source: true *** True Line Result - # Draw a path between these two cells and store it -** Processing line: ~ path = get_path_between(endpoint, next_endpoint)~ + def render_score +** Processing line: ~ outputs.labels << [grid.left.shift_right(80),~ - Inside source: true *** True Line Result - path = get_path_between(endpoint, next_endpoint) -** Processing line: ~ dijkstra.path << path~ + outputs.labels << [grid.left.shift_right(80), +** Processing line: ~ grid.top.shift_down(40),~ - Inside source: true *** True Line Result - dijkstra.path << path -** Processing line: ~ # And get the next pair of cells~ + grid.top.shift_down(40), +** Processing line: ~ state.ship_blue_score, 30, 1, state.ship_blue.color]~ - Inside source: true *** True Line Result - # And get the next pair of cells -** Processing line: ~ endpoint = next_endpoint~ + state.ship_blue_score, 30, 1, state.ship_blue.color] +** Processing line: ~~ - Inside source: true *** True Line Result - endpoint = next_endpoint -** Processing line: ~ next_endpoint = dijkstra.came_from[endpoint]~ + +** Processing line: ~ outputs.labels << [grid.right.shift_left(80),~ - Inside source: true *** True Line Result - next_endpoint = dijkstra.came_from[endpoint] -** Processing line: ~ # Continue till there are no more cells~ + outputs.labels << [grid.right.shift_left(80), +** Processing line: ~ grid.top.shift_down(40),~ - Inside source: true *** True Line Result - # Continue till there are no more cells -** Processing line: ~ end~ + grid.top.shift_down(40), +** Processing line: ~ state.ship_red_score, 30, 1, state.ship_red.color]~ - Inside source: true *** True Line Result - end + state.ship_red_score, 30, 1, state.ship_red.color] ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -85020,22 +91975,22 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Returns one-dimensional absolute distance between cell and target~ +** Processing line: ~ def render_universe~ - Inside source: true *** True Line Result - # Returns one-dimensional absolute distance between cell and target -** Processing line: ~ # Returns a number to compare distances between cells and the target~ + def render_universe +** Processing line: ~ return if outputs.static_solids.any?~ - Inside source: true *** True Line Result - # Returns a number to compare distances between cells and the target -** Processing line: ~ def greedy_heuristic(cell)~ + return if outputs.static_solids.any? +** Processing line: ~ outputs.static_solids << grid.rect~ - Inside source: true *** True Line Result - def greedy_heuristic(cell) -** Processing line: ~ (grid.target.x - cell.x).abs + (grid.target.y - cell.y).abs~ + outputs.static_solids << grid.rect +** Processing line: ~ outputs.static_solids << state.stars~ - Inside source: true *** True Line Result - (grid.target.x - cell.x).abs + (grid.target.y - cell.y).abs + outputs.static_solids << state.stars ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -85044,70 +91999,70 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Calculates the path between the target and star for the greedy search~ +** Processing line: ~ def apply_round_finished_alpha entity~ - Inside source: true *** True Line Result - # Calculates the path between the target and star for the greedy search -** Processing line: ~ # Only called when the greedy search finds the target~ + def apply_round_finished_alpha entity +** Processing line: ~ return entity unless state.round_finished_debounce~ - Inside source: true *** True Line Result - # Only called when the greedy search finds the target -** Processing line: ~ def greedy_calc_path~ + return entity unless state.round_finished_debounce +** Processing line: ~ entity.a *= state.round_finished_debounce.percentage_of(2.seconds)~ - Inside source: true *** True Line Result - def greedy_calc_path -** Processing line: ~ # Start from the target~ + entity.a *= state.round_finished_debounce.percentage_of(2.seconds) +** Processing line: ~ return entity~ - Inside source: true *** True Line Result - # Start from the target -** Processing line: ~ endpoint = grid.target~ + return entity +** Processing line: ~ end~ - Inside source: true *** True Line Result - endpoint = grid.target -** Processing line: ~ # And the cell it came from~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - # And the cell it came from -** Processing line: ~ next_endpoint = greedy.came_from[endpoint]~ + +** Processing line: ~ def update_ship_outputs ship, sprite_size = 66~ - Inside source: true *** True Line Result - next_endpoint = greedy.came_from[endpoint] -** Processing line: ~ while endpoint and next_endpoint~ + def update_ship_outputs ship, sprite_size = 66 +** Processing line: ~ ship.sprite =~ - Inside source: true *** True Line Result - while endpoint and next_endpoint -** Processing line: ~ # Draw a path between these two cells and store it~ + ship.sprite = +** Processing line: ~ apply_round_finished_alpha [sprite_size.to_square(ship.x, ship.y),~ - Inside source: true *** True Line Result - # Draw a path between these two cells and store it -** Processing line: ~ path = get_path_between(endpoint, next_endpoint)~ + apply_round_finished_alpha [sprite_size.to_square(ship.x, ship.y), +** Processing line: ~ ship.sprite_path,~ - Inside source: true *** True Line Result - path = get_path_between(endpoint, next_endpoint) -** Processing line: ~ greedy.path << path~ + ship.sprite_path, +** Processing line: ~ ship.angle,~ - Inside source: true *** True Line Result - greedy.path << path -** Processing line: ~ # And get the next pair of cells~ + ship.angle, +** Processing line: ~ ship.dead ? 0 : 255 * ship.created_at.ease(2.seconds)].sprite~ - Inside source: true *** True Line Result - # And get the next pair of cells -** Processing line: ~ endpoint = next_endpoint~ + ship.dead ? 0 : 255 * ship.created_at.ease(2.seconds)].sprite +** Processing line: ~ ship.label =~ - Inside source: true *** True Line Result - endpoint = next_endpoint -** Processing line: ~ next_endpoint = greedy.came_from[endpoint]~ + ship.label = +** Processing line: ~ apply_round_finished_alpha [ship.x,~ - Inside source: true *** True Line Result - next_endpoint = greedy.came_from[endpoint] -** Processing line: ~ # Continue till there are no more cells~ + apply_round_finished_alpha [ship.x, +** Processing line: ~ ship.y + 100,~ - Inside source: true *** True Line Result - # Continue till there are no more cells -** Processing line: ~ end~ + ship.y + 100, +** Processing line: ~ "." * 5.minus(ship.damage).greater(0), 20, 1, ship.color, 255].label~ - Inside source: true *** True Line Result - end + "." * 5.minus(ship.damage).greater(0), 20, 1, ship.color, 255].label ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -85116,74 +92071,94 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Calculates the path between the target and star for the a_star search~ +** Processing line: ~ def render_flames sprite_size = 6~ - Inside source: true *** True Line Result - # Calculates the path between the target and star for the a_star search -** Processing line: ~ # Only called when the a_star search finds the target~ + def render_flames sprite_size = 6 +** Processing line: ~ outputs.sprites << state.flames.map do |p|~ - Inside source: true *** True Line Result - # Only called when the a_star search finds the target -** Processing line: ~ def a_star_calc_path~ + outputs.sprites << state.flames.map do |p| +** Processing line: ~ apply_round_finished_alpha [sprite_size.to_square(p.x, p.y),~ - Inside source: true *** True Line Result - def a_star_calc_path -** Processing line: ~ # Start from the target~ + apply_round_finished_alpha [sprite_size.to_square(p.x, p.y), +** Processing line: ~ 'sprites/flame.png', 0,~ - Inside source: true *** True Line Result - # Start from the target -** Processing line: ~ endpoint = grid.target~ + 'sprites/flame.png', 0, +** Processing line: ~ p.max_alpha * p.created_at.ease(p.lifetime, :flip)].sprite~ - Inside source: true *** True Line Result - endpoint = grid.target -** Processing line: ~ # And the cell it came from~ + p.max_alpha * p.created_at.ease(p.lifetime, :flip)].sprite +** Processing line: ~ end~ - Inside source: true *** True Line Result - # And the cell it came from -** Processing line: ~ next_endpoint = a_star.came_from[endpoint]~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - next_endpoint = a_star.came_from[endpoint] + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ while endpoint and next_endpoint~ +** Processing line: ~ def render_bullets sprite_size = 10~ - Inside source: true *** True Line Result - while endpoint and next_endpoint -** Processing line: ~ # Draw a path between these two cells and store it~ + def render_bullets sprite_size = 10 +** Processing line: ~ outputs.sprites << state.bullets.map do |b|~ - Inside source: true *** True Line Result - # Draw a path between these two cells and store it -** Processing line: ~ path = get_path_between(endpoint, next_endpoint)~ + outputs.sprites << state.bullets.map do |b| +** Processing line: ~ apply_round_finished_alpha [b.sprite_size.to_square(b.x, b.y),~ - Inside source: true *** True Line Result - path = get_path_between(endpoint, next_endpoint) -** Processing line: ~ a_star.path << path~ + apply_round_finished_alpha [b.sprite_size.to_square(b.x, b.y), +** Processing line: ~ b.owner.bullet_sprite_path,~ - Inside source: true *** True Line Result - a_star.path << path -** Processing line: ~ # And get the next pair of cells~ + b.owner.bullet_sprite_path, +** Processing line: ~ 0, b.max_alpha].sprite~ - Inside source: true *** True Line Result - # And get the next pair of cells -** Processing line: ~ endpoint = next_endpoint~ + 0, b.max_alpha].sprite +** Processing line: ~ end~ - Inside source: true *** True Line Result - endpoint = next_endpoint -** Processing line: ~ next_endpoint = a_star.came_from[endpoint]~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - next_endpoint = a_star.came_from[endpoint] -** Processing line: ~ # Continue till there are no more cells~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - # Continue till there are no more cells -** Processing line: ~ end~ + +** Processing line: ~ def wrap_location! location~ - Inside source: true *** True Line Result - end + def wrap_location! location +** Processing line: ~ location.x = grid.left if location.x > grid.right~ +- Inside source: true +*** True Line Result + location.x = grid.left if location.x > grid.right +** Processing line: ~ location.x = grid.right if location.x < grid.left~ +- Inside source: true +*** True Line Result + location.x = grid.right if location.x < grid.left +** Processing line: ~ location.y = grid.top if location.y < grid.bottom~ +- Inside source: true +*** True Line Result + location.y = grid.top if location.y < grid.bottom +** Processing line: ~ location.y = grid.bottom if location.y > grid.top~ +- Inside source: true +*** True Line Result + location.y = grid.bottom if location.y > grid.top +** Processing line: ~ location~ +- Inside source: true +*** True Line Result + location ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -85192,58 +92167,62 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Returns a list of adjacent cells~ +** Processing line: ~ def calc_thrusts~ - Inside source: true *** True Line Result - # Returns a list of adjacent cells -** Processing line: ~ # Used to determine what the next cells to be added to the frontier are~ + def calc_thrusts +** Processing line: ~ state.flames =~ - Inside source: true *** True Line Result - # Used to determine what the next cells to be added to the frontier are -** Processing line: ~ def adjacent_neighbors(cell)~ + state.flames = +** Processing line: ~ state.flames~ - Inside source: true *** True Line Result - def adjacent_neighbors(cell) -** Processing line: ~ neighbors = []~ + state.flames +** Processing line: ~ .reject(&:old?)~ - Inside source: true *** True Line Result - neighbors = [] -** Processing line: ~~ + .reject(&:old?) +** Processing line: ~ .map do |p|~ - Inside source: true *** True Line Result - -** Processing line: ~ # Gets all the valid neighbors into the array~ + .map do |p| +** Processing line: ~ p.speed *= 0.9~ - Inside source: true *** True Line Result - # Gets all the valid neighbors into the array -** Processing line: ~ # From southern neighbor, clockwise~ + p.speed *= 0.9 +** Processing line: ~ p.y += p.angle.vector_y(p.speed)~ - Inside source: true *** True Line Result - # From southern neighbor, clockwise -** Processing line: ~ neighbors << [cell.x , cell.y - 1] unless cell.y == 0~ + p.y += p.angle.vector_y(p.speed) +** Processing line: ~ p.x += p.angle.vector_x(p.speed)~ - Inside source: true *** True Line Result - neighbors << [cell.x , cell.y - 1] unless cell.y == 0 -** Processing line: ~ neighbors << [cell.x - 1, cell.y ] unless cell.x == 0~ + p.x += p.angle.vector_x(p.speed) +** Processing line: ~ wrap_location! p~ - Inside source: true *** True Line Result - neighbors << [cell.x - 1, cell.y ] unless cell.x == 0 -** Processing line: ~ neighbors << [cell.x , cell.y + 1] unless cell.y == grid.height - 1~ + wrap_location! p +** Processing line: ~ end~ - Inside source: true *** True Line Result - neighbors << [cell.x , cell.y + 1] unless cell.y == grid.height - 1 -** Processing line: ~ neighbors << [cell.x + 1, cell.y ] unless cell.x == grid.width - 1~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - neighbors << [cell.x + 1, cell.y ] unless cell.x == grid.width - 1 + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ neighbors~ +** Processing line: ~ def all_ships~ - Inside source: true *** True Line Result - neighbors + def all_ships +** Processing line: ~ [state.ship_blue, state.ship_red]~ +- Inside source: true +*** True Line Result + [state.ship_blue, state.ship_red] ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -85252,62 +92231,74 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Finds the vertical and horizontal distance of a cell from the star~ +** Processing line: ~ def alive_ships~ - Inside source: true *** True Line Result - # Finds the vertical and horizontal distance of a cell from the star -** Processing line: ~ # and returns the larger value~ + def alive_ships +** Processing line: ~ all_ships.reject { |s| s.dead }~ - Inside source: true *** True Line Result - # and returns the larger value -** Processing line: ~ # This method is used to have a zigzag pattern in the rendered path~ + all_ships.reject { |s| s.dead } +** Processing line: ~ end~ - Inside source: true *** True Line Result - # This method is used to have a zigzag pattern in the rendered path -** Processing line: ~ # A cell that is [5, 5] from the star,~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - # A cell that is [5, 5] from the star, -** Processing line: ~ # is explored before over a cell that is [0, 7] away.~ + +** Processing line: ~ def calc_bullet bullet~ - Inside source: true *** True Line Result - # is explored before over a cell that is [0, 7] away. -** Processing line: ~ # So, if possible, the search tries to go diagonal (zigzag) first~ + def calc_bullet bullet +** Processing line: ~ bullet.y += bullet.angle.vector_y(bullet.speed)~ - Inside source: true *** True Line Result - # So, if possible, the search tries to go diagonal (zigzag) first -** Processing line: ~ def proximity_to_star(cell)~ + bullet.y += bullet.angle.vector_y(bullet.speed) +** Processing line: ~ bullet.x += bullet.angle.vector_x(bullet.speed)~ - Inside source: true *** True Line Result - def proximity_to_star(cell) -** Processing line: ~ distance_x = (grid.star.x - cell.x).abs~ + bullet.x += bullet.angle.vector_x(bullet.speed) +** Processing line: ~ wrap_location! bullet~ - Inside source: true *** True Line Result - distance_x = (grid.star.x - cell.x).abs -** Processing line: ~ distance_y = (grid.star.y - cell.y).abs~ + wrap_location! bullet +** Processing line: ~ explode_bullet! bullet if bullet.old?~ - Inside source: true *** True Line Result - distance_y = (grid.star.y - cell.y).abs -** Processing line: ~~ + explode_bullet! bullet if bullet.old? +** Processing line: ~ return if bullet.exploded~ - Inside source: true *** True Line Result - -** Processing line: ~ if distance_x > distance_y~ + return if bullet.exploded +** Processing line: ~ return if state.round_finished~ - Inside source: true *** True Line Result - if distance_x > distance_y -** Processing line: ~ return distance_x~ + return if state.round_finished +** Processing line: ~ alive_ships.each do |s|~ - Inside source: true *** True Line Result - return distance_x -** Processing line: ~ else~ + alive_ships.each do |s| +** Processing line: ~ if s != bullet.owner &&~ - Inside source: true *** True Line Result - else -** Processing line: ~ return distance_y~ + if s != bullet.owner && +** Processing line: ~ s.sprite.intersect_rect?(bullet.sprite_size.to_square(bullet.x, bullet.y))~ - Inside source: true *** True Line Result - return distance_y + s.sprite.intersect_rect?(bullet.sprite_size.to_square(bullet.x, bullet.y)) +** Processing line: ~ explode_bullet! bullet, 10, 5, 30~ +- Inside source: true +*** True Line Result + explode_bullet! bullet, 10, 5, 30 +** Processing line: ~ s.damage += 1~ +- Inside source: true +*** True Line Result + s.damage += 1 +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -85320,18 +92311,18 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Methods that allow code to be more concise. Subdivides args.state, which is where all variables are stored.~ +** Processing line: ~ def calc_bullets~ - Inside source: true *** True Line Result - # Methods that allow code to be more concise. Subdivides args.state, which is where all variables are stored. -** Processing line: ~ def grid~ + def calc_bullets +** Processing line: ~ state.bullets.each { |b| calc_bullet b }~ - Inside source: true *** True Line Result - def grid -** Processing line: ~ state.grid~ + state.bullets.each { |b| calc_bullet b } +** Processing line: ~ state.bullets.reject! { |b| b.exploded }~ - Inside source: true *** True Line Result - state.grid + state.bullets.reject! { |b| b.exploded } ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -85340,46 +92331,46 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def dijkstra~ +** Processing line: ~ def create_explosion! type, entity, flame_count, max_speed, lifetime, max_alpha = 255~ - Inside source: true *** True Line Result - def dijkstra -** Processing line: ~ state.dijkstra~ + def create_explosion! type, entity, flame_count, max_speed, lifetime, max_alpha = 255 +** Processing line: ~ flame_count.times do~ - Inside source: true *** True Line Result - state.dijkstra -** Processing line: ~ end~ + flame_count.times do +** Processing line: ~ state.flames << state.new_entity(type,~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + state.flames << state.new_entity(type, +** Processing line: ~ { angle: 360.randomize(:ratio),~ - Inside source: true *** True Line Result - -** Processing line: ~ def greedy~ + { angle: 360.randomize(:ratio), +** Processing line: ~ speed: max_speed.randomize(:ratio),~ - Inside source: true *** True Line Result - def greedy -** Processing line: ~ state.greedy~ + speed: max_speed.randomize(:ratio), +** Processing line: ~ lifetime: lifetime,~ - Inside source: true *** True Line Result - state.greedy -** Processing line: ~ end~ + lifetime: lifetime, +** Processing line: ~ x: entity.x,~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + x: entity.x, +** Processing line: ~ y: entity.y,~ - Inside source: true *** True Line Result - -** Processing line: ~ def a_star~ + y: entity.y, +** Processing line: ~ max_alpha: max_alpha })~ - Inside source: true *** True Line Result - def a_star -** Processing line: ~ state.a_star~ + max_alpha: max_alpha }) +** Processing line: ~ end~ - Inside source: true *** True Line Result - state.a_star + end ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -85388,34 +92379,38 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Descriptive aliases for colors~ +** Processing line: ~ def explode_bullet! bullet, flame_override = 5, max_speed = 5, lifetime = 10~ - Inside source: true *** True Line Result - # Descriptive aliases for colors -** Processing line: ~ def default_color~ + def explode_bullet! bullet, flame_override = 5, max_speed = 5, lifetime = 10 +** Processing line: ~ bullet.exploded = true~ - Inside source: true *** True Line Result - def default_color -** Processing line: ~ [221, 212, 213] # Light Brown~ + bullet.exploded = true +** Processing line: ~ create_explosion! :bullet_explosion,~ - Inside source: true *** True Line Result - [221, 212, 213] # Light Brown -** Processing line: ~ end~ + create_explosion! :bullet_explosion, +** Processing line: ~ bullet,~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + bullet, +** Processing line: ~ flame_override,~ - Inside source: true *** True Line Result - -** Processing line: ~ def wall_color~ + flame_override, +** Processing line: ~ max_speed,~ - Inside source: true *** True Line Result - def wall_color -** Processing line: ~ [134, 134, 120] # Camo Green~ + max_speed, +** Processing line: ~ lifetime,~ - Inside source: true *** True Line Result - [134, 134, 120] # Camo Green + lifetime, +** Processing line: ~ bullet.max_alpha~ +- Inside source: true +*** True Line Result + bullet.max_alpha ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -85424,14 +92419,22 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def visited_color~ +** Processing line: ~ def calc_ship ship~ - Inside source: true *** True Line Result - def visited_color -** Processing line: ~ [204, 191, 179] # Dark Brown~ + def calc_ship ship +** Processing line: ~ ship.x += ship.dx~ - Inside source: true *** True Line Result - [204, 191, 179] # Dark Brown + ship.x += ship.dx +** Processing line: ~ ship.y += ship.dy~ +- Inside source: true +*** True Line Result + ship.y += ship.dy +** Processing line: ~ wrap_location! ship~ +- Inside source: true +*** True Line Result + wrap_location! ship ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -85440,82 +92443,74 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def path_color~ -- Inside source: true -*** True Line Result - def path_color -** Processing line: ~ [231, 230, 228] # Pastel White~ +** Processing line: ~ def calc_ships~ - Inside source: true *** True Line Result - [231, 230, 228] # Pastel White -** Processing line: ~ end~ + def calc_ships +** Processing line: ~ all_ships.each { |s| calc_ship s }~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + all_ships.each { |s| calc_ship s } +** Processing line: ~ return if all_ships.any? { |s| s.dead }~ - Inside source: true *** True Line Result - -** Processing line: ~ def button_color~ + return if all_ships.any? { |s| s.dead } +** Processing line: ~ return if state.round_finished~ - Inside source: true *** True Line Result - def button_color -** Processing line: ~ [190, 190, 190] # Gray~ + return if state.round_finished +** Processing line: ~ return unless state.ship_blue.sprite.intersect_rect?(state.ship_red.sprite)~ - Inside source: true *** True Line Result - [190, 190, 190] # Gray -** Processing line: ~ end~ + return unless state.ship_blue.sprite.intersect_rect?(state.ship_red.sprite) +** Processing line: ~ state.ship_blue.damage = 5~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + state.ship_blue.damage = 5 +** Processing line: ~ state.ship_red.damage = 5~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + state.ship_red.damage = 5 +** Processing line: ~ end~ - Inside source: true *** True Line Result - + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Method that is called by DragonRuby periodically~ -- Inside source: true -*** True Line Result - # Method that is called by DragonRuby periodically -** Processing line: ~ # Used for updating animations and calculations~ +** Processing line: ~ def create_thruster_flames! ship~ - Inside source: true *** True Line Result - # Used for updating animations and calculations -** Processing line: ~ def tick args~ + def create_thruster_flames! ship +** Processing line: ~ state.flames << state.new_entity(:ship_thruster,~ - Inside source: true *** True Line Result - def tick args -** Processing line: ~~ + state.flames << state.new_entity(:ship_thruster, +** Processing line: ~ { angle: ship.angle + 180 + 60.randomize(:sign, :ratio),~ - Inside source: true *** True Line Result - -** Processing line: ~ # Pressing r will reset the application~ + { angle: ship.angle + 180 + 60.randomize(:sign, :ratio), +** Processing line: ~ speed: 5.randomize(:ratio),~ - Inside source: true *** True Line Result - # Pressing r will reset the application -** Processing line: ~ if args.inputs.keyboard.key_down.r~ + speed: 5.randomize(:ratio), +** Processing line: ~ max_alpha: 255 * ship.created_at_elapsed.percentage_of(2.seconds),~ - Inside source: true *** True Line Result - if args.inputs.keyboard.key_down.r -** Processing line: ~ args.gtk.reset~ + max_alpha: 255 * ship.created_at_elapsed.percentage_of(2.seconds), +** Processing line: ~ lifetime: 30,~ - Inside source: true *** True Line Result - args.gtk.reset -** Processing line: ~ reset~ + lifetime: 30, +** Processing line: ~ x: ship.x - ship.angle.vector_x(40) + 5.randomize(:sign, :ratio),~ - Inside source: true *** True Line Result - reset -** Processing line: ~ return~ + x: ship.x - ship.angle.vector_x(40) + 5.randomize(:sign, :ratio), +** Processing line: ~ y: ship.y - ship.angle.vector_y(40) + 5.randomize(:sign, :ratio) })~ - Inside source: true *** True Line Result - return + y: ship.y - ship.angle.vector_y(40) + 5.randomize(:sign, :ratio) }) ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -85524,394 +92519,370 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Every tick, new args are passed, and the Breadth First Search tick is called~ -- Inside source: true -*** True Line Result - # Every tick, new args are passed, and the Breadth First Search tick is called -** Processing line: ~ $a_star_algorithm ||= A_Star_Algorithm.new(args)~ +** Processing line: ~ def input_accelerate_ship should_move_ship, ship~ - Inside source: true *** True Line Result - $a_star_algorithm ||= A_Star_Algorithm.new(args) -** Processing line: ~ $a_star_algorithm.args = args~ + def input_accelerate_ship should_move_ship, ship +** Processing line: ~ return if ship.dead~ - Inside source: true *** True Line Result - $a_star_algorithm.args = args -** Processing line: ~ $a_star_algorithm.tick~ + return if ship.dead +** Processing line: ~~ - Inside source: true *** True Line Result - $a_star_algorithm.tick -** Processing line: ~ end~ + +** Processing line: ~ should_move_ship &&= (ship.dx + ship.dy).abs < 5~ - Inside source: true *** True Line Result - end + should_move_ship &&= (ship.dx + ship.dy).abs < 5 ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~~ +** Processing line: ~ if should_move_ship~ - Inside source: true *** True Line Result - -** Processing line: ~ def reset~ + if should_move_ship +** Processing line: ~ create_thruster_flames! ship~ - Inside source: true *** True Line Result - def reset -** Processing line: ~ $a_star_algorithm = nil~ + create_thruster_flames! ship +** Processing line: ~ ship.dx += ship.angle.vector_x 0.050~ - Inside source: true *** True Line Result - $a_star_algorithm = nil -** Processing line: ~ end~ + ship.dx += ship.angle.vector_x 0.050 +** Processing line: ~ ship.dy += ship.angle.vector_y 0.050~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + ship.dy += ship.angle.vector_y 0.050 +** Processing line: ~ else~ - Inside source: true *** True Line Result - -** Processing line: ~#+end_src~ -- Line was identified as the end of a code block. + else +** Processing line: ~ ship.dx *= 0.99~ +- Inside source: true *** True Line Result -#+end_src -** Processing line: ~~ -- End of paragraph detected. + ship.dx *= 0.99 +** Processing line: ~ ship.dy *= 0.99~ +- Inside source: true *** True Line Result - -** Processing line: ~*** Path Finding Algorithms - Tower Defense - main.rb~ -- Header detected. + ship.dy *= 0.99 +** Processing line: ~ end~ +- Inside source: true *** True Line Result - + end +** Processing line: ~ end~ +- Inside source: true *** True Line Result -*** Path Finding Algorithms - Tower Defense - main.rb -** Processing line: ~#+begin_src ruby~ -- Line was identified as the beginning of a code block. + end +** Processing line: ~~ +- Inside source: true *** True Line Result +** Processing line: ~ def input_accelerate~ +- Inside source: true *** True Line Result -#+begin_src ruby -** Processing line: ~ # ./samples/13_path_finding_algorithms/09_tower_defense/app/main.rb~ + def input_accelerate +** Processing line: ~ input_accelerate_ship inputs.controller_one.key_held.r1 || inputs.keyboard.up, state.ship_blue~ - Inside source: true *** True Line Result - # ./samples/13_path_finding_algorithms/09_tower_defense/app/main.rb -** Processing line: ~ # An example of some major components in a tower defence game~ + input_accelerate_ship inputs.controller_one.key_held.r1 || inputs.keyboard.up, state.ship_blue +** Processing line: ~ input_accelerate_ship inputs.controller_two.key_held.r1, state.ship_red~ - Inside source: true *** True Line Result - # An example of some major components in a tower defence game -** Processing line: ~ # The pathing of the tanks is determined by A* algorithm -- try editing the walls~ + input_accelerate_ship inputs.controller_two.key_held.r1, state.ship_red +** Processing line: ~ end~ - Inside source: true *** True Line Result - # The pathing of the tanks is determined by A* algorithm -- try editing the walls + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # The turrets shoot bullets at the closest tank. The bullets are heat-seeking~ +** Processing line: ~ def input_turn_ship direction, ship~ - Inside source: true *** True Line Result - # The turrets shoot bullets at the closest tank. The bullets are heat-seeking -** Processing line: ~~ + def input_turn_ship direction, ship +** Processing line: ~ ship.angle -= 3 * direction~ - Inside source: true *** True Line Result - -** Processing line: ~ def tick args~ + ship.angle -= 3 * direction +** Processing line: ~ end~ - Inside source: true *** True Line Result - def tick args -** Processing line: ~ $gtk.reset if args.inputs.keyboard.key_down.r~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - $gtk.reset if args.inputs.keyboard.key_down.r -** Processing line: ~ defaults args~ + +** Processing line: ~ def input_turn~ - Inside source: true *** True Line Result - defaults args -** Processing line: ~ render args~ + def input_turn +** Processing line: ~ input_turn_ship inputs.controller_one.left_right + inputs.keyboard.left_right, state.ship_blue~ - Inside source: true *** True Line Result - render args -** Processing line: ~ calc args~ + input_turn_ship inputs.controller_one.left_right + inputs.keyboard.left_right, state.ship_blue +** Processing line: ~ input_turn_ship inputs.controller_two.left_right, state.ship_red~ - Inside source: true *** True Line Result - calc args -** Processing line: ~ end~ + input_turn_ship inputs.controller_two.left_right, state.ship_red +** Processing line: ~ end~ - Inside source: true *** True Line Result - end + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def defaults args~ +** Processing line: ~ def input_bullet create_bullet, ship~ - Inside source: true *** True Line Result - def defaults args -** Processing line: ~ args.outputs.background_color = wall_color~ + def input_bullet create_bullet, ship +** Processing line: ~ return unless create_bullet~ - Inside source: true *** True Line Result - args.outputs.background_color = wall_color -** Processing line: ~ args.state.grid_size = 5~ + return unless create_bullet +** Processing line: ~ return if ship.dead~ - Inside source: true *** True Line Result - args.state.grid_size = 5 -** Processing line: ~ args.state.tile_size = 50~ + return if ship.dead +** Processing line: ~~ - Inside source: true *** True Line Result - args.state.tile_size = 50 -** Processing line: ~ args.state.grid_start ||= [0, 0]~ + +** Processing line: ~ state.bullets << state.new_entity(:ship_bullet,~ - Inside source: true *** True Line Result - args.state.grid_start ||= [0, 0] -** Processing line: ~ args.state.grid_goal ||= [4, 4]~ + state.bullets << state.new_entity(:ship_bullet, +** Processing line: ~ { owner: ship,~ - Inside source: true *** True Line Result - args.state.grid_goal ||= [4, 4] -** Processing line: ~~ + { owner: ship, +** Processing line: ~ angle: ship.angle,~ - Inside source: true *** True Line Result - -** Processing line: ~ # Try editing these walls to see the path change!~ + angle: ship.angle, +** Processing line: ~ max_alpha: 255 * ship.created_at_elapsed.percentage_of(2.seconds),~ - Inside source: true *** True Line Result - # Try editing these walls to see the path change! -** Processing line: ~ args.state.walls ||= {~ + max_alpha: 255 * ship.created_at_elapsed.percentage_of(2.seconds), +** Processing line: ~ speed: 5 + ship.dx.mult(ship.angle.vector_x) + ship.dy.mult(ship.angle.vector_y),~ - Inside source: true *** True Line Result - args.state.walls ||= { -** Processing line: ~ [0, 4] => true,~ + speed: 5 + ship.dx.mult(ship.angle.vector_x) + ship.dy.mult(ship.angle.vector_y), +** Processing line: ~ lifetime: 120,~ - Inside source: true *** True Line Result - [0, 4] => true, -** Processing line: ~ [1, 3] => true,~ + lifetime: 120, +** Processing line: ~ sprite_size: 10,~ - Inside source: true *** True Line Result - [1, 3] => true, -** Processing line: ~ [3, 1] => true,~ + sprite_size: 10, +** Processing line: ~ x: ship.x + ship.angle.vector_x * 32,~ - Inside source: true *** True Line Result - [3, 1] => true, -** Processing line: ~ # [4, 0] => true,~ + x: ship.x + ship.angle.vector_x * 32, +** Processing line: ~ y: ship.y + ship.angle.vector_y * 32 })~ - Inside source: true *** True Line Result - # [4, 0] => true, -** Processing line: ~ }~ + y: ship.y + ship.angle.vector_y * 32 }) +** Processing line: ~ end~ - Inside source: true *** True Line Result - } + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ args.state.a_star.frontier ||= []~ +** Processing line: ~ def input_mine create_mine, ship~ - Inside source: true *** True Line Result - args.state.a_star.frontier ||= [] -** Processing line: ~ args.state.a_star.came_from ||= {}~ + def input_mine create_mine, ship +** Processing line: ~ return unless create_mine~ - Inside source: true *** True Line Result - args.state.a_star.came_from ||= {} -** Processing line: ~ args.state.a_star.path ||= []~ + return unless create_mine +** Processing line: ~ return if ship.dead~ - Inside source: true *** True Line Result - args.state.a_star.path ||= [] + return if ship.dead ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ args.state.tanks ||= []~ -- Inside source: true -*** True Line Result - args.state.tanks ||= [] -** Processing line: ~ args.state.tank_spawn_period ||= 60~ -- Inside source: true -*** True Line Result - args.state.tank_spawn_period ||= 60 -** Processing line: ~ args.state.tank_sprite_path ||= 'sprites/circle/white.png'~ +** Processing line: ~ state.bullets << state.new_entity(:ship_bullet,~ - Inside source: true *** True Line Result - args.state.tank_sprite_path ||= 'sprites/circle/white.png' -** Processing line: ~ args.state.tank_speed ||= 1~ + state.bullets << state.new_entity(:ship_bullet, +** Processing line: ~ { owner: ship,~ - Inside source: true *** True Line Result - args.state.tank_speed ||= 1 -** Processing line: ~~ + { owner: ship, +** Processing line: ~ angle: 360.randomize(:sign, :ratio),~ - Inside source: true *** True Line Result - -** Processing line: ~ args.state.turret_shoot_period = 10~ + angle: 360.randomize(:sign, :ratio), +** Processing line: ~ max_alpha: 255 * ship.created_at_elapsed.percentage_of(2.seconds),~ - Inside source: true *** True Line Result - args.state.turret_shoot_period = 10 -** Processing line: ~ # Turrets can be entered as [x, y] but are immediately mapped to hashes~ + max_alpha: 255 * ship.created_at_elapsed.percentage_of(2.seconds), +** Processing line: ~ speed: 0.02,~ - Inside source: true *** True Line Result - # Turrets can be entered as [x, y] but are immediately mapped to hashes -** Processing line: ~ # Walls are also added where the turrets are to prevent tanks from pathing over them~ + speed: 0.02, +** Processing line: ~ sprite_size: 10,~ - Inside source: true *** True Line Result - # Walls are also added where the turrets are to prevent tanks from pathing over them -** Processing line: ~ args.state.turrets ||= [~ + sprite_size: 10, +** Processing line: ~ lifetime: 600,~ - Inside source: true *** True Line Result - args.state.turrets ||= [ -** Processing line: ~ [2, 2]~ + lifetime: 600, +** Processing line: ~ x: ship.x + ship.angle.vector_x * -50,~ - Inside source: true *** True Line Result - [2, 2] -** Processing line: ~ ].each { |turret| args.state.walls[turret] = true}.map do |x, y|~ + x: ship.x + ship.angle.vector_x * -50, +** Processing line: ~ y: ship.y + ship.angle.vector_y * -50 })~ - Inside source: true *** True Line Result - ].each { |turret| args.state.walls[turret] = true}.map do |x, y| -** Processing line: ~ {~ + y: ship.y + ship.angle.vector_y * -50 }) +** Processing line: ~ end~ - Inside source: true *** True Line Result - { -** Processing line: ~ x: x * args.state.tile_size,~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - x: x * args.state.tile_size, -** Processing line: ~ y: y * args.state.tile_size,~ + +** Processing line: ~ def input_bullets_and_mines~ - Inside source: true *** True Line Result - y: y * args.state.tile_size, -** Processing line: ~ w: args.state.tile_size,~ + def input_bullets_and_mines +** Processing line: ~ return if state.bullets.length > 100~ - Inside source: true *** True Line Result - w: args.state.tile_size, -** Processing line: ~ h: args.state.tile_size,~ + return if state.bullets.length > 100 +** Processing line: ~~ - Inside source: true *** True Line Result - h: args.state.tile_size, -** Processing line: ~ path: 'sprites/circle/gray.png',~ + +** Processing line: ~ [~ - Inside source: true *** True Line Result - path: 'sprites/circle/gray.png', -** Processing line: ~ range: 100~ + [ +** Processing line: ~ [inputs.controller_one.key_held.a || inputs.keyboard.key_held.space,~ - Inside source: true *** True Line Result - range: 100 -** Processing line: ~ }~ + [inputs.controller_one.key_held.a || inputs.keyboard.key_held.space, +** Processing line: ~ inputs.controller_one.key_down.b || inputs.keyboard.key_down.down,~ - Inside source: true *** True Line Result - } -** Processing line: ~ end~ + inputs.controller_one.key_down.b || inputs.keyboard.key_down.down, +** Processing line: ~ state.ship_blue],~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + state.ship_blue], +** Processing line: ~ [inputs.controller_two.key_held.a, inputs.controller_two.key_down.b, state.ship_red]~ - Inside source: true *** True Line Result - -** Processing line: ~ args.state.bullet_size ||= 25~ + [inputs.controller_two.key_held.a, inputs.controller_two.key_down.b, state.ship_red] +** Processing line: ~ ].each do |a_held, b_down, ship|~ - Inside source: true *** True Line Result - args.state.bullet_size ||= 25 -** Processing line: ~ args.state.bullets ||= []~ + ].each do |a_held, b_down, ship| +** Processing line: ~ input_bullet(a_held && state.tick_count.mod_zero?(10).or(a_held == 0), ship)~ - Inside source: true *** True Line Result - args.state.bullets ||= [] -** Processing line: ~ args.state.bullet_path ||= 'sprites/circle/orange.png'~ + input_bullet(a_held && state.tick_count.mod_zero?(10).or(a_held == 0), ship) +** Processing line: ~ input_mine(b_down, ship)~ - Inside source: true *** True Line Result - args.state.bullet_path ||= 'sprites/circle/orange.png' -** Processing line: ~ #~ + input_mine(b_down, ship) +** Processing line: ~ end~ - Inside source: true *** True Line Result - # -** Processing line: ~ end~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - end + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def render args~ -- Inside source: true -*** True Line Result - def render args -** Processing line: ~ render_grid args~ +** Processing line: ~ def calc_kill_ships~ - Inside source: true *** True Line Result - render_grid args -** Processing line: ~ render_a_star args~ + def calc_kill_ships +** Processing line: ~ alive_ships.find_all { |s| s.damage >= 5 }.each do |s|~ - Inside source: true *** True Line Result - render_a_star args -** Processing line: ~ args.outputs.sprites << args.state.tanks~ + alive_ships.find_all { |s| s.damage >= 5 }.each do |s| +** Processing line: ~ s.dead = true~ - Inside source: true *** True Line Result - args.outputs.sprites << args.state.tanks -** Processing line: ~ args.outputs.sprites << args.state.turrets~ + s.dead = true +** Processing line: ~ create_explosion! :ship_explosion, s, 20, 20, 30, s.max_alpha~ - Inside source: true *** True Line Result - args.outputs.sprites << args.state.turrets -** Processing line: ~ args.outputs.sprites << args.state.bullets~ + create_explosion! :ship_explosion, s, 20, 20, 30, s.max_alpha +** Processing line: ~ end~ - Inside source: true *** True Line Result - args.outputs.sprites << args.state.bullets -** Processing line: ~ end~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - end + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def render_grid args~ +** Processing line: ~ def calc_score~ - Inside source: true *** True Line Result - def render_grid args -** Processing line: ~ # Draw a square the size and color of the grid~ + def calc_score +** Processing line: ~ return if state.round_finished~ - Inside source: true *** True Line Result - # Draw a square the size and color of the grid -** Processing line: ~ args.outputs.solids << [~ + return if state.round_finished +** Processing line: ~ return if alive_ships.length > 1~ - Inside source: true *** True Line Result - args.outputs.solids << [ -** Processing line: ~ 0,~ + return if alive_ships.length > 1 +** Processing line: ~~ - Inside source: true *** True Line Result - 0, -** Processing line: ~ 0,~ + +** Processing line: ~ if alive_ships.first == state.ship_red~ - Inside source: true *** True Line Result - 0, -** Processing line: ~ args.state.grid_size * args.state.tile_size,~ + if alive_ships.first == state.ship_red +** Processing line: ~ state.ship_red_score += 1~ - Inside source: true *** True Line Result - args.state.grid_size * args.state.tile_size, -** Processing line: ~ args.state.grid_size * args.state.tile_size,~ + state.ship_red_score += 1 +** Processing line: ~ elsif alive_ships.first == state.ship_blue~ - Inside source: true *** True Line Result - args.state.grid_size * args.state.tile_size, -** Processing line: ~ grid_color~ + elsif alive_ships.first == state.ship_blue +** Processing line: ~ state.ship_blue_score += 1~ - Inside source: true *** True Line Result - grid_color -** Processing line: ~ ]~ + state.ship_blue_score += 1 +** Processing line: ~ end~ - Inside source: true *** True Line Result - ] + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Draw lines across the grid to show tiles~ -- Inside source: true -*** True Line Result - # Draw lines across the grid to show tiles -** Processing line: ~ (args.state.grid_size + 1).times do | value |~ -- Inside source: true -*** True Line Result - (args.state.grid_size + 1).times do | value | -** Processing line: ~ render_horizontal_line(args, value)~ -- Inside source: true -*** True Line Result - render_horizontal_line(args, value) -** Processing line: ~ render_vertical_line(args, value)~ +** Processing line: ~ state.round_finished = true~ - Inside source: true *** True Line Result - render_vertical_line(args, value) + state.round_finished = true ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -85920,134 +92891,138 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Render special tiles~ +** Processing line: ~ def calc_reset_ships~ - Inside source: true *** True Line Result - # Render special tiles -** Processing line: ~ render_tile(args, args.state.grid_start, start_color)~ + def calc_reset_ships +** Processing line: ~ return unless state.round_finished~ - Inside source: true *** True Line Result - render_tile(args, args.state.grid_start, start_color) -** Processing line: ~ render_tile(args, args.state.grid_goal, goal_color)~ + return unless state.round_finished +** Processing line: ~ state.round_finished_debounce ||= 2.seconds~ - Inside source: true *** True Line Result - render_tile(args, args.state.grid_goal, goal_color) -** Processing line: ~ args.state.walls.keys.each { |wall| render_tile(args, wall, wall_color) }~ + state.round_finished_debounce ||= 2.seconds +** Processing line: ~ state.round_finished_debounce -= 1~ - Inside source: true *** True Line Result - args.state.walls.keys.each { |wall| render_tile(args, wall, wall_color) } -** Processing line: ~ end~ + state.round_finished_debounce -= 1 +** Processing line: ~ return if state.round_finished_debounce > 0~ - Inside source: true *** True Line Result - end + return if state.round_finished_debounce > 0 +** Processing line: ~ start_new_round!~ +- Inside source: true +*** True Line Result + start_new_round! +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def render_vertical_line args, x~ +** Processing line: ~ def start_new_round!~ - Inside source: true *** True Line Result - def render_vertical_line args, x -** Processing line: ~ args.outputs.lines << [~ + def start_new_round! +** Processing line: ~ state.ship_blue = new_blue_ship~ - Inside source: true *** True Line Result - args.outputs.lines << [ -** Processing line: ~ x * args.state.tile_size,~ + state.ship_blue = new_blue_ship +** Processing line: ~ state.ship_red = new_red_ship~ - Inside source: true *** True Line Result - x * args.state.tile_size, -** Processing line: ~ 0,~ + state.ship_red = new_red_ship +** Processing line: ~ state.round_finished = false~ - Inside source: true *** True Line Result - 0, -** Processing line: ~ x * args.state.tile_size,~ + state.round_finished = false +** Processing line: ~ state.round_finished_debounce = nil~ - Inside source: true *** True Line Result - x * args.state.tile_size, -** Processing line: ~ args.state.tile_size * args.state.grid_size,~ + state.round_finished_debounce = nil +** Processing line: ~ state.flames.clear~ - Inside source: true *** True Line Result - args.state.tile_size * args.state.grid_size, -** Processing line: ~ ]~ + state.flames.clear +** Processing line: ~ state.bullets.clear~ - Inside source: true *** True Line Result - ] -** Processing line: ~ end~ + state.bullets.clear +** Processing line: ~ end~ - Inside source: true *** True Line Result - end + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def render_horizontal_line args, y~ +** Processing line: ~ def calc_winner~ - Inside source: true *** True Line Result - def render_horizontal_line args, y -** Processing line: ~ args.outputs.lines << [~ + def calc_winner +** Processing line: ~ calc_kill_ships~ - Inside source: true *** True Line Result - args.outputs.lines << [ -** Processing line: ~ 0,~ + calc_kill_ships +** Processing line: ~ calc_score~ - Inside source: true *** True Line Result - 0, -** Processing line: ~ y * args.state.tile_size,~ + calc_score +** Processing line: ~ calc_reset_ships~ - Inside source: true *** True Line Result - y * args.state.tile_size, -** Processing line: ~ args.state.tile_size * args.state.grid_size,~ + calc_reset_ships +** Processing line: ~ end~ - Inside source: true *** True Line Result - args.state.tile_size * args.state.grid_size, -** Processing line: ~ y * args.state.tile_size,~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - y * args.state.tile_size, -** Processing line: ~ ]~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - ] -** Processing line: ~ end~ + +** Processing line: ~ $dueling_spaceship = DuelingSpaceships.new~ - Inside source: true *** True Line Result - end + $dueling_spaceship = DuelingSpaceships.new ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def render_tile args, tile, color~ -- Inside source: true -*** True Line Result - def render_tile args, tile, color -** Processing line: ~ args.outputs.solids << [~ +** Processing line: ~ def tick args~ - Inside source: true *** True Line Result - args.outputs.solids << [ -** Processing line: ~ tile.x * args.state.tile_size,~ + def tick args +** Processing line: ~ args.grid.origin_center!~ - Inside source: true *** True Line Result - tile.x * args.state.tile_size, -** Processing line: ~ tile.y * args.state.tile_size,~ + args.grid.origin_center! +** Processing line: ~ $dueling_spaceship.inputs = args.inputs~ - Inside source: true *** True Line Result - tile.y * args.state.tile_size, -** Processing line: ~ args.state.tile_size,~ + $dueling_spaceship.inputs = args.inputs +** Processing line: ~ $dueling_spaceship.outputs = args.outputs~ - Inside source: true *** True Line Result - args.state.tile_size, -** Processing line: ~ args.state.tile_size,~ + $dueling_spaceship.outputs = args.outputs +** Processing line: ~ $dueling_spaceship.state = args.state~ - Inside source: true *** True Line Result - args.state.tile_size, -** Processing line: ~ color~ + $dueling_spaceship.state = args.state +** Processing line: ~ $dueling_spaceship.grid = args.grid~ - Inside source: true *** True Line Result - color -** Processing line: ~ ]~ + $dueling_spaceship.grid = args.grid +** Processing line: ~ $dueling_spaceship.tick~ - Inside source: true *** True Line Result - ] + $dueling_spaceship.tick ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -86056,102 +93031,102 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def calc args~ -- Inside source: true +** Processing line: ~#+end_src~ +- Line was identified as the end of a code block. *** True Line Result - def calc args -** Processing line: ~ calc_a_star args~ -- Inside source: true +#+end_src +** Processing line: ~~ +- End of paragraph detected. *** True Line Result - calc_a_star args -** Processing line: ~ calc_tanks args~ -- Inside source: true + +** Processing line: ~*** arcade/flappy dragon/credits.txt~ +- Header detected. *** True Line Result - calc_tanks args -** Processing line: ~ calc_turrets args~ -- Inside source: true + *** True Line Result - calc_turrets args -** Processing line: ~ calc_bullets args~ -- Inside source: true +*** arcade/flappy dragon/credits.txt +** Processing line: ~#+begin_src ruby~ +- Line was identified as the beginning of a code block. *** True Line Result - calc_bullets args -** Processing line: ~ end~ -- Inside source: true + *** True Line Result - end -** Processing line: ~~ +#+begin_src ruby +** Processing line: ~ # ./samples/99_genre_arcade/flappy_dragon/CREDITS.txt~ - Inside source: true *** True Line Result - -** Processing line: ~ def calc_a_star args~ + # ./samples/99_genre_arcade/flappy_dragon/CREDITS.txt +** Processing line: ~ code: Amir Rajan, https://twitter.com/amirrajan~ - Inside source: true *** True Line Result - def calc_a_star args -** Processing line: ~ # Only does this one time~ + code: Amir Rajan, https://twitter.com/amirrajan +** Processing line: ~ graphics and audio: Nick Culbertson, https://twitter.com/MobyPixel~ - Inside source: true *** True Line Result - # Only does this one time -** Processing line: ~ return unless args.state.a_star.path.empty?~ + graphics and audio: Nick Culbertson, https://twitter.com/MobyPixel +** Processing line: ~~ - Inside source: true *** True Line Result - return unless args.state.a_star.path.empty? + ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Start the search from the grid start~ -- Inside source: true +** Processing line: ~#+end_src~ +- Line was identified as the end of a code block. *** True Line Result - # Start the search from the grid start -** Processing line: ~ args.state.a_star.frontier << args.state.grid_start~ -- Inside source: true +#+end_src +** Processing line: ~~ +- End of paragraph detected. *** True Line Result - args.state.a_star.frontier << args.state.grid_start -** Processing line: ~ args.state.a_star.came_from[args.state.grid_start] = nil~ -- Inside source: true + +** Processing line: ~*** arcade/flappy dragon/main.rb~ +- Header detected. *** True Line Result - args.state.a_star.came_from[args.state.grid_start] = nil -** Processing line: ~~ -- Inside source: true + +*** True Line Result +*** arcade/flappy dragon/main.rb +** Processing line: ~#+begin_src ruby~ +- Line was identified as the beginning of a code block. *** True Line Result -** Processing line: ~ # Until a path to the goal has been found or there are no more tiles to explore~ +*** True Line Result +#+begin_src ruby +** Processing line: ~ # ./samples/99_genre_arcade/flappy_dragon/app/main.rb~ - Inside source: true *** True Line Result - # Until a path to the goal has been found or there are no more tiles to explore -** Processing line: ~ until (args.state.a_star.came_from.has_key?(args.state.grid_goal)|| args.state.a_star.frontier.empty?)~ + # ./samples/99_genre_arcade/flappy_dragon/app/main.rb +** Processing line: ~ class FlappyDragon~ - Inside source: true *** True Line Result - until (args.state.a_star.came_from.has_key?(args.state.grid_goal)|| args.state.a_star.frontier.empty?) -** Processing line: ~ # For the first tile in the frontier~ + class FlappyDragon +** Processing line: ~ attr_accessor :grid, :inputs, :state, :outputs~ - Inside source: true *** True Line Result - # For the first tile in the frontier -** Processing line: ~ tile_to_expand_from = args.state.a_star.frontier.shift~ + attr_accessor :grid, :inputs, :state, :outputs +** Processing line: ~~ - Inside source: true *** True Line Result - tile_to_expand_from = args.state.a_star.frontier.shift -** Processing line: ~ # Add each of its neighbors to the frontier~ + +** Processing line: ~ def tick~ - Inside source: true *** True Line Result - # Add each of its neighbors to the frontier -** Processing line: ~ neighbors(args, tile_to_expand_from).each do | tile |~ + def tick +** Processing line: ~ defaults~ - Inside source: true *** True Line Result - neighbors(args, tile_to_expand_from).each do | tile | -** Processing line: ~ args.state.a_star.frontier << tile~ + defaults +** Processing line: ~ render~ - Inside source: true *** True Line Result - args.state.a_star.frontier << tile -** Processing line: ~ args.state.a_star.came_from[tile] = tile_to_expand_from~ + render +** Processing line: ~ calc~ - Inside source: true *** True Line Result - args.state.a_star.came_from[tile] = tile_to_expand_from -** Processing line: ~ end~ + calc +** Processing line: ~ process_inputs~ - Inside source: true *** True Line Result - end + process_inputs ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -86160,1058 +93135,994 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Stop calculating a path if the goal was never reached~ -- Inside source: true -*** True Line Result - # Stop calculating a path if the goal was never reached -** Processing line: ~ return unless args.state.a_star.came_from.has_key? args.state.grid_goal~ +** Processing line: ~ def defaults~ - Inside source: true *** True Line Result - return unless args.state.a_star.came_from.has_key? args.state.grid_goal -** Processing line: ~~ + def defaults +** Processing line: ~ state.flap_power = 11~ - Inside source: true *** True Line Result - -** Processing line: ~ # Fill path by tracing back from the goal~ + state.flap_power = 11 +** Processing line: ~ state.gravity = 0.9~ - Inside source: true *** True Line Result - # Fill path by tracing back from the goal -** Processing line: ~ current_cell = args.state.grid_goal~ + state.gravity = 0.9 +** Processing line: ~ state.ceiling = 600~ - Inside source: true *** True Line Result - current_cell = args.state.grid_goal -** Processing line: ~ while current_cell~ + state.ceiling = 600 +** Processing line: ~ state.ceiling_flap_power = 6~ - Inside source: true *** True Line Result - while current_cell -** Processing line: ~ args.state.a_star.path.unshift current_cell~ + state.ceiling_flap_power = 6 +** Processing line: ~ state.wall_countdown_length = 100~ - Inside source: true *** True Line Result - args.state.a_star.path.unshift current_cell -** Processing line: ~ current_cell = args.state.a_star.came_from[current_cell]~ + state.wall_countdown_length = 100 +** Processing line: ~ state.wall_gap_size = 100~ - Inside source: true *** True Line Result - current_cell = args.state.a_star.came_from[current_cell] -** Processing line: ~ end~ + state.wall_gap_size = 100 +** Processing line: ~ state.wall_countdown ||= 0~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + state.wall_countdown ||= 0 +** Processing line: ~ state.hi_score ||= 0~ - Inside source: true *** True Line Result - -** Processing line: ~ puts "The path has been calculated"~ + state.hi_score ||= 0 +** Processing line: ~ state.score ||= 0~ - Inside source: true *** True Line Result - puts "The path has been calculated" -** Processing line: ~ puts args.state.a_star.path~ + state.score ||= 0 +** Processing line: ~ state.walls ||= []~ - Inside source: true *** True Line Result - puts args.state.a_star.path -** Processing line: ~ end~ + state.walls ||= [] +** Processing line: ~ state.x ||= 50~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + state.x ||= 50 +** Processing line: ~ state.y ||= 500~ - Inside source: true *** True Line Result - -** Processing line: ~ def calc_tanks args~ + state.y ||= 500 +** Processing line: ~ state.dy ||= 0~ - Inside source: true *** True Line Result - def calc_tanks args -** Processing line: ~ spawn_tank args~ + state.dy ||= 0 +** Processing line: ~ state.scene ||= :menu~ - Inside source: true *** True Line Result - spawn_tank args -** Processing line: ~ move_tanks args~ + state.scene ||= :menu +** Processing line: ~ state.scene_at ||= 0~ - Inside source: true *** True Line Result - move_tanks args -** Processing line: ~ end~ + state.scene_at ||= 0 +** Processing line: ~ state.difficulty ||= :normal~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + state.difficulty ||= :normal +** Processing line: ~ state.new_difficulty ||= :normal~ - Inside source: true *** True Line Result - -** Processing line: ~ def move_tanks args~ + state.new_difficulty ||= :normal +** Processing line: ~ state.countdown ||= 4.seconds~ - Inside source: true *** True Line Result - def move_tanks args -** Processing line: ~ # Remove tanks that have reached the end of their path~ + state.countdown ||= 4.seconds +** Processing line: ~ state.flash_at ||= 0~ - Inside source: true *** True Line Result - # Remove tanks that have reached the end of their path -** Processing line: ~ args.state.tanks.reject! { |tank| tank[:a_star].empty? }~ + state.flash_at ||= 0 +** Processing line: ~ end~ - Inside source: true *** True Line Result - args.state.tanks.reject! { |tank| tank[:a_star].empty? } + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Tanks have an array that has each tile it has to go to in order from a* path~ -- Inside source: true -*** True Line Result - # Tanks have an array that has each tile it has to go to in order from a* path -** Processing line: ~ args.state.tanks.each do | tank |~ +** Processing line: ~ def render~ - Inside source: true *** True Line Result - args.state.tanks.each do | tank | -** Processing line: ~ destination = tank[:a_star][0]~ + def render +** Processing line: ~ outputs.sounds << "sounds/flappy-song.ogg" if state.tick_count == 1~ - Inside source: true *** True Line Result - destination = tank[:a_star][0] -** Processing line: ~ # Move the tank towards the destination~ + outputs.sounds << "sounds/flappy-song.ogg" if state.tick_count == 1 +** Processing line: ~ render_score~ - Inside source: true *** True Line Result - # Move the tank towards the destination -** Processing line: ~ tank[:x] += copy_sign(args.state.tank_speed, ((destination.x * args.state.tile_size) - tank[:x]))~ + render_score +** Processing line: ~ render_menu~ - Inside source: true *** True Line Result - tank[:x] += copy_sign(args.state.tank_speed, ((destination.x * args.state.tile_size) - tank[:x])) -** Processing line: ~ tank[:y] += copy_sign(args.state.tank_speed, ((destination.y * args.state.tile_size) - tank[:y]))~ + render_menu +** Processing line: ~ render_game~ - Inside source: true *** True Line Result - tank[:y] += copy_sign(args.state.tank_speed, ((destination.y * args.state.tile_size) - tank[:y])) -** Processing line: ~ # If the tank has reached its destination~ + render_game +** Processing line: ~ end~ - Inside source: true *** True Line Result - # If the tank has reached its destination -** Processing line: ~ if (destination.x * args.state.tile_size) == tank[:x] and~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - if (destination.x * args.state.tile_size) == tank[:x] and -** Processing line: ~ (destination.y * args.state.tile_size) == tank[:y]~ + +** Processing line: ~ def render_score~ - Inside source: true *** True Line Result - (destination.y * args.state.tile_size) == tank[:y] -** Processing line: ~ # Set the destination to the next point in the path~ + def render_score +** Processing line: ~ outputs.primitives << [10, 710, "HI SCORE: #{state.hi_score}", large_white_typeset].label~ - Inside source: true *** True Line Result - # Set the destination to the next point in the path -** Processing line: ~ tank[:a_star].shift~ + outputs.primitives << [10, 710, "HI SCORE: #{state.hi_score}", large_white_typeset].label +** Processing line: ~ outputs.primitives << [10, 680, "SCORE: #{state.score}", large_white_typeset].label~ - Inside source: true *** True Line Result - tank[:a_star].shift -** Processing line: ~ end~ + outputs.primitives << [10, 680, "SCORE: #{state.score}", large_white_typeset].label +** Processing line: ~ outputs.primitives << [10, 650, "DIFFICULTY: #{state.difficulty.upcase}", large_white_typeset].label~ - Inside source: true *** True Line Result - end + outputs.primitives << [10, 650, "DIFFICULTY: #{state.difficulty.upcase}", large_white_typeset].label ** Processing line: ~ end~ - Inside source: true *** True Line Result end -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def calc_turrets args~ -- Inside source: true -*** True Line Result - def calc_turrets args -** Processing line: ~ return unless args.state.tick_count.mod_zero? args.state.turret_shoot_period~ +** Processing line: ~ def render_menu~ - Inside source: true *** True Line Result - return unless args.state.tick_count.mod_zero? args.state.turret_shoot_period -** Processing line: ~ args.state.turrets.each do | turret |~ + def render_menu +** Processing line: ~ return unless state.scene == :menu~ - Inside source: true *** True Line Result - args.state.turrets.each do | turret | -** Processing line: ~ # Finds the closest tank~ + return unless state.scene == :menu +** Processing line: ~ render_overlay~ - Inside source: true *** True Line Result - # Finds the closest tank -** Processing line: ~ target = nil~ + render_overlay +** Processing line: ~~ - Inside source: true *** True Line Result - target = nil -** Processing line: ~ shortest_distance = turret[:range] + 1~ + +** Processing line: ~ outputs.labels << [640, 700, "Flappy Dragon", 50, 1, 255, 255, 255]~ - Inside source: true *** True Line Result - shortest_distance = turret[:range] + 1 -** Processing line: ~ args.state.tanks.each do | tank |~ + outputs.labels << [640, 700, "Flappy Dragon", 50, 1, 255, 255, 255] +** Processing line: ~ outputs.labels << [640, 500, "Instructions: Press Spacebar to flap. Don't die.", 4, 1, 255, 255, 255]~ - Inside source: true *** True Line Result - args.state.tanks.each do | tank | -** Processing line: ~ distance = distance_between(turret[:x], turret[:y], tank[:x], tank[:y])~ + outputs.labels << [640, 500, "Instructions: Press Spacebar to flap. Don't die.", 4, 1, 255, 255, 255] +** Processing line: ~ outputs.labels << [430, 430, "[Tab] Change difficulty", 4, 0, 255, 255, 255]~ - Inside source: true *** True Line Result - distance = distance_between(turret[:x], turret[:y], tank[:x], tank[:y]) -** Processing line: ~ if distance < shortest_distance~ + outputs.labels << [430, 430, "[Tab] Change difficulty", 4, 0, 255, 255, 255] +** Processing line: ~ outputs.labels << [430, 400, "[Enter] Start at New Difficulty ", 4, 0, 255, 255, 255]~ - Inside source: true *** True Line Result - if distance < shortest_distance -** Processing line: ~ target = tank~ + outputs.labels << [430, 400, "[Enter] Start at New Difficulty ", 4, 0, 255, 255, 255] +** Processing line: ~ outputs.labels << [430, 370, "[Escape] Cancel/Resume ", 4, 0, 255, 255, 255]~ - Inside source: true *** True Line Result - target = tank -** Processing line: ~ shortest_distance = distance~ + outputs.labels << [430, 370, "[Escape] Cancel/Resume ", 4, 0, 255, 255, 255] +** Processing line: ~ outputs.labels << [640, 300, "(mouse, touch, and game controllers work, too!) ", 4, 1, 255, 255, 255]~ - Inside source: true *** True Line Result - shortest_distance = distance -** Processing line: ~ end~ + outputs.labels << [640, 300, "(mouse, touch, and game controllers work, too!) ", 4, 1, 255, 255, 255] +** Processing line: ~ outputs.labels << [640, 200, "Difficulty: #{state.new_difficulty.capitalize}", 4, 1, 255, 255, 255]~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + outputs.labels << [640, 200, "Difficulty: #{state.new_difficulty.capitalize}", 4, 1, 255, 255, 255] +** Processing line: ~~ - Inside source: true *** True Line Result - end -** Processing line: ~ # If there is a tank in range, fires a bullet~ + +** Processing line: ~ outputs.labels << [10, 100, "Code: @amirrajan", 255, 255, 255]~ - Inside source: true *** True Line Result - # If there is a tank in range, fires a bullet -** Processing line: ~ if target~ + outputs.labels << [10, 100, "Code: @amirrajan", 255, 255, 255] +** Processing line: ~ outputs.labels << [10, 80, "Art: @mobypixel", 255, 255, 255]~ - Inside source: true *** True Line Result - if target -** Processing line: ~ args.state.bullets << {~ + outputs.labels << [10, 80, "Art: @mobypixel", 255, 255, 255] +** Processing line: ~ outputs.labels << [10, 60, "Music: @mobypixel", 255, 255, 255]~ - Inside source: true *** True Line Result - args.state.bullets << { -** Processing line: ~ x: turret[:x],~ + outputs.labels << [10, 60, "Music: @mobypixel", 255, 255, 255] +** Processing line: ~ outputs.labels << [10, 40, "Engine: DragonRuby GTK", 255, 255, 255]~ - Inside source: true *** True Line Result - x: turret[:x], -** Processing line: ~ y: turret[:y],~ + outputs.labels << [10, 40, "Engine: DragonRuby GTK", 255, 255, 255] +** Processing line: ~ end~ - Inside source: true *** True Line Result - y: turret[:y], -** Processing line: ~ w: args.state.bullet_size,~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - w: args.state.bullet_size, -** Processing line: ~ h: args.state.bullet_size,~ + +** Processing line: ~ def render_overlay~ - Inside source: true *** True Line Result - h: args.state.bullet_size, -** Processing line: ~ path: args.state.bullet_path,~ + def render_overlay +** Processing line: ~ outputs.primitives << [grid.rect.scale_rect(1.1, 0, 0), 0, 0, 0, 230].solid~ - Inside source: true *** True Line Result - path: args.state.bullet_path, -** Processing line: ~ # Note that this makes it heat-seeking, because target is passed by reference~ + outputs.primitives << [grid.rect.scale_rect(1.1, 0, 0), 0, 0, 0, 230].solid +** Processing line: ~ end~ - Inside source: true *** True Line Result - # Note that this makes it heat-seeking, because target is passed by reference -** Processing line: ~ # Could do target.clone to make the bullet go to where the tank initially was~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - # Could do target.clone to make the bullet go to where the tank initially was -** Processing line: ~ target: target~ + +** Processing line: ~ def render_game~ - Inside source: true *** True Line Result - target: target -** Processing line: ~ }~ + def render_game +** Processing line: ~ render_game_over~ - Inside source: true *** True Line Result - } -** Processing line: ~ end~ + render_game_over +** Processing line: ~ render_background~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + render_background +** Processing line: ~ render_walls~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + render_walls +** Processing line: ~ render_dragon~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + render_dragon +** Processing line: ~ render_flash~ - Inside source: true *** True Line Result - -** Processing line: ~ def calc_bullets args~ + render_flash +** Processing line: ~ end~ - Inside source: true *** True Line Result - def calc_bullets args -** Processing line: ~ # Bullets aim for the center of their targets~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - # Bullets aim for the center of their targets -** Processing line: ~ args.state.bullets.each { |bullet| move bullet, center_of(bullet[:target])}~ + +** Processing line: ~ def render_game_over~ - Inside source: true *** True Line Result - args.state.bullets.each { |bullet| move bullet, center_of(bullet[:target])} -** Processing line: ~ args.state.bullets.reject! { |b| b.intersect_rect? b[:target] }~ + def render_game_over +** Processing line: ~ return unless state.scene == :game~ - Inside source: true *** True Line Result - args.state.bullets.reject! { |b| b.intersect_rect? b[:target] } -** Processing line: ~ end~ + return unless state.scene == :game +** Processing line: ~ outputs.labels << [638, 358, score_text, 20, 1]~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + outputs.labels << [638, 358, score_text, 20, 1] +** Processing line: ~ outputs.labels << [635, 360, score_text, 20, 1, 255, 255, 255]~ - Inside source: true *** True Line Result - -** Processing line: ~ def center_of object~ + outputs.labels << [635, 360, score_text, 20, 1, 255, 255, 255] +** Processing line: ~ outputs.labels << [638, 428, countdown_text, 20, 1]~ - Inside source: true *** True Line Result - def center_of object -** Processing line: ~ object = object.clone~ + outputs.labels << [638, 428, countdown_text, 20, 1] +** Processing line: ~ outputs.labels << [635, 430, countdown_text, 20, 1, 255, 255, 255]~ - Inside source: true *** True Line Result - object = object.clone -** Processing line: ~ object[:x] += 0.5~ + outputs.labels << [635, 430, countdown_text, 20, 1, 255, 255, 255] +** Processing line: ~ end~ - Inside source: true *** True Line Result - object[:x] += 0.5 -** Processing line: ~ object[:y] += 0.5~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - object[:y] += 0.5 -** Processing line: ~ object~ + +** Processing line: ~ def render_background~ - Inside source: true *** True Line Result - object -** Processing line: ~ end~ + def render_background +** Processing line: ~ outputs.sprites << [0, 0, 1280, 720, 'sprites/background.png']~ - Inside source: true *** True Line Result - end + outputs.sprites << [0, 0, 1280, 720, 'sprites/background.png'] ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def render_a_star args~ +** Processing line: ~ scroll_point_at = state.tick_count~ - Inside source: true *** True Line Result - def render_a_star args -** Processing line: ~ args.state.a_star.path.map do |tile|~ + scroll_point_at = state.tick_count +** Processing line: ~ scroll_point_at = state.scene_at if state.scene == :menu~ - Inside source: true *** True Line Result - args.state.a_star.path.map do |tile| -** Processing line: ~ # Map each x, y coordinate to the center of the tile and scale up~ + scroll_point_at = state.scene_at if state.scene == :menu +** Processing line: ~ scroll_point_at = state.death_at if state.countdown > 0~ - Inside source: true *** True Line Result - # Map each x, y coordinate to the center of the tile and scale up -** Processing line: ~ [(tile.x + 0.5) * args.state.tile_size, (tile.y + 0.5) * args.state.tile_size]~ + scroll_point_at = state.death_at if state.countdown > 0 +** Processing line: ~ scroll_point_at ||= 0~ - Inside source: true *** True Line Result - [(tile.x + 0.5) * args.state.tile_size, (tile.y + 0.5) * args.state.tile_size] -** Processing line: ~ end.inject do | point_a, point_b |~ + scroll_point_at ||= 0 +** Processing line: ~~ - Inside source: true *** True Line Result - end.inject do | point_a, point_b | -** Processing line: ~ # Render the line between each point~ + +** Processing line: ~ outputs.sprites << scrolling_background(scroll_point_at, 'sprites/parallax_back.png', 0.25)~ - Inside source: true *** True Line Result - # Render the line between each point -** Processing line: ~ args.outputs.lines << [point_a.x, point_a.y, point_b.x, point_b.y, a_star_color]~ + outputs.sprites << scrolling_background(scroll_point_at, 'sprites/parallax_back.png', 0.25) +** Processing line: ~ outputs.sprites << scrolling_background(scroll_point_at, 'sprites/parallax_middle.png', 0.50)~ - Inside source: true *** True Line Result - args.outputs.lines << [point_a.x, point_a.y, point_b.x, point_b.y, a_star_color] -** Processing line: ~ point_b~ + outputs.sprites << scrolling_background(scroll_point_at, 'sprites/parallax_middle.png', 0.50) +** Processing line: ~ outputs.sprites << scrolling_background(scroll_point_at, 'sprites/parallax_front.png', 1.00, -80)~ - Inside source: true *** True Line Result - point_b + outputs.sprites << scrolling_background(scroll_point_at, 'sprites/parallax_front.png', 1.00, -80) ** Processing line: ~ end~ - Inside source: true *** True Line Result end -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Moves object to target at speed~ +** Processing line: ~ def render_walls~ - Inside source: true *** True Line Result - # Moves object to target at speed -** Processing line: ~ def move object, target, speed = 1~ + def render_walls +** Processing line: ~ state.walls.each do |w|~ - Inside source: true *** True Line Result - def move object, target, speed = 1 -** Processing line: ~ if target.is_a? Hash~ + state.walls.each do |w| +** Processing line: ~ w.sprites = [~ - Inside source: true *** True Line Result - if target.is_a? Hash -** Processing line: ~ object[:x] += copy_sign(speed, target[:x] - object[:x])~ + w.sprites = [ +** Processing line: ~ [w.x, w.bottom_height - 720, 100, 720, 'sprites/wall.png', 180],~ - Inside source: true *** True Line Result - object[:x] += copy_sign(speed, target[:x] - object[:x]) -** Processing line: ~ object[:y] += copy_sign(speed, target[:y] - object[:y])~ + [w.x, w.bottom_height - 720, 100, 720, 'sprites/wall.png', 180], +** Processing line: ~ [w.x, w.top_y, 100, 720, 'sprites/wallbottom.png', 0]~ - Inside source: true *** True Line Result - object[:y] += copy_sign(speed, target[:y] - object[:y]) -** Processing line: ~ else~ + [w.x, w.top_y, 100, 720, 'sprites/wallbottom.png', 0] +** Processing line: ~ ]~ - Inside source: true *** True Line Result - else -** Processing line: ~ object[:x] += copy_sign(speed, target.x - object[:x])~ + ] +** Processing line: ~ end~ - Inside source: true *** True Line Result - object[:x] += copy_sign(speed, target.x - object[:x]) -** Processing line: ~ object[:y] += copy_sign(speed, target.y - object[:y])~ + end +** Processing line: ~ outputs.sprites << state.walls.map(&:sprites)~ - Inside source: true *** True Line Result - object[:y] += copy_sign(speed, target.y - object[:y]) + outputs.sprites << state.walls.map(&:sprites) ** Processing line: ~ end~ - Inside source: true *** True Line Result end -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end -** Processing line: ~ #~ -- Inside source: true -*** True Line Result - # -** Processing line: ~ #~ -- Inside source: true -*** True Line Result - # -** Processing line: ~ def distance_between a_x, a_y, b_x, b_y~ +** Processing line: ~~ - Inside source: true *** True Line Result - def distance_between a_x, a_y, b_x, b_y -** Processing line: ~ (((b_x - a_x) ** 2) + ((b_y - a_y) ** 2)) ** 0.5~ + +** Processing line: ~ def render_dragon~ - Inside source: true *** True Line Result - (((b_x - a_x) ** 2) + ((b_y - a_y) ** 2)) ** 0.5 -** Processing line: ~ end~ + def render_dragon +** Processing line: ~ state.show_death = true if state.countdown == 3.seconds~ - Inside source: true *** True Line Result - end + state.show_death = true if state.countdown == 3.seconds ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def copy_sign value, sign~ +** Processing line: ~ render_debug_hitbox false~ - Inside source: true *** True Line Result - def copy_sign value, sign -** Processing line: ~ return 0 if sign == 0~ + render_debug_hitbox false +** Processing line: ~~ - Inside source: true *** True Line Result - return 0 if sign == 0 -** Processing line: ~ return value if sign > 0~ + +** Processing line: ~ if state.show_death == false || !state.death_at~ - Inside source: true *** True Line Result - return value if sign > 0 -** Processing line: ~ -value~ + if state.show_death == false || !state.death_at +** Processing line: ~ animation_index = state.flapped_at.frame_index 6, 2, false if state.flapped_at~ - Inside source: true *** True Line Result - -value -** Processing line: ~ end~ + animation_index = state.flapped_at.frame_index 6, 2, false if state.flapped_at +** Processing line: ~ sprite_name = "sprites/dragon_fly#{animation_index.or(0) + 1}.png"~ - Inside source: true *** True Line Result - end -** Processing line: ~ #~ + sprite_name = "sprites/dragon_fly#{animation_index.or(0) + 1}.png" +** Processing line: ~ state.dragon_sprite = [state.x, state.y, 100, 80, sprite_name, state.dy * 1.2]~ - Inside source: true *** True Line Result - # -** Processing line: ~ def spawn_tank args~ + state.dragon_sprite = [state.x, state.y, 100, 80, sprite_name, state.dy * 1.2] +** Processing line: ~ else~ - Inside source: true *** True Line Result - def spawn_tank args -** Processing line: ~ return unless args.state.tick_count.mod_zero? args.state.tank_spawn_period~ + else +** Processing line: ~ sprite_name = "sprites/dragon_die.png"~ - Inside source: true *** True Line Result - return unless args.state.tick_count.mod_zero? args.state.tank_spawn_period -** Processing line: ~ args.state.tanks << {~ + sprite_name = "sprites/dragon_die.png" +** Processing line: ~ state.dragon_sprite = [state.x, state.y, 100, 80, sprite_name, state.dy * 1.2]~ - Inside source: true *** True Line Result - args.state.tanks << { -** Processing line: ~ x: args.state.grid_start.x,~ + state.dragon_sprite = [state.x, state.y, 100, 80, sprite_name, state.dy * 1.2] +** Processing line: ~ sprite_changed_elapsed = state.death_at.elapsed_time - 1.seconds~ - Inside source: true *** True Line Result - x: args.state.grid_start.x, -** Processing line: ~ y: args.state.grid_start.y,~ + sprite_changed_elapsed = state.death_at.elapsed_time - 1.seconds +** Processing line: ~ state.dragon_sprite.angle += (sprite_changed_elapsed ** 1.3) * state.death_fall_direction * -1~ - Inside source: true *** True Line Result - y: args.state.grid_start.y, -** Processing line: ~ w: args.state.tile_size,~ + state.dragon_sprite.angle += (sprite_changed_elapsed ** 1.3) * state.death_fall_direction * -1 +** Processing line: ~ state.dragon_sprite.x += (sprite_changed_elapsed ** 1.2) * state.death_fall_direction~ - Inside source: true *** True Line Result - w: args.state.tile_size, -** Processing line: ~ h: args.state.tile_size,~ + state.dragon_sprite.x += (sprite_changed_elapsed ** 1.2) * state.death_fall_direction +** Processing line: ~ state.dragon_sprite.y += (sprite_changed_elapsed * 14 - sprite_changed_elapsed ** 1.6)~ - Inside source: true *** True Line Result - h: args.state.tile_size, -** Processing line: ~ path: args.state.tank_sprite_path,~ + state.dragon_sprite.y += (sprite_changed_elapsed * 14 - sprite_changed_elapsed ** 1.6) +** Processing line: ~ end~ - Inside source: true *** True Line Result - path: args.state.tank_sprite_path, -** Processing line: ~ a_star: args.state.a_star.path.clone~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - a_star: args.state.a_star.path.clone -** Processing line: ~ }~ + +** Processing line: ~ outputs.sprites << state.dragon_sprite~ - Inside source: true *** True Line Result - } -** Processing line: ~ end~ + outputs.sprites << state.dragon_sprite +** Processing line: ~ end~ - Inside source: true *** True Line Result - end + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def neighbors args, tile~ +** Processing line: ~ def render_debug_hitbox show~ - Inside source: true *** True Line Result - def neighbors args, tile -** Processing line: ~ [[tile.x, tile.y - 1],~ + def render_debug_hitbox show +** Processing line: ~ return unless show~ - Inside source: true *** True Line Result - [[tile.x, tile.y - 1], -** Processing line: ~ [tile.x, tile.y + 1],~ + return unless show +** Processing line: ~ outputs.borders << [dragon_collision_box.rect, 255, 0, 0] if state.dragon_sprite~ - Inside source: true *** True Line Result - [tile.x, tile.y + 1], -** Processing line: ~ [tile.x + 1, tile.y],~ + outputs.borders << [dragon_collision_box.rect, 255, 0, 0] if state.dragon_sprite +** Processing line: ~ outputs.borders << state.walls.flat_map do |w|~ - Inside source: true *** True Line Result - [tile.x + 1, tile.y], -** Processing line: ~ [tile.x - 1, tile.y]].reject do | neighbor |~ + outputs.borders << state.walls.flat_map do |w| +** Processing line: ~ w.sprites.map { |s| [s.rect, 255, 0, 0] }~ - Inside source: true *** True Line Result - [tile.x - 1, tile.y]].reject do | neighbor | -** Processing line: ~ args.state.a_star.came_from.has_key?(neighbor) or~ + w.sprites.map { |s| [s.rect, 255, 0, 0] } +** Processing line: ~ end~ - Inside source: true *** True Line Result - args.state.a_star.came_from.has_key?(neighbor) or -** Processing line: ~ tile_out_of_bounds?(args, neighbor) or~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - tile_out_of_bounds?(args, neighbor) or -** Processing line: ~ args.state.walls.has_key? neighbor~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - args.state.walls.has_key? neighbor -** Processing line: ~ end~ + +** Processing line: ~ def render_flash~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + def render_flash +** Processing line: ~ return unless state.flash_at~ - Inside source: true *** True Line Result - end + return unless state.flash_at ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def tile_out_of_bounds? args, tile~ +** Processing line: ~ outputs.primitives << [grid.rect,~ - Inside source: true *** True Line Result - def tile_out_of_bounds? args, tile -** Processing line: ~ tile.x < 0 or tile.y < 0 or tile.x >= args.state.grid_size or tile.y >= args.state.grid_size~ + outputs.primitives << [grid.rect, +** Processing line: ~ white,~ - Inside source: true *** True Line Result - tile.x < 0 or tile.y < 0 or tile.x >= args.state.grid_size or tile.y >= args.state.grid_size -** Processing line: ~ end~ + white, +** Processing line: ~ 255 * state.flash_at.ease(20, :flip)].solid~ - Inside source: true *** True Line Result - end + 255 * state.flash_at.ease(20, :flip)].solid ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def grid_color~ -- Inside source: true -*** True Line Result - def grid_color -** Processing line: ~ [133, 226, 144]~ +** Processing line: ~ state.flash_at = 0 if state.flash_at.elapsed_time > 20~ - Inside source: true *** True Line Result - [133, 226, 144] -** Processing line: ~ end~ + state.flash_at = 0 if state.flash_at.elapsed_time > 20 +** Processing line: ~ end~ - Inside source: true *** True Line Result - end + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def start_color~ +** Processing line: ~ def calc~ - Inside source: true *** True Line Result - def start_color -** Processing line: ~ [226, 144, 133]~ + def calc +** Processing line: ~ return unless state.scene == :game~ - Inside source: true *** True Line Result - [226, 144, 133] -** Processing line: ~ end~ + return unless state.scene == :game +** Processing line: ~ reset_game if state.countdown == 1~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + reset_game if state.countdown == 1 +** Processing line: ~ state.countdown -= 1 and return if state.countdown > 0~ - Inside source: true *** True Line Result - -** Processing line: ~ def goal_color~ + state.countdown -= 1 and return if state.countdown > 0 +** Processing line: ~ calc_walls~ - Inside source: true *** True Line Result - def goal_color -** Processing line: ~ [226, 133, 144]~ + calc_walls +** Processing line: ~ calc_flap~ - Inside source: true *** True Line Result - [226, 133, 144] -** Processing line: ~ end~ + calc_flap +** Processing line: ~ calc_game_over~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + calc_game_over +** Processing line: ~ end~ - Inside source: true *** True Line Result - -** Processing line: ~ def wall_color~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - def wall_color -** Processing line: ~ [133, 144, 226]~ + +** Processing line: ~ def calc_walls~ - Inside source: true *** True Line Result - [133, 144, 226] -** Processing line: ~ end~ + def calc_walls +** Processing line: ~ state.walls.each { |w| w.x -= 8 }~ - Inside source: true *** True Line Result - end + state.walls.each { |w| w.x -= 8 } ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def a_star_color~ +** Processing line: ~ walls_count_before_removal = state.walls.length~ - Inside source: true *** True Line Result - def a_star_color -** Processing line: ~ [0, 0, 255]~ + walls_count_before_removal = state.walls.length +** Processing line: ~~ - Inside source: true *** True Line Result - [0, 0, 255] -** Processing line: ~ end~ + +** Processing line: ~ state.walls.reject! { |w| w.x < -100 }~ - Inside source: true *** True Line Result - end + state.walls.reject! { |w| w.x < -100 } ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~#+end_src~ -- Line was identified as the end of a code block. +** Processing line: ~ state.score += 1 if state.walls.count < walls_count_before_removal~ +- Inside source: true *** True Line Result -#+end_src + state.score += 1 if state.walls.count < walls_count_before_removal ** Processing line: ~~ -- End of paragraph detected. -*** True Line Result - -** Processing line: ~*** 3d - 3d Cube - main.rb~ -- Header detected. +- Inside source: true *** True Line Result +** Processing line: ~ state.wall_countdown -= 1 and return if state.wall_countdown > 0~ +- Inside source: true *** True Line Result -*** 3d - 3d Cube - main.rb -** Processing line: ~#+begin_src ruby~ -- Line was identified as the beginning of a code block. + state.wall_countdown -= 1 and return if state.wall_countdown > 0 +** Processing line: ~~ +- Inside source: true *** True Line Result +** Processing line: ~ state.walls << state.new_entity(:wall) do |w|~ +- Inside source: true *** True Line Result -#+begin_src ruby -** Processing line: ~ # ./samples/99_genre_3d/01_3d_cube/app/main.rb~ + state.walls << state.new_entity(:wall) do |w| +** Processing line: ~ w.x = grid.right~ - Inside source: true *** True Line Result - # ./samples/99_genre_3d/01_3d_cube/app/main.rb -** Processing line: ~ STARTX = 0.0~ + w.x = grid.right +** Processing line: ~ w.opening = grid.top~ - Inside source: true *** True Line Result - STARTX = 0.0 -** Processing line: ~ STARTY = 0.0~ + w.opening = grid.top +** Processing line: ~ .randomize(:ratio)~ - Inside source: true *** True Line Result - STARTY = 0.0 -** Processing line: ~ ENDY = 20.0~ + .randomize(:ratio) +** Processing line: ~ .greater(200)~ - Inside source: true *** True Line Result - ENDY = 20.0 -** Processing line: ~ ENDX = 20.0~ + .greater(200) +** Processing line: ~ .lesser(520)~ - Inside source: true *** True Line Result - ENDX = 20.0 -** Processing line: ~ SPINPOINT = 10~ + .lesser(520) +** Processing line: ~ w.bottom_height = w.opening - state.wall_gap_size~ - Inside source: true *** True Line Result - SPINPOINT = 10 -** Processing line: ~ SPINDURATION = 400~ + w.bottom_height = w.opening - state.wall_gap_size +** Processing line: ~ w.top_y = w.opening + state.wall_gap_size~ - Inside source: true *** True Line Result - SPINDURATION = 400 -** Processing line: ~ POINTSIZE = 8~ + w.top_y = w.opening + state.wall_gap_size +** Processing line: ~ end~ - Inside source: true *** True Line Result - POINTSIZE = 8 -** Processing line: ~ BOXDEPTH = 40~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - BOXDEPTH = 40 -** Processing line: ~ YAW = 1~ + +** Processing line: ~ state.wall_countdown = state.wall_countdown_length~ - Inside source: true *** True Line Result - YAW = 1 -** Processing line: ~ DISTANCE = 10~ + state.wall_countdown = state.wall_countdown_length +** Processing line: ~ end~ - Inside source: true *** True Line Result - DISTANCE = 10 + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def tick args~ -- Inside source: true -*** True Line Result - def tick args -** Processing line: ~ args.outputs.background_color = [0, 0, 0]~ +** Processing line: ~ def calc_flap~ - Inside source: true *** True Line Result - args.outputs.background_color = [0, 0, 0] -** Processing line: ~ a = Math.sin(args.state.tick_count / SPINDURATION) * Math.tan(args.state.tick_count / SPINDURATION)~ + def calc_flap +** Processing line: ~ state.y += state.dy~ - Inside source: true *** True Line Result - a = Math.sin(args.state.tick_count / SPINDURATION) * Math.tan(args.state.tick_count / SPINDURATION) -** Processing line: ~ s = Math.sin(a)~ + state.y += state.dy +** Processing line: ~ state.dy = state.dy.lesser state.flap_power~ - Inside source: true *** True Line Result - s = Math.sin(a) -** Processing line: ~ c = Math.cos(a)~ + state.dy = state.dy.lesser state.flap_power +** Processing line: ~ state.dy -= state.gravity~ - Inside source: true *** True Line Result - c = Math.cos(a) -** Processing line: ~ x = STARTX~ + state.dy -= state.gravity +** Processing line: ~ return if state.y < state.ceiling~ - Inside source: true *** True Line Result - x = STARTX -** Processing line: ~ y = STARTY~ + return if state.y < state.ceiling +** Processing line: ~ state.y = state.ceiling~ - Inside source: true *** True Line Result - y = STARTY -** Processing line: ~ offset_x = (1280 - (ENDX - STARTX)) / 2~ + state.y = state.ceiling +** Processing line: ~ state.dy = state.dy.lesser state.ceiling_flap_power~ - Inside source: true *** True Line Result - offset_x = (1280 - (ENDX - STARTX)) / 2 -** Processing line: ~ offset_y = (360 - (ENDY - STARTY)) / 2~ + state.dy = state.dy.lesser state.ceiling_flap_power +** Processing line: ~ end~ - Inside source: true *** True Line Result - offset_y = (360 - (ENDY - STARTY)) / 2 + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ srand(1)~ -- Inside source: true -*** True Line Result - srand(1) -** Processing line: ~ while y < ENDY do~ +** Processing line: ~ def calc_game_over~ - Inside source: true *** True Line Result - while y < ENDY do -** Processing line: ~ while x < ENDX do~ + def calc_game_over +** Processing line: ~ return unless game_over?~ - Inside source: true *** True Line Result - while x < ENDX do -** Processing line: ~ if (y == STARTY ||~ + return unless game_over? +** Processing line: ~~ - Inside source: true *** True Line Result - if (y == STARTY || -** Processing line: ~ y == (ENDY / 0.5) * 2 ||~ + +** Processing line: ~ state.death_at = state.tick_count~ - Inside source: true *** True Line Result - y == (ENDY / 0.5) * 2 || -** Processing line: ~ y == (ENDY / 0.5) * 2 + 0.5 ||~ + state.death_at = state.tick_count +** Processing line: ~ state.death_from = state.walls.first~ - Inside source: true *** True Line Result - y == (ENDY / 0.5) * 2 + 0.5 || -** Processing line: ~ y == ENDY - 0.5 ||~ + state.death_from = state.walls.first +** Processing line: ~ state.death_fall_direction = -1~ - Inside source: true *** True Line Result - y == ENDY - 0.5 || -** Processing line: ~ x == STARTX ||~ + state.death_fall_direction = -1 +** Processing line: ~ state.death_fall_direction = 1 if state.x > state.death_from.x~ - Inside source: true *** True Line Result - x == STARTX || -** Processing line: ~ x == ENDX - 0.5)~ + state.death_fall_direction = 1 if state.x > state.death_from.x +** Processing line: ~ outputs.sounds << "sounds/hit-sound.wav"~ - Inside source: true *** True Line Result - x == ENDX - 0.5) -** Processing line: ~ z = rand(BOXDEPTH)~ + outputs.sounds << "sounds/hit-sound.wav" +** Processing line: ~ begin_countdown~ - Inside source: true *** True Line Result - z = rand(BOXDEPTH) -** Processing line: ~ z *= Math.sin(a / 2)~ + begin_countdown +** Processing line: ~ end~ - Inside source: true *** True Line Result - z *= Math.sin(a / 2) -** Processing line: ~ x -= SPINPOINT~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - x -= SPINPOINT -** Processing line: ~ u = (x * c) - (z * s)~ + +** Processing line: ~ def process_inputs~ - Inside source: true *** True Line Result - u = (x * c) - (z * s) -** Processing line: ~ v = (x * s) + (z * c)~ + def process_inputs +** Processing line: ~ process_inputs_menu~ - Inside source: true *** True Line Result - v = (x * s) + (z * c) -** Processing line: ~ k = DISTANCE.fdiv(100) + (v / 500 * YAW)~ + process_inputs_menu +** Processing line: ~ process_inputs_game~ - Inside source: true *** True Line Result - k = DISTANCE.fdiv(100) + (v / 500 * YAW) -** Processing line: ~ u = u / k~ + process_inputs_game +** Processing line: ~ end~ - Inside source: true *** True Line Result - u = u / k -** Processing line: ~ v = y / k~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - v = y / k -** Processing line: ~ w = POINTSIZE / 10 / k~ + +** Processing line: ~ def process_inputs_menu~ - Inside source: true *** True Line Result - w = POINTSIZE / 10 / k -** Processing line: ~ args.outputs.sprites << { x: offset_x + u - w, y: offset_y + v - w, w: w, h: w, path: 'sprites/square-blue.png'}~ + def process_inputs_menu +** Processing line: ~ return unless state.scene == :menu~ - Inside source: true *** True Line Result - args.outputs.sprites << { x: offset_x + u - w, y: offset_y + v - w, w: w, h: w, path: 'sprites/square-blue.png'} -** Processing line: ~ x += SPINPOINT~ + return unless state.scene == :menu +** Processing line: ~~ - Inside source: true *** True Line Result - x += SPINPOINT -** Processing line: ~ end~ + +** Processing line: ~ changediff = inputs.keyboard.key_down.tab || inputs.controller_one.key_down.select~ - Inside source: true *** True Line Result - end -** Processing line: ~ x += 0.5~ + changediff = inputs.keyboard.key_down.tab || inputs.controller_one.key_down.select +** Processing line: ~ if inputs.mouse.click~ - Inside source: true *** True Line Result - x += 0.5 -** Processing line: ~ end~ + if inputs.mouse.click +** Processing line: ~ p = inputs.mouse.click.point~ - Inside source: true *** True Line Result - end -** Processing line: ~ y += 0.5~ + p = inputs.mouse.click.point +** Processing line: ~ if (p.y >= 165) && (p.y < 200) && (p.x >= 500) && (p.x < 800)~ - Inside source: true *** True Line Result - y += 0.5 -** Processing line: ~ x = STARTX~ + if (p.y >= 165) && (p.y < 200) && (p.x >= 500) && (p.x < 800) +** Processing line: ~ changediff = true~ - Inside source: true *** True Line Result - x = STARTX -** Processing line: ~ end~ + changediff = true +** Processing line: ~ end~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - end + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ $gtk.reset~ +** Processing line: ~ if changediff~ - Inside source: true *** True Line Result - $gtk.reset -** Processing line: ~~ + if changediff +** Processing line: ~ case state.new_difficulty~ - Inside source: true *** True Line Result - -** Processing line: ~#+end_src~ -- Line was identified as the end of a code block. -*** True Line Result -#+end_src -** Processing line: ~~ -- End of paragraph detected. -*** True Line Result - -** Processing line: ~*** 3d - Wireframe - main.rb~ -- Header detected. + case state.new_difficulty +** Processing line: ~ when :easy~ +- Inside source: true *** True Line Result - + when :easy +** Processing line: ~ state.new_difficulty = :normal~ +- Inside source: true *** True Line Result -*** 3d - Wireframe - main.rb -** Processing line: ~#+begin_src ruby~ -- Line was identified as the beginning of a code block. + state.new_difficulty = :normal +** Processing line: ~ when :normal~ +- Inside source: true *** True Line Result - + when :normal +** Processing line: ~ state.new_difficulty = :hard~ +- Inside source: true *** True Line Result -#+begin_src ruby -** Processing line: ~ # ./samples/99_genre_3d/02_wireframe/app/main.rb~ + state.new_difficulty = :hard +** Processing line: ~ when :hard~ - Inside source: true *** True Line Result - # ./samples/99_genre_3d/02_wireframe/app/main.rb -** Processing line: ~ def tick args~ + when :hard +** Processing line: ~ state.new_difficulty = :flappy~ - Inside source: true *** True Line Result - def tick args -** Processing line: ~ args.state.model ||= Object3D.new('data/shuttle.off')~ + state.new_difficulty = :flappy +** Processing line: ~ when :flappy~ - Inside source: true *** True Line Result - args.state.model ||= Object3D.new('data/shuttle.off') -** Processing line: ~ args.state.mtx ||= rotate3D(0, 0, 0)~ + when :flappy +** Processing line: ~ state.new_difficulty = :easy~ - Inside source: true *** True Line Result - args.state.mtx ||= rotate3D(0, 0, 0) -** Processing line: ~ args.state.inv_mtx ||= rotate3D(0, 0, 0)~ + state.new_difficulty = :easy +** Processing line: ~ end~ - Inside source: true *** True Line Result - args.state.inv_mtx ||= rotate3D(0, 0, 0) -** Processing line: ~ delta_mtx = rotate3D(args.inputs.up_down * 0.01, input_roll(args) * 0.01, args.inputs.left_right * 0.01)~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - delta_mtx = rotate3D(args.inputs.up_down * 0.01, input_roll(args) * 0.01, args.inputs.left_right * 0.01) -** Processing line: ~ args.outputs.lines << args.state.model.edges~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - args.outputs.lines << args.state.model.edges -** Processing line: ~ args.state.model.fast_3x3_transform! args.state.inv_mtx~ + +** Processing line: ~ if inputs.keyboard.key_down.enter || inputs.controller_one.key_down.start || inputs.controller_one.key_down.a~ - Inside source: true *** True Line Result - args.state.model.fast_3x3_transform! args.state.inv_mtx -** Processing line: ~ args.state.inv_mtx = mtx_mul(delta_mtx.transpose, args.state.inv_mtx)~ + if inputs.keyboard.key_down.enter || inputs.controller_one.key_down.start || inputs.controller_one.key_down.a +** Processing line: ~ state.difficulty = state.new_difficulty~ - Inside source: true *** True Line Result - args.state.inv_mtx = mtx_mul(delta_mtx.transpose, args.state.inv_mtx) -** Processing line: ~ args.state.mtx = mtx_mul(args.state.mtx, delta_mtx)~ + state.difficulty = state.new_difficulty +** Processing line: ~ change_to_scene :game~ - Inside source: true *** True Line Result - args.state.mtx = mtx_mul(args.state.mtx, delta_mtx) -** Processing line: ~ args.state.model.fast_3x3_transform! args.state.mtx~ + change_to_scene :game +** Processing line: ~ reset_game false~ - Inside source: true *** True Line Result - args.state.model.fast_3x3_transform! args.state.mtx -** Processing line: ~ args.outputs.background_color = [0, 0, 0]~ + reset_game false +** Processing line: ~ state.hi_score = 0~ - Inside source: true *** True Line Result - args.outputs.background_color = [0, 0, 0] -** Processing line: ~ args.outputs.debug << args.gtk.framerate_diagnostics_primitives~ + state.hi_score = 0 +** Processing line: ~ begin_countdown~ - Inside source: true *** True Line Result - args.outputs.debug << args.gtk.framerate_diagnostics_primitives -** Processing line: ~ end~ + begin_countdown +** Processing line: ~ end~ - Inside source: true *** True Line Result - end + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def input_roll args~ -- Inside source: true -*** True Line Result - def input_roll args -** Processing line: ~ roll = 0~ +** Processing line: ~ if inputs.keyboard.key_down.escape || (inputs.mouse.click && !changediff) || inputs.controller_one.key_down.b~ - Inside source: true *** True Line Result - roll = 0 -** Processing line: ~ roll += 1 if args.inputs.keyboard.e~ + if inputs.keyboard.key_down.escape || (inputs.mouse.click && !changediff) || inputs.controller_one.key_down.b +** Processing line: ~ state.new_difficulty = state.difficulty~ - Inside source: true *** True Line Result - roll += 1 if args.inputs.keyboard.e -** Processing line: ~ roll -= 1 if args.inputs.keyboard.q~ + state.new_difficulty = state.difficulty +** Processing line: ~ change_to_scene :game~ - Inside source: true *** True Line Result - roll -= 1 if args.inputs.keyboard.q -** Processing line: ~ roll~ + change_to_scene :game +** Processing line: ~ end~ - Inside source: true *** True Line Result - roll -** Processing line: ~ end~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - end + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def rotate3D(theta_x = 0.1, theta_y = 0.1, theta_z = 0.1)~ -- Inside source: true -*** True Line Result - def rotate3D(theta_x = 0.1, theta_y = 0.1, theta_z = 0.1) -** Processing line: ~ c_x, s_x = Math.cos(theta_x), Math.sin(theta_x)~ +** Processing line: ~ def process_inputs_game~ - Inside source: true *** True Line Result - c_x, s_x = Math.cos(theta_x), Math.sin(theta_x) -** Processing line: ~ c_y, s_y = Math.cos(theta_y), Math.sin(theta_y)~ + def process_inputs_game +** Processing line: ~ return unless state.scene == :game~ - Inside source: true *** True Line Result - c_y, s_y = Math.cos(theta_y), Math.sin(theta_y) -** Processing line: ~ c_z, s_z = Math.cos(theta_z), Math.sin(theta_z)~ + return unless state.scene == :game +** Processing line: ~~ - Inside source: true *** True Line Result - c_z, s_z = Math.cos(theta_z), Math.sin(theta_z) -** Processing line: ~ rot_x = [[1, 0, 0], [0, c_x, -s_x], [0, s_x, c_x]]~ + +** Processing line: ~ clicked_menu = false~ - Inside source: true *** True Line Result - rot_x = [[1, 0, 0], [0, c_x, -s_x], [0, s_x, c_x]] -** Processing line: ~ rot_y = [[c_y, 0, s_y], [0, 1, 0], [-s_y, 0, c_y]]~ + clicked_menu = false +** Processing line: ~ if inputs.mouse.click~ - Inside source: true *** True Line Result - rot_y = [[c_y, 0, s_y], [0, 1, 0], [-s_y, 0, c_y]] -** Processing line: ~ rot_z = [[c_z, -s_z, 0], [s_z, c_z, 0], [0, 0, 1]]~ + if inputs.mouse.click +** Processing line: ~ p = inputs.mouse.click.point~ - Inside source: true *** True Line Result - rot_z = [[c_z, -s_z, 0], [s_z, c_z, 0], [0, 0, 1]] -** Processing line: ~ mtx_mul(mtx_mul(rot_x, rot_y), rot_z)~ + p = inputs.mouse.click.point +** Processing line: ~ clicked_menu = (p.y >= 620) && (p.x < 275)~ - Inside source: true *** True Line Result - mtx_mul(mtx_mul(rot_x, rot_y), rot_z) -** Processing line: ~ end~ + clicked_menu = (p.y >= 620) && (p.x < 275) +** Processing line: ~ end~ - Inside source: true *** True Line Result - end + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def mtx_mul(a, b)~ -- Inside source: true -*** True Line Result - def mtx_mul(a, b) -** Processing line: ~ is = (0...a.length)~ -- Inside source: true -*** True Line Result - is = (0...a.length) -** Processing line: ~ js = (0...b[0].length)~ +** Processing line: ~ if clicked_menu || inputs.keyboard.key_down.escape || inputs.keyboard.key_down.enter || inputs.controller_one.key_down.start~ - Inside source: true *** True Line Result - js = (0...b[0].length) -** Processing line: ~ ks = (0...b.length)~ + if clicked_menu || inputs.keyboard.key_down.escape || inputs.keyboard.key_down.enter || inputs.controller_one.key_down.start +** Processing line: ~ change_to_scene :menu~ - Inside source: true *** True Line Result - ks = (0...b.length) -** Processing line: ~ is.map do |i|~ + change_to_scene :menu +** Processing line: ~ elsif (inputs.mouse.down || inputs.mouse.click || inputs.keyboard.key_down.space || inputs.controller_one.key_down.a) && state.countdown == 0~ - Inside source: true *** True Line Result - is.map do |i| -** Processing line: ~ js.map do |j|~ + elsif (inputs.mouse.down || inputs.mouse.click || inputs.keyboard.key_down.space || inputs.controller_one.key_down.a) && state.countdown == 0 +** Processing line: ~ state.dy = 0~ - Inside source: true *** True Line Result - js.map do |j| -** Processing line: ~ ks.map do |k|~ + state.dy = 0 +** Processing line: ~ state.dy += state.flap_power~ - Inside source: true *** True Line Result - ks.map do |k| -** Processing line: ~ a[i][k] * b[k][j]~ + state.dy += state.flap_power +** Processing line: ~ state.flapped_at = state.tick_count~ - Inside source: true *** True Line Result - a[i][k] * b[k][j] -** Processing line: ~ end.reduce(&:plus)~ + state.flapped_at = state.tick_count +** Processing line: ~ outputs.sounds << "sounds/fly-sound.wav"~ - Inside source: true *** True Line Result - end.reduce(&:plus) + outputs.sounds << "sounds/fly-sound.wav" ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -87220,58 +94131,46 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result end -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ class Object3D~ -- Inside source: true -*** True Line Result - class Object3D -** Processing line: ~ attr_reader :vert_count, :face_count, :edge_count, :verts, :faces, :edges~ -- Inside source: true -*** True Line Result - attr_reader :vert_count, :face_count, :edge_count, :verts, :faces, :edges -** Processing line: ~~ +** Processing line: ~ def scrolling_background at, path, rate, y = 0~ - Inside source: true *** True Line Result - -** Processing line: ~ def initialize(path)~ + def scrolling_background at, path, rate, y = 0 +** Processing line: ~ [~ - Inside source: true *** True Line Result - def initialize(path) -** Processing line: ~ @vert_count = 0~ + [ +** Processing line: ~ [ 0 - at.*(rate) % 1440, y, 1440, 720, path],~ - Inside source: true *** True Line Result - @vert_count = 0 -** Processing line: ~ @face_count = 0~ + [ 0 - at.*(rate) % 1440, y, 1440, 720, path], +** Processing line: ~ [1440 - at.*(rate) % 1440, y, 1440, 720, path]~ - Inside source: true *** True Line Result - @face_count = 0 -** Processing line: ~ @edge_count = 0~ + [1440 - at.*(rate) % 1440, y, 1440, 720, path] +** Processing line: ~ ]~ - Inside source: true *** True Line Result - @edge_count = 0 -** Processing line: ~ @verts = []~ + ] +** Processing line: ~ end~ - Inside source: true *** True Line Result - @verts = [] -** Processing line: ~ @faces = []~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - @faces = [] -** Processing line: ~ @edges = []~ + +** Processing line: ~ def white~ - Inside source: true *** True Line Result - @edges = [] -** Processing line: ~ _init_from_file path~ + def white +** Processing line: ~ [255, 255, 255]~ - Inside source: true *** True Line Result - _init_from_file path + [255, 255, 255] ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -87280,98 +94179,98 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def _init_from_file path~ +** Processing line: ~ def large_white_typeset~ - Inside source: true *** True Line Result - def _init_from_file path -** Processing line: ~ file_lines = $gtk.read_file(path).split("\n")~ + def large_white_typeset +** Processing line: ~ [5, 0, 255, 255, 255]~ - Inside source: true *** True Line Result - file_lines = $gtk.read_file(path).split("\n") -** Processing line: ~ .reject { |line| line.start_with?('#') || line.split(' ').length == 0 } # Strip out simple comments and blank lines~ + [5, 0, 255, 255, 255] +** Processing line: ~ end~ - Inside source: true *** True Line Result - .reject { |line| line.start_with?('#') || line.split(' ').length == 0 } # Strip out simple comments and blank lines -** Processing line: ~ .map { |line| line.split('#')[0] } # Strip out end of line comments~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - .map { |line| line.split('#')[0] } # Strip out end of line comments -** Processing line: ~ .map { |line| line.split(' ') } # Tokenize by splitting on whitespace~ + +** Processing line: ~ def at_beginning?~ - Inside source: true *** True Line Result - .map { |line| line.split(' ') } # Tokenize by splitting on whitespace -** Processing line: ~ raise "OFF file did not start with OFF." if file_lines.shift != ["OFF"] # OFF meshes are supposed to begin with "OFF" as the first line.~ + def at_beginning? +** Processing line: ~ state.walls.count == 0~ - Inside source: true *** True Line Result - raise "OFF file did not start with OFF." if file_lines.shift != ["OFF"] # OFF meshes are supposed to begin with "OFF" as the first line. -** Processing line: ~ raise " line malformed" if file_lines[0].length != 3 # The second line needs to have 3 numbers. Raise an error if it doesn't.~ + state.walls.count == 0 +** Processing line: ~ end~ - Inside source: true *** True Line Result - raise " line malformed" if file_lines[0].length != 3 # The second line needs to have 3 numbers. Raise an error if it doesn't. -** Processing line: ~ @vert_count, @face_count, @edge_count = file_lines.shift&.map(&:to_i) # Update the counts~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - @vert_count, @face_count, @edge_count = file_lines.shift&.map(&:to_i) # Update the counts -** Processing line: ~ # Only the vertex and face counts need to be accurate. Raise an error if they are inaccurate.~ + +** Processing line: ~ def dragon_collision_box~ - Inside source: true *** True Line Result - # Only the vertex and face counts need to be accurate. Raise an error if they are inaccurate. -** Processing line: ~ raise "Incorrect number of vertices and/or faces (Parsed VFE header: #{@vert_count} #{@face_count} #{@edge_count})" if file_lines.length != @vert_count + @face_count~ + def dragon_collision_box +** Processing line: ~ state.dragon_sprite~ - Inside source: true *** True Line Result - raise "Incorrect number of vertices and/or faces (Parsed VFE header: #{@vert_count} #{@face_count} #{@edge_count})" if file_lines.length != @vert_count + @face_count -** Processing line: ~ # Grab all the lines describing vertices.~ + state.dragon_sprite +** Processing line: ~ .scale_rect(1.0 - collision_forgiveness, 0.5, 0.5)~ - Inside source: true *** True Line Result - # Grab all the lines describing vertices. -** Processing line: ~ vert_lines = file_lines[0, @vert_count]~ + .scale_rect(1.0 - collision_forgiveness, 0.5, 0.5) +** Processing line: ~ .rect_shift_right(10)~ - Inside source: true *** True Line Result - vert_lines = file_lines[0, @vert_count] -** Processing line: ~ # Grab all the lines describing faces.~ + .rect_shift_right(10) +** Processing line: ~ .rect_shift_up(state.dy * 2)~ - Inside source: true *** True Line Result - # Grab all the lines describing faces. -** Processing line: ~ face_lines = file_lines[@vert_count, @face_count]~ + .rect_shift_up(state.dy * 2) +** Processing line: ~ end~ - Inside source: true *** True Line Result - face_lines = file_lines[@vert_count, @face_count] -** Processing line: ~ # Create all the vertices~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - # Create all the vertices -** Processing line: ~ @verts = vert_lines.map_with_index { |line, id| Vertex.new(line, id) }~ + +** Processing line: ~ def game_over?~ - Inside source: true *** True Line Result - @verts = vert_lines.map_with_index { |line, id| Vertex.new(line, id) } -** Processing line: ~ # Create all the faces~ + def game_over? +** Processing line: ~ return true if state.y <= 0.-(500 * collision_forgiveness) && !at_beginning?~ - Inside source: true *** True Line Result - # Create all the faces -** Processing line: ~ @faces = face_lines.map { |line| Face.new(line, @verts) }~ + return true if state.y <= 0.-(500 * collision_forgiveness) && !at_beginning? +** Processing line: ~~ - Inside source: true *** True Line Result - @faces = face_lines.map { |line| Face.new(line, @verts) } -** Processing line: ~ # Create all the edges~ + +** Processing line: ~ state.walls~ - Inside source: true *** True Line Result - # Create all the edges -** Processing line: ~ @edges = @faces.flat_map(&:edges).uniq do |edge|~ + state.walls +** Processing line: ~ .flat_map { |w| w.sprites }~ - Inside source: true *** True Line Result - @edges = @faces.flat_map(&:edges).uniq do |edge| -** Processing line: ~ sorted = edge.sorted~ + .flat_map { |w| w.sprites } +** Processing line: ~ .any? do |s|~ - Inside source: true *** True Line Result - sorted = edge.sorted -** Processing line: ~ [sorted.point_a, sorted.point_b]~ + .any? do |s| +** Processing line: ~ s.intersect_rect?(dragon_collision_box)~ - Inside source: true *** True Line Result - [sorted.point_a, sorted.point_b] -** Processing line: ~ end~ + s.intersect_rect?(dragon_collision_box) +** Processing line: ~ end~ - Inside source: true *** True Line Result - end + end ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -87380,106 +94279,90 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def fast_3x3_transform! mtx~ -- Inside source: true -*** True Line Result - def fast_3x3_transform! mtx -** Processing line: ~ @verts.each { |vert| vert.fast_3x3_transform! mtx }~ -- Inside source: true -*** True Line Result - @verts.each { |vert| vert.fast_3x3_transform! mtx } -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end -** Processing line: ~ end~ +** Processing line: ~ def collision_forgiveness~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + def collision_forgiveness +** Processing line: ~ case state.difficulty~ - Inside source: true *** True Line Result - -** Processing line: ~ class Face~ + case state.difficulty +** Processing line: ~ when :easy~ - Inside source: true *** True Line Result - class Face -** Processing line: ~~ + when :easy +** Processing line: ~ 0.9~ - Inside source: true *** True Line Result - -** Processing line: ~ attr_reader :verts, :edges~ + 0.9 +** Processing line: ~ when :normal~ - Inside source: true *** True Line Result - attr_reader :verts, :edges -** Processing line: ~~ + when :normal +** Processing line: ~ 0.7~ - Inside source: true *** True Line Result - -** Processing line: ~ def initialize(data, verts)~ + 0.7 +** Processing line: ~ when :hard~ - Inside source: true *** True Line Result - def initialize(data, verts) -** Processing line: ~ vert_count = data[0].to_i~ + when :hard +** Processing line: ~ 0.5~ - Inside source: true *** True Line Result - vert_count = data[0].to_i -** Processing line: ~ vert_ids = data[1, vert_count].map(&:to_i)~ + 0.5 +** Processing line: ~ when :flappy~ - Inside source: true *** True Line Result - vert_ids = data[1, vert_count].map(&:to_i) -** Processing line: ~ @verts = vert_ids.map { |i| verts[i] }~ + when :flappy +** Processing line: ~ 0.3~ - Inside source: true *** True Line Result - @verts = vert_ids.map { |i| verts[i] } -** Processing line: ~ @edges = []~ + 0.3 +** Processing line: ~ else~ - Inside source: true *** True Line Result - @edges = [] -** Processing line: ~ (0...vert_count).each { |i| @edges[i] = Edge.new(verts[vert_ids[i - 1]], verts[vert_ids[i]]) }~ + else +** Processing line: ~ 0.9~ - Inside source: true *** True Line Result - (0...vert_count).each { |i| @edges[i] = Edge.new(verts[vert_ids[i - 1]], verts[vert_ids[i]]) } -** Processing line: ~ @edges.rotate! 1~ + 0.9 +** Processing line: ~ end~ - Inside source: true *** True Line Result - @edges.rotate! 1 + end ** Processing line: ~ end~ - Inside source: true *** True Line Result end -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ class Edge~ +** Processing line: ~ def countdown_text~ - Inside source: true *** True Line Result - class Edge -** Processing line: ~ attr_reader :point_a, :point_b~ + def countdown_text +** Processing line: ~ state.countdown ||= -1~ - Inside source: true *** True Line Result - attr_reader :point_a, :point_b -** Processing line: ~~ + state.countdown ||= -1 +** Processing line: ~ return "" if state.countdown == 0~ - Inside source: true *** True Line Result - -** Processing line: ~ def initialize(point_a, point_b)~ + return "" if state.countdown == 0 +** Processing line: ~ return "GO!" if state.countdown.idiv(60) == 0~ - Inside source: true *** True Line Result - def initialize(point_a, point_b) -** Processing line: ~ @point_a = point_a~ + return "GO!" if state.countdown.idiv(60) == 0 +** Processing line: ~ return "GAME OVER" if state.death_at~ - Inside source: true *** True Line Result - @point_a = point_a -** Processing line: ~ @point_b = point_b~ + return "GAME OVER" if state.death_at +** Processing line: ~ return "READY?"~ - Inside source: true *** True Line Result - @point_b = point_b + return "READY?" ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -87488,14 +94371,14 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def sorted~ +** Processing line: ~ def begin_countdown~ - Inside source: true *** True Line Result - def sorted -** Processing line: ~ @point_a.id < @point_b.id ? self : Edge.new(@point_b, @point_a)~ + def begin_countdown +** Processing line: ~ state.countdown = 4.seconds~ - Inside source: true *** True Line Result - @point_a.id < @point_b.id ? self : Edge.new(@point_b, @point_a) + state.countdown = 4.seconds ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -87504,26 +94387,30 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def draw_override ffi~ +** Processing line: ~ def score_text~ - Inside source: true *** True Line Result - def draw_override ffi -** Processing line: ~ ffi.draw_line(@point_a.render_x, @point_a.render_y, @point_b.render_x, @point_b.render_y, 255, 0, 0, 128)~ + def score_text +** Processing line: ~ return "" unless state.countdown > 1.seconds~ - Inside source: true *** True Line Result - ffi.draw_line(@point_a.render_x, @point_a.render_y, @point_b.render_x, @point_b.render_y, 255, 0, 0, 128) -** Processing line: ~ ffi.draw_line(@point_a.render_x+1, @point_a.render_y, @point_b.render_x+1, @point_b.render_y, 255, 0, 0, 128)~ + return "" unless state.countdown > 1.seconds +** Processing line: ~ return "" unless state.death_at~ - Inside source: true *** True Line Result - ffi.draw_line(@point_a.render_x+1, @point_a.render_y, @point_b.render_x+1, @point_b.render_y, 255, 0, 0, 128) -** Processing line: ~ ffi.draw_line(@point_a.render_x, @point_a.render_y+1, @point_b.render_x, @point_b.render_y+1, 255, 0, 0, 128)~ + return "" unless state.death_at +** Processing line: ~ return "SCORE: 0 (LOL)" if state.score == 0~ - Inside source: true *** True Line Result - ffi.draw_line(@point_a.render_x, @point_a.render_y+1, @point_b.render_x, @point_b.render_y+1, 255, 0, 0, 128) -** Processing line: ~ ffi.draw_line(@point_a.render_x+1, @point_a.render_y+1, @point_b.render_x+1, @point_b.render_y+1, 255, 0, 0, 128)~ + return "SCORE: 0 (LOL)" if state.score == 0 +** Processing line: ~ return "HI SCORE: #{state.score}" if state.score == state.hi_score~ - Inside source: true *** True Line Result - ffi.draw_line(@point_a.render_x+1, @point_a.render_y+1, @point_b.render_x+1, @point_b.render_y+1, 255, 0, 0, 128) + return "HI SCORE: #{state.score}" if state.score == state.hi_score +** Processing line: ~ return "SCORE: #{state.score}"~ +- Inside source: true +*** True Line Result + return "SCORE: #{state.score}" ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -87532,58 +94419,46 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def primitive_marker~ -- Inside source: true -*** True Line Result - def primitive_marker -** Processing line: ~ :line~ -- Inside source: true -*** True Line Result - :line -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end -** Processing line: ~ end~ +** Processing line: ~ def reset_game set_flash = true~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + def reset_game set_flash = true +** Processing line: ~ state.flash_at = state.tick_count if set_flash~ - Inside source: true *** True Line Result - -** Processing line: ~ class Vertex~ + state.flash_at = state.tick_count if set_flash +** Processing line: ~ state.walls = []~ - Inside source: true *** True Line Result - class Vertex -** Processing line: ~ attr_accessor :x, :y, :z, :id~ + state.walls = [] +** Processing line: ~ state.y = 500~ - Inside source: true *** True Line Result - attr_accessor :x, :y, :z, :id -** Processing line: ~~ + state.y = 500 +** Processing line: ~ state.dy = 0~ - Inside source: true *** True Line Result - -** Processing line: ~ def initialize(data, id)~ + state.dy = 0 +** Processing line: ~ state.hi_score = state.hi_score.greater(state.score)~ - Inside source: true *** True Line Result - def initialize(data, id) -** Processing line: ~ @x = data[0].to_f~ + state.hi_score = state.hi_score.greater(state.score) +** Processing line: ~ state.score = 0~ - Inside source: true *** True Line Result - @x = data[0].to_f -** Processing line: ~ @y = data[1].to_f~ + state.score = 0 +** Processing line: ~ state.wall_countdown = state.wall_countdown_length.fdiv(2)~ - Inside source: true *** True Line Result - @y = data[1].to_f -** Processing line: ~ @z = data[2].to_f~ + state.wall_countdown = state.wall_countdown_length.fdiv(2) +** Processing line: ~ state.show_death = false~ - Inside source: true *** True Line Result - @z = data[2].to_f -** Processing line: ~ @id = id~ + state.show_death = false +** Processing line: ~ state.death_at = nil~ - Inside source: true *** True Line Result - @id = id + state.death_at = nil ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -87592,66 +94467,78 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def fast_3x3_transform! mtx~ +** Processing line: ~ def change_to_scene scene~ - Inside source: true *** True Line Result - def fast_3x3_transform! mtx -** Processing line: ~ _x, _y, _z = @x, @y, @z~ + def change_to_scene scene +** Processing line: ~ state.scene = scene~ - Inside source: true *** True Line Result - _x, _y, _z = @x, @y, @z -** Processing line: ~ @x = mtx[0][0] * _x + mtx[0][1] * _y + mtx[0][2] * _z~ + state.scene = scene +** Processing line: ~ state.scene_at = state.tick_count~ - Inside source: true *** True Line Result - @x = mtx[0][0] * _x + mtx[0][1] * _y + mtx[0][2] * _z -** Processing line: ~ @y = mtx[1][0] * _x + mtx[1][1] * _y + mtx[1][2] * _z~ + state.scene_at = state.tick_count +** Processing line: ~ inputs.keyboard.clear~ - Inside source: true *** True Line Result - @y = mtx[1][0] * _x + mtx[1][1] * _y + mtx[1][2] * _z -** Processing line: ~ @z = mtx[2][0] * _x + mtx[2][1] * _y + mtx[2][2] * _z~ + inputs.keyboard.clear +** Processing line: ~ inputs.controller_one.clear~ - Inside source: true *** True Line Result - @z = mtx[2][0] * _x + mtx[2][1] * _y + mtx[2][2] * _z + inputs.controller_one.clear ** Processing line: ~ end~ - Inside source: true *** True Line Result end +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def render_x~ +** Processing line: ~ $flappy_dragon = FlappyDragon.new~ - Inside source: true *** True Line Result - def render_x -** Processing line: ~ @x * (10 / (5 - @y)) * 170 + 640~ + $flappy_dragon = FlappyDragon.new +** Processing line: ~~ - Inside source: true *** True Line Result - @x * (10 / (5 - @y)) * 170 + 640 -** Processing line: ~ end~ + +** Processing line: ~ def tick args~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + def tick args +** Processing line: ~ $flappy_dragon.grid = args.grid~ - Inside source: true *** True Line Result - -** Processing line: ~ def render_y~ + $flappy_dragon.grid = args.grid +** Processing line: ~ $flappy_dragon.inputs = args.inputs~ - Inside source: true *** True Line Result - def render_y -** Processing line: ~ @z * (10 / (5 - @y)) * 170 + 360~ + $flappy_dragon.inputs = args.inputs +** Processing line: ~ $flappy_dragon.state = args.state~ - Inside source: true *** True Line Result - @z * (10 / (5 - @y)) * 170 + 360 -** Processing line: ~ end~ + $flappy_dragon.state = args.state +** Processing line: ~ $flappy_dragon.outputs = args.outputs~ - Inside source: true *** True Line Result - end + $flappy_dragon.outputs = args.outputs +** Processing line: ~ $flappy_dragon.tick~ +- Inside source: true +*** True Line Result + $flappy_dragon.tick ** Processing line: ~ end~ - Inside source: true *** True Line Result end +** Processing line: ~~ +- Inside source: true +*** True Line Result + ** Processing line: ~#+end_src~ - Line was identified as the end of a code block. *** True Line Result @@ -87660,174 +94547,190 @@ Follows is a source code listing for all files that have been open sourced. This - End of paragraph detected. *** True Line Result -** Processing line: ~*** 3d - Wireframe - Data - what-is-this.txt~ +** Processing line: ~*** Arcade - Pong - main.rb~ - Header detected. *** True Line Result *** True Line Result -*** 3d - Wireframe - Data - what-is-this.txt +*** Arcade - Pong - main.rb ** Processing line: ~#+begin_src ruby~ - Line was identified as the beginning of a code block. *** True Line Result *** True Line Result #+begin_src ruby -** Processing line: ~ # ./samples/99_genre_3d/02_wireframe/data/what-is-this.txt~ +** Processing line: ~ # ./samples/99_genre_arcade/pong/app/main.rb~ - Inside source: true *** True Line Result - # ./samples/99_genre_3d/02_wireframe/data/what-is-this.txt -** Processing line: ~ https://en.wikipedia.org/wiki/OFF_(file_format)~ + # ./samples/99_genre_arcade/pong/app/main.rb +** Processing line: ~ def tick args~ - Inside source: true *** True Line Result - https://en.wikipedia.org/wiki/OFF_(file_format) -** Processing line: ~#+end_src~ -- Line was identified as the end of a code block. + def tick args +** Processing line: ~ defaults args~ +- Inside source: true *** True Line Result -#+end_src -** Processing line: ~~ -- End of paragraph detected. + defaults args +** Processing line: ~ render args~ +- Inside source: true *** True Line Result - -** Processing line: ~*** Arcade - Bullet Hell - main.rb~ -- Header detected. + render args +** Processing line: ~ calc args~ +- Inside source: true *** True Line Result - + calc args +** Processing line: ~ input args~ +- Inside source: true *** True Line Result -*** Arcade - Bullet Hell - main.rb -** Processing line: ~#+begin_src ruby~ -- Line was identified as the beginning of a code block. + input args +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true *** True Line Result +** Processing line: ~ def defaults args~ +- Inside source: true *** True Line Result -#+begin_src ruby -** Processing line: ~ # ./samples/99_genre_arcade/bullet_hell/app/main.rb~ + def defaults args +** Processing line: ~ args.state.ball.debounce ||= 3 * 60~ - Inside source: true *** True Line Result - # ./samples/99_genre_arcade/bullet_hell/app/main.rb -** Processing line: ~ def tick args~ + args.state.ball.debounce ||= 3 * 60 +** Processing line: ~ args.state.ball.size ||= 10~ - Inside source: true *** True Line Result - def tick args -** Processing line: ~ args.state.base_columns ||= 10.times.map { |n| 50 * n + 1280 / 2 - 5 * 50 + 5 }~ + args.state.ball.size ||= 10 +** Processing line: ~ args.state.ball.size_half ||= args.state.ball.size / 2~ - Inside source: true *** True Line Result - args.state.base_columns ||= 10.times.map { |n| 50 * n + 1280 / 2 - 5 * 50 + 5 } -** Processing line: ~ args.state.base_rows ||= 5.times.map { |n| 50 * n + 720 - 5 * 50 }~ + args.state.ball.size_half ||= args.state.ball.size / 2 +** Processing line: ~ args.state.ball.x ||= 640~ - Inside source: true *** True Line Result - args.state.base_rows ||= 5.times.map { |n| 50 * n + 720 - 5 * 50 } -** Processing line: ~ args.state.offset_columns = 10.times.map { |n| (n - 4.5) * Math.sin(Kernel.tick_count.to_radians) * 12 }~ + args.state.ball.x ||= 640 +** Processing line: ~ args.state.ball.y ||= 360~ - Inside source: true *** True Line Result - args.state.offset_columns = 10.times.map { |n| (n - 4.5) * Math.sin(Kernel.tick_count.to_radians) * 12 } -** Processing line: ~ args.state.offset_rows = 5.map { 0 }~ + args.state.ball.y ||= 360 +** Processing line: ~ args.state.ball.dx ||= 5.randomize(:sign)~ - Inside source: true *** True Line Result - args.state.offset_rows = 5.map { 0 } -** Processing line: ~ args.state.columns = 10.times.map { |i| args.state.base_columns[i] + args.state.offset_columns[i] }~ + args.state.ball.dx ||= 5.randomize(:sign) +** Processing line: ~ args.state.ball.dy ||= 5.randomize(:sign)~ - Inside source: true *** True Line Result - args.state.columns = 10.times.map { |i| args.state.base_columns[i] + args.state.offset_columns[i] } -** Processing line: ~ args.state.rows = 5.times.map { |i| args.state.base_rows[i] + args.state.offset_rows[i] }~ + args.state.ball.dy ||= 5.randomize(:sign) +** Processing line: ~ args.state.left_paddle.y ||= 360~ - Inside source: true *** True Line Result - args.state.rows = 5.times.map { |i| args.state.base_rows[i] + args.state.offset_rows[i] } -** Processing line: ~ args.state.explosions ||= []~ + args.state.left_paddle.y ||= 360 +** Processing line: ~ args.state.right_paddle.y ||= 360~ - Inside source: true *** True Line Result - args.state.explosions ||= [] -** Processing line: ~ args.state.enemies ||= []~ + args.state.right_paddle.y ||= 360 +** Processing line: ~ args.state.paddle.h ||= 120~ - Inside source: true *** True Line Result - args.state.enemies ||= [] -** Processing line: ~ args.state.score ||= 0~ + args.state.paddle.h ||= 120 +** Processing line: ~ args.state.paddle.w ||= 10~ - Inside source: true *** True Line Result - args.state.score ||= 0 -** Processing line: ~ args.state.wave ||= 0~ + args.state.paddle.w ||= 10 +** Processing line: ~ args.state.left_paddle.score ||= 0~ - Inside source: true *** True Line Result - args.state.wave ||= 0 -** Processing line: ~ if args.state.enemies.empty?~ + args.state.left_paddle.score ||= 0 +** Processing line: ~ args.state.right_paddle.score ||= 0~ - Inside source: true *** True Line Result - if args.state.enemies.empty? -** Processing line: ~ args.state.wave += 1~ + args.state.right_paddle.score ||= 0 +** Processing line: ~ end~ - Inside source: true *** True Line Result - args.state.wave += 1 -** Processing line: ~ args.state.wave_root = Math.sqrt(args.state.wave)~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - args.state.wave_root = Math.sqrt(args.state.wave) -** Processing line: ~ args.state.enemies = make_enemies~ + +** Processing line: ~ def render args~ - Inside source: true *** True Line Result - args.state.enemies = make_enemies -** Processing line: ~ end~ + def render args +** Processing line: ~ render_center_line args~ - Inside source: true *** True Line Result - end -** Processing line: ~ args.state.player ||= {x: 620, y: 80, w: 40, h: 40, path: 'sprites/circle-gray.png', angle: 90, cooldown: 0, alive: true}~ + render_center_line args +** Processing line: ~ render_scores args~ - Inside source: true *** True Line Result - args.state.player ||= {x: 620, y: 80, w: 40, h: 40, path: 'sprites/circle-gray.png', angle: 90, cooldown: 0, alive: true} -** Processing line: ~ args.state.enemy_bullets ||= []~ + render_scores args +** Processing line: ~ render_countdown args~ - Inside source: true *** True Line Result - args.state.enemy_bullets ||= [] -** Processing line: ~ args.state.player_bullets ||= []~ + render_countdown args +** Processing line: ~ render_ball args~ - Inside source: true *** True Line Result - args.state.player_bullets ||= [] -** Processing line: ~ args.state.lives ||= 3~ + render_ball args +** Processing line: ~ render_paddles args~ - Inside source: true *** True Line Result - args.state.lives ||= 3 -** Processing line: ~ args.state.missed_shots ||= 0~ + render_paddles args +** Processing line: ~ render_instructions args~ - Inside source: true *** True Line Result - args.state.missed_shots ||= 0 -** Processing line: ~ args.state.fired_shots ||= 0~ + render_instructions args +** Processing line: ~ end~ - Inside source: true *** True Line Result - args.state.fired_shots ||= 0 + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ update_explosions args~ +** Processing line: ~ begin :render_methods~ - Inside source: true *** True Line Result - update_explosions args -** Processing line: ~ update_enemy_positions args~ + begin :render_methods +** Processing line: ~ def render_center_line args~ - Inside source: true *** True Line Result - update_enemy_positions args + def render_center_line args +** Processing line: ~ args.outputs.lines << [640, 0, 640, 720]~ +- Inside source: true +*** True Line Result + args.outputs.lines << [640, 0, 640, 720] +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ if args.inputs.left && args.state.player[:x] > (300 + 5)~ +** Processing line: ~ def render_scores args~ - Inside source: true *** True Line Result - if args.inputs.left && args.state.player[:x] > (300 + 5) -** Processing line: ~ args.state.player[:x] -= 5~ + def render_scores args +** Processing line: ~ args.outputs.labels << [~ - Inside source: true *** True Line Result - args.state.player[:x] -= 5 -** Processing line: ~ end~ + args.outputs.labels << [ +** Processing line: ~ [320, 650, args.state.left_paddle.score, 10, 1],~ - Inside source: true *** True Line Result - end -** Processing line: ~ if args.inputs.right && args.state.player[:x] < (1280 - args.state.player[:w] - 300 - 5)~ + [320, 650, args.state.left_paddle.score, 10, 1], +** Processing line: ~ [960, 650, args.state.right_paddle.score, 10, 1]~ - Inside source: true *** True Line Result - if args.inputs.right && args.state.player[:x] < (1280 - args.state.player[:w] - 300 - 5) -** Processing line: ~ args.state.player[:x] += 5~ + [960, 650, args.state.right_paddle.score, 10, 1] +** Processing line: ~ ]~ - Inside source: true *** True Line Result - args.state.player[:x] += 5 + ] ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -87836,34 +94739,34 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ args.state.enemy_bullets.each do |bullet|~ +** Processing line: ~ def render_countdown args~ - Inside source: true *** True Line Result - args.state.enemy_bullets.each do |bullet| -** Processing line: ~ bullet[:x] += bullet[:dx]~ + def render_countdown args +** Processing line: ~ return unless args.state.ball.debounce > 0~ - Inside source: true *** True Line Result - bullet[:x] += bullet[:dx] -** Processing line: ~ bullet[:y] += bullet[:dy]~ + return unless args.state.ball.debounce > 0 +** Processing line: ~ args.outputs.labels << [640, 360, "%.2f" % args.state.ball.debounce.fdiv(60), 10, 1]~ - Inside source: true *** True Line Result - bullet[:y] += bullet[:dy] + args.outputs.labels << [640, 360, "%.2f" % args.state.ball.debounce.fdiv(60), 10, 1] ** Processing line: ~ end~ - Inside source: true *** True Line Result end -** Processing line: ~ args.state.player_bullets.each do |bullet|~ +** Processing line: ~~ - Inside source: true *** True Line Result - args.state.player_bullets.each do |bullet| -** Processing line: ~ bullet[:x] += bullet[:dx]~ + +** Processing line: ~ def render_ball args~ - Inside source: true *** True Line Result - bullet[:x] += bullet[:dx] -** Processing line: ~ bullet[:y] += bullet[:dy]~ + def render_ball args +** Processing line: ~ args.outputs.solids << solid_ball(args)~ - Inside source: true *** True Line Result - bullet[:y] += bullet[:dy] + args.outputs.solids << solid_ball(args) ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -87872,106 +94775,130 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ args.state.enemy_bullets = args.state.enemy_bullets.find_all { |bullet| bullet[:y].between?(-16, 736) }~ +** Processing line: ~ def render_paddles args~ - Inside source: true *** True Line Result - args.state.enemy_bullets = args.state.enemy_bullets.find_all { |bullet| bullet[:y].between?(-16, 736) } -** Processing line: ~ args.state.player_bullets = args.state.player_bullets.find_all do |bullet|~ + def render_paddles args +** Processing line: ~ args.outputs.solids << solid_left_paddle(args)~ - Inside source: true *** True Line Result - args.state.player_bullets = args.state.player_bullets.find_all do |bullet| -** Processing line: ~ if bullet[:y].between?(-16, 736)~ + args.outputs.solids << solid_left_paddle(args) +** Processing line: ~ args.outputs.solids << solid_right_paddle(args)~ - Inside source: true *** True Line Result - if bullet[:y].between?(-16, 736) -** Processing line: ~ true~ + args.outputs.solids << solid_right_paddle(args) +** Processing line: ~ end~ - Inside source: true *** True Line Result - true -** Processing line: ~ else~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - else -** Processing line: ~ args.state.missed_shots += 1~ + +** Processing line: ~ def render_instructions args~ - Inside source: true *** True Line Result - args.state.missed_shots += 1 -** Processing line: ~ false~ + def render_instructions args +** Processing line: ~ args.outputs.labels << [320, 30, "W and S keys to move left paddle.", 0, 1]~ - Inside source: true *** True Line Result - false -** Processing line: ~ end~ + args.outputs.labels << [320, 30, "W and S keys to move left paddle.", 0, 1] +** Processing line: ~ args.outputs.labels << [920, 30, "O and L keys to move right paddle.", 0, 1]~ - Inside source: true *** True Line Result - end + args.outputs.labels << [920, 30, "O and L keys to move right paddle.", 0, 1] ** Processing line: ~ end~ - Inside source: true *** True Line Result end +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ args.state.enemies = args.state.enemies.reject do |enemy|~ +** Processing line: ~ def calc args~ - Inside source: true *** True Line Result - args.state.enemies = args.state.enemies.reject do |enemy| -** Processing line: ~ if args.state.player[:alive] && 1500 > (args.state.player[:x] - enemy[:x]) ** 2 + (args.state.player[:y] - enemy[:y]) ** 2~ + def calc args +** Processing line: ~ args.state.ball.debounce -= 1 and return if args.state.ball.debounce > 0~ - Inside source: true *** True Line Result - if args.state.player[:alive] && 1500 > (args.state.player[:x] - enemy[:x]) ** 2 + (args.state.player[:y] - enemy[:y]) ** 2 -** Processing line: ~ args.state.explosions << {x: enemy[:x] + 4, y: enemy[:y] + 4, w: 32, h: 32, path: 'sprites/explosion-0.png', age: 0}~ + args.state.ball.debounce -= 1 and return if args.state.ball.debounce > 0 +** Processing line: ~ calc_move_ball args~ - Inside source: true *** True Line Result - args.state.explosions << {x: enemy[:x] + 4, y: enemy[:y] + 4, w: 32, h: 32, path: 'sprites/explosion-0.png', age: 0} -** Processing line: ~ args.state.explosions << {x: args.state.player[:x] + 4, y: args.state.player[:y] + 4, w: 32, h: 32, path: 'sprites/explosion-0.png', age: 0}~ + calc_move_ball args +** Processing line: ~ calc_collision_with_left_paddle args~ - Inside source: true *** True Line Result - args.state.explosions << {x: args.state.player[:x] + 4, y: args.state.player[:y] + 4, w: 32, h: 32, path: 'sprites/explosion-0.png', age: 0} -** Processing line: ~ args.state.player[:alive] = false~ + calc_collision_with_left_paddle args +** Processing line: ~ calc_collision_with_right_paddle args~ - Inside source: true *** True Line Result - args.state.player[:alive] = false -** Processing line: ~ true~ + calc_collision_with_right_paddle args +** Processing line: ~ calc_collision_with_walls args~ - Inside source: true *** True Line Result - true -** Processing line: ~ else~ + calc_collision_with_walls args +** Processing line: ~ end~ - Inside source: true *** True Line Result - else -** Processing line: ~ false~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - false -** Processing line: ~ end~ + +** Processing line: ~ begin :calc_methods~ - Inside source: true *** True Line Result - end + begin :calc_methods +** Processing line: ~ def calc_move_ball args~ +- Inside source: true +*** True Line Result + def calc_move_ball args +** Processing line: ~ args.state.ball.x += args.state.ball.dx~ +- Inside source: true +*** True Line Result + args.state.ball.x += args.state.ball.dx +** Processing line: ~ args.state.ball.y += args.state.ball.dy~ +- Inside source: true +*** True Line Result + args.state.ball.y += args.state.ball.dy ** Processing line: ~ end~ - Inside source: true *** True Line Result end -** Processing line: ~ args.state.enemy_bullets.each do |bullet|~ +** Processing line: ~~ - Inside source: true *** True Line Result - args.state.enemy_bullets.each do |bullet| -** Processing line: ~ if args.state.player[:alive] && 400 > (args.state.player[:x] - bullet[:x] + 12) ** 2 + (args.state.player[:y] - bullet[:y] + 12) ** 2~ + +** Processing line: ~ def calc_collision_with_left_paddle args~ - Inside source: true *** True Line Result - if args.state.player[:alive] && 400 > (args.state.player[:x] - bullet[:x] + 12) ** 2 + (args.state.player[:y] - bullet[:y] + 12) ** 2 -** Processing line: ~ args.state.explosions << {x: args.state.player[:x] + 4, y: args.state.player[:y] + 4, w: 32, h: 32, path: 'sprites/explosion-0.png', age: 0}~ + def calc_collision_with_left_paddle args +** Processing line: ~ if solid_left_paddle(args).intersect_rect? solid_ball(args)~ - Inside source: true *** True Line Result - args.state.explosions << {x: args.state.player[:x] + 4, y: args.state.player[:y] + 4, w: 32, h: 32, path: 'sprites/explosion-0.png', age: 0} -** Processing line: ~ args.state.player[:alive] = false~ + if solid_left_paddle(args).intersect_rect? solid_ball(args) +** Processing line: ~ args.state.ball.dx *= -1~ - Inside source: true *** True Line Result - args.state.player[:alive] = false -** Processing line: ~ bullet[:despawn] = true~ + args.state.ball.dx *= -1 +** Processing line: ~ elsif args.state.ball.x < 0~ - Inside source: true *** True Line Result - bullet[:despawn] = true + elsif args.state.ball.x < 0 +** Processing line: ~ args.state.right_paddle.score += 1~ +- Inside source: true +*** True Line Result + args.state.right_paddle.score += 1 +** Processing line: ~ calc_reset_round args~ +- Inside source: true +*** True Line Result + calc_reset_round args ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -87980,46 +94907,74 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result end -** Processing line: ~ args.state.enemies = args.state.enemies.reject do |enemy|~ +** Processing line: ~~ - Inside source: true *** True Line Result - args.state.enemies = args.state.enemies.reject do |enemy| -** Processing line: ~ args.state.player_bullets.any? do |bullet|~ + +** Processing line: ~ def calc_collision_with_right_paddle args~ - Inside source: true *** True Line Result - args.state.player_bullets.any? do |bullet| -** Processing line: ~ if 400 > (enemy[:x] - bullet[:x] + 12) ** 2 + (enemy[:y] - bullet[:y] + 12) ** 2~ + def calc_collision_with_right_paddle args +** Processing line: ~ if solid_right_paddle(args).intersect_rect? solid_ball(args)~ - Inside source: true *** True Line Result - if 400 > (enemy[:x] - bullet[:x] + 12) ** 2 + (enemy[:y] - bullet[:y] + 12) ** 2 -** Processing line: ~ args.state.explosions << {x: enemy[:x] + 4, y: enemy[:y] + 4, w: 32, h: 32, path: 'sprites/explosion-0.png', age: 0}~ + if solid_right_paddle(args).intersect_rect? solid_ball(args) +** Processing line: ~ args.state.ball.dx *= -1~ - Inside source: true *** True Line Result - args.state.explosions << {x: enemy[:x] + 4, y: enemy[:y] + 4, w: 32, h: 32, path: 'sprites/explosion-0.png', age: 0} -** Processing line: ~ bullet[:despawn] = true~ + args.state.ball.dx *= -1 +** Processing line: ~ elsif args.state.ball.x > 1280~ - Inside source: true *** True Line Result - bullet[:despawn] = true -** Processing line: ~ args.state.score += 1000 * args.state.wave~ + elsif args.state.ball.x > 1280 +** Processing line: ~ args.state.left_paddle.score += 1~ - Inside source: true *** True Line Result - args.state.score += 1000 * args.state.wave -** Processing line: ~ true~ + args.state.left_paddle.score += 1 +** Processing line: ~ calc_reset_round args~ - Inside source: true *** True Line Result - true -** Processing line: ~ else~ + calc_reset_round args +** Processing line: ~ end~ - Inside source: true *** True Line Result - else -** Processing line: ~ false~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - false -** Processing line: ~ end~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - end + +** Processing line: ~ def calc_collision_with_walls args~ +- Inside source: true +*** True Line Result + def calc_collision_with_walls args +** Processing line: ~ if args.state.ball.y + args.state.ball.size_half > 720~ +- Inside source: true +*** True Line Result + if args.state.ball.y + args.state.ball.size_half > 720 +** Processing line: ~ args.state.ball.y = 720 - args.state.ball.size_half~ +- Inside source: true +*** True Line Result + args.state.ball.y = 720 - args.state.ball.size_half +** Processing line: ~ args.state.ball.dy *= -1~ +- Inside source: true +*** True Line Result + args.state.ball.dy *= -1 +** Processing line: ~ elsif args.state.ball.y - args.state.ball.size_half < 0~ +- Inside source: true +*** True Line Result + elsif args.state.ball.y - args.state.ball.size_half < 0 +** Processing line: ~ args.state.ball.y = args.state.ball.size_half~ +- Inside source: true +*** True Line Result + args.state.ball.y = args.state.ball.size_half +** Processing line: ~ args.state.ball.dy *= -1~ +- Inside source: true +*** True Line Result + args.state.ball.dy *= -1 ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -88032,54 +94987,86 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ args.state.player_bullets = args.state.player_bullets.reject { |bullet| bullet[:despawn] }~ +** Processing line: ~ def calc_reset_round args~ - Inside source: true *** True Line Result - args.state.player_bullets = args.state.player_bullets.reject { |bullet| bullet[:despawn] } -** Processing line: ~ args.state.enemy_bullets = args.state.enemy_bullets.reject { |bullet| bullet[:despawn] }~ + def calc_reset_round args +** Processing line: ~ args.state.ball.x = 640~ - Inside source: true *** True Line Result - args.state.enemy_bullets = args.state.enemy_bullets.reject { |bullet| bullet[:despawn] } + args.state.ball.x = 640 +** Processing line: ~ args.state.ball.y = 360~ +- Inside source: true +*** True Line Result + args.state.ball.y = 360 +** Processing line: ~ args.state.ball.dx = 5.randomize(:sign)~ +- Inside source: true +*** True Line Result + args.state.ball.dx = 5.randomize(:sign) +** Processing line: ~ args.state.ball.dy = 5.randomize(:sign)~ +- Inside source: true +*** True Line Result + args.state.ball.dy = 5.randomize(:sign) +** Processing line: ~ args.state.ball.debounce = 3 * 60~ +- Inside source: true +*** True Line Result + args.state.ball.debounce = 3 * 60 +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ args.state.player[:cooldown] -= 1~ +** Processing line: ~ def input args~ - Inside source: true *** True Line Result - args.state.player[:cooldown] -= 1 -** Processing line: ~ if args.inputs.keyboard.key_held.space && args.state.player[:cooldown] <= 0 && args.state.player[:alive]~ + def input args +** Processing line: ~ input_left_paddle args~ - Inside source: true *** True Line Result - if args.inputs.keyboard.key_held.space && args.state.player[:cooldown] <= 0 && args.state.player[:alive] -** Processing line: ~ args.state.player_bullets << {x: args.state.player[:x] + 12, y: args.state.player[:y] + 28, w: 16, h: 16, path: 'sprites/star.png', dx: 0, dy: 8}.sprite~ + input_left_paddle args +** Processing line: ~ input_right_paddle args~ - Inside source: true *** True Line Result - args.state.player_bullets << {x: args.state.player[:x] + 12, y: args.state.player[:y] + 28, w: 16, h: 16, path: 'sprites/star.png', dx: 0, dy: 8}.sprite -** Processing line: ~ args.state.fired_shots += 1~ + input_right_paddle args +** Processing line: ~ end~ - Inside source: true *** True Line Result - args.state.fired_shots += 1 -** Processing line: ~ args.state.player[:cooldown] = 10 + 20 / args.state.wave~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - args.state.player[:cooldown] = 10 + 20 / args.state.wave -** Processing line: ~ end~ + +** Processing line: ~ begin :input_methods~ - Inside source: true *** True Line Result - end -** Processing line: ~ args.state.enemies.each do |enemy|~ + begin :input_methods +** Processing line: ~ def input_left_paddle args~ - Inside source: true *** True Line Result - args.state.enemies.each do |enemy| -** Processing line: ~ if Math.rand < 0.0005 + 0.0005 * args.state.wave && args.state.player[:alive] && enemy[:move_state] == :normal~ + def input_left_paddle args +** Processing line: ~ if args.inputs.controller_one.key_down.down || args.inputs.keyboard.key_down.s~ - Inside source: true *** True Line Result - if Math.rand < 0.0005 + 0.0005 * args.state.wave && args.state.player[:alive] && enemy[:move_state] == :normal -** Processing line: ~ args.state.enemy_bullets << {x: enemy[:x] + 12, y: enemy[:y] - 8, w: 16, h: 16, path: 'sprites/star.png', dx: 0, dy: -3 - args.state.wave_root}.sprite~ + if args.inputs.controller_one.key_down.down || args.inputs.keyboard.key_down.s +** Processing line: ~ args.state.left_paddle.y -= 40~ - Inside source: true *** True Line Result - args.state.enemy_bullets << {x: enemy[:x] + 12, y: enemy[:y] - 8, w: 16, h: 16, path: 'sprites/star.png', dx: 0, dy: -3 - args.state.wave_root}.sprite + args.state.left_paddle.y -= 40 +** Processing line: ~ elsif args.inputs.controller_one.key_down.up || args.inputs.keyboard.key_down.w~ +- Inside source: true +*** True Line Result + elsif args.inputs.controller_one.key_down.up || args.inputs.keyboard.key_down.w +** Processing line: ~ args.state.left_paddle.y += 40~ +- Inside source: true +*** True Line Result + args.state.left_paddle.y += 40 ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -88092,122 +95079,118 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ args.outputs.background_color = [0, 0, 0]~ -- Inside source: true -*** True Line Result - args.outputs.background_color = [0, 0, 0] -** Processing line: ~ args.outputs.primitives << args.state.enemies.map do |enemy|~ -- Inside source: true -*** True Line Result - args.outputs.primitives << args.state.enemies.map do |enemy| -** Processing line: ~ [enemy[:x], enemy[:y], 40, 40, enemy[:path], -90].sprite~ +** Processing line: ~ def input_right_paddle args~ - Inside source: true *** True Line Result - [enemy[:x], enemy[:y], 40, 40, enemy[:path], -90].sprite -** Processing line: ~ end~ + def input_right_paddle args +** Processing line: ~ if args.inputs.controller_two.key_down.down || args.inputs.keyboard.key_down.l~ - Inside source: true *** True Line Result - end -** Processing line: ~ args.outputs.primitives << args.state.player if args.state.player[:alive]~ + if args.inputs.controller_two.key_down.down || args.inputs.keyboard.key_down.l +** Processing line: ~ args.state.right_paddle.y -= 40~ - Inside source: true *** True Line Result - args.outputs.primitives << args.state.player if args.state.player[:alive] -** Processing line: ~ args.outputs.primitives << args.state.explosions~ + args.state.right_paddle.y -= 40 +** Processing line: ~ elsif args.inputs.controller_two.key_down.up || args.inputs.keyboard.key_down.o~ - Inside source: true *** True Line Result - args.outputs.primitives << args.state.explosions -** Processing line: ~ args.outputs.primitives << args.state.player_bullets~ + elsif args.inputs.controller_two.key_down.up || args.inputs.keyboard.key_down.o +** Processing line: ~ args.state.right_paddle.y += 40~ - Inside source: true *** True Line Result - args.outputs.primitives << args.state.player_bullets -** Processing line: ~ args.outputs.primitives << args.state.enemy_bullets~ + args.state.right_paddle.y += 40 +** Processing line: ~ end~ - Inside source: true *** True Line Result - args.outputs.primitives << args.state.enemy_bullets -** Processing line: ~ accuracy = args.state.fired_shots.zero? ? 1 : (args.state.fired_shots - args.state.missed_shots) / args.state.fired_shots~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - accuracy = args.state.fired_shots.zero? ? 1 : (args.state.fired_shots - args.state.missed_shots) / args.state.fired_shots -** Processing line: ~ args.outputs.primitives << [~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - args.outputs.primitives << [ -** Processing line: ~ [0, 0, 300, 720, 96, 0, 0].solid,~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - [0, 0, 300, 720, 96, 0, 0].solid, -** Processing line: ~ [1280 - 300, 0, 300, 720, 96, 0, 0].solid,~ + +** Processing line: ~ begin :assets~ - Inside source: true *** True Line Result - [1280 - 300, 0, 300, 720, 96, 0, 0].solid, -** Processing line: ~ [1280 - 290, 60, "Wave #{args.state.wave}", 255, 255, 255].label,~ + begin :assets +** Processing line: ~ def solid_ball args~ - Inside source: true *** True Line Result - [1280 - 290, 60, "Wave #{args.state.wave}", 255, 255, 255].label, -** Processing line: ~ [1280 - 290, 40, "Accuracy #{(accuracy * 100).floor}%", 255, 255, 255].label,~ + def solid_ball args +** Processing line: ~ centered_rect args.state.ball.x, args.state.ball.y, args.state.ball.size, args.state.ball.size~ - Inside source: true *** True Line Result - [1280 - 290, 40, "Accuracy #{(accuracy * 100).floor}%", 255, 255, 255].label, -** Processing line: ~ [1280 - 290, 20, "Score #{(args.state.score * accuracy).floor}", 255, 255, 255].label,~ + centered_rect args.state.ball.x, args.state.ball.y, args.state.ball.size, args.state.ball.size +** Processing line: ~ end~ - Inside source: true *** True Line Result - [1280 - 290, 20, "Score #{(args.state.score * accuracy).floor}", 255, 255, 255].label, -** Processing line: ~ ]~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - ] -** Processing line: ~ args.outputs.primitives << args.state.lives.times.map do |n|~ + +** Processing line: ~ def solid_left_paddle args~ - Inside source: true *** True Line Result - args.outputs.primitives << args.state.lives.times.map do |n| -** Processing line: ~ [1280 - 290 + 50 * n, 80, 40, 40, 'sprites/circle-gray.png', 90].sprite~ + def solid_left_paddle args +** Processing line: ~ centered_rect_vertically 0, args.state.left_paddle.y, args.state.paddle.w, args.state.paddle.h~ - Inside source: true *** True Line Result - [1280 - 290 + 50 * n, 80, 40, 40, 'sprites/circle-gray.png', 90].sprite + centered_rect_vertically 0, args.state.left_paddle.y, args.state.paddle.w, args.state.paddle.h ** Processing line: ~ end~ - Inside source: true *** True Line Result end -** Processing line: ~ #args.outputs.debug << args.gtk.framerate_diagnostics_primitives~ -- Inside source: true -*** True Line Result - #args.outputs.debug << args.gtk.framerate_diagnostics_primitives ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ if (!args.state.player[:alive]) && args.state.enemy_bullets.empty? && args.state.explosions.empty? && args.state.enemies.all? { |enemy| enemy[:move_state] == :normal }~ +** Processing line: ~ def solid_right_paddle args~ - Inside source: true *** True Line Result - if (!args.state.player[:alive]) && args.state.enemy_bullets.empty? && args.state.explosions.empty? && args.state.enemies.all? { |enemy| enemy[:move_state] == :normal } -** Processing line: ~ args.state.player[:alive] = true~ + def solid_right_paddle args +** Processing line: ~ centered_rect_vertically 1280 - args.state.paddle.w, args.state.right_paddle.y, args.state.paddle.w, args.state.paddle.h~ - Inside source: true *** True Line Result - args.state.player[:alive] = true -** Processing line: ~ args.state.player[:x] = 624~ + centered_rect_vertically 1280 - args.state.paddle.w, args.state.right_paddle.y, args.state.paddle.w, args.state.paddle.h +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ def centered_rect x, y, w, h~ - Inside source: true *** True Line Result - args.state.player[:x] = 624 -** Processing line: ~ args.state.player[:y] = 80~ + def centered_rect x, y, w, h +** Processing line: ~ [x - w / 2, y - h / 2, w, h]~ - Inside source: true *** True Line Result - args.state.player[:y] = 80 -** Processing line: ~ args.state.lives -= 1~ + [x - w / 2, y - h / 2, w, h] +** Processing line: ~ end~ - Inside source: true *** True Line Result - args.state.lives -= 1 -** Processing line: ~ if args.state.lives == -1~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - if args.state.lives == -1 -** Processing line: ~ args.state.clear!~ + +** Processing line: ~ def centered_rect_vertically x, y, w, h~ - Inside source: true *** True Line Result - args.state.clear! -** Processing line: ~ end~ + def centered_rect_vertically x, y, w, h +** Processing line: ~ [x, y - h / 2, w, h]~ - Inside source: true *** True Line Result - end + [x, y - h / 2, w, h] ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -88220,242 +95203,250 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def make_enemies~ -- Inside source: true +** Processing line: ~#+end_src~ +- Line was identified as the end of a code block. *** True Line Result - def make_enemies -** Processing line: ~ enemies = []~ -- Inside source: true +#+end_src +** Processing line: ~~ +- End of paragraph detected. *** True Line Result - enemies = [] -** Processing line: ~ enemies += 10.times.map { |n| {x: Math.rand * 1280 * 2 - 640, y: Math.rand * 720 * 2 + 720, row: 0, col: n, path: 'sprites/circle-orange.png', move_state: :retreat} }~ -- Inside source: true + +** Processing line: ~*** Arcade - Snakemoji - main.rb~ +- Header detected. *** True Line Result - enemies += 10.times.map { |n| {x: Math.rand * 1280 * 2 - 640, y: Math.rand * 720 * 2 + 720, row: 0, col: n, path: 'sprites/circle-orange.png', move_state: :retreat} } -** Processing line: ~ enemies += 10.times.map { |n| {x: Math.rand * 1280 * 2 - 640, y: Math.rand * 720 * 2 + 720, row: 1, col: n, path: 'sprites/circle-orange.png', move_state: :retreat} }~ + +*** True Line Result +*** Arcade - Snakemoji - main.rb +** Processing line: ~#+begin_src ruby~ +- Line was identified as the beginning of a code block. +*** True Line Result + +*** True Line Result +#+begin_src ruby +** Processing line: ~ # ./samples/99_genre_arcade/snakemoji/app/main.rb~ - Inside source: true *** True Line Result - enemies += 10.times.map { |n| {x: Math.rand * 1280 * 2 - 640, y: Math.rand * 720 * 2 + 720, row: 1, col: n, path: 'sprites/circle-orange.png', move_state: :retreat} } -** Processing line: ~ enemies += 8.times.map { |n| {x: Math.rand * 1280 * 2 - 640, y: Math.rand * 720 * 2 + 720, row: 2, col: n + 1, path: 'sprites/circle-blue.png', move_state: :retreat} }~ + # ./samples/99_genre_arcade/snakemoji/app/main.rb +** Processing line: ~ # coding: utf-8~ - Inside source: true *** True Line Result - enemies += 8.times.map { |n| {x: Math.rand * 1280 * 2 - 640, y: Math.rand * 720 * 2 + 720, row: 2, col: n + 1, path: 'sprites/circle-blue.png', move_state: :retreat} } -** Processing line: ~ enemies += 8.times.map { |n| {x: Math.rand * 1280 * 2 - 640, y: Math.rand * 720 * 2 + 720, row: 3, col: n + 1, path: 'sprites/circle-blue.png', move_state: :retreat} }~ + # coding: utf-8 +** Processing line: ~ ################################~ - Inside source: true *** True Line Result - enemies += 8.times.map { |n| {x: Math.rand * 1280 * 2 - 640, y: Math.rand * 720 * 2 + 720, row: 3, col: n + 1, path: 'sprites/circle-blue.png', move_state: :retreat} } -** Processing line: ~ enemies += 4.times.map { |n| {x: Math.rand * 1280 * 2 - 640, y: Math.rand * 720 * 2 + 720, row: 4, col: n + 3, path: 'sprites/circle-green.png', move_state: :retreat} }~ + ################################ +** Processing line: ~ # So I was working on a snake game while~ - Inside source: true *** True Line Result - enemies += 4.times.map { |n| {x: Math.rand * 1280 * 2 - 640, y: Math.rand * 720 * 2 + 720, row: 4, col: n + 3, path: 'sprites/circle-green.png', move_state: :retreat} } -** Processing line: ~ enemies~ + # So I was working on a snake game while +** Processing line: ~ # learning DragonRuby, and at some point I had a thought~ - Inside source: true *** True Line Result - enemies -** Processing line: ~ end~ + # learning DragonRuby, and at some point I had a thought +** Processing line: ~ # what if I use "😀" as a function name, surely it wont work right...?~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + # what if I use "😀" as a function name, surely it wont work right...? +** Processing line: ~ # RIGHT....?~ - Inside source: true *** True Line Result - -** Processing line: ~ def update_explosions args~ + # RIGHT....? +** Processing line: ~ # BUT IT DID, IT WORKED~ - Inside source: true *** True Line Result - def update_explosions args -** Processing line: ~ args.state.explosions.each do |explosion|~ + # BUT IT DID, IT WORKED +** Processing line: ~ # it all went downhill from then~ - Inside source: true *** True Line Result - args.state.explosions.each do |explosion| -** Processing line: ~ explosion[:age] += 0.5~ + # it all went downhill from then +** Processing line: ~ # Created by Anton K. (ai Doge)~ - Inside source: true *** True Line Result - explosion[:age] += 0.5 -** Processing line: ~ explosion[:path] = "sprites/explosion-#{explosion[:age].floor}.png"~ + # Created by Anton K. (ai Doge) +** Processing line: ~ # https://gist.github.com/scorp200~ - Inside source: true *** True Line Result - explosion[:path] = "sprites/explosion-#{explosion[:age].floor}.png" -** Processing line: ~ end~ + # https://gist.github.com/scorp200 +** Processing line: ~ #############LICENSE############~ - Inside source: true *** True Line Result - end -** Processing line: ~ args.state.explosions = args.state.explosions.reject { |explosion| explosion[:age] >= 7 }~ + #############LICENSE############ +** Processing line: ~ # Feel free to use this anywhere and however you want~ - Inside source: true *** True Line Result - args.state.explosions = args.state.explosions.reject { |explosion| explosion[:age] >= 7 } -** Processing line: ~ end~ + # Feel free to use this anywhere and however you want +** Processing line: ~ # You can sell this to EA for $1,000,000 if you want, its completely free.~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + # You can sell this to EA for $1,000,000 if you want, its completely free. +** Processing line: ~ # Just rememeber you are helping this... thing... to spread...~ - Inside source: true *** True Line Result - -** Processing line: ~ def update_enemy_positions args~ + # Just rememeber you are helping this... thing... to spread... +** Processing line: ~ # ALSO! I am not liable for any mental, physical or financial damage caused.~ - Inside source: true *** True Line Result - def update_enemy_positions args -** Processing line: ~ args.state.enemies.each do |enemy|~ + # ALSO! I am not liable for any mental, physical or financial damage caused. +** Processing line: ~ #############LICENSE############~ - Inside source: true *** True Line Result - args.state.enemies.each do |enemy| -** Processing line: ~ if enemy[:move_state] == :normal~ + #############LICENSE############ +** Processing line: ~~ - Inside source: true *** True Line Result - if enemy[:move_state] == :normal -** Processing line: ~ enemy[:x] = args.state.columns[enemy[:col]]~ + +** Processing line: ~~ - Inside source: true *** True Line Result - enemy[:x] = args.state.columns[enemy[:col]] -** Processing line: ~ enemy[:y] = args.state.rows[enemy[:row]]~ + +** Processing line: ~ class Array~ - Inside source: true *** True Line Result - enemy[:y] = args.state.rows[enemy[:row]] -** Processing line: ~ enemy[:move_state] = :dive if Math.rand < 0.0002 + 0.00005 * args.state.wave && args.state.player[:alive]~ + class Array +** Processing line: ~ #Helper function~ - Inside source: true *** True Line Result - enemy[:move_state] = :dive if Math.rand < 0.0002 + 0.00005 * args.state.wave && args.state.player[:alive] -** Processing line: ~ elsif enemy[:move_state] == :dive~ + #Helper function +** Processing line: ~ def move! vector~ - Inside source: true *** True Line Result - elsif enemy[:move_state] == :dive -** Processing line: ~ enemy[:target_x] ||= args.state.player[:x]~ + def move! vector +** Processing line: ~ self.x += vector.x~ - Inside source: true *** True Line Result - enemy[:target_x] ||= args.state.player[:x] -** Processing line: ~ enemy[:target_y] ||= args.state.player[:y]~ + self.x += vector.x +** Processing line: ~ self.y += vector.y~ - Inside source: true *** True Line Result - enemy[:target_y] ||= args.state.player[:y] -** Processing line: ~ dx = enemy[:target_x] - enemy[:x]~ + self.y += vector.y +** Processing line: ~ return self~ - Inside source: true *** True Line Result - dx = enemy[:target_x] - enemy[:x] -** Processing line: ~ dy = enemy[:target_y] - enemy[:y]~ + return self +** Processing line: ~ end~ - Inside source: true *** True Line Result - dy = enemy[:target_y] - enemy[:y] -** Processing line: ~ vel = Math.sqrt(dx * dx + dy * dy)~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - vel = Math.sqrt(dx * dx + dy * dy) -** Processing line: ~ speed_limit = 2 + args.state.wave_root~ + +** Processing line: ~ #Helper function to draw snake body~ - Inside source: true *** True Line Result - speed_limit = 2 + args.state.wave_root -** Processing line: ~ if vel > speed_limit~ + #Helper function to draw snake body +** Processing line: ~ def draw! 🎮, 📺, color~ - Inside source: true *** True Line Result - if vel > speed_limit -** Processing line: ~ dx /= vel / speed_limit~ + def draw! 🎮, 📺, color +** Processing line: ~ translate 📺.solids, 🎮.⛓, [self.x * 🎮.⚖️ + 🎮.🛶 / 2, self.y * 🎮.⚖️ + 🎮.🛶 / 2, 🎮.⚖️ - 🎮.🛶, 🎮.⚖️ - 🎮.🛶, color]~ - Inside source: true *** True Line Result - dx /= vel / speed_limit -** Processing line: ~ dy /= vel / speed_limit~ + translate 📺.solids, 🎮.⛓, [self.x * 🎮.⚖️ + 🎮.🛶 / 2, self.y * 🎮.⚖️ + 🎮.🛶 / 2, 🎮.⚖️ - 🎮.🛶, 🎮.⚖️ - 🎮.🛶, color] +** Processing line: ~ end~ - Inside source: true *** True Line Result - dy /= vel / speed_limit -** Processing line: ~ end~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - end -** Processing line: ~ if vel < 1 || !args.state.player[:alive]~ + +** Processing line: ~ #This is where it all started, I was trying to find good way to multiply a map by a number, * is already used so is **~ - Inside source: true *** True Line Result - if vel < 1 || !args.state.player[:alive] -** Processing line: ~ enemy[:move_state] = :retreat~ + #This is where it all started, I was trying to find good way to multiply a map by a number, * is already used so is ** +** Processing line: ~ #I kept trying different combinations of symbols, when suddenly...~ - Inside source: true *** True Line Result - enemy[:move_state] = :retreat -** Processing line: ~ end~ + #I kept trying different combinations of symbols, when suddenly... +** Processing line: ~ def 😀 value~ - Inside source: true *** True Line Result - end -** Processing line: ~ enemy[:x] += dx~ + def 😀 value +** Processing line: ~ self.map {|d| d * value}~ - Inside source: true *** True Line Result - enemy[:x] += dx -** Processing line: ~ enemy[:y] += dy~ + self.map {|d| d * value} +** Processing line: ~ end~ - Inside source: true *** True Line Result - enemy[:y] += dy -** Processing line: ~ elsif enemy[:move_state] == :retreat~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - elsif enemy[:move_state] == :retreat -** Processing line: ~ enemy[:target_x] = args.state.columns[enemy[:col]]~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - enemy[:target_x] = args.state.columns[enemy[:col]] -** Processing line: ~ enemy[:target_y] = args.state.rows[enemy[:row]]~ + +** Processing line: ~ #Draw stuff with an offset~ - Inside source: true *** True Line Result - enemy[:target_y] = args.state.rows[enemy[:row]] -** Processing line: ~ dx = enemy[:target_x] - enemy[:x]~ + #Draw stuff with an offset +** Processing line: ~ def translate output_collection, ⛓, what~ - Inside source: true *** True Line Result - dx = enemy[:target_x] - enemy[:x] -** Processing line: ~ dy = enemy[:target_y] - enemy[:y]~ + def translate output_collection, ⛓, what +** Processing line: ~ what.x += ⛓.x~ - Inside source: true *** True Line Result - dy = enemy[:target_y] - enemy[:y] -** Processing line: ~ vel = Math.sqrt(dx * dx + dy * dy)~ + what.x += ⛓.x +** Processing line: ~ what.y += ⛓.y~ - Inside source: true *** True Line Result - vel = Math.sqrt(dx * dx + dy * dy) -** Processing line: ~ speed_limit = 2 + args.state.wave_root~ + what.y += ⛓.y +** Processing line: ~ output_collection << what~ - Inside source: true *** True Line Result - speed_limit = 2 + args.state.wave_root -** Processing line: ~ if vel > speed_limit~ + output_collection << what +** Processing line: ~ end~ - Inside source: true *** True Line Result - if vel > speed_limit -** Processing line: ~ dx /= vel / speed_limit~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - dx /= vel / speed_limit -** Processing line: ~ dy /= vel / speed_limit~ + +** Processing line: ~ BLUE = [33, 150, 243]~ - Inside source: true *** True Line Result - dy /= vel / speed_limit -** Processing line: ~ elsif vel < 1~ + BLUE = [33, 150, 243] +** Processing line: ~ RED = [244, 67, 54]~ - Inside source: true *** True Line Result - elsif vel < 1 -** Processing line: ~ enemy[:move_state] = :normal~ + RED = [244, 67, 54] +** Processing line: ~ GOLD = [255, 193, 7]~ - Inside source: true *** True Line Result - enemy[:move_state] = :normal -** Processing line: ~ enemy[:target_x] = nil~ + GOLD = [255, 193, 7] +** Processing line: ~ LAST = 0~ - Inside source: true *** True Line Result - enemy[:target_x] = nil -** Processing line: ~ enemy[:target_y] = nil~ + LAST = 0 +** Processing line: ~~ - Inside source: true *** True Line Result - enemy[:target_y] = nil -** Processing line: ~ end~ + +** Processing line: ~ def tick args~ - Inside source: true *** True Line Result - end -** Processing line: ~ enemy[:x] += dx~ + def tick args +** Processing line: ~ defaults args.state~ - Inside source: true *** True Line Result - enemy[:x] += dx -** Processing line: ~ enemy[:y] += dy~ + defaults args.state +** Processing line: ~ render args.state, args.outputs~ - Inside source: true *** True Line Result - enemy[:y] += dy -** Processing line: ~ end~ + render args.state, args.outputs +** Processing line: ~ input args.state, args.inputs~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + input args.state, args.inputs +** Processing line: ~ update args.state~ - Inside source: true *** True Line Result - end + update args.state ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -88464,118 +95455,122 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~#+end_src~ -- Line was identified as the end of a code block. -*** True Line Result -#+end_src -** Processing line: ~~ -- End of paragraph detected. -*** True Line Result - -** Processing line: ~*** Arcade - Dueling Starships - main.rb~ -- Header detected. +** Processing line: ~ def update 🎮~ +- Inside source: true *** True Line Result - + def update 🎮 +** Processing line: ~ #Update every 10 frames~ +- Inside source: true *** True Line Result -*** Arcade - Dueling Starships - main.rb -** Processing line: ~#+begin_src ruby~ -- Line was identified as the beginning of a code block. + #Update every 10 frames +** Processing line: ~ if 🎮.tick_count.mod_zero? 10~ +- Inside source: true *** True Line Result - + if 🎮.tick_count.mod_zero? 10 +** Processing line: ~ #Add new snake body piece at head's location~ +- Inside source: true *** True Line Result -#+begin_src ruby -** Processing line: ~ # ./samples/99_genre_arcade/dueling_starships/app/main.rb~ + #Add new snake body piece at head's location +** Processing line: ~ 🎮.🐍 << [*🎮.🤖]~ - Inside source: true *** True Line Result - # ./samples/99_genre_arcade/dueling_starships/app/main.rb -** Processing line: ~ class DuelingSpaceships~ + 🎮.🐍 << [*🎮.🤖] +** Processing line: ~ #Assign Next Direction to Direction~ - Inside source: true *** True Line Result - class DuelingSpaceships -** Processing line: ~ attr_accessor :state, :inputs, :outputs, :grid~ + #Assign Next Direction to Direction +** Processing line: ~ 🎮.🚗 = *🎮.🚦~ - Inside source: true *** True Line Result - attr_accessor :state, :inputs, :outputs, :grid + 🎮.🚗 = *🎮.🚦 ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def tick~ +** Processing line: ~ #Trim the snake a bit if its longer than current size~ - Inside source: true *** True Line Result - def tick -** Processing line: ~ defaults~ + #Trim the snake a bit if its longer than current size +** Processing line: ~ if 🎮.🐍.length > 🎮.🛒~ - Inside source: true *** True Line Result - defaults -** Processing line: ~ render~ + if 🎮.🐍.length > 🎮.🛒 +** Processing line: ~ 🎮.🐍 = 🎮.🐍[-🎮.🛒..-1]~ - Inside source: true *** True Line Result - render -** Processing line: ~ calc~ + 🎮.🐍 = 🎮.🐍[-🎮.🛒..-1] +** Processing line: ~ end~ - Inside source: true *** True Line Result - calc -** Processing line: ~ input~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - input -** Processing line: ~ end~ + +** Processing line: ~ #Move the head in the Direction~ - Inside source: true *** True Line Result - end + #Move the head in the Direction +** Processing line: ~ 🎮.🤖.move! 🎮.🚗~ +- Inside source: true +*** True Line Result + 🎮.🤖.move! 🎮.🚗 ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def defaults~ +** Processing line: ~ #If Head is outside the playing field, or inside snake's body restart game~ - Inside source: true *** True Line Result - def defaults -** Processing line: ~ outputs.background_color = [0, 0, 0]~ + #If Head is outside the playing field, or inside snake's body restart game +** Processing line: ~ if 🎮.🤖.x < 0 || 🎮.🤖.x >= 🎮.🗺.x || 🎮.🤖.y < 0 || 🎮.🤖.y >= 🎮.🗺.y || 🎮.🚗 != [0, 0] && 🎮.🐍.any? {|s| s == 🎮.🤖}~ - Inside source: true *** True Line Result - outputs.background_color = [0, 0, 0] -** Processing line: ~ state.ship_blue ||= new_blue_ship~ + if 🎮.🤖.x < 0 || 🎮.🤖.x >= 🎮.🗺.x || 🎮.🤖.y < 0 || 🎮.🤖.y >= 🎮.🗺.y || 🎮.🚗 != [0, 0] && 🎮.🐍.any? {|s| s == 🎮.🤖} +** Processing line: ~ LAST = 🎮.💰~ - Inside source: true *** True Line Result - state.ship_blue ||= new_blue_ship -** Processing line: ~ state.ship_red ||= new_red_ship~ + LAST = 🎮.💰 +** Processing line: ~ 🎮.as_hash.clear~ - Inside source: true *** True Line Result - state.ship_red ||= new_red_ship -** Processing line: ~ state.flames ||= []~ + 🎮.as_hash.clear +** Processing line: ~ return~ - Inside source: true *** True Line Result - state.flames ||= [] -** Processing line: ~ state.bullets ||= []~ + return +** Processing line: ~ end~ - Inside source: true *** True Line Result - state.bullets ||= [] -** Processing line: ~ state.ship_blue_score ||= 0~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - state.ship_blue_score ||= 0 -** Processing line: ~ state.ship_red_score ||= 0~ + +** Processing line: ~ #If head lands on food add size and score~ - Inside source: true *** True Line Result - state.ship_red_score ||= 0 -** Processing line: ~ state.stars ||= 100.map do~ + #If head lands on food add size and score +** Processing line: ~ if 🎮.🤖 == 🎮.🍎~ - Inside source: true *** True Line Result - state.stars ||= 100.map do -** Processing line: ~ [rand.add(2).to_square(grid.w_half.randomize(:sign, :ratio),~ + if 🎮.🤖 == 🎮.🍎 +** Processing line: ~ 🎮.🛒 += 1~ - Inside source: true *** True Line Result - [rand.add(2).to_square(grid.w_half.randomize(:sign, :ratio), -** Processing line: ~ grid.h_half.randomize(:sign, :ratio)),~ + 🎮.🛒 += 1 +** Processing line: ~ 🎮.💰 += (🎮.🛒 * 0.8).floor.to_i + 5~ - Inside source: true *** True Line Result - grid.h_half.randomize(:sign, :ratio)), -** Processing line: ~ 128 + 128.randomize(:ratio), 255, 255]~ + 🎮.💰 += (🎮.🛒 * 0.8).floor.to_i + 5 +** Processing line: ~ spawn_🍎 🎮~ - Inside source: true *** True Line Result - 128 + 128.randomize(:ratio), 255, 255] + spawn_🍎 🎮 +** Processing line: ~ puts 🎮.🍎~ +- Inside source: true +*** True Line Result + puts 🎮.🍎 ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -88588,170 +95583,174 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def default_ship x, y, angle, sprite_path, bullet_sprite_path, color~ -- Inside source: true -*** True Line Result - def default_ship x, y, angle, sprite_path, bullet_sprite_path, color -** Processing line: ~ state.new_entity(:ship,~ +** Processing line: ~ #Every second remove 1 point~ - Inside source: true *** True Line Result - state.new_entity(:ship, -** Processing line: ~ { x: x,~ + #Every second remove 1 point +** Processing line: ~ if 🎮.💰 > 0 && 🎮.tick_count.mod_zero?(60)~ - Inside source: true *** True Line Result - { x: x, -** Processing line: ~ y: y,~ + if 🎮.💰 > 0 && 🎮.tick_count.mod_zero?(60) +** Processing line: ~ 🎮.💰 -= 1~ - Inside source: true *** True Line Result - y: y, -** Processing line: ~ dy: 0,~ + 🎮.💰 -= 1 +** Processing line: ~ end~ - Inside source: true *** True Line Result - dy: 0, -** Processing line: ~ dx: 0,~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - dx: 0, -** Processing line: ~ damage: 0,~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - damage: 0, -** Processing line: ~ dead: false,~ + +** Processing line: ~ def spawn_🍎 🎮~ - Inside source: true *** True Line Result - dead: false, -** Processing line: ~ angle: angle,~ + def spawn_🍎 🎮 +** Processing line: ~ #Food~ - Inside source: true *** True Line Result - angle: angle, -** Processing line: ~ max_alpha: 255,~ + #Food +** Processing line: ~ 🎮.🍎 ||= [*🎮.🤖]~ - Inside source: true *** True Line Result - max_alpha: 255, -** Processing line: ~ sprite_path: sprite_path,~ + 🎮.🍎 ||= [*🎮.🤖] +** Processing line: ~ #Randomly spawns food inside the playing field, keep doing this if the food keeps landing on the snake's body~ - Inside source: true *** True Line Result - sprite_path: sprite_path, -** Processing line: ~ bullet_sprite_path: bullet_sprite_path,~ + #Randomly spawns food inside the playing field, keep doing this if the food keeps landing on the snake's body +** Processing line: ~ while 🎮.🐍.any? {|s| s == 🎮.🍎} || 🎮.🍎 == 🎮.🤖 do~ - Inside source: true *** True Line Result - bullet_sprite_path: bullet_sprite_path, -** Processing line: ~ color: color })~ + while 🎮.🐍.any? {|s| s == 🎮.🍎} || 🎮.🍎 == 🎮.🤖 do +** Processing line: ~ 🎮.🍎 = [rand(🎮.🗺.x), rand(🎮.🗺.y)]~ - Inside source: true *** True Line Result - color: color }) + 🎮.🍎 = [rand(🎮.🗺.x), rand(🎮.🗺.y)] ** Processing line: ~ end~ - Inside source: true *** True Line Result end +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def new_red_ship~ +** Processing line: ~ def render 🎮, 📺~ - Inside source: true *** True Line Result - def new_red_ship -** Processing line: ~ default_ship(400, 250.randomize(:sign, :ratio),~ + def render 🎮, 📺 +** Processing line: ~ #Paint the background black~ - Inside source: true *** True Line Result - default_ship(400, 250.randomize(:sign, :ratio), -** Processing line: ~ 180, 'sprites/ship_red.png', 'sprites/red_bullet.png',~ + #Paint the background black +** Processing line: ~ 📺.solids << [0, 0, 1280, 720, 0, 0, 0, 255]~ - Inside source: true *** True Line Result - 180, 'sprites/ship_red.png', 'sprites/red_bullet.png', -** Processing line: ~ [255, 90, 90])~ + 📺.solids << [0, 0, 1280, 720, 0, 0, 0, 255] +** Processing line: ~ #Draw a border for the playing field~ - Inside source: true *** True Line Result - [255, 90, 90]) -** Processing line: ~ end~ + #Draw a border for the playing field +** Processing line: ~ translate 📺.borders, 🎮.⛓, [0, 0, 🎮.🗺.x * 🎮.⚖️, 🎮.🗺.y * 🎮.⚖️, 255, 255, 255]~ - Inside source: true *** True Line Result - end + translate 📺.borders, 🎮.⛓, [0, 0, 🎮.🗺.x * 🎮.⚖️, 🎮.🗺.y * 🎮.⚖️, 255, 255, 255] ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def new_blue_ship~ +** Processing line: ~ #Draw the snake's body~ - Inside source: true *** True Line Result - def new_blue_ship -** Processing line: ~ default_ship(-400, 250.randomize(:sign, :ratio),~ + #Draw the snake's body +** Processing line: ~ 🎮.🐍.map do |🐍| 🐍.draw! 🎮, 📺, BLUE end~ - Inside source: true *** True Line Result - default_ship(-400, 250.randomize(:sign, :ratio), -** Processing line: ~ 0, 'sprites/ship_blue.png', 'sprites/blue_bullet.png',~ + 🎮.🐍.map do |🐍| 🐍.draw! 🎮, 📺, BLUE end +** Processing line: ~ #Draw the head~ - Inside source: true *** True Line Result - 0, 'sprites/ship_blue.png', 'sprites/blue_bullet.png', -** Processing line: ~ [110, 140, 255])~ + #Draw the head +** Processing line: ~ 🎮.🤖.draw! 🎮, 📺, BLUE~ - Inside source: true *** True Line Result - [110, 140, 255]) -** Processing line: ~ end~ + 🎮.🤖.draw! 🎮, 📺, BLUE +** Processing line: ~ #Draw the food~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + #Draw the food +** Processing line: ~ 🎮.🍎.draw! 🎮, 📺, RED~ - Inside source: true *** True Line Result - -** Processing line: ~ def render~ + 🎮.🍎.draw! 🎮, 📺, RED +** Processing line: ~~ - Inside source: true *** True Line Result - def render -** Processing line: ~ render_instructions~ + +** Processing line: ~ #Draw current score~ - Inside source: true *** True Line Result - render_instructions -** Processing line: ~ render_score~ + #Draw current score +** Processing line: ~ translate 📺.labels, 🎮.⛓, [5, 715, "Score: #{🎮.💰}", GOLD]~ - Inside source: true *** True Line Result - render_score -** Processing line: ~ render_universe~ + translate 📺.labels, 🎮.⛓, [5, 715, "Score: #{🎮.💰}", GOLD] +** Processing line: ~ #Draw your last score, if any~ - Inside source: true *** True Line Result - render_universe -** Processing line: ~ render_flames~ + #Draw your last score, if any +** Processing line: ~ translate 📺.labels, 🎮.⛓, [[*🎮.🤖.😀(🎮.⚖️)].move!([0, 🎮.⚖️ * 2]), "Your Last score is #{LAST}", 0, 1, GOLD] unless LAST == 0 || 🎮.🚗 != [0, 0]~ - Inside source: true *** True Line Result - render_flames -** Processing line: ~ render_ships~ + translate 📺.labels, 🎮.⛓, [[*🎮.🤖.😀(🎮.⚖️)].move!([0, 🎮.⚖️ * 2]), "Your Last score is #{LAST}", 0, 1, GOLD] unless LAST == 0 || 🎮.🚗 != [0, 0] +** Processing line: ~ #Draw starting message, only if Direction is 0~ - Inside source: true *** True Line Result - render_ships -** Processing line: ~ render_bullets~ + #Draw starting message, only if Direction is 0 +** Processing line: ~ translate 📺.labels, 🎮.⛓, [🎮.🤖.😀(🎮.⚖️), "Press any Arrow key to start", 0, 1, GOLD] unless 🎮.🚗 != [0, 0]~ - Inside source: true *** True Line Result - render_bullets -** Processing line: ~ end~ + translate 📺.labels, 🎮.⛓, [🎮.🤖.😀(🎮.⚖️), "Press any Arrow key to start", 0, 1, GOLD] unless 🎮.🚗 != [0, 0] +** Processing line: ~ end~ - Inside source: true *** True Line Result - end + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def render_ships~ +** Processing line: ~ def input 🎮, 🕹~ - Inside source: true *** True Line Result - def render_ships -** Processing line: ~ update_ship_outputs(state.ship_blue)~ + def input 🎮, 🕹 +** Processing line: ~ #Left and Right keyboard input, only change if X direction is 0~ - Inside source: true *** True Line Result - update_ship_outputs(state.ship_blue) -** Processing line: ~ update_ship_outputs(state.ship_red)~ + #Left and Right keyboard input, only change if X direction is 0 +** Processing line: ~ if 🕹.keyboard.key_held.left && 🎮.🚗.x == 0~ - Inside source: true *** True Line Result - update_ship_outputs(state.ship_red) -** Processing line: ~ outputs.sprites << [state.ship_blue.sprite, state.ship_red.sprite]~ + if 🕹.keyboard.key_held.left && 🎮.🚗.x == 0 +** Processing line: ~ 🎮.🚦 = [-1, 0]~ - Inside source: true *** True Line Result - outputs.sprites << [state.ship_blue.sprite, state.ship_red.sprite] -** Processing line: ~ outputs.labels << [state.ship_blue.label, state.ship_red.label]~ + 🎮.🚦 = [-1, 0] +** Processing line: ~ elsif 🕹.keyboard.key_held.right && 🎮.🚗.x == 0~ - Inside source: true *** True Line Result - outputs.labels << [state.ship_blue.label, state.ship_red.label] + elsif 🕹.keyboard.key_held.right && 🎮.🚗.x == 0 +** Processing line: ~ 🎮.🚦 = [1, 0]~ +- Inside source: true +*** True Line Result + 🎮.🚦 = [1, 0] ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -88760,158 +95759,198 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def render_instructions~ +** Processing line: ~ #Up and Down keyboard input, only change if Y direction is 0~ - Inside source: true *** True Line Result - def render_instructions -** Processing line: ~ return if state.ship_blue.dx > 0 || state.ship_blue.dy > 0 ||~ + #Up and Down keyboard input, only change if Y direction is 0 +** Processing line: ~ if 🕹.keyboard.key_held.up && 🎮.🚗.y == 0~ - Inside source: true *** True Line Result - return if state.ship_blue.dx > 0 || state.ship_blue.dy > 0 || -** Processing line: ~ state.ship_red.dx > 0 || state.ship_red.dy > 0 ||~ + if 🕹.keyboard.key_held.up && 🎮.🚗.y == 0 +** Processing line: ~ 🎮.🚦 = [0, 1]~ - Inside source: true *** True Line Result - state.ship_red.dx > 0 || state.ship_red.dy > 0 || -** Processing line: ~ state.flames.length > 0~ + 🎮.🚦 = [0, 1] +** Processing line: ~ elsif 🕹.keyboard.key_held.down && 🎮.🚗.y == 0~ - Inside source: true *** True Line Result - state.flames.length > 0 + elsif 🕹.keyboard.key_held.down && 🎮.🚗.y == 0 +** Processing line: ~ 🎮.🚦 = [0, -1]~ +- Inside source: true +*** True Line Result + 🎮.🚦 = [0, -1] +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ outputs.labels << [grid.left.shift_right(30),~ +** Processing line: ~ def defaults 🎮~ - Inside source: true *** True Line Result - outputs.labels << [grid.left.shift_right(30), -** Processing line: ~ grid.bottom.shift_up(30),~ + def defaults 🎮 +** Processing line: ~ #Playing field size~ - Inside source: true *** True Line Result - grid.bottom.shift_up(30), -** Processing line: ~ "Two gamepads needed to play. R1 to accelerate. Left and right on D-PAD to turn ship. Hold A to shoot. Press B to drop mines.",~ + #Playing field size +** Processing line: ~ 🎮.🗺 ||= [20, 20]~ - Inside source: true *** True Line Result - "Two gamepads needed to play. R1 to accelerate. Left and right on D-PAD to turn ship. Hold A to shoot. Press B to drop mines.", -** Processing line: ~ 0, 0, 255, 255, 255]~ + 🎮.🗺 ||= [20, 20] +** Processing line: ~ #Scale for drawing, screen height / Field height~ - Inside source: true *** True Line Result - 0, 0, 255, 255, 255] -** Processing line: ~ end~ + #Scale for drawing, screen height / Field height +** Processing line: ~ 🎮.⚖️ ||= 720 / 🎮.🗺.y~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + 🎮.⚖️ ||= 720 / 🎮.🗺.y +** Processing line: ~ #Offset, offset all rendering to the center of the screen~ - Inside source: true *** True Line Result - -** Processing line: ~ def calc~ + #Offset, offset all rendering to the center of the screen +** Processing line: ~ 🎮.⛓ ||= [(1280 - 720).fdiv(2), 0]~ - Inside source: true *** True Line Result - def calc -** Processing line: ~ calc_thrusts~ + 🎮.⛓ ||= [(1280 - 720).fdiv(2), 0] +** Processing line: ~ #Padding, make the snake body slightly smaller than the scale~ - Inside source: true *** True Line Result - calc_thrusts -** Processing line: ~ calc_ships~ + #Padding, make the snake body slightly smaller than the scale +** Processing line: ~ 🎮.🛶 ||= (🎮.⚖️ * 0.2).to_i~ - Inside source: true *** True Line Result - calc_ships -** Processing line: ~ calc_bullets~ + 🎮.🛶 ||= (🎮.⚖️ * 0.2).to_i +** Processing line: ~ #Snake Size~ - Inside source: true *** True Line Result - calc_bullets -** Processing line: ~ calc_winner~ + #Snake Size +** Processing line: ~ 🎮.🛒 ||= 3~ - Inside source: true *** True Line Result - calc_winner -** Processing line: ~ end~ + 🎮.🛒 ||= 3 +** Processing line: ~ #Snake head, the only part we are actually controlling~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + #Snake head, the only part we are actually controlling +** Processing line: ~ 🎮.🤖 ||= [🎮.🗺.x / 2, 🎮.🗺.y / 2]~ - Inside source: true *** True Line Result - -** Processing line: ~ def input~ + 🎮.🤖 ||= [🎮.🗺.x / 2, 🎮.🗺.y / 2] +** Processing line: ~ #Snake body map, follows the head~ - Inside source: true *** True Line Result - def input -** Processing line: ~ input_accelerate~ + #Snake body map, follows the head +** Processing line: ~ 🎮.🐍 ||= []~ - Inside source: true *** True Line Result - input_accelerate -** Processing line: ~ input_turn~ + 🎮.🐍 ||= [] +** Processing line: ~ #Direction the head moves to~ - Inside source: true *** True Line Result - input_turn -** Processing line: ~ input_bullets_and_mines~ + #Direction the head moves to +** Processing line: ~ 🎮.🚗 ||= [0, 0]~ - Inside source: true *** True Line Result - input_bullets_and_mines -** Processing line: ~ end~ + 🎮.🚗 ||= [0, 0] +** Processing line: ~ #Next_Direction, during input check only change this variable and then when game updates asign this to Direction~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + #Next_Direction, during input check only change this variable and then when game updates asign this to Direction +** Processing line: ~ 🎮.🚦 ||= [*🎮.🚗]~ - Inside source: true *** True Line Result - -** Processing line: ~ def render_score~ + 🎮.🚦 ||= [*🎮.🚗] +** Processing line: ~ #Your score~ - Inside source: true *** True Line Result - def render_score -** Processing line: ~ outputs.labels << [grid.left.shift_right(80),~ + #Your score +** Processing line: ~ 🎮.💰 ||= 0~ - Inside source: true *** True Line Result - outputs.labels << [grid.left.shift_right(80), -** Processing line: ~ grid.top.shift_down(40),~ + 🎮.💰 ||= 0 +** Processing line: ~ #Spawns Food randomly~ - Inside source: true *** True Line Result - grid.top.shift_down(40), -** Processing line: ~ state.ship_blue_score, 30, 1, state.ship_blue.color]~ + #Spawns Food randomly +** Processing line: ~ spawn_🍎(🎮) unless 🎮.🍎?~ - Inside source: true *** True Line Result - state.ship_blue_score, 30, 1, state.ship_blue.color] + spawn_🍎(🎮) unless 🎮.🍎? +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ outputs.labels << [grid.right.shift_left(80),~ -- Inside source: true +** Processing line: ~#+end_src~ +- Line was identified as the end of a code block. *** True Line Result - outputs.labels << [grid.right.shift_left(80), -** Processing line: ~ grid.top.shift_down(40),~ +#+end_src +** Processing line: ~~ +- End of paragraph detected. +*** True Line Result + +** Processing line: ~*** Arcade - Solar System - main.rb~ +- Header detected. +*** True Line Result + +*** True Line Result +*** Arcade - Solar System - main.rb +** Processing line: ~#+begin_src ruby~ +- Line was identified as the beginning of a code block. +*** True Line Result + +*** True Line Result +#+begin_src ruby +** Processing line: ~ # ./samples/99_genre_arcade/solar_system/app/main.rb~ - Inside source: true *** True Line Result - grid.top.shift_down(40), -** Processing line: ~ state.ship_red_score, 30, 1, state.ship_red.color]~ + # ./samples/99_genre_arcade/solar_system/app/main.rb +** Processing line: ~ # Focused tutorial video: https://s3.amazonaws.com/s3.dragonruby.org/dragonruby-nddnug-workshop.mp4~ - Inside source: true *** True Line Result - state.ship_red_score, 30, 1, state.ship_red.color] -** Processing line: ~ end~ + # Focused tutorial video: https://s3.amazonaws.com/s3.dragonruby.org/dragonruby-nddnug-workshop.mp4 +** Processing line: ~ # Workshop/Presentation which provides motivation for creating a game engine: https://www.youtube.com/watch?v=S3CFce1arC8~ - Inside source: true *** True Line Result - end + # Workshop/Presentation which provides motivation for creating a game engine: https://www.youtube.com/watch?v=S3CFce1arC8 ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def render_universe~ +** Processing line: ~ def defaults args~ - Inside source: true *** True Line Result - def render_universe -** Processing line: ~ return if outputs.static_solids.any?~ + def defaults args +** Processing line: ~ args.outputs.background_color = [0, 0, 0]~ - Inside source: true *** True Line Result - return if outputs.static_solids.any? -** Processing line: ~ outputs.static_solids << grid.rect~ + args.outputs.background_color = [0, 0, 0] +** Processing line: ~ args.state.x ||= 640~ - Inside source: true *** True Line Result - outputs.static_solids << grid.rect -** Processing line: ~ outputs.static_solids << state.stars~ + args.state.x ||= 640 +** Processing line: ~ args.state.y ||= 360~ - Inside source: true *** True Line Result - outputs.static_solids << state.stars + args.state.y ||= 360 +** Processing line: ~ args.state.stars ||= 100.map do~ +- Inside source: true +*** True Line Result + args.state.stars ||= 100.map do +** Processing line: ~ [1280 * rand, 720 * rand, rand.fdiv(10), 255 * rand, 255 * rand, 255 * rand]~ +- Inside source: true +*** True Line Result + [1280 * rand, 720 * rand, rand.fdiv(10), 255 * rand, 255 * rand, 255 * rand] ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -88920,22 +95959,18 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def apply_round_finished_alpha entity~ -- Inside source: true -*** True Line Result - def apply_round_finished_alpha entity -** Processing line: ~ return entity unless state.round_finished_debounce~ +** Processing line: ~ args.state.sun ||= args.state.new_entity(:sun) do |s|~ - Inside source: true *** True Line Result - return entity unless state.round_finished_debounce -** Processing line: ~ entity.a *= state.round_finished_debounce.percentage_of(2.seconds)~ + args.state.sun ||= args.state.new_entity(:sun) do |s| +** Processing line: ~ s.s = 100~ - Inside source: true *** True Line Result - entity.a *= state.round_finished_debounce.percentage_of(2.seconds) -** Processing line: ~ return entity~ + s.s = 100 +** Processing line: ~ s.path = 'sprites/sun.png'~ - Inside source: true *** True Line Result - return entity + s.path = 'sprites/sun.png' ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -88944,74 +95979,70 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def update_ship_outputs ship, sprite_size = 66~ -- Inside source: true -*** True Line Result - def update_ship_outputs ship, sprite_size = 66 -** Processing line: ~ ship.sprite =~ +** Processing line: ~ args.state.planets = [~ - Inside source: true *** True Line Result - ship.sprite = -** Processing line: ~ apply_round_finished_alpha [sprite_size.to_square(ship.x, ship.y),~ + args.state.planets = [ +** Processing line: ~ [:mercury, 65, 5, 88],~ - Inside source: true *** True Line Result - apply_round_finished_alpha [sprite_size.to_square(ship.x, ship.y), -** Processing line: ~ ship.sprite_path,~ + [:mercury, 65, 5, 88], +** Processing line: ~ [:venus, 100, 10, 225],~ - Inside source: true *** True Line Result - ship.sprite_path, -** Processing line: ~ ship.angle,~ + [:venus, 100, 10, 225], +** Processing line: ~ [:earth, 120, 10, 365],~ - Inside source: true *** True Line Result - ship.angle, -** Processing line: ~ ship.dead ? 0 : 255 * ship.created_at.ease(2.seconds)].sprite~ + [:earth, 120, 10, 365], +** Processing line: ~ [:mars, 140, 8, 687],~ - Inside source: true *** True Line Result - ship.dead ? 0 : 255 * ship.created_at.ease(2.seconds)].sprite -** Processing line: ~ ship.label =~ + [:mars, 140, 8, 687], +** Processing line: ~ [:jupiter, 280, 30, 365 * 11.8],~ - Inside source: true *** True Line Result - ship.label = -** Processing line: ~ apply_round_finished_alpha [ship.x,~ + [:jupiter, 280, 30, 365 * 11.8], +** Processing line: ~ [:saturn, 350, 20, 365 * 29.5],~ - Inside source: true *** True Line Result - apply_round_finished_alpha [ship.x, -** Processing line: ~ ship.y + 100,~ + [:saturn, 350, 20, 365 * 29.5], +** Processing line: ~ [:uranus, 400, 15, 365 * 84],~ - Inside source: true *** True Line Result - ship.y + 100, -** Processing line: ~ "." * 5.minus(ship.damage).greater(0), 20, 1, ship.color, 255].label~ + [:uranus, 400, 15, 365 * 84], +** Processing line: ~ [:neptune, 440, 15, 365 * 164.8],~ - Inside source: true *** True Line Result - "." * 5.minus(ship.damage).greater(0), 20, 1, ship.color, 255].label -** Processing line: ~ end~ + [:neptune, 440, 15, 365 * 164.8], +** Processing line: ~ [:pluto, 480, 5, 365 * 247.8],~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + [:pluto, 480, 5, 365 * 247.8], +** Processing line: ~ ].map do |name, distance, size, year_in_days|~ - Inside source: true *** True Line Result - -** Processing line: ~ def render_flames sprite_size = 6~ + ].map do |name, distance, size, year_in_days| +** Processing line: ~ args.state.new_entity(name) do |p|~ - Inside source: true *** True Line Result - def render_flames sprite_size = 6 -** Processing line: ~ outputs.sprites << state.flames.map do |p|~ + args.state.new_entity(name) do |p| +** Processing line: ~ p.path = "sprites/#{name}.png"~ - Inside source: true *** True Line Result - outputs.sprites << state.flames.map do |p| -** Processing line: ~ apply_round_finished_alpha [sprite_size.to_square(p.x, p.y),~ + p.path = "sprites/#{name}.png" +** Processing line: ~ p.distance = distance * 0.7~ - Inside source: true *** True Line Result - apply_round_finished_alpha [sprite_size.to_square(p.x, p.y), -** Processing line: ~ 'sprites/flame.png', 0,~ + p.distance = distance * 0.7 +** Processing line: ~ p.s = size * 0.7~ - Inside source: true *** True Line Result - 'sprites/flame.png', 0, -** Processing line: ~ p.max_alpha * p.created_at.ease(p.lifetime, :flip)].sprite~ + p.s = size * 0.7 +** Processing line: ~ p.year_in_days = year_in_days~ - Inside source: true *** True Line Result - p.max_alpha * p.created_at.ease(p.lifetime, :flip)].sprite + p.year_in_days = year_in_days ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -89024,126 +96055,122 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def render_bullets sprite_size = 10~ -- Inside source: true -*** True Line Result - def render_bullets sprite_size = 10 -** Processing line: ~ outputs.sprites << state.bullets.map do |b|~ -- Inside source: true -*** True Line Result - outputs.sprites << state.bullets.map do |b| -** Processing line: ~ apply_round_finished_alpha [b.sprite_size.to_square(b.x, b.y),~ +** Processing line: ~ args.state.ship ||= args.state.new_entity(:ship) do |s|~ - Inside source: true *** True Line Result - apply_round_finished_alpha [b.sprite_size.to_square(b.x, b.y), -** Processing line: ~ b.owner.bullet_sprite_path,~ + args.state.ship ||= args.state.new_entity(:ship) do |s| +** Processing line: ~ s.x = 1280 * rand~ - Inside source: true *** True Line Result - b.owner.bullet_sprite_path, -** Processing line: ~ 0, b.max_alpha].sprite~ + s.x = 1280 * rand +** Processing line: ~ s.y = 720 * rand~ - Inside source: true *** True Line Result - 0, b.max_alpha].sprite -** Processing line: ~ end~ + s.y = 720 * rand +** Processing line: ~ s.angle = 0~ - Inside source: true *** True Line Result - end + s.angle = 0 ** Processing line: ~ end~ - Inside source: true *** True Line Result end +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def wrap_location! location~ +** Processing line: ~ def to_sprite args, entity~ - Inside source: true *** True Line Result - def wrap_location! location -** Processing line: ~ location.x = grid.left if location.x > grid.right~ + def to_sprite args, entity +** Processing line: ~ x = 0~ - Inside source: true *** True Line Result - location.x = grid.left if location.x > grid.right -** Processing line: ~ location.x = grid.right if location.x < grid.left~ + x = 0 +** Processing line: ~ y = 0~ - Inside source: true *** True Line Result - location.x = grid.right if location.x < grid.left -** Processing line: ~ location.y = grid.top if location.y < grid.bottom~ + y = 0 +** Processing line: ~~ - Inside source: true *** True Line Result - location.y = grid.top if location.y < grid.bottom -** Processing line: ~ location.y = grid.bottom if location.y > grid.top~ + +** Processing line: ~ if entity.year_in_days~ - Inside source: true *** True Line Result - location.y = grid.bottom if location.y > grid.top -** Processing line: ~ location~ + if entity.year_in_days +** Processing line: ~ day = args.state.tick_count~ - Inside source: true *** True Line Result - location -** Processing line: ~ end~ + day = args.state.tick_count +** Processing line: ~ day_in_year = day % entity.year_in_days~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + day_in_year = day % entity.year_in_days +** Processing line: ~ entity.random_start_day ||= day_in_year * rand~ - Inside source: true *** True Line Result - -** Processing line: ~ def calc_thrusts~ + entity.random_start_day ||= day_in_year * rand +** Processing line: ~ percentage_of_year = day_in_year.fdiv(entity.year_in_days)~ - Inside source: true *** True Line Result - def calc_thrusts -** Processing line: ~ state.flames =~ + percentage_of_year = day_in_year.fdiv(entity.year_in_days) +** Processing line: ~ angle = 365 * percentage_of_year~ - Inside source: true *** True Line Result - state.flames = -** Processing line: ~ state.flames~ + angle = 365 * percentage_of_year +** Processing line: ~ x = angle.vector_x(entity.distance)~ - Inside source: true *** True Line Result - state.flames -** Processing line: ~ .reject(&:old?)~ + x = angle.vector_x(entity.distance) +** Processing line: ~ y = angle.vector_y(entity.distance)~ - Inside source: true *** True Line Result - .reject(&:old?) -** Processing line: ~ .map do |p|~ + y = angle.vector_y(entity.distance) +** Processing line: ~ end~ - Inside source: true *** True Line Result - .map do |p| -** Processing line: ~ p.speed *= 0.9~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - p.speed *= 0.9 -** Processing line: ~ p.y += p.angle.vector_y(p.speed)~ + +** Processing line: ~ [640 + x - entity.s.half, 360 + y - entity.s.half, entity.s, entity.s, entity.path]~ - Inside source: true *** True Line Result - p.y += p.angle.vector_y(p.speed) -** Processing line: ~ p.x += p.angle.vector_x(p.speed)~ + [640 + x - entity.s.half, 360 + y - entity.s.half, entity.s, entity.s, entity.path] +** Processing line: ~ end~ - Inside source: true *** True Line Result - p.x += p.angle.vector_x(p.speed) -** Processing line: ~ wrap_location! p~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - wrap_location! p -** Processing line: ~ end~ + +** Processing line: ~ def render args~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + def render args +** Processing line: ~ args.outputs.solids << [0, 0, 1280, 720]~ - Inside source: true *** True Line Result - end + args.outputs.solids << [0, 0, 1280, 720] ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def all_ships~ +** Processing line: ~ args.outputs.sprites << args.state.stars.map do |x, y, _, r, g, b|~ - Inside source: true *** True Line Result - def all_ships -** Processing line: ~ [state.ship_blue, state.ship_red]~ + args.outputs.sprites << args.state.stars.map do |x, y, _, r, g, b| +** Processing line: ~ [x, y, 10, 10, 'sprites/star.png', 0, 100, r, g, b]~ - Inside source: true *** True Line Result - [state.ship_blue, state.ship_red] + [x, y, 10, 10, 'sprites/star.png', 0, 100, r, g, b] ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -89152,78 +96179,102 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def alive_ships~ +** Processing line: ~ args.outputs.sprites << to_sprite(args, args.state.sun)~ - Inside source: true *** True Line Result - def alive_ships -** Processing line: ~ all_ships.reject { |s| s.dead }~ + args.outputs.sprites << to_sprite(args, args.state.sun) +** Processing line: ~ args.outputs.sprites << args.state.planets.map { |p| to_sprite args, p }~ - Inside source: true *** True Line Result - all_ships.reject { |s| s.dead } -** Processing line: ~ end~ + args.outputs.sprites << args.state.planets.map { |p| to_sprite args, p } +** Processing line: ~ args.outputs.sprites << [args.state.ship.x, args.state.ship.y, 20, 20, 'sprites/ship.png', args.state.ship.angle]~ - Inside source: true *** True Line Result - end + args.outputs.sprites << [args.state.ship.x, args.state.ship.y, 20, 20, 'sprites/ship.png', args.state.ship.angle] +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def calc_bullet bullet~ +** Processing line: ~ def calc args~ - Inside source: true *** True Line Result - def calc_bullet bullet -** Processing line: ~ bullet.y += bullet.angle.vector_y(bullet.speed)~ + def calc args +** Processing line: ~ args.state.stars = args.state.stars.map do |x, y, speed, r, g, b|~ - Inside source: true *** True Line Result - bullet.y += bullet.angle.vector_y(bullet.speed) -** Processing line: ~ bullet.x += bullet.angle.vector_x(bullet.speed)~ + args.state.stars = args.state.stars.map do |x, y, speed, r, g, b| +** Processing line: ~ x += speed~ - Inside source: true *** True Line Result - bullet.x += bullet.angle.vector_x(bullet.speed) -** Processing line: ~ wrap_location! bullet~ + x += speed +** Processing line: ~ y += speed~ - Inside source: true *** True Line Result - wrap_location! bullet -** Processing line: ~ explode_bullet! bullet if bullet.old?~ + y += speed +** Processing line: ~ x = 0 if x > 1280~ - Inside source: true *** True Line Result - explode_bullet! bullet if bullet.old? -** Processing line: ~ return if bullet.exploded~ + x = 0 if x > 1280 +** Processing line: ~ y = 0 if y > 720~ - Inside source: true *** True Line Result - return if bullet.exploded -** Processing line: ~ return if state.round_finished~ + y = 0 if y > 720 +** Processing line: ~ [x, y, speed, r, g, b]~ - Inside source: true *** True Line Result - return if state.round_finished -** Processing line: ~ alive_ships.each do |s|~ + [x, y, speed, r, g, b] +** Processing line: ~ end~ - Inside source: true *** True Line Result - alive_ships.each do |s| -** Processing line: ~ if s != bullet.owner &&~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - if s != bullet.owner && -** Processing line: ~ s.sprite.intersect_rect?(bullet.sprite_size.to_square(bullet.x, bullet.y))~ + +** Processing line: ~ if args.state.tick_count == 0~ - Inside source: true *** True Line Result - s.sprite.intersect_rect?(bullet.sprite_size.to_square(bullet.x, bullet.y)) -** Processing line: ~ explode_bullet! bullet, 10, 5, 30~ + if args.state.tick_count == 0 +** Processing line: ~ args.outputs.sounds << 'sounds/bg.ogg'~ - Inside source: true *** True Line Result - explode_bullet! bullet, 10, 5, 30 -** Processing line: ~ s.damage += 1~ + args.outputs.sounds << 'sounds/bg.ogg' +** Processing line: ~ end~ - Inside source: true *** True Line Result - s.damage += 1 -** Processing line: ~ end~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - end + +** Processing line: ~ def process_inputs args~ +- Inside source: true +*** True Line Result + def process_inputs args +** Processing line: ~ if args.inputs.keyboard.left || args.inputs.controller_one.key_held.left~ +- Inside source: true +*** True Line Result + if args.inputs.keyboard.left || args.inputs.controller_one.key_held.left +** Processing line: ~ args.state.ship.angle += 1~ +- Inside source: true +*** True Line Result + args.state.ship.angle += 1 +** Processing line: ~ elsif args.inputs.keyboard.right || args.inputs.controller_one.key_held.right~ +- Inside source: true +*** True Line Result + elsif args.inputs.keyboard.right || args.inputs.controller_one.key_held.right +** Processing line: ~ args.state.ship.angle -= 1~ +- Inside source: true +*** True Line Result + args.state.ship.angle -= 1 ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -89232,382 +96283,402 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def calc_bullets~ +** Processing line: ~ if args.inputs.keyboard.up || args.inputs.controller_one.key_held.a~ - Inside source: true *** True Line Result - def calc_bullets -** Processing line: ~ state.bullets.each { |b| calc_bullet b }~ + if args.inputs.keyboard.up || args.inputs.controller_one.key_held.a +** Processing line: ~ args.state.ship.x += args.state.ship.angle.x_vector~ - Inside source: true *** True Line Result - state.bullets.each { |b| calc_bullet b } -** Processing line: ~ state.bullets.reject! { |b| b.exploded }~ + args.state.ship.x += args.state.ship.angle.x_vector +** Processing line: ~ args.state.ship.y += args.state.ship.angle.y_vector~ - Inside source: true *** True Line Result - state.bullets.reject! { |b| b.exploded } + args.state.ship.y += args.state.ship.angle.y_vector ** Processing line: ~ end~ - Inside source: true *** True Line Result end +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def create_explosion! type, entity, flame_count, max_speed, lifetime, max_alpha = 255~ +** Processing line: ~ def tick args~ - Inside source: true *** True Line Result - def create_explosion! type, entity, flame_count, max_speed, lifetime, max_alpha = 255 -** Processing line: ~ flame_count.times do~ + def tick args +** Processing line: ~ defaults args~ - Inside source: true *** True Line Result - flame_count.times do -** Processing line: ~ state.flames << state.new_entity(type,~ + defaults args +** Processing line: ~ render args~ - Inside source: true *** True Line Result - state.flames << state.new_entity(type, -** Processing line: ~ { angle: 360.randomize(:ratio),~ + render args +** Processing line: ~ calc args~ - Inside source: true *** True Line Result - { angle: 360.randomize(:ratio), -** Processing line: ~ speed: max_speed.randomize(:ratio),~ + calc args +** Processing line: ~ process_inputs args~ - Inside source: true *** True Line Result - speed: max_speed.randomize(:ratio), -** Processing line: ~ lifetime: lifetime,~ + process_inputs args +** Processing line: ~ end~ - Inside source: true *** True Line Result - lifetime: lifetime, -** Processing line: ~ x: entity.x,~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - x: entity.x, -** Processing line: ~ y: entity.y,~ + +** Processing line: ~ def r~ - Inside source: true *** True Line Result - y: entity.y, -** Processing line: ~ max_alpha: max_alpha })~ + def r +** Processing line: ~ $gtk.reset~ - Inside source: true *** True Line Result - max_alpha: max_alpha }) -** Processing line: ~ end~ + $gtk.reset +** Processing line: ~ end~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - end + +** Processing line: ~#+end_src~ +- Line was identified as the end of a code block. +*** True Line Result +#+end_src ** Processing line: ~~ -- Inside source: true +- End of paragraph detected. *** True Line Result -** Processing line: ~ def explode_bullet! bullet, flame_override = 5, max_speed = 5, lifetime = 10~ -- Inside source: true +** Processing line: ~*** Arcade - Sound Golf - main.rb~ +- Header detected. *** True Line Result - def explode_bullet! bullet, flame_override = 5, max_speed = 5, lifetime = 10 -** Processing line: ~ bullet.exploded = true~ + +*** True Line Result +*** Arcade - Sound Golf - main.rb +** Processing line: ~#+begin_src ruby~ +- Line was identified as the beginning of a code block. +*** True Line Result + +*** True Line Result +#+begin_src ruby +** Processing line: ~ # ./samples/99_genre_arcade/sound_golf/app/main.rb~ - Inside source: true *** True Line Result - bullet.exploded = true -** Processing line: ~ create_explosion! :bullet_explosion,~ + # ./samples/99_genre_arcade/sound_golf/app/main.rb +** Processing line: ~ =begin~ - Inside source: true *** True Line Result - create_explosion! :bullet_explosion, -** Processing line: ~ bullet,~ + =begin +** Processing line: ~~ - Inside source: true *** True Line Result - bullet, -** Processing line: ~ flame_override,~ + +** Processing line: ~ APIs Listing that haven't been encountered in previous sample apps:~ - Inside source: true *** True Line Result - flame_override, -** Processing line: ~ max_speed,~ + APIs Listing that haven't been encountered in previous sample apps: +** Processing line: ~~ - Inside source: true *** True Line Result - max_speed, -** Processing line: ~ lifetime,~ + +** Processing line: ~ - sample: Chooses random element from array.~ - Inside source: true *** True Line Result - lifetime, -** Processing line: ~ bullet.max_alpha~ + - sample: Chooses random element from array. +** Processing line: ~ In this sample app, the target note is set by taking a sample from the collection~ - Inside source: true *** True Line Result - bullet.max_alpha -** Processing line: ~ end~ + In this sample app, the target note is set by taking a sample from the collection +** Processing line: ~ of available notes.~ - Inside source: true *** True Line Result - end + of available notes. ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def calc_ship ship~ +** Processing line: ~ Reminders:~ - Inside source: true *** True Line Result - def calc_ship ship -** Processing line: ~ ship.x += ship.dx~ + Reminders: +** Processing line: ~ - args.grid.(left|right|top|bottom): Pixel value for the boundaries of the virtual~ - Inside source: true *** True Line Result - ship.x += ship.dx -** Processing line: ~ ship.y += ship.dy~ + - args.grid.(left|right|top|bottom): Pixel value for the boundaries of the virtual +** Processing line: ~ 720 p screen (Dragon Ruby Game Toolkits's virtual resolution is always 1280x720).~ - Inside source: true *** True Line Result - ship.y += ship.dy -** Processing line: ~ wrap_location! ship~ + 720 p screen (Dragon Ruby Game Toolkits's virtual resolution is always 1280x720). +** Processing line: ~~ - Inside source: true *** True Line Result - wrap_location! ship -** Processing line: ~ end~ + +** Processing line: ~ - args.state.new_entity: Used when we want to create a new object, like a sprite or button.~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + - args.state.new_entity: Used when we want to create a new object, like a sprite or button. +** Processing line: ~ For example, if we want to create a new button, we would declare it as a new entity and~ - Inside source: true *** True Line Result - -** Processing line: ~ def calc_ships~ + For example, if we want to create a new button, we would declare it as a new entity and +** Processing line: ~ then define its properties.~ - Inside source: true *** True Line Result - def calc_ships -** Processing line: ~ all_ships.each { |s| calc_ship s }~ + then define its properties. +** Processing line: ~~ - Inside source: true *** True Line Result - all_ships.each { |s| calc_ship s } -** Processing line: ~ return if all_ships.any? { |s| s.dead }~ + +** Processing line: ~ - String interpolation: Uses #{} syntax; everything between the #{ and the } is evaluated~ - Inside source: true *** True Line Result - return if all_ships.any? { |s| s.dead } -** Processing line: ~ return if state.round_finished~ + - String interpolation: Uses #{} syntax; everything between the #{ and the } is evaluated +** Processing line: ~ as Ruby code, and the placeholder is replaced with its corresponding value or result.~ - Inside source: true *** True Line Result - return if state.round_finished -** Processing line: ~ return unless state.ship_blue.sprite.intersect_rect?(state.ship_red.sprite)~ + as Ruby code, and the placeholder is replaced with its corresponding value or result. +** Processing line: ~~ - Inside source: true *** True Line Result - return unless state.ship_blue.sprite.intersect_rect?(state.ship_red.sprite) -** Processing line: ~ state.ship_blue.damage = 5~ + +** Processing line: ~ - args.outputs.labels: An array. The values generate a label.~ - Inside source: true *** True Line Result - state.ship_blue.damage = 5 -** Processing line: ~ state.ship_red.damage = 5~ + - args.outputs.labels: An array. The values generate a label. +** Processing line: ~ The parameters are [X, Y, TEXT, SIZE, ALIGNMENT, RED, GREEN, BLUE, ALPHA, FONT STYLE]~ - Inside source: true *** True Line Result - state.ship_red.damage = 5 -** Processing line: ~ end~ + The parameters are [X, Y, TEXT, SIZE, ALIGNMENT, RED, GREEN, BLUE, ALPHA, FONT STYLE] +** Processing line: ~ For more information about labels, go to mygame/documentation/02-labels.md.~ - Inside source: true *** True Line Result - end + For more information about labels, go to mygame/documentation/02-labels.md. ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def create_thruster_flames! ship~ +** Processing line: ~ - find_all: Finds all elements from a collection that meet a certain requirements (and excludes the ones that don't).~ - Inside source: true *** True Line Result - def create_thruster_flames! ship -** Processing line: ~ state.flames << state.new_entity(:ship_thruster,~ + - find_all: Finds all elements from a collection that meet a certain requirements (and excludes the ones that don't). +** Processing line: ~~ - Inside source: true *** True Line Result - state.flames << state.new_entity(:ship_thruster, -** Processing line: ~ { angle: ship.angle + 180 + 60.randomize(:sign, :ratio),~ + +** Processing line: ~ - first: Returns the first element of an array.~ - Inside source: true *** True Line Result - { angle: ship.angle + 180 + 60.randomize(:sign, :ratio), -** Processing line: ~ speed: 5.randomize(:ratio),~ + - first: Returns the first element of an array. +** Processing line: ~~ - Inside source: true *** True Line Result - speed: 5.randomize(:ratio), -** Processing line: ~ max_alpha: 255 * ship.created_at_elapsed.percentage_of(2.seconds),~ + +** Processing line: ~ - inside_rect: Returns true or false depending on if the point is inside the rect.~ - Inside source: true *** True Line Result - max_alpha: 255 * ship.created_at_elapsed.percentage_of(2.seconds), -** Processing line: ~ lifetime: 30,~ + - inside_rect: Returns true or false depending on if the point is inside the rect. +** Processing line: ~~ - Inside source: true *** True Line Result - lifetime: 30, -** Processing line: ~ x: ship.x - ship.angle.vector_x(40) + 5.randomize(:sign, :ratio),~ + +** Processing line: ~ - to_sym: Returns symbol corresponding to string. Will create a symbol if it does~ - Inside source: true *** True Line Result - x: ship.x - ship.angle.vector_x(40) + 5.randomize(:sign, :ratio), -** Processing line: ~ y: ship.y - ship.angle.vector_y(40) + 5.randomize(:sign, :ratio) })~ + - to_sym: Returns symbol corresponding to string. Will create a symbol if it does +** Processing line: ~ not already exist.~ - Inside source: true *** True Line Result - y: ship.y - ship.angle.vector_y(40) + 5.randomize(:sign, :ratio) }) -** Processing line: ~ end~ + not already exist. +** Processing line: ~~ - Inside source: true *** True Line Result - end + +** Processing line: ~ =end~ +- Inside source: true +*** True Line Result + =end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def input_accelerate_ship should_move_ship, ship~ +** Processing line: ~ # This sample app allows users to test their musical skills by matching the piano sound that plays in each~ - Inside source: true *** True Line Result - def input_accelerate_ship should_move_ship, ship -** Processing line: ~ return if ship.dead~ + # This sample app allows users to test their musical skills by matching the piano sound that plays in each +** Processing line: ~ # level to the correct note.~ - Inside source: true *** True Line Result - return if ship.dead + # level to the correct note. ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ should_move_ship &&= (ship.dx + ship.dy).abs < 5~ +** Processing line: ~ # Runs all the methods necessary for the game to function properly.~ - Inside source: true *** True Line Result - should_move_ship &&= (ship.dx + ship.dy).abs < 5 -** Processing line: ~~ + # Runs all the methods necessary for the game to function properly. +** Processing line: ~ def tick args~ - Inside source: true *** True Line Result - -** Processing line: ~ if should_move_ship~ + def tick args +** Processing line: ~ defaults args~ - Inside source: true *** True Line Result - if should_move_ship -** Processing line: ~ create_thruster_flames! ship~ + defaults args +** Processing line: ~ render args~ - Inside source: true *** True Line Result - create_thruster_flames! ship -** Processing line: ~ ship.dx += ship.angle.vector_x 0.050~ + render args +** Processing line: ~ calc args~ - Inside source: true *** True Line Result - ship.dx += ship.angle.vector_x 0.050 -** Processing line: ~ ship.dy += ship.angle.vector_y 0.050~ + calc args +** Processing line: ~ input_mouse args~ - Inside source: true *** True Line Result - ship.dy += ship.angle.vector_y 0.050 -** Processing line: ~ else~ + input_mouse args +** Processing line: ~ tick_instructions args, "Sample app shows how to play sounds. args.outputs.sounds << \"path_to_wav.wav\""~ - Inside source: true *** True Line Result - else -** Processing line: ~ ship.dx *= 0.99~ + tick_instructions args, "Sample app shows how to play sounds. args.outputs.sounds << \"path_to_wav.wav\"" +** Processing line: ~ end~ - Inside source: true *** True Line Result - ship.dx *= 0.99 -** Processing line: ~ ship.dy *= 0.99~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - ship.dy *= 0.99 -** Processing line: ~ end~ + +** Processing line: ~ # Sets default values and creates empty collections~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + # Sets default values and creates empty collections +** Processing line: ~ # Initialization happens in the first frame only~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + # Initialization happens in the first frame only +** Processing line: ~ def defaults args~ - Inside source: true *** True Line Result - -** Processing line: ~ def input_accelerate~ + def defaults args +** Processing line: ~ args.state.notes ||= []~ - Inside source: true *** True Line Result - def input_accelerate -** Processing line: ~ input_accelerate_ship inputs.controller_one.key_held.r1 || inputs.keyboard.up, state.ship_blue~ + args.state.notes ||= [] +** Processing line: ~ args.state.click_feedbacks ||= []~ - Inside source: true *** True Line Result - input_accelerate_ship inputs.controller_one.key_held.r1 || inputs.keyboard.up, state.ship_blue -** Processing line: ~ input_accelerate_ship inputs.controller_two.key_held.r1, state.ship_red~ + args.state.click_feedbacks ||= [] +** Processing line: ~ args.state.current_level ||= 1~ - Inside source: true *** True Line Result - input_accelerate_ship inputs.controller_two.key_held.r1, state.ship_red -** Processing line: ~ end~ + args.state.current_level ||= 1 +** Processing line: ~ args.state.times_wrong ||= 0 # when game starts, user hasn't guessed wrong yet~ - Inside source: true *** True Line Result - end + args.state.times_wrong ||= 0 # when game starts, user hasn't guessed wrong yet +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def input_turn_ship direction, ship~ +** Processing line: ~ # Uses a label to display current level, and shows the score~ - Inside source: true *** True Line Result - def input_turn_ship direction, ship -** Processing line: ~ ship.angle -= 3 * direction~ + # Uses a label to display current level, and shows the score +** Processing line: ~ # Creates a button to play the sample note, and displays the available notes that could be a potential match~ - Inside source: true *** True Line Result - ship.angle -= 3 * direction -** Processing line: ~ end~ + # Creates a button to play the sample note, and displays the available notes that could be a potential match +** Processing line: ~ def render args~ - Inside source: true *** True Line Result - end + def render args ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def input_turn~ +** Processing line: ~ # grid.w_half positions the label in the horizontal center of the screen.~ - Inside source: true *** True Line Result - def input_turn -** Processing line: ~ input_turn_ship inputs.controller_one.left_right + inputs.keyboard.left_right, state.ship_blue~ + # grid.w_half positions the label in the horizontal center of the screen. +** Processing line: ~ args.outputs.labels << [args.grid.w_half, args.grid.top.shift_down(40), "Hole #{args.state.current_level} of 9", 0, 1, 0, 0, 0]~ - Inside source: true *** True Line Result - input_turn_ship inputs.controller_one.left_right + inputs.keyboard.left_right, state.ship_blue -** Processing line: ~ input_turn_ship inputs.controller_two.left_right, state.ship_red~ + args.outputs.labels << [args.grid.w_half, args.grid.top.shift_down(40), "Hole #{args.state.current_level} of 9", 0, 1, 0, 0, 0] +** Processing line: ~~ - Inside source: true *** True Line Result - input_turn_ship inputs.controller_two.left_right, state.ship_red -** Processing line: ~ end~ + +** Processing line: ~ render_score args # shows score on screen~ - Inside source: true *** True Line Result - end + render_score args # shows score on screen ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def input_bullet create_bullet, ship~ -- Inside source: true -*** True Line Result - def input_bullet create_bullet, ship -** Processing line: ~ return unless create_bullet~ +** Processing line: ~ args.state.play_again_button ||= { x: 560, y: args.grid.h * 3 / 4 - 40, w: 160, h: 60, label: 'again' } # array definition, text/title~ - Inside source: true *** True Line Result - return unless create_bullet -** Processing line: ~ return if ship.dead~ + args.state.play_again_button ||= { x: 560, y: args.grid.h * 3 / 4 - 40, w: 160, h: 60, label: 'again' } # array definition, text/title +** Processing line: ~ args.state.play_note_button ||= { x: 560, y: args.grid.h * 3 / 4 - 40, w: 160, h: 60, label: 'play' }~ - Inside source: true *** True Line Result - return if ship.dead + args.state.play_note_button ||= { x: 560, y: args.grid.h * 3 / 4 - 40, w: 160, h: 60, label: 'play' } ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ state.bullets << state.new_entity(:ship_bullet,~ +** Processing line: ~ if args.state.game_over # if game is over, a "play again" button is shown~ - Inside source: true *** True Line Result - state.bullets << state.new_entity(:ship_bullet, -** Processing line: ~ { owner: ship,~ + if args.state.game_over # if game is over, a "play again" button is shown +** Processing line: ~ # Calculations ensure that Play Again label is displayed in center of border~ - Inside source: true *** True Line Result - { owner: ship, -** Processing line: ~ angle: ship.angle,~ + # Calculations ensure that Play Again label is displayed in center of border +** Processing line: ~ # Remove calculations from y parameters and see what happens to border and label placement~ - Inside source: true *** True Line Result - angle: ship.angle, -** Processing line: ~ max_alpha: 255 * ship.created_at_elapsed.percentage_of(2.seconds),~ + # Remove calculations from y parameters and see what happens to border and label placement +** Processing line: ~ args.outputs.labels << [args.grid.w_half, args.grid.h * 3 / 4, "Play Again", 0, 1, 0, 0, 0] # outputs label~ - Inside source: true *** True Line Result - max_alpha: 255 * ship.created_at_elapsed.percentage_of(2.seconds), -** Processing line: ~ speed: 5 + ship.dx.mult(ship.angle.vector_x) + ship.dy.mult(ship.angle.vector_y),~ + args.outputs.labels << [args.grid.w_half, args.grid.h * 3 / 4, "Play Again", 0, 1, 0, 0, 0] # outputs label +** Processing line: ~ args.outputs.borders << args.state.play_again_button # outputs border~ - Inside source: true *** True Line Result - speed: 5 + ship.dx.mult(ship.angle.vector_x) + ship.dy.mult(ship.angle.vector_y), -** Processing line: ~ lifetime: 120,~ + args.outputs.borders << args.state.play_again_button # outputs border +** Processing line: ~ else # otherwise, if game is not over~ - Inside source: true *** True Line Result - lifetime: 120, -** Processing line: ~ sprite_size: 10,~ + else # otherwise, if game is not over +** Processing line: ~ # Calculations ensure that label appears in center of border~ - Inside source: true *** True Line Result - sprite_size: 10, -** Processing line: ~ x: ship.x + ship.angle.vector_x * 32,~ + # Calculations ensure that label appears in center of border +** Processing line: ~ args.outputs.labels << [args.grid.w_half, args.grid.h * 3 / 4, "Play Note ##{args.state.current_level}", 0, 1, 0, 0, 0] # outputs label~ - Inside source: true *** True Line Result - x: ship.x + ship.angle.vector_x * 32, -** Processing line: ~ y: ship.y + ship.angle.vector_y * 32 })~ + args.outputs.labels << [args.grid.w_half, args.grid.h * 3 / 4, "Play Note ##{args.state.current_level}", 0, 1, 0, 0, 0] # outputs label +** Processing line: ~ args.outputs.borders << args.state.play_note_button # outputs border~ - Inside source: true *** True Line Result - y: ship.y + ship.angle.vector_y * 32 }) + args.outputs.borders << args.state.play_note_button # outputs border ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -89616,58 +96687,42 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def input_mine create_mine, ship~ -- Inside source: true -*** True Line Result - def input_mine create_mine, ship -** Processing line: ~ return unless create_mine~ -- Inside source: true -*** True Line Result - return unless create_mine -** Processing line: ~ return if ship.dead~ +** Processing line: ~ return if args.state.game_over # return if game is over~ - Inside source: true *** True Line Result - return if ship.dead + return if args.state.game_over # return if game is over ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ state.bullets << state.new_entity(:ship_bullet,~ -- Inside source: true -*** True Line Result - state.bullets << state.new_entity(:ship_bullet, -** Processing line: ~ { owner: ship,~ -- Inside source: true -*** True Line Result - { owner: ship, -** Processing line: ~ angle: 360.randomize(:sign, :ratio),~ +** Processing line: ~ args.outputs.labels << [args.grid.w_half, 400, "I think the note is a(n)...", 0, 1, 0, 0, 0] # outputs label~ - Inside source: true *** True Line Result - angle: 360.randomize(:sign, :ratio), -** Processing line: ~ max_alpha: 255 * ship.created_at_elapsed.percentage_of(2.seconds),~ + args.outputs.labels << [args.grid.w_half, 400, "I think the note is a(n)...", 0, 1, 0, 0, 0] # outputs label +** Processing line: ~~ - Inside source: true *** True Line Result - max_alpha: 255 * ship.created_at_elapsed.percentage_of(2.seconds), -** Processing line: ~ speed: 0.02,~ + +** Processing line: ~ # Shows all of the available notes that can be potential matches.~ - Inside source: true *** True Line Result - speed: 0.02, -** Processing line: ~ sprite_size: 10,~ + # Shows all of the available notes that can be potential matches. +** Processing line: ~ available_notes.each_with_index do |note, i|~ - Inside source: true *** True Line Result - sprite_size: 10, -** Processing line: ~ lifetime: 600,~ + available_notes.each_with_index do |note, i| +** Processing line: ~ args.state.notes[i] ||= piano_button(args, note, i + 1) # calls piano_button method on each note (creates label and border)~ - Inside source: true *** True Line Result - lifetime: 600, -** Processing line: ~ x: ship.x + ship.angle.vector_x * -50,~ + args.state.notes[i] ||= piano_button(args, note, i + 1) # calls piano_button method on each note (creates label and border) +** Processing line: ~ args.outputs.labels << args.state.notes[i].label # outputs note on screen with a label and a border~ - Inside source: true *** True Line Result - x: ship.x + ship.angle.vector_x * -50, -** Processing line: ~ y: ship.y + ship.angle.vector_y * -50 })~ + args.outputs.labels << args.state.notes[i].label # outputs note on screen with a label and a border +** Processing line: ~ args.outputs.borders << args.state.notes[i].border~ - Inside source: true *** True Line Result - y: ship.y + ship.angle.vector_y * -50 }) + args.outputs.borders << args.state.notes[i].border ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -89676,274 +96731,258 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def input_bullets_and_mines~ -- Inside source: true -*** True Line Result - def input_bullets_and_mines -** Processing line: ~ return if state.bullets.length > 100~ -- Inside source: true -*** True Line Result - return if state.bullets.length > 100 -** Processing line: ~~ +** Processing line: ~ # Shows whether or not the user is correct by filling the screen with either red or green~ - Inside source: true *** True Line Result - -** Processing line: ~ [~ + # Shows whether or not the user is correct by filling the screen with either red or green +** Processing line: ~ args.outputs.solids << args.state.click_feedbacks.map { |c| c.solid }~ - Inside source: true *** True Line Result - [ -** Processing line: ~ [inputs.controller_one.key_held.a || inputs.keyboard.key_held.space,~ + args.outputs.solids << args.state.click_feedbacks.map { |c| c.solid } +** Processing line: ~ end~ - Inside source: true *** True Line Result - [inputs.controller_one.key_held.a || inputs.keyboard.key_held.space, -** Processing line: ~ inputs.controller_one.key_down.b || inputs.keyboard.key_down.down,~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - inputs.controller_one.key_down.b || inputs.keyboard.key_down.down, -** Processing line: ~ state.ship_blue],~ + +** Processing line: ~ # Shows the score (number of times the user guesses wrong) onto the screen using labels.~ - Inside source: true *** True Line Result - state.ship_blue], -** Processing line: ~ [inputs.controller_two.key_held.a, inputs.controller_two.key_down.b, state.ship_red]~ + # Shows the score (number of times the user guesses wrong) onto the screen using labels. +** Processing line: ~ def render_score args~ - Inside source: true *** True Line Result - [inputs.controller_two.key_held.a, inputs.controller_two.key_down.b, state.ship_red] -** Processing line: ~ ].each do |a_held, b_down, ship|~ + def render_score args +** Processing line: ~ if args.state.times_wrong == 0 # if the user has guessed wrong zero times, the score is par~ - Inside source: true *** True Line Result - ].each do |a_held, b_down, ship| -** Processing line: ~ input_bullet(a_held && state.tick_count.mod_zero?(10).or(a_held == 0), ship)~ + if args.state.times_wrong == 0 # if the user has guessed wrong zero times, the score is par +** Processing line: ~ args.outputs.labels << [args.grid.w_half, args.grid.top.shift_down(80), "Score: PAR", 0, 1, 0, 0, 0]~ - Inside source: true *** True Line Result - input_bullet(a_held && state.tick_count.mod_zero?(10).or(a_held == 0), ship) -** Processing line: ~ input_mine(b_down, ship)~ + args.outputs.labels << [args.grid.w_half, args.grid.top.shift_down(80), "Score: PAR", 0, 1, 0, 0, 0] +** Processing line: ~ else # otherwise, number of times the user has guessed wrong is shown~ - Inside source: true *** True Line Result - input_mine(b_down, ship) -** Processing line: ~ end~ + else # otherwise, number of times the user has guessed wrong is shown +** Processing line: ~ args.outputs.labels << [args.grid.w_half, args.grid.top.shift_down(80), "Score: +#{args.state.times_wrong}", 0, 1, 0, 0, 0] # shows score using string interpolation~ - Inside source: true *** True Line Result - end + args.outputs.labels << [args.grid.w_half, args.grid.top.shift_down(80), "Score: +#{args.state.times_wrong}", 0, 1, 0, 0, 0] # shows score using string interpolation ** Processing line: ~ end~ - Inside source: true *** True Line Result end +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def calc_kill_ships~ +** Processing line: ~ # Sets the target note for the level and performs calculations on click_feedbacks.~ - Inside source: true *** True Line Result - def calc_kill_ships -** Processing line: ~ alive_ships.find_all { |s| s.damage >= 5 }.each do |s|~ + # Sets the target note for the level and performs calculations on click_feedbacks. +** Processing line: ~ def calc args~ - Inside source: true *** True Line Result - alive_ships.find_all { |s| s.damage >= 5 }.each do |s| -** Processing line: ~ s.dead = true~ + def calc args +** Processing line: ~ args.state.target_note ||= available_notes.sample # chooses a note from available_notes collection as target note~ - Inside source: true *** True Line Result - s.dead = true -** Processing line: ~ create_explosion! :ship_explosion, s, 20, 20, 30, s.max_alpha~ + args.state.target_note ||= available_notes.sample # chooses a note from available_notes collection as target note +** Processing line: ~ args.state.click_feedbacks.each { |c| c.solid[-1] -= 5 } # remove this line and solid color will remain on screen indefinitely~ - Inside source: true *** True Line Result - create_explosion! :ship_explosion, s, 20, 20, 30, s.max_alpha -** Processing line: ~ end~ + args.state.click_feedbacks.each { |c| c.solid[-1] -= 5 } # remove this line and solid color will remain on screen indefinitely +** Processing line: ~ # comment this line out and the solid color will keep flashing on screen instead of being removed from click_feedbacks collection~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + # comment this line out and the solid color will keep flashing on screen instead of being removed from click_feedbacks collection +** Processing line: ~ args.state.click_feedbacks.reject! { |c| c.solid[-1] <= 0 }~ - Inside source: true *** True Line Result - end + args.state.click_feedbacks.reject! { |c| c.solid[-1] <= 0 } +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def calc_score~ +** Processing line: ~ # Uses input from the user to play the target note, as well as the other notes that could be a potential match.~ - Inside source: true *** True Line Result - def calc_score -** Processing line: ~ return if state.round_finished~ + # Uses input from the user to play the target note, as well as the other notes that could be a potential match. +** Processing line: ~ def input_mouse args~ - Inside source: true *** True Line Result - return if state.round_finished -** Processing line: ~ return if alive_ships.length > 1~ + def input_mouse args +** Processing line: ~ return unless args.inputs.mouse.click # return unless the mouse is clicked~ - Inside source: true *** True Line Result - return if alive_ships.length > 1 + return unless args.inputs.mouse.click # return unless the mouse is clicked ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ if alive_ships.first == state.ship_red~ -- Inside source: true -*** True Line Result - if alive_ships.first == state.ship_red -** Processing line: ~ state.ship_red_score += 1~ +** Processing line: ~ # finds button that was clicked by user~ - Inside source: true *** True Line Result - state.ship_red_score += 1 -** Processing line: ~ elsif alive_ships.first == state.ship_blue~ + # finds button that was clicked by user +** Processing line: ~ button_clicked = args.outputs.borders.find_all do |b| # go through borders collection to find all borders that meet requirements~ - Inside source: true *** True Line Result - elsif alive_ships.first == state.ship_blue -** Processing line: ~ state.ship_blue_score += 1~ + button_clicked = args.outputs.borders.find_all do |b| # go through borders collection to find all borders that meet requirements +** Processing line: ~ args.inputs.mouse.click.point.inside_rect? b # find button border that mouse was clicked inside of~ - Inside source: true *** True Line Result - state.ship_blue_score += 1 -** Processing line: ~ end~ + args.inputs.mouse.click.point.inside_rect? b # find button border that mouse was clicked inside of +** Processing line: ~ end.find_all { |b| b.is_a? Hash }.first # reject, return first element~ - Inside source: true *** True Line Result - end + end.find_all { |b| b.is_a? Hash }.first # reject, return first element ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ state.round_finished = true~ -- Inside source: true -*** True Line Result - state.round_finished = true -** Processing line: ~ end~ +** Processing line: ~ return unless button_clicked # return unless button_clicked as a value (a button was clicked)~ - Inside source: true *** True Line Result - end + return unless button_clicked # return unless button_clicked as a value (a button was clicked) ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def calc_reset_ships~ -- Inside source: true -*** True Line Result - def calc_reset_ships -** Processing line: ~ return unless state.round_finished~ +** Processing line: ~ queue_click_feedback args, # calls queue_click_feedback method on the button that was clicked~ - Inside source: true *** True Line Result - return unless state.round_finished -** Processing line: ~ state.round_finished_debounce ||= 2.seconds~ + queue_click_feedback args, # calls queue_click_feedback method on the button that was clicked +** Processing line: ~ button_clicked.x,~ - Inside source: true *** True Line Result - state.round_finished_debounce ||= 2.seconds -** Processing line: ~ state.round_finished_debounce -= 1~ + button_clicked.x, +** Processing line: ~ button_clicked.y,~ - Inside source: true *** True Line Result - state.round_finished_debounce -= 1 -** Processing line: ~ return if state.round_finished_debounce > 0~ + button_clicked.y, +** Processing line: ~ button_clicked.w,~ - Inside source: true *** True Line Result - return if state.round_finished_debounce > 0 -** Processing line: ~ start_new_round!~ + button_clicked.w, +** Processing line: ~ button_clicked.h,~ - Inside source: true *** True Line Result - start_new_round! -** Processing line: ~ end~ + button_clicked.h, +** Processing line: ~ 150, 100, 200 # sets color of button to shade of purple~ - Inside source: true *** True Line Result - end + 150, 100, 200 # sets color of button to shade of purple ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def start_new_round!~ +** Processing line: ~ if button_clicked[:label] == 'play' # if "play note" button is pressed~ - Inside source: true *** True Line Result - def start_new_round! -** Processing line: ~ state.ship_blue = new_blue_ship~ + if button_clicked[:label] == 'play' # if "play note" button is pressed +** Processing line: ~ args.outputs.sounds << "sounds/#{args.state.target_note}.wav" # sound of target note is output~ - Inside source: true *** True Line Result - state.ship_blue = new_blue_ship -** Processing line: ~ state.ship_red = new_red_ship~ + args.outputs.sounds << "sounds/#{args.state.target_note}.wav" # sound of target note is output +** Processing line: ~ elsif button_clicked[:label] == 'again' # if "play game again" button is pressed~ - Inside source: true *** True Line Result - state.ship_red = new_red_ship -** Processing line: ~ state.round_finished = false~ + elsif button_clicked[:label] == 'again' # if "play game again" button is pressed +** Processing line: ~ args.state.target_note = nil # no target note~ - Inside source: true *** True Line Result - state.round_finished = false -** Processing line: ~ state.round_finished_debounce = nil~ + args.state.target_note = nil # no target note +** Processing line: ~ args.state.current_level = 1 # starts at level 1 again~ - Inside source: true *** True Line Result - state.round_finished_debounce = nil -** Processing line: ~ state.flames.clear~ + args.state.current_level = 1 # starts at level 1 again +** Processing line: ~ args.state.times_wrong = 0 # starts off with 0 wrong guesses~ - Inside source: true *** True Line Result - state.flames.clear -** Processing line: ~ state.bullets.clear~ + args.state.times_wrong = 0 # starts off with 0 wrong guesses +** Processing line: ~ args.state.game_over = false # the game is not over (because it has just been restarted)~ - Inside source: true *** True Line Result - state.bullets.clear -** Processing line: ~ end~ + args.state.game_over = false # the game is not over (because it has just been restarted) +** Processing line: ~ else # otherwise if neither of those buttons were pressed~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + else # otherwise if neither of those buttons were pressed +** Processing line: ~ args.outputs.sounds << "sounds/#{button_clicked[:label]}.wav" # sound of clicked note is played~ - Inside source: true *** True Line Result - -** Processing line: ~ def calc_winner~ + args.outputs.sounds << "sounds/#{button_clicked[:label]}.wav" # sound of clicked note is played +** Processing line: ~ if button_clicked[:label] == args.state.target_note # if clicked note is target note~ - Inside source: true *** True Line Result - def calc_winner -** Processing line: ~ calc_kill_ships~ + if button_clicked[:label] == args.state.target_note # if clicked note is target note +** Processing line: ~ args.state.target_note = nil # target note is emptied~ - Inside source: true *** True Line Result - calc_kill_ships -** Processing line: ~ calc_score~ + args.state.target_note = nil # target note is emptied +** Processing line: ~~ - Inside source: true *** True Line Result - calc_score -** Processing line: ~ calc_reset_ships~ + +** Processing line: ~ if args.state.current_level < 9 # if game hasn't reached level 9~ - Inside source: true *** True Line Result - calc_reset_ships -** Processing line: ~ end~ + if args.state.current_level < 9 # if game hasn't reached level 9 +** Processing line: ~ args.state.current_level += 1 # game goes to next level~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + args.state.current_level += 1 # game goes to next level +** Processing line: ~ else # otherwise, if game has reached level 9~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + else # otherwise, if game has reached level 9 +** Processing line: ~ args.state.game_over = true # the game is over~ - Inside source: true *** True Line Result - -** Processing line: ~ $dueling_spaceship = DuelingSpaceships.new~ + args.state.game_over = true # the game is over +** Processing line: ~ end~ - Inside source: true *** True Line Result - $dueling_spaceship = DuelingSpaceships.new + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def tick args~ -- Inside source: true -*** True Line Result - def tick args -** Processing line: ~ args.grid.origin_center!~ +** Processing line: ~ queue_click_feedback args, 0, 0, args.grid.w, args.grid.h, 100, 200, 100 # green shown if user guesses correctly~ - Inside source: true *** True Line Result - args.grid.origin_center! -** Processing line: ~ $dueling_spaceship.inputs = args.inputs~ + queue_click_feedback args, 0, 0, args.grid.w, args.grid.h, 100, 200, 100 # green shown if user guesses correctly +** Processing line: ~ else # otherwise, if clicked note is not target note~ - Inside source: true *** True Line Result - $dueling_spaceship.inputs = args.inputs -** Processing line: ~ $dueling_spaceship.outputs = args.outputs~ + else # otherwise, if clicked note is not target note +** Processing line: ~ args.state.times_wrong += 1 # increments times user guessed wrong~ - Inside source: true *** True Line Result - $dueling_spaceship.outputs = args.outputs -** Processing line: ~ $dueling_spaceship.state = args.state~ + args.state.times_wrong += 1 # increments times user guessed wrong +** Processing line: ~ queue_click_feedback args, 0, 0, args.grid.w, args.grid.h, 200, 100, 100 # red shown is user guesses wrong~ - Inside source: true *** True Line Result - $dueling_spaceship.state = args.state -** Processing line: ~ $dueling_spaceship.grid = args.grid~ + queue_click_feedback args, 0, 0, args.grid.w, args.grid.h, 200, 100, 100 # red shown is user guesses wrong +** Processing line: ~ end~ - Inside source: true *** True Line Result - $dueling_spaceship.grid = args.grid -** Processing line: ~ $dueling_spaceship.tick~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - $dueling_spaceship.tick + end ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -89952,1206 +96991,1194 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~#+end_src~ -- Line was identified as the end of a code block. -*** True Line Result -#+end_src -** Processing line: ~~ -- End of paragraph detected. -*** True Line Result - -** Processing line: ~*** arcade/flappy dragon/credits.txt~ -- Header detected. -*** True Line Result - -*** True Line Result -*** arcade/flappy dragon/credits.txt -** Processing line: ~#+begin_src ruby~ -- Line was identified as the beginning of a code block. -*** True Line Result - -*** True Line Result -#+begin_src ruby -** Processing line: ~ # ./samples/99_genre_arcade/flappy_dragon/CREDITS.txt~ +** Processing line: ~ # Creates a collection of all of the available notes as symbols~ - Inside source: true *** True Line Result - # ./samples/99_genre_arcade/flappy_dragon/CREDITS.txt -** Processing line: ~ code: Amir Rajan, https://twitter.com/amirrajan~ + # Creates a collection of all of the available notes as symbols +** Processing line: ~ def available_notes~ - Inside source: true *** True Line Result - code: Amir Rajan, https://twitter.com/amirrajan -** Processing line: ~ graphics and audio: Nick Culbertson, https://twitter.com/MobyPixel~ + def available_notes +** Processing line: ~ [:C3, :D3, :E3, :F3, :G3, :A3, :B3, :C4]~ - Inside source: true *** True Line Result - graphics and audio: Nick Culbertson, https://twitter.com/MobyPixel -** Processing line: ~~ + [:C3, :D3, :E3, :F3, :G3, :A3, :B3, :C4] +** Processing line: ~ end~ - Inside source: true *** True Line Result - + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~#+end_src~ -- Line was identified as the end of a code block. -*** True Line Result -#+end_src -** Processing line: ~~ -- End of paragraph detected. -*** True Line Result - -** Processing line: ~*** arcade/flappy dragon/main.rb~ -- Header detected. +** Processing line: ~ # Creates buttons for each note, and sets a label (the note's name) and border for each note's button.~ +- Inside source: true *** True Line Result - + # Creates buttons for each note, and sets a label (the note's name) and border for each note's button. +** Processing line: ~ def piano_button args, note, position~ +- Inside source: true *** True Line Result -*** arcade/flappy dragon/main.rb -** Processing line: ~#+begin_src ruby~ -- Line was identified as the beginning of a code block. + def piano_button args, note, position +** Processing line: ~ args.state.new_entity(:button) do |b| # declares button as new entity~ +- Inside source: true *** True Line Result - + args.state.new_entity(:button) do |b| # declares button as new entity +** Processing line: ~ b.label = [460 + 40.mult(position), args.grid.h * 0.4, "#{note}", 0, 1, 0, 0, 0] # label definition~ +- Inside source: true *** True Line Result -#+begin_src ruby -** Processing line: ~ # ./samples/99_genre_arcade/flappy_dragon/app/main.rb~ + b.label = [460 + 40.mult(position), args.grid.h * 0.4, "#{note}", 0, 1, 0, 0, 0] # label definition +** Processing line: ~ b.border = { x: 460 + 40.mult(position) - 20, y: args.grid.h * 0.4 - 32, w: 40, h: 40, label: note } # border definition, text/title; 20 subtracted so label is in center of border~ - Inside source: true *** True Line Result - # ./samples/99_genre_arcade/flappy_dragon/app/main.rb -** Processing line: ~ class FlappyDragon~ + b.border = { x: 460 + 40.mult(position) - 20, y: args.grid.h * 0.4 - 32, w: 40, h: 40, label: note } # border definition, text/title; 20 subtracted so label is in center of border +** Processing line: ~ end~ - Inside source: true *** True Line Result - class FlappyDragon -** Processing line: ~ attr_accessor :grid, :inputs, :state, :outputs~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - attr_accessor :grid, :inputs, :state, :outputs + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def tick~ +** Processing line: ~ # Color of click feedback changes depending on what button was clicked, and whether the guess is right or wrong~ - Inside source: true *** True Line Result - def tick -** Processing line: ~ defaults~ + # Color of click feedback changes depending on what button was clicked, and whether the guess is right or wrong +** Processing line: ~ # If a button is clicked, the inside of button is purple (see input_mouse method)~ - Inside source: true *** True Line Result - defaults -** Processing line: ~ render~ + # If a button is clicked, the inside of button is purple (see input_mouse method) +** Processing line: ~ # If correct note is clicked, screen turns green~ - Inside source: true *** True Line Result - render -** Processing line: ~ calc~ + # If correct note is clicked, screen turns green +** Processing line: ~ # If incorrect note is clicked, screen turns red (again, see input_mouse method)~ - Inside source: true *** True Line Result - calc -** Processing line: ~ process_inputs~ + # If incorrect note is clicked, screen turns red (again, see input_mouse method) +** Processing line: ~ def queue_click_feedback args, x, y, w, h, *color~ - Inside source: true *** True Line Result - process_inputs + def queue_click_feedback args, x, y, w, h, *color +** Processing line: ~ args.state.click_feedbacks << args.state.new_entity(:click_feedback) do |c| # declares feedback as new entity~ +- Inside source: true +*** True Line Result + args.state.click_feedbacks << args.state.new_entity(:click_feedback) do |c| # declares feedback as new entity +** Processing line: ~ c.solid = [x, y, w, h, *color, 255] # sets color~ +- Inside source: true +*** True Line Result + c.solid = [x, y, w, h, *color, 255] # sets color ** Processing line: ~ end~ - Inside source: true *** True Line Result end +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def defaults~ +** Processing line: ~ def tick_instructions args, text, y = 715~ - Inside source: true *** True Line Result - def defaults -** Processing line: ~ state.flap_power = 11~ + def tick_instructions args, text, y = 715 +** Processing line: ~ return if args.state.key_event_occurred~ - Inside source: true *** True Line Result - state.flap_power = 11 -** Processing line: ~ state.gravity = 0.9~ + return if args.state.key_event_occurred +** Processing line: ~ if args.inputs.mouse.click ||~ - Inside source: true *** True Line Result - state.gravity = 0.9 -** Processing line: ~ state.ceiling = 600~ + if args.inputs.mouse.click || +** Processing line: ~ args.inputs.keyboard.directional_vector ||~ - Inside source: true *** True Line Result - state.ceiling = 600 -** Processing line: ~ state.ceiling_flap_power = 6~ + args.inputs.keyboard.directional_vector || +** Processing line: ~ args.inputs.keyboard.key_down.enter ||~ - Inside source: true *** True Line Result - state.ceiling_flap_power = 6 -** Processing line: ~ state.wall_countdown_length = 100~ + args.inputs.keyboard.key_down.enter || +** Processing line: ~ args.inputs.keyboard.key_down.escape~ - Inside source: true *** True Line Result - state.wall_countdown_length = 100 -** Processing line: ~ state.wall_gap_size = 100~ + args.inputs.keyboard.key_down.escape +** Processing line: ~ args.state.key_event_occurred = true~ - Inside source: true *** True Line Result - state.wall_gap_size = 100 -** Processing line: ~ state.wall_countdown ||= 0~ + args.state.key_event_occurred = true +** Processing line: ~ end~ - Inside source: true *** True Line Result - state.wall_countdown ||= 0 -** Processing line: ~ state.hi_score ||= 0~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - state.hi_score ||= 0 -** Processing line: ~ state.score ||= 0~ + +** Processing line: ~ args.outputs.debug << [0, y - 50, 1280, 60].solid~ - Inside source: true *** True Line Result - state.score ||= 0 -** Processing line: ~ state.walls ||= []~ + args.outputs.debug << [0, y - 50, 1280, 60].solid +** Processing line: ~ args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label~ - Inside source: true *** True Line Result - state.walls ||= [] -** Processing line: ~ state.x ||= 50~ + args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label +** Processing line: ~ args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label~ - Inside source: true *** True Line Result - state.x ||= 50 -** Processing line: ~ state.y ||= 500~ + args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label +** Processing line: ~ end~ - Inside source: true *** True Line Result - state.y ||= 500 -** Processing line: ~ state.dy ||= 0~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - state.dy ||= 0 -** Processing line: ~ state.scene ||= :menu~ -- Inside source: true + +** Processing line: ~#+end_src~ +- Line was identified as the end of a code block. *** True Line Result - state.scene ||= :menu -** Processing line: ~ state.scene_at ||= 0~ -- Inside source: true +#+end_src +** Processing line: ~~ +- End of paragraph detected. *** True Line Result - state.scene_at ||= 0 -** Processing line: ~ state.difficulty ||= :normal~ -- Inside source: true + +** Processing line: ~*** Arcade - Twinstick - main.rb~ +- Header detected. *** True Line Result - state.difficulty ||= :normal -** Processing line: ~ state.new_difficulty ||= :normal~ -- Inside source: true + *** True Line Result - state.new_difficulty ||= :normal -** Processing line: ~ state.countdown ||= 4.seconds~ -- Inside source: true +*** Arcade - Twinstick - main.rb +** Processing line: ~#+begin_src ruby~ +- Line was identified as the beginning of a code block. *** True Line Result - state.countdown ||= 4.seconds -** Processing line: ~ state.flash_at ||= 0~ + +*** True Line Result +#+begin_src ruby +** Processing line: ~ # ./samples/99_genre_arcade/twinstick/app/main.rb~ - Inside source: true *** True Line Result - state.flash_at ||= 0 -** Processing line: ~ end~ + # ./samples/99_genre_arcade/twinstick/app/main.rb +** Processing line: ~ def tick args~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + def tick args +** Processing line: ~ args.state.player ||= {x: 600, y: 320, w: 80, h: 80, path: 'sprites/circle-white.png', vx: 0, vy: 0, health: 10, cooldown: 0, score: 0}~ - Inside source: true *** True Line Result - -** Processing line: ~ def render~ + args.state.player ||= {x: 600, y: 320, w: 80, h: 80, path: 'sprites/circle-white.png', vx: 0, vy: 0, health: 10, cooldown: 0, score: 0} +** Processing line: ~ args.state.enemies ||= []~ - Inside source: true *** True Line Result - def render -** Processing line: ~ outputs.sounds << "sounds/flappy-song.ogg" if state.tick_count == 1~ + args.state.enemies ||= [] +** Processing line: ~ args.state.player_bullets ||= []~ - Inside source: true *** True Line Result - outputs.sounds << "sounds/flappy-song.ogg" if state.tick_count == 1 -** Processing line: ~ render_score~ + args.state.player_bullets ||= [] +** Processing line: ~ args.state.tick_count ||= -1~ - Inside source: true *** True Line Result - render_score -** Processing line: ~ render_menu~ + args.state.tick_count ||= -1 +** Processing line: ~ args.state.tick_count += 1~ - Inside source: true *** True Line Result - render_menu -** Processing line: ~ render_game~ + args.state.tick_count += 1 +** Processing line: ~ spawn_enemies args~ - Inside source: true *** True Line Result - render_game -** Processing line: ~ end~ + spawn_enemies args +** Processing line: ~ kill_enemies args~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + kill_enemies args +** Processing line: ~ move_enemies args~ - Inside source: true *** True Line Result - -** Processing line: ~ def render_score~ + move_enemies args +** Processing line: ~ move_bullets args~ - Inside source: true *** True Line Result - def render_score -** Processing line: ~ outputs.primitives << [10, 710, "HI SCORE: #{state.hi_score}", large_white_typeset].label~ + move_bullets args +** Processing line: ~ move_player args~ - Inside source: true *** True Line Result - outputs.primitives << [10, 710, "HI SCORE: #{state.hi_score}", large_white_typeset].label -** Processing line: ~ outputs.primitives << [10, 680, "SCORE: #{state.score}", large_white_typeset].label~ + move_player args +** Processing line: ~ fire_player args~ - Inside source: true *** True Line Result - outputs.primitives << [10, 680, "SCORE: #{state.score}", large_white_typeset].label -** Processing line: ~ outputs.primitives << [10, 650, "DIFFICULTY: #{state.difficulty.upcase}", large_white_typeset].label~ + fire_player args +** Processing line: ~ args.state.player[:r] = args.state.player[:g] = args.state.player[:b] = (args.state.player[:health] * 25.5).clamp(0, 255)~ - Inside source: true *** True Line Result - outputs.primitives << [10, 650, "DIFFICULTY: #{state.difficulty.upcase}", large_white_typeset].label -** Processing line: ~ end~ + args.state.player[:r] = args.state.player[:g] = args.state.player[:b] = (args.state.player[:health] * 25.5).clamp(0, 255) +** Processing line: ~ label_color = args.state.player[:health] <= 5 ? 255 : 0~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + label_color = args.state.player[:health] <= 5 ? 255 : 0 +** Processing line: ~ args.outputs.labels << [~ - Inside source: true *** True Line Result - -** Processing line: ~ def render_menu~ + args.outputs.labels << [ +** Processing line: ~ {~ - Inside source: true *** True Line Result - def render_menu -** Processing line: ~ return unless state.scene == :menu~ + { +** Processing line: ~ x: args.state.player.x + 40, y: args.state.player.y + 60, alignment_enum: 1, text: "#{args.state.player[:health]} HP",~ - Inside source: true *** True Line Result - return unless state.scene == :menu -** Processing line: ~ render_overlay~ + x: args.state.player.x + 40, y: args.state.player.y + 60, alignment_enum: 1, text: "#{args.state.player[:health]} HP", +** Processing line: ~ r: label_color, g: label_color, b: label_color~ - Inside source: true *** True Line Result - render_overlay -** Processing line: ~~ + r: label_color, g: label_color, b: label_color +** Processing line: ~ }, {~ - Inside source: true *** True Line Result - -** Processing line: ~ outputs.labels << [640, 700, "Flappy Dragon", 50, 1, 255, 255, 255]~ + }, { +** Processing line: ~ x: args.state.player.x + 40, y: args.state.player.y + 40, alignment_enum: 1, text: "#{args.state.player[:score]} PTS",~ - Inside source: true *** True Line Result - outputs.labels << [640, 700, "Flappy Dragon", 50, 1, 255, 255, 255] -** Processing line: ~ outputs.labels << [640, 500, "Instructions: Press Spacebar to flap. Don't die.", 4, 1, 255, 255, 255]~ + x: args.state.player.x + 40, y: args.state.player.y + 40, alignment_enum: 1, text: "#{args.state.player[:score]} PTS", +** Processing line: ~ r: label_color, g: label_color, b: label_color, size_enum: 2 - args.state.player[:score].to_s.length,~ - Inside source: true *** True Line Result - outputs.labels << [640, 500, "Instructions: Press Spacebar to flap. Don't die.", 4, 1, 255, 255, 255] -** Processing line: ~ outputs.labels << [430, 430, "[Tab] Change difficulty", 4, 0, 255, 255, 255]~ + r: label_color, g: label_color, b: label_color, size_enum: 2 - args.state.player[:score].to_s.length, +** Processing line: ~ }~ - Inside source: true *** True Line Result - outputs.labels << [430, 430, "[Tab] Change difficulty", 4, 0, 255, 255, 255] -** Processing line: ~ outputs.labels << [430, 400, "[Enter] Start at New Difficulty ", 4, 0, 255, 255, 255]~ + } +** Processing line: ~ ]~ - Inside source: true *** True Line Result - outputs.labels << [430, 400, "[Enter] Start at New Difficulty ", 4, 0, 255, 255, 255] -** Processing line: ~ outputs.labels << [430, 370, "[Escape] Cancel/Resume ", 4, 0, 255, 255, 255]~ + ] +** Processing line: ~ args.outputs.sprites << [args.state.player, args.state.enemies, args.state.player_bullets]~ - Inside source: true *** True Line Result - outputs.labels << [430, 370, "[Escape] Cancel/Resume ", 4, 0, 255, 255, 255] -** Processing line: ~ outputs.labels << [640, 300, "(mouse, touch, and game controllers work, too!) ", 4, 1, 255, 255, 255]~ + args.outputs.sprites << [args.state.player, args.state.enemies, args.state.player_bullets] +** Processing line: ~ args.state.clear! if args.state.player[:health] < 0 # Reset the game if the player's health drops below zero~ - Inside source: true *** True Line Result - outputs.labels << [640, 300, "(mouse, touch, and game controllers work, too!) ", 4, 1, 255, 255, 255] -** Processing line: ~ outputs.labels << [640, 200, "Difficulty: #{state.new_difficulty.capitalize}", 4, 1, 255, 255, 255]~ + args.state.clear! if args.state.player[:health] < 0 # Reset the game if the player's health drops below zero +** Processing line: ~ end~ - Inside source: true *** True Line Result - outputs.labels << [640, 200, "Difficulty: #{state.new_difficulty.capitalize}", 4, 1, 255, 255, 255] + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ outputs.labels << [10, 100, "Code: @amirrajan", 255, 255, 255]~ +** Processing line: ~ def spawn_enemies args~ - Inside source: true *** True Line Result - outputs.labels << [10, 100, "Code: @amirrajan", 255, 255, 255] -** Processing line: ~ outputs.labels << [10, 80, "Art: @mobypixel", 255, 255, 255]~ + def spawn_enemies args +** Processing line: ~ # Spawn enemies more frequently as the player's score increases.~ - Inside source: true *** True Line Result - outputs.labels << [10, 80, "Art: @mobypixel", 255, 255, 255] -** Processing line: ~ outputs.labels << [10, 60, "Music: @mobypixel", 255, 255, 255]~ + # Spawn enemies more frequently as the player's score increases. +** Processing line: ~ if rand < (100+args.state.player[:score])/(10000 + args.state.player[:score]) || args.state.tick_count.zero?~ - Inside source: true *** True Line Result - outputs.labels << [10, 60, "Music: @mobypixel", 255, 255, 255] -** Processing line: ~ outputs.labels << [10, 40, "Engine: DragonRuby GTK", 255, 255, 255]~ + if rand < (100+args.state.player[:score])/(10000 + args.state.player[:score]) || args.state.tick_count.zero? +** Processing line: ~ theta = rand * Math::PI * 2~ - Inside source: true *** True Line Result - outputs.labels << [10, 40, "Engine: DragonRuby GTK", 255, 255, 255] -** Processing line: ~ end~ + theta = rand * Math::PI * 2 +** Processing line: ~ args.state.enemies << {~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + args.state.enemies << { +** Processing line: ~ x: 600 + Math.cos(theta) * 800, y: 320 + Math.sin(theta) * 800, w: 80, h: 80, path: 'sprites/circle-white.png',~ - Inside source: true *** True Line Result - -** Processing line: ~ def render_overlay~ + x: 600 + Math.cos(theta) * 800, y: 320 + Math.sin(theta) * 800, w: 80, h: 80, path: 'sprites/circle-white.png', +** Processing line: ~ r: (256 * rand).floor, g: (256 * rand).floor, b: (256 * rand).floor~ - Inside source: true *** True Line Result - def render_overlay -** Processing line: ~ outputs.primitives << [grid.rect.scale_rect(1.1, 0, 0), 0, 0, 0, 230].solid~ + r: (256 * rand).floor, g: (256 * rand).floor, b: (256 * rand).floor +** Processing line: ~ }~ - Inside source: true *** True Line Result - outputs.primitives << [grid.rect.scale_rect(1.1, 0, 0), 0, 0, 0, 230].solid + } ** Processing line: ~ end~ - Inside source: true *** True Line Result end +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def render_game~ +** Processing line: ~ def kill_enemies args~ - Inside source: true *** True Line Result - def render_game -** Processing line: ~ render_game_over~ + def kill_enemies args +** Processing line: ~ args.state.enemies.reject! do |enemy|~ - Inside source: true *** True Line Result - render_game_over -** Processing line: ~ render_background~ + args.state.enemies.reject! do |enemy| +** Processing line: ~ # Check if enemy and player are within 80 pixels of each other (i.e. overlapping)~ - Inside source: true *** True Line Result - render_background -** Processing line: ~ render_walls~ + # Check if enemy and player are within 80 pixels of each other (i.e. overlapping) +** Processing line: ~ if 6400 > (enemy.x - args.state.player.x) ** 2 + (enemy.y - args.state.player.y) ** 2~ - Inside source: true *** True Line Result - render_walls -** Processing line: ~ render_dragon~ + if 6400 > (enemy.x - args.state.player.x) ** 2 + (enemy.y - args.state.player.y) ** 2 +** Processing line: ~ # Enemy is touching player. Kill enemy, and reduce player HP by 1.~ - Inside source: true *** True Line Result - render_dragon -** Processing line: ~ render_flash~ + # Enemy is touching player. Kill enemy, and reduce player HP by 1. +** Processing line: ~ args.state.player[:health] -= 1~ - Inside source: true *** True Line Result - render_flash -** Processing line: ~ end~ + args.state.player[:health] -= 1 +** Processing line: ~ else~ +- Inside source: true +*** True Line Result + else +** Processing line: ~ args.state.player_bullets.any? do |bullet|~ +- Inside source: true +*** True Line Result + args.state.player_bullets.any? do |bullet| +** Processing line: ~ # Check if enemy and bullet are within 50 pixels of each other (i.e. overlapping)~ +- Inside source: true +*** True Line Result + # Check if enemy and bullet are within 50 pixels of each other (i.e. overlapping) +** Processing line: ~ if 2500 > (enemy.x - bullet.x + 30) ** 2 + (enemy.y - bullet.y + 30) ** 2~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + if 2500 > (enemy.x - bullet.x + 30) ** 2 + (enemy.y - bullet.y + 30) ** 2 +** Processing line: ~ # Increase player health by one for each enemy killed by a bullet after the first enemy, up to a maximum of 10 HP~ - Inside source: true *** True Line Result - -** Processing line: ~ def render_game_over~ + # Increase player health by one for each enemy killed by a bullet after the first enemy, up to a maximum of 10 HP +** Processing line: ~ args.state.player[:health] += 1 if args.state.player[:health] < 10 && bullet[:kills] > 0~ - Inside source: true *** True Line Result - def render_game_over -** Processing line: ~ return unless state.scene == :game~ + args.state.player[:health] += 1 if args.state.player[:health] < 10 && bullet[:kills] > 0 +** Processing line: ~ # Keep track of how many enemies have been killed by this particular bullet~ - Inside source: true *** True Line Result - return unless state.scene == :game -** Processing line: ~ outputs.labels << [638, 358, score_text, 20, 1]~ + # Keep track of how many enemies have been killed by this particular bullet +** Processing line: ~ bullet[:kills] += 1~ - Inside source: true *** True Line Result - outputs.labels << [638, 358, score_text, 20, 1] -** Processing line: ~ outputs.labels << [635, 360, score_text, 20, 1, 255, 255, 255]~ + bullet[:kills] += 1 +** Processing line: ~ # Earn more points by killing multiple enemies with one shot.~ - Inside source: true *** True Line Result - outputs.labels << [635, 360, score_text, 20, 1, 255, 255, 255] -** Processing line: ~ outputs.labels << [638, 428, countdown_text, 20, 1]~ + # Earn more points by killing multiple enemies with one shot. +** Processing line: ~ args.state.player[:score] += bullet[:kills]~ - Inside source: true *** True Line Result - outputs.labels << [638, 428, countdown_text, 20, 1] -** Processing line: ~ outputs.labels << [635, 430, countdown_text, 20, 1, 255, 255, 255]~ + args.state.player[:score] += bullet[:kills] +** Processing line: ~ end~ - Inside source: true *** True Line Result - outputs.labels << [635, 430, countdown_text, 20, 1, 255, 255, 255] -** Processing line: ~ end~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - -** Processing line: ~ def render_background~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - def render_background -** Processing line: ~ outputs.sprites << [0, 0, 1280, 720, 'sprites/background.png']~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - outputs.sprites << [0, 0, 1280, 720, 'sprites/background.png'] + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ scroll_point_at = state.tick_count~ +** Processing line: ~ def move_enemies args~ - Inside source: true *** True Line Result - scroll_point_at = state.tick_count -** Processing line: ~ scroll_point_at = state.scene_at if state.scene == :menu~ + def move_enemies args +** Processing line: ~ args.state.enemies.each do |enemy|~ - Inside source: true *** True Line Result - scroll_point_at = state.scene_at if state.scene == :menu -** Processing line: ~ scroll_point_at = state.death_at if state.countdown > 0~ + args.state.enemies.each do |enemy| +** Processing line: ~ # Get the angle from the enemy to the player~ - Inside source: true *** True Line Result - scroll_point_at = state.death_at if state.countdown > 0 -** Processing line: ~ scroll_point_at ||= 0~ + # Get the angle from the enemy to the player +** Processing line: ~ theta = Math.atan2(enemy.y - args.state.player.y, enemy.x - args.state.player.x)~ - Inside source: true *** True Line Result - scroll_point_at ||= 0 -** Processing line: ~~ + theta = Math.atan2(enemy.y - args.state.player.y, enemy.x - args.state.player.x) +** Processing line: ~ # Convert the angle to a vector pointing at the player~ - Inside source: true *** True Line Result - -** Processing line: ~ outputs.sprites << scrolling_background(scroll_point_at, 'sprites/parallax_back.png', 0.25)~ + # Convert the angle to a vector pointing at the player +** Processing line: ~ dx, dy = theta.to_degrees.vector 5~ - Inside source: true *** True Line Result - outputs.sprites << scrolling_background(scroll_point_at, 'sprites/parallax_back.png', 0.25) -** Processing line: ~ outputs.sprites << scrolling_background(scroll_point_at, 'sprites/parallax_middle.png', 0.50)~ + dx, dy = theta.to_degrees.vector 5 +** Processing line: ~ # Move the enemy towards thr player~ - Inside source: true *** True Line Result - outputs.sprites << scrolling_background(scroll_point_at, 'sprites/parallax_middle.png', 0.50) -** Processing line: ~ outputs.sprites << scrolling_background(scroll_point_at, 'sprites/parallax_front.png', 1.00, -80)~ + # Move the enemy towards thr player +** Processing line: ~ enemy.x -= dx~ - Inside source: true *** True Line Result - outputs.sprites << scrolling_background(scroll_point_at, 'sprites/parallax_front.png', 1.00, -80) + enemy.x -= dx +** Processing line: ~ enemy.y -= dy~ +- Inside source: true +*** True Line Result + enemy.y -= dy ** Processing line: ~ end~ - Inside source: true *** True Line Result end -** Processing line: ~~ +** Processing line: ~ end~ - Inside source: true *** True Line Result - -** Processing line: ~ def render_walls~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - def render_walls -** Processing line: ~ state.walls.each do |w|~ + +** Processing line: ~ def move_bullets args~ - Inside source: true *** True Line Result - state.walls.each do |w| -** Processing line: ~ w.sprites = [~ + def move_bullets args +** Processing line: ~ args.state.player_bullets.each do |bullet|~ - Inside source: true *** True Line Result - w.sprites = [ -** Processing line: ~ [w.x, w.bottom_height - 720, 100, 720, 'sprites/wall.png', 180],~ + args.state.player_bullets.each do |bullet| +** Processing line: ~ # Move the bullets according to the bullet's velocity~ - Inside source: true *** True Line Result - [w.x, w.bottom_height - 720, 100, 720, 'sprites/wall.png', 180], -** Processing line: ~ [w.x, w.top_y, 100, 720, 'sprites/wallbottom.png', 0]~ + # Move the bullets according to the bullet's velocity +** Processing line: ~ bullet.x += bullet[:vx]~ - Inside source: true *** True Line Result - [w.x, w.top_y, 100, 720, 'sprites/wallbottom.png', 0] -** Processing line: ~ ]~ + bullet.x += bullet[:vx] +** Processing line: ~ bullet.y += bullet[:vy]~ - Inside source: true *** True Line Result - ] -** Processing line: ~ end~ + bullet.y += bullet[:vy] +** Processing line: ~ end~ - Inside source: true *** True Line Result - end -** Processing line: ~ outputs.sprites << state.walls.map(&:sprites)~ + end +** Processing line: ~ args.state.player_bullets.reject! do |bullet|~ - Inside source: true *** True Line Result - outputs.sprites << state.walls.map(&:sprites) -** Processing line: ~ end~ + args.state.player_bullets.reject! do |bullet| +** Processing line: ~ # Despawn bullets that are outside the screen area~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + # Despawn bullets that are outside the screen area +** Processing line: ~ bullet.x < -20 || bullet.y < -20 || bullet.x > 1300 || bullet.y > 740~ - Inside source: true *** True Line Result - -** Processing line: ~ def render_dragon~ + bullet.x < -20 || bullet.y < -20 || bullet.x > 1300 || bullet.y > 740 +** Processing line: ~ end~ - Inside source: true *** True Line Result - def render_dragon -** Processing line: ~ state.show_death = true if state.countdown == 3.seconds~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - state.show_death = true if state.countdown == 3.seconds + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ render_debug_hitbox false~ +** Processing line: ~ def move_player args~ - Inside source: true *** True Line Result - render_debug_hitbox false -** Processing line: ~~ + def move_player args +** Processing line: ~ # Get the currently held direction.~ - Inside source: true *** True Line Result - -** Processing line: ~ if state.show_death == false || !state.death_at~ + # Get the currently held direction. +** Processing line: ~ dx, dy = move_directional_vector args~ - Inside source: true *** True Line Result - if state.show_death == false || !state.death_at -** Processing line: ~ animation_index = state.flapped_at.frame_index 6, 2, false if state.flapped_at~ + dx, dy = move_directional_vector args +** Processing line: ~ # Take the weighted average of the old velocities and the desired velocities.~ - Inside source: true *** True Line Result - animation_index = state.flapped_at.frame_index 6, 2, false if state.flapped_at -** Processing line: ~ sprite_name = "sprites/dragon_fly#{animation_index.or(0) + 1}.png"~ + # Take the weighted average of the old velocities and the desired velocities. +** Processing line: ~ # Since move_directional_vector returns values between -1 and 1,~ - Inside source: true *** True Line Result - sprite_name = "sprites/dragon_fly#{animation_index.or(0) + 1}.png" -** Processing line: ~ state.dragon_sprite = [state.x, state.y, 100, 80, sprite_name, state.dy * 1.2]~ + # Since move_directional_vector returns values between -1 and 1, +** Processing line: ~ # and we want to limit the speed to 7.5, we multiply dx and dy by 7.5*0.1 to get 0.75~ - Inside source: true *** True Line Result - state.dragon_sprite = [state.x, state.y, 100, 80, sprite_name, state.dy * 1.2] -** Processing line: ~ else~ + # and we want to limit the speed to 7.5, we multiply dx and dy by 7.5*0.1 to get 0.75 +** Processing line: ~ args.state.player[:vx] = args.state.player[:vx] * 0.9 + dx * 0.75~ - Inside source: true *** True Line Result - else -** Processing line: ~ sprite_name = "sprites/dragon_die.png"~ + args.state.player[:vx] = args.state.player[:vx] * 0.9 + dx * 0.75 +** Processing line: ~ args.state.player[:vy] = args.state.player[:vy] * 0.9 + dy * 0.75~ - Inside source: true *** True Line Result - sprite_name = "sprites/dragon_die.png" -** Processing line: ~ state.dragon_sprite = [state.x, state.y, 100, 80, sprite_name, state.dy * 1.2]~ + args.state.player[:vy] = args.state.player[:vy] * 0.9 + dy * 0.75 +** Processing line: ~ # Move the player~ - Inside source: true *** True Line Result - state.dragon_sprite = [state.x, state.y, 100, 80, sprite_name, state.dy * 1.2] -** Processing line: ~ sprite_changed_elapsed = state.death_at.elapsed_time - 1.seconds~ + # Move the player +** Processing line: ~ args.state.player.x += args.state.player[:vx]~ - Inside source: true *** True Line Result - sprite_changed_elapsed = state.death_at.elapsed_time - 1.seconds -** Processing line: ~ state.dragon_sprite.angle += (sprite_changed_elapsed ** 1.3) * state.death_fall_direction * -1~ + args.state.player.x += args.state.player[:vx] +** Processing line: ~ args.state.player.y += args.state.player[:vy]~ - Inside source: true *** True Line Result - state.dragon_sprite.angle += (sprite_changed_elapsed ** 1.3) * state.death_fall_direction * -1 -** Processing line: ~ state.dragon_sprite.x += (sprite_changed_elapsed ** 1.2) * state.death_fall_direction~ + args.state.player.y += args.state.player[:vy] +** Processing line: ~ # If the player is about to go out of bounds, put them back in bounds.~ - Inside source: true *** True Line Result - state.dragon_sprite.x += (sprite_changed_elapsed ** 1.2) * state.death_fall_direction -** Processing line: ~ state.dragon_sprite.y += (sprite_changed_elapsed * 14 - sprite_changed_elapsed ** 1.6)~ + # If the player is about to go out of bounds, put them back in bounds. +** Processing line: ~ args.state.player.x = args.state.player.x.clamp(0, 1201)~ - Inside source: true *** True Line Result - state.dragon_sprite.y += (sprite_changed_elapsed * 14 - sprite_changed_elapsed ** 1.6) -** Processing line: ~ end~ + args.state.player.x = args.state.player.x.clamp(0, 1201) +** Processing line: ~ args.state.player.y = args.state.player.y.clamp(0, 640)~ - Inside source: true *** True Line Result - end + args.state.player.y = args.state.player.y.clamp(0, 640) +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ outputs.sprites << state.dragon_sprite~ +** Processing line: ~~ - Inside source: true *** True Line Result - outputs.sprites << state.dragon_sprite -** Processing line: ~ end~ + +** Processing line: ~ def fire_player args~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + def fire_player args +** Processing line: ~ # Reduce the firing cooldown each tick~ - Inside source: true *** True Line Result - -** Processing line: ~ def render_debug_hitbox show~ + # Reduce the firing cooldown each tick +** Processing line: ~ args.state.player[:cooldown] -= 1~ - Inside source: true *** True Line Result - def render_debug_hitbox show -** Processing line: ~ return unless show~ + args.state.player[:cooldown] -= 1 +** Processing line: ~ # If the player is allowed to fire~ - Inside source: true *** True Line Result - return unless show -** Processing line: ~ outputs.borders << [dragon_collision_box.rect, 255, 0, 0] if state.dragon_sprite~ + # If the player is allowed to fire +** Processing line: ~ if args.state.player[:cooldown] <= 0~ - Inside source: true *** True Line Result - outputs.borders << [dragon_collision_box.rect, 255, 0, 0] if state.dragon_sprite -** Processing line: ~ outputs.borders << state.walls.flat_map do |w|~ + if args.state.player[:cooldown] <= 0 +** Processing line: ~ dx, dy = shoot_directional_vector args # Get the bullet velocity~ - Inside source: true *** True Line Result - outputs.borders << state.walls.flat_map do |w| -** Processing line: ~ w.sprites.map { |s| [s.rect, 255, 0, 0] }~ + dx, dy = shoot_directional_vector args # Get the bullet velocity +** Processing line: ~ return if dx == 0 && dy == 0 # If the velocity is zero, the player doesn't want to fire. Therefore, we just return early.~ - Inside source: true *** True Line Result - w.sprites.map { |s| [s.rect, 255, 0, 0] } -** Processing line: ~ end~ + return if dx == 0 && dy == 0 # If the velocity is zero, the player doesn't want to fire. Therefore, we just return early. +** Processing line: ~ # Add a new bullet to the list of player bullets.~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + # Add a new bullet to the list of player bullets. +** Processing line: ~ args.state.player_bullets << {~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + args.state.player_bullets << { +** Processing line: ~ x: args.state.player.x + 30 + 40 * dx,~ - Inside source: true *** True Line Result - -** Processing line: ~ def render_flash~ + x: args.state.player.x + 30 + 40 * dx, +** Processing line: ~ y: args.state.player.y + 30 + 40 * dy,~ - Inside source: true *** True Line Result - def render_flash -** Processing line: ~ return unless state.flash_at~ + y: args.state.player.y + 30 + 40 * dy, +** Processing line: ~ w: 20, h: 20,~ - Inside source: true *** True Line Result - return unless state.flash_at -** Processing line: ~~ + w: 20, h: 20, +** Processing line: ~ path: 'sprites/circle-white.png',~ - Inside source: true *** True Line Result - -** Processing line: ~ outputs.primitives << [grid.rect,~ + path: 'sprites/circle-white.png', +** Processing line: ~ r: 0, g: 0, b: 0,~ - Inside source: true *** True Line Result - outputs.primitives << [grid.rect, -** Processing line: ~ white,~ + r: 0, g: 0, b: 0, +** Processing line: ~ vx: 10 * dx + args.state.player[:vx] / 7.5, vy: 10 * dy + args.state.player[:vy] / 7.5, # Factor in a bit of the player's velocity~ - Inside source: true *** True Line Result - white, -** Processing line: ~ 255 * state.flash_at.ease(20, :flip)].solid~ + vx: 10 * dx + args.state.player[:vx] / 7.5, vy: 10 * dy + args.state.player[:vy] / 7.5, # Factor in a bit of the player's velocity +** Processing line: ~ kills: 0~ - Inside source: true *** True Line Result - 255 * state.flash_at.ease(20, :flip)].solid -** Processing line: ~~ + kills: 0 +** Processing line: ~ }~ - Inside source: true *** True Line Result - -** Processing line: ~ state.flash_at = 0 if state.flash_at.elapsed_time > 20~ + } +** Processing line: ~ args.state.player[:cooldown] = 30 # Reset the cooldown~ - Inside source: true *** True Line Result - state.flash_at = 0 if state.flash_at.elapsed_time > 20 + args.state.player[:cooldown] = 30 # Reset the cooldown ** Processing line: ~ end~ - Inside source: true *** True Line Result end +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def calc~ +** Processing line: ~ # Custom function for getting a directional vector just for movement using WASD~ - Inside source: true *** True Line Result - def calc -** Processing line: ~ return unless state.scene == :game~ + # Custom function for getting a directional vector just for movement using WASD +** Processing line: ~ def move_directional_vector args~ - Inside source: true *** True Line Result - return unless state.scene == :game -** Processing line: ~ reset_game if state.countdown == 1~ + def move_directional_vector args +** Processing line: ~ dx = 0~ - Inside source: true *** True Line Result - reset_game if state.countdown == 1 -** Processing line: ~ state.countdown -= 1 and return if state.countdown > 0~ + dx = 0 +** Processing line: ~ dx += 1 if args.inputs.keyboard.d~ - Inside source: true *** True Line Result - state.countdown -= 1 and return if state.countdown > 0 -** Processing line: ~ calc_walls~ + dx += 1 if args.inputs.keyboard.d +** Processing line: ~ dx -= 1 if args.inputs.keyboard.a~ - Inside source: true *** True Line Result - calc_walls -** Processing line: ~ calc_flap~ + dx -= 1 if args.inputs.keyboard.a +** Processing line: ~ dy = 0~ - Inside source: true *** True Line Result - calc_flap -** Processing line: ~ calc_game_over~ + dy = 0 +** Processing line: ~ dy += 1 if args.inputs.keyboard.w~ - Inside source: true *** True Line Result - calc_game_over -** Processing line: ~ end~ + dy += 1 if args.inputs.keyboard.w +** Processing line: ~ dy -= 1 if args.inputs.keyboard.s~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + dy -= 1 if args.inputs.keyboard.s +** Processing line: ~ if dx != 0 && dy != 0~ - Inside source: true *** True Line Result - -** Processing line: ~ def calc_walls~ + if dx != 0 && dy != 0 +** Processing line: ~ dx *= 0.7071~ - Inside source: true *** True Line Result - def calc_walls -** Processing line: ~ state.walls.each { |w| w.x -= 8 }~ + dx *= 0.7071 +** Processing line: ~ dy *= 0.7071~ - Inside source: true *** True Line Result - state.walls.each { |w| w.x -= 8 } -** Processing line: ~~ + dy *= 0.7071 +** Processing line: ~ end~ - Inside source: true *** True Line Result - -** Processing line: ~ walls_count_before_removal = state.walls.length~ + end +** Processing line: ~ [dx, dy]~ - Inside source: true *** True Line Result - walls_count_before_removal = state.walls.length + [dx, dy] +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ state.walls.reject! { |w| w.x < -100 }~ +** Processing line: ~ # Custom function for getting a directional vector just for shooting using the arrow keys~ - Inside source: true *** True Line Result - state.walls.reject! { |w| w.x < -100 } -** Processing line: ~~ + # Custom function for getting a directional vector just for shooting using the arrow keys +** Processing line: ~ def shoot_directional_vector args~ - Inside source: true *** True Line Result - -** Processing line: ~ state.score += 1 if state.walls.count < walls_count_before_removal~ + def shoot_directional_vector args +** Processing line: ~ dx = 0~ - Inside source: true *** True Line Result - state.score += 1 if state.walls.count < walls_count_before_removal -** Processing line: ~~ + dx = 0 +** Processing line: ~ dx += 1 if args.inputs.keyboard.key_down.right || args.inputs.keyboard.key_held.right~ - Inside source: true *** True Line Result - -** Processing line: ~ state.wall_countdown -= 1 and return if state.wall_countdown > 0~ + dx += 1 if args.inputs.keyboard.key_down.right || args.inputs.keyboard.key_held.right +** Processing line: ~ dx -= 1 if args.inputs.keyboard.key_down.left || args.inputs.keyboard.key_held.left~ - Inside source: true *** True Line Result - state.wall_countdown -= 1 and return if state.wall_countdown > 0 -** Processing line: ~~ + dx -= 1 if args.inputs.keyboard.key_down.left || args.inputs.keyboard.key_held.left +** Processing line: ~ dy = 0~ - Inside source: true *** True Line Result - -** Processing line: ~ state.walls << state.new_entity(:wall) do |w|~ + dy = 0 +** Processing line: ~ dy += 1 if args.inputs.keyboard.key_down.up || args.inputs.keyboard.key_held.up~ - Inside source: true *** True Line Result - state.walls << state.new_entity(:wall) do |w| -** Processing line: ~ w.x = grid.right~ + dy += 1 if args.inputs.keyboard.key_down.up || args.inputs.keyboard.key_held.up +** Processing line: ~ dy -= 1 if args.inputs.keyboard.key_down.down || args.inputs.keyboard.key_held.down~ - Inside source: true *** True Line Result - w.x = grid.right -** Processing line: ~ w.opening = grid.top~ + dy -= 1 if args.inputs.keyboard.key_down.down || args.inputs.keyboard.key_held.down +** Processing line: ~ if dx != 0 && dy != 0~ - Inside source: true *** True Line Result - w.opening = grid.top -** Processing line: ~ .randomize(:ratio)~ + if dx != 0 && dy != 0 +** Processing line: ~ dx *= 0.7071~ - Inside source: true *** True Line Result - .randomize(:ratio) -** Processing line: ~ .greater(200)~ + dx *= 0.7071 +** Processing line: ~ dy *= 0.7071~ - Inside source: true *** True Line Result - .greater(200) -** Processing line: ~ .lesser(520)~ + dy *= 0.7071 +** Processing line: ~ end~ - Inside source: true *** True Line Result - .lesser(520) -** Processing line: ~ w.bottom_height = w.opening - state.wall_gap_size~ + end +** Processing line: ~ [dx, dy]~ - Inside source: true *** True Line Result - w.bottom_height = w.opening - state.wall_gap_size -** Processing line: ~ w.top_y = w.opening + state.wall_gap_size~ + [dx, dy] +** Processing line: ~ end~ - Inside source: true *** True Line Result - w.top_y = w.opening + state.wall_gap_size -** Processing line: ~ end~ -- Inside source: true + end +** Processing line: ~#+end_src~ +- Line was identified as the end of a code block. *** True Line Result - end +#+end_src ** Processing line: ~~ -- Inside source: true +- End of paragraph detected. *** True Line Result -** Processing line: ~ state.wall_countdown = state.wall_countdown_length~ -- Inside source: true +** Processing line: ~*** Crafting - Craft Game Starting Point - main.rb~ +- Header detected. *** True Line Result - state.wall_countdown = state.wall_countdown_length -** Processing line: ~ end~ -- Inside source: true + *** True Line Result - end -** Processing line: ~~ -- Inside source: true +*** Crafting - Craft Game Starting Point - main.rb +** Processing line: ~#+begin_src ruby~ +- Line was identified as the beginning of a code block. *** True Line Result -** Processing line: ~ def calc_flap~ -- Inside source: true -*** True Line Result - def calc_flap -** Processing line: ~ state.y += state.dy~ -- Inside source: true *** True Line Result - state.y += state.dy -** Processing line: ~ state.dy = state.dy.lesser state.flap_power~ +#+begin_src ruby +** Processing line: ~ # ./samples/99_genre_crafting/craft_game_starting_point/app/main.rb~ - Inside source: true *** True Line Result - state.dy = state.dy.lesser state.flap_power -** Processing line: ~ state.dy -= state.gravity~ + # ./samples/99_genre_crafting/craft_game_starting_point/app/main.rb +** Processing line: ~ # ==================================================~ - Inside source: true *** True Line Result - state.dy -= state.gravity -** Processing line: ~ return if state.y < state.ceiling~ + # ================================================== +** Processing line: ~ # A NOTE TO JAM CRAFT PARTICIPANTS:~ - Inside source: true *** True Line Result - return if state.y < state.ceiling -** Processing line: ~ state.y = state.ceiling~ + # A NOTE TO JAM CRAFT PARTICIPANTS: +** Processing line: ~ # The comments and code in here are just as small piece of DragonRuby's capabilities.~ - Inside source: true *** True Line Result - state.y = state.ceiling -** Processing line: ~ state.dy = state.dy.lesser state.ceiling_flap_power~ + # The comments and code in here are just as small piece of DragonRuby's capabilities. +** Processing line: ~ # Be sure to check out the rest of the sample apps. Start with README.txt and go from there!~ - Inside source: true *** True Line Result - state.dy = state.dy.lesser state.ceiling_flap_power -** Processing line: ~ end~ + # Be sure to check out the rest of the sample apps. Start with README.txt and go from there! +** Processing line: ~ # ==================================================~ - Inside source: true *** True Line Result - end + # ================================================== ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def calc_game_over~ -- Inside source: true -*** True Line Result - def calc_game_over -** Processing line: ~ return unless game_over?~ -- Inside source: true -*** True Line Result - return unless game_over? -** Processing line: ~~ +** Processing line: ~ # def tick args is the entry point into your game. This function is called at~ - Inside source: true *** True Line Result - -** Processing line: ~ state.death_at = state.tick_count~ + # def tick args is the entry point into your game. This function is called at +** Processing line: ~ # a fixed update time of 60hz (60 fps).~ - Inside source: true *** True Line Result - state.death_at = state.tick_count -** Processing line: ~ state.death_from = state.walls.first~ + # a fixed update time of 60hz (60 fps). +** Processing line: ~ def tick args~ - Inside source: true *** True Line Result - state.death_from = state.walls.first -** Processing line: ~ state.death_fall_direction = -1~ + def tick args +** Processing line: ~ # The defaults function intitializes the game.~ - Inside source: true *** True Line Result - state.death_fall_direction = -1 -** Processing line: ~ state.death_fall_direction = 1 if state.x > state.death_from.x~ + # The defaults function intitializes the game. +** Processing line: ~ defaults args~ - Inside source: true *** True Line Result - state.death_fall_direction = 1 if state.x > state.death_from.x -** Processing line: ~ outputs.sounds << "sounds/hit-sound.wav"~ + defaults args +** Processing line: ~~ - Inside source: true *** True Line Result - outputs.sounds << "sounds/hit-sound.wav" -** Processing line: ~ begin_countdown~ + +** Processing line: ~ # After the game is initialized, render it.~ - Inside source: true *** True Line Result - begin_countdown -** Processing line: ~ end~ + # After the game is initialized, render it. +** Processing line: ~ render args~ - Inside source: true *** True Line Result - end + render args ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def process_inputs~ -- Inside source: true -*** True Line Result - def process_inputs -** Processing line: ~ process_inputs_menu~ -- Inside source: true -*** True Line Result - process_inputs_menu -** Processing line: ~ process_inputs_game~ +** Processing line: ~ # After rendering the player should be able to respond to input.~ - Inside source: true *** True Line Result - process_inputs_game -** Processing line: ~ end~ + # After rendering the player should be able to respond to input. +** Processing line: ~ input args~ - Inside source: true *** True Line Result - end + input args ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def process_inputs_menu~ +** Processing line: ~ # After responding to input, the game performs any additional calculations.~ - Inside source: true *** True Line Result - def process_inputs_menu -** Processing line: ~ return unless state.scene == :menu~ + # After responding to input, the game performs any additional calculations. +** Processing line: ~ calc args~ - Inside source: true *** True Line Result - return unless state.scene == :menu + calc args +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ changediff = inputs.keyboard.key_down.tab || inputs.controller_one.key_down.select~ +** Processing line: ~ def defaults args~ - Inside source: true *** True Line Result - changediff = inputs.keyboard.key_down.tab || inputs.controller_one.key_down.select -** Processing line: ~ if inputs.mouse.click~ + def defaults args +** Processing line: ~ # hide the mouse cursor for this game, we are going to render our own cursor~ - Inside source: true *** True Line Result - if inputs.mouse.click -** Processing line: ~ p = inputs.mouse.click.point~ + # hide the mouse cursor for this game, we are going to render our own cursor +** Processing line: ~ if args.state.tick_count == 0~ - Inside source: true *** True Line Result - p = inputs.mouse.click.point -** Processing line: ~ if (p.y >= 165) && (p.y < 200) && (p.x >= 500) && (p.x < 800)~ + if args.state.tick_count == 0 +** Processing line: ~ args.gtk.hide_cursor~ - Inside source: true *** True Line Result - if (p.y >= 165) && (p.y < 200) && (p.x >= 500) && (p.x < 800) -** Processing line: ~ changediff = true~ + args.gtk.hide_cursor +** Processing line: ~ end~ - Inside source: true *** True Line Result - changediff = true -** Processing line: ~ end~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + +** Processing line: ~ args.state.click_ripples ||= []~ - Inside source: true *** True Line Result - end + args.state.click_ripples ||= [] ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ if changediff~ +** Processing line: ~ # everything is on a 1280x720 virtual canvas, so you can~ - Inside source: true *** True Line Result - if changediff -** Processing line: ~ case state.new_difficulty~ + # everything is on a 1280x720 virtual canvas, so you can +** Processing line: ~ # hardcode locations~ - Inside source: true *** True Line Result - case state.new_difficulty -** Processing line: ~ when :easy~ + # hardcode locations +** Processing line: ~~ - Inside source: true *** True Line Result - when :easy -** Processing line: ~ state.new_difficulty = :normal~ + +** Processing line: ~ # define the borders for where the inventory is located~ - Inside source: true *** True Line Result - state.new_difficulty = :normal -** Processing line: ~ when :normal~ + # define the borders for where the inventory is located +** Processing line: ~ # args.state is a data structure that accepts any arbitrary parameters~ - Inside source: true *** True Line Result - when :normal -** Processing line: ~ state.new_difficulty = :hard~ + # args.state is a data structure that accepts any arbitrary parameters +** Processing line: ~ # so you can create an object graph without having to create any classes.~ - Inside source: true *** True Line Result - state.new_difficulty = :hard -** Processing line: ~ when :hard~ + # so you can create an object graph without having to create any classes. +** Processing line: ~~ - Inside source: true *** True Line Result - when :hard -** Processing line: ~ state.new_difficulty = :flappy~ + +** Processing line: ~ # Bottom left is 0, 0. Top right is 1280, 720.~ - Inside source: true *** True Line Result - state.new_difficulty = :flappy -** Processing line: ~ when :flappy~ + # Bottom left is 0, 0. Top right is 1280, 720. +** Processing line: ~ # The inventory area is at the top of the screen~ - Inside source: true *** True Line Result - when :flappy -** Processing line: ~ state.new_difficulty = :easy~ + # The inventory area is at the top of the screen +** Processing line: ~ # the number 80 is the size of all the sprites, so that is what is being~ - Inside source: true *** True Line Result - state.new_difficulty = :easy -** Processing line: ~ end~ + # the number 80 is the size of all the sprites, so that is what is being +** Processing line: ~ # used to decide the with and height~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + # used to decide the with and height +** Processing line: ~ args.state.sprite_size = 80~ - Inside source: true *** True Line Result - end + args.state.sprite_size = 80 ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ if inputs.keyboard.key_down.enter || inputs.controller_one.key_down.start || inputs.controller_one.key_down.a~ -- Inside source: true -*** True Line Result - if inputs.keyboard.key_down.enter || inputs.controller_one.key_down.start || inputs.controller_one.key_down.a -** Processing line: ~ state.difficulty = state.new_difficulty~ -- Inside source: true -*** True Line Result - state.difficulty = state.new_difficulty -** Processing line: ~ change_to_scene :game~ -- Inside source: true -*** True Line Result - change_to_scene :game -** Processing line: ~ reset_game false~ +** Processing line: ~ args.state.inventory_border.w = args.state.sprite_size * 10~ - Inside source: true *** True Line Result - reset_game false -** Processing line: ~ state.hi_score = 0~ + args.state.inventory_border.w = args.state.sprite_size * 10 +** Processing line: ~ args.state.inventory_border.h = args.state.sprite_size * 3~ - Inside source: true *** True Line Result - state.hi_score = 0 -** Processing line: ~ begin_countdown~ + args.state.inventory_border.h = args.state.sprite_size * 3 +** Processing line: ~ args.state.inventory_border.x = 10~ - Inside source: true *** True Line Result - begin_countdown -** Processing line: ~ end~ + args.state.inventory_border.x = 10 +** Processing line: ~ args.state.inventory_border.y = 710 - args.state.inventory_border.h~ - Inside source: true *** True Line Result - end + args.state.inventory_border.y = 710 - args.state.inventory_border.h ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ if inputs.keyboard.key_down.escape || (inputs.mouse.click && !changediff) || inputs.controller_one.key_down.b~ +** Processing line: ~ # define the borders for where the crafting area is located~ - Inside source: true *** True Line Result - if inputs.keyboard.key_down.escape || (inputs.mouse.click && !changediff) || inputs.controller_one.key_down.b -** Processing line: ~ state.new_difficulty = state.difficulty~ + # define the borders for where the crafting area is located +** Processing line: ~ # the crafting area is below the inventory area~ - Inside source: true *** True Line Result - state.new_difficulty = state.difficulty -** Processing line: ~ change_to_scene :game~ + # the crafting area is below the inventory area +** Processing line: ~ # the number 80 is the size of all the sprites, so that is what is being~ - Inside source: true *** True Line Result - change_to_scene :game -** Processing line: ~ end~ + # the number 80 is the size of all the sprites, so that is what is being +** Processing line: ~ # used to decide the with and height~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + # used to decide the with and height +** Processing line: ~ args.state.craft_border.x = 10~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + args.state.craft_border.x = 10 +** Processing line: ~ args.state.craft_border.y = 220~ - Inside source: true *** True Line Result - -** Processing line: ~ def process_inputs_game~ + args.state.craft_border.y = 220 +** Processing line: ~ args.state.craft_border.w = args.state.sprite_size * 3~ - Inside source: true *** True Line Result - def process_inputs_game -** Processing line: ~ return unless state.scene == :game~ + args.state.craft_border.w = args.state.sprite_size * 3 +** Processing line: ~ args.state.craft_border.h = args.state.sprite_size * 3~ - Inside source: true *** True Line Result - return unless state.scene == :game + args.state.craft_border.h = args.state.sprite_size * 3 ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ clicked_menu = false~ +** Processing line: ~ # define the area where results are located~ - Inside source: true *** True Line Result - clicked_menu = false -** Processing line: ~ if inputs.mouse.click~ + # define the area where results are located +** Processing line: ~ # the crafting result is to the right of the craft area~ - Inside source: true *** True Line Result - if inputs.mouse.click -** Processing line: ~ p = inputs.mouse.click.point~ + # the crafting result is to the right of the craft area +** Processing line: ~ args.state.result_border.x = 10 + args.state.sprite_size * 3 + args.state.sprite_size~ - Inside source: true *** True Line Result - p = inputs.mouse.click.point -** Processing line: ~ clicked_menu = (p.y >= 620) && (p.x < 275)~ + args.state.result_border.x = 10 + args.state.sprite_size * 3 + args.state.sprite_size +** Processing line: ~ args.state.result_border.y = 220 + args.state.sprite_size~ - Inside source: true *** True Line Result - clicked_menu = (p.y >= 620) && (p.x < 275) -** Processing line: ~ end~ + args.state.result_border.y = 220 + args.state.sprite_size +** Processing line: ~ args.state.result_border.w = args.state.sprite_size~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + args.state.result_border.w = args.state.sprite_size +** Processing line: ~ args.state.result_border.h = args.state.sprite_size~ - Inside source: true *** True Line Result - -** Processing line: ~ if clicked_menu || inputs.keyboard.key_down.escape || inputs.keyboard.key_down.enter || inputs.controller_one.key_down.start~ + args.state.result_border.h = args.state.sprite_size +** Processing line: ~~ - Inside source: true *** True Line Result - if clicked_menu || inputs.keyboard.key_down.escape || inputs.keyboard.key_down.enter || inputs.controller_one.key_down.start -** Processing line: ~ change_to_scene :menu~ + +** Processing line: ~ # initialize items for the first time if they are nil~ - Inside source: true *** True Line Result - change_to_scene :menu -** Processing line: ~ elsif (inputs.mouse.down || inputs.mouse.click || inputs.keyboard.key_down.space || inputs.controller_one.key_down.a) && state.countdown == 0~ + # initialize items for the first time if they are nil +** Processing line: ~ # you start with 15 wood, 1 chest, and 5 plank~ - Inside source: true *** True Line Result - elsif (inputs.mouse.down || inputs.mouse.click || inputs.keyboard.key_down.space || inputs.controller_one.key_down.a) && state.countdown == 0 -** Processing line: ~ state.dy = 0~ + # you start with 15 wood, 1 chest, and 5 plank +** Processing line: ~ # Ruby has built in syntax for dictionaries (they look a lot like json objects).~ - Inside source: true *** True Line Result - state.dy = 0 -** Processing line: ~ state.dy += state.flap_power~ + # Ruby has built in syntax for dictionaries (they look a lot like json objects). +** Processing line: ~ # Ruby also has a special type called a Symbol denoted with a : followed by a word.~ - Inside source: true *** True Line Result - state.dy += state.flap_power -** Processing line: ~ state.flapped_at = state.tick_count~ + # Ruby also has a special type called a Symbol denoted with a : followed by a word. +** Processing line: ~ # Symbols are nice because they remove the need for magic strings.~ - Inside source: true *** True Line Result - state.flapped_at = state.tick_count -** Processing line: ~ outputs.sounds << "sounds/fly-sound.wav"~ + # Symbols are nice because they remove the need for magic strings. +** Processing line: ~ if !args.state.items~ - Inside source: true *** True Line Result - outputs.sounds << "sounds/fly-sound.wav" -** Processing line: ~ end~ + if !args.state.items +** Processing line: ~ args.state.items = [~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + args.state.items = [ +** Processing line: ~ {~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + { +** Processing line: ~ id: :wood, # :wood is a Symbol, this is better than using "wood" for the id~ - Inside source: true *** True Line Result - -** Processing line: ~ def scrolling_background at, path, rate, y = 0~ + id: :wood, # :wood is a Symbol, this is better than using "wood" for the id +** Processing line: ~ quantity: 15,~ - Inside source: true *** True Line Result - def scrolling_background at, path, rate, y = 0 -** Processing line: ~ [~ + quantity: 15, +** Processing line: ~ path: 'sprites/wood.png',~ - Inside source: true *** True Line Result - [ -** Processing line: ~ [ 0 - at.*(rate) % 1440, y, 1440, 720, path],~ + path: 'sprites/wood.png', +** Processing line: ~ location: :inventory,~ - Inside source: true *** True Line Result - [ 0 - at.*(rate) % 1440, y, 1440, 720, path], -** Processing line: ~ [1440 - at.*(rate) % 1440, y, 1440, 720, path]~ + location: :inventory, +** Processing line: ~ ordinal_x: 0, ordinal_y: 0~ - Inside source: true *** True Line Result - [1440 - at.*(rate) % 1440, y, 1440, 720, path] -** Processing line: ~ ]~ + ordinal_x: 0, ordinal_y: 0 +** Processing line: ~ },~ - Inside source: true *** True Line Result - ] -** Processing line: ~ end~ + }, +** Processing line: ~ {~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + { +** Processing line: ~ id: :chest,~ - Inside source: true *** True Line Result - -** Processing line: ~ def white~ + id: :chest, +** Processing line: ~ quantity: 1,~ - Inside source: true *** True Line Result - def white -** Processing line: ~ [255, 255, 255]~ + quantity: 1, +** Processing line: ~ path: 'sprites/chest.png',~ - Inside source: true *** True Line Result - [255, 255, 255] -** Processing line: ~ end~ + path: 'sprites/chest.png', +** Processing line: ~ location: :inventory,~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + location: :inventory, +** Processing line: ~ ordinal_x: 1, ordinal_y: 0~ - Inside source: true *** True Line Result - -** Processing line: ~ def large_white_typeset~ + ordinal_x: 1, ordinal_y: 0 +** Processing line: ~ },~ - Inside source: true *** True Line Result - def large_white_typeset -** Processing line: ~ [5, 0, 255, 255, 255]~ + }, +** Processing line: ~ {~ - Inside source: true *** True Line Result - [5, 0, 255, 255, 255] -** Processing line: ~ end~ + { +** Processing line: ~ id: :plank,~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + id: :plank, +** Processing line: ~ quantity: 5,~ - Inside source: true *** True Line Result - -** Processing line: ~ def at_beginning?~ + quantity: 5, +** Processing line: ~ path: 'sprites/plank.png',~ - Inside source: true *** True Line Result - def at_beginning? -** Processing line: ~ state.walls.count == 0~ + path: 'sprites/plank.png', +** Processing line: ~ location: :inventory,~ - Inside source: true *** True Line Result - state.walls.count == 0 -** Processing line: ~ end~ + location: :inventory, +** Processing line: ~ ordinal_x: 2, ordinal_y: 0~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + ordinal_x: 2, ordinal_y: 0 +** Processing line: ~ },~ - Inside source: true *** True Line Result - -** Processing line: ~ def dragon_collision_box~ + }, +** Processing line: ~ ]~ - Inside source: true *** True Line Result - def dragon_collision_box -** Processing line: ~ state.dragon_sprite~ + ] +** Processing line: ~~ - Inside source: true *** True Line Result - state.dragon_sprite -** Processing line: ~ .scale_rect(1.0 - collision_forgiveness, 0.5, 0.5)~ + +** Processing line: ~ # after initializing the oridinal positions, derive the pixel~ - Inside source: true *** True Line Result - .scale_rect(1.0 - collision_forgiveness, 0.5, 0.5) -** Processing line: ~ .rect_shift_right(10)~ + # after initializing the oridinal positions, derive the pixel +** Processing line: ~ # locations assuming that the width and height are 80~ - Inside source: true *** True Line Result - .rect_shift_right(10) -** Processing line: ~ .rect_shift_up(state.dy * 2)~ + # locations assuming that the width and height are 80 +** Processing line: ~ args.state.items.each { |item| set_inventory_position args, item }~ - Inside source: true *** True Line Result - .rect_shift_up(state.dy * 2) + args.state.items.each { |item| set_inventory_position args, item } ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -91160,178 +98187,186 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def game_over?~ +** Processing line: ~ # define all the oridinal positions of the inventory slots~ - Inside source: true *** True Line Result - def game_over? -** Processing line: ~ return true if state.y <= 0.-(500 * collision_forgiveness) && !at_beginning?~ + # define all the oridinal positions of the inventory slots +** Processing line: ~ if !args.state.inventory_area~ - Inside source: true *** True Line Result - return true if state.y <= 0.-(500 * collision_forgiveness) && !at_beginning? -** Processing line: ~~ + if !args.state.inventory_area +** Processing line: ~ args.state.inventory_area = [~ - Inside source: true *** True Line Result - -** Processing line: ~ state.walls~ + args.state.inventory_area = [ +** Processing line: ~ { ordinal_x: 0, ordinal_y: 0 },~ - Inside source: true *** True Line Result - state.walls -** Processing line: ~ .flat_map { |w| w.sprites }~ + { ordinal_x: 0, ordinal_y: 0 }, +** Processing line: ~ { ordinal_x: 1, ordinal_y: 0 },~ - Inside source: true *** True Line Result - .flat_map { |w| w.sprites } -** Processing line: ~ .any? do |s|~ + { ordinal_x: 1, ordinal_y: 0 }, +** Processing line: ~ { ordinal_x: 2, ordinal_y: 0 },~ - Inside source: true *** True Line Result - .any? do |s| -** Processing line: ~ s.intersect_rect?(dragon_collision_box)~ + { ordinal_x: 2, ordinal_y: 0 }, +** Processing line: ~ { ordinal_x: 3, ordinal_y: 0 },~ - Inside source: true *** True Line Result - s.intersect_rect?(dragon_collision_box) -** Processing line: ~ end~ + { ordinal_x: 3, ordinal_y: 0 }, +** Processing line: ~ { ordinal_x: 4, ordinal_y: 0 },~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + { ordinal_x: 4, ordinal_y: 0 }, +** Processing line: ~ { ordinal_x: 5, ordinal_y: 0 },~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + { ordinal_x: 5, ordinal_y: 0 }, +** Processing line: ~ { ordinal_x: 6, ordinal_y: 0 },~ - Inside source: true *** True Line Result - -** Processing line: ~ def collision_forgiveness~ + { ordinal_x: 6, ordinal_y: 0 }, +** Processing line: ~ { ordinal_x: 7, ordinal_y: 0 },~ - Inside source: true *** True Line Result - def collision_forgiveness -** Processing line: ~ case state.difficulty~ + { ordinal_x: 7, ordinal_y: 0 }, +** Processing line: ~ { ordinal_x: 8, ordinal_y: 0 },~ - Inside source: true *** True Line Result - case state.difficulty -** Processing line: ~ when :easy~ + { ordinal_x: 8, ordinal_y: 0 }, +** Processing line: ~ { ordinal_x: 9, ordinal_y: 0 },~ - Inside source: true *** True Line Result - when :easy -** Processing line: ~ 0.9~ + { ordinal_x: 9, ordinal_y: 0 }, +** Processing line: ~ { ordinal_x: 0, ordinal_y: 1 },~ - Inside source: true *** True Line Result - 0.9 -** Processing line: ~ when :normal~ + { ordinal_x: 0, ordinal_y: 1 }, +** Processing line: ~ { ordinal_x: 1, ordinal_y: 1 },~ - Inside source: true *** True Line Result - when :normal -** Processing line: ~ 0.7~ + { ordinal_x: 1, ordinal_y: 1 }, +** Processing line: ~ { ordinal_x: 2, ordinal_y: 1 },~ - Inside source: true *** True Line Result - 0.7 -** Processing line: ~ when :hard~ + { ordinal_x: 2, ordinal_y: 1 }, +** Processing line: ~ { ordinal_x: 3, ordinal_y: 1 },~ - Inside source: true *** True Line Result - when :hard -** Processing line: ~ 0.5~ + { ordinal_x: 3, ordinal_y: 1 }, +** Processing line: ~ { ordinal_x: 4, ordinal_y: 1 },~ - Inside source: true *** True Line Result - 0.5 -** Processing line: ~ when :flappy~ + { ordinal_x: 4, ordinal_y: 1 }, +** Processing line: ~ { ordinal_x: 5, ordinal_y: 1 },~ - Inside source: true *** True Line Result - when :flappy -** Processing line: ~ 0.3~ + { ordinal_x: 5, ordinal_y: 1 }, +** Processing line: ~ { ordinal_x: 6, ordinal_y: 1 },~ - Inside source: true *** True Line Result - 0.3 -** Processing line: ~ else~ + { ordinal_x: 6, ordinal_y: 1 }, +** Processing line: ~ { ordinal_x: 7, ordinal_y: 1 },~ - Inside source: true *** True Line Result - else -** Processing line: ~ 0.9~ + { ordinal_x: 7, ordinal_y: 1 }, +** Processing line: ~ { ordinal_x: 8, ordinal_y: 1 },~ - Inside source: true *** True Line Result - 0.9 -** Processing line: ~ end~ + { ordinal_x: 8, ordinal_y: 1 }, +** Processing line: ~ { ordinal_x: 9, ordinal_y: 1 },~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + { ordinal_x: 9, ordinal_y: 1 }, +** Processing line: ~ { ordinal_x: 0, ordinal_y: 2 },~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + { ordinal_x: 0, ordinal_y: 2 }, +** Processing line: ~ { ordinal_x: 1, ordinal_y: 2 },~ - Inside source: true *** True Line Result - -** Processing line: ~ def countdown_text~ + { ordinal_x: 1, ordinal_y: 2 }, +** Processing line: ~ { ordinal_x: 2, ordinal_y: 2 },~ - Inside source: true *** True Line Result - def countdown_text -** Processing line: ~ state.countdown ||= -1~ + { ordinal_x: 2, ordinal_y: 2 }, +** Processing line: ~ { ordinal_x: 3, ordinal_y: 2 },~ - Inside source: true *** True Line Result - state.countdown ||= -1 -** Processing line: ~ return "" if state.countdown == 0~ + { ordinal_x: 3, ordinal_y: 2 }, +** Processing line: ~ { ordinal_x: 4, ordinal_y: 2 },~ - Inside source: true *** True Line Result - return "" if state.countdown == 0 -** Processing line: ~ return "GO!" if state.countdown.idiv(60) == 0~ + { ordinal_x: 4, ordinal_y: 2 }, +** Processing line: ~ { ordinal_x: 5, ordinal_y: 2 },~ - Inside source: true *** True Line Result - return "GO!" if state.countdown.idiv(60) == 0 -** Processing line: ~ return "GAME OVER" if state.death_at~ + { ordinal_x: 5, ordinal_y: 2 }, +** Processing line: ~ { ordinal_x: 6, ordinal_y: 2 },~ - Inside source: true *** True Line Result - return "GAME OVER" if state.death_at -** Processing line: ~ return "READY?"~ + { ordinal_x: 6, ordinal_y: 2 }, +** Processing line: ~ { ordinal_x: 7, ordinal_y: 2 },~ - Inside source: true *** True Line Result - return "READY?" -** Processing line: ~ end~ + { ordinal_x: 7, ordinal_y: 2 }, +** Processing line: ~ { ordinal_x: 8, ordinal_y: 2 },~ - Inside source: true *** True Line Result - end + { ordinal_x: 8, ordinal_y: 2 }, +** Processing line: ~ { ordinal_x: 9, ordinal_y: 2 },~ +- Inside source: true +*** True Line Result + { ordinal_x: 9, ordinal_y: 2 }, +** Processing line: ~ ]~ +- Inside source: true +*** True Line Result + ] ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def begin_countdown~ +** Processing line: ~ # after initializing the oridinal positions, derive the pixel~ - Inside source: true *** True Line Result - def begin_countdown -** Processing line: ~ state.countdown = 4.seconds~ + # after initializing the oridinal positions, derive the pixel +** Processing line: ~ # locations assuming that the width and height are 80~ - Inside source: true *** True Line Result - state.countdown = 4.seconds -** Processing line: ~ end~ + # locations assuming that the width and height are 80 +** Processing line: ~ args.state.inventory_area.each { |i| set_inventory_position args, i }~ - Inside source: true *** True Line Result - end + args.state.inventory_area.each { |i| set_inventory_position args, i } ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def score_text~ +** Processing line: ~ # if you want to see the result you can use the Ruby function called "puts".~ - Inside source: true *** True Line Result - def score_text -** Processing line: ~ return "" unless state.countdown > 1.seconds~ + # if you want to see the result you can use the Ruby function called "puts". +** Processing line: ~ # Uncomment this line to see the value.~ - Inside source: true *** True Line Result - return "" unless state.countdown > 1.seconds -** Processing line: ~ return "" unless state.death_at~ + # Uncomment this line to see the value. +** Processing line: ~ # puts args.state.inventory_area~ - Inside source: true *** True Line Result - return "" unless state.death_at -** Processing line: ~ return "SCORE: 0 (LOL)" if state.score == 0~ + # puts args.state.inventory_area +** Processing line: ~~ - Inside source: true *** True Line Result - return "SCORE: 0 (LOL)" if state.score == 0 -** Processing line: ~ return "HI SCORE: #{state.score}" if state.score == state.hi_score~ + +** Processing line: ~ # You can see all things written via puts in DragonRuby's Console, or under logs/log.txt.~ - Inside source: true *** True Line Result - return "HI SCORE: #{state.score}" if state.score == state.hi_score -** Processing line: ~ return "SCORE: #{state.score}"~ + # You can see all things written via puts in DragonRuby's Console, or under logs/log.txt. +** Processing line: ~ # To bring up DragonRuby's Console, press the ~ key within the game.~ - Inside source: true *** True Line Result - return "SCORE: #{state.score}" + # To bring up DragonRuby's Console, press the ~ key within the game. ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -91340,74 +98375,74 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def reset_game set_flash = true~ +** Processing line: ~ # define all the oridinal positions of the craft slots~ - Inside source: true *** True Line Result - def reset_game set_flash = true -** Processing line: ~ state.flash_at = state.tick_count if set_flash~ + # define all the oridinal positions of the craft slots +** Processing line: ~ if !args.state.craft_area~ - Inside source: true *** True Line Result - state.flash_at = state.tick_count if set_flash -** Processing line: ~ state.walls = []~ + if !args.state.craft_area +** Processing line: ~ args.state.craft_area = [~ - Inside source: true *** True Line Result - state.walls = [] -** Processing line: ~ state.y = 500~ + args.state.craft_area = [ +** Processing line: ~ { ordinal_x: 0, ordinal_y: 0 },~ - Inside source: true *** True Line Result - state.y = 500 -** Processing line: ~ state.dy = 0~ + { ordinal_x: 0, ordinal_y: 0 }, +** Processing line: ~ { ordinal_x: 0, ordinal_y: 1 },~ - Inside source: true *** True Line Result - state.dy = 0 -** Processing line: ~ state.hi_score = state.hi_score.greater(state.score)~ + { ordinal_x: 0, ordinal_y: 1 }, +** Processing line: ~ { ordinal_x: 0, ordinal_y: 2 },~ - Inside source: true *** True Line Result - state.hi_score = state.hi_score.greater(state.score) -** Processing line: ~ state.score = 0~ + { ordinal_x: 0, ordinal_y: 2 }, +** Processing line: ~ { ordinal_x: 1, ordinal_y: 0 },~ - Inside source: true *** True Line Result - state.score = 0 -** Processing line: ~ state.wall_countdown = state.wall_countdown_length.fdiv(2)~ + { ordinal_x: 1, ordinal_y: 0 }, +** Processing line: ~ { ordinal_x: 1, ordinal_y: 1 },~ - Inside source: true *** True Line Result - state.wall_countdown = state.wall_countdown_length.fdiv(2) -** Processing line: ~ state.show_death = false~ + { ordinal_x: 1, ordinal_y: 1 }, +** Processing line: ~ { ordinal_x: 1, ordinal_y: 2 },~ - Inside source: true *** True Line Result - state.show_death = false -** Processing line: ~ state.death_at = nil~ + { ordinal_x: 1, ordinal_y: 2 }, +** Processing line: ~ { ordinal_x: 2, ordinal_y: 0 },~ - Inside source: true *** True Line Result - state.death_at = nil -** Processing line: ~ end~ + { ordinal_x: 2, ordinal_y: 0 }, +** Processing line: ~ { ordinal_x: 2, ordinal_y: 1 },~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + { ordinal_x: 2, ordinal_y: 1 }, +** Processing line: ~ { ordinal_x: 2, ordinal_y: 2 },~ - Inside source: true *** True Line Result - -** Processing line: ~ def change_to_scene scene~ + { ordinal_x: 2, ordinal_y: 2 }, +** Processing line: ~ ]~ - Inside source: true *** True Line Result - def change_to_scene scene -** Processing line: ~ state.scene = scene~ + ] +** Processing line: ~~ - Inside source: true *** True Line Result - state.scene = scene -** Processing line: ~ state.scene_at = state.tick_count~ + +** Processing line: ~ # after initializing the oridinal positions, derive the pixel~ - Inside source: true *** True Line Result - state.scene_at = state.tick_count -** Processing line: ~ inputs.keyboard.clear~ + # after initializing the oridinal positions, derive the pixel +** Processing line: ~ # locations assuming that the width and height are 80~ - Inside source: true *** True Line Result - inputs.keyboard.clear -** Processing line: ~ inputs.controller_one.clear~ + # locations assuming that the width and height are 80 +** Processing line: ~ args.state.craft_area.each { |c| set_craft_position args, c }~ - Inside source: true *** True Line Result - inputs.controller_one.clear + args.state.craft_area.each { |c| set_craft_position args, c } ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -91420,606 +98455,622 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ $flappy_dragon = FlappyDragon.new~ -- Inside source: true -*** True Line Result - $flappy_dragon = FlappyDragon.new ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def tick args~ +** Processing line: ~ def render args~ - Inside source: true *** True Line Result - def tick args -** Processing line: ~ $flappy_dragon.grid = args.grid~ + def render args +** Processing line: ~ # for the results area, create a sprite that show its boundaries~ - Inside source: true *** True Line Result - $flappy_dragon.grid = args.grid -** Processing line: ~ $flappy_dragon.inputs = args.inputs~ + # for the results area, create a sprite that show its boundaries +** Processing line: ~ args.outputs.primitives << { x: args.state.result_border.x,~ - Inside source: true *** True Line Result - $flappy_dragon.inputs = args.inputs -** Processing line: ~ $flappy_dragon.state = args.state~ + args.outputs.primitives << { x: args.state.result_border.x, +** Processing line: ~ y: args.state.result_border.y,~ - Inside source: true *** True Line Result - $flappy_dragon.state = args.state -** Processing line: ~ $flappy_dragon.outputs = args.outputs~ + y: args.state.result_border.y, +** Processing line: ~ w: args.state.result_border.w,~ - Inside source: true *** True Line Result - $flappy_dragon.outputs = args.outputs -** Processing line: ~ $flappy_dragon.tick~ + w: args.state.result_border.w, +** Processing line: ~ h: args.state.result_border.h,~ - Inside source: true *** True Line Result - $flappy_dragon.tick -** Processing line: ~ end~ + h: args.state.result_border.h, +** Processing line: ~ path: 'sprites/border-black.png' }~ - Inside source: true *** True Line Result - end + path: 'sprites/border-black.png' } ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~#+end_src~ -- Line was identified as the end of a code block. -*** True Line Result -#+end_src -** Processing line: ~~ -- End of paragraph detected. -*** True Line Result - -** Processing line: ~*** Arcade - Pong - main.rb~ -- Header detected. -*** True Line Result - +** Processing line: ~ # for each inventory spot, create a sprite~ +- Inside source: true *** True Line Result -*** Arcade - Pong - main.rb -** Processing line: ~#+begin_src ruby~ -- Line was identified as the beginning of a code block. + # for each inventory spot, create a sprite +** Processing line: ~ # args.outputs.primitives is how DragonRuby performs a render.~ +- Inside source: true *** True Line Result - + # args.outputs.primitives is how DragonRuby performs a render. +** Processing line: ~ # Adding a single hash or multiple hashes to this array will tell~ +- Inside source: true *** True Line Result -#+begin_src ruby -** Processing line: ~ # ./samples/99_genre_arcade/pong/app/main.rb~ + # Adding a single hash or multiple hashes to this array will tell +** Processing line: ~ # DragonRuby to render those primitives on that frame.~ - Inside source: true *** True Line Result - # ./samples/99_genre_arcade/pong/app/main.rb -** Processing line: ~ def tick args~ + # DragonRuby to render those primitives on that frame. +** Processing line: ~~ - Inside source: true *** True Line Result - def tick args -** Processing line: ~ defaults args~ + +** Processing line: ~ # The .map function on Array is used instead of any kind of looping.~ - Inside source: true *** True Line Result - defaults args -** Processing line: ~ render args~ + # The .map function on Array is used instead of any kind of looping. +** Processing line: ~ # .map returns a new object for every object within an Array.~ - Inside source: true *** True Line Result - render args -** Processing line: ~ calc args~ + # .map returns a new object for every object within an Array. +** Processing line: ~ args.outputs.primitives << args.state.inventory_area.map do |a|~ - Inside source: true *** True Line Result - calc args -** Processing line: ~ input args~ + args.outputs.primitives << args.state.inventory_area.map do |a| +** Processing line: ~ { x: a.x, y: a.y, w: a.w, h: a.h, path: 'sprites/border-black.png' }~ - Inside source: true *** True Line Result - input args -** Processing line: ~ end~ + { x: a.x, y: a.y, w: a.w, h: a.h, path: 'sprites/border-black.png' } +** Processing line: ~ end~ - Inside source: true *** True Line Result - end + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def defaults args~ +** Processing line: ~ # for each craft spot, create a sprite~ - Inside source: true *** True Line Result - def defaults args -** Processing line: ~ args.state.ball.debounce ||= 3 * 60~ + # for each craft spot, create a sprite +** Processing line: ~ args.outputs.primitives << args.state.craft_area.map do |a|~ - Inside source: true *** True Line Result - args.state.ball.debounce ||= 3 * 60 -** Processing line: ~ args.state.ball.size ||= 10~ + args.outputs.primitives << args.state.craft_area.map do |a| +** Processing line: ~ { x: a.x, y: a.y, w: a.w, h: a.h, path: 'sprites/border-black.png' }~ - Inside source: true *** True Line Result - args.state.ball.size ||= 10 -** Processing line: ~ args.state.ball.size_half ||= args.state.ball.size / 2~ + { x: a.x, y: a.y, w: a.w, h: a.h, path: 'sprites/border-black.png' } +** Processing line: ~ end~ - Inside source: true *** True Line Result - args.state.ball.size_half ||= args.state.ball.size / 2 -** Processing line: ~ args.state.ball.x ||= 640~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - args.state.ball.x ||= 640 -** Processing line: ~ args.state.ball.y ||= 360~ + +** Processing line: ~ # after the borders have been rendered, render the~ - Inside source: true *** True Line Result - args.state.ball.y ||= 360 -** Processing line: ~ args.state.ball.dx ||= 5.randomize(:sign)~ + # after the borders have been rendered, render the +** Processing line: ~ # items within those slots (and allow for highlighting)~ - Inside source: true *** True Line Result - args.state.ball.dx ||= 5.randomize(:sign) -** Processing line: ~ args.state.ball.dy ||= 5.randomize(:sign)~ + # items within those slots (and allow for highlighting) +** Processing line: ~ # if an item isn't currently being held~ - Inside source: true *** True Line Result - args.state.ball.dy ||= 5.randomize(:sign) -** Processing line: ~ args.state.left_paddle.y ||= 360~ + # if an item isn't currently being held +** Processing line: ~ allow_inventory_highlighting = !args.state.held_item~ - Inside source: true *** True Line Result - args.state.left_paddle.y ||= 360 -** Processing line: ~ args.state.right_paddle.y ||= 360~ + allow_inventory_highlighting = !args.state.held_item +** Processing line: ~~ - Inside source: true *** True Line Result - args.state.right_paddle.y ||= 360 -** Processing line: ~ args.state.paddle.h ||= 120~ + +** Processing line: ~ # go through each item and render them~ - Inside source: true *** True Line Result - args.state.paddle.h ||= 120 -** Processing line: ~ args.state.paddle.w ||= 10~ + # go through each item and render them +** Processing line: ~ # use Array's find_all method to remove any items that are currently being held~ - Inside source: true *** True Line Result - args.state.paddle.w ||= 10 -** Processing line: ~ args.state.left_paddle.score ||= 0~ + # use Array's find_all method to remove any items that are currently being held +** Processing line: ~ args.state.items.find_all { |item| item[:location] != :held }.map do |item|~ - Inside source: true *** True Line Result - args.state.left_paddle.score ||= 0 -** Processing line: ~ args.state.right_paddle.score ||= 0~ + args.state.items.find_all { |item| item[:location] != :held }.map do |item| +** Processing line: ~ # if an item is currently being held, don't render it in it's spot within the~ - Inside source: true *** True Line Result - args.state.right_paddle.score ||= 0 -** Processing line: ~ end~ + # if an item is currently being held, don't render it in it's spot within the +** Processing line: ~ # inventory or craft area (this is handled via the find_all method).~ - Inside source: true *** True Line Result - end + # inventory or craft area (this is handled via the find_all method). ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def render args~ +** Processing line: ~ # the item_prefab returns a hash containing all the visual components of an item.~ - Inside source: true *** True Line Result - def render args -** Processing line: ~ render_center_line args~ + # the item_prefab returns a hash containing all the visual components of an item. +** Processing line: ~ # the main sprite, the black background, the quantity text, and a hover indication~ - Inside source: true *** True Line Result - render_center_line args -** Processing line: ~ render_scores args~ + # the main sprite, the black background, the quantity text, and a hover indication +** Processing line: ~ # if the mouse is currently hovering over the item.~ - Inside source: true *** True Line Result - render_scores args -** Processing line: ~ render_countdown args~ + # if the mouse is currently hovering over the item. +** Processing line: ~ args.outputs.primitives << item_prefab(args, item, allow_inventory_highlighting, args.inputs.mouse)~ - Inside source: true *** True Line Result - render_countdown args -** Processing line: ~ render_ball args~ + args.outputs.primitives << item_prefab(args, item, allow_inventory_highlighting, args.inputs.mouse) +** Processing line: ~ end~ - Inside source: true *** True Line Result - render_ball args -** Processing line: ~ render_paddles args~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - render_paddles args -** Processing line: ~ render_instructions args~ + +** Processing line: ~ # The last thing we want to render is the item currently being held.~ - Inside source: true *** True Line Result - render_instructions args -** Processing line: ~ end~ + # The last thing we want to render is the item currently being held. +** Processing line: ~ args.outputs.primitives << item_prefab(args, args.state.held_item, allow_inventory_highlighting, args.inputs.mouse)~ - Inside source: true *** True Line Result - end + args.outputs.primitives << item_prefab(args, args.state.held_item, allow_inventory_highlighting, args.inputs.mouse) ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ begin :render_methods~ +** Processing line: ~ args.outputs.primitives << args.state.click_ripples~ - Inside source: true *** True Line Result - begin :render_methods -** Processing line: ~ def render_center_line args~ + args.outputs.primitives << args.state.click_ripples +** Processing line: ~~ - Inside source: true *** True Line Result - def render_center_line args -** Processing line: ~ args.outputs.lines << [640, 0, 640, 720]~ + +** Processing line: ~ # render a mouse cursor since we have the OS cursor hidden~ - Inside source: true *** True Line Result - args.outputs.lines << [640, 0, 640, 720] -** Processing line: ~ end~ + # render a mouse cursor since we have the OS cursor hidden +** Processing line: ~ args.outputs.primitives << { x: args.inputs.mouse.x - 5, y: args.inputs.mouse.y - 5, w: 10, h: 10, path: 'sprites/circle-gray.png', a: 128 }~ - Inside source: true *** True Line Result - end + args.outputs.primitives << { x: args.inputs.mouse.x - 5, y: args.inputs.mouse.y - 5, w: 10, h: 10, path: 'sprites/circle-gray.png', a: 128 } +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def render_scores args~ +** Processing line: ~ # Alrighty! This is where all the fun happens~ - Inside source: true *** True Line Result - def render_scores args -** Processing line: ~ args.outputs.labels << [~ + # Alrighty! This is where all the fun happens +** Processing line: ~ def input args~ - Inside source: true *** True Line Result - args.outputs.labels << [ -** Processing line: ~ [320, 650, args.state.left_paddle.score, 10, 1],~ + def input args +** Processing line: ~ # if the mouse is clicked and not item is currently being held~ - Inside source: true *** True Line Result - [320, 650, args.state.left_paddle.score, 10, 1], -** Processing line: ~ [960, 650, args.state.right_paddle.score, 10, 1]~ + # if the mouse is clicked and not item is currently being held +** Processing line: ~ # args.state.held_item is nil when the game starts.~ - Inside source: true *** True Line Result - [960, 650, args.state.right_paddle.score, 10, 1] -** Processing line: ~ ]~ + # args.state.held_item is nil when the game starts. +** Processing line: ~ # If the player clicks, the property args.inputs.mouse.click will~ - Inside source: true *** True Line Result - ] -** Processing line: ~ end~ + # If the player clicks, the property args.inputs.mouse.click will +** Processing line: ~ # be a non nil value, we don't want to process any of the code here~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + # be a non nil value, we don't want to process any of the code here +** Processing line: ~ # if the mouse hasn't been clicked~ - Inside source: true *** True Line Result - -** Processing line: ~ def render_countdown args~ + # if the mouse hasn't been clicked +** Processing line: ~ return if !args.inputs.mouse.click~ - Inside source: true *** True Line Result - def render_countdown args -** Processing line: ~ return unless args.state.ball.debounce > 0~ + return if !args.inputs.mouse.click +** Processing line: ~~ - Inside source: true *** True Line Result - return unless args.state.ball.debounce > 0 -** Processing line: ~ args.outputs.labels << [640, 360, "%.2f" % args.state.ball.debounce.fdiv(60), 10, 1]~ + +** Processing line: ~ # if a click occurred, add a ripple to the ripple queue~ - Inside source: true *** True Line Result - args.outputs.labels << [640, 360, "%.2f" % args.state.ball.debounce.fdiv(60), 10, 1] -** Processing line: ~ end~ + # if a click occurred, add a ripple to the ripple queue +** Processing line: ~ args.state.click_ripples << { x: args.inputs.mouse.x - 5, y: args.inputs.mouse.y - 5, w: 10, h: 10, path: 'sprites/circle-gray.png', a: 128 }~ - Inside source: true *** True Line Result - end + args.state.click_ripples << { x: args.inputs.mouse.x - 5, y: args.inputs.mouse.y - 5, w: 10, h: 10, path: 'sprites/circle-gray.png', a: 128 } ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def render_ball args~ +** Processing line: ~ # if the mouse has been clicked, and no item is currently held...~ - Inside source: true *** True Line Result - def render_ball args -** Processing line: ~ args.outputs.solids << solid_ball(args)~ + # if the mouse has been clicked, and no item is currently held... +** Processing line: ~ if !args.state.held_item~ - Inside source: true *** True Line Result - args.outputs.solids << solid_ball(args) -** Processing line: ~ end~ + if !args.state.held_item +** Processing line: ~ # see if any of the items intersect the pointer using the inside_rect? method~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + # see if any of the items intersect the pointer using the inside_rect? method +** Processing line: ~ # the find method will either return the first object that returns true~ - Inside source: true *** True Line Result - -** Processing line: ~ def render_paddles args~ + # the find method will either return the first object that returns true +** Processing line: ~ # for the match clause, or it'll return nil if nothing matches the match clause~ - Inside source: true *** True Line Result - def render_paddles args -** Processing line: ~ args.outputs.solids << solid_left_paddle(args)~ + # for the match clause, or it'll return nil if nothing matches the match clause +** Processing line: ~ found = args.state.items.find do |item|~ - Inside source: true *** True Line Result - args.outputs.solids << solid_left_paddle(args) -** Processing line: ~ args.outputs.solids << solid_right_paddle(args)~ + found = args.state.items.find do |item| +** Processing line: ~ # for each item in args.state.items, run the following boolean check~ - Inside source: true *** True Line Result - args.outputs.solids << solid_right_paddle(args) -** Processing line: ~ end~ + # for each item in args.state.items, run the following boolean check +** Processing line: ~ args.inputs.mouse.click.point.inside_rect?(item)~ - Inside source: true *** True Line Result - end + args.inputs.mouse.click.point.inside_rect?(item) +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def render_instructions args~ +** Processing line: ~ # if an item intersects the mouse pointer, then set the item's location to :held and~ - Inside source: true *** True Line Result - def render_instructions args -** Processing line: ~ args.outputs.labels << [320, 30, "W and S keys to move left paddle.", 0, 1]~ + # if an item intersects the mouse pointer, then set the item's location to :held and +** Processing line: ~ # set args.state.held_item to the item for later reference~ - Inside source: true *** True Line Result - args.outputs.labels << [320, 30, "W and S keys to move left paddle.", 0, 1] -** Processing line: ~ args.outputs.labels << [920, 30, "O and L keys to move right paddle.", 0, 1]~ + # set args.state.held_item to the item for later reference +** Processing line: ~ if found~ - Inside source: true *** True Line Result - args.outputs.labels << [920, 30, "O and L keys to move right paddle.", 0, 1] -** Processing line: ~ end~ + if found +** Processing line: ~ args.state.held_item = found~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + args.state.held_item = found +** Processing line: ~ found[:location] = :held~ - Inside source: true *** True Line Result - end + found[:location] = :held +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def calc args~ +** Processing line: ~ # if the mouse is clicked and an item is currently beign held....~ - Inside source: true *** True Line Result - def calc args -** Processing line: ~ args.state.ball.debounce -= 1 and return if args.state.ball.debounce > 0~ + # if the mouse is clicked and an item is currently beign held.... +** Processing line: ~ elsif args.state.held_item~ - Inside source: true *** True Line Result - args.state.ball.debounce -= 1 and return if args.state.ball.debounce > 0 -** Processing line: ~ calc_move_ball args~ + elsif args.state.held_item +** Processing line: ~ # determine if a slot within the craft area was clicked~ - Inside source: true *** True Line Result - calc_move_ball args -** Processing line: ~ calc_collision_with_left_paddle args~ + # determine if a slot within the craft area was clicked +** Processing line: ~ craft_area = args.state.craft_area.find { |a| args.inputs.mouse.click.point.inside_rect? a }~ - Inside source: true *** True Line Result - calc_collision_with_left_paddle args -** Processing line: ~ calc_collision_with_right_paddle args~ + craft_area = args.state.craft_area.find { |a| args.inputs.mouse.click.point.inside_rect? a } +** Processing line: ~~ - Inside source: true *** True Line Result - calc_collision_with_right_paddle args -** Processing line: ~ calc_collision_with_walls args~ + +** Processing line: ~ # also determine if a slot within the inventory area was clicked~ - Inside source: true *** True Line Result - calc_collision_with_walls args -** Processing line: ~ end~ + # also determine if a slot within the inventory area was clicked +** Processing line: ~ inventory_area = args.state.inventory_area.find { |a| args.inputs.mouse.click.point.inside_rect? a }~ - Inside source: true *** True Line Result - end + inventory_area = args.state.inventory_area.find { |a| args.inputs.mouse.click.point.inside_rect? a } ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ begin :calc_methods~ +** Processing line: ~ # if the click was within a craft area~ - Inside source: true *** True Line Result - begin :calc_methods -** Processing line: ~ def calc_move_ball args~ + # if the click was within a craft area +** Processing line: ~ if craft_area~ - Inside source: true *** True Line Result - def calc_move_ball args -** Processing line: ~ args.state.ball.x += args.state.ball.dx~ + if craft_area +** Processing line: ~ # check to see if an item is already there and ignore the click if an item is found~ - Inside source: true *** True Line Result - args.state.ball.x += args.state.ball.dx -** Processing line: ~ args.state.ball.y += args.state.ball.dy~ + # check to see if an item is already there and ignore the click if an item is found +** Processing line: ~ # item_at_craft_slot is a helper method that returns an item or nil for a given oridinal~ - Inside source: true *** True Line Result - args.state.ball.y += args.state.ball.dy -** Processing line: ~ end~ + # item_at_craft_slot is a helper method that returns an item or nil for a given oridinal +** Processing line: ~ # position~ - Inside source: true *** True Line Result - end + # position +** Processing line: ~ item_already_there = item_at_craft_slot args, craft_area[:ordinal_x], craft_area[:ordinal_y]~ +- Inside source: true +*** True Line Result + item_already_there = item_at_craft_slot args, craft_area[:ordinal_x], craft_area[:ordinal_y] ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def calc_collision_with_left_paddle args~ +** Processing line: ~ # if an item *doesn't* exist in the craft area~ - Inside source: true *** True Line Result - def calc_collision_with_left_paddle args -** Processing line: ~ if solid_left_paddle(args).intersect_rect? solid_ball(args)~ + # if an item *doesn't* exist in the craft area +** Processing line: ~ if !item_already_there~ - Inside source: true *** True Line Result - if solid_left_paddle(args).intersect_rect? solid_ball(args) -** Processing line: ~ args.state.ball.dx *= -1~ + if !item_already_there +** Processing line: ~ # if the quantity they are currently holding is greater than 1~ - Inside source: true *** True Line Result - args.state.ball.dx *= -1 -** Processing line: ~ elsif args.state.ball.x < 0~ + # if the quantity they are currently holding is greater than 1 +** Processing line: ~ if args.state.held_item[:quantity] > 1~ - Inside source: true *** True Line Result - elsif args.state.ball.x < 0 -** Processing line: ~ args.state.right_paddle.score += 1~ + if args.state.held_item[:quantity] > 1 +** Processing line: ~ # remove one item (creating a seperate item of the same type), and place it~ - Inside source: true *** True Line Result - args.state.right_paddle.score += 1 -** Processing line: ~ calc_reset_round args~ + # remove one item (creating a seperate item of the same type), and place it +** Processing line: ~ # at the oridinal position and location of the craft area~ - Inside source: true *** True Line Result - calc_reset_round args -** Processing line: ~ end~ + # at the oridinal position and location of the craft area +** Processing line: ~ # the .merge method on Hash creates a new Hash, but updates any values~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + # the .merge method on Hash creates a new Hash, but updates any values +** Processing line: ~ # passed as arguments to merge~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + # passed as arguments to merge +** Processing line: ~ new_item = args.state.held_item.merge(quantity: 1,~ - Inside source: true *** True Line Result - -** Processing line: ~ def calc_collision_with_right_paddle args~ + new_item = args.state.held_item.merge(quantity: 1, +** Processing line: ~ location: :craft,~ - Inside source: true *** True Line Result - def calc_collision_with_right_paddle args -** Processing line: ~ if solid_right_paddle(args).intersect_rect? solid_ball(args)~ + location: :craft, +** Processing line: ~ ordinal_x: craft_area[:ordinal_x],~ - Inside source: true *** True Line Result - if solid_right_paddle(args).intersect_rect? solid_ball(args) -** Processing line: ~ args.state.ball.dx *= -1~ + ordinal_x: craft_area[:ordinal_x], +** Processing line: ~ ordinal_y: craft_area[:ordinal_y])~ - Inside source: true *** True Line Result - args.state.ball.dx *= -1 -** Processing line: ~ elsif args.state.ball.x > 1280~ + ordinal_y: craft_area[:ordinal_y]) +** Processing line: ~~ - Inside source: true *** True Line Result - elsif args.state.ball.x > 1280 -** Processing line: ~ args.state.left_paddle.score += 1~ + +** Processing line: ~ # after the item is crated, place it into the args.state.items collection~ - Inside source: true *** True Line Result - args.state.left_paddle.score += 1 -** Processing line: ~ calc_reset_round args~ + # after the item is crated, place it into the args.state.items collection +** Processing line: ~ args.state.items << new_item~ - Inside source: true *** True Line Result - calc_reset_round args -** Processing line: ~ end~ + args.state.items << new_item +** Processing line: ~~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + +** Processing line: ~ # then subtract one from the held item~ - Inside source: true *** True Line Result - end + # then subtract one from the held item +** Processing line: ~ args.state.held_item[:quantity] -= 1~ +- Inside source: true +*** True Line Result + args.state.held_item[:quantity] -= 1 ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def calc_collision_with_walls args~ +** Processing line: ~ # if the craft area is available and there is only one item being held~ - Inside source: true *** True Line Result - def calc_collision_with_walls args -** Processing line: ~ if args.state.ball.y + args.state.ball.size_half > 720~ + # if the craft area is available and there is only one item being held +** Processing line: ~ elsif args.state.held_item[:quantity] == 1~ - Inside source: true *** True Line Result - if args.state.ball.y + args.state.ball.size_half > 720 -** Processing line: ~ args.state.ball.y = 720 - args.state.ball.size_half~ + elsif args.state.held_item[:quantity] == 1 +** Processing line: ~ # instead of creating any new items just set the location of the held item~ - Inside source: true *** True Line Result - args.state.ball.y = 720 - args.state.ball.size_half -** Processing line: ~ args.state.ball.dy *= -1~ + # instead of creating any new items just set the location of the held item +** Processing line: ~ # to the oridinal position of the craft area, and then nil out the~ - Inside source: true *** True Line Result - args.state.ball.dy *= -1 -** Processing line: ~ elsif args.state.ball.y - args.state.ball.size_half < 0~ + # to the oridinal position of the craft area, and then nil out the +** Processing line: ~ # held item state so that a new item can be picked up~ - Inside source: true *** True Line Result - elsif args.state.ball.y - args.state.ball.size_half < 0 -** Processing line: ~ args.state.ball.y = args.state.ball.size_half~ + # held item state so that a new item can be picked up +** Processing line: ~ args.state.held_item[:location] = :craft~ - Inside source: true *** True Line Result - args.state.ball.y = args.state.ball.size_half -** Processing line: ~ args.state.ball.dy *= -1~ + args.state.held_item[:location] = :craft +** Processing line: ~ args.state.held_item[:ordinal_x] = craft_area[:ordinal_x]~ - Inside source: true *** True Line Result - args.state.ball.dy *= -1 -** Processing line: ~ end~ + args.state.held_item[:ordinal_x] = craft_area[:ordinal_x] +** Processing line: ~ args.state.held_item[:ordinal_y] = craft_area[:ordinal_y]~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + args.state.held_item[:ordinal_y] = craft_area[:ordinal_y] +** Processing line: ~ args.state.held_item = nil~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + args.state.held_item = nil +** Processing line: ~ end~ - Inside source: true *** True Line Result - -** Processing line: ~ def calc_reset_round args~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - def calc_reset_round args -** Processing line: ~ args.state.ball.x = 640~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - args.state.ball.x = 640 -** Processing line: ~ args.state.ball.y = 360~ + +** Processing line: ~ # if the selected area is an inventory area (as opposed to within the craft area)~ - Inside source: true *** True Line Result - args.state.ball.y = 360 -** Processing line: ~ args.state.ball.dx = 5.randomize(:sign)~ + # if the selected area is an inventory area (as opposed to within the craft area) +** Processing line: ~ elsif inventory_area~ - Inside source: true *** True Line Result - args.state.ball.dx = 5.randomize(:sign) -** Processing line: ~ args.state.ball.dy = 5.randomize(:sign)~ + elsif inventory_area +** Processing line: ~~ - Inside source: true *** True Line Result - args.state.ball.dy = 5.randomize(:sign) -** Processing line: ~ args.state.ball.debounce = 3 * 60~ + +** Processing line: ~ # check to see if there is already an item in that inventory slot~ - Inside source: true *** True Line Result - args.state.ball.debounce = 3 * 60 -** Processing line: ~ end~ + # check to see if there is already an item in that inventory slot +** Processing line: ~ # the item_at_inventory_slot helper method returns an item or nil~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + # the item_at_inventory_slot helper method returns an item or nil +** Processing line: ~ item_already_there = item_at_inventory_slot args, inventory_area[:ordinal_x], inventory_area[:ordinal_y]~ - Inside source: true *** True Line Result - end + item_already_there = item_at_inventory_slot args, inventory_area[:ordinal_x], inventory_area[:ordinal_y] ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def input args~ +** Processing line: ~ # if there is already an item there, and the item types/id match~ - Inside source: true *** True Line Result - def input args -** Processing line: ~ input_left_paddle args~ + # if there is already an item there, and the item types/id match +** Processing line: ~ if item_already_there && item_already_there[:id] == args.state.held_item[:id]~ - Inside source: true *** True Line Result - input_left_paddle args -** Processing line: ~ input_right_paddle args~ + if item_already_there && item_already_there[:id] == args.state.held_item[:id] +** Processing line: ~ # then merge the item quantities~ - Inside source: true *** True Line Result - input_right_paddle args -** Processing line: ~ end~ + # then merge the item quantities +** Processing line: ~ held_quantity = args.state.held_item[:quantity]~ - Inside source: true *** True Line Result - end + held_quantity = args.state.held_item[:quantity] +** Processing line: ~ item_already_there[:quantity] += held_quantity~ +- Inside source: true +*** True Line Result + item_already_there[:quantity] += held_quantity ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ begin :input_methods~ +** Processing line: ~ # remove the item being held from the items collection (since it's quantity is now 0)~ - Inside source: true *** True Line Result - begin :input_methods -** Processing line: ~ def input_left_paddle args~ + # remove the item being held from the items collection (since it's quantity is now 0) +** Processing line: ~ args.state.items.reject! { |i| i[:location] == :held }~ - Inside source: true *** True Line Result - def input_left_paddle args -** Processing line: ~ if args.inputs.controller_one.key_down.down || args.inputs.keyboard.key_down.s~ + args.state.items.reject! { |i| i[:location] == :held } +** Processing line: ~~ - Inside source: true *** True Line Result - if args.inputs.controller_one.key_down.down || args.inputs.keyboard.key_down.s -** Processing line: ~ args.state.left_paddle.y -= 40~ + +** Processing line: ~ # nil out the held_item so a new item can be picked up~ - Inside source: true *** True Line Result - args.state.left_paddle.y -= 40 -** Processing line: ~ elsif args.inputs.controller_one.key_down.up || args.inputs.keyboard.key_down.w~ + # nil out the held_item so a new item can be picked up +** Processing line: ~ args.state.held_item = nil~ - Inside source: true *** True Line Result - elsif args.inputs.controller_one.key_down.up || args.inputs.keyboard.key_down.w -** Processing line: ~ args.state.left_paddle.y += 40~ + args.state.held_item = nil +** Processing line: ~~ - Inside source: true *** True Line Result - args.state.left_paddle.y += 40 -** Processing line: ~ end~ + +** Processing line: ~ # if there currently isn't an item there, then put the held item in the slot~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + # if there currently isn't an item there, then put the held item in the slot +** Processing line: ~ elsif !item_already_there~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + elsif !item_already_there +** Processing line: ~ args.state.held_item[:location] = :inventory~ - Inside source: true *** True Line Result - -** Processing line: ~ def input_right_paddle args~ + args.state.held_item[:location] = :inventory +** Processing line: ~ args.state.held_item[:ordinal_x] = inventory_area[:ordinal_x]~ - Inside source: true *** True Line Result - def input_right_paddle args -** Processing line: ~ if args.inputs.controller_two.key_down.down || args.inputs.keyboard.key_down.l~ + args.state.held_item[:ordinal_x] = inventory_area[:ordinal_x] +** Processing line: ~ args.state.held_item[:ordinal_y] = inventory_area[:ordinal_y]~ - Inside source: true *** True Line Result - if args.inputs.controller_two.key_down.down || args.inputs.keyboard.key_down.l -** Processing line: ~ args.state.right_paddle.y -= 40~ + args.state.held_item[:ordinal_y] = inventory_area[:ordinal_y] +** Processing line: ~~ - Inside source: true *** True Line Result - args.state.right_paddle.y -= 40 -** Processing line: ~ elsif args.inputs.controller_two.key_down.up || args.inputs.keyboard.key_down.o~ + +** Processing line: ~ # nil out the held_item so a new item can be picked up~ - Inside source: true *** True Line Result - elsif args.inputs.controller_two.key_down.up || args.inputs.keyboard.key_down.o -** Processing line: ~ args.state.right_paddle.y += 40~ + # nil out the held_item so a new item can be picked up +** Processing line: ~ args.state.held_item = nil~ - Inside source: true *** True Line Result - args.state.right_paddle.y += 40 + args.state.held_item = nil +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -92036,66 +99087,74 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ begin :assets~ +** Processing line: ~ # the calc method is executed after input~ - Inside source: true *** True Line Result - begin :assets -** Processing line: ~ def solid_ball args~ + # the calc method is executed after input +** Processing line: ~ def calc args~ - Inside source: true *** True Line Result - def solid_ball args -** Processing line: ~ centered_rect args.state.ball.x, args.state.ball.y, args.state.ball.size, args.state.ball.size~ + def calc args +** Processing line: ~ # make sure that the real position of the inventory~ - Inside source: true *** True Line Result - centered_rect args.state.ball.x, args.state.ball.y, args.state.ball.size, args.state.ball.size -** Processing line: ~ end~ + # make sure that the real position of the inventory +** Processing line: ~ # items are updated every frame to ensure that they~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + # items are updated every frame to ensure that they +** Processing line: ~ # are placed correctly given their location and oridinal positions~ - Inside source: true *** True Line Result - -** Processing line: ~ def solid_left_paddle args~ + # are placed correctly given their location and oridinal positions +** Processing line: ~ # instead of using .map, here we use .each (since we are not returning a new item and just updating the items in place)~ - Inside source: true *** True Line Result - def solid_left_paddle args -** Processing line: ~ centered_rect_vertically 0, args.state.left_paddle.y, args.state.paddle.w, args.state.paddle.h~ + # instead of using .map, here we use .each (since we are not returning a new item and just updating the items in place) +** Processing line: ~ args.state.items.each do |item|~ - Inside source: true *** True Line Result - centered_rect_vertically 0, args.state.left_paddle.y, args.state.paddle.w, args.state.paddle.h -** Processing line: ~ end~ + args.state.items.each do |item| +** Processing line: ~ # based on the location of the item, invoke the correct pixel conversion method~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + # based on the location of the item, invoke the correct pixel conversion method +** Processing line: ~ if item[:location] == :inventory~ - Inside source: true *** True Line Result - -** Processing line: ~ def solid_right_paddle args~ + if item[:location] == :inventory +** Processing line: ~ set_inventory_position args, item~ - Inside source: true *** True Line Result - def solid_right_paddle args -** Processing line: ~ centered_rect_vertically 1280 - args.state.paddle.w, args.state.right_paddle.y, args.state.paddle.w, args.state.paddle.h~ + set_inventory_position args, item +** Processing line: ~ elsif item[:location] == :craft~ - Inside source: true *** True Line Result - centered_rect_vertically 1280 - args.state.paddle.w, args.state.right_paddle.y, args.state.paddle.w, args.state.paddle.h -** Processing line: ~ end~ + elsif item[:location] == :craft +** Processing line: ~ set_craft_position args, item~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + set_craft_position args, item +** Processing line: ~ elsif item[:location] == :held~ - Inside source: true *** True Line Result - -** Processing line: ~ def centered_rect x, y, w, h~ + elsif item[:location] == :held +** Processing line: ~ # if the item is held, center the item around the mouse pointer~ - Inside source: true *** True Line Result - def centered_rect x, y, w, h -** Processing line: ~ [x - w / 2, y - h / 2, w, h]~ + # if the item is held, center the item around the mouse pointer +** Processing line: ~ args.state.held_item.x = args.inputs.mouse.x - args.state.held_item.w.half~ - Inside source: true *** True Line Result - [x - w / 2, y - h / 2, w, h] + args.state.held_item.x = args.inputs.mouse.x - args.state.held_item.w.half +** Processing line: ~ args.state.held_item.y = args.inputs.mouse.y - args.state.held_item.h.half~ +- Inside source: true +*** True Line Result + args.state.held_item.y = args.inputs.mouse.y - args.state.held_item.h.half +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -92104,270 +99163,270 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def centered_rect_vertically x, y, w, h~ +** Processing line: ~ # for each hash/sprite in the click ripples queue,~ - Inside source: true *** True Line Result - def centered_rect_vertically x, y, w, h -** Processing line: ~ [x, y - h / 2, w, h]~ + # for each hash/sprite in the click ripples queue, +** Processing line: ~ # expand its size by 20 percent and decrease its alpha~ - Inside source: true *** True Line Result - [x, y - h / 2, w, h] -** Processing line: ~ end~ + # expand its size by 20 percent and decrease its alpha +** Processing line: ~ # by 10.~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + # by 10. +** Processing line: ~ args.state.click_ripples.each do |ripple|~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + args.state.click_ripples.each do |ripple| +** Processing line: ~ delta_w = ripple.w * 1.2 - ripple.w~ - Inside source: true *** True Line Result - -** Processing line: ~#+end_src~ -- Line was identified as the end of a code block. -*** True Line Result -#+end_src -** Processing line: ~~ -- End of paragraph detected. -*** True Line Result - -** Processing line: ~*** Arcade - Snakemoji - main.rb~ -- Header detected. -*** True Line Result - -*** True Line Result -*** Arcade - Snakemoji - main.rb -** Processing line: ~#+begin_src ruby~ -- Line was identified as the beginning of a code block. -*** True Line Result - + delta_w = ripple.w * 1.2 - ripple.w +** Processing line: ~ delta_h = ripple.h * 1.2 - ripple.h~ +- Inside source: true *** True Line Result -#+begin_src ruby -** Processing line: ~ # ./samples/99_genre_arcade/snakemoji/app/main.rb~ + delta_h = ripple.h * 1.2 - ripple.h +** Processing line: ~ ripple.x -= delta_w.half~ - Inside source: true *** True Line Result - # ./samples/99_genre_arcade/snakemoji/app/main.rb -** Processing line: ~ # coding: utf-8~ + ripple.x -= delta_w.half +** Processing line: ~ ripple.y -= delta_h.half~ - Inside source: true *** True Line Result - # coding: utf-8 -** Processing line: ~ ################################~ + ripple.y -= delta_h.half +** Processing line: ~ ripple.w += delta_w~ - Inside source: true *** True Line Result - ################################ -** Processing line: ~ # So I was working on a snake game while~ + ripple.w += delta_w +** Processing line: ~ ripple.h += delta_h~ - Inside source: true *** True Line Result - # So I was working on a snake game while -** Processing line: ~ # learning DragonRuby, and at some point I had a thought~ + ripple.h += delta_h +** Processing line: ~ ripple.a -= 10~ - Inside source: true *** True Line Result - # learning DragonRuby, and at some point I had a thought -** Processing line: ~ # what if I use "😀" as a function name, surely it wont work right...?~ + ripple.a -= 10 +** Processing line: ~ end~ - Inside source: true *** True Line Result - # what if I use "😀" as a function name, surely it wont work right...? -** Processing line: ~ # RIGHT....?~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - # RIGHT....? -** Processing line: ~ # BUT IT DID, IT WORKED~ + +** Processing line: ~ # remove any items from the collection where the alpha value is less than equal to~ - Inside source: true *** True Line Result - # BUT IT DID, IT WORKED -** Processing line: ~ # it all went downhill from then~ + # remove any items from the collection where the alpha value is less than equal to +** Processing line: ~ # zero using the reject! method (reject with an exclamation point at the end changes the~ - Inside source: true *** True Line Result - # it all went downhill from then -** Processing line: ~ # Created by Anton K. (ai Doge)~ + # zero using the reject! method (reject with an exclamation point at the end changes the +** Processing line: ~ # array value in place, while reject without the exclamation point returns a new array).~ - Inside source: true *** True Line Result - # Created by Anton K. (ai Doge) -** Processing line: ~ # https://gist.github.com/scorp200~ + # array value in place, while reject without the exclamation point returns a new array). +** Processing line: ~ args.state.click_ripples.reject! { |ripple| ripple.a <= 0 }~ - Inside source: true *** True Line Result - # https://gist.github.com/scorp200 -** Processing line: ~ #############LICENSE############~ + args.state.click_ripples.reject! { |ripple| ripple.a <= 0 } +** Processing line: ~ end~ - Inside source: true *** True Line Result - #############LICENSE############ -** Processing line: ~ # Feel free to use this anywhere and however you want~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - # Feel free to use this anywhere and however you want -** Processing line: ~ # You can sell this to EA for $1,000,000 if you want, its completely free.~ + +** Processing line: ~ # helper function for finding an item at a craft slot~ - Inside source: true *** True Line Result - # You can sell this to EA for $1,000,000 if you want, its completely free. -** Processing line: ~ # Just rememeber you are helping this... thing... to spread...~ + # helper function for finding an item at a craft slot +** Processing line: ~ def item_at_craft_slot args, ordinal_x, ordinal_y~ - Inside source: true *** True Line Result - # Just rememeber you are helping this... thing... to spread... -** Processing line: ~ # ALSO! I am not liable for any mental, physical or financial damage caused.~ + def item_at_craft_slot args, ordinal_x, ordinal_y +** Processing line: ~ args.state.items.find { |i| i[:location] == :craft && i[:ordinal_x] == ordinal_x && i[:ordinal_y] == ordinal_y }~ - Inside source: true *** True Line Result - # ALSO! I am not liable for any mental, physical or financial damage caused. -** Processing line: ~ #############LICENSE############~ + args.state.items.find { |i| i[:location] == :craft && i[:ordinal_x] == ordinal_x && i[:ordinal_y] == ordinal_y } +** Processing line: ~ end~ - Inside source: true *** True Line Result - #############LICENSE############ + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~~ +** Processing line: ~ # helper function for finding an item at an inventory slot~ - Inside source: true *** True Line Result - -** Processing line: ~ class Array~ + # helper function for finding an item at an inventory slot +** Processing line: ~ def item_at_inventory_slot args, ordinal_x, ordinal_y~ - Inside source: true *** True Line Result - class Array -** Processing line: ~ #Helper function~ + def item_at_inventory_slot args, ordinal_x, ordinal_y +** Processing line: ~ args.state.items.find { |i| i[:location] == :inventory && i[:ordinal_x] == ordinal_x && i[:ordinal_y] == ordinal_y }~ - Inside source: true *** True Line Result - #Helper function -** Processing line: ~ def move! vector~ + args.state.items.find { |i| i[:location] == :inventory && i[:ordinal_x] == ordinal_x && i[:ordinal_y] == ordinal_y } +** Processing line: ~ end~ - Inside source: true *** True Line Result - def move! vector -** Processing line: ~ self.x += vector.x~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - self.x += vector.x -** Processing line: ~ self.y += vector.y~ + +** Processing line: ~ # helper function that creates a visual representation of an item~ - Inside source: true *** True Line Result - self.y += vector.y -** Processing line: ~ return self~ + # helper function that creates a visual representation of an item +** Processing line: ~ def item_prefab args, item, should_highlight, mouse~ - Inside source: true *** True Line Result - return self -** Processing line: ~ end~ + def item_prefab args, item, should_highlight, mouse +** Processing line: ~ return nil unless item~ - Inside source: true *** True Line Result - end + return nil unless item ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ #Helper function to draw snake body~ +** Processing line: ~ overlay = nil~ - Inside source: true *** True Line Result - #Helper function to draw snake body -** Processing line: ~ def draw! 🎮, 📺, color~ + overlay = nil +** Processing line: ~~ - Inside source: true *** True Line Result - def draw! 🎮, 📺, color -** Processing line: ~ translate 📺.solids, 🎮.⛓, [self.x * 🎮.⚖️ + 🎮.🛶 / 2, self.y * 🎮.⚖️ + 🎮.🛶 / 2, 🎮.⚖️ - 🎮.🛶, 🎮.⚖️ - 🎮.🛶, color]~ + +** Processing line: ~ x = item.x~ - Inside source: true *** True Line Result - translate 📺.solids, 🎮.⛓, [self.x * 🎮.⚖️ + 🎮.🛶 / 2, self.y * 🎮.⚖️ + 🎮.🛶 / 2, 🎮.⚖️ - 🎮.🛶, 🎮.⚖️ - 🎮.🛶, color] -** Processing line: ~ end~ + x = item.x +** Processing line: ~ y = item.y~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + y = item.y +** Processing line: ~ w = item.w~ - Inside source: true *** True Line Result - -** Processing line: ~ #This is where it all started, I was trying to find good way to multiply a map by a number, * is already used so is **~ + w = item.w +** Processing line: ~ h = item.h~ - Inside source: true *** True Line Result - #This is where it all started, I was trying to find good way to multiply a map by a number, * is already used so is ** -** Processing line: ~ #I kept trying different combinations of symbols, when suddenly...~ + h = item.h +** Processing line: ~~ - Inside source: true *** True Line Result - #I kept trying different combinations of symbols, when suddenly... -** Processing line: ~ def 😀 value~ + +** Processing line: ~ if should_highlight && mouse.point.inside_rect?(item)~ - Inside source: true *** True Line Result - def 😀 value -** Processing line: ~ self.map {|d| d * value}~ + if should_highlight && mouse.point.inside_rect?(item) +** Processing line: ~ overlay = { x: x, y: y, w: w, h: h, path: "sprites/square-blue.png", a: 130, }~ - Inside source: true *** True Line Result - self.map {|d| d * value} + overlay = { x: x, y: y, w: w, h: h, path: "sprites/square-blue.png", a: 130, } ** Processing line: ~ end~ - Inside source: true *** True Line Result end -** Processing line: ~ end~ +** Processing line: ~~ - Inside source: true *** True Line Result - end + +** Processing line: ~ [~ +- Inside source: true +*** True Line Result + [ +** Processing line: ~ # sprites are hashes with a path property, this is the main sprite~ +- Inside source: true +*** True Line Result + # sprites are hashes with a path property, this is the main sprite +** Processing line: ~ { x: x, y: y, w: args.state.sprite_size, h: args.state.sprite_size, path: item[:path], },~ +- Inside source: true +*** True Line Result + { x: x, y: y, w: args.state.sprite_size, h: args.state.sprite_size, path: item[:path], }, ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ #Draw stuff with an offset~ +** Processing line: ~ # this represents the black area in the bottom right corner of the main sprite so that the~ - Inside source: true *** True Line Result - #Draw stuff with an offset -** Processing line: ~ def translate output_collection, ⛓, what~ + # this represents the black area in the bottom right corner of the main sprite so that the +** Processing line: ~ # quantity is visible~ - Inside source: true *** True Line Result - def translate output_collection, ⛓, what -** Processing line: ~ what.x += ⛓.x~ + # quantity is visible +** Processing line: ~ { x: x + 55, y: y, w: 25, h: 25, path: "sprites/square-black.png", }, # sprites are hashes with a path property~ - Inside source: true *** True Line Result - what.x += ⛓.x -** Processing line: ~ what.y += ⛓.y~ + { x: x + 55, y: y, w: 25, h: 25, path: "sprites/square-black.png", }, # sprites are hashes with a path property +** Processing line: ~~ - Inside source: true *** True Line Result - what.y += ⛓.y -** Processing line: ~ output_collection << what~ + +** Processing line: ~ # labels are hashes with a text property~ - Inside source: true *** True Line Result - output_collection << what -** Processing line: ~ end~ + # labels are hashes with a text property +** Processing line: ~ { x: x + 56, y: y + 22, text: "#{item[:quantity]}", r: 255, g: 255, b: 255, },~ - Inside source: true *** True Line Result - end + { x: x + 56, y: y + 22, text: "#{item[:quantity]}", r: 255, g: 255, b: 255, }, ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ BLUE = [33, 150, 243]~ +** Processing line: ~ # this is the mouse overlay, if the overlay isn't applicable, then this value will be nil (nil values will not be rendered)~ - Inside source: true *** True Line Result - BLUE = [33, 150, 243] -** Processing line: ~ RED = [244, 67, 54]~ + # this is the mouse overlay, if the overlay isn't applicable, then this value will be nil (nil values will not be rendered) +** Processing line: ~ overlay~ - Inside source: true *** True Line Result - RED = [244, 67, 54] -** Processing line: ~ GOLD = [255, 193, 7]~ + overlay +** Processing line: ~ ]~ - Inside source: true *** True Line Result - GOLD = [255, 193, 7] -** Processing line: ~ LAST = 0~ + ] +** Processing line: ~ end~ - Inside source: true *** True Line Result - LAST = 0 + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def tick args~ +** Processing line: ~ # helper function for deriving the position of an item within inventory~ - Inside source: true *** True Line Result - def tick args -** Processing line: ~ defaults args.state~ + # helper function for deriving the position of an item within inventory +** Processing line: ~ def set_inventory_position args, item~ - Inside source: true *** True Line Result - defaults args.state -** Processing line: ~ render args.state, args.outputs~ + def set_inventory_position args, item +** Processing line: ~ item.x = args.state.inventory_border.x + item[:ordinal_x] * 80~ - Inside source: true *** True Line Result - render args.state, args.outputs -** Processing line: ~ input args.state, args.inputs~ + item.x = args.state.inventory_border.x + item[:ordinal_x] * 80 +** Processing line: ~ item.y = (args.state.inventory_border.y + args.state.inventory_border.h - 80) - item[:ordinal_y] * 80~ - Inside source: true *** True Line Result - input args.state, args.inputs -** Processing line: ~ update args.state~ + item.y = (args.state.inventory_border.y + args.state.inventory_border.h - 80) - item[:ordinal_y] * 80 +** Processing line: ~ item.w = 80~ - Inside source: true *** True Line Result - update args.state + item.w = 80 +** Processing line: ~ item.h = 80~ +- Inside source: true +*** True Line Result + item.h = 80 ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -92376,186 +99435,174 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def update 🎮~ +** Processing line: ~ # helper function for deriving the position of an item within the craft area~ - Inside source: true *** True Line Result - def update 🎮 -** Processing line: ~ #Update every 10 frames~ + # helper function for deriving the position of an item within the craft area +** Processing line: ~ def set_craft_position args, item~ - Inside source: true *** True Line Result - #Update every 10 frames -** Processing line: ~ if 🎮.tick_count.mod_zero? 10~ + def set_craft_position args, item +** Processing line: ~ item.x = args.state.craft_border.x + item[:ordinal_x] * 80~ - Inside source: true *** True Line Result - if 🎮.tick_count.mod_zero? 10 -** Processing line: ~ #Add new snake body piece at head's location~ + item.x = args.state.craft_border.x + item[:ordinal_x] * 80 +** Processing line: ~ item.y = (args.state.craft_border.y + args.state.inventory_border.h - 80) - item[:ordinal_y] * 80~ - Inside source: true *** True Line Result - #Add new snake body piece at head's location -** Processing line: ~ 🎮.🐍 << [*🎮.🤖]~ + item.y = (args.state.craft_border.y + args.state.inventory_border.h - 80) - item[:ordinal_y] * 80 +** Processing line: ~ item.w = 80~ - Inside source: true *** True Line Result - 🎮.🐍 << [*🎮.🤖] -** Processing line: ~ #Assign Next Direction to Direction~ + item.w = 80 +** Processing line: ~ item.h = 80~ - Inside source: true *** True Line Result - #Assign Next Direction to Direction -** Processing line: ~ 🎮.🚗 = *🎮.🚦~ + item.h = 80 +** Processing line: ~ end~ - Inside source: true *** True Line Result - 🎮.🚗 = *🎮.🚦 + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ #Trim the snake a bit if its longer than current size~ +** Processing line: ~ # Any lines outside of a function will be executed when the file is reloaded.~ - Inside source: true *** True Line Result - #Trim the snake a bit if its longer than current size -** Processing line: ~ if 🎮.🐍.length > 🎮.🛒~ + # Any lines outside of a function will be executed when the file is reloaded. +** Processing line: ~ # So every time you save main.rb, the game will be reset.~ - Inside source: true *** True Line Result - if 🎮.🐍.length > 🎮.🛒 -** Processing line: ~ 🎮.🐍 = 🎮.🐍[-🎮.🛒..-1]~ + # So every time you save main.rb, the game will be reset. +** Processing line: ~ # Comment out the line below if you don't want this to happen.~ - Inside source: true *** True Line Result - 🎮.🐍 = 🎮.🐍[-🎮.🛒..-1] -** Processing line: ~ end~ + # Comment out the line below if you don't want this to happen. +** Processing line: ~ $gtk.reset~ - Inside source: true *** True Line Result - end + $gtk.reset ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ #Move the head in the Direction~ -- Inside source: true -*** True Line Result - #Move the head in the Direction -** Processing line: ~ 🎮.🤖.move! 🎮.🚗~ -- Inside source: true +** Processing line: ~#+end_src~ +- Line was identified as the end of a code block. *** True Line Result - 🎮.🤖.move! 🎮.🚗 +#+end_src ** Processing line: ~~ -- Inside source: true +- End of paragraph detected. *** True Line Result -** Processing line: ~ #If Head is outside the playing field, or inside snake's body restart game~ -- Inside source: true -*** True Line Result - #If Head is outside the playing field, or inside snake's body restart game -** Processing line: ~ if 🎮.🤖.x < 0 || 🎮.🤖.x >= 🎮.🗺.x || 🎮.🤖.y < 0 || 🎮.🤖.y >= 🎮.🗺.y || 🎮.🚗 != [0, 0] && 🎮.🐍.any? {|s| s == 🎮.🤖}~ -- Inside source: true +** Processing line: ~*** Crafting - Farming Game Starting Point - main.rb~ +- Header detected. *** True Line Result - if 🎮.🤖.x < 0 || 🎮.🤖.x >= 🎮.🗺.x || 🎮.🤖.y < 0 || 🎮.🤖.y >= 🎮.🗺.y || 🎮.🚗 != [0, 0] && 🎮.🐍.any? {|s| s == 🎮.🤖} -** Processing line: ~ LAST = 🎮.💰~ -- Inside source: true + *** True Line Result - LAST = 🎮.💰 -** Processing line: ~ 🎮.as_hash.clear~ -- Inside source: true +*** Crafting - Farming Game Starting Point - main.rb +** Processing line: ~#+begin_src ruby~ +- Line was identified as the beginning of a code block. *** True Line Result - 🎮.as_hash.clear -** Processing line: ~ return~ -- Inside source: true + *** True Line Result - return -** Processing line: ~ end~ +#+begin_src ruby +** Processing line: ~ # ./samples/99_genre_crafting/farming_game_starting_point/app/main.rb~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + # ./samples/99_genre_crafting/farming_game_starting_point/app/main.rb +** Processing line: ~ def tick args~ - Inside source: true *** True Line Result - -** Processing line: ~ #If head lands on food add size and score~ + def tick args +** Processing line: ~ args.state.tile_size = 80~ - Inside source: true *** True Line Result - #If head lands on food add size and score -** Processing line: ~ if 🎮.🤖 == 🎮.🍎~ + args.state.tile_size = 80 +** Processing line: ~ args.state.player_speed = 4~ - Inside source: true *** True Line Result - if 🎮.🤖 == 🎮.🍎 -** Processing line: ~ 🎮.🛒 += 1~ + args.state.player_speed = 4 +** Processing line: ~ args.state.player ||= tile(args, 7, 3, 0, 128, 180)~ - Inside source: true *** True Line Result - 🎮.🛒 += 1 -** Processing line: ~ 🎮.💰 += (🎮.🛒 * 0.8).floor.to_i + 5~ + args.state.player ||= tile(args, 7, 3, 0, 128, 180) +** Processing line: ~ generate_map args~ - Inside source: true *** True Line Result - 🎮.💰 += (🎮.🛒 * 0.8).floor.to_i + 5 -** Processing line: ~ spawn_🍎 🎮~ + generate_map args +** Processing line: ~ #press j to plant a green onion~ - Inside source: true *** True Line Result - spawn_🍎 🎮 -** Processing line: ~ puts 🎮.🍎~ + #press j to plant a green onion +** Processing line: ~ if args.inputs.keyboard.j~ - Inside source: true *** True Line Result - puts 🎮.🍎 -** Processing line: ~ end~ + if args.inputs.keyboard.j +** Processing line: ~ #change this part you can change what you want to plant~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + #change this part you can change what you want to plant +** Processing line: ~ args.state.walls << tile(args, ((args.state.player.x+80)/args.state.tile_size), ((args.state.player.y)/args.state.tile_size), 255, 255, 255)~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + args.state.walls << tile(args, ((args.state.player.x+80)/args.state.tile_size), ((args.state.player.y)/args.state.tile_size), 255, 255, 255) +** Processing line: ~ args.state.plants << tile(args, ((args.state.player.x+80)/args.state.tile_size), ((args.state.player.y+80)/args.state.tile_size), 0, 160, 0)~ - Inside source: true *** True Line Result - -** Processing line: ~ #Every second remove 1 point~ + args.state.plants << tile(args, ((args.state.player.x+80)/args.state.tile_size), ((args.state.player.y+80)/args.state.tile_size), 0, 160, 0) +** Processing line: ~ end~ - Inside source: true *** True Line Result - #Every second remove 1 point -** Processing line: ~ if 🎮.💰 > 0 && 🎮.tick_count.mod_zero?(60)~ + end +** Processing line: ~ # Adds walls, background, and player to args.outputs.solids so they appear on screen~ - Inside source: true *** True Line Result - if 🎮.💰 > 0 && 🎮.tick_count.mod_zero?(60) -** Processing line: ~ 🎮.💰 -= 1~ + # Adds walls, background, and player to args.outputs.solids so they appear on screen +** Processing line: ~ args.outputs.solids << [0,0,1280,720, 237,189,101]~ - Inside source: true *** True Line Result - 🎮.💰 -= 1 -** Processing line: ~ end~ + args.outputs.solids << [0,0,1280,720, 237,189,101] +** Processing line: ~ args.outputs.sprites << [0, 0, 1280, 720, 'sprites/background.png']~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + args.outputs.sprites << [0, 0, 1280, 720, 'sprites/background.png'] +** Processing line: ~ args.outputs.solids << args.state.walls~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + args.outputs.solids << args.state.walls +** Processing line: ~ args.outputs.solids << args.state.player~ - Inside source: true *** True Line Result - -** Processing line: ~ def spawn_🍎 🎮~ + args.outputs.solids << args.state.player +** Processing line: ~ args.outputs.solids << args.state.plants~ - Inside source: true *** True Line Result - def spawn_🍎 🎮 -** Processing line: ~ #Food~ + args.outputs.solids << args.state.plants +** Processing line: ~ args.outputs.labels << [320, 640, "press J to plant", 3, 1, 255, 0, 0, 200]~ - Inside source: true *** True Line Result - #Food -** Processing line: ~ 🎮.🍎 ||= [*🎮.🤖]~ + args.outputs.labels << [320, 640, "press J to plant", 3, 1, 255, 0, 0, 200] +** Processing line: ~~ - Inside source: true *** True Line Result - 🎮.🍎 ||= [*🎮.🤖] -** Processing line: ~ #Randomly spawns food inside the playing field, keep doing this if the food keeps landing on the snake's body~ + +** Processing line: ~ move_player args, -1, 0 if args.inputs.keyboard.left # x position decreases by 1 if left key is pressed~ - Inside source: true *** True Line Result - #Randomly spawns food inside the playing field, keep doing this if the food keeps landing on the snake's body -** Processing line: ~ while 🎮.🐍.any? {|s| s == 🎮.🍎} || 🎮.🍎 == 🎮.🤖 do~ + move_player args, -1, 0 if args.inputs.keyboard.left # x position decreases by 1 if left key is pressed +** Processing line: ~ move_player args, 1, 0 if args.inputs.keyboard.right # x position increases by 1 if right key is pressed~ - Inside source: true *** True Line Result - while 🎮.🐍.any? {|s| s == 🎮.🍎} || 🎮.🍎 == 🎮.🤖 do -** Processing line: ~ 🎮.🍎 = [rand(🎮.🗺.x), rand(🎮.🗺.y)]~ + move_player args, 1, 0 if args.inputs.keyboard.right # x position increases by 1 if right key is pressed +** Processing line: ~ move_player args, 0, 1 if args.inputs.keyboard.up # y position increases by 1 if up is pressed~ - Inside source: true *** True Line Result - 🎮.🍎 = [rand(🎮.🗺.x), rand(🎮.🗺.y)] -** Processing line: ~ end~ + move_player args, 0, 1 if args.inputs.keyboard.up # y position increases by 1 if up is pressed +** Processing line: ~ move_player args, 0, -1 if args.inputs.keyboard.down # y position decreases by 1 if down is pressed~ - Inside source: true *** True Line Result - end + move_player args, 0, -1 if args.inputs.keyboard.down # y position decreases by 1 if down is pressed ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -92564,246 +99611,238 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def render 🎮, 📺~ +** Processing line: ~ # Sets position, size, and color of the tile~ - Inside source: true *** True Line Result - def render 🎮, 📺 -** Processing line: ~ #Paint the background black~ + # Sets position, size, and color of the tile +** Processing line: ~ def tile args, x, y, *color~ - Inside source: true *** True Line Result - #Paint the background black -** Processing line: ~ 📺.solids << [0, 0, 1280, 720, 0, 0, 0, 255]~ + def tile args, x, y, *color +** Processing line: ~ [x * args.state.tile_size, # sets definition for array using method parameters~ - Inside source: true *** True Line Result - 📺.solids << [0, 0, 1280, 720, 0, 0, 0, 255] -** Processing line: ~ #Draw a border for the playing field~ + [x * args.state.tile_size, # sets definition for array using method parameters +** Processing line: ~ y * args.state.tile_size, # multiplying by tile_size sets x and y to correct position using pixel values~ - Inside source: true *** True Line Result - #Draw a border for the playing field -** Processing line: ~ translate 📺.borders, 🎮.⛓, [0, 0, 🎮.🗺.x * 🎮.⚖️, 🎮.🗺.y * 🎮.⚖️, 255, 255, 255]~ + y * args.state.tile_size, # multiplying by tile_size sets x and y to correct position using pixel values +** Processing line: ~ args.state.tile_size,~ - Inside source: true *** True Line Result - translate 📺.borders, 🎮.⛓, [0, 0, 🎮.🗺.x * 🎮.⚖️, 🎮.🗺.y * 🎮.⚖️, 255, 255, 255] -** Processing line: ~~ + args.state.tile_size, +** Processing line: ~ args.state.tile_size,~ - Inside source: true *** True Line Result - -** Processing line: ~ #Draw the snake's body~ + args.state.tile_size, +** Processing line: ~ *color]~ - Inside source: true *** True Line Result - #Draw the snake's body -** Processing line: ~ 🎮.🐍.map do |🐍| 🐍.draw! 🎮, 📺, BLUE end~ + *color] +** Processing line: ~ end~ - Inside source: true *** True Line Result - 🎮.🐍.map do |🐍| 🐍.draw! 🎮, 📺, BLUE end -** Processing line: ~ #Draw the head~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - #Draw the head -** Processing line: ~ 🎮.🤖.draw! 🎮, 📺, BLUE~ + +** Processing line: ~ # Creates map by adding tiles to the wall, as well as a goal (that the player needs to reach)~ - Inside source: true *** True Line Result - 🎮.🤖.draw! 🎮, 📺, BLUE -** Processing line: ~ #Draw the food~ + # Creates map by adding tiles to the wall, as well as a goal (that the player needs to reach) +** Processing line: ~ def generate_map args~ - Inside source: true *** True Line Result - #Draw the food -** Processing line: ~ 🎮.🍎.draw! 🎮, 📺, RED~ + def generate_map args +** Processing line: ~ return if args.state.area~ - Inside source: true *** True Line Result - 🎮.🍎.draw! 🎮, 📺, RED + return if args.state.area ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ #Draw current score~ +** Processing line: ~ # Creates the area of the map. There are 9 rows running horizontally across the screen~ - Inside source: true *** True Line Result - #Draw current score -** Processing line: ~ translate 📺.labels, 🎮.⛓, [5, 715, "Score: #{🎮.💰}", GOLD]~ + # Creates the area of the map. There are 9 rows running horizontally across the screen +** Processing line: ~ # and 16 columns running vertically on the screen. Any spot with a "1" is not~ - Inside source: true *** True Line Result - translate 📺.labels, 🎮.⛓, [5, 715, "Score: #{🎮.💰}", GOLD] -** Processing line: ~ #Draw your last score, if any~ + # and 16 columns running vertically on the screen. Any spot with a "1" is not +** Processing line: ~ # open for the player to move into (and is green), and any spot with a "0" is available~ - Inside source: true *** True Line Result - #Draw your last score, if any -** Processing line: ~ translate 📺.labels, 🎮.⛓, [[*🎮.🤖.😀(🎮.⚖️)].move!([0, 🎮.⚖️ * 2]), "Your Last score is #{LAST}", 0, 1, GOLD] unless LAST == 0 || 🎮.🚗 != [0, 0]~ + # open for the player to move into (and is green), and any spot with a "0" is available +** Processing line: ~ # for the player to move in.~ - Inside source: true *** True Line Result - translate 📺.labels, 🎮.⛓, [[*🎮.🤖.😀(🎮.⚖️)].move!([0, 🎮.⚖️ * 2]), "Your Last score is #{LAST}", 0, 1, GOLD] unless LAST == 0 || 🎮.🚗 != [0, 0] -** Processing line: ~ #Draw starting message, only if Direction is 0~ + # for the player to move in. +** Processing line: ~ args.state.area = [~ - Inside source: true *** True Line Result - #Draw starting message, only if Direction is 0 -** Processing line: ~ translate 📺.labels, 🎮.⛓, [🎮.🤖.😀(🎮.⚖️), "Press any Arrow key to start", 0, 1, GOLD] unless 🎮.🚗 != [0, 0]~ + args.state.area = [ +** Processing line: ~ [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,],~ - Inside source: true *** True Line Result - translate 📺.labels, 🎮.⛓, [🎮.🤖.😀(🎮.⚖️), "Press any Arrow key to start", 0, 1, GOLD] unless 🎮.🚗 != [0, 0] -** Processing line: ~ end~ + [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,], +** Processing line: ~ [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,],~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,], +** Processing line: ~ [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,],~ - Inside source: true *** True Line Result - -** Processing line: ~ def input 🎮, 🕹~ + [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,], +** Processing line: ~ [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,],~ - Inside source: true *** True Line Result - def input 🎮, 🕹 -** Processing line: ~ #Left and Right keyboard input, only change if X direction is 0~ + [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,], +** Processing line: ~ [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,],~ - Inside source: true *** True Line Result - #Left and Right keyboard input, only change if X direction is 0 -** Processing line: ~ if 🕹.keyboard.key_held.left && 🎮.🚗.x == 0~ + [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,], +** Processing line: ~ [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,],~ - Inside source: true *** True Line Result - if 🕹.keyboard.key_held.left && 🎮.🚗.x == 0 -** Processing line: ~ 🎮.🚦 = [-1, 0]~ + [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,], +** Processing line: ~ [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,],~ - Inside source: true *** True Line Result - 🎮.🚦 = [-1, 0] -** Processing line: ~ elsif 🕹.keyboard.key_held.right && 🎮.🚗.x == 0~ + [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,], +** Processing line: ~ [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,],~ - Inside source: true *** True Line Result - elsif 🕹.keyboard.key_held.right && 🎮.🚗.x == 0 -** Processing line: ~ 🎮.🚦 = [1, 0]~ + [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,], +** Processing line: ~ [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ],~ - Inside source: true *** True Line Result - 🎮.🚦 = [1, 0] -** Processing line: ~ end~ + [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], +** Processing line: ~ ].reverse # reverses the order of the area collection~ - Inside source: true *** True Line Result - end + ].reverse # reverses the order of the area collection ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ #Up and Down keyboard input, only change if Y direction is 0~ -- Inside source: true -*** True Line Result - #Up and Down keyboard input, only change if Y direction is 0 -** Processing line: ~ if 🕹.keyboard.key_held.up && 🎮.🚗.y == 0~ +** Processing line: ~ # By reversing the order, the way that the area appears above is how it appears~ - Inside source: true *** True Line Result - if 🕹.keyboard.key_held.up && 🎮.🚗.y == 0 -** Processing line: ~ 🎮.🚦 = [0, 1]~ + # By reversing the order, the way that the area appears above is how it appears +** Processing line: ~ # on the screen in the game. If we did not reverse, the map would appear inverted.~ - Inside source: true *** True Line Result - 🎮.🚦 = [0, 1] -** Processing line: ~ elsif 🕹.keyboard.key_held.down && 🎮.🚗.y == 0~ + # on the screen in the game. If we did not reverse, the map would appear inverted. +** Processing line: ~~ - Inside source: true *** True Line Result - elsif 🕹.keyboard.key_held.down && 🎮.🚗.y == 0 -** Processing line: ~ 🎮.🚦 = [0, -1]~ + +** Processing line: ~ #The wall starts off with no tiles.~ - Inside source: true *** True Line Result - 🎮.🚦 = [0, -1] -** Processing line: ~ end~ + #The wall starts off with no tiles. +** Processing line: ~ args.state.walls = []~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + args.state.walls = [] +** Processing line: ~ args.state.plants = []~ - Inside source: true *** True Line Result - end + args.state.plants = [] ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def defaults 🎮~ -- Inside source: true -*** True Line Result - def defaults 🎮 -** Processing line: ~ #Playing field size~ +** Processing line: ~ # If v is 1, a green tile is added to args.state.walls.~ - Inside source: true *** True Line Result - #Playing field size -** Processing line: ~ 🎮.🗺 ||= [20, 20]~ + # If v is 1, a green tile is added to args.state.walls. +** Processing line: ~ # If v is 2, a black tile is created as the goal.~ - Inside source: true *** True Line Result - 🎮.🗺 ||= [20, 20] -** Processing line: ~ #Scale for drawing, screen height / Field height~ + # If v is 2, a black tile is created as the goal. +** Processing line: ~ args.state.area.map_2d do |y, x, v|~ - Inside source: true *** True Line Result - #Scale for drawing, screen height / Field height -** Processing line: ~ 🎮.⚖️ ||= 720 / 🎮.🗺.y~ + args.state.area.map_2d do |y, x, v| +** Processing line: ~ if v == 1~ - Inside source: true *** True Line Result - 🎮.⚖️ ||= 720 / 🎮.🗺.y -** Processing line: ~ #Offset, offset all rendering to the center of the screen~ + if v == 1 +** Processing line: ~ args.state.walls << tile(args, x, y, 255, 160, 156) # green tile~ - Inside source: true *** True Line Result - #Offset, offset all rendering to the center of the screen -** Processing line: ~ 🎮.⛓ ||= [(1280 - 720).fdiv(2), 0]~ + args.state.walls << tile(args, x, y, 255, 160, 156) # green tile +** Processing line: ~ end~ - Inside source: true *** True Line Result - 🎮.⛓ ||= [(1280 - 720).fdiv(2), 0] -** Processing line: ~ #Padding, make the snake body slightly smaller than the scale~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - #Padding, make the snake body slightly smaller than the scale -** Processing line: ~ 🎮.🛶 ||= (🎮.⚖️ * 0.2).to_i~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - 🎮.🛶 ||= (🎮.⚖️ * 0.2).to_i -** Processing line: ~ #Snake Size~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - #Snake Size -** Processing line: ~ 🎮.🛒 ||= 3~ + +** Processing line: ~ # Allows the player to move their box around the screen~ - Inside source: true *** True Line Result - 🎮.🛒 ||= 3 -** Processing line: ~ #Snake head, the only part we are actually controlling~ + # Allows the player to move their box around the screen +** Processing line: ~ def move_player args, *vector~ - Inside source: true *** True Line Result - #Snake head, the only part we are actually controlling -** Processing line: ~ 🎮.🤖 ||= [🎮.🗺.x / 2, 🎮.🗺.y / 2]~ + def move_player args, *vector +** Processing line: ~ box = args.state.player.shift_rect(vector) # box is able to move at an angle~ - Inside source: true *** True Line Result - 🎮.🤖 ||= [🎮.🗺.x / 2, 🎮.🗺.y / 2] -** Processing line: ~ #Snake body map, follows the head~ + box = args.state.player.shift_rect(vector) # box is able to move at an angle +** Processing line: ~~ - Inside source: true *** True Line Result - #Snake body map, follows the head -** Processing line: ~ 🎮.🐍 ||= []~ + +** Processing line: ~ # If the player's box hits a wall, it is not able to move further in that direction~ - Inside source: true *** True Line Result - 🎮.🐍 ||= [] -** Processing line: ~ #Direction the head moves to~ + # If the player's box hits a wall, it is not able to move further in that direction +** Processing line: ~ return if args.state.walls~ - Inside source: true *** True Line Result - #Direction the head moves to -** Processing line: ~ 🎮.🚗 ||= [0, 0]~ + return if args.state.walls +** Processing line: ~ .any_intersect_rect?(box)~ - Inside source: true *** True Line Result - 🎮.🚗 ||= [0, 0] -** Processing line: ~ #Next_Direction, during input check only change this variable and then when game updates asign this to Direction~ + .any_intersect_rect?(box) +** Processing line: ~~ - Inside source: true *** True Line Result - #Next_Direction, during input check only change this variable and then when game updates asign this to Direction -** Processing line: ~ 🎮.🚦 ||= [*🎮.🚗]~ + +** Processing line: ~ # Player's box is able to move at angles (not just the four general directions) fast~ - Inside source: true *** True Line Result - 🎮.🚦 ||= [*🎮.🚗] -** Processing line: ~ #Your score~ + # Player's box is able to move at angles (not just the four general directions) fast +** Processing line: ~ args.state.player =~ - Inside source: true *** True Line Result - #Your score -** Processing line: ~ 🎮.💰 ||= 0~ + args.state.player = +** Processing line: ~ args.state.player~ - Inside source: true *** True Line Result - 🎮.💰 ||= 0 -** Processing line: ~ #Spawns Food randomly~ + args.state.player +** Processing line: ~ .shift_rect(vector.x * args.state.player_speed, # if we don't multiply by speed, then~ - Inside source: true *** True Line Result - #Spawns Food randomly -** Processing line: ~ spawn_🍎(🎮) unless 🎮.🍎?~ + .shift_rect(vector.x * args.state.player_speed, # if we don't multiply by speed, then +** Processing line: ~ vector.y * args.state.player_speed) # the box will move extremely slow~ - Inside source: true *** True Line Result - spawn_🍎(🎮) unless 🎮.🍎? + vector.y * args.state.player_speed) # the box will move extremely slow ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -92820,250 +99859,250 @@ Follows is a source code listing for all files that have been open sourced. This - End of paragraph detected. *** True Line Result -** Processing line: ~*** Arcade - Solar System - main.rb~ +** Processing line: ~*** Crafting - Farming Game Starting Point - repl.rb~ - Header detected. *** True Line Result *** True Line Result -*** Arcade - Solar System - main.rb +*** Crafting - Farming Game Starting Point - repl.rb ** Processing line: ~#+begin_src ruby~ - Line was identified as the beginning of a code block. *** True Line Result *** True Line Result #+begin_src ruby -** Processing line: ~ # ./samples/99_genre_arcade/solar_system/app/main.rb~ +** Processing line: ~ # ./samples/99_genre_crafting/farming_game_starting_point/app/repl.rb~ - Inside source: true *** True Line Result - # ./samples/99_genre_arcade/solar_system/app/main.rb -** Processing line: ~ # Focused tutorial video: https://s3.amazonaws.com/s3.dragonruby.org/dragonruby-nddnug-workshop.mp4~ + # ./samples/99_genre_crafting/farming_game_starting_point/app/repl.rb +** Processing line: ~ # ===============================================================~ - Inside source: true *** True Line Result - # Focused tutorial video: https://s3.amazonaws.com/s3.dragonruby.org/dragonruby-nddnug-workshop.mp4 -** Processing line: ~ # Workshop/Presentation which provides motivation for creating a game engine: https://www.youtube.com/watch?v=S3CFce1arC8~ + # =============================================================== +** Processing line: ~ # Welcome to repl.rb~ - Inside source: true *** True Line Result - # Workshop/Presentation which provides motivation for creating a game engine: https://www.youtube.com/watch?v=S3CFce1arC8 -** Processing line: ~~ + # Welcome to repl.rb +** Processing line: ~ # ===============================================================~ - Inside source: true *** True Line Result - -** Processing line: ~ def defaults args~ + # =============================================================== +** Processing line: ~ # You can experiement with code within this file. Code in this~ - Inside source: true *** True Line Result - def defaults args -** Processing line: ~ args.outputs.background_color = [0, 0, 0]~ + # You can experiement with code within this file. Code in this +** Processing line: ~ # file is only executed when you save (and only excecuted ONCE).~ - Inside source: true *** True Line Result - args.outputs.background_color = [0, 0, 0] -** Processing line: ~ args.state.x ||= 640~ + # file is only executed when you save (and only excecuted ONCE). +** Processing line: ~ # ===============================================================~ - Inside source: true *** True Line Result - args.state.x ||= 640 -** Processing line: ~ args.state.y ||= 360~ + # =============================================================== +** Processing line: ~~ - Inside source: true *** True Line Result - args.state.y ||= 360 -** Processing line: ~ args.state.stars ||= 100.map do~ + +** Processing line: ~ # ===============================================================~ - Inside source: true *** True Line Result - args.state.stars ||= 100.map do -** Processing line: ~ [1280 * rand, 720 * rand, rand.fdiv(10), 255 * rand, 255 * rand, 255 * rand]~ + # =============================================================== +** Processing line: ~ # REMOVE the "x" from the word "xrepl" and save the file to RUN~ - Inside source: true *** True Line Result - [1280 * rand, 720 * rand, rand.fdiv(10), 255 * rand, 255 * rand, 255 * rand] -** Processing line: ~ end~ + # REMOVE the "x" from the word "xrepl" and save the file to RUN +** Processing line: ~ # the code in between the do/end block delimiters.~ - Inside source: true *** True Line Result - end + # the code in between the do/end block delimiters. +** Processing line: ~ # ===============================================================~ +- Inside source: true +*** True Line Result + # =============================================================== ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ args.state.sun ||= args.state.new_entity(:sun) do |s|~ +** Processing line: ~ # ===============================================================~ - Inside source: true *** True Line Result - args.state.sun ||= args.state.new_entity(:sun) do |s| -** Processing line: ~ s.s = 100~ + # =============================================================== +** Processing line: ~ # ADD the "x" to the word "repl" (make it xrepl) and save the~ - Inside source: true *** True Line Result - s.s = 100 -** Processing line: ~ s.path = 'sprites/sun.png'~ + # ADD the "x" to the word "repl" (make it xrepl) and save the +** Processing line: ~ # file to IGNORE the code in between the do/end block delimiters.~ - Inside source: true *** True Line Result - s.path = 'sprites/sun.png' -** Processing line: ~ end~ + # file to IGNORE the code in between the do/end block delimiters. +** Processing line: ~ # ===============================================================~ - Inside source: true *** True Line Result - end + # =============================================================== ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ args.state.planets = [~ -- Inside source: true -*** True Line Result - args.state.planets = [ -** Processing line: ~ [:mercury, 65, 5, 88],~ +** Processing line: ~ # Remove the x from xrepl to run the code. Add the x back to ignore to code.~ - Inside source: true *** True Line Result - [:mercury, 65, 5, 88], -** Processing line: ~ [:venus, 100, 10, 225],~ + # Remove the x from xrepl to run the code. Add the x back to ignore to code. +** Processing line: ~ xrepl do~ - Inside source: true *** True Line Result - [:venus, 100, 10, 225], -** Processing line: ~ [:earth, 120, 10, 365],~ + xrepl do +** Processing line: ~ puts "The result of 1 + 2 is: #{1 + 2}"~ - Inside source: true *** True Line Result - [:earth, 120, 10, 365], -** Processing line: ~ [:mars, 140, 8, 687],~ + puts "The result of 1 + 2 is: #{1 + 2}" +** Processing line: ~ end~ - Inside source: true *** True Line Result - [:mars, 140, 8, 687], -** Processing line: ~ [:jupiter, 280, 30, 365 * 11.8],~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - [:jupiter, 280, 30, 365 * 11.8], -** Processing line: ~ [:saturn, 350, 20, 365 * 29.5],~ + +** Processing line: ~ # ====================================================================================~ - Inside source: true *** True Line Result - [:saturn, 350, 20, 365 * 29.5], -** Processing line: ~ [:uranus, 400, 15, 365 * 84],~ + # ==================================================================================== +** Processing line: ~ # Ruby Crash Course:~ - Inside source: true *** True Line Result - [:uranus, 400, 15, 365 * 84], -** Processing line: ~ [:neptune, 440, 15, 365 * 164.8],~ + # Ruby Crash Course: +** Processing line: ~ # Strings, Numeric, Booleans, Conditionals, Looping, Enumerables, Arrays~ - Inside source: true *** True Line Result - [:neptune, 440, 15, 365 * 164.8], -** Processing line: ~ [:pluto, 480, 5, 365 * 247.8],~ + # Strings, Numeric, Booleans, Conditionals, Looping, Enumerables, Arrays +** Processing line: ~ # ====================================================================================~ - Inside source: true *** True Line Result - [:pluto, 480, 5, 365 * 247.8], -** Processing line: ~ ].map do |name, distance, size, year_in_days|~ + # ==================================================================================== +** Processing line: ~~ - Inside source: true *** True Line Result - ].map do |name, distance, size, year_in_days| -** Processing line: ~ args.state.new_entity(name) do |p|~ + +** Processing line: ~ # ====================================================================================~ - Inside source: true *** True Line Result - args.state.new_entity(name) do |p| -** Processing line: ~ p.path = "sprites/#{name}.png"~ + # ==================================================================================== +** Processing line: ~ # Strings~ - Inside source: true *** True Line Result - p.path = "sprites/#{name}.png" -** Processing line: ~ p.distance = distance * 0.7~ + # Strings +** Processing line: ~ # ====================================================================================~ - Inside source: true *** True Line Result - p.distance = distance * 0.7 -** Processing line: ~ p.s = size * 0.7~ + # ==================================================================================== +** Processing line: ~ # Remove the x from xrepl to run the code. Add the x back to ignore to code.~ - Inside source: true *** True Line Result - p.s = size * 0.7 -** Processing line: ~ p.year_in_days = year_in_days~ + # Remove the x from xrepl to run the code. Add the x back to ignore to code. +** Processing line: ~ xrepl do~ - Inside source: true *** True Line Result - p.year_in_days = year_in_days -** Processing line: ~ end~ + xrepl do +** Processing line: ~ message = "Hello World"~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + message = "Hello World" +** Processing line: ~ puts "The value of message is: " + message~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + puts "The value of message is: " + message +** Processing line: ~ puts "Any value can be interpolated within a string using \#{}."~ - Inside source: true *** True Line Result - -** Processing line: ~ args.state.ship ||= args.state.new_entity(:ship) do |s|~ + puts "Any value can be interpolated within a string using \#{}." +** Processing line: ~ puts "Interpolated message: #{message}."~ - Inside source: true *** True Line Result - args.state.ship ||= args.state.new_entity(:ship) do |s| -** Processing line: ~ s.x = 1280 * rand~ + puts "Interpolated message: #{message}." +** Processing line: ~ puts 'This #{message} is not interpolated because the string uses single quotes.'~ - Inside source: true *** True Line Result - s.x = 1280 * rand -** Processing line: ~ s.y = 720 * rand~ + puts 'This #{message} is not interpolated because the string uses single quotes.' +** Processing line: ~ end~ - Inside source: true *** True Line Result - s.y = 720 * rand -** Processing line: ~ s.angle = 0~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - s.angle = 0 -** Processing line: ~ end~ + +** Processing line: ~ # ====================================================================================~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + # ==================================================================================== +** Processing line: ~ # Numerics~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + # Numerics +** Processing line: ~ # ====================================================================================~ - Inside source: true *** True Line Result - -** Processing line: ~ def to_sprite args, entity~ + # ==================================================================================== +** Processing line: ~ # Remove the x from xrepl to run the code. Add the x back to ignore to code.~ - Inside source: true *** True Line Result - def to_sprite args, entity -** Processing line: ~ x = 0~ + # Remove the x from xrepl to run the code. Add the x back to ignore to code. +** Processing line: ~ xrepl do~ - Inside source: true *** True Line Result - x = 0 -** Processing line: ~ y = 0~ + xrepl do +** Processing line: ~ a = 10~ - Inside source: true *** True Line Result - y = 0 -** Processing line: ~~ + a = 10 +** Processing line: ~ puts "The value of a is: #{a}"~ - Inside source: true *** True Line Result - -** Processing line: ~ if entity.year_in_days~ + puts "The value of a is: #{a}" +** Processing line: ~ puts "a + 1 is: #{a + 1}"~ - Inside source: true *** True Line Result - if entity.year_in_days -** Processing line: ~ day = args.state.tick_count~ + puts "a + 1 is: #{a + 1}" +** Processing line: ~ puts "a / 3 is: #{a / 3}"~ - Inside source: true *** True Line Result - day = args.state.tick_count -** Processing line: ~ day_in_year = day % entity.year_in_days~ + puts "a / 3 is: #{a / 3}" +** Processing line: ~ end~ - Inside source: true *** True Line Result - day_in_year = day % entity.year_in_days -** Processing line: ~ entity.random_start_day ||= day_in_year * rand~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - entity.random_start_day ||= day_in_year * rand -** Processing line: ~ percentage_of_year = day_in_year.fdiv(entity.year_in_days)~ + +** Processing line: ~ # Remove the x from xrepl to run the code. Add the x back to ignore to code.~ - Inside source: true *** True Line Result - percentage_of_year = day_in_year.fdiv(entity.year_in_days) -** Processing line: ~ angle = 365 * percentage_of_year~ + # Remove the x from xrepl to run the code. Add the x back to ignore to code. +** Processing line: ~ xrepl do~ - Inside source: true *** True Line Result - angle = 365 * percentage_of_year -** Processing line: ~ x = angle.vector_x(entity.distance)~ + xrepl do +** Processing line: ~ b = 10.12~ - Inside source: true *** True Line Result - x = angle.vector_x(entity.distance) -** Processing line: ~ y = angle.vector_y(entity.distance)~ + b = 10.12 +** Processing line: ~ puts "The value of b is: #{b}"~ - Inside source: true *** True Line Result - y = angle.vector_y(entity.distance) -** Processing line: ~ end~ + puts "The value of b is: #{b}" +** Processing line: ~ puts "b + 1 is: #{b + 1}"~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + puts "b + 1 is: #{b + 1}" +** Processing line: ~ puts "b as an integer is: #{b.to_i}"~ - Inside source: true *** True Line Result - -** Processing line: ~ [640 + x - entity.s.half, 360 + y - entity.s.half, entity.s, entity.s, entity.path]~ + puts "b as an integer is: #{b.to_i}" +** Processing line: ~ puts ''~ - Inside source: true *** True Line Result - [640 + x - entity.s.half, 360 + y - entity.s.half, entity.s, entity.s, entity.path] + puts '' ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -93072,46 +100111,50 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def render args~ +** Processing line: ~ # ====================================================================================~ - Inside source: true *** True Line Result - def render args -** Processing line: ~ args.outputs.solids << [0, 0, 1280, 720]~ + # ==================================================================================== +** Processing line: ~ # Booleans~ - Inside source: true *** True Line Result - args.outputs.solids << [0, 0, 1280, 720] -** Processing line: ~~ + # Booleans +** Processing line: ~ # ====================================================================================~ - Inside source: true *** True Line Result - -** Processing line: ~ args.outputs.sprites << args.state.stars.map do |x, y, _, r, g, b|~ + # ==================================================================================== +** Processing line: ~ # Remove the x from xrepl to run the code. Add the x back to ignore to code.~ - Inside source: true *** True Line Result - args.outputs.sprites << args.state.stars.map do |x, y, _, r, g, b| -** Processing line: ~ [x, y, 10, 10, 'sprites/star.png', 0, 100, r, g, b]~ + # Remove the x from xrepl to run the code. Add the x back to ignore to code. +** Processing line: ~ xrepl do~ - Inside source: true *** True Line Result - [x, y, 10, 10, 'sprites/star.png', 0, 100, r, g, b] -** Processing line: ~ end~ + xrepl do +** Processing line: ~ c = 30~ - Inside source: true *** True Line Result - end + c = 30 +** Processing line: ~ puts "The value of c is #{c}."~ +- Inside source: true +*** True Line Result + puts "The value of c is #{c}." ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ args.outputs.sprites << to_sprite(args, args.state.sun)~ +** Processing line: ~ if c~ - Inside source: true *** True Line Result - args.outputs.sprites << to_sprite(args, args.state.sun) -** Processing line: ~ args.outputs.sprites << args.state.planets.map { |p| to_sprite args, p }~ + if c +** Processing line: ~ puts "This if statement ran because c is truthy."~ - Inside source: true *** True Line Result - args.outputs.sprites << args.state.planets.map { |p| to_sprite args, p } -** Processing line: ~ args.outputs.sprites << [args.state.ship.x, args.state.ship.y, 20, 20, 'sprites/ship.png', args.state.ship.angle]~ + puts "This if statement ran because c is truthy." +** Processing line: ~ end~ - Inside source: true *** True Line Result - args.outputs.sprites << [args.state.ship.x, args.state.ship.y, 20, 20, 'sprites/ship.png', args.state.ship.angle] + end ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -93120,34 +100163,34 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def calc args~ +** Processing line: ~ # Remove the x from xrepl to run the code. Add the x back to ignore to code.~ - Inside source: true *** True Line Result - def calc args -** Processing line: ~ args.state.stars = args.state.stars.map do |x, y, speed, r, g, b|~ + # Remove the x from xrepl to run the code. Add the x back to ignore to code. +** Processing line: ~ xrepl do~ - Inside source: true *** True Line Result - args.state.stars = args.state.stars.map do |x, y, speed, r, g, b| -** Processing line: ~ x += speed~ + xrepl do +** Processing line: ~ d = false~ - Inside source: true *** True Line Result - x += speed -** Processing line: ~ y += speed~ + d = false +** Processing line: ~ puts "The value of d is #{d}."~ - Inside source: true *** True Line Result - y += speed -** Processing line: ~ x = 0 if x > 1280~ + puts "The value of d is #{d}." +** Processing line: ~~ - Inside source: true *** True Line Result - x = 0 if x > 1280 -** Processing line: ~ y = 0 if y > 720~ + +** Processing line: ~ if !d~ - Inside source: true *** True Line Result - y = 0 if y > 720 -** Processing line: ~ [x, y, speed, r, g, b]~ + if !d +** Processing line: ~ puts "This if statement ran because d is falsey, using the not operator (!) makes d evaluate to true."~ - Inside source: true *** True Line Result - [x, y, speed, r, g, b] + puts "This if statement ran because d is falsey, using the not operator (!) makes d evaluate to true." ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -93156,14 +100199,26 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ if args.state.tick_count == 0~ +** Processing line: ~ e = nil~ - Inside source: true *** True Line Result - if args.state.tick_count == 0 -** Processing line: ~ args.outputs.sounds << 'sounds/bg.ogg'~ + e = nil +** Processing line: ~ puts "Nil is also considered falsey. The value of e is: #{e}."~ - Inside source: true *** True Line Result - args.outputs.sounds << 'sounds/bg.ogg' + puts "Nil is also considered falsey. The value of e is: #{e}." +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ if !e~ +- Inside source: true +*** True Line Result + if !e +** Processing line: ~ puts "This if statement ran because e is nil (a falsey value)."~ +- Inside source: true +*** True Line Result + puts "This if statement ran because e is nil (a falsey value)." ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -93176,302 +100231,290 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def process_inputs args~ +** Processing line: ~ # ====================================================================================~ - Inside source: true *** True Line Result - def process_inputs args -** Processing line: ~ if args.inputs.keyboard.left || args.inputs.controller_one.key_held.left~ + # ==================================================================================== +** Processing line: ~ # Conditionals~ - Inside source: true *** True Line Result - if args.inputs.keyboard.left || args.inputs.controller_one.key_held.left -** Processing line: ~ args.state.ship.angle += 1~ + # Conditionals +** Processing line: ~ # ====================================================================================~ - Inside source: true *** True Line Result - args.state.ship.angle += 1 -** Processing line: ~ elsif args.inputs.keyboard.right || args.inputs.controller_one.key_held.right~ + # ==================================================================================== +** Processing line: ~ # Remove the x from xrepl to run the code. Add the x back to ignore to code.~ - Inside source: true *** True Line Result - elsif args.inputs.keyboard.right || args.inputs.controller_one.key_held.right -** Processing line: ~ args.state.ship.angle -= 1~ + # Remove the x from xrepl to run the code. Add the x back to ignore to code. +** Processing line: ~ xrepl do~ - Inside source: true *** True Line Result - args.state.ship.angle -= 1 -** Processing line: ~ end~ + xrepl do +** Processing line: ~ i_am_true = true~ - Inside source: true *** True Line Result - end + i_am_true = true +** Processing line: ~ i_am_nil = nil~ +- Inside source: true +*** True Line Result + i_am_nil = nil +** Processing line: ~ i_am_false = false~ +- Inside source: true +*** True Line Result + i_am_false = false +** Processing line: ~ i_am_hi = "hi"~ +- Inside source: true +*** True Line Result + i_am_hi = "hi" ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ if args.inputs.keyboard.up || args.inputs.controller_one.key_held.a~ +** Processing line: ~ puts "======== if statement"~ - Inside source: true *** True Line Result - if args.inputs.keyboard.up || args.inputs.controller_one.key_held.a -** Processing line: ~ args.state.ship.x += args.state.ship.angle.x_vector~ + puts "======== if statement" +** Processing line: ~ i_am_one = 1~ - Inside source: true *** True Line Result - args.state.ship.x += args.state.ship.angle.x_vector -** Processing line: ~ args.state.ship.y += args.state.ship.angle.y_vector~ + i_am_one = 1 +** Processing line: ~ if i_am_one~ - Inside source: true *** True Line Result - args.state.ship.y += args.state.ship.angle.y_vector -** Processing line: ~ end~ + if i_am_one +** Processing line: ~ puts "This was printed because i_am_one is truthy."~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + puts "This was printed because i_am_one is truthy." +** Processing line: ~ end~ - Inside source: true *** True Line Result - end + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def tick args~ +** Processing line: ~ puts "======== if/else statement"~ - Inside source: true *** True Line Result - def tick args -** Processing line: ~ defaults args~ + puts "======== if/else statement" +** Processing line: ~ if i_am_false~ - Inside source: true *** True Line Result - defaults args -** Processing line: ~ render args~ + if i_am_false +** Processing line: ~ puts "This will NOT get printed because i_am_false is false."~ - Inside source: true *** True Line Result - render args -** Processing line: ~ calc args~ + puts "This will NOT get printed because i_am_false is false." +** Processing line: ~ else~ - Inside source: true *** True Line Result - calc args -** Processing line: ~ process_inputs args~ + else +** Processing line: ~ puts "This was printed because i_am_false is false."~ - Inside source: true *** True Line Result - process_inputs args -** Processing line: ~ end~ + puts "This was printed because i_am_false is false." +** Processing line: ~ end~ - Inside source: true *** True Line Result - end + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def r~ +** Processing line: ~ puts "======== if/elsif/else statement"~ - Inside source: true *** True Line Result - def r -** Processing line: ~ $gtk.reset~ + puts "======== if/elsif/else statement" +** Processing line: ~ if i_am_false~ - Inside source: true *** True Line Result - $gtk.reset -** Processing line: ~ end~ + if i_am_false +** Processing line: ~ puts "This will NOT get printed because i_am_false is false."~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + puts "This will NOT get printed because i_am_false is false." +** Processing line: ~ elsif i_am_true~ - Inside source: true *** True Line Result - -** Processing line: ~#+end_src~ -- Line was identified as the end of a code block. -*** True Line Result -#+end_src -** Processing line: ~~ -- End of paragraph detected. -*** True Line Result - -** Processing line: ~*** Arcade - Sound Golf - main.rb~ -- Header detected. -*** True Line Result - -*** True Line Result -*** Arcade - Sound Golf - main.rb -** Processing line: ~#+begin_src ruby~ -- Line was identified as the beginning of a code block. -*** True Line Result - -*** True Line Result -#+begin_src ruby -** Processing line: ~ # ./samples/99_genre_arcade/sound_golf/app/main.rb~ + elsif i_am_true +** Processing line: ~ puts "This was printed because i_am_true is true."~ - Inside source: true *** True Line Result - # ./samples/99_genre_arcade/sound_golf/app/main.rb -** Processing line: ~ =begin~ + puts "This was printed because i_am_true is true." +** Processing line: ~ else~ - Inside source: true *** True Line Result - =begin -** Processing line: ~~ + else +** Processing line: ~ puts "This will NOT get printed i_am_true was true."~ - Inside source: true *** True Line Result - -** Processing line: ~ APIs Listing that haven't been encountered in previous sample apps:~ + puts "This will NOT get printed i_am_true was true." +** Processing line: ~ end~ - Inside source: true *** True Line Result - APIs Listing that haven't been encountered in previous sample apps: + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ - sample: Chooses random element from array.~ +** Processing line: ~ puts "======== case statement "~ - Inside source: true *** True Line Result - - sample: Chooses random element from array. -** Processing line: ~ In this sample app, the target note is set by taking a sample from the collection~ + puts "======== case statement " +** Processing line: ~ i_am_one = 1~ - Inside source: true *** True Line Result - In this sample app, the target note is set by taking a sample from the collection -** Processing line: ~ of available notes.~ + i_am_one = 1 +** Processing line: ~ case i_am_one~ - Inside source: true *** True Line Result - of available notes. -** Processing line: ~~ + case i_am_one +** Processing line: ~ when 10~ - Inside source: true *** True Line Result - -** Processing line: ~ Reminders:~ + when 10 +** Processing line: ~ puts "case equaled: 10"~ - Inside source: true *** True Line Result - Reminders: -** Processing line: ~ - args.grid.(left|right|top|bottom): Pixel value for the boundaries of the virtual~ + puts "case equaled: 10" +** Processing line: ~ when 9~ - Inside source: true *** True Line Result - - args.grid.(left|right|top|bottom): Pixel value for the boundaries of the virtual -** Processing line: ~ 720 p screen (Dragon Ruby Game Toolkits's virtual resolution is always 1280x720).~ + when 9 +** Processing line: ~ puts "case equaled: 9"~ - Inside source: true *** True Line Result - 720 p screen (Dragon Ruby Game Toolkits's virtual resolution is always 1280x720). -** Processing line: ~~ + puts "case equaled: 9" +** Processing line: ~ when 5~ - Inside source: true *** True Line Result - -** Processing line: ~ - args.state.new_entity: Used when we want to create a new object, like a sprite or button.~ + when 5 +** Processing line: ~ puts "case equaled: 5"~ - Inside source: true *** True Line Result - - args.state.new_entity: Used when we want to create a new object, like a sprite or button. -** Processing line: ~ For example, if we want to create a new button, we would declare it as a new entity and~ + puts "case equaled: 5" +** Processing line: ~ when 1~ - Inside source: true *** True Line Result - For example, if we want to create a new button, we would declare it as a new entity and -** Processing line: ~ then define its properties.~ + when 1 +** Processing line: ~ puts "case equaled: 1"~ - Inside source: true *** True Line Result - then define its properties. -** Processing line: ~~ + puts "case equaled: 1" +** Processing line: ~ else~ - Inside source: true *** True Line Result - -** Processing line: ~ - String interpolation: Uses #{} syntax; everything between the #{ and the } is evaluated~ + else +** Processing line: ~ puts "Value wasn't cased."~ - Inside source: true *** True Line Result - - String interpolation: Uses #{} syntax; everything between the #{ and the } is evaluated -** Processing line: ~ as Ruby code, and the placeholder is replaced with its corresponding value or result.~ + puts "Value wasn't cased." +** Processing line: ~ end~ - Inside source: true *** True Line Result - as Ruby code, and the placeholder is replaced with its corresponding value or result. + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ - args.outputs.labels: An array. The values generate a label.~ -- Inside source: true -*** True Line Result - - args.outputs.labels: An array. The values generate a label. -** Processing line: ~ The parameters are [X, Y, TEXT, SIZE, ALIGNMENT, RED, GREEN, BLUE, ALPHA, FONT STYLE]~ +** Processing line: ~ puts "======== different types of comparisons"~ - Inside source: true *** True Line Result - The parameters are [X, Y, TEXT, SIZE, ALIGNMENT, RED, GREEN, BLUE, ALPHA, FONT STYLE] -** Processing line: ~ For more information about labels, go to mygame/documentation/02-labels.md.~ + puts "======== different types of comparisons" +** Processing line: ~ if 4 == 4~ - Inside source: true *** True Line Result - For more information about labels, go to mygame/documentation/02-labels.md. -** Processing line: ~~ + if 4 == 4 +** Processing line: ~ puts "equal (4 == 4)"~ - Inside source: true *** True Line Result - -** Processing line: ~ - find_all: Finds all elements from a collection that meet a certain requirements (and excludes the ones that don't).~ + puts "equal (4 == 4)" +** Processing line: ~ end~ - Inside source: true *** True Line Result - - find_all: Finds all elements from a collection that meet a certain requirements (and excludes the ones that don't). + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ - first: Returns the first element of an array.~ +** Processing line: ~ if 4 != 3~ - Inside source: true *** True Line Result - - first: Returns the first element of an array. -** Processing line: ~~ + if 4 != 3 +** Processing line: ~ puts "not equal (4 != 3)"~ - Inside source: true *** True Line Result - -** Processing line: ~ - inside_rect: Returns true or false depending on if the point is inside the rect.~ + puts "not equal (4 != 3)" +** Processing line: ~ end~ - Inside source: true *** True Line Result - - inside_rect: Returns true or false depending on if the point is inside the rect. + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ - to_sym: Returns symbol corresponding to string. Will create a symbol if it does~ -- Inside source: true -*** True Line Result - - to_sym: Returns symbol corresponding to string. Will create a symbol if it does -** Processing line: ~ not already exist.~ +** Processing line: ~ if 3 < 4~ - Inside source: true *** True Line Result - not already exist. -** Processing line: ~~ + if 3 < 4 +** Processing line: ~ puts "less than (3 < 4)"~ - Inside source: true *** True Line Result - -** Processing line: ~ =end~ + puts "less than (3 < 4)" +** Processing line: ~ end~ - Inside source: true *** True Line Result - =end + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # This sample app allows users to test their musical skills by matching the piano sound that plays in each~ +** Processing line: ~ if 4 > 3~ - Inside source: true *** True Line Result - # This sample app allows users to test their musical skills by matching the piano sound that plays in each -** Processing line: ~ # level to the correct note.~ + if 4 > 3 +** Processing line: ~ puts "greater than (4 > 3)"~ - Inside source: true *** True Line Result - # level to the correct note. + puts "greater than (4 > 3)" +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Runs all the methods necessary for the game to function properly.~ +** Processing line: ~ if ((4 > 3) || (3 < 4) || false)~ - Inside source: true *** True Line Result - # Runs all the methods necessary for the game to function properly. -** Processing line: ~ def tick args~ + if ((4 > 3) || (3 < 4) || false) +** Processing line: ~ puts "or statement ((4 > 3) || (3 < 4) || false)"~ - Inside source: true *** True Line Result - def tick args -** Processing line: ~ defaults args~ + puts "or statement ((4 > 3) || (3 < 4) || false)" +** Processing line: ~ end~ - Inside source: true *** True Line Result - defaults args -** Processing line: ~ render args~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - render args -** Processing line: ~ calc args~ + +** Processing line: ~ if ((4 > 3) && (3 < 4))~ - Inside source: true *** True Line Result - calc args -** Processing line: ~ input_mouse args~ + if ((4 > 3) && (3 < 4)) +** Processing line: ~ puts "and statement ((4 > 3) && (3 < 4))"~ - Inside source: true *** True Line Result - input_mouse args -** Processing line: ~ tick_instructions args, "Sample app shows how to play sounds. args.outputs.sounds << \"path_to_wav.wav\""~ + puts "and statement ((4 > 3) && (3 < 4))" +** Processing line: ~ end~ - Inside source: true *** True Line Result - tick_instructions args, "Sample app shows how to play sounds. args.outputs.sounds << \"path_to_wav.wav\"" + end ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -93480,126 +100523,118 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Sets default values and creates empty collections~ -- Inside source: true -*** True Line Result - # Sets default values and creates empty collections -** Processing line: ~ # Initialization happens in the first frame only~ -- Inside source: true -*** True Line Result - # Initialization happens in the first frame only -** Processing line: ~ def defaults args~ +** Processing line: ~ # ====================================================================================~ - Inside source: true *** True Line Result - def defaults args -** Processing line: ~ args.state.notes ||= []~ + # ==================================================================================== +** Processing line: ~ # Looping~ - Inside source: true *** True Line Result - args.state.notes ||= [] -** Processing line: ~ args.state.click_feedbacks ||= []~ + # Looping +** Processing line: ~ # ====================================================================================~ - Inside source: true *** True Line Result - args.state.click_feedbacks ||= [] -** Processing line: ~ args.state.current_level ||= 1~ + # ==================================================================================== +** Processing line: ~ # Remove the x from xrepl to run the code. Add the x back to ignore to code.~ - Inside source: true *** True Line Result - args.state.current_level ||= 1 -** Processing line: ~ args.state.times_wrong ||= 0 # when game starts, user hasn't guessed wrong yet~ + # Remove the x from xrepl to run the code. Add the x back to ignore to code. +** Processing line: ~ xrepl do~ - Inside source: true *** True Line Result - args.state.times_wrong ||= 0 # when game starts, user hasn't guessed wrong yet -** Processing line: ~ end~ + xrepl do +** Processing line: ~ puts "======== times block"~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + puts "======== times block" +** Processing line: ~ 3.times do |i|~ - Inside source: true *** True Line Result - -** Processing line: ~ # Uses a label to display current level, and shows the score~ + 3.times do |i| +** Processing line: ~ puts i~ - Inside source: true *** True Line Result - # Uses a label to display current level, and shows the score -** Processing line: ~ # Creates a button to play the sample note, and displays the available notes that could be a potential match~ + puts i +** Processing line: ~ end~ - Inside source: true *** True Line Result - # Creates a button to play the sample note, and displays the available notes that could be a potential match -** Processing line: ~ def render args~ + end +** Processing line: ~ puts "======== range block exclusive"~ - Inside source: true *** True Line Result - def render args -** Processing line: ~~ + puts "======== range block exclusive" +** Processing line: ~ (0...3).each do |i|~ - Inside source: true *** True Line Result - -** Processing line: ~ # grid.w_half positions the label in the horizontal center of the screen.~ + (0...3).each do |i| +** Processing line: ~ puts i~ - Inside source: true *** True Line Result - # grid.w_half positions the label in the horizontal center of the screen. -** Processing line: ~ args.outputs.labels << [args.grid.w_half, args.grid.top.shift_down(40), "Hole #{args.state.current_level} of 9", 0, 1, 0, 0, 0]~ + puts i +** Processing line: ~ end~ - Inside source: true *** True Line Result - args.outputs.labels << [args.grid.w_half, args.grid.top.shift_down(40), "Hole #{args.state.current_level} of 9", 0, 1, 0, 0, 0] -** Processing line: ~~ + end +** Processing line: ~ puts "======== range block inclusive"~ - Inside source: true *** True Line Result - -** Processing line: ~ render_score args # shows score on screen~ + puts "======== range block inclusive" +** Processing line: ~ (0..3).each do |i|~ - Inside source: true *** True Line Result - render_score args # shows score on screen -** Processing line: ~~ + (0..3).each do |i| +** Processing line: ~ puts i~ - Inside source: true *** True Line Result - -** Processing line: ~ args.state.play_again_button ||= { x: 560, y: args.grid.h * 3 / 4 - 40, w: 160, h: 60, label: 'again' } # array definition, text/title~ + puts i +** Processing line: ~ end~ - Inside source: true *** True Line Result - args.state.play_again_button ||= { x: 560, y: args.grid.h * 3 / 4 - 40, w: 160, h: 60, label: 'again' } # array definition, text/title -** Processing line: ~ args.state.play_note_button ||= { x: 560, y: args.grid.h * 3 / 4 - 40, w: 160, h: 60, label: 'play' }~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - args.state.play_note_button ||= { x: 560, y: args.grid.h * 3 / 4 - 40, w: 160, h: 60, label: 'play' } + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ if args.state.game_over # if game is over, a "play again" button is shown~ +** Processing line: ~ # ====================================================================================~ - Inside source: true *** True Line Result - if args.state.game_over # if game is over, a "play again" button is shown -** Processing line: ~ # Calculations ensure that Play Again label is displayed in center of border~ + # ==================================================================================== +** Processing line: ~ # Enumerables~ - Inside source: true *** True Line Result - # Calculations ensure that Play Again label is displayed in center of border -** Processing line: ~ # Remove calculations from y parameters and see what happens to border and label placement~ + # Enumerables +** Processing line: ~ # ====================================================================================~ - Inside source: true *** True Line Result - # Remove calculations from y parameters and see what happens to border and label placement -** Processing line: ~ args.outputs.labels << [args.grid.w_half, args.grid.h * 3 / 4, "Play Again", 0, 1, 0, 0, 0] # outputs label~ + # ==================================================================================== +** Processing line: ~ # Remove the x from xrepl to run the code. Add the x back to ignore to code.~ - Inside source: true *** True Line Result - args.outputs.labels << [args.grid.w_half, args.grid.h * 3 / 4, "Play Again", 0, 1, 0, 0, 0] # outputs label -** Processing line: ~ args.outputs.borders << args.state.play_again_button # outputs border~ + # Remove the x from xrepl to run the code. Add the x back to ignore to code. +** Processing line: ~ xrepl do~ - Inside source: true *** True Line Result - args.outputs.borders << args.state.play_again_button # outputs border -** Processing line: ~ else # otherwise, if game is not over~ + xrepl do +** Processing line: ~ puts "======== array each"~ - Inside source: true *** True Line Result - else # otherwise, if game is not over -** Processing line: ~ # Calculations ensure that label appears in center of border~ + puts "======== array each" +** Processing line: ~ colors = ["red", "blue", "yellow"]~ - Inside source: true *** True Line Result - # Calculations ensure that label appears in center of border -** Processing line: ~ args.outputs.labels << [args.grid.w_half, args.grid.h * 3 / 4, "Play Note ##{args.state.current_level}", 0, 1, 0, 0, 0] # outputs label~ + colors = ["red", "blue", "yellow"] +** Processing line: ~ colors.each do |color|~ - Inside source: true *** True Line Result - args.outputs.labels << [args.grid.w_half, args.grid.h * 3 / 4, "Play Note ##{args.state.current_level}", 0, 1, 0, 0, 0] # outputs label -** Processing line: ~ args.outputs.borders << args.state.play_note_button # outputs border~ + colors.each do |color| +** Processing line: ~ puts color~ - Inside source: true *** True Line Result - args.outputs.borders << args.state.play_note_button # outputs border + puts color ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -93608,58 +100643,26 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ return if args.state.game_over # return if game is over~ -- Inside source: true -*** True Line Result - return if args.state.game_over # return if game is over -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ args.outputs.labels << [args.grid.w_half, 400, "I think the note is a(n)...", 0, 1, 0, 0, 0] # outputs label~ -- Inside source: true -*** True Line Result - args.outputs.labels << [args.grid.w_half, 400, "I think the note is a(n)...", 0, 1, 0, 0, 0] # outputs label -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ # Shows all of the available notes that can be potential matches.~ -- Inside source: true -*** True Line Result - # Shows all of the available notes that can be potential matches. -** Processing line: ~ available_notes.each_with_index do |note, i|~ +** Processing line: ~ puts '======== array each_with_index'~ - Inside source: true *** True Line Result - available_notes.each_with_index do |note, i| -** Processing line: ~ args.state.notes[i] ||= piano_button(args, note, i + 1) # calls piano_button method on each note (creates label and border)~ + puts '======== array each_with_index' +** Processing line: ~ colors = ["red", "blue", "yellow"]~ - Inside source: true *** True Line Result - args.state.notes[i] ||= piano_button(args, note, i + 1) # calls piano_button method on each note (creates label and border) -** Processing line: ~ args.outputs.labels << args.state.notes[i].label # outputs note on screen with a label and a border~ + colors = ["red", "blue", "yellow"] +** Processing line: ~ colors.each_with_index do |color, i|~ - Inside source: true *** True Line Result - args.outputs.labels << args.state.notes[i].label # outputs note on screen with a label and a border -** Processing line: ~ args.outputs.borders << args.state.notes[i].border~ + colors.each_with_index do |color, i| +** Processing line: ~ puts "#{color} at index #{i}"~ - Inside source: true *** True Line Result - args.outputs.borders << args.state.notes[i].border + puts "#{color} at index #{i}" ** Processing line: ~ end~ - Inside source: true *** True Line Result end -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ # Shows whether or not the user is correct by filling the screen with either red or green~ -- Inside source: true -*** True Line Result - # Shows whether or not the user is correct by filling the screen with either red or green -** Processing line: ~ args.outputs.solids << args.state.click_feedbacks.map { |c| c.solid }~ -- Inside source: true -*** True Line Result - args.outputs.solids << args.state.click_feedbacks.map { |c| c.solid } ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -93668,294 +100671,322 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Shows the score (number of times the user guesses wrong) onto the screen using labels.~ -- Inside source: true -*** True Line Result - # Shows the score (number of times the user guesses wrong) onto the screen using labels. -** Processing line: ~ def render_score args~ +** Processing line: ~ # Remove the x from xrepl to run the code. Add the x back to ignore to code.~ - Inside source: true *** True Line Result - def render_score args -** Processing line: ~ if args.state.times_wrong == 0 # if the user has guessed wrong zero times, the score is par~ + # Remove the x from xrepl to run the code. Add the x back to ignore to code. +** Processing line: ~ xrepl do~ - Inside source: true *** True Line Result - if args.state.times_wrong == 0 # if the user has guessed wrong zero times, the score is par -** Processing line: ~ args.outputs.labels << [args.grid.w_half, args.grid.top.shift_down(80), "Score: PAR", 0, 1, 0, 0, 0]~ + xrepl do +** Processing line: ~ puts "======== single parameter function"~ - Inside source: true *** True Line Result - args.outputs.labels << [args.grid.w_half, args.grid.top.shift_down(80), "Score: PAR", 0, 1, 0, 0, 0] -** Processing line: ~ else # otherwise, number of times the user has guessed wrong is shown~ + puts "======== single parameter function" +** Processing line: ~ def add_one_to n~ - Inside source: true *** True Line Result - else # otherwise, number of times the user has guessed wrong is shown -** Processing line: ~ args.outputs.labels << [args.grid.w_half, args.grid.top.shift_down(80), "Score: +#{args.state.times_wrong}", 0, 1, 0, 0, 0] # shows score using string interpolation~ + def add_one_to n +** Processing line: ~ n + 5~ - Inside source: true *** True Line Result - args.outputs.labels << [args.grid.w_half, args.grid.top.shift_down(80), "Score: +#{args.state.times_wrong}", 0, 1, 0, 0, 0] # shows score using string interpolation + n + 5 ** Processing line: ~ end~ - Inside source: true *** True Line Result end -** Processing line: ~ end~ +** Processing line: ~~ - Inside source: true *** True Line Result - end + +** Processing line: ~ puts add_one_to(3)~ +- Inside source: true +*** True Line Result + puts add_one_to(3) ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Sets the target note for the level and performs calculations on click_feedbacks.~ +** Processing line: ~ puts "======== function with default value"~ - Inside source: true *** True Line Result - # Sets the target note for the level and performs calculations on click_feedbacks. -** Processing line: ~ def calc args~ + puts "======== function with default value" +** Processing line: ~ def function_with_default_value v = 10~ - Inside source: true *** True Line Result - def calc args -** Processing line: ~ args.state.target_note ||= available_notes.sample # chooses a note from available_notes collection as target note~ + def function_with_default_value v = 10 +** Processing line: ~ v * 10~ - Inside source: true *** True Line Result - args.state.target_note ||= available_notes.sample # chooses a note from available_notes collection as target note -** Processing line: ~ args.state.click_feedbacks.each { |c| c.solid[-1] -= 5 } # remove this line and solid color will remain on screen indefinitely~ + v * 10 +** Processing line: ~ end~ - Inside source: true *** True Line Result - args.state.click_feedbacks.each { |c| c.solid[-1] -= 5 } # remove this line and solid color will remain on screen indefinitely -** Processing line: ~ # comment this line out and the solid color will keep flashing on screen instead of being removed from click_feedbacks collection~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - # comment this line out and the solid color will keep flashing on screen instead of being removed from click_feedbacks collection -** Processing line: ~ args.state.click_feedbacks.reject! { |c| c.solid[-1] <= 0 }~ + +** Processing line: ~ puts "passing three: #{function_with_default_value(3)}"~ - Inside source: true *** True Line Result - args.state.click_feedbacks.reject! { |c| c.solid[-1] <= 0 } -** Processing line: ~ end~ + puts "passing three: #{function_with_default_value(3)}" +** Processing line: ~ puts "passing nil: #{function_with_default_value}"~ - Inside source: true *** True Line Result - end + puts "passing nil: #{function_with_default_value}" ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Uses input from the user to play the target note, as well as the other notes that could be a potential match.~ +** Processing line: ~ puts "======== Or Equal (||=) operator for nil values"~ - Inside source: true *** True Line Result - # Uses input from the user to play the target note, as well as the other notes that could be a potential match. -** Processing line: ~ def input_mouse args~ + puts "======== Or Equal (||=) operator for nil values" +** Processing line: ~ def function_with_nil_default_with_local a = nil~ - Inside source: true *** True Line Result - def input_mouse args -** Processing line: ~ return unless args.inputs.mouse.click # return unless the mouse is clicked~ + def function_with_nil_default_with_local a = nil +** Processing line: ~ result = a~ - Inside source: true *** True Line Result - return unless args.inputs.mouse.click # return unless the mouse is clicked -** Processing line: ~~ + result = a +** Processing line: ~ result ||= "or equal operator was exected and set a default value"~ - Inside source: true *** True Line Result - -** Processing line: ~ # finds button that was clicked by user~ + result ||= "or equal operator was exected and set a default value" +** Processing line: ~ end~ - Inside source: true *** True Line Result - # finds button that was clicked by user -** Processing line: ~ button_clicked = args.outputs.borders.find_all do |b| # go through borders collection to find all borders that meet requirements~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - button_clicked = args.outputs.borders.find_all do |b| # go through borders collection to find all borders that meet requirements -** Processing line: ~ args.inputs.mouse.click.point.inside_rect? b # find button border that mouse was clicked inside of~ + +** Processing line: ~ puts "passing 'hi': #{function_with_nil_default_with_local 'hi'}"~ - Inside source: true *** True Line Result - args.inputs.mouse.click.point.inside_rect? b # find button border that mouse was clicked inside of -** Processing line: ~ end.find_all { |b| b.is_a? Hash }.first # reject, return first element~ + puts "passing 'hi': #{function_with_nil_default_with_local 'hi'}" +** Processing line: ~ puts "passing nil: #{function_with_nil_default_with_local}"~ - Inside source: true *** True Line Result - end.find_all { |b| b.is_a? Hash }.first # reject, return first element + puts "passing nil: #{function_with_nil_default_with_local}" +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ return unless button_clicked # return unless button_clicked as a value (a button was clicked)~ +** Processing line: ~ # ====================================================================================~ - Inside source: true *** True Line Result - return unless button_clicked # return unless button_clicked as a value (a button was clicked) -** Processing line: ~~ + # ==================================================================================== +** Processing line: ~ # Arrays~ - Inside source: true *** True Line Result - -** Processing line: ~ queue_click_feedback args, # calls queue_click_feedback method on the button that was clicked~ + # Arrays +** Processing line: ~ # ====================================================================================~ - Inside source: true *** True Line Result - queue_click_feedback args, # calls queue_click_feedback method on the button that was clicked -** Processing line: ~ button_clicked.x,~ + # ==================================================================================== +** Processing line: ~ # Remove the x from xrepl to run the code. Add the x back to ignore to code.~ - Inside source: true *** True Line Result - button_clicked.x, -** Processing line: ~ button_clicked.y,~ + # Remove the x from xrepl to run the code. Add the x back to ignore to code. +** Processing line: ~ xrepl do~ - Inside source: true *** True Line Result - button_clicked.y, -** Processing line: ~ button_clicked.w,~ + xrepl do +** Processing line: ~ puts "======== Create an array with the numbers 1 to 10."~ - Inside source: true *** True Line Result - button_clicked.w, -** Processing line: ~ button_clicked.h,~ + puts "======== Create an array with the numbers 1 to 10." +** Processing line: ~ one_to_ten = (1..10).to_a~ - Inside source: true *** True Line Result - button_clicked.h, -** Processing line: ~ 150, 100, 200 # sets color of button to shade of purple~ + one_to_ten = (1..10).to_a +** Processing line: ~ puts one_to_ten~ - Inside source: true *** True Line Result - 150, 100, 200 # sets color of button to shade of purple + puts one_to_ten ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ if button_clicked[:label] == 'play' # if "play note" button is pressed~ +** Processing line: ~ puts "======== Create a new array that only contains even numbers from the previous array."~ - Inside source: true *** True Line Result - if button_clicked[:label] == 'play' # if "play note" button is pressed -** Processing line: ~ args.outputs.sounds << "sounds/#{args.state.target_note}.wav" # sound of target note is output~ + puts "======== Create a new array that only contains even numbers from the previous array." +** Processing line: ~ one_to_ten = (1..10).to_a~ - Inside source: true *** True Line Result - args.outputs.sounds << "sounds/#{args.state.target_note}.wav" # sound of target note is output -** Processing line: ~ elsif button_clicked[:label] == 'again' # if "play game again" button is pressed~ + one_to_ten = (1..10).to_a +** Processing line: ~ evens = one_to_ten.find_all do |number|~ - Inside source: true *** True Line Result - elsif button_clicked[:label] == 'again' # if "play game again" button is pressed -** Processing line: ~ args.state.target_note = nil # no target note~ + evens = one_to_ten.find_all do |number| +** Processing line: ~ number % 2 == 0~ - Inside source: true *** True Line Result - args.state.target_note = nil # no target note -** Processing line: ~ args.state.current_level = 1 # starts at level 1 again~ + number % 2 == 0 +** Processing line: ~ end~ - Inside source: true *** True Line Result - args.state.current_level = 1 # starts at level 1 again -** Processing line: ~ args.state.times_wrong = 0 # starts off with 0 wrong guesses~ + end +** Processing line: ~ puts evens~ +- Inside source: true +*** True Line Result + puts evens +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ puts "======== Create a new array that rejects odd numbers."~ - Inside source: true *** True Line Result - args.state.times_wrong = 0 # starts off with 0 wrong guesses -** Processing line: ~ args.state.game_over = false # the game is not over (because it has just been restarted)~ + puts "======== Create a new array that rejects odd numbers." +** Processing line: ~ one_to_ten = (1..10).to_a~ - Inside source: true *** True Line Result - args.state.game_over = false # the game is not over (because it has just been restarted) -** Processing line: ~ else # otherwise if neither of those buttons were pressed~ + one_to_ten = (1..10).to_a +** Processing line: ~ also_even = one_to_ten.reject do |number|~ - Inside source: true *** True Line Result - else # otherwise if neither of those buttons were pressed -** Processing line: ~ args.outputs.sounds << "sounds/#{button_clicked[:label]}.wav" # sound of clicked note is played~ + also_even = one_to_ten.reject do |number| +** Processing line: ~ number % 2 != 0~ - Inside source: true *** True Line Result - args.outputs.sounds << "sounds/#{button_clicked[:label]}.wav" # sound of clicked note is played -** Processing line: ~ if button_clicked[:label] == args.state.target_note # if clicked note is target note~ + number % 2 != 0 +** Processing line: ~ end~ - Inside source: true *** True Line Result - if button_clicked[:label] == args.state.target_note # if clicked note is target note -** Processing line: ~ args.state.target_note = nil # target note is emptied~ + end +** Processing line: ~ puts also_even~ - Inside source: true *** True Line Result - args.state.target_note = nil # target note is emptied + puts also_even ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ if args.state.current_level < 9 # if game hasn't reached level 9~ +** Processing line: ~ puts "======== Create an array that doubles every number."~ - Inside source: true *** True Line Result - if args.state.current_level < 9 # if game hasn't reached level 9 -** Processing line: ~ args.state.current_level += 1 # game goes to next level~ + puts "======== Create an array that doubles every number." +** Processing line: ~ one_to_ten = (1..10).to_a~ - Inside source: true *** True Line Result - args.state.current_level += 1 # game goes to next level -** Processing line: ~ else # otherwise, if game has reached level 9~ + one_to_ten = (1..10).to_a +** Processing line: ~ doubled = one_to_ten.map do |number|~ - Inside source: true *** True Line Result - else # otherwise, if game has reached level 9 -** Processing line: ~ args.state.game_over = true # the game is over~ + doubled = one_to_ten.map do |number| +** Processing line: ~ number * 2~ - Inside source: true *** True Line Result - args.state.game_over = true # the game is over -** Processing line: ~ end~ + number * 2 +** Processing line: ~ end~ - Inside source: true *** True Line Result - end + end +** Processing line: ~ puts doubled~ +- Inside source: true +*** True Line Result + puts doubled ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ queue_click_feedback args, 0, 0, args.grid.w, args.grid.h, 100, 200, 100 # green shown if user guesses correctly~ +** Processing line: ~ puts "======== Create an array that selects only odd numbers and then multiply those by 10."~ - Inside source: true *** True Line Result - queue_click_feedback args, 0, 0, args.grid.w, args.grid.h, 100, 200, 100 # green shown if user guesses correctly -** Processing line: ~ else # otherwise, if clicked note is not target note~ + puts "======== Create an array that selects only odd numbers and then multiply those by 10." +** Processing line: ~ one_to_ten = (1..10).to_a~ - Inside source: true *** True Line Result - else # otherwise, if clicked note is not target note -** Processing line: ~ args.state.times_wrong += 1 # increments times user guessed wrong~ + one_to_ten = (1..10).to_a +** Processing line: ~ odd_doubled = one_to_ten.find_all do |number|~ - Inside source: true *** True Line Result - args.state.times_wrong += 1 # increments times user guessed wrong -** Processing line: ~ queue_click_feedback args, 0, 0, args.grid.w, args.grid.h, 200, 100, 100 # red shown is user guesses wrong~ + odd_doubled = one_to_ten.find_all do |number| +** Processing line: ~ number % 2 != 0~ - Inside source: true *** True Line Result - queue_click_feedback args, 0, 0, args.grid.w, args.grid.h, 200, 100, 100 # red shown is user guesses wrong -** Processing line: ~ end~ + number % 2 != 0 +** Processing line: ~ end.map do |odd_number|~ - Inside source: true *** True Line Result - end + end.map do |odd_number| +** Processing line: ~ odd_number * 10~ +- Inside source: true +*** True Line Result + odd_number * 10 ** Processing line: ~ end~ - Inside source: true *** True Line Result end -** Processing line: ~ end~ +** Processing line: ~ puts odd_doubled~ - Inside source: true *** True Line Result - end + puts odd_doubled ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Creates a collection of all of the available notes as symbols~ +** Processing line: ~ puts "======== All combination of numbers 1 to 10."~ - Inside source: true *** True Line Result - # Creates a collection of all of the available notes as symbols -** Processing line: ~ def available_notes~ + puts "======== All combination of numbers 1 to 10." +** Processing line: ~ one_to_ten = (1..10).to_a~ - Inside source: true *** True Line Result - def available_notes -** Processing line: ~ [:C3, :D3, :E3, :F3, :G3, :A3, :B3, :C4]~ + one_to_ten = (1..10).to_a +** Processing line: ~ all_combinations = one_to_ten.product(one_to_ten)~ - Inside source: true *** True Line Result - [:C3, :D3, :E3, :F3, :G3, :A3, :B3, :C4] -** Processing line: ~ end~ + all_combinations = one_to_ten.product(one_to_ten) +** Processing line: ~ puts all_combinations~ - Inside source: true *** True Line Result - end + puts all_combinations ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Creates buttons for each note, and sets a label (the note's name) and border for each note's button.~ +** Processing line: ~ puts "======== All uniq combinations of numbers. For example: [1, 2] is the same as [2, 1]."~ - Inside source: true *** True Line Result - # Creates buttons for each note, and sets a label (the note's name) and border for each note's button. -** Processing line: ~ def piano_button args, note, position~ + puts "======== All uniq combinations of numbers. For example: [1, 2] is the same as [2, 1]." +** Processing line: ~ one_to_ten = (1..10).to_a~ - Inside source: true *** True Line Result - def piano_button args, note, position -** Processing line: ~ args.state.new_entity(:button) do |b| # declares button as new entity~ + one_to_ten = (1..10).to_a +** Processing line: ~ uniq_combinations =~ - Inside source: true *** True Line Result - args.state.new_entity(:button) do |b| # declares button as new entity -** Processing line: ~ b.label = [460 + 40.mult(position), args.grid.h * 0.4, "#{note}", 0, 1, 0, 0, 0] # label definition~ + uniq_combinations = +** Processing line: ~ one_to_ten.product(one_to_ten)~ - Inside source: true *** True Line Result - b.label = [460 + 40.mult(position), args.grid.h * 0.4, "#{note}", 0, 1, 0, 0, 0] # label definition -** Processing line: ~ b.border = { x: 460 + 40.mult(position) - 20, y: args.grid.h * 0.4 - 32, w: 40, h: 40, label: note } # border definition, text/title; 20 subtracted so label is in center of border~ + one_to_ten.product(one_to_ten) +** Processing line: ~ .map do |unsorted_number|~ - Inside source: true *** True Line Result - b.border = { x: 460 + 40.mult(position) - 20, y: args.grid.h * 0.4 - 32, w: 40, h: 40, label: note } # border definition, text/title; 20 subtracted so label is in center of border -** Processing line: ~ end~ + .map do |unsorted_number| +** Processing line: ~ unsorted_number.sort~ - Inside source: true *** True Line Result - end + unsorted_number.sort +** Processing line: ~ end.uniq~ +- Inside source: true +*** True Line Result + end.uniq +** Processing line: ~ puts uniq_combinations~ +- Inside source: true +*** True Line Result + puts uniq_combinations ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -93964,74 +100995,90 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Color of click feedback changes depending on what button was clicked, and whether the guess is right or wrong~ +** Processing line: ~ # ====================================================================================~ - Inside source: true *** True Line Result - # Color of click feedback changes depending on what button was clicked, and whether the guess is right or wrong -** Processing line: ~ # If a button is clicked, the inside of button is purple (see input_mouse method)~ + # ==================================================================================== +** Processing line: ~ # Advanced Arrays~ - Inside source: true *** True Line Result - # If a button is clicked, the inside of button is purple (see input_mouse method) -** Processing line: ~ # If correct note is clicked, screen turns green~ + # Advanced Arrays +** Processing line: ~ # ====================================================================================~ - Inside source: true *** True Line Result - # If correct note is clicked, screen turns green -** Processing line: ~ # If incorrect note is clicked, screen turns red (again, see input_mouse method)~ + # ==================================================================================== +** Processing line: ~ # Remove the x from xrepl to run the code. Add the x back to ignore to code.~ - Inside source: true *** True Line Result - # If incorrect note is clicked, screen turns red (again, see input_mouse method) -** Processing line: ~ def queue_click_feedback args, x, y, w, h, *color~ + # Remove the x from xrepl to run the code. Add the x back to ignore to code. +** Processing line: ~ xrepl do~ - Inside source: true *** True Line Result - def queue_click_feedback args, x, y, w, h, *color -** Processing line: ~ args.state.click_feedbacks << args.state.new_entity(:click_feedback) do |c| # declares feedback as new entity~ + xrepl do +** Processing line: ~ puts "======== All unique Pythagorean Triples between 1 and 40 sorted by area of the triangle."~ - Inside source: true *** True Line Result - args.state.click_feedbacks << args.state.new_entity(:click_feedback) do |c| # declares feedback as new entity -** Processing line: ~ c.solid = [x, y, w, h, *color, 255] # sets color~ + puts "======== All unique Pythagorean Triples between 1 and 40 sorted by area of the triangle." +** Processing line: ~~ - Inside source: true *** True Line Result - c.solid = [x, y, w, h, *color, 255] # sets color -** Processing line: ~ end~ + +** Processing line: ~ one_to_hundred = (1..40).to_a~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + one_to_hundred = (1..40).to_a +** Processing line: ~ triples =~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + triples = +** Processing line: ~ one_to_hundred.product(one_to_hundred).map do |width, height|~ - Inside source: true *** True Line Result - -** Processing line: ~ def tick_instructions args, text, y = 715~ + one_to_hundred.product(one_to_hundred).map do |width, height| +** Processing line: ~ [width, height, Math.sqrt(width ** 2 + height ** 2)]~ - Inside source: true *** True Line Result - def tick_instructions args, text, y = 715 -** Processing line: ~ return if args.state.key_event_occurred~ + [width, height, Math.sqrt(width ** 2 + height ** 2)] +** Processing line: ~ end.find_all do |_, _, hypotenuse|~ - Inside source: true *** True Line Result - return if args.state.key_event_occurred -** Processing line: ~ if args.inputs.mouse.click ||~ + end.find_all do |_, _, hypotenuse| +** Processing line: ~ hypotenuse.to_i == hypotenuse~ - Inside source: true *** True Line Result - if args.inputs.mouse.click || -** Processing line: ~ args.inputs.keyboard.directional_vector ||~ + hypotenuse.to_i == hypotenuse +** Processing line: ~ end.map do |triangle|~ - Inside source: true *** True Line Result - args.inputs.keyboard.directional_vector || -** Processing line: ~ args.inputs.keyboard.key_down.enter ||~ + end.map do |triangle| +** Processing line: ~ triangle.map(&:to_i)~ - Inside source: true *** True Line Result - args.inputs.keyboard.key_down.enter || -** Processing line: ~ args.inputs.keyboard.key_down.escape~ + triangle.map(&:to_i) +** Processing line: ~ end.uniq do |triangle|~ - Inside source: true *** True Line Result - args.inputs.keyboard.key_down.escape -** Processing line: ~ args.state.key_event_occurred = true~ + end.uniq do |triangle| +** Processing line: ~ triangle.sort~ - Inside source: true *** True Line Result - args.state.key_event_occurred = true + triangle.sort +** Processing line: ~ end.map do |width, height, hypotenuse|~ +- Inside source: true +*** True Line Result + end.map do |width, height, hypotenuse| +** Processing line: ~ [width, height, hypotenuse, (width * height) / 2]~ +- Inside source: true +*** True Line Result + [width, height, hypotenuse, (width * height) / 2] +** Processing line: ~ end.sort_by do |_, _, _, area|~ +- Inside source: true +*** True Line Result + end.sort_by do |_, _, _, area| +** Processing line: ~ area~ +- Inside source: true +*** True Line Result + area ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -94040,18 +101087,18 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ args.outputs.debug << [0, y - 50, 1280, 60].solid~ +** Processing line: ~ triples.each do |width, height, hypotenuse, area|~ - Inside source: true *** True Line Result - args.outputs.debug << [0, y - 50, 1280, 60].solid -** Processing line: ~ args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label~ + triples.each do |width, height, hypotenuse, area| +** Processing line: ~ puts "(#{width}, #{height}, #{hypotenuse}) = #{area}"~ - Inside source: true *** True Line Result - args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label -** Processing line: ~ args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label~ + puts "(#{width}, #{height}, #{hypotenuse}) = #{area}" +** Processing line: ~ end~ - Inside source: true *** True Line Result - args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label + end ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -94068,122 +101115,114 @@ Follows is a source code listing for all files that have been open sourced. This - End of paragraph detected. *** True Line Result -** Processing line: ~*** Arcade - Twinstick - main.rb~ +** Processing line: ~*** Crafting - Farming Game Starting Point - tests.rb~ - Header detected. *** True Line Result *** True Line Result -*** Arcade - Twinstick - main.rb +*** Crafting - Farming Game Starting Point - tests.rb ** Processing line: ~#+begin_src ruby~ - Line was identified as the beginning of a code block. *** True Line Result *** True Line Result #+begin_src ruby -** Processing line: ~ # ./samples/99_genre_arcade/twinstick/app/main.rb~ -- Inside source: true -*** True Line Result - # ./samples/99_genre_arcade/twinstick/app/main.rb -** Processing line: ~ def tick args~ -- Inside source: true -*** True Line Result - def tick args -** Processing line: ~ args.state.player ||= {x: 600, y: 320, w: 80, h: 80, path: 'sprites/circle-white.png', vx: 0, vy: 0, health: 10, cooldown: 0, score: 0}~ +** Processing line: ~ # ./samples/99_genre_crafting/farming_game_starting_point/app/tests.rb~ - Inside source: true *** True Line Result - args.state.player ||= {x: 600, y: 320, w: 80, h: 80, path: 'sprites/circle-white.png', vx: 0, vy: 0, health: 10, cooldown: 0, score: 0} -** Processing line: ~ args.state.enemies ||= []~ + # ./samples/99_genre_crafting/farming_game_starting_point/app/tests.rb +** Processing line: ~ # For advanced users:~ - Inside source: true *** True Line Result - args.state.enemies ||= [] -** Processing line: ~ args.state.player_bullets ||= []~ + # For advanced users: +** Processing line: ~ # You can put some quick verification tests here, any method~ - Inside source: true *** True Line Result - args.state.player_bullets ||= [] -** Processing line: ~ args.state.tick_count ||= -1~ + # You can put some quick verification tests here, any method +** Processing line: ~ # that starts with the `test_` will be run when you save this file.~ - Inside source: true *** True Line Result - args.state.tick_count ||= -1 -** Processing line: ~ args.state.tick_count += 1~ + # that starts with the `test_` will be run when you save this file. +** Processing line: ~~ - Inside source: true *** True Line Result - args.state.tick_count += 1 -** Processing line: ~ spawn_enemies args~ + +** Processing line: ~ # Here is an example test and game~ - Inside source: true *** True Line Result - spawn_enemies args -** Processing line: ~ kill_enemies args~ + # Here is an example test and game +** Processing line: ~~ - Inside source: true *** True Line Result - kill_enemies args -** Processing line: ~ move_enemies args~ + +** Processing line: ~ # To run the test: ./dragonruby mygame --eval app/tests.rb --no-tick~ - Inside source: true *** True Line Result - move_enemies args -** Processing line: ~ move_bullets args~ + # To run the test: ./dragonruby mygame --eval app/tests.rb --no-tick +** Processing line: ~~ - Inside source: true *** True Line Result - move_bullets args -** Processing line: ~ move_player args~ + +** Processing line: ~ class MySuperHappyFunGame~ - Inside source: true *** True Line Result - move_player args -** Processing line: ~ fire_player args~ + class MySuperHappyFunGame +** Processing line: ~ attr_gtk~ - Inside source: true *** True Line Result - fire_player args -** Processing line: ~ args.state.player[:r] = args.state.player[:g] = args.state.player[:b] = (args.state.player[:health] * 25.5).clamp(0, 255)~ + attr_gtk +** Processing line: ~~ - Inside source: true *** True Line Result - args.state.player[:r] = args.state.player[:g] = args.state.player[:b] = (args.state.player[:health] * 25.5).clamp(0, 255) -** Processing line: ~ label_color = args.state.player[:health] <= 5 ? 255 : 0~ + +** Processing line: ~ def tick~ - Inside source: true *** True Line Result - label_color = args.state.player[:health] <= 5 ? 255 : 0 -** Processing line: ~ args.outputs.labels << [~ + def tick +** Processing line: ~ outputs.solids << [100, 100, 300, 300]~ - Inside source: true *** True Line Result - args.outputs.labels << [ -** Processing line: ~ {~ + outputs.solids << [100, 100, 300, 300] +** Processing line: ~ end~ - Inside source: true *** True Line Result - { -** Processing line: ~ x: args.state.player.x + 40, y: args.state.player.y + 60, alignment_enum: 1, text: "#{args.state.player[:health]} HP",~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - x: args.state.player.x + 40, y: args.state.player.y + 60, alignment_enum: 1, text: "#{args.state.player[:health]} HP", -** Processing line: ~ r: label_color, g: label_color, b: label_color~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - r: label_color, g: label_color, b: label_color -** Processing line: ~ }, {~ + +** Processing line: ~ def test_universe args, assert~ - Inside source: true *** True Line Result - }, { -** Processing line: ~ x: args.state.player.x + 40, y: args.state.player.y + 40, alignment_enum: 1, text: "#{args.state.player[:score]} PTS",~ + def test_universe args, assert +** Processing line: ~ game = MySuperHappyFunGame.new~ - Inside source: true *** True Line Result - x: args.state.player.x + 40, y: args.state.player.y + 40, alignment_enum: 1, text: "#{args.state.player[:score]} PTS", -** Processing line: ~ r: label_color, g: label_color, b: label_color, size_enum: 2 - args.state.player[:score].to_s.length,~ + game = MySuperHappyFunGame.new +** Processing line: ~ game.args = args~ - Inside source: true *** True Line Result - r: label_color, g: label_color, b: label_color, size_enum: 2 - args.state.player[:score].to_s.length, -** Processing line: ~ }~ + game.args = args +** Processing line: ~ game.tick~ - Inside source: true *** True Line Result - } -** Processing line: ~ ]~ + game.tick +** Processing line: ~ assert.true! args.outputs.solids.length == 1, "failure: a solid was not added after tick"~ - Inside source: true *** True Line Result - ] -** Processing line: ~ args.outputs.sprites << [args.state.player, args.state.enemies, args.state.player_bullets]~ + assert.true! args.outputs.solids.length == 1, "failure: a solid was not added after tick" +** Processing line: ~ assert.false! 1 == 2, "failure: some how, 1 equals 2, the world is ending"~ - Inside source: true *** True Line Result - args.outputs.sprites << [args.state.player, args.state.enemies, args.state.player_bullets] -** Processing line: ~ args.state.clear! if args.state.player[:health] < 0 # Reset the game if the player's health drops below zero~ + assert.false! 1 == 2, "failure: some how, 1 equals 2, the world is ending" +** Processing line: ~ puts "test_universe completed successfully"~ - Inside source: true *** True Line Result - args.state.clear! if args.state.player[:health] < 0 # Reset the game if the player's health drops below zero + puts "test_universe completed successfully" ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -94192,290 +101231,254 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def spawn_enemies args~ -- Inside source: true -*** True Line Result - def spawn_enemies args -** Processing line: ~ # Spawn enemies more frequently as the player's score increases.~ -- Inside source: true -*** True Line Result - # Spawn enemies more frequently as the player's score increases. -** Processing line: ~ if rand < (100+args.state.player[:score])/(10000 + args.state.player[:score]) || args.state.tick_count.zero?~ -- Inside source: true -*** True Line Result - if rand < (100+args.state.player[:score])/(10000 + args.state.player[:score]) || args.state.tick_count.zero? -** Processing line: ~ theta = rand * Math::PI * 2~ -- Inside source: true -*** True Line Result - theta = rand * Math::PI * 2 -** Processing line: ~ args.state.enemies << {~ -- Inside source: true -*** True Line Result - args.state.enemies << { -** Processing line: ~ x: 600 + Math.cos(theta) * 800, y: 320 + Math.sin(theta) * 800, w: 80, h: 80, path: 'sprites/circle-white.png',~ -- Inside source: true -*** True Line Result - x: 600 + Math.cos(theta) * 800, y: 320 + Math.sin(theta) * 800, w: 80, h: 80, path: 'sprites/circle-white.png', -** Processing line: ~ r: (256 * rand).floor, g: (256 * rand).floor, b: (256 * rand).floor~ +** Processing line: ~ puts "running tests"~ - Inside source: true *** True Line Result - r: (256 * rand).floor, g: (256 * rand).floor, b: (256 * rand).floor -** Processing line: ~ }~ + puts "running tests" +** Processing line: ~ $gtk.reset 100~ - Inside source: true *** True Line Result - } -** Processing line: ~ end~ + $gtk.reset 100 +** Processing line: ~ $gtk.log_level = :off~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + $gtk.log_level = :off +** Processing line: ~ $gtk.tests.start~ - Inside source: true *** True Line Result - end + $gtk.tests.start ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def kill_enemies args~ -- Inside source: true +** Processing line: ~#+end_src~ +- Line was identified as the end of a code block. *** True Line Result - def kill_enemies args -** Processing line: ~ args.state.enemies.reject! do |enemy|~ -- Inside source: true +#+end_src +** Processing line: ~~ +- End of paragraph detected. *** True Line Result - args.state.enemies.reject! do |enemy| -** Processing line: ~ # Check if enemy and player are within 80 pixels of each other (i.e. overlapping)~ -- Inside source: true + +** Processing line: ~*** Dev Tools - Add Buttons To Console - main.rb~ +- Header detected. *** True Line Result - # Check if enemy and player are within 80 pixels of each other (i.e. overlapping) -** Processing line: ~ if 6400 > (enemy.x - args.state.player.x) ** 2 + (enemy.y - args.state.player.y) ** 2~ -- Inside source: true + *** True Line Result - if 6400 > (enemy.x - args.state.player.x) ** 2 + (enemy.y - args.state.player.y) ** 2 -** Processing line: ~ # Enemy is touching player. Kill enemy, and reduce player HP by 1.~ -- Inside source: true +*** Dev Tools - Add Buttons To Console - main.rb +** Processing line: ~#+begin_src ruby~ +- Line was identified as the beginning of a code block. *** True Line Result - # Enemy is touching player. Kill enemy, and reduce player HP by 1. -** Processing line: ~ args.state.player[:health] -= 1~ -- Inside source: true + *** True Line Result - args.state.player[:health] -= 1 -** Processing line: ~ else~ +#+begin_src ruby +** Processing line: ~ # ./samples/99_genre_dev_tools/add_buttons_to_console/app/main.rb~ - Inside source: true *** True Line Result - else -** Processing line: ~ args.state.player_bullets.any? do |bullet|~ + # ./samples/99_genre_dev_tools/add_buttons_to_console/app/main.rb +** Processing line: ~ # You can customize the buttons that show up in the Console.~ - Inside source: true *** True Line Result - args.state.player_bullets.any? do |bullet| -** Processing line: ~ # Check if enemy and bullet are within 50 pixels of each other (i.e. overlapping)~ + # You can customize the buttons that show up in the Console. +** Processing line: ~ class GTK::Console::Menu~ - Inside source: true *** True Line Result - # Check if enemy and bullet are within 50 pixels of each other (i.e. overlapping) -** Processing line: ~ if 2500 > (enemy.x - bullet.x + 30) ** 2 + (enemy.y - bullet.y + 30) ** 2~ + class GTK::Console::Menu +** Processing line: ~ # STEP 1: Override the custom_buttons function.~ - Inside source: true *** True Line Result - if 2500 > (enemy.x - bullet.x + 30) ** 2 + (enemy.y - bullet.y + 30) ** 2 -** Processing line: ~ # Increase player health by one for each enemy killed by a bullet after the first enemy, up to a maximum of 10 HP~ + # STEP 1: Override the custom_buttons function. +** Processing line: ~ def custom_buttons~ - Inside source: true *** True Line Result - # Increase player health by one for each enemy killed by a bullet after the first enemy, up to a maximum of 10 HP -** Processing line: ~ args.state.player[:health] += 1 if args.state.player[:health] < 10 && bullet[:kills] > 0~ + def custom_buttons +** Processing line: ~ [~ - Inside source: true *** True Line Result - args.state.player[:health] += 1 if args.state.player[:health] < 10 && bullet[:kills] > 0 -** Processing line: ~ # Keep track of how many enemies have been killed by this particular bullet~ + [ +** Processing line: ~ (button id: :yay,~ - Inside source: true *** True Line Result - # Keep track of how many enemies have been killed by this particular bullet -** Processing line: ~ bullet[:kills] += 1~ + (button id: :yay, +** Processing line: ~ # row for button~ - Inside source: true *** True Line Result - bullet[:kills] += 1 -** Processing line: ~ # Earn more points by killing multiple enemies with one shot.~ + # row for button +** Processing line: ~ row: 3,~ - Inside source: true *** True Line Result - # Earn more points by killing multiple enemies with one shot. -** Processing line: ~ args.state.player[:score] += bullet[:kills]~ + row: 3, +** Processing line: ~ # column for button~ - Inside source: true *** True Line Result - args.state.player[:score] += bullet[:kills] -** Processing line: ~ end~ + # column for button +** Processing line: ~ col: 10,~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + col: 10, +** Processing line: ~ # text~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + # text +** Processing line: ~ text: "I AM CUSTOM",~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + text: "I AM CUSTOM", +** Processing line: ~ # when clicked call the custom_button_clicked function~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + # when clicked call the custom_button_clicked function +** Processing line: ~ method: :custom_button_clicked),~ - Inside source: true *** True Line Result - end + method: :custom_button_clicked), ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def move_enemies args~ +** Processing line: ~ (button id: :yay,~ - Inside source: true *** True Line Result - def move_enemies args -** Processing line: ~ args.state.enemies.each do |enemy|~ + (button id: :yay, +** Processing line: ~ # row for button~ - Inside source: true *** True Line Result - args.state.enemies.each do |enemy| -** Processing line: ~ # Get the angle from the enemy to the player~ + # row for button +** Processing line: ~ row: 3,~ - Inside source: true *** True Line Result - # Get the angle from the enemy to the player -** Processing line: ~ theta = Math.atan2(enemy.y - args.state.player.y, enemy.x - args.state.player.x)~ + row: 3, +** Processing line: ~ # column for button~ - Inside source: true *** True Line Result - theta = Math.atan2(enemy.y - args.state.player.y, enemy.x - args.state.player.x) -** Processing line: ~ # Convert the angle to a vector pointing at the player~ + # column for button +** Processing line: ~ col: 9,~ - Inside source: true *** True Line Result - # Convert the angle to a vector pointing at the player -** Processing line: ~ dx, dy = theta.to_degrees.vector 5~ + col: 9, +** Processing line: ~ # text~ - Inside source: true *** True Line Result - dx, dy = theta.to_degrees.vector 5 -** Processing line: ~ # Move the enemy towards thr player~ + # text +** Processing line: ~ text: "CUSTOM ALSO",~ - Inside source: true *** True Line Result - # Move the enemy towards thr player -** Processing line: ~ enemy.x -= dx~ + text: "CUSTOM ALSO", +** Processing line: ~ # when clicked call the custom_button_also_clicked function~ - Inside source: true *** True Line Result - enemy.x -= dx -** Processing line: ~ enemy.y -= dy~ + # when clicked call the custom_button_also_clicked function +** Processing line: ~ method: :custom_button_also_clicked)~ - Inside source: true *** True Line Result - enemy.y -= dy -** Processing line: ~ end~ + method: :custom_button_also_clicked) +** Processing line: ~ ]~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + ] +** Processing line: ~ end~ - Inside source: true *** True Line Result - end + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def move_bullets args~ -- Inside source: true -*** True Line Result - def move_bullets args -** Processing line: ~ args.state.player_bullets.each do |bullet|~ -- Inside source: true -*** True Line Result - args.state.player_bullets.each do |bullet| -** Processing line: ~ # Move the bullets according to the bullet's velocity~ +** Processing line: ~ # STEP 2: Define the function that should be called.~ - Inside source: true *** True Line Result - # Move the bullets according to the bullet's velocity -** Processing line: ~ bullet.x += bullet[:vx]~ + # STEP 2: Define the function that should be called. +** Processing line: ~ def custom_button_clicked~ - Inside source: true *** True Line Result - bullet.x += bullet[:vx] -** Processing line: ~ bullet.y += bullet[:vy]~ + def custom_button_clicked +** Processing line: ~ log "* INFO: I AM CUSTOM was clicked!"~ - Inside source: true *** True Line Result - bullet.y += bullet[:vy] + log "* INFO: I AM CUSTOM was clicked!" ** Processing line: ~ end~ - Inside source: true *** True Line Result end -** Processing line: ~ args.state.player_bullets.reject! do |bullet|~ +** Processing line: ~~ - Inside source: true *** True Line Result - args.state.player_bullets.reject! do |bullet| -** Processing line: ~ # Despawn bullets that are outside the screen area~ + +** Processing line: ~ def custom_button_also_clicked~ - Inside source: true *** True Line Result - # Despawn bullets that are outside the screen area -** Processing line: ~ bullet.x < -20 || bullet.y < -20 || bullet.x > 1300 || bullet.y > 740~ + def custom_button_also_clicked +** Processing line: ~ log "* INFO: Custom Button Clicked at #{Kernel.global_tick_count}!"~ - Inside source: true *** True Line Result - bullet.x < -20 || bullet.y < -20 || bullet.x > 1300 || bullet.y > 740 -** Processing line: ~ end~ + log "* INFO: Custom Button Clicked at #{Kernel.global_tick_count}!" +** Processing line: ~~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + +** Processing line: ~ all_buttons_as_string = $gtk.console.menu.buttons.map do |b|~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + all_buttons_as_string = $gtk.console.menu.buttons.map do |b| +** Processing line: ~ <<-S.strip~ - Inside source: true *** True Line Result - -** Processing line: ~ def move_player args~ + <<-S.strip +** Processing line: ~ ** id: #{b[:id]}~ - Inside source: true *** True Line Result - def move_player args -** Processing line: ~ # Get the currently held direction.~ + ** id: #{b[:id]} +** Processing line: ~ :PROPERTIES:~ - Inside source: true *** True Line Result - # Get the currently held direction. -** Processing line: ~ dx, dy = move_directional_vector args~ + :PROPERTIES: +** Processing line: ~ :id: :#{b[:id]}~ - Inside source: true *** True Line Result - dx, dy = move_directional_vector args -** Processing line: ~ # Take the weighted average of the old velocities and the desired velocities.~ + :id: :#{b[:id]} +** Processing line: ~ :method: :#{b[:method]}~ - Inside source: true *** True Line Result - # Take the weighted average of the old velocities and the desired velocities. -** Processing line: ~ # Since move_directional_vector returns values between -1 and 1,~ + :method: :#{b[:method]} +** Processing line: ~ :text: #{b[:text]}~ - Inside source: true *** True Line Result - # Since move_directional_vector returns values between -1 and 1, -** Processing line: ~ # and we want to limit the speed to 7.5, we multiply dx and dy by 7.5*0.1 to get 0.75~ + :text: #{b[:text]} +** Processing line: ~ :END:~ - Inside source: true *** True Line Result - # and we want to limit the speed to 7.5, we multiply dx and dy by 7.5*0.1 to get 0.75 -** Processing line: ~ args.state.player[:vx] = args.state.player[:vx] * 0.9 + dx * 0.75~ + :END: +** Processing line: ~ S~ - Inside source: true *** True Line Result - args.state.player[:vx] = args.state.player[:vx] * 0.9 + dx * 0.75 -** Processing line: ~ args.state.player[:vy] = args.state.player[:vy] * 0.9 + dy * 0.75~ + S +** Processing line: ~ end.join("\n")~ - Inside source: true *** True Line Result - args.state.player[:vy] = args.state.player[:vy] * 0.9 + dy * 0.75 -** Processing line: ~ # Move the player~ + end.join("\n") +** Processing line: ~~ - Inside source: true *** True Line Result - # Move the player -** Processing line: ~ args.state.player.x += args.state.player[:vx]~ + +** Processing line: ~ log <<-S~ - Inside source: true *** True Line Result - args.state.player.x += args.state.player[:vx] -** Processing line: ~ args.state.player.y += args.state.player[:vy]~ + log <<-S +** Processing line: ~ * INFO: Here are all the buttons:~ - Inside source: true *** True Line Result - args.state.player.y += args.state.player[:vy] -** Processing line: ~ # If the player is about to go out of bounds, put them back in bounds.~ + * INFO: Here are all the buttons: +** Processing line: ~ #{all_buttons_as_string}~ - Inside source: true *** True Line Result - # If the player is about to go out of bounds, put them back in bounds. -** Processing line: ~ args.state.player.x = args.state.player.x.clamp(0, 1201)~ + #{all_buttons_as_string} +** Processing line: ~ S~ - Inside source: true *** True Line Result - args.state.player.x = args.state.player.x.clamp(0, 1201) -** Processing line: ~ args.state.player.y = args.state.player.y.clamp(0, 640)~ + S +** Processing line: ~ end~ - Inside source: true *** True Line Result - args.state.player.y = args.state.player.y.clamp(0, 640) + end ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -94484,622 +101487,586 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ def fire_player args~ +** Processing line: ~ def tick args~ - Inside source: true *** True Line Result - def fire_player args -** Processing line: ~ # Reduce the firing cooldown each tick~ + def tick args +** Processing line: ~ args.outputs.labels << [args.grid.center.x, args.grid.center.y,~ - Inside source: true *** True Line Result - # Reduce the firing cooldown each tick -** Processing line: ~ args.state.player[:cooldown] -= 1~ + args.outputs.labels << [args.grid.center.x, args.grid.center.y, +** Processing line: ~ "Open the DragonRuby Console to see the custom menu items.",~ - Inside source: true *** True Line Result - args.state.player[:cooldown] -= 1 -** Processing line: ~ # If the player is allowed to fire~ + "Open the DragonRuby Console to see the custom menu items.", +** Processing line: ~ 0, 1]~ - Inside source: true *** True Line Result - # If the player is allowed to fire -** Processing line: ~ if args.state.player[:cooldown] <= 0~ + 0, 1] +** Processing line: ~ end~ - Inside source: true *** True Line Result - if args.state.player[:cooldown] <= 0 -** Processing line: ~ dx, dy = shoot_directional_vector args # Get the bullet velocity~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - dx, dy = shoot_directional_vector args # Get the bullet velocity -** Processing line: ~ return if dx == 0 && dy == 0 # If the velocity is zero, the player doesn't want to fire. Therefore, we just return early.~ -- Inside source: true + +** Processing line: ~#+end_src~ +- Line was identified as the end of a code block. *** True Line Result - return if dx == 0 && dy == 0 # If the velocity is zero, the player doesn't want to fire. Therefore, we just return early. -** Processing line: ~ # Add a new bullet to the list of player bullets.~ -- Inside source: true +#+end_src +** Processing line: ~~ +- End of paragraph detected. *** True Line Result - # Add a new bullet to the list of player bullets. -** Processing line: ~ args.state.player_bullets << {~ -- Inside source: true + +** Processing line: ~*** Dev Tools - Animation Creator Starting Point - main.rb~ +- Header detected. *** True Line Result - args.state.player_bullets << { -** Processing line: ~ x: args.state.player.x + 30 + 40 * dx,~ -- Inside source: true + *** True Line Result - x: args.state.player.x + 30 + 40 * dx, -** Processing line: ~ y: args.state.player.y + 30 + 40 * dy,~ -- Inside source: true +*** Dev Tools - Animation Creator Starting Point - main.rb +** Processing line: ~#+begin_src ruby~ +- Line was identified as the beginning of a code block. *** True Line Result - y: args.state.player.y + 30 + 40 * dy, -** Processing line: ~ w: 20, h: 20,~ -- Inside source: true + *** True Line Result - w: 20, h: 20, -** Processing line: ~ path: 'sprites/circle-white.png',~ +#+begin_src ruby +** Processing line: ~ # ./samples/99_genre_dev_tools/animation_creator_starting_point/app/main.rb~ - Inside source: true *** True Line Result - path: 'sprites/circle-white.png', -** Processing line: ~ r: 0, g: 0, b: 0,~ + # ./samples/99_genre_dev_tools/animation_creator_starting_point/app/main.rb +** Processing line: ~ class OneBitLowrezPaint~ - Inside source: true *** True Line Result - r: 0, g: 0, b: 0, -** Processing line: ~ vx: 10 * dx + args.state.player[:vx] / 7.5, vy: 10 * dy + args.state.player[:vy] / 7.5, # Factor in a bit of the player's velocity~ + class OneBitLowrezPaint +** Processing line: ~ attr_gtk~ - Inside source: true *** True Line Result - vx: 10 * dx + args.state.player[:vx] / 7.5, vy: 10 * dy + args.state.player[:vy] / 7.5, # Factor in a bit of the player's velocity -** Processing line: ~ kills: 0~ + attr_gtk +** Processing line: ~~ - Inside source: true *** True Line Result - kills: 0 -** Processing line: ~ }~ + +** Processing line: ~ def tick~ - Inside source: true *** True Line Result - } -** Processing line: ~ args.state.player[:cooldown] = 30 # Reset the cooldown~ + def tick +** Processing line: ~ outputs.background_color = [0, 0, 0]~ - Inside source: true *** True Line Result - args.state.player[:cooldown] = 30 # Reset the cooldown -** Processing line: ~ end~ + outputs.background_color = [0, 0, 0] +** Processing line: ~ defaults~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + defaults +** Processing line: ~ render_instructions~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + render_instructions +** Processing line: ~ render_canvas~ - Inside source: true *** True Line Result - -** Processing line: ~ # Custom function for getting a directional vector just for movement using WASD~ + render_canvas +** Processing line: ~ render_buttons_frame_selection~ - Inside source: true *** True Line Result - # Custom function for getting a directional vector just for movement using WASD -** Processing line: ~ def move_directional_vector args~ + render_buttons_frame_selection +** Processing line: ~ render_animation_frame_thumbnails~ - Inside source: true *** True Line Result - def move_directional_vector args -** Processing line: ~ dx = 0~ + render_animation_frame_thumbnails +** Processing line: ~ render_animation~ - Inside source: true *** True Line Result - dx = 0 -** Processing line: ~ dx += 1 if args.inputs.keyboard.d~ + render_animation +** Processing line: ~ input_mouse_click~ - Inside source: true *** True Line Result - dx += 1 if args.inputs.keyboard.d -** Processing line: ~ dx -= 1 if args.inputs.keyboard.a~ + input_mouse_click +** Processing line: ~ input_keyboard~ - Inside source: true *** True Line Result - dx -= 1 if args.inputs.keyboard.a -** Processing line: ~ dy = 0~ + input_keyboard +** Processing line: ~ calc_auto_export~ - Inside source: true *** True Line Result - dy = 0 -** Processing line: ~ dy += 1 if args.inputs.keyboard.w~ + calc_auto_export +** Processing line: ~ calc_buttons_frame_selection~ - Inside source: true *** True Line Result - dy += 1 if args.inputs.keyboard.w -** Processing line: ~ dy -= 1 if args.inputs.keyboard.s~ + calc_buttons_frame_selection +** Processing line: ~ calc_animation_frames~ - Inside source: true *** True Line Result - dy -= 1 if args.inputs.keyboard.s -** Processing line: ~ if dx != 0 && dy != 0~ + calc_animation_frames +** Processing line: ~ process_queue_create_sprite~ - Inside source: true *** True Line Result - if dx != 0 && dy != 0 -** Processing line: ~ dx *= 0.7071~ + process_queue_create_sprite +** Processing line: ~ process_queue_reset_sprite~ - Inside source: true *** True Line Result - dx *= 0.7071 -** Processing line: ~ dy *= 0.7071~ + process_queue_reset_sprite +** Processing line: ~ process_queue_update_rt_animation_frame~ - Inside source: true *** True Line Result - dy *= 0.7071 + process_queue_update_rt_animation_frame ** Processing line: ~ end~ - Inside source: true *** True Line Result end -** Processing line: ~ [dx, dy]~ -- Inside source: true -*** True Line Result - [dx, dy] -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Custom function for getting a directional vector just for shooting using the arrow keys~ -- Inside source: true -*** True Line Result - # Custom function for getting a directional vector just for shooting using the arrow keys -** Processing line: ~ def shoot_directional_vector args~ +** Processing line: ~ def defaults~ - Inside source: true *** True Line Result - def shoot_directional_vector args -** Processing line: ~ dx = 0~ + def defaults +** Processing line: ~ state.animation_frames_per_second = 12~ - Inside source: true *** True Line Result - dx = 0 -** Processing line: ~ dx += 1 if args.inputs.keyboard.key_down.right || args.inputs.keyboard.key_held.right~ + state.animation_frames_per_second = 12 +** Processing line: ~ queues.create_sprite ||= []~ - Inside source: true *** True Line Result - dx += 1 if args.inputs.keyboard.key_down.right || args.inputs.keyboard.key_held.right -** Processing line: ~ dx -= 1 if args.inputs.keyboard.key_down.left || args.inputs.keyboard.key_held.left~ + queues.create_sprite ||= [] +** Processing line: ~ queues.reset_sprite ||= []~ - Inside source: true *** True Line Result - dx -= 1 if args.inputs.keyboard.key_down.left || args.inputs.keyboard.key_held.left -** Processing line: ~ dy = 0~ + queues.reset_sprite ||= [] +** Processing line: ~ queues.update_rt_animation_frame ||= []~ - Inside source: true *** True Line Result - dy = 0 -** Processing line: ~ dy += 1 if args.inputs.keyboard.key_down.up || args.inputs.keyboard.key_held.up~ + queues.update_rt_animation_frame ||= [] +** Processing line: ~~ - Inside source: true *** True Line Result - dy += 1 if args.inputs.keyboard.key_down.up || args.inputs.keyboard.key_held.up -** Processing line: ~ dy -= 1 if args.inputs.keyboard.key_down.down || args.inputs.keyboard.key_held.down~ + +** Processing line: ~ if !state.animation_frames~ - Inside source: true *** True Line Result - dy -= 1 if args.inputs.keyboard.key_down.down || args.inputs.keyboard.key_held.down -** Processing line: ~ if dx != 0 && dy != 0~ + if !state.animation_frames +** Processing line: ~ state.animation_frames ||= []~ - Inside source: true *** True Line Result - if dx != 0 && dy != 0 -** Processing line: ~ dx *= 0.7071~ + state.animation_frames ||= [] +** Processing line: ~ add_animation_frame_to_end~ - Inside source: true *** True Line Result - dx *= 0.7071 -** Processing line: ~ dy *= 0.7071~ + add_animation_frame_to_end +** Processing line: ~ end~ - Inside source: true *** True Line Result - dy *= 0.7071 -** Processing line: ~ end~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - end -** Processing line: ~ [dx, dy]~ + +** Processing line: ~ state.last_mouse_down ||= 0~ - Inside source: true *** True Line Result - [dx, dy] -** Processing line: ~ end~ + state.last_mouse_down ||= 0 +** Processing line: ~ state.last_mouse_up ||= 0~ - Inside source: true *** True Line Result - end -** Processing line: ~#+end_src~ -- Line was identified as the end of a code block. -*** True Line Result -#+end_src + state.last_mouse_up ||= 0 ** Processing line: ~~ -- End of paragraph detected. -*** True Line Result - -** Processing line: ~*** Crafting - Craft Game Starting Point - main.rb~ -- Header detected. -*** True Line Result - -*** True Line Result -*** Crafting - Craft Game Starting Point - main.rb -** Processing line: ~#+begin_src ruby~ -- Line was identified as the beginning of a code block. -*** True Line Result - -*** True Line Result -#+begin_src ruby -** Processing line: ~ # ./samples/99_genre_crafting/craft_game_starting_point/app/main.rb~ - Inside source: true *** True Line Result - # ./samples/99_genre_crafting/craft_game_starting_point/app/main.rb -** Processing line: ~ # ==================================================~ + +** Processing line: ~ state.buttons_frame_selection.left = 10~ - Inside source: true *** True Line Result - # ================================================== -** Processing line: ~ # A NOTE TO JAM CRAFT PARTICIPANTS:~ + state.buttons_frame_selection.left = 10 +** Processing line: ~ state.buttons_frame_selection.top = grid.top - 10~ - Inside source: true *** True Line Result - # A NOTE TO JAM CRAFT PARTICIPANTS: -** Processing line: ~ # The comments and code in here are just as small piece of DragonRuby's capabilities.~ + state.buttons_frame_selection.top = grid.top - 10 +** Processing line: ~ state.buttons_frame_selection.size = 20~ - Inside source: true *** True Line Result - # The comments and code in here are just as small piece of DragonRuby's capabilities. -** Processing line: ~ # Be sure to check out the rest of the sample apps. Start with README.txt and go from there!~ + state.buttons_frame_selection.size = 20 +** Processing line: ~~ - Inside source: true *** True Line Result - # Be sure to check out the rest of the sample apps. Start with README.txt and go from there! -** Processing line: ~ # ==================================================~ + +** Processing line: ~ defaults_canvas_sprite~ - Inside source: true *** True Line Result - # ================================================== + defaults_canvas_sprite ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # def tick args is the entry point into your game. This function is called at~ +** Processing line: ~ state.edit_mode ||= :drawing~ - Inside source: true *** True Line Result - # def tick args is the entry point into your game. This function is called at -** Processing line: ~ # a fixed update time of 60hz (60 fps).~ + state.edit_mode ||= :drawing +** Processing line: ~ end~ - Inside source: true *** True Line Result - # a fixed update time of 60hz (60 fps). -** Processing line: ~ def tick args~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - def tick args -** Processing line: ~ # The defaults function intitializes the game.~ + +** Processing line: ~ def defaults_canvas_sprite~ - Inside source: true *** True Line Result - # The defaults function intitializes the game. -** Processing line: ~ defaults args~ + def defaults_canvas_sprite +** Processing line: ~ rt_canvas.size = 16~ - Inside source: true *** True Line Result - defaults args -** Processing line: ~~ + rt_canvas.size = 16 +** Processing line: ~ rt_canvas.zoom = 30~ - Inside source: true *** True Line Result - -** Processing line: ~ # After the game is initialized, render it.~ + rt_canvas.zoom = 30 +** Processing line: ~ rt_canvas.width = rt_canvas.size * rt_canvas.zoom~ - Inside source: true *** True Line Result - # After the game is initialized, render it. -** Processing line: ~ render args~ + rt_canvas.width = rt_canvas.size * rt_canvas.zoom +** Processing line: ~ rt_canvas.height = rt_canvas.size * rt_canvas.zoom~ - Inside source: true *** True Line Result - render args -** Processing line: ~~ + rt_canvas.height = rt_canvas.size * rt_canvas.zoom +** Processing line: ~ rt_canvas.sprite = { x: 0,~ - Inside source: true *** True Line Result - -** Processing line: ~ # After rendering the player should be able to respond to input.~ + rt_canvas.sprite = { x: 0, +** Processing line: ~ y: 0,~ - Inside source: true *** True Line Result - # After rendering the player should be able to respond to input. -** Processing line: ~ input args~ + y: 0, +** Processing line: ~ w: rt_canvas.width,~ - Inside source: true *** True Line Result - input args -** Processing line: ~~ + w: rt_canvas.width, +** Processing line: ~ h: rt_canvas.height,~ - Inside source: true *** True Line Result - -** Processing line: ~ # After responding to input, the game performs any additional calculations.~ + h: rt_canvas.height, +** Processing line: ~ path: :rt_canvas }.center_inside_rect(x: 0, y: 0, w: 640, h: 720)~ - Inside source: true *** True Line Result - # After responding to input, the game performs any additional calculations. -** Processing line: ~ calc args~ + path: :rt_canvas }.center_inside_rect(x: 0, y: 0, w: 640, h: 720) +** Processing line: ~~ - Inside source: true *** True Line Result - calc args -** Processing line: ~ end~ + +** Processing line: ~ return unless state.tick_count == 1~ - Inside source: true *** True Line Result - end + return unless state.tick_count == 1 ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def defaults args~ +** Processing line: ~ outputs[:rt_canvas].width = rt_canvas.width~ - Inside source: true *** True Line Result - def defaults args -** Processing line: ~ # hide the mouse cursor for this game, we are going to render our own cursor~ + outputs[:rt_canvas].width = rt_canvas.width +** Processing line: ~ outputs[:rt_canvas].height = rt_canvas.height~ - Inside source: true *** True Line Result - # hide the mouse cursor for this game, we are going to render our own cursor -** Processing line: ~ if args.state.tick_count == 0~ + outputs[:rt_canvas].height = rt_canvas.height +** Processing line: ~ outputs[:rt_canvas].sprites << (rt_canvas.size + 1).map_with_index do |x|~ - Inside source: true *** True Line Result - if args.state.tick_count == 0 -** Processing line: ~ args.gtk.hide_cursor~ + outputs[:rt_canvas].sprites << (rt_canvas.size + 1).map_with_index do |x| +** Processing line: ~ (rt_canvas.size + 1).map_with_index do |y|~ - Inside source: true *** True Line Result - args.gtk.hide_cursor -** Processing line: ~ end~ + (rt_canvas.size + 1).map_with_index do |y| +** Processing line: ~ path = 'sprites/square-white.png'~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + path = 'sprites/square-white.png' +** Processing line: ~ path = 'sprites/square-blue.png' if x == 7 || x == 8~ - Inside source: true *** True Line Result - -** Processing line: ~ args.state.click_ripples ||= []~ + path = 'sprites/square-blue.png' if x == 7 || x == 8 +** Processing line: ~ { x: x * rt_canvas.zoom,~ - Inside source: true *** True Line Result - args.state.click_ripples ||= [] -** Processing line: ~~ + { x: x * rt_canvas.zoom, +** Processing line: ~ y: y * rt_canvas.zoom,~ - Inside source: true *** True Line Result - -** Processing line: ~ # everything is on a 1280x720 virtual canvas, so you can~ + y: y * rt_canvas.zoom, +** Processing line: ~ w: rt_canvas.zoom,~ - Inside source: true *** True Line Result - # everything is on a 1280x720 virtual canvas, so you can -** Processing line: ~ # hardcode locations~ + w: rt_canvas.zoom, +** Processing line: ~ h: rt_canvas.zoom,~ - Inside source: true *** True Line Result - # hardcode locations -** Processing line: ~~ + h: rt_canvas.zoom, +** Processing line: ~ path: path,~ - Inside source: true *** True Line Result - -** Processing line: ~ # define the borders for where the inventory is located~ + path: path, +** Processing line: ~ a: 50 }~ - Inside source: true *** True Line Result - # define the borders for where the inventory is located -** Processing line: ~ # args.state is a data structure that accepts any arbitrary parameters~ + a: 50 } +** Processing line: ~ end~ - Inside source: true *** True Line Result - # args.state is a data structure that accepts any arbitrary parameters -** Processing line: ~ # so you can create an object graph without having to create any classes.~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - # so you can create an object graph without having to create any classes. + end +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Bottom left is 0, 0. Top right is 1280, 720.~ +** Processing line: ~ def render_instructions~ - Inside source: true *** True Line Result - # Bottom left is 0, 0. Top right is 1280, 720. -** Processing line: ~ # The inventory area is at the top of the screen~ + def render_instructions +** Processing line: ~ instructions = [~ - Inside source: true *** True Line Result - # The inventory area is at the top of the screen -** Processing line: ~ # the number 80 is the size of all the sprites, so that is what is being~ + instructions = [ +** Processing line: ~ "* Hotkeys:",~ - Inside source: true *** True Line Result - # the number 80 is the size of all the sprites, so that is what is being -** Processing line: ~ # used to decide the with and height~ + "* Hotkeys:", +** Processing line: ~ "- d: hold to erase, release to draw.",~ - Inside source: true *** True Line Result - # used to decide the with and height -** Processing line: ~ args.state.sprite_size = 80~ + "- d: hold to erase, release to draw.", +** Processing line: ~ "- a: add frame.",~ - Inside source: true *** True Line Result - args.state.sprite_size = 80 -** Processing line: ~~ + "- a: add frame.", +** Processing line: ~ "- c: copy frame.",~ - Inside source: true *** True Line Result - -** Processing line: ~ args.state.inventory_border.w = args.state.sprite_size * 10~ + "- c: copy frame.", +** Processing line: ~ "- v: paste frame.",~ - Inside source: true *** True Line Result - args.state.inventory_border.w = args.state.sprite_size * 10 -** Processing line: ~ args.state.inventory_border.h = args.state.sprite_size * 3~ + "- v: paste frame.", +** Processing line: ~ "- x: delete frame.",~ - Inside source: true *** True Line Result - args.state.inventory_border.h = args.state.sprite_size * 3 -** Processing line: ~ args.state.inventory_border.x = 10~ + "- x: delete frame.", +** Processing line: ~ "- b: go to previous frame.",~ - Inside source: true *** True Line Result - args.state.inventory_border.x = 10 -** Processing line: ~ args.state.inventory_border.y = 710 - args.state.inventory_border.h~ + "- b: go to previous frame.", +** Processing line: ~ "- f: go to next frame.",~ - Inside source: true *** True Line Result - args.state.inventory_border.y = 710 - args.state.inventory_border.h -** Processing line: ~~ + "- f: go to next frame.", +** Processing line: ~ "- w: save to ./canvas directory.",~ - Inside source: true *** True Line Result - -** Processing line: ~ # define the borders for where the crafting area is located~ + "- w: save to ./canvas directory.", +** Processing line: ~ "- l: load from ./canvas."~ - Inside source: true *** True Line Result - # define the borders for where the crafting area is located -** Processing line: ~ # the crafting area is below the inventory area~ + "- l: load from ./canvas." +** Processing line: ~ ]~ - Inside source: true *** True Line Result - # the crafting area is below the inventory area -** Processing line: ~ # the number 80 is the size of all the sprites, so that is what is being~ + ] +** Processing line: ~~ - Inside source: true *** True Line Result - # the number 80 is the size of all the sprites, so that is what is being -** Processing line: ~ # used to decide the with and height~ + +** Processing line: ~ instructions.each.with_index do |l, i|~ - Inside source: true *** True Line Result - # used to decide the with and height -** Processing line: ~ args.state.craft_border.x = 10~ + instructions.each.with_index do |l, i| +** Processing line: ~ outputs.labels << { x: 840, y: 500 - (i * 20), text: "#{l}",~ - Inside source: true *** True Line Result - args.state.craft_border.x = 10 -** Processing line: ~ args.state.craft_border.y = 220~ + outputs.labels << { x: 840, y: 500 - (i * 20), text: "#{l}", +** Processing line: ~ r: 180, g: 180, b: 180, size_enum: 0 }~ - Inside source: true *** True Line Result - args.state.craft_border.y = 220 -** Processing line: ~ args.state.craft_border.w = args.state.sprite_size * 3~ + r: 180, g: 180, b: 180, size_enum: 0 } +** Processing line: ~ end~ - Inside source: true *** True Line Result - args.state.craft_border.w = args.state.sprite_size * 3 -** Processing line: ~ args.state.craft_border.h = args.state.sprite_size * 3~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - args.state.craft_border.h = args.state.sprite_size * 3 + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # define the area where results are located~ -- Inside source: true -*** True Line Result - # define the area where results are located -** Processing line: ~ # the crafting result is to the right of the craft area~ -- Inside source: true -*** True Line Result - # the crafting result is to the right of the craft area -** Processing line: ~ args.state.result_border.x = 10 + args.state.sprite_size * 3 + args.state.sprite_size~ +** Processing line: ~ def render_canvas~ - Inside source: true *** True Line Result - args.state.result_border.x = 10 + args.state.sprite_size * 3 + args.state.sprite_size -** Processing line: ~ args.state.result_border.y = 220 + args.state.sprite_size~ + def render_canvas +** Processing line: ~ return if state.tick_count.zero?~ - Inside source: true *** True Line Result - args.state.result_border.y = 220 + args.state.sprite_size -** Processing line: ~ args.state.result_border.w = args.state.sprite_size~ + return if state.tick_count.zero? +** Processing line: ~ outputs.sprites << rt_canvas.sprite~ - Inside source: true *** True Line Result - args.state.result_border.w = args.state.sprite_size -** Processing line: ~ args.state.result_border.h = args.state.sprite_size~ + outputs.sprites << rt_canvas.sprite +** Processing line: ~ end~ - Inside source: true *** True Line Result - args.state.result_border.h = args.state.sprite_size + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # initialize items for the first time if they are nil~ +** Processing line: ~ def render_buttons_frame_selection~ - Inside source: true *** True Line Result - # initialize items for the first time if they are nil -** Processing line: ~ # you start with 15 wood, 1 chest, and 5 plank~ + def render_buttons_frame_selection +** Processing line: ~ args.outputs.primitives << state.buttons_frame_selection.items.map_with_index do |b, i|~ +- Inside source: true +*** True Line Result + args.outputs.primitives << state.buttons_frame_selection.items.map_with_index do |b, i| +** Processing line: ~ label = { x: b.x + state.buttons_frame_selection.size.half,~ - Inside source: true *** True Line Result - # you start with 15 wood, 1 chest, and 5 plank -** Processing line: ~ # Ruby has built in syntax for dictionaries (they look a lot like json objects).~ + label = { x: b.x + state.buttons_frame_selection.size.half, +** Processing line: ~ y: b.y,~ - Inside source: true *** True Line Result - # Ruby has built in syntax for dictionaries (they look a lot like json objects). -** Processing line: ~ # Ruby also has a special type called a Symbol denoted with a : followed by a word.~ + y: b.y, +** Processing line: ~ text: "#{i + 1}", r: 180, g: 180, b: 180,~ - Inside source: true *** True Line Result - # Ruby also has a special type called a Symbol denoted with a : followed by a word. -** Processing line: ~ # Symbols are nice because they remove the need for magic strings.~ + text: "#{i + 1}", r: 180, g: 180, b: 180, +** Processing line: ~ size_enum: -4, alignment_enum: 1 }.label!~ - Inside source: true *** True Line Result - # Symbols are nice because they remove the need for magic strings. -** Processing line: ~ if !args.state.items~ + size_enum: -4, alignment_enum: 1 }.label! +** Processing line: ~~ - Inside source: true *** True Line Result - if !args.state.items -** Processing line: ~ args.state.items = [~ + +** Processing line: ~ selection_border = b.merge(r: 40, g: 40, b: 40).border!~ - Inside source: true *** True Line Result - args.state.items = [ -** Processing line: ~ {~ + selection_border = b.merge(r: 40, g: 40, b: 40).border! +** Processing line: ~~ - Inside source: true *** True Line Result - { -** Processing line: ~ id: :wood, # :wood is a Symbol, this is better than using "wood" for the id~ + +** Processing line: ~ if i == state.animation_frames_selected_index~ - Inside source: true *** True Line Result - id: :wood, # :wood is a Symbol, this is better than using "wood" for the id -** Processing line: ~ quantity: 15,~ + if i == state.animation_frames_selected_index +** Processing line: ~ selection_border = b.merge(r: 40, g: 230, b: 200).border!~ - Inside source: true *** True Line Result - quantity: 15, -** Processing line: ~ path: 'sprites/wood.png',~ + selection_border = b.merge(r: 40, g: 230, b: 200).border! +** Processing line: ~ end~ - Inside source: true *** True Line Result - path: 'sprites/wood.png', -** Processing line: ~ location: :inventory,~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - location: :inventory, -** Processing line: ~ ordinal_x: 0, ordinal_y: 0~ + +** Processing line: ~ [selection_border, label]~ - Inside source: true *** True Line Result - ordinal_x: 0, ordinal_y: 0 -** Processing line: ~ },~ + [selection_border, label] +** Processing line: ~ end~ - Inside source: true *** True Line Result - }, -** Processing line: ~ {~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - { -** Processing line: ~ id: :chest,~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - id: :chest, -** Processing line: ~ quantity: 1,~ + +** Processing line: ~ def render_animation_frame_thumbnails~ - Inside source: true *** True Line Result - quantity: 1, -** Processing line: ~ path: 'sprites/chest.png',~ + def render_animation_frame_thumbnails +** Processing line: ~ return if state.tick_count.zero?~ - Inside source: true *** True Line Result - path: 'sprites/chest.png', -** Processing line: ~ location: :inventory,~ + return if state.tick_count.zero? +** Processing line: ~~ - Inside source: true *** True Line Result - location: :inventory, -** Processing line: ~ ordinal_x: 1, ordinal_y: 0~ + +** Processing line: ~ outputs[:current_animation_frame].width = rt_canvas.size~ - Inside source: true *** True Line Result - ordinal_x: 1, ordinal_y: 0 -** Processing line: ~ },~ + outputs[:current_animation_frame].width = rt_canvas.size +** Processing line: ~ outputs[:current_animation_frame].height = rt_canvas.size~ - Inside source: true *** True Line Result - }, -** Processing line: ~ {~ + outputs[:current_animation_frame].height = rt_canvas.size +** Processing line: ~ outputs[:current_animation_frame].solids << selected_animation_frame[:pixels].map_with_index do |f, i|~ - Inside source: true *** True Line Result - { -** Processing line: ~ id: :plank,~ + outputs[:current_animation_frame].solids << selected_animation_frame[:pixels].map_with_index do |f, i| +** Processing line: ~ { x: f.x,~ - Inside source: true *** True Line Result - id: :plank, -** Processing line: ~ quantity: 5,~ + { x: f.x, +** Processing line: ~ y: f.y,~ - Inside source: true *** True Line Result - quantity: 5, -** Processing line: ~ path: 'sprites/plank.png',~ + y: f.y, +** Processing line: ~ w: 1,~ - Inside source: true *** True Line Result - path: 'sprites/plank.png', -** Processing line: ~ location: :inventory,~ + w: 1, +** Processing line: ~ h: 1, r: 255, g: 255, b: 255 }~ - Inside source: true *** True Line Result - location: :inventory, -** Processing line: ~ ordinal_x: 2, ordinal_y: 0~ + h: 1, r: 255, g: 255, b: 255 } +** Processing line: ~ end~ - Inside source: true *** True Line Result - ordinal_x: 2, ordinal_y: 0 -** Processing line: ~ },~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - }, -** Processing line: ~ ]~ + +** Processing line: ~ outputs.sprites << rt_canvas.sprite.merge(path: :current_animation_frame)~ - Inside source: true *** True Line Result - ] + outputs.sprites << rt_canvas.sprite.merge(path: :current_animation_frame) ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # after initializing the oridinal positions, derive the pixel~ +** Processing line: ~ state.animation_frames.map_with_index do |animation_frame, animation_frame_index|~ - Inside source: true *** True Line Result - # after initializing the oridinal positions, derive the pixel -** Processing line: ~ # locations assuming that the width and height are 80~ + state.animation_frames.map_with_index do |animation_frame, animation_frame_index| +** Processing line: ~ outputs.sprites << state.buttons_frame_selection[:items][animation_frame_index][:inner_rect]~ - Inside source: true *** True Line Result - # locations assuming that the width and height are 80 -** Processing line: ~ args.state.items.each { |item| set_inventory_position args, item }~ + outputs.sprites << state.buttons_frame_selection[:items][animation_frame_index][:inner_rect] +** Processing line: ~ .merge(path: animation_frame[:rt_name])~ - Inside source: true *** True Line Result - args.state.items.each { |item| set_inventory_position args, item } + .merge(path: animation_frame[:rt_name]) +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -95108,558 +102075,542 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # define all the oridinal positions of the inventory slots~ +** Processing line: ~ def render_animation~ - Inside source: true *** True Line Result - # define all the oridinal positions of the inventory slots -** Processing line: ~ if !args.state.inventory_area~ + def render_animation +** Processing line: ~ sprite_index = 0.frame_index count: state.animation_frames.length,~ - Inside source: true *** True Line Result - if !args.state.inventory_area -** Processing line: ~ args.state.inventory_area = [~ + sprite_index = 0.frame_index count: state.animation_frames.length, +** Processing line: ~ hold_for: 60 / state.animation_frames_per_second,~ - Inside source: true *** True Line Result - args.state.inventory_area = [ -** Processing line: ~ { ordinal_x: 0, ordinal_y: 0 },~ + hold_for: 60 / state.animation_frames_per_second, +** Processing line: ~ repeat: true~ - Inside source: true *** True Line Result - { ordinal_x: 0, ordinal_y: 0 }, -** Processing line: ~ { ordinal_x: 1, ordinal_y: 0 },~ + repeat: true +** Processing line: ~~ - Inside source: true *** True Line Result - { ordinal_x: 1, ordinal_y: 0 }, -** Processing line: ~ { ordinal_x: 2, ordinal_y: 0 },~ + +** Processing line: ~ args.outputs.sprites << { x: 700 - 8,~ - Inside source: true *** True Line Result - { ordinal_x: 2, ordinal_y: 0 }, -** Processing line: ~ { ordinal_x: 3, ordinal_y: 0 },~ + args.outputs.sprites << { x: 700 - 8, +** Processing line: ~ y: 120,~ - Inside source: true *** True Line Result - { ordinal_x: 3, ordinal_y: 0 }, -** Processing line: ~ { ordinal_x: 4, ordinal_y: 0 },~ + y: 120, +** Processing line: ~ w: 16,~ - Inside source: true *** True Line Result - { ordinal_x: 4, ordinal_y: 0 }, -** Processing line: ~ { ordinal_x: 5, ordinal_y: 0 },~ + w: 16, +** Processing line: ~ h: 16,~ - Inside source: true *** True Line Result - { ordinal_x: 5, ordinal_y: 0 }, -** Processing line: ~ { ordinal_x: 6, ordinal_y: 0 },~ + h: 16, +** Processing line: ~ path: (sprite_path sprite_index) }~ - Inside source: true *** True Line Result - { ordinal_x: 6, ordinal_y: 0 }, -** Processing line: ~ { ordinal_x: 7, ordinal_y: 0 },~ + path: (sprite_path sprite_index) } +** Processing line: ~~ - Inside source: true *** True Line Result - { ordinal_x: 7, ordinal_y: 0 }, -** Processing line: ~ { ordinal_x: 8, ordinal_y: 0 },~ + +** Processing line: ~ args.outputs.sprites << { x: 700 - 16,~ - Inside source: true *** True Line Result - { ordinal_x: 8, ordinal_y: 0 }, -** Processing line: ~ { ordinal_x: 9, ordinal_y: 0 },~ + args.outputs.sprites << { x: 700 - 16, +** Processing line: ~ y: 230,~ - Inside source: true *** True Line Result - { ordinal_x: 9, ordinal_y: 0 }, -** Processing line: ~ { ordinal_x: 0, ordinal_y: 1 },~ + y: 230, +** Processing line: ~ w: 32,~ - Inside source: true *** True Line Result - { ordinal_x: 0, ordinal_y: 1 }, -** Processing line: ~ { ordinal_x: 1, ordinal_y: 1 },~ + w: 32, +** Processing line: ~ h: 32,~ - Inside source: true *** True Line Result - { ordinal_x: 1, ordinal_y: 1 }, -** Processing line: ~ { ordinal_x: 2, ordinal_y: 1 },~ + h: 32, +** Processing line: ~ path: (sprite_path sprite_index) }~ - Inside source: true *** True Line Result - { ordinal_x: 2, ordinal_y: 1 }, -** Processing line: ~ { ordinal_x: 3, ordinal_y: 1 },~ + path: (sprite_path sprite_index) } +** Processing line: ~~ - Inside source: true *** True Line Result - { ordinal_x: 3, ordinal_y: 1 }, -** Processing line: ~ { ordinal_x: 4, ordinal_y: 1 },~ + +** Processing line: ~ args.outputs.sprites << { x: 700 - 32,~ - Inside source: true *** True Line Result - { ordinal_x: 4, ordinal_y: 1 }, -** Processing line: ~ { ordinal_x: 5, ordinal_y: 1 },~ + args.outputs.sprites << { x: 700 - 32, +** Processing line: ~ y: 360,~ - Inside source: true *** True Line Result - { ordinal_x: 5, ordinal_y: 1 }, -** Processing line: ~ { ordinal_x: 6, ordinal_y: 1 },~ + y: 360, +** Processing line: ~ w: 64,~ - Inside source: true *** True Line Result - { ordinal_x: 6, ordinal_y: 1 }, -** Processing line: ~ { ordinal_x: 7, ordinal_y: 1 },~ + w: 64, +** Processing line: ~ h: 64,~ - Inside source: true *** True Line Result - { ordinal_x: 7, ordinal_y: 1 }, -** Processing line: ~ { ordinal_x: 8, ordinal_y: 1 },~ + h: 64, +** Processing line: ~ path: (sprite_path sprite_index) }~ - Inside source: true *** True Line Result - { ordinal_x: 8, ordinal_y: 1 }, -** Processing line: ~ { ordinal_x: 9, ordinal_y: 1 },~ + path: (sprite_path sprite_index) } +** Processing line: ~~ - Inside source: true *** True Line Result - { ordinal_x: 9, ordinal_y: 1 }, -** Processing line: ~ { ordinal_x: 0, ordinal_y: 2 },~ + +** Processing line: ~ args.outputs.sprites << { x: 700 - 64,~ - Inside source: true *** True Line Result - { ordinal_x: 0, ordinal_y: 2 }, -** Processing line: ~ { ordinal_x: 1, ordinal_y: 2 },~ + args.outputs.sprites << { x: 700 - 64, +** Processing line: ~ y: 520,~ - Inside source: true *** True Line Result - { ordinal_x: 1, ordinal_y: 2 }, -** Processing line: ~ { ordinal_x: 2, ordinal_y: 2 },~ + y: 520, +** Processing line: ~ w: 128,~ - Inside source: true *** True Line Result - { ordinal_x: 2, ordinal_y: 2 }, -** Processing line: ~ { ordinal_x: 3, ordinal_y: 2 },~ + w: 128, +** Processing line: ~ h: 128,~ - Inside source: true *** True Line Result - { ordinal_x: 3, ordinal_y: 2 }, -** Processing line: ~ { ordinal_x: 4, ordinal_y: 2 },~ + h: 128, +** Processing line: ~ path: (sprite_path sprite_index) }~ - Inside source: true *** True Line Result - { ordinal_x: 4, ordinal_y: 2 }, -** Processing line: ~ { ordinal_x: 5, ordinal_y: 2 },~ + path: (sprite_path sprite_index) } +** Processing line: ~ end~ - Inside source: true *** True Line Result - { ordinal_x: 5, ordinal_y: 2 }, -** Processing line: ~ { ordinal_x: 6, ordinal_y: 2 },~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - { ordinal_x: 6, ordinal_y: 2 }, -** Processing line: ~ { ordinal_x: 7, ordinal_y: 2 },~ + +** Processing line: ~ def input_mouse_click~ - Inside source: true *** True Line Result - { ordinal_x: 7, ordinal_y: 2 }, -** Processing line: ~ { ordinal_x: 8, ordinal_y: 2 },~ + def input_mouse_click +** Processing line: ~ if inputs.mouse.up~ - Inside source: true *** True Line Result - { ordinal_x: 8, ordinal_y: 2 }, -** Processing line: ~ { ordinal_x: 9, ordinal_y: 2 },~ + if inputs.mouse.up +** Processing line: ~ state.last_mouse_up = state.tick_count~ - Inside source: true *** True Line Result - { ordinal_x: 9, ordinal_y: 2 }, -** Processing line: ~ ]~ + state.last_mouse_up = state.tick_count +** Processing line: ~ elsif inputs.mouse.moved && user_is_editing?~ - Inside source: true *** True Line Result - ] -** Processing line: ~~ + elsif inputs.mouse.moved && user_is_editing? +** Processing line: ~ edit_current_animation_frame inputs.mouse.point~ - Inside source: true *** True Line Result - -** Processing line: ~ # after initializing the oridinal positions, derive the pixel~ + edit_current_animation_frame inputs.mouse.point +** Processing line: ~ end~ - Inside source: true *** True Line Result - # after initializing the oridinal positions, derive the pixel -** Processing line: ~ # locations assuming that the width and height are 80~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - # locations assuming that the width and height are 80 -** Processing line: ~ args.state.inventory_area.each { |i| set_inventory_position args, i }~ + +** Processing line: ~ return unless inputs.mouse.click~ - Inside source: true *** True Line Result - args.state.inventory_area.each { |i| set_inventory_position args, i } + return unless inputs.mouse.click ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # if you want to see the result you can use the Ruby function called "puts".~ +** Processing line: ~ clicked_frame_button = state.buttons_frame_selection.items.find do |b|~ - Inside source: true *** True Line Result - # if you want to see the result you can use the Ruby function called "puts". -** Processing line: ~ # Uncomment this line to see the value.~ + clicked_frame_button = state.buttons_frame_selection.items.find do |b| +** Processing line: ~ inputs.mouse.point.inside_rect? b~ - Inside source: true *** True Line Result - # Uncomment this line to see the value. -** Processing line: ~ # puts args.state.inventory_area~ + inputs.mouse.point.inside_rect? b +** Processing line: ~ end~ - Inside source: true *** True Line Result - # puts args.state.inventory_area + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # You can see all things written via puts in DragonRuby's Console, or under logs/log.txt.~ +** Processing line: ~ if (clicked_frame_button)~ - Inside source: true *** True Line Result - # You can see all things written via puts in DragonRuby's Console, or under logs/log.txt. -** Processing line: ~ # To bring up DragonRuby's Console, press the ~ key within the game.~ + if (clicked_frame_button) +** Processing line: ~ state.animation_frames_selected_index = clicked_frame_button[:index]~ - Inside source: true *** True Line Result - # To bring up DragonRuby's Console, press the ~ key within the game. -** Processing line: ~ end~ + state.animation_frames_selected_index = clicked_frame_button[:index] +** Processing line: ~ end~ - Inside source: true *** True Line Result - end + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # define all the oridinal positions of the craft slots~ -- Inside source: true -*** True Line Result - # define all the oridinal positions of the craft slots -** Processing line: ~ if !args.state.craft_area~ +** Processing line: ~ if (inputs.mouse.point.inside_rect? rt_canvas.sprite)~ - Inside source: true *** True Line Result - if !args.state.craft_area -** Processing line: ~ args.state.craft_area = [~ + if (inputs.mouse.point.inside_rect? rt_canvas.sprite) +** Processing line: ~ state.last_mouse_down = state.tick_count~ - Inside source: true *** True Line Result - args.state.craft_area = [ -** Processing line: ~ { ordinal_x: 0, ordinal_y: 0 },~ + state.last_mouse_down = state.tick_count +** Processing line: ~ edit_current_animation_frame inputs.mouse.point~ - Inside source: true *** True Line Result - { ordinal_x: 0, ordinal_y: 0 }, -** Processing line: ~ { ordinal_x: 0, ordinal_y: 1 },~ + edit_current_animation_frame inputs.mouse.point +** Processing line: ~ end~ - Inside source: true *** True Line Result - { ordinal_x: 0, ordinal_y: 1 }, -** Processing line: ~ { ordinal_x: 0, ordinal_y: 2 },~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - { ordinal_x: 0, ordinal_y: 2 }, -** Processing line: ~ { ordinal_x: 1, ordinal_y: 0 },~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - { ordinal_x: 1, ordinal_y: 0 }, -** Processing line: ~ { ordinal_x: 1, ordinal_y: 1 },~ + +** Processing line: ~ def input_keyboard~ - Inside source: true *** True Line Result - { ordinal_x: 1, ordinal_y: 1 }, -** Processing line: ~ { ordinal_x: 1, ordinal_y: 2 },~ + def input_keyboard +** Processing line: ~ # w to save~ - Inside source: true *** True Line Result - { ordinal_x: 1, ordinal_y: 2 }, -** Processing line: ~ { ordinal_x: 2, ordinal_y: 0 },~ + # w to save +** Processing line: ~ if inputs.keyboard.key_down.w~ - Inside source: true *** True Line Result - { ordinal_x: 2, ordinal_y: 0 }, -** Processing line: ~ { ordinal_x: 2, ordinal_y: 1 },~ + if inputs.keyboard.key_down.w +** Processing line: ~ t = Time.now~ - Inside source: true *** True Line Result - { ordinal_x: 2, ordinal_y: 1 }, -** Processing line: ~ { ordinal_x: 2, ordinal_y: 2 },~ + t = Time.now +** Processing line: ~ state.save_description = "Time: #{t} (#{t.to_i})"~ - Inside source: true *** True Line Result - { ordinal_x: 2, ordinal_y: 2 }, -** Processing line: ~ ]~ + state.save_description = "Time: #{t} (#{t.to_i})" +** Processing line: ~ gtk.serialize_state 'canvas/state.txt', state~ - Inside source: true *** True Line Result - ] -** Processing line: ~~ + gtk.serialize_state 'canvas/state.txt', state +** Processing line: ~ gtk.serialize_state "tmp/canvas_backups/#{t.to_i}/state.txt", state~ - Inside source: true *** True Line Result - -** Processing line: ~ # after initializing the oridinal positions, derive the pixel~ + gtk.serialize_state "tmp/canvas_backups/#{t.to_i}/state.txt", state +** Processing line: ~ animation_frames.each_with_index do |animation_frame, i|~ - Inside source: true *** True Line Result - # after initializing the oridinal positions, derive the pixel -** Processing line: ~ # locations assuming that the width and height are 80~ + animation_frames.each_with_index do |animation_frame, i| +** Processing line: ~ queues.update_rt_animation_frame << { index: i,~ - Inside source: true *** True Line Result - # locations assuming that the width and height are 80 -** Processing line: ~ args.state.craft_area.each { |c| set_craft_position args, c }~ + queues.update_rt_animation_frame << { index: i, +** Processing line: ~ at: state.tick_count + i,~ - Inside source: true *** True Line Result - args.state.craft_area.each { |c| set_craft_position args, c } -** Processing line: ~ end~ + at: state.tick_count + i, +** Processing line: ~ queue_sprite_creation: true }~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + queue_sprite_creation: true } +** Processing line: ~ queues.create_sprite << { index: i,~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + queues.create_sprite << { index: i, +** Processing line: ~ at: state.tick_count + animation_frames.length + i,~ - Inside source: true *** True Line Result - -** Processing line: ~~ + at: state.tick_count + animation_frames.length + i, +** Processing line: ~ path_override: "tmp/canvas_backups/#{t.to_i}/sprite-#{i}.png" }~ - Inside source: true *** True Line Result - -** Processing line: ~ def render args~ + path_override: "tmp/canvas_backups/#{t.to_i}/sprite-#{i}.png" } +** Processing line: ~ end~ - Inside source: true *** True Line Result - def render args -** Processing line: ~ # for the results area, create a sprite that show its boundaries~ + end +** Processing line: ~ gtk.notify! "Canvas saved."~ - Inside source: true *** True Line Result - # for the results area, create a sprite that show its boundaries -** Processing line: ~ args.outputs.primitives << { x: args.state.result_border.x,~ + gtk.notify! "Canvas saved." +** Processing line: ~ end~ - Inside source: true *** True Line Result - args.outputs.primitives << { x: args.state.result_border.x, -** Processing line: ~ y: args.state.result_border.y,~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - y: args.state.result_border.y, -** Processing line: ~ w: args.state.result_border.w,~ + +** Processing line: ~ # l to load~ - Inside source: true *** True Line Result - w: args.state.result_border.w, -** Processing line: ~ h: args.state.result_border.h,~ + # l to load +** Processing line: ~ if inputs.keyboard.key_down.l~ - Inside source: true *** True Line Result - h: args.state.result_border.h, -** Processing line: ~ path: 'sprites/border-black.png' }~ + if inputs.keyboard.key_down.l +** Processing line: ~ args.state = gtk.deserialize_state 'canvas/state.txt'~ - Inside source: true *** True Line Result - path: 'sprites/border-black.png' } -** Processing line: ~~ + args.state = gtk.deserialize_state 'canvas/state.txt' +** Processing line: ~ animation_frames.each_with_index do |a, i|~ - Inside source: true *** True Line Result - -** Processing line: ~ # for each inventory spot, create a sprite~ + animation_frames.each_with_index do |a, i| +** Processing line: ~ queues.update_rt_animation_frame << { index: i,~ - Inside source: true *** True Line Result - # for each inventory spot, create a sprite -** Processing line: ~ # args.outputs.primitives is how DragonRuby performs a render.~ + queues.update_rt_animation_frame << { index: i, +** Processing line: ~ at: state.tick_count + i,~ - Inside source: true *** True Line Result - # args.outputs.primitives is how DragonRuby performs a render. -** Processing line: ~ # Adding a single hash or multiple hashes to this array will tell~ + at: state.tick_count + i, +** Processing line: ~ queue_sprite_creation: true }~ - Inside source: true *** True Line Result - # Adding a single hash or multiple hashes to this array will tell -** Processing line: ~ # DragonRuby to render those primitives on that frame.~ + queue_sprite_creation: true } +** Processing line: ~ end~ - Inside source: true *** True Line Result - # DragonRuby to render those primitives on that frame. -** Processing line: ~~ + end +** Processing line: ~ gtk.notify! "Canvas loaded."~ - Inside source: true *** True Line Result - -** Processing line: ~ # The .map function on Array is used instead of any kind of looping.~ + gtk.notify! "Canvas loaded." +** Processing line: ~ end~ - Inside source: true *** True Line Result - # The .map function on Array is used instead of any kind of looping. -** Processing line: ~ # .map returns a new object for every object within an Array.~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - # .map returns a new object for every object within an Array. -** Processing line: ~ args.outputs.primitives << args.state.inventory_area.map do |a|~ + +** Processing line: ~ # d to go into delete mode, release to paint~ - Inside source: true *** True Line Result - args.outputs.primitives << args.state.inventory_area.map do |a| -** Processing line: ~ { x: a.x, y: a.y, w: a.w, h: a.h, path: 'sprites/border-black.png' }~ + # d to go into delete mode, release to paint +** Processing line: ~ if inputs.keyboard.key_held.d~ - Inside source: true *** True Line Result - { x: a.x, y: a.y, w: a.w, h: a.h, path: 'sprites/border-black.png' } -** Processing line: ~ end~ + if inputs.keyboard.key_held.d +** Processing line: ~ state.edit_mode = :erasing~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + state.edit_mode = :erasing +** Processing line: ~ gtk.notify! "Erasing." if inputs.keyboard.key_held.d == (state.tick_count - 1)~ - Inside source: true *** True Line Result - -** Processing line: ~ # for each craft spot, create a sprite~ + gtk.notify! "Erasing." if inputs.keyboard.key_held.d == (state.tick_count - 1) +** Processing line: ~ elsif inputs.keyboard.key_up.d~ - Inside source: true *** True Line Result - # for each craft spot, create a sprite -** Processing line: ~ args.outputs.primitives << args.state.craft_area.map do |a|~ + elsif inputs.keyboard.key_up.d +** Processing line: ~ state.edit_mode = :drawing~ - Inside source: true *** True Line Result - args.outputs.primitives << args.state.craft_area.map do |a| -** Processing line: ~ { x: a.x, y: a.y, w: a.w, h: a.h, path: 'sprites/border-black.png' }~ + state.edit_mode = :drawing +** Processing line: ~ gtk.notify! "Drawing."~ - Inside source: true *** True Line Result - { x: a.x, y: a.y, w: a.w, h: a.h, path: 'sprites/border-black.png' } -** Processing line: ~ end~ + gtk.notify! "Drawing." +** Processing line: ~ end~ - Inside source: true *** True Line Result - end + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # after the borders have been rendered, render the~ -- Inside source: true -*** True Line Result - # after the borders have been rendered, render the -** Processing line: ~ # items within those slots (and allow for highlighting)~ +** Processing line: ~ # a to add a frame to the end~ - Inside source: true *** True Line Result - # items within those slots (and allow for highlighting) -** Processing line: ~ # if an item isn't currently being held~ + # a to add a frame to the end +** Processing line: ~ if inputs.keyboard.key_down.a~ - Inside source: true *** True Line Result - # if an item isn't currently being held -** Processing line: ~ allow_inventory_highlighting = !args.state.held_item~ + if inputs.keyboard.key_down.a +** Processing line: ~ queues.create_sprite << { index: state.animation_frames_selected_index,~ - Inside source: true *** True Line Result - allow_inventory_highlighting = !args.state.held_item -** Processing line: ~~ + queues.create_sprite << { index: state.animation_frames_selected_index, +** Processing line: ~ at: state.tick_count }~ - Inside source: true *** True Line Result - -** Processing line: ~ # go through each item and render them~ + at: state.tick_count } +** Processing line: ~ queues.create_sprite << { index: state.animation_frames_selected_index + 1,~ - Inside source: true *** True Line Result - # go through each item and render them -** Processing line: ~ # use Array's find_all method to remove any items that are currently being held~ + queues.create_sprite << { index: state.animation_frames_selected_index + 1, +** Processing line: ~ at: state.tick_count }~ - Inside source: true *** True Line Result - # use Array's find_all method to remove any items that are currently being held -** Processing line: ~ args.state.items.find_all { |item| item[:location] != :held }.map do |item|~ + at: state.tick_count } +** Processing line: ~ add_animation_frame_to_end~ - Inside source: true *** True Line Result - args.state.items.find_all { |item| item[:location] != :held }.map do |item| -** Processing line: ~ # if an item is currently being held, don't render it in it's spot within the~ + add_animation_frame_to_end +** Processing line: ~ gtk.notify! "Frame added to end."~ - Inside source: true *** True Line Result - # if an item is currently being held, don't render it in it's spot within the -** Processing line: ~ # inventory or craft area (this is handled via the find_all method).~ + gtk.notify! "Frame added to end." +** Processing line: ~ end~ - Inside source: true *** True Line Result - # inventory or craft area (this is handled via the find_all method). + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # the item_prefab returns a hash containing all the visual components of an item.~ +** Processing line: ~ # c or t to copy~ - Inside source: true *** True Line Result - # the item_prefab returns a hash containing all the visual components of an item. -** Processing line: ~ # the main sprite, the black background, the quantity text, and a hover indication~ + # c or t to copy +** Processing line: ~ if (inputs.keyboard.key_down.c || inputs.keyboard.key_down.t)~ - Inside source: true *** True Line Result - # the main sprite, the black background, the quantity text, and a hover indication -** Processing line: ~ # if the mouse is currently hovering over the item.~ + if (inputs.keyboard.key_down.c || inputs.keyboard.key_down.t) +** Processing line: ~ state.clipboard = [selected_animation_frame[:pixels]].flatten~ - Inside source: true *** True Line Result - # if the mouse is currently hovering over the item. -** Processing line: ~ args.outputs.primitives << item_prefab(args, item, allow_inventory_highlighting, args.inputs.mouse)~ + state.clipboard = [selected_animation_frame[:pixels]].flatten +** Processing line: ~ gtk.notify! "Current frame copied."~ - Inside source: true *** True Line Result - args.outputs.primitives << item_prefab(args, item, allow_inventory_highlighting, args.inputs.mouse) -** Processing line: ~ end~ + gtk.notify! "Current frame copied." +** Processing line: ~ end~ - Inside source: true *** True Line Result - end + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # The last thing we want to render is the item currently being held.~ +** Processing line: ~ # v or q to paste~ - Inside source: true *** True Line Result - # The last thing we want to render is the item currently being held. -** Processing line: ~ args.outputs.primitives << item_prefab(args, args.state.held_item, allow_inventory_highlighting, args.inputs.mouse)~ + # v or q to paste +** Processing line: ~ if (inputs.keyboard.key_down.v || inputs.keyboard.key_down.q) && state.clipboard~ - Inside source: true *** True Line Result - args.outputs.primitives << item_prefab(args, args.state.held_item, allow_inventory_highlighting, args.inputs.mouse) -** Processing line: ~~ + if (inputs.keyboard.key_down.v || inputs.keyboard.key_down.q) && state.clipboard +** Processing line: ~ selected_animation_frame[:pixels] = [state.clipboard].flatten~ - Inside source: true *** True Line Result - -** Processing line: ~ args.outputs.primitives << args.state.click_ripples~ + selected_animation_frame[:pixels] = [state.clipboard].flatten +** Processing line: ~ queues.update_rt_animation_frame << { index: state.animation_frames_selected_index,~ - Inside source: true *** True Line Result - args.outputs.primitives << args.state.click_ripples -** Processing line: ~~ + queues.update_rt_animation_frame << { index: state.animation_frames_selected_index, +** Processing line: ~ at: state.tick_count,~ - Inside source: true *** True Line Result - -** Processing line: ~ # render a mouse cursor since we have the OS cursor hidden~ + at: state.tick_count, +** Processing line: ~ queue_sprite_creation: true }~ - Inside source: true *** True Line Result - # render a mouse cursor since we have the OS cursor hidden -** Processing line: ~ args.outputs.primitives << { x: args.inputs.mouse.x - 5, y: args.inputs.mouse.y - 5, w: 10, h: 10, path: 'sprites/circle-gray.png', a: 128 }~ + queue_sprite_creation: true } +** Processing line: ~ gtk.notify! "Pasted."~ - Inside source: true *** True Line Result - args.outputs.primitives << { x: args.inputs.mouse.x - 5, y: args.inputs.mouse.y - 5, w: 10, h: 10, path: 'sprites/circle-gray.png', a: 128 } -** Processing line: ~ end~ + gtk.notify! "Pasted." +** Processing line: ~ end~ - Inside source: true *** True Line Result - end + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Alrighty! This is where all the fun happens~ -- Inside source: true -*** True Line Result - # Alrighty! This is where all the fun happens -** Processing line: ~ def input args~ -- Inside source: true -*** True Line Result - def input args -** Processing line: ~ # if the mouse is clicked and not item is currently being held~ +** Processing line: ~ # f to go forward/next frame~ - Inside source: true *** True Line Result - # if the mouse is clicked and not item is currently being held -** Processing line: ~ # args.state.held_item is nil when the game starts.~ + # f to go forward/next frame +** Processing line: ~ if (inputs.keyboard.key_down.f)~ - Inside source: true *** True Line Result - # args.state.held_item is nil when the game starts. -** Processing line: ~ # If the player clicks, the property args.inputs.mouse.click will~ + if (inputs.keyboard.key_down.f) +** Processing line: ~ if (state.animation_frames_selected_index == (state.animation_frames.length - 1))~ - Inside source: true *** True Line Result - # If the player clicks, the property args.inputs.mouse.click will -** Processing line: ~ # be a non nil value, we don't want to process any of the code here~ + if (state.animation_frames_selected_index == (state.animation_frames.length - 1)) +** Processing line: ~ state.animation_frames_selected_index = 0~ - Inside source: true *** True Line Result - # be a non nil value, we don't want to process any of the code here -** Processing line: ~ # if the mouse hasn't been clicked~ + state.animation_frames_selected_index = 0 +** Processing line: ~ else~ - Inside source: true *** True Line Result - # if the mouse hasn't been clicked -** Processing line: ~ return if !args.inputs.mouse.click~ + else +** Processing line: ~ state.animation_frames_selected_index += 1~ - Inside source: true *** True Line Result - return if !args.inputs.mouse.click -** Processing line: ~~ + state.animation_frames_selected_index += 1 +** Processing line: ~ end~ - Inside source: true *** True Line Result - -** Processing line: ~ # if a click occurred, add a ripple to the ripple queue~ + end +** Processing line: ~ gtk.notify! "Next frame."~ - Inside source: true *** True Line Result - # if a click occurred, add a ripple to the ripple queue -** Processing line: ~ args.state.click_ripples << { x: args.inputs.mouse.x - 5, y: args.inputs.mouse.y - 5, w: 10, h: 10, path: 'sprites/circle-gray.png', a: 128 }~ + gtk.notify! "Next frame." +** Processing line: ~ end~ - Inside source: true *** True Line Result - args.state.click_ripples << { x: args.inputs.mouse.x - 5, y: args.inputs.mouse.y - 5, w: 10, h: 10, path: 'sprites/circle-gray.png', a: 128 } + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # if the mouse has been clicked, and no item is currently held...~ +** Processing line: ~ # b to go back/previous frame~ - Inside source: true *** True Line Result - # if the mouse has been clicked, and no item is currently held... -** Processing line: ~ if !args.state.held_item~ + # b to go back/previous frame +** Processing line: ~ if (inputs.keyboard.key_down.b)~ - Inside source: true *** True Line Result - if !args.state.held_item -** Processing line: ~ # see if any of the items intersect the pointer using the inside_rect? method~ + if (inputs.keyboard.key_down.b) +** Processing line: ~ if (state.animation_frames_selected_index == 0)~ - Inside source: true *** True Line Result - # see if any of the items intersect the pointer using the inside_rect? method -** Processing line: ~ # the find method will either return the first object that returns true~ + if (state.animation_frames_selected_index == 0) +** Processing line: ~ state.animation_frames_selected_index = state.animation_frames.length - 1~ - Inside source: true *** True Line Result - # the find method will either return the first object that returns true -** Processing line: ~ # for the match clause, or it'll return nil if nothing matches the match clause~ + state.animation_frames_selected_index = state.animation_frames.length - 1 +** Processing line: ~ else~ - Inside source: true *** True Line Result - # for the match clause, or it'll return nil if nothing matches the match clause -** Processing line: ~ found = args.state.items.find do |item|~ + else +** Processing line: ~ state.animation_frames_selected_index -= 1~ - Inside source: true *** True Line Result - found = args.state.items.find do |item| -** Processing line: ~ # for each item in args.state.items, run the following boolean check~ + state.animation_frames_selected_index -= 1 +** Processing line: ~ end~ - Inside source: true *** True Line Result - # for each item in args.state.items, run the following boolean check -** Processing line: ~ args.inputs.mouse.click.point.inside_rect?(item)~ + end +** Processing line: ~ gtk.notify! "Previous frame."~ - Inside source: true *** True Line Result - args.inputs.mouse.click.point.inside_rect?(item) + gtk.notify! "Previous frame." ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -95668,326 +102619,302 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # if an item intersects the mouse pointer, then set the item's location to :held and~ -- Inside source: true -*** True Line Result - # if an item intersects the mouse pointer, then set the item's location to :held and -** Processing line: ~ # set args.state.held_item to the item for later reference~ +** Processing line: ~ # x to delete frame~ - Inside source: true *** True Line Result - # set args.state.held_item to the item for later reference -** Processing line: ~ if found~ + # x to delete frame +** Processing line: ~ if (inputs.keyboard.key_down.x) && animation_frames.length > 1~ - Inside source: true *** True Line Result - if found -** Processing line: ~ args.state.held_item = found~ + if (inputs.keyboard.key_down.x) && animation_frames.length > 1 +** Processing line: ~ state.clipboard = selected_animation_frame[:pixels]~ - Inside source: true *** True Line Result - args.state.held_item = found -** Processing line: ~ found[:location] = :held~ + state.clipboard = selected_animation_frame[:pixels] +** Processing line: ~ state.animation_frames = animation_frames.find_all { |v| v[:index] != state.animation_frames_selected_index }~ - Inside source: true *** True Line Result - found[:location] = :held -** Processing line: ~ end~ + state.animation_frames = animation_frames.find_all { |v| v[:index] != state.animation_frames_selected_index } +** Processing line: ~ if state.animation_frames_selected_index >= state.animation_frames.length~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + if state.animation_frames_selected_index >= state.animation_frames.length +** Processing line: ~ state.animation_frames_selected_index = state.animation_frames.length - 1~ - Inside source: true *** True Line Result - -** Processing line: ~ # if the mouse is clicked and an item is currently beign held....~ + state.animation_frames_selected_index = state.animation_frames.length - 1 +** Processing line: ~ end~ - Inside source: true *** True Line Result - # if the mouse is clicked and an item is currently beign held.... -** Processing line: ~ elsif args.state.held_item~ + end +** Processing line: ~ gtk.notify! "Frame deleted."~ - Inside source: true *** True Line Result - elsif args.state.held_item -** Processing line: ~ # determine if a slot within the craft area was clicked~ + gtk.notify! "Frame deleted." +** Processing line: ~ end~ - Inside source: true *** True Line Result - # determine if a slot within the craft area was clicked -** Processing line: ~ craft_area = args.state.craft_area.find { |a| args.inputs.mouse.click.point.inside_rect? a }~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - craft_area = args.state.craft_area.find { |a| args.inputs.mouse.click.point.inside_rect? a } + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # also determine if a slot within the inventory area was clicked~ -- Inside source: true -*** True Line Result - # also determine if a slot within the inventory area was clicked -** Processing line: ~ inventory_area = args.state.inventory_area.find { |a| args.inputs.mouse.click.point.inside_rect? a }~ -- Inside source: true -*** True Line Result - inventory_area = args.state.inventory_area.find { |a| args.inputs.mouse.click.point.inside_rect? a } -** Processing line: ~~ +** Processing line: ~ def calc_auto_export~ - Inside source: true *** True Line Result - -** Processing line: ~ # if the click was within a craft area~ + def calc_auto_export +** Processing line: ~ return if user_is_editing?~ - Inside source: true *** True Line Result - # if the click was within a craft area -** Processing line: ~ if craft_area~ + return if user_is_editing? +** Processing line: ~ return if state.last_mouse_up.elapsed_time != 30~ - Inside source: true *** True Line Result - if craft_area -** Processing line: ~ # check to see if an item is already there and ignore the click if an item is found~ + return if state.last_mouse_up.elapsed_time != 30 +** Processing line: ~ # auto export current animation frame if there is no editing for 30 ticks~ - Inside source: true *** True Line Result - # check to see if an item is already there and ignore the click if an item is found -** Processing line: ~ # item_at_craft_slot is a helper method that returns an item or nil for a given oridinal~ + # auto export current animation frame if there is no editing for 30 ticks +** Processing line: ~ queues.create_sprite << { index: state.animation_frames_selected_index,~ - Inside source: true *** True Line Result - # item_at_craft_slot is a helper method that returns an item or nil for a given oridinal -** Processing line: ~ # position~ + queues.create_sprite << { index: state.animation_frames_selected_index, +** Processing line: ~ at: state.tick_count }~ - Inside source: true *** True Line Result - # position -** Processing line: ~ item_already_there = item_at_craft_slot args, craft_area[:ordinal_x], craft_area[:ordinal_y]~ + at: state.tick_count } +** Processing line: ~ end~ - Inside source: true *** True Line Result - item_already_there = item_at_craft_slot args, craft_area[:ordinal_x], craft_area[:ordinal_y] + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # if an item *doesn't* exist in the craft area~ -- Inside source: true -*** True Line Result - # if an item *doesn't* exist in the craft area -** Processing line: ~ if !item_already_there~ -- Inside source: true -*** True Line Result - if !item_already_there -** Processing line: ~ # if the quantity they are currently holding is greater than 1~ -- Inside source: true -*** True Line Result - # if the quantity they are currently holding is greater than 1 -** Processing line: ~ if args.state.held_item[:quantity] > 1~ +** Processing line: ~ def calc_buttons_frame_selection~ - Inside source: true *** True Line Result - if args.state.held_item[:quantity] > 1 -** Processing line: ~ # remove one item (creating a seperate item of the same type), and place it~ + def calc_buttons_frame_selection +** Processing line: ~ state.buttons_frame_selection.items = animation_frames.length.map_with_index do |i|~ - Inside source: true *** True Line Result - # remove one item (creating a seperate item of the same type), and place it -** Processing line: ~ # at the oridinal position and location of the craft area~ + state.buttons_frame_selection.items = animation_frames.length.map_with_index do |i| +** Processing line: ~ { x: state.buttons_frame_selection.left + i * state.buttons_frame_selection.size,~ - Inside source: true *** True Line Result - # at the oridinal position and location of the craft area -** Processing line: ~ # the .merge method on Hash creates a new Hash, but updates any values~ + { x: state.buttons_frame_selection.left + i * state.buttons_frame_selection.size, +** Processing line: ~ y: state.buttons_frame_selection.top - state.buttons_frame_selection.size,~ - Inside source: true *** True Line Result - # the .merge method on Hash creates a new Hash, but updates any values -** Processing line: ~ # passed as arguments to merge~ + y: state.buttons_frame_selection.top - state.buttons_frame_selection.size, +** Processing line: ~ inner_rect: {~ - Inside source: true *** True Line Result - # passed as arguments to merge -** Processing line: ~ new_item = args.state.held_item.merge(quantity: 1,~ + inner_rect: { +** Processing line: ~ x: (state.buttons_frame_selection.left + 2) + i * state.buttons_frame_selection.size,~ - Inside source: true *** True Line Result - new_item = args.state.held_item.merge(quantity: 1, -** Processing line: ~ location: :craft,~ + x: (state.buttons_frame_selection.left + 2) + i * state.buttons_frame_selection.size, +** Processing line: ~ y: (state.buttons_frame_selection.top - state.buttons_frame_selection.size + 2),~ - Inside source: true *** True Line Result - location: :craft, -** Processing line: ~ ordinal_x: craft_area[:ordinal_x],~ + y: (state.buttons_frame_selection.top - state.buttons_frame_selection.size + 2), +** Processing line: ~ w: 16,~ - Inside source: true *** True Line Result - ordinal_x: craft_area[:ordinal_x], -** Processing line: ~ ordinal_y: craft_area[:ordinal_y])~ + w: 16, +** Processing line: ~ h: 16,~ - Inside source: true *** True Line Result - ordinal_y: craft_area[:ordinal_y]) -** Processing line: ~~ + h: 16, +** Processing line: ~ },~ - Inside source: true *** True Line Result - -** Processing line: ~ # after the item is crated, place it into the args.state.items collection~ + }, +** Processing line: ~ w: state.buttons_frame_selection.size,~ - Inside source: true *** True Line Result - # after the item is crated, place it into the args.state.items collection -** Processing line: ~ args.state.items << new_item~ + w: state.buttons_frame_selection.size, +** Processing line: ~ h: state.buttons_frame_selection.size,~ - Inside source: true *** True Line Result - args.state.items << new_item -** Processing line: ~~ + h: state.buttons_frame_selection.size, +** Processing line: ~ index: i }~ - Inside source: true *** True Line Result - -** Processing line: ~ # then subtract one from the held item~ + index: i } +** Processing line: ~ end~ - Inside source: true *** True Line Result - # then subtract one from the held item -** Processing line: ~ args.state.held_item[:quantity] -= 1~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - args.state.held_item[:quantity] -= 1 + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # if the craft area is available and there is only one item being held~ -- Inside source: true -*** True Line Result - # if the craft area is available and there is only one item being held -** Processing line: ~ elsif args.state.held_item[:quantity] == 1~ +** Processing line: ~ def calc_animation_frames~ - Inside source: true *** True Line Result - elsif args.state.held_item[:quantity] == 1 -** Processing line: ~ # instead of creating any new items just set the location of the held item~ + def calc_animation_frames +** Processing line: ~ animation_frames.each_with_index do |animation_frame, i|~ - Inside source: true *** True Line Result - # instead of creating any new items just set the location of the held item -** Processing line: ~ # to the oridinal position of the craft area, and then nil out the~ + animation_frames.each_with_index do |animation_frame, i| +** Processing line: ~ animation_frame[:index] = i~ - Inside source: true *** True Line Result - # to the oridinal position of the craft area, and then nil out the -** Processing line: ~ # held item state so that a new item can be picked up~ + animation_frame[:index] = i +** Processing line: ~ animation_frame[:rt_name] = "animation_frame_#{i}"~ - Inside source: true *** True Line Result - # held item state so that a new item can be picked up -** Processing line: ~ args.state.held_item[:location] = :craft~ + animation_frame[:rt_name] = "animation_frame_#{i}" +** Processing line: ~ end~ - Inside source: true *** True Line Result - args.state.held_item[:location] = :craft -** Processing line: ~ args.state.held_item[:ordinal_x] = craft_area[:ordinal_x]~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - args.state.held_item[:ordinal_x] = craft_area[:ordinal_x] -** Processing line: ~ args.state.held_item[:ordinal_y] = craft_area[:ordinal_y]~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - args.state.held_item[:ordinal_y] = craft_area[:ordinal_y] -** Processing line: ~ args.state.held_item = nil~ + +** Processing line: ~ def process_queue_create_sprite~ - Inside source: true *** True Line Result - args.state.held_item = nil -** Processing line: ~ end~ + def process_queue_create_sprite +** Processing line: ~ sprites_to_create = queues.create_sprite~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + sprites_to_create = queues.create_sprite +** Processing line: ~ .find_all { |h| h[:at].elapsed? }~ - Inside source: true *** True Line Result - end + .find_all { |h| h[:at].elapsed? } ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # if the selected area is an inventory area (as opposed to within the craft area)~ -- Inside source: true -*** True Line Result - # if the selected area is an inventory area (as opposed to within the craft area) -** Processing line: ~ elsif inventory_area~ +** Processing line: ~ queues.create_sprite = queues.create_sprite - sprites_to_create~ - Inside source: true *** True Line Result - elsif inventory_area + queues.create_sprite = queues.create_sprite - sprites_to_create ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # check to see if there is already an item in that inventory slot~ +** Processing line: ~ sprites_to_create.each do |h|~ - Inside source: true *** True Line Result - # check to see if there is already an item in that inventory slot -** Processing line: ~ # the item_at_inventory_slot helper method returns an item or nil~ + sprites_to_create.each do |h| +** Processing line: ~ export_animation_frame h[:index], h[:path_override]~ - Inside source: true *** True Line Result - # the item_at_inventory_slot helper method returns an item or nil -** Processing line: ~ item_already_there = item_at_inventory_slot args, inventory_area[:ordinal_x], inventory_area[:ordinal_y]~ + export_animation_frame h[:index], h[:path_override] +** Processing line: ~ end~ - Inside source: true *** True Line Result - item_already_there = item_at_inventory_slot args, inventory_area[:ordinal_x], inventory_area[:ordinal_y] + end +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # if there is already an item there, and the item types/id match~ +** Processing line: ~ def process_queue_reset_sprite~ - Inside source: true *** True Line Result - # if there is already an item there, and the item types/id match -** Processing line: ~ if item_already_there && item_already_there[:id] == args.state.held_item[:id]~ + def process_queue_reset_sprite +** Processing line: ~ sprites_to_reset = queues.reset_sprite~ - Inside source: true *** True Line Result - if item_already_there && item_already_there[:id] == args.state.held_item[:id] -** Processing line: ~ # then merge the item quantities~ + sprites_to_reset = queues.reset_sprite +** Processing line: ~ .find_all { |h| h[:at].elapsed? }~ - Inside source: true *** True Line Result - # then merge the item quantities -** Processing line: ~ held_quantity = args.state.held_item[:quantity]~ + .find_all { |h| h[:at].elapsed? } +** Processing line: ~~ - Inside source: true *** True Line Result - held_quantity = args.state.held_item[:quantity] -** Processing line: ~ item_already_there[:quantity] += held_quantity~ + +** Processing line: ~ queues.reset_sprite -= sprites_to_reset~ - Inside source: true *** True Line Result - item_already_there[:quantity] += held_quantity + queues.reset_sprite -= sprites_to_reset ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # remove the item being held from the items collection (since it's quantity is now 0)~ +** Processing line: ~ sprites_to_reset.each { |h| gtk.reset_sprite (sprite_path h[:index]) }~ - Inside source: true *** True Line Result - # remove the item being held from the items collection (since it's quantity is now 0) -** Processing line: ~ args.state.items.reject! { |i| i[:location] == :held }~ + sprites_to_reset.each { |h| gtk.reset_sprite (sprite_path h[:index]) } +** Processing line: ~ end~ - Inside source: true *** True Line Result - args.state.items.reject! { |i| i[:location] == :held } + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # nil out the held_item so a new item can be picked up~ +** Processing line: ~ def process_queue_update_rt_animation_frame~ - Inside source: true *** True Line Result - # nil out the held_item so a new item can be picked up -** Processing line: ~ args.state.held_item = nil~ + def process_queue_update_rt_animation_frame +** Processing line: ~ animation_frames_to_update = queues.update_rt_animation_frame~ - Inside source: true *** True Line Result - args.state.held_item = nil -** Processing line: ~~ + animation_frames_to_update = queues.update_rt_animation_frame +** Processing line: ~ .find_all { |h| h[:at].elapsed? }~ - Inside source: true *** True Line Result - -** Processing line: ~ # if there currently isn't an item there, then put the held item in the slot~ + .find_all { |h| h[:at].elapsed? } +** Processing line: ~~ - Inside source: true *** True Line Result - # if there currently isn't an item there, then put the held item in the slot -** Processing line: ~ elsif !item_already_there~ + +** Processing line: ~ queues.update_rt_animation_frame -= animation_frames_to_update~ - Inside source: true *** True Line Result - elsif !item_already_there -** Processing line: ~ args.state.held_item[:location] = :inventory~ + queues.update_rt_animation_frame -= animation_frames_to_update +** Processing line: ~~ - Inside source: true *** True Line Result - args.state.held_item[:location] = :inventory -** Processing line: ~ args.state.held_item[:ordinal_x] = inventory_area[:ordinal_x]~ + +** Processing line: ~ animation_frames_to_update.each do |h|~ - Inside source: true *** True Line Result - args.state.held_item[:ordinal_x] = inventory_area[:ordinal_x] -** Processing line: ~ args.state.held_item[:ordinal_y] = inventory_area[:ordinal_y]~ + animation_frames_to_update.each do |h| +** Processing line: ~ update_animation_frame_render_target animation_frames[h[:index]]~ - Inside source: true *** True Line Result - args.state.held_item[:ordinal_y] = inventory_area[:ordinal_y] + update_animation_frame_render_target animation_frames[h[:index]] ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # nil out the held_item so a new item can be picked up~ +** Processing line: ~ if h[:queue_sprite_creation]~ - Inside source: true *** True Line Result - # nil out the held_item so a new item can be picked up -** Processing line: ~ args.state.held_item = nil~ + if h[:queue_sprite_creation] +** Processing line: ~ queues.create_sprite << { index: h[:index],~ - Inside source: true *** True Line Result - args.state.held_item = nil + queues.create_sprite << { index: h[:index], +** Processing line: ~ at: state.tick_count + 1 }~ +- Inside source: true +*** True Line Result + at: state.tick_count + 1 } ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -96000,82 +102927,70 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result end -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # the calc method is executed after input~ -- Inside source: true -*** True Line Result - # the calc method is executed after input -** Processing line: ~ def calc args~ -- Inside source: true -*** True Line Result - def calc args -** Processing line: ~ # make sure that the real position of the inventory~ +** Processing line: ~ def update_animation_frame_render_target animation_frame~ - Inside source: true *** True Line Result - # make sure that the real position of the inventory -** Processing line: ~ # items are updated every frame to ensure that they~ + def update_animation_frame_render_target animation_frame +** Processing line: ~ return if !animation_frame~ - Inside source: true *** True Line Result - # items are updated every frame to ensure that they -** Processing line: ~ # are placed correctly given their location and oridinal positions~ + return if !animation_frame +** Processing line: ~~ - Inside source: true *** True Line Result - # are placed correctly given their location and oridinal positions -** Processing line: ~ # instead of using .map, here we use .each (since we are not returning a new item and just updating the items in place)~ + +** Processing line: ~ outputs[animation_frame[:rt_name]].width = state.rt_canvas.size~ - Inside source: true *** True Line Result - # instead of using .map, here we use .each (since we are not returning a new item and just updating the items in place) -** Processing line: ~ args.state.items.each do |item|~ + outputs[animation_frame[:rt_name]].width = state.rt_canvas.size +** Processing line: ~ outputs[animation_frame[:rt_name]].height = state.rt_canvas.size~ - Inside source: true *** True Line Result - args.state.items.each do |item| -** Processing line: ~ # based on the location of the item, invoke the correct pixel conversion method~ + outputs[animation_frame[:rt_name]].height = state.rt_canvas.size +** Processing line: ~ outputs[animation_frame[:rt_name]].solids << animation_frame[:pixels].map do |f|~ - Inside source: true *** True Line Result - # based on the location of the item, invoke the correct pixel conversion method -** Processing line: ~ if item[:location] == :inventory~ + outputs[animation_frame[:rt_name]].solids << animation_frame[:pixels].map do |f| +** Processing line: ~ { x: f.x,~ - Inside source: true *** True Line Result - if item[:location] == :inventory -** Processing line: ~ set_inventory_position args, item~ + { x: f.x, +** Processing line: ~ y: f.y,~ - Inside source: true *** True Line Result - set_inventory_position args, item -** Processing line: ~ elsif item[:location] == :craft~ + y: f.y, +** Processing line: ~ w: 1,~ - Inside source: true *** True Line Result - elsif item[:location] == :craft -** Processing line: ~ set_craft_position args, item~ + w: 1, +** Processing line: ~ h: 1, r: 255, g: 255, b: 255 }~ - Inside source: true *** True Line Result - set_craft_position args, item -** Processing line: ~ elsif item[:location] == :held~ + h: 1, r: 255, g: 255, b: 255 } +** Processing line: ~ end~ - Inside source: true *** True Line Result - elsif item[:location] == :held -** Processing line: ~ # if the item is held, center the item around the mouse pointer~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - # if the item is held, center the item around the mouse pointer -** Processing line: ~ args.state.held_item.x = args.inputs.mouse.x - args.state.held_item.w.half~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - args.state.held_item.x = args.inputs.mouse.x - args.state.held_item.w.half -** Processing line: ~ args.state.held_item.y = args.inputs.mouse.y - args.state.held_item.h.half~ + +** Processing line: ~ def animation_frames~ - Inside source: true *** True Line Result - args.state.held_item.y = args.inputs.mouse.y - args.state.held_item.h.half -** Processing line: ~ end~ + def animation_frames +** Processing line: ~ state.animation_frames~ - Inside source: true *** True Line Result - end + state.animation_frames ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -96084,50 +102999,50 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # for each hash/sprite in the click ripples queue,~ +** Processing line: ~ def add_animation_frame_to_end~ - Inside source: true *** True Line Result - # for each hash/sprite in the click ripples queue, -** Processing line: ~ # expand its size by 20 percent and decrease its alpha~ + def add_animation_frame_to_end +** Processing line: ~ animation_frames << {~ - Inside source: true *** True Line Result - # expand its size by 20 percent and decrease its alpha -** Processing line: ~ # by 10.~ + animation_frames << { +** Processing line: ~ index: animation_frames.length,~ - Inside source: true *** True Line Result - # by 10. -** Processing line: ~ args.state.click_ripples.each do |ripple|~ + index: animation_frames.length, +** Processing line: ~ pixels: [],~ - Inside source: true *** True Line Result - args.state.click_ripples.each do |ripple| -** Processing line: ~ delta_w = ripple.w * 1.2 - ripple.w~ + pixels: [], +** Processing line: ~ rt_name: "animation_frame_#{animation_frames.length}"~ - Inside source: true *** True Line Result - delta_w = ripple.w * 1.2 - ripple.w -** Processing line: ~ delta_h = ripple.h * 1.2 - ripple.h~ + rt_name: "animation_frame_#{animation_frames.length}" +** Processing line: ~ }~ - Inside source: true *** True Line Result - delta_h = ripple.h * 1.2 - ripple.h -** Processing line: ~ ripple.x -= delta_w.half~ + } +** Processing line: ~~ - Inside source: true *** True Line Result - ripple.x -= delta_w.half -** Processing line: ~ ripple.y -= delta_h.half~ + +** Processing line: ~ state.animation_frames_selected_index = (animation_frames.length - 1)~ - Inside source: true *** True Line Result - ripple.y -= delta_h.half -** Processing line: ~ ripple.w += delta_w~ + state.animation_frames_selected_index = (animation_frames.length - 1) +** Processing line: ~ queues.update_rt_animation_frame << { index: state.animation_frames_selected_index,~ - Inside source: true *** True Line Result - ripple.w += delta_w -** Processing line: ~ ripple.h += delta_h~ + queues.update_rt_animation_frame << { index: state.animation_frames_selected_index, +** Processing line: ~ at: state.tick_count,~ - Inside source: true *** True Line Result - ripple.h += delta_h -** Processing line: ~ ripple.a -= 10~ + at: state.tick_count, +** Processing line: ~ queue_sprite_creation: true }~ - Inside source: true *** True Line Result - ripple.a -= 10 + queue_sprite_creation: true } ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -96136,218 +103051,230 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # remove any items from the collection where the alpha value is less than equal to~ +** Processing line: ~ def sprite_path i~ - Inside source: true *** True Line Result - # remove any items from the collection where the alpha value is less than equal to -** Processing line: ~ # zero using the reject! method (reject with an exclamation point at the end changes the~ + def sprite_path i +** Processing line: ~ "canvas/sprite-#{i}.png"~ - Inside source: true *** True Line Result - # zero using the reject! method (reject with an exclamation point at the end changes the -** Processing line: ~ # array value in place, while reject without the exclamation point returns a new array).~ + "canvas/sprite-#{i}.png" +** Processing line: ~ end~ - Inside source: true *** True Line Result - # array value in place, while reject without the exclamation point returns a new array). -** Processing line: ~ args.state.click_ripples.reject! { |ripple| ripple.a <= 0 }~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - args.state.click_ripples.reject! { |ripple| ripple.a <= 0 } -** Processing line: ~ end~ + +** Processing line: ~ def export_animation_frame i, path_override = nil~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + def export_animation_frame i, path_override = nil +** Processing line: ~ return if !state.animation_frames[i]~ - Inside source: true *** True Line Result - -** Processing line: ~ # helper function for finding an item at a craft slot~ + return if !state.animation_frames[i] +** Processing line: ~~ - Inside source: true *** True Line Result - # helper function for finding an item at a craft slot -** Processing line: ~ def item_at_craft_slot args, ordinal_x, ordinal_y~ + +** Processing line: ~ outputs.screenshots << state.buttons_frame_selection~ - Inside source: true *** True Line Result - def item_at_craft_slot args, ordinal_x, ordinal_y -** Processing line: ~ args.state.items.find { |i| i[:location] == :craft && i[:ordinal_x] == ordinal_x && i[:ordinal_y] == ordinal_y }~ + outputs.screenshots << state.buttons_frame_selection +** Processing line: ~ .items[i][:inner_rect]~ - Inside source: true *** True Line Result - args.state.items.find { |i| i[:location] == :craft && i[:ordinal_x] == ordinal_x && i[:ordinal_y] == ordinal_y } -** Processing line: ~ end~ + .items[i][:inner_rect] +** Processing line: ~ .merge(path: path_override || (sprite_path i))~ - Inside source: true *** True Line Result - end + .merge(path: path_override || (sprite_path i)) ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # helper function for finding an item at an inventory slot~ +** Processing line: ~ outputs.screenshots << state.buttons_frame_selection~ - Inside source: true *** True Line Result - # helper function for finding an item at an inventory slot -** Processing line: ~ def item_at_inventory_slot args, ordinal_x, ordinal_y~ + outputs.screenshots << state.buttons_frame_selection +** Processing line: ~ .items[i][:inner_rect]~ - Inside source: true *** True Line Result - def item_at_inventory_slot args, ordinal_x, ordinal_y -** Processing line: ~ args.state.items.find { |i| i[:location] == :inventory && i[:ordinal_x] == ordinal_x && i[:ordinal_y] == ordinal_y }~ + .items[i][:inner_rect] +** Processing line: ~ .merge(path: "tmp/sprite_backups/#{Time.now.to_i}-sprite-#{i}.png")~ - Inside source: true *** True Line Result - args.state.items.find { |i| i[:location] == :inventory && i[:ordinal_x] == ordinal_x && i[:ordinal_y] == ordinal_y } -** Processing line: ~ end~ + .merge(path: "tmp/sprite_backups/#{Time.now.to_i}-sprite-#{i}.png") +** Processing line: ~~ - Inside source: true *** True Line Result - end + +** Processing line: ~ queues.reset_sprite << { index: i, at: state.tick_count }~ +- Inside source: true +*** True Line Result + queues.reset_sprite << { index: i, at: state.tick_count } +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # helper function that creates a visual representation of an item~ +** Processing line: ~ def selected_animation_frame~ - Inside source: true *** True Line Result - # helper function that creates a visual representation of an item -** Processing line: ~ def item_prefab args, item, should_highlight, mouse~ + def selected_animation_frame +** Processing line: ~ state.animation_frames[state.animation_frames_selected_index]~ - Inside source: true *** True Line Result - def item_prefab args, item, should_highlight, mouse -** Processing line: ~ return nil unless item~ + state.animation_frames[state.animation_frames_selected_index] +** Processing line: ~ end~ - Inside source: true *** True Line Result - return nil unless item + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ overlay = nil~ +** Processing line: ~ def edit_current_animation_frame point~ - Inside source: true *** True Line Result - overlay = nil -** Processing line: ~~ + def edit_current_animation_frame point +** Processing line: ~ draw_area_point = (to_draw_area point)~ - Inside source: true *** True Line Result - -** Processing line: ~ x = item.x~ + draw_area_point = (to_draw_area point) +** Processing line: ~ if state.edit_mode == :drawing && (!selected_animation_frame[:pixels].include? draw_area_point)~ - Inside source: true *** True Line Result - x = item.x -** Processing line: ~ y = item.y~ + if state.edit_mode == :drawing && (!selected_animation_frame[:pixels].include? draw_area_point) +** Processing line: ~ selected_animation_frame[:pixels] << draw_area_point~ - Inside source: true *** True Line Result - y = item.y -** Processing line: ~ w = item.w~ + selected_animation_frame[:pixels] << draw_area_point +** Processing line: ~ queues.update_rt_animation_frame << { index: state.animation_frames_selected_index,~ - Inside source: true *** True Line Result - w = item.w -** Processing line: ~ h = item.h~ + queues.update_rt_animation_frame << { index: state.animation_frames_selected_index, +** Processing line: ~ at: state.tick_count,~ - Inside source: true *** True Line Result - h = item.h -** Processing line: ~~ + at: state.tick_count, +** Processing line: ~ queue_sprite_creation: !user_is_editing? }~ - Inside source: true *** True Line Result - -** Processing line: ~ if should_highlight && mouse.point.inside_rect?(item)~ + queue_sprite_creation: !user_is_editing? } +** Processing line: ~ elsif state.edit_mode == :erasing && (selected_animation_frame[:pixels].include? draw_area_point)~ - Inside source: true *** True Line Result - if should_highlight && mouse.point.inside_rect?(item) -** Processing line: ~ overlay = { x: x, y: y, w: w, h: h, path: "sprites/square-blue.png", a: 130, }~ + elsif state.edit_mode == :erasing && (selected_animation_frame[:pixels].include? draw_area_point) +** Processing line: ~ selected_animation_frame[:pixels] = selected_animation_frame[:pixels].reject { |p| p == draw_area_point }~ - Inside source: true *** True Line Result - overlay = { x: x, y: y, w: w, h: h, path: "sprites/square-blue.png", a: 130, } -** Processing line: ~ end~ + selected_animation_frame[:pixels] = selected_animation_frame[:pixels].reject { |p| p == draw_area_point } +** Processing line: ~ queues.update_rt_animation_frame << { index: state.animation_frames_selected_index,~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + queues.update_rt_animation_frame << { index: state.animation_frames_selected_index, +** Processing line: ~ at: state.tick_count,~ - Inside source: true *** True Line Result - -** Processing line: ~ [~ + at: state.tick_count, +** Processing line: ~ queue_sprite_creation: !user_is_editing? }~ - Inside source: true *** True Line Result - [ -** Processing line: ~ # sprites are hashes with a path property, this is the main sprite~ + queue_sprite_creation: !user_is_editing? } +** Processing line: ~ end~ - Inside source: true *** True Line Result - # sprites are hashes with a path property, this is the main sprite -** Processing line: ~ { x: x, y: y, w: args.state.sprite_size, h: args.state.sprite_size, path: item[:path], },~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - { x: x, y: y, w: args.state.sprite_size, h: args.state.sprite_size, path: item[:path], }, + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # this represents the black area in the bottom right corner of the main sprite so that the~ +** Processing line: ~ def user_is_editing?~ - Inside source: true *** True Line Result - # this represents the black area in the bottom right corner of the main sprite so that the -** Processing line: ~ # quantity is visible~ + def user_is_editing? +** Processing line: ~ state.last_mouse_down > state.last_mouse_up~ - Inside source: true *** True Line Result - # quantity is visible -** Processing line: ~ { x: x + 55, y: y, w: 25, h: 25, path: "sprites/square-black.png", }, # sprites are hashes with a path property~ + state.last_mouse_down > state.last_mouse_up +** Processing line: ~ end~ - Inside source: true *** True Line Result - { x: x + 55, y: y, w: 25, h: 25, path: "sprites/square-black.png", }, # sprites are hashes with a path property + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # labels are hashes with a text property~ +** Processing line: ~ def to_draw_area point~ - Inside source: true *** True Line Result - # labels are hashes with a text property -** Processing line: ~ { x: x + 56, y: y + 22, text: "#{item[:quantity]}", r: 255, g: 255, b: 255, },~ + def to_draw_area point +** Processing line: ~ x, y = point~ - Inside source: true *** True Line Result - { x: x + 56, y: y + 22, text: "#{item[:quantity]}", r: 255, g: 255, b: 255, }, -** Processing line: ~~ + x, y = point +** Processing line: ~ x -= rt_canvas.sprite.x~ - Inside source: true *** True Line Result - -** Processing line: ~ # this is the mouse overlay, if the overlay isn't applicable, then this value will be nil (nil values will not be rendered)~ + x -= rt_canvas.sprite.x +** Processing line: ~ y -= rt_canvas.sprite.y~ - Inside source: true *** True Line Result - # this is the mouse overlay, if the overlay isn't applicable, then this value will be nil (nil values will not be rendered) -** Processing line: ~ overlay~ + y -= rt_canvas.sprite.y +** Processing line: ~ { x: x.idiv(rt_canvas.zoom),~ - Inside source: true *** True Line Result - overlay -** Processing line: ~ ]~ + { x: x.idiv(rt_canvas.zoom), +** Processing line: ~ y: y.idiv(rt_canvas.zoom) }~ - Inside source: true *** True Line Result - ] -** Processing line: ~ end~ + y: y.idiv(rt_canvas.zoom) } +** Processing line: ~ end~ - Inside source: true *** True Line Result - end + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # helper function for deriving the position of an item within inventory~ +** Processing line: ~ def rt_canvas~ - Inside source: true *** True Line Result - # helper function for deriving the position of an item within inventory -** Processing line: ~ def set_inventory_position args, item~ + def rt_canvas +** Processing line: ~ state.rt_canvas ||= state.new_entity(:rt_canvas)~ - Inside source: true *** True Line Result - def set_inventory_position args, item -** Processing line: ~ item.x = args.state.inventory_border.x + item[:ordinal_x] * 80~ + state.rt_canvas ||= state.new_entity(:rt_canvas) +** Processing line: ~ end~ - Inside source: true *** True Line Result - item.x = args.state.inventory_border.x + item[:ordinal_x] * 80 -** Processing line: ~ item.y = (args.state.inventory_border.y + args.state.inventory_border.h - 80) - item[:ordinal_y] * 80~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - item.y = (args.state.inventory_border.y + args.state.inventory_border.h - 80) - item[:ordinal_y] * 80 -** Processing line: ~ item.w = 80~ + +** Processing line: ~ def queues~ - Inside source: true *** True Line Result - item.w = 80 -** Processing line: ~ item.h = 80~ + def queues +** Processing line: ~ state.queues ||= state.new_entity(:queues)~ - Inside source: true *** True Line Result - item.h = 80 + state.queues ||= state.new_entity(:queues) +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -96356,30 +103283,26 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # helper function for deriving the position of an item within the craft area~ -- Inside source: true -*** True Line Result - # helper function for deriving the position of an item within the craft area -** Processing line: ~ def set_craft_position args, item~ +** Processing line: ~ $game = OneBitLowrezPaint.new~ - Inside source: true *** True Line Result - def set_craft_position args, item -** Processing line: ~ item.x = args.state.craft_border.x + item[:ordinal_x] * 80~ + $game = OneBitLowrezPaint.new +** Processing line: ~~ - Inside source: true *** True Line Result - item.x = args.state.craft_border.x + item[:ordinal_x] * 80 -** Processing line: ~ item.y = (args.state.craft_border.y + args.state.inventory_border.h - 80) - item[:ordinal_y] * 80~ + +** Processing line: ~ def tick args~ - Inside source: true *** True Line Result - item.y = (args.state.craft_border.y + args.state.inventory_border.h - 80) - item[:ordinal_y] * 80 -** Processing line: ~ item.w = 80~ + def tick args +** Processing line: ~ $game.args = args~ - Inside source: true *** True Line Result - item.w = 80 -** Processing line: ~ item.h = 80~ + $game.args = args +** Processing line: ~ $game.tick~ - Inside source: true *** True Line Result - item.h = 80 + $game.tick ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -96388,22 +103311,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Any lines outside of a function will be executed when the file is reloaded.~ -- Inside source: true -*** True Line Result - # Any lines outside of a function will be executed when the file is reloaded. -** Processing line: ~ # So every time you save main.rb, the game will be reset.~ -- Inside source: true -*** True Line Result - # So every time you save main.rb, the game will be reset. -** Processing line: ~ # Comment out the line below if you don't want this to happen.~ -- Inside source: true -*** True Line Result - # Comment out the line below if you don't want this to happen. -** Processing line: ~ $gtk.reset~ +** Processing line: ~ # $gtk.reset~ - Inside source: true *** True Line Result - $gtk.reset + # $gtk.reset ** Processing line: ~~ - Inside source: true *** True Line Result @@ -96416,358 +103327,346 @@ Follows is a source code listing for all files that have been open sourced. This - End of paragraph detected. *** True Line Result -** Processing line: ~*** Dev Tools - Add Buttons To Console - main.rb~ +** Processing line: ~*** Dev Tools - Tile Editor Starting Point - main.rb~ - Header detected. *** True Line Result *** True Line Result -*** Dev Tools - Add Buttons To Console - main.rb +*** Dev Tools - Tile Editor Starting Point - main.rb ** Processing line: ~#+begin_src ruby~ - Line was identified as the beginning of a code block. *** True Line Result *** True Line Result #+begin_src ruby -** Processing line: ~ # ./samples/99_genre_dev_tools/add_buttons_to_console/app/main.rb~ -- Inside source: true -*** True Line Result - # ./samples/99_genre_dev_tools/add_buttons_to_console/app/main.rb -** Processing line: ~ # You can customize the buttons that show up in the Console.~ -- Inside source: true -*** True Line Result - # You can customize the buttons that show up in the Console. -** Processing line: ~ class GTK::Console::Menu~ +** Processing line: ~ # ./samples/99_genre_dev_tools/tile_editor_starting_point/app/main.rb~ - Inside source: true *** True Line Result - class GTK::Console::Menu -** Processing line: ~ # STEP 1: Override the custom_buttons function.~ + # ./samples/99_genre_dev_tools/tile_editor_starting_point/app/main.rb +** Processing line: ~ =begin~ - Inside source: true *** True Line Result - # STEP 1: Override the custom_buttons function. -** Processing line: ~ def custom_buttons~ + =begin +** Processing line: ~~ - Inside source: true *** True Line Result - def custom_buttons -** Processing line: ~ [~ + +** Processing line: ~ APIs listing that haven't been encountered in previous sample apps:~ - Inside source: true *** True Line Result - [ -** Processing line: ~ (button id: :yay,~ + APIs listing that haven't been encountered in previous sample apps: +** Processing line: ~~ - Inside source: true *** True Line Result - (button id: :yay, -** Processing line: ~ # row for button~ + +** Processing line: ~ - to_s: Returns a string representation of an object.~ - Inside source: true *** True Line Result - # row for button -** Processing line: ~ row: 3,~ + - to_s: Returns a string representation of an object. +** Processing line: ~ For example, if we had~ - Inside source: true *** True Line Result - row: 3, -** Processing line: ~ # column for button~ + For example, if we had +** Processing line: ~ 500.to_s~ - Inside source: true *** True Line Result - # column for button -** Processing line: ~ col: 10,~ + 500.to_s +** Processing line: ~ the string "500" would be returned.~ - Inside source: true *** True Line Result - col: 10, -** Processing line: ~ # text~ + the string "500" would be returned. +** Processing line: ~ Similar to to_i, which returns an integer representation of an object.~ - Inside source: true *** True Line Result - # text -** Processing line: ~ text: "I AM CUSTOM",~ + Similar to to_i, which returns an integer representation of an object. +** Processing line: ~~ - Inside source: true *** True Line Result - text: "I AM CUSTOM", -** Processing line: ~ # when clicked call the custom_button_clicked function~ + +** Processing line: ~ - Ceil: Returns an integer number greater than or equal to the original~ - Inside source: true *** True Line Result - # when clicked call the custom_button_clicked function -** Processing line: ~ method: :custom_button_clicked),~ + - Ceil: Returns an integer number greater than or equal to the original +** Processing line: ~ with no decimal.~ - Inside source: true *** True Line Result - method: :custom_button_clicked), + with no decimal. ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ (button id: :yay,~ +** Processing line: ~ Reminders:~ - Inside source: true *** True Line Result - (button id: :yay, -** Processing line: ~ # row for button~ + Reminders: +** Processing line: ~~ - Inside source: true *** True Line Result - # row for button -** Processing line: ~ row: 3,~ + +** Processing line: ~ - ARRAY#inside_rect?: Returns true or false depending on if the point is inside a rect.~ - Inside source: true *** True Line Result - row: 3, -** Processing line: ~ # column for button~ + - ARRAY#inside_rect?: Returns true or false depending on if the point is inside a rect. +** Processing line: ~~ - Inside source: true *** True Line Result - # column for button -** Processing line: ~ col: 9,~ + +** Processing line: ~ - args.outputs.labels: An array. The values generate a label.~ - Inside source: true *** True Line Result - col: 9, -** Processing line: ~ # text~ + - args.outputs.labels: An array. The values generate a label. +** Processing line: ~ The parameters are [X, Y, TEXT, SIZE, ALIGNMENT, RED, GREEN, BLUE, ALPHA, FONT STYLE]~ - Inside source: true *** True Line Result - # text -** Processing line: ~ text: "CUSTOM ALSO",~ + The parameters are [X, Y, TEXT, SIZE, ALIGNMENT, RED, GREEN, BLUE, ALPHA, FONT STYLE] +** Processing line: ~ For more information about labels, go to mygame/documentation/02-labels.md.~ - Inside source: true *** True Line Result - text: "CUSTOM ALSO", -** Processing line: ~ # when clicked call the custom_button_also_clicked function~ + For more information about labels, go to mygame/documentation/02-labels.md. +** Processing line: ~~ - Inside source: true *** True Line Result - # when clicked call the custom_button_also_clicked function -** Processing line: ~ method: :custom_button_also_clicked)~ + +** Processing line: ~ - args.outputs.sprites: An array. The values generate a sprite.~ - Inside source: true *** True Line Result - method: :custom_button_also_clicked) -** Processing line: ~ ]~ + - args.outputs.sprites: An array. The values generate a sprite. +** Processing line: ~ The parameters are [X, Y, WIDTH, HEIGHT, IMAGE PATH]~ - Inside source: true *** True Line Result - ] -** Processing line: ~ end~ + The parameters are [X, Y, WIDTH, HEIGHT, IMAGE PATH] +** Processing line: ~ For more information about sprites, go to mygame/documentation/05-sprites.md.~ - Inside source: true *** True Line Result - end + For more information about sprites, go to mygame/documentation/05-sprites.md. ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # STEP 2: Define the function that should be called.~ -- Inside source: true -*** True Line Result - # STEP 2: Define the function that should be called. -** Processing line: ~ def custom_button_clicked~ +** Processing line: ~ - args.outputs.solids: An array. The values generate a solid.~ - Inside source: true *** True Line Result - def custom_button_clicked -** Processing line: ~ log "* INFO: I AM CUSTOM was clicked!"~ + - args.outputs.solids: An array. The values generate a solid. +** Processing line: ~ The parameters are [X, Y, WIDTH, HEIGHT, RED, GREEN, BLUE]~ - Inside source: true *** True Line Result - log "* INFO: I AM CUSTOM was clicked!" -** Processing line: ~ end~ + The parameters are [X, Y, WIDTH, HEIGHT, RED, GREEN, BLUE] +** Processing line: ~ For more information about solids, go to mygame/documentation/03-solids-and-borders.md.~ - Inside source: true *** True Line Result - end + For more information about solids, go to mygame/documentation/03-solids-and-borders.md. ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def custom_button_also_clicked~ +** Processing line: ~ - args.outputs.lines: An array. The values generate a line.~ - Inside source: true *** True Line Result - def custom_button_also_clicked -** Processing line: ~ log "* INFO: Custom Button Clicked at #{Kernel.global_tick_count}!"~ + - args.outputs.lines: An array. The values generate a line. +** Processing line: ~ The parameters are [X1, Y1, X2, Y2, RED, GREEN, BLUE]~ - Inside source: true *** True Line Result - log "* INFO: Custom Button Clicked at #{Kernel.global_tick_count}!" + The parameters are [X1, Y1, X2, Y2, RED, GREEN, BLUE] +** Processing line: ~ For more information about lines, go to mygame/documentation/04-lines.md.~ +- Inside source: true +*** True Line Result + For more information about lines, go to mygame/documentation/04-lines.md. ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ all_buttons_as_string = $gtk.console.menu.buttons.map do |b|~ +** Processing line: ~ - args.state.new_entity: Used when we want to create a new object, like a sprite or button.~ - Inside source: true *** True Line Result - all_buttons_as_string = $gtk.console.menu.buttons.map do |b| -** Processing line: ~ <<-S.strip~ + - args.state.new_entity: Used when we want to create a new object, like a sprite or button. +** Processing line: ~ In this sample app, new_entity is used to create a new button that clears the grid.~ - Inside source: true *** True Line Result - <<-S.strip -** Processing line: ~ ** id: #{b[:id]}~ + In this sample app, new_entity is used to create a new button that clears the grid. +** Processing line: ~ (Remember, you can use state to define ANY property and it will be retained across frames.)~ - Inside source: true *** True Line Result - ** id: #{b[:id]} -** Processing line: ~ :PROPERTIES:~ + (Remember, you can use state to define ANY property and it will be retained across frames.) +** Processing line: ~~ - Inside source: true *** True Line Result - :PROPERTIES: -** Processing line: ~ :id: :#{b[:id]}~ + +** Processing line: ~ =end~ - Inside source: true *** True Line Result - :id: :#{b[:id]} -** Processing line: ~ :method: :#{b[:method]}~ + =end +** Processing line: ~~ - Inside source: true *** True Line Result - :method: :#{b[:method]} -** Processing line: ~ :text: #{b[:text]}~ + +** Processing line: ~ # This sample app shows an empty grid that the user can paint in. There are different image tiles that~ - Inside source: true *** True Line Result - :text: #{b[:text]} -** Processing line: ~ :END:~ + # This sample app shows an empty grid that the user can paint in. There are different image tiles that +** Processing line: ~ # the user can use to fill the grid, and the "Clear" button can be pressed to clear the grid boxes.~ - Inside source: true *** True Line Result - :END: -** Processing line: ~ S~ + # the user can use to fill the grid, and the "Clear" button can be pressed to clear the grid boxes. +** Processing line: ~~ - Inside source: true *** True Line Result - S -** Processing line: ~ end.join("\n")~ + +** Processing line: ~ class TileEditor~ - Inside source: true *** True Line Result - end.join("\n") + class TileEditor +** Processing line: ~ attr_accessor :inputs, :state, :outputs, :grid, :args~ +- Inside source: true +*** True Line Result + attr_accessor :inputs, :state, :outputs, :grid, :args ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ log <<-S~ +** Processing line: ~ # Runs all the methods necessary for the game to function properly.~ - Inside source: true *** True Line Result - log <<-S -** Processing line: ~ * INFO: Here are all the buttons:~ + # Runs all the methods necessary for the game to function properly. +** Processing line: ~ def tick~ - Inside source: true *** True Line Result - * INFO: Here are all the buttons: -** Processing line: ~ #{all_buttons_as_string}~ + def tick +** Processing line: ~ defaults~ - Inside source: true *** True Line Result - #{all_buttons_as_string} -** Processing line: ~ S~ + defaults +** Processing line: ~ render~ - Inside source: true *** True Line Result - S -** Processing line: ~ end~ + render +** Processing line: ~ check_click~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + check_click +** Processing line: ~ draw_buttons~ - Inside source: true *** True Line Result - end + draw_buttons +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def tick args~ +** Processing line: ~ # Sets default values~ - Inside source: true *** True Line Result - def tick args -** Processing line: ~ args.outputs.labels << [args.grid.center.x, args.grid.center.y,~ + # Sets default values +** Processing line: ~ # Initialization only happens in the first frame~ - Inside source: true *** True Line Result - args.outputs.labels << [args.grid.center.x, args.grid.center.y, -** Processing line: ~ "Open the DragonRuby Console to see the custom menu items.",~ + # Initialization only happens in the first frame +** Processing line: ~ # NOTE: The values of some of these variables may seem confusingly large at first.~ - Inside source: true *** True Line Result - "Open the DragonRuby Console to see the custom menu items.", -** Processing line: ~ 0, 1]~ + # NOTE: The values of some of these variables may seem confusingly large at first. +** Processing line: ~ # The gridSize is 1600 but it seems a lot smaller on the screen, for example.~ - Inside source: true *** True Line Result - 0, 1] -** Processing line: ~ end~ + # The gridSize is 1600 but it seems a lot smaller on the screen, for example. +** Processing line: ~ # But keep in mind that by using the "W", "A", "S", and "D" keys, you can~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + # But keep in mind that by using the "W", "A", "S", and "D" keys, you can +** Processing line: ~ # move the grid's view in all four directions for more grid spaces.~ - Inside source: true *** True Line Result - -** Processing line: ~#+end_src~ -- Line was identified as the end of a code block. -*** True Line Result -#+end_src -** Processing line: ~~ -- End of paragraph detected. -*** True Line Result - -** Processing line: ~*** Dev Tools - Animation Creator Starting Point - main.rb~ -- Header detected. -*** True Line Result - -*** True Line Result -*** Dev Tools - Animation Creator Starting Point - main.rb -** Processing line: ~#+begin_src ruby~ -- Line was identified as the beginning of a code block. + # move the grid's view in all four directions for more grid spaces. +** Processing line: ~ def defaults~ +- Inside source: true *** True Line Result - + def defaults +** Processing line: ~ state.tileCords ||= []~ +- Inside source: true *** True Line Result -#+begin_src ruby -** Processing line: ~ # ./samples/99_genre_dev_tools/animation_creator_starting_point/app/main.rb~ + state.tileCords ||= [] +** Processing line: ~ state.tileQuantity ||= 6~ - Inside source: true *** True Line Result - # ./samples/99_genre_dev_tools/animation_creator_starting_point/app/main.rb -** Processing line: ~ class OneBitLowrezPaint~ + state.tileQuantity ||= 6 +** Processing line: ~ state.tileSize ||= 50~ - Inside source: true *** True Line Result - class OneBitLowrezPaint -** Processing line: ~ attr_gtk~ + state.tileSize ||= 50 +** Processing line: ~ state.tileSelected ||= 1~ - Inside source: true *** True Line Result - attr_gtk -** Processing line: ~~ + state.tileSelected ||= 1 +** Processing line: ~ state.tempX ||= 50~ - Inside source: true *** True Line Result - -** Processing line: ~ def tick~ + state.tempX ||= 50 +** Processing line: ~ state.tempY ||= 500~ - Inside source: true *** True Line Result - def tick -** Processing line: ~ outputs.background_color = [0, 0, 0]~ + state.tempY ||= 500 +** Processing line: ~ state.speed ||= 4~ - Inside source: true *** True Line Result - outputs.background_color = [0, 0, 0] -** Processing line: ~ defaults~ + state.speed ||= 4 +** Processing line: ~ state.centerX ||= 4000~ - Inside source: true *** True Line Result - defaults -** Processing line: ~ render_instructions~ + state.centerX ||= 4000 +** Processing line: ~ state.centerY ||= 4000~ - Inside source: true *** True Line Result - render_instructions -** Processing line: ~ render_canvas~ + state.centerY ||= 4000 +** Processing line: ~ state.originalCenter ||= [state.centerX, state.centerY]~ - Inside source: true *** True Line Result - render_canvas -** Processing line: ~ render_buttons_frame_selection~ + state.originalCenter ||= [state.centerX, state.centerY] +** Processing line: ~ state.gridSize ||= 1600~ - Inside source: true *** True Line Result - render_buttons_frame_selection -** Processing line: ~ render_animation_frame_thumbnails~ + state.gridSize ||= 1600 +** Processing line: ~ state.lineQuantity ||= 50~ - Inside source: true *** True Line Result - render_animation_frame_thumbnails -** Processing line: ~ render_animation~ + state.lineQuantity ||= 50 +** Processing line: ~ state.increment ||= state.gridSize / state.lineQuantity~ - Inside source: true *** True Line Result - render_animation -** Processing line: ~ input_mouse_click~ + state.increment ||= state.gridSize / state.lineQuantity +** Processing line: ~ state.gridX ||= []~ - Inside source: true *** True Line Result - input_mouse_click -** Processing line: ~ input_keyboard~ + state.gridX ||= [] +** Processing line: ~ state.gridY ||= []~ - Inside source: true *** True Line Result - input_keyboard -** Processing line: ~ calc_auto_export~ + state.gridY ||= [] +** Processing line: ~ state.filled_squares ||= []~ - Inside source: true *** True Line Result - calc_auto_export -** Processing line: ~ calc_buttons_frame_selection~ + state.filled_squares ||= [] +** Processing line: ~ state.grid_border ||= [390, 140, 500, 500]~ - Inside source: true *** True Line Result - calc_buttons_frame_selection -** Processing line: ~ calc_animation_frames~ + state.grid_border ||= [390, 140, 500, 500] +** Processing line: ~~ - Inside source: true *** True Line Result - calc_animation_frames -** Processing line: ~ process_queue_create_sprite~ + +** Processing line: ~ get_grid unless state.tempX == 0 # calls get_grid in the first frame only~ - Inside source: true *** True Line Result - process_queue_create_sprite -** Processing line: ~ process_queue_reset_sprite~ + get_grid unless state.tempX == 0 # calls get_grid in the first frame only +** Processing line: ~ determineTileCords unless state.tempX == 0 # calls determineTileCords in first frame~ - Inside source: true *** True Line Result - process_queue_reset_sprite -** Processing line: ~ process_queue_update_rt_animation_frame~ + determineTileCords unless state.tempX == 0 # calls determineTileCords in first frame +** Processing line: ~ state.tempX = 0 # sets tempX to 0; the two methods aren't called again~ - Inside source: true *** True Line Result - process_queue_update_rt_animation_frame + state.tempX = 0 # sets tempX to 0; the two methods aren't called again ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -96776,42 +103675,34 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def defaults~ -- Inside source: true -*** True Line Result - def defaults -** Processing line: ~ state.animation_frames_per_second = 12~ -- Inside source: true -*** True Line Result - state.animation_frames_per_second = 12 -** Processing line: ~ queues.create_sprite ||= []~ +** Processing line: ~ # Calculates the placement of lines or separators in the grid~ - Inside source: true *** True Line Result - queues.create_sprite ||= [] -** Processing line: ~ queues.reset_sprite ||= []~ + # Calculates the placement of lines or separators in the grid +** Processing line: ~ def get_grid~ - Inside source: true *** True Line Result - queues.reset_sprite ||= [] -** Processing line: ~ queues.update_rt_animation_frame ||= []~ + def get_grid +** Processing line: ~ curr_x = state.centerX - (state.gridSize / 2) # starts at left of grid~ - Inside source: true *** True Line Result - queues.update_rt_animation_frame ||= [] -** Processing line: ~~ + curr_x = state.centerX - (state.gridSize / 2) # starts at left of grid +** Processing line: ~ deltaX = state.gridSize / state.lineQuantity # finds distance to place vertical lines evenly through width of grid~ - Inside source: true *** True Line Result - -** Processing line: ~ if !state.animation_frames~ + deltaX = state.gridSize / state.lineQuantity # finds distance to place vertical lines evenly through width of grid +** Processing line: ~ (state.lineQuantity + 2).times do~ - Inside source: true *** True Line Result - if !state.animation_frames -** Processing line: ~ state.animation_frames ||= []~ + (state.lineQuantity + 2).times do +** Processing line: ~ state.gridX << curr_x # adds curr_x to gridX collection~ - Inside source: true *** True Line Result - state.animation_frames ||= [] -** Processing line: ~ add_animation_frame_to_end~ + state.gridX << curr_x # adds curr_x to gridX collection +** Processing line: ~ curr_x += deltaX # increment curr_x by the distance between vertical lines~ - Inside source: true *** True Line Result - add_animation_frame_to_end + curr_x += deltaX # increment curr_x by the distance between vertical lines ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -96820,530 +103711,542 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ state.last_mouse_down ||= 0~ -- Inside source: true -*** True Line Result - state.last_mouse_down ||= 0 -** Processing line: ~ state.last_mouse_up ||= 0~ +** Processing line: ~ curr_y = state.centerY - (state.gridSize / 2) # starts at bottom of grid~ - Inside source: true *** True Line Result - state.last_mouse_up ||= 0 -** Processing line: ~~ + curr_y = state.centerY - (state.gridSize / 2) # starts at bottom of grid +** Processing line: ~ deltaY = state.gridSize / state.lineQuantity # finds distance to place horizontal lines evenly through height of grid~ - Inside source: true *** True Line Result - -** Processing line: ~ state.buttons_frame_selection.left = 10~ + deltaY = state.gridSize / state.lineQuantity # finds distance to place horizontal lines evenly through height of grid +** Processing line: ~ (state.lineQuantity + 2).times do~ - Inside source: true *** True Line Result - state.buttons_frame_selection.left = 10 -** Processing line: ~ state.buttons_frame_selection.top = grid.top - 10~ + (state.lineQuantity + 2).times do +** Processing line: ~ state.gridY << curr_y # adds curr_y to gridY collection~ - Inside source: true *** True Line Result - state.buttons_frame_selection.top = grid.top - 10 -** Processing line: ~ state.buttons_frame_selection.size = 20~ + state.gridY << curr_y # adds curr_y to gridY collection +** Processing line: ~ curr_y += deltaY # increments curr_y to distance between horizontal lines~ - Inside source: true *** True Line Result - state.buttons_frame_selection.size = 20 -** Processing line: ~~ + curr_y += deltaY # increments curr_y to distance between horizontal lines +** Processing line: ~ end~ - Inside source: true *** True Line Result - -** Processing line: ~ defaults_canvas_sprite~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - defaults_canvas_sprite + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ state.edit_mode ||= :drawing~ +** Processing line: ~ # Determines coordinate positions of patterned tiles (on the left side of the grid)~ - Inside source: true *** True Line Result - state.edit_mode ||= :drawing -** Processing line: ~ end~ + # Determines coordinate positions of patterned tiles (on the left side of the grid) +** Processing line: ~ def determineTileCords~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + def determineTileCords +** Processing line: ~ state.tempCounter ||= 1 # initializes tempCounter to 1~ - Inside source: true *** True Line Result - -** Processing line: ~ def defaults_canvas_sprite~ + state.tempCounter ||= 1 # initializes tempCounter to 1 +** Processing line: ~ state.tileQuantity.times do # there are 6 different kinds of tiles~ - Inside source: true *** True Line Result - def defaults_canvas_sprite -** Processing line: ~ rt_canvas.size = 16~ + state.tileQuantity.times do # there are 6 different kinds of tiles +** Processing line: ~ state.tileCords += [[state.tempX, state.tempY, state.tempCounter]] # adds tile definition to collection~ - Inside source: true *** True Line Result - rt_canvas.size = 16 -** Processing line: ~ rt_canvas.zoom = 30~ + state.tileCords += [[state.tempX, state.tempY, state.tempCounter]] # adds tile definition to collection +** Processing line: ~ state.tempX += 75 # increments tempX to put horizontal space between the patterned tiles~ - Inside source: true *** True Line Result - rt_canvas.zoom = 30 -** Processing line: ~ rt_canvas.width = rt_canvas.size * rt_canvas.zoom~ + state.tempX += 75 # increments tempX to put horizontal space between the patterned tiles +** Processing line: ~ state.tempCounter += 1 # increments tempCounter~ - Inside source: true *** True Line Result - rt_canvas.width = rt_canvas.size * rt_canvas.zoom -** Processing line: ~ rt_canvas.height = rt_canvas.size * rt_canvas.zoom~ + state.tempCounter += 1 # increments tempCounter +** Processing line: ~ if state.tempX > 200 # if tempX exceeds 200 pixels~ - Inside source: true *** True Line Result - rt_canvas.height = rt_canvas.size * rt_canvas.zoom -** Processing line: ~ rt_canvas.sprite = { x: 0,~ + if state.tempX > 200 # if tempX exceeds 200 pixels +** Processing line: ~ state.tempX = 50 # a new row of patterned tiles begins~ - Inside source: true *** True Line Result - rt_canvas.sprite = { x: 0, -** Processing line: ~ y: 0,~ + state.tempX = 50 # a new row of patterned tiles begins +** Processing line: ~ state.tempY -= 75 # the new row is 75 pixels lower than the previous row~ - Inside source: true *** True Line Result - y: 0, -** Processing line: ~ w: rt_canvas.width,~ + state.tempY -= 75 # the new row is 75 pixels lower than the previous row +** Processing line: ~ end~ - Inside source: true *** True Line Result - w: rt_canvas.width, -** Processing line: ~ h: rt_canvas.height,~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - h: rt_canvas.height, -** Processing line: ~ path: :rt_canvas }.center_inside_rect(x: 0, y: 0, w: 640, h: 720)~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - path: :rt_canvas }.center_inside_rect(x: 0, y: 0, w: 640, h: 720) + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ return unless state.tick_count == 1~ +** Processing line: ~ # Outputs objects (grid, tiles, etc) onto the screen~ - Inside source: true *** True Line Result - return unless state.tick_count == 1 -** Processing line: ~~ + # Outputs objects (grid, tiles, etc) onto the screen +** Processing line: ~ def render~ - Inside source: true *** True Line Result - -** Processing line: ~ outputs[:rt_canvas].width = rt_canvas.width~ + def render +** Processing line: ~ outputs.sprites << state.tileCords.map do # outputs tileCords collection using images in sprites folder~ - Inside source: true *** True Line Result - outputs[:rt_canvas].width = rt_canvas.width -** Processing line: ~ outputs[:rt_canvas].height = rt_canvas.height~ + outputs.sprites << state.tileCords.map do # outputs tileCords collection using images in sprites folder +** Processing line: ~ |x, y, order|~ - Inside source: true *** True Line Result - outputs[:rt_canvas].height = rt_canvas.height -** Processing line: ~ outputs[:rt_canvas].sprites << (rt_canvas.size + 1).map_with_index do |x|~ + |x, y, order| +** Processing line: ~ [x, y, state.tileSize, state.tileSize, 'sprites/image' + order.to_s + ".png"]~ - Inside source: true *** True Line Result - outputs[:rt_canvas].sprites << (rt_canvas.size + 1).map_with_index do |x| -** Processing line: ~ (rt_canvas.size + 1).map_with_index do |y|~ + [x, y, state.tileSize, state.tileSize, 'sprites/image' + order.to_s + ".png"] +** Processing line: ~ end~ - Inside source: true *** True Line Result - (rt_canvas.size + 1).map_with_index do |y| -** Processing line: ~ path = 'sprites/square-white.png'~ + end +** Processing line: ~ outputs.solids << [0, 0, 1280, 720, 255, 255, 255] # outputs white background~ - Inside source: true *** True Line Result - path = 'sprites/square-white.png' -** Processing line: ~ path = 'sprites/square-blue.png' if x == 7 || x == 8~ + outputs.solids << [0, 0, 1280, 720, 255, 255, 255] # outputs white background +** Processing line: ~ add_grid # outputs grid~ - Inside source: true *** True Line Result - path = 'sprites/square-blue.png' if x == 7 || x == 8 -** Processing line: ~ { x: x * rt_canvas.zoom,~ + add_grid # outputs grid +** Processing line: ~ print_title # outputs title and current tile pattern~ - Inside source: true *** True Line Result - { x: x * rt_canvas.zoom, -** Processing line: ~ y: y * rt_canvas.zoom,~ + print_title # outputs title and current tile pattern +** Processing line: ~ end~ - Inside source: true *** True Line Result - y: y * rt_canvas.zoom, -** Processing line: ~ w: rt_canvas.zoom,~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - w: rt_canvas.zoom, -** Processing line: ~ h: rt_canvas.zoom,~ + +** Processing line: ~ # Creates a grid by outputting vertical and horizontal grid lines onto the screen.~ - Inside source: true *** True Line Result - h: rt_canvas.zoom, -** Processing line: ~ path: path,~ + # Creates a grid by outputting vertical and horizontal grid lines onto the screen. +** Processing line: ~ # Outputs sprites for the filled_squares collection onto the screen.~ - Inside source: true *** True Line Result - path: path, -** Processing line: ~ a: 50 }~ + # Outputs sprites for the filled_squares collection onto the screen. +** Processing line: ~ def add_grid~ - Inside source: true *** True Line Result - a: 50 } -** Processing line: ~ end~ + def add_grid +** Processing line: ~~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + +** Processing line: ~ # Outputs the grid's border.~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + # Outputs the grid's border. +** Processing line: ~ outputs.borders << state.grid_border~ - Inside source: true *** True Line Result - end + outputs.borders << state.grid_border +** Processing line: ~ temp = 0~ +- Inside source: true +*** True Line Result + temp = 0 ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def render_instructions~ +** Processing line: ~ # Before looking at the code that outputs the vertical and horizontal lines in the~ - Inside source: true *** True Line Result - def render_instructions -** Processing line: ~ instructions = [~ + # Before looking at the code that outputs the vertical and horizontal lines in the +** Processing line: ~ # grid, take note of the fact that:~ - Inside source: true *** True Line Result - instructions = [ -** Processing line: ~ "* Hotkeys:",~ + # grid, take note of the fact that: +** Processing line: ~ # grid_border[1] refers to the border's bottom line (running horizontally),~ - Inside source: true *** True Line Result - "* Hotkeys:", -** Processing line: ~ "- d: hold to erase, release to draw.",~ + # grid_border[1] refers to the border's bottom line (running horizontally), +** Processing line: ~ # grid_border[2] refers to the border's top line (running (horizontally),~ - Inside source: true *** True Line Result - "- d: hold to erase, release to draw.", -** Processing line: ~ "- a: add frame.",~ + # grid_border[2] refers to the border's top line (running (horizontally), +** Processing line: ~ # grid_border[0] refers to the border's left line (running vertically),~ - Inside source: true *** True Line Result - "- a: add frame.", -** Processing line: ~ "- c: copy frame.",~ + # grid_border[0] refers to the border's left line (running vertically), +** Processing line: ~ # and grid_border[3] refers to the border's right line (running vertically).~ - Inside source: true *** True Line Result - "- c: copy frame.", -** Processing line: ~ "- v: paste frame.",~ + # and grid_border[3] refers to the border's right line (running vertically). +** Processing line: ~~ - Inside source: true *** True Line Result - "- v: paste frame.", -** Processing line: ~ "- x: delete frame.",~ + +** Processing line: ~ # [2]~ - Inside source: true *** True Line Result - "- x: delete frame.", -** Processing line: ~ "- b: go to previous frame.",~ + # [2] +** Processing line: ~ # ----------~ - Inside source: true *** True Line Result - "- b: go to previous frame.", -** Processing line: ~ "- f: go to next frame.",~ + # ---------- +** Processing line: ~ # | |~ - Inside source: true *** True Line Result - "- f: go to next frame.", -** Processing line: ~ "- w: save to ./canvas directory.",~ + # | | +** Processing line: ~ # [0] | | [3]~ - Inside source: true *** True Line Result - "- w: save to ./canvas directory.", -** Processing line: ~ "- l: load from ./canvas."~ + # [0] | | [3] +** Processing line: ~ # | |~ - Inside source: true *** True Line Result - "- l: load from ./canvas." -** Processing line: ~ ]~ + # | | +** Processing line: ~ # ----------~ - Inside source: true *** True Line Result - ] -** Processing line: ~~ + # ---------- +** Processing line: ~ # [1]~ - Inside source: true *** True Line Result - -** Processing line: ~ instructions.each.with_index do |l, i|~ + # [1] +** Processing line: ~~ - Inside source: true *** True Line Result - instructions.each.with_index do |l, i| -** Processing line: ~ outputs.labels << { x: 840, y: 500 - (i * 20), text: "#{l}",~ + +** Processing line: ~ # Calculates the positions and outputs the x grid lines in the color gray.~ - Inside source: true *** True Line Result - outputs.labels << { x: 840, y: 500 - (i * 20), text: "#{l}", -** Processing line: ~ r: 180, g: 180, b: 180, size_enum: 0 }~ + # Calculates the positions and outputs the x grid lines in the color gray. +** Processing line: ~ state.gridX.map do # perform an action on all elements of the gridX collection~ - Inside source: true *** True Line Result - r: 180, g: 180, b: 180, size_enum: 0 } -** Processing line: ~ end~ + state.gridX.map do # perform an action on all elements of the gridX collection +** Processing line: ~ |x|~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + |x| +** Processing line: ~ temp += 1 # increment temp~ - Inside source: true *** True Line Result - end + temp += 1 # increment temp ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def render_canvas~ -- Inside source: true -*** True Line Result - def render_canvas -** Processing line: ~ return if state.tick_count.zero?~ +** Processing line: ~ # if x's value is greater than (or equal to) the x value of the border's left side~ - Inside source: true *** True Line Result - return if state.tick_count.zero? -** Processing line: ~ outputs.sprites << rt_canvas.sprite~ + # if x's value is greater than (or equal to) the x value of the border's left side +** Processing line: ~ # and less than (or equal to) the x value of the border's right side~ - Inside source: true *** True Line Result - outputs.sprites << rt_canvas.sprite -** Processing line: ~ end~ + # and less than (or equal to) the x value of the border's right side +** Processing line: ~ if x >= state.centerX - (state.grid_border[2] / 2) && x <= state.centerX + (state.grid_border[2] / 2)~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + if x >= state.centerX - (state.grid_border[2] / 2) && x <= state.centerX + (state.grid_border[2] / 2) +** Processing line: ~ delta = state.centerX - 640~ - Inside source: true *** True Line Result - -** Processing line: ~ def render_buttons_frame_selection~ + delta = state.centerX - 640 +** Processing line: ~ # vertical lines have the same starting and ending x positions~ - Inside source: true *** True Line Result - def render_buttons_frame_selection -** Processing line: ~ args.outputs.primitives << state.buttons_frame_selection.items.map_with_index do |b, i|~ + # vertical lines have the same starting and ending x positions +** Processing line: ~ # starting y and ending y positions lead from the bottom of the border to the top of the border~ - Inside source: true *** True Line Result - args.outputs.primitives << state.buttons_frame_selection.items.map_with_index do |b, i| -** Processing line: ~ label = { x: b.x + state.buttons_frame_selection.size.half,~ + # starting y and ending y positions lead from the bottom of the border to the top of the border +** Processing line: ~ outputs.lines << [x - delta, state.grid_border[1], x - delta, state.grid_border[1] + state.grid_border[2], 150, 150, 150] # sets definition of vertical line and outputs it~ - Inside source: true *** True Line Result - label = { x: b.x + state.buttons_frame_selection.size.half, -** Processing line: ~ y: b.y,~ + outputs.lines << [x - delta, state.grid_border[1], x - delta, state.grid_border[1] + state.grid_border[2], 150, 150, 150] # sets definition of vertical line and outputs it +** Processing line: ~ end~ - Inside source: true *** True Line Result - y: b.y, -** Processing line: ~ text: "#{i + 1}", r: 180, g: 180, b: 180,~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - text: "#{i + 1}", r: 180, g: 180, b: 180, -** Processing line: ~ size_enum: -4, alignment_enum: 1 }.label~ + end +** Processing line: ~ temp = 0~ - Inside source: true *** True Line Result - size_enum: -4, alignment_enum: 1 }.label + temp = 0 ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ selection_border = b.merge(r: 40, g: 40, b: 40).border~ -- Inside source: true -*** True Line Result - selection_border = b.merge(r: 40, g: 40, b: 40).border -** Processing line: ~~ +** Processing line: ~ # Calculates the positions and outputs the y grid lines in the color gray.~ - Inside source: true *** True Line Result - -** Processing line: ~ if i == state.animation_frames_selected_index~ + # Calculates the positions and outputs the y grid lines in the color gray. +** Processing line: ~ state.gridY.map do # perform an action on all elements of the gridY collection~ - Inside source: true *** True Line Result - if i == state.animation_frames_selected_index -** Processing line: ~ selection_border = b.merge(r: 40, g: 230, b: 200).border~ + state.gridY.map do # perform an action on all elements of the gridY collection +** Processing line: ~ |y|~ - Inside source: true *** True Line Result - selection_border = b.merge(r: 40, g: 230, b: 200).border -** Processing line: ~ end~ + |y| +** Processing line: ~ temp += 1 # increment temp~ - Inside source: true *** True Line Result - end + temp += 1 # increment temp ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ [selection_border, label]~ +** Processing line: ~ # if y's value is greater than (or equal to) the y value of the border's bottom side~ - Inside source: true *** True Line Result - [selection_border, label] -** Processing line: ~ end~ + # if y's value is greater than (or equal to) the y value of the border's bottom side +** Processing line: ~ # and less than (or equal to) the y value of the border's top side~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + # and less than (or equal to) the y value of the border's top side +** Processing line: ~ if y >= state.centerY - (state.grid_border[3] / 2) && y <= state.centerY + (state.grid_border[3] / 2)~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + if y >= state.centerY - (state.grid_border[3] / 2) && y <= state.centerY + (state.grid_border[3] / 2) +** Processing line: ~ delta = state.centerY - 393~ - Inside source: true *** True Line Result - -** Processing line: ~ def render_animation_frame_thumbnails~ + delta = state.centerY - 393 +** Processing line: ~ # horizontal lines have the same starting and ending y positions~ - Inside source: true *** True Line Result - def render_animation_frame_thumbnails -** Processing line: ~ return if state.tick_count.zero?~ + # horizontal lines have the same starting and ending y positions +** Processing line: ~ # starting x and ending x positions lead from the left side of the border to the right side of the border~ - Inside source: true *** True Line Result - return if state.tick_count.zero? + # starting x and ending x positions lead from the left side of the border to the right side of the border +** Processing line: ~ outputs.lines << [state.grid_border[0], y - delta, state.grid_border[0] + state.grid_border[3], y - delta, 150, 150, 150] # sets definition of horizontal line and outputs it~ +- Inside source: true +*** True Line Result + outputs.lines << [state.grid_border[0], y - delta, state.grid_border[0] + state.grid_border[3], y - delta, 150, 150, 150] # sets definition of horizontal line and outputs it +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ outputs[:current_animation_frame].width = rt_canvas.size~ +** Processing line: ~ # Sets values and outputs sprites for the filled_squares collection.~ - Inside source: true *** True Line Result - outputs[:current_animation_frame].width = rt_canvas.size -** Processing line: ~ outputs[:current_animation_frame].height = rt_canvas.size~ + # Sets values and outputs sprites for the filled_squares collection. +** Processing line: ~ state.filled_squares.map do # perform an action on every element of the filled_squares collection~ - Inside source: true *** True Line Result - outputs[:current_animation_frame].height = rt_canvas.size -** Processing line: ~ outputs[:current_animation_frame].solids << selected_animation_frame[:pixels].map_with_index do |f, i|~ + state.filled_squares.map do # perform an action on every element of the filled_squares collection +** Processing line: ~ |x, y, w, h, sprite|~ - Inside source: true *** True Line Result - outputs[:current_animation_frame].solids << selected_animation_frame[:pixels].map_with_index do |f, i| -** Processing line: ~ { x: f.x,~ + |x, y, w, h, sprite| +** Processing line: ~ # if x's value is greater than (or equal to) the x value of 17 pixels to the left of the border's left side~ - Inside source: true *** True Line Result - { x: f.x, -** Processing line: ~ y: f.y,~ + # if x's value is greater than (or equal to) the x value of 17 pixels to the left of the border's left side +** Processing line: ~ # and less than (or equal to) the x value of the border's right side~ - Inside source: true *** True Line Result - y: f.y, -** Processing line: ~ w: 1,~ + # and less than (or equal to) the x value of the border's right side +** Processing line: ~ # and y's value is greater than (or equal to) the y value of the border's bottom side~ - Inside source: true *** True Line Result - w: 1, -** Processing line: ~ h: 1, r: 255, g: 255, b: 255 }~ + # and y's value is greater than (or equal to) the y value of the border's bottom side +** Processing line: ~ # and less than (or equal to) the y value of 25 pixels above the border's top side~ - Inside source: true *** True Line Result - h: 1, r: 255, g: 255, b: 255 } -** Processing line: ~ end~ + # and less than (or equal to) the y value of 25 pixels above the border's top side +** Processing line: ~ # NOTE: The allowance of 17 pixels and 25 pixels is due to the fact that a grid box may be slightly cut off or~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + # NOTE: The allowance of 17 pixels and 25 pixels is due to the fact that a grid box may be slightly cut off or +** Processing line: ~ # not entirely visible in the grid's view (until it is moved using "W", "A", "S", "D")~ - Inside source: true *** True Line Result - -** Processing line: ~ outputs.sprites << rt_canvas.sprite.merge(path: :current_animation_frame)~ + # not entirely visible in the grid's view (until it is moved using "W", "A", "S", "D") +** Processing line: ~ if x >= state.centerX - (state.grid_border[2] / 2) - 17 && x <= state.centerX + (state.grid_border[2] / 2) &&~ - Inside source: true *** True Line Result - outputs.sprites << rt_canvas.sprite.merge(path: :current_animation_frame) -** Processing line: ~~ + if x >= state.centerX - (state.grid_border[2] / 2) - 17 && x <= state.centerX + (state.grid_border[2] / 2) && +** Processing line: ~ y >= state.centerY - (state.grid_border[3] / 2) && y <= state.centerY + (state.grid_border[3] / 2) + 25~ - Inside source: true *** True Line Result - -** Processing line: ~ state.animation_frames.map_with_index do |animation_frame, animation_frame_index|~ + y >= state.centerY - (state.grid_border[3] / 2) && y <= state.centerY + (state.grid_border[3] / 2) + 25 +** Processing line: ~ # calculations done to place sprites in grid spaces that are meant to filled in~ - Inside source: true *** True Line Result - state.animation_frames.map_with_index do |animation_frame, animation_frame_index| -** Processing line: ~ outputs.sprites << state.buttons_frame_selection[:items][animation_frame_index][:inner_rect]~ + # calculations done to place sprites in grid spaces that are meant to filled in +** Processing line: ~ # mess around with the x and y values and see how the sprite placement changes~ - Inside source: true *** True Line Result - outputs.sprites << state.buttons_frame_selection[:items][animation_frame_index][:inner_rect] -** Processing line: ~ .merge(path: animation_frame[:rt_name])~ + # mess around with the x and y values and see how the sprite placement changes +** Processing line: ~ outputs.sprites << [x - state.centerX + 630, y - state.centerY + 360, w, h, sprite]~ - Inside source: true *** True Line Result - .merge(path: animation_frame[:rt_name]) -** Processing line: ~ end~ + outputs.sprites << [x - state.centerX + 630, y - state.centerY + 360, w, h, sprite] +** Processing line: ~ end~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - end + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def render_animation~ +** Processing line: ~ # outputs a white solid along the left side of the grid (change the color and you'll be able to see it against the white background)~ - Inside source: true *** True Line Result - def render_animation -** Processing line: ~ sprite_index = 0.frame_index count: state.animation_frames.length,~ + # outputs a white solid along the left side of the grid (change the color and you'll be able to see it against the white background) +** Processing line: ~ # state.increment subtracted in x parameter because solid's position is denoted by bottom left corner~ - Inside source: true *** True Line Result - sprite_index = 0.frame_index count: state.animation_frames.length, -** Processing line: ~ hold_for: 60 / state.animation_frames_per_second,~ + # state.increment subtracted in x parameter because solid's position is denoted by bottom left corner +** Processing line: ~ # state.increment subtracted in y parameter to avoid covering the title label~ - Inside source: true *** True Line Result - hold_for: 60 / state.animation_frames_per_second, -** Processing line: ~ repeat: true~ + # state.increment subtracted in y parameter to avoid covering the title label +** Processing line: ~ outputs.primitives << [state.grid_border[0] - state.increment,~ - Inside source: true *** True Line Result - repeat: true + outputs.primitives << [state.grid_border[0] - state.increment, +** Processing line: ~ state.grid_border[1] - state.increment, state.increment, state.grid_border[3] + (state.increment * 2),~ +- Inside source: true +*** True Line Result + state.grid_border[1] - state.increment, state.increment, state.grid_border[3] + (state.increment * 2), +** Processing line: ~ 255, 255, 255].solid~ +- Inside source: true +*** True Line Result + 255, 255, 255].solid ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ args.outputs.sprites << { x: 700 - 8,~ +** Processing line: ~ # outputs a white solid along the right side of the grid~ - Inside source: true *** True Line Result - args.outputs.sprites << { x: 700 - 8, -** Processing line: ~ y: 120,~ + # outputs a white solid along the right side of the grid +** Processing line: ~ # state.increment subtracted from y parameter to avoid covering title label~ - Inside source: true *** True Line Result - y: 120, -** Processing line: ~ w: 16,~ + # state.increment subtracted from y parameter to avoid covering title label +** Processing line: ~ outputs.primitives << [state.grid_border[0] + state.grid_border[2],~ - Inside source: true *** True Line Result - w: 16, -** Processing line: ~ h: 16,~ + outputs.primitives << [state.grid_border[0] + state.grid_border[2], +** Processing line: ~ state.grid_border[1] - state.increment, state.increment, state.grid_border[3] + (state.increment * 2),~ - Inside source: true *** True Line Result - h: 16, -** Processing line: ~ path: (sprite_path sprite_index) }~ + state.grid_border[1] - state.increment, state.increment, state.grid_border[3] + (state.increment * 2), +** Processing line: ~ 255, 255, 255].solid~ - Inside source: true *** True Line Result - path: (sprite_path sprite_index) } + 255, 255, 255].solid ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ args.outputs.sprites << { x: 700 - 16,~ -- Inside source: true -*** True Line Result - args.outputs.sprites << { x: 700 - 16, -** Processing line: ~ y: 230,~ +** Processing line: ~ # outputs a white solid along the bottom of the grid~ - Inside source: true *** True Line Result - y: 230, -** Processing line: ~ w: 32,~ + # outputs a white solid along the bottom of the grid +** Processing line: ~ # state.increment subtracted from y parameter to avoid covering last row of grid boxes~ - Inside source: true *** True Line Result - w: 32, -** Processing line: ~ h: 32,~ + # state.increment subtracted from y parameter to avoid covering last row of grid boxes +** Processing line: ~ outputs.primitives << [state.grid_border[0] - state.increment, state.grid_border[1] - state.increment,~ - Inside source: true *** True Line Result - h: 32, -** Processing line: ~ path: (sprite_path sprite_index) }~ + outputs.primitives << [state.grid_border[0] - state.increment, state.grid_border[1] - state.increment, +** Processing line: ~ state.grid_border[2] + (2 * state.increment), state.increment, 255, 255, 255].solid~ - Inside source: true *** True Line Result - path: (sprite_path sprite_index) } + state.grid_border[2] + (2 * state.increment), state.increment, 255, 255, 255].solid ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ args.outputs.sprites << { x: 700 - 32,~ +** Processing line: ~ # outputs a white solid along the top of the grid~ - Inside source: true *** True Line Result - args.outputs.sprites << { x: 700 - 32, -** Processing line: ~ y: 360,~ + # outputs a white solid along the top of the grid +** Processing line: ~ outputs.primitives << [state.grid_border[0] - state.increment, state.grid_border[1] + state.grid_border[3],~ - Inside source: true *** True Line Result - y: 360, -** Processing line: ~ w: 64,~ + outputs.primitives << [state.grid_border[0] - state.increment, state.grid_border[1] + state.grid_border[3], +** Processing line: ~ state.grid_border[2] + (2 * state.increment), state.increment, 255, 255, 255].solid~ - Inside source: true *** True Line Result - w: 64, -** Processing line: ~ h: 64,~ + state.grid_border[2] + (2 * state.increment), state.increment, 255, 255, 255].solid +** Processing line: ~~ - Inside source: true *** True Line Result - h: 64, -** Processing line: ~ path: (sprite_path sprite_index) }~ + +** Processing line: ~ end~ - Inside source: true *** True Line Result - path: (sprite_path sprite_index) } + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ args.outputs.sprites << { x: 700 - 64,~ +** Processing line: ~ # Outputs title and current tile pattern~ - Inside source: true *** True Line Result - args.outputs.sprites << { x: 700 - 64, -** Processing line: ~ y: 520,~ + # Outputs title and current tile pattern +** Processing line: ~ def print_title~ - Inside source: true *** True Line Result - y: 520, -** Processing line: ~ w: 128,~ + def print_title +** Processing line: ~ outputs.labels << [640, 700, 'Mouse to Place Tile, WASD to Move Around', 7, 1] # title label~ - Inside source: true *** True Line Result - w: 128, -** Processing line: ~ h: 128,~ + outputs.labels << [640, 700, 'Mouse to Place Tile, WASD to Move Around', 7, 1] # title label +** Processing line: ~ outputs.lines << horizontal_separator(660, 0, 1280) # outputs horizontal separator~ - Inside source: true *** True Line Result - h: 128, -** Processing line: ~ path: (sprite_path sprite_index) }~ + outputs.lines << horizontal_separator(660, 0, 1280) # outputs horizontal separator +** Processing line: ~ outputs.labels << [1050, 500, 'Current:', 3, 1] # outputs Current label~ - Inside source: true *** True Line Result - path: (sprite_path sprite_index) } + outputs.labels << [1050, 500, 'Current:', 3, 1] # outputs Current label +** Processing line: ~ outputs.sprites << [1110, 474, state.tileSize / 2, state.tileSize / 2, 'sprites/image' + state.tileSelected.to_s + ".png"] # outputs sprite of current tile pattern using images in sprites folder; output is half the size of a tile~ +- Inside source: true +*** True Line Result + outputs.sprites << [1110, 474, state.tileSize / 2, state.tileSize / 2, 'sprites/image' + state.tileSelected.to_s + ".png"] # outputs sprite of current tile pattern using images in sprites folder; output is half the size of a tile ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -97352,50 +104255,42 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def input_mouse_click~ -- Inside source: true -*** True Line Result - def input_mouse_click -** Processing line: ~ if inputs.mouse.up~ -- Inside source: true -*** True Line Result - if inputs.mouse.up -** Processing line: ~ state.last_mouse_up = state.tick_count~ +** Processing line: ~ # Sets the starting position, ending position, and color for the horizontal separator.~ - Inside source: true *** True Line Result - state.last_mouse_up = state.tick_count -** Processing line: ~ elsif inputs.mouse.moved && user_is_editing?~ + # Sets the starting position, ending position, and color for the horizontal separator. +** Processing line: ~ def horizontal_separator y, x, x2~ - Inside source: true *** True Line Result - elsif inputs.mouse.moved && user_is_editing? -** Processing line: ~ edit_current_animation_frame inputs.mouse.point~ + def horizontal_separator y, x, x2 +** Processing line: ~ [x, y, x2, y, 150, 150, 150] # definition of separator; horizontal line means same starting/ending y~ - Inside source: true *** True Line Result - edit_current_animation_frame inputs.mouse.point -** Processing line: ~ end~ + [x, y, x2, y, 150, 150, 150] # definition of separator; horizontal line means same starting/ending y +** Processing line: ~ end~ - Inside source: true *** True Line Result - end + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ return unless inputs.mouse.click~ +** Processing line: ~ # Checks if the mouse is being clicked or dragged~ - Inside source: true *** True Line Result - return unless inputs.mouse.click -** Processing line: ~~ + # Checks if the mouse is being clicked or dragged +** Processing line: ~ def check_click~ - Inside source: true *** True Line Result - -** Processing line: ~ clicked_frame_button = state.buttons_frame_selection.items.find do |b|~ + def check_click +** Processing line: ~ if inputs.keyboard.key_down.r # if the "r" key is pressed down~ - Inside source: true *** True Line Result - clicked_frame_button = state.buttons_frame_selection.items.find do |b| -** Processing line: ~ inputs.mouse.point.inside_rect? b~ + if inputs.keyboard.key_down.r # if the "r" key is pressed down +** Processing line: ~ $dragon.reset~ - Inside source: true *** True Line Result - inputs.mouse.point.inside_rect? b + $dragon.reset ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -97404,110 +104299,110 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ if (clicked_frame_button)~ +** Processing line: ~ if inputs.mouse.down #is mouse up or down?~ - Inside source: true *** True Line Result - if (clicked_frame_button) -** Processing line: ~ state.animation_frames_selected_index = clicked_frame_button[:index]~ + if inputs.mouse.down #is mouse up or down? +** Processing line: ~ state.mouse_held = true~ - Inside source: true *** True Line Result - state.animation_frames_selected_index = clicked_frame_button[:index] -** Processing line: ~ end~ + state.mouse_held = true +** Processing line: ~ if inputs.mouse.position.x < state.grid_border[0] # if mouse's x position is inside the grid's borders~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + if inputs.mouse.position.x < state.grid_border[0] # if mouse's x position is inside the grid's borders +** Processing line: ~ state.tileCords.map do # perform action on all elements of tileCords collection~ - Inside source: true *** True Line Result - -** Processing line: ~ if (inputs.mouse.point.inside_rect? rt_canvas.sprite)~ + state.tileCords.map do # perform action on all elements of tileCords collection +** Processing line: ~ |x, y, order|~ - Inside source: true *** True Line Result - if (inputs.mouse.point.inside_rect? rt_canvas.sprite) -** Processing line: ~ state.last_mouse_down = state.tick_count~ + |x, y, order| +** Processing line: ~ # if mouse's x position is greater than (or equal to) the starting x position of a tile~ - Inside source: true *** True Line Result - state.last_mouse_down = state.tick_count -** Processing line: ~ edit_current_animation_frame inputs.mouse.point~ + # if mouse's x position is greater than (or equal to) the starting x position of a tile +** Processing line: ~ # and the mouse's x position is also less than (or equal to) the ending x position of that tile,~ - Inside source: true *** True Line Result - edit_current_animation_frame inputs.mouse.point -** Processing line: ~ end~ + # and the mouse's x position is also less than (or equal to) the ending x position of that tile, +** Processing line: ~ # and the mouse's y position is greater than (or equal to) the starting y position of that tile,~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + # and the mouse's y position is greater than (or equal to) the starting y position of that tile, +** Processing line: ~ # and the mouse's y position is also less than (or equal to) the ending y position of that tile,~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + # and the mouse's y position is also less than (or equal to) the ending y position of that tile, +** Processing line: ~ # (BASICALLY, IF THE MOUSE'S POSITION IS WITHIN THE STARTING AND ENDING POSITIONS OF A TILE)~ - Inside source: true *** True Line Result - -** Processing line: ~ def input_keyboard~ + # (BASICALLY, IF THE MOUSE'S POSITION IS WITHIN THE STARTING AND ENDING POSITIONS OF A TILE) +** Processing line: ~ if inputs.mouse.position.x >= x && inputs.mouse.position.x <= x + state.tileSize &&~ - Inside source: true *** True Line Result - def input_keyboard -** Processing line: ~ # w to save~ + if inputs.mouse.position.x >= x && inputs.mouse.position.x <= x + state.tileSize && +** Processing line: ~ inputs.mouse.position.y >= y && inputs.mouse.position.y <= y + state.tileSize~ - Inside source: true *** True Line Result - # w to save -** Processing line: ~ if inputs.keyboard.key_down.w~ + inputs.mouse.position.y >= y && inputs.mouse.position.y <= y + state.tileSize +** Processing line: ~ state.tileSelected = order # that tile is selected~ - Inside source: true *** True Line Result - if inputs.keyboard.key_down.w -** Processing line: ~ t = Time.now~ + state.tileSelected = order # that tile is selected +** Processing line: ~ end~ - Inside source: true *** True Line Result - t = Time.now -** Processing line: ~ state.save_description = "Time: #{t} (#{t.to_i})"~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - state.save_description = "Time: #{t} (#{t.to_i})" -** Processing line: ~ gtk.serialize_state 'canvas/state.txt', state~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - gtk.serialize_state 'canvas/state.txt', state -** Processing line: ~ gtk.serialize_state "tmp/canvas_backups/#{t.to_i}/state.txt", state~ + end +** Processing line: ~ elsif inputs.mouse.up # otherwise, if the mouse is in the "up" state~ - Inside source: true *** True Line Result - gtk.serialize_state "tmp/canvas_backups/#{t.to_i}/state.txt", state -** Processing line: ~ animation_frames.each_with_index do |animation_frame, i|~ + elsif inputs.mouse.up # otherwise, if the mouse is in the "up" state +** Processing line: ~ state.mouse_held = false # mouse is not held down or dragged~ - Inside source: true *** True Line Result - animation_frames.each_with_index do |animation_frame, i| -** Processing line: ~ queues.update_rt_animation_frame << { index: i,~ + state.mouse_held = false # mouse is not held down or dragged +** Processing line: ~ state.mouse_dragging = false~ - Inside source: true *** True Line Result - queues.update_rt_animation_frame << { index: i, -** Processing line: ~ at: state.tick_count + i,~ + state.mouse_dragging = false +** Processing line: ~ end~ - Inside source: true *** True Line Result - at: state.tick_count + i, -** Processing line: ~ queue_sprite_creation: true }~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - queue_sprite_creation: true } -** Processing line: ~ queues.create_sprite << { index: i,~ + +** Processing line: ~ if state.mouse_held && # mouse needs to be down~ - Inside source: true *** True Line Result - queues.create_sprite << { index: i, -** Processing line: ~ at: state.tick_count + animation_frames.length + i,~ + if state.mouse_held && # mouse needs to be down +** Processing line: ~ !inputs.mouse.click && # must not be first click~ - Inside source: true *** True Line Result - at: state.tick_count + animation_frames.length + i, -** Processing line: ~ path_override: "tmp/canvas_backups/#{t.to_i}/sprite-#{i}.png" }~ + !inputs.mouse.click && # must not be first click +** Processing line: ~ ((inputs.mouse.previous_click.point.x - inputs.mouse.position.x).abs > 15 ||~ - Inside source: true *** True Line Result - path_override: "tmp/canvas_backups/#{t.to_i}/sprite-#{i}.png" } -** Processing line: ~ end~ + ((inputs.mouse.previous_click.point.x - inputs.mouse.position.x).abs > 15 || +** Processing line: ~ (inputs.mouse.previous_click.point.y - inputs.mouse.position.y).abs > 15) # Need to move 15 pixels before "drag"~ - Inside source: true *** True Line Result - end -** Processing line: ~ gtk.notify! "Canvas saved."~ + (inputs.mouse.previous_click.point.y - inputs.mouse.position.y).abs > 15) # Need to move 15 pixels before "drag" +** Processing line: ~ state.mouse_dragging = true~ - Inside source: true *** True Line Result - gtk.notify! "Canvas saved." + state.mouse_dragging = true ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -97516,42 +104411,34 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # l to load~ -- Inside source: true -*** True Line Result - # l to load -** Processing line: ~ if inputs.keyboard.key_down.l~ -- Inside source: true -*** True Line Result - if inputs.keyboard.key_down.l -** Processing line: ~ args.state = gtk.deserialize_state 'canvas/state.txt'~ +** Processing line: ~ # if mouse is clicked inside grid's border, search_lines method is called with click input type~ - Inside source: true *** True Line Result - args.state = gtk.deserialize_state 'canvas/state.txt' -** Processing line: ~ animation_frames.each_with_index do |a, i|~ + # if mouse is clicked inside grid's border, search_lines method is called with click input type +** Processing line: ~ if ((inputs.mouse.click) && (inputs.mouse.click.point.inside_rect? state.grid_border))~ - Inside source: true *** True Line Result - animation_frames.each_with_index do |a, i| -** Processing line: ~ queues.update_rt_animation_frame << { index: i,~ + if ((inputs.mouse.click) && (inputs.mouse.click.point.inside_rect? state.grid_border)) +** Processing line: ~ search_lines(inputs.mouse.click.point, :click)~ - Inside source: true *** True Line Result - queues.update_rt_animation_frame << { index: i, -** Processing line: ~ at: state.tick_count + i,~ + search_lines(inputs.mouse.click.point, :click) +** Processing line: ~~ - Inside source: true *** True Line Result - at: state.tick_count + i, -** Processing line: ~ queue_sprite_creation: true }~ + +** Processing line: ~ # if mouse is dragged inside grid's border, search_lines method is called with drag input type~ - Inside source: true *** True Line Result - queue_sprite_creation: true } -** Processing line: ~ end~ + # if mouse is dragged inside grid's border, search_lines method is called with drag input type +** Processing line: ~ elsif ((state.mouse_dragging) && (inputs.mouse.position.inside_rect? state.grid_border))~ - Inside source: true *** True Line Result - end -** Processing line: ~ gtk.notify! "Canvas loaded."~ + elsif ((state.mouse_dragging) && (inputs.mouse.position.inside_rect? state.grid_border)) +** Processing line: ~ search_lines(inputs.mouse.position, :drag)~ - Inside source: true *** True Line Result - gtk.notify! "Canvas loaded." + search_lines(inputs.mouse.position, :drag) ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -97560,174 +104447,154 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # d to go into delete mode, release to paint~ -- Inside source: true -*** True Line Result - # d to go into delete mode, release to paint -** Processing line: ~ if inputs.keyboard.key_held.d~ +** Processing line: ~ # Changes grid's position on screen by moving it up, down, left, or right.~ - Inside source: true *** True Line Result - if inputs.keyboard.key_held.d -** Processing line: ~ state.edit_mode = :erasing~ + # Changes grid's position on screen by moving it up, down, left, or right. +** Processing line: ~~ - Inside source: true *** True Line Result - state.edit_mode = :erasing -** Processing line: ~ gtk.notify! "Erasing." if inputs.keyboard.key_held.d == (state.tick_count - 1)~ + +** Processing line: ~ # centerX is incremented by speed if the "d" key is pressed and if that sum is less than~ - Inside source: true *** True Line Result - gtk.notify! "Erasing." if inputs.keyboard.key_held.d == (state.tick_count - 1) -** Processing line: ~ elsif inputs.keyboard.key_up.d~ + # centerX is incremented by speed if the "d" key is pressed and if that sum is less than +** Processing line: ~ # the original left side of the center plus half the grid, minus half the top border of grid.~ - Inside source: true *** True Line Result - elsif inputs.keyboard.key_up.d -** Processing line: ~ state.edit_mode = :drawing~ + # the original left side of the center plus half the grid, minus half the top border of grid. +** Processing line: ~ # MOVES GRID RIGHT (increasing x)~ - Inside source: true *** True Line Result - state.edit_mode = :drawing -** Processing line: ~ gtk.notify! "Drawing."~ + # MOVES GRID RIGHT (increasing x) +** Processing line: ~ state.centerX += state.speed if inputs.keyboard.key_held.d &&~ - Inside source: true *** True Line Result - gtk.notify! "Drawing." -** Processing line: ~ end~ + state.centerX += state.speed if inputs.keyboard.key_held.d && +** Processing line: ~ (state.centerX + state.speed) < state.originalCenter[0] + (state.gridSize / 2) - (state.grid_border[2] / 2)~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + (state.centerX + state.speed) < state.originalCenter[0] + (state.gridSize / 2) - (state.grid_border[2] / 2) +** Processing line: ~ # centerX is decremented by speed if the "a" key is pressed and if that difference is greater than~ - Inside source: true *** True Line Result - -** Processing line: ~ # a to add a frame to the end~ + # centerX is decremented by speed if the "a" key is pressed and if that difference is greater than +** Processing line: ~ # the original left side of the center minus half the grid, plus half the top border of grid.~ - Inside source: true *** True Line Result - # a to add a frame to the end -** Processing line: ~ if inputs.keyboard.key_down.a~ + # the original left side of the center minus half the grid, plus half the top border of grid. +** Processing line: ~ # MOVES GRID LEFT (decreasing x)~ - Inside source: true *** True Line Result - if inputs.keyboard.key_down.a -** Processing line: ~ queues.create_sprite << { index: state.animation_frames_selected_index,~ + # MOVES GRID LEFT (decreasing x) +** Processing line: ~ state.centerX -= state.speed if inputs.keyboard.key_held.a &&~ - Inside source: true *** True Line Result - queues.create_sprite << { index: state.animation_frames_selected_index, -** Processing line: ~ at: state.tick_count }~ + state.centerX -= state.speed if inputs.keyboard.key_held.a && +** Processing line: ~ (state.centerX - state.speed) > state.originalCenter[0] - (state.gridSize / 2) + (state.grid_border[2] / 2)~ - Inside source: true *** True Line Result - at: state.tick_count } -** Processing line: ~ queues.create_sprite << { index: state.animation_frames_selected_index + 1,~ + (state.centerX - state.speed) > state.originalCenter[0] - (state.gridSize / 2) + (state.grid_border[2] / 2) +** Processing line: ~ # centerY is incremented by speed if the "w" key is pressed and if that sum is less than~ - Inside source: true *** True Line Result - queues.create_sprite << { index: state.animation_frames_selected_index + 1, -** Processing line: ~ at: state.tick_count }~ + # centerY is incremented by speed if the "w" key is pressed and if that sum is less than +** Processing line: ~ # the original bottom of the center plus half the grid, minus half the right border of grid.~ - Inside source: true *** True Line Result - at: state.tick_count } -** Processing line: ~ add_animation_frame_to_end~ + # the original bottom of the center plus half the grid, minus half the right border of grid. +** Processing line: ~ # MOVES GRID UP (increasing y)~ - Inside source: true *** True Line Result - add_animation_frame_to_end -** Processing line: ~ gtk.notify! "Frame added to end."~ + # MOVES GRID UP (increasing y) +** Processing line: ~ state.centerY += state.speed if inputs.keyboard.key_held.w &&~ - Inside source: true *** True Line Result - gtk.notify! "Frame added to end." -** Processing line: ~ end~ + state.centerY += state.speed if inputs.keyboard.key_held.w && +** Processing line: ~ (state.centerY + state.speed) < state.originalCenter[1] + (state.gridSize / 2) - (state.grid_border[3] / 2)~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + (state.centerY + state.speed) < state.originalCenter[1] + (state.gridSize / 2) - (state.grid_border[3] / 2) +** Processing line: ~ # centerY is decremented by speed if the "s" key is pressed and if the difference is greater than~ - Inside source: true *** True Line Result - -** Processing line: ~ # c or t to copy~ + # centerY is decremented by speed if the "s" key is pressed and if the difference is greater than +** Processing line: ~ # the original bottom of the center minus half the grid, plus half the right border of grid.~ - Inside source: true *** True Line Result - # c or t to copy -** Processing line: ~ if (inputs.keyboard.key_down.c || inputs.keyboard.key_down.t)~ + # the original bottom of the center minus half the grid, plus half the right border of grid. +** Processing line: ~ # MOVES GRID DOWN (decreasing y)~ - Inside source: true *** True Line Result - if (inputs.keyboard.key_down.c || inputs.keyboard.key_down.t) -** Processing line: ~ state.clipboard = [selected_animation_frame[:pixels]].flatten~ + # MOVES GRID DOWN (decreasing y) +** Processing line: ~ state.centerY -= state.speed if inputs.keyboard.key_held.s &&~ - Inside source: true *** True Line Result - state.clipboard = [selected_animation_frame[:pixels]].flatten -** Processing line: ~ gtk.notify! "Current frame copied."~ + state.centerY -= state.speed if inputs.keyboard.key_held.s && +** Processing line: ~ (state.centerY - state.speed) > state.originalCenter[1] - (state.gridSize / 2) + (state.grid_border[3] / 2)~ - Inside source: true *** True Line Result - gtk.notify! "Current frame copied." -** Processing line: ~ end~ + (state.centerY - state.speed) > state.originalCenter[1] - (state.gridSize / 2) + (state.grid_border[3] / 2) +** Processing line: ~ end~ - Inside source: true *** True Line Result - end + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # v or q to paste~ +** Processing line: ~ # Performs calculations on the gridX and gridY collections, and sets values.~ - Inside source: true *** True Line Result - # v or q to paste -** Processing line: ~ if (inputs.keyboard.key_down.v || inputs.keyboard.key_down.q) && state.clipboard~ + # Performs calculations on the gridX and gridY collections, and sets values. +** Processing line: ~ # Sets the definition of a grid box, including the image that it is filled with.~ - Inside source: true *** True Line Result - if (inputs.keyboard.key_down.v || inputs.keyboard.key_down.q) && state.clipboard -** Processing line: ~ selected_animation_frame[:pixels] = [state.clipboard].flatten~ + # Sets the definition of a grid box, including the image that it is filled with. +** Processing line: ~ def search_lines (point, input_type)~ - Inside source: true *** True Line Result - selected_animation_frame[:pixels] = [state.clipboard].flatten -** Processing line: ~ queues.update_rt_animation_frame << { index: state.animation_frames_selected_index,~ + def search_lines (point, input_type) +** Processing line: ~ point.x += state.centerX - 630 # increments x and y~ - Inside source: true *** True Line Result - queues.update_rt_animation_frame << { index: state.animation_frames_selected_index, -** Processing line: ~ at: state.tick_count,~ + point.x += state.centerX - 630 # increments x and y +** Processing line: ~ point.y += state.centerY - 360~ - Inside source: true *** True Line Result - at: state.tick_count, -** Processing line: ~ queue_sprite_creation: true }~ + point.y += state.centerY - 360 +** Processing line: ~ findX = 0~ - Inside source: true *** True Line Result - queue_sprite_creation: true } -** Processing line: ~ gtk.notify! "Pasted."~ + findX = 0 +** Processing line: ~ findY = 0~ - Inside source: true *** True Line Result - gtk.notify! "Pasted." -** Processing line: ~ end~ + findY = 0 +** Processing line: ~ increment = state.gridSize / state.lineQuantity # divides grid by number of separators~ - Inside source: true *** True Line Result - end + increment = state.gridSize / state.lineQuantity # divides grid by number of separators ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # f to go forward/next frame~ -- Inside source: true -*** True Line Result - # f to go forward/next frame -** Processing line: ~ if (inputs.keyboard.key_down.f)~ -- Inside source: true -*** True Line Result - if (inputs.keyboard.key_down.f) -** Processing line: ~ if (state.animation_frames_selected_index == (state.animation_frames.length - 1))~ -- Inside source: true -*** True Line Result - if (state.animation_frames_selected_index == (state.animation_frames.length - 1)) -** Processing line: ~ state.animation_frames_selected_index = 0~ -- Inside source: true -*** True Line Result - state.animation_frames_selected_index = 0 -** Processing line: ~ else~ +** Processing line: ~ state.gridX.map do # perform an action on every element of collection~ - Inside source: true *** True Line Result - else -** Processing line: ~ state.animation_frames_selected_index += 1~ + state.gridX.map do # perform an action on every element of collection +** Processing line: ~ |x|~ - Inside source: true *** True Line Result - state.animation_frames_selected_index += 1 -** Processing line: ~ end~ + |x| +** Processing line: ~ # findX increments x by 10 if point.x is less than that sum and findX is currently 0~ - Inside source: true *** True Line Result - end -** Processing line: ~ gtk.notify! "Next frame."~ + # findX increments x by 10 if point.x is less than that sum and findX is currently 0 +** Processing line: ~ findX = x + 10 if point.x < (x + 10) && findX == 0~ - Inside source: true *** True Line Result - gtk.notify! "Next frame." + findX = x + 10 if point.x < (x + 10) && findX == 0 ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -97736,202 +104603,194 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # b to go back/previous frame~ -- Inside source: true -*** True Line Result - # b to go back/previous frame -** Processing line: ~ if (inputs.keyboard.key_down.b)~ +** Processing line: ~ state.gridY.map do~ - Inside source: true *** True Line Result - if (inputs.keyboard.key_down.b) -** Processing line: ~ if (state.animation_frames_selected_index == 0)~ + state.gridY.map do +** Processing line: ~ |y|~ - Inside source: true *** True Line Result - if (state.animation_frames_selected_index == 0) -** Processing line: ~ state.animation_frames_selected_index = state.animation_frames.length - 1~ + |y| +** Processing line: ~ # findY is set to y if point.y is less than that value and findY is currently 0~ - Inside source: true *** True Line Result - state.animation_frames_selected_index = state.animation_frames.length - 1 -** Processing line: ~ else~ + # findY is set to y if point.y is less than that value and findY is currently 0 +** Processing line: ~ findY = y if point.y < (y) && findY == 0~ - Inside source: true *** True Line Result - else -** Processing line: ~ state.animation_frames_selected_index -= 1~ + findY = y if point.y < (y) && findY == 0 +** Processing line: ~ end~ - Inside source: true *** True Line Result - state.animation_frames_selected_index -= 1 -** Processing line: ~ end~ + end +** Processing line: ~ # position of a box is denoted by bottom left corner, which is why the increment is being subtracted~ - Inside source: true *** True Line Result - end -** Processing line: ~ gtk.notify! "Previous frame."~ + # position of a box is denoted by bottom left corner, which is why the increment is being subtracted +** Processing line: ~ grid_box = [findX - (increment.ceil), findY - (increment.ceil), increment.ceil, increment.ceil,~ - Inside source: true *** True Line Result - gtk.notify! "Previous frame." -** Processing line: ~ end~ + grid_box = [findX - (increment.ceil), findY - (increment.ceil), increment.ceil, increment.ceil, +** Processing line: ~ "sprites/image" + state.tileSelected.to_s + ".png"] # sets sprite definition~ - Inside source: true *** True Line Result - end + "sprites/image" + state.tileSelected.to_s + ".png"] # sets sprite definition ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # x to delete frame~ -- Inside source: true -*** True Line Result - # x to delete frame -** Processing line: ~ if (inputs.keyboard.key_down.x) && animation_frames.length > 1~ +** Processing line: ~ if input_type == :click # if user clicks their mouse~ - Inside source: true *** True Line Result - if (inputs.keyboard.key_down.x) && animation_frames.length > 1 -** Processing line: ~ state.clipboard = selected_animation_frame[:pixels]~ + if input_type == :click # if user clicks their mouse +** Processing line: ~ if state.filled_squares.include? grid_box # if grid box is already filled in~ - Inside source: true *** True Line Result - state.clipboard = selected_animation_frame[:pixels] -** Processing line: ~ state.animation_frames = animation_frames.find_all { |v| v[:index] != state.animation_frames_selected_index }~ + if state.filled_squares.include? grid_box # if grid box is already filled in +** Processing line: ~ state.filled_squares.delete grid_box # box is cleared and removed from filled_squares~ - Inside source: true *** True Line Result - state.animation_frames = animation_frames.find_all { |v| v[:index] != state.animation_frames_selected_index } -** Processing line: ~ if state.animation_frames_selected_index >= state.animation_frames.length~ + state.filled_squares.delete grid_box # box is cleared and removed from filled_squares +** Processing line: ~ else~ - Inside source: true *** True Line Result - if state.animation_frames_selected_index >= state.animation_frames.length -** Processing line: ~ state.animation_frames_selected_index = state.animation_frames.length - 1~ + else +** Processing line: ~ state.filled_squares << grid_box # otherwise, box is filled in and added to filled_squares~ - Inside source: true *** True Line Result - state.animation_frames_selected_index = state.animation_frames.length - 1 + state.filled_squares << grid_box # otherwise, box is filled in and added to filled_squares ** Processing line: ~ end~ - Inside source: true *** True Line Result end -** Processing line: ~ gtk.notify! "Frame deleted."~ +** Processing line: ~ elsif input_type == :drag # if user drags mouse~ - Inside source: true *** True Line Result - gtk.notify! "Frame deleted." -** Processing line: ~ end~ + elsif input_type == :drag # if user drags mouse +** Processing line: ~ unless state.filled_squares.include? grid_box # unless grid box dragged over is already filled in~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + unless state.filled_squares.include? grid_box # unless grid box dragged over is already filled in +** Processing line: ~ state.filled_squares << grid_box # box is filled in and added to filled_squares~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + state.filled_squares << grid_box # box is filled in and added to filled_squares +** Processing line: ~ end~ - Inside source: true *** True Line Result - -** Processing line: ~ def calc_auto_export~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - def calc_auto_export -** Processing line: ~ return if user_is_editing?~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - return if user_is_editing? -** Processing line: ~ return if state.last_mouse_up.elapsed_time != 30~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - return if state.last_mouse_up.elapsed_time != 30 -** Processing line: ~ # auto export current animation frame if there is no editing for 30 ticks~ + +** Processing line: ~ # Creates a "Clear" button using labels and borders.~ - Inside source: true *** True Line Result - # auto export current animation frame if there is no editing for 30 ticks -** Processing line: ~ queues.create_sprite << { index: state.animation_frames_selected_index,~ + # Creates a "Clear" button using labels and borders. +** Processing line: ~ def draw_buttons~ - Inside source: true *** True Line Result - queues.create_sprite << { index: state.animation_frames_selected_index, -** Processing line: ~ at: state.tick_count }~ + def draw_buttons +** Processing line: ~ x, y, w, h = 390, 50, 240, 50~ - Inside source: true *** True Line Result - at: state.tick_count } -** Processing line: ~ end~ + x, y, w, h = 390, 50, 240, 50 +** Processing line: ~ state.clear_button ||= state.new_entity(:button_with_fade)~ - Inside source: true *** True Line Result - end + state.clear_button ||= state.new_entity(:button_with_fade) ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def calc_buttons_frame_selection~ -- Inside source: true -*** True Line Result - def calc_buttons_frame_selection -** Processing line: ~ state.buttons_frame_selection.items = animation_frames.length.map_with_index do |i|~ +** Processing line: ~ # x and y positions are set to display "Clear" label in center of the button~ - Inside source: true *** True Line Result - state.buttons_frame_selection.items = animation_frames.length.map_with_index do |i| -** Processing line: ~ { x: state.buttons_frame_selection.left + i * state.buttons_frame_selection.size,~ + # x and y positions are set to display "Clear" label in center of the button +** Processing line: ~ # Try changing first two parameters to simply x, y and see what happens to the text placement~ - Inside source: true *** True Line Result - { x: state.buttons_frame_selection.left + i * state.buttons_frame_selection.size, -** Processing line: ~ y: state.buttons_frame_selection.top - state.buttons_frame_selection.size,~ + # Try changing first two parameters to simply x, y and see what happens to the text placement +** Processing line: ~ state.clear_button.label ||= [x + w.half, y + h.half + 10, "Clear", 0, 1]~ - Inside source: true *** True Line Result - y: state.buttons_frame_selection.top - state.buttons_frame_selection.size, -** Processing line: ~ inner_rect: {~ + state.clear_button.label ||= [x + w.half, y + h.half + 10, "Clear", 0, 1] +** Processing line: ~ state.clear_button.border ||= [x, y, w, h] # definition of button's border~ - Inside source: true *** True Line Result - inner_rect: { -** Processing line: ~ x: (state.buttons_frame_selection.left + 2) + i * state.buttons_frame_selection.size,~ + state.clear_button.border ||= [x, y, w, h] # definition of button's border +** Processing line: ~~ - Inside source: true *** True Line Result - x: (state.buttons_frame_selection.left + 2) + i * state.buttons_frame_selection.size, -** Processing line: ~ y: (state.buttons_frame_selection.top - state.buttons_frame_selection.size + 2),~ + +** Processing line: ~ # If the mouse is clicked inside the borders of the clear button~ - Inside source: true *** True Line Result - y: (state.buttons_frame_selection.top - state.buttons_frame_selection.size + 2), -** Processing line: ~ w: 16,~ + # If the mouse is clicked inside the borders of the clear button +** Processing line: ~ if inputs.mouse.click && inputs.mouse.click.point.inside_rect?(state.clear_button.border)~ - Inside source: true *** True Line Result - w: 16, -** Processing line: ~ h: 16,~ + if inputs.mouse.click && inputs.mouse.click.point.inside_rect?(state.clear_button.border) +** Processing line: ~ state.clear_button.clicked_at = inputs.mouse.click.created_at # value is frame of mouse click~ - Inside source: true *** True Line Result - h: 16, -** Processing line: ~ },~ + state.clear_button.clicked_at = inputs.mouse.click.created_at # value is frame of mouse click +** Processing line: ~ state.filled_squares.clear # filled squares collection is emptied (squares are cleared)~ - Inside source: true *** True Line Result - }, -** Processing line: ~ w: state.buttons_frame_selection.size,~ + state.filled_squares.clear # filled squares collection is emptied (squares are cleared) +** Processing line: ~ inputs.mouse.previous_click = nil # no previous click~ - Inside source: true *** True Line Result - w: state.buttons_frame_selection.size, -** Processing line: ~ h: state.buttons_frame_selection.size,~ + inputs.mouse.previous_click = nil # no previous click +** Processing line: ~ end~ - Inside source: true *** True Line Result - h: state.buttons_frame_selection.size, -** Processing line: ~ index: i }~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - index: i } -** Processing line: ~ end~ + +** Processing line: ~ outputs.labels << state.clear_button.label # outputs clear button~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + outputs.labels << state.clear_button.label # outputs clear button +** Processing line: ~ outputs.borders << state.clear_button.border~ - Inside source: true *** True Line Result - end + outputs.borders << state.clear_button.border ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def calc_animation_frames~ +** Processing line: ~ # When the clear button is clicked, the color of the button changes~ - Inside source: true *** True Line Result - def calc_animation_frames -** Processing line: ~ animation_frames.each_with_index do |animation_frame, i|~ + # When the clear button is clicked, the color of the button changes +** Processing line: ~ # and the transparency changes, as well. If you change the time from~ - Inside source: true *** True Line Result - animation_frames.each_with_index do |animation_frame, i| -** Processing line: ~ animation_frame[:index] = i~ + # and the transparency changes, as well. If you change the time from +** Processing line: ~ # 0.25.seconds to 1.25.seconds or more, the change will last longer.~ - Inside source: true *** True Line Result - animation_frame[:index] = i -** Processing line: ~ animation_frame[:rt_name] = "animation_frame_#{i}"~ + # 0.25.seconds to 1.25.seconds or more, the change will last longer. +** Processing line: ~ if state.clear_button.clicked_at~ - Inside source: true *** True Line Result - animation_frame[:rt_name] = "animation_frame_#{i}" + if state.clear_button.clicked_at +** Processing line: ~ outputs.solids << [x, y, w, h, 0, 180, 80, 255 * state.clear_button.clicked_at.ease(0.25.seconds, :flip)]~ +- Inside source: true +*** True Line Result + outputs.solids << [x, y, w, h, 0, 180, 80, 255 * state.clear_button.clicked_at.ease(0.25.seconds, :flip)] ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -97940,82 +104799,90 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result end +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def process_queue_create_sprite~ +** Processing line: ~ $tile_editor = TileEditor.new~ - Inside source: true *** True Line Result - def process_queue_create_sprite -** Processing line: ~ sprites_to_create = queues.create_sprite~ + $tile_editor = TileEditor.new +** Processing line: ~~ - Inside source: true *** True Line Result - sprites_to_create = queues.create_sprite -** Processing line: ~ .find_all { |h| h[:at].elapsed? }~ + +** Processing line: ~ def tick args~ - Inside source: true *** True Line Result - .find_all { |h| h[:at].elapsed? } -** Processing line: ~~ + def tick args +** Processing line: ~ $tile_editor.inputs = args.inputs~ - Inside source: true *** True Line Result - -** Processing line: ~ queues.create_sprite = queues.create_sprite - sprites_to_create~ + $tile_editor.inputs = args.inputs +** Processing line: ~ $tile_editor.grid = args.grid~ - Inside source: true *** True Line Result - queues.create_sprite = queues.create_sprite - sprites_to_create -** Processing line: ~~ + $tile_editor.grid = args.grid +** Processing line: ~ $tile_editor.args = args~ - Inside source: true *** True Line Result - -** Processing line: ~ sprites_to_create.each do |h|~ + $tile_editor.args = args +** Processing line: ~ $tile_editor.outputs = args.outputs~ - Inside source: true *** True Line Result - sprites_to_create.each do |h| -** Processing line: ~ export_animation_frame h[:index], h[:path_override]~ + $tile_editor.outputs = args.outputs +** Processing line: ~ $tile_editor.state = args.state~ - Inside source: true *** True Line Result - export_animation_frame h[:index], h[:path_override] -** Processing line: ~ end~ + $tile_editor.state = args.state +** Processing line: ~ $tile_editor.tick~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + $tile_editor.tick +** Processing line: ~ tick_instructions args, "Roll your own tile editor. CLICK to select a sprite. CLICK in grid to place sprite. WASD to move around."~ - Inside source: true *** True Line Result - end + tick_instructions args, "Roll your own tile editor. CLICK to select a sprite. CLICK in grid to place sprite. WASD to move around." +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def process_queue_reset_sprite~ +** Processing line: ~ def tick_instructions args, text, y = 715~ - Inside source: true *** True Line Result - def process_queue_reset_sprite -** Processing line: ~ sprites_to_reset = queues.reset_sprite~ + def tick_instructions args, text, y = 715 +** Processing line: ~ return if args.state.key_event_occurred~ - Inside source: true *** True Line Result - sprites_to_reset = queues.reset_sprite -** Processing line: ~ .find_all { |h| h[:at].elapsed? }~ + return if args.state.key_event_occurred +** Processing line: ~ if args.inputs.mouse.click ||~ - Inside source: true *** True Line Result - .find_all { |h| h[:at].elapsed? } -** Processing line: ~~ + if args.inputs.mouse.click || +** Processing line: ~ args.inputs.keyboard.directional_vector ||~ - Inside source: true *** True Line Result - -** Processing line: ~ queues.reset_sprite -= sprites_to_reset~ + args.inputs.keyboard.directional_vector || +** Processing line: ~ args.inputs.keyboard.key_down.enter ||~ - Inside source: true *** True Line Result - queues.reset_sprite -= sprites_to_reset -** Processing line: ~~ + args.inputs.keyboard.key_down.enter || +** Processing line: ~ args.inputs.keyboard.key_down.escape~ - Inside source: true *** True Line Result - -** Processing line: ~ sprites_to_reset.each { |h| gtk.reset_sprite (sprite_path h[:index]) }~ + args.inputs.keyboard.key_down.escape +** Processing line: ~ args.state.key_event_occurred = true~ - Inside source: true *** True Line Result - sprites_to_reset.each { |h| gtk.reset_sprite (sprite_path h[:index]) } + args.state.key_event_occurred = true ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -98024,62 +104891,82 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def process_queue_update_rt_animation_frame~ +** Processing line: ~ args.outputs.debug << [0, y - 50, 1280, 60].solid~ - Inside source: true *** True Line Result - def process_queue_update_rt_animation_frame -** Processing line: ~ animation_frames_to_update = queues.update_rt_animation_frame~ + args.outputs.debug << [0, y - 50, 1280, 60].solid +** Processing line: ~ args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label~ - Inside source: true *** True Line Result - animation_frames_to_update = queues.update_rt_animation_frame -** Processing line: ~ .find_all { |h| h[:at].elapsed? }~ + args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label +** Processing line: ~ args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label~ - Inside source: true *** True Line Result - .find_all { |h| h[:at].elapsed? } + args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ queues.update_rt_animation_frame -= animation_frames_to_update~ -- Inside source: true +** Processing line: ~#+end_src~ +- Line was identified as the end of a code block. *** True Line Result - queues.update_rt_animation_frame -= animation_frames_to_update +#+end_src ** Processing line: ~~ -- Inside source: true +- End of paragraph detected. *** True Line Result -** Processing line: ~ animation_frames_to_update.each do |h|~ +** Processing line: ~*** Dungeon Crawl - Classics Jam - main.rb~ +- Header detected. +*** True Line Result + +*** True Line Result +*** Dungeon Crawl - Classics Jam - main.rb +** Processing line: ~#+begin_src ruby~ +- Line was identified as the beginning of a code block. +*** True Line Result + +*** True Line Result +#+begin_src ruby +** Processing line: ~ # ./samples/99_genre_dungeon_crawl/classics_jam/app/main.rb~ - Inside source: true *** True Line Result - animation_frames_to_update.each do |h| -** Processing line: ~ update_animation_frame_render_target animation_frames[h[:index]]~ + # ./samples/99_genre_dungeon_crawl/classics_jam/app/main.rb +** Processing line: ~ class Game~ - Inside source: true *** True Line Result - update_animation_frame_render_target animation_frames[h[:index]] + class Game +** Processing line: ~ attr_gtk~ +- Inside source: true +*** True Line Result + attr_gtk ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ if h[:queue_sprite_creation]~ +** Processing line: ~ def tick~ - Inside source: true *** True Line Result - if h[:queue_sprite_creation] -** Processing line: ~ queues.create_sprite << { index: h[:index],~ + def tick +** Processing line: ~ defaults~ - Inside source: true *** True Line Result - queues.create_sprite << { index: h[:index], -** Processing line: ~ at: state.tick_count + 1 }~ + defaults +** Processing line: ~ render~ - Inside source: true *** True Line Result - at: state.tick_count + 1 } -** Processing line: ~ end~ + render +** Processing line: ~ input~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + input +** Processing line: ~ calc~ - Inside source: true *** True Line Result - end + calc ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -98088,50 +104975,50 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def update_animation_frame_render_target animation_frame~ +** Processing line: ~ def defaults~ - Inside source: true *** True Line Result - def update_animation_frame_render_target animation_frame -** Processing line: ~ return if !animation_frame~ + def defaults +** Processing line: ~ player.x ||= 640~ - Inside source: true *** True Line Result - return if !animation_frame -** Processing line: ~~ + player.x ||= 640 +** Processing line: ~ player.y ||= 360~ - Inside source: true *** True Line Result - -** Processing line: ~ outputs[animation_frame[:rt_name]].width = state.rt_canvas.size~ + player.y ||= 360 +** Processing line: ~ player.w ||= 16~ - Inside source: true *** True Line Result - outputs[animation_frame[:rt_name]].width = state.rt_canvas.size -** Processing line: ~ outputs[animation_frame[:rt_name]].height = state.rt_canvas.size~ + player.w ||= 16 +** Processing line: ~ player.h ||= 16~ - Inside source: true *** True Line Result - outputs[animation_frame[:rt_name]].height = state.rt_canvas.size -** Processing line: ~ outputs[animation_frame[:rt_name]].solids << animation_frame[:pixels].map do |f|~ + player.h ||= 16 +** Processing line: ~ player.attacked_at ||= -1~ - Inside source: true *** True Line Result - outputs[animation_frame[:rt_name]].solids << animation_frame[:pixels].map do |f| -** Processing line: ~ { x: f.x,~ + player.attacked_at ||= -1 +** Processing line: ~ player.angle ||= 0~ - Inside source: true *** True Line Result - { x: f.x, -** Processing line: ~ y: f.y,~ + player.angle ||= 0 +** Processing line: ~ player.future_player ||= future_player_position 0, 0~ - Inside source: true *** True Line Result - y: f.y, -** Processing line: ~ w: 1,~ + player.future_player ||= future_player_position 0, 0 +** Processing line: ~ player.projectiles ||= []~ - Inside source: true *** True Line Result - w: 1, -** Processing line: ~ h: 1, r: 255, g: 255, b: 255 }~ + player.projectiles ||= [] +** Processing line: ~ player.damage ||= 0~ - Inside source: true *** True Line Result - h: 1, r: 255, g: 255, b: 255 } -** Processing line: ~ end~ + player.damage ||= 0 +** Processing line: ~ state.level ||= create_level level_one_template~ - Inside source: true *** True Line Result - end + state.level ||= create_level level_one_template ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -98140,82 +105027,86 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def animation_frames~ +** Processing line: ~ def render~ - Inside source: true *** True Line Result - def animation_frames -** Processing line: ~ state.animation_frames~ + def render +** Processing line: ~ outputs.sprites << level.walls.map do |w|~ - Inside source: true *** True Line Result - state.animation_frames -** Processing line: ~ end~ + outputs.sprites << level.walls.map do |w| +** Processing line: ~ w.merge(path: 'sprites/square/gray.png')~ - Inside source: true *** True Line Result - end + w.merge(path: 'sprites/square/gray.png') +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def add_animation_frame_to_end~ +** Processing line: ~ outputs.sprites << level.spawn_locations.map do |s|~ - Inside source: true *** True Line Result - def add_animation_frame_to_end -** Processing line: ~ animation_frames << {~ + outputs.sprites << level.spawn_locations.map do |s| +** Processing line: ~ s.merge(path: 'sprites/square/blue.png')~ - Inside source: true *** True Line Result - animation_frames << { -** Processing line: ~ index: animation_frames.length,~ + s.merge(path: 'sprites/square/blue.png') +** Processing line: ~ end~ - Inside source: true *** True Line Result - index: animation_frames.length, -** Processing line: ~ pixels: [],~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - pixels: [], -** Processing line: ~ rt_name: "animation_frame_#{animation_frames.length}"~ + +** Processing line: ~ outputs.sprites << player.projectiles.map do |p|~ - Inside source: true *** True Line Result - rt_name: "animation_frame_#{animation_frames.length}" -** Processing line: ~ }~ + outputs.sprites << player.projectiles.map do |p| +** Processing line: ~ p.merge(path: 'sprites/square/blue.png')~ - Inside source: true *** True Line Result - } + p.merge(path: 'sprites/square/blue.png') +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ state.animation_frames_selected_index = (animation_frames.length - 1)~ +** Processing line: ~ outputs.sprites << level.enemies.map do |e|~ - Inside source: true *** True Line Result - state.animation_frames_selected_index = (animation_frames.length - 1) -** Processing line: ~ queues.update_rt_animation_frame << { index: state.animation_frames_selected_index,~ + outputs.sprites << level.enemies.map do |e| +** Processing line: ~ e.merge(path: 'sprites/square/red.png')~ - Inside source: true *** True Line Result - queues.update_rt_animation_frame << { index: state.animation_frames_selected_index, -** Processing line: ~ at: state.tick_count,~ + e.merge(path: 'sprites/square/red.png') +** Processing line: ~ end~ - Inside source: true *** True Line Result - at: state.tick_count, -** Processing line: ~ queue_sprite_creation: true }~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - queue_sprite_creation: true } -** Processing line: ~ end~ + +** Processing line: ~ outputs.sprites << player.merge(path: 'sprites/circle/green.png', angle: player.angle)~ - Inside source: true *** True Line Result - end + outputs.sprites << player.merge(path: 'sprites/circle/green.png', angle: player.angle) ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def sprite_path i~ -- Inside source: true -*** True Line Result - def sprite_path i -** Processing line: ~ "canvas/sprite-#{i}.png"~ +** Processing line: ~ outputs.labels << { x: 30, y: 30.from_top, text: "damage: #{player.damage || 0}" }~ - Inside source: true *** True Line Result - "canvas/sprite-#{i}.png" + outputs.labels << { x: 30, y: 30.from_top, text: "damage: #{player.damage || 0}" } ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -98224,54 +105115,54 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def export_animation_frame i, path_override = nil~ +** Processing line: ~ def input~ - Inside source: true *** True Line Result - def export_animation_frame i, path_override = nil -** Processing line: ~ return if !state.animation_frames[i]~ + def input +** Processing line: ~ player.angle = inputs.directional_angle || player.angle~ - Inside source: true *** True Line Result - return if !state.animation_frames[i] -** Processing line: ~~ + player.angle = inputs.directional_angle || player.angle +** Processing line: ~ if inputs.controller_one.key_down.a || inputs.keyboard.key_down.space~ - Inside source: true *** True Line Result - -** Processing line: ~ outputs.screenshots << state.buttons_frame_selection~ + if inputs.controller_one.key_down.a || inputs.keyboard.key_down.space +** Processing line: ~ player.attacked_at = state.tick_count~ - Inside source: true *** True Line Result - outputs.screenshots << state.buttons_frame_selection -** Processing line: ~ .items[i][:inner_rect]~ + player.attacked_at = state.tick_count +** Processing line: ~ end~ - Inside source: true *** True Line Result - .items[i][:inner_rect] -** Processing line: ~ .merge(path: path_override || (sprite_path i))~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - .merge(path: path_override || (sprite_path i)) + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ outputs.screenshots << state.buttons_frame_selection~ +** Processing line: ~ def calc~ - Inside source: true *** True Line Result - outputs.screenshots << state.buttons_frame_selection -** Processing line: ~ .items[i][:inner_rect]~ + def calc +** Processing line: ~ calc_player~ - Inside source: true *** True Line Result - .items[i][:inner_rect] -** Processing line: ~ .merge(path: "tmp/sprite_backups/#{Time.now.to_i}-sprite-#{i}.png")~ + calc_player +** Processing line: ~ calc_projectiles~ - Inside source: true *** True Line Result - .merge(path: "tmp/sprite_backups/#{Time.now.to_i}-sprite-#{i}.png") -** Processing line: ~~ + calc_projectiles +** Processing line: ~ calc_enemies~ - Inside source: true *** True Line Result - -** Processing line: ~ queues.reset_sprite << { index: i, at: state.tick_count }~ + calc_enemies +** Processing line: ~ calc_spawn_locations~ - Inside source: true *** True Line Result - queues.reset_sprite << { index: i, at: state.tick_count } + calc_spawn_locations ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -98280,70 +105171,66 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def selected_animation_frame~ -- Inside source: true -*** True Line Result - def selected_animation_frame -** Processing line: ~ state.animation_frames[state.animation_frames_selected_index]~ +** Processing line: ~ def calc_player~ - Inside source: true *** True Line Result - state.animation_frames[state.animation_frames_selected_index] -** Processing line: ~ end~ + def calc_player +** Processing line: ~ if player.attacked_at == state.tick_count~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + if player.attacked_at == state.tick_count +** Processing line: ~ player.projectiles << { at: state.tick_count,~ - Inside source: true *** True Line Result - -** Processing line: ~ def edit_current_animation_frame point~ + player.projectiles << { at: state.tick_count, +** Processing line: ~ x: player.x,~ - Inside source: true *** True Line Result - def edit_current_animation_frame point -** Processing line: ~ draw_area_point = (to_draw_area point)~ + x: player.x, +** Processing line: ~ y: player.y,~ - Inside source: true *** True Line Result - draw_area_point = (to_draw_area point) -** Processing line: ~ if state.edit_mode == :drawing && (!selected_animation_frame[:pixels].include? draw_area_point)~ + y: player.y, +** Processing line: ~ angle: player.angle,~ - Inside source: true *** True Line Result - if state.edit_mode == :drawing && (!selected_animation_frame[:pixels].include? draw_area_point) -** Processing line: ~ selected_animation_frame[:pixels] << draw_area_point~ + angle: player.angle, +** Processing line: ~ w: 4,~ - Inside source: true *** True Line Result - selected_animation_frame[:pixels] << draw_area_point -** Processing line: ~ queues.update_rt_animation_frame << { index: state.animation_frames_selected_index,~ + w: 4, +** Processing line: ~ h: 4 }.center_inside_rect(player)~ - Inside source: true *** True Line Result - queues.update_rt_animation_frame << { index: state.animation_frames_selected_index, -** Processing line: ~ at: state.tick_count,~ + h: 4 }.center_inside_rect(player) +** Processing line: ~ end~ - Inside source: true *** True Line Result - at: state.tick_count, -** Processing line: ~ queue_sprite_creation: !user_is_editing? }~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - queue_sprite_creation: !user_is_editing? } -** Processing line: ~ elsif state.edit_mode == :erasing && (selected_animation_frame[:pixels].include? draw_area_point)~ + +** Processing line: ~ if player.attacked_at.elapsed_time > 5~ - Inside source: true *** True Line Result - elsif state.edit_mode == :erasing && (selected_animation_frame[:pixels].include? draw_area_point) -** Processing line: ~ selected_animation_frame[:pixels] = selected_animation_frame[:pixels].reject { |p| p == draw_area_point }~ + if player.attacked_at.elapsed_time > 5 +** Processing line: ~ future_player = future_player_position inputs.left_right * 2, inputs.up_down * 2~ - Inside source: true *** True Line Result - selected_animation_frame[:pixels] = selected_animation_frame[:pixels].reject { |p| p == draw_area_point } -** Processing line: ~ queues.update_rt_animation_frame << { index: state.animation_frames_selected_index,~ + future_player = future_player_position inputs.left_right * 2, inputs.up_down * 2 +** Processing line: ~ future_player_collision = future_collision player, future_player, level.walls~ - Inside source: true *** True Line Result - queues.update_rt_animation_frame << { index: state.animation_frames_selected_index, -** Processing line: ~ at: state.tick_count,~ + future_player_collision = future_collision player, future_player, level.walls +** Processing line: ~ player.x = future_player_collision.x if !future_player_collision.dx_collision~ - Inside source: true *** True Line Result - at: state.tick_count, -** Processing line: ~ queue_sprite_creation: !user_is_editing? }~ + player.x = future_player_collision.x if !future_player_collision.dx_collision +** Processing line: ~ player.y = future_player_collision.y if !future_player_collision.dy_collision~ - Inside source: true *** True Line Result - queue_sprite_creation: !user_is_editing? } + player.y = future_player_collision.y if !future_player_collision.dy_collision ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -98356,46 +105243,46 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def user_is_editing?~ +** Processing line: ~ def calc_projectile_collisions entities~ - Inside source: true *** True Line Result - def user_is_editing? -** Processing line: ~ state.last_mouse_down > state.last_mouse_up~ + def calc_projectile_collisions entities +** Processing line: ~ entities.each do |e|~ - Inside source: true *** True Line Result - state.last_mouse_down > state.last_mouse_up -** Processing line: ~ end~ + entities.each do |e| +** Processing line: ~ e.damage ||= 0~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + e.damage ||= 0 +** Processing line: ~ player.projectiles.each do |p|~ - Inside source: true *** True Line Result - -** Processing line: ~ def to_draw_area point~ + player.projectiles.each do |p| +** Processing line: ~ if !p.collided && (p.intersect_rect? e)~ - Inside source: true *** True Line Result - def to_draw_area point -** Processing line: ~ x, y = point~ + if !p.collided && (p.intersect_rect? e) +** Processing line: ~ p.collided = true~ - Inside source: true *** True Line Result - x, y = point -** Processing line: ~ x -= rt_canvas.sprite.x~ + p.collided = true +** Processing line: ~ e.damage += 1~ - Inside source: true *** True Line Result - x -= rt_canvas.sprite.x -** Processing line: ~ y -= rt_canvas.sprite.y~ + e.damage += 1 +** Processing line: ~ end~ - Inside source: true *** True Line Result - y -= rt_canvas.sprite.y -** Processing line: ~ { x: x.idiv(rt_canvas.zoom),~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - { x: x.idiv(rt_canvas.zoom), -** Processing line: ~ y: y.idiv(rt_canvas.zoom) }~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - y: y.idiv(rt_canvas.zoom) } + end ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -98404,426 +105291,426 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def rt_canvas~ +** Processing line: ~ def calc_projectiles~ - Inside source: true *** True Line Result - def rt_canvas -** Processing line: ~ state.rt_canvas ||= state.new_entity(:rt_canvas)~ + def calc_projectiles +** Processing line: ~ player.projectiles.map! do |p|~ - Inside source: true *** True Line Result - state.rt_canvas ||= state.new_entity(:rt_canvas) -** Processing line: ~ end~ + player.projectiles.map! do |p| +** Processing line: ~ dx, dy = p.angle.vector 10~ - Inside source: true *** True Line Result - end + dx, dy = p.angle.vector 10 +** Processing line: ~ p.merge(x: p.x + dx, y: p.y + dy)~ +- Inside source: true +*** True Line Result + p.merge(x: p.x + dx, y: p.y + dy) +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def queues~ +** Processing line: ~ calc_projectile_collisions level.walls + level.enemies + level.spawn_locations~ - Inside source: true *** True Line Result - def queues -** Processing line: ~ state.queues ||= state.new_entity(:queues)~ + calc_projectile_collisions level.walls + level.enemies + level.spawn_locations +** Processing line: ~ player.projectiles.reject! { |p| p.at.elapsed_time > 10000 }~ - Inside source: true *** True Line Result - state.queues ||= state.new_entity(:queues) -** Processing line: ~ end~ + player.projectiles.reject! { |p| p.at.elapsed_time > 10000 } +** Processing line: ~ player.projectiles.reject! { |p| p.collided }~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + player.projectiles.reject! { |p| p.collided } +** Processing line: ~ level.enemies.reject! { |e| e.damage > e.hp }~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + level.enemies.reject! { |e| e.damage > e.hp } +** Processing line: ~ level.spawn_locations.reject! { |s| s.damage > s.hp }~ - Inside source: true *** True Line Result - -** Processing line: ~ $game = OneBitLowrezPaint.new~ + level.spawn_locations.reject! { |s| s.damage > s.hp } +** Processing line: ~ end~ - Inside source: true *** True Line Result - $game = OneBitLowrezPaint.new + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def tick args~ +** Processing line: ~ def calc_enemies~ - Inside source: true *** True Line Result - def tick args -** Processing line: ~ $game.args = args~ + def calc_enemies +** Processing line: ~ level.enemies.map! do |e|~ - Inside source: true *** True Line Result - $game.args = args -** Processing line: ~ $game.tick~ + level.enemies.map! do |e| +** Processing line: ~ dx = 0~ - Inside source: true *** True Line Result - $game.tick -** Processing line: ~ end~ + dx = 0 +** Processing line: ~ dx = 1 if e.x < player.x~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + dx = 1 if e.x < player.x +** Processing line: ~ dx = -1 if e.x > player.x~ - Inside source: true *** True Line Result - -** Processing line: ~ # $gtk.reset~ + dx = -1 if e.x > player.x +** Processing line: ~ dy = 0~ - Inside source: true *** True Line Result - # $gtk.reset -** Processing line: ~~ + dy = 0 +** Processing line: ~ dy = 1 if e.y < player.y~ - Inside source: true *** True Line Result - -** Processing line: ~#+end_src~ -- Line was identified as the end of a code block. -*** True Line Result -#+end_src -** Processing line: ~~ -- End of paragraph detected. -*** True Line Result - -** Processing line: ~*** Dev Tools - Tile Editor Starting Point - main.rb~ -- Header detected. -*** True Line Result - -*** True Line Result -*** Dev Tools - Tile Editor Starting Point - main.rb -** Processing line: ~#+begin_src ruby~ -- Line was identified as the beginning of a code block. + dy = 1 if e.y < player.y +** Processing line: ~ dy = -1 if e.y > player.y~ +- Inside source: true *** True Line Result - + dy = -1 if e.y > player.y +** Processing line: ~ future_e = future_entity_position dx, dy, e~ +- Inside source: true *** True Line Result -#+begin_src ruby -** Processing line: ~ # ./samples/99_genre_dev_tools/tile_editor_starting_point/app/main.rb~ + future_e = future_entity_position dx, dy, e +** Processing line: ~ future_e_collision = future_collision e, future_e, level.enemies + level.walls~ - Inside source: true *** True Line Result - # ./samples/99_genre_dev_tools/tile_editor_starting_point/app/main.rb -** Processing line: ~ =begin~ + future_e_collision = future_collision e, future_e, level.enemies + level.walls +** Processing line: ~ e.next_x = e.x~ - Inside source: true *** True Line Result - =begin -** Processing line: ~~ + e.next_x = e.x +** Processing line: ~ e.next_y = e.y~ - Inside source: true *** True Line Result - -** Processing line: ~ APIs listing that haven't been encountered in previous sample apps:~ + e.next_y = e.y +** Processing line: ~ e.next_x = future_e_collision.x if !future_e_collision.dx_collision~ - Inside source: true *** True Line Result - APIs listing that haven't been encountered in previous sample apps: -** Processing line: ~~ + e.next_x = future_e_collision.x if !future_e_collision.dx_collision +** Processing line: ~ e.next_y = future_e_collision.y if !future_e_collision.dy_collision~ - Inside source: true *** True Line Result - -** Processing line: ~ - to_s: Returns a string representation of an object.~ + e.next_y = future_e_collision.y if !future_e_collision.dy_collision +** Processing line: ~ e~ - Inside source: true *** True Line Result - - to_s: Returns a string representation of an object. -** Processing line: ~ For example, if we had~ + e +** Processing line: ~ end~ - Inside source: true *** True Line Result - For example, if we had -** Processing line: ~ 500.to_s~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - 500.to_s -** Processing line: ~ the string "500" would be returned.~ + +** Processing line: ~ level.enemies.map! do |e|~ - Inside source: true *** True Line Result - the string "500" would be returned. -** Processing line: ~ Similar to to_i, which returns an integer representation of an object.~ + level.enemies.map! do |e| +** Processing line: ~ e.x = e.next_x~ - Inside source: true *** True Line Result - Similar to to_i, which returns an integer representation of an object. -** Processing line: ~~ + e.x = e.next_x +** Processing line: ~ e.y = e.next_y~ - Inside source: true *** True Line Result - -** Processing line: ~ - Ceil: Returns an integer number greater than or equal to the original~ + e.y = e.next_y +** Processing line: ~ e~ - Inside source: true *** True Line Result - - Ceil: Returns an integer number greater than or equal to the original -** Processing line: ~ with no decimal.~ + e +** Processing line: ~ end~ - Inside source: true *** True Line Result - with no decimal. + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ Reminders:~ +** Processing line: ~ level.enemies.each do |e|~ - Inside source: true *** True Line Result - Reminders: -** Processing line: ~~ + level.enemies.each do |e| +** Processing line: ~ player.damage += 1 if e.intersect_rect? player~ - Inside source: true *** True Line Result - -** Processing line: ~ - ARRAY#inside_rect?: Returns true or false depending on if the point is inside a rect.~ + player.damage += 1 if e.intersect_rect? player +** Processing line: ~ end~ - Inside source: true *** True Line Result - - ARRAY#inside_rect?: Returns true or false depending on if the point is inside a rect. + end +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ - args.outputs.labels: An array. The values generate a label.~ +** Processing line: ~ def calc_spawn_locations~ - Inside source: true *** True Line Result - - args.outputs.labels: An array. The values generate a label. -** Processing line: ~ The parameters are [X, Y, TEXT, SIZE, ALIGNMENT, RED, GREEN, BLUE, ALPHA, FONT STYLE]~ + def calc_spawn_locations +** Processing line: ~ level.spawn_locations.map! do |s|~ - Inside source: true *** True Line Result - The parameters are [X, Y, TEXT, SIZE, ALIGNMENT, RED, GREEN, BLUE, ALPHA, FONT STYLE] -** Processing line: ~ For more information about labels, go to mygame/documentation/02-labels.md.~ + level.spawn_locations.map! do |s| +** Processing line: ~ s.merge(countdown: s.countdown - 1)~ - Inside source: true *** True Line Result - For more information about labels, go to mygame/documentation/02-labels.md. -** Processing line: ~~ + s.merge(countdown: s.countdown - 1) +** Processing line: ~ end~ - Inside source: true *** True Line Result - -** Processing line: ~ - args.outputs.sprites: An array. The values generate a sprite.~ + end +** Processing line: ~ level.spawn_locations~ - Inside source: true *** True Line Result - - args.outputs.sprites: An array. The values generate a sprite. -** Processing line: ~ The parameters are [X, Y, WIDTH, HEIGHT, IMAGE PATH]~ + level.spawn_locations +** Processing line: ~ .find_all { |s| s.countdown.neg? }~ - Inside source: true *** True Line Result - The parameters are [X, Y, WIDTH, HEIGHT, IMAGE PATH] -** Processing line: ~ For more information about sprites, go to mygame/documentation/05-sprites.md.~ + .find_all { |s| s.countdown.neg? } +** Processing line: ~ .each do |s|~ - Inside source: true *** True Line Result - For more information about sprites, go to mygame/documentation/05-sprites.md. -** Processing line: ~~ + .each do |s| +** Processing line: ~ s.countdown = s.rate~ - Inside source: true *** True Line Result - -** Processing line: ~ - args.outputs.solids: An array. The values generate a solid.~ + s.countdown = s.rate +** Processing line: ~ s.merge(countdown: s.rate)~ - Inside source: true *** True Line Result - - args.outputs.solids: An array. The values generate a solid. -** Processing line: ~ The parameters are [X, Y, WIDTH, HEIGHT, RED, GREEN, BLUE]~ + s.merge(countdown: s.rate) +** Processing line: ~ new_enemy = create_enemy s~ - Inside source: true *** True Line Result - The parameters are [X, Y, WIDTH, HEIGHT, RED, GREEN, BLUE] -** Processing line: ~ For more information about solids, go to mygame/documentation/03-solids-and-borders.md.~ + new_enemy = create_enemy s +** Processing line: ~ if !(level.enemies.find { |e| e.intersect_rect? new_enemy })~ - Inside source: true *** True Line Result - For more information about solids, go to mygame/documentation/03-solids-and-borders.md. -** Processing line: ~~ + if !(level.enemies.find { |e| e.intersect_rect? new_enemy }) +** Processing line: ~ level.enemies << new_enemy~ - Inside source: true *** True Line Result - -** Processing line: ~ - args.outputs.lines: An array. The values generate a line.~ + level.enemies << new_enemy +** Processing line: ~ end~ - Inside source: true *** True Line Result - - args.outputs.lines: An array. The values generate a line. -** Processing line: ~ The parameters are [X1, Y1, X2, Y2, RED, GREEN, BLUE]~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - The parameters are [X1, Y1, X2, Y2, RED, GREEN, BLUE] -** Processing line: ~ For more information about lines, go to mygame/documentation/04-lines.md.~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - For more information about lines, go to mygame/documentation/04-lines.md. + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ - args.state.new_entity: Used when we want to create a new object, like a sprite or button.~ +** Processing line: ~ def create_enemy spawn_location~ - Inside source: true *** True Line Result - - args.state.new_entity: Used when we want to create a new object, like a sprite or button. -** Processing line: ~ In this sample app, new_entity is used to create a new button that clears the grid.~ + def create_enemy spawn_location +** Processing line: ~ to_cell(spawn_location.ordinal_x, spawn_location.ordinal_y).merge hp: 2~ - Inside source: true *** True Line Result - In this sample app, new_entity is used to create a new button that clears the grid. -** Processing line: ~ (Remember, you can use state to define ANY property and it will be retained across frames.)~ + to_cell(spawn_location.ordinal_x, spawn_location.ordinal_y).merge hp: 2 +** Processing line: ~ end~ - Inside source: true *** True Line Result - (Remember, you can use state to define ANY property and it will be retained across frames.) + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ =end~ +** Processing line: ~ def create_level level_template~ - Inside source: true *** True Line Result - =end -** Processing line: ~~ + def create_level level_template +** Processing line: ~ {~ - Inside source: true *** True Line Result - -** Processing line: ~ # This sample app shows an empty grid that the user can paint in. There are different image tiles that~ + { +** Processing line: ~ walls: level_template.walls.map { |w| to_cell(w.ordinal_x, w.ordinal_y).merge(w) },~ - Inside source: true *** True Line Result - # This sample app shows an empty grid that the user can paint in. There are different image tiles that -** Processing line: ~ # the user can use to fill the grid, and the "Clear" button can be pressed to clear the grid boxes.~ + walls: level_template.walls.map { |w| to_cell(w.ordinal_x, w.ordinal_y).merge(w) }, +** Processing line: ~ enemies: [],~ - Inside source: true *** True Line Result - # the user can use to fill the grid, and the "Clear" button can be pressed to clear the grid boxes. -** Processing line: ~~ + enemies: [], +** Processing line: ~ spawn_locations: level_template.spawn_locations.map { |s| to_cell(s.ordinal_x, s.ordinal_y).merge(s) }~ - Inside source: true *** True Line Result - -** Processing line: ~ class TileEditor~ + spawn_locations: level_template.spawn_locations.map { |s| to_cell(s.ordinal_x, s.ordinal_y).merge(s) } +** Processing line: ~ }~ - Inside source: true *** True Line Result - class TileEditor -** Processing line: ~ attr_accessor :inputs, :state, :outputs, :grid, :args~ + } +** Processing line: ~ end~ - Inside source: true *** True Line Result - attr_accessor :inputs, :state, :outputs, :grid, :args + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Runs all the methods necessary for the game to function properly.~ +** Processing line: ~ def level_one_template~ - Inside source: true *** True Line Result - # Runs all the methods necessary for the game to function properly. -** Processing line: ~ def tick~ + def level_one_template +** Processing line: ~ {~ - Inside source: true *** True Line Result - def tick -** Processing line: ~ defaults~ + { +** Processing line: ~ walls: [{ ordinal_x: 25, ordinal_y: 20},~ - Inside source: true *** True Line Result - defaults -** Processing line: ~ render~ + walls: [{ ordinal_x: 25, ordinal_y: 20}, +** Processing line: ~ { ordinal_x: 25, ordinal_y: 21},~ - Inside source: true *** True Line Result - render -** Processing line: ~ check_click~ + { ordinal_x: 25, ordinal_y: 21}, +** Processing line: ~ { ordinal_x: 25, ordinal_y: 22},~ - Inside source: true *** True Line Result - check_click -** Processing line: ~ draw_buttons~ + { ordinal_x: 25, ordinal_y: 22}, +** Processing line: ~ { ordinal_x: 25, ordinal_y: 23}],~ - Inside source: true *** True Line Result - draw_buttons -** Processing line: ~ end~ + { ordinal_x: 25, ordinal_y: 23}], +** Processing line: ~ spawn_locations: [{ ordinal_x: 10, ordinal_y: 10, rate: 120, countdown: 0, hp: 5 }]~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + spawn_locations: [{ ordinal_x: 10, ordinal_y: 10, rate: 120, countdown: 0, hp: 5 }] +** Processing line: ~ }~ - Inside source: true *** True Line Result - -** Processing line: ~ # Sets default values~ + } +** Processing line: ~ end~ - Inside source: true *** True Line Result - # Sets default values -** Processing line: ~ # Initialization only happens in the first frame~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - # Initialization only happens in the first frame -** Processing line: ~ # NOTE: The values of some of these variables may seem confusingly large at first.~ + +** Processing line: ~ def player~ - Inside source: true *** True Line Result - # NOTE: The values of some of these variables may seem confusingly large at first. -** Processing line: ~ # The gridSize is 1600 but it seems a lot smaller on the screen, for example.~ + def player +** Processing line: ~ state.player ||= {}~ - Inside source: true *** True Line Result - # The gridSize is 1600 but it seems a lot smaller on the screen, for example. -** Processing line: ~ # But keep in mind that by using the "W", "A", "S", and "D" keys, you can~ + state.player ||= {} +** Processing line: ~ end~ - Inside source: true *** True Line Result - # But keep in mind that by using the "W", "A", "S", and "D" keys, you can -** Processing line: ~ # move the grid's view in all four directions for more grid spaces.~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - # move the grid's view in all four directions for more grid spaces. -** Processing line: ~ def defaults~ + +** Processing line: ~ def level~ - Inside source: true *** True Line Result - def defaults -** Processing line: ~ state.tileCords ||= []~ + def level +** Processing line: ~ state.level ||= {}~ - Inside source: true *** True Line Result - state.tileCords ||= [] -** Processing line: ~ state.tileQuantity ||= 6~ + state.level ||= {} +** Processing line: ~ end~ - Inside source: true *** True Line Result - state.tileQuantity ||= 6 -** Processing line: ~ state.tileSize ||= 50~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - state.tileSize ||= 50 -** Processing line: ~ state.tileSelected ||= 1~ + +** Processing line: ~ def future_collision entity, future_entity, others~ - Inside source: true *** True Line Result - state.tileSelected ||= 1 -** Processing line: ~ state.tempX ||= 50~ + def future_collision entity, future_entity, others +** Processing line: ~ dx_collision = others.find { |o| o != entity && (o.intersect_rect? future_entity.dx) }~ - Inside source: true *** True Line Result - state.tempX ||= 50 -** Processing line: ~ state.tempY ||= 500~ + dx_collision = others.find { |o| o != entity && (o.intersect_rect? future_entity.dx) } +** Processing line: ~ dy_collision = others.find { |o| o != entity && (o.intersect_rect? future_entity.dy) }~ - Inside source: true *** True Line Result - state.tempY ||= 500 -** Processing line: ~ state.speed ||= 4~ + dy_collision = others.find { |o| o != entity && (o.intersect_rect? future_entity.dy) } +** Processing line: ~~ - Inside source: true *** True Line Result - state.speed ||= 4 -** Processing line: ~ state.centerX ||= 4000~ + +** Processing line: ~ {~ - Inside source: true *** True Line Result - state.centerX ||= 4000 -** Processing line: ~ state.centerY ||= 4000~ + { +** Processing line: ~ dx_collision: dx_collision,~ - Inside source: true *** True Line Result - state.centerY ||= 4000 -** Processing line: ~ state.originalCenter ||= [state.centerX, state.centerY]~ + dx_collision: dx_collision, +** Processing line: ~ x: future_entity.dx.x,~ - Inside source: true *** True Line Result - state.originalCenter ||= [state.centerX, state.centerY] -** Processing line: ~ state.gridSize ||= 1600~ + x: future_entity.dx.x, +** Processing line: ~ dy_collision: dy_collision,~ - Inside source: true *** True Line Result - state.gridSize ||= 1600 -** Processing line: ~ state.lineQuantity ||= 50~ + dy_collision: dy_collision, +** Processing line: ~ y: future_entity.dy.y~ - Inside source: true *** True Line Result - state.lineQuantity ||= 50 -** Processing line: ~ state.increment ||= state.gridSize / state.lineQuantity~ + y: future_entity.dy.y +** Processing line: ~ }~ - Inside source: true *** True Line Result - state.increment ||= state.gridSize / state.lineQuantity -** Processing line: ~ state.gridX ||= []~ + } +** Processing line: ~ end~ - Inside source: true *** True Line Result - state.gridX ||= [] -** Processing line: ~ state.gridY ||= []~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - state.gridY ||= [] -** Processing line: ~ state.filled_squares ||= []~ + +** Processing line: ~ def future_entity_position dx, dy, entity~ - Inside source: true *** True Line Result - state.filled_squares ||= [] -** Processing line: ~ state.grid_border ||= [390, 140, 500, 500]~ + def future_entity_position dx, dy, entity +** Processing line: ~ {~ - Inside source: true *** True Line Result - state.grid_border ||= [390, 140, 500, 500] -** Processing line: ~~ + { +** Processing line: ~ dx: entity.merge(x: entity.x + dx),~ - Inside source: true *** True Line Result - -** Processing line: ~ get_grid unless state.tempX == 0 # calls get_grid in the first frame only~ + dx: entity.merge(x: entity.x + dx), +** Processing line: ~ dy: entity.merge(y: entity.y + dy),~ - Inside source: true *** True Line Result - get_grid unless state.tempX == 0 # calls get_grid in the first frame only -** Processing line: ~ determineTileCords unless state.tempX == 0 # calls determineTileCords in first frame~ + dy: entity.merge(y: entity.y + dy), +** Processing line: ~ both: entity.merge(x: entity.x + dx, y: entity.y + dy)~ - Inside source: true *** True Line Result - determineTileCords unless state.tempX == 0 # calls determineTileCords in first frame -** Processing line: ~ state.tempX = 0 # sets tempX to 0; the two methods aren't called again~ + both: entity.merge(x: entity.x + dx, y: entity.y + dy) +** Processing line: ~ }~ - Inside source: true *** True Line Result - state.tempX = 0 # sets tempX to 0; the two methods aren't called again + } ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -98832,622 +105719,662 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Calculates the placement of lines or separators in the grid~ +** Processing line: ~ def future_player_position dx, dy~ - Inside source: true *** True Line Result - # Calculates the placement of lines or separators in the grid -** Processing line: ~ def get_grid~ + def future_player_position dx, dy +** Processing line: ~ future_entity_position dx, dy, player~ - Inside source: true *** True Line Result - def get_grid -** Processing line: ~ curr_x = state.centerX - (state.gridSize / 2) # starts at left of grid~ + future_entity_position dx, dy, player +** Processing line: ~ end~ - Inside source: true *** True Line Result - curr_x = state.centerX - (state.gridSize / 2) # starts at left of grid -** Processing line: ~ deltaX = state.gridSize / state.lineQuantity # finds distance to place vertical lines evenly through width of grid~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - deltaX = state.gridSize / state.lineQuantity # finds distance to place vertical lines evenly through width of grid -** Processing line: ~ (state.lineQuantity + 2).times do~ + +** Processing line: ~ def to_cell ordinal_x, ordinal_y~ - Inside source: true *** True Line Result - (state.lineQuantity + 2).times do -** Processing line: ~ state.gridX << curr_x # adds curr_x to gridX collection~ + def to_cell ordinal_x, ordinal_y +** Processing line: ~ { x: ordinal_x * 16, y: ordinal_y * 16, w: 16, h: 16 }~ - Inside source: true *** True Line Result - state.gridX << curr_x # adds curr_x to gridX collection -** Processing line: ~ curr_x += deltaX # increment curr_x by the distance between vertical lines~ + { x: ordinal_x * 16, y: ordinal_y * 16, w: 16, h: 16 } +** Processing line: ~ end~ - Inside source: true *** True Line Result - curr_x += deltaX # increment curr_x by the distance between vertical lines -** Processing line: ~ end~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - end + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ curr_y = state.centerY - (state.gridSize / 2) # starts at bottom of grid~ +** Processing line: ~ def tick args~ - Inside source: true *** True Line Result - curr_y = state.centerY - (state.gridSize / 2) # starts at bottom of grid -** Processing line: ~ deltaY = state.gridSize / state.lineQuantity # finds distance to place horizontal lines evenly through height of grid~ + def tick args +** Processing line: ~ $game ||= Game.new~ - Inside source: true *** True Line Result - deltaY = state.gridSize / state.lineQuantity # finds distance to place horizontal lines evenly through height of grid -** Processing line: ~ (state.lineQuantity + 2).times do~ + $game ||= Game.new +** Processing line: ~ $game.args = args~ - Inside source: true *** True Line Result - (state.lineQuantity + 2).times do -** Processing line: ~ state.gridY << curr_y # adds curr_y to gridY collection~ + $game.args = args +** Processing line: ~ $game.tick~ - Inside source: true *** True Line Result - state.gridY << curr_y # adds curr_y to gridY collection -** Processing line: ~ curr_y += deltaY # increments curr_y to distance between horizontal lines~ + $game.tick +** Processing line: ~ end~ - Inside source: true *** True Line Result - curr_y += deltaY # increments curr_y to distance between horizontal lines -** Processing line: ~ end~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + +** Processing line: ~ $gtk.reset~ - Inside source: true *** True Line Result - end + $gtk.reset +** Processing line: ~ $game = nil~ +- Inside source: true +*** True Line Result + $game = nil ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Determines coordinate positions of patterned tiles (on the left side of the grid)~ +** Processing line: ~#+end_src~ +- Line was identified as the end of a code block. +*** True Line Result +#+end_src +** Processing line: ~~ +- End of paragraph detected. +*** True Line Result + +** Processing line: ~*** Fighting - Special Move Inputs - main.rb~ +- Header detected. +*** True Line Result + +*** True Line Result +*** Fighting - Special Move Inputs - main.rb +** Processing line: ~#+begin_src ruby~ +- Line was identified as the beginning of a code block. +*** True Line Result + +*** True Line Result +#+begin_src ruby +** Processing line: ~ # ./samples/99_genre_fighting/01_special_move_inputs/app/main.rb~ - Inside source: true *** True Line Result - # Determines coordinate positions of patterned tiles (on the left side of the grid) -** Processing line: ~ def determineTileCords~ + # ./samples/99_genre_fighting/01_special_move_inputs/app/main.rb +** Processing line: ~ def tick args~ - Inside source: true *** True Line Result - def determineTileCords -** Processing line: ~ state.tempCounter ||= 1 # initializes tempCounter to 1~ + def tick args +** Processing line: ~ #tick_instructions args, "Use LEFT and RIGHT arrow keys to move and SPACE to jump."~ - Inside source: true *** True Line Result - state.tempCounter ||= 1 # initializes tempCounter to 1 -** Processing line: ~ state.tileQuantity.times do # there are 6 different kinds of tiles~ + #tick_instructions args, "Use LEFT and RIGHT arrow keys to move and SPACE to jump." +** Processing line: ~ defaults args~ - Inside source: true *** True Line Result - state.tileQuantity.times do # there are 6 different kinds of tiles -** Processing line: ~ state.tileCords += [[state.tempX, state.tempY, state.tempCounter]] # adds tile definition to collection~ + defaults args +** Processing line: ~ render args~ - Inside source: true *** True Line Result - state.tileCords += [[state.tempX, state.tempY, state.tempCounter]] # adds tile definition to collection -** Processing line: ~ state.tempX += 75 # increments tempX to put horizontal space between the patterned tiles~ + render args +** Processing line: ~ input args~ - Inside source: true *** True Line Result - state.tempX += 75 # increments tempX to put horizontal space between the patterned tiles -** Processing line: ~ state.tempCounter += 1 # increments tempCounter~ + input args +** Processing line: ~ calc args~ - Inside source: true *** True Line Result - state.tempCounter += 1 # increments tempCounter -** Processing line: ~ if state.tempX > 200 # if tempX exceeds 200 pixels~ + calc args +** Processing line: ~ end~ - Inside source: true *** True Line Result - if state.tempX > 200 # if tempX exceeds 200 pixels -** Processing line: ~ state.tempX = 50 # a new row of patterned tiles begins~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - state.tempX = 50 # a new row of patterned tiles begins -** Processing line: ~ state.tempY -= 75 # the new row is 75 pixels lower than the previous row~ + +** Processing line: ~ # sets default values and creates empty collections~ - Inside source: true *** True Line Result - state.tempY -= 75 # the new row is 75 pixels lower than the previous row -** Processing line: ~ end~ + # sets default values and creates empty collections +** Processing line: ~ # initialization only happens in the first frame~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + # initialization only happens in the first frame +** Processing line: ~ def defaults args~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + def defaults args +** Processing line: ~ fiddle args~ - Inside source: true *** True Line Result - end + fiddle args ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Outputs objects (grid, tiles, etc) onto the screen~ +** Processing line: ~ args.state.tick_count = args.state.tick_count~ - Inside source: true *** True Line Result - # Outputs objects (grid, tiles, etc) onto the screen -** Processing line: ~ def render~ + args.state.tick_count = args.state.tick_count +** Processing line: ~ args.state.bridge_top = 128~ - Inside source: true *** True Line Result - def render -** Processing line: ~ outputs.sprites << state.tileCords.map do # outputs tileCords collection using images in sprites folder~ + args.state.bridge_top = 128 +** Processing line: ~ args.state.player.x ||= 0 # initializes player's properties~ - Inside source: true *** True Line Result - outputs.sprites << state.tileCords.map do # outputs tileCords collection using images in sprites folder -** Processing line: ~ |x, y, order|~ + args.state.player.x ||= 0 # initializes player's properties +** Processing line: ~ args.state.player.y ||= args.state.bridge_top~ - Inside source: true *** True Line Result - |x, y, order| -** Processing line: ~ [x, y, state.tileSize, state.tileSize, 'sprites/image' + order.to_s + ".png"]~ + args.state.player.y ||= args.state.bridge_top +** Processing line: ~ args.state.player.w ||= 64~ - Inside source: true *** True Line Result - [x, y, state.tileSize, state.tileSize, 'sprites/image' + order.to_s + ".png"] -** Processing line: ~ end~ + args.state.player.w ||= 64 +** Processing line: ~ args.state.player.h ||= 64~ - Inside source: true *** True Line Result - end -** Processing line: ~ outputs.solids << [0, 0, 1280, 720, 255, 255, 255] # outputs white background~ + args.state.player.h ||= 64 +** Processing line: ~ args.state.player.dy ||= 0~ - Inside source: true *** True Line Result - outputs.solids << [0, 0, 1280, 720, 255, 255, 255] # outputs white background -** Processing line: ~ add_grid # outputs grid~ + args.state.player.dy ||= 0 +** Processing line: ~ args.state.player.dx ||= 0~ - Inside source: true *** True Line Result - add_grid # outputs grid -** Processing line: ~ print_title # outputs title and current tile pattern~ + args.state.player.dx ||= 0 +** Processing line: ~ args.state.player.r ||= 0~ - Inside source: true *** True Line Result - print_title # outputs title and current tile pattern -** Processing line: ~ end~ + args.state.player.r ||= 0 +** Processing line: ~ args.state.game_over_at ||= 0~ - Inside source: true *** True Line Result - end + args.state.game_over_at ||= 0 +** Processing line: ~ args.state.animation_time ||=0~ +- Inside source: true +*** True Line Result + args.state.animation_time ||=0 ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Creates a grid by outputting vertical and horizontal grid lines onto the screen.~ +** Processing line: ~ args.state.timeleft ||=0~ - Inside source: true *** True Line Result - # Creates a grid by outputting vertical and horizontal grid lines onto the screen. -** Processing line: ~ # Outputs sprites for the filled_squares collection onto the screen.~ + args.state.timeleft ||=0 +** Processing line: ~ args.state.timeright ||=0~ - Inside source: true *** True Line Result - # Outputs sprites for the filled_squares collection onto the screen. -** Processing line: ~ def add_grid~ + args.state.timeright ||=0 +** Processing line: ~ args.state.lastpush ||=0~ - Inside source: true *** True Line Result - def add_grid + args.state.lastpush ||=0 ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Outputs the grid's border.~ -- Inside source: true -*** True Line Result - # Outputs the grid's border. -** Processing line: ~ outputs.borders << state.grid_border~ +** Processing line: ~ args.state.inputlist ||= ["j","k","l"]~ - Inside source: true *** True Line Result - outputs.borders << state.grid_border -** Processing line: ~ temp = 0~ + args.state.inputlist ||= ["j","k","l"] +** Processing line: ~ end~ - Inside source: true *** True Line Result - temp = 0 + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Before looking at the code that outputs the vertical and horizontal lines in the~ +** Processing line: ~ # sets enemy, player, hammer values~ - Inside source: true *** True Line Result - # Before looking at the code that outputs the vertical and horizontal lines in the -** Processing line: ~ # grid, take note of the fact that:~ + # sets enemy, player, hammer values +** Processing line: ~ def fiddle args~ - Inside source: true *** True Line Result - # grid, take note of the fact that: -** Processing line: ~ # grid_border[1] refers to the border's bottom line (running horizontally),~ + def fiddle args +** Processing line: ~ args.state.gravity = -0.5~ - Inside source: true *** True Line Result - # grid_border[1] refers to the border's bottom line (running horizontally), -** Processing line: ~ # grid_border[2] refers to the border's top line (running (horizontally),~ + args.state.gravity = -0.5 +** Processing line: ~ args.state.player_jump_power = 10 # sets player values~ - Inside source: true *** True Line Result - # grid_border[2] refers to the border's top line (running (horizontally), -** Processing line: ~ # grid_border[0] refers to the border's left line (running vertically),~ + args.state.player_jump_power = 10 # sets player values +** Processing line: ~ args.state.player_jump_power_duration = 5~ - Inside source: true *** True Line Result - # grid_border[0] refers to the border's left line (running vertically), -** Processing line: ~ # and grid_border[3] refers to the border's right line (running vertically).~ + args.state.player_jump_power_duration = 5 +** Processing line: ~ args.state.player_max_run_speed = 20~ - Inside source: true *** True Line Result - # and grid_border[3] refers to the border's right line (running vertically). -** Processing line: ~~ + args.state.player_max_run_speed = 20 +** Processing line: ~ args.state.player_speed_slowdown_rate = 0.9~ - Inside source: true *** True Line Result - -** Processing line: ~ # [2]~ + args.state.player_speed_slowdown_rate = 0.9 +** Processing line: ~ args.state.player_acceleration = 0.9~ - Inside source: true *** True Line Result - # [2] -** Processing line: ~ # ----------~ + args.state.player_acceleration = 0.9 +** Processing line: ~ end~ - Inside source: true *** True Line Result - # ---------- -** Processing line: ~ # | |~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - # | | -** Processing line: ~ # [0] | | [3]~ + +** Processing line: ~ # outputs objects onto the screen~ - Inside source: true *** True Line Result - # [0] | | [3] -** Processing line: ~ # | |~ + # outputs objects onto the screen +** Processing line: ~ def render args~ - Inside source: true *** True Line Result - # | | -** Processing line: ~ # ----------~ + def render args +** Processing line: ~ if (args.state.player.dx < 0.01) && (args.state.player.dx > -0.01)~ - Inside source: true *** True Line Result - # ---------- -** Processing line: ~ # [1]~ + if (args.state.player.dx < 0.01) && (args.state.player.dx > -0.01) +** Processing line: ~ args.state.player.dx = 0~ - Inside source: true *** True Line Result - # [1] -** Processing line: ~~ + args.state.player.dx = 0 +** Processing line: ~ end~ - Inside source: true *** True Line Result - -** Processing line: ~ # Calculates the positions and outputs the x grid lines in the color gray.~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - # Calculates the positions and outputs the x grid lines in the color gray. -** Processing line: ~ state.gridX.map do # perform an action on all elements of the gridX collection~ + +** Processing line: ~ #move list~ - Inside source: true *** True Line Result - state.gridX.map do # perform an action on all elements of the gridX collection -** Processing line: ~ |x|~ + #move list +** Processing line: ~ (args.layout.rect_group row: 0, col_from_right: 8, drow: 0.3,~ - Inside source: true *** True Line Result - |x| -** Processing line: ~ temp += 1 # increment temp~ + (args.layout.rect_group row: 0, col_from_right: 8, drow: 0.3, +** Processing line: ~ merge: { vertical_alignment_enum: 0, size_enum: -2 },~ - Inside source: true *** True Line Result - temp += 1 # increment temp -** Processing line: ~~ + merge: { vertical_alignment_enum: 0, size_enum: -2 }, +** Processing line: ~ group: [~ - Inside source: true *** True Line Result - -** Processing line: ~ # if x's value is greater than (or equal to) the x value of the border's left side~ + group: [ +** Processing line: ~ { text: "move: WASD" },~ - Inside source: true *** True Line Result - # if x's value is greater than (or equal to) the x value of the border's left side -** Processing line: ~ # and less than (or equal to) the x value of the border's right side~ + { text: "move: WASD" }, +** Processing line: ~ { text: "jump: Space" },~ - Inside source: true *** True Line Result - # and less than (or equal to) the x value of the border's right side -** Processing line: ~ if x >= state.centerX - (state.grid_border[2] / 2) && x <= state.centerX + (state.grid_border[2] / 2)~ + { text: "jump: Space" }, +** Processing line: ~ { text: "attack forwards: J (while on ground" },~ - Inside source: true *** True Line Result - if x >= state.centerX - (state.grid_border[2] / 2) && x <= state.centerX + (state.grid_border[2] / 2) -** Processing line: ~ delta = state.centerX - 640~ + { text: "attack forwards: J (while on ground" }, +** Processing line: ~ { text: "attack upwards: K (while on groud)" },~ - Inside source: true *** True Line Result - delta = state.centerX - 640 -** Processing line: ~ # vertical lines have the same starting and ending x positions~ + { text: "attack upwards: K (while on groud)" }, +** Processing line: ~ { text: "attack backwards: J (while on ground and holding A)" },~ - Inside source: true *** True Line Result - # vertical lines have the same starting and ending x positions -** Processing line: ~ # starting y and ending y positions lead from the bottom of the border to the top of the border~ + { text: "attack backwards: J (while on ground and holding A)" }, +** Processing line: ~ { text: "attack downwards: K (while in air)" },~ - Inside source: true *** True Line Result - # starting y and ending y positions lead from the bottom of the border to the top of the border -** Processing line: ~ outputs.lines << [x - delta, state.grid_border[1], x - delta, state.grid_border[1] + state.grid_border[2], 150, 150, 150] # sets definition of vertical line and outputs it~ + { text: "attack downwards: K (while in air)" }, +** Processing line: ~ { text: "dash attack: J, K in quick succession." },~ - Inside source: true *** True Line Result - outputs.lines << [x - delta, state.grid_border[1], x - delta, state.grid_border[1] + state.grid_border[2], 150, 150, 150] # sets definition of vertical line and outputs it -** Processing line: ~ end~ + { text: "dash attack: J, K in quick succession." }, +** Processing line: ~ { text: "shield: hold J, K at the same time." },~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + { text: "shield: hold J, K at the same time." }, +** Processing line: ~ { text: "dash backwards: A, A in quick succession." },~ - Inside source: true *** True Line Result - end -** Processing line: ~ temp = 0~ + { text: "dash backwards: A, A in quick succession." }, +** Processing line: ~ ]).into args.outputs.labels~ - Inside source: true *** True Line Result - temp = 0 + ]).into args.outputs.labels ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Calculates the positions and outputs the y grid lines in the color gray.~ -- Inside source: true -*** True Line Result - # Calculates the positions and outputs the y grid lines in the color gray. -** Processing line: ~ state.gridY.map do # perform an action on all elements of the gridY collection~ +** Processing line: ~ # registered moves~ - Inside source: true *** True Line Result - state.gridY.map do # perform an action on all elements of the gridY collection -** Processing line: ~ |y|~ + # registered moves +** Processing line: ~ args.outputs.labels << { x: 0.to_layout_col,~ - Inside source: true *** True Line Result - |y| -** Processing line: ~ temp += 1 # increment temp~ + args.outputs.labels << { x: 0.to_layout_col, +** Processing line: ~ y: 0.to_layout_row,~ - Inside source: true *** True Line Result - temp += 1 # increment temp -** Processing line: ~~ + y: 0.to_layout_row, +** Processing line: ~ text: "input history",~ - Inside source: true *** True Line Result - -** Processing line: ~ # if y's value is greater than (or equal to) the y value of the border's bottom side~ + text: "input history", +** Processing line: ~ size_enum: -2,~ - Inside source: true *** True Line Result - # if y's value is greater than (or equal to) the y value of the border's bottom side -** Processing line: ~ # and less than (or equal to) the y value of the border's top side~ + size_enum: -2, +** Processing line: ~ vertical_alignment_enum: 0 }~ - Inside source: true *** True Line Result - # and less than (or equal to) the y value of the border's top side -** Processing line: ~ if y >= state.centerY - (state.grid_border[3] / 2) && y <= state.centerY + (state.grid_border[3] / 2)~ + vertical_alignment_enum: 0 } +** Processing line: ~~ - Inside source: true *** True Line Result - if y >= state.centerY - (state.grid_border[3] / 2) && y <= state.centerY + (state.grid_border[3] / 2) -** Processing line: ~ delta = state.centerY - 393~ + +** Processing line: ~ (args.state.inputlist.take(5)).map do |s|~ - Inside source: true *** True Line Result - delta = state.centerY - 393 -** Processing line: ~ # horizontal lines have the same starting and ending y positions~ + (args.state.inputlist.take(5)).map do |s| +** Processing line: ~ { text: s, size_enum: -2, vertical_alignment_enum: 0 }~ - Inside source: true *** True Line Result - # horizontal lines have the same starting and ending y positions -** Processing line: ~ # starting x and ending x positions lead from the left side of the border to the right side of the border~ + { text: s, size_enum: -2, vertical_alignment_enum: 0 } +** Processing line: ~ end.yield_self do |group|~ - Inside source: true *** True Line Result - # starting x and ending x positions lead from the left side of the border to the right side of the border -** Processing line: ~ outputs.lines << [state.grid_border[0], y - delta, state.grid_border[0] + state.grid_border[3], y - delta, 150, 150, 150] # sets definition of horizontal line and outputs it~ + end.yield_self do |group| +** Processing line: ~ (args.layout.rect_group row: 0.3, col: 0, drow: 0.3, group: group).into args.outputs.labels~ - Inside source: true *** True Line Result - outputs.lines << [state.grid_border[0], y - delta, state.grid_border[0] + state.grid_border[3], y - delta, 150, 150, 150] # sets definition of horizontal line and outputs it -** Processing line: ~ end~ + (args.layout.rect_group row: 0.3, col: 0, drow: 0.3, group: group).into args.outputs.labels +** Processing line: ~ end~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - end + ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Sets values and outputs sprites for the filled_squares collection.~ +** Processing line: ~ #sprites~ - Inside source: true *** True Line Result - # Sets values and outputs sprites for the filled_squares collection. -** Processing line: ~ state.filled_squares.map do # perform an action on every element of the filled_squares collection~ + #sprites +** Processing line: ~ player = [args.state.player.x, args.state.player.y,~ - Inside source: true *** True Line Result - state.filled_squares.map do # perform an action on every element of the filled_squares collection -** Processing line: ~ |x, y, w, h, sprite|~ + player = [args.state.player.x, args.state.player.y, +** Processing line: ~ args.state.player.w, args.state.player.h,~ - Inside source: true *** True Line Result - |x, y, w, h, sprite| -** Processing line: ~ # if x's value is greater than (or equal to) the x value of 17 pixels to the left of the border's left side~ + args.state.player.w, args.state.player.h, +** Processing line: ~ "sprites/square/white.png",~ - Inside source: true *** True Line Result - # if x's value is greater than (or equal to) the x value of 17 pixels to the left of the border's left side -** Processing line: ~ # and less than (or equal to) the x value of the border's right side~ + "sprites/square/white.png", +** Processing line: ~ args.state.player.r]~ - Inside source: true *** True Line Result - # and less than (or equal to) the x value of the border's right side -** Processing line: ~ # and y's value is greater than (or equal to) the y value of the border's bottom side~ + args.state.player.r] +** Processing line: ~~ - Inside source: true *** True Line Result - # and y's value is greater than (or equal to) the y value of the border's bottom side -** Processing line: ~ # and less than (or equal to) the y value of 25 pixels above the border's top side~ + +** Processing line: ~ playershield = [args.state.player.x - 20, args.state.player.y - 10,~ - Inside source: true *** True Line Result - # and less than (or equal to) the y value of 25 pixels above the border's top side -** Processing line: ~ # NOTE: The allowance of 17 pixels and 25 pixels is due to the fact that a grid box may be slightly cut off or~ + playershield = [args.state.player.x - 20, args.state.player.y - 10, +** Processing line: ~ args.state.player.w + 20, args.state.player.h + 20,~ - Inside source: true *** True Line Result - # NOTE: The allowance of 17 pixels and 25 pixels is due to the fact that a grid box may be slightly cut off or -** Processing line: ~ # not entirely visible in the grid's view (until it is moved using "W", "A", "S", "D")~ + args.state.player.w + 20, args.state.player.h + 20, +** Processing line: ~ "sprites/square/blue.png",~ - Inside source: true *** True Line Result - # not entirely visible in the grid's view (until it is moved using "W", "A", "S", "D") -** Processing line: ~ if x >= state.centerX - (state.grid_border[2] / 2) - 17 && x <= state.centerX + (state.grid_border[2] / 2) &&~ + "sprites/square/blue.png", +** Processing line: ~ args.state.player.r,~ - Inside source: true *** True Line Result - if x >= state.centerX - (state.grid_border[2] / 2) - 17 && x <= state.centerX + (state.grid_border[2] / 2) && -** Processing line: ~ y >= state.centerY - (state.grid_border[3] / 2) && y <= state.centerY + (state.grid_border[3] / 2) + 25~ + args.state.player.r, +** Processing line: ~ 0]~ - Inside source: true *** True Line Result - y >= state.centerY - (state.grid_border[3] / 2) && y <= state.centerY + (state.grid_border[3] / 2) + 25 -** Processing line: ~ # calculations done to place sprites in grid spaces that are meant to filled in~ + 0] +** Processing line: ~~ - Inside source: true *** True Line Result - # calculations done to place sprites in grid spaces that are meant to filled in -** Processing line: ~ # mess around with the x and y values and see how the sprite placement changes~ + +** Processing line: ~ playerjab = [args.state.player.x + 32, args.state.player.y,~ - Inside source: true *** True Line Result - # mess around with the x and y values and see how the sprite placement changes -** Processing line: ~ outputs.sprites << [x - state.centerX + 630, y - state.centerY + 360, w, h, sprite]~ + playerjab = [args.state.player.x + 32, args.state.player.y, +** Processing line: ~ args.state.player.w, args.state.player.h,~ - Inside source: true *** True Line Result - outputs.sprites << [x - state.centerX + 630, y - state.centerY + 360, w, h, sprite] -** Processing line: ~ end~ + args.state.player.w, args.state.player.h, +** Processing line: ~ "sprites/isometric/indigo.png",~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + "sprites/isometric/indigo.png", +** Processing line: ~ args.state.player.r,~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + args.state.player.r, +** Processing line: ~ 0]~ - Inside source: true *** True Line Result - -** Processing line: ~ # outputs a white solid along the left side of the grid (change the color and you'll be able to see it against the white background)~ + 0] +** Processing line: ~~ - Inside source: true *** True Line Result - # outputs a white solid along the left side of the grid (change the color and you'll be able to see it against the white background) -** Processing line: ~ # state.increment subtracted in x parameter because solid's position is denoted by bottom left corner~ + +** Processing line: ~ playerupper = [args.state.player.x, args.state.player.y + 32,~ - Inside source: true *** True Line Result - # state.increment subtracted in x parameter because solid's position is denoted by bottom left corner -** Processing line: ~ # state.increment subtracted in y parameter to avoid covering the title label~ + playerupper = [args.state.player.x, args.state.player.y + 32, +** Processing line: ~ args.state.player.w, args.state.player.h,~ - Inside source: true *** True Line Result - # state.increment subtracted in y parameter to avoid covering the title label -** Processing line: ~ outputs.primitives << [state.grid_border[0] - state.increment,~ + args.state.player.w, args.state.player.h, +** Processing line: ~ "sprites/isometric/indigo.png",~ - Inside source: true *** True Line Result - outputs.primitives << [state.grid_border[0] - state.increment, -** Processing line: ~ state.grid_border[1] - state.increment, state.increment, state.grid_border[3] + (state.increment * 2),~ + "sprites/isometric/indigo.png", +** Processing line: ~ args.state.player.r+90,~ - Inside source: true *** True Line Result - state.grid_border[1] - state.increment, state.increment, state.grid_border[3] + (state.increment * 2), -** Processing line: ~ 255, 255, 255].solid~ + args.state.player.r+90, +** Processing line: ~ 0]~ - Inside source: true *** True Line Result - 255, 255, 255].solid + 0] ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # outputs a white solid along the right side of the grid~ +** Processing line: ~ if ((args.state.tick_count - args.state.lastpush) <= 15)~ - Inside source: true *** True Line Result - # outputs a white solid along the right side of the grid -** Processing line: ~ # state.increment subtracted from y parameter to avoid covering title label~ + if ((args.state.tick_count - args.state.lastpush) <= 15) +** Processing line: ~ if (args.state.inputlist[0] == "<<")~ - Inside source: true *** True Line Result - # state.increment subtracted from y parameter to avoid covering title label -** Processing line: ~ outputs.primitives << [state.grid_border[0] + state.grid_border[2],~ + if (args.state.inputlist[0] == "<<") +** Processing line: ~ player = [args.state.player.x, args.state.player.y,~ - Inside source: true *** True Line Result - outputs.primitives << [state.grid_border[0] + state.grid_border[2], -** Processing line: ~ state.grid_border[1] - state.increment, state.increment, state.grid_border[3] + (state.increment * 2),~ + player = [args.state.player.x, args.state.player.y, +** Processing line: ~ args.state.player.w, args.state.player.h,~ - Inside source: true *** True Line Result - state.grid_border[1] - state.increment, state.increment, state.grid_border[3] + (state.increment * 2), -** Processing line: ~ 255, 255, 255].solid~ + args.state.player.w, args.state.player.h, +** Processing line: ~ "sprites/square/yellow.png", args.state.player.r]~ - Inside source: true *** True Line Result - 255, 255, 255].solid + "sprites/square/yellow.png", args.state.player.r] +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # outputs a white solid along the bottom of the grid~ +** Processing line: ~ if (args.state.inputlist[0] == "shield")~ - Inside source: true *** True Line Result - # outputs a white solid along the bottom of the grid -** Processing line: ~ # state.increment subtracted from y parameter to avoid covering last row of grid boxes~ + if (args.state.inputlist[0] == "shield") +** Processing line: ~ player = [args.state.player.x, args.state.player.y,~ - Inside source: true *** True Line Result - # state.increment subtracted from y parameter to avoid covering last row of grid boxes -** Processing line: ~ outputs.primitives << [state.grid_border[0] - state.increment, state.grid_border[1] - state.increment,~ + player = [args.state.player.x, args.state.player.y, +** Processing line: ~ args.state.player.w, args.state.player.h,~ - Inside source: true *** True Line Result - outputs.primitives << [state.grid_border[0] - state.increment, state.grid_border[1] - state.increment, -** Processing line: ~ state.grid_border[2] + (2 * state.increment), state.increment, 255, 255, 255].solid~ + args.state.player.w, args.state.player.h, +** Processing line: ~ "sprites/square/indigo.png", args.state.player.r]~ - Inside source: true *** True Line Result - state.grid_border[2] + (2 * state.increment), state.increment, 255, 255, 255].solid + "sprites/square/indigo.png", args.state.player.r] ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # outputs a white solid along the top of the grid~ +** Processing line: ~ playershield = [args.state.player.x - 10, args.state.player.y - 10,~ - Inside source: true *** True Line Result - # outputs a white solid along the top of the grid -** Processing line: ~ outputs.primitives << [state.grid_border[0] - state.increment, state.grid_border[1] + state.grid_border[3],~ + playershield = [args.state.player.x - 10, args.state.player.y - 10, +** Processing line: ~ args.state.player.w + 20, args.state.player.h + 20,~ - Inside source: true *** True Line Result - outputs.primitives << [state.grid_border[0] - state.increment, state.grid_border[1] + state.grid_border[3], -** Processing line: ~ state.grid_border[2] + (2 * state.increment), state.increment, 255, 255, 255].solid~ + args.state.player.w + 20, args.state.player.h + 20, +** Processing line: ~ "sprites/square/blue.png", args.state.player.r, 50]~ - Inside source: true *** True Line Result - state.grid_border[2] + (2 * state.increment), state.increment, 255, 255, 255].solid + "sprites/square/blue.png", args.state.player.r, 50] +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ end~ +** Processing line: ~ if (args.state.inputlist[0] == "back-attack")~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + if (args.state.inputlist[0] == "back-attack") +** Processing line: ~ playerjab = [args.state.player.x - 20, args.state.player.y,~ - Inside source: true *** True Line Result - -** Processing line: ~ # Outputs title and current tile pattern~ + playerjab = [args.state.player.x - 20, args.state.player.y, +** Processing line: ~ args.state.player.w - 10, args.state.player.h,~ - Inside source: true *** True Line Result - # Outputs title and current tile pattern -** Processing line: ~ def print_title~ + args.state.player.w - 10, args.state.player.h, +** Processing line: ~ "sprites/isometric/indigo.png", args.state.player.r, 255]~ - Inside source: true *** True Line Result - def print_title -** Processing line: ~ outputs.labels << [640, 700, 'Mouse to Place Tile, WASD to Move Around', 7, 1] # title label~ + "sprites/isometric/indigo.png", args.state.player.r, 255] +** Processing line: ~ end~ - Inside source: true *** True Line Result - outputs.labels << [640, 700, 'Mouse to Place Tile, WASD to Move Around', 7, 1] # title label -** Processing line: ~ outputs.lines << horizontal_separator(660, 0, 1280) # outputs horizontal separator~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - outputs.lines << horizontal_separator(660, 0, 1280) # outputs horizontal separator -** Processing line: ~ outputs.labels << [1050, 500, 'Current:', 3, 1] # outputs Current label~ + +** Processing line: ~ if (args.state.inputlist[0] == "forward-attack")~ - Inside source: true *** True Line Result - outputs.labels << [1050, 500, 'Current:', 3, 1] # outputs Current label -** Processing line: ~ outputs.sprites << [1110, 474, state.tileSize / 2, state.tileSize / 2, 'sprites/image' + state.tileSelected.to_s + ".png"] # outputs sprite of current tile pattern using images in sprites folder; output is half the size of a tile~ + if (args.state.inputlist[0] == "forward-attack") +** Processing line: ~ playerjab = [args.state.player.x + 32, args.state.player.y,~ - Inside source: true *** True Line Result - outputs.sprites << [1110, 474, state.tileSize / 2, state.tileSize / 2, 'sprites/image' + state.tileSelected.to_s + ".png"] # outputs sprite of current tile pattern using images in sprites folder; output is half the size of a tile -** Processing line: ~ end~ + playerjab = [args.state.player.x + 32, args.state.player.y, +** Processing line: ~ args.state.player.w, args.state.player.h,~ - Inside source: true *** True Line Result - end + args.state.player.w, args.state.player.h, +** Processing line: ~ "sprites/isometric/indigo.png", args.state.player.r, 255]~ +- Inside source: true +*** True Line Result + "sprites/isometric/indigo.png", args.state.player.r, 255] +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Sets the starting position, ending position, and color for the horizontal separator.~ +** Processing line: ~ if (args.state.inputlist[0] == "up-attack")~ - Inside source: true *** True Line Result - # Sets the starting position, ending position, and color for the horizontal separator. -** Processing line: ~ def horizontal_separator y, x, x2~ + if (args.state.inputlist[0] == "up-attack") +** Processing line: ~ playerupper = [args.state.player.x, args.state.player.y + 32,~ - Inside source: true *** True Line Result - def horizontal_separator y, x, x2 -** Processing line: ~ [x, y, x2, y, 150, 150, 150] # definition of separator; horizontal line means same starting/ending y~ + playerupper = [args.state.player.x, args.state.player.y + 32, +** Processing line: ~ args.state.player.w, args.state.player.h,~ - Inside source: true *** True Line Result - [x, y, x2, y, 150, 150, 150] # definition of separator; horizontal line means same starting/ending y -** Processing line: ~ end~ + args.state.player.w, args.state.player.h, +** Processing line: ~ "sprites/isometric/indigo.png", args.state.player.r + 90, 255]~ - Inside source: true *** True Line Result - end + "sprites/isometric/indigo.png", args.state.player.r + 90, 255] +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Checks if the mouse is being clicked or dragged~ +** Processing line: ~ if (args.state.inputlist[0] == "dair")~ - Inside source: true *** True Line Result - # Checks if the mouse is being clicked or dragged -** Processing line: ~ def check_click~ + if (args.state.inputlist[0] == "dair") +** Processing line: ~ playerupper = [args.state.player.x, args.state.player.y - 32,~ - Inside source: true *** True Line Result - def check_click -** Processing line: ~ if inputs.keyboard.key_down.r # if the "r" key is pressed down~ + playerupper = [args.state.player.x, args.state.player.y - 32, +** Processing line: ~ args.state.player.w, args.state.player.h,~ - Inside source: true *** True Line Result - if inputs.keyboard.key_down.r # if the "r" key is pressed down -** Processing line: ~ $dragon.reset~ + args.state.player.w, args.state.player.h, +** Processing line: ~ "sprites/isometric/indigo.png", args.state.player.r + 90, 255]~ - Inside source: true *** True Line Result - $dragon.reset + "sprites/isometric/indigo.png", args.state.player.r + 90, 255] ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -99456,242 +106383,242 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ if inputs.mouse.down #is mouse up or down?~ +** Processing line: ~ if (args.state.inputlist[0] == "dash-attack")~ - Inside source: true *** True Line Result - if inputs.mouse.down #is mouse up or down? -** Processing line: ~ state.mouse_held = true~ + if (args.state.inputlist[0] == "dash-attack") +** Processing line: ~ playerupper = [args.state.player.x, args.state.player.y + 32,~ - Inside source: true *** True Line Result - state.mouse_held = true -** Processing line: ~ if inputs.mouse.position.x < state.grid_border[0] # if mouse's x position is inside the grid's borders~ + playerupper = [args.state.player.x, args.state.player.y + 32, +** Processing line: ~ args.state.player.w, args.state.player.h,~ - Inside source: true *** True Line Result - if inputs.mouse.position.x < state.grid_border[0] # if mouse's x position is inside the grid's borders -** Processing line: ~ state.tileCords.map do # perform action on all elements of tileCords collection~ + args.state.player.w, args.state.player.h, +** Processing line: ~ "sprites/isometric/violet.png", args.state.player.r + 90, 255]~ - Inside source: true *** True Line Result - state.tileCords.map do # perform action on all elements of tileCords collection -** Processing line: ~ |x, y, order|~ + "sprites/isometric/violet.png", args.state.player.r + 90, 255] +** Processing line: ~~ - Inside source: true *** True Line Result - |x, y, order| -** Processing line: ~ # if mouse's x position is greater than (or equal to) the starting x position of a tile~ + +** Processing line: ~ playerjab = [args.state.player.x + 32, args.state.player.y,~ - Inside source: true *** True Line Result - # if mouse's x position is greater than (or equal to) the starting x position of a tile -** Processing line: ~ # and the mouse's x position is also less than (or equal to) the ending x position of that tile,~ + playerjab = [args.state.player.x + 32, args.state.player.y, +** Processing line: ~ args.state.player.w, args.state.player.h,~ - Inside source: true *** True Line Result - # and the mouse's x position is also less than (or equal to) the ending x position of that tile, -** Processing line: ~ # and the mouse's y position is greater than (or equal to) the starting y position of that tile,~ + args.state.player.w, args.state.player.h, +** Processing line: ~ "sprites/isometric/violet.png", args.state.player.r, 255]~ - Inside source: true *** True Line Result - # and the mouse's y position is greater than (or equal to) the starting y position of that tile, -** Processing line: ~ # and the mouse's y position is also less than (or equal to) the ending y position of that tile,~ + "sprites/isometric/violet.png", args.state.player.r, 255] +** Processing line: ~ end~ - Inside source: true *** True Line Result - # and the mouse's y position is also less than (or equal to) the ending y position of that tile, -** Processing line: ~ # (BASICALLY, IF THE MOUSE'S POSITION IS WITHIN THE STARTING AND ENDING POSITIONS OF A TILE)~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - # (BASICALLY, IF THE MOUSE'S POSITION IS WITHIN THE STARTING AND ENDING POSITIONS OF A TILE) -** Processing line: ~ if inputs.mouse.position.x >= x && inputs.mouse.position.x <= x + state.tileSize &&~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - if inputs.mouse.position.x >= x && inputs.mouse.position.x <= x + state.tileSize && -** Processing line: ~ inputs.mouse.position.y >= y && inputs.mouse.position.y <= y + state.tileSize~ + +** Processing line: ~ args.outputs.sprites << playerjab~ - Inside source: true *** True Line Result - inputs.mouse.position.y >= y && inputs.mouse.position.y <= y + state.tileSize -** Processing line: ~ state.tileSelected = order # that tile is selected~ + args.outputs.sprites << playerjab +** Processing line: ~ args.outputs.sprites << playerupper~ - Inside source: true *** True Line Result - state.tileSelected = order # that tile is selected -** Processing line: ~ end~ + args.outputs.sprites << playerupper +** Processing line: ~ args.outputs.sprites << player~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + args.outputs.sprites << player +** Processing line: ~ args.outputs.sprites << playershield~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + args.outputs.sprites << playershield +** Processing line: ~~ - Inside source: true *** True Line Result - end -** Processing line: ~ elsif inputs.mouse.up # otherwise, if the mouse is in the "up" state~ + +** Processing line: ~ args.outputs.solids << 20.map_with_index do |i| # uses 20 squares to form bridge~ - Inside source: true *** True Line Result - elsif inputs.mouse.up # otherwise, if the mouse is in the "up" state -** Processing line: ~ state.mouse_held = false # mouse is not held down or dragged~ + args.outputs.solids << 20.map_with_index do |i| # uses 20 squares to form bridge +** Processing line: ~ [i * 64, args.state.bridge_top - 64, 64, 64]~ - Inside source: true *** True Line Result - state.mouse_held = false # mouse is not held down or dragged -** Processing line: ~ state.mouse_dragging = false~ + [i * 64, args.state.bridge_top - 64, 64, 64] +** Processing line: ~ end~ - Inside source: true *** True Line Result - state.mouse_dragging = false -** Processing line: ~ end~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - end + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ if state.mouse_held && # mouse needs to be down~ -- Inside source: true -*** True Line Result - if state.mouse_held && # mouse needs to be down -** Processing line: ~ !inputs.mouse.click && # must not be first click~ +** Processing line: ~ # Performs calculations to move objects on the screen~ - Inside source: true *** True Line Result - !inputs.mouse.click && # must not be first click -** Processing line: ~ ((inputs.mouse.previous_click.point.x - inputs.mouse.position.x).abs > 15 ||~ + # Performs calculations to move objects on the screen +** Processing line: ~ def calc args~ - Inside source: true *** True Line Result - ((inputs.mouse.previous_click.point.x - inputs.mouse.position.x).abs > 15 || -** Processing line: ~ (inputs.mouse.previous_click.point.y - inputs.mouse.position.y).abs > 15) # Need to move 15 pixels before "drag"~ + def calc args +** Processing line: ~ # Since velocity is the change in position, the change in x increases by dx. Same with y and dy.~ - Inside source: true *** True Line Result - (inputs.mouse.previous_click.point.y - inputs.mouse.position.y).abs > 15) # Need to move 15 pixels before "drag" -** Processing line: ~ state.mouse_dragging = true~ + # Since velocity is the change in position, the change in x increases by dx. Same with y and dy. +** Processing line: ~ args.state.player.x += args.state.player.dx~ - Inside source: true *** True Line Result - state.mouse_dragging = true -** Processing line: ~ end~ + args.state.player.x += args.state.player.dx +** Processing line: ~ args.state.player.y += args.state.player.dy~ - Inside source: true *** True Line Result - end + args.state.player.y += args.state.player.dy ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # if mouse is clicked inside grid's border, search_lines method is called with click input type~ -- Inside source: true -*** True Line Result - # if mouse is clicked inside grid's border, search_lines method is called with click input type -** Processing line: ~ if ((inputs.mouse.click) && (inputs.mouse.click.point.inside_rect? state.grid_border))~ +** Processing line: ~ # Since acceleration is the change in velocity, the change in y (dy) increases every frame~ - Inside source: true *** True Line Result - if ((inputs.mouse.click) && (inputs.mouse.click.point.inside_rect? state.grid_border)) -** Processing line: ~ search_lines(inputs.mouse.click.point, :click)~ + # Since acceleration is the change in velocity, the change in y (dy) increases every frame +** Processing line: ~ args.state.player.dy += args.state.gravity~ - Inside source: true *** True Line Result - search_lines(inputs.mouse.click.point, :click) + args.state.player.dy += args.state.gravity ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # if mouse is dragged inside grid's border, search_lines method is called with drag input type~ +** Processing line: ~ # player's y position is either current y position or y position of top of~ - Inside source: true *** True Line Result - # if mouse is dragged inside grid's border, search_lines method is called with drag input type -** Processing line: ~ elsif ((state.mouse_dragging) && (inputs.mouse.position.inside_rect? state.grid_border))~ + # player's y position is either current y position or y position of top of +** Processing line: ~ # bridge, whichever has a greater value~ - Inside source: true *** True Line Result - elsif ((state.mouse_dragging) && (inputs.mouse.position.inside_rect? state.grid_border)) -** Processing line: ~ search_lines(inputs.mouse.position, :drag)~ + # bridge, whichever has a greater value +** Processing line: ~ # ensures that the player never goes below the bridge~ - Inside source: true *** True Line Result - search_lines(inputs.mouse.position, :drag) -** Processing line: ~ end~ + # ensures that the player never goes below the bridge +** Processing line: ~ args.state.player.y = args.state.player.y.greater(args.state.bridge_top)~ - Inside source: true *** True Line Result - end + args.state.player.y = args.state.player.y.greater(args.state.bridge_top) ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Changes grid's position on screen by moving it up, down, left, or right.~ +** Processing line: ~ # player's x position is either the current x position or 0, whichever has a greater value~ - Inside source: true *** True Line Result - # Changes grid's position on screen by moving it up, down, left, or right. + # player's x position is either the current x position or 0, whichever has a greater value +** Processing line: ~ # ensures that the player doesn't go too far left (out of the screen's scope)~ +- Inside source: true +*** True Line Result + # ensures that the player doesn't go too far left (out of the screen's scope) +** Processing line: ~ args.state.player.x = args.state.player.x.greater(0)~ +- Inside source: true +*** True Line Result + args.state.player.x = args.state.player.x.greater(0) ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # centerX is incremented by speed if the "d" key is pressed and if that sum is less than~ +** Processing line: ~ # player is not falling if it is located on the top of the bridge~ - Inside source: true *** True Line Result - # centerX is incremented by speed if the "d" key is pressed and if that sum is less than -** Processing line: ~ # the original left side of the center plus half the grid, minus half the top border of grid.~ + # player is not falling if it is located on the top of the bridge +** Processing line: ~ args.state.player.falling = false if args.state.player.y == args.state.bridge_top~ - Inside source: true *** True Line Result - # the original left side of the center plus half the grid, minus half the top border of grid. -** Processing line: ~ # MOVES GRID RIGHT (increasing x)~ + args.state.player.falling = false if args.state.player.y == args.state.bridge_top +** Processing line: ~ #args.state.player.rect = [args.state.player.x, args.state.player.y, args.state.player.h, args.state.player.w] # sets definition for player~ - Inside source: true *** True Line Result - # MOVES GRID RIGHT (increasing x) -** Processing line: ~ state.centerX += state.speed if inputs.keyboard.key_held.d &&~ + #args.state.player.rect = [args.state.player.x, args.state.player.y, args.state.player.h, args.state.player.w] # sets definition for player +** Processing line: ~ end~ - Inside source: true *** True Line Result - state.centerX += state.speed if inputs.keyboard.key_held.d && -** Processing line: ~ (state.centerX + state.speed) < state.originalCenter[0] + (state.gridSize / 2) - (state.grid_border[2] / 2)~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - (state.centerX + state.speed) < state.originalCenter[0] + (state.gridSize / 2) - (state.grid_border[2] / 2) -** Processing line: ~ # centerX is decremented by speed if the "a" key is pressed and if that difference is greater than~ + +** Processing line: ~ # Resets the player by changing its properties back to the values they had at initialization~ - Inside source: true *** True Line Result - # centerX is decremented by speed if the "a" key is pressed and if that difference is greater than -** Processing line: ~ # the original left side of the center minus half the grid, plus half the top border of grid.~ + # Resets the player by changing its properties back to the values they had at initialization +** Processing line: ~ def reset_player args~ - Inside source: true *** True Line Result - # the original left side of the center minus half the grid, plus half the top border of grid. -** Processing line: ~ # MOVES GRID LEFT (decreasing x)~ + def reset_player args +** Processing line: ~ args.state.player.x = 0~ - Inside source: true *** True Line Result - # MOVES GRID LEFT (decreasing x) -** Processing line: ~ state.centerX -= state.speed if inputs.keyboard.key_held.a &&~ + args.state.player.x = 0 +** Processing line: ~ args.state.player.y = args.state.bridge_top~ - Inside source: true *** True Line Result - state.centerX -= state.speed if inputs.keyboard.key_held.a && -** Processing line: ~ (state.centerX - state.speed) > state.originalCenter[0] - (state.gridSize / 2) + (state.grid_border[2] / 2)~ + args.state.player.y = args.state.bridge_top +** Processing line: ~ args.state.player.dy = 0~ - Inside source: true *** True Line Result - (state.centerX - state.speed) > state.originalCenter[0] - (state.gridSize / 2) + (state.grid_border[2] / 2) -** Processing line: ~ # centerY is incremented by speed if the "w" key is pressed and if that sum is less than~ + args.state.player.dy = 0 +** Processing line: ~ args.state.player.dx = 0~ - Inside source: true *** True Line Result - # centerY is incremented by speed if the "w" key is pressed and if that sum is less than -** Processing line: ~ # the original bottom of the center plus half the grid, minus half the right border of grid.~ + args.state.player.dx = 0 +** Processing line: ~ args.state.enemy.hammers.clear # empties hammer collection~ - Inside source: true *** True Line Result - # the original bottom of the center plus half the grid, minus half the right border of grid. -** Processing line: ~ # MOVES GRID UP (increasing y)~ + args.state.enemy.hammers.clear # empties hammer collection +** Processing line: ~ args.state.enemy.hammer_queue.clear # empties hammer_queue~ - Inside source: true *** True Line Result - # MOVES GRID UP (increasing y) -** Processing line: ~ state.centerY += state.speed if inputs.keyboard.key_held.w &&~ + args.state.enemy.hammer_queue.clear # empties hammer_queue +** Processing line: ~ args.state.game_over_at = args.state.tick_count # game_over_at set to current frame (or passage of time)~ - Inside source: true *** True Line Result - state.centerY += state.speed if inputs.keyboard.key_held.w && -** Processing line: ~ (state.centerY + state.speed) < state.originalCenter[1] + (state.gridSize / 2) - (state.grid_border[3] / 2)~ + args.state.game_over_at = args.state.tick_count # game_over_at set to current frame (or passage of time) +** Processing line: ~ end~ - Inside source: true *** True Line Result - (state.centerY + state.speed) < state.originalCenter[1] + (state.gridSize / 2) - (state.grid_border[3] / 2) -** Processing line: ~ # centerY is decremented by speed if the "s" key is pressed and if the difference is greater than~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - # centerY is decremented by speed if the "s" key is pressed and if the difference is greater than -** Processing line: ~ # the original bottom of the center minus half the grid, plus half the right border of grid.~ + +** Processing line: ~ # Processes input from the user to move the player~ - Inside source: true *** True Line Result - # the original bottom of the center minus half the grid, plus half the right border of grid. -** Processing line: ~ # MOVES GRID DOWN (decreasing y)~ + # Processes input from the user to move the player +** Processing line: ~ def input args~ - Inside source: true *** True Line Result - # MOVES GRID DOWN (decreasing y) -** Processing line: ~ state.centerY -= state.speed if inputs.keyboard.key_held.s &&~ + def input args +** Processing line: ~ if args.state.inputlist.length > 5~ - Inside source: true *** True Line Result - state.centerY -= state.speed if inputs.keyboard.key_held.s && -** Processing line: ~ (state.centerY - state.speed) > state.originalCenter[1] - (state.gridSize / 2) + (state.grid_border[3] / 2)~ + if args.state.inputlist.length > 5 +** Processing line: ~ args.state.inputlist.pop~ - Inside source: true *** True Line Result - (state.centerY - state.speed) > state.originalCenter[1] - (state.gridSize / 2) + (state.grid_border[3] / 2) + args.state.inputlist.pop ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -99700,310 +106627,318 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Performs calculations on the gridX and gridY collections, and sets values.~ +** Processing line: ~ should_process_special_move = (args.inputs.keyboard.key_down.j) ||~ - Inside source: true *** True Line Result - # Performs calculations on the gridX and gridY collections, and sets values. -** Processing line: ~ # Sets the definition of a grid box, including the image that it is filled with.~ + should_process_special_move = (args.inputs.keyboard.key_down.j) || +** Processing line: ~ (args.inputs.keyboard.key_down.k) ||~ - Inside source: true *** True Line Result - # Sets the definition of a grid box, including the image that it is filled with. -** Processing line: ~ def search_lines (point, input_type)~ + (args.inputs.keyboard.key_down.k) || +** Processing line: ~ (args.inputs.keyboard.key_down.a) ||~ - Inside source: true *** True Line Result - def search_lines (point, input_type) -** Processing line: ~ point.x += state.centerX - 630 # increments x and y~ + (args.inputs.keyboard.key_down.a) || +** Processing line: ~ (args.inputs.keyboard.key_down.d) ||~ - Inside source: true *** True Line Result - point.x += state.centerX - 630 # increments x and y -** Processing line: ~ point.y += state.centerY - 360~ + (args.inputs.keyboard.key_down.d) || +** Processing line: ~ (args.inputs.controller_one.key_down.y) ||~ - Inside source: true *** True Line Result - point.y += state.centerY - 360 -** Processing line: ~ findX = 0~ + (args.inputs.controller_one.key_down.y) || +** Processing line: ~ (args.inputs.controller_one.key_down.x) ||~ - Inside source: true *** True Line Result - findX = 0 -** Processing line: ~ findY = 0~ + (args.inputs.controller_one.key_down.x) || +** Processing line: ~ (args.inputs.controller_one.key_down.left) ||~ - Inside source: true *** True Line Result - findY = 0 -** Processing line: ~ increment = state.gridSize / state.lineQuantity # divides grid by number of separators~ + (args.inputs.controller_one.key_down.left) || +** Processing line: ~ (args.inputs.controller_one.key_down.right)~ - Inside source: true *** True Line Result - increment = state.gridSize / state.lineQuantity # divides grid by number of separators + (args.inputs.controller_one.key_down.right) ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ state.gridX.map do # perform an action on every element of collection~ +** Processing line: ~ if (should_process_special_move)~ - Inside source: true *** True Line Result - state.gridX.map do # perform an action on every element of collection -** Processing line: ~ |x|~ + if (should_process_special_move) +** Processing line: ~ if (args.inputs.keyboard.key_down.j && args.inputs.keyboard.key_down.k) ||~ - Inside source: true *** True Line Result - |x| -** Processing line: ~ # findX increments x by 10 if point.x is less than that sum and findX is currently 0~ + if (args.inputs.keyboard.key_down.j && args.inputs.keyboard.key_down.k) || +** Processing line: ~ (args.inputs.controller_one.key_down.x && args.inputs.controller_one.key_down.y)~ - Inside source: true *** True Line Result - # findX increments x by 10 if point.x is less than that sum and findX is currently 0 -** Processing line: ~ findX = x + 10 if point.x < (x + 10) && findX == 0~ + (args.inputs.controller_one.key_down.x && args.inputs.controller_one.key_down.y) +** Processing line: ~ args.state.inputlist.unshift("shield")~ - Inside source: true *** True Line Result - findX = x + 10 if point.x < (x + 10) && findX == 0 -** Processing line: ~ end~ + args.state.inputlist.unshift("shield") +** Processing line: ~ elsif (args.inputs.keyboard.key_down.k || args.inputs.controller_one.key_down.y) &&~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + elsif (args.inputs.keyboard.key_down.k || args.inputs.controller_one.key_down.y) && +** Processing line: ~ (args.state.inputlist[0] == "forward-attack") && ((args.state.tick_count - args.state.lastpush) <= 15)~ - Inside source: true *** True Line Result - -** Processing line: ~ state.gridY.map do~ + (args.state.inputlist[0] == "forward-attack") && ((args.state.tick_count - args.state.lastpush) <= 15) +** Processing line: ~ args.state.inputlist.unshift("dash-attack")~ - Inside source: true *** True Line Result - state.gridY.map do -** Processing line: ~ |y|~ + args.state.inputlist.unshift("dash-attack") +** Processing line: ~ args.state.player.dx = 20~ - Inside source: true *** True Line Result - |y| -** Processing line: ~ # findY is set to y if point.y is less than that value and findY is currently 0~ + args.state.player.dx = 20 +** Processing line: ~ elsif (args.inputs.keyboard.key_down.j && args.inputs.keyboard.a) ||~ - Inside source: true *** True Line Result - # findY is set to y if point.y is less than that value and findY is currently 0 -** Processing line: ~ findY = y if point.y < (y) && findY == 0~ + elsif (args.inputs.keyboard.key_down.j && args.inputs.keyboard.a) || +** Processing line: ~ (args.inputs.controller_one.key_down.x && args.inputs.controller_one.key_down.left)~ - Inside source: true *** True Line Result - findY = y if point.y < (y) && findY == 0 -** Processing line: ~ end~ + (args.inputs.controller_one.key_down.x && args.inputs.controller_one.key_down.left) +** Processing line: ~ args.state.inputlist.unshift("back-attack")~ - Inside source: true *** True Line Result - end -** Processing line: ~ # position of a box is denoted by bottom left corner, which is why the increment is being subtracted~ + args.state.inputlist.unshift("back-attack") +** Processing line: ~ elsif ( args.inputs.controller_one.key_down.x || args.inputs.keyboard.key_down.j)~ - Inside source: true *** True Line Result - # position of a box is denoted by bottom left corner, which is why the increment is being subtracted -** Processing line: ~ grid_box = [findX - (increment.ceil), findY - (increment.ceil), increment.ceil, increment.ceil,~ + elsif ( args.inputs.controller_one.key_down.x || args.inputs.keyboard.key_down.j) +** Processing line: ~ args.state.inputlist.unshift("forward-attack")~ - Inside source: true *** True Line Result - grid_box = [findX - (increment.ceil), findY - (increment.ceil), increment.ceil, increment.ceil, -** Processing line: ~ "sprites/image" + state.tileSelected.to_s + ".png"] # sets sprite definition~ + args.state.inputlist.unshift("forward-attack") +** Processing line: ~ elsif (args.inputs.keyboard.key_down.k || args.inputs.controller_one.key_down.y) &&~ - Inside source: true *** True Line Result - "sprites/image" + state.tileSelected.to_s + ".png"] # sets sprite definition -** Processing line: ~~ + elsif (args.inputs.keyboard.key_down.k || args.inputs.controller_one.key_down.y) && +** Processing line: ~ (args.state.player.y > 128)~ - Inside source: true *** True Line Result - -** Processing line: ~ if input_type == :click # if user clicks their mouse~ + (args.state.player.y > 128) +** Processing line: ~ args.state.inputlist.unshift("dair")~ - Inside source: true *** True Line Result - if input_type == :click # if user clicks their mouse -** Processing line: ~ if state.filled_squares.include? grid_box # if grid box is already filled in~ + args.state.inputlist.unshift("dair") +** Processing line: ~ elsif (args.inputs.keyboard.key_down.k || args.inputs.controller_one.key_down.y)~ - Inside source: true *** True Line Result - if state.filled_squares.include? grid_box # if grid box is already filled in -** Processing line: ~ state.filled_squares.delete grid_box # box is cleared and removed from filled_squares~ + elsif (args.inputs.keyboard.key_down.k || args.inputs.controller_one.key_down.y) +** Processing line: ~ args.state.inputlist.unshift("up-attack")~ - Inside source: true *** True Line Result - state.filled_squares.delete grid_box # box is cleared and removed from filled_squares -** Processing line: ~ else~ + args.state.inputlist.unshift("up-attack") +** Processing line: ~ elsif (args.inputs.controller_one.key_down.left || args.inputs.keyboard.key_down.a) &&~ - Inside source: true *** True Line Result - else -** Processing line: ~ state.filled_squares << grid_box # otherwise, box is filled in and added to filled_squares~ + elsif (args.inputs.controller_one.key_down.left || args.inputs.keyboard.key_down.a) && +** Processing line: ~ (args.state.inputlist[0] == "<") &&~ - Inside source: true *** True Line Result - state.filled_squares << grid_box # otherwise, box is filled in and added to filled_squares -** Processing line: ~ end~ + (args.state.inputlist[0] == "<") && +** Processing line: ~ ((args.state.tick_count - args.state.lastpush) <= 10)~ - Inside source: true *** True Line Result - end -** Processing line: ~ elsif input_type == :drag # if user drags mouse~ + ((args.state.tick_count - args.state.lastpush) <= 10) +** Processing line: ~ args.state.inputlist.unshift("<<")~ - Inside source: true *** True Line Result - elsif input_type == :drag # if user drags mouse -** Processing line: ~ unless state.filled_squares.include? grid_box # unless grid box dragged over is already filled in~ + args.state.inputlist.unshift("<<") +** Processing line: ~ args.state.player.dx = -15~ - Inside source: true *** True Line Result - unless state.filled_squares.include? grid_box # unless grid box dragged over is already filled in -** Processing line: ~ state.filled_squares << grid_box # box is filled in and added to filled_squares~ + args.state.player.dx = -15 +** Processing line: ~ elsif (args.inputs.controller_one.key_down.left || args.inputs.keyboard.key_down.a)~ - Inside source: true *** True Line Result - state.filled_squares << grid_box # box is filled in and added to filled_squares -** Processing line: ~ end~ + elsif (args.inputs.controller_one.key_down.left || args.inputs.keyboard.key_down.a) +** Processing line: ~ args.state.inputlist.unshift("<")~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + args.state.inputlist.unshift("<") +** Processing line: ~ args.state.timeleft = args.state.tick_count~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + args.state.timeleft = args.state.tick_count +** Processing line: ~ elsif (args.inputs.controller_one.key_down.right || args.inputs.keyboard.key_down.d)~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + elsif (args.inputs.controller_one.key_down.right || args.inputs.keyboard.key_down.d) +** Processing line: ~ args.state.inputlist.unshift(">")~ - Inside source: true *** True Line Result - -** Processing line: ~ # Creates a "Clear" button using labels and borders.~ + args.state.inputlist.unshift(">") +** Processing line: ~ end~ - Inside source: true *** True Line Result - # Creates a "Clear" button using labels and borders. -** Processing line: ~ def draw_buttons~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - def draw_buttons -** Processing line: ~ x, y, w, h = 390, 50, 240, 50~ + +** Processing line: ~ args.state.lastpush = args.state.tick_count~ - Inside source: true *** True Line Result - x, y, w, h = 390, 50, 240, 50 -** Processing line: ~ state.clear_button ||= state.new_entity(:button_with_fade)~ + args.state.lastpush = args.state.tick_count +** Processing line: ~ end~ - Inside source: true *** True Line Result - state.clear_button ||= state.new_entity(:button_with_fade) + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # x and y positions are set to display "Clear" label in center of the button~ -- Inside source: true -*** True Line Result - # x and y positions are set to display "Clear" label in center of the button -** Processing line: ~ # Try changing first two parameters to simply x, y and see what happens to the text placement~ -- Inside source: true -*** True Line Result - # Try changing first two parameters to simply x, y and see what happens to the text placement -** Processing line: ~ state.clear_button.label ||= [x + w.half, y + h.half + 10, "Clear", 0, 1]~ +** Processing line: ~ if args.inputs.keyboard.space || args.inputs.controller_one.r2 # if the user presses the space bar~ - Inside source: true *** True Line Result - state.clear_button.label ||= [x + w.half, y + h.half + 10, "Clear", 0, 1] -** Processing line: ~ state.clear_button.border ||= [x, y, w, h] # definition of button's border~ + if args.inputs.keyboard.space || args.inputs.controller_one.r2 # if the user presses the space bar +** Processing line: ~ args.state.player.jumped_at ||= args.state.tick_count # jumped_at is set to current frame~ - Inside source: true *** True Line Result - state.clear_button.border ||= [x, y, w, h] # definition of button's border + args.state.player.jumped_at ||= args.state.tick_count # jumped_at is set to current frame ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # If the mouse is clicked inside the borders of the clear button~ -- Inside source: true -*** True Line Result - # If the mouse is clicked inside the borders of the clear button -** Processing line: ~ if inputs.mouse.click && inputs.mouse.click.point.inside_rect?(state.clear_button.border)~ +** Processing line: ~ # if the time that has passed since the jump is less than the player's jump duration and~ - Inside source: true *** True Line Result - if inputs.mouse.click && inputs.mouse.click.point.inside_rect?(state.clear_button.border) -** Processing line: ~ state.clear_button.clicked_at = inputs.mouse.click.created_at # value is frame of mouse click~ + # if the time that has passed since the jump is less than the player's jump duration and +** Processing line: ~ # the player is not falling~ - Inside source: true *** True Line Result - state.clear_button.clicked_at = inputs.mouse.click.created_at # value is frame of mouse click -** Processing line: ~ state.filled_squares.clear # filled squares collection is emptied (squares are cleared)~ + # the player is not falling +** Processing line: ~ if args.state.player.jumped_at.elapsed_time < args.state.player_jump_power_duration && !args.state.player.falling~ - Inside source: true *** True Line Result - state.filled_squares.clear # filled squares collection is emptied (squares are cleared) -** Processing line: ~ inputs.mouse.previous_click = nil # no previous click~ + if args.state.player.jumped_at.elapsed_time < args.state.player_jump_power_duration && !args.state.player.falling +** Processing line: ~ args.state.player.dy = args.state.player_jump_power # change in y is set to power of player's jump~ - Inside source: true *** True Line Result - inputs.mouse.previous_click = nil # no previous click + args.state.player.dy = args.state.player_jump_power # change in y is set to power of player's jump ** Processing line: ~ end~ - Inside source: true *** True Line Result end +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ outputs.labels << state.clear_button.label # outputs clear button~ +** Processing line: ~ # if the space bar is in the "up" state (or not being pressed down)~ - Inside source: true *** True Line Result - outputs.labels << state.clear_button.label # outputs clear button -** Processing line: ~ outputs.borders << state.clear_button.border~ + # if the space bar is in the "up" state (or not being pressed down) +** Processing line: ~ if args.inputs.keyboard.key_up.space || args.inputs.controller_one.key_up.r2~ - Inside source: true *** True Line Result - outputs.borders << state.clear_button.border + if args.inputs.keyboard.key_up.space || args.inputs.controller_one.key_up.r2 +** Processing line: ~ args.state.player.jumped_at = nil # jumped_at is empty~ +- Inside source: true +*** True Line Result + args.state.player.jumped_at = nil # jumped_at is empty +** Processing line: ~ args.state.player.falling = true # the player is falling~ +- Inside source: true +*** True Line Result + args.state.player.falling = true # the player is falling +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # When the clear button is clicked, the color of the button changes~ +** Processing line: ~ if args.inputs.left # if left key is pressed~ - Inside source: true *** True Line Result - # When the clear button is clicked, the color of the button changes -** Processing line: ~ # and the transparency changes, as well. If you change the time from~ + if args.inputs.left # if left key is pressed +** Processing line: ~ if args.state.player.dx < -5~ - Inside source: true *** True Line Result - # and the transparency changes, as well. If you change the time from -** Processing line: ~ # 0.25.seconds to 1.25.seconds or more, the change will last longer.~ + if args.state.player.dx < -5 +** Processing line: ~ args.state.player.dx = args.state.player.dx~ - Inside source: true *** True Line Result - # 0.25.seconds to 1.25.seconds or more, the change will last longer. -** Processing line: ~ if state.clear_button.clicked_at~ + args.state.player.dx = args.state.player.dx +** Processing line: ~ else~ - Inside source: true *** True Line Result - if state.clear_button.clicked_at -** Processing line: ~ outputs.solids << [x, y, w, h, 0, 180, 80, 255 * state.clear_button.clicked_at.ease(0.25.seconds, :flip)]~ + else +** Processing line: ~ args.state.player.dx = -5~ - Inside source: true *** True Line Result - outputs.solids << [x, y, w, h, 0, 180, 80, 255 * state.clear_button.clicked_at.ease(0.25.seconds, :flip)] + args.state.player.dx = -5 ** Processing line: ~ end~ - Inside source: true *** True Line Result end -** Processing line: ~ end~ +** Processing line: ~~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + +** Processing line: ~ elsif args.inputs.right # if right key is pressed~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + elsif args.inputs.right # if right key is pressed +** Processing line: ~ if args.state.player.dx > 5~ - Inside source: true *** True Line Result - -** Processing line: ~ $tile_editor = TileEditor.new~ + if args.state.player.dx > 5 +** Processing line: ~ args.state.player.dx = args.state.player.dx~ - Inside source: true *** True Line Result - $tile_editor = TileEditor.new -** Processing line: ~~ + args.state.player.dx = args.state.player.dx +** Processing line: ~ else~ - Inside source: true *** True Line Result - -** Processing line: ~ def tick args~ + else +** Processing line: ~ args.state.player.dx = 5~ - Inside source: true *** True Line Result - def tick args -** Processing line: ~ $tile_editor.inputs = args.inputs~ + args.state.player.dx = 5 +** Processing line: ~ end~ - Inside source: true *** True Line Result - $tile_editor.inputs = args.inputs -** Processing line: ~ $tile_editor.grid = args.grid~ + end +** Processing line: ~ else~ - Inside source: true *** True Line Result - $tile_editor.grid = args.grid -** Processing line: ~ $tile_editor.args = args~ + else +** Processing line: ~ args.state.player.dx *= args.state.player_speed_slowdown_rate # dx is scaled down~ - Inside source: true *** True Line Result - $tile_editor.args = args -** Processing line: ~ $tile_editor.outputs = args.outputs~ + args.state.player.dx *= args.state.player_speed_slowdown_rate # dx is scaled down +** Processing line: ~ end~ - Inside source: true *** True Line Result - $tile_editor.outputs = args.outputs -** Processing line: ~ $tile_editor.state = args.state~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - $tile_editor.state = args.state -** Processing line: ~ $tile_editor.tick~ + +** Processing line: ~ if ((args.state.player.dx).abs > 5) #&& ((args.state.tick_count - args.state.lastpush) <= 10)~ - Inside source: true *** True Line Result - $tile_editor.tick -** Processing line: ~ tick_instructions args, "Roll your own tile editor. CLICK to select a sprite. CLICK in grid to place sprite. WASD to move around."~ + if ((args.state.player.dx).abs > 5) #&& ((args.state.tick_count - args.state.lastpush) <= 10) +** Processing line: ~ args.state.player.dx *= 0.95~ - Inside source: true *** True Line Result - tick_instructions args, "Roll your own tile editor. CLICK to select a sprite. CLICK in grid to place sprite. WASD to move around." + args.state.player.dx *= 0.95 +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -100032,6 +106967,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result args.inputs.keyboard.key_down.enter || +** Processing line: ~ args.inputs.keyboard.key_down.space ||~ +- Inside source: true +*** True Line Result + args.inputs.keyboard.key_down.space || ** Processing line: ~ args.inputs.keyboard.key_down.escape~ - Inside source: true *** True Line Result @@ -102520,10 +109459,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result r: 255, g: 255, b: 255 -** Processing line: ~ }.label~ +** Processing line: ~ }.label!~ - Inside source: true *** True Line Result - }.label + }.label! ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -102560,10 +109499,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result r: 255, g: 255, b: 255 -** Processing line: ~ }.label~ +** Processing line: ~ }.label!~ - Inside source: true *** True Line Result - }.label + }.label! ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -103572,10 +110511,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result a: 100 -** Processing line: ~ }.line~ +** Processing line: ~ }.line!~ - Inside source: true *** True Line Result - }.line + }.line! ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -103624,10 +110563,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result a: 100 -** Processing line: ~ }.line~ +** Processing line: ~ }.line!~ - Inside source: true *** True Line Result - }.line + }.line! ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -106640,10 +113579,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result a: 80 -** Processing line: ~ }.line~ +** Processing line: ~ }.line!~ - Inside source: true *** True Line Result - }.line + }.line! ** Processing line: ~~ - Inside source: true *** True Line Result @@ -106684,10 +113623,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result a: 80 -** Processing line: ~ }.line~ +** Processing line: ~ }.line!~ - Inside source: true *** True Line Result - }.line + }.line! ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -106792,10 +113731,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result size_enum: -1.5 -** Processing line: ~ }.label~ +** Processing line: ~ }.label!~ - Inside source: true *** True Line Result - }.label + }.label! ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -106828,10 +113767,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result alignment_enum: 1 -** Processing line: ~ }.label~ +** Processing line: ~ }.label!~ - Inside source: true *** True Line Result - }.label + }.label! ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -140923,170 +147862,42 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result include Serialize -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ # Contains information related to input devices and input events.~ -- Inside source: true -*** True Line Result - # Contains information related to input devices and input events. -** Processing line: ~ #~ -- Inside source: true -*** True Line Result - # -** Processing line: ~ # @return [Inputs]~ -- Inside source: true -*** True Line Result - # @return [Inputs] ** Processing line: ~ attr_accessor :inputs~ - Inside source: true *** True Line Result attr_accessor :inputs -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ # Contains the means to interact with output devices such as the screen.~ -- Inside source: true -*** True Line Result - # Contains the means to interact with output devices such as the screen. -** Processing line: ~ #~ -- Inside source: true -*** True Line Result - # -** Processing line: ~ # @return [Outputs]~ -- Inside source: true -*** True Line Result - # @return [Outputs] ** Processing line: ~ attr_accessor :outputs~ - Inside source: true *** True Line Result attr_accessor :outputs -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ # Contains the means to interact with the audio mixer.~ -- Inside source: true -*** True Line Result - # Contains the means to interact with the audio mixer. -** Processing line: ~ #~ -- Inside source: true -*** True Line Result - # -** Processing line: ~ # @return [Hash]~ -- Inside source: true -*** True Line Result - # @return [Hash] ** Processing line: ~ attr_accessor :audio~ - Inside source: true *** True Line Result attr_accessor :audio -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ # Contains display size information to assist in positioning things on the screen.~ -- Inside source: true -*** True Line Result - # Contains display size information to assist in positioning things on the screen. -** Processing line: ~ #~ -- Inside source: true -*** True Line Result - # -** Processing line: ~ # @return [Grid]~ -- Inside source: true -*** True Line Result - # @return [Grid] ** Processing line: ~ attr_accessor :grid~ - Inside source: true *** True Line Result attr_accessor :grid -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ # Provides access to game play recording facilities within Game Toolkit.~ -- Inside source: true -*** True Line Result - # Provides access to game play recording facilities within Game Toolkit. -** Processing line: ~ #~ -- Inside source: true -*** True Line Result - # -** Processing line: ~ # @return [Recording]~ -- Inside source: true -*** True Line Result - # @return [Recording] ** Processing line: ~ attr_accessor :recording~ - Inside source: true *** True Line Result attr_accessor :recording -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ # Gives you access to geometry related functions.~ -- Inside source: true -*** True Line Result - # Gives you access to geometry related functions. -** Processing line: ~ #~ -- Inside source: true -*** True Line Result - # -** Processing line: ~ # @return [Geometry]~ -- Inside source: true -*** True Line Result - # @return [Geometry] ** Processing line: ~ attr_accessor :geometry~ - Inside source: true *** True Line Result attr_accessor :geometry -** Processing line: ~~ -- Inside source: true -*** True Line Result - ** Processing line: ~ attr_accessor :fn~ - Inside source: true *** True Line Result attr_accessor :fn -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ # This is where you'll put state associated with your video game.~ -- Inside source: true -*** True Line Result - # This is where you'll put state associated with your video game. -** Processing line: ~ #~ -- Inside source: true -*** True Line Result - # -** Processing line: ~ # @return [OpenEntity]~ -- Inside source: true -*** True Line Result - # @return [OpenEntity] ** Processing line: ~ attr_accessor :state~ - Inside source: true *** True Line Result attr_accessor :state -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ # Gives you access to the top level DragonRuby runtime.~ -- Inside source: true -*** True Line Result - # Gives you access to the top level DragonRuby runtime. -** Processing line: ~ #~ +** Processing line: ~ attr_accessor :temp_state~ - Inside source: true *** True Line Result - # -** Processing line: ~ # @return [Runtime]~ -- Inside source: true -*** True Line Result - # @return [Runtime] + attr_accessor :temp_state ** Processing line: ~ attr_accessor :runtime~ - Inside source: true *** True Line Result @@ -141095,42 +147906,22 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result alias_method :gtk, :runtime -** Processing line: ~~ -- Inside source: true -*** True Line Result - ** Processing line: ~ attr_accessor :passes~ - Inside source: true *** True Line Result attr_accessor :passes -** Processing line: ~~ -- Inside source: true -*** True Line Result - ** Processing line: ~ attr_accessor :wizards~ - Inside source: true *** True Line Result attr_accessor :wizards -** Processing line: ~~ -- Inside source: true -*** True Line Result - ** Processing line: ~ attr_accessor :layout~ - Inside source: true *** True Line Result attr_accessor :layout -** Processing line: ~~ -- Inside source: true -*** True Line Result - ** Processing line: ~ attr_accessor :easing~ - Inside source: true *** True Line Result attr_accessor :easing -** Processing line: ~~ -- Inside source: true -*** True Line Result - ** Processing line: ~ attr_accessor :string~ - Inside source: true *** True Line Result @@ -141163,6 +147954,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result @state = OpenEntity.new +** Processing line: ~ @temp_state = OpenEntity.new~ +- Inside source: true +*** True Line Result + @temp_state = OpenEntity.new ** Processing line: ~ @state.tick_count = -1~ - Inside source: true *** True Line Result @@ -141279,26 +148074,30 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result { -** Processing line: ~ state: state.as_hash,~ +** Processing line: ~ state: state.as_hash,~ +- Inside source: true +*** True Line Result + state: state.as_hash, +** Processing line: ~ temp_state: temp_state.as_hash,~ - Inside source: true *** True Line Result - state: state.as_hash, -** Processing line: ~ inputs: inputs.serialize,~ + temp_state: temp_state.as_hash, +** Processing line: ~ inputs: inputs.serialize,~ - Inside source: true *** True Line Result - inputs: inputs.serialize, -** Processing line: ~ passes: passes.serialize,~ + inputs: inputs.serialize, +** Processing line: ~ passes: passes.serialize,~ - Inside source: true *** True Line Result - passes: passes.serialize, -** Processing line: ~ outputs: outputs.serialize,~ + passes: passes.serialize, +** Processing line: ~ outputs: outputs.serialize,~ - Inside source: true *** True Line Result - outputs: outputs.serialize, -** Processing line: ~ grid: grid.serialize~ + outputs: outputs.serialize, +** Processing line: ~ grid: grid.serialize~ - Inside source: true *** True Line Result - grid: grid.serialize + grid: grid.serialize ** Processing line: ~ }~ - Inside source: true *** True Line Result @@ -141963,10 +148762,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result def custom_assertion actual, expected, message = nil -** Processing line: ~ # this tell Game Toolkit that an assertion was performed (so that the test isn't marked inconclusive).~ +** Processing line: ~ # this tells Game Toolkit that an assertion was performed (so that the test isn't marked inconclusive).~ - Inside source: true *** True Line Result - # this tell Game Toolkit that an assertion was performed (so that the test isn't marked inconclusive). + # this tells Game Toolkit that an assertion was performed (so that the test isn't marked inconclusive). ** Processing line: ~ @assertion_performed = true~ - Inside source: true *** True Line Result @@ -141975,10 +148774,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # perform your custom logic here and rais an exception to denote a failure.~ +** Processing line: ~ # perform your custom logic here and raise an exception to denote a failure.~ - Inside source: true *** True Line Result - # perform your custom logic here and rais an exception to denote a failure. + # perform your custom logic here and raise an exception to denote a failure. ** Processing line: ~~ - Inside source: true *** True Line Result @@ -142015,10 +148814,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result =begin -** Processing line: ~ Us this if you are throwing your own exceptions and you want to mark the tests as ran (so that it wont be marked as inconclusive).~ +** Processing line: ~ Use this if you are throwing your own exceptions and you want to mark the tests as ran (so that it wont be marked as inconclusive).~ - Inside source: true *** True Line Result - Us this if you are throwing your own exceptions and you want to mark the tests as ran (so that it wont be marked as inconclusive). + Use this if you are throwing your own exceptions and you want to mark the tests as ran (so that it wont be marked as inconclusive). ** Processing line: ~ =end~ - Inside source: true *** True Line Result @@ -142043,10 +148842,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result =begin -** Processing line: ~ Assert if a value is a thruthy value. All assert method take an optional final parameter that is the message to display to the user.~ +** Processing line: ~ Assert if a value is a truthy value. All assert methods take an optional final parameter that is the message to display to the user.~ - Inside source: true *** True Line Result - Assert if a value is a thruthy value. All assert method take an optional final parameter that is the message to display to the user. + Assert if a value is a truthy value. All assert methods take an optional final parameter that is the message to display to the user. ** Processing line: ~~ - Inside source: true *** True Line Result @@ -142259,10 +149058,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result actual_string = "#{actual}#{actual.nil? ? " (nil) " : " " }".strip -** Processing line: ~ message = "actual:\n#{actual_string}\n\ndid not equal\n\nexpected:\n#{expected}.\n#{message}"~ +** Processing line: ~ message = "actual:\n#{actual_string}\n\ndid not equal\n\nexpected:\n#{expected}\n#{message}"~ - Inside source: true *** True Line Result - message = "actual:\n#{actual_string}\n\ndid not equal\n\nexpected:\n#{expected}.\n#{message}" + message = "actual:\n#{actual_string}\n\ndid not equal\n\nexpected:\n#{expected}\n#{message}" ** Processing line: ~ raise message~ - Inside source: true *** True Line Result @@ -142299,10 +149098,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result actual_string = "#{actual}#{actual.nil? ? " (nil) " : " " }".strip -** Processing line: ~ message = "actual:\n#{actual_string}\n\nequaled\n\nexpected:\n#{expected}.\n#{message}"~ +** Processing line: ~ message = "actual:\n#{actual_string}\n\nequaled\n\nexpected:\n#{expected}\n#{message}"~ - Inside source: true *** True Line Result - message = "actual:\n#{actual_string}\n\nequaled\n\nexpected:\n#{expected}.\n#{message}" + message = "actual:\n#{actual_string}\n\nequaled\n\nexpected:\n#{expected}\n#{message}" ** Processing line: ~ raise message~ - Inside source: true *** True Line Result @@ -142523,6 +149322,22 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result +** Processing line: ~ def temp_state~ +- Inside source: true +*** True Line Result + def temp_state +** Processing line: ~ args.temp_state~ +- Inside source: true +*** True Line Result + args.temp_state +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + ** Processing line: ~ def inputs~ - Inside source: true *** True Line Result @@ -142629,6 +149444,38 @@ Follows is a source code listing for all files that have been open sourced. This args.layout ** Processing line: ~ end~ - Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ def new_entity entity_type, init_hash = nil, &block~ +- Inside source: true +*** True Line Result + def new_entity entity_type, init_hash = nil, &block +** Processing line: ~ args.state.new_entity entity_type, init_hash, &block~ +- Inside source: true +*** True Line Result + args.state.new_entity entity_type, init_hash, &block +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ def new_entity_strict entity_type, init_hash = nil, &block~ +- Inside source: true +*** True Line Result + def new_entity_strict entity_type, init_hash = nil, &block +** Processing line: ~ args.state.new_entity_strict entity_type, init_hash, &block~ +- Inside source: true +*** True Line Result + args.state.new_entity_strict entity_type, init_hash, &block +** Processing line: ~ end~ +- Inside source: true *** True Line Result end ** Processing line: ~ end~ @@ -142819,10 +149666,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result :flip_vertically, :angle_anchor_x, :angle_anchor_y, :id, -** Processing line: ~ :source_x, :source_y, :source_w, :source_h~ +** Processing line: ~ :source_x, :source_y, :source_w, :source_h, :blendmode_enum~ - Inside source: true *** True Line Result - :source_x, :source_y, :source_w, :source_h + :source_x, :source_y, :source_w, :source_h, :blendmode_enum ** Processing line: ~~ - Inside source: true *** True Line Result @@ -143003,10 +149850,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result def initialize -** Processing line: ~ @font_style = FontStyle.new(font: 'font.ttf', size_enum: -1, line_height: 1.1)~ +** Processing line: ~ @font_style = FontStyle.new(font: 'font.ttf', size_enum: -1.5, line_height: 1.1)~ - Inside source: true *** True Line Result - @font_style = FontStyle.new(font: 'font.ttf', size_enum: -1, line_height: 1.1) + @font_style = FontStyle.new(font: 'font.ttf', size_enum: -1.5, line_height: 1.1) ** Processing line: ~ @menu = Menu.new self~ - Inside source: true *** True Line Result @@ -143083,6 +149930,14 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result @header_color = Color.new [100, 200, 220] +** Processing line: ~ @code_color = Color.new [210, 168, 255]~ +- Inside source: true +*** True Line Result + @code_color = Color.new [210, 168, 255] +** Processing line: ~ @comment_color = Color.new [0, 200, 100]~ +- Inside source: true +*** True Line Result + @comment_color = Color.new [0, 200, 100] ** Processing line: ~ @animation_duration = 1.seconds~ - Inside source: true *** True Line Result @@ -144179,6 +151034,14 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result $gtk.request_quit +** Processing line: ~ elsif cmd.start_with? ':'~ +- Inside source: true +*** True Line Result + elsif cmd.start_with? ':' +** Processing line: ~ send ((cmd.gsub '-', '_').gsub ':', '')~ +- Inside source: true +*** True Line Result + send ((cmd.gsub '-', '_').gsub ':', '') ** Processing line: ~ else~ - Inside source: true *** True Line Result @@ -144211,6 +151074,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result elsif $results == :console_silent_eval +** Processing line: ~ # do nothing since the console is silent~ +- Inside source: true +*** True Line Result + # do nothing since the console is silent ** Processing line: ~ else~ - Inside source: true *** True Line Result @@ -144235,10 +151102,30 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result try_search_docs e -** Processing line: ~ puts "* EXCEPTION: #{e}"~ +** Processing line: ~ # if an exception is thrown and the bactrace includes something helpful, then show it~ +- Inside source: true +*** True Line Result + # if an exception is thrown and the bactrace includes something helpful, then show it +** Processing line: ~ if (e.backtrace || []).first && (e.backtrace.first.include? "(eval)")~ +- Inside source: true +*** True Line Result + if (e.backtrace || []).first && (e.backtrace.first.include? "(eval)") +** Processing line: ~ puts "* EXCEPTION: #{e}"~ +- Inside source: true +*** True Line Result + puts "* EXCEPTION: #{e}" +** Processing line: ~ else~ +- Inside source: true +*** True Line Result + else +** Processing line: ~ puts "* EXCEPTION: #{e}\n#{e.__backtrace_to_org__}"~ +- Inside source: true +*** True Line Result + puts "* EXCEPTION: #{e}\n#{e.__backtrace_to_org__}" +** Processing line: ~ end~ - Inside source: true *** True Line Result - puts "* EXCEPTION: #{e}" + end ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -145143,6 +152030,26 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result render_log_offset args +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ args.outputs.reserved << { x: 10.from_right, y: @bottom + 10,~ +- Inside source: true +*** True Line Result + args.outputs.reserved << { x: 10.from_right, y: @bottom + 10, +** Processing line: ~ text: "Press CTRL+g or ESCAPE to clear the prompt.",~ +- Inside source: true +*** True Line Result + text: "Press CTRL+g or ESCAPE to clear the prompt.", +** Processing line: ~ vertical_alignment_enum: 0,~ +- Inside source: true +*** True Line Result + vertical_alignment_enum: 0, +** Processing line: ~ alignment_enum: 2, r: 80, g: 80, b: 80 }.label!~ +- Inside source: true +*** True Line Result + alignment_enum: 2, r: 80, g: 80, b: 80 }.label! ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -145231,10 +152138,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result def include_subdued_markers? text -** Processing line: ~ include_any_words? text, subdued_markers~ +** Processing line: ~ (text.start_with? "* INFO: ") && (include_any_words? text, subdued_markers)~ - Inside source: true *** True Line Result - include_any_words? text, subdued_markers + (text.start_with? "* INFO: ") && (include_any_words? text, subdued_markers) ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -145815,14 +152722,110 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result +** Processing line: ~ def code? log_entry~ +- Inside source: true +*** True Line Result + def code? log_entry +** Processing line: ~ (just_symbol? log_entry) || (codeblock_marker? log_entry)~ +- Inside source: true +*** True Line Result + (just_symbol? log_entry) || (codeblock_marker? log_entry) +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ def just_symbol? log_entry~ +- Inside source: true +*** True Line Result + def just_symbol? log_entry +** Processing line: ~ scrubbed = log_entry.gsub("*", "").strip~ +- Inside source: true +*** True Line Result + scrubbed = log_entry.gsub("*", "").strip +** Processing line: ~ (scrubbed.start_with? ":") && (!scrubbed.include? " ") && (!scrubbed.include? "=>")~ +- Inside source: true +*** True Line Result + (scrubbed.start_with? ":") && (!scrubbed.include? " ") && (!scrubbed.include? "=>") +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ def code_comment? log_entry~ +- Inside source: true +*** True Line Result + def code_comment? log_entry +** Processing line: ~ return true if log_entry.strip.start_with?("# ")~ +- Inside source: true +*** True Line Result + return true if log_entry.strip.start_with?("# ") +** Processing line: ~ return false~ +- Inside source: true +*** True Line Result + return false +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ def codeblock_marker? log_entry~ +- Inside source: true +*** True Line Result + def codeblock_marker? log_entry +** Processing line: ~ return true if log_entry.strip.start_with?("#+begin_src")~ +- Inside source: true +*** True Line Result + return true if log_entry.strip.start_with?("#+begin_src") +** Processing line: ~ return true if log_entry.strip.start_with?("#+end_src")~ +- Inside source: true +*** True Line Result + return true if log_entry.strip.start_with?("#+end_src") +** Processing line: ~ return false~ +- Inside source: true +*** True Line Result + return false +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + ** Processing line: ~ def color_for_log_entry(log_entry)~ - Inside source: true *** True Line Result def color_for_log_entry(log_entry) -** Processing line: ~ if include_row_marker? log_entry~ +** Processing line: ~ if code? log_entry~ - Inside source: true *** True Line Result - if include_row_marker? log_entry + if code? log_entry +** Processing line: ~ @code_color~ +- Inside source: true +*** True Line Result + @code_color +** Processing line: ~ elsif code_comment? log_entry~ +- Inside source: true +*** True Line Result + elsif code_comment? log_entry +** Processing line: ~ @comment_color~ +- Inside source: true +*** True Line Result + @comment_color +** Processing line: ~ elsif include_row_marker? log_entry~ +- Inside source: true +*** True Line Result + elsif include_row_marker? log_entry ** Processing line: ~ @text_color~ - Inside source: true *** True Line Result @@ -146123,6 +153126,22 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result +** Processing line: ~ def to_s~ +- Inside source: true +*** True Line Result + def to_s +** Processing line: ~ "GTK::Console::Color #{to_h}"~ +- Inside source: true +*** True Line Result + "GTK::Console::Color #{to_h}" +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + ** Processing line: ~ def to_h~ - Inside source: true *** True Line Result @@ -146315,10 +153334,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result **color.to_h, -** Processing line: ~ }.label~ +** Processing line: ~ }.label!~ - Inside source: true *** True Line Result - }.label + }.label! ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -146575,10 +153594,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result @console.scroll_to_bottom -** Processing line: ~ $wizards.itch.start~ +** Processing line: ~ $wizards.itch.restart~ - Inside source: true *** True Line Result - $wizards.itch.start + $wizards.itch.restart ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -146675,6 +153694,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result (button id: :replay, row: 0, col: 10, text: "start replay", method: :replay_clicked), +** Processing line: ~ *custom_buttons~ +- Inside source: true +*** True Line Result + *custom_buttons ** Processing line: ~ ]~ - Inside source: true *** True Line Result @@ -146907,14 +153930,14 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result primitives = [] -** Processing line: ~ primitives << entity[:rect].merge(a: 164).solid~ +** Processing line: ~ primitives << entity[:rect].solid!(a: 164)~ - Inside source: true *** True Line Result - primitives << entity[:rect].merge(a: 164).solid -** Processing line: ~ primitives << entity[:rect].merge(r: 255, g: 255, b: 255).border~ + primitives << entity[:rect].solid!(a: 164) +** Processing line: ~ primitives << entity[:rect].border!(r: 255, g: 255, b: 255)~ - Inside source: true *** True Line Result - primitives << entity[:rect].merge(r: 255, g: 255, b: 255).border + primitives << entity[:rect].border!(r: 255, g: 255, b: 255) ** Processing line: ~ primitives << text.wrapped_lines(5)~ - Inside source: true *** True Line Result @@ -147731,10 +154754,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # remove seperators between empty values~ +** Processing line: ~ # remove separators between empty values~ - Inside source: true *** True Line Result - # remove seperators between empty values + # remove separators between empty values ** Processing line: ~ formated_row = formated_row.gsub(" | ", " ")~ - Inside source: true *** True Line Result @@ -147755,10 +154778,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def pretty_print_row_seperator string_width, cell_width, column_width, columns~ +** Processing line: ~ def pretty_print_row_separator string_width, cell_width, column_width, columns~ - Inside source: true *** True Line Result - def pretty_print_row_seperator string_width, cell_width, column_width, columns + def pretty_print_row_separator string_width, cell_width, column_width, columns ** Processing line: ~ # this is a joint: +--------~ - Inside source: true *** True Line Result @@ -147771,10 +154794,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # multiple joints create a row seperator: +----+----+~ +** Processing line: ~ # multiple joints create a row separator: +----+----+~ - Inside source: true *** True Line Result - # multiple joints create a row seperator: +----+----+ + # multiple joints create a row separator: +----+----+ ** Processing line: ~ puts (column_joint * columns) + "+"~ - Inside source: true *** True Line Result @@ -147807,10 +154830,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result x2: x + @cursor_position_px + 0.5, -** Processing line: ~ y2: y + @font_style.letter_size.y + 5)~ +** Processing line: ~ y2: y + @font_style.letter_size.y + 4)~ - Inside source: true *** True Line Result - y2: y + @font_style.letter_size.y + 5) + y2: y + @font_style.letter_size.y + 4) ** Processing line: ~~ - Inside source: true *** True Line Result @@ -147827,10 +154850,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result x2: x + @cursor_position_px + 1, -** Processing line: ~ y2: y + @font_style.letter_size.y + 5)~ +** Processing line: ~ y2: y + @font_style.letter_size.y + 4)~ - Inside source: true *** True Line Result - y2: y + @font_style.letter_size.y + 5) + y2: y + @font_style.letter_size.y + 4) ** Processing line: ~~ - Inside source: true *** True Line Result @@ -150351,10 +157374,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result :l3, :r3, -** Processing line: ~ :start, :select,~ +** Processing line: ~ :start, :select, :home,~ - Inside source: true *** True Line Result - :start, :select, + :start, :select, :home, ** Processing line: ~ :directional_up, :directional_down, :directional_left, :directional_right~ - Inside source: true *** True Line Result @@ -150383,6 +157406,70 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result +** Processing line: ~ def back~ +- Inside source: true +*** True Line Result + def back +** Processing line: ~ @select~ +- Inside source: true +*** True Line Result + @select +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ def back= value~ +- Inside source: true +*** True Line Result + def back= value +** Processing line: ~ @select = value~ +- Inside source: true +*** True Line Result + @select = value +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ def guide~ +- Inside source: true +*** True Line Result + def guide +** Processing line: ~ @home~ +- Inside source: true +*** True Line Result + @home +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ def guide= value~ +- Inside source: true +*** True Line Result + def guide= value +** Processing line: ~ @home = value~ +- Inside source: true +*** True Line Result + @home = value +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + ** Processing line: ~ # Activate a key.~ - Inside source: true *** True Line Result @@ -150579,10 +157666,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result * ERROR -** Processing line: ~ The GTK::DirectionalKeys module should only be included in objects that respond to the following api heirarchy:~ +** Processing line: ~ The GTK::DirectionalKeys module should only be included in objects that respond to the following api hierarchy:~ - Inside source: true *** True Line Result - The GTK::DirectionalKeys module should only be included in objects that respond to the following api heirarchy: + The GTK::DirectionalKeys module should only be included in objects that respond to the following api hierarchy: ** Processing line: ~~ - Inside source: true *** True Line Result @@ -150807,6 +157894,30 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result +** Processing line: ~ def directional_angle~ +- Inside source: true +*** True Line Result + def directional_angle +** Processing line: ~ return nil unless directional_vector~ +- Inside source: true +*** True Line Result + return nil unless directional_vector +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ Math.atan2(up_down, left_right).to_degrees~ +- Inside source: true +*** True Line Result + Math.atan2(up_down, left_right).to_degrees +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + ** Processing line: ~ def method_missing m, *args~ - Inside source: true *** True Line Result @@ -151747,6 +158858,70 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result module Geometry +** Processing line: ~ def self.rotate_point point, angle, around = nil~ +- Inside source: true +*** True Line Result + def self.rotate_point point, angle, around = nil +** Processing line: ~ s = Math.sin a.to_radians~ +- Inside source: true +*** True Line Result + s = Math.sin a.to_radians +** Processing line: ~ c = Math.cos a.to_radians~ +- Inside source: true +*** True Line Result + c = Math.cos a.to_radians +** Processing line: ~ px = point.x~ +- Inside source: true +*** True Line Result + px = point.x +** Processing line: ~ py = point.y~ +- Inside source: true +*** True Line Result + py = point.y +** Processing line: ~ cx = 0~ +- Inside source: true +*** True Line Result + cx = 0 +** Processing line: ~ cy = 0~ +- Inside source: true +*** True Line Result + cy = 0 +** Processing line: ~ if around~ +- Inside source: true +*** True Line Result + if around +** Processing line: ~ cx = around.x~ +- Inside source: true +*** True Line Result + cx = around.x +** Processing line: ~ cy = around.y~ +- Inside source: true +*** True Line Result + cy = around.y +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ point.merge(x: ((px - cx) * c - (py - cy) * s) + cx,~ +- Inside source: true +*** True Line Result + point.merge(x: ((px - cx) * c - (py - cy) * s) + cx, +** Processing line: ~ y: ((px - cx) * s + (py - cy) * c) + cy)~ +- Inside source: true +*** True Line Result + y: ((px - cx) * s + (py - cy) * c) + cy) +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + ** Processing line: ~ # Returns f(t) for a cubic Bezier curve.~ - Inside source: true *** True Line Result @@ -152071,10 +159246,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result * ERROR: -** Processing line: ~ center_inside_rect for self #{self} and other_rect #{other_rect}. Failed with exception #{e}.~ +** Processing line: ~ center_inside_rect for self #{self} and other_rect #{other_rect}.\n#{e}.~ - Inside source: true *** True Line Result - center_inside_rect for self #{self} and other_rect #{other_rect}. Failed with exception #{e}. + center_inside_rect for self #{self} and other_rect #{other_rect}.\n#{e}. ** Processing line: ~ S~ - Inside source: true *** True Line Result @@ -152139,10 +159314,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result * ERROR: -** Processing line: ~ center_inside_rect_x for self #{self} and other_rect #{other_rect}. Failed with exception #{e}.~ +** Processing line: ~ center_inside_rect_x for self #{self} and other_rect #{other_rect}.\n#{e}.~ - Inside source: true *** True Line Result - center_inside_rect_x for self #{self} and other_rect #{other_rect}. Failed with exception #{e}. + center_inside_rect_x for self #{self} and other_rect #{other_rect}.\n#{e}. ** Processing line: ~ S~ - Inside source: true *** True Line Result @@ -152207,10 +159382,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result * ERROR: -** Processing line: ~ center_inside_rect_y for self #{self} and other_rect #{other_rect}. Failed with exception #{e}.~ +** Processing line: ~ center_inside_rect_y for self #{self} and other_rect #{other_rect}.\n#{e}.~ - Inside source: true *** True Line Result - center_inside_rect_y for self #{self} and other_rect #{other_rect}. Failed with exception #{e}. + center_inside_rect_y for self #{self} and other_rect #{other_rect}.\n#{e}. ** Processing line: ~ S~ - Inside source: true *** True Line Result @@ -152243,10 +159418,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Returns a primitive that is anchored/repositioned based off its retangle.~ +** Processing line: ~ # Returns a primitive that is anchored/repositioned based off its rectangle.~ - Inside source: true *** True Line Result - # Returns a primitive that is anchored/repositioned based off its retangle. + # Returns a primitive that is anchored/repositioned based off its rectangle. ** Processing line: ~ # @gtk~ - Inside source: true *** True Line Result @@ -152787,22 +159962,22 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result def self.intersect_rect? rect_one, rect_two, tolerance = 0.1 -** Processing line: ~ return false if rect_one.right - tolerance < rect_two.left + tolerance~ +** Processing line: ~ return false if ((rect_one.x + rect_one.w) - tolerance) < (rect_two.x + tolerance)~ - Inside source: true *** True Line Result - return false if rect_one.right - tolerance < rect_two.left + tolerance -** Processing line: ~ return false if rect_one.left + tolerance > rect_two.right - tolerance~ + return false if ((rect_one.x + rect_one.w) - tolerance) < (rect_two.x + tolerance) +** Processing line: ~ return false if (rect_one.x + tolerance) > ((rect_two.x + rect_two.w) - tolerance)~ - Inside source: true *** True Line Result - return false if rect_one.left + tolerance > rect_two.right - tolerance -** Processing line: ~ return false if rect_one.top - tolerance < rect_two.bottom + tolerance~ + return false if (rect_one.x + tolerance) > ((rect_two.x + rect_two.w) - tolerance) +** Processing line: ~ return false if ((rect_one.y + rect_one.h) - tolerance) < (rect_two.y + tolerance)~ - Inside source: true *** True Line Result - return false if rect_one.top - tolerance < rect_two.bottom + tolerance -** Processing line: ~ return false if rect_one.bottom + tolerance > rect_two.top - tolerance~ + return false if ((rect_one.y + rect_one.h) - tolerance) < (rect_two.y + tolerance) +** Processing line: ~ return false if (rect_one.y + tolerance) > ((rect_two.y + rect_two.h) - tolerance)~ - Inside source: true *** True Line Result - return false if rect_one.bottom + tolerance > rect_two.top - tolerance + return false if (rect_one.y + tolerance) > ((rect_two.y + rect_two.h) - tolerance) ** Processing line: ~ return true~ - Inside source: true *** True Line Result @@ -152911,6 +160086,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result #{context_help} +** Processing line: ~ \n#{e}~ +- Inside source: true +*** True Line Result + \n#{e} ** Processing line: ~ S~ - Inside source: true *** True Line Result @@ -152951,10 +160130,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result rescue Exception => e -** Processing line: ~ raise e, ":to_square failed for size: #{size} x: #{x} y: #{y} anchor_x: #{anchor_x} anchor_y: #{anchor_y}."~ +** Processing line: ~ raise e, ":to_square failed for size: #{size} x: #{x} y: #{y} anchor_x: #{anchor_x} anchor_y: #{anchor_y}.\n#{e}"~ - Inside source: true *** True Line Result - raise e, ":to_square failed for size: #{size} x: #{x} y: #{y} anchor_x: #{anchor_x} anchor_y: #{anchor_y}." + raise e, ":to_square failed for size: #{size} x: #{x} y: #{y} anchor_x: #{anchor_x} anchor_y: #{anchor_y}.\n#{e}" ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -152979,10 +160158,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result rescue Exception => e -** Processing line: ~ raise e, ":distance failed for point_one: #{point_one} point_two #{point_two}."~ +** Processing line: ~ raise e, ":distance failed for point_one: #{point_one} point_two #{point_two}.\n#{e}"~ - Inside source: true *** True Line Result - raise e, ":distance failed for point_one: #{point_one} point_two #{point_two}." + raise e, ":distance failed for point_one: #{point_one} point_two #{point_two}.\n#{e}" ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -153015,10 +160194,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result rescue Exception => e -** Processing line: ~ raise e, ":angle_from failed for start_point: #{start_point} end_point: #{end_point}."~ +** Processing line: ~ raise e, ":angle_from failed for start_point: #{start_point} end_point: #{end_point}.\n#{e}"~ - Inside source: true *** True Line Result - raise e, ":angle_from failed for start_point: #{start_point} end_point: #{end_point}." + raise e, ":angle_from failed for start_point: #{start_point} end_point: #{end_point}.\n#{e}" ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -153043,10 +160222,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result rescue Exception => e -** Processing line: ~ raise e, ":angle_to failed for start_point: #{start_point} end_point: #{end_point}."~ +** Processing line: ~ raise e, ":angle_to failed for start_point: #{start_point} end_point: #{end_point}.\n#{e}"~ - Inside source: true *** True Line Result - raise e, ":angle_to failed for start_point: #{start_point} end_point: #{end_point}." + raise e, ":angle_to failed for start_point: #{start_point} end_point: #{end_point}.\n#{e}" ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -153071,10 +160250,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result rescue Exception => e -** Processing line: ~ raise e, ":point_inside_circle? failed for point: #{point} circle_center_point: #{circle_center_point} radius: #{radius}"~ +** Processing line: ~ raise e, ":point_inside_circle? failed for point: #{point} circle_center_point: #{circle_center_point} radius: #{radius}.\n#{e}"~ - Inside source: true *** True Line Result - raise e, ":point_inside_circle? failed for point: #{point} circle_center_point: #{circle_center_point} radius: #{radius}" + raise e, ":point_inside_circle? failed for point: #{point} circle_center_point: #{circle_center_point} radius: #{radius}.\n#{e}" ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -153091,30 +160270,42 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result def self.inside_rect? inner_rect, outer_rect, tolerance = 0.0 +** Processing line: ~ return nil if !inner_rect~ +- Inside source: true +*** True Line Result + return nil if !inner_rect +** Processing line: ~ return nil if !outer_rect~ +- Inside source: true +*** True Line Result + return nil if !outer_rect +** Processing line: ~~ +- Inside source: true +*** True Line Result + ** Processing line: ~ inner_rect.x + tolerance >= outer_rect.x - tolerance &&~ - Inside source: true *** True Line Result inner_rect.x + tolerance >= outer_rect.x - tolerance && -** Processing line: ~ inner_rect.right - tolerance <= outer_rect.right + tolerance &&~ +** Processing line: ~ (inner_rect.x + inner_rect.w) - tolerance <= (outer_rect.x + outer_rect.w) + tolerance &&~ - Inside source: true *** True Line Result - inner_rect.right - tolerance <= outer_rect.right + tolerance && + (inner_rect.x + inner_rect.w) - tolerance <= (outer_rect.x + outer_rect.w) + tolerance && ** Processing line: ~ inner_rect.y + tolerance >= outer_rect.y - tolerance &&~ - Inside source: true *** True Line Result inner_rect.y + tolerance >= outer_rect.y - tolerance && -** Processing line: ~ inner_rect.top - tolerance <= outer_rect.top + tolerance~ +** Processing line: ~ (inner_rect.y + inner_rect.h) - tolerance <= (outer_rect.y + outer_rect.h) + tolerance~ - Inside source: true *** True Line Result - inner_rect.top - tolerance <= outer_rect.top + tolerance + (inner_rect.y + inner_rect.h) - tolerance <= (outer_rect.y + outer_rect.h) + tolerance ** Processing line: ~ rescue Exception => e~ - Inside source: true *** True Line Result rescue Exception => e -** Processing line: ~ raise e, ":inside_rect? failed for inner_rect: #{inner_rect} outer_rect: #{outer_rect}."~ +** Processing line: ~ raise e, ":inside_rect? failed for inner_rect: #{inner_rect} outer_rect: #{outer_rect}.\n#{e}"~ - Inside source: true *** True Line Result - raise e, ":inside_rect? failed for inner_rect: #{inner_rect} outer_rect: #{outer_rect}." + raise e, ":inside_rect? failed for inner_rect: #{inner_rect} outer_rect: #{outer_rect}.\n#{e}" ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -153251,10 +160442,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result rescue Exception => e -** Processing line: ~ raise e, ":scale_rect_extended failed for rect: #{rect} percentage_x: #{percentage_x} percentage_y: #{percentage_y} anchors_x: #{anchor_x} anchor_y: #{anchor_y}."~ +** Processing line: ~ raise e, ":scale_rect_extended failed for rect: #{rect} percentage_x: #{percentage_x} percentage_y: #{percentage_y} anchors_x: #{anchor_x} anchor_y: #{anchor_y}.\n#{e}"~ - Inside source: true *** True Line Result - raise e, ":scale_rect_extended failed for rect: #{rect} percentage_x: #{percentage_x} percentage_y: #{percentage_y} anchors_x: #{anchor_x} anchor_y: #{anchor_y}." + raise e, ":scale_rect_extended failed for rect: #{rect} percentage_x: #{percentage_x} percentage_y: #{percentage_y} anchors_x: #{anchor_x} anchor_y: #{anchor_y}.\n#{e}" ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -153307,10 +160498,66 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result rescue Exception => e -** Processing line: ~ raise e, ":scale_rect failed for rect: #{rect} percentage: #{percentage} anchors [#{anchor_x} (x), #{anchor_y} (y)]."~ +** Processing line: ~ raise e, ":scale_rect failed for rect: #{rect} percentage: #{percentage} anchors [#{anchor_x} (x), #{anchor_y} (y)].\n#{e}"~ - Inside source: true *** True Line Result - raise e, ":scale_rect failed for rect: #{rect} percentage: #{percentage} anchors [#{anchor_x} (x), #{anchor_y} (y)]." + raise e, ":scale_rect failed for rect: #{rect} percentage: #{percentage} anchors [#{anchor_x} (x), #{anchor_y} (y)].\n#{e}" +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ def self.rect_to_line rect~ +- Inside source: true +*** True Line Result + def self.rect_to_line rect +** Processing line: ~ l = rect.to_hash.line~ +- Inside source: true +*** True Line Result + l = rect.to_hash.line +** Processing line: ~ l.merge(x2: l.x + l.w - 1,~ +- Inside source: true +*** True Line Result + l.merge(x2: l.x + l.w - 1, +** Processing line: ~ y2: l.y + l.h)~ +- Inside source: true +*** True Line Result + y2: l.y + l.h) +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ def self.rect_center_point rect~ +- Inside source: true +*** True Line Result + def self.rect_center_point rect +** Processing line: ~ { x: rect.x + rect.w.half, y: rect.y + rect.h.half }~ +- Inside source: true +*** True Line Result + { x: rect.x + rect.w.half, y: rect.y + rect.h.half } +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ def rect_center_point~ +- Inside source: true +*** True Line Result + def rect_center_point +** Processing line: ~ Geometry.rect_center_point self~ +- Inside source: true +*** True Line Result + Geometry.rect_center_point self ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -154097,6 +161344,38 @@ Follows is a source code listing for all files that have been open sourced. This [@right, @bottom].point ** Processing line: ~ end~ - Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ def x~ +- Inside source: true +*** True Line Result + def x +** Processing line: ~ 0~ +- Inside source: true +*** True Line Result + 0 +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ def y~ +- Inside source: true +*** True Line Result + def y +** Processing line: ~ 0~ +- Inside source: true +*** True Line Result + 0 +** Processing line: ~ end~ +- Inside source: true *** True Line Result end ** Processing line: ~ end~ @@ -154907,6 +162186,102 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result +** Processing line: ~ def self.method_to_key_hash~ +- Inside source: true +*** True Line Result + def self.method_to_key_hash +** Processing line: ~ return @method_to_key_hash if @method_to_key_hash~ +- Inside source: true +*** True Line Result + return @method_to_key_hash if @method_to_key_hash +** Processing line: ~ @method_to_key_hash = {}~ +- Inside source: true +*** True Line Result + @method_to_key_hash = {} +** Processing line: ~ string_representation_overrides ||= {~ +- Inside source: true +*** True Line Result + string_representation_overrides ||= { +** Processing line: ~ backspace: '\b'~ +- Inside source: true +*** True Line Result + backspace: '\b' +** Processing line: ~ }~ +- Inside source: true +*** True Line Result + } +** Processing line: ~ char_to_method_hash.each do |k, v|~ +- Inside source: true +*** True Line Result + char_to_method_hash.each do |k, v| +** Processing line: ~ v.each do |vi|~ +- Inside source: true +*** True Line Result + v.each do |vi| +** Processing line: ~ t = { char_or_raw_key: k }~ +- Inside source: true +*** True Line Result + t = { char_or_raw_key: k } +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ if k.is_a? Numeric~ +- Inside source: true +*** True Line Result + if k.is_a? Numeric +** Processing line: ~ t[:raw_key] = k~ +- Inside source: true +*** True Line Result + t[:raw_key] = k +** Processing line: ~ t[:string_representation] = "raw_key == #{k}"~ +- Inside source: true +*** True Line Result + t[:string_representation] = "raw_key == #{k}" +** Processing line: ~ else~ +- Inside source: true +*** True Line Result + else +** Processing line: ~ t[:char] = k~ +- Inside source: true +*** True Line Result + t[:char] = k +** Processing line: ~ t[:string_representation] = "\"#{k.strip}\""~ +- Inside source: true +*** True Line Result + t[:string_representation] = "\"#{k.strip}\"" +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ @method_to_key_hash[vi] = t~ +- Inside source: true +*** True Line Result + @method_to_key_hash[vi] = t +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~ @method_to_key_hash~ +- Inside source: true +*** True Line Result + @method_to_key_hash +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + ** Processing line: ~ def self.char_to_method char, int = nil~ - Inside source: true *** True Line Result @@ -155363,46 +162738,54 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result def method_missing m, *args -** Processing line: ~ begin~ +** Processing line: ~ if KeyboardKeys.method_to_key_hash[m.without_ending_bang]~ - Inside source: true *** True Line Result - begin -** Processing line: ~ define_singleton_method(m) do~ + if KeyboardKeys.method_to_key_hash[m.without_ending_bang] +** Processing line: ~ begin~ - Inside source: true *** True Line Result - define_singleton_method(m) do -** Processing line: ~ r = self.instance_variable_get("@#{m.without_ending_bang}".to_sym)~ + begin +** Processing line: ~ define_singleton_method(m) do~ - Inside source: true *** True Line Result - r = self.instance_variable_get("@#{m.without_ending_bang}".to_sym) -** Processing line: ~ clear_key m~ + define_singleton_method(m) do +** Processing line: ~ r = self.instance_variable_get("@#{m.without_ending_bang}".to_sym)~ - Inside source: true *** True Line Result - clear_key m -** Processing line: ~ return r~ + r = self.instance_variable_get("@#{m.without_ending_bang}".to_sym) +** Processing line: ~ clear_key m~ - Inside source: true *** True Line Result - return r -** Processing line: ~ end~ + clear_key m +** Processing line: ~ return r~ - Inside source: true *** True Line Result - end + return r +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ return self.send m~ +** Processing line: ~ return self.send m~ - Inside source: true *** True Line Result - return self.send m -** Processing line: ~ rescue Exception => e~ + return self.send m +** Processing line: ~ rescue Exception => e~ - Inside source: true *** True Line Result - rescue Exception => e -** Processing line: ~ log_important "#{e}"~ + rescue Exception => e +** Processing line: ~ log_important "#{e}"~ - Inside source: true *** True Line Result - log_important "#{e}" + log_important "#{e}" +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -155411,6 +162794,30 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result +** Processing line: ~ did_you_mean = KeyboardKeys.method_to_key_hash.find_all do |k, v|~ +- Inside source: true +*** True Line Result + did_you_mean = KeyboardKeys.method_to_key_hash.find_all do |k, v| +** Processing line: ~ k.to_s[0..1] == m.to_s[0..1]~ +- Inside source: true +*** True Line Result + k.to_s[0..1] == m.to_s[0..1] +** Processing line: ~ end.map {|k, v| ":#{k} (#{v[:string_representation]})" }~ +- Inside source: true +*** True Line Result + end.map {|k, v| ":#{k} (#{v[:string_representation]})" } +** Processing line: ~ did_you_mean_string = ""~ +- Inside source: true +*** True Line Result + did_you_mean_string = "" +** Processing line: ~ did_you_mean_string = ". Did you mean #{did_you_mean.join ", "}?"~ +- Inside source: true +*** True Line Result + did_you_mean_string = ". Did you mean #{did_you_mean.join ", "}?" +** Processing line: ~~ +- Inside source: true +*** True Line Result + ** Processing line: ~ raise <<-S~ - Inside source: true *** True Line Result @@ -155419,22 +162826,22 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result * ERROR: -** Processing line: ~ There is no member on the keyboard called #{m}. Here is a to_s representation of what's available:~ +** Processing line: ~ #{KeyboardKeys.method_to_key_hash.map { |k, v| "** :#{k} #{v.string_representation}" }.join("\n")}~ - Inside source: true *** True Line Result - There is no member on the keyboard called #{m}. Here is a to_s representation of what's available: + #{KeyboardKeys.method_to_key_hash.map { |k, v| "** :#{k} #{v.string_representation}" }.join("\n")} ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ #{KeyboardKeys.char_to_method_hash.map { |k, v| "[#{k} => #{v.join(",")}]" }.join(" ")}~ +** Processing line: ~ There is no key on the keyboard called :#{m}#{did_you_mean_string}.~ - Inside source: true *** True Line Result - #{KeyboardKeys.char_to_method_hash.map { |k, v| "[#{k} => #{v.join(",")}]" }.join(" ")} -** Processing line: ~~ + There is no key on the keyboard called :#{m}#{did_you_mean_string}. +** Processing line: ~ Full list of available keys =:points_up:=.~ - Inside source: true *** True Line Result - + Full list of available keys =:points_up:=. ** Processing line: ~ S~ - Inside source: true *** True Line Result @@ -156967,6 +164374,22 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result +** Processing line: ~ def directional_angle~ +- Inside source: true +*** True Line Result + def directional_angle +** Processing line: ~ keyboard.directional_angle || (controller_one && controller_one.directional_angle)~ +- Inside source: true +*** True Line Result + keyboard.directional_angle || (controller_one && controller_one.directional_angle) +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + ** Processing line: ~ # Returns a signal indicating right (`1`), left (`-1`), or neither ('0').~ - Inside source: true *** True Line Result @@ -157255,6 +164678,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result # ./dragon/ios_wizard.rb +** Processing line: ~ # Contributors outside of DragonRuby who also hold Copyright: Michał Dudziński~ +- Inside source: true +*** True Line Result + # Contributors outside of DragonRuby who also hold Copyright: Michał Dudziński ** Processing line: ~ # Copyright 2019 DragonRuby LLC~ - Inside source: true *** True Line Result @@ -157271,42 +164698,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ class WizardException < Exception~ -- Inside source: true -*** True Line Result - class WizardException < Exception -** Processing line: ~ attr_accessor :console_primitives~ -- Inside source: true -*** True Line Result - attr_accessor :console_primitives -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ def initialize *console_primitives~ -- Inside source: true -*** True Line Result - def initialize *console_primitives -** Processing line: ~ @console_primitives = console_primitives~ -- Inside source: true -*** True Line Result - @console_primitives = console_primitives -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ class IOSWizard~ +** Processing line: ~ class IOSWizard < Wizard~ - Inside source: true *** True Line Result - class IOSWizard + class IOSWizard < Wizard ** Processing line: ~ def initialize~ - Inside source: true *** True Line Result @@ -157355,10 +164750,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def steps_development_build~ +** Processing line: ~ def prerequisite_steps~ - Inside source: true *** True Line Result - def steps_development_build + def prerequisite_steps ** Processing line: ~ [~ - Inside source: true *** True Line Result @@ -157375,14 +164770,26 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result :check_for_certs, -** Processing line: ~ :check_for_device,~ +** Processing line: ~ ]~ - Inside source: true *** True Line Result - :check_for_device, -** Processing line: ~ :check_for_dev_profile,~ + ] +** Processing line: ~ end~ - Inside source: true *** True Line Result - :check_for_dev_profile, + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ def app_metadata_retrieval_steps~ +- Inside source: true +*** True Line Result + def app_metadata_retrieval_steps +** Processing line: ~ [~ +- Inside source: true +*** True Line Result + [ ** Processing line: ~ :determine_team_identifier,~ - Inside source: true *** True Line Result @@ -157395,18 +164802,74 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result :determine_app_id, -** Processing line: ~ :blow_away_temp,~ +** Processing line: ~ ]~ +- Inside source: true +*** True Line Result + ] +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ def steps_development_build~ +- Inside source: true +*** True Line Result + def steps_development_build +** Processing line: ~ [~ +- Inside source: true +*** True Line Result + [ +** Processing line: ~ *prerequisite_steps,~ +- Inside source: true +*** True Line Result + *prerequisite_steps, +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ :check_for_device,~ - Inside source: true *** True Line Result - :blow_away_temp, + :check_for_device, +** Processing line: ~ :check_for_dev_profile,~ +- Inside source: true +*** True Line Result + :check_for_dev_profile, +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ *app_metadata_retrieval_steps,~ +- Inside source: true +*** True Line Result + *app_metadata_retrieval_steps, +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ :clear_tmp_directory,~ +- Inside source: true +*** True Line Result + :clear_tmp_directory, ** Processing line: ~ :stage_app,~ - Inside source: true *** True Line Result :stage_app, +** Processing line: ~~ +- Inside source: true +*** True Line Result + ** Processing line: ~ :development_write_info_plist,~ - Inside source: true *** True Line Result :development_write_info_plist, +** Processing line: ~~ +- Inside source: true +*** True Line Result + ** Processing line: ~ :write_entitlements_plist,~ - Inside source: true *** True Line Result @@ -157415,14 +164878,34 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result :compile_icons, -** Processing line: ~ :create_payload_directory,~ +** Processing line: ~ :clear_payload_directory,~ +- Inside source: true +*** True Line Result + :clear_payload_directory, +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ :create_payload_directory_dev,~ +- Inside source: true +*** True Line Result + :create_payload_directory_dev, +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ :create_payload,~ - Inside source: true *** True Line Result - :create_payload_directory, + :create_payload, ** Processing line: ~ :code_sign_payload,~ - Inside source: true *** True Line Result :code_sign_payload, +** Processing line: ~~ +- Inside source: true +*** True Line Result + ** Processing line: ~ :create_ipa,~ - Inside source: true *** True Line Result @@ -157451,46 +164934,54 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result [ -** Processing line: ~ :check_for_xcode,~ -- Inside source: true -*** True Line Result - :check_for_xcode, -** Processing line: ~ :check_for_brew,~ +** Processing line: ~ *prerequisite_steps,~ - Inside source: true *** True Line Result - :check_for_brew, -** Processing line: ~ :check_for_certs,~ + *prerequisite_steps, +** Processing line: ~~ - Inside source: true *** True Line Result - :check_for_certs, + ** Processing line: ~ :check_for_distribution_profile,~ - Inside source: true *** True Line Result :check_for_distribution_profile, -** Processing line: ~ :determine_team_identifier,~ +** Processing line: ~ :determine_app_version,~ - Inside source: true *** True Line Result - :determine_team_identifier, -** Processing line: ~ :determine_app_name,~ + :determine_app_version, +** Processing line: ~~ - Inside source: true *** True Line Result - :determine_app_name, -** Processing line: ~ :determine_app_id,~ + +** Processing line: ~ *app_metadata_retrieval_steps,~ - Inside source: true *** True Line Result - :determine_app_id, -** Processing line: ~ :blow_away_temp,~ + *app_metadata_retrieval_steps, +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ :clear_tmp_directory,~ - Inside source: true *** True Line Result - :blow_away_temp, + :clear_tmp_directory, ** Processing line: ~ :stage_app,~ - Inside source: true *** True Line Result :stage_app, +** Processing line: ~~ +- Inside source: true +*** True Line Result + ** Processing line: ~ :production_write_info_plist,~ - Inside source: true *** True Line Result :production_write_info_plist, +** Processing line: ~~ +- Inside source: true +*** True Line Result + ** Processing line: ~ :write_entitlements_plist,~ - Inside source: true *** True Line Result @@ -157499,14 +164990,34 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result :compile_icons, -** Processing line: ~ :create_payload_directory,~ +** Processing line: ~ :clear_payload_directory,~ +- Inside source: true +*** True Line Result + :clear_payload_directory, +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ :create_payload_directory_prod,~ +- Inside source: true +*** True Line Result + :create_payload_directory_prod, +** Processing line: ~~ - Inside source: true *** True Line Result - :create_payload_directory, + +** Processing line: ~ :create_payload,~ +- Inside source: true +*** True Line Result + :create_payload, ** Processing line: ~ :code_sign_payload,~ - Inside source: true *** True Line Result :code_sign_payload, +** Processing line: ~~ +- Inside source: true +*** True Line Result + ** Processing line: ~ :create_ipa,~ - Inside source: true *** True Line Result @@ -157647,6 +165158,14 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result @certificate_name = nil +** Processing line: ~ @app_version = opts[:version]~ +- Inside source: true +*** True Line Result + @app_version = opts[:version] +** Processing line: ~ @app_version = "1.0" if @opts[:env] == :dev && !@app_version~ +- Inside source: true +*** True Line Result + @app_version = "1.0" if @opts[:env] == :dev && !@app_version ** Processing line: ~ init_wizard_status~ - Inside source: true *** True Line Result @@ -157731,6 +165250,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result log_error e.to_s +** Processing line: ~ log e.__backtrace_to_org__~ +- Inside source: true +*** True Line Result + log e.__backtrace_to_org__ ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -157739,6 +165262,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result +** Processing line: ~ init_wizard_status~ +- Inside source: true +*** True Line Result + init_wizard_status ** Processing line: ~ $console.set_command "$wizards.ios.start env: :#{@opts[:env]}"~ - Inside source: true *** True Line Result @@ -158163,38 +165690,54 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def determine_team_identifier~ +** Processing line: ~ def ios_metadata_template~ - Inside source: true *** True Line Result - def determine_team_identifier -** Processing line: ~ @team_name = (team_identifier_from_provisioning_profile @opts[:env])~ + def ios_metadata_template +** Processing line: ~ <<-S~ - Inside source: true *** True Line Result - @team_name = (team_identifier_from_provisioning_profile @opts[:env]) -** Processing line: ~ log_info "Team Identifer is: #{@team_name}"~ + <<-S +** Processing line: ~ # ios_metadata.txt is used by the Pro version of DragonRuby Game Toolkit to create iOS apps.~ - Inside source: true *** True Line Result - log_info "Team Identifer is: #{@team_name}" -** Processing line: ~ end~ + # ios_metadata.txt is used by the Pro version of DragonRuby Game Toolkit to create iOS apps. +** Processing line: ~ # Information about the Pro version can be found at: http://dragonruby.org/toolkit/game#purchase~ - Inside source: true *** True Line Result - end + # Information about the Pro version can be found at: http://dragonruby.org/toolkit/game#purchase ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def determine_app_name~ +** Processing line: ~ # teamid needs to be set to your assigned Team Id which can be found at https://developer.apple.com/account/#/membership/~ - Inside source: true *** True Line Result - def determine_app_name -** Processing line: ~ @app_name = (provisioning_profile_xml @opts[:env])[:children].first[:children].first[:children][1][:children].first[:data]~ + # teamid needs to be set to your assigned Team Id which can be found at https://developer.apple.com/account/#/membership/ +** Processing line: ~ teamid=~ - Inside source: true *** True Line Result - @app_name = (provisioning_profile_xml @opts[:env])[:children].first[:children].first[:children][1][:children].first[:data] -** Processing line: ~ log_info "App name is: #{@app_name}."~ + teamid= +** Processing line: ~ # appid needs to be set to your application identifier which can be found at https://developer.apple.com/account/resources/identifiers/list~ - Inside source: true *** True Line Result - log_info "App name is: #{@app_name}." + # appid needs to be set to your application identifier which can be found at https://developer.apple.com/account/resources/identifiers/list +** Processing line: ~ appid=~ +- Inside source: true +*** True Line Result + appid= +** Processing line: ~ # appname is the name you want to show up underneath the app icon on the device. Keep it under 10 characters.~ +- Inside source: true +*** True Line Result + # appname is the name you want to show up underneath the app icon on the device. Keep it under 10 characters. +** Processing line: ~ appname=~ +- Inside source: true +*** True Line Result + appname= +** Processing line: ~ S~ +- Inside source: true +*** True Line Result + S ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -158203,134 +165746,146 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def provisioning_profile_xml environment~ +** Processing line: ~ def ios_metadata~ - Inside source: true *** True Line Result - def provisioning_profile_xml environment -** Processing line: ~ xml = $gtk.read_file (provisioning_profile_path environment)~ + def ios_metadata +** Processing line: ~ contents = $gtk.read_file 'metadata/ios_metadata.txt'~ - Inside source: true *** True Line Result - xml = $gtk.read_file (provisioning_profile_path environment) -** Processing line: ~ scrubbed = xml.each_line.map do |l|~ + contents = $gtk.read_file 'metadata/ios_metadata.txt' +** Processing line: ~~ - Inside source: true *** True Line Result - scrubbed = xml.each_line.map do |l| -** Processing line: ~ if l.strip.start_with? "<"~ + +** Processing line: ~ if !contents~ - Inside source: true *** True Line Result - if l.strip.start_with? "<" -** Processing line: ~ if l.start_with? ''~ + if !contents +** Processing line: ~ $gtk.write_file 'metadata/ios_metadata.txt', ios_metadata_template~ - Inside source: true *** True Line Result - if l.start_with? '' -** Processing line: ~ ''~ + $gtk.write_file 'metadata/ios_metadata.txt', ios_metadata_template +** Processing line: ~ contents = $gtk.read_file 'metadata/ios_metadata.txt'~ - Inside source: true *** True Line Result - '' -** Processing line: ~ elsif l.include? "Apple Inc."~ + contents = $gtk.read_file 'metadata/ios_metadata.txt' +** Processing line: ~ end~ - Inside source: true *** True Line Result - elsif l.include? "Apple Inc." -** Processing line: ~ nil~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - nil -** Processing line: ~ elsif l.include? ''~ + +** Processing line: ~ kvps = contents.each_line~ - Inside source: true *** True Line Result - elsif l.include? '' -** Processing line: ~ nil~ + kvps = contents.each_line +** Processing line: ~ .reject { |l| l.strip.length == 0 || (l.strip.start_with? "#") }~ - Inside source: true *** True Line Result - nil -** Processing line: ~ else~ + .reject { |l| l.strip.length == 0 || (l.strip.start_with? "#") } +** Processing line: ~ .map do |l|~ - Inside source: true *** True Line Result - else -** Processing line: ~ l~ + .map do |l| +** Processing line: ~ key, value = l.split("=")~ - Inside source: true *** True Line Result - l -** Processing line: ~ end~ + key, value = l.split("=") +** Processing line: ~ [key.strip.to_sym, value.strip]~ - Inside source: true *** True Line Result - end -** Processing line: ~ else~ + [key.strip.to_sym, value.strip] +** Processing line: ~ end.flatten~ - Inside source: true *** True Line Result - else -** Processing line: ~ nil~ + end.flatten +** Processing line: ~ Hash[*kvps]~ - Inside source: true *** True Line Result - nil -** Processing line: ~ end~ + Hash[*kvps] +** Processing line: ~ end~ - Inside source: true *** True Line Result - end -** Processing line: ~ end.reject { |l| !l }.join~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - end.reject { |l| !l }.join -** Processing line: ~ $gtk.parse_xml scrubbed~ + +** Processing line: ~ def game_metadata~ - Inside source: true *** True Line Result - $gtk.parse_xml scrubbed -** Processing line: ~ end~ + def game_metadata +** Processing line: ~ contents = $gtk.read_file 'metadata/game_metadata.txt'~ - Inside source: true *** True Line Result - end + contents = $gtk.read_file 'metadata/game_metadata.txt' ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def app_id_from_provisioning_profile environment~ +** Processing line: ~ kvps = contents.each_line~ - Inside source: true *** True Line Result - def app_id_from_provisioning_profile environment -** Processing line: ~ application_identifier_index = (provisioning_profile_xml environment)[:children][0][:children][0][:children][13][:children][0][:children][0][:data]~ + kvps = contents.each_line +** Processing line: ~ .reject { |l| l.strip.length == 0 || (l.strip.start_with? "#") }~ - Inside source: true *** True Line Result - application_identifier_index = (provisioning_profile_xml environment)[:children][0][:children][0][:children][13][:children][0][:children][0][:data] -** Processing line: ~ (provisioning_profile_xml environment)[:children][0][:children][0][:children][13][:children].each.with_index do |node, i|~ + .reject { |l| l.strip.length == 0 || (l.strip.start_with? "#") } +** Processing line: ~ .map do |l|~ - Inside source: true *** True Line Result - (provisioning_profile_xml environment)[:children][0][:children][0][:children][13][:children].each.with_index do |node, i| -** Processing line: ~ if node[:children] && node[:children][0] && node[:children][0][:data] == "application-identifier"~ + .map do |l| +** Processing line: ~ key, value = l.split("=")~ - Inside source: true *** True Line Result - if node[:children] && node[:children][0] && node[:children][0][:data] == "application-identifier" -** Processing line: ~ application_identifier_index = i~ + key, value = l.split("=") +** Processing line: ~ [key.strip.to_sym, value.strip]~ - Inside source: true *** True Line Result - application_identifier_index = i -** Processing line: ~ break~ + [key.strip.to_sym, value.strip] +** Processing line: ~ end.flatten~ - Inside source: true *** True Line Result - break -** Processing line: ~ end~ + end.flatten +** Processing line: ~ Hash[*kvps]~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + Hash[*kvps] +** Processing line: ~ end~ - Inside source: true *** True Line Result - end + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ app_id_with_team_identifier = (provisioning_profile_xml environment)[:children].first[:children].first[:children][13][:children][application_identifier_index + 1][:children].first[:data]~ +** Processing line: ~ def raise_ios_metadata_required~ +- Inside source: true +*** True Line Result + def raise_ios_metadata_required +** Processing line: ~ raise WizardException.new(~ +- Inside source: true +*** True Line Result + raise WizardException.new( +** Processing line: ~ "* mygame/metadata/ios_metadata.txt needs to be filled out.",~ +- Inside source: true +*** True Line Result + "* mygame/metadata/ios_metadata.txt needs to be filled out.", +** Processing line: ~ "You need to update metadata/ios_metadata.txt with a valid teamid, appname, and appid.",~ - Inside source: true *** True Line Result - app_id_with_team_identifier = (provisioning_profile_xml environment)[:children].first[:children].first[:children][13][:children][application_identifier_index + 1][:children].first[:data] -** Processing line: ~ team_identifer = team_identifier_from_provisioning_profile environment~ + "You need to update metadata/ios_metadata.txt with a valid teamid, appname, and appid.", +** Processing line: ~ "Instructions for where the values should come from are within metadata/ios_metadata.txt."~ - Inside source: true *** True Line Result - team_identifer = team_identifier_from_provisioning_profile environment -** Processing line: ~ app_id_with_team_identifier.gsub "#{team_identifer}.", ""~ + "Instructions for where the values should come from are within metadata/ios_metadata.txt." +** Processing line: ~ )~ - Inside source: true *** True Line Result - app_id_with_team_identifier.gsub "#{team_identifer}.", "" + ) ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -158339,50 +165894,126 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def team_identifier_from_provisioning_profile environment~ +** Processing line: ~ def determine_team_identifier~ - Inside source: true *** True Line Result - def team_identifier_from_provisioning_profile environment -** Processing line: ~ team_identifer_index = (provisioning_profile_xml environment)[:children][0][:children][0][:children][13][:children][0][:children][0][:data]~ + def determine_team_identifier +** Processing line: ~ @team_id = (ios_metadata.teamid || "")~ - Inside source: true *** True Line Result - team_identifer_index = (provisioning_profile_xml environment)[:children][0][:children][0][:children][13][:children][0][:children][0][:data] -** Processing line: ~~ + @team_id = (ios_metadata.teamid || "") +** Processing line: ~ raise_ios_metadata_required if @team_id.strip.length == 0~ - Inside source: true *** True Line Result - -** Processing line: ~ (provisioning_profile_xml environment)[:children][0][:children][0][:children][13][:children].each.with_index do |node, i|~ + raise_ios_metadata_required if @team_id.strip.length == 0 +** Processing line: ~ log_info "Team Identifer is: #{@team_id}"~ - Inside source: true *** True Line Result - (provisioning_profile_xml environment)[:children][0][:children][0][:children][13][:children].each.with_index do |node, i| -** Processing line: ~ if node[:children] && node[:children][0] && node[:children][0][:data] == "com.apple.developer.team-identifier"~ + log_info "Team Identifer is: #{@team_id}" +** Processing line: ~ end~ - Inside source: true *** True Line Result - if node[:children] && node[:children][0] && node[:children][0][:data] == "com.apple.developer.team-identifier" -** Processing line: ~ team_identifer_index = i~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - team_identifer_index = i -** Processing line: ~ break~ + +** Processing line: ~ def determine_app_name~ - Inside source: true *** True Line Result - break -** Processing line: ~ end~ + def determine_app_name +** Processing line: ~ @app_name = (ios_metadata.appname || "")~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + @app_name = (ios_metadata.appname || "") +** Processing line: ~ raise_ios_metadata_required if @app_name.strip.length == 0~ - Inside source: true *** True Line Result - end + raise_ios_metadata_required if @app_name.strip.length == 0 +** Processing line: ~ log_info "App name is: #{@app_name}."~ +- Inside source: true +*** True Line Result + log_info "App name is: #{@app_name}." +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ (provisioning_profile_xml environment)[:children].first[:children].first[:children][13][:children][team_identifer_index + 1][:children].first[:data]~ +** Processing line: ~ def provisioning_profile_xml environment~ +- Inside source: true +*** True Line Result + def provisioning_profile_xml environment +** Processing line: ~ xml = $gtk.read_file (provisioning_profile_path environment)~ +- Inside source: true +*** True Line Result + xml = $gtk.read_file (provisioning_profile_path environment) +** Processing line: ~ scrubbed = xml.each_line.map do |l|~ +- Inside source: true +*** True Line Result + scrubbed = xml.each_line.map do |l| +** Processing line: ~ if l.strip.start_with? "<"~ +- Inside source: true +*** True Line Result + if l.strip.start_with? "<" +** Processing line: ~ if l.start_with? ''~ +- Inside source: true +*** True Line Result + if l.start_with? '' +** Processing line: ~ ''~ +- Inside source: true +*** True Line Result + '' +** Processing line: ~ elsif l.include? "Apple Inc."~ +- Inside source: true +*** True Line Result + elsif l.include? "Apple Inc." +** Processing line: ~ nil~ +- Inside source: true +*** True Line Result + nil +** Processing line: ~ elsif l.include? ''~ +- Inside source: true +*** True Line Result + elsif l.include? '' +** Processing line: ~ nil~ +- Inside source: true +*** True Line Result + nil +** Processing line: ~ else~ +- Inside source: true +*** True Line Result + else +** Processing line: ~ l~ - Inside source: true *** True Line Result - (provisioning_profile_xml environment)[:children].first[:children].first[:children][13][:children][team_identifer_index + 1][:children].first[:data] + l +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~ else~ +- Inside source: true +*** True Line Result + else +** Processing line: ~ nil~ +- Inside source: true +*** True Line Result + nil +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~ end.reject { |l| !l }.join~ +- Inside source: true +*** True Line Result + end.reject { |l| !l }.join +** Processing line: ~ $gtk.parse_xml scrubbed~ +- Inside source: true +*** True Line Result + $gtk.parse_xml scrubbed ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -158395,14 +166026,14 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result def determine_app_id -** Processing line: ~ @app_id = app_id_from_provisioning_profile @opts[:env]~ +** Processing line: ~ @app_id = ios_metadata.appid~ - Inside source: true *** True Line Result - @app_id = app_id_from_provisioning_profile @opts[:env] -** Processing line: ~~ + @app_id = ios_metadata.appid +** Processing line: ~ raise_ios_metadata_required if @app_id.strip.length == 0~ - Inside source: true *** True Line Result - + raise_ios_metadata_required if @app_id.strip.length == 0 ** Processing line: ~ log_info "App Identifier is set to : #{@app_id}"~ - Inside source: true *** True Line Result @@ -158475,10 +166106,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def blow_away_temp~ +** Processing line: ~ def clear_tmp_directory~ - Inside source: true *** True Line Result - def blow_away_temp + def clear_tmp_directory ** Processing line: ~ sh "rm -rf #{tmp_directory}"~ - Inside source: true *** True Line Result @@ -159039,10 +166670,14 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ $gtk.write_file_root "tmp/ios/Entitlements.plist", entitlement_plist_string.gsub(":app_id", "#{@team_name}.#{@app_id}").strip~ +** Processing line: ~ $gtk.write_file_root "tmp/ios/Entitlements.plist", entitlement_plist_string.gsub(":app_id", "#{@team_id}.#{@app_id}").strip~ - Inside source: true *** True Line Result - $gtk.write_file_root "tmp/ios/Entitlements.plist", entitlement_plist_string.gsub(":app_id", "#{@team_name}.#{@app_id}").strip + $gtk.write_file_root "tmp/ios/Entitlements.plist", entitlement_plist_string.gsub(":app_id", "#{@team_id}.#{@app_id}").strip +** Processing line: ~ $gtk.write_file_root "tmp/ios/Entitlements.txt", entitlement_plist_string.gsub(":app_id", "#{@team_id}.#{@app_id}").strip~ +- Inside source: true +*** True Line Result + $gtk.write_file_root "tmp/ios/Entitlements.txt", entitlement_plist_string.gsub(":app_id", "#{@team_id}.#{@app_id}").strip ** Processing line: ~~ - Inside source: true *** True Line Result @@ -159191,10 +166826,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result CFBundleInfoDictionaryVersion -** Processing line: ~ 6.0~ +** Processing line: ~ :app_version~ - Inside source: true *** True Line Result - 6.0 + :app_version ** Processing line: ~ CFBundlePackageType~ - Inside source: true *** True Line Result @@ -159207,10 +166842,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result CFBundleShortVersionString -** Processing line: ~ 5.6~ +** Processing line: ~ :app_version~ - Inside source: true *** True Line Result - 5.6 + :app_version ** Processing line: ~ CFBundleSignature~ - Inside source: true *** True Line Result @@ -159223,10 +166858,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result CFBundleVersion -** Processing line: ~ 5.6~ +** Processing line: ~ :app_version~ - Inside source: true *** True Line Result - 5.6 + :app_version ** Processing line: ~ CFBundleIcons~ - Inside source: true *** True Line Result @@ -159819,10 +167454,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result CFBundleInfoDictionaryVersion -** Processing line: ~ 6.0~ +** Processing line: ~ :app_version~ - Inside source: true *** True Line Result - 6.0 + :app_version ** Processing line: ~ CFBundleName~ - Inside source: true *** True Line Result @@ -159843,10 +167478,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result CFBundleShortVersionString -** Processing line: ~ 5.2~ +** Processing line: ~ :app_version~ - Inside source: true *** True Line Result - 5.2 + :app_version ** Processing line: ~ CFBundleSignature~ - Inside source: true *** True Line Result @@ -159875,10 +167510,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result CFBundleVersion -** Processing line: ~ 5.2~ +** Processing line: ~ :app_version~ - Inside source: true *** True Line Result - 5.2 + :app_version ** Processing line: ~ DTCompiler~ - Inside source: true *** True Line Result @@ -160219,6 +167854,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result $gtk.write_file_root "tmp/ios/#{@app_name}.app/Info.plist", info_plist_string.strip +** Processing line: ~ $gtk.write_file_root "tmp/ios/Info.txt", info_plist_string.strip~ +- Inside source: true +*** True Line Result + $gtk.write_file_root "tmp/ios/Info.txt", info_plist_string.strip ** Processing line: ~~ - Inside source: true *** True Line Result @@ -160431,10 +168070,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result CFBundleInfoDictionaryVersion -** Processing line: ~ 6.0~ +** Processing line: ~ :app_version~ - Inside source: true *** True Line Result - 6.0 + :app_version ** Processing line: ~ CFBundleName~ - Inside source: true *** True Line Result @@ -160455,10 +168094,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result CFBundleShortVersionString -** Processing line: ~ 5.2~ +** Processing line: ~ :app_version~ - Inside source: true *** True Line Result - 5.2 + :app_version ** Processing line: ~ CFBundleSignature~ - Inside source: true *** True Line Result @@ -160487,10 +168126,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result CFBundleVersion -** Processing line: ~ 5.2~ +** Processing line: ~ :app_version~ - Inside source: true *** True Line Result - 5.2 + :app_version ** Processing line: ~ DTCompiler~ - Inside source: true *** True Line Result @@ -160823,6 +168462,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result info_plist_string.gsub!(":app_id", @app_id) +** Processing line: ~ info_plist_string.gsub!(":app_version", @app_version)~ +- Inside source: true +*** True Line Result + info_plist_string.gsub!(":app_version", @app_version) ** Processing line: ~~ - Inside source: true *** True Line Result @@ -160831,6 +168474,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result $gtk.write_file_root "tmp/ios/#{@app_name}.app/Info.plist", info_plist_string.strip +** Processing line: ~ $gtk.write_file_root "tmp/ios/Info.txt", info_plist_string.strip~ +- Inside source: true +*** True Line Result + $gtk.write_file_root "tmp/ios/Info.txt", info_plist_string.strip ** Processing line: ~~ - Inside source: true *** True Line Result @@ -160915,14 +168562,86 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def write_ip_address~ +** Processing line: ~ def embed_mobileprovision~ - Inside source: true *** True Line Result - def write_ip_address -** Processing line: ~ $gtk.write_file "app/server_ip_address.txt", $gtk.ffi_misc.get_local_ip_address.strip~ + def embed_mobileprovision +** Processing line: ~ sh %Q[cp #{@provisioning_profile_path} "#{app_path}/embedded.mobileprovision"]~ - Inside source: true *** True Line Result - $gtk.write_file "app/server_ip_address.txt", $gtk.ffi_misc.get_local_ip_address.strip + sh %Q[cp #{@provisioning_profile_path} "#{app_path}/embedded.mobileprovision"] +** Processing line: ~ sh %Q[/usr/bin/plutil -convert binary1 "#{app_path}/Info.plist"]~ +- Inside source: true +*** True Line Result + sh %Q[/usr/bin/plutil -convert binary1 "#{app_path}/Info.plist"] +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ def clear_payload_directory~ +- Inside source: true +*** True Line Result + def clear_payload_directory +** Processing line: ~ sh %Q[rm "#{@app_name}".ipa]~ +- Inside source: true +*** True Line Result + sh %Q[rm "#{@app_name}".ipa] +** Processing line: ~ sh %Q[rm -rf "#{app_path}/app"]~ +- Inside source: true +*** True Line Result + sh %Q[rm -rf "#{app_path}/app"] +** Processing line: ~ sh %Q[rm -rf "#{app_path}/sounds"]~ +- Inside source: true +*** True Line Result + sh %Q[rm -rf "#{app_path}/sounds"] +** Processing line: ~ sh %Q[rm -rf "#{app_path}/sprites"]~ +- Inside source: true +*** True Line Result + sh %Q[rm -rf "#{app_path}/sprites"] +** Processing line: ~ sh %Q[rm -rf "#{app_path}/data"]~ +- Inside source: true +*** True Line Result + sh %Q[rm -rf "#{app_path}/data"] +** Processing line: ~ sh %Q[rm -rf "#{app_path}/fonts"]~ +- Inside source: true +*** True Line Result + sh %Q[rm -rf "#{app_path}/fonts"] +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ def stage_app~ +- Inside source: true +*** True Line Result + def stage_app +** Processing line: ~ sh %Q[cp -r "#{root_folder}/app/" "#{app_path}/app/"]~ +- Inside source: true +*** True Line Result + sh %Q[cp -r "#{root_folder}/app/" "#{app_path}/app/"] +** Processing line: ~ sh %Q[cp -r "#{root_folder}/sounds/" "#{app_path}/sounds/"]~ +- Inside source: true +*** True Line Result + sh %Q[cp -r "#{root_folder}/sounds/" "#{app_path}/sounds/"] +** Processing line: ~ sh %Q[cp -r "#{root_folder}/sprites/" "#{app_path}/sprites/"]~ +- Inside source: true +*** True Line Result + sh %Q[cp -r "#{root_folder}/sprites/" "#{app_path}/sprites/"] +** Processing line: ~ sh %Q[cp -r "#{root_folder}/data/" "#{app_path}/data/"]~ +- Inside source: true +*** True Line Result + sh %Q[cp -r "#{root_folder}/data/" "#{app_path}/data/"] +** Processing line: ~ sh %Q[cp -r "#{root_folder}/fonts/" "#{app_path}/fonts/"]~ +- Inside source: true +*** True Line Result + sh %Q[cp -r "#{root_folder}/fonts/" "#{app_path}/fonts/"] ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -160931,78 +168650,106 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def create_payload_directory~ +** Processing line: ~ def create_payload~ - Inside source: true *** True Line Result - def create_payload_directory -** Processing line: ~ sh "cp #{@provisioning_profile_path} \"#{app_path}/embedded.mobileprovision\""~ + def create_payload +** Processing line: ~ sh %Q[mkdir -p #{tmp_directory}/ipa_root/Payload]~ - Inside source: true *** True Line Result - sh "cp #{@provisioning_profile_path} \"#{app_path}/embedded.mobileprovision\"" -** Processing line: ~ sh "/usr/bin/plutil -convert binary1 \"#{app_path}/Info.plist\""~ + sh %Q[mkdir -p #{tmp_directory}/ipa_root/Payload] +** Processing line: ~ sh %Q[cp -r "#{app_path}" "#{tmp_directory}/ipa_root/Payload"]~ - Inside source: true *** True Line Result - sh "/usr/bin/plutil -convert binary1 \"#{app_path}/Info.plist\"" -** Processing line: ~ write_ip_address~ + sh %Q[cp -r "#{app_path}" "#{tmp_directory}/ipa_root/Payload"] +** Processing line: ~ sh %Q[chmod -R 755 "#{tmp_directory}/ipa_root/Payload"]~ - Inside source: true *** True Line Result - write_ip_address -** Processing line: ~ sh "rm \"#{@app_name}\".ipa"~ + sh %Q[chmod -R 755 "#{tmp_directory}/ipa_root/Payload"] +** Processing line: ~ end~ - Inside source: true *** True Line Result - sh "rm \"#{@app_name}\".ipa" -** Processing line: ~ sh "rm -rf \"#{app_path}/app\""~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - sh "rm -rf \"#{app_path}/app\"" -** Processing line: ~ sh "rm -rf \"#{app_path}/sounds\""~ + +** Processing line: ~ def create_payload_directory_dev~ - Inside source: true *** True Line Result - sh "rm -rf \"#{app_path}/sounds\"" -** Processing line: ~ sh "rm -rf \"#{app_path}/sprites\""~ + def create_payload_directory_dev +** Processing line: ~ # write dev machine's ip address for hotloading~ - Inside source: true *** True Line Result - sh "rm -rf \"#{app_path}/sprites\"" -** Processing line: ~ sh "rm -rf \"#{app_path}/data\""~ + # write dev machine's ip address for hotloading +** Processing line: ~ $gtk.write_file "app/server_ip_address.txt", $gtk.ffi_misc.get_local_ip_address.strip~ - Inside source: true *** True Line Result - sh "rm -rf \"#{app_path}/data\"" -** Processing line: ~ sh "rm -rf \"#{app_path}/fonts\""~ + $gtk.write_file "app/server_ip_address.txt", $gtk.ffi_misc.get_local_ip_address.strip +** Processing line: ~~ - Inside source: true *** True Line Result - sh "rm -rf \"#{app_path}/fonts\"" -** Processing line: ~ sh "cp -r \"#{root_folder}/app/\" \"#{app_path}/app/\""~ + +** Processing line: ~ embed_mobileprovision~ - Inside source: true *** True Line Result - sh "cp -r \"#{root_folder}/app/\" \"#{app_path}/app/\"" -** Processing line: ~ sh "cp -r \"#{root_folder}/sounds/\" \"#{app_path}/sounds/\""~ + embed_mobileprovision +** Processing line: ~ clear_payload_directory~ - Inside source: true *** True Line Result - sh "cp -r \"#{root_folder}/sounds/\" \"#{app_path}/sounds/\"" -** Processing line: ~ sh "cp -r \"#{root_folder}/sprites/\" \"#{app_path}/sprites/\""~ + clear_payload_directory +** Processing line: ~ stage_app~ - Inside source: true *** True Line Result - sh "cp -r \"#{root_folder}/sprites/\" \"#{app_path}/sprites/\"" -** Processing line: ~ sh "cp -r \"#{root_folder}/data/\" \"#{app_path}/data/\""~ + stage_app +** Processing line: ~ end~ - Inside source: true *** True Line Result - sh "cp -r \"#{root_folder}/data/\" \"#{app_path}/data/\"" -** Processing line: ~ sh "cp -r \"#{root_folder}/fonts/\" \"#{app_path}/fonts/\""~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - sh "cp -r \"#{root_folder}/fonts/\" \"#{app_path}/fonts/\"" -** Processing line: ~ sh "mkdir -p #{tmp_directory}/ipa_root/Payload"~ + +** Processing line: ~ def create_payload_directory_prod~ +- Inside source: true +*** True Line Result + def create_payload_directory_prod +** Processing line: ~ # production builds does not hotload ip address~ +- Inside source: true +*** True Line Result + # production builds does not hotload ip address +** Processing line: ~ sh %Q[rm "#{root_folder}/app/server_ip_address.txt"]~ +- Inside source: true +*** True Line Result + sh %Q[rm "#{root_folder}/app/server_ip_address.txt"] +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ embed_mobileprovision~ +- Inside source: true +*** True Line Result + embed_mobileprovision +** Processing line: ~ stage_app~ +- Inside source: true +*** True Line Result + stage_app +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ # production build marker~ - Inside source: true *** True Line Result - sh "mkdir -p #{tmp_directory}/ipa_root/Payload" -** Processing line: ~ sh "cp -r \"#{app_path}\" \"#{tmp_directory}/ipa_root/Payload\""~ + # production build marker +** Processing line: ~ sh %Q[mkdir -p "#{app_path}/metadata/"]~ - Inside source: true *** True Line Result - sh "cp -r \"#{app_path}\" \"#{tmp_directory}/ipa_root/Payload\"" -** Processing line: ~ sh "chmod -R 755 \"#{tmp_directory}/ipa_root/Payload\""~ + sh %Q[mkdir -p "#{app_path}/metadata/"] +** Processing line: ~ sh %Q[touch metadata/DRAGONRUBY_PRODUCTION_BUILD]~ - Inside source: true *** True Line Result - sh "chmod -R 755 \"#{tmp_directory}/ipa_root/Payload\"" + sh %Q[touch metadata/DRAGONRUBY_PRODUCTION_BUILD] ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -161131,22 +168878,70 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result def print_publish_help -** Processing line: ~ log_info "Go to https://appstoreconnect.apple.com/apps and create an App if you haven't already done so."~ +** Processing line: ~ has_transporter = (sh "ls /Applications/Transporter.app").include? "Contents"~ - Inside source: true *** True Line Result - log_info "Go to https://appstoreconnect.apple.com/apps and create an App if you haven't already done so." -** Processing line: ~ log_info "Go to https://appleid.apple.com and create a 'Application Specific Password'."~ + has_transporter = (sh "ls /Applications/Transporter.app").include? "Contents" +** Processing line: ~ if !has_transporter~ - Inside source: true *** True Line Result - log_info "Go to https://appleid.apple.com and create a 'Application Specific Password'." -** Processing line: ~ log_info "To upload your app, Download Transporter from the App Store https://apps.apple.com/us/app/transporter/id1450874784?mt=12."~ + if !has_transporter +** Processing line: ~ $gtk.openurl "https://apps.apple.com/us/app/transporter/id1450874784?mt=12"~ - Inside source: true *** True Line Result - log_info "To upload your app, Download Transporter from the App Store https://apps.apple.com/us/app/transporter/id1450874784?mt=12." -** Processing line: ~ log_info "Your app is located at ./tmp/ios/#{@app_name}.ipa"~ + $gtk.openurl "https://apps.apple.com/us/app/transporter/id1450874784?mt=12" +** Processing line: ~ $console.set_command "$wizards.ios.start env: :#{@opts[:env]}, version: \"#{@opts[:version]}\""~ - Inside source: true *** True Line Result - log_info "Your app is located at ./tmp/ios/#{@app_name}.ipa" + $console.set_command "$wizards.ios.start env: :#{@opts[:env]}, version: \"#{@opts[:version]}\"" +** Processing line: ~ raise WizardException.new(~ +- Inside source: true +*** True Line Result + raise WizardException.new( +** Processing line: ~ "* To upload your app, Download Transporter from the App Store https://apps.apple.com/us/app/transporter/id1450874784?mt=12."~ +- Inside source: true +*** True Line Result + "* To upload your app, Download Transporter from the App Store https://apps.apple.com/us/app/transporter/id1450874784?mt=12." +** Processing line: ~ )~ +- Inside source: true +*** True Line Result + ) +** Processing line: ~ else~ +- Inside source: true +*** True Line Result + else +** Processing line: ~ sh "mkdir ./tmp/ios/intermediary_artifacts"~ +- Inside source: true +*** True Line Result + sh "mkdir ./tmp/ios/intermediary_artifacts" +** Processing line: ~ sh "mv \"#{tmp_directory}/#{@app_name}.app\" #{tmp_directory}/intermediary_artifacts/"~ +- Inside source: true +*** True Line Result + sh "mv \"#{tmp_directory}/#{@app_name}.app\" #{tmp_directory}/intermediary_artifacts/" +** Processing line: ~ sh "mv \"#{tmp_directory}/do_zip.sh\" #{tmp_directory}/intermediary_artifacts"~ +- Inside source: true +*** True Line Result + sh "mv \"#{tmp_directory}/do_zip.sh\" #{tmp_directory}/intermediary_artifacts" +** Processing line: ~ sh "mv \"#{tmp_directory}/Entitlements.plist\" #{tmp_directory}/intermediary_artifacts"~ +- Inside source: true +*** True Line Result + sh "mv \"#{tmp_directory}/Entitlements.plist\" #{tmp_directory}/intermediary_artifacts" +** Processing line: ~ sh "mv \"#{tmp_directory}/ipa_root\" #{tmp_directory}/intermediary_artifacts/"~ +- Inside source: true +*** True Line Result + sh "mv \"#{tmp_directory}/ipa_root\" #{tmp_directory}/intermediary_artifacts/" +** Processing line: ~ sh "open /Applications/Transporter.app"~ +- Inside source: true +*** True Line Result + sh "open /Applications/Transporter.app" +** Processing line: ~ sh "open ./tmp/ios/"~ +- Inside source: true +*** True Line Result + sh "open ./tmp/ios/" +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -161227,78 +169022,62 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result end -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~#+end_src~ -- Line was identified as the end of a code block. -*** True Line Result -#+end_src -** Processing line: ~~ -- End of paragraph detected. -*** True Line Result - -** Processing line: ~*** itch_wizard.rb~ -- Header detected. -*** True Line Result - -*** True Line Result -*** itch_wizard.rb -** Processing line: ~#+begin_src ruby~ -- Line was identified as the beginning of a code block. -*** True Line Result - -*** True Line Result -#+begin_src ruby -** Processing line: ~ # ./dragon/itch_wizard.rb~ +** Processing line: ~ def set_version version~ - Inside source: true *** True Line Result - # ./dragon/itch_wizard.rb -** Processing line: ~ # Copyright 2019 DragonRuby LLC~ + def set_version version +** Processing line: ~ @app_version = version~ - Inside source: true *** True Line Result - # Copyright 2019 DragonRuby LLC -** Processing line: ~ # MIT License~ + @app_version = version +** Processing line: ~ start env: @opts[:env], version: version~ - Inside source: true *** True Line Result - # MIT License -** Processing line: ~ # itch_wizard.rb has been released under MIT (*only this file*).~ + start env: @opts[:env], version: version +** Processing line: ~ end~ - Inside source: true *** True Line Result - # itch_wizard.rb has been released under MIT (*only this file*). + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ class ItchWizard~ +** Processing line: ~ def app_version~ - Inside source: true *** True Line Result - class ItchWizard -** Processing line: ~ def steps~ + def app_version +** Processing line: ~ log_info "Attempting to retrieve App Version from metadata/ios_metadata.txt."~ - Inside source: true *** True Line Result - def steps -** Processing line: ~ [~ + log_info "Attempting to retrieve App Version from metadata/ios_metadata.txt." +** Processing line: ~ ios_version_number = (ios_metadata.version || "").strip~ - Inside source: true *** True Line Result - [ -** Processing line: ~ :check_metadata,~ + ios_version_number = (ios_metadata.version || "").strip +** Processing line: ~ if ios_version_number.length == 0~ - Inside source: true *** True Line Result - :check_metadata, -** Processing line: ~ :deploy~ + if ios_version_number.length == 0 +** Processing line: ~ log_info "Not found. Attempting to retrieve App Version from metadata/game_metadata.txt."~ - Inside source: true *** True Line Result - :deploy -** Processing line: ~ ]~ + log_info "Not found. Attempting to retrieve App Version from metadata/game_metadata.txt." +** Processing line: ~ ios_version_number = (game_metadata.version || "").strip~ - Inside source: true *** True Line Result - ] + ios_version_number = (game_metadata.version || "").strip +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~ ios_version_number~ +- Inside source: true +*** True Line Result + ios_version_number ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -161307,94 +169086,94 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def metadata_file_path~ +** Processing line: ~ def determine_app_version~ - Inside source: true *** True Line Result - def metadata_file_path -** Processing line: ~ "metadata/game_metadata.txt"~ + def determine_app_version +** Processing line: ~ @app_version = app_version~ - Inside source: true *** True Line Result - "metadata/game_metadata.txt" + @app_version = app_version +** Processing line: ~ return if @app_version~ +- Inside source: true +*** True Line Result + return if @app_version ** Processing line: ~ end~ - Inside source: true *** True Line Result end -** Processing line: ~~ +** Processing line: ~ end~ - Inside source: true *** True Line Result - -** Processing line: ~ def get_metadata~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - def get_metadata -** Processing line: ~ metadata = $gtk.read_file metadata_file_path~ -- Inside source: true + +** Processing line: ~#+end_src~ +- Line was identified as the end of a code block. *** True Line Result - metadata = $gtk.read_file metadata_file_path +#+end_src ** Processing line: ~~ -- Inside source: true +- End of paragraph detected. *** True Line Result -** Processing line: ~ if !metadata~ -- Inside source: true +** Processing line: ~*** itch_wizard.rb~ +- Header detected. *** True Line Result - if !metadata -** Processing line: ~ write_blank_metadata~ -- Inside source: true + *** True Line Result - write_blank_metadata -** Processing line: ~ metadata = $gtk.read_file metadata_file_path~ -- Inside source: true +*** itch_wizard.rb +** Processing line: ~#+begin_src ruby~ +- Line was identified as the beginning of a code block. *** True Line Result - metadata = $gtk.read_file metadata_file_path -** Processing line: ~ end~ -- Inside source: true + *** True Line Result - end -** Processing line: ~~ +#+begin_src ruby +** Processing line: ~ # ./dragon/itch_wizard.rb~ - Inside source: true *** True Line Result - -** Processing line: ~ dev_id, dev_title, game_id, game_title, version, icon = *metadata.each_line.to_a~ + # ./dragon/itch_wizard.rb +** Processing line: ~ # Copyright 2019 DragonRuby LLC~ - Inside source: true *** True Line Result - dev_id, dev_title, game_id, game_title, version, icon = *metadata.each_line.to_a -** Processing line: ~~ + # Copyright 2019 DragonRuby LLC +** Processing line: ~ # MIT License~ - Inside source: true *** True Line Result - -** Processing line: ~ {~ + # MIT License +** Processing line: ~ # itch_wizard.rb has been released under MIT (*only this file*).~ - Inside source: true *** True Line Result - { -** Processing line: ~ dev_id: dev_id.strip,~ + # itch_wizard.rb has been released under MIT (*only this file*). +** Processing line: ~~ - Inside source: true *** True Line Result - dev_id: dev_id.strip, -** Processing line: ~ dev_title: dev_title.strip,~ + +** Processing line: ~ class ItchWizard < Wizard~ - Inside source: true *** True Line Result - dev_title: dev_title.strip, -** Processing line: ~ game_id: game_id.strip,~ + class ItchWizard < Wizard +** Processing line: ~ def steps~ - Inside source: true *** True Line Result - game_id: game_id.strip, -** Processing line: ~ game_title: game_title.strip,~ + def steps +** Processing line: ~ [~ - Inside source: true *** True Line Result - game_title: game_title.strip, -** Processing line: ~ version: version.strip,~ + [ +** Processing line: ~ :check_metadata,~ - Inside source: true *** True Line Result - version: version.strip, -** Processing line: ~ icon: icon.strip~ + :check_metadata, +** Processing line: ~ :deploy,~ - Inside source: true *** True Line Result - icon: icon.strip -** Processing line: ~ }~ + :deploy, +** Processing line: ~ ]~ - Inside source: true *** True Line Result - } + ] ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -161471,10 +169250,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ if metadata_text.each_line.to_a.length != 6~ +** Processing line: ~ if metadata_text.strip.each_line.to_a.length < 6~ - Inside source: true *** True Line Result - if metadata_text.each_line.to_a.length != 6 + if metadata_text.strip.each_line.to_a.length < 6 ** Processing line: ~ write_blank_metadata~ - Inside source: true *** True Line Result @@ -161519,10 +169298,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result log "* PROMPT: Please provide your username for Itch." -** Processing line: ~ $console.set_command "$wizards.itch.set_dev_id \"your-itch-username\""~ +** Processing line: ~ $console.set_command "$wizards.itch.set_dev_id \"#{metadata[:dev_id]}\""~ - Inside source: true *** True Line Result - $console.set_command "$wizards.itch.set_dev_id \"your-itch-username\"" + $console.set_command "$wizards.itch.set_dev_id \"#{metadata[:dev_id]}\"" ** Processing line: ~ return :need_dev_id~ - Inside source: true *** True Line Result @@ -161543,10 +169322,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result log "* PROMPT: Please provide developer's/company's name that you want displayed." -** Processing line: ~ $console.set_command "$wizards.itch.set_dev_title \"Your Name\""~ +** Processing line: ~ $console.set_command "$wizards.itch.set_dev_title \"#{metadata[:dev_title]}\""~ - Inside source: true *** True Line Result - $console.set_command "$wizards.itch.set_dev_title \"Your Name\"" + $console.set_command "$wizards.itch.set_dev_title \"#{metadata[:dev_title]}\"" ** Processing line: ~ return :need_dev_title~ - Inside source: true *** True Line Result @@ -161567,10 +169346,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result log "* PROMPT: Please provide the id for you game. This is the id you specified when you set up a new game page on Itch." -** Processing line: ~ $console.set_command "$wizards.itch.set_game_id \"your-game-id\""~ +** Processing line: ~ $console.set_command "$wizards.itch.set_game_id \"#{metadata[:game_id]}\""~ - Inside source: true *** True Line Result - $console.set_command "$wizards.itch.set_game_id \"your-game-id\"" + $console.set_command "$wizards.itch.set_game_id \"#{metadata[:game_id]}\"" ** Processing line: ~ return :need_game_id~ - Inside source: true *** True Line Result @@ -161591,10 +169370,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result log "* PROMPT: Please provide the display name for your game. (This can include spaces)" -** Processing line: ~ $console.set_command "$wizards.itch.set_game_title \"Your Game\""~ +** Processing line: ~ $console.set_command "$wizards.itch.set_game_title \"#{metadata[:game_title]}\""~ - Inside source: true *** True Line Result - $console.set_command "$wizards.itch.set_game_title \"Your Game\"" + $console.set_command "$wizards.itch.set_game_title \"#{metadata[:game_title]}\"" ** Processing line: ~ return :need_game_title~ - Inside source: true *** True Line Result @@ -161615,10 +169394,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result log "* PROMPT: Please provide the version for your game." -** Processing line: ~ $console.set_command "$wizards.itch.set_version \"1.0\""~ +** Processing line: ~ $console.set_command "$wizards.itch.set_version \"#{metadata[:version]}\""~ - Inside source: true *** True Line Result - $console.set_command "$wizards.itch.set_version \"1.0\"" + $console.set_command "$wizards.itch.set_version \"#{metadata[:version]}\"" ** Processing line: ~ return :need_version~ - Inside source: true *** True Line Result @@ -161639,10 +169418,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result log "* PROMPT: Please provide icon path for your game." -** Processing line: ~ $console.set_command "$wizards.itch.set_icon \"icon.png\""~ +** Processing line: ~ $console.set_command "$wizards.itch.set_icon \"#{metadata[:icon]}\""~ - Inside source: true *** True Line Result - $console.set_command "$wizards.itch.set_icon \"icon.png\"" + $console.set_command "$wizards.itch.set_icon \"#{metadata[:icon]}\"" ** Processing line: ~ return :need_icon~ - Inside source: true *** True Line Result @@ -161655,6 +169434,14 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result +** Processing line: ~ puts "here!! success!!!"~ +- Inside source: true +*** True Line Result + puts "here!! success!!!" +** Processing line: ~~ +- Inside source: true +*** True Line Result + ** Processing line: ~ return :success~ - Inside source: true *** True Line Result @@ -161675,10 +169462,6 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result @dev_id = value -** Processing line: ~ write_metadata~ -- Inside source: true -*** True Line Result - write_metadata ** Processing line: ~ start~ - Inside source: true *** True Line Result @@ -161699,10 +169482,6 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result @dev_title = value -** Processing line: ~ write_metadata~ -- Inside source: true -*** True Line Result - write_metadata ** Processing line: ~ start~ - Inside source: true *** True Line Result @@ -161723,10 +169502,6 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result @game_id = value -** Processing line: ~ write_metadata~ -- Inside source: true -*** True Line Result - write_metadata ** Processing line: ~ start~ - Inside source: true *** True Line Result @@ -161747,10 +169522,6 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result @game_title = value -** Processing line: ~ write_metadata~ -- Inside source: true -*** True Line Result - write_metadata ** Processing line: ~ start~ - Inside source: true *** True Line Result @@ -161771,10 +169542,6 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result @version = value -** Processing line: ~ write_metadata~ -- Inside source: true -*** True Line Result - write_metadata ** Processing line: ~ start~ - Inside source: true *** True Line Result @@ -161943,10 +169710,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result if @icon -** Processing line: ~ text += "icon=metadata/#{@icon}\n"~ +** Processing line: ~ text += "icon=#{@icon}\n"~ - Inside source: true *** True Line Result - text += "icon=metadata/#{@icon}\n" + text += "icon=#{@icon}\n" ** Processing line: ~ else~ - Inside source: true *** True Line Result @@ -162015,10 +169782,34 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result log_info "* Running dragonruby-publish: #{package_command}" -** Processing line: ~ results = $gtk.exec package_command~ +** Processing line: ~ $gtk.openurl "http://itch.io/dashboard" if $gtk.platform == "Mac OS X"~ +- Inside source: true +*** True Line Result + $gtk.openurl "http://itch.io/dashboard" if $gtk.platform == "Mac OS X" +** Processing line: ~ if $gtk.platform? :mac~ +- Inside source: true +*** True Line Result + if $gtk.platform? :mac +** Processing line: ~ $gtk.exec "rm -rf ./builds"~ - Inside source: true *** True Line Result - results = $gtk.exec package_command + $gtk.exec "rm -rf ./builds" +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~ results = $gtk.exec "#{package_command} --only-package"~ +- Inside source: true +*** True Line Result + results = $gtk.exec "#{package_command} --only-package" +** Processing line: ~ puts File.expand_path("./builds")~ +- Inside source: true +*** True Line Result + puts File.expand_path("./builds") +** Processing line: ~~ +- Inside source: true +*** True Line Result + ** Processing line: ~ log "#+begin_src"~ - Inside source: true *** True Line Result @@ -162031,6 +169822,42 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result log "#+end_src" +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ if $gtk.platform? :mac~ +- Inside source: true +*** True Line Result + if $gtk.platform? :mac +** Processing line: ~ $gtk.exec "open ./builds/"~ +- Inside source: true +*** True Line Result + $gtk.exec "open ./builds/" +** Processing line: ~ elsif $gtk.platform? :windows~ +- Inside source: true +*** True Line Result + elsif $gtk.platform? :windows +** Processing line: ~ $gtk.exec "powershell \"ii .\""~ +- Inside source: true +*** True Line Result + $gtk.exec "powershell \"ii .\"" +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ $gtk.openurl "https://itch.io/dashboard"~ +- Inside source: true +*** True Line Result + $gtk.openurl "https://itch.io/dashboard" +** Processing line: ~~ +- Inside source: true +*** True Line Result + ** Processing line: ~ :success~ - Inside source: true *** True Line Result @@ -162071,10 +169898,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result log_info "Running Itch Wizard Step: ~$wizards.itch.#{m}~" -** Processing line: ~ result = (send m) || :success if @wizard_status[m][:result] != :success~ +** Processing line: ~ result = (send m) || :success~ - Inside source: true *** True Line Result - result = (send m) || :success if @wizard_status[m][:result] != :success + result = (send m) || :success ** Processing line: ~ @wizard_status[m][:result] = result~ - Inside source: true *** True Line Result @@ -163471,6 +171298,22 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result +** Processing line: ~ def row_max_index~ +- Inside source: true +*** True Line Result + def row_max_index +** Processing line: ~ row_count - 1~ +- Inside source: true +*** True Line Result + row_count - 1 +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + ** Processing line: ~ def col_count~ - Inside source: true *** True Line Result @@ -163487,6 +171330,22 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result +** Processing line: ~ def col_max_index~ +- Inside source: true +*** True Line Result + def col_max_index +** Processing line: ~ col_count - 1~ +- Inside source: true +*** True Line Result + col_count - 1 +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + ** Processing line: ~ def gutter_height~ - Inside source: true *** True Line Result @@ -163575,34 +171434,54 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result { -** Processing line: ~ row: nil,~ +** Processing line: ~ row: nil,~ +- Inside source: true +*** True Line Result + row: nil, +** Processing line: ~ col: nil,~ +- Inside source: true +*** True Line Result + col: nil, +** Processing line: ~ h: 1,~ +- Inside source: true +*** True Line Result + h: 1, +** Processing line: ~ w: 1,~ +- Inside source: true +*** True Line Result + w: 1, +** Processing line: ~ dx: 0,~ +- Inside source: true +*** True Line Result + dx: 0, +** Processing line: ~ dx_ratio: 1,~ - Inside source: true *** True Line Result - row: nil, -** Processing line: ~ col: nil,~ + dx_ratio: 1, +** Processing line: ~ dy: 0,~ - Inside source: true *** True Line Result - col: nil, -** Processing line: ~ h: 1,~ + dy: 0, +** Processing line: ~ dy_ratio: 1,~ - Inside source: true *** True Line Result - h: 1, -** Processing line: ~ w: 1,~ + dy_ratio: 1, +** Processing line: ~ dh_ratio: 1,~ - Inside source: true *** True Line Result - w: 1, -** Processing line: ~ dx: 0,~ + dh_ratio: 1, +** Processing line: ~ dw_ratio: 1,~ - Inside source: true *** True Line Result - dx: 0, -** Processing line: ~ dy: 0,~ + dw_ratio: 1, +** Processing line: ~ merge: nil,~ - Inside source: true *** True Line Result - dy: 0, -** Processing line: ~ rect: :control_rect~ + merge: nil, +** Processing line: ~ rect: :control_rect~ - Inside source: true *** True Line Result - rect: :control_rect + rect: :control_rect ** Processing line: ~ }~ - Inside source: true *** True Line Result @@ -163615,14 +171494,418 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def rect opts~ +** Processing line: ~ def row n~ +- Inside source: true +*** True Line Result + def row n +** Processing line: ~ (rect row: n, col: 0, w: 0, h: 0).x~ +- Inside source: true +*** True Line Result + (rect row: n, col: 0, w: 0, h: 0).x +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ def row_from_bottom n~ +- Inside source: true +*** True Line Result + def row_from_bottom n +** Processing line: ~ (rect row: row_count - n, col: 0, w: 0, h: 0).x~ +- Inside source: true +*** True Line Result + (rect row: row_count - n, col: 0, w: 0, h: 0).x +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ def col n~ +- Inside source: true +*** True Line Result + def col n +** Processing line: ~ (rect row: 0, col: n, w: 0, h: 0).y~ +- Inside source: true +*** True Line Result + (rect row: 0, col: n, w: 0, h: 0).y +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ def col_from_right n~ +- Inside source: true +*** True Line Result + def col_from_right n +** Processing line: ~ (rect row: 0, col: col_max_index - n, w: 0, h: 0).y~ +- Inside source: true +*** True Line Result + (rect row: 0, col: col_max_index - n, w: 0, h: 0).y +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ def w n~ +- Inside source: true +*** True Line Result + def w n +** Processing line: ~ (rect row: 0, col: 0, w: n, h: 1).w~ +- Inside source: true +*** True Line Result + (rect row: 0, col: 0, w: n, h: 1).w +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ def h n~ +- Inside source: true +*** True Line Result + def h n +** Processing line: ~ (rect row: 0, col: 0, w: 1, h: n).h~ +- Inside source: true +*** True Line Result + (rect row: 0, col: 0, w: 1, h: n).h +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ def rect_group opts~ +- Inside source: true +*** True Line Result + def rect_group opts +** Processing line: ~ group = opts.group~ +- Inside source: true +*** True Line Result + group = opts.group +** Processing line: ~ r = opts.row || 0~ +- Inside source: true +*** True Line Result + r = opts.row || 0 +** Processing line: ~ r = row_max_index - opts.row_from_bottom if opts.row_from_bottom~ +- Inside source: true +*** True Line Result + r = row_max_index - opts.row_from_bottom if opts.row_from_bottom +** Processing line: ~ c = opts.col || 0~ +- Inside source: true +*** True Line Result + c = opts.col || 0 +** Processing line: ~ c = col_max_index - opts.col_from_right if opts.col_from_right~ +- Inside source: true +*** True Line Result + c = col_max_index - opts.col_from_right if opts.col_from_right +** Processing line: ~ drow = opts.drow || 0~ +- Inside source: true +*** True Line Result + drow = opts.drow || 0 +** Processing line: ~ dcol = opts.dcol || 0~ +- Inside source: true +*** True Line Result + dcol = opts.dcol || 0 +** Processing line: ~ w = opts.w || 0~ +- Inside source: true +*** True Line Result + w = opts.w || 0 +** Processing line: ~ h = opts.h || 0~ +- Inside source: true +*** True Line Result + h = opts.h || 0 +** Processing line: ~ merge = opts[:merge]~ +- Inside source: true +*** True Line Result + merge = opts[:merge] +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ running_row = r~ +- Inside source: true +*** True Line Result + running_row = r +** Processing line: ~ running_col = c~ +- Inside source: true +*** True Line Result + running_col = c +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ running_col = calc_col_offset(opts.col_offset) if opts.col_offset~ +- Inside source: true +*** True Line Result + running_col = calc_col_offset(opts.col_offset) if opts.col_offset +** Processing line: ~ running_row = calc_row_offset(opts.row_offset) if opts.row_offset~ +- Inside source: true +*** True Line Result + running_row = calc_row_offset(opts.row_offset) if opts.row_offset +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ group.map do |i|~ +- Inside source: true +*** True Line Result + group.map do |i| +** Processing line: ~ group_layout_opts = i.layout || {}~ +- Inside source: true +*** True Line Result + group_layout_opts = i.layout || {} +** Processing line: ~ group_layout_opts = group_layout_opts.merge row: running_row,~ +- Inside source: true +*** True Line Result + group_layout_opts = group_layout_opts.merge row: running_row, +** Processing line: ~ col: running_col,~ +- Inside source: true +*** True Line Result + col: running_col, +** Processing line: ~ merge: merge,~ +- Inside source: true +*** True Line Result + merge: merge, +** Processing line: ~ w: w, h: h~ +- Inside source: true +*** True Line Result + w: w, h: h +** Processing line: ~ result = (rect group_layout_opts).merge i~ +- Inside source: true +*** True Line Result + result = (rect group_layout_opts).merge i +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ if (i.is_a? Hash) && (i.primitive_marker == :label)~ +- Inside source: true +*** True Line Result + if (i.is_a? Hash) && (i.primitive_marker == :label) +** Processing line: ~ if i.alignment_enum == 1~ +- Inside source: true +*** True Line Result + if i.alignment_enum == 1 +** Processing line: ~ result.x += result.w.half~ +- Inside source: true +*** True Line Result + result.x += result.w.half +** Processing line: ~ elsif i.alignment_enum == 2~ +- Inside source: true +*** True Line Result + elsif i.alignment_enum == 2 +** Processing line: ~ result.x += result.w~ +- Inside source: true +*** True Line Result + result.x += result.w +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ running_row += drow~ +- Inside source: true +*** True Line Result + running_row += drow +** Processing line: ~ running_col += dcol~ +- Inside source: true +*** True Line Result + running_col += dcol +** Processing line: ~ result~ +- Inside source: true +*** True Line Result + result +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ def calc_row_offset opts = {}~ +- Inside source: true +*** True Line Result + def calc_row_offset opts = {} +** Processing line: ~ count = opts[:count] || opts[:length] || 0~ +- Inside source: true +*** True Line Result + count = opts[:count] || opts[:length] || 0 +** Processing line: ~ h = opts.h || 1~ +- Inside source: true +*** True Line Result + h = opts.h || 1 +** Processing line: ~ (row_count - (count * h)) / 2.0~ +- Inside source: true +*** True Line Result + (row_count - (count * h)) / 2.0 +** Processing line: ~ end~ - Inside source: true *** True Line Result - def rect opts + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ def calc_col_offset opts = {}~ +- Inside source: true +*** True Line Result + def calc_col_offset opts = {} +** Processing line: ~ count = opts[:count] || opts[:length] || 0~ +- Inside source: true +*** True Line Result + count = opts[:count] || opts[:length] || 0 +** Processing line: ~ w = opts.w || 1~ +- Inside source: true +*** True Line Result + w = opts.w || 1 +** Processing line: ~ (col_count - (count * w)) / 2.0~ +- Inside source: true +*** True Line Result + (col_count - (count * w)) / 2.0 +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ def point opts = {}~ +- Inside source: true +*** True Line Result + def point opts = {} +** Processing line: ~ opts.w = 1~ +- Inside source: true +*** True Line Result + opts.w = 1 +** Processing line: ~ opts.h = 1~ +- Inside source: true +*** True Line Result + opts.h = 1 +** Processing line: ~ opts.row ||= 0~ +- Inside source: true +*** True Line Result + opts.row ||= 0 +** Processing line: ~ opts.col ||= 0~ +- Inside source: true +*** True Line Result + opts.col ||= 0 +** Processing line: ~ r = rect opts~ +- Inside source: true +*** True Line Result + r = rect opts +** Processing line: ~ r.x += r.w * opts.col_anchor if opts.col_anchor~ +- Inside source: true +*** True Line Result + r.x += r.w * opts.col_anchor if opts.col_anchor +** Processing line: ~ r.y += r.h * opts.row_anchor if opts.row_anchor~ +- Inside source: true +*** True Line Result + r.y += r.h * opts.row_anchor if opts.row_anchor +** Processing line: ~ r~ +- Inside source: true +*** True Line Result + r +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ def rect *all_opts~ +- Inside source: true +*** True Line Result + def rect *all_opts +** Processing line: ~ if all_opts.length == 1~ +- Inside source: true +*** True Line Result + if all_opts.length == 1 +** Processing line: ~ opts = all_opts.first~ +- Inside source: true +*** True Line Result + opts = all_opts.first +** Processing line: ~ else~ +- Inside source: true +*** True Line Result + else +** Processing line: ~ opts = {}~ +- Inside source: true +*** True Line Result + opts = {} +** Processing line: ~ all_opts.each do |o|~ +- Inside source: true +*** True Line Result + all_opts.each do |o| +** Processing line: ~ opts.merge! o~ +- Inside source: true +*** True Line Result + opts.merge! o +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ opts.row = row_max_index - opts.row_from_bottom if opts.row_from_bottom~ +- Inside source: true +*** True Line Result + opts.row = row_max_index - opts.row_from_bottom if opts.row_from_bottom +** Processing line: ~ opts.col = col_max_index - opts.col_from_right if opts.col_from_right~ +- Inside source: true +*** True Line Result + opts.col = col_max_index - opts.col_from_right if opts.col_from_right ** Processing line: ~ opts = rect_defaults.merge opts~ - Inside source: true *** True Line Result opts = rect_defaults.merge opts +** Processing line: ~ opts.row ||= 0~ +- Inside source: true +*** True Line Result + opts.row ||= 0 +** Processing line: ~ opts.col ||= 0~ +- Inside source: true +*** True Line Result + opts.col ||= 0 +** Processing line: ~~ +- Inside source: true +*** True Line Result + ** Processing line: ~ result = send opts[:rect]~ - Inside source: true *** True Line Result @@ -163651,10 +171934,18 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result w: col.w, -** Processing line: ~ h: row.h~ +** Processing line: ~ h: row.h,~ +- Inside source: true +*** True Line Result + h: row.h, +** Processing line: ~ center_x: col.center_x,~ - Inside source: true *** True Line Result - h: row.h + center_x: col.center_x, +** Processing line: ~ center_y: row.center_y~ +- Inside source: true +*** True Line Result + center_y: row.center_y ** Processing line: ~ elsif opts[:row] && !opts[:col]~ - Inside source: true *** True Line Result @@ -163803,22 +172094,42 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ result[:x] += opts[:dx] if opts[:dx]~ +** Processing line: ~ result[:x] += opts[:dx] if opts[:dx]~ +- Inside source: true +*** True Line Result + result[:x] += opts[:dx] if opts[:dx] +** Processing line: ~ result[:x] *= opts[:dx_ratio] if opts[:dx_ratio]~ +- Inside source: true +*** True Line Result + result[:x] *= opts[:dx_ratio] if opts[:dx_ratio] +** Processing line: ~ result[:y] += opts[:dy] if opts[:dy]~ +- Inside source: true +*** True Line Result + result[:y] += opts[:dy] if opts[:dy] +** Processing line: ~ result[:y] *= opts[:dy_ratio] if opts[:dy_ratio]~ +- Inside source: true +*** True Line Result + result[:y] *= opts[:dy_ratio] if opts[:dy_ratio] +** Processing line: ~ result[:w] += opts[:dw] if opts[:dw]~ - Inside source: true *** True Line Result - result[:x] += opts[:dx] if opts[:dx] -** Processing line: ~ result[:y] += opts[:dy] if opts[:dy]~ + result[:w] += opts[:dw] if opts[:dw] +** Processing line: ~ result[:w] *= opts[:dw_ratio] if opts[:dw_ratio]~ - Inside source: true *** True Line Result - result[:y] += opts[:dy] if opts[:dy] -** Processing line: ~ result[:w] += opts[:dw] if opts[:dw]~ + result[:w] *= opts[:dw_ratio] if opts[:dw_ratio] +** Processing line: ~ result[:h] += opts[:dh] if opts[:dh]~ - Inside source: true *** True Line Result - result[:w] += opts[:dw] if opts[:dw] -** Processing line: ~ result[:h] += opts[:dh] if opts[:dh]~ + result[:h] += opts[:dh] if opts[:dh] +** Processing line: ~ result[:h] *= opts[:dh_ratio] if opts[:dh_ratio]~ - Inside source: true *** True Line Result - result[:h] += opts[:dh] if opts[:dh] + result[:h] *= opts[:dh_ratio] if opts[:dh_ratio] +** Processing line: ~ result.merge! opts[:merge] if opts[:merge]~ +- Inside source: true +*** True Line Result + result.merge! opts[:merge] if opts[:merge] ** Processing line: ~ result[:row] = opts[:row]~ - Inside source: true *** True Line Result @@ -163831,6 +172142,18 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result +** Processing line: ~ result[:h] = result[:h].clamp 0~ +- Inside source: true +*** True Line Result + result[:h] = result[:h].clamp 0 +** Processing line: ~ result[:w] = result[:w].clamp 0~ +- Inside source: true +*** True Line Result + result[:w] = result[:w].clamp 0 +** Processing line: ~~ +- Inside source: true +*** True Line Result + ** Processing line: ~ if $gtk.args.grid.name == :center~ - Inside source: true *** True Line Result @@ -163967,10 +172290,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ result = control_rect.merge y: row_y, h: row_h~ +** Processing line: ~ result = control_rect.merge y: row_y, h: row_h, center_y: (row_y + row_h.half)~ - Inside source: true *** True Line Result - result = control_rect.merge y: row_y, h: row_h + result = control_rect.merge y: row_y, h: row_h, center_y: (row_y + row_h.half) ** Processing line: ~ @rect_cache[:row][index][h] = result~ - Inside source: true *** True Line Result @@ -164059,10 +172382,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ result = control_rect.merge x: col_x, w: col_w~ +** Processing line: ~ result = control_rect.merge x: col_x, w: col_w, center_x: (col_x + col_w.half)~ - Inside source: true *** True Line Result - result = control_rect.merge x: col_x, w: col_w + result = control_rect.merge x: col_x, w: col_w, center_x: (col_x + col_w.half) ** Processing line: ~ @rect_cache[:col][index][w] = result~ - Inside source: true *** True Line Result @@ -164263,6 +172586,86 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result +** Processing line: ~ def debug_primitives opts = {}~ +- Inside source: true +*** True Line Result + def debug_primitives opts = {} +** Processing line: ~ @primitives ||= col_count.map_with_index do |col|~ +- Inside source: true +*** True Line Result + @primitives ||= col_count.map_with_index do |col| +** Processing line: ~ row_count.map_with_index do |row|~ +- Inside source: true +*** True Line Result + row_count.map_with_index do |row| +** Processing line: ~ cell = rect row: row, col: col~ +- Inside source: true +*** True Line Result + cell = rect row: row, col: col +** Processing line: ~ center = Geometry.rect_center_point cell~ +- Inside source: true +*** True Line Result + center = Geometry.rect_center_point cell +** Processing line: ~ [~ +- Inside source: true +*** True Line Result + [ +** Processing line: ~ cell.merge(opts).border,~ +- Inside source: true +*** True Line Result + cell.merge(opts).border, +** Processing line: ~ cell.merge(opts)~ +- Inside source: true +*** True Line Result + cell.merge(opts) +** Processing line: ~ .label!(x: center.x,~ +- Inside source: true +*** True Line Result + .label!(x: center.x, +** Processing line: ~ y: center.y,~ +- Inside source: true +*** True Line Result + y: center.y, +** Processing line: ~ text: "#{row},#{col}",~ +- Inside source: true +*** True Line Result + text: "#{row},#{col}", +** Processing line: ~ size_enum: -3,~ +- Inside source: true +*** True Line Result + size_enum: -3, +** Processing line: ~ vertical_alignment_enum: 1,~ +- Inside source: true +*** True Line Result + vertical_alignment_enum: 1, +** Processing line: ~ alignment_enum: 1)~ +- Inside source: true +*** True Line Result + alignment_enum: 1) +** Processing line: ~ ]~ +- Inside source: true +*** True Line Result + ] +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~ @primitives~ +- Inside source: true +*** True Line Result + @primitives +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + ** Processing line: ~ def serialize~ - Inside source: true *** True Line Result @@ -164315,6 +172718,34 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ def reset~ +- Inside source: true +*** True Line Result + def reset +** Processing line: ~ @primitives = nil~ +- Inside source: true +*** True Line Result + @primitives = nil +** Processing line: ~ @rect_cache ||= {}~ +- Inside source: true +*** True Line Result + @rect_cache ||= {} +** Processing line: ~ @rect_cache.clear~ +- Inside source: true +*** True Line Result + @rect_cache.clear +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -164875,6 +173306,26 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result +** Processing line: ~ def self.reset~ +- Inside source: true +*** True Line Result + def self.reset +** Processing line: ~ @once = {}~ +- Inside source: true +*** True Line Result + @once = {} +** Processing line: ~ nil~ +- Inside source: true +*** True Line Result + nil +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + ** Processing line: ~ def self.puts_once *ids, message~ - Inside source: true *** True Line Result @@ -165419,6 +173870,198 @@ Follows is a source code listing for all files that have been open sourced. This - End of paragraph detected. *** True Line Result +** Processing line: ~*** metadata.rb~ +- Header detected. +*** True Line Result + +*** True Line Result +*** metadata.rb +** Processing line: ~#+begin_src ruby~ +- Line was identified as the beginning of a code block. +*** True Line Result + +*** True Line Result +#+begin_src ruby +** Processing line: ~ # ./dragon/metadata.rb~ +- Inside source: true +*** True Line Result + # ./dragon/metadata.rb +** Processing line: ~ # Contributors outside of DragonRuby who also hold Copyright: Michał Dudziński~ +- Inside source: true +*** True Line Result + # Contributors outside of DragonRuby who also hold Copyright: Michał Dudziński +** Processing line: ~ # Copyright 2021 DragonRuby LLC~ +- Inside source: true +*** True Line Result + # Copyright 2021 DragonRuby LLC +** Processing line: ~ # MIT License~ +- Inside source: true +*** True Line Result + # MIT License +** Processing line: ~ # metadata.rb has been released under MIT (*only this file*).~ +- Inside source: true +*** True Line Result + # metadata.rb has been released under MIT (*only this file*). +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ module Metadata~ +- Inside source: true +*** True Line Result + module Metadata +** Processing line: ~ def metadata_file_path~ +- Inside source: true +*** True Line Result + def metadata_file_path +** Processing line: ~ "metadata/game_metadata.txt"~ +- Inside source: true +*** True Line Result + "metadata/game_metadata.txt" +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ def get_metadata~ +- Inside source: true +*** True Line Result + def get_metadata +** Processing line: ~ metadata = $gtk.read_file metadata_file_path~ +- Inside source: true +*** True Line Result + metadata = $gtk.read_file metadata_file_path +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ if !metadata~ +- Inside source: true +*** True Line Result + if !metadata +** Processing line: ~ write_blank_metadata~ +- Inside source: true +*** True Line Result + write_blank_metadata +** Processing line: ~ metadata = $gtk.read_file metadata_file_path~ +- Inside source: true +*** True Line Result + metadata = $gtk.read_file metadata_file_path +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ dev_id, dev_title, game_id, game_title, version, icon = *metadata.each_line.to_a~ +- Inside source: true +*** True Line Result + dev_id, dev_title, game_id, game_title, version, icon = *metadata.each_line.to_a +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ {~ +- Inside source: true +*** True Line Result + { +** Processing line: ~ dev_id: dev_id.strip,~ +- Inside source: true +*** True Line Result + dev_id: dev_id.strip, +** Processing line: ~ dev_title: dev_title.strip,~ +- Inside source: true +*** True Line Result + dev_title: dev_title.strip, +** Processing line: ~ game_id: game_id.strip,~ +- Inside source: true +*** True Line Result + game_id: game_id.strip, +** Processing line: ~ game_title: game_title.strip,~ +- Inside source: true +*** True Line Result + game_title: game_title.strip, +** Processing line: ~ version: version.strip,~ +- Inside source: true +*** True Line Result + version: version.strip, +** Processing line: ~ icon: icon.strip~ +- Inside source: true +*** True Line Result + icon: icon.strip +** Processing line: ~ }~ +- Inside source: true +*** True Line Result + } +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ def write_blank_metadata~ +- Inside source: true +*** True Line Result + def write_blank_metadata +** Processing line: ~ $gtk.write_file metadata_file_path, <<-S.strip~ +- Inside source: true +*** True Line Result + $gtk.write_file metadata_file_path, <<-S.strip +** Processing line: ~ #devid=myname~ +- Inside source: true +*** True Line Result + #devid=myname +** Processing line: ~ #devtitle=My Name~ +- Inside source: true +*** True Line Result + #devtitle=My Name +** Processing line: ~ #gameid=mygame~ +- Inside source: true +*** True Line Result + #gameid=mygame +** Processing line: ~ #gametitle=My Game~ +- Inside source: true +*** True Line Result + #gametitle=My Game +** Processing line: ~ #version=0.1~ +- Inside source: true +*** True Line Result + #version=0.1 +** Processing line: ~ #icon=metadata/icon.png~ +- Inside source: true +*** True Line Result + #icon=metadata/icon.png +** Processing line: ~ S~ +- Inside source: true +*** True Line Result + S +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~#+end_src~ +- Line was identified as the end of a code block. +*** True Line Result +#+end_src +** Processing line: ~~ +- End of paragraph detected. +*** True Line Result + ** Processing line: ~*** numeric.rb~ - Header detected. *** True Line Result @@ -165495,6 +174138,122 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result +** Processing line: ~ def to_layout_row opts = {}~ +- Inside source: true +*** True Line Result + def to_layout_row opts = {} +** Processing line: ~ $layout.rect(row: self,~ +- Inside source: true +*** True Line Result + $layout.rect(row: self, +** Processing line: ~ col: opts.col || 0,~ +- Inside source: true +*** True Line Result + col: opts.col || 0, +** Processing line: ~ w: opts.w || 0,~ +- Inside source: true +*** True Line Result + w: opts.w || 0, +** Processing line: ~ h: opts.h || 0).y~ +- Inside source: true +*** True Line Result + h: opts.h || 0).y +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ def to_layout_col opts = {}~ +- Inside source: true +*** True Line Result + def to_layout_col opts = {} +** Processing line: ~ $layout.rect(row: 0,~ +- Inside source: true +*** True Line Result + $layout.rect(row: 0, +** Processing line: ~ col: self,~ +- Inside source: true +*** True Line Result + col: self, +** Processing line: ~ w: opts.w || 0,~ +- Inside source: true +*** True Line Result + w: opts.w || 0, +** Processing line: ~ h: opts.h || 0).x~ +- Inside source: true +*** True Line Result + h: opts.h || 0).x +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ def to_layout_w~ +- Inside source: true +*** True Line Result + def to_layout_w +** Processing line: ~ $layout.rect(row: 0, col: 0, w: self, h: 1).w~ +- Inside source: true +*** True Line Result + $layout.rect(row: 0, col: 0, w: self, h: 1).w +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ def to_layout_h~ +- Inside source: true +*** True Line Result + def to_layout_h +** Processing line: ~ $layout.rect(row: 0, col: 0, w: 1, h: self).h~ +- Inside source: true +*** True Line Result + $layout.rect(row: 0, col: 0, w: 1, h: self).h +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ def to_layout_row_from_bottom opts = {}~ +- Inside source: true +*** True Line Result + def to_layout_row_from_bottom opts = {} +** Processing line: ~ ($layout.row_max_index - self).to_layout_row opts~ +- Inside source: true +*** True Line Result + ($layout.row_max_index - self).to_layout_row opts +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ def to_layout_col_from_right opts = {}~ +- Inside source: true +*** True Line Result + def to_layout_col_from_right opts = {} +** Processing line: ~ ($layout.col_max_index - self).to_layout_col opts~ +- Inside source: true +*** True Line Result + ($layout.col_max_index - self).to_layout_col opts +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result @@ -165555,6 +174314,38 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result +** Processing line: ~ def third~ +- Inside source: true +*** True Line Result + def third +** Processing line: ~ self / 3.0~ +- Inside source: true +*** True Line Result + self / 3.0 +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ def quarter~ +- Inside source: true +*** True Line Result + def quarter +** Processing line: ~ self / 4.0~ +- Inside source: true +*** True Line Result + self / 4.0 +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + ** Processing line: ~ def to_byte~ - Inside source: true *** True Line Result @@ -165571,6 +174362,38 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result +** Processing line: ~ def clamp *opts~ +- Inside source: true +*** True Line Result + def clamp *opts +** Processing line: ~ min = (opts.at 0)~ +- Inside source: true +*** True Line Result + min = (opts.at 0) +** Processing line: ~ max = (opts.at 1)~ +- Inside source: true +*** True Line Result + max = (opts.at 1) +** Processing line: ~ return min if min && self < min~ +- Inside source: true +*** True Line Result + return min if min && self < min +** Processing line: ~ return max if max && self > max~ +- Inside source: true +*** True Line Result + return max if max && self > max +** Processing line: ~ return self~ +- Inside source: true +*** True Line Result + return self +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + ** Processing line: ~ def clamp_wrap min, max~ - Inside source: true *** True Line Result @@ -166467,10 +175290,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Converts a number representing an angle in radians to degress.~ +** Processing line: ~ # Converts a number representing an angle in radians to degrees.~ - Inside source: true *** True Line Result - # Converts a number representing an angle in radians to degress. + # Converts a number representing an angle in radians to degrees. ** Processing line: ~ #~ - Inside source: true *** True Line Result @@ -166535,10 +175358,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Returns a normal vector for a number that represents an angle in degress.~ +** Processing line: ~ # Returns a normal vector for a number that represents an angle in degrees.~ - Inside source: true *** True Line Result - # Returns a normal vector for a number that represents an angle in degress. + # Returns a normal vector for a number that represents an angle in degrees. ** Processing line: ~ #~ - Inside source: true *** True Line Result @@ -166563,10 +175386,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Returns the y component of a normal vector for a number that represents an angle in degress.~ +** Processing line: ~ # Returns the y component of a normal vector for a number that represents an angle in degrees.~ - Inside source: true *** True Line Result - # Returns the y component of a normal vector for a number that represents an angle in degress. + # Returns the y component of a normal vector for a number that represents an angle in degrees. ** Processing line: ~ #~ - Inside source: true *** True Line Result @@ -166591,10 +175414,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Returns the x component of a normal vector for a number that represents an angle in degress.~ +** Processing line: ~ # Returns the x component of a normal vector for a number that represents an angle in degrees.~ - Inside source: true *** True Line Result - # Returns the x component of a normal vector for a number that represents an angle in degress. + # Returns the x component of a normal vector for a number that represents an angle in degrees. ** Processing line: ~ #~ - Inside source: true *** True Line Result @@ -166699,6 +175522,54 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result +** Processing line: ~ def multiply n~ +- Inside source: true +*** True Line Result + def multiply n +** Processing line: ~ self * n~ +- Inside source: true +*** True Line Result + self * n +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ def fmult n~ +- Inside source: true +*** True Line Result + def fmult n +** Processing line: ~ self * n.to_f~ +- Inside source: true +*** True Line Result + self * n.to_f +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ def imult n~ +- Inside source: true +*** True Line Result + def imult n +** Processing line: ~ (self * n).to_i~ +- Inside source: true +*** True Line Result + (self * n).to_i +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + ** Processing line: ~ def mult n~ - Inside source: true *** True Line Result @@ -167183,30 +176054,6 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def == other~ -- Inside source: true -*** True Line Result - def == other -** Processing line: ~ return true if __original_eq_eq__ other~ -- Inside source: true -*** True Line Result - return true if __original_eq_eq__ other -** Processing line: ~ return __original_eq_eq__ other.entity_id if other.is_a? OpenEntity~ -- Inside source: true -*** True Line Result - return __original_eq_eq__ other.entity_id if other.is_a? OpenEntity -** Processing line: ~ return false~ -- Inside source: true -*** True Line Result - return false -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end -** Processing line: ~~ -- Inside source: true -*** True Line Result - ** Processing line: ~ # @gtk~ - Inside source: true *** True Line Result @@ -167551,14 +176398,14 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result def - other -** Processing line: ~ return nil unless other~ +** Processing line: ~ return self unless other~ - Inside source: true *** True Line Result - return nil unless other -** Processing line: ~ super~ + return self unless other +** Processing line: ~ self - other~ - Inside source: true *** True Line Result - super + self - other ** Processing line: ~ rescue Exception => e~ - Inside source: true *** True Line Result @@ -167579,14 +176426,14 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result def + other -** Processing line: ~ return nil unless other~ +** Processing line: ~ return self unless other~ - Inside source: true *** True Line Result - return nil unless other -** Processing line: ~ super~ + return self unless other +** Processing line: ~ self + other~ - Inside source: true *** True Line Result - super + self + other ** Processing line: ~ rescue Exception => e~ - Inside source: true *** True Line Result @@ -167607,14 +176454,14 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result def * other -** Processing line: ~ return nil unless other~ +** Processing line: ~ return self unless other~ - Inside source: true *** True Line Result - return nil unless other -** Processing line: ~ super~ + return self unless other +** Processing line: ~ self * other~ - Inside source: true *** True Line Result - super + self * other ** Processing line: ~ rescue Exception => e~ - Inside source: true *** True Line Result @@ -167635,14 +176482,14 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result def / other -** Processing line: ~ return nil unless other~ +** Processing line: ~ return self unless other~ - Inside source: true *** True Line Result - return nil unless other -** Processing line: ~ super~ + return self unless other +** Processing line: ~ self / other~ - Inside source: true *** True Line Result - super + self / other ** Processing line: ~ rescue Exception => e~ - Inside source: true *** True Line Result @@ -167757,6 +176604,22 @@ Follows is a source code listing for all files that have been open sourced. This n.clamp min, max ** Processing line: ~ end~ - Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ def mid? l, r~ +- Inside source: true +*** True Line Result + def mid? l, r +** Processing line: ~ (between? l, r) || (between? r, l)~ +- Inside source: true +*** True Line Result + (between? l, r) || (between? r, l) +** Processing line: ~ end~ +- Inside source: true *** True Line Result end ** Processing line: ~ end~ @@ -167863,14 +176726,14 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result def + other -** Processing line: ~ return nil unless other~ +** Processing line: ~ return self unless other~ - Inside source: true *** True Line Result - return nil unless other -** Processing line: ~ super~ + return self unless other +** Processing line: ~ self + other~ - Inside source: true *** True Line Result - super + self + other ** Processing line: ~ rescue Exception => e~ - Inside source: true *** True Line Result @@ -167891,14 +176754,14 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result def * other -** Processing line: ~ return nil unless other~ +** Processing line: ~ return self unless other~ - Inside source: true *** True Line Result - return nil unless other -** Processing line: ~ super~ + return self unless other +** Processing line: ~ self * other~ - Inside source: true *** True Line Result - super + self * other ** Processing line: ~ rescue Exception => e~ - Inside source: true *** True Line Result @@ -167919,14 +176782,14 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result def / other -** Processing line: ~ return nil unless other~ +** Processing line: ~ return self unless other~ - Inside source: true *** True Line Result - return nil unless other -** Processing line: ~ super~ + return self unless other +** Processing line: ~ self / other~ - Inside source: true *** True Line Result - super + self / other ** Processing line: ~ rescue Exception => e~ - Inside source: true *** True Line Result @@ -167947,14 +176810,14 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result def - other -** Processing line: ~ return nil unless other~ +** Processing line: ~ return self unless other~ - Inside source: true *** True Line Result - return nil unless other -** Processing line: ~ super~ + return self unless other +** Processing line: ~ self - other~ - Inside source: true *** True Line Result - super + self - other ** Processing line: ~ rescue Exception => e~ - Inside source: true *** True Line Result @@ -167971,30 +176834,6 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def == other~ -- Inside source: true -*** True Line Result - def == other -** Processing line: ~ return true if __original_eq_eq__ other~ -- Inside source: true -*** True Line Result - return true if __original_eq_eq__ other -** Processing line: ~ return __original_eq_eq__ other.entity_id if other.is_a? GTK::OpenEntity~ -- Inside source: true -*** True Line Result - return __original_eq_eq__ other.entity_id if other.is_a? GTK::OpenEntity -** Processing line: ~ return false~ -- Inside source: true -*** True Line Result - return false -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end -** Processing line: ~~ -- Inside source: true -*** True Line Result - ** Processing line: ~ # Returns `-1` if the number is less than `0`. `+1` if the number~ - Inside source: true *** True Line Result @@ -168219,10 +177058,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result def - other -** Processing line: ~ return nil unless other~ +** Processing line: ~ return self unless other~ - Inside source: true *** True Line Result - return nil unless other + return self unless other ** Processing line: ~ super~ - Inside source: true *** True Line Result @@ -168247,10 +177086,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result def + other -** Processing line: ~ return nil unless other~ +** Processing line: ~ return self unless other~ - Inside source: true *** True Line Result - return nil unless other + return self unless other ** Processing line: ~ super~ - Inside source: true *** True Line Result @@ -168275,10 +177114,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result def * other -** Processing line: ~ return nil unless other~ +** Processing line: ~ return self unless other~ - Inside source: true *** True Line Result - return nil unless other + return self unless other ** Processing line: ~ super~ - Inside source: true *** True Line Result @@ -168303,10 +177142,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result def / other -** Processing line: ~ return nil unless other~ +** Processing line: ~ return self unless other~ - Inside source: true *** True Line Result - return nil unless other + return self unless other ** Processing line: ~ super~ - Inside source: true *** True Line Result @@ -168489,6 +177328,22 @@ Follows is a source code listing for all files that have been open sourced. This false ** Processing line: ~ end~ - Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ def center other~ +- Inside source: true +*** True Line Result + def center other +** Processing line: ~ (self - other).abs.fdiv(2)~ +- Inside source: true +*** True Line Result + (self - other).abs.fdiv(2) +** Processing line: ~ end~ +- Inside source: true *** True Line Result end ** Processing line: ~ end~ @@ -168719,10 +177574,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result @local_state.hotload_client ||= @local_state.new_entity(:hotload_client, -** Processing line: ~ notes: "This enitity is used by DragonRuby Game Toolkit to provide you hotloading on remote machines.",~ +** Processing line: ~ notes: "This entity is used by DragonRuby Game Toolkit to provide you hotloading on remote machines.",~ - Inside source: true *** True Line Result - notes: "This enitity is used by DragonRuby Game Toolkit to provide you hotloading on remote machines.", + notes: "This entity is used by DragonRuby Game Toolkit to provide you hotloading on remote machines.", ** Processing line: ~ changes: { },~ - Inside source: true *** True Line Result @@ -169427,10 +178282,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result token = (word.split " ")[-1] -** Processing line: ~ dots = (token.split ".")~ +** Processing line: ~ dots = (token.split ".").flat_map { |s| s.split "[" }.flat_map { |s| s.split "]" }.flat_map { |s| s.split "(" }.flat_map { |s| s.split ")" }~ - Inside source: true *** True Line Result - dots = (token.split ".") + dots = (token.split ".").flat_map { |s| s.split "[" }.flat_map { |s| s.split "]" }.flat_map { |s| s.split "(" }.flat_map { |s| s.split ")" } ** Processing line: ~ dot = dots[-1]~ - Inside source: true *** True Line Result @@ -169511,6 +178366,22 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result keys = keys.map { |k| k.to_s } +** Processing line: ~ keys = keys.reject { |k| k.include? '"' }~ +- Inside source: true +*** True Line Result + keys = keys.reject { |k| k.include? '"' } +** Processing line: ~ .reject { |k| k.start_with? "'" }~ +- Inside source: true +*** True Line Result + .reject { |k| k.start_with? "'" } +** Processing line: ~ .reject { |k| k.include? "," }~ +- Inside source: true +*** True Line Result + .reject { |k| k.include? "," } +** Processing line: ~ .reject { |k| k.start_with? "#" }~ +- Inside source: true +*** True Line Result + .reject { |k| k.start_with? "#" } ** Processing line: ~ others = ["def", "end"] +~ - Inside source: true *** True Line Result @@ -169739,6 +178610,22 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result +** Processing line: ~ if dot[0].upcase == dot[0] && (Object.const_defined? dot.to_sym)~ +- Inside source: true +*** True Line Result + if dot[0].upcase == dot[0] && (Object.const_defined? dot.to_sym) +** Processing line: ~ return (Object.const_get dot.to_sym).autocomplete_methods~ +- Inside source: true +*** True Line Result + return (Object.const_get dot.to_sym).autocomplete_methods +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + ** Processing line: ~ start_collecting = false~ - Inside source: true *** True Line Result @@ -169799,10 +178686,26 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ return autocomplete_filter_methods target.as_hash.keys~ +** Processing line: ~ if target.respond_to? :as_hash~ +- Inside source: true +*** True Line Result + if target.respond_to? :as_hash +** Processing line: ~ return autocomplete_filter_methods target.as_hash.keys~ +- Inside source: true +*** True Line Result + return autocomplete_filter_methods target.as_hash.keys +** Processing line: ~ else~ +- Inside source: true +*** True Line Result + else +** Processing line: ~ return autocomplete_filter_methods target.autocomplete_methods~ - Inside source: true *** True Line Result - return autocomplete_filter_methods target.as_hash.keys + return autocomplete_filter_methods target.autocomplete_methods +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -169815,6 +178718,14 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result +** Processing line: ~ text = text.each_line.reject { |l| l.strip.start_with? "#" }.join "\n"~ +- Inside source: true +*** True Line Result + text = text.each_line.reject { |l| l.strip.start_with? "#" }.join "\n" +** Processing line: ~ text = text.each_line.map { |l| l.split("#").first }.join "\n"~ +- Inside source: true +*** True Line Result + text = text.each_line.map { |l| l.split("#").first }.join "\n" ** Processing line: ~ text.gsub!("[", " ")~ - Inside source: true *** True Line Result @@ -169879,22 +178790,22 @@ Follows is a source code listing for all files that have been open sourced. This - End of paragraph detected. *** True Line Result -** Processing line: ~*** runtime/draw.rb~ +** Processing line: ~*** runtime/benchmark.rb~ - Header detected. *** True Line Result *** True Line Result -*** runtime/draw.rb +*** runtime/benchmark.rb ** Processing line: ~#+begin_src ruby~ - Line was identified as the beginning of a code block. *** True Line Result *** True Line Result #+begin_src ruby -** Processing line: ~ # ./dragon/runtime/draw.rb~ +** Processing line: ~ # ./dragon/runtime/benchmark.rb~ - Inside source: true *** True Line Result - # ./dragon/runtime/draw.rb + # ./dragon/runtime/benchmark.rb ** Processing line: ~ # Copyright 2019 DragonRuby LLC~ - Inside source: true *** True Line Result @@ -169903,10 +178814,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result # MIT License -** Processing line: ~ # draw.rb has been released under MIT (*only this file*).~ +** Processing line: ~ # benchmark.rb has been released under MIT (*only this file*).~ - Inside source: true *** True Line Result - # draw.rb has been released under MIT (*only this file*). + # benchmark.rb has been released under MIT (*only this file*). ** Processing line: ~~ - Inside source: true *** True Line Result @@ -169919,66 +178830,46 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result class Runtime -** Processing line: ~ module Draw~ -- Inside source: true -*** True Line Result - module Draw -** Processing line: ~ def primitives pass~ -- Inside source: true -*** True Line Result - def primitives pass -** Processing line: ~ if $top_level.respond_to? :primitives_override~ -- Inside source: true -*** True Line Result - if $top_level.respond_to? :primitives_override -** Processing line: ~ return $top_level.tick_render @args, pass~ -- Inside source: true -*** True Line Result - return $top_level.tick_render @args, pass -** Processing line: ~ end~ +** Processing line: ~ module Benchmark~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + module Benchmark +** Processing line: ~ def benchmark_single iterations, name, proc~ - Inside source: true *** True Line Result - -** Processing line: ~ # Don't change this draw order unless you understand~ + def benchmark_single iterations, name, proc +** Processing line: ~ log <<-S~ - Inside source: true *** True Line Result - # Don't change this draw order unless you understand -** Processing line: ~ # the implications.~ + log <<-S +** Processing line: ~ ** Invoking :#{name}...~ - Inside source: true *** True Line Result - # the implications. -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ # pass.solids.each { |s| draw_solid s }~ + ** Invoking :#{name}... +** Processing line: ~ S~ - Inside source: true *** True Line Result - # pass.solids.each { |s| draw_solid s } -** Processing line: ~ # while loops are faster than each with block~ + S +** Processing line: ~ time_start = Time.now~ - Inside source: true *** True Line Result - # while loops are faster than each with block + time_start = Time.now ** Processing line: ~ idx = 0~ - Inside source: true *** True Line Result idx = 0 -** Processing line: ~ length = pass.solids.length~ +** Processing line: ~ r = nil~ - Inside source: true *** True Line Result - length = pass.solids.length -** Processing line: ~ while idx < pass.solids.length~ + r = nil +** Processing line: ~ while idx < iterations~ - Inside source: true *** True Line Result - while idx < pass.solids.length -** Processing line: ~ draw_solid (pass.solids.at idx) # accessing an array using .value instead of [] is faster~ + while idx < iterations +** Processing line: ~ r = proc.call~ - Inside source: true *** True Line Result - draw_solid (pass.solids.at idx) # accessing an array using .value instead of [] is faster + r = proc.call ** Processing line: ~ idx += 1~ - Inside source: true *** True Line Result @@ -169991,158 +178882,182 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # pass.static_solids.each { |s| draw_solid s }~ +** Processing line: ~ result = (Time.now - time_start).round 3~ - Inside source: true *** True Line Result - # pass.static_solids.each { |s| draw_solid s } -** Processing line: ~ idx = 0~ + result = (Time.now - time_start).round 3 +** Processing line: ~~ - Inside source: true *** True Line Result - idx = 0 -** Processing line: ~ length = pass.static_solids.length~ + +** Processing line: ~ { name: name,~ - Inside source: true *** True Line Result - length = pass.static_solids.length -** Processing line: ~ while idx < length~ + { name: name, +** Processing line: ~ time: result,~ - Inside source: true *** True Line Result - while idx < length -** Processing line: ~ draw_solid (pass.static_solids.at idx)~ + time: result, +** Processing line: ~ time_ms: (result * 1000).to_i }~ - Inside source: true *** True Line Result - draw_solid (pass.static_solids.at idx) -** Processing line: ~ idx += 1~ + time_ms: (result * 1000).to_i } +** Processing line: ~ end~ - Inside source: true *** True Line Result - idx += 1 -** Processing line: ~ end~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - end + +** Processing line: ~ def benchmark opts = {}~ +- Inside source: true +*** True Line Result + def benchmark opts = {} +** Processing line: ~ iterations = opts.iterations~ +- Inside source: true +*** True Line Result + iterations = opts.iterations ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # pass.sprites.each { |s| draw_sprite s }~ +** Processing line: ~ log <<-S~ - Inside source: true *** True Line Result - # pass.sprites.each { |s| draw_sprite s } -** Processing line: ~ idx = 0~ + log <<-S +** Processing line: ~ * BENCHMARK: Started~ - Inside source: true *** True Line Result - idx = 0 -** Processing line: ~ length = pass.sprites.length~ + * BENCHMARK: Started +** Processing line: ~ ** Caller: #{(caller || []).first}~ - Inside source: true *** True Line Result - length = pass.sprites.length -** Processing line: ~ while idx < length~ + ** Caller: #{(caller || []).first} +** Processing line: ~ ** Iterations: #{iterations}~ - Inside source: true *** True Line Result - while idx < length -** Processing line: ~ draw_sprite (pass.sprites.at idx)~ + ** Iterations: #{iterations} +** Processing line: ~ S~ - Inside source: true *** True Line Result - draw_sprite (pass.sprites.at idx) -** Processing line: ~ idx += 1~ + S +** Processing line: ~ procs = opts.find_all { |k, v| v.respond_to? :call }~ - Inside source: true *** True Line Result - idx += 1 -** Processing line: ~ end~ + procs = opts.find_all { |k, v| v.respond_to? :call } +** Processing line: ~~ - Inside source: true *** True Line Result - end + +** Processing line: ~ times = procs.map do |(name, proc)|~ +- Inside source: true +*** True Line Result + times = procs.map do |(name, proc)| +** Processing line: ~ benchmark_single iterations, name, proc~ +- Inside source: true +*** True Line Result + benchmark_single iterations, name, proc +** Processing line: ~ end.sort_by { |r| r.time }~ +- Inside source: true +*** True Line Result + end.sort_by { |r| r.time } ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # pass.static_sprites.each { |s| draw_sprite s }~ +** Processing line: ~ first_place = times.first~ - Inside source: true *** True Line Result - # pass.static_sprites.each { |s| draw_sprite s } -** Processing line: ~ idx = 0~ + first_place = times.first +** Processing line: ~ second_place = times.second || first_place~ - Inside source: true *** True Line Result - idx = 0 -** Processing line: ~ length = pass.static_sprites.length~ + second_place = times.second || first_place +** Processing line: ~~ - Inside source: true *** True Line Result - length = pass.static_sprites.length -** Processing line: ~ while idx < length~ + +** Processing line: ~ times = times.map do |candidate|~ - Inside source: true *** True Line Result - while idx < length -** Processing line: ~ draw_sprite (pass.static_sprites.at idx)~ + times = times.map do |candidate| +** Processing line: ~ average_time = first_place.time~ - Inside source: true *** True Line Result - draw_sprite (pass.static_sprites.at idx) -** Processing line: ~ idx += 1~ + average_time = first_place.time +** Processing line: ~ .add(candidate.time)~ - Inside source: true *** True Line Result - idx += 1 -** Processing line: ~ end~ + .add(candidate.time) +** Processing line: ~ .abs~ - Inside source: true *** True Line Result - end + .abs +** Processing line: ~ .fdiv(2)~ +- Inside source: true +*** True Line Result + .fdiv(2) ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # pass.primitives.each { |p| draw_primitive p }~ +** Processing line: ~ difference_percentage = 0~ - Inside source: true *** True Line Result - # pass.primitives.each { |p| draw_primitive p } -** Processing line: ~ idx = 0~ + difference_percentage = 0 +** Processing line: ~ if average_time == 0~ - Inside source: true *** True Line Result - idx = 0 -** Processing line: ~ length = pass.primitives.length~ + if average_time == 0 +** Processing line: ~ difference_percentage = 0~ - Inside source: true *** True Line Result - length = pass.primitives.length -** Processing line: ~ while idx < length~ + difference_percentage = 0 +** Processing line: ~ else~ - Inside source: true *** True Line Result - while idx < length -** Processing line: ~ draw_primitive (pass.primitives.at idx)~ + else +** Processing line: ~ difference_percentage = first_place.time~ - Inside source: true *** True Line Result - draw_primitive (pass.primitives.at idx) -** Processing line: ~ idx += 1~ + difference_percentage = first_place.time +** Processing line: ~ .subtract(candidate.time)~ - Inside source: true *** True Line Result - idx += 1 -** Processing line: ~ end~ + .subtract(candidate.time) +** Processing line: ~ .abs~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + .abs +** Processing line: ~ .fdiv(average_time)~ - Inside source: true *** True Line Result - -** Processing line: ~ # pass.static_primitives.each { |p| draw_primitive p }~ + .fdiv(average_time) +** Processing line: ~ .imult(100)~ - Inside source: true *** True Line Result - # pass.static_primitives.each { |p| draw_primitive p } -** Processing line: ~ idx = 0~ + .imult(100) +** Processing line: ~ end~ - Inside source: true *** True Line Result - idx = 0 -** Processing line: ~ length = pass.static_primitives.length~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - length = pass.static_primitives.length -** Processing line: ~ while idx < length~ + +** Processing line: ~ difference_time = ((first_place.time - candidate.time) * 1000).round~ - Inside source: true *** True Line Result - while idx < length -** Processing line: ~ draw_primitive (pass.static_primitives.at idx)~ + difference_time = ((first_place.time - candidate.time) * 1000).round +** Processing line: ~ candidate.merge(difference_percentage: difference_percentage,~ - Inside source: true *** True Line Result - draw_primitive (pass.static_primitives.at idx) -** Processing line: ~ idx += 1~ + candidate.merge(difference_percentage: difference_percentage, +** Processing line: ~ difference_time: difference_time)~ - Inside source: true *** True Line Result - idx += 1 + difference_time: difference_time) ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -170151,30 +179066,42 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # pass.labels.each { |l| draw_label l }~ +** Processing line: ~ too_small_to_measure = false~ - Inside source: true *** True Line Result - # pass.labels.each { |l| draw_label l } -** Processing line: ~ idx = 0~ + too_small_to_measure = false +** Processing line: ~ if (first_place.time + second_place.time) == 0~ - Inside source: true *** True Line Result - idx = 0 -** Processing line: ~ length = pass.labels.length~ + if (first_place.time + second_place.time) == 0 +** Processing line: ~ too_small_to_measure = true~ - Inside source: true *** True Line Result - length = pass.labels.length -** Processing line: ~ while idx < length~ + too_small_to_measure = true +** Processing line: ~ difference_percentage = 0~ - Inside source: true *** True Line Result - while idx < length -** Processing line: ~ draw_label (pass.labels.at idx)~ + difference_percentage = 0 +** Processing line: ~ log <<-S~ - Inside source: true *** True Line Result - draw_label (pass.labels.at idx) -** Processing line: ~ idx += 1~ + log <<-S +** Processing line: ~ * BENCHMARK: Average time for experiments were too small. Increase the number of iterations.~ - Inside source: true *** True Line Result - idx += 1 + * BENCHMARK: Average time for experiments were too small. Increase the number of iterations. +** Processing line: ~ S~ +- Inside source: true +*** True Line Result + S +** Processing line: ~ else~ +- Inside source: true +*** True Line Result + else +** Processing line: ~ difference_percentage = (((first_place.time - second_place.time).abs.fdiv((first_place.time + second_place.time).abs.fdiv(2))) * 100).round~ +- Inside source: true +*** True Line Result + difference_percentage = (((first_place.time - second_place.time).abs.fdiv((first_place.time + second_place.time).abs.fdiv(2))) * 100).round ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -170183,126 +179110,118 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # pass.static_labels.each { |l| draw_label l }~ +** Processing line: ~ difference_time = first_place.time.-(second_place.time).*(1000).abs.round~ - Inside source: true *** True Line Result - # pass.static_labels.each { |l| draw_label l } -** Processing line: ~ idx = 0~ -- Inside source: true -*** True Line Result - idx = 0 -** Processing line: ~ length = pass.static_labels.length~ + difference_time = first_place.time.-(second_place.time).*(1000).abs.round +** Processing line: ~~ - Inside source: true *** True Line Result - length = pass.static_labels.length -** Processing line: ~ while idx < length~ + +** Processing line: ~ r = {~ - Inside source: true *** True Line Result - while idx < length -** Processing line: ~ draw_label (pass.static_labels.at idx)~ + r = { +** Processing line: ~ iterations: iterations,~ - Inside source: true *** True Line Result - draw_label (pass.static_labels.at idx) -** Processing line: ~ idx += 1~ + iterations: iterations, +** Processing line: ~ first_place: first_place,~ - Inside source: true *** True Line Result - idx += 1 -** Processing line: ~ end~ + first_place: first_place, +** Processing line: ~ second_place: second_place,~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + second_place: second_place, +** Processing line: ~ difference_time: difference_time,~ - Inside source: true *** True Line Result - -** Processing line: ~ # pass.lines.each { |l| draw_line l }~ + difference_time: difference_time, +** Processing line: ~ difference_percentage: difference_percentage,~ - Inside source: true *** True Line Result - # pass.lines.each { |l| draw_line l } -** Processing line: ~ idx = 0~ + difference_percentage: difference_percentage, +** Processing line: ~ times: times,~ - Inside source: true *** True Line Result - idx = 0 -** Processing line: ~ length = pass.lines.length~ + times: times, +** Processing line: ~ too_small_to_measure: too_small_to_measure~ - Inside source: true *** True Line Result - length = pass.lines.length -** Processing line: ~ while idx < length~ + too_small_to_measure: too_small_to_measure +** Processing line: ~ }~ - Inside source: true *** True Line Result - while idx < length -** Processing line: ~ draw_line (pass.lines.at idx)~ + } +** Processing line: ~~ - Inside source: true *** True Line Result - draw_line (pass.lines.at idx) -** Processing line: ~ idx += 1~ + +** Processing line: ~ log_message = []~ - Inside source: true *** True Line Result - idx += 1 -** Processing line: ~ end~ + log_message = [] +** Processing line: ~ only_one_result = first_place.name == second_place.name~ - Inside source: true *** True Line Result - end + only_one_result = first_place.name == second_place.name ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # pass.static_lines.each { |l| draw_line l }~ +** Processing line: ~ if only_one_result~ - Inside source: true *** True Line Result - # pass.static_lines.each { |l| draw_line l } -** Processing line: ~ idx = 0~ + if only_one_result +** Processing line: ~ log <<-S~ - Inside source: true *** True Line Result - idx = 0 -** Processing line: ~ length = pass.static_lines.length~ + log <<-S +** Processing line: ~ * BENCHMARK: #{r.first_place.name} completed in #{r.first_place.time_ms}ms."~ - Inside source: true *** True Line Result - length = pass.static_lines.length -** Processing line: ~ while idx < pass.static_lines.length~ -- Inside source: true -*** True Line Result - while idx < pass.static_lines.length -** Processing line: ~ draw_line (pass.static_lines.at idx)~ + * BENCHMARK: #{r.first_place.name} completed in #{r.first_place.time_ms}ms." +** Processing line: ~ S~ - Inside source: true *** True Line Result - draw_line (pass.static_lines.at idx) -** Processing line: ~ idx += 1~ + S +** Processing line: ~ else~ - Inside source: true *** True Line Result - idx += 1 -** Processing line: ~ end~ + else +** Processing line: ~ log <<-S~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + log <<-S +** Processing line: ~ * BENCHMARK: #{r.message}~ - Inside source: true *** True Line Result - -** Processing line: ~ # pass.borders.each { |b| draw_border b }~ + * BENCHMARK: #{r.message} +** Processing line: ~ ** Fastest: #{r.first_place.name.inspect}~ - Inside source: true *** True Line Result - # pass.borders.each { |b| draw_border b } -** Processing line: ~ idx = 0~ + ** Fastest: #{r.first_place.name.inspect} +** Processing line: ~ ** Second: #{r.second_place.name.inspect}~ - Inside source: true *** True Line Result - idx = 0 -** Processing line: ~ length = pass.borders.length~ + ** Second: #{r.second_place.name.inspect} +** Processing line: ~ ** Margin: #{r.difference_percentage}% (#{r.difference_time.abs}ms) #{r.first_place.time_ms}ms vs #{r.second_place.time_ms}ms.~ - Inside source: true *** True Line Result - length = pass.borders.length -** Processing line: ~ while idx < length~ + ** Margin: #{r.difference_percentage}% (#{r.difference_time.abs}ms) #{r.first_place.time_ms}ms vs #{r.second_place.time_ms}ms. +** Processing line: ~ ** Times:~ - Inside source: true *** True Line Result - while idx < length -** Processing line: ~ draw_border (pass.borders.at idx)~ + ** Times: +** Processing line: ~ #{r.times.map { |t| "*** #{t.name}: #{t.time_ms}ms (#{t.difference_percentage}% #{t.difference_time.abs}ms)." }.join("\n")}~ - Inside source: true *** True Line Result - draw_border (pass.borders.at idx) -** Processing line: ~ idx += 1~ + #{r.times.map { |t| "*** #{t.name}: #{t.time_ms}ms (#{t.difference_percentage}% #{t.difference_time.abs}ms)." }.join("\n")} +** Processing line: ~ S~ - Inside source: true *** True Line Result - idx += 1 + S ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -170311,102 +179230,94 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # pass.static_borders.each { |b| draw_border b }~ +** Processing line: ~ r~ - Inside source: true *** True Line Result - # pass.static_borders.each { |b| draw_border b } -** Processing line: ~ idx = 0~ + r +** Processing line: ~ end~ - Inside source: true *** True Line Result - idx = 0 -** Processing line: ~ length = pass.static_borders.length~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - length = pass.static_borders.length -** Processing line: ~ while idx < length~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - while idx < length -** Processing line: ~ draw_border (pass.static_borders.at idx)~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - draw_border (pass.static_borders.at idx) -** Processing line: ~ idx += 1~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - idx += 1 -** Processing line: ~ end~ -- Inside source: true + +** Processing line: ~#+end_src~ +- Line was identified as the end of a code block. *** True Line Result - end +#+end_src ** Processing line: ~~ -- Inside source: true +- End of paragraph detected. *** True Line Result -** Processing line: ~ if !$gtk.production~ -- Inside source: true +** Processing line: ~*** runtime/draw.rb~ +- Header detected. *** True Line Result - if !$gtk.production -** Processing line: ~ # pass.debug.each { |r| draw_primitive r }~ -- Inside source: true + *** True Line Result - # pass.debug.each { |r| draw_primitive r } -** Processing line: ~ idx = 0~ -- Inside source: true +*** runtime/draw.rb +** Processing line: ~#+begin_src ruby~ +- Line was identified as the beginning of a code block. *** True Line Result - idx = 0 -** Processing line: ~ length = pass.debug.length~ -- Inside source: true + *** True Line Result - length = pass.debug.length -** Processing line: ~ while idx < length~ +#+begin_src ruby +** Processing line: ~ # ./dragon/runtime/draw.rb~ - Inside source: true *** True Line Result - while idx < length -** Processing line: ~ draw_primitive (pass.debug.at idx)~ + # ./dragon/runtime/draw.rb +** Processing line: ~ # Copyright 2019 DragonRuby LLC~ - Inside source: true *** True Line Result - draw_primitive (pass.debug.at idx) -** Processing line: ~ idx += 1~ + # Copyright 2019 DragonRuby LLC +** Processing line: ~ # MIT License~ - Inside source: true *** True Line Result - idx += 1 -** Processing line: ~ end~ + # MIT License +** Processing line: ~ # draw.rb has been released under MIT (*only this file*).~ - Inside source: true *** True Line Result - end + # draw.rb has been released under MIT (*only this file*). ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # pass.static_debug.each { |r| draw_primitive r }~ -- Inside source: true -*** True Line Result - # pass.static_debug.each { |r| draw_primitive r } -** Processing line: ~ idx = 0~ +** Processing line: ~ module GTK~ - Inside source: true *** True Line Result - idx = 0 -** Processing line: ~ length = pass.static_debug.length~ + module GTK +** Processing line: ~ class Runtime~ - Inside source: true *** True Line Result - length = pass.static_debug.length -** Processing line: ~ while idx < length~ + class Runtime +** Processing line: ~ module Draw~ - Inside source: true *** True Line Result - while idx < length -** Processing line: ~ draw_primitive (pass.static_debug.at idx)~ + module Draw +** Processing line: ~ def primitives pass~ - Inside source: true *** True Line Result - draw_primitive (pass.static_debug.at idx) -** Processing line: ~ idx += 1~ + def primitives pass +** Processing line: ~ if $top_level.respond_to? :primitives_override~ - Inside source: true *** True Line Result - idx += 1 -** Processing line: ~ end~ + if $top_level.respond_to? :primitives_override +** Processing line: ~ return $top_level.tick_render @args, pass~ - Inside source: true *** True Line Result - end + return $top_level.tick_render @args, pass ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -170415,66 +179326,86 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # pass.reserved.each { |r| draw_primitive r }~ +** Processing line: ~ fn.each_send pass.solids, self, :draw_solid~ - Inside source: true *** True Line Result - # pass.reserved.each { |r| draw_primitive r } -** Processing line: ~ idx = 0~ + fn.each_send pass.solids, self, :draw_solid +** Processing line: ~ fn.each_send pass.static_solids, self, :draw_solid~ - Inside source: true *** True Line Result - idx = 0 -** Processing line: ~ length = pass.reserved.length~ + fn.each_send pass.static_solids, self, :draw_solid +** Processing line: ~ fn.each_send pass.sprites, self, :draw_sprite~ - Inside source: true *** True Line Result - length = pass.reserved.length -** Processing line: ~ while idx < length~ + fn.each_send pass.sprites, self, :draw_sprite +** Processing line: ~ fn.each_send pass.static_sprites, self, :draw_sprite~ - Inside source: true *** True Line Result - while idx < length -** Processing line: ~ draw_primitive (pass.reserved.at idx)~ + fn.each_send pass.static_sprites, self, :draw_sprite +** Processing line: ~ fn.each_send pass.primitives, self, :draw_primitive~ - Inside source: true *** True Line Result - draw_primitive (pass.reserved.at idx) -** Processing line: ~ idx += 1~ + fn.each_send pass.primitives, self, :draw_primitive +** Processing line: ~ fn.each_send pass.static_primitives, self, :draw_primitive~ - Inside source: true *** True Line Result - idx += 1 -** Processing line: ~ end~ + fn.each_send pass.static_primitives, self, :draw_primitive +** Processing line: ~ fn.each_send pass.labels, self, :draw_label~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + fn.each_send pass.labels, self, :draw_label +** Processing line: ~ fn.each_send pass.static_labels, self, :draw_label~ - Inside source: true *** True Line Result - -** Processing line: ~ # pass.static_reserved.each { |r| draw_primitive r }~ + fn.each_send pass.static_labels, self, :draw_label +** Processing line: ~ fn.each_send pass.lines, self, :draw_line~ - Inside source: true *** True Line Result - # pass.static_reserved.each { |r| draw_primitive r } -** Processing line: ~ idx = 0~ + fn.each_send pass.lines, self, :draw_line +** Processing line: ~ fn.each_send pass.static_lines, self, :draw_line~ - Inside source: true *** True Line Result - idx = 0 -** Processing line: ~ length = pass.static_reserved.length~ + fn.each_send pass.static_lines, self, :draw_line +** Processing line: ~ fn.each_send pass.borders, self, :draw_border~ - Inside source: true *** True Line Result - length = pass.static_reserved.length -** Processing line: ~ while idx < length~ + fn.each_send pass.borders, self, :draw_border +** Processing line: ~ fn.each_send pass.static_borders, self, :draw_border~ - Inside source: true *** True Line Result - while idx < length -** Processing line: ~ draw_primitive (pass.static_reserved.at idx)~ + fn.each_send pass.static_borders, self, :draw_border +** Processing line: ~~ - Inside source: true *** True Line Result - draw_primitive (pass.static_reserved.at idx) -** Processing line: ~ idx += 1~ + +** Processing line: ~ if !$gtk.production~ - Inside source: true *** True Line Result - idx += 1 + if !$gtk.production +** Processing line: ~ fn.each_send pass.debug, self, :draw_primitive~ +- Inside source: true +*** True Line Result + fn.each_send pass.debug, self, :draw_primitive +** Processing line: ~ fn.each_send pass.static_debug, self, :draw_primitive~ +- Inside source: true +*** True Line Result + fn.each_send pass.static_debug, self, :draw_primitive ** Processing line: ~ end~ - Inside source: true *** True Line Result end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ fn.each_send pass.reserved, self, :draw_primitive~ +- Inside source: true +*** True Line Result + fn.each_send pass.reserved, self, :draw_primitive +** Processing line: ~ fn.each_send pass.static_reserved, self, :draw_primitive~ +- Inside source: true +*** True Line Result + fn.each_send pass.static_reserved, self, :draw_primitive ** Processing line: ~ rescue Exception => e~ - Inside source: true *** True Line Result @@ -170515,10 +179446,18 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result else -** Processing line: ~ @ffi_draw.draw_solid s.x, s.y, s.w, s.h, s.r, s.g, s.b, s.a~ +** Processing line: ~ @ffi_draw.draw_solid_2 s.x, s.y, s.w, s.h,~ +- Inside source: true +*** True Line Result + @ffi_draw.draw_solid_2 s.x, s.y, s.w, s.h, +** Processing line: ~ s.r, s.g, s.b, s.a,~ +- Inside source: true +*** True Line Result + s.r, s.g, s.b, s.a, +** Processing line: ~ (s.blendmode_enum || 1)~ - Inside source: true *** True Line Result - @ffi_draw.draw_solid s.x, s.y, s.w, s.h, s.r, s.g, s.b, s.a + (s.blendmode_enum || 1) ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -170559,14 +179498,14 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result else -** Processing line: ~ @ffi_draw.draw_sprite_3 s.x, s.y, s.w, s.h,~ +** Processing line: ~ @ffi_draw.draw_sprite_4 s.x, s.y, s.w, s.h,~ - Inside source: true *** True Line Result - @ffi_draw.draw_sprite_3 s.x, s.y, s.w, s.h, -** Processing line: ~ s.path.s_or_default,~ + @ffi_draw.draw_sprite_4 s.x, s.y, s.w, s.h, +** Processing line: ~ (s.path || '').to_s,~ - Inside source: true *** True Line Result - s.path.s_or_default, + (s.path || '').to_s, ** Processing line: ~ s.angle,~ - Inside source: true *** True Line Result @@ -170587,10 +179526,14 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result s.angle_anchor_x, s.angle_anchor_y, -** Processing line: ~ s.source_x, s.source_y, s.source_w, s.source_h~ +** Processing line: ~ s.source_x, s.source_y, s.source_w, s.source_h,~ - Inside source: true *** True Line Result - s.source_x, s.source_y, s.source_w, s.source_h + s.source_x, s.source_y, s.source_w, s.source_h, +** Processing line: ~ (s.blendmode_enum || 1)~ +- Inside source: true +*** True Line Result + (s.blendmode_enum || 1) ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -170631,10 +179574,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result else -** Processing line: ~ @ffi_draw.draw_screenshot s.path.s_or_default,~ +** Processing line: ~ @ffi_draw.draw_screenshot (s.path || '').to_s,~ - Inside source: true *** True Line Result - @ffi_draw.draw_screenshot s.path.s_or_default, + @ffi_draw.draw_screenshot (s.path || '').to_s, ** Processing line: ~ s.x, s.y, s.w, s.h,~ - Inside source: true *** True Line Result @@ -170703,22 +179646,34 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result else -** Processing line: ~ @ffi_draw.draw_label l.x, l.y, l.text.s_or_default,~ +** Processing line: ~ @ffi_draw.draw_label_3 l.x, l.y,~ +- Inside source: true +*** True Line Result + @ffi_draw.draw_label_3 l.x, l.y, +** Processing line: ~ (l.text || '').to_s,~ +- Inside source: true +*** True Line Result + (l.text || '').to_s, +** Processing line: ~ l.size_enum, l.alignment_enum,~ - Inside source: true *** True Line Result - @ffi_draw.draw_label l.x, l.y, l.text.s_or_default, -** Processing line: ~ l.size_enum, l.alignment_enum,~ + l.size_enum, l.alignment_enum, +** Processing line: ~ l.r, l.g, l.b, l.a,~ - Inside source: true *** True Line Result - l.size_enum, l.alignment_enum, -** Processing line: ~ l.r, l.g, l.b, l.a,~ + l.r, l.g, l.b, l.a, +** Processing line: ~ l.font,~ - Inside source: true *** True Line Result - l.r, l.g, l.b, l.a, -** Processing line: ~ l.font.s_or_default(nil)~ + l.font, +** Processing line: ~ (l.vertical_alignment_enum || 2),~ - Inside source: true *** True Line Result - l.font.s_or_default(nil) + (l.vertical_alignment_enum || 2), +** Processing line: ~ (l.blendmode_enum || 1)~ +- Inside source: true +*** True Line Result + (l.blendmode_enum || 1) ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -170759,10 +179714,66 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result else -** Processing line: ~ @ffi_draw.draw_line l.x, l.y, l.x2, l.y2, l.r, l.g, l.b, l.a~ +** Processing line: ~ if l.x2~ +- Inside source: true +*** True Line Result + if l.x2 +** Processing line: ~ @ffi_draw.draw_line_2 l.x, l.y, l.x2, l.y2,~ +- Inside source: true +*** True Line Result + @ffi_draw.draw_line_2 l.x, l.y, l.x2, l.y2, +** Processing line: ~ l.r, l.g, l.b, l.a,~ +- Inside source: true +*** True Line Result + l.r, l.g, l.b, l.a, +** Processing line: ~ (l.blendmode_enum || 1)~ +- Inside source: true +*** True Line Result + (l.blendmode_enum || 1) +** Processing line: ~ else~ +- Inside source: true +*** True Line Result + else +** Processing line: ~ w = l.w || 0~ +- Inside source: true +*** True Line Result + w = l.w || 0 +** Processing line: ~ w = 1 if w == 0~ +- Inside source: true +*** True Line Result + w = 1 if w == 0 +** Processing line: ~ h = l.h || 0~ +- Inside source: true +*** True Line Result + h = l.h || 0 +** Processing line: ~ h = 1 if h == 0~ +- Inside source: true +*** True Line Result + h = 1 if h == 0 +** Processing line: ~ @ffi_draw.draw_line_2 l.x, l.y,~ +- Inside source: true +*** True Line Result + @ffi_draw.draw_line_2 l.x, l.y, +** Processing line: ~ l.x + w - 1,~ +- Inside source: true +*** True Line Result + l.x + w - 1, +** Processing line: ~ l.y + h - 1,~ +- Inside source: true +*** True Line Result + l.y + h - 1, +** Processing line: ~ l.r, l.g, l.b, l.a,~ - Inside source: true *** True Line Result - @ffi_draw.draw_line l.x, l.y, l.x2, l.y2, l.r, l.g, l.b, l.a + l.r, l.g, l.b, l.a, +** Processing line: ~ (l.blendmode_enum || 1)~ +- Inside source: true +*** True Line Result + (l.blendmode_enum || 1) +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -170803,10 +179814,18 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result else -** Processing line: ~ @ffi_draw.draw_border s.x, s.y, s.w, s.h, s.r, s.g, s.b, s.a~ +** Processing line: ~ @ffi_draw.draw_border_2 s.x, s.y, s.w, s.h,~ - Inside source: true *** True Line Result - @ffi_draw.draw_border s.x, s.y, s.w, s.h, s.r, s.g, s.b, s.a + @ffi_draw.draw_border_2 s.x, s.y, s.w, s.h, +** Processing line: ~ s.r, s.g, s.b, s.a,~ +- Inside source: true +*** True Line Result + s.r, s.g, s.b, s.a, +** Processing line: ~ (s.blendmode_enum || 1)~ +- Inside source: true +*** True Line Result + (s.blendmode_enum || 1) ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -170883,10 +179902,6 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result end -** Processing line: ~~ -- Inside source: true -*** True Line Result - ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -171755,10 +180770,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result [ -** Processing line: ~ { x: 0, y: 93.from_top, w: 500, h: 93, a: 128 }.solid,~ +** Processing line: ~ { x: 0, y: 93.from_top, w: 500, h: 93, a: 128 }.solid!,~ - Inside source: true *** True Line Result - { x: 0, y: 93.from_top, w: 500, h: 93, a: 128 }.solid, + { x: 0, y: 93.from_top, w: 500, h: 93, a: 128 }.solid!, ** Processing line: ~ {~ - Inside source: true *** True Line Result @@ -171791,10 +180806,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result size_enum: -2 -** Processing line: ~ }.label,~ +** Processing line: ~ }.label!,~ - Inside source: true *** True Line Result - }.label, + }.label!, ** Processing line: ~ {~ - Inside source: true *** True Line Result @@ -171827,10 +180842,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result size_enum: -2 -** Processing line: ~ }.label,~ +** Processing line: ~ }.label!,~ - Inside source: true *** True Line Result - }.label, + }.label!, ** Processing line: ~ {~ - Inside source: true *** True Line Result @@ -171863,10 +180878,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result size_enum: -2 -** Processing line: ~ }.label,~ +** Processing line: ~ }.label!,~ - Inside source: true *** True Line Result - }.label, + }.label!, ** Processing line: ~ {~ - Inside source: true *** True Line Result @@ -171899,10 +180914,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result size_enum: -2 -** Processing line: ~ }.label,~ +** Processing line: ~ }.label!,~ - Inside source: true *** True Line Result - }.label, + }.label!, ** Processing line: ~ {~ - Inside source: true *** True Line Result @@ -171935,10 +180950,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result size_enum: -2 -** Processing line: ~ }.label,~ +** Processing line: ~ }.label!,~ - Inside source: true *** True Line Result - }.label, + }.label!, ** Processing line: ~ ]~ - Inside source: true *** True Line Result @@ -172039,10 +181054,38 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result @mailbox_if_needed = 0 +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ # schema for file_mtimes~ +- Inside source: true +*** True Line Result + # schema for file_mtimes +** Processing line: ~ # { FILE_PATH: { current: (Time as Fixnum),~ +- Inside source: true +*** True Line Result + # { FILE_PATH: { current: (Time as Fixnum), +** Processing line: ~ # last: (Time as Fixnum) },~ +- Inside source: true +*** True Line Result + # last: (Time as Fixnum) }, +** Processing line: ~ # FILE_PATH: { current: (Time as Fixnum),~ +- Inside source: true +*** True Line Result + # FILE_PATH: { current: (Time as Fixnum), +** Processing line: ~ # last: (Time as Fixnum) } }~ +- Inside source: true +*** True Line Result + # last: (Time as Fixnum) } } ** Processing line: ~ @file_mtimes = { }~ - Inside source: true *** True Line Result @file_mtimes = { } +** Processing line: ~~ +- Inside source: true +*** True Line Result + ** Processing line: ~ @suppress_mailbox = true~ - Inside source: true *** True Line Result @@ -172191,6 +181234,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result 'dragon/numeric.rb', +** Processing line: ~ 'dragon/hash_deprecated.rb',~ +- Inside source: true +*** True Line Result + 'dragon/hash_deprecated.rb', ** Processing line: ~ 'dragon/hash.rb',~ - Inside source: true *** True Line Result @@ -172319,6 +181366,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result 'dragon/hotload_client.rb', +** Processing line: ~ 'dragon/wizards.rb',~ +- Inside source: true +*** True Line Result + 'dragon/wizards.rb', ** Processing line: ~ 'dragon/ios_wizard.rb',~ - Inside source: true *** True Line Result @@ -172391,22 +181442,14 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result def init_mtimes file -** Processing line: ~ current_key = "current_#{file}".to_sym~ +** Processing line: ~ @file_mtimes[file] ||= { current: @ffi_file.mtime(file),~ - Inside source: true *** True Line Result - current_key = "current_#{file}".to_sym -** Processing line: ~ last_key = "last_#{file}".to_sym~ + @file_mtimes[file] ||= { current: @ffi_file.mtime(file), +** Processing line: ~ last: @ffi_file.mtime(file) }~ - Inside source: true *** True Line Result - last_key = "last_#{file}".to_sym -** Processing line: ~ @file_mtimes[current_key] ||= @ffi_file.mtime(file)~ -- Inside source: true -*** True Line Result - @file_mtimes[current_key] ||= @ffi_file.mtime(file) -** Processing line: ~ @file_mtimes[last_key] ||= @ffi_file.mtime(file)~ -- Inside source: true -*** True Line Result - @file_mtimes[last_key] ||= @ffi_file.mtime(file) + last: @ffi_file.mtime(file) } ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -172531,6 +181574,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result def hotload_if_needed +** Processing line: ~ return if Kernel.tick_count < 0~ +- Inside source: true +*** True Line Result + return if Kernel.tick_count < 0 ** Processing line: ~ hotload_source_files~ - Inside source: true *** True Line Result @@ -172551,14 +181598,14 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result def on_load_succeeded file -** Processing line: ~ @rcb_sender.files_reloaded << file~ +** Processing line: ~ self.files_reloaded << file~ - Inside source: true *** True Line Result - @rcb_sender.files_reloaded << file -** Processing line: ~ @rcb_sender.reloaded_files << file~ + self.files_reloaded << file +** Processing line: ~ self.reloaded_files << file~ - Inside source: true *** True Line Result - @rcb_sender.reloaded_files << file + self.reloaded_files << file ** Processing line: ~ Trace.untrace_classes!~ - Inside source: true *** True Line Result @@ -172571,42 +181618,82 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def reload_if_needed file, force = false~ +** Processing line: ~ def reset_all_mtimes~ - Inside source: true *** True Line Result - def reload_if_needed file, force = false -** Processing line: ~ current_key = "current_#{file}".to_sym~ + def reset_all_mtimes +** Processing line: ~ @file_mtimes.each do |file, _|~ - Inside source: true *** True Line Result - current_key = "current_#{file}".to_sym -** Processing line: ~ last_key = "last_#{file}".to_sym~ + @file_mtimes.each do |file, _| +** Processing line: ~ @file_mtimes[file].current = @ffi_file.mtime(file)~ - Inside source: true *** True Line Result - last_key = "last_#{file}".to_sym -** Processing line: ~ @file_mtimes[current_key] ||= nil~ + @file_mtimes[file].current = @ffi_file.mtime(file) +** Processing line: ~ @file_mtimes[file].last = @file_mtimes[file].current~ - Inside source: true *** True Line Result - @file_mtimes[current_key] ||= nil -** Processing line: ~ @file_mtimes[last_key] ||= nil~ + @file_mtimes[file].last = @file_mtimes[file].current +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ files_to_reload.each do |file, _|~ +- Inside source: true +*** True Line Result + files_to_reload.each do |file, _| +** Processing line: ~ @file_mtimes[file] ||= {}~ +- Inside source: true +*** True Line Result + @file_mtimes[file] ||= {} +** Processing line: ~ @file_mtimes[file].current = @ffi_file.mtime(file)~ +- Inside source: true +*** True Line Result + @file_mtimes[file].current = @ffi_file.mtime(file) +** Processing line: ~ @file_mtimes[file].last = @file_mtimes[file].current~ +- Inside source: true +*** True Line Result + @file_mtimes[file].last = @file_mtimes[file].current +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ def reload_if_needed file, force = false~ +- Inside source: true +*** True Line Result + def reload_if_needed file, force = false +** Processing line: ~ @file_mtimes[file] ||= { current: @ffi_file.mtime(file), last: @ffi_file.mtime(file) }~ - Inside source: true *** True Line Result - @file_mtimes[last_key] ||= nil -** Processing line: ~ @file_mtimes[current_key] = @ffi_file.mtime(file)~ + @file_mtimes[file] ||= { current: @ffi_file.mtime(file), last: @ffi_file.mtime(file) } +** Processing line: ~ @file_mtimes[file].current = @ffi_file.mtime(file)~ - Inside source: true *** True Line Result - @file_mtimes[current_key] = @ffi_file.mtime(file) -** Processing line: ~ return if !force && @file_mtimes[last_key] == @file_mtimes[current_key]~ + @file_mtimes[file].current = @ffi_file.mtime(file) +** Processing line: ~ return if !force && @file_mtimes[file].current == @file_mtimes[file].last~ - Inside source: true *** True Line Result - return if !force && @file_mtimes[last_key] == @file_mtimes[current_key] + return if !force && @file_mtimes[file].current == @file_mtimes[file].last ** Processing line: ~ on_load_succeeded file if reload_ruby_file file~ - Inside source: true *** True Line Result on_load_succeeded file if reload_ruby_file file -** Processing line: ~ @file_mtimes[last_key] = @file_mtimes[current_key]~ +** Processing line: ~ @file_mtimes[file].last = @file_mtimes[file].current~ - Inside source: true *** True Line Result - @file_mtimes[last_key] = @file_mtimes[current_key] + @file_mtimes[file].last = @file_mtimes[file].current ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -172775,6 +181862,102 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result +** Processing line: ~ def char_byte~ +- Inside source: true +*** True Line Result + def char_byte +** Processing line: ~ return nil if self.length == 0~ +- Inside source: true +*** True Line Result + return nil if self.length == 0 +** Processing line: ~ c = self.each_char.first.bytes~ +- Inside source: true +*** True Line Result + c = self.each_char.first.bytes +** Processing line: ~ c = c.first if c.is_a? Enumerable~ +- Inside source: true +*** True Line Result + c = c.first if c.is_a? Enumerable +** Processing line: ~ c~ +- Inside source: true +*** True Line Result + c +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ def insert_character_at index, char~ +- Inside source: true +*** True Line Result + def insert_character_at index, char +** Processing line: ~ t = each_char.to_a~ +- Inside source: true +*** True Line Result + t = each_char.to_a +** Processing line: ~ t = (t.insert index, char)~ +- Inside source: true +*** True Line Result + t = (t.insert index, char) +** Processing line: ~ t.join~ +- Inside source: true +*** True Line Result + t.join +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ def excluding_character_at index~ +- Inside source: true +*** True Line Result + def excluding_character_at index +** Processing line: ~ t = each_char.to_a~ +- Inside source: true +*** True Line Result + t = each_char.to_a +** Processing line: ~ t.delete_at index~ +- Inside source: true +*** True Line Result + t.delete_at index +** Processing line: ~ t.join~ +- Inside source: true +*** True Line Result + t.join +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ def excluding_last_character~ +- Inside source: true +*** True Line Result + def excluding_last_character +** Processing line: ~ return "" if self.length <= 1~ +- Inside source: true +*** True Line Result + return "" if self.length <= 1 +** Processing line: ~ return excluding_character_at(self.length - 1)~ +- Inside source: true +*** True Line Result + return excluding_character_at(self.length - 1) +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + ** Processing line: ~ def end_with_bang?~ - Inside source: true *** True Line Result @@ -173647,10 +182830,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result log "**** Test name: :#{h[:m]}" -** Processing line: ~ log "#{h[:e].to_s.gsub("* ERROR:", "").strip}"~ +** Processing line: ~ log "#{h[:e].to_s.gsub("* ERROR:", "").strip}\n#{h[:e].__backtrace_to_org__}"~ - Inside source: true *** True Line Result - log "#{h[:e].to_s.gsub("* ERROR:", "").strip}" + log "#{h[:e].to_s.gsub("* ERROR:", "").strip}\n#{h[:e].__backtrace_to_org__}" ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -174475,6 +183658,142 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result +** Processing line: ~ class Wizard~ +- Inside source: true +*** True Line Result + class Wizard +** Processing line: ~ def metadata_file_path~ +- Inside source: true +*** True Line Result + def metadata_file_path +** Processing line: ~ "metadata/game_metadata.txt"~ +- Inside source: true +*** True Line Result + "metadata/game_metadata.txt" +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ def get_metadata~ +- Inside source: true +*** True Line Result + def get_metadata +** Processing line: ~ metadata = $gtk.read_file metadata_file_path~ +- Inside source: true +*** True Line Result + metadata = $gtk.read_file metadata_file_path +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ if !metadata~ +- Inside source: true +*** True Line Result + if !metadata +** Processing line: ~ write_blank_metadata~ +- Inside source: true +*** True Line Result + write_blank_metadata +** Processing line: ~ metadata = $gtk.read_file metadata_file_path~ +- Inside source: true +*** True Line Result + metadata = $gtk.read_file metadata_file_path +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ dev_id, dev_title, game_id, game_title, version, icon = *metadata.each_line.to_a~ +- Inside source: true +*** True Line Result + dev_id, dev_title, game_id, game_title, version, icon = *metadata.each_line.to_a +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ {~ +- Inside source: true +*** True Line Result + { +** Processing line: ~ dev_id: dev_id.strip.gsub("#", "").gsub("devid=", ""),~ +- Inside source: true +*** True Line Result + dev_id: dev_id.strip.gsub("#", "").gsub("devid=", ""), +** Processing line: ~ dev_title: dev_title.strip.gsub("#", "").gsub("devtitle=", ""),~ +- Inside source: true +*** True Line Result + dev_title: dev_title.strip.gsub("#", "").gsub("devtitle=", ""), +** Processing line: ~ game_id: game_id.strip.gsub("#", "").gsub("gameid=", ""),~ +- Inside source: true +*** True Line Result + game_id: game_id.strip.gsub("#", "").gsub("gameid=", ""), +** Processing line: ~ game_title: game_title.strip.gsub("#", "").gsub("gametitle=", ""),~ +- Inside source: true +*** True Line Result + game_title: game_title.strip.gsub("#", "").gsub("gametitle=", ""), +** Processing line: ~ version: version.strip.gsub("#", "").gsub("version=", ""),~ +- Inside source: true +*** True Line Result + version: version.strip.gsub("#", "").gsub("version=", ""), +** Processing line: ~ icon: icon.strip.gsub("#", "").gsub("icon=", "")~ +- Inside source: true +*** True Line Result + icon: icon.strip.gsub("#", "").gsub("icon=", "") +** Processing line: ~ }~ +- Inside source: true +*** True Line Result + } +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ class WizardException < Exception~ +- Inside source: true +*** True Line Result + class WizardException < Exception +** Processing line: ~ attr_accessor :console_primitives~ +- Inside source: true +*** True Line Result + attr_accessor :console_primitives +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ def initialize *console_primitives~ +- Inside source: true +*** True Line Result + def initialize *console_primitives +** Processing line: ~ @console_primitives = console_primitives~ +- Inside source: true +*** True Line Result + @console_primitives = console_primitives +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + ** Processing line: ~ module GTK~ - Inside source: true *** True Line Result @@ -174554,14 +183873,6 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~#+end_src~ - PRE end detected. ** Processing line: ~~ -** Processing line: ~[[docs_search.gif]]~ -- P detected. -- Determining if line is a header. -- Line does not appear to be a header. -- Formatting line: ~[[docs_search.gif]]~ -- Line's tilde count is: 0 -- Line contains link marker: true -- LINK detected. ** Processing line: ~~ ** Processing line: ~* Hello World~ - H1 detected. @@ -174644,22 +183955,36 @@ Follows is a source code listing for all files that have been open sourced. This - BLOCKQUOTE end detected. ** Processing line: ~~ ** Processing line: ~~ -** Processing line: ~* Watch Some Intro Videos~ +** Processing line: ~* Intro Videos~ - H1 detected. - Determining if line is a header. - Line contains ~* ~... gsub-ing empty string -- Formatting line: ~Watch Some Intro Videos~ +- Formatting line: ~Intro Videos~ - Line's tilde count is: 0 - Line contains link marker: false ** Processing line: ~~ -** Processing line: ~Each video is only 20 minutes and all of them will fit into a lunch break. So please watch them:~ +** Processing line: ~Here are some videos to help you get the lay of the land.~ - P detected. - Determining if line is a header. - Line does not appear to be a header. -- Formatting line: ~Each video is only 20 minutes and all of them will fit into a lunch break. So please watch them:~ +- Formatting line: ~Here are some videos to help you get the lay of the land.~ +- Line's tilde count is: 0 +- Line contains link marker: false +** Processing line: ~~ +** Processing line: ~** Quick Api Tour~ +- H2 detected. +- Determining if line is a header. +- Line contains ~** ~... gsub-ing empty string +- Formatting line: ~Quick Api Tour~ +- Line's tilde count is: 0 +- Line contains link marker: false +- Determining if line is a header. +- Line contains ~** ~... gsub-ing empty string +- Formatting line: ~Quick Api Tour~ - Line's tilde count is: 0 - Line contains link marker: false ** Processing line: ~~ +** Processing line: ~~ ** Processing line: ~1. Beginner Introduction to DragonRuby Game Toolkit: [[https://youtu.be/ixw7TJhU08E]]~ - OL start detected. - LI detected. @@ -174669,7 +183994,23 @@ Follows is a source code listing for all files that have been open sourced. This - Line's tilde count is: 0 - Line contains link marker: true - LINK detected. -** Processing line: ~2. Intermediate Introduction to Ruby Syntax: [[https://youtu.be/HG-XRZ5Ppgc]]~ +** Processing line: ~~ +** Processing line: ~** If You Are Completely New to Ruby and Programming~ +- H2 detected. +- Determining if line is a header. +- Line contains ~** ~... gsub-ing empty string +- Formatting line: ~If You Are Completely New to Ruby and Programming~ +- Line's tilde count is: 0 +- Line contains link marker: false +- Determining if line is a header. +- Line contains ~** ~... gsub-ing empty string +- Formatting line: ~If You Are Completely New to Ruby and Programming~ +- Line's tilde count is: 0 +- Line contains link marker: false +** Processing line: ~~ +** Processing line: ~~ +** Processing line: ~1. Intermediate Introduction to Ruby Syntax: [[https://youtu.be/HG-XRZ5Ppgc]]~ +- OL start detected. - LI detected. - Determining if line is a header. - Line does not appear to be a header. @@ -174677,7 +184018,7 @@ Follows is a source code listing for all files that have been open sourced. This - Line's tilde count is: 0 - Line contains link marker: true - LINK detected. -** Processing line: ~3. Intermediate Introduction to Arrays in Ruby: [[https://youtu.be/N72sEYFRqfo]]~ +** Processing line: ~2. Intermediate Introduction to Arrays in Ruby: [[https://youtu.be/N72sEYFRqfo]]~ - LI detected. - Determining if line is a header. - Line does not appear to be a header. @@ -174685,19 +184026,51 @@ Follows is a source code listing for all files that have been open sourced. This - Line's tilde count is: 0 - Line contains link marker: true - LINK detected. -** Processing line: ~The second and third videos are not required if you are proficient with Ruby, but *definitely* watch the first one.~ -- OL end detected. -- P detected. +** Processing line: ~3. You may also want to try this free course provided at [[http://dragonruby.school]].~ +- LI detected. - Determining if line is a header. - Line does not appear to be a header. -- Formatting line: ~The second and third videos are not required if you are proficient with Ruby, but *definitely* watch the first one.~ +- Formatting line: ~ You may also want to try this free course provided at [[http://dragonruby.school]].~ +- Line's tilde count is: 0 +- Line contains link marker: true +- LINK detected. +** Processing line: ~~ +** Processing line: ~** If You Have Game Dev Experience~ +- H2 detected. +- Determining if line is a header. +- Line contains ~** ~... gsub-ing empty string +- Formatting line: ~If You Have Game Dev Experience~ - Line's tilde count is: 0 - Line contains link marker: false -** Processing line: ~You may also want to try this free course provided at [[http://dragonruby.school]].~ -- P detected. +- Determining if line is a header. +- Line contains ~** ~... gsub-ing empty string +- Formatting line: ~If You Have Game Dev Experience~ +- Line's tilde count is: 0 +- Line contains link marker: false +** Processing line: ~~ +** Processing line: ~~ +** Processing line: ~1. Building Tetris - Part 1: [[https://youtu.be/xZMwRSbC4rY]]~ +- OL start detected. +- LI detected. +- Determining if line is a header. +- Line does not appear to be a header. +- Formatting line: ~ Building Tetris - Part 1: [[https://youtu.be/xZMwRSbC4rY]]~ +- Line's tilde count is: 0 +- Line contains link marker: true +- LINK detected. +** Processing line: ~2. Building Tetris - Part 2: [[https://youtu.be/C3LLzDUDgz4]]~ +- LI detected. +- Determining if line is a header. +- Line does not appear to be a header. +- Formatting line: ~ Building Tetris - Part 2: [[https://youtu.be/C3LLzDUDgz4]]~ +- Line's tilde count is: 0 +- Line contains link marker: true +- LINK detected. +** Processing line: ~3. Low Res Game Jam Tutorial: [[https://youtu.be/pCI90ukKCME]]~ +- LI detected. - Determining if line is a header. - Line does not appear to be a header. -- Formatting line: ~You may also want to try this free course provided at [[http://dragonruby.school]].~ +- Formatting line: ~ Low Res Game Jam Tutorial: [[https://youtu.be/pCI90ukKCME]]~ - Line's tilde count is: 0 - Line contains link marker: true - LINK detected. @@ -175483,11 +184856,11 @@ Follows is a source code listing for all files that have been open sourced. This - Line's tilde count is: 2 - Line contains link marker: false - CODE detected. -** Processing line: ~To deploy to Android, you need to have an Android emulator/device, and a environment that is able to run Android SDK. ~dragonruby-publish~ will create an APK for you. From there, you can sign the APK and install it to your device. The signing and installation procedure varies from OS to OS. Here's an example of what the command might look like:~ +** Processing line: ~To deploy to Android, you need to have an Android emulator/device, and an environment that is able to run Android SDK. ~dragonruby-publish~ will create an APK for you. From there, you can sign the APK and install it to your device. The signing and installation procedure varies from OS to OS. Here's an example of what the command might look like:~ - P detected. - Determining if line is a header. - Line does not appear to be a header. -- Formatting line: ~To deploy to Android, you need to have an Android emulator/device, and a environment that is able to run Android SDK. ~dragonruby-publish~ will create an APK for you. From there, you can sign the APK and install it to your device. The signing and installation procedure varies from OS to OS. Here's an example of what the command might look like:~ +- Formatting line: ~To deploy to Android, you need to have an Android emulator/device, and an environment that is able to run Android SDK. ~dragonruby-publish~ will create an APK for you. From there, you can sign the APK and install it to your device. The signing and installation procedure varies from OS to OS. Here's an example of what the command might look like:~ - Line's tilde count is: 2 - Line contains link marker: false - CODE detected. @@ -175510,11 +184883,11 @@ Follows is a source code listing for all files that have been open sourced. This - Line's tilde count is: 0 - Line contains link marker: false ** Processing line: ~~ -** Processing line: ~The following tenants of DragonRuby are what set us apart from other game engines. Given that Game Toolkit is a relatively new engine, there are definitely features that are missing. So having a big check list of "all the cool things" is not this engine's forte. This is compensated with a strong commitment to the following principals.~ +** Processing line: ~The following tenants of DragonRuby are what set us apart from other game engines. Given that Game Toolkit is a relatively new engine, there are definitely features that are missing. So having a big check list of "all the cool things" is not this engine's forte. This is compensated with a strong commitment to the following principles.~ - P detected. - Determining if line is a header. - Line does not appear to be a header. -- Formatting line: ~The following tenants of DragonRuby are what set us apart from other game engines. Given that Game Toolkit is a relatively new engine, there are definitely features that are missing. So having a big check list of "all the cool things" is not this engine's forte. This is compensated with a strong commitment to the following principals.~ +- Formatting line: ~The following tenants of DragonRuby are what set us apart from other game engines. Given that Game Toolkit is a relatively new engine, there are definitely features that are missing. So having a big check list of "all the cool things" is not this engine's forte. This is compensated with a strong commitment to the following principles.~ - Line's tilde count is: 0 - Line contains link marker: false ** Processing line: ~~ @@ -175579,11 +184952,11 @@ Follows is a source code listing for all files that have been open sourced. This - Formatting line: ~There is a programming idiom in software called "The Pit of Success". The term normalizes upfront pain as a necessity/requirement in the hopes that the investment will yield dividends "when you become successful" or "when the code becomes more complicated". This approach to development is strongly discouraged by us. It leads to over-architected and unnecessary code; creates barriers to rapid prototyping and shipping a game; and overwhelms beginners who are new to the engine or programming in general.~ - Line's tilde count is: 0 - Line contains link marker: false -** Processing line: ~DragonRuby's philosophy is to provide multiple options across the "make it fast" vs "make it right" spectrum, with incremental/intuitive transitions between the options provided. A concrete example of this philosophy would be render primitives: the spectrum of options allows renderable constructs take the form of tuples/arrays (easy to pickup, simple, and fast to code/prototype with), hashes (a little more work, but gives you the ability to add additional properties), open and string entities (more work than hashes, but yields cleaner apis), and finally - if you really need full power/flexibility in rendering - classes (which take the most amount of code and programming knowledge to create).~ +** Processing line: ~DragonRuby's philosophy is to provide multiple options across the "make it fast" vs "make it right" spectrum, with incremental/intuitive transitions between the options provided. A concrete example of this philosophy would be render primitives: the spectrum of options allows renderable constructs that take the form of tuples/arrays (easy to pickup, simple, and fast to code/prototype with), hashes (a little more work, but gives you the ability to add additional properties), open and strict entities (more work than hashes, but yields cleaner apis), and finally - if you really need full power/flexibility in rendering - classes (which take the most amount of code and programming knowledge to create).~ - P detected. - Determining if line is a header. - Line does not appear to be a header. -- Formatting line: ~DragonRuby's philosophy is to provide multiple options across the "make it fast" vs "make it right" spectrum, with incremental/intuitive transitions between the options provided. A concrete example of this philosophy would be render primitives: the spectrum of options allows renderable constructs take the form of tuples/arrays (easy to pickup, simple, and fast to code/prototype with), hashes (a little more work, but gives you the ability to add additional properties), open and string entities (more work than hashes, but yields cleaner apis), and finally - if you really need full power/flexibility in rendering - classes (which take the most amount of code and programming knowledge to create).~ +- Formatting line: ~DragonRuby's philosophy is to provide multiple options across the "make it fast" vs "make it right" spectrum, with incremental/intuitive transitions between the options provided. A concrete example of this philosophy would be render primitives: the spectrum of options allows renderable constructs that take the form of tuples/arrays (easy to pickup, simple, and fast to code/prototype with), hashes (a little more work, but gives you the ability to add additional properties), open and strict entities (more work than hashes, but yields cleaner apis), and finally - if you really need full power/flexibility in rendering - classes (which take the most amount of code and programming knowledge to create).~ - Line's tilde count is: 0 - Line contains link marker: false ** Processing line: ~~ @@ -175953,11 +185326,11 @@ Follows is a source code listing for all files that have been open sourced. This - Formatting line: ~The elevator pitch is:~ - Line's tilde count is: 0 - Line contains link marker: false -** Processing line: ~DragonRuby is a Multilevel Cross-platform Runtime. The "multiple levels" within the runtime allows us to target platforms no other Ruby can target: PC, Mac, Linux, Raspberry Pi, WASM, iOS, Android, Nintendo Switch, PS4, Xbox, and Scadia.~ +** Processing line: ~DragonRuby is a Multilevel Cross-platform Runtime. The "multiple levels" within the runtime allows us to target platforms no other Ruby can target: PC, Mac, Linux, Raspberry Pi, WASM, iOS, Android, Nintendo Switch, PS4, Xbox, and Stadia.~ - P detected. - Determining if line is a header. - Line does not appear to be a header. -- Formatting line: ~DragonRuby is a Multilevel Cross-platform Runtime. The "multiple levels" within the runtime allows us to target platforms no other Ruby can target: PC, Mac, Linux, Raspberry Pi, WASM, iOS, Android, Nintendo Switch, PS4, Xbox, and Scadia.~ +- Formatting line: ~DragonRuby is a Multilevel Cross-platform Runtime. The "multiple levels" within the runtime allows us to target platforms no other Ruby can target: PC, Mac, Linux, Raspberry Pi, WASM, iOS, Android, Nintendo Switch, PS4, Xbox, and Stadia.~ - Line's tilde count is: 0 - Line contains link marker: false ** Processing line: ~~ @@ -176171,11 +185544,11 @@ Follows is a source code listing for all files that have been open sourced. This - Line's tilde count is: 0 - Line contains link marker: false ** Processing line: ~~ -** Processing line: ~- All ~puts~ statements will also be saved to ~logs/log.txt~. So if you want to stay in your editor and not look at the terminal, or the DragonRuby Console, you can ~tail~ this file.~ +** Processing line: ~- All ~puts~ statements will also be saved to ~logs/puts.txt~. So if you want to stay in your editor and not look at the terminal, or the DragonRuby Console, you can ~tail~ this file.~ - LI detected. - Determining if line is a header. - Line does not appear to be a header. -- Formatting line: ~All ~puts~ statements will also be saved to ~logs/log.txt~. So if you want to stay in your editor and not look at the terminal, or the DragonRuby Console, you can ~tail~ this file.~ +- Formatting line: ~All ~puts~ statements will also be saved to ~logs/puts.txt~. So if you want to stay in your editor and not look at the terminal, or the DragonRuby Console, you can ~tail~ this file.~ - Line's tilde count is: 6 - Line contains link marker: false - CODE detected. @@ -176252,11 +185625,11 @@ Follows is a source code listing for all files that have been open sourced. This - Formatting line: ~ DragonRuby is hot loaded which gives you a very fast feedback loop (if the game throws an exception, it's because of the code you just added).~ - Line's tilde count is: 0 - Line contains link marker: false -** Processing line: ~2. Use ~./dragonruby mygame --record~ to create a game play recording that you can use to find the exception (you can replay a recoding by executing ~./dragonruby mygame --replay last_replay.txt~ or through the DragonRuby Console using ~$gtk.recording.start_replay "last_replay.txt"~.~ +** Processing line: ~2. Use ~./dragonruby mygame --record~ to create a game play recording that you can use to find the exception (you can replay a recording by executing ~./dragonruby mygame --replay last_replay.txt~ or through the DragonRuby Console using ~$gtk.recording.start_replay "last_replay.txt"~.~ - LI detected. - Determining if line is a header. - Line does not appear to be a header. -- Formatting line: ~ Use ~./dragonruby mygame --record~ to create a game play recording that you can use to find the exception (you can replay a recoding by executing ~./dragonruby mygame --replay last_replay.txt~ or through the DragonRuby Console using ~$gtk.recording.start_replay "last_replay.txt"~.~ +- Formatting line: ~ Use ~./dragonruby mygame --record~ to create a game play recording that you can use to find the exception (you can replay a recording by executing ~./dragonruby mygame --replay last_replay.txt~ or through the DragonRuby Console using ~$gtk.recording.start_replay "last_replay.txt"~.~ - Line's tilde count is: 6 - Line contains link marker: false - CODE detected. @@ -176319,11 +185692,11 @@ Follows is a source code listing for all files that have been open sourced. This - Line's tilde count is: 0 - Line contains link marker: true - LINK detected. -** Processing line: ~On a more serious note, Ruby's _quantity_ levels aren't what they used to be. And that's totally fine. Every one chases the new and shiny.~ +** Processing line: ~On a more serious note, Ruby's _quantity_ levels aren't what they used to be. And that's totally fine. Everyone chases the new and shiny.~ - P detected. - Determining if line is a header. - Line does not appear to be a header. -- Formatting line: ~On a more serious note, Ruby's _quantity_ levels aren't what they used to be. And that's totally fine. Every one chases the new and shiny.~ +- Formatting line: ~On a more serious note, Ruby's _quantity_ levels aren't what they used to be. And that's totally fine. Everyone chases the new and shiny.~ - Line's tilde count is: 0 - Line contains link marker: false ** Processing line: ~What really matters is _quality/maturity_. Here is the latest (StackOverflow Survey sorted by highest paid developers)[https://insights.stackoverflow.com/survey/2019#top-paying-technologies].~ @@ -176558,13 +185931,14 @@ Follows is a source code listing for all files that have been open sourced. This - Line's tilde count is: 0 - Line contains link marker: false ** Processing line: ~~ -** Processing line: ~You can try our [web-based sandbox environment](). But it won't do the runtime justice. Or just come to our [Slack]() or [Discord]() channel and ask questions. We'd be happy to have a one on one video chat with you and show off all the cool stuff we're doing.~ +** Processing line: ~You can try our web-based sandbox environment at [[http://fiddle.dragonruby.org]]. But it won't do the runtime justice. Or just come to our Discord Channel at [[http://discord.dragonruby.org]] and ask questions. We'd be happy to have a one on one video chat with you and show off all the cool stuff we're doing.~ - P detected. - Determining if line is a header. - Line does not appear to be a header. -- Formatting line: ~You can try our [web-based sandbox environment](). But it won't do the runtime justice. Or just come to our [Slack]() or [Discord]() channel and ask questions. We'd be happy to have a one on one video chat with you and show off all the cool stuff we're doing.~ +- Formatting line: ~You can try our web-based sandbox environment at [[http://fiddle.dragonruby.org]]. But it won't do the runtime justice. Or just come to our Discord Channel at [[http://discord.dragonruby.org]] and ask questions. We'd be happy to have a one on one video chat with you and show off all the cool stuff we're doing.~ - Line's tilde count is: 0 -- Line contains link marker: false +- Line contains link marker: true +- LINK detected. ** Processing line: ~Seriously just buy it. Get a refund if you don't like it. We make it stupid easy to do so.~ - P detected. - Determining if line is a header. @@ -176843,12 +186217,21 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ flip_vertically: false,~ ** Processing line: ~ flip_horizontally: false,~ ** Processing line: ~ angle_anchor_x: 0.5,~ -** Processing line: ~ angle_anchor_y: 1.0~ +** Processing line: ~ angle_anchor_y: 1.0,~ +** Processing line: ~ blendmode_enum: 1~ ** Processing line: ~ }~ ** Processing line: ~ end~ ** Processing line: ~#+end_src~ - PRE end detected. ** Processing line: ~~ +** Processing line: ~The ~blendmode_enum~ value can be set to ~0~ (no blending), ~1~ (alpha blending), ~2~ (additive blending), ~3~ (modulo blending), ~4~ (multiply blending).~ +- P detected. +- Determining if line is a header. +- Line does not appear to be a header. +- Formatting line: ~The ~blendmode_enum~ value can be set to ~0~ (no blending), ~1~ (alpha blending), ~2~ (additive blending), ~3~ (modulo blending), ~4~ (multiply blending).~ +- Line's tilde count is: 12 +- Line contains link marker: false +- CODE detected. ** Processing line: ~You can represent a sprite as an ~object~:~ - P detected. - Determining if line is a header. @@ -176866,7 +186249,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ :source_x, :source_y, :source_w, :source_h,~ ** Processing line: ~ :tile_x, :tile_y, :tile_w, :tile_h,~ ** Processing line: ~ :flip_horizontally, :flip_vertically,~ -** Processing line: ~ :angle_anchor_x, :angle_anchor_y~ +** Processing line: ~ :angle_anchor_x, :angle_anchor_y, :blendmode_enum~ ** Processing line: ~~ ** Processing line: ~ def primitive_marker~ ** Processing line: ~ :sprite~ @@ -177044,16 +186427,17 @@ Follows is a source code listing for all files that have been open sourced. This - PRE start detected. ** Processing line: ~ def tick args~ ** Processing line: ~ args.outputs.labels << {~ -** Processing line: ~ x: 200,~ -** Processing line: ~ y: 550,~ -** Processing line: ~ text: "dragonruby",~ -** Processing line: ~ size_enum: 2,~ -** Processing line: ~ alignment_enum: 1,~ -** Processing line: ~ r: 155,~ -** Processing line: ~ g: 50,~ -** Processing line: ~ b: 50,~ -** Processing line: ~ a: 255,~ -** Processing line: ~ font: "fonts/manaspc.ttf",~ +** Processing line: ~ x: 200,~ +** Processing line: ~ y: 550,~ +** Processing line: ~ text: "dragonruby",~ +** Processing line: ~ size_enum: 2,~ +** Processing line: ~ alignment_enum: 1,~ +** Processing line: ~ r: 155,~ +** Processing line: ~ g: 50,~ +** Processing line: ~ b: 50,~ +** Processing line: ~ a: 255,~ +** Processing line: ~ font: "fonts/manaspc.ttf",~ +** Processing line: ~ vertical_alignment_enum: 0, # 0 is bottom, 1 is middle, 2 is top~ ** Processing line: ~ # You can add any properties you like (this will be ignored/won't cause errors)~ ** Processing line: ~ game_data_one: "Something",~ ** Processing line: ~ game_data_two: {~ @@ -177109,6 +186493,41 @@ Follows is a source code listing for all files that have been open sourced. This - PRE end detected. ** Processing line: ~~ ** Processing line: ~~ +** Processing line: ~** Rendering Labels With New Line Characters And Wrapping~ +- H2 detected. +- Determining if line is a header. +- Line contains ~** ~... gsub-ing empty string +- Formatting line: ~Rendering Labels With New Line Characters And Wrapping~ +- Line's tilde count is: 0 +- Line contains link marker: false +- Determining if line is a header. +- Line contains ~** ~... gsub-ing empty string +- Formatting line: ~Rendering Labels With New Line Characters And Wrapping~ +- Line's tilde count is: 0 +- Line contains link marker: false +** Processing line: ~~ +** Processing line: ~You can use a strategy like the following to create multiple labels from a String.~ +- P detected. +- Determining if line is a header. +- Line does not appear to be a header. +- Formatting line: ~You can use a strategy like the following to create multiple labels from a String.~ +- Line's tilde count is: 0 +- Line contains link marker: false +** Processing line: ~~ +** Processing line: ~#+begin_src ruby~ +- PRE start detected. +** Processing line: ~ def tick args~ +** Processing line: ~ long_string = "Lorem ipsum dolor sit amet, consectetur adipiscing elitteger dolor velit, ultricies vitae libero vel, aliquam imperdiet enim."~ +** Processing line: ~ max_character_length = 30~ +** Processing line: ~ long_strings_split = args.string.wrapped_lines long_string, max_character_length~ +** Processing line: ~ args.outputs.labels << long_strings_split.map_with_index do |s, i|~ +** Processing line: ~ { x: 10, y: 600 - (i * 20), text: s }~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~#+end_src~ +- PRE end detected. +** Processing line: ~~ +** Processing line: ~~ ** Processing line: ~** How To Play A Sound~ - H2 detected. - Determining if line is a header. @@ -177792,11 +187211,11 @@ Follows is a source code listing for all files that have been open sourced. This - Line's tilde count is: 2 - Line contains link marker: false - CODE detected. -** Processing line: ~Returns ~-1~ (down), ~0~ (neutral), or ~+1~ (right) depending on results of ~args.inputs.up~ and ~args.inputs.down~.~ +** Processing line: ~Returns ~-1~ (down), ~0~ (neutral), or ~+1~ (up) depending on results of ~args.inputs.down~ and ~args.inputs.up~.~ - P detected. - Determining if line is a header. - Line does not appear to be a header. -- Formatting line: ~Returns ~-1~ (down), ~0~ (neutral), or ~+1~ (right) depending on results of ~args.inputs.up~ and ~args.inputs.down~.~ +- Formatting line: ~Returns ~-1~ (down), ~0~ (neutral), or ~+1~ (up) depending on results of ~args.inputs.down~ and ~args.inputs.up~.~ - Line's tilde count is: 10 - Line contains link marker: false - CODE detected. @@ -178053,12 +187472,44 @@ Follows is a source code listing for all files that have been open sourced. This - Line's tilde count is: 2 - Line contains link marker: false - CODE detected. -** Processing line: ~Represents the mouse wheel. Returns ~nil~ if no mouse wheel actions occurred. ***** ~.x~ Returns the negative or positive number if the mouse wheel has changed in the ~x~ axis. ***** ~.y~ Returns the negative or positive number if the mouse wheel has changed in the ~y~ axis.~ +** Processing line: ~Represents the mouse wheel. Returns ~nil~ if no mouse wheel actions occurred.~ - P detected. - Determining if line is a header. - Line does not appear to be a header. -- Formatting line: ~Represents the mouse wheel. Returns ~nil~ if no mouse wheel actions occurred. ***** ~.x~ Returns the negative or positive number if the mouse wheel has changed in the ~x~ axis. ***** ~.y~ Returns the negative or positive number if the mouse wheel has changed in the ~y~ axis.~ -- Line's tilde count is: 10 +- Formatting line: ~Represents the mouse wheel. Returns ~nil~ if no mouse wheel actions occurred.~ +- Line's tilde count is: 2 +- Line contains link marker: false +- CODE detected. +** Processing line: ~***** ~.x~~ +- P detected. +- Determining if line is a header. +- Line does not appear to be a header. +- Formatting line: ~***** ~.x~~ +- Line's tilde count is: 2 +- Line contains link marker: false +- CODE detected. +** Processing line: ~Returns the negative or positive number if the mouse wheel has changed in the ~x~ axis.~ +- P detected. +- Determining if line is a header. +- Line does not appear to be a header. +- Formatting line: ~Returns the negative or positive number if the mouse wheel has changed in the ~x~ axis.~ +- Line's tilde count is: 2 +- Line contains link marker: false +- CODE detected. +** Processing line: ~***** ~.y~~ +- P detected. +- Determining if line is a header. +- Line does not appear to be a header. +- Formatting line: ~***** ~.y~~ +- Line's tilde count is: 2 +- Line contains link marker: false +- CODE detected. +** Processing line: ~Returns the negative or positive number if the mouse wheel has changed in the ~y~ axis.~ +- P detected. +- Determining if line is a header. +- Line does not appear to be a header. +- Formatting line: ~Returns the negative or positive number if the mouse wheel has changed in the ~y~ axis.~ +- Line's tilde count is: 2 - Line contains link marker: false - CODE detected. ** Processing line: ~**** ~.click~ OR ~.down~, ~.previous_click~, ~.up~~ @@ -178104,18 +187555,20 @@ Follows is a source code listing for all files that have been open sourced. This - Formatting line: ~Represents controllers connected to the usb ports.~ - Line's tilde count is: 0 - Line contains link marker: false -** Processing line: ~**** ~.up~ +** Processing line: ~**** ~.up~~ - H4 detected. - Determining if line is a header. - Line contains ~**** ~... gsub-ing empty string -- Formatting line: ~~.up~ -- Line's tilde count is: 1 +- Formatting line: ~~.up~~ +- Line's tilde count is: 2 - Line contains link marker: false +- CODE detected. - Determining if line is a header. - Line contains ~**** ~... gsub-ing empty string -- Formatting line: ~~.up~ -- Line's tilde count is: 1 +- Formatting line: ~~.up~~ +- Line's tilde count is: 2 - Line contains link marker: false +- CODE detected. ** Processing line: ~Returns ~true~ if ~up~ is pressed or held on the directional or left analog.~ - P detected. - Determining if line is a header. @@ -178124,18 +187577,20 @@ Follows is a source code listing for all files that have been open sourced. This - Line's tilde count is: 4 - Line contains link marker: false - CODE detected. -** Processing line: ~**** ~.down~ +** Processing line: ~**** ~.down~~ - H4 detected. - Determining if line is a header. - Line contains ~**** ~... gsub-ing empty string -- Formatting line: ~~.down~ -- Line's tilde count is: 1 +- Formatting line: ~~.down~~ +- Line's tilde count is: 2 - Line contains link marker: false +- CODE detected. - Determining if line is a header. - Line contains ~**** ~... gsub-ing empty string -- Formatting line: ~~.down~ -- Line's tilde count is: 1 +- Formatting line: ~~.down~~ +- Line's tilde count is: 2 - Line contains link marker: false +- CODE detected. ** Processing line: ~Returns ~true~ if ~down~ is pressed or held on the directional or left analog.~ - P detected. - Determining if line is a header. @@ -178144,18 +187599,20 @@ Follows is a source code listing for all files that have been open sourced. This - Line's tilde count is: 4 - Line contains link marker: false - CODE detected. -** Processing line: ~**** ~.left~ +** Processing line: ~**** ~.left~~ - H4 detected. - Determining if line is a header. - Line contains ~**** ~... gsub-ing empty string -- Formatting line: ~~.left~ -- Line's tilde count is: 1 +- Formatting line: ~~.left~~ +- Line's tilde count is: 2 - Line contains link marker: false +- CODE detected. - Determining if line is a header. - Line contains ~**** ~... gsub-ing empty string -- Formatting line: ~~.left~ -- Line's tilde count is: 1 +- Formatting line: ~~.left~~ +- Line's tilde count is: 2 - Line contains link marker: false +- CODE detected. ** Processing line: ~Returns ~true~ if ~left~ is pressed or held on the directional or left analog.~ - P detected. - Determining if line is a header. @@ -178164,18 +187621,20 @@ Follows is a source code listing for all files that have been open sourced. This - Line's tilde count is: 4 - Line contains link marker: false - CODE detected. -** Processing line: ~**** ~.right~ +** Processing line: ~**** ~.right~~ - H4 detected. - Determining if line is a header. - Line contains ~**** ~... gsub-ing empty string -- Formatting line: ~~.right~ -- Line's tilde count is: 1 +- Formatting line: ~~.right~~ +- Line's tilde count is: 2 - Line contains link marker: false +- CODE detected. - Determining if line is a header. - Line contains ~**** ~... gsub-ing empty string -- Formatting line: ~~.right~ -- Line's tilde count is: 1 +- Formatting line: ~~.right~~ +- Line's tilde count is: 2 - Line contains link marker: false +- CODE detected. ** Processing line: ~Returns ~true~ if ~right~ is pressed or held on the directional or left analog.~ - P detected. - Determining if line is a header. @@ -178184,18 +187643,20 @@ Follows is a source code listing for all files that have been open sourced. This - Line's tilde count is: 4 - Line contains link marker: false - CODE detected. -** Processing line: ~**** ~.left_right~ +** Processing line: ~**** ~.left_right~~ - H4 detected. - Determining if line is a header. - Line contains ~**** ~... gsub-ing empty string -- Formatting line: ~~.left_right~ -- Line's tilde count is: 1 +- Formatting line: ~~.left_right~~ +- Line's tilde count is: 2 - Line contains link marker: false +- CODE detected. - Determining if line is a header. - Line contains ~**** ~... gsub-ing empty string -- Formatting line: ~~.left_right~ -- Line's tilde count is: 1 +- Formatting line: ~~.left_right~~ +- Line's tilde count is: 2 - Line contains link marker: false +- CODE detected. ** Processing line: ~Returns ~-1~ (left), ~0~ (neutral), or ~+1~ (right) depending on results of ~args.inputs.controller_(one|two).left~ and ~args.inputs.controller_(one|two).right~.~ - P detected. - Determining if line is a header. @@ -178204,18 +187665,20 @@ Follows is a source code listing for all files that have been open sourced. This - Line's tilde count is: 10 - Line contains link marker: false - CODE detected. -** Processing line: ~**** ~.up_down~ +** Processing line: ~**** ~.up_down~~ - H4 detected. - Determining if line is a header. - Line contains ~**** ~... gsub-ing empty string -- Formatting line: ~~.up_down~ -- Line's tilde count is: 1 +- Formatting line: ~~.up_down~~ +- Line's tilde count is: 2 - Line contains link marker: false +- CODE detected. - Determining if line is a header. - Line contains ~**** ~... gsub-ing empty string -- Formatting line: ~~.up_down~ -- Line's tilde count is: 1 +- Formatting line: ~~.up_down~~ +- Line's tilde count is: 2 - Line contains link marker: false +- CODE detected. ** Processing line: ~Returns ~-1~ (down), ~0~ (neutral), or ~+1~ (up) depending on results of ~args.inputs.controller_(one|two).up~ and ~args.inputs.controller_(one|two).down~.~ - P detected. - Determining if line is a header. @@ -178312,17 +187775,17 @@ Follows is a source code listing for all files that have been open sourced. This - Line's tilde count is: 4 - Line contains link marker: false - CODE detected. -** Processing line: ~**** ~.directional_up)~~ +** Processing line: ~**** ~.directional_up~~ - H4 detected. - Determining if line is a header. - Line contains ~**** ~... gsub-ing empty string -- Formatting line: ~~.directional_up)~~ +- Formatting line: ~~.directional_up~~ - Line's tilde count is: 2 - Line contains link marker: false - CODE detected. - Determining if line is a header. - Line contains ~**** ~... gsub-ing empty string -- Formatting line: ~~.directional_up)~~ +- Formatting line: ~~.directional_up~~ - Line's tilde count is: 2 - Line contains link marker: false - CODE detected. @@ -178334,17 +187797,17 @@ Follows is a source code listing for all files that have been open sourced. This - Line's tilde count is: 4 - Line contains link marker: false - CODE detected. -** Processing line: ~**** ~.directional_down)~~ +** Processing line: ~**** ~.directional_down~~ - H4 detected. - Determining if line is a header. - Line contains ~**** ~... gsub-ing empty string -- Formatting line: ~~.directional_down)~~ +- Formatting line: ~~.directional_down~~ - Line's tilde count is: 2 - Line contains link marker: false - CODE detected. - Determining if line is a header. - Line contains ~**** ~... gsub-ing empty string -- Formatting line: ~~.directional_down)~~ +- Formatting line: ~~.directional_down~~ - Line's tilde count is: 2 - Line contains link marker: false - CODE detected. @@ -178356,17 +187819,17 @@ Follows is a source code listing for all files that have been open sourced. This - Line's tilde count is: 4 - Line contains link marker: false - CODE detected. -** Processing line: ~**** ~.directional_left)~~ +** Processing line: ~**** ~.directional_left~~ - H4 detected. - Determining if line is a header. - Line contains ~**** ~... gsub-ing empty string -- Formatting line: ~~.directional_left)~~ +- Formatting line: ~~.directional_left~~ - Line's tilde count is: 2 - Line contains link marker: false - CODE detected. - Determining if line is a header. - Line contains ~**** ~... gsub-ing empty string -- Formatting line: ~~.directional_left)~~ +- Formatting line: ~~.directional_left~~ - Line's tilde count is: 2 - Line contains link marker: false - CODE detected. @@ -178378,17 +187841,17 @@ Follows is a source code listing for all files that have been open sourced. This - Line's tilde count is: 4 - Line contains link marker: false - CODE detected. -** Processing line: ~**** ~.directional_right)~~ +** Processing line: ~**** ~.directional_right~~ - H4 detected. - Determining if line is a header. - Line contains ~**** ~... gsub-ing empty string -- Formatting line: ~~.directional_right)~~ +- Formatting line: ~~.directional_right~~ - Line's tilde count is: 2 - Line contains link marker: false - CODE detected. - Determining if line is a header. - Line contains ~**** ~... gsub-ing empty string -- Formatting line: ~~.directional_right)~~ +- Formatting line: ~~.directional_right~~ - Line's tilde count is: 2 - Line contains link marker: false - CODE detected. @@ -179780,6 +189243,48 @@ Follows is a source code listing for all files that have been open sourced. This - Line's tilde count is: 2 - Line contains link marker: false - CODE detected. +** Processing line: ~Here are some general notes with regards to the arguments these geometric functions accept.~ +- P detected. +- Determining if line is a header. +- Line does not appear to be a header. +- Formatting line: ~Here are some general notes with regards to the arguments these geometric functions accept.~ +- Line's tilde count is: 0 +- Line contains link marker: false +** Processing line: ~~ +** Processing line: ~1. ~Rectangles~ can be represented as an ~Array~ with four (or more) values ~[x, y, w, h]~, as a ~Hash~ ~{ x:, y:, w:, h: }~ or an object that responds to ~x~, ~y~, ~w~, and ~h~.~ +- OL start detected. +- LI detected. +- Determining if line is a header. +- Line does not appear to be a header. +- Formatting line: ~ ~Rectangles~ can be represented as an ~Array~ with four (or more) values ~[x, y, w, h]~, as a ~Hash~ ~{ x:, y:, w:, h: }~ or an object that responds to ~x~, ~y~, ~w~, and ~h~.~ +- Line's tilde count is: 18 +- Line contains link marker: false +- CODE detected. +** Processing line: ~2. ~Points~ can be represent as an ~Array~ with two (or more) values ~[x, y]~, as a ~Hash~ ~{ x:, y:}~ or an object that responds to ~x~, and ~y~.~ +- LI detected. +- Determining if line is a header. +- Line does not appear to be a header. +- Formatting line: ~ ~Points~ can be represent as an ~Array~ with two (or more) values ~[x, y]~, as a ~Hash~ ~{ x:, y:}~ or an object that responds to ~x~, and ~y~.~ +- Line's tilde count is: 14 +- Line contains link marker: false +- CODE detected. +** Processing line: ~3. ~Lines~ can be represented as an ~Array~ with four (or more) values ~[x, y, x2, y2]~, as a ~Hash~ ~{ x:, y:, x2:, y2: }~ or an object that responds to ~x~, ~y~, ~x2~, and ~y2~.~ +- LI detected. +- Determining if line is a header. +- Line does not appear to be a header. +- Formatting line: ~ ~Lines~ can be represented as an ~Array~ with four (or more) values ~[x, y, x2, y2]~, as a ~Hash~ ~{ x:, y:, x2:, y2: }~ or an object that responds to ~x~, ~y~, ~x2~, and ~y2~.~ +- Line's tilde count is: 18 +- Line contains link marker: false +- CODE detected. +** Processing line: ~4. ~Angles~ are represented as degrees (not radians).~ +- LI detected. +- Determining if line is a header. +- Line does not appear to be a header. +- Formatting line: ~ ~Angles~ are represented as degrees (not radians).~ +- Line's tilde count is: 2 +- Line contains link marker: false +- CODE detected. +** Processing line: ~~ ** Processing line: ~*** ~.inside_rect? rect_1, rect_2~~ - H3 detected. - Determining if line is a header. @@ -182066,11 +191571,11 @@ Follows is a source code listing for all files that have been open sourced. This - Line's tilde count is: 0 - Line contains link marker: false ** Processing line: ~~ -** Processing line: ~The value for the color and alpha is an number between ~0~ and ~255~. The alpha property is optional and will be set to ~255~ if not specified.~ +** Processing line: ~The value for the color and alpha is a number between ~0~ and ~255~. The alpha property is optional and will be set to ~255~ if not specified.~ - P detected. - Determining if line is a header. - Line does not appear to be a header. -- Formatting line: ~The value for the color and alpha is an number between ~0~ and ~255~. The alpha property is optional and will be set to ~255~ if not specified.~ +- Formatting line: ~The value for the color and alpha is a number between ~0~ and ~255~. The alpha property is optional and will be set to ~255~ if not specified.~ - Line's tilde count is: 6 - Line contains link marker: false - CODE detected. @@ -182144,11 +191649,11 @@ Follows is a source code listing for all files that have been open sourced. This - Line's tilde count is: 0 - Line contains link marker: false ** Processing line: ~~ -** Processing line: ~You can also create a class with solid/border properties and render it as a primitive. ALL properties must on the class. *Additionally*, a method called ~primitive_marker~ must be defined on the class.~ +** Processing line: ~You can also create a class with solid/border properties and render it as a primitive. ALL properties must be on the class. *Additionally*, a method called ~primitive_marker~ must be defined on the class.~ - P detected. - Determining if line is a header. - Line does not appear to be a header. -- Formatting line: ~You can also create a class with solid/border properties and render it as a primitive. ALL properties must on the class. *Additionally*, a method called ~primitive_marker~ must be defined on the class.~ +- Formatting line: ~You can also create a class with solid/border properties and render it as a primitive. ALL properties must be on the class. *Additionally*, a method called ~primitive_marker~ must be defined on the class.~ - Line's tilde count is: 2 - Line contains link marker: false - CODE detected. @@ -182252,6 +191757,205 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~~ ** Processing line: ~~ ** Processing line: ~~ +** Processing line: ~* DOCS: ~GTK::Outputs#sprites~~ +- H1 detected. +- Determining if line is a header. +- Line contains ~* ~... gsub-ing empty string +- Formatting line: ~DOCS: ~GTK::Outputs#sprites~~ +- Line's tilde count is: 2 +- Line contains link marker: false +- CODE detected. +** Processing line: ~~ +** Processing line: ~Add primitives to this collection to render a sprite to the screen.~ +- P detected. +- Determining if line is a header. +- Line does not appear to be a header. +- Formatting line: ~Add primitives to this collection to render a sprite to the screen.~ +- Line's tilde count is: 0 +- Line contains link marker: false +** Processing line: ~~ +** Processing line: ~** Rendering a sprite using an Array~ +- H2 detected. +- Determining if line is a header. +- Line contains ~** ~... gsub-ing empty string +- Formatting line: ~Rendering a sprite using an Array~ +- Line's tilde count is: 0 +- Line contains link marker: false +- Determining if line is a header. +- Line contains ~** ~... gsub-ing empty string +- Formatting line: ~Rendering a sprite using an Array~ +- Line's tilde count is: 0 +- Line contains link marker: false +** Processing line: ~~ +** Processing line: ~Creates a sprite of a white circle located at 100, 100. 160 pixels wide and 90 pixels tall.~ +- P detected. +- Determining if line is a header. +- Line does not appear to be a header. +- Formatting line: ~Creates a sprite of a white circle located at 100, 100. 160 pixels wide and 90 pixels tall.~ +- Line's tilde count is: 0 +- Line contains link marker: false +** Processing line: ~~ +** Processing line: ~#+begin_src~ +- PRE start detected. +** Processing line: ~ def tick args~ +** Processing line: ~ # X Y WIDTH HEIGHT PATH~ +** Processing line: ~ args.outputs.sprites << [100, 100, 160, 90, "sprites/circle/white.png]~ +** Processing line: ~ end~ +** Processing line: ~#+end_src~ +- PRE end detected. +** Processing line: ~~ +** Processing line: ~~ +** Processing line: ~** Rendering a sprite using an Array with colors and alpha~ +- H2 detected. +- Determining if line is a header. +- Line contains ~** ~... gsub-ing empty string +- Formatting line: ~Rendering a sprite using an Array with colors and alpha~ +- Line's tilde count is: 0 +- Line contains link marker: false +- Determining if line is a header. +- Line contains ~** ~... gsub-ing empty string +- Formatting line: ~Rendering a sprite using an Array with colors and alpha~ +- Line's tilde count is: 0 +- Line contains link marker: false +** Processing line: ~~ +** Processing line: ~The value for the color and alpha is a number between ~0~ and ~255~. The alpha property is optional and will be set to ~255~ if not specified.~ +- P detected. +- Determining if line is a header. +- Line does not appear to be a header. +- Formatting line: ~The value for the color and alpha is a number between ~0~ and ~255~. The alpha property is optional and will be set to ~255~ if not specified.~ +- Line's tilde count is: 6 +- Line contains link marker: false +- CODE detected. +** Processing line: ~Creates a green circle sprite with an opacity of 50%.~ +- P detected. +- Determining if line is a header. +- Line does not appear to be a header. +- Formatting line: ~Creates a green circle sprite with an opacity of 50%.~ +- Line's tilde count is: 0 +- Line contains link marker: false +** Processing line: ~~ +** Processing line: ~#+begin_src~ +- PRE start detected. +** Processing line: ~ def tick args~ +** Processing line: ~ # X Y WIDTH HEIGHT PATH ANGLE ALPHA RED GREEN BLUE~ +** Processing line: ~ args.outputs.sprites << [100, 100, 160, 90, "sprites/circle/white.png", 0, 128, 0, 255, 0]~ +** Processing line: ~ end~ +** Processing line: ~#+end_src~ +- PRE end detected. +** Processing line: ~~ +** Processing line: ~~ +** Processing line: ~** Rendering a sprite using a Hash~ +- H2 detected. +- Determining if line is a header. +- Line contains ~** ~... gsub-ing empty string +- Formatting line: ~Rendering a sprite using a Hash~ +- Line's tilde count is: 0 +- Line contains link marker: false +- Determining if line is a header. +- Line contains ~** ~... gsub-ing empty string +- Formatting line: ~Rendering a sprite using a Hash~ +- Line's tilde count is: 0 +- Line contains link marker: false +** Processing line: ~~ +** Processing line: ~If you want a more readable invocation. You can use the following hash to create a sprite. Any parameters that are not specified will be given a default value. The keys of the hash can be provided in any order.~ +- P detected. +- Determining if line is a header. +- Line does not appear to be a header. +- Formatting line: ~If you want a more readable invocation. You can use the following hash to create a sprite. Any parameters that are not specified will be given a default value. The keys of the hash can be provided in any order.~ +- Line's tilde count is: 0 +- Line contains link marker: false +** Processing line: ~~ +** Processing line: ~#+begin_src~ +- PRE start detected. +** Processing line: ~ def tick args~ +** Processing line: ~ args.outputs.sprites << {~ +** Processing line: ~ x: 0,~ +** Processing line: ~ y: 0,~ +** Processing line: ~ w: 100,~ +** Processing line: ~ h: 100,~ +** Processing line: ~ path: "sprites/circle/white.png",~ +** Processing line: ~ angle: 0,~ +** Processing line: ~ a: 255,~ +** Processing line: ~ r: 0,~ +** Processing line: ~ g: 255,~ +** Processing line: ~ b: 0~ +** Processing line: ~ }~ +** Processing line: ~ end~ +** Processing line: ~#+end_src~ +- PRE end detected. +** Processing line: ~~ +** Processing line: ~~ +** Processing line: ~** Rendering a solid using a Class~ +- H2 detected. +- Determining if line is a header. +- Line contains ~** ~... gsub-ing empty string +- Formatting line: ~Rendering a solid using a Class~ +- Line's tilde count is: 0 +- Line contains link marker: false +- Determining if line is a header. +- Line contains ~** ~... gsub-ing empty string +- Formatting line: ~Rendering a solid using a Class~ +- Line's tilde count is: 0 +- Line contains link marker: false +** Processing line: ~~ +** Processing line: ~You can also create a class with solid/border properties and render it as a primitive. ALL properties must be on the class. *Additionally*, a method called ~primitive_marker~ must be defined on the class.~ +- P detected. +- Determining if line is a header. +- Line does not appear to be a header. +- Formatting line: ~You can also create a class with solid/border properties and render it as a primitive. ALL properties must be on the class. *Additionally*, a method called ~primitive_marker~ must be defined on the class.~ +- Line's tilde count is: 2 +- Line contains link marker: false +- CODE detected. +** Processing line: ~Here is an example:~ +- P detected. +- Determining if line is a header. +- Line does not appear to be a header. +- Formatting line: ~Here is an example:~ +- Line's tilde count is: 0 +- Line contains link marker: false +** Processing line: ~~ +** Processing line: ~#+begin_src~ +- PRE start detected. +** Processing line: ~ # Create type with ALL sprite properties AND primitive_marker~ +** Processing line: ~ class Sprite~ +** Processing line: ~ attr_accessor :x, :y, :w, :h, :path, :angle, :angle_anchor_x, :angle_anchor_y, :tile_x, :tile_y, :tile_w, :tile_h, :source_x, :source_y, :source_w, :source_h, :flip_horizontally, :flip_vertically, :a, :r, :g, :b~ +** Processing line: ~~ +** Processing line: ~ def primitive_marker~ +** Processing line: ~ :sprite~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ # Inherit from type~ +** Processing line: ~ class Circle < Sprite~ +** Processing line: ~ # constructor~ +** Processing line: ~ def initialize x, y, size, path~ +** Processing line: ~ self.x = x~ +** Processing line: ~ self.y = y~ +** Processing line: ~ self.w = size~ +** Processing line: ~ self.h = size~ +** Processing line: ~ self.path = path~ +** Processing line: ~ end~ +** Processing line: ~ def serlialize~ +** Processing line: ~ {x:self.x, y:self.y, w:self.w, h:self.h, path:self.path}~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def inspect~ +** Processing line: ~ serlialize.to_s~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def to_s~ +** Processing line: ~ serlialize.to_s~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~ def tick args~ +** Processing line: ~ # render circle sprite~ +** Processing line: ~ args.outputs.sprites << Circle.new(10, 10, 32,"sprites/circle/white.png")~ +** Processing line: ~ end~ +** Processing line: ~#+end_src~ +- PRE end detected. +** Processing line: ~~ +** Processing line: ~~ +** Processing line: ~~ ** Processing line: ~* DOCS: ~GTK::Outputs#screenshots~~ - H1 detected. - Determining if line is a header. @@ -182515,51 +192219,51 @@ Follows is a source code listing for all files that have been open sourced. This - Line's tilde count is: 6 - Line contains link marker: false - CODE detected. -** Processing line: ~- ~w~: Width of the point that always returns ~0~ (included so that it can seemlessly work with ~GTK::Geometry~ functions).~ +** Processing line: ~- ~w~: Width of the point that always returns ~0~ (included so that it can seamlessly work with ~GTK::Geometry~ functions).~ - LI detected. - Determining if line is a header. - Line does not appear to be a header. -- Formatting line: ~~w~: Width of the point that always returns ~0~ (included so that it can seemlessly work with ~GTK::Geometry~ functions).~ +- Formatting line: ~~w~: Width of the point that always returns ~0~ (included so that it can seamlessly work with ~GTK::Geometry~ functions).~ - Line's tilde count is: 6 - Line contains link marker: false - CODE detected. -** Processing line: ~- ~h~: Height of the point that always returns ~0~ (included so that it can seemlessly work with ~GTK::Geometry~ functions).~ +** Processing line: ~- ~h~: Height of the point that always returns ~0~ (included so that it can seamlessly work with ~GTK::Geometry~ functions).~ - LI detected. - Determining if line is a header. - Line does not appear to be a header. -- Formatting line: ~~h~: Height of the point that always returns ~0~ (included so that it can seemlessly work with ~GTK::Geometry~ functions).~ +- Formatting line: ~~h~: Height of the point that always returns ~0~ (included so that it can seamlessly work with ~GTK::Geometry~ functions).~ - Line's tilde count is: 6 - Line contains link marker: false - CODE detected. -** Processing line: ~- ~left~: This value is the same as ~x~ (included so that it can seemlessly work with ~GTK::Geometry~ functions).~ +** Processing line: ~- ~left~: This value is the same as ~x~ (included so that it can seamlessly work with ~GTK::Geometry~ functions).~ - LI detected. - Determining if line is a header. - Line does not appear to be a header. -- Formatting line: ~~left~: This value is the same as ~x~ (included so that it can seemlessly work with ~GTK::Geometry~ functions).~ +- Formatting line: ~~left~: This value is the same as ~x~ (included so that it can seamlessly work with ~GTK::Geometry~ functions).~ - Line's tilde count is: 6 - Line contains link marker: false - CODE detected. -** Processing line: ~- ~right~: This value is the same as ~x~ (included so that it can seemlessly work with ~GTK::Geometry~ functions).~ +** Processing line: ~- ~right~: This value is the same as ~x~ (included so that it can seamlessly work with ~GTK::Geometry~ functions).~ - LI detected. - Determining if line is a header. - Line does not appear to be a header. -- Formatting line: ~~right~: This value is the same as ~x~ (included so that it can seemlessly work with ~GTK::Geometry~ functions).~ +- Formatting line: ~~right~: This value is the same as ~x~ (included so that it can seamlessly work with ~GTK::Geometry~ functions).~ - Line's tilde count is: 6 - Line contains link marker: false - CODE detected. -** Processing line: ~- ~top~: This value is the same as ~y~ (included so that it can seemlessly work with ~GTK::Geometry~ functions).~ +** Processing line: ~- ~top~: This value is the same as ~y~ (included so that it can seamlessly work with ~GTK::Geometry~ functions).~ - LI detected. - Determining if line is a header. - Line does not appear to be a header. -- Formatting line: ~~top~: This value is the same as ~y~ (included so that it can seemlessly work with ~GTK::Geometry~ functions).~ +- Formatting line: ~~top~: This value is the same as ~y~ (included so that it can seamlessly work with ~GTK::Geometry~ functions).~ - Line's tilde count is: 6 - Line contains link marker: false - CODE detected. -** Processing line: ~- ~bottom~: This value is the same as ~y~ (included so that it can seemlessly work with ~GTK::Geometry~ functions).~ +** Processing line: ~- ~bottom~: This value is the same as ~y~ (included so that it can seamlessly work with ~GTK::Geometry~ functions).~ - LI detected. - Determining if line is a header. - Line does not appear to be a header. -- Formatting line: ~~bottom~: This value is the same as ~y~ (included so that it can seemlessly work with ~GTK::Geometry~ functions).~ +- Formatting line: ~~bottom~: This value is the same as ~y~ (included so that it can seamlessly work with ~GTK::Geometry~ functions).~ - Line's tilde count is: 6 - Line contains link marker: false - CODE detected. @@ -184489,7 +194193,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ g: 0,~ ** Processing line: ~ b: 200,~ ** Processing line: ~ a: 255,~ -** Processing line: ~ font: "manaspc.ttf" }.label~ +** Processing line: ~ font: "manaspc.ttf" }.label!~ ** Processing line: ~~ ** Processing line: ~ # Primitives can hold anything, and can be given a label in the following forms~ ** Processing line: ~ args.outputs.primitives << [690 + 150, 330 - 80, "Custom font (.primitives Array)", 0, 1, 125, 0, 200, 255, "manaspc.ttf" ].label~ @@ -184503,7 +194207,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ g: 0,~ ** Processing line: ~ b: 200,~ ** Processing line: ~ a: 255,~ -** Processing line: ~ font: "manaspc.ttf" }.label~ +** Processing line: ~ font: "manaspc.ttf" }.label!~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ def tick_instructions args, text, y = 715~ @@ -184802,801 +194506,6 @@ Follows is a source code listing for all files that have been open sourced. This - PRE end detected. ** Processing line: ~~ ** Processing line: ~~ -** Processing line: ~*** Rendering Basics - Audio Mixer - main.rb~ -- H3 detected. -- Determining if line is a header. -- Line contains ~*** ~... gsub-ing empty string -- Formatting line: ~Rendering Basics - Audio Mixer - main.rb~ -- Line's tilde count is: 0 -- Line contains link marker: false -- Determining if line is a header. -- Line contains ~*** ~... gsub-ing empty string -- Formatting line: ~Rendering Basics - Audio Mixer - main.rb~ -- Line's tilde count is: 0 -- Line contains link marker: false -** Processing line: ~~ -** Processing line: ~#+begin_src ruby~ -- PRE start detected. -** Processing line: ~ # ./samples/01_rendering_basics/06_audio_mixer/app/main.rb~ -** Processing line: ~ $gtk.reset~ -** Processing line: ~~ -** Processing line: ~ $boxsize = 30~ -** Processing line: ~~ -** Processing line: ~ def render_sources args~ -** Processing line: ~ mouse_in_panel = (args.state.selected != 0) && args.inputs.mouse.position.inside_rect?([900, 450, 340, 250])~ -** Processing line: ~ mouse_new_down = (args.state.mouse_held == 1)~ -** Processing line: ~~ -** Processing line: ~ if (mouse_new_down && !mouse_in_panel)~ -** Processing line: ~ args.state.selected = 0 # will reset below if we hit something.~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ args.audio.keys.each { |k|~ -** Processing line: ~ s = args.audio[k]~ -** Processing line: ~~ -** Processing line: ~ if (mouse_new_down) && !mouse_in_panel && args.inputs.mouse.position.inside_rect?([s[:screenx], s[:screeny], $boxsize, $boxsize])~ -** Processing line: ~ args.state.selected = k~ -** Processing line: ~ args.state.dragging_source = true~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ isselected = (k == args.state.selected)~ -** Processing line: ~~ -** Processing line: ~ if isselected && args.state.dragging_source~ -** Processing line: ~ # you can hang anything on the audio hashes you want, so we store the~ -** Processing line: ~ # actual screen position so it doesn't scale weirdly vs your mouse.~ -** Processing line: ~ s[:screenx] = args.inputs.mouse.x - ($boxsize / 2)~ -** Processing line: ~ s[:screeny] = args.inputs.mouse.y - ($boxsize / 2)~ -** Processing line: ~~ -** Processing line: ~ s[:screeny] = 50 if s[:screeny] < 50~ -** Processing line: ~ s[:screeny] = (719 - $boxsize) if s[:screeny] > (719 - $boxsize)~ -** Processing line: ~ s[:screenx] = 0 if s[:screenx] < 0~ -** Processing line: ~ s[:screenx] = (1279 - $boxsize) if s[:screenx] > (1279 - $boxsize)~ -** Processing line: ~~ -** Processing line: ~ s[:x] = ((s[:screenx] / 1279.0) * 2.0) - 1.0 # scale to -1.0 - 1.0 range~ -** Processing line: ~ s[:y] = ((s[:screeny] / 719.0) * 2.0) - 1.0 # scale to -1.0 - 1.0 range~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ color = isselected ? [ 0, 255, 0, 255 ] : [ 0, 0, 255, 255 ]~ -** Processing line: ~ args.outputs.primitives << [s[:screenx], s[:screeny], $boxsize, $boxsize, *color].solid~ -** Processing line: ~ }~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ def render_panel args~ -** Processing line: ~ s = args.audio[args.state.selected]~ -** Processing line: ~ return if s.nil?~ -** Processing line: ~ mouse_down = (args.state.mouse_held > 0)~ -** Processing line: ~~ -** Processing line: ~ args.outputs.primitives << [900, 450, 340, 250, 127, 127, 200, 255].solid~ -** Processing line: ~ args.outputs.primitives << [1075, 690, "Source ##{args.state.selected}", 3, 1, 255, 255, 255].label~ -** Processing line: ~ args.outputs.primitives << [910, 660, 1230, 660, 255, 255, 255].line~ -** Processing line: ~ args.outputs.primitives << [910, 650, "screen: (#{s[:screenx].to_i}, #{s[:screeny].to_i})", 0, 0, 255, 255, 255].label~ -** Processing line: ~ args.outputs.primitives << [910, 625, "position: (#{s[:x].round(5).to_s[0..6]}, #{s[:y].round(5).to_s[0..6]})", 0, 0, 255, 255, 255].label~ -** Processing line: ~~ -** Processing line: ~ slider = [1022, 586, 200, 7]~ -** Processing line: ~ if mouse_down && args.inputs.mouse.position.inside_rect?(slider)~ -** Processing line: ~ s[:pitch] = ((args.inputs.mouse.x - slider[0]).to_f / (slider[2]-1.0)) * 2.0~ -** Processing line: ~ end~ -** Processing line: ~ slidercolor = (s[:pitch] / 2.0) * 255~ -** Processing line: ~ args.outputs.primitives << [*slider, slidercolor, slidercolor, slidercolor, 255].solid~ -** Processing line: ~ args.outputs.primitives << [910, 600, "pitch: #{s[:pitch].round(3).to_s[0..2]}", 0, 0, 255, 255, 255].label~ -** Processing line: ~~ -** Processing line: ~ slider = [1022, 561, 200, 7]~ -** Processing line: ~ if mouse_down && args.inputs.mouse.position.inside_rect?(slider)~ -** Processing line: ~ s[:gain] = (args.inputs.mouse.x - slider[0]).to_f / (slider[2]-1.0)~ -** Processing line: ~ end~ -** Processing line: ~ slidercolor = s[:gain] * 255~ -** Processing line: ~ args.outputs.primitives << [*slider, slidercolor, slidercolor, slidercolor, 255].solid~ -** Processing line: ~ args.outputs.primitives << [910, 575, "gain: #{s[:gain].round(3).to_s[0..2]}", 0, 0, 255, 255, 255].label~ -** Processing line: ~~ -** Processing line: ~ checkbox = [1022, 533, 10, 12]~ -** Processing line: ~ if (args.state.mouse_held == 1) && args.inputs.mouse.position.inside_rect?(checkbox)~ -** Processing line: ~ s[:looping] = !s[:looping]~ -** Processing line: ~ end~ -** Processing line: ~ checkboxcolor = s[:looping] ? 255 : 0~ -** Processing line: ~ args.outputs.primitives << [*checkbox, checkboxcolor, checkboxcolor, checkboxcolor, 255].solid~ -** Processing line: ~ args.outputs.primitives << [910, 550, "looping:", 0, 0, 255, 255, 255].label~ -** Processing line: ~~ -** Processing line: ~ checkbox = [1022, 508, 10, 12]~ -** Processing line: ~ if (args.state.mouse_held == 1) && args.inputs.mouse.position.inside_rect?(checkbox)~ -** Processing line: ~ s[:paused] = !s[:paused]~ -** Processing line: ~ end~ -** Processing line: ~ checkboxcolor = s[:paused] ? 255 : 0~ -** Processing line: ~ args.outputs.primitives << [*checkbox, checkboxcolor, checkboxcolor, checkboxcolor, 255].solid~ -** Processing line: ~ args.outputs.primitives << [910, 525, "paused:", 0, 0, 255, 255, 255].label~ -** Processing line: ~~ -** Processing line: ~ button = [910, 460, 320, 20]~ -** Processing line: ~ if (args.state.mouse_held == 1) && args.inputs.mouse.position.inside_rect?(button)~ -** Processing line: ~ args.audio.delete(args.state.selected)~ -** Processing line: ~ args.state.selected = 0~ -** Processing line: ~ end~ -** Processing line: ~ args.outputs.primitives << [*button, 255, 0, 0, 255].solid~ -** Processing line: ~ args.outputs.primitives << [button[0] + (button[2] / 2), button[1]+20, "DELETE SOURCE", 0, 1, 255, 255, 0].label~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ def spawn_new_sound args, num~ -** Processing line: ~ input = nil~ -** Processing line: ~ input = "sounds/#{num}.#{(num == 6) ? 'ogg' : 'wav'}"~ -** Processing line: ~~ -** Processing line: ~ # Spawn randomly in an area that won't be covered by UI.~ -** Processing line: ~ screenx = (rand * 600.0) + 200.0~ -** Processing line: ~ screeny = (rand * 400.0) + 100.0~ -** Processing line: ~~ -** Processing line: ~ args.state.next_sound_index += 1~ -** Processing line: ~~ -** Processing line: ~ # you can hang anything on the audio hashes you want, so we store the~ -** Processing line: ~ # actual screen position in here for convenience.~ -** Processing line: ~ args.audio[args.state.next_sound_index] = {~ -** Processing line: ~ input: input,~ -** Processing line: ~ screenx: screenx,~ -** Processing line: ~ screeny: screeny,~ -** Processing line: ~ x: ((screenx / 1279.0) * 2.0) - 1.0, # scale to -1.0 - 1.0 range~ -** Processing line: ~ y: ((screeny / 719.0) * 2.0) - 1.0, # scale to -1.0 - 1.0 range~ -** Processing line: ~ z: 0.0,~ -** Processing line: ~ gain: 1.0,~ -** Processing line: ~ pitch: 1.0,~ -** Processing line: ~ looping: true,~ -** Processing line: ~ paused: false~ -** Processing line: ~ }~ -** Processing line: ~~ -** Processing line: ~ args.state.selected = args.state.next_sound_index~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ def render_launcher args~ -** Processing line: ~ total = 6~ -** Processing line: ~ x = (1280 - (total * $boxsize * 3)) / 2~ -** Processing line: ~ y = 10~ -** Processing line: ~ args.outputs.primitives << [0, 0, 1280, ((y*2) + $boxsize), 127, 127, 127, 255].solid~ -** Processing line: ~ for i in 1..total~ -** Processing line: ~ args.outputs.primitives << [x, y, $boxsize, $boxsize, 255, 255, 255, 255].solid~ -** Processing line: ~ args.outputs.primitives << [x+8, y+28, i.to_s, 3, 0, 0, 0, 255, 255].label~ -** Processing line: ~ if args.inputs.mouse.click && args.inputs.mouse.click.point.inside_rect?([x, y, $boxsize, $boxsize])~ -** Processing line: ~ spawn_new_sound args, i~ -** Processing line: ~ end~ -** Processing line: ~ x = x + ($boxsize * 3)~ -** Processing line: ~ end~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ def render_ui args~ -** Processing line: ~ render_launcher args~ -** Processing line: ~ render_panel args~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ def tick args~ -** Processing line: ~ args.state.mouse_held ||= 0~ -** Processing line: ~ args.state.dragging_source ||= false~ -** Processing line: ~ args.state.selected ||= 0~ -** Processing line: ~ args.state.next_sound_index ||= 0~ -** Processing line: ~~ -** Processing line: ~ if args.inputs.mouse.up~ -** Processing line: ~ args.state.mouse_held = 0~ -** Processing line: ~ args.state.dragging_source = false~ -** Processing line: ~ elsif args.inputs.mouse.down || (args.state.mouse_held > 0)~ -** Processing line: ~ args.state.mouse_held += 1~ -** Processing line: ~ else~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ args.outputs.background_color = [ 0, 0, 0, 255 ]~ -** Processing line: ~ render_sources args~ -** Processing line: ~ render_ui args~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~#+end_src~ -- PRE end detected. -** Processing line: ~~ -** Processing line: ~~ -** Processing line: ~*** Rendering Basics - Sound Synthesis - main.rb~ -- H3 detected. -- Determining if line is a header. -- Line contains ~*** ~... gsub-ing empty string -- Formatting line: ~Rendering Basics - Sound Synthesis - main.rb~ -- Line's tilde count is: 0 -- Line contains link marker: false -- Determining if line is a header. -- Line contains ~*** ~... gsub-ing empty string -- Formatting line: ~Rendering Basics - Sound Synthesis - main.rb~ -- Line's tilde count is: 0 -- Line contains link marker: false -** Processing line: ~~ -** Processing line: ~#+begin_src ruby~ -- PRE start detected. -** Processing line: ~ # ./samples/01_rendering_basics/07_sound_synthesis/app/main.rb~ -** Processing line: ~ begin # region: top level tick methods~ -** Processing line: ~ def tick args~ -** Processing line: ~ defaults args~ -** Processing line: ~ render args~ -** Processing line: ~ input args~ -** Processing line: ~ process_audio_queue args~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ def defaults args~ -** Processing line: ~ args.state.sine_waves ||= {}~ -** Processing line: ~ args.state.square_waves ||= {}~ -** Processing line: ~ args.state.saw_tooth_waves ||= {}~ -** Processing line: ~ args.state.triangle_waves ||= {}~ -** Processing line: ~ args.state.audio_queue ||= []~ -** Processing line: ~ args.state.buttons ||= [~ -** Processing line: ~ (frequency_buttons args),~ -** Processing line: ~ (sine_wave_note_buttons args),~ -** Processing line: ~ (bell_buttons args),~ -** Processing line: ~ (square_wave_note_buttons args),~ -** Processing line: ~ (saw_tooth_wave_note_buttons args),~ -** Processing line: ~ (triangle_wave_note_buttons args),~ -** Processing line: ~ ].flatten~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ def render args~ -** Processing line: ~ args.outputs.borders << args.state.buttons.map { |b| b[:border] }~ -** Processing line: ~ args.outputs.labels << args.state.buttons.map { |b| b[:label] }~ -** Processing line: ~ args.outputs.labels << args.layout~ -** Processing line: ~ .rect(row: 0, col: 11.5)~ -** Processing line: ~ .yield_self { |r| r.merge y: r.y + r.h }~ -** Processing line: ~ .merge(text: "This is a Pro only feature. Click here to watch the YouTube video if you are on the Standard License.",~ -** Processing line: ~ alignment_enum: 1)~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~~ -** Processing line: ~ def input args~ -** Processing line: ~ args.state.buttons.each do |b|~ -** Processing line: ~ if args.inputs.mouse.click && (args.inputs.mouse.click.inside_rect? b[:rect])~ -** Processing line: ~ parameter_string = (b.slice :frequency, :note, :octave).map { |k, v| "#{k}: #{v}" }.join ", "~ -** Processing line: ~ args.gtk.notify! "#{b[:method_to_call]} #{parameter_string}"~ -** Processing line: ~ send b[:method_to_call], args, b~ -** Processing line: ~ end~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ if args.inputs.mouse.click && (args.inputs.mouse.click.inside_rect? (args.layout.rect(row: 0).yield_self { |r| r.merge y: r.y + r.h.half, h: r.h.half }))~ -** Processing line: ~ args.gtk.openurl 'https://www.youtube.com/watch?v=zEzovM5jT-k&ab_channel=AmirRajan'~ -** Processing line: ~ end~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ def process_audio_queue args~ -** Processing line: ~ to_queue = args.state.audio_queue.find_all { |v| v[:queue_at] <= args.tick_count }~ -** Processing line: ~ args.state.audio_queue -= to_queue~ -** Processing line: ~ to_queue.each { |a| args.audio[a[:id]] = a }~ -** Processing line: ~~ -** Processing line: ~ args.audio.find_all { |k, v| v[:decay_rate] }~ -** Processing line: ~ .each { |k, v| v[:gain] -= v[:decay_rate] }~ -** Processing line: ~~ -** Processing line: ~ sounds_to_stop = args.audio~ -** Processing line: ~ .find_all { |k, v| v[:stop_at] && args.state.tick_count >= v[:stop_at] }~ -** Processing line: ~ .map { |k, v| k }~ -** Processing line: ~~ -** Processing line: ~ sounds_to_stop.each { |k| args.audio.delete k }~ -** Processing line: ~ end~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ begin # region: button definitions, ui layout, callback functions~ -** Processing line: ~ def button args, opts~ -** Processing line: ~ button_def = opts.merge rect: (args.layout.rect (opts.merge w: 2, h: 1))~ -** Processing line: ~~ -** Processing line: ~ button_def[:border] = button_def[:rect].merge r: 0, g: 0, b: 0~ -** Processing line: ~~ -** Processing line: ~ label_offset_x = 5~ -** Processing line: ~ label_offset_y = 30~ -** Processing line: ~~ -** Processing line: ~ button_def[:label] = button_def[:rect].merge text: opts[:text],~ -** Processing line: ~ size_enum: -2.5,~ -** Processing line: ~ x: button_def[:rect].x + label_offset_x,~ -** Processing line: ~ y: button_def[:rect].y + label_offset_y~ -** Processing line: ~~ -** Processing line: ~ button_def~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ def play_sine_wave args, sender~ -** Processing line: ~ queue_sine_wave args,~ -** Processing line: ~ frequency: sender[:frequency],~ -** Processing line: ~ duration: 1.seconds,~ -** Processing line: ~ fade_out: true~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ def play_note args, sender~ -** Processing line: ~ method_to_call = :queue_sine_wave~ -** Processing line: ~ method_to_call = :queue_square_wave if sender[:type] == :square~ -** Processing line: ~ method_to_call = :queue_saw_tooth_wave if sender[:type] == :saw_tooth~ -** Processing line: ~ method_to_call = :queue_triangle_wave if sender[:type] == :triangle~ -** Processing line: ~ method_to_call = :queue_bell if sender[:type] == :bell~ -** Processing line: ~~ -** Processing line: ~ send method_to_call, args,~ -** Processing line: ~ frequency: (frequency_for note: sender[:note], octave: sender[:octave]),~ -** Processing line: ~ duration: 1.seconds,~ -** Processing line: ~ fade_out: true~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ def frequency_buttons args~ -** Processing line: ~ [~ -** Processing line: ~ (button args,~ -** Processing line: ~ row: 4.0, col: 0, text: "300hz",~ -** Processing line: ~ frequency: 300,~ -** Processing line: ~ method_to_call: :play_sine_wave),~ -** Processing line: ~ (button args,~ -** Processing line: ~ row: 5.0, col: 0, text: "400hz",~ -** Processing line: ~ frequency: 400,~ -** Processing line: ~ method_to_call: :play_sine_wave),~ -** Processing line: ~ (button args,~ -** Processing line: ~ row: 6.0, col: 0, text: "500hz",~ -** Processing line: ~ frequency: 500,~ -** Processing line: ~ method_to_call: :play_sine_wave),~ -** Processing line: ~ ]~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ def sine_wave_note_buttons args~ -** Processing line: ~ [~ -** Processing line: ~ (button args,~ -** Processing line: ~ row: 1.5, col: 2, text: "Sine C4",~ -** Processing line: ~ note: :c, octave: 4, type: :sine, method_to_call: :play_note),~ -** Processing line: ~ (button args,~ -** Processing line: ~ row: 2.5, col: 2, text: "Sine D4",~ -** Processing line: ~ note: :d, octave: 4, type: :sine, method_to_call: :play_note),~ -** Processing line: ~ (button args,~ -** Processing line: ~ row: 3.5, col: 2, text: "Sine E4",~ -** Processing line: ~ note: :e, octave: 4, type: :sine, method_to_call: :play_note),~ -** Processing line: ~ (button args,~ -** Processing line: ~ row: 4.5, col: 2, text: "Sine F4",~ -** Processing line: ~ note: :f, octave: 4, type: :sine, method_to_call: :play_note),~ -** Processing line: ~ (button args,~ -** Processing line: ~ row: 5.5, col: 2, text: "Sine G4",~ -** Processing line: ~ note: :g, octave: 4, type: :sine, method_to_call: :play_note),~ -** Processing line: ~ (button args,~ -** Processing line: ~ row: 6.5, col: 2, text: "Sine A5",~ -** Processing line: ~ note: :a, octave: 5, type: :sine, method_to_call: :play_note),~ -** Processing line: ~ (button args,~ -** Processing line: ~ row: 7.5, col: 2, text: "Sine B5",~ -** Processing line: ~ note: :b, octave: 5, type: :sine, method_to_call: :play_note),~ -** Processing line: ~ (button args,~ -** Processing line: ~ row: 8.5, col: 2, text: "Sine C5",~ -** Processing line: ~ note: :c, octave: 5, type: :sine, method_to_call: :play_note),~ -** Processing line: ~ ]~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ def square_wave_note_buttons args~ -** Processing line: ~ [~ -** Processing line: ~ (button args,~ -** Processing line: ~ row: 1.5, col: 6, text: "Square C4",~ -** Processing line: ~ note: :c, octave: 4, type: :square, method_to_call: :play_note),~ -** Processing line: ~ (button args,~ -** Processing line: ~ row: 2.5, col: 6, text: "Square D4",~ -** Processing line: ~ note: :d, octave: 4, type: :square, method_to_call: :play_note),~ -** Processing line: ~ (button args,~ -** Processing line: ~ row: 3.5, col: 6, text: "Square E4",~ -** Processing line: ~ note: :e, octave: 4, type: :square, method_to_call: :play_note),~ -** Processing line: ~ (button args,~ -** Processing line: ~ row: 4.5, col: 6, text: "Square F4",~ -** Processing line: ~ note: :f, octave: 4, type: :square, method_to_call: :play_note),~ -** Processing line: ~ (button args,~ -** Processing line: ~ row: 5.5, col: 6, text: "Square G4",~ -** Processing line: ~ note: :g, octave: 4, type: :square, method_to_call: :play_note),~ -** Processing line: ~ (button args,~ -** Processing line: ~ row: 6.5, col: 6, text: "Square A5",~ -** Processing line: ~ note: :a, octave: 5, type: :square, method_to_call: :play_note),~ -** Processing line: ~ (button args,~ -** Processing line: ~ row: 7.5, col: 6, text: "Square B5",~ -** Processing line: ~ note: :b, octave: 5, type: :square, method_to_call: :play_note),~ -** Processing line: ~ (button args,~ -** Processing line: ~ row: 8.5, col: 6, text: "Square C5",~ -** Processing line: ~ note: :c, octave: 5, type: :square, method_to_call: :play_note),~ -** Processing line: ~ ]~ -** Processing line: ~ end~ -** Processing line: ~ def saw_tooth_wave_note_buttons args~ -** Processing line: ~ [~ -** Processing line: ~ (button args,~ -** Processing line: ~ row: 1.5, col: 8, text: "Saw C4",~ -** Processing line: ~ note: :c, octave: 4, type: :saw_tooth, method_to_call: :play_note),~ -** Processing line: ~ (button args,~ -** Processing line: ~ row: 2.5, col: 8, text: "Saw D4",~ -** Processing line: ~ note: :d, octave: 4, type: :saw_tooth, method_to_call: :play_note),~ -** Processing line: ~ (button args,~ -** Processing line: ~ row: 3.5, col: 8, text: "Saw E4",~ -** Processing line: ~ note: :e, octave: 4, type: :saw_tooth, method_to_call: :play_note),~ -** Processing line: ~ (button args,~ -** Processing line: ~ row: 4.5, col: 8, text: "Saw F4",~ -** Processing line: ~ note: :f, octave: 4, type: :saw_tooth, method_to_call: :play_note),~ -** Processing line: ~ (button args,~ -** Processing line: ~ row: 5.5, col: 8, text: "Saw G4",~ -** Processing line: ~ note: :g, octave: 4, type: :saw_tooth, method_to_call: :play_note),~ -** Processing line: ~ (button args,~ -** Processing line: ~ row: 6.5, col: 8, text: "Saw A5",~ -** Processing line: ~ note: :a, octave: 5, type: :saw_tooth, method_to_call: :play_note),~ -** Processing line: ~ (button args,~ -** Processing line: ~ row: 7.5, col: 8, text: "Saw B5",~ -** Processing line: ~ note: :b, octave: 5, type: :saw_tooth, method_to_call: :play_note),~ -** Processing line: ~ (button args,~ -** Processing line: ~ row: 8.5, col: 8, text: "Saw C5",~ -** Processing line: ~ note: :c, octave: 5, type: :saw_tooth, method_to_call: :play_note),~ -** Processing line: ~ ]~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ def triangle_wave_note_buttons args~ -** Processing line: ~ [~ -** Processing line: ~ (button args,~ -** Processing line: ~ row: 1.5, col: 10, text: "Triangle C4",~ -** Processing line: ~ note: :c, octave: 4, type: :triangle, method_to_call: :play_note),~ -** Processing line: ~ (button args,~ -** Processing line: ~ row: 2.5, col: 10, text: "Triangle D4",~ -** Processing line: ~ note: :d, octave: 4, type: :triangle, method_to_call: :play_note),~ -** Processing line: ~ (button args,~ -** Processing line: ~ row: 3.5, col: 10, text: "Triangle E4",~ -** Processing line: ~ note: :e, octave: 4, type: :triangle, method_to_call: :play_note),~ -** Processing line: ~ (button args,~ -** Processing line: ~ row: 4.5, col: 10, text: "Triangle F4",~ -** Processing line: ~ note: :f, octave: 4, type: :triangle, method_to_call: :play_note),~ -** Processing line: ~ (button args,~ -** Processing line: ~ row: 5.5, col: 10, text: "Triangle G4",~ -** Processing line: ~ note: :g, octave: 4, type: :triangle, method_to_call: :play_note),~ -** Processing line: ~ (button args,~ -** Processing line: ~ row: 6.5, col: 10, text: "Triangle A5",~ -** Processing line: ~ note: :a, octave: 5, type: :triangle, method_to_call: :play_note),~ -** Processing line: ~ (button args,~ -** Processing line: ~ row: 7.5, col: 10, text: "Triangle B5",~ -** Processing line: ~ note: :b, octave: 5, type: :triangle, method_to_call: :play_note),~ -** Processing line: ~ (button args,~ -** Processing line: ~ row: 8.5, col: 10, text: "Triangle C5",~ -** Processing line: ~ note: :c, octave: 5, type: :triangle, method_to_call: :play_note),~ -** Processing line: ~ ]~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ def bell_buttons args~ -** Processing line: ~ [~ -** Processing line: ~ (button args,~ -** Processing line: ~ row: 1.5, col: 4, text: "Bell C4",~ -** Processing line: ~ note: :c, octave: 4, type: :bell, method_to_call: :play_note),~ -** Processing line: ~ (button args,~ -** Processing line: ~ row: 2.5, col: 4, text: "Bell D4",~ -** Processing line: ~ note: :d, octave: 4, type: :bell, method_to_call: :play_note),~ -** Processing line: ~ (button args,~ -** Processing line: ~ row: 3.5, col: 4, text: "Bell E4",~ -** Processing line: ~ note: :e, octave: 4, type: :bell, method_to_call: :play_note),~ -** Processing line: ~ (button args,~ -** Processing line: ~ row: 4.5, col: 4, text: "Bell F4",~ -** Processing line: ~ note: :f, octave: 4, type: :bell, method_to_call: :play_note),~ -** Processing line: ~ (button args,~ -** Processing line: ~ row: 5.5, col: 4, text: "Bell G4",~ -** Processing line: ~ note: :g, octave: 4, type: :bell, method_to_call: :play_note),~ -** Processing line: ~ (button args,~ -** Processing line: ~ row: 6.5, col: 4, text: "Bell A5",~ -** Processing line: ~ note: :a, octave: 5, type: :bell, method_to_call: :play_note),~ -** Processing line: ~ (button args,~ -** Processing line: ~ row: 7.5, col: 4, text: "Bell B5",~ -** Processing line: ~ note: :b, octave: 5, type: :bell, method_to_call: :play_note),~ -** Processing line: ~ (button args,~ -** Processing line: ~ row: 8.5, col: 4, text: "Bell C5",~ -** Processing line: ~ note: :c, octave: 5, type: :bell, method_to_call: :play_note),~ -** Processing line: ~ ]~ -** Processing line: ~ end~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ begin # region: wave generation~ -** Processing line: ~ begin # sine wave~ -** Processing line: ~ def defaults_sine_wave_for~ -** Processing line: ~ { frequency: 440, sample_rate: 48000 }~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ def sine_wave_for opts = {}~ -** Processing line: ~ opts = defaults_sine_wave_for.merge opts~ -** Processing line: ~ frequency = opts[:frequency]~ -** Processing line: ~ sample_rate = opts[:sample_rate]~ -** Processing line: ~ period_size = (sample_rate.fdiv frequency).ceil~ -** Processing line: ~ period_size.map_with_index do |i|~ -** Processing line: ~ Math::sin((2.0 * Math::PI) / (sample_rate.to_f / frequency.to_f) * i)~ -** Processing line: ~ end.to_a~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ def defaults_queue_sine_wave~ -** Processing line: ~ { frequency: 440, duration: 60, gain: 1.0, fade_out: false, queue_in: 0 }~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ def queue_sine_wave args, opts = {}~ -** Processing line: ~ opts = defaults_queue_sine_wave.merge opts~ -** Processing line: ~ frequency = opts[:frequency]~ -** Processing line: ~ sample_rate = 48000~ -** Processing line: ~~ -** Processing line: ~ sine_wave = sine_wave_for frequency: frequency, sample_rate: sample_rate~ -** Processing line: ~ args.state.sine_waves[frequency] ||= sine_wave_for frequency: frequency, sample_rate: sample_rate~ -** Processing line: ~~ -** Processing line: ~ proc = lambda do~ -** Processing line: ~ generate_audio_data args.state.sine_waves[frequency], sample_rate~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ audio_state = new_audio_state args, opts~ -** Processing line: ~ audio_state[:input] = [1, sample_rate, proc]~ -** Processing line: ~ queue_audio args, audio_state: audio_state, wave: sine_wave~ -** Processing line: ~ end~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ begin # region: square wave~ -** Processing line: ~ def defaults_square_wave_for~ -** Processing line: ~ { frequency: 440, sample_rate: 48000 }~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ def square_wave_for opts = {}~ -** Processing line: ~ opts = defaults_square_wave_for.merge opts~ -** Processing line: ~ sine_wave = sine_wave_for opts~ -** Processing line: ~ sine_wave.map do |v|~ -** Processing line: ~ if v >= 0~ -** Processing line: ~ 1.0~ -** Processing line: ~ else~ -** Processing line: ~ -1.0~ -** Processing line: ~ end~ -** Processing line: ~ end.to_a~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ def defaults_queue_square_wave~ -** Processing line: ~ { frequency: 440, duration: 60, gain: 0.3, fade_out: false, queue_in: 0 }~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ def queue_square_wave args, opts = {}~ -** Processing line: ~ opts = defaults_queue_square_wave.merge opts~ -** Processing line: ~ frequency = opts[:frequency]~ -** Processing line: ~ sample_rate = 48000~ -** Processing line: ~~ -** Processing line: ~ square_wave = square_wave_for frequency: frequency, sample_rate: sample_rate~ -** Processing line: ~ args.state.square_waves[frequency] ||= square_wave_for frequency: frequency, sample_rate: sample_rate~ -** Processing line: ~~ -** Processing line: ~ proc = lambda do~ -** Processing line: ~ generate_audio_data args.state.square_waves[frequency], sample_rate~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ audio_state = new_audio_state args, opts~ -** Processing line: ~ audio_state[:input] = [1, sample_rate, proc]~ -** Processing line: ~ queue_audio args, audio_state: audio_state, wave: square_wave~ -** Processing line: ~ end~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ begin # region: saw tooth wave~ -** Processing line: ~ def defaults_saw_tooth_wave_for~ -** Processing line: ~ { frequency: 440, sample_rate: 48000 }~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ def saw_tooth_wave_for opts = {}~ -** Processing line: ~ opts = defaults_saw_tooth_wave_for.merge opts~ -** Processing line: ~ sine_wave = sine_wave_for opts~ -** Processing line: ~ period_size = sine_wave.length~ -** Processing line: ~ sine_wave.map_with_index do |v, i|~ -** Processing line: ~ (((i % period_size).fdiv period_size) * 2) - 1~ -** Processing line: ~ end~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ def defaults_queue_saw_tooth_wave~ -** Processing line: ~ { frequency: 440, duration: 60, gain: 0.3, fade_out: false, queue_in: 0 }~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ def queue_saw_tooth_wave args, opts = {}~ -** Processing line: ~ opts = defaults_queue_saw_tooth_wave.merge opts~ -** Processing line: ~ frequency = opts[:frequency]~ -** Processing line: ~ sample_rate = 48000~ -** Processing line: ~~ -** Processing line: ~ saw_tooth_wave = saw_tooth_wave_for frequency: frequency, sample_rate: sample_rate~ -** Processing line: ~ args.state.saw_tooth_waves[frequency] ||= saw_tooth_wave_for frequency: frequency, sample_rate: sample_rate~ -** Processing line: ~~ -** Processing line: ~ proc = lambda do~ -** Processing line: ~ generate_audio_data args.state.saw_tooth_waves[frequency], sample_rate~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ audio_state = new_audio_state args, opts~ -** Processing line: ~ audio_state[:input] = [1, sample_rate, proc]~ -** Processing line: ~ queue_audio args, audio_state: audio_state, wave: saw_tooth_wave~ -** Processing line: ~ end~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ begin # region: triangle wave~ -** Processing line: ~ def defaults_triangle_wave_for~ -** Processing line: ~ { frequency: 440, sample_rate: 48000 }~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ def triangle_wave_for opts = {}~ -** Processing line: ~ opts = defaults_saw_tooth_wave_for.merge opts~ -** Processing line: ~ sine_wave = sine_wave_for opts~ -** Processing line: ~ period_size = sine_wave.length~ -** Processing line: ~ sine_wave.map_with_index do |v, i|~ -** Processing line: ~ ratio = (i.fdiv period_size)~ -** Processing line: ~ if ratio <= 0.5~ -** Processing line: ~ (ratio * 4) - 1~ -** Processing line: ~ else~ -** Processing line: ~ ratio -= 0.5~ -** Processing line: ~ 1 - (ratio * 4)~ -** Processing line: ~ end~ -** Processing line: ~ end~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ def defaults_queue_triangle_wave~ -** Processing line: ~ { frequency: 440, duration: 60, gain: 1.0, fade_out: false, queue_in: 0 }~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ def queue_triangle_wave args, opts = {}~ -** Processing line: ~ opts = defaults_queue_triangle_wave.merge opts~ -** Processing line: ~ frequency = opts[:frequency]~ -** Processing line: ~ sample_rate = 48000~ -** Processing line: ~~ -** Processing line: ~ triangle_wave = triangle_wave_for frequency: frequency, sample_rate: sample_rate~ -** Processing line: ~ args.state.triangle_waves[frequency] ||= triangle_wave_for frequency: frequency, sample_rate: sample_rate~ -** Processing line: ~~ -** Processing line: ~ proc = lambda do~ -** Processing line: ~ generate_audio_data args.state.triangle_waves[frequency], sample_rate~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ audio_state = new_audio_state args, opts~ -** Processing line: ~ audio_state[:input] = [1, sample_rate, proc]~ -** Processing line: ~ queue_audio args, audio_state: audio_state, wave: triangle_wave~ -** Processing line: ~ end~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ begin # region: bell~ -** Processing line: ~ def defaults_queue_bell~ -** Processing line: ~ { frequency: 440, duration: 1.seconds, queue_in: 0 }~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ def queue_bell args, opts = {}~ -** Processing line: ~ (bell_to_sine_waves (defaults_queue_bell.merge opts)).each { |b| queue_sine_wave args, b }~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ def bell_harmonics~ -** Processing line: ~ [~ -** Processing line: ~ { frequency_ratio: 0.5, duration_ratio: 1.00 },~ -** Processing line: ~ { frequency_ratio: 1.0, duration_ratio: 0.80 },~ -** Processing line: ~ { frequency_ratio: 2.0, duration_ratio: 0.60 },~ -** Processing line: ~ { frequency_ratio: 3.0, duration_ratio: 0.40 },~ -** Processing line: ~ { frequency_ratio: 4.2, duration_ratio: 0.25 },~ -** Processing line: ~ { frequency_ratio: 5.4, duration_ratio: 0.20 },~ -** Processing line: ~ { frequency_ratio: 6.8, duration_ratio: 0.15 }~ -** Processing line: ~ ]~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ def defaults_bell_to_sine_waves~ -** Processing line: ~ { frequency: 440, duration: 1.seconds, queue_in: 0 }~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ def bell_to_sine_waves opts = {}~ -** Processing line: ~ opts = defaults_bell_to_sine_waves.merge opts~ -** Processing line: ~ bell_harmonics.map do |b|~ -** Processing line: ~ {~ -** Processing line: ~ frequency: opts[:frequency] * b[:frequency_ratio],~ -** Processing line: ~ duration: opts[:duration] * b[:duration_ratio],~ -** Processing line: ~ queue_in: opts[:queue_in],~ -** Processing line: ~ gain: (1.fdiv bell_harmonics.length),~ -** Processing line: ~ fade_out: true~ -** Processing line: ~ }~ -** Processing line: ~ end~ -** Processing line: ~ end~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ begin # audio entity construction~ -** Processing line: ~ def generate_audio_data sine_wave, sample_rate~ -** Processing line: ~ sample_size = (sample_rate.fdiv (1000.fdiv 60)).ceil~ -** Processing line: ~ copy_count = (sample_size.fdiv sine_wave.length).ceil~ -** Processing line: ~ sine_wave * copy_count~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ def defaults_new_audio_state~ -** Processing line: ~ { frequency: 440, duration: 60, gain: 1.0, fade_out: false, queue_in: 0 }~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ def new_audio_state args, opts = {}~ -** Processing line: ~ opts = defaults_new_audio_state.merge opts~ -** Processing line: ~ decay_rate = 0~ -** Processing line: ~ decay_rate = 1.fdiv(opts[:duration]) * opts[:gain] if opts[:fade_out]~ -** Processing line: ~ frequency = opts[:frequency]~ -** Processing line: ~ sample_rate = 48000~ -** Processing line: ~~ -** Processing line: ~ {~ -** Processing line: ~ id: (new_id! args),~ -** Processing line: ~ frequency: frequency,~ -** Processing line: ~ sample_rate: 48000,~ -** Processing line: ~ stop_at: args.tick_count + opts[:queue_in] + opts[:duration],~ -** Processing line: ~ gain: opts[:gain].to_f,~ -** Processing line: ~ queue_at: args.state.tick_count + opts[:queue_in],~ -** Processing line: ~ decay_rate: decay_rate,~ -** Processing line: ~ pitch: 1.0,~ -** Processing line: ~ looping: true,~ -** Processing line: ~ paused: false~ -** Processing line: ~ }~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ def queue_audio args, opts = {}~ -** Processing line: ~ graph_wave args, opts[:wave], opts[:audio_state][:frequency]~ -** Processing line: ~ args.state.audio_queue << opts[:audio_state]~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ def new_id! args~ -** Processing line: ~ args.state.audio_id ||= 0~ -** Processing line: ~ args.state.audio_id += 1~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ def graph_wave args, wave, frequency~ -** Processing line: ~ if args.state.tick_count != args.state.graphed_at~ -** Processing line: ~ args.outputs.static_lines.clear~ -** Processing line: ~ args.outputs.static_sprites.clear~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ wave = wave~ -** Processing line: ~~ -** Processing line: ~ r, g, b = frequency.to_i % 85,~ -** Processing line: ~ frequency.to_i % 170,~ -** Processing line: ~ frequency.to_i % 255~ -** Processing line: ~~ -** Processing line: ~ starting_rect = args.layout.rect(row: 5, col: 13)~ -** Processing line: ~ x_scale = 10~ -** Processing line: ~ y_scale = 100~ -** Processing line: ~ max_points = 25~ -** Processing line: ~~ -** Processing line: ~ points = wave~ -** Processing line: ~ if wave.length > max_points~ -** Processing line: ~ resolution = wave.length.idiv max_points~ -** Processing line: ~ points = wave.find_all.with_index { |y, i| (i % resolution == 0) }~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ args.outputs.static_lines << points.map_with_index do |y, x|~ -** Processing line: ~ next_y = points[x + 1]~ -** Processing line: ~~ -** Processing line: ~ if next_y~ -** Processing line: ~ {~ -** Processing line: ~ x: starting_rect.x + (x * x_scale),~ -** Processing line: ~ y: starting_rect.y + starting_rect.h.half + y_scale * y,~ -** Processing line: ~ x2: starting_rect.x + ((x + 1) * x_scale),~ -** Processing line: ~ y2: starting_rect.y + starting_rect.h.half + y_scale * next_y,~ -** Processing line: ~ r: r,~ -** Processing line: ~ g: g,~ -** Processing line: ~ b: b~ -** Processing line: ~ }~ -** Processing line: ~ end~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ args.outputs.static_sprites << points.map_with_index do |y, x|~ -** Processing line: ~ {~ -** Processing line: ~ x: (starting_rect.x + (x * x_scale)) - 2,~ -** Processing line: ~ y: (starting_rect.y + starting_rect.h.half + y_scale * y) - 2,~ -** Processing line: ~ w: 4,~ -** Processing line: ~ h: 4,~ -** Processing line: ~ path: 'sprites/square-white.png',~ -** Processing line: ~ r: r,~ -** Processing line: ~ g: g,~ -** Processing line: ~ b: b~ -** Processing line: ~ }~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ args.state.graphed_at = args.state.tick_count~ -** Processing line: ~ end~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ begin # region: musical note mapping~ -** Processing line: ~ def defaults_frequency_for~ -** Processing line: ~ { note: :a, octave: 5, sharp: false, flat: false }~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ def frequency_for opts = {}~ -** Processing line: ~ opts = defaults_frequency_for.merge opts~ -** Processing line: ~ octave_offset_multiplier = opts[:octave] - 5~ -** Processing line: ~ note = note_frequencies_octave_5[opts[:note]]~ -** Processing line: ~ if octave_offset_multiplier < 0~ -** Processing line: ~ note = note * 1 / (octave_offset_multiplier.abs + 1)~ -** Processing line: ~ elsif octave_offset_multiplier > 0~ -** Processing line: ~ note = note * (octave_offset_multiplier.abs + 1) / 1~ -** Processing line: ~ end~ -** Processing line: ~ note~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ def note_frequencies_octave_5~ -** Processing line: ~ {~ -** Processing line: ~ a: 440.0,~ -** Processing line: ~ a_sharp: 466.16, b_flat: 466.16,~ -** Processing line: ~ b: 493.88,~ -** Processing line: ~ c: 523.25,~ -** Processing line: ~ c_sharp: 554.37, d_flat: 587.33,~ -** Processing line: ~ d: 587.33,~ -** Processing line: ~ d_sharp: 622.25, e_flat: 659.25,~ -** Processing line: ~ e: 659.25,~ -** Processing line: ~ f: 698.25,~ -** Processing line: ~ f_sharp: 739.99, g_flat: 739.99,~ -** Processing line: ~ g: 783.99,~ -** Processing line: ~ g_sharp: 830.61, a_flat: 830.61~ -** Processing line: ~ }~ -** Processing line: ~ end~ -** Processing line: ~ end~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ $gtk.reset~ -** Processing line: ~~ -** Processing line: ~#+end_src~ -- PRE end detected. -** Processing line: ~~ -** Processing line: ~~ ** Processing line: ~*** Input Basics - Keyboard - main.rb~ - H3 detected. - Determining if line is a header. @@ -185640,9 +194549,9 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ def tick args~ ** Processing line: ~ tick_instructions args, "Sample app shows how keyboard events are registered and accessed.", 360~ ** Processing line: ~ # Notice how small_font accounts for all the remaining parameters~ -** Processing line: ~ args.outputs.labels << [460, row_to_px(args, 0), "Current game time: #{args.state.tick_count}", small_font]~ -** Processing line: ~ args.outputs.labels << [460, row_to_px(args, 2), "Keyboard input: args.inputs.keyboard.key_up.h", small_font]~ -** Processing line: ~ args.outputs.labels << [460, row_to_px(args, 3), "Press \"h\" on the keyboard.", small_font]~ +** Processing line: ~ args.outputs.labels << { x: 460, y: row_to_px(args, 0), text: "Current game time: #{args.state.tick_count}", size_enum: -1 }~ +** Processing line: ~ args.outputs.labels << { x: 460, y: row_to_px(args, 2), text: "Keyboard input: args.inputs.keyboard.key_up.h", size_enum: -1 }~ +** Processing line: ~ args.outputs.labels << { x: 460, y: row_to_px(args, 3), text: "Press \"h\" on the keyboard.", size_enum: -1 }~ ** Processing line: ~~ ** Processing line: ~ # Input on a specifc key can be found through args.inputs.keyboard.key_up followed by the key~ ** Processing line: ~ if args.inputs.keyboard.key_up.h~ @@ -185653,27 +194562,19 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ args.state.h_pressed_at ||= false~ ** Processing line: ~~ ** Processing line: ~ if args.state.h_pressed_at~ -** Processing line: ~ args.outputs.labels << [460, row_to_px(args, 4), "\"h\" was pressed at time: #{args.state.h_pressed_at}", small_font]~ +** Processing line: ~ args.outputs.labels << { x: 460, y: row_to_px(args, 4), text: "\"h\" was pressed at time: #{args.state.h_pressed_at}", size_enum: -1 }~ ** Processing line: ~ else~ -** Processing line: ~ args.outputs.labels << [460, row_to_px(args, 4), "\"h\" has never been pressed.", small_font]~ +** Processing line: ~ args.outputs.labels << { x: 460, y: row_to_px(args, 4), text: "\"h\" has never been pressed.", size_enum: -1 }~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ tick_help_text args~ ** Processing line: ~ end~ ** Processing line: ~~ -** Processing line: ~ def small_font~ -** Processing line: ~ # This method provides some values for the construction of labels~ -** Processing line: ~ # Specifically, Size, Alignment, & RGBA~ -** Processing line: ~ # This makes it so that custom parameters don't have to be repeatedly typed.~ -** Processing line: ~ # Additionally "small_font" provides programmers with more information than some numbers~ -** Processing line: ~ [-2, 0, 0, 0, 0, 255]~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ def row_to_px args, row_number~ +** Processing line: ~ def row_to_px args, row_number, y_offset = 20~ ** Processing line: ~ # This takes a row_number and converts it to pixels DragonRuby understands.~ ** Processing line: ~ # Row 0 starts 5 units below the top of the grid~ ** Processing line: ~ # Each row afterward is 20 units lower~ -** Processing line: ~ args.grid.top.shift_down(5).shift_down(20 * row_number)~ +** Processing line: ~ args.grid.top - 5 - (y_offset * row_number)~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ # Don't worry about understanding the code within this method just yet.~ @@ -185703,17 +194604,17 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ end~ ** Processing line: ~ end~ ** Processing line: ~~ -** Processing line: ~ args.outputs.labels << [10, row_to_px(args, 6), "Advanced Help:", small_font]~ +** Processing line: ~ args.outputs.labels << { x: 10, y: row_to_px(args, 6), text: "This is the api for the keys you've pressed:", size_enum: -1, r: 180 }~ ** Processing line: ~~ ** Processing line: ~ if !args.state.help_available~ ** Processing line: ~ args.outputs.labels << [10, row_to_px(args, 7), "Press a key and I'll show code to access the key and what value will be returned if you used the code.", small_font]~ ** Processing line: ~ return~ ** Processing line: ~ end~ ** Processing line: ~~ -** Processing line: ~ args.outputs.labels << [10 , row_to_px(args, 7), "args.inputs.keyboard", small_font]~ -** Processing line: ~ args.outputs.labels << [330, row_to_px(args, 7), "args.inputs.keyboard.key_down", small_font]~ -** Processing line: ~ args.outputs.labels << [650, row_to_px(args, 7), "args.inputs.keyboard.key_held", small_font]~ -** Processing line: ~ args.outputs.labels << [990, row_to_px(args, 7), "args.inputs.keyboard.key_up", small_font]~ +** Processing line: ~ args.outputs.labels << { x: 10 , y: row_to_px(args, 7), text: "args.inputs.keyboard", size_enum: -2 }~ +** Processing line: ~ args.outputs.labels << { x: 330, y: row_to_px(args, 7), text: "args.inputs.keyboard.key_down", size_enum: -2 }~ +** Processing line: ~ args.outputs.labels << { x: 650, y: row_to_px(args, 7), text: "args.inputs.keyboard.key_held", size_enum: -2 }~ +** Processing line: ~ args.outputs.labels << { x: 990, y: row_to_px(args, 7), text: "args.inputs.keyboard.key_up", size_enum: -2 }~ ** Processing line: ~~ ** Processing line: ~ fill_history args, :key_value_history, :down_or_held, nil~ ** Processing line: ~ fill_history args, :key_down_value_history, :down, :key_down~ @@ -185759,12 +194660,8 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ end~ ** Processing line: ~ idx += 2~ ** Processing line: ~ [~ -** Processing line: ~ [x, row_to_px(args, idx - 2),~ -** Processing line: ~ " .#{k} is #{current_value || "nil"}",~ -** Processing line: ~ small_font],~ -** Processing line: ~ [x, row_to_px(args, idx - 1),~ -** Processing line: ~ " was #{v}",~ -** Processing line: ~ small_font]~ +** Processing line: ~ { x: x, y: row_to_px(args, idx + 0, 16), text: " .#{k} is #{current_value || "nil"}", size_enum: -2 },~ +** Processing line: ~ { x: x, y: row_to_px(args, idx + 1, 16), text: " was #{v}", size_enum: -2 }~ ** Processing line: ~ ]~ ** Processing line: ~ end~ ** Processing line: ~ end~ @@ -185779,15 +194676,68 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ args.state.key_event_occurred = true~ ** Processing line: ~ end~ ** Processing line: ~~ -** Processing line: ~ args.outputs.debug << [0, y - 50, 1280, 60].solid~ -** Processing line: ~ args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label~ -** Processing line: ~ args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label~ +** Processing line: ~ args.outputs.debug << { x: 0, y: y - 50, w: 1280, h: 60 }.solid!~ +** Processing line: ~ args.outputs.debug << { x: 640, y: y, text: text,~ +** Processing line: ~ size_enum: 1, alignment_enum: 1, r: 255, g: 255, b: 255 }.label!~ +** Processing line: ~ args.outputs.debug << { x: 640, y: y - 25, text: "(click to dismiss instructions)",~ +** Processing line: ~ size_enum: -2, alignment_enum: 1, r: 255, g: 255, b: 255 }.label!~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~#+end_src~ - PRE end detected. ** Processing line: ~~ ** Processing line: ~~ +** Processing line: ~*** Input Basics - Moving A Sprite - main.rb~ +- H3 detected. +- Determining if line is a header. +- Line contains ~*** ~... gsub-ing empty string +- Formatting line: ~Input Basics - Moving A Sprite - main.rb~ +- Line's tilde count is: 0 +- Line contains link marker: false +- Determining if line is a header. +- Line contains ~*** ~... gsub-ing empty string +- Formatting line: ~Input Basics - Moving A Sprite - main.rb~ +- Line's tilde count is: 0 +- Line contains link marker: false +** Processing line: ~~ +** Processing line: ~#+begin_src ruby~ +- PRE start detected. +** Processing line: ~ # ./samples/02_input_basics/01_moving_a_sprite/app/main.rb~ +** Processing line: ~ def tick args~ +** Processing line: ~ # create a player and set default values~ +** Processing line: ~ # for the player's x, y, w (width), and h (height)~ +** Processing line: ~ args.state.player.x ||= 100~ +** Processing line: ~ args.state.player.y ||= 100~ +** Processing line: ~ args.state.player.w ||= 50~ +** Processing line: ~ args.state.player.h ||= 50~ +** Processing line: ~~ +** Processing line: ~ # render the player to the screen~ +** Processing line: ~ args.outputs.sprites << { x: args.state.player.x,~ +** Processing line: ~ y: args.state.player.y,~ +** Processing line: ~ w: args.state.player.w,~ +** Processing line: ~ h: args.state.player.h,~ +** Processing line: ~ path: 'sprites/square/green.png' }~ +** Processing line: ~~ +** Processing line: ~ # move the player around using the keyboard~ +** Processing line: ~ if args.inputs.up~ +** Processing line: ~ args.state.player.y += 10~ +** Processing line: ~ elsif args.inputs.down~ +** Processing line: ~ args.state.player.y -= 10~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ if args.inputs.left~ +** Processing line: ~ args.state.player.x -= 10~ +** Processing line: ~ elsif args.inputs.right~ +** Processing line: ~ args.state.player.x += 10~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ $gtk.reset~ +** Processing line: ~~ +** Processing line: ~#+end_src~ +- PRE end detected. +** Processing line: ~~ +** Processing line: ~~ ** Processing line: ~*** Input Basics - Mouse - main.rb~ - H3 detected. - Determining if line is a header. @@ -185867,11 +194817,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ # This method effectively combines the row_to_px and small_font methods~ ** Processing line: ~ # It changes the given row value to a DragonRuby pixel value~ ** Processing line: ~ # and adds the customization parameters~ -** Processing line: ~ [x, row_to_px(args, row), message, small_font]~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ def small_font~ -** Processing line: ~ [-2, 0, 0, 0, 0, 255]~ +** Processing line: ~ { x: x, y: row_to_px(args, row), text: message, alignment_enum: -2 }~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ def row_to_px args, row_number~ @@ -185887,9 +194833,9 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ args.state.key_event_occurred = true~ ** Processing line: ~ end~ ** Processing line: ~~ -** Processing line: ~ args.outputs.debug << [0, y - 50, 1280, 60].solid~ -** Processing line: ~ args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label~ -** Processing line: ~ args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label~ +** Processing line: ~ args.outputs.debug << { x: 0, y: y - 50, w: 1280, h: 60 }.solid!~ +** Processing line: ~ args.outputs.debug << { x: 640, y: y, text: text, size_enum: 1, alignment_enum: 1, r: 255, g: 255, b: 255 }.label!~ +** Processing line: ~ args.outputs.debug << { x: 640, y: y - 25, text: "(click to dismiss instructions)", size_enum: -2, alignment_enum: 1, r: 255, g: 255, b: 255 }.label!~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~#+end_src~ @@ -185956,7 +194902,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~~ ** Processing line: ~ args.outputs.labels << small_label(args, x, 15, "Click inside the blue box maybe ---->")~ ** Processing line: ~~ -** Processing line: ~ box = [785, 370, 50, 50, 0, 0, 170]~ +** Processing line: ~ box = { x: 785, y: 370, w: 50, h: 50, r: 0, g: 0, b: 170 }~ ** Processing line: ~ args.outputs.borders << box~ ** Processing line: ~~ ** Processing line: ~ # Saves the most recent click into args.state~ @@ -185978,11 +194924,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ def small_label args, x, row, message~ -** Processing line: ~ [x, row_to_px(args, row), message, small_font]~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ def small_font~ -** Processing line: ~ [-2, 0, 0, 0, 0, 255]~ +** Processing line: ~ { x: x, y: row_to_px(args, row), text: message, size_enum: -2 }~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ def row_to_px args, row_number~ @@ -185998,9 +194940,9 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ args.state.key_event_occurred = true~ ** Processing line: ~ end~ ** Processing line: ~~ -** Processing line: ~ args.outputs.debug << [0, y - 50, 1280, 60].solid~ -** Processing line: ~ args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label~ -** Processing line: ~ args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label~ +** Processing line: ~ args.outputs.debug << { x: 0, y: y - 50, w: 1280, h: 60 }.solid!~ +** Processing line: ~ args.outputs.debug << { x: 640, y: y, text: text, size_enum: 1, alignment_enum: 1, r: 255, g: 255, b: 255 }.label!~ +** Processing line: ~ args.outputs.debug << { x: 640, y: y - 25, text: "(click to dismiss instructions)", size_enum: -2, alignment_enum: 1, r: 255, g: 255, b: 255 }.label!~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~#+end_src~ @@ -186067,9 +195009,15 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ # They are stored in game so that they do not get reset every tick~ ** Processing line: ~ if args.inputs.mouse.click~ ** Processing line: ~ if !args.state.box_collision_one~ -** Processing line: ~ args.state.box_collision_one = [args.inputs.mouse.click.point.x - 25, args.inputs.mouse.click.point.y - 25, 125, 125, 180, 0, 0, 180]~ +** Processing line: ~ args.state.box_collision_one = { x: args.inputs.mouse.click.point.x - 25,~ +** Processing line: ~ y: args.inputs.mouse.click.point.y - 25,~ +** Processing line: ~ w: 125, h: 125,~ +** Processing line: ~ r: 180, g: 0, b: 0, a: 180 }~ ** Processing line: ~ elsif !args.state.box_collision_two~ -** Processing line: ~ args.state.box_collision_two = [args.inputs.mouse.click.point.x - 25, args.inputs.mouse.click.point.y - 25, 125, 125, 0, 0, 180, 180]~ +** Processing line: ~ args.state.box_collision_two = { x: args.inputs.mouse.click.point.x - 25,~ +** Processing line: ~ y: args.inputs.mouse.click.point.y - 25,~ +** Processing line: ~ w: 125, h: 125,~ +** Processing line: ~ r: 0, g: 0, b: 180, a: 180 }~ ** Processing line: ~ else~ ** Processing line: ~ args.state.box_collision_one = nil~ ** Processing line: ~ args.state.box_collision_two = nil~ @@ -186096,15 +195044,11 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ def small_label args, x, row, message~ -** Processing line: ~ [x, row_to_px(args, row), message, small_font]~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ def small_font~ -** Processing line: ~ [-2, 0, 0, 0, 0, 255]~ +** Processing line: ~ { x: x, y: row_to_px(args, row), text: message, size_enum: -2 }~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ def row_to_px args, row_number~ -** Processing line: ~ args.grid.top.shift_down(5).shift_down(20 * row_number)~ +** Processing line: ~ args.grid.top - 5 - (20 * row_number)~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ def tick_instructions args, text, y = 715~ @@ -186185,57 +195129,51 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ def process_inputs~ ** Processing line: ~ state.buttons = []~ ** Processing line: ~~ -** Processing line: ~ state.buttons << [100, 500, inputs.controller_one.key_held.l1, "L1"]~ -** Processing line: ~ state.buttons << [100, 600, inputs.controller_one.key_held.l2, "L2"]~ -** Processing line: ~~ -** Processing line: ~ state.buttons << [1100, 500, inputs.controller_one.key_held.r1, "R1"]~ -** Processing line: ~ state.buttons << [1100, 600, inputs.controller_one.key_held.r2, "R2"]~ -** Processing line: ~~ -** Processing line: ~ state.buttons << [540, 450, inputs.controller_one.key_held.select, "Select"]~ -** Processing line: ~ state.buttons << [660, 450, inputs.controller_one.key_held.start, "Start"]~ -** Processing line: ~~ -** Processing line: ~ state.buttons << [200, 300, inputs.controller_one.key_held.left, "Left"]~ -** Processing line: ~ state.buttons << [300, 400, inputs.controller_one.key_held.up, "Up"]~ -** Processing line: ~ state.buttons << [400, 300, inputs.controller_one.key_held.right, "Right"]~ -** Processing line: ~ state.buttons << [300, 200, inputs.controller_one.key_held.down, "Down"]~ -** Processing line: ~~ -** Processing line: ~ state.buttons << [800, 300, inputs.controller_one.key_held.x, "X"]~ -** Processing line: ~ state.buttons << [900, 400, inputs.controller_one.key_held.y, "Y"]~ -** Processing line: ~ state.buttons << [1000, 300, inputs.controller_one.key_held.a, "A"]~ -** Processing line: ~ state.buttons << [900, 200, inputs.controller_one.key_held.b, "B"]~ -** Processing line: ~~ -** Processing line: ~ state.buttons << [450 + inputs.controller_one.left_analog_x_perc * 100,~ -** Processing line: ~ 100 + inputs.controller_one.left_analog_y_perc * 100,~ -** Processing line: ~ inputs.controller_one.key_held.l3,~ -** Processing line: ~ "L3"]~ -** Processing line: ~~ -** Processing line: ~ state.buttons << [750 + inputs.controller_one.right_analog_x_perc * 100,~ -** Processing line: ~ 100 + inputs.controller_one.right_analog_y_perc * 100,~ -** Processing line: ~ inputs.controller_one.key_held.r3,~ -** Processing line: ~ "R3"]~ +** Processing line: ~ state.buttons << { x: 100, y: 500, active: inputs.controller_one.key_held.l1, text: "L1"}~ +** Processing line: ~ state.buttons << { x: 100, y: 600, active: inputs.controller_one.key_held.l2, text: "L2"}~ +** Processing line: ~ state.buttons << { x: 1100, y: 500, active: inputs.controller_one.key_held.r1, text: "R1"}~ +** Processing line: ~ state.buttons << { x: 1100, y: 600, active: inputs.controller_one.key_held.r2, text: "R2"}~ +** Processing line: ~ state.buttons << { x: 540, y: 450, active: inputs.controller_one.key_held.select, text: "Select"}~ +** Processing line: ~ state.buttons << { x: 660, y: 450, active: inputs.controller_one.key_held.start, text: "Start"}~ +** Processing line: ~ state.buttons << { x: 200, y: 300, active: inputs.controller_one.key_held.left, text: "Left"}~ +** Processing line: ~ state.buttons << { x: 300, y: 400, active: inputs.controller_one.key_held.up, text: "Up"}~ +** Processing line: ~ state.buttons << { x: 400, y: 300, active: inputs.controller_one.key_held.right, text: "Right"}~ +** Processing line: ~ state.buttons << { x: 300, y: 200, active: inputs.controller_one.key_held.down, text: "Down"}~ +** Processing line: ~ state.buttons << { x: 800, y: 300, active: inputs.controller_one.key_held.x, text: "X"}~ +** Processing line: ~ state.buttons << { x: 900, y: 400, active: inputs.controller_one.key_held.y, text: "Y"}~ +** Processing line: ~ state.buttons << { x: 1000, y: 300, active: inputs.controller_one.key_held.a, text: "A"}~ +** Processing line: ~ state.buttons << { x: 900, y: 200, active: inputs.controller_one.key_held.b, text: "B"}~ +** Processing line: ~ state.buttons << { x: 450 + inputs.controller_one.left_analog_x_perc * 100,~ +** Processing line: ~ y: 100 + inputs.controller_one.left_analog_y_perc * 100,~ +** Processing line: ~ active: inputs.controller_one.key_held.l3,~ +** Processing line: ~ text: "L3" }~ +** Processing line: ~ state.buttons << { x: 750 + inputs.controller_one.right_analog_x_perc * 100,~ +** Processing line: ~ y: 100 + inputs.controller_one.right_analog_y_perc * 100,~ +** Processing line: ~ active: inputs.controller_one.key_held.r3,~ +** Processing line: ~ text: "R3" }~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ # Gives each button a square shape.~ ** Processing line: ~ # If the button is being pressed or held (which means it is considered active),~ ** Processing line: ~ # the square is filled in. Otherwise, the button simply has a border.~ ** Processing line: ~ def render~ -** Processing line: ~ state.buttons.each do |x, y, active, text|~ -** Processing line: ~ rect = [x, y, 75, 75]~ +** Processing line: ~ state.buttons.each do |b|~ +** Processing line: ~ rect = { x: b.x, y: b.y, w: 75, h: 75 }~ ** Processing line: ~~ -** Processing line: ~ if active # if button is pressed~ +** Processing line: ~ if b.active # if button is pressed~ ** Processing line: ~ outputs.solids << rect # rect is output as solid (filled in)~ ** Processing line: ~ else~ ** Processing line: ~ outputs.borders << rect # otherwise, output as border~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ # Outputs the text of each button using labels.~ -** Processing line: ~ outputs.labels << [x, y + 95, text] # add 95 to place label above button~ +** Processing line: ~ outputs.labels << { x: b.x, y: b.y + 95, text: b.text } # add 95 to place label above button~ ** Processing line: ~ end~ ** Processing line: ~~ -** Processing line: ~ outputs.labels << [10, 60, "Left Analog x: #{inputs.controller_one.left_analog_x_raw} (#{inputs.controller_one.left_analog_x_perc * 100}%)"]~ -** Processing line: ~ outputs.labels << [10, 30, "Left Analog y: #{inputs.controller_one.left_analog_y_raw} (#{inputs.controller_one.left_analog_y_perc * 100}%)"]~ -** Processing line: ~ outputs.labels << [900, 60, "Right Analog x: #{inputs.controller_one.right_analog_x_raw} (#{inputs.controller_one.right_analog_x_perc * 100}%)"]~ -** Processing line: ~ outputs.labels << [900, 30, "Right Analog y: #{inputs.controller_one.right_analog_y_raw} (#{inputs.controller_one.right_analog_y_perc * 100}%)"]~ +** Processing line: ~ outputs.labels << { x: 10, y: 60, text: "Left Analog x: #{inputs.controller_one.left_analog_x_raw} (#{inputs.controller_one.left_analog_x_perc * 100}%)" }~ +** Processing line: ~ outputs.labels << { x: 10, y: 30, text: "Left Analog y: #{inputs.controller_one.left_analog_y_raw} (#{inputs.controller_one.left_analog_y_perc * 100}%)" }~ +** Processing line: ~ outputs.labels << { x: 900, y: 60, text: "Right Analog x: #{inputs.controller_one.right_analog_x_raw} (#{inputs.controller_one.right_analog_x_perc * 100}%)" }~ +** Processing line: ~ outputs.labels << { x: 900, y: 30, text: "Right Analog y: #{inputs.controller_one.right_analog_y_raw} (#{inputs.controller_one.right_analog_y_perc * 100}%)" }~ ** Processing line: ~ end~ ** Processing line: ~ end~ ** Processing line: ~~ @@ -186301,10 +195239,12 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ # the next new touch will be finger_one again, but until then, new touches~ ** Processing line: ~ # don't fill in earlier slots.~ ** Processing line: ~ if !args.inputs.finger_one.nil?~ -** Processing line: ~ args.outputs.primitives << [640, 650, "Finger #1 is touching at (#{args.inputs.finger_one.x}, #{args.inputs.finger_one.y}).", 5, 1, 255, 255, 255].label~ +** Processing line: ~ args.outputs.primitives << { x: 640, y: 650, text: "Finger #1 is touching at (#{args.inputs.finger_one.x}, #{args.inputs.finger_one.y}).",~ +** Processing line: ~ size_enum: 5, alignment_enum: 1, r: 255, g: 255, b: 255 }.label!~ ** Processing line: ~ end~ ** Processing line: ~ if !args.inputs.finger_two.nil?~ -** Processing line: ~ args.outputs.primitives << [640, 600, "Finger #2 is touching at (#{args.inputs.finger_two.x}, #{args.inputs.finger_two.y}).", 5, 1, 255, 255, 255].label~ +** Processing line: ~ args.outputs.primitives << { x: 640, y: 600, text: "Finger #2 is touching at (#{args.inputs.finger_two.x}, #{args.inputs.finger_two.y}).",~ +** Processing line: ~ size_enum: 5, alignment_enum: 1, r: 255, g: 255, b: 255 }.label!~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ # Here's the more flexible interface: this will report as many simultaneous~ @@ -186325,12 +195265,11 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ r = (color & 0xFF0000) >> 16~ ** Processing line: ~ g = (color & 0x00FF00) >> 8~ ** Processing line: ~ b = (color & 0x0000FF)~ -** Processing line: ~ args.outputs.primitives << [v.x - (size / 2), v.y + (size / 2), size, size, r, g, b, 255].solid~ -** Processing line: ~ args.outputs.primitives << [v.x, v.y + size, k.to_s, 0, 1, 0, 0, 0].label~ +** Processing line: ~ args.outputs.primitives << { x: v.x - (size / 2), y: v.y + (size / 2), w: size, h: size, r: r, g: g, b: b, a: 255 }.solid!~ +** Processing line: ~ args.outputs.primitives << { x: v.x, y: v.y + size, text: k.to_s, alignment_enum: 1 }.label!~ ** Processing line: ~ }~ ** Processing line: ~ end~ ** Processing line: ~~ -** Processing line: ~~ ** Processing line: ~#+end_src~ - PRE end detected. ** Processing line: ~~ @@ -186384,6 +195323,8 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ # in this tick "entry point": `looping_animation`, and the~ ** Processing line: ~ # second method is `one_time_animation`.~ ** Processing line: ~ def tick args~ +** Processing line: ~ # uncomment the line below to see animation play out in slow motion~ +** Processing line: ~ # args.gtk.slowmo! 6~ ** Processing line: ~ looping_animation args~ ** Processing line: ~ one_time_animation args~ ** Processing line: ~ end~ @@ -186416,22 +195357,22 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ does_sprite_loop~ ** Processing line: ~~ ** Processing line: ~ # Now that we have `sprite_index, we can present the correct file.~ -** Processing line: ~ args.outputs.sprites << [100, 100, 100, 100, "sprites/dragon_fly_#{sprite_index}.png"]~ +** Processing line: ~ args.outputs.sprites << { x: 100, y: 100, w: 100, h: 100, path: "sprites/dragon_fly_#{sprite_index}.png" }~ ** Processing line: ~~ ** Processing line: ~ # Try changing the numbers below to see how the animation changes:~ -** Processing line: ~ args.outputs.sprites << [100, 200, 100, 100, "sprites/dragon_fly_#{0.frame_index 6, 4, true}.png"]~ +** Processing line: ~ args.outputs.sprites << { x: 100, y: 200, w: 100, h: 100, path: "sprites/dragon_fly_#{0.frame_index 6, 4, true}.png" }~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ # This function shows how to animate a sprite that executes~ ** Processing line: ~ # only once when the "f" key is pressed.~ ** Processing line: ~ def one_time_animation args~ ** Processing line: ~ # This is just a label the shows instructions within the game.~ -** Processing line: ~ args.outputs.labels << [220, 350, "(press f to animate)"]~ +** Processing line: ~ args.outputs.labels << { x: 220, y: 350, text: "(press f to animate)" }~ ** Processing line: ~~ ** Processing line: ~ # If "f" is pressed on the keyboard...~ ** Processing line: ~ if args.inputs.keyboard.key_down.f~ ** Processing line: ~ # Print the frame that "f" was pressed on.~ -** Processing line: ~ puts "Hello from main.rb! The \"f\" key was in the down state on frame: #{args.inputs.keyboard.key_down.f}"~ +** Processing line: ~ puts "Hello from main.rb! The \"f\" key was in the down state on frame: #{args.state.tick_count}"~ ** Processing line: ~~ ** Processing line: ~ # And MOST IMPORTANTLY set the point it time to start the animation,~ ** Processing line: ~ # equal to "now" which is represented as args.state.tick_count.~ @@ -186464,7 +195405,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ sprite_index ||= 0~ ** Processing line: ~~ ** Processing line: ~ # Present the sprite.~ -** Processing line: ~ args.outputs.sprites << [100, 300, 100, 100, "sprites/dragon_fly_#{sprite_index}.png"]~ +** Processing line: ~ args.outputs.sprites << { x: 100, y: 300, w: 100, h: 100, path: "sprites/dragon_fly_#{sprite_index}.png" }~ ** Processing line: ~~ ** Processing line: ~ tick_instructions args, "Sample app shows how to use Numeric#frame_index and string interpolation to animate a sprite over time."~ ** Processing line: ~ end~ @@ -188592,9 +197533,9 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ mouse_overlay = mouse_overlay.merge r: 255 if state.delete_mode~ ** Processing line: ~~ ** Processing line: ~ if state.mouse_held~ -** Processing line: ~ outputs.primitives << mouse_overlay.border~ +** Processing line: ~ outputs.primitives << mouse_overlay.border!~ ** Processing line: ~ else~ -** Processing line: ~ outputs.primitives << mouse_overlay.solid~ +** Processing line: ~ outputs.primitives << mouse_overlay.solid!~ ** Processing line: ~ end~ ** Processing line: ~ end~ ** Processing line: ~~ @@ -193281,6 +202222,1068 @@ Follows is a source code listing for all files that have been open sourced. This - PRE end detected. ** Processing line: ~~ ** Processing line: ~~ +** Processing line: ~*** Advanced Audio - Audio Mixer - main.rb~ +- H3 detected. +- Determining if line is a header. +- Line contains ~*** ~... gsub-ing empty string +- Formatting line: ~Advanced Audio - Audio Mixer - main.rb~ +- Line's tilde count is: 0 +- Line contains link marker: false +- Determining if line is a header. +- Line contains ~*** ~... gsub-ing empty string +- Formatting line: ~Advanced Audio - Audio Mixer - main.rb~ +- Line's tilde count is: 0 +- Line contains link marker: false +** Processing line: ~~ +** Processing line: ~#+begin_src ruby~ +- PRE start detected. +** Processing line: ~ # ./samples/07_advanced_audio/01_audio_mixer/app/main.rb~ +** Processing line: ~ # these are the properties that you can sent on args.audio~ +** Processing line: ~ def spawn_new_sound args, name, path~ +** Processing line: ~ # Spawn randomly in an area that won't be covered by UI.~ +** Processing line: ~ screenx = (rand * 600.0) + 200.0~ +** Processing line: ~ screeny = (rand * 400.0) + 100.0~ +** Processing line: ~~ +** Processing line: ~ id = new_sound_id! args~ +** Processing line: ~ # you can hang anything on the audio hashes you want, so we store the~ +** Processing line: ~ # actual screen position in here for convenience.~ +** Processing line: ~ args.audio[id] = {~ +** Processing line: ~ name: name,~ +** Processing line: ~ input: path,~ +** Processing line: ~ screenx: screenx,~ +** Processing line: ~ screeny: screeny,~ +** Processing line: ~ x: ((screenx / 1279.0) * 2.0) - 1.0, # scale to -1.0 - 1.0 range~ +** Processing line: ~ y: ((screeny / 719.0) * 2.0) - 1.0, # scale to -1.0 - 1.0 range~ +** Processing line: ~ z: 0.0,~ +** Processing line: ~ gain: 1.0,~ +** Processing line: ~ pitch: 1.0,~ +** Processing line: ~ looping: true,~ +** Processing line: ~ paused: false~ +** Processing line: ~ }~ +** Processing line: ~~ +** Processing line: ~ args.state.selected = id~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ # these are values you can change on the ~args.audio~ data structure~ +** Processing line: ~ def input_panel args~ +** Processing line: ~ return unless args.state.panel~ +** Processing line: ~ return if args.state.dragging~ +** Processing line: ~~ +** Processing line: ~ audio_entry = args.audio[args.state.selected]~ +** Processing line: ~ results = args.state.panel~ +** Processing line: ~~ +** Processing line: ~ if args.state.mouse_state == :held && args.inputs.mouse.position.inside_rect?(results.pitch_slider_rect.rect)~ +** Processing line: ~ audio_entry.pitch = 2.0 * ((args.inputs.mouse.x - results.pitch_slider_rect.x).to_f / (results.pitch_slider_rect.w - 1.0))~ +** Processing line: ~ elsif args.state.mouse_state == :held && args.inputs.mouse.position.inside_rect?(results.playtime_slider_rect.rect)~ +** Processing line: ~ audio_entry.playtime = audio_entry.length_ * ((args.inputs.mouse.x - results.playtime_slider_rect.x).to_f / (results.playtime_slider_rect.w - 1.0))~ +** Processing line: ~ elsif args.state.mouse_state == :held && args.inputs.mouse.position.inside_rect?(results.gain_slider_rect.rect)~ +** Processing line: ~ audio_entry.gain = (args.inputs.mouse.x - results.gain_slider_rect.x).to_f / (results.gain_slider_rect.w - 1.0)~ +** Processing line: ~ elsif args.inputs.mouse.click && args.inputs.mouse.position.inside_rect?(results.looping_checkbox_rect.rect)~ +** Processing line: ~ audio_entry.looping = !audio_entry.looping~ +** Processing line: ~ elsif args.inputs.mouse.click && args.inputs.mouse.position.inside_rect?(results.paused_checkbox_rect.rect)~ +** Processing line: ~ audio_entry.paused = !audio_entry.paused~ +** Processing line: ~ elsif args.inputs.mouse.click && args.inputs.mouse.position.inside_rect?(results.delete_button_rect.rect)~ +** Processing line: ~ args.audio.delete args.state.selected~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def render_sources args~ +** Processing line: ~ args.outputs.primitives << args.audio.keys.map do |k|~ +** Processing line: ~ s = args.audio[k]~ +** Processing line: ~~ +** Processing line: ~ isselected = (k == args.state.selected)~ +** Processing line: ~~ +** Processing line: ~ color = isselected ? [ 0, 255, 0, 255 ] : [ 0, 0, 255, 255 ]~ +** Processing line: ~ [~ +** Processing line: ~ [s.screenx, s.screeny, args.state.boxsize, args.state.boxsize, *color].solid,~ +** Processing line: ~~ +** Processing line: ~ {~ +** Processing line: ~ x: s.screenx + args.state.boxsize.half,~ +** Processing line: ~ y: s.screeny,~ +** Processing line: ~ text: s.name,~ +** Processing line: ~ r: 255,~ +** Processing line: ~ g: 255,~ +** Processing line: ~ b: 255,~ +** Processing line: ~ alignment_enum: 1~ +** Processing line: ~ }.label!~ +** Processing line: ~ ]~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def playtime_str t~ +** Processing line: ~ minutes = (t / 60.0).floor~ +** Processing line: ~ seconds = t - (minutes * 60.0).to_f~ +** Processing line: ~ return minutes.to_s + ':' + seconds.floor.to_s + ((seconds - seconds.floor).to_s + "000")[1..3]~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def label_with_drop_shadow x, y, text~ +** Processing line: ~ [~ +** Processing line: ~ { x: x + 1, y: y + 1, text: text, vertical_alignment_enum: 1, alignment_enum: 1, r: 0, g: 0, b: 0 }.label!,~ +** Processing line: ~ { x: x + 2, y: y + 0, text: text, vertical_alignment_enum: 1, alignment_enum: 1, r: 0, g: 0, b: 0 }.label!,~ +** Processing line: ~ { x: x + 0, y: y + 1, text: text, vertical_alignment_enum: 1, alignment_enum: 1, r: 200, g: 200, b: 200 }.label!~ +** Processing line: ~ ]~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def check_box opts = {}~ +** Processing line: ~ checkbox_template = opts.args.layout.rect(w: 0.5, h: 0.5, col: 2)~ +** Processing line: ~ final_rect = checkbox_template.center_inside_rect_y(opts.args.layout.rect(row: opts.row, col: opts.col))~ +** Processing line: ~ color = { r: 0, g: 0, b: 0 }~ +** Processing line: ~ color = { r: 255, g: 255, b: 255 } if opts.checked~ +** Processing line: ~~ +** Processing line: ~ {~ +** Processing line: ~ rect: final_rect,~ +** Processing line: ~ primitives: [~ +** Processing line: ~ (final_rect.to_solid color)~ +** Processing line: ~ ]~ +** Processing line: ~ }~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def progress_bar opts = {}~ +** Processing line: ~ outer_rect = opts.args.layout.rect(row: opts.row, col: opts.col, w: 5, h: 1)~ +** Processing line: ~ color = opts.percentage * 255~ +** Processing line: ~ baseline_progress_bar = opts.args~ +** Processing line: ~ .layout~ +** Processing line: ~ .rect(w: 5, h: 0.5)~ +** Processing line: ~~ +** Processing line: ~ final_rect = baseline_progress_bar.center_inside_rect(outer_rect)~ +** Processing line: ~ center = final_rect.rect_center_point~ +** Processing line: ~~ +** Processing line: ~ {~ +** Processing line: ~ rect: final_rect,~ +** Processing line: ~ primitives: [~ +** Processing line: ~ final_rect.merge(r: color, g: color, b: color, a: 128).solid!,~ +** Processing line: ~ label_with_drop_shadow(center.x, center.y, opts.text)~ +** Processing line: ~ ]~ +** Processing line: ~ }~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def panel_primitives args, audio_entry~ +** Processing line: ~ results = { primitives: [] }~ +** Processing line: ~~ +** Processing line: ~ return results unless audio_entry~ +** Processing line: ~~ +** Processing line: ~ # this uses DRGTK's layout apis to layout the controls~ +** Processing line: ~ # imagine the screen is split into equal cells (24 cells across, 12 cells up and down)~ +** Processing line: ~ # args.layout.rect returns a hash which we merge values with to create primitives~ +** Processing line: ~ # using args.layout.rect removes the need for pixel pushing~ +** Processing line: ~~ +** Processing line: ~ # args.outputs.debug << args.layout.debug_primitives(r: 255, g: 255, b: 255)~ +** Processing line: ~~ +** Processing line: ~ white_color = { r: 255, g: 255, b: 255 }~ +** Processing line: ~ label_style = white_color.merge(vertical_alignment_enum: 1)~ +** Processing line: ~~ +** Processing line: ~ # panel background~ +** Processing line: ~ results.primitives << args.layout.rect(row: 0, col: 0, w: 7, h: 6, include_col_gutter: true, include_row_gutter: true)~ +** Processing line: ~ .border!(r: 255, g: 255, b: 255)~ +** Processing line: ~~ +** Processing line: ~ # title~ +** Processing line: ~ results.primitives << args.layout.point(row: 0, col: 3.5, row_anchor: 0.5)~ +** Processing line: ~ .merge(label_style)~ +** Processing line: ~ .merge(text: "Source #{args.state.selected} (#{args.audio[args.state.selected].name})",~ +** Processing line: ~ size_enum: 3,~ +** Processing line: ~ alignment_enum: 1)~ +** Processing line: ~~ +** Processing line: ~ # seperator line~ +** Processing line: ~ results.primitives << args.layout.rect(row: 1, col: 0, w: 7, h: 0)~ +** Processing line: ~ .line!(white_color)~ +** Processing line: ~~ +** Processing line: ~ # screen location~ +** Processing line: ~ results.primitives << args.layout.point(row: 1.0, col: 0, row_anchor: 0.5)~ +** Processing line: ~ .merge(label_style)~ +** Processing line: ~ .merge(text: "screen:")~ +** Processing line: ~~ +** Processing line: ~ results.primitives << args.layout.point(row: 1.0, col: 2, row_anchor: 0.5)~ +** Processing line: ~ .merge(label_style)~ +** Processing line: ~ .merge(text: "(#{audio_entry.screenx.to_i}, #{audio_entry.screeny.to_i})")~ +** Processing line: ~~ +** Processing line: ~ # position~ +** Processing line: ~ results.primitives << args.layout.point(row: 1.5, col: 0, row_anchor: 0.5)~ +** Processing line: ~ .merge(label_style)~ +** Processing line: ~ .merge(text: "position:")~ +** Processing line: ~~ +** Processing line: ~ results.primitives << args.layout.point(row: 1.5, col: 2, row_anchor: 0.5)~ +** Processing line: ~ .merge(label_style)~ +** Processing line: ~ .merge(text: "(#{audio_entry[:x].round(5).to_s[0..6]}, #{audio_entry[:y].round(5).to_s[0..6]})")~ +** Processing line: ~~ +** Processing line: ~ results.primitives << args.layout.point(row: 2.0, col: 0, row_anchor: 0.5)~ +** Processing line: ~ .merge(label_style)~ +** Processing line: ~ .merge(text: "pitch:")~ +** Processing line: ~~ +** Processing line: ~ results.pitch_slider_rect = progress_bar(row: 2.0, col: 2,~ +** Processing line: ~ percentage: audio_entry.pitch / 2.0,~ +** Processing line: ~ text: "#{audio_entry.pitch.to_sf}",~ +** Processing line: ~ args: args)~ +** Processing line: ~~ +** Processing line: ~ results.primitives << results.pitch_slider_rect.primitives~ +** Processing line: ~~ +** Processing line: ~ results.primitives << args.layout.point(row: 2.5, col: 0, row_anchor: 0.5)~ +** Processing line: ~ .merge(label_style)~ +** Processing line: ~ .merge(text: "playtime:")~ +** Processing line: ~~ +** Processing line: ~ results.playtime_slider_rect = progress_bar(args: args,~ +** Processing line: ~ row: 2.5,~ +** Processing line: ~ col: 2,~ +** Processing line: ~ percentage: audio_entry.playtime / audio_entry.length_,~ +** Processing line: ~ text: "#{playtime_str(audio_entry.playtime)} / #{playtime_str(audio_entry.length_)}")~ +** Processing line: ~~ +** Processing line: ~ results.primitives << results.playtime_slider_rect.primitives~ +** Processing line: ~~ +** Processing line: ~ results.primitives << args.layout.point(row: 3.0, col: 0, row_anchor: 0.5)~ +** Processing line: ~ .merge(label_style)~ +** Processing line: ~ .merge(text: "gain:")~ +** Processing line: ~~ +** Processing line: ~ results.gain_slider_rect = progress_bar(args: args,~ +** Processing line: ~ row: 3.0,~ +** Processing line: ~ col: 2,~ +** Processing line: ~ percentage: audio_entry.gain,~ +** Processing line: ~ text: "#{audio_entry.gain.to_sf}")~ +** Processing line: ~~ +** Processing line: ~ results.primitives << results.gain_slider_rect.primitives~ +** Processing line: ~~ +** Processing line: ~~ +** Processing line: ~ results.primitives << args.layout.point(row: 3.5, col: 0, row_anchor: 0.5)~ +** Processing line: ~ .merge(label_style)~ +** Processing line: ~ .merge(text: "looping:")~ +** Processing line: ~~ +** Processing line: ~ checkbox_template = args.layout.rect(w: 0.5, h: 0.5, col: 2)~ +** Processing line: ~~ +** Processing line: ~ results.looping_checkbox_rect = check_box(args: args, row: 3.5, col: 2, checked: audio_entry.looping)~ +** Processing line: ~ results.primitives << results.looping_checkbox_rect.primitives~ +** Processing line: ~~ +** Processing line: ~ results.primitives << args.layout.point(row: 4.0, col: 0, row_anchor: 0.5)~ +** Processing line: ~ .merge(label_style)~ +** Processing line: ~ .merge(text: "paused:")~ +** Processing line: ~~ +** Processing line: ~ checkbox_template = args.layout.rect(w: 0.5, h: 0.5, col: 2)~ +** Processing line: ~~ +** Processing line: ~ results.paused_checkbox_rect = check_box(args: args, row: 4.0, col: 2, checked: !audio_entry.paused)~ +** Processing line: ~ results.primitives << results.paused_checkbox_rect.primitives~ +** Processing line: ~~ +** Processing line: ~ results.delete_button_rect = { rect: args.layout.rect(row: 5, col: 0, w: 7, h: 1) }~ +** Processing line: ~~ +** Processing line: ~ results.primitives << results.delete_button_rect.to_solid(r: 180)~ +** Processing line: ~~ +** Processing line: ~ results.primitives << args.layout.point(row: 5, col: 3.5, row_anchor: 0.5)~ +** Processing line: ~ .merge(label_style)~ +** Processing line: ~ .merge(text: "DELETE", alignment_enum: 1)~ +** Processing line: ~~ +** Processing line: ~ return results~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def render_panel args~ +** Processing line: ~ args.state.panel = nil~ +** Processing line: ~ audio_entry = args.audio[args.state.selected]~ +** Processing line: ~ return unless audio_entry~ +** Processing line: ~~ +** Processing line: ~ mouse_down = (args.state.mouse_held >= 0)~ +** Processing line: ~ args.state.panel = panel_primitives args, audio_entry~ +** Processing line: ~ args.outputs.primitives << args.state.panel.primitives~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def new_sound_id! args~ +** Processing line: ~ args.state.sound_id ||= 0~ +** Processing line: ~ args.state.sound_id += 1~ +** Processing line: ~ args.state.sound_id~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def render_launcher args~ +** Processing line: ~ args.outputs.primitives << args.state.spawn_sound_buttons.map(&:primitives)~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def render_ui args~ +** Processing line: ~ render_launcher args~ +** Processing line: ~ render_panel args~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def tick args~ +** Processing line: ~ defaults args~ +** Processing line: ~ render args~ +** Processing line: ~ input args~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def input args~ +** Processing line: ~ if !args.audio[args.state.selected]~ +** Processing line: ~ args.state.selected = nil~ +** Processing line: ~ args.state.dragging = nil~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ # spawn button and node interaction~ +** Processing line: ~ if args.inputs.mouse.click~ +** Processing line: ~ spawn_sound_button = args.state.spawn_sound_buttons.find { |b| args.inputs.mouse.inside_rect? b.rect }~ +** Processing line: ~~ +** Processing line: ~ audio_click_key, audio_click_value = args.audio.find do |k, v|~ +** Processing line: ~ args.inputs.mouse.inside_rect? [v.screenx, v.screeny, args.state.boxsize, args.state.boxsize]~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ if spawn_sound_button~ +** Processing line: ~ args.state.selected = nil~ +** Processing line: ~ spawn_new_sound args, spawn_sound_button.name, spawn_sound_button.path~ +** Processing line: ~ elsif audio_click_key~ +** Processing line: ~ args.state.selected = audio_click_key~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ if args.state.mouse_state == :held && args.state.selected~ +** Processing line: ~ v = args.audio[args.state.selected]~ +** Processing line: ~ if args.inputs.mouse.inside_rect? [v.screenx, v.screeny, args.state.boxsize, args.state.boxsize]~ +** Processing line: ~ args.state.dragging = args.state.selected~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ if args.state.dragging~ +** Processing line: ~ s = args.audio[args.state.selected]~ +** Processing line: ~ # you can hang anything on the audio hashes you want, so we store the~ +** Processing line: ~ # actual screen position so it doesn't scale weirdly vs your mouse.~ +** Processing line: ~ s.screenx = args.inputs.mouse.x - (args.state.boxsize / 2)~ +** Processing line: ~ s.screeny = args.inputs.mouse.y - (args.state.boxsize / 2)~ +** Processing line: ~~ +** Processing line: ~ s.screeny = 50 if s.screeny < 50~ +** Processing line: ~ s.screeny = (719 - args.state.boxsize) if s.screeny > (719 - args.state.boxsize)~ +** Processing line: ~ s.screenx = 0 if s.screenx < 0~ +** Processing line: ~ s.screenx = (1279 - args.state.boxsize) if s.screenx > (1279 - args.state.boxsize)~ +** Processing line: ~~ +** Processing line: ~ s.x = ((s.screenx / 1279.0) * 2.0) - 1.0 # scale to -1.0 - 1.0 range~ +** Processing line: ~ s.y = ((s.screeny / 719.0) * 2.0) - 1.0 # scale to -1.0 - 1.0 range~ +** Processing line: ~ end~ +** Processing line: ~ elsif args.state.mouse_state == :released~ +** Processing line: ~ args.state.dragging = nil~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ input_panel args~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def defaults args~ +** Processing line: ~ args.state.mouse_state ||= :released~ +** Processing line: ~ args.state.dragging_source ||= false~ +** Processing line: ~ args.state.selected ||= 0~ +** Processing line: ~ args.state.next_sound_index ||= 0~ +** Processing line: ~ args.state.boxsize ||= 30~ +** Processing line: ~ args.state.sound_files ||= [~ +** Processing line: ~ { name: :tada, path: "sounds/tada.wav" },~ +** Processing line: ~ { name: :splash, path: "sounds/splash.wav" },~ +** Processing line: ~ { name: :drum, path: "sounds/drum.wav" },~ +** Processing line: ~ { name: :spring, path: "sounds/spring.wav" },~ +** Processing line: ~ { name: :music, path: "sounds/music.ogg" }~ +** Processing line: ~ ]~ +** Processing line: ~~ +** Processing line: ~ # generate buttons based off the sound collection above~ +** Processing line: ~ args.state.spawn_sound_buttons ||= begin~ +** Processing line: ~ # create a group of buttons~ +** Processing line: ~ # column centered (using col_offset to calculate the column offset)~ +** Processing line: ~ # where each item is 2 columns apart~ +** Processing line: ~ rects = args.layout.rect_group row: 11,~ +** Processing line: ~ col_offset: {~ +** Processing line: ~ count: args.state.sound_files.length,~ +** Processing line: ~ w: 2~ +** Processing line: ~ },~ +** Processing line: ~ dcol: 2,~ +** Processing line: ~ w: 2,~ +** Processing line: ~ h: 1,~ +** Processing line: ~ group: args.state.sound_files~ +** Processing line: ~~ +** Processing line: ~ # now that you have the rects~ +** Processing line: ~ # construct the metadata for the buttons~ +** Processing line: ~ rects.map do |rect|~ +** Processing line: ~ {~ +** Processing line: ~ rect: rect,~ +** Processing line: ~ name: rect.name,~ +** Processing line: ~ path: rect.path,~ +** Processing line: ~ primitives: [~ +** Processing line: ~ rect.to_border(r: 255, g: 255, b: 255),~ +** Processing line: ~ rect.to_label(x: rect.center_x,~ +** Processing line: ~ y: rect.center_y,~ +** Processing line: ~ text: "#{rect.name}",~ +** Processing line: ~ alignment_enum: 1,~ +** Processing line: ~ vertical_alignment_enum: 1,~ +** Processing line: ~ r: 255, g: 255, b: 255)~ +** Processing line: ~ ]~ +** Processing line: ~ }~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ if args.inputs.mouse.up~ +** Processing line: ~ args.state.mouse_state = :released~ +** Processing line: ~ args.state.dragging_source = false~ +** Processing line: ~ elsif args.inputs.mouse.down~ +** Processing line: ~ args.state.mouse_state = :held~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ args.outputs.background_color = [ 0, 0, 0, 255 ]~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def render args~ +** Processing line: ~ render_ui args~ +** Processing line: ~ render_sources args~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~#+end_src~ +- PRE end detected. +** Processing line: ~~ +** Processing line: ~~ +** Processing line: ~*** Advanced Audio - Audio Mixer - server_ip_address.txt~ +- H3 detected. +- Determining if line is a header. +- Line contains ~*** ~... gsub-ing empty string +- Formatting line: ~Advanced Audio - Audio Mixer - server_ip_address.txt~ +- Line's tilde count is: 0 +- Line contains link marker: false +- Determining if line is a header. +- Line contains ~*** ~... gsub-ing empty string +- Formatting line: ~Advanced Audio - Audio Mixer - server_ip_address.txt~ +- Line's tilde count is: 0 +- Line contains link marker: false +** Processing line: ~~ +** Processing line: ~#+begin_src ruby~ +- PRE start detected. +** Processing line: ~ # ./samples/07_advanced_audio/01_audio_mixer/app/server_ip_address.txt~ +** Processing line: ~ 192.168.1.65~ +** Processing line: ~#+end_src~ +- PRE end detected. +** Processing line: ~~ +** Processing line: ~~ +** Processing line: ~*** Advanced Audio - Audio Mixer - Metadata - ios_metadata.txt~ +- H3 detected. +- Determining if line is a header. +- Line contains ~*** ~... gsub-ing empty string +- Formatting line: ~Advanced Audio - Audio Mixer - Metadata - ios_metadata.txt~ +- Line's tilde count is: 0 +- Line contains link marker: false +- Determining if line is a header. +- Line contains ~*** ~... gsub-ing empty string +- Formatting line: ~Advanced Audio - Audio Mixer - Metadata - ios_metadata.txt~ +- Line's tilde count is: 0 +- Line contains link marker: false +** Processing line: ~~ +** Processing line: ~#+begin_src ruby~ +- PRE start detected. +** Processing line: ~ # ./samples/07_advanced_audio/01_audio_mixer/metadata/ios_metadata.txt~ +** Processing line: ~ # ios_metadata.txt is used by the Pro version of DragonRuby Game Toolkit to create iOS apps.~ +** Processing line: ~ # Information about the Pro version can be found at: http://dragonruby.org/toolkit/game#purchase~ +** Processing line: ~~ +** Processing line: ~ # teamid needs to be set to your assigned Team Id which can be found at https://developer.apple.com/account/#/membership/~ +** Processing line: ~ teamid=~ +** Processing line: ~ # appid needs to be set to your application identifier which can be found at https://developer.apple.com/account/resources/identifiers/list~ +** Processing line: ~ appid=~ +** Processing line: ~ # appname is the name you want to show up underneath the app icon on the device. Keep it under 10 characters.~ +** Processing line: ~ appname=~ +** Processing line: ~~ +** Processing line: ~#+end_src~ +- PRE end detected. +** Processing line: ~~ +** Processing line: ~~ +** Processing line: ~*** Advanced Audio - Sound Synthesis - main.rb~ +- H3 detected. +- Determining if line is a header. +- Line contains ~*** ~... gsub-ing empty string +- Formatting line: ~Advanced Audio - Sound Synthesis - main.rb~ +- Line's tilde count is: 0 +- Line contains link marker: false +- Determining if line is a header. +- Line contains ~*** ~... gsub-ing empty string +- Formatting line: ~Advanced Audio - Sound Synthesis - main.rb~ +- Line's tilde count is: 0 +- Line contains link marker: false +** Processing line: ~~ +** Processing line: ~#+begin_src ruby~ +- PRE start detected. +** Processing line: ~ # ./samples/07_advanced_audio/02_sound_synthesis/app/main.rb~ +** Processing line: ~ begin # region: top level tick methods~ +** Processing line: ~ def tick args~ +** Processing line: ~ defaults args~ +** Processing line: ~ render args~ +** Processing line: ~ input args~ +** Processing line: ~ process_audio_queue args~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def defaults args~ +** Processing line: ~ args.state.sine_waves ||= {}~ +** Processing line: ~ args.state.square_waves ||= {}~ +** Processing line: ~ args.state.saw_tooth_waves ||= {}~ +** Processing line: ~ args.state.triangle_waves ||= {}~ +** Processing line: ~ args.state.audio_queue ||= []~ +** Processing line: ~ args.state.buttons ||= [~ +** Processing line: ~ (frequency_buttons args),~ +** Processing line: ~ (sine_wave_note_buttons args),~ +** Processing line: ~ (bell_buttons args),~ +** Processing line: ~ (square_wave_note_buttons args),~ +** Processing line: ~ (saw_tooth_wave_note_buttons args),~ +** Processing line: ~ (triangle_wave_note_buttons args),~ +** Processing line: ~ ].flatten~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def render args~ +** Processing line: ~ args.outputs.borders << args.state.buttons.map { |b| b[:border] }~ +** Processing line: ~ args.outputs.labels << args.state.buttons.map { |b| b[:label] }~ +** Processing line: ~ args.outputs.labels << args.layout~ +** Processing line: ~ .rect(row: 0, col: 11.5)~ +** Processing line: ~ .yield_self { |r| r.merge y: r.y + r.h }~ +** Processing line: ~ .merge(text: "This is a Pro only feature. Click here to watch the YouTube video if you are on the Standard License.",~ +** Processing line: ~ alignment_enum: 1)~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~~ +** Processing line: ~ def input args~ +** Processing line: ~ args.state.buttons.each do |b|~ +** Processing line: ~ if args.inputs.mouse.click && (args.inputs.mouse.click.inside_rect? b[:rect])~ +** Processing line: ~ parameter_string = (b.slice :frequency, :note, :octave).map { |k, v| "#{k}: #{v}" }.join ", "~ +** Processing line: ~ args.gtk.notify! "#{b[:method_to_call]} #{parameter_string}"~ +** Processing line: ~ send b[:method_to_call], args, b~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ if args.inputs.mouse.click && (args.inputs.mouse.click.inside_rect? (args.layout.rect(row: 0).yield_self { |r| r.merge y: r.y + r.h.half, h: r.h.half }))~ +** Processing line: ~ args.gtk.openurl 'https://www.youtube.com/watch?v=zEzovM5jT-k&ab_channel=AmirRajan'~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def process_audio_queue args~ +** Processing line: ~ to_queue = args.state.audio_queue.find_all { |v| v[:queue_at] <= args.tick_count }~ +** Processing line: ~ args.state.audio_queue -= to_queue~ +** Processing line: ~ to_queue.each { |a| args.audio[a[:id]] = a }~ +** Processing line: ~~ +** Processing line: ~ args.audio.find_all { |k, v| v[:decay_rate] }~ +** Processing line: ~ .each { |k, v| v[:gain] -= v[:decay_rate] }~ +** Processing line: ~~ +** Processing line: ~ sounds_to_stop = args.audio~ +** Processing line: ~ .find_all { |k, v| v[:stop_at] && args.state.tick_count >= v[:stop_at] }~ +** Processing line: ~ .map { |k, v| k }~ +** Processing line: ~~ +** Processing line: ~ sounds_to_stop.each { |k| args.audio.delete k }~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ begin # region: button definitions, ui layout, callback functions~ +** Processing line: ~ def button args, opts~ +** Processing line: ~ button_def = opts.merge rect: (args.layout.rect (opts.merge w: 2, h: 1))~ +** Processing line: ~~ +** Processing line: ~ button_def[:border] = button_def[:rect].merge r: 0, g: 0, b: 0~ +** Processing line: ~~ +** Processing line: ~ label_offset_x = 5~ +** Processing line: ~ label_offset_y = 30~ +** Processing line: ~~ +** Processing line: ~ button_def[:label] = button_def[:rect].merge text: opts[:text],~ +** Processing line: ~ size_enum: -2.5,~ +** Processing line: ~ x: button_def[:rect].x + label_offset_x,~ +** Processing line: ~ y: button_def[:rect].y + label_offset_y~ +** Processing line: ~~ +** Processing line: ~ button_def~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def play_sine_wave args, sender~ +** Processing line: ~ queue_sine_wave args,~ +** Processing line: ~ frequency: sender[:frequency],~ +** Processing line: ~ duration: 1.seconds,~ +** Processing line: ~ fade_out: true~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def play_note args, sender~ +** Processing line: ~ method_to_call = :queue_sine_wave~ +** Processing line: ~ method_to_call = :queue_square_wave if sender[:type] == :square~ +** Processing line: ~ method_to_call = :queue_saw_tooth_wave if sender[:type] == :saw_tooth~ +** Processing line: ~ method_to_call = :queue_triangle_wave if sender[:type] == :triangle~ +** Processing line: ~ method_to_call = :queue_bell if sender[:type] == :bell~ +** Processing line: ~~ +** Processing line: ~ send method_to_call, args,~ +** Processing line: ~ frequency: (frequency_for note: sender[:note], octave: sender[:octave]),~ +** Processing line: ~ duration: 1.seconds,~ +** Processing line: ~ fade_out: true~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def frequency_buttons args~ +** Processing line: ~ [~ +** Processing line: ~ (button args,~ +** Processing line: ~ row: 4.0, col: 0, text: "300hz",~ +** Processing line: ~ frequency: 300,~ +** Processing line: ~ method_to_call: :play_sine_wave),~ +** Processing line: ~ (button args,~ +** Processing line: ~ row: 5.0, col: 0, text: "400hz",~ +** Processing line: ~ frequency: 400,~ +** Processing line: ~ method_to_call: :play_sine_wave),~ +** Processing line: ~ (button args,~ +** Processing line: ~ row: 6.0, col: 0, text: "500hz",~ +** Processing line: ~ frequency: 500,~ +** Processing line: ~ method_to_call: :play_sine_wave),~ +** Processing line: ~ ]~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def sine_wave_note_buttons args~ +** Processing line: ~ [~ +** Processing line: ~ (button args,~ +** Processing line: ~ row: 1.5, col: 2, text: "Sine C4",~ +** Processing line: ~ note: :c, octave: 4, type: :sine, method_to_call: :play_note),~ +** Processing line: ~ (button args,~ +** Processing line: ~ row: 2.5, col: 2, text: "Sine D4",~ +** Processing line: ~ note: :d, octave: 4, type: :sine, method_to_call: :play_note),~ +** Processing line: ~ (button args,~ +** Processing line: ~ row: 3.5, col: 2, text: "Sine E4",~ +** Processing line: ~ note: :e, octave: 4, type: :sine, method_to_call: :play_note),~ +** Processing line: ~ (button args,~ +** Processing line: ~ row: 4.5, col: 2, text: "Sine F4",~ +** Processing line: ~ note: :f, octave: 4, type: :sine, method_to_call: :play_note),~ +** Processing line: ~ (button args,~ +** Processing line: ~ row: 5.5, col: 2, text: "Sine G4",~ +** Processing line: ~ note: :g, octave: 4, type: :sine, method_to_call: :play_note),~ +** Processing line: ~ (button args,~ +** Processing line: ~ row: 6.5, col: 2, text: "Sine A5",~ +** Processing line: ~ note: :a, octave: 5, type: :sine, method_to_call: :play_note),~ +** Processing line: ~ (button args,~ +** Processing line: ~ row: 7.5, col: 2, text: "Sine B5",~ +** Processing line: ~ note: :b, octave: 5, type: :sine, method_to_call: :play_note),~ +** Processing line: ~ (button args,~ +** Processing line: ~ row: 8.5, col: 2, text: "Sine C5",~ +** Processing line: ~ note: :c, octave: 5, type: :sine, method_to_call: :play_note),~ +** Processing line: ~ ]~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def square_wave_note_buttons args~ +** Processing line: ~ [~ +** Processing line: ~ (button args,~ +** Processing line: ~ row: 1.5, col: 6, text: "Square C4",~ +** Processing line: ~ note: :c, octave: 4, type: :square, method_to_call: :play_note),~ +** Processing line: ~ (button args,~ +** Processing line: ~ row: 2.5, col: 6, text: "Square D4",~ +** Processing line: ~ note: :d, octave: 4, type: :square, method_to_call: :play_note),~ +** Processing line: ~ (button args,~ +** Processing line: ~ row: 3.5, col: 6, text: "Square E4",~ +** Processing line: ~ note: :e, octave: 4, type: :square, method_to_call: :play_note),~ +** Processing line: ~ (button args,~ +** Processing line: ~ row: 4.5, col: 6, text: "Square F4",~ +** Processing line: ~ note: :f, octave: 4, type: :square, method_to_call: :play_note),~ +** Processing line: ~ (button args,~ +** Processing line: ~ row: 5.5, col: 6, text: "Square G4",~ +** Processing line: ~ note: :g, octave: 4, type: :square, method_to_call: :play_note),~ +** Processing line: ~ (button args,~ +** Processing line: ~ row: 6.5, col: 6, text: "Square A5",~ +** Processing line: ~ note: :a, octave: 5, type: :square, method_to_call: :play_note),~ +** Processing line: ~ (button args,~ +** Processing line: ~ row: 7.5, col: 6, text: "Square B5",~ +** Processing line: ~ note: :b, octave: 5, type: :square, method_to_call: :play_note),~ +** Processing line: ~ (button args,~ +** Processing line: ~ row: 8.5, col: 6, text: "Square C5",~ +** Processing line: ~ note: :c, octave: 5, type: :square, method_to_call: :play_note),~ +** Processing line: ~ ]~ +** Processing line: ~ end~ +** Processing line: ~ def saw_tooth_wave_note_buttons args~ +** Processing line: ~ [~ +** Processing line: ~ (button args,~ +** Processing line: ~ row: 1.5, col: 8, text: "Saw C4",~ +** Processing line: ~ note: :c, octave: 4, type: :saw_tooth, method_to_call: :play_note),~ +** Processing line: ~ (button args,~ +** Processing line: ~ row: 2.5, col: 8, text: "Saw D4",~ +** Processing line: ~ note: :d, octave: 4, type: :saw_tooth, method_to_call: :play_note),~ +** Processing line: ~ (button args,~ +** Processing line: ~ row: 3.5, col: 8, text: "Saw E4",~ +** Processing line: ~ note: :e, octave: 4, type: :saw_tooth, method_to_call: :play_note),~ +** Processing line: ~ (button args,~ +** Processing line: ~ row: 4.5, col: 8, text: "Saw F4",~ +** Processing line: ~ note: :f, octave: 4, type: :saw_tooth, method_to_call: :play_note),~ +** Processing line: ~ (button args,~ +** Processing line: ~ row: 5.5, col: 8, text: "Saw G4",~ +** Processing line: ~ note: :g, octave: 4, type: :saw_tooth, method_to_call: :play_note),~ +** Processing line: ~ (button args,~ +** Processing line: ~ row: 6.5, col: 8, text: "Saw A5",~ +** Processing line: ~ note: :a, octave: 5, type: :saw_tooth, method_to_call: :play_note),~ +** Processing line: ~ (button args,~ +** Processing line: ~ row: 7.5, col: 8, text: "Saw B5",~ +** Processing line: ~ note: :b, octave: 5, type: :saw_tooth, method_to_call: :play_note),~ +** Processing line: ~ (button args,~ +** Processing line: ~ row: 8.5, col: 8, text: "Saw C5",~ +** Processing line: ~ note: :c, octave: 5, type: :saw_tooth, method_to_call: :play_note),~ +** Processing line: ~ ]~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def triangle_wave_note_buttons args~ +** Processing line: ~ [~ +** Processing line: ~ (button args,~ +** Processing line: ~ row: 1.5, col: 10, text: "Triangle C4",~ +** Processing line: ~ note: :c, octave: 4, type: :triangle, method_to_call: :play_note),~ +** Processing line: ~ (button args,~ +** Processing line: ~ row: 2.5, col: 10, text: "Triangle D4",~ +** Processing line: ~ note: :d, octave: 4, type: :triangle, method_to_call: :play_note),~ +** Processing line: ~ (button args,~ +** Processing line: ~ row: 3.5, col: 10, text: "Triangle E4",~ +** Processing line: ~ note: :e, octave: 4, type: :triangle, method_to_call: :play_note),~ +** Processing line: ~ (button args,~ +** Processing line: ~ row: 4.5, col: 10, text: "Triangle F4",~ +** Processing line: ~ note: :f, octave: 4, type: :triangle, method_to_call: :play_note),~ +** Processing line: ~ (button args,~ +** Processing line: ~ row: 5.5, col: 10, text: "Triangle G4",~ +** Processing line: ~ note: :g, octave: 4, type: :triangle, method_to_call: :play_note),~ +** Processing line: ~ (button args,~ +** Processing line: ~ row: 6.5, col: 10, text: "Triangle A5",~ +** Processing line: ~ note: :a, octave: 5, type: :triangle, method_to_call: :play_note),~ +** Processing line: ~ (button args,~ +** Processing line: ~ row: 7.5, col: 10, text: "Triangle B5",~ +** Processing line: ~ note: :b, octave: 5, type: :triangle, method_to_call: :play_note),~ +** Processing line: ~ (button args,~ +** Processing line: ~ row: 8.5, col: 10, text: "Triangle C5",~ +** Processing line: ~ note: :c, octave: 5, type: :triangle, method_to_call: :play_note),~ +** Processing line: ~ ]~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def bell_buttons args~ +** Processing line: ~ [~ +** Processing line: ~ (button args,~ +** Processing line: ~ row: 1.5, col: 4, text: "Bell C4",~ +** Processing line: ~ note: :c, octave: 4, type: :bell, method_to_call: :play_note),~ +** Processing line: ~ (button args,~ +** Processing line: ~ row: 2.5, col: 4, text: "Bell D4",~ +** Processing line: ~ note: :d, octave: 4, type: :bell, method_to_call: :play_note),~ +** Processing line: ~ (button args,~ +** Processing line: ~ row: 3.5, col: 4, text: "Bell E4",~ +** Processing line: ~ note: :e, octave: 4, type: :bell, method_to_call: :play_note),~ +** Processing line: ~ (button args,~ +** Processing line: ~ row: 4.5, col: 4, text: "Bell F4",~ +** Processing line: ~ note: :f, octave: 4, type: :bell, method_to_call: :play_note),~ +** Processing line: ~ (button args,~ +** Processing line: ~ row: 5.5, col: 4, text: "Bell G4",~ +** Processing line: ~ note: :g, octave: 4, type: :bell, method_to_call: :play_note),~ +** Processing line: ~ (button args,~ +** Processing line: ~ row: 6.5, col: 4, text: "Bell A5",~ +** Processing line: ~ note: :a, octave: 5, type: :bell, method_to_call: :play_note),~ +** Processing line: ~ (button args,~ +** Processing line: ~ row: 7.5, col: 4, text: "Bell B5",~ +** Processing line: ~ note: :b, octave: 5, type: :bell, method_to_call: :play_note),~ +** Processing line: ~ (button args,~ +** Processing line: ~ row: 8.5, col: 4, text: "Bell C5",~ +** Processing line: ~ note: :c, octave: 5, type: :bell, method_to_call: :play_note),~ +** Processing line: ~ ]~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ begin # region: wave generation~ +** Processing line: ~ begin # sine wave~ +** Processing line: ~ def defaults_sine_wave_for~ +** Processing line: ~ { frequency: 440, sample_rate: 48000 }~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def sine_wave_for opts = {}~ +** Processing line: ~ opts = defaults_sine_wave_for.merge opts~ +** Processing line: ~ frequency = opts[:frequency]~ +** Processing line: ~ sample_rate = opts[:sample_rate]~ +** Processing line: ~ period_size = (sample_rate.fdiv frequency).ceil~ +** Processing line: ~ period_size.map_with_index do |i|~ +** Processing line: ~ Math::sin((2.0 * Math::PI) / (sample_rate.to_f / frequency.to_f) * i)~ +** Processing line: ~ end.to_a~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def defaults_queue_sine_wave~ +** Processing line: ~ { frequency: 440, duration: 60, gain: 1.0, fade_out: false, queue_in: 0 }~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def queue_sine_wave args, opts = {}~ +** Processing line: ~ opts = defaults_queue_sine_wave.merge opts~ +** Processing line: ~ frequency = opts[:frequency]~ +** Processing line: ~ sample_rate = 48000~ +** Processing line: ~~ +** Processing line: ~ sine_wave = sine_wave_for frequency: frequency, sample_rate: sample_rate~ +** Processing line: ~ args.state.sine_waves[frequency] ||= sine_wave_for frequency: frequency, sample_rate: sample_rate~ +** Processing line: ~~ +** Processing line: ~ proc = lambda do~ +** Processing line: ~ generate_audio_data args.state.sine_waves[frequency], sample_rate~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ audio_state = new_audio_state args, opts~ +** Processing line: ~ audio_state[:input] = [1, sample_rate, proc]~ +** Processing line: ~ queue_audio args, audio_state: audio_state, wave: sine_wave~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ begin # region: square wave~ +** Processing line: ~ def defaults_square_wave_for~ +** Processing line: ~ { frequency: 440, sample_rate: 48000 }~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def square_wave_for opts = {}~ +** Processing line: ~ opts = defaults_square_wave_for.merge opts~ +** Processing line: ~ sine_wave = sine_wave_for opts~ +** Processing line: ~ sine_wave.map do |v|~ +** Processing line: ~ if v >= 0~ +** Processing line: ~ 1.0~ +** Processing line: ~ else~ +** Processing line: ~ -1.0~ +** Processing line: ~ end~ +** Processing line: ~ end.to_a~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def defaults_queue_square_wave~ +** Processing line: ~ { frequency: 440, duration: 60, gain: 0.3, fade_out: false, queue_in: 0 }~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def queue_square_wave args, opts = {}~ +** Processing line: ~ opts = defaults_queue_square_wave.merge opts~ +** Processing line: ~ frequency = opts[:frequency]~ +** Processing line: ~ sample_rate = 48000~ +** Processing line: ~~ +** Processing line: ~ square_wave = square_wave_for frequency: frequency, sample_rate: sample_rate~ +** Processing line: ~ args.state.square_waves[frequency] ||= square_wave_for frequency: frequency, sample_rate: sample_rate~ +** Processing line: ~~ +** Processing line: ~ proc = lambda do~ +** Processing line: ~ generate_audio_data args.state.square_waves[frequency], sample_rate~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ audio_state = new_audio_state args, opts~ +** Processing line: ~ audio_state[:input] = [1, sample_rate, proc]~ +** Processing line: ~ queue_audio args, audio_state: audio_state, wave: square_wave~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ begin # region: saw tooth wave~ +** Processing line: ~ def defaults_saw_tooth_wave_for~ +** Processing line: ~ { frequency: 440, sample_rate: 48000 }~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def saw_tooth_wave_for opts = {}~ +** Processing line: ~ opts = defaults_saw_tooth_wave_for.merge opts~ +** Processing line: ~ sine_wave = sine_wave_for opts~ +** Processing line: ~ period_size = sine_wave.length~ +** Processing line: ~ sine_wave.map_with_index do |v, i|~ +** Processing line: ~ (((i % period_size).fdiv period_size) * 2) - 1~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def defaults_queue_saw_tooth_wave~ +** Processing line: ~ { frequency: 440, duration: 60, gain: 0.3, fade_out: false, queue_in: 0 }~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def queue_saw_tooth_wave args, opts = {}~ +** Processing line: ~ opts = defaults_queue_saw_tooth_wave.merge opts~ +** Processing line: ~ frequency = opts[:frequency]~ +** Processing line: ~ sample_rate = 48000~ +** Processing line: ~~ +** Processing line: ~ saw_tooth_wave = saw_tooth_wave_for frequency: frequency, sample_rate: sample_rate~ +** Processing line: ~ args.state.saw_tooth_waves[frequency] ||= saw_tooth_wave_for frequency: frequency, sample_rate: sample_rate~ +** Processing line: ~~ +** Processing line: ~ proc = lambda do~ +** Processing line: ~ generate_audio_data args.state.saw_tooth_waves[frequency], sample_rate~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ audio_state = new_audio_state args, opts~ +** Processing line: ~ audio_state[:input] = [1, sample_rate, proc]~ +** Processing line: ~ queue_audio args, audio_state: audio_state, wave: saw_tooth_wave~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ begin # region: triangle wave~ +** Processing line: ~ def defaults_triangle_wave_for~ +** Processing line: ~ { frequency: 440, sample_rate: 48000 }~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def triangle_wave_for opts = {}~ +** Processing line: ~ opts = defaults_saw_tooth_wave_for.merge opts~ +** Processing line: ~ sine_wave = sine_wave_for opts~ +** Processing line: ~ period_size = sine_wave.length~ +** Processing line: ~ sine_wave.map_with_index do |v, i|~ +** Processing line: ~ ratio = (i.fdiv period_size)~ +** Processing line: ~ if ratio <= 0.5~ +** Processing line: ~ (ratio * 4) - 1~ +** Processing line: ~ else~ +** Processing line: ~ ratio -= 0.5~ +** Processing line: ~ 1 - (ratio * 4)~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def defaults_queue_triangle_wave~ +** Processing line: ~ { frequency: 440, duration: 60, gain: 1.0, fade_out: false, queue_in: 0 }~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def queue_triangle_wave args, opts = {}~ +** Processing line: ~ opts = defaults_queue_triangle_wave.merge opts~ +** Processing line: ~ frequency = opts[:frequency]~ +** Processing line: ~ sample_rate = 48000~ +** Processing line: ~~ +** Processing line: ~ triangle_wave = triangle_wave_for frequency: frequency, sample_rate: sample_rate~ +** Processing line: ~ args.state.triangle_waves[frequency] ||= triangle_wave_for frequency: frequency, sample_rate: sample_rate~ +** Processing line: ~~ +** Processing line: ~ proc = lambda do~ +** Processing line: ~ generate_audio_data args.state.triangle_waves[frequency], sample_rate~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ audio_state = new_audio_state args, opts~ +** Processing line: ~ audio_state[:input] = [1, sample_rate, proc]~ +** Processing line: ~ queue_audio args, audio_state: audio_state, wave: triangle_wave~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ begin # region: bell~ +** Processing line: ~ def defaults_queue_bell~ +** Processing line: ~ { frequency: 440, duration: 1.seconds, queue_in: 0 }~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def queue_bell args, opts = {}~ +** Processing line: ~ (bell_to_sine_waves (defaults_queue_bell.merge opts)).each { |b| queue_sine_wave args, b }~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def bell_harmonics~ +** Processing line: ~ [~ +** Processing line: ~ { frequency_ratio: 0.5, duration_ratio: 1.00 },~ +** Processing line: ~ { frequency_ratio: 1.0, duration_ratio: 0.80 },~ +** Processing line: ~ { frequency_ratio: 2.0, duration_ratio: 0.60 },~ +** Processing line: ~ { frequency_ratio: 3.0, duration_ratio: 0.40 },~ +** Processing line: ~ { frequency_ratio: 4.2, duration_ratio: 0.25 },~ +** Processing line: ~ { frequency_ratio: 5.4, duration_ratio: 0.20 },~ +** Processing line: ~ { frequency_ratio: 6.8, duration_ratio: 0.15 }~ +** Processing line: ~ ]~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def defaults_bell_to_sine_waves~ +** Processing line: ~ { frequency: 440, duration: 1.seconds, queue_in: 0 }~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def bell_to_sine_waves opts = {}~ +** Processing line: ~ opts = defaults_bell_to_sine_waves.merge opts~ +** Processing line: ~ bell_harmonics.map do |b|~ +** Processing line: ~ {~ +** Processing line: ~ frequency: opts[:frequency] * b[:frequency_ratio],~ +** Processing line: ~ duration: opts[:duration] * b[:duration_ratio],~ +** Processing line: ~ queue_in: opts[:queue_in],~ +** Processing line: ~ gain: (1.fdiv bell_harmonics.length),~ +** Processing line: ~ fade_out: true~ +** Processing line: ~ }~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ begin # audio entity construction~ +** Processing line: ~ def generate_audio_data sine_wave, sample_rate~ +** Processing line: ~ sample_size = (sample_rate.fdiv (1000.fdiv 60)).ceil~ +** Processing line: ~ copy_count = (sample_size.fdiv sine_wave.length).ceil~ +** Processing line: ~ sine_wave * copy_count~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def defaults_new_audio_state~ +** Processing line: ~ { frequency: 440, duration: 60, gain: 1.0, fade_out: false, queue_in: 0 }~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def new_audio_state args, opts = {}~ +** Processing line: ~ opts = defaults_new_audio_state.merge opts~ +** Processing line: ~ decay_rate = 0~ +** Processing line: ~ decay_rate = 1.fdiv(opts[:duration]) * opts[:gain] if opts[:fade_out]~ +** Processing line: ~ frequency = opts[:frequency]~ +** Processing line: ~ sample_rate = 48000~ +** Processing line: ~~ +** Processing line: ~ {~ +** Processing line: ~ id: (new_id! args),~ +** Processing line: ~ frequency: frequency,~ +** Processing line: ~ sample_rate: 48000,~ +** Processing line: ~ stop_at: args.tick_count + opts[:queue_in] + opts[:duration],~ +** Processing line: ~ gain: opts[:gain].to_f,~ +** Processing line: ~ queue_at: args.state.tick_count + opts[:queue_in],~ +** Processing line: ~ decay_rate: decay_rate,~ +** Processing line: ~ pitch: 1.0,~ +** Processing line: ~ looping: true,~ +** Processing line: ~ paused: false~ +** Processing line: ~ }~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def queue_audio args, opts = {}~ +** Processing line: ~ graph_wave args, opts[:wave], opts[:audio_state][:frequency]~ +** Processing line: ~ args.state.audio_queue << opts[:audio_state]~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def new_id! args~ +** Processing line: ~ args.state.audio_id ||= 0~ +** Processing line: ~ args.state.audio_id += 1~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def graph_wave args, wave, frequency~ +** Processing line: ~ if args.state.tick_count != args.state.graphed_at~ +** Processing line: ~ args.outputs.static_lines.clear~ +** Processing line: ~ args.outputs.static_sprites.clear~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ wave = wave~ +** Processing line: ~~ +** Processing line: ~ r, g, b = frequency.to_i % 85,~ +** Processing line: ~ frequency.to_i % 170,~ +** Processing line: ~ frequency.to_i % 255~ +** Processing line: ~~ +** Processing line: ~ starting_rect = args.layout.rect(row: 5, col: 13)~ +** Processing line: ~ x_scale = 10~ +** Processing line: ~ y_scale = 100~ +** Processing line: ~ max_points = 25~ +** Processing line: ~~ +** Processing line: ~ points = wave~ +** Processing line: ~ if wave.length > max_points~ +** Processing line: ~ resolution = wave.length.idiv max_points~ +** Processing line: ~ points = wave.find_all.with_index { |y, i| (i % resolution == 0) }~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ args.outputs.static_lines << points.map_with_index do |y, x|~ +** Processing line: ~ next_y = points[x + 1]~ +** Processing line: ~~ +** Processing line: ~ if next_y~ +** Processing line: ~ {~ +** Processing line: ~ x: starting_rect.x + (x * x_scale),~ +** Processing line: ~ y: starting_rect.y + starting_rect.h.half + y_scale * y,~ +** Processing line: ~ x2: starting_rect.x + ((x + 1) * x_scale),~ +** Processing line: ~ y2: starting_rect.y + starting_rect.h.half + y_scale * next_y,~ +** Processing line: ~ r: r,~ +** Processing line: ~ g: g,~ +** Processing line: ~ b: b~ +** Processing line: ~ }~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ args.outputs.static_sprites << points.map_with_index do |y, x|~ +** Processing line: ~ {~ +** Processing line: ~ x: (starting_rect.x + (x * x_scale)) - 2,~ +** Processing line: ~ y: (starting_rect.y + starting_rect.h.half + y_scale * y) - 2,~ +** Processing line: ~ w: 4,~ +** Processing line: ~ h: 4,~ +** Processing line: ~ path: 'sprites/square-white.png',~ +** Processing line: ~ r: r,~ +** Processing line: ~ g: g,~ +** Processing line: ~ b: b~ +** Processing line: ~ }~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ args.state.graphed_at = args.state.tick_count~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ begin # region: musical note mapping~ +** Processing line: ~ def defaults_frequency_for~ +** Processing line: ~ { note: :a, octave: 5, sharp: false, flat: false }~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def frequency_for opts = {}~ +** Processing line: ~ opts = defaults_frequency_for.merge opts~ +** Processing line: ~ octave_offset_multiplier = opts[:octave] - 5~ +** Processing line: ~ note = note_frequencies_octave_5[opts[:note]]~ +** Processing line: ~ if octave_offset_multiplier < 0~ +** Processing line: ~ note = note * 1 / (octave_offset_multiplier.abs + 1)~ +** Processing line: ~ elsif octave_offset_multiplier > 0~ +** Processing line: ~ note = note * (octave_offset_multiplier.abs + 1) / 1~ +** Processing line: ~ end~ +** Processing line: ~ note~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def note_frequencies_octave_5~ +** Processing line: ~ {~ +** Processing line: ~ a: 440.0,~ +** Processing line: ~ a_sharp: 466.16, b_flat: 466.16,~ +** Processing line: ~ b: 493.88,~ +** Processing line: ~ c: 523.25,~ +** Processing line: ~ c_sharp: 554.37, d_flat: 587.33,~ +** Processing line: ~ d: 587.33,~ +** Processing line: ~ d_sharp: 622.25, e_flat: 659.25,~ +** Processing line: ~ e: 659.25,~ +** Processing line: ~ f: 698.25,~ +** Processing line: ~ f_sharp: 739.99, g_flat: 739.99,~ +** Processing line: ~ g: 783.99,~ +** Processing line: ~ g_sharp: 830.61, a_flat: 830.61~ +** Processing line: ~ }~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ $gtk.reset~ +** Processing line: ~~ +** Processing line: ~#+end_src~ +- PRE end detected. +** Processing line: ~~ +** Processing line: ~~ ** Processing line: ~*** Advanced Rendering - Simple Render Targets - main.rb~ - H3 detected. - Determining if line is a header. @@ -194306,7 +204309,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ flip_horizontally: false,~ ** Processing line: ~ angle_anchor_x: 0.5, # rotation center set to middle~ ** Processing line: ~ angle_anchor_y: 0.5~ -** Processing line: ~ }.sprite~ +** Processing line: ~ }.sprite!~ ** Processing line: ~~ ** Processing line: ~ # Outputs label as primitive using a hash~ ** Processing line: ~ args.outputs.primitives << {~ @@ -194320,7 +204323,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ b: 50,~ ** Processing line: ~ a: 255, # transparency~ ** Processing line: ~ font: "fonts/manaspc.ttf" # font style~ -** Processing line: ~ }.label~ +** Processing line: ~ }.label!~ ** Processing line: ~~ ** Processing line: ~ # Outputs solid as primitive using a hash~ ** Processing line: ~ args.outputs.primitives << {~ @@ -194332,7 +204335,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ g: 50,~ ** Processing line: ~ b: 50,~ ** Processing line: ~ a: 255 # transparency~ -** Processing line: ~ }.solid~ +** Processing line: ~ }.solid!~ ** Processing line: ~~ ** Processing line: ~ # Outputs border as primitive using a hash~ ** Processing line: ~ # Same parameters as solid~ @@ -194345,7 +204348,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ g: 50,~ ** Processing line: ~ b: 50,~ ** Processing line: ~ a: 255 # transparency~ -** Processing line: ~ }.border~ +** Processing line: ~ }.border!~ ** Processing line: ~~ ** Processing line: ~ # Outputs line as primitive using a hash~ ** Processing line: ~ args.outputs.primitives << {~ @@ -194357,7 +204360,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ g: 50,~ ** Processing line: ~ b: 50,~ ** Processing line: ~ a: 255 # transparency~ -** Processing line: ~ }.line~ +** Processing line: ~ }.line!~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~#+end_src~ @@ -194426,6 +204429,120 @@ Follows is a source code listing for all files that have been open sourced. This - PRE end detected. ** Processing line: ~~ ** Processing line: ~~ +** Processing line: ~*** Advanced Rendering - Simple Camera - main.rb~ +- H3 detected. +- Determining if line is a header. +- Line contains ~*** ~... gsub-ing empty string +- Formatting line: ~Advanced Rendering - Simple Camera - main.rb~ +- Line's tilde count is: 0 +- Line contains link marker: false +- Determining if line is a header. +- Line contains ~*** ~... gsub-ing empty string +- Formatting line: ~Advanced Rendering - Simple Camera - main.rb~ +- Line's tilde count is: 0 +- Line contains link marker: false +** Processing line: ~~ +** Processing line: ~#+begin_src ruby~ +- PRE start detected. +** Processing line: ~ # ./samples/07_advanced_rendering/07_simple_camera/app/main.rb~ +** Processing line: ~ def tick args~ +** Processing line: ~ # variables you can play around with~ +** Processing line: ~ args.state.world.w ||= 1280~ +** Processing line: ~ args.state.world.h ||= 720~ +** Processing line: ~~ +** Processing line: ~ args.state.player.x ||= 0~ +** Processing line: ~ args.state.player.y ||= 0~ +** Processing line: ~ args.state.player.size ||= 32~ +** Processing line: ~~ +** Processing line: ~ args.state.enemy.x ||= 700~ +** Processing line: ~ args.state.enemy.y ||= 700~ +** Processing line: ~ args.state.enemy.size ||= 16~ +** Processing line: ~~ +** Processing line: ~ args.state.camera.x ||= 640~ +** Processing line: ~ args.state.camera.y ||= 300~ +** Processing line: ~ args.state.camera.scale ||= 1.0~ +** Processing line: ~ args.state.camera.show_empty_space ||= :yes~ +** Processing line: ~~ +** Processing line: ~ # instructions~ +** Processing line: ~ args.outputs.primitives << { x: 0, y: 80.from_top, w: 360, h: 80, r: 0, g: 0, b: 0, a: 128 }.solid!~ +** Processing line: ~ args.outputs.primitives << { x: 10, y: 10.from_top, text: "arrow keys to move around", r: 255, g: 255, b: 255}.label!~ +** Processing line: ~ args.outputs.primitives << { x: 10, y: 30.from_top, text: "+/- to change zoom of camera", r: 255, g: 255, b: 255}.label!~ +** Processing line: ~ args.outputs.primitives << { x: 10, y: 50.from_top, text: "tab to change camera edge behavior", r: 255, g: 255, b: 255}.label!~ +** Processing line: ~~ +** Processing line: ~ # render scene~ +** Processing line: ~ args.outputs[:scene].w = args.state.world.w~ +** Processing line: ~ args.outputs[:scene].h = args.state.world.h~ +** Processing line: ~~ +** Processing line: ~ args.outputs[:scene].solids << { x: 0, y: 0, w: args.state.world.w, h: args.state.world.h, r: 20, g: 60, b: 80 }~ +** Processing line: ~ args.outputs[:scene].solids << { x: args.state.player.x, y: args.state.player.y,~ +** Processing line: ~ w: args.state.player.size, h: args.state.player.size, r: 80, g: 155, b: 80 }~ +** Processing line: ~ args.outputs[:scene].solids << { x: args.state.enemy.x, y: args.state.enemy.y,~ +** Processing line: ~ w: args.state.enemy.size, h: args.state.enemy.size, r: 155, g: 80, b: 80 }~ +** Processing line: ~~ +** Processing line: ~ # render camera~ +** Processing line: ~ scene_position = calc_scene_position args~ +** Processing line: ~ args.outputs.sprites << { x: scene_position.x,~ +** Processing line: ~ y: scene_position.y,~ +** Processing line: ~ w: scene_position.w,~ +** Processing line: ~ h: scene_position.h,~ +** Processing line: ~ path: :scene }~ +** Processing line: ~~ +** Processing line: ~ # move player~ +** Processing line: ~ if args.inputs.directional_angle~ +** Processing line: ~ args.state.player.x += args.inputs.directional_angle.vector_x * 5~ +** Processing line: ~ args.state.player.y += args.inputs.directional_angle.vector_y * 5~ +** Processing line: ~ args.state.player.x = args.state.player.x.clamp(0, args.state.world.w - args.state.player.size)~ +** Processing line: ~ args.state.player.y = args.state.player.y.clamp(0, args.state.world.h - args.state.player.size)~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ # +/- to zoom in and out~ +** Processing line: ~ if args.inputs.keyboard.plus && args.state.tick_count.zmod?(3)~ +** Processing line: ~ args.state.camera.scale += 0.05~ +** Processing line: ~ elsif args.inputs.keyboard.hyphen && args.state.tick_count.zmod?(3)~ +** Processing line: ~ args.state.camera.scale -= 0.05~ +** Processing line: ~ elsif args.inputs.keyboard.key_down.tab~ +** Processing line: ~ if args.state.camera.show_empty_space == :yes~ +** Processing line: ~ args.state.camera.show_empty_space = :no~ +** Processing line: ~ else~ +** Processing line: ~ args.state.camera.show_empty_space = :yes~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ args.state.camera.scale = args.state.camera.scale.greater(0.1)~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def calc_scene_position args~ +** Processing line: ~ result = { x: args.state.camera.x - (args.state.player.x * args.state.camera.scale),~ +** Processing line: ~ y: args.state.camera.y - (args.state.player.y * args.state.camera.scale),~ +** Processing line: ~ w: args.state.world.w * args.state.camera.scale,~ +** Processing line: ~ h: args.state.world.h * args.state.camera.scale,~ +** Processing line: ~ scale: args.state.camera.scale }~ +** Processing line: ~~ +** Processing line: ~ return result if args.state.camera.show_empty_space == :yes~ +** Processing line: ~~ +** Processing line: ~ if result.w < args.grid.w~ +** Processing line: ~ result.merge!(x: (args.grid.w - result.w).half)~ +** Processing line: ~ elsif (args.state.player.x * result.scale) < args.grid.w.half~ +** Processing line: ~ result.merge!(x: 10)~ +** Processing line: ~ elsif (result.x + result.w) < args.grid.w~ +** Processing line: ~ result.merge!(x: - result.w + (args.grid.w - 10))~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ if result.h < args.grid.h~ +** Processing line: ~ result.merge!(y: (args.grid.h - result.h).half)~ +** Processing line: ~ elsif (result.y) > 10~ +** Processing line: ~ result.merge!(y: 10)~ +** Processing line: ~ elsif (result.y + result.h) < args.grid.h~ +** Processing line: ~ result.merge!(y: - result.h + (args.grid.h - 10))~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ result~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~#+end_src~ +- PRE end detected. +** Processing line: ~~ +** Processing line: ~~ ** Processing line: ~*** Advanced Rendering - Splitscreen Camera - main.rb~ - H3 detected. - Determining if line is a header. @@ -194441,7 +204558,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~~ ** Processing line: ~#+begin_src ruby~ - PRE start detected. -** Processing line: ~ # ./samples/07_advanced_rendering/07_splitscreen_camera/app/main.rb~ +** Processing line: ~ # ./samples/07_advanced_rendering/08_splitscreen_camera/app/main.rb~ ** Processing line: ~ class CameraMovement~ ** Processing line: ~ attr_accessor :state, :inputs, :outputs, :grid~ ** Processing line: ~~ @@ -194857,7 +204974,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~~ ** Processing line: ~#+begin_src ruby~ - PRE start detected. -** Processing line: ~ # ./samples/07_advanced_rendering/08_z_targeting_camera/app/main.rb~ +** Processing line: ~ # ./samples/07_advanced_rendering/09_z_targeting_camera/app/main.rb~ ** Processing line: ~ class Game~ ** Processing line: ~ attr_gtk~ ** Processing line: ~~ @@ -194969,6 +205086,76 @@ Follows is a source code listing for all files that have been open sourced. This - PRE end detected. ** Processing line: ~~ ** Processing line: ~~ +** Processing line: ~*** Advanced Rendering - Blend Modes - main.rb~ +- H3 detected. +- Determining if line is a header. +- Line contains ~*** ~... gsub-ing empty string +- Formatting line: ~Advanced Rendering - Blend Modes - main.rb~ +- Line's tilde count is: 0 +- Line contains link marker: false +- Determining if line is a header. +- Line contains ~*** ~... gsub-ing empty string +- Formatting line: ~Advanced Rendering - Blend Modes - main.rb~ +- Line's tilde count is: 0 +- Line contains link marker: false +** Processing line: ~~ +** Processing line: ~#+begin_src ruby~ +- PRE start detected. +** Processing line: ~ # ./samples/07_advanced_rendering/10_blend_modes/app/main.rb~ +** Processing line: ~ $gtk.reset~ +** Processing line: ~~ +** Processing line: ~ def draw_blendmode args, mode~ +** Processing line: ~ w = 160~ +** Processing line: ~ h = w~ +** Processing line: ~ args.state.x += (1280-w) / (args.state.blendmodes.length + 1)~ +** Processing line: ~ x = args.state.x~ +** Processing line: ~ y = (720 - h) / 2~ +** Processing line: ~ s = 'sprites/blue-feathered.png'~ +** Processing line: ~ args.outputs.sprites << { blendmode_enum: mode.value, x: x, y: y, w: w, h: h, path: s }~ +** Processing line: ~ args.outputs.labels << [x + (w/2), y, mode.name.to_s, 1, 1, 255, 255, 255]~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def tick args~ +** Processing line: ~~ +** Processing line: ~ # Different blend modes do different things, depending on what they~ +** Processing line: ~ # blend against (in this case, the pixels of the background color).~ +** Processing line: ~ args.state.bg_element ||= 1~ +** Processing line: ~ args.state.bg_color ||= 255~ +** Processing line: ~ args.state.bg_color_direction ||= 1~ +** Processing line: ~ bg_r = (args.state.bg_element == 1) ? args.state.bg_color : 0~ +** Processing line: ~ bg_g = (args.state.bg_element == 2) ? args.state.bg_color : 0~ +** Processing line: ~ bg_b = (args.state.bg_element == 3) ? args.state.bg_color : 0~ +** Processing line: ~ args.state.bg_color += args.state.bg_color_direction~ +** Processing line: ~ if (args.state.bg_color_direction > 0) && (args.state.bg_color >= 255)~ +** Processing line: ~ args.state.bg_color_direction = -1~ +** Processing line: ~ args.state.bg_color = 255~ +** Processing line: ~ elsif (args.state.bg_color_direction < 0) && (args.state.bg_color <= 0)~ +** Processing line: ~ args.state.bg_color_direction = 1~ +** Processing line: ~ args.state.bg_color = 0~ +** Processing line: ~ args.state.bg_element += 1~ +** Processing line: ~ if args.state.bg_element >= 4~ +** Processing line: ~ args.state.bg_element = 1~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ args.outputs.background_color = [ bg_r, bg_g, bg_b, 255 ]~ +** Processing line: ~~ +** Processing line: ~ args.state.blendmodes ||= [~ +** Processing line: ~ { name: :none, value: 0 },~ +** Processing line: ~ { name: :blend, value: 1 },~ +** Processing line: ~ { name: :add, value: 2 },~ +** Processing line: ~ { name: :mod, value: 3 },~ +** Processing line: ~ { name: :mul, value: 4 }~ +** Processing line: ~ ]~ +** Processing line: ~~ +** Processing line: ~ args.state.x = 0 # reset this, draw_blendmode will increment it.~ +** Processing line: ~ args.state.blendmodes.each { |blendmode| draw_blendmode args, blendmode }~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~#+end_src~ +- PRE end detected. +** Processing line: ~~ +** Processing line: ~~ ** Processing line: ~*** Tweening Lerping Easing Functions - Easing Functions - main.rb~ - H3 detected. - Determining if line is a header. @@ -195534,7 +205721,11 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~~ ** Processing line: ~ # sets console command when sample app initially opens~ ** Processing line: ~ if Kernel.global_tick_count == 0~ -** Processing line: ~ puts "* INFO - Please specify the number of sprites to render."~ +** Processing line: ~ puts ""~ +** Processing line: ~ puts ""~ +** Processing line: ~ puts "========================================================="~ +** Processing line: ~ puts "* INFO: Sprites, Hashes"~ +** Processing line: ~ puts "* INFO: Please specify the number of sprites to render."~ ** Processing line: ~ args.gtk.console.set_command "reset_with count: 100"~ ** Processing line: ~ end~ ** Processing line: ~~ @@ -195619,7 +205810,11 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~~ ** Processing line: ~ # sets console command when sample app initially opens~ ** Processing line: ~ if Kernel.global_tick_count == 0~ -** Processing line: ~ puts "* INFO - Please specify the number of sprites to render."~ +** Processing line: ~ puts ""~ +** Processing line: ~ puts ""~ +** Processing line: ~ puts "========================================================="~ +** Processing line: ~ puts "* INFO: Sprites, Open Entities"~ +** Processing line: ~ puts "* INFO: Please specify the number of sprites to render."~ ** Processing line: ~ args.gtk.console.set_command "reset_with count: 100"~ ** Processing line: ~ end~ ** Processing line: ~~ @@ -195708,7 +205903,11 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~~ ** Processing line: ~ # sets console command when sample app initially opens~ ** Processing line: ~ if Kernel.global_tick_count == 0~ -** Processing line: ~ puts "* INFO - Please specify the number of sprites to render."~ +** Processing line: ~ puts ""~ +** Processing line: ~ puts ""~ +** Processing line: ~ puts "========================================================="~ +** Processing line: ~ puts "* INFO: Sprites, Strict Entities"~ +** Processing line: ~ puts "* INFO: Please specify the number of sprites to render."~ ** Processing line: ~ args.gtk.console.set_command "reset_with count: 100"~ ** Processing line: ~ end~ ** Processing line: ~~ @@ -195780,6 +205979,11 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ def tick args~ ** Processing line: ~ # sets console command when sample app initially opens~ ** Processing line: ~ if Kernel.global_tick_count == 0~ +** Processing line: ~ puts ""~ +** Processing line: ~ puts ""~ +** Processing line: ~ puts "========================================================="~ +** Processing line: ~ puts "* INFO: Sprites, Classes"~ +** Processing line: ~ puts "* INFO: Please specify the number of sprites to render."~ ** Processing line: ~ args.gtk.console.set_command "reset_with count: 100"~ ** Processing line: ~ end~ ** Processing line: ~~ @@ -195852,19 +206056,24 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ def tick args~ ** Processing line: ~ # sets console command when sample app initially opens~ ** Processing line: ~ if Kernel.global_tick_count == 0~ +** Processing line: ~ puts ""~ +** Processing line: ~ puts ""~ +** Processing line: ~ puts "========================================================="~ +** Processing line: ~ puts "* INFO: Static Sprites, Classes"~ +** Processing line: ~ puts "* INFO: Please specify the number of sprites to render."~ ** Processing line: ~ args.gtk.console.set_command "reset_with count: 100"~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ # init~ ** Processing line: ~ if args.state.tick_count == 0~ ** Processing line: ~ args.state.stars = args.state.star_count.map { |i| Star.new args.grid }~ +** Processing line: ~ args.outputs.static_sprites << args.state.stars~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ # update~ ** Processing line: ~ args.state.stars.each(&:move)~ ** Processing line: ~~ ** Processing line: ~ # render~ -** Processing line: ~ args.outputs.sprites << args.state.stars~ ** Processing line: ~ args.outputs.background_color = [0, 0, 0]~ ** Processing line: ~ args.outputs.primitives << args.gtk.current_framerate_primitives~ ** Processing line: ~ end~ @@ -195937,10 +206146,21 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ # path,~ ** Processing line: ~ # angle,~ ** Processing line: ~ # alpha, red_saturation, green_saturation, blue_saturation~ +** Processing line: ~ # tile_x, tile_y, tile_w, tile_h,~ ** Processing line: ~ # flip_horizontally, flip_vertically,~ -** Processing line: ~ # tile_x, tile_y, tile_w, tile_h~ ** Processing line: ~ # angle_anchor_x, angle_anchor_y,~ ** Processing line: ~ # source_x, source_y, source_w, source_h~ +** Processing line: ~~ +** Processing line: ~ # The argument order for ffi_draw.draw_sprite_4 is:~ +** Processing line: ~ # x, y, w, h,~ +** Processing line: ~ # path,~ +** Processing line: ~ # angle,~ +** Processing line: ~ # alpha, red_saturation, green_saturation, blue_saturation~ +** Processing line: ~ # tile_x, tile_y, tile_w, tile_h,~ +** Processing line: ~ # flip_horizontally, flip_vertically,~ +** Processing line: ~ # angle_anchor_x, angle_anchor_y,~ +** Processing line: ~ # source_x, source_y, source_w, source_h,~ +** Processing line: ~ # blendmode_enum~ ** Processing line: ~ end~ ** Processing line: ~ end~ ** Processing line: ~~ @@ -195948,6 +206168,11 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ def tick args~ ** Processing line: ~ # sets console command when sample app initially opens~ ** Processing line: ~ if Kernel.global_tick_count == 0~ +** Processing line: ~ puts ""~ +** Processing line: ~ puts ""~ +** Processing line: ~ puts "========================================================="~ +** Processing line: ~ puts "* INFO: Static Sprites, Classes, Draw Override"~ +** Processing line: ~ puts "* INFO: Please specify the number of sprites to render."~ ** Processing line: ~ args.gtk.console.set_command "reset_with count: 100"~ ** Processing line: ~ end~ ** Processing line: ~~ @@ -196165,6 +206390,70 @@ Follows is a source code listing for all files that have been open sourced. This - PRE end detected. ** Processing line: ~~ ** Processing line: ~~ +** Processing line: ~*** Advanced Debugging - Unit Tests - benchmark_api_tests.rb~ +- H3 detected. +- Determining if line is a header. +- Line contains ~*** ~... gsub-ing empty string +- Formatting line: ~Advanced Debugging - Unit Tests - benchmark_api_tests.rb~ +- Line's tilde count is: 0 +- Line contains link marker: false +- Determining if line is a header. +- Line contains ~*** ~... gsub-ing empty string +- Formatting line: ~Advanced Debugging - Unit Tests - benchmark_api_tests.rb~ +- Line's tilde count is: 0 +- Line contains link marker: false +** Processing line: ~~ +** Processing line: ~#+begin_src ruby~ +- PRE start detected. +** Processing line: ~ # ./samples/10_advanced_debugging/03_unit_tests/benchmark_api_tests.rb~ +** Processing line: ~ def test_benchmark_api args, assert~ +** Processing line: ~ result = args.gtk.benchmark iterations: 100,~ +** Processing line: ~ only_one: -> () {~ +** Processing line: ~ r = 0~ +** Processing line: ~ (1..100).each do |i|~ +** Processing line: ~ r += 1~ +** Processing line: ~ end~ +** Processing line: ~ }~ +** Processing line: ~~ +** Processing line: ~ assert.equal! result.first_place.name, :only_one~ +** Processing line: ~~ +** Processing line: ~ result = args.gtk.benchmark iterations: 100,~ +** Processing line: ~ iterations_100: -> () {~ +** Processing line: ~ r = 0~ +** Processing line: ~ (1..100).each do |i|~ +** Processing line: ~ r += 1~ +** Processing line: ~ end~ +** Processing line: ~ },~ +** Processing line: ~ iterations_50: -> () {~ +** Processing line: ~ r = 0~ +** Processing line: ~ (1..50).each do |i|~ +** Processing line: ~ r += 1~ +** Processing line: ~ end~ +** Processing line: ~ }~ +** Processing line: ~~ +** Processing line: ~ assert.equal! result.first_place.name, :iterations_50~ +** Processing line: ~~ +** Processing line: ~ result = args.gtk.benchmark iterations: 1,~ +** Processing line: ~ iterations_100: -> () {~ +** Processing line: ~ r = 0~ +** Processing line: ~ (1..100).each do |i|~ +** Processing line: ~ r += 1~ +** Processing line: ~ end~ +** Processing line: ~ },~ +** Processing line: ~ iterations_50: -> () {~ +** Processing line: ~ r = 0~ +** Processing line: ~ (1..50).each do |i|~ +** Processing line: ~ r += 1~ +** Processing line: ~ end~ +** Processing line: ~ }~ +** Processing line: ~~ +** Processing line: ~ assert.equal! result.too_small_to_measure, true~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~#+end_src~ +- PRE end detected. +** Processing line: ~~ +** Processing line: ~~ ** Processing line: ~*** Advanced Debugging - Unit Tests - exception_raising_tests.rb~ - H3 detected. - Determining if line is a header. @@ -196805,6 +207094,157 @@ Follows is a source code listing for all files that have been open sourced. This - PRE end detected. ** Processing line: ~~ ** Processing line: ~~ +** Processing line: ~*** Advanced Debugging - Unit Tests - pretty_format_tests.rb~ +- H3 detected. +- Determining if line is a header. +- Line contains ~*** ~... gsub-ing empty string +- Formatting line: ~Advanced Debugging - Unit Tests - pretty_format_tests.rb~ +- Line's tilde count is: 0 +- Line contains link marker: false +- Determining if line is a header. +- Line contains ~*** ~... gsub-ing empty string +- Formatting line: ~Advanced Debugging - Unit Tests - pretty_format_tests.rb~ +- Line's tilde count is: 0 +- Line contains link marker: false +** Processing line: ~~ +** Processing line: ~#+begin_src ruby~ +- PRE start detected. +** Processing line: ~ # ./samples/10_advanced_debugging/03_unit_tests/pretty_format_tests.rb~ +** Processing line: ~ def H opts~ +** Processing line: ~ opts~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def A *opts~ +** Processing line: ~ opts~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def assert_format args, assert, hash, expected~ +** Processing line: ~ actual = args.fn.pretty_format hash~ +** Processing line: ~ assert.are_equal! actual, expected~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def test_pretty_print args, assert~ +** Processing line: ~ # =============================~ +** Processing line: ~ # hash with single value~ +** Processing line: ~ # =============================~ +** Processing line: ~ input = (H first_name: "John")~ +** Processing line: ~ expected = <<-S~ +** Processing line: ~ {:first_name "John"}~ +** Processing line: ~ S~ +** Processing line: ~ (assert_format args, assert, input, expected)~ +** Processing line: ~~ +** Processing line: ~ # =============================~ +** Processing line: ~ # hash with two values~ +** Processing line: ~ # =============================~ +** Processing line: ~ input = (H first_name: "John", last_name: "Smith")~ +** Processing line: ~ expected = <<-S~ +** Processing line: ~ {:first_name "John"~ +** Processing line: ~ :last_name "Smith"}~ +** Processing line: ~ S~ +** Processing line: ~~ +** Processing line: ~ (assert_format args, assert, input, expected)~ +** Processing line: ~~ +** Processing line: ~ # =============================~ +** Processing line: ~ # hash with inner hash~ +** Processing line: ~ # =============================~ +** Processing line: ~ input = (H first_name: "John",~ +** Processing line: ~ last_name: "Smith",~ +** Processing line: ~ middle_initial: "I",~ +** Processing line: ~ so: (H first_name: "Pocahontas",~ +** Processing line: ~ last_name: "Tsenacommacah"),~ +** Processing line: ~ friends: (A (H first_name: "Side", last_name: "Kick"),~ +** Processing line: ~ (H first_name: "Tim", last_name: "Wizard")))~ +** Processing line: ~ expected = <<-S~ +** Processing line: ~ {:first_name "John"~ +** Processing line: ~ :last_name "Smith"~ +** Processing line: ~ :middle_initial "I"~ +** Processing line: ~ :so {:first_name "Pocahontas"~ +** Processing line: ~ :last_name "Tsenacommacah"}~ +** Processing line: ~ :friends [{:first_name "Side"~ +** Processing line: ~ :last_name "Kick"}~ +** Processing line: ~ {:first_name "Tim"~ +** Processing line: ~ :last_name "Wizard"}]}~ +** Processing line: ~ S~ +** Processing line: ~~ +** Processing line: ~ (assert_format args, assert, input, expected)~ +** Processing line: ~~ +** Processing line: ~ # =============================~ +** Processing line: ~ # array with one value~ +** Processing line: ~ # =============================~ +** Processing line: ~ input = (A 1)~ +** Processing line: ~ expected = <<-S~ +** Processing line: ~ [1]~ +** Processing line: ~ S~ +** Processing line: ~ (assert_format args, assert, input, expected)~ +** Processing line: ~~ +** Processing line: ~ # =============================~ +** Processing line: ~ # array with multiple values~ +** Processing line: ~ # =============================~ +** Processing line: ~ input = (A 1, 2, 3)~ +** Processing line: ~ expected = <<-S~ +** Processing line: ~ [1~ +** Processing line: ~ 2~ +** Processing line: ~ 3]~ +** Processing line: ~ S~ +** Processing line: ~ (assert_format args, assert, input, expected)~ +** Processing line: ~~ +** Processing line: ~ # =============================~ +** Processing line: ~ # array with multiple values hashes~ +** Processing line: ~ # =============================~ +** Processing line: ~ input = (A (H first_name: "Side", last_name: "Kick"),~ +** Processing line: ~ (H first_name: "Tim", last_name: "Wizard"))~ +** Processing line: ~ expected = <<-S~ +** Processing line: ~ [{:first_name "Side"~ +** Processing line: ~ :last_name "Kick"}~ +** Processing line: ~ {:first_name "Tim"~ +** Processing line: ~ :last_name "Wizard"}]~ +** Processing line: ~ S~ +** Processing line: ~~ +** Processing line: ~ (assert_format args, assert, input, expected)~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def test_nested_nested args, assert~ +** Processing line: ~ # =============================~ +** Processing line: ~ # nested array in nested hash~ +** Processing line: ~ # =============================~ +** Processing line: ~ input = (H type: :root,~ +** Processing line: ~ text: "Root",~ +** Processing line: ~ children: (A (H level: 1,~ +** Processing line: ~ text: "Level 1",~ +** Processing line: ~ children: (A (H level: 2,~ +** Processing line: ~ text: "Level 2",~ +** Processing line: ~ children: [])))))~ +** Processing line: ~~ +** Processing line: ~ expected = <<-S~ +** Processing line: ~ {:type :root~ +** Processing line: ~ :text "Root"~ +** Processing line: ~ :children [{:level 1~ +** Processing line: ~ :text "Level 1"~ +** Processing line: ~ :children [{:level 2~ +** Processing line: ~ :text "Level 2"~ +** Processing line: ~ :children []}]}]}~ +** Processing line: ~~ +** Processing line: ~ S~ +** Processing line: ~~ +** Processing line: ~ (assert_format args, assert, input, expected)~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def test_scene args, assert~ +** Processing line: ~ script = <<-S~ +** Processing line: ~ * Scene 1~ +** Processing line: ~ ** Narrator~ +** Processing line: ~ They say happy endings don't exist.~ +** Processing line: ~ ** Narrator~ +** Processing line: ~ They say true love is a lie.~ +** Processing line: ~ S~ +** Processing line: ~ input = parse_org args, script~ +** Processing line: ~ puts (args.fn.pretty_format input)~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~#+end_src~ +- PRE end detected. +** Processing line: ~~ +** Processing line: ~~ ** Processing line: ~*** Advanced Debugging - Unit Tests - require_tests.rb~ - H3 detected. - Determining if line is a header. @@ -206876,6 +217316,489 @@ Follows is a source code listing for all files that have been open sourced. This - PRE end detected. ** Processing line: ~~ ** Processing line: ~~ +** Processing line: ~*** Crafting - Farming Game Starting Point - main.rb~ +- H3 detected. +- Determining if line is a header. +- Line contains ~*** ~... gsub-ing empty string +- Formatting line: ~Crafting - Farming Game Starting Point - main.rb~ +- Line's tilde count is: 0 +- Line contains link marker: false +- Determining if line is a header. +- Line contains ~*** ~... gsub-ing empty string +- Formatting line: ~Crafting - Farming Game Starting Point - main.rb~ +- Line's tilde count is: 0 +- Line contains link marker: false +** Processing line: ~~ +** Processing line: ~#+begin_src ruby~ +- PRE start detected. +** Processing line: ~ # ./samples/99_genre_crafting/farming_game_starting_point/app/main.rb~ +** Processing line: ~ def tick args~ +** Processing line: ~ args.state.tile_size = 80~ +** Processing line: ~ args.state.player_speed = 4~ +** Processing line: ~ args.state.player ||= tile(args, 7, 3, 0, 128, 180)~ +** Processing line: ~ generate_map args~ +** Processing line: ~ #press j to plant a green onion~ +** Processing line: ~ if args.inputs.keyboard.j~ +** Processing line: ~ #change this part you can change what you want to plant~ +** Processing line: ~ args.state.walls << tile(args, ((args.state.player.x+80)/args.state.tile_size), ((args.state.player.y)/args.state.tile_size), 255, 255, 255)~ +** Processing line: ~ args.state.plants << tile(args, ((args.state.player.x+80)/args.state.tile_size), ((args.state.player.y+80)/args.state.tile_size), 0, 160, 0)~ +** Processing line: ~ end~ +** Processing line: ~ # Adds walls, background, and player to args.outputs.solids so they appear on screen~ +** Processing line: ~ args.outputs.solids << [0,0,1280,720, 237,189,101]~ +** Processing line: ~ args.outputs.sprites << [0, 0, 1280, 720, 'sprites/background.png']~ +** Processing line: ~ args.outputs.solids << args.state.walls~ +** Processing line: ~ args.outputs.solids << args.state.player~ +** Processing line: ~ args.outputs.solids << args.state.plants~ +** Processing line: ~ args.outputs.labels << [320, 640, "press J to plant", 3, 1, 255, 0, 0, 200]~ +** Processing line: ~~ +** Processing line: ~ move_player args, -1, 0 if args.inputs.keyboard.left # x position decreases by 1 if left key is pressed~ +** Processing line: ~ move_player args, 1, 0 if args.inputs.keyboard.right # x position increases by 1 if right key is pressed~ +** Processing line: ~ move_player args, 0, 1 if args.inputs.keyboard.up # y position increases by 1 if up is pressed~ +** Processing line: ~ move_player args, 0, -1 if args.inputs.keyboard.down # y position decreases by 1 if down is pressed~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ # Sets position, size, and color of the tile~ +** Processing line: ~ def tile args, x, y, *color~ +** Processing line: ~ [x * args.state.tile_size, # sets definition for array using method parameters~ +** Processing line: ~ y * args.state.tile_size, # multiplying by tile_size sets x and y to correct position using pixel values~ +** Processing line: ~ args.state.tile_size,~ +** Processing line: ~ args.state.tile_size,~ +** Processing line: ~ *color]~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ # Creates map by adding tiles to the wall, as well as a goal (that the player needs to reach)~ +** Processing line: ~ def generate_map args~ +** Processing line: ~ return if args.state.area~ +** Processing line: ~~ +** Processing line: ~ # Creates the area of the map. There are 9 rows running horizontally across the screen~ +** Processing line: ~ # and 16 columns running vertically on the screen. Any spot with a "1" is not~ +** Processing line: ~ # open for the player to move into (and is green), and any spot with a "0" is available~ +** Processing line: ~ # for the player to move in.~ +** Processing line: ~ args.state.area = [~ +** Processing line: ~ [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,],~ +** Processing line: ~ [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,],~ +** Processing line: ~ [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,],~ +** Processing line: ~ [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,],~ +** Processing line: ~ [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,],~ +** Processing line: ~ [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,],~ +** Processing line: ~ [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,],~ +** Processing line: ~ [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,],~ +** Processing line: ~ [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ],~ +** Processing line: ~ ].reverse # reverses the order of the area collection~ +** Processing line: ~~ +** Processing line: ~ # By reversing the order, the way that the area appears above is how it appears~ +** Processing line: ~ # on the screen in the game. If we did not reverse, the map would appear inverted.~ +** Processing line: ~~ +** Processing line: ~ #The wall starts off with no tiles.~ +** Processing line: ~ args.state.walls = []~ +** Processing line: ~ args.state.plants = []~ +** Processing line: ~~ +** Processing line: ~ # If v is 1, a green tile is added to args.state.walls.~ +** Processing line: ~ # If v is 2, a black tile is created as the goal.~ +** Processing line: ~ args.state.area.map_2d do |y, x, v|~ +** Processing line: ~ if v == 1~ +** Processing line: ~ args.state.walls << tile(args, x, y, 255, 160, 156) # green tile~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ # Allows the player to move their box around the screen~ +** Processing line: ~ def move_player args, *vector~ +** Processing line: ~ box = args.state.player.shift_rect(vector) # box is able to move at an angle~ +** Processing line: ~~ +** Processing line: ~ # If the player's box hits a wall, it is not able to move further in that direction~ +** Processing line: ~ return if args.state.walls~ +** Processing line: ~ .any_intersect_rect?(box)~ +** Processing line: ~~ +** Processing line: ~ # Player's box is able to move at angles (not just the four general directions) fast~ +** Processing line: ~ args.state.player =~ +** Processing line: ~ args.state.player~ +** Processing line: ~ .shift_rect(vector.x * args.state.player_speed, # if we don't multiply by speed, then~ +** Processing line: ~ vector.y * args.state.player_speed) # the box will move extremely slow~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~#+end_src~ +- PRE end detected. +** Processing line: ~~ +** Processing line: ~~ +** Processing line: ~*** Crafting - Farming Game Starting Point - repl.rb~ +- H3 detected. +- Determining if line is a header. +- Line contains ~*** ~... gsub-ing empty string +- Formatting line: ~Crafting - Farming Game Starting Point - repl.rb~ +- Line's tilde count is: 0 +- Line contains link marker: false +- Determining if line is a header. +- Line contains ~*** ~... gsub-ing empty string +- Formatting line: ~Crafting - Farming Game Starting Point - repl.rb~ +- Line's tilde count is: 0 +- Line contains link marker: false +** Processing line: ~~ +** Processing line: ~#+begin_src ruby~ +- PRE start detected. +** Processing line: ~ # ./samples/99_genre_crafting/farming_game_starting_point/app/repl.rb~ +** Processing line: ~ # ===============================================================~ +** Processing line: ~ # Welcome to repl.rb~ +** Processing line: ~ # ===============================================================~ +** Processing line: ~ # You can experiement with code within this file. Code in this~ +** Processing line: ~ # file is only executed when you save (and only excecuted ONCE).~ +** Processing line: ~ # ===============================================================~ +** Processing line: ~~ +** Processing line: ~ # ===============================================================~ +** Processing line: ~ # REMOVE the "x" from the word "xrepl" and save the file to RUN~ +** Processing line: ~ # the code in between the do/end block delimiters.~ +** Processing line: ~ # ===============================================================~ +** Processing line: ~~ +** Processing line: ~ # ===============================================================~ +** Processing line: ~ # ADD the "x" to the word "repl" (make it xrepl) and save the~ +** Processing line: ~ # file to IGNORE the code in between the do/end block delimiters.~ +** Processing line: ~ # ===============================================================~ +** Processing line: ~~ +** Processing line: ~ # Remove the x from xrepl to run the code. Add the x back to ignore to code.~ +** Processing line: ~ xrepl do~ +** Processing line: ~ puts "The result of 1 + 2 is: #{1 + 2}"~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ # ====================================================================================~ +** Processing line: ~ # Ruby Crash Course:~ +** Processing line: ~ # Strings, Numeric, Booleans, Conditionals, Looping, Enumerables, Arrays~ +** Processing line: ~ # ====================================================================================~ +** Processing line: ~~ +** Processing line: ~ # ====================================================================================~ +** Processing line: ~ # Strings~ +** Processing line: ~ # ====================================================================================~ +** Processing line: ~ # Remove the x from xrepl to run the code. Add the x back to ignore to code.~ +** Processing line: ~ xrepl do~ +** Processing line: ~ message = "Hello World"~ +** Processing line: ~ puts "The value of message is: " + message~ +** Processing line: ~ puts "Any value can be interpolated within a string using \#{}."~ +** Processing line: ~ puts "Interpolated message: #{message}."~ +** Processing line: ~ puts 'This #{message} is not interpolated because the string uses single quotes.'~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ # ====================================================================================~ +** Processing line: ~ # Numerics~ +** Processing line: ~ # ====================================================================================~ +** Processing line: ~ # Remove the x from xrepl to run the code. Add the x back to ignore to code.~ +** Processing line: ~ xrepl do~ +** Processing line: ~ a = 10~ +** Processing line: ~ puts "The value of a is: #{a}"~ +** Processing line: ~ puts "a + 1 is: #{a + 1}"~ +** Processing line: ~ puts "a / 3 is: #{a / 3}"~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ # Remove the x from xrepl to run the code. Add the x back to ignore to code.~ +** Processing line: ~ xrepl do~ +** Processing line: ~ b = 10.12~ +** Processing line: ~ puts "The value of b is: #{b}"~ +** Processing line: ~ puts "b + 1 is: #{b + 1}"~ +** Processing line: ~ puts "b as an integer is: #{b.to_i}"~ +** Processing line: ~ puts ''~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ # ====================================================================================~ +** Processing line: ~ # Booleans~ +** Processing line: ~ # ====================================================================================~ +** Processing line: ~ # Remove the x from xrepl to run the code. Add the x back to ignore to code.~ +** Processing line: ~ xrepl do~ +** Processing line: ~ c = 30~ +** Processing line: ~ puts "The value of c is #{c}."~ +** Processing line: ~~ +** Processing line: ~ if c~ +** Processing line: ~ puts "This if statement ran because c is truthy."~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ # Remove the x from xrepl to run the code. Add the x back to ignore to code.~ +** Processing line: ~ xrepl do~ +** Processing line: ~ d = false~ +** Processing line: ~ puts "The value of d is #{d}."~ +** Processing line: ~~ +** Processing line: ~ if !d~ +** Processing line: ~ puts "This if statement ran because d is falsey, using the not operator (!) makes d evaluate to true."~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ e = nil~ +** Processing line: ~ puts "Nil is also considered falsey. The value of e is: #{e}."~ +** Processing line: ~~ +** Processing line: ~ if !e~ +** Processing line: ~ puts "This if statement ran because e is nil (a falsey value)."~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ # ====================================================================================~ +** Processing line: ~ # Conditionals~ +** Processing line: ~ # ====================================================================================~ +** Processing line: ~ # Remove the x from xrepl to run the code. Add the x back to ignore to code.~ +** Processing line: ~ xrepl do~ +** Processing line: ~ i_am_true = true~ +** Processing line: ~ i_am_nil = nil~ +** Processing line: ~ i_am_false = false~ +** Processing line: ~ i_am_hi = "hi"~ +** Processing line: ~~ +** Processing line: ~ puts "======== if statement"~ +** Processing line: ~ i_am_one = 1~ +** Processing line: ~ if i_am_one~ +** Processing line: ~ puts "This was printed because i_am_one is truthy."~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ puts "======== if/else statement"~ +** Processing line: ~ if i_am_false~ +** Processing line: ~ puts "This will NOT get printed because i_am_false is false."~ +** Processing line: ~ else~ +** Processing line: ~ puts "This was printed because i_am_false is false."~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ puts "======== if/elsif/else statement"~ +** Processing line: ~ if i_am_false~ +** Processing line: ~ puts "This will NOT get printed because i_am_false is false."~ +** Processing line: ~ elsif i_am_true~ +** Processing line: ~ puts "This was printed because i_am_true is true."~ +** Processing line: ~ else~ +** Processing line: ~ puts "This will NOT get printed i_am_true was true."~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ puts "======== case statement "~ +** Processing line: ~ i_am_one = 1~ +** Processing line: ~ case i_am_one~ +** Processing line: ~ when 10~ +** Processing line: ~ puts "case equaled: 10"~ +** Processing line: ~ when 9~ +** Processing line: ~ puts "case equaled: 9"~ +** Processing line: ~ when 5~ +** Processing line: ~ puts "case equaled: 5"~ +** Processing line: ~ when 1~ +** Processing line: ~ puts "case equaled: 1"~ +** Processing line: ~ else~ +** Processing line: ~ puts "Value wasn't cased."~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ puts "======== different types of comparisons"~ +** Processing line: ~ if 4 == 4~ +** Processing line: ~ puts "equal (4 == 4)"~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ if 4 != 3~ +** Processing line: ~ puts "not equal (4 != 3)"~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ if 3 < 4~ +** Processing line: ~ puts "less than (3 < 4)"~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ if 4 > 3~ +** Processing line: ~ puts "greater than (4 > 3)"~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ if ((4 > 3) || (3 < 4) || false)~ +** Processing line: ~ puts "or statement ((4 > 3) || (3 < 4) || false)"~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ if ((4 > 3) && (3 < 4))~ +** Processing line: ~ puts "and statement ((4 > 3) && (3 < 4))"~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ # ====================================================================================~ +** Processing line: ~ # Looping~ +** Processing line: ~ # ====================================================================================~ +** Processing line: ~ # Remove the x from xrepl to run the code. Add the x back to ignore to code.~ +** Processing line: ~ xrepl do~ +** Processing line: ~ puts "======== times block"~ +** Processing line: ~ 3.times do |i|~ +** Processing line: ~ puts i~ +** Processing line: ~ end~ +** Processing line: ~ puts "======== range block exclusive"~ +** Processing line: ~ (0...3).each do |i|~ +** Processing line: ~ puts i~ +** Processing line: ~ end~ +** Processing line: ~ puts "======== range block inclusive"~ +** Processing line: ~ (0..3).each do |i|~ +** Processing line: ~ puts i~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ # ====================================================================================~ +** Processing line: ~ # Enumerables~ +** Processing line: ~ # ====================================================================================~ +** Processing line: ~ # Remove the x from xrepl to run the code. Add the x back to ignore to code.~ +** Processing line: ~ xrepl do~ +** Processing line: ~ puts "======== array each"~ +** Processing line: ~ colors = ["red", "blue", "yellow"]~ +** Processing line: ~ colors.each do |color|~ +** Processing line: ~ puts color~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ puts '======== array each_with_index'~ +** Processing line: ~ colors = ["red", "blue", "yellow"]~ +** Processing line: ~ colors.each_with_index do |color, i|~ +** Processing line: ~ puts "#{color} at index #{i}"~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ # Remove the x from xrepl to run the code. Add the x back to ignore to code.~ +** Processing line: ~ xrepl do~ +** Processing line: ~ puts "======== single parameter function"~ +** Processing line: ~ def add_one_to n~ +** Processing line: ~ n + 5~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ puts add_one_to(3)~ +** Processing line: ~~ +** Processing line: ~ puts "======== function with default value"~ +** Processing line: ~ def function_with_default_value v = 10~ +** Processing line: ~ v * 10~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ puts "passing three: #{function_with_default_value(3)}"~ +** Processing line: ~ puts "passing nil: #{function_with_default_value}"~ +** Processing line: ~~ +** Processing line: ~ puts "======== Or Equal (||=) operator for nil values"~ +** Processing line: ~ def function_with_nil_default_with_local a = nil~ +** Processing line: ~ result = a~ +** Processing line: ~ result ||= "or equal operator was exected and set a default value"~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ puts "passing 'hi': #{function_with_nil_default_with_local 'hi'}"~ +** Processing line: ~ puts "passing nil: #{function_with_nil_default_with_local}"~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ # ====================================================================================~ +** Processing line: ~ # Arrays~ +** Processing line: ~ # ====================================================================================~ +** Processing line: ~ # Remove the x from xrepl to run the code. Add the x back to ignore to code.~ +** Processing line: ~ xrepl do~ +** Processing line: ~ puts "======== Create an array with the numbers 1 to 10."~ +** Processing line: ~ one_to_ten = (1..10).to_a~ +** Processing line: ~ puts one_to_ten~ +** Processing line: ~~ +** Processing line: ~ puts "======== Create a new array that only contains even numbers from the previous array."~ +** Processing line: ~ one_to_ten = (1..10).to_a~ +** Processing line: ~ evens = one_to_ten.find_all do |number|~ +** Processing line: ~ number % 2 == 0~ +** Processing line: ~ end~ +** Processing line: ~ puts evens~ +** Processing line: ~~ +** Processing line: ~ puts "======== Create a new array that rejects odd numbers."~ +** Processing line: ~ one_to_ten = (1..10).to_a~ +** Processing line: ~ also_even = one_to_ten.reject do |number|~ +** Processing line: ~ number % 2 != 0~ +** Processing line: ~ end~ +** Processing line: ~ puts also_even~ +** Processing line: ~~ +** Processing line: ~ puts "======== Create an array that doubles every number."~ +** Processing line: ~ one_to_ten = (1..10).to_a~ +** Processing line: ~ doubled = one_to_ten.map do |number|~ +** Processing line: ~ number * 2~ +** Processing line: ~ end~ +** Processing line: ~ puts doubled~ +** Processing line: ~~ +** Processing line: ~ puts "======== Create an array that selects only odd numbers and then multiply those by 10."~ +** Processing line: ~ one_to_ten = (1..10).to_a~ +** Processing line: ~ odd_doubled = one_to_ten.find_all do |number|~ +** Processing line: ~ number % 2 != 0~ +** Processing line: ~ end.map do |odd_number|~ +** Processing line: ~ odd_number * 10~ +** Processing line: ~ end~ +** Processing line: ~ puts odd_doubled~ +** Processing line: ~~ +** Processing line: ~ puts "======== All combination of numbers 1 to 10."~ +** Processing line: ~ one_to_ten = (1..10).to_a~ +** Processing line: ~ all_combinations = one_to_ten.product(one_to_ten)~ +** Processing line: ~ puts all_combinations~ +** Processing line: ~~ +** Processing line: ~ puts "======== All uniq combinations of numbers. For example: [1, 2] is the same as [2, 1]."~ +** Processing line: ~ one_to_ten = (1..10).to_a~ +** Processing line: ~ uniq_combinations =~ +** Processing line: ~ one_to_ten.product(one_to_ten)~ +** Processing line: ~ .map do |unsorted_number|~ +** Processing line: ~ unsorted_number.sort~ +** Processing line: ~ end.uniq~ +** Processing line: ~ puts uniq_combinations~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ # ====================================================================================~ +** Processing line: ~ # Advanced Arrays~ +** Processing line: ~ # ====================================================================================~ +** Processing line: ~ # Remove the x from xrepl to run the code. Add the x back to ignore to code.~ +** Processing line: ~ xrepl do~ +** Processing line: ~ puts "======== All unique Pythagorean Triples between 1 and 40 sorted by area of the triangle."~ +** Processing line: ~~ +** Processing line: ~ one_to_hundred = (1..40).to_a~ +** Processing line: ~ triples =~ +** Processing line: ~ one_to_hundred.product(one_to_hundred).map do |width, height|~ +** Processing line: ~ [width, height, Math.sqrt(width ** 2 + height ** 2)]~ +** Processing line: ~ end.find_all do |_, _, hypotenuse|~ +** Processing line: ~ hypotenuse.to_i == hypotenuse~ +** Processing line: ~ end.map do |triangle|~ +** Processing line: ~ triangle.map(&:to_i)~ +** Processing line: ~ end.uniq do |triangle|~ +** Processing line: ~ triangle.sort~ +** Processing line: ~ end.map do |width, height, hypotenuse|~ +** Processing line: ~ [width, height, hypotenuse, (width * height) / 2]~ +** Processing line: ~ end.sort_by do |_, _, _, area|~ +** Processing line: ~ area~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ triples.each do |width, height, hypotenuse, area|~ +** Processing line: ~ puts "(#{width}, #{height}, #{hypotenuse}) = #{area}"~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~#+end_src~ +- PRE end detected. +** Processing line: ~~ +** Processing line: ~~ +** Processing line: ~*** Crafting - Farming Game Starting Point - tests.rb~ +- H3 detected. +- Determining if line is a header. +- Line contains ~*** ~... gsub-ing empty string +- Formatting line: ~Crafting - Farming Game Starting Point - tests.rb~ +- Line's tilde count is: 0 +- Line contains link marker: false +- Determining if line is a header. +- Line contains ~*** ~... gsub-ing empty string +- Formatting line: ~Crafting - Farming Game Starting Point - tests.rb~ +- Line's tilde count is: 0 +- Line contains link marker: false +** Processing line: ~~ +** Processing line: ~#+begin_src ruby~ +- PRE start detected. +** Processing line: ~ # ./samples/99_genre_crafting/farming_game_starting_point/app/tests.rb~ +** Processing line: ~ # For advanced users:~ +** Processing line: ~ # You can put some quick verification tests here, any method~ +** Processing line: ~ # that starts with the `test_` will be run when you save this file.~ +** Processing line: ~~ +** Processing line: ~ # Here is an example test and game~ +** Processing line: ~~ +** Processing line: ~ # To run the test: ./dragonruby mygame --eval app/tests.rb --no-tick~ +** Processing line: ~~ +** Processing line: ~ class MySuperHappyFunGame~ +** Processing line: ~ attr_gtk~ +** Processing line: ~~ +** Processing line: ~ def tick~ +** Processing line: ~ outputs.solids << [100, 100, 300, 300]~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def test_universe args, assert~ +** Processing line: ~ game = MySuperHappyFunGame.new~ +** Processing line: ~ game.args = args~ +** Processing line: ~ game.tick~ +** Processing line: ~ assert.true! args.outputs.solids.length == 1, "failure: a solid was not added after tick"~ +** Processing line: ~ assert.false! 1 == 2, "failure: some how, 1 equals 2, the world is ending"~ +** Processing line: ~ puts "test_universe completed successfully"~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ puts "running tests"~ +** Processing line: ~ $gtk.reset 100~ +** Processing line: ~ $gtk.log_level = :off~ +** Processing line: ~ $gtk.tests.start~ +** Processing line: ~~ +** Processing line: ~#+end_src~ +- PRE end detected. +** Processing line: ~~ +** Processing line: ~~ ** Processing line: ~*** Dev Tools - Add Buttons To Console - main.rb~ - H3 detected. - Determining if line is a header. @@ -207074,12 +217997,12 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ label = { x: b.x + state.buttons_frame_selection.size.half,~ ** Processing line: ~ y: b.y,~ ** Processing line: ~ text: "#{i + 1}", r: 180, g: 180, b: 180,~ -** Processing line: ~ size_enum: -4, alignment_enum: 1 }.label~ +** Processing line: ~ size_enum: -4, alignment_enum: 1 }.label!~ ** Processing line: ~~ -** Processing line: ~ selection_border = b.merge(r: 40, g: 40, b: 40).border~ +** Processing line: ~ selection_border = b.merge(r: 40, g: 40, b: 40).border!~ ** Processing line: ~~ ** Processing line: ~ if i == state.animation_frames_selected_index~ -** Processing line: ~ selection_border = b.merge(r: 40, g: 230, b: 200).border~ +** Processing line: ~ selection_border = b.merge(r: 40, g: 230, b: 200).border!~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ [selection_border, label]~ @@ -207833,6 +218756,558 @@ Follows is a source code listing for all files that have been open sourced. This - PRE end detected. ** Processing line: ~~ ** Processing line: ~~ +** Processing line: ~*** Dungeon Crawl - Classics Jam - main.rb~ +- H3 detected. +- Determining if line is a header. +- Line contains ~*** ~... gsub-ing empty string +- Formatting line: ~Dungeon Crawl - Classics Jam - main.rb~ +- Line's tilde count is: 0 +- Line contains link marker: false +- Determining if line is a header. +- Line contains ~*** ~... gsub-ing empty string +- Formatting line: ~Dungeon Crawl - Classics Jam - main.rb~ +- Line's tilde count is: 0 +- Line contains link marker: false +** Processing line: ~~ +** Processing line: ~#+begin_src ruby~ +- PRE start detected. +** Processing line: ~ # ./samples/99_genre_dungeon_crawl/classics_jam/app/main.rb~ +** Processing line: ~ class Game~ +** Processing line: ~ attr_gtk~ +** Processing line: ~~ +** Processing line: ~ def tick~ +** Processing line: ~ defaults~ +** Processing line: ~ render~ +** Processing line: ~ input~ +** Processing line: ~ calc~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def defaults~ +** Processing line: ~ player.x ||= 640~ +** Processing line: ~ player.y ||= 360~ +** Processing line: ~ player.w ||= 16~ +** Processing line: ~ player.h ||= 16~ +** Processing line: ~ player.attacked_at ||= -1~ +** Processing line: ~ player.angle ||= 0~ +** Processing line: ~ player.future_player ||= future_player_position 0, 0~ +** Processing line: ~ player.projectiles ||= []~ +** Processing line: ~ player.damage ||= 0~ +** Processing line: ~ state.level ||= create_level level_one_template~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def render~ +** Processing line: ~ outputs.sprites << level.walls.map do |w|~ +** Processing line: ~ w.merge(path: 'sprites/square/gray.png')~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ outputs.sprites << level.spawn_locations.map do |s|~ +** Processing line: ~ s.merge(path: 'sprites/square/blue.png')~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ outputs.sprites << player.projectiles.map do |p|~ +** Processing line: ~ p.merge(path: 'sprites/square/blue.png')~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ outputs.sprites << level.enemies.map do |e|~ +** Processing line: ~ e.merge(path: 'sprites/square/red.png')~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ outputs.sprites << player.merge(path: 'sprites/circle/green.png', angle: player.angle)~ +** Processing line: ~~ +** Processing line: ~ outputs.labels << { x: 30, y: 30.from_top, text: "damage: #{player.damage || 0}" }~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def input~ +** Processing line: ~ player.angle = inputs.directional_angle || player.angle~ +** Processing line: ~ if inputs.controller_one.key_down.a || inputs.keyboard.key_down.space~ +** Processing line: ~ player.attacked_at = state.tick_count~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def calc~ +** Processing line: ~ calc_player~ +** Processing line: ~ calc_projectiles~ +** Processing line: ~ calc_enemies~ +** Processing line: ~ calc_spawn_locations~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def calc_player~ +** Processing line: ~ if player.attacked_at == state.tick_count~ +** Processing line: ~ player.projectiles << { at: state.tick_count,~ +** Processing line: ~ x: player.x,~ +** Processing line: ~ y: player.y,~ +** Processing line: ~ angle: player.angle,~ +** Processing line: ~ w: 4,~ +** Processing line: ~ h: 4 }.center_inside_rect(player)~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ if player.attacked_at.elapsed_time > 5~ +** Processing line: ~ future_player = future_player_position inputs.left_right * 2, inputs.up_down * 2~ +** Processing line: ~ future_player_collision = future_collision player, future_player, level.walls~ +** Processing line: ~ player.x = future_player_collision.x if !future_player_collision.dx_collision~ +** Processing line: ~ player.y = future_player_collision.y if !future_player_collision.dy_collision~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def calc_projectile_collisions entities~ +** Processing line: ~ entities.each do |e|~ +** Processing line: ~ e.damage ||= 0~ +** Processing line: ~ player.projectiles.each do |p|~ +** Processing line: ~ if !p.collided && (p.intersect_rect? e)~ +** Processing line: ~ p.collided = true~ +** Processing line: ~ e.damage += 1~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def calc_projectiles~ +** Processing line: ~ player.projectiles.map! do |p|~ +** Processing line: ~ dx, dy = p.angle.vector 10~ +** Processing line: ~ p.merge(x: p.x + dx, y: p.y + dy)~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ calc_projectile_collisions level.walls + level.enemies + level.spawn_locations~ +** Processing line: ~ player.projectiles.reject! { |p| p.at.elapsed_time > 10000 }~ +** Processing line: ~ player.projectiles.reject! { |p| p.collided }~ +** Processing line: ~ level.enemies.reject! { |e| e.damage > e.hp }~ +** Processing line: ~ level.spawn_locations.reject! { |s| s.damage > s.hp }~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def calc_enemies~ +** Processing line: ~ level.enemies.map! do |e|~ +** Processing line: ~ dx = 0~ +** Processing line: ~ dx = 1 if e.x < player.x~ +** Processing line: ~ dx = -1 if e.x > player.x~ +** Processing line: ~ dy = 0~ +** Processing line: ~ dy = 1 if e.y < player.y~ +** Processing line: ~ dy = -1 if e.y > player.y~ +** Processing line: ~ future_e = future_entity_position dx, dy, e~ +** Processing line: ~ future_e_collision = future_collision e, future_e, level.enemies + level.walls~ +** Processing line: ~ e.next_x = e.x~ +** Processing line: ~ e.next_y = e.y~ +** Processing line: ~ e.next_x = future_e_collision.x if !future_e_collision.dx_collision~ +** Processing line: ~ e.next_y = future_e_collision.y if !future_e_collision.dy_collision~ +** Processing line: ~ e~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ level.enemies.map! do |e|~ +** Processing line: ~ e.x = e.next_x~ +** Processing line: ~ e.y = e.next_y~ +** Processing line: ~ e~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ level.enemies.each do |e|~ +** Processing line: ~ player.damage += 1 if e.intersect_rect? player~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def calc_spawn_locations~ +** Processing line: ~ level.spawn_locations.map! do |s|~ +** Processing line: ~ s.merge(countdown: s.countdown - 1)~ +** Processing line: ~ end~ +** Processing line: ~ level.spawn_locations~ +** Processing line: ~ .find_all { |s| s.countdown.neg? }~ +** Processing line: ~ .each do |s|~ +** Processing line: ~ s.countdown = s.rate~ +** Processing line: ~ s.merge(countdown: s.rate)~ +** Processing line: ~ new_enemy = create_enemy s~ +** Processing line: ~ if !(level.enemies.find { |e| e.intersect_rect? new_enemy })~ +** Processing line: ~ level.enemies << new_enemy~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def create_enemy spawn_location~ +** Processing line: ~ to_cell(spawn_location.ordinal_x, spawn_location.ordinal_y).merge hp: 2~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def create_level level_template~ +** Processing line: ~ {~ +** Processing line: ~ walls: level_template.walls.map { |w| to_cell(w.ordinal_x, w.ordinal_y).merge(w) },~ +** Processing line: ~ enemies: [],~ +** Processing line: ~ spawn_locations: level_template.spawn_locations.map { |s| to_cell(s.ordinal_x, s.ordinal_y).merge(s) }~ +** Processing line: ~ }~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def level_one_template~ +** Processing line: ~ {~ +** Processing line: ~ walls: [{ ordinal_x: 25, ordinal_y: 20},~ +** Processing line: ~ { ordinal_x: 25, ordinal_y: 21},~ +** Processing line: ~ { ordinal_x: 25, ordinal_y: 22},~ +** Processing line: ~ { ordinal_x: 25, ordinal_y: 23}],~ +** Processing line: ~ spawn_locations: [{ ordinal_x: 10, ordinal_y: 10, rate: 120, countdown: 0, hp: 5 }]~ +** Processing line: ~ }~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def player~ +** Processing line: ~ state.player ||= {}~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def level~ +** Processing line: ~ state.level ||= {}~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def future_collision entity, future_entity, others~ +** Processing line: ~ dx_collision = others.find { |o| o != entity && (o.intersect_rect? future_entity.dx) }~ +** Processing line: ~ dy_collision = others.find { |o| o != entity && (o.intersect_rect? future_entity.dy) }~ +** Processing line: ~~ +** Processing line: ~ {~ +** Processing line: ~ dx_collision: dx_collision,~ +** Processing line: ~ x: future_entity.dx.x,~ +** Processing line: ~ dy_collision: dy_collision,~ +** Processing line: ~ y: future_entity.dy.y~ +** Processing line: ~ }~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def future_entity_position dx, dy, entity~ +** Processing line: ~ {~ +** Processing line: ~ dx: entity.merge(x: entity.x + dx),~ +** Processing line: ~ dy: entity.merge(y: entity.y + dy),~ +** Processing line: ~ both: entity.merge(x: entity.x + dx, y: entity.y + dy)~ +** Processing line: ~ }~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def future_player_position dx, dy~ +** Processing line: ~ future_entity_position dx, dy, player~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def to_cell ordinal_x, ordinal_y~ +** Processing line: ~ { x: ordinal_x * 16, y: ordinal_y * 16, w: 16, h: 16 }~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def tick args~ +** Processing line: ~ $game ||= Game.new~ +** Processing line: ~ $game.args = args~ +** Processing line: ~ $game.tick~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ $gtk.reset~ +** Processing line: ~ $game = nil~ +** Processing line: ~~ +** Processing line: ~#+end_src~ +- PRE end detected. +** Processing line: ~~ +** Processing line: ~~ +** Processing line: ~*** Fighting - Special Move Inputs - main.rb~ +- H3 detected. +- Determining if line is a header. +- Line contains ~*** ~... gsub-ing empty string +- Formatting line: ~Fighting - Special Move Inputs - main.rb~ +- Line's tilde count is: 0 +- Line contains link marker: false +- Determining if line is a header. +- Line contains ~*** ~... gsub-ing empty string +- Formatting line: ~Fighting - Special Move Inputs - main.rb~ +- Line's tilde count is: 0 +- Line contains link marker: false +** Processing line: ~~ +** Processing line: ~#+begin_src ruby~ +- PRE start detected. +** Processing line: ~ # ./samples/99_genre_fighting/01_special_move_inputs/app/main.rb~ +** Processing line: ~ def tick args~ +** Processing line: ~ #tick_instructions args, "Use LEFT and RIGHT arrow keys to move and SPACE to jump."~ +** Processing line: ~ defaults args~ +** Processing line: ~ render args~ +** Processing line: ~ input args~ +** Processing line: ~ calc args~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ # sets default values and creates empty collections~ +** Processing line: ~ # initialization only happens in the first frame~ +** Processing line: ~ def defaults args~ +** Processing line: ~ fiddle args~ +** Processing line: ~~ +** Processing line: ~ args.state.tick_count = args.state.tick_count~ +** Processing line: ~ args.state.bridge_top = 128~ +** Processing line: ~ args.state.player.x ||= 0 # initializes player's properties~ +** Processing line: ~ args.state.player.y ||= args.state.bridge_top~ +** Processing line: ~ args.state.player.w ||= 64~ +** Processing line: ~ args.state.player.h ||= 64~ +** Processing line: ~ args.state.player.dy ||= 0~ +** Processing line: ~ args.state.player.dx ||= 0~ +** Processing line: ~ args.state.player.r ||= 0~ +** Processing line: ~ args.state.game_over_at ||= 0~ +** Processing line: ~ args.state.animation_time ||=0~ +** Processing line: ~~ +** Processing line: ~ args.state.timeleft ||=0~ +** Processing line: ~ args.state.timeright ||=0~ +** Processing line: ~ args.state.lastpush ||=0~ +** Processing line: ~~ +** Processing line: ~ args.state.inputlist ||= ["j","k","l"]~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ # sets enemy, player, hammer values~ +** Processing line: ~ def fiddle args~ +** Processing line: ~ args.state.gravity = -0.5~ +** Processing line: ~ args.state.player_jump_power = 10 # sets player values~ +** Processing line: ~ args.state.player_jump_power_duration = 5~ +** Processing line: ~ args.state.player_max_run_speed = 20~ +** Processing line: ~ args.state.player_speed_slowdown_rate = 0.9~ +** Processing line: ~ args.state.player_acceleration = 0.9~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ # outputs objects onto the screen~ +** Processing line: ~ def render args~ +** Processing line: ~ if (args.state.player.dx < 0.01) && (args.state.player.dx > -0.01)~ +** Processing line: ~ args.state.player.dx = 0~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ #move list~ +** Processing line: ~ (args.layout.rect_group row: 0, col_from_right: 8, drow: 0.3,~ +** Processing line: ~ merge: { vertical_alignment_enum: 0, size_enum: -2 },~ +** Processing line: ~ group: [~ +** Processing line: ~ { text: "move: WASD" },~ +** Processing line: ~ { text: "jump: Space" },~ +** Processing line: ~ { text: "attack forwards: J (while on ground" },~ +** Processing line: ~ { text: "attack upwards: K (while on groud)" },~ +** Processing line: ~ { text: "attack backwards: J (while on ground and holding A)" },~ +** Processing line: ~ { text: "attack downwards: K (while in air)" },~ +** Processing line: ~ { text: "dash attack: J, K in quick succession." },~ +** Processing line: ~ { text: "shield: hold J, K at the same time." },~ +** Processing line: ~ { text: "dash backwards: A, A in quick succession." },~ +** Processing line: ~ ]).into args.outputs.labels~ +** Processing line: ~~ +** Processing line: ~ # registered moves~ +** Processing line: ~ args.outputs.labels << { x: 0.to_layout_col,~ +** Processing line: ~ y: 0.to_layout_row,~ +** Processing line: ~ text: "input history",~ +** Processing line: ~ size_enum: -2,~ +** Processing line: ~ vertical_alignment_enum: 0 }~ +** Processing line: ~~ +** Processing line: ~ (args.state.inputlist.take(5)).map do |s|~ +** Processing line: ~ { text: s, size_enum: -2, vertical_alignment_enum: 0 }~ +** Processing line: ~ end.yield_self do |group|~ +** Processing line: ~ (args.layout.rect_group row: 0.3, col: 0, drow: 0.3, group: group).into args.outputs.labels~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~~ +** Processing line: ~ #sprites~ +** Processing line: ~ player = [args.state.player.x, args.state.player.y,~ +** Processing line: ~ args.state.player.w, args.state.player.h,~ +** Processing line: ~ "sprites/square/white.png",~ +** Processing line: ~ args.state.player.r]~ +** Processing line: ~~ +** Processing line: ~ playershield = [args.state.player.x - 20, args.state.player.y - 10,~ +** Processing line: ~ args.state.player.w + 20, args.state.player.h + 20,~ +** Processing line: ~ "sprites/square/blue.png",~ +** Processing line: ~ args.state.player.r,~ +** Processing line: ~ 0]~ +** Processing line: ~~ +** Processing line: ~ playerjab = [args.state.player.x + 32, args.state.player.y,~ +** Processing line: ~ args.state.player.w, args.state.player.h,~ +** Processing line: ~ "sprites/isometric/indigo.png",~ +** Processing line: ~ args.state.player.r,~ +** Processing line: ~ 0]~ +** Processing line: ~~ +** Processing line: ~ playerupper = [args.state.player.x, args.state.player.y + 32,~ +** Processing line: ~ args.state.player.w, args.state.player.h,~ +** Processing line: ~ "sprites/isometric/indigo.png",~ +** Processing line: ~ args.state.player.r+90,~ +** Processing line: ~ 0]~ +** Processing line: ~~ +** Processing line: ~ if ((args.state.tick_count - args.state.lastpush) <= 15)~ +** Processing line: ~ if (args.state.inputlist[0] == "<<")~ +** Processing line: ~ player = [args.state.player.x, args.state.player.y,~ +** Processing line: ~ args.state.player.w, args.state.player.h,~ +** Processing line: ~ "sprites/square/yellow.png", args.state.player.r]~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ if (args.state.inputlist[0] == "shield")~ +** Processing line: ~ player = [args.state.player.x, args.state.player.y,~ +** Processing line: ~ args.state.player.w, args.state.player.h,~ +** Processing line: ~ "sprites/square/indigo.png", args.state.player.r]~ +** Processing line: ~~ +** Processing line: ~ playershield = [args.state.player.x - 10, args.state.player.y - 10,~ +** Processing line: ~ args.state.player.w + 20, args.state.player.h + 20,~ +** Processing line: ~ "sprites/square/blue.png", args.state.player.r, 50]~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ if (args.state.inputlist[0] == "back-attack")~ +** Processing line: ~ playerjab = [args.state.player.x - 20, args.state.player.y,~ +** Processing line: ~ args.state.player.w - 10, args.state.player.h,~ +** Processing line: ~ "sprites/isometric/indigo.png", args.state.player.r, 255]~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ if (args.state.inputlist[0] == "forward-attack")~ +** Processing line: ~ playerjab = [args.state.player.x + 32, args.state.player.y,~ +** Processing line: ~ args.state.player.w, args.state.player.h,~ +** Processing line: ~ "sprites/isometric/indigo.png", args.state.player.r, 255]~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ if (args.state.inputlist[0] == "up-attack")~ +** Processing line: ~ playerupper = [args.state.player.x, args.state.player.y + 32,~ +** Processing line: ~ args.state.player.w, args.state.player.h,~ +** Processing line: ~ "sprites/isometric/indigo.png", args.state.player.r + 90, 255]~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ if (args.state.inputlist[0] == "dair")~ +** Processing line: ~ playerupper = [args.state.player.x, args.state.player.y - 32,~ +** Processing line: ~ args.state.player.w, args.state.player.h,~ +** Processing line: ~ "sprites/isometric/indigo.png", args.state.player.r + 90, 255]~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ if (args.state.inputlist[0] == "dash-attack")~ +** Processing line: ~ playerupper = [args.state.player.x, args.state.player.y + 32,~ +** Processing line: ~ args.state.player.w, args.state.player.h,~ +** Processing line: ~ "sprites/isometric/violet.png", args.state.player.r + 90, 255]~ +** Processing line: ~~ +** Processing line: ~ playerjab = [args.state.player.x + 32, args.state.player.y,~ +** Processing line: ~ args.state.player.w, args.state.player.h,~ +** Processing line: ~ "sprites/isometric/violet.png", args.state.player.r, 255]~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ args.outputs.sprites << playerjab~ +** Processing line: ~ args.outputs.sprites << playerupper~ +** Processing line: ~ args.outputs.sprites << player~ +** Processing line: ~ args.outputs.sprites << playershield~ +** Processing line: ~~ +** Processing line: ~ args.outputs.solids << 20.map_with_index do |i| # uses 20 squares to form bridge~ +** Processing line: ~ [i * 64, args.state.bridge_top - 64, 64, 64]~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ # Performs calculations to move objects on the screen~ +** Processing line: ~ def calc args~ +** Processing line: ~ # Since velocity is the change in position, the change in x increases by dx. Same with y and dy.~ +** Processing line: ~ args.state.player.x += args.state.player.dx~ +** Processing line: ~ args.state.player.y += args.state.player.dy~ +** Processing line: ~~ +** Processing line: ~ # Since acceleration is the change in velocity, the change in y (dy) increases every frame~ +** Processing line: ~ args.state.player.dy += args.state.gravity~ +** Processing line: ~~ +** Processing line: ~ # player's y position is either current y position or y position of top of~ +** Processing line: ~ # bridge, whichever has a greater value~ +** Processing line: ~ # ensures that the player never goes below the bridge~ +** Processing line: ~ args.state.player.y = args.state.player.y.greater(args.state.bridge_top)~ +** Processing line: ~~ +** Processing line: ~ # player's x position is either the current x position or 0, whichever has a greater value~ +** Processing line: ~ # ensures that the player doesn't go too far left (out of the screen's scope)~ +** Processing line: ~ args.state.player.x = args.state.player.x.greater(0)~ +** Processing line: ~~ +** Processing line: ~ # player is not falling if it is located on the top of the bridge~ +** Processing line: ~ args.state.player.falling = false if args.state.player.y == args.state.bridge_top~ +** Processing line: ~ #args.state.player.rect = [args.state.player.x, args.state.player.y, args.state.player.h, args.state.player.w] # sets definition for player~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ # Resets the player by changing its properties back to the values they had at initialization~ +** Processing line: ~ def reset_player args~ +** Processing line: ~ args.state.player.x = 0~ +** Processing line: ~ args.state.player.y = args.state.bridge_top~ +** Processing line: ~ args.state.player.dy = 0~ +** Processing line: ~ args.state.player.dx = 0~ +** Processing line: ~ args.state.enemy.hammers.clear # empties hammer collection~ +** Processing line: ~ args.state.enemy.hammer_queue.clear # empties hammer_queue~ +** Processing line: ~ args.state.game_over_at = args.state.tick_count # game_over_at set to current frame (or passage of time)~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ # Processes input from the user to move the player~ +** Processing line: ~ def input args~ +** Processing line: ~ if args.state.inputlist.length > 5~ +** Processing line: ~ args.state.inputlist.pop~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ should_process_special_move = (args.inputs.keyboard.key_down.j) ||~ +** Processing line: ~ (args.inputs.keyboard.key_down.k) ||~ +** Processing line: ~ (args.inputs.keyboard.key_down.a) ||~ +** Processing line: ~ (args.inputs.keyboard.key_down.d) ||~ +** Processing line: ~ (args.inputs.controller_one.key_down.y) ||~ +** Processing line: ~ (args.inputs.controller_one.key_down.x) ||~ +** Processing line: ~ (args.inputs.controller_one.key_down.left) ||~ +** Processing line: ~ (args.inputs.controller_one.key_down.right)~ +** Processing line: ~~ +** Processing line: ~ if (should_process_special_move)~ +** Processing line: ~ if (args.inputs.keyboard.key_down.j && args.inputs.keyboard.key_down.k) ||~ +** Processing line: ~ (args.inputs.controller_one.key_down.x && args.inputs.controller_one.key_down.y)~ +** Processing line: ~ args.state.inputlist.unshift("shield")~ +** Processing line: ~ elsif (args.inputs.keyboard.key_down.k || args.inputs.controller_one.key_down.y) &&~ +** Processing line: ~ (args.state.inputlist[0] == "forward-attack") && ((args.state.tick_count - args.state.lastpush) <= 15)~ +** Processing line: ~ args.state.inputlist.unshift("dash-attack")~ +** Processing line: ~ args.state.player.dx = 20~ +** Processing line: ~ elsif (args.inputs.keyboard.key_down.j && args.inputs.keyboard.a) ||~ +** Processing line: ~ (args.inputs.controller_one.key_down.x && args.inputs.controller_one.key_down.left)~ +** Processing line: ~ args.state.inputlist.unshift("back-attack")~ +** Processing line: ~ elsif ( args.inputs.controller_one.key_down.x || args.inputs.keyboard.key_down.j)~ +** Processing line: ~ args.state.inputlist.unshift("forward-attack")~ +** Processing line: ~ elsif (args.inputs.keyboard.key_down.k || args.inputs.controller_one.key_down.y) &&~ +** Processing line: ~ (args.state.player.y > 128)~ +** Processing line: ~ args.state.inputlist.unshift("dair")~ +** Processing line: ~ elsif (args.inputs.keyboard.key_down.k || args.inputs.controller_one.key_down.y)~ +** Processing line: ~ args.state.inputlist.unshift("up-attack")~ +** Processing line: ~ elsif (args.inputs.controller_one.key_down.left || args.inputs.keyboard.key_down.a) &&~ +** Processing line: ~ (args.state.inputlist[0] == "<") &&~ +** Processing line: ~ ((args.state.tick_count - args.state.lastpush) <= 10)~ +** Processing line: ~ args.state.inputlist.unshift("<<")~ +** Processing line: ~ args.state.player.dx = -15~ +** Processing line: ~ elsif (args.inputs.controller_one.key_down.left || args.inputs.keyboard.key_down.a)~ +** Processing line: ~ args.state.inputlist.unshift("<")~ +** Processing line: ~ args.state.timeleft = args.state.tick_count~ +** Processing line: ~ elsif (args.inputs.controller_one.key_down.right || args.inputs.keyboard.key_down.d)~ +** Processing line: ~ args.state.inputlist.unshift(">")~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ args.state.lastpush = args.state.tick_count~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ if args.inputs.keyboard.space || args.inputs.controller_one.r2 # if the user presses the space bar~ +** Processing line: ~ args.state.player.jumped_at ||= args.state.tick_count # jumped_at is set to current frame~ +** Processing line: ~~ +** Processing line: ~ # if the time that has passed since the jump is less than the player's jump duration and~ +** Processing line: ~ # the player is not falling~ +** Processing line: ~ if args.state.player.jumped_at.elapsed_time < args.state.player_jump_power_duration && !args.state.player.falling~ +** Processing line: ~ args.state.player.dy = args.state.player_jump_power # change in y is set to power of player's jump~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ # if the space bar is in the "up" state (or not being pressed down)~ +** Processing line: ~ if args.inputs.keyboard.key_up.space || args.inputs.controller_one.key_up.r2~ +** Processing line: ~ args.state.player.jumped_at = nil # jumped_at is empty~ +** Processing line: ~ args.state.player.falling = true # the player is falling~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ if args.inputs.left # if left key is pressed~ +** Processing line: ~ if args.state.player.dx < -5~ +** Processing line: ~ args.state.player.dx = args.state.player.dx~ +** Processing line: ~ else~ +** Processing line: ~ args.state.player.dx = -5~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ elsif args.inputs.right # if right key is pressed~ +** Processing line: ~ if args.state.player.dx > 5~ +** Processing line: ~ args.state.player.dx = args.state.player.dx~ +** Processing line: ~ else~ +** Processing line: ~ args.state.player.dx = 5~ +** Processing line: ~ end~ +** Processing line: ~ else~ +** Processing line: ~ args.state.player.dx *= args.state.player_speed_slowdown_rate # dx is scaled down~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ if ((args.state.player.dx).abs > 5) #&& ((args.state.tick_count - args.state.lastpush) <= 10)~ +** Processing line: ~ args.state.player.dx *= 0.95~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def tick_instructions args, text, y = 715~ +** Processing line: ~ return if args.state.key_event_occurred~ +** Processing line: ~ if args.inputs.mouse.click ||~ +** Processing line: ~ args.inputs.keyboard.directional_vector ||~ +** Processing line: ~ args.inputs.keyboard.key_down.enter ||~ +** Processing line: ~ args.inputs.keyboard.key_down.space ||~ +** Processing line: ~ args.inputs.keyboard.key_down.escape~ +** Processing line: ~ args.state.key_event_occurred = true~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ args.outputs.debug << [0, y - 50, 1280, 60].solid~ +** Processing line: ~ args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label~ +** Processing line: ~ args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~#+end_src~ +- PRE end detected. +** Processing line: ~~ +** Processing line: ~~ ** Processing line: ~*** Lowrez - Nokia 3310 - main.rb~ - H3 detected. - Determining if line is a header. @@ -208456,7 +219931,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ text: text,~ ** Processing line: ~ size_enum: -1.5,~ ** Processing line: ~ r: 255, g: 255, b: 255~ -** Processing line: ~ }.label~ +** Processing line: ~ }.label!~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ args.outputs.debug << {~ @@ -208466,7 +219941,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ size_enum: -0.5,~ ** Processing line: ~ alignment_enum: 1,~ ** Processing line: ~ r: 255, g: 255, b: 255~ -** Processing line: ~ }.label~ +** Processing line: ~ }.label!~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ def snake_demo args~ @@ -208733,7 +220208,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ g: 240,~ ** Processing line: ~ b: 216,~ ** Processing line: ~ a: 100~ -** Processing line: ~ }.line~ +** Processing line: ~ }.line!~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ (NOKIA_WIDTH + 1).map_with_index do |i|~ @@ -208746,7 +220221,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ g: 240,~ ** Processing line: ~ b: 216,~ ** Processing line: ~ a: 100~ -** Processing line: ~ }.line~ +** Processing line: ~ }.line!~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ @args.state.overlay_rendered = true~ @@ -209528,7 +221003,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ g: 128,~ ** Processing line: ~ b: 128,~ ** Processing line: ~ a: 80~ -** Processing line: ~ }.line~ +** Processing line: ~ }.line!~ ** Processing line: ~~ ** Processing line: ~ args.outputs.static_debug << {~ ** Processing line: ~ x: LOWREZ_X_OFFSET + (i * 10),~ @@ -209539,7 +221014,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ g: 128,~ ** Processing line: ~ b: 128,~ ** Processing line: ~ a: 80~ -** Processing line: ~ }.line~ +** Processing line: ~ }.line!~ ** Processing line: ~ end~ ** Processing line: ~ end~ ** Processing line: ~~ @@ -209566,7 +221041,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ y: 720 - (i * 20),~ ** Processing line: ~ text: text,~ ** Processing line: ~ size_enum: -1.5~ -** Processing line: ~ }.label~ +** Processing line: ~ }.label!~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ args.outputs.debug << {~ @@ -209575,7 +221050,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ text: "INFO: dev mode is currently enabled. Comment out the invocation of ~render_debug~ within the ~tick~ method to hide the debug layer.",~ ** Processing line: ~ size_enum: -0.5,~ ** Processing line: ~ alignment_enum: 1~ -** Processing line: ~ }.label~ +** Processing line: ~ }.label!~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ $gtk.reset~ @@ -218579,58 +230054,21 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ class Args~ ** Processing line: ~ include ArgsDeprecated~ ** Processing line: ~ include Serialize~ -** Processing line: ~~ -** Processing line: ~ # Contains information related to input devices and input events.~ -** Processing line: ~ #~ -** Processing line: ~ # @return [Inputs]~ ** Processing line: ~ attr_accessor :inputs~ -** Processing line: ~~ -** Processing line: ~ # Contains the means to interact with output devices such as the screen.~ -** Processing line: ~ #~ -** Processing line: ~ # @return [Outputs]~ ** Processing line: ~ attr_accessor :outputs~ -** Processing line: ~~ -** Processing line: ~ # Contains the means to interact with the audio mixer.~ -** Processing line: ~ #~ -** Processing line: ~ # @return [Hash]~ ** Processing line: ~ attr_accessor :audio~ -** Processing line: ~~ -** Processing line: ~ # Contains display size information to assist in positioning things on the screen.~ -** Processing line: ~ #~ -** Processing line: ~ # @return [Grid]~ ** Processing line: ~ attr_accessor :grid~ -** Processing line: ~~ -** Processing line: ~ # Provides access to game play recording facilities within Game Toolkit.~ -** Processing line: ~ #~ -** Processing line: ~ # @return [Recording]~ ** Processing line: ~ attr_accessor :recording~ -** Processing line: ~~ -** Processing line: ~ # Gives you access to geometry related functions.~ -** Processing line: ~ #~ -** Processing line: ~ # @return [Geometry]~ ** Processing line: ~ attr_accessor :geometry~ -** Processing line: ~~ ** Processing line: ~ attr_accessor :fn~ -** Processing line: ~~ -** Processing line: ~ # This is where you'll put state associated with your video game.~ -** Processing line: ~ #~ -** Processing line: ~ # @return [OpenEntity]~ ** Processing line: ~ attr_accessor :state~ -** Processing line: ~~ -** Processing line: ~ # Gives you access to the top level DragonRuby runtime.~ -** Processing line: ~ #~ -** Processing line: ~ # @return [Runtime]~ +** Processing line: ~ attr_accessor :temp_state~ ** Processing line: ~ attr_accessor :runtime~ ** Processing line: ~ alias_method :gtk, :runtime~ -** Processing line: ~~ ** Processing line: ~ attr_accessor :passes~ -** Processing line: ~~ ** Processing line: ~ attr_accessor :wizards~ -** Processing line: ~~ ** Processing line: ~ attr_accessor :layout~ -** Processing line: ~~ ** Processing line: ~ attr_accessor :easing~ -** Processing line: ~~ ** Processing line: ~ attr_accessor :string~ ** Processing line: ~~ ** Processing line: ~ def initialize runtime, recording~ @@ -218639,6 +230077,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ @audio = {}~ ** Processing line: ~ @passes = []~ ** Processing line: ~ @state = OpenEntity.new~ +** Processing line: ~ @temp_state = OpenEntity.new~ ** Processing line: ~ @state.tick_count = -1~ ** Processing line: ~ @runtime = runtime~ ** Processing line: ~ @recording = recording~ @@ -218668,11 +230107,12 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~~ ** Processing line: ~ def serialize~ ** Processing line: ~ {~ -** Processing line: ~ state: state.as_hash,~ -** Processing line: ~ inputs: inputs.serialize,~ -** Processing line: ~ passes: passes.serialize,~ -** Processing line: ~ outputs: outputs.serialize,~ -** Processing line: ~ grid: grid.serialize~ +** Processing line: ~ state: state.as_hash,~ +** Processing line: ~ temp_state: temp_state.as_hash,~ +** Processing line: ~ inputs: inputs.serialize,~ +** Processing line: ~ passes: passes.serialize,~ +** Processing line: ~ outputs: outputs.serialize,~ +** Processing line: ~ grid: grid.serialize~ ** Processing line: ~ }~ ** Processing line: ~ end~ ** Processing line: ~~ @@ -218853,10 +230293,10 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~~ ** Processing line: ~ class Assert~ ** Processing line: ~ def custom_assertion actual, expected, message = nil~ -** Processing line: ~ # this tell Game Toolkit that an assertion was performed (so that the test isn't marked inconclusive).~ +** Processing line: ~ # this tells Game Toolkit that an assertion was performed (so that the test isn't marked inconclusive).~ ** Processing line: ~ @assertion_performed = true~ ** Processing line: ~~ -** Processing line: ~ # perform your custom logic here and rais an exception to denote a failure.~ +** Processing line: ~ # perform your custom logic here and raise an exception to denote a failure.~ ** Processing line: ~~ ** Processing line: ~ raise "Some Error. #{message}."~ ** Processing line: ~ end~ @@ -218866,14 +230306,14 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ attr :assertion_performed~ ** Processing line: ~~ ** Processing line: ~ =begin~ -** Processing line: ~ Us this if you are throwing your own exceptions and you want to mark the tests as ran (so that it wont be marked as inconclusive).~ +** Processing line: ~ Use this if you are throwing your own exceptions and you want to mark the tests as ran (so that it wont be marked as inconclusive).~ ** Processing line: ~ =end~ ** Processing line: ~ def ok!~ ** Processing line: ~ @assertion_performed = true~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ =begin~ -** Processing line: ~ Assert if a value is a thruthy value. All assert method take an optional final parameter that is the message to display to the user.~ +** Processing line: ~ Assert if a value is a truthy value. All assert methods take an optional final parameter that is the message to display to the user.~ ** Processing line: ~~ ** Processing line: ~ @example~ ** Processing line: ~~ @@ -218927,7 +230367,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ @assertion_performed = true~ ** Processing line: ~ if actual != expected~ ** Processing line: ~ actual_string = "#{actual}#{actual.nil? ? " (nil) " : " " }".strip~ -** Processing line: ~ message = "actual:\n#{actual_string}\n\ndid not equal\n\nexpected:\n#{expected}.\n#{message}"~ +** Processing line: ~ message = "actual:\n#{actual_string}\n\ndid not equal\n\nexpected:\n#{expected}\n#{message}"~ ** Processing line: ~ raise message~ ** Processing line: ~ end~ ** Processing line: ~ nil~ @@ -218937,7 +230377,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ @assertion_performed = true~ ** Processing line: ~ if actual == expected~ ** Processing line: ~ actual_string = "#{actual}#{actual.nil? ? " (nil) " : " " }".strip~ -** Processing line: ~ message = "actual:\n#{actual_string}\n\nequaled\n\nexpected:\n#{expected}.\n#{message}"~ +** Processing line: ~ message = "actual:\n#{actual_string}\n\nequaled\n\nexpected:\n#{expected}\n#{message}"~ ** Processing line: ~ raise message~ ** Processing line: ~ end~ ** Processing line: ~ nil~ @@ -219007,6 +230447,10 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ args.state~ ** Processing line: ~ end~ ** Processing line: ~~ +** Processing line: ~ def temp_state~ +** Processing line: ~ args.temp_state~ +** Processing line: ~ end~ +** Processing line: ~~ ** Processing line: ~ def inputs~ ** Processing line: ~ args.inputs~ ** Processing line: ~ end~ @@ -219034,6 +230478,14 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ def layout~ ** Processing line: ~ args.layout~ ** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def new_entity entity_type, init_hash = nil, &block~ +** Processing line: ~ args.state.new_entity entity_type, init_hash, &block~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def new_entity_strict entity_type, init_hash = nil, &block~ +** Processing line: ~ args.state.new_entity_strict entity_type, init_hash, &block~ +** Processing line: ~ end~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~#+end_src~ @@ -219095,7 +230547,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ attr_accessor :x, :y, :w, :h, :path, :angle, :a, :r, :g, :b, :tile_x,~ ** Processing line: ~ :tile_y, :tile_w, :tile_h, :flip_horizontally,~ ** Processing line: ~ :flip_vertically, :angle_anchor_x, :angle_anchor_y, :id,~ -** Processing line: ~ :source_x, :source_y, :source_w, :source_h~ +** Processing line: ~ :source_x, :source_y, :source_w, :source_h, :blendmode_enum~ ** Processing line: ~~ ** Processing line: ~ def primitive_marker~ ** Processing line: ~ :sprite~ @@ -219155,7 +230607,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ :font_style, :menu~ ** Processing line: ~~ ** Processing line: ~ def initialize~ -** Processing line: ~ @font_style = FontStyle.new(font: 'font.ttf', size_enum: -1, line_height: 1.1)~ +** Processing line: ~ @font_style = FontStyle.new(font: 'font.ttf', size_enum: -1.5, line_height: 1.1)~ ** Processing line: ~ @menu = Menu.new self~ ** Processing line: ~ @disabled = false~ ** Processing line: ~ @log_offset = 0~ @@ -219175,6 +230627,8 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ @text_color = Color.new [255, 255, 255]~ ** Processing line: ~ @error_color = Color.new [200, 50, 50]~ ** Processing line: ~ @header_color = Color.new [100, 200, 220]~ +** Processing line: ~ @code_color = Color.new [210, 168, 255]~ +** Processing line: ~ @comment_color = Color.new [0, 200, 100]~ ** Processing line: ~ @animation_duration = 1.seconds~ ** Processing line: ~ @shown_at = -1~ ** Processing line: ~ load_history~ @@ -219449,6 +230903,8 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~~ ** Processing line: ~ if cmd == 'quit' || cmd == ':wq' || cmd == ':q!' || cmd == ':q' || cmd == ':wqa'~ ** Processing line: ~ $gtk.request_quit~ +** Processing line: ~ elsif cmd.start_with? ':'~ +** Processing line: ~ send ((cmd.gsub '-', '_').gsub ':', '')~ ** Processing line: ~ else~ ** Processing line: ~ puts "-> #{cmd}"~ ** Processing line: ~ begin~ @@ -219457,13 +230913,19 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ if $results.nil?~ ** Processing line: ~ puts "=> nil"~ ** Processing line: ~ elsif $results == :console_silent_eval~ +** Processing line: ~ # do nothing since the console is silent~ ** Processing line: ~ else~ ** Processing line: ~ puts "=> #{$results}"~ ** Processing line: ~ end~ ** Processing line: ~ @last_command_errored = false~ ** Processing line: ~ rescue Exception => e~ ** Processing line: ~ try_search_docs e~ -** Processing line: ~ puts "* EXCEPTION: #{e}"~ +** Processing line: ~ # if an exception is thrown and the bactrace includes something helpful, then show it~ +** Processing line: ~ if (e.backtrace || []).first && (e.backtrace.first.include? "(eval)")~ +** Processing line: ~ puts "* EXCEPTION: #{e}"~ +** Processing line: ~ else~ +** Processing line: ~ puts "* EXCEPTION: #{e}\n#{e.__backtrace_to_org__}"~ +** Processing line: ~ end~ ** Processing line: ~ end~ ** Processing line: ~ end~ ** Processing line: ~ end~ @@ -219690,6 +231152,11 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ render_log_offset args~ +** Processing line: ~~ +** Processing line: ~ args.outputs.reserved << { x: 10.from_right, y: @bottom + 10,~ +** Processing line: ~ text: "Press CTRL+g or ESCAPE to clear the prompt.",~ +** Processing line: ~ vertical_alignment_enum: 0,~ +** Processing line: ~ alignment_enum: 2, r: 80, g: 80, b: 80 }.label!~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ def render_log_offset args~ @@ -219712,7 +231179,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ def include_subdued_markers? text~ -** Processing line: ~ include_any_words? text, subdued_markers~ +** Processing line: ~ (text.start_with? "* INFO: ") && (include_any_words? text, subdued_markers)~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ def include_any_words? text, words~ @@ -219858,8 +231325,32 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ (log_entry.start_with? "**** ")~ ** Processing line: ~ end~ ** Processing line: ~~ +** Processing line: ~ def code? log_entry~ +** Processing line: ~ (just_symbol? log_entry) || (codeblock_marker? log_entry)~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def just_symbol? log_entry~ +** Processing line: ~ scrubbed = log_entry.gsub("*", "").strip~ +** Processing line: ~ (scrubbed.start_with? ":") && (!scrubbed.include? " ") && (!scrubbed.include? "=>")~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def code_comment? log_entry~ +** Processing line: ~ return true if log_entry.strip.start_with?("# ")~ +** Processing line: ~ return false~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def codeblock_marker? log_entry~ +** Processing line: ~ return true if log_entry.strip.start_with?("#+begin_src")~ +** Processing line: ~ return true if log_entry.strip.start_with?("#+end_src")~ +** Processing line: ~ return false~ +** Processing line: ~ end~ +** Processing line: ~~ ** Processing line: ~ def color_for_log_entry(log_entry)~ -** Processing line: ~ if include_row_marker? log_entry~ +** Processing line: ~ if code? log_entry~ +** Processing line: ~ @code_color~ +** Processing line: ~ elsif code_comment? log_entry~ +** Processing line: ~ @comment_color~ +** Processing line: ~ elsif include_row_marker? log_entry~ ** Processing line: ~ @text_color~ ** Processing line: ~ elsif include_error_marker? log_entry~ ** Processing line: ~ @error_color~ @@ -219949,6 +231440,10 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ @color~ ** Processing line: ~ end~ ** Processing line: ~~ +** Processing line: ~ def to_s~ +** Processing line: ~ "GTK::Console::Color #{to_h}"~ +** Processing line: ~ end~ +** Processing line: ~~ ** Processing line: ~ def to_h~ ** Processing line: ~ { r: @color[0], g: @color[1], b: @color[2], a: @color[3] }~ ** Processing line: ~ end~ @@ -220011,7 +231506,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ size_enum: size_enum,~ ** Processing line: ~ alignment_enum: alignment_enum,~ ** Processing line: ~ **color.to_h,~ -** Processing line: ~ }.label~ +** Processing line: ~ }.label!~ ** Processing line: ~ end~ ** Processing line: ~ end~ ** Processing line: ~ end~ @@ -220090,7 +231585,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~~ ** Processing line: ~ def itch_wizard_clicked~ ** Processing line: ~ @console.scroll_to_bottom~ -** Processing line: ~ $wizards.itch.start~ +** Processing line: ~ $wizards.itch.restart~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ def docs_clicked~ @@ -220115,6 +231610,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ @buttons = [~ ** Processing line: ~ (button id: :record, row: 0, col: 9, text: "record gameplay", method: :record_clicked),~ ** Processing line: ~ (button id: :replay, row: 0, col: 10, text: "start replay", method: :replay_clicked),~ +** Processing line: ~ *custom_buttons~ ** Processing line: ~ ]~ ** Processing line: ~ elsif @menu_shown == :hidden~ ** Processing line: ~ @buttons = [~ @@ -220173,8 +231669,8 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ method: method~ ** Processing line: ~ }.let do |entity|~ ** Processing line: ~ primitives = []~ -** Processing line: ~ primitives << entity[:rect].merge(a: 164).solid~ -** Processing line: ~ primitives << entity[:rect].merge(r: 255, g: 255, b: 255).border~ +** Processing line: ~ primitives << entity[:rect].solid!(a: 164)~ +** Processing line: ~ primitives << entity[:rect].border!(r: 255, g: 255, b: 255)~ ** Processing line: ~ primitives << text.wrapped_lines(5)~ ** Processing line: ~ .map_with_index do |l, i|~ ** Processing line: ~ [~ @@ -220393,17 +231889,17 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ "#{" " * (string_width.length - c.length) } #{c} |"~ ** Processing line: ~ end.join~ ** Processing line: ~~ -** Processing line: ~ # remove seperators between empty values~ +** Processing line: ~ # remove separators between empty values~ ** Processing line: ~ formated_row = formated_row.gsub(" | ", " ")~ ** Processing line: ~~ ** Processing line: ~ puts formated_row~ ** Processing line: ~ end~ ** Processing line: ~~ -** Processing line: ~ def pretty_print_row_seperator string_width, cell_width, column_width, columns~ +** Processing line: ~ def pretty_print_row_separator string_width, cell_width, column_width, columns~ ** Processing line: ~ # this is a joint: +--------~ ** Processing line: ~ column_joint = "+#{"-" * cell_width}"~ ** Processing line: ~~ -** Processing line: ~ # multiple joints create a row seperator: +----+----+~ +** Processing line: ~ # multiple joints create a row separator: +----+----+~ ** Processing line: ~ puts (column_joint * columns) + "+"~ ** Processing line: ~ end~ ** Processing line: ~~ @@ -220412,12 +231908,12 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ args.outputs.reserved << (@cursor_color.to_h.merge x: x + @cursor_position_px + 0.5,~ ** Processing line: ~ y: y + 5,~ ** Processing line: ~ x2: x + @cursor_position_px + 0.5,~ -** Processing line: ~ y2: y + @font_style.letter_size.y + 5)~ +** Processing line: ~ y2: y + @font_style.letter_size.y + 4)~ ** Processing line: ~~ ** Processing line: ~ args.outputs.reserved << (@cursor_color.to_h.merge x: x + @cursor_position_px + 1,~ ** Processing line: ~ y: y + 5,~ ** Processing line: ~ x2: x + @cursor_position_px + 1,~ -** Processing line: ~ y2: y + @font_style.letter_size.y + 5)~ +** Processing line: ~ y2: y + @font_style.letter_size.y + 4)~ ** Processing line: ~~ ** Processing line: ~ # debugging rectangle for string~ ** Processing line: ~ # args.outputs.reserved << (@cursor_color.to_h.merge x: x,~ @@ -221090,7 +232586,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ :l1, :r1,~ ** Processing line: ~ :l2, :r2,~ ** Processing line: ~ :l3, :r3,~ -** Processing line: ~ :start, :select,~ +** Processing line: ~ :start, :select, :home,~ ** Processing line: ~ :directional_up, :directional_down, :directional_left, :directional_right~ ** Processing line: ~ ].freeze~ ** Processing line: ~~ @@ -221098,6 +232594,22 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ attr label~ ** Processing line: ~ end~ ** Processing line: ~~ +** Processing line: ~ def back~ +** Processing line: ~ @select~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def back= value~ +** Processing line: ~ @select = value~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def guide~ +** Processing line: ~ @home~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def guide= value~ +** Processing line: ~ @home = value~ +** Processing line: ~ end~ +** Processing line: ~~ ** Processing line: ~ # Activate a key.~ ** Processing line: ~ #~ ** Processing line: ~ # @return [void]~ @@ -221161,7 +232673,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~~ ** Processing line: ~ error_message = <<-S~ ** Processing line: ~ * ERROR~ -** Processing line: ~ The GTK::DirectionalKeys module should only be included in objects that respond to the following api heirarchy:~ +** Processing line: ~ The GTK::DirectionalKeys module should only be included in objects that respond to the following api hierarchy:~ ** Processing line: ~~ ** Processing line: ~ - (#{ directional_methods.join("|") })~ ** Processing line: ~ - key_held.(#{ directional_methods.join("|") })~ @@ -221218,6 +232730,12 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ end~ ** Processing line: ~ end~ ** Processing line: ~~ +** Processing line: ~ def directional_angle~ +** Processing line: ~ return nil unless directional_vector~ +** Processing line: ~~ +** Processing line: ~ Math.atan2(up_down, left_right).to_degrees~ +** Processing line: ~ end~ +** Processing line: ~~ ** Processing line: ~ def method_missing m, *args~ ** Processing line: ~ # combine the key with ctrl_~ ** Processing line: ~ if m.to_s.start_with?("ctrl_")~ @@ -221495,6 +233013,22 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~~ ** Processing line: ~ module GTK~ ** Processing line: ~ module Geometry~ +** Processing line: ~ def self.rotate_point point, angle, around = nil~ +** Processing line: ~ s = Math.sin a.to_radians~ +** Processing line: ~ c = Math.cos a.to_radians~ +** Processing line: ~ px = point.x~ +** Processing line: ~ py = point.y~ +** Processing line: ~ cx = 0~ +** Processing line: ~ cy = 0~ +** Processing line: ~ if around~ +** Processing line: ~ cx = around.x~ +** Processing line: ~ cy = around.y~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ point.merge(x: ((px - cx) * c - (py - cy) * s) + cx,~ +** Processing line: ~ y: ((px - cx) * s + (py - cy) * c) + cy)~ +** Processing line: ~ end~ +** Processing line: ~~ ** Processing line: ~ # Returns f(t) for a cubic Bezier curve.~ ** Processing line: ~ def self.cubic_bezier t, a, b, c, d~ ** Processing line: ~ s = 1 - t~ @@ -221576,7 +233110,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ rescue Exception => e~ ** Processing line: ~ raise e, <<-S~ ** Processing line: ~ * ERROR:~ -** Processing line: ~ center_inside_rect for self #{self} and other_rect #{other_rect}. Failed with exception #{e}.~ +** Processing line: ~ center_inside_rect for self #{self} and other_rect #{other_rect}.\n#{e}.~ ** Processing line: ~ S~ ** Processing line: ~ end~ ** Processing line: ~~ @@ -221593,7 +233127,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ rescue Exception => e~ ** Processing line: ~ raise e, <<-S~ ** Processing line: ~ * ERROR:~ -** Processing line: ~ center_inside_rect_x for self #{self} and other_rect #{other_rect}. Failed with exception #{e}.~ +** Processing line: ~ center_inside_rect_x for self #{self} and other_rect #{other_rect}.\n#{e}.~ ** Processing line: ~ S~ ** Processing line: ~ end~ ** Processing line: ~~ @@ -221610,7 +233144,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ rescue Exception => e~ ** Processing line: ~ raise e, <<-S~ ** Processing line: ~ * ERROR:~ -** Processing line: ~ center_inside_rect_y for self #{self} and other_rect #{other_rect}. Failed with exception #{e}.~ +** Processing line: ~ center_inside_rect_y for self #{self} and other_rect #{other_rect}.\n#{e}.~ ** Processing line: ~ S~ ** Processing line: ~ end~ ** Processing line: ~~ @@ -221619,7 +233153,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~~ -** Processing line: ~ # Returns a primitive that is anchored/repositioned based off its retangle.~ +** Processing line: ~ # Returns a primitive that is anchored/repositioned based off its rectangle.~ ** Processing line: ~ # @gtk~ ** Processing line: ~ def anchor_rect anchor_x, anchor_y~ ** Processing line: ~ current_w = self.w~ @@ -221755,10 +233289,10 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~~ ** Processing line: ~ # @gtk~ ** Processing line: ~ def self.intersect_rect? rect_one, rect_two, tolerance = 0.1~ -** Processing line: ~ return false if rect_one.right - tolerance < rect_two.left + tolerance~ -** Processing line: ~ return false if rect_one.left + tolerance > rect_two.right - tolerance~ -** Processing line: ~ return false if rect_one.top - tolerance < rect_two.bottom + tolerance~ -** Processing line: ~ return false if rect_one.bottom + tolerance > rect_two.top - tolerance~ +** Processing line: ~ return false if ((rect_one.x + rect_one.w) - tolerance) < (rect_two.x + tolerance)~ +** Processing line: ~ return false if (rect_one.x + tolerance) > ((rect_two.x + rect_two.w) - tolerance)~ +** Processing line: ~ return false if ((rect_one.y + rect_one.h) - tolerance) < (rect_two.y + tolerance)~ +** Processing line: ~ return false if (rect_one.y + tolerance) > ((rect_two.y + rect_two.h) - tolerance)~ ** Processing line: ~ return true~ ** Processing line: ~ rescue Exception => e~ ** Processing line: ~ context_help_rect_one = (rect_one.__help_contract_implementation contract_intersect_rect?)[:not_implemented_methods]~ @@ -221786,6 +233320,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ - rect_one: #{rect_one}~ ** Processing line: ~ - rect_two: #{rect_two}~ ** Processing line: ~ #{context_help}~ +** Processing line: ~ \n#{e}~ ** Processing line: ~ S~ ** Processing line: ~ end~ ** Processing line: ~~ @@ -221796,14 +233331,14 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ y = y.shift_down(size * anchor_y)~ ** Processing line: ~ [x, y, size, size]~ ** Processing line: ~ rescue Exception => e~ -** Processing line: ~ raise e, ":to_square failed for size: #{size} x: #{x} y: #{y} anchor_x: #{anchor_x} anchor_y: #{anchor_y}."~ +** Processing line: ~ raise e, ":to_square failed for size: #{size} x: #{x} y: #{y} anchor_x: #{anchor_x} anchor_y: #{anchor_y}.\n#{e}"~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ # @gtk~ ** Processing line: ~ def self.distance point_one, point_two~ ** Processing line: ~ Math.sqrt((point_two.x - point_one.x)**2 + (point_two.y - point_one.y)**2)~ ** Processing line: ~ rescue Exception => e~ -** Processing line: ~ raise e, ":distance failed for point_one: #{point_one} point_two #{point_two}."~ +** Processing line: ~ raise e, ":distance failed for point_one: #{point_one} point_two #{point_two}.\n#{e}"~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ # @gtk~ @@ -221812,31 +233347,34 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ d_x = end_point.x - start_point.x~ ** Processing line: ~ Math::PI.+(Math.atan2(d_y, d_x)).to_degrees~ ** Processing line: ~ rescue Exception => e~ -** Processing line: ~ raise e, ":angle_from failed for start_point: #{start_point} end_point: #{end_point}."~ +** Processing line: ~ raise e, ":angle_from failed for start_point: #{start_point} end_point: #{end_point}.\n#{e}"~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ # @gtk~ ** Processing line: ~ def self.angle_to start_point, end_point~ ** Processing line: ~ angle_from end_point, start_point~ ** Processing line: ~ rescue Exception => e~ -** Processing line: ~ raise e, ":angle_to failed for start_point: #{start_point} end_point: #{end_point}."~ +** Processing line: ~ raise e, ":angle_to failed for start_point: #{start_point} end_point: #{end_point}.\n#{e}"~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ # @gtk~ ** Processing line: ~ def self.point_inside_circle? point, circle_center_point, radius~ ** Processing line: ~ (point.x - circle_center_point.x) ** 2 + (point.y - circle_center_point.y) ** 2 < radius ** 2~ ** Processing line: ~ rescue Exception => e~ -** Processing line: ~ raise e, ":point_inside_circle? failed for point: #{point} circle_center_point: #{circle_center_point} radius: #{radius}"~ +** Processing line: ~ raise e, ":point_inside_circle? failed for point: #{point} circle_center_point: #{circle_center_point} radius: #{radius}.\n#{e}"~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ # @gtk~ ** Processing line: ~ def self.inside_rect? inner_rect, outer_rect, tolerance = 0.0~ +** Processing line: ~ return nil if !inner_rect~ +** Processing line: ~ return nil if !outer_rect~ +** Processing line: ~~ ** Processing line: ~ inner_rect.x + tolerance >= outer_rect.x - tolerance &&~ -** Processing line: ~ inner_rect.right - tolerance <= outer_rect.right + tolerance &&~ +** Processing line: ~ (inner_rect.x + inner_rect.w) - tolerance <= (outer_rect.x + outer_rect.w) + tolerance &&~ ** Processing line: ~ inner_rect.y + tolerance >= outer_rect.y - tolerance &&~ -** Processing line: ~ inner_rect.top - tolerance <= outer_rect.top + tolerance~ +** Processing line: ~ (inner_rect.y + inner_rect.h) - tolerance <= (outer_rect.y + outer_rect.h) + tolerance~ ** Processing line: ~ rescue Exception => e~ -** Processing line: ~ raise e, ":inside_rect? failed for inner_rect: #{inner_rect} outer_rect: #{outer_rect}."~ +** Processing line: ~ raise e, ":inside_rect? failed for inner_rect: #{inner_rect} outer_rect: #{outer_rect}.\n#{e}"~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ # @gtk~ @@ -221871,7 +233409,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ return rect~ ** Processing line: ~ end~ ** Processing line: ~ rescue Exception => e~ -** Processing line: ~ raise e, ":scale_rect_extended failed for rect: #{rect} percentage_x: #{percentage_x} percentage_y: #{percentage_y} anchors_x: #{anchor_x} anchor_y: #{anchor_y}."~ +** Processing line: ~ raise e, ":scale_rect_extended failed for rect: #{rect} percentage_x: #{percentage_x} percentage_y: #{percentage_y} anchors_x: #{anchor_x} anchor_y: #{anchor_y}.\n#{e}"~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ # @gtk~ @@ -221885,7 +233423,21 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ anchor_x: anchor_x,~ ** Processing line: ~ anchor_y: anchor_y~ ** Processing line: ~ rescue Exception => e~ -** Processing line: ~ raise e, ":scale_rect failed for rect: #{rect} percentage: #{percentage} anchors [#{anchor_x} (x), #{anchor_y} (y)]."~ +** Processing line: ~ raise e, ":scale_rect failed for rect: #{rect} percentage: #{percentage} anchors [#{anchor_x} (x), #{anchor_y} (y)].\n#{e}"~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def self.rect_to_line rect~ +** Processing line: ~ l = rect.to_hash.line~ +** Processing line: ~ l.merge(x2: l.x + l.w - 1,~ +** Processing line: ~ y2: l.y + l.h)~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def self.rect_center_point rect~ +** Processing line: ~ { x: rect.x + rect.w.half, y: rect.y + rect.h.half }~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def rect_center_point~ +** Processing line: ~ Geometry.rect_center_point self~ ** Processing line: ~ end~ ** Processing line: ~ end # module Geometry~ ** Processing line: ~ end # module GTK~ @@ -222097,6 +233649,14 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ def bottom_right~ ** Processing line: ~ [@right, @bottom].point~ ** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def x~ +** Processing line: ~ 0~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def y~ +** Processing line: ~ 0~ +** Processing line: ~ end~ ** Processing line: ~ end~ ** Processing line: ~ end~ ** Processing line: ~~ @@ -222313,6 +233873,30 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ }~ ** Processing line: ~ end~ ** Processing line: ~~ +** Processing line: ~ def self.method_to_key_hash~ +** Processing line: ~ return @method_to_key_hash if @method_to_key_hash~ +** Processing line: ~ @method_to_key_hash = {}~ +** Processing line: ~ string_representation_overrides ||= {~ +** Processing line: ~ backspace: '\b'~ +** Processing line: ~ }~ +** Processing line: ~ char_to_method_hash.each do |k, v|~ +** Processing line: ~ v.each do |vi|~ +** Processing line: ~ t = { char_or_raw_key: k }~ +** Processing line: ~~ +** Processing line: ~ if k.is_a? Numeric~ +** Processing line: ~ t[:raw_key] = k~ +** Processing line: ~ t[:string_representation] = "raw_key == #{k}"~ +** Processing line: ~ else~ +** Processing line: ~ t[:char] = k~ +** Processing line: ~ t[:string_representation] = "\"#{k.strip}\""~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ @method_to_key_hash[vi] = t~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~ @method_to_key_hash~ +** Processing line: ~ end~ +** Processing line: ~~ ** Processing line: ~ def self.char_to_method char, int = nil~ ** Processing line: ~ methods = char_to_method_hash[char] || char_to_method_hash[int]~ ** Processing line: ~ methods ? methods.dup : [char.to_sym || int]~ @@ -222427,24 +234011,32 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ def method_missing m, *args~ -** Processing line: ~ begin~ -** Processing line: ~ define_singleton_method(m) do~ -** Processing line: ~ r = self.instance_variable_get("@#{m.without_ending_bang}".to_sym)~ -** Processing line: ~ clear_key m~ -** Processing line: ~ return r~ -** Processing line: ~ end~ +** Processing line: ~ if KeyboardKeys.method_to_key_hash[m.without_ending_bang]~ +** Processing line: ~ begin~ +** Processing line: ~ define_singleton_method(m) do~ +** Processing line: ~ r = self.instance_variable_get("@#{m.without_ending_bang}".to_sym)~ +** Processing line: ~ clear_key m~ +** Processing line: ~ return r~ +** Processing line: ~ end~ ** Processing line: ~~ -** Processing line: ~ return self.send m~ -** Processing line: ~ rescue Exception => e~ -** Processing line: ~ log_important "#{e}"~ +** Processing line: ~ return self.send m~ +** Processing line: ~ rescue Exception => e~ +** Processing line: ~ log_important "#{e}"~ +** Processing line: ~ end~ ** Processing line: ~ end~ ** Processing line: ~~ +** Processing line: ~ did_you_mean = KeyboardKeys.method_to_key_hash.find_all do |k, v|~ +** Processing line: ~ k.to_s[0..1] == m.to_s[0..1]~ +** Processing line: ~ end.map {|k, v| ":#{k} (#{v[:string_representation]})" }~ +** Processing line: ~ did_you_mean_string = ""~ +** Processing line: ~ did_you_mean_string = ". Did you mean #{did_you_mean.join ", "}?"~ +** Processing line: ~~ ** Processing line: ~ raise <<-S~ ** Processing line: ~ * ERROR:~ -** Processing line: ~ There is no member on the keyboard called #{m}. Here is a to_s representation of what's available:~ -** Processing line: ~~ -** Processing line: ~ #{KeyboardKeys.char_to_method_hash.map { |k, v| "[#{k} => #{v.join(",")}]" }.join(" ")}~ +** Processing line: ~ #{KeyboardKeys.method_to_key_hash.map { |k, v| "** :#{k} #{v.string_representation}" }.join("\n")}~ ** Processing line: ~~ +** Processing line: ~ There is no key on the keyboard called :#{m}#{did_you_mean_string}.~ +** Processing line: ~ Full list of available keys =:points_up:=.~ ** Processing line: ~ S~ ** Processing line: ~ end~ ** Processing line: ~~ @@ -222828,6 +234420,10 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ (controller_one && controller_one.directional_vector)~ ** Processing line: ~ end~ ** Processing line: ~~ +** Processing line: ~ def directional_angle~ +** Processing line: ~ keyboard.directional_angle || (controller_one && controller_one.directional_angle)~ +** Processing line: ~ end~ +** Processing line: ~~ ** Processing line: ~ # Returns a signal indicating right (`1`), left (`-1`), or neither ('0').~ ** Processing line: ~ #~ ** Processing line: ~ # @return [Integer]~ @@ -222914,19 +234510,12 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~#+begin_src ruby~ - PRE start detected. ** Processing line: ~ # ./dragon/ios_wizard.rb~ +** Processing line: ~ # Contributors outside of DragonRuby who also hold Copyright: Michał Dudziński~ ** Processing line: ~ # Copyright 2019 DragonRuby LLC~ ** Processing line: ~ # MIT License~ ** Processing line: ~ # ios_wizard.rb has been released under MIT (*only this file*).~ ** Processing line: ~~ -** Processing line: ~ class WizardException < Exception~ -** Processing line: ~ attr_accessor :console_primitives~ -** Processing line: ~~ -** Processing line: ~ def initialize *console_primitives~ -** Processing line: ~ @console_primitives = console_primitives~ -** Processing line: ~ end~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ class IOSWizard~ +** Processing line: ~ class IOSWizard < Wizard~ ** Processing line: ~ def initialize~ ** Processing line: ~ @doctor_executed_at = 0~ ** Processing line: ~ end~ @@ -222939,23 +234528,45 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ @steps ||= []~ ** Processing line: ~ end~ ** Processing line: ~~ -** Processing line: ~ def steps_development_build~ +** Processing line: ~ def prerequisite_steps~ ** Processing line: ~ [~ ** Processing line: ~ :check_for_xcode,~ ** Processing line: ~ :check_for_brew,~ ** Processing line: ~ :check_for_certs,~ -** Processing line: ~ :check_for_device,~ -** Processing line: ~ :check_for_dev_profile,~ +** Processing line: ~ ]~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def app_metadata_retrieval_steps~ +** Processing line: ~ [~ ** Processing line: ~ :determine_team_identifier,~ ** Processing line: ~ :determine_app_name,~ ** Processing line: ~ :determine_app_id,~ -** Processing line: ~ :blow_away_temp,~ +** Processing line: ~ ]~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def steps_development_build~ +** Processing line: ~ [~ +** Processing line: ~ *prerequisite_steps,~ +** Processing line: ~~ +** Processing line: ~ :check_for_device,~ +** Processing line: ~ :check_for_dev_profile,~ +** Processing line: ~~ +** Processing line: ~ *app_metadata_retrieval_steps,~ +** Processing line: ~~ +** Processing line: ~ :clear_tmp_directory,~ ** Processing line: ~ :stage_app,~ +** Processing line: ~~ ** Processing line: ~ :development_write_info_plist,~ +** Processing line: ~~ ** Processing line: ~ :write_entitlements_plist,~ ** Processing line: ~ :compile_icons,~ -** Processing line: ~ :create_payload_directory,~ +** Processing line: ~ :clear_payload_directory,~ +** Processing line: ~~ +** Processing line: ~ :create_payload_directory_dev,~ +** Processing line: ~~ +** Processing line: ~ :create_payload,~ ** Processing line: ~ :code_sign_payload,~ +** Processing line: ~~ ** Processing line: ~ :create_ipa,~ ** Processing line: ~ :deploy~ ** Processing line: ~ ]~ @@ -222963,20 +234574,27 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~~ ** Processing line: ~ def steps_production_build~ ** Processing line: ~ [~ -** Processing line: ~ :check_for_xcode,~ -** Processing line: ~ :check_for_brew,~ -** Processing line: ~ :check_for_certs,~ +** Processing line: ~ *prerequisite_steps,~ +** Processing line: ~~ ** Processing line: ~ :check_for_distribution_profile,~ -** Processing line: ~ :determine_team_identifier,~ -** Processing line: ~ :determine_app_name,~ -** Processing line: ~ :determine_app_id,~ -** Processing line: ~ :blow_away_temp,~ +** Processing line: ~ :determine_app_version,~ +** Processing line: ~~ +** Processing line: ~ *app_metadata_retrieval_steps,~ +** Processing line: ~~ +** Processing line: ~ :clear_tmp_directory,~ ** Processing line: ~ :stage_app,~ +** Processing line: ~~ ** Processing line: ~ :production_write_info_plist,~ +** Processing line: ~~ ** Processing line: ~ :write_entitlements_plist,~ ** Processing line: ~ :compile_icons,~ -** Processing line: ~ :create_payload_directory,~ +** Processing line: ~ :clear_payload_directory,~ +** Processing line: ~~ +** Processing line: ~ :create_payload_directory_prod,~ +** Processing line: ~~ +** Processing line: ~ :create_payload,~ ** Processing line: ~ :code_sign_payload,~ +** Processing line: ~~ ** Processing line: ~ :create_ipa,~ ** Processing line: ~ :print_publish_help~ ** Processing line: ~ ]~ @@ -223012,6 +234630,8 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ @steps = steps_development_build~ ** Processing line: ~ @steps = steps_production_build if @production_build~ ** Processing line: ~ @certificate_name = nil~ +** Processing line: ~ @app_version = opts[:version]~ +** Processing line: ~ @app_version = "1.0" if @opts[:env] == :dev && !@app_version~ ** Processing line: ~ init_wizard_status~ ** Processing line: ~ log_info "Starting iOS Wizard so we can deploy to your device."~ ** Processing line: ~ @start_at = Kernel.global_tick_count~ @@ -223033,8 +234653,10 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ log "=" * $console.console_text_width~ ** Processing line: ~ else~ ** Processing line: ~ log_error e.to_s~ +** Processing line: ~ log e.__backtrace_to_org__~ ** Processing line: ~ end~ ** Processing line: ~~ +** Processing line: ~ init_wizard_status~ ** Processing line: ~ $console.set_command "$wizards.ios.start env: :#{@opts[:env]}"~ ** Processing line: ~ end~ ** Processing line: ~~ @@ -223141,13 +234763,66 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ return "profiles/development.mobileprovision"~ ** Processing line: ~ end~ ** Processing line: ~~ +** Processing line: ~ def ios_metadata_template~ +** Processing line: ~ <<-S~ +** Processing line: ~ # ios_metadata.txt is used by the Pro version of DragonRuby Game Toolkit to create iOS apps.~ +** Processing line: ~ # Information about the Pro version can be found at: http://dragonruby.org/toolkit/game#purchase~ +** Processing line: ~~ +** Processing line: ~ # teamid needs to be set to your assigned Team Id which can be found at https://developer.apple.com/account/#/membership/~ +** Processing line: ~ teamid=~ +** Processing line: ~ # appid needs to be set to your application identifier which can be found at https://developer.apple.com/account/resources/identifiers/list~ +** Processing line: ~ appid=~ +** Processing line: ~ # appname is the name you want to show up underneath the app icon on the device. Keep it under 10 characters.~ +** Processing line: ~ appname=~ +** Processing line: ~ S~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def ios_metadata~ +** Processing line: ~ contents = $gtk.read_file 'metadata/ios_metadata.txt'~ +** Processing line: ~~ +** Processing line: ~ if !contents~ +** Processing line: ~ $gtk.write_file 'metadata/ios_metadata.txt', ios_metadata_template~ +** Processing line: ~ contents = $gtk.read_file 'metadata/ios_metadata.txt'~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ kvps = contents.each_line~ +** Processing line: ~ .reject { |l| l.strip.length == 0 || (l.strip.start_with? "#") }~ +** Processing line: ~ .map do |l|~ +** Processing line: ~ key, value = l.split("=")~ +** Processing line: ~ [key.strip.to_sym, value.strip]~ +** Processing line: ~ end.flatten~ +** Processing line: ~ Hash[*kvps]~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def game_metadata~ +** Processing line: ~ contents = $gtk.read_file 'metadata/game_metadata.txt'~ +** Processing line: ~~ +** Processing line: ~ kvps = contents.each_line~ +** Processing line: ~ .reject { |l| l.strip.length == 0 || (l.strip.start_with? "#") }~ +** Processing line: ~ .map do |l|~ +** Processing line: ~ key, value = l.split("=")~ +** Processing line: ~ [key.strip.to_sym, value.strip]~ +** Processing line: ~ end.flatten~ +** Processing line: ~ Hash[*kvps]~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def raise_ios_metadata_required~ +** Processing line: ~ raise WizardException.new(~ +** Processing line: ~ "* mygame/metadata/ios_metadata.txt needs to be filled out.",~ +** Processing line: ~ "You need to update metadata/ios_metadata.txt with a valid teamid, appname, and appid.",~ +** Processing line: ~ "Instructions for where the values should come from are within metadata/ios_metadata.txt."~ +** Processing line: ~ )~ +** Processing line: ~ end~ +** Processing line: ~~ ** Processing line: ~ def determine_team_identifier~ -** Processing line: ~ @team_name = (team_identifier_from_provisioning_profile @opts[:env])~ -** Processing line: ~ log_info "Team Identifer is: #{@team_name}"~ +** Processing line: ~ @team_id = (ios_metadata.teamid || "")~ +** Processing line: ~ raise_ios_metadata_required if @team_id.strip.length == 0~ +** Processing line: ~ log_info "Team Identifer is: #{@team_id}"~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ def determine_app_name~ -** Processing line: ~ @app_name = (provisioning_profile_xml @opts[:env])[:children].first[:children].first[:children][1][:children].first[:data]~ +** Processing line: ~ @app_name = (ios_metadata.appname || "")~ +** Processing line: ~ raise_ios_metadata_required if @app_name.strip.length == 0~ ** Processing line: ~ log_info "App name is: #{@app_name}."~ ** Processing line: ~ end~ ** Processing line: ~~ @@ -223171,36 +234846,9 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ $gtk.parse_xml scrubbed~ ** Processing line: ~ end~ ** Processing line: ~~ -** Processing line: ~ def app_id_from_provisioning_profile environment~ -** Processing line: ~ application_identifier_index = (provisioning_profile_xml environment)[:children][0][:children][0][:children][13][:children][0][:children][0][:data]~ -** Processing line: ~ (provisioning_profile_xml environment)[:children][0][:children][0][:children][13][:children].each.with_index do |node, i|~ -** Processing line: ~ if node[:children] && node[:children][0] && node[:children][0][:data] == "application-identifier"~ -** Processing line: ~ application_identifier_index = i~ -** Processing line: ~ break~ -** Processing line: ~ end~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ app_id_with_team_identifier = (provisioning_profile_xml environment)[:children].first[:children].first[:children][13][:children][application_identifier_index + 1][:children].first[:data]~ -** Processing line: ~ team_identifer = team_identifier_from_provisioning_profile environment~ -** Processing line: ~ app_id_with_team_identifier.gsub "#{team_identifer}.", ""~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ def team_identifier_from_provisioning_profile environment~ -** Processing line: ~ team_identifer_index = (provisioning_profile_xml environment)[:children][0][:children][0][:children][13][:children][0][:children][0][:data]~ -** Processing line: ~~ -** Processing line: ~ (provisioning_profile_xml environment)[:children][0][:children][0][:children][13][:children].each.with_index do |node, i|~ -** Processing line: ~ if node[:children] && node[:children][0] && node[:children][0][:data] == "com.apple.developer.team-identifier"~ -** Processing line: ~ team_identifer_index = i~ -** Processing line: ~ break~ -** Processing line: ~ end~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ (provisioning_profile_xml environment)[:children].first[:children].first[:children][13][:children][team_identifer_index + 1][:children].first[:data]~ -** Processing line: ~ end~ -** Processing line: ~~ ** Processing line: ~ def determine_app_id~ -** Processing line: ~ @app_id = app_id_from_provisioning_profile @opts[:env]~ -** Processing line: ~~ +** Processing line: ~ @app_id = ios_metadata.appid~ +** Processing line: ~ raise_ios_metadata_required if @app_id.strip.length == 0~ ** Processing line: ~ log_info "App Identifier is set to : #{@app_id}"~ ** Processing line: ~ end~ ** Processing line: ~~ @@ -223219,7 +234867,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ end~ ** Processing line: ~ end~ ** Processing line: ~~ -** Processing line: ~ def blow_away_temp~ +** Processing line: ~ def clear_tmp_directory~ ** Processing line: ~ sh "rm -rf #{tmp_directory}"~ ** Processing line: ~ end~ ** Processing line: ~~ @@ -223360,7 +235008,8 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~~ ** Processing line: ~ log_info "Creating Entitlements.plist"~ ** Processing line: ~~ -** Processing line: ~ $gtk.write_file_root "tmp/ios/Entitlements.plist", entitlement_plist_string.gsub(":app_id", "#{@team_name}.#{@app_id}").strip~ +** Processing line: ~ $gtk.write_file_root "tmp/ios/Entitlements.plist", entitlement_plist_string.gsub(":app_id", "#{@team_id}.#{@app_id}").strip~ +** Processing line: ~ $gtk.write_file_root "tmp/ios/Entitlements.txt", entitlement_plist_string.gsub(":app_id", "#{@team_id}.#{@app_id}").strip~ ** Processing line: ~~ ** Processing line: ~ sh "/usr/bin/plutil -convert binary1 \"#{tmp_directory}/Entitlements.plist\""~ ** Processing line: ~ sh "/usr/bin/plutil -convert xml1 \"#{tmp_directory}/Entitlements.plist\""~ @@ -223398,15 +235047,15 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ CFBundleExecutable~ ** Processing line: ~ :app_name~ ** Processing line: ~ CFBundleInfoDictionaryVersion~ -** Processing line: ~ 6.0~ +** Processing line: ~ :app_version~ ** Processing line: ~ CFBundlePackageType~ ** Processing line: ~ APPL~ ** Processing line: ~ CFBundleShortVersionString~ -** Processing line: ~ 5.6~ +** Processing line: ~ :app_version~ ** Processing line: ~ CFBundleSignature~ ** Processing line: ~ ????~ ** Processing line: ~ CFBundleVersion~ -** Processing line: ~ 5.6~ +** Processing line: ~ :app_version~ ** Processing line: ~ CFBundleIcons~ ** Processing line: ~ ~ ** Processing line: ~ CFBundlePrimaryIcon~ @@ -223555,13 +235204,13 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ CFBundleIdentifier~ ** Processing line: ~ :app_id~ ** Processing line: ~ CFBundleInfoDictionaryVersion~ -** Processing line: ~ 6.0~ +** Processing line: ~ :app_version~ ** Processing line: ~ CFBundleName~ ** Processing line: ~ :app_name~ ** Processing line: ~ CFBundlePackageType~ ** Processing line: ~ APPL~ ** Processing line: ~ CFBundleShortVersionString~ -** Processing line: ~ 5.2~ +** Processing line: ~ :app_version~ ** Processing line: ~ CFBundleSignature~ ** Processing line: ~ ????~ ** Processing line: ~ CFBundleSupportedPlatforms~ @@ -223569,7 +235218,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ iPhoneOS~ ** Processing line: ~ ~ ** Processing line: ~ CFBundleVersion~ -** Processing line: ~ 5.2~ +** Processing line: ~ :app_version~ ** Processing line: ~ DTCompiler~ ** Processing line: ~ com.apple.compilers.llvm.clang.1_0~ ** Processing line: ~ DTPlatformBuild~ @@ -223655,6 +235304,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ info_plist_string.gsub!(":app_id", @app_id)~ ** Processing line: ~~ ** Processing line: ~ $gtk.write_file_root "tmp/ios/#{@app_name}.app/Info.plist", info_plist_string.strip~ +** Processing line: ~ $gtk.write_file_root "tmp/ios/Info.txt", info_plist_string.strip~ ** Processing line: ~~ ** Processing line: ~ @info_plist_written = true~ ** Processing line: ~ end~ @@ -223708,13 +235358,13 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ CFBundleIdentifier~ ** Processing line: ~ :app_id~ ** Processing line: ~ CFBundleInfoDictionaryVersion~ -** Processing line: ~ 6.0~ +** Processing line: ~ :app_version~ ** Processing line: ~ CFBundleName~ ** Processing line: ~ :app_name~ ** Processing line: ~ CFBundlePackageType~ ** Processing line: ~ APPL~ ** Processing line: ~ CFBundleShortVersionString~ -** Processing line: ~ 5.2~ +** Processing line: ~ :app_version~ ** Processing line: ~ CFBundleSignature~ ** Processing line: ~ ????~ ** Processing line: ~ CFBundleSupportedPlatforms~ @@ -223722,7 +235372,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ iPhoneOS~ ** Processing line: ~ ~ ** Processing line: ~ CFBundleVersion~ -** Processing line: ~ 5.2~ +** Processing line: ~ :app_version~ ** Processing line: ~ DTCompiler~ ** Processing line: ~ com.apple.compilers.llvm.clang.1_0~ ** Processing line: ~ DTPlatformBuild~ @@ -223806,8 +235456,10 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~~ ** Processing line: ~ info_plist_string.gsub!(":app_name", @app_name)~ ** Processing line: ~ info_plist_string.gsub!(":app_id", @app_id)~ +** Processing line: ~ info_plist_string.gsub!(":app_version", @app_version)~ ** Processing line: ~~ ** Processing line: ~ $gtk.write_file_root "tmp/ios/#{@app_name}.app/Info.plist", info_plist_string.strip~ +** Processing line: ~ $gtk.write_file_root "tmp/ios/Info.txt", info_plist_string.strip~ ** Processing line: ~~ ** Processing line: ~ @info_plist_written = true~ ** Processing line: ~ end~ @@ -223829,28 +235481,53 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ "#{relative_path}/#{$gtk.cli_arguments[:dragonruby]}"~ ** Processing line: ~ end~ ** Processing line: ~~ -** Processing line: ~ def write_ip_address~ +** Processing line: ~ def embed_mobileprovision~ +** Processing line: ~ sh %Q[cp #{@provisioning_profile_path} "#{app_path}/embedded.mobileprovision"]~ +** Processing line: ~ sh %Q[/usr/bin/plutil -convert binary1 "#{app_path}/Info.plist"]~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def clear_payload_directory~ +** Processing line: ~ sh %Q[rm "#{@app_name}".ipa]~ +** Processing line: ~ sh %Q[rm -rf "#{app_path}/app"]~ +** Processing line: ~ sh %Q[rm -rf "#{app_path}/sounds"]~ +** Processing line: ~ sh %Q[rm -rf "#{app_path}/sprites"]~ +** Processing line: ~ sh %Q[rm -rf "#{app_path}/data"]~ +** Processing line: ~ sh %Q[rm -rf "#{app_path}/fonts"]~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def stage_app~ +** Processing line: ~ sh %Q[cp -r "#{root_folder}/app/" "#{app_path}/app/"]~ +** Processing line: ~ sh %Q[cp -r "#{root_folder}/sounds/" "#{app_path}/sounds/"]~ +** Processing line: ~ sh %Q[cp -r "#{root_folder}/sprites/" "#{app_path}/sprites/"]~ +** Processing line: ~ sh %Q[cp -r "#{root_folder}/data/" "#{app_path}/data/"]~ +** Processing line: ~ sh %Q[cp -r "#{root_folder}/fonts/" "#{app_path}/fonts/"]~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def create_payload~ +** Processing line: ~ sh %Q[mkdir -p #{tmp_directory}/ipa_root/Payload]~ +** Processing line: ~ sh %Q[cp -r "#{app_path}" "#{tmp_directory}/ipa_root/Payload"]~ +** Processing line: ~ sh %Q[chmod -R 755 "#{tmp_directory}/ipa_root/Payload"]~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def create_payload_directory_dev~ +** Processing line: ~ # write dev machine's ip address for hotloading~ ** Processing line: ~ $gtk.write_file "app/server_ip_address.txt", $gtk.ffi_misc.get_local_ip_address.strip~ +** Processing line: ~~ +** Processing line: ~ embed_mobileprovision~ +** Processing line: ~ clear_payload_directory~ +** Processing line: ~ stage_app~ ** Processing line: ~ end~ ** Processing line: ~~ -** Processing line: ~ def create_payload_directory~ -** Processing line: ~ sh "cp #{@provisioning_profile_path} \"#{app_path}/embedded.mobileprovision\""~ -** Processing line: ~ sh "/usr/bin/plutil -convert binary1 \"#{app_path}/Info.plist\""~ -** Processing line: ~ write_ip_address~ -** Processing line: ~ sh "rm \"#{@app_name}\".ipa"~ -** Processing line: ~ sh "rm -rf \"#{app_path}/app\""~ -** Processing line: ~ sh "rm -rf \"#{app_path}/sounds\""~ -** Processing line: ~ sh "rm -rf \"#{app_path}/sprites\""~ -** Processing line: ~ sh "rm -rf \"#{app_path}/data\""~ -** Processing line: ~ sh "rm -rf \"#{app_path}/fonts\""~ -** Processing line: ~ sh "cp -r \"#{root_folder}/app/\" \"#{app_path}/app/\""~ -** Processing line: ~ sh "cp -r \"#{root_folder}/sounds/\" \"#{app_path}/sounds/\""~ -** Processing line: ~ sh "cp -r \"#{root_folder}/sprites/\" \"#{app_path}/sprites/\""~ -** Processing line: ~ sh "cp -r \"#{root_folder}/data/\" \"#{app_path}/data/\""~ -** Processing line: ~ sh "cp -r \"#{root_folder}/fonts/\" \"#{app_path}/fonts/\""~ -** Processing line: ~ sh "mkdir -p #{tmp_directory}/ipa_root/Payload"~ -** Processing line: ~ sh "cp -r \"#{app_path}\" \"#{tmp_directory}/ipa_root/Payload\""~ -** Processing line: ~ sh "chmod -R 755 \"#{tmp_directory}/ipa_root/Payload\""~ +** Processing line: ~ def create_payload_directory_prod~ +** Processing line: ~ # production builds does not hotload ip address~ +** Processing line: ~ sh %Q[rm "#{root_folder}/app/server_ip_address.txt"]~ +** Processing line: ~~ +** Processing line: ~ embed_mobileprovision~ +** Processing line: ~ stage_app~ +** Processing line: ~~ +** Processing line: ~ # production build marker~ +** Processing line: ~ sh %Q[mkdir -p "#{app_path}/metadata/"]~ +** Processing line: ~ sh %Q[touch metadata/DRAGONRUBY_PRODUCTION_BUILD]~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ def create_ipa~ @@ -223883,10 +235560,22 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ def print_publish_help~ -** Processing line: ~ log_info "Go to https://appstoreconnect.apple.com/apps and create an App if you haven't already done so."~ -** Processing line: ~ log_info "Go to https://appleid.apple.com and create a 'Application Specific Password'."~ -** Processing line: ~ log_info "To upload your app, Download Transporter from the App Store https://apps.apple.com/us/app/transporter/id1450874784?mt=12."~ -** Processing line: ~ log_info "Your app is located at ./tmp/ios/#{@app_name}.ipa"~ +** Processing line: ~ has_transporter = (sh "ls /Applications/Transporter.app").include? "Contents"~ +** Processing line: ~ if !has_transporter~ +** Processing line: ~ $gtk.openurl "https://apps.apple.com/us/app/transporter/id1450874784?mt=12"~ +** Processing line: ~ $console.set_command "$wizards.ios.start env: :#{@opts[:env]}, version: \"#{@opts[:version]}\""~ +** Processing line: ~ raise WizardException.new(~ +** Processing line: ~ "* To upload your app, Download Transporter from the App Store https://apps.apple.com/us/app/transporter/id1450874784?mt=12."~ +** Processing line: ~ )~ +** Processing line: ~ else~ +** Processing line: ~ sh "mkdir ./tmp/ios/intermediary_artifacts"~ +** Processing line: ~ sh "mv \"#{tmp_directory}/#{@app_name}.app\" #{tmp_directory}/intermediary_artifacts/"~ +** Processing line: ~ sh "mv \"#{tmp_directory}/do_zip.sh\" #{tmp_directory}/intermediary_artifacts"~ +** Processing line: ~ sh "mv \"#{tmp_directory}/Entitlements.plist\" #{tmp_directory}/intermediary_artifacts"~ +** Processing line: ~ sh "mv \"#{tmp_directory}/ipa_root\" #{tmp_directory}/intermediary_artifacts/"~ +** Processing line: ~ sh "open /Applications/Transporter.app"~ +** Processing line: ~ sh "open ./tmp/ios/"~ +** Processing line: ~ end~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ def compile_icons~ @@ -223907,6 +235596,26 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ sh "cp -r \"#{root_folder}/native/\" \"#{app_path}/native/\""~ ** Processing line: ~ sh "CODESIGN_ALLOCATE=\"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate\" /usr/bin/codesign -f -s \"#{@certificate_name}\" --entitlements #{tmp_directory}/Entitlements.plist \"#{tmp_directory}/#{@app_name}.app/native/ios-device/ext.dylib\""~ ** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def set_version version~ +** Processing line: ~ @app_version = version~ +** Processing line: ~ start env: @opts[:env], version: version~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def app_version~ +** Processing line: ~ log_info "Attempting to retrieve App Version from metadata/ios_metadata.txt."~ +** Processing line: ~ ios_version_number = (ios_metadata.version || "").strip~ +** Processing line: ~ if ios_version_number.length == 0~ +** Processing line: ~ log_info "Not found. Attempting to retrieve App Version from metadata/game_metadata.txt."~ +** Processing line: ~ ios_version_number = (game_metadata.version || "").strip~ +** Processing line: ~ end~ +** Processing line: ~ ios_version_number~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def determine_app_version~ +** Processing line: ~ @app_version = app_version~ +** Processing line: ~ return if @app_version~ +** Processing line: ~ end~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~#+end_src~ @@ -223933,38 +235642,14 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ # MIT License~ ** Processing line: ~ # itch_wizard.rb has been released under MIT (*only this file*).~ ** Processing line: ~~ -** Processing line: ~ class ItchWizard~ +** Processing line: ~ class ItchWizard < Wizard~ ** Processing line: ~ def steps~ ** Processing line: ~ [~ ** Processing line: ~ :check_metadata,~ -** Processing line: ~ :deploy~ +** Processing line: ~ :deploy,~ ** Processing line: ~ ]~ ** Processing line: ~ end~ ** Processing line: ~~ -** Processing line: ~ def metadata_file_path~ -** Processing line: ~ "metadata/game_metadata.txt"~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ def get_metadata~ -** Processing line: ~ metadata = $gtk.read_file metadata_file_path~ -** Processing line: ~~ -** Processing line: ~ if !metadata~ -** Processing line: ~ write_blank_metadata~ -** Processing line: ~ metadata = $gtk.read_file metadata_file_path~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ dev_id, dev_title, game_id, game_title, version, icon = *metadata.each_line.to_a~ -** Processing line: ~~ -** Processing line: ~ {~ -** Processing line: ~ dev_id: dev_id.strip,~ -** Processing line: ~ dev_title: dev_title.strip,~ -** Processing line: ~ game_id: game_id.strip,~ -** Processing line: ~ game_title: game_title.strip,~ -** Processing line: ~ version: version.strip,~ -** Processing line: ~ icon: icon.strip~ -** Processing line: ~ }~ -** Processing line: ~ end~ -** Processing line: ~~ ** Processing line: ~ def write_blank_metadata~ ** Processing line: ~ $gtk.write_file metadata_file_path, <<-S.strip~ ** Processing line: ~ #devid=myname~ @@ -223982,7 +235667,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ write_blank_metadata~ ** Processing line: ~ end~ ** Processing line: ~~ -** Processing line: ~ if metadata_text.each_line.to_a.length != 6~ +** Processing line: ~ if metadata_text.strip.each_line.to_a.length < 6~ ** Processing line: ~ write_blank_metadata~ ** Processing line: ~ end~ ** Processing line: ~~ @@ -223994,70 +235679,67 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~~ ** Processing line: ~ if metadata[:dev_id].start_with?("#") || !@dev_id~ ** Processing line: ~ log "* PROMPT: Please provide your username for Itch."~ -** Processing line: ~ $console.set_command "$wizards.itch.set_dev_id \"your-itch-username\""~ +** Processing line: ~ $console.set_command "$wizards.itch.set_dev_id \"#{metadata[:dev_id]}\""~ ** Processing line: ~ return :need_dev_id~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ if metadata[:dev_title].start_with?("#") || !@dev_title~ ** Processing line: ~ log "* PROMPT: Please provide developer's/company's name that you want displayed."~ -** Processing line: ~ $console.set_command "$wizards.itch.set_dev_title \"Your Name\""~ +** Processing line: ~ $console.set_command "$wizards.itch.set_dev_title \"#{metadata[:dev_title]}\""~ ** Processing line: ~ return :need_dev_title~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ if metadata[:game_id].start_with?("#") || !@game_id~ ** Processing line: ~ log "* PROMPT: Please provide the id for you game. This is the id you specified when you set up a new game page on Itch."~ -** Processing line: ~ $console.set_command "$wizards.itch.set_game_id \"your-game-id\""~ +** Processing line: ~ $console.set_command "$wizards.itch.set_game_id \"#{metadata[:game_id]}\""~ ** Processing line: ~ return :need_game_id~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ if metadata[:game_title].start_with?("#") || !@game_title~ ** Processing line: ~ log "* PROMPT: Please provide the display name for your game. (This can include spaces)"~ -** Processing line: ~ $console.set_command "$wizards.itch.set_game_title \"Your Game\""~ +** Processing line: ~ $console.set_command "$wizards.itch.set_game_title \"#{metadata[:game_title]}\""~ ** Processing line: ~ return :need_game_title~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ if metadata[:version].start_with?("#") || !@version~ ** Processing line: ~ log "* PROMPT: Please provide the version for your game."~ -** Processing line: ~ $console.set_command "$wizards.itch.set_version \"1.0\""~ +** Processing line: ~ $console.set_command "$wizards.itch.set_version \"#{metadata[:version]}\""~ ** Processing line: ~ return :need_version~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ if metadata[:icon].start_with?("#") || !@icon~ ** Processing line: ~ log "* PROMPT: Please provide icon path for your game."~ -** Processing line: ~ $console.set_command "$wizards.itch.set_icon \"icon.png\""~ +** Processing line: ~ $console.set_command "$wizards.itch.set_icon \"#{metadata[:icon]}\""~ ** Processing line: ~ return :need_icon~ ** Processing line: ~ end~ ** Processing line: ~~ +** Processing line: ~ puts "here!! success!!!"~ +** Processing line: ~~ ** Processing line: ~ return :success~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ def set_dev_id value~ ** Processing line: ~ @dev_id = value~ -** Processing line: ~ write_metadata~ ** Processing line: ~ start~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ def set_dev_title value~ ** Processing line: ~ @dev_title = value~ -** Processing line: ~ write_metadata~ ** Processing line: ~ start~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ def set_game_id value~ ** Processing line: ~ @game_id = value~ -** Processing line: ~ write_metadata~ ** Processing line: ~ start~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ def set_game_title value~ ** Processing line: ~ @game_title = value~ -** Processing line: ~ write_metadata~ ** Processing line: ~ start~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ def set_version value~ ** Processing line: ~ @version = value~ -** Processing line: ~ write_metadata~ ** Processing line: ~ start~ ** Processing line: ~ end~ ** Processing line: ~~ @@ -224100,7 +235782,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ if @icon~ -** Processing line: ~ text += "icon=metadata/#{@icon}\n"~ +** Processing line: ~ text += "icon=#{@icon}\n"~ ** Processing line: ~ else~ ** Processing line: ~ text += "#icon=metadata/icon.png\n"~ ** Processing line: ~ end~ @@ -224118,10 +235800,25 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~~ ** Processing line: ~ def deploy~ ** Processing line: ~ log_info "* Running dragonruby-publish: #{package_command}"~ -** Processing line: ~ results = $gtk.exec package_command~ +** Processing line: ~ $gtk.openurl "http://itch.io/dashboard" if $gtk.platform == "Mac OS X"~ +** Processing line: ~ if $gtk.platform? :mac~ +** Processing line: ~ $gtk.exec "rm -rf ./builds"~ +** Processing line: ~ end~ +** Processing line: ~ results = $gtk.exec "#{package_command} --only-package"~ +** Processing line: ~ puts File.expand_path("./builds")~ +** Processing line: ~~ ** Processing line: ~ log "#+begin_src"~ ** Processing line: ~ log results~ ** Processing line: ~ log "#+end_src"~ +** Processing line: ~~ +** Processing line: ~ if $gtk.platform? :mac~ +** Processing line: ~ $gtk.exec "open ./builds/"~ +** Processing line: ~ elsif $gtk.platform? :windows~ +** Processing line: ~ $gtk.exec "powershell \"ii .\""~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ $gtk.openurl "https://itch.io/dashboard"~ +** Processing line: ~~ ** Processing line: ~ :success~ ** Processing line: ~ end~ ** Processing line: ~~ @@ -224132,7 +235829,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ steps.each do |m|~ ** Processing line: ~ begin~ ** Processing line: ~ log_info "Running Itch Wizard Step: ~$wizards.itch.#{m}~"~ -** Processing line: ~ result = (send m) || :success if @wizard_status[m][:result] != :success~ +** Processing line: ~ result = (send m) || :success~ ** Processing line: ~ @wizard_status[m][:result] = result~ ** Processing line: ~ if result != :success~ ** Processing line: ~ log_info "Exiting wizard. :#{result}"~ @@ -224496,10 +236193,18 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ device.grid_area.row_count~ ** Processing line: ~ end~ ** Processing line: ~~ +** Processing line: ~ def row_max_index~ +** Processing line: ~ row_count - 1~ +** Processing line: ~ end~ +** Processing line: ~~ ** Processing line: ~ def col_count~ ** Processing line: ~ device.grid_area.col_count~ ** Processing line: ~ end~ ** Processing line: ~~ +** Processing line: ~ def col_max_index~ +** Processing line: ~ col_count - 1~ +** Processing line: ~ end~ +** Processing line: ~~ ** Processing line: ~ def gutter_height~ ** Processing line: ~ device.grid_area.gutter~ ** Processing line: ~ end~ @@ -224522,18 +236227,124 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~~ ** Processing line: ~ def rect_defaults~ ** Processing line: ~ {~ -** Processing line: ~ row: nil,~ -** Processing line: ~ col: nil,~ -** Processing line: ~ h: 1,~ -** Processing line: ~ w: 1,~ -** Processing line: ~ dx: 0,~ -** Processing line: ~ dy: 0,~ -** Processing line: ~ rect: :control_rect~ +** Processing line: ~ row: nil,~ +** Processing line: ~ col: nil,~ +** Processing line: ~ h: 1,~ +** Processing line: ~ w: 1,~ +** Processing line: ~ dx: 0,~ +** Processing line: ~ dx_ratio: 1,~ +** Processing line: ~ dy: 0,~ +** Processing line: ~ dy_ratio: 1,~ +** Processing line: ~ dh_ratio: 1,~ +** Processing line: ~ dw_ratio: 1,~ +** Processing line: ~ merge: nil,~ +** Processing line: ~ rect: :control_rect~ ** Processing line: ~ }~ ** Processing line: ~ end~ ** Processing line: ~~ -** Processing line: ~ def rect opts~ +** Processing line: ~ def row n~ +** Processing line: ~ (rect row: n, col: 0, w: 0, h: 0).x~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def row_from_bottom n~ +** Processing line: ~ (rect row: row_count - n, col: 0, w: 0, h: 0).x~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def col n~ +** Processing line: ~ (rect row: 0, col: n, w: 0, h: 0).y~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def col_from_right n~ +** Processing line: ~ (rect row: 0, col: col_max_index - n, w: 0, h: 0).y~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def w n~ +** Processing line: ~ (rect row: 0, col: 0, w: n, h: 1).w~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def h n~ +** Processing line: ~ (rect row: 0, col: 0, w: 1, h: n).h~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def rect_group opts~ +** Processing line: ~ group = opts.group~ +** Processing line: ~ r = opts.row || 0~ +** Processing line: ~ r = row_max_index - opts.row_from_bottom if opts.row_from_bottom~ +** Processing line: ~ c = opts.col || 0~ +** Processing line: ~ c = col_max_index - opts.col_from_right if opts.col_from_right~ +** Processing line: ~ drow = opts.drow || 0~ +** Processing line: ~ dcol = opts.dcol || 0~ +** Processing line: ~ w = opts.w || 0~ +** Processing line: ~ h = opts.h || 0~ +** Processing line: ~ merge = opts[:merge]~ +** Processing line: ~~ +** Processing line: ~ running_row = r~ +** Processing line: ~ running_col = c~ +** Processing line: ~~ +** Processing line: ~ running_col = calc_col_offset(opts.col_offset) if opts.col_offset~ +** Processing line: ~ running_row = calc_row_offset(opts.row_offset) if opts.row_offset~ +** Processing line: ~~ +** Processing line: ~ group.map do |i|~ +** Processing line: ~ group_layout_opts = i.layout || {}~ +** Processing line: ~ group_layout_opts = group_layout_opts.merge row: running_row,~ +** Processing line: ~ col: running_col,~ +** Processing line: ~ merge: merge,~ +** Processing line: ~ w: w, h: h~ +** Processing line: ~ result = (rect group_layout_opts).merge i~ +** Processing line: ~~ +** Processing line: ~ if (i.is_a? Hash) && (i.primitive_marker == :label)~ +** Processing line: ~ if i.alignment_enum == 1~ +** Processing line: ~ result.x += result.w.half~ +** Processing line: ~ elsif i.alignment_enum == 2~ +** Processing line: ~ result.x += result.w~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ running_row += drow~ +** Processing line: ~ running_col += dcol~ +** Processing line: ~ result~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def calc_row_offset opts = {}~ +** Processing line: ~ count = opts[:count] || opts[:length] || 0~ +** Processing line: ~ h = opts.h || 1~ +** Processing line: ~ (row_count - (count * h)) / 2.0~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def calc_col_offset opts = {}~ +** Processing line: ~ count = opts[:count] || opts[:length] || 0~ +** Processing line: ~ w = opts.w || 1~ +** Processing line: ~ (col_count - (count * w)) / 2.0~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def point opts = {}~ +** Processing line: ~ opts.w = 1~ +** Processing line: ~ opts.h = 1~ +** Processing line: ~ opts.row ||= 0~ +** Processing line: ~ opts.col ||= 0~ +** Processing line: ~ r = rect opts~ +** Processing line: ~ r.x += r.w * opts.col_anchor if opts.col_anchor~ +** Processing line: ~ r.y += r.h * opts.row_anchor if opts.row_anchor~ +** Processing line: ~ r~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def rect *all_opts~ +** Processing line: ~ if all_opts.length == 1~ +** Processing line: ~ opts = all_opts.first~ +** Processing line: ~ else~ +** Processing line: ~ opts = {}~ +** Processing line: ~ all_opts.each do |o|~ +** Processing line: ~ opts.merge! o~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ opts.row = row_max_index - opts.row_from_bottom if opts.row_from_bottom~ +** Processing line: ~ opts.col = col_max_index - opts.col_from_right if opts.col_from_right~ ** Processing line: ~ opts = rect_defaults.merge opts~ +** Processing line: ~ opts.row ||= 0~ +** Processing line: ~ opts.col ||= 0~ +** Processing line: ~~ ** Processing line: ~ result = send opts[:rect]~ ** Processing line: ~ if opts[:row] && opts[:col] && opts[:w] && opts[:h]~ ** Processing line: ~ col = rect_col opts[:col], opts[:w]~ @@ -224541,7 +236352,9 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ result = control_rect.merge x: col.x,~ ** Processing line: ~ y: row.y,~ ** Processing line: ~ w: col.w,~ -** Processing line: ~ h: row.h~ +** Processing line: ~ h: row.h,~ +** Processing line: ~ center_x: col.center_x,~ +** Processing line: ~ center_y: row.center_y~ ** Processing line: ~ elsif opts[:row] && !opts[:col]~ ** Processing line: ~ result = rect_row opts[:row], opts[:h]~ ** Processing line: ~ elsif !opts[:row] && opts[:col]~ @@ -224579,13 +236392,21 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ result[:h] += device.grid_area.gutter * 2~ ** Processing line: ~ end~ ** Processing line: ~~ -** Processing line: ~ result[:x] += opts[:dx] if opts[:dx]~ -** Processing line: ~ result[:y] += opts[:dy] if opts[:dy]~ -** Processing line: ~ result[:w] += opts[:dw] if opts[:dw]~ -** Processing line: ~ result[:h] += opts[:dh] if opts[:dh]~ +** Processing line: ~ result[:x] += opts[:dx] if opts[:dx]~ +** Processing line: ~ result[:x] *= opts[:dx_ratio] if opts[:dx_ratio]~ +** Processing line: ~ result[:y] += opts[:dy] if opts[:dy]~ +** Processing line: ~ result[:y] *= opts[:dy_ratio] if opts[:dy_ratio]~ +** Processing line: ~ result[:w] += opts[:dw] if opts[:dw]~ +** Processing line: ~ result[:w] *= opts[:dw_ratio] if opts[:dw_ratio]~ +** Processing line: ~ result[:h] += opts[:dh] if opts[:dh]~ +** Processing line: ~ result[:h] *= opts[:dh_ratio] if opts[:dh_ratio]~ +** Processing line: ~ result.merge! opts[:merge] if opts[:merge]~ ** Processing line: ~ result[:row] = opts[:row]~ ** Processing line: ~ result[:col] = opts[:col]~ ** Processing line: ~~ +** Processing line: ~ result[:h] = result[:h].clamp 0~ +** Processing line: ~ result[:w] = result[:w].clamp 0~ +** Processing line: ~~ ** Processing line: ~ if $gtk.args.grid.name == :center~ ** Processing line: ~ result[:x] -= 640~ ** Processing line: ~ result[:y] -= 360~ @@ -224620,7 +236441,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~~ ** Processing line: ~ row_y = device.h - row_y - row_h~ ** Processing line: ~~ -** Processing line: ~ result = control_rect.merge y: row_y, h: row_h~ +** Processing line: ~ result = control_rect.merge y: row_y, h: row_h, center_y: (row_y + row_h.half)~ ** Processing line: ~ @rect_cache[:row][index][h] = result~ ** Processing line: ~ @rect_cache[:row][index][h]~ ** Processing line: ~ end~ @@ -224643,7 +236464,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ col_w = col_w.to_i~ ** Processing line: ~ col_w -= 1 if col_w.odd?~ ** Processing line: ~~ -** Processing line: ~ result = control_rect.merge x: col_x, w: col_w~ +** Processing line: ~ result = control_rect.merge x: col_x, w: col_w, center_x: (col_x + col_w.half)~ ** Processing line: ~ @rect_cache[:col][index][w] = result~ ** Processing line: ~ @rect_cache[:col][index][w]~ ** Processing line: ~ end~ @@ -224694,6 +236515,26 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ @device~ ** Processing line: ~ end~ ** Processing line: ~~ +** Processing line: ~ def debug_primitives opts = {}~ +** Processing line: ~ @primitives ||= col_count.map_with_index do |col|~ +** Processing line: ~ row_count.map_with_index do |row|~ +** Processing line: ~ cell = rect row: row, col: col~ +** Processing line: ~ center = Geometry.rect_center_point cell~ +** Processing line: ~ [~ +** Processing line: ~ cell.merge(opts).border,~ +** Processing line: ~ cell.merge(opts)~ +** Processing line: ~ .label!(x: center.x,~ +** Processing line: ~ y: center.y,~ +** Processing line: ~ text: "#{row},#{col}",~ +** Processing line: ~ size_enum: -3,~ +** Processing line: ~ vertical_alignment_enum: 1,~ +** Processing line: ~ alignment_enum: 1)~ +** Processing line: ~ ]~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~ @primitives~ +** Processing line: ~ end~ +** Processing line: ~~ ** Processing line: ~ def serialize~ ** Processing line: ~ {~ ** Processing line: ~ device: @device.serialize,~ @@ -224707,6 +236548,13 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ def to_s~ ** Processing line: ~ serialize.to_s~ ** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def reset~ +** Processing line: ~ @primitives = nil~ +** Processing line: ~ @rect_cache ||= {}~ +** Processing line: ~ @rect_cache.clear~ +** Processing line: ~ end~ +** Processing line: ~~ ** Processing line: ~ end~ ** Processing line: ~ end~ ** Processing line: ~~ @@ -224861,6 +236709,11 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ self.puts message~ ** Processing line: ~ end~ ** Processing line: ~~ +** Processing line: ~ def self.reset~ +** Processing line: ~ @once = {}~ +** Processing line: ~ nil~ +** Processing line: ~ end~ +** Processing line: ~~ ** Processing line: ~ def self.puts_once *ids, message~ ** Processing line: ~ id = "#{ids}"~ ** Processing line: ~ @once ||= {}~ @@ -224999,6 +236852,68 @@ Follows is a source code listing for all files that have been open sourced. This - PRE end detected. ** Processing line: ~~ ** Processing line: ~~ +** Processing line: ~*** metadata.rb~ +- H3 detected. +- Determining if line is a header. +- Line contains ~*** ~... gsub-ing empty string +- Formatting line: ~metadata.rb~ +- Line's tilde count is: 0 +- Line contains link marker: false +- Determining if line is a header. +- Line contains ~*** ~... gsub-ing empty string +- Formatting line: ~metadata.rb~ +- Line's tilde count is: 0 +- Line contains link marker: false +** Processing line: ~~ +** Processing line: ~#+begin_src ruby~ +- PRE start detected. +** Processing line: ~ # ./dragon/metadata.rb~ +** Processing line: ~ # Contributors outside of DragonRuby who also hold Copyright: Michał Dudziński~ +** Processing line: ~ # Copyright 2021 DragonRuby LLC~ +** Processing line: ~ # MIT License~ +** Processing line: ~ # metadata.rb has been released under MIT (*only this file*).~ +** Processing line: ~~ +** Processing line: ~ module Metadata~ +** Processing line: ~ def metadata_file_path~ +** Processing line: ~ "metadata/game_metadata.txt"~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def get_metadata~ +** Processing line: ~ metadata = $gtk.read_file metadata_file_path~ +** Processing line: ~~ +** Processing line: ~ if !metadata~ +** Processing line: ~ write_blank_metadata~ +** Processing line: ~ metadata = $gtk.read_file metadata_file_path~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ dev_id, dev_title, game_id, game_title, version, icon = *metadata.each_line.to_a~ +** Processing line: ~~ +** Processing line: ~ {~ +** Processing line: ~ dev_id: dev_id.strip,~ +** Processing line: ~ dev_title: dev_title.strip,~ +** Processing line: ~ game_id: game_id.strip,~ +** Processing line: ~ game_title: game_title.strip,~ +** Processing line: ~ version: version.strip,~ +** Processing line: ~ icon: icon.strip~ +** Processing line: ~ }~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def write_blank_metadata~ +** Processing line: ~ $gtk.write_file metadata_file_path, <<-S.strip~ +** Processing line: ~ #devid=myname~ +** Processing line: ~ #devtitle=My Name~ +** Processing line: ~ #gameid=mygame~ +** Processing line: ~ #gametitle=My Game~ +** Processing line: ~ #version=0.1~ +** Processing line: ~ #icon=metadata/icon.png~ +** Processing line: ~ S~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~#+end_src~ +- PRE end detected. +** Processing line: ~~ +** Processing line: ~~ ** Processing line: ~*** numeric.rb~ - H3 detected. - Determining if line is a header. @@ -225030,6 +236945,35 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ alias_method :lte, :<=~ ** Processing line: ~ alias_method :__original_eq_eq__, :== unless Numeric.instance_methods.include? :__original_eq_eq__~ ** Processing line: ~~ +** Processing line: ~ def to_layout_row opts = {}~ +** Processing line: ~ $layout.rect(row: self,~ +** Processing line: ~ col: opts.col || 0,~ +** Processing line: ~ w: opts.w || 0,~ +** Processing line: ~ h: opts.h || 0).y~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def to_layout_col opts = {}~ +** Processing line: ~ $layout.rect(row: 0,~ +** Processing line: ~ col: self,~ +** Processing line: ~ w: opts.w || 0,~ +** Processing line: ~ h: opts.h || 0).x~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def to_layout_w~ +** Processing line: ~ $layout.rect(row: 0, col: 0, w: self, h: 1).w~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def to_layout_h~ +** Processing line: ~ $layout.rect(row: 0, col: 0, w: 1, h: self).h~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def to_layout_row_from_bottom opts = {}~ +** Processing line: ~ ($layout.row_max_index - self).to_layout_row opts~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def to_layout_col_from_right opts = {}~ +** Processing line: ~ ($layout.col_max_index - self).to_layout_col opts~ +** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ # Converts a numeric value representing seconds into frames.~ ** Processing line: ~ #~ @@ -225045,10 +236989,26 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ self / 2.0~ ** Processing line: ~ end~ ** Processing line: ~~ +** Processing line: ~ def third~ +** Processing line: ~ self / 3.0~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def quarter~ +** Processing line: ~ self / 4.0~ +** Processing line: ~ end~ +** Processing line: ~~ ** Processing line: ~ def to_byte~ ** Processing line: ~ clamp(0, 255).to_i~ ** Processing line: ~ end~ ** Processing line: ~~ +** Processing line: ~ def clamp *opts~ +** Processing line: ~ min = (opts.at 0)~ +** Processing line: ~ max = (opts.at 1)~ +** Processing line: ~ return min if min && self < min~ +** Processing line: ~ return max if max && self > max~ +** Processing line: ~ return self~ +** Processing line: ~ end~ +** Processing line: ~~ ** Processing line: ~ def clamp_wrap min, max~ ** Processing line: ~ max, min = min, max if min > max~ ** Processing line: ~ return self if self >= min && self <= max~ @@ -225273,7 +237233,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ self * Math::PI.fdiv(180)~ ** Processing line: ~ end~ ** Processing line: ~~ -** Processing line: ~ # Converts a number representing an angle in radians to degress.~ +** Processing line: ~ # Converts a number representing an angle in radians to degrees.~ ** Processing line: ~ #~ ** Processing line: ~ # @gtk~ ** Processing line: ~ def to_degrees~ @@ -225290,21 +237250,21 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ GTK::Geometry.to_square(self, x, y, anchor_x, anchor_y)~ ** Processing line: ~ end~ ** Processing line: ~~ -** Processing line: ~ # Returns a normal vector for a number that represents an angle in degress.~ +** Processing line: ~ # Returns a normal vector for a number that represents an angle in degrees.~ ** Processing line: ~ #~ ** Processing line: ~ # @gtk~ ** Processing line: ~ def vector max_value = 1~ ** Processing line: ~ [vector_x(max_value), vector_y(max_value)]~ ** Processing line: ~ end~ ** Processing line: ~~ -** Processing line: ~ # Returns the y component of a normal vector for a number that represents an angle in degress.~ +** Processing line: ~ # Returns the y component of a normal vector for a number that represents an angle in degrees.~ ** Processing line: ~ #~ ** Processing line: ~ # @gtk~ ** Processing line: ~ def vector_y max_value = 1~ ** Processing line: ~ max_value * Math.sin(self.to_radians)~ ** Processing line: ~ end~ ** Processing line: ~~ -** Processing line: ~ # Returns the x component of a normal vector for a number that represents an angle in degress.~ +** Processing line: ~ # Returns the x component of a normal vector for a number that represents an angle in degrees.~ ** Processing line: ~ #~ ** Processing line: ~ # @gtk~ ** Processing line: ~ def vector_x max_value = 1~ @@ -225331,6 +237291,18 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ (self % n) == 0~ ** Processing line: ~ end~ ** Processing line: ~~ +** Processing line: ~ def multiply n~ +** Processing line: ~ self * n~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def fmult n~ +** Processing line: ~ self * n.to_f~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def imult n~ +** Processing line: ~ (self * n).to_i~ +** Processing line: ~ end~ +** Processing line: ~~ ** Processing line: ~ def mult n~ ** Processing line: ~ self * n~ ** Processing line: ~ end~ @@ -225452,12 +237424,6 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ return gt other~ ** Processing line: ~ end~ ** Processing line: ~~ -** Processing line: ~ def == other~ -** Processing line: ~ return true if __original_eq_eq__ other~ -** Processing line: ~ return __original_eq_eq__ other.entity_id if other.is_a? OpenEntity~ -** Processing line: ~ return false~ -** Processing line: ~ end~ -** Processing line: ~~ ** Processing line: ~ # @gtk~ ** Processing line: ~ def map~ ** Processing line: ~ unless block_given?~ @@ -225544,29 +237510,29 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ def - other~ -** Processing line: ~ return nil unless other~ -** Processing line: ~ super~ +** Processing line: ~ return self unless other~ +** Processing line: ~ self - other~ ** Processing line: ~ rescue Exception => e~ ** Processing line: ~ __raise_arithmetic_exception__ other, :-, e~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ def + other~ -** Processing line: ~ return nil unless other~ -** Processing line: ~ super~ +** Processing line: ~ return self unless other~ +** Processing line: ~ self + other~ ** Processing line: ~ rescue Exception => e~ ** Processing line: ~ __raise_arithmetic_exception__ other, :+, e~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ def * other~ -** Processing line: ~ return nil unless other~ -** Processing line: ~ super~ +** Processing line: ~ return self unless other~ +** Processing line: ~ self * other~ ** Processing line: ~ rescue Exception => e~ ** Processing line: ~ __raise_arithmetic_exception__ other, :*, e~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ def / other~ -** Processing line: ~ return nil unless other~ -** Processing line: ~ super~ +** Processing line: ~ return self unless other~ +** Processing line: ~ self / other~ ** Processing line: ~ rescue Exception => e~ ** Processing line: ~ __raise_arithmetic_exception__ other, :/, e~ ** Processing line: ~ end~ @@ -225596,6 +237562,10 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ def self.clamp n, min, max~ ** Processing line: ~ n.clamp min, max~ ** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def mid? l, r~ +** Processing line: ~ (between? l, r) || (between? r, l)~ +** Processing line: ~ end~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ class Fixnum~ @@ -225622,39 +237592,33 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ def + other~ -** Processing line: ~ return nil unless other~ -** Processing line: ~ super~ +** Processing line: ~ return self unless other~ +** Processing line: ~ self + other~ ** Processing line: ~ rescue Exception => e~ ** Processing line: ~ __raise_arithmetic_exception__ other, :+, e~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ def * other~ -** Processing line: ~ return nil unless other~ -** Processing line: ~ super~ +** Processing line: ~ return self unless other~ +** Processing line: ~ self * other~ ** Processing line: ~ rescue Exception => e~ ** Processing line: ~ __raise_arithmetic_exception__ other, :*, e~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ def / other~ -** Processing line: ~ return nil unless other~ -** Processing line: ~ super~ +** Processing line: ~ return self unless other~ +** Processing line: ~ self / other~ ** Processing line: ~ rescue Exception => e~ ** Processing line: ~ __raise_arithmetic_exception__ other, :/, e~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ def - other~ -** Processing line: ~ return nil unless other~ -** Processing line: ~ super~ +** Processing line: ~ return self unless other~ +** Processing line: ~ self - other~ ** Processing line: ~ rescue Exception => e~ ** Processing line: ~ __raise_arithmetic_exception__ other, :-, e~ ** Processing line: ~ end~ ** Processing line: ~~ -** Processing line: ~ def == other~ -** Processing line: ~ return true if __original_eq_eq__ other~ -** Processing line: ~ return __original_eq_eq__ other.entity_id if other.is_a? GTK::OpenEntity~ -** Processing line: ~ return false~ -** Processing line: ~ end~ -** Processing line: ~~ ** Processing line: ~ # Returns `-1` if the number is less than `0`. `+1` if the number~ ** Processing line: ~ # is greater than `0`. Returns `0` if the number is equal to `0`.~ ** Processing line: ~ #~ @@ -225711,28 +237675,28 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ alias_method :__original_divide__, :- unless Float.instance_methods.include? :__original_divide__~ ** Processing line: ~~ ** Processing line: ~ def - other~ -** Processing line: ~ return nil unless other~ +** Processing line: ~ return self unless other~ ** Processing line: ~ super~ ** Processing line: ~ rescue Exception => e~ ** Processing line: ~ __raise_arithmetic_exception__ other, :-, e~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ def + other~ -** Processing line: ~ return nil unless other~ +** Processing line: ~ return self unless other~ ** Processing line: ~ super~ ** Processing line: ~ rescue Exception => e~ ** Processing line: ~ __raise_arithmetic_exception__ other, :+, e~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ def * other~ -** Processing line: ~ return nil unless other~ +** Processing line: ~ return self unless other~ ** Processing line: ~ super~ ** Processing line: ~ rescue Exception => e~ ** Processing line: ~ __raise_arithmetic_exception__ other, :*, e~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ def / other~ -** Processing line: ~ return nil unless other~ +** Processing line: ~ return self unless other~ ** Processing line: ~ super~ ** Processing line: ~ rescue Exception => e~ ** Processing line: ~ __raise_arithmetic_exception__ other, :/, e~ @@ -225779,6 +237743,10 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ def nan?~ ** Processing line: ~ false~ ** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def center other~ +** Processing line: ~ (self - other).abs.fdiv(2)~ +** Processing line: ~ end~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~#+end_src~ @@ -225850,7 +237818,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ def local_state~ ** Processing line: ~ @local_state ||= OpenEntity.new~ ** Processing line: ~ @local_state.hotload_client ||= @local_state.new_entity(:hotload_client,~ -** Processing line: ~ notes: "This enitity is used by DragonRuby Game Toolkit to provide you hotloading on remote machines.",~ +** Processing line: ~ notes: "This entity is used by DragonRuby Game Toolkit to provide you hotloading on remote machines.",~ ** Processing line: ~ changes: { },~ ** Processing line: ~ changes_queue: [],~ ** Processing line: ~ reloaded_files_times: [])~ @@ -226041,7 +238009,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ sub_index = index - previous_line[:sum]~ ** Processing line: ~ word = (cursor_line[:line][0..sub_index - 1]).strip~ ** Processing line: ~ token = (word.split " ")[-1]~ -** Processing line: ~ dots = (token.split ".")~ +** Processing line: ~ dots = (token.split ".").flat_map { |s| s.split "[" }.flat_map { |s| s.split "]" }.flat_map { |s| s.split "(" }.flat_map { |s| s.split ")" }~ ** Processing line: ~ dot = dots[-1]~ ** Processing line: ~ end~ ** Processing line: ~~ @@ -226062,6 +238030,10 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ ignores ||= []~ ** Processing line: ~ ignores = [ignores].flatten~ ** Processing line: ~ keys = keys.map { |k| k.to_s }~ +** Processing line: ~ keys = keys.reject { |k| k.include? '"' }~ +** Processing line: ~ .reject { |k| k.start_with? "'" }~ +** Processing line: ~ .reject { |k| k.include? "," }~ +** Processing line: ~ .reject { |k| k.start_with? "#" }~ ** Processing line: ~ others = ["def", "end"] +~ ** Processing line: ~ [ :entity_keys_by_ref,~ ** Processing line: ~ :entity_name,~ @@ -226119,6 +238091,10 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~~ ** Processing line: ~ return autocomplete_filter_methods lookup_result.call if lookup_result~ ** Processing line: ~~ +** Processing line: ~ if dot[0].upcase == dot[0] && (Object.const_defined? dot.to_sym)~ +** Processing line: ~ return (Object.const_get dot.to_sym).autocomplete_methods~ +** Processing line: ~ end~ +** Processing line: ~~ ** Processing line: ~ start_collecting = false~ ** Processing line: ~ dots_after_state = dots.find_all do |s|~ ** Processing line: ~ if s == "state"~ @@ -226134,10 +238110,16 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ target = target.as_hash[k.to_sym] if target.respond_to? :as_hash~ ** Processing line: ~ end~ ** Processing line: ~~ -** Processing line: ~ return autocomplete_filter_methods target.as_hash.keys~ +** Processing line: ~ if target.respond_to? :as_hash~ +** Processing line: ~ return autocomplete_filter_methods target.as_hash.keys~ +** Processing line: ~ else~ +** Processing line: ~ return autocomplete_filter_methods target.autocomplete_methods~ +** Processing line: ~ end~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~~ +** Processing line: ~ text = text.each_line.reject { |l| l.strip.start_with? "#" }.join "\n"~ +** Processing line: ~ text = text.each_line.map { |l| l.split("#").first }.join "\n"~ ** Processing line: ~ text.gsub!("[", " ")~ ** Processing line: ~ text.gsub!("]", " ")~ ** Processing line: ~ text.gsub!("(", " ")~ @@ -226156,167 +238138,186 @@ Follows is a source code listing for all files that have been open sourced. This - PRE end detected. ** Processing line: ~~ ** Processing line: ~~ -** Processing line: ~*** runtime/draw.rb~ +** Processing line: ~*** runtime/benchmark.rb~ - H3 detected. - Determining if line is a header. - Line contains ~*** ~... gsub-ing empty string -- Formatting line: ~runtime/draw.rb~ +- Formatting line: ~runtime/benchmark.rb~ - Line's tilde count is: 0 - Line contains link marker: false - Determining if line is a header. - Line contains ~*** ~... gsub-ing empty string -- Formatting line: ~runtime/draw.rb~ +- Formatting line: ~runtime/benchmark.rb~ - Line's tilde count is: 0 - Line contains link marker: false ** Processing line: ~~ ** Processing line: ~#+begin_src ruby~ - PRE start detected. -** Processing line: ~ # ./dragon/runtime/draw.rb~ +** Processing line: ~ # ./dragon/runtime/benchmark.rb~ ** Processing line: ~ # Copyright 2019 DragonRuby LLC~ ** Processing line: ~ # MIT License~ -** Processing line: ~ # draw.rb has been released under MIT (*only this file*).~ +** Processing line: ~ # benchmark.rb has been released under MIT (*only this file*).~ ** Processing line: ~~ ** Processing line: ~ module GTK~ ** Processing line: ~ class Runtime~ -** Processing line: ~ module Draw~ -** Processing line: ~ def primitives pass~ -** Processing line: ~ if $top_level.respond_to? :primitives_override~ -** Processing line: ~ return $top_level.tick_render @args, pass~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ # Don't change this draw order unless you understand~ -** Processing line: ~ # the implications.~ -** Processing line: ~~ -** Processing line: ~ # pass.solids.each { |s| draw_solid s }~ -** Processing line: ~ # while loops are faster than each with block~ +** Processing line: ~ module Benchmark~ +** Processing line: ~ def benchmark_single iterations, name, proc~ +** Processing line: ~ log <<-S~ +** Processing line: ~ ** Invoking :#{name}...~ +** Processing line: ~ S~ +** Processing line: ~ time_start = Time.now~ ** Processing line: ~ idx = 0~ -** Processing line: ~ length = pass.solids.length~ -** Processing line: ~ while idx < pass.solids.length~ -** Processing line: ~ draw_solid (pass.solids.at idx) # accessing an array using .value instead of [] is faster~ +** Processing line: ~ r = nil~ +** Processing line: ~ while idx < iterations~ +** Processing line: ~ r = proc.call~ ** Processing line: ~ idx += 1~ ** Processing line: ~ end~ ** Processing line: ~~ -** Processing line: ~ # pass.static_solids.each { |s| draw_solid s }~ -** Processing line: ~ idx = 0~ -** Processing line: ~ length = pass.static_solids.length~ -** Processing line: ~ while idx < length~ -** Processing line: ~ draw_solid (pass.static_solids.at idx)~ -** Processing line: ~ idx += 1~ -** Processing line: ~ end~ +** Processing line: ~ result = (Time.now - time_start).round 3~ ** Processing line: ~~ -** Processing line: ~ # pass.sprites.each { |s| draw_sprite s }~ -** Processing line: ~ idx = 0~ -** Processing line: ~ length = pass.sprites.length~ -** Processing line: ~ while idx < length~ -** Processing line: ~ draw_sprite (pass.sprites.at idx)~ -** Processing line: ~ idx += 1~ -** Processing line: ~ end~ +** Processing line: ~ { name: name,~ +** Processing line: ~ time: result,~ +** Processing line: ~ time_ms: (result * 1000).to_i }~ +** Processing line: ~ end~ ** Processing line: ~~ -** Processing line: ~ # pass.static_sprites.each { |s| draw_sprite s }~ -** Processing line: ~ idx = 0~ -** Processing line: ~ length = pass.static_sprites.length~ -** Processing line: ~ while idx < length~ -** Processing line: ~ draw_sprite (pass.static_sprites.at idx)~ -** Processing line: ~ idx += 1~ -** Processing line: ~ end~ +** Processing line: ~ def benchmark opts = {}~ +** Processing line: ~ iterations = opts.iterations~ ** Processing line: ~~ -** Processing line: ~ # pass.primitives.each { |p| draw_primitive p }~ -** Processing line: ~ idx = 0~ -** Processing line: ~ length = pass.primitives.length~ -** Processing line: ~ while idx < length~ -** Processing line: ~ draw_primitive (pass.primitives.at idx)~ -** Processing line: ~ idx += 1~ -** Processing line: ~ end~ +** Processing line: ~ log <<-S~ +** Processing line: ~ * BENCHMARK: Started~ +** Processing line: ~ ** Caller: #{(caller || []).first}~ +** Processing line: ~ ** Iterations: #{iterations}~ +** Processing line: ~ S~ +** Processing line: ~ procs = opts.find_all { |k, v| v.respond_to? :call }~ +** Processing line: ~~ +** Processing line: ~ times = procs.map do |(name, proc)|~ +** Processing line: ~ benchmark_single iterations, name, proc~ +** Processing line: ~ end.sort_by { |r| r.time }~ +** Processing line: ~~ +** Processing line: ~ first_place = times.first~ +** Processing line: ~ second_place = times.second || first_place~ +** Processing line: ~~ +** Processing line: ~ times = times.map do |candidate|~ +** Processing line: ~ average_time = first_place.time~ +** Processing line: ~ .add(candidate.time)~ +** Processing line: ~ .abs~ +** Processing line: ~ .fdiv(2)~ +** Processing line: ~~ +** Processing line: ~ difference_percentage = 0~ +** Processing line: ~ if average_time == 0~ +** Processing line: ~ difference_percentage = 0~ +** Processing line: ~ else~ +** Processing line: ~ difference_percentage = first_place.time~ +** Processing line: ~ .subtract(candidate.time)~ +** Processing line: ~ .abs~ +** Processing line: ~ .fdiv(average_time)~ +** Processing line: ~ .imult(100)~ +** Processing line: ~ end~ ** Processing line: ~~ -** Processing line: ~ # pass.static_primitives.each { |p| draw_primitive p }~ -** Processing line: ~ idx = 0~ -** Processing line: ~ length = pass.static_primitives.length~ -** Processing line: ~ while idx < length~ -** Processing line: ~ draw_primitive (pass.static_primitives.at idx)~ -** Processing line: ~ idx += 1~ +** Processing line: ~ difference_time = ((first_place.time - candidate.time) * 1000).round~ +** Processing line: ~ candidate.merge(difference_percentage: difference_percentage,~ +** Processing line: ~ difference_time: difference_time)~ ** Processing line: ~ end~ ** Processing line: ~~ -** Processing line: ~ # pass.labels.each { |l| draw_label l }~ -** Processing line: ~ idx = 0~ -** Processing line: ~ length = pass.labels.length~ -** Processing line: ~ while idx < length~ -** Processing line: ~ draw_label (pass.labels.at idx)~ -** Processing line: ~ idx += 1~ +** Processing line: ~ too_small_to_measure = false~ +** Processing line: ~ if (first_place.time + second_place.time) == 0~ +** Processing line: ~ too_small_to_measure = true~ +** Processing line: ~ difference_percentage = 0~ +** Processing line: ~ log <<-S~ +** Processing line: ~ * BENCHMARK: Average time for experiments were too small. Increase the number of iterations.~ +** Processing line: ~ S~ +** Processing line: ~ else~ +** Processing line: ~ difference_percentage = (((first_place.time - second_place.time).abs.fdiv((first_place.time + second_place.time).abs.fdiv(2))) * 100).round~ ** Processing line: ~ end~ ** Processing line: ~~ -** Processing line: ~ # pass.static_labels.each { |l| draw_label l }~ -** Processing line: ~ idx = 0~ -** Processing line: ~ length = pass.static_labels.length~ -** Processing line: ~ while idx < length~ -** Processing line: ~ draw_label (pass.static_labels.at idx)~ -** Processing line: ~ idx += 1~ -** Processing line: ~ end~ +** Processing line: ~ difference_time = first_place.time.-(second_place.time).*(1000).abs.round~ ** Processing line: ~~ -** Processing line: ~ # pass.lines.each { |l| draw_line l }~ -** Processing line: ~ idx = 0~ -** Processing line: ~ length = pass.lines.length~ -** Processing line: ~ while idx < length~ -** Processing line: ~ draw_line (pass.lines.at idx)~ -** Processing line: ~ idx += 1~ -** Processing line: ~ end~ +** Processing line: ~ r = {~ +** Processing line: ~ iterations: iterations,~ +** Processing line: ~ first_place: first_place,~ +** Processing line: ~ second_place: second_place,~ +** Processing line: ~ difference_time: difference_time,~ +** Processing line: ~ difference_percentage: difference_percentage,~ +** Processing line: ~ times: times,~ +** Processing line: ~ too_small_to_measure: too_small_to_measure~ +** Processing line: ~ }~ ** Processing line: ~~ -** Processing line: ~ # pass.static_lines.each { |l| draw_line l }~ -** Processing line: ~ idx = 0~ -** Processing line: ~ length = pass.static_lines.length~ -** Processing line: ~ while idx < pass.static_lines.length~ -** Processing line: ~ draw_line (pass.static_lines.at idx)~ -** Processing line: ~ idx += 1~ -** Processing line: ~ end~ +** Processing line: ~ log_message = []~ +** Processing line: ~ only_one_result = first_place.name == second_place.name~ ** Processing line: ~~ -** Processing line: ~ # pass.borders.each { |b| draw_border b }~ -** Processing line: ~ idx = 0~ -** Processing line: ~ length = pass.borders.length~ -** Processing line: ~ while idx < length~ -** Processing line: ~ draw_border (pass.borders.at idx)~ -** Processing line: ~ idx += 1~ +** Processing line: ~ if only_one_result~ +** Processing line: ~ log <<-S~ +** Processing line: ~ * BENCHMARK: #{r.first_place.name} completed in #{r.first_place.time_ms}ms."~ +** Processing line: ~ S~ +** Processing line: ~ else~ +** Processing line: ~ log <<-S~ +** Processing line: ~ * BENCHMARK: #{r.message}~ +** Processing line: ~ ** Fastest: #{r.first_place.name.inspect}~ +** Processing line: ~ ** Second: #{r.second_place.name.inspect}~ +** Processing line: ~ ** Margin: #{r.difference_percentage}% (#{r.difference_time.abs}ms) #{r.first_place.time_ms}ms vs #{r.second_place.time_ms}ms.~ +** Processing line: ~ ** Times:~ +** Processing line: ~ #{r.times.map { |t| "*** #{t.name}: #{t.time_ms}ms (#{t.difference_percentage}% #{t.difference_time.abs}ms)." }.join("\n")}~ +** Processing line: ~ S~ ** Processing line: ~ end~ ** Processing line: ~~ -** Processing line: ~ # pass.static_borders.each { |b| draw_border b }~ -** Processing line: ~ idx = 0~ -** Processing line: ~ length = pass.static_borders.length~ -** Processing line: ~ while idx < length~ -** Processing line: ~ draw_border (pass.static_borders.at idx)~ -** Processing line: ~ idx += 1~ -** Processing line: ~ end~ +** Processing line: ~ r~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~ end~ ** Processing line: ~~ -** Processing line: ~ if !$gtk.production~ -** Processing line: ~ # pass.debug.each { |r| draw_primitive r }~ -** Processing line: ~ idx = 0~ -** Processing line: ~ length = pass.debug.length~ -** Processing line: ~ while idx < length~ -** Processing line: ~ draw_primitive (pass.debug.at idx)~ -** Processing line: ~ idx += 1~ -** Processing line: ~ end~ +** Processing line: ~#+end_src~ +- PRE end detected. ** Processing line: ~~ -** Processing line: ~ # pass.static_debug.each { |r| draw_primitive r }~ -** Processing line: ~ idx = 0~ -** Processing line: ~ length = pass.static_debug.length~ -** Processing line: ~ while idx < length~ -** Processing line: ~ draw_primitive (pass.static_debug.at idx)~ -** Processing line: ~ idx += 1~ -** Processing line: ~ end~ -** Processing line: ~ end~ ** Processing line: ~~ -** Processing line: ~ # pass.reserved.each { |r| draw_primitive r }~ -** Processing line: ~ idx = 0~ -** Processing line: ~ length = pass.reserved.length~ -** Processing line: ~ while idx < length~ -** Processing line: ~ draw_primitive (pass.reserved.at idx)~ -** Processing line: ~ idx += 1~ +** Processing line: ~*** runtime/draw.rb~ +- H3 detected. +- Determining if line is a header. +- Line contains ~*** ~... gsub-ing empty string +- Formatting line: ~runtime/draw.rb~ +- Line's tilde count is: 0 +- Line contains link marker: false +- Determining if line is a header. +- Line contains ~*** ~... gsub-ing empty string +- Formatting line: ~runtime/draw.rb~ +- Line's tilde count is: 0 +- Line contains link marker: false +** Processing line: ~~ +** Processing line: ~#+begin_src ruby~ +- PRE start detected. +** Processing line: ~ # ./dragon/runtime/draw.rb~ +** Processing line: ~ # Copyright 2019 DragonRuby LLC~ +** Processing line: ~ # MIT License~ +** Processing line: ~ # draw.rb has been released under MIT (*only this file*).~ +** Processing line: ~~ +** Processing line: ~ module GTK~ +** Processing line: ~ class Runtime~ +** Processing line: ~ module Draw~ +** Processing line: ~ def primitives pass~ +** Processing line: ~ if $top_level.respond_to? :primitives_override~ +** Processing line: ~ return $top_level.tick_render @args, pass~ ** Processing line: ~ end~ ** Processing line: ~~ -** Processing line: ~ # pass.static_reserved.each { |r| draw_primitive r }~ -** Processing line: ~ idx = 0~ -** Processing line: ~ length = pass.static_reserved.length~ -** Processing line: ~ while idx < length~ -** Processing line: ~ draw_primitive (pass.static_reserved.at idx)~ -** Processing line: ~ idx += 1~ +** Processing line: ~ fn.each_send pass.solids, self, :draw_solid~ +** Processing line: ~ fn.each_send pass.static_solids, self, :draw_solid~ +** Processing line: ~ fn.each_send pass.sprites, self, :draw_sprite~ +** Processing line: ~ fn.each_send pass.static_sprites, self, :draw_sprite~ +** Processing line: ~ fn.each_send pass.primitives, self, :draw_primitive~ +** Processing line: ~ fn.each_send pass.static_primitives, self, :draw_primitive~ +** Processing line: ~ fn.each_send pass.labels, self, :draw_label~ +** Processing line: ~ fn.each_send pass.static_labels, self, :draw_label~ +** Processing line: ~ fn.each_send pass.lines, self, :draw_line~ +** Processing line: ~ fn.each_send pass.static_lines, self, :draw_line~ +** Processing line: ~ fn.each_send pass.borders, self, :draw_border~ +** Processing line: ~ fn.each_send pass.static_borders, self, :draw_border~ +** Processing line: ~~ +** Processing line: ~ if !$gtk.production~ +** Processing line: ~ fn.each_send pass.debug, self, :draw_primitive~ +** Processing line: ~ fn.each_send pass.static_debug, self, :draw_primitive~ ** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ fn.each_send pass.reserved, self, :draw_primitive~ +** Processing line: ~ fn.each_send pass.static_reserved, self, :draw_primitive~ ** Processing line: ~ rescue Exception => e~ ** Processing line: ~ pause!~ ** Processing line: ~ pretty_print_exception_and_export! e~ @@ -226327,7 +238328,9 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ if s.respond_to? :draw_override~ ** Processing line: ~ s.draw_override @ffi_draw~ ** Processing line: ~ else~ -** Processing line: ~ @ffi_draw.draw_solid s.x, s.y, s.w, s.h, s.r, s.g, s.b, s.a~ +** Processing line: ~ @ffi_draw.draw_solid_2 s.x, s.y, s.w, s.h,~ +** Processing line: ~ s.r, s.g, s.b, s.a,~ +** Processing line: ~ (s.blendmode_enum || 1)~ ** Processing line: ~ end~ ** Processing line: ~ rescue Exception => e~ ** Processing line: ~ raise_conversion_for_rendering_failed s, e, :solid~ @@ -226338,14 +238341,15 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ if s.respond_to? :draw_override~ ** Processing line: ~ s.draw_override @ffi_draw~ ** Processing line: ~ else~ -** Processing line: ~ @ffi_draw.draw_sprite_3 s.x, s.y, s.w, s.h,~ -** Processing line: ~ s.path.s_or_default,~ +** Processing line: ~ @ffi_draw.draw_sprite_4 s.x, s.y, s.w, s.h,~ +** Processing line: ~ (s.path || '').to_s,~ ** Processing line: ~ s.angle,~ ** Processing line: ~ s.a, s.r, s.g, s.b,~ ** Processing line: ~ s.tile_x, s.tile_y, s.tile_w, s.tile_h,~ ** Processing line: ~ !!s.flip_horizontally, !!s.flip_vertically,~ ** Processing line: ~ s.angle_anchor_x, s.angle_anchor_y,~ -** Processing line: ~ s.source_x, s.source_y, s.source_w, s.source_h~ +** Processing line: ~ s.source_x, s.source_y, s.source_w, s.source_h,~ +** Processing line: ~ (s.blendmode_enum || 1)~ ** Processing line: ~ end~ ** Processing line: ~ rescue Exception => e~ ** Processing line: ~ raise_conversion_for_rendering_failed s, e, :sprite~ @@ -226356,7 +238360,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ if s.respond_to? :draw_override~ ** Processing line: ~ s.draw_override @ffi_draw~ ** Processing line: ~ else~ -** Processing line: ~ @ffi_draw.draw_screenshot s.path.s_or_default,~ +** Processing line: ~ @ffi_draw.draw_screenshot (s.path || '').to_s,~ ** Processing line: ~ s.x, s.y, s.w, s.h,~ ** Processing line: ~ s.angle,~ ** Processing line: ~ s.a, s.r, s.g, s.b,~ @@ -226374,10 +238378,13 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ if l.respond_to? :draw_override~ ** Processing line: ~ l.draw_override @ffi_draw~ ** Processing line: ~ else~ -** Processing line: ~ @ffi_draw.draw_label l.x, l.y, l.text.s_or_default,~ -** Processing line: ~ l.size_enum, l.alignment_enum,~ -** Processing line: ~ l.r, l.g, l.b, l.a,~ -** Processing line: ~ l.font.s_or_default(nil)~ +** Processing line: ~ @ffi_draw.draw_label_3 l.x, l.y,~ +** Processing line: ~ (l.text || '').to_s,~ +** Processing line: ~ l.size_enum, l.alignment_enum,~ +** Processing line: ~ l.r, l.g, l.b, l.a,~ +** Processing line: ~ l.font,~ +** Processing line: ~ (l.vertical_alignment_enum || 2),~ +** Processing line: ~ (l.blendmode_enum || 1)~ ** Processing line: ~ end~ ** Processing line: ~ rescue Exception => e~ ** Processing line: ~ raise_conversion_for_rendering_failed l, e, :label~ @@ -226388,7 +238395,21 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ if l.respond_to? :draw_override~ ** Processing line: ~ l.draw_override @ffi_draw~ ** Processing line: ~ else~ -** Processing line: ~ @ffi_draw.draw_line l.x, l.y, l.x2, l.y2, l.r, l.g, l.b, l.a~ +** Processing line: ~ if l.x2~ +** Processing line: ~ @ffi_draw.draw_line_2 l.x, l.y, l.x2, l.y2,~ +** Processing line: ~ l.r, l.g, l.b, l.a,~ +** Processing line: ~ (l.blendmode_enum || 1)~ +** Processing line: ~ else~ +** Processing line: ~ w = l.w || 0~ +** Processing line: ~ w = 1 if w == 0~ +** Processing line: ~ h = l.h || 0~ +** Processing line: ~ h = 1 if h == 0~ +** Processing line: ~ @ffi_draw.draw_line_2 l.x, l.y,~ +** Processing line: ~ l.x + w - 1,~ +** Processing line: ~ l.y + h - 1,~ +** Processing line: ~ l.r, l.g, l.b, l.a,~ +** Processing line: ~ (l.blendmode_enum || 1)~ +** Processing line: ~ end~ ** Processing line: ~ end~ ** Processing line: ~ rescue Exception => e~ ** Processing line: ~ raise_conversion_for_rendering_failed l, e, :line~ @@ -226399,7 +238420,9 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ if s.respond_to? :draw_override~ ** Processing line: ~ s.draw_override @ffi_draw~ ** Processing line: ~ else~ -** Processing line: ~ @ffi_draw.draw_border s.x, s.y, s.w, s.h, s.r, s.g, s.b, s.a~ +** Processing line: ~ @ffi_draw.draw_border_2 s.x, s.y, s.w, s.h,~ +** Processing line: ~ s.r, s.g, s.b, s.a,~ +** Processing line: ~ (s.blendmode_enum || 1)~ ** Processing line: ~ end~ ** Processing line: ~ rescue Exception => e~ ** Processing line: ~ raise_conversion_for_rendering_failed s, e, :border~ @@ -226419,7 +238442,6 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ pause!~ ** Processing line: ~ pretty_print_exception_and_export! e~ ** Processing line: ~ end~ -** Processing line: ~~ ** Processing line: ~ end~ ** Processing line: ~ end~ ** Processing line: ~ end~ @@ -226665,7 +238687,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~~ ** Processing line: ~ def framerate_diagnostics_primitives~ ** Processing line: ~ [~ -** Processing line: ~ { x: 0, y: 93.from_top, w: 500, h: 93, a: 128 }.solid,~ +** Processing line: ~ { x: 0, y: 93.from_top, w: 500, h: 93, a: 128 }.solid!,~ ** Processing line: ~ {~ ** Processing line: ~ x: 5,~ ** Processing line: ~ y: 5.from_top,~ @@ -226674,7 +238696,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ g: 255,~ ** Processing line: ~ b: 255,~ ** Processing line: ~ size_enum: -2~ -** Processing line: ~ }.label,~ +** Processing line: ~ }.label!,~ ** Processing line: ~ {~ ** Processing line: ~ x: 5,~ ** Processing line: ~ y: 20.from_top,~ @@ -226683,7 +238705,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ g: 255,~ ** Processing line: ~ b: 255,~ ** Processing line: ~ size_enum: -2~ -** Processing line: ~ }.label,~ +** Processing line: ~ }.label!,~ ** Processing line: ~ {~ ** Processing line: ~ x: 5,~ ** Processing line: ~ y: 35.from_top,~ @@ -226692,7 +238714,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ g: 255,~ ** Processing line: ~ b: 255,~ ** Processing line: ~ size_enum: -2~ -** Processing line: ~ }.label,~ +** Processing line: ~ }.label!,~ ** Processing line: ~ {~ ** Processing line: ~ x: 5,~ ** Processing line: ~ y: 50.from_top,~ @@ -226701,7 +238723,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ g: 255,~ ** Processing line: ~ b: 255,~ ** Processing line: ~ size_enum: -2~ -** Processing line: ~ }.label,~ +** Processing line: ~ }.label!,~ ** Processing line: ~ {~ ** Processing line: ~ x: 5,~ ** Processing line: ~ y: 65.from_top,~ @@ -226710,7 +238732,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ g: 255,~ ** Processing line: ~ b: 255,~ ** Processing line: ~ size_enum: -2~ -** Processing line: ~ }.label,~ +** Processing line: ~ }.label!,~ ** Processing line: ~ ]~ ** Processing line: ~ end~ ** Processing line: ~~ @@ -226750,7 +238772,14 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ def hotload_init~ ** Processing line: ~ @hotload_if_needed = 0~ ** Processing line: ~ @mailbox_if_needed = 0~ +** Processing line: ~~ +** Processing line: ~ # schema for file_mtimes~ +** Processing line: ~ # { FILE_PATH: { current: (Time as Fixnum),~ +** Processing line: ~ # last: (Time as Fixnum) },~ +** Processing line: ~ # FILE_PATH: { current: (Time as Fixnum),~ +** Processing line: ~ # last: (Time as Fixnum) } }~ ** Processing line: ~ @file_mtimes = { }~ +** Processing line: ~~ ** Processing line: ~ @suppress_mailbox = true~ ** Processing line: ~ files_to_reload.each { |f| init_mtimes f }~ ** Processing line: ~ init_mtimes 'app/mailbox.rb'~ @@ -226788,6 +238817,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ 'dragon/symbol.rb',~ ** Processing line: ~ 'dragon/numeric_deprecated.rb',~ ** Processing line: ~ 'dragon/numeric.rb',~ +** Processing line: ~ 'dragon/hash_deprecated.rb',~ ** Processing line: ~ 'dragon/hash.rb',~ ** Processing line: ~ 'dragon/outputs_deprecated.rb',~ ** Processing line: ~ 'dragon/array_docs.rb',~ @@ -226820,6 +238850,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ 'dragon/trace.rb',~ ** Processing line: ~ 'dragon/readme_docs.rb',~ ** Processing line: ~ 'dragon/hotload_client.rb',~ +** Processing line: ~ 'dragon/wizards.rb',~ ** Processing line: ~ 'dragon/ios_wizard.rb',~ ** Processing line: ~ 'dragon/itch_wizard.rb',~ ** Processing line: ~ ] + core_files_to_reload + @required_files~ @@ -226838,10 +238869,8 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ def init_mtimes file~ -** Processing line: ~ current_key = "current_#{file}".to_sym~ -** Processing line: ~ last_key = "last_#{file}".to_sym~ -** Processing line: ~ @file_mtimes[current_key] ||= @ffi_file.mtime(file)~ -** Processing line: ~ @file_mtimes[last_key] ||= @ffi_file.mtime(file)~ +** Processing line: ~ @file_mtimes[file] ||= { current: @ffi_file.mtime(file),~ +** Processing line: ~ last: @ffi_file.mtime(file) }~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ def hotload_source_files~ @@ -226873,25 +238902,36 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ def hotload_if_needed~ +** Processing line: ~ return if Kernel.tick_count < 0~ ** Processing line: ~ hotload_source_files~ ** Processing line: ~ check_mailbox~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ def on_load_succeeded file~ -** Processing line: ~ @rcb_sender.files_reloaded << file~ -** Processing line: ~ @rcb_sender.reloaded_files << file~ +** Processing line: ~ self.files_reloaded << file~ +** Processing line: ~ self.reloaded_files << file~ ** Processing line: ~ Trace.untrace_classes!~ ** Processing line: ~ end~ ** Processing line: ~~ +** Processing line: ~ def reset_all_mtimes~ +** Processing line: ~ @file_mtimes.each do |file, _|~ +** Processing line: ~ @file_mtimes[file].current = @ffi_file.mtime(file)~ +** Processing line: ~ @file_mtimes[file].last = @file_mtimes[file].current~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ files_to_reload.each do |file, _|~ +** Processing line: ~ @file_mtimes[file] ||= {}~ +** Processing line: ~ @file_mtimes[file].current = @ffi_file.mtime(file)~ +** Processing line: ~ @file_mtimes[file].last = @file_mtimes[file].current~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ ** Processing line: ~ def reload_if_needed file, force = false~ -** Processing line: ~ current_key = "current_#{file}".to_sym~ -** Processing line: ~ last_key = "last_#{file}".to_sym~ -** Processing line: ~ @file_mtimes[current_key] ||= nil~ -** Processing line: ~ @file_mtimes[last_key] ||= nil~ -** Processing line: ~ @file_mtimes[current_key] = @ffi_file.mtime(file)~ -** Processing line: ~ return if !force && @file_mtimes[last_key] == @file_mtimes[current_key]~ +** Processing line: ~ @file_mtimes[file] ||= { current: @ffi_file.mtime(file), last: @ffi_file.mtime(file) }~ +** Processing line: ~ @file_mtimes[file].current = @ffi_file.mtime(file)~ +** Processing line: ~ return if !force && @file_mtimes[file].current == @file_mtimes[file].last~ ** Processing line: ~ on_load_succeeded file if reload_ruby_file file~ -** Processing line: ~ @file_mtimes[last_key] = @file_mtimes[current_key]~ +** Processing line: ~ @file_mtimes[file].last = @file_mtimes[file].current~ ** Processing line: ~ end~ ** Processing line: ~ end~ ** Processing line: ~ end~ @@ -226948,6 +238988,30 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ end~ ** Processing line: ~ end~ ** Processing line: ~~ +** Processing line: ~ def char_byte~ +** Processing line: ~ return nil if self.length == 0~ +** Processing line: ~ c = self.each_char.first.bytes~ +** Processing line: ~ c = c.first if c.is_a? Enumerable~ +** Processing line: ~ c~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def insert_character_at index, char~ +** Processing line: ~ t = each_char.to_a~ +** Processing line: ~ t = (t.insert index, char)~ +** Processing line: ~ t.join~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def excluding_character_at index~ +** Processing line: ~ t = each_char.to_a~ +** Processing line: ~ t.delete_at index~ +** Processing line: ~ t.join~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def excluding_last_character~ +** Processing line: ~ return "" if self.length <= 1~ +** Processing line: ~ return excluding_character_at(self.length - 1)~ +** Processing line: ~ end~ +** Processing line: ~~ ** Processing line: ~ def end_with_bang?~ ** Processing line: ~ self[-1] == "!"~ ** Processing line: ~ end~ @@ -227180,7 +239244,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ log "#{self.failed.length} test(s) failed."~ ** Processing line: ~ self.failed.each do |h|~ ** Processing line: ~ log "**** Test name: :#{h[:m]}"~ -** Processing line: ~ log "#{h[:e].to_s.gsub("* ERROR:", "").strip}"~ +** Processing line: ~ log "#{h[:e].to_s.gsub("* ERROR:", "").strip}\n#{h[:e].__backtrace_to_org__}"~ ** Processing line: ~ end~ ** Processing line: ~ end~ ** Processing line: ~ end~ @@ -227415,6 +239479,40 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ # MIT License~ ** Processing line: ~ # wizards.rb has been released under MIT (*only this file*).~ ** Processing line: ~~ +** Processing line: ~ class Wizard~ +** Processing line: ~ def metadata_file_path~ +** Processing line: ~ "metadata/game_metadata.txt"~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def get_metadata~ +** Processing line: ~ metadata = $gtk.read_file metadata_file_path~ +** Processing line: ~~ +** Processing line: ~ if !metadata~ +** Processing line: ~ write_blank_metadata~ +** Processing line: ~ metadata = $gtk.read_file metadata_file_path~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ dev_id, dev_title, game_id, game_title, version, icon = *metadata.each_line.to_a~ +** Processing line: ~~ +** Processing line: ~ {~ +** Processing line: ~ dev_id: dev_id.strip.gsub("#", "").gsub("devid=", ""),~ +** Processing line: ~ dev_title: dev_title.strip.gsub("#", "").gsub("devtitle=", ""),~ +** Processing line: ~ game_id: game_id.strip.gsub("#", "").gsub("gameid=", ""),~ +** Processing line: ~ game_title: game_title.strip.gsub("#", "").gsub("gametitle=", ""),~ +** Processing line: ~ version: version.strip.gsub("#", "").gsub("version=", ""),~ +** Processing line: ~ icon: icon.strip.gsub("#", "").gsub("icon=", "")~ +** Processing line: ~ }~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ class WizardException < Exception~ +** Processing line: ~ attr_accessor :console_primitives~ +** Processing line: ~~ +** Processing line: ~ def initialize *console_primitives~ +** Processing line: ~ @console_primitives = console_primitives~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ ** Processing line: ~ module GTK~ ** Processing line: ~ class Wizards~ ** Processing line: ~ attr_accessor :ios, :itch~ diff --git a/docs/todo/03-solids-and-borders.md b/docs/todo/03-solids-and-borders.md index 34acc96..0ed2fc9 100644 --- a/docs/todo/03-solids-and-borders.md +++ b/docs/todo/03-solids-and-borders.md @@ -33,7 +33,7 @@ args.outputs.borders << [100, 100, 160, 90] ## RGBA - Colors and Alpha -The value for the color and alpha is a number between `0` and `255`. The +The value for the color and alpha is an number between `0` and `255`. The alpha property is optional and will be set to `255` if not specified. Creates a green solid rectangle with an opacity of 50%. @@ -93,7 +93,7 @@ args.outputs.borders << { ## Duck Typing (Advanced) You can also create a class with solid/border properties and render it as a primitive. -ALL properties must be on the class. ADDITIONALLY, a method called `primitive_marker` +ALL properties must on the class. ADDITIONALLY, a method called `primitive_marker` must be defined on the class. Here is an example: diff --git a/docs/todo/04-lines.md b/docs/todo/04-lines.md index 20faa44..03c1abc 100644 --- a/docs/todo/04-lines.md +++ b/docs/todo/04-lines.md @@ -35,7 +35,7 @@ args.outputs.lines << [ 0, 360, 1280, 360] ## RGBA - Colors and Alpha -The value for the color and alpha is a number between `0` and `255`. The +The value for the color and alpha is an number between `0` and `255`. The alpha property is optional and will be set to `255` if not specified. Creates a green horizontal line through the center of the scene with an opacity of 50%. @@ -75,7 +75,7 @@ args.outputs.lines << { ## Duck Typing (Advanced) You can also create a class with line properties and render it as a primitive. -ALL properties must be on the class. ADDITIONALLY, a method called `primitive_marker` +ALL properties must on the class. ADDITIONALLY, a method called `primitive_marker` must be defined on the class. Here is an example: diff --git a/docs/todo/05-sprites.md b/docs/todo/05-sprites.md index 773a007..e8030ab 100644 --- a/docs/todo/05-sprites.md +++ b/docs/todo/05-sprites.md @@ -29,7 +29,7 @@ args.outputs.sprites << [100, 100, 32, 64, "sprites/player.png"] ## Rotation / Angle -Unlike `solids` and `borders`, sprites can be rotated. This is how you rotate a sprite 90 degrees. +Unlike `solids` and `borders`, sprites can be rotated. This is how you rotate a sprite 90 degress. Note: All angles in DragonRuby Game Toolkit are represented in degrees (not radians). @@ -180,7 +180,7 @@ args.outputs.sprites << { ## Duck Typing (Advanced) You can also create a class with sprite properties and render it as a primitive. -ALL properties must be on the class. ADDITIONALLY, a method called `primitive_marker` +ALL properties must on the class. ADDITIONALLY, a method called `primitive_marker` must be defined on the class. Here is an example: diff --git a/docs/todo/08-controllers.md b/docs/todo/08-controllers.md index 9ed9199..aa85ee8 100644 --- a/docs/todo/08-controllers.md +++ b/docs/todo/08-controllers.md @@ -33,7 +33,7 @@ end # Truthy Keys -You can access all triggered keys through `truthy_keys` on `keyboard`, `controller_one`, and `controller_two`. +You can access all triggered keys through `thruthy_keys` on `keyboard`, `controller_one`, and `controller_two`. This is how you would write all keys to a file. The game must be in the foreground and have focus for this data to be recorded. -- cgit v1.2.3 From a1b8552ae442d1fa22df1e569652eb99750dcebf Mon Sep 17 00:00:00 2001 From: Amir Rajan Date: Sat, 7 Aug 2021 00:18:49 -0500 Subject: Sync core oss engine files. --- dragon/args.rb | 51 +--- dragon/assert.rb | 4 +- dragon/attr_gtk.rb | 12 + dragon/attr_sprite.rb | 3 +- dragon/autocomplete.rb | 19 +- dragon/benchmark.rb | 112 ++++++++ dragon/config.rb | 2 +- dragon/console.rb | 49 +++- dragon/console_color.rb | 5 + dragon/console_font_style.rb | 3 +- dragon/console_menu.rb | 8 +- dragon/console_prompt.rb | 15 +- dragon/controller_config.rb | 396 ----------------------------- dragon/directional_input_helper_methods.rb | 6 + dragon/docs.rb | 22 +- dragon/draw.rb | 234 ++++------------- dragon/framerate.rb | 1 + dragon/framerate_diagnostics.rb | 13 +- dragon/geometry.rb | 68 +++-- dragon/grid.rb | 8 + dragon/help.rb | 72 ------ dragon/hotload.rb | 44 +++- dragon/inputs.rb | 60 ++++- dragon/ios_wizard.rb | 328 +++++++++++++++--------- dragon/itch_wizard.rb | 60 +++-- dragon/keys.rb | 18 +- dragon/layout.rb | 182 +++++++++++-- dragon/log.rb | 5 + dragon/metadata.rb | 41 --- dragon/numeric.rb | 117 ++++++--- dragon/outputs_docs.rb | 2 +- dragon/readme_docs.rb | 87 ++++--- dragon/runtime_docs.rb | 32 ++- dragon/string.rb | 24 ++ dragon/tests.rb | 2 +- dragon/wizards.rb | 35 +++ 36 files changed, 1101 insertions(+), 1039 deletions(-) create mode 100644 dragon/benchmark.rb delete mode 100644 dragon/controller_config.rb delete mode 100644 dragon/help.rb delete mode 100644 dragon/metadata.rb diff --git a/dragon/args.rb b/dragon/args.rb index 2b11008..9cf6e33 100644 --- a/dragon/args.rb +++ b/dragon/args.rb @@ -10,58 +10,21 @@ module GTK class Args include ArgsDeprecated include Serialize - - # Contains information related to input devices and input events. - # - # @return [Inputs] attr_accessor :inputs - - # Contains the means to interact with output devices such as the screen. - # - # @return [Outputs] attr_accessor :outputs - - # Contains the means to interact with the audio mixer. - # - # @return [Hash] attr_accessor :audio - - # Contains display size information to assist in positioning things on the screen. - # - # @return [Grid] attr_accessor :grid - - # Provides access to game play recording facilities within Game Toolkit. - # - # @return [Recording] attr_accessor :recording - - # Gives you access to geometry related functions. - # - # @return [Geometry] attr_accessor :geometry - attr_accessor :fn - - # This is where you'll put state associated with your video game. - # - # @return [OpenEntity] attr_accessor :state - - # Gives you access to the top level DragonRuby runtime. - # - # @return [Runtime] + attr_accessor :temp_state attr_accessor :runtime alias_method :gtk, :runtime - attr_accessor :passes - attr_accessor :wizards - attr_accessor :layout - attr_accessor :easing - attr_accessor :string def initialize runtime, recording @@ -70,6 +33,7 @@ module GTK @audio = {} @passes = [] @state = OpenEntity.new + @temp_state = OpenEntity.new @state.tick_count = -1 @runtime = runtime @recording = recording @@ -99,11 +63,12 @@ module GTK def serialize { - state: state.as_hash, - inputs: inputs.serialize, - passes: passes.serialize, - outputs: outputs.serialize, - grid: grid.serialize + state: state.as_hash, + temp_state: temp_state.as_hash, + inputs: inputs.serialize, + passes: passes.serialize, + outputs: outputs.serialize, + grid: grid.serialize } end diff --git a/dragon/assert.rb b/dragon/assert.rb index 5ba344d..974846a 100644 --- a/dragon/assert.rb +++ b/dragon/assert.rb @@ -98,7 +98,7 @@ end @assertion_performed = true if actual != expected actual_string = "#{actual}#{actual.nil? ? " (nil) " : " " }".strip - message = "actual:\n#{actual_string}\n\ndid not equal\n\nexpected:\n#{expected}.\n#{message}" + message = "actual:\n#{actual_string}\n\ndid not equal\n\nexpected:\n#{expected}\n#{message}" raise message end nil @@ -108,7 +108,7 @@ end @assertion_performed = true if actual == expected actual_string = "#{actual}#{actual.nil? ? " (nil) " : " " }".strip - message = "actual:\n#{actual_string}\n\nequaled\n\nexpected:\n#{expected}.\n#{message}" + message = "actual:\n#{actual_string}\n\nequaled\n\nexpected:\n#{expected}\n#{message}" raise message end nil diff --git a/dragon/attr_gtk.rb b/dragon/attr_gtk.rb index 2f2ccc5..e53e1b9 100644 --- a/dragon/attr_gtk.rb +++ b/dragon/attr_gtk.rb @@ -19,6 +19,10 @@ module AttrGTK args.state end + def temp_state + args.temp_state + end + def inputs args.inputs end @@ -46,4 +50,12 @@ module AttrGTK def layout args.layout end + + def new_entity entity_type, init_hash = nil, &block + args.state.new_entity entity_type, init_hash, &block + end + + def new_entity_strict entity_type, init_hash = nil, &block + args.state.new_entity_strict entity_type, init_hash, &block + end end diff --git a/dragon/attr_sprite.rb b/dragon/attr_sprite.rb index 69ddd8c..754429d 100644 --- a/dragon/attr_sprite.rb +++ b/dragon/attr_sprite.rb @@ -1,3 +1,4 @@ +# coding: utf-8 # Copyright 2019 DragonRuby LLC # MIT License # attr_sprite.rb has been released under MIT (*only this file*). @@ -37,7 +38,7 @@ module AttrSprite attr_accessor :x, :y, :w, :h, :path, :angle, :a, :r, :g, :b, :tile_x, :tile_y, :tile_w, :tile_h, :flip_horizontally, :flip_vertically, :angle_anchor_x, :angle_anchor_y, :id, - :source_x, :source_y, :source_w, :source_h + :source_x, :source_y, :source_w, :source_h, :blendmode_enum def primitive_marker :sprite diff --git a/dragon/autocomplete.rb b/dragon/autocomplete.rb index 490d6c9..ce29d0a 100644 --- a/dragon/autocomplete.rb +++ b/dragon/autocomplete.rb @@ -1,3 +1,4 @@ +# coding: utf-8 # Copyright 2019 DragonRuby LLC # MIT License # autocomplete.rb has been released under MIT (*only this file*). @@ -24,7 +25,7 @@ module GTK sub_index = index - previous_line[:sum] word = (cursor_line[:line][0..sub_index - 1]).strip token = (word.split " ")[-1] - dots = (token.split ".") + dots = (token.split ".").flat_map { |s| s.split "[" }.flat_map { |s| s.split "]" }.flat_map { |s| s.split "(" }.flat_map { |s| s.split ")" } dot = dots[-1] end @@ -45,6 +46,10 @@ module GTK ignores ||= [] ignores = [ignores].flatten keys = keys.map { |k| k.to_s } + keys = keys.reject { |k| k.include? '"' } + .reject { |k| k.start_with? "'" } + .reject { |k| k.include? "," } + .reject { |k| k.start_with? "#" } others = ["def", "end"] + [ :entity_keys_by_ref, :entity_name, @@ -102,6 +107,10 @@ module GTK return autocomplete_filter_methods lookup_result.call if lookup_result + if dot[0].upcase == dot[0] && (Object.const_defined? dot.to_sym) + return (Object.const_get dot.to_sym).autocomplete_methods + end + start_collecting = false dots_after_state = dots.find_all do |s| if s == "state" @@ -117,10 +126,16 @@ module GTK target = target.as_hash[k.to_sym] if target.respond_to? :as_hash end - return autocomplete_filter_methods target.as_hash.keys + if target.respond_to? :as_hash + return autocomplete_filter_methods target.as_hash.keys + else + return autocomplete_filter_methods target.autocomplete_methods + end end + text = text.each_line.reject { |l| l.strip.start_with? "#" }.join "\n" + text = text.each_line.map { |l| l.split("#").first }.join "\n" text.gsub!("[", " ") text.gsub!("]", " ") text.gsub!("(", " ") diff --git a/dragon/benchmark.rb b/dragon/benchmark.rb new file mode 100644 index 0000000..d7e8945 --- /dev/null +++ b/dragon/benchmark.rb @@ -0,0 +1,112 @@ +# coding: utf-8 +# Copyright 2019 DragonRuby LLC +# MIT License +# benchmark.rb has been released under MIT (*only this file*). + +module GTK + class Runtime + module Benchmark + def benchmark_single iterations, name, proc + log <<-S +** Invoking :#{name}... +S + time_start = Time.now + idx = 0 + r = nil + while idx < iterations + r = proc.call + idx += 1 + end + + result = (Time.now - time_start).round 3 + + { name: name, + time: result, + time_ms: (result * 1000).to_i } + end + + def benchmark opts = {} + iterations = opts.iterations + + log <<-S +* BENCHMARK: Started +** Caller: #{(caller || []).first} +** Iterations: #{iterations} +S + procs = opts.find_all { |k, v| v.respond_to? :call } + + times = procs.map do |(name, proc)| + benchmark_single iterations, name, proc + end.sort_by { |r| r.time } + + first_place = times.first + second_place = times.second || first_place + + times = times.map do |candidate| + average_time = first_place.time + .add(candidate.time) + .abs + .fdiv(2) + + difference_percentage = 0 + if average_time == 0 + difference_percentage = 0 + else + difference_percentage = first_place.time + .subtract(candidate.time) + .abs + .fdiv(average_time) + .imult(100) + end + + difference_time = ((first_place.time - candidate.time) * 1000).round + candidate.merge(difference_percentage: difference_percentage, + difference_time: difference_time) + end + + too_small_to_measure = false + if (first_place.time + second_place.time) == 0 + too_small_to_measure = true + difference_percentage = 0 + log <<-S +* BENCHMARK: Average time for experiments were too small. Increase the number of iterations. +S + else + difference_percentage = (((first_place.time - second_place.time).abs.fdiv((first_place.time + second_place.time).abs.fdiv(2))) * 100).round + end + + difference_time = first_place.time.-(second_place.time).*(1000).abs.round + + r = { + iterations: iterations, + first_place: first_place, + second_place: second_place, + difference_time: difference_time, + difference_percentage: difference_percentage, + times: times, + too_small_to_measure: too_small_to_measure + } + + log_message = [] + only_one_result = first_place.name == second_place.name + + if only_one_result + log <<-S +* BENCHMARK: #{r.first_place.name} completed in #{r.first_place.time_ms}ms." +S + else + log <<-S +* BENCHMARK: #{r.message} +** Fastest: #{r.first_place.name.inspect} +** Second: #{r.second_place.name.inspect} +** Margin: #{r.difference_percentage}% (#{r.difference_time.abs}ms) #{r.first_place.time_ms}ms vs #{r.second_place.time_ms}ms. +** Times: +#{r.times.map { |t| "*** #{t.name}: #{t.time_ms}ms (#{t.difference_percentage}% #{t.difference_time.abs}ms)." }.join("\n")} +S + end + + r + end + end + end +end diff --git a/dragon/config.rb b/dragon/config.rb index a2887dc..de57085 100644 --- a/dragon/config.rb +++ b/dragon/config.rb @@ -127,7 +127,7 @@ module GTK def previous_part if @current_part > 0 - # remove the binding that we previously had here so it can be reused. + # remove the binding that we previous had here so it can be reused. bindstr = @bindings[@current_part - 1] @bindings[@current_part - 1] = nil @used_bindings[bindstr] = nil diff --git a/dragon/console.rb b/dragon/console.rb index c30c311..b3a2c2a 100644 --- a/dragon/console.rb +++ b/dragon/console.rb @@ -1,10 +1,10 @@ +# coding: utf-8 # Copyright 2019 DragonRuby LLC # MIT License # console.rb has been released under MIT (*only this file*). # Contributors outside of DragonRuby who also hold Copyright: # - Kevin Fischer: https://github.com/kfischer-okarin -# - Austin Meyer: https://github.com/Niyy module GTK class Console @@ -20,7 +20,7 @@ module GTK :font_style, :menu def initialize - @font_style = FontStyle.new(font: 'font.ttf', size_enum: -1, line_height: 1.1) + @font_style = FontStyle.new(font: 'font.ttf', size_enum: -1.5, line_height: 1.1) @menu = Menu.new self @disabled = false @log_offset = 0 @@ -40,6 +40,8 @@ module GTK @text_color = Color.new [255, 255, 255] @error_color = Color.new [200, 50, 50] @header_color = Color.new [100, 200, 220] + @code_color = Color.new [210, 168, 255] + @comment_color = Color.new [0, 200, 100] @animation_duration = 1.seconds @shown_at = -1 load_history @@ -314,6 +316,8 @@ S if cmd == 'quit' || cmd == ':wq' || cmd == ':q!' || cmd == ':q' || cmd == ':wqa' $gtk.request_quit + elsif cmd.start_with? ':' + send ((cmd.gsub '-', '_').gsub ':', '') else puts "-> #{cmd}" begin @@ -322,13 +326,19 @@ S if $results.nil? puts "=> nil" elsif $results == :console_silent_eval + # do nothing since the console is silent else puts "=> #{$results}" end @last_command_errored = false rescue Exception => e try_search_docs e - puts "* EXCEPTION: #{e}" + # if an exception is thrown and the bactrace includes something helpful, then show it + if (e.backtrace || []).first && (e.backtrace.first.include? "(eval)") + puts "* EXCEPTION: #{e}" + else + puts "* EXCEPTION: #{e}\n#{e.__backtrace_to_org__}" + end end end end @@ -555,6 +565,11 @@ S end render_log_offset args + + args.outputs.reserved << { x: 10.from_right, y: @bottom + 10, + text: "Press CTRL+g or ESCAPE to clear the prompt.", + vertical_alignment_enum: 0, + alignment_enum: 2, r: 80, g: 80, b: 80 }.label! end def render_log_offset args @@ -577,7 +592,7 @@ S end def include_subdued_markers? text - include_any_words? text, subdued_markers + (text.start_with? "* INFO: ") && (include_any_words? text, subdued_markers) end def include_any_words? text, words @@ -723,8 +738,32 @@ S (log_entry.start_with? "**** ") end + def code? log_entry + (just_symbol? log_entry) || (codeblock_marker? log_entry) + end + + def just_symbol? log_entry + scrubbed = log_entry.gsub("*", "").strip + (scrubbed.start_with? ":") && (!scrubbed.include? " ") && (!scrubbed.include? "=>") + end + + def code_comment? log_entry + return true if log_entry.strip.start_with?("# ") + return false + end + + def codeblock_marker? log_entry + return true if log_entry.strip.start_with?("#+begin_src") + return true if log_entry.strip.start_with?("#+end_src") + return false + end + def color_for_log_entry(log_entry) - if include_row_marker? log_entry + if code? log_entry + @code_color + elsif code_comment? log_entry + @comment_color + elsif include_row_marker? log_entry @text_color elsif include_error_marker? log_entry @error_color diff --git a/dragon/console_color.rb b/dragon/console_color.rb index f5b164d..1b19c22 100644 --- a/dragon/console_color.rb +++ b/dragon/console_color.rb @@ -1,3 +1,4 @@ +# coding: utf-8 # Copyright 2019 DragonRuby LLC # MIT License # console_color.rb has been released under MIT (*only this file*). @@ -22,6 +23,10 @@ module GTK @color end + def to_s + "GTK::Console::Color #{to_h}" + end + def to_h { r: @color[0], g: @color[1], b: @color[2], a: @color[3] } end diff --git a/dragon/console_font_style.rb b/dragon/console_font_style.rb index 8efab4f..0bb7cc4 100644 --- a/dragon/console_font_style.rb +++ b/dragon/console_font_style.rb @@ -1,3 +1,4 @@ +# coding: utf-8 # Copyright 2019 DragonRuby LLC # MIT License # console_font_style.rb has been released under MIT (*only this file*). @@ -33,7 +34,7 @@ module GTK size_enum: size_enum, alignment_enum: alignment_enum, **color.to_h, - }.label + }.label! end end end diff --git a/dragon/console_menu.rb b/dragon/console_menu.rb index d10ceeb..0f21614 100644 --- a/dragon/console_menu.rb +++ b/dragon/console_menu.rb @@ -1,3 +1,4 @@ +# coding: utf-8 # Copyright 2019 DragonRuby LLC # MIT License # console_menu.rb has been released under MIT (*only this file*). @@ -51,7 +52,7 @@ module GTK def itch_wizard_clicked @console.scroll_to_bottom - $wizards.itch.start + $wizards.itch.restart end def docs_clicked @@ -76,6 +77,7 @@ module GTK @buttons = [ (button id: :record, row: 0, col: 9, text: "record gameplay", method: :record_clicked), (button id: :replay, row: 0, col: 10, text: "start replay", method: :replay_clicked), + *custom_buttons ] elsif @menu_shown == :hidden @buttons = [ @@ -134,8 +136,8 @@ module GTK method: method }.let do |entity| primitives = [] - primitives << entity[:rect].merge(a: 164).solid - primitives << entity[:rect].merge(r: 255, g: 255, b: 255).border + primitives << entity[:rect].solid!(a: 164) + primitives << entity[:rect].border!(r: 255, g: 255, b: 255) primitives << text.wrapped_lines(5) .map_with_index do |l, i| [ diff --git a/dragon/console_prompt.rb b/dragon/console_prompt.rb index d4c4026..97ea2f9 100644 --- a/dragon/console_prompt.rb +++ b/dragon/console_prompt.rb @@ -1,3 +1,4 @@ +# coding: utf-8 # Copyright 2019 DragonRuby LLC # MIT License # console_prompt.rb has been released under MIT (*only this file*). @@ -71,14 +72,14 @@ module GTK return if @cursor_position.zero? new_pos = @cursor_position - 1 - (is_word_boundary? @current_input_str[new_pos]) ? + (is_word_boundary? @current_input_str[new_pos]) ? (new_pos -= 1 until !(is_word_boundary? @current_input_str[new_pos - 1]) || new_pos.zero?): (new_pos -= 1 until (is_word_boundary? @current_input_str[new_pos - 1]) || new_pos.zero?) @cursor_position = new_pos update_cursor_position_px end - + def move_cursor_right @cursor_position += 1 if @cursor_position < current_input_str.length update_cursor_position_px @@ -91,7 +92,7 @@ module GTK (is_word_boundary? @current_input_str[new_pos]) ? (new_pos += 1 until !(is_word_boundary? @current_input_str[new_pos]) || (new_pos.equal? str_len)): (new_pos += 1 until (is_word_boundary? @current_input_str[new_pos]) || (new_pos.equal? str_len)) - + @cursor_position = new_pos update_cursor_position_px end @@ -157,11 +158,11 @@ S # partition the original list of items into a string to be printed items.each_slice(columns).each_with_index do |cells, i| - pretty_print_row_separator string_width, cell_width, column_width, columns + pretty_print_row_seperator string_width, cell_width, column_width, columns pretty_print_row cells, string_width, cell_width, column_width, columns end - pretty_print_row_separator string_width, cell_width, column_width, columns + pretty_print_row_seperator string_width, cell_width, column_width, columns end end @@ -193,12 +194,12 @@ S args.outputs.reserved << (@cursor_color.to_h.merge x: x + @cursor_position_px + 0.5, y: y + 5, x2: x + @cursor_position_px + 0.5, - y2: y + @font_style.letter_size.y + 5) + y2: y + @font_style.letter_size.y + 4) args.outputs.reserved << (@cursor_color.to_h.merge x: x + @cursor_position_px + 1, y: y + 5, x2: x + @cursor_position_px + 1, - y2: y + @font_style.letter_size.y + 5) + y2: y + @font_style.letter_size.y + 4) # debugging rectangle for string # args.outputs.reserved << (@cursor_color.to_h.merge x: x, diff --git a/dragon/controller_config.rb b/dragon/controller_config.rb deleted file mode 100644 index c315ab5..0000000 --- a/dragon/controller_config.rb +++ /dev/null @@ -1,396 +0,0 @@ -# Copyright 2019 DragonRuby LLC -# MIT License -# controller_config.rb has been released under MIT (*only this file*). - -# !!! FIXME: add console command to forget custom binding(s) -# !!! FIXME: add console command to forget replace existing binding(s) -# !!! FIXME: add console command go into play_around mode to make sure controller isn't wonky. - -module GTK - class ControllerConfig - def initialize runtime - @runtime = runtime - @raw_joysticks = {} # things that aren't game controllers to try to configure. - @target = nil - @animation_duration = (1.5).seconds - @toggled_at = 0 - @fading = 0 - @current_part = 0 - @part_alpha = 0 - @part_alpha_increment = 10 - @joystick_state = {} - @playing_around = false - @used_bindings = {} - @bindings = [] - @parts = [ - [ 919, 282, 'A button', 'a' ], - [ 960, 323, 'B button', 'b' ], - [ 878, 323, 'X button', 'x' ], - [ 919, 365, 'Y button', 'y' ], - [ 433, 246, 'left stick left', '-leftx' ], - [ 497, 246, 'left stick right', '+leftx' ], - [ 466, 283, 'left stick up', '-lefty' ], - [ 466, 218, 'left stick down', '+lefty' ], - [ 466, 246, 'left stick button', 'leftstick' ], - [ 741, 246, 'right stick left', '-rightx' ], - [ 802, 246, 'right stick right', '+rightx' ], - [ 773, 283, 'right stick up', '-righty' ], - [ 773, 218, 'right stick down', '+righty' ], - [ 772, 246, 'right stick button', 'rightstick' ], - [ 263, 465, 'left shoulder button', 'leftshoulder' ], - [ 263, 503, 'left trigger', 'lefttrigger' ], - [ 977, 465, 'right shoulder button', 'rightshoulder' ], - [ 977, 503, 'right trigger', 'righttrigger' ], - [ 318, 365, 'D-pad up', 'dpup' ], - [ 360, 322, 'D-pad right', 'dpright' ], - [ 318, 280, 'D-pad down', 'dpdown' ], - [ 275, 322, 'D-pad left', 'dpleft' ], - [ 570, 402, 'select/back button', 'back'], - [ 619, 448, 'guide/home button', 'guide' ], - [ 669, 402, 'start button', 'start' ], - ] - end - - def rawjoystick_connected jid, joystickname, guid - return if jid < 0 - @raw_joysticks[jid] = { name: joystickname, guid: guid } - end - - def rawjoystick_disconnected jid - return if jid < 0 - if @raw_joysticks[jid] != nil - @raw_joysticks.delete(jid) - @runtime.ffi_misc.close_raw_joystick(jid) - # Fade out the config screen if we were literally configuring this controller right now. - if !@target.nil? && @target[0] == jid - @target[0] = nil - @toggled_at = Kernel.global_tick_count - @fading = -1 - end - end - end - - def build_binding_string - bindingstr = '' - skip = false - - for i in 0..@parts.length-1 - if skip ; skip = false ; next ; end - - binding = @bindings[i] - next if binding.nil? - - part = @parts[i][3] - - # clean up string: - # if axis uses -a0 for negative and +a0 for positive, just make it "leftx:a0" instead of "-leftx:-a0,+leftx:+a0" - # if axis uses +a0 for negative and -a0 for positive, just make it "leftx:a0~" instead of "-leftx:+a0,+leftx:-a0" - if part == '-leftx' || part == '-lefty' || part == '-rightx' || part == '-righty' - nextbinding = @bindings[i+1] - if binding.start_with?('-a') && nextbinding.start_with?('+a') && binding[2..-1] == nextbinding[2..-1] - skip = true - part = part[1..-1] - binding = binding[1..-1] - elsif binding.start_with?('+a') && nextbinding.start_with?('-a') && binding[2..-1] == nextbinding[2..-1] - skip = true - part = part[1..-1] - binding = "#{binding[1..-1]}~" - end - end - - bindingstr += "#{!bindingstr.empty? ? ',' : ''}#{part}:#{binding}" - end - - details = @target[1] - - # !!! FIXME: no String.delete in mRuby?!?! Maybe so when upgrading. - #name = details[:name].delete(',') - # !!! FIXME: ...no regexp either... :/ - #name = details[:name].gsub(/,/, ' ') # !!! FIXME: will SDL let you escape these instead? - unescaped = details[:name] - name = '' - for i in 0..unescaped.length-1 - ch = unescaped[i] - name += (ch == ',') ? ' ' : ch - end - return "#{details[:guid]},#{name},platform:#{@runtime.platform},#{bindingstr}" - end - - def move_to_different_part part - if !@joystick_state[:axes].nil? - @joystick_state[:axes].each { |i| i[:farthestval] = i[:startingval] if !i.nil? } - end - @current_part = part - end - - def previous_part - if @current_part > 0 - # remove the binding that we previously had here so it can be reused. - bindstr = @bindings[@current_part - 1] - @bindings[@current_part - 1] = nil - @used_bindings[bindstr] = nil - move_to_different_part @current_part - 1 - end - end - - def next_part - if @current_part < (@parts.length - 1) - move_to_different_part @current_part + 1 - else - @playing_around = true - end - end - - def set_binding bindstr - return false if !@used_bindings[bindstr].nil? - @used_bindings[bindstr] = @current_part - @bindings[@current_part] = bindstr - return true - end - - # Called when a lowlevel joystick moves an axis. - def rawjoystick_axis jid, axis, value - return if @target.nil? || jid != @target[0] || @fading != 0 # skip if not currently considering this joystick. - - @joystick_state[:axes] ||= [] - @joystick_state[:axes][axis] ||= { - moving: false, - startingval: 0, - currentval: 0, - farthestval: 0 - } - - # this is the logic from SDL's controllermap.c, more or less, since this is hard to get right from scratch. - state = @joystick_state[:axes][axis] - state[:currentval] = value - if !state[:moving] - state[:moving] = true - state[:startingval] = value - state[:farthestval] = value - end - - current_distance = (value - state[:startingval]).abs - farthest_distance = (state[:farthestval] - state[:startingval]).abs - if current_distance > farthest_distance - state[:farthestval] = value - farthest_distance = (state[:farthestval] - state[:startingval]).abs - end - - # If we've gone out far enough and started to come back, let's bind this axis - if (farthest_distance >= 16000) && (current_distance <= 10000) - next_part if set_binding("#{(state[:farthestval] < 0) ? '-' : '+'}a#{axis}") - end - end - - # Called when a lowlevel joystick moves a hat. - def rawjoystick_hat jid, hat, value - return if @target.nil? || jid != @target[0] || @fading != 0 # skip if not currently considering this joystick. - - @joystick_state[:hats] ||= [] - @joystick_state[:hats][hat] = value - - return if value == 0 # 0 == centered, skip it - next_part if set_binding("h#{hat}.#{value}") - end - - # Called when a lowlevel joystick moves a button. - def rawjoystick_button jid, button, pressed - return if @target.nil? || jid != @target[0] || @fading != 0 # skip if not currently considering this joystick. - - @joystick_state[:buttons] ||= [] - @joystick_state[:buttons][button] = pressed - - return if !pressed - next_part if set_binding("b#{button}") - end - - def calc_fading - if @fading == 0 - return 255 - elsif @fading > 0 # fading in - percent = @toggled_at.global_ease(@animation_duration, :flip, :quint, :flip) - if percent >= 1.0 - percent = 1.0 - @fading = 0 - end - else # fading out - percent = @toggled_at.global_ease(@animation_duration, :flip, :quint) - if percent <= 0.0 - percent = 0.0 - @fading = 0 - end - end - - return (percent * 255.0).to_i - end - - def render_basics args, msg, fade=255 - joystickname = @target[1][:name] - args.outputs.primitives << [0, 0, GAME_WIDTH, GAME_HEIGHT, 255, 255, 255, fade].solid - args.outputs.primitives << [0, 0, GAME_WIDTH, GAME_HEIGHT, 'dragonruby-controller.png', 0, fade, 255, 255, 255].sprite - args.outputs.primitives << [GAME_WIDTH / 2, 700, joystickname, 2, 1, 0, 0, 0, fade].label - args.outputs.primitives << [GAME_WIDTH / 2, 650, msg, 0, 1, 0, 0, 0, 255].label if !msg.empty? - end - - def render_part_highlight args, part, alpha=255 - partsize = 41 - args.outputs.primitives << [part[0], part[1], partsize, partsize, 255, 0, 0, alpha].border - args.outputs.primitives << [part[0]-1, part[1]-1, partsize+2, partsize+2, 255, 0, 0, alpha].border - args.outputs.primitives << [part[0]-2, part[1]-2, partsize+4, partsize+4, 255, 0, 0, alpha].border - end - - def choose_target - if @target.nil? - while !@raw_joysticks.empty? - t = @raw_joysticks.shift # see if there's a joystick waiting on us. - next if t[0] < 0 # just in case. - next if t[1][:guid].nil? # did we already handle this guid? Dump it. - @target = t - break - end - return false if @target.nil? # nothing to configure at the moment. - @toggled_at = Kernel.global_tick_count - @fading = 1 - @current_part = 0 - @part_alpha = 0 - @part_alpha_increment = 10 - @joystick_state = {} - @used_bindings = {} - @playing_around = false - @bindings = [] - end - return true - end - - def render_part_highlight_from_bindstr args, bindstr, alpha=255 - partidx = @used_bindings[bindstr] - return if partidx.nil? - render_part_highlight args, @parts[partidx], alpha - end - - def play_around args - return false if !@playing_around - - if args.inputs.keyboard.key_down.escape - @current_part = 0 - @part_alpha = 0 - @part_alpha_increment = 10 - @used_bindings = {} - @playing_around = false - @bindings = [] - elsif args.inputs.keyboard.key_down.space - jid = @target[0] - bindingstr = build_binding_string - #puts("new controller binding: '#{bindingstr}'") - @runtime.ffi_misc.add_controller_config bindingstr - @runtime.ffi_misc.convert_rawjoystick_to_controller jid - @target[0] = -1 # Conversion closes the raw joystick. - - # Handle any other pending joysticks that have the same GUID (so if you plug in four of the same model, we're already done!) - guid = @target[1][:guid] - @raw_joysticks.each { |jid, details| - if details[:guid] == guid - @runtime.ffi_misc.convert_rawjoystick_to_controller jid - details[:guid] = nil - end - } - - # Done with this guy. - @playing_around = false - @toggled_at = Kernel.global_tick_count - @fading = -1 - return false - end - - render_basics args, 'Now play around with the controller, and make sure it feels right!' - args.outputs.primitives << [GAME_WIDTH / 2, 90, '[ESCAPE]: Reconfigure, [SPACE]: Save this configuration', 0, 1, 0, 0, 0, 255].label - - axes = @joystick_state[:axes] - if !axes.nil? - for i in 0..axes.length-1 - next if axes[i].nil? - value = axes[i][:currentval] - next if value.nil? || (value.abs < 16000) - render_part_highlight_from_bindstr args, "#{value < 0 ? '-' : '+'}a#{i}" - end - end - - hats = @joystick_state[:hats] - if !hats.nil? - for i in 0..hats.length-1 - value = hats[i] - next if value.nil? || (value == 0) - render_part_highlight_from_bindstr args, "h#{i}.#{value}" - end - end - - buttons = @joystick_state[:buttons] - if !buttons.nil? - for i in 0..buttons.length-1 - value = buttons[i] - next if value.nil? || !value - render_part_highlight_from_bindstr args, "b#{i}" - end - end - - return true - end - - def should_tick? - return true if @play_around - return true if @target - return false - end - - def tick args - return true if play_around args - return false if !choose_target - - jid = @target[0] - - if @fading == 0 - # Cancel config? - if args.inputs.keyboard.key_down.escape - # !!! FIXME: prompt to ignore this joystick forever or just this run - @toggled_at = Kernel.global_tick_count - @fading = -1 - end - end - - if @fading == 0 - if args.inputs.keyboard.key_down.backspace - previous_part - elsif args.inputs.keyboard.key_down.space - next_part - end - end - - fade = calc_fading - if (@fading < 0) && (fade == 0) - @runtime.ffi_misc.close_raw_joystick(jid) if jid >= 0 - @target = nil # done with this controller - return false - end - - render_basics args, (@fading >= 0) ? "We don't recognize this controller, so tell us about it!" : '', fade - - return true if fade < 255 # all done for now - - part = @parts[@current_part] - args.outputs.primitives << [GAME_WIDTH / 2, 575, "Please press the #{part[2]}.", 0, 1, 0, 0, 0, 255].label - render_part_highlight args, part, @part_alpha - args.outputs.primitives << [GAME_WIDTH / 2, 90, '[ESCAPE]: Ignore controller, [BACKSPACE]: Go back one button, [SPACE]: Skip this button', 0, 1, 0, 0, 0, 255].label - - @part_alpha += @part_alpha_increment - if (@part_alpha_increment > 0) && (@part_alpha >= 255) - @part_alpha = 255 - @part_alpha_increment = -10 - elsif (@part_alpha_increment < 0) && (@part_alpha <= 0) - @part_alpha = 0 - @part_alpha_increment = 10 - end - - return true - end - end -end diff --git a/dragon/directional_input_helper_methods.rb b/dragon/directional_input_helper_methods.rb index 44913ba..0a15c70 100644 --- a/dragon/directional_input_helper_methods.rb +++ b/dragon/directional_input_helper_methods.rb @@ -70,6 +70,12 @@ S end end + def directional_angle + return nil unless directional_vector + + Math.atan2(up_down, left_right).to_degrees + end + def method_missing m, *args # combine the key with ctrl_ if m.to_s.start_with?("ctrl_") diff --git a/dragon/docs.rb b/dragon/docs.rb index e6f6e2d..cd39483 100644 --- a/dragon/docs.rb +++ b/dragon/docs.rb @@ -46,7 +46,7 @@ module DocsOrganizer unsorted.each do |k| puts <<-S * WARNING: #{klass.name} is not included in DocsOrganizer::class_sort_order. Please place this -module in it's correct topological order. +module in its correct topological order. S end @@ -253,8 +253,9 @@ S parse_log = [] html_start_to_toc_start = <<-S - + + DragonRuby Game Toolkit Documentation @@ -342,6 +343,11 @@ S __docs_append_true_line__ true_lines, current_true_line, parse_log __docs_append_true_line__ true_lines, l, parse_log current_true_line = "" + elsif l.start_with? "***** " + parse_log << "- Header detected." + __docs_append_true_line__ true_lines, current_true_line, parse_log + __docs_append_true_line__ true_lines, l, parse_log + current_true_line = "" else current_true_line += l.rstrip + " " end @@ -373,6 +379,9 @@ S text = text.gsub("]", "-") text = text.gsub(":", "-") text = text.gsub(" ", "-") + text = text.gsub(".", "-") + text = text.gsub(",", "-") + text = text.gsub("?", "-") text end @@ -434,6 +443,15 @@ S link_id = text_to_id.call l # toc_html += "" content_html += "

    #{__docs_line_to_html__ l, parse_log}

    \n" + elsif l.start_with? "**** " + parse_log << "- H5 detected." + content_html += close_list_if_needed.call inside_ul, inside_ol + inside_ol = false + inside_ul = false + formatted_html = __docs_line_to_html__ l, parse_log + link_id = text_to_id.call l + # toc_html += "" + content_html += "
    #{__docs_line_to_html__ l, parse_log}
    \n" elsif l.strip.length == 0 && !inside_pre # do nothing elsif l.start_with? "#+begin_src" diff --git a/dragon/draw.rb b/dragon/draw.rb index 128624d..7136994 100644 --- a/dragon/draw.rb +++ b/dragon/draw.rb @@ -1,4 +1,4 @@ -# Contributors outside of DragonRuby who also hold Copyright: Nick Sandberg +# coding: utf-8 # Copyright 2019 DragonRuby LLC # MIT License # draw.rb has been released under MIT (*only this file*). @@ -6,197 +6,44 @@ module GTK class Runtime module Draw - - def execute_draw_order pass - # Don't change this draw order unless you understand - # the implications. - render_solids pass - render_static_solids pass - render_sprites pass - render_static_sprites pass - render_primitives pass - render_static_primitives pass - render_labels pass - render_static_labels pass - render_lines pass - render_static_lines pass - render_borders pass - render_static_borders pass - end - def primitives pass if $top_level.respond_to? :primitives_override return $top_level.tick_render @args, pass end - execute_draw_order pass + fn.each_send pass.solids, self, :draw_solid + fn.each_send pass.static_solids, self, :draw_solid + fn.each_send pass.sprites, self, :draw_sprite + fn.each_send pass.static_sprites, self, :draw_sprite + fn.each_send pass.primitives, self, :draw_primitive + fn.each_send pass.static_primitives, self, :draw_primitive + fn.each_send pass.labels, self, :draw_label + fn.each_send pass.static_labels, self, :draw_label + fn.each_send pass.lines, self, :draw_line + fn.each_send pass.static_lines, self, :draw_line + fn.each_send pass.borders, self, :draw_border + fn.each_send pass.static_borders, self, :draw_border if !$gtk.production - # pass.debug.each { |r| draw_primitive r } - idx = 0 - length = pass.debug.length - while idx < length - draw_primitive (pass.debug.at idx) - idx += 1 - end - - # pass.static_debug.each { |r| draw_primitive r } - idx = 0 - length = pass.static_debug.length - while idx < length - draw_primitive (pass.static_debug.at idx) - idx += 1 - end + fn.each_send pass.debug, self, :draw_primitive + fn.each_send pass.static_debug, self, :draw_primitive end - # pass.reserved.each { |r| draw_primitive r } - idx = 0 - length = pass.reserved.length - while idx < length - draw_primitive (pass.reserved.at idx) - idx += 1 - end - - # pass.static_reserved.each { |r| draw_primitive r } - idx = 0 - length = pass.static_reserved.length - while idx < length - draw_primitive (pass.static_reserved.at idx) - idx += 1 - end + fn.each_send pass.reserved, self, :draw_primitive + fn.each_send pass.static_reserved, self, :draw_primitive rescue Exception => e pause! pretty_print_exception_and_export! e end - - def render_solids pass - # pass.solids.each { |s| draw_solid s } - # while loops are faster than each with block - idx = 0 - length = pass.solids.length - while idx < pass.solids.length - draw_solid (pass.solids.at idx) # accessing an array using .value instead of [] is faster - idx += 1 - end - end - - def render_static_solids pass - # pass.static_solids.each { |s| draw_solid s } - idx = 0 - length = pass.static_solids.length - while idx < length - draw_solid (pass.static_solids.at idx) - idx += 1 - end - end - - def render_sprites pass - # pass.sprites.each { |s| draw_sprite s } - idx = 0 - length = pass.sprites.length - while idx < length - draw_sprite (pass.sprites.at idx) - idx += 1 - end - end - - def render_static_sprites pass - # pass.static_sprites.each { |s| draw_sprite s } - idx = 0 - length = pass.static_sprites.length - while idx < length - draw_sprite (pass.static_sprites.at idx) - idx += 1 - end - end - - def render_primitives pass - # pass.primitives.each { |p| draw_primitive p } - idx = 0 - length = pass.primitives.length - while idx < length - draw_primitive (pass.primitives.at idx) - idx += 1 - end - end - - def render_static_primitives pass - # pass.static_primitives.each { |p| draw_primitive p } - idx = 0 - length = pass.static_primitives.length - while idx < length - draw_primitive (pass.static_primitives.at idx) - idx += 1 - end - end - - def render_labels pass - # pass.labels.each { |l| draw_label l } - idx = 0 - length = pass.labels.length - while idx < length - draw_label (pass.labels.at idx) - idx += 1 - end - end - - def render_static_labels pass - # pass.static_labels.each { |l| draw_label l } - idx = 0 - length = pass.static_labels.length - while idx < length - draw_label (pass.static_labels.at idx) - idx += 1 - end - end - - def render_lines pass - # pass.lines.each { |l| draw_line l } - idx = 0 - length = pass.lines.length - while idx < length - draw_line (pass.lines.at idx) - idx += 1 - end - end - - def render_static_lines pass - # pass.static_lines.each { |l| draw_line l } - idx = 0 - length = pass.static_lines.length - while idx < pass.static_lines.length - draw_line (pass.static_lines.at idx) - idx += 1 - end - end - - def render_borders pass - # pass.borders.each { |b| draw_border b } - idx = 0 - length = pass.borders.length - while idx < length - draw_border (pass.borders.at idx) - idx += 1 - end - end - - def render_static_borders pass - # pass.static_borders.each { |b| draw_border b } - idx = 0 - length = pass.static_borders.length - while idx < length - draw_border (pass.static_borders.at idx) - idx += 1 - end - end - def draw_solid s return unless s if s.respond_to? :draw_override s.draw_override @ffi_draw else - @ffi_draw.draw_solid s.x, s.y, s.w, s.h, s.r, s.g, s.b, s.a + @ffi_draw.draw_solid_2 s.x, s.y, s.w, s.h, + s.r, s.g, s.b, s.a, + (s.blendmode_enum || 1) end rescue Exception => e raise_conversion_for_rendering_failed s, e, :solid @@ -207,14 +54,15 @@ module GTK if s.respond_to? :draw_override s.draw_override @ffi_draw else - @ffi_draw.draw_sprite_3 s.x, s.y, s.w, s.h, - s.path.s_or_default, + @ffi_draw.draw_sprite_4 s.x, s.y, s.w, s.h, + (s.path || '').to_s, s.angle, s.a, s.r, s.g, s.b, s.tile_x, s.tile_y, s.tile_w, s.tile_h, !!s.flip_horizontally, !!s.flip_vertically, s.angle_anchor_x, s.angle_anchor_y, - s.source_x, s.source_y, s.source_w, s.source_h + s.source_x, s.source_y, s.source_w, s.source_h, + (s.blendmode_enum || 1) end rescue Exception => e raise_conversion_for_rendering_failed s, e, :sprite @@ -225,7 +73,7 @@ module GTK if s.respond_to? :draw_override s.draw_override @ffi_draw else - @ffi_draw.draw_screenshot s.path.s_or_default, + @ffi_draw.draw_screenshot (s.path || '').to_s, s.x, s.y, s.w, s.h, s.angle, s.a, s.r, s.g, s.b, @@ -243,10 +91,13 @@ module GTK if l.respond_to? :draw_override l.draw_override @ffi_draw else - @ffi_draw.draw_label l.x, l.y, l.text.s_or_default, - l.size_enum, l.alignment_enum, - l.r, l.g, l.b, l.a, - l.font.s_or_default(nil) + @ffi_draw.draw_label_3 l.x, l.y, + (l.text || '').to_s, + l.size_enum, l.alignment_enum, + l.r, l.g, l.b, l.a, + l.font, + (l.vertical_alignment_enum || 2), + (l.blendmode_enum || 1) end rescue Exception => e raise_conversion_for_rendering_failed l, e, :label @@ -257,7 +108,21 @@ module GTK if l.respond_to? :draw_override l.draw_override @ffi_draw else - @ffi_draw.draw_line l.x, l.y, l.x2, l.y2, l.r, l.g, l.b, l.a + if l.x2 + @ffi_draw.draw_line_2 l.x, l.y, l.x2, l.y2, + l.r, l.g, l.b, l.a, + (l.blendmode_enum || 1) + else + w = l.w || 0 + w = 1 if w == 0 + h = l.h || 0 + h = 1 if h == 0 + @ffi_draw.draw_line_2 l.x, l.y, + l.x + w - 1, + l.y + h - 1, + l.r, l.g, l.b, l.a, + (l.blendmode_enum || 1) + end end rescue Exception => e raise_conversion_for_rendering_failed l, e, :line @@ -268,7 +133,9 @@ module GTK if s.respond_to? :draw_override s.draw_override @ffi_draw else - @ffi_draw.draw_border s.x, s.y, s.w, s.h, s.r, s.g, s.b, s.a + @ffi_draw.draw_border_2 s.x, s.y, s.w, s.h, + s.r, s.g, s.b, s.a, + (s.blendmode_enum || 1) end rescue Exception => e raise_conversion_for_rendering_failed s, e, :border @@ -288,7 +155,6 @@ module GTK pause! pretty_print_exception_and_export! e end - end end end diff --git a/dragon/framerate.rb b/dragon/framerate.rb index 2550443..a9504a6 100644 --- a/dragon/framerate.rb +++ b/dragon/framerate.rb @@ -1,3 +1,4 @@ +# coding: utf-8 # Copyright 2019 DragonRuby LLC # MIT License # framerate.rb has been released under MIT (*only this file*). diff --git a/dragon/framerate_diagnostics.rb b/dragon/framerate_diagnostics.rb index 4586472..6985011 100644 --- a/dragon/framerate_diagnostics.rb +++ b/dragon/framerate_diagnostics.rb @@ -1,3 +1,4 @@ +# coding: utf-8 # Copyright 2019 DragonRuby LLC # MIT License # framerate_diagnostics.rb has been released under MIT (*only this file*). @@ -115,7 +116,7 @@ If this warning is getting annoying put the following in your tick method: def framerate_diagnostics_primitives [ - { x: 0, y: 93.from_top, w: 500, h: 93, a: 128 }.solid, + { x: 0, y: 93.from_top, w: 500, h: 93, a: 128 }.solid!, { x: 5, y: 5.from_top, @@ -124,7 +125,7 @@ If this warning is getting annoying put the following in your tick method: g: 255, b: 255, size_enum: -2 - }.label, + }.label!, { x: 5, y: 20.from_top, @@ -133,7 +134,7 @@ If this warning is getting annoying put the following in your tick method: g: 255, b: 255, size_enum: -2 - }.label, + }.label!, { x: 5, y: 35.from_top, @@ -142,7 +143,7 @@ If this warning is getting annoying put the following in your tick method: g: 255, b: 255, size_enum: -2 - }.label, + }.label!, { x: 5, y: 50.from_top, @@ -151,7 +152,7 @@ If this warning is getting annoying put the following in your tick method: g: 255, b: 255, size_enum: -2 - }.label, + }.label!, { x: 5, y: 65.from_top, @@ -160,7 +161,7 @@ If this warning is getting annoying put the following in your tick method: g: 255, b: 255, size_enum: -2 - }.label, + }.label!, ] end diff --git a/dragon/geometry.rb b/dragon/geometry.rb index c2974db..6bceea8 100644 --- a/dragon/geometry.rb +++ b/dragon/geometry.rb @@ -5,6 +5,22 @@ module GTK module Geometry + def self.rotate_point point, angle, around = nil + s = Math.sin a.to_radians + c = Math.cos a.to_radians + px = point.x + py = point.y + cx = 0 + cy = 0 + if around + cx = around.x + cy = around.y + end + + point.merge(x: ((px - cx) * c - (py - cy) * s) + cx, + y: ((px - cx) * s + (py - cy) * c) + cy) + end + # Returns f(t) for a cubic Bezier curve. def self.cubic_bezier t, a, b, c, d s = 1 - t @@ -86,7 +102,7 @@ module GTK rescue Exception => e raise e, <<-S * ERROR: -center_inside_rect for self #{self} and other_rect #{other_rect}. Failed with exception #{e}. +center_inside_rect for self #{self} and other_rect #{other_rect}.\n#{e}. S end @@ -103,7 +119,7 @@ S rescue Exception => e raise e, <<-S * ERROR: -center_inside_rect_x for self #{self} and other_rect #{other_rect}. Failed with exception #{e}. +center_inside_rect_x for self #{self} and other_rect #{other_rect}.\n#{e}. S end @@ -120,7 +136,7 @@ S rescue Exception => e raise e, <<-S * ERROR: -center_inside_rect_y for self #{self} and other_rect #{other_rect}. Failed with exception #{e}. +center_inside_rect_y for self #{self} and other_rect #{other_rect}.\n#{e}. S end @@ -265,10 +281,10 @@ S # @gtk def self.intersect_rect? rect_one, rect_two, tolerance = 0.1 - return false if rect_one.right - tolerance < rect_two.left + tolerance - return false if rect_one.left + tolerance > rect_two.right - tolerance - return false if rect_one.top - tolerance < rect_two.bottom + tolerance - return false if rect_one.bottom + tolerance > rect_two.top - tolerance + return false if ((rect_one.x + rect_one.w) - tolerance) < (rect_two.x + tolerance) + return false if (rect_one.x + tolerance) > ((rect_two.x + rect_two.w) - tolerance) + return false if ((rect_one.y + rect_one.h) - tolerance) < (rect_two.y + tolerance) + return false if (rect_one.y + tolerance) > ((rect_two.y + rect_two.h) - tolerance) return true rescue Exception => e context_help_rect_one = (rect_one.__help_contract_implementation contract_intersect_rect?)[:not_implemented_methods] @@ -296,6 +312,7 @@ S - rect_one: #{rect_one} - rect_two: #{rect_two} #{context_help} +\n#{e} S end @@ -306,14 +323,14 @@ S y = y.shift_down(size * anchor_y) [x, y, size, size] rescue Exception => e - raise e, ":to_square failed for size: #{size} x: #{x} y: #{y} anchor_x: #{anchor_x} anchor_y: #{anchor_y}." + raise e, ":to_square failed for size: #{size} x: #{x} y: #{y} anchor_x: #{anchor_x} anchor_y: #{anchor_y}.\n#{e}" end # @gtk def self.distance point_one, point_two Math.sqrt((point_two.x - point_one.x)**2 + (point_two.y - point_one.y)**2) rescue Exception => e - raise e, ":distance failed for point_one: #{point_one} point_two #{point_two}." + raise e, ":distance failed for point_one: #{point_one} point_two #{point_two}.\n#{e}" end # @gtk @@ -322,31 +339,34 @@ S d_x = end_point.x - start_point.x Math::PI.+(Math.atan2(d_y, d_x)).to_degrees rescue Exception => e - raise e, ":angle_from failed for start_point: #{start_point} end_point: #{end_point}." + raise e, ":angle_from failed for start_point: #{start_point} end_point: #{end_point}.\n#{e}" end # @gtk def self.angle_to start_point, end_point angle_from end_point, start_point rescue Exception => e - raise e, ":angle_to failed for start_point: #{start_point} end_point: #{end_point}." + raise e, ":angle_to failed for start_point: #{start_point} end_point: #{end_point}.\n#{e}" end # @gtk def self.point_inside_circle? point, circle_center_point, radius (point.x - circle_center_point.x) ** 2 + (point.y - circle_center_point.y) ** 2 < radius ** 2 rescue Exception => e - raise e, ":point_inside_circle? failed for point: #{point} circle_center_point: #{circle_center_point} radius: #{radius}" + raise e, ":point_inside_circle? failed for point: #{point} circle_center_point: #{circle_center_point} radius: #{radius}.\n#{e}" end # @gtk def self.inside_rect? inner_rect, outer_rect, tolerance = 0.0 + return nil if !inner_rect + return nil if !outer_rect + inner_rect.x + tolerance >= outer_rect.x - tolerance && - inner_rect.right - tolerance <= outer_rect.right + tolerance && + (inner_rect.x + inner_rect.w) - tolerance <= (outer_rect.x + outer_rect.w) + tolerance && inner_rect.y + tolerance >= outer_rect.y - tolerance && - inner_rect.top - tolerance <= outer_rect.top + tolerance + (inner_rect.y + inner_rect.h) - tolerance <= (outer_rect.y + outer_rect.h) + tolerance rescue Exception => e - raise e, ":inside_rect? failed for inner_rect: #{inner_rect} outer_rect: #{outer_rect}." + raise e, ":inside_rect? failed for inner_rect: #{inner_rect} outer_rect: #{outer_rect}.\n#{e}" end # @gtk @@ -381,7 +401,7 @@ S return rect end rescue Exception => e - raise e, ":scale_rect_extended failed for rect: #{rect} percentage_x: #{percentage_x} percentage_y: #{percentage_y} anchors_x: #{anchor_x} anchor_y: #{anchor_y}." + raise e, ":scale_rect_extended failed for rect: #{rect} percentage_x: #{percentage_x} percentage_y: #{percentage_y} anchors_x: #{anchor_x} anchor_y: #{anchor_y}.\n#{e}" end # @gtk @@ -395,7 +415,21 @@ S anchor_x: anchor_x, anchor_y: anchor_y rescue Exception => e - raise e, ":scale_rect failed for rect: #{rect} percentage: #{percentage} anchors [#{anchor_x} (x), #{anchor_y} (y)]." + raise e, ":scale_rect failed for rect: #{rect} percentage: #{percentage} anchors [#{anchor_x} (x), #{anchor_y} (y)].\n#{e}" + end + + def self.rect_to_line rect + l = rect.to_hash.line + l.merge(x2: l.x + l.w - 1, + y2: l.y + l.h) + end + + def self.rect_center_point rect + { x: rect.x + rect.w.half, y: rect.y + rect.h.half } + end + + def rect_center_point + Geometry.rect_center_point self end end # module Geometry end # module GTK diff --git a/dragon/grid.rb b/dragon/grid.rb index c2a6a43..2c808fc 100644 --- a/dragon/grid.rb +++ b/dragon/grid.rb @@ -185,5 +185,13 @@ module GTK def bottom_right [@right, @bottom].point end + + def x + 0 + end + + def y + 0 + end end end diff --git a/dragon/help.rb b/dragon/help.rb deleted file mode 100644 index 9644347..0000000 --- a/dragon/help.rb +++ /dev/null @@ -1,72 +0,0 @@ -# coding: utf-8 -# Copyright 2019 DragonRuby LLC -# MIT License -# help.rb has been released under MIT (*only this file*). - -module GTK - class Help - def self.primitive_contract primitive_name - if primitive_name == :label - label_contract - elsif primitive_name == :solid - solid_border_contract - elsif primitive_name == :border - solid_border_contract - elsif primitive_name == :sprite - sprite_contract - else - help_text = "No contract found for primitive #{primitive_name}. The supported primitives are :label, :solid, :border, :sprite." - end - end - - def self.label_contract - <<-S -* :label (if :primitive_marker returns :label) -** :x, :y, :text -** :size_enum -default: 0 -negative value means smaller text -positive value means larger text -** :alignment_enum default: 0 -default: 0 -0: left aligned, 1: center aligned, 2: right aligned -** :r, :g, :b, :a -default: 0's for rgb and 255 for a -** :font -default nil -path to ttf file -S - end - - def self.solid_border_contract - <<-S -* :solid, :border (if :primitive_marker returns :solid or :border) -** :x, :y, :w, :h, :r, :g, :b, :a -S - end - - def self.label_contract - <<-S -* :line (if :primitive_marker returns :line) -** :x, :y, :x2, :y2, :r, :g, :b, :a -S - end - - def self.sprite_contract - <<-S -* :sprite (if :primitive_marker returns :sprite) -** :x, :y, :w, :h -** :angle, :angle_anchor_x, :angle_anchor_y -default for angle: 0 (0 to 360 degrees) -default for angle_anchor_(x|y): 0 (decimal value between 0 and 1.0, 0.5 means center) -** :r, :g, :b, :a -** :tile_x, :tile_y -default: 0, x, y offset for sprite to crop at -** :tile_w, :tile_h -default: -1, width and height of crop (-1 means full width and height) -** :flip_horizontally, :flip_vertically -default: falsey value -S - end - end -end diff --git a/dragon/hotload.rb b/dragon/hotload.rb index 1cb062a..1196e2b 100644 --- a/dragon/hotload.rb +++ b/dragon/hotload.rb @@ -10,7 +10,14 @@ module GTK def hotload_init @hotload_if_needed = 0 @mailbox_if_needed = 0 + + # schema for file_mtimes + # { FILE_PATH: { current: (Time as Fixnum), + # last: (Time as Fixnum) }, + # FILE_PATH: { current: (Time as Fixnum), + # last: (Time as Fixnum) } } @file_mtimes = { } + @suppress_mailbox = true files_to_reload.each { |f| init_mtimes f } init_mtimes 'app/mailbox.rb' @@ -48,6 +55,7 @@ module GTK 'dragon/symbol.rb', 'dragon/numeric_deprecated.rb', 'dragon/numeric.rb', + 'dragon/hash_deprecated.rb', 'dragon/hash.rb', 'dragon/outputs_deprecated.rb', 'dragon/array_docs.rb', @@ -80,6 +88,7 @@ module GTK 'dragon/trace.rb', 'dragon/readme_docs.rb', 'dragon/hotload_client.rb', + 'dragon/wizards.rb', 'dragon/ios_wizard.rb', 'dragon/itch_wizard.rb', ] + core_files_to_reload + @required_files @@ -98,10 +107,8 @@ module GTK end def init_mtimes file - current_key = "current_#{file}".to_sym - last_key = "last_#{file}".to_sym - @file_mtimes[current_key] ||= @ffi_file.mtime(file) - @file_mtimes[last_key] ||= @ffi_file.mtime(file) + @file_mtimes[file] ||= { current: @ffi_file.mtime(file), + last: @ffi_file.mtime(file) } end def hotload_source_files @@ -133,25 +140,36 @@ module GTK end def hotload_if_needed + return if Kernel.tick_count < 0 hotload_source_files check_mailbox end def on_load_succeeded file - @rcb_sender.files_reloaded << file - @rcb_sender.reloaded_files << file + self.files_reloaded << file + self.reloaded_files << file Trace.untrace_classes! end + def reset_all_mtimes + @file_mtimes.each do |file, _| + @file_mtimes[file].current = @ffi_file.mtime(file) + @file_mtimes[file].last = @file_mtimes[file].current + end + + files_to_reload.each do |file, _| + @file_mtimes[file] ||= {} + @file_mtimes[file].current = @ffi_file.mtime(file) + @file_mtimes[file].last = @file_mtimes[file].current + end + end + def reload_if_needed file, force = false - current_key = "current_#{file}".to_sym - last_key = "last_#{file}".to_sym - @file_mtimes[current_key] ||= nil - @file_mtimes[last_key] ||= nil - @file_mtimes[current_key] = @ffi_file.mtime(file) - return if !force && @file_mtimes[last_key] == @file_mtimes[current_key] + @file_mtimes[file] ||= { current: @ffi_file.mtime(file), last: @ffi_file.mtime(file) } + @file_mtimes[file].current = @ffi_file.mtime(file) + return if !force && @file_mtimes[file].current == @file_mtimes[file].last on_load_succeeded file if reload_ruby_file file - @file_mtimes[last_key] = @file_mtimes[current_key] + @file_mtimes[file].last = @file_mtimes[file].current end end end diff --git a/dragon/inputs.rb b/dragon/inputs.rb index 0ae4f86..163fc16 100644 --- a/dragon/inputs.rb +++ b/dragon/inputs.rb @@ -191,6 +191,30 @@ module GTK } end + def self.method_to_key_hash + return @method_to_key_hash if @method_to_key_hash + @method_to_key_hash = {} + string_representation_overrides ||= { + backspace: '\b' + } + char_to_method_hash.each do |k, v| + v.each do |vi| + t = { char_or_raw_key: k } + + if k.is_a? Numeric + t[:raw_key] = k + t[:string_representation] = "raw_key == #{k}" + else + t[:char] = k + t[:string_representation] = "\"#{k.strip}\"" + end + + @method_to_key_hash[vi] = t + end + end + @method_to_key_hash + end + def self.char_to_method char, int = nil methods = char_to_method_hash[char] || char_to_method_hash[int] methods ? methods.dup : [char.to_sym || int] @@ -305,24 +329,32 @@ S end def method_missing m, *args - begin - define_singleton_method(m) do - r = self.instance_variable_get("@#{m.without_ending_bang}".to_sym) - clear_key m - return r + if KeyboardKeys.method_to_key_hash[m.without_ending_bang] + begin + define_singleton_method(m) do + r = self.instance_variable_get("@#{m.without_ending_bang}".to_sym) + clear_key m + return r + end + + return self.send m + rescue Exception => e + log_important "#{e}" end - - return self.send m - rescue Exception => e - log_important "#{e}" end + did_you_mean = KeyboardKeys.method_to_key_hash.find_all do |k, v| + k.to_s[0..1] == m.to_s[0..1] + end.map {|k, v| ":#{k} (#{v[:string_representation]})" } + did_you_mean_string = "" + did_you_mean_string = ". Did you mean #{did_you_mean.join ", "}?" + raise <<-S * ERROR: -There is no member on the keyboard called #{m}. Here is a to_s representation of what's available: - -#{KeyboardKeys.char_to_method_hash.map { |k, v| "[#{k} => #{v.join(",")}]" }.join(" ")} +#{KeyboardKeys.method_to_key_hash.map { |k, v| "** :#{k} #{v.string_representation}" }.join("\n")} +There is no key on the keyboard called :#{m}#{did_you_mean_string}. +Full list of available keys =:points_up:=. S end @@ -706,6 +738,10 @@ module GTK (controller_one && controller_one.directional_vector) end + def directional_angle + keyboard.directional_angle || (controller_one && controller_one.directional_angle) + end + # Returns a signal indicating right (`1`), left (`-1`), or neither ('0'). # # @return [Integer] diff --git a/dragon/ios_wizard.rb b/dragon/ios_wizard.rb index c1c032d..a64cdc9 100644 --- a/dragon/ios_wizard.rb +++ b/dragon/ios_wizard.rb @@ -1,19 +1,11 @@ -# Contributors outside of DragonRuby who also hold Copyright: Michał Dudziński +# coding: utf-8 # Copyright 2019 DragonRuby LLC # MIT License # ios_wizard.rb has been released under MIT (*only this file*). -class WizardException < Exception - attr_accessor :console_primitives - - def initialize *console_primitives - @console_primitives = console_primitives - end -end - -class IOSWizard - include Metadata +# Contributors outside of DragonRuby who also hold Copyright: Michał Dudziński +class IOSWizard < Wizard def initialize @doctor_executed_at = 0 end @@ -26,23 +18,45 @@ class IOSWizard @steps ||= [] end - def steps_development_build + def prerequisite_steps [ :check_for_xcode, :check_for_brew, :check_for_certs, - :check_for_device, - :check_for_dev_profile, + ] + end + + def app_metadata_retrieval_steps + [ :determine_team_identifier, :determine_app_name, :determine_app_id, - :blow_away_temp, + ] + end + + def steps_development_build + [ + *prerequisite_steps, + + :check_for_device, + :check_for_dev_profile, + + *app_metadata_retrieval_steps, + + :clear_tmp_directory, :stage_app, + :development_write_info_plist, + :write_entitlements_plist, :compile_icons, - :create_payload_directory, + :clear_payload_directory, + + :create_payload_directory_dev, + + :create_payload, :code_sign_payload, + :create_ipa, :deploy ] @@ -50,20 +64,27 @@ class IOSWizard def steps_production_build [ - :check_for_xcode, - :check_for_brew, - :check_for_certs, + *prerequisite_steps, + :check_for_distribution_profile, - :determine_team_identifier, - :determine_app_name, - :determine_app_id, - :blow_away_temp, + :determine_app_version, + + *app_metadata_retrieval_steps, + + :clear_tmp_directory, :stage_app, + :production_write_info_plist, + :write_entitlements_plist, :compile_icons, - :create_payload_directory, + :clear_payload_directory, + + :create_payload_directory_prod, + + :create_payload, :code_sign_payload, + :create_ipa, :print_publish_help ] @@ -84,31 +105,25 @@ class IOSWizard sprite_path end - def start opts = {} - @opts = opts + def start opts = nil + @opts = opts || {} - unless $gtk.args.fn.eq_any? @opts[:env], :dev, :prod + if !(@opts.is_a? Hash) || !($gtk.args.fn.eq_any? @opts[:env], :dev, :prod) raise WizardException.new( - "* $wizards.ios.start needs to be provided an environment option.", - "** For development builds type: $wizards.ios.start env: :dev", - "** For production builds type: $wizards.ios.start env: :prod" - ) + "* $wizards.ios.start needs to be provided an environment option.", + "** For development builds type: $wizards.ios.start env: :dev", + "** For production builds type: $wizards.ios.start env: :prod" + ) end @production_build = (@opts[:env] == :prod) - - @version = determine_app_version @opts - log_info "I will be using version: '#{@version}'" if @production_build - @steps = steps_development_build @steps = steps_production_build if @production_build @certificate_name = nil + @app_version = opts[:version] + @app_version = "1.0" if @opts[:env] == :dev && !@app_version init_wizard_status - if @production_build - log_info "Starting iOS Wizard so we can create a production build." - else - log_info "Starting iOS Wizard so we can deploy to your device." - end + log_info "Starting iOS Wizard so we can deploy to your device." @start_at = Kernel.global_tick_count steps.each do |m| log_info "Running step ~:#{m}~." @@ -128,8 +143,10 @@ class IOSWizard log "=" * $console.console_text_width else log_error e.to_s + log e.__backtrace_to_org__ end + init_wizard_status $console.set_command "$wizards.ios.start env: :#{@opts[:env]}" end @@ -236,25 +253,69 @@ class IOSWizard return "profiles/development.mobileprovision" end + def ios_metadata_template + <<-S +# ios_metadata.txt is used by the Pro version of DragonRuby Game Toolkit to create iOS apps. +# Information about the Pro version can be found at: http://dragonruby.org/toolkit/game#purchase + +# teamid needs to be set to your assigned Team Id which can be found at https://developer.apple.com/account/#/membership/ +teamid= +# appid needs to be set to your application identifier which can be found at https://developer.apple.com/account/resources/identifiers/list +appid= +# appname is the name you want to show up underneath the app icon on the device. Keep it under 10 characters. +appname= +S + end + + def ios_metadata + contents = $gtk.read_file 'metadata/ios_metadata.txt' + + if !contents + $gtk.write_file 'metadata/ios_metadata.txt', ios_metadata_template + contents = $gtk.read_file 'metadata/ios_metadata.txt' + end + + kvps = contents.each_line + .reject { |l| l.strip.length == 0 || (l.strip.start_with? "#") } + .map do |l| + key, value = l.split("=") + [key.strip.to_sym, value.strip] + end.flatten + Hash[*kvps] + end + + def game_metadata + contents = $gtk.read_file 'metadata/game_metadata.txt' + + kvps = contents.each_line + .reject { |l| l.strip.length == 0 || (l.strip.start_with? "#") } + .map do |l| + key, value = l.split("=") + [key.strip.to_sym, value.strip] + end.flatten + Hash[*kvps] + end + + def raise_ios_metadata_required + raise WizardException.new( + "* mygame/metadata/ios_metadata.txt needs to be filled out.", + "You need to update metadata/ios_metadata.txt with a valid teamid, appname, and appid.", + "Instructions for where the values should come from are within metadata/ios_metadata.txt." + ) + end + def determine_team_identifier - @team_name = (team_identifier_from_provisioning_profile @opts[:env]) - log_info "Team Identifier is: #{@team_name}" + @team_id = (ios_metadata.teamid || "") + raise_ios_metadata_required if @team_id.strip.length == 0 + log_info "Team Identifer is: #{@team_id}" end def determine_app_name - @app_name = (provisioning_profile_xml @opts[:env])[:children].first[:children].first[:children][1][:children].first[:data] + @app_name = (ios_metadata.appname || "") + raise_ios_metadata_required if @app_name.strip.length == 0 log_info "App name is: #{@app_name}." end - def determine_app_version opts - version = @opts[:version] - unless version - version = get_metadata[:version] - version = version.start_with?('#') ? '1.0' : version.split('=').last - end - version.to_s - end - def provisioning_profile_xml environment xml = $gtk.read_file (provisioning_profile_path environment) scrubbed = xml.each_line.map do |l| @@ -275,36 +336,9 @@ class IOSWizard $gtk.parse_xml scrubbed end - def app_id_from_provisioning_profile environment - application_identifier_index = (provisioning_profile_xml environment)[:children][0][:children][0][:children][13][:children][0][:children][0][:data] - (provisioning_profile_xml environment)[:children][0][:children][0][:children][13][:children].each.with_index do |node, i| - if node[:children] && node[:children][0] && node[:children][0][:data] == "application-identifier" - application_identifier_index = i - break - end - end - - app_id_with_team_identifier = (provisioning_profile_xml environment)[:children].first[:children].first[:children][13][:children][application_identifier_index + 1][:children].first[:data] - team_identifier = team_identifier_from_provisioning_profile environment - app_id_with_team_identifier.gsub "#{team_identifier}.", "" - end - - def team_identifier_from_provisioning_profile environment - team_identifier_index = (provisioning_profile_xml environment)[:children][0][:children][0][:children][13][:children][0][:children][0][:data] - - (provisioning_profile_xml environment)[:children][0][:children][0][:children][13][:children].each.with_index do |node, i| - if node[:children] && node[:children][0] && node[:children][0][:data] == "com.apple.developer.team-identifier" - team_identifier_index = i - break - end - end - - (provisioning_profile_xml environment)[:children].first[:children].first[:children][13][:children][team_identifier_index + 1][:children].first[:data] - end - def determine_app_id - @app_id = app_id_from_provisioning_profile @opts[:env] - + @app_id = ios_metadata.appid + raise_ios_metadata_required if @app_id.strip.length == 0 log_info "App Identifier is set to : #{@app_id}" end @@ -323,7 +357,7 @@ class IOSWizard end end - def blow_away_temp + def clear_tmp_directory sh "rm -rf #{tmp_directory}" end @@ -377,7 +411,7 @@ class IOSWizard "** 1. Open Xcode.", "** 2. Log into your developer account. Xcode -> Preferences -> Accounts.", { w: 700, h: 98, path: get_reserved_sprite("login-xcode.png") }, - "** 3. After logging in, select Manage Certificates...", + "** 3. After loggin in, select Manage Certificates...", { w: 700, h: 115, path: get_reserved_sprite("manage-certificates.png") }, "** 4. Add a certificate for Apple Development.", { w: 700, h: 217, path: get_reserved_sprite("add-cert.png") }, @@ -464,7 +498,8 @@ XML log_info "Creating Entitlements.plist" - $gtk.write_file_root "tmp/ios/Entitlements.plist", entitlement_plist_string.gsub(":app_id", "#{@team_name}.#{@app_id}").strip + $gtk.write_file_root "tmp/ios/Entitlements.plist", entitlement_plist_string.gsub(":app_id", "#{@team_id}.#{@app_id}").strip + $gtk.write_file_root "tmp/ios/Entitlements.txt", entitlement_plist_string.gsub(":app_id", "#{@team_id}.#{@app_id}").strip sh "/usr/bin/plutil -convert binary1 \"#{tmp_directory}/Entitlements.plist\"" sh "/usr/bin/plutil -convert xml1 \"#{tmp_directory}/Entitlements.plist\"" @@ -502,15 +537,15 @@ XML CFBundleExecutable :app_name CFBundleInfoDictionaryVersion - 6.0 + :app_version CFBundlePackageType APPL CFBundleShortVersionString - 5.6 + :app_version CFBundleSignature ???? CFBundleVersion - 5.6 + :app_version CFBundleIcons CFBundlePrimaryIcon @@ -659,13 +694,13 @@ XML CFBundleIdentifier :app_id CFBundleInfoDictionaryVersion - 6.0 + :app_version CFBundleName :app_name CFBundlePackageType APPL CFBundleShortVersionString - 5.2 + :app_version CFBundleSignature ???? CFBundleSupportedPlatforms @@ -673,7 +708,7 @@ XML iPhoneOS CFBundleVersion - 5.2 + :app_version DTCompiler com.apple.compilers.llvm.clang.1_0 DTPlatformBuild @@ -759,6 +794,7 @@ XML info_plist_string.gsub!(":app_id", @app_id) $gtk.write_file_root "tmp/ios/#{@app_name}.app/Info.plist", info_plist_string.strip + $gtk.write_file_root "tmp/ios/Info.txt", info_plist_string.strip @info_plist_written = true end @@ -812,13 +848,13 @@ XML CFBundleIdentifier :app_id CFBundleInfoDictionaryVersion - 6.0 + :app_version CFBundleName :app_name CFBundlePackageType APPL CFBundleShortVersionString - :version + :app_version CFBundleSignature ???? CFBundleSupportedPlatforms @@ -826,7 +862,7 @@ XML iPhoneOS CFBundleVersion - :version + :app_version DTCompiler com.apple.compilers.llvm.clang.1_0 DTPlatformBuild @@ -910,9 +946,10 @@ XML info_plist_string.gsub!(":app_name", @app_name) info_plist_string.gsub!(":app_id", @app_id) - info_plist_string.gsub!(":version", @version); + info_plist_string.gsub!(":app_version", @app_version) $gtk.write_file_root "tmp/ios/#{@app_name}.app/Info.plist", info_plist_string.strip + $gtk.write_file_root "tmp/ios/Info.txt", info_plist_string.strip @info_plist_written = true end @@ -934,28 +971,53 @@ XML "#{relative_path}/#{$gtk.cli_arguments[:dragonruby]}" end - def write_ip_address + def embed_mobileprovision + sh %Q[cp #{@provisioning_profile_path} "#{app_path}/embedded.mobileprovision"] + sh %Q[/usr/bin/plutil -convert binary1 "#{app_path}/Info.plist"] + end + + def clear_payload_directory + sh %Q[rm "#{@app_name}".ipa] + sh %Q[rm -rf "#{app_path}/app"] + sh %Q[rm -rf "#{app_path}/sounds"] + sh %Q[rm -rf "#{app_path}/sprites"] + sh %Q[rm -rf "#{app_path}/data"] + sh %Q[rm -rf "#{app_path}/fonts"] + end + + def stage_app + sh %Q[cp -r "#{root_folder}/app/" "#{app_path}/app/"] + sh %Q[cp -r "#{root_folder}/sounds/" "#{app_path}/sounds/"] + sh %Q[cp -r "#{root_folder}/sprites/" "#{app_path}/sprites/"] + sh %Q[cp -r "#{root_folder}/data/" "#{app_path}/data/"] + sh %Q[cp -r "#{root_folder}/fonts/" "#{app_path}/fonts/"] + end + + def create_payload + sh %Q[mkdir -p #{tmp_directory}/ipa_root/Payload] + sh %Q[cp -r "#{app_path}" "#{tmp_directory}/ipa_root/Payload"] + sh %Q[chmod -R 755 "#{tmp_directory}/ipa_root/Payload"] + end + + def create_payload_directory_dev + # write dev machine's ip address for hotloading $gtk.write_file "app/server_ip_address.txt", $gtk.ffi_misc.get_local_ip_address.strip + + embed_mobileprovision + clear_payload_directory + stage_app end - def create_payload_directory - sh "cp #{@provisioning_profile_path} \"#{app_path}/embedded.mobileprovision\"" - sh "/usr/bin/plutil -convert binary1 \"#{app_path}/Info.plist\"" - write_ip_address - sh "rm \"#{@app_name}\".ipa" - sh "rm -rf \"#{app_path}/app\"" - sh "rm -rf \"#{app_path}/sounds\"" - sh "rm -rf \"#{app_path}/sprites\"" - sh "rm -rf \"#{app_path}/data\"" - sh "rm -rf \"#{app_path}/fonts\"" - sh "cp -r \"#{root_folder}/app/\" \"#{app_path}/app/\"" - sh "cp -r \"#{root_folder}/sounds/\" \"#{app_path}/sounds/\"" - sh "cp -r \"#{root_folder}/sprites/\" \"#{app_path}/sprites/\"" - sh "cp -r \"#{root_folder}/data/\" \"#{app_path}/data/\"" - sh "cp -r \"#{root_folder}/fonts/\" \"#{app_path}/fonts/\"" - sh "mkdir -p #{tmp_directory}/ipa_root/Payload" - sh "cp -r \"#{app_path}\" \"#{tmp_directory}/ipa_root/Payload\"" - sh "chmod -R 755 \"#{tmp_directory}/ipa_root/Payload\"" + def create_payload_directory_prod + # production builds does not hotload ip address + sh %Q[rm "#{root_folder}/app/server_ip_address.txt"] + + embed_mobileprovision + stage_app + + # production build marker + sh %Q[mkdir -p "#{app_path}/metadata/"] + sh %Q[touch metadata/DRAGONRUBY_PRODUCTION_BUILD] end def create_ipa @@ -988,10 +1050,22 @@ SCRIPT end def print_publish_help - log_info "Go to https://appstoreconnect.apple.com/apps and create an App if you haven't already done so." - log_info "Go to https://appleid.apple.com and create a 'Application Specific Password'." - log_info "To upload your app, Download Transporter from the App Store https://apps.apple.com/us/app/transporter/id1450874784?mt=12." - log_info "Your app is located at ./tmp/ios/#{@app_name}.ipa" + has_transporter = (sh "ls /Applications/Transporter.app").include? "Contents" + if !has_transporter + $gtk.openurl "https://apps.apple.com/us/app/transporter/id1450874784?mt=12" + $console.set_command "$wizards.ios.start env: :#{@opts[:env]}, version: \"#{@opts[:version]}\"" + raise WizardException.new( + "* To upload your app, Download Transporter from the App Store https://apps.apple.com/us/app/transporter/id1450874784?mt=12." + ) + else + sh "mkdir ./tmp/ios/intermediary_artifacts" + sh "mv \"#{tmp_directory}/#{@app_name}.app\" #{tmp_directory}/intermediary_artifacts/" + sh "mv \"#{tmp_directory}/do_zip.sh\" #{tmp_directory}/intermediary_artifacts" + sh "mv \"#{tmp_directory}/Entitlements.plist\" #{tmp_directory}/intermediary_artifacts" + sh "mv \"#{tmp_directory}/ipa_root\" #{tmp_directory}/intermediary_artifacts/" + sh "open /Applications/Transporter.app" + sh "open ./tmp/ios/" + end end def compile_icons @@ -1012,4 +1086,24 @@ S sh "cp -r \"#{root_folder}/native/\" \"#{app_path}/native/\"" sh "CODESIGN_ALLOCATE=\"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate\" /usr/bin/codesign -f -s \"#{@certificate_name}\" --entitlements #{tmp_directory}/Entitlements.plist \"#{tmp_directory}/#{@app_name}.app/native/ios-device/ext.dylib\"" end + + def set_version version + @app_version = version + start env: @opts[:env], version: version + end + + def app_version + log_info "Attempting to retrieve App Version from metadata/ios_metadata.txt." + ios_version_number = (ios_metadata.version || "").strip + if ios_version_number.length == 0 + log_info "Not found. Attempting to retrieve App Version from metadata/game_metadata.txt." + ios_version_number = (game_metadata.version || "").strip + end + ios_version_number + end + + def determine_app_version + @app_version = app_version + return if @app_version + end end diff --git a/dragon/itch_wizard.rb b/dragon/itch_wizard.rb index c0a69de..e976dc9 100644 --- a/dragon/itch_wizard.rb +++ b/dragon/itch_wizard.rb @@ -1,24 +1,34 @@ +# coding: utf-8 # Copyright 2019 DragonRuby LLC # MIT License # itch_wizard.rb has been released under MIT (*only this file*). -class ItchWizard - include Metadata - +class ItchWizard < Wizard def steps [ :check_metadata, - :deploy + :deploy, ] end + def write_blank_metadata + $gtk.write_file metadata_file_path, <<-S.strip +#devid=myname +#devtitle=My Name +#gameid=mygame +#gametitle=My Game +#version=0.1 +#icon=metadata/icon.png +S + end + def check_metadata metadata_text = $gtk.read_file metadata_file_path if !metadata_text write_blank_metadata end - if metadata_text.each_line.to_a.length != 6 + if metadata_text.strip.each_line.to_a.length < 6 write_blank_metadata end @@ -30,70 +40,67 @@ class ItchWizard if metadata[:dev_id].start_with?("#") || !@dev_id log "* PROMPT: Please provide your username for Itch." - $console.set_command "$wizards.itch.set_dev_id \"your-itch-username\"" + $console.set_command "$wizards.itch.set_dev_id \"#{metadata[:dev_id]}\"" return :need_dev_id end if metadata[:dev_title].start_with?("#") || !@dev_title log "* PROMPT: Please provide developer's/company's name that you want displayed." - $console.set_command "$wizards.itch.set_dev_title \"Your Name\"" + $console.set_command "$wizards.itch.set_dev_title \"#{metadata[:dev_title]}\"" return :need_dev_title end if metadata[:game_id].start_with?("#") || !@game_id log "* PROMPT: Please provide the id for you game. This is the id you specified when you set up a new game page on Itch." - $console.set_command "$wizards.itch.set_game_id \"your-game-id\"" + $console.set_command "$wizards.itch.set_game_id \"#{metadata[:game_id]}\"" return :need_game_id end if metadata[:game_title].start_with?("#") || !@game_title log "* PROMPT: Please provide the display name for your game. (This can include spaces)" - $console.set_command "$wizards.itch.set_game_title \"Your Game\"" + $console.set_command "$wizards.itch.set_game_title \"#{metadata[:game_title]}\"" return :need_game_title end if metadata[:version].start_with?("#") || !@version log "* PROMPT: Please provide the version for your game." - $console.set_command "$wizards.itch.set_version \"1.0\"" + $console.set_command "$wizards.itch.set_version \"#{metadata[:version]}\"" return :need_version end if metadata[:icon].start_with?("#") || !@icon log "* PROMPT: Please provide icon path for your game." - $console.set_command "$wizards.itch.set_icon \"icon.png\"" + $console.set_command "$wizards.itch.set_icon \"#{metadata[:icon]}\"" return :need_icon end + puts "here!! success!!!" + return :success end def set_dev_id value @dev_id = value - write_metadata start end def set_dev_title value @dev_title = value - write_metadata start end def set_game_id value @game_id = value - write_metadata start end def set_game_title value @game_title = value - write_metadata start end def set_version value @version = value - write_metadata start end @@ -136,7 +143,7 @@ class ItchWizard end if @icon - text += "icon=metadata/#{@icon}\n" + text += "icon=#{@icon}\n" else text += "#icon=metadata/icon.png\n" end @@ -154,10 +161,25 @@ class ItchWizard def deploy log_info "* Running dragonruby-publish: #{package_command}" - results = $gtk.exec package_command + $gtk.openurl "http://itch.io/dashboard" if $gtk.platform == "Mac OS X" + if $gtk.platform? :mac + $gtk.exec "rm -rf ./builds" + end + results = $gtk.exec "#{package_command} --only-package" + puts File.expand_path("./builds") + log "#+begin_src" log results log "#+end_src" + + if $gtk.platform? :mac + $gtk.exec "open ./builds/" + elsif $gtk.platform? :windows + $gtk.exec "powershell \"ii .\"" + end + + $gtk.openurl "https://itch.io/dashboard" + :success end @@ -168,7 +190,7 @@ class ItchWizard steps.each do |m| begin log_info "Running Itch Wizard Step: ~$wizards.itch.#{m}~" - result = (send m) || :success if @wizard_status[m][:result] != :success + result = (send m) || :success @wizard_status[m][:result] = result if result != :success log_info "Exiting wizard. :#{result}" diff --git a/dragon/keys.rb b/dragon/keys.rb index c931aff..c49d98a 100644 --- a/dragon/keys.rb +++ b/dragon/keys.rb @@ -14,7 +14,7 @@ module GTK :l1, :r1, :l2, :r2, :l3, :r3, - :start, :select, + :start, :select, :home, :directional_up, :directional_down, :directional_left, :directional_right ].freeze @@ -22,6 +22,22 @@ module GTK attr label end + def back + @select + end + + def back= value + @select = value + end + + def guide + @home + end + + def guide= value + @home = value + end + # Activate a key. # # @return [void] diff --git a/dragon/layout.rb b/dragon/layout.rb index 1b0f8d0..18ca8c7 100644 --- a/dragon/layout.rb +++ b/dragon/layout.rb @@ -1,3 +1,4 @@ +# coding: utf-8 # Copyright 2019 DragonRuby LLC # MIT License # layout.rb has been released under MIT (*only this file*). @@ -276,10 +277,18 @@ module GTK device.grid_area.row_count end + def row_max_index + row_count - 1 + end + def col_count device.grid_area.col_count end + def col_max_index + col_count - 1 + end + def gutter_height device.grid_area.gutter end @@ -302,18 +311,124 @@ module GTK def rect_defaults { - row: nil, - col: nil, - h: 1, - w: 1, - dx: 0, - dy: 0, - rect: :control_rect + row: nil, + col: nil, + h: 1, + w: 1, + dx: 0, + dx_ratio: 1, + dy: 0, + dy_ratio: 1, + dh_ratio: 1, + dw_ratio: 1, + merge: nil, + rect: :control_rect } end - def rect opts + def row n + (rect row: n, col: 0, w: 0, h: 0).x + end + + def row_from_bottom n + (rect row: row_count - n, col: 0, w: 0, h: 0).x + end + + def col n + (rect row: 0, col: n, w: 0, h: 0).y + end + + def col_from_right n + (rect row: 0, col: col_max_index - n, w: 0, h: 0).y + end + + def w n + (rect row: 0, col: 0, w: n, h: 1).w + end + + def h n + (rect row: 0, col: 0, w: 1, h: n).h + end + + def rect_group opts + group = opts.group + r = opts.row || 0 + r = row_max_index - opts.row_from_bottom if opts.row_from_bottom + c = opts.col || 0 + c = col_max_index - opts.col_from_right if opts.col_from_right + drow = opts.drow || 0 + dcol = opts.dcol || 0 + w = opts.w || 0 + h = opts.h || 0 + merge = opts[:merge] + + running_row = r + running_col = c + + running_col = calc_col_offset(opts.col_offset) if opts.col_offset + running_row = calc_row_offset(opts.row_offset) if opts.row_offset + + group.map do |i| + group_layout_opts = i.layout || {} + group_layout_opts = group_layout_opts.merge row: running_row, + col: running_col, + merge: merge, + w: w, h: h + result = (rect group_layout_opts).merge i + + if (i.is_a? Hash) && (i.primitive_marker == :label) + if i.alignment_enum == 1 + result.x += result.w.half + elsif i.alignment_enum == 2 + result.x += result.w + end + end + + running_row += drow + running_col += dcol + result + end + end + + def calc_row_offset opts = {} + count = opts[:count] || opts[:length] || 0 + h = opts.h || 1 + (row_count - (count * h)) / 2.0 + end + + def calc_col_offset opts = {} + count = opts[:count] || opts[:length] || 0 + w = opts.w || 1 + (col_count - (count * w)) / 2.0 + end + + def point opts = {} + opts.w = 1 + opts.h = 1 + opts.row ||= 0 + opts.col ||= 0 + r = rect opts + r.x += r.w * opts.col_anchor if opts.col_anchor + r.y += r.h * opts.row_anchor if opts.row_anchor + r + end + + def rect *all_opts + if all_opts.length == 1 + opts = all_opts.first + else + opts = {} + all_opts.each do |o| + opts.merge! o + end + end + + opts.row = row_max_index - opts.row_from_bottom if opts.row_from_bottom + opts.col = col_max_index - opts.col_from_right if opts.col_from_right opts = rect_defaults.merge opts + opts.row ||= 0 + opts.col ||= 0 + result = send opts[:rect] if opts[:row] && opts[:col] && opts[:w] && opts[:h] col = rect_col opts[:col], opts[:w] @@ -321,7 +436,9 @@ module GTK result = control_rect.merge x: col.x, y: row.y, w: col.w, - h: row.h + h: row.h, + center_x: col.center_x, + center_y: row.center_y elsif opts[:row] && !opts[:col] result = rect_row opts[:row], opts[:h] elsif !opts[:row] && opts[:col] @@ -359,13 +476,21 @@ module GTK result[:h] += device.grid_area.gutter * 2 end - result[:x] += opts[:dx] if opts[:dx] - result[:y] += opts[:dy] if opts[:dy] - result[:w] += opts[:dw] if opts[:dw] - result[:h] += opts[:dh] if opts[:dh] + result[:x] += opts[:dx] if opts[:dx] + result[:x] *= opts[:dx_ratio] if opts[:dx_ratio] + result[:y] += opts[:dy] if opts[:dy] + result[:y] *= opts[:dy_ratio] if opts[:dy_ratio] + result[:w] += opts[:dw] if opts[:dw] + result[:w] *= opts[:dw_ratio] if opts[:dw_ratio] + result[:h] += opts[:dh] if opts[:dh] + result[:h] *= opts[:dh_ratio] if opts[:dh_ratio] + result.merge! opts[:merge] if opts[:merge] result[:row] = opts[:row] result[:col] = opts[:col] + result[:h] = result[:h].clamp 0 + result[:w] = result[:w].clamp 0 + if $gtk.args.grid.name == :center result[:x] -= 640 result[:y] -= 360 @@ -400,7 +525,7 @@ module GTK row_y = device.h - row_y - row_h - result = control_rect.merge y: row_y, h: row_h + result = control_rect.merge y: row_y, h: row_h, center_y: (row_y + row_h.half) @rect_cache[:row][index][h] = result @rect_cache[:row][index][h] end @@ -423,7 +548,7 @@ module GTK col_w = col_w.to_i col_w -= 1 if col_w.odd? - result = control_rect.merge x: col_x, w: col_w + result = control_rect.merge x: col_x, w: col_w, center_x: (col_x + col_w.half) @rect_cache[:col][index][w] = result @rect_cache[:col][index][w] end @@ -474,6 +599,26 @@ module GTK @device end + def debug_primitives opts = {} + @primitives ||= col_count.map_with_index do |col| + row_count.map_with_index do |row| + cell = rect row: row, col: col + center = Geometry.rect_center_point cell + [ + cell.merge(opts).border, + cell.merge(opts) + .label!(x: center.x, + y: center.y, + text: "#{row},#{col}", + size_enum: -3, + vertical_alignment_enum: 1, + alignment_enum: 1) + ] + end + end + @primitives + end + def serialize { device: @device.serialize, @@ -487,5 +632,12 @@ module GTK def to_s serialize.to_s end + + def reset + @primitives = nil + @rect_cache ||= {} + @rect_cache.clear + end + end end diff --git a/dragon/log.rb b/dragon/log.rb index 7bf09fd..2e39217 100644 --- a/dragon/log.rb +++ b/dragon/log.rb @@ -129,6 +129,11 @@ module GTK self.puts message end + def self.reset + @once = {} + nil + end + def self.puts_once *ids, message id = "#{ids}" @once ||= {} diff --git a/dragon/metadata.rb b/dragon/metadata.rb deleted file mode 100644 index 88d9b60..0000000 --- a/dragon/metadata.rb +++ /dev/null @@ -1,41 +0,0 @@ -# Contributors outside of DragonRuby who also hold Copyright: Michał Dudziński -# Copyright 2021 DragonRuby LLC -# MIT License -# metadata.rb has been released under MIT (*only this file*). - -module Metadata - def metadata_file_path - "metadata/game_metadata.txt" - end - - def get_metadata - metadata = $gtk.read_file metadata_file_path - - if !metadata - write_blank_metadata - metadata = $gtk.read_file metadata_file_path - end - - dev_id, dev_title, game_id, game_title, version, icon = *metadata.each_line.to_a - - { - dev_id: dev_id.strip, - dev_title: dev_title.strip, - game_id: game_id.strip, - game_title: game_title.strip, - version: version.strip, - icon: icon.strip - } - end - - def write_blank_metadata - $gtk.write_file metadata_file_path, <<-S.strip -#devid=myname -#devtitle=My Name -#gameid=mygame -#gametitle=My Game -#version=0.1 -#icon=metadata/icon.png -S - end -end diff --git a/dragon/numeric.rb b/dragon/numeric.rb index 3cf1314..27cf02e 100644 --- a/dragon/numeric.rb +++ b/dragon/numeric.rb @@ -13,6 +13,35 @@ class Numeric alias_method :lte, :<= alias_method :__original_eq_eq__, :== unless Numeric.instance_methods.include? :__original_eq_eq__ + def to_layout_row opts = {} + $layout.rect(row: self, + col: opts.col || 0, + w: opts.w || 0, + h: opts.h || 0).y + end + + def to_layout_col opts = {} + $layout.rect(row: 0, + col: self, + w: opts.w || 0, + h: opts.h || 0).x + end + + def to_layout_w + $layout.rect(row: 0, col: 0, w: self, h: 1).w + end + + def to_layout_h + $layout.rect(row: 0, col: 0, w: 1, h: self).h + end + + def to_layout_row_from_bottom opts = {} + ($layout.row_max_index - self).to_layout_row opts + end + + def to_layout_col_from_right opts = {} + ($layout.col_max_index - self).to_layout_col opts + end # Converts a numeric value representing seconds into frames. # @@ -28,10 +57,26 @@ class Numeric self / 2.0 end + def third + self / 3.0 + end + + def quarter + self / 4.0 + end + def to_byte clamp(0, 255).to_i end + def clamp *opts + min = (opts.at 0) + max = (opts.at 1) + return min if min && self < min + return max if max && self > max + return self + end + def clamp_wrap min, max max, min = min, max if min > max return self if self >= min && self <= max @@ -314,6 +359,18 @@ S (self % n) == 0 end + def multiply n + self * n + end + + def fmult n + self * n.to_f + end + + def imult n + (self * n).to_i + end + def mult n self * n end @@ -435,12 +492,6 @@ S return gt other end - def == other - return true if __original_eq_eq__ other - return __original_eq_eq__ other.entity_id if other.is_a? OpenEntity - return false - end - # @gtk def map unless block_given? @@ -527,29 +578,29 @@ S end def - other - return nil unless other - super + return self unless other + self - other rescue Exception => e __raise_arithmetic_exception__ other, :-, e end def + other - return nil unless other - super + return self unless other + self + other rescue Exception => e __raise_arithmetic_exception__ other, :+, e end def * other - return nil unless other - super + return self unless other + self * other rescue Exception => e __raise_arithmetic_exception__ other, :*, e end def / other - return nil unless other - super + return self unless other + self / other rescue Exception => e __raise_arithmetic_exception__ other, :/, e end @@ -579,6 +630,10 @@ S def self.clamp n, min, max n.clamp min, max end + + def mid? l, r + (between? l, r) || (between? r, l) + end end class Fixnum @@ -605,39 +660,33 @@ class Fixnum end def + other - return nil unless other - super + return self unless other + self + other rescue Exception => e __raise_arithmetic_exception__ other, :+, e end def * other - return nil unless other - super + return self unless other + self * other rescue Exception => e __raise_arithmetic_exception__ other, :*, e end def / other - return nil unless other - super + return self unless other + self / other rescue Exception => e __raise_arithmetic_exception__ other, :/, e end def - other - return nil unless other - super + return self unless other + self - other rescue Exception => e __raise_arithmetic_exception__ other, :-, e end - def == other - return true if __original_eq_eq__ other - return __original_eq_eq__ other.entity_id if other.is_a? GTK::OpenEntity - return false - end - # Returns `-1` if the number is less than `0`. `+1` if the number # is greater than `0`. Returns `0` if the number is equal to `0`. # @@ -694,28 +743,28 @@ class Float alias_method :__original_divide__, :- unless Float.instance_methods.include? :__original_divide__ def - other - return nil unless other + return self unless other super rescue Exception => e __raise_arithmetic_exception__ other, :-, e end def + other - return nil unless other + return self unless other super rescue Exception => e __raise_arithmetic_exception__ other, :+, e end def * other - return nil unless other + return self unless other super rescue Exception => e __raise_arithmetic_exception__ other, :*, e end def / other - return nil unless other + return self unless other super rescue Exception => e __raise_arithmetic_exception__ other, :/, e @@ -762,4 +811,8 @@ class Integer def nan? false end + + def center other + (self - other).abs.fdiv(2) + end end diff --git a/dragon/outputs_docs.rb b/dragon/outputs_docs.rb index b2dc57d..db15989 100644 --- a/dragon/outputs_docs.rb +++ b/dragon/outputs_docs.rb @@ -150,7 +150,7 @@ Here is an example: S end - + def docs_sprites <<-S * DOCS: ~GTK::Outputs#sprites~ diff --git a/dragon/readme_docs.rb b/dragon/readme_docs.rb index 78e0320..541c3ce 100644 --- a/dragon/readme_docs.rb +++ b/dragon/readme_docs.rb @@ -36,8 +36,6 @@ to get fancy you can provide a ~lambda~ to filter documentation: #+begin_src docs_search { |entry| (entry.include? "Array") && (!entry.include? "Enumerable") } #+end_src - -[[docs_search.gif]] S end @@ -67,20 +65,25 @@ Reply with: I am a Dragon Rider. #+end_quote -* Watch Some Intro Videos +* Intro Videos + +Here are some videos to help you get the lay of the land. -Each video is only 20 minutes and all of them will fit into a lunch -break. So please watch them: +** Quick Api Tour 1. Beginner Introduction to DragonRuby Game Toolkit: [[https://youtu.be/ixw7TJhU08E]] -2. Intermediate Introduction to Ruby Syntax: [[https://youtu.be/HG-XRZ5Ppgc]] -3. Intermediate Introduction to Arrays in Ruby: [[https://youtu.be/N72sEYFRqfo]] -The second and third videos are not required if you are proficient -with Ruby, but *definitely* watch the first one. +** If You Are Completely New to Ruby and Programming + +1. Intermediate Introduction to Ruby Syntax: [[https://youtu.be/HG-XRZ5Ppgc]] +2. Intermediate Introduction to Arrays in Ruby: [[https://youtu.be/N72sEYFRqfo]] +3. You may also want to try this free course provided at [[http://dragonruby.school]]. + +** If You Have Game Dev Experience -You may also want to try this free course provided at -[[http://dragonruby.school]]. +1. Building Tetris - Part 1: [[https://youtu.be/xZMwRSbC4rY]] +2. Building Tetris - Part 2: [[https://youtu.be/C3LLzDUDgz4]] +3. Low Res Game Jam Tutorial: [[https://youtu.be/pCI90ukKCME]] * Getting Started Tutorial @@ -482,10 +485,10 @@ overwhelms beginners who are new to the engine or programming in general. DragonRuby's philosophy is to provide multiple options across the "make it fast" vs "make it right" spectrum, with incremental/intuitive transitions between the options provided. A concrete example of this philosophy -would be render primitives: the spectrum of options allows renderable constructs take -the form of tuples/arrays (easy to pickup, simple, and fast to code/prototype with), +would be render primitives: the spectrum of options allows renderable constructs that +take the form of tuples/arrays (easy to pickup, simple, and fast to code/prototype with), hashes (a little more work, but gives you the ability to add additional properties), -open and string entities (more work than hashes, but yields cleaner apis), +open and strict entities (more work than hashes, but yields cleaner apis), and finally - if you really need full power/flexibility in rendering - classes (which take the most amount of code and programming knowledge to create). @@ -656,11 +659,15 @@ You can represent a sprite as a ~Hash~: flip_vertically: false, flip_horizontally: false, angle_anchor_x: 0.5, - angle_anchor_y: 1.0 + angle_anchor_y: 1.0, + blendmode_enum: 1 } end #+end_src +The ~blendmode_enum~ value can be set to ~0~ (no blending), ~1~ (alpha blending), +~2~ (additive blending), ~3~ (modulo blending), ~4~ (multiply blending). + You can represent a sprite as an ~object~: #+begin_src ruby @@ -670,7 +677,7 @@ You can represent a sprite as an ~object~: :source_x, :source_y, :source_w, :source_h, :tile_x, :tile_y, :tile_w, :tile_h, :flip_horizontally, :flip_vertically, - :angle_anchor_x, :angle_anchor_y + :angle_anchor_x, :angle_anchor_y, :blendmode_enum def primitive_marker :sprite @@ -760,16 +767,17 @@ You can add additional metadata about your game within a label, which requires y #+begin_src def tick args args.outputs.labels << { - x: 200, - y: 550, - text: "dragonruby", - size_enum: 2, - alignment_enum: 1, - r: 155, - g: 50, - b: 50, - a: 255, - font: "fonts/manaspc.ttf", + x: 200, + y: 550, + text: "dragonruby", + size_enum: 2, + alignment_enum: 1, + r: 155, + g: 50, + b: 50, + a: 255, + font: "fonts/manaspc.ttf", + vertical_alignment_enum: 0, # 0 is bottom, 1 is middle, 2 is top # You can add any properties you like (this will be ignored/won't cause errors) game_data_one: "Something", game_data_two: { @@ -801,6 +809,21 @@ You can get the render size of any string using ~args.gtk.calcstringbox~. ] end #+end_src + +** Rendering Labels With New Line Characters And Wrapping + +You can use a strategy like the following to create multiple labels from a String. + +#+begin_src ruby + def tick args + long_string = "Lorem ipsum dolor sit amet, consectetur adipiscing elitteger dolor velit, ultricies vitae libero vel, aliquam imperdiet enim." + max_character_length = 30 + long_strings_split = args.string.wrapped_lines long_string, max_character_length + args.outputs.labels << long_strings_split.map_with_index do |s, i| + { x: 10, y: 600 - (i * 20), text: s } + end + end +#+end_src S end @@ -1031,7 +1054,7 @@ The elevator pitch is: DragonRuby is a Multilevel Cross-platform Runtime. The "multiple levels" within the runtime allows us to target platforms no other Ruby can target: PC, Mac, Linux, Raspberry Pi, WASM, iOS, Android, Nintendo -Switch, PS4, Xbox, and Scadia. +Switch, PS4, Xbox, and Stadia. **** What does Multilevel Cross-platform mean? @@ -1232,13 +1255,11 @@ questions asked. *** But still, you should offer a free version. So I can try it out and see if I like it. -You can try our [web-based sandbox environment](). But it won't do the -runtime justice. Or just come to our [Slack]() or [Discord]() channel -and ask questions. We'd be happy to have a one on one video chat with -you and show off all the cool stuff we're doing. +You can try our web-based sandbox environment at [[http://fiddle.dragonruby.org]]. But it won't do the +runtime justice. Or just come to our Discord Channel at [[http://discord.dragonruby.org]] and ask questions. +We'd be happy to have a one on one video chat with you and show off all the cool stuff we're doing. -Seriously just buy it. Get a refund if you don't like it. We make it -stupid easy to do so. +Seriously just buy it. Get a refund if you don't like it. We make it stupid easy to do so. *** I still think you should do a free version. Think of all people who would give it a shot. diff --git a/dragon/runtime_docs.rb b/dragon/runtime_docs.rb index 90addff..6da72d0 100644 --- a/dragon/runtime_docs.rb +++ b/dragon/runtime_docs.rb @@ -119,18 +119,18 @@ The properties ~args.inputs.mouse.(click|down|previous_click|up)~ each return ~n that has an ~x~, ~y~ properties along with helper functions to determine collision: ~inside_rect?~, ~inside_circle~. *** ~.controller_one~, ~.controller_two~ Represents controllers connected to the usb ports. -**** ~.up +**** ~.up~ Returns ~true~ if ~up~ is pressed or held on the directional or left analog. -**** ~.down +**** ~.down~ Returns ~true~ if ~down~ is pressed or held on the directional or left analog. -**** ~.left +**** ~.left~ Returns ~true~ if ~left~ is pressed or held on the directional or left analog. -**** ~.right +**** ~.right~ Returns ~true~ if ~right~ is pressed or held on the directional or left analog. -**** ~.left_right +**** ~.left_right~ Returns ~-1~ (left), ~0~ (neutral), or ~+1~ (right) depending on results of ~args.inputs.controller_(one|two).left~ and ~args.inputs.controller_(one|two).right~. -**** ~.up_down -Returns ~-1~ (down), ~0~ (neutral), or ~+1~ (up) depending on results of ~args.inputs.controller_(one|two).down~ and ~args.inputs.controller_(one|two).up~. +**** ~.up_down~ +Returns ~-1~ (down), ~0~ (neutral), or ~+1~ (up) depending on results of ~args.inputs.controller_(one|two).up~ and ~args.inputs.controller_(one|two).down~. **** ~.(left_analog_x_raw|right_analog_x_raw)~ Returns the raw integer value for the analog's horizontal movement (~-32,000 to +32,000~). **** ~.left_analog_y_raw|right_analog_y_raw)~ @@ -139,13 +139,13 @@ Returns the raw integer value for the analog's vertical movement (~-32,000 to +3 Returns a number between ~-1~ and ~1~ which represents the percentage the analog is moved horizontally as a ratio of the maximum horizontal movement. **** ~.left_analog_y_perc|right_analog_y_perc)~ Returns a number between ~-1~ and ~1~ which represents the percentage the analog is moved vertically as a ratio of the maximum vertical movement. -**** ~.directional_up)~ +**** ~.directional_up~ Returns ~true~ if ~up~ is pressed or held on the directional. -**** ~.directional_down)~ +**** ~.directional_down~ Returns ~true~ if ~down~ is pressed or held on the directional. -**** ~.directional_left)~ +**** ~.directional_left~ Returns ~true~ if ~left~ is pressed or held on the directional. -**** ~.directional_right)~ +**** ~.directional_right~ Returns ~true~ if ~right~ is pressed or held on the directional. **** ~.(a|b|x|y|l1|r1|l2|r2|l3|r3|start|select)~ Returns ~true~ if the specific button is pressed or held. @@ -170,7 +170,7 @@ Returns ~true~ if ~right~ or ~d~ is pressed or held on the keyboard. **** ~.left_right~ Returns ~-1~ (left), ~0~ (neutral), or ~+1~ (right) depending on results of ~args.inputs.keyboard.left~ and ~args.inputs.keyboard.right~. **** ~.up_down~ -Returns ~-1~ (down), ~0~ (neutral), or ~+1~ (up) depending on results of ~args.inputs.keyboard.down~ and ~args.inputs.keyboard.up~. +Returns ~-1~ (left), ~0~ (neutral), or ~+1~ (right) depending on results of ~args.inputs.keyboard.up~ and ~args.inputs.keyboard.up~. **** keyboard properties The following properties represent keys on the keyboard and are available on ~args.inputs.keyboard.KEY~, ~args.inputs.keyboard.key_down.KEY~, ~args.inputs.keyboard.key_held.KEY~, and ~args.inputs.keyboard.key_up.KEY~: - ~alt~ @@ -301,6 +301,14 @@ Send a Primitive to this collection to render an unfilled rectangle to the scree Send any Primitive to this collection which represents things you render to the screen for debugging purposes. Primitives in this collection will not be rendered in a production release of your game. ** ~args.geometry~ This property contains geometric functions. Functions can be invoked via ~args.geometry.FUNCTION~. + +Here are some general notes with regards to the arguments these geometric functions accept. + +1. ~Rectangles~ can be represented as an ~Array~ with four (or more) values ~[x, y, w, h]~, as a ~Hash~ ~{ x:, y:, w:, h: }~ or an object that responds to ~x~, ~y~, ~w~, and ~h~. +2. ~Points~ can be represent as an ~Array~ with two (or more) values ~[x, y]~, as a ~Hash~ ~{ x:, y:}~ or an object that responds to ~x~, and ~y~. +3. ~Lines~ can be represented as an ~Array~ with four (or more) values ~[x, y, x2, y2]~, as a ~Hash~ ~{ x:, y:, x2:, y2: }~ or an object that responds to ~x~, ~y~, ~x2~, and ~y2~. +4. ~Angles~ are represented as degrees (not radians). + *** ~.inside_rect? rect_1, rect_2~ Returns ~true~ if ~rect_1~ is inside ~rect_2~. *** ~.intersect_rect? rect_2, rect_2~ diff --git a/dragon/string.rb b/dragon/string.rb index 62c151a..153ba27 100644 --- a/dragon/string.rb +++ b/dragon/string.rb @@ -29,6 +29,30 @@ S end end + def char_byte + return nil if self.length == 0 + c = self.each_char.first.bytes + c = c.first if c.is_a? Enumerable + c + end + + def insert_character_at index, char + t = each_char.to_a + t = (t.insert index, char) + t.join + end + + def excluding_character_at index + t = each_char.to_a + t.delete_at index + t.join + end + + def excluding_last_character + return "" if self.length <= 1 + return excluding_character_at(self.length - 1) + end + def end_with_bang? self[-1] == "!" end diff --git a/dragon/tests.rb b/dragon/tests.rb index 7cbba09..ad1a780 100644 --- a/dragon/tests.rb +++ b/dragon/tests.rb @@ -132,7 +132,7 @@ S log "#{self.failed.length} test(s) failed." self.failed.each do |h| log "**** Test name: :#{h[:m]}" - log "#{h[:e].to_s.gsub("* ERROR:", "").strip}" + log "#{h[:e].to_s.gsub("* ERROR:", "").strip}\n#{h[:e].__backtrace_to_org__}" end end end diff --git a/dragon/wizards.rb b/dragon/wizards.rb index 3501b80..b0c7ca0 100644 --- a/dragon/wizards.rb +++ b/dragon/wizards.rb @@ -1,7 +1,42 @@ +# coding: utf-8 # Copyright 2019 DragonRuby LLC # MIT License # wizards.rb has been released under MIT (*only this file*). +class Wizard + def metadata_file_path + "metadata/game_metadata.txt" + end + + def get_metadata + metadata = $gtk.read_file metadata_file_path + + if !metadata + write_blank_metadata + metadata = $gtk.read_file metadata_file_path + end + + dev_id, dev_title, game_id, game_title, version, icon = *metadata.each_line.to_a + + { + dev_id: dev_id.strip.gsub("#", "").gsub("devid=", ""), + dev_title: dev_title.strip.gsub("#", "").gsub("devtitle=", ""), + game_id: game_id.strip.gsub("#", "").gsub("gameid=", ""), + game_title: game_title.strip.gsub("#", "").gsub("gametitle=", ""), + version: version.strip.gsub("#", "").gsub("version=", ""), + icon: icon.strip.gsub("#", "").gsub("icon=", "") + } + end +end + +class WizardException < Exception + attr_accessor :console_primitives + + def initialize *console_primitives + @console_primitives = console_primitives + end +end + module GTK class Wizards attr_accessor :ios, :itch -- cgit v1.2.3 From dae203d736b9d6db00c10a75208f44a3a937442f Mon Sep 17 00:00:00 2001 From: leviongit Date: Wed, 25 Aug 2021 20:28:03 +0200 Subject: fix: console raising error at autocomplete request --- dragon/console_prompt.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dragon/console_prompt.rb b/dragon/console_prompt.rb index 97ea2f9..8c02de0 100644 --- a/dragon/console_prompt.rb +++ b/dragon/console_prompt.rb @@ -158,11 +158,11 @@ S # partition the original list of items into a string to be printed items.each_slice(columns).each_with_index do |cells, i| - pretty_print_row_seperator string_width, cell_width, column_width, columns + pretty_print_row_separator string_width, cell_width, column_width, columns pretty_print_row cells, string_width, cell_width, column_width, columns end - pretty_print_row_seperator string_width, cell_width, column_width, columns + pretty_print_row_separator string_width, cell_width, column_width, columns end end -- cgit v1.2.3 From 26f20690be4da8f5091c720b1a25e32742c8c5fa Mon Sep 17 00:00:00 2001 From: Pedro Brighenti Date: Sun, 22 Aug 2021 16:09:47 +0100 Subject: Fixed typo in 02_input_basics/02_mouse --- samples/02_input_basics/02_mouse/app/main.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/02_input_basics/02_mouse/app/main.rb b/samples/02_input_basics/02_mouse/app/main.rb index 823336c..23cb619 100644 --- a/samples/02_input_basics/02_mouse/app/main.rb +++ b/samples/02_input_basics/02_mouse/app/main.rb @@ -32,7 +32,7 @@ Reminder: # Use args.inputs.mouse.click.created_at # To see how many frames its been since the click occurred -# Use args.inputs.mouse.click.creat_at_elapsed +# Use args.inputs.mouse.click.created_at_elapsed # Saving the click in args.state can be quite useful -- cgit v1.2.3 From aa8d3ac4bdccf522b8082a7fa7d595be2bd54b7d Mon Sep 17 00:00:00 2001 From: Bartosz Podrygajlo Date: Wed, 4 Aug 2021 11:19:06 +0200 Subject: Samples: Use to_radians for deg-to-rad conversion Replace the local implementation with the build-in Numeric.to_radians --- .../08_bouncing_on_collision/app/block.rb | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/samples/04_physics_and_collisions/08_bouncing_on_collision/app/block.rb b/samples/04_physics_and_collisions/08_bouncing_on_collision/app/block.rb index 9254ee4..fa2f3a5 100644 --- a/samples/04_physics_and_collisions/08_bouncing_on_collision/app/block.rb +++ b/samples/04_physics_and_collisions/08_bouncing_on_collision/app/block.rb @@ -1,5 +1,3 @@ -DEGREES_TO_RADIANS = Math::PI / 180 - class Block def initialize(x, y, block_size, rotation) @x = x @@ -10,15 +8,15 @@ class Block #The repel velocity? @velocity = {x: 2, y: 0} - horizontal_offset = (3 * block_size) * Math.cos(rotation * DEGREES_TO_RADIANS) - vertical_offset = block_size * Math.sin(rotation * DEGREES_TO_RADIANS) + horizontal_offset = (3 * block_size) * Math.cos(rotation.to_radians) + vertical_offset = block_size * Math.sin(rotation.to_radians) if rotation >= 0 theta = 90 - rotation #The line doesn't visually line up exactly with the edge of the sprite, so artificially move it a bit modifier = 5 - x_offset = modifier * Math.cos(theta * DEGREES_TO_RADIANS) - y_offset = modifier * Math.sin(theta * DEGREES_TO_RADIANS) + x_offset = modifier * Math.cos(theta.to_radians) + y_offset = modifier * Math.sin(theta.to_radians) @x1 = @x - x_offset @y1 = @y + y_offset @x2 = @x1 + horizontal_offset @@ -27,8 +25,8 @@ class Block @imaginary_line = [ @x1, @y1, @x2, @y2 ] else theta = 90 + rotation - x_offset = @block_size * Math.cos(theta * DEGREES_TO_RADIANS) - y_offset = @block_size * Math.sin(theta * DEGREES_TO_RADIANS) + x_offset = @block_size * Math.cos(theta.to_radians) + y_offset = @block_size * Math.sin(theta.to_radians) @x1 = @x + x_offset @y1 = @y + y_offset + 19 @x2 = @x1 + horizontal_offset @@ -105,8 +103,8 @@ class Block slope = (@y2 - @y1) / (@x2 - @x1) #Create a unit vector and tilt it (@rotation) number of degrees - x = -Math.cos(@rotation * DEGREES_TO_RADIANS) - y = Math.sin(@rotation * DEGREES_TO_RADIANS) + x = -Math.cos(@rotation.to_radians) + y = Math.sin(@rotation.to_radians) #Find the vector that is perpendicular to the slope perpVect = { x: x, y: y } @@ -120,7 +118,7 @@ class Block velocityMag = (args.state.ball.velocity.x**2 + args.state.ball.velocity.y**2)**0.5 # the current velocity magnitude of the ball theta_ball = Math.atan2(args.state.ball.velocity.y, args.state.ball.velocity.x) #the angle of the ball's velocity - theta_repel = (180 * DEGREES_TO_RADIANS) - theta_ball + (@rotation * DEGREES_TO_RADIANS) + theta_repel = (180.to_radians) - theta_ball + (@rotation.to_radians) fbx = velocityMag * Math.cos(theta_ball) #the x component of the ball's velocity fby = velocityMag * Math.sin(theta_ball) #the y component of the ball's velocity @@ -146,7 +144,7 @@ class Block end #Add the sine component of gravity back in (X component) - gravity_x = 4 * Math.sin(@rotation * DEGREES_TO_RADIANS) + gravity_x = 4 * Math.sin(@rotation.to_radians) xnew += gravity_x args.state.ball.velocity.x = -xnew -- cgit v1.2.3 From 2f5eb6ab368b062dbbde39b3cee6eae23c5452ff Mon Sep 17 00:00:00 2001 From: Amir Rajan Date: Mon, 6 Sep 2021 14:32:04 -0500 Subject: Synced with version 2.26 --- docs/docs.html | 81 +- docs/docs.txt | 79 +- docs/parse_log.txt | 2035 +++++++++++++++++++- dragon/args.rb | 17 + dragon/console.rb | 12 +- dragon/framerate.rb | 7 +- dragon/recording.rb | 260 +++ dragon/tweetcart.rb | 102 + .../06_box_collision_3/app/main.rb | 4 +- .../08_bouncing_on_collision/app/block.rb | 42 +- .../11_render_target_noclear/app/main.rb | 47 + .../metadata/game_metadata.txt | 5 + .../03_unit_tests/serialize_deserialize_tests.rb | 18 +- samples/12_c_extensions/README.md | 28 + samples/99_genre_teenytiny/app/main.rb | 162 ++ samples/99_genre_teenytiny/license.txt | 9 + .../99_genre_teenytiny/metadata/game_metadata.txt | 6 + samples/99_genre_teenytiny/metadata/icon.png | Bin 0 -> 157056 bytes .../99_genre_teenytiny/sprites/square-green.png | Bin 0 -> 283 bytes samples/99_genre_teenytiny/sprites/square-red.png | Bin 0 -> 274 bytes 20 files changed, 2820 insertions(+), 94 deletions(-) create mode 100644 dragon/recording.rb create mode 100644 dragon/tweetcart.rb create mode 100644 samples/07_advanced_rendering/11_render_target_noclear/app/main.rb create mode 100644 samples/07_advanced_rendering/11_render_target_noclear/metadata/game_metadata.txt create mode 100644 samples/99_genre_teenytiny/app/main.rb create mode 100644 samples/99_genre_teenytiny/license.txt create mode 100644 samples/99_genre_teenytiny/metadata/game_metadata.txt create mode 100644 samples/99_genre_teenytiny/metadata/icon.png create mode 100644 samples/99_genre_teenytiny/sprites/square-green.png create mode 100644 samples/99_genre_teenytiny/sprites/square-red.png diff --git a/docs/docs.html b/docs/docs.html index 5ad5d6c..6967368 100644 --- a/docs/docs.html +++ b/docs/docs.html @@ -2,7 +2,7 @@ DragonRuby Game Toolkit Documentation - +
    @@ -52,7 +52,7 @@
  • DOCS: Geometry
  • DOCS: GTK::Geometry#scale_rect
  • Source Code
  • -
    +

    DragonRuby Game Toolkit Live Docs

    @@ -6736,7 +6736,7 @@ class Game def calc_below return unless player.dy <= 0 - tiles_below = find_tiles { |t| t.rect.top <= player.y } + tiles_below = find_tiles { |t| t.rect.top <= player.prev_rect.y } collision = find_colliding_tile tiles_below, (player.rect.merge y: player.next_rect.y) return unless collision if collision.neighbors.b == :none && player.jumped_down_at.elapsed_time < 10 @@ -6767,7 +6767,7 @@ class Game def calc_above return unless player.dy > 0 - tiles_above = find_tiles { |t| t.rect.y >= player.y } + tiles_above = find_tiles { |t| t.rect.y >= player.prev_rect.y } collision = find_colliding_tile tiles_above, (player.rect.merge y: player.next_rect.y) return unless collision return if collision.neighbors.t == :none @@ -13609,6 +13609,57 @@ def tick args args.state.blendmodes.each { |blendmode| draw_blendmode args, blendmode } end + +

    Advanced Rendering - Render Target Noclear - main.rb

    +
    # ./samples/07_advanced_rendering/11_render_target_noclear/app/main.rb
    +def tick args
    +  args.state.x ||= 500
    +  args.state.y ||= 350
    +  args.state.xinc ||= 7
    +  args.state.yinc ||= 7
    +  args.state.bgcolor ||= 1
    +  args.state.bginc ||= 1
    +
    +  # clear the render target on the first tick, and then never again. Draw
    +  #  another box to it every tick, accumulating over time.
    +  clear_target = (args.state.tick_count == 0) || (args.inputs.keyboard.key_down.space)
    +  args.render_target(:accumulation).background_color = [ 0, 0, 0, 0 ];
    +  args.render_target(:accumulation).clear_before_render = clear_target
    +  args.render_target(:accumulation).solids << [args.state.x, args.state.y, 25, 25, 255, 0, 0, 255];
    +  args.state.x += args.state.xinc
    +  args.state.y += args.state.yinc
    +  args.state.bgcolor += args.state.bginc
    +
    +  # animation upkeep...change where we draw the next box and what color the
    +  #  window background will be.
    +  if args.state.xinc > 0 && args.state.x >= 1280
    +    args.state.xinc = -7
    +  elsif args.state.xinc < 0 && args.state.x < 0
    +    args.state.xinc = 7
    +  end
    +
    +  if args.state.yinc > 0 && args.state.y >= 720
    +    args.state.yinc = -7
    +  elsif args.state.yinc < 0 && args.state.y < 0
    +    args.state.yinc = 7
    +  end
    +
    +  if args.state.bginc > 0 && args.state.bgcolor >= 255
    +    args.state.bginc = -1
    +  elsif args.state.bginc < 0 && args.state.bgcolor <= 0
    +    args.state.bginc = 1
    +  end
    +
    +  # clear the screen to a shade of blue and draw the render target, which
    +  #  is not clearing every frame, on top of it. Note that you can NOT opt to
    +  #  skip clearing the screen, only render targets. The screen clears every
    +  #  frame; double-buffering would prevent correct updates between frames.
    +  args.outputs.background_color = [ 0, 0, args.state.bgcolor, 255 ]
    +  args.outputs.sprites << [ 0, 0, 1280, 720, :accumulation ]
    +end
    +
    +$gtk.reset
    +
     

    Tweening Lerping Easing Functions - Easing Functions - main.rb

    # ./samples/08_tweening_lerping_easing_functions/01_easing_functions/app/main.rb
    @@ -37215,6 +37266,7 @@ end
     

    attr_sprite.rb

    # ./dragon/attr_sprite.rb
    +# coding: utf-8
     # Copyright 2019 DragonRuby LLC
     # MIT License
     # attr_sprite.rb has been released under MIT (*only this file*).
    @@ -37276,6 +37328,7 @@ end
     

    console.rb

    # ./dragon/console.rb
    +# coding: utf-8
     # Copyright 2019 DragonRuby LLC
     # MIT License
     # console.rb has been released under MIT (*only this file*).
    @@ -38089,6 +38142,7 @@ end
     

    console_color.rb

    # ./dragon/console_color.rb
    +# coding: utf-8
     # Copyright 2019 DragonRuby LLC
     # MIT License
     # console_color.rb has been released under MIT (*only this file*).
    @@ -38127,6 +38181,7 @@ end
     

    console_font_style.rb

    # ./dragon/console_font_style.rb
    +# coding: utf-8
     # Copyright 2019 DragonRuby LLC
     # MIT License
     # console_font_style.rb has been released under MIT (*only this file*).
    @@ -38171,6 +38226,7 @@ end
     

    console_menu.rb

    # ./dragon/console_menu.rb
    +# coding: utf-8
     # Copyright 2019 DragonRuby LLC
     # MIT License
     # console_menu.rb has been released under MIT (*only this file*).
    @@ -38335,6 +38391,7 @@ end
     

    console_prompt.rb

    # ./dragon/console_prompt.rb
    +# coding: utf-8
     # Copyright 2019 DragonRuby LLC
     # MIT License
     # console_prompt.rb has been released under MIT (*only this file*).
    @@ -40962,11 +41019,13 @@ end
     

    ios_wizard.rb

    # ./dragon/ios_wizard.rb
    -# Contributors outside of DragonRuby who also hold Copyright: Michał Dudziński
    +# coding: utf-8
     # Copyright 2019 DragonRuby LLC
     # MIT License
     # ios_wizard.rb has been released under MIT (*only this file*).
     
    +# Contributors outside of DragonRuby who also hold Copyright: Michał Dudziński
    +
     class IOSWizard < Wizard
       def initialize
         @doctor_executed_at = 0
    @@ -42073,6 +42132,7 @@ end
     

    itch_wizard.rb

    # ./dragon/itch_wizard.rb
    +# coding: utf-8
     # Copyright 2019 DragonRuby LLC
     # MIT License
     # itch_wizard.rb has been released under MIT (*only this file*).
    @@ -42333,6 +42393,7 @@ end
     

    layout.rb

    # ./dragon/layout.rb
    +# coding: utf-8
     # Copyright 2019 DragonRuby LLC
     # MIT License
     # layout.rb has been released under MIT (*only this file*).
    @@ -43252,11 +43313,13 @@ end
     

    metadata.rb

    # ./dragon/metadata.rb
    -# Contributors outside of DragonRuby who also hold Copyright: Michał Dudziński
    +# coding: utf-8
     # Copyright 2021 DragonRuby LLC
     # MIT License
     # metadata.rb has been released under MIT (*only this file*).
     
    +# Contributors outside of DragonRuby who also hold Copyright: Michał Dudziński
    +
     module Metadata
       def metadata_file_path
         "metadata/game_metadata.txt"
    @@ -44316,6 +44379,7 @@ end
     

    runtime/autocomplete.rb

    # ./dragon/runtime/autocomplete.rb
    +# coding: utf-8
     # Copyright 2019 DragonRuby LLC
     # MIT License
     # autocomplete.rb has been released under MIT (*only this file*).
    @@ -44470,6 +44534,7 @@ end # end GTK
     

    runtime/benchmark.rb

    # ./dragon/runtime/benchmark.rb
    +# coding: utf-8
     # Copyright 2019 DragonRuby LLC
     # MIT License
     # benchmark.rb has been released under MIT (*only this file*).
    @@ -44585,6 +44650,7 @@ end
     

    runtime/draw.rb

    # ./dragon/runtime/draw.rb
    +# coding: utf-8
     # Copyright 2019 DragonRuby LLC
     # MIT License
     # draw.rb has been released under MIT (*only this file*).
    @@ -44748,6 +44814,7 @@ end
     

    runtime/framerate.rb

    # ./dragon/runtime/framerate.rb
    +# coding: utf-8
     # Copyright 2019 DragonRuby LLC
     # MIT License
     # framerate.rb has been released under MIT (*only this file*).
    @@ -44835,6 +44902,7 @@ end # end module GTK
     

    runtime/framerate_diagnostics.rb

    # ./dragon/runtime/framerate_diagnostics.rb
    +# coding: utf-8
     # Copyright 2019 DragonRuby LLC
     # MIT License
     # framerate_diagnostics.rb has been released under MIT (*only this file*).
    @@ -45655,6 +45723,7 @@ end
     

    wizards.rb

    # ./dragon/wizards.rb
    +# coding: utf-8
     # Copyright 2019 DragonRuby LLC
     # MIT License
     # wizards.rb has been released under MIT (*only this file*).
    diff --git a/docs/docs.txt b/docs/docs.txt
    index c07fbcd..d6f5def 100644
    --- a/docs/docs.txt
    +++ b/docs/docs.txt
    @@ -6800,7 +6800,7 @@ Follows is a source code listing for all files that have been open sourced. This
       
         def calc_below
           return unless player.dy <= 0
    -      tiles_below = find_tiles { |t| t.rect.top <= player.y }
    +      tiles_below = find_tiles { |t| t.rect.top <= player.prev_rect.y }
           collision = find_colliding_tile tiles_below, (player.rect.merge y: player.next_rect.y)
           return unless collision
           if collision.neighbors.b == :none && player.jumped_down_at.elapsed_time < 10
    @@ -6831,7 +6831,7 @@ Follows is a source code listing for all files that have been open sourced. This
       
         def calc_above
           return unless player.dy > 0
    -      tiles_above = find_tiles { |t| t.rect.y >= player.y }
    +      tiles_above = find_tiles { |t| t.rect.y >= player.prev_rect.y }
           collision = find_colliding_tile tiles_above, (player.rect.merge y: player.next_rect.y)
           return unless collision
           return if collision.neighbors.t == :none
    @@ -13755,6 +13755,59 @@ Follows is a source code listing for all files that have been open sourced. This
     
     #+end_src
     
    +*** Advanced Rendering - Render Target Noclear - main.rb
    +#+begin_src ruby
    +  # ./samples/07_advanced_rendering/11_render_target_noclear/app/main.rb
    +  def tick args
    +    args.state.x ||= 500
    +    args.state.y ||= 350
    +    args.state.xinc ||= 7
    +    args.state.yinc ||= 7
    +    args.state.bgcolor ||= 1
    +    args.state.bginc ||= 1
    +  
    +    # clear the render target on the first tick, and then never again. Draw
    +    #  another box to it every tick, accumulating over time.
    +    clear_target = (args.state.tick_count == 0) || (args.inputs.keyboard.key_down.space)
    +    args.render_target(:accumulation).background_color = [ 0, 0, 0, 0 ];
    +    args.render_target(:accumulation).clear_before_render = clear_target
    +    args.render_target(:accumulation).solids << [args.state.x, args.state.y, 25, 25, 255, 0, 0, 255];
    +    args.state.x += args.state.xinc
    +    args.state.y += args.state.yinc
    +    args.state.bgcolor += args.state.bginc
    +  
    +    # animation upkeep...change where we draw the next box and what color the
    +    #  window background will be.
    +    if args.state.xinc > 0 && args.state.x >= 1280
    +      args.state.xinc = -7
    +    elsif args.state.xinc < 0 && args.state.x < 0
    +      args.state.xinc = 7
    +    end
    +  
    +    if args.state.yinc > 0 && args.state.y >= 720
    +      args.state.yinc = -7
    +    elsif args.state.yinc < 0 && args.state.y < 0
    +      args.state.yinc = 7
    +    end
    +  
    +    if args.state.bginc > 0 && args.state.bgcolor >= 255
    +      args.state.bginc = -1
    +    elsif args.state.bginc < 0 && args.state.bgcolor <= 0
    +      args.state.bginc = 1
    +    end
    +  
    +    # clear the screen to a shade of blue and draw the render target, which
    +    #  is not clearing every frame, on top of it. Note that you can NOT opt to
    +    #  skip clearing the screen, only render targets. The screen clears every
    +    #  frame; double-buffering would prevent correct updates between frames.
    +    args.outputs.background_color = [ 0, 0, args.state.bgcolor, 255 ]
    +    args.outputs.sprites << [ 0, 0, 1280, 720, :accumulation ]
    +  end
    +  
    +  $gtk.reset
    +
    +#+end_src
    +
     *** Tweening Lerping Easing Functions - Easing Functions - main.rb
     #+begin_src ruby
       # ./samples/08_tweening_lerping_easing_functions/01_easing_functions/app/main.rb
    @@ -37561,6 +37614,7 @@ Follows is a source code listing for all files that have been open sourced. This
     *** attr_sprite.rb
     #+begin_src ruby
       # ./dragon/attr_sprite.rb
    +  # coding: utf-8
       # Copyright 2019 DragonRuby LLC
       # MIT License
       # attr_sprite.rb has been released under MIT (*only this file*).
    @@ -37624,6 +37678,7 @@ Follows is a source code listing for all files that have been open sourced. This
     *** console.rb
     #+begin_src ruby
       # ./dragon/console.rb
    +  # coding: utf-8
       # Copyright 2019 DragonRuby LLC
       # MIT License
       # console.rb has been released under MIT (*only this file*).
    @@ -38439,6 +38494,7 @@ Follows is a source code listing for all files that have been open sourced. This
     *** console_color.rb
     #+begin_src ruby
       # ./dragon/console_color.rb
    +  # coding: utf-8
       # Copyright 2019 DragonRuby LLC
       # MIT License
       # console_color.rb has been released under MIT (*only this file*).
    @@ -38479,6 +38535,7 @@ Follows is a source code listing for all files that have been open sourced. This
     *** console_font_style.rb
     #+begin_src ruby
       # ./dragon/console_font_style.rb
    +  # coding: utf-8
       # Copyright 2019 DragonRuby LLC
       # MIT License
       # console_font_style.rb has been released under MIT (*only this file*).
    @@ -38525,6 +38582,7 @@ Follows is a source code listing for all files that have been open sourced. This
     *** console_menu.rb
     #+begin_src ruby
       # ./dragon/console_menu.rb
    +  # coding: utf-8
       # Copyright 2019 DragonRuby LLC
       # MIT License
       # console_menu.rb has been released under MIT (*only this file*).
    @@ -38691,6 +38749,7 @@ Follows is a source code listing for all files that have been open sourced. This
     *** console_prompt.rb
     #+begin_src ruby
       # ./dragon/console_prompt.rb
    +  # coding: utf-8
       # Copyright 2019 DragonRuby LLC
       # MIT License
       # console_prompt.rb has been released under MIT (*only this file*).
    @@ -41338,11 +41397,13 @@ Follows is a source code listing for all files that have been open sourced. This
     *** ios_wizard.rb
     #+begin_src ruby
       # ./dragon/ios_wizard.rb
    -  # Contributors outside of DragonRuby who also hold Copyright: Michał Dudziński
    +  # coding: utf-8
       # Copyright 2019 DragonRuby LLC
       # MIT License
       # ios_wizard.rb has been released under MIT (*only this file*).
       
    +  # Contributors outside of DragonRuby who also hold Copyright: Michał Dudziński
    +  
       class IOSWizard < Wizard
         def initialize
           @doctor_executed_at = 0
    @@ -42451,6 +42512,7 @@ Follows is a source code listing for all files that have been open sourced. This
     *** itch_wizard.rb
     #+begin_src ruby
       # ./dragon/itch_wizard.rb
    +  # coding: utf-8
       # Copyright 2019 DragonRuby LLC
       # MIT License
       # itch_wizard.rb has been released under MIT (*only this file*).
    @@ -42713,6 +42775,7 @@ Follows is a source code listing for all files that have been open sourced. This
     *** layout.rb
     #+begin_src ruby
       # ./dragon/layout.rb
    +  # coding: utf-8
       # Copyright 2019 DragonRuby LLC
       # MIT License
       # layout.rb has been released under MIT (*only this file*).
    @@ -43636,11 +43699,13 @@ Follows is a source code listing for all files that have been open sourced. This
     *** metadata.rb
     #+begin_src ruby
       # ./dragon/metadata.rb
    -  # Contributors outside of DragonRuby who also hold Copyright: Michał Dudziński
    +  # coding: utf-8
       # Copyright 2021 DragonRuby LLC
       # MIT License
       # metadata.rb has been released under MIT (*only this file*).
       
    +  # Contributors outside of DragonRuby who also hold Copyright: Michał Dudziński
    +  
       module Metadata
         def metadata_file_path
           "metadata/game_metadata.txt"
    @@ -44706,6 +44771,7 @@ Follows is a source code listing for all files that have been open sourced. This
     *** runtime/autocomplete.rb
     #+begin_src ruby
       # ./dragon/runtime/autocomplete.rb
    +  # coding: utf-8
       # Copyright 2019 DragonRuby LLC
       # MIT License
       # autocomplete.rb has been released under MIT (*only this file*).
    @@ -44862,6 +44928,7 @@ Follows is a source code listing for all files that have been open sourced. This
     *** runtime/benchmark.rb
     #+begin_src ruby
       # ./dragon/runtime/benchmark.rb
    +  # coding: utf-8
       # Copyright 2019 DragonRuby LLC
       # MIT License
       # benchmark.rb has been released under MIT (*only this file*).
    @@ -44979,6 +45046,7 @@ Follows is a source code listing for all files that have been open sourced. This
     *** runtime/draw.rb
     #+begin_src ruby
       # ./dragon/runtime/draw.rb
    +  # coding: utf-8
       # Copyright 2019 DragonRuby LLC
       # MIT License
       # draw.rb has been released under MIT (*only this file*).
    @@ -45144,6 +45212,7 @@ Follows is a source code listing for all files that have been open sourced. This
     *** runtime/framerate.rb
     #+begin_src ruby
       # ./dragon/runtime/framerate.rb
    +  # coding: utf-8
       # Copyright 2019 DragonRuby LLC
       # MIT License
       # framerate.rb has been released under MIT (*only this file*).
    @@ -45233,6 +45302,7 @@ Follows is a source code listing for all files that have been open sourced. This
     *** runtime/framerate_diagnostics.rb
     #+begin_src ruby
       # ./dragon/runtime/framerate_diagnostics.rb
    +  # coding: utf-8
       # Copyright 2019 DragonRuby LLC
       # MIT License
       # framerate_diagnostics.rb has been released under MIT (*only this file*).
    @@ -46063,6 +46133,7 @@ Follows is a source code listing for all files that have been open sourced. This
     *** wizards.rb
     #+begin_src ruby
       # ./dragon/wizards.rb
    +  # coding: utf-8
       # Copyright 2019 DragonRuby LLC
       # MIT License
       # wizards.rb has been released under MIT (*only this file*).
    diff --git a/docs/parse_log.txt b/docs/parse_log.txt
    index 4e43983..07e163d 100644
    --- a/docs/parse_log.txt
    +++ b/docs/parse_log.txt
    @@ -25899,10 +25899,10 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
           return unless player.dy <= 0
    -** Processing line: ~      tiles_below = find_tiles { |t| t.rect.top <= player.y }~
    +** Processing line: ~      tiles_below = find_tiles { |t| t.rect.top <= player.prev_rect.y }~
     - Inside source: true
     *** True Line Result
    -      tiles_below = find_tiles { |t| t.rect.top <= player.y }
    +      tiles_below = find_tiles { |t| t.rect.top <= player.prev_rect.y }
     ** Processing line: ~      collision = find_colliding_tile tiles_below, (player.rect.merge y: player.next_rect.y)~
     - Inside source: true
     *** True Line Result
    @@ -26023,10 +26023,10 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
           return unless player.dy > 0
    -** Processing line: ~      tiles_above = find_tiles { |t| t.rect.y >= player.y }~
    +** Processing line: ~      tiles_above = find_tiles { |t| t.rect.y >= player.prev_rect.y }~
     - Inside source: true
     *** True Line Result
    -      tiles_above = find_tiles { |t| t.rect.y >= player.y }
    +      tiles_above = find_tiles { |t| t.rect.y >= player.prev_rect.y }
     ** Processing line: ~      collision = find_colliding_tile tiles_above, (player.rect.merge y: player.next_rect.y)~
     - Inside source: true
     *** True Line Result
    @@ -53879,6 +53879,222 @@ Follows is a source code listing for all files that have been open sourced. This
     - End of paragraph detected.
     *** True Line Result
     
    +** Processing line: ~*** Advanced Rendering - Render Target Noclear - main.rb~
    +- Header detected.
    +*** True Line Result
    +
    +*** True Line Result
    +*** Advanced Rendering - Render Target Noclear - main.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/07_advanced_rendering/11_render_target_noclear/app/main.rb~
    +- Inside source: true
    +*** True Line Result
    +  # ./samples/07_advanced_rendering/11_render_target_noclear/app/main.rb
    +** Processing line: ~  def tick args~
    +- Inside source: true
    +*** True Line Result
    +  def tick args
    +** Processing line: ~    args.state.x ||= 500~
    +- Inside source: true
    +*** True Line Result
    +    args.state.x ||= 500
    +** Processing line: ~    args.state.y ||= 350~
    +- Inside source: true
    +*** True Line Result
    +    args.state.y ||= 350
    +** Processing line: ~    args.state.xinc ||= 7~
    +- Inside source: true
    +*** True Line Result
    +    args.state.xinc ||= 7
    +** Processing line: ~    args.state.yinc ||= 7~
    +- Inside source: true
    +*** True Line Result
    +    args.state.yinc ||= 7
    +** Processing line: ~    args.state.bgcolor ||= 1~
    +- Inside source: true
    +*** True Line Result
    +    args.state.bgcolor ||= 1
    +** Processing line: ~    args.state.bginc ||= 1~
    +- Inside source: true
    +*** True Line Result
    +    args.state.bginc ||= 1
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    # clear the render target on the first tick, and then never again. Draw~
    +- Inside source: true
    +*** True Line Result
    +    # clear the render target on the first tick, and then never again. Draw
    +** Processing line: ~    #  another box to it every tick, accumulating over time.~
    +- Inside source: true
    +*** True Line Result
    +    #  another box to it every tick, accumulating over time.
    +** Processing line: ~    clear_target = (args.state.tick_count == 0) || (args.inputs.keyboard.key_down.space)~
    +- Inside source: true
    +*** True Line Result
    +    clear_target = (args.state.tick_count == 0) || (args.inputs.keyboard.key_down.space)
    +** Processing line: ~    args.render_target(:accumulation).background_color = [ 0, 0, 0, 0 ];~
    +- Inside source: true
    +*** True Line Result
    +    args.render_target(:accumulation).background_color = [ 0, 0, 0, 0 ];
    +** Processing line: ~    args.render_target(:accumulation).clear_before_render = clear_target~
    +- Inside source: true
    +*** True Line Result
    +    args.render_target(:accumulation).clear_before_render = clear_target
    +** Processing line: ~    args.render_target(:accumulation).solids << [args.state.x, args.state.y, 25, 25, 255, 0, 0, 255];~
    +- Inside source: true
    +*** True Line Result
    +    args.render_target(:accumulation).solids << [args.state.x, args.state.y, 25, 25, 255, 0, 0, 255];
    +** Processing line: ~    args.state.x += args.state.xinc~
    +- Inside source: true
    +*** True Line Result
    +    args.state.x += args.state.xinc
    +** Processing line: ~    args.state.y += args.state.yinc~
    +- Inside source: true
    +*** True Line Result
    +    args.state.y += args.state.yinc
    +** Processing line: ~    args.state.bgcolor += args.state.bginc~
    +- Inside source: true
    +*** True Line Result
    +    args.state.bgcolor += args.state.bginc
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    # animation upkeep...change where we draw the next box and what color the~
    +- Inside source: true
    +*** True Line Result
    +    # animation upkeep...change where we draw the next box and what color the
    +** Processing line: ~    #  window background will be.~
    +- Inside source: true
    +*** True Line Result
    +    #  window background will be.
    +** Processing line: ~    if args.state.xinc > 0 && args.state.x >= 1280~
    +- Inside source: true
    +*** True Line Result
    +    if args.state.xinc > 0 && args.state.x >= 1280
    +** Processing line: ~      args.state.xinc = -7~
    +- Inside source: true
    +*** True Line Result
    +      args.state.xinc = -7
    +** Processing line: ~    elsif args.state.xinc < 0 && args.state.x < 0~
    +- Inside source: true
    +*** True Line Result
    +    elsif args.state.xinc < 0 && args.state.x < 0
    +** Processing line: ~      args.state.xinc = 7~
    +- Inside source: true
    +*** True Line Result
    +      args.state.xinc = 7
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    if args.state.yinc > 0 && args.state.y >= 720~
    +- Inside source: true
    +*** True Line Result
    +    if args.state.yinc > 0 && args.state.y >= 720
    +** Processing line: ~      args.state.yinc = -7~
    +- Inside source: true
    +*** True Line Result
    +      args.state.yinc = -7
    +** Processing line: ~    elsif args.state.yinc < 0 && args.state.y < 0~
    +- Inside source: true
    +*** True Line Result
    +    elsif args.state.yinc < 0 && args.state.y < 0
    +** Processing line: ~      args.state.yinc = 7~
    +- Inside source: true
    +*** True Line Result
    +      args.state.yinc = 7
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    if args.state.bginc > 0 && args.state.bgcolor >= 255~
    +- Inside source: true
    +*** True Line Result
    +    if args.state.bginc > 0 && args.state.bgcolor >= 255
    +** Processing line: ~      args.state.bginc = -1~
    +- Inside source: true
    +*** True Line Result
    +      args.state.bginc = -1
    +** Processing line: ~    elsif args.state.bginc < 0 && args.state.bgcolor <= 0~
    +- Inside source: true
    +*** True Line Result
    +    elsif args.state.bginc < 0 && args.state.bgcolor <= 0
    +** Processing line: ~      args.state.bginc = 1~
    +- Inside source: true
    +*** True Line Result
    +      args.state.bginc = 1
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    # clear the screen to a shade of blue and draw the render target, which~
    +- Inside source: true
    +*** True Line Result
    +    # clear the screen to a shade of blue and draw the render target, which
    +** Processing line: ~    #  is not clearing every frame, on top of it. Note that you can NOT opt to~
    +- Inside source: true
    +*** True Line Result
    +    #  is not clearing every frame, on top of it. Note that you can NOT opt to
    +** Processing line: ~    #  skip clearing the screen, only render targets. The screen clears every~
    +- Inside source: true
    +*** True Line Result
    +    #  skip clearing the screen, only render targets. The screen clears every
    +** Processing line: ~    #  frame; double-buffering would prevent correct updates between frames.~
    +- Inside source: true
    +*** True Line Result
    +    #  frame; double-buffering would prevent correct updates between frames.
    +** Processing line: ~    args.outputs.background_color = [ 0, 0, args.state.bgcolor, 255 ]~
    +- Inside source: true
    +*** True Line Result
    +    args.outputs.background_color = [ 0, 0, args.state.bgcolor, 255 ]
    +** Processing line: ~    args.outputs.sprites << [ 0, 0, 1280, 720, :accumulation ]~
    +- Inside source: true
    +*** True Line Result
    +    args.outputs.sprites << [ 0, 0, 1280, 720, :accumulation ]
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~  $gtk.reset~
    +- Inside source: true
    +*** True Line Result
    +  $gtk.reset
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
    +*** True Line Result
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +
     ** Processing line: ~*** Tweening Lerping Easing Functions - Easing Functions - main.rb~
     - Header detected.
     *** True Line Result
    @@ -61159,10 +61375,10 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
         result = args.gtk.serialize_state args.state
    -** Processing line: ~    assert.equal! result, "{:entity_id=>3, :entity_keys_by_ref=>{}, :tick_count=>-1, :player_one=>\"test\"}"~
    +** Processing line: ~    assert.equal! result, "{:entity_id=>4, :entity_keys_by_ref=>{}, :tick_count=>-1, :player_one=>\"test\"}"~
     - Inside source: true
     *** True Line Result
    -    assert.equal! result, "{:entity_id=>3, :entity_keys_by_ref=>{}, :tick_count=>-1, :player_one=>\"test\"}"
    +    assert.equal! result, "{:entity_id=>4, :entity_keys_by_ref=>{}, :tick_count=>-1, :player_one=>\"test\"}"
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
    @@ -61179,10 +61395,10 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
         result = args.gtk.serialize_state 'state.txt', args.state
    -** Processing line: ~    assert.equal! result, "{:entity_id=>3, :entity_keys_by_ref=>{}, :tick_count=>-1, :player_one=>\"test\"}"~
    +** Processing line: ~    assert.equal! result, "{:entity_id=>4, :entity_keys_by_ref=>{}, :tick_count=>-1, :player_one=>\"test\"}"~
     - Inside source: true
     *** True Line Result
    -    assert.equal! result, "{:entity_id=>3, :entity_keys_by_ref=>{}, :tick_count=>-1, :player_one=>\"test\"}"
    +    assert.equal! result, "{:entity_id=>4, :entity_keys_by_ref=>{}, :tick_count=>-1, :player_one=>\"test\"}"
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -61375,10 +61591,10 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
         serialized_state = args.gtk.serialize_state args.state
    -** Processing line: ~    assert.equal! serialized_state, '{:entity_id=>9, :entity_keys_by_ref=>{}, :tick_count=>-1, :player_one=>{:entity_id=>1, :entity_name=>:player, :entity_keys_by_ref=>{}, :entity_type=>:player, :created_at=>-1, :global_created_at=>-1, :name=>"Ryu"}, :player_two=>{:entity_id=>2, :entity_name=>:player_strict, :entity_type=>:player_strict, :created_at=>-1, :global_created_at_elapsed=>-1, :entity_strict=>true, :entity_keys_by_ref=>{:entity_type=>:entity_name, :global_created_at_elapsed=>:created_at}, :name=>"Ken", :blood_type=>nil}}'~
    +** Processing line: ~    assert.equal! serialized_state, '{:entity_id=>7, :entity_keys_by_ref=>{}, :tick_count=>-1, :player_one=>{:entity_id=>1, :entity_name=>:player, :entity_keys_by_ref=>{}, :entity_type=>:player, :created_at=>-1, :global_created_at=>-1, :name=>"Ryu"}, :player_two=>{:entity_id=>2, :entity_name=>:player_strict, :entity_type=>:player_strict, :created_at=>-1, :global_created_at_elapsed=>-1, :entity_strict=>true, :entity_keys_by_ref=>{:entity_type=>:entity_name, :global_created_at_elapsed=>:created_at}, :name=>"Ken", :blood_type=>nil}}'~
     - Inside source: true
     *** True Line Result
    -    assert.equal! serialized_state, '{:entity_id=>9, :entity_keys_by_ref=>{}, :tick_count=>-1, :player_one=>{:entity_id=>1, :entity_name=>:player, :entity_keys_by_ref=>{}, :entity_type=>:player, :created_at=>-1, :global_created_at=>-1, :name=>"Ryu"}, :player_two=>{:entity_id=>2, :entity_name=>:player_strict, :entity_type=>:player_strict, :created_at=>-1, :global_created_at_elapsed=>-1, :entity_strict=>true, :entity_keys_by_ref=>{:entity_type=>:entity_name, :global_created_at_elapsed=>:created_at}, :name=>"Ken", :blood_type=>nil}}'
    +    assert.equal! serialized_state, '{:entity_id=>7, :entity_keys_by_ref=>{}, :tick_count=>-1, :player_one=>{:entity_id=>1, :entity_name=>:player, :entity_keys_by_ref=>{}, :entity_type=>:player, :created_at=>-1, :global_created_at=>-1, :name=>"Ryu"}, :player_two=>{:entity_id=>2, :entity_name=>:player_strict, :entity_type=>:player_strict, :created_at=>-1, :global_created_at_elapsed=>-1, :entity_strict=>true, :entity_keys_by_ref=>{:entity_type=>:entity_name, :global_created_at_elapsed=>:created_at}, :name=>"Ken", :blood_type=>nil}}'
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
    @@ -61607,6 +61823,54 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    +** Processing line: ~  def test_serialization_excludes_thrash_count args, assert~
    +- Inside source: true
    +*** True Line Result
    +  def test_serialization_excludes_thrash_count args, assert
    +** Processing line: ~    GTK::Entity.__reset_id__!~
    +- Inside source: true
    +*** True Line Result
    +    GTK::Entity.__reset_id__!
    +** Processing line: ~    args.state.player.name = "Ryu"~
    +- Inside source: true
    +*** True Line Result
    +    args.state.player.name = "Ryu"
    +** Processing line: ~    # force a nil pun~
    +- Inside source: true
    +*** True Line Result
    +    # force a nil pun
    +** Processing line: ~    if args.state.player.age > 30~
    +- Inside source: true
    +*** True Line Result
    +    if args.state.player.age > 30
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~    assert.equal! args.state.player.as_hash[:__thrash_count__][:>], 1~
    +- Inside source: true
    +*** True Line Result
    +    assert.equal! args.state.player.as_hash[:__thrash_count__][:>], 1
    +** Processing line: ~    result = args.gtk.serialize_state args.state~
    +- Inside source: true
    +*** True Line Result
    +    result = args.gtk.serialize_state args.state
    +** Processing line: ~    assert.false! (result.include? "__thrash_count__"),~
    +- Inside source: true
    +*** True Line Result
    +    assert.false! (result.include? "__thrash_count__"),
    +** Processing line: ~                  "The __thrash_count__ key exists in state when it shouldn't have."~
    +- Inside source: true
    +*** True Line Result
    +                  "The __thrash_count__ key exists in state when it shouldn't have."
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
     ** Processing line: ~#+end_src~
     - Line was identified as the end of a code block.
     *** True Line Result
    @@ -147791,6 +148055,746 @@ Follows is a source code listing for all files that have been open sourced. This
     - End of paragraph detected.
     *** True Line Result
     
    +** Processing line: ~*** Teentiny - main.rb~
    +- Header detected.
    +*** True Line Result
    +
    +*** True Line Result
    +*** Teentiny - main.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/99_genre_teentiny/app/main.rb~
    +- Inside source: true
    +*** True Line Result
    +  # ./samples/99_genre_teentiny/app/main.rb
    +** Processing line: ~  # full documenation is at http://docs.dragonruby.org~
    +- Inside source: true
    +*** True Line Result
    +  # full documenation is at http://docs.dragonruby.org
    +** Processing line: ~  # be sure to come to the discord if you hit any snags: http://discord.dragonruby.org~
    +- Inside source: true
    +*** True Line Result
    +  # be sure to come to the discord if you hit any snags: http://discord.dragonruby.org
    +** Processing line: ~  def tick args~
    +- Inside source: true
    +*** True Line Result
    +  def tick args
    +** Processing line: ~    # ====================================================~
    +- Inside source: true
    +*** True Line Result
    +    # ====================================================
    +** Processing line: ~    # initialize default variables~
    +- Inside source: true
    +*** True Line Result
    +    # initialize default variables
    +** Processing line: ~    # ====================================================~
    +- Inside source: true
    +*** True Line Result
    +    # ====================================================
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    # ruby has an operator called ||= which means "only initialize this if it's nil"~
    +- Inside source: true
    +*** True Line Result
    +    # ruby has an operator called ||= which means "only initialize this if it's nil"
    +** Processing line: ~    args.state.count_down   ||= 20 * 60 # set the count down to 20 seconds~
    +- Inside source: true
    +*** True Line Result
    +    args.state.count_down   ||= 20 * 60 # set the count down to 20 seconds
    +** Processing line: ~    # set the initial position of the target~
    +- Inside source: true
    +*** True Line Result
    +    # set the initial position of the target
    +** Processing line: ~    args.state.target       ||= { x: args.grid.w.half,~
    +- Inside source: true
    +*** True Line Result
    +    args.state.target       ||= { x: args.grid.w.half,
    +** Processing line: ~                                  y: args.grid.h.half,~
    +- Inside source: true
    +*** True Line Result
    +                                  y: args.grid.h.half,
    +** Processing line: ~                                  w: 20,~
    +- Inside source: true
    +*** True Line Result
    +                                  w: 20,
    +** Processing line: ~                                  h: 20 }~
    +- Inside source: true
    +*** True Line Result
    +                                  h: 20 }
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    # set the initial position of the player~
    +- Inside source: true
    +*** True Line Result
    +    # set the initial position of the player
    +** Processing line: ~    args.state.player       ||= { x: 50,~
    +- Inside source: true
    +*** True Line Result
    +    args.state.player       ||= { x: 50,
    +** Processing line: ~                                  y: 50,~
    +- Inside source: true
    +*** True Line Result
    +                                  y: 50,
    +** Processing line: ~                                  w: 20,~
    +- Inside source: true
    +*** True Line Result
    +                                  w: 20,
    +** Processing line: ~                                  h: 20 }~
    +- Inside source: true
    +*** True Line Result
    +                                  h: 20 }
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    # set the player movement speed~
    +- Inside source: true
    +*** True Line Result
    +    # set the player movement speed
    +** Processing line: ~    args.state.player_speed ||= 5~
    +- Inside source: true
    +*** True Line Result
    +    args.state.player_speed ||= 5
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    # set the score~
    +- Inside source: true
    +*** True Line Result
    +    # set the score
    +** Processing line: ~    args.state.score        ||= 0~
    +- Inside source: true
    +*** True Line Result
    +    args.state.score        ||= 0
    +** Processing line: ~    args.state.teleports    ||= 3~
    +- Inside source: true
    +*** True Line Result
    +    args.state.teleports    ||= 3
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    # set the instructions~
    +- Inside source: true
    +*** True Line Result
    +    # set the instructions
    +** Processing line: ~    args.state.instructions ||= "Get to the red goal! Use arrow keys to move. Spacebar to teleport (use them carefully)!"~
    +- Inside source: true
    +*** True Line Result
    +    args.state.instructions ||= "Get to the red goal! Use arrow keys to move. Spacebar to teleport (use them carefully)!"
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    # ====================================================~
    +- Inside source: true
    +*** True Line Result
    +    # ====================================================
    +** Processing line: ~    # render the game~
    +- Inside source: true
    +*** True Line Result
    +    # render the game
    +** Processing line: ~    # ====================================================~
    +- Inside source: true
    +*** True Line Result
    +    # ====================================================
    +** Processing line: ~    args.outputs.labels  << { x: args.grid.w.half, y: args.grid.h - 10,~
    +- Inside source: true
    +*** True Line Result
    +    args.outputs.labels  << { x: args.grid.w.half, y: args.grid.h - 10,
    +** Processing line: ~                              text: args.state.instructions,~
    +- Inside source: true
    +*** True Line Result
    +                              text: args.state.instructions,
    +** Processing line: ~                              alignment_enum: 1 }~
    +- Inside source: true
    +*** True Line Result
    +                              alignment_enum: 1 }
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    # check if it's game over. if so, then render game over~
    +- Inside source: true
    +*** True Line Result
    +    # check if it's game over. if so, then render game over
    +** Processing line: ~    # otherwise render the current time left~
    +- Inside source: true
    +*** True Line Result
    +    # otherwise render the current time left
    +** Processing line: ~    if game_over? args~
    +- Inside source: true
    +*** True Line Result
    +    if game_over? args
    +** Processing line: ~      args.outputs.labels  << { x: args.grid.w.half,~
    +- Inside source: true
    +*** True Line Result
    +      args.outputs.labels  << { x: args.grid.w.half,
    +** Processing line: ~                                y: args.grid.h - 40,~
    +- Inside source: true
    +*** True Line Result
    +                                y: args.grid.h - 40,
    +** Processing line: ~                                text: "game over! (press r to start over)",~
    +- Inside source: true
    +*** True Line Result
    +                                text: "game over! (press r to start over)",
    +** Processing line: ~                                alignment_enum: 1 }~
    +- Inside source: true
    +*** True Line Result
    +                                alignment_enum: 1 }
    +** Processing line: ~    else~
    +- Inside source: true
    +*** True Line Result
    +    else
    +** Processing line: ~      args.outputs.labels  << { x: args.grid.w.half,~
    +- Inside source: true
    +*** True Line Result
    +      args.outputs.labels  << { x: args.grid.w.half,
    +** Processing line: ~                                y: args.grid.h - 40,~
    +- Inside source: true
    +*** True Line Result
    +                                y: args.grid.h - 40,
    +** Processing line: ~                                text: "time left: #{(args.state.count_down.idiv 60) + 1}",~
    +- Inside source: true
    +*** True Line Result
    +                                text: "time left: #{(args.state.count_down.idiv 60) + 1}",
    +** Processing line: ~                                alignment_enum: 1 }~
    +- Inside source: true
    +*** True Line Result
    +                                alignment_enum: 1 }
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    # render the score~
    +- Inside source: true
    +*** True Line Result
    +    # render the score
    +** Processing line: ~    args.outputs.labels  << { x: args.grid.w.half,~
    +- Inside source: true
    +*** True Line Result
    +    args.outputs.labels  << { x: args.grid.w.half,
    +** Processing line: ~                              y: args.grid.h - 70,~
    +- Inside source: true
    +*** True Line Result
    +                              y: args.grid.h - 70,
    +** Processing line: ~                              text: "score: #{args.state.score}",~
    +- Inside source: true
    +*** True Line Result
    +                              text: "score: #{args.state.score}",
    +** Processing line: ~                              alignment_enum: 1 }~
    +- Inside source: true
    +*** True Line Result
    +                              alignment_enum: 1 }
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    # render the player with teleport count~
    +- Inside source: true
    +*** True Line Result
    +    # render the player with teleport count
    +** Processing line: ~    args.outputs.sprites << { x: args.state.player.x,~
    +- Inside source: true
    +*** True Line Result
    +    args.outputs.sprites << { x: args.state.player.x,
    +** Processing line: ~                              y: args.state.player.y,~
    +- Inside source: true
    +*** True Line Result
    +                              y: args.state.player.y,
    +** Processing line: ~                              w: args.state.player.w,~
    +- Inside source: true
    +*** True Line Result
    +                              w: args.state.player.w,
    +** Processing line: ~                              h: args.state.player.h,~
    +- Inside source: true
    +*** True Line Result
    +                              h: args.state.player.h,
    +** Processing line: ~                              path: 'sprites/square-green.png' }~
    +- Inside source: true
    +*** True Line Result
    +                              path: 'sprites/square-green.png' }
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    args.outputs.labels << { x: args.state.player.x + 10,~
    +- Inside source: true
    +*** True Line Result
    +    args.outputs.labels << { x: args.state.player.x + 10,
    +** Processing line: ~                             y: args.state.player.y + 40,~
    +- Inside source: true
    +*** True Line Result
    +                             y: args.state.player.y + 40,
    +** Processing line: ~                             text: "teleports: #{args.state.teleports}",~
    +- Inside source: true
    +*** True Line Result
    +                             text: "teleports: #{args.state.teleports}",
    +** Processing line: ~                             alignment_enum: 1, size_enum: -2 }~
    +- Inside source: true
    +*** True Line Result
    +                             alignment_enum: 1, size_enum: -2 }
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    # render the target~
    +- Inside source: true
    +*** True Line Result
    +    # render the target
    +** Processing line: ~    args.outputs.sprites << { x: args.state.target.x,~
    +- Inside source: true
    +*** True Line Result
    +    args.outputs.sprites << { x: args.state.target.x,
    +** Processing line: ~                              y: args.state.target.y,~
    +- Inside source: true
    +*** True Line Result
    +                              y: args.state.target.y,
    +** Processing line: ~                              w: args.state.target.w,~
    +- Inside source: true
    +*** True Line Result
    +                              w: args.state.target.w,
    +** Processing line: ~                              h: args.state.target.h,~
    +- Inside source: true
    +*** True Line Result
    +                              h: args.state.target.h,
    +** Processing line: ~                              path: 'sprites/square-red.png' }~
    +- Inside source: true
    +*** True Line Result
    +                              path: 'sprites/square-red.png' }
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    # ====================================================~
    +- Inside source: true
    +*** True Line Result
    +    # ====================================================
    +** Processing line: ~    # run simulation~
    +- Inside source: true
    +*** True Line Result
    +    # run simulation
    +** Processing line: ~    # ====================================================~
    +- Inside source: true
    +*** True Line Result
    +    # ====================================================
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    # count down calculation~
    +- Inside source: true
    +*** True Line Result
    +    # count down calculation
    +** Processing line: ~    args.state.count_down -= 1~
    +- Inside source: true
    +*** True Line Result
    +    args.state.count_down -= 1
    +** Processing line: ~    args.state.count_down = -1 if args.state.count_down < -1~
    +- Inside source: true
    +*** True Line Result
    +    args.state.count_down = -1 if args.state.count_down < -1
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    # ====================================================~
    +- Inside source: true
    +*** True Line Result
    +    # ====================================================
    +** Processing line: ~    # process player input~
    +- Inside source: true
    +*** True Line Result
    +    # process player input
    +** Processing line: ~    # ====================================================~
    +- Inside source: true
    +*** True Line Result
    +    # ====================================================
    +** Processing line: ~    # if it isn't game over let them move~
    +- Inside source: true
    +*** True Line Result
    +    # if it isn't game over let them move
    +** Processing line: ~    if !game_over? args~
    +- Inside source: true
    +*** True Line Result
    +    if !game_over? args
    +** Processing line: ~      dir_y = 0~
    +- Inside source: true
    +*** True Line Result
    +      dir_y = 0
    +** Processing line: ~      dir_x = 0~
    +- Inside source: true
    +*** True Line Result
    +      dir_x = 0
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      # determine the change horizontally~
    +- Inside source: true
    +*** True Line Result
    +      # determine the change horizontally
    +** Processing line: ~      if args.inputs.keyboard.up~
    +- Inside source: true
    +*** True Line Result
    +      if args.inputs.keyboard.up
    +** Processing line: ~        dir_y += args.state.player_speed~
    +- Inside source: true
    +*** True Line Result
    +        dir_y += args.state.player_speed
    +** Processing line: ~      elsif args.inputs.keyboard.down~
    +- Inside source: true
    +*** True Line Result
    +      elsif args.inputs.keyboard.down
    +** Processing line: ~        dir_y -= args.state.player_speed~
    +- Inside source: true
    +*** True Line Result
    +        dir_y -= args.state.player_speed
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      # determine the change vertically~
    +- Inside source: true
    +*** True Line Result
    +      # determine the change vertically
    +** Processing line: ~      if args.inputs.keyboard.left~
    +- Inside source: true
    +*** True Line Result
    +      if args.inputs.keyboard.left
    +** Processing line: ~        dir_x -= args.state.player_speed~
    +- Inside source: true
    +*** True Line Result
    +        dir_x -= args.state.player_speed
    +** Processing line: ~      elsif args.inputs.keyboard.right~
    +- Inside source: true
    +*** True Line Result
    +      elsif args.inputs.keyboard.right
    +** Processing line: ~        dir_x += args.state.player_speed~
    +- Inside source: true
    +*** True Line Result
    +        dir_x += args.state.player_speed
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      # determine if teleport can be used~
    +- Inside source: true
    +*** True Line Result
    +      # determine if teleport can be used
    +** Processing line: ~      if args.inputs.keyboard.key_down.space && args.state.teleports > 0~
    +- Inside source: true
    +*** True Line Result
    +      if args.inputs.keyboard.key_down.space && args.state.teleports > 0
    +** Processing line: ~        args.state.teleports -= 1~
    +- Inside source: true
    +*** True Line Result
    +        args.state.teleports -= 1
    +** Processing line: ~        dir_x *= 20~
    +- Inside source: true
    +*** True Line Result
    +        dir_x *= 20
    +** Processing line: ~        dir_y *= 20~
    +- Inside source: true
    +*** True Line Result
    +        dir_y *= 20
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      # apply change to player~
    +- Inside source: true
    +*** True Line Result
    +      # apply change to player
    +** Processing line: ~      args.state.player.x += dir_x~
    +- Inside source: true
    +*** True Line Result
    +      args.state.player.x += dir_x
    +** Processing line: ~      args.state.player.y += dir_y~
    +- Inside source: true
    +*** True Line Result
    +      args.state.player.y += dir_y
    +** Processing line: ~    else~
    +- Inside source: true
    +*** True Line Result
    +    else
    +** Processing line: ~      # if r is pressed, reset the game~
    +- Inside source: true
    +*** True Line Result
    +      # if r is pressed, reset the game
    +** Processing line: ~      if args.inputs.keyboard.key_down.r~
    +- Inside source: true
    +*** True Line Result
    +      if args.inputs.keyboard.key_down.r
    +** Processing line: ~        $gtk.reset~
    +- Inside source: true
    +*** True Line Result
    +        $gtk.reset
    +** Processing line: ~        return~
    +- Inside source: true
    +*** True Line Result
    +        return
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    # ====================================================~
    +- Inside source: true
    +*** True Line Result
    +    # ====================================================
    +** Processing line: ~    # determine score~
    +- Inside source: true
    +*** True Line Result
    +    # determine score
    +** Processing line: ~    # ====================================================~
    +- Inside source: true
    +*** True Line Result
    +    # ====================================================
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    # calculate new score if the player is at goal~
    +- Inside source: true
    +*** True Line Result
    +    # calculate new score if the player is at goal
    +** Processing line: ~    if !game_over? args~
    +- Inside source: true
    +*** True Line Result
    +    if !game_over? args
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      # if the player is at the goal, then move the goal~
    +- Inside source: true
    +*** True Line Result
    +      # if the player is at the goal, then move the goal
    +** Processing line: ~      if args.state.player.intersect_rect? args.state.target~
    +- Inside source: true
    +*** True Line Result
    +      if args.state.player.intersect_rect? args.state.target
    +** Processing line: ~        # increment the goal~
    +- Inside source: true
    +*** True Line Result
    +        # increment the goal
    +** Processing line: ~        args.state.score += 1~
    +- Inside source: true
    +*** True Line Result
    +        args.state.score += 1
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~        # move the goal to a random location~
    +- Inside source: true
    +*** True Line Result
    +        # move the goal to a random location
    +** Processing line: ~        args.state.target = { x: (rand args.grid.w), y: (rand args.grid.h), w: 20, h: 20 }~
    +- Inside source: true
    +*** True Line Result
    +        args.state.target = { x: (rand args.grid.w), y: (rand args.grid.h), w: 20, h: 20 }
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~        # make sure the goal is inside the view area~
    +- Inside source: true
    +*** True Line Result
    +        # make sure the goal is inside the view area
    +** Processing line: ~        if args.state.target.x < 0~
    +- Inside source: true
    +*** True Line Result
    +        if args.state.target.x < 0
    +** Processing line: ~          args.state.target.x += 20~
    +- Inside source: true
    +*** True Line Result
    +          args.state.target.x += 20
    +** Processing line: ~        elsif args.state.target.x > 1280~
    +- Inside source: true
    +*** True Line Result
    +        elsif args.state.target.x > 1280
    +** Processing line: ~          args.state.target.x -= 20~
    +- Inside source: true
    +*** True Line Result
    +          args.state.target.x -= 20
    +** Processing line: ~        end~
    +- Inside source: true
    +*** True Line Result
    +        end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~        # make sure the goal is inside the view area~
    +- Inside source: true
    +*** True Line Result
    +        # make sure the goal is inside the view area
    +** Processing line: ~        if args.state.target.y < 0~
    +- Inside source: true
    +*** True Line Result
    +        if args.state.target.y < 0
    +** Processing line: ~          args.state.target.y += 20~
    +- Inside source: true
    +*** True Line Result
    +          args.state.target.y += 20
    +** Processing line: ~        elsif args.state.target.y > 720~
    +- Inside source: true
    +*** True Line Result
    +        elsif args.state.target.y > 720
    +** Processing line: ~          args.state.target.y -= 20~
    +- Inside source: true
    +*** True Line Result
    +          args.state.target.y -= 20
    +** Processing line: ~        end~
    +- Inside source: true
    +*** True Line Result
    +        end
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~  def game_over? args~
    +- Inside source: true
    +*** True Line Result
    +  def game_over? args
    +** Processing line: ~    args.state.count_down < 0~
    +- Inside source: true
    +*** True Line Result
    +    args.state.count_down < 0
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~  $gtk.reset~
    +- Inside source: true
    +*** True Line Result
    +  $gtk.reset
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
    +*** True Line Result
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +
    +** Processing line: ~*** Teentiny - license.txt~
    +- Header detected.
    +*** True Line Result
    +
    +*** True Line Result
    +*** Teentiny - license.txt
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/99_genre_teentiny/license.txt~
    +- Inside source: true
    +*** True Line Result
    +  # ./samples/99_genre_teentiny/license.txt
    +** Processing line: ~  Copyright 2019 DragonRuby LLC~
    +- Inside source: true
    +*** True Line Result
    +  Copyright 2019 DragonRuby LLC
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~  MIT License~
    +- Inside source: true
    +*** True Line Result
    +  MIT License
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:~
    +- Inside source: true
    +*** True Line Result
    +  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.~
    +- Inside source: true
    +*** True Line Result
    +  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.~
    +- Inside source: true
    +*** True Line Result
    +  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
    +*** True Line Result
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +
     ** Processing line: ~** OSS~
     - Header detected.
     *** True Line Result
    @@ -148620,6 +149624,74 @@ Follows is a source code listing for all files that have been open sourced. This
             [:inputs, :outputs, :gtk, :state, :geometry, :audio, :grid, :layout, :fn]
     ** Processing line: ~      end~
     - Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      def method_missing name, *args, &block~
    +- Inside source: true
    +*** True Line Result
    +      def method_missing name, *args, &block
    +** Processing line: ~        if (args.length <= 1) && (@state.as_hash.key? name)~
    +- Inside source: true
    +*** True Line Result
    +        if (args.length <= 1) && (@state.as_hash.key? name)
    +** Processing line: ~          raise <<-S~
    +- Inside source: true
    +*** True Line Result
    +          raise <<-S
    +** Processing line: ~  * ERROR - :#{name} method missing on ~#{self.class.name}~.~
    +- Inside source: true
    +*** True Line Result
    +  * ERROR - :#{name} method missing on ~#{self.class.name}~.
    +** Processing line: ~  The method~
    +- Inside source: true
    +*** True Line Result
    +  The method
    +** Processing line: ~    :#{name}~
    +- Inside source: true
    +*** True Line Result
    +    :#{name}
    +** Processing line: ~  with args~
    +- Inside source: true
    +*** True Line Result
    +  with args
    +** Processing line: ~    #{args}~
    +- Inside source: true
    +*** True Line Result
    +    #{args}
    +** Processing line: ~  doesn't exist on #{inspect}.~
    +- Inside source: true
    +*** True Line Result
    +  doesn't exist on #{inspect}.
    +** Processing line: ~  ** POSSIBLE SOLUTION - ~args.state.#{name}~ exists.~
    +- Inside source: true
    +*** True Line Result
    +  ** POSSIBLE SOLUTION - ~args.state.#{name}~ exists.
    +** Processing line: ~  Did you forget ~.state~ before ~.#{name}~?~
    +- Inside source: true
    +*** True Line Result
    +  Did you forget ~.state~ before ~.#{name}~?
    +** Processing line: ~  S~
    +- Inside source: true
    +*** True Line Result
    +  S
    +** Processing line: ~        end~
    +- Inside source: true
    +*** True Line Result
    +        end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~        super~
    +- Inside source: true
    +*** True Line Result
    +        super
    +** Processing line: ~      end~
    +- Inside source: true
     *** True Line Result
           end
     ** Processing line: ~    end~
    @@ -149510,6 +150582,10 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
       # ./dragon/attr_sprite.rb
    +** Processing line: ~  # coding: utf-8~
    +- Inside source: true
    +*** True Line Result
    +  # coding: utf-8
     ** Processing line: ~  # Copyright 2019 DragonRuby LLC~
     - Inside source: true
     *** True Line Result
    @@ -149766,6 +150842,10 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
       # ./dragon/console.rb
    +** Processing line: ~  # coding: utf-8~
    +- Inside source: true
    +*** True Line Result
    +  # coding: utf-8
     ** Processing line: ~  # Copyright 2019 DragonRuby LLC~
     - Inside source: true
     *** True Line Result
    @@ -151506,6 +152586,10 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
               toggle
    +** Processing line: ~          args.inputs.keyboard.clear if !@visible~
    +- Inside source: true
    +*** True Line Result
    +          args.inputs.keyboard.clear if !@visible
     ** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    @@ -151550,10 +152634,46 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
             if args.inputs.keyboard.key_down.enter
    -** Processing line: ~          eval_the_set_command~
    +** Processing line: ~          if slide_progress > 0.5~
    +- Inside source: true
    +*** True Line Result
    +          if slide_progress > 0.5
    +** Processing line: ~            # in the event of an exception, the console window pops up~
    +- Inside source: true
    +*** True Line Result
    +            # in the event of an exception, the console window pops up
    +** Processing line: ~            # and is pre-filled with $gtk.reset.~
    +- Inside source: true
    +*** True Line Result
    +            # and is pre-filled with $gtk.reset.
    +** Processing line: ~            # there is an annoying scenario where the exception could be thrown~
    +- Inside source: true
    +*** True Line Result
    +            # there is an annoying scenario where the exception could be thrown
    +** Processing line: ~            # by pressing enter (while playing the game). if you press enter again~
     - Inside source: true
     *** True Line Result
    -          eval_the_set_command
    +            # by pressing enter (while playing the game). if you press enter again
    +** Processing line: ~            # quickly, then the game is reset which closes the console.~
    +- Inside source: true
    +*** True Line Result
    +            # quickly, then the game is reset which closes the console.
    +** Processing line: ~            # so enter in the console is only evaluated if the slide_progress~
    +- Inside source: true
    +*** True Line Result
    +            # so enter in the console is only evaluated if the slide_progress
    +** Processing line: ~            # is atleast half way down the page.~
    +- Inside source: true
    +*** True Line Result
    +            # is atleast half way down the page.
    +** Processing line: ~            eval_the_set_command~
    +- Inside source: true
    +*** True Line Result
    +            eval_the_set_command
    +** Processing line: ~          end~
    +- Inside source: true
    +*** True Line Result
    +          end
     ** Processing line: ~        elsif args.inputs.keyboard.key_down.v~
     - Inside source: true
     *** True Line Result
    @@ -153030,6 +154150,10 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
       # ./dragon/console_color.rb
    +** Processing line: ~  # coding: utf-8~
    +- Inside source: true
    +*** True Line Result
    +  # coding: utf-8
     ** Processing line: ~  # Copyright 2019 DragonRuby LLC~
     - Inside source: true
     *** True Line Result
    @@ -153194,6 +154318,10 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
       # ./dragon/console_font_style.rb
    +** Processing line: ~  # coding: utf-8~
    +- Inside source: true
    +*** True Line Result
    +  # coding: utf-8
     ** Processing line: ~  # Copyright 2019 DragonRuby LLC~
     - Inside source: true
     *** True Line Result
    @@ -153382,6 +154510,10 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
       # ./dragon/console_menu.rb
    +** Processing line: ~  # coding: utf-8~
    +- Inside source: true
    +*** True Line Result
    +  # coding: utf-8
     ** Processing line: ~  # Copyright 2019 DragonRuby LLC~
     - Inside source: true
     *** True Line Result
    @@ -154050,6 +155182,10 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
       # ./dragon/console_prompt.rb
    +** Processing line: ~  # coding: utf-8~
    +- Inside source: true
    +*** True Line Result
    +  # coding: utf-8
     ** Processing line: ~  # Copyright 2019 DragonRuby LLC~
     - Inside source: true
     *** True Line Result
    @@ -164678,10 +165814,10 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
       # ./dragon/ios_wizard.rb
    -** Processing line: ~  # Contributors outside of DragonRuby who also hold Copyright: Michał Dudziński~
    +** Processing line: ~  # coding: utf-8~
     - Inside source: true
     *** True Line Result
    -  # Contributors outside of DragonRuby who also hold Copyright: Michał Dudziński
    +  # coding: utf-8
     ** Processing line: ~  # Copyright 2019 DragonRuby LLC~
     - Inside source: true
     *** True Line Result
    @@ -164698,6 +165834,14 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    +** Processing line: ~  # Contributors outside of DragonRuby who also hold Copyright: Michał Dudziński~
    +- Inside source: true
    +*** True Line Result
    +  # Contributors outside of DragonRuby who also hold Copyright: Michał Dudziński
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
     ** Processing line: ~  class IOSWizard < Wizard~
     - Inside source: true
     *** True Line Result
    @@ -169134,6 +170278,10 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
       # ./dragon/itch_wizard.rb
    +** Processing line: ~  # coding: utf-8~
    +- Inside source: true
    +*** True Line Result
    +  # coding: utf-8
     ** Processing line: ~  # Copyright 2019 DragonRuby LLC~
     - Inside source: true
     *** True Line Result
    @@ -170186,6 +171334,10 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
       # ./dragon/layout.rb
    +** Processing line: ~  # coding: utf-8~
    +- Inside source: true
    +*** True Line Result
    +  # coding: utf-8
     ** Processing line: ~  # Copyright 2019 DragonRuby LLC~
     - Inside source: true
     *** True Line Result
    @@ -173886,10 +175038,10 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
       # ./dragon/metadata.rb
    -** Processing line: ~  # Contributors outside of DragonRuby who also hold Copyright: Michał Dudziński~
    +** Processing line: ~  # coding: utf-8~
     - Inside source: true
     *** True Line Result
    -  # Contributors outside of DragonRuby who also hold Copyright: Michał Dudziński
    +  # coding: utf-8
     ** Processing line: ~  # Copyright 2021 DragonRuby LLC~
     - Inside source: true
     *** True Line Result
    @@ -173906,6 +175058,14 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    +** Processing line: ~  # Contributors outside of DragonRuby who also hold Copyright: Michał Dudziński~
    +- Inside source: true
    +*** True Line Result
    +  # Contributors outside of DragonRuby who also hold Copyright: Michał Dudziński
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
     ** Processing line: ~  module Metadata~
     - Inside source: true
     *** True Line Result
    @@ -178178,6 +179338,10 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
       # ./dragon/runtime/autocomplete.rb
    +** Processing line: ~  # coding: utf-8~
    +- Inside source: true
    +*** True Line Result
    +  # coding: utf-8
     ** Processing line: ~  # Copyright 2019 DragonRuby LLC~
     - Inside source: true
     *** True Line Result
    @@ -178806,6 +179970,10 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
       # ./dragon/runtime/benchmark.rb
    +** Processing line: ~  # coding: utf-8~
    +- Inside source: true
    +*** True Line Result
    +  # coding: utf-8
     ** Processing line: ~  # Copyright 2019 DragonRuby LLC~
     - Inside source: true
     *** True Line Result
    @@ -179278,6 +180446,10 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
       # ./dragon/runtime/draw.rb
    +** Processing line: ~  # coding: utf-8~
    +- Inside source: true
    +*** True Line Result
    +  # coding: utf-8
     ** Processing line: ~  # Copyright 2019 DragonRuby LLC~
     - Inside source: true
     *** True Line Result
    @@ -179942,6 +181114,10 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
       # ./dragon/runtime/framerate.rb
    +** Processing line: ~  # coding: utf-8~
    +- Inside source: true
    +*** True Line Result
    +  # coding: utf-8
     ** Processing line: ~  # Copyright 2019 DragonRuby LLC~
     - Inside source: true
     *** True Line Result
    @@ -180086,30 +181262,10 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
                       if !@console.visible?
    -** Processing line: ~                    if !@framerate_important_notification_happened~
    -- Inside source: true
    -*** True Line Result
    -                    if !@framerate_important_notification_happened
    -** Processing line: ~                      log_important framerate_warning_message~
    +** Processing line: ~                    log framerate_warning_message~
     - Inside source: true
     *** True Line Result
    -                      log_important framerate_warning_message
    -** Processing line: ~                    else~
    -- Inside source: true
    -*** True Line Result
    -                    else
    -** Processing line: ~                      log framerate_warning_message~
    -- Inside source: true
    -*** True Line Result
    -                      log framerate_warning_message
    -** Processing line: ~                    end~
    -- Inside source: true
    -*** True Line Result
    -                    end
    -** Processing line: ~                    @framerate_important_notification_happened = true~
    -- Inside source: true
    -*** True Line Result
    -                    @framerate_important_notification_happened = true
    +                    log framerate_warning_message
     ** Processing line: ~                  end~
     - Inside source: true
     *** True Line Result
    @@ -180302,6 +181458,10 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
       # ./dragon/runtime/framerate_diagnostics.rb
    +** Processing line: ~  # coding: utf-8~
    +- Inside source: true
    +*** True Line Result
    +  # coding: utf-8
     ** Processing line: ~  # Copyright 2019 DragonRuby LLC~
     - Inside source: true
     *** True Line Result
    @@ -183626,6 +184786,342 @@ Follows is a source code listing for all files that have been open sourced. This
     - End of paragraph detected.
     *** True Line Result
     
    +** Processing line: ~*** tweetcart.rb~
    +- Header detected.
    +*** True Line Result
    +
    +*** True Line Result
    +*** tweetcart.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./dragon/tweetcart.rb~
    +- Inside source: true
    +*** True Line Result
    +  # ./dragon/tweetcart.rb
    +** Processing line: ~  # coding: utf-8~
    +- Inside source: true
    +*** True Line Result
    +  # coding: utf-8
    +** Processing line: ~  # Copyright 2019 DragonRuby LLC~
    +- Inside source: true
    +*** True Line Result
    +  # Copyright 2019 DragonRuby LLC
    +** Processing line: ~  # MIT License~
    +- Inside source: true
    +*** True Line Result
    +  # MIT License
    +** Processing line: ~  # tweetcart.rb has been released under MIT (*only this file*).~
    +- Inside source: true
    +*** True Line Result
    +  # tweetcart.rb has been released under MIT (*only this file*).
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~  def $top_level.TICK &block~
    +- Inside source: true
    +*** True Line Result
    +  def $top_level.TICK &block
    +** Processing line: ~    $top_level.define_method(:tick) do |args|~
    +- Inside source: true
    +*** True Line Result
    +    $top_level.define_method(:tick) do |args|
    +** Processing line: ~      args.outputs[:scene].w = 160~
    +- Inside source: true
    +*** True Line Result
    +      args.outputs[:scene].w = 160
    +** Processing line: ~      args.outputs[:scene].h = 90~
    +- Inside source: true
    +*** True Line Result
    +      args.outputs[:scene].h = 90
    +** Processing line: ~      args.outputs[:scene].background_color = [0, 0, 0, 0]~
    +- Inside source: true
    +*** True Line Result
    +      args.outputs[:scene].background_color = [0, 0, 0, 0]
    +** Processing line: ~      block.call args~
    +- Inside source: true
    +*** True Line Result
    +      block.call args
    +** Processing line: ~      args.outputs.sprites << { x: 0, y: 0, w: 1280, h: 720, path: :scene }~
    +- Inside source: true
    +*** True Line Result
    +      args.outputs.sprites << { x: 0, y: 0, w: 1280, h: 720, path: :scene }
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    def $top_level.bg! *rgb~
    +- Inside source: true
    +*** True Line Result
    +    def $top_level.bg! *rgb
    +** Processing line: ~      r,g,b = rgb~
    +- Inside source: true
    +*** True Line Result
    +      r,g,b = rgb
    +** Processing line: ~      r ||= 255~
    +- Inside source: true
    +*** True Line Result
    +      r ||= 255
    +** Processing line: ~      g ||= r~
    +- Inside source: true
    +*** True Line Result
    +      g ||= r
    +** Processing line: ~      b ||= g~
    +- Inside source: true
    +*** True Line Result
    +      b ||= g
    +** Processing line: ~      $args.outputs.background_color = [r, g, b]~
    +- Inside source: true
    +*** True Line Result
    +      $args.outputs.background_color = [r, g, b]
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    def $top_level.slds~
    +- Inside source: true
    +*** True Line Result
    +    def $top_level.slds
    +** Processing line: ~      $args.outputs[:scene].sprites~
    +- Inside source: true
    +*** True Line Result
    +      $args.outputs[:scene].sprites
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    def $top_level.slds! *os~
    +- Inside source: true
    +*** True Line Result
    +    def $top_level.slds! *os
    +** Processing line: ~      if (os.first.is_a? Numeric)~
    +- Inside source: true
    +*** True Line Result
    +      if (os.first.is_a? Numeric)
    +** Processing line: ~        sld! *os~
    +- Inside source: true
    +*** True Line Result
    +        sld! *os
    +** Processing line: ~      else~
    +- Inside source: true
    +*** True Line Result
    +      else
    +** Processing line: ~        os.each { |o| sld! *o }~
    +- Inside source: true
    +*** True Line Result
    +        os.each { |o| sld! *o }
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    def $top_level.sld! *params~
    +- Inside source: true
    +*** True Line Result
    +    def $top_level.sld! *params
    +** Processing line: ~      x, y, w, h, r, g, b, a = nil~
    +- Inside source: true
    +*** True Line Result
    +      x, y, w, h, r, g, b, a = nil
    +** Processing line: ~      if params.length == 2~
    +- Inside source: true
    +*** True Line Result
    +      if params.length == 2
    +** Processing line: ~        x, y = params~
    +- Inside source: true
    +*** True Line Result
    +        x, y = params
    +** Processing line: ~      elsif params.length == 3 && (params.last.is_a? Array)~
    +- Inside source: true
    +*** True Line Result
    +      elsif params.length == 3 && (params.last.is_a? Array)
    +** Processing line: ~        x = params[0]~
    +- Inside source: true
    +*** True Line Result
    +        x = params[0]
    +** Processing line: ~        y = params[1]~
    +- Inside source: true
    +*** True Line Result
    +        y = params[1]
    +** Processing line: ~        r, g, b, a = params[2]~
    +- Inside source: true
    +*** True Line Result
    +        r, g, b, a = params[2]
    +** Processing line: ~        r ||= 255~
    +- Inside source: true
    +*** True Line Result
    +        r ||= 255
    +** Processing line: ~        g ||= r~
    +- Inside source: true
    +*** True Line Result
    +        g ||= r
    +** Processing line: ~        b ||= g~
    +- Inside source: true
    +*** True Line Result
    +        b ||= g
    +** Processing line: ~        a ||= 255~
    +- Inside source: true
    +*** True Line Result
    +        a ||= 255
    +** Processing line: ~      elsif params.length == 4~
    +- Inside source: true
    +*** True Line Result
    +      elsif params.length == 4
    +** Processing line: ~        x, y, w, h = params~
    +- Inside source: true
    +*** True Line Result
    +        x, y, w, h = params
    +** Processing line: ~      elsif params.length == 5 && (params.last.is_a? Array)~
    +- Inside source: true
    +*** True Line Result
    +      elsif params.length == 5 && (params.last.is_a? Array)
    +** Processing line: ~        x = params[0]~
    +- Inside source: true
    +*** True Line Result
    +        x = params[0]
    +** Processing line: ~        y = params[1]~
    +- Inside source: true
    +*** True Line Result
    +        y = params[1]
    +** Processing line: ~        w = params[2]~
    +- Inside source: true
    +*** True Line Result
    +        w = params[2]
    +** Processing line: ~        h = params[3]~
    +- Inside source: true
    +*** True Line Result
    +        h = params[3]
    +** Processing line: ~        r,g,b,a = params[4]~
    +- Inside source: true
    +*** True Line Result
    +        r,g,b,a = params[4]
    +** Processing line: ~        r ||= 255~
    +- Inside source: true
    +*** True Line Result
    +        r ||= 255
    +** Processing line: ~        g ||= r~
    +- Inside source: true
    +*** True Line Result
    +        g ||= r
    +** Processing line: ~        b ||= g~
    +- Inside source: true
    +*** True Line Result
    +        b ||= g
    +** Processing line: ~        a ||= 255~
    +- Inside source: true
    +*** True Line Result
    +        a ||= 255
    +** Processing line: ~      elsif params.length >= 7~
    +- Inside source: true
    +*** True Line Result
    +      elsif params.length >= 7
    +** Processing line: ~        x, y, w, h, r, g, b = params~
    +- Inside source: true
    +*** True Line Result
    +        x, y, w, h, r, g, b = params
    +** Processing line: ~      else~
    +- Inside source: true
    +*** True Line Result
    +      else
    +** Processing line: ~        raise "I don't know how to render #{params} with reasonable defaults."~
    +- Inside source: true
    +*** True Line Result
    +        raise "I don't know how to render #{params} with reasonable defaults."
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      w ||= 1~
    +- Inside source: true
    +*** True Line Result
    +      w ||= 1
    +** Processing line: ~      h ||= 1~
    +- Inside source: true
    +*** True Line Result
    +      h ||= 1
    +** Processing line: ~      r ||= 255~
    +- Inside source: true
    +*** True Line Result
    +      r ||= 255
    +** Processing line: ~      g ||= 255~
    +- Inside source: true
    +*** True Line Result
    +      g ||= 255
    +** Processing line: ~      b ||= 255~
    +- Inside source: true
    +*** True Line Result
    +      b ||= 255
    +** Processing line: ~      a ||= 255~
    +- Inside source: true
    +*** True Line Result
    +      a ||= 255
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      slds << { x: x, y: y,~
    +- Inside source: true
    +*** True Line Result
    +      slds << { x: x, y: y,
    +** Processing line: ~                w: w, h: h,~
    +- Inside source: true
    +*** True Line Result
    +                w: w, h: h,
    +** Processing line: ~                r: r, g: g, b: b, a: a,~
    +- Inside source: true
    +*** True Line Result
    +                r: r, g: g, b: b, a: a,
    +** Processing line: ~                path: :pixel }~
    +- Inside source: true
    +*** True Line Result
    +                path: :pixel }
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
    +*** True Line Result
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +
     ** Processing line: ~*** wizards.rb~
     - Header detected.
     *** True Line Result
    @@ -183642,6 +185138,10 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
       # ./dragon/wizards.rb
    +** Processing line: ~  # coding: utf-8~
    +- Inside source: true
    +*** True Line Result
    +  # coding: utf-8
     ** Processing line: ~  # Copyright 2019 DragonRuby LLC~
     - Inside source: true
     *** True Line Result
    @@ -197599,7 +199099,7 @@ Follows is a source code listing for all files that have been open sourced. This
     ** Processing line: ~~
     ** Processing line: ~    def calc_below~
     ** Processing line: ~      return unless player.dy <= 0~
    -** Processing line: ~      tiles_below = find_tiles { |t| t.rect.top <= player.y }~
    +** Processing line: ~      tiles_below = find_tiles { |t| t.rect.top <= player.prev_rect.y }~
     ** Processing line: ~      collision = find_colliding_tile tiles_below, (player.rect.merge y: player.next_rect.y)~
     ** Processing line: ~      return unless collision~
     ** Processing line: ~      if collision.neighbors.b == :none && player.jumped_down_at.elapsed_time < 10~
    @@ -197630,7 +199130,7 @@ Follows is a source code listing for all files that have been open sourced. This
     ** Processing line: ~~
     ** Processing line: ~    def calc_above~
     ** Processing line: ~      return unless player.dy > 0~
    -** Processing line: ~      tiles_above = find_tiles { |t| t.rect.y >= player.y }~
    +** Processing line: ~      tiles_above = find_tiles { |t| t.rect.y >= player.prev_rect.y }~
     ** Processing line: ~      collision = find_colliding_tile tiles_above, (player.rect.merge y: player.next_rect.y)~
     ** Processing line: ~      return unless collision~
     ** Processing line: ~      return if collision.neighbors.t == :none~
    @@ -205156,6 +206656,74 @@ Follows is a source code listing for all files that have been open sourced. This
     - PRE end detected.
     ** Processing line: ~~
     ** Processing line: ~~
    +** Processing line: ~*** Advanced Rendering - Render Target Noclear - main.rb~
    +- H3 detected.
    +- Determining if line is a header.
    +- Line contains ~*** ~... gsub-ing empty string
    +- Formatting line: ~Advanced Rendering - Render Target Noclear - main.rb~
    +- Line's tilde count is: 0
    +- Line contains link marker: false
    +- Determining if line is a header.
    +- Line contains ~*** ~... gsub-ing empty string
    +- Formatting line: ~Advanced Rendering - Render Target Noclear - main.rb~
    +- Line's tilde count is: 0
    +- Line contains link marker: false
    +** Processing line: ~~
    +** Processing line: ~#+begin_src ruby~
    +- PRE start detected.
    +** Processing line: ~  # ./samples/07_advanced_rendering/11_render_target_noclear/app/main.rb~
    +** Processing line: ~  def tick args~
    +** Processing line: ~    args.state.x ||= 500~
    +** Processing line: ~    args.state.y ||= 350~
    +** Processing line: ~    args.state.xinc ||= 7~
    +** Processing line: ~    args.state.yinc ||= 7~
    +** Processing line: ~    args.state.bgcolor ||= 1~
    +** Processing line: ~    args.state.bginc ||= 1~
    +** Processing line: ~~
    +** Processing line: ~    # clear the render target on the first tick, and then never again. Draw~
    +** Processing line: ~    #  another box to it every tick, accumulating over time.~
    +** Processing line: ~    clear_target = (args.state.tick_count == 0) || (args.inputs.keyboard.key_down.space)~
    +** Processing line: ~    args.render_target(:accumulation).background_color = [ 0, 0, 0, 0 ];~
    +** Processing line: ~    args.render_target(:accumulation).clear_before_render = clear_target~
    +** Processing line: ~    args.render_target(:accumulation).solids << [args.state.x, args.state.y, 25, 25, 255, 0, 0, 255];~
    +** Processing line: ~    args.state.x += args.state.xinc~
    +** Processing line: ~    args.state.y += args.state.yinc~
    +** Processing line: ~    args.state.bgcolor += args.state.bginc~
    +** Processing line: ~~
    +** Processing line: ~    # animation upkeep...change where we draw the next box and what color the~
    +** Processing line: ~    #  window background will be.~
    +** Processing line: ~    if args.state.xinc > 0 && args.state.x >= 1280~
    +** Processing line: ~      args.state.xinc = -7~
    +** Processing line: ~    elsif args.state.xinc < 0 && args.state.x < 0~
    +** Processing line: ~      args.state.xinc = 7~
    +** Processing line: ~    end~
    +** Processing line: ~~
    +** Processing line: ~    if args.state.yinc > 0 && args.state.y >= 720~
    +** Processing line: ~      args.state.yinc = -7~
    +** Processing line: ~    elsif args.state.yinc < 0 && args.state.y < 0~
    +** Processing line: ~      args.state.yinc = 7~
    +** Processing line: ~    end~
    +** Processing line: ~~
    +** Processing line: ~    if args.state.bginc > 0 && args.state.bgcolor >= 255~
    +** Processing line: ~      args.state.bginc = -1~
    +** Processing line: ~    elsif args.state.bginc < 0 && args.state.bgcolor <= 0~
    +** Processing line: ~      args.state.bginc = 1~
    +** Processing line: ~    end~
    +** Processing line: ~~
    +** Processing line: ~    # clear the screen to a shade of blue and draw the render target, which~
    +** Processing line: ~    #  is not clearing every frame, on top of it. Note that you can NOT opt to~
    +** Processing line: ~    #  skip clearing the screen, only render targets. The screen clears every~
    +** Processing line: ~    #  frame; double-buffering would prevent correct updates between frames.~
    +** Processing line: ~    args.outputs.background_color = [ 0, 0, args.state.bgcolor, 255 ]~
    +** Processing line: ~    args.outputs.sprites << [ 0, 0, 1280, 720, :accumulation ]~
    +** Processing line: ~  end~
    +** Processing line: ~~
    +** Processing line: ~  $gtk.reset~
    +** Processing line: ~~
    +** Processing line: ~#+end_src~
    +- PRE end detected.
    +** Processing line: ~~
    +** Processing line: ~~
     ** Processing line: ~*** Tweening Lerping Easing Functions - Easing Functions - main.rb~
     - H3 detected.
     - Determining if line is a header.
    @@ -207324,12 +208892,12 @@ Follows is a source code listing for all files that have been open sourced. This
     ** Processing line: ~    GTK::Entity.__reset_id__!~
     ** Processing line: ~    args.state.player_one = "test"~
     ** Processing line: ~    result = args.gtk.serialize_state args.state~
    -** Processing line: ~    assert.equal! result, "{:entity_id=>3, :entity_keys_by_ref=>{}, :tick_count=>-1, :player_one=>\"test\"}"~
    +** Processing line: ~    assert.equal! result, "{:entity_id=>4, :entity_keys_by_ref=>{}, :tick_count=>-1, :player_one=>\"test\"}"~
     ** Processing line: ~~
     ** Processing line: ~    GTK::Entity.__reset_id__!~
     ** Processing line: ~    args.gtk.write_file 'state.txt', ''~
     ** Processing line: ~    result = args.gtk.serialize_state 'state.txt', args.state~
    -** Processing line: ~    assert.equal! result, "{:entity_id=>3, :entity_keys_by_ref=>{}, :tick_count=>-1, :player_one=>\"test\"}"~
    +** Processing line: ~    assert.equal! result, "{:entity_id=>4, :entity_keys_by_ref=>{}, :tick_count=>-1, :player_one=>\"test\"}"~
     ** Processing line: ~  end~
     ** Processing line: ~~
     ** Processing line: ~  def test_deserialize args, assert~
    @@ -207378,7 +208946,7 @@ Follows is a source code listing for all files that have been open sourced. This
     ** Processing line: ~    args.state.player_two = args.state.new_entity_strict(:player_strict, name: "Ken", blood_type: nil)~
     ** Processing line: ~~
     ** Processing line: ~    serialized_state = args.gtk.serialize_state args.state~
    -** Processing line: ~    assert.equal! serialized_state, '{:entity_id=>9, :entity_keys_by_ref=>{}, :tick_count=>-1, :player_one=>{:entity_id=>1, :entity_name=>:player, :entity_keys_by_ref=>{}, :entity_type=>:player, :created_at=>-1, :global_created_at=>-1, :name=>"Ryu"}, :player_two=>{:entity_id=>2, :entity_name=>:player_strict, :entity_type=>:player_strict, :created_at=>-1, :global_created_at_elapsed=>-1, :entity_strict=>true, :entity_keys_by_ref=>{:entity_type=>:entity_name, :global_created_at_elapsed=>:created_at}, :name=>"Ken", :blood_type=>nil}}'~
    +** Processing line: ~    assert.equal! serialized_state, '{:entity_id=>7, :entity_keys_by_ref=>{}, :tick_count=>-1, :player_one=>{:entity_id=>1, :entity_name=>:player, :entity_keys_by_ref=>{}, :entity_type=>:player, :created_at=>-1, :global_created_at=>-1, :name=>"Ryu"}, :player_two=>{:entity_id=>2, :entity_name=>:player_strict, :entity_type=>:player_strict, :created_at=>-1, :global_created_at_elapsed=>-1, :entity_strict=>true, :entity_keys_by_ref=>{:entity_type=>:entity_name, :global_created_at_elapsed=>:created_at}, :name=>"Ken", :blood_type=>nil}}'~
     ** Processing line: ~~
     ** Processing line: ~    GTK::Entity.__reset_id__!~
     ** Processing line: ~    deserialized_state = args.gtk.deserialize_state serialized_state~
    @@ -207436,6 +209004,18 @@ Follows is a source code listing for all files that have been open sourced. This
     ** Processing line: ~    assert.equal! deserialized_state.strict_entity.one, deserialized_state.strict_entity.two~
     ** Processing line: ~  end~
     ** Processing line: ~~
    +** Processing line: ~  def test_serialization_excludes_thrash_count args, assert~
    +** Processing line: ~    GTK::Entity.__reset_id__!~
    +** Processing line: ~    args.state.player.name = "Ryu"~
    +** Processing line: ~    # force a nil pun~
    +** Processing line: ~    if args.state.player.age > 30~
    +** Processing line: ~    end~
    +** Processing line: ~    assert.equal! args.state.player.as_hash[:__thrash_count__][:>], 1~
    +** Processing line: ~    result = args.gtk.serialize_state args.state~
    +** Processing line: ~    assert.false! (result.include? "__thrash_count__"),~
    +** Processing line: ~                  "The __thrash_count__ key exists in state when it shouldn't have."~
    +** Processing line: ~  end~
    +** Processing line: ~~
     ** Processing line: ~#+end_src~
     - PRE end detected.
     ** Processing line: ~~
    @@ -230006,6 +231586,219 @@ Follows is a source code listing for all files that have been open sourced. This
     - PRE end detected.
     ** Processing line: ~~
     ** Processing line: ~~
    +** Processing line: ~*** Teentiny - main.rb~
    +- H3 detected.
    +- Determining if line is a header.
    +- Line contains ~*** ~... gsub-ing empty string
    +- Formatting line: ~Teentiny - main.rb~
    +- Line's tilde count is: 0
    +- Line contains link marker: false
    +- Determining if line is a header.
    +- Line contains ~*** ~... gsub-ing empty string
    +- Formatting line: ~Teentiny - main.rb~
    +- Line's tilde count is: 0
    +- Line contains link marker: false
    +** Processing line: ~~
    +** Processing line: ~#+begin_src ruby~
    +- PRE start detected.
    +** Processing line: ~  # ./samples/99_genre_teentiny/app/main.rb~
    +** Processing line: ~  # full documenation is at http://docs.dragonruby.org~
    +** Processing line: ~  # be sure to come to the discord if you hit any snags: http://discord.dragonruby.org~
    +** Processing line: ~  def tick args~
    +** Processing line: ~    # ====================================================~
    +** Processing line: ~    # initialize default variables~
    +** Processing line: ~    # ====================================================~
    +** Processing line: ~~
    +** Processing line: ~    # ruby has an operator called ||= which means "only initialize this if it's nil"~
    +** Processing line: ~    args.state.count_down   ||= 20 * 60 # set the count down to 20 seconds~
    +** Processing line: ~    # set the initial position of the target~
    +** Processing line: ~    args.state.target       ||= { x: args.grid.w.half,~
    +** Processing line: ~                                  y: args.grid.h.half,~
    +** Processing line: ~                                  w: 20,~
    +** Processing line: ~                                  h: 20 }~
    +** Processing line: ~~
    +** Processing line: ~    # set the initial position of the player~
    +** Processing line: ~    args.state.player       ||= { x: 50,~
    +** Processing line: ~                                  y: 50,~
    +** Processing line: ~                                  w: 20,~
    +** Processing line: ~                                  h: 20 }~
    +** Processing line: ~~
    +** Processing line: ~    # set the player movement speed~
    +** Processing line: ~    args.state.player_speed ||= 5~
    +** Processing line: ~~
    +** Processing line: ~    # set the score~
    +** Processing line: ~    args.state.score        ||= 0~
    +** Processing line: ~    args.state.teleports    ||= 3~
    +** Processing line: ~~
    +** Processing line: ~    # set the instructions~
    +** Processing line: ~    args.state.instructions ||= "Get to the red goal! Use arrow keys to move. Spacebar to teleport (use them carefully)!"~
    +** Processing line: ~~
    +** Processing line: ~    # ====================================================~
    +** Processing line: ~    # render the game~
    +** Processing line: ~    # ====================================================~
    +** Processing line: ~    args.outputs.labels  << { x: args.grid.w.half, y: args.grid.h - 10,~
    +** Processing line: ~                              text: args.state.instructions,~
    +** Processing line: ~                              alignment_enum: 1 }~
    +** Processing line: ~~
    +** Processing line: ~    # check if it's game over. if so, then render game over~
    +** Processing line: ~    # otherwise render the current time left~
    +** Processing line: ~    if game_over? args~
    +** Processing line: ~      args.outputs.labels  << { x: args.grid.w.half,~
    +** Processing line: ~                                y: args.grid.h - 40,~
    +** Processing line: ~                                text: "game over! (press r to start over)",~
    +** Processing line: ~                                alignment_enum: 1 }~
    +** Processing line: ~    else~
    +** Processing line: ~      args.outputs.labels  << { x: args.grid.w.half,~
    +** Processing line: ~                                y: args.grid.h - 40,~
    +** Processing line: ~                                text: "time left: #{(args.state.count_down.idiv 60) + 1}",~
    +** Processing line: ~                                alignment_enum: 1 }~
    +** Processing line: ~    end~
    +** Processing line: ~~
    +** Processing line: ~    # render the score~
    +** Processing line: ~    args.outputs.labels  << { x: args.grid.w.half,~
    +** Processing line: ~                              y: args.grid.h - 70,~
    +** Processing line: ~                              text: "score: #{args.state.score}",~
    +** Processing line: ~                              alignment_enum: 1 }~
    +** Processing line: ~~
    +** Processing line: ~    # render the player with teleport count~
    +** Processing line: ~    args.outputs.sprites << { x: args.state.player.x,~
    +** Processing line: ~                              y: args.state.player.y,~
    +** Processing line: ~                              w: args.state.player.w,~
    +** Processing line: ~                              h: args.state.player.h,~
    +** Processing line: ~                              path: 'sprites/square-green.png' }~
    +** Processing line: ~~
    +** Processing line: ~    args.outputs.labels << { x: args.state.player.x + 10,~
    +** Processing line: ~                             y: args.state.player.y + 40,~
    +** Processing line: ~                             text: "teleports: #{args.state.teleports}",~
    +** Processing line: ~                             alignment_enum: 1, size_enum: -2 }~
    +** Processing line: ~~
    +** Processing line: ~    # render the target~
    +** Processing line: ~    args.outputs.sprites << { x: args.state.target.x,~
    +** Processing line: ~                              y: args.state.target.y,~
    +** Processing line: ~                              w: args.state.target.w,~
    +** Processing line: ~                              h: args.state.target.h,~
    +** Processing line: ~                              path: 'sprites/square-red.png' }~
    +** Processing line: ~~
    +** Processing line: ~    # ====================================================~
    +** Processing line: ~    # run simulation~
    +** Processing line: ~    # ====================================================~
    +** Processing line: ~~
    +** Processing line: ~    # count down calculation~
    +** Processing line: ~    args.state.count_down -= 1~
    +** Processing line: ~    args.state.count_down = -1 if args.state.count_down < -1~
    +** Processing line: ~~
    +** Processing line: ~    # ====================================================~
    +** Processing line: ~    # process player input~
    +** Processing line: ~    # ====================================================~
    +** Processing line: ~    # if it isn't game over let them move~
    +** Processing line: ~    if !game_over? args~
    +** Processing line: ~      dir_y = 0~
    +** Processing line: ~      dir_x = 0~
    +** Processing line: ~~
    +** Processing line: ~      # determine the change horizontally~
    +** Processing line: ~      if args.inputs.keyboard.up~
    +** Processing line: ~        dir_y += args.state.player_speed~
    +** Processing line: ~      elsif args.inputs.keyboard.down~
    +** Processing line: ~        dir_y -= args.state.player_speed~
    +** Processing line: ~      end~
    +** Processing line: ~~
    +** Processing line: ~      # determine the change vertically~
    +** Processing line: ~      if args.inputs.keyboard.left~
    +** Processing line: ~        dir_x -= args.state.player_speed~
    +** Processing line: ~      elsif args.inputs.keyboard.right~
    +** Processing line: ~        dir_x += args.state.player_speed~
    +** Processing line: ~      end~
    +** Processing line: ~~
    +** Processing line: ~      # determine if teleport can be used~
    +** Processing line: ~      if args.inputs.keyboard.key_down.space && args.state.teleports > 0~
    +** Processing line: ~        args.state.teleports -= 1~
    +** Processing line: ~        dir_x *= 20~
    +** Processing line: ~        dir_y *= 20~
    +** Processing line: ~      end~
    +** Processing line: ~~
    +** Processing line: ~      # apply change to player~
    +** Processing line: ~      args.state.player.x += dir_x~
    +** Processing line: ~      args.state.player.y += dir_y~
    +** Processing line: ~    else~
    +** Processing line: ~      # if r is pressed, reset the game~
    +** Processing line: ~      if args.inputs.keyboard.key_down.r~
    +** Processing line: ~        $gtk.reset~
    +** Processing line: ~        return~
    +** Processing line: ~      end~
    +** Processing line: ~    end~
    +** Processing line: ~~
    +** Processing line: ~    # ====================================================~
    +** Processing line: ~    # determine score~
    +** Processing line: ~    # ====================================================~
    +** Processing line: ~~
    +** Processing line: ~    # calculate new score if the player is at goal~
    +** Processing line: ~    if !game_over? args~
    +** Processing line: ~~
    +** Processing line: ~      # if the player is at the goal, then move the goal~
    +** Processing line: ~      if args.state.player.intersect_rect? args.state.target~
    +** Processing line: ~        # increment the goal~
    +** Processing line: ~        args.state.score += 1~
    +** Processing line: ~~
    +** Processing line: ~        # move the goal to a random location~
    +** Processing line: ~        args.state.target = { x: (rand args.grid.w), y: (rand args.grid.h), w: 20, h: 20 }~
    +** Processing line: ~~
    +** Processing line: ~        # make sure the goal is inside the view area~
    +** Processing line: ~        if args.state.target.x < 0~
    +** Processing line: ~          args.state.target.x += 20~
    +** Processing line: ~        elsif args.state.target.x > 1280~
    +** Processing line: ~          args.state.target.x -= 20~
    +** Processing line: ~        end~
    +** Processing line: ~~
    +** Processing line: ~        # make sure the goal is inside the view area~
    +** Processing line: ~        if args.state.target.y < 0~
    +** Processing line: ~          args.state.target.y += 20~
    +** Processing line: ~        elsif args.state.target.y > 720~
    +** Processing line: ~          args.state.target.y -= 20~
    +** Processing line: ~        end~
    +** Processing line: ~      end~
    +** Processing line: ~    end~
    +** Processing line: ~  end~
    +** Processing line: ~~
    +** Processing line: ~  def game_over? args~
    +** Processing line: ~    args.state.count_down < 0~
    +** Processing line: ~  end~
    +** Processing line: ~~
    +** Processing line: ~  $gtk.reset~
    +** Processing line: ~~
    +** Processing line: ~#+end_src~
    +- PRE end detected.
    +** Processing line: ~~
    +** Processing line: ~~
    +** Processing line: ~*** Teentiny - license.txt~
    +- H3 detected.
    +- Determining if line is a header.
    +- Line contains ~*** ~... gsub-ing empty string
    +- Formatting line: ~Teentiny - license.txt~
    +- Line's tilde count is: 0
    +- Line contains link marker: false
    +- Determining if line is a header.
    +- Line contains ~*** ~... gsub-ing empty string
    +- Formatting line: ~Teentiny - license.txt~
    +- Line's tilde count is: 0
    +- Line contains link marker: false
    +** Processing line: ~~
    +** Processing line: ~#+begin_src ruby~
    +- PRE start detected.
    +** Processing line: ~  # ./samples/99_genre_teentiny/license.txt~
    +** Processing line: ~  Copyright 2019 DragonRuby LLC~
    +** Processing line: ~~
    +** Processing line: ~  MIT License~
    +** Processing line: ~~
    +** Processing line: ~  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:~
    +** Processing line: ~~
    +** Processing line: ~  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.~
    +** Processing line: ~~
    +** Processing line: ~  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.~
    +** Processing line: ~~
    +** Processing line: ~#+end_src~
    +- PRE end detected.
    +** Processing line: ~~
    +** Processing line: ~~
     ** Processing line: ~** OSS~
     - H2 detected.
     - Determining if line is a header.
    @@ -230244,6 +232037,23 @@ Follows is a source code listing for all files that have been open sourced. This
     ** Processing line: ~      def autocomplete_methods~
     ** Processing line: ~        [:inputs, :outputs, :gtk, :state, :geometry, :audio, :grid, :layout, :fn]~
     ** Processing line: ~      end~
    +** Processing line: ~~
    +** Processing line: ~      def method_missing name, *args, &block~
    +** Processing line: ~        if (args.length <= 1) && (@state.as_hash.key? name)~
    +** Processing line: ~          raise <<-S~
    +** Processing line: ~  * ERROR - :#{name} method missing on ~#{self.class.name}~.~
    +** Processing line: ~  The method~
    +** Processing line: ~    :#{name}~
    +** Processing line: ~  with args~
    +** Processing line: ~    #{args}~
    +** Processing line: ~  doesn't exist on #{inspect}.~
    +** Processing line: ~  ** POSSIBLE SOLUTION - ~args.state.#{name}~ exists.~
    +** Processing line: ~  Did you forget ~.state~ before ~.#{name}~?~
    +** Processing line: ~  S~
    +** Processing line: ~        end~
    +** Processing line: ~~
    +** Processing line: ~        super~
    +** Processing line: ~      end~
     ** Processing line: ~    end~
     ** Processing line: ~  end~
     ** Processing line: ~~
    @@ -230508,6 +232318,7 @@ Follows is a source code listing for all files that have been open sourced. This
     ** Processing line: ~#+begin_src ruby~
     - PRE start detected.
     ** Processing line: ~  # ./dragon/attr_sprite.rb~
    +** Processing line: ~  # coding: utf-8~
     ** Processing line: ~  # Copyright 2019 DragonRuby LLC~
     ** Processing line: ~  # MIT License~
     ** Processing line: ~  # attr_sprite.rb has been released under MIT (*only this file*).~
    @@ -230586,6 +232397,7 @@ Follows is a source code listing for all files that have been open sourced. This
     ** Processing line: ~#+begin_src ruby~
     - PRE start detected.
     ** Processing line: ~  # ./dragon/console.rb~
    +** Processing line: ~  # coding: utf-8~
     ** Processing line: ~  # Copyright 2019 DragonRuby LLC~
     ** Processing line: ~  # MIT License~
     ** Processing line: ~  # console.rb has been released under MIT (*only this file*).~
    @@ -231021,6 +232833,7 @@ Follows is a source code listing for all files that have been open sourced. This
     ** Processing line: ~        if console_toggle_key_down? args~
     ** Processing line: ~          args.inputs.text.clear~
     ** Processing line: ~          toggle~
    +** Processing line: ~          args.inputs.keyboard.clear if !@visible~
     ** Processing line: ~        end~
     ** Processing line: ~~
     ** Processing line: ~        return unless visible?~
    @@ -231032,7 +232845,16 @@ Follows is a source code listing for all files that have been open sourced. This
     ** Processing line: ~        @log_offset = 0 if @log_offset < 0~
     ** Processing line: ~~
     ** Processing line: ~        if args.inputs.keyboard.key_down.enter~
    -** Processing line: ~          eval_the_set_command~
    +** Processing line: ~          if slide_progress > 0.5~
    +** Processing line: ~            # in the event of an exception, the console window pops up~
    +** Processing line: ~            # and is pre-filled with $gtk.reset.~
    +** Processing line: ~            # there is an annoying scenario where the exception could be thrown~
    +** Processing line: ~            # by pressing enter (while playing the game). if you press enter again~
    +** Processing line: ~            # quickly, then the game is reset which closes the console.~
    +** Processing line: ~            # so enter in the console is only evaluated if the slide_progress~
    +** Processing line: ~            # is atleast half way down the page.~
    +** Processing line: ~            eval_the_set_command~
    +** Processing line: ~          end~
     ** Processing line: ~        elsif args.inputs.keyboard.key_down.v~
     ** Processing line: ~          if args.inputs.keyboard.key_down.control || args.inputs.keyboard.key_down.meta~
     ** Processing line: ~            prompt << $gtk.ffi_misc.getclipboard~
    @@ -231416,6 +233238,7 @@ Follows is a source code listing for all files that have been open sourced. This
     ** Processing line: ~#+begin_src ruby~
     - PRE start detected.
     ** Processing line: ~  # ./dragon/console_color.rb~
    +** Processing line: ~  # coding: utf-8~
     ** Processing line: ~  # Copyright 2019 DragonRuby LLC~
     ** Processing line: ~  # MIT License~
     ** Processing line: ~  # console_color.rb has been released under MIT (*only this file*).~
    @@ -231471,6 +233294,7 @@ Follows is a source code listing for all files that have been open sourced. This
     ** Processing line: ~#+begin_src ruby~
     - PRE start detected.
     ** Processing line: ~  # ./dragon/console_font_style.rb~
    +** Processing line: ~  # coding: utf-8~
     ** Processing line: ~  # Copyright 2019 DragonRuby LLC~
     ** Processing line: ~  # MIT License~
     ** Processing line: ~  # console_font_style.rb has been released under MIT (*only this file*).~
    @@ -231532,6 +233356,7 @@ Follows is a source code listing for all files that have been open sourced. This
     ** Processing line: ~#+begin_src ruby~
     - PRE start detected.
     ** Processing line: ~  # ./dragon/console_menu.rb~
    +** Processing line: ~  # coding: utf-8~
     ** Processing line: ~  # Copyright 2019 DragonRuby LLC~
     ** Processing line: ~  # MIT License~
     ** Processing line: ~  # console_menu.rb has been released under MIT (*only this file*).~
    @@ -231713,6 +233538,7 @@ Follows is a source code listing for all files that have been open sourced. This
     ** Processing line: ~#+begin_src ruby~
     - PRE start detected.
     ** Processing line: ~  # ./dragon/console_prompt.rb~
    +** Processing line: ~  # coding: utf-8~
     ** Processing line: ~  # Copyright 2019 DragonRuby LLC~
     ** Processing line: ~  # MIT License~
     ** Processing line: ~  # console_prompt.rb has been released under MIT (*only this file*).~
    @@ -234510,11 +236336,13 @@ Follows is a source code listing for all files that have been open sourced. This
     ** Processing line: ~#+begin_src ruby~
     - PRE start detected.
     ** Processing line: ~  # ./dragon/ios_wizard.rb~
    -** Processing line: ~  # Contributors outside of DragonRuby who also hold Copyright: Michał Dudziński~
    +** Processing line: ~  # coding: utf-8~
     ** Processing line: ~  # Copyright 2019 DragonRuby LLC~
     ** Processing line: ~  # MIT License~
     ** Processing line: ~  # ios_wizard.rb has been released under MIT (*only this file*).~
     ** Processing line: ~~
    +** Processing line: ~  # Contributors outside of DragonRuby who also hold Copyright: Michał Dudziński~
    +** Processing line: ~~
     ** Processing line: ~  class IOSWizard < Wizard~
     ** Processing line: ~    def initialize~
     ** Processing line: ~      @doctor_executed_at = 0~
    @@ -235638,6 +237466,7 @@ Follows is a source code listing for all files that have been open sourced. This
     ** Processing line: ~#+begin_src ruby~
     - PRE start detected.
     ** Processing line: ~  # ./dragon/itch_wizard.rb~
    +** Processing line: ~  # coding: utf-8~
     ** Processing line: ~  # Copyright 2019 DragonRuby LLC~
     ** Processing line: ~  # MIT License~
     ** Processing line: ~  # itch_wizard.rb has been released under MIT (*only this file*).~
    @@ -235915,6 +237744,7 @@ Follows is a source code listing for all files that have been open sourced. This
     ** Processing line: ~#+begin_src ruby~
     - PRE start detected.
     ** Processing line: ~  # ./dragon/layout.rb~
    +** Processing line: ~  # coding: utf-8~
     ** Processing line: ~  # Copyright 2019 DragonRuby LLC~
     ** Processing line: ~  # MIT License~
     ** Processing line: ~  # layout.rb has been released under MIT (*only this file*).~
    @@ -236868,11 +238698,13 @@ Follows is a source code listing for all files that have been open sourced. This
     ** Processing line: ~#+begin_src ruby~
     - PRE start detected.
     ** Processing line: ~  # ./dragon/metadata.rb~
    -** Processing line: ~  # Contributors outside of DragonRuby who also hold Copyright: Michał Dudziński~
    +** Processing line: ~  # coding: utf-8~
     ** Processing line: ~  # Copyright 2021 DragonRuby LLC~
     ** Processing line: ~  # MIT License~
     ** Processing line: ~  # metadata.rb has been released under MIT (*only this file*).~
     ** Processing line: ~~
    +** Processing line: ~  # Contributors outside of DragonRuby who also hold Copyright: Michał Dudziński~
    +** Processing line: ~~
     ** Processing line: ~  module Metadata~
     ** Processing line: ~    def metadata_file_path~
     ** Processing line: ~      "metadata/game_metadata.txt"~
    @@ -237983,6 +239815,7 @@ Follows is a source code listing for all files that have been open sourced. This
     ** Processing line: ~#+begin_src ruby~
     - PRE start detected.
     ** Processing line: ~  # ./dragon/runtime/autocomplete.rb~
    +** Processing line: ~  # coding: utf-8~
     ** Processing line: ~  # Copyright 2019 DragonRuby LLC~
     ** Processing line: ~  # MIT License~
     ** Processing line: ~  # autocomplete.rb has been released under MIT (*only this file*).~
    @@ -238154,6 +239987,7 @@ Follows is a source code listing for all files that have been open sourced. This
     ** Processing line: ~#+begin_src ruby~
     - PRE start detected.
     ** Processing line: ~  # ./dragon/runtime/benchmark.rb~
    +** Processing line: ~  # coding: utf-8~
     ** Processing line: ~  # Copyright 2019 DragonRuby LLC~
     ** Processing line: ~  # MIT License~
     ** Processing line: ~  # benchmark.rb has been released under MIT (*only this file*).~
    @@ -238286,6 +240120,7 @@ Follows is a source code listing for all files that have been open sourced. This
     ** Processing line: ~#+begin_src ruby~
     - PRE start detected.
     ** Processing line: ~  # ./dragon/runtime/draw.rb~
    +** Processing line: ~  # coding: utf-8~
     ** Processing line: ~  # Copyright 2019 DragonRuby LLC~
     ** Processing line: ~  # MIT License~
     ** Processing line: ~  # draw.rb has been released under MIT (*only this file*).~
    @@ -238466,6 +240301,7 @@ Follows is a source code listing for all files that have been open sourced. This
     ** Processing line: ~#+begin_src ruby~
     - PRE start detected.
     ** Processing line: ~  # ./dragon/runtime/framerate.rb~
    +** Processing line: ~  # coding: utf-8~
     ** Processing line: ~  # Copyright 2019 DragonRuby LLC~
     ** Processing line: ~  # MIT License~
     ** Processing line: ~  # framerate.rb has been released under MIT (*only this file*).~
    @@ -238502,12 +240338,7 @@ Follows is a source code listing for all files that have been open sourced. This
     ** Processing line: ~                if framerate_below_threshold?~
     ** Processing line: ~                  @last_framerate = current_framerate~
     ** Processing line: ~                  if !@console.visible?~
    -** Processing line: ~                    if !@framerate_important_notification_happened~
    -** Processing line: ~                      log_important framerate_warning_message~
    -** Processing line: ~                    else~
    -** Processing line: ~                      log framerate_warning_message~
    -** Processing line: ~                    end~
    -** Processing line: ~                    @framerate_important_notification_happened = true~
    +** Processing line: ~                    log framerate_warning_message~
     ** Processing line: ~                  end~
     ** Processing line: ~                end~
     ** Processing line: ~~
    @@ -238570,6 +240401,7 @@ Follows is a source code listing for all files that have been open sourced. This
     ** Processing line: ~#+begin_src ruby~
     - PRE start detected.
     ** Processing line: ~  # ./dragon/runtime/framerate_diagnostics.rb~
    +** Processing line: ~  # coding: utf-8~
     ** Processing line: ~  # Copyright 2019 DragonRuby LLC~
     ** Processing line: ~  # MIT License~
     ** Processing line: ~  # framerate_diagnostics.rb has been released under MIT (*only this file*).~
    @@ -239459,6 +241291,104 @@ Follows is a source code listing for all files that have been open sourced. This
     - PRE end detected.
     ** Processing line: ~~
     ** Processing line: ~~
    +** Processing line: ~*** tweetcart.rb~
    +- H3 detected.
    +- Determining if line is a header.
    +- Line contains ~*** ~... gsub-ing empty string
    +- Formatting line: ~tweetcart.rb~
    +- Line's tilde count is: 0
    +- Line contains link marker: false
    +- Determining if line is a header.
    +- Line contains ~*** ~... gsub-ing empty string
    +- Formatting line: ~tweetcart.rb~
    +- Line's tilde count is: 0
    +- Line contains link marker: false
    +** Processing line: ~~
    +** Processing line: ~#+begin_src ruby~
    +- PRE start detected.
    +** Processing line: ~  # ./dragon/tweetcart.rb~
    +** Processing line: ~  # coding: utf-8~
    +** Processing line: ~  # Copyright 2019 DragonRuby LLC~
    +** Processing line: ~  # MIT License~
    +** Processing line: ~  # tweetcart.rb has been released under MIT (*only this file*).~
    +** Processing line: ~~
    +** Processing line: ~  def $top_level.TICK &block~
    +** Processing line: ~    $top_level.define_method(:tick) do |args|~
    +** Processing line: ~      args.outputs[:scene].w = 160~
    +** Processing line: ~      args.outputs[:scene].h = 90~
    +** Processing line: ~      args.outputs[:scene].background_color = [0, 0, 0, 0]~
    +** Processing line: ~      block.call args~
    +** Processing line: ~      args.outputs.sprites << { x: 0, y: 0, w: 1280, h: 720, path: :scene }~
    +** Processing line: ~    end~
    +** Processing line: ~~
    +** Processing line: ~    def $top_level.bg! *rgb~
    +** Processing line: ~      r,g,b = rgb~
    +** Processing line: ~      r ||= 255~
    +** Processing line: ~      g ||= r~
    +** Processing line: ~      b ||= g~
    +** Processing line: ~      $args.outputs.background_color = [r, g, b]~
    +** Processing line: ~    end~
    +** Processing line: ~~
    +** Processing line: ~    def $top_level.slds~
    +** Processing line: ~      $args.outputs[:scene].sprites~
    +** Processing line: ~    end~
    +** Processing line: ~~
    +** Processing line: ~    def $top_level.slds! *os~
    +** Processing line: ~      if (os.first.is_a? Numeric)~
    +** Processing line: ~        sld! *os~
    +** Processing line: ~      else~
    +** Processing line: ~        os.each { |o| sld! *o }~
    +** Processing line: ~      end~
    +** Processing line: ~    end~
    +** Processing line: ~~
    +** Processing line: ~    def $top_level.sld! *params~
    +** Processing line: ~      x, y, w, h, r, g, b, a = nil~
    +** Processing line: ~      if params.length == 2~
    +** Processing line: ~        x, y = params~
    +** Processing line: ~      elsif params.length == 3 && (params.last.is_a? Array)~
    +** Processing line: ~        x = params[0]~
    +** Processing line: ~        y = params[1]~
    +** Processing line: ~        r, g, b, a = params[2]~
    +** Processing line: ~        r ||= 255~
    +** Processing line: ~        g ||= r~
    +** Processing line: ~        b ||= g~
    +** Processing line: ~        a ||= 255~
    +** Processing line: ~      elsif params.length == 4~
    +** Processing line: ~        x, y, w, h = params~
    +** Processing line: ~      elsif params.length == 5 && (params.last.is_a? Array)~
    +** Processing line: ~        x = params[0]~
    +** Processing line: ~        y = params[1]~
    +** Processing line: ~        w = params[2]~
    +** Processing line: ~        h = params[3]~
    +** Processing line: ~        r,g,b,a = params[4]~
    +** Processing line: ~        r ||= 255~
    +** Processing line: ~        g ||= r~
    +** Processing line: ~        b ||= g~
    +** Processing line: ~        a ||= 255~
    +** Processing line: ~      elsif params.length >= 7~
    +** Processing line: ~        x, y, w, h, r, g, b = params~
    +** Processing line: ~      else~
    +** Processing line: ~        raise "I don't know how to render #{params} with reasonable defaults."~
    +** Processing line: ~      end~
    +** Processing line: ~~
    +** Processing line: ~      w ||= 1~
    +** Processing line: ~      h ||= 1~
    +** Processing line: ~      r ||= 255~
    +** Processing line: ~      g ||= 255~
    +** Processing line: ~      b ||= 255~
    +** Processing line: ~      a ||= 255~
    +** Processing line: ~~
    +** Processing line: ~      slds << { x: x, y: y,~
    +** Processing line: ~                w: w, h: h,~
    +** Processing line: ~                r: r, g: g, b: b, a: a,~
    +** Processing line: ~                path: :pixel }~
    +** Processing line: ~    end~
    +** Processing line: ~  end~
    +** Processing line: ~~
    +** Processing line: ~#+end_src~
    +- PRE end detected.
    +** Processing line: ~~
    +** Processing line: ~~
     ** Processing line: ~*** wizards.rb~
     - H3 detected.
     - Determining if line is a header.
    @@ -239475,6 +241405,7 @@ Follows is a source code listing for all files that have been open sourced. This
     ** Processing line: ~#+begin_src ruby~
     - PRE start detected.
     ** Processing line: ~  # ./dragon/wizards.rb~
    +** Processing line: ~  # coding: utf-8~
     ** Processing line: ~  # Copyright 2019 DragonRuby LLC~
     ** Processing line: ~  # MIT License~
     ** Processing line: ~  # wizards.rb has been released under MIT (*only this file*).~
    diff --git a/dragon/args.rb b/dragon/args.rb
    index 9cf6e33..5bb0ccf 100644
    --- a/dragon/args.rb
    +++ b/dragon/args.rb
    @@ -200,5 +200,22 @@ module GTK
         def autocomplete_methods
           [:inputs, :outputs, :gtk, :state, :geometry, :audio, :grid, :layout, :fn]
         end
    +
    +    def method_missing name, *args, &block
    +      if (args.length <= 1) && (@state.as_hash.key? name)
    +        raise <<-S
    +* ERROR - :#{name} method missing on ~#{self.class.name}~.
    +The method
    +  :#{name}
    +with args
    +  #{args}
    +doesn't exist on #{inspect}.
    +** POSSIBLE SOLUTION - ~args.state.#{name}~ exists.
    +Did you forget ~.state~ before ~.#{name}~?
    +S
    +      end
    +
    +      super
    +    end
       end
     end
    diff --git a/dragon/console.rb b/dragon/console.rb
    index b3a2c2a..34183ae 100644
    --- a/dragon/console.rb
    +++ b/dragon/console.rb
    @@ -434,6 +434,7 @@ S
           if console_toggle_key_down? args
             args.inputs.text.clear
             toggle
    +        args.inputs.keyboard.clear if !@visible
           end
     
           return unless visible?
    @@ -445,7 +446,16 @@ S
           @log_offset = 0 if @log_offset < 0
     
           if args.inputs.keyboard.key_down.enter
    -        eval_the_set_command
    +        if slide_progress > 0.5
    +          # in the event of an exception, the console window pops up
    +          # and is pre-filled with $gtk.reset.
    +          # there is an annoying scenario where the exception could be thrown
    +          # by pressing enter (while playing the game). if you press enter again
    +          # quickly, then the game is reset which closes the console.
    +          # so enter in the console is only evaluated if the slide_progress
    +          # is atleast half way down the page.
    +          eval_the_set_command
    +        end
           elsif args.inputs.keyboard.key_down.v
             if args.inputs.keyboard.key_down.control || args.inputs.keyboard.key_down.meta
               prompt << $gtk.ffi_misc.getclipboard
    diff --git a/dragon/framerate.rb b/dragon/framerate.rb
    index a9504a6..ff2f1c5 100644
    --- a/dragon/framerate.rb
    +++ b/dragon/framerate.rb
    @@ -35,12 +35,7 @@ module GTK
                   if framerate_below_threshold?
                     @last_framerate = current_framerate
                     if !@console.visible?
    -                  if !@framerate_important_notification_happened
    -                    log_important framerate_warning_message
    -                  else
    -                    log framerate_warning_message
    -                  end
    -                  @framerate_important_notification_happened = true
    +                  log framerate_warning_message
                     end
                   end
     
    diff --git a/dragon/recording.rb b/dragon/recording.rb
    new file mode 100644
    index 0000000..72d8da9
    --- /dev/null
    +++ b/dragon/recording.rb
    @@ -0,0 +1,260 @@
    +# coding: utf-8
    +# Copyright 2019 DragonRuby LLC
    +# MIT License
    +# recording.rb has been released under MIT (*only this file*).
    +
    +module GTK
    +  # FIXME: Gross
    +  # @gtk
    +  class Replay
    +    # @gtk
    +    def self.start file_name = nil
    +      $recording.start_replay file_name
    +    end
    +
    +    # @gtk
    +    def self.stop
    +      $recording.stop_replay
    +    end
    +  end
    +
    +  # @gtk
    +  class Recording
    +    def initialize runtime
    +      @runtime = runtime
    +      @tick_count = 0
    +      @global_input_order = 1
    +    end
    +
    +    def tick
    +      @tick_count += 1
    +    end
    +
    +    def start_recording seed_number = nil
    +      if !seed_number
    +        log <<-S
    +* ERROR:
    +To start recording, you must provide an integer value to
    +seed random number generation.
    +S
    +        $console.set_command "$recording.start SEED_NUMBER"
    +        return
    +      end
    +
    +      if @is_recording
    +        log <<-S
    +* ERROR:
    +You are already recording, first cancel (or stop) the current recording.
    +S
    +        $console.set_command "$recording.cancel"
    +        return
    +      end
    +
    +      if @is_replaying
    +        log <<-S
    +* ERROR:
    +You are currently replaying a recording, first stop the replay.
    +S
    +        return
    +      end
    +
    +      log_info <<-S
    +Recording has begun with RNG seed value set to #{seed_number}.
    +To stop recording use stop_recording(filename).
    +The recording will stop without saving a file if a filename is nil.
    +S
    +
    +      $console.set_command "$recording.stop 'replay.txt'"
    +      @runtime.__reset__
    +      @seed_number = seed_number
    +      @runtime.set_rng seed_number
    +
    +      @tick_count = 0
    +      @global_input_order = 1
    +      @is_recording = true
    +      @input_history = []
    +      @runtime.notify! "Recording started. When completed, open the console to save it using $recording.stop FILE_NAME (or cancel).", 300
    +    end
    +
    +    # @gtk
    +    def start seed_number = nil
    +      start_recording seed_number
    +    end
    +
    +    def is_replaying?
    +      @is_replaying
    +    end
    +
    +    def is_recording?
    +      @is_recording
    +    end
    +
    +    # @gtk
    +    def stop file_name = nil
    +      stop_recording file_name
    +    end
    +
    +    # @gtk
    +    def cancel
    +      stop_recording_core
    +      @runtime.notify! "Recording cancelled."
    +    end
    +
    +    def stop_recording file_name = nil
    +      if !file_name
    +        log <<-S
    +* ERROR:
    +To please specify a file name when calling:
    +$recording.stop FILE_NAME
    +
    +If you do NOT want to save the recording, call:
    +$recording.cancel
    +S
    +        $console.set_command "$recording.stop 'replay.txt'"
    +        return
    +      end
    +
    +      if !@is_recording
    +        log_info "You are not currently recording. Use start_recording(seed_number) to start recording."
    +        $console.set_command "$recording.start"
    +        return
    +      end
    +
    +      if file_name
    +        text = "replay_version 2.0\n"
    +        text << "stopped_at #{@tick_count}\n"
    +        text << "seed #{@seed_number}\n"
    +        text << "recorded_at #{Time.now.to_s}\n"
    +        @input_history.each do |items|
    +          text << "#{items}\n"
    +        end
    +        @runtime.write_file file_name, text
    +        @runtime.write_file 'last_replay.txt', text
    +        log_info "The recording has been saved successfully at #{file_name}. You can use start_replay(\"#{file_name}\") to replay the recording."
    +      end
    +
    +      $console.set_command "$replay.start '#{file_name}'"
    +      stop_recording_core
    +      @runtime.notify! "Recording saved to #{file_name}. To replay it: $replay.start \"#{file_name}\"."
    +      log_info "You can run the replay later on startup using: ./dragonruby mygame --replay #{@replay_file_name}"
    +      nil
    +    end
    +
    +    def stop_recording_core
    +      @is_recording = false
    +      @input_history = nil
    +      @last_history = nil
    +      @runtime.__reset__
    +    end
    +
    +    def start_replay file_name = nil
    +      if !file_name
    +        log <<-S
    +* ERROR:
    +Please provide a file name to $recording.start.
    +S
    +        $console.set_command "$replay.start 'replay.txt'"
    +        return
    +      end
    +
    +      text = @runtime.read_file file_name
    +      return false unless text
    +
    +      if text.each_line.first.strip != "replay_version 2.0"
    +        raise "The replay file #{file_name} is not compatible with this version of DragonRuby Game Toolkit. Please recreate the replay (sorry)."
    +      end
    +
    +      @replay_file_name = file_name
    +
    +      $replay_data = { input_history: { } }
    +      text.each_line do |l|
    +        if l.strip.length == 0
    +          next
    +        elsif l.start_with? 'replay_version'
    +          next
    +        elsif l.start_with? 'seed'
    +          $replay_data[:seed] = l.split(' ').last.to_i
    +        elsif l.start_with? 'stopped_at'
    +          $replay_data[:stopped_at] = l.split(' ').last.to_i
    +        elsif l.start_with? 'recorded_at'
    +          $replay_data[:recorded_at] = l.split(' ')[1..-1].join(' ')
    +        elsif l.start_with? '['
    +          name, value_1, value_2, value_count, id, tick_count = l.strip.gsub('[', '').gsub(']', '').split(',')
    +          $replay_data[:input_history][tick_count.to_i] ||= []
    +          $replay_data[:input_history][tick_count.to_i] << {
    +            id: id.to_i,
    +            name: name.gsub(':', '').to_sym,
    +            value_1: value_1.to_f,
    +            value_2: value_2.to_f,
    +            value_count: value_count.to_i
    +          }
    +        else
    +          raise "Replay data seems corrupt. I don't know how to parse #{l}."
    +        end
    +      end
    +
    +      $replay_data[:input_history].keys.each do |key|
    +        $replay_data[:input_history][key] = $replay_data[:input_history][key].sort_by {|input| input[:id]}
    +      end
    +
    +      @runtime.__reset__
    +      @runtime.set_rng $replay_data[:seed]
    +      @tick_count = 0
    +      @is_replaying = true
    +      log_info "Replay has been started."
    +      @runtime.notify! "Replay started [#{@replay_file_name}]."
    +    end
    +
    +    def stop_replay notification_message =  "Replay has been stopped."
    +      if !is_replaying?
    +        log <<-S
    +* ERROR:
    +No replay is currently running. Call $replay.start FILE_NAME to start a replay.
    +S
    +
    +        $console.set_command "$replay.start 'replay.txt'"
    +        return
    +      end
    +      log_info notification_message
    +      @is_replaying = false
    +      $replay_data = nil
    +      @tick_count = 0
    +      @global_input_order = 1
    +      $console.set_command_silent "$replay.start '#{@replay_file_name}'"
    +      @runtime.__reset__
    +      @runtime.notify! notification_message
    +    end
    +
    +    def record_input_history name, value_1, value_2, value_count, clear_cache = false
    +      return if @is_replaying
    +      return unless @is_recording
    +      @input_history << [name, value_1, value_2, value_count, @global_input_order, @tick_count]
    +      @global_input_order += 1
    +    end
    +
    +    def stage_replay_values
    +      return unless @is_replaying
    +      return unless $replay_data
    +
    +      if $replay_data[:stopped_at] <= @tick_count
    +        stop_replay "Replay completed [#{@replay_file_name}]. To rerun, bring up the Console and press enter."
    +        return
    +      end
    +
    +      inputs_this_tick = $replay_data[:input_history][@tick_count]
    +
    +      if @tick_count.zmod? 60
    +        log_info "Replay ends in #{($replay_data[:stopped_at] - @tick_count).idiv 60} second(s)."
    +      end
    +
    +      return unless inputs_this_tick
    +      inputs_this_tick.each do |v|
    +        args = []
    +        args << v[:value_1] if v[:value_count] >= 1
    +        args << v[:value_2] if v[:value_count] >= 2
    +        args << :replay
    +        $gtk.send v[:name], *args
    +      end
    +    end
    +  end
    +end
    diff --git a/dragon/tweetcart.rb b/dragon/tweetcart.rb
    new file mode 100644
    index 0000000..9e278b3
    --- /dev/null
    +++ b/dragon/tweetcart.rb
    @@ -0,0 +1,102 @@
    +# coding: utf-8
    +# Copyright 2019 DragonRuby LLC
    +# MIT License
    +# tweetcart.rb has been released under MIT (*only this file*).
    +
    +def $top_level.TICK &block
    +  $top_level.define_method(:tick) do |args|
    +    args.outputs[:scene].w = 160
    +    args.outputs[:scene].h = 90
    +    args.outputs[:scene].background_color = [0, 0, 0, 0]
    +    block.call args
    +    args.outputs.sprites << { x: 0, y: 0, w: 1280, h: 720, path: :scene }
    +  end
    +
    +  def $top_level.bg! *rgb
    +    r,g,b = rgb
    +    r ||= 255
    +    g ||= r
    +    b ||= g
    +    $args.outputs.background_color = [r, g, b]
    +  end
    +
    +  def $top_level.slds
    +    $args.outputs[:scene].sprites
    +  end
    +
    +  def $top_level.slds! *os
    +    if (os.first.is_a? Numeric)
    +      sld! *os
    +    else
    +      os.each { |o| sld! *o }
    +    end
    +  end
    +
    +  def $top_level.sld! *params
    +    x, y, w, h, r, g, b, a = nil
    +    if params.length == 2
    +      x, y = params
    +    elsif params.length == 3 && (params.last.is_a? Array)
    +      x = params[0]
    +      y = params[1]
    +      r, g, b, a = params[2]
    +      r ||= 255
    +      g ||= r
    +      b ||= g
    +      a ||= 255
    +    elsif params.length == 4
    +      x, y, w, h = params
    +    elsif params.length == 5 && (params.last.is_a? Array)
    +      x = params[0]
    +      y = params[1]
    +      w = params[2]
    +      h = params[3]
    +      r,g,b,a = params[4]
    +      r ||= 255
    +      g ||= r
    +      b ||= g
    +      a ||= 255
    +    elsif params.length >= 7
    +      x, y, w, h, r, g, b = params
    +    else
    +      raise "I don't know how to render #{params} with reasonable defaults."
    +    end
    +
    +    w ||= 1
    +    h ||= 1
    +    r ||= 255
    +    g ||= 255
    +    b ||= 255
    +    a ||= 255
    +
    +    slds << { x: x, y: y,
    +              w: w, h: h,
    +              r: r, g: g, b: b, a: a,
    +              path: :pixel }
    +  end
    +end
    +
    +=begin
    +wht  = [255] * 3
    +red  = [255, 0, 0]
    +blu  = [0, 130, 255]
    +purp = [150, 80, 255]
    +
    +TICK {
    +  bg! 0
    +
    +  slds << [0, 0, 3, 3, 0, 255, 0, 255]
    +
    +  sld!     10, 10
    +  sld!     20, 20, 3, 2
    +  sld!     30, 30, 2, 2, red
    +  sld!     35, 35, blu
    +
    +  slds!    40, 40
    +
    +  slds!   [50, 50],
    +          [60, 60, purp],
    +          [70, 70, 10, 10, wht],
    +          [80, 80, 4, 4, 255, 0, 255]
    +}
    +=end
    diff --git a/samples/04_physics_and_collisions/06_box_collision_3/app/main.rb b/samples/04_physics_and_collisions/06_box_collision_3/app/main.rb
    index 4f5b483..ae447fd 100644
    --- a/samples/04_physics_and_collisions/06_box_collision_3/app/main.rb
    +++ b/samples/04_physics_and_collisions/06_box_collision_3/app/main.rb
    @@ -112,7 +112,7 @@ class Game
     
       def calc_below
         return unless player.dy <= 0
    -    tiles_below = find_tiles { |t| t.rect.top <= player.y }
    +    tiles_below = find_tiles { |t| t.rect.top <= player.prev_rect.y }
         collision = find_colliding_tile tiles_below, (player.rect.merge y: player.next_rect.y)
         return unless collision
         if collision.neighbors.b == :none && player.jumped_down_at.elapsed_time < 10
    @@ -143,7 +143,7 @@ class Game
     
       def calc_above
         return unless player.dy > 0
    -    tiles_above = find_tiles { |t| t.rect.y >= player.y }
    +    tiles_above = find_tiles { |t| t.rect.y >= player.prev_rect.y }
         collision = find_colliding_tile tiles_above, (player.rect.merge y: player.next_rect.y)
         return unless collision
         return if collision.neighbors.t == :none
    diff --git a/samples/04_physics_and_collisions/08_bouncing_on_collision/app/block.rb b/samples/04_physics_and_collisions/08_bouncing_on_collision/app/block.rb
    index fa2f3a5..ca0cb3a 100644
    --- a/samples/04_physics_and_collisions/08_bouncing_on_collision/app/block.rb
    +++ b/samples/04_physics_and_collisions/08_bouncing_on_collision/app/block.rb
    @@ -1,22 +1,24 @@
    -class Block 
    +DEGREES_TO_RADIANS = Math::PI / 180
    +
    +class Block
       def initialize(x, y, block_size, rotation)
         @x = x
    -    @y = y 
    +    @y = y
         @block_size = block_size
         @rotation = rotation
     
         #The repel velocity?
    -    @velocity = {x: 2, y: 0}        
    +    @velocity = {x: 2, y: 0}
     
    -    horizontal_offset = (3 * block_size) * Math.cos(rotation.to_radians)
    -    vertical_offset = block_size * Math.sin(rotation.to_radians)
    +    horizontal_offset = (3 * block_size) * Math.cos(rotation * DEGREES_TO_RADIANS)
    +    vertical_offset = block_size * Math.sin(rotation * DEGREES_TO_RADIANS)
     
         if rotation >= 0
           theta = 90 - rotation
           #The line doesn't visually line up exactly with the edge of the sprite, so artificially move it a bit
           modifier = 5
    -      x_offset = modifier * Math.cos(theta.to_radians)
    -      y_offset = modifier * Math.sin(theta.to_radians)
    +      x_offset = modifier * Math.cos(theta * DEGREES_TO_RADIANS)
    +      y_offset = modifier * Math.sin(theta * DEGREES_TO_RADIANS)
           @x1 = @x - x_offset
           @y1 = @y + y_offset
           @x2 = @x1 + horizontal_offset
    @@ -25,8 +27,8 @@ class Block
           @imaginary_line = [ @x1, @y1, @x2, @y2 ]
         else
           theta = 90 + rotation
    -      x_offset = @block_size * Math.cos(theta.to_radians)
    -      y_offset = @block_size * Math.sin(theta.to_radians)
    +      x_offset = @block_size * Math.cos(theta * DEGREES_TO_RADIANS)
    +      y_offset = @block_size * Math.sin(theta * DEGREES_TO_RADIANS)
           @x1 = @x + x_offset
           @y1 = @y + y_offset + 19
           @x2 = @x1 + horizontal_offset
    @@ -34,7 +36,7 @@ class Block
     
           @imaginary_line = [ @x1, @y1, @x2, @y2 ]
         end
    -    
    +
       end
     
       def draw args
    @@ -78,7 +80,7 @@ class Block
     
         collision = false
         if @rotation >= 0
    -      if (current_area < min_area && 
    +      if (current_area < min_area &&
             current_area > 0 &&
             args.state.ball.center.y > @y1 &&
             args.state.ball.center.x < @x2)
    @@ -86,7 +88,7 @@ class Block
             collision = true
           end
         else
    -      if (current_area < min_area && 
    +      if (current_area < min_area &&
             current_area > 0 &&
             args.state.ball.center.y > @y2 &&
             args.state.ball.center.x > @x1)
    @@ -94,7 +96,7 @@ class Block
           collision = true
           end
         end
    -    
    +
         return collision
       end
     
    @@ -103,8 +105,8 @@ class Block
         slope = (@y2 - @y1) / (@x2 - @x1)
     
         #Create a unit vector and tilt it (@rotation) number of degrees
    -    x = -Math.cos(@rotation.to_radians)
    -    y = Math.sin(@rotation.to_radians)
    +    x = -Math.cos(@rotation * DEGREES_TO_RADIANS)
    +    y = Math.sin(@rotation * DEGREES_TO_RADIANS)
     
         #Find the vector that is perpendicular to the slope
         perpVect = { x: x, y: y }
    @@ -115,10 +117,10 @@ class Block
           x:args.state.ball.center.x-args.state.ball.velocity.x,
           y:args.state.ball.center.y-args.state.ball.velocity.y
         }
    -    
    +
         velocityMag = (args.state.ball.velocity.x**2 + args.state.ball.velocity.y**2)**0.5 # the current velocity magnitude of the ball
         theta_ball = Math.atan2(args.state.ball.velocity.y, args.state.ball.velocity.x)         #the angle of the ball's velocity
    -    theta_repel = (180.to_radians) - theta_ball + (@rotation.to_radians)
    +    theta_repel = (180 * DEGREES_TO_RADIANS) - theta_ball + (@rotation * DEGREES_TO_RADIANS)
     
         fbx = velocityMag * Math.cos(theta_ball)                                    #the x component of the ball's velocity
         fby = velocityMag * Math.sin(theta_ball)                                    #the y component of the ball's velocity
    @@ -137,16 +139,16 @@ class Block
     
         dampener = 0.3
         ynew *= dampener * 0.5
    -    
    +
         #If the bounce is very low, that means the ball is rolling and we don't want to dampenen the X velocity
         if ynew > -0.1
           xnew *= dampener
         end
     
         #Add the sine component of gravity back in (X component)
    -    gravity_x = 4 * Math.sin(@rotation.to_radians)
    +    gravity_x = 4 * Math.sin(@rotation * DEGREES_TO_RADIANS)
         xnew += gravity_x
    -  
    +
         args.state.ball.velocity.x = -xnew
         args.state.ball.velocity.y = -ynew
     
    diff --git a/samples/07_advanced_rendering/11_render_target_noclear/app/main.rb b/samples/07_advanced_rendering/11_render_target_noclear/app/main.rb
    new file mode 100644
    index 0000000..9e5dffd
    --- /dev/null
    +++ b/samples/07_advanced_rendering/11_render_target_noclear/app/main.rb
    @@ -0,0 +1,47 @@
    +def tick args
    +  args.state.x ||= 500
    +  args.state.y ||= 350
    +  args.state.xinc ||= 7
    +  args.state.yinc ||= 7
    +  args.state.bgcolor ||= 1
    +  args.state.bginc ||= 1
    +
    +  # clear the render target on the first tick, and then never again. Draw
    +  #  another box to it every tick, accumulating over time.
    +  clear_target = (args.state.tick_count == 0) || (args.inputs.keyboard.key_down.space)
    +  args.render_target(:accumulation).background_color = [ 0, 0, 0, 0 ];
    +  args.render_target(:accumulation).clear_before_render = clear_target
    +  args.render_target(:accumulation).solids << [args.state.x, args.state.y, 25, 25, 255, 0, 0, 255];
    +  args.state.x += args.state.xinc
    +  args.state.y += args.state.yinc
    +  args.state.bgcolor += args.state.bginc
    +
    +  # animation upkeep...change where we draw the next box and what color the
    +  #  window background will be.
    +  if args.state.xinc > 0 && args.state.x >= 1280
    +    args.state.xinc = -7
    +  elsif args.state.xinc < 0 && args.state.x < 0
    +    args.state.xinc = 7
    +  end
    +
    +  if args.state.yinc > 0 && args.state.y >= 720
    +    args.state.yinc = -7
    +  elsif args.state.yinc < 0 && args.state.y < 0
    +    args.state.yinc = 7
    +  end
    +
    +  if args.state.bginc > 0 && args.state.bgcolor >= 255
    +    args.state.bginc = -1
    +  elsif args.state.bginc < 0 && args.state.bgcolor <= 0
    +    args.state.bginc = 1
    +  end
    +
    +  # clear the screen to a shade of blue and draw the render target, which
    +  #  is not clearing every frame, on top of it. Note that you can NOT opt to
    +  #  skip clearing the screen, only render targets. The screen clears every
    +  #  frame; double-buffering would prevent correct updates between frames.
    +  args.outputs.background_color = [ 0, 0, args.state.bgcolor, 255 ]
    +  args.outputs.sprites << [ 0, 0, 1280, 720, :accumulation ]
    +end
    +
    +$gtk.reset
    diff --git a/samples/07_advanced_rendering/11_render_target_noclear/metadata/game_metadata.txt b/samples/07_advanced_rendering/11_render_target_noclear/metadata/game_metadata.txt
    new file mode 100644
    index 0000000..3d0bd06
    --- /dev/null
    +++ b/samples/07_advanced_rendering/11_render_target_noclear/metadata/game_metadata.txt
    @@ -0,0 +1,5 @@
    +devid=dragonruby
    +devtitle=DragonRuby LLC
    +gameid=render_target_noclear
    +gametitle=Render targets that don't clear every frame.
    +version=1.0
    diff --git a/samples/10_advanced_debugging/03_unit_tests/serialize_deserialize_tests.rb b/samples/10_advanced_debugging/03_unit_tests/serialize_deserialize_tests.rb
    index 8505bdf..12c08f6 100644
    --- a/samples/10_advanced_debugging/03_unit_tests/serialize_deserialize_tests.rb
    +++ b/samples/10_advanced_debugging/03_unit_tests/serialize_deserialize_tests.rb
    @@ -2,12 +2,12 @@ def test_serialize args, assert
       GTK::Entity.__reset_id__!
       args.state.player_one = "test"
       result = args.gtk.serialize_state args.state
    -  assert.equal! result, "{:entity_id=>3, :entity_keys_by_ref=>{}, :tick_count=>-1, :player_one=>\"test\"}"
    +  assert.equal! result, "{:entity_id=>4, :entity_keys_by_ref=>{}, :tick_count=>-1, :player_one=>\"test\"}"
     
       GTK::Entity.__reset_id__!
       args.gtk.write_file 'state.txt', ''
       result = args.gtk.serialize_state 'state.txt', args.state
    -  assert.equal! result, "{:entity_id=>3, :entity_keys_by_ref=>{}, :tick_count=>-1, :player_one=>\"test\"}"
    +  assert.equal! result, "{:entity_id=>4, :entity_keys_by_ref=>{}, :tick_count=>-1, :player_one=>\"test\"}"
     end
     
     def test_deserialize args, assert
    @@ -56,7 +56,7 @@ def test_strict_entity_serialization_with_nil args, assert
       args.state.player_two = args.state.new_entity_strict(:player_strict, name: "Ken", blood_type: nil)
     
       serialized_state = args.gtk.serialize_state args.state
    -  assert.equal! serialized_state, '{:entity_id=>9, :entity_keys_by_ref=>{}, :tick_count=>-1, :player_one=>{:entity_id=>1, :entity_name=>:player, :entity_keys_by_ref=>{}, :entity_type=>:player, :created_at=>-1, :global_created_at=>-1, :name=>"Ryu"}, :player_two=>{:entity_id=>2, :entity_name=>:player_strict, :entity_type=>:player_strict, :created_at=>-1, :global_created_at_elapsed=>-1, :entity_strict=>true, :entity_keys_by_ref=>{:entity_type=>:entity_name, :global_created_at_elapsed=>:created_at}, :name=>"Ken", :blood_type=>nil}}'
    +  assert.equal! serialized_state, '{:entity_id=>7, :entity_keys_by_ref=>{}, :tick_count=>-1, :player_one=>{:entity_id=>1, :entity_name=>:player, :entity_keys_by_ref=>{}, :entity_type=>:player, :created_at=>-1, :global_created_at=>-1, :name=>"Ryu"}, :player_two=>{:entity_id=>2, :entity_name=>:player_strict, :entity_type=>:player_strict, :created_at=>-1, :global_created_at_elapsed=>-1, :entity_strict=>true, :entity_keys_by_ref=>{:entity_type=>:entity_name, :global_created_at_elapsed=>:created_at}, :name=>"Ken", :blood_type=>nil}}'
     
       GTK::Entity.__reset_id__!
       deserialized_state = args.gtk.deserialize_state serialized_state
    @@ -113,3 +113,15 @@ def test_by_reference_state_strict_entities args, assert
       deserialized_state = args.gtk.deserialize_state serialized_state
       assert.equal! deserialized_state.strict_entity.one, deserialized_state.strict_entity.two
     end
    +
    +def test_serialization_excludes_thrash_count args, assert
    +  GTK::Entity.__reset_id__!
    +  args.state.player.name = "Ryu"
    +  # force a nil pun
    +  if args.state.player.age > 30
    +  end
    +  assert.equal! args.state.player.as_hash[:__thrash_count__][:>], 1
    +  result = args.gtk.serialize_state args.state
    +  assert.false! (result.include? "__thrash_count__"),
    +                "The __thrash_count__ key exists in state when it shouldn't have."
    +end
    diff --git a/samples/12_c_extensions/README.md b/samples/12_c_extensions/README.md
    index 8950e53..aef3864 100644
    --- a/samples/12_c_extensions/README.md
    +++ b/samples/12_c_extensions/README.md
    @@ -350,6 +350,34 @@ dragonruby-bind --ffi-module=CoolStuff bridge.c
     
     Then one can use `include FFI::CoolStuff` instead.
     
    +### Type checks
    +
    +C extensions expect the right types in the right place!
    +
    +Given the following C code:
    +
    +```c
    +void take_int(int x) { ... }
    +void take_struct(struct S) { ... }
    +```
    +
    +the next calls from the Ruby side
    +
    +```ruby
    +take_int(15.0)
    +take_struct(42)
    +```
    +
    +may not work as you would expect.
    +In the case of `take_int`, you'll likely see some garbage instead of "expected" `15`.
    +The call to `take_struct` will likely crash.
    +
    +To prevent this from happening, `dragonruby-bind` emits code that does type checking:
    +if you use the wrong types DragonRuby will throw an exception.
    +
    +If the type checking takes CPU cycles out of your game (or if you feel brave) you can
    +disable type checks via `--no-typecheck` CLI argument when emitting C bindings.
    +
     ### Pitfalls
     
     There is no so-called marshalling when it comes to structs. When you read or
    diff --git a/samples/99_genre_teenytiny/app/main.rb b/samples/99_genre_teenytiny/app/main.rb
    new file mode 100644
    index 0000000..a542a93
    --- /dev/null
    +++ b/samples/99_genre_teenytiny/app/main.rb
    @@ -0,0 +1,162 @@
    +# full documenation is at http://docs.dragonruby.org
    +# be sure to come to the discord if you hit any snags: http://discord.dragonruby.org
    +def tick args
    +  # ====================================================
    +  # initialize default variables
    +  # ====================================================
    +
    +  # ruby has an operator called ||= which means "only initialize this if it's nil"
    +  args.state.count_down   ||= 20 * 60 # set the count down to 20 seconds
    +  # set the initial position of the target
    +  args.state.target       ||= { x: args.grid.w.half,
    +                                y: args.grid.h.half,
    +                                w: 20,
    +                                h: 20 }
    +
    +  # set the initial position of the player
    +  args.state.player       ||= { x: 50,
    +                                y: 50,
    +                                w: 20,
    +                                h: 20 }
    +
    +  # set the player movement speed
    +  args.state.player_speed ||= 5
    +
    +  # set the score
    +  args.state.score        ||= 0
    +  args.state.teleports    ||= 3
    +
    +  # set the instructions
    +  args.state.instructions ||= "Get to the red goal! Use arrow keys to move. Spacebar to teleport (use them carefully)!"
    +
    +  # ====================================================
    +  # render the game
    +  # ====================================================
    +  args.outputs.labels  << { x: args.grid.w.half, y: args.grid.h - 10,
    +                            text: args.state.instructions,
    +                            alignment_enum: 1 }
    +
    +  # check if it's game over. if so, then render game over
    +  # otherwise render the current time left
    +  if game_over? args
    +    args.outputs.labels  << { x: args.grid.w.half,
    +                              y: args.grid.h - 40,
    +                              text: "game over! (press r to start over)",
    +                              alignment_enum: 1 }
    +  else
    +    args.outputs.labels  << { x: args.grid.w.half,
    +                              y: args.grid.h - 40,
    +                              text: "time left: #{(args.state.count_down.idiv 60) + 1}",
    +                              alignment_enum: 1 }
    +  end
    +
    +  # render the score
    +  args.outputs.labels  << { x: args.grid.w.half,
    +                            y: args.grid.h - 70,
    +                            text: "score: #{args.state.score}",
    +                            alignment_enum: 1 }
    +
    +  # render the player with teleport count
    +  args.outputs.sprites << { x: args.state.player.x,
    +                            y: args.state.player.y,
    +                            w: args.state.player.w,
    +                            h: args.state.player.h,
    +                            path: 'sprites/square-green.png' }
    +
    +  args.outputs.labels << { x: args.state.player.x + 10,
    +                           y: args.state.player.y + 40,
    +                           text: "teleports: #{args.state.teleports}",
    +                           alignment_enum: 1, size_enum: -2 }
    +
    +  # render the target
    +  args.outputs.sprites << { x: args.state.target.x,
    +                            y: args.state.target.y,
    +                            w: args.state.target.w,
    +                            h: args.state.target.h,
    +                            path: 'sprites/square-red.png' }
    +
    +  # ====================================================
    +  # run simulation
    +  # ====================================================
    +
    +  # count down calculation
    +  args.state.count_down -= 1
    +  args.state.count_down = -1 if args.state.count_down < -1
    +
    +  # ====================================================
    +  # process player input
    +  # ====================================================
    +  # if it isn't game over let them move
    +  if !game_over? args
    +    dir_y = 0
    +    dir_x = 0
    +
    +    # determine the change horizontally
    +    if args.inputs.keyboard.up
    +      dir_y += args.state.player_speed
    +    elsif args.inputs.keyboard.down
    +      dir_y -= args.state.player_speed
    +    end
    +
    +    # determine the change vertically
    +    if args.inputs.keyboard.left
    +      dir_x -= args.state.player_speed
    +    elsif args.inputs.keyboard.right
    +      dir_x += args.state.player_speed
    +    end
    +
    +    # determine if teleport can be used
    +    if args.inputs.keyboard.key_down.space && args.state.teleports > 0
    +      args.state.teleports -= 1
    +      dir_x *= 20
    +      dir_y *= 20
    +    end
    +
    +    # apply change to player
    +    args.state.player.x += dir_x
    +    args.state.player.y += dir_y
    +  else
    +    # if r is pressed, reset the game
    +    if args.inputs.keyboard.key_down.r
    +      $gtk.reset
    +      return
    +    end
    +  end
    +
    +  # ====================================================
    +  # determine score
    +  # ====================================================
    +
    +  # calculate new score if the player is at goal
    +  if !game_over? args
    +
    +    # if the player is at the goal, then move the goal
    +    if args.state.player.intersect_rect? args.state.target
    +      # increment the goal
    +      args.state.score += 1
    +
    +      # move the goal to a random location
    +      args.state.target = { x: (rand args.grid.w), y: (rand args.grid.h), w: 20, h: 20 }
    +
    +      # make sure the goal is inside the view area
    +      if args.state.target.x < 0
    +        args.state.target.x += 20
    +      elsif args.state.target.x > 1280
    +        args.state.target.x -= 20
    +      end
    +
    +      # make sure the goal is inside the view area
    +      if args.state.target.y < 0
    +        args.state.target.y += 20
    +      elsif args.state.target.y > 720
    +        args.state.target.y -= 20
    +      end
    +    end
    +  end
    +end
    +
    +def game_over? args
    +  args.state.count_down < 0
    +end
    +
    +$gtk.reset
    diff --git a/samples/99_genre_teenytiny/license.txt b/samples/99_genre_teenytiny/license.txt
    new file mode 100644
    index 0000000..100dcec
    --- /dev/null
    +++ b/samples/99_genre_teenytiny/license.txt
    @@ -0,0 +1,9 @@
    +Copyright 2019 DragonRuby LLC
    +
    +MIT License
    +
    +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
    +
    +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
    +
    +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
    diff --git a/samples/99_genre_teenytiny/metadata/game_metadata.txt b/samples/99_genre_teenytiny/metadata/game_metadata.txt
    new file mode 100644
    index 0000000..1b03500
    --- /dev/null
    +++ b/samples/99_genre_teenytiny/metadata/game_metadata.txt
    @@ -0,0 +1,6 @@
    +#devid=myname
    +#devtitle=My Name
    +#gameid=mygame
    +#gametitle=My Game
    +#version=0.1
    +#icon=metadata/icon.png
    diff --git a/samples/99_genre_teenytiny/metadata/icon.png b/samples/99_genre_teenytiny/metadata/icon.png
    new file mode 100644
    index 0000000..e20e8c2
    Binary files /dev/null and b/samples/99_genre_teenytiny/metadata/icon.png differ
    diff --git a/samples/99_genre_teenytiny/sprites/square-green.png b/samples/99_genre_teenytiny/sprites/square-green.png
    new file mode 100644
    index 0000000..5ef7f75
    Binary files /dev/null and b/samples/99_genre_teenytiny/sprites/square-green.png differ
    diff --git a/samples/99_genre_teenytiny/sprites/square-red.png b/samples/99_genre_teenytiny/sprites/square-red.png
    new file mode 100644
    index 0000000..3ed5f13
    Binary files /dev/null and b/samples/99_genre_teenytiny/sprites/square-red.png differ
    -- 
    cgit v1.2.3
    
    
    From 15b361f6a93763f96bd3363c23a5dd4db8160cb2 Mon Sep 17 00:00:00 2001
    From: Owen Butler 
    Date: Sun, 19 Sep 2021 21:57:27 +1000
    Subject: docs: Update sprite class example with attr_sprite
    
    ---
     docs/todo/05-sprites.md | 20 ++++----------------
     1 file changed, 4 insertions(+), 16 deletions(-)
    
    diff --git a/docs/todo/05-sprites.md b/docs/todo/05-sprites.md
    index e8030ab..e2be250 100644
    --- a/docs/todo/05-sprites.md
    +++ b/docs/todo/05-sprites.md
    @@ -179,26 +179,14 @@ args.outputs.sprites << {
     
     ## Duck Typing (Advanced)
     
    -You can also create a class with sprite properties and render it as a primitive.
    -ALL properties must on the class. ADDITIONALLY, a method called `primitive_marker`
    -must be defined on the class.
    +You can also create a class with sprite properties and render it as a primitive,
    +using the `attr_sprite` helper.
     
     Here is an example:
     
     ```ruby
    -# Create type with ALL sprite properties AND primitive_marker
    -class Sprite
    -  attr_accessor :x, :y, :w, :h, :path, :angle, :a, :r, :g, :b, :source_x,
    -                :source_y, :source_w, :source_h, :flip_horizontally,
    -                :flip_vertically, :angle_anchor_x, :angle_anchor_y
    -
    -  def primitive_marker
    -    :sprite
    -  end
    -end
    -
    -# Inherit from type
    -class PlayerSprite < Sprite
    +class PlayerSprite
    +  attr_sprite
     
       # constructor
       def initialize x, y, w, h
    -- 
    cgit v1.2.3
    
    
    From 146b36b4b132658f7692998f5a72e9a1930a29a9 Mon Sep 17 00:00:00 2001
    From: Owen Butler 
    Date: Sun, 19 Sep 2021 22:34:40 +1000
    Subject: docs: Update further sprite example
    
    ---
     dragon/outputs_docs.rb | 14 ++++----------
     1 file changed, 4 insertions(+), 10 deletions(-)
    
    diff --git a/dragon/outputs_docs.rb b/dragon/outputs_docs.rb
    index db15989..a2b4fb8 100644
    --- a/dragon/outputs_docs.rb
    +++ b/dragon/outputs_docs.rb
    @@ -208,25 +208,19 @@ be provided in any order.
     
     ** Rendering a solid using a Class
     
    -You can also create a class with solid/border properties and render it as a primitive.
    -ALL properties must be on the class. *Additionally*, a method called ~primitive_marker~
    -must be defined on the class.
    +You can also create a class with sprite properties and render it as a primitive.
     
     Here is an example:
     
     #+begin_src
    -  # Create type with ALL sprite properties AND primitive_marker
    +  # Create type with ALL sprite properties
       class Sprite
    -    attr_accessor :x, :y, :w, :h, :path, :angle, :angle_anchor_x, :angle_anchor_y,  :tile_x, :tile_y, :tile_w, :tile_h, :source_x, :source_y, :source_w, :source_h, :flip_horizontally, :flip_vertically, :a, :r, :g, :b
    -
    -    def primitive_marker
    -      :sprite
    -    end
    +    attr_sprite
       end
     
       # Inherit from type
       class Circle < Sprite
    -  # constructor
    +    # constructor
         def initialize x, y, size, path
           self.x = x
           self.y = y
    -- 
    cgit v1.2.3
    
    
    From 789dd8471d32f8cac7e26bb6c2beecf33b6a24c6 Mon Sep 17 00:00:00 2001
    From: Owen Butler 
    Date: Sun, 19 Sep 2021 22:36:42 +1000
    Subject: Update doc header from solid to sprite
    
    ---
     dragon/outputs_docs.rb | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/dragon/outputs_docs.rb b/dragon/outputs_docs.rb
    index a2b4fb8..776d850 100644
    --- a/dragon/outputs_docs.rb
    +++ b/dragon/outputs_docs.rb
    @@ -206,7 +206,7 @@ be provided in any order.
       end
     #+end_src
     
    -** Rendering a solid using a Class
    +** Rendering a sprite using a Class
     
     You can also create a class with sprite properties and render it as a primitive.
     
    -- 
    cgit v1.2.3
    
    
    From e4dc7720454d70827f053c0ea47ba864ac176d34 Mon Sep 17 00:00:00 2001
    From: arjun 
    Date: Sat, 19 Jun 2021 15:49:47 +0530
    Subject: [samples/mouse docs] fixed typo, method invocation
    
    ---
     samples/05_mouse/04_coordinate_systems/app/main.rb | 4 ++--
     1 file changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/samples/05_mouse/04_coordinate_systems/app/main.rb b/samples/05_mouse/04_coordinate_systems/app/main.rb
    index fcfa090..cbf3329 100644
    --- a/samples/05_mouse/04_coordinate_systems/app/main.rb
    +++ b/samples/05_mouse/04_coordinate_systems/app/main.rb
    @@ -2,7 +2,7 @@
     
      APIs listing that haven't been encountered in previous sample apps:
     
    - - args.inputs.mouse.click.position: Coordinates of the mouse's position on the screen.
    + - args.inputs.mouse.position: Coordinates of the mouse's position on the screen.
        Unlike args.inputs.mouse.click.point, the mouse does not need to be pressed down for
        position to know the mouse's coordinates.
        For more information about the mouse, go to mygame/documentation/07-mouse.md.
    @@ -43,7 +43,7 @@ def tick args
       # ensure that the outputs don't overlap each other. Try removing them and see what happens.
       pos = args.inputs.mouse.position # stores coordinates of mouse's position
       args.outputs.labels << [pos.x + 10, pos.y + 10, "#{pos}"] # outputs label of coordinates
    -  args.outputs.solids << [pos.x -  2, pos.y - 2, 5, 5] # outputs small blackk box placed where mouse is hovering
    +  args.outputs.solids << [pos.x -  2, pos.y - 2, 5, 5] # outputs small black box placed where mouse is hovering
     
       button = [0, 0, 370, 50] # sets definition of toggle button
       args.outputs.borders << button # outputs button as border (not filled in)
    -- 
    cgit v1.2.3
    
    
    From 33dfdde9ae03e3218b4796f3595d3b727f626587 Mon Sep 17 00:00:00 2001
    From: Amir Rajan 
    Date: Thu, 9 Dec 2021 23:40:11 -0600
    Subject: added api.rb to repo
    
    ---
     dragon/api.rb | 634 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
     1 file changed, 634 insertions(+)
     create mode 100644 dragon/api.rb
    
    diff --git a/dragon/api.rb b/dragon/api.rb
    new file mode 100644
    index 0000000..8ac1bae
    --- /dev/null
    +++ b/dragon/api.rb
    @@ -0,0 +1,634 @@
    +# coding: utf-8
    +# Copyright 2019 DragonRuby LLC
    +# MIT License
    +# api.rb has been released under MIT (*only this file*).
    +
    +module GTK
    +  class Api
    +    def initialize
    +    end
    +
    +    def get_api_autocomplete args, req
    +      html = <<-S
    +
    +  
    +    
    +    DragonRuby Game Toolkit Documentation
    +    
    +  
    +  
    +      
    +      
    +
    index
    + +
    code
    + +
    + + +
    +
    +      
    + + #{links} + + +S + + req.respond 200, + html, + { 'Content-Type' => 'text/html' } + end + + def post_api_autocomplete args, req + json = ($gtk.parse_json req.body) + index = json["index"].to_i + text = json["text"] + suggestions = args.gtk.suggest_autocompletion index: index, text: text + list_as_string = suggestions.join("\n") + req.respond 200, list_as_string, { 'Content-Type' => 'text/plain' } + end + + define_method :links do + <<-S + +S + end + + def get_index args, req + req.respond 200, <<-S, { 'Content-Type' => 'text/html' } + + + + DragonRuby Game Toolkit Documentation + + + #{links} + + +S + end + + def source_code_links args + links = args.gtk.reload_list_history.keys.map do |f| + "
  • #{f}
  • " + end + <<-S +
      + #{links.join("\n")} +
    +S + end + + def get_api_code args, req + view = <<-S + + + + DragonRuby Game Toolkit Documentation + + + #{source_code_links args} + + #{links} + + +S + req.respond 200, + view, + { 'Content-Type' => 'text/html' } + end + + def code_edit_view args, file + view = <<-S + + + + DragonRuby Game Toolkit Documentation + + + +
    +
    #{file}:
    + +
    + + +
    + #{source_code_links args} + + #{links} + + +S + end + + def get_api_code_edit args, req + file = req.uri.split('?').last.gsub("file=", "") + view = code_edit_view args, file + req.respond 200, + view, + { 'Content-Type' => 'text/html' } + end + + def post_api_code_update args, req + file = req.uri.split('?').last.gsub("file=", "") + code = ($gtk.parse_json req.body)["code"] + args.gtk.write_file file, code + view = code_edit_view args, file + req.respond 200, + view, + { 'Content-Type' => 'text/html' } + end + + def get_api_boot args, req + req.respond 200, + args.gtk.read_file("tmp/src_backup/boot.txt"), + { 'Content-Type' => 'text/plain' } + end + + def get_api_trace args, req + req.respond 200, + args.gtk.read_file("logs/trace.txt"), + { 'Content-Type' => 'text/plain' } + end + + def get_api_log args, req + req.respond 200, + args.gtk.read_file("logs/log.txt"), + { 'Content-Type' => 'text/plain' } + end + + def post_api_log args, req + Log.log req.body + + req.respond 200, + "ok", + { 'Content-Type' => 'text/plain' } + end + + def get_api_puts args, req + req.respond 200, + args.gtk.read_file("logs/puts.txt"), + { 'Content-Type' => 'text/plain' } + end + + def get_api_changes args, req + req.respond 200, + args.gtk.read_file("tmp/src_backup/src_backup_changes.txt"), + { 'Content-Type' => 'text/plain' } + end + + def get_favicon_ico args, req + @favicon ||= args.gtk.read_file('docs/favicon.ico') + req.respond 200, @favicon, { "Content-Type" => 'image/x-icon' } + end + + def get_src_backup args, req + file_name = req.uri.gsub("/dragon/", "") + req.respond 200, + args.gtk.read_file("tmp/src_backup/#{file_name}"), + { 'Content-Type' => 'text/plain' } + end + + def get_not_found args, req + puts("METHOD: #{req.method}"); + puts("URI: #{req.uri}"); + puts("HEADERS:"); + req.headers.each { |k,v| puts(" #{k}: #{v}") } + req.respond 404, "not found: #{req.uri}", { } + end + + def get_docs_html args, req + req.respond 200, + args.gtk.read_file("docs/docs.html"), + { 'Content-Type' => 'text/html' } + end + + def get_docs_css args, req + req.respond 200, + args.gtk.read_file("docs/docs.css"), + { 'Content-Type' => 'text/css' } + end + + def get_docs_search_gif args, req + req.respond 200, + args.gtk.read_file("docs/docs_search.gif"), + { 'Content-Type' => 'image/gif' } + end + + def get_src_backup_index_html args, req + req.respond 200, + args.gtk.read_file("/tmp/src_backup/src_backup_index.html"), + { 'Content-Type' => 'text/html' } + end + + def get_src_backup_index_txt args, req + req.respond 200, + args.gtk.read_file("/tmp/src_backup/src_backup_index.txt"), + { 'Content-Type' => 'text/txt' } + end + + def get_src_backup_css args, req + req.respond 200, + args.gtk.read_file("/tmp/src_backup/src_backup.css"), + { 'Content-Type' => 'text/css' } + end + + def get_src_backup_changes_html args, req + req.respond 200, + args.gtk.read_file("/tmp/src_backup/src_backup_changes.html"), + { 'Content-Type' => 'text/html' } + end + + def get_src_backup_changes_txt args, req + req.respond 200, + args.gtk.read_file("/tmp/src_backup/src_backup_changes.txt"), + { 'Content-Type' => 'text/txt' } + end + + def get_api_eval args, req + eval_view = <<-S + + Eval + + + +
    + +
    + +
    +
    curl -H "Content-Type: application/json" --data '{ "code": "$result = $args.state" }' -X POST http://localhost:9001/dragon/eval/
    +
    Eval Result:
    +
    
    +    #{links}
    +  
    +
    +S
    +      req.respond 200,
    +                  eval_view,
    +                  { 'Content-Type' => 'text/html' }
    +    end
    +
    +    def post_api_eval args, req
    +      if json? req
    +        code = ($gtk.parse_json req.body)["code"]
    +        code = code.gsub("$result", "$eval_result")
    +        Object.new.instance_eval do
    +          begin
    +            Kernel.eval code
    +          rescue Exception => e
    +            $eval_result = e
    +          end
    +        end
    +      end
    +
    +      req.respond 200,
    +                  "#{$eval_result || $eval_results || "nil"}",
    +                  { 'Content-Type' => 'text/plain' }
    +
    +      $eval_result  = nil
    +      $eval_results = nil
    +    end
    +
    +    def api_css_string
    +
    +    end
    +
    +    def get_api_console args, req
    +      html = console_view "# write your code here and set $result.\n$result = $gtk.args.state"
    +      req.respond 200,
    +                  html,
    +                  { 'Content-Type' => 'text/html' }
    +    end
    +
    +    def control_panel_view
    +      <<-S
    +
    +  console
    +  
    +    
    +    
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + #{links} + + +S + end + + def get_api_control_panel args, req + req.respond 200, + control_panel_view, + { 'Content-Type' => 'text/html' } + end + + def json? req + req.headers.find { |k, v| k == "Content-Type" && (v.include? "application/json") } + end + + def post_api_reset args, req + $gtk.reset if json? req + req.respond 200, + control_panel_view, + { 'Content-Type' => 'text/html' } + end + + def post_api_record args, req + $recording.start 100 if json? req + req.respond 200, + control_panel_view, + { 'Content-Type' => 'text/html' } + end + + def post_api_record_stop args, req + $recording.stop 'replay.txt' if json? req + req.respond 200, + control_panel_view, + { 'Content-Type' => 'text/html' } + end + + def post_api_replay args, req + $replay.start 'replay.txt' if json? req + req.respond 200, + control_panel_view, + { 'Content-Type' => 'text/html' } + end + + def post_api_show_console args, req + $gtk.console.show if json? req + req.respond 200, + control_panel_view, + { 'Content-Type' => 'text/html' } + end + + def tick args + args.inputs.http_requests.each do |req| + match_candidate = { method: req.method.downcase.to_sym, + uri: req.uri, + uri_without_query_string: (req.uri.split '?').first, + query_string: (req.uri.split '?').last, + has_query_string: !!(req.uri.split '?').last, + has_api_prefix: (req.uri.start_with? "/dragon"), + end_with_rb: (req.uri.end_with? ".rb"), + has_file_extension: file_extensions.find { |f| req.uri.include? f }, + has_trailing_slash: (req.uri.split('?').first.end_with? "/") } + + if !match_candidate[:has_file_extension] + if !match_candidate[:has_trailing_slash] + match_candidate[:uri] = match_candidate[:uri_without_query_string] + "/" + if match_candidate[:query_string] + match_candidate[:uri] += "?#{match_candidate[:query_string]}" + end + end + end + + context = { args: args, req: req, match_candidate: match_candidate } + + process! context: context, routes: routes + end + end + + def url_decode args, string + args.fn.gsub string, + '+', " ", + '%27', "'", + '%22', '"', + '%0D%0A', "\n", + '%3D', "=", + '%3B', ";", + '%7C', "|", + '%28', "(", + '%29', ")", + '%7B', "{", + '%7D', "}", + '%2C', ",", + '%3A', ":", + '%5B', "[", + '%5D', "]", + '%23', "#", + '%21', "!", + '%3C', "<", + '%3E', ">", + '%2B', "+", + '%2F', "/", + '%40', "@", + '%3F', "?", + '%26', "&", + '%24', "$", + '%5C', "\\", + '%60', "`", + '%7E', "~", + '%C2%B2', "²", + '%5E', "^", + '%C2%BA', "º", + '%C2%A7', "§", + '%20', " ", + '%0A', "\n", + '%25', "%", + '%2A', "*" + end + + def file_extensions + [".html", ".css", ".gif", ".txt", ".ico", ".rb"] + end + + def routes + [{ match_criteria: { method: :get, uri: "/" }, + handler: :get_index }, + { match_criteria: { method: :get, uri: "/dragon/" }, + handler: :get_index }, + + { match_criteria: { method: :get, uri: "/dragon/boot/" }, + handler: :get_api_boot }, + { match_criteria: { method: :get, uri: "/dragon/trace/" }, + handler: :get_api_trace }, + { match_criteria: { method: :get, uri: "/dragon/puts/" }, + handler: :get_api_puts }, + { match_criteria: { method: :get, uri: "/dragon/log/" }, + handler: :get_api_log }, + { match_criteria: { method: :post, uri: "/dragon/log/" }, + handler: :post_api_log }, + { match_criteria: { method: :get, uri: "/dragon/changes/" }, + handler: :get_api_changes }, + { match_criteria: { method: :get, uri: "/dragon/eval/" }, + handler: :get_api_eval }, + { match_criteria: { method: :post, uri: "/dragon/eval/" }, + handler: :post_api_eval }, + { match_criteria: { method: :get, uri: "/dragon/console/" }, + handler: :get_api_console }, + { match_criteria: { method: :post, uri: "/dragon/console/" }, + handler: :post_api_console }, + { match_criteria: { method: :get, uri: "/dragon/control_panel/" }, + handler: :get_api_control_panel }, + { match_criteria: { method: :post, uri: "/dragon/reset/" }, + handler: :post_api_reset }, + { match_criteria: { method: :post, uri: "/dragon/record/" }, + handler: :post_api_record }, + { match_criteria: { method: :post, uri: "/dragon/record_stop/" }, + handler: :post_api_record_stop }, + { match_criteria: { method: :post, uri: "/dragon/replay/" }, + handler: :post_api_replay }, + { match_criteria: { method: :post, uri: "/dragon/show_console/" }, + handler: :post_api_show_console }, + { match_criteria: { method: :get, uri: "/dragon/code/" }, + handler: :get_api_code }, + { match_criteria: { method: :get, uri: "/dragon/autocomplete/" }, + handler: :get_api_autocomplete }, + { match_criteria: { method: :post, uri: "/dragon/autocomplete/" }, + handler: :post_api_autocomplete }, + { match_criteria: { method: :get, uri_without_query_string: "/dragon/code/edit/", has_query_string: true }, + handler: :get_api_code_edit }, + { match_criteria: { method: :post, uri_without_query_string: "/dragon/code/update/", has_query_string: true }, + handler: :post_api_code_update }, + + + { match_criteria: { method: :get, uri: "/docs.html" }, + handler: :get_docs_html }, + { match_criteria: { method: :get, uri_without_query_string: "/docs.css" }, + handler: :get_docs_css }, + { match_criteria: { method: :get, uri: "/docs_search.gif" }, + handler: :get_docs_search_gif }, + + { match_criteria: { method: :get, uri: "/src_backup_index.html" }, + handler: :get_src_backup_index_html }, + + { match_criteria: { method: :get, uri: "/src_backup_index.txt" }, + handler: :get_src_backup_index_txt }, + + { match_criteria: { method: :get, uri: "/src_backup_changes.html" }, + handler: :get_src_backup_changes_html }, + + { match_criteria: { method: :get, uri: "/src_backup_changes.txt" }, + handler: :get_src_backup_changes_txt }, + + { match_criteria: { method: :get, uri: "/src_backup.css" }, + handler: :get_src_backup_css }, + + { match_criteria: { method: :get, uri: "/favicon.ico" }, + handler: :get_favicon_ico }, + + { match_criteria: { method: :get, end_with_rb: true }, + handler: :get_src_backup }, + + { match_criteria: { method: :get, end_with_rb: true }, + handler: :get_src_backup } + + ] + end + + def process! opts + routes = opts[:routes] + context = opts[:context] + routes.each do |route| + match_found = (process_single! route: route, context: context) + return if match_found + end + end + + def process_single! opts + match_criteria = opts[:route][:match_criteria] + m = opts[:route][:handler] + args = opts[:context][:args] + req = opts[:context][:req] + match_candidate = opts[:context][:match_candidate] + match_criteria.each do |k, v| + return false if match_candidate[k] != v + end + + begin + send m, args, req + rescue Exception => e + req.respond 200, + "#{e}\n#{e.__backtrace_to_org__}", + { 'Content-Type' => 'text/plain' } + end + return true + end + end +end -- cgit v1.2.3 From eaa29e72939f5edf61735ccbb73c36ee89369f65 Mon Sep 17 00:00:00 2001 From: Amir Rajan Date: Fri, 10 Dec 2021 00:09:48 -0600 Subject: Synced with DragonRuby Game Toolkit v3.2. --- docs/docs.css | 12 +- docs/docs.html | 2838 +- docs/docs.txt | 3724 +- docs/parse_log.txt | 54535 +++++++++++-------- docs/todo/05-sprites.md | 20 +- dragon/args.rb | 2 + dragon/benchmark.rb | 3 +- dragon/console.rb | 99 +- dragon/docs.rb | 2 +- dragon/draw.rb | 8 +- dragon/easing.rb | 4 +- dragon/framerate.rb | 2 +- dragon/geometry.rb | 34 +- dragon/inputs.rb | 3 +- dragon/ios_wizard.rb | 78 +- dragon/numeric.rb | 104 - dragon/outputs_docs.rb | 16 +- dragon/runtime_docs.rb | 38 +- dragon/tweetcart.rb | 4 +- .../02_input_basics/01_moving_a_sprite/replay.txt | 73 + .../06_box_collision_3/app/main.rb | 12 +- .../07_jump_physics/app/main.rb | 10 +- samples/05_mouse/01_mouse_click/app/main.rb | 16 +- samples/05_mouse/02_mouse_move/app/main.rb | 2 +- samples/05_mouse/04_coordinate_systems/app/main.rb | 4 +- .../07_advanced_audio/01_audio_mixer/app/main.rb | 5 +- .../01_audio_mixer/sounds/drum.mp3 | Bin 0 -> 55090 bytes .../00_labels_with_wrapped_text/app/main.rb | 88 + .../00_labels_with_wrapped_text/replay.txt | 93 + .../00_rotating_label/app/main.rb | 32 + .../08_splitscreen_camera/app/main.rb | 35 +- .../03_sprites_as_struct/app/main.rb | 82 + .../03_sprites_as_struct/license-for-sample.txt | 9 + .../03_sprites_as_struct/sprites/tiny-star.png | Bin 0 -> 112 bytes .../04_sprites_as_strict_entities/app/main.rb | 72 + .../license-for-sample.txt | 9 + .../sprites/tiny-star.png | Bin 0 -> 112 bytes .../05_sprites_as_classes/app/main.rb | 55 + .../05_sprites_as_classes/license-for-sample.txt | 9 + .../05_sprites_as_classes/sprites/tiny-star.png | Bin 0 -> 112 bytes .../06_static_sprites_as_classes/app/main.rb | 56 + .../license-for-sample.txt | 9 + .../sprites/tiny-star.png | Bin 0 -> 112 bytes .../app/main.rb | 88 + .../license-for-sample.txt | 9 + .../sprites/tiny-star.png | Bin 0 -> 112 bytes .../09_performance/08_collision_limits/app/main.rb | 55 + .../08_collision_limits/license-for-sample.txt | 9 + .../10_advanced_debugging/00_logging/app/main.rb | 19 + samples/11_http/01_retrieve_images/app/main.rb | 4 +- .../02_in_game_web_server_http_get/app/main.rb | 28 + .../license-for-sample.txt | 9 + .../03_in_game_web_server_http_post/app/main.rb | 72 + .../03_in_game_web_server_http_post/replay.txt | 415 + samples/12_c_extensions/.gitignore | 2 + .../01_basics/native/ext-bindings.c | 37 +- .../02_intermediate/native/re-bindings.c | 67 +- .../03_native_pixel_arrays/native/ext-bindings.c | 37 +- .../01_breadth_first_search/replay.txt | 203 + .../02_detailed_breadth_first_search/replay.txt | 241 + .../03_breadcrumbs/app/main.rb | 136 +- .../03_breadcrumbs/replay.txt | 365 + .../04_early_exit/app/main.rb | 204 +- .../04_early_exit/replay.txt | 364 + .../05_dijkstra/app/main.rb | 218 +- .../05_dijkstra/replay.txt | 686 + .../06_heuristic/app/main.rb | 2 +- .../06_heuristic/replay.txt | 719 + .../07_heuristic_with_walls/app/main.rb | 2 +- .../07_heuristic_with_walls/replay.txt | 352 + .../08_a_star/app/main.rb | 258 +- .../08_a_star/replay.txt | 434 + samples/99_genre_3d/02_wireframe/replay.txt | 242 + samples/99_genre_3d/03_yaw_pitch_roll/app/main.rb | 351 + samples/99_genre_3d/03_yaw_pitch_roll/replay.txt | 361 + samples/99_genre_arcade/bullet_hell/replay.txt | 126 + samples/99_genre_arcade/flappy_dragon/app/main.rb | 97 +- samples/99_genre_arcade/twinstick/replay.txt | 174 + .../farming_game_starting_point/replay.txt | 170 + samples/99_genre_crafting/replay.txt | 170 + .../99_genre_dungeon_crawl/classics_jam/replay.txt | 197 + samples/99_genre_mario/01_jumping/app/main.rb | 78 + samples/99_genre_mario/01_jumping/replay.txt | 52 + .../01_jumping/sprites/square/red.png | Bin 0 -> 335 bytes .../02_jumping_and_collisions/app/main.rb | 281 + .../02_jumping_and_collisions/replay.txt | 159 + .../sprites/square/red.png | Bin 0 -> 335 bytes .../sprites/square/white.png | Bin 0 -> 325 bytes .../99_genre_platformer/clepto_frog/app/main.rb | 171 +- samples/99_genre_platformer/clepto_frog/app/map.rb | 5 + samples/99_genre_platformer/clepto_frog/replay.txt | 249 + .../the_little_probe/app/main.rb | 10 +- .../the_little_probe/bug-replay.txt | 205 + .../01_roguelike_starting_point/replay.txt | 196 + .../topdown_casino/app/main.rb | 139 + .../topdown_casino/license-for-sample.txt | 9 + .../99_genre_rpg_topdown/topdown_casino/replay.txt | 123 + .../topdown_casino/sprites/fire.png | Bin 0 -> 893 bytes .../topdown_casino/sprites/gem200.png | Bin 0 -> 916 bytes .../topdown_casino/sprites/gem400.png | Bin 0 -> 920 bytes .../topdown_casino/sprites/herodown100.png | Bin 0 -> 3600 bytes .../topdown_casino/sprites/herodown200.png | Bin 0 -> 3600 bytes .../topdown_casino/sprites/heroleft100.png | Bin 0 -> 3600 bytes .../topdown_casino/sprites/heroleft200.png | Bin 0 -> 3600 bytes .../topdown_casino/sprites/heroright100.png | Bin 0 -> 3600 bytes .../topdown_casino/sprites/heroright200.png | Bin 0 -> 3600 bytes .../topdown_casino/sprites/heroup100.png | Bin 0 -> 3600 bytes .../topdown_casino/sprites/heroup200.png | Bin 0 -> 3600 bytes .../topdown_casino/sprites/oldman.png | Bin 0 -> 967 bytes .../teenytiny_starting_point/app/main.rb | 162 + .../teenytiny_starting_point/license.txt | 9 + .../sprites/square-green.png | Bin 0 -> 283 bytes .../sprites/square-red.png | Bin 0 -> 274 bytes 113 files changed, 45537 insertions(+), 25431 deletions(-) create mode 100644 samples/02_input_basics/01_moving_a_sprite/replay.txt create mode 100644 samples/07_advanced_audio/01_audio_mixer/sounds/drum.mp3 create mode 100644 samples/07_advanced_rendering/00_labels_with_wrapped_text/app/main.rb create mode 100644 samples/07_advanced_rendering/00_labels_with_wrapped_text/replay.txt create mode 100644 samples/07_advanced_rendering/00_rotating_label/app/main.rb create mode 100644 samples/09_performance/03_sprites_as_struct/app/main.rb create mode 100644 samples/09_performance/03_sprites_as_struct/license-for-sample.txt create mode 100644 samples/09_performance/03_sprites_as_struct/sprites/tiny-star.png create mode 100644 samples/09_performance/04_sprites_as_strict_entities/app/main.rb create mode 100644 samples/09_performance/04_sprites_as_strict_entities/license-for-sample.txt create mode 100644 samples/09_performance/04_sprites_as_strict_entities/sprites/tiny-star.png create mode 100644 samples/09_performance/05_sprites_as_classes/app/main.rb create mode 100644 samples/09_performance/05_sprites_as_classes/license-for-sample.txt create mode 100644 samples/09_performance/05_sprites_as_classes/sprites/tiny-star.png create mode 100644 samples/09_performance/06_static_sprites_as_classes/app/main.rb create mode 100644 samples/09_performance/06_static_sprites_as_classes/license-for-sample.txt create mode 100644 samples/09_performance/06_static_sprites_as_classes/sprites/tiny-star.png create mode 100644 samples/09_performance/07_static_sprites_as_classes_with_custom_drawing/app/main.rb create mode 100644 samples/09_performance/07_static_sprites_as_classes_with_custom_drawing/license-for-sample.txt create mode 100644 samples/09_performance/07_static_sprites_as_classes_with_custom_drawing/sprites/tiny-star.png create mode 100644 samples/09_performance/08_collision_limits/app/main.rb create mode 100644 samples/09_performance/08_collision_limits/license-for-sample.txt create mode 100644 samples/10_advanced_debugging/00_logging/app/main.rb create mode 100644 samples/11_http/02_in_game_web_server_http_get/app/main.rb create mode 100644 samples/11_http/02_in_game_web_server_http_get/license-for-sample.txt create mode 100644 samples/11_http/03_in_game_web_server_http_post/app/main.rb create mode 100644 samples/11_http/03_in_game_web_server_http_post/replay.txt create mode 100644 samples/12_c_extensions/.gitignore create mode 100644 samples/13_path_finding_algorithms/01_breadth_first_search/replay.txt create mode 100644 samples/13_path_finding_algorithms/02_detailed_breadth_first_search/replay.txt create mode 100644 samples/13_path_finding_algorithms/03_breadcrumbs/replay.txt create mode 100644 samples/13_path_finding_algorithms/04_early_exit/replay.txt create mode 100644 samples/13_path_finding_algorithms/05_dijkstra/replay.txt create mode 100644 samples/13_path_finding_algorithms/06_heuristic/replay.txt create mode 100644 samples/13_path_finding_algorithms/07_heuristic_with_walls/replay.txt create mode 100644 samples/13_path_finding_algorithms/08_a_star/replay.txt create mode 100644 samples/99_genre_3d/02_wireframe/replay.txt create mode 100644 samples/99_genre_3d/03_yaw_pitch_roll/app/main.rb create mode 100644 samples/99_genre_3d/03_yaw_pitch_roll/replay.txt create mode 100644 samples/99_genre_arcade/bullet_hell/replay.txt create mode 100644 samples/99_genre_arcade/twinstick/replay.txt create mode 100644 samples/99_genre_crafting/farming_game_starting_point/replay.txt create mode 100644 samples/99_genre_crafting/replay.txt create mode 100644 samples/99_genre_dungeon_crawl/classics_jam/replay.txt create mode 100644 samples/99_genre_mario/01_jumping/app/main.rb create mode 100644 samples/99_genre_mario/01_jumping/replay.txt create mode 100644 samples/99_genre_mario/01_jumping/sprites/square/red.png create mode 100644 samples/99_genre_mario/02_jumping_and_collisions/app/main.rb create mode 100644 samples/99_genre_mario/02_jumping_and_collisions/replay.txt create mode 100644 samples/99_genre_mario/02_jumping_and_collisions/sprites/square/red.png create mode 100644 samples/99_genre_mario/02_jumping_and_collisions/sprites/square/white.png create mode 100644 samples/99_genre_platformer/clepto_frog/replay.txt create mode 100644 samples/99_genre_platformer/the_little_probe/bug-replay.txt create mode 100644 samples/99_genre_rpg_roguelike/01_roguelike_starting_point/replay.txt create mode 100644 samples/99_genre_rpg_topdown/topdown_casino/app/main.rb create mode 100644 samples/99_genre_rpg_topdown/topdown_casino/license-for-sample.txt create mode 100644 samples/99_genre_rpg_topdown/topdown_casino/replay.txt create mode 100644 samples/99_genre_rpg_topdown/topdown_casino/sprites/fire.png create mode 100644 samples/99_genre_rpg_topdown/topdown_casino/sprites/gem200.png create mode 100644 samples/99_genre_rpg_topdown/topdown_casino/sprites/gem400.png create mode 100644 samples/99_genre_rpg_topdown/topdown_casino/sprites/herodown100.png create mode 100644 samples/99_genre_rpg_topdown/topdown_casino/sprites/herodown200.png create mode 100644 samples/99_genre_rpg_topdown/topdown_casino/sprites/heroleft100.png create mode 100644 samples/99_genre_rpg_topdown/topdown_casino/sprites/heroleft200.png create mode 100644 samples/99_genre_rpg_topdown/topdown_casino/sprites/heroright100.png create mode 100644 samples/99_genre_rpg_topdown/topdown_casino/sprites/heroright200.png create mode 100644 samples/99_genre_rpg_topdown/topdown_casino/sprites/heroup100.png create mode 100644 samples/99_genre_rpg_topdown/topdown_casino/sprites/heroup200.png create mode 100644 samples/99_genre_rpg_topdown/topdown_casino/sprites/oldman.png create mode 100644 samples/99_genre_teenytiny/teenytiny_starting_point/app/main.rb create mode 100644 samples/99_genre_teenytiny/teenytiny_starting_point/license.txt create mode 100644 samples/99_genre_teenytiny/teenytiny_starting_point/sprites/square-green.png create mode 100644 samples/99_genre_teenytiny/teenytiny_starting_point/sprites/square-red.png diff --git a/docs/docs.css b/docs/docs.css index 115fd34..84cd977 100644 --- a/docs/docs.css +++ b/docs/docs.css @@ -127,30 +127,30 @@ blockquote { font-style: italic; } -#toc { +#table-of-contents { font-size: 14px; } -#toc ul { +#table-of-contents ul { margin-left: 3px; padding-left: 15px; } -#toc .header-1 { +#table-of-contents .header-1 { display: inline-block; margin-top: 10px; font-weight: 900; } -#toc .header-2 { +#table-of-contents .header-2 { display: inline-block; padding-left: 5px; padding-right: 5px; margin-top: 10px; } -#toc .header-3 { +#table-of-contents .header-3 { } @media only screen and (min-width: 1280px) { @@ -160,7 +160,7 @@ blockquote { padding-left: 310px; } - #toc { + #table-of-contents { border: solid 1px #f0f0f0; padding: 10px; padding-bottom: 30px; diff --git a/docs/docs.html b/docs/docs.html index 6967368..67cd054 100644 --- a/docs/docs.html +++ b/docs/docs.html @@ -2,10 +2,10 @@ DragonRuby Game Toolkit Documentation - + -
    +

    Table Of Contents

    +

    DragonRuby Game Toolkit Live Docs

    @@ -1765,6 +1766,33 @@ This function takes in two parameters. The first parameter is the file path and end end

    +

    DOCS: GTK::Runtime#benchmark

    +

    +You can use this function to compare the relative performance of methods. +

    +
    def tick args
    +  # press r to run benchmark
    +  if args.inputs.keyboard.key_down.r
    +    args.gtk.console.show
    +    args.gtk.benchmark iterations: 1000, # number of iterations
    +                       # label for experiment
    +                       using_numeric_map: -> () {
    +                         # experiment body
    +                         v = 100.map do |i|
    +                           i * 100
    +                         end
    +                       },
    +                       # label for experiment
    +                       using_numeric_times: -> () {
    +                         # experiment body
    +                         v = []
    +                         100.times do |i|
    +                           v << i * 100
    +                         end
    +                       }
    +  end
    +end
    +

    DOCS: Array

    The Array class has been extend to provide methods that will help in common game development tasks. Array is one of the most powerful classes in Ruby and a very fundamental component of Game Toolkit. @@ -4163,7 +4191,7 @@ Reminder: # Use args.inputs.mouse.click.created_at # To see how many frames its been since the click occurred -# Use args.inputs.mouse.click.creat_at_elapsed +# Use args.inputs.mouse.click.created_at_elapsed # Saving the click in args.state can be quite useful @@ -6776,17 +6804,17 @@ class Game end def calc_player_dx - player.y += player.dy - player.dy += state.gravity - player.dy += player.dy * state.drag ** 2 * -1 - end - - def calc_player_dy player.dx = player.dx.clamp(-5, 5) player.dx *= 0.9 player.x += player.dx end + def calc_player_dy + player.y += player.dy + player.dy += state.gravity + player.dy += player.dy * state.drag ** 2 * -1 + end + def reset_player player.x = 100 player.y = 720 @@ -6928,8 +6956,7 @@ class VerticalPlatformer input end - # Sets default values - def defaults + def init_game s.platforms ||= [ # initializes platforms collection with two platforms using hashes new_platform(x: 0, y: 0, w: 700, h: 32, dx: 1, speed: 0, rect: nil), new_platform(x: 0, y: 300, w: 700, h: 32, dx: 1, speed: 0, rect: nil), # 300 pixels higher @@ -6952,6 +6979,11 @@ class VerticalPlatformer s.camera ||= { y: -100 } # shows view on screen (as the player moves upward, the camera does too) end + # Sets default values + def defaults + init_game + end + # Outputs objects onto the screen def render outputs.solids << s.platforms.map do |p| # outputs platforms onto screen @@ -7039,7 +7071,9 @@ class VerticalPlatformer rect: nil) end else + # game over s.as_hash.clear # otherwise clear the hash (no new platform is necessary) + init_game end end @@ -9698,12 +9732,23 @@ class TicTacToe # Starts the game with player x's turn and creates an array (to_a) for space combinations. # Calls methods necessary for the game to run properly. def tick - state.current_turn ||= :x - state.space_combinations = [-1, 0, 1].product([-1, 0, 1]).to_a + init_new_game render_board input_board end + def init_new_game + state.current_turn ||= :x + state.space_combinations ||= [-1, 0, 1].product([-1, 0, 1]).to_a + + state.spaces ||= {} + + state.space_combinations.each do |x, y| + state.spaces[x] ||= {} + state.spaces[x][y] ||= state.new_entity(:space) + end + end + # Uses borders to create grid squares for the game's board. Also outputs the game pieces using labels. def render_board square_size = 80 @@ -9779,6 +9824,7 @@ class TicTacToe def input_restart_game return unless state.game_over gtk.reset + init_new_game end # Checks if x or o won the game. @@ -10093,7 +10139,7 @@ class ProtectThePuppiesFromTheZombies def calc_kill_zombie # Find all zombies that intersect with the player. They are considered killed. - killed_this_frame = state.zombies.find_all { |z| z.sprite.intersect_rect? state.player_sprite } + killed_this_frame = state.zombies.find_all { |z| z.sprite && (z.sprite.intersect_rect? state.player_sprite) } state.zombies = state.zombies - killed_this_frame # remove newly killed zombies from zombies collection state.killed_zombies += killed_this_frame # add newly killed zombies to killed zombies @@ -10989,6 +11035,7 @@ def render_sources args end def playtime_str t + return "" unless t minutes = (t / 60.0).floor seconds = t - (minutes * 60.0).to_f return minutes.to_s + ':' + seconds.floor.to_s + ((seconds - seconds.floor).to_s + "000")[1..3] @@ -11101,7 +11148,7 @@ def panel_primitives args, audio_entry results.playtime_slider_rect = progress_bar(args: args, row: 2.5, col: 2, - percentage: audio_entry.playtime / audio_entry.length_, + percentage: (audio_entry.playtime || 1) / (audio_entry.length_ || 1), text: "#{playtime_str(audio_entry.playtime)} / #{playtime_str(audio_entry.length_)}") results.primitives << results.playtime_slider_rect.primitives @@ -11297,19 +11344,6 @@ end

    Advanced Audio - Audio Mixer - server_ip_address.txt

    # ./samples/07_advanced_audio/01_audio_mixer/app/server_ip_address.txt
     192.168.1.65
    -
    -

    Advanced Audio - Audio Mixer - Metadata - ios_metadata.txt

    -
    # ./samples/07_advanced_audio/01_audio_mixer/metadata/ios_metadata.txt
    -# ios_metadata.txt is used by the Pro version of DragonRuby Game Toolkit to create iOS apps.
    -# Information about the Pro version can be found at: http://dragonruby.org/toolkit/game#purchase
    -
    -# teamid needs to be set to your assigned Team Id which can be found at https://developer.apple.com/account/#/membership/
    -teamid=
    -# appid needs to be set to your application identifier which can be found at https://developer.apple.com/account/resources/identifiers/list
    -appid=
    -# appname is the name you want to show up underneath the app icon on the device. Keep it under 10 characters.
    -appname=
    -
     

    Advanced Audio - Sound Synthesis - main.rb

    # ./samples/07_advanced_audio/02_sound_synthesis/app/main.rb
    @@ -11907,6 +11941,134 @@ end
     
     $gtk.reset
     
    +
    +

    Advanced Rendering - Labels With Wrapped Text - main.rb

    +
    # ./samples/07_advanced_rendering/00_labels_with_wrapped_text/app/main.rb
    +def tick args
    +  # defaults
    +  args.state.scroll_location  ||= 0
    +  args.state.textbox.messages ||= []
    +  args.state.textbox.scroll   ||= 0
    +
    +  # render
    +  args.outputs.background_color = [0, 0, 0, 255]
    +  render_messages args
    +  render_instructions args
    +
    +  # inputs
    +  if args.inputs.keyboard.key_down.one
    +    queue_message args, "Hello there neighbour! my name is mark, how is your day today?"
    +  end
    +
    +  if args.inputs.keyboard.key_down.two
    +    queue_message args, "I'm doing great sir, actually I'm having a picnic today"
    +  end
    +
    +  if args.inputs.keyboard.key_down.three
    +    queue_message args, "Well that sounds wonderful!"
    +  end
    +
    +  if args.inputs.keyboard.key_down.home
    +    args.state.scroll_location = 1
    +  end
    +
    +  if args.inputs.keyboard.key_down.delete
    +    clear_message_queue args
    +  end
    +end
    +
    +def queue_message args, msg
    +  args.state.textbox.messages.concat msg.wrapped_lines 50
    +end
    +
    +def clear_message_queue args
    +  args.state.textbox.messages = nil
    +  args.state.textbox.scroll = 0
    +end
    +
    +def render_messages args
    +  args.outputs[:textbox].w = 400
    +  args.outputs[:textbox].h = 720
    +
    +  args.outputs.primitives << args.state.textbox.messages.each_with_index.map do |s, idx|
    +    {
    +      x: 0,
    +      y: 20 * (args.state.textbox.messages.size - idx) + args.state.textbox.scroll * 20,
    +      text: s,
    +      size_enum: -3,
    +      alignment_enum: 0,
    +      r: 255, g:255, b: 255, a: 255
    +    }
    +  end
    +
    +  args.outputs[:textbox].labels << args.state.textbox.messages.each_with_index.map do |s, idx|
    +    {
    +      x: 0,
    +      y: 20 * (args.state.textbox.messages.size - idx) + args.state.textbox.scroll * 20,
    +      text: s,
    +      size_enum: -3,
    +      alignment_enum: 0,
    +      r: 255, g:255, b: 255, a: 255
    +    }
    +  end
    +
    +  args.outputs[:textbox].borders << [0, 0, args.outputs[:textbox].w, 720]
    +
    +  args.state.textbox.scroll += args.inputs.mouse.wheel.y unless args.inputs.mouse.wheel.nil?
    +
    +  if args.state.scroll_location > 0
    +    args.state.textbox.scroll = 0
    +    args.state.scroll_location = 0
    +  end
    +
    +  args.outputs.sprites << [900, 0, args.outputs[:textbox].w, 720, :textbox]
    +end
    +
    +def render_instructions args
    +  args.outputs.labels << [30,
    +                          30.from_top,
    +                          "press 1, 2, 3 to display messages, MOUSE WHEEL to scroll, HOME to go to top, BACKSPACE to delete.",
    +                          0, 255, 255]
    +
    +  args.outputs.primitives << [0, 55.from_top, 1280, 30, :pixel, 0, 255, 0, 0, 0].sprite
    +end
    +
    +
    +

    Advanced Rendering - Rotating Label - main.rb

    +
    # ./samples/07_advanced_rendering/00_rotating_label/app/main.rb
    +def tick args
    +  # set the render target width and height to match the label
    +  args.outputs[:scene].w = 220
    +  args.outputs[:scene].h = 30
    +
    +
    +  # make the background transparent
    +  args.outputs[:scene].background_color = [255, 255, 255, 0]
    +
    +  # set the blendmode of the label to 0 (no blending)
    +  # center it inside of the scene
    +  # set the vertical_alignment_enum to 1 (center)
    +  args.outputs[:scene].labels  << { x: 0,
    +                                    y: 15,
    +                                    text: "label in render target",
    +                                    blendmode_enum: 0,
    +                                    vertical_alignment_enum: 1 }
    +
    +  # add a border to the render target
    +  args.outputs[:scene].borders << { x: 0,
    +                                    y: 0,
    +                                    w: args.outputs[:scene].w,
    +                                    h: args.outputs[:scene].h }
    +
    +  # add the rendertarget to the main output as a sprite
    +  args.outputs.sprites << { x: 640 - args.outputs[:scene].w.half,
    +                            y: 360 - args.outputs[:scene].h.half,
    +                            w: args.outputs[:scene].w,
    +                            h: args.outputs[:scene].h,
    +                            angle: args.state.tick_count,
    +                            path: :scene }
    +end
    +
     

    Advanced Rendering - Simple Render Targets - main.rb

    # ./samples/07_advanced_rendering/01_simple_render_targets/app/main.rb
    @@ -13146,6 +13308,7 @@ class CameraMovement
         default_camera(0,0,1280,720)
       end
     
    +
       def new_room
         default_floor_tile(0,0,1024,1024,'sprites/rooms/camera_room.png')
       end
    @@ -14244,9 +14407,95 @@ def reset_with count: count
       $gtk.args.state.star_count = count
     end
     
    +
    +

    Performance - Sprites As Struct - main.rb

    +
    # ./samples/09_performance/03_sprites_as_struct/app/main.rb
    +# create a Struct variant that allows for named parameters on construction.
    +class NamedStruct < Struct
    +  def initialize **opts
    +    super(*members.map { |k| opts[k] })
    +  end
    +end
    +
    +# create a Star NamedStruct
    +Star = NamedStruct.new(:x, :y, :w, :h, :path, :s,
    +                       :angle, :angle_anchor_x, :angle_anchor_y,
    +                       :r, :g, :b, :a,
    +                       :tile_x, :tile_y,
    +                       :tile_w, :tile_h,
    +                       :source_x, :source_y,
    +                       :source_w, :source_h,
    +                       :flip_horizontally, :flip_vertically,
    +                       :blendmode_enum)
    +
    +# Sprites represented as Structs. They require a little bit more code than Hashes,
    +# but are the a little faster to render too.
    +def random_x args
    +  (args.grid.w.randomize :ratio) * -1
    +end
    +
    +def random_y args
    +  (args.grid.h.randomize :ratio) * -1
    +end
    +
    +def random_speed
    +  1 + (4.randomize :ratio)
    +end
    +
    +def new_star args
    +  Star.new x: (random_x args),
    +           y: (random_y args),
    +           w: 4, h: 4,
    +           path: 'sprites/tiny-star.png',
    +           s: random_speed
    +end
    +
    +def move_star args, star
    +  star.x += star[:s]
    +  star.y += star[:s]
    +  if star.x > args.grid.w || star.y > args.grid.h
    +    star.x = (random_x args)
    +    star.y = (random_y args)
    +    star[:s] = random_speed
    +  end
    +end
    +
    +def tick args
    +  args.state.star_count ||= 0
    +
    +  # sets console command when sample app initially opens
    +  if Kernel.global_tick_count == 0
    +    puts ""
    +    puts ""
    +    puts "========================================================="
    +    puts "* INFO: Sprites, Structs"
    +    puts "* INFO: Please specify the number of sprites to render."
    +    args.gtk.console.set_command "reset_with count: 100"
    +  end
    +
    +  # init
    +  if args.state.tick_count == 0
    +    args.state.stars = args.state.star_count.map { |i| new_star args }
    +  end
    +
    +  # update
    +  args.state.stars.each { |s| move_star args, s }
    +
    +  # render
    +  args.outputs.sprites << args.state.stars
    +  args.outputs.background_color = [0, 0, 0]
    +  args.outputs.primitives << args.gtk.current_framerate_primitives
    +end
    +
    +# resets game, and assigns star count given by user
    +def reset_with count: count
    +  $gtk.reset
    +  $gtk.args.state.star_count = count
    +end
    +
     

    Performance - Sprites As Strict Entities - main.rb

    -
    # ./samples/09_performance/03_sprites_as_strict_entities/app/main.rb
    +
    # ./samples/09_performance/04_sprites_as_strict_entities/app/main.rb
     # Sprites represented as StrictEntities using the queue ~args.outputs.sprites~
     # yields apis access similar to Entities, but all properties that can be set on the
     # entity must be predefined with a default value. Strict entities do not support the
    @@ -14322,7 +14571,7 @@ end
     
     

    Performance - Sprites As Classes - main.rb

    -
    # ./samples/09_performance/04_sprites_as_classes/app/main.rb
    +
    # ./samples/09_performance/05_sprites_as_classes/app/main.rb
     # Sprites represented as Classes using the queue ~args.outputs.sprites~.
     # gives you full control of property declaration and method invocation.
     # They are more performant than OpenEntities and StrictEntities, but more code upfront.
    @@ -14381,7 +14630,7 @@ end
     
     

    Performance - Static Sprites As Classes - main.rb

    -
    # ./samples/09_performance/05_static_sprites_as_classes/app/main.rb
    +
    # ./samples/09_performance/06_static_sprites_as_classes/app/main.rb
     # Sprites represented as Classes using the queue ~args.outputs.static_sprites~.
     # bypasses the queue behavior of ~args.outputs.sprites~. All instances are held
     # by reference. You get better performance, but you are mutating state of held objects
    @@ -14441,7 +14690,7 @@ end
     
     

    Performance - Static Sprites As Classes With Custom Drawing - main.rb

    -
    # ./samples/09_performance/06_static_sprites_as_classes_with_custom_drawing/app/main.rb
    +
    # ./samples/09_performance/07_static_sprites_as_classes_with_custom_drawing/app/main.rb
     # Sprites represented as Classes, with a draw_override method, and using the queue ~args.outputs.static_sprites~.
     # is the fastest approach. This is comparable to what other game engines set as the default behavior.
     # There are tradeoffs for all this speed if the creation of a full blown class, and bypassing
    @@ -14533,7 +14782,7 @@ end
     
     

    Performance - Collision Limits - main.rb

    -
    # ./samples/09_performance/07_collision_limits/app/main.rb
    +
    # ./samples/09_performance/08_collision_limits/app/main.rb
     =begin
     
      Reminders:
    @@ -14590,6 +14839,29 @@ end
     # Resets the game.
     $gtk.reset
     
    +
    +

    Advanced Debugging - Logging - main.rb

    +
    # ./samples/10_advanced_debugging/00_logging/app/main.rb
    +def tick args
    +  args.outputs.background_color = [255, 255, 255, 0]
    +  if args.state.tick_count == 0
    +    args.gtk.log_spam "log level spam"
    +    args.gtk.log_debug "log level debug"
    +    args.gtk.log_info "log level info"
    +    args.gtk.log_warn "log level warn"
    +    args.gtk.log_error "log level error"
    +    args.gtk.log_unfiltered "log level unfiltered"
    +    puts "This is a puts call"
    +    args.gtk.console.show
    +  end
    +
    +  if args.state.tick_count == 60
    +    puts "This is a puts call on tick 60"
    +  elsif args.state.tick_count == 120
    +    puts "This is a puts call on tick 120"
    +  end
    +end
    +
     

    Advanced Debugging - Trace Debugging - main.rb

    # ./samples/10_advanced_debugging/01_trace_debugging/app/main.rb
    @@ -15407,12 +15679,12 @@ def test_serialize args, assert
       GTK::Entity.__reset_id__!
       args.state.player_one = "test"
       result = args.gtk.serialize_state args.state
    -  assert.equal! result, "{:entity_id=>3, :entity_keys_by_ref=>{}, :tick_count=>-1, :player_one=>\"test\"}"
    +  assert.equal! result, "{:entity_id=>4, :entity_keys_by_ref=>{}, :tick_count=>-1, :player_one=>\"test\"}"
     
       GTK::Entity.__reset_id__!
       args.gtk.write_file 'state.txt', ''
       result = args.gtk.serialize_state 'state.txt', args.state
    -  assert.equal! result, "{:entity_id=>3, :entity_keys_by_ref=>{}, :tick_count=>-1, :player_one=>\"test\"}"
    +  assert.equal! result, "{:entity_id=>4, :entity_keys_by_ref=>{}, :tick_count=>-1, :player_one=>\"test\"}"
     end
     
     def test_deserialize args, assert
    @@ -15461,7 +15733,7 @@ def test_strict_entity_serialization_with_nil args, assert
       args.state.player_two = args.state.new_entity_strict(:player_strict, name: "Ken", blood_type: nil)
     
       serialized_state = args.gtk.serialize_state args.state
    -  assert.equal! serialized_state, '{:entity_id=>9, :entity_keys_by_ref=>{}, :tick_count=>-1, :player_one=>{:entity_id=>1, :entity_name=>:player, :entity_keys_by_ref=>{}, :entity_type=>:player, :created_at=>-1, :global_created_at=>-1, :name=>"Ryu"}, :player_two=>{:entity_id=>2, :entity_name=>:player_strict, :entity_type=>:player_strict, :created_at=>-1, :global_created_at_elapsed=>-1, :entity_strict=>true, :entity_keys_by_ref=>{:entity_type=>:entity_name, :global_created_at_elapsed=>:created_at}, :name=>"Ken", :blood_type=>nil}}'
    +  assert.equal! serialized_state, '{:entity_id=>7, :entity_keys_by_ref=>{}, :tick_count=>-1, :player_one=>{:entity_id=>1, :entity_name=>:player, :entity_keys_by_ref=>{}, :entity_type=>:player, :created_at=>-1, :global_created_at=>-1, :name=>"Ryu"}, :player_two=>{:entity_id=>2, :entity_name=>:player_strict, :entity_type=>:player_strict, :created_at=>-1, :global_created_at_elapsed=>-1, :entity_strict=>true, :entity_keys_by_ref=>{:entity_type=>:entity_name, :global_created_at_elapsed=>:created_at}, :name=>"Ken", :blood_type=>nil}}'
     
       GTK::Entity.__reset_id__!
       deserialized_state = args.gtk.deserialize_state serialized_state
    @@ -15519,6 +15791,18 @@ def test_by_reference_state_strict_entities args, assert
       assert.equal! deserialized_state.strict_entity.one, deserialized_state.strict_entity.two
     end
     
    +def test_serialization_excludes_thrash_count args, assert
    +  GTK::Entity.__reset_id__!
    +  args.state.player.name = "Ryu"
    +  # force a nil pun
    +  if args.state.player.age > 30
    +  end
    +  assert.equal! args.state.player.as_hash[:__thrash_count__][:>], 1
    +  result = args.gtk.serialize_state args.state
    +  assert.false! (result.include? "__thrash_count__"),
    +                "The __thrash_count__ key exists in state when it shouldn't have."
    +end
    +
     

    Advanced Debugging - Unit Tests - state_serialization_experimental_tests.rb

    # ./samples/10_advanced_debugging/03_unit_tests/state_serialization_experimental_tests.rb
    @@ -15674,11 +15958,13 @@ end
     

    Http - Retrieve Images - main.rb

    # ./samples/11_http/01_retrieve_images/app/main.rb
    +$gtk.register_cvar 'app.warn_seconds', "seconds to wait before starting", :uint, 11
    +
     def tick args
       args.outputs.background_color = [0, 0, 0]
     
       # Show a warning at the start.
    -  args.state.warning_debounce ||= 11 * 60
    +  args.state.warning_debounce ||= args.cvars['app.warn_seconds'].value * 60
       if args.state.warning_debounce > 0
         args.state.warning_debounce -= 1
         args.outputs.labels << [640, 600, "This app shows random images from the Internet.", 10, 1, 255, 255, 255]
    @@ -15729,10 +16015,11 @@ def tick args
     end
     
     
    -

    Http - Web Server - main.rb

    -
    # ./samples/11_http/02_web_server/app/main.rb
    +

    Http - In Game Web Server Http Get - main.rb

    +
    # ./samples/11_http/02_in_game_web_server_http_get/app/main.rb
     def tick args
       args.state.port ||= 3000
    +  args.state.reqnum ||= 0
       # by default the embedded webserver runs on port 9001 (the port number is over 9000) and is disabled in a production build
       # to enable the http server in a production build, you need to manually start
       # the server up:
    @@ -15759,6 +16046,82 @@ def tick args
       }
     end
     
    +
    +

    Http - In Game Web Server Http Post - main.rb

    +
    # ./samples/11_http/03_in_game_web_server_http_post/app/main.rb
    +def tick args
    +  # defaults
    +  args.state.post_button      = args.layout.rect(row: 0, col: 0, w: 5, h: 1).merge(text: "execute http_post")
    +  args.state.post_body_button = args.layout.rect(row: 1, col: 0, w: 5, h: 1).merge(text: "execute http_post_body")
    +  args.state.request_to_s ||= ""
    +  args.state.request_body ||= ""
    +
    +  # render
    +  args.state.post_button.yield_self do |b|
    +    args.outputs.borders << b
    +    args.outputs.labels  << b.merge(text: b.text,
    +                                    y:    b.y + 30,
    +                                    x:    b.x + 10)
    +  end
    +
    +  args.state.post_body_button.yield_self do |b|
    +    args.outputs.borders << b
    +    args.outputs.labels  << b.merge(text: b.text,
    +                                    y:    b.y + 30,
    +                                    x:    b.x + 10)
    +  end
    +
    +  draw_label args, 0,  6, "Request:", args.state.request_to_s
    +  draw_label args, 0, 14, "Request Body Unaltered:", args.state.request_body
    +
    +  # input
    +  if args.inputs.mouse.click
    +    # ============= HTTP_POST =============
    +    if (args.inputs.mouse.inside_rect? args.state.post_button)
    +      # ========= DATA TO SEND ===========
    +      form_fields = { "userId" => "#{Time.now.to_i}" }
    +      # ==================================
    +
    +      args.gtk.http_post "http://localhost:9001/testing",
    +                         form_fields,
    +                         ["Content-Type: application/x-www-form-urlencoded"]
    +
    +      args.gtk.notify! "http_post"
    +    end
    +
    +    # ============= HTTP_POST_BODY =============
    +    if (args.inputs.mouse.inside_rect? args.state.post_body_button)
    +      # =========== DATA TO SEND ==============
    +      json = "{ \"userId\": \"#{Time.now.to_i}\"}"
    +      # ==================================
    +
    +      args.gtk.http_post_body "http://localhost:9001/testing",
    +                              json,
    +                              ["Content-Type: application/json", "Content-Length: #{json.length}"]
    +
    +      args.gtk.notify! "http_post_body"
    +    end
    +  end
    +
    +  # calc
    +  args.inputs.http_requests.each do |r|
    +    puts "#{r}"
    +    if r.uri == "/testing"
    +      puts r
    +      args.state.request_to_s = "#{r}"
    +      args.state.request_body = r.raw_body
    +      r.respond 200, "ok"
    +    end
    +  end
    +end
    +
    +def draw_label args, row, col, header, text
    +  label_pos = args.layout.rect(row: row, col: col, w: 0, h: 0)
    +  args.outputs.labels << "#{header}\n\n#{text}".wrapped_lines(80).map_with_index do |l, i|
    +    { x: label_pos.x, y: label_pos.y - (i * 15), text: l, size_enum: -2 }
    +  end
    +end
    +
     

    C Extensions - Basics - main.rb

    # ./samples/12_c_extensions/01_basics/app/main.rb
    @@ -17693,7 +18056,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
    @@ -18342,7 +18705,7 @@ def tick args
       end
     
       # Every tick, new args are passed, and the Breadth First Search tick is called
    -  $early_exit_breadth_first_search ||= EarlyExitBreadthFirstSearch.new(args)
    +  $early_exit_breadth_first_search ||= EarlyExitBreadthFirstSearch.new
       $early_exit_breadth_first_search.args = args
       $early_exit_breadth_first_search.tick
     end
    @@ -19190,7 +19553,7 @@ def tick args
       end
     
       # Every tick, new args are passed, and the Dijkstra tick method is called
    -  $movement_costs ||= Movement_Costs.new(args)
    +  $movement_costs ||= Movement_Costs.new
       $movement_costs.args = args
       $movement_costs.tick
     end
    @@ -20174,7 +20537,7 @@ def tick args
       end
     
       # Every tick, new args are passed, and the Breadth First Search tick is called
    -  $heuristic_with_walls ||= Heuristic_With_Walls.new(args)
    +  $heuristic_with_walls ||= Heuristic_With_Walls.new
       $heuristic_with_walls.args = args
       $heuristic_with_walls.tick
     end
    @@ -21191,7 +21554,7 @@ def tick args
       end
     
       # Every tick, new args are passed, and the Breadth First Search tick is called
    -  $heuristic ||= Heuristic.new(args)
    +  $heuristic ||= Heuristic.new
       $heuristic.args = args
       $heuristic.tick
     end
    @@ -22224,7 +22587,7 @@ def tick args
       end
     
       # Every tick, new args are passed, and the Breadth First Search tick is called
    -  $a_star_algorithm ||= A_Star_Algorithm.new(args)
    +  $a_star_algorithm ||= A_Star_Algorithm.new
       $a_star_algorithm.args = args
       $a_star_algorithm.tick
     end
    @@ -22750,6 +23113,361 @@ end
     

    3d - Wireframe - Data - what-is-this.txt

    # ./samples/99_genre_3d/02_wireframe/data/what-is-this.txt
     https://en.wikipedia.org/wiki/OFF_(file_format)
    +
    +

    3d - Yaw Pitch Roll - main.rb

    +
    # ./samples/99_genre_3d/03_yaw_pitch_roll/app/main.rb
    +class Game
    +  attr_gtk
    +
    +  def tick
    +    defaults
    +    render
    +    input
    +  end
    +
    +  def matrix_mul m, v
    +    (hmap x: ((m.x.x * v.x) + (m.x.y * v.y) + (m.x.z * v.z) + (m.x.w * v.w)),
    +          y: ((m.y.x * v.x) + (m.y.y * v.y) + (m.y.z * v.z) + (m.y.w * v.w)),
    +          z: ((m.z.x * v.x) + (m.z.y * v.y) + (m.z.z * v.z) + (m.z.w * v.w)),
    +          w: ((m.w.x * v.x) + (m.w.y * v.y) + (m.w.z * v.z) + (m.w.w * v.w)))
    +  end
    +
    +  def player_ship
    +    [
    +      # engine back
    +      { x: -1, y: -1, z: 1, w: 0 },
    +      { x: -1, y:  1, z: 1, w: 0 },
    +
    +      { x: -1, y:  1, z: 1, w: 0 },
    +      { x:  1, y:  1, z: 1, w: 0 },
    +
    +      { x:  1, y:  1, z: 1, w: 0 },
    +      { x:  1, y: -1, z: 1, w: 0 },
    +
    +      { x:  1, y: -1, z: 1, w: 0 },
    +      { x: -1, y: -1, z: 1, w: 0 },
    +
    +      # engine front
    +      { x: -1, y: -1, z: -1, w: 0 },
    +      { x: -1, y:  1, z: -1, w: 0 },
    +
    +      { x: -1, y:  1, z: -1, w: 0 },
    +      { x:  1, y:  1, z: -1, w: 0 },
    +
    +      { x:  1, y:  1, z: -1, w: 0 },
    +      { x:  1, y: -1, z: -1, w: 0 },
    +
    +      { x:  1, y: -1, z: -1, w: 0 },
    +      { x: -1, y: -1, z: -1, w: 0 },
    +
    +      # engine left
    +      { x: -1, z:  -1, y: -1, w: 0 },
    +      { x: -1, z:  -1, y:  1, w: 0 },
    +
    +      { x: -1, z:  -1, y:  1, w: 0 },
    +      { x: -1, z:   1, y:  1, w: 0 },
    +
    +      { x: -1, z:   1, y:  1, w: 0 },
    +      { x: -1, z:   1, y: -1, w: 0 },
    +
    +      { x: -1, z:   1, y: -1, w: 0 },
    +      { x: -1, z:  -1, y: -1, w: 0 },
    +
    +      # engine right
    +      { x:  1, z:  -1, y: -1, w: 0 },
    +      { x:  1, z:  -1, y:  1, w: 0 },
    +
    +      { x:  1, z:  -1, y:  1, w: 0 },
    +      { x:  1, z:   1, y:  1, w: 0 },
    +
    +      { x:  1, z:   1, y:  1, w: 0 },
    +      { x:  1, z:   1, y: -1, w: 0 },
    +
    +      { x:  1, z:   1, y: -1, w: 0 },
    +      { x:  1, z:  -1, y: -1, w: 0 },
    +
    +      # top front of engine to front of ship
    +      { x:  1, y:   1, z: 1, w: 0 },
    +      { x:  0, y:  -1, z: 9, w: 0 },
    +
    +      { x:  0, y:  -1, z: 9, w: 0 },
    +      { x: -1, y:   1, z: 1, w: 0 },
    +
    +      # bottom front of engine
    +      { x:  1, y:  -1, z: 1, w: 0 },
    +      { x:  0, y:  -1, z: 9, w: 0 },
    +
    +      { x: -1, y:  -1, z: 1, w: 0 },
    +      { x:  0, y:  -1, z: 9, w: 0 },
    +
    +      # right wing
    +      # front of wing
    +      { x: 1, y: 0.10, z:  1, w: 0 },
    +      { x: 9, y: 0.10, z: -1, w: 0 },
    +
    +      { x:  9, y: 0.10, z: -1, w: 0 },
    +      { x: 10, y: 0.10, z: -2, w: 0 },
    +
    +      # back of wing
    +      { x: 1, y: 0.10, z: -1, w: 0 },
    +      { x: 9, y: 0.10, z: -1, w: 0 },
    +
    +      { x: 10, y: 0.10, z: -2, w: 0 },
    +      { x:  8, y: 0.10, z: -1, w: 0 },
    +
    +      # front of wing
    +      { x: 1, y: -0.10, z:  1, w: 0 },
    +      { x: 9, y: -0.10, z: -1, w: 0 },
    +
    +      { x:  9, y: -0.10, z: -1, w: 0 },
    +      { x: 10, y: -0.10, z: -2, w: 0 },
    +
    +      # back of wing
    +      { x: 1, y: -0.10, z: -1, w: 0 },
    +      { x: 9, y: -0.10, z: -1, w: 0 },
    +
    +      { x: 10, y: -0.10, z: -2, w: 0 },
    +      { x:  8, y: -0.10, z: -1, w: 0 },
    +
    +      # left wing
    +      # front of wing
    +      { x: -1, y: 0.10, z:  1, w: 0 },
    +      { x: -9, y: 0.10, z: -1, w: 0 },
    +
    +      { x: -9, y: 0.10, z: -1, w: 0 },
    +      { x: -10, y: 0.10, z: -2, w: 0 },
    +
    +      # back of wing
    +      { x: -1, y: 0.10, z: -1, w: 0 },
    +      { x: -9, y: 0.10, z: -1, w: 0 },
    +
    +      { x: -10, y: 0.10, z: -2, w: 0 },
    +      { x: -8, y: 0.10, z: -1, w: 0 },
    +
    +      # front of wing
    +      { x: -1, y: -0.10, z:  1, w: 0 },
    +      { x: -9, y: -0.10, z: -1, w: 0 },
    +
    +      { x: -9, y: -0.10, z: -1, w: 0 },
    +      { x: -10, y: -0.10, z: -2, w: 0 },
    +
    +      # back of wing
    +      { x: -1, y: -0.10, z: -1, w: 0 },
    +      { x: -9, y: -0.10, z: -1, w: 0 },
    +
    +      { x: -10, y: -0.10, z: -2, w: 0 },
    +      { x: -8, y: -0.10, z: -1, w: 0 },
    +
    +      # left fin
    +      # top
    +      { x: -1, y: 0.10, z: 1, w: 0 },
    +      { x: -1, y: 3, z: -3, w: 0 },
    +
    +      { x: -1, y: 0.10, z: -1, w: 0 },
    +      { x: -1, y: 3, z: -3, w: 0 },
    +
    +      { x: -1.1, y: 0.10, z: 1, w: 0 },
    +      { x: -1.1, y: 3, z: -3, w: 0 },
    +
    +      { x: -1.1, y: 0.10, z: -1, w: 0 },
    +      { x: -1.1, y: 3, z: -3, w: 0 },
    +
    +      # bottom
    +      { x: -1, y: -0.10, z: 1, w: 0 },
    +      { x: -1, y: -2, z: -2, w: 0 },
    +
    +      { x: -1, y: -0.10, z: -1, w: 0 },
    +      { x: -1, y: -2, z: -2, w: 0 },
    +
    +      { x: -1.1, y: -0.10, z: 1, w: 0 },
    +      { x: -1.1, y: -2, z: -2, w: 0 },
    +
    +      { x: -1.1, y: -0.10, z: -1, w: 0 },
    +      { x: -1.1, y: -2, z: -2, w: 0 },
    +
    +      # right fin
    +      { x:  1, y: 0.10, z: 1, w: 0 },
    +      { x:  1, y: 3, z: -3, w: 0 },
    +
    +      { x:  1, y: 0.10, z: -1, w: 0 },
    +      { x:  1, y: 3, z: -3, w: 0 },
    +
    +      { x:  1.1, y: 0.10, z: 1, w: 0 },
    +      { x:  1.1, y: 3, z: -3, w: 0 },
    +
    +      { x:  1.1, y: 0.10, z: -1, w: 0 },
    +      { x:  1.1, y: 3, z: -3, w: 0 },
    +
    +      # bottom
    +      { x:  1, y: -0.10, z: 1, w: 0 },
    +      { x:  1, y: -2, z: -2, w: 0 },
    +
    +      { x:  1, y: -0.10, z: -1, w: 0 },
    +      { x:  1, y: -2, z: -2, w: 0 },
    +
    +      { x:  1.1, y: -0.10, z: 1, w: 0 },
    +      { x:  1.1, y: -2, z: -2, w: 0 },
    +
    +      { x:  1.1, y: -0.10, z: -1, w: 0 },
    +      { x:  1.1, y: -2, z: -2, w: 0 },
    +    ]
    +  end
    +
    +  def defaults
    +    state.points ||= player_ship
    +    state.shifted_points ||= state.points.map { |point| point }
    +
    +    state.scale   ||= 1
    +    state.angle_x ||= 0
    +    state.angle_y ||= 0
    +    state.angle_z ||= 0
    +  end
    +
    +  def matrix_new x0, y0, z0, w0, x1, y1, z1, w1, x2, y2, z2, w2, x3, y3, z3, w3
    +    (hmap x: (hmap x: x0, y: y0, z: z0, w: w0),
    +          y: (hmap x: x1, y: y1, z: z1, w: w1),
    +          z: (hmap x: x2, y: y2, z: z2, w: w2),
    +          w: (hmap x: x3, y: y3, z: z3, w: w3))
    +  end
    +
    +  def angle_z_matrix degrees
    +    cos_t = Math.cos degrees.to_radians
    +    sin_t = Math.sin degrees.to_radians
    +    (matrix_new cos_t, -sin_t, 0, 0,
    +                sin_t,  cos_t, 0, 0,
    +                0,      0,     1, 0,
    +                0,      0,     0, 1)
    +  end
    +
    +  def angle_y_matrix degrees
    +    cos_t = Math.cos degrees.to_radians
    +    sin_t = Math.sin degrees.to_radians
    +    (matrix_new  cos_t,  0, sin_t, 0,
    +                 0,      1, 0,     0,
    +                 -sin_t, 0, cos_t, 0,
    +                 0,      0, 0,     1)
    +  end
    +
    +  def angle_x_matrix degrees
    +    cos_t = Math.cos degrees.to_radians
    +    sin_t = Math.sin degrees.to_radians
    +    (matrix_new  1,     0,      0, 0,
    +                 0, cos_t, -sin_t, 0,
    +                 0, sin_t,  cos_t, 0,
    +                 0,     0,      0, 1)
    +  end
    +
    +  def scale_matrix factor
    +    (matrix_new factor,      0,      0, 0,
    +                0,      factor,      0, 0,
    +                0,           0, factor, 0,
    +                0,           0,      0, 1)
    +  end
    +
    +  def input
    +    if (inputs.keyboard.shift && inputs.keyboard.p)
    +      state.scale -= 0.1
    +    elsif  inputs.keyboard.p
    +      state.scale += 0.1
    +    end
    +
    +    if inputs.mouse.wheel
    +      state.scale += inputs.mouse.wheel.y
    +    end
    +
    +    state.scale = state.scale.clamp(0.1, 1000)
    +
    +    if (inputs.keyboard.shift && inputs.keyboard.y) || inputs.keyboard.right
    +      state.angle_y += 1
    +    elsif (inputs.keyboard.y) || inputs.keyboard.left
    +      state.angle_y -= 1
    +    end
    +
    +    if (inputs.keyboard.shift && inputs.keyboard.x) || inputs.keyboard.down
    +      state.angle_x -= 1
    +    elsif (inputs.keyboard.x || inputs.keyboard.up)
    +      state.angle_x += 1
    +    end
    +
    +    if inputs.keyboard.shift && inputs.keyboard.z
    +      state.angle_z += 1
    +    elsif inputs.keyboard.z
    +      state.angle_z -= 1
    +    end
    +
    +    if inputs.keyboard.zero
    +      state.angle_x = 0
    +      state.angle_y = 0
    +      state.angle_z = 0
    +    end
    +
    +    angle_x = state.angle_x
    +    angle_y = state.angle_y
    +    angle_z = state.angle_z
    +    scale   = state.scale
    +
    +    s_matrix = scale_matrix state.scale
    +    x_matrix = angle_z_matrix angle_z
    +    y_matrix = angle_y_matrix angle_y
    +    z_matrix = angle_x_matrix angle_x
    +
    +    state.shifted_points = state.points.map do |point|
    +      (matrix_mul s_matrix,
    +                  (matrix_mul z_matrix,
    +                              (matrix_mul x_matrix,
    +                                          (matrix_mul y_matrix, point)))).merge(original: point)
    +    end
    +  end
    +
    +  def thick_line line
    +    [
    +      line.merge(y: line.y - 1, y2: line.y2 - 1, r: 0, g: 0, b: 0),
    +      line.merge(x: line.x - 1, x2: line.x2 - 1, r: 0, g: 0, b: 0),
    +      line.merge(x: line.x - 0, x2: line.x2 - 0, r: 0, g: 0, b: 0),
    +      line.merge(y: line.y + 1, y2: line.y2 + 1, r: 0, g: 0, b: 0),
    +      line.merge(x: line.x + 1, x2: line.x2 + 1, r: 0, g: 0, b: 0)
    +    ]
    +  end
    +
    +  def render
    +    outputs.lines << state.shifted_points.each_slice(2).map do |(p1, p2)|
    +      perc = 0
    +      thick_line({ x:  p1.x.*(10) + 640, y:  p1.y.*(10) + 320,
    +                   x2: p2.x.*(10) + 640, y2: p2.y.*(10) + 320,
    +                   r: 255 * perc,
    +                   g: 255 * perc,
    +                   b: 255 * perc })
    +    end
    +
    +    outputs.labels << [ 10, 700, "angle_x: #{state.angle_x.to_sf}", 0]
    +    outputs.labels << [ 10, 670, "x, shift+x", 0]
    +
    +    outputs.labels << [210, 700, "angle_y: #{state.angle_y.to_sf}", 0]
    +    outputs.labels << [210, 670, "y, shift+y", 0]
    +
    +    outputs.labels << [410, 700, "angle_z: #{state.angle_z.to_sf}", 0]
    +    outputs.labels << [410, 670, "z, shift+z", 0]
    +
    +    outputs.labels << [610, 700, "scale: #{state.scale.to_sf}", 0]
    +    outputs.labels << [610, 670, "p, shift+p", 0]
    +  end
    +end
    +
    +$game = Game.new
    +
    +def tick args
    +  $game.args = args
    +  $game.tick
    +end
    +
    +def set_angles x, y, z
    +  $game.state.angle_x = x
    +  $game.state.angle_y = y
    +  $game.state.angle_z = z
    +end
    +
    +$gtk.reset
    +
     

    Arcade - Bullet Hell - main.rb

    # ./samples/99_genre_arcade/bullet_hell/app/main.rb
    @@ -23362,31 +24080,36 @@ class FlappyDragon
       end
     
       def render_score
    -    outputs.primitives << [10, 710, "HI SCORE: #{state.hi_score}", large_white_typeset].label
    -    outputs.primitives << [10, 680, "SCORE: #{state.score}", large_white_typeset].label
    -    outputs.primitives << [10, 650, "DIFFICULTY: #{state.difficulty.upcase}", large_white_typeset].label
    +    outputs.primitives << { x: 10, y: 710, text: "HI SCORE: #{state.hi_score}", **large_white_typeset }
    +    outputs.primitives << { x: 10, y: 680, text: "SCORE: #{state.score}", **large_white_typeset }
    +    outputs.primitives << { x: 10, y: 650, text: "DIFFICULTY: #{state.difficulty.upcase}", **large_white_typeset }
       end
     
       def render_menu
         return unless state.scene == :menu
         render_overlay
     
    -    outputs.labels << [640, 700, "Flappy Dragon", 50, 1, 255, 255, 255]
    -    outputs.labels << [640, 500, "Instructions: Press Spacebar to flap. Don't die.", 4, 1, 255, 255, 255]
    -    outputs.labels << [430, 430, "[Tab]    Change difficulty", 4, 0, 255, 255, 255]
    -    outputs.labels << [430, 400, "[Enter]  Start at New Difficulty ", 4, 0, 255, 255, 255]
    -    outputs.labels << [430, 370, "[Escape] Cancel/Resume ", 4, 0, 255, 255, 255]
    -    outputs.labels << [640, 300, "(mouse, touch, and game controllers work, too!) ", 4, 1, 255, 255, 255]
    -    outputs.labels << [640, 200, "Difficulty: #{state.new_difficulty.capitalize}", 4, 1, 255, 255, 255]
    +    outputs.labels << { x: 640, y: 700, text: "Flappy Dragon", size_enum: 50, alignment_enum: 1, **white }
    +    outputs.labels << { x: 640, y: 500, text: "Instructions: Press Spacebar to flap. Don't die.", size_enum: 4, alignment_enum: 1, **white }
    +    outputs.labels << { x: 430, y: 430, text: "[Tab]    Change difficulty", size_enum: 4, alignment_enum: 0, **white }
    +    outputs.labels << { x: 430, y: 400, text: "[Enter]  Start at New Difficulty ", size_enum: 4, alignment_enum: 0, **white }
    +    outputs.labels << { x: 430, y: 370, text: "[Escape] Cancel/Resume ", size_enum: 4, alignment_enum: 0, **white }
    +    outputs.labels << { x: 640, y: 300, text: "(mouse, touch, and game controllers work, too!) ", size_enum: 4, alignment_enum: 1, **white }
    +    outputs.labels << { x: 640, y: 200, text: "Difficulty: #{state.new_difficulty.capitalize}", size_enum: 4, alignment_enum: 1, **white }
     
    -    outputs.labels << [10, 100, "Code:   @amirrajan",     255, 255, 255]
    -    outputs.labels << [10,  80, "Art:    @mobypixel",     255, 255, 255]
    -    outputs.labels << [10,  60, "Music:  @mobypixel",     255, 255, 255]
    -    outputs.labels << [10,  40, "Engine: DragonRuby GTK", 255, 255, 255]
    +    outputs.labels << { x: 10, y: 100, text: "Code:   @amirrajan",     **white }
    +    outputs.labels << { x: 10, y:  80, text: "Art:    @mobypixel",     **white }
    +    outputs.labels << { x: 10, y:  60, text: "Music:  @mobypixel",     **white }
    +    outputs.labels << { x: 10, y:  40, text: "Engine: DragonRuby GTK", **white }
       end
     
       def render_overlay
    -    outputs.primitives << [grid.rect.scale_rect(1.1, 0, 0), 0, 0, 0, 230].solid
    +    overlay_rect = grid.rect.scale_rect(1.1, 0, 0)
    +    outputs.primitives << { x: overlay_rect.x,
    +                            y: overlay_rect.y,
    +                            w: overlay_rect.w,
    +                            h: overlay_rect.h,
    +                            r: 0, g: 0, b: 0, a: 230 }.solid!
       end
     
       def render_game
    @@ -23399,14 +24122,14 @@ class FlappyDragon
     
       def render_game_over
         return unless state.scene == :game
    -    outputs.labels << [638, 358, score_text, 20, 1]
    -    outputs.labels << [635, 360, score_text, 20, 1, 255, 255, 255]
    -    outputs.labels << [638, 428, countdown_text, 20, 1]
    -    outputs.labels << [635, 430, countdown_text, 20, 1, 255, 255, 255]
    +    outputs.labels << { x: 638, y: 358, text: score_text,     size_enum: 20, alignment_enum: 1 }
    +    outputs.labels << { x: 635, y: 360, text: score_text,     size_enum: 20, alignment_enum: 1, r: 255, g: 255, b: 255 }
    +    outputs.labels << { x: 638, y: 428, text: countdown_text, size_enum: 20, alignment_enum: 1 }
    +    outputs.labels << { x: 635, y: 430, text: countdown_text, size_enum: 20, alignment_enum: 1, r: 255, g: 255, b: 255 }
       end
     
       def render_background
    -    outputs.sprites << [0, 0, 1280, 720, 'sprites/background.png']
    +    outputs.sprites << { x: 0, y: 0, w: 1280, h: 720, path: 'sprites/background.png' }
     
         scroll_point_at   = state.tick_count
         scroll_point_at   = state.scene_at if state.scene == :menu
    @@ -23418,11 +24141,18 @@ class FlappyDragon
         outputs.sprites << scrolling_background(scroll_point_at, 'sprites/parallax_front.png',  1.00, -80)
       end
     
    +  def scrolling_background at, path, rate, y = 0
    +    [
    +      { x:    0 - at.*(rate) % 1440, y: y, w: 1440, h: 720, path: path },
    +      { x: 1440 - at.*(rate) % 1440, y: y, w: 1440, h: 720, path: path }
    +    ]
    +  end
    +
       def render_walls
         state.walls.each do |w|
           w.sprites = [
    -        [w.x, w.bottom_height - 720, 100, 720, 'sprites/wall.png', 180],
    -        [w.x, w.top_y,               100, 720, 'sprites/wallbottom.png', 0]
    +        { x: w.x, y: w.bottom_height - 720, w: 100, h: 720, path: 'sprites/wall.png',       angle: 180 },
    +        { x: w.x, y: w.top_y,               w: 100, h: 720, path: 'sprites/wallbottom.png', angle: 0 }
           ]
         end
         outputs.sprites << state.walls.map(&:sprites)
    @@ -23431,15 +24161,13 @@ class FlappyDragon
       def render_dragon
         state.show_death = true if state.countdown == 3.seconds
     
    -    render_debug_hitbox false
    -
         if state.show_death == false || !state.death_at
           animation_index = state.flapped_at.frame_index 6, 2, false if state.flapped_at
           sprite_name = "sprites/dragon_fly#{animation_index.or(0) + 1}.png"
    -      state.dragon_sprite = [state.x, state.y, 100, 80, sprite_name, state.dy * 1.2]
    +      state.dragon_sprite = { x: state.x, y: state.y, w: 100, h: 80, path: sprite_name, angle: state.dy * 1.2 }
         else
           sprite_name = "sprites/dragon_die.png"
    -      state.dragon_sprite = [state.x, state.y, 100, 80, sprite_name, state.dy * 1.2]
    +      state.dragon_sprite = { x: state.x, y: state.y, w: 100, h: 80, path: sprite_name, angle: state.dy * 1.2 }
           sprite_changed_elapsed    = state.death_at.elapsed_time - 1.seconds
           state.dragon_sprite.angle += (sprite_changed_elapsed ** 1.3) * state.death_fall_direction * -1
           state.dragon_sprite.x     += (sprite_changed_elapsed ** 1.2) * state.death_fall_direction
    @@ -23449,20 +24177,12 @@ class FlappyDragon
         outputs.sprites << state.dragon_sprite
       end
     
    -  def render_debug_hitbox show
    -    return unless show
    -    outputs.borders << [dragon_collision_box.rect, 255, 0, 0] if state.dragon_sprite
    -    outputs.borders << state.walls.flat_map do |w|
    -       w.sprites.map { |s| [s.rect, 255, 0, 0] }
    -    end
    -  end
    -
       def render_flash
         return unless state.flash_at
     
    -    outputs.primitives << [grid.rect,
    -                           white,
    -                           255 * state.flash_at.ease(20, :flip)].solid
    +    outputs.primitives << { **grid.rect.to_hash,
    +                            **white,
    +                            a: 255 * state.flash_at.ease(20, :flip) }.solid!
     
         state.flash_at = 0 if state.flash_at.elapsed_time > 20
       end
    @@ -23582,19 +24302,12 @@ class FlappyDragon
         end
       end
     
    -  def scrolling_background at, path, rate, y = 0
    -    [
    -      [   0 - at.*(rate) % 1440, y, 1440, 720, path],
    -      [1440 - at.*(rate) % 1440, y, 1440, 720, path]
    -    ]
    -  end
    -
       def white
    -    [255, 255, 255]
    +    { r: 255, g: 255, b: 255 }
       end
     
       def large_white_typeset
    -    [5, 0, 255, 255, 255]
    +    { size_enum: 5, alignment_enum: 0, r: 255, g: 255, b: 255 }
       end
     
       def at_beginning?
    @@ -23603,9 +24316,9 @@ class FlappyDragon
     
       def dragon_collision_box
         state.dragon_sprite
    -        .scale_rect(1.0 - collision_forgiveness, 0.5, 0.5)
    -        .rect_shift_right(10)
    -        .rect_shift_up(state.dy * 2)
    +         .scale_rect(1.0 - collision_forgiveness, 0.5, 0.5)
    +         .rect_shift_right(10)
    +         .rect_shift_up(state.dy * 2)
       end
     
       def game_over?
    @@ -23614,7 +24327,7 @@ class FlappyDragon
         state.walls
             .flat_map { |w| w.sprites }
             .any? do |s|
    -          s.intersect_rect?(dragon_collision_box)
    +          s && s.intersect_rect?(dragon_collision_box)
             end
       end
     
    @@ -24990,317 +25703,6 @@ def move_player args, *vector
                         vector.y * args.state.player_speed) # the box will move extremely slow
     end
     
    -
    -

    Crafting - Farming Game Starting Point - repl.rb

    -
    # ./samples/99_genre_crafting/farming_game_starting_point/app/repl.rb
    -# ===============================================================
    -# Welcome to repl.rb
    -# ===============================================================
    -# You can experiement with code within this file. Code in this
    -# file is only executed when you save (and only excecuted ONCE).
    -# ===============================================================
    -
    -# ===============================================================
    -# REMOVE the "x" from the word "xrepl" and save the file to RUN
    -# the code in between the do/end block delimiters.
    -# ===============================================================
    -
    -# ===============================================================
    -# ADD the "x" to the word "repl" (make it xrepl) and save the
    -# file to IGNORE the code in between the do/end block delimiters.
    -# ===============================================================
    -
    -# Remove the x from xrepl to run the code. Add the x back to ignore to code.
    -xrepl do
    -  puts "The result of 1 + 2 is: #{1 + 2}"
    -end
    -
    -# ====================================================================================
    -# Ruby Crash Course:
    -# Strings, Numeric, Booleans, Conditionals, Looping, Enumerables, Arrays
    -# ====================================================================================
    -
    -# ====================================================================================
    -#  Strings
    -# ====================================================================================
    -# Remove the x from xrepl to run the code. Add the x back to ignore to code.
    -xrepl do
    -  message = "Hello World"
    -  puts "The value of message is: " + message
    -  puts "Any value can be interpolated within a string using \#{}."
    -  puts "Interpolated message: #{message}."
    -  puts 'This #{message} is not interpolated because the string uses single quotes.'
    -end
    -
    -# ====================================================================================
    -#  Numerics
    -# ====================================================================================
    -# Remove the x from xrepl to run the code. Add the x back to ignore to code.
    -xrepl do
    -  a = 10
    -  puts "The value of a is: #{a}"
    -  puts "a + 1 is: #{a + 1}"
    -  puts "a / 3 is: #{a / 3}"
    -end
    -
    -# Remove the x from xrepl to run the code. Add the x back to ignore to code.
    -xrepl do
    -  b = 10.12
    -  puts "The value of b is: #{b}"
    -  puts "b + 1 is: #{b + 1}"
    -  puts "b as an integer is: #{b.to_i}"
    -  puts ''
    -end
    -
    -# ====================================================================================
    -#  Booleans
    -# ====================================================================================
    -# Remove the x from xrepl to run the code. Add the x back to ignore to code.
    -xrepl do
    -  c = 30
    -  puts "The value of c is #{c}."
    -
    -  if c
    -    puts "This if statement ran because c is truthy."
    -  end
    -end
    -
    -# Remove the x from xrepl to run the code. Add the x back to ignore to code.
    -xrepl do
    -  d = false
    -  puts "The value of d is #{d}."
    -
    -  if !d
    -    puts "This if statement ran because d is falsey, using the not operator (!) makes d evaluate to true."
    -  end
    -
    -  e = nil
    -  puts "Nil is also considered falsey. The value of e is: #{e}."
    -
    -  if !e
    -    puts "This if statement ran because e is nil (a falsey value)."
    -  end
    -end
    -
    -# ====================================================================================
    -#  Conditionals
    -# ====================================================================================
    -# Remove the x from xrepl to run the code. Add the x back to ignore to code.
    -xrepl do
    -  i_am_true  = true
    -  i_am_nil   = nil
    -  i_am_false = false
    -  i_am_hi    = "hi"
    -
    -  puts "======== if statement"
    -  i_am_one = 1
    -  if i_am_one
    -    puts "This was printed because i_am_one is truthy."
    -  end
    -
    -  puts "======== if/else statement"
    -  if i_am_false
    -    puts "This will NOT get printed because i_am_false is false."
    -  else
    -    puts "This was printed because i_am_false is false."
    -  end
    -
    -  puts "======== if/elsif/else statement"
    -  if i_am_false
    -    puts "This will NOT get printed because i_am_false is false."
    -  elsif i_am_true
    -    puts "This was printed because i_am_true is true."
    -  else
    -    puts "This will NOT get printed i_am_true was true."
    -  end
    -
    -  puts "======== case statement "
    -  i_am_one = 1
    -  case i_am_one
    -  when 10
    -    puts "case equaled: 10"
    -  when 9
    -    puts "case equaled: 9"
    -  when 5
    -    puts "case equaled: 5"
    -  when 1
    -    puts "case equaled: 1"
    -  else
    -    puts "Value wasn't cased."
    -  end
    -
    -  puts "======== different types of comparisons"
    -  if 4 == 4
    -    puts "equal (4 == 4)"
    -  end
    -
    -  if 4 != 3
    -    puts "not equal (4 != 3)"
    -  end
    -
    -  if 3 < 4
    -    puts "less than (3 < 4)"
    -  end
    -
    -  if 4 > 3
    -    puts "greater than (4 > 3)"
    -  end
    -
    -  if ((4 > 3) || (3 < 4) || false)
    -    puts "or statement ((4 > 3) || (3 < 4) || false)"
    -  end
    -
    -  if ((4 > 3) && (3 < 4))
    -    puts "and statement ((4 > 3) && (3 < 4))"
    -  end
    -end
    -
    -# ====================================================================================
    -# Looping
    -# ====================================================================================
    -# Remove the x from xrepl to run the code. Add the x back to ignore to code.
    -xrepl do
    -  puts "======== times block"
    -  3.times do |i|
    -    puts i
    -  end
    -  puts "======== range block exclusive"
    -  (0...3).each do |i|
    -    puts i
    -  end
    -  puts "======== range block inclusive"
    -  (0..3).each do |i|
    -    puts i
    -  end
    -end
    -
    -# ====================================================================================
    -#  Enumerables
    -# ====================================================================================
    -# Remove the x from xrepl to run the code. Add the x back to ignore to code.
    -xrepl do
    -  puts "======== array each"
    -  colors = ["red", "blue", "yellow"]
    -  colors.each do |color|
    -    puts color
    -  end
    -
    -  puts '======== array each_with_index'
    -  colors = ["red", "blue", "yellow"]
    -  colors.each_with_index do |color, i|
    -    puts "#{color} at index #{i}"
    -  end
    -end
    -
    -# Remove the x from xrepl to run the code. Add the x back to ignore to code.
    -xrepl do
    -  puts "======== single parameter function"
    -  def add_one_to n
    -    n + 5
    -  end
    -
    -  puts add_one_to(3)
    -
    -  puts "======== function with default value"
    -  def function_with_default_value v = 10
    -    v * 10
    -  end
    -
    -  puts "passing three: #{function_with_default_value(3)}"
    -  puts "passing nil: #{function_with_default_value}"
    -
    -  puts "======== Or Equal (||=) operator for nil values"
    -  def function_with_nil_default_with_local a = nil
    -    result   = a
    -    result ||= "or equal operator was exected and set a default value"
    -  end
    -
    -  puts "passing 'hi': #{function_with_nil_default_with_local 'hi'}"
    -  puts "passing nil: #{function_with_nil_default_with_local}"
    -end
    -
    -# ====================================================================================
    -#  Arrays
    -# ====================================================================================
    -# Remove the x from xrepl to run the code. Add the x back to ignore to code.
    -xrepl do
    -  puts "======== Create an array with the numbers 1 to 10."
    -  one_to_ten = (1..10).to_a
    -  puts one_to_ten
    -
    -  puts "======== Create a new array that only contains even numbers from the previous array."
    -  one_to_ten = (1..10).to_a
    -  evens = one_to_ten.find_all do |number|
    -    number % 2 == 0
    -  end
    -  puts evens
    -
    -  puts "======== Create a new array that rejects odd numbers."
    -  one_to_ten = (1..10).to_a
    -  also_even = one_to_ten.reject do |number|
    -    number % 2 != 0
    -  end
    -  puts also_even
    -
    -  puts "======== Create an array that doubles every number."
    -  one_to_ten = (1..10).to_a
    -  doubled = one_to_ten.map do |number|
    -    number * 2
    -  end
    -  puts doubled
    -
    -  puts "======== Create an array that selects only odd numbers and then multiply those by 10."
    -  one_to_ten = (1..10).to_a
    -  odd_doubled = one_to_ten.find_all do |number|
    -    number % 2 != 0
    -  end.map do |odd_number|
    -    odd_number * 10
    -  end
    -  puts odd_doubled
    -
    -  puts "======== All combination of numbers 1 to 10."
    -  one_to_ten = (1..10).to_a
    -  all_combinations = one_to_ten.product(one_to_ten)
    -  puts all_combinations
    -
    -  puts "======== All uniq combinations of numbers. For example: [1, 2] is the same as [2, 1]."
    -  one_to_ten = (1..10).to_a
    -  uniq_combinations =
    -    one_to_ten.product(one_to_ten)
    -      .map do |unsorted_number|
    -    unsorted_number.sort
    -  end.uniq
    -  puts uniq_combinations
    -end
    -
    -# ====================================================================================
    -#  Advanced Arrays
    -# ====================================================================================
    -# Remove the x from xrepl to run the code. Add the x back to ignore to code.
    -xrepl do
    -  puts "======== All unique Pythagorean Triples between 1 and 40 sorted by area of the triangle."
    -
    -  one_to_hundred = (1..40).to_a
    -  triples =
    -    one_to_hundred.product(one_to_hundred).map do |width, height|
    -    [width, height, Math.sqrt(width ** 2 + height ** 2)]
    -  end.find_all do |_, _, hypotenuse|
    -    hypotenuse.to_i == hypotenuse
    -  end.map do |triangle|
    -    triangle.map(&:to_i)
    -  end.uniq do |triangle|
    -    triangle.sort
    -  end.map do |width, height, hypotenuse|
    -    [width, height, hypotenuse, (width * height) / 2]
    -  end.sort_by do |_, _, _, area|
    -    area
    -  end
    -
    -  triples.each do |width, height, hypotenuse, area|
    -    puts "(#{width}, #{height}, #{hypotenuse}) = #{area}"
    -  end
    -end
    -
     

    Crafting - Farming Game Starting Point - tests.rb

    # ./samples/99_genre_crafting/farming_game_starting_point/app/tests.rb
    @@ -28441,10 +28843,377 @@ end
     
     $gtk.reset
     
    +
    +

    Mario - Jumping - main.rb

    +
    # ./samples/99_genre_mario/01_jumping/app/main.rb
    +def tick args
    +  defaults args
    +  render args
    +  input args
    +  calc args
    +end
    +
    +def defaults args
    +  args.state.player.x      ||= args.grid.w.half
    +  args.state.player.y      ||= 0
    +  args.state.player.size   ||= 100
    +  args.state.player.dy     ||= 0
    +  args.state.player.action ||= :jumping
    +  args.state.jump.power           = 20
    +  args.state.jump.increase_frames = 10
    +  args.state.jump.increase_power  = 1
    +  args.state.gravity              = -1
    +end
    +
    +def render args
    +  args.outputs.sprites << {
    +    x: args.state.player.x -
    +       args.state.player.size.half,
    +    y: args.state.player.y,
    +    w: args.state.player.size,
    +    h: args.state.player.size,
    +    path: 'sprites/square/red.png'
    +  }
    +end
    +
    +def input args
    +  if args.inputs.keyboard.key_down.space
    +    if args.state.player.action == :standing
    +      args.state.player.action = :jumping
    +      args.state.player.dy = args.state.jump.power
    +
    +      # record when the action took place
    +      current_frame = args.state.tick_count
    +      args.state.player.action_at = current_frame
    +    end
    +  end
    +
    +  # if the space bar is being held
    +  if args.inputs.keyboard.key_held.space
    +    # is the player jumping
    +    is_jumping = args.state.player.action == :jumping
    +
    +    # when was the jump performed
    +    time_of_jump = args.state.player.action_at
    +
    +    # how much time has passed since the jump
    +    jump_elapsed_time = time_of_jump.elapsed_time
    +
    +    # how much time is allowed for increasing power
    +    time_allowed = args.state.jump.increase_frames
    +
    +    # if the player is jumping
    +    # and the elapsed time is less than
    +    # the allowed time
    +    if is_jumping && jump_elapsed_time < time_allowed
    +       # increase the dy by the increase power
    +       power_to_add = args.state.jump.increase_power
    +       args.state.player.dy += power_to_add
    +    end
    +  end
    +end
    +
    +def calc args
    +  if args.state.player.action == :jumping
    +    args.state.player.y  += args.state.player.dy
    +    args.state.player.dy += args.state.gravity
    +  end
    +
    +  if args.state.player.y < 0
    +    args.state.player.y      = 0
    +    args.state.player.action = :standing
    +  end
    +end
    +
    +
    +

    Mario - Jumping And Collisions - main.rb

    +
    # ./samples/99_genre_mario/02_jumping_and_collisions/app/main.rb
    +class Game
    +  attr_gtk
    +
    +  def tick
    +    defaults
    +    render
    +    input
    +    calc
    +  end
    +
    +  def defaults
    +    return if state.tick_count != 0
    +
    +    player.x                     = 64
    +    player.y                     = 800
    +    player.size                  = 50
    +    player.dx                    = 0
    +    player.dy                    = 0
    +    player.action                = :falling
    +
    +    player.max_speed             = 20
    +    player.jump_power            = 15
    +    player.jump_air_time         = 15
    +    player.jump_increase_power   = 1
    +
    +    state.gravity                = -1
    +    state.drag                   = 0.001
    +    state.tile_size              = 64
    +    state.tiles                ||= [
    +      { ordinal_x:  0, ordinal_y: 0 },
    +      { ordinal_x:  1, ordinal_y: 0 },
    +      { ordinal_x:  2, ordinal_y: 0 },
    +      { ordinal_x:  3, ordinal_y: 0 },
    +      { ordinal_x:  4, ordinal_y: 0 },
    +      { ordinal_x:  5, ordinal_y: 0 },
    +      { ordinal_x:  6, ordinal_y: 0 },
    +      { ordinal_x:  7, ordinal_y: 0 },
    +      { ordinal_x:  8, ordinal_y: 0 },
    +      { ordinal_x:  9, ordinal_y: 0 },
    +      { ordinal_x: 10, ordinal_y: 0 },
    +      { ordinal_x: 11, ordinal_y: 0 },
    +      { ordinal_x: 12, ordinal_y: 0 },
    +
    +      { ordinal_x:  9, ordinal_y: 3 },
    +      { ordinal_x: 10, ordinal_y: 3 },
    +      { ordinal_x: 11, ordinal_y: 3 },
    +    ]
    +
    +    tiles.each do |t|
    +      t.rect = { x: t.ordinal_x * 64,
    +                 y: t.ordinal_y * 64,
    +                 w: 64,
    +                 h: 64 }
    +    end
    +  end
    +
    +  def render
    +    render_player
    +    render_tiles
    +    # render_grid
    +  end
    +
    +  def input
    +    input_jump
    +    input_move
    +  end
    +
    +  def calc
    +    calc_player_rect
    +    calc_left
    +    calc_right
    +    calc_below
    +    calc_above
    +    calc_player_dy
    +    calc_player_dx
    +    calc_game_over
    +  end
    +
    +  def render_player
    +    outputs.sprites << {
    +      x: player.x,
    +      y: player.y,
    +      w: player.size,
    +      h: player.size,
    +      path: 'sprites/square/red.png'
    +    }
    +  end
    +
    +  def render_tiles
    +    outputs.sprites << state.tiles.map do |t|
    +      t.merge path: 'sprites/square/white.png',
    +              x: t.ordinal_x * 64,
    +              y: t.ordinal_y * 64,
    +              w: 64,
    +              h: 64
    +    end
    +  end
    +
    +  def render_grid
    +    if state.tick_count == 0
    +      outputs[:grid].background_color = [0, 0, 0, 0]
    +      outputs[:grid].borders << available_brick_locations
    +      outputs[:grid].labels  << available_brick_locations.map do |b|
    +        [
    +          b.merge(text: "#{b.ordinal_x},#{b.ordinal_y}",
    +                  x: b.x + 2,
    +                  y: b.y + 2,
    +                  size_enum: -3,
    +                  vertical_alignment_enum: 0,
    +                  blendmode_enum: 0),
    +          b.merge(text: "#{b.x},#{b.y}",
    +                  x: b.x + 2,
    +                  y: b.y + 2 + 20,
    +                  size_enum: -3,
    +                  vertical_alignment_enum: 0,
    +                  blendmode_enum: 0)
    +        ]
    +      end
    +    end
    +
    +    outputs.sprites << { x: 0, y: 0, w: 1280, h: 720, path: :grid }
    +  end
    +
    +  def input_jump
    +    if inputs.keyboard.key_down.space
    +      player_jump
    +    end
    +
    +    if inputs.keyboard.key_held.space
    +      player_jump_increase_air_time
    +    end
    +  end
    +
    +  def input_move
    +    if player.dx.abs < 20
    +      if inputs.keyboard.left
    +        player.dx -= 2
    +      elsif inputs.keyboard.right
    +        player.dx += 2
    +      end
    +    end
    +  end
    +
    +  def calc_game_over
    +    if player.y < -64
    +      player.x = 64
    +      player.y = 800
    +      player.dx = 0
    +      player.dy = 0
    +    end
    +  end
    +
    +  def calc_player_rect
    +    player.rect      = player_current_rect
    +    player.next_rect = player_next_rect
    +    player.prev_rect = player_prev_rect
    +  end
    +
    +  def calc_player_dx
    +    player.dx  = player_next_dx
    +    player.x  += player.dx
    +  end
    +
    +  def calc_player_dy
    +    player.y  += player.dy
    +    player.dy  = player_next_dy
    +  end
    +
    +  def calc_below
    +    return unless player.dy < 0
    +    tiles_below = tiles_find { |t| t.rect.top <= player.prev_rect.y }
    +    collision = tiles_find_colliding tiles_below, (player.rect.merge y: player.next_rect.y)
    +    if collision
    +      player.y  = collision.rect.y + state.tile_size
    +      player.dy = 0
    +      player.action = :standing
    +    else
    +      player.action = :falling
    +    end
    +  end
    +
    +  def calc_left
    +    return unless player.dx < 0 && player_next_dx < 0
    +    tiles_left = tiles_find { |t| t.rect.right <= player.prev_rect.left }
    +    collision = tiles_find_colliding tiles_left, (player.rect.merge x: player.next_rect.x)
    +    return unless collision
    +    player.x  = collision.rect.right
    +    player.dx = 0
    +  end
    +
    +  def calc_right
    +    return unless player.dx > 0 && player_next_dx > 0
    +    tiles_right = tiles_find { |t| t.rect.left >= player.prev_rect.right }
    +    collision = tiles_find_colliding tiles_right, (player.rect.merge x: player.next_rect.x)
    +    return unless collision
    +    player.x  = collision.rect.left - player.rect.w
    +    player.dx = 0
    +  end
    +
    +  def calc_above
    +    return unless player.dy > 0
    +    tiles_above = tiles_find { |t| t.rect.y >= player.prev_rect.y }
    +    collision = tiles_find_colliding tiles_above, (player.rect.merge y: player.next_rect.y)
    +    return unless collision
    +    player.dy = 0
    +    player.y  = collision.rect.bottom - player.rect.h
    +  end
    +
    +  def player_current_rect
    +    { x: player.x, y: player.y, w: player.size, h: player.size }
    +  end
    +
    +  def available_brick_locations
    +    (0..19).to_a
    +      .product(0..11)
    +      .map do |(ordinal_x, ordinal_y)|
    +      { ordinal_x: ordinal_x,
    +        ordinal_y: ordinal_y,
    +        x: ordinal_x * 64,
    +        y: ordinal_y * 64,
    +        w: 64,
    +        h: 64 }
    +    end
    +  end
    +
    +  def player
    +    state.player ||= args.state.new_entity :player
    +  end
    +
    +  def player_next_dy
    +    player.dy + state.gravity + state.drag ** 2 * -1
    +  end
    +
    +  def player_next_dx
    +    player.dx * 0.8
    +  end
    +
    +  def player_next_rect
    +    player.rect.merge x: player.x + player_next_dx,
    +                      y: player.y + player_next_dy
    +  end
    +
    +  def player_prev_rect
    +    player.rect.merge x: player.x - player.dx,
    +                      y: player.y - player.dy
    +  end
    +
    +  def player_jump
    +    return if player.action != :standing
    +    player.action = :jumping
    +    player.dy = state.player.jump_power
    +    current_frame = state.tick_count
    +    player.action_at = current_frame
    +  end
    +
    +  def player_jump_increase_air_time
    +    return if player.action != :jumping
    +    return if player.action_at.elapsed_time >= player.jump_air_time
    +    player.dy += player.jump_increase_power
    +  end
    +
    +  def tiles
    +    state.tiles
    +  end
    +
    +  def tiles_find_colliding tiles, target
    +    tiles.find { |t| t.rect.intersect_rect? target }
    +  end
    +
    +  def tiles_find &block
    +    tiles.find_all(&block)
    +  end
    +end
    +
    +def tick args
    +  $game ||= Game.new
    +  $game.args = args
    +  $game.tick
    +end
    +
    +$gtk.reset
    +
     

    Platformer - Clepto Frog - main.rb

    # ./samples/99_genre_platformer/clepto_frog/app/main.rb
    -MAP_FILE_PATH = 'app/map.txt'
    +MAP_FILE_PATH = 'map.txt'
     
     require 'app/map.rb'
     
    @@ -28499,35 +29268,7 @@ class CleptoFrog
     
       def render_intro
         outputs.labels << [640, 700, "Clepto Frog", 4, 1]
    -    if state.tick_count >= 120
    -      outputs.labels << [640, 620, "\"Uh... your office has a pet frog?\" - New Guy",
    -                         4, 1, 0, 0, 0, 255 * 120.ease(60)]
    -    end
    -
    -    if state.tick_count >= 240
    -      outputs.labels << [640, 580, "\"Yep! His name is Clepto.\" - Jim",
    -                         4, 1, 0, 0, 0, 255 * 240.ease(60)]
    -    end
    -
    -    if state.tick_count >= 360
    -      outputs.labels << [640, 540, "\"Uh...\" - New Guy",
    -                         4, 1, 0, 0, 0, 255 * 360.ease(60)]
    -    end
    -
    -    if state.tick_count >= 480
    -      outputs.labels << [640, 500, "\"He steals mugs while we're away...\" - Jim",
    -                         4, 1, 0, 0, 0, 255 * 480.ease(60)]
    -    end
    -
    -    if state.tick_count >= 600
    -      outputs.labels << [640, 460, "\"It's not a big deal, we take them back in the morning.\" - Jim",
    -                         4, 1, 0, 0, 0, 255 * 600.ease(60)]
    -    end
    -
    -    outputs.sprites << [640 - 50, 360 - 50, 100, 100,
    -                        "sprites/square-green.png"]
    -
    -    if state.tick_count == 800
    +    if state.tick_count == 120
           state.scene = :game
           state.game_start_at = state.tick_count
         end
    @@ -28535,7 +29276,7 @@ class CleptoFrog
     
       def tick
         defaults
    -    if state.scene == :intro && state.tick_count <= 800
    +    if state.scene == :intro && state.tick_count <= 120
           render_intro
         elsif state.scene == :ending
           render_ending
    @@ -28638,15 +29379,15 @@ class CleptoFrog
     
         if state.god_mode
           # SHOW HIDE COLLISIONS
    -      outputs.sprites << state.world.map do |x, y, w, h|
    -        x = vx(x)
    -        y = vy(y)
    +      outputs.sprites << state.world.map do |rect|
    +        x = vx(rect.x)
    +        y = vy(rect.y)
             if x > -80 && x < 1280 && y > -80 && y < 720
               {
                 x: x,
                 y: y,
    -            w: vw(w || state.tile_size),
    -            h: vh(h || state.tile_size),
    +            w: vw(rect.w || state.tile_size),
    +            h: vh(rect.h || state.tile_size),
                 path: 'sprites/square-gray.png',
                 a: 128
               }
    @@ -28669,8 +29410,10 @@ class CleptoFrog
     
     
           # Creates sprite following mouse to help indicate which sprite you have selected
    -      outputs.primitives << [inputs.mouse.position.x, inputs.mouse.position.y,
    -                             state.tile_size, state.tile_size, 'sprites/square-indigo.png', 0, 100].sprite
    +      outputs.primitives << [inputs.mouse.position.x - 32 * state.camera_scale,
    +                             inputs.mouse.position.y - 32 * state.camera_scale,
    +                             state.tile_size * state.camera_scale,
    +                             state.tile_size * state.camera_scale, 'sprites/square-indigo.png', 0, 100].sprite
         end
     
         render_mini_map
    @@ -28751,6 +29494,29 @@ class CleptoFrog
           set_camera_scale 1
         end
     
    +    if inputs.mouse.click
    +      state.id_seed += 1
    +      id = state.id_seed
    +      x = state.camera_x + (inputs.mouse.click.x.fdiv(state.camera_scale) - 32)
    +      y = state.camera_y + (inputs.mouse.click.y.fdiv(state.camera_scale) - 32)
    +      x = ((x + 2).idiv 4) * 4
    +      y = ((y + 2).idiv 4) * 4
    +      w = 64
    +      h = 64
    +      candidate_rect = { id: id, x: x, y: y, w: w, h: h }
    +      scaled_candidate_rect = { x: x + 30, y: y + 30, w: w - 60, h: h - 60 }
    +      to_remove = state.world.find { |r| r.intersect_rect? scaled_candidate_rect }
    +      if to_remove && args.inputs.keyboard.x
    +        state.world.reject! { |r| r.id == to_remove.id }
    +      else
    +        state.world << candidate_rect
    +      end
    +      export_map
    +      state.world_lookup = {}
    +      state.world_collision_rects = nil
    +      calc_world_lookup
    +    end
    +
         if input_up?
           state.y += 10
           state.dy = 0
    @@ -28772,12 +29538,6 @@ class CleptoFrog
         if state.scene == :game
           process_inputs_player_movement
           process_inputs_god_mode
    -    elsif state.scene == :intro
    -      if args.inputs.keyboard.key_down.enter || args.inputs.keyboard.key_down.space
    -        if Kernel.tick_count < 600
    -          Kernel.tick_count = 600
    -        end
    -      end
         end
       end
     
    @@ -28875,17 +29635,6 @@ class CleptoFrog
         end
       end
     
    -  def add_floors
    -    # floors
    -    state.world += [
    -      [0,       0, 10000, 40],
    -      [0,    1670, 3250, 60],
    -      [6691, 1653, 3290, 60],
    -      [1521, 3792, 7370, 60],
    -      [0, 5137, 3290, 60]
    -    ]
    -  end
    -
       def attempt_load_world_from_file
         return if state.world
         # exported_world = gtk.read_file(MAP_FILE_PATH)
    @@ -28893,26 +29642,11 @@ class CleptoFrog
         state.objects = []
     
         if $collisions
    -      $collisions.map do |x, y, w, h|
    -        state.world << [x, y, w, h]
    +      state.id_seed ||= 0
    +      $collisions.each do |x, y, w, h|
    +        state.id_seed += 1
    +        state.world << { id: state.id_seed, x: x, y: y, w: w, h: h }
           end
    -
    -      add_floors
    -    # elsif exported_world
    -    #   exported_world.each_line.map do |l|
    -    #     tokens = l.strip.split(',')
    -    #     x    = tokens[0].to_i
    -    #     y    = tokens[1].to_i
    -    #     type = tokens[2].to_i
    -    #     if type == 1
    -    #       state.world << [x, y, state.tile_size, state.tile_size]
    -    #     elsif type == 2
    -    #       w, h, path = tokens[3..-1]
    -    #       state.objects << [x, y, w.to_i, h.to_i, path]
    -    #     end
    -    #   end
    -
    -    #   add_floors
         end
     
         if $mugs
    @@ -28933,23 +29667,24 @@ class CleptoFrog
     
         # Searches through the world and finds the cordinates that exist
         state.world_lookup = {}
    -    state.world.each do |x, y, w, h|
    -      state.world_lookup[[x, y, w || state.tile_size, h || state.tile_size]] = true
    +    state.world.each do |rect|
    +      state.world_lookup[rect.id] = rect
         end
     
         # Assigns collision rects for every sprite drawn
         state.world_collision_rects =
           state.world_lookup
                .keys
    -           .map do |x, y, w, h|
    +           .map do |key|
    +             rect = state.world_lookup[key]
                  s = state.tile_size
    -             w ||= s
    -             h ||= s
    +             rect.w ||= s
    +             rect.h ||= s
                  {
    -               args:       [x, y, w, h],
    -               left_right: [x,     y + 4, w,     h - 6],
    -               top:        [x + 4, y + 6, w - 8, h - 6],
    -               bottom:     [x + 1, y - 1, w - 2, h - 8],
    +               args:       rect,
    +               left_right: { x: rect.x,     y: rect.y + 4, w: rect.w,     h: rect.h - 6 },
    +               top:        { x: rect.x + 4, y: rect.y + 6, w: rect.w - 8, h: rect.h - 6 },
    +               bottom:     { x: rect.x + 1, y: rect.y - 1, w: rect.w - 2, h: rect.h - 8 },
                  }
                end
     
    @@ -29005,12 +29740,21 @@ class CleptoFrog
     
       def end_of_tongue
         p = state.tongue_angle.vector(state.tongue_length)
    -    [start_of_tongue.x + p.x, start_of_tongue.y + p.y]
    +    { x: start_of_tongue.x + p.x, y: start_of_tongue.y + p.y }
       end
     
       def calc_shooting
    +    calc_shooting_increment
    +    calc_shooting_increment
    +    calc_shooting_increment
    +    calc_shooting_increment
    +    calc_shooting_increment
    +    calc_shooting_increment
    +  end
    +
    +  def calc_shooting_increment
         return unless state.action == :shooting
    -    state.tongue_length += 30
    +    state.tongue_length += 5
         potential_anchor = end_of_tongue
         if potential_anchor.x <= 0
           state.anchor_point = potential_anchor
    @@ -29029,9 +29773,9 @@ class CleptoFrog
           state.action = :anchored
           outputs.sounds << 'sounds/attached.wav'
         else
    -      anchor_rect = [potential_anchor.x - 5, potential_anchor.y - 5, 10, 10]
    +      anchor_rect = { x: potential_anchor.x - 5, y: potential_anchor.y - 5, w: 10, h: 10 }
           collision = state.world_collision_rects.find_all do |v|
    -        [v[:args].x, v[:args].y, v[:args].w, v[:args].h].intersect_rect?(anchor_rect)
    +        v[:args].intersect_rect?(anchor_rect)
           end.first
           if collision
             state.anchor_point = potential_anchor
    @@ -29127,7 +29871,7 @@ class CleptoFrog
                                  .first
     
         return unless left_side_collisions
    -    state.x = left_side_collisions[:left_right].right
    +    state.x = left_side_collisions[:left_right].right + 1
         state.dx = state.dy.abs * 0.8
         state.collision_on_x = true
       end
    @@ -29142,7 +29886,7 @@ class CleptoFrog
                                   .first
     
         return unless right_side_collisions
    -    state.x = right_side_collisions[:left_right].left - state.tile_size
    +    state.x = right_side_collisions[:left_right].left - state.tile_size - 1
         state.dx = state.dx.abs * 0.8 * -1
         state.collision_on_x = true
       end
    @@ -29158,7 +29902,7 @@ class CleptoFrog
                             .first
     
         return unless ceil_collisions
    -    state.y = ceil_collisions[:bottom].y - state.tile_size
    +    state.y = ceil_collisions[:bottom].y - state.tile_size - 1
         state.dy = state.dy.abs * 0.8 * -1
         state.collision_on_y = true
       end
    @@ -29171,13 +29915,17 @@ class CleptoFrog
       end
     
       def export_map
    -    export_string = state.world.map do |x, y|
    -      "#{x},#{y},1"
    -    end
    +    export_string = "$collisions = [\n"
    +    export_string += state.world.map do |rect|
    +      "[#{rect.x},#{rect.y},#{rect.w},#{rect.h}],"
    +    end.join "\n"
    +    export_string += "\n]\n\n"
    +    export_string += "$mugs = [\n"
         export_string += state.objects.map do |x, y, w, h, path|
    -      "#{x},#{y},2,#{w},#{h},#{path}"
    -    end
    -    gtk.write_file(MAP_FILE_PATH, export_string.join("\n"))
    +      "[#{x},#{y},#{w},#{h},'#{path}'],"
    +    end.join "\n"
    +    export_string += "\n]\n\n"
    +    gtk.write_file(MAP_FILE_PATH, export_string)
         state.map_saved_at = state.tick_count
       end
     
    @@ -30303,6 +31051,11 @@ $collisions = [
       [4459, 3997, 64, 64],
       [76, 5215, 64, 64],
       [39, 5217, 64, 64],
    +  [0,       0, 10000, 40],
    +  [0,    1670, 3250, 60],
    +  [6691, 1653, 3290, 60],
    +  [1521, 3792, 7370, 60],
    +  [0, 5137, 3290, 60]
     ]
     
     $mugs = [
    @@ -31148,6 +31901,7 @@ class FallingCircle
       end
     
       def load_lines file
    +    return unless state.snaps
         data = gtk.read_file(file) || ""
         data.each_line
             .reject { |l| l.strip.length == 0 }
    @@ -31206,10 +31960,10 @@ class FallingCircle
         results[:point] = { x: x, y: y }
         results[:rect] = { x: x - radius, y: y - radius, w: radius * 2, h: radius * 2 }
         results[:trajectory] = trajectory(results)
    -    results[:impacts] = terrain.find_all { |t| line_near_rect? results[:rect], t }.map do |t|
    +    results[:impacts] = terrain.find_all { |t| t && (line_near_rect? results[:rect], t) }.map do |t|
           {
             terrain: t,
    -        point: geometry.line_intersect(results[:trajectory], t),
    +        point: geometry.line_intersect(results[:trajectory], t, replace_infinity: 1000),
             type: :terrain
           }
         end.reject { |t| !point_within_line? t[:point], t[:terrain] }
    @@ -31217,10 +31971,10 @@ class FallingCircle
         results[:impacts] += lava.find_all { |t| line_near_rect? results[:rect], t }.map do |t|
           {
             terrain: t,
    -        point: geometry.line_intersect(results[:trajectory], t),
    +        point: geometry.line_intersect(results[:trajectory], t, replace_infinity: 1000),
             type: :lava
           }
    -    end.reject { |t| !point_within_line? t[:point], t[:terrain] }
    +    end.reject { |t| !t || (!point_within_line? t[:point], t[:terrain]) }
     
         results
       end
    @@ -31233,6 +31987,7 @@ class FallingCircle
       end
     
       def calc_terrains_to_monitor
    +    return unless circle.impacts
         circle.impact = nil
         circle.impacts.each do |i|
           circle.terrains_to_monitor[i[:terrain]] ||= {
    @@ -36732,6 +37487,149 @@ def tick args
         $isometric.tick
     end
     
    +
    +

    Rpg Topdown - Topdown Casino - main.rb

    +
    # ./samples/99_genre_rpg_topdown/topdown_casino/app/main.rb
    +$gtk.reset
    +
    +def coinflip
    +  rand < 0.5
    +end
    +
    +class Game
    +  attr_accessor :args
    +
    +  def text_font
    +    return nil #"rpg.ttf"
    +  end
    +
    +  def text_color
    +    [ 255, 255, 255, 255 ]
    +  end
    +
    +  def set_gem_values
    +    @args.state.gem0 = ((coinflip) ?  100 : 20)
    +    @args.state.gem1 = ((coinflip) ? -10 : -50)
    +    @args.state.gem2 = ((coinflip) ? -10 : -30)
    +    if coinflip
    +      tmp = @args.state.gem0
    +      @args.state.gem0 = @args.state.gem1
    +      @args.state.gem1 = tmp
    +    end
    +    if coinflip
    +      tmp = @args.state.gem1
    +      @args.state.gem1 = @args.state.gem2
    +      @args.state.gem2 = tmp
    +    end
    +    if coinflip
    +      tmp = @args.state.gem0
    +      @args.state.gem0 = @args.state.gem2
    +      @args.state.gem2 = tmp
    +    end
    +  end
    +
    +  def initialize args
    +    @args = args
    +    @args.state.animticks = 0
    +    @args.state.score = 0
    +    @args.state.gem_chosen = false
    +    @args.state.round_finished = false
    +    @args.state.gem0_x = 197
    +    @args.state.gem0_y = 720-274
    +    @args.state.gem1_x = 623
    +    @args.state.gem1_y = 720-274
    +    @args.state.gem2_x = 1049
    +    @args.state.gem2_y = 720-274
    +    @args.state.hero_sprite = "sprites/herodown100.png"
    +    @args.state.hero_x = 608
    +    @args.state.hero_y = 720-656
    +    set_gem_values
    +  end
    +
    +  def render_gem_value x, y, gem
    +    if @args.state.gem_chosen
    +      @args.outputs.labels << [ x, y + 96, gem.to_s, 1, 1, *text_color, text_font ]
    +    end
    +  end
    +
    +  def render
    +    gemsprite = ((@args.state.animticks % 400) < 200) ? 'sprites/gem200.png' : 'sprites/gem400.png'
    +    @args.outputs.background_color = [ 0, 0, 0, 255 ]
    +    @args.outputs.sprites << [608, 720-150, 64, 64, 'sprites/oldman.png']
    +    @args.outputs.sprites << [300, 720-150, 64, 64, 'sprites/fire.png']
    +    @args.outputs.sprites << [900, 720-150, 64, 64, 'sprites/fire.png']
    +    @args.outputs.sprites << [@args.state.gem0_x, @args.state.gem0_y, 32, 64, gemsprite]
    +    @args.outputs.sprites << [@args.state.gem1_x, @args.state.gem1_y, 32, 64, gemsprite]
    +    @args.outputs.sprites << [@args.state.gem2_x, @args.state.gem2_y, 32, 64, gemsprite]
    +    @args.outputs.sprites << [@args.state.hero_x, @args.state.hero_y, 64, 64, @args.state.hero_sprite]
    +
    +    @args.outputs.labels << [ 630, 720-30, "IT'S A SECRET TO EVERYONE.", 1, 1, *text_color, text_font ]
    +    @args.outputs.labels << [ 50, 720-85, @args.state.score.to_s, 1, 1, *text_color, text_font ]
    +    render_gem_value @args.state.gem0_x, @args.state.gem0_y, @args.state.gem0
    +    render_gem_value @args.state.gem1_x, @args.state.gem1_y, @args.state.gem1
    +    render_gem_value @args.state.gem2_x, @args.state.gem2_y, @args.state.gem2
    +  end
    +
    +  def calc
    +    @args.state.animticks += 16
    +
    +    return unless @args.state.gem_chosen
    +    @args.state.round_finished_debounce ||= 60 * 3
    +    @args.state.round_finished_debounce -= 1
    +    return if @args.state.round_finished_debounce > 0
    +
    +    @args.state.gem_chosen = false
    +    @args.state.hero.sprite[0] = 'sprites/herodown100.png'
    +    @args.state.hero.sprite[1] = 608
    +    @args.state.hero.sprite[2] = 656
    +    @args.state.round_finished_debounce = nil
    +    set_gem_values
    +  end
    +
    +  def walk xdir, ydir, anim
    +    @args.state.hero_sprite = "sprites/#{anim}#{(((@args.state.animticks % 200) < 100) ? '100' : '200')}.png"
    +    @args.state.hero_x += 5 * xdir
    +    @args.state.hero_y += 5 * ydir
    +  end
    +
    +  def check_gem_touching gem_x, gem_y, gem
    +    return if @args.state.gem_chosen
    +    herorect = [ @args.state.hero_x, @args.state.hero_y, 64, 64 ]
    +    return if !herorect.intersect_rect?([gem_x, gem_y, 32, 64])
    +    @args.state.gem_chosen = true
    +    @args.state.score += gem
    +    @args.outputs.sounds << ((gem < 0) ? 'sounds/lose.wav' : 'sounds/win.wav')
    +  end
    +
    +  def input
    +    if @args.inputs.keyboard.key_held.left
    +      walk(-1.0, 0.0, 'heroleft')
    +    elsif @args.inputs.keyboard.key_held.right
    +      walk(1.0, 0.0, 'heroright')
    +    elsif @args.inputs.keyboard.key_held.up
    +      walk(0.0, 1.0, 'heroup')
    +    elsif @args.inputs.keyboard.key_held.down
    +      walk(0.0, -1.0, 'herodown')
    +    end
    +
    +    check_gem_touching(@args.state.gem0_x, @args.state.gem0_y, @args.state.gem0)
    +    check_gem_touching(@args.state.gem1_x, @args.state.gem1_y, @args.state.gem1)
    +    check_gem_touching(@args.state.gem2_x, @args.state.gem2_y, @args.state.gem2)
    +  end
    +
    +  def tick
    +    input
    +    calc
    +    render
    +  end
    +end
    +
    +def tick args
    +    args.state.game ||= Game.new args
    +    args.state.game.args = args
    +    args.state.game.tick
    +end
    +
     

    Rpg Topdown - Topdown Starting Point - main.rb

    # ./samples/99_genre_rpg_topdown/topdown_starting_point/app/main.rb
    @@ -36844,6 +37742,185 @@ def move_player args, *vector
                         vector.y * args.state.player_speed) # the box will move extremely slow
     end
     
    +
    +

    Teenytiny - Teenytiny Starting Point - main.rb

    +
    # ./samples/99_genre_teenytiny/teenytiny_starting_point/app/main.rb
    +# full documenation is at http://docs.dragonruby.org
    +# be sure to come to the discord if you hit any snags: http://discord.dragonruby.org
    +def tick args
    +  # ====================================================
    +  # initialize default variables
    +  # ====================================================
    +
    +  # ruby has an operator called ||= which means "only initialize this if it's nil"
    +  args.state.count_down   ||= 20 * 60 # set the count down to 20 seconds
    +  # set the initial position of the target
    +  args.state.target       ||= { x: args.grid.w.half,
    +                                y: args.grid.h.half,
    +                                w: 20,
    +                                h: 20 }
    +
    +  # set the initial position of the player
    +  args.state.player       ||= { x: 50,
    +                                y: 50,
    +                                w: 20,
    +                                h: 20 }
    +
    +  # set the player movement speed
    +  args.state.player_speed ||= 5
    +
    +  # set the score
    +  args.state.score        ||= 0
    +  args.state.teleports    ||= 3
    +
    +  # set the instructions
    +  args.state.instructions ||= "Get to the red goal! Use arrow keys to move. Spacebar to teleport (use them carefully)!"
    +
    +  # ====================================================
    +  # render the game
    +  # ====================================================
    +  args.outputs.labels  << { x: args.grid.w.half, y: args.grid.h - 10,
    +                            text: args.state.instructions,
    +                            alignment_enum: 1 }
    +
    +  # check if it's game over. if so, then render game over
    +  # otherwise render the current time left
    +  if game_over? args
    +    args.outputs.labels  << { x: args.grid.w.half,
    +                              y: args.grid.h - 40,
    +                              text: "game over! (press r to start over)",
    +                              alignment_enum: 1 }
    +  else
    +    args.outputs.labels  << { x: args.grid.w.half,
    +                              y: args.grid.h - 40,
    +                              text: "time left: #{(args.state.count_down.idiv 60) + 1}",
    +                              alignment_enum: 1 }
    +  end
    +
    +  # render the score
    +  args.outputs.labels  << { x: args.grid.w.half,
    +                            y: args.grid.h - 70,
    +                            text: "score: #{args.state.score}",
    +                            alignment_enum: 1 }
    +
    +  # render the player with teleport count
    +  args.outputs.sprites << { x: args.state.player.x,
    +                            y: args.state.player.y,
    +                            w: args.state.player.w,
    +                            h: args.state.player.h,
    +                            path: 'sprites/square-green.png' }
    +
    +  args.outputs.labels << { x: args.state.player.x + 10,
    +                           y: args.state.player.y + 40,
    +                           text: "teleports: #{args.state.teleports}",
    +                           alignment_enum: 1, size_enum: -2 }
    +
    +  # render the target
    +  args.outputs.sprites << { x: args.state.target.x,
    +                            y: args.state.target.y,
    +                            w: args.state.target.w,
    +                            h: args.state.target.h,
    +                            path: 'sprites/square-red.png' }
    +
    +  # ====================================================
    +  # run simulation
    +  # ====================================================
    +
    +  # count down calculation
    +  args.state.count_down -= 1
    +  args.state.count_down = -1 if args.state.count_down < -1
    +
    +  # ====================================================
    +  # process player input
    +  # ====================================================
    +  # if it isn't game over let them move
    +  if !game_over? args
    +    dir_y = 0
    +    dir_x = 0
    +
    +    # determine the change horizontally
    +    if args.inputs.keyboard.up
    +      dir_y += args.state.player_speed
    +    elsif args.inputs.keyboard.down
    +      dir_y -= args.state.player_speed
    +    end
    +
    +    # determine the change vertically
    +    if args.inputs.keyboard.left
    +      dir_x -= args.state.player_speed
    +    elsif args.inputs.keyboard.right
    +      dir_x += args.state.player_speed
    +    end
    +
    +    # determine if teleport can be used
    +    if args.inputs.keyboard.key_down.space && args.state.teleports > 0
    +      args.state.teleports -= 1
    +      dir_x *= 20
    +      dir_y *= 20
    +    end
    +
    +    # apply change to player
    +    args.state.player.x += dir_x
    +    args.state.player.y += dir_y
    +  else
    +    # if r is pressed, reset the game
    +    if args.inputs.keyboard.key_down.r
    +      $gtk.reset
    +      return
    +    end
    +  end
    +
    +  # ====================================================
    +  # determine score
    +  # ====================================================
    +
    +  # calculate new score if the player is at goal
    +  if !game_over? args
    +
    +    # if the player is at the goal, then move the goal
    +    if args.state.player.intersect_rect? args.state.target
    +      # increment the goal
    +      args.state.score += 1
    +
    +      # move the goal to a random location
    +      args.state.target = { x: (rand args.grid.w), y: (rand args.grid.h), w: 20, h: 20 }
    +
    +      # make sure the goal is inside the view area
    +      if args.state.target.x < 0
    +        args.state.target.x += 20
    +      elsif args.state.target.x > 1280
    +        args.state.target.x -= 20
    +      end
    +
    +      # make sure the goal is inside the view area
    +      if args.state.target.y < 0
    +        args.state.target.y += 20
    +      elsif args.state.target.y > 720
    +        args.state.target.y -= 20
    +      end
    +    end
    +  end
    +end
    +
    +def game_over? args
    +  args.state.count_down < 0
    +end
    +
    +$gtk.reset
    +
    +
    +

    Teenytiny - Teenytiny Starting Point - license.txt

    +
    # ./samples/99_genre_teenytiny/teenytiny_starting_point/license.txt
    +Copyright 2019 DragonRuby LLC
    +
    +MIT License
    +
    +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
    +
    +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
    +
    +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
    +
     

    OSS

    @@ -36863,6 +37940,7 @@ module GTK class Args include ArgsDeprecated include Serialize + attr_accessor :cvars attr_accessor :inputs attr_accessor :outputs attr_accessor :audio @@ -36883,6 +37961,7 @@ module GTK def initialize runtime, recording @inputs = Inputs.new @outputs = Outputs.new args: self + @cvars = {} @audio = {} @passes = [] @state = OpenEntity.new @@ -37053,6 +38132,23 @@ module GTK def autocomplete_methods [:inputs, :outputs, :gtk, :state, :geometry, :audio, :grid, :layout, :fn] end + + def method_missing name, *args, &block + if (args.length <= 1) && (@state.as_hash.key? name) + raise <<-S +* ERROR - :#{name} method missing on ~#{self.class.name}~. +The method + :#{name} +with args + #{args} +doesn't exist on #{inspect}. +** POSSIBLE SOLUTION - ~args.state.#{name}~ exists. +Did you forget ~.state~ before ~.#{name}~? +S + end + + super + end end end @@ -37340,14 +38436,17 @@ module GTK class Console include ConsoleDeprecated - attr_accessor :show_reason, :log, :logo, :background_color, - :text_color, :animation_duration, + attr_accessor :show_reason, :log, :logo, + :animation_duration, :max_log_lines, :max_history, :log, - :last_command_errored, :last_command, :error_color, :shown_at, - :header_color, :archived_log, :last_log_lines, :last_log_lines_count, + :last_command_errored, :last_command, :shown_at, + :archived_log, :last_log_lines, :last_log_lines_count, :suppress_left_arrow_behavior, :command_set_at, :toast_ids, :bottom, - :font_style, :menu + :font_style, :menu, + :background_color, :spam_color, :text_color, :warn_color, + :error_color, :header_color, :code_color, :comment_color, + :debug_color, :unfiltered_color def initialize @font_style = FontStyle.new(font: 'font.ttf', size_enum: -1.5, line_height: 1.1) @@ -37365,15 +38464,22 @@ module GTK @command_history_index = -1 @nonhistory_input = '' @logo = 'console-logo.png' - @history_fname = 'console_history.txt' + @history_fname = 'logs/console_history.txt' @background_color = Color.new [0, 0, 0, 224] - @text_color = Color.new [255, 255, 255] - @error_color = Color.new [200, 50, 50] @header_color = Color.new [100, 200, 220] @code_color = Color.new [210, 168, 255] - @comment_color = Color.new [0, 200, 100] + @comment_color = Color.new [0, 200, 100] @animation_duration = 1.seconds @shown_at = -1 + + # these are the colors for text at various log levels. + @spam_color = Color.new [160, 160, 160] + @debug_color = Color.new [0, 255, 0] + @text_color = Color.new [255, 255, 255] + @warn_color = Color.new [255, 255, 0] + @error_color = Color.new [200, 50, 50] + @unfiltered_color = Color.new [0, 255, 255] + load_history end @@ -37439,7 +38545,13 @@ module GTK nil end - def add_text obj + def add_text obj, loglevel=-1 + # loglevel is one of the values of LogLevel in logging.h, or -1 to say "we don't care, colorize it with your special string parsing magic" + loglevel = -1 if loglevel < 0 + loglevel = 5 if loglevel > 5 # 5 == unfiltered (it's 0x7FFFFFFE in C, clamp it down) + loglevel = 2 if (loglevel == -1) && obj.start_with?('!c!') # oh well + colorstr = (loglevel != -1) ? "!c!#{loglevel}" : nil + @last_log_lines_count ||= 1 @log_invocation_count += 1 @@ -37448,12 +38560,18 @@ module GTK log_lines = [] str.each_line do |s| - s.wrapped_lines(self.console_text_width).each do |l| - log_lines << l + if colorstr.nil? + s.wrapped_lines(self.console_text_width).each do |l| + log_lines << l + end + else + s.wrapped_lines(self.console_text_width).each do |l| + log_lines << "#{colorstr}#{l}" + end end end - if log_lines == @last_log_lines + if log_lines == @last_log_lines && log_lines.length != 0 @last_log_lines_count += 1 new_log_line_with_count = @last_log_lines.last + " (#{@last_log_lines_count})" if log_lines.length > 1 @@ -37728,10 +38846,12 @@ S def mouse_wheel_scroll args @inertia ||= 0 - if args.inputs.mouse.wheel && args.inputs.mouse.wheel.y > 0 - @inertia = 1 - elsif args.inputs.mouse.wheel && args.inputs.mouse.wheel.y < 0 - @inertia = -1 + if args.inputs.mouse.wheel + if args.inputs.mouse.wheel.y > 0 + @inertia = 1 + elsif args.inputs.mouse.wheel.y < 0 + @inertia = -1 + end end if args.inputs.mouse.click @@ -37740,13 +38860,11 @@ S return if @inertia == 0 - if @inertia != 0 - @inertia = (@inertia * 0.7) - if @inertia > 0 - @log_offset -= 1 - elsif @inertia < 0 - @log_offset += 1 - end + @inertia = (@inertia * 0.7) + if @inertia > 0 + @log_offset += 1 + elsif @inertia < 0 + @log_offset -= 1 end if @inertia.abs < 0.01 @@ -37764,6 +38882,7 @@ S if console_toggle_key_down? args args.inputs.text.clear toggle + args.inputs.keyboard.clear if !@visible end return unless visible? @@ -37775,7 +38894,16 @@ S @log_offset = 0 if @log_offset < 0 if args.inputs.keyboard.key_down.enter - eval_the_set_command + if slide_progress > 0.5 + # in the event of an exception, the console window pops up + # and is pre-filled with $gtk.reset. + # there is an annoying scenario where the exception could be thrown + # by pressing enter (while playing the game). if you press enter again + # quickly, then the game is reset which closes the console. + # so enter in the console is only evaluated if the slide_progress + # is atleast half way down the page. + eval_the_set_command + end elsif args.inputs.keyboard.key_down.v if args.inputs.keyboard.key_down.control || args.inputs.keyboard.key_down.meta prompt << $gtk.ffi_misc.getclipboard @@ -37852,7 +38980,7 @@ S def write_line(args, left, y, str, archived: false) color = color_for_log_entry(str) color = color.mult_alpha(0.5) if archived - + str = str[4..-1] if str.start_with?('!c!') # chop off loglevel color args.outputs.reserved << font_style.label(x: left.shift_right(10), y: y, text: str, color: color) end @@ -38088,7 +39216,9 @@ S return false end - def color_for_log_entry(log_entry) + def color_for_plain_text log_entry + log_entry = log_entry[4..-1] if log_entry.start_with? "!c!" + if code? log_entry @code_color elsif code_comment? log_entry @@ -38108,6 +39238,29 @@ S end end + def color_for_log_entry(log_entry) + if log_entry.start_with?('!c!') # loglevel color specified. + return case log_entry[3..3].to_i + when 0 # spam + @spam_color + when 1 # debug + @debug_color + #when 2 # info (caught by the `else` block.) + # @text_color + when 3 # warn + @warn_color + when 4 # error + @error_color + when 5 # unfiltered + @unfiltered_color + else + color_for_plain_text log_entry + end + end + + return color_for_plain_text log_entry + end + def prompt @prompt ||= Prompt.new(font_style: font_style, text_color: @text_color, console_text_width: console_text_width) end @@ -38551,11 +39704,11 @@ S # partition the original list of items into a string to be printed items.each_slice(columns).each_with_index do |cells, i| - pretty_print_row_seperator string_width, cell_width, column_width, columns + pretty_print_row_separator string_width, cell_width, column_width, columns pretty_print_row cells, string_width, cell_width, column_width, columns end - pretty_print_row_seperator string_width, cell_width, column_width, columns + pretty_print_row_separator string_width, cell_width, column_width, columns end end @@ -39382,8 +40535,8 @@ module GTK ease_extended start_tick, current_tick, start_tick + duration, - (initial_value *definitions), - (final_value *definitions), + initial_value(*definitions), + final_value(*definitions), *definitions end @@ -39574,8 +40727,8 @@ end module GTK module Geometry def self.rotate_point point, angle, around = nil - s = Math.sin a.to_radians - c = Math.cos a.to_radians + s = Math.sin angle.to_radians + c = Math.cos angle.to_radians px = point.x py = point.y cx = 0 @@ -39756,8 +40909,16 @@ S end # @gtk - def self.line_y_intercept line - line.y - line_slope(line) * line.x + def self.line_y_intercept line, replace_infinity: nil + line.y - line_slope(line, replace_infinity: replace_infinity) * line.x + rescue Exception => e +raise <<-S +* ERROR: ~Geometry::line_y_intercept~ +The following exception was thrown for line: #{line} +#{e} + +Consider passing in ~replace_infinity: VALUE~ to handle for vertical lines. +S end # @gtk @@ -39833,14 +40994,22 @@ S end # @gtk - def self.line_intersect line_one, line_two - m1 = line_slope(line_one) - m2 = line_slope(line_two) - b1 = line_y_intercept(line_one) - b2 = line_y_intercept(line_two) + def self.line_intersect line_one, line_two, replace_infinity: nil + m1 = line_slope(line_one, replace_infinity: replace_infinity) + m2 = line_slope(line_two, replace_infinity: replace_infinity) + b1 = line_y_intercept(line_one, replace_infinity: replace_infinity) + b2 = line_y_intercept(line_two, replace_infinity: replace_infinity) x = (b1 - b2) / (m2 - m1) y = (-b2.fdiv(m2) + b1.fdiv(m1)).fdiv(1.fdiv(m1) - 1.fdiv(m2)) [x, y] + rescue Exception => e +raise <<-S +* ERROR: ~Geometry::line_intersect~ +The following exception was thrown for line_one: #{line_one}, line_two: #{line_two} +#{e} + +Consider passing in ~replace_infinity: VALUE~ to handle for vertical lines. +S end def self.contract_intersect_rect? @@ -40521,7 +41690,8 @@ module GTK value = Kernel.tick_count if value collection.each do |m| - self.instance_variable_set("@#{m.to_s}".to_sym, value) + m_to_s = m.to_s + self.instance_variable_set("@#{m_to_s}".to_sym, value) if m_to_s.strip.length > 0 rescue Exception => e raise e, <<-S * ERROR: @@ -41063,6 +42233,7 @@ class IOSWizard < Wizard :check_for_dev_profile, *app_metadata_retrieval_steps, + :determine_devcert, :clear_tmp_directory, :stage_app, @@ -41091,6 +42262,7 @@ class IOSWizard < Wizard :determine_app_version, *app_metadata_retrieval_steps, + :determine_prodcert, :clear_tmp_directory, :stage_app, @@ -41285,6 +42457,10 @@ teamid= appid= # appname is the name you want to show up underneath the app icon on the device. Keep it under 10 characters. appname= +# devcert is the certificate to use for development/deploying to your local device +devcert= +# prodcert is the certificate to use for distribution to the app store +prodcert= S end @@ -41320,7 +42496,7 @@ S def raise_ios_metadata_required raise WizardException.new( "* mygame/metadata/ios_metadata.txt needs to be filled out.", - "You need to update metadata/ios_metadata.txt with a valid teamid, appname, and appid.", + "You need to update metadata/ios_metadata.txt with a valid teamid, appname, appid, devcert, and prodcert.", "Instructions for where the values should come from are within metadata/ios_metadata.txt." ) end @@ -41360,7 +42536,19 @@ S def determine_app_id @app_id = ios_metadata.appid raise_ios_metadata_required if @app_id.strip.length == 0 - log_info "App Identifier is set to : #{@app_id}" + log_info "App Identifier is set to: #{@app_id}" + end + + def determine_devcert + @certificate_name = ios_metadata.devcert + raise_ios_metadata_required if @certificate_name.strip.length == 0 + log_info "Dev Certificate is set to: #{@certificate_name}" + end + + def determine_prodcert + @certificate_name = ios_metadata.prodcert + raise_ios_metadata_required if @certificate_name.strip.length == 0 + log_info "Production (Distribution) Certificate is set to: #{@certificate_name}" end def set_app_name name @@ -41382,12 +42570,6 @@ S sh "rm -rf #{tmp_directory}" end - def stage_app - log_info "Staging." - sh "mkdir -p #{tmp_directory}" - sh "cp -R #{relative_path}/dragonruby-ios.app \"#{tmp_directory}/#{@app_name}.app\"" - end - def set_app_id id log_info = "App Id set to: #{id}" @app_id = id @@ -41418,34 +42600,13 @@ S def check_for_certs log_info "Attempting to find certificates on your computer." - if !cli_app_exist?(security_cli_app) - raise WizardException.new( - "* It doesn't look like you have #{security_cli_app}.", - "** 1. Open Disk Utility and run First Aid.", - { w: 700, h: 148, path: get_reserved_sprite("disk-utility.png") }, - ) - end - - if valid_certs.length == 0 - raise WizardException.new( - "* It doesn't look like you have any valid certs installed.", - "** 1. Open Xcode.", - "** 2. Log into your developer account. Xcode -> Preferences -> Accounts.", - { w: 700, h: 98, path: get_reserved_sprite("login-xcode.png") }, - "** 3. After loggin in, select Manage Certificates...", - { w: 700, h: 115, path: get_reserved_sprite("manage-certificates.png") }, - "** 4. Add a certificate for Apple Development.", - { w: 700, h: 217, path: get_reserved_sprite("add-cert.png") }, - ) - raise "You do not have any Apple development certs on this computer." - end - if @production_build - @certificate_name = valid_certs.find_all { |f| f[:name].include? "Distribution" }.first[:name] + @certificate_name = ios_metadata[:prodcert] else - @certificate_name = valid_certs.find_all { |f| f[:name].include? "Development" }.first[:name] + @certificate_name = ios_metadata[:devcert] end - log_info "I will be using Certificate: '#{@certificate_name}'." + + log_info "I will be using certificate: '#{@certificate_name}'." end def idevice_id_cli_app @@ -41460,24 +42621,6 @@ S "xcodebuild" end - def valid_certs - certs = sh("#{security_cli_app} -q find-identity -p codesigning -v").each_line.map do |l| - if l.include?(")") && !l.include?("Developer ID") && (l.include?("Development") || l.include?("Distribution")) - l.strip - else - nil - end - end.reject_nil.map do |l| - number, id, name = l.split(' ', 3) - name = name.gsub("\"", "") if name - { - number: 1, - id: id, - name: name - } - end - end - def connected_devices sh("idevice_id -l").strip.each_line.map do |l| l.strip @@ -42007,6 +43150,9 @@ XML end def stage_app + log_info "Staging." + sh "mkdir -p #{tmp_directory}" + sh "cp -R #{relative_path}/dragonruby-ios.app \"#{tmp_directory}/#{@app_name}.app\"" sh %Q[cp -r "#{root_folder}/app/" "#{app_path}/app/"] sh %Q[cp -r "#{root_folder}/sounds/" "#{app_path}/sounds/"] sh %Q[cp -r "#{root_folder}/sprites/" "#{app_path}/sprites/"] @@ -43834,26 +44980,6 @@ S (0..self).to_a end - def >= other - return false if !other - return gte other - end - - def > other - return false if !other - return gt other - end - - def <= other - return false if !other - return lte other - end - - def < other - return false if !other - return gt other - end - # @gtk def map unless block_given? @@ -43939,34 +45065,6 @@ The object above is not a Numeric. S end - def - other - return self unless other - self - other - rescue Exception => e - __raise_arithmetic_exception__ other, :-, e - end - - def + other - return self unless other - self + other - rescue Exception => e - __raise_arithmetic_exception__ other, :+, e - end - - def * other - return self unless other - self * other - rescue Exception => e - __raise_arithmetic_exception__ other, :*, e - end - - def / other - return self unless other - self / other - rescue Exception => e - __raise_arithmetic_exception__ other, :/, e - end - def serialize self end @@ -44021,34 +45119,6 @@ class Fixnum return !even? end - def + other - return self unless other - self + other - rescue Exception => e - __raise_arithmetic_exception__ other, :+, e - end - - def * other - return self unless other - self * other - rescue Exception => e - __raise_arithmetic_exception__ other, :*, e - end - - def / other - return self unless other - self / other - rescue Exception => e - __raise_arithmetic_exception__ other, :/, e - end - - def - other - return self unless other - self - other - rescue Exception => e - __raise_arithmetic_exception__ other, :-, e - end - # Returns `-1` if the number is less than `0`. `+1` if the number # is greater than `0`. Returns `0` if the number is equal to `0`. # @@ -44104,34 +45174,6 @@ class Float alias_method :__original_multiply__, :* unless Float.instance_methods.include? :__original_multiply__ alias_method :__original_divide__, :- unless Float.instance_methods.include? :__original_divide__ - def - other - return self unless other - super - rescue Exception => e - __raise_arithmetic_exception__ other, :-, e - end - - def + other - return self unless other - super - rescue Exception => e - __raise_arithmetic_exception__ other, :+, e - end - - def * other - return self unless other - super - rescue Exception => e - __raise_arithmetic_exception__ other, :*, e - end - - def / other - return self unless other - super - rescue Exception => e - __raise_arithmetic_exception__ other, :/, e - end - def serialize self end @@ -44179,6 +45221,270 @@ class Integer end end +

    +

    recording.rb

    +
    # ./dragon/recording.rb
    +# coding: utf-8
    +# Copyright 2019 DragonRuby LLC
    +# MIT License
    +# recording.rb has been released under MIT (*only this file*).
    +
    +module GTK
    +  # FIXME: Gross
    +  # @gtk
    +  class Replay
    +    # @gtk
    +    def self.start file_name = nil
    +      $recording.start_replay file_name
    +    end
    +
    +    # @gtk
    +    def self.stop
    +      $recording.stop_replay
    +    end
    +  end
    +
    +  # @gtk
    +  class Recording
    +    def initialize runtime
    +      @runtime = runtime
    +      @tick_count = 0
    +      @global_input_order = 1
    +    end
    +
    +    def tick
    +      @tick_count += 1
    +    end
    +
    +    def start_recording seed_number = nil
    +      if !seed_number
    +        log <<-S
    +* ERROR:
    +To start recording, you must provide an integer value to
    +seed random number generation.
    +S
    +        $console.set_command "$recording.start SEED_NUMBER"
    +        return
    +      end
    +
    +      if @is_recording
    +        log <<-S
    +* ERROR:
    +You are already recording, first cancel (or stop) the current recording.
    +S
    +        $console.set_command "$recording.cancel"
    +        return
    +      end
    +
    +      if @is_replaying
    +        log <<-S
    +* ERROR:
    +You are currently replaying a recording, first stop the replay.
    +S
    +        return
    +      end
    +
    +      log_info <<-S
    +Recording has begun with RNG seed value set to #{seed_number}.
    +To stop recording use stop_recording(filename).
    +The recording will stop without saving a file if a filename is nil.
    +S
    +
    +      $console.set_command "$recording.stop 'replay.txt'"
    +      @runtime.__reset__
    +      @seed_number = seed_number
    +      @runtime.set_rng seed_number
    +
    +      @tick_count = 0
    +      @global_input_order = 1
    +      @is_recording = true
    +      @input_history = []
    +      @runtime.notify! "Recording started. When completed, open the console to save it using $recording.stop FILE_NAME (or cancel).", 300
    +    end
    +
    +    # @gtk
    +    def start seed_number = nil
    +      start_recording seed_number
    +    end
    +
    +    def is_replaying?
    +      @is_replaying
    +    end
    +
    +    def is_recording?
    +      @is_recording
    +    end
    +
    +    # @gtk
    +    def stop file_name = nil
    +      stop_recording file_name
    +    end
    +
    +    # @gtk
    +    def cancel
    +      stop_recording_core
    +      @runtime.notify! "Recording cancelled."
    +    end
    +
    +    def stop_recording file_name = nil
    +      if !file_name
    +        log <<-S
    +* ERROR:
    +To please specify a file name when calling:
    +$recording.stop FILE_NAME
    +
    +If you do NOT want to save the recording, call:
    +$recording.cancel
    +S
    +        $console.set_command "$recording.stop 'replay.txt'"
    +        return
    +      end
    +
    +      if !@is_recording
    +        log_info "You are not currently recording. Use start_recording(seed_number) to start recording."
    +        $console.set_command "$recording.start"
    +        return
    +      end
    +
    +      if file_name
    +        text = "replay_version 2.0\n"
    +        text << "stopped_at #{@tick_count}\n"
    +        text << "seed #{@seed_number}\n"
    +        text << "recorded_at #{Time.now.to_s}\n"
    +        @input_history.each do |items|
    +          text << "#{items}\n"
    +        end
    +        @runtime.write_file file_name, text
    +        @runtime.write_file 'last_replay.txt', text
    +        log_info "The recording has been saved successfully at #{file_name}. You can use start_replay(\"#{file_name}\") to replay the recording."
    +      end
    +
    +      $console.set_command "$replay.start '#{file_name}'"
    +      stop_recording_core
    +      @runtime.notify! "Recording saved to #{file_name}. To replay it: $replay.start \"#{file_name}\"."
    +      log_info "You can run the replay later on startup using: ./dragonruby mygame --replay #{@replay_file_name}"
    +      nil
    +    end
    +
    +    def stop_recording_core
    +      @is_recording = false
    +      @input_history = nil
    +      @last_history = nil
    +      @runtime.__reset__
    +    end
    +
    +    def start_replay file_name = nil
    +      if !file_name
    +        log <<-S
    +* ERROR:
    +Please provide a file name to $recording.start.
    +S
    +        $console.set_command "$replay.start 'replay.txt'"
    +        return
    +      end
    +
    +      text = @runtime.read_file file_name
    +      return false unless text
    +
    +      if text.each_line.first.strip != "replay_version 2.0"
    +        raise "The replay file #{file_name} is not compatible with this version of DragonRuby Game Toolkit. Please recreate the replay (sorry)."
    +      end
    +
    +      @replay_file_name = file_name
    +
    +      $replay_data = { input_history: { } }
    +      text.each_line do |l|
    +        if l.strip.length == 0
    +          next
    +        elsif l.start_with? 'replay_version'
    +          next
    +        elsif l.start_with? 'seed'
    +          $replay_data[:seed] = l.split(' ').last.to_i
    +        elsif l.start_with? 'stopped_at'
    +          $replay_data[:stopped_at] = l.split(' ').last.to_i
    +        elsif l.start_with? 'recorded_at'
    +          $replay_data[:recorded_at] = l.split(' ')[1..-1].join(' ')
    +        elsif l.start_with? '['
    +          name, value_1, value_2, value_count, id, tick_count = l.strip.gsub('[', '').gsub(']', '').split(',')
    +          $replay_data[:input_history][tick_count.to_i] ||= []
    +          $replay_data[:input_history][tick_count.to_i] << {
    +            id: id.to_i,
    +            name: name.gsub(':', '').to_sym,
    +            value_1: value_1.to_f,
    +            value_2: value_2.to_f,
    +            value_count: value_count.to_i
    +          }
    +        else
    +          raise "Replay data seems corrupt. I don't know how to parse #{l}."
    +        end
    +      end
    +
    +      $replay_data[:input_history].keys.each do |key|
    +        $replay_data[:input_history][key] = $replay_data[:input_history][key].sort_by {|input| input[:id]}
    +      end
    +
    +      @runtime.__reset__
    +      @runtime.set_rng $replay_data[:seed]
    +      @tick_count = 0
    +      @is_replaying = true
    +      log_info "Replay has been started."
    +      @runtime.notify! "Replay started [#{@replay_file_name}]."
    +    end
    +
    +    def stop_replay notification_message =  "Replay has been stopped."
    +      if !is_replaying?
    +        log <<-S
    +* ERROR:
    +No replay is currently running. Call $replay.start FILE_NAME to start a replay.
    +S
    +
    +        $console.set_command "$replay.start 'replay.txt'"
    +        return
    +      end
    +      log_info notification_message
    +      @is_replaying = false
    +      $replay_data = nil
    +      @tick_count = 0
    +      @global_input_order = 1
    +      $console.set_command_silent "$replay.start '#{@replay_file_name}'"
    +      @runtime.__reset__
    +      @runtime.notify! notification_message
    +    end
    +
    +    def record_input_history name, value_1, value_2, value_count, clear_cache = false
    +      return if @is_replaying
    +      return unless @is_recording
    +      @input_history << [name, value_1, value_2, value_count, @global_input_order, @tick_count]
    +      @global_input_order += 1
    +    end
    +
    +    def stage_replay_values
    +      return unless @is_replaying
    +      return unless $replay_data
    +
    +      if $replay_data[:stopped_at] <= @tick_count
    +        stop_replay "Replay completed [#{@replay_file_name}]. To rerun, bring up the Console and press enter."
    +        return
    +      end
    +
    +      inputs_this_tick = $replay_data[:input_history][@tick_count]
    +
    +      if @tick_count.zmod? 60
    +        log_info "Replay ends in #{($replay_data[:stopped_at] - @tick_count).idiv 60} second(s)."
    +      end
    +
    +      return unless inputs_this_tick
    +      inputs_this_tick.each do |v|
    +        args = []
    +        args << v[:value_1] if v[:value_count] >= 1
    +        args << v[:value_2] if v[:value_count] >= 2
    +        args << :replay
    +        $gtk.send v[:name], *args
    +      end
    +    end
    +  end
    +end
    +
     

    remote_hotload_client.rb

    # ./dragon/remote_hotload_client.rb
    @@ -44546,14 +45852,13 @@ module GTK
             log <<-S
     ** Invoking :#{name}...
     S
    -        time_start = Time.now
             idx = 0
             r = nil
    +        time_start = Time.now
             while idx < iterations
               r = proc.call
               idx += 1
             end
    -
             result = (Time.now - time_start).round 3
     
             { name: name,
    @@ -44676,7 +45981,7 @@ module GTK
             fn.each_send pass.borders,           self, :draw_border
             fn.each_send pass.static_borders,    self, :draw_border
     
    -        if !$gtk.production
    +        if !self.production
               fn.each_send pass.debug,           self, :draw_primitive
               fn.each_send pass.static_debug,    self, :draw_primitive
             end
    @@ -44693,6 +45998,7 @@ module GTK
             if s.respond_to? :draw_override
               s.draw_override @ffi_draw
             else
    +          s = s.as_hash if s.is_a? OpenEntity
               @ffi_draw.draw_solid_2 s.x, s.y, s.w, s.h,
                                      s.r, s.g, s.b, s.a,
                                      (s.blendmode_enum || 1)
    @@ -44706,6 +46012,7 @@ module GTK
             if s.respond_to? :draw_override
               s.draw_override @ffi_draw
             else
    +          s = s.as_hash if s.is_a? OpenEntity
               @ffi_draw.draw_sprite_4 s.x, s.y, s.w, s.h,
                                       (s.path || '').to_s,
                                       s.angle,
    @@ -44725,6 +46032,7 @@ module GTK
             if s.respond_to? :draw_override
               s.draw_override @ffi_draw
             else
    +          s = s.as_hash if s.is_a? OpenEntity
               @ffi_draw.draw_screenshot (s.path || '').to_s,
                                         s.x, s.y, s.w, s.h,
                                         s.angle,
    @@ -44743,6 +46051,7 @@ module GTK
             if l.respond_to? :draw_override
               l.draw_override @ffi_draw
             else
    +          l = l.as_hash if l.is_a? OpenEntity
               @ffi_draw.draw_label_3 l.x, l.y,
                                      (l.text || '').to_s,
                                      l.size_enum, l.alignment_enum,
    @@ -44760,6 +46069,7 @@ module GTK
             if l.respond_to? :draw_override
               l.draw_override @ffi_draw
             else
    +          l = l.as_hash if l.is_a? OpenEntity
               if l.x2
                 @ffi_draw.draw_line_2 l.x, l.y, l.x2, l.y2,
                                       l.r, l.g, l.b, l.a,
    @@ -44785,6 +46095,7 @@ module GTK
             if s.respond_to? :draw_override
               s.draw_override @ffi_draw
             else
    +          s = s.as_hash if s.is_a? OpenEntity
               @ffi_draw.draw_border_2 s.x, s.y, s.w, s.h,
                                       s.r, s.g, s.b, s.a,
                                       (s.blendmode_enum || 1)
    @@ -44850,13 +46161,8 @@ module GTK
                 if @tick_speed_count > 60 * 2
                   if framerate_below_threshold?
                     @last_framerate = current_framerate
    -                if !@console.visible?
    -                  if !@framerate_important_notification_happened
    -                    log_important framerate_warning_message
    -                  else
    -                    log framerate_warning_message
    -                  end
    -                  @framerate_important_notification_happened = true
    +                if !@console.visible? && !@recording.is_replaying?
    +                  log framerate_warning_message
                     end
                   end
     
    @@ -45720,6 +47026,112 @@ module GTK
       end
     end
     
    +
    +

    tweetcart.rb

    +
    # ./dragon/tweetcart.rb
    +# coding: utf-8
    +# Copyright 2019 DragonRuby LLC
    +# MIT License
    +# tweetcart.rb has been released under MIT (*only this file*).
    +
    +def $top_level.TICK &block
    +  $top_level.define_method(:tick) do |args|
    +    args.outputs[:scene].w = 160
    +    args.outputs[:scene].h = 90
    +    args.outputs[:scene].background_color = [0, 0, 0, 0]
    +    block.call args
    +    args.outputs.sprites << { x: 0, y: 0, w: 1280, h: 720, path: :scene }
    +  end
    +
    +  def $top_level.bg! *rgb
    +    r,g,b = rgb
    +    r ||= 255
    +    g ||= r
    +    b ||= g
    +    $args.outputs.background_color = [r, g, b]
    +  end
    +
    +  def $top_level.slds
    +    $args.outputs[:scene].sprites
    +  end
    +
    +  def $top_level.slds! *os
    +    if (os.first.is_a? Numeric)
    +      sld!(*os)
    +    else
    +      os.each { |o| sld!(*o) }
    +    end
    +  end
    +
    +  def $top_level.sld! *params
    +    x, y, w, h, r, g, b, a = nil
    +    if params.length == 2
    +      x, y = params
    +    elsif params.length == 3 && (params.last.is_a? Array)
    +      x = params[0]
    +      y = params[1]
    +      r, g, b, a = params[2]
    +      r ||= 255
    +      g ||= r
    +      b ||= g
    +      a ||= 255
    +    elsif params.length == 4
    +      x, y, w, h = params
    +    elsif params.length == 5 && (params.last.is_a? Array)
    +      x = params[0]
    +      y = params[1]
    +      w = params[2]
    +      h = params[3]
    +      r,g,b,a = params[4]
    +      r ||= 255
    +      g ||= r
    +      b ||= g
    +      a ||= 255
    +    elsif params.length >= 7
    +      x, y, w, h, r, g, b = params
    +    else
    +      raise "I don't know how to render #{params} with reasonable defaults."
    +    end
    +
    +    w ||= 1
    +    h ||= 1
    +    r ||= 255
    +    g ||= 255
    +    b ||= 255
    +    a ||= 255
    +
    +    slds << { x: x, y: y,
    +              w: w, h: h,
    +              r: r, g: g, b: b, a: a,
    +              path: :pixel }
    +  end
    +end
    +
    +=begin
    +wht  = [255] * 3
    +red  = [255, 0, 0]
    +blu  = [0, 130, 255]
    +purp = [150, 80, 255]
    +
    +TICK {
    +  bg! 0
    +
    +  slds << [0, 0, 3, 3, 0, 255, 0, 255]
    +
    +  sld!     10, 10
    +  sld!     20, 20, 3, 2
    +  sld!     30, 30, 2, 2, red
    +  sld!     35, 35, blu
    +
    +  slds!    40, 40
    +
    +  slds!   [50, 50],
    +          [60, 60, purp],
    +          [70, 70, 10, 10, wht],
    +          [80, 80, 4, 4, 255, 0, 255]
    +}
    +=end
    +
     

    wizards.rb

    # ./dragon/wizards.rb
    diff --git a/docs/docs.txt b/docs/docs.txt
    index d6f5def..c0cc841 100644
    --- a/docs/docs.txt
    +++ b/docs/docs.txt
    @@ -1654,6 +1654,34 @@ is currently in the file. Use ~GTK::Runtime#append_file~ to append to the file a
       end
     #+end_src
     
    +* DOCS: ~GTK::Runtime#benchmark~
    +You can use this function to compare the relative performance of methods.
    +
    +#+begin_src ruby
    +  def tick args
    +    # press r to run benchmark
    +    if args.inputs.keyboard.key_down.r
    +      args.gtk.console.show
    +      args.gtk.benchmark iterations: 1000, # number of iterations
    +                         # label for experiment
    +                         using_numeric_map: -> () {
    +                           # experiment body
    +                           v = 100.map do |i|
    +                             i * 100
    +                           end
    +                         },
    +                         # label for experiment
    +                         using_numeric_times: -> () {
    +                           # experiment body
    +                           v = []
    +                           100.times do |i|
    +                             v << i * 100
    +                           end
    +                         }
    +    end
    +  end
    +#+end_src
    +
     * DOCS: ~Array~
     
     The Array class has been extend to provide methods that
    @@ -4199,7 +4227,7 @@ Follows is a source code listing for all files that have been open sourced. This
       # Use args.inputs.mouse.click.created_at
       
       # To see how many frames its been since the click occurred
    -  # Use args.inputs.mouse.click.creat_at_elapsed
    +  # Use args.inputs.mouse.click.created_at_elapsed
       
       # Saving the click in args.state can be quite useful
       
    @@ -6840,17 +6868,17 @@ Follows is a source code listing for all files that have been open sourced. This
         end
       
         def calc_player_dx
    -      player.y  += player.dy
    -      player.dy += state.gravity
    -      player.dy += player.dy * state.drag ** 2 * -1
    -    end
    -  
    -    def calc_player_dy
           player.dx  = player.dx.clamp(-5,  5)
           player.dx *= 0.9
           player.x  += player.dx
         end
       
    +    def calc_player_dy
    +      player.y  += player.dy
    +      player.dy += state.gravity
    +      player.dy += player.dy * state.drag ** 2 * -1
    +    end
    +  
         def reset_player
           player.x  = 100
           player.y  = 720
    @@ -6994,8 +7022,7 @@ Follows is a source code listing for all files that have been open sourced. This
           input
         end
       
    -    # Sets default values
    -    def defaults
    +    def init_game
           s.platforms ||= [ # initializes platforms collection with two platforms using hashes
             new_platform(x: 0, y: 0, w: 700, h: 32, dx: 1, speed: 0, rect: nil),
             new_platform(x: 0, y: 300, w: 700, h: 32, dx: 1, speed: 0, rect: nil), # 300 pixels higher
    @@ -7018,6 +7045,11 @@ Follows is a source code listing for all files that have been open sourced. This
           s.camera ||= { y: -100 } # shows view on screen (as the player moves upward, the camera does too)
         end
       
    +    # Sets default values
    +    def defaults
    +      init_game
    +    end
    +  
         # Outputs objects onto the screen
         def render
           outputs.solids << s.platforms.map do |p| # outputs platforms onto screen
    @@ -7105,7 +7137,9 @@ Follows is a source code listing for all files that have been open sourced. This
                                           rect: nil)
             end
           else
    +        # game over
             s.as_hash.clear # otherwise clear the hash (no new platform is necessary)
    +        init_game
           end
         end
       
    @@ -7244,15 +7278,15 @@ Follows is a source code listing for all files that have been open sourced. This
       # ./samples/04_physics_and_collisions/08_bouncing_on_collision/app/block.rb
       DEGREES_TO_RADIANS = Math::PI / 180
       
    -  class Block 
    +  class Block
         def initialize(x, y, block_size, rotation)
           @x = x
    -      @y = y 
    +      @y = y
           @block_size = block_size
           @rotation = rotation
       
           #The repel velocity?
    -      @velocity = {x: 2, y: 0}        
    +      @velocity = {x: 2, y: 0}
       
           horizontal_offset = (3 * block_size) * Math.cos(rotation * DEGREES_TO_RADIANS)
           vertical_offset = block_size * Math.sin(rotation * DEGREES_TO_RADIANS)
    @@ -7280,7 +7314,7 @@ Follows is a source code listing for all files that have been open sourced. This
       
             @imaginary_line = [ @x1, @y1, @x2, @y2 ]
           end
    -      
    +  
         end
       
         def draw args
    @@ -7324,7 +7358,7 @@ Follows is a source code listing for all files that have been open sourced. This
       
           collision = false
           if @rotation >= 0
    -        if (current_area < min_area && 
    +        if (current_area < min_area &&
               current_area > 0 &&
               args.state.ball.center.y > @y1 &&
               args.state.ball.center.x < @x2)
    @@ -7332,7 +7366,7 @@ Follows is a source code listing for all files that have been open sourced. This
               collision = true
             end
           else
    -        if (current_area < min_area && 
    +        if (current_area < min_area &&
               current_area > 0 &&
               args.state.ball.center.y > @y2 &&
               args.state.ball.center.x > @x1)
    @@ -7340,7 +7374,7 @@ Follows is a source code listing for all files that have been open sourced. This
             collision = true
             end
           end
    -      
    +  
           return collision
         end
       
    @@ -7361,7 +7395,7 @@ Follows is a source code listing for all files that have been open sourced. This
             x:args.state.ball.center.x-args.state.ball.velocity.x,
             y:args.state.ball.center.y-args.state.ball.velocity.y
           }
    -      
    +  
           velocityMag = (args.state.ball.velocity.x**2 + args.state.ball.velocity.y**2)**0.5 # the current velocity magnitude of the ball
           theta_ball = Math.atan2(args.state.ball.velocity.y, args.state.ball.velocity.x)         #the angle of the ball's velocity
           theta_repel = (180 * DEGREES_TO_RADIANS) - theta_ball + (@rotation * DEGREES_TO_RADIANS)
    @@ -7383,7 +7417,7 @@ Follows is a source code listing for all files that have been open sourced. This
       
           dampener = 0.3
           ynew *= dampener * 0.5
    -      
    +  
           #If the bounce is very low, that means the ball is rolling and we don't want to dampenen the X velocity
           if ynew > -0.1
             xnew *= dampener
    @@ -7392,7 +7426,7 @@ Follows is a source code listing for all files that have been open sourced. This
           #Add the sine component of gravity back in (X component)
           gravity_x = 4 * Math.sin(@rotation * DEGREES_TO_RADIANS)
           xnew += gravity_x
    -    
    +  
           args.state.ball.velocity.x = -xnew
           args.state.ball.velocity.y = -ynew
       
    @@ -9806,12 +9840,23 @@ Follows is a source code listing for all files that have been open sourced. This
         # Starts the game with player x's turn and creates an array (to_a) for space combinations.
         # Calls methods necessary for the game to run properly.
         def tick
    -      state.current_turn ||= :x
    -      state.space_combinations = [-1, 0, 1].product([-1, 0, 1]).to_a
    +      init_new_game
           render_board
           input_board
         end
       
    +    def init_new_game
    +      state.current_turn       ||= :x
    +      state.space_combinations ||= [-1, 0, 1].product([-1, 0, 1]).to_a
    +  
    +      state.spaces             ||= {}
    +  
    +      state.space_combinations.each do |x, y|
    +        state.spaces[x]    ||= {}
    +        state.spaces[x][y] ||= state.new_entity(:space)
    +      end
    +    end
    +  
         # Uses borders to create grid squares for the game's board. Also outputs the game pieces using labels.
         def render_board
           square_size = 80
    @@ -9887,6 +9932,7 @@ Follows is a source code listing for all files that have been open sourced. This
         def input_restart_game
           return unless state.game_over
           gtk.reset
    +      init_new_game
         end
       
         # Checks if x or o won the game.
    @@ -10203,7 +10249,7 @@ Follows is a source code listing for all files that have been open sourced. This
         def calc_kill_zombie
       
           # Find all zombies that intersect with the player. They are considered killed.
    -      killed_this_frame = state.zombies.find_all { |z| z.sprite.intersect_rect? state.player_sprite }
    +      killed_this_frame = state.zombies.find_all { |z| z.sprite && (z.sprite.intersect_rect? state.player_sprite) }
           state.zombies = state.zombies - killed_this_frame # remove newly killed zombies from zombies collection
           state.killed_zombies += killed_this_frame # add newly killed zombies to killed zombies
       
    @@ -11107,6 +11153,7 @@ Follows is a source code listing for all files that have been open sourced. This
       end
       
       def playtime_str t
    +    return "" unless t
         minutes = (t / 60.0).floor
         seconds = t - (minutes * 60.0).to_f
         return minutes.to_s + ':' + seconds.floor.to_s + ((seconds - seconds.floor).to_s + "000")[1..3]
    @@ -11219,7 +11266,7 @@ Follows is a source code listing for all files that have been open sourced. This
         results.playtime_slider_rect = progress_bar(args: args,
                                                     row:  2.5,
                                                     col:  2,
    -                                                percentage: audio_entry.playtime / audio_entry.length_,
    +                                                percentage: (audio_entry.playtime || 1) / (audio_entry.length_ || 1),
                                                     text: "#{playtime_str(audio_entry.playtime)} / #{playtime_str(audio_entry.length_)}")
       
         results.primitives << results.playtime_slider_rect.primitives
    @@ -11419,21 +11466,6 @@ Follows is a source code listing for all files that have been open sourced. This
       192.168.1.65
     #+end_src
     
    -*** Advanced Audio - Audio Mixer - Metadata - ios_metadata.txt
    -#+begin_src ruby
    -  # ./samples/07_advanced_audio/01_audio_mixer/metadata/ios_metadata.txt
    -  # ios_metadata.txt is used by the Pro version of DragonRuby Game Toolkit to create iOS apps.
    -  # Information about the Pro version can be found at: http://dragonruby.org/toolkit/game#purchase
    -  
    -  # teamid needs to be set to your assigned Team Id which can be found at https://developer.apple.com/account/#/membership/
    -  teamid=
    -  # appid needs to be set to your application identifier which can be found at https://developer.apple.com/account/resources/identifiers/list
    -  appid=
    -  # appname is the name you want to show up underneath the app icon on the device. Keep it under 10 characters.
    -  appname=
    -
    -#+end_src
    -
     *** Advanced Audio - Sound Synthesis - main.rb
     #+begin_src ruby
       # ./samples/07_advanced_audio/02_sound_synthesis/app/main.rb
    @@ -12033,6 +12065,138 @@ Follows is a source code listing for all files that have been open sourced. This
     
     #+end_src
     
    +*** Advanced Rendering - Labels With Wrapped Text - main.rb
    +#+begin_src ruby
    +  # ./samples/07_advanced_rendering/00_labels_with_wrapped_text/app/main.rb
    +  def tick args
    +    # defaults
    +    args.state.scroll_location  ||= 0
    +    args.state.textbox.messages ||= []
    +    args.state.textbox.scroll   ||= 0
    +  
    +    # render
    +    args.outputs.background_color = [0, 0, 0, 255]
    +    render_messages args
    +    render_instructions args
    +  
    +    # inputs
    +    if args.inputs.keyboard.key_down.one
    +      queue_message args, "Hello there neighbour! my name is mark, how is your day today?"
    +    end
    +  
    +    if args.inputs.keyboard.key_down.two
    +      queue_message args, "I'm doing great sir, actually I'm having a picnic today"
    +    end
    +  
    +    if args.inputs.keyboard.key_down.three
    +      queue_message args, "Well that sounds wonderful!"
    +    end
    +  
    +    if args.inputs.keyboard.key_down.home
    +      args.state.scroll_location = 1
    +    end
    +  
    +    if args.inputs.keyboard.key_down.delete
    +      clear_message_queue args
    +    end
    +  end
    +  
    +  def queue_message args, msg
    +    args.state.textbox.messages.concat msg.wrapped_lines 50
    +  end
    +  
    +  def clear_message_queue args
    +    args.state.textbox.messages = nil
    +    args.state.textbox.scroll = 0
    +  end
    +  
    +  def render_messages args
    +    args.outputs[:textbox].w = 400
    +    args.outputs[:textbox].h = 720
    +  
    +    args.outputs.primitives << args.state.textbox.messages.each_with_index.map do |s, idx|
    +      {
    +        x: 0,
    +        y: 20 * (args.state.textbox.messages.size - idx) + args.state.textbox.scroll * 20,
    +        text: s,
    +        size_enum: -3,
    +        alignment_enum: 0,
    +        r: 255, g:255, b: 255, a: 255
    +      }
    +    end
    +  
    +    args.outputs[:textbox].labels << args.state.textbox.messages.each_with_index.map do |s, idx|
    +      {
    +        x: 0,
    +        y: 20 * (args.state.textbox.messages.size - idx) + args.state.textbox.scroll * 20,
    +        text: s,
    +        size_enum: -3,
    +        alignment_enum: 0,
    +        r: 255, g:255, b: 255, a: 255
    +      }
    +    end
    +  
    +    args.outputs[:textbox].borders << [0, 0, args.outputs[:textbox].w, 720]
    +  
    +    args.state.textbox.scroll += args.inputs.mouse.wheel.y unless args.inputs.mouse.wheel.nil?
    +  
    +    if args.state.scroll_location > 0
    +      args.state.textbox.scroll = 0
    +      args.state.scroll_location = 0
    +    end
    +  
    +    args.outputs.sprites << [900, 0, args.outputs[:textbox].w, 720, :textbox]
    +  end
    +  
    +  def render_instructions args
    +    args.outputs.labels << [30,
    +                            30.from_top,
    +                            "press 1, 2, 3 to display messages, MOUSE WHEEL to scroll, HOME to go to top, BACKSPACE to delete.",
    +                            0, 255, 255]
    +  
    +    args.outputs.primitives << [0, 55.from_top, 1280, 30, :pixel, 0, 255, 0, 0, 0].sprite
    +  end
    +
    +#+end_src
    +
    +*** Advanced Rendering - Rotating Label - main.rb
    +#+begin_src ruby
    +  # ./samples/07_advanced_rendering/00_rotating_label/app/main.rb
    +  def tick args
    +    # set the render target width and height to match the label
    +    args.outputs[:scene].w = 220
    +    args.outputs[:scene].h = 30
    +  
    +  
    +    # make the background transparent
    +    args.outputs[:scene].background_color = [255, 255, 255, 0]
    +  
    +    # set the blendmode of the label to 0 (no blending)
    +    # center it inside of the scene
    +    # set the vertical_alignment_enum to 1 (center)
    +    args.outputs[:scene].labels  << { x: 0,
    +                                      y: 15,
    +                                      text: "label in render target",
    +                                      blendmode_enum: 0,
    +                                      vertical_alignment_enum: 1 }
    +  
    +    # add a border to the render target
    +    args.outputs[:scene].borders << { x: 0,
    +                                      y: 0,
    +                                      w: args.outputs[:scene].w,
    +                                      h: args.outputs[:scene].h }
    +  
    +    # add the rendertarget to the main output as a sprite
    +    args.outputs.sprites << { x: 640 - args.outputs[:scene].w.half,
    +                              y: 360 - args.outputs[:scene].h.half,
    +                              w: args.outputs[:scene].w,
    +                              h: args.outputs[:scene].h,
    +                              angle: args.state.tick_count,
    +                              path: :scene }
    +  end
    +
    +#+end_src
    +
     *** Advanced Rendering - Simple Render Targets - main.rb
     #+begin_src ruby
       # ./samples/07_advanced_rendering/01_simple_render_targets/app/main.rb
    @@ -13198,7 +13362,7 @@ Follows is a source code listing for all files that have been open sourced. This
         def serialize
           {state: state, inputs: inputs, outputs: outputs, grid: grid }
         end
    -    
    +  
         def inspect
           serialize.to_s
         end
    @@ -13268,12 +13432,12 @@ Follows is a source code listing for all files that have been open sourced. This
           default_player(0, 0, 64, 64,
                          "sprites/player/player_#{state.player_cyan.orientation}_standing.png")
         end
    -    
    +  
         def new_player_magenta
           default_player(64, 0, 64, 64,
                          "sprites/player/player_#{state.player_magenta.orientation}_standing.png")
         end
    -    
    +  
         def new_camera_magenta
           default_camera(0,0,720,720)
         end
    @@ -13285,7 +13449,8 @@ Follows is a source code listing for all files that have been open sourced. This
         def new_camera_center
           default_camera(0,0,1280,720)
         end
    -    
    +  
    +  
         def new_room
           default_floor_tile(0,0,1024,1024,'sprites/rooms/camera_room.png')
         end
    @@ -13310,7 +13475,7 @@ Follows is a source code listing for all files that have been open sourced. This
           state.player_cyan.x += state.player_cyan.dx
           state.player_cyan.y += state.player_cyan.dy
         end
    -    
    +  
         def calc_player_magenta
           state.player_magenta.x += state.player_magenta.dx
           state.player_magenta.y += state.player_magenta.dy
    @@ -13325,7 +13490,7 @@ Follows is a source code listing for all files that have been open sourced. This
           state.camera_center.x += (targetX - state.camera_center.x) * 0.1 * timeScale
           state.camera_center.y += (targetY - state.camera_center.y) * 0.1 * timeScale
         end
    -    
    +  
       
         def calc_camera_magenta
           timeScale = 1
    @@ -13362,7 +13527,7 @@ Follows is a source code listing for all files that have been open sourced. This
         def calc_trauma_decay
           state.trauma = state.trauma * 0.9
         end
    -    
    +  
         def calc_random_float_range(min, max)
           rand * (max-min) + min
         end
    @@ -13390,7 +13555,7 @@ Follows is a source code listing for all files that have been open sourced. This
                                       g: 255,
                                       b: 255}
         end
    -    
    +  
         def render_player_magenta
           outputs[:scene].sprites << {x: state.player_magenta.x,
                                       y: state.player_magenta.y,
    @@ -13436,16 +13601,16 @@ Follows is a source code listing for all files that have been open sourced. This
            render_camera_magenta_scene
            render_camera_cyan_scene
       
    -       angle = Math.atan((state.player_magenta.y - state.player_cyan.y)/(state.player_magenta.x- state.player_cyan.x)) * 180/Math::PI 
    +       angle = Math.atan((state.player_magenta.y - state.player_cyan.y)/(state.player_magenta.x- state.player_cyan.x)) * 180/Math::PI
            output_split_camera angle
    -       
    +  
         end
       
         def render_camera_magenta_scene
            zoomFactor = 1
            offsetX = 32
            offsetY = 32
    -       
    +  
            outputs[:scene_magenta].sprites << {x: (-state.camera_magenta.x*2),
                                                y: (-state.camera_magenta.y),
                                                w: outputs[:scene].width*2,
    @@ -13471,7 +13636,7 @@ Follows is a source code listing for all files that have been open sourced. This
           outputs.labels << [128,64,"#{quadrant}",8,2,255,0,255,255]
           if quadrant == 1
             set_camera_attributes(w: 640, h: 720, m_x: 640, m_y: 0, c_x: 0, c_y: 0)
    -        
    +  
           elsif quadrant == 2
             set_camera_attributes(w: 1280, h: 360, m_x: 0, m_y: 360, c_x: 0, c_y: 0)
       
    @@ -13489,7 +13654,7 @@ Follows is a source code listing for all files that have been open sourced. This
           state.camera_cyan.h = h + 64
           outputs[:scene_cyan].width = (w) * 2
           outputs[:scene_cyan].height = h
    -      
    +  
           state.camera_magenta.w = w + 64
           state.camera_magenta.h = h + 64
           outputs[:scene_magenta].width = (w) * 2
    @@ -13501,7 +13666,7 @@ Follows is a source code listing for all files that have been open sourced. This
                               path: :scene_magenta}
           outputs.sprites << {x: c_x,
                               y: c_y,
    -                          w: w, 
    +                          w: w,
                               h: h,
                               path: :scene_cyan}
         end
    @@ -13509,7 +13674,7 @@ Follows is a source code listing for all files that have been open sourced. This
         def add_trauma amount
           state.trauma = [state.trauma + amount, 1.0].min
         end
    -    
    +  
         def remove_trauma amount
           state.trauma = [state.trauma - amount, 0.0].max
         end
    @@ -13549,7 +13714,7 @@ Follows is a source code listing for all files that have been open sourced. This
           outputs.labels << [128,512,"#{state.player_cyan.x.round()}",8,2,0,255,255,255]
           outputs.labels << [128,480,"#{state.player_cyan.y.round()}",8,2,0,255,255,255]
         end
    -    
    +  
         def input_move_magenta
           if inputs.keyboard.key_held.w
             state.player_magenta.dy = 5
    @@ -13583,7 +13748,7 @@ Follows is a source code listing for all files that have been open sourced. This
         $camera_movement.outputs = args.outputs
         $camera_movement.state   = args.state
         $camera_movement.grid    = args.grid
    -    $camera_movement.tick  
    +    $camera_movement.tick
       end
     
     #+end_src
    @@ -14404,9 +14569,97 @@ Follows is a source code listing for all files that have been open sourced. This
     
     #+end_src
     
    +*** Performance - Sprites As Struct - main.rb
    +#+begin_src ruby
    +  # ./samples/09_performance/03_sprites_as_struct/app/main.rb
    +  # create a Struct variant that allows for named parameters on construction.
    +  class NamedStruct < Struct
    +    def initialize **opts
    +      super(*members.map { |k| opts[k] })
    +    end
    +  end
    +  
    +  # create a Star NamedStruct
    +  Star = NamedStruct.new(:x, :y, :w, :h, :path, :s,
    +                         :angle, :angle_anchor_x, :angle_anchor_y,
    +                         :r, :g, :b, :a,
    +                         :tile_x, :tile_y,
    +                         :tile_w, :tile_h,
    +                         :source_x, :source_y,
    +                         :source_w, :source_h,
    +                         :flip_horizontally, :flip_vertically,
    +                         :blendmode_enum)
    +  
    +  # Sprites represented as Structs. They require a little bit more code than Hashes,
    +  # but are the a little faster to render too.
    +  def random_x args
    +    (args.grid.w.randomize :ratio) * -1
    +  end
    +  
    +  def random_y args
    +    (args.grid.h.randomize :ratio) * -1
    +  end
    +  
    +  def random_speed
    +    1 + (4.randomize :ratio)
    +  end
    +  
    +  def new_star args
    +    Star.new x: (random_x args),
    +             y: (random_y args),
    +             w: 4, h: 4,
    +             path: 'sprites/tiny-star.png',
    +             s: random_speed
    +  end
    +  
    +  def move_star args, star
    +    star.x += star[:s]
    +    star.y += star[:s]
    +    if star.x > args.grid.w || star.y > args.grid.h
    +      star.x = (random_x args)
    +      star.y = (random_y args)
    +      star[:s] = random_speed
    +    end
    +  end
    +  
    +  def tick args
    +    args.state.star_count ||= 0
    +  
    +    # sets console command when sample app initially opens
    +    if Kernel.global_tick_count == 0
    +      puts ""
    +      puts ""
    +      puts "========================================================="
    +      puts "* INFO: Sprites, Structs"
    +      puts "* INFO: Please specify the number of sprites to render."
    +      args.gtk.console.set_command "reset_with count: 100"
    +    end
    +  
    +    # init
    +    if args.state.tick_count == 0
    +      args.state.stars = args.state.star_count.map { |i| new_star args }
    +    end
    +  
    +    # update
    +    args.state.stars.each { |s| move_star args, s }
    +  
    +    # render
    +    args.outputs.sprites << args.state.stars
    +    args.outputs.background_color = [0, 0, 0]
    +    args.outputs.primitives << args.gtk.current_framerate_primitives
    +  end
    +  
    +  # resets game, and assigns star count given by user
    +  def reset_with count: count
    +    $gtk.reset
    +    $gtk.args.state.star_count = count
    +  end
    +
    +#+end_src
    +
     *** Performance - Sprites As Strict Entities - main.rb
     #+begin_src ruby
    -  # ./samples/09_performance/03_sprites_as_strict_entities/app/main.rb
    +  # ./samples/09_performance/04_sprites_as_strict_entities/app/main.rb
       # Sprites represented as StrictEntities using the queue ~args.outputs.sprites~
       # yields apis access similar to Entities, but all properties that can be set on the
       # entity must be predefined with a default value. Strict entities do not support the
    @@ -14484,7 +14737,7 @@ Follows is a source code listing for all files that have been open sourced. This
     
     *** Performance - Sprites As Classes - main.rb
     #+begin_src ruby
    -  # ./samples/09_performance/04_sprites_as_classes/app/main.rb
    +  # ./samples/09_performance/05_sprites_as_classes/app/main.rb
       # Sprites represented as Classes using the queue ~args.outputs.sprites~.
       # gives you full control of property declaration and method invocation.
       # They are more performant than OpenEntities and StrictEntities, but more code upfront.
    @@ -14545,7 +14798,7 @@ Follows is a source code listing for all files that have been open sourced. This
     
     *** Performance - Static Sprites As Classes - main.rb
     #+begin_src ruby
    -  # ./samples/09_performance/05_static_sprites_as_classes/app/main.rb
    +  # ./samples/09_performance/06_static_sprites_as_classes/app/main.rb
       # Sprites represented as Classes using the queue ~args.outputs.static_sprites~.
       # bypasses the queue behavior of ~args.outputs.sprites~. All instances are held
       # by reference. You get better performance, but you are mutating state of held objects
    @@ -14607,7 +14860,7 @@ Follows is a source code listing for all files that have been open sourced. This
     
     *** Performance - Static Sprites As Classes With Custom Drawing - main.rb
     #+begin_src ruby
    -  # ./samples/09_performance/06_static_sprites_as_classes_with_custom_drawing/app/main.rb
    +  # ./samples/09_performance/07_static_sprites_as_classes_with_custom_drawing/app/main.rb
       # Sprites represented as Classes, with a draw_override method, and using the queue ~args.outputs.static_sprites~.
       # is the fastest approach. This is comparable to what other game engines set as the default behavior.
       # There are tradeoffs for all this speed if the creation of a full blown class, and bypassing
    @@ -14701,7 +14954,7 @@ Follows is a source code listing for all files that have been open sourced. This
     
     *** Performance - Collision Limits - main.rb
     #+begin_src ruby
    -  # ./samples/09_performance/07_collision_limits/app/main.rb
    +  # ./samples/09_performance/08_collision_limits/app/main.rb
       =begin
       
        Reminders:
    @@ -14760,6 +15013,31 @@ Follows is a source code listing for all files that have been open sourced. This
     
     #+end_src
     
    +*** Advanced Debugging - Logging - main.rb
    +#+begin_src ruby
    +  # ./samples/10_advanced_debugging/00_logging/app/main.rb
    +  def tick args
    +    args.outputs.background_color = [255, 255, 255, 0]
    +    if args.state.tick_count == 0
    +      args.gtk.log_spam "log level spam"
    +      args.gtk.log_debug "log level debug"
    +      args.gtk.log_info "log level info"
    +      args.gtk.log_warn "log level warn"
    +      args.gtk.log_error "log level error"
    +      args.gtk.log_unfiltered "log level unfiltered"
    +      puts "This is a puts call"
    +      args.gtk.console.show
    +    end
    +  
    +    if args.state.tick_count == 60
    +      puts "This is a puts call on tick 60"
    +    elsif args.state.tick_count == 120
    +      puts "This is a puts call on tick 120"
    +    end
    +  end
    +
    +#+end_src
    +
     *** Advanced Debugging - Trace Debugging - main.rb
     #+begin_src ruby
       # ./samples/10_advanced_debugging/01_trace_debugging/app/main.rb
    @@ -15603,12 +15881,12 @@ Follows is a source code listing for all files that have been open sourced. This
         GTK::Entity.__reset_id__!
         args.state.player_one = "test"
         result = args.gtk.serialize_state args.state
    -    assert.equal! result, "{:entity_id=>3, :entity_keys_by_ref=>{}, :tick_count=>-1, :player_one=>\"test\"}"
    +    assert.equal! result, "{:entity_id=>4, :entity_keys_by_ref=>{}, :tick_count=>-1, :player_one=>\"test\"}"
       
         GTK::Entity.__reset_id__!
         args.gtk.write_file 'state.txt', ''
         result = args.gtk.serialize_state 'state.txt', args.state
    -    assert.equal! result, "{:entity_id=>3, :entity_keys_by_ref=>{}, :tick_count=>-1, :player_one=>\"test\"}"
    +    assert.equal! result, "{:entity_id=>4, :entity_keys_by_ref=>{}, :tick_count=>-1, :player_one=>\"test\"}"
       end
       
       def test_deserialize args, assert
    @@ -15657,7 +15935,7 @@ Follows is a source code listing for all files that have been open sourced. This
         args.state.player_two = args.state.new_entity_strict(:player_strict, name: "Ken", blood_type: nil)
       
         serialized_state = args.gtk.serialize_state args.state
    -    assert.equal! serialized_state, '{:entity_id=>9, :entity_keys_by_ref=>{}, :tick_count=>-1, :player_one=>{:entity_id=>1, :entity_name=>:player, :entity_keys_by_ref=>{}, :entity_type=>:player, :created_at=>-1, :global_created_at=>-1, :name=>"Ryu"}, :player_two=>{:entity_id=>2, :entity_name=>:player_strict, :entity_type=>:player_strict, :created_at=>-1, :global_created_at_elapsed=>-1, :entity_strict=>true, :entity_keys_by_ref=>{:entity_type=>:entity_name, :global_created_at_elapsed=>:created_at}, :name=>"Ken", :blood_type=>nil}}'
    +    assert.equal! serialized_state, '{:entity_id=>7, :entity_keys_by_ref=>{}, :tick_count=>-1, :player_one=>{:entity_id=>1, :entity_name=>:player, :entity_keys_by_ref=>{}, :entity_type=>:player, :created_at=>-1, :global_created_at=>-1, :name=>"Ryu"}, :player_two=>{:entity_id=>2, :entity_name=>:player_strict, :entity_type=>:player_strict, :created_at=>-1, :global_created_at_elapsed=>-1, :entity_strict=>true, :entity_keys_by_ref=>{:entity_type=>:entity_name, :global_created_at_elapsed=>:created_at}, :name=>"Ken", :blood_type=>nil}}'
       
         GTK::Entity.__reset_id__!
         deserialized_state = args.gtk.deserialize_state serialized_state
    @@ -15714,6 +15992,18 @@ Follows is a source code listing for all files that have been open sourced. This
         deserialized_state = args.gtk.deserialize_state serialized_state
         assert.equal! deserialized_state.strict_entity.one, deserialized_state.strict_entity.two
       end
    +  
    +  def test_serialization_excludes_thrash_count args, assert
    +    GTK::Entity.__reset_id__!
    +    args.state.player.name = "Ryu"
    +    # force a nil pun
    +    if args.state.player.age > 30
    +    end
    +    assert.equal! args.state.player.as_hash[:__thrash_count__][:>], 1
    +    result = args.gtk.serialize_state args.state
    +    assert.false! (result.include? "__thrash_count__"),
    +                  "The __thrash_count__ key exists in state when it shouldn't have."
    +  end
     
     #+end_src
     
    @@ -15876,11 +16166,13 @@ Follows is a source code listing for all files that have been open sourced. This
     *** Http - Retrieve Images - main.rb
     #+begin_src ruby
       # ./samples/11_http/01_retrieve_images/app/main.rb
    +  $gtk.register_cvar 'app.warn_seconds', "seconds to wait before starting", :uint, 11
    +  
       def tick args
         args.outputs.background_color = [0, 0, 0]
       
         # Show a warning at the start.
    -    args.state.warning_debounce ||= 11 * 60
    +    args.state.warning_debounce ||= args.cvars['app.warn_seconds'].value * 60
         if args.state.warning_debounce > 0
           args.state.warning_debounce -= 1
           args.outputs.labels << [640, 600, "This app shows random images from the Internet.", 10, 1, 255, 255, 255]
    @@ -15932,11 +16224,12 @@ Follows is a source code listing for all files that have been open sourced. This
     
     #+end_src
     
    -*** Http - Web Server - main.rb
    +*** Http - In Game Web Server Http Get - main.rb
     #+begin_src ruby
    -  # ./samples/11_http/02_web_server/app/main.rb
    +  # ./samples/11_http/02_in_game_web_server_http_get/app/main.rb
       def tick args
         args.state.port ||= 3000
    +    args.state.reqnum ||= 0
         # by default the embedded webserver runs on port 9001 (the port number is over 9000) and is disabled in a production build
         # to enable the http server in a production build, you need to manually start
         # the server up:
    @@ -15965,6 +16258,84 @@ Follows is a source code listing for all files that have been open sourced. This
     
     #+end_src
     
    +*** Http - In Game Web Server Http Post - main.rb
    +#+begin_src ruby
    +  # ./samples/11_http/03_in_game_web_server_http_post/app/main.rb
    +  def tick args
    +    # defaults
    +    args.state.post_button      = args.layout.rect(row: 0, col: 0, w: 5, h: 1).merge(text: "execute http_post")
    +    args.state.post_body_button = args.layout.rect(row: 1, col: 0, w: 5, h: 1).merge(text: "execute http_post_body")
    +    args.state.request_to_s ||= ""
    +    args.state.request_body ||= ""
    +  
    +    # render
    +    args.state.post_button.yield_self do |b|
    +      args.outputs.borders << b
    +      args.outputs.labels  << b.merge(text: b.text,
    +                                      y:    b.y + 30,
    +                                      x:    b.x + 10)
    +    end
    +  
    +    args.state.post_body_button.yield_self do |b|
    +      args.outputs.borders << b
    +      args.outputs.labels  << b.merge(text: b.text,
    +                                      y:    b.y + 30,
    +                                      x:    b.x + 10)
    +    end
    +  
    +    draw_label args, 0,  6, "Request:", args.state.request_to_s
    +    draw_label args, 0, 14, "Request Body Unaltered:", args.state.request_body
    +  
    +    # input
    +    if args.inputs.mouse.click
    +      # ============= HTTP_POST =============
    +      if (args.inputs.mouse.inside_rect? args.state.post_button)
    +        # ========= DATA TO SEND ===========
    +        form_fields = { "userId" => "#{Time.now.to_i}" }
    +        # ==================================
    +  
    +        args.gtk.http_post "http://localhost:9001/testing",
    +                           form_fields,
    +                           ["Content-Type: application/x-www-form-urlencoded"]
    +  
    +        args.gtk.notify! "http_post"
    +      end
    +  
    +      # ============= HTTP_POST_BODY =============
    +      if (args.inputs.mouse.inside_rect? args.state.post_body_button)
    +        # =========== DATA TO SEND ==============
    +        json = "{ \"userId\": \"#{Time.now.to_i}\"}"
    +        # ==================================
    +  
    +        args.gtk.http_post_body "http://localhost:9001/testing",
    +                                json,
    +                                ["Content-Type: application/json", "Content-Length: #{json.length}"]
    +  
    +        args.gtk.notify! "http_post_body"
    +      end
    +    end
    +  
    +    # calc
    +    args.inputs.http_requests.each do |r|
    +      puts "#{r}"
    +      if r.uri == "/testing"
    +        puts r
    +        args.state.request_to_s = "#{r}"
    +        args.state.request_body = r.raw_body
    +        r.respond 200, "ok"
    +      end
    +    end
    +  end
    +  
    +  def draw_label args, row, col, header, text
    +    label_pos = args.layout.rect(row: row, col: col, w: 0, h: 0)
    +    args.outputs.labels << "#{header}\n\n#{text}".wrapped_lines(80).map_with_index do |l, i|
    +      { x: label_pos.x, y: label_pos.y - (i * 15), text: l, size_enum: -2 }
    +    end
    +  end
    +
    +#+end_src
    +
     *** C Extensions - Basics - main.rb
     #+begin_src ruby
       # ./samples/12_c_extensions/01_basics/app/main.rb
    @@ -17401,8 +17772,8 @@ Follows is a source code listing for all files that have been open sourced. This
             calc
             # Calc Path
           end
    -      render 
    -      input  
    +      render
    +      input
         end
       
         def defaults
    @@ -17479,7 +17850,7 @@ Follows is a source code listing for all files that have been open sourced. This
             [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
    @@ -17498,36 +17869,36 @@ Follows is a source code listing for all files that have been open sourced. This
           # 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
    @@ -17546,7 +17917,7 @@ Follows is a source code listing for all files that have been open sourced. This
           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
    @@ -17572,8 +17943,8 @@ Follows is a source code listing for all files that have been open sourced. This
       
         # 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
    @@ -17588,7 +17959,7 @@ Follows is a source code listing for all files that have been open sourced. This
           end
       
           for y in 0..grid.height
    -        outputs.lines << horizontal_line(y) 
    +        outputs.lines << horizontal_line(y)
           end
         end
       
    @@ -17604,7 +17975,7 @@ Follows is a source code listing for all files that have been open sourced. This
       
         # 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
    @@ -17612,12 +17983,12 @@ Follows is a source code listing for all files that have been open sourced. This
         # 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
    @@ -17677,14 +18048,14 @@ Follows is a source code listing for all files that have been open sourced. This
           # 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
    @@ -17702,33 +18073,33 @@ Follows is a source code listing for all files that have been open sourced. This
         # 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
       
    @@ -17736,10 +18107,10 @@ Follows is a source code listing for all files that have been open sourced. This
         # 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
       
    @@ -17747,10 +18118,10 @@ Follows is a source code listing for all files that have been open sourced. This
         # 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
       
    @@ -17759,32 +18130,32 @@ Follows is a source code listing for all files that have been open sourced. This
           # 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
       
    @@ -17792,21 +18163,21 @@ Follows is a source code listing for all files that have been open sourced. This
         # 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
    @@ -17831,13 +18202,13 @@ Follows is a source code listing for all files that have been open sourced. This
         # 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
    @@ -17865,13 +18236,13 @@ Follows is a source code listing for all files that have been open sourced. This
       
         # 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
    @@ -17909,7 +18280,7 @@ Follows is a source code listing for all files that have been open sourced. This
         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
    @@ -17966,8 +18337,8 @@ Follows is a source code listing for all files that have been open sourced. This
             # And calculate the path
             calc_path
           end
    -      render 
    -      input  
    +      render
    +      input
         end
       
         def defaults
    @@ -17983,14 +18354,14 @@ Follows is a source code listing for all files that have been open sourced. This
           # This step is roughly the grid's width * height
           # When anim_steps equals max_steps no more calculations will occur
           # and the slider will be at the end
    -      state.max_steps  ||= args.state.grid.width * args.state.grid.height 
    +      state.max_steps  ||= args.state.grid.width * args.state.grid.height
       
           # The location of the star and walls of the grid
           # They can be modified to have a different initial grid
           # Walls are stored in a hash for quick look up when doing the search
           state.star   ||= [2, 8]
           state.target ||= [10, 5]
    -      state.walls  ||= {}    
    +      state.walls  ||= {}
       
           # Variables that are used by the breadth first search
           # Storing cells that the search has visited, prevents unnecessary steps
    @@ -18013,12 +18384,12 @@ Follows is a source code listing for all files that have been open sourced. This
           # 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
       
         # Draws everything onto the screen
         def render
    -      render_background       
    +      render_background
           render_heat_map
           render_walls
           render_path
    @@ -18031,8 +18402,8 @@ Follows is a source code listing for all files that have been open sourced. This
       
         # 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
    @@ -18049,7 +18420,7 @@ Follows is a source code listing for all files that have been open sourced. This
           end
       
           for y in 0..grid.height
    -        outputs.lines << horizontal_line(y) 
    +        outputs.lines << horizontal_line(y)
             outputs.lines << early_exit_horizontal_line(y)
           end
         end
    @@ -18076,7 +18447,7 @@ Follows is a source code listing for all files that have been open sourced. This
       
         # Draws the walls on both grids
         def render_walls
    -      state.walls.each_key do |wall| 
    +      state.walls.each_key do |wall|
             outputs.solids << [scale_up(wall), wall_color]
             outputs.solids << [early_exit_scale_up(wall), wall_color]
           end
    @@ -18086,13 +18457,13 @@ Follows is a source code listing for all files that have been open sourced. This
         def render_star
           outputs.sprites << [scale_up(state.star), 'star.png']
           outputs.sprites << [early_exit_scale_up(state.star), 'star.png']
    -    end 
    +    end
       
         # Renders the target on both grids
         def render_target
           outputs.sprites << [scale_up(state.target), 'target.png']
           outputs.sprites << [early_exit_scale_up(state.target), 'target.png']
    -    end 
    +    end
       
         # Labels the grids
         def render_labels
    @@ -18184,8 +18555,8 @@ Follows is a source code listing for all files that have been open sourced. This
           # 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
         end
       
         # Determines what the user is editing and stores the value
    @@ -18193,53 +18564,53 @@ Follows is a source code listing for all files that have been open sourced. This
         # 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 star in the second grid is clicked
    -      elsif star2_clicked?                 
    -        state.current_input = :star2          
    +      elsif star2_clicked?
    +        state.current_input = :star2
           # 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 the target in the second grid is clicked
    -      elsif target2_clicked?                 
    -        state.current_input = :target2 
    +      elsif target2_clicked?
    +        state.current_input = :target2
           # 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 a wall in the second grid is clicked
    -      elsif wall2_clicked?                 
    +      elsif wall2_clicked?
             state.current_input = :remove_wall2
           # When the first grid is clicked
    -      elsif grid_clicked?                 
    +      elsif grid_clicked?
             state.current_input = :add_wall
           # When the second grid is clicked
    -      elsif grid2_clicked?                 
    +      elsif grid2_clicked?
             state.current_input = :add_wall2
           end
         end
       
         # Processes click and drag based on what the user is currently dragging
         def process_input
    -      if state.current_input == :star         
    -        input_star                            
    +      if state.current_input == :star
    +        input_star
           elsif state.current_input == :star2
    -        input_star2                            
    -      elsif state.current_input == :target         
    -        input_target                            
    -      elsif state.current_input == :target2         
    -        input_target2                            
    -      elsif state.current_input == :remove_wall  
    -        input_remove_wall                     
    +        input_star2
    +      elsif state.current_input == :target
    +        input_target
    +      elsif state.current_input == :target2
    +        input_target2
    +      elsif state.current_input == :remove_wall
    +        input_remove_wall
           elsif state.current_input == :remove_wall2
    -        input_remove_wall2                     
    -      elsif state.current_input == :add_wall     
    -        input_add_wall                        
    -      elsif state.current_input == :add_wall2     
    -        input_add_wall2                        
    +        input_remove_wall2
    +      elsif state.current_input == :add_wall
    +        input_add_wall
    +      elsif state.current_input == :add_wall2
    +        input_add_wall2
           end
         end
       
    @@ -18247,10 +18618,10 @@ Follows is a source code listing for all files that have been open sourced. This
         # 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 = state.star.clone 
    +      old_star = state.star.clone
           state.star = cell_closest_to_mouse
    -      unless old_star == state.star 
    -        reset_search 
    +      unless old_star == state.star
    +        reset_search
           end
         end
       
    @@ -18258,10 +18629,10 @@ Follows is a source code listing for all files that have been open sourced. This
         # Only resets the search if the star changes position
         # Called whenever the user is editing the star (puts mouse down on star)
         def input_star2
    -      old_star = state.star.clone 
    +      old_star = state.star.clone
           state.star = cell_closest_to_mouse2
    -      unless old_star == state.star 
    -        reset_search 
    +      unless old_star == state.star
    +        reset_search
           end
         end
       
    @@ -18269,10 +18640,10 @@ Follows is a source code listing for all files that have been open sourced. This
         # 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 = state.target.clone 
    +      old_target = state.target.clone
           state.target = cell_closest_to_mouse
    -      unless old_target == state.target 
    -        reset_search 
    +      unless old_target == state.target
    +        reset_search
           end
         end
       
    @@ -18280,10 +18651,10 @@ Follows is a source code listing for all files that have been open sourced. This
         # 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_target2
    -      old_target = state.target.clone 
    +      old_target = state.target.clone
           state.target = cell_closest_to_mouse2
    -      unless old_target == state.target 
    -        reset_search 
    +      unless old_target == state.target
    +        reset_search
           end
         end
       
    @@ -18292,10 +18663,10 @@ Follows is a source code listing for all files that have been open sourced. This
           # 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 state.walls.has_key?(cell_closest_to_mouse)
    -          state.walls.delete(cell_closest_to_mouse) 
    -          reset_search 
    +          state.walls.delete(cell_closest_to_mouse)
    +          reset_search
             end
           end
         end
    @@ -18305,31 +18676,31 @@ Follows is a source code listing for all files that have been open sourced. This
           # 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_grid2? 
    +      if mouse_inside_grid2?
             if state.walls.has_key?(cell_closest_to_mouse2)
    -          state.walls.delete(cell_closest_to_mouse2) 
    -          reset_search 
    +          state.walls.delete(cell_closest_to_mouse2)
    +          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 state.walls.has_key?(cell_closest_to_mouse)
    -          state.walls[cell_closest_to_mouse] = true 
    -          reset_search 
    +          state.walls[cell_closest_to_mouse] = true
    +          reset_search
             end
           end
         end
       
    -    
    +  
         # Adds a wall in the second grid in the cell the mouse is over
         def input_add_wall2
    -      if mouse_inside_grid2? 
    +      if mouse_inside_grid2?
             unless state.walls.has_key?(cell_closest_to_mouse2)
    -          state.walls[cell_closest_to_mouse2] = true 
    -          reset_search 
    +          state.walls[cell_closest_to_mouse2] = true
    +          reset_search
             end
           end
         end
    @@ -18339,10 +18710,10 @@ Follows is a source code listing for all files that have been open sourced. This
         # with the current grid as the initial state of the grid
         def reset_search
           # Reset_Searchs the search
    -      state.frontier  = [] 
    -      state.visited   = {} 
    -      state.early_exit_visited   = {} 
    -      state.came_from = {} 
    +      state.frontier  = []
    +      state.visited   = {}
    +      state.early_exit_visited   = {}
    +      state.came_from = {}
           state.path      = {}
         end
       
    @@ -18350,23 +18721,23 @@ Follows is a source code listing for all files that have been open sourced. This
         def step
           # The setup to the search
           # Runs once when there are no visited cells
    -      if state.visited.empty?  
    -        state.visited[state.star] = true              
    -        state.early_exit_visited[state.star] = true              
    -        state.frontier << state.star                   
    +      if state.visited.empty?
    +        state.visited[state.star] = true
    +        state.early_exit_visited[state.star] = true
    +        state.frontier << state.star
             state.came_from[state.star] = nil
           end
       
           # A step in the search
    -      unless state.frontier.empty? 
    +      unless state.frontier.empty?
             # Takes the next frontier cell
    -        new_frontier = state.frontier.shift 
    +        new_frontier = state.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 state.visited.has_key?(neighbor) || state.walls.has_key?(neighbor) 
    +          unless state.visited.has_key?(neighbor) || state.walls.has_key?(neighbor)
                 # Add them to the frontier and mark them as visited in the first grid
    -            state.visited[neighbor] = true 
    +            state.visited[neighbor] = true
                 # Unless the target has been visited
                 unless state.visited.has_key?(state.target)
                   # Mark the neighbor as visited in the second grid as well
    @@ -18374,32 +18745,32 @@ Follows is a source code listing for all files that have been open sourced. This
                 end
       
                 # Add the neighbor to the frontier and remember which cell it came from
    -            state.frontier << neighbor 
    +            state.frontier << neighbor
                 state.came_from[neighbor] = new_frontier
               end
             end
           end
         end
    -    
    +  
       
         # 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
    @@ -18424,13 +18795,13 @@ Follows is a source code listing for all files that have been open sourced. This
         # 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
       
         # When the user grabs the star and puts their cursor to the far right
    @@ -18438,15 +18809,15 @@ Follows is a source code listing for all files that have been open sourced. This
         # Finding the cell closest to the mouse in the second grid helps with this
         def cell_closest_to_mouse2
           # Closest cell grid to the mouse in the second
    -      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
           # Translate the cell to the first grid
           x -= grid.width + 1
           # Bound x and y to the first 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
    @@ -18525,12 +18896,12 @@ Follows is a source code listing for all files that have been open sourced. This
       
         # Light brown
         def unvisited_color
    -      [221, 212, 213] 
    +      [221, 212, 213]
         end
       
         # Camo Green
         def wall_color
    -      [134, 134, 120] 
    +      [134, 134, 120]
         end
       
         # Pastel White
    @@ -18560,7 +18931,7 @@ Follows is a source code listing for all files that have been open sourced. This
         end
       
         # Every tick, new args are passed, and the Breadth First Search tick is called
    -    $early_exit_breadth_first_search ||= EarlyExitBreadthFirstSearch.new(args)
    +    $early_exit_breadth_first_search ||= EarlyExitBreadthFirstSearch.new
         $early_exit_breadth_first_search.args = args
         $early_exit_breadth_first_search.tick
       end
    @@ -18596,8 +18967,8 @@ Follows is a source code listing for all files that have been open sourced. This
         # The next step in the search is calculated
         def tick
           defaults
    -      render 
    -      input  
    +      render
    +      input
           calc
         end
       
    @@ -18614,7 +18985,7 @@ Follows is a source code listing for all files that have been open sourced. This
           # Walls are stored in a hash for quick look up when doing the search
           state.star   ||= [1, 5]
           state.target ||= [8, 4]
    -      state.walls  ||= {[1, 1] => true, [2, 1] => true, [3, 1] => true, [1, 2] => true, [2, 2] => true, [3, 2] => true}    
    +      state.walls  ||= {[1, 1] => true, [2, 1] => true, [3, 1] => true, [1, 2] => true, [2, 2] => true, [3, 2] => true}
           state.hills  ||= {
             [4, 1] => true,
             [5, 1] => true,
    @@ -18649,7 +19020,7 @@ Follows is a source code listing for all files that have been open sourced. This
           # 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.user_input ||= :none 
    +      state.user_input ||= :none
       
           # Values that are used for the breadth first search
           # Keeping track of what cells were visited prevents counting cells multiple times
    @@ -18673,7 +19044,7 @@ Follows is a source code listing for all files that have been open sourced. This
       
         # Draws everything onto the screen
         def render
    -      render_background       
    +      render_background
       
           render_heat_maps
       
    @@ -18688,8 +19059,8 @@ Follows is a source code listing for all files that have been open sourced. This
       
         # Draws what the grid looks like with nothing on it
         def render_background
    -      render_unvisited  
    -      render_grid_lines 
    +      render_unvisited
    +      render_grid_lines
           render_labels
         end
       
    @@ -18708,7 +19079,7 @@ Follows is a source code listing for all files that have been open sourced. This
           end
       
           for y in 0..grid.height
    -        outputs.lines << horizontal_line(y) 
    +        outputs.lines << horizontal_line(y)
             outputs.lines << shifted_horizontal_line(y)
           end
         end
    @@ -18821,16 +19192,16 @@ Follows is a source code listing for all files that have been open sourced. This
         def render_star
           outputs.sprites << [scale_up(state.star), 'star.png']
           outputs.sprites << [move_and_scale_up(state.star), 'star.png']
    -    end 
    +    end
       
         # Renders the target on both grids
         def render_target
           outputs.sprites << [scale_up(state.target), 'target.png']
           outputs.sprites << [move_and_scale_up(state.target), 'target.png']
    -    end 
    +    end
       
         def render_hills
    -      state.hills.each_key do |hill| 
    +      state.hills.each_key do |hill|
             outputs.solids << [scale_up(hill), hill_color]
             outputs.solids << [move_and_scale_up(hill), hill_color]
           end
    @@ -18838,7 +19209,7 @@ Follows is a source code listing for all files that have been open sourced. This
       
         # Draws the walls on both grids
         def render_walls
    -      state.walls.each_key do |wall| 
    +      state.walls.each_key do |wall|
             outputs.solids << [scale_up(wall), wall_color]
             outputs.solids << [move_and_scale_up(wall), wall_color]
           end
    @@ -18921,7 +19292,7 @@ Follows is a source code listing for all files that have been open sourced. This
           # If the mouse was clicked this tick
           if inputs.mouse.down
             # Determine what the user is editing and edit the state.user_input variable
    -        determine_input          
    +        determine_input
           end
       
           # Process user input based on user_input variable and current mouse position
    @@ -18934,43 +19305,43 @@ Follows is a source code listing for all files that have been open sourced. This
         # mouse left click is held
         def determine_input
           # If the mouse is over the star in the first grid
    -      if mouse_over_star?                 
    +      if mouse_over_star?
             # The user is editing the star from the first grid
    -        state.user_input = :star          
    +        state.user_input = :star
           # If the mouse is over the star in the second grid
    -      elsif mouse_over_star2?                 
    +      elsif mouse_over_star2?
             # The user is editing the star from the second grid
    -        state.user_input = :star2          
    +        state.user_input = :star2
           # If the mouse is over the target in the first grid
    -      elsif mouse_over_target?                 
    +      elsif mouse_over_target?
             # The user is editing the target from the first grid
    -        state.user_input = :target          
    +        state.user_input = :target
           # If the mouse is over the target in the second grid
    -      elsif mouse_over_target2?                 
    +      elsif mouse_over_target2?
             # The user is editing the target from the second grid
    -        state.user_input = :target2 
    +        state.user_input = :target2
           # If the mouse is over a wall in the first grid
    -      elsif mouse_over_wall?                 
    +      elsif mouse_over_wall?
             # The user is removing a wall from the first grid
    -        state.user_input = :remove_wall   
    +        state.user_input = :remove_wall
           # If the mouse is over a wall in the second grid
    -      elsif mouse_over_wall2?                 
    +      elsif mouse_over_wall2?
             # The user is removing a wall from the second grid
             state.user_input = :remove_wall2
           # If the mouse is over a hill in the first grid
    -      elsif mouse_over_hill?                 
    +      elsif mouse_over_hill?
             # The user is adding a wall from the first grid
    -        state.user_input = :add_wall   
    +        state.user_input = :add_wall
           # If the mouse is over a hill in the second grid
    -      elsif mouse_over_hill2?                 
    +      elsif mouse_over_hill2?
             # The user is adding a wall from the second grid
             state.user_input = :add_wall2
           # If the mouse is over the first grid
    -      elsif mouse_over_grid?                 
    +      elsif mouse_over_grid?
             # The user is adding a hill from the first grid
             state.user_input = :add_hill
           # If the mouse is over the second grid
    -      elsif mouse_over_grid2?                 
    +      elsif mouse_over_grid2?
             # The user is adding a hill from the second grid
             state.user_input = :add_hill2
           end
    @@ -18978,26 +19349,26 @@ Follows is a source code listing for all files that have been open sourced. This
       
         # Processes click and drag based on what the user is currently dragging
         def process_input
    -      if state.user_input == :star         
    -        input_star                            
    +      if state.user_input == :star
    +        input_star
           elsif state.user_input == :star2
    -        input_star2                            
    -      elsif state.user_input == :target         
    -        input_target                            
    -      elsif state.user_input == :target2         
    -        input_target2                            
    -      elsif state.user_input == :remove_wall  
    -        input_remove_wall                     
    +        input_star2
    +      elsif state.user_input == :target
    +        input_target
    +      elsif state.user_input == :target2
    +        input_target2
    +      elsif state.user_input == :remove_wall
    +        input_remove_wall
           elsif state.user_input == :remove_wall2
    -        input_remove_wall2                     
    -      elsif state.user_input == :add_hill     
    -        input_add_hill                        
    -      elsif state.user_input == :add_hill2     
    -        input_add_hill2                        
    -      elsif state.user_input == :add_wall     
    -        input_add_wall                        
    -      elsif state.user_input == :add_wall2     
    -        input_add_wall2                        
    +        input_remove_wall2
    +      elsif state.user_input == :add_hill
    +        input_add_hill
    +      elsif state.user_input == :add_hill2
    +        input_add_hill2
    +      elsif state.user_input == :add_wall
    +        input_add_wall
    +      elsif state.user_input == :add_wall2
    +        input_add_wall2
           end
         end
       
    @@ -19010,26 +19381,26 @@ Follows is a source code listing for all files that have been open sourced. This
             calc_dijkstra
           end
         end
    -    
    +  
       
         def calc_breadth_first
           # Sets up the Breadth First Search
    -      breadth_first_search.visited[state.star]   = true              
    -      breadth_first_search.frontier              << state.star                   
    +      breadth_first_search.visited[state.star]   = true
    +      breadth_first_search.frontier              << state.star
           breadth_first_search.came_from[state.star] = nil
       
           until breadth_first_search.frontier.empty?
             return if breadth_first_search.visited.has_key?(state.target)
             # A step in the search
             # Takes the next frontier cell
    -        new_frontier = breadth_first_search.frontier.shift 
    +        new_frontier = breadth_first_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 breadth_first_search.visited.has_key?(neighbor) || state.walls.has_key?(neighbor) 
    +          unless breadth_first_search.visited.has_key?(neighbor) || state.walls.has_key?(neighbor)
                 # Add them to the frontier and mark them as visited in the first grid
    -            breadth_first_search.visited[neighbor] = true 
    -            breadth_first_search.frontier << neighbor 
    +            breadth_first_search.visited[neighbor] = true
    +            breadth_first_search.frontier << neighbor
                 # Remember which cell the neighbor came from
                 breadth_first_search.came_from[neighbor] = new_frontier
               end
    @@ -19089,12 +19460,12 @@ Follows is a source code listing for all files that have been open sourced. This
         # 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 = state.star.clone 
    +      old_star = state.star.clone
           unless cell_closest_to_mouse == state.target
    -        state.star = cell_closest_to_mouse 
    +        state.star = cell_closest_to_mouse
           end
    -      unless old_star == state.star 
    -        reset_search 
    +      unless old_star == state.star
    +        reset_search
           end
         end
       
    @@ -19102,12 +19473,12 @@ Follows is a source code listing for all files that have been open sourced. This
         # Only resets the search if the star changes position
         # Called whenever the user is editing the star (puts mouse down on star)
         def input_star2
    -      old_star = state.star.clone 
    +      old_star = state.star.clone
           unless cell_closest_to_mouse2 == state.target
             state.star = cell_closest_to_mouse2
           end
    -      unless old_star == state.star 
    -        reset_search 
    +      unless old_star == state.star
    +        reset_search
           end
         end
       
    @@ -19115,12 +19486,12 @@ Follows is a source code listing for all files that have been open sourced. This
         # 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 = state.target.clone 
    +      old_target = state.target.clone
           unless cell_closest_to_mouse == state.star
             state.target = cell_closest_to_mouse
           end
    -      unless old_target == state.target 
    -        reset_search 
    +      unless old_target == state.target
    +        reset_search
           end
         end
       
    @@ -19128,12 +19499,12 @@ Follows is a source code listing for all files that have been open sourced. This
         # 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_target2
    -      old_target = state.target.clone 
    +      old_target = state.target.clone
           unless cell_closest_to_mouse2 == state.star
             state.target = cell_closest_to_mouse2
           end
    -      unless old_target == state.target 
    -        reset_search 
    +      unless old_target == state.target
    +        reset_search
           end
         end
       
    @@ -19142,11 +19513,11 @@ Follows is a source code listing for all files that have been open sourced. This
           # 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_over_grid? 
    +      if mouse_over_grid?
             if state.walls.has_key?(cell_closest_to_mouse) or state.hills.has_key?(cell_closest_to_mouse)
    -          state.walls.delete(cell_closest_to_mouse) 
    -          state.hills.delete(cell_closest_to_mouse) 
    -          reset_search 
    +          state.walls.delete(cell_closest_to_mouse)
    +          state.hills.delete(cell_closest_to_mouse)
    +          reset_search
             end
           end
         end
    @@ -19156,21 +19527,21 @@ Follows is a source code listing for all files that have been open sourced. This
           # 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_over_grid2? 
    +      if mouse_over_grid2?
             if state.walls.has_key?(cell_closest_to_mouse2) or state.hills.has_key?(cell_closest_to_mouse2)
    -          state.walls.delete(cell_closest_to_mouse2) 
    -          state.hills.delete(cell_closest_to_mouse2) 
    -          reset_search 
    +          state.walls.delete(cell_closest_to_mouse2)
    +          state.hills.delete(cell_closest_to_mouse2)
    +          reset_search
             end
           end
         end
       
         # Adds a hill in the first grid in the cell the mouse is over
         def input_add_hill
    -      if mouse_over_grid? 
    +      if mouse_over_grid?
             unless state.hills.has_key?(cell_closest_to_mouse)
    -          state.hills[cell_closest_to_mouse] = true 
    -          reset_search 
    +          state.hills[cell_closest_to_mouse] = true
    +          reset_search
             end
           end
         end
    @@ -19178,32 +19549,32 @@ Follows is a source code listing for all files that have been open sourced. This
       
         # Adds a hill in the second grid in the cell the mouse is over
         def input_add_hill2
    -      if mouse_over_grid2? 
    +      if mouse_over_grid2?
             unless state.hills.has_key?(cell_closest_to_mouse2)
    -          state.hills[cell_closest_to_mouse2] = true 
    -          reset_search 
    +          state.hills[cell_closest_to_mouse2] = true
    +          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_over_grid? 
    +      if mouse_over_grid?
             unless state.walls.has_key?(cell_closest_to_mouse)
    -          state.hills.delete(cell_closest_to_mouse) 
    -          state.walls[cell_closest_to_mouse] = true 
    -          reset_search 
    +          state.hills.delete(cell_closest_to_mouse)
    +          state.walls[cell_closest_to_mouse] = true
    +          reset_search
             end
           end
         end
       
         # Adds a wall in the second grid in the cell the mouse is over
         def input_add_wall2
    -      if mouse_over_grid2? 
    +      if mouse_over_grid2?
             unless state.walls.has_key?(cell_closest_to_mouse2)
    -          state.hills.delete(cell_closest_to_mouse2) 
    -          state.walls[cell_closest_to_mouse2] = true 
    -          reset_search 
    +          state.hills.delete(cell_closest_to_mouse2)
    +          state.walls[cell_closest_to_mouse2] = true
    +          reset_search
             end
           end
         end
    @@ -19226,21 +19597,21 @@ Follows is a source code listing for all files that have been open sourced. This
         # 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
    @@ -19265,13 +19636,13 @@ Follows is a source code listing for all files that have been open sourced. This
         # 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
       
         # When the user grabs the star and puts their cursor to the far right
    @@ -19279,17 +19650,17 @@ Follows is a source code listing for all files that have been open sourced. This
         # Finding the cell closest to the mouse in the second grid helps with this
         def cell_closest_to_mouse2
           # Closest cell grid to the mouse in the second
    -      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
           # Translate the cell to the first grid
           x -= grid.width + 1
           # Bound x and y to the first grid
           x = 0 if x < 0
           y = 0 if y < 0
    -      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
    @@ -19362,12 +19733,12 @@ Follows is a source code listing for all files that have been open sourced. This
       
         # Light brown
         def unvisited_color
    -      [221, 212, 213] 
    +      [221, 212, 213]
         end
       
         # Camo Green
         def wall_color
    -      [134, 134, 120] 
    +      [134, 134, 120]
         end
       
         # Pastel White
    @@ -19410,7 +19781,7 @@ Follows is a source code listing for all files that have been open sourced. This
         end
       
         # Every tick, new args are passed, and the Dijkstra tick method is called
    -    $movement_costs ||= Movement_Costs.new(args)
    +    $movement_costs ||= Movement_Costs.new
         $movement_costs.args = args
         $movement_costs.tick
       end
    @@ -20396,7 +20767,7 @@ Follows is a source code listing for all files that have been open sourced. This
         end
       
         # Every tick, new args are passed, and the Breadth First Search tick is called
    -    $heuristic_with_walls ||= Heuristic_With_Walls.new(args)
    +    $heuristic_with_walls ||= Heuristic_With_Walls.new
         $heuristic_with_walls.args = args
         $heuristic_with_walls.tick
       end
    @@ -21415,7 +21786,7 @@ Follows is a source code listing for all files that have been open sourced. This
         end
       
         # Every tick, new args are passed, and the Breadth First Search tick is called
    -    $heuristic ||= Heuristic.new(args)
    +    $heuristic ||= Heuristic.new
         $heuristic.args = args
         $heuristic.tick
       end
    @@ -21443,8 +21814,8 @@ Follows is a source code listing for all files that have been open sourced. This
       
         def tick
           defaults
    -      render 
    -      input  
    +      render
    +      input
       
           if dijkstra.came_from.empty?
             calc_searches
    @@ -21497,7 +21868,7 @@ Follows is a source code listing for all files that have been open sourced. This
           # 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.user_input ||= :none 
    +      state.user_input ||= :none
       
           # These variables allow the breadth first search to take place
           # Came_from is a hash with a key of a cell and a value of the cell that was expanded from to find the key.
    @@ -21575,7 +21946,7 @@ Follows is a source code listing for all files that have been open sourced. This
           # If the mouse was clicked this tick
           if inputs.mouse.down
             # Determine what the user is editing and appropriately edit the state.user_input variable
    -        determine_input          
    +        determine_input
           end
       
           # Process user input based on user_input variable and current mouse position
    @@ -21586,51 +21957,51 @@ Follows is a source code listing for all files that have been open sourced. This
         # This method is called when the mouse is clicked down
         def determine_input
           # If the mouse is over the star in the first grid
    -      if dijkstra_mouse_over_star?                 
    +      if dijkstra_mouse_over_star?
             # The user is editing the star from the first grid
    -        state.user_input = :dijkstra_star          
    +        state.user_input = :dijkstra_star
           # If the mouse is over the star in the second grid
    -      elsif greedy_mouse_over_star?                 
    +      elsif greedy_mouse_over_star?
             # The user is editing the star from the second grid
    -        state.user_input = :greedy_star          
    +        state.user_input = :greedy_star
           # If the mouse is over the star in the third grid
    -      elsif a_star_mouse_over_star?                 
    +      elsif a_star_mouse_over_star?
             # The user is editing the star from the third grid
    -        state.user_input = :a_star_star          
    +        state.user_input = :a_star_star
           # If the mouse is over the target in the first grid
    -      elsif dijkstra_mouse_over_target?                 
    +      elsif dijkstra_mouse_over_target?
             # The user is editing the target from the first grid
    -        state.user_input = :dijkstra_target          
    +        state.user_input = :dijkstra_target
           # If the mouse is over the target in the second grid
    -      elsif greedy_mouse_over_target?                 
    +      elsif greedy_mouse_over_target?
             # The user is editing the target from the second grid
    -        state.user_input = :greedy_target 
    +        state.user_input = :greedy_target
           # If the mouse is over the target in the third grid
    -      elsif a_star_mouse_over_target?                 
    +      elsif a_star_mouse_over_target?
             # The user is editing the target from the third grid
    -        state.user_input = :a_star_target 
    +        state.user_input = :a_star_target
           # If the mouse is over a wall in the first grid
    -      elsif dijkstra_mouse_over_wall?                 
    +      elsif dijkstra_mouse_over_wall?
             # The user is removing a wall from the first grid
    -        state.user_input = :dijkstra_remove_wall   
    +        state.user_input = :dijkstra_remove_wall
           # If the mouse is over a wall in the second grid
    -      elsif greedy_mouse_over_wall?                 
    +      elsif greedy_mouse_over_wall?
             # The user is removing a wall from the second grid
             state.user_input = :greedy_remove_wall
           # If the mouse is over a wall in the third grid
    -      elsif a_star_mouse_over_wall?                 
    +      elsif a_star_mouse_over_wall?
             # The user is removing a wall from the third grid
             state.user_input = :a_star_remove_wall
           # If the mouse is over the first grid
    -      elsif dijkstra_mouse_over_grid?                 
    +      elsif dijkstra_mouse_over_grid?
             # The user is adding a wall from the first grid
             state.user_input = :dijkstra_add_wall
           # If the mouse is over the second grid
    -      elsif greedy_mouse_over_grid?                 
    +      elsif greedy_mouse_over_grid?
             # The user is adding a wall from the second grid
             state.user_input = :greedy_add_wall
           # If the mouse is over the third grid
    -      elsif a_star_mouse_over_grid?                 
    +      elsif a_star_mouse_over_grid?
             # The user is adding a wall from the third grid
             state.user_input = :a_star_add_wall
           end
    @@ -21638,30 +22009,30 @@ Follows is a source code listing for all files that have been open sourced. This
       
         # Processes click and drag based on what the user is currently dragging
         def process_input
    -      if state.user_input == :dijkstra_star         
    -        process_input_dijkstra_star                            
    +      if state.user_input == :dijkstra_star
    +        process_input_dijkstra_star
           elsif state.user_input == :greedy_star
    -        process_input_greedy_star                            
    +        process_input_greedy_star
           elsif state.user_input == :a_star_star
    -        process_input_a_star_star                            
    -      elsif state.user_input == :dijkstra_target         
    -        process_input_dijkstra_target                            
    -      elsif state.user_input == :greedy_target         
    -        process_input_greedy_target                            
    -      elsif state.user_input == :a_star_target         
    -        process_input_a_star_target                            
    -      elsif state.user_input == :dijkstra_remove_wall  
    -        process_input_dijkstra_remove_wall                     
    +        process_input_a_star_star
    +      elsif state.user_input == :dijkstra_target
    +        process_input_dijkstra_target
    +      elsif state.user_input == :greedy_target
    +        process_input_greedy_target
    +      elsif state.user_input == :a_star_target
    +        process_input_a_star_target
    +      elsif state.user_input == :dijkstra_remove_wall
    +        process_input_dijkstra_remove_wall
           elsif state.user_input == :greedy_remove_wall
    -        process_input_greedy_remove_wall                     
    +        process_input_greedy_remove_wall
           elsif state.user_input == :a_star_remove_wall
    -        process_input_a_star_remove_wall                     
    -      elsif state.user_input == :dijkstra_add_wall     
    -        process_input_dijkstra_add_wall                        
    -      elsif state.user_input == :greedy_add_wall     
    -        process_input_greedy_add_wall                        
    -      elsif state.user_input == :a_star_add_wall     
    -        process_input_a_star_add_wall                        
    +        process_input_a_star_remove_wall
    +      elsif state.user_input == :dijkstra_add_wall
    +        process_input_dijkstra_add_wall
    +      elsif state.user_input == :greedy_add_wall
    +        process_input_greedy_add_wall
    +      elsif state.user_input == :a_star_add_wall
    +        process_input_a_star_add_wall
           end
         end
       
    @@ -21676,7 +22047,7 @@ Follows is a source code listing for all files that have been open sourced. This
       
           # The horizontal grid lines
           for y in 0..grid.height
    -        outputs.lines << dijkstra_horizontal_line(y) 
    +        outputs.lines << dijkstra_horizontal_line(y)
           end
         end
       
    @@ -21691,7 +22062,7 @@ Follows is a source code listing for all files that have been open sourced. This
       
           # The horizontal grid lines
           for y in 0..grid.height
    -        outputs.lines << greedy_horizontal_line(y) 
    +        outputs.lines << greedy_horizontal_line(y)
           end
         end
       
    @@ -21706,10 +22077,10 @@ Follows is a source code listing for all files that have been open sourced. This
       
           # The horizontal grid lines
           for y in 0..grid.height
    -        outputs.lines << a_star_horizontal_line(y) 
    +        outputs.lines << a_star_horizontal_line(y)
           end
         end
    -      
    +  
         # Returns a vertical line for a column of the first grid
         def dijkstra_vertical_line column
           dijkstra_scale_up([column, 0, column, grid.height])
    @@ -21759,7 +22130,7 @@ Follows is a source code listing for all files that have been open sourced. This
         def render_dijkstra_target
           outputs.sprites << [dijkstra_scale_up(grid.target), 'target.png']
         end
    -    
    +  
         # Renders the target on the second grid
         def render_greedy_target
           outputs.sprites << [greedy_scale_up(grid.target), 'target.png']
    @@ -21772,21 +22143,21 @@ Follows is a source code listing for all files that have been open sourced. This
       
         # Renders the walls on the first grid
         def render_dijkstra_walls
    -      grid.walls.each_key do | wall | 
    +      grid.walls.each_key do | wall |
             outputs.solids << [dijkstra_scale_up(wall), wall_color]
           end
         end
       
         # Renders the walls on the second grid
         def render_greedy_walls
    -      grid.walls.each_key do | wall | 
    +      grid.walls.each_key do | wall |
             outputs.solids << [greedy_scale_up(wall), wall_color]
           end
         end
       
         # Renders the walls on the third grid
         def render_a_star_walls
    -      grid.walls.each_key do | wall | 
    +      grid.walls.each_key do | wall |
             outputs.solids << [a_star_scale_up(wall), wall_color]
           end
         end
    @@ -21986,12 +22357,12 @@ Follows is a source code listing for all files that have been open sourced. This
         # Only resets the search if the star changes position
         # Called whenever the user is editing the star (puts mouse down on star)
         def process_input_dijkstra_star
    -      old_star = grid.star.clone 
    +      old_star = grid.star.clone
           unless dijkstra_cell_closest_to_mouse == grid.target
    -        grid.star = dijkstra_cell_closest_to_mouse 
    +        grid.star = dijkstra_cell_closest_to_mouse
           end
    -      unless old_star == grid.star 
    -        reset_searches 
    +      unless old_star == grid.star
    +        reset_searches
           end
         end
       
    @@ -21999,12 +22370,12 @@ Follows is a source code listing for all files that have been open sourced. This
         # Only resets the search if the star changes position
         # Called whenever the user is editing the star (puts mouse down on star)
         def process_input_greedy_star
    -      old_star = grid.star.clone 
    +      old_star = grid.star.clone
           unless greedy_cell_closest_to_mouse == grid.target
             grid.star = greedy_cell_closest_to_mouse
           end
    -      unless old_star == grid.star 
    -        reset_searches 
    +      unless old_star == grid.star
    +        reset_searches
           end
         end
       
    @@ -22012,12 +22383,12 @@ Follows is a source code listing for all files that have been open sourced. This
         # Only resets the search if the star changes position
         # Called whenever the user is editing the star (puts mouse down on star)
         def process_input_a_star_star
    -      old_star = grid.star.clone 
    +      old_star = grid.star.clone
           unless a_star_cell_closest_to_mouse == grid.target
             grid.star = a_star_cell_closest_to_mouse
           end
    -      unless old_star == grid.star 
    -        reset_searches 
    +      unless old_star == grid.star
    +        reset_searches
           end
         end
       
    @@ -22025,12 +22396,12 @@ Follows is a source code listing for all files that have been open sourced. This
         # Only reset_searchess the search if the target changes position
         # Called whenever the user is editing the target (puts mouse down on target)
         def process_input_dijkstra_target
    -      old_target = grid.target.clone 
    +      old_target = grid.target.clone
           unless dijkstra_cell_closest_to_mouse == grid.star
             grid.target = dijkstra_cell_closest_to_mouse
           end
    -      unless old_target == grid.target 
    -        reset_searches 
    +      unless old_target == grid.target
    +        reset_searches
           end
         end
       
    @@ -22038,12 +22409,12 @@ Follows is a source code listing for all files that have been open sourced. This
         # Only reset_searchess the search if the target changes position
         # Called whenever the user is editing the target (puts mouse down on target)
         def process_input_greedy_target
    -      old_target = grid.target.clone 
    +      old_target = grid.target.clone
           unless greedy_cell_closest_to_mouse == grid.star
             grid.target = greedy_cell_closest_to_mouse
           end
    -      unless old_target == grid.target 
    -        reset_searches 
    +      unless old_target == grid.target
    +        reset_searches
           end
         end
       
    @@ -22051,12 +22422,12 @@ Follows is a source code listing for all files that have been open sourced. This
         # Only reset_searchess the search if the target changes position
         # Called whenever the user is editing the target (puts mouse down on target)
         def process_input_a_star_target
    -      old_target = grid.target.clone 
    +      old_target = grid.target.clone
           unless a_star_cell_closest_to_mouse == grid.star
             grid.target = a_star_cell_closest_to_mouse
           end
    -      unless old_target == grid.target 
    -        reset_searches 
    +      unless old_target == grid.target
    +        reset_searches
           end
         end
       
    @@ -22065,10 +22436,10 @@ Follows is a source code listing for all files that have been open sourced. This
           # 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 dijkstra_mouse_over_grid? 
    +      if dijkstra_mouse_over_grid?
             if grid.walls.has_key?(dijkstra_cell_closest_to_mouse)
    -          grid.walls.delete(dijkstra_cell_closest_to_mouse) 
    -          reset_searches 
    +          grid.walls.delete(dijkstra_cell_closest_to_mouse)
    +          reset_searches
             end
           end
         end
    @@ -22078,10 +22449,10 @@ Follows is a source code listing for all files that have been open sourced. This
           # 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 greedy_mouse_over_grid? 
    +      if greedy_mouse_over_grid?
             if grid.walls.has_key?(greedy_cell_closest_to_mouse)
    -          grid.walls.delete(greedy_cell_closest_to_mouse) 
    -          reset_searches 
    +          grid.walls.delete(greedy_cell_closest_to_mouse)
    +          reset_searches
             end
           end
         end
    @@ -22091,40 +22462,40 @@ Follows is a source code listing for all files that have been open sourced. This
           # 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 a_star_mouse_over_grid? 
    +      if a_star_mouse_over_grid?
             if grid.walls.has_key?(a_star_cell_closest_to_mouse)
    -          grid.walls.delete(a_star_cell_closest_to_mouse) 
    -          reset_searches 
    +          grid.walls.delete(a_star_cell_closest_to_mouse)
    +          reset_searches
             end
           end
         end
       
         # Adds a wall in the first grid in the cell the mouse is over
         def process_input_dijkstra_add_wall
    -      if dijkstra_mouse_over_grid? 
    +      if dijkstra_mouse_over_grid?
             unless grid.walls.has_key?(dijkstra_cell_closest_to_mouse)
    -          grid.walls[dijkstra_cell_closest_to_mouse] = true 
    -          reset_searches 
    +          grid.walls[dijkstra_cell_closest_to_mouse] = true
    +          reset_searches
             end
           end
         end
       
         # Adds a wall in the second grid in the cell the mouse is over
         def process_input_greedy_add_wall
    -      if greedy_mouse_over_grid? 
    +      if greedy_mouse_over_grid?
             unless grid.walls.has_key?(greedy_cell_closest_to_mouse)
    -          grid.walls[greedy_cell_closest_to_mouse] = true 
    -          reset_searches 
    +          grid.walls[greedy_cell_closest_to_mouse] = true
    +          reset_searches
             end
           end
         end
       
         # Adds a wall in the third grid in the cell the mouse is over
         def process_input_a_star_add_wall
    -      if a_star_mouse_over_grid? 
    +      if a_star_mouse_over_grid?
             unless grid.walls.has_key?(a_star_cell_closest_to_mouse)
    -          grid.walls[a_star_cell_closest_to_mouse] = true 
    -          reset_searches 
    +          grid.walls[a_star_cell_closest_to_mouse] = true
    +          reset_searches
             end
           end
         end
    @@ -22134,13 +22505,13 @@ Follows is a source code listing for all files that have been open sourced. This
         # Finding the cell closest to the mouse helps with this
         def dijkstra_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
       
         # When the user grabs the star and puts their cursor to the far right
    @@ -22148,17 +22519,17 @@ Follows is a source code listing for all files that have been open sourced. This
         # Finding the cell closest to the mouse in the second grid helps with this
         def greedy_cell_closest_to_mouse
           # Closest cell grid to the mouse in the second
    -      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
           # Translate the cell to the first grid
           x -= grid.width + 1
           # Bound x and y to the first grid
           x = 0 if x < 0
           y = 0 if y < 0
    -      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
       
         # When the user grabs the star and puts their cursor to the far right
    @@ -22166,17 +22537,17 @@ Follows is a source code listing for all files that have been open sourced. This
         # Finding the cell closest to the mouse in the third grid helps with this
         def a_star_cell_closest_to_mouse
           # Closest cell grid to the mouse in the second
    -      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
           # Translate the cell to the first grid
           x -= (grid.width + 1) * 2
           # Bound x and y to the first grid
           x = 0 if x < 0
           y = 0 if y < 0
    -      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
       
         def reset_searches
    @@ -22204,21 +22575,21 @@ Follows is a source code listing for all files that have been open sourced. This
       
         def calc_dijkstra
           # Sets up the search to begin from the star
    -      dijkstra.frontier << grid.star                   
    -      dijkstra.came_from[grid.star] = nil              
    -      dijkstra.cost_so_far[grid.star] = 0              
    +      dijkstra.frontier << grid.star
    +      dijkstra.came_from[grid.star] = nil
    +      dijkstra.cost_so_far[grid.star] = 0
       
           # Until the target is found or there are no more cells to explore from
           until dijkstra.came_from.has_key?(grid.target) or dijkstra.frontier.empty?
             # Take the next frontier cell. The first element is the cell, the second is the priority.
             new_frontier = dijkstra.frontier.shift#[0]
             # 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 dijkstra.came_from.has_key?(neighbor) or grid.walls.has_key?(neighbor) 
    +          unless dijkstra.came_from.has_key?(neighbor) or grid.walls.has_key?(neighbor)
                 # Add them to the frontier and mark them as visited
                 dijkstra.frontier << neighbor
    -            dijkstra.came_from[neighbor] = new_frontier 
    +            dijkstra.came_from[neighbor] = new_frontier
                 dijkstra.cost_so_far[neighbor] = dijkstra.cost_so_far[new_frontier] + 1
               end
             end
    @@ -22239,20 +22610,20 @@ Follows is a source code listing for all files that have been open sourced. This
       
         def calc_greedy
           # Sets up the search to begin from the star
    -      greedy.frontier << grid.star                   
    -      greedy.came_from[grid.star] = nil              
    +      greedy.frontier << grid.star
    +      greedy.came_from[grid.star] = nil
       
           # Until the target is found or there are no more cells to explore from
           until greedy.came_from.has_key?(grid.target) or greedy.frontier.empty?
             # Take the next frontier cell
    -        new_frontier = greedy.frontier.shift 
    +        new_frontier = greedy.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 greedy.came_from.has_key?(neighbor) or grid.walls.has_key?(neighbor) 
    +          unless greedy.came_from.has_key?(neighbor) or grid.walls.has_key?(neighbor)
                 # Add them to the frontier and mark them as visited
    -            greedy.frontier << neighbor 
    -            greedy.came_from[neighbor] = new_frontier 
    +            greedy.frontier << neighbor
    +            greedy.came_from[neighbor] = new_frontier
               end
             end
             # Sort the frontier so that cells that are in a zigzag pattern are prioritized over those in an line
    @@ -22282,12 +22653,12 @@ Follows is a source code listing for all files that have been open sourced. This
             current_frontier = a_star.frontier.shift
       
             # For each of that cells neighbors
    -        adjacent_neighbors(current_frontier).each do | neighbor | 
    +        adjacent_neighbors(current_frontier).each do | neighbor |
               # That have not been visited and are not walls
    -          unless a_star.came_from.has_key?(neighbor) or grid.walls.has_key?(neighbor) 
    +          unless a_star.came_from.has_key?(neighbor) or grid.walls.has_key?(neighbor)
                 # Add them to the frontier and mark them as visited
    -            a_star.frontier << neighbor 
    -            a_star.came_from[neighbor] = current_frontier 
    +            a_star.frontier << neighbor
    +            a_star.came_from[neighbor] = current_frontier
                 a_star.cost_so_far[neighbor] = a_star.cost_so_far[current_frontier] + 1
               end
             end
    @@ -22369,16 +22740,16 @@ Follows is a source code listing for all files that have been open sourced. This
         # 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
       
    -      neighbors 
    +      neighbors
         end
       
         # Finds the vertical and horizontal distance of a cell from the star
    @@ -22423,11 +22794,11 @@ Follows is a source code listing for all files that have been open sourced. This
         def wall_color
           [134, 134, 120] # Camo Green
         end
    -    
    +  
         def visited_color
           [204, 191, 179] # Dark Brown
         end
    -    
    +  
         def path_color
           [231, 230, 228] # Pastel White
         end
    @@ -22450,7 +22821,7 @@ Follows is a source code listing for all files that have been open sourced. This
         end
       
         # Every tick, new args are passed, and the Breadth First Search tick is called
    -    $a_star_algorithm ||= A_Star_Algorithm.new(args)
    +    $a_star_algorithm ||= A_Star_Algorithm.new
         $a_star_algorithm.args = args
         $a_star_algorithm.tick
       end
    @@ -22986,6 +23357,363 @@ Follows is a source code listing for all files that have been open sourced. This
       https://en.wikipedia.org/wiki/OFF_(file_format)
     #+end_src
     
    +*** 3d - Yaw Pitch Roll - main.rb
    +#+begin_src ruby
    +  # ./samples/99_genre_3d/03_yaw_pitch_roll/app/main.rb
    +  class Game
    +    attr_gtk
    +  
    +    def tick
    +      defaults
    +      render
    +      input
    +    end
    +  
    +    def matrix_mul m, v
    +      (hmap x: ((m.x.x * v.x) + (m.x.y * v.y) + (m.x.z * v.z) + (m.x.w * v.w)),
    +            y: ((m.y.x * v.x) + (m.y.y * v.y) + (m.y.z * v.z) + (m.y.w * v.w)),
    +            z: ((m.z.x * v.x) + (m.z.y * v.y) + (m.z.z * v.z) + (m.z.w * v.w)),
    +            w: ((m.w.x * v.x) + (m.w.y * v.y) + (m.w.z * v.z) + (m.w.w * v.w)))
    +    end
    +  
    +    def player_ship
    +      [
    +        # engine back
    +        { x: -1, y: -1, z: 1, w: 0 },
    +        { x: -1, y:  1, z: 1, w: 0 },
    +  
    +        { x: -1, y:  1, z: 1, w: 0 },
    +        { x:  1, y:  1, z: 1, w: 0 },
    +  
    +        { x:  1, y:  1, z: 1, w: 0 },
    +        { x:  1, y: -1, z: 1, w: 0 },
    +  
    +        { x:  1, y: -1, z: 1, w: 0 },
    +        { x: -1, y: -1, z: 1, w: 0 },
    +  
    +        # engine front
    +        { x: -1, y: -1, z: -1, w: 0 },
    +        { x: -1, y:  1, z: -1, w: 0 },
    +  
    +        { x: -1, y:  1, z: -1, w: 0 },
    +        { x:  1, y:  1, z: -1, w: 0 },
    +  
    +        { x:  1, y:  1, z: -1, w: 0 },
    +        { x:  1, y: -1, z: -1, w: 0 },
    +  
    +        { x:  1, y: -1, z: -1, w: 0 },
    +        { x: -1, y: -1, z: -1, w: 0 },
    +  
    +        # engine left
    +        { x: -1, z:  -1, y: -1, w: 0 },
    +        { x: -1, z:  -1, y:  1, w: 0 },
    +  
    +        { x: -1, z:  -1, y:  1, w: 0 },
    +        { x: -1, z:   1, y:  1, w: 0 },
    +  
    +        { x: -1, z:   1, y:  1, w: 0 },
    +        { x: -1, z:   1, y: -1, w: 0 },
    +  
    +        { x: -1, z:   1, y: -1, w: 0 },
    +        { x: -1, z:  -1, y: -1, w: 0 },
    +  
    +        # engine right
    +        { x:  1, z:  -1, y: -1, w: 0 },
    +        { x:  1, z:  -1, y:  1, w: 0 },
    +  
    +        { x:  1, z:  -1, y:  1, w: 0 },
    +        { x:  1, z:   1, y:  1, w: 0 },
    +  
    +        { x:  1, z:   1, y:  1, w: 0 },
    +        { x:  1, z:   1, y: -1, w: 0 },
    +  
    +        { x:  1, z:   1, y: -1, w: 0 },
    +        { x:  1, z:  -1, y: -1, w: 0 },
    +  
    +        # top front of engine to front of ship
    +        { x:  1, y:   1, z: 1, w: 0 },
    +        { x:  0, y:  -1, z: 9, w: 0 },
    +  
    +        { x:  0, y:  -1, z: 9, w: 0 },
    +        { x: -1, y:   1, z: 1, w: 0 },
    +  
    +        # bottom front of engine
    +        { x:  1, y:  -1, z: 1, w: 0 },
    +        { x:  0, y:  -1, z: 9, w: 0 },
    +  
    +        { x: -1, y:  -1, z: 1, w: 0 },
    +        { x:  0, y:  -1, z: 9, w: 0 },
    +  
    +        # right wing
    +        # front of wing
    +        { x: 1, y: 0.10, z:  1, w: 0 },
    +        { x: 9, y: 0.10, z: -1, w: 0 },
    +  
    +        { x:  9, y: 0.10, z: -1, w: 0 },
    +        { x: 10, y: 0.10, z: -2, w: 0 },
    +  
    +        # back of wing
    +        { x: 1, y: 0.10, z: -1, w: 0 },
    +        { x: 9, y: 0.10, z: -1, w: 0 },
    +  
    +        { x: 10, y: 0.10, z: -2, w: 0 },
    +        { x:  8, y: 0.10, z: -1, w: 0 },
    +  
    +        # front of wing
    +        { x: 1, y: -0.10, z:  1, w: 0 },
    +        { x: 9, y: -0.10, z: -1, w: 0 },
    +  
    +        { x:  9, y: -0.10, z: -1, w: 0 },
    +        { x: 10, y: -0.10, z: -2, w: 0 },
    +  
    +        # back of wing
    +        { x: 1, y: -0.10, z: -1, w: 0 },
    +        { x: 9, y: -0.10, z: -1, w: 0 },
    +  
    +        { x: 10, y: -0.10, z: -2, w: 0 },
    +        { x:  8, y: -0.10, z: -1, w: 0 },
    +  
    +        # left wing
    +        # front of wing
    +        { x: -1, y: 0.10, z:  1, w: 0 },
    +        { x: -9, y: 0.10, z: -1, w: 0 },
    +  
    +        { x: -9, y: 0.10, z: -1, w: 0 },
    +        { x: -10, y: 0.10, z: -2, w: 0 },
    +  
    +        # back of wing
    +        { x: -1, y: 0.10, z: -1, w: 0 },
    +        { x: -9, y: 0.10, z: -1, w: 0 },
    +  
    +        { x: -10, y: 0.10, z: -2, w: 0 },
    +        { x: -8, y: 0.10, z: -1, w: 0 },
    +  
    +        # front of wing
    +        { x: -1, y: -0.10, z:  1, w: 0 },
    +        { x: -9, y: -0.10, z: -1, w: 0 },
    +  
    +        { x: -9, y: -0.10, z: -1, w: 0 },
    +        { x: -10, y: -0.10, z: -2, w: 0 },
    +  
    +        # back of wing
    +        { x: -1, y: -0.10, z: -1, w: 0 },
    +        { x: -9, y: -0.10, z: -1, w: 0 },
    +  
    +        { x: -10, y: -0.10, z: -2, w: 0 },
    +        { x: -8, y: -0.10, z: -1, w: 0 },
    +  
    +        # left fin
    +        # top
    +        { x: -1, y: 0.10, z: 1, w: 0 },
    +        { x: -1, y: 3, z: -3, w: 0 },
    +  
    +        { x: -1, y: 0.10, z: -1, w: 0 },
    +        { x: -1, y: 3, z: -3, w: 0 },
    +  
    +        { x: -1.1, y: 0.10, z: 1, w: 0 },
    +        { x: -1.1, y: 3, z: -3, w: 0 },
    +  
    +        { x: -1.1, y: 0.10, z: -1, w: 0 },
    +        { x: -1.1, y: 3, z: -3, w: 0 },
    +  
    +        # bottom
    +        { x: -1, y: -0.10, z: 1, w: 0 },
    +        { x: -1, y: -2, z: -2, w: 0 },
    +  
    +        { x: -1, y: -0.10, z: -1, w: 0 },
    +        { x: -1, y: -2, z: -2, w: 0 },
    +  
    +        { x: -1.1, y: -0.10, z: 1, w: 0 },
    +        { x: -1.1, y: -2, z: -2, w: 0 },
    +  
    +        { x: -1.1, y: -0.10, z: -1, w: 0 },
    +        { x: -1.1, y: -2, z: -2, w: 0 },
    +  
    +        # right fin
    +        { x:  1, y: 0.10, z: 1, w: 0 },
    +        { x:  1, y: 3, z: -3, w: 0 },
    +  
    +        { x:  1, y: 0.10, z: -1, w: 0 },
    +        { x:  1, y: 3, z: -3, w: 0 },
    +  
    +        { x:  1.1, y: 0.10, z: 1, w: 0 },
    +        { x:  1.1, y: 3, z: -3, w: 0 },
    +  
    +        { x:  1.1, y: 0.10, z: -1, w: 0 },
    +        { x:  1.1, y: 3, z: -3, w: 0 },
    +  
    +        # bottom
    +        { x:  1, y: -0.10, z: 1, w: 0 },
    +        { x:  1, y: -2, z: -2, w: 0 },
    +  
    +        { x:  1, y: -0.10, z: -1, w: 0 },
    +        { x:  1, y: -2, z: -2, w: 0 },
    +  
    +        { x:  1.1, y: -0.10, z: 1, w: 0 },
    +        { x:  1.1, y: -2, z: -2, w: 0 },
    +  
    +        { x:  1.1, y: -0.10, z: -1, w: 0 },
    +        { x:  1.1, y: -2, z: -2, w: 0 },
    +      ]
    +    end
    +  
    +    def defaults
    +      state.points ||= player_ship
    +      state.shifted_points ||= state.points.map { |point| point }
    +  
    +      state.scale   ||= 1
    +      state.angle_x ||= 0
    +      state.angle_y ||= 0
    +      state.angle_z ||= 0
    +    end
    +  
    +    def matrix_new x0, y0, z0, w0, x1, y1, z1, w1, x2, y2, z2, w2, x3, y3, z3, w3
    +      (hmap x: (hmap x: x0, y: y0, z: z0, w: w0),
    +            y: (hmap x: x1, y: y1, z: z1, w: w1),
    +            z: (hmap x: x2, y: y2, z: z2, w: w2),
    +            w: (hmap x: x3, y: y3, z: z3, w: w3))
    +    end
    +  
    +    def angle_z_matrix degrees
    +      cos_t = Math.cos degrees.to_radians
    +      sin_t = Math.sin degrees.to_radians
    +      (matrix_new cos_t, -sin_t, 0, 0,
    +                  sin_t,  cos_t, 0, 0,
    +                  0,      0,     1, 0,
    +                  0,      0,     0, 1)
    +    end
    +  
    +    def angle_y_matrix degrees
    +      cos_t = Math.cos degrees.to_radians
    +      sin_t = Math.sin degrees.to_radians
    +      (matrix_new  cos_t,  0, sin_t, 0,
    +                   0,      1, 0,     0,
    +                   -sin_t, 0, cos_t, 0,
    +                   0,      0, 0,     1)
    +    end
    +  
    +    def angle_x_matrix degrees
    +      cos_t = Math.cos degrees.to_radians
    +      sin_t = Math.sin degrees.to_radians
    +      (matrix_new  1,     0,      0, 0,
    +                   0, cos_t, -sin_t, 0,
    +                   0, sin_t,  cos_t, 0,
    +                   0,     0,      0, 1)
    +    end
    +  
    +    def scale_matrix factor
    +      (matrix_new factor,      0,      0, 0,
    +                  0,      factor,      0, 0,
    +                  0,           0, factor, 0,
    +                  0,           0,      0, 1)
    +    end
    +  
    +    def input
    +      if (inputs.keyboard.shift && inputs.keyboard.p)
    +        state.scale -= 0.1
    +      elsif  inputs.keyboard.p
    +        state.scale += 0.1
    +      end
    +  
    +      if inputs.mouse.wheel
    +        state.scale += inputs.mouse.wheel.y
    +      end
    +  
    +      state.scale = state.scale.clamp(0.1, 1000)
    +  
    +      if (inputs.keyboard.shift && inputs.keyboard.y) || inputs.keyboard.right
    +        state.angle_y += 1
    +      elsif (inputs.keyboard.y) || inputs.keyboard.left
    +        state.angle_y -= 1
    +      end
    +  
    +      if (inputs.keyboard.shift && inputs.keyboard.x) || inputs.keyboard.down
    +        state.angle_x -= 1
    +      elsif (inputs.keyboard.x || inputs.keyboard.up)
    +        state.angle_x += 1
    +      end
    +  
    +      if inputs.keyboard.shift && inputs.keyboard.z
    +        state.angle_z += 1
    +      elsif inputs.keyboard.z
    +        state.angle_z -= 1
    +      end
    +  
    +      if inputs.keyboard.zero
    +        state.angle_x = 0
    +        state.angle_y = 0
    +        state.angle_z = 0
    +      end
    +  
    +      angle_x = state.angle_x
    +      angle_y = state.angle_y
    +      angle_z = state.angle_z
    +      scale   = state.scale
    +  
    +      s_matrix = scale_matrix state.scale
    +      x_matrix = angle_z_matrix angle_z
    +      y_matrix = angle_y_matrix angle_y
    +      z_matrix = angle_x_matrix angle_x
    +  
    +      state.shifted_points = state.points.map do |point|
    +        (matrix_mul s_matrix,
    +                    (matrix_mul z_matrix,
    +                                (matrix_mul x_matrix,
    +                                            (matrix_mul y_matrix, point)))).merge(original: point)
    +      end
    +    end
    +  
    +    def thick_line line
    +      [
    +        line.merge(y: line.y - 1, y2: line.y2 - 1, r: 0, g: 0, b: 0),
    +        line.merge(x: line.x - 1, x2: line.x2 - 1, r: 0, g: 0, b: 0),
    +        line.merge(x: line.x - 0, x2: line.x2 - 0, r: 0, g: 0, b: 0),
    +        line.merge(y: line.y + 1, y2: line.y2 + 1, r: 0, g: 0, b: 0),
    +        line.merge(x: line.x + 1, x2: line.x2 + 1, r: 0, g: 0, b: 0)
    +      ]
    +    end
    +  
    +    def render
    +      outputs.lines << state.shifted_points.each_slice(2).map do |(p1, p2)|
    +        perc = 0
    +        thick_line({ x:  p1.x.*(10) + 640, y:  p1.y.*(10) + 320,
    +                     x2: p2.x.*(10) + 640, y2: p2.y.*(10) + 320,
    +                     r: 255 * perc,
    +                     g: 255 * perc,
    +                     b: 255 * perc })
    +      end
    +  
    +      outputs.labels << [ 10, 700, "angle_x: #{state.angle_x.to_sf}", 0]
    +      outputs.labels << [ 10, 670, "x, shift+x", 0]
    +  
    +      outputs.labels << [210, 700, "angle_y: #{state.angle_y.to_sf}", 0]
    +      outputs.labels << [210, 670, "y, shift+y", 0]
    +  
    +      outputs.labels << [410, 700, "angle_z: #{state.angle_z.to_sf}", 0]
    +      outputs.labels << [410, 670, "z, shift+z", 0]
    +  
    +      outputs.labels << [610, 700, "scale: #{state.scale.to_sf}", 0]
    +      outputs.labels << [610, 670, "p, shift+p", 0]
    +    end
    +  end
    +  
    +  $game = Game.new
    +  
    +  def tick args
    +    $game.args = args
    +    $game.tick
    +  end
    +  
    +  def set_angles x, y, z
    +    $game.state.angle_x = x
    +    $game.state.angle_y = y
    +    $game.state.angle_z = z
    +  end
    +  
    +  $gtk.reset
    +
    +#+end_src
    +
     *** Arcade - Bullet Hell - main.rb
     #+begin_src ruby
       # ./samples/99_genre_arcade/bullet_hell/app/main.rb
    @@ -23604,31 +24332,36 @@ Follows is a source code listing for all files that have been open sourced. This
         end
       
         def render_score
    -      outputs.primitives << [10, 710, "HI SCORE: #{state.hi_score}", large_white_typeset].label
    -      outputs.primitives << [10, 680, "SCORE: #{state.score}", large_white_typeset].label
    -      outputs.primitives << [10, 650, "DIFFICULTY: #{state.difficulty.upcase}", large_white_typeset].label
    +      outputs.primitives << { x: 10, y: 710, text: "HI SCORE: #{state.hi_score}", **large_white_typeset }
    +      outputs.primitives << { x: 10, y: 680, text: "SCORE: #{state.score}", **large_white_typeset }
    +      outputs.primitives << { x: 10, y: 650, text: "DIFFICULTY: #{state.difficulty.upcase}", **large_white_typeset }
         end
       
         def render_menu
           return unless state.scene == :menu
           render_overlay
       
    -      outputs.labels << [640, 700, "Flappy Dragon", 50, 1, 255, 255, 255]
    -      outputs.labels << [640, 500, "Instructions: Press Spacebar to flap. Don't die.", 4, 1, 255, 255, 255]
    -      outputs.labels << [430, 430, "[Tab]    Change difficulty", 4, 0, 255, 255, 255]
    -      outputs.labels << [430, 400, "[Enter]  Start at New Difficulty ", 4, 0, 255, 255, 255]
    -      outputs.labels << [430, 370, "[Escape] Cancel/Resume ", 4, 0, 255, 255, 255]
    -      outputs.labels << [640, 300, "(mouse, touch, and game controllers work, too!) ", 4, 1, 255, 255, 255]
    -      outputs.labels << [640, 200, "Difficulty: #{state.new_difficulty.capitalize}", 4, 1, 255, 255, 255]
    +      outputs.labels << { x: 640, y: 700, text: "Flappy Dragon", size_enum: 50, alignment_enum: 1, **white }
    +      outputs.labels << { x: 640, y: 500, text: "Instructions: Press Spacebar to flap. Don't die.", size_enum: 4, alignment_enum: 1, **white }
    +      outputs.labels << { x: 430, y: 430, text: "[Tab]    Change difficulty", size_enum: 4, alignment_enum: 0, **white }
    +      outputs.labels << { x: 430, y: 400, text: "[Enter]  Start at New Difficulty ", size_enum: 4, alignment_enum: 0, **white }
    +      outputs.labels << { x: 430, y: 370, text: "[Escape] Cancel/Resume ", size_enum: 4, alignment_enum: 0, **white }
    +      outputs.labels << { x: 640, y: 300, text: "(mouse, touch, and game controllers work, too!) ", size_enum: 4, alignment_enum: 1, **white }
    +      outputs.labels << { x: 640, y: 200, text: "Difficulty: #{state.new_difficulty.capitalize}", size_enum: 4, alignment_enum: 1, **white }
       
    -      outputs.labels << [10, 100, "Code:   @amirrajan",     255, 255, 255]
    -      outputs.labels << [10,  80, "Art:    @mobypixel",     255, 255, 255]
    -      outputs.labels << [10,  60, "Music:  @mobypixel",     255, 255, 255]
    -      outputs.labels << [10,  40, "Engine: DragonRuby GTK", 255, 255, 255]
    +      outputs.labels << { x: 10, y: 100, text: "Code:   @amirrajan",     **white }
    +      outputs.labels << { x: 10, y:  80, text: "Art:    @mobypixel",     **white }
    +      outputs.labels << { x: 10, y:  60, text: "Music:  @mobypixel",     **white }
    +      outputs.labels << { x: 10, y:  40, text: "Engine: DragonRuby GTK", **white }
         end
       
         def render_overlay
    -      outputs.primitives << [grid.rect.scale_rect(1.1, 0, 0), 0, 0, 0, 230].solid
    +      overlay_rect = grid.rect.scale_rect(1.1, 0, 0)
    +      outputs.primitives << { x: overlay_rect.x,
    +                              y: overlay_rect.y,
    +                              w: overlay_rect.w,
    +                              h: overlay_rect.h,
    +                              r: 0, g: 0, b: 0, a: 230 }.solid!
         end
       
         def render_game
    @@ -23641,14 +24374,14 @@ Follows is a source code listing for all files that have been open sourced. This
       
         def render_game_over
           return unless state.scene == :game
    -      outputs.labels << [638, 358, score_text, 20, 1]
    -      outputs.labels << [635, 360, score_text, 20, 1, 255, 255, 255]
    -      outputs.labels << [638, 428, countdown_text, 20, 1]
    -      outputs.labels << [635, 430, countdown_text, 20, 1, 255, 255, 255]
    +      outputs.labels << { x: 638, y: 358, text: score_text,     size_enum: 20, alignment_enum: 1 }
    +      outputs.labels << { x: 635, y: 360, text: score_text,     size_enum: 20, alignment_enum: 1, r: 255, g: 255, b: 255 }
    +      outputs.labels << { x: 638, y: 428, text: countdown_text, size_enum: 20, alignment_enum: 1 }
    +      outputs.labels << { x: 635, y: 430, text: countdown_text, size_enum: 20, alignment_enum: 1, r: 255, g: 255, b: 255 }
         end
       
         def render_background
    -      outputs.sprites << [0, 0, 1280, 720, 'sprites/background.png']
    +      outputs.sprites << { x: 0, y: 0, w: 1280, h: 720, path: 'sprites/background.png' }
       
           scroll_point_at   = state.tick_count
           scroll_point_at   = state.scene_at if state.scene == :menu
    @@ -23660,11 +24393,18 @@ Follows is a source code listing for all files that have been open sourced. This
           outputs.sprites << scrolling_background(scroll_point_at, 'sprites/parallax_front.png',  1.00, -80)
         end
       
    +    def scrolling_background at, path, rate, y = 0
    +      [
    +        { x:    0 - at.*(rate) % 1440, y: y, w: 1440, h: 720, path: path },
    +        { x: 1440 - at.*(rate) % 1440, y: y, w: 1440, h: 720, path: path }
    +      ]
    +    end
    +  
         def render_walls
           state.walls.each do |w|
             w.sprites = [
    -          [w.x, w.bottom_height - 720, 100, 720, 'sprites/wall.png', 180],
    -          [w.x, w.top_y,               100, 720, 'sprites/wallbottom.png', 0]
    +          { x: w.x, y: w.bottom_height - 720, w: 100, h: 720, path: 'sprites/wall.png',       angle: 180 },
    +          { x: w.x, y: w.top_y,               w: 100, h: 720, path: 'sprites/wallbottom.png', angle: 0 }
             ]
           end
           outputs.sprites << state.walls.map(&:sprites)
    @@ -23673,15 +24413,13 @@ Follows is a source code listing for all files that have been open sourced. This
         def render_dragon
           state.show_death = true if state.countdown == 3.seconds
       
    -      render_debug_hitbox false
    -  
           if state.show_death == false || !state.death_at
             animation_index = state.flapped_at.frame_index 6, 2, false if state.flapped_at
             sprite_name = "sprites/dragon_fly#{animation_index.or(0) + 1}.png"
    -        state.dragon_sprite = [state.x, state.y, 100, 80, sprite_name, state.dy * 1.2]
    +        state.dragon_sprite = { x: state.x, y: state.y, w: 100, h: 80, path: sprite_name, angle: state.dy * 1.2 }
           else
             sprite_name = "sprites/dragon_die.png"
    -        state.dragon_sprite = [state.x, state.y, 100, 80, sprite_name, state.dy * 1.2]
    +        state.dragon_sprite = { x: state.x, y: state.y, w: 100, h: 80, path: sprite_name, angle: state.dy * 1.2 }
             sprite_changed_elapsed    = state.death_at.elapsed_time - 1.seconds
             state.dragon_sprite.angle += (sprite_changed_elapsed ** 1.3) * state.death_fall_direction * -1
             state.dragon_sprite.x     += (sprite_changed_elapsed ** 1.2) * state.death_fall_direction
    @@ -23691,20 +24429,12 @@ Follows is a source code listing for all files that have been open sourced. This
           outputs.sprites << state.dragon_sprite
         end
       
    -    def render_debug_hitbox show
    -      return unless show
    -      outputs.borders << [dragon_collision_box.rect, 255, 0, 0] if state.dragon_sprite
    -      outputs.borders << state.walls.flat_map do |w|
    -         w.sprites.map { |s| [s.rect, 255, 0, 0] }
    -      end
    -    end
    -  
         def render_flash
           return unless state.flash_at
       
    -      outputs.primitives << [grid.rect,
    -                             white,
    -                             255 * state.flash_at.ease(20, :flip)].solid
    +      outputs.primitives << { **grid.rect.to_hash,
    +                              **white,
    +                              a: 255 * state.flash_at.ease(20, :flip) }.solid!
       
           state.flash_at = 0 if state.flash_at.elapsed_time > 20
         end
    @@ -23824,19 +24554,12 @@ Follows is a source code listing for all files that have been open sourced. This
           end
         end
       
    -    def scrolling_background at, path, rate, y = 0
    -      [
    -        [   0 - at.*(rate) % 1440, y, 1440, 720, path],
    -        [1440 - at.*(rate) % 1440, y, 1440, 720, path]
    -      ]
    -    end
    -  
         def white
    -      [255, 255, 255]
    +      { r: 255, g: 255, b: 255 }
         end
       
         def large_white_typeset
    -      [5, 0, 255, 255, 255]
    +      { size_enum: 5, alignment_enum: 0, r: 255, g: 255, b: 255 }
         end
       
         def at_beginning?
    @@ -23845,9 +24568,9 @@ Follows is a source code listing for all files that have been open sourced. This
       
         def dragon_collision_box
           state.dragon_sprite
    -          .scale_rect(1.0 - collision_forgiveness, 0.5, 0.5)
    -          .rect_shift_right(10)
    -          .rect_shift_up(state.dy * 2)
    +           .scale_rect(1.0 - collision_forgiveness, 0.5, 0.5)
    +           .rect_shift_right(10)
    +           .rect_shift_up(state.dy * 2)
         end
       
         def game_over?
    @@ -23856,7 +24579,7 @@ Follows is a source code listing for all files that have been open sourced. This
           state.walls
               .flat_map { |w| w.sprites }
               .any? do |s|
    -            s.intersect_rect?(dragon_collision_box)
    +            s && s.intersect_rect?(dragon_collision_box)
               end
         end
       
    @@ -25248,319 +25971,6 @@ Follows is a source code listing for all files that have been open sourced. This
     
     #+end_src
     
    -*** Crafting - Farming Game Starting Point - repl.rb
    -#+begin_src ruby
    -  # ./samples/99_genre_crafting/farming_game_starting_point/app/repl.rb
    -  # ===============================================================
    -  # Welcome to repl.rb
    -  # ===============================================================
    -  # You can experiement with code within this file. Code in this
    -  # file is only executed when you save (and only excecuted ONCE).
    -  # ===============================================================
    -  
    -  # ===============================================================
    -  # REMOVE the "x" from the word "xrepl" and save the file to RUN
    -  # the code in between the do/end block delimiters.
    -  # ===============================================================
    -  
    -  # ===============================================================
    -  # ADD the "x" to the word "repl" (make it xrepl) and save the
    -  # file to IGNORE the code in between the do/end block delimiters.
    -  # ===============================================================
    -  
    -  # Remove the x from xrepl to run the code. Add the x back to ignore to code.
    -  xrepl do
    -    puts "The result of 1 + 2 is: #{1 + 2}"
    -  end
    -  
    -  # ====================================================================================
    -  # Ruby Crash Course:
    -  # Strings, Numeric, Booleans, Conditionals, Looping, Enumerables, Arrays
    -  # ====================================================================================
    -  
    -  # ====================================================================================
    -  #  Strings
    -  # ====================================================================================
    -  # Remove the x from xrepl to run the code. Add the x back to ignore to code.
    -  xrepl do
    -    message = "Hello World"
    -    puts "The value of message is: " + message
    -    puts "Any value can be interpolated within a string using \#{}."
    -    puts "Interpolated message: #{message}."
    -    puts 'This #{message} is not interpolated because the string uses single quotes.'
    -  end
    -  
    -  # ====================================================================================
    -  #  Numerics
    -  # ====================================================================================
    -  # Remove the x from xrepl to run the code. Add the x back to ignore to code.
    -  xrepl do
    -    a = 10
    -    puts "The value of a is: #{a}"
    -    puts "a + 1 is: #{a + 1}"
    -    puts "a / 3 is: #{a / 3}"
    -  end
    -  
    -  # Remove the x from xrepl to run the code. Add the x back to ignore to code.
    -  xrepl do
    -    b = 10.12
    -    puts "The value of b is: #{b}"
    -    puts "b + 1 is: #{b + 1}"
    -    puts "b as an integer is: #{b.to_i}"
    -    puts ''
    -  end
    -  
    -  # ====================================================================================
    -  #  Booleans
    -  # ====================================================================================
    -  # Remove the x from xrepl to run the code. Add the x back to ignore to code.
    -  xrepl do
    -    c = 30
    -    puts "The value of c is #{c}."
    -  
    -    if c
    -      puts "This if statement ran because c is truthy."
    -    end
    -  end
    -  
    -  # Remove the x from xrepl to run the code. Add the x back to ignore to code.
    -  xrepl do
    -    d = false
    -    puts "The value of d is #{d}."
    -  
    -    if !d
    -      puts "This if statement ran because d is falsey, using the not operator (!) makes d evaluate to true."
    -    end
    -  
    -    e = nil
    -    puts "Nil is also considered falsey. The value of e is: #{e}."
    -  
    -    if !e
    -      puts "This if statement ran because e is nil (a falsey value)."
    -    end
    -  end
    -  
    -  # ====================================================================================
    -  #  Conditionals
    -  # ====================================================================================
    -  # Remove the x from xrepl to run the code. Add the x back to ignore to code.
    -  xrepl do
    -    i_am_true  = true
    -    i_am_nil   = nil
    -    i_am_false = false
    -    i_am_hi    = "hi"
    -  
    -    puts "======== if statement"
    -    i_am_one = 1
    -    if i_am_one
    -      puts "This was printed because i_am_one is truthy."
    -    end
    -  
    -    puts "======== if/else statement"
    -    if i_am_false
    -      puts "This will NOT get printed because i_am_false is false."
    -    else
    -      puts "This was printed because i_am_false is false."
    -    end
    -  
    -    puts "======== if/elsif/else statement"
    -    if i_am_false
    -      puts "This will NOT get printed because i_am_false is false."
    -    elsif i_am_true
    -      puts "This was printed because i_am_true is true."
    -    else
    -      puts "This will NOT get printed i_am_true was true."
    -    end
    -  
    -    puts "======== case statement "
    -    i_am_one = 1
    -    case i_am_one
    -    when 10
    -      puts "case equaled: 10"
    -    when 9
    -      puts "case equaled: 9"
    -    when 5
    -      puts "case equaled: 5"
    -    when 1
    -      puts "case equaled: 1"
    -    else
    -      puts "Value wasn't cased."
    -    end
    -  
    -    puts "======== different types of comparisons"
    -    if 4 == 4
    -      puts "equal (4 == 4)"
    -    end
    -  
    -    if 4 != 3
    -      puts "not equal (4 != 3)"
    -    end
    -  
    -    if 3 < 4
    -      puts "less than (3 < 4)"
    -    end
    -  
    -    if 4 > 3
    -      puts "greater than (4 > 3)"
    -    end
    -  
    -    if ((4 > 3) || (3 < 4) || false)
    -      puts "or statement ((4 > 3) || (3 < 4) || false)"
    -    end
    -  
    -    if ((4 > 3) && (3 < 4))
    -      puts "and statement ((4 > 3) && (3 < 4))"
    -    end
    -  end
    -  
    -  # ====================================================================================
    -  # Looping
    -  # ====================================================================================
    -  # Remove the x from xrepl to run the code. Add the x back to ignore to code.
    -  xrepl do
    -    puts "======== times block"
    -    3.times do |i|
    -      puts i
    -    end
    -    puts "======== range block exclusive"
    -    (0...3).each do |i|
    -      puts i
    -    end
    -    puts "======== range block inclusive"
    -    (0..3).each do |i|
    -      puts i
    -    end
    -  end
    -  
    -  # ====================================================================================
    -  #  Enumerables
    -  # ====================================================================================
    -  # Remove the x from xrepl to run the code. Add the x back to ignore to code.
    -  xrepl do
    -    puts "======== array each"
    -    colors = ["red", "blue", "yellow"]
    -    colors.each do |color|
    -      puts color
    -    end
    -  
    -    puts '======== array each_with_index'
    -    colors = ["red", "blue", "yellow"]
    -    colors.each_with_index do |color, i|
    -      puts "#{color} at index #{i}"
    -    end
    -  end
    -  
    -  # Remove the x from xrepl to run the code. Add the x back to ignore to code.
    -  xrepl do
    -    puts "======== single parameter function"
    -    def add_one_to n
    -      n + 5
    -    end
    -  
    -    puts add_one_to(3)
    -  
    -    puts "======== function with default value"
    -    def function_with_default_value v = 10
    -      v * 10
    -    end
    -  
    -    puts "passing three: #{function_with_default_value(3)}"
    -    puts "passing nil: #{function_with_default_value}"
    -  
    -    puts "======== Or Equal (||=) operator for nil values"
    -    def function_with_nil_default_with_local a = nil
    -      result   = a
    -      result ||= "or equal operator was exected and set a default value"
    -    end
    -  
    -    puts "passing 'hi': #{function_with_nil_default_with_local 'hi'}"
    -    puts "passing nil: #{function_with_nil_default_with_local}"
    -  end
    -  
    -  # ====================================================================================
    -  #  Arrays
    -  # ====================================================================================
    -  # Remove the x from xrepl to run the code. Add the x back to ignore to code.
    -  xrepl do
    -    puts "======== Create an array with the numbers 1 to 10."
    -    one_to_ten = (1..10).to_a
    -    puts one_to_ten
    -  
    -    puts "======== Create a new array that only contains even numbers from the previous array."
    -    one_to_ten = (1..10).to_a
    -    evens = one_to_ten.find_all do |number|
    -      number % 2 == 0
    -    end
    -    puts evens
    -  
    -    puts "======== Create a new array that rejects odd numbers."
    -    one_to_ten = (1..10).to_a
    -    also_even = one_to_ten.reject do |number|
    -      number % 2 != 0
    -    end
    -    puts also_even
    -  
    -    puts "======== Create an array that doubles every number."
    -    one_to_ten = (1..10).to_a
    -    doubled = one_to_ten.map do |number|
    -      number * 2
    -    end
    -    puts doubled
    -  
    -    puts "======== Create an array that selects only odd numbers and then multiply those by 10."
    -    one_to_ten = (1..10).to_a
    -    odd_doubled = one_to_ten.find_all do |number|
    -      number % 2 != 0
    -    end.map do |odd_number|
    -      odd_number * 10
    -    end
    -    puts odd_doubled
    -  
    -    puts "======== All combination of numbers 1 to 10."
    -    one_to_ten = (1..10).to_a
    -    all_combinations = one_to_ten.product(one_to_ten)
    -    puts all_combinations
    -  
    -    puts "======== All uniq combinations of numbers. For example: [1, 2] is the same as [2, 1]."
    -    one_to_ten = (1..10).to_a
    -    uniq_combinations =
    -      one_to_ten.product(one_to_ten)
    -        .map do |unsorted_number|
    -      unsorted_number.sort
    -    end.uniq
    -    puts uniq_combinations
    -  end
    -  
    -  # ====================================================================================
    -  #  Advanced Arrays
    -  # ====================================================================================
    -  # Remove the x from xrepl to run the code. Add the x back to ignore to code.
    -  xrepl do
    -    puts "======== All unique Pythagorean Triples between 1 and 40 sorted by area of the triangle."
    -  
    -    one_to_hundred = (1..40).to_a
    -    triples =
    -      one_to_hundred.product(one_to_hundred).map do |width, height|
    -      [width, height, Math.sqrt(width ** 2 + height ** 2)]
    -    end.find_all do |_, _, hypotenuse|
    -      hypotenuse.to_i == hypotenuse
    -    end.map do |triangle|
    -      triangle.map(&:to_i)
    -    end.uniq do |triangle|
    -      triangle.sort
    -    end.map do |width, height, hypotenuse|
    -      [width, height, hypotenuse, (width * height) / 2]
    -    end.sort_by do |_, _, _, area|
    -      area
    -    end
    -  
    -    triples.each do |width, height, hypotenuse, area|
    -      puts "(#{width}, #{height}, #{hypotenuse}) = #{area}"
    -    end
    -  end
    -
    -#+end_src
    -
     *** Crafting - Farming Game Starting Point - tests.rb
     #+begin_src ruby
       # ./samples/99_genre_crafting/farming_game_starting_point/app/tests.rb
    @@ -28721,10 +29131,381 @@ Follows is a source code listing for all files that have been open sourced. This
     
     #+end_src
     
    +*** Mario - Jumping - main.rb
    +#+begin_src ruby
    +  # ./samples/99_genre_mario/01_jumping/app/main.rb
    +  def tick args
    +    defaults args
    +    render args
    +    input args
    +    calc args
    +  end
    +  
    +  def defaults args
    +    args.state.player.x      ||= args.grid.w.half
    +    args.state.player.y      ||= 0
    +    args.state.player.size   ||= 100
    +    args.state.player.dy     ||= 0
    +    args.state.player.action ||= :jumping
    +    args.state.jump.power           = 20
    +    args.state.jump.increase_frames = 10
    +    args.state.jump.increase_power  = 1
    +    args.state.gravity              = -1
    +  end
    +  
    +  def render args
    +    args.outputs.sprites << {
    +      x: args.state.player.x -
    +         args.state.player.size.half,
    +      y: args.state.player.y,
    +      w: args.state.player.size,
    +      h: args.state.player.size,
    +      path: 'sprites/square/red.png'
    +    }
    +  end
    +  
    +  def input args
    +    if args.inputs.keyboard.key_down.space
    +      if args.state.player.action == :standing
    +        args.state.player.action = :jumping
    +        args.state.player.dy = args.state.jump.power
    +  
    +        # record when the action took place
    +        current_frame = args.state.tick_count
    +        args.state.player.action_at = current_frame
    +      end
    +    end
    +  
    +    # if the space bar is being held
    +    if args.inputs.keyboard.key_held.space
    +      # is the player jumping
    +      is_jumping = args.state.player.action == :jumping
    +  
    +      # when was the jump performed
    +      time_of_jump = args.state.player.action_at
    +  
    +      # how much time has passed since the jump
    +      jump_elapsed_time = time_of_jump.elapsed_time
    +  
    +      # how much time is allowed for increasing power
    +      time_allowed = args.state.jump.increase_frames
    +  
    +      # if the player is jumping
    +      # and the elapsed time is less than
    +      # the allowed time
    +      if is_jumping && jump_elapsed_time < time_allowed
    +         # increase the dy by the increase power
    +         power_to_add = args.state.jump.increase_power
    +         args.state.player.dy += power_to_add
    +      end
    +    end
    +  end
    +  
    +  def calc args
    +    if args.state.player.action == :jumping
    +      args.state.player.y  += args.state.player.dy
    +      args.state.player.dy += args.state.gravity
    +    end
    +  
    +    if args.state.player.y < 0
    +      args.state.player.y      = 0
    +      args.state.player.action = :standing
    +    end
    +  end
    +
    +#+end_src
    +
    +*** Mario - Jumping And Collisions - main.rb
    +#+begin_src ruby
    +  # ./samples/99_genre_mario/02_jumping_and_collisions/app/main.rb
    +  class Game
    +    attr_gtk
    +  
    +    def tick
    +      defaults
    +      render
    +      input
    +      calc
    +    end
    +  
    +    def defaults
    +      return if state.tick_count != 0
    +  
    +      player.x                     = 64
    +      player.y                     = 800
    +      player.size                  = 50
    +      player.dx                    = 0
    +      player.dy                    = 0
    +      player.action                = :falling
    +  
    +      player.max_speed             = 20
    +      player.jump_power            = 15
    +      player.jump_air_time         = 15
    +      player.jump_increase_power   = 1
    +  
    +      state.gravity                = -1
    +      state.drag                   = 0.001
    +      state.tile_size              = 64
    +      state.tiles                ||= [
    +        { ordinal_x:  0, ordinal_y: 0 },
    +        { ordinal_x:  1, ordinal_y: 0 },
    +        { ordinal_x:  2, ordinal_y: 0 },
    +        { ordinal_x:  3, ordinal_y: 0 },
    +        { ordinal_x:  4, ordinal_y: 0 },
    +        { ordinal_x:  5, ordinal_y: 0 },
    +        { ordinal_x:  6, ordinal_y: 0 },
    +        { ordinal_x:  7, ordinal_y: 0 },
    +        { ordinal_x:  8, ordinal_y: 0 },
    +        { ordinal_x:  9, ordinal_y: 0 },
    +        { ordinal_x: 10, ordinal_y: 0 },
    +        { ordinal_x: 11, ordinal_y: 0 },
    +        { ordinal_x: 12, ordinal_y: 0 },
    +  
    +        { ordinal_x:  9, ordinal_y: 3 },
    +        { ordinal_x: 10, ordinal_y: 3 },
    +        { ordinal_x: 11, ordinal_y: 3 },
    +      ]
    +  
    +      tiles.each do |t|
    +        t.rect = { x: t.ordinal_x * 64,
    +                   y: t.ordinal_y * 64,
    +                   w: 64,
    +                   h: 64 }
    +      end
    +    end
    +  
    +    def render
    +      render_player
    +      render_tiles
    +      # render_grid
    +    end
    +  
    +    def input
    +      input_jump
    +      input_move
    +    end
    +  
    +    def calc
    +      calc_player_rect
    +      calc_left
    +      calc_right
    +      calc_below
    +      calc_above
    +      calc_player_dy
    +      calc_player_dx
    +      calc_game_over
    +    end
    +  
    +    def render_player
    +      outputs.sprites << {
    +        x: player.x,
    +        y: player.y,
    +        w: player.size,
    +        h: player.size,
    +        path: 'sprites/square/red.png'
    +      }
    +    end
    +  
    +    def render_tiles
    +      outputs.sprites << state.tiles.map do |t|
    +        t.merge path: 'sprites/square/white.png',
    +                x: t.ordinal_x * 64,
    +                y: t.ordinal_y * 64,
    +                w: 64,
    +                h: 64
    +      end
    +    end
    +  
    +    def render_grid
    +      if state.tick_count == 0
    +        outputs[:grid].background_color = [0, 0, 0, 0]
    +        outputs[:grid].borders << available_brick_locations
    +        outputs[:grid].labels  << available_brick_locations.map do |b|
    +          [
    +            b.merge(text: "#{b.ordinal_x},#{b.ordinal_y}",
    +                    x: b.x + 2,
    +                    y: b.y + 2,
    +                    size_enum: -3,
    +                    vertical_alignment_enum: 0,
    +                    blendmode_enum: 0),
    +            b.merge(text: "#{b.x},#{b.y}",
    +                    x: b.x + 2,
    +                    y: b.y + 2 + 20,
    +                    size_enum: -3,
    +                    vertical_alignment_enum: 0,
    +                    blendmode_enum: 0)
    +          ]
    +        end
    +      end
    +  
    +      outputs.sprites << { x: 0, y: 0, w: 1280, h: 720, path: :grid }
    +    end
    +  
    +    def input_jump
    +      if inputs.keyboard.key_down.space
    +        player_jump
    +      end
    +  
    +      if inputs.keyboard.key_held.space
    +        player_jump_increase_air_time
    +      end
    +    end
    +  
    +    def input_move
    +      if player.dx.abs < 20
    +        if inputs.keyboard.left
    +          player.dx -= 2
    +        elsif inputs.keyboard.right
    +          player.dx += 2
    +        end
    +      end
    +    end
    +  
    +    def calc_game_over
    +      if player.y < -64
    +        player.x = 64
    +        player.y = 800
    +        player.dx = 0
    +        player.dy = 0
    +      end
    +    end
    +  
    +    def calc_player_rect
    +      player.rect      = player_current_rect
    +      player.next_rect = player_next_rect
    +      player.prev_rect = player_prev_rect
    +    end
    +  
    +    def calc_player_dx
    +      player.dx  = player_next_dx
    +      player.x  += player.dx
    +    end
    +  
    +    def calc_player_dy
    +      player.y  += player.dy
    +      player.dy  = player_next_dy
    +    end
    +  
    +    def calc_below
    +      return unless player.dy < 0
    +      tiles_below = tiles_find { |t| t.rect.top <= player.prev_rect.y }
    +      collision = tiles_find_colliding tiles_below, (player.rect.merge y: player.next_rect.y)
    +      if collision
    +        player.y  = collision.rect.y + state.tile_size
    +        player.dy = 0
    +        player.action = :standing
    +      else
    +        player.action = :falling
    +      end
    +    end
    +  
    +    def calc_left
    +      return unless player.dx < 0 && player_next_dx < 0
    +      tiles_left = tiles_find { |t| t.rect.right <= player.prev_rect.left }
    +      collision = tiles_find_colliding tiles_left, (player.rect.merge x: player.next_rect.x)
    +      return unless collision
    +      player.x  = collision.rect.right
    +      player.dx = 0
    +    end
    +  
    +    def calc_right
    +      return unless player.dx > 0 && player_next_dx > 0
    +      tiles_right = tiles_find { |t| t.rect.left >= player.prev_rect.right }
    +      collision = tiles_find_colliding tiles_right, (player.rect.merge x: player.next_rect.x)
    +      return unless collision
    +      player.x  = collision.rect.left - player.rect.w
    +      player.dx = 0
    +    end
    +  
    +    def calc_above
    +      return unless player.dy > 0
    +      tiles_above = tiles_find { |t| t.rect.y >= player.prev_rect.y }
    +      collision = tiles_find_colliding tiles_above, (player.rect.merge y: player.next_rect.y)
    +      return unless collision
    +      player.dy = 0
    +      player.y  = collision.rect.bottom - player.rect.h
    +    end
    +  
    +    def player_current_rect
    +      { x: player.x, y: player.y, w: player.size, h: player.size }
    +    end
    +  
    +    def available_brick_locations
    +      (0..19).to_a
    +        .product(0..11)
    +        .map do |(ordinal_x, ordinal_y)|
    +        { ordinal_x: ordinal_x,
    +          ordinal_y: ordinal_y,
    +          x: ordinal_x * 64,
    +          y: ordinal_y * 64,
    +          w: 64,
    +          h: 64 }
    +      end
    +    end
    +  
    +    def player
    +      state.player ||= args.state.new_entity :player
    +    end
    +  
    +    def player_next_dy
    +      player.dy + state.gravity + state.drag ** 2 * -1
    +    end
    +  
    +    def player_next_dx
    +      player.dx * 0.8
    +    end
    +  
    +    def player_next_rect
    +      player.rect.merge x: player.x + player_next_dx,
    +                        y: player.y + player_next_dy
    +    end
    +  
    +    def player_prev_rect
    +      player.rect.merge x: player.x - player.dx,
    +                        y: player.y - player.dy
    +    end
    +  
    +    def player_jump
    +      return if player.action != :standing
    +      player.action = :jumping
    +      player.dy = state.player.jump_power
    +      current_frame = state.tick_count
    +      player.action_at = current_frame
    +    end
    +  
    +    def player_jump_increase_air_time
    +      return if player.action != :jumping
    +      return if player.action_at.elapsed_time >= player.jump_air_time
    +      player.dy += player.jump_increase_power
    +    end
    +  
    +    def tiles
    +      state.tiles
    +    end
    +  
    +    def tiles_find_colliding tiles, target
    +      tiles.find { |t| t.rect.intersect_rect? target }
    +    end
    +  
    +    def tiles_find &block
    +      tiles.find_all(&block)
    +    end
    +  end
    +  
    +  def tick args
    +    $game ||= Game.new
    +    $game.args = args
    +    $game.tick
    +  end
    +  
    +  $gtk.reset
    +
    +#+end_src
    +
     *** Platformer - Clepto Frog - main.rb
     #+begin_src ruby
       # ./samples/99_genre_platformer/clepto_frog/app/main.rb
    -  MAP_FILE_PATH = 'app/map.txt'
    +  MAP_FILE_PATH = 'map.txt'
       
       require 'app/map.rb'
       
    @@ -28779,35 +29560,7 @@ Follows is a source code listing for all files that have been open sourced. This
       
         def render_intro
           outputs.labels << [640, 700, "Clepto Frog", 4, 1]
    -      if state.tick_count >= 120
    -        outputs.labels << [640, 620, "\"Uh... your office has a pet frog?\" - New Guy",
    -                           4, 1, 0, 0, 0, 255 * 120.ease(60)]
    -      end
    -  
    -      if state.tick_count >= 240
    -        outputs.labels << [640, 580, "\"Yep! His name is Clepto.\" - Jim",
    -                           4, 1, 0, 0, 0, 255 * 240.ease(60)]
    -      end
    -  
    -      if state.tick_count >= 360
    -        outputs.labels << [640, 540, "\"Uh...\" - New Guy",
    -                           4, 1, 0, 0, 0, 255 * 360.ease(60)]
    -      end
    -  
    -      if state.tick_count >= 480
    -        outputs.labels << [640, 500, "\"He steals mugs while we're away...\" - Jim",
    -                           4, 1, 0, 0, 0, 255 * 480.ease(60)]
    -      end
    -  
    -      if state.tick_count >= 600
    -        outputs.labels << [640, 460, "\"It's not a big deal, we take them back in the morning.\" - Jim",
    -                           4, 1, 0, 0, 0, 255 * 600.ease(60)]
    -      end
    -  
    -      outputs.sprites << [640 - 50, 360 - 50, 100, 100,
    -                          "sprites/square-green.png"]
    -  
    -      if state.tick_count == 800
    +      if state.tick_count == 120
             state.scene = :game
             state.game_start_at = state.tick_count
           end
    @@ -28815,7 +29568,7 @@ Follows is a source code listing for all files that have been open sourced. This
       
         def tick
           defaults
    -      if state.scene == :intro && state.tick_count <= 800
    +      if state.scene == :intro && state.tick_count <= 120
             render_intro
           elsif state.scene == :ending
             render_ending
    @@ -28918,15 +29671,15 @@ Follows is a source code listing for all files that have been open sourced. This
       
           if state.god_mode
             # SHOW HIDE COLLISIONS
    -        outputs.sprites << state.world.map do |x, y, w, h|
    -          x = vx(x)
    -          y = vy(y)
    +        outputs.sprites << state.world.map do |rect|
    +          x = vx(rect.x)
    +          y = vy(rect.y)
               if x > -80 && x < 1280 && y > -80 && y < 720
                 {
                   x: x,
                   y: y,
    -              w: vw(w || state.tile_size),
    -              h: vh(h || state.tile_size),
    +              w: vw(rect.w || state.tile_size),
    +              h: vh(rect.h || state.tile_size),
                   path: 'sprites/square-gray.png',
                   a: 128
                 }
    @@ -28949,8 +29702,10 @@ Follows is a source code listing for all files that have been open sourced. This
       
       
             # Creates sprite following mouse to help indicate which sprite you have selected
    -        outputs.primitives << [inputs.mouse.position.x, inputs.mouse.position.y,
    -                               state.tile_size, state.tile_size, 'sprites/square-indigo.png', 0, 100].sprite
    +        outputs.primitives << [inputs.mouse.position.x - 32 * state.camera_scale,
    +                               inputs.mouse.position.y - 32 * state.camera_scale,
    +                               state.tile_size * state.camera_scale,
    +                               state.tile_size * state.camera_scale, 'sprites/square-indigo.png', 0, 100].sprite
           end
       
           render_mini_map
    @@ -29031,6 +29786,29 @@ Follows is a source code listing for all files that have been open sourced. This
             set_camera_scale 1
           end
       
    +      if inputs.mouse.click
    +        state.id_seed += 1
    +        id = state.id_seed
    +        x = state.camera_x + (inputs.mouse.click.x.fdiv(state.camera_scale) - 32)
    +        y = state.camera_y + (inputs.mouse.click.y.fdiv(state.camera_scale) - 32)
    +        x = ((x + 2).idiv 4) * 4
    +        y = ((y + 2).idiv 4) * 4
    +        w = 64
    +        h = 64
    +        candidate_rect = { id: id, x: x, y: y, w: w, h: h }
    +        scaled_candidate_rect = { x: x + 30, y: y + 30, w: w - 60, h: h - 60 }
    +        to_remove = state.world.find { |r| r.intersect_rect? scaled_candidate_rect }
    +        if to_remove && args.inputs.keyboard.x
    +          state.world.reject! { |r| r.id == to_remove.id }
    +        else
    +          state.world << candidate_rect
    +        end
    +        export_map
    +        state.world_lookup = {}
    +        state.world_collision_rects = nil
    +        calc_world_lookup
    +      end
    +  
           if input_up?
             state.y += 10
             state.dy = 0
    @@ -29052,12 +29830,6 @@ Follows is a source code listing for all files that have been open sourced. This
           if state.scene == :game
             process_inputs_player_movement
             process_inputs_god_mode
    -      elsif state.scene == :intro
    -        if args.inputs.keyboard.key_down.enter || args.inputs.keyboard.key_down.space
    -          if Kernel.tick_count < 600
    -            Kernel.tick_count = 600
    -          end
    -        end
           end
         end
       
    @@ -29155,17 +29927,6 @@ Follows is a source code listing for all files that have been open sourced. This
           end
         end
       
    -    def add_floors
    -      # floors
    -      state.world += [
    -        [0,       0, 10000, 40],
    -        [0,    1670, 3250, 60],
    -        [6691, 1653, 3290, 60],
    -        [1521, 3792, 7370, 60],
    -        [0, 5137, 3290, 60]
    -      ]
    -    end
    -  
         def attempt_load_world_from_file
           return if state.world
           # exported_world = gtk.read_file(MAP_FILE_PATH)
    @@ -29173,26 +29934,11 @@ Follows is a source code listing for all files that have been open sourced. This
           state.objects = []
       
           if $collisions
    -        $collisions.map do |x, y, w, h|
    -          state.world << [x, y, w, h]
    +        state.id_seed ||= 0
    +        $collisions.each do |x, y, w, h|
    +          state.id_seed += 1
    +          state.world << { id: state.id_seed, x: x, y: y, w: w, h: h }
             end
    -  
    -        add_floors
    -      # elsif exported_world
    -      #   exported_world.each_line.map do |l|
    -      #     tokens = l.strip.split(',')
    -      #     x    = tokens[0].to_i
    -      #     y    = tokens[1].to_i
    -      #     type = tokens[2].to_i
    -      #     if type == 1
    -      #       state.world << [x, y, state.tile_size, state.tile_size]
    -      #     elsif type == 2
    -      #       w, h, path = tokens[3..-1]
    -      #       state.objects << [x, y, w.to_i, h.to_i, path]
    -      #     end
    -      #   end
    -  
    -      #   add_floors
           end
       
           if $mugs
    @@ -29213,23 +29959,24 @@ Follows is a source code listing for all files that have been open sourced. This
       
           # Searches through the world and finds the cordinates that exist
           state.world_lookup = {}
    -      state.world.each do |x, y, w, h|
    -        state.world_lookup[[x, y, w || state.tile_size, h || state.tile_size]] = true
    +      state.world.each do |rect|
    +        state.world_lookup[rect.id] = rect
           end
       
           # Assigns collision rects for every sprite drawn
           state.world_collision_rects =
             state.world_lookup
                  .keys
    -             .map do |x, y, w, h|
    +             .map do |key|
    +               rect = state.world_lookup[key]
                    s = state.tile_size
    -               w ||= s
    -               h ||= s
    +               rect.w ||= s
    +               rect.h ||= s
                    {
    -                 args:       [x, y, w, h],
    -                 left_right: [x,     y + 4, w,     h - 6],
    -                 top:        [x + 4, y + 6, w - 8, h - 6],
    -                 bottom:     [x + 1, y - 1, w - 2, h - 8],
    +                 args:       rect,
    +                 left_right: { x: rect.x,     y: rect.y + 4, w: rect.w,     h: rect.h - 6 },
    +                 top:        { x: rect.x + 4, y: rect.y + 6, w: rect.w - 8, h: rect.h - 6 },
    +                 bottom:     { x: rect.x + 1, y: rect.y - 1, w: rect.w - 2, h: rect.h - 8 },
                    }
                  end
       
    @@ -29285,12 +30032,21 @@ Follows is a source code listing for all files that have been open sourced. This
       
         def end_of_tongue
           p = state.tongue_angle.vector(state.tongue_length)
    -      [start_of_tongue.x + p.x, start_of_tongue.y + p.y]
    +      { x: start_of_tongue.x + p.x, y: start_of_tongue.y + p.y }
         end
       
         def calc_shooting
    +      calc_shooting_increment
    +      calc_shooting_increment
    +      calc_shooting_increment
    +      calc_shooting_increment
    +      calc_shooting_increment
    +      calc_shooting_increment
    +    end
    +  
    +    def calc_shooting_increment
           return unless state.action == :shooting
    -      state.tongue_length += 30
    +      state.tongue_length += 5
           potential_anchor = end_of_tongue
           if potential_anchor.x <= 0
             state.anchor_point = potential_anchor
    @@ -29309,9 +30065,9 @@ Follows is a source code listing for all files that have been open sourced. This
             state.action = :anchored
             outputs.sounds << 'sounds/attached.wav'
           else
    -        anchor_rect = [potential_anchor.x - 5, potential_anchor.y - 5, 10, 10]
    +        anchor_rect = { x: potential_anchor.x - 5, y: potential_anchor.y - 5, w: 10, h: 10 }
             collision = state.world_collision_rects.find_all do |v|
    -          [v[:args].x, v[:args].y, v[:args].w, v[:args].h].intersect_rect?(anchor_rect)
    +          v[:args].intersect_rect?(anchor_rect)
             end.first
             if collision
               state.anchor_point = potential_anchor
    @@ -29407,7 +30163,7 @@ Follows is a source code listing for all files that have been open sourced. This
                                    .first
       
           return unless left_side_collisions
    -      state.x = left_side_collisions[:left_right].right
    +      state.x = left_side_collisions[:left_right].right + 1
           state.dx = state.dy.abs * 0.8
           state.collision_on_x = true
         end
    @@ -29422,7 +30178,7 @@ Follows is a source code listing for all files that have been open sourced. This
                                     .first
       
           return unless right_side_collisions
    -      state.x = right_side_collisions[:left_right].left - state.tile_size
    +      state.x = right_side_collisions[:left_right].left - state.tile_size - 1
           state.dx = state.dx.abs * 0.8 * -1
           state.collision_on_x = true
         end
    @@ -29438,7 +30194,7 @@ Follows is a source code listing for all files that have been open sourced. This
                               .first
       
           return unless ceil_collisions
    -      state.y = ceil_collisions[:bottom].y - state.tile_size
    +      state.y = ceil_collisions[:bottom].y - state.tile_size - 1
           state.dy = state.dy.abs * 0.8 * -1
           state.collision_on_y = true
         end
    @@ -29451,13 +30207,17 @@ Follows is a source code listing for all files that have been open sourced. This
         end
       
         def export_map
    -      export_string = state.world.map do |x, y|
    -        "#{x},#{y},1"
    -      end
    +      export_string = "$collisions = [\n"
    +      export_string += state.world.map do |rect|
    +        "[#{rect.x},#{rect.y},#{rect.w},#{rect.h}],"
    +      end.join "\n"
    +      export_string += "\n]\n\n"
    +      export_string += "$mugs = [\n"
           export_string += state.objects.map do |x, y, w, h, path|
    -        "#{x},#{y},2,#{w},#{h},#{path}"
    -      end
    -      gtk.write_file(MAP_FILE_PATH, export_string.join("\n"))
    +        "[#{x},#{y},#{w},#{h},'#{path}'],"
    +      end.join "\n"
    +      export_string += "\n]\n\n"
    +      gtk.write_file(MAP_FILE_PATH, export_string)
           state.map_saved_at = state.tick_count
         end
       
    @@ -30585,6 +31345,11 @@ Follows is a source code listing for all files that have been open sourced. This
         [4459, 3997, 64, 64],
         [76, 5215, 64, 64],
         [39, 5217, 64, 64],
    +    [0,       0, 10000, 40],
    +    [0,    1670, 3250, 60],
    +    [6691, 1653, 3290, 60],
    +    [1521, 3792, 7370, 60],
    +    [0, 5137, 3290, 60]
       ]
       
       $mugs = [
    @@ -31440,6 +32205,7 @@ Follows is a source code listing for all files that have been open sourced. This
         end
       
         def load_lines file
    +      return unless state.snaps
           data = gtk.read_file(file) || ""
           data.each_line
               .reject { |l| l.strip.length == 0 }
    @@ -31498,10 +32264,10 @@ Follows is a source code listing for all files that have been open sourced. This
           results[:point] = { x: x, y: y }
           results[:rect] = { x: x - radius, y: y - radius, w: radius * 2, h: radius * 2 }
           results[:trajectory] = trajectory(results)
    -      results[:impacts] = terrain.find_all { |t| line_near_rect? results[:rect], t }.map do |t|
    +      results[:impacts] = terrain.find_all { |t| t && (line_near_rect? results[:rect], t) }.map do |t|
             {
               terrain: t,
    -          point: geometry.line_intersect(results[:trajectory], t),
    +          point: geometry.line_intersect(results[:trajectory], t, replace_infinity: 1000),
               type: :terrain
             }
           end.reject { |t| !point_within_line? t[:point], t[:terrain] }
    @@ -31509,10 +32275,10 @@ Follows is a source code listing for all files that have been open sourced. This
           results[:impacts] += lava.find_all { |t| line_near_rect? results[:rect], t }.map do |t|
             {
               terrain: t,
    -          point: geometry.line_intersect(results[:trajectory], t),
    +          point: geometry.line_intersect(results[:trajectory], t, replace_infinity: 1000),
               type: :lava
             }
    -      end.reject { |t| !point_within_line? t[:point], t[:terrain] }
    +      end.reject { |t| !t || (!point_within_line? t[:point], t[:terrain]) }
       
           results
         end
    @@ -31525,6 +32291,7 @@ Follows is a source code listing for all files that have been open sourced. This
         end
       
         def calc_terrains_to_monitor
    +      return unless circle.impacts
           circle.impact = nil
           circle.impacts.each do |i|
             circle.terrains_to_monitor[i[:terrain]] ||= {
    @@ -37074,6 +37841,151 @@ Follows is a source code listing for all files that have been open sourced. This
     
     #+end_src
     
    +*** Rpg Topdown - Topdown Casino - main.rb
    +#+begin_src ruby
    +  # ./samples/99_genre_rpg_topdown/topdown_casino/app/main.rb
    +  $gtk.reset
    +  
    +  def coinflip
    +    rand < 0.5
    +  end
    +  
    +  class Game
    +    attr_accessor :args
    +  
    +    def text_font
    +      return nil #"rpg.ttf"
    +    end
    +  
    +    def text_color
    +      [ 255, 255, 255, 255 ]
    +    end
    +  
    +    def set_gem_values
    +      @args.state.gem0 = ((coinflip) ?  100 : 20)
    +      @args.state.gem1 = ((coinflip) ? -10 : -50)
    +      @args.state.gem2 = ((coinflip) ? -10 : -30)
    +      if coinflip
    +        tmp = @args.state.gem0
    +        @args.state.gem0 = @args.state.gem1
    +        @args.state.gem1 = tmp
    +      end
    +      if coinflip
    +        tmp = @args.state.gem1
    +        @args.state.gem1 = @args.state.gem2
    +        @args.state.gem2 = tmp
    +      end
    +      if coinflip
    +        tmp = @args.state.gem0
    +        @args.state.gem0 = @args.state.gem2
    +        @args.state.gem2 = tmp
    +      end
    +    end
    +  
    +    def initialize args
    +      @args = args
    +      @args.state.animticks = 0
    +      @args.state.score = 0
    +      @args.state.gem_chosen = false
    +      @args.state.round_finished = false
    +      @args.state.gem0_x = 197
    +      @args.state.gem0_y = 720-274
    +      @args.state.gem1_x = 623
    +      @args.state.gem1_y = 720-274
    +      @args.state.gem2_x = 1049
    +      @args.state.gem2_y = 720-274
    +      @args.state.hero_sprite = "sprites/herodown100.png"
    +      @args.state.hero_x = 608
    +      @args.state.hero_y = 720-656
    +      set_gem_values
    +    end
    +  
    +    def render_gem_value x, y, gem
    +      if @args.state.gem_chosen
    +        @args.outputs.labels << [ x, y + 96, gem.to_s, 1, 1, *text_color, text_font ]
    +      end
    +    end
    +  
    +    def render
    +      gemsprite = ((@args.state.animticks % 400) < 200) ? 'sprites/gem200.png' : 'sprites/gem400.png'
    +      @args.outputs.background_color = [ 0, 0, 0, 255 ]
    +      @args.outputs.sprites << [608, 720-150, 64, 64, 'sprites/oldman.png']
    +      @args.outputs.sprites << [300, 720-150, 64, 64, 'sprites/fire.png']
    +      @args.outputs.sprites << [900, 720-150, 64, 64, 'sprites/fire.png']
    +      @args.outputs.sprites << [@args.state.gem0_x, @args.state.gem0_y, 32, 64, gemsprite]
    +      @args.outputs.sprites << [@args.state.gem1_x, @args.state.gem1_y, 32, 64, gemsprite]
    +      @args.outputs.sprites << [@args.state.gem2_x, @args.state.gem2_y, 32, 64, gemsprite]
    +      @args.outputs.sprites << [@args.state.hero_x, @args.state.hero_y, 64, 64, @args.state.hero_sprite]
    +  
    +      @args.outputs.labels << [ 630, 720-30, "IT'S A SECRET TO EVERYONE.", 1, 1, *text_color, text_font ]
    +      @args.outputs.labels << [ 50, 720-85, @args.state.score.to_s, 1, 1, *text_color, text_font ]
    +      render_gem_value @args.state.gem0_x, @args.state.gem0_y, @args.state.gem0
    +      render_gem_value @args.state.gem1_x, @args.state.gem1_y, @args.state.gem1
    +      render_gem_value @args.state.gem2_x, @args.state.gem2_y, @args.state.gem2
    +    end
    +  
    +    def calc
    +      @args.state.animticks += 16
    +  
    +      return unless @args.state.gem_chosen
    +      @args.state.round_finished_debounce ||= 60 * 3
    +      @args.state.round_finished_debounce -= 1
    +      return if @args.state.round_finished_debounce > 0
    +  
    +      @args.state.gem_chosen = false
    +      @args.state.hero.sprite[0] = 'sprites/herodown100.png'
    +      @args.state.hero.sprite[1] = 608
    +      @args.state.hero.sprite[2] = 656
    +      @args.state.round_finished_debounce = nil
    +      set_gem_values
    +    end
    +  
    +    def walk xdir, ydir, anim
    +      @args.state.hero_sprite = "sprites/#{anim}#{(((@args.state.animticks % 200) < 100) ? '100' : '200')}.png"
    +      @args.state.hero_x += 5 * xdir
    +      @args.state.hero_y += 5 * ydir
    +    end
    +  
    +    def check_gem_touching gem_x, gem_y, gem
    +      return if @args.state.gem_chosen
    +      herorect = [ @args.state.hero_x, @args.state.hero_y, 64, 64 ]
    +      return if !herorect.intersect_rect?([gem_x, gem_y, 32, 64])
    +      @args.state.gem_chosen = true
    +      @args.state.score += gem
    +      @args.outputs.sounds << ((gem < 0) ? 'sounds/lose.wav' : 'sounds/win.wav')
    +    end
    +  
    +    def input
    +      if @args.inputs.keyboard.key_held.left
    +        walk(-1.0, 0.0, 'heroleft')
    +      elsif @args.inputs.keyboard.key_held.right
    +        walk(1.0, 0.0, 'heroright')
    +      elsif @args.inputs.keyboard.key_held.up
    +        walk(0.0, 1.0, 'heroup')
    +      elsif @args.inputs.keyboard.key_held.down
    +        walk(0.0, -1.0, 'herodown')
    +      end
    +  
    +      check_gem_touching(@args.state.gem0_x, @args.state.gem0_y, @args.state.gem0)
    +      check_gem_touching(@args.state.gem1_x, @args.state.gem1_y, @args.state.gem1)
    +      check_gem_touching(@args.state.gem2_x, @args.state.gem2_y, @args.state.gem2)
    +    end
    +  
    +    def tick
    +      input
    +      calc
    +      render
    +    end
    +  end
    +  
    +  def tick args
    +      args.state.game ||= Game.new args
    +      args.state.game.args = args
    +      args.state.game.tick
    +  end
    +
    +#+end_src
    +
     *** Rpg Topdown - Topdown Starting Point - main.rb
     #+begin_src ruby
       # ./samples/99_genre_rpg_topdown/topdown_starting_point/app/main.rb
    @@ -37188,6 +38100,189 @@ Follows is a source code listing for all files that have been open sourced. This
     
     #+end_src
     
    +*** Teenytiny - Teenytiny Starting Point - main.rb
    +#+begin_src ruby
    +  # ./samples/99_genre_teenytiny/teenytiny_starting_point/app/main.rb
    +  # full documenation is at http://docs.dragonruby.org
    +  # be sure to come to the discord if you hit any snags: http://discord.dragonruby.org
    +  def tick args
    +    # ====================================================
    +    # initialize default variables
    +    # ====================================================
    +  
    +    # ruby has an operator called ||= which means "only initialize this if it's nil"
    +    args.state.count_down   ||= 20 * 60 # set the count down to 20 seconds
    +    # set the initial position of the target
    +    args.state.target       ||= { x: args.grid.w.half,
    +                                  y: args.grid.h.half,
    +                                  w: 20,
    +                                  h: 20 }
    +  
    +    # set the initial position of the player
    +    args.state.player       ||= { x: 50,
    +                                  y: 50,
    +                                  w: 20,
    +                                  h: 20 }
    +  
    +    # set the player movement speed
    +    args.state.player_speed ||= 5
    +  
    +    # set the score
    +    args.state.score        ||= 0
    +    args.state.teleports    ||= 3
    +  
    +    # set the instructions
    +    args.state.instructions ||= "Get to the red goal! Use arrow keys to move. Spacebar to teleport (use them carefully)!"
    +  
    +    # ====================================================
    +    # render the game
    +    # ====================================================
    +    args.outputs.labels  << { x: args.grid.w.half, y: args.grid.h - 10,
    +                              text: args.state.instructions,
    +                              alignment_enum: 1 }
    +  
    +    # check if it's game over. if so, then render game over
    +    # otherwise render the current time left
    +    if game_over? args
    +      args.outputs.labels  << { x: args.grid.w.half,
    +                                y: args.grid.h - 40,
    +                                text: "game over! (press r to start over)",
    +                                alignment_enum: 1 }
    +    else
    +      args.outputs.labels  << { x: args.grid.w.half,
    +                                y: args.grid.h - 40,
    +                                text: "time left: #{(args.state.count_down.idiv 60) + 1}",
    +                                alignment_enum: 1 }
    +    end
    +  
    +    # render the score
    +    args.outputs.labels  << { x: args.grid.w.half,
    +                              y: args.grid.h - 70,
    +                              text: "score: #{args.state.score}",
    +                              alignment_enum: 1 }
    +  
    +    # render the player with teleport count
    +    args.outputs.sprites << { x: args.state.player.x,
    +                              y: args.state.player.y,
    +                              w: args.state.player.w,
    +                              h: args.state.player.h,
    +                              path: 'sprites/square-green.png' }
    +  
    +    args.outputs.labels << { x: args.state.player.x + 10,
    +                             y: args.state.player.y + 40,
    +                             text: "teleports: #{args.state.teleports}",
    +                             alignment_enum: 1, size_enum: -2 }
    +  
    +    # render the target
    +    args.outputs.sprites << { x: args.state.target.x,
    +                              y: args.state.target.y,
    +                              w: args.state.target.w,
    +                              h: args.state.target.h,
    +                              path: 'sprites/square-red.png' }
    +  
    +    # ====================================================
    +    # run simulation
    +    # ====================================================
    +  
    +    # count down calculation
    +    args.state.count_down -= 1
    +    args.state.count_down = -1 if args.state.count_down < -1
    +  
    +    # ====================================================
    +    # process player input
    +    # ====================================================
    +    # if it isn't game over let them move
    +    if !game_over? args
    +      dir_y = 0
    +      dir_x = 0
    +  
    +      # determine the change horizontally
    +      if args.inputs.keyboard.up
    +        dir_y += args.state.player_speed
    +      elsif args.inputs.keyboard.down
    +        dir_y -= args.state.player_speed
    +      end
    +  
    +      # determine the change vertically
    +      if args.inputs.keyboard.left
    +        dir_x -= args.state.player_speed
    +      elsif args.inputs.keyboard.right
    +        dir_x += args.state.player_speed
    +      end
    +  
    +      # determine if teleport can be used
    +      if args.inputs.keyboard.key_down.space && args.state.teleports > 0
    +        args.state.teleports -= 1
    +        dir_x *= 20
    +        dir_y *= 20
    +      end
    +  
    +      # apply change to player
    +      args.state.player.x += dir_x
    +      args.state.player.y += dir_y
    +    else
    +      # if r is pressed, reset the game
    +      if args.inputs.keyboard.key_down.r
    +        $gtk.reset
    +        return
    +      end
    +    end
    +  
    +    # ====================================================
    +    # determine score
    +    # ====================================================
    +  
    +    # calculate new score if the player is at goal
    +    if !game_over? args
    +  
    +      # if the player is at the goal, then move the goal
    +      if args.state.player.intersect_rect? args.state.target
    +        # increment the goal
    +        args.state.score += 1
    +  
    +        # move the goal to a random location
    +        args.state.target = { x: (rand args.grid.w), y: (rand args.grid.h), w: 20, h: 20 }
    +  
    +        # make sure the goal is inside the view area
    +        if args.state.target.x < 0
    +          args.state.target.x += 20
    +        elsif args.state.target.x > 1280
    +          args.state.target.x -= 20
    +        end
    +  
    +        # make sure the goal is inside the view area
    +        if args.state.target.y < 0
    +          args.state.target.y += 20
    +        elsif args.state.target.y > 720
    +          args.state.target.y -= 20
    +        end
    +      end
    +    end
    +  end
    +  
    +  def game_over? args
    +    args.state.count_down < 0
    +  end
    +  
    +  $gtk.reset
    +
    +#+end_src
    +
    +*** Teenytiny - Teenytiny Starting Point - license.txt
    +#+begin_src ruby
    +  # ./samples/99_genre_teenytiny/teenytiny_starting_point/license.txt
    +  Copyright 2019 DragonRuby LLC
    +  
    +  MIT License
    +  
    +  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
    +  
    +  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
    +  
    +  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
    +
    +#+end_src
    +
     ** OSS
     Follows is a source code listing for all files that have been open sourced. This code can be found online at [[https://github.com/DragonRuby/dragonruby-game-toolkit-contrib/]].
     *** args.rb
    @@ -37205,6 +38300,7 @@ Follows is a source code listing for all files that have been open sourced. This
         class Args
           include ArgsDeprecated
           include Serialize
    +      attr_accessor :cvars
           attr_accessor :inputs
           attr_accessor :outputs
           attr_accessor :audio
    @@ -37225,6 +38321,7 @@ Follows is a source code listing for all files that have been open sourced. This
           def initialize runtime, recording
             @inputs = Inputs.new
             @outputs = Outputs.new args: self
    +        @cvars = {}
             @audio = {}
             @passes = []
             @state = OpenEntity.new
    @@ -37395,6 +38492,23 @@ Follows is a source code listing for all files that have been open sourced. This
           def autocomplete_methods
             [:inputs, :outputs, :gtk, :state, :geometry, :audio, :grid, :layout, :fn]
           end
    +  
    +      def method_missing name, *args, &block
    +        if (args.length <= 1) && (@state.as_hash.key? name)
    +          raise <<-S
    +  * ERROR - :#{name} method missing on ~#{self.class.name}~.
    +  The method
    +    :#{name}
    +  with args
    +    #{args}
    +  doesn't exist on #{inspect}.
    +  ** POSSIBLE SOLUTION - ~args.state.#{name}~ exists.
    +  Did you forget ~.state~ before ~.#{name}~?
    +  S
    +        end
    +  
    +        super
    +      end
         end
       end
     
    @@ -37690,14 +38804,17 @@ Follows is a source code listing for all files that have been open sourced. This
         class Console
           include ConsoleDeprecated
       
    -      attr_accessor :show_reason, :log, :logo, :background_color,
    -                    :text_color, :animation_duration,
    +      attr_accessor :show_reason, :log, :logo,
    +                    :animation_duration,
                         :max_log_lines, :max_history, :log,
    -                    :last_command_errored, :last_command, :error_color, :shown_at,
    -                    :header_color, :archived_log, :last_log_lines, :last_log_lines_count,
    +                    :last_command_errored, :last_command, :shown_at,
    +                    :archived_log, :last_log_lines, :last_log_lines_count,
                         :suppress_left_arrow_behavior, :command_set_at,
                         :toast_ids, :bottom,
    -                    :font_style, :menu
    +                    :font_style, :menu,
    +                    :background_color, :spam_color, :text_color, :warn_color,
    +                    :error_color, :header_color, :code_color, :comment_color,
    +                    :debug_color, :unfiltered_color
       
           def initialize
             @font_style = FontStyle.new(font: 'font.ttf', size_enum: -1.5, line_height: 1.1)
    @@ -37715,15 +38832,22 @@ Follows is a source code listing for all files that have been open sourced. This
             @command_history_index = -1
             @nonhistory_input = ''
             @logo = 'console-logo.png'
    -        @history_fname = 'console_history.txt'
    +        @history_fname = 'logs/console_history.txt'
             @background_color = Color.new [0, 0, 0, 224]
    -        @text_color = Color.new [255, 255, 255]
    -        @error_color = Color.new [200, 50, 50]
             @header_color = Color.new [100, 200, 220]
             @code_color = Color.new [210, 168, 255]
    -        @comment_color    = Color.new [0, 200, 100]
    +        @comment_color = Color.new [0, 200, 100]
             @animation_duration = 1.seconds
             @shown_at = -1
    +  
    +        # these are the colors for text at various log levels.
    +        @spam_color = Color.new [160, 160, 160]
    +        @debug_color = Color.new [0, 255, 0]
    +        @text_color = Color.new [255, 255, 255]
    +        @warn_color = Color.new [255, 255, 0]
    +        @error_color = Color.new [200, 50, 50]
    +        @unfiltered_color = Color.new [0, 255, 255]
    +  
             load_history
           end
       
    @@ -37789,7 +38913,13 @@ Follows is a source code listing for all files that have been open sourced. This
             nil
           end
       
    -      def add_text obj
    +      def add_text obj, loglevel=-1
    +        # loglevel is one of the values of LogLevel in logging.h, or -1 to say "we don't care, colorize it with your special string parsing magic"
    +        loglevel = -1 if loglevel < 0
    +        loglevel = 5 if loglevel > 5  # 5 == unfiltered (it's 0x7FFFFFFE in C, clamp it down)
    +        loglevel = 2 if (loglevel == -1) && obj.start_with?('!c!')  # oh well
    +        colorstr = (loglevel != -1) ? "!c!#{loglevel}" : nil
    +  
             @last_log_lines_count ||= 1
             @log_invocation_count += 1
       
    @@ -37798,12 +38928,18 @@ Follows is a source code listing for all files that have been open sourced. This
             log_lines = []
       
             str.each_line do |s|
    -          s.wrapped_lines(self.console_text_width).each do |l|
    -            log_lines << l
    +          if colorstr.nil?
    +            s.wrapped_lines(self.console_text_width).each do |l|
    +              log_lines << l
    +            end
    +          else
    +            s.wrapped_lines(self.console_text_width).each do |l|
    +              log_lines << "#{colorstr}#{l}"
    +            end
               end
             end
       
    -        if log_lines == @last_log_lines
    +        if log_lines == @last_log_lines && log_lines.length != 0
               @last_log_lines_count += 1
               new_log_line_with_count = @last_log_lines.last + " (#{@last_log_lines_count})"
               if log_lines.length > 1
    @@ -38078,10 +39214,12 @@ Follows is a source code listing for all files that have been open sourced. This
           def mouse_wheel_scroll args
             @inertia ||= 0
       
    -        if args.inputs.mouse.wheel && args.inputs.mouse.wheel.y > 0
    -          @inertia = 1
    -        elsif args.inputs.mouse.wheel && args.inputs.mouse.wheel.y < 0
    -          @inertia = -1
    +        if args.inputs.mouse.wheel
    +          if args.inputs.mouse.wheel.y > 0
    +            @inertia = 1
    +          elsif args.inputs.mouse.wheel.y < 0
    +            @inertia = -1
    +          end
             end
       
             if args.inputs.mouse.click
    @@ -38090,13 +39228,11 @@ Follows is a source code listing for all files that have been open sourced. This
       
             return if @inertia == 0
       
    -        if @inertia != 0
    -          @inertia = (@inertia * 0.7)
    -          if @inertia > 0
    -            @log_offset -= 1
    -          elsif @inertia < 0
    -            @log_offset += 1
    -          end
    +        @inertia = (@inertia * 0.7)
    +        if @inertia > 0
    +          @log_offset += 1
    +        elsif @inertia < 0
    +          @log_offset -= 1
             end
       
             if @inertia.abs < 0.01
    @@ -38114,6 +39250,7 @@ Follows is a source code listing for all files that have been open sourced. This
             if console_toggle_key_down? args
               args.inputs.text.clear
               toggle
    +          args.inputs.keyboard.clear if !@visible
             end
       
             return unless visible?
    @@ -38125,7 +39262,16 @@ Follows is a source code listing for all files that have been open sourced. This
             @log_offset = 0 if @log_offset < 0
       
             if args.inputs.keyboard.key_down.enter
    -          eval_the_set_command
    +          if slide_progress > 0.5
    +            # in the event of an exception, the console window pops up
    +            # and is pre-filled with $gtk.reset.
    +            # there is an annoying scenario where the exception could be thrown
    +            # by pressing enter (while playing the game). if you press enter again
    +            # quickly, then the game is reset which closes the console.
    +            # so enter in the console is only evaluated if the slide_progress
    +            # is atleast half way down the page.
    +            eval_the_set_command
    +          end
             elsif args.inputs.keyboard.key_down.v
               if args.inputs.keyboard.key_down.control || args.inputs.keyboard.key_down.meta
                 prompt << $gtk.ffi_misc.getclipboard
    @@ -38202,7 +39348,7 @@ Follows is a source code listing for all files that have been open sourced. This
           def write_line(args, left, y, str, archived: false)
             color = color_for_log_entry(str)
             color = color.mult_alpha(0.5) if archived
    -  
    +        str = str[4..-1] if str.start_with?('!c!')  # chop off loglevel color
             args.outputs.reserved << font_style.label(x: left.shift_right(10), y: y, text: str, color: color)
           end
       
    @@ -38438,7 +39584,9 @@ Follows is a source code listing for all files that have been open sourced. This
             return false
           end
       
    -      def color_for_log_entry(log_entry)
    +      def color_for_plain_text log_entry
    +        log_entry = log_entry[4..-1] if log_entry.start_with? "!c!"
    +  
             if code? log_entry
               @code_color
             elsif code_comment? log_entry
    @@ -38458,6 +39606,29 @@ Follows is a source code listing for all files that have been open sourced. This
             end
           end
       
    +      def color_for_log_entry(log_entry)
    +        if log_entry.start_with?('!c!')  # loglevel color specified.
    +          return case log_entry[3..3].to_i
    +                 when 0  # spam
    +                   @spam_color
    +                 when 1  # debug
    +                   @debug_color
    +                 #when 2  # info (caught by the `else` block.)
    +                 #  @text_color
    +                 when 3  # warn
    +                   @warn_color
    +                 when 4  # error
    +                   @error_color
    +                 when 5  # unfiltered
    +                   @unfiltered_color
    +                 else
    +                   color_for_plain_text log_entry
    +                 end
    +        end
    +  
    +        return color_for_plain_text log_entry
    +      end
    +  
           def prompt
             @prompt ||= Prompt.new(font_style: font_style, text_color: @text_color, console_text_width: console_text_width)
           end
    @@ -38909,11 +40080,11 @@ Follows is a source code listing for all files that have been open sourced. This
       
                 # partition the original list of items into a string to be printed
                 items.each_slice(columns).each_with_index do |cells, i|
    -              pretty_print_row_seperator string_width, cell_width, column_width, columns
    +              pretty_print_row_separator string_width, cell_width, column_width, columns
                   pretty_print_row cells, string_width, cell_width, column_width, columns
                 end
       
    -            pretty_print_row_seperator string_width, cell_width, column_width, columns
    +            pretty_print_row_separator string_width, cell_width, column_width, columns
               end
             end
       
    @@ -39750,8 +40921,8 @@ Follows is a source code listing for all files that have been open sourced. This
             ease_extended start_tick,
                           current_tick,
                           start_tick + duration,
    -                      (initial_value *definitions),
    -                      (final_value *definitions),
    +                      initial_value(*definitions),
    +                      final_value(*definitions),
                           *definitions
           end
       
    @@ -39946,8 +41117,8 @@ Follows is a source code listing for all files that have been open sourced. This
       module GTK
         module Geometry
           def self.rotate_point point, angle, around = nil
    -        s = Math.sin a.to_radians
    -        c = Math.cos a.to_radians
    +        s = Math.sin angle.to_radians
    +        c = Math.cos angle.to_radians
             px = point.x
             py = point.y
             cx = 0
    @@ -40128,8 +41299,16 @@ Follows is a source code listing for all files that have been open sourced. This
           end
       
           # @gtk
    -      def self.line_y_intercept line
    -        line.y - line_slope(line) * line.x
    +      def self.line_y_intercept line, replace_infinity: nil
    +        line.y - line_slope(line, replace_infinity: replace_infinity) * line.x
    +      rescue Exception => e
    +  raise <<-S
    +  * ERROR: ~Geometry::line_y_intercept~
    +  The following exception was thrown for line: #{line}
    +  #{e}
    +  
    +  Consider passing in ~replace_infinity: VALUE~ to handle for vertical lines.
    +  S
           end
       
           # @gtk
    @@ -40205,14 +41384,22 @@ Follows is a source code listing for all files that have been open sourced. This
           end
       
           # @gtk
    -      def self.line_intersect line_one, line_two
    -        m1 = line_slope(line_one)
    -        m2 = line_slope(line_two)
    -        b1 = line_y_intercept(line_one)
    -        b2 = line_y_intercept(line_two)
    +      def self.line_intersect line_one, line_two, replace_infinity: nil
    +        m1 = line_slope(line_one, replace_infinity: replace_infinity)
    +        m2 = line_slope(line_two, replace_infinity: replace_infinity)
    +        b1 = line_y_intercept(line_one, replace_infinity: replace_infinity)
    +        b2 = line_y_intercept(line_two, replace_infinity: replace_infinity)
             x = (b1 - b2) / (m2 - m1)
             y = (-b2.fdiv(m2) + b1.fdiv(m1)).fdiv(1.fdiv(m1) - 1.fdiv(m2))
             [x, y]
    +      rescue Exception => e
    +  raise <<-S
    +  * ERROR: ~Geometry::line_intersect~
    +  The following exception was thrown for line_one: #{line_one}, line_two: #{line_two}
    +  #{e}
    +  
    +  Consider passing in ~replace_infinity: VALUE~ to handle for vertical lines.
    +  S
           end
       
           def self.contract_intersect_rect?
    @@ -40897,7 +42084,8 @@ Follows is a source code listing for all files that have been open sourced. This
             value = Kernel.tick_count if value
       
             collection.each do |m|
    -          self.instance_variable_set("@#{m.to_s}".to_sym, value)
    +          m_to_s = m.to_s
    +          self.instance_variable_set("@#{m_to_s}".to_sym, value) if m_to_s.strip.length > 0
             rescue Exception => e
               raise e, <<-S
       * ERROR:
    @@ -41441,6 +42629,7 @@ Follows is a source code listing for all files that have been open sourced. This
             :check_for_dev_profile,
       
             *app_metadata_retrieval_steps,
    +        :determine_devcert,
       
             :clear_tmp_directory,
             :stage_app,
    @@ -41469,6 +42658,7 @@ Follows is a source code listing for all files that have been open sourced. This
             :determine_app_version,
       
             *app_metadata_retrieval_steps,
    +        :determine_prodcert,
       
             :clear_tmp_directory,
             :stage_app,
    @@ -41663,6 +42853,10 @@ Follows is a source code listing for all files that have been open sourced. This
       appid=
       # appname is the name you want to show up underneath the app icon on the device. Keep it under 10 characters.
       appname=
    +  # devcert is the certificate to use for development/deploying to your local device
    +  devcert=
    +  # prodcert is the certificate to use for distribution to the app store
    +  prodcert=
       S
         end
       
    @@ -41698,7 +42892,7 @@ Follows is a source code listing for all files that have been open sourced. This
         def raise_ios_metadata_required
           raise WizardException.new(
                   "* mygame/metadata/ios_metadata.txt needs to be filled out.",
    -              "You need to update metadata/ios_metadata.txt with a valid teamid, appname, and appid.",
    +              "You need to update metadata/ios_metadata.txt with a valid teamid, appname, appid, devcert, and prodcert.",
                   "Instructions for where the values should come from are within metadata/ios_metadata.txt."
                 )
         end
    @@ -41738,7 +42932,19 @@ Follows is a source code listing for all files that have been open sourced. This
         def determine_app_id
           @app_id = ios_metadata.appid
           raise_ios_metadata_required if @app_id.strip.length == 0
    -      log_info "App Identifier is set to : #{@app_id}"
    +      log_info "App Identifier is set to: #{@app_id}"
    +    end
    +  
    +    def determine_devcert
    +      @certificate_name = ios_metadata.devcert
    +      raise_ios_metadata_required if @certificate_name.strip.length == 0
    +      log_info "Dev Certificate is set to: #{@certificate_name}"
    +    end
    +  
    +    def determine_prodcert
    +      @certificate_name = ios_metadata.prodcert
    +      raise_ios_metadata_required if @certificate_name.strip.length == 0
    +      log_info "Production (Distribution) Certificate is set to: #{@certificate_name}"
         end
       
         def set_app_name name
    @@ -41760,12 +42966,6 @@ Follows is a source code listing for all files that have been open sourced. This
           sh "rm -rf #{tmp_directory}"
         end
       
    -    def stage_app
    -      log_info "Staging."
    -      sh "mkdir -p #{tmp_directory}"
    -      sh "cp -R #{relative_path}/dragonruby-ios.app \"#{tmp_directory}/#{@app_name}.app\""
    -    end
    -  
         def set_app_id id
           log_info = "App Id set to: #{id}"
           @app_id = id
    @@ -41796,34 +42996,13 @@ Follows is a source code listing for all files that have been open sourced. This
         def check_for_certs
           log_info "Attempting to find certificates on your computer."
       
    -      if !cli_app_exist?(security_cli_app)
    -        raise WizardException.new(
    -                "* It doesn't look like you have #{security_cli_app}.",
    -                "** 1. Open Disk Utility and run First Aid.",
    -                { w: 700, h: 148, path: get_reserved_sprite("disk-utility.png") },
    -              )
    -      end
    -  
    -      if valid_certs.length == 0
    -        raise WizardException.new(
    -                "* It doesn't look like you have any valid certs installed.",
    -                "** 1. Open Xcode.",
    -                "** 2. Log into your developer account. Xcode -> Preferences -> Accounts.",
    -                { w: 700, h: 98, path: get_reserved_sprite("login-xcode.png") },
    -                "** 3. After loggin in, select Manage Certificates...",
    -                { w: 700, h: 115, path: get_reserved_sprite("manage-certificates.png") },
    -                "** 4. Add a certificate for Apple Development.",
    -                { w: 700, h: 217, path: get_reserved_sprite("add-cert.png") },
    -        )
    -        raise "You do not have any Apple development certs on this computer."
    -      end
    -  
           if @production_build
    -        @certificate_name = valid_certs.find_all { |f| f[:name].include? "Distribution" }.first[:name]
    +        @certificate_name = ios_metadata[:prodcert]
           else
    -        @certificate_name = valid_certs.find_all { |f| f[:name].include? "Development" }.first[:name]
    +        @certificate_name = ios_metadata[:devcert]
           end
    -      log_info "I will be using Certificate: '#{@certificate_name}'."
    +  
    +      log_info "I will be using certificate: '#{@certificate_name}'."
         end
       
         def idevice_id_cli_app
    @@ -41838,24 +43017,6 @@ Follows is a source code listing for all files that have been open sourced. This
           "xcodebuild"
         end
       
    -    def valid_certs
    -      certs = sh("#{security_cli_app} -q find-identity -p codesigning -v").each_line.map do |l|
    -        if l.include?(")") && !l.include?("Developer ID") && (l.include?("Development") || l.include?("Distribution"))
    -          l.strip
    -        else
    -          nil
    -        end
    -      end.reject_nil.map do |l|
    -        number, id, name = l.split(' ', 3)
    -        name = name.gsub("\"", "") if name
    -        {
    -          number: 1,
    -          id: id,
    -          name: name
    -        }
    -      end
    -    end
    -  
         def connected_devices
           sh("idevice_id -l").strip.each_line.map do |l|
             l.strip
    @@ -42385,6 +43546,9 @@ Follows is a source code listing for all files that have been open sourced. This
         end
       
         def stage_app
    +      log_info "Staging."
    +      sh "mkdir -p #{tmp_directory}"
    +      sh "cp -R #{relative_path}/dragonruby-ios.app \"#{tmp_directory}/#{@app_name}.app\""
           sh %Q[cp -r "#{root_folder}/app/" "#{app_path}/app/"]
           sh %Q[cp -r "#{root_folder}/sounds/" "#{app_path}/sounds/"]
           sh %Q[cp -r "#{root_folder}/sprites/" "#{app_path}/sprites/"]
    @@ -44222,26 +45386,6 @@ Follows is a source code listing for all files that have been open sourced. This
           (0..self).to_a
         end
       
    -    def >= other
    -      return false if !other
    -      return gte other
    -    end
    -  
    -    def > other
    -      return false if !other
    -      return gt other
    -    end
    -  
    -    def <= other
    -      return false if !other
    -      return lte other
    -    end
    -  
    -    def < other
    -      return false if !other
    -      return gt other
    -    end
    -  
         # @gtk
         def map
           unless block_given?
    @@ -44327,34 +45471,6 @@ Follows is a source code listing for all files that have been open sourced. This
       S
         end
       
    -    def - other
    -      return self unless other
    -      self - other
    -    rescue Exception => e
    -      __raise_arithmetic_exception__ other, :-, e
    -    end
    -  
    -    def + other
    -      return self unless other
    -      self + other
    -    rescue Exception => e
    -      __raise_arithmetic_exception__ other, :+, e
    -    end
    -  
    -    def * other
    -      return self unless other
    -      self * other
    -    rescue Exception => e
    -      __raise_arithmetic_exception__ other, :*, e
    -    end
    -  
    -    def / other
    -      return self unless other
    -      self / other
    -    rescue Exception => e
    -      __raise_arithmetic_exception__ other, :/, e
    -    end
    -  
         def serialize
           self
         end
    @@ -44409,34 +45525,6 @@ Follows is a source code listing for all files that have been open sourced. This
           return !even?
         end
       
    -    def + other
    -      return self unless other
    -      self + other
    -    rescue Exception => e
    -      __raise_arithmetic_exception__ other, :+, e
    -    end
    -  
    -    def * other
    -      return self unless other
    -      self * other
    -    rescue Exception => e
    -      __raise_arithmetic_exception__ other, :*, e
    -    end
    -  
    -    def / other
    -      return self unless other
    -      self / other
    -    rescue Exception => e
    -      __raise_arithmetic_exception__ other, :/, e
    -    end
    -  
    -    def - other
    -      return self unless other
    -      self - other
    -    rescue Exception => e
    -      __raise_arithmetic_exception__ other, :-, e
    -    end
    -  
         # Returns `-1` if the number is less than `0`. `+1` if the number
         # is greater than `0`. Returns `0` if the number is equal to `0`.
         #
    @@ -44492,34 +45580,6 @@ Follows is a source code listing for all files that have been open sourced. This
         alias_method :__original_multiply__, :* unless Float.instance_methods.include? :__original_multiply__
         alias_method :__original_divide__,   :- unless Float.instance_methods.include? :__original_divide__
       
    -    def - other
    -      return self unless other
    -      super
    -    rescue Exception => e
    -      __raise_arithmetic_exception__ other, :-, e
    -    end
    -  
    -    def + other
    -      return self unless other
    -      super
    -    rescue Exception => e
    -      __raise_arithmetic_exception__ other, :+, e
    -    end
    -  
    -    def * other
    -      return self unless other
    -      super
    -    rescue Exception => e
    -      __raise_arithmetic_exception__ other, :*, e
    -    end
    -  
    -    def / other
    -      return self unless other
    -      super
    -    rescue Exception => e
    -      __raise_arithmetic_exception__ other, :/, e
    -    end
    -  
         def serialize
           self
         end
    @@ -44569,6 +45629,272 @@ Follows is a source code listing for all files that have been open sourced. This
     
     #+end_src
     
    +*** recording.rb
    +#+begin_src ruby
    +  # ./dragon/recording.rb
    +  # coding: utf-8
    +  # Copyright 2019 DragonRuby LLC
    +  # MIT License
    +  # recording.rb has been released under MIT (*only this file*).
    +  
    +  module GTK
    +    # FIXME: Gross
    +    # @gtk
    +    class Replay
    +      # @gtk
    +      def self.start file_name = nil
    +        $recording.start_replay file_name
    +      end
    +  
    +      # @gtk
    +      def self.stop
    +        $recording.stop_replay
    +      end
    +    end
    +  
    +    # @gtk
    +    class Recording
    +      def initialize runtime
    +        @runtime = runtime
    +        @tick_count = 0
    +        @global_input_order = 1
    +      end
    +  
    +      def tick
    +        @tick_count += 1
    +      end
    +  
    +      def start_recording seed_number = nil
    +        if !seed_number
    +          log <<-S
    +  * ERROR:
    +  To start recording, you must provide an integer value to
    +  seed random number generation.
    +  S
    +          $console.set_command "$recording.start SEED_NUMBER"
    +          return
    +        end
    +  
    +        if @is_recording
    +          log <<-S
    +  * ERROR:
    +  You are already recording, first cancel (or stop) the current recording.
    +  S
    +          $console.set_command "$recording.cancel"
    +          return
    +        end
    +  
    +        if @is_replaying
    +          log <<-S
    +  * ERROR:
    +  You are currently replaying a recording, first stop the replay.
    +  S
    +          return
    +        end
    +  
    +        log_info <<-S
    +  Recording has begun with RNG seed value set to #{seed_number}.
    +  To stop recording use stop_recording(filename).
    +  The recording will stop without saving a file if a filename is nil.
    +  S
    +  
    +        $console.set_command "$recording.stop 'replay.txt'"
    +        @runtime.__reset__
    +        @seed_number = seed_number
    +        @runtime.set_rng seed_number
    +  
    +        @tick_count = 0
    +        @global_input_order = 1
    +        @is_recording = true
    +        @input_history = []
    +        @runtime.notify! "Recording started. When completed, open the console to save it using $recording.stop FILE_NAME (or cancel).", 300
    +      end
    +  
    +      # @gtk
    +      def start seed_number = nil
    +        start_recording seed_number
    +      end
    +  
    +      def is_replaying?
    +        @is_replaying
    +      end
    +  
    +      def is_recording?
    +        @is_recording
    +      end
    +  
    +      # @gtk
    +      def stop file_name = nil
    +        stop_recording file_name
    +      end
    +  
    +      # @gtk
    +      def cancel
    +        stop_recording_core
    +        @runtime.notify! "Recording cancelled."
    +      end
    +  
    +      def stop_recording file_name = nil
    +        if !file_name
    +          log <<-S
    +  * ERROR:
    +  To please specify a file name when calling:
    +  $recording.stop FILE_NAME
    +  
    +  If you do NOT want to save the recording, call:
    +  $recording.cancel
    +  S
    +          $console.set_command "$recording.stop 'replay.txt'"
    +          return
    +        end
    +  
    +        if !@is_recording
    +          log_info "You are not currently recording. Use start_recording(seed_number) to start recording."
    +          $console.set_command "$recording.start"
    +          return
    +        end
    +  
    +        if file_name
    +          text = "replay_version 2.0\n"
    +          text << "stopped_at #{@tick_count}\n"
    +          text << "seed #{@seed_number}\n"
    +          text << "recorded_at #{Time.now.to_s}\n"
    +          @input_history.each do |items|
    +            text << "#{items}\n"
    +          end
    +          @runtime.write_file file_name, text
    +          @runtime.write_file 'last_replay.txt', text
    +          log_info "The recording has been saved successfully at #{file_name}. You can use start_replay(\"#{file_name}\") to replay the recording."
    +        end
    +  
    +        $console.set_command "$replay.start '#{file_name}'"
    +        stop_recording_core
    +        @runtime.notify! "Recording saved to #{file_name}. To replay it: $replay.start \"#{file_name}\"."
    +        log_info "You can run the replay later on startup using: ./dragonruby mygame --replay #{@replay_file_name}"
    +        nil
    +      end
    +  
    +      def stop_recording_core
    +        @is_recording = false
    +        @input_history = nil
    +        @last_history = nil
    +        @runtime.__reset__
    +      end
    +  
    +      def start_replay file_name = nil
    +        if !file_name
    +          log <<-S
    +  * ERROR:
    +  Please provide a file name to $recording.start.
    +  S
    +          $console.set_command "$replay.start 'replay.txt'"
    +          return
    +        end
    +  
    +        text = @runtime.read_file file_name
    +        return false unless text
    +  
    +        if text.each_line.first.strip != "replay_version 2.0"
    +          raise "The replay file #{file_name} is not compatible with this version of DragonRuby Game Toolkit. Please recreate the replay (sorry)."
    +        end
    +  
    +        @replay_file_name = file_name
    +  
    +        $replay_data = { input_history: { } }
    +        text.each_line do |l|
    +          if l.strip.length == 0
    +            next
    +          elsif l.start_with? 'replay_version'
    +            next
    +          elsif l.start_with? 'seed'
    +            $replay_data[:seed] = l.split(' ').last.to_i
    +          elsif l.start_with? 'stopped_at'
    +            $replay_data[:stopped_at] = l.split(' ').last.to_i
    +          elsif l.start_with? 'recorded_at'
    +            $replay_data[:recorded_at] = l.split(' ')[1..-1].join(' ')
    +          elsif l.start_with? '['
    +            name, value_1, value_2, value_count, id, tick_count = l.strip.gsub('[', '').gsub(']', '').split(',')
    +            $replay_data[:input_history][tick_count.to_i] ||= []
    +            $replay_data[:input_history][tick_count.to_i] << {
    +              id: id.to_i,
    +              name: name.gsub(':', '').to_sym,
    +              value_1: value_1.to_f,
    +              value_2: value_2.to_f,
    +              value_count: value_count.to_i
    +            }
    +          else
    +            raise "Replay data seems corrupt. I don't know how to parse #{l}."
    +          end
    +        end
    +  
    +        $replay_data[:input_history].keys.each do |key|
    +          $replay_data[:input_history][key] = $replay_data[:input_history][key].sort_by {|input| input[:id]}
    +        end
    +  
    +        @runtime.__reset__
    +        @runtime.set_rng $replay_data[:seed]
    +        @tick_count = 0
    +        @is_replaying = true
    +        log_info "Replay has been started."
    +        @runtime.notify! "Replay started [#{@replay_file_name}]."
    +      end
    +  
    +      def stop_replay notification_message =  "Replay has been stopped."
    +        if !is_replaying?
    +          log <<-S
    +  * ERROR:
    +  No replay is currently running. Call $replay.start FILE_NAME to start a replay.
    +  S
    +  
    +          $console.set_command "$replay.start 'replay.txt'"
    +          return
    +        end
    +        log_info notification_message
    +        @is_replaying = false
    +        $replay_data = nil
    +        @tick_count = 0
    +        @global_input_order = 1
    +        $console.set_command_silent "$replay.start '#{@replay_file_name}'"
    +        @runtime.__reset__
    +        @runtime.notify! notification_message
    +      end
    +  
    +      def record_input_history name, value_1, value_2, value_count, clear_cache = false
    +        return if @is_replaying
    +        return unless @is_recording
    +        @input_history << [name, value_1, value_2, value_count, @global_input_order, @tick_count]
    +        @global_input_order += 1
    +      end
    +  
    +      def stage_replay_values
    +        return unless @is_replaying
    +        return unless $replay_data
    +  
    +        if $replay_data[:stopped_at] <= @tick_count
    +          stop_replay "Replay completed [#{@replay_file_name}]. To rerun, bring up the Console and press enter."
    +          return
    +        end
    +  
    +        inputs_this_tick = $replay_data[:input_history][@tick_count]
    +  
    +        if @tick_count.zmod? 60
    +          log_info "Replay ends in #{($replay_data[:stopped_at] - @tick_count).idiv 60} second(s)."
    +        end
    +  
    +        return unless inputs_this_tick
    +        inputs_this_tick.each do |v|
    +          args = []
    +          args << v[:value_1] if v[:value_count] >= 1
    +          args << v[:value_2] if v[:value_count] >= 2
    +          args << :replay
    +          $gtk.send v[:name], *args
    +        end
    +      end
    +    end
    +  end
    +
    +#+end_src
    +
     *** remote_hotload_client.rb
     #+begin_src ruby
       # ./dragon/remote_hotload_client.rb
    @@ -44940,14 +46266,13 @@ Follows is a source code listing for all files that have been open sourced. This
               log <<-S
       ** Invoking :#{name}...
       S
    -          time_start = Time.now
               idx = 0
               r = nil
    +          time_start = Time.now
               while idx < iterations
                 r = proc.call
                 idx += 1
               end
    -  
               result = (Time.now - time_start).round 3
       
               { name: name,
    @@ -45072,7 +46397,7 @@ Follows is a source code listing for all files that have been open sourced. This
               fn.each_send pass.borders,           self, :draw_border
               fn.each_send pass.static_borders,    self, :draw_border
       
    -          if !$gtk.production
    +          if !self.production
                 fn.each_send pass.debug,           self, :draw_primitive
                 fn.each_send pass.static_debug,    self, :draw_primitive
               end
    @@ -45089,6 +46414,7 @@ Follows is a source code listing for all files that have been open sourced. This
               if s.respond_to? :draw_override
                 s.draw_override @ffi_draw
               else
    +            s = s.as_hash if s.is_a? OpenEntity
                 @ffi_draw.draw_solid_2 s.x, s.y, s.w, s.h,
                                        s.r, s.g, s.b, s.a,
                                        (s.blendmode_enum || 1)
    @@ -45102,6 +46428,7 @@ Follows is a source code listing for all files that have been open sourced. This
               if s.respond_to? :draw_override
                 s.draw_override @ffi_draw
               else
    +            s = s.as_hash if s.is_a? OpenEntity
                 @ffi_draw.draw_sprite_4 s.x, s.y, s.w, s.h,
                                         (s.path || '').to_s,
                                         s.angle,
    @@ -45121,6 +46448,7 @@ Follows is a source code listing for all files that have been open sourced. This
               if s.respond_to? :draw_override
                 s.draw_override @ffi_draw
               else
    +            s = s.as_hash if s.is_a? OpenEntity
                 @ffi_draw.draw_screenshot (s.path || '').to_s,
                                           s.x, s.y, s.w, s.h,
                                           s.angle,
    @@ -45139,6 +46467,7 @@ Follows is a source code listing for all files that have been open sourced. This
               if l.respond_to? :draw_override
                 l.draw_override @ffi_draw
               else
    +            l = l.as_hash if l.is_a? OpenEntity
                 @ffi_draw.draw_label_3 l.x, l.y,
                                        (l.text || '').to_s,
                                        l.size_enum, l.alignment_enum,
    @@ -45156,6 +46485,7 @@ Follows is a source code listing for all files that have been open sourced. This
               if l.respond_to? :draw_override
                 l.draw_override @ffi_draw
               else
    +            l = l.as_hash if l.is_a? OpenEntity
                 if l.x2
                   @ffi_draw.draw_line_2 l.x, l.y, l.x2, l.y2,
                                         l.r, l.g, l.b, l.a,
    @@ -45181,6 +46511,7 @@ Follows is a source code listing for all files that have been open sourced. This
               if s.respond_to? :draw_override
                 s.draw_override @ffi_draw
               else
    +            s = s.as_hash if s.is_a? OpenEntity
                 @ffi_draw.draw_border_2 s.x, s.y, s.w, s.h,
                                         s.r, s.g, s.b, s.a,
                                         (s.blendmode_enum || 1)
    @@ -45248,13 +46579,8 @@ Follows is a source code listing for all files that have been open sourced. This
                   if @tick_speed_count > 60 * 2
                     if framerate_below_threshold?
                       @last_framerate = current_framerate
    -                  if !@console.visible?
    -                    if !@framerate_important_notification_happened
    -                      log_important framerate_warning_message
    -                    else
    -                      log framerate_warning_message
    -                    end
    -                    @framerate_important_notification_happened = true
    +                  if !@console.visible? && !@recording.is_replaying?
    +                    log framerate_warning_message
                       end
                     end
       
    @@ -46130,6 +47456,114 @@ Follows is a source code listing for all files that have been open sourced. This
     
     #+end_src
     
    +*** tweetcart.rb
    +#+begin_src ruby
    +  # ./dragon/tweetcart.rb
    +  # coding: utf-8
    +  # Copyright 2019 DragonRuby LLC
    +  # MIT License
    +  # tweetcart.rb has been released under MIT (*only this file*).
    +  
    +  def $top_level.TICK &block
    +    $top_level.define_method(:tick) do |args|
    +      args.outputs[:scene].w = 160
    +      args.outputs[:scene].h = 90
    +      args.outputs[:scene].background_color = [0, 0, 0, 0]
    +      block.call args
    +      args.outputs.sprites << { x: 0, y: 0, w: 1280, h: 720, path: :scene }
    +    end
    +  
    +    def $top_level.bg! *rgb
    +      r,g,b = rgb
    +      r ||= 255
    +      g ||= r
    +      b ||= g
    +      $args.outputs.background_color = [r, g, b]
    +    end
    +  
    +    def $top_level.slds
    +      $args.outputs[:scene].sprites
    +    end
    +  
    +    def $top_level.slds! *os
    +      if (os.first.is_a? Numeric)
    +        sld!(*os)
    +      else
    +        os.each { |o| sld!(*o) }
    +      end
    +    end
    +  
    +    def $top_level.sld! *params
    +      x, y, w, h, r, g, b, a = nil
    +      if params.length == 2
    +        x, y = params
    +      elsif params.length == 3 && (params.last.is_a? Array)
    +        x = params[0]
    +        y = params[1]
    +        r, g, b, a = params[2]
    +        r ||= 255
    +        g ||= r
    +        b ||= g
    +        a ||= 255
    +      elsif params.length == 4
    +        x, y, w, h = params
    +      elsif params.length == 5 && (params.last.is_a? Array)
    +        x = params[0]
    +        y = params[1]
    +        w = params[2]
    +        h = params[3]
    +        r,g,b,a = params[4]
    +        r ||= 255
    +        g ||= r
    +        b ||= g
    +        a ||= 255
    +      elsif params.length >= 7
    +        x, y, w, h, r, g, b = params
    +      else
    +        raise "I don't know how to render #{params} with reasonable defaults."
    +      end
    +  
    +      w ||= 1
    +      h ||= 1
    +      r ||= 255
    +      g ||= 255
    +      b ||= 255
    +      a ||= 255
    +  
    +      slds << { x: x, y: y,
    +                w: w, h: h,
    +                r: r, g: g, b: b, a: a,
    +                path: :pixel }
    +    end
    +  end
    +  
    +  =begin
    +  wht  = [255] * 3
    +  red  = [255, 0, 0]
    +  blu  = [0, 130, 255]
    +  purp = [150, 80, 255]
    +  
    +  TICK {
    +    bg! 0
    +  
    +    slds << [0, 0, 3, 3, 0, 255, 0, 255]
    +  
    +    sld!     10, 10
    +    sld!     20, 20, 3, 2
    +    sld!     30, 30, 2, 2, red
    +    sld!     35, 35, blu
    +  
    +    slds!    40, 40
    +  
    +    slds!   [50, 50],
    +            [60, 60, purp],
    +            [70, 70, 10, 10, wht],
    +            [80, 80, 4, 4, 255, 0, 255]
    +  }
    +  =end
    +
    +#+end_src
    +
     *** wizards.rb
     #+begin_src ruby
       # ./dragon/wizards.rb
    diff --git a/docs/parse_log.txt b/docs/parse_log.txt
    index 07e163d..047852d 100644
    --- a/docs/parse_log.txt
    +++ b/docs/parse_log.txt
    @@ -5269,11 +5269,18 @@ Shows the mouse cursor.
     *** True Line Result
     *** ~.hide_cursor~
     ** Processing line: ~Hides the mouse cursor.~
    -** Processing line: ~*** ~.cursor_shown?~~
    +** Processing line: ~*** ~.set_cursor path, dx, dy~~
     - Header detected.
     *** True Line Result
     Hides the mouse cursor.
     *** True Line Result
    +*** ~.set_cursor path, dx, dy~
    +** Processing line: ~Sets the system cursor to a sprite ~path~ with an offset of ~dx~ and ~dy~.~
    +** Processing line: ~*** ~.cursor_shown?~~
    +- Header detected.
    +*** True Line Result
    +Sets the system cursor to a sprite ~path~ with an offset of ~dx~ and ~dy~.
    +*** True Line Result
     *** ~.cursor_shown?~
     ** Processing line: ~Returns ~true~ if the mouse cursor is shown.~
     ** Processing line: ~*** ~.set_window_fullscreen enabled~~
    @@ -5407,6 +5414,119 @@ This function takes in two parameters. The first parameter is the file path and
     - End of paragraph detected.
     *** True Line Result
     
    +** Processing line: ~* DOCS: ~GTK::Runtime#benchmark~~
    +- Header detected.
    +*** True Line Result
    +
    +*** True Line Result
    +* DOCS: ~GTK::Runtime#benchmark~
    +** Processing line: ~You can use this function to compare the relative performance of methods.~
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +You can use this function to compare the relative performance of methods.
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  def tick args~
    +- Inside source: true
    +*** True Line Result
    +  def tick args
    +** Processing line: ~    # press r to run benchmark~
    +- Inside source: true
    +*** True Line Result
    +    # press r to run benchmark
    +** Processing line: ~    if args.inputs.keyboard.key_down.r~
    +- Inside source: true
    +*** True Line Result
    +    if args.inputs.keyboard.key_down.r
    +** Processing line: ~      args.gtk.console.show~
    +- Inside source: true
    +*** True Line Result
    +      args.gtk.console.show
    +** Processing line: ~      args.gtk.benchmark iterations: 1000, # number of iterations~
    +- Inside source: true
    +*** True Line Result
    +      args.gtk.benchmark iterations: 1000, # number of iterations
    +** Processing line: ~                         # label for experiment~
    +- Inside source: true
    +*** True Line Result
    +                         # label for experiment
    +** Processing line: ~                         using_numeric_map: -> () {~
    +- Inside source: true
    +*** True Line Result
    +                         using_numeric_map: -> () {
    +** Processing line: ~                           # experiment body~
    +- Inside source: true
    +*** True Line Result
    +                           # experiment body
    +** Processing line: ~                           v = 100.map do |i|~
    +- Inside source: true
    +*** True Line Result
    +                           v = 100.map do |i|
    +** Processing line: ~                             i * 100~
    +- Inside source: true
    +*** True Line Result
    +                             i * 100
    +** Processing line: ~                           end~
    +- Inside source: true
    +*** True Line Result
    +                           end
    +** Processing line: ~                         },~
    +- Inside source: true
    +*** True Line Result
    +                         },
    +** Processing line: ~                         # label for experiment~
    +- Inside source: true
    +*** True Line Result
    +                         # label for experiment
    +** Processing line: ~                         using_numeric_times: -> () {~
    +- Inside source: true
    +*** True Line Result
    +                         using_numeric_times: -> () {
    +** Processing line: ~                           # experiment body~
    +- Inside source: true
    +*** True Line Result
    +                           # experiment body
    +** Processing line: ~                           v = []~
    +- Inside source: true
    +*** True Line Result
    +                           v = []
    +** Processing line: ~                           100.times do |i|~
    +- Inside source: true
    +*** True Line Result
    +                           100.times do |i|
    +** Processing line: ~                             v << i * 100~
    +- Inside source: true
    +*** True Line Result
    +                             v << i * 100
    +** Processing line: ~                           end~
    +- Inside source: true
    +*** True Line Result
    +                           end
    +** Processing line: ~                         }~
    +- Inside source: true
    +*** True Line Result
    +                         }
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
    +*** True Line Result
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +
     ** Processing line: ~* DOCS: ~Array~~
     - Header detected.
     *** True Line Result
    @@ -15439,10 +15559,10 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
       # To see how many frames its been since the click occurred
    -** Processing line: ~  # Use args.inputs.mouse.click.creat_at_elapsed~
    +** Processing line: ~  # Use args.inputs.mouse.click.created_at_elapsed~
     - Inside source: true
     *** True Line Result
    -  # Use args.inputs.mouse.click.creat_at_elapsed
    +  # Use args.inputs.mouse.click.created_at_elapsed
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
    @@ -26059,18 +26179,18 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
         def calc_player_dx
    -** Processing line: ~      player.y  += player.dy~
    +** Processing line: ~      player.dx  = player.dx.clamp(-5,  5)~
     - Inside source: true
     *** True Line Result
    -      player.y  += player.dy
    -** Processing line: ~      player.dy += state.gravity~
    +      player.dx  = player.dx.clamp(-5,  5)
    +** Processing line: ~      player.dx *= 0.9~
     - Inside source: true
     *** True Line Result
    -      player.dy += state.gravity
    -** Processing line: ~      player.dy += player.dy * state.drag ** 2 * -1~
    +      player.dx *= 0.9
    +** Processing line: ~      player.x  += player.dx~
     - Inside source: true
     *** True Line Result
    -      player.dy += player.dy * state.drag ** 2 * -1
    +      player.x  += player.dx
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -26083,18 +26203,18 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
         def calc_player_dy
    -** Processing line: ~      player.dx  = player.dx.clamp(-5,  5)~
    +** Processing line: ~      player.y  += player.dy~
     - Inside source: true
     *** True Line Result
    -      player.dx  = player.dx.clamp(-5,  5)
    -** Processing line: ~      player.dx *= 0.9~
    +      player.y  += player.dy
    +** Processing line: ~      player.dy += state.gravity~
     - Inside source: true
     *** True Line Result
    -      player.dx *= 0.9
    -** Processing line: ~      player.x  += player.dx~
    +      player.dy += state.gravity
    +** Processing line: ~      player.dy += player.dy * state.drag ** 2 * -1~
     - Inside source: true
     *** True Line Result
    -      player.x  += player.dx
    +      player.dy += player.dy * state.drag ** 2 * -1
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -26679,14 +26799,10 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Sets default values~
    -- Inside source: true
    -*** True Line Result
    -    # Sets default values
    -** Processing line: ~    def defaults~
    +** Processing line: ~    def init_game~
     - Inside source: true
     *** True Line Result
    -    def defaults
    +    def init_game
     ** Processing line: ~      s.platforms ||= [ # initializes platforms collection with two platforms using hashes~
     - Inside source: true
     *** True Line Result
    @@ -26775,6 +26891,26 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    +** Processing line: ~    # Sets default values~
    +- Inside source: true
    +*** True Line Result
    +    # Sets default values
    +** Processing line: ~    def defaults~
    +- Inside source: true
    +*** True Line Result
    +    def defaults
    +** Processing line: ~      init_game~
    +- Inside source: true
    +*** True Line Result
    +      init_game
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
     ** Processing line: ~    # Outputs objects onto the screen~
     - Inside source: true
     *** True Line Result
    @@ -27123,10 +27259,18 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
           else
    +** Processing line: ~        # game over~
    +- Inside source: true
    +*** True Line Result
    +        # game over
     ** Processing line: ~        s.as_hash.clear # otherwise clear the hash (no new platform is necessary)~
     - Inside source: true
     *** True Line Result
             s.as_hash.clear # otherwise clear the hash (no new platform is necessary)
    +** Processing line: ~        init_game~
    +- Inside source: true
    +*** True Line Result
    +        init_game
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    @@ -38011,14 +38155,10 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
         def tick
    -** Processing line: ~      state.current_turn ||= :x~
    +** Processing line: ~      init_new_game~
     - Inside source: true
     *** True Line Result
    -      state.current_turn ||= :x
    -** Processing line: ~      state.space_combinations = [-1, 0, 1].product([-1, 0, 1]).to_a~
    -- Inside source: true
    -*** True Line Result
    -      state.space_combinations = [-1, 0, 1].product([-1, 0, 1]).to_a
    +      init_new_game
     ** Processing line: ~      render_board~
     - Inside source: true
     *** True Line Result
    @@ -38035,6 +38175,54 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    +** Processing line: ~    def init_new_game~
    +- Inside source: true
    +*** True Line Result
    +    def init_new_game
    +** Processing line: ~      state.current_turn       ||= :x~
    +- Inside source: true
    +*** True Line Result
    +      state.current_turn       ||= :x
    +** Processing line: ~      state.space_combinations ||= [-1, 0, 1].product([-1, 0, 1]).to_a~
    +- Inside source: true
    +*** True Line Result
    +      state.space_combinations ||= [-1, 0, 1].product([-1, 0, 1]).to_a
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      state.spaces             ||= {}~
    +- Inside source: true
    +*** True Line Result
    +      state.spaces             ||= {}
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      state.space_combinations.each do |x, y|~
    +- Inside source: true
    +*** True Line Result
    +      state.space_combinations.each do |x, y|
    +** Processing line: ~        state.spaces[x]    ||= {}~
    +- Inside source: true
    +*** True Line Result
    +        state.spaces[x]    ||= {}
    +** Processing line: ~        state.spaces[x][y] ||= state.new_entity(:space)~
    +- Inside source: true
    +*** True Line Result
    +        state.spaces[x][y] ||= state.new_entity(:space)
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
     ** Processing line: ~    # Uses borders to create grid squares for the game's board. Also outputs the game pieces using labels.~
     - Inside source: true
     *** True Line Result
    @@ -38335,6 +38523,10 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
           gtk.reset
    +** Processing line: ~      init_new_game~
    +- Inside source: true
    +*** True Line Result
    +      init_new_game
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -39603,10 +39795,10 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
           # Find all zombies that intersect with the player. They are considered killed.
    -** Processing line: ~      killed_this_frame = state.zombies.find_all { |z| z.sprite.intersect_rect? state.player_sprite }~
    +** Processing line: ~      killed_this_frame = state.zombies.find_all { |z| z.sprite && (z.sprite.intersect_rect? state.player_sprite) }~
     - Inside source: true
     *** True Line Result
    -      killed_this_frame = state.zombies.find_all { |z| z.sprite.intersect_rect? state.player_sprite }
    +      killed_this_frame = state.zombies.find_all { |z| z.sprite && (z.sprite.intersect_rect? state.player_sprite) }
     ** Processing line: ~      state.zombies = state.zombies - killed_this_frame # remove newly killed zombies from zombies collection~
     - Inside source: true
     *** True Line Result
    @@ -43235,6 +43427,10 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
       def playtime_str t
    +** Processing line: ~    return "" unless t~
    +- Inside source: true
    +*** True Line Result
    +    return "" unless t
     ** Processing line: ~    minutes = (t / 60.0).floor~
     - Inside source: true
     *** True Line Result
    @@ -43683,10 +43879,10 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
                                                     col:  2,
    -** Processing line: ~                                                percentage: audio_entry.playtime / audio_entry.length_,~
    +** Processing line: ~                                                percentage: (audio_entry.playtime || 1) / (audio_entry.length_ || 1),~
     - Inside source: true
     *** True Line Result
    -                                                percentage: audio_entry.playtime / audio_entry.length_,
    +                                                percentage: (audio_entry.playtime || 1) / (audio_entry.length_ || 1),
     ** Processing line: ~                                                text: "#{playtime_str(audio_entry.playtime)} / #{playtime_str(audio_entry.length_)}")~
     - Inside source: true
     *** True Line Result
    @@ -44231,10 +44427,10 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
           { name: :splash, path: "sounds/splash.wav" },
    -** Processing line: ~      { name: :drum,   path: "sounds/drum.wav"   },~
    +** Processing line: ~      { name: :drum,   path: "sounds/drum.mp3"   },~
     - Inside source: true
     *** True Line Result
    -      { name: :drum,   path: "sounds/drum.wav"   },
    +      { name: :drum,   path: "sounds/drum.mp3"   },
     ** Processing line: ~      { name: :spring, path: "sounds/spring.wav" },~
     - Inside source: true
     *** True Line Result
    @@ -44487,70 +44683,6 @@ Follows is a source code listing for all files that have been open sourced. This
     - End of paragraph detected.
     *** True Line Result
     
    -** Processing line: ~*** Advanced Audio - Audio Mixer - Metadata - ios_metadata.txt~
    -- Header detected.
    -*** True Line Result
    -
    -*** True Line Result
    -*** Advanced Audio - Audio Mixer - Metadata - ios_metadata.txt
    -** Processing line: ~#+begin_src ruby~
    -- Line was identified as the beginning of a code block.
    -*** True Line Result
    -
    -*** True Line Result
    -#+begin_src ruby
    -** Processing line: ~  # ./samples/07_advanced_audio/01_audio_mixer/metadata/ios_metadata.txt~
    -- Inside source: true
    -*** True Line Result
    -  # ./samples/07_advanced_audio/01_audio_mixer/metadata/ios_metadata.txt
    -** Processing line: ~  # ios_metadata.txt is used by the Pro version of DragonRuby Game Toolkit to create iOS apps.~
    -- Inside source: true
    -*** True Line Result
    -  # ios_metadata.txt is used by the Pro version of DragonRuby Game Toolkit to create iOS apps.
    -** Processing line: ~  # Information about the Pro version can be found at: http://dragonruby.org/toolkit/game#purchase~
    -- Inside source: true
    -*** True Line Result
    -  # Information about the Pro version can be found at: http://dragonruby.org/toolkit/game#purchase
    -** Processing line: ~~
    -- Inside source: true
    -*** True Line Result
    -
    -** Processing line: ~  # teamid needs to be set to your assigned Team Id which can be found at https://developer.apple.com/account/#/membership/~
    -- Inside source: true
    -*** True Line Result
    -  # teamid needs to be set to your assigned Team Id which can be found at https://developer.apple.com/account/#/membership/
    -** Processing line: ~  teamid=~
    -- Inside source: true
    -*** True Line Result
    -  teamid=
    -** Processing line: ~  # appid needs to be set to your application identifier which can be found at https://developer.apple.com/account/resources/identifiers/list~
    -- Inside source: true
    -*** True Line Result
    -  # appid needs to be set to your application identifier which can be found at https://developer.apple.com/account/resources/identifiers/list
    -** Processing line: ~  appid=~
    -- Inside source: true
    -*** True Line Result
    -  appid=
    -** Processing line: ~  # appname is the name you want to show up underneath the app icon on the device. Keep it under 10 characters.~
    -- Inside source: true
    -*** True Line Result
    -  # appname is the name you want to show up underneath the app icon on the device. Keep it under 10 characters.
    -** Processing line: ~  appname=~
    -- Inside source: true
    -*** True Line Result
    -  appname=
    -** Processing line: ~~
    -- Inside source: true
    -*** True Line Result
    -
    -** Processing line: ~#+end_src~
    -- Line was identified as the end of a code block.
    -*** True Line Result
    -#+end_src
    -** Processing line: ~~
    -- End of paragraph detected.
    -*** True Line Result
    -
     ** Processing line: ~*** Advanced Audio - Sound Synthesis - main.rb~
     - Header detected.
     *** True Line Result
    @@ -46951,6 +47083,542 @@ Follows is a source code listing for all files that have been open sourced. This
     - End of paragraph detected.
     *** True Line Result
     
    +** Processing line: ~*** Advanced Rendering - Labels With Wrapped Text - main.rb~
    +- Header detected.
    +*** True Line Result
    +
    +*** True Line Result
    +*** Advanced Rendering - Labels With Wrapped Text - main.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/07_advanced_rendering/00_labels_with_wrapped_text/app/main.rb~
    +- Inside source: true
    +*** True Line Result
    +  # ./samples/07_advanced_rendering/00_labels_with_wrapped_text/app/main.rb
    +** Processing line: ~  def tick args~
    +- Inside source: true
    +*** True Line Result
    +  def tick args
    +** Processing line: ~    # defaults~
    +- Inside source: true
    +*** True Line Result
    +    # defaults
    +** Processing line: ~    args.state.scroll_location  ||= 0~
    +- Inside source: true
    +*** True Line Result
    +    args.state.scroll_location  ||= 0
    +** Processing line: ~    args.state.textbox.messages ||= []~
    +- Inside source: true
    +*** True Line Result
    +    args.state.textbox.messages ||= []
    +** Processing line: ~    args.state.textbox.scroll   ||= 0~
    +- Inside source: true
    +*** True Line Result
    +    args.state.textbox.scroll   ||= 0
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    # render~
    +- Inside source: true
    +*** True Line Result
    +    # render
    +** Processing line: ~    args.outputs.background_color = [0, 0, 0, 255]~
    +- Inside source: true
    +*** True Line Result
    +    args.outputs.background_color = [0, 0, 0, 255]
    +** Processing line: ~    render_messages args~
    +- Inside source: true
    +*** True Line Result
    +    render_messages args
    +** Processing line: ~    render_instructions args~
    +- Inside source: true
    +*** True Line Result
    +    render_instructions args
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    # inputs~
    +- Inside source: true
    +*** True Line Result
    +    # inputs
    +** Processing line: ~    if args.inputs.keyboard.key_down.one~
    +- Inside source: true
    +*** True Line Result
    +    if args.inputs.keyboard.key_down.one
    +** Processing line: ~      queue_message args, "Hello there neighbour! my name is mark, how is your day today?"~
    +- Inside source: true
    +*** True Line Result
    +      queue_message args, "Hello there neighbour! my name is mark, how is your day today?"
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    if args.inputs.keyboard.key_down.two~
    +- Inside source: true
    +*** True Line Result
    +    if args.inputs.keyboard.key_down.two
    +** Processing line: ~      queue_message args, "I'm doing great sir, actually I'm having a picnic today"~
    +- Inside source: true
    +*** True Line Result
    +      queue_message args, "I'm doing great sir, actually I'm having a picnic today"
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    if args.inputs.keyboard.key_down.three~
    +- Inside source: true
    +*** True Line Result
    +    if args.inputs.keyboard.key_down.three
    +** Processing line: ~      queue_message args, "Well that sounds wonderful!"~
    +- Inside source: true
    +*** True Line Result
    +      queue_message args, "Well that sounds wonderful!"
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    if args.inputs.keyboard.key_down.home~
    +- Inside source: true
    +*** True Line Result
    +    if args.inputs.keyboard.key_down.home
    +** Processing line: ~      args.state.scroll_location = 1~
    +- Inside source: true
    +*** True Line Result
    +      args.state.scroll_location = 1
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    if args.inputs.keyboard.key_down.delete~
    +- Inside source: true
    +*** True Line Result
    +    if args.inputs.keyboard.key_down.delete
    +** Processing line: ~      clear_message_queue args~
    +- Inside source: true
    +*** True Line Result
    +      clear_message_queue args
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~  def queue_message args, msg~
    +- Inside source: true
    +*** True Line Result
    +  def queue_message args, msg
    +** Processing line: ~    args.state.textbox.messages.concat msg.wrapped_lines 50~
    +- Inside source: true
    +*** True Line Result
    +    args.state.textbox.messages.concat msg.wrapped_lines 50
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~  def clear_message_queue args~
    +- Inside source: true
    +*** True Line Result
    +  def clear_message_queue args
    +** Processing line: ~    args.state.textbox.messages = nil~
    +- Inside source: true
    +*** True Line Result
    +    args.state.textbox.messages = nil
    +** Processing line: ~    args.state.textbox.scroll = 0~
    +- Inside source: true
    +*** True Line Result
    +    args.state.textbox.scroll = 0
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~  def render_messages args~
    +- Inside source: true
    +*** True Line Result
    +  def render_messages args
    +** Processing line: ~    args.outputs[:textbox].w = 400~
    +- Inside source: true
    +*** True Line Result
    +    args.outputs[:textbox].w = 400
    +** Processing line: ~    args.outputs[:textbox].h = 720~
    +- Inside source: true
    +*** True Line Result
    +    args.outputs[:textbox].h = 720
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    args.outputs.primitives << args.state.textbox.messages.each_with_index.map do |s, idx|~
    +- Inside source: true
    +*** True Line Result
    +    args.outputs.primitives << args.state.textbox.messages.each_with_index.map do |s, idx|
    +** Processing line: ~      {~
    +- Inside source: true
    +*** True Line Result
    +      {
    +** Processing line: ~        x: 0,~
    +- Inside source: true
    +*** True Line Result
    +        x: 0,
    +** Processing line: ~        y: 20 * (args.state.textbox.messages.size - idx) + args.state.textbox.scroll * 20,~
    +- Inside source: true
    +*** True Line Result
    +        y: 20 * (args.state.textbox.messages.size - idx) + args.state.textbox.scroll * 20,
    +** Processing line: ~        text: s,~
    +- Inside source: true
    +*** True Line Result
    +        text: s,
    +** Processing line: ~        size_enum: -3,~
    +- Inside source: true
    +*** True Line Result
    +        size_enum: -3,
    +** Processing line: ~        alignment_enum: 0,~
    +- Inside source: true
    +*** True Line Result
    +        alignment_enum: 0,
    +** Processing line: ~        r: 255, g:255, b: 255, a: 255~
    +- Inside source: true
    +*** True Line Result
    +        r: 255, g:255, b: 255, a: 255
    +** Processing line: ~      }~
    +- Inside source: true
    +*** True Line Result
    +      }
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    args.outputs[:textbox].labels << args.state.textbox.messages.each_with_index.map do |s, idx|~
    +- Inside source: true
    +*** True Line Result
    +    args.outputs[:textbox].labels << args.state.textbox.messages.each_with_index.map do |s, idx|
    +** Processing line: ~      {~
    +- Inside source: true
    +*** True Line Result
    +      {
    +** Processing line: ~        x: 0,~
    +- Inside source: true
    +*** True Line Result
    +        x: 0,
    +** Processing line: ~        y: 20 * (args.state.textbox.messages.size - idx) + args.state.textbox.scroll * 20,~
    +- Inside source: true
    +*** True Line Result
    +        y: 20 * (args.state.textbox.messages.size - idx) + args.state.textbox.scroll * 20,
    +** Processing line: ~        text: s,~
    +- Inside source: true
    +*** True Line Result
    +        text: s,
    +** Processing line: ~        size_enum: -3,~
    +- Inside source: true
    +*** True Line Result
    +        size_enum: -3,
    +** Processing line: ~        alignment_enum: 0,~
    +- Inside source: true
    +*** True Line Result
    +        alignment_enum: 0,
    +** Processing line: ~        r: 255, g:255, b: 255, a: 255~
    +- Inside source: true
    +*** True Line Result
    +        r: 255, g:255, b: 255, a: 255
    +** Processing line: ~      }~
    +- Inside source: true
    +*** True Line Result
    +      }
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    args.outputs[:textbox].borders << [0, 0, args.outputs[:textbox].w, 720]~
    +- Inside source: true
    +*** True Line Result
    +    args.outputs[:textbox].borders << [0, 0, args.outputs[:textbox].w, 720]
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    args.state.textbox.scroll += args.inputs.mouse.wheel.y unless args.inputs.mouse.wheel.nil?~
    +- Inside source: true
    +*** True Line Result
    +    args.state.textbox.scroll += args.inputs.mouse.wheel.y unless args.inputs.mouse.wheel.nil?
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    if args.state.scroll_location > 0~
    +- Inside source: true
    +*** True Line Result
    +    if args.state.scroll_location > 0
    +** Processing line: ~      args.state.textbox.scroll = 0~
    +- Inside source: true
    +*** True Line Result
    +      args.state.textbox.scroll = 0
    +** Processing line: ~      args.state.scroll_location = 0~
    +- Inside source: true
    +*** True Line Result
    +      args.state.scroll_location = 0
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    args.outputs.sprites << [900, 0, args.outputs[:textbox].w, 720, :textbox]~
    +- Inside source: true
    +*** True Line Result
    +    args.outputs.sprites << [900, 0, args.outputs[:textbox].w, 720, :textbox]
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~  def render_instructions args~
    +- Inside source: true
    +*** True Line Result
    +  def render_instructions args
    +** Processing line: ~    args.outputs.labels << [30,~
    +- Inside source: true
    +*** True Line Result
    +    args.outputs.labels << [30,
    +** Processing line: ~                            30.from_top,~
    +- Inside source: true
    +*** True Line Result
    +                            30.from_top,
    +** Processing line: ~                            "press 1, 2, 3 to display messages, MOUSE WHEEL to scroll, HOME to go to top, BACKSPACE to delete.",~
    +- Inside source: true
    +*** True Line Result
    +                            "press 1, 2, 3 to display messages, MOUSE WHEEL to scroll, HOME to go to top, BACKSPACE to delete.",
    +** Processing line: ~                            0, 255, 255]~
    +- Inside source: true
    +*** True Line Result
    +                            0, 255, 255]
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    args.outputs.primitives << [0, 55.from_top, 1280, 30, :pixel, 0, 255, 0, 0, 0].sprite~
    +- Inside source: true
    +*** True Line Result
    +    args.outputs.primitives << [0, 55.from_top, 1280, 30, :pixel, 0, 255, 0, 0, 0].sprite
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
    +*** True Line Result
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +
    +** Processing line: ~*** Advanced Rendering - Rotating Label - main.rb~
    +- Header detected.
    +*** True Line Result
    +
    +*** True Line Result
    +*** Advanced Rendering - Rotating Label - main.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/07_advanced_rendering/00_rotating_label/app/main.rb~
    +- Inside source: true
    +*** True Line Result
    +  # ./samples/07_advanced_rendering/00_rotating_label/app/main.rb
    +** Processing line: ~  def tick args~
    +- Inside source: true
    +*** True Line Result
    +  def tick args
    +** Processing line: ~    # set the render target width and height to match the label~
    +- Inside source: true
    +*** True Line Result
    +    # set the render target width and height to match the label
    +** Processing line: ~    args.outputs[:scene].w = 220~
    +- Inside source: true
    +*** True Line Result
    +    args.outputs[:scene].w = 220
    +** Processing line: ~    args.outputs[:scene].h = 30~
    +- Inside source: true
    +*** True Line Result
    +    args.outputs[:scene].h = 30
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    # make the background transparent~
    +- Inside source: true
    +*** True Line Result
    +    # make the background transparent
    +** Processing line: ~    args.outputs[:scene].background_color = [255, 255, 255, 0]~
    +- Inside source: true
    +*** True Line Result
    +    args.outputs[:scene].background_color = [255, 255, 255, 0]
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    # set the blendmode of the label to 0 (no blending)~
    +- Inside source: true
    +*** True Line Result
    +    # set the blendmode of the label to 0 (no blending)
    +** Processing line: ~    # center it inside of the scene~
    +- Inside source: true
    +*** True Line Result
    +    # center it inside of the scene
    +** Processing line: ~    # set the vertical_alignment_enum to 1 (center)~
    +- Inside source: true
    +*** True Line Result
    +    # set the vertical_alignment_enum to 1 (center)
    +** Processing line: ~    args.outputs[:scene].labels  << { x: 0,~
    +- Inside source: true
    +*** True Line Result
    +    args.outputs[:scene].labels  << { x: 0,
    +** Processing line: ~                                      y: 15,~
    +- Inside source: true
    +*** True Line Result
    +                                      y: 15,
    +** Processing line: ~                                      text: "label in render target",~
    +- Inside source: true
    +*** True Line Result
    +                                      text: "label in render target",
    +** Processing line: ~                                      blendmode_enum: 0,~
    +- Inside source: true
    +*** True Line Result
    +                                      blendmode_enum: 0,
    +** Processing line: ~                                      vertical_alignment_enum: 1 }~
    +- Inside source: true
    +*** True Line Result
    +                                      vertical_alignment_enum: 1 }
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    # add a border to the render target~
    +- Inside source: true
    +*** True Line Result
    +    # add a border to the render target
    +** Processing line: ~    args.outputs[:scene].borders << { x: 0,~
    +- Inside source: true
    +*** True Line Result
    +    args.outputs[:scene].borders << { x: 0,
    +** Processing line: ~                                      y: 0,~
    +- Inside source: true
    +*** True Line Result
    +                                      y: 0,
    +** Processing line: ~                                      w: args.outputs[:scene].w,~
    +- Inside source: true
    +*** True Line Result
    +                                      w: args.outputs[:scene].w,
    +** Processing line: ~                                      h: args.outputs[:scene].h }~
    +- Inside source: true
    +*** True Line Result
    +                                      h: args.outputs[:scene].h }
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    # add the rendertarget to the main output as a sprite~
    +- Inside source: true
    +*** True Line Result
    +    # add the rendertarget to the main output as a sprite
    +** Processing line: ~    args.outputs.sprites << { x: 640 - args.outputs[:scene].w.half,~
    +- Inside source: true
    +*** True Line Result
    +    args.outputs.sprites << { x: 640 - args.outputs[:scene].w.half,
    +** Processing line: ~                              y: 360 - args.outputs[:scene].h.half,~
    +- Inside source: true
    +*** True Line Result
    +                              y: 360 - args.outputs[:scene].h.half,
    +** Processing line: ~                              w: args.outputs[:scene].w,~
    +- Inside source: true
    +*** True Line Result
    +                              w: args.outputs[:scene].w,
    +** Processing line: ~                              h: args.outputs[:scene].h,~
    +- Inside source: true
    +*** True Line Result
    +                              h: args.outputs[:scene].h,
    +** Processing line: ~                              angle: args.state.tick_count,~
    +- Inside source: true
    +*** True Line Result
    +                              angle: args.state.tick_count,
    +** Processing line: ~                              path: :scene }~
    +- Inside source: true
    +*** True Line Result
    +                              path: :scene }
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
    +*** True Line Result
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +
     ** Processing line: ~*** Advanced Rendering - Simple Render Targets - main.rb~
     - Header detected.
     *** True Line Result
    @@ -51995,6 +52663,10 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
     ** Processing line: ~    def new_room~
     - Inside source: true
     *** True Line Result
    @@ -56503,42 +57175,102 @@ Follows is a source code listing for all files that have been open sourced. This
     - End of paragraph detected.
     *** True Line Result
     
    -** Processing line: ~*** Performance - Sprites As Strict Entities - main.rb~
    +** Processing line: ~*** Performance - Sprites As Struct - main.rb~
     - Header detected.
     *** True Line Result
     
     *** True Line Result
    -*** Performance - Sprites As Strict Entities - main.rb
    +*** Performance - Sprites As Struct - main.rb
     ** Processing line: ~#+begin_src ruby~
     - Line was identified as the beginning of a code block.
     *** True Line Result
     
     *** True Line Result
     #+begin_src ruby
    -** Processing line: ~  # ./samples/09_performance/03_sprites_as_strict_entities/app/main.rb~
    +** Processing line: ~  # ./samples/09_performance/03_sprites_as_struct/app/main.rb~
     - Inside source: true
     *** True Line Result
    -  # ./samples/09_performance/03_sprites_as_strict_entities/app/main.rb
    -** Processing line: ~  # Sprites represented as StrictEntities using the queue ~args.outputs.sprites~~
    +  # ./samples/09_performance/03_sprites_as_struct/app/main.rb
    +** Processing line: ~  # create a Struct variant that allows for named parameters on construction.~
     - Inside source: true
     *** True Line Result
    -  # Sprites represented as StrictEntities using the queue ~args.outputs.sprites~
    -** Processing line: ~  # yields apis access similar to Entities, but all properties that can be set on the~
    +  # create a Struct variant that allows for named parameters on construction.
    +** Processing line: ~  class NamedStruct < Struct~
     - Inside source: true
     *** True Line Result
    -  # yields apis access similar to Entities, but all properties that can be set on the
    -** Processing line: ~  # entity must be predefined with a default value. Strict entities do not support the~
    +  class NamedStruct < Struct
    +** Processing line: ~    def initialize **opts~
     - Inside source: true
     *** True Line Result
    -  # entity must be predefined with a default value. Strict entities do not support the
    -** Processing line: ~  # addition of new properties after the fact. They are more performant than OpenEntities~
    +    def initialize **opts
    +** Processing line: ~      super(*members.map { |k| opts[k] })~
     - Inside source: true
     *** True Line Result
    -  # addition of new properties after the fact. They are more performant than OpenEntities
    -** Processing line: ~  # because of this constraint.~
    +      super(*members.map { |k| opts[k] })
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  # because of this constraint.
    +    end
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~  # create a Star NamedStruct~
    +- Inside source: true
    +*** True Line Result
    +  # create a Star NamedStruct
    +** Processing line: ~  Star = NamedStruct.new(:x, :y, :w, :h, :path, :s,~
    +- Inside source: true
    +*** True Line Result
    +  Star = NamedStruct.new(:x, :y, :w, :h, :path, :s,
    +** Processing line: ~                         :angle, :angle_anchor_x, :angle_anchor_y,~
    +- Inside source: true
    +*** True Line Result
    +                         :angle, :angle_anchor_x, :angle_anchor_y,
    +** Processing line: ~                         :r, :g, :b, :a,~
    +- Inside source: true
    +*** True Line Result
    +                         :r, :g, :b, :a,
    +** Processing line: ~                         :tile_x, :tile_y,~
    +- Inside source: true
    +*** True Line Result
    +                         :tile_x, :tile_y,
    +** Processing line: ~                         :tile_w, :tile_h,~
    +- Inside source: true
    +*** True Line Result
    +                         :tile_w, :tile_h,
    +** Processing line: ~                         :source_x, :source_y,~
    +- Inside source: true
    +*** True Line Result
    +                         :source_x, :source_y,
    +** Processing line: ~                         :source_w, :source_h,~
    +- Inside source: true
    +*** True Line Result
    +                         :source_w, :source_h,
    +** Processing line: ~                         :flip_horizontally, :flip_vertically,~
    +- Inside source: true
    +*** True Line Result
    +                         :flip_horizontally, :flip_vertically,
    +** Processing line: ~                         :blendmode_enum)~
    +- Inside source: true
    +*** True Line Result
    +                         :blendmode_enum)
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~  # Sprites represented as Structs. They require a little bit more code than Hashes,~
    +- Inside source: true
    +*** True Line Result
    +  # Sprites represented as Structs. They require a little bit more code than Hashes,
    +** Processing line: ~  # but are the a little faster to render too.~
    +- Inside source: true
    +*** True Line Result
    +  # but are the a little faster to render too.
     ** Processing line: ~  def random_x args~
     - Inside source: true
     *** True Line Result
    @@ -56591,46 +57323,26 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
       def new_star args
    -** Processing line: ~    args.state.new_entity_strict(:star,~
    +** Processing line: ~    Star.new x: (random_x args),~
     - Inside source: true
     *** True Line Result
    -    args.state.new_entity_strict(:star,
    -** Processing line: ~                                 x: (random_x args),~
    +    Star.new x: (random_x args),
    +** Processing line: ~             y: (random_y args),~
     - Inside source: true
     *** True Line Result
    -                                 x: (random_x args),
    -** Processing line: ~                                 y: (random_y args),~
    +             y: (random_y args),
    +** Processing line: ~             w: 4, h: 4,~
     - Inside source: true
     *** True Line Result
    -                                 y: (random_y args),
    -** Processing line: ~                                 w: 4, h: 4,~
    +             w: 4, h: 4,
    +** Processing line: ~             path: 'sprites/tiny-star.png',~
     - Inside source: true
     *** True Line Result
    -                                 w: 4, h: 4,
    -** Processing line: ~                                 path: 'sprites/tiny-star.png',~
    +             path: 'sprites/tiny-star.png',
    +** Processing line: ~             s: random_speed~
     - Inside source: true
     *** True Line Result
    -                                 path: 'sprites/tiny-star.png',
    -** Processing line: ~                                 s: random_speed) do |entity|~
    -- Inside source: true
    -*** True Line Result
    -                                 s: random_speed) do |entity|
    -** Processing line: ~      # invoke attr_sprite so that it responds to~
    -- Inside source: true
    -*** True Line Result
    -      # invoke attr_sprite so that it responds to
    -** Processing line: ~      # all properties that are required to render a sprite~
    -- Inside source: true
    -*** True Line Result
    -      # all properties that are required to render a sprite
    -** Processing line: ~      entity.attr_sprite~
    -- Inside source: true
    -*** True Line Result
    -      entity.attr_sprite
    -** Processing line: ~    end~
    -- Inside source: true
    -*** True Line Result
    -    end
    +             s: random_speed
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -56643,14 +57355,14 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
       def move_star args, star
    -** Processing line: ~    star.x += star.s~
    +** Processing line: ~    star.x += star[:s]~
     - Inside source: true
     *** True Line Result
    -    star.x += star.s
    -** Processing line: ~    star.y += star.s~
    +    star.x += star[:s]
    +** Processing line: ~    star.y += star[:s]~
     - Inside source: true
     *** True Line Result
    -    star.y += star.s
    +    star.y += star[:s]
     ** Processing line: ~    if star.x > args.grid.w || star.y > args.grid.h~
     - Inside source: true
     *** True Line Result
    @@ -56663,10 +57375,10 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
           star.y = (random_y args)
    -** Processing line: ~      star.s = random_speed~
    +** Processing line: ~      star[:s] = random_speed~
     - Inside source: true
     *** True Line Result
    -      star.s = random_speed
    +      star[:s] = random_speed
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -56711,10 +57423,10 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
           puts "========================================================="
    -** Processing line: ~      puts "* INFO: Sprites, Strict Entities"~
    +** Processing line: ~      puts "* INFO: Sprites, Structs"~
     - Inside source: true
     *** True Line Result
    -      puts "* INFO: Sprites, Strict Entities"
    +      puts "* INFO: Sprites, Structs"
     ** Processing line: ~      puts "* INFO: Please specify the number of sprites to render."~
     - Inside source: true
     *** True Line Result
    @@ -56819,106 +57531,170 @@ Follows is a source code listing for all files that have been open sourced. This
     - End of paragraph detected.
     *** True Line Result
     
    -** Processing line: ~*** Performance - Sprites As Classes - main.rb~
    +** Processing line: ~*** Performance - Sprites As Strict Entities - main.rb~
     - Header detected.
     *** True Line Result
     
     *** True Line Result
    -*** Performance - Sprites As Classes - main.rb
    +*** Performance - Sprites As Strict Entities - main.rb
     ** Processing line: ~#+begin_src ruby~
     - Line was identified as the beginning of a code block.
     *** True Line Result
     
     *** True Line Result
     #+begin_src ruby
    -** Processing line: ~  # ./samples/09_performance/04_sprites_as_classes/app/main.rb~
    +** Processing line: ~  # ./samples/09_performance/04_sprites_as_strict_entities/app/main.rb~
     - Inside source: true
     *** True Line Result
    -  # ./samples/09_performance/04_sprites_as_classes/app/main.rb
    -** Processing line: ~  # Sprites represented as Classes using the queue ~args.outputs.sprites~.~
    +  # ./samples/09_performance/04_sprites_as_strict_entities/app/main.rb
    +** Processing line: ~  # Sprites represented as StrictEntities using the queue ~args.outputs.sprites~~
     - Inside source: true
     *** True Line Result
    -  # Sprites represented as Classes using the queue ~args.outputs.sprites~.
    -** Processing line: ~  # gives you full control of property declaration and method invocation.~
    +  # Sprites represented as StrictEntities using the queue ~args.outputs.sprites~
    +** Processing line: ~  # yields apis access similar to Entities, but all properties that can be set on the~
     - Inside source: true
     *** True Line Result
    -  # gives you full control of property declaration and method invocation.
    -** Processing line: ~  # They are more performant than OpenEntities and StrictEntities, but more code upfront.~
    +  # yields apis access similar to Entities, but all properties that can be set on the
    +** Processing line: ~  # entity must be predefined with a default value. Strict entities do not support the~
     - Inside source: true
     *** True Line Result
    -  # They are more performant than OpenEntities and StrictEntities, but more code upfront.
    -** Processing line: ~  class Star~
    +  # entity must be predefined with a default value. Strict entities do not support the
    +** Processing line: ~  # addition of new properties after the fact. They are more performant than OpenEntities~
     - Inside source: true
     *** True Line Result
    -  class Star
    -** Processing line: ~    attr_sprite~
    +  # addition of new properties after the fact. They are more performant than OpenEntities
    +** Processing line: ~  # because of this constraint.~
     - Inside source: true
     *** True Line Result
    -    attr_sprite
    +  # because of this constraint.
    +** Processing line: ~  def random_x args~
    +- Inside source: true
    +*** True Line Result
    +  def random_x args
    +** Processing line: ~    (args.grid.w.randomize :ratio) * -1~
    +- Inside source: true
    +*** True Line Result
    +    (args.grid.w.randomize :ratio) * -1
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def initialize grid~
    +** Processing line: ~  def random_y args~
     - Inside source: true
     *** True Line Result
    -    def initialize grid
    -** Processing line: ~      @grid = grid~
    +  def random_y args
    +** Processing line: ~    (args.grid.h.randomize :ratio) * -1~
     - Inside source: true
     *** True Line Result
    -      @grid = grid
    -** Processing line: ~      @x = (rand @grid.w) * -1~
    +    (args.grid.h.randomize :ratio) * -1
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -      @x = (rand @grid.w) * -1
    -** Processing line: ~      @y = (rand @grid.h) * -1~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      @y = (rand @grid.h) * -1
    -** Processing line: ~      @w    = 4~
    +
    +** Processing line: ~  def random_speed~
     - Inside source: true
     *** True Line Result
    -      @w    = 4
    -** Processing line: ~      @h    = 4~
    +  def random_speed
    +** Processing line: ~    1 + (4.randomize :ratio)~
     - Inside source: true
     *** True Line Result
    -      @h    = 4
    -** Processing line: ~      @s    = 1 + (4.randomize :ratio)~
    +    1 + (4.randomize :ratio)
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -      @s    = 1 + (4.randomize :ratio)
    -** Processing line: ~      @path = 'sprites/tiny-star.png'~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      @path = 'sprites/tiny-star.png'
    +
    +** Processing line: ~  def new_star args~
    +- Inside source: true
    +*** True Line Result
    +  def new_star args
    +** Processing line: ~    args.state.new_entity_strict(:star,~
    +- Inside source: true
    +*** True Line Result
    +    args.state.new_entity_strict(:star,
    +** Processing line: ~                                 x: (random_x args),~
    +- Inside source: true
    +*** True Line Result
    +                                 x: (random_x args),
    +** Processing line: ~                                 y: (random_y args),~
    +- Inside source: true
    +*** True Line Result
    +                                 y: (random_y args),
    +** Processing line: ~                                 w: 4, h: 4,~
    +- Inside source: true
    +*** True Line Result
    +                                 w: 4, h: 4,
    +** Processing line: ~                                 path: 'sprites/tiny-star.png',~
    +- Inside source: true
    +*** True Line Result
    +                                 path: 'sprites/tiny-star.png',
    +** Processing line: ~                                 s: random_speed) do |entity|~
    +- Inside source: true
    +*** True Line Result
    +                                 s: random_speed) do |entity|
    +** Processing line: ~      # invoke attr_sprite so that it responds to~
    +- Inside source: true
    +*** True Line Result
    +      # invoke attr_sprite so that it responds to
    +** Processing line: ~      # all properties that are required to render a sprite~
    +- Inside source: true
    +*** True Line Result
    +      # all properties that are required to render a sprite
    +** Processing line: ~      entity.attr_sprite~
    +- Inside source: true
    +*** True Line Result
    +      entity.attr_sprite
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
         end
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def move~
    +** Processing line: ~  def move_star args, star~
     - Inside source: true
     *** True Line Result
    -    def move
    -** Processing line: ~      @x += @s~
    +  def move_star args, star
    +** Processing line: ~    star.x += star.s~
     - Inside source: true
     *** True Line Result
    -      @x += @s
    -** Processing line: ~      @y += @s~
    +    star.x += star.s
    +** Processing line: ~    star.y += star.s~
     - Inside source: true
     *** True Line Result
    -      @y += @s
    -** Processing line: ~      @x = (rand @grid.w) * -1 if @x > @grid.right~
    +    star.y += star.s
    +** Processing line: ~    if star.x > args.grid.w || star.y > args.grid.h~
     - Inside source: true
     *** True Line Result
    -      @x = (rand @grid.w) * -1 if @x > @grid.right
    -** Processing line: ~      @y = (rand @grid.h) * -1 if @y > @grid.top~
    +    if star.x > args.grid.w || star.y > args.grid.h
    +** Processing line: ~      star.x = (random_x args)~
     - Inside source: true
     *** True Line Result
    -      @y = (rand @grid.h) * -1 if @y > @grid.top
    +      star.x = (random_x args)
    +** Processing line: ~      star.y = (random_y args)~
    +- Inside source: true
    +*** True Line Result
    +      star.y = (random_y args)
    +** Processing line: ~      star.s = random_speed~
    +- Inside source: true
    +*** True Line Result
    +      star.s = random_speed
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -56931,14 +57707,18 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # calls methods needed for game to run properly~
    -- Inside source: true
    -*** True Line Result
    -  # calls methods needed for game to run properly
     ** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
       def tick args
    +** Processing line: ~    args.state.star_count ||= 0~
    +- Inside source: true
    +*** True Line Result
    +    args.state.star_count ||= 0
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
     ** Processing line: ~    # sets console command when sample app initially opens~
     - Inside source: true
     *** True Line Result
    @@ -56959,10 +57739,10 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
           puts "========================================================="
    -** Processing line: ~      puts "* INFO: Sprites, Classes"~
    +** Processing line: ~      puts "* INFO: Sprites, Strict Entities"~
     - Inside source: true
     *** True Line Result
    -      puts "* INFO: Sprites, Classes"
    +      puts "* INFO: Sprites, Strict Entities"
     ** Processing line: ~      puts "* INFO: Please specify the number of sprites to render."~
     - Inside source: true
     *** True Line Result
    @@ -56987,10 +57767,10 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
         if args.state.tick_count == 0
    -** Processing line: ~      args.state.stars = args.state.star_count.map { |i| Star.new args.grid }~
    +** Processing line: ~      args.state.stars = args.state.star_count.map { |i| new_star args }~
     - Inside source: true
     *** True Line Result
    -      args.state.stars = args.state.star_count.map { |i| Star.new args.grid }
    +      args.state.stars = args.state.star_count.map { |i| new_star args }
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -57003,10 +57783,258 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
         # update
    -** Processing line: ~    args.state.stars.each(&:move)~
    +** Processing line: ~    args.state.stars.each { |s| move_star args, s }~
     - Inside source: true
     *** True Line Result
    -    args.state.stars.each(&:move)
    +    args.state.stars.each { |s| move_star args, s }
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    # render~
    +- Inside source: true
    +*** True Line Result
    +    # render
    +** Processing line: ~    args.outputs.sprites << args.state.stars~
    +- Inside source: true
    +*** True Line Result
    +    args.outputs.sprites << args.state.stars
    +** Processing line: ~    args.outputs.background_color = [0, 0, 0]~
    +- Inside source: true
    +*** True Line Result
    +    args.outputs.background_color = [0, 0, 0]
    +** Processing line: ~    args.outputs.primitives << args.gtk.current_framerate_primitives~
    +- Inside source: true
    +*** True Line Result
    +    args.outputs.primitives << args.gtk.current_framerate_primitives
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~  # resets game, and assigns star count given by user~
    +- Inside source: true
    +*** True Line Result
    +  # resets game, and assigns star count given by user
    +** Processing line: ~  def reset_with count: count~
    +- Inside source: true
    +*** True Line Result
    +  def reset_with count: count
    +** Processing line: ~    $gtk.reset~
    +- Inside source: true
    +*** True Line Result
    +    $gtk.reset
    +** Processing line: ~    $gtk.args.state.star_count = count~
    +- Inside source: true
    +*** True Line Result
    +    $gtk.args.state.star_count = count
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
    +*** True Line Result
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +
    +** Processing line: ~*** Performance - Sprites As Classes - main.rb~
    +- Header detected.
    +*** True Line Result
    +
    +*** True Line Result
    +*** Performance - Sprites As Classes - main.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/09_performance/05_sprites_as_classes/app/main.rb~
    +- Inside source: true
    +*** True Line Result
    +  # ./samples/09_performance/05_sprites_as_classes/app/main.rb
    +** Processing line: ~  # Sprites represented as Classes using the queue ~args.outputs.sprites~.~
    +- Inside source: true
    +*** True Line Result
    +  # Sprites represented as Classes using the queue ~args.outputs.sprites~.
    +** Processing line: ~  # gives you full control of property declaration and method invocation.~
    +- Inside source: true
    +*** True Line Result
    +  # gives you full control of property declaration and method invocation.
    +** Processing line: ~  # They are more performant than OpenEntities and StrictEntities, but more code upfront.~
    +- Inside source: true
    +*** True Line Result
    +  # They are more performant than OpenEntities and StrictEntities, but more code upfront.
    +** Processing line: ~  class Star~
    +- Inside source: true
    +*** True Line Result
    +  class Star
    +** Processing line: ~    attr_sprite~
    +- Inside source: true
    +*** True Line Result
    +    attr_sprite
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    def initialize grid~
    +- Inside source: true
    +*** True Line Result
    +    def initialize grid
    +** Processing line: ~      @grid = grid~
    +- Inside source: true
    +*** True Line Result
    +      @grid = grid
    +** Processing line: ~      @x = (rand @grid.w) * -1~
    +- Inside source: true
    +*** True Line Result
    +      @x = (rand @grid.w) * -1
    +** Processing line: ~      @y = (rand @grid.h) * -1~
    +- Inside source: true
    +*** True Line Result
    +      @y = (rand @grid.h) * -1
    +** Processing line: ~      @w    = 4~
    +- Inside source: true
    +*** True Line Result
    +      @w    = 4
    +** Processing line: ~      @h    = 4~
    +- Inside source: true
    +*** True Line Result
    +      @h    = 4
    +** Processing line: ~      @s    = 1 + (4.randomize :ratio)~
    +- Inside source: true
    +*** True Line Result
    +      @s    = 1 + (4.randomize :ratio)
    +** Processing line: ~      @path = 'sprites/tiny-star.png'~
    +- Inside source: true
    +*** True Line Result
    +      @path = 'sprites/tiny-star.png'
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    def move~
    +- Inside source: true
    +*** True Line Result
    +    def move
    +** Processing line: ~      @x += @s~
    +- Inside source: true
    +*** True Line Result
    +      @x += @s
    +** Processing line: ~      @y += @s~
    +- Inside source: true
    +*** True Line Result
    +      @y += @s
    +** Processing line: ~      @x = (rand @grid.w) * -1 if @x > @grid.right~
    +- Inside source: true
    +*** True Line Result
    +      @x = (rand @grid.w) * -1 if @x > @grid.right
    +** Processing line: ~      @y = (rand @grid.h) * -1 if @y > @grid.top~
    +- Inside source: true
    +*** True Line Result
    +      @y = (rand @grid.h) * -1 if @y > @grid.top
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~  # calls methods needed for game to run properly~
    +- Inside source: true
    +*** True Line Result
    +  # calls methods needed for game to run properly
    +** Processing line: ~  def tick args~
    +- Inside source: true
    +*** True Line Result
    +  def tick args
    +** Processing line: ~    # sets console command when sample app initially opens~
    +- Inside source: true
    +*** True Line Result
    +    # sets console command when sample app initially opens
    +** Processing line: ~    if Kernel.global_tick_count == 0~
    +- Inside source: true
    +*** True Line Result
    +    if Kernel.global_tick_count == 0
    +** Processing line: ~      puts ""~
    +- Inside source: true
    +*** True Line Result
    +      puts ""
    +** Processing line: ~      puts ""~
    +- Inside source: true
    +*** True Line Result
    +      puts ""
    +** Processing line: ~      puts "========================================================="~
    +- Inside source: true
    +*** True Line Result
    +      puts "========================================================="
    +** Processing line: ~      puts "* INFO: Sprites, Classes"~
    +- Inside source: true
    +*** True Line Result
    +      puts "* INFO: Sprites, Classes"
    +** Processing line: ~      puts "* INFO: Please specify the number of sprites to render."~
    +- Inside source: true
    +*** True Line Result
    +      puts "* INFO: Please specify the number of sprites to render."
    +** Processing line: ~      args.gtk.console.set_command "reset_with count: 100"~
    +- Inside source: true
    +*** True Line Result
    +      args.gtk.console.set_command "reset_with count: 100"
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    # init~
    +- Inside source: true
    +*** True Line Result
    +    # init
    +** Processing line: ~    if args.state.tick_count == 0~
    +- Inside source: true
    +*** True Line Result
    +    if args.state.tick_count == 0
    +** Processing line: ~      args.state.stars = args.state.star_count.map { |i| Star.new args.grid }~
    +- Inside source: true
    +*** True Line Result
    +      args.state.stars = args.state.star_count.map { |i| Star.new args.grid }
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    # update~
    +- Inside source: true
    +*** True Line Result
    +    # update
    +** Processing line: ~    args.state.stars.each(&:move)~
    +- Inside source: true
    +*** True Line Result
    +    args.state.stars.each(&:move)
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
    @@ -57079,10 +58107,10 @@ Follows is a source code listing for all files that have been open sourced. This
     
     *** True Line Result
     #+begin_src ruby
    -** Processing line: ~  # ./samples/09_performance/05_static_sprites_as_classes/app/main.rb~
    +** Processing line: ~  # ./samples/09_performance/06_static_sprites_as_classes/app/main.rb~
     - Inside source: true
     *** True Line Result
    -  # ./samples/09_performance/05_static_sprites_as_classes/app/main.rb
    +  # ./samples/09_performance/06_static_sprites_as_classes/app/main.rb
     ** Processing line: ~  # Sprites represented as Classes using the queue ~args.outputs.static_sprites~.~
     - Inside source: true
     *** True Line Result
    @@ -57331,10 +58359,10 @@ Follows is a source code listing for all files that have been open sourced. This
     
     *** True Line Result
     #+begin_src ruby
    -** Processing line: ~  # ./samples/09_performance/06_static_sprites_as_classes_with_custom_drawing/app/main.rb~
    +** Processing line: ~  # ./samples/09_performance/07_static_sprites_as_classes_with_custom_drawing/app/main.rb~
     - Inside source: true
     *** True Line Result
    -  # ./samples/09_performance/06_static_sprites_as_classes_with_custom_drawing/app/main.rb
    +  # ./samples/09_performance/07_static_sprites_as_classes_with_custom_drawing/app/main.rb
     ** Processing line: ~  # Sprites represented as Classes, with a draw_override method, and using the queue ~args.outputs.static_sprites~.~
     - Inside source: true
     *** True Line Result
    @@ -57711,10 +58739,10 @@ Follows is a source code listing for all files that have been open sourced. This
     
     *** True Line Result
     #+begin_src ruby
    -** Processing line: ~  # ./samples/09_performance/07_collision_limits/app/main.rb~
    +** Processing line: ~  # ./samples/09_performance/08_collision_limits/app/main.rb~
     - Inside source: true
     *** True Line Result
    -  # ./samples/09_performance/07_collision_limits/app/main.rb
    +  # ./samples/09_performance/08_collision_limits/app/main.rb
     ** Processing line: ~  =begin~
     - Inside source: true
     *** True Line Result
    @@ -57947,6 +58975,110 @@ Follows is a source code listing for all files that have been open sourced. This
     - End of paragraph detected.
     *** True Line Result
     
    +** Processing line: ~*** Advanced Debugging - Logging - main.rb~
    +- Header detected.
    +*** True Line Result
    +
    +*** True Line Result
    +*** Advanced Debugging - Logging - main.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/10_advanced_debugging/00_logging/app/main.rb~
    +- Inside source: true
    +*** True Line Result
    +  # ./samples/10_advanced_debugging/00_logging/app/main.rb
    +** Processing line: ~  def tick args~
    +- Inside source: true
    +*** True Line Result
    +  def tick args
    +** Processing line: ~    args.outputs.background_color = [255, 255, 255, 0]~
    +- Inside source: true
    +*** True Line Result
    +    args.outputs.background_color = [255, 255, 255, 0]
    +** Processing line: ~    if args.state.tick_count == 0~
    +- Inside source: true
    +*** True Line Result
    +    if args.state.tick_count == 0
    +** Processing line: ~      args.gtk.log_spam "log level spam"~
    +- Inside source: true
    +*** True Line Result
    +      args.gtk.log_spam "log level spam"
    +** Processing line: ~      args.gtk.log_debug "log level debug"~
    +- Inside source: true
    +*** True Line Result
    +      args.gtk.log_debug "log level debug"
    +** Processing line: ~      args.gtk.log_info "log level info"~
    +- Inside source: true
    +*** True Line Result
    +      args.gtk.log_info "log level info"
    +** Processing line: ~      args.gtk.log_warn "log level warn"~
    +- Inside source: true
    +*** True Line Result
    +      args.gtk.log_warn "log level warn"
    +** Processing line: ~      args.gtk.log_error "log level error"~
    +- Inside source: true
    +*** True Line Result
    +      args.gtk.log_error "log level error"
    +** Processing line: ~      args.gtk.log_unfiltered "log level unfiltered"~
    +- Inside source: true
    +*** True Line Result
    +      args.gtk.log_unfiltered "log level unfiltered"
    +** Processing line: ~      puts "This is a puts call"~
    +- Inside source: true
    +*** True Line Result
    +      puts "This is a puts call"
    +** Processing line: ~      args.gtk.console.show~
    +- Inside source: true
    +*** True Line Result
    +      args.gtk.console.show
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    if args.state.tick_count == 60~
    +- Inside source: true
    +*** True Line Result
    +    if args.state.tick_count == 60
    +** Processing line: ~      puts "This is a puts call on tick 60"~
    +- Inside source: true
    +*** True Line Result
    +      puts "This is a puts call on tick 60"
    +** Processing line: ~    elsif args.state.tick_count == 120~
    +- Inside source: true
    +*** True Line Result
    +    elsif args.state.tick_count == 120
    +** Processing line: ~      puts "This is a puts call on tick 120"~
    +- Inside source: true
    +*** True Line Result
    +      puts "This is a puts call on tick 120"
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
    +*** True Line Result
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +
     ** Processing line: ~*** Advanced Debugging - Trace Debugging - main.rb~
     - Header detected.
     *** True Line Result
    @@ -62527,6 +63659,14 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
       # ./samples/11_http/01_retrieve_images/app/main.rb
    +** Processing line: ~  $gtk.register_cvar 'app.warn_seconds', "seconds to wait before starting", :uint, 11~
    +- Inside source: true
    +*** True Line Result
    +  $gtk.register_cvar 'app.warn_seconds', "seconds to wait before starting", :uint, 11
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
     ** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
    @@ -62543,10 +63683,10 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
         # Show a warning at the start.
    -** Processing line: ~    args.state.warning_debounce ||= 11 * 60~
    +** Processing line: ~    args.state.warning_debounce ||= args.cvars['app.warn_seconds'].value * 60~
     - Inside source: true
     *** True Line Result
    -    args.state.warning_debounce ||= 11 * 60
    +    args.state.warning_debounce ||= args.cvars['app.warn_seconds'].value * 60
     ** Processing line: ~    if args.state.warning_debounce > 0~
     - Inside source: true
     *** True Line Result
    @@ -62751,22 +63891,22 @@ Follows is a source code listing for all files that have been open sourced. This
     - End of paragraph detected.
     *** True Line Result
     
    -** Processing line: ~*** Http - Web Server - main.rb~
    +** Processing line: ~*** Http - In Game Web Server Http Get - main.rb~
     - Header detected.
     *** True Line Result
     
     *** True Line Result
    -*** Http - Web Server - main.rb
    +*** Http - In Game Web Server Http Get - main.rb
     ** Processing line: ~#+begin_src ruby~
     - Line was identified as the beginning of a code block.
     *** True Line Result
     
     *** True Line Result
     #+begin_src ruby
    -** Processing line: ~  # ./samples/11_http/02_web_server/app/main.rb~
    +** Processing line: ~  # ./samples/11_http/02_in_game_web_server_http_get/app/main.rb~
     - Inside source: true
     *** True Line Result
    -  # ./samples/11_http/02_web_server/app/main.rb
    +  # ./samples/11_http/02_in_game_web_server_http_get/app/main.rb
     ** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
    @@ -62775,6 +63915,10 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
         args.state.port ||= 3000
    +** Processing line: ~    args.state.reqnum ||= 0~
    +- Inside source: true
    +*** True Line Result
    +    args.state.reqnum ||= 0
     ** Processing line: ~    # by default the embedded webserver runs on port 9001 (the port number is over 9000) and is disabled in a production build~
     - Inside source: true
     *** True Line Result
    @@ -62887,6 +64031,322 @@ Follows is a source code listing for all files that have been open sourced. This
     - End of paragraph detected.
     *** True Line Result
     
    +** Processing line: ~*** Http - In Game Web Server Http Post - main.rb~
    +- Header detected.
    +*** True Line Result
    +
    +*** True Line Result
    +*** Http - In Game Web Server Http Post - main.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/11_http/03_in_game_web_server_http_post/app/main.rb~
    +- Inside source: true
    +*** True Line Result
    +  # ./samples/11_http/03_in_game_web_server_http_post/app/main.rb
    +** Processing line: ~  def tick args~
    +- Inside source: true
    +*** True Line Result
    +  def tick args
    +** Processing line: ~    # defaults~
    +- Inside source: true
    +*** True Line Result
    +    # defaults
    +** Processing line: ~    args.state.post_button      = args.layout.rect(row: 0, col: 0, w: 5, h: 1).merge(text: "execute http_post")~
    +- Inside source: true
    +*** True Line Result
    +    args.state.post_button      = args.layout.rect(row: 0, col: 0, w: 5, h: 1).merge(text: "execute http_post")
    +** Processing line: ~    args.state.post_body_button = args.layout.rect(row: 1, col: 0, w: 5, h: 1).merge(text: "execute http_post_body")~
    +- Inside source: true
    +*** True Line Result
    +    args.state.post_body_button = args.layout.rect(row: 1, col: 0, w: 5, h: 1).merge(text: "execute http_post_body")
    +** Processing line: ~    args.state.request_to_s ||= ""~
    +- Inside source: true
    +*** True Line Result
    +    args.state.request_to_s ||= ""
    +** Processing line: ~    args.state.request_body ||= ""~
    +- Inside source: true
    +*** True Line Result
    +    args.state.request_body ||= ""
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    # render~
    +- Inside source: true
    +*** True Line Result
    +    # render
    +** Processing line: ~    args.state.post_button.yield_self do |b|~
    +- Inside source: true
    +*** True Line Result
    +    args.state.post_button.yield_self do |b|
    +** Processing line: ~      args.outputs.borders << b~
    +- Inside source: true
    +*** True Line Result
    +      args.outputs.borders << b
    +** Processing line: ~      args.outputs.labels  << b.merge(text: b.text,~
    +- Inside source: true
    +*** True Line Result
    +      args.outputs.labels  << b.merge(text: b.text,
    +** Processing line: ~                                      y:    b.y + 30,~
    +- Inside source: true
    +*** True Line Result
    +                                      y:    b.y + 30,
    +** Processing line: ~                                      x:    b.x + 10)~
    +- Inside source: true
    +*** True Line Result
    +                                      x:    b.x + 10)
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    args.state.post_body_button.yield_self do |b|~
    +- Inside source: true
    +*** True Line Result
    +    args.state.post_body_button.yield_self do |b|
    +** Processing line: ~      args.outputs.borders << b~
    +- Inside source: true
    +*** True Line Result
    +      args.outputs.borders << b
    +** Processing line: ~      args.outputs.labels  << b.merge(text: b.text,~
    +- Inside source: true
    +*** True Line Result
    +      args.outputs.labels  << b.merge(text: b.text,
    +** Processing line: ~                                      y:    b.y + 30,~
    +- Inside source: true
    +*** True Line Result
    +                                      y:    b.y + 30,
    +** Processing line: ~                                      x:    b.x + 10)~
    +- Inside source: true
    +*** True Line Result
    +                                      x:    b.x + 10)
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    draw_label args, 0,  6, "Request:", args.state.request_to_s~
    +- Inside source: true
    +*** True Line Result
    +    draw_label args, 0,  6, "Request:", args.state.request_to_s
    +** Processing line: ~    draw_label args, 0, 14, "Request Body Unaltered:", args.state.request_body~
    +- Inside source: true
    +*** True Line Result
    +    draw_label args, 0, 14, "Request Body Unaltered:", args.state.request_body
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    # input~
    +- Inside source: true
    +*** True Line Result
    +    # input
    +** Processing line: ~    if args.inputs.mouse.click~
    +- Inside source: true
    +*** True Line Result
    +    if args.inputs.mouse.click
    +** Processing line: ~      # ============= HTTP_POST =============~
    +- Inside source: true
    +*** True Line Result
    +      # ============= HTTP_POST =============
    +** Processing line: ~      if (args.inputs.mouse.inside_rect? args.state.post_button)~
    +- Inside source: true
    +*** True Line Result
    +      if (args.inputs.mouse.inside_rect? args.state.post_button)
    +** Processing line: ~        # ========= DATA TO SEND ===========~
    +- Inside source: true
    +*** True Line Result
    +        # ========= DATA TO SEND ===========
    +** Processing line: ~        form_fields = { "userId" => "#{Time.now.to_i}" }~
    +- Inside source: true
    +*** True Line Result
    +        form_fields = { "userId" => "#{Time.now.to_i}" }
    +** Processing line: ~        # ==================================~
    +- Inside source: true
    +*** True Line Result
    +        # ==================================
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~        args.gtk.http_post "http://localhost:9001/testing",~
    +- Inside source: true
    +*** True Line Result
    +        args.gtk.http_post "http://localhost:9001/testing",
    +** Processing line: ~                           form_fields,~
    +- Inside source: true
    +*** True Line Result
    +                           form_fields,
    +** Processing line: ~                           ["Content-Type: application/x-www-form-urlencoded"]~
    +- Inside source: true
    +*** True Line Result
    +                           ["Content-Type: application/x-www-form-urlencoded"]
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~        args.gtk.notify! "http_post"~
    +- Inside source: true
    +*** True Line Result
    +        args.gtk.notify! "http_post"
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      # ============= HTTP_POST_BODY =============~
    +- Inside source: true
    +*** True Line Result
    +      # ============= HTTP_POST_BODY =============
    +** Processing line: ~      if (args.inputs.mouse.inside_rect? args.state.post_body_button)~
    +- Inside source: true
    +*** True Line Result
    +      if (args.inputs.mouse.inside_rect? args.state.post_body_button)
    +** Processing line: ~        # =========== DATA TO SEND ==============~
    +- Inside source: true
    +*** True Line Result
    +        # =========== DATA TO SEND ==============
    +** Processing line: ~        json = "{ \"userId\": \"#{Time.now.to_i}\"}"~
    +- Inside source: true
    +*** True Line Result
    +        json = "{ \"userId\": \"#{Time.now.to_i}\"}"
    +** Processing line: ~        # ==================================~
    +- Inside source: true
    +*** True Line Result
    +        # ==================================
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~        args.gtk.http_post_body "http://localhost:9001/testing",~
    +- Inside source: true
    +*** True Line Result
    +        args.gtk.http_post_body "http://localhost:9001/testing",
    +** Processing line: ~                                json,~
    +- Inside source: true
    +*** True Line Result
    +                                json,
    +** Processing line: ~                                ["Content-Type: application/json", "Content-Length: #{json.length}"]~
    +- Inside source: true
    +*** True Line Result
    +                                ["Content-Type: application/json", "Content-Length: #{json.length}"]
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~        args.gtk.notify! "http_post_body"~
    +- Inside source: true
    +*** True Line Result
    +        args.gtk.notify! "http_post_body"
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    # calc~
    +- Inside source: true
    +*** True Line Result
    +    # calc
    +** Processing line: ~    args.inputs.http_requests.each do |r|~
    +- Inside source: true
    +*** True Line Result
    +    args.inputs.http_requests.each do |r|
    +** Processing line: ~      puts "#{r}"~
    +- Inside source: true
    +*** True Line Result
    +      puts "#{r}"
    +** Processing line: ~      if r.uri == "/testing"~
    +- Inside source: true
    +*** True Line Result
    +      if r.uri == "/testing"
    +** Processing line: ~        puts r~
    +- Inside source: true
    +*** True Line Result
    +        puts r
    +** Processing line: ~        args.state.request_to_s = "#{r}"~
    +- Inside source: true
    +*** True Line Result
    +        args.state.request_to_s = "#{r}"
    +** Processing line: ~        args.state.request_body = r.raw_body~
    +- Inside source: true
    +*** True Line Result
    +        args.state.request_body = r.raw_body
    +** Processing line: ~        r.respond 200, "ok"~
    +- Inside source: true
    +*** True Line Result
    +        r.respond 200, "ok"
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~  def draw_label args, row, col, header, text~
    +- Inside source: true
    +*** True Line Result
    +  def draw_label args, row, col, header, text
    +** Processing line: ~    label_pos = args.layout.rect(row: row, col: col, w: 0, h: 0)~
    +- Inside source: true
    +*** True Line Result
    +    label_pos = args.layout.rect(row: row, col: col, w: 0, h: 0)
    +** Processing line: ~    args.outputs.labels << "#{header}\n\n#{text}".wrapped_lines(80).map_with_index do |l, i|~
    +- Inside source: true
    +*** True Line Result
    +    args.outputs.labels << "#{header}\n\n#{text}".wrapped_lines(80).map_with_index do |l, i|
    +** Processing line: ~      { x: label_pos.x, y: label_pos.y - (i * 15), text: l, size_enum: -2 }~
    +- Inside source: true
    +*** True Line Result
    +      { x: label_pos.x, y: label_pos.y - (i * 15), text: l, size_enum: -2 }
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
    +*** True Line Result
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +
     ** Processing line: ~*** C Extensions - Basics - main.rb~
     - Header detected.
     *** True Line Result
    @@ -70687,10 +72147,10 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
         # Every tick, new args are passed, and the Breadth First Search tick is called
    -** Processing line: ~    $breadcrumbs ||= Breadcrumbs.new(args)~
    +** Processing line: ~    $breadcrumbs ||= Breadcrumbs.new~
     - Inside source: true
     *** True Line Result
    -    $breadcrumbs ||= Breadcrumbs.new(args)
    +    $breadcrumbs ||= Breadcrumbs.new
     ** Processing line: ~    $breadcrumbs.args = args~
     - Inside source: true
     *** True Line Result
    @@ -73295,10 +74755,10 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
         # Every tick, new args are passed, and the Breadth First Search tick is called
    -** Processing line: ~    $early_exit_breadth_first_search ||= EarlyExitBreadthFirstSearch.new(args)~
    +** Processing line: ~    $early_exit_breadth_first_search ||= EarlyExitBreadthFirstSearch.new~
     - Inside source: true
     *** True Line Result
    -    $early_exit_breadth_first_search ||= EarlyExitBreadthFirstSearch.new(args)
    +    $early_exit_breadth_first_search ||= EarlyExitBreadthFirstSearch.new
     ** Processing line: ~    $early_exit_breadth_first_search.args = args~
     - Inside source: true
     *** True Line Result
    @@ -76699,10 +78159,10 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
         # Every tick, new args are passed, and the Dijkstra tick method is called
    -** Processing line: ~    $movement_costs ||= Movement_Costs.new(args)~
    +** Processing line: ~    $movement_costs ||= Movement_Costs.new~
     - Inside source: true
     *** True Line Result
    -    $movement_costs ||= Movement_Costs.new(args)
    +    $movement_costs ||= Movement_Costs.new
     ** Processing line: ~    $movement_costs.args = args~
     - Inside source: true
     *** True Line Result
    @@ -80647,10 +82107,10 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
         # Every tick, new args are passed, and the Breadth First Search tick is called
    -** Processing line: ~    $heuristic_with_walls ||= Heuristic_With_Walls.new(args)~
    +** Processing line: ~    $heuristic_with_walls ||= Heuristic_With_Walls.new~
     - Inside source: true
     *** True Line Result
    -    $heuristic_with_walls ||= Heuristic_With_Walls.new(args)
    +    $heuristic_with_walls ||= Heuristic_With_Walls.new
     ** Processing line: ~    $heuristic_with_walls.args = args~
     - Inside source: true
     *** True Line Result
    @@ -84727,10 +86187,10 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
         # Every tick, new args are passed, and the Breadth First Search tick is called
    -** Processing line: ~    $heuristic ||= Heuristic.new(args)~
    +** Processing line: ~    $heuristic ||= Heuristic.new~
     - Inside source: true
     *** True Line Result
    -    $heuristic ||= Heuristic.new(args)
    +    $heuristic ||= Heuristic.new
     ** Processing line: ~    $heuristic.args = args~
     - Inside source: true
     *** True Line Result
    @@ -88871,10 +90331,10 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
         # Every tick, new args are passed, and the Breadth First Search tick is called
    -** Processing line: ~    $a_star_algorithm ||= A_Star_Algorithm.new(args)~
    +** Processing line: ~    $a_star_algorithm ||= A_Star_Algorithm.new~
     - Inside source: true
     *** True Line Result
    -    $a_star_algorithm ||= A_Star_Algorithm.new(args)
    +    $a_star_algorithm ||= A_Star_Algorithm.new
     ** Processing line: ~    $a_star_algorithm.args = args~
     - Inside source: true
     *** True Line Result
    @@ -91031,838 +92491,802 @@ Follows is a source code listing for all files that have been open sourced. This
     - End of paragraph detected.
     *** True Line Result
     
    -** Processing line: ~*** Arcade - Bullet Hell - main.rb~
    +** Processing line: ~*** 3d - Yaw Pitch Roll - main.rb~
     - Header detected.
     *** True Line Result
     
     *** True Line Result
    -*** Arcade - Bullet Hell - main.rb
    +*** 3d - Yaw Pitch Roll - main.rb
     ** Processing line: ~#+begin_src ruby~
     - Line was identified as the beginning of a code block.
     *** True Line Result
     
     *** True Line Result
     #+begin_src ruby
    -** Processing line: ~  # ./samples/99_genre_arcade/bullet_hell/app/main.rb~
    -- Inside source: true
    -*** True Line Result
    -  # ./samples/99_genre_arcade/bullet_hell/app/main.rb
    -** Processing line: ~  def tick args~
    +** Processing line: ~  # ./samples/99_genre_3d/03_yaw_pitch_roll/app/main.rb~
     - Inside source: true
     *** True Line Result
    -  def tick args
    -** Processing line: ~    args.state.base_columns   ||= 10.times.map { |n| 50 * n + 1280 / 2 - 5 * 50 + 5 }~
    +  # ./samples/99_genre_3d/03_yaw_pitch_roll/app/main.rb
    +** Processing line: ~  class Game~
     - Inside source: true
     *** True Line Result
    -    args.state.base_columns   ||= 10.times.map { |n| 50 * n + 1280 / 2 - 5 * 50 + 5 }
    -** Processing line: ~    args.state.base_rows      ||= 5.times.map { |n| 50 * n + 720 - 5 * 50 }~
    +  class Game
    +** Processing line: ~    attr_gtk~
     - Inside source: true
     *** True Line Result
    -    args.state.base_rows      ||= 5.times.map { |n| 50 * n + 720 - 5 * 50 }
    -** Processing line: ~    args.state.offset_columns = 10.times.map { |n| (n - 4.5) * Math.sin(Kernel.tick_count.to_radians) * 12 }~
    +    attr_gtk
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    args.state.offset_columns = 10.times.map { |n| (n - 4.5) * Math.sin(Kernel.tick_count.to_radians) * 12 }
    -** Processing line: ~    args.state.offset_rows    = 5.map { 0 }~
    +
    +** Processing line: ~    def tick~
     - Inside source: true
     *** True Line Result
    -    args.state.offset_rows    = 5.map { 0 }
    -** Processing line: ~    args.state.columns        = 10.times.map { |i| args.state.base_columns[i] + args.state.offset_columns[i] }~
    +    def tick
    +** Processing line: ~      defaults~
     - Inside source: true
     *** True Line Result
    -    args.state.columns        = 10.times.map { |i| args.state.base_columns[i] + args.state.offset_columns[i] }
    -** Processing line: ~    args.state.rows           = 5.times.map { |i| args.state.base_rows[i] + args.state.offset_rows[i] }~
    +      defaults
    +** Processing line: ~      render~
     - Inside source: true
     *** True Line Result
    -    args.state.rows           = 5.times.map { |i| args.state.base_rows[i] + args.state.offset_rows[i] }
    -** Processing line: ~    args.state.explosions     ||= []~
    +      render
    +** Processing line: ~      input~
     - Inside source: true
     *** True Line Result
    -    args.state.explosions     ||= []
    -** Processing line: ~    args.state.enemies        ||= []~
    +      input
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    args.state.enemies        ||= []
    -** Processing line: ~    args.state.score          ||= 0~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    args.state.score          ||= 0
    -** Processing line: ~    args.state.wave           ||= 0~
    +
    +** Processing line: ~    def matrix_mul m, v~
     - Inside source: true
     *** True Line Result
    -    args.state.wave           ||= 0
    -** Processing line: ~    if args.state.enemies.empty?~
    +    def matrix_mul m, v
    +** Processing line: ~      (hmap x: ((m.x.x * v.x) + (m.x.y * v.y) + (m.x.z * v.z) + (m.x.w * v.w)),~
     - Inside source: true
     *** True Line Result
    -    if args.state.enemies.empty?
    -** Processing line: ~      args.state.wave      += 1~
    +      (hmap x: ((m.x.x * v.x) + (m.x.y * v.y) + (m.x.z * v.z) + (m.x.w * v.w)),
    +** Processing line: ~            y: ((m.y.x * v.x) + (m.y.y * v.y) + (m.y.z * v.z) + (m.y.w * v.w)),~
     - Inside source: true
     *** True Line Result
    -      args.state.wave      += 1
    -** Processing line: ~      args.state.wave_root = Math.sqrt(args.state.wave)~
    +            y: ((m.y.x * v.x) + (m.y.y * v.y) + (m.y.z * v.z) + (m.y.w * v.w)),
    +** Processing line: ~            z: ((m.z.x * v.x) + (m.z.y * v.y) + (m.z.z * v.z) + (m.z.w * v.w)),~
     - Inside source: true
     *** True Line Result
    -      args.state.wave_root = Math.sqrt(args.state.wave)
    -** Processing line: ~      args.state.enemies   = make_enemies~
    +            z: ((m.z.x * v.x) + (m.z.y * v.y) + (m.z.z * v.z) + (m.z.w * v.w)),
    +** Processing line: ~            w: ((m.w.x * v.x) + (m.w.y * v.y) + (m.w.z * v.z) + (m.w.w * v.w)))~
     - Inside source: true
     *** True Line Result
    -      args.state.enemies   = make_enemies
    +            w: ((m.w.x * v.x) + (m.w.y * v.y) + (m.w.z * v.z) + (m.w.w * v.w)))
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
         end
    -** Processing line: ~    args.state.player         ||= {x: 620, y: 80, w: 40, h: 40, path: 'sprites/circle-gray.png', angle: 90, cooldown: 0, alive: true}~
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    args.state.player         ||= {x: 620, y: 80, w: 40, h: 40, path: 'sprites/circle-gray.png', angle: 90, cooldown: 0, alive: true}
    -** Processing line: ~    args.state.enemy_bullets  ||= []~
    +
    +** Processing line: ~    def player_ship~
     - Inside source: true
     *** True Line Result
    -    args.state.enemy_bullets  ||= []
    -** Processing line: ~    args.state.player_bullets ||= []~
    +    def player_ship
    +** Processing line: ~      [~
     - Inside source: true
     *** True Line Result
    -    args.state.player_bullets ||= []
    -** Processing line: ~    args.state.lives          ||= 3~
    +      [
    +** Processing line: ~        # engine back~
     - Inside source: true
     *** True Line Result
    -    args.state.lives          ||= 3
    -** Processing line: ~    args.state.missed_shots   ||= 0~
    +        # engine back
    +** Processing line: ~        { x: -1, y: -1, z: 1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -    args.state.missed_shots   ||= 0
    -** Processing line: ~    args.state.fired_shots    ||= 0~
    +        { x: -1, y: -1, z: 1, w: 0 },
    +** Processing line: ~        { x: -1, y:  1, z: 1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -    args.state.fired_shots    ||= 0
    +        { x: -1, y:  1, z: 1, w: 0 },
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    update_explosions args~
    +** Processing line: ~        { x: -1, y:  1, z: 1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -    update_explosions args
    -** Processing line: ~    update_enemy_positions args~
    +        { x: -1, y:  1, z: 1, w: 0 },
    +** Processing line: ~        { x:  1, y:  1, z: 1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -    update_enemy_positions args
    +        { x:  1, y:  1, z: 1, w: 0 },
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    if args.inputs.left && args.state.player[:x] > (300 + 5)~
    -- Inside source: true
    -*** True Line Result
    -    if args.inputs.left && args.state.player[:x] > (300 + 5)
    -** Processing line: ~      args.state.player[:x] -= 5~
    +** Processing line: ~        { x:  1, y:  1, z: 1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -      args.state.player[:x] -= 5
    -** Processing line: ~    end~
    +        { x:  1, y:  1, z: 1, w: 0 },
    +** Processing line: ~        { x:  1, y: -1, z: 1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~    if args.inputs.right && args.state.player[:x] < (1280 - args.state.player[:w] - 300 - 5)~
    +        { x:  1, y: -1, z: 1, w: 0 },
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    if args.inputs.right && args.state.player[:x] < (1280 - args.state.player[:w] - 300 - 5)
    -** Processing line: ~      args.state.player[:x] += 5~
    +
    +** Processing line: ~        { x:  1, y: -1, z: 1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -      args.state.player[:x] += 5
    -** Processing line: ~    end~
    +        { x:  1, y: -1, z: 1, w: 0 },
    +** Processing line: ~        { x: -1, y: -1, z: 1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -    end
    +        { x: -1, y: -1, z: 1, w: 0 },
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    args.state.enemy_bullets.each do |bullet|~
    +** Processing line: ~        # engine front~
     - Inside source: true
     *** True Line Result
    -    args.state.enemy_bullets.each do |bullet|
    -** Processing line: ~      bullet[:x] += bullet[:dx]~
    +        # engine front
    +** Processing line: ~        { x: -1, y: -1, z: -1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -      bullet[:x] += bullet[:dx]
    -** Processing line: ~      bullet[:y] += bullet[:dy]~
    +        { x: -1, y: -1, z: -1, w: 0 },
    +** Processing line: ~        { x: -1, y:  1, z: -1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -      bullet[:y] += bullet[:dy]
    -** Processing line: ~    end~
    +        { x: -1, y:  1, z: -1, w: 0 },
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~    args.state.player_bullets.each do |bullet|~
    +
    +** Processing line: ~        { x: -1, y:  1, z: -1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -    args.state.player_bullets.each do |bullet|
    -** Processing line: ~      bullet[:x] += bullet[:dx]~
    +        { x: -1, y:  1, z: -1, w: 0 },
    +** Processing line: ~        { x:  1, y:  1, z: -1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -      bullet[:x] += bullet[:dx]
    -** Processing line: ~      bullet[:y] += bullet[:dy]~
    +        { x:  1, y:  1, z: -1, w: 0 },
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      bullet[:y] += bullet[:dy]
    -** Processing line: ~    end~
    +
    +** Processing line: ~        { x:  1, y:  1, z: -1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -    end
    +        { x:  1, y:  1, z: -1, w: 0 },
    +** Processing line: ~        { x:  1, y: -1, z: -1, w: 0 },~
    +- Inside source: true
    +*** True Line Result
    +        { x:  1, y: -1, z: -1, w: 0 },
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    args.state.enemy_bullets  = args.state.enemy_bullets.find_all { |bullet| bullet[:y].between?(-16, 736) }~
    +** Processing line: ~        { x:  1, y: -1, z: -1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -    args.state.enemy_bullets  = args.state.enemy_bullets.find_all { |bullet| bullet[:y].between?(-16, 736) }
    -** Processing line: ~    args.state.player_bullets = args.state.player_bullets.find_all do |bullet|~
    +        { x:  1, y: -1, z: -1, w: 0 },
    +** Processing line: ~        { x: -1, y: -1, z: -1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -    args.state.player_bullets = args.state.player_bullets.find_all do |bullet|
    -** Processing line: ~      if bullet[:y].between?(-16, 736)~
    +        { x: -1, y: -1, z: -1, w: 0 },
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      if bullet[:y].between?(-16, 736)
    -** Processing line: ~        true~
    +
    +** Processing line: ~        # engine left~
     - Inside source: true
     *** True Line Result
    -        true
    -** Processing line: ~      else~
    +        # engine left
    +** Processing line: ~        { x: -1, z:  -1, y: -1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -      else
    -** Processing line: ~        args.state.missed_shots += 1~
    +        { x: -1, z:  -1, y: -1, w: 0 },
    +** Processing line: ~        { x: -1, z:  -1, y:  1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -        args.state.missed_shots += 1
    -** Processing line: ~        false~
    +        { x: -1, z:  -1, y:  1, w: 0 },
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        false
    -** Processing line: ~      end~
    +
    +** Processing line: ~        { x: -1, z:  -1, y:  1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +        { x: -1, z:  -1, y:  1, w: 0 },
    +** Processing line: ~        { x: -1, z:   1, y:  1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -    end
    +        { x: -1, z:   1, y:  1, w: 0 },
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    args.state.enemies = args.state.enemies.reject do |enemy|~
    +** Processing line: ~        { x: -1, z:   1, y:  1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -    args.state.enemies = args.state.enemies.reject do |enemy|
    -** Processing line: ~      if args.state.player[:alive] && 1500 > (args.state.player[:x] - enemy[:x]) ** 2 + (args.state.player[:y] - enemy[:y]) ** 2~
    +        { x: -1, z:   1, y:  1, w: 0 },
    +** Processing line: ~        { x: -1, z:   1, y: -1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -      if args.state.player[:alive] && 1500 > (args.state.player[:x] - enemy[:x]) ** 2 + (args.state.player[:y] - enemy[:y]) ** 2
    -** Processing line: ~        args.state.explosions << {x: enemy[:x] + 4, y: enemy[:y] + 4, w: 32, h: 32, path: 'sprites/explosion-0.png', age: 0}~
    +        { x: -1, z:   1, y: -1, w: 0 },
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        args.state.explosions << {x: enemy[:x] + 4, y: enemy[:y] + 4, w: 32, h: 32, path: 'sprites/explosion-0.png', age: 0}
    -** Processing line: ~        args.state.explosions << {x: args.state.player[:x] + 4, y: args.state.player[:y] + 4, w: 32, h: 32, path: 'sprites/explosion-0.png', age: 0}~
    +
    +** Processing line: ~        { x: -1, z:   1, y: -1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -        args.state.explosions << {x: args.state.player[:x] + 4, y: args.state.player[:y] + 4, w: 32, h: 32, path: 'sprites/explosion-0.png', age: 0}
    -** Processing line: ~        args.state.player[:alive] = false~
    +        { x: -1, z:   1, y: -1, w: 0 },
    +** Processing line: ~        { x: -1, z:  -1, y: -1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -        args.state.player[:alive] = false
    -** Processing line: ~        true~
    +        { x: -1, z:  -1, y: -1, w: 0 },
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        true
    -** Processing line: ~      else~
    +
    +** Processing line: ~        # engine right~
     - Inside source: true
     *** True Line Result
    -      else
    -** Processing line: ~        false~
    +        # engine right
    +** Processing line: ~        { x:  1, z:  -1, y: -1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -        false
    -** Processing line: ~      end~
    +        { x:  1, z:  -1, y: -1, w: 0 },
    +** Processing line: ~        { x:  1, z:  -1, y:  1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +        { x:  1, z:  -1, y:  1, w: 0 },
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~    args.state.enemy_bullets.each do |bullet|~
    +
    +** Processing line: ~        { x:  1, z:  -1, y:  1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -    args.state.enemy_bullets.each do |bullet|
    -** Processing line: ~      if args.state.player[:alive] && 400 > (args.state.player[:x] - bullet[:x] + 12) ** 2 + (args.state.player[:y] - bullet[:y] + 12) ** 2~
    +        { x:  1, z:  -1, y:  1, w: 0 },
    +** Processing line: ~        { x:  1, z:   1, y:  1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -      if args.state.player[:alive] && 400 > (args.state.player[:x] - bullet[:x] + 12) ** 2 + (args.state.player[:y] - bullet[:y] + 12) ** 2
    -** Processing line: ~        args.state.explosions << {x: args.state.player[:x] + 4, y: args.state.player[:y] + 4, w: 32, h: 32, path: 'sprites/explosion-0.png', age: 0}~
    +        { x:  1, z:   1, y:  1, w: 0 },
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        args.state.explosions << {x: args.state.player[:x] + 4, y: args.state.player[:y] + 4, w: 32, h: 32, path: 'sprites/explosion-0.png', age: 0}
    -** Processing line: ~        args.state.player[:alive] = false~
    +
    +** Processing line: ~        { x:  1, z:   1, y:  1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -        args.state.player[:alive] = false
    -** Processing line: ~        bullet[:despawn]          = true~
    +        { x:  1, z:   1, y:  1, w: 0 },
    +** Processing line: ~        { x:  1, z:   1, y: -1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -        bullet[:despawn]          = true
    -** Processing line: ~      end~
    +        { x:  1, z:   1, y: -1, w: 0 },
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +
    +** Processing line: ~        { x:  1, z:   1, y: -1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~    args.state.enemies = args.state.enemies.reject do |enemy|~
    +        { x:  1, z:   1, y: -1, w: 0 },
    +** Processing line: ~        { x:  1, z:  -1, y: -1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -    args.state.enemies = args.state.enemies.reject do |enemy|
    -** Processing line: ~      args.state.player_bullets.any? do |bullet|~
    +        { x:  1, z:  -1, y: -1, w: 0 },
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      args.state.player_bullets.any? do |bullet|
    -** Processing line: ~        if 400 > (enemy[:x] - bullet[:x] + 12) ** 2 + (enemy[:y] - bullet[:y] + 12) ** 2~
    +
    +** Processing line: ~        # top front of engine to front of ship~
     - Inside source: true
     *** True Line Result
    -        if 400 > (enemy[:x] - bullet[:x] + 12) ** 2 + (enemy[:y] - bullet[:y] + 12) ** 2
    -** Processing line: ~          args.state.explosions << {x: enemy[:x] + 4, y: enemy[:y] + 4, w: 32, h: 32, path: 'sprites/explosion-0.png', age: 0}~
    +        # top front of engine to front of ship
    +** Processing line: ~        { x:  1, y:   1, z: 1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -          args.state.explosions << {x: enemy[:x] + 4, y: enemy[:y] + 4, w: 32, h: 32, path: 'sprites/explosion-0.png', age: 0}
    -** Processing line: ~          bullet[:despawn] = true~
    +        { x:  1, y:   1, z: 1, w: 0 },
    +** Processing line: ~        { x:  0, y:  -1, z: 9, w: 0 },~
     - Inside source: true
     *** True Line Result
    -          bullet[:despawn] = true
    -** Processing line: ~          args.state.score += 1000 * args.state.wave~
    +        { x:  0, y:  -1, z: 9, w: 0 },
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          args.state.score += 1000 * args.state.wave
    -** Processing line: ~          true~
    +
    +** Processing line: ~        { x:  0, y:  -1, z: 9, w: 0 },~
     - Inside source: true
     *** True Line Result
    -          true
    -** Processing line: ~        else~
    +        { x:  0, y:  -1, z: 9, w: 0 },
    +** Processing line: ~        { x: -1, y:   1, z: 1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -        else
    -** Processing line: ~          false~
    +        { x: -1, y:   1, z: 1, w: 0 },
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          false
    -** Processing line: ~        end~
    +
    +** Processing line: ~        # bottom front of engine~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~      end~
    +        # bottom front of engine
    +** Processing line: ~        { x:  1, y:  -1, z: 1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +        { x:  1, y:  -1, z: 1, w: 0 },
    +** Processing line: ~        { x:  0, y:  -1, z: 9, w: 0 },~
     - Inside source: true
     *** True Line Result
    -    end
    +        { x:  0, y:  -1, z: 9, w: 0 },
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    args.state.player_bullets = args.state.player_bullets.reject { |bullet| bullet[:despawn] }~
    +** Processing line: ~        { x: -1, y:  -1, z: 1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -    args.state.player_bullets = args.state.player_bullets.reject { |bullet| bullet[:despawn] }
    -** Processing line: ~    args.state.enemy_bullets  = args.state.enemy_bullets.reject { |bullet| bullet[:despawn] }~
    +        { x: -1, y:  -1, z: 1, w: 0 },
    +** Processing line: ~        { x:  0, y:  -1, z: 9, w: 0 },~
     - Inside source: true
     *** True Line Result
    -    args.state.enemy_bullets  = args.state.enemy_bullets.reject { |bullet| bullet[:despawn] }
    +        { x:  0, y:  -1, z: 9, w: 0 },
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    args.state.player[:cooldown] -= 1~
    +** Processing line: ~        # right wing~
     - Inside source: true
     *** True Line Result
    -    args.state.player[:cooldown] -= 1
    -** Processing line: ~    if args.inputs.keyboard.key_held.space && args.state.player[:cooldown] <= 0 && args.state.player[:alive]~
    +        # right wing
    +** Processing line: ~        # front of wing~
     - Inside source: true
     *** True Line Result
    -    if args.inputs.keyboard.key_held.space && args.state.player[:cooldown] <= 0 && args.state.player[:alive]
    -** Processing line: ~      args.state.player_bullets << {x: args.state.player[:x] + 12, y: args.state.player[:y] + 28, w: 16, h: 16, path: 'sprites/star.png', dx: 0, dy: 8}.sprite~
    +        # front of wing
    +** Processing line: ~        { x: 1, y: 0.10, z:  1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -      args.state.player_bullets << {x: args.state.player[:x] + 12, y: args.state.player[:y] + 28, w: 16, h: 16, path: 'sprites/star.png', dx: 0, dy: 8}.sprite
    -** Processing line: ~      args.state.fired_shots       += 1~
    +        { x: 1, y: 0.10, z:  1, w: 0 },
    +** Processing line: ~        { x: 9, y: 0.10, z: -1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -      args.state.fired_shots       += 1
    -** Processing line: ~      args.state.player[:cooldown] = 10 + 20 / args.state.wave~
    +        { x: 9, y: 0.10, z: -1, w: 0 },
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      args.state.player[:cooldown] = 10 + 20 / args.state.wave
    -** Processing line: ~    end~
    +
    +** Processing line: ~        { x:  9, y: 0.10, z: -1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~    args.state.enemies.each do |enemy|~
    +        { x:  9, y: 0.10, z: -1, w: 0 },
    +** Processing line: ~        { x: 10, y: 0.10, z: -2, w: 0 },~
     - Inside source: true
     *** True Line Result
    -    args.state.enemies.each do |enemy|
    -** Processing line: ~      if Math.rand < 0.0005 + 0.0005 * args.state.wave && args.state.player[:alive] && enemy[:move_state] == :normal~
    +        { x: 10, y: 0.10, z: -2, w: 0 },
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      if Math.rand < 0.0005 + 0.0005 * args.state.wave && args.state.player[:alive] && enemy[:move_state] == :normal
    -** Processing line: ~        args.state.enemy_bullets << {x: enemy[:x] + 12, y: enemy[:y] - 8, w: 16, h: 16, path: 'sprites/star.png', dx: 0, dy: -3 - args.state.wave_root}.sprite~
    +
    +** Processing line: ~        # back of wing~
     - Inside source: true
     *** True Line Result
    -        args.state.enemy_bullets << {x: enemy[:x] + 12, y: enemy[:y] - 8, w: 16, h: 16, path: 'sprites/star.png', dx: 0, dy: -3 - args.state.wave_root}.sprite
    -** Processing line: ~      end~
    +        # back of wing
    +** Processing line: ~        { x: 1, y: 0.10, z: -1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +        { x: 1, y: 0.10, z: -1, w: 0 },
    +** Processing line: ~        { x: 9, y: 0.10, z: -1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -    end
    +        { x: 9, y: 0.10, z: -1, w: 0 },
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    args.outputs.background_color = [0, 0, 0]~
    +** Processing line: ~        { x: 10, y: 0.10, z: -2, w: 0 },~
     - Inside source: true
     *** True Line Result
    -    args.outputs.background_color = [0, 0, 0]
    -** Processing line: ~    args.outputs.primitives << args.state.enemies.map do |enemy|~
    +        { x: 10, y: 0.10, z: -2, w: 0 },
    +** Processing line: ~        { x:  8, y: 0.10, z: -1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -    args.outputs.primitives << args.state.enemies.map do |enemy|
    -** Processing line: ~      [enemy[:x], enemy[:y], 40, 40, enemy[:path], -90].sprite~
    +        { x:  8, y: 0.10, z: -1, w: 0 },
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      [enemy[:x], enemy[:y], 40, 40, enemy[:path], -90].sprite
    -** Processing line: ~    end~
    +
    +** Processing line: ~        # front of wing~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~    args.outputs.primitives << args.state.player if args.state.player[:alive]~
    +        # front of wing
    +** Processing line: ~        { x: 1, y: -0.10, z:  1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -    args.outputs.primitives << args.state.player if args.state.player[:alive]
    -** Processing line: ~    args.outputs.primitives << args.state.explosions~
    +        { x: 1, y: -0.10, z:  1, w: 0 },
    +** Processing line: ~        { x: 9, y: -0.10, z: -1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -    args.outputs.primitives << args.state.explosions
    -** Processing line: ~    args.outputs.primitives << args.state.player_bullets~
    +        { x: 9, y: -0.10, z: -1, w: 0 },
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    args.outputs.primitives << args.state.player_bullets
    -** Processing line: ~    args.outputs.primitives << args.state.enemy_bullets~
    +
    +** Processing line: ~        { x:  9, y: -0.10, z: -1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -    args.outputs.primitives << args.state.enemy_bullets
    -** Processing line: ~    accuracy = args.state.fired_shots.zero? ? 1 : (args.state.fired_shots - args.state.missed_shots) / args.state.fired_shots~
    +        { x:  9, y: -0.10, z: -1, w: 0 },
    +** Processing line: ~        { x: 10, y: -0.10, z: -2, w: 0 },~
     - Inside source: true
     *** True Line Result
    -    accuracy = args.state.fired_shots.zero? ? 1 : (args.state.fired_shots - args.state.missed_shots) / args.state.fired_shots
    -** Processing line: ~    args.outputs.primitives << [~
    +        { x: 10, y: -0.10, z: -2, w: 0 },
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    args.outputs.primitives << [
    -** Processing line: ~      [0, 0, 300, 720, 96, 0, 0].solid,~
    +
    +** Processing line: ~        # back of wing~
     - Inside source: true
     *** True Line Result
    -      [0, 0, 300, 720, 96, 0, 0].solid,
    -** Processing line: ~      [1280 - 300, 0, 300, 720, 96, 0, 0].solid,~
    +        # back of wing
    +** Processing line: ~        { x: 1, y: -0.10, z: -1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -      [1280 - 300, 0, 300, 720, 96, 0, 0].solid,
    -** Processing line: ~      [1280 - 290, 60, "Wave     #{args.state.wave}", 255, 255, 255].label,~
    +        { x: 1, y: -0.10, z: -1, w: 0 },
    +** Processing line: ~        { x: 9, y: -0.10, z: -1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -      [1280 - 290, 60, "Wave     #{args.state.wave}", 255, 255, 255].label,
    -** Processing line: ~      [1280 - 290, 40, "Accuracy #{(accuracy * 100).floor}%", 255, 255, 255].label,~
    +        { x: 9, y: -0.10, z: -1, w: 0 },
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      [1280 - 290, 40, "Accuracy #{(accuracy * 100).floor}%", 255, 255, 255].label,
    -** Processing line: ~      [1280 - 290, 20, "Score    #{(args.state.score * accuracy).floor}", 255, 255, 255].label,~
    +
    +** Processing line: ~        { x: 10, y: -0.10, z: -2, w: 0 },~
     - Inside source: true
     *** True Line Result
    -      [1280 - 290, 20, "Score    #{(args.state.score * accuracy).floor}", 255, 255, 255].label,
    -** Processing line: ~    ]~
    +        { x: 10, y: -0.10, z: -2, w: 0 },
    +** Processing line: ~        { x:  8, y: -0.10, z: -1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -    ]
    -** Processing line: ~    args.outputs.primitives << args.state.lives.times.map do |n|~
    +        { x:  8, y: -0.10, z: -1, w: 0 },
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    args.outputs.primitives << args.state.lives.times.map do |n|
    -** Processing line: ~      [1280 - 290 + 50 * n, 80, 40, 40, 'sprites/circle-gray.png', 90].sprite~
    +
    +** Processing line: ~        # left wing~
     - Inside source: true
     *** True Line Result
    -      [1280 - 290 + 50 * n, 80, 40, 40, 'sprites/circle-gray.png', 90].sprite
    -** Processing line: ~    end~
    +        # left wing
    +** Processing line: ~        # front of wing~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~    #args.outputs.debug << args.gtk.framerate_diagnostics_primitives~
    +        # front of wing
    +** Processing line: ~        { x: -1, y: 0.10, z:  1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -    #args.outputs.debug << args.gtk.framerate_diagnostics_primitives
    -** Processing line: ~~
    +        { x: -1, y: 0.10, z:  1, w: 0 },
    +** Processing line: ~        { x: -9, y: 0.10, z: -1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    if (!args.state.player[:alive]) && args.state.enemy_bullets.empty? && args.state.explosions.empty? && args.state.enemies.all? { |enemy| enemy[:move_state] == :normal }~
    +        { x: -9, y: 0.10, z: -1, w: 0 },
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    if (!args.state.player[:alive]) && args.state.enemy_bullets.empty? && args.state.explosions.empty? && args.state.enemies.all? { |enemy| enemy[:move_state] == :normal }
    -** Processing line: ~      args.state.player[:alive] = true~
    +
    +** Processing line: ~        { x: -9, y: 0.10, z: -1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -      args.state.player[:alive] = true
    -** Processing line: ~      args.state.player[:x]     = 624~
    +        { x: -9, y: 0.10, z: -1, w: 0 },
    +** Processing line: ~        { x: -10, y: 0.10, z: -2, w: 0 },~
     - Inside source: true
     *** True Line Result
    -      args.state.player[:x]     = 624
    -** Processing line: ~      args.state.player[:y]     = 80~
    +        { x: -10, y: 0.10, z: -2, w: 0 },
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      args.state.player[:y]     = 80
    -** Processing line: ~      args.state.lives          -= 1~
    +
    +** Processing line: ~        # back of wing~
     - Inside source: true
     *** True Line Result
    -      args.state.lives          -= 1
    -** Processing line: ~      if args.state.lives == -1~
    +        # back of wing
    +** Processing line: ~        { x: -1, y: 0.10, z: -1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -      if args.state.lives == -1
    -** Processing line: ~        args.state.clear!~
    +        { x: -1, y: 0.10, z: -1, w: 0 },
    +** Processing line: ~        { x: -9, y: 0.10, z: -1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -        args.state.clear!
    -** Processing line: ~      end~
    +        { x: -9, y: 0.10, z: -1, w: 0 },
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +
    +** Processing line: ~        { x: -10, y: 0.10, z: -2, w: 0 },~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~  end~
    +        { x: -10, y: 0.10, z: -2, w: 0 },
    +** Processing line: ~        { x: -8, y: 0.10, z: -1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -  end
    +        { x: -8, y: 0.10, z: -1, w: 0 },
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def make_enemies~
    +** Processing line: ~        # front of wing~
     - Inside source: true
     *** True Line Result
    -  def make_enemies
    -** Processing line: ~    enemies = []~
    +        # front of wing
    +** Processing line: ~        { x: -1, y: -0.10, z:  1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -    enemies = []
    -** Processing line: ~    enemies += 10.times.map { |n| {x: Math.rand * 1280 * 2 - 640, y: Math.rand * 720 * 2 + 720, row: 0, col: n, path: 'sprites/circle-orange.png', move_state: :retreat} }~
    +        { x: -1, y: -0.10, z:  1, w: 0 },
    +** Processing line: ~        { x: -9, y: -0.10, z: -1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -    enemies += 10.times.map { |n| {x: Math.rand * 1280 * 2 - 640, y: Math.rand * 720 * 2 + 720, row: 0, col: n, path: 'sprites/circle-orange.png', move_state: :retreat} }
    -** Processing line: ~    enemies += 10.times.map { |n| {x: Math.rand * 1280 * 2 - 640, y: Math.rand * 720 * 2 + 720, row: 1, col: n, path: 'sprites/circle-orange.png', move_state: :retreat} }~
    +        { x: -9, y: -0.10, z: -1, w: 0 },
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    enemies += 10.times.map { |n| {x: Math.rand * 1280 * 2 - 640, y: Math.rand * 720 * 2 + 720, row: 1, col: n, path: 'sprites/circle-orange.png', move_state: :retreat} }
    -** Processing line: ~    enemies += 8.times.map { |n| {x: Math.rand * 1280 * 2 - 640, y: Math.rand * 720 * 2 + 720, row: 2, col: n + 1, path: 'sprites/circle-blue.png', move_state: :retreat} }~
    +
    +** Processing line: ~        { x: -9, y: -0.10, z: -1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -    enemies += 8.times.map { |n| {x: Math.rand * 1280 * 2 - 640, y: Math.rand * 720 * 2 + 720, row: 2, col: n + 1, path: 'sprites/circle-blue.png', move_state: :retreat} }
    -** Processing line: ~    enemies += 8.times.map { |n| {x: Math.rand * 1280 * 2 - 640, y: Math.rand * 720 * 2 + 720, row: 3, col: n + 1, path: 'sprites/circle-blue.png', move_state: :retreat} }~
    +        { x: -9, y: -0.10, z: -1, w: 0 },
    +** Processing line: ~        { x: -10, y: -0.10, z: -2, w: 0 },~
     - Inside source: true
     *** True Line Result
    -    enemies += 8.times.map { |n| {x: Math.rand * 1280 * 2 - 640, y: Math.rand * 720 * 2 + 720, row: 3, col: n + 1, path: 'sprites/circle-blue.png', move_state: :retreat} }
    -** Processing line: ~    enemies += 4.times.map { |n| {x: Math.rand * 1280 * 2 - 640, y: Math.rand * 720 * 2 + 720, row: 4, col: n + 3, path: 'sprites/circle-green.png', move_state: :retreat} }~
    +        { x: -10, y: -0.10, z: -2, w: 0 },
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    enemies += 4.times.map { |n| {x: Math.rand * 1280 * 2 - 640, y: Math.rand * 720 * 2 + 720, row: 4, col: n + 3, path: 'sprites/circle-green.png', move_state: :retreat} }
    -** Processing line: ~    enemies~
    +
    +** Processing line: ~        # back of wing~
     - Inside source: true
     *** True Line Result
    -    enemies
    -** Processing line: ~  end~
    +        # back of wing
    +** Processing line: ~        { x: -1, y: -0.10, z: -1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -  end
    +        { x: -1, y: -0.10, z: -1, w: 0 },
    +** Processing line: ~        { x: -9, y: -0.10, z: -1, w: 0 },~
    +- Inside source: true
    +*** True Line Result
    +        { x: -9, y: -0.10, z: -1, w: 0 },
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def update_explosions args~
    +** Processing line: ~        { x: -10, y: -0.10, z: -2, w: 0 },~
     - Inside source: true
     *** True Line Result
    -  def update_explosions args
    -** Processing line: ~    args.state.explosions.each do |explosion|~
    +        { x: -10, y: -0.10, z: -2, w: 0 },
    +** Processing line: ~        { x: -8, y: -0.10, z: -1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -    args.state.explosions.each do |explosion|
    -** Processing line: ~      explosion[:age]  += 0.5~
    +        { x: -8, y: -0.10, z: -1, w: 0 },
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      explosion[:age]  += 0.5
    -** Processing line: ~      explosion[:path] = "sprites/explosion-#{explosion[:age].floor}.png"~
    +
    +** Processing line: ~        # left fin~
     - Inside source: true
     *** True Line Result
    -      explosion[:path] = "sprites/explosion-#{explosion[:age].floor}.png"
    -** Processing line: ~    end~
    +        # left fin
    +** Processing line: ~        # top~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~    args.state.explosions = args.state.explosions.reject { |explosion| explosion[:age] >= 7 }~
    +        # top
    +** Processing line: ~        { x: -1, y: 0.10, z: 1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -    args.state.explosions = args.state.explosions.reject { |explosion| explosion[:age] >= 7 }
    -** Processing line: ~  end~
    +        { x: -1, y: 0.10, z: 1, w: 0 },
    +** Processing line: ~        { x: -1, y: 3, z: -3, w: 0 },~
     - Inside source: true
     *** True Line Result
    -  end
    +        { x: -1, y: 3, z: -3, w: 0 },
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def update_enemy_positions args~
    -- Inside source: true
    -*** True Line Result
    -  def update_enemy_positions args
    -** Processing line: ~    args.state.enemies.each do |enemy|~
    +** Processing line: ~        { x: -1, y: 0.10, z: -1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -    args.state.enemies.each do |enemy|
    -** Processing line: ~      if enemy[:move_state] == :normal~
    +        { x: -1, y: 0.10, z: -1, w: 0 },
    +** Processing line: ~        { x: -1, y: 3, z: -3, w: 0 },~
     - Inside source: true
     *** True Line Result
    -      if enemy[:move_state] == :normal
    -** Processing line: ~        enemy[:x]          = args.state.columns[enemy[:col]]~
    +        { x: -1, y: 3, z: -3, w: 0 },
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        enemy[:x]          = args.state.columns[enemy[:col]]
    -** Processing line: ~        enemy[:y]          = args.state.rows[enemy[:row]]~
    +
    +** Processing line: ~        { x: -1.1, y: 0.10, z: 1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -        enemy[:y]          = args.state.rows[enemy[:row]]
    -** Processing line: ~        enemy[:move_state] = :dive if Math.rand < 0.0002 + 0.00005 * args.state.wave && args.state.player[:alive]~
    +        { x: -1.1, y: 0.10, z: 1, w: 0 },
    +** Processing line: ~        { x: -1.1, y: 3, z: -3, w: 0 },~
     - Inside source: true
     *** True Line Result
    -        enemy[:move_state] = :dive if Math.rand < 0.0002 + 0.00005 * args.state.wave && args.state.player[:alive]
    -** Processing line: ~      elsif enemy[:move_state] == :dive~
    +        { x: -1.1, y: 3, z: -3, w: 0 },
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      elsif enemy[:move_state] == :dive
    -** Processing line: ~        enemy[:target_x] ||= args.state.player[:x]~
    +
    +** Processing line: ~        { x: -1.1, y: 0.10, z: -1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -        enemy[:target_x] ||= args.state.player[:x]
    -** Processing line: ~        enemy[:target_y] ||= args.state.player[:y]~
    +        { x: -1.1, y: 0.10, z: -1, w: 0 },
    +** Processing line: ~        { x: -1.1, y: 3, z: -3, w: 0 },~
     - Inside source: true
     *** True Line Result
    -        enemy[:target_y] ||= args.state.player[:y]
    -** Processing line: ~        dx               = enemy[:target_x] - enemy[:x]~
    +        { x: -1.1, y: 3, z: -3, w: 0 },
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        dx               = enemy[:target_x] - enemy[:x]
    -** Processing line: ~        dy               = enemy[:target_y] - enemy[:y]~
    +
    +** Processing line: ~        # bottom~
     - Inside source: true
     *** True Line Result
    -        dy               = enemy[:target_y] - enemy[:y]
    -** Processing line: ~        vel              = Math.sqrt(dx * dx + dy * dy)~
    +        # bottom
    +** Processing line: ~        { x: -1, y: -0.10, z: 1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -        vel              = Math.sqrt(dx * dx + dy * dy)
    -** Processing line: ~        speed_limit      = 2 + args.state.wave_root~
    +        { x: -1, y: -0.10, z: 1, w: 0 },
    +** Processing line: ~        { x: -1, y: -2, z: -2, w: 0 },~
     - Inside source: true
     *** True Line Result
    -        speed_limit      = 2 + args.state.wave_root
    -** Processing line: ~        if vel > speed_limit~
    +        { x: -1, y: -2, z: -2, w: 0 },
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        if vel > speed_limit
    -** Processing line: ~          dx /= vel / speed_limit~
    +
    +** Processing line: ~        { x: -1, y: -0.10, z: -1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -          dx /= vel / speed_limit
    -** Processing line: ~          dy /= vel / speed_limit~
    +        { x: -1, y: -0.10, z: -1, w: 0 },
    +** Processing line: ~        { x: -1, y: -2, z: -2, w: 0 },~
     - Inside source: true
     *** True Line Result
    -          dy /= vel / speed_limit
    -** Processing line: ~        end~
    +        { x: -1, y: -2, z: -2, w: 0 },
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~        if vel < 1 || !args.state.player[:alive]~
    +
    +** Processing line: ~        { x: -1.1, y: -0.10, z: 1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -        if vel < 1 || !args.state.player[:alive]
    -** Processing line: ~          enemy[:move_state] = :retreat~
    +        { x: -1.1, y: -0.10, z: 1, w: 0 },
    +** Processing line: ~        { x: -1.1, y: -2, z: -2, w: 0 },~
     - Inside source: true
     *** True Line Result
    -          enemy[:move_state] = :retreat
    -** Processing line: ~        end~
    +        { x: -1.1, y: -2, z: -2, w: 0 },
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~        enemy[:x] += dx~
    +
    +** Processing line: ~        { x: -1.1, y: -0.10, z: -1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -        enemy[:x] += dx
    -** Processing line: ~        enemy[:y] += dy~
    +        { x: -1.1, y: -0.10, z: -1, w: 0 },
    +** Processing line: ~        { x: -1.1, y: -2, z: -2, w: 0 },~
     - Inside source: true
     *** True Line Result
    -        enemy[:y] += dy
    -** Processing line: ~      elsif enemy[:move_state] == :retreat~
    +        { x: -1.1, y: -2, z: -2, w: 0 },
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      elsif enemy[:move_state] == :retreat
    -** Processing line: ~        enemy[:target_x] = args.state.columns[enemy[:col]]~
    +
    +** Processing line: ~        # right fin~
     - Inside source: true
     *** True Line Result
    -        enemy[:target_x] = args.state.columns[enemy[:col]]
    -** Processing line: ~        enemy[:target_y] = args.state.rows[enemy[:row]]~
    +        # right fin
    +** Processing line: ~        { x:  1, y: 0.10, z: 1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -        enemy[:target_y] = args.state.rows[enemy[:row]]
    -** Processing line: ~        dx               = enemy[:target_x] - enemy[:x]~
    +        { x:  1, y: 0.10, z: 1, w: 0 },
    +** Processing line: ~        { x:  1, y: 3, z: -3, w: 0 },~
     - Inside source: true
     *** True Line Result
    -        dx               = enemy[:target_x] - enemy[:x]
    -** Processing line: ~        dy               = enemy[:target_y] - enemy[:y]~
    +        { x:  1, y: 3, z: -3, w: 0 },
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        dy               = enemy[:target_y] - enemy[:y]
    -** Processing line: ~        vel              = Math.sqrt(dx * dx + dy * dy)~
    +
    +** Processing line: ~        { x:  1, y: 0.10, z: -1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -        vel              = Math.sqrt(dx * dx + dy * dy)
    -** Processing line: ~        speed_limit      = 2 + args.state.wave_root~
    +        { x:  1, y: 0.10, z: -1, w: 0 },
    +** Processing line: ~        { x:  1, y: 3, z: -3, w: 0 },~
     - Inside source: true
     *** True Line Result
    -        speed_limit      = 2 + args.state.wave_root
    -** Processing line: ~        if vel > speed_limit~
    +        { x:  1, y: 3, z: -3, w: 0 },
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        if vel > speed_limit
    -** Processing line: ~          dx /= vel / speed_limit~
    +
    +** Processing line: ~        { x:  1.1, y: 0.10, z: 1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -          dx /= vel / speed_limit
    -** Processing line: ~          dy /= vel / speed_limit~
    +        { x:  1.1, y: 0.10, z: 1, w: 0 },
    +** Processing line: ~        { x:  1.1, y: 3, z: -3, w: 0 },~
     - Inside source: true
     *** True Line Result
    -          dy /= vel / speed_limit
    -** Processing line: ~        elsif vel < 1~
    +        { x:  1.1, y: 3, z: -3, w: 0 },
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        elsif vel < 1
    -** Processing line: ~          enemy[:move_state] = :normal~
    +
    +** Processing line: ~        { x:  1.1, y: 0.10, z: -1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -          enemy[:move_state] = :normal
    -** Processing line: ~          enemy[:target_x]   = nil~
    +        { x:  1.1, y: 0.10, z: -1, w: 0 },
    +** Processing line: ~        { x:  1.1, y: 3, z: -3, w: 0 },~
     - Inside source: true
     *** True Line Result
    -          enemy[:target_x]   = nil
    -** Processing line: ~          enemy[:target_y]   = nil~
    +        { x:  1.1, y: 3, z: -3, w: 0 },
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          enemy[:target_y]   = nil
    -** Processing line: ~        end~
    +
    +** Processing line: ~        # bottom~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~        enemy[:x] += dx~
    +        # bottom
    +** Processing line: ~        { x:  1, y: -0.10, z: 1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -        enemy[:x] += dx
    -** Processing line: ~        enemy[:y] += dy~
    +        { x:  1, y: -0.10, z: 1, w: 0 },
    +** Processing line: ~        { x:  1, y: -2, z: -2, w: 0 },~
     - Inside source: true
     *** True Line Result
    -        enemy[:y] += dy
    -** Processing line: ~      end~
    +        { x:  1, y: -2, z: -2, w: 0 },
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +
    +** Processing line: ~        { x:  1, y: -0.10, z: -1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~  end~
    +        { x:  1, y: -0.10, z: -1, w: 0 },
    +** Processing line: ~        { x:  1, y: -2, z: -2, w: 0 },~
     - Inside source: true
     *** True Line Result
    -  end
    +        { x:  1, y: -2, z: -2, w: 0 },
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~#+end_src~
    -- Line was identified as the end of a code block.
    -*** True Line Result
    -#+end_src
    -** Processing line: ~~
    -- End of paragraph detected.
    -*** True Line Result
    -
    -** Processing line: ~*** Arcade - Dueling Starships - main.rb~
    -- Header detected.
    -*** True Line Result
    -
    -*** True Line Result
    -*** Arcade - Dueling Starships - main.rb
    -** Processing line: ~#+begin_src ruby~
    -- Line was identified as the beginning of a code block.
    -*** True Line Result
    -
    -*** True Line Result
    -#+begin_src ruby
    -** Processing line: ~  # ./samples/99_genre_arcade/dueling_starships/app/main.rb~
    -- Inside source: true
    -*** True Line Result
    -  # ./samples/99_genre_arcade/dueling_starships/app/main.rb
    -** Processing line: ~  class DuelingSpaceships~
    +** Processing line: ~        { x:  1.1, y: -0.10, z: 1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -  class DuelingSpaceships
    -** Processing line: ~    attr_accessor :state, :inputs, :outputs, :grid~
    +        { x:  1.1, y: -0.10, z: 1, w: 0 },
    +** Processing line: ~        { x:  1.1, y: -2, z: -2, w: 0 },~
     - Inside source: true
     *** True Line Result
    -    attr_accessor :state, :inputs, :outputs, :grid
    +        { x:  1.1, y: -2, z: -2, w: 0 },
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def tick~
    -- Inside source: true
    -*** True Line Result
    -    def tick
    -** Processing line: ~      defaults~
    -- Inside source: true
    -*** True Line Result
    -      defaults
    -** Processing line: ~      render~
    +** Processing line: ~        { x:  1.1, y: -0.10, z: -1, w: 0 },~
     - Inside source: true
     *** True Line Result
    -      render
    -** Processing line: ~      calc~
    +        { x:  1.1, y: -0.10, z: -1, w: 0 },
    +** Processing line: ~        { x:  1.1, y: -2, z: -2, w: 0 },~
     - Inside source: true
     *** True Line Result
    -      calc
    -** Processing line: ~      input~
    +        { x:  1.1, y: -2, z: -2, w: 0 },
    +** Processing line: ~      ]~
     - Inside source: true
     *** True Line Result
    -      input
    +      ]
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -91875,54 +93299,62 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
         def defaults
    -** Processing line: ~      outputs.background_color = [0, 0, 0]~
    +** Processing line: ~      state.points ||= player_ship~
     - Inside source: true
     *** True Line Result
    -      outputs.background_color = [0, 0, 0]
    -** Processing line: ~      state.ship_blue       ||= new_blue_ship~
    +      state.points ||= player_ship
    +** Processing line: ~      state.shifted_points ||= state.points.map { |point| point }~
     - Inside source: true
     *** True Line Result
    -      state.ship_blue       ||= new_blue_ship
    -** Processing line: ~      state.ship_red        ||= new_red_ship~
    +      state.shifted_points ||= state.points.map { |point| point }
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      state.ship_red        ||= new_red_ship
    -** Processing line: ~      state.flames          ||= []~
    +
    +** Processing line: ~      state.scale   ||= 1~
     - Inside source: true
     *** True Line Result
    -      state.flames          ||= []
    -** Processing line: ~      state.bullets         ||= []~
    +      state.scale   ||= 1
    +** Processing line: ~      state.angle_x ||= 0~
     - Inside source: true
     *** True Line Result
    -      state.bullets         ||= []
    -** Processing line: ~      state.ship_blue_score ||= 0~
    +      state.angle_x ||= 0
    +** Processing line: ~      state.angle_y ||= 0~
     - Inside source: true
     *** True Line Result
    -      state.ship_blue_score ||= 0
    -** Processing line: ~      state.ship_red_score  ||= 0~
    +      state.angle_y ||= 0
    +** Processing line: ~      state.angle_z ||= 0~
     - Inside source: true
     *** True Line Result
    -      state.ship_red_score  ||= 0
    -** Processing line: ~      state.stars           ||= 100.map do~
    +      state.angle_z ||= 0
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      state.stars           ||= 100.map do
    -** Processing line: ~        [rand.add(2).to_square(grid.w_half.randomize(:sign, :ratio),~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        [rand.add(2).to_square(grid.w_half.randomize(:sign, :ratio),
    -** Processing line: ~                               grid.h_half.randomize(:sign, :ratio)),~
    +
    +** Processing line: ~    def matrix_new x0, y0, z0, w0, x1, y1, z1, w1, x2, y2, z2, w2, x3, y3, z3, w3~
     - Inside source: true
     *** True Line Result
    -                               grid.h_half.randomize(:sign, :ratio)),
    -** Processing line: ~         128 + 128.randomize(:ratio), 255, 255]~
    +    def matrix_new x0, y0, z0, w0, x1, y1, z1, w1, x2, y2, z2, w2, x3, y3, z3, w3
    +** Processing line: ~      (hmap x: (hmap x: x0, y: y0, z: z0, w: w0),~
     - Inside source: true
     *** True Line Result
    -         128 + 128.randomize(:ratio), 255, 255]
    -** Processing line: ~      end~
    +      (hmap x: (hmap x: x0, y: y0, z: z0, w: w0),
    +** Processing line: ~            y: (hmap x: x1, y: y1, z: z1, w: w1),~
     - Inside source: true
     *** True Line Result
    -      end
    +            y: (hmap x: x1, y: y1, z: z1, w: w1),
    +** Processing line: ~            z: (hmap x: x2, y: y2, z: z2, w: w2),~
    +- Inside source: true
    +*** True Line Result
    +            z: (hmap x: x2, y: y2, z: z2, w: w2),
    +** Processing line: ~            w: (hmap x: x3, y: y3, z: z3, w: w3))~
    +- Inside source: true
    +*** True Line Result
    +            w: (hmap x: x3, y: y3, z: z3, w: w3))
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -91931,106 +93363,106 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def default_ship x, y, angle, sprite_path, bullet_sprite_path, color~
    +** Processing line: ~    def angle_z_matrix degrees~
     - Inside source: true
     *** True Line Result
    -    def default_ship x, y, angle, sprite_path, bullet_sprite_path, color
    -** Processing line: ~      state.new_entity(:ship,~
    +    def angle_z_matrix degrees
    +** Processing line: ~      cos_t = Math.cos degrees.to_radians~
     - Inside source: true
     *** True Line Result
    -      state.new_entity(:ship,
    -** Processing line: ~                      { x: x,~
    +      cos_t = Math.cos degrees.to_radians
    +** Processing line: ~      sin_t = Math.sin degrees.to_radians~
     - Inside source: true
     *** True Line Result
    -                      { x: x,
    -** Processing line: ~                        y: y,~
    +      sin_t = Math.sin degrees.to_radians
    +** Processing line: ~      (matrix_new cos_t, -sin_t, 0, 0,~
     - Inside source: true
     *** True Line Result
    -                        y: y,
    -** Processing line: ~                        dy: 0,~
    +      (matrix_new cos_t, -sin_t, 0, 0,
    +** Processing line: ~                  sin_t,  cos_t, 0, 0,~
     - Inside source: true
     *** True Line Result
    -                        dy: 0,
    -** Processing line: ~                        dx: 0,~
    +                  sin_t,  cos_t, 0, 0,
    +** Processing line: ~                  0,      0,     1, 0,~
     - Inside source: true
     *** True Line Result
    -                        dx: 0,
    -** Processing line: ~                        damage: 0,~
    +                  0,      0,     1, 0,
    +** Processing line: ~                  0,      0,     0, 1)~
     - Inside source: true
     *** True Line Result
    -                        damage: 0,
    -** Processing line: ~                        dead: false,~
    +                  0,      0,     0, 1)
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -                        dead: false,
    -** Processing line: ~                        angle: angle,~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -                        angle: angle,
    -** Processing line: ~                        max_alpha: 255,~
    +
    +** Processing line: ~    def angle_y_matrix degrees~
     - Inside source: true
     *** True Line Result
    -                        max_alpha: 255,
    -** Processing line: ~                        sprite_path: sprite_path,~
    +    def angle_y_matrix degrees
    +** Processing line: ~      cos_t = Math.cos degrees.to_radians~
     - Inside source: true
     *** True Line Result
    -                        sprite_path: sprite_path,
    -** Processing line: ~                        bullet_sprite_path: bullet_sprite_path,~
    +      cos_t = Math.cos degrees.to_radians
    +** Processing line: ~      sin_t = Math.sin degrees.to_radians~
     - Inside source: true
     *** True Line Result
    -                        bullet_sprite_path: bullet_sprite_path,
    -** Processing line: ~                        color: color })~
    +      sin_t = Math.sin degrees.to_radians
    +** Processing line: ~      (matrix_new  cos_t,  0, sin_t, 0,~
     - Inside source: true
     *** True Line Result
    -                        color: color })
    -** Processing line: ~    end~
    +      (matrix_new  cos_t,  0, sin_t, 0,
    +** Processing line: ~                   0,      1, 0,     0,~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +                   0,      1, 0,     0,
    +** Processing line: ~                   -sin_t, 0, cos_t, 0,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def new_red_ship~
    +                   -sin_t, 0, cos_t, 0,
    +** Processing line: ~                   0,      0, 0,     1)~
     - Inside source: true
     *** True Line Result
    -    def new_red_ship
    -** Processing line: ~      default_ship(400, 250.randomize(:sign, :ratio),~
    +                   0,      0, 0,     1)
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      default_ship(400, 250.randomize(:sign, :ratio),
    -** Processing line: ~                   180, 'sprites/ship_red.png', 'sprites/red_bullet.png',~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -                   180, 'sprites/ship_red.png', 'sprites/red_bullet.png',
    -** Processing line: ~                   [255, 90, 90])~
    +
    +** Processing line: ~    def angle_x_matrix degrees~
     - Inside source: true
     *** True Line Result
    -                   [255, 90, 90])
    -** Processing line: ~    end~
    +    def angle_x_matrix degrees
    +** Processing line: ~      cos_t = Math.cos degrees.to_radians~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +      cos_t = Math.cos degrees.to_radians
    +** Processing line: ~      sin_t = Math.sin degrees.to_radians~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def new_blue_ship~
    +      sin_t = Math.sin degrees.to_radians
    +** Processing line: ~      (matrix_new  1,     0,      0, 0,~
     - Inside source: true
     *** True Line Result
    -    def new_blue_ship
    -** Processing line: ~      default_ship(-400, 250.randomize(:sign, :ratio),~
    +      (matrix_new  1,     0,      0, 0,
    +** Processing line: ~                   0, cos_t, -sin_t, 0,~
     - Inside source: true
     *** True Line Result
    -      default_ship(-400, 250.randomize(:sign, :ratio),
    -** Processing line: ~                   0, 'sprites/ship_blue.png', 'sprites/blue_bullet.png',~
    +                   0, cos_t, -sin_t, 0,
    +** Processing line: ~                   0, sin_t,  cos_t, 0,~
     - Inside source: true
     *** True Line Result
    -                   0, 'sprites/ship_blue.png', 'sprites/blue_bullet.png',
    -** Processing line: ~                   [110, 140, 255])~
    +                   0, sin_t,  cos_t, 0,
    +** Processing line: ~                   0,     0,      0, 1)~
     - Inside source: true
     *** True Line Result
    -                   [110, 140, 255])
    +                   0,     0,      0, 1)
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -92039,34 +93471,26 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def render~
    -- Inside source: true
    -*** True Line Result
    -    def render
    -** Processing line: ~      render_instructions~
    -- Inside source: true
    -*** True Line Result
    -      render_instructions
    -** Processing line: ~      render_score~
    +** Processing line: ~    def scale_matrix factor~
     - Inside source: true
     *** True Line Result
    -      render_score
    -** Processing line: ~      render_universe~
    +    def scale_matrix factor
    +** Processing line: ~      (matrix_new factor,      0,      0, 0,~
     - Inside source: true
     *** True Line Result
    -      render_universe
    -** Processing line: ~      render_flames~
    +      (matrix_new factor,      0,      0, 0,
    +** Processing line: ~                  0,      factor,      0, 0,~
     - Inside source: true
     *** True Line Result
    -      render_flames
    -** Processing line: ~      render_ships~
    +                  0,      factor,      0, 0,
    +** Processing line: ~                  0,           0, factor, 0,~
     - Inside source: true
     *** True Line Result
    -      render_ships
    -** Processing line: ~      render_bullets~
    +                  0,           0, factor, 0,
    +** Processing line: ~                  0,           0,      0, 1)~
     - Inside source: true
     *** True Line Result
    -      render_bullets
    +                  0,           0,      0, 1)
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -92075,258 +93499,258 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def render_ships~
    +** Processing line: ~    def input~
     - Inside source: true
     *** True Line Result
    -    def render_ships
    -** Processing line: ~      update_ship_outputs(state.ship_blue)~
    +    def input
    +** Processing line: ~      if (inputs.keyboard.shift && inputs.keyboard.p)~
     - Inside source: true
     *** True Line Result
    -      update_ship_outputs(state.ship_blue)
    -** Processing line: ~      update_ship_outputs(state.ship_red)~
    +      if (inputs.keyboard.shift && inputs.keyboard.p)
    +** Processing line: ~        state.scale -= 0.1~
     - Inside source: true
     *** True Line Result
    -      update_ship_outputs(state.ship_red)
    -** Processing line: ~      outputs.sprites << [state.ship_blue.sprite, state.ship_red.sprite]~
    +        state.scale -= 0.1
    +** Processing line: ~      elsif  inputs.keyboard.p~
     - Inside source: true
     *** True Line Result
    -      outputs.sprites << [state.ship_blue.sprite, state.ship_red.sprite]
    -** Processing line: ~      outputs.labels  << [state.ship_blue.label, state.ship_red.label]~
    +      elsif  inputs.keyboard.p
    +** Processing line: ~        state.scale += 0.1~
     - Inside source: true
     *** True Line Result
    -      outputs.labels  << [state.ship_blue.label, state.ship_red.label]
    -** Processing line: ~    end~
    +        state.scale += 0.1
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    end
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def render_instructions~
    +** Processing line: ~      if inputs.mouse.wheel~
     - Inside source: true
     *** True Line Result
    -    def render_instructions
    -** Processing line: ~      return if state.ship_blue.dx  > 0  || state.ship_blue.dy > 0  ||~
    +      if inputs.mouse.wheel
    +** Processing line: ~        state.scale += inputs.mouse.wheel.y~
     - Inside source: true
     *** True Line Result
    -      return if state.ship_blue.dx  > 0  || state.ship_blue.dy > 0  ||
    -** Processing line: ~                state.ship_red.dx   > 0  || state.ship_red.dy  > 0  ||~
    +        state.scale += inputs.mouse.wheel.y
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -                state.ship_red.dx   > 0  || state.ship_red.dy  > 0  ||
    -** Processing line: ~                state.flames.length > 0~
    +      end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -                state.flames.length > 0
    +
    +** Processing line: ~      state.scale = state.scale.clamp(0.1, 1000)~
    +- Inside source: true
    +*** True Line Result
    +      state.scale = state.scale.clamp(0.1, 1000)
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      outputs.labels << [grid.left.shift_right(30),~
    +** Processing line: ~      if (inputs.keyboard.shift && inputs.keyboard.y) || inputs.keyboard.right~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << [grid.left.shift_right(30),
    -** Processing line: ~                         grid.bottom.shift_up(30),~
    +      if (inputs.keyboard.shift && inputs.keyboard.y) || inputs.keyboard.right
    +** Processing line: ~        state.angle_y += 1~
     - Inside source: true
     *** True Line Result
    -                         grid.bottom.shift_up(30),
    -** Processing line: ~                         "Two gamepads needed to play. R1 to accelerate. Left and right on D-PAD to turn ship. Hold A to shoot. Press B to drop mines.",~
    +        state.angle_y += 1
    +** Processing line: ~      elsif (inputs.keyboard.y) || inputs.keyboard.left~
     - Inside source: true
     *** True Line Result
    -                         "Two gamepads needed to play. R1 to accelerate. Left and right on D-PAD to turn ship. Hold A to shoot. Press B to drop mines.",
    -** Processing line: ~                         0, 0, 255, 255, 255]~
    +      elsif (inputs.keyboard.y) || inputs.keyboard.left
    +** Processing line: ~        state.angle_y -= 1~
     - Inside source: true
     *** True Line Result
    -                         0, 0, 255, 255, 255]
    -** Processing line: ~    end~
    +        state.angle_y -= 1
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    end
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def calc~
    -- Inside source: true
    -*** True Line Result
    -    def calc
    -** Processing line: ~      calc_thrusts~
    +** Processing line: ~      if (inputs.keyboard.shift && inputs.keyboard.x) || inputs.keyboard.down~
     - Inside source: true
     *** True Line Result
    -      calc_thrusts
    -** Processing line: ~      calc_ships~
    +      if (inputs.keyboard.shift && inputs.keyboard.x) || inputs.keyboard.down
    +** Processing line: ~        state.angle_x -= 1~
     - Inside source: true
     *** True Line Result
    -      calc_ships
    -** Processing line: ~      calc_bullets~
    +        state.angle_x -= 1
    +** Processing line: ~      elsif (inputs.keyboard.x || inputs.keyboard.up)~
     - Inside source: true
     *** True Line Result
    -      calc_bullets
    -** Processing line: ~      calc_winner~
    +      elsif (inputs.keyboard.x || inputs.keyboard.up)
    +** Processing line: ~        state.angle_x += 1~
     - Inside source: true
     *** True Line Result
    -      calc_winner
    -** Processing line: ~    end~
    +        state.angle_x += 1
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    end
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def input~
    +** Processing line: ~      if inputs.keyboard.shift && inputs.keyboard.z~
     - Inside source: true
     *** True Line Result
    -    def input
    -** Processing line: ~      input_accelerate~
    +      if inputs.keyboard.shift && inputs.keyboard.z
    +** Processing line: ~        state.angle_z += 1~
     - Inside source: true
     *** True Line Result
    -      input_accelerate
    -** Processing line: ~      input_turn~
    +        state.angle_z += 1
    +** Processing line: ~      elsif inputs.keyboard.z~
     - Inside source: true
     *** True Line Result
    -      input_turn
    -** Processing line: ~      input_bullets_and_mines~
    +      elsif inputs.keyboard.z
    +** Processing line: ~        state.angle_z -= 1~
     - Inside source: true
     *** True Line Result
    -      input_bullets_and_mines
    -** Processing line: ~    end~
    +        state.angle_z -= 1
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    end
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def render_score~
    +** Processing line: ~      if inputs.keyboard.zero~
     - Inside source: true
     *** True Line Result
    -    def render_score
    -** Processing line: ~      outputs.labels << [grid.left.shift_right(80),~
    +      if inputs.keyboard.zero
    +** Processing line: ~        state.angle_x = 0~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << [grid.left.shift_right(80),
    -** Processing line: ~                         grid.top.shift_down(40),~
    +        state.angle_x = 0
    +** Processing line: ~        state.angle_y = 0~
     - Inside source: true
     *** True Line Result
    -                         grid.top.shift_down(40),
    -** Processing line: ~                         state.ship_blue_score, 30, 1, state.ship_blue.color]~
    +        state.angle_y = 0
    +** Processing line: ~        state.angle_z = 0~
     - Inside source: true
     *** True Line Result
    -                         state.ship_blue_score, 30, 1, state.ship_blue.color]
    +        state.angle_z = 0
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      outputs.labels << [grid.right.shift_left(80),~
    +** Processing line: ~      angle_x = state.angle_x~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << [grid.right.shift_left(80),
    -** Processing line: ~                         grid.top.shift_down(40),~
    +      angle_x = state.angle_x
    +** Processing line: ~      angle_y = state.angle_y~
     - Inside source: true
     *** True Line Result
    -                         grid.top.shift_down(40),
    -** Processing line: ~                         state.ship_red_score,  30, 1, state.ship_red.color]~
    +      angle_y = state.angle_y
    +** Processing line: ~      angle_z = state.angle_z~
     - Inside source: true
     *** True Line Result
    -                         state.ship_red_score,  30, 1, state.ship_red.color]
    -** Processing line: ~    end~
    +      angle_z = state.angle_z
    +** Processing line: ~      scale   = state.scale~
     - Inside source: true
     *** True Line Result
    -    end
    +      scale   = state.scale
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def render_universe~
    -- Inside source: true
    -*** True Line Result
    -    def render_universe
    -** Processing line: ~      return if outputs.static_solids.any?~
    +** Processing line: ~      s_matrix = scale_matrix state.scale~
     - Inside source: true
     *** True Line Result
    -      return if outputs.static_solids.any?
    -** Processing line: ~      outputs.static_solids << grid.rect~
    +      s_matrix = scale_matrix state.scale
    +** Processing line: ~      x_matrix = angle_z_matrix angle_z~
     - Inside source: true
     *** True Line Result
    -      outputs.static_solids << grid.rect
    -** Processing line: ~      outputs.static_solids << state.stars~
    +      x_matrix = angle_z_matrix angle_z
    +** Processing line: ~      y_matrix = angle_y_matrix angle_y~
     - Inside source: true
     *** True Line Result
    -      outputs.static_solids << state.stars
    -** Processing line: ~    end~
    +      y_matrix = angle_y_matrix angle_y
    +** Processing line: ~      z_matrix = angle_x_matrix angle_x~
     - Inside source: true
     *** True Line Result
    -    end
    +      z_matrix = angle_x_matrix angle_x
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def apply_round_finished_alpha entity~
    +** Processing line: ~      state.shifted_points = state.points.map do |point|~
     - Inside source: true
     *** True Line Result
    -    def apply_round_finished_alpha entity
    -** Processing line: ~      return entity unless state.round_finished_debounce~
    +      state.shifted_points = state.points.map do |point|
    +** Processing line: ~        (matrix_mul s_matrix,~
     - Inside source: true
     *** True Line Result
    -      return entity unless state.round_finished_debounce
    -** Processing line: ~      entity.a *= state.round_finished_debounce.percentage_of(2.seconds)~
    +        (matrix_mul s_matrix,
    +** Processing line: ~                    (matrix_mul z_matrix,~
     - Inside source: true
     *** True Line Result
    -      entity.a *= state.round_finished_debounce.percentage_of(2.seconds)
    -** Processing line: ~      return entity~
    +                    (matrix_mul z_matrix,
    +** Processing line: ~                                (matrix_mul x_matrix,~
     - Inside source: true
     *** True Line Result
    -      return entity
    -** Processing line: ~    end~
    +                                (matrix_mul x_matrix,
    +** Processing line: ~                                            (matrix_mul y_matrix, point)))).merge(original: point)~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +                                            (matrix_mul y_matrix, point)))).merge(original: point)
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def update_ship_outputs ship, sprite_size = 66~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    def update_ship_outputs ship, sprite_size = 66
    -** Processing line: ~      ship.sprite =~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      ship.sprite =
    -** Processing line: ~        apply_round_finished_alpha [sprite_size.to_square(ship.x, ship.y),~
    +
    +** Processing line: ~    def thick_line line~
     - Inside source: true
     *** True Line Result
    -        apply_round_finished_alpha [sprite_size.to_square(ship.x, ship.y),
    -** Processing line: ~                                    ship.sprite_path,~
    +    def thick_line line
    +** Processing line: ~      [~
     - Inside source: true
     *** True Line Result
    -                                    ship.sprite_path,
    -** Processing line: ~                                    ship.angle,~
    +      [
    +** Processing line: ~        line.merge(y: line.y - 1, y2: line.y2 - 1, r: 0, g: 0, b: 0),~
     - Inside source: true
     *** True Line Result
    -                                    ship.angle,
    -** Processing line: ~                                    ship.dead ? 0 : 255 * ship.created_at.ease(2.seconds)].sprite~
    +        line.merge(y: line.y - 1, y2: line.y2 - 1, r: 0, g: 0, b: 0),
    +** Processing line: ~        line.merge(x: line.x - 1, x2: line.x2 - 1, r: 0, g: 0, b: 0),~
     - Inside source: true
     *** True Line Result
    -                                    ship.dead ? 0 : 255 * ship.created_at.ease(2.seconds)].sprite
    -** Processing line: ~      ship.label =~
    +        line.merge(x: line.x - 1, x2: line.x2 - 1, r: 0, g: 0, b: 0),
    +** Processing line: ~        line.merge(x: line.x - 0, x2: line.x2 - 0, r: 0, g: 0, b: 0),~
     - Inside source: true
     *** True Line Result
    -      ship.label =
    -** Processing line: ~        apply_round_finished_alpha [ship.x,~
    +        line.merge(x: line.x - 0, x2: line.x2 - 0, r: 0, g: 0, b: 0),
    +** Processing line: ~        line.merge(y: line.y + 1, y2: line.y2 + 1, r: 0, g: 0, b: 0),~
     - Inside source: true
     *** True Line Result
    -        apply_round_finished_alpha [ship.x,
    -** Processing line: ~                                    ship.y + 100,~
    +        line.merge(y: line.y + 1, y2: line.y2 + 1, r: 0, g: 0, b: 0),
    +** Processing line: ~        line.merge(x: line.x + 1, x2: line.x2 + 1, r: 0, g: 0, b: 0)~
     - Inside source: true
     *** True Line Result
    -                                    ship.y + 100,
    -** Processing line: ~                                    "." * 5.minus(ship.damage).greater(0), 20, 1, ship.color, 255].label~
    +        line.merge(x: line.x + 1, x2: line.x2 + 1, r: 0, g: 0, b: 0)
    +** Processing line: ~      ]~
     - Inside source: true
     *** True Line Result
    -                                    "." * 5.minus(ship.damage).greater(0), 20, 1, ship.color, 255].label
    +      ]
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -92335,306 +93759,310 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def render_flames sprite_size = 6~
    +** Processing line: ~    def render~
     - Inside source: true
     *** True Line Result
    -    def render_flames sprite_size = 6
    -** Processing line: ~      outputs.sprites << state.flames.map do |p|~
    +    def render
    +** Processing line: ~      outputs.lines << state.shifted_points.each_slice(2).map do |(p1, p2)|~
     - Inside source: true
     *** True Line Result
    -      outputs.sprites << state.flames.map do |p|
    -** Processing line: ~        apply_round_finished_alpha [sprite_size.to_square(p.x, p.y),~
    +      outputs.lines << state.shifted_points.each_slice(2).map do |(p1, p2)|
    +** Processing line: ~        perc = 0~
     - Inside source: true
     *** True Line Result
    -        apply_round_finished_alpha [sprite_size.to_square(p.x, p.y),
    -** Processing line: ~                                    'sprites/flame.png', 0,~
    +        perc = 0
    +** Processing line: ~        thick_line({ x:  p1.x.*(10) + 640, y:  p1.y.*(10) + 320,~
     - Inside source: true
     *** True Line Result
    -                                    'sprites/flame.png', 0,
    -** Processing line: ~                                    p.max_alpha * p.created_at.ease(p.lifetime, :flip)].sprite~
    +        thick_line({ x:  p1.x.*(10) + 640, y:  p1.y.*(10) + 320,
    +** Processing line: ~                     x2: p2.x.*(10) + 640, y2: p2.y.*(10) + 320,~
     - Inside source: true
     *** True Line Result
    -                                    p.max_alpha * p.created_at.ease(p.lifetime, :flip)].sprite
    -** Processing line: ~      end~
    +                     x2: p2.x.*(10) + 640, y2: p2.y.*(10) + 320,
    +** Processing line: ~                     r: 255 * perc,~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +                     r: 255 * perc,
    +** Processing line: ~                     g: 255 * perc,~
     - Inside source: true
     *** True Line Result
    -    end
    +                     g: 255 * perc,
    +** Processing line: ~                     b: 255 * perc })~
    +- Inside source: true
    +*** True Line Result
    +                     b: 255 * perc })
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def render_bullets sprite_size = 10~
    +** Processing line: ~      outputs.labels << [ 10, 700, "angle_x: #{state.angle_x.to_sf}", 0]~
     - Inside source: true
     *** True Line Result
    -    def render_bullets sprite_size = 10
    -** Processing line: ~      outputs.sprites << state.bullets.map do |b|~
    +      outputs.labels << [ 10, 700, "angle_x: #{state.angle_x.to_sf}", 0]
    +** Processing line: ~      outputs.labels << [ 10, 670, "x, shift+x", 0]~
     - Inside source: true
     *** True Line Result
    -      outputs.sprites << state.bullets.map do |b|
    -** Processing line: ~        apply_round_finished_alpha [b.sprite_size.to_square(b.x, b.y),~
    +      outputs.labels << [ 10, 670, "x, shift+x", 0]
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        apply_round_finished_alpha [b.sprite_size.to_square(b.x, b.y),
    -** Processing line: ~                                    b.owner.bullet_sprite_path,~
    +
    +** Processing line: ~      outputs.labels << [210, 700, "angle_y: #{state.angle_y.to_sf}", 0]~
     - Inside source: true
     *** True Line Result
    -                                    b.owner.bullet_sprite_path,
    -** Processing line: ~                                    0, b.max_alpha].sprite~
    +      outputs.labels << [210, 700, "angle_y: #{state.angle_y.to_sf}", 0]
    +** Processing line: ~      outputs.labels << [210, 670, "y, shift+y", 0]~
     - Inside source: true
     *** True Line Result
    -                                    0, b.max_alpha].sprite
    -** Processing line: ~      end~
    +      outputs.labels << [210, 670, "y, shift+y", 0]
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +
    +** Processing line: ~      outputs.labels << [410, 700, "angle_z: #{state.angle_z.to_sf}", 0]~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +      outputs.labels << [410, 700, "angle_z: #{state.angle_z.to_sf}", 0]
    +** Processing line: ~      outputs.labels << [410, 670, "z, shift+z", 0]~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def wrap_location! location~
    +      outputs.labels << [410, 670, "z, shift+z", 0]
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    def wrap_location! location
    -** Processing line: ~      location.x = grid.left    if location.x > grid.right~
    +
    +** Processing line: ~      outputs.labels << [610, 700, "scale: #{state.scale.to_sf}", 0]~
     - Inside source: true
     *** True Line Result
    -      location.x = grid.left    if location.x > grid.right
    -** Processing line: ~      location.x = grid.right   if location.x < grid.left~
    +      outputs.labels << [610, 700, "scale: #{state.scale.to_sf}", 0]
    +** Processing line: ~      outputs.labels << [610, 670, "p, shift+p", 0]~
     - Inside source: true
     *** True Line Result
    -      location.x = grid.right   if location.x < grid.left
    -** Processing line: ~      location.y = grid.top     if location.y < grid.bottom~
    +      outputs.labels << [610, 670, "p, shift+p", 0]
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      location.y = grid.top     if location.y < grid.bottom
    -** Processing line: ~      location.y = grid.bottom  if location.y > grid.top~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -      location.y = grid.bottom  if location.y > grid.top
    -** Processing line: ~      location~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      location
    -** Processing line: ~    end~
    +
    +** Processing line: ~  $game = Game.new~
     - Inside source: true
     *** True Line Result
    -    end
    +  $game = Game.new
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def calc_thrusts~
    -- Inside source: true
    -*** True Line Result
    -    def calc_thrusts
    -** Processing line: ~      state.flames =~
    +** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
    -      state.flames =
    -** Processing line: ~        state.flames~
    +  def tick args
    +** Processing line: ~    $game.args = args~
     - Inside source: true
     *** True Line Result
    -        state.flames
    -** Processing line: ~          .reject(&:old?)~
    +    $game.args = args
    +** Processing line: ~    $game.tick~
     - Inside source: true
     *** True Line Result
    -          .reject(&:old?)
    -** Processing line: ~          .map do |p|~
    +    $game.tick
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -          .map do |p|
    -** Processing line: ~            p.speed *= 0.9~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -            p.speed *= 0.9
    -** Processing line: ~            p.y += p.angle.vector_y(p.speed)~
    +
    +** Processing line: ~  def set_angles x, y, z~
     - Inside source: true
     *** True Line Result
    -            p.y += p.angle.vector_y(p.speed)
    -** Processing line: ~            p.x += p.angle.vector_x(p.speed)~
    +  def set_angles x, y, z
    +** Processing line: ~    $game.state.angle_x = x~
     - Inside source: true
     *** True Line Result
    -            p.x += p.angle.vector_x(p.speed)
    -** Processing line: ~            wrap_location! p~
    +    $game.state.angle_x = x
    +** Processing line: ~    $game.state.angle_y = y~
     - Inside source: true
     *** True Line Result
    -            wrap_location! p
    -** Processing line: ~        end~
    +    $game.state.angle_y = y
    +** Processing line: ~    $game.state.angle_z = z~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~    end~
    +    $game.state.angle_z = z
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    end
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def all_ships~
    +** Processing line: ~  $gtk.reset~
     - Inside source: true
     *** True Line Result
    -    def all_ships
    -** Processing line: ~      [state.ship_blue, state.ship_red]~
    +  $gtk.reset
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      [state.ship_blue, state.ship_red]
    -** Processing line: ~    end~
    -- Inside source: true
    +
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
     *** True Line Result
    -    end
    +#+end_src
     ** Processing line: ~~
    -- Inside source: true
    +- End of paragraph detected.
     *** True Line Result
     
    -** Processing line: ~    def alive_ships~
    -- Inside source: true
    +** Processing line: ~*** Arcade - Bullet Hell - main.rb~
    +- Header detected.
     *** True Line Result
    -    def alive_ships
    -** Processing line: ~      all_ships.reject { |s| s.dead }~
    -- Inside source: true
    +
     *** True Line Result
    -      all_ships.reject { |s| s.dead }
    -** Processing line: ~    end~
    +*** Arcade - Bullet Hell - main.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/99_genre_arcade/bullet_hell/app/main.rb~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +  # ./samples/99_genre_arcade/bullet_hell/app/main.rb
    +** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def calc_bullet bullet~
    +  def tick args
    +** Processing line: ~    args.state.base_columns   ||= 10.times.map { |n| 50 * n + 1280 / 2 - 5 * 50 + 5 }~
     - Inside source: true
     *** True Line Result
    -    def calc_bullet bullet
    -** Processing line: ~      bullet.y += bullet.angle.vector_y(bullet.speed)~
    +    args.state.base_columns   ||= 10.times.map { |n| 50 * n + 1280 / 2 - 5 * 50 + 5 }
    +** Processing line: ~    args.state.base_rows      ||= 5.times.map { |n| 50 * n + 720 - 5 * 50 }~
     - Inside source: true
     *** True Line Result
    -      bullet.y += bullet.angle.vector_y(bullet.speed)
    -** Processing line: ~      bullet.x += bullet.angle.vector_x(bullet.speed)~
    +    args.state.base_rows      ||= 5.times.map { |n| 50 * n + 720 - 5 * 50 }
    +** Processing line: ~    args.state.offset_columns = 10.times.map { |n| (n - 4.5) * Math.sin(Kernel.tick_count.to_radians) * 12 }~
     - Inside source: true
     *** True Line Result
    -      bullet.x += bullet.angle.vector_x(bullet.speed)
    -** Processing line: ~      wrap_location! bullet~
    +    args.state.offset_columns = 10.times.map { |n| (n - 4.5) * Math.sin(Kernel.tick_count.to_radians) * 12 }
    +** Processing line: ~    args.state.offset_rows    = 5.map { 0 }~
     - Inside source: true
     *** True Line Result
    -      wrap_location! bullet
    -** Processing line: ~      explode_bullet! bullet if bullet.old?~
    +    args.state.offset_rows    = 5.map { 0 }
    +** Processing line: ~    args.state.columns        = 10.times.map { |i| args.state.base_columns[i] + args.state.offset_columns[i] }~
     - Inside source: true
     *** True Line Result
    -      explode_bullet! bullet if bullet.old?
    -** Processing line: ~      return if bullet.exploded~
    +    args.state.columns        = 10.times.map { |i| args.state.base_columns[i] + args.state.offset_columns[i] }
    +** Processing line: ~    args.state.rows           = 5.times.map { |i| args.state.base_rows[i] + args.state.offset_rows[i] }~
     - Inside source: true
     *** True Line Result
    -      return if bullet.exploded
    -** Processing line: ~      return if state.round_finished~
    +    args.state.rows           = 5.times.map { |i| args.state.base_rows[i] + args.state.offset_rows[i] }
    +** Processing line: ~    args.state.explosions     ||= []~
     - Inside source: true
     *** True Line Result
    -      return if state.round_finished
    -** Processing line: ~      alive_ships.each do |s|~
    +    args.state.explosions     ||= []
    +** Processing line: ~    args.state.enemies        ||= []~
     - Inside source: true
     *** True Line Result
    -      alive_ships.each do |s|
    -** Processing line: ~        if s != bullet.owner &&~
    +    args.state.enemies        ||= []
    +** Processing line: ~    args.state.score          ||= 0~
     - Inside source: true
     *** True Line Result
    -        if s != bullet.owner &&
    -** Processing line: ~           s.sprite.intersect_rect?(bullet.sprite_size.to_square(bullet.x, bullet.y))~
    +    args.state.score          ||= 0
    +** Processing line: ~    args.state.wave           ||= 0~
     - Inside source: true
     *** True Line Result
    -           s.sprite.intersect_rect?(bullet.sprite_size.to_square(bullet.x, bullet.y))
    -** Processing line: ~          explode_bullet! bullet, 10, 5, 30~
    +    args.state.wave           ||= 0
    +** Processing line: ~    if args.state.enemies.empty?~
     - Inside source: true
     *** True Line Result
    -          explode_bullet! bullet, 10, 5, 30
    -** Processing line: ~          s.damage += 1~
    +    if args.state.enemies.empty?
    +** Processing line: ~      args.state.wave      += 1~
     - Inside source: true
     *** True Line Result
    -          s.damage += 1
    -** Processing line: ~        end~
    +      args.state.wave      += 1
    +** Processing line: ~      args.state.wave_root = Math.sqrt(args.state.wave)~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~      end~
    +      args.state.wave_root = Math.sqrt(args.state.wave)
    +** Processing line: ~      args.state.enemies   = make_enemies~
     - Inside source: true
     *** True Line Result
    -      end
    +      args.state.enemies   = make_enemies
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
         end
    -** Processing line: ~~
    -- Inside source: true
    -*** True Line Result
    -
    -** Processing line: ~    def calc_bullets~
    +** Processing line: ~    args.state.player         ||= {x: 620, y: 80, w: 40, h: 40, path: 'sprites/circle-gray.png', angle: 90, cooldown: 0, alive: true}~
     - Inside source: true
     *** True Line Result
    -    def calc_bullets
    -** Processing line: ~      state.bullets.each    { |b| calc_bullet b }~
    +    args.state.player         ||= {x: 620, y: 80, w: 40, h: 40, path: 'sprites/circle-gray.png', angle: 90, cooldown: 0, alive: true}
    +** Processing line: ~    args.state.enemy_bullets  ||= []~
     - Inside source: true
     *** True Line Result
    -      state.bullets.each    { |b| calc_bullet b }
    -** Processing line: ~      state.bullets.reject! { |b| b.exploded }~
    +    args.state.enemy_bullets  ||= []
    +** Processing line: ~    args.state.player_bullets ||= []~
     - Inside source: true
     *** True Line Result
    -      state.bullets.reject! { |b| b.exploded }
    -** Processing line: ~    end~
    +    args.state.player_bullets ||= []
    +** Processing line: ~    args.state.lives          ||= 3~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +    args.state.lives          ||= 3
    +** Processing line: ~    args.state.missed_shots   ||= 0~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def create_explosion! type, entity, flame_count, max_speed, lifetime, max_alpha = 255~
    +    args.state.missed_shots   ||= 0
    +** Processing line: ~    args.state.fired_shots    ||= 0~
     - Inside source: true
     *** True Line Result
    -    def create_explosion! type, entity, flame_count, max_speed, lifetime, max_alpha = 255
    -** Processing line: ~      flame_count.times do~
    +    args.state.fired_shots    ||= 0
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      flame_count.times do
    -** Processing line: ~        state.flames << state.new_entity(type,~
    +
    +** Processing line: ~    update_explosions args~
     - Inside source: true
     *** True Line Result
    -        state.flames << state.new_entity(type,
    -** Processing line: ~                                       { angle: 360.randomize(:ratio),~
    +    update_explosions args
    +** Processing line: ~    update_enemy_positions args~
     - Inside source: true
     *** True Line Result
    -                                       { angle: 360.randomize(:ratio),
    -** Processing line: ~                                         speed: max_speed.randomize(:ratio),~
    +    update_enemy_positions args
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -                                         speed: max_speed.randomize(:ratio),
    -** Processing line: ~                                         lifetime: lifetime,~
    +
    +** Processing line: ~    if args.inputs.left && args.state.player[:x] > (300 + 5)~
     - Inside source: true
     *** True Line Result
    -                                         lifetime: lifetime,
    -** Processing line: ~                                         x: entity.x,~
    +    if args.inputs.left && args.state.player[:x] > (300 + 5)
    +** Processing line: ~      args.state.player[:x] -= 5~
     - Inside source: true
     *** True Line Result
    -                                         x: entity.x,
    -** Processing line: ~                                         y: entity.y,~
    +      args.state.player[:x] -= 5
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -                                         y: entity.y,
    -** Processing line: ~                                         max_alpha: max_alpha })~
    +    end
    +** Processing line: ~    if args.inputs.right && args.state.player[:x] < (1280 - args.state.player[:w] - 300 - 5)~
     - Inside source: true
     *** True Line Result
    -                                         max_alpha: max_alpha })
    -** Processing line: ~      end~
    +    if args.inputs.right && args.state.player[:x] < (1280 - args.state.player[:w] - 300 - 5)
    +** Processing line: ~      args.state.player[:x] += 5~
     - Inside source: true
     *** True Line Result
    -      end
    +      args.state.player[:x] += 5
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -92643,62 +94071,34 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def explode_bullet! bullet, flame_override = 5, max_speed = 5, lifetime = 10~
    -- Inside source: true
    -*** True Line Result
    -    def explode_bullet! bullet, flame_override = 5, max_speed = 5, lifetime = 10
    -** Processing line: ~      bullet.exploded = true~
    -- Inside source: true
    -*** True Line Result
    -      bullet.exploded = true
    -** Processing line: ~      create_explosion! :bullet_explosion,~
    -- Inside source: true
    -*** True Line Result
    -      create_explosion! :bullet_explosion,
    -** Processing line: ~                        bullet,~
    -- Inside source: true
    -*** True Line Result
    -                        bullet,
    -** Processing line: ~                        flame_override,~
    -- Inside source: true
    -*** True Line Result
    -                        flame_override,
    -** Processing line: ~                        max_speed,~
    +** Processing line: ~    args.state.enemy_bullets.each do |bullet|~
     - Inside source: true
     *** True Line Result
    -                        max_speed,
    -** Processing line: ~                        lifetime,~
    +    args.state.enemy_bullets.each do |bullet|
    +** Processing line: ~      bullet[:x] += bullet[:dx]~
     - Inside source: true
     *** True Line Result
    -                        lifetime,
    -** Processing line: ~                        bullet.max_alpha~
    +      bullet[:x] += bullet[:dx]
    +** Processing line: ~      bullet[:y] += bullet[:dy]~
     - Inside source: true
     *** True Line Result
    -                        bullet.max_alpha
    +      bullet[:y] += bullet[:dy]
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
         end
    -** Processing line: ~~
    -- Inside source: true
    -*** True Line Result
    -
    -** Processing line: ~    def calc_ship ship~
    -- Inside source: true
    -*** True Line Result
    -    def calc_ship ship
    -** Processing line: ~      ship.x += ship.dx~
    +** Processing line: ~    args.state.player_bullets.each do |bullet|~
     - Inside source: true
     *** True Line Result
    -      ship.x += ship.dx
    -** Processing line: ~      ship.y += ship.dy~
    +    args.state.player_bullets.each do |bullet|
    +** Processing line: ~      bullet[:x] += bullet[:dx]~
     - Inside source: true
     *** True Line Result
    -      ship.y += ship.dy
    -** Processing line: ~      wrap_location! ship~
    +      bullet[:x] += bullet[:dx]
    +** Processing line: ~      bullet[:y] += bullet[:dy]~
     - Inside source: true
     *** True Line Result
    -      wrap_location! ship
    +      bullet[:y] += bullet[:dy]
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -92707,34 +94107,38 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def calc_ships~
    +** Processing line: ~    args.state.enemy_bullets  = args.state.enemy_bullets.find_all { |bullet| bullet[:y].between?(-16, 736) }~
     - Inside source: true
     *** True Line Result
    -    def calc_ships
    -** Processing line: ~      all_ships.each { |s| calc_ship s }~
    +    args.state.enemy_bullets  = args.state.enemy_bullets.find_all { |bullet| bullet[:y].between?(-16, 736) }
    +** Processing line: ~    args.state.player_bullets = args.state.player_bullets.find_all do |bullet|~
     - Inside source: true
     *** True Line Result
    -      all_ships.each { |s| calc_ship s }
    -** Processing line: ~      return if all_ships.any? { |s| s.dead }~
    +    args.state.player_bullets = args.state.player_bullets.find_all do |bullet|
    +** Processing line: ~      if bullet[:y].between?(-16, 736)~
     - Inside source: true
     *** True Line Result
    -      return if all_ships.any? { |s| s.dead }
    -** Processing line: ~      return if state.round_finished~
    +      if bullet[:y].between?(-16, 736)
    +** Processing line: ~        true~
     - Inside source: true
     *** True Line Result
    -      return if state.round_finished
    -** Processing line: ~      return unless state.ship_blue.sprite.intersect_rect?(state.ship_red.sprite)~
    +        true
    +** Processing line: ~      else~
     - Inside source: true
     *** True Line Result
    -      return unless state.ship_blue.sprite.intersect_rect?(state.ship_red.sprite)
    -** Processing line: ~      state.ship_blue.damage = 5~
    +      else
    +** Processing line: ~        args.state.missed_shots += 1~
     - Inside source: true
     *** True Line Result
    -      state.ship_blue.damage = 5
    -** Processing line: ~      state.ship_red.damage  = 5~
    +        args.state.missed_shots += 1
    +** Processing line: ~        false~
     - Inside source: true
     *** True Line Result
    -      state.ship_red.damage  = 5
    +        false
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -92743,118 +94147,118 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def create_thruster_flames! ship~
    +** Processing line: ~    args.state.enemies = args.state.enemies.reject do |enemy|~
     - Inside source: true
     *** True Line Result
    -    def create_thruster_flames! ship
    -** Processing line: ~      state.flames << state.new_entity(:ship_thruster,~
    +    args.state.enemies = args.state.enemies.reject do |enemy|
    +** Processing line: ~      if args.state.player[:alive] && 1500 > (args.state.player[:x] - enemy[:x]) ** 2 + (args.state.player[:y] - enemy[:y]) ** 2~
     - Inside source: true
     *** True Line Result
    -      state.flames << state.new_entity(:ship_thruster,
    -** Processing line: ~                                     { angle: ship.angle + 180 + 60.randomize(:sign, :ratio),~
    +      if args.state.player[:alive] && 1500 > (args.state.player[:x] - enemy[:x]) ** 2 + (args.state.player[:y] - enemy[:y]) ** 2
    +** Processing line: ~        args.state.explosions << {x: enemy[:x] + 4, y: enemy[:y] + 4, w: 32, h: 32, path: 'sprites/explosion-0.png', age: 0}~
     - Inside source: true
     *** True Line Result
    -                                     { angle: ship.angle + 180 + 60.randomize(:sign, :ratio),
    -** Processing line: ~                                       speed: 5.randomize(:ratio),~
    +        args.state.explosions << {x: enemy[:x] + 4, y: enemy[:y] + 4, w: 32, h: 32, path: 'sprites/explosion-0.png', age: 0}
    +** Processing line: ~        args.state.explosions << {x: args.state.player[:x] + 4, y: args.state.player[:y] + 4, w: 32, h: 32, path: 'sprites/explosion-0.png', age: 0}~
     - Inside source: true
     *** True Line Result
    -                                       speed: 5.randomize(:ratio),
    -** Processing line: ~                                       max_alpha: 255 * ship.created_at_elapsed.percentage_of(2.seconds),~
    +        args.state.explosions << {x: args.state.player[:x] + 4, y: args.state.player[:y] + 4, w: 32, h: 32, path: 'sprites/explosion-0.png', age: 0}
    +** Processing line: ~        args.state.player[:alive] = false~
     - Inside source: true
     *** True Line Result
    -                                       max_alpha: 255 * ship.created_at_elapsed.percentage_of(2.seconds),
    -** Processing line: ~                                       lifetime: 30,~
    +        args.state.player[:alive] = false
    +** Processing line: ~        true~
     - Inside source: true
     *** True Line Result
    -                                       lifetime: 30,
    -** Processing line: ~                                       x: ship.x - ship.angle.vector_x(40) + 5.randomize(:sign, :ratio),~
    +        true
    +** Processing line: ~      else~
     - Inside source: true
     *** True Line Result
    -                                       x: ship.x - ship.angle.vector_x(40) + 5.randomize(:sign, :ratio),
    -** Processing line: ~                                       y: ship.y - ship.angle.vector_y(40) + 5.randomize(:sign, :ratio) })~
    +      else
    +** Processing line: ~        false~
     - Inside source: true
     *** True Line Result
    -                                       y: ship.y - ship.angle.vector_y(40) + 5.randomize(:sign, :ratio) })
    -** Processing line: ~    end~
    +        false
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def input_accelerate_ship should_move_ship, ship~
    +    end
    +** Processing line: ~    args.state.enemy_bullets.each do |bullet|~
     - Inside source: true
     *** True Line Result
    -    def input_accelerate_ship should_move_ship, ship
    -** Processing line: ~      return if ship.dead~
    +    args.state.enemy_bullets.each do |bullet|
    +** Processing line: ~      if args.state.player[:alive] && 400 > (args.state.player[:x] - bullet[:x] + 12) ** 2 + (args.state.player[:y] - bullet[:y] + 12) ** 2~
     - Inside source: true
     *** True Line Result
    -      return if ship.dead
    -** Processing line: ~~
    +      if args.state.player[:alive] && 400 > (args.state.player[:x] - bullet[:x] + 12) ** 2 + (args.state.player[:y] - bullet[:y] + 12) ** 2
    +** Processing line: ~        args.state.explosions << {x: args.state.player[:x] + 4, y: args.state.player[:y] + 4, w: 32, h: 32, path: 'sprites/explosion-0.png', age: 0}~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      should_move_ship &&= (ship.dx + ship.dy).abs < 5~
    +        args.state.explosions << {x: args.state.player[:x] + 4, y: args.state.player[:y] + 4, w: 32, h: 32, path: 'sprites/explosion-0.png', age: 0}
    +** Processing line: ~        args.state.player[:alive] = false~
     - Inside source: true
     *** True Line Result
    -      should_move_ship &&= (ship.dx + ship.dy).abs < 5
    -** Processing line: ~~
    +        args.state.player[:alive] = false
    +** Processing line: ~        bullet[:despawn]          = true~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      if should_move_ship~
    +        bullet[:despawn]          = true
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -      if should_move_ship
    -** Processing line: ~        create_thruster_flames! ship~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -        create_thruster_flames! ship
    -** Processing line: ~        ship.dx += ship.angle.vector_x 0.050~
    +    end
    +** Processing line: ~    args.state.enemies = args.state.enemies.reject do |enemy|~
     - Inside source: true
     *** True Line Result
    -        ship.dx += ship.angle.vector_x 0.050
    -** Processing line: ~        ship.dy += ship.angle.vector_y 0.050~
    +    args.state.enemies = args.state.enemies.reject do |enemy|
    +** Processing line: ~      args.state.player_bullets.any? do |bullet|~
     - Inside source: true
     *** True Line Result
    -        ship.dy += ship.angle.vector_y 0.050
    -** Processing line: ~      else~
    +      args.state.player_bullets.any? do |bullet|
    +** Processing line: ~        if 400 > (enemy[:x] - bullet[:x] + 12) ** 2 + (enemy[:y] - bullet[:y] + 12) ** 2~
     - Inside source: true
     *** True Line Result
    -      else
    -** Processing line: ~        ship.dx *= 0.99~
    +        if 400 > (enemy[:x] - bullet[:x] + 12) ** 2 + (enemy[:y] - bullet[:y] + 12) ** 2
    +** Processing line: ~          args.state.explosions << {x: enemy[:x] + 4, y: enemy[:y] + 4, w: 32, h: 32, path: 'sprites/explosion-0.png', age: 0}~
     - Inside source: true
     *** True Line Result
    -        ship.dx *= 0.99
    -** Processing line: ~        ship.dy *= 0.99~
    +          args.state.explosions << {x: enemy[:x] + 4, y: enemy[:y] + 4, w: 32, h: 32, path: 'sprites/explosion-0.png', age: 0}
    +** Processing line: ~          bullet[:despawn] = true~
     - Inside source: true
     *** True Line Result
    -        ship.dy *= 0.99
    -** Processing line: ~      end~
    +          bullet[:despawn] = true
    +** Processing line: ~          args.state.score += 1000 * args.state.wave~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +          args.state.score += 1000 * args.state.wave
    +** Processing line: ~          true~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +          true
    +** Processing line: ~        else~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def input_accelerate~
    +        else
    +** Processing line: ~          false~
     - Inside source: true
     *** True Line Result
    -    def input_accelerate
    -** Processing line: ~      input_accelerate_ship inputs.controller_one.key_held.r1 || inputs.keyboard.up, state.ship_blue~
    +          false
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -      input_accelerate_ship inputs.controller_one.key_held.r1 || inputs.keyboard.up, state.ship_blue
    -** Processing line: ~      input_accelerate_ship inputs.controller_two.key_held.r1, state.ship_red~
    +        end
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -      input_accelerate_ship inputs.controller_two.key_held.r1, state.ship_red
    +      end
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -92863,206 +94267,178 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def input_turn_ship direction, ship~
    -- Inside source: true
    -*** True Line Result
    -    def input_turn_ship direction, ship
    -** Processing line: ~      ship.angle -= 3 * direction~
    +** Processing line: ~    args.state.player_bullets = args.state.player_bullets.reject { |bullet| bullet[:despawn] }~
     - Inside source: true
     *** True Line Result
    -      ship.angle -= 3 * direction
    -** Processing line: ~    end~
    +    args.state.player_bullets = args.state.player_bullets.reject { |bullet| bullet[:despawn] }
    +** Processing line: ~    args.state.enemy_bullets  = args.state.enemy_bullets.reject { |bullet| bullet[:despawn] }~
     - Inside source: true
     *** True Line Result
    -    end
    +    args.state.enemy_bullets  = args.state.enemy_bullets.reject { |bullet| bullet[:despawn] }
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def input_turn~
    -- Inside source: true
    -*** True Line Result
    -    def input_turn
    -** Processing line: ~      input_turn_ship inputs.controller_one.left_right + inputs.keyboard.left_right, state.ship_blue~
    -- Inside source: true
    -*** True Line Result
    -      input_turn_ship inputs.controller_one.left_right + inputs.keyboard.left_right, state.ship_blue
    -** Processing line: ~      input_turn_ship inputs.controller_two.left_right, state.ship_red~
    -- Inside source: true
    -*** True Line Result
    -      input_turn_ship inputs.controller_two.left_right, state.ship_red
    -** Processing line: ~    end~
    +** Processing line: ~    args.state.player[:cooldown] -= 1~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +    args.state.player[:cooldown] -= 1
    +** Processing line: ~    if args.inputs.keyboard.key_held.space && args.state.player[:cooldown] <= 0 && args.state.player[:alive]~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def input_bullet create_bullet, ship~
    +    if args.inputs.keyboard.key_held.space && args.state.player[:cooldown] <= 0 && args.state.player[:alive]
    +** Processing line: ~      args.state.player_bullets << {x: args.state.player[:x] + 12, y: args.state.player[:y] + 28, w: 16, h: 16, path: 'sprites/star.png', dx: 0, dy: 8}.sprite~
     - Inside source: true
     *** True Line Result
    -    def input_bullet create_bullet, ship
    -** Processing line: ~      return unless create_bullet~
    +      args.state.player_bullets << {x: args.state.player[:x] + 12, y: args.state.player[:y] + 28, w: 16, h: 16, path: 'sprites/star.png', dx: 0, dy: 8}.sprite
    +** Processing line: ~      args.state.fired_shots       += 1~
     - Inside source: true
     *** True Line Result
    -      return unless create_bullet
    -** Processing line: ~      return if ship.dead~
    +      args.state.fired_shots       += 1
    +** Processing line: ~      args.state.player[:cooldown] = 10 + 20 / args.state.wave~
     - Inside source: true
     *** True Line Result
    -      return if ship.dead
    -** Processing line: ~~
    +      args.state.player[:cooldown] = 10 + 20 / args.state.wave
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      state.bullets << state.new_entity(:ship_bullet,~
    +    end
    +** Processing line: ~    args.state.enemies.each do |enemy|~
     - Inside source: true
     *** True Line Result
    -      state.bullets << state.new_entity(:ship_bullet,
    -** Processing line: ~                                      { owner: ship,~
    +    args.state.enemies.each do |enemy|
    +** Processing line: ~      if Math.rand < 0.0005 + 0.0005 * args.state.wave && args.state.player[:alive] && enemy[:move_state] == :normal~
     - Inside source: true
     *** True Line Result
    -                                      { owner: ship,
    -** Processing line: ~                                        angle: ship.angle,~
    +      if Math.rand < 0.0005 + 0.0005 * args.state.wave && args.state.player[:alive] && enemy[:move_state] == :normal
    +** Processing line: ~        args.state.enemy_bullets << {x: enemy[:x] + 12, y: enemy[:y] - 8, w: 16, h: 16, path: 'sprites/star.png', dx: 0, dy: -3 - args.state.wave_root}.sprite~
     - Inside source: true
     *** True Line Result
    -                                        angle: ship.angle,
    -** Processing line: ~                                        max_alpha: 255 * ship.created_at_elapsed.percentage_of(2.seconds),~
    +        args.state.enemy_bullets << {x: enemy[:x] + 12, y: enemy[:y] - 8, w: 16, h: 16, path: 'sprites/star.png', dx: 0, dy: -3 - args.state.wave_root}.sprite
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -                                        max_alpha: 255 * ship.created_at_elapsed.percentage_of(2.seconds),
    -** Processing line: ~                                        speed: 5 + ship.dx.mult(ship.angle.vector_x) + ship.dy.mult(ship.angle.vector_y),~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -                                        speed: 5 + ship.dx.mult(ship.angle.vector_x) + ship.dy.mult(ship.angle.vector_y),
    -** Processing line: ~                                        lifetime: 120,~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -                                        lifetime: 120,
    -** Processing line: ~                                        sprite_size: 10,~
    +
    +** Processing line: ~    args.outputs.background_color = [0, 0, 0]~
     - Inside source: true
     *** True Line Result
    -                                        sprite_size: 10,
    -** Processing line: ~                                        x: ship.x + ship.angle.vector_x * 32,~
    +    args.outputs.background_color = [0, 0, 0]
    +** Processing line: ~    args.outputs.primitives << args.state.enemies.map do |enemy|~
     - Inside source: true
     *** True Line Result
    -                                        x: ship.x + ship.angle.vector_x * 32,
    -** Processing line: ~                                        y: ship.y + ship.angle.vector_y * 32 })~
    +    args.outputs.primitives << args.state.enemies.map do |enemy|
    +** Processing line: ~      [enemy[:x], enemy[:y], 40, 40, enemy[:path], -90].sprite~
     - Inside source: true
     *** True Line Result
    -                                        y: ship.y + ship.angle.vector_y * 32 })
    +      [enemy[:x], enemy[:y], 40, 40, enemy[:path], -90].sprite
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
         end
    -** Processing line: ~~
    +** Processing line: ~    args.outputs.primitives << args.state.player if args.state.player[:alive]~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def input_mine create_mine, ship~
    +    args.outputs.primitives << args.state.player if args.state.player[:alive]
    +** Processing line: ~    args.outputs.primitives << args.state.explosions~
     - Inside source: true
     *** True Line Result
    -    def input_mine create_mine, ship
    -** Processing line: ~      return unless create_mine~
    +    args.outputs.primitives << args.state.explosions
    +** Processing line: ~    args.outputs.primitives << args.state.player_bullets~
     - Inside source: true
     *** True Line Result
    -      return unless create_mine
    -** Processing line: ~      return if ship.dead~
    +    args.outputs.primitives << args.state.player_bullets
    +** Processing line: ~    args.outputs.primitives << args.state.enemy_bullets~
     - Inside source: true
     *** True Line Result
    -      return if ship.dead
    -** Processing line: ~~
    +    args.outputs.primitives << args.state.enemy_bullets
    +** Processing line: ~    accuracy = args.state.fired_shots.zero? ? 1 : (args.state.fired_shots - args.state.missed_shots) / args.state.fired_shots~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      state.bullets << state.new_entity(:ship_bullet,~
    +    accuracy = args.state.fired_shots.zero? ? 1 : (args.state.fired_shots - args.state.missed_shots) / args.state.fired_shots
    +** Processing line: ~    args.outputs.primitives << [~
     - Inside source: true
     *** True Line Result
    -      state.bullets << state.new_entity(:ship_bullet,
    -** Processing line: ~                                      { owner: ship,~
    +    args.outputs.primitives << [
    +** Processing line: ~      [0, 0, 300, 720, 96, 0, 0].solid,~
     - Inside source: true
     *** True Line Result
    -                                      { owner: ship,
    -** Processing line: ~                                        angle: 360.randomize(:sign, :ratio),~
    +      [0, 0, 300, 720, 96, 0, 0].solid,
    +** Processing line: ~      [1280 - 300, 0, 300, 720, 96, 0, 0].solid,~
     - Inside source: true
     *** True Line Result
    -                                        angle: 360.randomize(:sign, :ratio),
    -** Processing line: ~                                        max_alpha: 255 * ship.created_at_elapsed.percentage_of(2.seconds),~
    +      [1280 - 300, 0, 300, 720, 96, 0, 0].solid,
    +** Processing line: ~      [1280 - 290, 60, "Wave     #{args.state.wave}", 255, 255, 255].label,~
     - Inside source: true
     *** True Line Result
    -                                        max_alpha: 255 * ship.created_at_elapsed.percentage_of(2.seconds),
    -** Processing line: ~                                        speed: 0.02,~
    +      [1280 - 290, 60, "Wave     #{args.state.wave}", 255, 255, 255].label,
    +** Processing line: ~      [1280 - 290, 40, "Accuracy #{(accuracy * 100).floor}%", 255, 255, 255].label,~
     - Inside source: true
     *** True Line Result
    -                                        speed: 0.02,
    -** Processing line: ~                                        sprite_size: 10,~
    +      [1280 - 290, 40, "Accuracy #{(accuracy * 100).floor}%", 255, 255, 255].label,
    +** Processing line: ~      [1280 - 290, 20, "Score    #{(args.state.score * accuracy).floor}", 255, 255, 255].label,~
     - Inside source: true
     *** True Line Result
    -                                        sprite_size: 10,
    -** Processing line: ~                                        lifetime: 600,~
    +      [1280 - 290, 20, "Score    #{(args.state.score * accuracy).floor}", 255, 255, 255].label,
    +** Processing line: ~    ]~
     - Inside source: true
     *** True Line Result
    -                                        lifetime: 600,
    -** Processing line: ~                                        x: ship.x + ship.angle.vector_x * -50,~
    +    ]
    +** Processing line: ~    args.outputs.primitives << args.state.lives.times.map do |n|~
     - Inside source: true
     *** True Line Result
    -                                        x: ship.x + ship.angle.vector_x * -50,
    -** Processing line: ~                                        y: ship.y + ship.angle.vector_y * -50 })~
    +    args.outputs.primitives << args.state.lives.times.map do |n|
    +** Processing line: ~      [1280 - 290 + 50 * n, 80, 40, 40, 'sprites/circle-gray.png', 90].sprite~
     - Inside source: true
     *** True Line Result
    -                                        y: ship.y + ship.angle.vector_y * -50 })
    +      [1280 - 290 + 50 * n, 80, 40, 40, 'sprites/circle-gray.png', 90].sprite
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
         end
    -** Processing line: ~~
    -- Inside source: true
    -*** True Line Result
    -
    -** Processing line: ~    def input_bullets_and_mines~
    -- Inside source: true
    -*** True Line Result
    -    def input_bullets_and_mines
    -** Processing line: ~      return if state.bullets.length > 100~
    +** Processing line: ~    #args.outputs.debug << args.gtk.framerate_diagnostics_primitives~
     - Inside source: true
     *** True Line Result
    -      return if state.bullets.length > 100
    +    #args.outputs.debug << args.gtk.framerate_diagnostics_primitives
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      [~
    -- Inside source: true
    -*** True Line Result
    -      [
    -** Processing line: ~        [inputs.controller_one.key_held.a || inputs.keyboard.key_held.space,~
    +** Processing line: ~    if (!args.state.player[:alive]) && args.state.enemy_bullets.empty? && args.state.explosions.empty? && args.state.enemies.all? { |enemy| enemy[:move_state] == :normal }~
     - Inside source: true
     *** True Line Result
    -        [inputs.controller_one.key_held.a || inputs.keyboard.key_held.space,
    -** Processing line: ~         inputs.controller_one.key_down.b || inputs.keyboard.key_down.down,~
    +    if (!args.state.player[:alive]) && args.state.enemy_bullets.empty? && args.state.explosions.empty? && args.state.enemies.all? { |enemy| enemy[:move_state] == :normal }
    +** Processing line: ~      args.state.player[:alive] = true~
     - Inside source: true
     *** True Line Result
    -         inputs.controller_one.key_down.b || inputs.keyboard.key_down.down,
    -** Processing line: ~         state.ship_blue],~
    +      args.state.player[:alive] = true
    +** Processing line: ~      args.state.player[:x]     = 624~
     - Inside source: true
     *** True Line Result
    -         state.ship_blue],
    -** Processing line: ~        [inputs.controller_two.key_held.a, inputs.controller_two.key_down.b, state.ship_red]~
    +      args.state.player[:x]     = 624
    +** Processing line: ~      args.state.player[:y]     = 80~
     - Inside source: true
     *** True Line Result
    -        [inputs.controller_two.key_held.a, inputs.controller_two.key_down.b, state.ship_red]
    -** Processing line: ~      ].each do |a_held, b_down, ship|~
    +      args.state.player[:y]     = 80
    +** Processing line: ~      args.state.lives          -= 1~
     - Inside source: true
     *** True Line Result
    -      ].each do |a_held, b_down, ship|
    -** Processing line: ~        input_bullet(a_held && state.tick_count.mod_zero?(10).or(a_held == 0), ship)~
    +      args.state.lives          -= 1
    +** Processing line: ~      if args.state.lives == -1~
     - Inside source: true
     *** True Line Result
    -        input_bullet(a_held && state.tick_count.mod_zero?(10).or(a_held == 0), ship)
    -** Processing line: ~        input_mine(b_down, ship)~
    +      if args.state.lives == -1
    +** Processing line: ~        args.state.clear!~
     - Inside source: true
     *** True Line Result
    -        input_mine(b_down, ship)
    +        args.state.clear!
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    @@ -93071,266 +94447,254 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
         end
    -** Processing line: ~~
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def calc_kill_ships~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    def calc_kill_ships
    -** Processing line: ~      alive_ships.find_all { |s| s.damage >= 5 }.each do |s|~
    +
    +** Processing line: ~  def make_enemies~
     - Inside source: true
     *** True Line Result
    -      alive_ships.find_all { |s| s.damage >= 5 }.each do |s|
    -** Processing line: ~        s.dead = true~
    +  def make_enemies
    +** Processing line: ~    enemies = []~
     - Inside source: true
     *** True Line Result
    -        s.dead = true
    -** Processing line: ~        create_explosion! :ship_explosion, s, 20, 20, 30, s.max_alpha~
    +    enemies = []
    +** Processing line: ~    enemies += 10.times.map { |n| {x: Math.rand * 1280 * 2 - 640, y: Math.rand * 720 * 2 + 720, row: 0, col: n, path: 'sprites/circle-orange.png', move_state: :retreat} }~
     - Inside source: true
     *** True Line Result
    -        create_explosion! :ship_explosion, s, 20, 20, 30, s.max_alpha
    -** Processing line: ~      end~
    +    enemies += 10.times.map { |n| {x: Math.rand * 1280 * 2 - 640, y: Math.rand * 720 * 2 + 720, row: 0, col: n, path: 'sprites/circle-orange.png', move_state: :retreat} }
    +** Processing line: ~    enemies += 10.times.map { |n| {x: Math.rand * 1280 * 2 - 640, y: Math.rand * 720 * 2 + 720, row: 1, col: n, path: 'sprites/circle-orange.png', move_state: :retreat} }~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +    enemies += 10.times.map { |n| {x: Math.rand * 1280 * 2 - 640, y: Math.rand * 720 * 2 + 720, row: 1, col: n, path: 'sprites/circle-orange.png', move_state: :retreat} }
    +** Processing line: ~    enemies += 8.times.map { |n| {x: Math.rand * 1280 * 2 - 640, y: Math.rand * 720 * 2 + 720, row: 2, col: n + 1, path: 'sprites/circle-blue.png', move_state: :retreat} }~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +    enemies += 8.times.map { |n| {x: Math.rand * 1280 * 2 - 640, y: Math.rand * 720 * 2 + 720, row: 2, col: n + 1, path: 'sprites/circle-blue.png', move_state: :retreat} }
    +** Processing line: ~    enemies += 8.times.map { |n| {x: Math.rand * 1280 * 2 - 640, y: Math.rand * 720 * 2 + 720, row: 3, col: n + 1, path: 'sprites/circle-blue.png', move_state: :retreat} }~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def calc_score~
    +    enemies += 8.times.map { |n| {x: Math.rand * 1280 * 2 - 640, y: Math.rand * 720 * 2 + 720, row: 3, col: n + 1, path: 'sprites/circle-blue.png', move_state: :retreat} }
    +** Processing line: ~    enemies += 4.times.map { |n| {x: Math.rand * 1280 * 2 - 640, y: Math.rand * 720 * 2 + 720, row: 4, col: n + 3, path: 'sprites/circle-green.png', move_state: :retreat} }~
     - Inside source: true
     *** True Line Result
    -    def calc_score
    -** Processing line: ~      return if state.round_finished~
    +    enemies += 4.times.map { |n| {x: Math.rand * 1280 * 2 - 640, y: Math.rand * 720 * 2 + 720, row: 4, col: n + 3, path: 'sprites/circle-green.png', move_state: :retreat} }
    +** Processing line: ~    enemies~
     - Inside source: true
     *** True Line Result
    -      return if state.round_finished
    -** Processing line: ~      return if alive_ships.length > 1~
    +    enemies
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -      return if alive_ships.length > 1
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      if alive_ships.first == state.ship_red~
    -- Inside source: true
    -*** True Line Result
    -      if alive_ships.first == state.ship_red
    -** Processing line: ~        state.ship_red_score += 1~
    +** Processing line: ~  def update_explosions args~
     - Inside source: true
     *** True Line Result
    -        state.ship_red_score += 1
    -** Processing line: ~      elsif alive_ships.first == state.ship_blue~
    +  def update_explosions args
    +** Processing line: ~    args.state.explosions.each do |explosion|~
     - Inside source: true
     *** True Line Result
    -      elsif alive_ships.first == state.ship_blue
    -** Processing line: ~        state.ship_blue_score += 1~
    +    args.state.explosions.each do |explosion|
    +** Processing line: ~      explosion[:age]  += 0.5~
     - Inside source: true
     *** True Line Result
    -        state.ship_blue_score += 1
    -** Processing line: ~      end~
    +      explosion[:age]  += 0.5
    +** Processing line: ~      explosion[:path] = "sprites/explosion-#{explosion[:age].floor}.png"~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +      explosion[:path] = "sprites/explosion-#{explosion[:age].floor}.png"
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      state.round_finished = true~
    +    end
    +** Processing line: ~    args.state.explosions = args.state.explosions.reject { |explosion| explosion[:age] >= 7 }~
     - Inside source: true
     *** True Line Result
    -      state.round_finished = true
    -** Processing line: ~    end~
    +    args.state.explosions = args.state.explosions.reject { |explosion| explosion[:age] >= 7 }
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    end
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def calc_reset_ships~
    +** Processing line: ~  def update_enemy_positions args~
     - Inside source: true
     *** True Line Result
    -    def calc_reset_ships
    -** Processing line: ~      return unless state.round_finished~
    +  def update_enemy_positions args
    +** Processing line: ~    args.state.enemies.each do |enemy|~
     - Inside source: true
     *** True Line Result
    -      return unless state.round_finished
    -** Processing line: ~      state.round_finished_debounce ||= 2.seconds~
    +    args.state.enemies.each do |enemy|
    +** Processing line: ~      if enemy[:move_state] == :normal~
     - Inside source: true
     *** True Line Result
    -      state.round_finished_debounce ||= 2.seconds
    -** Processing line: ~      state.round_finished_debounce -= 1~
    +      if enemy[:move_state] == :normal
    +** Processing line: ~        enemy[:x]          = args.state.columns[enemy[:col]]~
     - Inside source: true
     *** True Line Result
    -      state.round_finished_debounce -= 1
    -** Processing line: ~      return if state.round_finished_debounce > 0~
    +        enemy[:x]          = args.state.columns[enemy[:col]]
    +** Processing line: ~        enemy[:y]          = args.state.rows[enemy[:row]]~
     - Inside source: true
     *** True Line Result
    -      return if state.round_finished_debounce > 0
    -** Processing line: ~      start_new_round!~
    +        enemy[:y]          = args.state.rows[enemy[:row]]
    +** Processing line: ~        enemy[:move_state] = :dive if Math.rand < 0.0002 + 0.00005 * args.state.wave && args.state.player[:alive]~
     - Inside source: true
     *** True Line Result
    -      start_new_round!
    -** Processing line: ~    end~
    +        enemy[:move_state] = :dive if Math.rand < 0.0002 + 0.00005 * args.state.wave && args.state.player[:alive]
    +** Processing line: ~      elsif enemy[:move_state] == :dive~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +      elsif enemy[:move_state] == :dive
    +** Processing line: ~        enemy[:target_x] ||= args.state.player[:x]~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def start_new_round!~
    +        enemy[:target_x] ||= args.state.player[:x]
    +** Processing line: ~        enemy[:target_y] ||= args.state.player[:y]~
     - Inside source: true
     *** True Line Result
    -    def start_new_round!
    -** Processing line: ~      state.ship_blue = new_blue_ship~
    +        enemy[:target_y] ||= args.state.player[:y]
    +** Processing line: ~        dx               = enemy[:target_x] - enemy[:x]~
     - Inside source: true
     *** True Line Result
    -      state.ship_blue = new_blue_ship
    -** Processing line: ~      state.ship_red  = new_red_ship~
    +        dx               = enemy[:target_x] - enemy[:x]
    +** Processing line: ~        dy               = enemy[:target_y] - enemy[:y]~
     - Inside source: true
     *** True Line Result
    -      state.ship_red  = new_red_ship
    -** Processing line: ~      state.round_finished = false~
    +        dy               = enemy[:target_y] - enemy[:y]
    +** Processing line: ~        vel              = Math.sqrt(dx * dx + dy * dy)~
     - Inside source: true
     *** True Line Result
    -      state.round_finished = false
    -** Processing line: ~      state.round_finished_debounce = nil~
    +        vel              = Math.sqrt(dx * dx + dy * dy)
    +** Processing line: ~        speed_limit      = 2 + args.state.wave_root~
     - Inside source: true
     *** True Line Result
    -      state.round_finished_debounce = nil
    -** Processing line: ~      state.flames.clear~
    +        speed_limit      = 2 + args.state.wave_root
    +** Processing line: ~        if vel > speed_limit~
     - Inside source: true
     *** True Line Result
    -      state.flames.clear
    -** Processing line: ~      state.bullets.clear~
    +        if vel > speed_limit
    +** Processing line: ~          dx /= vel / speed_limit~
     - Inside source: true
     *** True Line Result
    -      state.bullets.clear
    -** Processing line: ~    end~
    +          dx /= vel / speed_limit
    +** Processing line: ~          dy /= vel / speed_limit~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +          dy /= vel / speed_limit
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def calc_winner~
    +        end
    +** Processing line: ~        if vel < 1 || !args.state.player[:alive]~
     - Inside source: true
     *** True Line Result
    -    def calc_winner
    -** Processing line: ~      calc_kill_ships~
    +        if vel < 1 || !args.state.player[:alive]
    +** Processing line: ~          enemy[:move_state] = :retreat~
     - Inside source: true
     *** True Line Result
    -      calc_kill_ships
    -** Processing line: ~      calc_score~
    +          enemy[:move_state] = :retreat
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -      calc_score
    -** Processing line: ~      calc_reset_ships~
    +        end
    +** Processing line: ~        enemy[:x] += dx~
     - Inside source: true
     *** True Line Result
    -      calc_reset_ships
    -** Processing line: ~    end~
    +        enemy[:x] += dx
    +** Processing line: ~        enemy[:y] += dy~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~  end~
    +        enemy[:y] += dy
    +** Processing line: ~      elsif enemy[:move_state] == :retreat~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +      elsif enemy[:move_state] == :retreat
    +** Processing line: ~        enemy[:target_x] = args.state.columns[enemy[:col]]~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  $dueling_spaceship = DuelingSpaceships.new~
    +        enemy[:target_x] = args.state.columns[enemy[:col]]
    +** Processing line: ~        enemy[:target_y] = args.state.rows[enemy[:row]]~
     - Inside source: true
     *** True Line Result
    -  $dueling_spaceship = DuelingSpaceships.new
    -** Processing line: ~~
    +        enemy[:target_y] = args.state.rows[enemy[:row]]
    +** Processing line: ~        dx               = enemy[:target_x] - enemy[:x]~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def tick args~
    +        dx               = enemy[:target_x] - enemy[:x]
    +** Processing line: ~        dy               = enemy[:target_y] - enemy[:y]~
     - Inside source: true
     *** True Line Result
    -  def tick args
    -** Processing line: ~    args.grid.origin_center!~
    +        dy               = enemy[:target_y] - enemy[:y]
    +** Processing line: ~        vel              = Math.sqrt(dx * dx + dy * dy)~
     - Inside source: true
     *** True Line Result
    -    args.grid.origin_center!
    -** Processing line: ~    $dueling_spaceship.inputs  = args.inputs~
    +        vel              = Math.sqrt(dx * dx + dy * dy)
    +** Processing line: ~        speed_limit      = 2 + args.state.wave_root~
     - Inside source: true
     *** True Line Result
    -    $dueling_spaceship.inputs  = args.inputs
    -** Processing line: ~    $dueling_spaceship.outputs = args.outputs~
    +        speed_limit      = 2 + args.state.wave_root
    +** Processing line: ~        if vel > speed_limit~
     - Inside source: true
     *** True Line Result
    -    $dueling_spaceship.outputs = args.outputs
    -** Processing line: ~    $dueling_spaceship.state    = args.state~
    +        if vel > speed_limit
    +** Processing line: ~          dx /= vel / speed_limit~
     - Inside source: true
     *** True Line Result
    -    $dueling_spaceship.state    = args.state
    -** Processing line: ~    $dueling_spaceship.grid    = args.grid~
    +          dx /= vel / speed_limit
    +** Processing line: ~          dy /= vel / speed_limit~
     - Inside source: true
     *** True Line Result
    -    $dueling_spaceship.grid    = args.grid
    -** Processing line: ~    $dueling_spaceship.tick~
    +          dy /= vel / speed_limit
    +** Processing line: ~        elsif vel < 1~
     - Inside source: true
     *** True Line Result
    -    $dueling_spaceship.tick
    -** Processing line: ~  end~
    +        elsif vel < 1
    +** Processing line: ~          enemy[:move_state] = :normal~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +          enemy[:move_state] = :normal
    +** Processing line: ~          enemy[:target_x]   = nil~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~#+end_src~
    -- Line was identified as the end of a code block.
    -*** True Line Result
    -#+end_src
    -** Processing line: ~~
    -- End of paragraph detected.
    -*** True Line Result
    -
    -** Processing line: ~*** arcade/flappy dragon/credits.txt~
    -- Header detected.
    -*** True Line Result
    -
    +          enemy[:target_x]   = nil
    +** Processing line: ~          enemy[:target_y]   = nil~
    +- Inside source: true
     *** True Line Result
    -*** arcade/flappy dragon/credits.txt
    -** Processing line: ~#+begin_src ruby~
    -- Line was identified as the beginning of a code block.
    +          enemy[:target_y]   = nil
    +** Processing line: ~        end~
    +- Inside source: true
     *** True Line Result
    -
    +        end
    +** Processing line: ~        enemy[:x] += dx~
    +- Inside source: true
     *** True Line Result
    -#+begin_src ruby
    -** Processing line: ~  # ./samples/99_genre_arcade/flappy_dragon/CREDITS.txt~
    +        enemy[:x] += dx
    +** Processing line: ~        enemy[:y] += dy~
     - Inside source: true
     *** True Line Result
    -  # ./samples/99_genre_arcade/flappy_dragon/CREDITS.txt
    -** Processing line: ~  code: Amir Rajan, https://twitter.com/amirrajan~
    +        enemy[:y] += dy
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -  code: Amir Rajan, https://twitter.com/amirrajan
    -** Processing line: ~  graphics and audio: Nick Culbertson, https://twitter.com/MobyPixel~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  graphics and audio: Nick Culbertson, https://twitter.com/MobyPixel
    -** Processing line: ~~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
    @@ -93343,30 +94707,30 @@ Follows is a source code listing for all files that have been open sourced. This
     - End of paragraph detected.
     *** True Line Result
     
    -** Processing line: ~*** arcade/flappy dragon/main.rb~
    +** Processing line: ~*** Arcade - Dueling Starships - main.rb~
     - Header detected.
     *** True Line Result
     
     *** True Line Result
    -*** arcade/flappy dragon/main.rb
    +*** Arcade - Dueling Starships - main.rb
     ** Processing line: ~#+begin_src ruby~
     - Line was identified as the beginning of a code block.
     *** True Line Result
     
     *** True Line Result
     #+begin_src ruby
    -** Processing line: ~  # ./samples/99_genre_arcade/flappy_dragon/app/main.rb~
    +** Processing line: ~  # ./samples/99_genre_arcade/dueling_starships/app/main.rb~
     - Inside source: true
     *** True Line Result
    -  # ./samples/99_genre_arcade/flappy_dragon/app/main.rb
    -** Processing line: ~  class FlappyDragon~
    +  # ./samples/99_genre_arcade/dueling_starships/app/main.rb
    +** Processing line: ~  class DuelingSpaceships~
     - Inside source: true
     *** True Line Result
    -  class FlappyDragon
    -** Processing line: ~    attr_accessor :grid, :inputs, :state, :outputs~
    +  class DuelingSpaceships
    +** Processing line: ~    attr_accessor :state, :inputs, :outputs, :grid~
     - Inside source: true
     *** True Line Result
    -    attr_accessor :grid, :inputs, :state, :outputs
    +    attr_accessor :state, :inputs, :outputs, :grid
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
    @@ -93387,10 +94751,10 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
           calc
    -** Processing line: ~      process_inputs~
    +** Processing line: ~      input~
     - Inside source: true
     *** True Line Result
    -      process_inputs
    +      input
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -93403,110 +94767,114 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
         def defaults
    -** Processing line: ~      state.flap_power              = 11~
    +** Processing line: ~      outputs.background_color = [0, 0, 0]~
     - Inside source: true
     *** True Line Result
    -      state.flap_power              = 11
    -** Processing line: ~      state.gravity                 = 0.9~
    +      outputs.background_color = [0, 0, 0]
    +** Processing line: ~      state.ship_blue       ||= new_blue_ship~
     - Inside source: true
     *** True Line Result
    -      state.gravity                 = 0.9
    -** Processing line: ~      state.ceiling                 = 600~
    +      state.ship_blue       ||= new_blue_ship
    +** Processing line: ~      state.ship_red        ||= new_red_ship~
     - Inside source: true
     *** True Line Result
    -      state.ceiling                 = 600
    -** Processing line: ~      state.ceiling_flap_power      = 6~
    +      state.ship_red        ||= new_red_ship
    +** Processing line: ~      state.flames          ||= []~
     - Inside source: true
     *** True Line Result
    -      state.ceiling_flap_power      = 6
    -** Processing line: ~      state.wall_countdown_length   = 100~
    +      state.flames          ||= []
    +** Processing line: ~      state.bullets         ||= []~
     - Inside source: true
     *** True Line Result
    -      state.wall_countdown_length   = 100
    -** Processing line: ~      state.wall_gap_size           = 100~
    +      state.bullets         ||= []
    +** Processing line: ~      state.ship_blue_score ||= 0~
     - Inside source: true
     *** True Line Result
    -      state.wall_gap_size           = 100
    -** Processing line: ~      state.wall_countdown        ||= 0~
    +      state.ship_blue_score ||= 0
    +** Processing line: ~      state.ship_red_score  ||= 0~
     - Inside source: true
     *** True Line Result
    -      state.wall_countdown        ||= 0
    -** Processing line: ~      state.hi_score              ||= 0~
    +      state.ship_red_score  ||= 0
    +** Processing line: ~      state.stars           ||= 100.map do~
     - Inside source: true
     *** True Line Result
    -      state.hi_score              ||= 0
    -** Processing line: ~      state.score                 ||= 0~
    +      state.stars           ||= 100.map do
    +** Processing line: ~        [rand.add(2).to_square(grid.w_half.randomize(:sign, :ratio),~
     - Inside source: true
     *** True Line Result
    -      state.score                 ||= 0
    -** Processing line: ~      state.walls                 ||= []~
    +        [rand.add(2).to_square(grid.w_half.randomize(:sign, :ratio),
    +** Processing line: ~                               grid.h_half.randomize(:sign, :ratio)),~
     - Inside source: true
     *** True Line Result
    -      state.walls                 ||= []
    -** Processing line: ~      state.x                     ||= 50~
    +                               grid.h_half.randomize(:sign, :ratio)),
    +** Processing line: ~         128 + 128.randomize(:ratio), 255, 255]~
     - Inside source: true
     *** True Line Result
    -      state.x                     ||= 50
    -** Processing line: ~      state.y                     ||= 500~
    +         128 + 128.randomize(:ratio), 255, 255]
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -      state.y                     ||= 500
    -** Processing line: ~      state.dy                    ||= 0~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      state.dy                    ||= 0
    -** Processing line: ~      state.scene                 ||= :menu~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      state.scene                 ||= :menu
    -** Processing line: ~      state.scene_at              ||= 0~
    +
    +** Processing line: ~    def default_ship x, y, angle, sprite_path, bullet_sprite_path, color~
     - Inside source: true
     *** True Line Result
    -      state.scene_at              ||= 0
    -** Processing line: ~      state.difficulty            ||= :normal~
    +    def default_ship x, y, angle, sprite_path, bullet_sprite_path, color
    +** Processing line: ~      state.new_entity(:ship,~
     - Inside source: true
     *** True Line Result
    -      state.difficulty            ||= :normal
    -** Processing line: ~      state.new_difficulty        ||= :normal~
    +      state.new_entity(:ship,
    +** Processing line: ~                      { x: x,~
     - Inside source: true
     *** True Line Result
    -      state.new_difficulty        ||= :normal
    -** Processing line: ~      state.countdown             ||= 4.seconds~
    +                      { x: x,
    +** Processing line: ~                        y: y,~
     - Inside source: true
     *** True Line Result
    -      state.countdown             ||= 4.seconds
    -** Processing line: ~      state.flash_at              ||= 0~
    +                        y: y,
    +** Processing line: ~                        dy: 0,~
     - Inside source: true
     *** True Line Result
    -      state.flash_at              ||= 0
    -** Processing line: ~    end~
    +                        dy: 0,
    +** Processing line: ~                        dx: 0,~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +                        dx: 0,
    +** Processing line: ~                        damage: 0,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def render~
    +                        damage: 0,
    +** Processing line: ~                        dead: false,~
     - Inside source: true
     *** True Line Result
    -    def render
    -** Processing line: ~      outputs.sounds << "sounds/flappy-song.ogg" if state.tick_count == 1~
    +                        dead: false,
    +** Processing line: ~                        angle: angle,~
     - Inside source: true
     *** True Line Result
    -      outputs.sounds << "sounds/flappy-song.ogg" if state.tick_count == 1
    -** Processing line: ~      render_score~
    +                        angle: angle,
    +** Processing line: ~                        max_alpha: 255,~
     - Inside source: true
     *** True Line Result
    -      render_score
    -** Processing line: ~      render_menu~
    +                        max_alpha: 255,
    +** Processing line: ~                        sprite_path: sprite_path,~
     - Inside source: true
     *** True Line Result
    -      render_menu
    -** Processing line: ~      render_game~
    +                        sprite_path: sprite_path,
    +** Processing line: ~                        bullet_sprite_path: bullet_sprite_path,~
     - Inside source: true
     *** True Line Result
    -      render_game
    +                        bullet_sprite_path: bullet_sprite_path,
    +** Processing line: ~                        color: color })~
    +- Inside source: true
    +*** True Line Result
    +                        color: color })
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -93515,22 +94883,22 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def render_score~
    +** Processing line: ~    def new_red_ship~
     - Inside source: true
     *** True Line Result
    -    def render_score
    -** Processing line: ~      outputs.primitives << [10, 710, "HI SCORE: #{state.hi_score}", large_white_typeset].label~
    +    def new_red_ship
    +** Processing line: ~      default_ship(400, 250.randomize(:sign, :ratio),~
     - Inside source: true
     *** True Line Result
    -      outputs.primitives << [10, 710, "HI SCORE: #{state.hi_score}", large_white_typeset].label
    -** Processing line: ~      outputs.primitives << [10, 680, "SCORE: #{state.score}", large_white_typeset].label~
    +      default_ship(400, 250.randomize(:sign, :ratio),
    +** Processing line: ~                   180, 'sprites/ship_red.png', 'sprites/red_bullet.png',~
     - Inside source: true
     *** True Line Result
    -      outputs.primitives << [10, 680, "SCORE: #{state.score}", large_white_typeset].label
    -** Processing line: ~      outputs.primitives << [10, 650, "DIFFICULTY: #{state.difficulty.upcase}", large_white_typeset].label~
    +                   180, 'sprites/ship_red.png', 'sprites/red_bullet.png',
    +** Processing line: ~                   [255, 90, 90])~
     - Inside source: true
     *** True Line Result
    -      outputs.primitives << [10, 650, "DIFFICULTY: #{state.difficulty.upcase}", large_white_typeset].label
    +                   [255, 90, 90])
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -93539,86 +94907,86 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def render_menu~
    +** Processing line: ~    def new_blue_ship~
     - Inside source: true
     *** True Line Result
    -    def render_menu
    -** Processing line: ~      return unless state.scene == :menu~
    +    def new_blue_ship
    +** Processing line: ~      default_ship(-400, 250.randomize(:sign, :ratio),~
     - Inside source: true
     *** True Line Result
    -      return unless state.scene == :menu
    -** Processing line: ~      render_overlay~
    +      default_ship(-400, 250.randomize(:sign, :ratio),
    +** Processing line: ~                   0, 'sprites/ship_blue.png', 'sprites/blue_bullet.png',~
     - Inside source: true
     *** True Line Result
    -      render_overlay
    -** Processing line: ~~
    +                   0, 'sprites/ship_blue.png', 'sprites/blue_bullet.png',
    +** Processing line: ~                   [110, 140, 255])~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      outputs.labels << [640, 700, "Flappy Dragon", 50, 1, 255, 255, 255]~
    +                   [110, 140, 255])
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << [640, 700, "Flappy Dragon", 50, 1, 255, 255, 255]
    -** Processing line: ~      outputs.labels << [640, 500, "Instructions: Press Spacebar to flap. Don't die.", 4, 1, 255, 255, 255]~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << [640, 500, "Instructions: Press Spacebar to flap. Don't die.", 4, 1, 255, 255, 255]
    -** Processing line: ~      outputs.labels << [430, 430, "[Tab]    Change difficulty", 4, 0, 255, 255, 255]~
    +
    +** Processing line: ~    def render~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << [430, 430, "[Tab]    Change difficulty", 4, 0, 255, 255, 255]
    -** Processing line: ~      outputs.labels << [430, 400, "[Enter]  Start at New Difficulty ", 4, 0, 255, 255, 255]~
    -- Inside source: true
    +    def render
    +** Processing line: ~      render_instructions~
    +- Inside source: true
     *** True Line Result
    -      outputs.labels << [430, 400, "[Enter]  Start at New Difficulty ", 4, 0, 255, 255, 255]
    -** Processing line: ~      outputs.labels << [430, 370, "[Escape] Cancel/Resume ", 4, 0, 255, 255, 255]~
    +      render_instructions
    +** Processing line: ~      render_score~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << [430, 370, "[Escape] Cancel/Resume ", 4, 0, 255, 255, 255]
    -** Processing line: ~      outputs.labels << [640, 300, "(mouse, touch, and game controllers work, too!) ", 4, 1, 255, 255, 255]~
    +      render_score
    +** Processing line: ~      render_universe~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << [640, 300, "(mouse, touch, and game controllers work, too!) ", 4, 1, 255, 255, 255]
    -** Processing line: ~      outputs.labels << [640, 200, "Difficulty: #{state.new_difficulty.capitalize}", 4, 1, 255, 255, 255]~
    +      render_universe
    +** Processing line: ~      render_flames~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << [640, 200, "Difficulty: #{state.new_difficulty.capitalize}", 4, 1, 255, 255, 255]
    -** Processing line: ~~
    +      render_flames
    +** Processing line: ~      render_ships~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      outputs.labels << [10, 100, "Code:   @amirrajan",     255, 255, 255]~
    +      render_ships
    +** Processing line: ~      render_bullets~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << [10, 100, "Code:   @amirrajan",     255, 255, 255]
    -** Processing line: ~      outputs.labels << [10,  80, "Art:    @mobypixel",     255, 255, 255]~
    +      render_bullets
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << [10,  80, "Art:    @mobypixel",     255, 255, 255]
    -** Processing line: ~      outputs.labels << [10,  60, "Music:  @mobypixel",     255, 255, 255]~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << [10,  60, "Music:  @mobypixel",     255, 255, 255]
    -** Processing line: ~      outputs.labels << [10,  40, "Engine: DragonRuby GTK", 255, 255, 255]~
    +
    +** Processing line: ~    def render_ships~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << [10,  40, "Engine: DragonRuby GTK", 255, 255, 255]
    -** Processing line: ~    end~
    +    def render_ships
    +** Processing line: ~      update_ship_outputs(state.ship_blue)~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +      update_ship_outputs(state.ship_blue)
    +** Processing line: ~      update_ship_outputs(state.ship_red)~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def render_overlay~
    +      update_ship_outputs(state.ship_red)
    +** Processing line: ~      outputs.sprites << [state.ship_blue.sprite, state.ship_red.sprite]~
     - Inside source: true
     *** True Line Result
    -    def render_overlay
    -** Processing line: ~      outputs.primitives << [grid.rect.scale_rect(1.1, 0, 0), 0, 0, 0, 230].solid~
    +      outputs.sprites << [state.ship_blue.sprite, state.ship_red.sprite]
    +** Processing line: ~      outputs.labels  << [state.ship_blue.label, state.ship_red.label]~
     - Inside source: true
     *** True Line Result
    -      outputs.primitives << [grid.rect.scale_rect(1.1, 0, 0), 0, 0, 0, 230].solid
    +      outputs.labels  << [state.ship_blue.label, state.ship_red.label]
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -93627,30 +94995,42 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def render_game~
    +** Processing line: ~    def render_instructions~
     - Inside source: true
     *** True Line Result
    -    def render_game
    -** Processing line: ~      render_game_over~
    +    def render_instructions
    +** Processing line: ~      return if state.ship_blue.dx  > 0  || state.ship_blue.dy > 0  ||~
     - Inside source: true
     *** True Line Result
    -      render_game_over
    -** Processing line: ~      render_background~
    +      return if state.ship_blue.dx  > 0  || state.ship_blue.dy > 0  ||
    +** Processing line: ~                state.ship_red.dx   > 0  || state.ship_red.dy  > 0  ||~
     - Inside source: true
     *** True Line Result
    -      render_background
    -** Processing line: ~      render_walls~
    +                state.ship_red.dx   > 0  || state.ship_red.dy  > 0  ||
    +** Processing line: ~                state.flames.length > 0~
     - Inside source: true
     *** True Line Result
    -      render_walls
    -** Processing line: ~      render_dragon~
    +                state.flames.length > 0
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      render_dragon
    -** Processing line: ~      render_flash~
    +
    +** Processing line: ~      outputs.labels << [grid.left.shift_right(30),~
     - Inside source: true
     *** True Line Result
    -      render_flash
    +      outputs.labels << [grid.left.shift_right(30),
    +** Processing line: ~                         grid.bottom.shift_up(30),~
    +- Inside source: true
    +*** True Line Result
    +                         grid.bottom.shift_up(30),
    +** Processing line: ~                         "Two gamepads needed to play. R1 to accelerate. Left and right on D-PAD to turn ship. Hold A to shoot. Press B to drop mines.",~
    +- Inside source: true
    +*** True Line Result
    +                         "Two gamepads needed to play. R1 to accelerate. Left and right on D-PAD to turn ship. Hold A to shoot. Press B to drop mines.",
    +** Processing line: ~                         0, 0, 255, 255, 255]~
    +- Inside source: true
    +*** True Line Result
    +                         0, 0, 255, 255, 255]
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -93659,30 +95039,26 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def render_game_over~
    -- Inside source: true
    -*** True Line Result
    -    def render_game_over
    -** Processing line: ~      return unless state.scene == :game~
    +** Processing line: ~    def calc~
     - Inside source: true
     *** True Line Result
    -      return unless state.scene == :game
    -** Processing line: ~      outputs.labels << [638, 358, score_text, 20, 1]~
    +    def calc
    +** Processing line: ~      calc_thrusts~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << [638, 358, score_text, 20, 1]
    -** Processing line: ~      outputs.labels << [635, 360, score_text, 20, 1, 255, 255, 255]~
    +      calc_thrusts
    +** Processing line: ~      calc_ships~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << [635, 360, score_text, 20, 1, 255, 255, 255]
    -** Processing line: ~      outputs.labels << [638, 428, countdown_text, 20, 1]~
    +      calc_ships
    +** Processing line: ~      calc_bullets~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << [638, 428, countdown_text, 20, 1]
    -** Processing line: ~      outputs.labels << [635, 430, countdown_text, 20, 1, 255, 255, 255]~
    +      calc_bullets
    +** Processing line: ~      calc_winner~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << [635, 430, countdown_text, 20, 1, 255, 255, 255]
    +      calc_winner
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -93691,50 +95067,62 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def render_background~
    +** Processing line: ~    def input~
     - Inside source: true
     *** True Line Result
    -    def render_background
    -** Processing line: ~      outputs.sprites << [0, 0, 1280, 720, 'sprites/background.png']~
    +    def input
    +** Processing line: ~      input_accelerate~
    +- Inside source: true
    +*** True Line Result
    +      input_accelerate
    +** Processing line: ~      input_turn~
    +- Inside source: true
    +*** True Line Result
    +      input_turn
    +** Processing line: ~      input_bullets_and_mines~
    +- Inside source: true
    +*** True Line Result
    +      input_bullets_and_mines
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      outputs.sprites << [0, 0, 1280, 720, 'sprites/background.png']
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      scroll_point_at   = state.tick_count~
    +** Processing line: ~    def render_score~
     - Inside source: true
     *** True Line Result
    -      scroll_point_at   = state.tick_count
    -** Processing line: ~      scroll_point_at   = state.scene_at if state.scene == :menu~
    +    def render_score
    +** Processing line: ~      outputs.labels << [grid.left.shift_right(80),~
     - Inside source: true
     *** True Line Result
    -      scroll_point_at   = state.scene_at if state.scene == :menu
    -** Processing line: ~      scroll_point_at   = state.death_at if state.countdown > 0~
    +      outputs.labels << [grid.left.shift_right(80),
    +** Processing line: ~                         grid.top.shift_down(40),~
     - Inside source: true
     *** True Line Result
    -      scroll_point_at   = state.death_at if state.countdown > 0
    -** Processing line: ~      scroll_point_at ||= 0~
    +                         grid.top.shift_down(40),
    +** Processing line: ~                         state.ship_blue_score, 30, 1, state.ship_blue.color]~
     - Inside source: true
     *** True Line Result
    -      scroll_point_at ||= 0
    +                         state.ship_blue_score, 30, 1, state.ship_blue.color]
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      outputs.sprites << scrolling_background(scroll_point_at, 'sprites/parallax_back.png',   0.25)~
    +** Processing line: ~      outputs.labels << [grid.right.shift_left(80),~
     - Inside source: true
     *** True Line Result
    -      outputs.sprites << scrolling_background(scroll_point_at, 'sprites/parallax_back.png',   0.25)
    -** Processing line: ~      outputs.sprites << scrolling_background(scroll_point_at, 'sprites/parallax_middle.png', 0.50)~
    +      outputs.labels << [grid.right.shift_left(80),
    +** Processing line: ~                         grid.top.shift_down(40),~
     - Inside source: true
     *** True Line Result
    -      outputs.sprites << scrolling_background(scroll_point_at, 'sprites/parallax_middle.png', 0.50)
    -** Processing line: ~      outputs.sprites << scrolling_background(scroll_point_at, 'sprites/parallax_front.png',  1.00, -80)~
    +                         grid.top.shift_down(40),
    +** Processing line: ~                         state.ship_red_score,  30, 1, state.ship_red.color]~
     - Inside source: true
     *** True Line Result
    -      outputs.sprites << scrolling_background(scroll_point_at, 'sprites/parallax_front.png',  1.00, -80)
    +                         state.ship_red_score,  30, 1, state.ship_red.color]
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -93743,38 +95131,46 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def render_walls~
    +** Processing line: ~    def render_universe~
     - Inside source: true
     *** True Line Result
    -    def render_walls
    -** Processing line: ~      state.walls.each do |w|~
    +    def render_universe
    +** Processing line: ~      return if outputs.static_solids.any?~
     - Inside source: true
     *** True Line Result
    -      state.walls.each do |w|
    -** Processing line: ~        w.sprites = [~
    +      return if outputs.static_solids.any?
    +** Processing line: ~      outputs.static_solids << grid.rect~
     - Inside source: true
     *** True Line Result
    -        w.sprites = [
    -** Processing line: ~          [w.x, w.bottom_height - 720, 100, 720, 'sprites/wall.png', 180],~
    +      outputs.static_solids << grid.rect
    +** Processing line: ~      outputs.static_solids << state.stars~
     - Inside source: true
     *** True Line Result
    -          [w.x, w.bottom_height - 720, 100, 720, 'sprites/wall.png', 180],
    -** Processing line: ~          [w.x, w.top_y,               100, 720, 'sprites/wallbottom.png', 0]~
    +      outputs.static_solids << state.stars
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -          [w.x, w.top_y,               100, 720, 'sprites/wallbottom.png', 0]
    -** Processing line: ~        ]~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        ]
    -** Processing line: ~      end~
    +
    +** Processing line: ~    def apply_round_finished_alpha entity~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~      outputs.sprites << state.walls.map(&:sprites)~
    +    def apply_round_finished_alpha entity
    +** Processing line: ~      return entity unless state.round_finished_debounce~
     - Inside source: true
     *** True Line Result
    -      outputs.sprites << state.walls.map(&:sprites)
    +      return entity unless state.round_finished_debounce
    +** Processing line: ~      entity.a *= state.round_finished_debounce.percentage_of(2.seconds)~
    +- Inside source: true
    +*** True Line Result
    +      entity.a *= state.round_finished_debounce.percentage_of(2.seconds)
    +** Processing line: ~      return entity~
    +- Inside source: true
    +*** True Line Result
    +      return entity
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -93783,82 +95179,78 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def render_dragon~
    -- Inside source: true
    -*** True Line Result
    -    def render_dragon
    -** Processing line: ~      state.show_death = true if state.countdown == 3.seconds~
    +** Processing line: ~    def update_ship_outputs ship, sprite_size = 66~
     - Inside source: true
     *** True Line Result
    -      state.show_death = true if state.countdown == 3.seconds
    -** Processing line: ~~
    +    def update_ship_outputs ship, sprite_size = 66
    +** Processing line: ~      ship.sprite =~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      render_debug_hitbox false~
    +      ship.sprite =
    +** Processing line: ~        apply_round_finished_alpha [sprite_size.to_square(ship.x, ship.y),~
     - Inside source: true
     *** True Line Result
    -      render_debug_hitbox false
    -** Processing line: ~~
    +        apply_round_finished_alpha [sprite_size.to_square(ship.x, ship.y),
    +** Processing line: ~                                    ship.sprite_path,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      if state.show_death == false || !state.death_at~
    +                                    ship.sprite_path,
    +** Processing line: ~                                    ship.angle,~
     - Inside source: true
     *** True Line Result
    -      if state.show_death == false || !state.death_at
    -** Processing line: ~        animation_index = state.flapped_at.frame_index 6, 2, false if state.flapped_at~
    +                                    ship.angle,
    +** Processing line: ~                                    ship.dead ? 0 : 255 * ship.created_at.ease(2.seconds)].sprite~
     - Inside source: true
     *** True Line Result
    -        animation_index = state.flapped_at.frame_index 6, 2, false if state.flapped_at
    -** Processing line: ~        sprite_name = "sprites/dragon_fly#{animation_index.or(0) + 1}.png"~
    +                                    ship.dead ? 0 : 255 * ship.created_at.ease(2.seconds)].sprite
    +** Processing line: ~      ship.label =~
     - Inside source: true
     *** True Line Result
    -        sprite_name = "sprites/dragon_fly#{animation_index.or(0) + 1}.png"
    -** Processing line: ~        state.dragon_sprite = [state.x, state.y, 100, 80, sprite_name, state.dy * 1.2]~
    +      ship.label =
    +** Processing line: ~        apply_round_finished_alpha [ship.x,~
     - Inside source: true
     *** True Line Result
    -        state.dragon_sprite = [state.x, state.y, 100, 80, sprite_name, state.dy * 1.2]
    -** Processing line: ~      else~
    +        apply_round_finished_alpha [ship.x,
    +** Processing line: ~                                    ship.y + 100,~
     - Inside source: true
     *** True Line Result
    -      else
    -** Processing line: ~        sprite_name = "sprites/dragon_die.png"~
    +                                    ship.y + 100,
    +** Processing line: ~                                    "." * 5.minus(ship.damage).greater(0), 20, 1, ship.color, 255].label~
     - Inside source: true
     *** True Line Result
    -        sprite_name = "sprites/dragon_die.png"
    -** Processing line: ~        state.dragon_sprite = [state.x, state.y, 100, 80, sprite_name, state.dy * 1.2]~
    +                                    "." * 5.minus(ship.damage).greater(0), 20, 1, ship.color, 255].label
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -        state.dragon_sprite = [state.x, state.y, 100, 80, sprite_name, state.dy * 1.2]
    -** Processing line: ~        sprite_changed_elapsed    = state.death_at.elapsed_time - 1.seconds~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        sprite_changed_elapsed    = state.death_at.elapsed_time - 1.seconds
    -** Processing line: ~        state.dragon_sprite.angle += (sprite_changed_elapsed ** 1.3) * state.death_fall_direction * -1~
    +
    +** Processing line: ~    def render_flames sprite_size = 6~
     - Inside source: true
     *** True Line Result
    -        state.dragon_sprite.angle += (sprite_changed_elapsed ** 1.3) * state.death_fall_direction * -1
    -** Processing line: ~        state.dragon_sprite.x     += (sprite_changed_elapsed ** 1.2) * state.death_fall_direction~
    +    def render_flames sprite_size = 6
    +** Processing line: ~      outputs.sprites << state.flames.map do |p|~
     - Inside source: true
     *** True Line Result
    -        state.dragon_sprite.x     += (sprite_changed_elapsed ** 1.2) * state.death_fall_direction
    -** Processing line: ~        state.dragon_sprite.y     += (sprite_changed_elapsed * 14 - sprite_changed_elapsed ** 1.6)~
    +      outputs.sprites << state.flames.map do |p|
    +** Processing line: ~        apply_round_finished_alpha [sprite_size.to_square(p.x, p.y),~
     - Inside source: true
     *** True Line Result
    -        state.dragon_sprite.y     += (sprite_changed_elapsed * 14 - sprite_changed_elapsed ** 1.6)
    -** Processing line: ~      end~
    +        apply_round_finished_alpha [sprite_size.to_square(p.x, p.y),
    +** Processing line: ~                                    'sprites/flame.png', 0,~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +                                    'sprites/flame.png', 0,
    +** Processing line: ~                                    p.max_alpha * p.created_at.ease(p.lifetime, :flip)].sprite~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      outputs.sprites << state.dragon_sprite~
    +                                    p.max_alpha * p.created_at.ease(p.lifetime, :flip)].sprite
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -      outputs.sprites << state.dragon_sprite
    +      end
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -93867,26 +95259,26 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def render_debug_hitbox show~
    +** Processing line: ~    def render_bullets sprite_size = 10~
     - Inside source: true
     *** True Line Result
    -    def render_debug_hitbox show
    -** Processing line: ~      return unless show~
    +    def render_bullets sprite_size = 10
    +** Processing line: ~      outputs.sprites << state.bullets.map do |b|~
     - Inside source: true
     *** True Line Result
    -      return unless show
    -** Processing line: ~      outputs.borders << [dragon_collision_box.rect, 255, 0, 0] if state.dragon_sprite~
    +      outputs.sprites << state.bullets.map do |b|
    +** Processing line: ~        apply_round_finished_alpha [b.sprite_size.to_square(b.x, b.y),~
     - Inside source: true
     *** True Line Result
    -      outputs.borders << [dragon_collision_box.rect, 255, 0, 0] if state.dragon_sprite
    -** Processing line: ~      outputs.borders << state.walls.flat_map do |w|~
    +        apply_round_finished_alpha [b.sprite_size.to_square(b.x, b.y),
    +** Processing line: ~                                    b.owner.bullet_sprite_path,~
     - Inside source: true
     *** True Line Result
    -      outputs.borders << state.walls.flat_map do |w|
    -** Processing line: ~         w.sprites.map { |s| [s.rect, 255, 0, 0] }~
    +                                    b.owner.bullet_sprite_path,
    +** Processing line: ~                                    0, b.max_alpha].sprite~
     - Inside source: true
     *** True Line Result
    -         w.sprites.map { |s| [s.rect, 255, 0, 0] }
    +                                    0, b.max_alpha].sprite
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    @@ -93899,74 +95291,78 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def render_flash~
    +** Processing line: ~    def wrap_location! location~
     - Inside source: true
     *** True Line Result
    -    def render_flash
    -** Processing line: ~      return unless state.flash_at~
    +    def wrap_location! location
    +** Processing line: ~      location.x = grid.left    if location.x > grid.right~
     - Inside source: true
     *** True Line Result
    -      return unless state.flash_at
    -** Processing line: ~~
    +      location.x = grid.left    if location.x > grid.right
    +** Processing line: ~      location.x = grid.right   if location.x < grid.left~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      outputs.primitives << [grid.rect,~
    +      location.x = grid.right   if location.x < grid.left
    +** Processing line: ~      location.y = grid.top     if location.y < grid.bottom~
    +- Inside source: true
    +*** True Line Result
    +      location.y = grid.top     if location.y < grid.bottom
    +** Processing line: ~      location.y = grid.bottom  if location.y > grid.top~
     - Inside source: true
     *** True Line Result
    -      outputs.primitives << [grid.rect,
    -** Processing line: ~                             white,~
    +      location.y = grid.bottom  if location.y > grid.top
    +** Processing line: ~      location~
     - Inside source: true
     *** True Line Result
    -                             white,
    -** Processing line: ~                             255 * state.flash_at.ease(20, :flip)].solid~
    +      location
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -                             255 * state.flash_at.ease(20, :flip)].solid
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      state.flash_at = 0 if state.flash_at.elapsed_time > 20~
    +** Processing line: ~    def calc_thrusts~
     - Inside source: true
     *** True Line Result
    -      state.flash_at = 0 if state.flash_at.elapsed_time > 20
    -** Processing line: ~    end~
    +    def calc_thrusts
    +** Processing line: ~      state.flames =~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +      state.flames =
    +** Processing line: ~        state.flames~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def calc~
    +        state.flames
    +** Processing line: ~          .reject(&:old?)~
     - Inside source: true
     *** True Line Result
    -    def calc
    -** Processing line: ~      return unless state.scene == :game~
    +          .reject(&:old?)
    +** Processing line: ~          .map do |p|~
     - Inside source: true
     *** True Line Result
    -      return unless state.scene == :game
    -** Processing line: ~      reset_game if state.countdown == 1~
    +          .map do |p|
    +** Processing line: ~            p.speed *= 0.9~
     - Inside source: true
     *** True Line Result
    -      reset_game if state.countdown == 1
    -** Processing line: ~      state.countdown -= 1 and return if state.countdown > 0~
    +            p.speed *= 0.9
    +** Processing line: ~            p.y += p.angle.vector_y(p.speed)~
     - Inside source: true
     *** True Line Result
    -      state.countdown -= 1 and return if state.countdown > 0
    -** Processing line: ~      calc_walls~
    +            p.y += p.angle.vector_y(p.speed)
    +** Processing line: ~            p.x += p.angle.vector_x(p.speed)~
     - Inside source: true
     *** True Line Result
    -      calc_walls
    -** Processing line: ~      calc_flap~
    +            p.x += p.angle.vector_x(p.speed)
    +** Processing line: ~            wrap_location! p~
     - Inside source: true
     *** True Line Result
    -      calc_flap
    -** Processing line: ~      calc_game_over~
    +            wrap_location! p
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -      calc_game_over
    +        end
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -93975,94 +95371,114 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def calc_walls~
    +** Processing line: ~    def all_ships~
     - Inside source: true
     *** True Line Result
    -    def calc_walls
    -** Processing line: ~      state.walls.each { |w| w.x -= 8 }~
    +    def all_ships
    +** Processing line: ~      [state.ship_blue, state.ship_red]~
     - Inside source: true
     *** True Line Result
    -      state.walls.each { |w| w.x -= 8 }
    +      [state.ship_blue, state.ship_red]
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      walls_count_before_removal = state.walls.length~
    +** Processing line: ~    def alive_ships~
     - Inside source: true
     *** True Line Result
    -      walls_count_before_removal = state.walls.length
    -** Processing line: ~~
    +    def alive_ships
    +** Processing line: ~      all_ships.reject { |s| s.dead }~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      state.walls.reject! { |w| w.x < -100 }~
    +      all_ships.reject { |s| s.dead }
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      state.walls.reject! { |w| w.x < -100 }
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      state.score += 1 if state.walls.count < walls_count_before_removal~
    +** Processing line: ~    def calc_bullet bullet~
     - Inside source: true
     *** True Line Result
    -      state.score += 1 if state.walls.count < walls_count_before_removal
    -** Processing line: ~~
    +    def calc_bullet bullet
    +** Processing line: ~      bullet.y += bullet.angle.vector_y(bullet.speed)~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      state.wall_countdown -= 1 and return if state.wall_countdown > 0~
    +      bullet.y += bullet.angle.vector_y(bullet.speed)
    +** Processing line: ~      bullet.x += bullet.angle.vector_x(bullet.speed)~
     - Inside source: true
     *** True Line Result
    -      state.wall_countdown -= 1 and return if state.wall_countdown > 0
    -** Processing line: ~~
    +      bullet.x += bullet.angle.vector_x(bullet.speed)
    +** Processing line: ~      wrap_location! bullet~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      state.walls << state.new_entity(:wall) do |w|~
    +      wrap_location! bullet
    +** Processing line: ~      explode_bullet! bullet if bullet.old?~
     - Inside source: true
     *** True Line Result
    -      state.walls << state.new_entity(:wall) do |w|
    -** Processing line: ~        w.x             = grid.right~
    +      explode_bullet! bullet if bullet.old?
    +** Processing line: ~      return if bullet.exploded~
     - Inside source: true
     *** True Line Result
    -        w.x             = grid.right
    -** Processing line: ~        w.opening       = grid.top~
    +      return if bullet.exploded
    +** Processing line: ~      return if state.round_finished~
     - Inside source: true
     *** True Line Result
    -        w.opening       = grid.top
    -** Processing line: ~                              .randomize(:ratio)~
    +      return if state.round_finished
    +** Processing line: ~      alive_ships.each do |s|~
     - Inside source: true
     *** True Line Result
    -                              .randomize(:ratio)
    -** Processing line: ~                              .greater(200)~
    +      alive_ships.each do |s|
    +** Processing line: ~        if s != bullet.owner &&~
     - Inside source: true
     *** True Line Result
    -                              .greater(200)
    -** Processing line: ~                              .lesser(520)~
    +        if s != bullet.owner &&
    +** Processing line: ~           s.sprite.intersect_rect?(bullet.sprite_size.to_square(bullet.x, bullet.y))~
     - Inside source: true
     *** True Line Result
    -                              .lesser(520)
    -** Processing line: ~        w.bottom_height = w.opening - state.wall_gap_size~
    +           s.sprite.intersect_rect?(bullet.sprite_size.to_square(bullet.x, bullet.y))
    +** Processing line: ~          explode_bullet! bullet, 10, 5, 30~
     - Inside source: true
     *** True Line Result
    -        w.bottom_height = w.opening - state.wall_gap_size
    -** Processing line: ~        w.top_y         = w.opening + state.wall_gap_size~
    +          explode_bullet! bullet, 10, 5, 30
    +** Processing line: ~          s.damage += 1~
     - Inside source: true
     *** True Line Result
    -        w.top_y         = w.opening + state.wall_gap_size
    +          s.damage += 1
    +** Processing line: ~        end~
    +- Inside source: true
    +*** True Line Result
    +        end
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
           end
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      state.wall_countdown = state.wall_countdown_length~
    +** Processing line: ~    def calc_bullets~
     - Inside source: true
     *** True Line Result
    -      state.wall_countdown = state.wall_countdown_length
    +    def calc_bullets
    +** Processing line: ~      state.bullets.each    { |b| calc_bullet b }~
    +- Inside source: true
    +*** True Line Result
    +      state.bullets.each    { |b| calc_bullet b }
    +** Processing line: ~      state.bullets.reject! { |b| b.exploded }~
    +- Inside source: true
    +*** True Line Result
    +      state.bullets.reject! { |b| b.exploded }
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -94071,78 +95487,86 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def calc_flap~
    +** Processing line: ~    def create_explosion! type, entity, flame_count, max_speed, lifetime, max_alpha = 255~
     - Inside source: true
     *** True Line Result
    -    def calc_flap
    -** Processing line: ~      state.y += state.dy~
    +    def create_explosion! type, entity, flame_count, max_speed, lifetime, max_alpha = 255
    +** Processing line: ~      flame_count.times do~
     - Inside source: true
     *** True Line Result
    -      state.y += state.dy
    -** Processing line: ~      state.dy = state.dy.lesser state.flap_power~
    +      flame_count.times do
    +** Processing line: ~        state.flames << state.new_entity(type,~
     - Inside source: true
     *** True Line Result
    -      state.dy = state.dy.lesser state.flap_power
    -** Processing line: ~      state.dy -= state.gravity~
    +        state.flames << state.new_entity(type,
    +** Processing line: ~                                       { angle: 360.randomize(:ratio),~
     - Inside source: true
     *** True Line Result
    -      state.dy -= state.gravity
    -** Processing line: ~      return if state.y < state.ceiling~
    +                                       { angle: 360.randomize(:ratio),
    +** Processing line: ~                                         speed: max_speed.randomize(:ratio),~
     - Inside source: true
     *** True Line Result
    -      return if state.y < state.ceiling
    -** Processing line: ~      state.y  = state.ceiling~
    +                                         speed: max_speed.randomize(:ratio),
    +** Processing line: ~                                         lifetime: lifetime,~
     - Inside source: true
     *** True Line Result
    -      state.y  = state.ceiling
    -** Processing line: ~      state.dy = state.dy.lesser state.ceiling_flap_power~
    +                                         lifetime: lifetime,
    +** Processing line: ~                                         x: entity.x,~
     - Inside source: true
     *** True Line Result
    -      state.dy = state.dy.lesser state.ceiling_flap_power
    -** Processing line: ~    end~
    +                                         x: entity.x,
    +** Processing line: ~                                         y: entity.y,~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +                                         y: entity.y,
    +** Processing line: ~                                         max_alpha: max_alpha })~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def calc_game_over~
    +                                         max_alpha: max_alpha })
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    def calc_game_over
    -** Processing line: ~      return unless game_over?~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      return unless game_over?
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      state.death_at = state.tick_count~
    +** Processing line: ~    def explode_bullet! bullet, flame_override = 5, max_speed = 5, lifetime = 10~
     - Inside source: true
     *** True Line Result
    -      state.death_at = state.tick_count
    -** Processing line: ~      state.death_from = state.walls.first~
    +    def explode_bullet! bullet, flame_override = 5, max_speed = 5, lifetime = 10
    +** Processing line: ~      bullet.exploded = true~
     - Inside source: true
     *** True Line Result
    -      state.death_from = state.walls.first
    -** Processing line: ~      state.death_fall_direction = -1~
    +      bullet.exploded = true
    +** Processing line: ~      create_explosion! :bullet_explosion,~
     - Inside source: true
     *** True Line Result
    -      state.death_fall_direction = -1
    -** Processing line: ~      state.death_fall_direction =  1 if state.x > state.death_from.x~
    +      create_explosion! :bullet_explosion,
    +** Processing line: ~                        bullet,~
     - Inside source: true
     *** True Line Result
    -      state.death_fall_direction =  1 if state.x > state.death_from.x
    -** Processing line: ~      outputs.sounds << "sounds/hit-sound.wav"~
    +                        bullet,
    +** Processing line: ~                        flame_override,~
     - Inside source: true
     *** True Line Result
    -      outputs.sounds << "sounds/hit-sound.wav"
    -** Processing line: ~      begin_countdown~
    +                        flame_override,
    +** Processing line: ~                        max_speed,~
     - Inside source: true
     *** True Line Result
    -      begin_countdown
    +                        max_speed,
    +** Processing line: ~                        lifetime,~
    +- Inside source: true
    +*** True Line Result
    +                        lifetime,
    +** Processing line: ~                        bullet.max_alpha~
    +- Inside source: true
    +*** True Line Result
    +                        bullet.max_alpha
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -94151,18 +95575,22 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def process_inputs~
    +** Processing line: ~    def calc_ship ship~
     - Inside source: true
     *** True Line Result
    -    def process_inputs
    -** Processing line: ~      process_inputs_menu~
    +    def calc_ship ship
    +** Processing line: ~      ship.x += ship.dx~
     - Inside source: true
     *** True Line Result
    -      process_inputs_menu
    -** Processing line: ~      process_inputs_game~
    +      ship.x += ship.dx
    +** Processing line: ~      ship.y += ship.dy~
     - Inside source: true
     *** True Line Result
    -      process_inputs_game
    +      ship.y += ship.dy
    +** Processing line: ~      wrap_location! ship~
    +- Inside source: true
    +*** True Line Result
    +      wrap_location! ship
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -94171,146 +95599,130 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def process_inputs_menu~
    -- Inside source: true
    -*** True Line Result
    -    def process_inputs_menu
    -** Processing line: ~      return unless state.scene == :menu~
    -- Inside source: true
    -*** True Line Result
    -      return unless state.scene == :menu
    -** Processing line: ~~
    +** Processing line: ~    def calc_ships~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      changediff = inputs.keyboard.key_down.tab || inputs.controller_one.key_down.select~
    +    def calc_ships
    +** Processing line: ~      all_ships.each { |s| calc_ship s }~
     - Inside source: true
     *** True Line Result
    -      changediff = inputs.keyboard.key_down.tab || inputs.controller_one.key_down.select
    -** Processing line: ~      if inputs.mouse.click~
    +      all_ships.each { |s| calc_ship s }
    +** Processing line: ~      return if all_ships.any? { |s| s.dead }~
     - Inside source: true
     *** True Line Result
    -      if inputs.mouse.click
    -** Processing line: ~        p = inputs.mouse.click.point~
    +      return if all_ships.any? { |s| s.dead }
    +** Processing line: ~      return if state.round_finished~
     - Inside source: true
     *** True Line Result
    -        p = inputs.mouse.click.point
    -** Processing line: ~        if (p.y >= 165) && (p.y < 200) && (p.x >= 500) && (p.x < 800)~
    +      return if state.round_finished
    +** Processing line: ~      return unless state.ship_blue.sprite.intersect_rect?(state.ship_red.sprite)~
     - Inside source: true
     *** True Line Result
    -        if (p.y >= 165) && (p.y < 200) && (p.x >= 500) && (p.x < 800)
    -** Processing line: ~          changediff = true~
    +      return unless state.ship_blue.sprite.intersect_rect?(state.ship_red.sprite)
    +** Processing line: ~      state.ship_blue.damage = 5~
     - Inside source: true
     *** True Line Result
    -          changediff = true
    -** Processing line: ~        end~
    +      state.ship_blue.damage = 5
    +** Processing line: ~      state.ship_red.damage  = 5~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~      end~
    +      state.ship_red.damage  = 5
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      end
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      if changediff~
    +** Processing line: ~    def create_thruster_flames! ship~
     - Inside source: true
     *** True Line Result
    -      if changediff
    -** Processing line: ~        case state.new_difficulty~
    +    def create_thruster_flames! ship
    +** Processing line: ~      state.flames << state.new_entity(:ship_thruster,~
     - Inside source: true
     *** True Line Result
    -        case state.new_difficulty
    -** Processing line: ~        when :easy~
    +      state.flames << state.new_entity(:ship_thruster,
    +** Processing line: ~                                     { angle: ship.angle + 180 + 60.randomize(:sign, :ratio),~
     - Inside source: true
     *** True Line Result
    -        when :easy
    -** Processing line: ~          state.new_difficulty = :normal~
    +                                     { angle: ship.angle + 180 + 60.randomize(:sign, :ratio),
    +** Processing line: ~                                       speed: 5.randomize(:ratio),~
     - Inside source: true
     *** True Line Result
    -          state.new_difficulty = :normal
    -** Processing line: ~        when :normal~
    +                                       speed: 5.randomize(:ratio),
    +** Processing line: ~                                       max_alpha: 255 * ship.created_at_elapsed.percentage_of(2.seconds),~
     - Inside source: true
     *** True Line Result
    -        when :normal
    -** Processing line: ~          state.new_difficulty = :hard~
    +                                       max_alpha: 255 * ship.created_at_elapsed.percentage_of(2.seconds),
    +** Processing line: ~                                       lifetime: 30,~
     - Inside source: true
     *** True Line Result
    -          state.new_difficulty = :hard
    -** Processing line: ~        when :hard~
    +                                       lifetime: 30,
    +** Processing line: ~                                       x: ship.x - ship.angle.vector_x(40) + 5.randomize(:sign, :ratio),~
     - Inside source: true
     *** True Line Result
    -        when :hard
    -** Processing line: ~          state.new_difficulty = :flappy~
    +                                       x: ship.x - ship.angle.vector_x(40) + 5.randomize(:sign, :ratio),
    +** Processing line: ~                                       y: ship.y - ship.angle.vector_y(40) + 5.randomize(:sign, :ratio) })~
     - Inside source: true
     *** True Line Result
    -          state.new_difficulty = :flappy
    -** Processing line: ~        when :flappy~
    +                                       y: ship.y - ship.angle.vector_y(40) + 5.randomize(:sign, :ratio) })
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -        when :flappy
    -** Processing line: ~          state.new_difficulty = :easy~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          state.new_difficulty = :easy
    -** Processing line: ~        end~
    +
    +** Processing line: ~    def input_accelerate_ship should_move_ship, ship~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~      end~
    +    def input_accelerate_ship should_move_ship, ship
    +** Processing line: ~      return if ship.dead~
     - Inside source: true
     *** True Line Result
    -      end
    +      return if ship.dead
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      if inputs.keyboard.key_down.enter || inputs.controller_one.key_down.start || inputs.controller_one.key_down.a~
    -- Inside source: true
    -*** True Line Result
    -      if inputs.keyboard.key_down.enter || inputs.controller_one.key_down.start || inputs.controller_one.key_down.a
    -** Processing line: ~        state.difficulty = state.new_difficulty~
    -- Inside source: true
    -*** True Line Result
    -        state.difficulty = state.new_difficulty
    -** Processing line: ~        change_to_scene :game~
    +** Processing line: ~      should_move_ship &&= (ship.dx + ship.dy).abs < 5~
     - Inside source: true
     *** True Line Result
    -        change_to_scene :game
    -** Processing line: ~        reset_game false~
    +      should_move_ship &&= (ship.dx + ship.dy).abs < 5
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        reset_game false
    -** Processing line: ~        state.hi_score = 0~
    +
    +** Processing line: ~      if should_move_ship~
     - Inside source: true
     *** True Line Result
    -        state.hi_score = 0
    -** Processing line: ~        begin_countdown~
    +      if should_move_ship
    +** Processing line: ~        create_thruster_flames! ship~
     - Inside source: true
     *** True Line Result
    -        begin_countdown
    -** Processing line: ~      end~
    +        create_thruster_flames! ship
    +** Processing line: ~        ship.dx += ship.angle.vector_x 0.050~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +        ship.dx += ship.angle.vector_x 0.050
    +** Processing line: ~        ship.dy += ship.angle.vector_y 0.050~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      if inputs.keyboard.key_down.escape || (inputs.mouse.click && !changediff) || inputs.controller_one.key_down.b~
    +        ship.dy += ship.angle.vector_y 0.050
    +** Processing line: ~      else~
     - Inside source: true
     *** True Line Result
    -      if inputs.keyboard.key_down.escape || (inputs.mouse.click && !changediff) || inputs.controller_one.key_down.b
    -** Processing line: ~        state.new_difficulty = state.difficulty~
    +      else
    +** Processing line: ~        ship.dx *= 0.99~
     - Inside source: true
     *** True Line Result
    -        state.new_difficulty = state.difficulty
    -** Processing line: ~        change_to_scene :game~
    +        ship.dx *= 0.99
    +** Processing line: ~        ship.dy *= 0.99~
     - Inside source: true
     *** True Line Result
    -        change_to_scene :game
    +        ship.dy *= 0.99
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    @@ -94323,118 +95735,114 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def process_inputs_game~
    +** Processing line: ~    def input_accelerate~
     - Inside source: true
     *** True Line Result
    -    def process_inputs_game
    -** Processing line: ~      return unless state.scene == :game~
    +    def input_accelerate
    +** Processing line: ~      input_accelerate_ship inputs.controller_one.key_held.r1 || inputs.keyboard.up, state.ship_blue~
     - Inside source: true
     *** True Line Result
    -      return unless state.scene == :game
    -** Processing line: ~~
    +      input_accelerate_ship inputs.controller_one.key_held.r1 || inputs.keyboard.up, state.ship_blue
    +** Processing line: ~      input_accelerate_ship inputs.controller_two.key_held.r1, state.ship_red~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      clicked_menu = false~
    +      input_accelerate_ship inputs.controller_two.key_held.r1, state.ship_red
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      clicked_menu = false
    -** Processing line: ~      if inputs.mouse.click~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      if inputs.mouse.click
    -** Processing line: ~        p = inputs.mouse.click.point~
    +
    +** Processing line: ~    def input_turn_ship direction, ship~
     - Inside source: true
     *** True Line Result
    -        p = inputs.mouse.click.point
    -** Processing line: ~        clicked_menu = (p.y >= 620) && (p.x < 275)~
    +    def input_turn_ship direction, ship
    +** Processing line: ~      ship.angle -= 3 * direction~
     - Inside source: true
     *** True Line Result
    -        clicked_menu = (p.y >= 620) && (p.x < 275)
    -** Processing line: ~      end~
    +      ship.angle -= 3 * direction
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      end
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      if clicked_menu || inputs.keyboard.key_down.escape || inputs.keyboard.key_down.enter || inputs.controller_one.key_down.start~
    -- Inside source: true
    -*** True Line Result
    -      if clicked_menu || inputs.keyboard.key_down.escape || inputs.keyboard.key_down.enter || inputs.controller_one.key_down.start
    -** Processing line: ~        change_to_scene :menu~
    +** Processing line: ~    def input_turn~
     - Inside source: true
     *** True Line Result
    -        change_to_scene :menu
    -** Processing line: ~      elsif (inputs.mouse.down || inputs.mouse.click || inputs.keyboard.key_down.space || inputs.controller_one.key_down.a) && state.countdown == 0~
    +    def input_turn
    +** Processing line: ~      input_turn_ship inputs.controller_one.left_right + inputs.keyboard.left_right, state.ship_blue~
     - Inside source: true
     *** True Line Result
    -      elsif (inputs.mouse.down || inputs.mouse.click || inputs.keyboard.key_down.space || inputs.controller_one.key_down.a) && state.countdown == 0
    -** Processing line: ~        state.dy = 0~
    +      input_turn_ship inputs.controller_one.left_right + inputs.keyboard.left_right, state.ship_blue
    +** Processing line: ~      input_turn_ship inputs.controller_two.left_right, state.ship_red~
     - Inside source: true
     *** True Line Result
    -        state.dy = 0
    -** Processing line: ~        state.dy += state.flap_power~
    +      input_turn_ship inputs.controller_two.left_right, state.ship_red
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -        state.dy += state.flap_power
    -** Processing line: ~        state.flapped_at = state.tick_count~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        state.flapped_at = state.tick_count
    -** Processing line: ~        outputs.sounds << "sounds/fly-sound.wav"~
    +
    +** Processing line: ~    def input_bullet create_bullet, ship~
     - Inside source: true
     *** True Line Result
    -        outputs.sounds << "sounds/fly-sound.wav"
    -** Processing line: ~      end~
    +    def input_bullet create_bullet, ship
    +** Processing line: ~      return unless create_bullet~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +      return unless create_bullet
    +** Processing line: ~      return if ship.dead~
     - Inside source: true
     *** True Line Result
    -    end
    +      return if ship.dead
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def scrolling_background at, path, rate, y = 0~
    +** Processing line: ~      state.bullets << state.new_entity(:ship_bullet,~
     - Inside source: true
     *** True Line Result
    -    def scrolling_background at, path, rate, y = 0
    -** Processing line: ~      [~
    +      state.bullets << state.new_entity(:ship_bullet,
    +** Processing line: ~                                      { owner: ship,~
     - Inside source: true
     *** True Line Result
    -      [
    -** Processing line: ~        [   0 - at.*(rate) % 1440, y, 1440, 720, path],~
    +                                      { owner: ship,
    +** Processing line: ~                                        angle: ship.angle,~
     - Inside source: true
     *** True Line Result
    -        [   0 - at.*(rate) % 1440, y, 1440, 720, path],
    -** Processing line: ~        [1440 - at.*(rate) % 1440, y, 1440, 720, path]~
    +                                        angle: ship.angle,
    +** Processing line: ~                                        max_alpha: 255 * ship.created_at_elapsed.percentage_of(2.seconds),~
     - Inside source: true
     *** True Line Result
    -        [1440 - at.*(rate) % 1440, y, 1440, 720, path]
    -** Processing line: ~      ]~
    +                                        max_alpha: 255 * ship.created_at_elapsed.percentage_of(2.seconds),
    +** Processing line: ~                                        speed: 5 + ship.dx.mult(ship.angle.vector_x) + ship.dy.mult(ship.angle.vector_y),~
     - Inside source: true
     *** True Line Result
    -      ]
    -** Processing line: ~    end~
    +                                        speed: 5 + ship.dx.mult(ship.angle.vector_x) + ship.dy.mult(ship.angle.vector_y),
    +** Processing line: ~                                        lifetime: 120,~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +                                        lifetime: 120,
    +** Processing line: ~                                        sprite_size: 10,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def white~
    +                                        sprite_size: 10,
    +** Processing line: ~                                        x: ship.x + ship.angle.vector_x * 32,~
     - Inside source: true
     *** True Line Result
    -    def white
    -** Processing line: ~      [255, 255, 255]~
    +                                        x: ship.x + ship.angle.vector_x * 32,
    +** Processing line: ~                                        y: ship.y + ship.angle.vector_y * 32 })~
     - Inside source: true
     *** True Line Result
    -      [255, 255, 255]
    +                                        y: ship.y + ship.angle.vector_y * 32 })
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -94443,58 +95851,58 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def large_white_typeset~
    +** Processing line: ~    def input_mine create_mine, ship~
     - Inside source: true
     *** True Line Result
    -    def large_white_typeset
    -** Processing line: ~      [5, 0, 255, 255, 255]~
    +    def input_mine create_mine, ship
    +** Processing line: ~      return unless create_mine~
     - Inside source: true
     *** True Line Result
    -      [5, 0, 255, 255, 255]
    -** Processing line: ~    end~
    +      return unless create_mine
    +** Processing line: ~      return if ship.dead~
     - Inside source: true
     *** True Line Result
    -    end
    +      return if ship.dead
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def at_beginning?~
    +** Processing line: ~      state.bullets << state.new_entity(:ship_bullet,~
     - Inside source: true
     *** True Line Result
    -    def at_beginning?
    -** Processing line: ~      state.walls.count == 0~
    +      state.bullets << state.new_entity(:ship_bullet,
    +** Processing line: ~                                      { owner: ship,~
     - Inside source: true
     *** True Line Result
    -      state.walls.count == 0
    -** Processing line: ~    end~
    +                                      { owner: ship,
    +** Processing line: ~                                        angle: 360.randomize(:sign, :ratio),~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +                                        angle: 360.randomize(:sign, :ratio),
    +** Processing line: ~                                        max_alpha: 255 * ship.created_at_elapsed.percentage_of(2.seconds),~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def dragon_collision_box~
    +                                        max_alpha: 255 * ship.created_at_elapsed.percentage_of(2.seconds),
    +** Processing line: ~                                        speed: 0.02,~
     - Inside source: true
     *** True Line Result
    -    def dragon_collision_box
    -** Processing line: ~      state.dragon_sprite~
    +                                        speed: 0.02,
    +** Processing line: ~                                        sprite_size: 10,~
     - Inside source: true
     *** True Line Result
    -      state.dragon_sprite
    -** Processing line: ~          .scale_rect(1.0 - collision_forgiveness, 0.5, 0.5)~
    +                                        sprite_size: 10,
    +** Processing line: ~                                        lifetime: 600,~
     - Inside source: true
     *** True Line Result
    -          .scale_rect(1.0 - collision_forgiveness, 0.5, 0.5)
    -** Processing line: ~          .rect_shift_right(10)~
    +                                        lifetime: 600,
    +** Processing line: ~                                        x: ship.x + ship.angle.vector_x * -50,~
     - Inside source: true
     *** True Line Result
    -          .rect_shift_right(10)
    -** Processing line: ~          .rect_shift_up(state.dy * 2)~
    +                                        x: ship.x + ship.angle.vector_x * -50,
    +** Processing line: ~                                        y: ship.y + ship.angle.vector_y * -50 })~
     - Inside source: true
     *** True Line Result
    -          .rect_shift_up(state.dy * 2)
    +                                        y: ship.y + ship.angle.vector_y * -50 })
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -94503,94 +95911,78 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def game_over?~
    +** Processing line: ~    def input_bullets_and_mines~
     - Inside source: true
     *** True Line Result
    -    def game_over?
    -** Processing line: ~      return true if state.y <= 0.-(500 * collision_forgiveness) && !at_beginning?~
    +    def input_bullets_and_mines
    +** Processing line: ~      return if state.bullets.length > 100~
     - Inside source: true
     *** True Line Result
    -      return true if state.y <= 0.-(500 * collision_forgiveness) && !at_beginning?
    +      return if state.bullets.length > 100
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      state.walls~
    -- Inside source: true
    -*** True Line Result
    -      state.walls
    -** Processing line: ~          .flat_map { |w| w.sprites }~
    -- Inside source: true
    -*** True Line Result
    -          .flat_map { |w| w.sprites }
    -** Processing line: ~          .any? do |s|~
    -- Inside source: true
    -*** True Line Result
    -          .any? do |s|
    -** Processing line: ~            s.intersect_rect?(dragon_collision_box)~
    -- Inside source: true
    -*** True Line Result
    -            s.intersect_rect?(dragon_collision_box)
    -** Processing line: ~          end~
    +** Processing line: ~      [~
     - Inside source: true
     *** True Line Result
    -          end
    -** Processing line: ~    end~
    +      [
    +** Processing line: ~        [inputs.controller_one.key_held.a || inputs.keyboard.key_held.space,~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +        [inputs.controller_one.key_held.a || inputs.keyboard.key_held.space,
    +** Processing line: ~         inputs.controller_one.key_down.b || inputs.keyboard.key_down.down,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def collision_forgiveness~
    +         inputs.controller_one.key_down.b || inputs.keyboard.key_down.down,
    +** Processing line: ~         state.ship_blue],~
     - Inside source: true
     *** True Line Result
    -    def collision_forgiveness
    -** Processing line: ~      case state.difficulty~
    +         state.ship_blue],
    +** Processing line: ~        [inputs.controller_two.key_held.a, inputs.controller_two.key_down.b, state.ship_red]~
     - Inside source: true
     *** True Line Result
    -      case state.difficulty
    -** Processing line: ~      when :easy~
    +        [inputs.controller_two.key_held.a, inputs.controller_two.key_down.b, state.ship_red]
    +** Processing line: ~      ].each do |a_held, b_down, ship|~
     - Inside source: true
     *** True Line Result
    -      when :easy
    -** Processing line: ~        0.9~
    +      ].each do |a_held, b_down, ship|
    +** Processing line: ~        input_bullet(a_held && state.tick_count.mod_zero?(10).or(a_held == 0), ship)~
     - Inside source: true
     *** True Line Result
    -        0.9
    -** Processing line: ~      when :normal~
    +        input_bullet(a_held && state.tick_count.mod_zero?(10).or(a_held == 0), ship)
    +** Processing line: ~        input_mine(b_down, ship)~
     - Inside source: true
     *** True Line Result
    -      when :normal
    -** Processing line: ~        0.7~
    +        input_mine(b_down, ship)
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -        0.7
    -** Processing line: ~      when :hard~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      when :hard
    -** Processing line: ~        0.5~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        0.5
    -** Processing line: ~      when :flappy~
    +
    +** Processing line: ~    def calc_kill_ships~
     - Inside source: true
     *** True Line Result
    -      when :flappy
    -** Processing line: ~        0.3~
    +    def calc_kill_ships
    +** Processing line: ~      alive_ships.find_all { |s| s.damage >= 5 }.each do |s|~
     - Inside source: true
     *** True Line Result
    -        0.3
    -** Processing line: ~      else~
    +      alive_ships.find_all { |s| s.damage >= 5 }.each do |s|
    +** Processing line: ~        s.dead = true~
     - Inside source: true
     *** True Line Result
    -      else
    -** Processing line: ~        0.9~
    +        s.dead = true
    +** Processing line: ~        create_explosion! :ship_explosion, s, 20, 20, 30, s.max_alpha~
     - Inside source: true
     *** True Line Result
    -        0.9
    +        create_explosion! :ship_explosion, s, 20, 20, 30, s.max_alpha
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    @@ -94603,46 +95995,50 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def countdown_text~
    +** Processing line: ~    def calc_score~
     - Inside source: true
     *** True Line Result
    -    def countdown_text
    -** Processing line: ~      state.countdown ||= -1~
    +    def calc_score
    +** Processing line: ~      return if state.round_finished~
     - Inside source: true
     *** True Line Result
    -      state.countdown ||= -1
    -** Processing line: ~      return ""          if state.countdown == 0~
    +      return if state.round_finished
    +** Processing line: ~      return if alive_ships.length > 1~
     - Inside source: true
     *** True Line Result
    -      return ""          if state.countdown == 0
    -** Processing line: ~      return "GO!"       if state.countdown.idiv(60) == 0~
    +      return if alive_ships.length > 1
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      return "GO!"       if state.countdown.idiv(60) == 0
    -** Processing line: ~      return "GAME OVER" if state.death_at~
    +
    +** Processing line: ~      if alive_ships.first == state.ship_red~
     - Inside source: true
     *** True Line Result
    -      return "GAME OVER" if state.death_at
    -** Processing line: ~      return "READY?"~
    +      if alive_ships.first == state.ship_red
    +** Processing line: ~        state.ship_red_score += 1~
     - Inside source: true
     *** True Line Result
    -      return "READY?"
    -** Processing line: ~    end~
    +        state.ship_red_score += 1
    +** Processing line: ~      elsif alive_ships.first == state.ship_blue~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +      elsif alive_ships.first == state.ship_blue
    +** Processing line: ~        state.ship_blue_score += 1~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def begin_countdown~
    +        state.ship_blue_score += 1
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    def begin_countdown
    -** Processing line: ~      state.countdown = 4.seconds~
    +      end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      state.countdown = 4.seconds
    +
    +** Processing line: ~      state.round_finished = true~
    +- Inside source: true
    +*** True Line Result
    +      state.round_finished = true
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -94651,30 +96047,30 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def score_text~
    +** Processing line: ~    def calc_reset_ships~
     - Inside source: true
     *** True Line Result
    -    def score_text
    -** Processing line: ~      return ""                        unless state.countdown > 1.seconds~
    +    def calc_reset_ships
    +** Processing line: ~      return unless state.round_finished~
     - Inside source: true
     *** True Line Result
    -      return ""                        unless state.countdown > 1.seconds
    -** Processing line: ~      return ""                        unless state.death_at~
    +      return unless state.round_finished
    +** Processing line: ~      state.round_finished_debounce ||= 2.seconds~
     - Inside source: true
     *** True Line Result
    -      return ""                        unless state.death_at
    -** Processing line: ~      return "SCORE: 0 (LOL)"          if state.score == 0~
    +      state.round_finished_debounce ||= 2.seconds
    +** Processing line: ~      state.round_finished_debounce -= 1~
     - Inside source: true
     *** True Line Result
    -      return "SCORE: 0 (LOL)"          if state.score == 0
    -** Processing line: ~      return "HI SCORE: #{state.score}" if state.score == state.hi_score~
    +      state.round_finished_debounce -= 1
    +** Processing line: ~      return if state.round_finished_debounce > 0~
     - Inside source: true
     *** True Line Result
    -      return "HI SCORE: #{state.score}" if state.score == state.hi_score
    -** Processing line: ~      return "SCORE: #{state.score}"~
    +      return if state.round_finished_debounce > 0
    +** Processing line: ~      start_new_round!~
     - Inside source: true
     *** True Line Result
    -      return "SCORE: #{state.score}"
    +      start_new_round!
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -94683,46 +96079,34 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def reset_game set_flash = true~
    -- Inside source: true
    -*** True Line Result
    -    def reset_game set_flash = true
    -** Processing line: ~      state.flash_at = state.tick_count if set_flash~
    -- Inside source: true
    -*** True Line Result
    -      state.flash_at = state.tick_count if set_flash
    -** Processing line: ~      state.walls = []~
    -- Inside source: true
    -*** True Line Result
    -      state.walls = []
    -** Processing line: ~      state.y = 500~
    +** Processing line: ~    def start_new_round!~
     - Inside source: true
     *** True Line Result
    -      state.y = 500
    -** Processing line: ~      state.dy = 0~
    +    def start_new_round!
    +** Processing line: ~      state.ship_blue = new_blue_ship~
     - Inside source: true
     *** True Line Result
    -      state.dy = 0
    -** Processing line: ~      state.hi_score = state.hi_score.greater(state.score)~
    +      state.ship_blue = new_blue_ship
    +** Processing line: ~      state.ship_red  = new_red_ship~
     - Inside source: true
     *** True Line Result
    -      state.hi_score = state.hi_score.greater(state.score)
    -** Processing line: ~      state.score = 0~
    +      state.ship_red  = new_red_ship
    +** Processing line: ~      state.round_finished = false~
     - Inside source: true
     *** True Line Result
    -      state.score = 0
    -** Processing line: ~      state.wall_countdown = state.wall_countdown_length.fdiv(2)~
    +      state.round_finished = false
    +** Processing line: ~      state.round_finished_debounce = nil~
     - Inside source: true
     *** True Line Result
    -      state.wall_countdown = state.wall_countdown_length.fdiv(2)
    -** Processing line: ~      state.show_death = false~
    +      state.round_finished_debounce = nil
    +** Processing line: ~      state.flames.clear~
     - Inside source: true
     *** True Line Result
    -      state.show_death = false
    -** Processing line: ~      state.death_at = nil~
    +      state.flames.clear
    +** Processing line: ~      state.bullets.clear~
     - Inside source: true
     *** True Line Result
    -      state.death_at = nil
    +      state.bullets.clear
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -94731,26 +96115,22 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def change_to_scene scene~
    -- Inside source: true
    -*** True Line Result
    -    def change_to_scene scene
    -** Processing line: ~      state.scene = scene~
    +** Processing line: ~    def calc_winner~
     - Inside source: true
     *** True Line Result
    -      state.scene = scene
    -** Processing line: ~      state.scene_at = state.tick_count~
    +    def calc_winner
    +** Processing line: ~      calc_kill_ships~
     - Inside source: true
     *** True Line Result
    -      state.scene_at = state.tick_count
    -** Processing line: ~      inputs.keyboard.clear~
    +      calc_kill_ships
    +** Processing line: ~      calc_score~
     - Inside source: true
     *** True Line Result
    -      inputs.keyboard.clear
    -** Processing line: ~      inputs.controller_one.clear~
    +      calc_score
    +** Processing line: ~      calc_reset_ships~
     - Inside source: true
     *** True Line Result
    -      inputs.controller_one.clear
    +      calc_reset_ships
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -94763,10 +96143,10 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  $flappy_dragon = FlappyDragon.new~
    +** Processing line: ~  $dueling_spaceship = DuelingSpaceships.new~
     - Inside source: true
     *** True Line Result
    -  $flappy_dragon = FlappyDragon.new
    +  $dueling_spaceship = DuelingSpaceships.new
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
    @@ -94775,26 +96155,30 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
       def tick args
    -** Processing line: ~    $flappy_dragon.grid = args.grid~
    +** Processing line: ~    args.grid.origin_center!~
     - Inside source: true
     *** True Line Result
    -    $flappy_dragon.grid = args.grid
    -** Processing line: ~    $flappy_dragon.inputs = args.inputs~
    +    args.grid.origin_center!
    +** Processing line: ~    $dueling_spaceship.inputs  = args.inputs~
     - Inside source: true
     *** True Line Result
    -    $flappy_dragon.inputs = args.inputs
    -** Processing line: ~    $flappy_dragon.state = args.state~
    +    $dueling_spaceship.inputs  = args.inputs
    +** Processing line: ~    $dueling_spaceship.outputs = args.outputs~
     - Inside source: true
     *** True Line Result
    -    $flappy_dragon.state = args.state
    -** Processing line: ~    $flappy_dragon.outputs = args.outputs~
    +    $dueling_spaceship.outputs = args.outputs
    +** Processing line: ~    $dueling_spaceship.state    = args.state~
     - Inside source: true
     *** True Line Result
    -    $flappy_dragon.outputs = args.outputs
    -** Processing line: ~    $flappy_dragon.tick~
    +    $dueling_spaceship.state    = args.state
    +** Processing line: ~    $dueling_spaceship.grid    = args.grid~
     - Inside source: true
     *** True Line Result
    -    $flappy_dragon.tick
    +    $dueling_spaceship.grid    = args.grid
    +** Processing line: ~    $dueling_spaceship.tick~
    +- Inside source: true
    +*** True Line Result
    +    $dueling_spaceship.tick
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -94811,162 +96195,182 @@ Follows is a source code listing for all files that have been open sourced. This
     - End of paragraph detected.
     *** True Line Result
     
    -** Processing line: ~*** Arcade - Pong - main.rb~
    +** Processing line: ~*** arcade/flappy dragon/credits.txt~
     - Header detected.
     *** True Line Result
     
     *** True Line Result
    -*** Arcade - Pong - main.rb
    +*** arcade/flappy dragon/credits.txt
     ** Processing line: ~#+begin_src ruby~
     - Line was identified as the beginning of a code block.
     *** True Line Result
     
     *** True Line Result
     #+begin_src ruby
    -** Processing line: ~  # ./samples/99_genre_arcade/pong/app/main.rb~
    +** Processing line: ~  # ./samples/99_genre_arcade/flappy_dragon/CREDITS.txt~
     - Inside source: true
     *** True Line Result
    -  # ./samples/99_genre_arcade/pong/app/main.rb
    -** Processing line: ~  def tick args~
    +  # ./samples/99_genre_arcade/flappy_dragon/CREDITS.txt
    +** Processing line: ~  code: Amir Rajan, https://twitter.com/amirrajan~
     - Inside source: true
     *** True Line Result
    -  def tick args
    -** Processing line: ~    defaults args~
    +  code: Amir Rajan, https://twitter.com/amirrajan
    +** Processing line: ~  graphics and audio: Nick Culbertson, https://twitter.com/MobyPixel~
     - Inside source: true
     *** True Line Result
    -    defaults args
    -** Processing line: ~    render args~
    +  graphics and audio: Nick Culbertson, https://twitter.com/MobyPixel
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    render args
    -** Processing line: ~    calc args~
    +
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    calc args
    -** Processing line: ~    input args~
    +
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
    +*** True Line Result
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +
    +** Processing line: ~*** arcade/flappy dragon/main.rb~
    +- Header detected.
    +*** True Line Result
    +
    +*** True Line Result
    +*** arcade/flappy dragon/main.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/99_genre_arcade/flappy_dragon/app/main.rb~
     - Inside source: true
     *** True Line Result
    -    input args
    -** Processing line: ~  end~
    +  # ./samples/99_genre_arcade/flappy_dragon/app/main.rb
    +** Processing line: ~  class FlappyDragon~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +  class FlappyDragon
    +** Processing line: ~    attr_accessor :grid, :inputs, :state, :outputs~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def defaults args~
    +    attr_accessor :grid, :inputs, :state, :outputs
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  def defaults args
    -** Processing line: ~    args.state.ball.debounce       ||= 3 * 60~
    +
    +** Processing line: ~    def tick~
     - Inside source: true
     *** True Line Result
    -    args.state.ball.debounce       ||= 3 * 60
    -** Processing line: ~    args.state.ball.size           ||= 10~
    +    def tick
    +** Processing line: ~      defaults~
     - Inside source: true
     *** True Line Result
    -    args.state.ball.size           ||= 10
    -** Processing line: ~    args.state.ball.size_half      ||= args.state.ball.size / 2~
    +      defaults
    +** Processing line: ~      render~
     - Inside source: true
     *** True Line Result
    -    args.state.ball.size_half      ||= args.state.ball.size / 2
    -** Processing line: ~    args.state.ball.x              ||= 640~
    +      render
    +** Processing line: ~      calc~
     - Inside source: true
     *** True Line Result
    -    args.state.ball.x              ||= 640
    -** Processing line: ~    args.state.ball.y              ||= 360~
    +      calc
    +** Processing line: ~      process_inputs~
     - Inside source: true
     *** True Line Result
    -    args.state.ball.y              ||= 360
    -** Processing line: ~    args.state.ball.dx             ||= 5.randomize(:sign)~
    +      process_inputs
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    args.state.ball.dx             ||= 5.randomize(:sign)
    -** Processing line: ~    args.state.ball.dy             ||= 5.randomize(:sign)~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    args.state.ball.dy             ||= 5.randomize(:sign)
    -** Processing line: ~    args.state.left_paddle.y       ||= 360~
    +
    +** Processing line: ~    def defaults~
     - Inside source: true
     *** True Line Result
    -    args.state.left_paddle.y       ||= 360
    -** Processing line: ~    args.state.right_paddle.y      ||= 360~
    +    def defaults
    +** Processing line: ~      state.flap_power              = 11~
     - Inside source: true
     *** True Line Result
    -    args.state.right_paddle.y      ||= 360
    -** Processing line: ~    args.state.paddle.h            ||= 120~
    +      state.flap_power              = 11
    +** Processing line: ~      state.gravity                 = 0.9~
     - Inside source: true
     *** True Line Result
    -    args.state.paddle.h            ||= 120
    -** Processing line: ~    args.state.paddle.w            ||= 10~
    +      state.gravity                 = 0.9
    +** Processing line: ~      state.ceiling                 = 600~
     - Inside source: true
     *** True Line Result
    -    args.state.paddle.w            ||= 10
    -** Processing line: ~    args.state.left_paddle.score   ||= 0~
    +      state.ceiling                 = 600
    +** Processing line: ~      state.ceiling_flap_power      = 6~
     - Inside source: true
     *** True Line Result
    -    args.state.left_paddle.score   ||= 0
    -** Processing line: ~    args.state.right_paddle.score  ||= 0~
    +      state.ceiling_flap_power      = 6
    +** Processing line: ~      state.wall_countdown_length   = 100~
     - Inside source: true
     *** True Line Result
    -    args.state.right_paddle.score  ||= 0
    -** Processing line: ~  end~
    +      state.wall_countdown_length   = 100
    +** Processing line: ~      state.wall_gap_size           = 100~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +      state.wall_gap_size           = 100
    +** Processing line: ~      state.wall_countdown        ||= 0~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def render args~
    +      state.wall_countdown        ||= 0
    +** Processing line: ~      state.hi_score              ||= 0~
     - Inside source: true
     *** True Line Result
    -  def render args
    -** Processing line: ~    render_center_line args~
    +      state.hi_score              ||= 0
    +** Processing line: ~      state.score                 ||= 0~
     - Inside source: true
     *** True Line Result
    -    render_center_line args
    -** Processing line: ~    render_scores args~
    +      state.score                 ||= 0
    +** Processing line: ~      state.walls                 ||= []~
     - Inside source: true
     *** True Line Result
    -    render_scores args
    -** Processing line: ~    render_countdown args~
    +      state.walls                 ||= []
    +** Processing line: ~      state.x                     ||= 50~
     - Inside source: true
     *** True Line Result
    -    render_countdown args
    -** Processing line: ~    render_ball args~
    +      state.x                     ||= 50
    +** Processing line: ~      state.y                     ||= 500~
     - Inside source: true
     *** True Line Result
    -    render_ball args
    -** Processing line: ~    render_paddles args~
    +      state.y                     ||= 500
    +** Processing line: ~      state.dy                    ||= 0~
     - Inside source: true
     *** True Line Result
    -    render_paddles args
    -** Processing line: ~    render_instructions args~
    +      state.dy                    ||= 0
    +** Processing line: ~      state.scene                 ||= :menu~
     - Inside source: true
     *** True Line Result
    -    render_instructions args
    -** Processing line: ~  end~
    +      state.scene                 ||= :menu
    +** Processing line: ~      state.scene_at              ||= 0~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +      state.scene_at              ||= 0
    +** Processing line: ~      state.difficulty            ||= :normal~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  begin :render_methods~
    +      state.difficulty            ||= :normal
    +** Processing line: ~      state.new_difficulty        ||= :normal~
     - Inside source: true
     *** True Line Result
    -  begin :render_methods
    -** Processing line: ~    def render_center_line args~
    +      state.new_difficulty        ||= :normal
    +** Processing line: ~      state.countdown             ||= 4.seconds~
     - Inside source: true
     *** True Line Result
    -    def render_center_line args
    -** Processing line: ~      args.outputs.lines  << [640, 0, 640, 720]~
    +      state.countdown             ||= 4.seconds
    +** Processing line: ~      state.flash_at              ||= 0~
     - Inside source: true
     *** True Line Result
    -      args.outputs.lines  << [640, 0, 640, 720]
    +      state.flash_at              ||= 0
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -94975,26 +96379,26 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def render_scores args~
    +** Processing line: ~    def render~
     - Inside source: true
     *** True Line Result
    -    def render_scores args
    -** Processing line: ~      args.outputs.labels << [~
    +    def render
    +** Processing line: ~      outputs.sounds << "sounds/flappy-song.ogg" if state.tick_count == 1~
     - Inside source: true
     *** True Line Result
    -      args.outputs.labels << [
    -** Processing line: ~        [320, 650, args.state.left_paddle.score, 10, 1],~
    +      outputs.sounds << "sounds/flappy-song.ogg" if state.tick_count == 1
    +** Processing line: ~      render_score~
     - Inside source: true
     *** True Line Result
    -        [320, 650, args.state.left_paddle.score, 10, 1],
    -** Processing line: ~        [960, 650, args.state.right_paddle.score, 10, 1]~
    +      render_score
    +** Processing line: ~      render_menu~
     - Inside source: true
     *** True Line Result
    -        [960, 650, args.state.right_paddle.score, 10, 1]
    -** Processing line: ~      ]~
    +      render_menu
    +** Processing line: ~      render_game~
     - Inside source: true
     *** True Line Result
    -      ]
    +      render_game
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -95003,18 +96407,22 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def render_countdown args~
    +** Processing line: ~    def render_score~
     - Inside source: true
     *** True Line Result
    -    def render_countdown args
    -** Processing line: ~      return unless args.state.ball.debounce > 0~
    +    def render_score
    +** Processing line: ~      outputs.primitives << { x: 10, y: 710, text: "HI SCORE: #{state.hi_score}", **large_white_typeset }~
     - Inside source: true
     *** True Line Result
    -      return unless args.state.ball.debounce > 0
    -** Processing line: ~      args.outputs.labels << [640, 360, "%.2f" % args.state.ball.debounce.fdiv(60), 10, 1]~
    +      outputs.primitives << { x: 10, y: 710, text: "HI SCORE: #{state.hi_score}", **large_white_typeset }
    +** Processing line: ~      outputs.primitives << { x: 10, y: 680, text: "SCORE: #{state.score}", **large_white_typeset }~
     - Inside source: true
     *** True Line Result
    -      args.outputs.labels << [640, 360, "%.2f" % args.state.ball.debounce.fdiv(60), 10, 1]
    +      outputs.primitives << { x: 10, y: 680, text: "SCORE: #{state.score}", **large_white_typeset }
    +** Processing line: ~      outputs.primitives << { x: 10, y: 650, text: "DIFFICULTY: #{state.difficulty.upcase}", **large_white_typeset }~
    +- Inside source: true
    +*** True Line Result
    +      outputs.primitives << { x: 10, y: 650, text: "DIFFICULTY: #{state.difficulty.upcase}", **large_white_typeset }
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -95023,114 +96431,138 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def render_ball args~
    +** Processing line: ~    def render_menu~
     - Inside source: true
     *** True Line Result
    -    def render_ball args
    -** Processing line: ~      args.outputs.solids << solid_ball(args)~
    +    def render_menu
    +** Processing line: ~      return unless state.scene == :menu~
     - Inside source: true
     *** True Line Result
    -      args.outputs.solids << solid_ball(args)
    -** Processing line: ~    end~
    +      return unless state.scene == :menu
    +** Processing line: ~      render_overlay~
     - Inside source: true
     *** True Line Result
    -    end
    +      render_overlay
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def render_paddles args~
    +** Processing line: ~      outputs.labels << { x: 640, y: 700, text: "Flappy Dragon", size_enum: 50, alignment_enum: 1, **white }~
     - Inside source: true
     *** True Line Result
    -    def render_paddles args
    -** Processing line: ~      args.outputs.solids << solid_left_paddle(args)~
    +      outputs.labels << { x: 640, y: 700, text: "Flappy Dragon", size_enum: 50, alignment_enum: 1, **white }
    +** Processing line: ~      outputs.labels << { x: 640, y: 500, text: "Instructions: Press Spacebar to flap. Don't die.", size_enum: 4, alignment_enum: 1, **white }~
     - Inside source: true
     *** True Line Result
    -      args.outputs.solids << solid_left_paddle(args)
    -** Processing line: ~      args.outputs.solids << solid_right_paddle(args)~
    +      outputs.labels << { x: 640, y: 500, text: "Instructions: Press Spacebar to flap. Don't die.", size_enum: 4, alignment_enum: 1, **white }
    +** Processing line: ~      outputs.labels << { x: 430, y: 430, text: "[Tab]    Change difficulty", size_enum: 4, alignment_enum: 0, **white }~
     - Inside source: true
     *** True Line Result
    -      args.outputs.solids << solid_right_paddle(args)
    -** Processing line: ~    end~
    +      outputs.labels << { x: 430, y: 430, text: "[Tab]    Change difficulty", size_enum: 4, alignment_enum: 0, **white }
    +** Processing line: ~      outputs.labels << { x: 430, y: 400, text: "[Enter]  Start at New Difficulty ", size_enum: 4, alignment_enum: 0, **white }~
     - Inside source: true
     *** True Line Result
    -    end
    +      outputs.labels << { x: 430, y: 400, text: "[Enter]  Start at New Difficulty ", size_enum: 4, alignment_enum: 0, **white }
    +** Processing line: ~      outputs.labels << { x: 430, y: 370, text: "[Escape] Cancel/Resume ", size_enum: 4, alignment_enum: 0, **white }~
    +- Inside source: true
    +*** True Line Result
    +      outputs.labels << { x: 430, y: 370, text: "[Escape] Cancel/Resume ", size_enum: 4, alignment_enum: 0, **white }
    +** Processing line: ~      outputs.labels << { x: 640, y: 300, text: "(mouse, touch, and game controllers work, too!) ", size_enum: 4, alignment_enum: 1, **white }~
    +- Inside source: true
    +*** True Line Result
    +      outputs.labels << { x: 640, y: 300, text: "(mouse, touch, and game controllers work, too!) ", size_enum: 4, alignment_enum: 1, **white }
    +** Processing line: ~      outputs.labels << { x: 640, y: 200, text: "Difficulty: #{state.new_difficulty.capitalize}", size_enum: 4, alignment_enum: 1, **white }~
    +- Inside source: true
    +*** True Line Result
    +      outputs.labels << { x: 640, y: 200, text: "Difficulty: #{state.new_difficulty.capitalize}", size_enum: 4, alignment_enum: 1, **white }
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def render_instructions args~
    +** Processing line: ~      outputs.labels << { x: 10, y: 100, text: "Code:   @amirrajan",     **white }~
     - Inside source: true
     *** True Line Result
    -    def render_instructions args
    -** Processing line: ~      args.outputs.labels << [320, 30, "W and S keys to move left paddle.",  0, 1]~
    +      outputs.labels << { x: 10, y: 100, text: "Code:   @amirrajan",     **white }
    +** Processing line: ~      outputs.labels << { x: 10, y:  80, text: "Art:    @mobypixel",     **white }~
     - Inside source: true
     *** True Line Result
    -      args.outputs.labels << [320, 30, "W and S keys to move left paddle.",  0, 1]
    -** Processing line: ~      args.outputs.labels << [920, 30, "O and L keys to move right paddle.", 0, 1]~
    +      outputs.labels << { x: 10, y:  80, text: "Art:    @mobypixel",     **white }
    +** Processing line: ~      outputs.labels << { x: 10, y:  60, text: "Music:  @mobypixel",     **white }~
     - Inside source: true
     *** True Line Result
    -      args.outputs.labels << [920, 30, "O and L keys to move right paddle.", 0, 1]
    -** Processing line: ~    end~
    +      outputs.labels << { x: 10, y:  60, text: "Music:  @mobypixel",     **white }
    +** Processing line: ~      outputs.labels << { x: 10, y:  40, text: "Engine: DragonRuby GTK", **white }~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~  end~
    +      outputs.labels << { x: 10, y:  40, text: "Engine: DragonRuby GTK", **white }
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  end
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def calc args~
    +** Processing line: ~    def render_overlay~
     - Inside source: true
     *** True Line Result
    -  def calc args
    -** Processing line: ~    args.state.ball.debounce -= 1 and return if args.state.ball.debounce > 0~
    +    def render_overlay
    +** Processing line: ~      overlay_rect = grid.rect.scale_rect(1.1, 0, 0)~
     - Inside source: true
     *** True Line Result
    -    args.state.ball.debounce -= 1 and return if args.state.ball.debounce > 0
    -** Processing line: ~    calc_move_ball args~
    +      overlay_rect = grid.rect.scale_rect(1.1, 0, 0)
    +** Processing line: ~      outputs.primitives << { x: overlay_rect.x,~
     - Inside source: true
     *** True Line Result
    -    calc_move_ball args
    -** Processing line: ~    calc_collision_with_left_paddle args~
    +      outputs.primitives << { x: overlay_rect.x,
    +** Processing line: ~                              y: overlay_rect.y,~
     - Inside source: true
     *** True Line Result
    -    calc_collision_with_left_paddle args
    -** Processing line: ~    calc_collision_with_right_paddle args~
    +                              y: overlay_rect.y,
    +** Processing line: ~                              w: overlay_rect.w,~
     - Inside source: true
     *** True Line Result
    -    calc_collision_with_right_paddle args
    -** Processing line: ~    calc_collision_with_walls args~
    +                              w: overlay_rect.w,
    +** Processing line: ~                              h: overlay_rect.h,~
     - Inside source: true
     *** True Line Result
    -    calc_collision_with_walls args
    -** Processing line: ~  end~
    +                              h: overlay_rect.h,
    +** Processing line: ~                              r: 0, g: 0, b: 0, a: 230 }.solid!~
     - Inside source: true
     *** True Line Result
    -  end
    +                              r: 0, g: 0, b: 0, a: 230 }.solid!
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  begin :calc_methods~
    +** Processing line: ~    def render_game~
     - Inside source: true
     *** True Line Result
    -  begin :calc_methods
    -** Processing line: ~    def calc_move_ball args~
    +    def render_game
    +** Processing line: ~      render_game_over~
     - Inside source: true
     *** True Line Result
    -    def calc_move_ball args
    -** Processing line: ~      args.state.ball.x += args.state.ball.dx~
    +      render_game_over
    +** Processing line: ~      render_background~
     - Inside source: true
     *** True Line Result
    -      args.state.ball.x += args.state.ball.dx
    -** Processing line: ~      args.state.ball.y += args.state.ball.dy~
    +      render_background
    +** Processing line: ~      render_walls~
     - Inside source: true
     *** True Line Result
    -      args.state.ball.y += args.state.ball.dy
    +      render_walls
    +** Processing line: ~      render_dragon~
    +- Inside source: true
    +*** True Line Result
    +      render_dragon
    +** Processing line: ~      render_flash~
    +- Inside source: true
    +*** True Line Result
    +      render_flash
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -95139,34 +96571,30 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def calc_collision_with_left_paddle args~
    -- Inside source: true
    -*** True Line Result
    -    def calc_collision_with_left_paddle args
    -** Processing line: ~      if solid_left_paddle(args).intersect_rect? solid_ball(args)~
    +** Processing line: ~    def render_game_over~
     - Inside source: true
     *** True Line Result
    -      if solid_left_paddle(args).intersect_rect? solid_ball(args)
    -** Processing line: ~        args.state.ball.dx *= -1~
    +    def render_game_over
    +** Processing line: ~      return unless state.scene == :game~
     - Inside source: true
     *** True Line Result
    -        args.state.ball.dx *= -1
    -** Processing line: ~      elsif args.state.ball.x < 0~
    +      return unless state.scene == :game
    +** Processing line: ~      outputs.labels << { x: 638, y: 358, text: score_text,     size_enum: 20, alignment_enum: 1 }~
     - Inside source: true
     *** True Line Result
    -      elsif args.state.ball.x < 0
    -** Processing line: ~        args.state.right_paddle.score += 1~
    +      outputs.labels << { x: 638, y: 358, text: score_text,     size_enum: 20, alignment_enum: 1 }
    +** Processing line: ~      outputs.labels << { x: 635, y: 360, text: score_text,     size_enum: 20, alignment_enum: 1, r: 255, g: 255, b: 255 }~
     - Inside source: true
     *** True Line Result
    -        args.state.right_paddle.score += 1
    -** Processing line: ~        calc_reset_round args~
    +      outputs.labels << { x: 635, y: 360, text: score_text,     size_enum: 20, alignment_enum: 1, r: 255, g: 255, b: 255 }
    +** Processing line: ~      outputs.labels << { x: 638, y: 428, text: countdown_text, size_enum: 20, alignment_enum: 1 }~
     - Inside source: true
     *** True Line Result
    -        calc_reset_round args
    -** Processing line: ~      end~
    +      outputs.labels << { x: 638, y: 428, text: countdown_text, size_enum: 20, alignment_enum: 1 }
    +** Processing line: ~      outputs.labels << { x: 635, y: 430, text: countdown_text, size_enum: 20, alignment_enum: 1, r: 255, g: 255, b: 255 }~
     - Inside source: true
     *** True Line Result
    -      end
    +      outputs.labels << { x: 635, y: 430, text: countdown_text, size_enum: 20, alignment_enum: 1, r: 255, g: 255, b: 255 }
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -95175,74 +96603,78 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def calc_collision_with_right_paddle args~
    -- Inside source: true
    -*** True Line Result
    -    def calc_collision_with_right_paddle args
    -** Processing line: ~      if solid_right_paddle(args).intersect_rect? solid_ball(args)~
    +** Processing line: ~    def render_background~
     - Inside source: true
     *** True Line Result
    -      if solid_right_paddle(args).intersect_rect? solid_ball(args)
    -** Processing line: ~        args.state.ball.dx *= -1~
    +    def render_background
    +** Processing line: ~      outputs.sprites << { x: 0, y: 0, w: 1280, h: 720, path: 'sprites/background.png' }~
     - Inside source: true
     *** True Line Result
    -        args.state.ball.dx *= -1
    -** Processing line: ~      elsif args.state.ball.x > 1280~
    +      outputs.sprites << { x: 0, y: 0, w: 1280, h: 720, path: 'sprites/background.png' }
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      elsif args.state.ball.x > 1280
    -** Processing line: ~        args.state.left_paddle.score += 1~
    +
    +** Processing line: ~      scroll_point_at   = state.tick_count~
     - Inside source: true
     *** True Line Result
    -        args.state.left_paddle.score += 1
    -** Processing line: ~        calc_reset_round args~
    +      scroll_point_at   = state.tick_count
    +** Processing line: ~      scroll_point_at   = state.scene_at if state.scene == :menu~
     - Inside source: true
     *** True Line Result
    -        calc_reset_round args
    -** Processing line: ~      end~
    +      scroll_point_at   = state.scene_at if state.scene == :menu
    +** Processing line: ~      scroll_point_at   = state.death_at if state.countdown > 0~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +      scroll_point_at   = state.death_at if state.countdown > 0
    +** Processing line: ~      scroll_point_at ||= 0~
     - Inside source: true
     *** True Line Result
    -    end
    +      scroll_point_at ||= 0
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def calc_collision_with_walls args~
    +** Processing line: ~      outputs.sprites << scrolling_background(scroll_point_at, 'sprites/parallax_back.png',   0.25)~
     - Inside source: true
     *** True Line Result
    -    def calc_collision_with_walls args
    -** Processing line: ~      if args.state.ball.y + args.state.ball.size_half > 720~
    +      outputs.sprites << scrolling_background(scroll_point_at, 'sprites/parallax_back.png',   0.25)
    +** Processing line: ~      outputs.sprites << scrolling_background(scroll_point_at, 'sprites/parallax_middle.png', 0.50)~
     - Inside source: true
     *** True Line Result
    -      if args.state.ball.y + args.state.ball.size_half > 720
    -** Processing line: ~        args.state.ball.y = 720 - args.state.ball.size_half~
    +      outputs.sprites << scrolling_background(scroll_point_at, 'sprites/parallax_middle.png', 0.50)
    +** Processing line: ~      outputs.sprites << scrolling_background(scroll_point_at, 'sprites/parallax_front.png',  1.00, -80)~
     - Inside source: true
     *** True Line Result
    -        args.state.ball.y = 720 - args.state.ball.size_half
    -** Processing line: ~        args.state.ball.dy *= -1~
    +      outputs.sprites << scrolling_background(scroll_point_at, 'sprites/parallax_front.png',  1.00, -80)
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -        args.state.ball.dy *= -1
    -** Processing line: ~      elsif args.state.ball.y - args.state.ball.size_half < 0~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      elsif args.state.ball.y - args.state.ball.size_half < 0
    -** Processing line: ~        args.state.ball.y = args.state.ball.size_half~
    +
    +** Processing line: ~    def scrolling_background at, path, rate, y = 0~
     - Inside source: true
     *** True Line Result
    -        args.state.ball.y = args.state.ball.size_half
    -** Processing line: ~        args.state.ball.dy *= -1~
    +    def scrolling_background at, path, rate, y = 0
    +** Processing line: ~      [~
     - Inside source: true
     *** True Line Result
    -        args.state.ball.dy *= -1
    -** Processing line: ~      end~
    +      [
    +** Processing line: ~        { x:    0 - at.*(rate) % 1440, y: y, w: 1440, h: 720, path: path },~
     - Inside source: true
     *** True Line Result
    -      end
    +        { x:    0 - at.*(rate) % 1440, y: y, w: 1440, h: 720, path: path },
    +** Processing line: ~        { x: 1440 - at.*(rate) % 1440, y: y, w: 1440, h: 720, path: path }~
    +- Inside source: true
    +*** True Line Result
    +        { x: 1440 - at.*(rate) % 1440, y: y, w: 1440, h: 720, path: path }
    +** Processing line: ~      ]~
    +- Inside source: true
    +*** True Line Result
    +      ]
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -95251,146 +96683,154 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def calc_reset_round args~
    +** Processing line: ~    def render_walls~
     - Inside source: true
     *** True Line Result
    -    def calc_reset_round args
    -** Processing line: ~      args.state.ball.x = 640~
    +    def render_walls
    +** Processing line: ~      state.walls.each do |w|~
     - Inside source: true
     *** True Line Result
    -      args.state.ball.x = 640
    -** Processing line: ~      args.state.ball.y = 360~
    +      state.walls.each do |w|
    +** Processing line: ~        w.sprites = [~
     - Inside source: true
     *** True Line Result
    -      args.state.ball.y = 360
    -** Processing line: ~      args.state.ball.dx = 5.randomize(:sign)~
    +        w.sprites = [
    +** Processing line: ~          { x: w.x, y: w.bottom_height - 720, w: 100, h: 720, path: 'sprites/wall.png',       angle: 180 },~
     - Inside source: true
     *** True Line Result
    -      args.state.ball.dx = 5.randomize(:sign)
    -** Processing line: ~      args.state.ball.dy = 5.randomize(:sign)~
    +          { x: w.x, y: w.bottom_height - 720, w: 100, h: 720, path: 'sprites/wall.png',       angle: 180 },
    +** Processing line: ~          { x: w.x, y: w.top_y,               w: 100, h: 720, path: 'sprites/wallbottom.png', angle: 0 }~
     - Inside source: true
     *** True Line Result
    -      args.state.ball.dy = 5.randomize(:sign)
    -** Processing line: ~      args.state.ball.debounce = 3 * 60~
    +          { x: w.x, y: w.top_y,               w: 100, h: 720, path: 'sprites/wallbottom.png', angle: 0 }
    +** Processing line: ~        ]~
     - Inside source: true
     *** True Line Result
    -      args.state.ball.debounce = 3 * 60
    +        ]
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~      outputs.sprites << state.walls.map(&:sprites)~
    +- Inside source: true
    +*** True Line Result
    +      outputs.sprites << state.walls.map(&:sprites)
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
         end
    -** Processing line: ~  end~
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  end
    +
    +** Processing line: ~    def render_dragon~
    +- Inside source: true
    +*** True Line Result
    +    def render_dragon
    +** Processing line: ~      state.show_death = true if state.countdown == 3.seconds~
    +- Inside source: true
    +*** True Line Result
    +      state.show_death = true if state.countdown == 3.seconds
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def input args~
    +** Processing line: ~      if state.show_death == false || !state.death_at~
     - Inside source: true
     *** True Line Result
    -  def input args
    -** Processing line: ~    input_left_paddle args~
    +      if state.show_death == false || !state.death_at
    +** Processing line: ~        animation_index = state.flapped_at.frame_index 6, 2, false if state.flapped_at~
     - Inside source: true
     *** True Line Result
    -    input_left_paddle args
    -** Processing line: ~    input_right_paddle args~
    +        animation_index = state.flapped_at.frame_index 6, 2, false if state.flapped_at
    +** Processing line: ~        sprite_name = "sprites/dragon_fly#{animation_index.or(0) + 1}.png"~
     - Inside source: true
     *** True Line Result
    -    input_right_paddle args
    -** Processing line: ~  end~
    +        sprite_name = "sprites/dragon_fly#{animation_index.or(0) + 1}.png"
    +** Processing line: ~        state.dragon_sprite = { x: state.x, y: state.y, w: 100, h: 80, path: sprite_name, angle: state.dy * 1.2 }~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +        state.dragon_sprite = { x: state.x, y: state.y, w: 100, h: 80, path: sprite_name, angle: state.dy * 1.2 }
    +** Processing line: ~      else~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  begin :input_methods~
    +      else
    +** Processing line: ~        sprite_name = "sprites/dragon_die.png"~
     - Inside source: true
     *** True Line Result
    -  begin :input_methods
    -** Processing line: ~    def input_left_paddle args~
    +        sprite_name = "sprites/dragon_die.png"
    +** Processing line: ~        state.dragon_sprite = { x: state.x, y: state.y, w: 100, h: 80, path: sprite_name, angle: state.dy * 1.2 }~
     - Inside source: true
     *** True Line Result
    -    def input_left_paddle args
    -** Processing line: ~      if args.inputs.controller_one.key_down.down  || args.inputs.keyboard.key_down.s~
    +        state.dragon_sprite = { x: state.x, y: state.y, w: 100, h: 80, path: sprite_name, angle: state.dy * 1.2 }
    +** Processing line: ~        sprite_changed_elapsed    = state.death_at.elapsed_time - 1.seconds~
     - Inside source: true
     *** True Line Result
    -      if args.inputs.controller_one.key_down.down  || args.inputs.keyboard.key_down.s
    -** Processing line: ~        args.state.left_paddle.y -= 40~
    +        sprite_changed_elapsed    = state.death_at.elapsed_time - 1.seconds
    +** Processing line: ~        state.dragon_sprite.angle += (sprite_changed_elapsed ** 1.3) * state.death_fall_direction * -1~
     - Inside source: true
     *** True Line Result
    -        args.state.left_paddle.y -= 40
    -** Processing line: ~      elsif args.inputs.controller_one.key_down.up || args.inputs.keyboard.key_down.w~
    +        state.dragon_sprite.angle += (sprite_changed_elapsed ** 1.3) * state.death_fall_direction * -1
    +** Processing line: ~        state.dragon_sprite.x     += (sprite_changed_elapsed ** 1.2) * state.death_fall_direction~
     - Inside source: true
     *** True Line Result
    -      elsif args.inputs.controller_one.key_down.up || args.inputs.keyboard.key_down.w
    -** Processing line: ~        args.state.left_paddle.y += 40~
    +        state.dragon_sprite.x     += (sprite_changed_elapsed ** 1.2) * state.death_fall_direction
    +** Processing line: ~        state.dragon_sprite.y     += (sprite_changed_elapsed * 14 - sprite_changed_elapsed ** 1.6)~
     - Inside source: true
     *** True Line Result
    -        args.state.left_paddle.y += 40
    +        state.dragon_sprite.y     += (sprite_changed_elapsed * 14 - sprite_changed_elapsed ** 1.6)
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
           end
    -** Processing line: ~    end~
    -- Inside source: true
    -*** True Line Result
    -    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def input_right_paddle args~
    -- Inside source: true
    -*** True Line Result
    -    def input_right_paddle args
    -** Processing line: ~      if args.inputs.controller_two.key_down.down  || args.inputs.keyboard.key_down.l~
    +** Processing line: ~      outputs.sprites << state.dragon_sprite~
     - Inside source: true
     *** True Line Result
    -      if args.inputs.controller_two.key_down.down  || args.inputs.keyboard.key_down.l
    -** Processing line: ~        args.state.right_paddle.y -= 40~
    +      outputs.sprites << state.dragon_sprite
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -        args.state.right_paddle.y -= 40
    -** Processing line: ~      elsif args.inputs.controller_two.key_down.up || args.inputs.keyboard.key_down.o~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      elsif args.inputs.controller_two.key_down.up || args.inputs.keyboard.key_down.o
    -** Processing line: ~        args.state.right_paddle.y += 40~
    +
    +** Processing line: ~    def render_flash~
     - Inside source: true
     *** True Line Result
    -        args.state.right_paddle.y += 40
    -** Processing line: ~      end~
    +    def render_flash
    +** Processing line: ~      return unless state.flash_at~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +      return unless state.flash_at
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~  end~
    +
    +** Processing line: ~      outputs.primitives << { **grid.rect.to_hash,~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +      outputs.primitives << { **grid.rect.to_hash,
    +** Processing line: ~                              **white,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  begin :assets~
    +                              **white,
    +** Processing line: ~                              a: 255 * state.flash_at.ease(20, :flip) }.solid!~
     - Inside source: true
     *** True Line Result
    -  begin :assets
    -** Processing line: ~    def solid_ball args~
    +                              a: 255 * state.flash_at.ease(20, :flip) }.solid!
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    def solid_ball args
    -** Processing line: ~      centered_rect args.state.ball.x, args.state.ball.y, args.state.ball.size, args.state.ball.size~
    +
    +** Processing line: ~      state.flash_at = 0 if state.flash_at.elapsed_time > 20~
     - Inside source: true
     *** True Line Result
    -      centered_rect args.state.ball.x, args.state.ball.y, args.state.ball.size, args.state.ball.size
    +      state.flash_at = 0 if state.flash_at.elapsed_time > 20
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -95399,30 +96839,34 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def solid_left_paddle args~
    +** Processing line: ~    def calc~
     - Inside source: true
     *** True Line Result
    -    def solid_left_paddle args
    -** Processing line: ~      centered_rect_vertically 0, args.state.left_paddle.y, args.state.paddle.w, args.state.paddle.h~
    +    def calc
    +** Processing line: ~      return unless state.scene == :game~
     - Inside source: true
     *** True Line Result
    -      centered_rect_vertically 0, args.state.left_paddle.y, args.state.paddle.w, args.state.paddle.h
    -** Processing line: ~    end~
    +      return unless state.scene == :game
    +** Processing line: ~      reset_game if state.countdown == 1~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +      reset_game if state.countdown == 1
    +** Processing line: ~      state.countdown -= 1 and return if state.countdown > 0~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def solid_right_paddle args~
    +      state.countdown -= 1 and return if state.countdown > 0
    +** Processing line: ~      calc_walls~
     - Inside source: true
     *** True Line Result
    -    def solid_right_paddle args
    -** Processing line: ~      centered_rect_vertically 1280 - args.state.paddle.w, args.state.right_paddle.y, args.state.paddle.w, args.state.paddle.h~
    +      calc_walls
    +** Processing line: ~      calc_flap~
     - Inside source: true
     *** True Line Result
    -      centered_rect_vertically 1280 - args.state.paddle.w, args.state.right_paddle.y, args.state.paddle.w, args.state.paddle.h
    +      calc_flap
    +** Processing line: ~      calc_game_over~
    +- Inside source: true
    +*** True Line Result
    +      calc_game_over
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -95431,162 +96875,174 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def centered_rect x, y, w, h~
    -- Inside source: true
    -*** True Line Result
    -    def centered_rect x, y, w, h
    -** Processing line: ~      [x - w / 2, y - h / 2, w, h]~
    +** Processing line: ~    def calc_walls~
     - Inside source: true
     *** True Line Result
    -      [x - w / 2, y - h / 2, w, h]
    -** Processing line: ~    end~
    +    def calc_walls
    +** Processing line: ~      state.walls.each { |w| w.x -= 8 }~
     - Inside source: true
     *** True Line Result
    -    end
    +      state.walls.each { |w| w.x -= 8 }
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def centered_rect_vertically x, y, w, h~
    +** Processing line: ~      walls_count_before_removal = state.walls.length~
     - Inside source: true
     *** True Line Result
    -    def centered_rect_vertically x, y, w, h
    -** Processing line: ~      [x, y - h / 2, w, h]~
    +      walls_count_before_removal = state.walls.length
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      [x, y - h / 2, w, h]
    -** Processing line: ~    end~
    +
    +** Processing line: ~      state.walls.reject! { |w| w.x < -100 }~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~  end~
    +      state.walls.reject! { |w| w.x < -100 }
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  end
    +
    +** Processing line: ~      state.score += 1 if state.walls.count < walls_count_before_removal~
    +- Inside source: true
    +*** True Line Result
    +      state.score += 1 if state.walls.count < walls_count_before_removal
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~#+end_src~
    -- Line was identified as the end of a code block.
    +** Processing line: ~      state.wall_countdown -= 1 and return if state.wall_countdown > 0~
    +- Inside source: true
     *** True Line Result
    -#+end_src
    +      state.wall_countdown -= 1 and return if state.wall_countdown > 0
     ** Processing line: ~~
    -- End of paragraph detected.
    +- Inside source: true
     *** True Line Result
     
    -** Processing line: ~*** Arcade - Snakemoji - main.rb~
    -- Header detected.
    +** Processing line: ~      state.walls << state.new_entity(:wall) do |w|~
    +- Inside source: true
     *** True Line Result
    -
    +      state.walls << state.new_entity(:wall) do |w|
    +** Processing line: ~        w.x             = grid.right~
    +- Inside source: true
     *** True Line Result
    -*** Arcade - Snakemoji - main.rb
    -** Processing line: ~#+begin_src ruby~
    -- Line was identified as the beginning of a code block.
    +        w.x             = grid.right
    +** Processing line: ~        w.opening       = grid.top~
    +- Inside source: true
     *** True Line Result
    -
    +        w.opening       = grid.top
    +** Processing line: ~                              .randomize(:ratio)~
    +- Inside source: true
     *** True Line Result
    -#+begin_src ruby
    -** Processing line: ~  # ./samples/99_genre_arcade/snakemoji/app/main.rb~
    +                              .randomize(:ratio)
    +** Processing line: ~                              .greater(200)~
     - Inside source: true
     *** True Line Result
    -  # ./samples/99_genre_arcade/snakemoji/app/main.rb
    -** Processing line: ~  # coding: utf-8~
    +                              .greater(200)
    +** Processing line: ~                              .lesser(520)~
     - Inside source: true
     *** True Line Result
    -  # coding: utf-8
    -** Processing line: ~  ################################~
    +                              .lesser(520)
    +** Processing line: ~        w.bottom_height = w.opening - state.wall_gap_size~
     - Inside source: true
     *** True Line Result
    -  ################################
    -** Processing line: ~  #  So I was working on a snake game while~
    +        w.bottom_height = w.opening - state.wall_gap_size
    +** Processing line: ~        w.top_y         = w.opening + state.wall_gap_size~
     - Inside source: true
     *** True Line Result
    -  #  So I was working on a snake game while
    -** Processing line: ~  #  learning DragonRuby, and at some point I had a thought~
    +        w.top_y         = w.opening + state.wall_gap_size
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -  #  learning DragonRuby, and at some point I had a thought
    -** Processing line: ~  #  what if I use "😀" as a function name, surely it wont work right...?~
    +      end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  #  what if I use "😀" as a function name, surely it wont work right...?
    -** Processing line: ~  #  RIGHT....?~
    +
    +** Processing line: ~      state.wall_countdown = state.wall_countdown_length~
     - Inside source: true
     *** True Line Result
    -  #  RIGHT....?
    -** Processing line: ~  #  BUT IT DID, IT WORKED~
    +      state.wall_countdown = state.wall_countdown_length
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  #  BUT IT DID, IT WORKED
    -** Processing line: ~  #  it all went downhill from then~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  #  it all went downhill from then
    -** Processing line: ~  #  Created by Anton K. (ai Doge)~
    +
    +** Processing line: ~    def calc_flap~
     - Inside source: true
     *** True Line Result
    -  #  Created by Anton K. (ai Doge)
    -** Processing line: ~  #  https://gist.github.com/scorp200~
    +    def calc_flap
    +** Processing line: ~      state.y += state.dy~
     - Inside source: true
     *** True Line Result
    -  #  https://gist.github.com/scorp200
    -** Processing line: ~  #############LICENSE############~
    +      state.y += state.dy
    +** Processing line: ~      state.dy = state.dy.lesser state.flap_power~
     - Inside source: true
     *** True Line Result
    -  #############LICENSE############
    -** Processing line: ~  #  Feel free to use this anywhere and however you want~
    +      state.dy = state.dy.lesser state.flap_power
    +** Processing line: ~      state.dy -= state.gravity~
     - Inside source: true
     *** True Line Result
    -  #  Feel free to use this anywhere and however you want
    -** Processing line: ~  #  You can sell this to EA for $1,000,000 if you want, its completely free.~
    +      state.dy -= state.gravity
    +** Processing line: ~      return if state.y < state.ceiling~
     - Inside source: true
     *** True Line Result
    -  #  You can sell this to EA for $1,000,000 if you want, its completely free.
    -** Processing line: ~  #  Just rememeber you are helping this... thing... to spread...~
    +      return if state.y < state.ceiling
    +** Processing line: ~      state.y  = state.ceiling~
     - Inside source: true
     *** True Line Result
    -  #  Just rememeber you are helping this... thing... to spread...
    -** Processing line: ~  #  ALSO! I am not liable for any mental, physical or financial damage caused.~
    +      state.y  = state.ceiling
    +** Processing line: ~      state.dy = state.dy.lesser state.ceiling_flap_power~
     - Inside source: true
     *** True Line Result
    -  #  ALSO! I am not liable for any mental, physical or financial damage caused.
    -** Processing line: ~  #############LICENSE############~
    +      state.dy = state.dy.lesser state.ceiling_flap_power
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  #############LICENSE############
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    +** Processing line: ~    def calc_game_over~
    +- Inside source: true
    +*** True Line Result
    +    def calc_game_over
    +** Processing line: ~      return unless game_over?~
    +- Inside source: true
    +*** True Line Result
    +      return unless game_over?
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  class Array~
    +** Processing line: ~      state.death_at = state.tick_count~
     - Inside source: true
     *** True Line Result
    -  class Array
    -** Processing line: ~    #Helper function~
    +      state.death_at = state.tick_count
    +** Processing line: ~      state.death_from = state.walls.first~
     - Inside source: true
     *** True Line Result
    -    #Helper function
    -** Processing line: ~    def move! vector~
    +      state.death_from = state.walls.first
    +** Processing line: ~      state.death_fall_direction = -1~
     - Inside source: true
     *** True Line Result
    -    def move! vector
    -** Processing line: ~      self.x += vector.x~
    +      state.death_fall_direction = -1
    +** Processing line: ~      state.death_fall_direction =  1 if state.x > state.death_from.x~
     - Inside source: true
     *** True Line Result
    -      self.x += vector.x
    -** Processing line: ~      self.y += vector.y~
    +      state.death_fall_direction =  1 if state.x > state.death_from.x
    +** Processing line: ~      outputs.sounds << "sounds/hit-sound.wav"~
     - Inside source: true
     *** True Line Result
    -      self.y += vector.y
    -** Processing line: ~      return self~
    +      outputs.sounds << "sounds/hit-sound.wav"
    +** Processing line: ~      begin_countdown~
     - Inside source: true
     *** True Line Result
    -      return self
    +      begin_countdown
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -95595,18 +97051,18 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    #Helper function to draw snake body~
    +** Processing line: ~    def process_inputs~
     - Inside source: true
     *** True Line Result
    -    #Helper function to draw snake body
    -** Processing line: ~    def draw! 🎮, 📺, color~
    +    def process_inputs
    +** Processing line: ~      process_inputs_menu~
     - Inside source: true
     *** True Line Result
    -    def draw! 🎮, 📺, color
    -** Processing line: ~      translate 📺.solids, 🎮.⛓, [self.x * 🎮.⚖️ + 🎮.🛶 / 2, self.y * 🎮.⚖️ + 🎮.🛶 / 2, 🎮.⚖️ - 🎮.🛶, 🎮.⚖️ - 🎮.🛶, color]~
    +      process_inputs_menu
    +** Processing line: ~      process_inputs_game~
     - Inside source: true
     *** True Line Result
    -      translate 📺.solids, 🎮.⛓, [self.x * 🎮.⚖️ + 🎮.🛶 / 2, self.y * 🎮.⚖️ + 🎮.🛶 / 2, 🎮.⚖️ - 🎮.🛶, 🎮.⚖️ - 🎮.🛶, color]
    +      process_inputs_game
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -95615,194 +97071,186 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    #This is where it all started, I was trying to find  good way to multiply a map by a number, * is already used so is **~
    -- Inside source: true
    -*** True Line Result
    -    #This is where it all started, I was trying to find  good way to multiply a map by a number, * is already used so is **
    -** Processing line: ~    #I kept trying different combinations of symbols, when suddenly...~
    -- Inside source: true
    -*** True Line Result
    -    #I kept trying different combinations of symbols, when suddenly...
    -** Processing line: ~    def 😀 value~
    -- Inside source: true
    -*** True Line Result
    -    def 😀 value
    -** Processing line: ~      self.map {|d| d * value}~
    -- Inside source: true
    -*** True Line Result
    -      self.map {|d| d * value}
    -** Processing line: ~    end~
    +** Processing line: ~    def process_inputs_menu~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~  end~
    +    def process_inputs_menu
    +** Processing line: ~      return unless state.scene == :menu~
     - Inside source: true
     *** True Line Result
    -  end
    +      return unless state.scene == :menu
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  #Draw stuff with an offset~
    +** Processing line: ~      changediff = inputs.keyboard.key_down.tab || inputs.controller_one.key_down.select~
     - Inside source: true
     *** True Line Result
    -  #Draw stuff with an offset
    -** Processing line: ~  def translate output_collection, ⛓, what~
    +      changediff = inputs.keyboard.key_down.tab || inputs.controller_one.key_down.select
    +** Processing line: ~      if inputs.mouse.click~
     - Inside source: true
     *** True Line Result
    -  def translate output_collection, ⛓, what
    -** Processing line: ~    what.x += ⛓.x~
    +      if inputs.mouse.click
    +** Processing line: ~        p = inputs.mouse.click.point~
     - Inside source: true
     *** True Line Result
    -    what.x += ⛓.x
    -** Processing line: ~    what.y += ⛓.y~
    +        p = inputs.mouse.click.point
    +** Processing line: ~        if (p.y >= 165) && (p.y < 200) && (p.x >= 500) && (p.x < 800)~
     - Inside source: true
     *** True Line Result
    -    what.y += ⛓.y
    -** Processing line: ~    output_collection << what~
    +        if (p.y >= 165) && (p.y < 200) && (p.x >= 500) && (p.x < 800)
    +** Processing line: ~          changediff = true~
     - Inside source: true
     *** True Line Result
    -    output_collection << what
    -** Processing line: ~  end~
    +          changediff = true
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -  end
    +        end
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  BLUE = [33, 150, 243]~
    +** Processing line: ~      if changediff~
     - Inside source: true
     *** True Line Result
    -  BLUE = [33, 150, 243]
    -** Processing line: ~  RED = [244, 67, 54]~
    +      if changediff
    +** Processing line: ~        case state.new_difficulty~
     - Inside source: true
     *** True Line Result
    -  RED = [244, 67, 54]
    -** Processing line: ~  GOLD = [255, 193, 7]~
    +        case state.new_difficulty
    +** Processing line: ~        when :easy~
     - Inside source: true
     *** True Line Result
    -  GOLD = [255, 193, 7]
    -** Processing line: ~  LAST = 0~
    +        when :easy
    +** Processing line: ~          state.new_difficulty = :normal~
     - Inside source: true
     *** True Line Result
    -  LAST = 0
    -** Processing line: ~~
    +          state.new_difficulty = :normal
    +** Processing line: ~        when :normal~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def tick args~
    +        when :normal
    +** Processing line: ~          state.new_difficulty = :hard~
     - Inside source: true
     *** True Line Result
    -  def tick args
    -** Processing line: ~    defaults args.state~
    +          state.new_difficulty = :hard
    +** Processing line: ~        when :hard~
     - Inside source: true
     *** True Line Result
    -    defaults args.state
    -** Processing line: ~    render args.state, args.outputs~
    +        when :hard
    +** Processing line: ~          state.new_difficulty = :flappy~
     - Inside source: true
     *** True Line Result
    -    render args.state, args.outputs
    -** Processing line: ~    input args.state, args.inputs~
    +          state.new_difficulty = :flappy
    +** Processing line: ~        when :flappy~
     - Inside source: true
     *** True Line Result
    -    input args.state, args.inputs
    -** Processing line: ~    update args.state~
    +        when :flappy
    +** Processing line: ~          state.new_difficulty = :easy~
     - Inside source: true
     *** True Line Result
    -    update args.state
    -** Processing line: ~  end~
    +          state.new_difficulty = :easy
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -  end
    +        end
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def update 🎮~
    +** Processing line: ~      if inputs.keyboard.key_down.enter || inputs.controller_one.key_down.start || inputs.controller_one.key_down.a~
     - Inside source: true
     *** True Line Result
    -  def update 🎮
    -** Processing line: ~    #Update every 10 frames~
    +      if inputs.keyboard.key_down.enter || inputs.controller_one.key_down.start || inputs.controller_one.key_down.a
    +** Processing line: ~        state.difficulty = state.new_difficulty~
     - Inside source: true
     *** True Line Result
    -    #Update every 10 frames
    -** Processing line: ~    if 🎮.tick_count.mod_zero? 10~
    +        state.difficulty = state.new_difficulty
    +** Processing line: ~        change_to_scene :game~
     - Inside source: true
     *** True Line Result
    -    if 🎮.tick_count.mod_zero? 10
    -** Processing line: ~      #Add new snake body piece at head's location~
    +        change_to_scene :game
    +** Processing line: ~        reset_game false~
     - Inside source: true
     *** True Line Result
    -      #Add new snake body piece at head's location
    -** Processing line: ~      🎮.🐍 << [*🎮.🤖]~
    +        reset_game false
    +** Processing line: ~        state.hi_score = 0~
     - Inside source: true
     *** True Line Result
    -      🎮.🐍 << [*🎮.🤖]
    -** Processing line: ~      #Assign Next Direction to Direction~
    +        state.hi_score = 0
    +** Processing line: ~        begin_countdown~
     - Inside source: true
     *** True Line Result
    -      #Assign Next Direction to Direction
    -** Processing line: ~      🎮.🚗 = *🎮.🚦~
    +        begin_countdown
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -      🎮.🚗 = *🎮.🚦
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      #Trim the snake a bit if its longer than current size~
    +** Processing line: ~      if inputs.keyboard.key_down.escape || (inputs.mouse.click && !changediff) || inputs.controller_one.key_down.b~
     - Inside source: true
     *** True Line Result
    -      #Trim the snake a bit if its longer than current size
    -** Processing line: ~      if 🎮.🐍.length > 🎮.🛒~
    +      if inputs.keyboard.key_down.escape || (inputs.mouse.click && !changediff) || inputs.controller_one.key_down.b
    +** Processing line: ~        state.new_difficulty = state.difficulty~
     - Inside source: true
     *** True Line Result
    -      if 🎮.🐍.length > 🎮.🛒
    -** Processing line: ~        🎮.🐍 = 🎮.🐍[-🎮.🛒..-1]~
    +        state.new_difficulty = state.difficulty
    +** Processing line: ~        change_to_scene :game~
     - Inside source: true
     *** True Line Result
    -        🎮.🐍 = 🎮.🐍[-🎮.🛒..-1]
    +        change_to_scene :game
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
           end
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      #Move the head in the Direction~
    +** Processing line: ~    def process_inputs_game~
     - Inside source: true
     *** True Line Result
    -      #Move the head in the Direction
    -** Processing line: ~      🎮.🤖.move! 🎮.🚗~
    +    def process_inputs_game
    +** Processing line: ~      return unless state.scene == :game~
     - Inside source: true
     *** True Line Result
    -      🎮.🤖.move! 🎮.🚗
    +      return unless state.scene == :game
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      #If Head is outside the playing field, or inside snake's body restart game~
    -- Inside source: true
    -*** True Line Result
    -      #If Head is outside the playing field, or inside snake's body restart game
    -** Processing line: ~      if 🎮.🤖.x < 0 || 🎮.🤖.x >= 🎮.🗺.x || 🎮.🤖.y < 0 || 🎮.🤖.y >= 🎮.🗺.y || 🎮.🚗 != [0, 0] && 🎮.🐍.any? {|s| s == 🎮.🤖}~
    +** Processing line: ~      clicked_menu = false~
     - Inside source: true
     *** True Line Result
    -      if 🎮.🤖.x < 0 || 🎮.🤖.x >= 🎮.🗺.x || 🎮.🤖.y < 0 || 🎮.🤖.y >= 🎮.🗺.y || 🎮.🚗 != [0, 0] && 🎮.🐍.any? {|s| s == 🎮.🤖}
    -** Processing line: ~        LAST = 🎮.💰~
    +      clicked_menu = false
    +** Processing line: ~      if inputs.mouse.click~
     - Inside source: true
     *** True Line Result
    -        LAST = 🎮.💰
    -** Processing line: ~        🎮.as_hash.clear~
    +      if inputs.mouse.click
    +** Processing line: ~        p = inputs.mouse.click.point~
     - Inside source: true
     *** True Line Result
    -        🎮.as_hash.clear
    -** Processing line: ~        return~
    +        p = inputs.mouse.click.point
    +** Processing line: ~        clicked_menu = (p.y >= 620) && (p.x < 275)~
     - Inside source: true
     *** True Line Result
    -        return
    +        clicked_menu = (p.y >= 620) && (p.x < 275)
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    @@ -95811,30 +97259,34 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      #If head lands on food add size and score~
    +** Processing line: ~      if clicked_menu || inputs.keyboard.key_down.escape || inputs.keyboard.key_down.enter || inputs.controller_one.key_down.start~
     - Inside source: true
     *** True Line Result
    -      #If head lands on food add size and score
    -** Processing line: ~      if 🎮.🤖 == 🎮.🍎~
    +      if clicked_menu || inputs.keyboard.key_down.escape || inputs.keyboard.key_down.enter || inputs.controller_one.key_down.start
    +** Processing line: ~        change_to_scene :menu~
     - Inside source: true
     *** True Line Result
    -      if 🎮.🤖 == 🎮.🍎
    -** Processing line: ~        🎮.🛒 += 1~
    +        change_to_scene :menu
    +** Processing line: ~      elsif (inputs.mouse.down || inputs.mouse.click || inputs.keyboard.key_down.space || inputs.controller_one.key_down.a) && state.countdown == 0~
     - Inside source: true
     *** True Line Result
    -        🎮.🛒 += 1
    -** Processing line: ~        🎮.💰 += (🎮.🛒 * 0.8).floor.to_i + 5~
    +      elsif (inputs.mouse.down || inputs.mouse.click || inputs.keyboard.key_down.space || inputs.controller_one.key_down.a) && state.countdown == 0
    +** Processing line: ~        state.dy = 0~
     - Inside source: true
     *** True Line Result
    -        🎮.💰 += (🎮.🛒 * 0.8).floor.to_i + 5
    -** Processing line: ~        spawn_🍎 🎮~
    +        state.dy = 0
    +** Processing line: ~        state.dy += state.flap_power~
     - Inside source: true
     *** True Line Result
    -        spawn_🍎 🎮
    -** Processing line: ~        puts 🎮.🍎~
    +        state.dy += state.flap_power
    +** Processing line: ~        state.flapped_at = state.tick_count~
     - Inside source: true
     *** True Line Result
    -        puts 🎮.🍎
    +        state.flapped_at = state.tick_count
    +** Processing line: ~        outputs.sounds << "sounds/fly-sound.wav"~
    +- Inside source: true
    +*** True Line Result
    +        outputs.sounds << "sounds/fly-sound.wav"
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    @@ -95847,174 +97299,174 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    #Every second remove 1 point~
    -- Inside source: true
    -*** True Line Result
    -    #Every second remove 1 point
    -** Processing line: ~    if 🎮.💰 > 0 && 🎮.tick_count.mod_zero?(60)~
    +** Processing line: ~    def white~
     - Inside source: true
     *** True Line Result
    -    if 🎮.💰 > 0 && 🎮.tick_count.mod_zero?(60)
    -** Processing line: ~      🎮.💰 -= 1~
    +    def white
    +** Processing line: ~      { r: 255, g: 255, b: 255 }~
     - Inside source: true
     *** True Line Result
    -      🎮.💰 -= 1
    +      { r: 255, g: 255, b: 255 }
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
         end
    -** Processing line: ~  end~
    -- Inside source: true
    -*** True Line Result
    -  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def spawn_🍎 🎮~
    +** Processing line: ~    def large_white_typeset~
     - Inside source: true
     *** True Line Result
    -  def spawn_🍎 🎮
    -** Processing line: ~    #Food~
    +    def large_white_typeset
    +** Processing line: ~      { size_enum: 5, alignment_enum: 0, r: 255, g: 255, b: 255 }~
     - Inside source: true
     *** True Line Result
    -    #Food
    -** Processing line: ~    🎮.🍎 ||= [*🎮.🤖]~
    +      { size_enum: 5, alignment_enum: 0, r: 255, g: 255, b: 255 }
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    🎮.🍎 ||= [*🎮.🤖]
    -** Processing line: ~    #Randomly spawns food inside the playing field, keep doing this if the food keeps landing on the snake's body~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    #Randomly spawns food inside the playing field, keep doing this if the food keeps landing on the snake's body
    -** Processing line: ~    while 🎮.🐍.any? {|s| s == 🎮.🍎} || 🎮.🍎 == 🎮.🤖 do~
    +
    +** Processing line: ~    def at_beginning?~
     - Inside source: true
     *** True Line Result
    -    while 🎮.🐍.any? {|s| s == 🎮.🍎} || 🎮.🍎 == 🎮.🤖 do
    -** Processing line: ~      🎮.🍎 = [rand(🎮.🗺.x), rand(🎮.🗺.y)]~
    +    def at_beginning?
    +** Processing line: ~      state.walls.count == 0~
     - Inside source: true
     *** True Line Result
    -      🎮.🍎 = [rand(🎮.🗺.x), rand(🎮.🗺.y)]
    +      state.walls.count == 0
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
         end
    -** Processing line: ~  end~
    -- Inside source: true
    -*** True Line Result
    -  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def render 🎮, 📺~
    +** Processing line: ~    def dragon_collision_box~
     - Inside source: true
     *** True Line Result
    -  def render 🎮, 📺
    -** Processing line: ~    #Paint the background black~
    +    def dragon_collision_box
    +** Processing line: ~      state.dragon_sprite~
     - Inside source: true
     *** True Line Result
    -    #Paint the background black
    -** Processing line: ~    📺.solids << [0, 0, 1280, 720, 0, 0, 0, 255]~
    +      state.dragon_sprite
    +** Processing line: ~           .scale_rect(1.0 - collision_forgiveness, 0.5, 0.5)~
     - Inside source: true
     *** True Line Result
    -    📺.solids << [0, 0, 1280, 720, 0, 0, 0, 255]
    -** Processing line: ~    #Draw a border for the playing field~
    +           .scale_rect(1.0 - collision_forgiveness, 0.5, 0.5)
    +** Processing line: ~           .rect_shift_right(10)~
     - Inside source: true
     *** True Line Result
    -    #Draw a border for the playing field
    -** Processing line: ~    translate 📺.borders, 🎮.⛓, [0, 0, 🎮.🗺.x * 🎮.⚖️, 🎮.🗺.y * 🎮.⚖️, 255, 255, 255]~
    +           .rect_shift_right(10)
    +** Processing line: ~           .rect_shift_up(state.dy * 2)~
     - Inside source: true
     *** True Line Result
    -    translate 📺.borders, 🎮.⛓, [0, 0, 🎮.🗺.x * 🎮.⚖️, 🎮.🗺.y * 🎮.⚖️, 255, 255, 255]
    +           .rect_shift_up(state.dy * 2)
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    #Draw the snake's body~
    +** Processing line: ~    def game_over?~
     - Inside source: true
     *** True Line Result
    -    #Draw the snake's body
    -** Processing line: ~    🎮.🐍.map do |🐍| 🐍.draw! 🎮, 📺, BLUE end~
    +    def game_over?
    +** Processing line: ~      return true if state.y <= 0.-(500 * collision_forgiveness) && !at_beginning?~
     - Inside source: true
     *** True Line Result
    -    🎮.🐍.map do |🐍| 🐍.draw! 🎮, 📺, BLUE end
    -** Processing line: ~    #Draw the head~
    +      return true if state.y <= 0.-(500 * collision_forgiveness) && !at_beginning?
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    #Draw the head
    -** Processing line: ~    🎮.🤖.draw! 🎮, 📺, BLUE~
    +
    +** Processing line: ~      state.walls~
     - Inside source: true
     *** True Line Result
    -    🎮.🤖.draw! 🎮, 📺, BLUE
    -** Processing line: ~    #Draw the food~
    +      state.walls
    +** Processing line: ~          .flat_map { |w| w.sprites }~
     - Inside source: true
     *** True Line Result
    -    #Draw the food
    -** Processing line: ~    🎮.🍎.draw! 🎮, 📺, RED~
    +          .flat_map { |w| w.sprites }
    +** Processing line: ~          .any? do |s|~
     - Inside source: true
     *** True Line Result
    -    🎮.🍎.draw! 🎮, 📺, RED
    -** Processing line: ~~
    +          .any? do |s|
    +** Processing line: ~            s && s.intersect_rect?(dragon_collision_box)~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    #Draw current score~
    +            s && s.intersect_rect?(dragon_collision_box)
    +** Processing line: ~          end~
     - Inside source: true
     *** True Line Result
    -    #Draw current score
    -** Processing line: ~    translate 📺.labels, 🎮.⛓, [5, 715, "Score: #{🎮.💰}", GOLD]~
    +          end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    translate 📺.labels, 🎮.⛓, [5, 715, "Score: #{🎮.💰}", GOLD]
    -** Processing line: ~    #Draw your last score, if any~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    #Draw your last score, if any
    -** Processing line: ~    translate 📺.labels, 🎮.⛓, [[*🎮.🤖.😀(🎮.⚖️)].move!([0, 🎮.⚖️ * 2]), "Your Last score is #{LAST}", 0, 1, GOLD] unless LAST == 0 || 🎮.🚗 != [0, 0]~
    +
    +** Processing line: ~    def collision_forgiveness~
     - Inside source: true
     *** True Line Result
    -    translate 📺.labels, 🎮.⛓, [[*🎮.🤖.😀(🎮.⚖️)].move!([0, 🎮.⚖️ * 2]), "Your Last score is #{LAST}", 0, 1, GOLD] unless LAST == 0 || 🎮.🚗 != [0, 0]
    -** Processing line: ~    #Draw starting message, only if Direction is 0~
    +    def collision_forgiveness
    +** Processing line: ~      case state.difficulty~
     - Inside source: true
     *** True Line Result
    -    #Draw starting message, only if Direction is 0
    -** Processing line: ~    translate 📺.labels, 🎮.⛓, [🎮.🤖.😀(🎮.⚖️), "Press any Arrow key to start", 0, 1, GOLD] unless 🎮.🚗 != [0, 0]~
    +      case state.difficulty
    +** Processing line: ~      when :easy~
     - Inside source: true
     *** True Line Result
    -    translate 📺.labels, 🎮.⛓, [🎮.🤖.😀(🎮.⚖️), "Press any Arrow key to start", 0, 1, GOLD] unless 🎮.🚗 != [0, 0]
    -** Processing line: ~  end~
    +      when :easy
    +** Processing line: ~        0.9~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +        0.9
    +** Processing line: ~      when :normal~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def input 🎮, 🕹~
    +      when :normal
    +** Processing line: ~        0.7~
     - Inside source: true
     *** True Line Result
    -  def input 🎮, 🕹
    -** Processing line: ~    #Left and Right keyboard input, only change if X direction is 0~
    +        0.7
    +** Processing line: ~      when :hard~
     - Inside source: true
     *** True Line Result
    -    #Left and Right keyboard input, only change if X direction is 0
    -** Processing line: ~    if 🕹.keyboard.key_held.left && 🎮.🚗.x == 0~
    +      when :hard
    +** Processing line: ~        0.5~
     - Inside source: true
     *** True Line Result
    -    if 🕹.keyboard.key_held.left && 🎮.🚗.x == 0
    -** Processing line: ~      🎮.🚦 = [-1, 0]~
    +        0.5
    +** Processing line: ~      when :flappy~
     - Inside source: true
     *** True Line Result
    -      🎮.🚦 = [-1, 0]
    -** Processing line: ~    elsif 🕹.keyboard.key_held.right && 🎮.🚗.x == 0~
    +      when :flappy
    +** Processing line: ~        0.3~
     - Inside source: true
     *** True Line Result
    -    elsif 🕹.keyboard.key_held.right && 🎮.🚗.x == 0
    -** Processing line: ~      🎮.🚦 = [1, 0]~
    +        0.3
    +** Processing line: ~      else~
     - Inside source: true
     *** True Line Result
    -      🎮.🚦 = [1, 0]
    +      else
    +** Processing line: ~        0.9~
    +- Inside source: true
    +*** True Line Result
    +        0.9
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -96023,322 +97475,314 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    #Up and Down keyboard input, only change if Y direction is 0~
    +** Processing line: ~    def countdown_text~
     - Inside source: true
     *** True Line Result
    -    #Up and Down keyboard input, only change if Y direction is 0
    -** Processing line: ~    if 🕹.keyboard.key_held.up && 🎮.🚗.y == 0~
    +    def countdown_text
    +** Processing line: ~      state.countdown ||= -1~
     - Inside source: true
     *** True Line Result
    -    if 🕹.keyboard.key_held.up && 🎮.🚗.y == 0
    -** Processing line: ~      🎮.🚦 = [0, 1]~
    +      state.countdown ||= -1
    +** Processing line: ~      return ""          if state.countdown == 0~
     - Inside source: true
     *** True Line Result
    -      🎮.🚦 = [0, 1]
    -** Processing line: ~    elsif 🕹.keyboard.key_held.down && 🎮.🚗.y == 0~
    +      return ""          if state.countdown == 0
    +** Processing line: ~      return "GO!"       if state.countdown.idiv(60) == 0~
     - Inside source: true
     *** True Line Result
    -    elsif 🕹.keyboard.key_held.down && 🎮.🚗.y == 0
    -** Processing line: ~      🎮.🚦 = [0, -1]~
    +      return "GO!"       if state.countdown.idiv(60) == 0
    +** Processing line: ~      return "GAME OVER" if state.death_at~
     - Inside source: true
     *** True Line Result
    -      🎮.🚦 = [0, -1]
    -** Processing line: ~    end~
    +      return "GAME OVER" if state.death_at
    +** Processing line: ~      return "READY?"~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~  end~
    +      return "READY?"
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  end
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def defaults 🎮~
    -- Inside source: true
    -*** True Line Result
    -  def defaults 🎮
    -** Processing line: ~    #Playing field size~
    +** Processing line: ~    def begin_countdown~
     - Inside source: true
     *** True Line Result
    -    #Playing field size
    -** Processing line: ~    🎮.🗺 ||= [20, 20]~
    +    def begin_countdown
    +** Processing line: ~      state.countdown = 4.seconds~
     - Inside source: true
     *** True Line Result
    -    🎮.🗺 ||= [20, 20]
    -** Processing line: ~    #Scale for drawing, screen height / Field height~
    +      state.countdown = 4.seconds
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    #Scale for drawing, screen height / Field height
    -** Processing line: ~    🎮.⚖️ ||= 720 / 🎮.🗺.y~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    🎮.⚖️ ||= 720 / 🎮.🗺.y
    -** Processing line: ~    #Offset, offset all rendering to the center of the screen~
    +
    +** Processing line: ~    def score_text~
     - Inside source: true
     *** True Line Result
    -    #Offset, offset all rendering to the center of the screen
    -** Processing line: ~    🎮.⛓ ||= [(1280 - 720).fdiv(2), 0]~
    +    def score_text
    +** Processing line: ~      return ""                        unless state.countdown > 1.seconds~
     - Inside source: true
     *** True Line Result
    -    🎮.⛓ ||= [(1280 - 720).fdiv(2), 0]
    -** Processing line: ~    #Padding, make the snake body slightly smaller than the scale~
    +      return ""                        unless state.countdown > 1.seconds
    +** Processing line: ~      return ""                        unless state.death_at~
     - Inside source: true
     *** True Line Result
    -    #Padding, make the snake body slightly smaller than the scale
    -** Processing line: ~    🎮.🛶 ||= (🎮.⚖️ * 0.2).to_i~
    +      return ""                        unless state.death_at
    +** Processing line: ~      return "SCORE: 0 (LOL)"          if state.score == 0~
     - Inside source: true
     *** True Line Result
    -    🎮.🛶 ||= (🎮.⚖️ * 0.2).to_i
    -** Processing line: ~    #Snake Size~
    +      return "SCORE: 0 (LOL)"          if state.score == 0
    +** Processing line: ~      return "HI SCORE: #{state.score}" if state.score == state.hi_score~
     - Inside source: true
     *** True Line Result
    -    #Snake Size
    -** Processing line: ~    🎮.🛒 ||= 3~
    +      return "HI SCORE: #{state.score}" if state.score == state.hi_score
    +** Processing line: ~      return "SCORE: #{state.score}"~
     - Inside source: true
     *** True Line Result
    -    🎮.🛒 ||= 3
    -** Processing line: ~    #Snake head, the only part we are actually controlling~
    +      return "SCORE: #{state.score}"
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    #Snake head, the only part we are actually controlling
    -** Processing line: ~    🎮.🤖 ||= [🎮.🗺.x / 2, 🎮.🗺.y / 2]~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    🎮.🤖 ||= [🎮.🗺.x / 2, 🎮.🗺.y / 2]
    -** Processing line: ~    #Snake body map, follows the head~
    +
    +** Processing line: ~    def reset_game set_flash = true~
     - Inside source: true
     *** True Line Result
    -    #Snake body map, follows the head
    -** Processing line: ~    🎮.🐍 ||= []~
    +    def reset_game set_flash = true
    +** Processing line: ~      state.flash_at = state.tick_count if set_flash~
     - Inside source: true
     *** True Line Result
    -    🎮.🐍 ||= []
    -** Processing line: ~    #Direction the head moves to~
    +      state.flash_at = state.tick_count if set_flash
    +** Processing line: ~      state.walls = []~
     - Inside source: true
     *** True Line Result
    -    #Direction the head moves to
    -** Processing line: ~    🎮.🚗 ||= [0, 0]~
    +      state.walls = []
    +** Processing line: ~      state.y = 500~
     - Inside source: true
     *** True Line Result
    -    🎮.🚗 ||= [0, 0]
    -** Processing line: ~    #Next_Direction, during input check only change this variable and then when game updates asign this to Direction~
    +      state.y = 500
    +** Processing line: ~      state.dy = 0~
     - Inside source: true
     *** True Line Result
    -    #Next_Direction, during input check only change this variable and then when game updates asign this to Direction
    -** Processing line: ~    🎮.🚦 ||= [*🎮.🚗]~
    +      state.dy = 0
    +** Processing line: ~      state.hi_score = state.hi_score.greater(state.score)~
     - Inside source: true
     *** True Line Result
    -    🎮.🚦 ||= [*🎮.🚗]
    -** Processing line: ~    #Your score~
    +      state.hi_score = state.hi_score.greater(state.score)
    +** Processing line: ~      state.score = 0~
     - Inside source: true
     *** True Line Result
    -    #Your score
    -** Processing line: ~    🎮.💰 ||= 0~
    +      state.score = 0
    +** Processing line: ~      state.wall_countdown = state.wall_countdown_length.fdiv(2)~
     - Inside source: true
     *** True Line Result
    -    🎮.💰 ||= 0
    -** Processing line: ~    #Spawns Food randomly~
    +      state.wall_countdown = state.wall_countdown_length.fdiv(2)
    +** Processing line: ~      state.show_death = false~
     - Inside source: true
     *** True Line Result
    -    #Spawns Food randomly
    -** Processing line: ~    spawn_🍎(🎮) unless 🎮.🍎?~
    +      state.show_death = false
    +** Processing line: ~      state.death_at = nil~
     - Inside source: true
     *** True Line Result
    -    spawn_🍎(🎮) unless 🎮.🍎?
    -** Processing line: ~  end~
    +      state.death_at = nil
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  end
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~#+end_src~
    -- Line was identified as the end of a code block.
    +** Processing line: ~    def change_to_scene scene~
    +- Inside source: true
     *** True Line Result
    -#+end_src
    -** Processing line: ~~
    -- End of paragraph detected.
    +    def change_to_scene scene
    +** Processing line: ~      state.scene = scene~
    +- Inside source: true
     *** True Line Result
    -
    -** Processing line: ~*** Arcade - Solar System - main.rb~
    -- Header detected.
    +      state.scene = scene
    +** Processing line: ~      state.scene_at = state.tick_count~
    +- Inside source: true
     *** True Line Result
    -
    +      state.scene_at = state.tick_count
    +** Processing line: ~      inputs.keyboard.clear~
    +- Inside source: true
     *** True Line Result
    -*** Arcade - Solar System - main.rb
    -** Processing line: ~#+begin_src ruby~
    -- Line was identified as the beginning of a code block.
    +      inputs.keyboard.clear
    +** Processing line: ~      inputs.controller_one.clear~
    +- Inside source: true
     *** True Line Result
    -
    +      inputs.controller_one.clear
    +** Processing line: ~    end~
    +- Inside source: true
     *** True Line Result
    -#+begin_src ruby
    -** Processing line: ~  # ./samples/99_genre_arcade/solar_system/app/main.rb~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -  # ./samples/99_genre_arcade/solar_system/app/main.rb
    -** Processing line: ~  # Focused tutorial video: https://s3.amazonaws.com/s3.dragonruby.org/dragonruby-nddnug-workshop.mp4~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  # Focused tutorial video: https://s3.amazonaws.com/s3.dragonruby.org/dragonruby-nddnug-workshop.mp4
    -** Processing line: ~  # Workshop/Presentation which provides motivation for creating a game engine: https://www.youtube.com/watch?v=S3CFce1arC8~
    +
    +** Processing line: ~  $flappy_dragon = FlappyDragon.new~
     - Inside source: true
     *** True Line Result
    -  # Workshop/Presentation which provides motivation for creating a game engine: https://www.youtube.com/watch?v=S3CFce1arC8
    +  $flappy_dragon = FlappyDragon.new
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def defaults args~
    +** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
    -  def defaults args
    -** Processing line: ~    args.outputs.background_color = [0, 0, 0]~
    +  def tick args
    +** Processing line: ~    $flappy_dragon.grid = args.grid~
     - Inside source: true
     *** True Line Result
    -    args.outputs.background_color = [0, 0, 0]
    -** Processing line: ~    args.state.x ||= 640~
    +    $flappy_dragon.grid = args.grid
    +** Processing line: ~    $flappy_dragon.inputs = args.inputs~
     - Inside source: true
     *** True Line Result
    -    args.state.x ||= 640
    -** Processing line: ~    args.state.y ||= 360~
    +    $flappy_dragon.inputs = args.inputs
    +** Processing line: ~    $flappy_dragon.state = args.state~
     - Inside source: true
     *** True Line Result
    -    args.state.y ||= 360
    -** Processing line: ~    args.state.stars ||= 100.map do~
    +    $flappy_dragon.state = args.state
    +** Processing line: ~    $flappy_dragon.outputs = args.outputs~
     - Inside source: true
     *** True Line Result
    -    args.state.stars ||= 100.map do
    -** Processing line: ~      [1280 * rand, 720 * rand, rand.fdiv(10), 255 * rand, 255 * rand, 255 * rand]~
    +    $flappy_dragon.outputs = args.outputs
    +** Processing line: ~    $flappy_dragon.tick~
     - Inside source: true
     *** True Line Result
    -      [1280 * rand, 720 * rand, rand.fdiv(10), 255 * rand, 255 * rand, 255 * rand]
    -** Processing line: ~    end~
    +    $flappy_dragon.tick
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    end
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    args.state.sun ||= args.state.new_entity(:sun) do |s|~
    -- Inside source: true
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
     *** True Line Result
    -    args.state.sun ||= args.state.new_entity(:sun) do |s|
    -** Processing line: ~      s.s = 100~
    -- Inside source: true
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
     *** True Line Result
    -      s.s = 100
    -** Processing line: ~      s.path = 'sprites/sun.png'~
    -- Inside source: true
    +
    +** Processing line: ~*** Arcade - Pong - main.rb~
    +- Header detected.
     *** True Line Result
    -      s.path = 'sprites/sun.png'
    -** Processing line: ~    end~
    -- Inside source: true
    +
     *** True Line Result
    -    end
    -** Processing line: ~~
    -- Inside source: true
    +*** Arcade - Pong - main.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
     *** True Line Result
     
    -** Processing line: ~    args.state.planets = [~
    -- Inside source: true
    -*** True Line Result
    -    args.state.planets = [
    -** Processing line: ~      [:mercury,   65,  5,          88],~
    -- Inside source: true
     *** True Line Result
    -      [:mercury,   65,  5,          88],
    -** Processing line: ~      [:venus,    100, 10,         225],~
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/99_genre_arcade/pong/app/main.rb~
     - Inside source: true
     *** True Line Result
    -      [:venus,    100, 10,         225],
    -** Processing line: ~      [:earth,    120, 10,         365],~
    +  # ./samples/99_genre_arcade/pong/app/main.rb
    +** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
    -      [:earth,    120, 10,         365],
    -** Processing line: ~      [:mars,     140,  8,         687],~
    +  def tick args
    +** Processing line: ~    defaults args~
     - Inside source: true
     *** True Line Result
    -      [:mars,     140,  8,         687],
    -** Processing line: ~      [:jupiter,  280, 30, 365 *  11.8],~
    +    defaults args
    +** Processing line: ~    render args~
     - Inside source: true
     *** True Line Result
    -      [:jupiter,  280, 30, 365 *  11.8],
    -** Processing line: ~      [:saturn,   350, 20, 365 *  29.5],~
    +    render args
    +** Processing line: ~    calc args~
     - Inside source: true
     *** True Line Result
    -      [:saturn,   350, 20, 365 *  29.5],
    -** Processing line: ~      [:uranus,   400, 15, 365 *    84],~
    +    calc args
    +** Processing line: ~    input args~
     - Inside source: true
     *** True Line Result
    -      [:uranus,   400, 15, 365 *    84],
    -** Processing line: ~      [:neptune,  440, 15, 365 * 164.8],~
    +    input args
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -      [:neptune,  440, 15, 365 * 164.8],
    -** Processing line: ~      [:pluto,    480,  5, 365 * 247.8],~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      [:pluto,    480,  5, 365 * 247.8],
    -** Processing line: ~    ].map do |name, distance, size, year_in_days|~
    +
    +** Processing line: ~  def defaults args~
     - Inside source: true
     *** True Line Result
    -    ].map do |name, distance, size, year_in_days|
    -** Processing line: ~      args.state.new_entity(name) do |p|~
    +  def defaults args
    +** Processing line: ~    args.state.ball.debounce       ||= 3 * 60~
     - Inside source: true
     *** True Line Result
    -      args.state.new_entity(name) do |p|
    -** Processing line: ~        p.path = "sprites/#{name}.png"~
    +    args.state.ball.debounce       ||= 3 * 60
    +** Processing line: ~    args.state.ball.size           ||= 10~
     - Inside source: true
     *** True Line Result
    -        p.path = "sprites/#{name}.png"
    -** Processing line: ~        p.distance = distance * 0.7~
    +    args.state.ball.size           ||= 10
    +** Processing line: ~    args.state.ball.size_half      ||= args.state.ball.size / 2~
     - Inside source: true
     *** True Line Result
    -        p.distance = distance * 0.7
    -** Processing line: ~        p.s = size * 0.7~
    +    args.state.ball.size_half      ||= args.state.ball.size / 2
    +** Processing line: ~    args.state.ball.x              ||= 640~
     - Inside source: true
     *** True Line Result
    -        p.s = size * 0.7
    -** Processing line: ~        p.year_in_days = year_in_days~
    +    args.state.ball.x              ||= 640
    +** Processing line: ~    args.state.ball.y              ||= 360~
     - Inside source: true
     *** True Line Result
    -        p.year_in_days = year_in_days
    -** Processing line: ~      end~
    +    args.state.ball.y              ||= 360
    +** Processing line: ~    args.state.ball.dx             ||= 5.randomize(:sign)~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +    args.state.ball.dx             ||= 5.randomize(:sign)
    +** Processing line: ~    args.state.ball.dy             ||= 5.randomize(:sign)~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +    args.state.ball.dy             ||= 5.randomize(:sign)
    +** Processing line: ~    args.state.left_paddle.y       ||= 360~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    args.state.ship ||= args.state.new_entity(:ship) do |s|~
    +    args.state.left_paddle.y       ||= 360
    +** Processing line: ~    args.state.right_paddle.y      ||= 360~
     - Inside source: true
     *** True Line Result
    -    args.state.ship ||= args.state.new_entity(:ship) do |s|
    -** Processing line: ~      s.x = 1280 * rand~
    +    args.state.right_paddle.y      ||= 360
    +** Processing line: ~    args.state.paddle.h            ||= 120~
     - Inside source: true
     *** True Line Result
    -      s.x = 1280 * rand
    -** Processing line: ~      s.y = 720 * rand~
    +    args.state.paddle.h            ||= 120
    +** Processing line: ~    args.state.paddle.w            ||= 10~
     - Inside source: true
     *** True Line Result
    -      s.y = 720 * rand
    -** Processing line: ~      s.angle = 0~
    +    args.state.paddle.w            ||= 10
    +** Processing line: ~    args.state.left_paddle.score   ||= 0~
     - Inside source: true
     *** True Line Result
    -      s.angle = 0
    -** Processing line: ~    end~
    +    args.state.left_paddle.score   ||= 0
    +** Processing line: ~    args.state.right_paddle.score  ||= 0~
     - Inside source: true
     *** True Line Result
    -    end
    +    args.state.right_paddle.score  ||= 0
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -96347,54 +97791,54 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def to_sprite args, entity~
    +** Processing line: ~  def render args~
     - Inside source: true
     *** True Line Result
    -  def to_sprite args, entity
    -** Processing line: ~    x = 0~
    +  def render args
    +** Processing line: ~    render_center_line args~
     - Inside source: true
     *** True Line Result
    -    x = 0
    -** Processing line: ~    y = 0~
    +    render_center_line args
    +** Processing line: ~    render_scores args~
     - Inside source: true
     *** True Line Result
    -    y = 0
    -** Processing line: ~~
    +    render_scores args
    +** Processing line: ~    render_countdown args~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    if entity.year_in_days~
    +    render_countdown args
    +** Processing line: ~    render_ball args~
     - Inside source: true
     *** True Line Result
    -    if entity.year_in_days
    -** Processing line: ~      day = args.state.tick_count~
    +    render_ball args
    +** Processing line: ~    render_paddles args~
     - Inside source: true
     *** True Line Result
    -      day = args.state.tick_count
    -** Processing line: ~      day_in_year = day % entity.year_in_days~
    +    render_paddles args
    +** Processing line: ~    render_instructions args~
     - Inside source: true
     *** True Line Result
    -      day_in_year = day % entity.year_in_days
    -** Processing line: ~      entity.random_start_day ||= day_in_year * rand~
    +    render_instructions args
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -      entity.random_start_day ||= day_in_year * rand
    -** Processing line: ~      percentage_of_year = day_in_year.fdiv(entity.year_in_days)~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      percentage_of_year = day_in_year.fdiv(entity.year_in_days)
    -** Processing line: ~      angle = 365 * percentage_of_year~
    +
    +** Processing line: ~  begin :render_methods~
     - Inside source: true
     *** True Line Result
    -      angle = 365 * percentage_of_year
    -** Processing line: ~      x = angle.vector_x(entity.distance)~
    +  begin :render_methods
    +** Processing line: ~    def render_center_line args~
     - Inside source: true
     *** True Line Result
    -      x = angle.vector_x(entity.distance)
    -** Processing line: ~      y = angle.vector_y(entity.distance)~
    +    def render_center_line args
    +** Processing line: ~      args.outputs.lines  << [640, 0, 640, 720]~
     - Inside source: true
     *** True Line Result
    -      y = angle.vector_y(entity.distance)
    +      args.outputs.lines  << [640, 0, 640, 720]
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -96403,38 +97847,26 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    [640 + x - entity.s.half, 360 + y - entity.s.half, entity.s, entity.s, entity.path]~
    -- Inside source: true
    -*** True Line Result
    -    [640 + x - entity.s.half, 360 + y - entity.s.half, entity.s, entity.s, entity.path]
    -** Processing line: ~  end~
    -- Inside source: true
    -*** True Line Result
    -  end
    -** Processing line: ~~
    -- Inside source: true
    -*** True Line Result
    -
    -** Processing line: ~  def render args~
    +** Processing line: ~    def render_scores args~
     - Inside source: true
     *** True Line Result
    -  def render args
    -** Processing line: ~    args.outputs.solids << [0, 0, 1280, 720]~
    +    def render_scores args
    +** Processing line: ~      args.outputs.labels << [~
     - Inside source: true
     *** True Line Result
    -    args.outputs.solids << [0, 0, 1280, 720]
    -** Processing line: ~~
    +      args.outputs.labels << [
    +** Processing line: ~        [320, 650, args.state.left_paddle.score, 10, 1],~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    args.outputs.sprites << args.state.stars.map do |x, y, _, r, g, b|~
    +        [320, 650, args.state.left_paddle.score, 10, 1],
    +** Processing line: ~        [960, 650, args.state.right_paddle.score, 10, 1]~
     - Inside source: true
     *** True Line Result
    -    args.outputs.sprites << args.state.stars.map do |x, y, _, r, g, b|
    -** Processing line: ~      [x, y, 10, 10, 'sprites/star.png', 0, 100, r, g, b]~
    +        [960, 650, args.state.right_paddle.score, 10, 1]
    +** Processing line: ~      ]~
     - Inside source: true
     *** True Line Result
    -      [x, y, 10, 10, 'sprites/star.png', 0, 100, r, g, b]
    +      ]
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -96443,54 +97875,54 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    args.outputs.sprites << to_sprite(args, args.state.sun)~
    +** Processing line: ~    def render_countdown args~
     - Inside source: true
     *** True Line Result
    -    args.outputs.sprites << to_sprite(args, args.state.sun)
    -** Processing line: ~    args.outputs.sprites << args.state.planets.map { |p| to_sprite args, p }~
    +    def render_countdown args
    +** Processing line: ~      return unless args.state.ball.debounce > 0~
     - Inside source: true
     *** True Line Result
    -    args.outputs.sprites << args.state.planets.map { |p| to_sprite args, p }
    -** Processing line: ~    args.outputs.sprites << [args.state.ship.x, args.state.ship.y, 20, 20, 'sprites/ship.png', args.state.ship.angle]~
    +      return unless args.state.ball.debounce > 0
    +** Processing line: ~      args.outputs.labels << [640, 360, "%.2f" % args.state.ball.debounce.fdiv(60), 10, 1]~
     - Inside source: true
     *** True Line Result
    -    args.outputs.sprites << [args.state.ship.x, args.state.ship.y, 20, 20, 'sprites/ship.png', args.state.ship.angle]
    -** Processing line: ~  end~
    +      args.outputs.labels << [640, 360, "%.2f" % args.state.ball.debounce.fdiv(60), 10, 1]
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  end
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def calc args~
    +** Processing line: ~    def render_ball args~
     - Inside source: true
     *** True Line Result
    -  def calc args
    -** Processing line: ~    args.state.stars = args.state.stars.map do |x, y, speed, r, g, b|~
    +    def render_ball args
    +** Processing line: ~      args.outputs.solids << solid_ball(args)~
     - Inside source: true
     *** True Line Result
    -    args.state.stars = args.state.stars.map do |x, y, speed, r, g, b|
    -** Processing line: ~      x += speed~
    +      args.outputs.solids << solid_ball(args)
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      x += speed
    -** Processing line: ~      y += speed~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      y += speed
    -** Processing line: ~      x = 0 if x > 1280~
    +
    +** Processing line: ~    def render_paddles args~
     - Inside source: true
     *** True Line Result
    -      x = 0 if x > 1280
    -** Processing line: ~      y = 0 if y > 720~
    +    def render_paddles args
    +** Processing line: ~      args.outputs.solids << solid_left_paddle(args)~
     - Inside source: true
     *** True Line Result
    -      y = 0 if y > 720
    -** Processing line: ~      [x, y, speed, r, g, b]~
    +      args.outputs.solids << solid_left_paddle(args)
    +** Processing line: ~      args.outputs.solids << solid_right_paddle(args)~
     - Inside source: true
     *** True Line Result
    -      [x, y, speed, r, g, b]
    +      args.outputs.solids << solid_right_paddle(args)
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -96499,14 +97931,18 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    if args.state.tick_count == 0~
    +** Processing line: ~    def render_instructions args~
     - Inside source: true
     *** True Line Result
    -    if args.state.tick_count == 0
    -** Processing line: ~      args.outputs.sounds << 'sounds/bg.ogg'~
    +    def render_instructions args
    +** Processing line: ~      args.outputs.labels << [320, 30, "W and S keys to move left paddle.",  0, 1]~
     - Inside source: true
     *** True Line Result
    -      args.outputs.sounds << 'sounds/bg.ogg'
    +      args.outputs.labels << [320, 30, "W and S keys to move left paddle.",  0, 1]
    +** Processing line: ~      args.outputs.labels << [920, 30, "O and L keys to move right paddle.", 0, 1]~
    +- Inside source: true
    +*** True Line Result
    +      args.outputs.labels << [920, 30, "O and L keys to move right paddle.", 0, 1]
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -96519,302 +97955,294 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def process_inputs args~
    +** Processing line: ~  def calc args~
     - Inside source: true
     *** True Line Result
    -  def process_inputs args
    -** Processing line: ~    if args.inputs.keyboard.left || args.inputs.controller_one.key_held.left~
    +  def calc args
    +** Processing line: ~    args.state.ball.debounce -= 1 and return if args.state.ball.debounce > 0~
     - Inside source: true
     *** True Line Result
    -    if args.inputs.keyboard.left || args.inputs.controller_one.key_held.left
    -** Processing line: ~      args.state.ship.angle += 1~
    +    args.state.ball.debounce -= 1 and return if args.state.ball.debounce > 0
    +** Processing line: ~    calc_move_ball args~
     - Inside source: true
     *** True Line Result
    -      args.state.ship.angle += 1
    -** Processing line: ~    elsif args.inputs.keyboard.right || args.inputs.controller_one.key_held.right~
    +    calc_move_ball args
    +** Processing line: ~    calc_collision_with_left_paddle args~
     - Inside source: true
     *** True Line Result
    -    elsif args.inputs.keyboard.right || args.inputs.controller_one.key_held.right
    -** Processing line: ~      args.state.ship.angle -= 1~
    +    calc_collision_with_left_paddle args
    +** Processing line: ~    calc_collision_with_right_paddle args~
     - Inside source: true
     *** True Line Result
    -      args.state.ship.angle -= 1
    -** Processing line: ~    end~
    +    calc_collision_with_right_paddle args
    +** Processing line: ~    calc_collision_with_walls args~
     - Inside source: true
     *** True Line Result
    -    end
    +    calc_collision_with_walls args
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    if args.inputs.keyboard.up || args.inputs.controller_one.key_held.a~
    +** Processing line: ~  begin :calc_methods~
     - Inside source: true
     *** True Line Result
    -    if args.inputs.keyboard.up || args.inputs.controller_one.key_held.a
    -** Processing line: ~      args.state.ship.x += args.state.ship.angle.x_vector~
    +  begin :calc_methods
    +** Processing line: ~    def calc_move_ball args~
     - Inside source: true
     *** True Line Result
    -      args.state.ship.x += args.state.ship.angle.x_vector
    -** Processing line: ~      args.state.ship.y += args.state.ship.angle.y_vector~
    +    def calc_move_ball args
    +** Processing line: ~      args.state.ball.x += args.state.ball.dx~
     - Inside source: true
     *** True Line Result
    -      args.state.ship.y += args.state.ship.angle.y_vector
    -** Processing line: ~    end~
    +      args.state.ball.x += args.state.ball.dx
    +** Processing line: ~      args.state.ball.y += args.state.ball.dy~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~  end~
    +      args.state.ball.y += args.state.ball.dy
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  end
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def tick args~
    -- Inside source: true
    -*** True Line Result
    -  def tick args
    -** Processing line: ~    defaults args~
    -- Inside source: true
    -*** True Line Result
    -    defaults args
    -** Processing line: ~    render args~
    +** Processing line: ~    def calc_collision_with_left_paddle args~
     - Inside source: true
     *** True Line Result
    -    render args
    -** Processing line: ~    calc args~
    +    def calc_collision_with_left_paddle args
    +** Processing line: ~      if solid_left_paddle(args).intersect_rect? solid_ball(args)~
     - Inside source: true
     *** True Line Result
    -    calc args
    -** Processing line: ~    process_inputs args~
    +      if solid_left_paddle(args).intersect_rect? solid_ball(args)
    +** Processing line: ~        args.state.ball.dx *= -1~
     - Inside source: true
     *** True Line Result
    -    process_inputs args
    -** Processing line: ~  end~
    +        args.state.ball.dx *= -1
    +** Processing line: ~      elsif args.state.ball.x < 0~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +      elsif args.state.ball.x < 0
    +** Processing line: ~        args.state.right_paddle.score += 1~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def r~
    +        args.state.right_paddle.score += 1
    +** Processing line: ~        calc_reset_round args~
     - Inside source: true
     *** True Line Result
    -  def r
    -** Processing line: ~    $gtk.reset~
    +        calc_reset_round args
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    $gtk.reset
    -** Processing line: ~  end~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  end
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~#+end_src~
    -- Line was identified as the end of a code block.
    -*** True Line Result
    -#+end_src
    -** Processing line: ~~
    -- End of paragraph detected.
    -*** True Line Result
    -
    -** Processing line: ~*** Arcade - Sound Golf - main.rb~
    -- Header detected.
    -*** True Line Result
    -
    -*** True Line Result
    -*** Arcade - Sound Golf - main.rb
    -** Processing line: ~#+begin_src ruby~
    -- Line was identified as the beginning of a code block.
    -*** True Line Result
    -
    -*** True Line Result
    -#+begin_src ruby
    -** Processing line: ~  # ./samples/99_genre_arcade/sound_golf/app/main.rb~
    +** Processing line: ~    def calc_collision_with_right_paddle args~
     - Inside source: true
     *** True Line Result
    -  # ./samples/99_genre_arcade/sound_golf/app/main.rb
    -** Processing line: ~  =begin~
    +    def calc_collision_with_right_paddle args
    +** Processing line: ~      if solid_right_paddle(args).intersect_rect? solid_ball(args)~
     - Inside source: true
     *** True Line Result
    -  =begin
    -** Processing line: ~~
    +      if solid_right_paddle(args).intersect_rect? solid_ball(args)
    +** Processing line: ~        args.state.ball.dx *= -1~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   APIs Listing that haven't been encountered in previous sample apps:~
    +        args.state.ball.dx *= -1
    +** Processing line: ~      elsif args.state.ball.x > 1280~
     - Inside source: true
     *** True Line Result
    -   APIs Listing that haven't been encountered in previous sample apps:
    -** Processing line: ~~
    +      elsif args.state.ball.x > 1280
    +** Processing line: ~        args.state.left_paddle.score += 1~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   - sample: Chooses random element from array.~
    +        args.state.left_paddle.score += 1
    +** Processing line: ~        calc_reset_round args~
     - Inside source: true
     *** True Line Result
    -   - sample: Chooses random element from array.
    -** Processing line: ~     In this sample app, the target note is set by taking a sample from the collection~
    +        calc_reset_round args
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -     In this sample app, the target note is set by taking a sample from the collection
    -** Processing line: ~     of available notes.~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -     of available notes.
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~   Reminders:~
    +** Processing line: ~    def calc_collision_with_walls args~
     - Inside source: true
     *** True Line Result
    -   Reminders:
    -** Processing line: ~   - args.grid.(left|right|top|bottom): Pixel value for the boundaries of the virtual~
    +    def calc_collision_with_walls args
    +** Processing line: ~      if args.state.ball.y + args.state.ball.size_half > 720~
     - Inside source: true
     *** True Line Result
    -   - args.grid.(left|right|top|bottom): Pixel value for the boundaries of the virtual
    -** Processing line: ~     720 p screen (Dragon Ruby Game Toolkits's virtual resolution is always 1280x720).~
    +      if args.state.ball.y + args.state.ball.size_half > 720
    +** Processing line: ~        args.state.ball.y = 720 - args.state.ball.size_half~
     - Inside source: true
     *** True Line Result
    -     720 p screen (Dragon Ruby Game Toolkits's virtual resolution is always 1280x720).
    -** Processing line: ~~
    +        args.state.ball.y = 720 - args.state.ball.size_half
    +** Processing line: ~        args.state.ball.dy *= -1~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   - args.state.new_entity: Used when we want to create a new object, like a sprite or button.~
    +        args.state.ball.dy *= -1
    +** Processing line: ~      elsif args.state.ball.y - args.state.ball.size_half < 0~
     - Inside source: true
     *** True Line Result
    -   - args.state.new_entity: Used when we want to create a new object, like a sprite or button.
    -** Processing line: ~     For example, if we want to create a new button, we would declare it as a new entity and~
    +      elsif args.state.ball.y - args.state.ball.size_half < 0
    +** Processing line: ~        args.state.ball.y = args.state.ball.size_half~
     - Inside source: true
     *** True Line Result
    -     For example, if we want to create a new button, we would declare it as a new entity and
    -** Processing line: ~     then define its properties.~
    +        args.state.ball.y = args.state.ball.size_half
    +** Processing line: ~        args.state.ball.dy *= -1~
     - Inside source: true
     *** True Line Result
    -     then define its properties.
    +        args.state.ball.dy *= -1
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~   - String interpolation: Uses #{} syntax; everything between the #{ and the } is evaluated~
    +** Processing line: ~    def calc_reset_round args~
     - Inside source: true
     *** True Line Result
    -   - String interpolation: Uses #{} syntax; everything between the #{ and the } is evaluated
    -** Processing line: ~     as Ruby code, and the placeholder is replaced with its corresponding value or result.~
    +    def calc_reset_round args
    +** Processing line: ~      args.state.ball.x = 640~
     - Inside source: true
     *** True Line Result
    -     as Ruby code, and the placeholder is replaced with its corresponding value or result.
    -** Processing line: ~~
    +      args.state.ball.x = 640
    +** Processing line: ~      args.state.ball.y = 360~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   - args.outputs.labels: An array. The values generate a label.~
    +      args.state.ball.y = 360
    +** Processing line: ~      args.state.ball.dx = 5.randomize(:sign)~
     - Inside source: true
     *** True Line Result
    -   - args.outputs.labels: An array. The values generate a label.
    -** Processing line: ~     The parameters are [X, Y, TEXT, SIZE, ALIGNMENT, RED, GREEN, BLUE, ALPHA, FONT STYLE]~
    +      args.state.ball.dx = 5.randomize(:sign)
    +** Processing line: ~      args.state.ball.dy = 5.randomize(:sign)~
     - Inside source: true
     *** True Line Result
    -     The parameters are [X, Y, TEXT, SIZE, ALIGNMENT, RED, GREEN, BLUE, ALPHA, FONT STYLE]
    -** Processing line: ~     For more information about labels, go to mygame/documentation/02-labels.md.~
    +      args.state.ball.dy = 5.randomize(:sign)
    +** Processing line: ~      args.state.ball.debounce = 3 * 60~
     - Inside source: true
     *** True Line Result
    -     For more information about labels, go to mygame/documentation/02-labels.md.
    -** Processing line: ~~
    +      args.state.ball.debounce = 3 * 60
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   - find_all: Finds all elements from a collection that meet a certain requirements (and excludes the ones that don't).~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -   - find_all: Finds all elements from a collection that meet a certain requirements (and excludes the ones that don't).
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~   - first: Returns the first element of an array.~
    +** Processing line: ~  def input args~
     - Inside source: true
     *** True Line Result
    -   - first: Returns the first element of an array.
    -** Processing line: ~~
    +  def input args
    +** Processing line: ~    input_left_paddle args~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   - inside_rect: Returns true or false depending on if the point is inside the rect.~
    +    input_left_paddle args
    +** Processing line: ~    input_right_paddle args~
     - Inside source: true
     *** True Line Result
    -   - inside_rect: Returns true or false depending on if the point is inside the rect.
    +    input_right_paddle args
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~   - to_sym: Returns symbol corresponding to string. Will create a symbol if it does~
    +** Processing line: ~  begin :input_methods~
     - Inside source: true
     *** True Line Result
    -   - to_sym: Returns symbol corresponding to string. Will create a symbol if it does
    -** Processing line: ~     not already exist.~
    +  begin :input_methods
    +** Processing line: ~    def input_left_paddle args~
     - Inside source: true
     *** True Line Result
    -     not already exist.
    -** Processing line: ~~
    +    def input_left_paddle args
    +** Processing line: ~      if args.inputs.controller_one.key_down.down  || args.inputs.keyboard.key_down.s~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  =end~
    +      if args.inputs.controller_one.key_down.down  || args.inputs.keyboard.key_down.s
    +** Processing line: ~        args.state.left_paddle.y -= 40~
     - Inside source: true
     *** True Line Result
    -  =end
    -** Processing line: ~~
    +        args.state.left_paddle.y -= 40
    +** Processing line: ~      elsif args.inputs.controller_one.key_down.up || args.inputs.keyboard.key_down.w~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  # This sample app allows users to test their musical skills by matching the piano sound that plays in each~
    +      elsif args.inputs.controller_one.key_down.up || args.inputs.keyboard.key_down.w
    +** Processing line: ~        args.state.left_paddle.y += 40~
     - Inside source: true
     *** True Line Result
    -  # This sample app allows users to test their musical skills by matching the piano sound that plays in each
    -** Processing line: ~  # level to the correct note.~
    +        args.state.left_paddle.y += 40
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -  # level to the correct note.
    +      end
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # Runs all the methods necessary for the game to function properly.~
    +** Processing line: ~    def input_right_paddle args~
     - Inside source: true
     *** True Line Result
    -  # Runs all the methods necessary for the game to function properly.
    -** Processing line: ~  def tick args~
    +    def input_right_paddle args
    +** Processing line: ~      if args.inputs.controller_two.key_down.down  || args.inputs.keyboard.key_down.l~
     - Inside source: true
     *** True Line Result
    -  def tick args
    -** Processing line: ~    defaults args~
    +      if args.inputs.controller_two.key_down.down  || args.inputs.keyboard.key_down.l
    +** Processing line: ~        args.state.right_paddle.y -= 40~
     - Inside source: true
     *** True Line Result
    -    defaults args
    -** Processing line: ~    render args~
    +        args.state.right_paddle.y -= 40
    +** Processing line: ~      elsif args.inputs.controller_two.key_down.up || args.inputs.keyboard.key_down.o~
     - Inside source: true
     *** True Line Result
    -    render args
    -** Processing line: ~    calc args~
    +      elsif args.inputs.controller_two.key_down.up || args.inputs.keyboard.key_down.o
    +** Processing line: ~        args.state.right_paddle.y += 40~
     - Inside source: true
     *** True Line Result
    -    calc args
    -** Processing line: ~    input_mouse args~
    +        args.state.right_paddle.y += 40
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    input_mouse args
    -** Processing line: ~    tick_instructions args, "Sample app shows how to play sounds. args.outputs.sounds << \"path_to_wav.wav\""~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    tick_instructions args, "Sample app shows how to play sounds. args.outputs.sounds << \"path_to_wav.wav\""
    +    end
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -96823,170 +98251,214 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # Sets default values and creates empty collections~
    +** Processing line: ~  begin :assets~
     - Inside source: true
     *** True Line Result
    -  # Sets default values and creates empty collections
    -** Processing line: ~  # Initialization happens in the first frame only~
    +  begin :assets
    +** Processing line: ~    def solid_ball args~
     - Inside source: true
     *** True Line Result
    -  # Initialization happens in the first frame only
    -** Processing line: ~  def defaults args~
    +    def solid_ball args
    +** Processing line: ~      centered_rect args.state.ball.x, args.state.ball.y, args.state.ball.size, args.state.ball.size~
     - Inside source: true
     *** True Line Result
    -  def defaults args
    -** Processing line: ~    args.state.notes ||= []~
    +      centered_rect args.state.ball.x, args.state.ball.y, args.state.ball.size, args.state.ball.size
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    args.state.notes ||= []
    -** Processing line: ~    args.state.click_feedbacks ||= []~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    args.state.click_feedbacks ||= []
    -** Processing line: ~    args.state.current_level ||= 1~
    +
    +** Processing line: ~    def solid_left_paddle args~
     - Inside source: true
     *** True Line Result
    -    args.state.current_level ||= 1
    -** Processing line: ~    args.state.times_wrong ||= 0 # when game starts, user hasn't guessed wrong yet~
    +    def solid_left_paddle args
    +** Processing line: ~      centered_rect_vertically 0, args.state.left_paddle.y, args.state.paddle.w, args.state.paddle.h~
     - Inside source: true
     *** True Line Result
    -    args.state.times_wrong ||= 0 # when game starts, user hasn't guessed wrong yet
    -** Processing line: ~  end~
    +      centered_rect_vertically 0, args.state.left_paddle.y, args.state.paddle.w, args.state.paddle.h
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  end
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # Uses a label to display current level, and shows the score~
    +** Processing line: ~    def solid_right_paddle args~
     - Inside source: true
     *** True Line Result
    -  # Uses a label to display current level, and shows the score
    -** Processing line: ~  # Creates a button to play the sample note, and displays the available notes that could be a potential match~
    +    def solid_right_paddle args
    +** Processing line: ~      centered_rect_vertically 1280 - args.state.paddle.w, args.state.right_paddle.y, args.state.paddle.w, args.state.paddle.h~
     - Inside source: true
     *** True Line Result
    -  # Creates a button to play the sample note, and displays the available notes that could be a potential match
    -** Processing line: ~  def render args~
    +      centered_rect_vertically 1280 - args.state.paddle.w, args.state.right_paddle.y, args.state.paddle.w, args.state.paddle.h
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  def render args
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # grid.w_half positions the label in the horizontal center of the screen.~
    +** Processing line: ~    def centered_rect x, y, w, h~
     - Inside source: true
     *** True Line Result
    -    # grid.w_half positions the label in the horizontal center of the screen.
    -** Processing line: ~    args.outputs.labels << [args.grid.w_half, args.grid.top.shift_down(40), "Hole #{args.state.current_level} of 9", 0, 1, 0, 0, 0]~
    +    def centered_rect x, y, w, h
    +** Processing line: ~      [x - w / 2, y - h / 2, w, h]~
     - Inside source: true
     *** True Line Result
    -    args.outputs.labels << [args.grid.w_half, args.grid.top.shift_down(40), "Hole #{args.state.current_level} of 9", 0, 1, 0, 0, 0]
    +      [x - w / 2, y - h / 2, w, h]
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    render_score args # shows score on screen~
    +** Processing line: ~    def centered_rect_vertically x, y, w, h~
     - Inside source: true
     *** True Line Result
    -    render_score args # shows score on screen
    -** Processing line: ~~
    +    def centered_rect_vertically x, y, w, h
    +** Processing line: ~      [x, y - h / 2, w, h]~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    args.state.play_again_button ||= { x: 560, y: args.grid.h * 3 / 4 - 40, w: 160, h: 60, label: 'again' } # array definition, text/title~
    +      [x, y - h / 2, w, h]
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    args.state.play_again_button ||= { x: 560, y: args.grid.h * 3 / 4 - 40, w: 160, h: 60, label: 'again' } # array definition, text/title
    -** Processing line: ~    args.state.play_note_button ||= { x: 560, y: args.grid.h * 3 / 4 - 40, w: 160, h: 60, label: 'play' }~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    args.state.play_note_button ||= { x: 560, y: args.grid.h * 3 / 4 - 40, w: 160, h: 60, label: 'play' }
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    if args.state.game_over # if game is over, a "play again" button is shown~
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
    +*** True Line Result
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +
    +** Processing line: ~*** Arcade - Snakemoji - main.rb~
    +- Header detected.
    +*** True Line Result
    +
    +*** True Line Result
    +*** Arcade - Snakemoji - main.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/99_genre_arcade/snakemoji/app/main.rb~
     - Inside source: true
     *** True Line Result
    -    if args.state.game_over # if game is over, a "play again" button is shown
    -** Processing line: ~      # Calculations ensure that Play Again label is displayed in center of border~
    +  # ./samples/99_genre_arcade/snakemoji/app/main.rb
    +** Processing line: ~  # coding: utf-8~
     - Inside source: true
     *** True Line Result
    -      # Calculations ensure that Play Again label is displayed in center of border
    -** Processing line: ~      # Remove calculations from y parameters and see what happens to border and label placement~
    +  # coding: utf-8
    +** Processing line: ~  ################################~
     - Inside source: true
     *** True Line Result
    -      # Remove calculations from y parameters and see what happens to border and label placement
    -** Processing line: ~      args.outputs.labels <<  [args.grid.w_half, args.grid.h * 3 / 4, "Play Again", 0, 1, 0, 0, 0] # outputs label~
    +  ################################
    +** Processing line: ~  #  So I was working on a snake game while~
     - Inside source: true
     *** True Line Result
    -      args.outputs.labels <<  [args.grid.w_half, args.grid.h * 3 / 4, "Play Again", 0, 1, 0, 0, 0] # outputs label
    -** Processing line: ~      args.outputs.borders << args.state.play_again_button # outputs border~
    +  #  So I was working on a snake game while
    +** Processing line: ~  #  learning DragonRuby, and at some point I had a thought~
     - Inside source: true
     *** True Line Result
    -      args.outputs.borders << args.state.play_again_button # outputs border
    -** Processing line: ~    else # otherwise, if game is not over~
    +  #  learning DragonRuby, and at some point I had a thought
    +** Processing line: ~  #  what if I use "😀" as a function name, surely it wont work right...?~
     - Inside source: true
     *** True Line Result
    -    else # otherwise, if game is not over
    -** Processing line: ~      # Calculations ensure that label appears in center of border~
    +  #  what if I use "😀" as a function name, surely it wont work right...?
    +** Processing line: ~  #  RIGHT....?~
     - Inside source: true
     *** True Line Result
    -      # Calculations ensure that label appears in center of border
    -** Processing line: ~      args.outputs.labels <<  [args.grid.w_half, args.grid.h * 3 / 4, "Play Note ##{args.state.current_level}", 0, 1, 0, 0, 0] # outputs label~
    +  #  RIGHT....?
    +** Processing line: ~  #  BUT IT DID, IT WORKED~
     - Inside source: true
     *** True Line Result
    -      args.outputs.labels <<  [args.grid.w_half, args.grid.h * 3 / 4, "Play Note ##{args.state.current_level}", 0, 1, 0, 0, 0] # outputs label
    -** Processing line: ~      args.outputs.borders << args.state.play_note_button # outputs border~
    +  #  BUT IT DID, IT WORKED
    +** Processing line: ~  #  it all went downhill from then~
     - Inside source: true
     *** True Line Result
    -      args.outputs.borders << args.state.play_note_button # outputs border
    -** Processing line: ~    end~
    +  #  it all went downhill from then
    +** Processing line: ~  #  Created by Anton K. (ai Doge)~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +  #  Created by Anton K. (ai Doge)
    +** Processing line: ~  #  https://gist.github.com/scorp200~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    return if args.state.game_over # return if game is over~
    +  #  https://gist.github.com/scorp200
    +** Processing line: ~  #############LICENSE############~
     - Inside source: true
     *** True Line Result
    -    return if args.state.game_over # return if game is over
    -** Processing line: ~~
    +  #############LICENSE############
    +** Processing line: ~  #  Feel free to use this anywhere and however you want~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    args.outputs.labels <<   [args.grid.w_half, 400, "I think the note is a(n)...",  0, 1, 0, 0, 0] # outputs label~
    +  #  Feel free to use this anywhere and however you want
    +** Processing line: ~  #  You can sell this to EA for $1,000,000 if you want, its completely free.~
     - Inside source: true
     *** True Line Result
    -    args.outputs.labels <<   [args.grid.w_half, 400, "I think the note is a(n)...",  0, 1, 0, 0, 0] # outputs label
    +  #  You can sell this to EA for $1,000,000 if you want, its completely free.
    +** Processing line: ~  #  Just rememeber you are helping this... thing... to spread...~
    +- Inside source: true
    +*** True Line Result
    +  #  Just rememeber you are helping this... thing... to spread...
    +** Processing line: ~  #  ALSO! I am not liable for any mental, physical or financial damage caused.~
    +- Inside source: true
    +*** True Line Result
    +  #  ALSO! I am not liable for any mental, physical or financial damage caused.
    +** Processing line: ~  #############LICENSE############~
    +- Inside source: true
    +*** True Line Result
    +  #############LICENSE############
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Shows all of the available notes that can be potential matches.~
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    # Shows all of the available notes that can be potential matches.
    -** Processing line: ~    available_notes.each_with_index do |note, i|~
    +
    +** Processing line: ~  class Array~
     - Inside source: true
     *** True Line Result
    -    available_notes.each_with_index do |note, i|
    -** Processing line: ~      args.state.notes[i] ||= piano_button(args, note, i + 1) # calls piano_button method on each note (creates label and border)~
    +  class Array
    +** Processing line: ~    #Helper function~
     - Inside source: true
     *** True Line Result
    -      args.state.notes[i] ||= piano_button(args, note, i + 1) # calls piano_button method on each note (creates label and border)
    -** Processing line: ~      args.outputs.labels <<   args.state.notes[i].label # outputs note on screen with a label and a border~
    +    #Helper function
    +** Processing line: ~    def move! vector~
     - Inside source: true
     *** True Line Result
    -      args.outputs.labels <<   args.state.notes[i].label # outputs note on screen with a label and a border
    -** Processing line: ~      args.outputs.borders <<  args.state.notes[i].border~
    +    def move! vector
    +** Processing line: ~      self.x += vector.x~
     - Inside source: true
     *** True Line Result
    -      args.outputs.borders <<  args.state.notes[i].border
    +      self.x += vector.x
    +** Processing line: ~      self.y += vector.y~
    +- Inside source: true
    +*** True Line Result
    +      self.y += vector.y
    +** Processing line: ~      return self~
    +- Inside source: true
    +*** True Line Result
    +      return self
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -96995,46 +98467,42 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Shows whether or not the user is correct by filling the screen with either red or green~
    -- Inside source: true
    -*** True Line Result
    -    # Shows whether or not the user is correct by filling the screen with either red or green
    -** Processing line: ~    args.outputs.solids << args.state.click_feedbacks.map { |c| c.solid }~
    +** Processing line: ~    #Helper function to draw snake body~
     - Inside source: true
     *** True Line Result
    -    args.outputs.solids << args.state.click_feedbacks.map { |c| c.solid }
    -** Processing line: ~  end~
    +    #Helper function to draw snake body
    +** Processing line: ~    def draw! 🎮, 📺, color~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +    def draw! 🎮, 📺, color
    +** Processing line: ~      translate 📺.solids, 🎮.⛓, [self.x * 🎮.⚖️ + 🎮.🛶 / 2, self.y * 🎮.⚖️ + 🎮.🛶 / 2, 🎮.⚖️ - 🎮.🛶, 🎮.⚖️ - 🎮.🛶, color]~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  # Shows the score (number of times the user guesses wrong) onto the screen using labels.~
    +      translate 📺.solids, 🎮.⛓, [self.x * 🎮.⚖️ + 🎮.🛶 / 2, self.y * 🎮.⚖️ + 🎮.🛶 / 2, 🎮.⚖️ - 🎮.🛶, 🎮.⚖️ - 🎮.🛶, color]
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  # Shows the score (number of times the user guesses wrong) onto the screen using labels.
    -** Processing line: ~  def render_score args~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  def render_score args
    -** Processing line: ~    if args.state.times_wrong == 0 # if the user has guessed wrong zero times, the score is par~
    +
    +** Processing line: ~    #This is where it all started, I was trying to find  good way to multiply a map by a number, * is already used so is **~
     - Inside source: true
     *** True Line Result
    -    if args.state.times_wrong == 0 # if the user has guessed wrong zero times, the score is par
    -** Processing line: ~      args.outputs.labels << [args.grid.w_half, args.grid.top.shift_down(80), "Score: PAR", 0, 1, 0, 0, 0]~
    +    #This is where it all started, I was trying to find  good way to multiply a map by a number, * is already used so is **
    +** Processing line: ~    #I kept trying different combinations of symbols, when suddenly...~
     - Inside source: true
     *** True Line Result
    -      args.outputs.labels << [args.grid.w_half, args.grid.top.shift_down(80), "Score: PAR", 0, 1, 0, 0, 0]
    -** Processing line: ~    else # otherwise, number of times the user has guessed wrong is shown~
    +    #I kept trying different combinations of symbols, when suddenly...
    +** Processing line: ~    def 😀 value~
     - Inside source: true
     *** True Line Result
    -    else # otherwise, number of times the user has guessed wrong is shown
    -** Processing line: ~      args.outputs.labels << [args.grid.w_half, args.grid.top.shift_down(80), "Score: +#{args.state.times_wrong}", 0, 1, 0, 0, 0] # shows score using string interpolation~
    +    def 😀 value
    +** Processing line: ~      self.map {|d| d * value}~
     - Inside source: true
     *** True Line Result
    -      args.outputs.labels << [args.grid.w_half, args.grid.top.shift_down(80), "Score: +#{args.state.times_wrong}", 0, 1, 0, 0, 0] # shows score using string interpolation
    +      self.map {|d| d * value}
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -97047,30 +98515,26 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # Sets the target note for the level and performs calculations on click_feedbacks.~
    -- Inside source: true
    -*** True Line Result
    -  # Sets the target note for the level and performs calculations on click_feedbacks.
    -** Processing line: ~  def calc args~
    +** Processing line: ~  #Draw stuff with an offset~
     - Inside source: true
     *** True Line Result
    -  def calc args
    -** Processing line: ~    args.state.target_note ||= available_notes.sample # chooses a note from available_notes collection as target note~
    +  #Draw stuff with an offset
    +** Processing line: ~  def translate output_collection, ⛓, what~
     - Inside source: true
     *** True Line Result
    -    args.state.target_note ||= available_notes.sample # chooses a note from available_notes collection as target note
    -** Processing line: ~    args.state.click_feedbacks.each    { |c| c.solid[-1] -= 5 } # remove this line and solid color will remain on screen indefinitely~
    +  def translate output_collection, ⛓, what
    +** Processing line: ~    what.x += ⛓.x~
     - Inside source: true
     *** True Line Result
    -    args.state.click_feedbacks.each    { |c| c.solid[-1] -= 5 } # remove this line and solid color will remain on screen indefinitely
    -** Processing line: ~    # comment this line out and the solid color will keep flashing on screen instead of being removed from click_feedbacks collection~
    +    what.x += ⛓.x
    +** Processing line: ~    what.y += ⛓.y~
     - Inside source: true
     *** True Line Result
    -    # comment this line out and the solid color will keep flashing on screen instead of being removed from click_feedbacks collection
    -** Processing line: ~    args.state.click_feedbacks.reject! { |c| c.solid[-1] <= 0 }~
    +    what.y += ⛓.y
    +** Processing line: ~    output_collection << what~
     - Inside source: true
     *** True Line Result
    -    args.state.click_feedbacks.reject! { |c| c.solid[-1] <= 0 }
    +    output_collection << what
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -97079,166 +98543,170 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # Uses input from the user to play the target note, as well as the other notes that could be a potential match.~
    +** Processing line: ~  BLUE = [33, 150, 243]~
     - Inside source: true
     *** True Line Result
    -  # Uses input from the user to play the target note, as well as the other notes that could be a potential match.
    -** Processing line: ~  def input_mouse args~
    +  BLUE = [33, 150, 243]
    +** Processing line: ~  RED = [244, 67, 54]~
     - Inside source: true
     *** True Line Result
    -  def input_mouse args
    -** Processing line: ~    return unless args.inputs.mouse.click # return unless the mouse is clicked~
    +  RED = [244, 67, 54]
    +** Processing line: ~  GOLD = [255, 193, 7]~
     - Inside source: true
     *** True Line Result
    -    return unless args.inputs.mouse.click # return unless the mouse is clicked
    +  GOLD = [255, 193, 7]
    +** Processing line: ~  LAST = 0~
    +- Inside source: true
    +*** True Line Result
    +  LAST = 0
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # finds button that was clicked by user~
    +** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
    -    # finds button that was clicked by user
    -** Processing line: ~    button_clicked = args.outputs.borders.find_all do |b| # go through borders collection to find all borders that meet requirements~
    +  def tick args
    +** Processing line: ~    defaults args.state~
     - Inside source: true
     *** True Line Result
    -    button_clicked = args.outputs.borders.find_all do |b| # go through borders collection to find all borders that meet requirements
    -** Processing line: ~      args.inputs.mouse.click.point.inside_rect? b # find button border that mouse was clicked inside of~
    +    defaults args.state
    +** Processing line: ~    render args.state, args.outputs~
     - Inside source: true
     *** True Line Result
    -      args.inputs.mouse.click.point.inside_rect? b # find button border that mouse was clicked inside of
    -** Processing line: ~    end.find_all { |b| b.is_a? Hash }.first # reject, return first element~
    +    render args.state, args.outputs
    +** Processing line: ~    input args.state, args.inputs~
     - Inside source: true
     *** True Line Result
    -    end.find_all { |b| b.is_a? Hash }.first # reject, return first element
    -** Processing line: ~~
    +    input args.state, args.inputs
    +** Processing line: ~    update args.state~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    return unless button_clicked # return unless button_clicked as a value (a button was clicked)~
    +    update args.state
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    return unless button_clicked # return unless button_clicked as a value (a button was clicked)
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    queue_click_feedback args, # calls queue_click_feedback method on the button that was clicked~
    +** Processing line: ~  def update 🎮~
     - Inside source: true
     *** True Line Result
    -    queue_click_feedback args, # calls queue_click_feedback method on the button that was clicked
    -** Processing line: ~                         button_clicked.x,~
    +  def update 🎮
    +** Processing line: ~    #Update every 10 frames~
     - Inside source: true
     *** True Line Result
    -                         button_clicked.x,
    -** Processing line: ~                         button_clicked.y,~
    +    #Update every 10 frames
    +** Processing line: ~    if 🎮.tick_count.mod_zero? 10~
     - Inside source: true
     *** True Line Result
    -                         button_clicked.y,
    -** Processing line: ~                         button_clicked.w,~
    +    if 🎮.tick_count.mod_zero? 10
    +** Processing line: ~      #Add new snake body piece at head's location~
     - Inside source: true
     *** True Line Result
    -                         button_clicked.w,
    -** Processing line: ~                         button_clicked.h,~
    +      #Add new snake body piece at head's location
    +** Processing line: ~      🎮.🐍 << [*🎮.🤖]~
     - Inside source: true
     *** True Line Result
    -                         button_clicked.h,
    -** Processing line: ~                         150, 100, 200 # sets color of button to shade of purple~
    +      🎮.🐍 << [*🎮.🤖]
    +** Processing line: ~      #Assign Next Direction to Direction~
     - Inside source: true
     *** True Line Result
    -                         150, 100, 200 # sets color of button to shade of purple
    -** Processing line: ~~
    +      #Assign Next Direction to Direction
    +** Processing line: ~      🎮.🚗 = *🎮.🚦~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    if button_clicked[:label] == 'play' # if "play note" button is pressed~
    +      🎮.🚗 = *🎮.🚦
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    if button_clicked[:label] == 'play' # if "play note" button is pressed
    -** Processing line: ~      args.outputs.sounds << "sounds/#{args.state.target_note}.wav" # sound of target note is output~
    +
    +** Processing line: ~      #Trim the snake a bit if its longer than current size~
     - Inside source: true
     *** True Line Result
    -      args.outputs.sounds << "sounds/#{args.state.target_note}.wav" # sound of target note is output
    -** Processing line: ~    elsif button_clicked[:label] == 'again' # if "play game again" button is pressed~
    +      #Trim the snake a bit if its longer than current size
    +** Processing line: ~      if 🎮.🐍.length > 🎮.🛒~
     - Inside source: true
     *** True Line Result
    -    elsif button_clicked[:label] == 'again' # if "play game again" button is pressed
    -** Processing line: ~      args.state.target_note = nil # no target note~
    +      if 🎮.🐍.length > 🎮.🛒
    +** Processing line: ~        🎮.🐍 = 🎮.🐍[-🎮.🛒..-1]~
     - Inside source: true
     *** True Line Result
    -      args.state.target_note = nil # no target note
    -** Processing line: ~      args.state.current_level = 1 # starts at level 1 again~
    +        🎮.🐍 = 🎮.🐍[-🎮.🛒..-1]
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -      args.state.current_level = 1 # starts at level 1 again
    -** Processing line: ~      args.state.times_wrong = 0 # starts off with 0 wrong guesses~
    +      end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      args.state.times_wrong = 0 # starts off with 0 wrong guesses
    -** Processing line: ~      args.state.game_over = false # the game is not over (because it has just been restarted)~
    +
    +** Processing line: ~      #Move the head in the Direction~
     - Inside source: true
     *** True Line Result
    -      args.state.game_over = false # the game is not over (because it has just been restarted)
    -** Processing line: ~    else # otherwise if neither of those buttons were pressed~
    +      #Move the head in the Direction
    +** Processing line: ~      🎮.🤖.move! 🎮.🚗~
     - Inside source: true
     *** True Line Result
    -    else # otherwise if neither of those buttons were pressed
    -** Processing line: ~      args.outputs.sounds << "sounds/#{button_clicked[:label]}.wav" # sound of clicked note is played~
    +      🎮.🤖.move! 🎮.🚗
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      args.outputs.sounds << "sounds/#{button_clicked[:label]}.wav" # sound of clicked note is played
    -** Processing line: ~      if button_clicked[:label] == args.state.target_note # if clicked note is target note~
    +
    +** Processing line: ~      #If Head is outside the playing field, or inside snake's body restart game~
     - Inside source: true
     *** True Line Result
    -      if button_clicked[:label] == args.state.target_note # if clicked note is target note
    -** Processing line: ~        args.state.target_note = nil # target note is emptied~
    +      #If Head is outside the playing field, or inside snake's body restart game
    +** Processing line: ~      if 🎮.🤖.x < 0 || 🎮.🤖.x >= 🎮.🗺.x || 🎮.🤖.y < 0 || 🎮.🤖.y >= 🎮.🗺.y || 🎮.🚗 != [0, 0] && 🎮.🐍.any? {|s| s == 🎮.🤖}~
     - Inside source: true
     *** True Line Result
    -        args.state.target_note = nil # target note is emptied
    -** Processing line: ~~
    +      if 🎮.🤖.x < 0 || 🎮.🤖.x >= 🎮.🗺.x || 🎮.🤖.y < 0 || 🎮.🤖.y >= 🎮.🗺.y || 🎮.🚗 != [0, 0] && 🎮.🐍.any? {|s| s == 🎮.🤖}
    +** Processing line: ~        LAST = 🎮.💰~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~        if args.state.current_level < 9 # if game hasn't reached level 9~
    +        LAST = 🎮.💰
    +** Processing line: ~        🎮.as_hash.clear~
     - Inside source: true
     *** True Line Result
    -        if args.state.current_level < 9 # if game hasn't reached level 9
    -** Processing line: ~          args.state.current_level += 1 # game goes to next level~
    +        🎮.as_hash.clear
    +** Processing line: ~        return~
     - Inside source: true
     *** True Line Result
    -          args.state.current_level += 1 # game goes to next level
    -** Processing line: ~        else # otherwise, if game has reached level 9~
    +        return
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -        else # otherwise, if game has reached level 9
    -** Processing line: ~          args.state.game_over = true # the game is over~
    +      end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          args.state.game_over = true # the game is over
    -** Processing line: ~        end~
    +
    +** Processing line: ~      #If head lands on food add size and score~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~~
    +      #If head lands on food add size and score
    +** Processing line: ~      if 🎮.🤖 == 🎮.🍎~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~        queue_click_feedback args, 0, 0, args.grid.w, args.grid.h, 100, 200, 100 # green shown if user guesses correctly~
    +      if 🎮.🤖 == 🎮.🍎
    +** Processing line: ~        🎮.🛒 += 1~
     - Inside source: true
     *** True Line Result
    -        queue_click_feedback args, 0, 0, args.grid.w, args.grid.h, 100, 200, 100 # green shown if user guesses correctly
    -** Processing line: ~      else # otherwise, if clicked note is not target note~
    +        🎮.🛒 += 1
    +** Processing line: ~        🎮.💰 += (🎮.🛒 * 0.8).floor.to_i + 5~
     - Inside source: true
     *** True Line Result
    -      else # otherwise, if clicked note is not target note
    -** Processing line: ~        args.state.times_wrong += 1 # increments times user guessed wrong~
    +        🎮.💰 += (🎮.🛒 * 0.8).floor.to_i + 5
    +** Processing line: ~        spawn_🍎 🎮~
     - Inside source: true
     *** True Line Result
    -        args.state.times_wrong += 1 # increments times user guessed wrong
    -** Processing line: ~        queue_click_feedback args, 0, 0, args.grid.w, args.grid.h, 200, 100, 100 # red shown is user guesses wrong~
    +        spawn_🍎 🎮
    +** Processing line: ~        puts 🎮.🍎~
     - Inside source: true
     *** True Line Result
    -        queue_click_feedback args, 0, 0, args.grid.w, args.grid.h, 200, 100, 100 # red shown is user guesses wrong
    +        puts 🎮.🍎
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    @@ -97247,26 +98715,26 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
         end
    -** Processing line: ~  end~
    -- Inside source: true
    -*** True Line Result
    -  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # Creates a collection of all of the available notes as symbols~
    +** Processing line: ~    #Every second remove 1 point~
     - Inside source: true
     *** True Line Result
    -  # Creates a collection of all of the available notes as symbols
    -** Processing line: ~  def available_notes~
    +    #Every second remove 1 point
    +** Processing line: ~    if 🎮.💰 > 0 && 🎮.tick_count.mod_zero?(60)~
     - Inside source: true
     *** True Line Result
    -  def available_notes
    -** Processing line: ~    [:C3, :D3, :E3, :F3, :G3, :A3, :B3, :C4]~
    +    if 🎮.💰 > 0 && 🎮.tick_count.mod_zero?(60)
    +** Processing line: ~      🎮.💰 -= 1~
     - Inside source: true
     *** True Line Result
    -    [:C3, :D3, :E3, :F3, :G3, :A3, :B3, :C4]
    +      🎮.💰 -= 1
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -97275,26 +98743,30 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # Creates buttons for each note, and sets a label (the note's name) and border for each note's button.~
    +** Processing line: ~  def spawn_🍎 🎮~
     - Inside source: true
     *** True Line Result
    -  # Creates buttons for each note, and sets a label (the note's name) and border for each note's button.
    -** Processing line: ~  def piano_button args, note, position~
    +  def spawn_🍎 🎮
    +** Processing line: ~    #Food~
     - Inside source: true
     *** True Line Result
    -  def piano_button args, note, position
    -** Processing line: ~    args.state.new_entity(:button) do |b| # declares button as new entity~
    +    #Food
    +** Processing line: ~    🎮.🍎 ||= [*🎮.🤖]~
     - Inside source: true
     *** True Line Result
    -    args.state.new_entity(:button) do |b| # declares button as new entity
    -** Processing line: ~      b.label  =  [460 + 40.mult(position), args.grid.h * 0.4, "#{note}", 0, 1, 0, 0, 0] # label definition~
    +    🎮.🍎 ||= [*🎮.🤖]
    +** Processing line: ~    #Randomly spawns food inside the playing field, keep doing this if the food keeps landing on the snake's body~
     - Inside source: true
     *** True Line Result
    -      b.label  =  [460 + 40.mult(position), args.grid.h * 0.4, "#{note}", 0, 1, 0, 0, 0] # label definition
    -** Processing line: ~      b.border =  { x: 460 + 40.mult(position) - 20, y: args.grid.h * 0.4 - 32, w: 40, h: 40, label: note } # border definition, text/title; 20 subtracted so label is in center of border~
    +    #Randomly spawns food inside the playing field, keep doing this if the food keeps landing on the snake's body
    +** Processing line: ~    while 🎮.🐍.any? {|s| s == 🎮.🍎} || 🎮.🍎 == 🎮.🤖 do~
     - Inside source: true
     *** True Line Result
    -      b.border =  { x: 460 + 40.mult(position) - 20, y: args.grid.h * 0.4 - 32, w: 40, h: 40, label: note } # border definition, text/title; 20 subtracted so label is in center of border
    +    while 🎮.🐍.any? {|s| s == 🎮.🍎} || 🎮.🍎 == 🎮.🤖 do
    +** Processing line: ~      🎮.🍎 = [rand(🎮.🗺.x), rand(🎮.🗺.y)]~
    +- Inside source: true
    +*** True Line Result
    +      🎮.🍎 = [rand(🎮.🗺.x), rand(🎮.🗺.y)]
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -97307,94 +98779,82 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # Color of click feedback changes depending on what button was clicked, and whether the guess is right or wrong~
    -- Inside source: true
    -*** True Line Result
    -  # Color of click feedback changes depending on what button was clicked, and whether the guess is right or wrong
    -** Processing line: ~  # If a button is clicked, the inside of button is purple (see input_mouse method)~
    -- Inside source: true
    -*** True Line Result
    -  # If a button is clicked, the inside of button is purple (see input_mouse method)
    -** Processing line: ~  # If correct note is clicked, screen turns green~
    -- Inside source: true
    -*** True Line Result
    -  # If correct note is clicked, screen turns green
    -** Processing line: ~  # If incorrect note is clicked, screen turns red (again, see input_mouse method)~
    -- Inside source: true
    -*** True Line Result
    -  # If incorrect note is clicked, screen turns red (again, see input_mouse method)
    -** Processing line: ~  def queue_click_feedback args, x, y, w, h, *color~
    +** Processing line: ~  def render 🎮, 📺~
     - Inside source: true
     *** True Line Result
    -  def queue_click_feedback args, x, y, w, h, *color
    -** Processing line: ~    args.state.click_feedbacks << args.state.new_entity(:click_feedback) do |c| # declares feedback as new entity~
    +  def render 🎮, 📺
    +** Processing line: ~    #Paint the background black~
     - Inside source: true
     *** True Line Result
    -    args.state.click_feedbacks << args.state.new_entity(:click_feedback) do |c| # declares feedback as new entity
    -** Processing line: ~      c.solid =  [x, y, w, h, *color, 255] # sets color~
    +    #Paint the background black
    +** Processing line: ~    📺.solids << [0, 0, 1280, 720, 0, 0, 0, 255]~
     - Inside source: true
     *** True Line Result
    -      c.solid =  [x, y, w, h, *color, 255] # sets color
    -** Processing line: ~    end~
    +    📺.solids << [0, 0, 1280, 720, 0, 0, 0, 255]
    +** Processing line: ~    #Draw a border for the playing field~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~  end~
    +    #Draw a border for the playing field
    +** Processing line: ~    translate 📺.borders, 🎮.⛓, [0, 0, 🎮.🗺.x * 🎮.⚖️, 🎮.🗺.y * 🎮.⚖️, 255, 255, 255]~
     - Inside source: true
     *** True Line Result
    -  end
    +    translate 📺.borders, 🎮.⛓, [0, 0, 🎮.🗺.x * 🎮.⚖️, 🎮.🗺.y * 🎮.⚖️, 255, 255, 255]
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def tick_instructions args, text, y = 715~
    +** Processing line: ~    #Draw the snake's body~
     - Inside source: true
     *** True Line Result
    -  def tick_instructions args, text, y = 715
    -** Processing line: ~    return if args.state.key_event_occurred~
    +    #Draw the snake's body
    +** Processing line: ~    🎮.🐍.map do |🐍| 🐍.draw! 🎮, 📺, BLUE end~
     - Inside source: true
     *** True Line Result
    -    return if args.state.key_event_occurred
    -** Processing line: ~    if args.inputs.mouse.click ||~
    +    🎮.🐍.map do |🐍| 🐍.draw! 🎮, 📺, BLUE end
    +** Processing line: ~    #Draw the head~
     - Inside source: true
     *** True Line Result
    -    if args.inputs.mouse.click ||
    -** Processing line: ~       args.inputs.keyboard.directional_vector ||~
    +    #Draw the head
    +** Processing line: ~    🎮.🤖.draw! 🎮, 📺, BLUE~
     - Inside source: true
     *** True Line Result
    -       args.inputs.keyboard.directional_vector ||
    -** Processing line: ~       args.inputs.keyboard.key_down.enter ||~
    +    🎮.🤖.draw! 🎮, 📺, BLUE
    +** Processing line: ~    #Draw the food~
     - Inside source: true
     *** True Line Result
    -       args.inputs.keyboard.key_down.enter ||
    -** Processing line: ~       args.inputs.keyboard.key_down.escape~
    +    #Draw the food
    +** Processing line: ~    🎮.🍎.draw! 🎮, 📺, RED~
     - Inside source: true
     *** True Line Result
    -       args.inputs.keyboard.key_down.escape
    -** Processing line: ~      args.state.key_event_occurred = true~
    +    🎮.🍎.draw! 🎮, 📺, RED
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      args.state.key_event_occurred = true
    -** Processing line: ~    end~
    +
    +** Processing line: ~    #Draw current score~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +    #Draw current score
    +** Processing line: ~    translate 📺.labels, 🎮.⛓, [5, 715, "Score: #{🎮.💰}", GOLD]~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    args.outputs.debug << [0, y - 50, 1280, 60].solid~
    +    translate 📺.labels, 🎮.⛓, [5, 715, "Score: #{🎮.💰}", GOLD]
    +** Processing line: ~    #Draw your last score, if any~
     - Inside source: true
     *** True Line Result
    -    args.outputs.debug << [0, y - 50, 1280, 60].solid
    -** Processing line: ~    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label~
    +    #Draw your last score, if any
    +** Processing line: ~    translate 📺.labels, 🎮.⛓, [[*🎮.🤖.😀(🎮.⚖️)].move!([0, 🎮.⚖️ * 2]), "Your Last score is #{LAST}", 0, 1, GOLD] unless LAST == 0 || 🎮.🚗 != [0, 0]~
     - Inside source: true
     *** True Line Result
    -    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label
    -** Processing line: ~    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label~
    +    translate 📺.labels, 🎮.⛓, [[*🎮.🤖.😀(🎮.⚖️)].move!([0, 🎮.⚖️ * 2]), "Your Last score is #{LAST}", 0, 1, GOLD] unless LAST == 0 || 🎮.🚗 != [0, 0]
    +** Processing line: ~    #Draw starting message, only if Direction is 0~
     - Inside source: true
     *** True Line Result
    -    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label
    +    #Draw starting message, only if Direction is 0
    +** Processing line: ~    translate 📺.labels, 🎮.⛓, [🎮.🤖.😀(🎮.⚖️), "Press any Arrow key to start", 0, 1, GOLD] unless 🎮.🚗 != [0, 0]~
    +- Inside source: true
    +*** True Line Result
    +    translate 📺.labels, 🎮.⛓, [🎮.🤖.😀(🎮.⚖️), "Press any Arrow key to start", 0, 1, GOLD] unless 🎮.🚗 != [0, 0]
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -97403,174 +98863,162 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~#+end_src~
    -- Line was identified as the end of a code block.
    -*** True Line Result
    -#+end_src
    -** Processing line: ~~
    -- End of paragraph detected.
    -*** True Line Result
    -
    -** Processing line: ~*** Arcade - Twinstick - main.rb~
    -- Header detected.
    -*** True Line Result
    -
    -*** True Line Result
    -*** Arcade - Twinstick - main.rb
    -** Processing line: ~#+begin_src ruby~
    -- Line was identified as the beginning of a code block.
    +** Processing line: ~  def input 🎮, 🕹~
    +- Inside source: true
     *** True Line Result
    -
    +  def input 🎮, 🕹
    +** Processing line: ~    #Left and Right keyboard input, only change if X direction is 0~
    +- Inside source: true
     *** True Line Result
    -#+begin_src ruby
    -** Processing line: ~  # ./samples/99_genre_arcade/twinstick/app/main.rb~
    +    #Left and Right keyboard input, only change if X direction is 0
    +** Processing line: ~    if 🕹.keyboard.key_held.left && 🎮.🚗.x == 0~
     - Inside source: true
     *** True Line Result
    -  # ./samples/99_genre_arcade/twinstick/app/main.rb
    -** Processing line: ~  def tick args~
    +    if 🕹.keyboard.key_held.left && 🎮.🚗.x == 0
    +** Processing line: ~      🎮.🚦 = [-1, 0]~
     - Inside source: true
     *** True Line Result
    -  def tick args
    -** Processing line: ~    args.state.player         ||= {x: 600, y: 320, w: 80, h: 80, path: 'sprites/circle-white.png', vx: 0, vy: 0, health: 10, cooldown: 0, score: 0}~
    +      🎮.🚦 = [-1, 0]
    +** Processing line: ~    elsif 🕹.keyboard.key_held.right && 🎮.🚗.x == 0~
     - Inside source: true
     *** True Line Result
    -    args.state.player         ||= {x: 600, y: 320, w: 80, h: 80, path: 'sprites/circle-white.png', vx: 0, vy: 0, health: 10, cooldown: 0, score: 0}
    -** Processing line: ~    args.state.enemies        ||= []~
    +    elsif 🕹.keyboard.key_held.right && 🎮.🚗.x == 0
    +** Processing line: ~      🎮.🚦 = [1, 0]~
     - Inside source: true
     *** True Line Result
    -    args.state.enemies        ||= []
    -** Processing line: ~    args.state.player_bullets ||= []~
    +      🎮.🚦 = [1, 0]
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    args.state.player_bullets ||= []
    -** Processing line: ~    args.state.tick_count     ||= -1~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    args.state.tick_count     ||= -1
    -** Processing line: ~    args.state.tick_count     += 1~
    +
    +** Processing line: ~    #Up and Down keyboard input, only change if Y direction is 0~
     - Inside source: true
     *** True Line Result
    -    args.state.tick_count     += 1
    -** Processing line: ~    spawn_enemies args~
    +    #Up and Down keyboard input, only change if Y direction is 0
    +** Processing line: ~    if 🕹.keyboard.key_held.up && 🎮.🚗.y == 0~
     - Inside source: true
     *** True Line Result
    -    spawn_enemies args
    -** Processing line: ~    kill_enemies args~
    +    if 🕹.keyboard.key_held.up && 🎮.🚗.y == 0
    +** Processing line: ~      🎮.🚦 = [0, 1]~
     - Inside source: true
     *** True Line Result
    -    kill_enemies args
    -** Processing line: ~    move_enemies args~
    +      🎮.🚦 = [0, 1]
    +** Processing line: ~    elsif 🕹.keyboard.key_held.down && 🎮.🚗.y == 0~
     - Inside source: true
     *** True Line Result
    -    move_enemies args
    -** Processing line: ~    move_bullets args~
    +    elsif 🕹.keyboard.key_held.down && 🎮.🚗.y == 0
    +** Processing line: ~      🎮.🚦 = [0, -1]~
     - Inside source: true
     *** True Line Result
    -    move_bullets args
    -** Processing line: ~    move_player args~
    +      🎮.🚦 = [0, -1]
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    move_player args
    -** Processing line: ~    fire_player args~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    fire_player args
    -** Processing line: ~    args.state.player[:r] = args.state.player[:g] = args.state.player[:b] = (args.state.player[:health] * 25.5).clamp(0, 255)~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    args.state.player[:r] = args.state.player[:g] = args.state.player[:b] = (args.state.player[:health] * 25.5).clamp(0, 255)
    -** Processing line: ~    label_color           = args.state.player[:health] <= 5 ? 255 : 0~
    +
    +** Processing line: ~  def defaults 🎮~
     - Inside source: true
     *** True Line Result
    -    label_color           = args.state.player[:health] <= 5 ? 255 : 0
    -** Processing line: ~    args.outputs.labels << [~
    +  def defaults 🎮
    +** Processing line: ~    #Playing field size~
     - Inside source: true
     *** True Line Result
    -    args.outputs.labels << [
    -** Processing line: ~        {~
    +    #Playing field size
    +** Processing line: ~    🎮.🗺 ||= [20, 20]~
     - Inside source: true
     *** True Line Result
    -        {
    -** Processing line: ~            x: args.state.player.x + 40, y: args.state.player.y + 60, alignment_enum: 1, text: "#{args.state.player[:health]} HP",~
    +    🎮.🗺 ||= [20, 20]
    +** Processing line: ~    #Scale for drawing, screen height / Field height~
     - Inside source: true
     *** True Line Result
    -            x: args.state.player.x + 40, y: args.state.player.y + 60, alignment_enum: 1, text: "#{args.state.player[:health]} HP",
    -** Processing line: ~            r: label_color, g: label_color, b: label_color~
    +    #Scale for drawing, screen height / Field height
    +** Processing line: ~    🎮.⚖️ ||= 720 / 🎮.🗺.y~
     - Inside source: true
     *** True Line Result
    -            r: label_color, g: label_color, b: label_color
    -** Processing line: ~        }, {~
    +    🎮.⚖️ ||= 720 / 🎮.🗺.y
    +** Processing line: ~    #Offset, offset all rendering to the center of the screen~
     - Inside source: true
     *** True Line Result
    -        }, {
    -** Processing line: ~            x: args.state.player.x + 40, y: args.state.player.y + 40, alignment_enum: 1, text: "#{args.state.player[:score]} PTS",~
    +    #Offset, offset all rendering to the center of the screen
    +** Processing line: ~    🎮.⛓ ||= [(1280 - 720).fdiv(2), 0]~
     - Inside source: true
     *** True Line Result
    -            x: args.state.player.x + 40, y: args.state.player.y + 40, alignment_enum: 1, text: "#{args.state.player[:score]} PTS",
    -** Processing line: ~            r: label_color, g: label_color, b: label_color, size_enum: 2 - args.state.player[:score].to_s.length,~
    +    🎮.⛓ ||= [(1280 - 720).fdiv(2), 0]
    +** Processing line: ~    #Padding, make the snake body slightly smaller than the scale~
     - Inside source: true
     *** True Line Result
    -            r: label_color, g: label_color, b: label_color, size_enum: 2 - args.state.player[:score].to_s.length,
    -** Processing line: ~        }~
    +    #Padding, make the snake body slightly smaller than the scale
    +** Processing line: ~    🎮.🛶 ||= (🎮.⚖️ * 0.2).to_i~
     - Inside source: true
     *** True Line Result
    -        }
    -** Processing line: ~    ]~
    +    🎮.🛶 ||= (🎮.⚖️ * 0.2).to_i
    +** Processing line: ~    #Snake Size~
     - Inside source: true
     *** True Line Result
    -    ]
    -** Processing line: ~    args.outputs.sprites << [args.state.player, args.state.enemies, args.state.player_bullets]~
    +    #Snake Size
    +** Processing line: ~    🎮.🛒 ||= 3~
     - Inside source: true
     *** True Line Result
    -    args.outputs.sprites << [args.state.player, args.state.enemies, args.state.player_bullets]
    -** Processing line: ~    args.state.clear! if args.state.player[:health] < 0 # Reset the game if the player's health drops below zero~
    +    🎮.🛒 ||= 3
    +** Processing line: ~    #Snake head, the only part we are actually controlling~
     - Inside source: true
     *** True Line Result
    -    args.state.clear! if args.state.player[:health] < 0 # Reset the game if the player's health drops below zero
    -** Processing line: ~  end~
    +    #Snake head, the only part we are actually controlling
    +** Processing line: ~    🎮.🤖 ||= [🎮.🗺.x / 2, 🎮.🗺.y / 2]~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +    🎮.🤖 ||= [🎮.🗺.x / 2, 🎮.🗺.y / 2]
    +** Processing line: ~    #Snake body map, follows the head~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def spawn_enemies args~
    +    #Snake body map, follows the head
    +** Processing line: ~    🎮.🐍 ||= []~
     - Inside source: true
     *** True Line Result
    -  def spawn_enemies args
    -** Processing line: ~    # Spawn enemies more frequently as the player's score increases.~
    +    🎮.🐍 ||= []
    +** Processing line: ~    #Direction the head moves to~
     - Inside source: true
     *** True Line Result
    -    # Spawn enemies more frequently as the player's score increases.
    -** Processing line: ~    if rand < (100+args.state.player[:score])/(10000 + args.state.player[:score]) || args.state.tick_count.zero?~
    +    #Direction the head moves to
    +** Processing line: ~    🎮.🚗 ||= [0, 0]~
     - Inside source: true
     *** True Line Result
    -    if rand < (100+args.state.player[:score])/(10000 + args.state.player[:score]) || args.state.tick_count.zero?
    -** Processing line: ~      theta = rand * Math::PI * 2~
    +    🎮.🚗 ||= [0, 0]
    +** Processing line: ~    #Next_Direction, during input check only change this variable and then when game updates asign this to Direction~
     - Inside source: true
     *** True Line Result
    -      theta = rand * Math::PI * 2
    -** Processing line: ~      args.state.enemies << {~
    +    #Next_Direction, during input check only change this variable and then when game updates asign this to Direction
    +** Processing line: ~    🎮.🚦 ||= [*🎮.🚗]~
     - Inside source: true
     *** True Line Result
    -      args.state.enemies << {
    -** Processing line: ~          x: 600 + Math.cos(theta) * 800, y: 320 + Math.sin(theta) * 800, w: 80, h: 80, path: 'sprites/circle-white.png',~
    +    🎮.🚦 ||= [*🎮.🚗]
    +** Processing line: ~    #Your score~
     - Inside source: true
     *** True Line Result
    -          x: 600 + Math.cos(theta) * 800, y: 320 + Math.sin(theta) * 800, w: 80, h: 80, path: 'sprites/circle-white.png',
    -** Processing line: ~          r: (256 * rand).floor, g: (256 * rand).floor, b: (256 * rand).floor~
    +    #Your score
    +** Processing line: ~    🎮.💰 ||= 0~
     - Inside source: true
     *** True Line Result
    -          r: (256 * rand).floor, g: (256 * rand).floor, b: (256 * rand).floor
    -** Processing line: ~      }~
    +    🎮.💰 ||= 0
    +** Processing line: ~    #Spawns Food randomly~
     - Inside source: true
     *** True Line Result
    -      }
    -** Processing line: ~    end~
    +    #Spawns Food randomly
    +** Processing line: ~    spawn_🍎(🎮) unless 🎮.🍎?~
     - Inside source: true
     *** True Line Result
    -    end
    +    spawn_🍎(🎮) unless 🎮.🍎?
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -97579,178 +99027,186 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def kill_enemies args~
    -- Inside source: true
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
     *** True Line Result
    -  def kill_enemies args
    -** Processing line: ~    args.state.enemies.reject! do |enemy|~
    -- Inside source: true
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
     *** True Line Result
    -    args.state.enemies.reject! do |enemy|
    -** Processing line: ~      # Check if enemy and player are within 80 pixels of each other (i.e. overlapping)~
    -- Inside source: true
    +
    +** Processing line: ~*** Arcade - Solar System - main.rb~
    +- Header detected.
     *** True Line Result
    -      # Check if enemy and player are within 80 pixels of each other (i.e. overlapping)
    -** Processing line: ~      if 6400 > (enemy.x - args.state.player.x) ** 2 + (enemy.y - args.state.player.y) ** 2~
    -- Inside source: true
    +
     *** True Line Result
    -      if 6400 > (enemy.x - args.state.player.x) ** 2 + (enemy.y - args.state.player.y) ** 2
    -** Processing line: ~        # Enemy is touching player. Kill enemy, and reduce player HP by 1.~
    +*** Arcade - Solar System - main.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/99_genre_arcade/solar_system/app/main.rb~
     - Inside source: true
     *** True Line Result
    -        # Enemy is touching player. Kill enemy, and reduce player HP by 1.
    -** Processing line: ~        args.state.player[:health] -= 1~
    +  # ./samples/99_genre_arcade/solar_system/app/main.rb
    +** Processing line: ~  # Focused tutorial video: https://s3.amazonaws.com/s3.dragonruby.org/dragonruby-nddnug-workshop.mp4~
     - Inside source: true
     *** True Line Result
    -        args.state.player[:health] -= 1
    -** Processing line: ~      else~
    +  # Focused tutorial video: https://s3.amazonaws.com/s3.dragonruby.org/dragonruby-nddnug-workshop.mp4
    +** Processing line: ~  # Workshop/Presentation which provides motivation for creating a game engine: https://www.youtube.com/watch?v=S3CFce1arC8~
     - Inside source: true
     *** True Line Result
    -      else
    -** Processing line: ~        args.state.player_bullets.any? do |bullet|~
    +  # Workshop/Presentation which provides motivation for creating a game engine: https://www.youtube.com/watch?v=S3CFce1arC8
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        args.state.player_bullets.any? do |bullet|
    -** Processing line: ~          # Check if enemy and bullet are within 50 pixels of each other (i.e. overlapping)~
    +
    +** Processing line: ~  def defaults args~
     - Inside source: true
     *** True Line Result
    -          # Check if enemy and bullet are within 50 pixels of each other (i.e. overlapping)
    -** Processing line: ~          if 2500 > (enemy.x - bullet.x + 30) ** 2 + (enemy.y - bullet.y + 30) ** 2~
    +  def defaults args
    +** Processing line: ~    args.outputs.background_color = [0, 0, 0]~
     - Inside source: true
     *** True Line Result
    -          if 2500 > (enemy.x - bullet.x + 30) ** 2 + (enemy.y - bullet.y + 30) ** 2
    -** Processing line: ~            # Increase player health by one for each enemy killed by a bullet after the first enemy, up to a maximum of 10 HP~
    +    args.outputs.background_color = [0, 0, 0]
    +** Processing line: ~    args.state.x ||= 640~
     - Inside source: true
     *** True Line Result
    -            # Increase player health by one for each enemy killed by a bullet after the first enemy, up to a maximum of 10 HP
    -** Processing line: ~            args.state.player[:health] += 1 if args.state.player[:health] < 10 && bullet[:kills] > 0~
    +    args.state.x ||= 640
    +** Processing line: ~    args.state.y ||= 360~
     - Inside source: true
     *** True Line Result
    -            args.state.player[:health] += 1 if args.state.player[:health] < 10 && bullet[:kills] > 0
    -** Processing line: ~            # Keep track of how many enemies have been killed by this particular bullet~
    +    args.state.y ||= 360
    +** Processing line: ~    args.state.stars ||= 100.map do~
     - Inside source: true
     *** True Line Result
    -            # Keep track of how many enemies have been killed by this particular bullet
    -** Processing line: ~            bullet[:kills]             += 1~
    +    args.state.stars ||= 100.map do
    +** Processing line: ~      [1280 * rand, 720 * rand, rand.fdiv(10), 255 * rand, 255 * rand, 255 * rand]~
     - Inside source: true
     *** True Line Result
    -            bullet[:kills]             += 1
    -** Processing line: ~            # Earn more points by killing multiple enemies with one shot.~
    +      [1280 * rand, 720 * rand, rand.fdiv(10), 255 * rand, 255 * rand, 255 * rand]
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -            # Earn more points by killing multiple enemies with one shot.
    -** Processing line: ~            args.state.player[:score]  += bullet[:kills]~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -            args.state.player[:score]  += bullet[:kills]
    -** Processing line: ~          end~
    +
    +** Processing line: ~    args.state.sun ||= args.state.new_entity(:sun) do |s|~
     - Inside source: true
     *** True Line Result
    -          end
    -** Processing line: ~        end~
    +    args.state.sun ||= args.state.new_entity(:sun) do |s|
    +** Processing line: ~      s.s = 100~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~      end~
    +      s.s = 100
    +** Processing line: ~      s.path = 'sprites/sun.png'~
     - Inside source: true
     *** True Line Result
    -      end
    +      s.path = 'sprites/sun.png'
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
         end
    -** Processing line: ~  end~
    -- Inside source: true
    -*** True Line Result
    -  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def move_enemies args~
    +** Processing line: ~    args.state.planets = [~
     - Inside source: true
     *** True Line Result
    -  def move_enemies args
    -** Processing line: ~    args.state.enemies.each do |enemy|~
    +    args.state.planets = [
    +** Processing line: ~      [:mercury,   65,  5,          88],~
     - Inside source: true
     *** True Line Result
    -    args.state.enemies.each do |enemy|
    -** Processing line: ~      # Get the angle from the enemy to the player~
    +      [:mercury,   65,  5,          88],
    +** Processing line: ~      [:venus,    100, 10,         225],~
     - Inside source: true
     *** True Line Result
    -      # Get the angle from the enemy to the player
    -** Processing line: ~      theta   = Math.atan2(enemy.y - args.state.player.y, enemy.x - args.state.player.x)~
    +      [:venus,    100, 10,         225],
    +** Processing line: ~      [:earth,    120, 10,         365],~
     - Inside source: true
     *** True Line Result
    -      theta   = Math.atan2(enemy.y - args.state.player.y, enemy.x - args.state.player.x)
    -** Processing line: ~      # Convert the angle to a vector pointing at the player~
    +      [:earth,    120, 10,         365],
    +** Processing line: ~      [:mars,     140,  8,         687],~
     - Inside source: true
     *** True Line Result
    -      # Convert the angle to a vector pointing at the player
    -** Processing line: ~      dx, dy  = theta.to_degrees.vector 5~
    +      [:mars,     140,  8,         687],
    +** Processing line: ~      [:jupiter,  280, 30, 365 *  11.8],~
     - Inside source: true
     *** True Line Result
    -      dx, dy  = theta.to_degrees.vector 5
    -** Processing line: ~      # Move the enemy towards thr player~
    +      [:jupiter,  280, 30, 365 *  11.8],
    +** Processing line: ~      [:saturn,   350, 20, 365 *  29.5],~
     - Inside source: true
     *** True Line Result
    -      # Move the enemy towards thr player
    -** Processing line: ~      enemy.x -= dx~
    +      [:saturn,   350, 20, 365 *  29.5],
    +** Processing line: ~      [:uranus,   400, 15, 365 *    84],~
     - Inside source: true
     *** True Line Result
    -      enemy.x -= dx
    -** Processing line: ~      enemy.y -= dy~
    +      [:uranus,   400, 15, 365 *    84],
    +** Processing line: ~      [:neptune,  440, 15, 365 * 164.8],~
     - Inside source: true
     *** True Line Result
    -      enemy.y -= dy
    -** Processing line: ~    end~
    +      [:neptune,  440, 15, 365 * 164.8],
    +** Processing line: ~      [:pluto,    480,  5, 365 * 247.8],~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~  end~
    +      [:pluto,    480,  5, 365 * 247.8],
    +** Processing line: ~    ].map do |name, distance, size, year_in_days|~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +    ].map do |name, distance, size, year_in_days|
    +** Processing line: ~      args.state.new_entity(name) do |p|~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def move_bullets args~
    +      args.state.new_entity(name) do |p|
    +** Processing line: ~        p.path = "sprites/#{name}.png"~
     - Inside source: true
     *** True Line Result
    -  def move_bullets args
    -** Processing line: ~    args.state.player_bullets.each do |bullet|~
    +        p.path = "sprites/#{name}.png"
    +** Processing line: ~        p.distance = distance * 0.7~
     - Inside source: true
     *** True Line Result
    -    args.state.player_bullets.each do |bullet|
    -** Processing line: ~      # Move the bullets according to the bullet's velocity~
    +        p.distance = distance * 0.7
    +** Processing line: ~        p.s = size * 0.7~
     - Inside source: true
     *** True Line Result
    -      # Move the bullets according to the bullet's velocity
    -** Processing line: ~      bullet.x += bullet[:vx]~
    +        p.s = size * 0.7
    +** Processing line: ~        p.year_in_days = year_in_days~
     - Inside source: true
     *** True Line Result
    -      bullet.x += bullet[:vx]
    -** Processing line: ~      bullet.y += bullet[:vy]~
    +        p.year_in_days = year_in_days
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -      bullet.y += bullet[:vy]
    +      end
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
         end
    -** Processing line: ~    args.state.player_bullets.reject! do |bullet|~
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    args.state.player_bullets.reject! do |bullet|
    -** Processing line: ~      # Despawn bullets that are outside the screen area~
    +
    +** Processing line: ~    args.state.ship ||= args.state.new_entity(:ship) do |s|~
     - Inside source: true
     *** True Line Result
    -      # Despawn bullets that are outside the screen area
    -** Processing line: ~      bullet.x < -20 || bullet.y < -20 || bullet.x > 1300 || bullet.y > 740~
    +    args.state.ship ||= args.state.new_entity(:ship) do |s|
    +** Processing line: ~      s.x = 1280 * rand~
     - Inside source: true
     *** True Line Result
    -      bullet.x < -20 || bullet.y < -20 || bullet.x > 1300 || bullet.y > 740
    +      s.x = 1280 * rand
    +** Processing line: ~      s.y = 720 * rand~
    +- Inside source: true
    +*** True Line Result
    +      s.y = 720 * rand
    +** Processing line: ~      s.angle = 0~
    +- Inside source: true
    +*** True Line Result
    +      s.angle = 0
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -97763,62 +99219,66 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def move_player args~
    +** Processing line: ~  def to_sprite args, entity~
     - Inside source: true
     *** True Line Result
    -  def move_player args
    -** Processing line: ~    # Get the currently held direction.~
    +  def to_sprite args, entity
    +** Processing line: ~    x = 0~
     - Inside source: true
     *** True Line Result
    -    # Get the currently held direction.
    -** Processing line: ~    dx, dy                 = move_directional_vector args~
    +    x = 0
    +** Processing line: ~    y = 0~
     - Inside source: true
     *** True Line Result
    -    dx, dy                 = move_directional_vector args
    -** Processing line: ~    # Take the weighted average of the old velocities and the desired velocities.~
    +    y = 0
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    # Take the weighted average of the old velocities and the desired velocities.
    -** Processing line: ~    # Since move_directional_vector returns values between -1 and 1,~
    +
    +** Processing line: ~    if entity.year_in_days~
     - Inside source: true
     *** True Line Result
    -    # Since move_directional_vector returns values between -1 and 1,
    -** Processing line: ~    #   and we want to limit the speed to 7.5, we multiply dx and dy by 7.5*0.1 to get 0.75~
    +    if entity.year_in_days
    +** Processing line: ~      day = args.state.tick_count~
     - Inside source: true
     *** True Line Result
    -    #   and we want to limit the speed to 7.5, we multiply dx and dy by 7.5*0.1 to get 0.75
    -** Processing line: ~    args.state.player[:vx] = args.state.player[:vx] * 0.9 + dx * 0.75~
    +      day = args.state.tick_count
    +** Processing line: ~      day_in_year = day % entity.year_in_days~
     - Inside source: true
     *** True Line Result
    -    args.state.player[:vx] = args.state.player[:vx] * 0.9 + dx * 0.75
    -** Processing line: ~    args.state.player[:vy] = args.state.player[:vy] * 0.9 + dy * 0.75~
    +      day_in_year = day % entity.year_in_days
    +** Processing line: ~      entity.random_start_day ||= day_in_year * rand~
     - Inside source: true
     *** True Line Result
    -    args.state.player[:vy] = args.state.player[:vy] * 0.9 + dy * 0.75
    -** Processing line: ~    # Move the player~
    +      entity.random_start_day ||= day_in_year * rand
    +** Processing line: ~      percentage_of_year = day_in_year.fdiv(entity.year_in_days)~
     - Inside source: true
     *** True Line Result
    -    # Move the player
    -** Processing line: ~    args.state.player.x    += args.state.player[:vx]~
    +      percentage_of_year = day_in_year.fdiv(entity.year_in_days)
    +** Processing line: ~      angle = 365 * percentage_of_year~
     - Inside source: true
     *** True Line Result
    -    args.state.player.x    += args.state.player[:vx]
    -** Processing line: ~    args.state.player.y    += args.state.player[:vy]~
    +      angle = 365 * percentage_of_year
    +** Processing line: ~      x = angle.vector_x(entity.distance)~
     - Inside source: true
     *** True Line Result
    -    args.state.player.y    += args.state.player[:vy]
    -** Processing line: ~    # If the player is about to go out of bounds, put them back in bounds.~
    +      x = angle.vector_x(entity.distance)
    +** Processing line: ~      y = angle.vector_y(entity.distance)~
     - Inside source: true
     *** True Line Result
    -    # If the player is about to go out of bounds, put them back in bounds.
    -** Processing line: ~    args.state.player.x    = args.state.player.x.clamp(0, 1201)~
    +      y = angle.vector_y(entity.distance)
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    args.state.player.x    = args.state.player.x.clamp(0, 1201)
    -** Processing line: ~    args.state.player.y    = args.state.player.y.clamp(0, 640)~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    args.state.player.y    = args.state.player.y.clamp(0, 640)
    +
    +** Processing line: ~    [640 + x - entity.s.half, 360 + y - entity.s.half, entity.s, entity.s, entity.path]~
    +- Inside source: true
    +*** True Line Result
    +    [640 + x - entity.s.half, 360 + y - entity.s.half, entity.s, entity.s, entity.path]
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -97827,210 +99287,206 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~~
    +** Processing line: ~  def render args~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def fire_player args~
    +  def render args
    +** Processing line: ~    args.outputs.solids << [0, 0, 1280, 720]~
     - Inside source: true
     *** True Line Result
    -  def fire_player args
    -** Processing line: ~    # Reduce the firing cooldown each tick~
    +    args.outputs.solids << [0, 0, 1280, 720]
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    # Reduce the firing cooldown each tick
    -** Processing line: ~    args.state.player[:cooldown] -= 1~
    +
    +** Processing line: ~    args.outputs.sprites << args.state.stars.map do |x, y, _, r, g, b|~
     - Inside source: true
     *** True Line Result
    -    args.state.player[:cooldown] -= 1
    -** Processing line: ~    # If the player is allowed to fire~
    +    args.outputs.sprites << args.state.stars.map do |x, y, _, r, g, b|
    +** Processing line: ~      [x, y, 10, 10, 'sprites/star.png', 0, 100, r, g, b]~
     - Inside source: true
     *** True Line Result
    -    # If the player is allowed to fire
    -** Processing line: ~    if args.state.player[:cooldown] <= 0~
    +      [x, y, 10, 10, 'sprites/star.png', 0, 100, r, g, b]
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    if args.state.player[:cooldown] <= 0
    -** Processing line: ~      dx, dy = shoot_directional_vector args # Get the bullet velocity~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      dx, dy = shoot_directional_vector args # Get the bullet velocity
    -** Processing line: ~      return if dx == 0 && dy == 0 # If the velocity is zero, the player doesn't want to fire. Therefore, we just return early.~
    +
    +** Processing line: ~    args.outputs.sprites << to_sprite(args, args.state.sun)~
     - Inside source: true
     *** True Line Result
    -      return if dx == 0 && dy == 0 # If the velocity is zero, the player doesn't want to fire. Therefore, we just return early.
    -** Processing line: ~      # Add a new bullet to the list of player bullets.~
    +    args.outputs.sprites << to_sprite(args, args.state.sun)
    +** Processing line: ~    args.outputs.sprites << args.state.planets.map { |p| to_sprite args, p }~
     - Inside source: true
     *** True Line Result
    -      # Add a new bullet to the list of player bullets.
    -** Processing line: ~      args.state.player_bullets << {~
    +    args.outputs.sprites << args.state.planets.map { |p| to_sprite args, p }
    +** Processing line: ~    args.outputs.sprites << [args.state.ship.x, args.state.ship.y, 20, 20, 'sprites/ship.png', args.state.ship.angle]~
     - Inside source: true
     *** True Line Result
    -      args.state.player_bullets << {
    -** Processing line: ~          x:     args.state.player.x + 30 + 40 * dx,~
    +    args.outputs.sprites << [args.state.ship.x, args.state.ship.y, 20, 20, 'sprites/ship.png', args.state.ship.angle]
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -          x:     args.state.player.x + 30 + 40 * dx,
    -** Processing line: ~          y:     args.state.player.y + 30 + 40 * dy,~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          y:     args.state.player.y + 30 + 40 * dy,
    -** Processing line: ~          w:     20, h: 20,~
    +
    +** Processing line: ~  def calc args~
     - Inside source: true
     *** True Line Result
    -          w:     20, h: 20,
    -** Processing line: ~          path:  'sprites/circle-white.png',~
    +  def calc args
    +** Processing line: ~    args.state.stars = args.state.stars.map do |x, y, speed, r, g, b|~
     - Inside source: true
     *** True Line Result
    -          path:  'sprites/circle-white.png',
    -** Processing line: ~          r:     0, g: 0, b: 0,~
    +    args.state.stars = args.state.stars.map do |x, y, speed, r, g, b|
    +** Processing line: ~      x += speed~
     - Inside source: true
     *** True Line Result
    -          r:     0, g: 0, b: 0,
    -** Processing line: ~          vx:    10 * dx + args.state.player[:vx] / 7.5, vy: 10 * dy + args.state.player[:vy] / 7.5, # Factor in a bit of the player's velocity~
    +      x += speed
    +** Processing line: ~      y += speed~
     - Inside source: true
     *** True Line Result
    -          vx:    10 * dx + args.state.player[:vx] / 7.5, vy: 10 * dy + args.state.player[:vy] / 7.5, # Factor in a bit of the player's velocity
    -** Processing line: ~          kills: 0~
    +      y += speed
    +** Processing line: ~      x = 0 if x > 1280~
     - Inside source: true
     *** True Line Result
    -          kills: 0
    -** Processing line: ~      }~
    +      x = 0 if x > 1280
    +** Processing line: ~      y = 0 if y > 720~
     - Inside source: true
     *** True Line Result
    -      }
    -** Processing line: ~      args.state.player[:cooldown] = 30 # Reset the cooldown~
    +      y = 0 if y > 720
    +** Processing line: ~      [x, y, speed, r, g, b]~
     - Inside source: true
     *** True Line Result
    -      args.state.player[:cooldown] = 30 # Reset the cooldown
    +      [x, y, speed, r, g, b]
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
         end
    -** Processing line: ~  end~
    -- Inside source: true
    -*** True Line Result
    -  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # Custom function for getting a directional vector just for movement using WASD~
    -- Inside source: true
    -*** True Line Result
    -  # Custom function for getting a directional vector just for movement using WASD
    -** Processing line: ~  def move_directional_vector args~
    +** Processing line: ~    if args.state.tick_count == 0~
     - Inside source: true
     *** True Line Result
    -  def move_directional_vector args
    -** Processing line: ~    dx = 0~
    +    if args.state.tick_count == 0
    +** Processing line: ~      args.outputs.sounds << 'sounds/bg.ogg'~
     - Inside source: true
     *** True Line Result
    -    dx = 0
    -** Processing line: ~    dx += 1 if args.inputs.keyboard.d~
    +      args.outputs.sounds << 'sounds/bg.ogg'
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    dx += 1 if args.inputs.keyboard.d
    -** Processing line: ~    dx -= 1 if args.inputs.keyboard.a~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    dx -= 1 if args.inputs.keyboard.a
    -** Processing line: ~    dy = 0~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    dy = 0
    -** Processing line: ~    dy += 1 if args.inputs.keyboard.w~
    +
    +** Processing line: ~  def process_inputs args~
     - Inside source: true
     *** True Line Result
    -    dy += 1 if args.inputs.keyboard.w
    -** Processing line: ~    dy -= 1 if args.inputs.keyboard.s~
    +  def process_inputs args
    +** Processing line: ~    if args.inputs.keyboard.left || args.inputs.controller_one.key_held.left~
     - Inside source: true
     *** True Line Result
    -    dy -= 1 if args.inputs.keyboard.s
    -** Processing line: ~    if dx != 0 && dy != 0~
    +    if args.inputs.keyboard.left || args.inputs.controller_one.key_held.left
    +** Processing line: ~      args.state.ship.angle += 1~
     - Inside source: true
     *** True Line Result
    -    if dx != 0 && dy != 0
    -** Processing line: ~      dx *= 0.7071~
    +      args.state.ship.angle += 1
    +** Processing line: ~    elsif args.inputs.keyboard.right || args.inputs.controller_one.key_held.right~
     - Inside source: true
     *** True Line Result
    -      dx *= 0.7071
    -** Processing line: ~      dy *= 0.7071~
    +    elsif args.inputs.keyboard.right || args.inputs.controller_one.key_held.right
    +** Processing line: ~      args.state.ship.angle -= 1~
     - Inside source: true
     *** True Line Result
    -      dy *= 0.7071
    +      args.state.ship.angle -= 1
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
         end
    -** Processing line: ~    [dx, dy]~
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    [dx, dy]
    -** Processing line: ~  end~
    +
    +** Processing line: ~    if args.inputs.keyboard.up || args.inputs.controller_one.key_held.a~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +    if args.inputs.keyboard.up || args.inputs.controller_one.key_held.a
    +** Processing line: ~      args.state.ship.x += args.state.ship.angle.x_vector~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  # Custom function for getting a directional vector just for shooting using the arrow keys~
    +      args.state.ship.x += args.state.ship.angle.x_vector
    +** Processing line: ~      args.state.ship.y += args.state.ship.angle.y_vector~
     - Inside source: true
     *** True Line Result
    -  # Custom function for getting a directional vector just for shooting using the arrow keys
    -** Processing line: ~  def shoot_directional_vector args~
    +      args.state.ship.y += args.state.ship.angle.y_vector
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  def shoot_directional_vector args
    -** Processing line: ~    dx = 0~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    dx = 0
    -** Processing line: ~    dx += 1 if args.inputs.keyboard.key_down.right || args.inputs.keyboard.key_held.right~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    dx += 1 if args.inputs.keyboard.key_down.right || args.inputs.keyboard.key_held.right
    -** Processing line: ~    dx -= 1 if args.inputs.keyboard.key_down.left || args.inputs.keyboard.key_held.left~
    +
    +** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
    -    dx -= 1 if args.inputs.keyboard.key_down.left || args.inputs.keyboard.key_held.left
    -** Processing line: ~    dy = 0~
    +  def tick args
    +** Processing line: ~    defaults args~
     - Inside source: true
     *** True Line Result
    -    dy = 0
    -** Processing line: ~    dy += 1 if args.inputs.keyboard.key_down.up || args.inputs.keyboard.key_held.up~
    +    defaults args
    +** Processing line: ~    render args~
     - Inside source: true
     *** True Line Result
    -    dy += 1 if args.inputs.keyboard.key_down.up || args.inputs.keyboard.key_held.up
    -** Processing line: ~    dy -= 1 if args.inputs.keyboard.key_down.down || args.inputs.keyboard.key_held.down~
    +    render args
    +** Processing line: ~    calc args~
     - Inside source: true
     *** True Line Result
    -    dy -= 1 if args.inputs.keyboard.key_down.down || args.inputs.keyboard.key_held.down
    -** Processing line: ~    if dx != 0 && dy != 0~
    +    calc args
    +** Processing line: ~    process_inputs args~
     - Inside source: true
     *** True Line Result
    -    if dx != 0 && dy != 0
    -** Processing line: ~      dx *= 0.7071~
    +    process_inputs args
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -      dx *= 0.7071
    -** Processing line: ~      dy *= 0.7071~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      dy *= 0.7071
    -** Processing line: ~    end~
    +
    +** Processing line: ~  def r~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~    [dx, dy]~
    +  def r
    +** Processing line: ~    $gtk.reset~
     - Inside source: true
     *** True Line Result
    -    [dx, dy]
    +    $gtk.reset
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
       end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
     ** Processing line: ~#+end_src~
     - Line was identified as the end of a code block.
     *** True Line Result
    @@ -98039,674 +99495,718 @@ Follows is a source code listing for all files that have been open sourced. This
     - End of paragraph detected.
     *** True Line Result
     
    -** Processing line: ~*** Crafting - Craft Game Starting Point - main.rb~
    +** Processing line: ~*** Arcade - Sound Golf - main.rb~
     - Header detected.
     *** True Line Result
     
     *** True Line Result
    -*** Crafting - Craft Game Starting Point - main.rb
    +*** Arcade - Sound Golf - main.rb
     ** Processing line: ~#+begin_src ruby~
     - Line was identified as the beginning of a code block.
     *** True Line Result
     
     *** True Line Result
     #+begin_src ruby
    -** Processing line: ~  # ./samples/99_genre_crafting/craft_game_starting_point/app/main.rb~
    +** Processing line: ~  # ./samples/99_genre_arcade/sound_golf/app/main.rb~
     - Inside source: true
     *** True Line Result
    -  # ./samples/99_genre_crafting/craft_game_starting_point/app/main.rb
    -** Processing line: ~  # ==================================================~
    +  # ./samples/99_genre_arcade/sound_golf/app/main.rb
    +** Processing line: ~  =begin~
     - Inside source: true
     *** True Line Result
    -  # ==================================================
    -** Processing line: ~  # A NOTE TO JAM CRAFT PARTICIPANTS:~
    +  =begin
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  # A NOTE TO JAM CRAFT PARTICIPANTS:
    -** Processing line: ~  # The comments and code in here are just as small piece of DragonRuby's capabilities.~
    +
    +** Processing line: ~   APIs Listing that haven't been encountered in previous sample apps:~
     - Inside source: true
     *** True Line Result
    -  # The comments and code in here are just as small piece of DragonRuby's capabilities.
    -** Processing line: ~  # Be sure to check out the rest of the sample apps. Start with README.txt and go from there!~
    +   APIs Listing that haven't been encountered in previous sample apps:
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  # Be sure to check out the rest of the sample apps. Start with README.txt and go from there!
    -** Processing line: ~  # ==================================================~
    +
    +** Processing line: ~   - sample: Chooses random element from array.~
     - Inside source: true
     *** True Line Result
    -  # ==================================================
    -** Processing line: ~~
    +   - sample: Chooses random element from array.
    +** Processing line: ~     In this sample app, the target note is set by taking a sample from the collection~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  # def tick args is the entry point into your game. This function is called at~
    +     In this sample app, the target note is set by taking a sample from the collection
    +** Processing line: ~     of available notes.~
     - Inside source: true
     *** True Line Result
    -  # def tick args is the entry point into your game. This function is called at
    -** Processing line: ~  # a fixed update time of 60hz (60 fps).~
    +     of available notes.
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  # a fixed update time of 60hz (60 fps).
    -** Processing line: ~  def tick args~
    +
    +** Processing line: ~   Reminders:~
     - Inside source: true
     *** True Line Result
    -  def tick args
    -** Processing line: ~    # The defaults function intitializes the game.~
    +   Reminders:
    +** Processing line: ~   - args.grid.(left|right|top|bottom): Pixel value for the boundaries of the virtual~
     - Inside source: true
     *** True Line Result
    -    # The defaults function intitializes the game.
    -** Processing line: ~    defaults args~
    +   - args.grid.(left|right|top|bottom): Pixel value for the boundaries of the virtual
    +** Processing line: ~     720 p screen (Dragon Ruby Game Toolkits's virtual resolution is always 1280x720).~
     - Inside source: true
     *** True Line Result
    -    defaults args
    +     720 p screen (Dragon Ruby Game Toolkits's virtual resolution is always 1280x720).
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # After the game is initialized, render it.~
    +** Processing line: ~   - args.state.new_entity: Used when we want to create a new object, like a sprite or button.~
     - Inside source: true
     *** True Line Result
    -    # After the game is initialized, render it.
    -** Processing line: ~    render args~
    +   - args.state.new_entity: Used when we want to create a new object, like a sprite or button.
    +** Processing line: ~     For example, if we want to create a new button, we would declare it as a new entity and~
     - Inside source: true
     *** True Line Result
    -    render args
    +     For example, if we want to create a new button, we would declare it as a new entity and
    +** Processing line: ~     then define its properties.~
    +- Inside source: true
    +*** True Line Result
    +     then define its properties.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # After rendering the player should be able to respond to input.~
    +** Processing line: ~   - String interpolation: Uses #{} syntax; everything between the #{ and the } is evaluated~
     - Inside source: true
     *** True Line Result
    -    # After rendering the player should be able to respond to input.
    -** Processing line: ~    input args~
    +   - String interpolation: Uses #{} syntax; everything between the #{ and the } is evaluated
    +** Processing line: ~     as Ruby code, and the placeholder is replaced with its corresponding value or result.~
     - Inside source: true
     *** True Line Result
    -    input args
    +     as Ruby code, and the placeholder is replaced with its corresponding value or result.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # After responding to input, the game performs any additional calculations.~
    +** Processing line: ~   - args.outputs.labels: An array. The values generate a label.~
     - Inside source: true
     *** True Line Result
    -    # After responding to input, the game performs any additional calculations.
    -** Processing line: ~    calc args~
    +   - args.outputs.labels: An array. The values generate a label.
    +** Processing line: ~     The parameters are [X, Y, TEXT, SIZE, ALIGNMENT, RED, GREEN, BLUE, ALPHA, FONT STYLE]~
     - Inside source: true
     *** True Line Result
    -    calc args
    -** Processing line: ~  end~
    +     The parameters are [X, Y, TEXT, SIZE, ALIGNMENT, RED, GREEN, BLUE, ALPHA, FONT STYLE]
    +** Processing line: ~     For more information about labels, go to mygame/documentation/02-labels.md.~
     - Inside source: true
     *** True Line Result
    -  end
    +     For more information about labels, go to mygame/documentation/02-labels.md.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def defaults args~
    -- Inside source: true
    -*** True Line Result
    -  def defaults args
    -** Processing line: ~    # hide the mouse cursor for this game, we are going to render our own cursor~
    -- Inside source: true
    -*** True Line Result
    -    # hide the mouse cursor for this game, we are going to render our own cursor
    -** Processing line: ~    if args.state.tick_count == 0~
    +** Processing line: ~   - find_all: Finds all elements from a collection that meet a certain requirements (and excludes the ones that don't).~
     - Inside source: true
     *** True Line Result
    -    if args.state.tick_count == 0
    -** Processing line: ~      args.gtk.hide_cursor~
    +   - find_all: Finds all elements from a collection that meet a certain requirements (and excludes the ones that don't).
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      args.gtk.hide_cursor
    -** Processing line: ~    end~
    +
    +** Processing line: ~   - first: Returns the first element of an array.~
     - Inside source: true
     *** True Line Result
    -    end
    +   - first: Returns the first element of an array.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    args.state.click_ripples ||= []~
    +** Processing line: ~   - inside_rect: Returns true or false depending on if the point is inside the rect.~
     - Inside source: true
     *** True Line Result
    -    args.state.click_ripples ||= []
    +   - inside_rect: Returns true or false depending on if the point is inside the rect.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # everything is on a 1280x720 virtual canvas, so you can~
    +** Processing line: ~   - to_sym: Returns symbol corresponding to string. Will create a symbol if it does~
     - Inside source: true
     *** True Line Result
    -    # everything is on a 1280x720 virtual canvas, so you can
    -** Processing line: ~    # hardcode locations~
    +   - to_sym: Returns symbol corresponding to string. Will create a symbol if it does
    +** Processing line: ~     not already exist.~
     - Inside source: true
     *** True Line Result
    -    # hardcode locations
    +     not already exist.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # define the borders for where the inventory is located~
    +** Processing line: ~  =end~
     - Inside source: true
     *** True Line Result
    -    # define the borders for where the inventory is located
    -** Processing line: ~    # args.state is a data structure that accepts any arbitrary parameters~
    +  =end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    # args.state is a data structure that accepts any arbitrary parameters
    -** Processing line: ~    # so you can create an object graph without having to create any classes.~
    +
    +** Processing line: ~  # This sample app allows users to test their musical skills by matching the piano sound that plays in each~
     - Inside source: true
     *** True Line Result
    -    # so you can create an object graph without having to create any classes.
    +  # This sample app allows users to test their musical skills by matching the piano sound that plays in each
    +** Processing line: ~  # level to the correct note.~
    +- Inside source: true
    +*** True Line Result
    +  # level to the correct note.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Bottom left is 0, 0. Top right is 1280, 720.~
    +** Processing line: ~  # Runs all the methods necessary for the game to function properly.~
     - Inside source: true
     *** True Line Result
    -    # Bottom left is 0, 0. Top right is 1280, 720.
    -** Processing line: ~    # The inventory area is at the top of the screen~
    +  # Runs all the methods necessary for the game to function properly.
    +** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
    -    # The inventory area is at the top of the screen
    -** Processing line: ~    # the number 80 is the size of all the sprites, so that is what is being~
    +  def tick args
    +** Processing line: ~    defaults args~
     - Inside source: true
     *** True Line Result
    -    # the number 80 is the size of all the sprites, so that is what is being
    -** Processing line: ~    # used to decide the with and height~
    +    defaults args
    +** Processing line: ~    render args~
     - Inside source: true
     *** True Line Result
    -    # used to decide the with and height
    -** Processing line: ~    args.state.sprite_size = 80~
    +    render args
    +** Processing line: ~    calc args~
     - Inside source: true
     *** True Line Result
    -    args.state.sprite_size = 80
    -** Processing line: ~~
    +    calc args
    +** Processing line: ~    input_mouse args~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    args.state.inventory_border.w  = args.state.sprite_size * 10~
    +    input_mouse args
    +** Processing line: ~    tick_instructions args, "Sample app shows how to play sounds. args.outputs.sounds << \"path_to_wav.wav\""~
     - Inside source: true
     *** True Line Result
    -    args.state.inventory_border.w  = args.state.sprite_size * 10
    -** Processing line: ~    args.state.inventory_border.h  = args.state.sprite_size * 3~
    +    tick_instructions args, "Sample app shows how to play sounds. args.outputs.sounds << \"path_to_wav.wav\""
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    args.state.inventory_border.h  = args.state.sprite_size * 3
    -** Processing line: ~    args.state.inventory_border.x  = 10~
    -- Inside source: true
    -*** True Line Result
    -    args.state.inventory_border.x  = 10
    -** Processing line: ~    args.state.inventory_border.y  = 710 - args.state.inventory_border.h~
    -- Inside source: true
    -*** True Line Result
    -    args.state.inventory_border.y  = 710 - args.state.inventory_border.h
    -** Processing line: ~~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # define the borders for where the crafting area is located~
    +** Processing line: ~  # Sets default values and creates empty collections~
     - Inside source: true
     *** True Line Result
    -    # define the borders for where the crafting area is located
    -** Processing line: ~    # the crafting area is below the inventory area~
    +  # Sets default values and creates empty collections
    +** Processing line: ~  # Initialization happens in the first frame only~
     - Inside source: true
     *** True Line Result
    -    # the crafting area is below the inventory area
    -** Processing line: ~    # the number 80 is the size of all the sprites, so that is what is being~
    +  # Initialization happens in the first frame only
    +** Processing line: ~  def defaults args~
     - Inside source: true
     *** True Line Result
    -    # the number 80 is the size of all the sprites, so that is what is being
    -** Processing line: ~    # used to decide the with and height~
    +  def defaults args
    +** Processing line: ~    args.state.notes ||= []~
     - Inside source: true
     *** True Line Result
    -    # used to decide the with and height
    -** Processing line: ~    args.state.craft_border.x =  10~
    +    args.state.notes ||= []
    +** Processing line: ~    args.state.click_feedbacks ||= []~
     - Inside source: true
     *** True Line Result
    -    args.state.craft_border.x =  10
    -** Processing line: ~    args.state.craft_border.y = 220~
    +    args.state.click_feedbacks ||= []
    +** Processing line: ~    args.state.current_level ||= 1~
     - Inside source: true
     *** True Line Result
    -    args.state.craft_border.y = 220
    -** Processing line: ~    args.state.craft_border.w = args.state.sprite_size * 3~
    +    args.state.current_level ||= 1
    +** Processing line: ~    args.state.times_wrong ||= 0 # when game starts, user hasn't guessed wrong yet~
     - Inside source: true
     *** True Line Result
    -    args.state.craft_border.w = args.state.sprite_size * 3
    -** Processing line: ~    args.state.craft_border.h = args.state.sprite_size * 3~
    +    args.state.times_wrong ||= 0 # when game starts, user hasn't guessed wrong yet
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    args.state.craft_border.h = args.state.sprite_size * 3
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # define the area where results are located~
    +** Processing line: ~  # Uses a label to display current level, and shows the score~
     - Inside source: true
     *** True Line Result
    -    # define the area where results are located
    -** Processing line: ~    # the crafting result is to the right of the craft area~
    +  # Uses a label to display current level, and shows the score
    +** Processing line: ~  # Creates a button to play the sample note, and displays the available notes that could be a potential match~
     - Inside source: true
     *** True Line Result
    -    # the crafting result is to the right of the craft area
    -** Processing line: ~    args.state.result_border.x =  10 + args.state.sprite_size * 3 + args.state.sprite_size~
    +  # Creates a button to play the sample note, and displays the available notes that could be a potential match
    +** Processing line: ~  def render args~
     - Inside source: true
     *** True Line Result
    -    args.state.result_border.x =  10 + args.state.sprite_size * 3 + args.state.sprite_size
    -** Processing line: ~    args.state.result_border.y = 220 + args.state.sprite_size~
    +  def render args
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    args.state.result_border.y = 220 + args.state.sprite_size
    -** Processing line: ~    args.state.result_border.w = args.state.sprite_size~
    +
    +** Processing line: ~    # grid.w_half positions the label in the horizontal center of the screen.~
     - Inside source: true
     *** True Line Result
    -    args.state.result_border.w = args.state.sprite_size
    -** Processing line: ~    args.state.result_border.h = args.state.sprite_size~
    +    # grid.w_half positions the label in the horizontal center of the screen.
    +** Processing line: ~    args.outputs.labels << [args.grid.w_half, args.grid.top.shift_down(40), "Hole #{args.state.current_level} of 9", 0, 1, 0, 0, 0]~
     - Inside source: true
     *** True Line Result
    -    args.state.result_border.h = args.state.sprite_size
    +    args.outputs.labels << [args.grid.w_half, args.grid.top.shift_down(40), "Hole #{args.state.current_level} of 9", 0, 1, 0, 0, 0]
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # initialize items for the first time if they are nil~
    +** Processing line: ~    render_score args # shows score on screen~
     - Inside source: true
     *** True Line Result
    -    # initialize items for the first time if they are nil
    -** Processing line: ~    # you start with 15 wood, 1 chest, and 5 plank~
    +    render_score args # shows score on screen
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    # you start with 15 wood, 1 chest, and 5 plank
    -** Processing line: ~    # Ruby has built in syntax for dictionaries (they look a lot like json objects).~
    +
    +** Processing line: ~    args.state.play_again_button ||= { x: 560, y: args.grid.h * 3 / 4 - 40, w: 160, h: 60, label: 'again' } # array definition, text/title~
     - Inside source: true
     *** True Line Result
    -    # Ruby has built in syntax for dictionaries (they look a lot like json objects).
    -** Processing line: ~    # Ruby also has a special type called a Symbol denoted with a : followed by a word.~
    +    args.state.play_again_button ||= { x: 560, y: args.grid.h * 3 / 4 - 40, w: 160, h: 60, label: 'again' } # array definition, text/title
    +** Processing line: ~    args.state.play_note_button ||= { x: 560, y: args.grid.h * 3 / 4 - 40, w: 160, h: 60, label: 'play' }~
     - Inside source: true
     *** True Line Result
    -    # Ruby also has a special type called a Symbol denoted with a : followed by a word.
    -** Processing line: ~    # Symbols are nice because they remove the need for magic strings.~
    +    args.state.play_note_button ||= { x: 560, y: args.grid.h * 3 / 4 - 40, w: 160, h: 60, label: 'play' }
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    # Symbols are nice because they remove the need for magic strings.
    -** Processing line: ~    if !args.state.items~
    +
    +** Processing line: ~    if args.state.game_over # if game is over, a "play again" button is shown~
     - Inside source: true
     *** True Line Result
    -    if !args.state.items
    -** Processing line: ~      args.state.items = [~
    +    if args.state.game_over # if game is over, a "play again" button is shown
    +** Processing line: ~      # Calculations ensure that Play Again label is displayed in center of border~
     - Inside source: true
     *** True Line Result
    -      args.state.items = [
    -** Processing line: ~        {~
    +      # Calculations ensure that Play Again label is displayed in center of border
    +** Processing line: ~      # Remove calculations from y parameters and see what happens to border and label placement~
     - Inside source: true
     *** True Line Result
    -        {
    -** Processing line: ~          id: :wood, # :wood is a Symbol, this is better than using "wood" for the id~
    +      # Remove calculations from y parameters and see what happens to border and label placement
    +** Processing line: ~      args.outputs.labels <<  [args.grid.w_half, args.grid.h * 3 / 4, "Play Again", 0, 1, 0, 0, 0] # outputs label~
     - Inside source: true
     *** True Line Result
    -          id: :wood, # :wood is a Symbol, this is better than using "wood" for the id
    -** Processing line: ~          quantity: 15,~
    +      args.outputs.labels <<  [args.grid.w_half, args.grid.h * 3 / 4, "Play Again", 0, 1, 0, 0, 0] # outputs label
    +** Processing line: ~      args.outputs.borders << args.state.play_again_button # outputs border~
     - Inside source: true
     *** True Line Result
    -          quantity: 15,
    -** Processing line: ~          path: 'sprites/wood.png',~
    +      args.outputs.borders << args.state.play_again_button # outputs border
    +** Processing line: ~    else # otherwise, if game is not over~
     - Inside source: true
     *** True Line Result
    -          path: 'sprites/wood.png',
    -** Processing line: ~          location: :inventory,~
    +    else # otherwise, if game is not over
    +** Processing line: ~      # Calculations ensure that label appears in center of border~
     - Inside source: true
     *** True Line Result
    -          location: :inventory,
    -** Processing line: ~          ordinal_x: 0, ordinal_y: 0~
    +      # Calculations ensure that label appears in center of border
    +** Processing line: ~      args.outputs.labels <<  [args.grid.w_half, args.grid.h * 3 / 4, "Play Note ##{args.state.current_level}", 0, 1, 0, 0, 0] # outputs label~
     - Inside source: true
     *** True Line Result
    -          ordinal_x: 0, ordinal_y: 0
    -** Processing line: ~        },~
    +      args.outputs.labels <<  [args.grid.w_half, args.grid.h * 3 / 4, "Play Note ##{args.state.current_level}", 0, 1, 0, 0, 0] # outputs label
    +** Processing line: ~      args.outputs.borders << args.state.play_note_button # outputs border~
     - Inside source: true
     *** True Line Result
    -        },
    -** Processing line: ~        {~
    +      args.outputs.borders << args.state.play_note_button # outputs border
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -        {
    -** Processing line: ~          id: :chest,~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          id: :chest,
    -** Processing line: ~          quantity: 1,~
    +
    +** Processing line: ~    return if args.state.game_over # return if game is over~
     - Inside source: true
     *** True Line Result
    -          quantity: 1,
    -** Processing line: ~          path: 'sprites/chest.png',~
    +    return if args.state.game_over # return if game is over
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          path: 'sprites/chest.png',
    -** Processing line: ~          location: :inventory,~
    +
    +** Processing line: ~    args.outputs.labels <<   [args.grid.w_half, 400, "I think the note is a(n)...",  0, 1, 0, 0, 0] # outputs label~
     - Inside source: true
     *** True Line Result
    -          location: :inventory,
    -** Processing line: ~          ordinal_x: 1, ordinal_y: 0~
    +    args.outputs.labels <<   [args.grid.w_half, 400, "I think the note is a(n)...",  0, 1, 0, 0, 0] # outputs label
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          ordinal_x: 1, ordinal_y: 0
    -** Processing line: ~        },~
    +
    +** Processing line: ~    # Shows all of the available notes that can be potential matches.~
     - Inside source: true
     *** True Line Result
    -        },
    -** Processing line: ~        {~
    +    # Shows all of the available notes that can be potential matches.
    +** Processing line: ~    available_notes.each_with_index do |note, i|~
     - Inside source: true
     *** True Line Result
    -        {
    -** Processing line: ~          id: :plank,~
    +    available_notes.each_with_index do |note, i|
    +** Processing line: ~      args.state.notes[i] ||= piano_button(args, note, i + 1) # calls piano_button method on each note (creates label and border)~
     - Inside source: true
     *** True Line Result
    -          id: :plank,
    -** Processing line: ~          quantity: 5,~
    +      args.state.notes[i] ||= piano_button(args, note, i + 1) # calls piano_button method on each note (creates label and border)
    +** Processing line: ~      args.outputs.labels <<   args.state.notes[i].label # outputs note on screen with a label and a border~
     - Inside source: true
     *** True Line Result
    -          quantity: 5,
    -** Processing line: ~          path: 'sprites/plank.png',~
    +      args.outputs.labels <<   args.state.notes[i].label # outputs note on screen with a label and a border
    +** Processing line: ~      args.outputs.borders <<  args.state.notes[i].border~
     - Inside source: true
     *** True Line Result
    -          path: 'sprites/plank.png',
    -** Processing line: ~          location: :inventory,~
    +      args.outputs.borders <<  args.state.notes[i].border
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -          location: :inventory,
    -** Processing line: ~          ordinal_x: 2, ordinal_y: 0~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          ordinal_x: 2, ordinal_y: 0
    -** Processing line: ~        },~
    +
    +** Processing line: ~    # Shows whether or not the user is correct by filling the screen with either red or green~
     - Inside source: true
     *** True Line Result
    -        },
    -** Processing line: ~      ]~
    +    # Shows whether or not the user is correct by filling the screen with either red or green
    +** Processing line: ~    args.outputs.solids << args.state.click_feedbacks.map { |c| c.solid }~
     - Inside source: true
     *** True Line Result
    -      ]
    +    args.outputs.solids << args.state.click_feedbacks.map { |c| c.solid }
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      # after initializing the oridinal positions, derive the pixel~
    +** Processing line: ~  # Shows the score (number of times the user guesses wrong) onto the screen using labels.~
     - Inside source: true
     *** True Line Result
    -      # after initializing the oridinal positions, derive the pixel
    -** Processing line: ~      # locations assuming that the width and height are 80~
    +  # Shows the score (number of times the user guesses wrong) onto the screen using labels.
    +** Processing line: ~  def render_score args~
     - Inside source: true
     *** True Line Result
    -      # locations assuming that the width and height are 80
    -** Processing line: ~      args.state.items.each { |item| set_inventory_position args, item }~
    +  def render_score args
    +** Processing line: ~    if args.state.times_wrong == 0 # if the user has guessed wrong zero times, the score is par~
     - Inside source: true
     *** True Line Result
    -      args.state.items.each { |item| set_inventory_position args, item }
    +    if args.state.times_wrong == 0 # if the user has guessed wrong zero times, the score is par
    +** Processing line: ~      args.outputs.labels << [args.grid.w_half, args.grid.top.shift_down(80), "Score: PAR", 0, 1, 0, 0, 0]~
    +- Inside source: true
    +*** True Line Result
    +      args.outputs.labels << [args.grid.w_half, args.grid.top.shift_down(80), "Score: PAR", 0, 1, 0, 0, 0]
    +** Processing line: ~    else # otherwise, number of times the user has guessed wrong is shown~
    +- Inside source: true
    +*** True Line Result
    +    else # otherwise, number of times the user has guessed wrong is shown
    +** Processing line: ~      args.outputs.labels << [args.grid.w_half, args.grid.top.shift_down(80), "Score: +#{args.state.times_wrong}", 0, 1, 0, 0, 0] # shows score using string interpolation~
    +- Inside source: true
    +*** True Line Result
    +      args.outputs.labels << [args.grid.w_half, args.grid.top.shift_down(80), "Score: +#{args.state.times_wrong}", 0, 1, 0, 0, 0] # shows score using string interpolation
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
         end
    -** Processing line: ~~
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # define all the oridinal positions of the inventory slots~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    # define all the oridinal positions of the inventory slots
    -** Processing line: ~    if !args.state.inventory_area~
    +
    +** Processing line: ~  # Sets the target note for the level and performs calculations on click_feedbacks.~
     - Inside source: true
     *** True Line Result
    -    if !args.state.inventory_area
    -** Processing line: ~      args.state.inventory_area = [~
    +  # Sets the target note for the level and performs calculations on click_feedbacks.
    +** Processing line: ~  def calc args~
     - Inside source: true
     *** True Line Result
    -      args.state.inventory_area = [
    -** Processing line: ~        { ordinal_x: 0,  ordinal_y: 0 },~
    +  def calc args
    +** Processing line: ~    args.state.target_note ||= available_notes.sample # chooses a note from available_notes collection as target note~
     - Inside source: true
     *** True Line Result
    -        { ordinal_x: 0,  ordinal_y: 0 },
    -** Processing line: ~        { ordinal_x: 1,  ordinal_y: 0 },~
    +    args.state.target_note ||= available_notes.sample # chooses a note from available_notes collection as target note
    +** Processing line: ~    args.state.click_feedbacks.each    { |c| c.solid[-1] -= 5 } # remove this line and solid color will remain on screen indefinitely~
     - Inside source: true
     *** True Line Result
    -        { ordinal_x: 1,  ordinal_y: 0 },
    -** Processing line: ~        { ordinal_x: 2,  ordinal_y: 0 },~
    +    args.state.click_feedbacks.each    { |c| c.solid[-1] -= 5 } # remove this line and solid color will remain on screen indefinitely
    +** Processing line: ~    # comment this line out and the solid color will keep flashing on screen instead of being removed from click_feedbacks collection~
     - Inside source: true
     *** True Line Result
    -        { ordinal_x: 2,  ordinal_y: 0 },
    -** Processing line: ~        { ordinal_x: 3,  ordinal_y: 0 },~
    +    # comment this line out and the solid color will keep flashing on screen instead of being removed from click_feedbacks collection
    +** Processing line: ~    args.state.click_feedbacks.reject! { |c| c.solid[-1] <= 0 }~
     - Inside source: true
     *** True Line Result
    -        { ordinal_x: 3,  ordinal_y: 0 },
    -** Processing line: ~        { ordinal_x: 4,  ordinal_y: 0 },~
    +    args.state.click_feedbacks.reject! { |c| c.solid[-1] <= 0 }
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -        { ordinal_x: 4,  ordinal_y: 0 },
    -** Processing line: ~        { ordinal_x: 5,  ordinal_y: 0 },~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        { ordinal_x: 5,  ordinal_y: 0 },
    -** Processing line: ~        { ordinal_x: 6,  ordinal_y: 0 },~
    +
    +** Processing line: ~  # Uses input from the user to play the target note, as well as the other notes that could be a potential match.~
     - Inside source: true
     *** True Line Result
    -        { ordinal_x: 6,  ordinal_y: 0 },
    -** Processing line: ~        { ordinal_x: 7,  ordinal_y: 0 },~
    +  # Uses input from the user to play the target note, as well as the other notes that could be a potential match.
    +** Processing line: ~  def input_mouse args~
     - Inside source: true
     *** True Line Result
    -        { ordinal_x: 7,  ordinal_y: 0 },
    -** Processing line: ~        { ordinal_x: 8,  ordinal_y: 0 },~
    +  def input_mouse args
    +** Processing line: ~    return unless args.inputs.mouse.click # return unless the mouse is clicked~
     - Inside source: true
     *** True Line Result
    -        { ordinal_x: 8,  ordinal_y: 0 },
    -** Processing line: ~        { ordinal_x: 9,  ordinal_y: 0 },~
    +    return unless args.inputs.mouse.click # return unless the mouse is clicked
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        { ordinal_x: 9,  ordinal_y: 0 },
    -** Processing line: ~        { ordinal_x: 0,  ordinal_y: 1 },~
    +
    +** Processing line: ~    # finds button that was clicked by user~
     - Inside source: true
     *** True Line Result
    -        { ordinal_x: 0,  ordinal_y: 1 },
    -** Processing line: ~        { ordinal_x: 1,  ordinal_y: 1 },~
    +    # finds button that was clicked by user
    +** Processing line: ~    button_clicked = args.outputs.borders.find_all do |b| # go through borders collection to find all borders that meet requirements~
     - Inside source: true
     *** True Line Result
    -        { ordinal_x: 1,  ordinal_y: 1 },
    -** Processing line: ~        { ordinal_x: 2,  ordinal_y: 1 },~
    +    button_clicked = args.outputs.borders.find_all do |b| # go through borders collection to find all borders that meet requirements
    +** Processing line: ~      args.inputs.mouse.click.point.inside_rect? b # find button border that mouse was clicked inside of~
     - Inside source: true
     *** True Line Result
    -        { ordinal_x: 2,  ordinal_y: 1 },
    -** Processing line: ~        { ordinal_x: 3,  ordinal_y: 1 },~
    +      args.inputs.mouse.click.point.inside_rect? b # find button border that mouse was clicked inside of
    +** Processing line: ~    end.find_all { |b| b.is_a? Hash }.first # reject, return first element~
     - Inside source: true
     *** True Line Result
    -        { ordinal_x: 3,  ordinal_y: 1 },
    -** Processing line: ~        { ordinal_x: 4,  ordinal_y: 1 },~
    +    end.find_all { |b| b.is_a? Hash }.first # reject, return first element
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        { ordinal_x: 4,  ordinal_y: 1 },
    -** Processing line: ~        { ordinal_x: 5,  ordinal_y: 1 },~
    +
    +** Processing line: ~    return unless button_clicked # return unless button_clicked as a value (a button was clicked)~
     - Inside source: true
     *** True Line Result
    -        { ordinal_x: 5,  ordinal_y: 1 },
    -** Processing line: ~        { ordinal_x: 6,  ordinal_y: 1 },~
    +    return unless button_clicked # return unless button_clicked as a value (a button was clicked)
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        { ordinal_x: 6,  ordinal_y: 1 },
    -** Processing line: ~        { ordinal_x: 7,  ordinal_y: 1 },~
    +
    +** Processing line: ~    queue_click_feedback args, # calls queue_click_feedback method on the button that was clicked~
     - Inside source: true
     *** True Line Result
    -        { ordinal_x: 7,  ordinal_y: 1 },
    -** Processing line: ~        { ordinal_x: 8,  ordinal_y: 1 },~
    +    queue_click_feedback args, # calls queue_click_feedback method on the button that was clicked
    +** Processing line: ~                         button_clicked.x,~
     - Inside source: true
     *** True Line Result
    -        { ordinal_x: 8,  ordinal_y: 1 },
    -** Processing line: ~        { ordinal_x: 9,  ordinal_y: 1 },~
    +                         button_clicked.x,
    +** Processing line: ~                         button_clicked.y,~
     - Inside source: true
     *** True Line Result
    -        { ordinal_x: 9,  ordinal_y: 1 },
    -** Processing line: ~        { ordinal_x: 0,  ordinal_y: 2 },~
    +                         button_clicked.y,
    +** Processing line: ~                         button_clicked.w,~
     - Inside source: true
     *** True Line Result
    -        { ordinal_x: 0,  ordinal_y: 2 },
    -** Processing line: ~        { ordinal_x: 1,  ordinal_y: 2 },~
    +                         button_clicked.w,
    +** Processing line: ~                         button_clicked.h,~
     - Inside source: true
     *** True Line Result
    -        { ordinal_x: 1,  ordinal_y: 2 },
    -** Processing line: ~        { ordinal_x: 2,  ordinal_y: 2 },~
    +                         button_clicked.h,
    +** Processing line: ~                         150, 100, 200 # sets color of button to shade of purple~
     - Inside source: true
     *** True Line Result
    -        { ordinal_x: 2,  ordinal_y: 2 },
    -** Processing line: ~        { ordinal_x: 3,  ordinal_y: 2 },~
    +                         150, 100, 200 # sets color of button to shade of purple
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        { ordinal_x: 3,  ordinal_y: 2 },
    -** Processing line: ~        { ordinal_x: 4,  ordinal_y: 2 },~
    +
    +** Processing line: ~    if button_clicked[:label] == 'play' # if "play note" button is pressed~
     - Inside source: true
     *** True Line Result
    -        { ordinal_x: 4,  ordinal_y: 2 },
    -** Processing line: ~        { ordinal_x: 5,  ordinal_y: 2 },~
    +    if button_clicked[:label] == 'play' # if "play note" button is pressed
    +** Processing line: ~      args.outputs.sounds << "sounds/#{args.state.target_note}.wav" # sound of target note is output~
     - Inside source: true
     *** True Line Result
    -        { ordinal_x: 5,  ordinal_y: 2 },
    -** Processing line: ~        { ordinal_x: 6,  ordinal_y: 2 },~
    +      args.outputs.sounds << "sounds/#{args.state.target_note}.wav" # sound of target note is output
    +** Processing line: ~    elsif button_clicked[:label] == 'again' # if "play game again" button is pressed~
     - Inside source: true
     *** True Line Result
    -        { ordinal_x: 6,  ordinal_y: 2 },
    -** Processing line: ~        { ordinal_x: 7,  ordinal_y: 2 },~
    +    elsif button_clicked[:label] == 'again' # if "play game again" button is pressed
    +** Processing line: ~      args.state.target_note = nil # no target note~
     - Inside source: true
     *** True Line Result
    -        { ordinal_x: 7,  ordinal_y: 2 },
    -** Processing line: ~        { ordinal_x: 8,  ordinal_y: 2 },~
    +      args.state.target_note = nil # no target note
    +** Processing line: ~      args.state.current_level = 1 # starts at level 1 again~
     - Inside source: true
     *** True Line Result
    -        { ordinal_x: 8,  ordinal_y: 2 },
    -** Processing line: ~        { ordinal_x: 9,  ordinal_y: 2 },~
    +      args.state.current_level = 1 # starts at level 1 again
    +** Processing line: ~      args.state.times_wrong = 0 # starts off with 0 wrong guesses~
     - Inside source: true
     *** True Line Result
    -        { ordinal_x: 9,  ordinal_y: 2 },
    -** Processing line: ~      ]~
    +      args.state.times_wrong = 0 # starts off with 0 wrong guesses
    +** Processing line: ~      args.state.game_over = false # the game is not over (because it has just been restarted)~
     - Inside source: true
     *** True Line Result
    -      ]
    -** Processing line: ~~
    +      args.state.game_over = false # the game is not over (because it has just been restarted)
    +** Processing line: ~    else # otherwise if neither of those buttons were pressed~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      # after initializing the oridinal positions, derive the pixel~
    +    else # otherwise if neither of those buttons were pressed
    +** Processing line: ~      args.outputs.sounds << "sounds/#{button_clicked[:label]}.wav" # sound of clicked note is played~
     - Inside source: true
     *** True Line Result
    -      # after initializing the oridinal positions, derive the pixel
    -** Processing line: ~      # locations assuming that the width and height are 80~
    +      args.outputs.sounds << "sounds/#{button_clicked[:label]}.wav" # sound of clicked note is played
    +** Processing line: ~      if button_clicked[:label] == args.state.target_note # if clicked note is target note~
     - Inside source: true
     *** True Line Result
    -      # locations assuming that the width and height are 80
    -** Processing line: ~      args.state.inventory_area.each { |i| set_inventory_position args, i }~
    +      if button_clicked[:label] == args.state.target_note # if clicked note is target note
    +** Processing line: ~        args.state.target_note = nil # target note is emptied~
     - Inside source: true
     *** True Line Result
    -      args.state.inventory_area.each { |i| set_inventory_position args, i }
    +        args.state.target_note = nil # target note is emptied
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      # if you want to see the result you can use the Ruby function called "puts".~
    +** Processing line: ~        if args.state.current_level < 9 # if game hasn't reached level 9~
     - Inside source: true
     *** True Line Result
    -      # if you want to see the result you can use the Ruby function called "puts".
    -** Processing line: ~      # Uncomment this line to see the value.~
    +        if args.state.current_level < 9 # if game hasn't reached level 9
    +** Processing line: ~          args.state.current_level += 1 # game goes to next level~
     - Inside source: true
     *** True Line Result
    -      # Uncomment this line to see the value.
    -** Processing line: ~      # puts args.state.inventory_area~
    +          args.state.current_level += 1 # game goes to next level
    +** Processing line: ~        else # otherwise, if game has reached level 9~
     - Inside source: true
     *** True Line Result
    -      # puts args.state.inventory_area
    +        else # otherwise, if game has reached level 9
    +** Processing line: ~          args.state.game_over = true # the game is over~
    +- Inside source: true
    +*** True Line Result
    +          args.state.game_over = true # the game is over
    +** Processing line: ~        end~
    +- Inside source: true
    +*** True Line Result
    +        end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      # You can see all things written via puts in DragonRuby's Console, or under logs/log.txt.~
    +** Processing line: ~        queue_click_feedback args, 0, 0, args.grid.w, args.grid.h, 100, 200, 100 # green shown if user guesses correctly~
     - Inside source: true
     *** True Line Result
    -      # You can see all things written via puts in DragonRuby's Console, or under logs/log.txt.
    -** Processing line: ~      # To bring up DragonRuby's Console, press the ~ key within the game.~
    +        queue_click_feedback args, 0, 0, args.grid.w, args.grid.h, 100, 200, 100 # green shown if user guesses correctly
    +** Processing line: ~      else # otherwise, if clicked note is not target note~
     - Inside source: true
     *** True Line Result
    -      # To bring up DragonRuby's Console, press the ~ key within the game.
    +      else # otherwise, if clicked note is not target note
    +** Processing line: ~        args.state.times_wrong += 1 # increments times user guessed wrong~
    +- Inside source: true
    +*** True Line Result
    +        args.state.times_wrong += 1 # increments times user guessed wrong
    +** Processing line: ~        queue_click_feedback args, 0, 0, args.grid.w, args.grid.h, 200, 100, 100 # red shown is user guesses wrong~
    +- Inside source: true
    +*** True Line Result
    +        queue_click_feedback args, 0, 0, args.grid.w, args.grid.h, 200, 100, 100 # red shown is user guesses wrong
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
         end
    -** Processing line: ~~
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # define all the oridinal positions of the craft slots~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    # define all the oridinal positions of the craft slots
    -** Processing line: ~    if !args.state.craft_area~
    +
    +** Processing line: ~  # Creates a collection of all of the available notes as symbols~
     - Inside source: true
     *** True Line Result
    -    if !args.state.craft_area
    -** Processing line: ~      args.state.craft_area = [~
    +  # Creates a collection of all of the available notes as symbols
    +** Processing line: ~  def available_notes~
     - Inside source: true
     *** True Line Result
    -      args.state.craft_area = [
    -** Processing line: ~        { ordinal_x: 0, ordinal_y: 0 },~
    +  def available_notes
    +** Processing line: ~    [:C3, :D3, :E3, :F3, :G3, :A3, :B3, :C4]~
     - Inside source: true
     *** True Line Result
    -        { ordinal_x: 0, ordinal_y: 0 },
    -** Processing line: ~        { ordinal_x: 0, ordinal_y: 1 },~
    +    [:C3, :D3, :E3, :F3, :G3, :A3, :B3, :C4]
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -        { ordinal_x: 0, ordinal_y: 1 },
    -** Processing line: ~        { ordinal_x: 0, ordinal_y: 2 },~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        { ordinal_x: 0, ordinal_y: 2 },
    -** Processing line: ~        { ordinal_x: 1, ordinal_y: 0 },~
    +
    +** Processing line: ~  # Creates buttons for each note, and sets a label (the note's name) and border for each note's button.~
     - Inside source: true
     *** True Line Result
    -        { ordinal_x: 1, ordinal_y: 0 },
    -** Processing line: ~        { ordinal_x: 1, ordinal_y: 1 },~
    +  # Creates buttons for each note, and sets a label (the note's name) and border for each note's button.
    +** Processing line: ~  def piano_button args, note, position~
     - Inside source: true
     *** True Line Result
    -        { ordinal_x: 1, ordinal_y: 1 },
    -** Processing line: ~        { ordinal_x: 1, ordinal_y: 2 },~
    +  def piano_button args, note, position
    +** Processing line: ~    args.state.new_entity(:button) do |b| # declares button as new entity~
     - Inside source: true
     *** True Line Result
    -        { ordinal_x: 1, ordinal_y: 2 },
    -** Processing line: ~        { ordinal_x: 2, ordinal_y: 0 },~
    +    args.state.new_entity(:button) do |b| # declares button as new entity
    +** Processing line: ~      b.label  =  [460 + 40.mult(position), args.grid.h * 0.4, "#{note}", 0, 1, 0, 0, 0] # label definition~
     - Inside source: true
     *** True Line Result
    -        { ordinal_x: 2, ordinal_y: 0 },
    -** Processing line: ~        { ordinal_x: 2, ordinal_y: 1 },~
    +      b.label  =  [460 + 40.mult(position), args.grid.h * 0.4, "#{note}", 0, 1, 0, 0, 0] # label definition
    +** Processing line: ~      b.border =  { x: 460 + 40.mult(position) - 20, y: args.grid.h * 0.4 - 32, w: 40, h: 40, label: note } # border definition, text/title; 20 subtracted so label is in center of border~
     - Inside source: true
     *** True Line Result
    -        { ordinal_x: 2, ordinal_y: 1 },
    -** Processing line: ~        { ordinal_x: 2, ordinal_y: 2 },~
    +      b.border =  { x: 460 + 40.mult(position) - 20, y: args.grid.h * 0.4 - 32, w: 40, h: 40, label: note } # border definition, text/title; 20 subtracted so label is in center of border
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -        { ordinal_x: 2, ordinal_y: 2 },
    -** Processing line: ~      ]~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -      ]
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      # after initializing the oridinal positions, derive the pixel~
    +** Processing line: ~  # Color of click feedback changes depending on what button was clicked, and whether the guess is right or wrong~
     - Inside source: true
     *** True Line Result
    -      # after initializing the oridinal positions, derive the pixel
    -** Processing line: ~      # locations assuming that the width and height are 80~
    +  # Color of click feedback changes depending on what button was clicked, and whether the guess is right or wrong
    +** Processing line: ~  # If a button is clicked, the inside of button is purple (see input_mouse method)~
     - Inside source: true
     *** True Line Result
    -      # locations assuming that the width and height are 80
    -** Processing line: ~      args.state.craft_area.each { |c| set_craft_position args, c }~
    +  # If a button is clicked, the inside of button is purple (see input_mouse method)
    +** Processing line: ~  # If correct note is clicked, screen turns green~
     - Inside source: true
     *** True Line Result
    -      args.state.craft_area.each { |c| set_craft_position args, c }
    +  # If correct note is clicked, screen turns green
    +** Processing line: ~  # If incorrect note is clicked, screen turns red (again, see input_mouse method)~
    +- Inside source: true
    +*** True Line Result
    +  # If incorrect note is clicked, screen turns red (again, see input_mouse method)
    +** Processing line: ~  def queue_click_feedback args, x, y, w, h, *color~
    +- Inside source: true
    +*** True Line Result
    +  def queue_click_feedback args, x, y, w, h, *color
    +** Processing line: ~    args.state.click_feedbacks << args.state.new_entity(:click_feedback) do |c| # declares feedback as new entity~
    +- Inside source: true
    +*** True Line Result
    +    args.state.click_feedbacks << args.state.new_entity(:click_feedback) do |c| # declares feedback as new entity
    +** Processing line: ~      c.solid =  [x, y, w, h, *color, 255] # sets color~
    +- Inside source: true
    +*** True Line Result
    +      c.solid =  [x, y, w, h, *color, 255] # sets color
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -98719,202 +100219,230 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~~
    +** Processing line: ~  def tick_instructions args, text, y = 715~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def render args~
    +  def tick_instructions args, text, y = 715
    +** Processing line: ~    return if args.state.key_event_occurred~
     - Inside source: true
     *** True Line Result
    -  def render args
    -** Processing line: ~    # for the results area, create a sprite that show its boundaries~
    +    return if args.state.key_event_occurred
    +** Processing line: ~    if args.inputs.mouse.click ||~
     - Inside source: true
     *** True Line Result
    -    # for the results area, create a sprite that show its boundaries
    -** Processing line: ~    args.outputs.primitives << { x: args.state.result_border.x,~
    +    if args.inputs.mouse.click ||
    +** Processing line: ~       args.inputs.keyboard.directional_vector ||~
     - Inside source: true
     *** True Line Result
    -    args.outputs.primitives << { x: args.state.result_border.x,
    -** Processing line: ~                                 y: args.state.result_border.y,~
    +       args.inputs.keyboard.directional_vector ||
    +** Processing line: ~       args.inputs.keyboard.key_down.enter ||~
     - Inside source: true
     *** True Line Result
    -                                 y: args.state.result_border.y,
    -** Processing line: ~                                 w: args.state.result_border.w,~
    +       args.inputs.keyboard.key_down.enter ||
    +** Processing line: ~       args.inputs.keyboard.key_down.escape~
     - Inside source: true
     *** True Line Result
    -                                 w: args.state.result_border.w,
    -** Processing line: ~                                 h: args.state.result_border.h,~
    +       args.inputs.keyboard.key_down.escape
    +** Processing line: ~      args.state.key_event_occurred = true~
     - Inside source: true
     *** True Line Result
    -                                 h: args.state.result_border.h,
    -** Processing line: ~                                 path: 'sprites/border-black.png' }~
    +      args.state.key_event_occurred = true
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -                                 path: 'sprites/border-black.png' }
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # for each inventory spot, create a sprite~
    +** Processing line: ~    args.outputs.debug << [0, y - 50, 1280, 60].solid~
     - Inside source: true
     *** True Line Result
    -    # for each inventory spot, create a sprite
    -** Processing line: ~    # args.outputs.primitives is how DragonRuby performs a render.~
    +    args.outputs.debug << [0, y - 50, 1280, 60].solid
    +** Processing line: ~    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label~
     - Inside source: true
     *** True Line Result
    -    # args.outputs.primitives is how DragonRuby performs a render.
    -** Processing line: ~    # Adding a single hash or multiple hashes to this array will tell~
    +    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label
    +** Processing line: ~    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label~
     - Inside source: true
     *** True Line Result
    -    # Adding a single hash or multiple hashes to this array will tell
    -** Processing line: ~    # DragonRuby to render those primitives on that frame.~
    +    args.outputs.debug << [640, y - 25, "(click to dismiss instructions)" , -2, 1, 255, 255, 255].label
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    # DragonRuby to render those primitives on that frame.
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # The .map function on Array is used instead of any kind of looping.~
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
    +*** True Line Result
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +
    +** Processing line: ~*** Arcade - Twinstick - main.rb~
    +- Header detected.
    +*** True Line Result
    +
    +*** True Line Result
    +*** Arcade - Twinstick - main.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/99_genre_arcade/twinstick/app/main.rb~
     - Inside source: true
     *** True Line Result
    -    # The .map function on Array is used instead of any kind of looping.
    -** Processing line: ~    # .map returns a new object for every object within an Array.~
    +  # ./samples/99_genre_arcade/twinstick/app/main.rb
    +** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
    -    # .map returns a new object for every object within an Array.
    -** Processing line: ~    args.outputs.primitives << args.state.inventory_area.map do |a|~
    +  def tick args
    +** Processing line: ~    args.state.player         ||= {x: 600, y: 320, w: 80, h: 80, path: 'sprites/circle-white.png', vx: 0, vy: 0, health: 10, cooldown: 0, score: 0}~
     - Inside source: true
     *** True Line Result
    -    args.outputs.primitives << args.state.inventory_area.map do |a|
    -** Processing line: ~      { x: a.x, y: a.y, w: a.w, h: a.h, path: 'sprites/border-black.png' }~
    +    args.state.player         ||= {x: 600, y: 320, w: 80, h: 80, path: 'sprites/circle-white.png', vx: 0, vy: 0, health: 10, cooldown: 0, score: 0}
    +** Processing line: ~    args.state.enemies        ||= []~
     - Inside source: true
     *** True Line Result
    -      { x: a.x, y: a.y, w: a.w, h: a.h, path: 'sprites/border-black.png' }
    -** Processing line: ~    end~
    +    args.state.enemies        ||= []
    +** Processing line: ~    args.state.player_bullets ||= []~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +    args.state.player_bullets ||= []
    +** Processing line: ~    args.state.tick_count     ||= -1~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # for each craft spot, create a sprite~
    +    args.state.tick_count     ||= -1
    +** Processing line: ~    args.state.tick_count     += 1~
     - Inside source: true
     *** True Line Result
    -    # for each craft spot, create a sprite
    -** Processing line: ~    args.outputs.primitives << args.state.craft_area.map do |a|~
    +    args.state.tick_count     += 1
    +** Processing line: ~    spawn_enemies args~
     - Inside source: true
     *** True Line Result
    -    args.outputs.primitives << args.state.craft_area.map do |a|
    -** Processing line: ~      { x: a.x, y: a.y, w: a.w, h: a.h, path: 'sprites/border-black.png' }~
    +    spawn_enemies args
    +** Processing line: ~    kill_enemies args~
     - Inside source: true
     *** True Line Result
    -      { x: a.x, y: a.y, w: a.w, h: a.h, path: 'sprites/border-black.png' }
    -** Processing line: ~    end~
    +    kill_enemies args
    +** Processing line: ~    move_enemies args~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +    move_enemies args
    +** Processing line: ~    move_bullets args~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # after the borders have been rendered, render the~
    +    move_bullets args
    +** Processing line: ~    move_player args~
     - Inside source: true
     *** True Line Result
    -    # after the borders have been rendered, render the
    -** Processing line: ~    # items within those slots (and allow for highlighting)~
    +    move_player args
    +** Processing line: ~    fire_player args~
     - Inside source: true
     *** True Line Result
    -    # items within those slots (and allow for highlighting)
    -** Processing line: ~    # if an item isn't currently being held~
    +    fire_player args
    +** Processing line: ~    args.state.player[:r] = args.state.player[:g] = args.state.player[:b] = (args.state.player[:health] * 25.5).clamp(0, 255)~
     - Inside source: true
     *** True Line Result
    -    # if an item isn't currently being held
    -** Processing line: ~    allow_inventory_highlighting = !args.state.held_item~
    +    args.state.player[:r] = args.state.player[:g] = args.state.player[:b] = (args.state.player[:health] * 25.5).clamp(0, 255)
    +** Processing line: ~    label_color           = args.state.player[:health] <= 5 ? 255 : 0~
     - Inside source: true
     *** True Line Result
    -    allow_inventory_highlighting = !args.state.held_item
    -** Processing line: ~~
    +    label_color           = args.state.player[:health] <= 5 ? 255 : 0
    +** Processing line: ~    args.outputs.labels << [~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # go through each item and render them~
    +    args.outputs.labels << [
    +** Processing line: ~        {~
     - Inside source: true
     *** True Line Result
    -    # go through each item and render them
    -** Processing line: ~    # use Array's find_all method to remove any items that are currently being held~
    +        {
    +** Processing line: ~            x: args.state.player.x + 40, y: args.state.player.y + 60, alignment_enum: 1, text: "#{args.state.player[:health]} HP",~
     - Inside source: true
     *** True Line Result
    -    # use Array's find_all method to remove any items that are currently being held
    -** Processing line: ~    args.state.items.find_all { |item| item[:location] != :held }.map do |item|~
    +            x: args.state.player.x + 40, y: args.state.player.y + 60, alignment_enum: 1, text: "#{args.state.player[:health]} HP",
    +** Processing line: ~            r: label_color, g: label_color, b: label_color~
     - Inside source: true
     *** True Line Result
    -    args.state.items.find_all { |item| item[:location] != :held }.map do |item|
    -** Processing line: ~      # if an item is currently being held, don't render it in it's spot within the~
    +            r: label_color, g: label_color, b: label_color
    +** Processing line: ~        }, {~
     - Inside source: true
     *** True Line Result
    -      # if an item is currently being held, don't render it in it's spot within the
    -** Processing line: ~      # inventory or craft area (this is handled via the find_all method).~
    +        }, {
    +** Processing line: ~            x: args.state.player.x + 40, y: args.state.player.y + 40, alignment_enum: 1, text: "#{args.state.player[:score]} PTS",~
     - Inside source: true
     *** True Line Result
    -      # inventory or craft area (this is handled via the find_all method).
    -** Processing line: ~~
    +            x: args.state.player.x + 40, y: args.state.player.y + 40, alignment_enum: 1, text: "#{args.state.player[:score]} PTS",
    +** Processing line: ~            r: label_color, g: label_color, b: label_color, size_enum: 2 - args.state.player[:score].to_s.length,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      # the item_prefab returns a hash containing all the visual components of an item.~
    +            r: label_color, g: label_color, b: label_color, size_enum: 2 - args.state.player[:score].to_s.length,
    +** Processing line: ~        }~
     - Inside source: true
     *** True Line Result
    -      # the item_prefab returns a hash containing all the visual components of an item.
    -** Processing line: ~      # the main sprite, the black background, the quantity text, and a hover indication~
    +        }
    +** Processing line: ~    ]~
     - Inside source: true
     *** True Line Result
    -      # the main sprite, the black background, the quantity text, and a hover indication
    -** Processing line: ~      # if the mouse is currently hovering over the item.~
    +    ]
    +** Processing line: ~    args.outputs.sprites << [args.state.player, args.state.enemies, args.state.player_bullets]~
     - Inside source: true
     *** True Line Result
    -      # if the mouse is currently hovering over the item.
    -** Processing line: ~      args.outputs.primitives << item_prefab(args, item, allow_inventory_highlighting, args.inputs.mouse)~
    +    args.outputs.sprites << [args.state.player, args.state.enemies, args.state.player_bullets]
    +** Processing line: ~    args.state.clear! if args.state.player[:health] < 0 # Reset the game if the player's health drops below zero~
     - Inside source: true
     *** True Line Result
    -      args.outputs.primitives << item_prefab(args, item, allow_inventory_highlighting, args.inputs.mouse)
    -** Processing line: ~    end~
    +    args.state.clear! if args.state.player[:health] < 0 # Reset the game if the player's health drops below zero
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    end
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # The last thing we want to render is the item currently being held.~
    +** Processing line: ~  def spawn_enemies args~
     - Inside source: true
     *** True Line Result
    -    # The last thing we want to render is the item currently being held.
    -** Processing line: ~    args.outputs.primitives << item_prefab(args, args.state.held_item, allow_inventory_highlighting, args.inputs.mouse)~
    +  def spawn_enemies args
    +** Processing line: ~    # Spawn enemies more frequently as the player's score increases.~
     - Inside source: true
     *** True Line Result
    -    args.outputs.primitives << item_prefab(args, args.state.held_item, allow_inventory_highlighting, args.inputs.mouse)
    -** Processing line: ~~
    +    # Spawn enemies more frequently as the player's score increases.
    +** Processing line: ~    if rand < (100+args.state.player[:score])/(10000 + args.state.player[:score]) || args.state.tick_count.zero?~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    args.outputs.primitives << args.state.click_ripples~
    +    if rand < (100+args.state.player[:score])/(10000 + args.state.player[:score]) || args.state.tick_count.zero?
    +** Processing line: ~      theta = rand * Math::PI * 2~
     - Inside source: true
     *** True Line Result
    -    args.outputs.primitives << args.state.click_ripples
    -** Processing line: ~~
    +      theta = rand * Math::PI * 2
    +** Processing line: ~      args.state.enemies << {~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # render a mouse cursor since we have the OS cursor hidden~
    +      args.state.enemies << {
    +** Processing line: ~          x: 600 + Math.cos(theta) * 800, y: 320 + Math.sin(theta) * 800, w: 80, h: 80, path: 'sprites/circle-white.png',~
     - Inside source: true
     *** True Line Result
    -    # render a mouse cursor since we have the OS cursor hidden
    -** Processing line: ~    args.outputs.primitives << { x: args.inputs.mouse.x - 5, y: args.inputs.mouse.y - 5, w: 10, h: 10, path: 'sprites/circle-gray.png', a: 128 }~
    +          x: 600 + Math.cos(theta) * 800, y: 320 + Math.sin(theta) * 800, w: 80, h: 80, path: 'sprites/circle-white.png',
    +** Processing line: ~          r: (256 * rand).floor, g: (256 * rand).floor, b: (256 * rand).floor~
     - Inside source: true
     *** True Line Result
    -    args.outputs.primitives << { x: args.inputs.mouse.x - 5, y: args.inputs.mouse.y - 5, w: 10, h: 10, path: 'sprites/circle-gray.png', a: 128 }
    +          r: (256 * rand).floor, g: (256 * rand).floor, b: (256 * rand).floor
    +** Processing line: ~      }~
    +- Inside source: true
    +*** True Line Result
    +      }
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -98923,554 +100451,586 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # Alrighty! This is where all the fun happens~
    +** Processing line: ~  def kill_enemies args~
     - Inside source: true
     *** True Line Result
    -  # Alrighty! This is where all the fun happens
    -** Processing line: ~  def input args~
    +  def kill_enemies args
    +** Processing line: ~    args.state.enemies.reject! do |enemy|~
     - Inside source: true
     *** True Line Result
    -  def input args
    -** Processing line: ~    # if the mouse is clicked and not item is currently being held~
    +    args.state.enemies.reject! do |enemy|
    +** Processing line: ~      # Check if enemy and player are within 80 pixels of each other (i.e. overlapping)~
     - Inside source: true
     *** True Line Result
    -    # if the mouse is clicked and not item is currently being held
    -** Processing line: ~    # args.state.held_item is nil when the game starts.~
    +      # Check if enemy and player are within 80 pixels of each other (i.e. overlapping)
    +** Processing line: ~      if 6400 > (enemy.x - args.state.player.x) ** 2 + (enemy.y - args.state.player.y) ** 2~
     - Inside source: true
     *** True Line Result
    -    # args.state.held_item is nil when the game starts.
    -** Processing line: ~    # If the player clicks, the property args.inputs.mouse.click will~
    +      if 6400 > (enemy.x - args.state.player.x) ** 2 + (enemy.y - args.state.player.y) ** 2
    +** Processing line: ~        # Enemy is touching player. Kill enemy, and reduce player HP by 1.~
     - Inside source: true
     *** True Line Result
    -    # If the player clicks, the property args.inputs.mouse.click will
    -** Processing line: ~    # be a non nil value, we don't want to process any of the code here~
    +        # Enemy is touching player. Kill enemy, and reduce player HP by 1.
    +** Processing line: ~        args.state.player[:health] -= 1~
     - Inside source: true
     *** True Line Result
    -    # be a non nil value, we don't want to process any of the code here
    -** Processing line: ~    # if the mouse hasn't been clicked~
    +        args.state.player[:health] -= 1
    +** Processing line: ~      else~
     - Inside source: true
     *** True Line Result
    -    # if the mouse hasn't been clicked
    -** Processing line: ~    return if !args.inputs.mouse.click~
    +      else
    +** Processing line: ~        args.state.player_bullets.any? do |bullet|~
     - Inside source: true
     *** True Line Result
    -    return if !args.inputs.mouse.click
    -** Processing line: ~~
    +        args.state.player_bullets.any? do |bullet|
    +** Processing line: ~          # Check if enemy and bullet are within 50 pixels of each other (i.e. overlapping)~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # if a click occurred, add a ripple to the ripple queue~
    +          # Check if enemy and bullet are within 50 pixels of each other (i.e. overlapping)
    +** Processing line: ~          if 2500 > (enemy.x - bullet.x + 30) ** 2 + (enemy.y - bullet.y + 30) ** 2~
     - Inside source: true
     *** True Line Result
    -    # if a click occurred, add a ripple to the ripple queue
    -** Processing line: ~    args.state.click_ripples << { x: args.inputs.mouse.x - 5, y: args.inputs.mouse.y - 5, w: 10, h: 10, path: 'sprites/circle-gray.png', a: 128 }~
    +          if 2500 > (enemy.x - bullet.x + 30) ** 2 + (enemy.y - bullet.y + 30) ** 2
    +** Processing line: ~            # Increase player health by one for each enemy killed by a bullet after the first enemy, up to a maximum of 10 HP~
     - Inside source: true
     *** True Line Result
    -    args.state.click_ripples << { x: args.inputs.mouse.x - 5, y: args.inputs.mouse.y - 5, w: 10, h: 10, path: 'sprites/circle-gray.png', a: 128 }
    -** Processing line: ~~
    +            # Increase player health by one for each enemy killed by a bullet after the first enemy, up to a maximum of 10 HP
    +** Processing line: ~            args.state.player[:health] += 1 if args.state.player[:health] < 10 && bullet[:kills] > 0~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # if the mouse has been clicked, and no item is currently held...~
    +            args.state.player[:health] += 1 if args.state.player[:health] < 10 && bullet[:kills] > 0
    +** Processing line: ~            # Keep track of how many enemies have been killed by this particular bullet~
     - Inside source: true
     *** True Line Result
    -    # if the mouse has been clicked, and no item is currently held...
    -** Processing line: ~    if !args.state.held_item~
    +            # Keep track of how many enemies have been killed by this particular bullet
    +** Processing line: ~            bullet[:kills]             += 1~
     - Inside source: true
     *** True Line Result
    -    if !args.state.held_item
    -** Processing line: ~      # see if any of the items intersect the pointer using the inside_rect? method~
    +            bullet[:kills]             += 1
    +** Processing line: ~            # Earn more points by killing multiple enemies with one shot.~
     - Inside source: true
     *** True Line Result
    -      # see if any of the items intersect the pointer using the inside_rect? method
    -** Processing line: ~      # the find method will either return the first object that returns true~
    +            # Earn more points by killing multiple enemies with one shot.
    +** Processing line: ~            args.state.player[:score]  += bullet[:kills]~
     - Inside source: true
     *** True Line Result
    -      # the find method will either return the first object that returns true
    -** Processing line: ~      # for the match clause, or it'll return nil if nothing matches the match clause~
    +            args.state.player[:score]  += bullet[:kills]
    +** Processing line: ~          end~
     - Inside source: true
     *** True Line Result
    -      # for the match clause, or it'll return nil if nothing matches the match clause
    -** Processing line: ~      found = args.state.items.find do |item|~
    +          end
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -      found = args.state.items.find do |item|
    -** Processing line: ~        # for each item in args.state.items, run the following boolean check~
    +        end
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -        # for each item in args.state.items, run the following boolean check
    -** Processing line: ~        args.inputs.mouse.click.point.inside_rect?(item)~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -        args.inputs.mouse.click.point.inside_rect?(item)
    -** Processing line: ~      end~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -      end
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      # if an item intersects the mouse pointer, then set the item's location to :held and~
    +** Processing line: ~  def move_enemies args~
     - Inside source: true
     *** True Line Result
    -      # if an item intersects the mouse pointer, then set the item's location to :held and
    -** Processing line: ~      # set args.state.held_item to the item for later reference~
    +  def move_enemies args
    +** Processing line: ~    args.state.enemies.each do |enemy|~
     - Inside source: true
     *** True Line Result
    -      # set args.state.held_item to the item for later reference
    -** Processing line: ~      if found~
    +    args.state.enemies.each do |enemy|
    +** Processing line: ~      # Get the angle from the enemy to the player~
     - Inside source: true
     *** True Line Result
    -      if found
    -** Processing line: ~        args.state.held_item = found~
    +      # Get the angle from the enemy to the player
    +** Processing line: ~      theta   = Math.atan2(enemy.y - args.state.player.y, enemy.x - args.state.player.x)~
     - Inside source: true
     *** True Line Result
    -        args.state.held_item = found
    -** Processing line: ~        found[:location] = :held~
    +      theta   = Math.atan2(enemy.y - args.state.player.y, enemy.x - args.state.player.x)
    +** Processing line: ~      # Convert the angle to a vector pointing at the player~
     - Inside source: true
     *** True Line Result
    -        found[:location] = :held
    -** Processing line: ~      end~
    +      # Convert the angle to a vector pointing at the player
    +** Processing line: ~      dx, dy  = theta.to_degrees.vector 5~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +      dx, dy  = theta.to_degrees.vector 5
    +** Processing line: ~      # Move the enemy towards thr player~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # if the mouse is clicked and an item is currently beign held....~
    +      # Move the enemy towards thr player
    +** Processing line: ~      enemy.x -= dx~
     - Inside source: true
     *** True Line Result
    -    # if the mouse is clicked and an item is currently beign held....
    -** Processing line: ~    elsif args.state.held_item~
    +      enemy.x -= dx
    +** Processing line: ~      enemy.y -= dy~
     - Inside source: true
     *** True Line Result
    -    elsif args.state.held_item
    -** Processing line: ~      # determine if a slot within the craft area was clicked~
    +      enemy.y -= dy
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      # determine if a slot within the craft area was clicked
    -** Processing line: ~      craft_area = args.state.craft_area.find { |a| args.inputs.mouse.click.point.inside_rect? a }~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -      craft_area = args.state.craft_area.find { |a| args.inputs.mouse.click.point.inside_rect? a }
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      # also determine if a slot within the inventory area was clicked~
    +** Processing line: ~  def move_bullets args~
     - Inside source: true
     *** True Line Result
    -      # also determine if a slot within the inventory area was clicked
    -** Processing line: ~      inventory_area = args.state.inventory_area.find { |a| args.inputs.mouse.click.point.inside_rect? a }~
    +  def move_bullets args
    +** Processing line: ~    args.state.player_bullets.each do |bullet|~
     - Inside source: true
     *** True Line Result
    -      inventory_area = args.state.inventory_area.find { |a| args.inputs.mouse.click.point.inside_rect? a }
    -** Processing line: ~~
    +    args.state.player_bullets.each do |bullet|
    +** Processing line: ~      # Move the bullets according to the bullet's velocity~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      # if the click was within a craft area~
    +      # Move the bullets according to the bullet's velocity
    +** Processing line: ~      bullet.x += bullet[:vx]~
     - Inside source: true
     *** True Line Result
    -      # if the click was within a craft area
    -** Processing line: ~      if craft_area~
    +      bullet.x += bullet[:vx]
    +** Processing line: ~      bullet.y += bullet[:vy]~
     - Inside source: true
     *** True Line Result
    -      if craft_area
    -** Processing line: ~        # check to see if an item is already there and ignore the click if an item is found~
    +      bullet.y += bullet[:vy]
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -        # check to see if an item is already there and ignore the click if an item is found
    -** Processing line: ~        # item_at_craft_slot is a helper method that returns an item or nil for a given oridinal~
    +    end
    +** Processing line: ~    args.state.player_bullets.reject! do |bullet|~
     - Inside source: true
     *** True Line Result
    -        # item_at_craft_slot is a helper method that returns an item or nil for a given oridinal
    -** Processing line: ~        # position~
    +    args.state.player_bullets.reject! do |bullet|
    +** Processing line: ~      # Despawn bullets that are outside the screen area~
     - Inside source: true
     *** True Line Result
    -        # position
    -** Processing line: ~        item_already_there = item_at_craft_slot args, craft_area[:ordinal_x], craft_area[:ordinal_y]~
    +      # Despawn bullets that are outside the screen area
    +** Processing line: ~      bullet.x < -20 || bullet.y < -20 || bullet.x > 1300 || bullet.y > 740~
     - Inside source: true
     *** True Line Result
    -        item_already_there = item_at_craft_slot args, craft_area[:ordinal_x], craft_area[:ordinal_y]
    +      bullet.x < -20 || bullet.y < -20 || bullet.x > 1300 || bullet.y > 740
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~        # if an item *doesn't* exist in the craft area~
    +** Processing line: ~  def move_player args~
     - Inside source: true
     *** True Line Result
    -        # if an item *doesn't* exist in the craft area
    -** Processing line: ~        if !item_already_there~
    +  def move_player args
    +** Processing line: ~    # Get the currently held direction.~
     - Inside source: true
     *** True Line Result
    -        if !item_already_there
    -** Processing line: ~          # if the quantity they are currently holding is greater than 1~
    +    # Get the currently held direction.
    +** Processing line: ~    dx, dy                 = move_directional_vector args~
     - Inside source: true
     *** True Line Result
    -          # if the quantity they are currently holding is greater than 1
    -** Processing line: ~          if args.state.held_item[:quantity] > 1~
    +    dx, dy                 = move_directional_vector args
    +** Processing line: ~    # Take the weighted average of the old velocities and the desired velocities.~
     - Inside source: true
     *** True Line Result
    -          if args.state.held_item[:quantity] > 1
    -** Processing line: ~            # remove one item (creating a seperate item of the same type), and place it~
    +    # Take the weighted average of the old velocities and the desired velocities.
    +** Processing line: ~    # Since move_directional_vector returns values between -1 and 1,~
     - Inside source: true
     *** True Line Result
    -            # remove one item (creating a seperate item of the same type), and place it
    -** Processing line: ~            # at the oridinal position and location of the craft area~
    +    # Since move_directional_vector returns values between -1 and 1,
    +** Processing line: ~    #   and we want to limit the speed to 7.5, we multiply dx and dy by 7.5*0.1 to get 0.75~
     - Inside source: true
     *** True Line Result
    -            # at the oridinal position and location of the craft area
    -** Processing line: ~            # the .merge method on Hash creates a new Hash, but updates any values~
    +    #   and we want to limit the speed to 7.5, we multiply dx and dy by 7.5*0.1 to get 0.75
    +** Processing line: ~    args.state.player[:vx] = args.state.player[:vx] * 0.9 + dx * 0.75~
     - Inside source: true
     *** True Line Result
    -            # the .merge method on Hash creates a new Hash, but updates any values
    -** Processing line: ~            # passed as arguments to merge~
    +    args.state.player[:vx] = args.state.player[:vx] * 0.9 + dx * 0.75
    +** Processing line: ~    args.state.player[:vy] = args.state.player[:vy] * 0.9 + dy * 0.75~
     - Inside source: true
     *** True Line Result
    -            # passed as arguments to merge
    -** Processing line: ~            new_item = args.state.held_item.merge(quantity: 1,~
    +    args.state.player[:vy] = args.state.player[:vy] * 0.9 + dy * 0.75
    +** Processing line: ~    # Move the player~
     - Inside source: true
     *** True Line Result
    -            new_item = args.state.held_item.merge(quantity: 1,
    -** Processing line: ~                                                  location: :craft,~
    +    # Move the player
    +** Processing line: ~    args.state.player.x    += args.state.player[:vx]~
     - Inside source: true
     *** True Line Result
    -                                                  location: :craft,
    -** Processing line: ~                                                  ordinal_x: craft_area[:ordinal_x],~
    +    args.state.player.x    += args.state.player[:vx]
    +** Processing line: ~    args.state.player.y    += args.state.player[:vy]~
     - Inside source: true
     *** True Line Result
    -                                                  ordinal_x: craft_area[:ordinal_x],
    -** Processing line: ~                                                  ordinal_y: craft_area[:ordinal_y])~
    +    args.state.player.y    += args.state.player[:vy]
    +** Processing line: ~    # If the player is about to go out of bounds, put them back in bounds.~
     - Inside source: true
     *** True Line Result
    -                                                  ordinal_y: craft_area[:ordinal_y])
    -** Processing line: ~~
    +    # If the player is about to go out of bounds, put them back in bounds.
    +** Processing line: ~    args.state.player.x    = args.state.player.x.clamp(0, 1201)~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~            # after the item is crated, place it into the args.state.items collection~
    +    args.state.player.x    = args.state.player.x.clamp(0, 1201)
    +** Processing line: ~    args.state.player.y    = args.state.player.y.clamp(0, 640)~
     - Inside source: true
     *** True Line Result
    -            # after the item is crated, place it into the args.state.items collection
    -** Processing line: ~            args.state.items << new_item~
    +    args.state.player.y    = args.state.player.y.clamp(0, 640)
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -            args.state.items << new_item
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~            # then subtract one from the held item~
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -            # then subtract one from the held item
    -** Processing line: ~            args.state.held_item[:quantity] -= 1~
    +
    +** Processing line: ~  def fire_player args~
     - Inside source: true
     *** True Line Result
    -            args.state.held_item[:quantity] -= 1
    -** Processing line: ~~
    +  def fire_player args
    +** Processing line: ~    # Reduce the firing cooldown each tick~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~          # if the craft area is available and there is only one item being held~
    +    # Reduce the firing cooldown each tick
    +** Processing line: ~    args.state.player[:cooldown] -= 1~
     - Inside source: true
     *** True Line Result
    -          # if the craft area is available and there is only one item being held
    -** Processing line: ~          elsif args.state.held_item[:quantity] == 1~
    +    args.state.player[:cooldown] -= 1
    +** Processing line: ~    # If the player is allowed to fire~
     - Inside source: true
     *** True Line Result
    -          elsif args.state.held_item[:quantity] == 1
    -** Processing line: ~            # instead of creating any new items just set the location of the held item~
    +    # If the player is allowed to fire
    +** Processing line: ~    if args.state.player[:cooldown] <= 0~
     - Inside source: true
     *** True Line Result
    -            # instead of creating any new items just set the location of the held item
    -** Processing line: ~            # to the oridinal position of the craft area, and then nil out the~
    +    if args.state.player[:cooldown] <= 0
    +** Processing line: ~      dx, dy = shoot_directional_vector args # Get the bullet velocity~
     - Inside source: true
     *** True Line Result
    -            # to the oridinal position of the craft area, and then nil out the
    -** Processing line: ~            # held item state so that a new item can be picked up~
    +      dx, dy = shoot_directional_vector args # Get the bullet velocity
    +** Processing line: ~      return if dx == 0 && dy == 0 # If the velocity is zero, the player doesn't want to fire. Therefore, we just return early.~
     - Inside source: true
     *** True Line Result
    -            # held item state so that a new item can be picked up
    -** Processing line: ~            args.state.held_item[:location] = :craft~
    +      return if dx == 0 && dy == 0 # If the velocity is zero, the player doesn't want to fire. Therefore, we just return early.
    +** Processing line: ~      # Add a new bullet to the list of player bullets.~
     - Inside source: true
     *** True Line Result
    -            args.state.held_item[:location] = :craft
    -** Processing line: ~            args.state.held_item[:ordinal_x] = craft_area[:ordinal_x]~
    +      # Add a new bullet to the list of player bullets.
    +** Processing line: ~      args.state.player_bullets << {~
     - Inside source: true
     *** True Line Result
    -            args.state.held_item[:ordinal_x] = craft_area[:ordinal_x]
    -** Processing line: ~            args.state.held_item[:ordinal_y] = craft_area[:ordinal_y]~
    +      args.state.player_bullets << {
    +** Processing line: ~          x:     args.state.player.x + 30 + 40 * dx,~
     - Inside source: true
     *** True Line Result
    -            args.state.held_item[:ordinal_y] = craft_area[:ordinal_y]
    -** Processing line: ~            args.state.held_item = nil~
    +          x:     args.state.player.x + 30 + 40 * dx,
    +** Processing line: ~          y:     args.state.player.y + 30 + 40 * dy,~
     - Inside source: true
     *** True Line Result
    -            args.state.held_item = nil
    -** Processing line: ~          end~
    +          y:     args.state.player.y + 30 + 40 * dy,
    +** Processing line: ~          w:     20, h: 20,~
     - Inside source: true
     *** True Line Result
    -          end
    -** Processing line: ~        end~
    +          w:     20, h: 20,
    +** Processing line: ~          path:  'sprites/circle-white.png',~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~~
    +          path:  'sprites/circle-white.png',
    +** Processing line: ~          r:     0, g: 0, b: 0,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      # if the selected area is an inventory area (as opposed to within the craft area)~
    +          r:     0, g: 0, b: 0,
    +** Processing line: ~          vx:    10 * dx + args.state.player[:vx] / 7.5, vy: 10 * dy + args.state.player[:vy] / 7.5, # Factor in a bit of the player's velocity~
     - Inside source: true
     *** True Line Result
    -      # if the selected area is an inventory area (as opposed to within the craft area)
    -** Processing line: ~      elsif inventory_area~
    +          vx:    10 * dx + args.state.player[:vx] / 7.5, vy: 10 * dy + args.state.player[:vy] / 7.5, # Factor in a bit of the player's velocity
    +** Processing line: ~          kills: 0~
     - Inside source: true
     *** True Line Result
    -      elsif inventory_area
    -** Processing line: ~~
    +          kills: 0
    +** Processing line: ~      }~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~        # check to see if there is already an item in that inventory slot~
    +      }
    +** Processing line: ~      args.state.player[:cooldown] = 30 # Reset the cooldown~
     - Inside source: true
     *** True Line Result
    -        # check to see if there is already an item in that inventory slot
    -** Processing line: ~        # the item_at_inventory_slot helper method returns an item or nil~
    +      args.state.player[:cooldown] = 30 # Reset the cooldown
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -        # the item_at_inventory_slot helper method returns an item or nil
    -** Processing line: ~        item_already_there = item_at_inventory_slot args, inventory_area[:ordinal_x], inventory_area[:ordinal_y]~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -        item_already_there = item_at_inventory_slot args, inventory_area[:ordinal_x], inventory_area[:ordinal_y]
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~        # if there is already an item there, and the item types/id match~
    +** Processing line: ~  # Custom function for getting a directional vector just for movement using WASD~
     - Inside source: true
     *** True Line Result
    -        # if there is already an item there, and the item types/id match
    -** Processing line: ~        if item_already_there && item_already_there[:id] == args.state.held_item[:id]~
    +  # Custom function for getting a directional vector just for movement using WASD
    +** Processing line: ~  def move_directional_vector args~
     - Inside source: true
     *** True Line Result
    -        if item_already_there && item_already_there[:id] == args.state.held_item[:id]
    -** Processing line: ~          # then merge the item quantities~
    +  def move_directional_vector args
    +** Processing line: ~    dx = 0~
     - Inside source: true
     *** True Line Result
    -          # then merge the item quantities
    -** Processing line: ~          held_quantity = args.state.held_item[:quantity]~
    +    dx = 0
    +** Processing line: ~    dx += 1 if args.inputs.keyboard.d~
     - Inside source: true
     *** True Line Result
    -          held_quantity = args.state.held_item[:quantity]
    -** Processing line: ~          item_already_there[:quantity] += held_quantity~
    +    dx += 1 if args.inputs.keyboard.d
    +** Processing line: ~    dx -= 1 if args.inputs.keyboard.a~
     - Inside source: true
     *** True Line Result
    -          item_already_there[:quantity] += held_quantity
    -** Processing line: ~~
    +    dx -= 1 if args.inputs.keyboard.a
    +** Processing line: ~    dy = 0~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~          # remove the item being held from the items collection (since it's quantity is now 0)~
    +    dy = 0
    +** Processing line: ~    dy += 1 if args.inputs.keyboard.w~
     - Inside source: true
     *** True Line Result
    -          # remove the item being held from the items collection (since it's quantity is now 0)
    -** Processing line: ~          args.state.items.reject! { |i| i[:location] == :held }~
    +    dy += 1 if args.inputs.keyboard.w
    +** Processing line: ~    dy -= 1 if args.inputs.keyboard.s~
     - Inside source: true
     *** True Line Result
    -          args.state.items.reject! { |i| i[:location] == :held }
    -** Processing line: ~~
    +    dy -= 1 if args.inputs.keyboard.s
    +** Processing line: ~    if dx != 0 && dy != 0~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~          # nil out the held_item so a new item can be picked up~
    +    if dx != 0 && dy != 0
    +** Processing line: ~      dx *= 0.7071~
     - Inside source: true
     *** True Line Result
    -          # nil out the held_item so a new item can be picked up
    -** Processing line: ~          args.state.held_item = nil~
    +      dx *= 0.7071
    +** Processing line: ~      dy *= 0.7071~
     - Inside source: true
     *** True Line Result
    -          args.state.held_item = nil
    +      dy *= 0.7071
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~    [dx, dy]~
    +- Inside source: true
    +*** True Line Result
    +    [dx, dy]
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~        # if there currently isn't an item there, then put the held item in the slot~
    +** Processing line: ~  # Custom function for getting a directional vector just for shooting using the arrow keys~
     - Inside source: true
     *** True Line Result
    -        # if there currently isn't an item there, then put the held item in the slot
    -** Processing line: ~        elsif !item_already_there~
    +  # Custom function for getting a directional vector just for shooting using the arrow keys
    +** Processing line: ~  def shoot_directional_vector args~
     - Inside source: true
     *** True Line Result
    -        elsif !item_already_there
    -** Processing line: ~          args.state.held_item[:location] = :inventory~
    +  def shoot_directional_vector args
    +** Processing line: ~    dx = 0~
     - Inside source: true
     *** True Line Result
    -          args.state.held_item[:location] = :inventory
    -** Processing line: ~          args.state.held_item[:ordinal_x] = inventory_area[:ordinal_x]~
    +    dx = 0
    +** Processing line: ~    dx += 1 if args.inputs.keyboard.key_down.right || args.inputs.keyboard.key_held.right~
     - Inside source: true
     *** True Line Result
    -          args.state.held_item[:ordinal_x] = inventory_area[:ordinal_x]
    -** Processing line: ~          args.state.held_item[:ordinal_y] = inventory_area[:ordinal_y]~
    +    dx += 1 if args.inputs.keyboard.key_down.right || args.inputs.keyboard.key_held.right
    +** Processing line: ~    dx -= 1 if args.inputs.keyboard.key_down.left || args.inputs.keyboard.key_held.left~
     - Inside source: true
     *** True Line Result
    -          args.state.held_item[:ordinal_y] = inventory_area[:ordinal_y]
    -** Processing line: ~~
    +    dx -= 1 if args.inputs.keyboard.key_down.left || args.inputs.keyboard.key_held.left
    +** Processing line: ~    dy = 0~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~          # nil out the held_item so a new item can be picked up~
    +    dy = 0
    +** Processing line: ~    dy += 1 if args.inputs.keyboard.key_down.up || args.inputs.keyboard.key_held.up~
     - Inside source: true
     *** True Line Result
    -          # nil out the held_item so a new item can be picked up
    -** Processing line: ~          args.state.held_item = nil~
    +    dy += 1 if args.inputs.keyboard.key_down.up || args.inputs.keyboard.key_held.up
    +** Processing line: ~    dy -= 1 if args.inputs.keyboard.key_down.down || args.inputs.keyboard.key_held.down~
     - Inside source: true
     *** True Line Result
    -          args.state.held_item = nil
    -** Processing line: ~        end~
    +    dy -= 1 if args.inputs.keyboard.key_down.down || args.inputs.keyboard.key_held.down
    +** Processing line: ~    if dx != 0 && dy != 0~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~      end~
    +    if dx != 0 && dy != 0
    +** Processing line: ~      dx *= 0.7071~
     - Inside source: true
     *** True Line Result
    -      end
    +      dx *= 0.7071
    +** Processing line: ~      dy *= 0.7071~
    +- Inside source: true
    +*** True Line Result
    +      dy *= 0.7071
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
         end
    +** Processing line: ~    [dx, dy]~
    +- Inside source: true
    +*** True Line Result
    +    [dx, dy]
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
       end
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
    +*** True Line Result
    +#+end_src
     ** Processing line: ~~
    -- Inside source: true
    +- End of paragraph detected.
     *** True Line Result
     
    -** Processing line: ~  # the calc method is executed after input~
    -- Inside source: true
    +** Processing line: ~*** Crafting - Craft Game Starting Point - main.rb~
    +- Header detected.
     *** True Line Result
    -  # the calc method is executed after input
    -** Processing line: ~  def calc args~
    -- Inside source: true
    +
     *** True Line Result
    -  def calc args
    -** Processing line: ~    # make sure that the real position of the inventory~
    -- Inside source: true
    +*** Crafting - Craft Game Starting Point - main.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
     *** True Line Result
    -    # make sure that the real position of the inventory
    -** Processing line: ~    # items are updated every frame to ensure that they~
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/99_genre_crafting/craft_game_starting_point/app/main.rb~
     - Inside source: true
     *** True Line Result
    -    # items are updated every frame to ensure that they
    -** Processing line: ~    # are placed correctly given their location and oridinal positions~
    +  # ./samples/99_genre_crafting/craft_game_starting_point/app/main.rb
    +** Processing line: ~  # ==================================================~
     - Inside source: true
     *** True Line Result
    -    # are placed correctly given their location and oridinal positions
    -** Processing line: ~    # instead of using .map, here we use .each (since we are not returning a new item and just updating the items in place)~
    +  # ==================================================
    +** Processing line: ~  # A NOTE TO JAM CRAFT PARTICIPANTS:~
     - Inside source: true
     *** True Line Result
    -    # instead of using .map, here we use .each (since we are not returning a new item and just updating the items in place)
    -** Processing line: ~    args.state.items.each do |item|~
    +  # A NOTE TO JAM CRAFT PARTICIPANTS:
    +** Processing line: ~  # The comments and code in here are just as small piece of DragonRuby's capabilities.~
     - Inside source: true
     *** True Line Result
    -    args.state.items.each do |item|
    -** Processing line: ~      # based on the location of the item, invoke the correct pixel conversion method~
    +  # The comments and code in here are just as small piece of DragonRuby's capabilities.
    +** Processing line: ~  # Be sure to check out the rest of the sample apps. Start with README.txt and go from there!~
     - Inside source: true
     *** True Line Result
    -      # based on the location of the item, invoke the correct pixel conversion method
    -** Processing line: ~      if item[:location] == :inventory~
    +  # Be sure to check out the rest of the sample apps. Start with README.txt and go from there!
    +** Processing line: ~  # ==================================================~
     - Inside source: true
     *** True Line Result
    -      if item[:location] == :inventory
    -** Processing line: ~        set_inventory_position args, item~
    +  # ==================================================
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        set_inventory_position args, item
    -** Processing line: ~      elsif item[:location] == :craft~
    +
    +** Processing line: ~  # def tick args is the entry point into your game. This function is called at~
     - Inside source: true
     *** True Line Result
    -      elsif item[:location] == :craft
    -** Processing line: ~        set_craft_position args, item~
    +  # def tick args is the entry point into your game. This function is called at
    +** Processing line: ~  # a fixed update time of 60hz (60 fps).~
     - Inside source: true
     *** True Line Result
    -        set_craft_position args, item
    -** Processing line: ~      elsif item[:location] == :held~
    +  # a fixed update time of 60hz (60 fps).
    +** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
    -      elsif item[:location] == :held
    -** Processing line: ~        # if the item is held, center the item around the mouse pointer~
    +  def tick args
    +** Processing line: ~    # The defaults function intitializes the game.~
     - Inside source: true
     *** True Line Result
    -        # if the item is held, center the item around the mouse pointer
    -** Processing line: ~        args.state.held_item.x = args.inputs.mouse.x - args.state.held_item.w.half~
    +    # The defaults function intitializes the game.
    +** Processing line: ~    defaults args~
     - Inside source: true
     *** True Line Result
    -        args.state.held_item.x = args.inputs.mouse.x - args.state.held_item.w.half
    -** Processing line: ~        args.state.held_item.y = args.inputs.mouse.y - args.state.held_item.h.half~
    +    defaults args
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        args.state.held_item.y = args.inputs.mouse.y - args.state.held_item.h.half
    -** Processing line: ~      end~
    +
    +** Processing line: ~    # After the game is initialized, render it.~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +    # After the game is initialized, render it.
    +** Processing line: ~    render args~
     - Inside source: true
     *** True Line Result
    -    end
    +    render args
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # for each hash/sprite in the click ripples queue,~
    +** Processing line: ~    # After rendering the player should be able to respond to input.~
     - Inside source: true
     *** True Line Result
    -    # for each hash/sprite in the click ripples queue,
    -** Processing line: ~    # expand its size by 20 percent and decrease its alpha~
    +    # After rendering the player should be able to respond to input.
    +** Processing line: ~    input args~
     - Inside source: true
     *** True Line Result
    -    # expand its size by 20 percent and decrease its alpha
    -** Processing line: ~    # by 10.~
    +    input args
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    # by 10.
    -** Processing line: ~    args.state.click_ripples.each do |ripple|~
    +
    +** Processing line: ~    # After responding to input, the game performs any additional calculations.~
     - Inside source: true
     *** True Line Result
    -    args.state.click_ripples.each do |ripple|
    -** Processing line: ~      delta_w = ripple.w * 1.2 - ripple.w~
    +    # After responding to input, the game performs any additional calculations.
    +** Processing line: ~    calc args~
     - Inside source: true
     *** True Line Result
    -      delta_w = ripple.w * 1.2 - ripple.w
    -** Processing line: ~      delta_h = ripple.h * 1.2 - ripple.h~
    +    calc args
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -      delta_h = ripple.h * 1.2 - ripple.h
    -** Processing line: ~      ripple.x -= delta_w.half~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      ripple.x -= delta_w.half
    -** Processing line: ~      ripple.y -= delta_h.half~
    +
    +** Processing line: ~  def defaults args~
     - Inside source: true
     *** True Line Result
    -      ripple.y -= delta_h.half
    -** Processing line: ~      ripple.w += delta_w~
    +  def defaults args
    +** Processing line: ~    # hide the mouse cursor for this game, we are going to render our own cursor~
     - Inside source: true
     *** True Line Result
    -      ripple.w += delta_w
    -** Processing line: ~      ripple.h += delta_h~
    +    # hide the mouse cursor for this game, we are going to render our own cursor
    +** Processing line: ~    if args.state.tick_count == 0~
     - Inside source: true
     *** True Line Result
    -      ripple.h += delta_h
    -** Processing line: ~      ripple.a -= 10~
    +    if args.state.tick_count == 0
    +** Processing line: ~      args.gtk.hide_cursor~
     - Inside source: true
     *** True Line Result
    -      ripple.a -= 10
    +      args.gtk.hide_cursor
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -99479,570 +101039,546 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # remove any items from the collection where the alpha value is less than equal to~
    -- Inside source: true
    -*** True Line Result
    -    # remove any items from the collection where the alpha value is less than equal to
    -** Processing line: ~    # zero using the reject! method (reject with an exclamation point at the end changes the~
    +** Processing line: ~    args.state.click_ripples ||= []~
     - Inside source: true
     *** True Line Result
    -    # zero using the reject! method (reject with an exclamation point at the end changes the
    -** Processing line: ~    # array value in place, while reject without the exclamation point returns a new array).~
    +    args.state.click_ripples ||= []
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    # array value in place, while reject without the exclamation point returns a new array).
    -** Processing line: ~    args.state.click_ripples.reject! { |ripple| ripple.a <= 0 }~
    +
    +** Processing line: ~    # everything is on a 1280x720 virtual canvas, so you can~
     - Inside source: true
     *** True Line Result
    -    args.state.click_ripples.reject! { |ripple| ripple.a <= 0 }
    -** Processing line: ~  end~
    +    # everything is on a 1280x720 virtual canvas, so you can
    +** Processing line: ~    # hardcode locations~
     - Inside source: true
     *** True Line Result
    -  end
    +    # hardcode locations
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # helper function for finding an item at a craft slot~
    -- Inside source: true
    -*** True Line Result
    -  # helper function for finding an item at a craft slot
    -** Processing line: ~  def item_at_craft_slot args, ordinal_x, ordinal_y~
    +** Processing line: ~    # define the borders for where the inventory is located~
     - Inside source: true
     *** True Line Result
    -  def item_at_craft_slot args, ordinal_x, ordinal_y
    -** Processing line: ~    args.state.items.find { |i| i[:location] == :craft && i[:ordinal_x] == ordinal_x && i[:ordinal_y] == ordinal_y }~
    +    # define the borders for where the inventory is located
    +** Processing line: ~    # args.state is a data structure that accepts any arbitrary parameters~
     - Inside source: true
     *** True Line Result
    -    args.state.items.find { |i| i[:location] == :craft && i[:ordinal_x] == ordinal_x && i[:ordinal_y] == ordinal_y }
    -** Processing line: ~  end~
    +    # args.state is a data structure that accepts any arbitrary parameters
    +** Processing line: ~    # so you can create an object graph without having to create any classes.~
     - Inside source: true
     *** True Line Result
    -  end
    +    # so you can create an object graph without having to create any classes.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # helper function for finding an item at an inventory slot~
    +** Processing line: ~    # Bottom left is 0, 0. Top right is 1280, 720.~
     - Inside source: true
     *** True Line Result
    -  # helper function for finding an item at an inventory slot
    -** Processing line: ~  def item_at_inventory_slot args, ordinal_x, ordinal_y~
    +    # Bottom left is 0, 0. Top right is 1280, 720.
    +** Processing line: ~    # The inventory area is at the top of the screen~
     - Inside source: true
     *** True Line Result
    -  def item_at_inventory_slot args, ordinal_x, ordinal_y
    -** Processing line: ~    args.state.items.find { |i| i[:location] == :inventory && i[:ordinal_x] == ordinal_x && i[:ordinal_y] == ordinal_y }~
    +    # The inventory area is at the top of the screen
    +** Processing line: ~    # the number 80 is the size of all the sprites, so that is what is being~
     - Inside source: true
     *** True Line Result
    -    args.state.items.find { |i| i[:location] == :inventory && i[:ordinal_x] == ordinal_x && i[:ordinal_y] == ordinal_y }
    -** Processing line: ~  end~
    +    # the number 80 is the size of all the sprites, so that is what is being
    +** Processing line: ~    # used to decide the with and height~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +    # used to decide the with and height
    +** Processing line: ~    args.state.sprite_size = 80~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  # helper function that creates a visual representation of an item~
    +    args.state.sprite_size = 80
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  # helper function that creates a visual representation of an item
    -** Processing line: ~  def item_prefab args, item, should_highlight, mouse~
    +
    +** Processing line: ~    args.state.inventory_border.w  = args.state.sprite_size * 10~
     - Inside source: true
     *** True Line Result
    -  def item_prefab args, item, should_highlight, mouse
    -** Processing line: ~    return nil unless item~
    +    args.state.inventory_border.w  = args.state.sprite_size * 10
    +** Processing line: ~    args.state.inventory_border.h  = args.state.sprite_size * 3~
     - Inside source: true
     *** True Line Result
    -    return nil unless item
    -** Processing line: ~~
    +    args.state.inventory_border.h  = args.state.sprite_size * 3
    +** Processing line: ~    args.state.inventory_border.x  = 10~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    overlay = nil~
    +    args.state.inventory_border.x  = 10
    +** Processing line: ~    args.state.inventory_border.y  = 710 - args.state.inventory_border.h~
     - Inside source: true
     *** True Line Result
    -    overlay = nil
    +    args.state.inventory_border.y  = 710 - args.state.inventory_border.h
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    x = item.x~
    +** Processing line: ~    # define the borders for where the crafting area is located~
     - Inside source: true
     *** True Line Result
    -    x = item.x
    -** Processing line: ~    y = item.y~
    +    # define the borders for where the crafting area is located
    +** Processing line: ~    # the crafting area is below the inventory area~
     - Inside source: true
     *** True Line Result
    -    y = item.y
    -** Processing line: ~    w = item.w~
    +    # the crafting area is below the inventory area
    +** Processing line: ~    # the number 80 is the size of all the sprites, so that is what is being~
     - Inside source: true
     *** True Line Result
    -    w = item.w
    -** Processing line: ~    h = item.h~
    +    # the number 80 is the size of all the sprites, so that is what is being
    +** Processing line: ~    # used to decide the with and height~
     - Inside source: true
     *** True Line Result
    -    h = item.h
    -** Processing line: ~~
    +    # used to decide the with and height
    +** Processing line: ~    args.state.craft_border.x =  10~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    if should_highlight && mouse.point.inside_rect?(item)~
    +    args.state.craft_border.x =  10
    +** Processing line: ~    args.state.craft_border.y = 220~
     - Inside source: true
     *** True Line Result
    -    if should_highlight && mouse.point.inside_rect?(item)
    -** Processing line: ~      overlay = { x: x, y: y, w: w, h: h, path: "sprites/square-blue.png", a: 130, }~
    +    args.state.craft_border.y = 220
    +** Processing line: ~    args.state.craft_border.w = args.state.sprite_size * 3~
     - Inside source: true
     *** True Line Result
    -      overlay = { x: x, y: y, w: w, h: h, path: "sprites/square-blue.png", a: 130, }
    -** Processing line: ~    end~
    +    args.state.craft_border.w = args.state.sprite_size * 3
    +** Processing line: ~    args.state.craft_border.h = args.state.sprite_size * 3~
     - Inside source: true
     *** True Line Result
    -    end
    +    args.state.craft_border.h = args.state.sprite_size * 3
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    [~
    -- Inside source: true
    -*** True Line Result
    -    [
    -** Processing line: ~      # sprites are hashes with a path property, this is the main sprite~
    +** Processing line: ~    # define the area where results are located~
     - Inside source: true
     *** True Line Result
    -      # sprites are hashes with a path property, this is the main sprite
    -** Processing line: ~      { x: x,      y: y, w: args.state.sprite_size, h: args.state.sprite_size, path: item[:path], },~
    +    # define the area where results are located
    +** Processing line: ~    # the crafting result is to the right of the craft area~
     - Inside source: true
     *** True Line Result
    -      { x: x,      y: y, w: args.state.sprite_size, h: args.state.sprite_size, path: item[:path], },
    -** Processing line: ~~
    +    # the crafting result is to the right of the craft area
    +** Processing line: ~    args.state.result_border.x =  10 + args.state.sprite_size * 3 + args.state.sprite_size~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      # this represents the black area in the bottom right corner of the main sprite so that the~
    +    args.state.result_border.x =  10 + args.state.sprite_size * 3 + args.state.sprite_size
    +** Processing line: ~    args.state.result_border.y = 220 + args.state.sprite_size~
     - Inside source: true
     *** True Line Result
    -      # this represents the black area in the bottom right corner of the main sprite so that the
    -** Processing line: ~      # quantity is visible~
    +    args.state.result_border.y = 220 + args.state.sprite_size
    +** Processing line: ~    args.state.result_border.w = args.state.sprite_size~
     - Inside source: true
     *** True Line Result
    -      # quantity is visible
    -** Processing line: ~      { x: x + 55, y: y, w: 25, h: 25, path: "sprites/square-black.png", }, # sprites are hashes with a path property~
    +    args.state.result_border.w = args.state.sprite_size
    +** Processing line: ~    args.state.result_border.h = args.state.sprite_size~
     - Inside source: true
     *** True Line Result
    -      { x: x + 55, y: y, w: 25, h: 25, path: "sprites/square-black.png", }, # sprites are hashes with a path property
    +    args.state.result_border.h = args.state.sprite_size
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      # labels are hashes with a text property~
    +** Processing line: ~    # initialize items for the first time if they are nil~
     - Inside source: true
     *** True Line Result
    -      # labels are hashes with a text property
    -** Processing line: ~      { x: x + 56, y: y + 22, text: "#{item[:quantity]}", r: 255, g: 255, b: 255, },~
    +    # initialize items for the first time if they are nil
    +** Processing line: ~    # you start with 15 wood, 1 chest, and 5 plank~
     - Inside source: true
     *** True Line Result
    -      { x: x + 56, y: y + 22, text: "#{item[:quantity]}", r: 255, g: 255, b: 255, },
    -** Processing line: ~~
    +    # you start with 15 wood, 1 chest, and 5 plank
    +** Processing line: ~    # Ruby has built in syntax for dictionaries (they look a lot like json objects).~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      # this is the mouse overlay, if the overlay isn't applicable, then this value will be nil (nil values will not be rendered)~
    +    # Ruby has built in syntax for dictionaries (they look a lot like json objects).
    +** Processing line: ~    # Ruby also has a special type called a Symbol denoted with a : followed by a word.~
     - Inside source: true
     *** True Line Result
    -      # this is the mouse overlay, if the overlay isn't applicable, then this value will be nil (nil values will not be rendered)
    -** Processing line: ~      overlay~
    +    # Ruby also has a special type called a Symbol denoted with a : followed by a word.
    +** Processing line: ~    # Symbols are nice because they remove the need for magic strings.~
     - Inside source: true
     *** True Line Result
    -      overlay
    -** Processing line: ~    ]~
    +    # Symbols are nice because they remove the need for magic strings.
    +** Processing line: ~    if !args.state.items~
     - Inside source: true
     *** True Line Result
    -    ]
    -** Processing line: ~  end~
    +    if !args.state.items
    +** Processing line: ~      args.state.items = [~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +      args.state.items = [
    +** Processing line: ~        {~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  # helper function for deriving the position of an item within inventory~
    +        {
    +** Processing line: ~          id: :wood, # :wood is a Symbol, this is better than using "wood" for the id~
     - Inside source: true
     *** True Line Result
    -  # helper function for deriving the position of an item within inventory
    -** Processing line: ~  def set_inventory_position args, item~
    +          id: :wood, # :wood is a Symbol, this is better than using "wood" for the id
    +** Processing line: ~          quantity: 15,~
     - Inside source: true
     *** True Line Result
    -  def set_inventory_position args, item
    -** Processing line: ~    item.x = args.state.inventory_border.x + item[:ordinal_x] * 80~
    +          quantity: 15,
    +** Processing line: ~          path: 'sprites/wood.png',~
     - Inside source: true
     *** True Line Result
    -    item.x = args.state.inventory_border.x + item[:ordinal_x] * 80
    -** Processing line: ~    item.y = (args.state.inventory_border.y + args.state.inventory_border.h - 80) - item[:ordinal_y] * 80~
    +          path: 'sprites/wood.png',
    +** Processing line: ~          location: :inventory,~
     - Inside source: true
     *** True Line Result
    -    item.y = (args.state.inventory_border.y + args.state.inventory_border.h - 80) - item[:ordinal_y] * 80
    -** Processing line: ~    item.w = 80~
    +          location: :inventory,
    +** Processing line: ~          ordinal_x: 0, ordinal_y: 0~
     - Inside source: true
     *** True Line Result
    -    item.w = 80
    -** Processing line: ~    item.h = 80~
    +          ordinal_x: 0, ordinal_y: 0
    +** Processing line: ~        },~
     - Inside source: true
     *** True Line Result
    -    item.h = 80
    -** Processing line: ~  end~
    +        },
    +** Processing line: ~        {~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +        {
    +** Processing line: ~          id: :chest,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  # helper function for deriving the position of an item within the craft area~
    +          id: :chest,
    +** Processing line: ~          quantity: 1,~
     - Inside source: true
     *** True Line Result
    -  # helper function for deriving the position of an item within the craft area
    -** Processing line: ~  def set_craft_position args, item~
    +          quantity: 1,
    +** Processing line: ~          path: 'sprites/chest.png',~
     - Inside source: true
     *** True Line Result
    -  def set_craft_position args, item
    -** Processing line: ~    item.x = args.state.craft_border.x + item[:ordinal_x] * 80~
    +          path: 'sprites/chest.png',
    +** Processing line: ~          location: :inventory,~
     - Inside source: true
     *** True Line Result
    -    item.x = args.state.craft_border.x + item[:ordinal_x] * 80
    -** Processing line: ~    item.y = (args.state.craft_border.y + args.state.inventory_border.h - 80) - item[:ordinal_y] * 80~
    +          location: :inventory,
    +** Processing line: ~          ordinal_x: 1, ordinal_y: 0~
     - Inside source: true
     *** True Line Result
    -    item.y = (args.state.craft_border.y + args.state.inventory_border.h - 80) - item[:ordinal_y] * 80
    -** Processing line: ~    item.w = 80~
    +          ordinal_x: 1, ordinal_y: 0
    +** Processing line: ~        },~
     - Inside source: true
     *** True Line Result
    -    item.w = 80
    -** Processing line: ~    item.h = 80~
    +        },
    +** Processing line: ~        {~
     - Inside source: true
     *** True Line Result
    -    item.h = 80
    -** Processing line: ~  end~
    +        {
    +** Processing line: ~          id: :plank,~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +          id: :plank,
    +** Processing line: ~          quantity: 5,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  # Any lines outside of a function will be executed when the file is reloaded.~
    +          quantity: 5,
    +** Processing line: ~          path: 'sprites/plank.png',~
     - Inside source: true
     *** True Line Result
    -  # Any lines outside of a function will be executed when the file is reloaded.
    -** Processing line: ~  # So every time you save main.rb, the game will be reset.~
    +          path: 'sprites/plank.png',
    +** Processing line: ~          location: :inventory,~
     - Inside source: true
     *** True Line Result
    -  # So every time you save main.rb, the game will be reset.
    -** Processing line: ~  # Comment out the line below if you don't want this to happen.~
    +          location: :inventory,
    +** Processing line: ~          ordinal_x: 2, ordinal_y: 0~
     - Inside source: true
     *** True Line Result
    -  # Comment out the line below if you don't want this to happen.
    -** Processing line: ~  $gtk.reset~
    +          ordinal_x: 2, ordinal_y: 0
    +** Processing line: ~        },~
     - Inside source: true
     *** True Line Result
    -  $gtk.reset
    -** Processing line: ~~
    +        },
    +** Processing line: ~      ]~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~#+end_src~
    -- Line was identified as the end of a code block.
    -*** True Line Result
    -#+end_src
    +      ]
     ** Processing line: ~~
    -- End of paragraph detected.
    -*** True Line Result
    -
    -** Processing line: ~*** Crafting - Farming Game Starting Point - main.rb~
    -- Header detected.
    -*** True Line Result
    -
    -*** True Line Result
    -*** Crafting - Farming Game Starting Point - main.rb
    -** Processing line: ~#+begin_src ruby~
    -- Line was identified as the beginning of a code block.
    +- Inside source: true
     *** True Line Result
     
    +** Processing line: ~      # after initializing the oridinal positions, derive the pixel~
    +- Inside source: true
     *** True Line Result
    -#+begin_src ruby
    -** Processing line: ~  # ./samples/99_genre_crafting/farming_game_starting_point/app/main.rb~
    +      # after initializing the oridinal positions, derive the pixel
    +** Processing line: ~      # locations assuming that the width and height are 80~
     - Inside source: true
     *** True Line Result
    -  # ./samples/99_genre_crafting/farming_game_starting_point/app/main.rb
    -** Processing line: ~  def tick args~
    +      # locations assuming that the width and height are 80
    +** Processing line: ~      args.state.items.each { |item| set_inventory_position args, item }~
     - Inside source: true
     *** True Line Result
    -  def tick args
    -** Processing line: ~    args.state.tile_size     = 80~
    +      args.state.items.each { |item| set_inventory_position args, item }
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    args.state.tile_size     = 80
    -** Processing line: ~    args.state.player_speed  = 4~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    args.state.player_speed  = 4
    -** Processing line: ~    args.state.player      ||= tile(args, 7, 3, 0, 128, 180)~
    +
    +** Processing line: ~    # define all the oridinal positions of the inventory slots~
     - Inside source: true
     *** True Line Result
    -    args.state.player      ||= tile(args, 7, 3, 0, 128, 180)
    -** Processing line: ~    generate_map args~
    +    # define all the oridinal positions of the inventory slots
    +** Processing line: ~    if !args.state.inventory_area~
     - Inside source: true
     *** True Line Result
    -    generate_map args
    -** Processing line: ~    #press j to plant a green onion~
    +    if !args.state.inventory_area
    +** Processing line: ~      args.state.inventory_area = [~
     - Inside source: true
     *** True Line Result
    -    #press j to plant a green onion
    -** Processing line: ~    if args.inputs.keyboard.j~
    +      args.state.inventory_area = [
    +** Processing line: ~        { ordinal_x: 0,  ordinal_y: 0 },~
     - Inside source: true
     *** True Line Result
    -    if args.inputs.keyboard.j
    -** Processing line: ~    #change this part you can change what you want to plant~
    +        { ordinal_x: 0,  ordinal_y: 0 },
    +** Processing line: ~        { ordinal_x: 1,  ordinal_y: 0 },~
     - Inside source: true
     *** True Line Result
    -    #change this part you can change what you want to plant
    -** Processing line: ~     args.state.walls << tile(args, ((args.state.player.x+80)/args.state.tile_size), ((args.state.player.y)/args.state.tile_size), 255, 255, 255)~
    +        { ordinal_x: 1,  ordinal_y: 0 },
    +** Processing line: ~        { ordinal_x: 2,  ordinal_y: 0 },~
     - Inside source: true
     *** True Line Result
    -     args.state.walls << tile(args, ((args.state.player.x+80)/args.state.tile_size), ((args.state.player.y)/args.state.tile_size), 255, 255, 255)
    -** Processing line: ~     args.state.plants << tile(args, ((args.state.player.x+80)/args.state.tile_size), ((args.state.player.y+80)/args.state.tile_size), 0, 160, 0)~
    +        { ordinal_x: 2,  ordinal_y: 0 },
    +** Processing line: ~        { ordinal_x: 3,  ordinal_y: 0 },~
     - Inside source: true
     *** True Line Result
    -     args.state.plants << tile(args, ((args.state.player.x+80)/args.state.tile_size), ((args.state.player.y+80)/args.state.tile_size), 0, 160, 0)
    -** Processing line: ~    end~
    +        { ordinal_x: 3,  ordinal_y: 0 },
    +** Processing line: ~        { ordinal_x: 4,  ordinal_y: 0 },~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~    # Adds walls, background, and player to args.outputs.solids so they appear on screen~
    +        { ordinal_x: 4,  ordinal_y: 0 },
    +** Processing line: ~        { ordinal_x: 5,  ordinal_y: 0 },~
     - Inside source: true
     *** True Line Result
    -    # Adds walls, background, and player to args.outputs.solids so they appear on screen
    -** Processing line: ~    args.outputs.solids << [0,0,1280,720, 237,189,101]~
    +        { ordinal_x: 5,  ordinal_y: 0 },
    +** Processing line: ~        { ordinal_x: 6,  ordinal_y: 0 },~
     - Inside source: true
     *** True Line Result
    -    args.outputs.solids << [0,0,1280,720, 237,189,101]
    -** Processing line: ~    args.outputs.sprites << [0, 0, 1280, 720, 'sprites/background.png']~
    +        { ordinal_x: 6,  ordinal_y: 0 },
    +** Processing line: ~        { ordinal_x: 7,  ordinal_y: 0 },~
     - Inside source: true
     *** True Line Result
    -    args.outputs.sprites << [0, 0, 1280, 720, 'sprites/background.png']
    -** Processing line: ~    args.outputs.solids << args.state.walls~
    +        { ordinal_x: 7,  ordinal_y: 0 },
    +** Processing line: ~        { ordinal_x: 8,  ordinal_y: 0 },~
     - Inside source: true
     *** True Line Result
    -    args.outputs.solids << args.state.walls
    -** Processing line: ~    args.outputs.solids << args.state.player~
    +        { ordinal_x: 8,  ordinal_y: 0 },
    +** Processing line: ~        { ordinal_x: 9,  ordinal_y: 0 },~
     - Inside source: true
     *** True Line Result
    -    args.outputs.solids << args.state.player
    -** Processing line: ~    args.outputs.solids << args.state.plants~
    +        { ordinal_x: 9,  ordinal_y: 0 },
    +** Processing line: ~        { ordinal_x: 0,  ordinal_y: 1 },~
     - Inside source: true
     *** True Line Result
    -    args.outputs.solids << args.state.plants
    -** Processing line: ~    args.outputs.labels << [320, 640, "press J to plant", 3, 1, 255, 0, 0, 200]~
    +        { ordinal_x: 0,  ordinal_y: 1 },
    +** Processing line: ~        { ordinal_x: 1,  ordinal_y: 1 },~
     - Inside source: true
     *** True Line Result
    -    args.outputs.labels << [320, 640, "press J to plant", 3, 1, 255, 0, 0, 200]
    -** Processing line: ~~
    +        { ordinal_x: 1,  ordinal_y: 1 },
    +** Processing line: ~        { ordinal_x: 2,  ordinal_y: 1 },~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    move_player args, -1,  0 if args.inputs.keyboard.left # x position decreases by 1 if left key is pressed~
    +        { ordinal_x: 2,  ordinal_y: 1 },
    +** Processing line: ~        { ordinal_x: 3,  ordinal_y: 1 },~
     - Inside source: true
     *** True Line Result
    -    move_player args, -1,  0 if args.inputs.keyboard.left # x position decreases by 1 if left key is pressed
    -** Processing line: ~    move_player args,  1,  0 if args.inputs.keyboard.right # x position increases by 1 if right key is pressed~
    +        { ordinal_x: 3,  ordinal_y: 1 },
    +** Processing line: ~        { ordinal_x: 4,  ordinal_y: 1 },~
     - Inside source: true
     *** True Line Result
    -    move_player args,  1,  0 if args.inputs.keyboard.right # x position increases by 1 if right key is pressed
    -** Processing line: ~    move_player args,  0,  1 if args.inputs.keyboard.up # y position increases by 1 if up is pressed~
    +        { ordinal_x: 4,  ordinal_y: 1 },
    +** Processing line: ~        { ordinal_x: 5,  ordinal_y: 1 },~
     - Inside source: true
     *** True Line Result
    -    move_player args,  0,  1 if args.inputs.keyboard.up # y position increases by 1 if up is pressed
    -** Processing line: ~    move_player args,  0, -1 if args.inputs.keyboard.down # y position decreases by 1 if down is pressed~
    +        { ordinal_x: 5,  ordinal_y: 1 },
    +** Processing line: ~        { ordinal_x: 6,  ordinal_y: 1 },~
     - Inside source: true
     *** True Line Result
    -    move_player args,  0, -1 if args.inputs.keyboard.down # y position decreases by 1 if down is pressed
    -** Processing line: ~  end~
    +        { ordinal_x: 6,  ordinal_y: 1 },
    +** Processing line: ~        { ordinal_x: 7,  ordinal_y: 1 },~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +        { ordinal_x: 7,  ordinal_y: 1 },
    +** Processing line: ~        { ordinal_x: 8,  ordinal_y: 1 },~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  # Sets position, size, and color of the tile~
    +        { ordinal_x: 8,  ordinal_y: 1 },
    +** Processing line: ~        { ordinal_x: 9,  ordinal_y: 1 },~
     - Inside source: true
     *** True Line Result
    -  # Sets position, size, and color of the tile
    -** Processing line: ~  def tile args, x, y, *color~
    +        { ordinal_x: 9,  ordinal_y: 1 },
    +** Processing line: ~        { ordinal_x: 0,  ordinal_y: 2 },~
     - Inside source: true
     *** True Line Result
    -  def tile args, x, y, *color
    -** Processing line: ~    [x * args.state.tile_size, # sets definition for array using method parameters~
    +        { ordinal_x: 0,  ordinal_y: 2 },
    +** Processing line: ~        { ordinal_x: 1,  ordinal_y: 2 },~
     - Inside source: true
     *** True Line Result
    -    [x * args.state.tile_size, # sets definition for array using method parameters
    -** Processing line: ~     y * args.state.tile_size, # multiplying by tile_size sets x and y to correct position using pixel values~
    +        { ordinal_x: 1,  ordinal_y: 2 },
    +** Processing line: ~        { ordinal_x: 2,  ordinal_y: 2 },~
     - Inside source: true
     *** True Line Result
    -     y * args.state.tile_size, # multiplying by tile_size sets x and y to correct position using pixel values
    -** Processing line: ~     args.state.tile_size,~
    +        { ordinal_x: 2,  ordinal_y: 2 },
    +** Processing line: ~        { ordinal_x: 3,  ordinal_y: 2 },~
     - Inside source: true
     *** True Line Result
    -     args.state.tile_size,
    -** Processing line: ~     args.state.tile_size,~
    +        { ordinal_x: 3,  ordinal_y: 2 },
    +** Processing line: ~        { ordinal_x: 4,  ordinal_y: 2 },~
     - Inside source: true
     *** True Line Result
    -     args.state.tile_size,
    -** Processing line: ~     *color]~
    +        { ordinal_x: 4,  ordinal_y: 2 },
    +** Processing line: ~        { ordinal_x: 5,  ordinal_y: 2 },~
     - Inside source: true
     *** True Line Result
    -     *color]
    -** Processing line: ~  end~
    +        { ordinal_x: 5,  ordinal_y: 2 },
    +** Processing line: ~        { ordinal_x: 6,  ordinal_y: 2 },~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +        { ordinal_x: 6,  ordinal_y: 2 },
    +** Processing line: ~        { ordinal_x: 7,  ordinal_y: 2 },~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  # Creates map by adding tiles to the wall, as well as a goal (that the player needs to reach)~
    +        { ordinal_x: 7,  ordinal_y: 2 },
    +** Processing line: ~        { ordinal_x: 8,  ordinal_y: 2 },~
     - Inside source: true
     *** True Line Result
    -  # Creates map by adding tiles to the wall, as well as a goal (that the player needs to reach)
    -** Processing line: ~  def generate_map args~
    +        { ordinal_x: 8,  ordinal_y: 2 },
    +** Processing line: ~        { ordinal_x: 9,  ordinal_y: 2 },~
     - Inside source: true
     *** True Line Result
    -  def generate_map args
    -** Processing line: ~    return if args.state.area~
    +        { ordinal_x: 9,  ordinal_y: 2 },
    +** Processing line: ~      ]~
     - Inside source: true
     *** True Line Result
    -    return if args.state.area
    +      ]
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Creates the area of the map. There are 9 rows running horizontally across the screen~
    +** Processing line: ~      # after initializing the oridinal positions, derive the pixel~
     - Inside source: true
     *** True Line Result
    -    # Creates the area of the map. There are 9 rows running horizontally across the screen
    -** Processing line: ~    # and 16 columns running vertically on the screen. Any spot with a "1" is not~
    +      # after initializing the oridinal positions, derive the pixel
    +** Processing line: ~      # locations assuming that the width and height are 80~
     - Inside source: true
     *** True Line Result
    -    # and 16 columns running vertically on the screen. Any spot with a "1" is not
    -** Processing line: ~    # open for the player to move into (and is green), and any spot with a "0" is available~
    +      # locations assuming that the width and height are 80
    +** Processing line: ~      args.state.inventory_area.each { |i| set_inventory_position args, i }~
     - Inside source: true
     *** True Line Result
    -    # open for the player to move into (and is green), and any spot with a "0" is available
    -** Processing line: ~    # for the player to move in.~
    +      args.state.inventory_area.each { |i| set_inventory_position args, i }
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    # for the player to move in.
    -** Processing line: ~    args.state.area = [~
    +
    +** Processing line: ~      # if you want to see the result you can use the Ruby function called "puts".~
     - Inside source: true
     *** True Line Result
    -    args.state.area = [
    -** Processing line: ~      [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,],~
    +      # if you want to see the result you can use the Ruby function called "puts".
    +** Processing line: ~      # Uncomment this line to see the value.~
     - Inside source: true
     *** True Line Result
    -      [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,],
    -** Processing line: ~      [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,],~
    +      # Uncomment this line to see the value.
    +** Processing line: ~      # puts args.state.inventory_area~
     - Inside source: true
     *** True Line Result
    -      [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,],
    -** Processing line: ~      [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,],~
    +      # puts args.state.inventory_area
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,],
    -** Processing line: ~      [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,],~
    +
    +** Processing line: ~      # You can see all things written via puts in DragonRuby's Console, or under logs/log.txt.~
     - Inside source: true
     *** True Line Result
    -      [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,],
    -** Processing line: ~      [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,],~
    +      # You can see all things written via puts in DragonRuby's Console, or under logs/log.txt.
    +** Processing line: ~      # To bring up DragonRuby's Console, press the ~ key within the game.~
     - Inside source: true
     *** True Line Result
    -      [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,],
    -** Processing line: ~      [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,],~
    +      # To bring up DragonRuby's Console, press the ~ key within the game.
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,],
    -** Processing line: ~      [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,],~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,],
    -** Processing line: ~      [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,],~
    +
    +** Processing line: ~    # define all the oridinal positions of the craft slots~
     - Inside source: true
     *** True Line Result
    -      [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,],
    -** Processing line: ~      [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ],~
    +    # define all the oridinal positions of the craft slots
    +** Processing line: ~    if !args.state.craft_area~
     - Inside source: true
     *** True Line Result
    -      [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ],
    -** Processing line: ~    ].reverse # reverses the order of the area collection~
    +    if !args.state.craft_area
    +** Processing line: ~      args.state.craft_area = [~
     - Inside source: true
     *** True Line Result
    -    ].reverse # reverses the order of the area collection
    -** Processing line: ~~
    +      args.state.craft_area = [
    +** Processing line: ~        { ordinal_x: 0, ordinal_y: 0 },~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # By reversing the order, the way that the area appears above is how it appears~
    +        { ordinal_x: 0, ordinal_y: 0 },
    +** Processing line: ~        { ordinal_x: 0, ordinal_y: 1 },~
     - Inside source: true
     *** True Line Result
    -    # By reversing the order, the way that the area appears above is how it appears
    -** Processing line: ~    # on the screen in the game. If we did not reverse, the map would appear inverted.~
    +        { ordinal_x: 0, ordinal_y: 1 },
    +** Processing line: ~        { ordinal_x: 0, ordinal_y: 2 },~
     - Inside source: true
     *** True Line Result
    -    # on the screen in the game. If we did not reverse, the map would appear inverted.
    -** Processing line: ~~
    +        { ordinal_x: 0, ordinal_y: 2 },
    +** Processing line: ~        { ordinal_x: 1, ordinal_y: 0 },~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    #The wall starts off with no tiles.~
    +        { ordinal_x: 1, ordinal_y: 0 },
    +** Processing line: ~        { ordinal_x: 1, ordinal_y: 1 },~
     - Inside source: true
     *** True Line Result
    -    #The wall starts off with no tiles.
    -** Processing line: ~    args.state.walls = []~
    +        { ordinal_x: 1, ordinal_y: 1 },
    +** Processing line: ~        { ordinal_x: 1, ordinal_y: 2 },~
     - Inside source: true
     *** True Line Result
    -    args.state.walls = []
    -** Processing line: ~    args.state.plants = []~
    +        { ordinal_x: 1, ordinal_y: 2 },
    +** Processing line: ~        { ordinal_x: 2, ordinal_y: 0 },~
     - Inside source: true
     *** True Line Result
    -    args.state.plants = []
    -** Processing line: ~~
    +        { ordinal_x: 2, ordinal_y: 0 },
    +** Processing line: ~        { ordinal_x: 2, ordinal_y: 1 },~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # If v is 1, a green tile is added to args.state.walls.~
    +        { ordinal_x: 2, ordinal_y: 1 },
    +** Processing line: ~        { ordinal_x: 2, ordinal_y: 2 },~
     - Inside source: true
     *** True Line Result
    -    # If v is 1, a green tile is added to args.state.walls.
    -** Processing line: ~    # If v is 2, a black tile is created as the goal.~
    +        { ordinal_x: 2, ordinal_y: 2 },
    +** Processing line: ~      ]~
     - Inside source: true
     *** True Line Result
    -    # If v is 2, a black tile is created as the goal.
    -** Processing line: ~    args.state.area.map_2d do |y, x, v|~
    +      ]
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    args.state.area.map_2d do |y, x, v|
    -** Processing line: ~      if    v == 1~
    +
    +** Processing line: ~      # after initializing the oridinal positions, derive the pixel~
     - Inside source: true
     *** True Line Result
    -      if    v == 1
    -** Processing line: ~        args.state.walls << tile(args, x, y, 255, 160, 156) # green tile~
    +      # after initializing the oridinal positions, derive the pixel
    +** Processing line: ~      # locations assuming that the width and height are 80~
     - Inside source: true
     *** True Line Result
    -        args.state.walls << tile(args, x, y, 255, 160, 156) # green tile
    -** Processing line: ~      end~
    +      # locations assuming that the width and height are 80
    +** Processing line: ~      args.state.craft_area.each { |c| set_craft_position args, c }~
     - Inside source: true
     *** True Line Result
    -      end
    +      args.state.craft_area.each { |c| set_craft_position args, c }
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -100055,662 +101591,706 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # Allows the player to move their box around the screen~
    -- Inside source: true
    -*** True Line Result
    -  # Allows the player to move their box around the screen
    -** Processing line: ~  def move_player args, *vector~
    -- Inside source: true
    -*** True Line Result
    -  def move_player args, *vector
    -** Processing line: ~    box = args.state.player.shift_rect(vector) # box is able to move at an angle~
    -- Inside source: true
    -*** True Line Result
    -    box = args.state.player.shift_rect(vector) # box is able to move at an angle
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # If the player's box hits a wall, it is not able to move further in that direction~
    +** Processing line: ~  def render args~
     - Inside source: true
     *** True Line Result
    -    # If the player's box hits a wall, it is not able to move further in that direction
    -** Processing line: ~    return if args.state.walls~
    +  def render args
    +** Processing line: ~    # for the results area, create a sprite that show its boundaries~
     - Inside source: true
     *** True Line Result
    -    return if args.state.walls
    -** Processing line: ~                  .any_intersect_rect?(box)~
    +    # for the results area, create a sprite that show its boundaries
    +** Processing line: ~    args.outputs.primitives << { x: args.state.result_border.x,~
     - Inside source: true
     *** True Line Result
    -                  .any_intersect_rect?(box)
    -** Processing line: ~~
    +    args.outputs.primitives << { x: args.state.result_border.x,
    +** Processing line: ~                                 y: args.state.result_border.y,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # Player's box is able to move at angles (not just the four general directions) fast~
    +                                 y: args.state.result_border.y,
    +** Processing line: ~                                 w: args.state.result_border.w,~
     - Inside source: true
     *** True Line Result
    -    # Player's box is able to move at angles (not just the four general directions) fast
    -** Processing line: ~    args.state.player =~
    +                                 w: args.state.result_border.w,
    +** Processing line: ~                                 h: args.state.result_border.h,~
     - Inside source: true
     *** True Line Result
    -    args.state.player =
    -** Processing line: ~      args.state.player~
    +                                 h: args.state.result_border.h,
    +** Processing line: ~                                 path: 'sprites/border-black.png' }~
     - Inside source: true
     *** True Line Result
    -      args.state.player
    -** Processing line: ~          .shift_rect(vector.x * args.state.player_speed, # if we don't multiply by speed, then~
    +                                 path: 'sprites/border-black.png' }
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          .shift_rect(vector.x * args.state.player_speed, # if we don't multiply by speed, then
    -** Processing line: ~                      vector.y * args.state.player_speed) # the box will move extremely slow~
    +
    +** Processing line: ~    # for each inventory spot, create a sprite~
     - Inside source: true
     *** True Line Result
    -                      vector.y * args.state.player_speed) # the box will move extremely slow
    -** Processing line: ~  end~
    +    # for each inventory spot, create a sprite
    +** Processing line: ~    # args.outputs.primitives is how DragonRuby performs a render.~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +    # args.outputs.primitives is how DragonRuby performs a render.
    +** Processing line: ~    # Adding a single hash or multiple hashes to this array will tell~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~#+end_src~
    -- Line was identified as the end of a code block.
    +    # Adding a single hash or multiple hashes to this array will tell
    +** Processing line: ~    # DragonRuby to render those primitives on that frame.~
    +- Inside source: true
     *** True Line Result
    -#+end_src
    +    # DragonRuby to render those primitives on that frame.
     ** Processing line: ~~
    -- End of paragraph detected.
    -*** True Line Result
    -
    -** Processing line: ~*** Crafting - Farming Game Starting Point - repl.rb~
    -- Header detected.
    +- Inside source: true
     *** True Line Result
     
    +** Processing line: ~    # The .map function on Array is used instead of any kind of looping.~
    +- Inside source: true
     *** True Line Result
    -*** Crafting - Farming Game Starting Point - repl.rb
    -** Processing line: ~#+begin_src ruby~
    -- Line was identified as the beginning of a code block.
    +    # The .map function on Array is used instead of any kind of looping.
    +** Processing line: ~    # .map returns a new object for every object within an Array.~
    +- Inside source: true
     *** True Line Result
    -
    +    # .map returns a new object for every object within an Array.
    +** Processing line: ~    args.outputs.primitives << args.state.inventory_area.map do |a|~
    +- Inside source: true
     *** True Line Result
    -#+begin_src ruby
    -** Processing line: ~  # ./samples/99_genre_crafting/farming_game_starting_point/app/repl.rb~
    +    args.outputs.primitives << args.state.inventory_area.map do |a|
    +** Processing line: ~      { x: a.x, y: a.y, w: a.w, h: a.h, path: 'sprites/border-black.png' }~
     - Inside source: true
     *** True Line Result
    -  # ./samples/99_genre_crafting/farming_game_starting_point/app/repl.rb
    -** Processing line: ~  # ===============================================================~
    +      { x: a.x, y: a.y, w: a.w, h: a.h, path: 'sprites/border-black.png' }
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  # ===============================================================
    -** Processing line: ~  # Welcome to repl.rb~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  # Welcome to repl.rb
    -** Processing line: ~  # ===============================================================~
    +
    +** Processing line: ~    # for each craft spot, create a sprite~
     - Inside source: true
     *** True Line Result
    -  # ===============================================================
    -** Processing line: ~  # You can experiement with code within this file. Code in this~
    +    # for each craft spot, create a sprite
    +** Processing line: ~    args.outputs.primitives << args.state.craft_area.map do |a|~
     - Inside source: true
     *** True Line Result
    -  # You can experiement with code within this file. Code in this
    -** Processing line: ~  # file is only executed when you save (and only excecuted ONCE).~
    +    args.outputs.primitives << args.state.craft_area.map do |a|
    +** Processing line: ~      { x: a.x, y: a.y, w: a.w, h: a.h, path: 'sprites/border-black.png' }~
     - Inside source: true
     *** True Line Result
    -  # file is only executed when you save (and only excecuted ONCE).
    -** Processing line: ~  # ===============================================================~
    +      { x: a.x, y: a.y, w: a.w, h: a.h, path: 'sprites/border-black.png' }
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  # ===============================================================
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # ===============================================================~
    +** Processing line: ~    # after the borders have been rendered, render the~
     - Inside source: true
     *** True Line Result
    -  # ===============================================================
    -** Processing line: ~  # REMOVE the "x" from the word "xrepl" and save the file to RUN~
    +    # after the borders have been rendered, render the
    +** Processing line: ~    # items within those slots (and allow for highlighting)~
     - Inside source: true
     *** True Line Result
    -  # REMOVE the "x" from the word "xrepl" and save the file to RUN
    -** Processing line: ~  # the code in between the do/end block delimiters.~
    +    # items within those slots (and allow for highlighting)
    +** Processing line: ~    # if an item isn't currently being held~
     - Inside source: true
     *** True Line Result
    -  # the code in between the do/end block delimiters.
    -** Processing line: ~  # ===============================================================~
    +    # if an item isn't currently being held
    +** Processing line: ~    allow_inventory_highlighting = !args.state.held_item~
     - Inside source: true
     *** True Line Result
    -  # ===============================================================
    +    allow_inventory_highlighting = !args.state.held_item
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # ===============================================================~
    +** Processing line: ~    # go through each item and render them~
    +- Inside source: true
    +*** True Line Result
    +    # go through each item and render them
    +** Processing line: ~    # use Array's find_all method to remove any items that are currently being held~
     - Inside source: true
     *** True Line Result
    -  # ===============================================================
    -** Processing line: ~  # ADD the "x" to the word "repl" (make it xrepl) and save the~
    +    # use Array's find_all method to remove any items that are currently being held
    +** Processing line: ~    args.state.items.find_all { |item| item[:location] != :held }.map do |item|~
     - Inside source: true
     *** True Line Result
    -  # ADD the "x" to the word "repl" (make it xrepl) and save the
    -** Processing line: ~  # file to IGNORE the code in between the do/end block delimiters.~
    +    args.state.items.find_all { |item| item[:location] != :held }.map do |item|
    +** Processing line: ~      # if an item is currently being held, don't render it in it's spot within the~
     - Inside source: true
     *** True Line Result
    -  # file to IGNORE the code in between the do/end block delimiters.
    -** Processing line: ~  # ===============================================================~
    +      # if an item is currently being held, don't render it in it's spot within the
    +** Processing line: ~      # inventory or craft area (this is handled via the find_all method).~
     - Inside source: true
     *** True Line Result
    -  # ===============================================================
    +      # inventory or craft area (this is handled via the find_all method).
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # Remove the x from xrepl to run the code. Add the x back to ignore to code.~
    +** Processing line: ~      # the item_prefab returns a hash containing all the visual components of an item.~
     - Inside source: true
     *** True Line Result
    -  # Remove the x from xrepl to run the code. Add the x back to ignore to code.
    -** Processing line: ~  xrepl do~
    +      # the item_prefab returns a hash containing all the visual components of an item.
    +** Processing line: ~      # the main sprite, the black background, the quantity text, and a hover indication~
     - Inside source: true
     *** True Line Result
    -  xrepl do
    -** Processing line: ~    puts "The result of 1 + 2 is: #{1 + 2}"~
    +      # the main sprite, the black background, the quantity text, and a hover indication
    +** Processing line: ~      # if the mouse is currently hovering over the item.~
     - Inside source: true
     *** True Line Result
    -    puts "The result of 1 + 2 is: #{1 + 2}"
    -** Processing line: ~  end~
    +      # if the mouse is currently hovering over the item.
    +** Processing line: ~      args.outputs.primitives << item_prefab(args, item, allow_inventory_highlighting, args.inputs.mouse)~
     - Inside source: true
     *** True Line Result
    -  end
    +      args.outputs.primitives << item_prefab(args, item, allow_inventory_highlighting, args.inputs.mouse)
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # ====================================================================================~
    +** Processing line: ~    # The last thing we want to render is the item currently being held.~
     - Inside source: true
     *** True Line Result
    -  # ====================================================================================
    -** Processing line: ~  # Ruby Crash Course:~
    +    # The last thing we want to render is the item currently being held.
    +** Processing line: ~    args.outputs.primitives << item_prefab(args, args.state.held_item, allow_inventory_highlighting, args.inputs.mouse)~
     - Inside source: true
     *** True Line Result
    -  # Ruby Crash Course:
    -** Processing line: ~  # Strings, Numeric, Booleans, Conditionals, Looping, Enumerables, Arrays~
    +    args.outputs.primitives << item_prefab(args, args.state.held_item, allow_inventory_highlighting, args.inputs.mouse)
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  # Strings, Numeric, Booleans, Conditionals, Looping, Enumerables, Arrays
    -** Processing line: ~  # ====================================================================================~
    +
    +** Processing line: ~    args.outputs.primitives << args.state.click_ripples~
     - Inside source: true
     *** True Line Result
    -  # ====================================================================================
    +    args.outputs.primitives << args.state.click_ripples
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # ====================================================================================~
    +** Processing line: ~    # render a mouse cursor since we have the OS cursor hidden~
     - Inside source: true
     *** True Line Result
    -  # ====================================================================================
    -** Processing line: ~  #  Strings~
    +    # render a mouse cursor since we have the OS cursor hidden
    +** Processing line: ~    args.outputs.primitives << { x: args.inputs.mouse.x - 5, y: args.inputs.mouse.y - 5, w: 10, h: 10, path: 'sprites/circle-gray.png', a: 128 }~
     - Inside source: true
     *** True Line Result
    -  #  Strings
    -** Processing line: ~  # ====================================================================================~
    +    args.outputs.primitives << { x: args.inputs.mouse.x - 5, y: args.inputs.mouse.y - 5, w: 10, h: 10, path: 'sprites/circle-gray.png', a: 128 }
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -  # ====================================================================================
    -** Processing line: ~  # Remove the x from xrepl to run the code. Add the x back to ignore to code.~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  # Remove the x from xrepl to run the code. Add the x back to ignore to code.
    -** Processing line: ~  xrepl do~
    +
    +** Processing line: ~  # Alrighty! This is where all the fun happens~
     - Inside source: true
     *** True Line Result
    -  xrepl do
    -** Processing line: ~    message = "Hello World"~
    +  # Alrighty! This is where all the fun happens
    +** Processing line: ~  def input args~
     - Inside source: true
     *** True Line Result
    -    message = "Hello World"
    -** Processing line: ~    puts "The value of message is: " + message~
    +  def input args
    +** Processing line: ~    # if the mouse is clicked and not item is currently being held~
     - Inside source: true
     *** True Line Result
    -    puts "The value of message is: " + message
    -** Processing line: ~    puts "Any value can be interpolated within a string using \#{}."~
    +    # if the mouse is clicked and not item is currently being held
    +** Processing line: ~    # args.state.held_item is nil when the game starts.~
     - Inside source: true
     *** True Line Result
    -    puts "Any value can be interpolated within a string using \#{}."
    -** Processing line: ~    puts "Interpolated message: #{message}."~
    +    # args.state.held_item is nil when the game starts.
    +** Processing line: ~    # If the player clicks, the property args.inputs.mouse.click will~
     - Inside source: true
     *** True Line Result
    -    puts "Interpolated message: #{message}."
    -** Processing line: ~    puts 'This #{message} is not interpolated because the string uses single quotes.'~
    +    # If the player clicks, the property args.inputs.mouse.click will
    +** Processing line: ~    # be a non nil value, we don't want to process any of the code here~
     - Inside source: true
     *** True Line Result
    -    puts 'This #{message} is not interpolated because the string uses single quotes.'
    -** Processing line: ~  end~
    +    # be a non nil value, we don't want to process any of the code here
    +** Processing line: ~    # if the mouse hasn't been clicked~
     - Inside source: true
     *** True Line Result
    -  end
    +    # if the mouse hasn't been clicked
    +** Processing line: ~    return if !args.inputs.mouse.click~
    +- Inside source: true
    +*** True Line Result
    +    return if !args.inputs.mouse.click
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # ====================================================================================~
    +** Processing line: ~    # if a click occurred, add a ripple to the ripple queue~
     - Inside source: true
     *** True Line Result
    -  # ====================================================================================
    -** Processing line: ~  #  Numerics~
    +    # if a click occurred, add a ripple to the ripple queue
    +** Processing line: ~    args.state.click_ripples << { x: args.inputs.mouse.x - 5, y: args.inputs.mouse.y - 5, w: 10, h: 10, path: 'sprites/circle-gray.png', a: 128 }~
     - Inside source: true
     *** True Line Result
    -  #  Numerics
    -** Processing line: ~  # ====================================================================================~
    +    args.state.click_ripples << { x: args.inputs.mouse.x - 5, y: args.inputs.mouse.y - 5, w: 10, h: 10, path: 'sprites/circle-gray.png', a: 128 }
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  # ====================================================================================
    -** Processing line: ~  # Remove the x from xrepl to run the code. Add the x back to ignore to code.~
    +
    +** Processing line: ~    # if the mouse has been clicked, and no item is currently held...~
     - Inside source: true
     *** True Line Result
    -  # Remove the x from xrepl to run the code. Add the x back to ignore to code.
    -** Processing line: ~  xrepl do~
    +    # if the mouse has been clicked, and no item is currently held...
    +** Processing line: ~    if !args.state.held_item~
     - Inside source: true
     *** True Line Result
    -  xrepl do
    -** Processing line: ~    a = 10~
    +    if !args.state.held_item
    +** Processing line: ~      # see if any of the items intersect the pointer using the inside_rect? method~
     - Inside source: true
     *** True Line Result
    -    a = 10
    -** Processing line: ~    puts "The value of a is: #{a}"~
    +      # see if any of the items intersect the pointer using the inside_rect? method
    +** Processing line: ~      # the find method will either return the first object that returns true~
     - Inside source: true
     *** True Line Result
    -    puts "The value of a is: #{a}"
    -** Processing line: ~    puts "a + 1 is: #{a + 1}"~
    +      # the find method will either return the first object that returns true
    +** Processing line: ~      # for the match clause, or it'll return nil if nothing matches the match clause~
     - Inside source: true
     *** True Line Result
    -    puts "a + 1 is: #{a + 1}"
    -** Processing line: ~    puts "a / 3 is: #{a / 3}"~
    +      # for the match clause, or it'll return nil if nothing matches the match clause
    +** Processing line: ~      found = args.state.items.find do |item|~
     - Inside source: true
     *** True Line Result
    -    puts "a / 3 is: #{a / 3}"
    -** Processing line: ~  end~
    +      found = args.state.items.find do |item|
    +** Processing line: ~        # for each item in args.state.items, run the following boolean check~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +        # for each item in args.state.items, run the following boolean check
    +** Processing line: ~        args.inputs.mouse.click.point.inside_rect?(item)~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  # Remove the x from xrepl to run the code. Add the x back to ignore to code.~
    +        args.inputs.mouse.click.point.inside_rect?(item)
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -  # Remove the x from xrepl to run the code. Add the x back to ignore to code.
    -** Processing line: ~  xrepl do~
    +      end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  xrepl do
    -** Processing line: ~    b = 10.12~
    +
    +** Processing line: ~      # if an item intersects the mouse pointer, then set the item's location to :held and~
     - Inside source: true
     *** True Line Result
    -    b = 10.12
    -** Processing line: ~    puts "The value of b is: #{b}"~
    +      # if an item intersects the mouse pointer, then set the item's location to :held and
    +** Processing line: ~      # set args.state.held_item to the item for later reference~
     - Inside source: true
     *** True Line Result
    -    puts "The value of b is: #{b}"
    -** Processing line: ~    puts "b + 1 is: #{b + 1}"~
    +      # set args.state.held_item to the item for later reference
    +** Processing line: ~      if found~
     - Inside source: true
     *** True Line Result
    -    puts "b + 1 is: #{b + 1}"
    -** Processing line: ~    puts "b as an integer is: #{b.to_i}"~
    +      if found
    +** Processing line: ~        args.state.held_item = found~
     - Inside source: true
     *** True Line Result
    -    puts "b as an integer is: #{b.to_i}"
    -** Processing line: ~    puts ''~
    +        args.state.held_item = found
    +** Processing line: ~        found[:location] = :held~
     - Inside source: true
     *** True Line Result
    -    puts ''
    -** Processing line: ~  end~
    +        found[:location] = :held
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -  end
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # ====================================================================================~
    +** Processing line: ~    # if the mouse is clicked and an item is currently beign held....~
     - Inside source: true
     *** True Line Result
    -  # ====================================================================================
    -** Processing line: ~  #  Booleans~
    +    # if the mouse is clicked and an item is currently beign held....
    +** Processing line: ~    elsif args.state.held_item~
     - Inside source: true
     *** True Line Result
    -  #  Booleans
    -** Processing line: ~  # ====================================================================================~
    +    elsif args.state.held_item
    +** Processing line: ~      # determine if a slot within the craft area was clicked~
     - Inside source: true
     *** True Line Result
    -  # ====================================================================================
    -** Processing line: ~  # Remove the x from xrepl to run the code. Add the x back to ignore to code.~
    +      # determine if a slot within the craft area was clicked
    +** Processing line: ~      craft_area = args.state.craft_area.find { |a| args.inputs.mouse.click.point.inside_rect? a }~
     - Inside source: true
     *** True Line Result
    -  # Remove the x from xrepl to run the code. Add the x back to ignore to code.
    -** Processing line: ~  xrepl do~
    +      craft_area = args.state.craft_area.find { |a| args.inputs.mouse.click.point.inside_rect? a }
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  xrepl do
    -** Processing line: ~    c = 30~
    +
    +** Processing line: ~      # also determine if a slot within the inventory area was clicked~
     - Inside source: true
     *** True Line Result
    -    c = 30
    -** Processing line: ~    puts "The value of c is #{c}."~
    +      # also determine if a slot within the inventory area was clicked
    +** Processing line: ~      inventory_area = args.state.inventory_area.find { |a| args.inputs.mouse.click.point.inside_rect? a }~
     - Inside source: true
     *** True Line Result
    -    puts "The value of c is #{c}."
    +      inventory_area = args.state.inventory_area.find { |a| args.inputs.mouse.click.point.inside_rect? a }
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    if c~
    +** Processing line: ~      # if the click was within a craft area~
     - Inside source: true
     *** True Line Result
    -    if c
    -** Processing line: ~      puts "This if statement ran because c is truthy."~
    +      # if the click was within a craft area
    +** Processing line: ~      if craft_area~
     - Inside source: true
     *** True Line Result
    -      puts "This if statement ran because c is truthy."
    -** Processing line: ~    end~
    +      if craft_area
    +** Processing line: ~        # check to see if an item is already there and ignore the click if an item is found~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~  end~
    +        # check to see if an item is already there and ignore the click if an item is found
    +** Processing line: ~        # item_at_craft_slot is a helper method that returns an item or nil for a given oridinal~
     - Inside source: true
     *** True Line Result
    -  end
    +        # item_at_craft_slot is a helper method that returns an item or nil for a given oridinal
    +** Processing line: ~        # position~
    +- Inside source: true
    +*** True Line Result
    +        # position
    +** Processing line: ~        item_already_there = item_at_craft_slot args, craft_area[:ordinal_x], craft_area[:ordinal_y]~
    +- Inside source: true
    +*** True Line Result
    +        item_already_there = item_at_craft_slot args, craft_area[:ordinal_x], craft_area[:ordinal_y]
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # Remove the x from xrepl to run the code. Add the x back to ignore to code.~
    +** Processing line: ~        # if an item *doesn't* exist in the craft area~
     - Inside source: true
     *** True Line Result
    -  # Remove the x from xrepl to run the code. Add the x back to ignore to code.
    -** Processing line: ~  xrepl do~
    +        # if an item *doesn't* exist in the craft area
    +** Processing line: ~        if !item_already_there~
     - Inside source: true
     *** True Line Result
    -  xrepl do
    -** Processing line: ~    d = false~
    +        if !item_already_there
    +** Processing line: ~          # if the quantity they are currently holding is greater than 1~
     - Inside source: true
     *** True Line Result
    -    d = false
    -** Processing line: ~    puts "The value of d is #{d}."~
    +          # if the quantity they are currently holding is greater than 1
    +** Processing line: ~          if args.state.held_item[:quantity] > 1~
     - Inside source: true
     *** True Line Result
    -    puts "The value of d is #{d}."
    -** Processing line: ~~
    +          if args.state.held_item[:quantity] > 1
    +** Processing line: ~            # remove one item (creating a seperate item of the same type), and place it~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    if !d~
    +            # remove one item (creating a seperate item of the same type), and place it
    +** Processing line: ~            # at the oridinal position and location of the craft area~
     - Inside source: true
     *** True Line Result
    -    if !d
    -** Processing line: ~      puts "This if statement ran because d is falsey, using the not operator (!) makes d evaluate to true."~
    +            # at the oridinal position and location of the craft area
    +** Processing line: ~            # the .merge method on Hash creates a new Hash, but updates any values~
     - Inside source: true
     *** True Line Result
    -      puts "This if statement ran because d is falsey, using the not operator (!) makes d evaluate to true."
    -** Processing line: ~    end~
    +            # the .merge method on Hash creates a new Hash, but updates any values
    +** Processing line: ~            # passed as arguments to merge~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +            # passed as arguments to merge
    +** Processing line: ~            new_item = args.state.held_item.merge(quantity: 1,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    e = nil~
    +            new_item = args.state.held_item.merge(quantity: 1,
    +** Processing line: ~                                                  location: :craft,~
     - Inside source: true
     *** True Line Result
    -    e = nil
    -** Processing line: ~    puts "Nil is also considered falsey. The value of e is: #{e}."~
    +                                                  location: :craft,
    +** Processing line: ~                                                  ordinal_x: craft_area[:ordinal_x],~
     - Inside source: true
     *** True Line Result
    -    puts "Nil is also considered falsey. The value of e is: #{e}."
    +                                                  ordinal_x: craft_area[:ordinal_x],
    +** Processing line: ~                                                  ordinal_y: craft_area[:ordinal_y])~
    +- Inside source: true
    +*** True Line Result
    +                                                  ordinal_y: craft_area[:ordinal_y])
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    if !e~
    +** Processing line: ~            # after the item is crated, place it into the args.state.items collection~
     - Inside source: true
     *** True Line Result
    -    if !e
    -** Processing line: ~      puts "This if statement ran because e is nil (a falsey value)."~
    +            # after the item is crated, place it into the args.state.items collection
    +** Processing line: ~            args.state.items << new_item~
     - Inside source: true
     *** True Line Result
    -      puts "This if statement ran because e is nil (a falsey value)."
    -** Processing line: ~    end~
    +            args.state.items << new_item
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~  end~
    +
    +** Processing line: ~            # then subtract one from the held item~
     - Inside source: true
     *** True Line Result
    -  end
    +            # then subtract one from the held item
    +** Processing line: ~            args.state.held_item[:quantity] -= 1~
    +- Inside source: true
    +*** True Line Result
    +            args.state.held_item[:quantity] -= 1
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # ====================================================================================~
    +** Processing line: ~          # if the craft area is available and there is only one item being held~
     - Inside source: true
     *** True Line Result
    -  # ====================================================================================
    -** Processing line: ~  #  Conditionals~
    +          # if the craft area is available and there is only one item being held
    +** Processing line: ~          elsif args.state.held_item[:quantity] == 1~
     - Inside source: true
     *** True Line Result
    -  #  Conditionals
    -** Processing line: ~  # ====================================================================================~
    +          elsif args.state.held_item[:quantity] == 1
    +** Processing line: ~            # instead of creating any new items just set the location of the held item~
     - Inside source: true
     *** True Line Result
    -  # ====================================================================================
    -** Processing line: ~  # Remove the x from xrepl to run the code. Add the x back to ignore to code.~
    +            # instead of creating any new items just set the location of the held item
    +** Processing line: ~            # to the oridinal position of the craft area, and then nil out the~
     - Inside source: true
     *** True Line Result
    -  # Remove the x from xrepl to run the code. Add the x back to ignore to code.
    -** Processing line: ~  xrepl do~
    +            # to the oridinal position of the craft area, and then nil out the
    +** Processing line: ~            # held item state so that a new item can be picked up~
     - Inside source: true
     *** True Line Result
    -  xrepl do
    -** Processing line: ~    i_am_true  = true~
    +            # held item state so that a new item can be picked up
    +** Processing line: ~            args.state.held_item[:location] = :craft~
     - Inside source: true
     *** True Line Result
    -    i_am_true  = true
    -** Processing line: ~    i_am_nil   = nil~
    +            args.state.held_item[:location] = :craft
    +** Processing line: ~            args.state.held_item[:ordinal_x] = craft_area[:ordinal_x]~
     - Inside source: true
     *** True Line Result
    -    i_am_nil   = nil
    -** Processing line: ~    i_am_false = false~
    +            args.state.held_item[:ordinal_x] = craft_area[:ordinal_x]
    +** Processing line: ~            args.state.held_item[:ordinal_y] = craft_area[:ordinal_y]~
     - Inside source: true
     *** True Line Result
    -    i_am_false = false
    -** Processing line: ~    i_am_hi    = "hi"~
    +            args.state.held_item[:ordinal_y] = craft_area[:ordinal_y]
    +** Processing line: ~            args.state.held_item = nil~
     - Inside source: true
     *** True Line Result
    -    i_am_hi    = "hi"
    +            args.state.held_item = nil
    +** Processing line: ~          end~
    +- Inside source: true
    +*** True Line Result
    +          end
    +** Processing line: ~        end~
    +- Inside source: true
    +*** True Line Result
    +        end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    puts "======== if statement"~
    +** Processing line: ~      # if the selected area is an inventory area (as opposed to within the craft area)~
     - Inside source: true
     *** True Line Result
    -    puts "======== if statement"
    -** Processing line: ~    i_am_one = 1~
    +      # if the selected area is an inventory area (as opposed to within the craft area)
    +** Processing line: ~      elsif inventory_area~
     - Inside source: true
     *** True Line Result
    -    i_am_one = 1
    -** Processing line: ~    if i_am_one~
    +      elsif inventory_area
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    if i_am_one
    -** Processing line: ~      puts "This was printed because i_am_one is truthy."~
    +
    +** Processing line: ~        # check to see if there is already an item in that inventory slot~
     - Inside source: true
     *** True Line Result
    -      puts "This was printed because i_am_one is truthy."
    -** Processing line: ~    end~
    +        # check to see if there is already an item in that inventory slot
    +** Processing line: ~        # the item_at_inventory_slot helper method returns an item or nil~
     - Inside source: true
     *** True Line Result
    -    end
    +        # the item_at_inventory_slot helper method returns an item or nil
    +** Processing line: ~        item_already_there = item_at_inventory_slot args, inventory_area[:ordinal_x], inventory_area[:ordinal_y]~
    +- Inside source: true
    +*** True Line Result
    +        item_already_there = item_at_inventory_slot args, inventory_area[:ordinal_x], inventory_area[:ordinal_y]
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    puts "======== if/else statement"~
    +** Processing line: ~        # if there is already an item there, and the item types/id match~
     - Inside source: true
     *** True Line Result
    -    puts "======== if/else statement"
    -** Processing line: ~    if i_am_false~
    +        # if there is already an item there, and the item types/id match
    +** Processing line: ~        if item_already_there && item_already_there[:id] == args.state.held_item[:id]~
     - Inside source: true
     *** True Line Result
    -    if i_am_false
    -** Processing line: ~      puts "This will NOT get printed because i_am_false is false."~
    +        if item_already_there && item_already_there[:id] == args.state.held_item[:id]
    +** Processing line: ~          # then merge the item quantities~
     - Inside source: true
     *** True Line Result
    -      puts "This will NOT get printed because i_am_false is false."
    -** Processing line: ~    else~
    +          # then merge the item quantities
    +** Processing line: ~          held_quantity = args.state.held_item[:quantity]~
     - Inside source: true
     *** True Line Result
    -    else
    -** Processing line: ~      puts "This was printed because i_am_false is false."~
    +          held_quantity = args.state.held_item[:quantity]
    +** Processing line: ~          item_already_there[:quantity] += held_quantity~
     - Inside source: true
     *** True Line Result
    -      puts "This was printed because i_am_false is false."
    -** Processing line: ~    end~
    +          item_already_there[:quantity] += held_quantity
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    end
    +
    +** Processing line: ~          # remove the item being held from the items collection (since it's quantity is now 0)~
    +- Inside source: true
    +*** True Line Result
    +          # remove the item being held from the items collection (since it's quantity is now 0)
    +** Processing line: ~          args.state.items.reject! { |i| i[:location] == :held }~
    +- Inside source: true
    +*** True Line Result
    +          args.state.items.reject! { |i| i[:location] == :held }
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    puts "======== if/elsif/else statement"~
    +** Processing line: ~          # nil out the held_item so a new item can be picked up~
     - Inside source: true
     *** True Line Result
    -    puts "======== if/elsif/else statement"
    -** Processing line: ~    if i_am_false~
    +          # nil out the held_item so a new item can be picked up
    +** Processing line: ~          args.state.held_item = nil~
     - Inside source: true
     *** True Line Result
    -    if i_am_false
    -** Processing line: ~      puts "This will NOT get printed because i_am_false is false."~
    +          args.state.held_item = nil
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      puts "This will NOT get printed because i_am_false is false."
    -** Processing line: ~    elsif i_am_true~
    +
    +** Processing line: ~        # if there currently isn't an item there, then put the held item in the slot~
     - Inside source: true
     *** True Line Result
    -    elsif i_am_true
    -** Processing line: ~      puts "This was printed because i_am_true is true."~
    +        # if there currently isn't an item there, then put the held item in the slot
    +** Processing line: ~        elsif !item_already_there~
     - Inside source: true
     *** True Line Result
    -      puts "This was printed because i_am_true is true."
    -** Processing line: ~    else~
    +        elsif !item_already_there
    +** Processing line: ~          args.state.held_item[:location] = :inventory~
     - Inside source: true
     *** True Line Result
    -    else
    -** Processing line: ~      puts "This will NOT get printed i_am_true was true."~
    +          args.state.held_item[:location] = :inventory
    +** Processing line: ~          args.state.held_item[:ordinal_x] = inventory_area[:ordinal_x]~
     - Inside source: true
     *** True Line Result
    -      puts "This will NOT get printed i_am_true was true."
    -** Processing line: ~    end~
    +          args.state.held_item[:ordinal_x] = inventory_area[:ordinal_x]
    +** Processing line: ~          args.state.held_item[:ordinal_y] = inventory_area[:ordinal_y]~
     - Inside source: true
     *** True Line Result
    -    end
    +          args.state.held_item[:ordinal_y] = inventory_area[:ordinal_y]
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    puts "======== case statement "~
    +** Processing line: ~          # nil out the held_item so a new item can be picked up~
     - Inside source: true
     *** True Line Result
    -    puts "======== case statement "
    -** Processing line: ~    i_am_one = 1~
    +          # nil out the held_item so a new item can be picked up
    +** Processing line: ~          args.state.held_item = nil~
     - Inside source: true
     *** True Line Result
    -    i_am_one = 1
    -** Processing line: ~    case i_am_one~
    +          args.state.held_item = nil
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -    case i_am_one
    -** Processing line: ~    when 10~
    +        end
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    when 10
    -** Processing line: ~      puts "case equaled: 10"~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      puts "case equaled: 10"
    -** Processing line: ~    when 9~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    when 9
    -** Processing line: ~      puts "case equaled: 9"~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      puts "case equaled: 9"
    -** Processing line: ~    when 5~
    +
    +** Processing line: ~  # the calc method is executed after input~
     - Inside source: true
     *** True Line Result
    -    when 5
    -** Processing line: ~      puts "case equaled: 5"~
    +  # the calc method is executed after input
    +** Processing line: ~  def calc args~
     - Inside source: true
     *** True Line Result
    -      puts "case equaled: 5"
    -** Processing line: ~    when 1~
    +  def calc args
    +** Processing line: ~    # make sure that the real position of the inventory~
     - Inside source: true
     *** True Line Result
    -    when 1
    -** Processing line: ~      puts "case equaled: 1"~
    +    # make sure that the real position of the inventory
    +** Processing line: ~    # items are updated every frame to ensure that they~
     - Inside source: true
     *** True Line Result
    -      puts "case equaled: 1"
    -** Processing line: ~    else~
    +    # items are updated every frame to ensure that they
    +** Processing line: ~    # are placed correctly given their location and oridinal positions~
     - Inside source: true
     *** True Line Result
    -    else
    -** Processing line: ~      puts "Value wasn't cased."~
    +    # are placed correctly given their location and oridinal positions
    +** Processing line: ~    # instead of using .map, here we use .each (since we are not returning a new item and just updating the items in place)~
     - Inside source: true
     *** True Line Result
    -      puts "Value wasn't cased."
    -** Processing line: ~    end~
    +    # instead of using .map, here we use .each (since we are not returning a new item and just updating the items in place)
    +** Processing line: ~    args.state.items.each do |item|~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +    args.state.items.each do |item|
    +** Processing line: ~      # based on the location of the item, invoke the correct pixel conversion method~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    puts "======== different types of comparisons"~
    +      # based on the location of the item, invoke the correct pixel conversion method
    +** Processing line: ~      if item[:location] == :inventory~
     - Inside source: true
     *** True Line Result
    -    puts "======== different types of comparisons"
    -** Processing line: ~    if 4 == 4~
    +      if item[:location] == :inventory
    +** Processing line: ~        set_inventory_position args, item~
     - Inside source: true
     *** True Line Result
    -    if 4 == 4
    -** Processing line: ~      puts "equal (4 == 4)"~
    +        set_inventory_position args, item
    +** Processing line: ~      elsif item[:location] == :craft~
     - Inside source: true
     *** True Line Result
    -      puts "equal (4 == 4)"
    -** Processing line: ~    end~
    +      elsif item[:location] == :craft
    +** Processing line: ~        set_craft_position args, item~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +        set_craft_position args, item
    +** Processing line: ~      elsif item[:location] == :held~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    if 4 != 3~
    +      elsif item[:location] == :held
    +** Processing line: ~        # if the item is held, center the item around the mouse pointer~
     - Inside source: true
     *** True Line Result
    -    if 4 != 3
    -** Processing line: ~      puts "not equal (4 != 3)"~
    +        # if the item is held, center the item around the mouse pointer
    +** Processing line: ~        args.state.held_item.x = args.inputs.mouse.x - args.state.held_item.w.half~
    +- Inside source: true
    +*** True Line Result
    +        args.state.held_item.x = args.inputs.mouse.x - args.state.held_item.w.half
    +** Processing line: ~        args.state.held_item.y = args.inputs.mouse.y - args.state.held_item.h.half~
    +- Inside source: true
    +*** True Line Result
    +        args.state.held_item.y = args.inputs.mouse.y - args.state.held_item.h.half
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -      puts "not equal (4 != 3)"
    +      end
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -100719,46 +102299,50 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    if 3 < 4~
    +** Processing line: ~    # for each hash/sprite in the click ripples queue,~
     - Inside source: true
     *** True Line Result
    -    if 3 < 4
    -** Processing line: ~      puts "less than (3 < 4)"~
    +    # for each hash/sprite in the click ripples queue,
    +** Processing line: ~    # expand its size by 20 percent and decrease its alpha~
     - Inside source: true
     *** True Line Result
    -      puts "less than (3 < 4)"
    -** Processing line: ~    end~
    +    # expand its size by 20 percent and decrease its alpha
    +** Processing line: ~    # by 10.~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +    # by 10.
    +** Processing line: ~    args.state.click_ripples.each do |ripple|~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    if 4 > 3~
    +    args.state.click_ripples.each do |ripple|
    +** Processing line: ~      delta_w = ripple.w * 1.2 - ripple.w~
     - Inside source: true
     *** True Line Result
    -    if 4 > 3
    -** Processing line: ~      puts "greater than (4 > 3)"~
    +      delta_w = ripple.w * 1.2 - ripple.w
    +** Processing line: ~      delta_h = ripple.h * 1.2 - ripple.h~
     - Inside source: true
     *** True Line Result
    -      puts "greater than (4 > 3)"
    -** Processing line: ~    end~
    +      delta_h = ripple.h * 1.2 - ripple.h
    +** Processing line: ~      ripple.x -= delta_w.half~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +      ripple.x -= delta_w.half
    +** Processing line: ~      ripple.y -= delta_h.half~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    if ((4 > 3) || (3 < 4) || false)~
    +      ripple.y -= delta_h.half
    +** Processing line: ~      ripple.w += delta_w~
     - Inside source: true
     *** True Line Result
    -    if ((4 > 3) || (3 < 4) || false)
    -** Processing line: ~      puts "or statement ((4 > 3) || (3 < 4) || false)"~
    +      ripple.w += delta_w
    +** Processing line: ~      ripple.h += delta_h~
    +- Inside source: true
    +*** True Line Result
    +      ripple.h += delta_h
    +** Processing line: ~      ripple.a -= 10~
     - Inside source: true
     *** True Line Result
    -      puts "or statement ((4 > 3) || (3 < 4) || false)"
    +      ripple.a -= 10
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -100767,18 +102351,22 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    if ((4 > 3) && (3 < 4))~
    +** Processing line: ~    # remove any items from the collection where the alpha value is less than equal to~
     - Inside source: true
     *** True Line Result
    -    if ((4 > 3) && (3 < 4))
    -** Processing line: ~      puts "and statement ((4 > 3) && (3 < 4))"~
    +    # remove any items from the collection where the alpha value is less than equal to
    +** Processing line: ~    # zero using the reject! method (reject with an exclamation point at the end changes the~
     - Inside source: true
     *** True Line Result
    -      puts "and statement ((4 > 3) && (3 < 4))"
    -** Processing line: ~    end~
    +    # zero using the reject! method (reject with an exclamation point at the end changes the
    +** Processing line: ~    # array value in place, while reject without the exclamation point returns a new array).~
     - Inside source: true
     *** True Line Result
    -    end
    +    # array value in place, while reject without the exclamation point returns a new array).
    +** Processing line: ~    args.state.click_ripples.reject! { |ripple| ripple.a <= 0 }~
    +- Inside source: true
    +*** True Line Result
    +    args.state.click_ripples.reject! { |ripple| ripple.a <= 0 }
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -100787,146 +102375,162 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # ====================================================================================~
    +** Processing line: ~  # helper function for finding an item at a craft slot~
     - Inside source: true
     *** True Line Result
    -  # ====================================================================================
    -** Processing line: ~  # Looping~
    +  # helper function for finding an item at a craft slot
    +** Processing line: ~  def item_at_craft_slot args, ordinal_x, ordinal_y~
     - Inside source: true
     *** True Line Result
    -  # Looping
    -** Processing line: ~  # ====================================================================================~
    +  def item_at_craft_slot args, ordinal_x, ordinal_y
    +** Processing line: ~    args.state.items.find { |i| i[:location] == :craft && i[:ordinal_x] == ordinal_x && i[:ordinal_y] == ordinal_y }~
     - Inside source: true
     *** True Line Result
    -  # ====================================================================================
    -** Processing line: ~  # Remove the x from xrepl to run the code. Add the x back to ignore to code.~
    +    args.state.items.find { |i| i[:location] == :craft && i[:ordinal_x] == ordinal_x && i[:ordinal_y] == ordinal_y }
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -  # Remove the x from xrepl to run the code. Add the x back to ignore to code.
    -** Processing line: ~  xrepl do~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  xrepl do
    -** Processing line: ~    puts "======== times block"~
    +
    +** Processing line: ~  # helper function for finding an item at an inventory slot~
     - Inside source: true
     *** True Line Result
    -    puts "======== times block"
    -** Processing line: ~    3.times do |i|~
    +  # helper function for finding an item at an inventory slot
    +** Processing line: ~  def item_at_inventory_slot args, ordinal_x, ordinal_y~
     - Inside source: true
     *** True Line Result
    -    3.times do |i|
    -** Processing line: ~      puts i~
    +  def item_at_inventory_slot args, ordinal_x, ordinal_y
    +** Processing line: ~    args.state.items.find { |i| i[:location] == :inventory && i[:ordinal_x] == ordinal_x && i[:ordinal_y] == ordinal_y }~
     - Inside source: true
     *** True Line Result
    -      puts i
    -** Processing line: ~    end~
    +    args.state.items.find { |i| i[:location] == :inventory && i[:ordinal_x] == ordinal_x && i[:ordinal_y] == ordinal_y }
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~    puts "======== range block exclusive"~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    puts "======== range block exclusive"
    -** Processing line: ~    (0...3).each do |i|~
    +
    +** Processing line: ~  # helper function that creates a visual representation of an item~
     - Inside source: true
     *** True Line Result
    -    (0...3).each do |i|
    -** Processing line: ~      puts i~
    +  # helper function that creates a visual representation of an item
    +** Processing line: ~  def item_prefab args, item, should_highlight, mouse~
     - Inside source: true
     *** True Line Result
    -      puts i
    -** Processing line: ~    end~
    +  def item_prefab args, item, should_highlight, mouse
    +** Processing line: ~    return nil unless item~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~    puts "======== range block inclusive"~
    +    return nil unless item
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    puts "======== range block inclusive"
    -** Processing line: ~    (0..3).each do |i|~
    +
    +** Processing line: ~    overlay = nil~
     - Inside source: true
     *** True Line Result
    -    (0..3).each do |i|
    -** Processing line: ~      puts i~
    +    overlay = nil
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      puts i
    -** Processing line: ~    end~
    +
    +** Processing line: ~    x = item.x~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~  end~
    +    x = item.x
    +** Processing line: ~    y = item.y~
     - Inside source: true
     *** True Line Result
    -  end
    +    y = item.y
    +** Processing line: ~    w = item.w~
    +- Inside source: true
    +*** True Line Result
    +    w = item.w
    +** Processing line: ~    h = item.h~
    +- Inside source: true
    +*** True Line Result
    +    h = item.h
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # ====================================================================================~
    +** Processing line: ~    if should_highlight && mouse.point.inside_rect?(item)~
     - Inside source: true
     *** True Line Result
    -  # ====================================================================================
    -** Processing line: ~  #  Enumerables~
    +    if should_highlight && mouse.point.inside_rect?(item)
    +** Processing line: ~      overlay = { x: x, y: y, w: w, h: h, path: "sprites/square-blue.png", a: 130, }~
     - Inside source: true
     *** True Line Result
    -  #  Enumerables
    -** Processing line: ~  # ====================================================================================~
    +      overlay = { x: x, y: y, w: w, h: h, path: "sprites/square-blue.png", a: 130, }
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  # ====================================================================================
    -** Processing line: ~  # Remove the x from xrepl to run the code. Add the x back to ignore to code.~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  # Remove the x from xrepl to run the code. Add the x back to ignore to code.
    -** Processing line: ~  xrepl do~
    +
    +** Processing line: ~    [~
     - Inside source: true
     *** True Line Result
    -  xrepl do
    -** Processing line: ~    puts "======== array each"~
    +    [
    +** Processing line: ~      # sprites are hashes with a path property, this is the main sprite~
     - Inside source: true
     *** True Line Result
    -    puts "======== array each"
    -** Processing line: ~    colors = ["red", "blue", "yellow"]~
    +      # sprites are hashes with a path property, this is the main sprite
    +** Processing line: ~      { x: x,      y: y, w: args.state.sprite_size, h: args.state.sprite_size, path: item[:path], },~
     - Inside source: true
     *** True Line Result
    -    colors = ["red", "blue", "yellow"]
    -** Processing line: ~    colors.each do |color|~
    +      { x: x,      y: y, w: args.state.sprite_size, h: args.state.sprite_size, path: item[:path], },
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    colors.each do |color|
    -** Processing line: ~      puts color~
    +
    +** Processing line: ~      # this represents the black area in the bottom right corner of the main sprite so that the~
     - Inside source: true
     *** True Line Result
    -      puts color
    -** Processing line: ~    end~
    +      # this represents the black area in the bottom right corner of the main sprite so that the
    +** Processing line: ~      # quantity is visible~
     - Inside source: true
     *** True Line Result
    -    end
    +      # quantity is visible
    +** Processing line: ~      { x: x + 55, y: y, w: 25, h: 25, path: "sprites/square-black.png", }, # sprites are hashes with a path property~
    +- Inside source: true
    +*** True Line Result
    +      { x: x + 55, y: y, w: 25, h: 25, path: "sprites/square-black.png", }, # sprites are hashes with a path property
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    puts '======== array each_with_index'~
    +** Processing line: ~      # labels are hashes with a text property~
     - Inside source: true
     *** True Line Result
    -    puts '======== array each_with_index'
    -** Processing line: ~    colors = ["red", "blue", "yellow"]~
    +      # labels are hashes with a text property
    +** Processing line: ~      { x: x + 56, y: y + 22, text: "#{item[:quantity]}", r: 255, g: 255, b: 255, },~
     - Inside source: true
     *** True Line Result
    -    colors = ["red", "blue", "yellow"]
    -** Processing line: ~    colors.each_with_index do |color, i|~
    +      { x: x + 56, y: y + 22, text: "#{item[:quantity]}", r: 255, g: 255, b: 255, },
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    colors.each_with_index do |color, i|
    -** Processing line: ~      puts "#{color} at index #{i}"~
    +
    +** Processing line: ~      # this is the mouse overlay, if the overlay isn't applicable, then this value will be nil (nil values will not be rendered)~
     - Inside source: true
     *** True Line Result
    -      puts "#{color} at index #{i}"
    -** Processing line: ~    end~
    +      # this is the mouse overlay, if the overlay isn't applicable, then this value will be nil (nil values will not be rendered)
    +** Processing line: ~      overlay~
     - Inside source: true
     *** True Line Result
    -    end
    +      overlay
    +** Processing line: ~    ]~
    +- Inside source: true
    +*** True Line Result
    +    ]
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -100935,434 +102539,446 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # Remove the x from xrepl to run the code. Add the x back to ignore to code.~
    -- Inside source: true
    -*** True Line Result
    -  # Remove the x from xrepl to run the code. Add the x back to ignore to code.
    -** Processing line: ~  xrepl do~
    +** Processing line: ~  # helper function for deriving the position of an item within inventory~
     - Inside source: true
     *** True Line Result
    -  xrepl do
    -** Processing line: ~    puts "======== single parameter function"~
    +  # helper function for deriving the position of an item within inventory
    +** Processing line: ~  def set_inventory_position args, item~
     - Inside source: true
     *** True Line Result
    -    puts "======== single parameter function"
    -** Processing line: ~    def add_one_to n~
    +  def set_inventory_position args, item
    +** Processing line: ~    item.x = args.state.inventory_border.x + item[:ordinal_x] * 80~
     - Inside source: true
     *** True Line Result
    -    def add_one_to n
    -** Processing line: ~      n + 5~
    +    item.x = args.state.inventory_border.x + item[:ordinal_x] * 80
    +** Processing line: ~    item.y = (args.state.inventory_border.y + args.state.inventory_border.h - 80) - item[:ordinal_y] * 80~
     - Inside source: true
     *** True Line Result
    -      n + 5
    -** Processing line: ~    end~
    +    item.y = (args.state.inventory_border.y + args.state.inventory_border.h - 80) - item[:ordinal_y] * 80
    +** Processing line: ~    item.w = 80~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +    item.w = 80
    +** Processing line: ~    item.h = 80~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    puts add_one_to(3)~
    +    item.h = 80
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    puts add_one_to(3)
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    puts "======== function with default value"~
    +** Processing line: ~  # helper function for deriving the position of an item within the craft area~
     - Inside source: true
     *** True Line Result
    -    puts "======== function with default value"
    -** Processing line: ~    def function_with_default_value v = 10~
    +  # helper function for deriving the position of an item within the craft area
    +** Processing line: ~  def set_craft_position args, item~
     - Inside source: true
     *** True Line Result
    -    def function_with_default_value v = 10
    -** Processing line: ~      v * 10~
    +  def set_craft_position args, item
    +** Processing line: ~    item.x = args.state.craft_border.x + item[:ordinal_x] * 80~
     - Inside source: true
     *** True Line Result
    -      v * 10
    -** Processing line: ~    end~
    +    item.x = args.state.craft_border.x + item[:ordinal_x] * 80
    +** Processing line: ~    item.y = (args.state.craft_border.y + args.state.inventory_border.h - 80) - item[:ordinal_y] * 80~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +    item.y = (args.state.craft_border.y + args.state.inventory_border.h - 80) - item[:ordinal_y] * 80
    +** Processing line: ~    item.w = 80~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    puts "passing three: #{function_with_default_value(3)}"~
    +    item.w = 80
    +** Processing line: ~    item.h = 80~
     - Inside source: true
     *** True Line Result
    -    puts "passing three: #{function_with_default_value(3)}"
    -** Processing line: ~    puts "passing nil: #{function_with_default_value}"~
    +    item.h = 80
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    puts "passing nil: #{function_with_default_value}"
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    puts "======== Or Equal (||=) operator for nil values"~
    -- Inside source: true
    -*** True Line Result
    -    puts "======== Or Equal (||=) operator for nil values"
    -** Processing line: ~    def function_with_nil_default_with_local a = nil~
    +** Processing line: ~  # Any lines outside of a function will be executed when the file is reloaded.~
     - Inside source: true
     *** True Line Result
    -    def function_with_nil_default_with_local a = nil
    -** Processing line: ~      result   = a~
    +  # Any lines outside of a function will be executed when the file is reloaded.
    +** Processing line: ~  # So every time you save main.rb, the game will be reset.~
     - Inside source: true
     *** True Line Result
    -      result   = a
    -** Processing line: ~      result ||= "or equal operator was exected and set a default value"~
    +  # So every time you save main.rb, the game will be reset.
    +** Processing line: ~  # Comment out the line below if you don't want this to happen.~
     - Inside source: true
     *** True Line Result
    -      result ||= "or equal operator was exected and set a default value"
    -** Processing line: ~    end~
    +  # Comment out the line below if you don't want this to happen.
    +** Processing line: ~  $gtk.reset~
     - Inside source: true
     *** True Line Result
    -    end
    +  $gtk.reset
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    puts "passing 'hi': #{function_with_nil_default_with_local 'hi'}"~
    -- Inside source: true
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
     *** True Line Result
    -    puts "passing 'hi': #{function_with_nil_default_with_local 'hi'}"
    -** Processing line: ~    puts "passing nil: #{function_with_nil_default_with_local}"~
    -- Inside source: true
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
     *** True Line Result
    -    puts "passing nil: #{function_with_nil_default_with_local}"
    -** Processing line: ~  end~
    -- Inside source: true
    +
    +** Processing line: ~*** Crafting - Farming Game Starting Point - main.rb~
    +- Header detected.
     *** True Line Result
    -  end
    -** Processing line: ~~
    -- Inside source: true
    +
    +*** True Line Result
    +*** Crafting - Farming Game Starting Point - main.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
     *** True Line Result
     
    -** Processing line: ~  # ====================================================================================~
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/99_genre_crafting/farming_game_starting_point/app/main.rb~
     - Inside source: true
     *** True Line Result
    -  # ====================================================================================
    -** Processing line: ~  #  Arrays~
    +  # ./samples/99_genre_crafting/farming_game_starting_point/app/main.rb
    +** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
    -  #  Arrays
    -** Processing line: ~  # ====================================================================================~
    +  def tick args
    +** Processing line: ~    args.state.tile_size     = 80~
     - Inside source: true
     *** True Line Result
    -  # ====================================================================================
    -** Processing line: ~  # Remove the x from xrepl to run the code. Add the x back to ignore to code.~
    +    args.state.tile_size     = 80
    +** Processing line: ~    args.state.player_speed  = 4~
     - Inside source: true
     *** True Line Result
    -  # Remove the x from xrepl to run the code. Add the x back to ignore to code.
    -** Processing line: ~  xrepl do~
    +    args.state.player_speed  = 4
    +** Processing line: ~    args.state.player      ||= tile(args, 7, 3, 0, 128, 180)~
     - Inside source: true
     *** True Line Result
    -  xrepl do
    -** Processing line: ~    puts "======== Create an array with the numbers 1 to 10."~
    +    args.state.player      ||= tile(args, 7, 3, 0, 128, 180)
    +** Processing line: ~    generate_map args~
     - Inside source: true
     *** True Line Result
    -    puts "======== Create an array with the numbers 1 to 10."
    -** Processing line: ~    one_to_ten = (1..10).to_a~
    +    generate_map args
    +** Processing line: ~    #press j to plant a green onion~
     - Inside source: true
     *** True Line Result
    -    one_to_ten = (1..10).to_a
    -** Processing line: ~    puts one_to_ten~
    +    #press j to plant a green onion
    +** Processing line: ~    if args.inputs.keyboard.j~
     - Inside source: true
     *** True Line Result
    -    puts one_to_ten
    -** Processing line: ~~
    +    if args.inputs.keyboard.j
    +** Processing line: ~    #change this part you can change what you want to plant~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    puts "======== Create a new array that only contains even numbers from the previous array."~
    +    #change this part you can change what you want to plant
    +** Processing line: ~     args.state.walls << tile(args, ((args.state.player.x+80)/args.state.tile_size), ((args.state.player.y)/args.state.tile_size), 255, 255, 255)~
     - Inside source: true
     *** True Line Result
    -    puts "======== Create a new array that only contains even numbers from the previous array."
    -** Processing line: ~    one_to_ten = (1..10).to_a~
    +     args.state.walls << tile(args, ((args.state.player.x+80)/args.state.tile_size), ((args.state.player.y)/args.state.tile_size), 255, 255, 255)
    +** Processing line: ~     args.state.plants << tile(args, ((args.state.player.x+80)/args.state.tile_size), ((args.state.player.y+80)/args.state.tile_size), 0, 160, 0)~
     - Inside source: true
     *** True Line Result
    -    one_to_ten = (1..10).to_a
    -** Processing line: ~    evens = one_to_ten.find_all do |number|~
    +     args.state.plants << tile(args, ((args.state.player.x+80)/args.state.tile_size), ((args.state.player.y+80)/args.state.tile_size), 0, 160, 0)
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    evens = one_to_ten.find_all do |number|
    -** Processing line: ~      number % 2 == 0~
    +    end
    +** Processing line: ~    # Adds walls, background, and player to args.outputs.solids so they appear on screen~
     - Inside source: true
     *** True Line Result
    -      number % 2 == 0
    -** Processing line: ~    end~
    +    # Adds walls, background, and player to args.outputs.solids so they appear on screen
    +** Processing line: ~    args.outputs.solids << [0,0,1280,720, 237,189,101]~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~    puts evens~
    +    args.outputs.solids << [0,0,1280,720, 237,189,101]
    +** Processing line: ~    args.outputs.sprites << [0, 0, 1280, 720, 'sprites/background.png']~
     - Inside source: true
     *** True Line Result
    -    puts evens
    -** Processing line: ~~
    +    args.outputs.sprites << [0, 0, 1280, 720, 'sprites/background.png']
    +** Processing line: ~    args.outputs.solids << args.state.walls~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    puts "======== Create a new array that rejects odd numbers."~
    +    args.outputs.solids << args.state.walls
    +** Processing line: ~    args.outputs.solids << args.state.player~
     - Inside source: true
     *** True Line Result
    -    puts "======== Create a new array that rejects odd numbers."
    -** Processing line: ~    one_to_ten = (1..10).to_a~
    +    args.outputs.solids << args.state.player
    +** Processing line: ~    args.outputs.solids << args.state.plants~
     - Inside source: true
     *** True Line Result
    -    one_to_ten = (1..10).to_a
    -** Processing line: ~    also_even = one_to_ten.reject do |number|~
    +    args.outputs.solids << args.state.plants
    +** Processing line: ~    args.outputs.labels << [320, 640, "press J to plant", 3, 1, 255, 0, 0, 200]~
     - Inside source: true
     *** True Line Result
    -    also_even = one_to_ten.reject do |number|
    -** Processing line: ~      number % 2 != 0~
    +    args.outputs.labels << [320, 640, "press J to plant", 3, 1, 255, 0, 0, 200]
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      number % 2 != 0
    -** Processing line: ~    end~
    +
    +** Processing line: ~    move_player args, -1,  0 if args.inputs.keyboard.left # x position decreases by 1 if left key is pressed~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~    puts also_even~
    +    move_player args, -1,  0 if args.inputs.keyboard.left # x position decreases by 1 if left key is pressed
    +** Processing line: ~    move_player args,  1,  0 if args.inputs.keyboard.right # x position increases by 1 if right key is pressed~
     - Inside source: true
     *** True Line Result
    -    puts also_even
    -** Processing line: ~~
    +    move_player args,  1,  0 if args.inputs.keyboard.right # x position increases by 1 if right key is pressed
    +** Processing line: ~    move_player args,  0,  1 if args.inputs.keyboard.up # y position increases by 1 if up is pressed~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    puts "======== Create an array that doubles every number."~
    +    move_player args,  0,  1 if args.inputs.keyboard.up # y position increases by 1 if up is pressed
    +** Processing line: ~    move_player args,  0, -1 if args.inputs.keyboard.down # y position decreases by 1 if down is pressed~
     - Inside source: true
     *** True Line Result
    -    puts "======== Create an array that doubles every number."
    -** Processing line: ~    one_to_ten = (1..10).to_a~
    +    move_player args,  0, -1 if args.inputs.keyboard.down # y position decreases by 1 if down is pressed
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    one_to_ten = (1..10).to_a
    -** Processing line: ~    doubled = one_to_ten.map do |number|~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    doubled = one_to_ten.map do |number|
    -** Processing line: ~      number * 2~
    +
    +** Processing line: ~  # Sets position, size, and color of the tile~
     - Inside source: true
     *** True Line Result
    -      number * 2
    -** Processing line: ~    end~
    +  # Sets position, size, and color of the tile
    +** Processing line: ~  def tile args, x, y, *color~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~    puts doubled~
    +  def tile args, x, y, *color
    +** Processing line: ~    [x * args.state.tile_size, # sets definition for array using method parameters~
     - Inside source: true
     *** True Line Result
    -    puts doubled
    -** Processing line: ~~
    +    [x * args.state.tile_size, # sets definition for array using method parameters
    +** Processing line: ~     y * args.state.tile_size, # multiplying by tile_size sets x and y to correct position using pixel values~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    puts "======== Create an array that selects only odd numbers and then multiply those by 10."~
    +     y * args.state.tile_size, # multiplying by tile_size sets x and y to correct position using pixel values
    +** Processing line: ~     args.state.tile_size,~
     - Inside source: true
     *** True Line Result
    -    puts "======== Create an array that selects only odd numbers and then multiply those by 10."
    -** Processing line: ~    one_to_ten = (1..10).to_a~
    +     args.state.tile_size,
    +** Processing line: ~     args.state.tile_size,~
     - Inside source: true
     *** True Line Result
    -    one_to_ten = (1..10).to_a
    -** Processing line: ~    odd_doubled = one_to_ten.find_all do |number|~
    +     args.state.tile_size,
    +** Processing line: ~     *color]~
     - Inside source: true
     *** True Line Result
    -    odd_doubled = one_to_ten.find_all do |number|
    -** Processing line: ~      number % 2 != 0~
    +     *color]
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -      number % 2 != 0
    -** Processing line: ~    end.map do |odd_number|~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    end.map do |odd_number|
    -** Processing line: ~      odd_number * 10~
    +
    +** Processing line: ~  # Creates map by adding tiles to the wall, as well as a goal (that the player needs to reach)~
     - Inside source: true
     *** True Line Result
    -      odd_number * 10
    -** Processing line: ~    end~
    +  # Creates map by adding tiles to the wall, as well as a goal (that the player needs to reach)
    +** Processing line: ~  def generate_map args~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~    puts odd_doubled~
    +  def generate_map args
    +** Processing line: ~    return if args.state.area~
     - Inside source: true
     *** True Line Result
    -    puts odd_doubled
    +    return if args.state.area
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    puts "======== All combination of numbers 1 to 10."~
    +** Processing line: ~    # Creates the area of the map. There are 9 rows running horizontally across the screen~
     - Inside source: true
     *** True Line Result
    -    puts "======== All combination of numbers 1 to 10."
    -** Processing line: ~    one_to_ten = (1..10).to_a~
    +    # Creates the area of the map. There are 9 rows running horizontally across the screen
    +** Processing line: ~    # and 16 columns running vertically on the screen. Any spot with a "1" is not~
     - Inside source: true
     *** True Line Result
    -    one_to_ten = (1..10).to_a
    -** Processing line: ~    all_combinations = one_to_ten.product(one_to_ten)~
    +    # and 16 columns running vertically on the screen. Any spot with a "1" is not
    +** Processing line: ~    # open for the player to move into (and is green), and any spot with a "0" is available~
     - Inside source: true
     *** True Line Result
    -    all_combinations = one_to_ten.product(one_to_ten)
    -** Processing line: ~    puts all_combinations~
    +    # open for the player to move into (and is green), and any spot with a "0" is available
    +** Processing line: ~    # for the player to move in.~
     - Inside source: true
     *** True Line Result
    -    puts all_combinations
    -** Processing line: ~~
    +    # for the player to move in.
    +** Processing line: ~    args.state.area = [~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    puts "======== All uniq combinations of numbers. For example: [1, 2] is the same as [2, 1]."~
    +    args.state.area = [
    +** Processing line: ~      [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,],~
     - Inside source: true
     *** True Line Result
    -    puts "======== All uniq combinations of numbers. For example: [1, 2] is the same as [2, 1]."
    -** Processing line: ~    one_to_ten = (1..10).to_a~
    +      [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,],
    +** Processing line: ~      [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,],~
     - Inside source: true
     *** True Line Result
    -    one_to_ten = (1..10).to_a
    -** Processing line: ~    uniq_combinations =~
    +      [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,],
    +** Processing line: ~      [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,],~
     - Inside source: true
     *** True Line Result
    -    uniq_combinations =
    -** Processing line: ~      one_to_ten.product(one_to_ten)~
    +      [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,],
    +** Processing line: ~      [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,],~
     - Inside source: true
     *** True Line Result
    -      one_to_ten.product(one_to_ten)
    -** Processing line: ~        .map do |unsorted_number|~
    +      [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,],
    +** Processing line: ~      [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,],~
     - Inside source: true
     *** True Line Result
    -        .map do |unsorted_number|
    -** Processing line: ~      unsorted_number.sort~
    +      [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,],
    +** Processing line: ~      [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,],~
     - Inside source: true
     *** True Line Result
    -      unsorted_number.sort
    -** Processing line: ~    end.uniq~
    +      [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,],
    +** Processing line: ~      [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,],~
     - Inside source: true
     *** True Line Result
    -    end.uniq
    -** Processing line: ~    puts uniq_combinations~
    +      [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,],
    +** Processing line: ~      [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,],~
     - Inside source: true
     *** True Line Result
    -    puts uniq_combinations
    -** Processing line: ~  end~
    +      [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,],
    +** Processing line: ~      [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ],~
     - Inside source: true
     *** True Line Result
    -  end
    +      [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ],
    +** Processing line: ~    ].reverse # reverses the order of the area collection~
    +- Inside source: true
    +*** True Line Result
    +    ].reverse # reverses the order of the area collection
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # ====================================================================================~
    +** Processing line: ~    # By reversing the order, the way that the area appears above is how it appears~
     - Inside source: true
     *** True Line Result
    -  # ====================================================================================
    -** Processing line: ~  #  Advanced Arrays~
    +    # By reversing the order, the way that the area appears above is how it appears
    +** Processing line: ~    # on the screen in the game. If we did not reverse, the map would appear inverted.~
     - Inside source: true
     *** True Line Result
    -  #  Advanced Arrays
    -** Processing line: ~  # ====================================================================================~
    +    # on the screen in the game. If we did not reverse, the map would appear inverted.
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  # ====================================================================================
    -** Processing line: ~  # Remove the x from xrepl to run the code. Add the x back to ignore to code.~
    +
    +** Processing line: ~    #The wall starts off with no tiles.~
     - Inside source: true
     *** True Line Result
    -  # Remove the x from xrepl to run the code. Add the x back to ignore to code.
    -** Processing line: ~  xrepl do~
    +    #The wall starts off with no tiles.
    +** Processing line: ~    args.state.walls = []~
     - Inside source: true
     *** True Line Result
    -  xrepl do
    -** Processing line: ~    puts "======== All unique Pythagorean Triples between 1 and 40 sorted by area of the triangle."~
    +    args.state.walls = []
    +** Processing line: ~    args.state.plants = []~
     - Inside source: true
     *** True Line Result
    -    puts "======== All unique Pythagorean Triples between 1 and 40 sorted by area of the triangle."
    +    args.state.plants = []
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    one_to_hundred = (1..40).to_a~
    +** Processing line: ~    # If v is 1, a green tile is added to args.state.walls.~
     - Inside source: true
     *** True Line Result
    -    one_to_hundred = (1..40).to_a
    -** Processing line: ~    triples =~
    +    # If v is 1, a green tile is added to args.state.walls.
    +** Processing line: ~    # If v is 2, a black tile is created as the goal.~
     - Inside source: true
     *** True Line Result
    -    triples =
    -** Processing line: ~      one_to_hundred.product(one_to_hundred).map do |width, height|~
    +    # If v is 2, a black tile is created as the goal.
    +** Processing line: ~    args.state.area.map_2d do |y, x, v|~
     - Inside source: true
     *** True Line Result
    -      one_to_hundred.product(one_to_hundred).map do |width, height|
    -** Processing line: ~      [width, height, Math.sqrt(width ** 2 + height ** 2)]~
    +    args.state.area.map_2d do |y, x, v|
    +** Processing line: ~      if    v == 1~
     - Inside source: true
     *** True Line Result
    -      [width, height, Math.sqrt(width ** 2 + height ** 2)]
    -** Processing line: ~    end.find_all do |_, _, hypotenuse|~
    +      if    v == 1
    +** Processing line: ~        args.state.walls << tile(args, x, y, 255, 160, 156) # green tile~
     - Inside source: true
     *** True Line Result
    -    end.find_all do |_, _, hypotenuse|
    -** Processing line: ~      hypotenuse.to_i == hypotenuse~
    +        args.state.walls << tile(args, x, y, 255, 160, 156) # green tile
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -      hypotenuse.to_i == hypotenuse
    -** Processing line: ~    end.map do |triangle|~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    end.map do |triangle|
    -** Processing line: ~      triangle.map(&:to_i)~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -      triangle.map(&:to_i)
    -** Processing line: ~    end.uniq do |triangle|~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    end.uniq do |triangle|
    -** Processing line: ~      triangle.sort~
    +
    +** Processing line: ~  # Allows the player to move their box around the screen~
     - Inside source: true
     *** True Line Result
    -      triangle.sort
    -** Processing line: ~    end.map do |width, height, hypotenuse|~
    +  # Allows the player to move their box around the screen
    +** Processing line: ~  def move_player args, *vector~
     - Inside source: true
     *** True Line Result
    -    end.map do |width, height, hypotenuse|
    -** Processing line: ~      [width, height, hypotenuse, (width * height) / 2]~
    +  def move_player args, *vector
    +** Processing line: ~    box = args.state.player.shift_rect(vector) # box is able to move at an angle~
     - Inside source: true
     *** True Line Result
    -      [width, height, hypotenuse, (width * height) / 2]
    -** Processing line: ~    end.sort_by do |_, _, _, area|~
    +    box = args.state.player.shift_rect(vector) # box is able to move at an angle
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    end.sort_by do |_, _, _, area|
    -** Processing line: ~      area~
    +
    +** Processing line: ~    # If the player's box hits a wall, it is not able to move further in that direction~
     - Inside source: true
     *** True Line Result
    -      area
    -** Processing line: ~    end~
    +    # If the player's box hits a wall, it is not able to move further in that direction
    +** Processing line: ~    return if args.state.walls~
     - Inside source: true
     *** True Line Result
    -    end
    +    return if args.state.walls
    +** Processing line: ~                  .any_intersect_rect?(box)~
    +- Inside source: true
    +*** True Line Result
    +                  .any_intersect_rect?(box)
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    triples.each do |width, height, hypotenuse, area|~
    +** Processing line: ~    # Player's box is able to move at angles (not just the four general directions) fast~
     - Inside source: true
     *** True Line Result
    -    triples.each do |width, height, hypotenuse, area|
    -** Processing line: ~      puts "(#{width}, #{height}, #{hypotenuse}) = #{area}"~
    +    # Player's box is able to move at angles (not just the four general directions) fast
    +** Processing line: ~    args.state.player =~
     - Inside source: true
     *** True Line Result
    -      puts "(#{width}, #{height}, #{hypotenuse}) = #{area}"
    -** Processing line: ~    end~
    +    args.state.player =
    +** Processing line: ~      args.state.player~
     - Inside source: true
     *** True Line Result
    -    end
    +      args.state.player
    +** Processing line: ~          .shift_rect(vector.x * args.state.player_speed, # if we don't multiply by speed, then~
    +- Inside source: true
    +*** True Line Result
    +          .shift_rect(vector.x * args.state.player_speed, # if we don't multiply by speed, then
    +** Processing line: ~                      vector.y * args.state.player_speed) # the box will move extremely slow~
    +- Inside source: true
    +*** True Line Result
    +                      vector.y * args.state.player_speed) # the box will move extremely slow
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -114059,162 +115675,178 @@ Follows is a source code listing for all files that have been open sourced. This
     - End of paragraph detected.
     *** True Line Result
     
    -** Processing line: ~*** Platformer - Clepto Frog - main.rb~
    +** Processing line: ~*** Mario - Jumping - main.rb~
     - Header detected.
     *** True Line Result
     
     *** True Line Result
    -*** Platformer - Clepto Frog - main.rb
    +*** Mario - Jumping - main.rb
     ** Processing line: ~#+begin_src ruby~
     - Line was identified as the beginning of a code block.
     *** True Line Result
     
     *** True Line Result
     #+begin_src ruby
    -** Processing line: ~  # ./samples/99_genre_platformer/clepto_frog/app/main.rb~
    +** Processing line: ~  # ./samples/99_genre_mario/01_jumping/app/main.rb~
     - Inside source: true
     *** True Line Result
    -  # ./samples/99_genre_platformer/clepto_frog/app/main.rb
    -** Processing line: ~  MAP_FILE_PATH = 'app/map.txt'~
    +  # ./samples/99_genre_mario/01_jumping/app/main.rb
    +** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
    -  MAP_FILE_PATH = 'app/map.txt'
    -** Processing line: ~~
    +  def tick args
    +** Processing line: ~    defaults args~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  require 'app/map.rb'~
    +    defaults args
    +** Processing line: ~    render args~
     - Inside source: true
     *** True Line Result
    -  require 'app/map.rb'
    -** Processing line: ~~
    +    render args
    +** Processing line: ~    input args~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  class CleptoFrog~
    +    input args
    +** Processing line: ~    calc args~
     - Inside source: true
     *** True Line Result
    -  class CleptoFrog
    -** Processing line: ~    attr_gtk~
    +    calc args
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    attr_gtk
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def render_ending~
    +** Processing line: ~  def defaults args~
     - Inside source: true
     *** True Line Result
    -    def render_ending
    -** Processing line: ~      state.game_over_at ||= state.tick_count~
    +  def defaults args
    +** Processing line: ~    args.state.player.x      ||= args.grid.w.half~
     - Inside source: true
     *** True Line Result
    -      state.game_over_at ||= state.tick_count
    -** Processing line: ~~
    +    args.state.player.x      ||= args.grid.w.half
    +** Processing line: ~    args.state.player.y      ||= 0~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      outputs.labels << [640, 700, "Clepto Frog", 4, 1]~
    +    args.state.player.y      ||= 0
    +** Processing line: ~    args.state.player.size   ||= 100~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << [640, 700, "Clepto Frog", 4, 1]
    -** Processing line: ~~
    +    args.state.player.size   ||= 100
    +** Processing line: ~    args.state.player.dy     ||= 0~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      if state.tick_count >= (state.game_over_at + 120)~
    +    args.state.player.dy     ||= 0
    +** Processing line: ~    args.state.player.action ||= :jumping~
     - Inside source: true
     *** True Line Result
    -      if state.tick_count >= (state.game_over_at + 120)
    -** Processing line: ~        outputs.labels << [640, 620, "\"I... I.... don't believe it.\" - New Guy",~
    +    args.state.player.action ||= :jumping
    +** Processing line: ~    args.state.jump.power           = 20~
     - Inside source: true
     *** True Line Result
    -        outputs.labels << [640, 620, "\"I... I.... don't believe it.\" - New Guy",
    -** Processing line: ~                           4, 1, 0, 0, 0, 255 * (state.game_over_at + 120).ease(60)]~
    +    args.state.jump.power           = 20
    +** Processing line: ~    args.state.jump.increase_frames = 10~
     - Inside source: true
     *** True Line Result
    -                           4, 1, 0, 0, 0, 255 * (state.game_over_at + 120).ease(60)]
    -** Processing line: ~      end~
    +    args.state.jump.increase_frames = 10
    +** Processing line: ~    args.state.jump.increase_power  = 1~
     - Inside source: true
     *** True Line Result
    -      end
    +    args.state.jump.increase_power  = 1
    +** Processing line: ~    args.state.gravity              = -1~
    +- Inside source: true
    +*** True Line Result
    +    args.state.gravity              = -1
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      if state.tick_count >= (state.game_over_at + 240)~
    +** Processing line: ~  def render args~
     - Inside source: true
     *** True Line Result
    -      if state.tick_count >= (state.game_over_at + 240)
    -** Processing line: ~        outputs.labels << [640, 580, "\"He actually stole all the mugs?\" - New Guy",~
    +  def render args
    +** Processing line: ~    args.outputs.sprites << {~
     - Inside source: true
     *** True Line Result
    -        outputs.labels << [640, 580, "\"He actually stole all the mugs?\" - New Guy",
    -** Processing line: ~                           4, 1, 0, 0, 0, 255 * (state.game_over_at + 240).ease(60)]~
    +    args.outputs.sprites << {
    +** Processing line: ~      x: args.state.player.x -~
     - Inside source: true
     *** True Line Result
    -                           4, 1, 0, 0, 0, 255 * (state.game_over_at + 240).ease(60)]
    -** Processing line: ~      end~
    +      x: args.state.player.x -
    +** Processing line: ~         args.state.player.size.half,~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +         args.state.player.size.half,
    +** Processing line: ~      y: args.state.player.y,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      if state.tick_count >= (state.game_over_at + 360)~
    +      y: args.state.player.y,
    +** Processing line: ~      w: args.state.player.size,~
     - Inside source: true
     *** True Line Result
    -      if state.tick_count >= (state.game_over_at + 360)
    -** Processing line: ~        outputs.labels << [640, 540, "\"Kind of feel bad STARTING HIM WITH NOTHING again.\" - New Guy",~
    +      w: args.state.player.size,
    +** Processing line: ~      h: args.state.player.size,~
     - Inside source: true
     *** True Line Result
    -        outputs.labels << [640, 540, "\"Kind of feel bad STARTING HIM WITH NOTHING again.\" - New Guy",
    -** Processing line: ~                           4, 1, 0, 0, 0, 255 * (state.game_over_at + 360).ease(60)]~
    +      h: args.state.player.size,
    +** Processing line: ~      path: 'sprites/square/red.png'~
     - Inside source: true
     *** True Line Result
    -                           4, 1, 0, 0, 0, 255 * (state.game_over_at + 360).ease(60)]
    -** Processing line: ~      end~
    +      path: 'sprites/square/red.png'
    +** Processing line: ~    }~
     - Inside source: true
     *** True Line Result
    -      end
    +    }
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      outputs.sprites << [640 - 50, 360 - 50, 100, 100,~
    +** Processing line: ~  def input args~
     - Inside source: true
     *** True Line Result
    -      outputs.sprites << [640 - 50, 360 - 50, 100, 100,
    -** Processing line: ~                          "sprites/square-green.png"]~
    +  def input args
    +** Processing line: ~    if args.inputs.keyboard.key_down.space~
     - Inside source: true
     *** True Line Result
    -                          "sprites/square-green.png"]
    -** Processing line: ~~
    +    if args.inputs.keyboard.key_down.space
    +** Processing line: ~      if args.state.player.action == :standing~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      outputs.labels << [640, 300, "Current Time: #{"%.2f" % state.stuff_time}", 4, 1]~
    +      if args.state.player.action == :standing
    +** Processing line: ~        args.state.player.action = :jumping~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << [640, 300, "Current Time: #{"%.2f" % state.stuff_time}", 4, 1]
    -** Processing line: ~      outputs.labels << [640, 270, "Best Time: #{"%.2f" % state.stuff_best_time}", 4, 1]~
    +        args.state.player.action = :jumping
    +** Processing line: ~        args.state.player.dy = args.state.jump.power~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << [640, 270, "Best Time: #{"%.2f" % state.stuff_best_time}", 4, 1]
    +        args.state.player.dy = args.state.jump.power
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      if state.tick_count >= (state.game_over_at + 550)~
    +** Processing line: ~        # record when the action took place~
     - Inside source: true
     *** True Line Result
    -      if state.tick_count >= (state.game_over_at + 550)
    -** Processing line: ~        restart_game~
    +        # record when the action took place
    +** Processing line: ~        current_frame = args.state.tick_count~
     - Inside source: true
     *** True Line Result
    -        restart_game
    +        current_frame = args.state.tick_count
    +** Processing line: ~        args.state.player.action_at = current_frame~
    +- Inside source: true
    +*** True Line Result
    +        args.state.player.action_at = current_frame
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    @@ -114227,206 +115859,186 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def restart_game~
    -- Inside source: true
    -*** True Line Result
    -    def restart_game
    -** Processing line: ~      state.world = nil~
    +** Processing line: ~    # if the space bar is being held~
     - Inside source: true
     *** True Line Result
    -      state.world = nil
    -** Processing line: ~      state.x = nil~
    +    # if the space bar is being held
    +** Processing line: ~    if args.inputs.keyboard.key_held.space~
     - Inside source: true
     *** True Line Result
    -      state.x = nil
    -** Processing line: ~      state.y = nil~
    +    if args.inputs.keyboard.key_held.space
    +** Processing line: ~      # is the player jumping~
     - Inside source: true
     *** True Line Result
    -      state.y = nil
    -** Processing line: ~      state.dx = nil~
    +      # is the player jumping
    +** Processing line: ~      is_jumping = args.state.player.action == :jumping~
     - Inside source: true
     *** True Line Result
    -      state.dx = nil
    -** Processing line: ~      state.dy = nil~
    +      is_jumping = args.state.player.action == :jumping
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      state.dy = nil
    -** Processing line: ~      state.stuff_score = 0~
    +
    +** Processing line: ~      # when was the jump performed~
     - Inside source: true
     *** True Line Result
    -      state.stuff_score = 0
    -** Processing line: ~      state.stuff_time = 0~
    +      # when was the jump performed
    +** Processing line: ~      time_of_jump = args.state.player.action_at~
     - Inside source: true
     *** True Line Result
    -      state.stuff_time = 0
    -** Processing line: ~      state.intro_tick_count = nil~
    +      time_of_jump = args.state.player.action_at
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      state.intro_tick_count = nil
    -** Processing line: ~      defaults~
    +
    +** Processing line: ~      # how much time has passed since the jump~
     - Inside source: true
     *** True Line Result
    -      defaults
    -** Processing line: ~      state.game_start_at = state.tick_count~
    +      # how much time has passed since the jump
    +** Processing line: ~      jump_elapsed_time = time_of_jump.elapsed_time~
     - Inside source: true
     *** True Line Result
    -      state.game_start_at = state.tick_count
    -** Processing line: ~      state.scene = :game~
    +      jump_elapsed_time = time_of_jump.elapsed_time
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      state.scene = :game
    -** Processing line: ~      state.game_over_at = nil~
    +
    +** Processing line: ~      # how much time is allowed for increasing power~
     - Inside source: true
     *** True Line Result
    -      state.game_over_at = nil
    -** Processing line: ~    end~
    +      # how much time is allowed for increasing power
    +** Processing line: ~      time_allowed = args.state.jump.increase_frames~
     - Inside source: true
     *** True Line Result
    -    end
    +      time_allowed = args.state.jump.increase_frames
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def render_intro~
    -- Inside source: true
    -*** True Line Result
    -    def render_intro
    -** Processing line: ~      outputs.labels << [640, 700, "Clepto Frog", 4, 1]~
    +** Processing line: ~      # if the player is jumping~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << [640, 700, "Clepto Frog", 4, 1]
    -** Processing line: ~      if state.tick_count >= 120~
    +      # if the player is jumping
    +** Processing line: ~      # and the elapsed time is less than~
     - Inside source: true
     *** True Line Result
    -      if state.tick_count >= 120
    -** Processing line: ~        outputs.labels << [640, 620, "\"Uh... your office has a pet frog?\" - New Guy",~
    +      # and the elapsed time is less than
    +** Processing line: ~      # the allowed time~
     - Inside source: true
     *** True Line Result
    -        outputs.labels << [640, 620, "\"Uh... your office has a pet frog?\" - New Guy",
    -** Processing line: ~                           4, 1, 0, 0, 0, 255 * 120.ease(60)]~
    +      # the allowed time
    +** Processing line: ~      if is_jumping && jump_elapsed_time < time_allowed~
     - Inside source: true
     *** True Line Result
    -                           4, 1, 0, 0, 0, 255 * 120.ease(60)]
    -** Processing line: ~      end~
    +      if is_jumping && jump_elapsed_time < time_allowed
    +** Processing line: ~         # increase the dy by the increase power~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +         # increase the dy by the increase power
    +** Processing line: ~         power_to_add = args.state.jump.increase_power~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      if state.tick_count >= 240~
    +         power_to_add = args.state.jump.increase_power
    +** Processing line: ~         args.state.player.dy += power_to_add~
     - Inside source: true
     *** True Line Result
    -      if state.tick_count >= 240
    -** Processing line: ~        outputs.labels << [640, 580, "\"Yep! His name is Clepto.\" - Jim",~
    +         args.state.player.dy += power_to_add
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -        outputs.labels << [640, 580, "\"Yep! His name is Clepto.\" - Jim",
    -** Processing line: ~                           4, 1, 0, 0, 0, 255 * 240.ease(60)]~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -                           4, 1, 0, 0, 0, 255 * 240.ease(60)]
    -** Processing line: ~      end~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -      end
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      if state.tick_count >= 360~
    -- Inside source: true
    -*** True Line Result
    -      if state.tick_count >= 360
    -** Processing line: ~        outputs.labels << [640, 540, "\"Uh...\" - New Guy",~
    +** Processing line: ~  def calc args~
     - Inside source: true
     *** True Line Result
    -        outputs.labels << [640, 540, "\"Uh...\" - New Guy",
    -** Processing line: ~                           4, 1, 0, 0, 0, 255 * 360.ease(60)]~
    +  def calc args
    +** Processing line: ~    if args.state.player.action == :jumping~
     - Inside source: true
     *** True Line Result
    -                           4, 1, 0, 0, 0, 255 * 360.ease(60)]
    -** Processing line: ~      end~
    +    if args.state.player.action == :jumping
    +** Processing line: ~      args.state.player.y  += args.state.player.dy~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +      args.state.player.y  += args.state.player.dy
    +** Processing line: ~      args.state.player.dy += args.state.gravity~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      if state.tick_count >= 480~
    +      args.state.player.dy += args.state.gravity
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      if state.tick_count >= 480
    -** Processing line: ~        outputs.labels << [640, 500, "\"He steals mugs while we're away...\" - Jim",~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        outputs.labels << [640, 500, "\"He steals mugs while we're away...\" - Jim",
    -** Processing line: ~                           4, 1, 0, 0, 0, 255 * 480.ease(60)]~
    +
    +** Processing line: ~    if args.state.player.y < 0~
     - Inside source: true
     *** True Line Result
    -                           4, 1, 0, 0, 0, 255 * 480.ease(60)]
    -** Processing line: ~      end~
    +    if args.state.player.y < 0
    +** Processing line: ~      args.state.player.y      = 0~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +      args.state.player.y      = 0
    +** Processing line: ~      args.state.player.action = :standing~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      if state.tick_count >= 600~
    +      args.state.player.action = :standing
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      if state.tick_count >= 600
    -** Processing line: ~        outputs.labels << [640, 460, "\"It's not a big deal, we take them back in the morning.\" - Jim",~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -        outputs.labels << [640, 460, "\"It's not a big deal, we take them back in the morning.\" - Jim",
    -** Processing line: ~                           4, 1, 0, 0, 0, 255 * 600.ease(60)]~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -                           4, 1, 0, 0, 0, 255 * 600.ease(60)]
    -** Processing line: ~      end~
    -- Inside source: true
    +
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
     *** True Line Result
    -      end
    +#+end_src
     ** Processing line: ~~
    -- Inside source: true
    +- End of paragraph detected.
     *** True Line Result
     
    -** Processing line: ~      outputs.sprites << [640 - 50, 360 - 50, 100, 100,~
    -- Inside source: true
    +** Processing line: ~*** Mario - Jumping And Collisions - main.rb~
    +- Header detected.
     *** True Line Result
    -      outputs.sprites << [640 - 50, 360 - 50, 100, 100,
    -** Processing line: ~                          "sprites/square-green.png"]~
    -- Inside source: true
    +
     *** True Line Result
    -                          "sprites/square-green.png"]
    -** Processing line: ~~
    -- Inside source: true
    +*** Mario - Jumping And Collisions - main.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
     *** True Line Result
     
    -** Processing line: ~      if state.tick_count == 800~
    -- Inside source: true
    -*** True Line Result
    -      if state.tick_count == 800
    -** Processing line: ~        state.scene = :game~
    -- Inside source: true
     *** True Line Result
    -        state.scene = :game
    -** Processing line: ~        state.game_start_at = state.tick_count~
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/99_genre_mario/02_jumping_and_collisions/app/main.rb~
     - Inside source: true
     *** True Line Result
    -        state.game_start_at = state.tick_count
    -** Processing line: ~      end~
    +  # ./samples/99_genre_mario/02_jumping_and_collisions/app/main.rb
    +** Processing line: ~  class Game~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +  class Game
    +** Processing line: ~    attr_gtk~
     - Inside source: true
     *** True Line Result
    -    end
    +    attr_gtk
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
    @@ -114439,42 +116051,18 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
           defaults
    -** Processing line: ~      if state.scene == :intro && state.tick_count <= 800~
    -- Inside source: true
    -*** True Line Result
    -      if state.scene == :intro && state.tick_count <= 800
    -** Processing line: ~        render_intro~
    -- Inside source: true
    -*** True Line Result
    -        render_intro
    -** Processing line: ~      elsif state.scene == :ending~
    -- Inside source: true
    -*** True Line Result
    -      elsif state.scene == :ending
    -** Processing line: ~        render_ending~
    -- Inside source: true
    -*** True Line Result
    -        render_ending
    -** Processing line: ~      else~
    -- Inside source: true
    -*** True Line Result
    -      else
    -** Processing line: ~        render~
    +** Processing line: ~      render~
     - Inside source: true
     *** True Line Result
    -        render
    -** Processing line: ~      end~
    +      render
    +** Processing line: ~      input~
     - Inside source: true
     *** True Line Result
    -      end
    +      input
     ** Processing line: ~      calc~
     - Inside source: true
     *** True Line Result
           calc
    -** Processing line: ~      process_inputs~
    -- Inside source: true
    -*** True Line Result
    -      process_inputs
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -114487,194 +116075,174 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
         def defaults
    -** Processing line: ~      state.scene ||= :intro~
    -- Inside source: true
    -*** True Line Result
    -      state.scene ||= :intro
    -** Processing line: ~      state.stuff_score     ||= 0~
    -- Inside source: true
    -*** True Line Result
    -      state.stuff_score     ||= 0
    -** Processing line: ~      state.stuff_time      ||= 0~
    -- Inside source: true
    -*** True Line Result
    -      state.stuff_time      ||= 0
    -** Processing line: ~      state.stuff_best_time ||= nil~
    -- Inside source: true
    -*** True Line Result
    -      state.stuff_best_time ||= nil
    -** Processing line: ~      state.camera_x ||= 0~
    -- Inside source: true
    -*** True Line Result
    -      state.camera_x ||= 0
    -** Processing line: ~      state.camera_y ||= 0~
    +** Processing line: ~      return if state.tick_count != 0~
     - Inside source: true
     *** True Line Result
    -      state.camera_y ||= 0
    -** Processing line: ~      state.target_camera_scale ||= 1~
    +      return if state.tick_count != 0
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      state.target_camera_scale ||= 1
    -** Processing line: ~      state.camera_scale ||= 1~
    +
    +** Processing line: ~      player.x                     = 64~
     - Inside source: true
     *** True Line Result
    -      state.camera_scale ||= 1
    -** Processing line: ~      state.tongue_length          ||= 100~
    +      player.x                     = 64
    +** Processing line: ~      player.y                     = 800~
     - Inside source: true
     *** True Line Result
    -      state.tongue_length          ||= 100
    -** Processing line: ~      state.dev_action             ||= :collision_mode~
    +      player.y                     = 800
    +** Processing line: ~      player.size                  = 50~
     - Inside source: true
     *** True Line Result
    -      state.dev_action             ||= :collision_mode
    -** Processing line: ~      state.action                 ||= :aiming~
    +      player.size                  = 50
    +** Processing line: ~      player.dx                    = 0~
     - Inside source: true
     *** True Line Result
    -      state.action                 ||= :aiming
    -** Processing line: ~      state.tongue_angle           ||= 90~
    +      player.dx                    = 0
    +** Processing line: ~      player.dy                    = 0~
     - Inside source: true
     *** True Line Result
    -      state.tongue_angle           ||= 90
    -** Processing line: ~      state.tile_size                = 64~
    +      player.dy                    = 0
    +** Processing line: ~      player.action                = :falling~
     - Inside source: true
     *** True Line Result
    -      state.tile_size                = 64
    -** Processing line: ~      state.gravity                  = -0.1~
    +      player.action                = :falling
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      state.gravity                  = -0.1
    -** Processing line: ~      state.air                      = -0.01~
    +
    +** Processing line: ~      player.max_speed             = 20~
     - Inside source: true
     *** True Line Result
    -      state.air                      = -0.01
    -** Processing line: ~      state.player_width             = 60~
    +      player.max_speed             = 20
    +** Processing line: ~      player.jump_power            = 15~
     - Inside source: true
     *** True Line Result
    -      state.player_width             = 60
    -** Processing line: ~      state.player_height            = 60~
    +      player.jump_power            = 15
    +** Processing line: ~      player.jump_air_time         = 15~
     - Inside source: true
     *** True Line Result
    -      state.player_height            = 60
    -** Processing line: ~      state.collision_tolerance      = 0.0~
    +      player.jump_air_time         = 15
    +** Processing line: ~      player.jump_increase_power   = 1~
     - Inside source: true
     *** True Line Result
    -      state.collision_tolerance      = 0.0
    -** Processing line: ~      state.previous_tile_size     ||= state.tile_size~
    +      player.jump_increase_power   = 1
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      state.previous_tile_size     ||= state.tile_size
    -** Processing line: ~      state.x                      ||= 2400~
    +
    +** Processing line: ~      state.gravity                = -1~
     - Inside source: true
     *** True Line Result
    -      state.x                      ||= 2400
    -** Processing line: ~      state.y                      ||= 200~
    +      state.gravity                = -1
    +** Processing line: ~      state.drag                   = 0.001~
     - Inside source: true
     *** True Line Result
    -      state.y                      ||= 200
    -** Processing line: ~      state.dy                     ||= 0~
    +      state.drag                   = 0.001
    +** Processing line: ~      state.tile_size              = 64~
     - Inside source: true
     *** True Line Result
    -      state.dy                     ||= 0
    -** Processing line: ~      state.dx                     ||= 0~
    +      state.tile_size              = 64
    +** Processing line: ~      state.tiles                ||= [~
     - Inside source: true
     *** True Line Result
    -      state.dx                     ||= 0
    -** Processing line: ~      attempt_load_world_from_file~
    +      state.tiles                ||= [
    +** Processing line: ~        { ordinal_x:  0, ordinal_y: 0 },~
     - Inside source: true
     *** True Line Result
    -      attempt_load_world_from_file
    -** Processing line: ~      state.world_lookup           ||= { }~
    +        { ordinal_x:  0, ordinal_y: 0 },
    +** Processing line: ~        { ordinal_x:  1, ordinal_y: 0 },~
     - Inside source: true
     *** True Line Result
    -      state.world_lookup           ||= { }
    -** Processing line: ~      state.world_collision_rects  ||= []~
    +        { ordinal_x:  1, ordinal_y: 0 },
    +** Processing line: ~        { ordinal_x:  2, ordinal_y: 0 },~
     - Inside source: true
     *** True Line Result
    -      state.world_collision_rects  ||= []
    -** Processing line: ~      state.mode                   ||= :creating~
    +        { ordinal_x:  2, ordinal_y: 0 },
    +** Processing line: ~        { ordinal_x:  3, ordinal_y: 0 },~
     - Inside source: true
     *** True Line Result
    -      state.mode                   ||= :creating
    -** Processing line: ~      state.select_menu            ||= [0, 720, 1280, 720]~
    +        { ordinal_x:  3, ordinal_y: 0 },
    +** Processing line: ~        { ordinal_x:  4, ordinal_y: 0 },~
     - Inside source: true
     *** True Line Result
    -      state.select_menu            ||= [0, 720, 1280, 720]
    -** Processing line: ~      state.sprite_quantity        ||= 20~
    +        { ordinal_x:  4, ordinal_y: 0 },
    +** Processing line: ~        { ordinal_x:  5, ordinal_y: 0 },~
     - Inside source: true
     *** True Line Result
    -      state.sprite_quantity        ||= 20
    -** Processing line: ~      state.sprite_coords          ||= []~
    +        { ordinal_x:  5, ordinal_y: 0 },
    +** Processing line: ~        { ordinal_x:  6, ordinal_y: 0 },~
     - Inside source: true
     *** True Line Result
    -      state.sprite_coords          ||= []
    -** Processing line: ~      state.banner_coords          ||= [640, 680 + 720]~
    +        { ordinal_x:  6, ordinal_y: 0 },
    +** Processing line: ~        { ordinal_x:  7, ordinal_y: 0 },~
     - Inside source: true
     *** True Line Result
    -      state.banner_coords          ||= [640, 680 + 720]
    -** Processing line: ~      state.sprite_selected        ||= 1~
    +        { ordinal_x:  7, ordinal_y: 0 },
    +** Processing line: ~        { ordinal_x:  8, ordinal_y: 0 },~
     - Inside source: true
     *** True Line Result
    -      state.sprite_selected        ||= 1
    -** Processing line: ~      state.map_saved_at           ||= 0~
    +        { ordinal_x:  8, ordinal_y: 0 },
    +** Processing line: ~        { ordinal_x:  9, ordinal_y: 0 },~
     - Inside source: true
     *** True Line Result
    -      state.map_saved_at           ||= 0
    -** Processing line: ~      state.intro_tick_count       ||= state.tick_count~
    +        { ordinal_x:  9, ordinal_y: 0 },
    +** Processing line: ~        { ordinal_x: 10, ordinal_y: 0 },~
     - Inside source: true
     *** True Line Result
    -      state.intro_tick_count       ||= state.tick_count
    -** Processing line: ~      if state.sprite_coords == []~
    +        { ordinal_x: 10, ordinal_y: 0 },
    +** Processing line: ~        { ordinal_x: 11, ordinal_y: 0 },~
     - Inside source: true
     *** True Line Result
    -      if state.sprite_coords == []
    -** Processing line: ~        count = 1~
    +        { ordinal_x: 11, ordinal_y: 0 },
    +** Processing line: ~        { ordinal_x: 12, ordinal_y: 0 },~
     - Inside source: true
     *** True Line Result
    -        count = 1
    -** Processing line: ~        temp_x = 165~
    +        { ordinal_x: 12, ordinal_y: 0 },
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        temp_x = 165
    -** Processing line: ~        temp_y = 500 + 720~
    +
    +** Processing line: ~        { ordinal_x:  9, ordinal_y: 3 },~
     - Inside source: true
     *** True Line Result
    -        temp_y = 500 + 720
    -** Processing line: ~        state.sprite_quantity.times do~
    +        { ordinal_x:  9, ordinal_y: 3 },
    +** Processing line: ~        { ordinal_x: 10, ordinal_y: 3 },~
     - Inside source: true
     *** True Line Result
    -        state.sprite_quantity.times do
    -** Processing line: ~          state.sprite_coords += [[temp_x, temp_y, count]]~
    +        { ordinal_x: 10, ordinal_y: 3 },
    +** Processing line: ~        { ordinal_x: 11, ordinal_y: 3 },~
     - Inside source: true
     *** True Line Result
    -          state.sprite_coords += [[temp_x, temp_y, count]]
    -** Processing line: ~          temp_x += 100~
    +        { ordinal_x: 11, ordinal_y: 3 },
    +** Processing line: ~      ]~
     - Inside source: true
     *** True Line Result
    -          temp_x += 100
    -** Processing line: ~          count += 1~
    +      ]
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          count += 1
    -** Processing line: ~          if temp_x > 1280 - (165 + 50)~
    +
    +** Processing line: ~      tiles.each do |t|~
     - Inside source: true
     *** True Line Result
    -          if temp_x > 1280 - (165 + 50)
    -** Processing line: ~            temp_x = 165~
    +      tiles.each do |t|
    +** Processing line: ~        t.rect = { x: t.ordinal_x * 64,~
     - Inside source: true
     *** True Line Result
    -            temp_x = 165
    -** Processing line: ~            temp_y -= 75~
    +        t.rect = { x: t.ordinal_x * 64,
    +** Processing line: ~                   y: t.ordinal_y * 64,~
     - Inside source: true
     *** True Line Result
    -            temp_y -= 75
    -** Processing line: ~          end~
    +                   y: t.ordinal_y * 64,
    +** Processing line: ~                   w: 64,~
     - Inside source: true
     *** True Line Result
    -          end
    -** Processing line: ~        end~
    +                   w: 64,
    +** Processing line: ~                   h: 64 }~
     - Inside source: true
     *** True Line Result
    -        end
    +                   h: 64 }
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    @@ -114687,34 +116255,42 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def start_of_tongue x = nil, y = nil~
    +** Processing line: ~    def render~
     - Inside source: true
     *** True Line Result
    -    def start_of_tongue x = nil, y = nil
    -** Processing line: ~      x ||= state.x~
    +    def render
    +** Processing line: ~      render_player~
     - Inside source: true
     *** True Line Result
    -      x ||= state.x
    -** Processing line: ~      y ||= state.y~
    +      render_player
    +** Processing line: ~      render_tiles~
     - Inside source: true
     *** True Line Result
    -      y ||= state.y
    -** Processing line: ~      [~
    +      render_tiles
    +** Processing line: ~      # render_grid~
     - Inside source: true
     *** True Line Result
    -      [
    -** Processing line: ~        x + state.player_width.half,~
    +      # render_grid
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -        x + state.player_width.half,
    -** Processing line: ~        y + state.player_height.half~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        y + state.player_height.half
    -** Processing line: ~      ]~
    +
    +** Processing line: ~    def input~
     - Inside source: true
     *** True Line Result
    -      ]
    +    def input
    +** Processing line: ~      input_jump~
    +- Inside source: true
    +*** True Line Result
    +      input_jump
    +** Processing line: ~      input_move~
    +- Inside source: true
    +*** True Line Result
    +      input_move
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -114723,186 +116299,206 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def stage_definition~
    +** Processing line: ~    def calc~
     - Inside source: true
     *** True Line Result
    -    def stage_definition
    -** Processing line: ~      outputs.sprites << [vx(0), vy(0), vw(10000), vw(5875), 'sprites/level-map.png']~
    +    def calc
    +** Processing line: ~      calc_player_rect~
     - Inside source: true
     *** True Line Result
    -      outputs.sprites << [vx(0), vy(0), vw(10000), vw(5875), 'sprites/level-map.png']
    -** Processing line: ~    end~
    +      calc_player_rect
    +** Processing line: ~      calc_left~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +      calc_left
    +** Processing line: ~      calc_right~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def render~
    +      calc_right
    +** Processing line: ~      calc_below~
     - Inside source: true
     *** True Line Result
    -    def render
    -** Processing line: ~      stage_definition~
    +      calc_below
    +** Processing line: ~      calc_above~
     - Inside source: true
     *** True Line Result
    -      stage_definition
    -** Processing line: ~      start_of_tongue_render = [vx(start_of_tongue.x), vy(start_of_tongue.y)]~
    +      calc_above
    +** Processing line: ~      calc_player_dy~
     - Inside source: true
     *** True Line Result
    -      start_of_tongue_render = [vx(start_of_tongue.x), vy(start_of_tongue.y)]
    -** Processing line: ~      end_of_tongue_render = [vx(end_of_tongue.x), vy(end_of_tongue.y)]~
    +      calc_player_dy
    +** Processing line: ~      calc_player_dx~
     - Inside source: true
     *** True Line Result
    -      end_of_tongue_render = [vx(end_of_tongue.x), vy(end_of_tongue.y)]
    +      calc_player_dx
    +** Processing line: ~      calc_game_over~
    +- Inside source: true
    +*** True Line Result
    +      calc_game_over
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      if state.anchor_point~
    +** Processing line: ~    def render_player~
     - Inside source: true
     *** True Line Result
    -      if state.anchor_point
    -** Processing line: ~        anchor_point_render = [vx(state.anchor_point.x), vy(state.anchor_point.y)]~
    +    def render_player
    +** Processing line: ~      outputs.sprites << {~
     - Inside source: true
     *** True Line Result
    -        anchor_point_render = [vx(state.anchor_point.x), vy(state.anchor_point.y)]
    -** Processing line: ~        outputs.sprites << { x: start_of_tongue_render.x,~
    +      outputs.sprites << {
    +** Processing line: ~        x: player.x,~
     - Inside source: true
     *** True Line Result
    -        outputs.sprites << { x: start_of_tongue_render.x,
    -** Processing line: ~                             y: start_of_tongue_render.y,~
    +        x: player.x,
    +** Processing line: ~        y: player.y,~
     - Inside source: true
     *** True Line Result
    -                             y: start_of_tongue_render.y,
    -** Processing line: ~                             w: vw(2),~
    +        y: player.y,
    +** Processing line: ~        w: player.size,~
     - Inside source: true
     *** True Line Result
    -                             w: vw(2),
    -** Processing line: ~                             h: args.geometry.distance(start_of_tongue_render, anchor_point_render),~
    +        w: player.size,
    +** Processing line: ~        h: player.size,~
     - Inside source: true
     *** True Line Result
    -                             h: args.geometry.distance(start_of_tongue_render, anchor_point_render),
    -** Processing line: ~                             path:  'sprites/square-pink.png',~
    +        h: player.size,
    +** Processing line: ~        path: 'sprites/square/red.png'~
     - Inside source: true
     *** True Line Result
    -                             path:  'sprites/square-pink.png',
    -** Processing line: ~                             angle_anchor_y: 0,~
    +        path: 'sprites/square/red.png'
    +** Processing line: ~      }~
     - Inside source: true
     *** True Line Result
    -                             angle_anchor_y: 0,
    -** Processing line: ~                             angle: state.tongue_angle - 90 }~
    +      }
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -                             angle: state.tongue_angle - 90 }
    -** Processing line: ~      else~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      else
    -** Processing line: ~        outputs.sprites << { x: vx(start_of_tongue.x),~
    +
    +** Processing line: ~    def render_tiles~
     - Inside source: true
     *** True Line Result
    -        outputs.sprites << { x: vx(start_of_tongue.x),
    -** Processing line: ~                             y: vy(start_of_tongue.y),~
    +    def render_tiles
    +** Processing line: ~      outputs.sprites << state.tiles.map do |t|~
     - Inside source: true
     *** True Line Result
    -                             y: vy(start_of_tongue.y),
    -** Processing line: ~                             w: vw(2),~
    +      outputs.sprites << state.tiles.map do |t|
    +** Processing line: ~        t.merge path: 'sprites/square/white.png',~
     - Inside source: true
     *** True Line Result
    -                             w: vw(2),
    -** Processing line: ~                             h: vh(state.tongue_length),~
    +        t.merge path: 'sprites/square/white.png',
    +** Processing line: ~                x: t.ordinal_x * 64,~
     - Inside source: true
     *** True Line Result
    -                             h: vh(state.tongue_length),
    -** Processing line: ~                             path:  'sprites/square-pink.png',~
    +                x: t.ordinal_x * 64,
    +** Processing line: ~                y: t.ordinal_y * 64,~
     - Inside source: true
     *** True Line Result
    -                             path:  'sprites/square-pink.png',
    -** Processing line: ~                             angle_anchor_y: 0,~
    +                y: t.ordinal_y * 64,
    +** Processing line: ~                w: 64,~
     - Inside source: true
     *** True Line Result
    -                             angle_anchor_y: 0,
    -** Processing line: ~                             angle: state.tongue_angle - 90 }~
    +                w: 64,
    +** Processing line: ~                h: 64~
     - Inside source: true
     *** True Line Result
    -                             angle: state.tongue_angle - 90 }
    +                h: 64
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
           end
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      outputs.sprites << state.objects.map { |o| [vx(o.x), vy(o.y), vw(o.w), vh(o.h), o.path] }~
    +** Processing line: ~    def render_grid~
     - Inside source: true
     *** True Line Result
    -      outputs.sprites << state.objects.map { |o| [vx(o.x), vy(o.y), vw(o.w), vh(o.h), o.path] }
    -** Processing line: ~~
    +    def render_grid
    +** Processing line: ~      if state.tick_count == 0~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      if state.god_mode~
    +      if state.tick_count == 0
    +** Processing line: ~        outputs[:grid].background_color = [0, 0, 0, 0]~
     - Inside source: true
     *** True Line Result
    -      if state.god_mode
    -** Processing line: ~        # SHOW HIDE COLLISIONS~
    +        outputs[:grid].background_color = [0, 0, 0, 0]
    +** Processing line: ~        outputs[:grid].borders << available_brick_locations~
     - Inside source: true
     *** True Line Result
    -        # SHOW HIDE COLLISIONS
    -** Processing line: ~        outputs.sprites << state.world.map do |x, y, w, h|~
    +        outputs[:grid].borders << available_brick_locations
    +** Processing line: ~        outputs[:grid].labels  << available_brick_locations.map do |b|~
     - Inside source: true
     *** True Line Result
    -        outputs.sprites << state.world.map do |x, y, w, h|
    -** Processing line: ~          x = vx(x)~
    +        outputs[:grid].labels  << available_brick_locations.map do |b|
    +** Processing line: ~          [~
     - Inside source: true
     *** True Line Result
    -          x = vx(x)
    -** Processing line: ~          y = vy(y)~
    +          [
    +** Processing line: ~            b.merge(text: "#{b.ordinal_x},#{b.ordinal_y}",~
     - Inside source: true
     *** True Line Result
    -          y = vy(y)
    -** Processing line: ~          if x > -80 && x < 1280 && y > -80 && y < 720~
    +            b.merge(text: "#{b.ordinal_x},#{b.ordinal_y}",
    +** Processing line: ~                    x: b.x + 2,~
     - Inside source: true
     *** True Line Result
    -          if x > -80 && x < 1280 && y > -80 && y < 720
    -** Processing line: ~            {~
    +                    x: b.x + 2,
    +** Processing line: ~                    y: b.y + 2,~
     - Inside source: true
     *** True Line Result
    -            {
    -** Processing line: ~              x: x,~
    +                    y: b.y + 2,
    +** Processing line: ~                    size_enum: -3,~
     - Inside source: true
     *** True Line Result
    -              x: x,
    -** Processing line: ~              y: y,~
    +                    size_enum: -3,
    +** Processing line: ~                    vertical_alignment_enum: 0,~
     - Inside source: true
     *** True Line Result
    -              y: y,
    -** Processing line: ~              w: vw(w || state.tile_size),~
    +                    vertical_alignment_enum: 0,
    +** Processing line: ~                    blendmode_enum: 0),~
     - Inside source: true
     *** True Line Result
    -              w: vw(w || state.tile_size),
    -** Processing line: ~              h: vh(h || state.tile_size),~
    +                    blendmode_enum: 0),
    +** Processing line: ~            b.merge(text: "#{b.x},#{b.y}",~
     - Inside source: true
     *** True Line Result
    -              h: vh(h || state.tile_size),
    -** Processing line: ~              path: 'sprites/square-gray.png',~
    +            b.merge(text: "#{b.x},#{b.y}",
    +** Processing line: ~                    x: b.x + 2,~
     - Inside source: true
     *** True Line Result
    -              path: 'sprites/square-gray.png',
    -** Processing line: ~              a: 128~
    +                    x: b.x + 2,
    +** Processing line: ~                    y: b.y + 2 + 20,~
     - Inside source: true
     *** True Line Result
    -              a: 128
    -** Processing line: ~            }~
    +                    y: b.y + 2 + 20,
    +** Processing line: ~                    size_enum: -3,~
     - Inside source: true
     *** True Line Result
    -            }
    -** Processing line: ~          end~
    +                    size_enum: -3,
    +** Processing line: ~                    vertical_alignment_enum: 0,~
     - Inside source: true
     *** True Line Result
    -          end
    +                    vertical_alignment_enum: 0,
    +** Processing line: ~                    blendmode_enum: 0)~
    +- Inside source: true
    +*** True Line Result
    +                    blendmode_enum: 0)
    +** Processing line: ~          ]~
    +- Inside source: true
    +*** True Line Result
    +          ]
     ** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    @@ -114915,90 +116511,90 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      render_player~
    +** Processing line: ~      outputs.sprites << { x: 0, y: 0, w: 1280, h: 720, path: :grid }~
     - Inside source: true
     *** True Line Result
    -      render_player
    -** Processing line: ~      outputs.sprites << [vx(2315), vy(45), vw(569), vh(402), 'sprites/square-blue.png', 0, 40]~
    +      outputs.sprites << { x: 0, y: 0, w: 1280, h: 720, path: :grid }
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      outputs.sprites << [vx(2315), vy(45), vw(569), vh(402), 'sprites/square-blue.png', 0, 40]
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      # Label in top left of the screen~
    +** Processing line: ~    def input_jump~
     - Inside source: true
     *** True Line Result
    -      # Label in top left of the screen
    -** Processing line: ~      outputs.primitives << [20, 640, 180, 70, 255, 255, 255, 128].solid~
    +    def input_jump
    +** Processing line: ~      if inputs.keyboard.key_down.space~
     - Inside source: true
     *** True Line Result
    -      outputs.primitives << [20, 640, 180, 70, 255, 255, 255, 128].solid
    -** Processing line: ~      outputs.primitives << [30, 700, "Stuff: #{state.stuff_score} of #{$mugs.count}", 1].label~
    +      if inputs.keyboard.key_down.space
    +** Processing line: ~        player_jump~
     - Inside source: true
     *** True Line Result
    -      outputs.primitives << [30, 700, "Stuff: #{state.stuff_score} of #{$mugs.count}", 1].label
    -** Processing line: ~      outputs.primitives << [30, 670, "Time: #{"%.2f" % state.stuff_time}", 1].label~
    +        player_jump
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -      outputs.primitives << [30, 670, "Time: #{"%.2f" % state.stuff_time}", 1].label
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      if state.god_mode~
    +** Processing line: ~      if inputs.keyboard.key_held.space~
     - Inside source: true
     *** True Line Result
    -      if state.god_mode
    -** Processing line: ~        if state.map_saved_at > 0 && state.map_saved_at.elapsed_time < 120~
    +      if inputs.keyboard.key_held.space
    +** Processing line: ~        player_jump_increase_air_time~
     - Inside source: true
     *** True Line Result
    -        if state.map_saved_at > 0 && state.map_saved_at.elapsed_time < 120
    -** Processing line: ~          outputs.primitives << [920, 670, 'Map has been exported!', 1, 0, 50, 100, 50].label~
    +        player_jump_increase_air_time
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -          outputs.primitives << [920, 670, 'Map has been exported!', 1, 0, 50, 100, 50].label
    -** Processing line: ~        end~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -        end
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~~
    +** Processing line: ~    def input_move~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~        # Creates sprite following mouse to help indicate which sprite you have selected~
    +    def input_move
    +** Processing line: ~      if player.dx.abs < 20~
     - Inside source: true
     *** True Line Result
    -        # Creates sprite following mouse to help indicate which sprite you have selected
    -** Processing line: ~        outputs.primitives << [inputs.mouse.position.x, inputs.mouse.position.y,~
    +      if player.dx.abs < 20
    +** Processing line: ~        if inputs.keyboard.left~
     - Inside source: true
     *** True Line Result
    -        outputs.primitives << [inputs.mouse.position.x, inputs.mouse.position.y,
    -** Processing line: ~                               state.tile_size, state.tile_size, 'sprites/square-indigo.png', 0, 100].sprite~
    +        if inputs.keyboard.left
    +** Processing line: ~          player.dx -= 2~
     - Inside source: true
     *** True Line Result
    -                               state.tile_size, state.tile_size, 'sprites/square-indigo.png', 0, 100].sprite
    -** Processing line: ~      end~
    +          player.dx -= 2
    +** Processing line: ~        elsif inputs.keyboard.right~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +        elsif inputs.keyboard.right
    +** Processing line: ~          player.dx += 2~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      render_mini_map~
    +          player.dx += 2
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -      render_mini_map
    -** Processing line: ~      outputs.primitives << [0, 0, 1280, 720, 255, 255, 255, 255 * state.game_start_at.ease(60, :flip)].solid~
    +        end
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -      outputs.primitives << [0, 0, 1280, 720, 255, 255, 255, 255 * state.game_start_at.ease(60, :flip)].solid
    +      end
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -115007,66 +116603,78 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def render_mini_map~
    +** Processing line: ~    def calc_game_over~
     - Inside source: true
     *** True Line Result
    -    def render_mini_map
    -** Processing line: ~      x, y = 1170, 10~
    +    def calc_game_over
    +** Processing line: ~      if player.y < -64~
     - Inside source: true
     *** True Line Result
    -      x, y = 1170, 10
    -** Processing line: ~      outputs.primitives << [x, y, 100, 58, 0, 0, 0, 200].solid~
    +      if player.y < -64
    +** Processing line: ~        player.x = 64~
     - Inside source: true
     *** True Line Result
    -      outputs.primitives << [x, y, 100, 58, 0, 0, 0, 200].solid
    -** Processing line: ~      outputs.primitives << [x + args.state.x.fdiv(100) - 1, y + args.state.y.fdiv(100) - 1, 2, 2, 0, 255, 0].solid~
    +        player.x = 64
    +** Processing line: ~        player.y = 800~
     - Inside source: true
     *** True Line Result
    -      outputs.primitives << [x + args.state.x.fdiv(100) - 1, y + args.state.y.fdiv(100) - 1, 2, 2, 0, 255, 0].solid
    -** Processing line: ~      t_start = start_of_tongue~
    +        player.y = 800
    +** Processing line: ~        player.dx = 0~
     - Inside source: true
     *** True Line Result
    -      t_start = start_of_tongue
    -** Processing line: ~      t_end = end_of_tongue~
    +        player.dx = 0
    +** Processing line: ~        player.dy = 0~
     - Inside source: true
     *** True Line Result
    -      t_end = end_of_tongue
    -** Processing line: ~      outputs.primitives << [~
    +        player.dy = 0
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -      outputs.primitives << [
    -** Processing line: ~        x + t_start.x.fdiv(100), y + t_start.y.fdiv(100),~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -        x + t_start.x.fdiv(100), y + t_start.y.fdiv(100),
    -** Processing line: ~        x + t_end.x.fdiv(100), y + t_end.y.fdiv(100),~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        x + t_end.x.fdiv(100), y + t_end.y.fdiv(100),
    -** Processing line: ~        255, 255, 255~
    +
    +** Processing line: ~    def calc_player_rect~
     - Inside source: true
     *** True Line Result
    -        255, 255, 255
    -** Processing line: ~      ].line~
    +    def calc_player_rect
    +** Processing line: ~      player.rect      = player_current_rect~
     - Inside source: true
     *** True Line Result
    -      ].line
    +      player.rect      = player_current_rect
    +** Processing line: ~      player.next_rect = player_next_rect~
    +- Inside source: true
    +*** True Line Result
    +      player.next_rect = player_next_rect
    +** Processing line: ~      player.prev_rect = player_prev_rect~
    +- Inside source: true
    +*** True Line Result
    +      player.prev_rect = player_prev_rect
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      state.objects.each do |o|~
    +** Processing line: ~    def calc_player_dx~
     - Inside source: true
     *** True Line Result
    -      state.objects.each do |o|
    -** Processing line: ~        outputs.primitives << [x + o.x.fdiv(100) - 1, y + o.y.fdiv(100) - 1, 2, 2, 200, 200, 0].solid~
    +    def calc_player_dx
    +** Processing line: ~      player.dx  = player_next_dx~
     - Inside source: true
     *** True Line Result
    -        outputs.primitives << [x + o.x.fdiv(100) - 1, y + o.y.fdiv(100) - 1, 2, 2, 200, 200, 0].solid
    -** Processing line: ~      end~
    +      player.dx  = player_next_dx
    +** Processing line: ~      player.x  += player.dx~
     - Inside source: true
     *** True Line Result
    -      end
    +      player.x  += player.dx
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -115075,66 +116683,70 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def calc_camera percentage_override = nil~
    -- Inside source: true
    -*** True Line Result
    -    def calc_camera percentage_override = nil
    -** Processing line: ~      percentage = percentage_override || (0.2 * state.camera_scale)~
    +** Processing line: ~    def calc_player_dy~
     - Inside source: true
     *** True Line Result
    -      percentage = percentage_override || (0.2 * state.camera_scale)
    -** Processing line: ~      target_scale = state.target_camera_scale~
    +    def calc_player_dy
    +** Processing line: ~      player.y  += player.dy~
     - Inside source: true
     *** True Line Result
    -      target_scale = state.target_camera_scale
    -** Processing line: ~      distance_scale = target_scale - state.camera_scale~
    +      player.y  += player.dy
    +** Processing line: ~      player.dy  = player_next_dy~
     - Inside source: true
     *** True Line Result
    -      distance_scale = target_scale - state.camera_scale
    -** Processing line: ~      state.camera_scale += distance_scale * percentage~
    +      player.dy  = player_next_dy
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      state.camera_scale += distance_scale * percentage
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      target_x = state.x * state.target_camera_scale~
    +** Processing line: ~    def calc_below~
     - Inside source: true
     *** True Line Result
    -      target_x = state.x * state.target_camera_scale
    -** Processing line: ~      target_y = state.y * state.target_camera_scale~
    +    def calc_below
    +** Processing line: ~      return unless player.dy < 0~
     - Inside source: true
     *** True Line Result
    -      target_y = state.y * state.target_camera_scale
    -** Processing line: ~~
    +      return unless player.dy < 0
    +** Processing line: ~      tiles_below = tiles_find { |t| t.rect.top <= player.prev_rect.y }~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      distance_x = target_x - (state.camera_x + 640)~
    +      tiles_below = tiles_find { |t| t.rect.top <= player.prev_rect.y }
    +** Processing line: ~      collision = tiles_find_colliding tiles_below, (player.rect.merge y: player.next_rect.y)~
     - Inside source: true
     *** True Line Result
    -      distance_x = target_x - (state.camera_x + 640)
    -** Processing line: ~      distance_y = target_y - (state.camera_y + 360)~
    +      collision = tiles_find_colliding tiles_below, (player.rect.merge y: player.next_rect.y)
    +** Processing line: ~      if collision~
     - Inside source: true
     *** True Line Result
    -      distance_y = target_y - (state.camera_y + 360)
    -** Processing line: ~      state.camera_x += distance_x * percentage if distance_x.abs > 1~
    +      if collision
    +** Processing line: ~        player.y  = collision.rect.y + state.tile_size~
     - Inside source: true
     *** True Line Result
    -      state.camera_x += distance_x * percentage if distance_x.abs > 1
    -** Processing line: ~      state.camera_y += distance_y * percentage if distance_y.abs > 1~
    +        player.y  = collision.rect.y + state.tile_size
    +** Processing line: ~        player.dy = 0~
     - Inside source: true
     *** True Line Result
    -      state.camera_y += distance_y * percentage if distance_y.abs > 1
    -** Processing line: ~      state.camera_x = 0 if state.camera_x < 0~
    +        player.dy = 0
    +** Processing line: ~        player.action = :standing~
     - Inside source: true
     *** True Line Result
    -      state.camera_x = 0 if state.camera_x < 0
    -** Processing line: ~      state.camera_y = 0 if state.camera_y < 0~
    +        player.action = :standing
    +** Processing line: ~      else~
     - Inside source: true
     *** True Line Result
    -      state.camera_y = 0 if state.camera_y < 0
    +      else
    +** Processing line: ~        player.action = :falling~
    +- Inside source: true
    +*** True Line Result
    +        player.action = :falling
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -115143,30 +116755,34 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def vx x~
    +** Processing line: ~    def calc_left~
     - Inside source: true
     *** True Line Result
    -    def vx x
    -** Processing line: ~       (x * state.camera_scale) - state.camera_x~
    +    def calc_left
    +** Processing line: ~      return unless player.dx < 0 && player_next_dx < 0~
     - Inside source: true
     *** True Line Result
    -       (x * state.camera_scale) - state.camera_x
    -** Processing line: ~    end~
    +      return unless player.dx < 0 && player_next_dx < 0
    +** Processing line: ~      tiles_left = tiles_find { |t| t.rect.right <= player.prev_rect.left }~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +      tiles_left = tiles_find { |t| t.rect.right <= player.prev_rect.left }
    +** Processing line: ~      collision = tiles_find_colliding tiles_left, (player.rect.merge x: player.next_rect.x)~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def vy y~
    +      collision = tiles_find_colliding tiles_left, (player.rect.merge x: player.next_rect.x)
    +** Processing line: ~      return unless collision~
     - Inside source: true
     *** True Line Result
    -    def vy y
    -** Processing line: ~      (y * state.camera_scale) - state.camera_y~
    +      return unless collision
    +** Processing line: ~      player.x  = collision.rect.right~
     - Inside source: true
     *** True Line Result
    -      (y * state.camera_scale) - state.camera_y
    +      player.x  = collision.rect.right
    +** Processing line: ~      player.dx = 0~
    +- Inside source: true
    +*** True Line Result
    +      player.dx = 0
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -115175,30 +116791,34 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def vw w~
    +** Processing line: ~    def calc_right~
     - Inside source: true
     *** True Line Result
    -    def vw w
    -** Processing line: ~      w * state.camera_scale~
    +    def calc_right
    +** Processing line: ~      return unless player.dx > 0 && player_next_dx > 0~
     - Inside source: true
     *** True Line Result
    -      w * state.camera_scale
    -** Processing line: ~    end~
    +      return unless player.dx > 0 && player_next_dx > 0
    +** Processing line: ~      tiles_right = tiles_find { |t| t.rect.left >= player.prev_rect.right }~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +      tiles_right = tiles_find { |t| t.rect.left >= player.prev_rect.right }
    +** Processing line: ~      collision = tiles_find_colliding tiles_right, (player.rect.merge x: player.next_rect.x)~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def vh h~
    +      collision = tiles_find_colliding tiles_right, (player.rect.merge x: player.next_rect.x)
    +** Processing line: ~      return unless collision~
     - Inside source: true
     *** True Line Result
    -    def vh h
    -** Processing line: ~      h * state.camera_scale~
    +      return unless collision
    +** Processing line: ~      player.x  = collision.rect.left - player.rect.w~
     - Inside source: true
     *** True Line Result
    -      h * state.camera_scale
    +      player.x  = collision.rect.left - player.rect.w
    +** Processing line: ~      player.dx = 0~
    +- Inside source: true
    +*** True Line Result
    +      player.dx = 0
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -115207,30 +116827,34 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def calc~
    +** Processing line: ~    def calc_above~
     - Inside source: true
     *** True Line Result
    -    def calc
    -** Processing line: ~      calc_camera~
    +    def calc_above
    +** Processing line: ~      return unless player.dy > 0~
     - Inside source: true
     *** True Line Result
    -      calc_camera
    -** Processing line: ~      calc_world_lookup~
    +      return unless player.dy > 0
    +** Processing line: ~      tiles_above = tiles_find { |t| t.rect.y >= player.prev_rect.y }~
     - Inside source: true
     *** True Line Result
    -      calc_world_lookup
    -** Processing line: ~      calc_player~
    +      tiles_above = tiles_find { |t| t.rect.y >= player.prev_rect.y }
    +** Processing line: ~      collision = tiles_find_colliding tiles_above, (player.rect.merge y: player.next_rect.y)~
     - Inside source: true
     *** True Line Result
    -      calc_player
    -** Processing line: ~      calc_on_floor~
    +      collision = tiles_find_colliding tiles_above, (player.rect.merge y: player.next_rect.y)
    +** Processing line: ~      return unless collision~
     - Inside source: true
     *** True Line Result
    -      calc_on_floor
    -** Processing line: ~      calc_score~
    +      return unless collision
    +** Processing line: ~      player.dy = 0~
     - Inside source: true
     *** True Line Result
    -      calc_score
    +      player.dy = 0
    +** Processing line: ~      player.y  = collision.rect.bottom - player.rect.h~
    +- Inside source: true
    +*** True Line Result
    +      player.y  = collision.rect.bottom - player.rect.h
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -115239,18 +116863,14 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def set_camera_scale v = nil~
    -- Inside source: true
    -*** True Line Result
    -    def set_camera_scale v = nil
    -** Processing line: ~      return if v < 0.1~
    +** Processing line: ~    def player_current_rect~
     - Inside source: true
     *** True Line Result
    -      return if v < 0.1
    -** Processing line: ~      state.target_camera_scale = v~
    +    def player_current_rect
    +** Processing line: ~      { x: player.x, y: player.y, w: player.size, h: player.size }~
     - Inside source: true
     *** True Line Result
    -      state.target_camera_scale = v
    +      { x: player.x, y: player.y, w: player.size, h: player.size }
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -115259,110 +116879,118 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def process_inputs_god_mode~
    +** Processing line: ~    def available_brick_locations~
     - Inside source: true
     *** True Line Result
    -    def process_inputs_god_mode
    -** Processing line: ~      return unless state.god_mode~
    +    def available_brick_locations
    +** Processing line: ~      (0..19).to_a~
     - Inside source: true
     *** True Line Result
    -      return unless state.god_mode
    -** Processing line: ~~
    +      (0..19).to_a
    +** Processing line: ~        .product(0..11)~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      if inputs.keyboard.key_down.equal_sign || (inputs.keyboard.equal_sign && state.tick_count.mod_zero?(10))~
    +        .product(0..11)
    +** Processing line: ~        .map do |(ordinal_x, ordinal_y)|~
     - Inside source: true
     *** True Line Result
    -      if inputs.keyboard.key_down.equal_sign || (inputs.keyboard.equal_sign && state.tick_count.mod_zero?(10))
    -** Processing line: ~        set_camera_scale state.camera_scale + 0.1~
    +        .map do |(ordinal_x, ordinal_y)|
    +** Processing line: ~        { ordinal_x: ordinal_x,~
     - Inside source: true
     *** True Line Result
    -        set_camera_scale state.camera_scale + 0.1
    -** Processing line: ~      elsif inputs.keyboard.key_down.hyphen || (inputs.keyboard.hyphen && state.tick_count.mod_zero?(10))~
    +        { ordinal_x: ordinal_x,
    +** Processing line: ~          ordinal_y: ordinal_y,~
     - Inside source: true
     *** True Line Result
    -      elsif inputs.keyboard.key_down.hyphen || (inputs.keyboard.hyphen && state.tick_count.mod_zero?(10))
    -** Processing line: ~        set_camera_scale state.camera_scale - 0.1~
    +          ordinal_y: ordinal_y,
    +** Processing line: ~          x: ordinal_x * 64,~
     - Inside source: true
     *** True Line Result
    -        set_camera_scale state.camera_scale - 0.1
    -** Processing line: ~      elsif inputs.keyboard.eight || inputs.keyboard.zero~
    +          x: ordinal_x * 64,
    +** Processing line: ~          y: ordinal_y * 64,~
     - Inside source: true
     *** True Line Result
    -      elsif inputs.keyboard.eight || inputs.keyboard.zero
    -** Processing line: ~        set_camera_scale 1~
    +          y: ordinal_y * 64,
    +** Processing line: ~          w: 64,~
     - Inside source: true
     *** True Line Result
    -        set_camera_scale 1
    +          w: 64,
    +** Processing line: ~          h: 64 }~
    +- Inside source: true
    +*** True Line Result
    +          h: 64 }
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
           end
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      if input_up?~
    +** Processing line: ~    def player~
     - Inside source: true
     *** True Line Result
    -      if input_up?
    -** Processing line: ~        state.y += 10~
    +    def player
    +** Processing line: ~      state.player ||= args.state.new_entity :player~
     - Inside source: true
     *** True Line Result
    -        state.y += 10
    -** Processing line: ~        state.dy = 0~
    +      state.player ||= args.state.new_entity :player
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -        state.dy = 0
    -** Processing line: ~      elsif input_down?~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      elsif input_down?
    -** Processing line: ~        state.y -= 10~
    +
    +** Processing line: ~    def player_next_dy~
     - Inside source: true
     *** True Line Result
    -        state.y -= 10
    -** Processing line: ~        state.dy = 0~
    +    def player_next_dy
    +** Processing line: ~      player.dy + state.gravity + state.drag ** 2 * -1~
     - Inside source: true
     *** True Line Result
    -        state.dy = 0
    -** Processing line: ~      end~
    +      player.dy + state.gravity + state.drag ** 2 * -1
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      end
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      if input_left?~
    +** Processing line: ~    def player_next_dx~
     - Inside source: true
     *** True Line Result
    -      if input_left?
    -** Processing line: ~        state.x -= 10~
    +    def player_next_dx
    +** Processing line: ~      player.dx * 0.8~
     - Inside source: true
     *** True Line Result
    -        state.x -= 10
    -** Processing line: ~        state.dx = 0~
    +      player.dx * 0.8
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -        state.dx = 0
    -** Processing line: ~      elsif input_right?~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      elsif input_right?
    -** Processing line: ~        state.x += 10~
    +
    +** Processing line: ~    def player_next_rect~
     - Inside source: true
     *** True Line Result
    -        state.x += 10
    -** Processing line: ~        state.dx = 0~
    +    def player_next_rect
    +** Processing line: ~      player.rect.merge x: player.x + player_next_dx,~
     - Inside source: true
     *** True Line Result
    -        state.dx = 0
    -** Processing line: ~      end~
    +      player.rect.merge x: player.x + player_next_dx,
    +** Processing line: ~                        y: player.y + player_next_dy~
     - Inside source: true
     *** True Line Result
    -      end
    +                        y: player.y + player_next_dy
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -115371,50 +116999,50 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def process_inputs~
    +** Processing line: ~    def player_prev_rect~
     - Inside source: true
     *** True Line Result
    -    def process_inputs
    -** Processing line: ~      if state.scene == :game~
    +    def player_prev_rect
    +** Processing line: ~      player.rect.merge x: player.x - player.dx,~
     - Inside source: true
     *** True Line Result
    -      if state.scene == :game
    -** Processing line: ~        process_inputs_player_movement~
    +      player.rect.merge x: player.x - player.dx,
    +** Processing line: ~                        y: player.y - player.dy~
     - Inside source: true
     *** True Line Result
    -        process_inputs_player_movement
    -** Processing line: ~        process_inputs_god_mode~
    +                        y: player.y - player.dy
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -        process_inputs_god_mode
    -** Processing line: ~      elsif state.scene == :intro~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      elsif state.scene == :intro
    -** Processing line: ~        if args.inputs.keyboard.key_down.enter || args.inputs.keyboard.key_down.space~
    +
    +** Processing line: ~    def player_jump~
     - Inside source: true
     *** True Line Result
    -        if args.inputs.keyboard.key_down.enter || args.inputs.keyboard.key_down.space
    -** Processing line: ~          if Kernel.tick_count < 600~
    +    def player_jump
    +** Processing line: ~      return if player.action != :standing~
     - Inside source: true
     *** True Line Result
    -          if Kernel.tick_count < 600
    -** Processing line: ~            Kernel.tick_count = 600~
    +      return if player.action != :standing
    +** Processing line: ~      player.action = :jumping~
     - Inside source: true
     *** True Line Result
    -            Kernel.tick_count = 600
    -** Processing line: ~          end~
    +      player.action = :jumping
    +** Processing line: ~      player.dy = state.player.jump_power~
     - Inside source: true
     *** True Line Result
    -          end
    -** Processing line: ~        end~
    +      player.dy = state.player.jump_power
    +** Processing line: ~      current_frame = state.tick_count~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~      end~
    +      current_frame = state.tick_count
    +** Processing line: ~      player.action_at = current_frame~
     - Inside source: true
     *** True Line Result
    -      end
    +      player.action_at = current_frame
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -115423,38 +117051,38 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def input_up?~
    +** Processing line: ~    def player_jump_increase_air_time~
     - Inside source: true
     *** True Line Result
    -    def input_up?
    -** Processing line: ~      inputs.keyboard.w || inputs.keyboard.up || inputs.keyboard.k~
    +    def player_jump_increase_air_time
    +** Processing line: ~      return if player.action != :jumping~
     - Inside source: true
     *** True Line Result
    -      inputs.keyboard.w || inputs.keyboard.up || inputs.keyboard.k
    -** Processing line: ~    end~
    +      return if player.action != :jumping
    +** Processing line: ~      return if player.action_at.elapsed_time >= player.jump_air_time~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +      return if player.action_at.elapsed_time >= player.jump_air_time
    +** Processing line: ~      player.dy += player.jump_increase_power~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def input_up_released?~
    +      player.dy += player.jump_increase_power
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    def input_up_released?
    -** Processing line: ~      inputs.keyboard.key_up.w ||~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      inputs.keyboard.key_up.w ||
    -** Processing line: ~      inputs.keyboard.key_up.up ||~
    +
    +** Processing line: ~    def tiles~
     - Inside source: true
     *** True Line Result
    -      inputs.keyboard.key_up.up ||
    -** Processing line: ~      inputs.keyboard.key_up.k~
    +    def tiles
    +** Processing line: ~      state.tiles~
     - Inside source: true
     *** True Line Result
    -      inputs.keyboard.key_up.k
    +      state.tiles
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -115463,14 +117091,14 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def input_down?~
    +** Processing line: ~    def tiles_find_colliding tiles, target~
     - Inside source: true
     *** True Line Result
    -    def input_down?
    -** Processing line: ~      inputs.keyboard.s || inputs.keyboard.down || inputs.keyboard.j~
    +    def tiles_find_colliding tiles, target
    +** Processing line: ~      tiles.find { |t| t.rect.intersect_rect? target }~
     - Inside source: true
     *** True Line Result
    -      inputs.keyboard.s || inputs.keyboard.down || inputs.keyboard.j
    +      tiles.find { |t| t.rect.intersect_rect? target }
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -115479,138 +117107,142 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def input_down_released?~
    -- Inside source: true
    -*** True Line Result
    -    def input_down_released?
    -** Processing line: ~      inputs.keyboard.key_up.s ||~
    -- Inside source: true
    -*** True Line Result
    -      inputs.keyboard.key_up.s ||
    -** Processing line: ~      inputs.keyboard.key_up.down ||~
    +** Processing line: ~    def tiles_find &block~
     - Inside source: true
     *** True Line Result
    -      inputs.keyboard.key_up.down ||
    -** Processing line: ~      inputs.keyboard.key_up.j~
    +    def tiles_find &block
    +** Processing line: ~      tiles.find_all(&block)~
     - Inside source: true
     *** True Line Result
    -      inputs.keyboard.key_up.j
    +      tiles.find_all(&block)
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
         end
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def input_left?~
    +** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
    -    def input_left?
    -** Processing line: ~      inputs.keyboard.a || inputs.keyboard.left || inputs.keyboard.h~
    +  def tick args
    +** Processing line: ~    $game ||= Game.new~
     - Inside source: true
     *** True Line Result
    -      inputs.keyboard.a || inputs.keyboard.left || inputs.keyboard.h
    -** Processing line: ~    end~
    +    $game ||= Game.new
    +** Processing line: ~    $game.args = args~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +    $game.args = args
    +** Processing line: ~    $game.tick~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def input_right?~
    +    $game.tick
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    def input_right?
    -** Processing line: ~      inputs.keyboard.d || inputs.keyboard.right || inputs.keyboard.l~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      inputs.keyboard.d || inputs.keyboard.right || inputs.keyboard.l
    -** Processing line: ~    end~
    +
    +** Processing line: ~  $gtk.reset~
     - Inside source: true
     *** True Line Result
    -    end
    +  $gtk.reset
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def set_object path, w, h~
    -- Inside source: true
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
     *** True Line Result
    -    def set_object path, w, h
    -** Processing line: ~      state.object = path~
    -- Inside source: true
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
     *** True Line Result
    -      state.object = path
    -** Processing line: ~      state.object_w = w~
    -- Inside source: true
    +
    +** Processing line: ~*** Platformer - Clepto Frog - main.rb~
    +- Header detected.
     *** True Line Result
    -      state.object_w = w
    -** Processing line: ~      state.object_h = h~
    +
    +*** True Line Result
    +*** Platformer - Clepto Frog - main.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/99_genre_platformer/clepto_frog/app/main.rb~
     - Inside source: true
     *** True Line Result
    -      state.object_h = h
    -** Processing line: ~    end~
    +  # ./samples/99_genre_platformer/clepto_frog/app/main.rb
    +** Processing line: ~  MAP_FILE_PATH = 'map.txt'~
     - Inside source: true
     *** True Line Result
    -    end
    +  MAP_FILE_PATH = 'map.txt'
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def collision_mode~
    +** Processing line: ~  require 'app/map.rb'~
     - Inside source: true
     *** True Line Result
    -    def collision_mode
    -** Processing line: ~      state.dev_action = :collision_mode~
    +  require 'app/map.rb'
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      state.dev_action = :collision_mode
    -** Processing line: ~    end~
    +
    +** Processing line: ~  class CleptoFrog~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +  class CleptoFrog
    +** Processing line: ~    attr_gtk~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def process_inputs_player_movement~
    +    attr_gtk
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    def process_inputs_player_movement
    -** Processing line: ~      if inputs.keyboard.key_down.g~
    +
    +** Processing line: ~    def render_ending~
     - Inside source: true
     *** True Line Result
    -      if inputs.keyboard.key_down.g
    -** Processing line: ~        state.god_mode = !state.god_mode~
    +    def render_ending
    +** Processing line: ~      state.game_over_at ||= state.tick_count~
     - Inside source: true
     *** True Line Result
    -        state.god_mode = !state.god_mode
    -** Processing line: ~        puts state.god_mode~
    +      state.game_over_at ||= state.tick_count
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        puts state.god_mode
    -** Processing line: ~      end~
    +
    +** Processing line: ~      outputs.labels << [640, 700, "Clepto Frog", 4, 1]~
     - Inside source: true
     *** True Line Result
    -      end
    +      outputs.labels << [640, 700, "Clepto Frog", 4, 1]
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      if inputs.keyboard.key_down.u && state.dev_action == :collision_mode~
    +** Processing line: ~      if state.tick_count >= (state.game_over_at + 120)~
     - Inside source: true
     *** True Line Result
    -      if inputs.keyboard.key_down.u && state.dev_action == :collision_mode
    -** Processing line: ~        state.world = state.world[0..-2]~
    +      if state.tick_count >= (state.game_over_at + 120)
    +** Processing line: ~        outputs.labels << [640, 620, "\"I... I.... don't believe it.\" - New Guy",~
     - Inside source: true
     *** True Line Result
    -        state.world = state.world[0..-2]
    -** Processing line: ~        state.world_lookup = {}~
    +        outputs.labels << [640, 620, "\"I... I.... don't believe it.\" - New Guy",
    +** Processing line: ~                           4, 1, 0, 0, 0, 255 * (state.game_over_at + 120).ease(60)]~
     - Inside source: true
     *** True Line Result
    -        state.world_lookup = {}
    +                           4, 1, 0, 0, 0, 255 * (state.game_over_at + 120).ease(60)]
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    @@ -115619,38 +117251,38 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      if inputs.keyboard.key_down.space && !state.anchor_point~
    +** Processing line: ~      if state.tick_count >= (state.game_over_at + 240)~
     - Inside source: true
     *** True Line Result
    -      if inputs.keyboard.key_down.space && !state.anchor_point
    -** Processing line: ~        state.tongue_length = 0~
    +      if state.tick_count >= (state.game_over_at + 240)
    +** Processing line: ~        outputs.labels << [640, 580, "\"He actually stole all the mugs?\" - New Guy",~
     - Inside source: true
     *** True Line Result
    -        state.tongue_length = 0
    -** Processing line: ~        state.action = :shooting~
    +        outputs.labels << [640, 580, "\"He actually stole all the mugs?\" - New Guy",
    +** Processing line: ~                           4, 1, 0, 0, 0, 255 * (state.game_over_at + 240).ease(60)]~
     - Inside source: true
     *** True Line Result
    -        state.action = :shooting
    -** Processing line: ~        outputs.sounds << 'sounds/shooting.wav'~
    +                           4, 1, 0, 0, 0, 255 * (state.game_over_at + 240).ease(60)]
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -        outputs.sounds << 'sounds/shooting.wav'
    -** Processing line: ~      elsif inputs.keyboard.key_down.space~
    +      end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      elsif inputs.keyboard.key_down.space
    -** Processing line: ~        state.action = :aiming~
    +
    +** Processing line: ~      if state.tick_count >= (state.game_over_at + 360)~
     - Inside source: true
     *** True Line Result
    -        state.action = :aiming
    -** Processing line: ~        state.anchor_point  = nil~
    +      if state.tick_count >= (state.game_over_at + 360)
    +** Processing line: ~        outputs.labels << [640, 540, "\"Kind of feel bad STARTING HIM WITH NOTHING again.\" - New Guy",~
     - Inside source: true
     *** True Line Result
    -        state.anchor_point  = nil
    -** Processing line: ~        state.tongue_length = 100~
    +        outputs.labels << [640, 540, "\"Kind of feel bad STARTING HIM WITH NOTHING again.\" - New Guy",
    +** Processing line: ~                           4, 1, 0, 0, 0, 255 * (state.game_over_at + 360).ease(60)]~
     - Inside source: true
     *** True Line Result
    -        state.tongue_length = 100
    +                           4, 1, 0, 0, 0, 255 * (state.game_over_at + 360).ease(60)]
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    @@ -115659,134 +117291,130 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      if state.anchor_point~
    +** Processing line: ~      outputs.sprites << [640 - 50, 360 - 50, 100, 100,~
     - Inside source: true
     *** True Line Result
    -      if state.anchor_point
    -** Processing line: ~        if input_up?~
    +      outputs.sprites << [640 - 50, 360 - 50, 100, 100,
    +** Processing line: ~                          "sprites/square-green.png"]~
     - Inside source: true
     *** True Line Result
    -        if input_up?
    -** Processing line: ~          if state.tongue_length >= 105~
    +                          "sprites/square-green.png"]
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          if state.tongue_length >= 105
    -** Processing line: ~            state.tongue_length -= 5~
    +
    +** Processing line: ~      outputs.labels << [640, 300, "Current Time: #{"%.2f" % state.stuff_time}", 4, 1]~
     - Inside source: true
     *** True Line Result
    -            state.tongue_length -= 5
    -** Processing line: ~            state.dy += 0.8~
    +      outputs.labels << [640, 300, "Current Time: #{"%.2f" % state.stuff_time}", 4, 1]
    +** Processing line: ~      outputs.labels << [640, 270, "Best Time: #{"%.2f" % state.stuff_best_time}", 4, 1]~
     - Inside source: true
     *** True Line Result
    -            state.dy += 0.8
    -** Processing line: ~          end~
    +      outputs.labels << [640, 270, "Best Time: #{"%.2f" % state.stuff_best_time}", 4, 1]
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          end
    -** Processing line: ~        elsif input_down?~
    +
    +** Processing line: ~      if state.tick_count >= (state.game_over_at + 550)~
     - Inside source: true
     *** True Line Result
    -        elsif input_down?
    -** Processing line: ~          state.tongue_length += 5~
    +      if state.tick_count >= (state.game_over_at + 550)
    +** Processing line: ~        restart_game~
     - Inside source: true
     *** True Line Result
    -          state.tongue_length += 5
    -** Processing line: ~          state.dy -= 0.8~
    +        restart_game
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -          state.dy -= 0.8
    -** Processing line: ~        end~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -        end
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~        if input_left? && state.dx > 1~
    -- Inside source: true
    -*** True Line Result
    -        if input_left? && state.dx > 1
    -** Processing line: ~          state.dx *= 0.98~
    +** Processing line: ~    def restart_game~
     - Inside source: true
     *** True Line Result
    -          state.dx *= 0.98
    -** Processing line: ~        elsif input_left? && state.dx < -1~
    +    def restart_game
    +** Processing line: ~      state.world = nil~
     - Inside source: true
     *** True Line Result
    -        elsif input_left? && state.dx < -1
    -** Processing line: ~          state.dx *= 1.03~
    +      state.world = nil
    +** Processing line: ~      state.x = nil~
     - Inside source: true
     *** True Line Result
    -          state.dx *= 1.03
    -** Processing line: ~        elsif input_left? && !state.on_floor~
    +      state.x = nil
    +** Processing line: ~      state.y = nil~
     - Inside source: true
     *** True Line Result
    -        elsif input_left? && !state.on_floor
    -** Processing line: ~          state.dx -= 3~
    +      state.y = nil
    +** Processing line: ~      state.dx = nil~
     - Inside source: true
     *** True Line Result
    -          state.dx -= 3
    -** Processing line: ~        elsif input_right? && state.dx > 1~
    +      state.dx = nil
    +** Processing line: ~      state.dy = nil~
     - Inside source: true
     *** True Line Result
    -        elsif input_right? && state.dx > 1
    -** Processing line: ~          state.dx *= 1.03~
    +      state.dy = nil
    +** Processing line: ~      state.stuff_score = 0~
     - Inside source: true
     *** True Line Result
    -          state.dx *= 1.03
    -** Processing line: ~        elsif input_right? && state.dx < -1~
    +      state.stuff_score = 0
    +** Processing line: ~      state.stuff_time = 0~
     - Inside source: true
     *** True Line Result
    -        elsif input_right? && state.dx < -1
    -** Processing line: ~          state.dx *= 0.98~
    +      state.stuff_time = 0
    +** Processing line: ~      state.intro_tick_count = nil~
     - Inside source: true
     *** True Line Result
    -          state.dx *= 0.98
    -** Processing line: ~        elsif input_right? && !state.on_floor~
    +      state.intro_tick_count = nil
    +** Processing line: ~      defaults~
     - Inside source: true
     *** True Line Result
    -        elsif input_right? && !state.on_floor
    -** Processing line: ~          state.dx += 3~
    +      defaults
    +** Processing line: ~      state.game_start_at = state.tick_count~
     - Inside source: true
     *** True Line Result
    -          state.dx += 3
    -** Processing line: ~        end~
    +      state.game_start_at = state.tick_count
    +** Processing line: ~      state.scene = :game~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~      else~
    +      state.scene = :game
    +** Processing line: ~      state.game_over_at = nil~
     - Inside source: true
     *** True Line Result
    -      else
    -** Processing line: ~        if input_left?~
    +      state.game_over_at = nil
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -        if input_left?
    -** Processing line: ~          state.tongue_angle += 1.5~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          state.tongue_angle += 1.5
    -** Processing line: ~          state.tongue_angle = state.tongue_angle~
    +
    +** Processing line: ~    def render_intro~
     - Inside source: true
     *** True Line Result
    -          state.tongue_angle = state.tongue_angle
    -** Processing line: ~        elsif input_right?~
    +    def render_intro
    +** Processing line: ~      outputs.labels << [640, 700, "Clepto Frog", 4, 1]~
     - Inside source: true
     *** True Line Result
    -        elsif input_right?
    -** Processing line: ~          state.tongue_angle -= 1.5~
    +      outputs.labels << [640, 700, "Clepto Frog", 4, 1]
    +** Processing line: ~      if state.tick_count == 120~
     - Inside source: true
     *** True Line Result
    -          state.tongue_angle -= 1.5
    -** Processing line: ~          state.tongue_angle = state.tongue_angle~
    +      if state.tick_count == 120
    +** Processing line: ~        state.scene = :game~
     - Inside source: true
     *** True Line Result
    -          state.tongue_angle = state.tongue_angle
    -** Processing line: ~        end~
    +        state.scene = :game
    +** Processing line: ~        state.game_start_at = state.tick_count~
     - Inside source: true
     *** True Line Result
    -        end
    +        state.game_start_at = state.tick_count
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    @@ -115799,42 +117427,50 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def add_floors~
    +** Processing line: ~    def tick~
     - Inside source: true
     *** True Line Result
    -    def add_floors
    -** Processing line: ~      # floors~
    +    def tick
    +** Processing line: ~      defaults~
     - Inside source: true
     *** True Line Result
    -      # floors
    -** Processing line: ~      state.world += [~
    +      defaults
    +** Processing line: ~      if state.scene == :intro && state.tick_count <= 120~
     - Inside source: true
     *** True Line Result
    -      state.world += [
    -** Processing line: ~        [0,       0, 10000, 40],~
    +      if state.scene == :intro && state.tick_count <= 120
    +** Processing line: ~        render_intro~
     - Inside source: true
     *** True Line Result
    -        [0,       0, 10000, 40],
    -** Processing line: ~        [0,    1670, 3250, 60],~
    +        render_intro
    +** Processing line: ~      elsif state.scene == :ending~
     - Inside source: true
     *** True Line Result
    -        [0,    1670, 3250, 60],
    -** Processing line: ~        [6691, 1653, 3290, 60],~
    +      elsif state.scene == :ending
    +** Processing line: ~        render_ending~
     - Inside source: true
     *** True Line Result
    -        [6691, 1653, 3290, 60],
    -** Processing line: ~        [1521, 3792, 7370, 60],~
    +        render_ending
    +** Processing line: ~      else~
     - Inside source: true
     *** True Line Result
    -        [1521, 3792, 7370, 60],
    -** Processing line: ~        [0, 5137, 3290, 60]~
    +      else
    +** Processing line: ~        render~
     - Inside source: true
     *** True Line Result
    -        [0, 5137, 3290, 60]
    -** Processing line: ~      ]~
    +        render
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -      ]
    +      end
    +** Processing line: ~      calc~
    +- Inside source: true
    +*** True Line Result
    +      calc
    +** Processing line: ~      process_inputs~
    +- Inside source: true
    +*** True Line Result
    +      process_inputs
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -115843,354 +117479,350 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def attempt_load_world_from_file~
    -- Inside source: true
    -*** True Line Result
    -    def attempt_load_world_from_file
    -** Processing line: ~      return if state.world~
    +** Processing line: ~    def defaults~
     - Inside source: true
     *** True Line Result
    -      return if state.world
    -** Processing line: ~      # exported_world = gtk.read_file(MAP_FILE_PATH)~
    +    def defaults
    +** Processing line: ~      state.scene ||= :intro~
     - Inside source: true
     *** True Line Result
    -      # exported_world = gtk.read_file(MAP_FILE_PATH)
    -** Processing line: ~      state.world = []~
    +      state.scene ||= :intro
    +** Processing line: ~      state.stuff_score     ||= 0~
     - Inside source: true
     *** True Line Result
    -      state.world = []
    -** Processing line: ~      state.objects = []~
    +      state.stuff_score     ||= 0
    +** Processing line: ~      state.stuff_time      ||= 0~
     - Inside source: true
     *** True Line Result
    -      state.objects = []
    -** Processing line: ~~
    +      state.stuff_time      ||= 0
    +** Processing line: ~      state.stuff_best_time ||= nil~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      if $collisions~
    +      state.stuff_best_time ||= nil
    +** Processing line: ~      state.camera_x ||= 0~
     - Inside source: true
     *** True Line Result
    -      if $collisions
    -** Processing line: ~        $collisions.map do |x, y, w, h|~
    +      state.camera_x ||= 0
    +** Processing line: ~      state.camera_y ||= 0~
     - Inside source: true
     *** True Line Result
    -        $collisions.map do |x, y, w, h|
    -** Processing line: ~          state.world << [x, y, w, h]~
    +      state.camera_y ||= 0
    +** Processing line: ~      state.target_camera_scale ||= 1~
     - Inside source: true
     *** True Line Result
    -          state.world << [x, y, w, h]
    -** Processing line: ~        end~
    +      state.target_camera_scale ||= 1
    +** Processing line: ~      state.camera_scale ||= 1~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~~
    +      state.camera_scale ||= 1
    +** Processing line: ~      state.tongue_length          ||= 100~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~        add_floors~
    +      state.tongue_length          ||= 100
    +** Processing line: ~      state.dev_action             ||= :collision_mode~
     - Inside source: true
     *** True Line Result
    -        add_floors
    -** Processing line: ~      # elsif exported_world~
    +      state.dev_action             ||= :collision_mode
    +** Processing line: ~      state.action                 ||= :aiming~
     - Inside source: true
     *** True Line Result
    -      # elsif exported_world
    -** Processing line: ~      #   exported_world.each_line.map do |l|~
    +      state.action                 ||= :aiming
    +** Processing line: ~      state.tongue_angle           ||= 90~
     - Inside source: true
     *** True Line Result
    -      #   exported_world.each_line.map do |l|
    -** Processing line: ~      #     tokens = l.strip.split(',')~
    +      state.tongue_angle           ||= 90
    +** Processing line: ~      state.tile_size                = 64~
     - Inside source: true
     *** True Line Result
    -      #     tokens = l.strip.split(',')
    -** Processing line: ~      #     x    = tokens[0].to_i~
    +      state.tile_size                = 64
    +** Processing line: ~      state.gravity                  = -0.1~
     - Inside source: true
     *** True Line Result
    -      #     x    = tokens[0].to_i
    -** Processing line: ~      #     y    = tokens[1].to_i~
    +      state.gravity                  = -0.1
    +** Processing line: ~      state.air                      = -0.01~
     - Inside source: true
     *** True Line Result
    -      #     y    = tokens[1].to_i
    -** Processing line: ~      #     type = tokens[2].to_i~
    +      state.air                      = -0.01
    +** Processing line: ~      state.player_width             = 60~
     - Inside source: true
     *** True Line Result
    -      #     type = tokens[2].to_i
    -** Processing line: ~      #     if type == 1~
    +      state.player_width             = 60
    +** Processing line: ~      state.player_height            = 60~
     - Inside source: true
     *** True Line Result
    -      #     if type == 1
    -** Processing line: ~      #       state.world << [x, y, state.tile_size, state.tile_size]~
    +      state.player_height            = 60
    +** Processing line: ~      state.collision_tolerance      = 0.0~
     - Inside source: true
     *** True Line Result
    -      #       state.world << [x, y, state.tile_size, state.tile_size]
    -** Processing line: ~      #     elsif type == 2~
    +      state.collision_tolerance      = 0.0
    +** Processing line: ~      state.previous_tile_size     ||= state.tile_size~
     - Inside source: true
     *** True Line Result
    -      #     elsif type == 2
    -** Processing line: ~      #       w, h, path = tokens[3..-1]~
    +      state.previous_tile_size     ||= state.tile_size
    +** Processing line: ~      state.x                      ||= 2400~
     - Inside source: true
     *** True Line Result
    -      #       w, h, path = tokens[3..-1]
    -** Processing line: ~      #       state.objects << [x, y, w.to_i, h.to_i, path]~
    +      state.x                      ||= 2400
    +** Processing line: ~      state.y                      ||= 200~
     - Inside source: true
     *** True Line Result
    -      #       state.objects << [x, y, w.to_i, h.to_i, path]
    -** Processing line: ~      #     end~
    +      state.y                      ||= 200
    +** Processing line: ~      state.dy                     ||= 0~
     - Inside source: true
     *** True Line Result
    -      #     end
    -** Processing line: ~      #   end~
    +      state.dy                     ||= 0
    +** Processing line: ~      state.dx                     ||= 0~
     - Inside source: true
     *** True Line Result
    -      #   end
    -** Processing line: ~~
    +      state.dx                     ||= 0
    +** Processing line: ~      attempt_load_world_from_file~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      #   add_floors~
    +      attempt_load_world_from_file
    +** Processing line: ~      state.world_lookup           ||= { }~
     - Inside source: true
     *** True Line Result
    -      #   add_floors
    -** Processing line: ~      end~
    +      state.world_lookup           ||= { }
    +** Processing line: ~      state.world_collision_rects  ||= []~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +      state.world_collision_rects  ||= []
    +** Processing line: ~      state.mode                   ||= :creating~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      if $mugs~
    +      state.mode                   ||= :creating
    +** Processing line: ~      state.select_menu            ||= [0, 720, 1280, 720]~
     - Inside source: true
     *** True Line Result
    -      if $mugs
    -** Processing line: ~        $mugs.map do |x, y, w, h, path|~
    +      state.select_menu            ||= [0, 720, 1280, 720]
    +** Processing line: ~      state.sprite_quantity        ||= 20~
     - Inside source: true
     *** True Line Result
    -        $mugs.map do |x, y, w, h, path|
    -** Processing line: ~          state.objects << [x, y, w, h, path]~
    +      state.sprite_quantity        ||= 20
    +** Processing line: ~      state.sprite_coords          ||= []~
     - Inside source: true
     *** True Line Result
    -          state.objects << [x, y, w, h, path]
    -** Processing line: ~        end~
    +      state.sprite_coords          ||= []
    +** Processing line: ~      state.banner_coords          ||= [640, 680 + 720]~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~      end~
    +      state.banner_coords          ||= [640, 680 + 720]
    +** Processing line: ~      state.sprite_selected        ||= 1~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +      state.sprite_selected        ||= 1
    +** Processing line: ~      state.map_saved_at           ||= 0~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +      state.map_saved_at           ||= 0
    +** Processing line: ~      state.intro_tick_count       ||= state.tick_count~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def calc_world_lookup~
    +      state.intro_tick_count       ||= state.tick_count
    +** Processing line: ~      if state.sprite_coords == []~
     - Inside source: true
     *** True Line Result
    -    def calc_world_lookup
    -** Processing line: ~      if state.tile_size != state.previous_tile_size~
    +      if state.sprite_coords == []
    +** Processing line: ~        count = 1~
     - Inside source: true
     *** True Line Result
    -      if state.tile_size != state.previous_tile_size
    -** Processing line: ~        state.previous_tile_size = state.tile_size~
    +        count = 1
    +** Processing line: ~        temp_x = 165~
     - Inside source: true
     *** True Line Result
    -        state.previous_tile_size = state.tile_size
    -** Processing line: ~        state.world_lookup = {}~
    +        temp_x = 165
    +** Processing line: ~        temp_y = 500 + 720~
     - Inside source: true
     *** True Line Result
    -        state.world_lookup = {}
    -** Processing line: ~      end~
    +        temp_y = 500 + 720
    +** Processing line: ~        state.sprite_quantity.times do~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +        state.sprite_quantity.times do
    +** Processing line: ~          state.sprite_coords += [[temp_x, temp_y, count]]~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      return if state.world_lookup.keys.length > 0~
    +          state.sprite_coords += [[temp_x, temp_y, count]]
    +** Processing line: ~          temp_x += 100~
     - Inside source: true
     *** True Line Result
    -      return if state.world_lookup.keys.length > 0
    -** Processing line: ~      return unless state.world.length > 0~
    +          temp_x += 100
    +** Processing line: ~          count += 1~
     - Inside source: true
     *** True Line Result
    -      return unless state.world.length > 0
    -** Processing line: ~~
    +          count += 1
    +** Processing line: ~          if temp_x > 1280 - (165 + 50)~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      # Searches through the world and finds the cordinates that exist~
    +          if temp_x > 1280 - (165 + 50)
    +** Processing line: ~            temp_x = 165~
     - Inside source: true
     *** True Line Result
    -      # Searches through the world and finds the cordinates that exist
    -** Processing line: ~      state.world_lookup = {}~
    +            temp_x = 165
    +** Processing line: ~            temp_y -= 75~
     - Inside source: true
     *** True Line Result
    -      state.world_lookup = {}
    -** Processing line: ~      state.world.each do |x, y, w, h|~
    +            temp_y -= 75
    +** Processing line: ~          end~
     - Inside source: true
     *** True Line Result
    -      state.world.each do |x, y, w, h|
    -** Processing line: ~        state.world_lookup[[x, y, w || state.tile_size, h || state.tile_size]] = true~
    +          end
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -        state.world_lookup[[x, y, w || state.tile_size, h || state.tile_size]] = true
    +        end
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
           end
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      # Assigns collision rects for every sprite drawn~
    +** Processing line: ~    def start_of_tongue x = nil, y = nil~
     - Inside source: true
     *** True Line Result
    -      # Assigns collision rects for every sprite drawn
    -** Processing line: ~      state.world_collision_rects =~
    +    def start_of_tongue x = nil, y = nil
    +** Processing line: ~      x ||= state.x~
     - Inside source: true
     *** True Line Result
    -      state.world_collision_rects =
    -** Processing line: ~        state.world_lookup~
    +      x ||= state.x
    +** Processing line: ~      y ||= state.y~
     - Inside source: true
     *** True Line Result
    -        state.world_lookup
    -** Processing line: ~             .keys~
    +      y ||= state.y
    +** Processing line: ~      [~
     - Inside source: true
     *** True Line Result
    -             .keys
    -** Processing line: ~             .map do |x, y, w, h|~
    +      [
    +** Processing line: ~        x + state.player_width.half,~
     - Inside source: true
     *** True Line Result
    -             .map do |x, y, w, h|
    -** Processing line: ~               s = state.tile_size~
    +        x + state.player_width.half,
    +** Processing line: ~        y + state.player_height.half~
     - Inside source: true
     *** True Line Result
    -               s = state.tile_size
    -** Processing line: ~               w ||= s~
    +        y + state.player_height.half
    +** Processing line: ~      ]~
     - Inside source: true
     *** True Line Result
    -               w ||= s
    -** Processing line: ~               h ||= s~
    +      ]
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -               h ||= s
    -** Processing line: ~               {~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -               {
    -** Processing line: ~                 args:       [x, y, w, h],~
    +
    +** Processing line: ~    def stage_definition~
     - Inside source: true
     *** True Line Result
    -                 args:       [x, y, w, h],
    -** Processing line: ~                 left_right: [x,     y + 4, w,     h - 6],~
    +    def stage_definition
    +** Processing line: ~      outputs.sprites << [vx(0), vy(0), vw(10000), vw(5875), 'sprites/level-map.png']~
     - Inside source: true
     *** True Line Result
    -                 left_right: [x,     y + 4, w,     h - 6],
    -** Processing line: ~                 top:        [x + 4, y + 6, w - 8, h - 6],~
    +      outputs.sprites << [vx(0), vy(0), vw(10000), vw(5875), 'sprites/level-map.png']
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -                 top:        [x + 4, y + 6, w - 8, h - 6],
    -** Processing line: ~                 bottom:     [x + 1, y - 1, w - 2, h - 8],~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -                 bottom:     [x + 1, y - 1, w - 2, h - 8],
    -** Processing line: ~               }~
    +
    +** Processing line: ~    def render~
     - Inside source: true
     *** True Line Result
    -               }
    -** Processing line: ~             end~
    +    def render
    +** Processing line: ~      stage_definition~
     - Inside source: true
     *** True Line Result
    -             end
    -** Processing line: ~~
    +      stage_definition
    +** Processing line: ~      start_of_tongue_render = [vx(start_of_tongue.x), vy(start_of_tongue.y)]~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    end~
    +      start_of_tongue_render = [vx(start_of_tongue.x), vy(start_of_tongue.y)]
    +** Processing line: ~      end_of_tongue_render = [vx(end_of_tongue.x), vy(end_of_tongue.y)]~
     - Inside source: true
     *** True Line Result
    -    end
    +      end_of_tongue_render = [vx(end_of_tongue.x), vy(end_of_tongue.y)]
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def calc_pendulum~
    -- Inside source: true
    -*** True Line Result
    -    def calc_pendulum
    -** Processing line: ~      return if !state.anchor_point~
    +** Processing line: ~      if state.anchor_point~
     - Inside source: true
     *** True Line Result
    -      return if !state.anchor_point
    -** Processing line: ~      target_x = state.anchor_point.x - start_of_tongue.x~
    +      if state.anchor_point
    +** Processing line: ~        anchor_point_render = [vx(state.anchor_point.x), vy(state.anchor_point.y)]~
     - Inside source: true
     *** True Line Result
    -      target_x = state.anchor_point.x - start_of_tongue.x
    -** Processing line: ~      target_y = state.anchor_point.y -~
    +        anchor_point_render = [vx(state.anchor_point.x), vy(state.anchor_point.y)]
    +** Processing line: ~        outputs.sprites << { x: start_of_tongue_render.x,~
     - Inside source: true
     *** True Line Result
    -      target_y = state.anchor_point.y -
    -** Processing line: ~                 state.tongue_length - 5 - 20 - state.player_height~
    +        outputs.sprites << { x: start_of_tongue_render.x,
    +** Processing line: ~                             y: start_of_tongue_render.y,~
     - Inside source: true
     *** True Line Result
    -                 state.tongue_length - 5 - 20 - state.player_height
    -** Processing line: ~~
    +                             y: start_of_tongue_render.y,
    +** Processing line: ~                             w: vw(2),~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      diff_y = state.y - target_y~
    +                             w: vw(2),
    +** Processing line: ~                             h: args.geometry.distance(start_of_tongue_render, anchor_point_render),~
     - Inside source: true
     *** True Line Result
    -      diff_y = state.y - target_y
    -** Processing line: ~~
    +                             h: args.geometry.distance(start_of_tongue_render, anchor_point_render),
    +** Processing line: ~                             path:  'sprites/square-pink.png',~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      if target_x > 0~
    +                             path:  'sprites/square-pink.png',
    +** Processing line: ~                             angle_anchor_y: 0,~
     - Inside source: true
     *** True Line Result
    -      if target_x > 0
    -** Processing line: ~        state.dx += 0.6~
    +                             angle_anchor_y: 0,
    +** Processing line: ~                             angle: state.tongue_angle - 90 }~
     - Inside source: true
     *** True Line Result
    -        state.dx += 0.6
    -** Processing line: ~      elsif target_x < 0~
    +                             angle: state.tongue_angle - 90 }
    +** Processing line: ~      else~
     - Inside source: true
     *** True Line Result
    -      elsif target_x < 0
    -** Processing line: ~        state.dx -= 0.6~
    +      else
    +** Processing line: ~        outputs.sprites << { x: vx(start_of_tongue.x),~
     - Inside source: true
     *** True Line Result
    -        state.dx -= 0.6
    -** Processing line: ~      end~
    +        outputs.sprites << { x: vx(start_of_tongue.x),
    +** Processing line: ~                             y: vy(start_of_tongue.y),~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +                             y: vy(start_of_tongue.y),
    +** Processing line: ~                             w: vw(2),~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      if diff_y > 0~
    +                             w: vw(2),
    +** Processing line: ~                             h: vh(state.tongue_length),~
     - Inside source: true
     *** True Line Result
    -      if diff_y > 0
    -** Processing line: ~        state.dy -= 0.1~
    +                             h: vh(state.tongue_length),
    +** Processing line: ~                             path:  'sprites/square-pink.png',~
     - Inside source: true
     *** True Line Result
    -        state.dy -= 0.1
    -** Processing line: ~      elsif diff_y < 0~
    +                             path:  'sprites/square-pink.png',
    +** Processing line: ~                             angle_anchor_y: 0,~
     - Inside source: true
     *** True Line Result
    -      elsif diff_y < 0
    -** Processing line: ~        state.dy += 0.1~
    +                             angle_anchor_y: 0,
    +** Processing line: ~                             angle: state.tongue_angle - 90 }~
     - Inside source: true
     *** True Line Result
    -        state.dy += 0.1
    +                             angle: state.tongue_angle - 90 }
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    @@ -116199,326 +117831,346 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      state.dx *= 0.99~
    +** Processing line: ~      outputs.sprites << state.objects.map { |o| [vx(o.x), vy(o.y), vw(o.w), vh(o.h), o.path] }~
     - Inside source: true
     *** True Line Result
    -      state.dx *= 0.99
    +      outputs.sprites << state.objects.map { |o| [vx(o.x), vy(o.y), vw(o.w), vh(o.h), o.path] }
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      if state.dy.abs < 2~
    +** Processing line: ~      if state.god_mode~
     - Inside source: true
     *** True Line Result
    -      if state.dy.abs < 2
    -** Processing line: ~        state.dy *= 0.8~
    +      if state.god_mode
    +** Processing line: ~        # SHOW HIDE COLLISIONS~
     - Inside source: true
     *** True Line Result
    -        state.dy *= 0.8
    -** Processing line: ~      else~
    +        # SHOW HIDE COLLISIONS
    +** Processing line: ~        outputs.sprites << state.world.map do |rect|~
     - Inside source: true
     *** True Line Result
    -      else
    -** Processing line: ~        state.dy *= 0.90~
    +        outputs.sprites << state.world.map do |rect|
    +** Processing line: ~          x = vx(rect.x)~
     - Inside source: true
     *** True Line Result
    -        state.dy *= 0.90
    -** Processing line: ~      end~
    +          x = vx(rect.x)
    +** Processing line: ~          y = vy(rect.y)~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +          y = vy(rect.y)
    +** Processing line: ~          if x > -80 && x < 1280 && y > -80 && y < 720~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      if state.tongue_length && state.y~
    +          if x > -80 && x < 1280 && y > -80 && y < 720
    +** Processing line: ~            {~
     - Inside source: true
     *** True Line Result
    -      if state.tongue_length && state.y
    -** Processing line: ~        state.dy += state.tongue_angle.vector_y state.tongue_length.fdiv(1000)~
    +            {
    +** Processing line: ~              x: x,~
     - Inside source: true
     *** True Line Result
    -        state.dy += state.tongue_angle.vector_y state.tongue_length.fdiv(1000)
    -** Processing line: ~      end~
    +              x: x,
    +** Processing line: ~              y: y,~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +              y: y,
    +** Processing line: ~              w: vw(rect.w || state.tile_size),~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +              w: vw(rect.w || state.tile_size),
    +** Processing line: ~              h: vh(rect.h || state.tile_size),~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def calc_tongue_angle~
    +              h: vh(rect.h || state.tile_size),
    +** Processing line: ~              path: 'sprites/square-gray.png',~
     - Inside source: true
     *** True Line Result
    -    def calc_tongue_angle
    -** Processing line: ~      return unless state.anchor_point~
    +              path: 'sprites/square-gray.png',
    +** Processing line: ~              a: 128~
     - Inside source: true
     *** True Line Result
    -      return unless state.anchor_point
    -** Processing line: ~      state.tongue_angle = args.geometry.angle_from state.anchor_point, start_of_tongue~
    +              a: 128
    +** Processing line: ~            }~
     - Inside source: true
     *** True Line Result
    -      state.tongue_angle = args.geometry.angle_from state.anchor_point, start_of_tongue
    -** Processing line: ~      state.tongue_length = args.geometry.distance(start_of_tongue, state.anchor_point)~
    +            }
    +** Processing line: ~          end~
     - Inside source: true
     *** True Line Result
    -      state.tongue_length = args.geometry.distance(start_of_tongue, state.anchor_point)
    -** Processing line: ~      state.tongue_length = state.tongue_length.greater(100)~
    +          end
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -      state.tongue_length = state.tongue_length.greater(100)
    -** Processing line: ~    end~
    +        end
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    end
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def player_from_end_of_tongue~
    +** Processing line: ~      render_player~
     - Inside source: true
     *** True Line Result
    -    def player_from_end_of_tongue
    -** Processing line: ~      p = state.tongue_angle.vector(state.tongue_length)~
    +      render_player
    +** Processing line: ~      outputs.sprites << [vx(2315), vy(45), vw(569), vh(402), 'sprites/square-blue.png', 0, 40]~
     - Inside source: true
     *** True Line Result
    -      p = state.tongue_angle.vector(state.tongue_length)
    -** Processing line: ~      derived_start = [state.anchor_point.x - p.x, state.anchor_point.y - p.y]~
    +      outputs.sprites << [vx(2315), vy(45), vw(569), vh(402), 'sprites/square-blue.png', 0, 40]
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      derived_start = [state.anchor_point.x - p.x, state.anchor_point.y - p.y]
    -** Processing line: ~      derived_start.x -= state.player_width.half~
    +
    +** Processing line: ~      # Label in top left of the screen~
     - Inside source: true
     *** True Line Result
    -      derived_start.x -= state.player_width.half
    -** Processing line: ~      derived_start.y -= state.player_height.half~
    +      # Label in top left of the screen
    +** Processing line: ~      outputs.primitives << [20, 640, 180, 70, 255, 255, 255, 128].solid~
     - Inside source: true
     *** True Line Result
    -      derived_start.y -= state.player_height.half
    -** Processing line: ~      derived_start~
    +      outputs.primitives << [20, 640, 180, 70, 255, 255, 255, 128].solid
    +** Processing line: ~      outputs.primitives << [30, 700, "Stuff: #{state.stuff_score} of #{$mugs.count}", 1].label~
     - Inside source: true
     *** True Line Result
    -      derived_start
    -** Processing line: ~    end~
    +      outputs.primitives << [30, 700, "Stuff: #{state.stuff_score} of #{$mugs.count}", 1].label
    +** Processing line: ~      outputs.primitives << [30, 670, "Time: #{"%.2f" % state.stuff_time}", 1].label~
     - Inside source: true
     *** True Line Result
    -    end
    +      outputs.primitives << [30, 670, "Time: #{"%.2f" % state.stuff_time}", 1].label
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def end_of_tongue~
    +** Processing line: ~      if state.god_mode~
     - Inside source: true
     *** True Line Result
    -    def end_of_tongue
    -** Processing line: ~      p = state.tongue_angle.vector(state.tongue_length)~
    +      if state.god_mode
    +** Processing line: ~        if state.map_saved_at > 0 && state.map_saved_at.elapsed_time < 120~
     - Inside source: true
     *** True Line Result
    -      p = state.tongue_angle.vector(state.tongue_length)
    -** Processing line: ~      [start_of_tongue.x + p.x, start_of_tongue.y + p.y]~
    +        if state.map_saved_at > 0 && state.map_saved_at.elapsed_time < 120
    +** Processing line: ~          outputs.primitives << [920, 670, 'Map has been exported!', 1, 0, 50, 100, 50].label~
     - Inside source: true
     *** True Line Result
    -      [start_of_tongue.x + p.x, start_of_tongue.y + p.y]
    -** Processing line: ~    end~
    +          outputs.primitives << [920, 670, 'Map has been exported!', 1, 0, 50, 100, 50].label
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -    end
    +        end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def calc_shooting~
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    def calc_shooting
    -** Processing line: ~      return unless state.action == :shooting~
    +
    +** Processing line: ~        # Creates sprite following mouse to help indicate which sprite you have selected~
     - Inside source: true
     *** True Line Result
    -      return unless state.action == :shooting
    -** Processing line: ~      state.tongue_length += 30~
    +        # Creates sprite following mouse to help indicate which sprite you have selected
    +** Processing line: ~        outputs.primitives << [inputs.mouse.position.x - 32 * state.camera_scale,~
     - Inside source: true
     *** True Line Result
    -      state.tongue_length += 30
    -** Processing line: ~      potential_anchor = end_of_tongue~
    +        outputs.primitives << [inputs.mouse.position.x - 32 * state.camera_scale,
    +** Processing line: ~                               inputs.mouse.position.y - 32 * state.camera_scale,~
     - Inside source: true
     *** True Line Result
    -      potential_anchor = end_of_tongue
    -** Processing line: ~      if potential_anchor.x <= 0~
    +                               inputs.mouse.position.y - 32 * state.camera_scale,
    +** Processing line: ~                               state.tile_size * state.camera_scale,~
     - Inside source: true
     *** True Line Result
    -      if potential_anchor.x <= 0
    -** Processing line: ~        state.anchor_point = potential_anchor~
    +                               state.tile_size * state.camera_scale,
    +** Processing line: ~                               state.tile_size * state.camera_scale, 'sprites/square-indigo.png', 0, 100].sprite~
     - Inside source: true
     *** True Line Result
    -        state.anchor_point = potential_anchor
    -** Processing line: ~        state.action = :anchored~
    +                               state.tile_size * state.camera_scale, 'sprites/square-indigo.png', 0, 100].sprite
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -        state.action = :anchored
    -** Processing line: ~        outputs.sounds << 'sounds/attached.wav'~
    +      end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        outputs.sounds << 'sounds/attached.wav'
    -** Processing line: ~      elsif potential_anchor.x >= 10000~
    +
    +** Processing line: ~      render_mini_map~
     - Inside source: true
     *** True Line Result
    -      elsif potential_anchor.x >= 10000
    -** Processing line: ~        state.anchor_point = potential_anchor~
    +      render_mini_map
    +** Processing line: ~      outputs.primitives << [0, 0, 1280, 720, 255, 255, 255, 255 * state.game_start_at.ease(60, :flip)].solid~
     - Inside source: true
     *** True Line Result
    -        state.anchor_point = potential_anchor
    -** Processing line: ~        state.action = :anchored~
    +      outputs.primitives << [0, 0, 1280, 720, 255, 255, 255, 255 * state.game_start_at.ease(60, :flip)].solid
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -        state.action = :anchored
    -** Processing line: ~        outputs.sounds << 'sounds/attached.wav'~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        outputs.sounds << 'sounds/attached.wav'
    -** Processing line: ~      elsif potential_anchor.y <= 0~
    +
    +** Processing line: ~    def render_mini_map~
     - Inside source: true
     *** True Line Result
    -      elsif potential_anchor.y <= 0
    -** Processing line: ~        state.anchor_point = potential_anchor~
    +    def render_mini_map
    +** Processing line: ~      x, y = 1170, 10~
     - Inside source: true
     *** True Line Result
    -        state.anchor_point = potential_anchor
    -** Processing line: ~        state.action = :anchored~
    +      x, y = 1170, 10
    +** Processing line: ~      outputs.primitives << [x, y, 100, 58, 0, 0, 0, 200].solid~
     - Inside source: true
     *** True Line Result
    -        state.action = :anchored
    -** Processing line: ~        outputs.sounds << 'sounds/attached.wav'~
    +      outputs.primitives << [x, y, 100, 58, 0, 0, 0, 200].solid
    +** Processing line: ~      outputs.primitives << [x + args.state.x.fdiv(100) - 1, y + args.state.y.fdiv(100) - 1, 2, 2, 0, 255, 0].solid~
     - Inside source: true
     *** True Line Result
    -        outputs.sounds << 'sounds/attached.wav'
    -** Processing line: ~      elsif potential_anchor.y >= 5875~
    +      outputs.primitives << [x + args.state.x.fdiv(100) - 1, y + args.state.y.fdiv(100) - 1, 2, 2, 0, 255, 0].solid
    +** Processing line: ~      t_start = start_of_tongue~
     - Inside source: true
     *** True Line Result
    -      elsif potential_anchor.y >= 5875
    -** Processing line: ~        state.anchor_point = potential_anchor~
    +      t_start = start_of_tongue
    +** Processing line: ~      t_end = end_of_tongue~
     - Inside source: true
     *** True Line Result
    -        state.anchor_point = potential_anchor
    -** Processing line: ~        state.action = :anchored~
    +      t_end = end_of_tongue
    +** Processing line: ~      outputs.primitives << [~
     - Inside source: true
     *** True Line Result
    -        state.action = :anchored
    -** Processing line: ~        outputs.sounds << 'sounds/attached.wav'~
    +      outputs.primitives << [
    +** Processing line: ~        x + t_start.x.fdiv(100), y + t_start.y.fdiv(100),~
     - Inside source: true
     *** True Line Result
    -        outputs.sounds << 'sounds/attached.wav'
    -** Processing line: ~      else~
    +        x + t_start.x.fdiv(100), y + t_start.y.fdiv(100),
    +** Processing line: ~        x + t_end.x.fdiv(100), y + t_end.y.fdiv(100),~
     - Inside source: true
     *** True Line Result
    -      else
    -** Processing line: ~        anchor_rect = [potential_anchor.x - 5, potential_anchor.y - 5, 10, 10]~
    +        x + t_end.x.fdiv(100), y + t_end.y.fdiv(100),
    +** Processing line: ~        255, 255, 255~
     - Inside source: true
     *** True Line Result
    -        anchor_rect = [potential_anchor.x - 5, potential_anchor.y - 5, 10, 10]
    -** Processing line: ~        collision = state.world_collision_rects.find_all do |v|~
    +        255, 255, 255
    +** Processing line: ~      ].line~
     - Inside source: true
     *** True Line Result
    -        collision = state.world_collision_rects.find_all do |v|
    -** Processing line: ~          [v[:args].x, v[:args].y, v[:args].w, v[:args].h].intersect_rect?(anchor_rect)~
    +      ].line
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          [v[:args].x, v[:args].y, v[:args].w, v[:args].h].intersect_rect?(anchor_rect)
    -** Processing line: ~        end.first~
    +
    +** Processing line: ~      state.objects.each do |o|~
     - Inside source: true
     *** True Line Result
    -        end.first
    -** Processing line: ~        if collision~
    +      state.objects.each do |o|
    +** Processing line: ~        outputs.primitives << [x + o.x.fdiv(100) - 1, y + o.y.fdiv(100) - 1, 2, 2, 200, 200, 0].solid~
     - Inside source: true
     *** True Line Result
    -        if collision
    -** Processing line: ~          state.anchor_point = potential_anchor~
    +        outputs.primitives << [x + o.x.fdiv(100) - 1, y + o.y.fdiv(100) - 1, 2, 2, 200, 200, 0].solid
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -          state.anchor_point = potential_anchor
    -** Processing line: ~          state.action = :anchored~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -          state.action = :anchored
    -** Processing line: ~        outputs.sounds << 'sounds/attached.wav'~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        outputs.sounds << 'sounds/attached.wav'
    -** Processing line: ~        end~
    +
    +** Processing line: ~    def calc_camera percentage_override = nil~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~      end~
    +    def calc_camera percentage_override = nil
    +** Processing line: ~      percentage = percentage_override || (0.2 * state.camera_scale)~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +      percentage = percentage_override || (0.2 * state.camera_scale)
    +** Processing line: ~      target_scale = state.target_camera_scale~
     - Inside source: true
     *** True Line Result
    -    end
    +      target_scale = state.target_camera_scale
    +** Processing line: ~      distance_scale = target_scale - state.camera_scale~
    +- Inside source: true
    +*** True Line Result
    +      distance_scale = target_scale - state.camera_scale
    +** Processing line: ~      state.camera_scale += distance_scale * percentage~
    +- Inside source: true
    +*** True Line Result
    +      state.camera_scale += distance_scale * percentage
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def calc_player~
    +** Processing line: ~      target_x = state.x * state.target_camera_scale~
     - Inside source: true
     *** True Line Result
    -    def calc_player
    -** Processing line: ~      calc_shooting~
    +      target_x = state.x * state.target_camera_scale
    +** Processing line: ~      target_y = state.y * state.target_camera_scale~
     - Inside source: true
     *** True Line Result
    -      calc_shooting
    -** Processing line: ~      if !state.god_mode~
    +      target_y = state.y * state.target_camera_scale
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      if !state.god_mode
    -** Processing line: ~        state.dy += state.gravity  # Since acceleration is the change in velocity, the change in y (dy) increases every frame~
    +
    +** Processing line: ~      distance_x = target_x - (state.camera_x + 640)~
     - Inside source: true
     *** True Line Result
    -        state.dy += state.gravity  # Since acceleration is the change in velocity, the change in y (dy) increases every frame
    -** Processing line: ~        state.dx += state.dx * state.air~
    +      distance_x = target_x - (state.camera_x + 640)
    +** Processing line: ~      distance_y = target_y - (state.camera_y + 360)~
     - Inside source: true
     *** True Line Result
    -        state.dx += state.dx * state.air
    -** Processing line: ~      end~
    +      distance_y = target_y - (state.camera_y + 360)
    +** Processing line: ~      state.camera_x += distance_x * percentage if distance_x.abs > 1~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~      calc_pendulum~
    +      state.camera_x += distance_x * percentage if distance_x.abs > 1
    +** Processing line: ~      state.camera_y += distance_y * percentage if distance_y.abs > 1~
     - Inside source: true
     *** True Line Result
    -      calc_pendulum
    -** Processing line: ~      calc_box_collision~
    +      state.camera_y += distance_y * percentage if distance_y.abs > 1
    +** Processing line: ~      state.camera_x = 0 if state.camera_x < 0~
     - Inside source: true
     *** True Line Result
    -      calc_box_collision
    -** Processing line: ~      calc_edge_collision~
    +      state.camera_x = 0 if state.camera_x < 0
    +** Processing line: ~      state.camera_y = 0 if state.camera_y < 0~
     - Inside source: true
     *** True Line Result
    -      calc_edge_collision
    -** Processing line: ~      if !state.god_mode~
    +      state.camera_y = 0 if state.camera_y < 0
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      if !state.god_mode
    -** Processing line: ~        state.y  += state.dy~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        state.y  += state.dy
    -** Processing line: ~        state.x  += state.dx~
    +
    +** Processing line: ~    def vx x~
     - Inside source: true
     *** True Line Result
    -        state.x  += state.dx
    -** Processing line: ~      end~
    +    def vx x
    +** Processing line: ~       (x * state.camera_scale) - state.camera_x~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~      calc_tongue_angle~
    +       (x * state.camera_scale) - state.camera_x
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      calc_tongue_angle
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    def vy y~
    +- Inside source: true
    +*** True Line Result
    +    def vy y
    +** Processing line: ~      (y * state.camera_scale) - state.camera_y~
    +- Inside source: true
    +*** True Line Result
    +      (y * state.camera_scale) - state.camera_y
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -116527,30 +118179,30 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def calc_box_collision~
    +** Processing line: ~    def vw w~
     - Inside source: true
     *** True Line Result
    -    def calc_box_collision
    -** Processing line: ~      return unless state.world_lookup.keys.length > 0~
    +    def vw w
    +** Processing line: ~      w * state.camera_scale~
     - Inside source: true
     *** True Line Result
    -      return unless state.world_lookup.keys.length > 0
    -** Processing line: ~      collision_floor~
    +      w * state.camera_scale
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      collision_floor
    -** Processing line: ~      collision_left~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      collision_left
    -** Processing line: ~      collision_right~
    +
    +** Processing line: ~    def vh h~
     - Inside source: true
     *** True Line Result
    -      collision_right
    -** Processing line: ~      collision_ceiling~
    +    def vh h
    +** Processing line: ~      h * state.camera_scale~
     - Inside source: true
     *** True Line Result
    -      collision_ceiling
    +      h * state.camera_scale
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -116559,266 +118211,282 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def calc_edge_collision~
    +** Processing line: ~    def calc~
     - Inside source: true
     *** True Line Result
    -    def calc_edge_collision
    -** Processing line: ~      # Ensures that player doesn't fall below the map~
    +    def calc
    +** Processing line: ~      calc_camera~
     - Inside source: true
     *** True Line Result
    -      # Ensures that player doesn't fall below the map
    -** Processing line: ~      if next_y < 0 && state.dy < 0~
    +      calc_camera
    +** Processing line: ~      calc_world_lookup~
     - Inside source: true
     *** True Line Result
    -      if next_y < 0 && state.dy < 0
    -** Processing line: ~        state.y = 0~
    +      calc_world_lookup
    +** Processing line: ~      calc_player~
     - Inside source: true
     *** True Line Result
    -        state.y = 0
    -** Processing line: ~        state.dy = state.dy.abs * 0.8~
    +      calc_player
    +** Processing line: ~      calc_on_floor~
     - Inside source: true
     *** True Line Result
    -        state.dy = state.dy.abs * 0.8
    -** Processing line: ~        state.collision_on_y = true~
    +      calc_on_floor
    +** Processing line: ~      calc_score~
     - Inside source: true
     *** True Line Result
    -        state.collision_on_y = true
    -** Processing line: ~      # Ensures player doesn't go insanely high~
    +      calc_score
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      # Ensures player doesn't go insanely high
    -** Processing line: ~      elsif next_y > 5875 - state.tile_size && state.dy > 0~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      elsif next_y > 5875 - state.tile_size && state.dy > 0
    -** Processing line: ~        state.y = 5875 - state.tile_size~
    +
    +** Processing line: ~    def set_camera_scale v = nil~
     - Inside source: true
     *** True Line Result
    -        state.y = 5875 - state.tile_size
    -** Processing line: ~        state.dy = state.dy.abs * 0.8 * -1~
    +    def set_camera_scale v = nil
    +** Processing line: ~      return if v < 0.1~
     - Inside source: true
     *** True Line Result
    -        state.dy = state.dy.abs * 0.8 * -1
    -** Processing line: ~        state.collision_on_y = true~
    +      return if v < 0.1
    +** Processing line: ~      state.target_camera_scale = v~
     - Inside source: true
     *** True Line Result
    -        state.collision_on_y = true
    -** Processing line: ~      end~
    +      state.target_camera_scale = v
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      end
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      # Ensures that player remains in the horizontal range its supposed to~
    +** Processing line: ~    def process_inputs_god_mode~
     - Inside source: true
     *** True Line Result
    -      # Ensures that player remains in the horizontal range its supposed to
    -** Processing line: ~      if state.x >= 10000 - state.tile_size && state.dx > 0~
    +    def process_inputs_god_mode
    +** Processing line: ~      return unless state.god_mode~
     - Inside source: true
     *** True Line Result
    -      if state.x >= 10000 - state.tile_size && state.dx > 0
    -** Processing line: ~        state.x = 10000 - state.tile_size~
    +      return unless state.god_mode
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        state.x = 10000 - state.tile_size
    -** Processing line: ~        state.dx = state.dx.abs * 0.8 * -1~
    +
    +** Processing line: ~      if inputs.keyboard.key_down.equal_sign || (inputs.keyboard.equal_sign && state.tick_count.mod_zero?(10))~
     - Inside source: true
     *** True Line Result
    -        state.dx = state.dx.abs * 0.8 * -1
    -** Processing line: ~        state.collision_on_x = true~
    +      if inputs.keyboard.key_down.equal_sign || (inputs.keyboard.equal_sign && state.tick_count.mod_zero?(10))
    +** Processing line: ~        set_camera_scale state.camera_scale + 0.1~
     - Inside source: true
     *** True Line Result
    -        state.collision_on_x = true
    -** Processing line: ~      elsif state.x <= 0 && state.dx < 0~
    +        set_camera_scale state.camera_scale + 0.1
    +** Processing line: ~      elsif inputs.keyboard.key_down.hyphen || (inputs.keyboard.hyphen && state.tick_count.mod_zero?(10))~
     - Inside source: true
     *** True Line Result
    -      elsif state.x <= 0 && state.dx < 0
    -** Processing line: ~        state.x = 0~
    +      elsif inputs.keyboard.key_down.hyphen || (inputs.keyboard.hyphen && state.tick_count.mod_zero?(10))
    +** Processing line: ~        set_camera_scale state.camera_scale - 0.1~
     - Inside source: true
     *** True Line Result
    -        state.x = 0
    -** Processing line: ~        state.dx = state.dx.abs * 0.8~
    +        set_camera_scale state.camera_scale - 0.1
    +** Processing line: ~      elsif inputs.keyboard.eight || inputs.keyboard.zero~
     - Inside source: true
     *** True Line Result
    -        state.dx = state.dx.abs * 0.8
    -** Processing line: ~        state.collision_on_x = true~
    +      elsif inputs.keyboard.eight || inputs.keyboard.zero
    +** Processing line: ~        set_camera_scale 1~
     - Inside source: true
     *** True Line Result
    -        state.collision_on_x = true
    +        set_camera_scale 1
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
           end
    -** Processing line: ~    end~
    -- Inside source: true
    -*** True Line Result
    -    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def next_y~
    +** Processing line: ~      if inputs.mouse.click~
     - Inside source: true
     *** True Line Result
    -    def next_y
    -** Processing line: ~      state.y + state.dy~
    +      if inputs.mouse.click
    +** Processing line: ~        state.id_seed += 1~
     - Inside source: true
     *** True Line Result
    -      state.y + state.dy
    -** Processing line: ~    end~
    +        state.id_seed += 1
    +** Processing line: ~        id = state.id_seed~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +        id = state.id_seed
    +** Processing line: ~        x = state.camera_x + (inputs.mouse.click.x.fdiv(state.camera_scale) - 32)~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def next_x~
    +        x = state.camera_x + (inputs.mouse.click.x.fdiv(state.camera_scale) - 32)
    +** Processing line: ~        y = state.camera_y + (inputs.mouse.click.y.fdiv(state.camera_scale) - 32)~
     - Inside source: true
     *** True Line Result
    -    def next_x
    -** Processing line: ~      if state.dx < 0~
    +        y = state.camera_y + (inputs.mouse.click.y.fdiv(state.camera_scale) - 32)
    +** Processing line: ~        x = ((x + 2).idiv 4) * 4~
     - Inside source: true
     *** True Line Result
    -      if state.dx < 0
    -** Processing line: ~        return (state.x + state.dx) - (state.tile_size - state.player_width)~
    +        x = ((x + 2).idiv 4) * 4
    +** Processing line: ~        y = ((y + 2).idiv 4) * 4~
     - Inside source: true
     *** True Line Result
    -        return (state.x + state.dx) - (state.tile_size - state.player_width)
    -** Processing line: ~      else~
    +        y = ((y + 2).idiv 4) * 4
    +** Processing line: ~        w = 64~
     - Inside source: true
     *** True Line Result
    -      else
    -** Processing line: ~        return (state.x + state.dx) + (state.tile_size - state.player_width)~
    +        w = 64
    +** Processing line: ~        h = 64~
     - Inside source: true
     *** True Line Result
    -        return (state.x + state.dx) + (state.tile_size - state.player_width)
    -** Processing line: ~      end~
    +        h = 64
    +** Processing line: ~        candidate_rect = { id: id, x: x, y: y, w: w, h: h }~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +        candidate_rect = { id: id, x: x, y: y, w: w, h: h }
    +** Processing line: ~        scaled_candidate_rect = { x: x + 30, y: y + 30, w: w - 60, h: h - 60 }~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +        scaled_candidate_rect = { x: x + 30, y: y + 30, w: w - 60, h: h - 60 }
    +** Processing line: ~        to_remove = state.world.find { |r| r.intersect_rect? scaled_candidate_rect }~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def collision_floor~
    +        to_remove = state.world.find { |r| r.intersect_rect? scaled_candidate_rect }
    +** Processing line: ~        if to_remove && args.inputs.keyboard.x~
     - Inside source: true
     *** True Line Result
    -    def collision_floor
    -** Processing line: ~      return unless state.dy <= 0~
    +        if to_remove && args.inputs.keyboard.x
    +** Processing line: ~          state.world.reject! { |r| r.id == to_remove.id }~
     - Inside source: true
     *** True Line Result
    -      return unless state.dy <= 0
    -** Processing line: ~~
    +          state.world.reject! { |r| r.id == to_remove.id }
    +** Processing line: ~        else~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      player_rect = [state.x, next_y, state.tile_size, state.tile_size]~
    +        else
    +** Processing line: ~          state.world << candidate_rect~
     - Inside source: true
     *** True Line Result
    -      player_rect = [state.x, next_y, state.tile_size, state.tile_size]
    -** Processing line: ~~
    +          state.world << candidate_rect
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      # Runs through all the sprites on the field and determines if the player hits the bottom of sprite (hence "-0.1" above)~
    +        end
    +** Processing line: ~        export_map~
     - Inside source: true
     *** True Line Result
    -      # Runs through all the sprites on the field and determines if the player hits the bottom of sprite (hence "-0.1" above)
    -** Processing line: ~      floor_collisions = state.world_collision_rects~
    +        export_map
    +** Processing line: ~        state.world_lookup = {}~
     - Inside source: true
     *** True Line Result
    -      floor_collisions = state.world_collision_rects
    -** Processing line: ~                           .find_all { |r| r[:top].intersect_rect?(player_rect, state.collision_tolerance) }~
    +        state.world_lookup = {}
    +** Processing line: ~        state.world_collision_rects = nil~
     - Inside source: true
     *** True Line Result
    -                           .find_all { |r| r[:top].intersect_rect?(player_rect, state.collision_tolerance) }
    -** Processing line: ~                           .first~
    +        state.world_collision_rects = nil
    +** Processing line: ~        calc_world_lookup~
     - Inside source: true
     *** True Line Result
    -                           .first
    +        calc_world_lookup
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      return unless floor_collisions~
    +** Processing line: ~      if input_up?~
     - Inside source: true
     *** True Line Result
    -      return unless floor_collisions
    -** Processing line: ~      state.y = floor_collisions[:top].top~
    +      if input_up?
    +** Processing line: ~        state.y += 10~
     - Inside source: true
     *** True Line Result
    -      state.y = floor_collisions[:top].top
    -** Processing line: ~      state.dy = state.dy.abs * 0.8~
    +        state.y += 10
    +** Processing line: ~        state.dy = 0~
     - Inside source: true
     *** True Line Result
    -      state.dy = state.dy.abs * 0.8
    -** Processing line: ~    end~
    +        state.dy = 0
    +** Processing line: ~      elsif input_down?~
     - Inside source: true
     *** True Line Result
    -    end
    +      elsif input_down?
    +** Processing line: ~        state.y -= 10~
    +- Inside source: true
    +*** True Line Result
    +        state.y -= 10
    +** Processing line: ~        state.dy = 0~
    +- Inside source: true
    +*** True Line Result
    +        state.dy = 0
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def collision_left~
    +** Processing line: ~      if input_left?~
     - Inside source: true
     *** True Line Result
    -    def collision_left
    -** Processing line: ~      return unless state.dx < 0~
    +      if input_left?
    +** Processing line: ~        state.x -= 10~
     - Inside source: true
     *** True Line Result
    -      return unless state.dx < 0
    -** Processing line: ~      player_rect = [next_x, state.y, state.tile_size, state.tile_size]~
    +        state.x -= 10
    +** Processing line: ~        state.dx = 0~
     - Inside source: true
     *** True Line Result
    -      player_rect = [next_x, state.y, state.tile_size, state.tile_size]
    -** Processing line: ~~
    +        state.dx = 0
    +** Processing line: ~      elsif input_right?~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      # Runs through all the sprites on the field and determines if the player hits the left side of sprite (hence "-0.1" above)~
    +      elsif input_right?
    +** Processing line: ~        state.x += 10~
     - Inside source: true
     *** True Line Result
    -      # Runs through all the sprites on the field and determines if the player hits the left side of sprite (hence "-0.1" above)
    -** Processing line: ~      left_side_collisions = state.world_collision_rects~
    +        state.x += 10
    +** Processing line: ~        state.dx = 0~
     - Inside source: true
     *** True Line Result
    -      left_side_collisions = state.world_collision_rects
    -** Processing line: ~                               .find_all { |r| r[:left_right].intersect_rect?(player_rect, state.collision_tolerance) }~
    +        state.dx = 0
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -                               .find_all { |r| r[:left_right].intersect_rect?(player_rect, state.collision_tolerance) }
    -** Processing line: ~                               .first~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -                               .first
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      return unless left_side_collisions~
    +** Processing line: ~    def process_inputs~
     - Inside source: true
     *** True Line Result
    -      return unless left_side_collisions
    -** Processing line: ~      state.x = left_side_collisions[:left_right].right~
    +    def process_inputs
    +** Processing line: ~      if state.scene == :game~
     - Inside source: true
     *** True Line Result
    -      state.x = left_side_collisions[:left_right].right
    -** Processing line: ~      state.dx = state.dy.abs * 0.8~
    +      if state.scene == :game
    +** Processing line: ~        process_inputs_player_movement~
     - Inside source: true
     *** True Line Result
    -      state.dx = state.dy.abs * 0.8
    -** Processing line: ~      state.collision_on_x = true~
    +        process_inputs_player_movement
    +** Processing line: ~        process_inputs_god_mode~
     - Inside source: true
     *** True Line Result
    -      state.collision_on_x = true
    +        process_inputs_god_mode
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -116827,58 +118495,54 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def collision_right~
    +** Processing line: ~    def input_up?~
     - Inside source: true
     *** True Line Result
    -    def collision_right
    -** Processing line: ~      return unless state.dx > 0~
    +    def input_up?
    +** Processing line: ~      inputs.keyboard.w || inputs.keyboard.up || inputs.keyboard.k~
     - Inside source: true
     *** True Line Result
    -      return unless state.dx > 0
    +      inputs.keyboard.w || inputs.keyboard.up || inputs.keyboard.k
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      player_rect = [next_x, state.y, state.tile_size, state.tile_size]~
    +** Processing line: ~    def input_up_released?~
     - Inside source: true
     *** True Line Result
    -      player_rect = [next_x, state.y, state.tile_size, state.tile_size]
    -** Processing line: ~      # Runs through all the sprites on the field and determines if the player hits the right side of sprite (hence "-0.1" above)~
    +    def input_up_released?
    +** Processing line: ~      inputs.keyboard.key_up.w ||~
     - Inside source: true
     *** True Line Result
    -      # Runs through all the sprites on the field and determines if the player hits the right side of sprite (hence "-0.1" above)
    -** Processing line: ~      right_side_collisions = state.world_collision_rects~
    +      inputs.keyboard.key_up.w ||
    +** Processing line: ~      inputs.keyboard.key_up.up ||~
     - Inside source: true
     *** True Line Result
    -      right_side_collisions = state.world_collision_rects
    -** Processing line: ~                                .find_all { |r| r[:left_right].intersect_rect?(player_rect, state.collision_tolerance) }~
    +      inputs.keyboard.key_up.up ||
    +** Processing line: ~      inputs.keyboard.key_up.k~
     - Inside source: true
     *** True Line Result
    -                                .find_all { |r| r[:left_right].intersect_rect?(player_rect, state.collision_tolerance) }
    -** Processing line: ~                                .first~
    +      inputs.keyboard.key_up.k
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -                                .first
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      return unless right_side_collisions~
    -- Inside source: true
    -*** True Line Result
    -      return unless right_side_collisions
    -** Processing line: ~      state.x = right_side_collisions[:left_right].left - state.tile_size~
    -- Inside source: true
    -*** True Line Result
    -      state.x = right_side_collisions[:left_right].left - state.tile_size
    -** Processing line: ~      state.dx = state.dx.abs * 0.8 * -1~
    +** Processing line: ~    def input_down?~
     - Inside source: true
     *** True Line Result
    -      state.dx = state.dx.abs * 0.8 * -1
    -** Processing line: ~      state.collision_on_x = true~
    +    def input_down?
    +** Processing line: ~      inputs.keyboard.s || inputs.keyboard.down || inputs.keyboard.j~
     - Inside source: true
     *** True Line Result
    -      state.collision_on_x = true
    +      inputs.keyboard.s || inputs.keyboard.down || inputs.keyboard.j
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -116887,62 +118551,54 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def collision_ceiling~
    +** Processing line: ~    def input_down_released?~
     - Inside source: true
     *** True Line Result
    -    def collision_ceiling
    -** Processing line: ~      return unless state.dy > 0~
    +    def input_down_released?
    +** Processing line: ~      inputs.keyboard.key_up.s ||~
     - Inside source: true
     *** True Line Result
    -      return unless state.dy > 0
    -** Processing line: ~~
    +      inputs.keyboard.key_up.s ||
    +** Processing line: ~      inputs.keyboard.key_up.down ||~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      player_rect = [state.x, next_y, state.player_width, state.player_height]~
    +      inputs.keyboard.key_up.down ||
    +** Processing line: ~      inputs.keyboard.key_up.j~
     - Inside source: true
     *** True Line Result
    -      player_rect = [state.x, next_y, state.player_width, state.player_height]
    -** Processing line: ~~
    +      inputs.keyboard.key_up.j
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      # Runs through all the sprites on the field and determines if the player hits the ceiling of sprite (hence "+0.1" above)~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      # Runs through all the sprites on the field and determines if the player hits the ceiling of sprite (hence "+0.1" above)
    -** Processing line: ~      ceil_collisions = state.world_collision_rects~
    +
    +** Processing line: ~    def input_left?~
     - Inside source: true
     *** True Line Result
    -      ceil_collisions = state.world_collision_rects
    -** Processing line: ~                          .find_all { |r| r[:bottom].intersect_rect?(player_rect, state.collision_tolerance) }~
    +    def input_left?
    +** Processing line: ~      inputs.keyboard.a || inputs.keyboard.left || inputs.keyboard.h~
     - Inside source: true
     *** True Line Result
    -                          .find_all { |r| r[:bottom].intersect_rect?(player_rect, state.collision_tolerance) }
    -** Processing line: ~                          .first~
    +      inputs.keyboard.a || inputs.keyboard.left || inputs.keyboard.h
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -                          .first
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      return unless ceil_collisions~
    -- Inside source: true
    -*** True Line Result
    -      return unless ceil_collisions
    -** Processing line: ~      state.y = ceil_collisions[:bottom].y - state.tile_size~
    -- Inside source: true
    -*** True Line Result
    -      state.y = ceil_collisions[:bottom].y - state.tile_size
    -** Processing line: ~      state.dy = state.dy.abs * 0.8 * -1~
    +** Processing line: ~    def input_right?~
     - Inside source: true
     *** True Line Result
    -      state.dy = state.dy.abs * 0.8 * -1
    -** Processing line: ~      state.collision_on_y = true~
    +    def input_right?
    +** Processing line: ~      inputs.keyboard.d || inputs.keyboard.right || inputs.keyboard.l~
     - Inside source: true
     *** True Line Result
    -      state.collision_on_y = true
    +      inputs.keyboard.d || inputs.keyboard.right || inputs.keyboard.l
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -116951,26 +118607,22 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def to_coord point~
    -- Inside source: true
    -*** True Line Result
    -    def to_coord point
    -** Processing line: ~      # Integer divides (idiv) point.x to turn into grid~
    +** Processing line: ~    def set_object path, w, h~
     - Inside source: true
     *** True Line Result
    -      # Integer divides (idiv) point.x to turn into grid
    -** Processing line: ~      # Then, you can just multiply each integer by state.tile_size~
    +    def set_object path, w, h
    +** Processing line: ~      state.object = path~
     - Inside source: true
     *** True Line Result
    -      # Then, you can just multiply each integer by state.tile_size
    -** Processing line: ~      # later and huzzah. Grid coordinates~
    +      state.object = path
    +** Processing line: ~      state.object_w = w~
     - Inside source: true
     *** True Line Result
    -      # later and huzzah. Grid coordinates
    -** Processing line: ~      [point.x.idiv(state.tile_size), point.y.idiv(state.tile_size)]~
    +      state.object_w = w
    +** Processing line: ~      state.object_h = h~
     - Inside source: true
     *** True Line Result
    -      [point.x.idiv(state.tile_size), point.y.idiv(state.tile_size)]
    +      state.object_h = h
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -116979,206 +118631,230 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def export_map~
    -- Inside source: true
    -*** True Line Result
    -    def export_map
    -** Processing line: ~      export_string = state.world.map do |x, y|~
    +** Processing line: ~    def collision_mode~
     - Inside source: true
     *** True Line Result
    -      export_string = state.world.map do |x, y|
    -** Processing line: ~        "#{x},#{y},1"~
    +    def collision_mode
    +** Processing line: ~      state.dev_action = :collision_mode~
     - Inside source: true
     *** True Line Result
    -        "#{x},#{y},1"
    -** Processing line: ~      end~
    +      state.dev_action = :collision_mode
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~      export_string += state.objects.map do |x, y, w, h, path|~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      export_string += state.objects.map do |x, y, w, h, path|
    -** Processing line: ~        "#{x},#{y},2,#{w},#{h},#{path}"~
    +
    +** Processing line: ~    def process_inputs_player_movement~
     - Inside source: true
     *** True Line Result
    -        "#{x},#{y},2,#{w},#{h},#{path}"
    -** Processing line: ~      end~
    +    def process_inputs_player_movement
    +** Processing line: ~      if inputs.keyboard.key_down.g~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~      gtk.write_file(MAP_FILE_PATH, export_string.join("\n"))~
    +      if inputs.keyboard.key_down.g
    +** Processing line: ~        state.god_mode = !state.god_mode~
     - Inside source: true
     *** True Line Result
    -      gtk.write_file(MAP_FILE_PATH, export_string.join("\n"))
    -** Processing line: ~      state.map_saved_at = state.tick_count~
    +        state.god_mode = !state.god_mode
    +** Processing line: ~        puts state.god_mode~
     - Inside source: true
     *** True Line Result
    -      state.map_saved_at = state.tick_count
    -** Processing line: ~    end~
    +        puts state.god_mode
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    end
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def inputs_export_stage~
    +** Processing line: ~      if inputs.keyboard.key_down.u && state.dev_action == :collision_mode~
     - Inside source: true
     *** True Line Result
    -    def inputs_export_stage
    -** Processing line: ~    end~
    +      if inputs.keyboard.key_down.u && state.dev_action == :collision_mode
    +** Processing line: ~        state.world = state.world[0..-2]~
     - Inside source: true
     *** True Line Result
    -    end
    +        state.world = state.world[0..-2]
    +** Processing line: ~        state.world_lookup = {}~
    +- Inside source: true
    +*** True Line Result
    +        state.world_lookup = {}
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def calc_score~
    +** Processing line: ~      if inputs.keyboard.key_down.space && !state.anchor_point~
     - Inside source: true
     *** True Line Result
    -    def calc_score
    -** Processing line: ~      return unless state.scene == :game~
    +      if inputs.keyboard.key_down.space && !state.anchor_point
    +** Processing line: ~        state.tongue_length = 0~
     - Inside source: true
     *** True Line Result
    -      return unless state.scene == :game
    -** Processing line: ~      player = [state.x, state.y, state.player_width, state.player_height]~
    +        state.tongue_length = 0
    +** Processing line: ~        state.action = :shooting~
     - Inside source: true
     *** True Line Result
    -      player = [state.x, state.y, state.player_width, state.player_height]
    -** Processing line: ~      collected = state.objects.find_all { |s| s.intersect_rect? player }~
    +        state.action = :shooting
    +** Processing line: ~        outputs.sounds << 'sounds/shooting.wav'~
     - Inside source: true
     *** True Line Result
    -      collected = state.objects.find_all { |s| s.intersect_rect? player }
    -** Processing line: ~      state.stuff_score += collected.length~
    +        outputs.sounds << 'sounds/shooting.wav'
    +** Processing line: ~      elsif inputs.keyboard.key_down.space~
     - Inside source: true
     *** True Line Result
    -      state.stuff_score += collected.length
    -** Processing line: ~      if collected.length > 0~
    +      elsif inputs.keyboard.key_down.space
    +** Processing line: ~        state.action = :aiming~
     - Inside source: true
     *** True Line Result
    -      if collected.length > 0
    -** Processing line: ~        outputs.sounds << 'sounds/collectable.wav'~
    +        state.action = :aiming
    +** Processing line: ~        state.anchor_point  = nil~
     - Inside source: true
     *** True Line Result
    -        outputs.sounds << 'sounds/collectable.wav'
    +        state.anchor_point  = nil
    +** Processing line: ~        state.tongue_length = 100~
    +- Inside source: true
    +*** True Line Result
    +        state.tongue_length = 100
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
           end
    -** Processing line: ~      state.objects = state.objects.reject { |s| collected.include? s }~
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      state.objects = state.objects.reject { |s| collected.include? s }
    -** Processing line: ~      state.stuff_time += 0.01~
    +
    +** Processing line: ~      if state.anchor_point~
     - Inside source: true
     *** True Line Result
    -      state.stuff_time += 0.01
    -** Processing line: ~      if state.objects.length == 0~
    +      if state.anchor_point
    +** Processing line: ~        if input_up?~
     - Inside source: true
     *** True Line Result
    -      if state.objects.length == 0
    -** Processing line: ~        if !state.stuff_best_time || state.stuff_time < state.stuff_best_time~
    +        if input_up?
    +** Processing line: ~          if state.tongue_length >= 105~
     - Inside source: true
     *** True Line Result
    -        if !state.stuff_best_time || state.stuff_time < state.stuff_best_time
    -** Processing line: ~          state.stuff_best_time = state.stuff_time~
    +          if state.tongue_length >= 105
    +** Processing line: ~            state.tongue_length -= 5~
     - Inside source: true
     *** True Line Result
    -          state.stuff_best_time = state.stuff_time
    -** Processing line: ~        end~
    +            state.tongue_length -= 5
    +** Processing line: ~            state.dy += 0.8~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~        state.game_over_at = nil~
    +            state.dy += 0.8
    +** Processing line: ~          end~
     - Inside source: true
     *** True Line Result
    -        state.game_over_at = nil
    -** Processing line: ~        state.scene = :ending~
    +          end
    +** Processing line: ~        elsif input_down?~
     - Inside source: true
     *** True Line Result
    -        state.scene = :ending
    -** Processing line: ~      end~
    +        elsif input_down?
    +** Processing line: ~          state.tongue_length += 5~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +          state.tongue_length += 5
    +** Processing line: ~          state.dy -= 0.8~
     - Inside source: true
     *** True Line Result
    -    end
    +          state.dy -= 0.8
    +** Processing line: ~        end~
    +- Inside source: true
    +*** True Line Result
    +        end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def calc_on_floor~
    +** Processing line: ~        if input_left? && state.dx > 1~
     - Inside source: true
     *** True Line Result
    -    def calc_on_floor
    -** Processing line: ~      if state.action == :anchored~
    +        if input_left? && state.dx > 1
    +** Processing line: ~          state.dx *= 0.98~
     - Inside source: true
     *** True Line Result
    -      if state.action == :anchored
    -** Processing line: ~        state.on_floor = false~
    +          state.dx *= 0.98
    +** Processing line: ~        elsif input_left? && state.dx < -1~
     - Inside source: true
     *** True Line Result
    -        state.on_floor = false
    -** Processing line: ~        state.on_floor_debounce = 30~
    +        elsif input_left? && state.dx < -1
    +** Processing line: ~          state.dx *= 1.03~
     - Inside source: true
     *** True Line Result
    -        state.on_floor_debounce = 30
    -** Processing line: ~      else~
    +          state.dx *= 1.03
    +** Processing line: ~        elsif input_left? && !state.on_floor~
     - Inside source: true
     *** True Line Result
    -      else
    -** Processing line: ~        state.on_floor_debounce ||= 30~
    +        elsif input_left? && !state.on_floor
    +** Processing line: ~          state.dx -= 3~
     - Inside source: true
     *** True Line Result
    -        state.on_floor_debounce ||= 30
    -** Processing line: ~~
    +          state.dx -= 3
    +** Processing line: ~        elsif input_right? && state.dx > 1~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~        if state.dy.round != 0~
    +        elsif input_right? && state.dx > 1
    +** Processing line: ~          state.dx *= 1.03~
     - Inside source: true
     *** True Line Result
    -        if state.dy.round != 0
    -** Processing line: ~          state.on_floor_debounce = 30~
    +          state.dx *= 1.03
    +** Processing line: ~        elsif input_right? && state.dx < -1~
     - Inside source: true
     *** True Line Result
    -          state.on_floor_debounce = 30
    -** Processing line: ~          state.on_floor = false~
    +        elsif input_right? && state.dx < -1
    +** Processing line: ~          state.dx *= 0.98~
     - Inside source: true
     *** True Line Result
    -          state.on_floor = false
    -** Processing line: ~        else~
    +          state.dx *= 0.98
    +** Processing line: ~        elsif input_right? && !state.on_floor~
     - Inside source: true
     *** True Line Result
    -        else
    -** Processing line: ~          state.on_floor_debounce -= 1~
    +        elsif input_right? && !state.on_floor
    +** Processing line: ~          state.dx += 3~
     - Inside source: true
     *** True Line Result
    -          state.on_floor_debounce -= 1
    +          state.dx += 3
     ** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
             end
    -** Processing line: ~~
    +** Processing line: ~      else~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~        if state.on_floor_debounce <= 0~
    +      else
    +** Processing line: ~        if input_left?~
     - Inside source: true
     *** True Line Result
    -        if state.on_floor_debounce <= 0
    -** Processing line: ~          state.on_floor_debounce = 0~
    +        if input_left?
    +** Processing line: ~          state.tongue_angle += 1.5~
     - Inside source: true
     *** True Line Result
    -          state.on_floor_debounce = 0
    -** Processing line: ~          state.on_floor = true~
    +          state.tongue_angle += 1.5
    +** Processing line: ~          state.tongue_angle = state.tongue_angle~
     - Inside source: true
     *** True Line Result
    -          state.on_floor = true
    +          state.tongue_angle = state.tongue_angle
    +** Processing line: ~        elsif input_right?~
    +- Inside source: true
    +*** True Line Result
    +        elsif input_right?
    +** Processing line: ~          state.tongue_angle -= 1.5~
    +- Inside source: true
    +*** True Line Result
    +          state.tongue_angle -= 1.5
    +** Processing line: ~          state.tongue_angle = state.tongue_angle~
    +- Inside source: true
    +*** True Line Result
    +          state.tongue_angle = state.tongue_angle
     ** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    @@ -117195,106 +118871,106 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def render_player~
    +** Processing line: ~    def attempt_load_world_from_file~
     - Inside source: true
     *** True Line Result
    -    def render_player
    -** Processing line: ~      path = "sprites/square-green.png"~
    +    def attempt_load_world_from_file
    +** Processing line: ~      return if state.world~
     - Inside source: true
     *** True Line Result
    -      path = "sprites/square-green.png"
    -** Processing line: ~      angle = 0~
    +      return if state.world
    +** Processing line: ~      # exported_world = gtk.read_file(MAP_FILE_PATH)~
     - Inside source: true
     *** True Line Result
    -      angle = 0
    -** Processing line: ~      # outputs.labels << [vx(state.x), vy(state.y) - 30, "dy: #{state.dy.round}"]~
    +      # exported_world = gtk.read_file(MAP_FILE_PATH)
    +** Processing line: ~      state.world = []~
     - Inside source: true
     *** True Line Result
    -      # outputs.labels << [vx(state.x), vy(state.y) - 30, "dy: #{state.dy.round}"]
    -** Processing line: ~      if state.action == :idle~
    +      state.world = []
    +** Processing line: ~      state.objects = []~
     - Inside source: true
     *** True Line Result
    -      if state.action == :idle
    -** Processing line: ~        # outputs.labels << [vx(state.x), vy(state.y), "IDLE"]~
    +      state.objects = []
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        # outputs.labels << [vx(state.x), vy(state.y), "IDLE"]
    -** Processing line: ~        path = "sprites/square-green.png"~
    +
    +** Processing line: ~      if $collisions~
     - Inside source: true
     *** True Line Result
    -        path = "sprites/square-green.png"
    -** Processing line: ~      elsif state.action == :aiming && !state.on_floor~
    +      if $collisions
    +** Processing line: ~        state.id_seed ||= 0~
     - Inside source: true
     *** True Line Result
    -      elsif state.action == :aiming && !state.on_floor
    -** Processing line: ~        # outputs.labels << [vx(state.x), vy(state.y), "AIMING AIR BORN"]~
    +        state.id_seed ||= 0
    +** Processing line: ~        $collisions.each do |x, y, w, h|~
     - Inside source: true
     *** True Line Result
    -        # outputs.labels << [vx(state.x), vy(state.y), "AIMING AIR BORN"]
    -** Processing line: ~        angle = state.tongue_angle - 90~
    +        $collisions.each do |x, y, w, h|
    +** Processing line: ~          state.id_seed += 1~
     - Inside source: true
     *** True Line Result
    -        angle = state.tongue_angle - 90
    -** Processing line: ~        path = "sprites/square-green.png"~
    +          state.id_seed += 1
    +** Processing line: ~          state.world << { id: state.id_seed, x: x, y: y, w: w, h: h }~
     - Inside source: true
     *** True Line Result
    -        path = "sprites/square-green.png"
    -** Processing line: ~      elsif state.action == :aiming # ON THE GROUND~
    +          state.world << { id: state.id_seed, x: x, y: y, w: w, h: h }
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -      elsif state.action == :aiming # ON THE GROUND
    -** Processing line: ~        # outputs.labels << [vx(state.x), vy(state.y), "AIMING GROUND"]~
    +        end
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -        # outputs.labels << [vx(state.x), vy(state.y), "AIMING GROUND"]
    -** Processing line: ~        path = "sprites/square-green.png"~
    +      end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        path = "sprites/square-green.png"
    -** Processing line: ~      elsif state.action == :shooting && !state.on_floor~
    +
    +** Processing line: ~      if $mugs~
     - Inside source: true
     *** True Line Result
    -      elsif state.action == :shooting && !state.on_floor
    -** Processing line: ~        # outputs.labels << [vx(state.x), vy(state.y), "SHOOTING AIR BORN"]~
    +      if $mugs
    +** Processing line: ~        $mugs.map do |x, y, w, h, path|~
     - Inside source: true
     *** True Line Result
    -        # outputs.labels << [vx(state.x), vy(state.y), "SHOOTING AIR BORN"]
    -** Processing line: ~        path = "sprites/square-green.png"~
    +        $mugs.map do |x, y, w, h, path|
    +** Processing line: ~          state.objects << [x, y, w, h, path]~
     - Inside source: true
     *** True Line Result
    -        path = "sprites/square-green.png"
    -** Processing line: ~        angle = state.tongue_angle - 90~
    +          state.objects << [x, y, w, h, path]
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -        angle = state.tongue_angle - 90
    -** Processing line: ~      elsif state.action == :shooting~
    +        end
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -      elsif state.action == :shooting
    -** Processing line: ~        # outputs.labels << [vx(state.x), vy(state.y), "SHOOTING ON GROUND"]~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -        # outputs.labels << [vx(state.x), vy(state.y), "SHOOTING ON GROUND"]
    -** Processing line: ~        path = "sprites/square-green.png"~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        path = "sprites/square-green.png"
    -** Processing line: ~      elsif state.action == :anchored~
    +
    +** Processing line: ~    def calc_world_lookup~
     - Inside source: true
     *** True Line Result
    -      elsif state.action == :anchored
    -** Processing line: ~        # outputs.labels << [vx(state.x), vy(state.y), "SWINGING"]~
    +    def calc_world_lookup
    +** Processing line: ~      if state.tile_size != state.previous_tile_size~
     - Inside source: true
     *** True Line Result
    -        # outputs.labels << [vx(state.x), vy(state.y), "SWINGING"]
    -** Processing line: ~        angle = state.tongue_angle - 90~
    +      if state.tile_size != state.previous_tile_size
    +** Processing line: ~        state.previous_tile_size = state.tile_size~
     - Inside source: true
     *** True Line Result
    -        angle = state.tongue_angle - 90
    -** Processing line: ~        path = "sprites/square-green.png"~
    +        state.previous_tile_size = state.tile_size
    +** Processing line: ~        state.world_lookup = {}~
     - Inside source: true
     *** True Line Result
    -        path = "sprites/square-green.png"
    +        state.world_lookup = {}
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    @@ -117303,4838 +118979,8526 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      outputs.sprites << [vx(state.x),~
    +** Processing line: ~      return if state.world_lookup.keys.length > 0~
     - Inside source: true
     *** True Line Result
    -      outputs.sprites << [vx(state.x),
    -** Processing line: ~                          vy(state.y),~
    +      return if state.world_lookup.keys.length > 0
    +** Processing line: ~      return unless state.world.length > 0~
     - Inside source: true
     *** True Line Result
    -                          vy(state.y),
    -** Processing line: ~                          vw(state.player_width),~
    +      return unless state.world.length > 0
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -                          vw(state.player_width),
    -** Processing line: ~                          vh(state.player_height),~
    +
    +** Processing line: ~      # Searches through the world and finds the cordinates that exist~
     - Inside source: true
     *** True Line Result
    -                          vh(state.player_height),
    -** Processing line: ~                          path,~
    +      # Searches through the world and finds the cordinates that exist
    +** Processing line: ~      state.world_lookup = {}~
     - Inside source: true
     *** True Line Result
    -                          path,
    -** Processing line: ~                          angle]~
    +      state.world_lookup = {}
    +** Processing line: ~      state.world.each do |rect|~
     - Inside source: true
     *** True Line Result
    -                          angle]
    -** Processing line: ~    end~
    +      state.world.each do |rect|
    +** Processing line: ~        state.world_lookup[rect.id] = rect~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +        state.world_lookup[rect.id] = rect
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def render_player_old~
    +      end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    def render_player_old
    -** Processing line: ~      # Player~
    +
    +** Processing line: ~      # Assigns collision rects for every sprite drawn~
     - Inside source: true
     *** True Line Result
    -      # Player
    -** Processing line: ~      if state.action == :aiming~
    +      # Assigns collision rects for every sprite drawn
    +** Processing line: ~      state.world_collision_rects =~
     - Inside source: true
     *** True Line Result
    -      if state.action == :aiming
    -** Processing line: ~        path = 'sprites\frg\idle\frog_idle.png'~
    +      state.world_collision_rects =
    +** Processing line: ~        state.world_lookup~
     - Inside source: true
     *** True Line Result
    -        path = 'sprites\frg\idle\frog_idle.png'
    -** Processing line: ~        if state.dx > 2~
    +        state.world_lookup
    +** Processing line: ~             .keys~
     - Inside source: true
     *** True Line Result
    -        if state.dx > 2
    -** Processing line: ~  	  #directional right sprite was here but i needa redo it~
    +             .keys
    +** Processing line: ~             .map do |key|~
     - Inside source: true
     *** True Line Result
    -  	  #directional right sprite was here but i needa redo it
    -** Processing line: ~          path = 'sprites\frg\anchor\frog-anchor-0.png'~
    +             .map do |key|
    +** Processing line: ~               rect = state.world_lookup[key]~
     - Inside source: true
     *** True Line Result
    -          path = 'sprites\frg\anchor\frog-anchor-0.png'
    -** Processing line: ~        #directional left sprite was here but i needa redo it~
    +               rect = state.world_lookup[key]
    +** Processing line: ~               s = state.tile_size~
     - Inside source: true
     *** True Line Result
    -        #directional left sprite was here but i needa redo it
    -** Processing line: ~  	  elsif state.dx < -2~
    +               s = state.tile_size
    +** Processing line: ~               rect.w ||= s~
     - Inside source: true
     *** True Line Result
    -  	  elsif state.dx < -2
    -** Processing line: ~          path = 'sprites\frg\anchor\frog-anchor-0.png'~
    +               rect.w ||= s
    +** Processing line: ~               rect.h ||= s~
     - Inside source: true
     *** True Line Result
    -          path = 'sprites\frg\anchor\frog-anchor-0.png'
    -** Processing line: ~        end~
    +               rect.h ||= s
    +** Processing line: ~               {~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~        outputs.sprites << [vx(state.x),~
    +               {
    +** Processing line: ~                 args:       rect,~
     - Inside source: true
     *** True Line Result
    -        outputs.sprites << [vx(state.x),
    -** Processing line: ~                            vy(state.y),~
    +                 args:       rect,
    +** Processing line: ~                 left_right: { x: rect.x,     y: rect.y + 4, w: rect.w,     h: rect.h - 6 },~
     - Inside source: true
     *** True Line Result
    -                            vy(state.y),
    -** Processing line: ~                            vw(state.player_width),~
    +                 left_right: { x: rect.x,     y: rect.y + 4, w: rect.w,     h: rect.h - 6 },
    +** Processing line: ~                 top:        { x: rect.x + 4, y: rect.y + 6, w: rect.w - 8, h: rect.h - 6 },~
     - Inside source: true
     *** True Line Result
    -                            vw(state.player_width),
    -** Processing line: ~                            vh(state.player_height),~
    +                 top:        { x: rect.x + 4, y: rect.y + 6, w: rect.w - 8, h: rect.h - 6 },
    +** Processing line: ~                 bottom:     { x: rect.x + 1, y: rect.y - 1, w: rect.w - 2, h: rect.h - 8 },~
     - Inside source: true
     *** True Line Result
    -                            vh(state.player_height),
    -** Processing line: ~                            path,~
    +                 bottom:     { x: rect.x + 1, y: rect.y - 1, w: rect.w - 2, h: rect.h - 8 },
    +** Processing line: ~               }~
     - Inside source: true
     *** True Line Result
    -                            path,
    -** Processing line: ~                            (state.tongue_angle - 90)]~
    +               }
    +** Processing line: ~             end~
     - Inside source: true
     *** True Line Result
    -                            (state.tongue_angle - 90)]
    -** Processing line: ~      elsif state.action == :anchored || state.action == :shooting~
    +             end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      elsif state.action == :anchored || state.action == :shooting
    -** Processing line: ~        outputs.sprites << [vx(state.x),~
    +
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -        outputs.sprites << [vx(state.x),
    -** Processing line: ~                            vy(state.y),~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -                            vy(state.y),
    -** Processing line: ~                            vw(state.player_width),~
    +
    +** Processing line: ~    def calc_pendulum~
     - Inside source: true
     *** True Line Result
    -                            vw(state.player_width),
    -** Processing line: ~                            vw(state.player_height),~
    +    def calc_pendulum
    +** Processing line: ~      return if !state.anchor_point~
     - Inside source: true
     *** True Line Result
    -                            vw(state.player_height),
    -** Processing line: ~                            'sprites/animations_povfrog/frog_bwah_up.png',~
    +      return if !state.anchor_point
    +** Processing line: ~      target_x = state.anchor_point.x - start_of_tongue.x~
     - Inside source: true
     *** True Line Result
    -                            'sprites/animations_povfrog/frog_bwah_up.png',
    -** Processing line: ~                            (state.tongue_angle - 90)]~
    +      target_x = state.anchor_point.x - start_of_tongue.x
    +** Processing line: ~      target_y = state.anchor_point.y -~
     - Inside source: true
     *** True Line Result
    -                            (state.tongue_angle - 90)]
    -** Processing line: ~      end~
    +      target_y = state.anchor_point.y -
    +** Processing line: ~                 state.tongue_length - 5 - 20 - state.player_height~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +                 state.tongue_length - 5 - 20 - state.player_height
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~  end~
    +
    +** Processing line: ~      diff_y = state.y - target_y~
     - Inside source: true
     *** True Line Result
    -  end
    +      diff_y = state.y - target_y
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~~
    +** Processing line: ~      if target_x > 0~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  $game = CleptoFrog.new~
    +      if target_x > 0
    +** Processing line: ~        state.dx += 0.6~
     - Inside source: true
     *** True Line Result
    -  $game = CleptoFrog.new
    +        state.dx += 0.6
    +** Processing line: ~      elsif target_x < 0~
    +- Inside source: true
    +*** True Line Result
    +      elsif target_x < 0
    +** Processing line: ~        state.dx -= 0.6~
    +- Inside source: true
    +*** True Line Result
    +        state.dx -= 0.6
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def tick args~
    +** Processing line: ~      if diff_y > 0~
     - Inside source: true
     *** True Line Result
    -  def tick args
    -** Processing line: ~    if args.state.scene == :game~
    +      if diff_y > 0
    +** Processing line: ~        state.dy -= 0.1~
     - Inside source: true
     *** True Line Result
    -    if args.state.scene == :game
    -** Processing line: ~      tick_instructions args, "SPACE to SHOOT and RELEASE tongue. LEFT, RIGHT to SWING and BUILD momentum. MINIMAP in bottom right corner.", 360~
    +        state.dy -= 0.1
    +** Processing line: ~      elsif diff_y < 0~
     - Inside source: true
     *** True Line Result
    -      tick_instructions args, "SPACE to SHOOT and RELEASE tongue. LEFT, RIGHT to SWING and BUILD momentum. MINIMAP in bottom right corner.", 360
    -** Processing line: ~    end~
    +      elsif diff_y < 0
    +** Processing line: ~        state.dy += 0.1~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~    $game.args = args~
    +        state.dy += 0.1
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    $game.args = args
    -** Processing line: ~    $game.tick~
    +      end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    $game.tick
    -** Processing line: ~  end~
    +
    +** Processing line: ~      state.dx *= 0.99~
     - Inside source: true
     *** True Line Result
    -  end
    +      state.dx *= 0.99
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def tick_instructions args, text, y = 715~
    +** Processing line: ~      if state.dy.abs < 2~
     - Inside source: true
     *** True Line Result
    -  def tick_instructions args, text, y = 715
    -** Processing line: ~    return if args.state.key_event_occurred~
    +      if state.dy.abs < 2
    +** Processing line: ~        state.dy *= 0.8~
     - Inside source: true
     *** True Line Result
    -    return if args.state.key_event_occurred
    -** Processing line: ~    if args.inputs.keyboard.directional_vector || args.inputs.keyboard.key_down.space~
    +        state.dy *= 0.8
    +** Processing line: ~      else~
     - Inside source: true
     *** True Line Result
    -    if args.inputs.keyboard.directional_vector || args.inputs.keyboard.key_down.space
    -** Processing line: ~      args.state.key_event_occurred = true~
    +      else
    +** Processing line: ~        state.dy *= 0.90~
     - Inside source: true
     *** True Line Result
    -      args.state.key_event_occurred = true
    -** Processing line: ~    end~
    +        state.dy *= 0.90
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    end
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    args.outputs.debug << [0, y - 50, 1280, 60].solid~
    +** Processing line: ~      if state.tongue_length && state.y~
     - Inside source: true
     *** True Line Result
    -    args.outputs.debug << [0, y - 50, 1280, 60].solid
    -** Processing line: ~    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label~
    +      if state.tongue_length && state.y
    +** Processing line: ~        state.dy += state.tongue_angle.vector_y state.tongue_length.fdiv(1000)~
     - Inside source: true
     *** True Line Result
    -    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label
    -** Processing line: ~    args.outputs.debug << [640, y - 25, "(SPACE to dismiss instructions)" , -2, 1, 255, 255, 255].label~
    +        state.dy += state.tongue_angle.vector_y state.tongue_length.fdiv(1000)
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    args.outputs.debug << [640, y - 25, "(SPACE to dismiss instructions)" , -2, 1, 255, 255, 255].label
    -** Processing line: ~  end~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  end
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~#+end_src~
    -- Line was identified as the end of a code block.
    -*** True Line Result
    -#+end_src
    -** Processing line: ~~
    -- End of paragraph detected.
    -*** True Line Result
    -
    -** Processing line: ~*** Platformer - Clepto Frog - map.rb~
    -- Header detected.
    -*** True Line Result
    -
    -*** True Line Result
    -*** Platformer - Clepto Frog - map.rb
    -** Processing line: ~#+begin_src ruby~
    -- Line was identified as the beginning of a code block.
    -*** True Line Result
    -
    -*** True Line Result
    -#+begin_src ruby
    -** Processing line: ~  # ./samples/99_genre_platformer/clepto_frog/app/map.rb~
    +** Processing line: ~    def calc_tongue_angle~
     - Inside source: true
     *** True Line Result
    -  # ./samples/99_genre_platformer/clepto_frog/app/map.rb
    -** Processing line: ~  $collisions = [~
    +    def calc_tongue_angle
    +** Processing line: ~      return unless state.anchor_point~
     - Inside source: true
     *** True Line Result
    -  $collisions = [
    -** Processing line: ~    [326, 463, 64, 64],~
    +      return unless state.anchor_point
    +** Processing line: ~      state.tongue_angle = args.geometry.angle_from state.anchor_point, start_of_tongue~
     - Inside source: true
     *** True Line Result
    -    [326, 463, 64, 64],
    -** Processing line: ~    [274, 462, 64, 64],~
    +      state.tongue_angle = args.geometry.angle_from state.anchor_point, start_of_tongue
    +** Processing line: ~      state.tongue_length = args.geometry.distance(start_of_tongue, state.anchor_point)~
     - Inside source: true
     *** True Line Result
    -    [274, 462, 64, 64],
    -** Processing line: ~    [326, 413, 64, 64],~
    +      state.tongue_length = args.geometry.distance(start_of_tongue, state.anchor_point)
    +** Processing line: ~      state.tongue_length = state.tongue_length.greater(100)~
     - Inside source: true
     *** True Line Result
    -    [326, 413, 64, 64],
    -** Processing line: ~    [275, 412, 64, 64],~
    +      state.tongue_length = state.tongue_length.greater(100)
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    [275, 412, 64, 64],
    -** Processing line: ~    [124, 651, 64, 64],~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    [124, 651, 64, 64],
    -** Processing line: ~    [72, 651, 64, 64],~
    +
    +** Processing line: ~    def player_from_end_of_tongue~
     - Inside source: true
     *** True Line Result
    -    [72, 651, 64, 64],
    -** Processing line: ~    [124, 600, 64, 64],~
    +    def player_from_end_of_tongue
    +** Processing line: ~      p = state.tongue_angle.vector(state.tongue_length)~
     - Inside source: true
     *** True Line Result
    -    [124, 600, 64, 64],
    -** Processing line: ~    [69, 599, 64, 64],~
    +      p = state.tongue_angle.vector(state.tongue_length)
    +** Processing line: ~      derived_start = [state.anchor_point.x - p.x, state.anchor_point.y - p.y]~
     - Inside source: true
     *** True Line Result
    -    [69, 599, 64, 64],
    -** Processing line: ~    [501, 997, 64, 64],~
    +      derived_start = [state.anchor_point.x - p.x, state.anchor_point.y - p.y]
    +** Processing line: ~      derived_start.x -= state.player_width.half~
     - Inside source: true
     *** True Line Result
    -    [501, 997, 64, 64],
    -** Processing line: ~    [476, 995, 64, 64],~
    +      derived_start.x -= state.player_width.half
    +** Processing line: ~      derived_start.y -= state.player_height.half~
     - Inside source: true
     *** True Line Result
    -    [476, 995, 64, 64],
    -** Processing line: ~    [3224, 2057, 64, 64],~
    +      derived_start.y -= state.player_height.half
    +** Processing line: ~      derived_start~
     - Inside source: true
     *** True Line Result
    -    [3224, 2057, 64, 64],
    -** Processing line: ~    [3224, 1994, 64, 64],~
    +      derived_start
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    [3224, 1994, 64, 64],
    -** Processing line: ~    [3225, 1932, 64, 64],~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    [3225, 1932, 64, 64],
    -** Processing line: ~    [3225, 1870, 64, 64],~
    +
    +** Processing line: ~    def end_of_tongue~
     - Inside source: true
     *** True Line Result
    -    [3225, 1870, 64, 64],
    -** Processing line: ~    [3226, 1806, 64, 64],~
    +    def end_of_tongue
    +** Processing line: ~      p = state.tongue_angle.vector(state.tongue_length)~
     - Inside source: true
     *** True Line Result
    -    [3226, 1806, 64, 64],
    -** Processing line: ~    [3224, 1744, 64, 64],~
    +      p = state.tongue_angle.vector(state.tongue_length)
    +** Processing line: ~      { x: start_of_tongue.x + p.x, y: start_of_tongue.y + p.y }~
     - Inside source: true
     *** True Line Result
    -    [3224, 1744, 64, 64],
    -** Processing line: ~    [3225, 1689, 64, 64],~
    +      { x: start_of_tongue.x + p.x, y: start_of_tongue.y + p.y }
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    [3225, 1689, 64, 64],
    -** Processing line: ~    [3226, 1660, 64, 64],~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    [3226, 1660, 64, 64],
    -** Processing line: ~    [3161, 1658, 64, 64],~
    +
    +** Processing line: ~    def calc_shooting~
     - Inside source: true
     *** True Line Result
    -    [3161, 1658, 64, 64],
    -** Processing line: ~    [3097, 1660, 64, 64],~
    +    def calc_shooting
    +** Processing line: ~      calc_shooting_increment~
     - Inside source: true
     *** True Line Result
    -    [3097, 1660, 64, 64],
    -** Processing line: ~    [3033, 1658, 64, 64],~
    +      calc_shooting_increment
    +** Processing line: ~      calc_shooting_increment~
     - Inside source: true
     *** True Line Result
    -    [3033, 1658, 64, 64],
    -** Processing line: ~    [2969, 1658, 64, 64],~
    +      calc_shooting_increment
    +** Processing line: ~      calc_shooting_increment~
     - Inside source: true
     *** True Line Result
    -    [2969, 1658, 64, 64],
    -** Processing line: ~    [2904, 1658, 64, 64],~
    +      calc_shooting_increment
    +** Processing line: ~      calc_shooting_increment~
     - Inside source: true
     *** True Line Result
    -    [2904, 1658, 64, 64],
    -** Processing line: ~    [2839, 1657, 64, 64],~
    +      calc_shooting_increment
    +** Processing line: ~      calc_shooting_increment~
     - Inside source: true
     *** True Line Result
    -    [2839, 1657, 64, 64],
    -** Processing line: ~    [2773, 1657, 64, 64],~
    +      calc_shooting_increment
    +** Processing line: ~      calc_shooting_increment~
     - Inside source: true
     *** True Line Result
    -    [2773, 1657, 64, 64],
    -** Processing line: ~    [2709, 1658, 64, 64],~
    +      calc_shooting_increment
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    [2709, 1658, 64, 64],
    -** Processing line: ~    [2643, 1657, 64, 64],~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    [2643, 1657, 64, 64],
    -** Processing line: ~    [2577, 1657, 64, 64],~
    +
    +** Processing line: ~    def calc_shooting_increment~
     - Inside source: true
     *** True Line Result
    -    [2577, 1657, 64, 64],
    -** Processing line: ~    [2509, 1658, 64, 64],~
    +    def calc_shooting_increment
    +** Processing line: ~      return unless state.action == :shooting~
     - Inside source: true
     *** True Line Result
    -    [2509, 1658, 64, 64],
    -** Processing line: ~    [2440, 1658, 64, 64],~
    +      return unless state.action == :shooting
    +** Processing line: ~      state.tongue_length += 5~
     - Inside source: true
     *** True Line Result
    -    [2440, 1658, 64, 64],
    -** Processing line: ~    [2371, 1658, 64, 64],~
    +      state.tongue_length += 5
    +** Processing line: ~      potential_anchor = end_of_tongue~
     - Inside source: true
     *** True Line Result
    -    [2371, 1658, 64, 64],
    -** Processing line: ~    [2301, 1659, 64, 64],~
    +      potential_anchor = end_of_tongue
    +** Processing line: ~      if potential_anchor.x <= 0~
     - Inside source: true
     *** True Line Result
    -    [2301, 1659, 64, 64],
    -** Processing line: ~    [2230, 1659, 64, 64],~
    +      if potential_anchor.x <= 0
    +** Processing line: ~        state.anchor_point = potential_anchor~
     - Inside source: true
     *** True Line Result
    -    [2230, 1659, 64, 64],
    -** Processing line: ~    [2159, 1659, 64, 64],~
    +        state.anchor_point = potential_anchor
    +** Processing line: ~        state.action = :anchored~
     - Inside source: true
     *** True Line Result
    -    [2159, 1659, 64, 64],
    -** Processing line: ~    [2092, 1660, 64, 64],~
    +        state.action = :anchored
    +** Processing line: ~        outputs.sounds << 'sounds/attached.wav'~
     - Inside source: true
     *** True Line Result
    -    [2092, 1660, 64, 64],
    -** Processing line: ~    [2025, 1661, 64, 64],~
    +        outputs.sounds << 'sounds/attached.wav'
    +** Processing line: ~      elsif potential_anchor.x >= 10000~
     - Inside source: true
     *** True Line Result
    -    [2025, 1661, 64, 64],
    -** Processing line: ~    [1958, 1660, 64, 64],~
    +      elsif potential_anchor.x >= 10000
    +** Processing line: ~        state.anchor_point = potential_anchor~
     - Inside source: true
     *** True Line Result
    -    [1958, 1660, 64, 64],
    -** Processing line: ~    [1888, 1659, 64, 64],~
    +        state.anchor_point = potential_anchor
    +** Processing line: ~        state.action = :anchored~
     - Inside source: true
     *** True Line Result
    -    [1888, 1659, 64, 64],
    -** Processing line: ~    [1817, 1657, 64, 64],~
    +        state.action = :anchored
    +** Processing line: ~        outputs.sounds << 'sounds/attached.wav'~
     - Inside source: true
     *** True Line Result
    -    [1817, 1657, 64, 64],
    -** Processing line: ~    [1745, 1656, 64, 64],~
    +        outputs.sounds << 'sounds/attached.wav'
    +** Processing line: ~      elsif potential_anchor.y <= 0~
     - Inside source: true
     *** True Line Result
    -    [1745, 1656, 64, 64],
    -** Processing line: ~    [1673, 1658, 64, 64],~
    +      elsif potential_anchor.y <= 0
    +** Processing line: ~        state.anchor_point = potential_anchor~
     - Inside source: true
     *** True Line Result
    -    [1673, 1658, 64, 64],
    -** Processing line: ~    [1605, 1660, 64, 64],~
    +        state.anchor_point = potential_anchor
    +** Processing line: ~        state.action = :anchored~
     - Inside source: true
     *** True Line Result
    -    [1605, 1660, 64, 64],
    -** Processing line: ~    [1536, 1658, 64, 64],~
    +        state.action = :anchored
    +** Processing line: ~        outputs.sounds << 'sounds/attached.wav'~
     - Inside source: true
     *** True Line Result
    -    [1536, 1658, 64, 64],
    -** Processing line: ~    [1465, 1660, 64, 64],~
    +        outputs.sounds << 'sounds/attached.wav'
    +** Processing line: ~      elsif potential_anchor.y >= 5875~
     - Inside source: true
     *** True Line Result
    -    [1465, 1660, 64, 64],
    -** Processing line: ~    [1386, 1960, 64, 64],~
    +      elsif potential_anchor.y >= 5875
    +** Processing line: ~        state.anchor_point = potential_anchor~
     - Inside source: true
     *** True Line Result
    -    [1386, 1960, 64, 64],
    -** Processing line: ~    [1384, 1908, 64, 64],~
    +        state.anchor_point = potential_anchor
    +** Processing line: ~        state.action = :anchored~
     - Inside source: true
     *** True Line Result
    -    [1384, 1908, 64, 64],
    -** Processing line: ~    [1387, 1862, 64, 64],~
    +        state.action = :anchored
    +** Processing line: ~        outputs.sounds << 'sounds/attached.wav'~
     - Inside source: true
     *** True Line Result
    -    [1387, 1862, 64, 64],
    -** Processing line: ~    [1326, 1863, 64, 64],~
    +        outputs.sounds << 'sounds/attached.wav'
    +** Processing line: ~      else~
     - Inside source: true
     *** True Line Result
    -    [1326, 1863, 64, 64],
    -** Processing line: ~    [1302, 1862, 64, 64],~
    +      else
    +** Processing line: ~        anchor_rect = { x: potential_anchor.x - 5, y: potential_anchor.y - 5, w: 10, h: 10 }~
     - Inside source: true
     *** True Line Result
    -    [1302, 1862, 64, 64],
    -** Processing line: ~    [1119, 1906, 64, 64],~
    +        anchor_rect = { x: potential_anchor.x - 5, y: potential_anchor.y - 5, w: 10, h: 10 }
    +** Processing line: ~        collision = state.world_collision_rects.find_all do |v|~
     - Inside source: true
     *** True Line Result
    -    [1119, 1906, 64, 64],
    -** Processing line: ~    [1057, 1905, 64, 64],~
    +        collision = state.world_collision_rects.find_all do |v|
    +** Processing line: ~          v[:args].intersect_rect?(anchor_rect)~
     - Inside source: true
     *** True Line Result
    -    [1057, 1905, 64, 64],
    -** Processing line: ~    [994, 1905, 64, 64],~
    +          v[:args].intersect_rect?(anchor_rect)
    +** Processing line: ~        end.first~
     - Inside source: true
     *** True Line Result
    -    [994, 1905, 64, 64],
    -** Processing line: ~    [937, 1904, 64, 64],~
    +        end.first
    +** Processing line: ~        if collision~
     - Inside source: true
     *** True Line Result
    -    [937, 1904, 64, 64],
    -** Processing line: ~    [896, 1904, 64, 64],~
    +        if collision
    +** Processing line: ~          state.anchor_point = potential_anchor~
     - Inside source: true
     *** True Line Result
    -    [896, 1904, 64, 64],
    -** Processing line: ~    [1001, 1845, 64, 64],~
    +          state.anchor_point = potential_anchor
    +** Processing line: ~          state.action = :anchored~
     - Inside source: true
     *** True Line Result
    -    [1001, 1845, 64, 64],
    -** Processing line: ~    [1003, 1780, 64, 64],~
    +          state.action = :anchored
    +** Processing line: ~        outputs.sounds << 'sounds/attached.wav'~
     - Inside source: true
     *** True Line Result
    -    [1003, 1780, 64, 64],
    -** Processing line: ~    [1003, 1718, 64, 64],~
    +        outputs.sounds << 'sounds/attached.wav'
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -    [1003, 1718, 64, 64],
    -** Processing line: ~    [692, 1958, 64, 64],~
    +        end
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    [692, 1958, 64, 64],
    -** Processing line: ~    [691, 1900, 64, 64],~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    [691, 1900, 64, 64],
    -** Processing line: ~    [774, 1861, 64, 64],~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    [774, 1861, 64, 64],
    -** Processing line: ~    [712, 1861, 64, 64],~
    +
    +** Processing line: ~    def calc_player~
     - Inside source: true
     *** True Line Result
    -    [712, 1861, 64, 64],
    -** Processing line: ~    [691, 1863, 64, 64],~
    +    def calc_player
    +** Processing line: ~      calc_shooting~
     - Inside source: true
     *** True Line Result
    -    [691, 1863, 64, 64],
    -** Processing line: ~    [325, 2133, 64, 64],~
    +      calc_shooting
    +** Processing line: ~      if !state.god_mode~
     - Inside source: true
     *** True Line Result
    -    [325, 2133, 64, 64],
    -** Processing line: ~    [275, 2134, 64, 64],~
    +      if !state.god_mode
    +** Processing line: ~        state.dy += state.gravity  # Since acceleration is the change in velocity, the change in y (dy) increases every frame~
     - Inside source: true
     *** True Line Result
    -    [275, 2134, 64, 64],
    -** Processing line: ~    [326, 2082, 64, 64],~
    +        state.dy += state.gravity  # Since acceleration is the change in velocity, the change in y (dy) increases every frame
    +** Processing line: ~        state.dx += state.dx * state.air~
     - Inside source: true
     *** True Line Result
    -    [326, 2082, 64, 64],
    -** Processing line: ~    [275, 2082, 64, 64],~
    +        state.dx += state.dx * state.air
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    [275, 2082, 64, 64],
    -** Processing line: ~    [124, 2321, 64, 64],~
    +      end
    +** Processing line: ~      calc_pendulum~
     - Inside source: true
     *** True Line Result
    -    [124, 2321, 64, 64],
    -** Processing line: ~    [71, 2320, 64, 64],~
    +      calc_pendulum
    +** Processing line: ~      calc_box_collision~
     - Inside source: true
     *** True Line Result
    -    [71, 2320, 64, 64],
    -** Processing line: ~    [123, 2267, 64, 64],~
    +      calc_box_collision
    +** Processing line: ~      calc_edge_collision~
     - Inside source: true
     *** True Line Result
    -    [123, 2267, 64, 64],
    -** Processing line: ~    [71, 2268, 64, 64],~
    +      calc_edge_collision
    +** Processing line: ~      if !state.god_mode~
     - Inside source: true
     *** True Line Result
    -    [71, 2268, 64, 64],
    -** Processing line: ~    [2354, 1859, 64, 64],~
    +      if !state.god_mode
    +** Processing line: ~        state.y  += state.dy~
     - Inside source: true
     *** True Line Result
    -    [2354, 1859, 64, 64],
    -** Processing line: ~    [2292, 1859, 64, 64],~
    +        state.y  += state.dy
    +** Processing line: ~        state.x  += state.dx~
     - Inside source: true
     *** True Line Result
    -    [2292, 1859, 64, 64],
    -** Processing line: ~    [2231, 1857, 64, 64],~
    +        state.x  += state.dx
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    [2231, 1857, 64, 64],
    -** Processing line: ~    [2198, 1858, 64, 64],~
    +      end
    +** Processing line: ~      calc_tongue_angle~
     - Inside source: true
     *** True Line Result
    -    [2198, 1858, 64, 64],
    -** Processing line: ~    [2353, 1802, 64, 64],~
    +      calc_tongue_angle
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    [2353, 1802, 64, 64],
    -** Processing line: ~    [2296, 1798, 64, 64],~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    [2296, 1798, 64, 64],
    -** Processing line: ~    [2233, 1797, 64, 64],~
    +
    +** Processing line: ~    def calc_box_collision~
     - Inside source: true
     *** True Line Result
    -    [2233, 1797, 64, 64],
    -** Processing line: ~    [2200, 1797, 64, 64],~
    +    def calc_box_collision
    +** Processing line: ~      return unless state.world_lookup.keys.length > 0~
     - Inside source: true
     *** True Line Result
    -    [2200, 1797, 64, 64],
    -** Processing line: ~    [2352, 1742, 64, 64],~
    +      return unless state.world_lookup.keys.length > 0
    +** Processing line: ~      collision_floor~
     - Inside source: true
     *** True Line Result
    -    [2352, 1742, 64, 64],
    -** Processing line: ~    [2288, 1741, 64, 64],~
    +      collision_floor
    +** Processing line: ~      collision_left~
     - Inside source: true
     *** True Line Result
    -    [2288, 1741, 64, 64],
    -** Processing line: ~    [2230, 1743, 64, 64],~
    +      collision_left
    +** Processing line: ~      collision_right~
     - Inside source: true
     *** True Line Result
    -    [2230, 1743, 64, 64],
    -** Processing line: ~    [2196, 1743, 64, 64],~
    +      collision_right
    +** Processing line: ~      collision_ceiling~
     - Inside source: true
     *** True Line Result
    -    [2196, 1743, 64, 64],
    -** Processing line: ~    [1736, 460, 64, 64],~
    +      collision_ceiling
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    [1736, 460, 64, 64],
    -** Processing line: ~    [1735, 400, 64, 64],~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    [1735, 400, 64, 64],
    -** Processing line: ~    [1736, 339, 64, 64],~
    +
    +** Processing line: ~    def calc_edge_collision~
     - Inside source: true
     *** True Line Result
    -    [1736, 339, 64, 64],
    -** Processing line: ~    [1736, 275, 64, 64],~
    +    def calc_edge_collision
    +** Processing line: ~      # Ensures that player doesn't fall below the map~
     - Inside source: true
     *** True Line Result
    -    [1736, 275, 64, 64],
    -** Processing line: ~    [1738, 210, 64, 64],~
    +      # Ensures that player doesn't fall below the map
    +** Processing line: ~      if next_y < 0 && state.dy < 0~
     - Inside source: true
     *** True Line Result
    -    [1738, 210, 64, 64],
    -** Processing line: ~    [1735, 145, 64, 64],~
    +      if next_y < 0 && state.dy < 0
    +** Processing line: ~        state.y = 0~
     - Inside source: true
     *** True Line Result
    -    [1735, 145, 64, 64],
    -** Processing line: ~    [1735, 87, 64, 64],~
    +        state.y = 0
    +** Processing line: ~        state.dy = state.dy.abs * 0.8~
     - Inside source: true
     *** True Line Result
    -    [1735, 87, 64, 64],
    -** Processing line: ~    [1736, 51, 64, 64],~
    +        state.dy = state.dy.abs * 0.8
    +** Processing line: ~        state.collision_on_y = true~
     - Inside source: true
     *** True Line Result
    -    [1736, 51, 64, 64],
    -** Processing line: ~    [539, 289, 64, 64],~
    +        state.collision_on_y = true
    +** Processing line: ~      # Ensures player doesn't go insanely high~
     - Inside source: true
     *** True Line Result
    -    [539, 289, 64, 64],
    -** Processing line: ~    [541, 228, 64, 64],~
    +      # Ensures player doesn't go insanely high
    +** Processing line: ~      elsif next_y > 5875 - state.tile_size && state.dy > 0~
     - Inside source: true
     *** True Line Result
    -    [541, 228, 64, 64],
    -** Processing line: ~    [626, 191, 64, 64],~
    +      elsif next_y > 5875 - state.tile_size && state.dy > 0
    +** Processing line: ~        state.y = 5875 - state.tile_size~
     - Inside source: true
     *** True Line Result
    -    [626, 191, 64, 64],
    -** Processing line: ~    [572, 192, 64, 64],~
    +        state.y = 5875 - state.tile_size
    +** Processing line: ~        state.dy = state.dy.abs * 0.8 * -1~
     - Inside source: true
     *** True Line Result
    -    [572, 192, 64, 64],
    -** Processing line: ~    [540, 193, 64, 64],~
    +        state.dy = state.dy.abs * 0.8 * -1
    +** Processing line: ~        state.collision_on_y = true~
     - Inside source: true
     *** True Line Result
    -    [540, 193, 64, 64],
    -** Processing line: ~    [965, 233, 64, 64],~
    +        state.collision_on_y = true
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    [965, 233, 64, 64],
    -** Processing line: ~    [904, 234, 64, 64],~
    +      end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    [904, 234, 64, 64],
    -** Processing line: ~    [840, 234, 64, 64],~
    +
    +** Processing line: ~      # Ensures that player remains in the horizontal range its supposed to~
     - Inside source: true
     *** True Line Result
    -    [840, 234, 64, 64],
    -** Processing line: ~    [779, 234, 64, 64],~
    +      # Ensures that player remains in the horizontal range its supposed to
    +** Processing line: ~      if state.x >= 10000 - state.tile_size && state.dx > 0~
     - Inside source: true
     *** True Line Result
    -    [779, 234, 64, 64],
    -** Processing line: ~    [745, 236, 64, 64],~
    +      if state.x >= 10000 - state.tile_size && state.dx > 0
    +** Processing line: ~        state.x = 10000 - state.tile_size~
     - Inside source: true
     *** True Line Result
    -    [745, 236, 64, 64],
    -** Processing line: ~    [851, 169, 64, 64],~
    +        state.x = 10000 - state.tile_size
    +** Processing line: ~        state.dx = state.dx.abs * 0.8 * -1~
     - Inside source: true
     *** True Line Result
    -    [851, 169, 64, 64],
    -** Processing line: ~    [849, 108, 64, 64],~
    +        state.dx = state.dx.abs * 0.8 * -1
    +** Processing line: ~        state.collision_on_x = true~
     - Inside source: true
     *** True Line Result
    -    [849, 108, 64, 64],
    -** Processing line: ~    [852, 50, 64, 64],~
    +        state.collision_on_x = true
    +** Processing line: ~      elsif state.x <= 0 && state.dx < 0~
     - Inside source: true
     *** True Line Result
    -    [852, 50, 64, 64],
    -** Processing line: ~    [1237, 289, 64, 64],~
    +      elsif state.x <= 0 && state.dx < 0
    +** Processing line: ~        state.x = 0~
     - Inside source: true
     *** True Line Result
    -    [1237, 289, 64, 64],
    -** Processing line: ~    [1236, 228, 64, 64],~
    +        state.x = 0
    +** Processing line: ~        state.dx = state.dx.abs * 0.8~
     - Inside source: true
     *** True Line Result
    -    [1236, 228, 64, 64],
    -** Processing line: ~    [1238, 197, 64, 64],~
    +        state.dx = state.dx.abs * 0.8
    +** Processing line: ~        state.collision_on_x = true~
     - Inside source: true
     *** True Line Result
    -    [1238, 197, 64, 64],
    -** Processing line: ~    [1181, 192, 64, 64],~
    +        state.collision_on_x = true
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    [1181, 192, 64, 64],
    -** Processing line: ~    [1152, 192, 64, 64],~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    [1152, 192, 64, 64],
    -** Processing line: ~    [1443, 605, 64, 64],~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    [1443, 605, 64, 64],
    -** Processing line: ~    [1419, 606, 64, 64],~
    +
    +** Processing line: ~    def next_y~
     - Inside source: true
     *** True Line Result
    -    [1419, 606, 64, 64],
    -** Processing line: ~    [1069, 925, 64, 64],~
    +    def next_y
    +** Processing line: ~      state.y + state.dy~
     - Inside source: true
     *** True Line Result
    -    [1069, 925, 64, 64],
    -** Processing line: ~    [1068, 902, 64, 64],~
    +      state.y + state.dy
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    [1068, 902, 64, 64],
    -** Processing line: ~    [1024, 927, 64, 64],~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    [1024, 927, 64, 64],
    -** Processing line: ~    [1017, 897, 64, 64],~
    +
    +** Processing line: ~    def next_x~
     - Inside source: true
     *** True Line Result
    -    [1017, 897, 64, 64],
    -** Processing line: ~    [963, 926, 64, 64],~
    +    def next_x
    +** Processing line: ~      if state.dx < 0~
     - Inside source: true
     *** True Line Result
    -    [963, 926, 64, 64],
    -** Processing line: ~    [958, 898, 64, 64],~
    +      if state.dx < 0
    +** Processing line: ~        return (state.x + state.dx) - (state.tile_size - state.player_width)~
     - Inside source: true
     *** True Line Result
    -    [958, 898, 64, 64],
    -** Processing line: ~    [911, 928, 64, 64],~
    +        return (state.x + state.dx) - (state.tile_size - state.player_width)
    +** Processing line: ~      else~
     - Inside source: true
     *** True Line Result
    -    [911, 928, 64, 64],
    -** Processing line: ~    [911, 896, 64, 64],~
    +      else
    +** Processing line: ~        return (state.x + state.dx) + (state.tile_size - state.player_width)~
     - Inside source: true
     *** True Line Result
    -    [911, 896, 64, 64],
    -** Processing line: ~    [2132, 803, 64, 64],~
    +        return (state.x + state.dx) + (state.tile_size - state.player_width)
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    [2132, 803, 64, 64],
    -** Processing line: ~    [2081, 803, 64, 64],~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    [2081, 803, 64, 64],
    -** Processing line: ~    [2131, 752, 64, 64],~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    [2131, 752, 64, 64],
    -** Processing line: ~    [2077, 751, 64, 64],~
    +
    +** Processing line: ~    def collision_floor~
     - Inside source: true
     *** True Line Result
    -    [2077, 751, 64, 64],
    -** Processing line: ~    [2615, 649, 64, 64],~
    +    def collision_floor
    +** Processing line: ~      return unless state.dy <= 0~
     - Inside source: true
     *** True Line Result
    -    [2615, 649, 64, 64],
    -** Processing line: ~    [2564, 651, 64, 64],~
    +      return unless state.dy <= 0
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    [2564, 651, 64, 64],
    -** Processing line: ~    [2533, 650, 64, 64],~
    +
    +** Processing line: ~      player_rect = [state.x, next_y, state.tile_size, state.tile_size]~
     - Inside source: true
     *** True Line Result
    -    [2533, 650, 64, 64],
    -** Processing line: ~    [2027, 156, 64, 64],~
    +      player_rect = [state.x, next_y, state.tile_size, state.tile_size]
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    [2027, 156, 64, 64],
    -** Processing line: ~    [1968, 155, 64, 64],~
    +
    +** Processing line: ~      # Runs through all the sprites on the field and determines if the player hits the bottom of sprite (hence "-0.1" above)~
     - Inside source: true
     *** True Line Result
    -    [1968, 155, 64, 64],
    -** Processing line: ~    [1907, 153, 64, 64],~
    +      # Runs through all the sprites on the field and determines if the player hits the bottom of sprite (hence "-0.1" above)
    +** Processing line: ~      floor_collisions = state.world_collision_rects~
     - Inside source: true
     *** True Line Result
    -    [1907, 153, 64, 64],
    -** Processing line: ~    [1873, 155, 64, 64],~
    +      floor_collisions = state.world_collision_rects
    +** Processing line: ~                           .find_all { |r| r[:top].intersect_rect?(player_rect, state.collision_tolerance) }~
     - Inside source: true
     *** True Line Result
    -    [1873, 155, 64, 64],
    -** Processing line: ~    [2025, 95, 64, 64],~
    +                           .find_all { |r| r[:top].intersect_rect?(player_rect, state.collision_tolerance) }
    +** Processing line: ~                           .first~
     - Inside source: true
     *** True Line Result
    -    [2025, 95, 64, 64],
    -** Processing line: ~    [1953, 98, 64, 64],~
    +                           .first
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    [1953, 98, 64, 64],
    -** Processing line: ~    [1894, 100, 64, 64],~
    +
    +** Processing line: ~      return unless floor_collisions~
     - Inside source: true
     *** True Line Result
    -    [1894, 100, 64, 64],
    -** Processing line: ~    [1870, 100, 64, 64],~
    +      return unless floor_collisions
    +** Processing line: ~      state.y = floor_collisions[:top].top~
     - Inside source: true
     *** True Line Result
    -    [1870, 100, 64, 64],
    -** Processing line: ~    [2029, 45, 64, 64],~
    +      state.y = floor_collisions[:top].top
    +** Processing line: ~      state.dy = state.dy.abs * 0.8~
     - Inside source: true
     *** True Line Result
    -    [2029, 45, 64, 64],
    -** Processing line: ~    [1971, 48, 64, 64],~
    +      state.dy = state.dy.abs * 0.8
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    [1971, 48, 64, 64],
    -** Processing line: ~    [1915, 47, 64, 64],~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    [1915, 47, 64, 64],
    -** Processing line: ~    [1873, 47, 64, 64],~
    +
    +** Processing line: ~    def collision_left~
     - Inside source: true
     *** True Line Result
    -    [1873, 47, 64, 64],
    -** Processing line: ~    [3956, 288, 64, 64],~
    +    def collision_left
    +** Processing line: ~      return unless state.dx < 0~
     - Inside source: true
     *** True Line Result
    -    [3956, 288, 64, 64],
    -** Processing line: ~    [3954, 234, 64, 64],~
    +      return unless state.dx < 0
    +** Processing line: ~      player_rect = [next_x, state.y, state.tile_size, state.tile_size]~
     - Inside source: true
     *** True Line Result
    -    [3954, 234, 64, 64],
    -** Processing line: ~    [4042, 190, 64, 64],~
    +      player_rect = [next_x, state.y, state.tile_size, state.tile_size]
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    [4042, 190, 64, 64],
    -** Processing line: ~    [3990, 190, 64, 64],~
    +
    +** Processing line: ~      # Runs through all the sprites on the field and determines if the player hits the left side of sprite (hence "-0.1" above)~
     - Inside source: true
     *** True Line Result
    -    [3990, 190, 64, 64],
    -** Processing line: ~    [3958, 195, 64, 64],~
    +      # Runs through all the sprites on the field and determines if the player hits the left side of sprite (hence "-0.1" above)
    +** Processing line: ~      left_side_collisions = state.world_collision_rects~
     - Inside source: true
     *** True Line Result
    -    [3958, 195, 64, 64],
    -** Processing line: ~    [3422, 709, 64, 64],~
    +      left_side_collisions = state.world_collision_rects
    +** Processing line: ~                               .find_all { |r| r[:left_right].intersect_rect?(player_rect, state.collision_tolerance) }~
     - Inside source: true
     *** True Line Result
    -    [3422, 709, 64, 64],
    -** Processing line: ~    [3425, 686, 64, 64],~
    +                               .find_all { |r| r[:left_right].intersect_rect?(player_rect, state.collision_tolerance) }
    +** Processing line: ~                               .first~
     - Inside source: true
     *** True Line Result
    -    [3425, 686, 64, 64],
    -** Processing line: ~    [3368, 709, 64, 64],~
    +                               .first
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    [3368, 709, 64, 64],
    -** Processing line: ~    [3364, 683, 64, 64],~
    +
    +** Processing line: ~      return unless left_side_collisions~
     - Inside source: true
     *** True Line Result
    -    [3364, 683, 64, 64],
    -** Processing line: ~    [3312, 711, 64, 64],~
    +      return unless left_side_collisions
    +** Processing line: ~      state.x = left_side_collisions[:left_right].right + 1~
     - Inside source: true
     *** True Line Result
    -    [3312, 711, 64, 64],
    -** Processing line: ~    [3307, 684, 64, 64],~
    +      state.x = left_side_collisions[:left_right].right + 1
    +** Processing line: ~      state.dx = state.dy.abs * 0.8~
     - Inside source: true
     *** True Line Result
    -    [3307, 684, 64, 64],
    -** Processing line: ~    [3266, 712, 64, 64],~
    +      state.dx = state.dy.abs * 0.8
    +** Processing line: ~      state.collision_on_x = true~
     - Inside source: true
     *** True Line Result
    -    [3266, 712, 64, 64],
    -** Processing line: ~    [3269, 681, 64, 64],~
    +      state.collision_on_x = true
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    [3269, 681, 64, 64],
    -** Processing line: ~    [4384, 236, 64, 64],~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    [4384, 236, 64, 64],
    -** Processing line: ~    [4320, 234, 64, 64],~
    +
    +** Processing line: ~    def collision_right~
     - Inside source: true
     *** True Line Result
    -    [4320, 234, 64, 64],
    -** Processing line: ~    [4257, 235, 64, 64],~
    +    def collision_right
    +** Processing line: ~      return unless state.dx > 0~
     - Inside source: true
     *** True Line Result
    -    [4257, 235, 64, 64],
    -** Processing line: ~    [4192, 234, 64, 64],~
    +      return unless state.dx > 0
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    [4192, 234, 64, 64],
    -** Processing line: ~    [4162, 234, 64, 64],~
    +
    +** Processing line: ~      player_rect = [next_x, state.y, state.tile_size, state.tile_size]~
     - Inside source: true
     *** True Line Result
    -    [4162, 234, 64, 64],
    -** Processing line: ~    [4269, 171, 64, 64],~
    +      player_rect = [next_x, state.y, state.tile_size, state.tile_size]
    +** Processing line: ~      # Runs through all the sprites on the field and determines if the player hits the right side of sprite (hence "-0.1" above)~
     - Inside source: true
     *** True Line Result
    -    [4269, 171, 64, 64],
    -** Processing line: ~    [4267, 111, 64, 64],~
    +      # Runs through all the sprites on the field and determines if the player hits the right side of sprite (hence "-0.1" above)
    +** Processing line: ~      right_side_collisions = state.world_collision_rects~
     - Inside source: true
     *** True Line Result
    -    [4267, 111, 64, 64],
    -** Processing line: ~    [4266, 52, 64, 64],~
    +      right_side_collisions = state.world_collision_rects
    +** Processing line: ~                                .find_all { |r| r[:left_right].intersect_rect?(player_rect, state.collision_tolerance) }~
     - Inside source: true
     *** True Line Result
    -    [4266, 52, 64, 64],
    -** Processing line: ~    [4580, 458, 64, 64],~
    +                                .find_all { |r| r[:left_right].intersect_rect?(player_rect, state.collision_tolerance) }
    +** Processing line: ~                                .first~
     - Inside source: true
     *** True Line Result
    -    [4580, 458, 64, 64],
    -** Processing line: ~    [4582, 396, 64, 64],~
    +                                .first
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    [4582, 396, 64, 64],
    -** Processing line: ~    [4582, 335, 64, 64],~
    +
    +** Processing line: ~      return unless right_side_collisions~
     - Inside source: true
     *** True Line Result
    -    [4582, 335, 64, 64],
    -** Processing line: ~    [4581, 275, 64, 64],~
    +      return unless right_side_collisions
    +** Processing line: ~      state.x = right_side_collisions[:left_right].left - state.tile_size - 1~
     - Inside source: true
     *** True Line Result
    -    [4581, 275, 64, 64],
    -** Processing line: ~    [4581, 215, 64, 64],~
    +      state.x = right_side_collisions[:left_right].left - state.tile_size - 1
    +** Processing line: ~      state.dx = state.dx.abs * 0.8 * -1~
     - Inside source: true
     *** True Line Result
    -    [4581, 215, 64, 64],
    -** Processing line: ~    [4581, 152, 64, 64],~
    +      state.dx = state.dx.abs * 0.8 * -1
    +** Processing line: ~      state.collision_on_x = true~
     - Inside source: true
     *** True Line Result
    -    [4581, 152, 64, 64],
    -** Processing line: ~    [4582, 89, 64, 64],~
    +      state.collision_on_x = true
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    [4582, 89, 64, 64],
    -** Processing line: ~    [4583, 51, 64, 64],~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    [4583, 51, 64, 64],
    -** Processing line: ~    [4810, 289, 64, 64],~
    +
    +** Processing line: ~    def collision_ceiling~
     - Inside source: true
     *** True Line Result
    -    [4810, 289, 64, 64],
    -** Processing line: ~    [4810, 227, 64, 64],~
    +    def collision_ceiling
    +** Processing line: ~      return unless state.dy > 0~
     - Inside source: true
     *** True Line Result
    -    [4810, 227, 64, 64],
    -** Processing line: ~    [4895, 189, 64, 64],~
    +      return unless state.dy > 0
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    [4895, 189, 64, 64],
    -** Processing line: ~    [4844, 191, 64, 64],~
    +
    +** Processing line: ~      player_rect = [state.x, next_y, state.player_width, state.player_height]~
     - Inside source: true
     *** True Line Result
    -    [4844, 191, 64, 64],
    -** Processing line: ~    [4809, 191, 64, 64],~
    +      player_rect = [state.x, next_y, state.player_width, state.player_height]
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    [4809, 191, 64, 64],
    -** Processing line: ~    [5235, 233, 64, 64],~
    +
    +** Processing line: ~      # Runs through all the sprites on the field and determines if the player hits the ceiling of sprite (hence "+0.1" above)~
     - Inside source: true
     *** True Line Result
    -    [5235, 233, 64, 64],
    -** Processing line: ~    [5176, 232, 64, 64],~
    +      # Runs through all the sprites on the field and determines if the player hits the ceiling of sprite (hence "+0.1" above)
    +** Processing line: ~      ceil_collisions = state.world_collision_rects~
     - Inside source: true
     *** True Line Result
    -    [5176, 232, 64, 64],
    -** Processing line: ~    [5118, 230, 64, 64],~
    +      ceil_collisions = state.world_collision_rects
    +** Processing line: ~                          .find_all { |r| r[:bottom].intersect_rect?(player_rect, state.collision_tolerance) }~
     - Inside source: true
     *** True Line Result
    -    [5118, 230, 64, 64],
    -** Processing line: ~    [5060, 232, 64, 64],~
    +                          .find_all { |r| r[:bottom].intersect_rect?(player_rect, state.collision_tolerance) }
    +** Processing line: ~                          .first~
     - Inside source: true
     *** True Line Result
    -    [5060, 232, 64, 64],
    -** Processing line: ~    [5015, 237, 64, 64],~
    +                          .first
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    [5015, 237, 64, 64],
    -** Processing line: ~    [5123, 171, 64, 64],~
    +
    +** Processing line: ~      return unless ceil_collisions~
     - Inside source: true
     *** True Line Result
    -    [5123, 171, 64, 64],
    -** Processing line: ~    [5123, 114, 64, 64],~
    +      return unless ceil_collisions
    +** Processing line: ~      state.y = ceil_collisions[:bottom].y - state.tile_size - 1~
     - Inside source: true
     *** True Line Result
    -    [5123, 114, 64, 64],
    -** Processing line: ~    [5121, 51, 64, 64],~
    +      state.y = ceil_collisions[:bottom].y - state.tile_size - 1
    +** Processing line: ~      state.dy = state.dy.abs * 0.8 * -1~
     - Inside source: true
     *** True Line Result
    -    [5121, 51, 64, 64],
    -** Processing line: ~    [5523, 461, 64, 64],~
    +      state.dy = state.dy.abs * 0.8 * -1
    +** Processing line: ~      state.collision_on_y = true~
     - Inside source: true
     *** True Line Result
    -    [5523, 461, 64, 64],
    -** Processing line: ~    [5123, 42, 64, 64],~
    +      state.collision_on_y = true
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    [5123, 42, 64, 64],
    -** Processing line: ~    [5525, 401, 64, 64],~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    [5525, 401, 64, 64],
    -** Processing line: ~    [5525, 340, 64, 64],~
    +
    +** Processing line: ~    def to_coord point~
     - Inside source: true
     *** True Line Result
    -    [5525, 340, 64, 64],
    -** Processing line: ~    [5526, 273, 64, 64],~
    +    def to_coord point
    +** Processing line: ~      # Integer divides (idiv) point.x to turn into grid~
     - Inside source: true
     *** True Line Result
    -    [5526, 273, 64, 64],
    -** Processing line: ~    [5527, 211, 64, 64],~
    +      # Integer divides (idiv) point.x to turn into grid
    +** Processing line: ~      # Then, you can just multiply each integer by state.tile_size~
     - Inside source: true
     *** True Line Result
    -    [5527, 211, 64, 64],
    -** Processing line: ~    [5525, 150, 64, 64],~
    +      # Then, you can just multiply each integer by state.tile_size
    +** Processing line: ~      # later and huzzah. Grid coordinates~
     - Inside source: true
     *** True Line Result
    -    [5525, 150, 64, 64],
    -** Processing line: ~    [5527, 84, 64, 64],~
    +      # later and huzzah. Grid coordinates
    +** Processing line: ~      [point.x.idiv(state.tile_size), point.y.idiv(state.tile_size)]~
     - Inside source: true
     *** True Line Result
    -    [5527, 84, 64, 64],
    -** Processing line: ~    [5524, 44, 64, 64],~
    +      [point.x.idiv(state.tile_size), point.y.idiv(state.tile_size)]
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    [5524, 44, 64, 64],
    -** Processing line: ~    [5861, 288, 64, 64],~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    [5861, 288, 64, 64],
    -** Processing line: ~    [5861, 229, 64, 64],~
    +
    +** Processing line: ~    def export_map~
     - Inside source: true
     *** True Line Result
    -    [5861, 229, 64, 64],
    -** Processing line: ~    [5945, 193, 64, 64],~
    +    def export_map
    +** Processing line: ~      export_string = "$collisions = [\n"~
     - Inside source: true
     *** True Line Result
    -    [5945, 193, 64, 64],
    -** Processing line: ~    [5904, 193, 64, 64],~
    +      export_string = "$collisions = [\n"
    +** Processing line: ~      export_string += state.world.map do |rect|~
     - Inside source: true
     *** True Line Result
    -    [5904, 193, 64, 64],
    -** Processing line: ~    [5856, 194, 64, 64],~
    +      export_string += state.world.map do |rect|
    +** Processing line: ~        "[#{rect.x},#{rect.y},#{rect.w},#{rect.h}],"~
     - Inside source: true
     *** True Line Result
    -    [5856, 194, 64, 64],
    -** Processing line: ~    [6542, 234, 64, 64],~
    +        "[#{rect.x},#{rect.y},#{rect.w},#{rect.h}],"
    +** Processing line: ~      end.join "\n"~
     - Inside source: true
     *** True Line Result
    -    [6542, 234, 64, 64],
    -** Processing line: ~    [6478, 235, 64, 64],~
    +      end.join "\n"
    +** Processing line: ~      export_string += "\n]\n\n"~
     - Inside source: true
     *** True Line Result
    -    [6478, 235, 64, 64],
    -** Processing line: ~    [6413, 238, 64, 64],~
    +      export_string += "\n]\n\n"
    +** Processing line: ~      export_string += "$mugs = [\n"~
     - Inside source: true
     *** True Line Result
    -    [6413, 238, 64, 64],
    -** Processing line: ~    [6348, 235, 64, 64],~
    +      export_string += "$mugs = [\n"
    +** Processing line: ~      export_string += state.objects.map do |x, y, w, h, path|~
     - Inside source: true
     *** True Line Result
    -    [6348, 235, 64, 64],
    -** Processing line: ~    [6285, 236, 64, 64],~
    +      export_string += state.objects.map do |x, y, w, h, path|
    +** Processing line: ~        "[#{x},#{y},#{w},#{h},'#{path}'],"~
     - Inside source: true
     *** True Line Result
    -    [6285, 236, 64, 64],
    -** Processing line: ~    [6222, 235, 64, 64],~
    +        "[#{x},#{y},#{w},#{h},'#{path}'],"
    +** Processing line: ~      end.join "\n"~
     - Inside source: true
     *** True Line Result
    -    [6222, 235, 64, 64],
    -** Processing line: ~    [6160, 235, 64, 64],~
    +      end.join "\n"
    +** Processing line: ~      export_string += "\n]\n\n"~
     - Inside source: true
     *** True Line Result
    -    [6160, 235, 64, 64],
    -** Processing line: ~    [6097, 236, 64, 64],~
    +      export_string += "\n]\n\n"
    +** Processing line: ~      gtk.write_file(MAP_FILE_PATH, export_string)~
     - Inside source: true
     *** True Line Result
    -    [6097, 236, 64, 64],
    -** Processing line: ~    [6069, 237, 64, 64],~
    +      gtk.write_file(MAP_FILE_PATH, export_string)
    +** Processing line: ~      state.map_saved_at = state.tick_count~
     - Inside source: true
     *** True Line Result
    -    [6069, 237, 64, 64],
    -** Processing line: ~    [6321, 174, 64, 64],~
    +      state.map_saved_at = state.tick_count
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    [6321, 174, 64, 64],
    -** Processing line: ~    [6318, 111, 64, 64],~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    [6318, 111, 64, 64],
    -** Processing line: ~    [6320, 49, 64, 64],~
    +
    +** Processing line: ~    def inputs_export_stage~
     - Inside source: true
     *** True Line Result
    -    [6320, 49, 64, 64],
    -** Processing line: ~    [6753, 291, 64, 64],~
    +    def inputs_export_stage
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    [6753, 291, 64, 64],
    -** Processing line: ~    [6752, 227, 64, 64],~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    [6752, 227, 64, 64],
    -** Processing line: ~    [6753, 192, 64, 64],~
    +
    +** Processing line: ~    def calc_score~
     - Inside source: true
     *** True Line Result
    -    [6753, 192, 64, 64],
    -** Processing line: ~    [6692, 191, 64, 64],~
    +    def calc_score
    +** Processing line: ~      return unless state.scene == :game~
     - Inside source: true
     *** True Line Result
    -    [6692, 191, 64, 64],
    -** Processing line: ~    [6668, 193, 64, 64],~
    +      return unless state.scene == :game
    +** Processing line: ~      player = [state.x, state.y, state.player_width, state.player_height]~
     - Inside source: true
     *** True Line Result
    -    [6668, 193, 64, 64],
    -** Processing line: ~    [6336, 604, 64, 64],~
    +      player = [state.x, state.y, state.player_width, state.player_height]
    +** Processing line: ~      collected = state.objects.find_all { |s| s.intersect_rect? player }~
     - Inside source: true
     *** True Line Result
    -    [6336, 604, 64, 64],
    -** Processing line: ~    [6309, 603, 64, 64],~
    +      collected = state.objects.find_all { |s| s.intersect_rect? player }
    +** Processing line: ~      state.stuff_score += collected.length~
     - Inside source: true
     *** True Line Result
    -    [6309, 603, 64, 64],
    -** Processing line: ~    [7264, 461, 64, 64],~
    +      state.stuff_score += collected.length
    +** Processing line: ~      if collected.length > 0~
     - Inside source: true
     *** True Line Result
    -    [7264, 461, 64, 64],
    -** Processing line: ~    [7264, 395, 64, 64],~
    +      if collected.length > 0
    +** Processing line: ~        outputs.sounds << 'sounds/collectable.wav'~
     - Inside source: true
     *** True Line Result
    -    [7264, 395, 64, 64],
    -** Processing line: ~    [7264, 333, 64, 64],~
    +        outputs.sounds << 'sounds/collectable.wav'
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    [7264, 333, 64, 64],
    -** Processing line: ~    [7264, 270, 64, 64],~
    +      end
    +** Processing line: ~      state.objects = state.objects.reject { |s| collected.include? s }~
     - Inside source: true
     *** True Line Result
    -    [7264, 270, 64, 64],
    -** Processing line: ~    [7265, 207, 64, 64],~
    +      state.objects = state.objects.reject { |s| collected.include? s }
    +** Processing line: ~      state.stuff_time += 0.01~
     - Inside source: true
     *** True Line Result
    -    [7265, 207, 64, 64],
    -** Processing line: ~    [7266, 138, 64, 64],~
    +      state.stuff_time += 0.01
    +** Processing line: ~      if state.objects.length == 0~
     - Inside source: true
     *** True Line Result
    -    [7266, 138, 64, 64],
    -** Processing line: ~    [7264, 78, 64, 64],~
    +      if state.objects.length == 0
    +** Processing line: ~        if !state.stuff_best_time || state.stuff_time < state.stuff_best_time~
     - Inside source: true
     *** True Line Result
    -    [7264, 78, 64, 64],
    -** Processing line: ~    [7266, 48, 64, 64],~
    +        if !state.stuff_best_time || state.stuff_time < state.stuff_best_time
    +** Processing line: ~          state.stuff_best_time = state.stuff_time~
     - Inside source: true
     *** True Line Result
    -    [7266, 48, 64, 64],
    -** Processing line: ~    [7582, 149, 64, 64],~
    +          state.stuff_best_time = state.stuff_time
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -    [7582, 149, 64, 64],
    -** Processing line: ~    [7524, 147, 64, 64],~
    +        end
    +** Processing line: ~        state.game_over_at = nil~
     - Inside source: true
     *** True Line Result
    -    [7524, 147, 64, 64],
    -** Processing line: ~    [7461, 146, 64, 64],~
    +        state.game_over_at = nil
    +** Processing line: ~        state.scene = :ending~
     - Inside source: true
     *** True Line Result
    -    [7461, 146, 64, 64],
    -** Processing line: ~    [7425, 148, 64, 64],~
    +        state.scene = :ending
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    [7425, 148, 64, 64],
    -** Processing line: ~    [7580, 86, 64, 64],~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    [7580, 86, 64, 64],
    -** Processing line: ~    [7582, 41, 64, 64],~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    [7582, 41, 64, 64],
    -** Processing line: ~    [7519, 41, 64, 64],~
    +
    +** Processing line: ~    def calc_on_floor~
     - Inside source: true
     *** True Line Result
    -    [7519, 41, 64, 64],
    -** Processing line: ~    [7460, 40, 64, 64],~
    +    def calc_on_floor
    +** Processing line: ~      if state.action == :anchored~
     - Inside source: true
     *** True Line Result
    -    [7460, 40, 64, 64],
    -** Processing line: ~    [7427, 96, 64, 64],~
    +      if state.action == :anchored
    +** Processing line: ~        state.on_floor = false~
     - Inside source: true
     *** True Line Result
    -    [7427, 96, 64, 64],
    -** Processing line: ~    [7427, 41, 64, 64],~
    +        state.on_floor = false
    +** Processing line: ~        state.on_floor_debounce = 30~
     - Inside source: true
     *** True Line Result
    -    [7427, 41, 64, 64],
    -** Processing line: ~    [8060, 288, 64, 64],~
    +        state.on_floor_debounce = 30
    +** Processing line: ~      else~
     - Inside source: true
     *** True Line Result
    -    [8060, 288, 64, 64],
    -** Processing line: ~    [8059, 226, 64, 64],~
    +      else
    +** Processing line: ~        state.on_floor_debounce ||= 30~
     - Inside source: true
     *** True Line Result
    -    [8059, 226, 64, 64],
    -** Processing line: ~    [8145, 194, 64, 64],~
    +        state.on_floor_debounce ||= 30
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    [8145, 194, 64, 64],
    -** Processing line: ~    [8081, 194, 64, 64],~
    +
    +** Processing line: ~        if state.dy.round != 0~
     - Inside source: true
     *** True Line Result
    -    [8081, 194, 64, 64],
    -** Processing line: ~    [8058, 195, 64, 64],~
    +        if state.dy.round != 0
    +** Processing line: ~          state.on_floor_debounce = 30~
     - Inside source: true
     *** True Line Result
    -    [8058, 195, 64, 64],
    -** Processing line: ~    [8485, 234, 64, 64],~
    +          state.on_floor_debounce = 30
    +** Processing line: ~          state.on_floor = false~
     - Inside source: true
     *** True Line Result
    -    [8485, 234, 64, 64],
    -** Processing line: ~    [8422, 235, 64, 64],~
    +          state.on_floor = false
    +** Processing line: ~        else~
     - Inside source: true
     *** True Line Result
    -    [8422, 235, 64, 64],
    -** Processing line: ~    [8360, 235, 64, 64],~
    +        else
    +** Processing line: ~          state.on_floor_debounce -= 1~
     - Inside source: true
     *** True Line Result
    -    [8360, 235, 64, 64],
    -** Processing line: ~    [8296, 235, 64, 64],~
    +          state.on_floor_debounce -= 1
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -    [8296, 235, 64, 64],
    -** Processing line: ~    [8266, 237, 64, 64],~
    +        end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    [8266, 237, 64, 64],
    -** Processing line: ~    [8371, 173, 64, 64],~
    +
    +** Processing line: ~        if state.on_floor_debounce <= 0~
     - Inside source: true
     *** True Line Result
    -    [8371, 173, 64, 64],
    -** Processing line: ~    [8370, 117, 64, 64],~
    +        if state.on_floor_debounce <= 0
    +** Processing line: ~          state.on_floor_debounce = 0~
     - Inside source: true
     *** True Line Result
    -    [8370, 117, 64, 64],
    -** Processing line: ~    [8372, 59, 64, 64],~
    +          state.on_floor_debounce = 0
    +** Processing line: ~          state.on_floor = true~
     - Inside source: true
     *** True Line Result
    -    [8372, 59, 64, 64],
    -** Processing line: ~    [8372, 51, 64, 64],~
    +          state.on_floor = true
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -    [8372, 51, 64, 64],
    -** Processing line: ~    [9147, 192, 64, 64],~
    +        end
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    [9147, 192, 64, 64],
    -** Processing line: ~    [9063, 287, 64, 64],~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    [9063, 287, 64, 64],
    -** Processing line: ~    [9064, 225, 64, 64],~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    [9064, 225, 64, 64],
    -** Processing line: ~    [9085, 193, 64, 64],~
    +
    +** Processing line: ~    def render_player~
     - Inside source: true
     *** True Line Result
    -    [9085, 193, 64, 64],
    -** Processing line: ~    [9063, 194, 64, 64],~
    +    def render_player
    +** Processing line: ~      path = "sprites/square-green.png"~
     - Inside source: true
     *** True Line Result
    -    [9063, 194, 64, 64],
    -** Processing line: ~    [9492, 234, 64, 64],~
    +      path = "sprites/square-green.png"
    +** Processing line: ~      angle = 0~
     - Inside source: true
     *** True Line Result
    -    [9492, 234, 64, 64],
    -** Processing line: ~    [9428, 234, 64, 64],~
    +      angle = 0
    +** Processing line: ~      # outputs.labels << [vx(state.x), vy(state.y) - 30, "dy: #{state.dy.round}"]~
     - Inside source: true
     *** True Line Result
    -    [9428, 234, 64, 64],
    -** Processing line: ~    [9365, 235, 64, 64],~
    +      # outputs.labels << [vx(state.x), vy(state.y) - 30, "dy: #{state.dy.round}"]
    +** Processing line: ~      if state.action == :idle~
     - Inside source: true
     *** True Line Result
    -    [9365, 235, 64, 64],
    -** Processing line: ~    [9302, 235, 64, 64],~
    +      if state.action == :idle
    +** Processing line: ~        # outputs.labels << [vx(state.x), vy(state.y), "IDLE"]~
     - Inside source: true
     *** True Line Result
    -    [9302, 235, 64, 64],
    -** Processing line: ~    [9270, 237, 64, 64],~
    +        # outputs.labels << [vx(state.x), vy(state.y), "IDLE"]
    +** Processing line: ~        path = "sprites/square-green.png"~
     - Inside source: true
     *** True Line Result
    -    [9270, 237, 64, 64],
    -** Processing line: ~    [9374, 172, 64, 64],~
    +        path = "sprites/square-green.png"
    +** Processing line: ~      elsif state.action == :aiming && !state.on_floor~
     - Inside source: true
     *** True Line Result
    -    [9374, 172, 64, 64],
    -** Processing line: ~    [9376, 109, 64, 64],~
    +      elsif state.action == :aiming && !state.on_floor
    +** Processing line: ~        # outputs.labels << [vx(state.x), vy(state.y), "AIMING AIR BORN"]~
     - Inside source: true
     *** True Line Result
    -    [9376, 109, 64, 64],
    -** Processing line: ~    [9377, 48, 64, 64],~
    +        # outputs.labels << [vx(state.x), vy(state.y), "AIMING AIR BORN"]
    +** Processing line: ~        angle = state.tongue_angle - 90~
     - Inside source: true
     *** True Line Result
    -    [9377, 48, 64, 64],
    -** Processing line: ~    [9545, 1060, 64, 64],~
    +        angle = state.tongue_angle - 90
    +** Processing line: ~        path = "sprites/square-green.png"~
     - Inside source: true
     *** True Line Result
    -    [9545, 1060, 64, 64],
    -** Processing line: ~    [9482, 1062, 64, 64],~
    +        path = "sprites/square-green.png"
    +** Processing line: ~      elsif state.action == :aiming # ON THE GROUND~
     - Inside source: true
     *** True Line Result
    -    [9482, 1062, 64, 64],
    -** Processing line: ~    [9423, 1062, 64, 64],~
    +      elsif state.action == :aiming # ON THE GROUND
    +** Processing line: ~        # outputs.labels << [vx(state.x), vy(state.y), "AIMING GROUND"]~
     - Inside source: true
     *** True Line Result
    -    [9423, 1062, 64, 64],
    -** Processing line: ~    [9387, 1062, 64, 64],~
    +        # outputs.labels << [vx(state.x), vy(state.y), "AIMING GROUND"]
    +** Processing line: ~        path = "sprites/square-green.png"~
     - Inside source: true
     *** True Line Result
    -    [9387, 1062, 64, 64],
    -** Processing line: ~    [9541, 999, 64, 64],~
    +        path = "sprites/square-green.png"
    +** Processing line: ~      elsif state.action == :shooting && !state.on_floor~
     - Inside source: true
     *** True Line Result
    -    [9541, 999, 64, 64],
    -** Processing line: ~    [9542, 953, 64, 64],~
    +      elsif state.action == :shooting && !state.on_floor
    +** Processing line: ~        # outputs.labels << [vx(state.x), vy(state.y), "SHOOTING AIR BORN"]~
     - Inside source: true
     *** True Line Result
    -    [9542, 953, 64, 64],
    -** Processing line: ~    [9478, 953, 64, 64],~
    +        # outputs.labels << [vx(state.x), vy(state.y), "SHOOTING AIR BORN"]
    +** Processing line: ~        path = "sprites/square-green.png"~
     - Inside source: true
     *** True Line Result
    -    [9478, 953, 64, 64],
    -** Processing line: ~    [9388, 999, 64, 64],~
    +        path = "sprites/square-green.png"
    +** Processing line: ~        angle = state.tongue_angle - 90~
     - Inside source: true
     *** True Line Result
    -    [9388, 999, 64, 64],
    -** Processing line: ~    [9414, 953, 64, 64],~
    +        angle = state.tongue_angle - 90
    +** Processing line: ~      elsif state.action == :shooting~
     - Inside source: true
     *** True Line Result
    -    [9414, 953, 64, 64],
    -** Processing line: ~    [9389, 953, 64, 64],~
    +      elsif state.action == :shooting
    +** Processing line: ~        # outputs.labels << [vx(state.x), vy(state.y), "SHOOTING ON GROUND"]~
     - Inside source: true
     *** True Line Result
    -    [9389, 953, 64, 64],
    -** Processing line: ~    [9294, 1194, 64, 64],~
    +        # outputs.labels << [vx(state.x), vy(state.y), "SHOOTING ON GROUND"]
    +** Processing line: ~        path = "sprites/square-green.png"~
     - Inside source: true
     *** True Line Result
    -    [9294, 1194, 64, 64],
    -** Processing line: ~    [9245, 1195, 64, 64],~
    +        path = "sprites/square-green.png"
    +** Processing line: ~      elsif state.action == :anchored~
     - Inside source: true
     *** True Line Result
    -    [9245, 1195, 64, 64],
    -** Processing line: ~    [9297, 1143, 64, 64],~
    +      elsif state.action == :anchored
    +** Processing line: ~        # outputs.labels << [vx(state.x), vy(state.y), "SWINGING"]~
     - Inside source: true
     *** True Line Result
    -    [9297, 1143, 64, 64],
    -** Processing line: ~    [9245, 1144, 64, 64],~
    +        # outputs.labels << [vx(state.x), vy(state.y), "SWINGING"]
    +** Processing line: ~        angle = state.tongue_angle - 90~
     - Inside source: true
     *** True Line Result
    -    [9245, 1144, 64, 64],
    -** Processing line: ~    [5575, 1781, 64, 64],~
    +        angle = state.tongue_angle - 90
    +** Processing line: ~        path = "sprites/square-green.png"~
     - Inside source: true
     *** True Line Result
    -    [5575, 1781, 64, 64],
    -** Processing line: ~    [5574, 1753, 64, 64],~
    +        path = "sprites/square-green.png"
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    [5574, 1753, 64, 64],
    -** Processing line: ~    [5522, 1782, 64, 64],~
    +      end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    [5522, 1782, 64, 64],
    -** Processing line: ~    [5518, 1753, 64, 64],~
    +
    +** Processing line: ~      outputs.sprites << [vx(state.x),~
     - Inside source: true
     *** True Line Result
    -    [5518, 1753, 64, 64],
    -** Processing line: ~    [5472, 1783, 64, 64],~
    +      outputs.sprites << [vx(state.x),
    +** Processing line: ~                          vy(state.y),~
     - Inside source: true
     *** True Line Result
    -    [5472, 1783, 64, 64],
    -** Processing line: ~    [5471, 1751, 64, 64],~
    +                          vy(state.y),
    +** Processing line: ~                          vw(state.player_width),~
     - Inside source: true
     *** True Line Result
    -    [5471, 1751, 64, 64],
    -** Processing line: ~    [5419, 1781, 64, 64],~
    +                          vw(state.player_width),
    +** Processing line: ~                          vh(state.player_height),~
     - Inside source: true
     *** True Line Result
    -    [5419, 1781, 64, 64],
    -** Processing line: ~    [5421, 1749, 64, 64],~
    +                          vh(state.player_height),
    +** Processing line: ~                          path,~
     - Inside source: true
     *** True Line Result
    -    [5421, 1749, 64, 64],
    -** Processing line: ~    [500, 3207, 64, 64],~
    +                          path,
    +** Processing line: ~                          angle]~
     - Inside source: true
     *** True Line Result
    -    [500, 3207, 64, 64],
    -** Processing line: ~    [477, 3205, 64, 64],~
    +                          angle]
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    [477, 3205, 64, 64],
    -** Processing line: ~    [1282, 3214, 64, 64],~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    [1282, 3214, 64, 64],
    -** Processing line: ~    [1221, 3214, 64, 64],~
    +
    +** Processing line: ~    def render_player_old~
     - Inside source: true
     *** True Line Result
    -    [1221, 3214, 64, 64],
    -** Processing line: ~    [1188, 3215, 64, 64],~
    +    def render_player_old
    +** Processing line: ~      # Player~
     - Inside source: true
     *** True Line Result
    -    [1188, 3215, 64, 64],
    -** Processing line: ~    [1345, 3103, 64, 64],~
    +      # Player
    +** Processing line: ~      if state.action == :aiming~
     - Inside source: true
     *** True Line Result
    -    [1345, 3103, 64, 64],
    -** Processing line: ~    [1288, 3103, 64, 64],~
    +      if state.action == :aiming
    +** Processing line: ~        path = 'sprites\frg\idle\frog_idle.png'~
     - Inside source: true
     *** True Line Result
    -    [1288, 3103, 64, 64],
    -** Processing line: ~    [1231, 3104, 64, 64],~
    +        path = 'sprites\frg\idle\frog_idle.png'
    +** Processing line: ~        if state.dx > 2~
     - Inside source: true
     *** True Line Result
    -    [1231, 3104, 64, 64],
    -** Processing line: ~    [1190, 3153, 64, 64],~
    +        if state.dx > 2
    +** Processing line: ~  	  #directional right sprite was here but i needa redo it~
     - Inside source: true
     *** True Line Result
    -    [1190, 3153, 64, 64],
    -** Processing line: ~    [1189, 3105, 64, 64],~
    +  	  #directional right sprite was here but i needa redo it
    +** Processing line: ~          path = 'sprites\frg\anchor\frog-anchor-0.png'~
     - Inside source: true
     *** True Line Result
    -    [1189, 3105, 64, 64],
    -** Processing line: ~    [2255, 3508, 64, 64],~
    +          path = 'sprites\frg\anchor\frog-anchor-0.png'
    +** Processing line: ~        #directional left sprite was here but i needa redo it~
     - Inside source: true
     *** True Line Result
    -    [2255, 3508, 64, 64],
    -** Processing line: ~    [2206, 3510, 64, 64],~
    +        #directional left sprite was here but i needa redo it
    +** Processing line: ~  	  elsif state.dx < -2~
     - Inside source: true
     *** True Line Result
    -    [2206, 3510, 64, 64],
    -** Processing line: ~    [2254, 3458, 64, 64],~
    +  	  elsif state.dx < -2
    +** Processing line: ~          path = 'sprites\frg\anchor\frog-anchor-0.png'~
     - Inside source: true
     *** True Line Result
    -    [2254, 3458, 64, 64],
    -** Processing line: ~    [2202, 3458, 64, 64],~
    +          path = 'sprites\frg\anchor\frog-anchor-0.png'
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -    [2202, 3458, 64, 64],
    -** Processing line: ~    [2754, 2930, 64, 64],~
    +        end
    +** Processing line: ~        outputs.sprites << [vx(state.x),~
     - Inside source: true
     *** True Line Result
    -    [2754, 2930, 64, 64],
    -** Processing line: ~    [2726, 2932, 64, 64],~
    +        outputs.sprites << [vx(state.x),
    +** Processing line: ~                            vy(state.y),~
     - Inside source: true
     *** True Line Result
    -    [2726, 2932, 64, 64],
    -** Processing line: ~    [3408, 2874, 64, 64],~
    +                            vy(state.y),
    +** Processing line: ~                            vw(state.player_width),~
     - Inside source: true
     *** True Line Result
    -    [3408, 2874, 64, 64],
    -** Processing line: ~    [3407, 2849, 64, 64],~
    +                            vw(state.player_width),
    +** Processing line: ~                            vh(state.player_height),~
     - Inside source: true
     *** True Line Result
    -    [3407, 2849, 64, 64],
    -** Processing line: ~    [3345, 2872, 64, 64],~
    +                            vh(state.player_height),
    +** Processing line: ~                            path,~
     - Inside source: true
     *** True Line Result
    -    [3345, 2872, 64, 64],
    -** Processing line: ~    [3342, 2847, 64, 64],~
    +                            path,
    +** Processing line: ~                            (state.tongue_angle - 90)]~
     - Inside source: true
     *** True Line Result
    -    [3342, 2847, 64, 64],
    -** Processing line: ~    [3284, 2874, 64, 64],~
    +                            (state.tongue_angle - 90)]
    +** Processing line: ~      elsif state.action == :anchored || state.action == :shooting~
     - Inside source: true
     *** True Line Result
    -    [3284, 2874, 64, 64],
    -** Processing line: ~    [3284, 2848, 64, 64],~
    +      elsif state.action == :anchored || state.action == :shooting
    +** Processing line: ~        outputs.sprites << [vx(state.x),~
     - Inside source: true
     *** True Line Result
    -    [3284, 2848, 64, 64],
    -** Processing line: ~    [3248, 2878, 64, 64],~
    +        outputs.sprites << [vx(state.x),
    +** Processing line: ~                            vy(state.y),~
     - Inside source: true
     *** True Line Result
    -    [3248, 2878, 64, 64],
    -** Processing line: ~    [3252, 2848, 64, 64],~
    +                            vy(state.y),
    +** Processing line: ~                            vw(state.player_width),~
     - Inside source: true
     *** True Line Result
    -    [3252, 2848, 64, 64],
    -** Processing line: ~    [3953, 3274, 64, 64],~
    +                            vw(state.player_width),
    +** Processing line: ~                            vw(state.player_height),~
     - Inside source: true
     *** True Line Result
    -    [3953, 3274, 64, 64],
    -** Processing line: ~    [3899, 3277, 64, 64],~
    +                            vw(state.player_height),
    +** Processing line: ~                            'sprites/animations_povfrog/frog_bwah_up.png',~
     - Inside source: true
     *** True Line Result
    -    [3899, 3277, 64, 64],
    -** Processing line: ~    [3951, 3222, 64, 64],~
    +                            'sprites/animations_povfrog/frog_bwah_up.png',
    +** Processing line: ~                            (state.tongue_angle - 90)]~
     - Inside source: true
     *** True Line Result
    -    [3951, 3222, 64, 64],
    -** Processing line: ~    [3900, 3222, 64, 64],~
    +                            (state.tongue_angle - 90)]
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    [3900, 3222, 64, 64],
    -** Processing line: ~    [4310, 2968, 64, 64],~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    [4310, 2968, 64, 64],
    -** Processing line: ~    [4246, 2969, 64, 64],~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    [4246, 2969, 64, 64],
    -** Processing line: ~    [4183, 2965, 64, 64],~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    [4183, 2965, 64, 64],
    -** Processing line: ~    [4153, 2967, 64, 64],~
    +
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    [4153, 2967, 64, 64],
    -** Processing line: ~    [4311, 2910, 64, 64],~
    +
    +** Processing line: ~  $game = CleptoFrog.new~
     - Inside source: true
     *** True Line Result
    -    [4311, 2910, 64, 64],
    -** Processing line: ~    [4308, 2856, 64, 64],~
    +  $game = CleptoFrog.new
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    [4308, 2856, 64, 64],
    -** Processing line: ~    [4251, 2855, 64, 64],~
    +
    +** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
    -    [4251, 2855, 64, 64],
    -** Processing line: ~    [4197, 2857, 64, 64],~
    +  def tick args
    +** Processing line: ~    if args.state.scene == :game~
     - Inside source: true
     *** True Line Result
    -    [4197, 2857, 64, 64],
    -** Processing line: ~    [5466, 3184, 64, 64],~
    +    if args.state.scene == :game
    +** Processing line: ~      tick_instructions args, "SPACE to SHOOT and RELEASE tongue. LEFT, RIGHT to SWING and BUILD momentum. MINIMAP in bottom right corner.", 360~
     - Inside source: true
     *** True Line Result
    -    [5466, 3184, 64, 64],
    -** Processing line: ~    [5466, 3158, 64, 64],~
    +      tick_instructions args, "SPACE to SHOOT and RELEASE tongue. LEFT, RIGHT to SWING and BUILD momentum. MINIMAP in bottom right corner.", 360
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    [5466, 3158, 64, 64],
    -** Processing line: ~    [5404, 3184, 64, 64],~
    +    end
    +** Processing line: ~    $game.args = args~
     - Inside source: true
     *** True Line Result
    -    [5404, 3184, 64, 64],
    -** Processing line: ~    [5404, 3156, 64, 64],~
    +    $game.args = args
    +** Processing line: ~    $game.tick~
     - Inside source: true
     *** True Line Result
    -    [5404, 3156, 64, 64],
    -** Processing line: ~    [5343, 3185, 64, 64],~
    +    $game.tick
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    [5343, 3185, 64, 64],
    -** Processing line: ~    [5342, 3156, 64, 64],~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    [5342, 3156, 64, 64],
    -** Processing line: ~    [5308, 3185, 64, 64],~
    +
    +** Processing line: ~  def tick_instructions args, text, y = 715~
     - Inside source: true
     *** True Line Result
    -    [5308, 3185, 64, 64],
    -** Processing line: ~    [5307, 3154, 64, 64],~
    +  def tick_instructions args, text, y = 715
    +** Processing line: ~    return if args.state.key_event_occurred~
     - Inside source: true
     *** True Line Result
    -    [5307, 3154, 64, 64],
    -** Processing line: ~    [6163, 2950, 64, 64],~
    +    return if args.state.key_event_occurred
    +** Processing line: ~    if args.inputs.keyboard.directional_vector || args.inputs.keyboard.key_down.space~
     - Inside source: true
     *** True Line Result
    -    [6163, 2950, 64, 64],
    -** Processing line: ~    [6111, 2952, 64, 64],~
    +    if args.inputs.keyboard.directional_vector || args.inputs.keyboard.key_down.space
    +** Processing line: ~      args.state.key_event_occurred = true~
     - Inside source: true
     *** True Line Result
    -    [6111, 2952, 64, 64],
    -** Processing line: ~    [6164, 2898, 64, 64],~
    +      args.state.key_event_occurred = true
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    [6164, 2898, 64, 64],
    -** Processing line: ~    [6113, 2897, 64, 64],~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    [6113, 2897, 64, 64],
    -** Processing line: ~    [7725, 3156, 64, 64],~
    +
    +** Processing line: ~    args.outputs.debug << [0, y - 50, 1280, 60].solid~
     - Inside source: true
     *** True Line Result
    -    [7725, 3156, 64, 64],
    -** Processing line: ~    [7661, 3157, 64, 64],~
    +    args.outputs.debug << [0, y - 50, 1280, 60].solid
    +** Processing line: ~    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label~
     - Inside source: true
     *** True Line Result
    -    [7661, 3157, 64, 64],
    -** Processing line: ~    [7598, 3157, 64, 64],~
    +    args.outputs.debug << [640, y, text, 1, 1, 255, 255, 255].label
    +** Processing line: ~    args.outputs.debug << [640, y - 25, "(SPACE to dismiss instructions)" , -2, 1, 255, 255, 255].label~
     - Inside source: true
     *** True Line Result
    -    [7598, 3157, 64, 64],
    -** Processing line: ~    [7533, 3156, 64, 64],~
    +    args.outputs.debug << [640, y - 25, "(SPACE to dismiss instructions)" , -2, 1, 255, 255, 255].label
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    [7533, 3156, 64, 64],
    -** Processing line: ~    [7468, 3156, 64, 64],~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    [7468, 3156, 64, 64],
    -** Processing line: ~    [7401, 3156, 64, 64],~
    -- Inside source: true
    +
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
     *** True Line Result
    -    [7401, 3156, 64, 64],
    -** Processing line: ~    [7335, 3157, 64, 64],~
    -- Inside source: true
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
     *** True Line Result
    -    [7335, 3157, 64, 64],
    -** Processing line: ~    [7270, 3157, 64, 64],~
    -- Inside source: true
    +
    +** Processing line: ~*** Platformer - Clepto Frog - map.rb~
    +- Header detected.
     *** True Line Result
    -    [7270, 3157, 64, 64],
    -** Processing line: ~    [7208, 3157, 64, 64],~
    -- Inside source: true
    +
     *** True Line Result
    -    [7208, 3157, 64, 64],
    -** Processing line: ~    [7146, 3157, 64, 64],~
    -- Inside source: true
    +*** Platformer - Clepto Frog - map.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
     *** True Line Result
    -    [7146, 3157, 64, 64],
    -** Processing line: ~    [7134, 3159, 64, 64],~
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/99_genre_platformer/clepto_frog/app/map.rb~
     - Inside source: true
     *** True Line Result
    -    [7134, 3159, 64, 64],
    -** Processing line: ~    [6685, 3726, 64, 64],~
    +  # ./samples/99_genre_platformer/clepto_frog/app/map.rb
    +** Processing line: ~  $collisions = [~
     - Inside source: true
     *** True Line Result
    -    [6685, 3726, 64, 64],
    -** Processing line: ~    [6685, 3663, 64, 64],~
    +  $collisions = [
    +** Processing line: ~    [326, 463, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [6685, 3663, 64, 64],
    -** Processing line: ~    [6683, 3602, 64, 64],~
    +    [326, 463, 64, 64],
    +** Processing line: ~    [274, 462, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [6683, 3602, 64, 64],
    -** Processing line: ~    [6679, 3538, 64, 64],~
    +    [274, 462, 64, 64],
    +** Processing line: ~    [326, 413, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [6679, 3538, 64, 64],
    -** Processing line: ~    [6680, 3474, 64, 64],~
    +    [326, 413, 64, 64],
    +** Processing line: ~    [275, 412, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [6680, 3474, 64, 64],
    -** Processing line: ~    [6682, 3413, 64, 64],~
    +    [275, 412, 64, 64],
    +** Processing line: ~    [124, 651, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [6682, 3413, 64, 64],
    -** Processing line: ~    [6681, 3347, 64, 64],~
    +    [124, 651, 64, 64],
    +** Processing line: ~    [72, 651, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [6681, 3347, 64, 64],
    -** Processing line: ~    [6681, 3287, 64, 64],~
    +    [72, 651, 64, 64],
    +** Processing line: ~    [124, 600, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [6681, 3287, 64, 64],
    -** Processing line: ~    [6682, 3223, 64, 64],~
    +    [124, 600, 64, 64],
    +** Processing line: ~    [69, 599, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [6682, 3223, 64, 64],
    -** Processing line: ~    [6683, 3161, 64, 64],~
    +    [69, 599, 64, 64],
    +** Processing line: ~    [501, 997, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [6683, 3161, 64, 64],
    -** Processing line: ~    [6682, 3102, 64, 64],~
    +    [501, 997, 64, 64],
    +** Processing line: ~    [476, 995, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [6682, 3102, 64, 64],
    -** Processing line: ~    [6684, 3042, 64, 64],~
    +    [476, 995, 64, 64],
    +** Processing line: ~    [3224, 2057, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [6684, 3042, 64, 64],
    -** Processing line: ~    [6685, 2980, 64, 64],~
    +    [3224, 2057, 64, 64],
    +** Processing line: ~    [3224, 1994, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [6685, 2980, 64, 64],
    -** Processing line: ~    [6685, 2920, 64, 64],~
    +    [3224, 1994, 64, 64],
    +** Processing line: ~    [3225, 1932, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [6685, 2920, 64, 64],
    -** Processing line: ~    [6683, 2859, 64, 64],~
    +    [3225, 1932, 64, 64],
    +** Processing line: ~    [3225, 1870, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [6683, 2859, 64, 64],
    -** Processing line: ~    [6684, 2801, 64, 64],~
    +    [3225, 1870, 64, 64],
    +** Processing line: ~    [3226, 1806, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [6684, 2801, 64, 64],
    -** Processing line: ~    [6686, 2743, 64, 64],~
    +    [3226, 1806, 64, 64],
    +** Processing line: ~    [3224, 1744, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [6686, 2743, 64, 64],
    -** Processing line: ~    [6683, 2683, 64, 64],~
    +    [3224, 1744, 64, 64],
    +** Processing line: ~    [3225, 1689, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [6683, 2683, 64, 64],
    -** Processing line: ~    [6681, 2622, 64, 64],~
    +    [3225, 1689, 64, 64],
    +** Processing line: ~    [3226, 1660, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [6681, 2622, 64, 64],
    -** Processing line: ~    [6682, 2559, 64, 64],~
    +    [3226, 1660, 64, 64],
    +** Processing line: ~    [3161, 1658, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [6682, 2559, 64, 64],
    -** Processing line: ~    [6683, 2498, 64, 64],~
    +    [3161, 1658, 64, 64],
    +** Processing line: ~    [3097, 1660, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [6683, 2498, 64, 64],
    -** Processing line: ~    [6685, 2434, 64, 64],~
    +    [3097, 1660, 64, 64],
    +** Processing line: ~    [3033, 1658, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [6685, 2434, 64, 64],
    -** Processing line: ~    [6683, 2371, 64, 64],~
    +    [3033, 1658, 64, 64],
    +** Processing line: ~    [2969, 1658, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [6683, 2371, 64, 64],
    -** Processing line: ~    [6683, 2306, 64, 64],~
    +    [2969, 1658, 64, 64],
    +** Processing line: ~    [2904, 1658, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [6683, 2306, 64, 64],
    -** Processing line: ~    [6684, 2242, 64, 64],~
    +    [2904, 1658, 64, 64],
    +** Processing line: ~    [2839, 1657, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [6684, 2242, 64, 64],
    -** Processing line: ~    [6683, 2177, 64, 64],~
    +    [2839, 1657, 64, 64],
    +** Processing line: ~    [2773, 1657, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [6683, 2177, 64, 64],
    -** Processing line: ~    [6683, 2112, 64, 64],~
    +    [2773, 1657, 64, 64],
    +** Processing line: ~    [2709, 1658, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [6683, 2112, 64, 64],
    -** Processing line: ~    [6683, 2049, 64, 64],~
    +    [2709, 1658, 64, 64],
    +** Processing line: ~    [2643, 1657, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [6683, 2049, 64, 64],
    -** Processing line: ~    [6683, 1985, 64, 64],~
    +    [2643, 1657, 64, 64],
    +** Processing line: ~    [2577, 1657, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [6683, 1985, 64, 64],
    -** Processing line: ~    [6682, 1923, 64, 64],~
    +    [2577, 1657, 64, 64],
    +** Processing line: ~    [2509, 1658, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [6682, 1923, 64, 64],
    -** Processing line: ~    [6683, 1860, 64, 64],~
    +    [2509, 1658, 64, 64],
    +** Processing line: ~    [2440, 1658, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [6683, 1860, 64, 64],
    -** Processing line: ~    [6685, 1797, 64, 64],~
    +    [2440, 1658, 64, 64],
    +** Processing line: ~    [2371, 1658, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [6685, 1797, 64, 64],
    -** Processing line: ~    [6684, 1735, 64, 64],~
    +    [2371, 1658, 64, 64],
    +** Processing line: ~    [2301, 1659, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [6684, 1735, 64, 64],
    -** Processing line: ~    [6685, 1724, 64, 64],~
    +    [2301, 1659, 64, 64],
    +** Processing line: ~    [2230, 1659, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [6685, 1724, 64, 64],
    -** Processing line: ~    [7088, 1967, 64, 64],~
    +    [2230, 1659, 64, 64],
    +** Processing line: ~    [2159, 1659, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [7088, 1967, 64, 64],
    -** Processing line: ~    [7026, 1966, 64, 64],~
    +    [2159, 1659, 64, 64],
    +** Processing line: ~    [2092, 1660, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [7026, 1966, 64, 64],
    -** Processing line: ~    [6964, 1967, 64, 64],~
    +    [2092, 1660, 64, 64],
    +** Processing line: ~    [2025, 1661, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [6964, 1967, 64, 64],
    -** Processing line: ~    [6900, 1965, 64, 64],~
    +    [2025, 1661, 64, 64],
    +** Processing line: ~    [1958, 1660, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [6900, 1965, 64, 64],
    -** Processing line: ~    [6869, 1969, 64, 64],~
    +    [1958, 1660, 64, 64],
    +** Processing line: ~    [1888, 1659, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [6869, 1969, 64, 64],
    -** Processing line: ~    [6972, 1904, 64, 64],~
    +    [1888, 1659, 64, 64],
    +** Processing line: ~    [1817, 1657, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [6972, 1904, 64, 64],
    -** Processing line: ~    [6974, 1840, 64, 64],~
    +    [1817, 1657, 64, 64],
    +** Processing line: ~    [1745, 1656, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [6974, 1840, 64, 64],
    -** Processing line: ~    [6971, 1776, 64, 64],~
    +    [1745, 1656, 64, 64],
    +** Processing line: ~    [1673, 1658, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [6971, 1776, 64, 64],
    -** Processing line: ~    [6971, 1716, 64, 64],~
    +    [1673, 1658, 64, 64],
    +** Processing line: ~    [1605, 1660, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [6971, 1716, 64, 64],
    -** Processing line: ~    [7168, 1979, 64, 64],~
    +    [1605, 1660, 64, 64],
    +** Processing line: ~    [1536, 1658, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [7168, 1979, 64, 64],
    -** Processing line: ~    [7170, 1919, 64, 64],~
    +    [1536, 1658, 64, 64],
    +** Processing line: ~    [1465, 1660, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [7170, 1919, 64, 64],
    -** Processing line: ~    [7169, 1882, 64, 64],~
    +    [1465, 1660, 64, 64],
    +** Processing line: ~    [1386, 1960, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [7169, 1882, 64, 64],
    -** Processing line: ~    [7115, 1880, 64, 64],~
    +    [1386, 1960, 64, 64],
    +** Processing line: ~    [1384, 1908, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [7115, 1880, 64, 64],
    -** Processing line: ~    [7086, 1881, 64, 64],~
    +    [1384, 1908, 64, 64],
    +** Processing line: ~    [1387, 1862, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [7086, 1881, 64, 64],
    -** Processing line: ~    [7725, 1837, 64, 64],~
    +    [1387, 1862, 64, 64],
    +** Processing line: ~    [1326, 1863, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [7725, 1837, 64, 64],
    -** Processing line: ~    [7724, 1776, 64, 64],~
    +    [1326, 1863, 64, 64],
    +** Processing line: ~    [1302, 1862, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [7724, 1776, 64, 64],
    -** Processing line: ~    [7724, 1728, 64, 64],~
    +    [1302, 1862, 64, 64],
    +** Processing line: ~    [1119, 1906, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [7724, 1728, 64, 64],
    -** Processing line: ~    [7661, 1727, 64, 64],~
    +    [1119, 1906, 64, 64],
    +** Processing line: ~    [1057, 1905, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [7661, 1727, 64, 64],
    -** Processing line: ~    [7603, 1728, 64, 64],~
    +    [1057, 1905, 64, 64],
    +** Processing line: ~    [994, 1905, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [7603, 1728, 64, 64],
    -** Processing line: ~    [7571, 1837, 64, 64],~
    +    [994, 1905, 64, 64],
    +** Processing line: ~    [937, 1904, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [7571, 1837, 64, 64],
    -** Processing line: ~    [7570, 1774, 64, 64],~
    +    [937, 1904, 64, 64],
    +** Processing line: ~    [896, 1904, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [7570, 1774, 64, 64],
    -** Processing line: ~    [7572, 1725, 64, 64],~
    +    [896, 1904, 64, 64],
    +** Processing line: ~    [1001, 1845, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [7572, 1725, 64, 64],
    -** Processing line: ~    [7859, 2134, 64, 64],~
    +    [1001, 1845, 64, 64],
    +** Processing line: ~    [1003, 1780, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [7859, 2134, 64, 64],
    -** Processing line: ~    [7858, 2070, 64, 64],~
    +    [1003, 1780, 64, 64],
    +** Processing line: ~    [1003, 1718, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [7858, 2070, 64, 64],
    -** Processing line: ~    [7858, 2008, 64, 64],~
    +    [1003, 1718, 64, 64],
    +** Processing line: ~    [692, 1958, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [7858, 2008, 64, 64],
    -** Processing line: ~    [7860, 1942, 64, 64],~
    +    [692, 1958, 64, 64],
    +** Processing line: ~    [691, 1900, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [7860, 1942, 64, 64],
    -** Processing line: ~    [7856, 1878, 64, 64],~
    +    [691, 1900, 64, 64],
    +** Processing line: ~    [774, 1861, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [7856, 1878, 64, 64],
    -** Processing line: ~    [7860, 1813, 64, 64],~
    +    [774, 1861, 64, 64],
    +** Processing line: ~    [712, 1861, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [7860, 1813, 64, 64],
    -** Processing line: ~    [7859, 1750, 64, 64],~
    +    [712, 1861, 64, 64],
    +** Processing line: ~    [691, 1863, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [7859, 1750, 64, 64],
    -** Processing line: ~    [7856, 1724, 64, 64],~
    +    [691, 1863, 64, 64],
    +** Processing line: ~    [325, 2133, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [7856, 1724, 64, 64],
    -** Processing line: ~    [8155, 1837, 64, 64],~
    +    [325, 2133, 64, 64],
    +** Processing line: ~    [275, 2134, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [8155, 1837, 64, 64],
    -** Processing line: ~    [8092, 1839, 64, 64],~
    +    [275, 2134, 64, 64],
    +** Processing line: ~    [326, 2082, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [8092, 1839, 64, 64],
    -** Processing line: ~    [8032, 1838, 64, 64],~
    +    [326, 2082, 64, 64],
    +** Processing line: ~    [275, 2082, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [8032, 1838, 64, 64],
    -** Processing line: ~    [7999, 1839, 64, 64],~
    +    [275, 2082, 64, 64],
    +** Processing line: ~    [124, 2321, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [7999, 1839, 64, 64],
    -** Processing line: ~    [8153, 1773, 64, 64],~
    +    [124, 2321, 64, 64],
    +** Processing line: ~    [71, 2320, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [8153, 1773, 64, 64],
    -** Processing line: ~    [8154, 1731, 64, 64],~
    +    [71, 2320, 64, 64],
    +** Processing line: ~    [123, 2267, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [8154, 1731, 64, 64],
    -** Processing line: ~    [8090, 1730, 64, 64],~
    +    [123, 2267, 64, 64],
    +** Processing line: ~    [71, 2268, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [8090, 1730, 64, 64],
    -** Processing line: ~    [8035, 1732, 64, 64],~
    +    [71, 2268, 64, 64],
    +** Processing line: ~    [2354, 1859, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [8035, 1732, 64, 64],
    -** Processing line: ~    [8003, 1776, 64, 64],~
    +    [2354, 1859, 64, 64],
    +** Processing line: ~    [2292, 1859, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [8003, 1776, 64, 64],
    -** Processing line: ~    [8003, 1730, 64, 64],~
    +    [2292, 1859, 64, 64],
    +** Processing line: ~    [2231, 1857, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [8003, 1730, 64, 64],
    -** Processing line: ~    [8421, 1978, 64, 64],~
    +    [2231, 1857, 64, 64],
    +** Processing line: ~    [2198, 1858, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [8421, 1978, 64, 64],
    -** Processing line: ~    [8420, 1917, 64, 64],~
    +    [2198, 1858, 64, 64],
    +** Processing line: ~    [2353, 1802, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [8420, 1917, 64, 64],
    -** Processing line: ~    [8505, 1878, 64, 64],~
    +    [2353, 1802, 64, 64],
    +** Processing line: ~    [2296, 1798, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [8505, 1878, 64, 64],
    -** Processing line: ~    [8443, 1881, 64, 64],~
    +    [2296, 1798, 64, 64],
    +** Processing line: ~    [2233, 1797, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [8443, 1881, 64, 64],
    -** Processing line: ~    [8420, 1882, 64, 64],~
    +    [2233, 1797, 64, 64],
    +** Processing line: ~    [2200, 1797, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [8420, 1882, 64, 64],
    -** Processing line: ~    [8847, 1908, 64, 64],~
    +    [2200, 1797, 64, 64],
    +** Processing line: ~    [2352, 1742, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [8847, 1908, 64, 64],
    -** Processing line: ~    [8783, 1908, 64, 64],~
    +    [2352, 1742, 64, 64],
    +** Processing line: ~    [2288, 1741, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [8783, 1908, 64, 64],
    -** Processing line: ~    [8718, 1910, 64, 64],~
    +    [2288, 1741, 64, 64],
    +** Processing line: ~    [2230, 1743, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [8718, 1910, 64, 64],
    -** Processing line: ~    [8654, 1910, 64, 64],~
    +    [2230, 1743, 64, 64],
    +** Processing line: ~    [2196, 1743, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [8654, 1910, 64, 64],
    -** Processing line: ~    [8628, 1911, 64, 64],~
    +    [2196, 1743, 64, 64],
    +** Processing line: ~    [1736, 460, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [8628, 1911, 64, 64],
    -** Processing line: ~    [8729, 1847, 64, 64],~
    +    [1736, 460, 64, 64],
    +** Processing line: ~    [1735, 400, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [8729, 1847, 64, 64],
    -** Processing line: ~    [8731, 1781, 64, 64],~
    +    [1735, 400, 64, 64],
    +** Processing line: ~    [1736, 339, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [8731, 1781, 64, 64],
    -** Processing line: ~    [8731, 1721, 64, 64],~
    +    [1736, 339, 64, 64],
    +** Processing line: ~    [1736, 275, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [8731, 1721, 64, 64],
    -** Processing line: ~    [9058, 2135, 64, 64],~
    +    [1736, 275, 64, 64],
    +** Processing line: ~    [1738, 210, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [9058, 2135, 64, 64],
    -** Processing line: ~    [9056, 2073, 64, 64],~
    +    [1738, 210, 64, 64],
    +** Processing line: ~    [1735, 145, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [9056, 2073, 64, 64],
    -** Processing line: ~    [9058, 2006, 64, 64],~
    +    [1735, 145, 64, 64],
    +** Processing line: ~    [1735, 87, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [9058, 2006, 64, 64],
    -** Processing line: ~    [9057, 1939, 64, 64],~
    +    [1735, 87, 64, 64],
    +** Processing line: ~    [1736, 51, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [9057, 1939, 64, 64],
    -** Processing line: ~    [9058, 1876, 64, 64],~
    +    [1736, 51, 64, 64],
    +** Processing line: ~    [539, 289, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [9058, 1876, 64, 64],
    -** Processing line: ~    [9056, 1810, 64, 64],~
    +    [539, 289, 64, 64],
    +** Processing line: ~    [541, 228, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [9056, 1810, 64, 64],
    -** Processing line: ~    [9059, 1745, 64, 64],~
    +    [541, 228, 64, 64],
    +** Processing line: ~    [626, 191, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [9059, 1745, 64, 64],
    -** Processing line: ~    [9060, 1722, 64, 64],~
    +    [626, 191, 64, 64],
    +** Processing line: ~    [572, 192, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [9060, 1722, 64, 64],
    -** Processing line: ~    [9273, 1977, 64, 64],~
    +    [572, 192, 64, 64],
    +** Processing line: ~    [540, 193, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [9273, 1977, 64, 64],
    -** Processing line: ~    [9273, 1912, 64, 64],~
    +    [540, 193, 64, 64],
    +** Processing line: ~    [965, 233, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [9273, 1912, 64, 64],
    -** Processing line: ~    [9358, 1883, 64, 64],~
    +    [965, 233, 64, 64],
    +** Processing line: ~    [904, 234, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [9358, 1883, 64, 64],
    -** Processing line: ~    [9298, 1881, 64, 64],~
    +    [904, 234, 64, 64],
    +** Processing line: ~    [840, 234, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [9298, 1881, 64, 64],
    -** Processing line: ~    [9270, 1883, 64, 64],~
    +    [840, 234, 64, 64],
    +** Processing line: ~    [779, 234, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [9270, 1883, 64, 64],
    -** Processing line: ~    [9699, 1910, 64, 64],~
    +    [779, 234, 64, 64],
    +** Processing line: ~    [745, 236, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [9699, 1910, 64, 64],
    -** Processing line: ~    [9637, 1910, 64, 64],~
    +    [745, 236, 64, 64],
    +** Processing line: ~    [851, 169, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [9637, 1910, 64, 64],
    -** Processing line: ~    [9576, 1910, 64, 64],~
    +    [851, 169, 64, 64],
    +** Processing line: ~    [849, 108, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [9576, 1910, 64, 64],
    -** Processing line: ~    [9512, 1911, 64, 64],~
    +    [849, 108, 64, 64],
    +** Processing line: ~    [852, 50, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [9512, 1911, 64, 64],
    -** Processing line: ~    [9477, 1912, 64, 64],~
    +    [852, 50, 64, 64],
    +** Processing line: ~    [1237, 289, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [9477, 1912, 64, 64],
    -** Processing line: ~    [9584, 1846, 64, 64],~
    +    [1237, 289, 64, 64],
    +** Processing line: ~    [1236, 228, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [9584, 1846, 64, 64],
    -** Processing line: ~    [9585, 1783, 64, 64],~
    +    [1236, 228, 64, 64],
    +** Processing line: ~    [1238, 197, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [9585, 1783, 64, 64],
    -** Processing line: ~    [9586, 1719, 64, 64],~
    +    [1238, 197, 64, 64],
    +** Processing line: ~    [1181, 192, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [9586, 1719, 64, 64],
    -** Processing line: ~    [8320, 2788, 64, 64],~
    +    [1181, 192, 64, 64],
    +** Processing line: ~    [1152, 192, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [8320, 2788, 64, 64],
    -** Processing line: ~    [8256, 2789, 64, 64],~
    +    [1152, 192, 64, 64],
    +** Processing line: ~    [1443, 605, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [8256, 2789, 64, 64],
    -** Processing line: ~    [8192, 2789, 64, 64],~
    +    [1443, 605, 64, 64],
    +** Processing line: ~    [1419, 606, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [8192, 2789, 64, 64],
    -** Processing line: ~    [8180, 2789, 64, 64],~
    +    [1419, 606, 64, 64],
    +** Processing line: ~    [1069, 925, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [8180, 2789, 64, 64],
    -** Processing line: ~    [8319, 2730, 64, 64],~
    +    [1069, 925, 64, 64],
    +** Processing line: ~    [1068, 902, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [8319, 2730, 64, 64],
    -** Processing line: ~    [8319, 2671, 64, 64],~
    +    [1068, 902, 64, 64],
    +** Processing line: ~    [1024, 927, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [8319, 2671, 64, 64],
    -** Processing line: ~    [8319, 2639, 64, 64],~
    +    [1024, 927, 64, 64],
    +** Processing line: ~    [1017, 897, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [8319, 2639, 64, 64],
    -** Processing line: ~    [8259, 2639, 64, 64],~
    +    [1017, 897, 64, 64],
    +** Processing line: ~    [963, 926, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [8259, 2639, 64, 64],
    -** Processing line: ~    [8202, 2639, 64, 64],~
    +    [963, 926, 64, 64],
    +** Processing line: ~    [958, 898, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [8202, 2639, 64, 64],
    -** Processing line: ~    [8179, 2727, 64, 64],~
    +    [958, 898, 64, 64],
    +** Processing line: ~    [911, 928, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [8179, 2727, 64, 64],
    -** Processing line: ~    [8178, 2665, 64, 64],~
    +    [911, 928, 64, 64],
    +** Processing line: ~    [911, 896, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [8178, 2665, 64, 64],
    -** Processing line: ~    [8177, 2636, 64, 64],~
    +    [911, 896, 64, 64],
    +** Processing line: ~    [2132, 803, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [8177, 2636, 64, 64],
    -** Processing line: ~    [9360, 3138, 64, 64],~
    +    [2132, 803, 64, 64],
    +** Processing line: ~    [2081, 803, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [9360, 3138, 64, 64],
    -** Processing line: ~    [9296, 3137, 64, 64],~
    +    [2081, 803, 64, 64],
    +** Processing line: ~    [2131, 752, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [9296, 3137, 64, 64],
    -** Processing line: ~    [9235, 3139, 64, 64],~
    +    [2131, 752, 64, 64],
    +** Processing line: ~    [2077, 751, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [9235, 3139, 64, 64],
    -** Processing line: ~    [9174, 3139, 64, 64],~
    +    [2077, 751, 64, 64],
    +** Processing line: ~    [2615, 649, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [9174, 3139, 64, 64],
    -** Processing line: ~    [9113, 3138, 64, 64],~
    +    [2615, 649, 64, 64],
    +** Processing line: ~    [2564, 651, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [9113, 3138, 64, 64],
    -** Processing line: ~    [9050, 3138, 64, 64],~
    +    [2564, 651, 64, 64],
    +** Processing line: ~    [2533, 650, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [9050, 3138, 64, 64],
    -** Processing line: ~    [8988, 3138, 64, 64],~
    +    [2533, 650, 64, 64],
    +** Processing line: ~    [2027, 156, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [8988, 3138, 64, 64],
    -** Processing line: ~    [8925, 3138, 64, 64],~
    +    [2027, 156, 64, 64],
    +** Processing line: ~    [1968, 155, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [8925, 3138, 64, 64],
    -** Processing line: ~    [8860, 3136, 64, 64],~
    +    [1968, 155, 64, 64],
    +** Processing line: ~    [1907, 153, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [8860, 3136, 64, 64],
    -** Processing line: ~    [8797, 3136, 64, 64],~
    +    [1907, 153, 64, 64],
    +** Processing line: ~    [1873, 155, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [8797, 3136, 64, 64],
    -** Processing line: ~    [8770, 3138, 64, 64],~
    +    [1873, 155, 64, 64],
    +** Processing line: ~    [2025, 95, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [8770, 3138, 64, 64],
    -** Processing line: ~    [8827, 4171, 64, 64],~
    +    [2025, 95, 64, 64],
    +** Processing line: ~    [1953, 98, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [8827, 4171, 64, 64],
    -** Processing line: ~    [8827, 4107, 64, 64],~
    +    [1953, 98, 64, 64],
    +** Processing line: ~    [1894, 100, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [8827, 4107, 64, 64],
    -** Processing line: ~    [8827, 4043, 64, 64],~
    +    [1894, 100, 64, 64],
    +** Processing line: ~    [1870, 100, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [8827, 4043, 64, 64],
    -** Processing line: ~    [8827, 3978, 64, 64],~
    +    [1870, 100, 64, 64],
    +** Processing line: ~    [2029, 45, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [8827, 3978, 64, 64],
    -** Processing line: ~    [8825, 3914, 64, 64],~
    +    [2029, 45, 64, 64],
    +** Processing line: ~    [1971, 48, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [8825, 3914, 64, 64],
    -** Processing line: ~    [8824, 3858, 64, 64],~
    +    [1971, 48, 64, 64],
    +** Processing line: ~    [1915, 47, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [8824, 3858, 64, 64],
    -** Processing line: ~    [9635, 4234, 64, 64],~
    +    [1915, 47, 64, 64],
    +** Processing line: ~    [1873, 47, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [9635, 4234, 64, 64],
    -** Processing line: ~    [9584, 4235, 64, 64],~
    +    [1873, 47, 64, 64],
    +** Processing line: ~    [3956, 288, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [9584, 4235, 64, 64],
    -** Processing line: ~    [9634, 4187, 64, 64],~
    +    [3956, 288, 64, 64],
    +** Processing line: ~    [3954, 234, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [9634, 4187, 64, 64],
    -** Processing line: ~    [9582, 4183, 64, 64],~
    +    [3954, 234, 64, 64],
    +** Processing line: ~    [4042, 190, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [9582, 4183, 64, 64],
    -** Processing line: ~    [9402, 5114, 64, 64],~
    +    [4042, 190, 64, 64],
    +** Processing line: ~    [3990, 190, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [9402, 5114, 64, 64],
    -** Processing line: ~    [9402, 5087, 64, 64],~
    +    [3990, 190, 64, 64],
    +** Processing line: ~    [3958, 195, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [9402, 5087, 64, 64],
    -** Processing line: ~    [9347, 5113, 64, 64],~
    +    [3958, 195, 64, 64],
    +** Processing line: ~    [3422, 709, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [9347, 5113, 64, 64],
    -** Processing line: ~    [9345, 5086, 64, 64],~
    +    [3422, 709, 64, 64],
    +** Processing line: ~    [3425, 686, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [9345, 5086, 64, 64],
    -** Processing line: ~    [9287, 5114, 64, 64],~
    +    [3425, 686, 64, 64],
    +** Processing line: ~    [3368, 709, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [9287, 5114, 64, 64],
    -** Processing line: ~    [9285, 5085, 64, 64],~
    +    [3368, 709, 64, 64],
    +** Processing line: ~    [3364, 683, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [9285, 5085, 64, 64],
    -** Processing line: ~    [9245, 5114, 64, 64],~
    +    [3364, 683, 64, 64],
    +** Processing line: ~    [3312, 711, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [9245, 5114, 64, 64],
    -** Processing line: ~    [9244, 5086, 64, 64],~
    +    [3312, 711, 64, 64],
    +** Processing line: ~    [3307, 684, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [9244, 5086, 64, 64],
    -** Processing line: ~    [9336, 5445, 64, 64],~
    +    [3307, 684, 64, 64],
    +** Processing line: ~    [3266, 712, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [9336, 5445, 64, 64],
    -** Processing line: ~    [9285, 5445, 64, 64],~
    +    [3266, 712, 64, 64],
    +** Processing line: ~    [3269, 681, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [9285, 5445, 64, 64],
    -** Processing line: ~    [9337, 5395, 64, 64],~
    +    [3269, 681, 64, 64],
    +** Processing line: ~    [4384, 236, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [9337, 5395, 64, 64],
    -** Processing line: ~    [9283, 5393, 64, 64],~
    +    [4384, 236, 64, 64],
    +** Processing line: ~    [4320, 234, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [9283, 5393, 64, 64],
    -** Processing line: ~    [8884, 4968, 64, 64],~
    +    [4320, 234, 64, 64],
    +** Processing line: ~    [4257, 235, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [8884, 4968, 64, 64],
    -** Processing line: ~    [8884, 4939, 64, 64],~
    +    [4257, 235, 64, 64],
    +** Processing line: ~    [4192, 234, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [8884, 4939, 64, 64],
    -** Processing line: ~    [8822, 4967, 64, 64],~
    +    [4192, 234, 64, 64],
    +** Processing line: ~    [4162, 234, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [8822, 4967, 64, 64],
    -** Processing line: ~    [8823, 4940, 64, 64],~
    +    [4162, 234, 64, 64],
    +** Processing line: ~    [4269, 171, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [8823, 4940, 64, 64],
    -** Processing line: ~    [8765, 4967, 64, 64],~
    +    [4269, 171, 64, 64],
    +** Processing line: ~    [4267, 111, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [8765, 4967, 64, 64],
    -** Processing line: ~    [8762, 4937, 64, 64],~
    +    [4267, 111, 64, 64],
    +** Processing line: ~    [4266, 52, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [8762, 4937, 64, 64],
    -** Processing line: ~    [8726, 4969, 64, 64],~
    +    [4266, 52, 64, 64],
    +** Processing line: ~    [4580, 458, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [8726, 4969, 64, 64],
    -** Processing line: ~    [8727, 4939, 64, 64],~
    +    [4580, 458, 64, 64],
    +** Processing line: ~    [4582, 396, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [8727, 4939, 64, 64],
    -** Processing line: ~    [7946, 5248, 64, 64],~
    +    [4582, 396, 64, 64],
    +** Processing line: ~    [4582, 335, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [7946, 5248, 64, 64],
    -** Processing line: ~    [7945, 5220, 64, 64],~
    +    [4582, 335, 64, 64],
    +** Processing line: ~    [4581, 275, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [7945, 5220, 64, 64],
    -** Processing line: ~    [7887, 5248, 64, 64],~
    +    [4581, 275, 64, 64],
    +** Processing line: ~    [4581, 215, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [7887, 5248, 64, 64],
    -** Processing line: ~    [7886, 5219, 64, 64],~
    +    [4581, 215, 64, 64],
    +** Processing line: ~    [4581, 152, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [7886, 5219, 64, 64],
    -** Processing line: ~    [7830, 5248, 64, 64],~
    +    [4581, 152, 64, 64],
    +** Processing line: ~    [4582, 89, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [7830, 5248, 64, 64],
    -** Processing line: ~    [7827, 5218, 64, 64],~
    +    [4582, 89, 64, 64],
    +** Processing line: ~    [4583, 51, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [7827, 5218, 64, 64],
    -** Processing line: ~    [7781, 5248, 64, 64],~
    +    [4583, 51, 64, 64],
    +** Processing line: ~    [4810, 289, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [7781, 5248, 64, 64],
    -** Processing line: ~    [7781, 5216, 64, 64],~
    +    [4810, 289, 64, 64],
    +** Processing line: ~    [4810, 227, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [7781, 5216, 64, 64],
    -** Processing line: ~    [6648, 4762, 64, 64],~
    +    [4810, 227, 64, 64],
    +** Processing line: ~    [4895, 189, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [6648, 4762, 64, 64],
    -** Processing line: ~    [6621, 4761, 64, 64],~
    +    [4895, 189, 64, 64],
    +** Processing line: ~    [4844, 191, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [6621, 4761, 64, 64],
    -** Processing line: ~    [5011, 4446, 64, 64],~
    +    [4844, 191, 64, 64],
    +** Processing line: ~    [4809, 191, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [5011, 4446, 64, 64],
    -** Processing line: ~    [4982, 4444, 64, 64],~
    +    [4809, 191, 64, 64],
    +** Processing line: ~    [5235, 233, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [4982, 4444, 64, 64],
    -** Processing line: ~    [4146, 4641, 64, 64],~
    +    [5235, 233, 64, 64],
    +** Processing line: ~    [5176, 232, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [4146, 4641, 64, 64],
    -** Processing line: ~    [4092, 4643, 64, 64],~
    +    [5176, 232, 64, 64],
    +** Processing line: ~    [5118, 230, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [4092, 4643, 64, 64],
    -** Processing line: ~    [4145, 4589, 64, 64],~
    +    [5118, 230, 64, 64],
    +** Processing line: ~    [5060, 232, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [4145, 4589, 64, 64],
    -** Processing line: ~    [4091, 4590, 64, 64],~
    +    [5060, 232, 64, 64],
    +** Processing line: ~    [5015, 237, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [4091, 4590, 64, 64],
    -** Processing line: ~    [4139, 4497, 64, 64],~
    +    [5015, 237, 64, 64],
    +** Processing line: ~    [5123, 171, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [4139, 4497, 64, 64],
    -** Processing line: ~    [4135, 4437, 64, 64],~
    +    [5123, 171, 64, 64],
    +** Processing line: ~    [5123, 114, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [4135, 4437, 64, 64],
    -** Processing line: ~    [4135, 4383, 64, 64],~
    +    [5123, 114, 64, 64],
    +** Processing line: ~    [5121, 51, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [4135, 4383, 64, 64],
    -** Processing line: ~    [4078, 4495, 64, 64],~
    +    [5121, 51, 64, 64],
    +** Processing line: ~    [5523, 461, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [4078, 4495, 64, 64],
    -** Processing line: ~    [4014, 4494, 64, 64],~
    +    [5523, 461, 64, 64],
    +** Processing line: ~    [5123, 42, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [4014, 4494, 64, 64],
    -** Processing line: ~    [3979, 4496, 64, 64],~
    +    [5123, 42, 64, 64],
    +** Processing line: ~    [5525, 401, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [3979, 4496, 64, 64],
    -** Processing line: ~    [4074, 4384, 64, 64],~
    +    [5525, 401, 64, 64],
    +** Processing line: ~    [5525, 340, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [4074, 4384, 64, 64],
    -** Processing line: ~    [4015, 4381, 64, 64],~
    +    [5525, 340, 64, 64],
    +** Processing line: ~    [5526, 273, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [4015, 4381, 64, 64],
    -** Processing line: ~    [3980, 4433, 64, 64],~
    +    [5526, 273, 64, 64],
    +** Processing line: ~    [5527, 211, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [3980, 4433, 64, 64],
    -** Processing line: ~    [3981, 4384, 64, 64],~
    +    [5527, 211, 64, 64],
    +** Processing line: ~    [5525, 150, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [3981, 4384, 64, 64],
    -** Processing line: ~    [3276, 4279, 64, 64],~
    +    [5525, 150, 64, 64],
    +** Processing line: ~    [5527, 84, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [3276, 4279, 64, 64],
    -** Processing line: ~    [3275, 4218, 64, 64],~
    +    [5527, 84, 64, 64],
    +** Processing line: ~    [5524, 44, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [3275, 4218, 64, 64],
    -** Processing line: ~    [3276, 4170, 64, 64],~
    +    [5524, 44, 64, 64],
    +** Processing line: ~    [5861, 288, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [3276, 4170, 64, 64],
    -** Processing line: ~    [3211, 4164, 64, 64],~
    +    [5861, 288, 64, 64],
    +** Processing line: ~    [5861, 229, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [3211, 4164, 64, 64],
    -** Processing line: ~    [3213, 4280, 64, 64],~
    +    [5861, 229, 64, 64],
    +** Processing line: ~    [5945, 193, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [3213, 4280, 64, 64],
    -** Processing line: ~    [3156, 4278, 64, 64],~
    +    [5945, 193, 64, 64],
    +** Processing line: ~    [5904, 193, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [3156, 4278, 64, 64],
    -** Processing line: ~    [3120, 4278, 64, 64],~
    +    [5904, 193, 64, 64],
    +** Processing line: ~    [5856, 194, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [3120, 4278, 64, 64],
    -** Processing line: ~    [3151, 4163, 64, 64],~
    +    [5856, 194, 64, 64],
    +** Processing line: ~    [6542, 234, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [3151, 4163, 64, 64],
    -** Processing line: ~    [3120, 4216, 64, 64],~
    +    [6542, 234, 64, 64],
    +** Processing line: ~    [6478, 235, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [3120, 4216, 64, 64],
    -** Processing line: ~    [3120, 4161, 64, 64],~
    +    [6478, 235, 64, 64],
    +** Processing line: ~    [6413, 238, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [3120, 4161, 64, 64],
    -** Processing line: ~    [1536, 4171, 64, 64],~
    +    [6413, 238, 64, 64],
    +** Processing line: ~    [6348, 235, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [1536, 4171, 64, 64],
    -** Processing line: ~    [1536, 4110, 64, 64],~
    +    [6348, 235, 64, 64],
    +** Processing line: ~    [6285, 236, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [1536, 4110, 64, 64],
    -** Processing line: ~    [1535, 4051, 64, 64],~
    +    [6285, 236, 64, 64],
    +** Processing line: ~    [6222, 235, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [1535, 4051, 64, 64],
    -** Processing line: ~    [1536, 3991, 64, 64],~
    +    [6222, 235, 64, 64],
    +** Processing line: ~    [6160, 235, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [1536, 3991, 64, 64],
    -** Processing line: ~    [1536, 3928, 64, 64],~
    +    [6160, 235, 64, 64],
    +** Processing line: ~    [6097, 236, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [1536, 3928, 64, 64],
    -** Processing line: ~    [1536, 3863, 64, 64],~
    +    [6097, 236, 64, 64],
    +** Processing line: ~    [6069, 237, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [1536, 3863, 64, 64],
    -** Processing line: ~    [1078, 4605, 64, 64],~
    +    [6069, 237, 64, 64],
    +** Processing line: ~    [6321, 174, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [1078, 4605, 64, 64],
    -** Processing line: ~    [1076, 4577, 64, 64],~
    +    [6321, 174, 64, 64],
    +** Processing line: ~    [6318, 111, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [1076, 4577, 64, 64],
    -** Processing line: ~    [1018, 4604, 64, 64],~
    +    [6318, 111, 64, 64],
    +** Processing line: ~    [6320, 49, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [1018, 4604, 64, 64],
    -** Processing line: ~    [1018, 4575, 64, 64],~
    +    [6320, 49, 64, 64],
    +** Processing line: ~    [6753, 291, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [1018, 4575, 64, 64],
    -** Processing line: ~    [957, 4606, 64, 64],~
    +    [6753, 291, 64, 64],
    +** Processing line: ~    [6752, 227, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [957, 4606, 64, 64],
    -** Processing line: ~    [960, 4575, 64, 64],~
    +    [6752, 227, 64, 64],
    +** Processing line: ~    [6753, 192, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [960, 4575, 64, 64],
    -** Processing line: ~    [918, 4602, 64, 64],~
    +    [6753, 192, 64, 64],
    +** Processing line: ~    [6692, 191, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [918, 4602, 64, 64],
    -** Processing line: ~    [918, 4580, 64, 64],~
    +    [6692, 191, 64, 64],
    +** Processing line: ~    [6668, 193, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [918, 4580, 64, 64],
    -** Processing line: ~    [394, 4164, 64, 64],~
    +    [6668, 193, 64, 64],
    +** Processing line: ~    [6336, 604, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [394, 4164, 64, 64],
    -** Processing line: ~    [335, 4163, 64, 64],~
    +    [6336, 604, 64, 64],
    +** Processing line: ~    [6309, 603, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [335, 4163, 64, 64],
    -** Processing line: ~    [274, 4161, 64, 64],~
    +    [6309, 603, 64, 64],
    +** Processing line: ~    [7264, 461, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [274, 4161, 64, 64],
    -** Processing line: ~    [236, 4163, 64, 64],~
    +    [7264, 461, 64, 64],
    +** Processing line: ~    [7264, 395, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [236, 4163, 64, 64],
    -** Processing line: ~    [394, 4140, 64, 64],~
    +    [7264, 395, 64, 64],
    +** Processing line: ~    [7264, 333, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [394, 4140, 64, 64],
    -** Processing line: ~    [329, 4139, 64, 64],~
    +    [7264, 333, 64, 64],
    +** Processing line: ~    [7264, 270, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [329, 4139, 64, 64],
    -** Processing line: ~    [268, 4139, 64, 64],~
    +    [7264, 270, 64, 64],
    +** Processing line: ~    [7265, 207, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [268, 4139, 64, 64],
    -** Processing line: ~    [239, 4139, 64, 64],~
    +    [7265, 207, 64, 64],
    +** Processing line: ~    [7266, 138, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [239, 4139, 64, 64],
    -** Processing line: ~    [4326, 5073, 64, 64],~
    +    [7266, 138, 64, 64],
    +** Processing line: ~    [7264, 78, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [4326, 5073, 64, 64],
    -** Processing line: ~    [4324, 5042, 64, 64],~
    +    [7264, 78, 64, 64],
    +** Processing line: ~    [7266, 48, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [4324, 5042, 64, 64],
    -** Processing line: ~    [4265, 5074, 64, 64],~
    +    [7266, 48, 64, 64],
    +** Processing line: ~    [7582, 149, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [4265, 5074, 64, 64],
    -** Processing line: ~    [4263, 5042, 64, 64],~
    +    [7582, 149, 64, 64],
    +** Processing line: ~    [7524, 147, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [4263, 5042, 64, 64],
    -** Processing line: ~    [4214, 5072, 64, 64],~
    +    [7524, 147, 64, 64],
    +** Processing line: ~    [7461, 146, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [4214, 5072, 64, 64],
    -** Processing line: ~    [4211, 5043, 64, 64],~
    +    [7461, 146, 64, 64],
    +** Processing line: ~    [7425, 148, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [4211, 5043, 64, 64],
    -** Processing line: ~    [4166, 5073, 64, 64],~
    +    [7425, 148, 64, 64],
    +** Processing line: ~    [7580, 86, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [4166, 5073, 64, 64],
    -** Processing line: ~    [4164, 5041, 64, 64],~
    +    [7580, 86, 64, 64],
    +** Processing line: ~    [7582, 41, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [4164, 5041, 64, 64],
    -** Processing line: ~    [4844, 5216, 64, 64],~
    +    [7582, 41, 64, 64],
    +** Processing line: ~    [7519, 41, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [4844, 5216, 64, 64],
    -** Processing line: ~    [4844, 5189, 64, 64],~
    +    [7519, 41, 64, 64],
    +** Processing line: ~    [7460, 40, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [4844, 5189, 64, 64],
    -** Processing line: ~    [4785, 5217, 64, 64],~
    +    [7460, 40, 64, 64],
    +** Processing line: ~    [7427, 96, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [4785, 5217, 64, 64],
    -** Processing line: ~    [4790, 5187, 64, 64],~
    +    [7427, 96, 64, 64],
    +** Processing line: ~    [7427, 41, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [4790, 5187, 64, 64],
    -** Processing line: ~    [4726, 5219, 64, 64],~
    +    [7427, 41, 64, 64],
    +** Processing line: ~    [8060, 288, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [4726, 5219, 64, 64],
    -** Processing line: ~    [4728, 5185, 64, 64],~
    +    [8060, 288, 64, 64],
    +** Processing line: ~    [8059, 226, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [4728, 5185, 64, 64],
    -** Processing line: ~    [4681, 5218, 64, 64],~
    +    [8059, 226, 64, 64],
    +** Processing line: ~    [8145, 194, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [4681, 5218, 64, 64],
    -** Processing line: ~    [4684, 5186, 64, 64],~
    +    [8145, 194, 64, 64],
    +** Processing line: ~    [8081, 194, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [4684, 5186, 64, 64],
    -** Processing line: ~    [4789, 4926, 64, 64],~
    +    [8081, 194, 64, 64],
    +** Processing line: ~    [8058, 195, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [4789, 4926, 64, 64],
    -** Processing line: ~    [4734, 4928, 64, 64],~
    +    [8058, 195, 64, 64],
    +** Processing line: ~    [8485, 234, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [4734, 4928, 64, 64],
    -** Processing line: ~    [4787, 4876, 64, 64],~
    +    [8485, 234, 64, 64],
    +** Processing line: ~    [8422, 235, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [4787, 4876, 64, 64],
    -** Processing line: ~    [4738, 4874, 64, 64],~
    +    [8422, 235, 64, 64],
    +** Processing line: ~    [8360, 235, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [4738, 4874, 64, 64],
    -** Processing line: ~    [4775, 5548, 64, 64],~
    +    [8360, 235, 64, 64],
    +** Processing line: ~    [8296, 235, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [4775, 5548, 64, 64],
    -** Processing line: ~    [4775, 5495, 64, 64],~
    +    [8296, 235, 64, 64],
    +** Processing line: ~    [8266, 237, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [4775, 5495, 64, 64],
    -** Processing line: ~    [4723, 5550, 64, 64],~
    +    [8266, 237, 64, 64],
    +** Processing line: ~    [8371, 173, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [4723, 5550, 64, 64],
    -** Processing line: ~    [4725, 5494, 64, 64],~
    +    [8371, 173, 64, 64],
    +** Processing line: ~    [8370, 117, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [4725, 5494, 64, 64],
    -** Processing line: ~    [1360, 5269, 64, 64],~
    +    [8370, 117, 64, 64],
    +** Processing line: ~    [8372, 59, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [1360, 5269, 64, 64],
    -** Processing line: ~    [1362, 5218, 64, 64],~
    +    [8372, 59, 64, 64],
    +** Processing line: ~    [8372, 51, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [1362, 5218, 64, 64],
    -** Processing line: ~    [1315, 5266, 64, 64],~
    +    [8372, 51, 64, 64],
    +** Processing line: ~    [9147, 192, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [1315, 5266, 64, 64],
    -** Processing line: ~    [1282, 5266, 64, 64],~
    +    [9147, 192, 64, 64],
    +** Processing line: ~    [9063, 287, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [1282, 5266, 64, 64],
    -** Processing line: ~    [1246, 5311, 64, 64],~
    +    [9063, 287, 64, 64],
    +** Processing line: ~    [9064, 225, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [1246, 5311, 64, 64],
    -** Processing line: ~    [1190, 5312, 64, 64],~
    +    [9064, 225, 64, 64],
    +** Processing line: ~    [9085, 193, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [1190, 5312, 64, 64],
    -** Processing line: ~    [1136, 5310, 64, 64],~
    +    [9085, 193, 64, 64],
    +** Processing line: ~    [9063, 194, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [1136, 5310, 64, 64],
    -** Processing line: ~    [1121, 5427, 64, 64],~
    +    [9063, 194, 64, 64],
    +** Processing line: ~    [9492, 234, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [1121, 5427, 64, 64],
    -** Processing line: ~    [1121, 5370, 64, 64],~
    +    [9492, 234, 64, 64],
    +** Processing line: ~    [9428, 234, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [1121, 5370, 64, 64],
    -** Processing line: ~    [1074, 5427, 64, 64],~
    +    [9428, 234, 64, 64],
    +** Processing line: ~    [9365, 235, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [1074, 5427, 64, 64],
    -** Processing line: ~    [1064, 5423, 64, 64],~
    +    [9365, 235, 64, 64],
    +** Processing line: ~    [9302, 235, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [1064, 5423, 64, 64],
    -** Processing line: ~    [1052, 5417, 64, 64],~
    +    [9302, 235, 64, 64],
    +** Processing line: ~    [9270, 237, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [1052, 5417, 64, 64],
    -** Processing line: ~    [1050, 5368, 64, 64],~
    +    [9270, 237, 64, 64],
    +** Processing line: ~    [9374, 172, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [1050, 5368, 64, 64],
    -** Processing line: ~    [1008, 5314, 64, 64],~
    +    [9374, 172, 64, 64],
    +** Processing line: ~    [9376, 109, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [1008, 5314, 64, 64],
    -** Processing line: ~    [997, 5307, 64, 64],~
    +    [9376, 109, 64, 64],
    +** Processing line: ~    [9377, 48, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [997, 5307, 64, 64],
    -** Processing line: ~    [977, 5299, 64, 64],~
    +    [9377, 48, 64, 64],
    +** Processing line: ~    [9545, 1060, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [977, 5299, 64, 64],
    -** Processing line: ~    [976, 5248, 64, 64],~
    +    [9545, 1060, 64, 64],
    +** Processing line: ~    [9482, 1062, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [976, 5248, 64, 64],
    -** Processing line: ~    [825, 5267, 64, 64],~
    +    [9482, 1062, 64, 64],
    +** Processing line: ~    [9423, 1062, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [825, 5267, 64, 64],
    -** Processing line: ~    [826, 5213, 64, 64],~
    +    [9423, 1062, 64, 64],
    +** Processing line: ~    [9387, 1062, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [826, 5213, 64, 64],
    -** Processing line: ~    [776, 5267, 64, 64],~
    +    [9387, 1062, 64, 64],
    +** Processing line: ~    [9541, 999, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [776, 5267, 64, 64],
    -** Processing line: ~    [768, 5261, 64, 64],~
    +    [9541, 999, 64, 64],
    +** Processing line: ~    [9542, 953, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [768, 5261, 64, 64],
    -** Processing line: ~    [755, 5256, 64, 64],~
    +    [9542, 953, 64, 64],
    +** Processing line: ~    [9478, 953, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [755, 5256, 64, 64],
    -** Processing line: ~    [753, 5209, 64, 64],~
    +    [9478, 953, 64, 64],
    +** Processing line: ~    [9388, 999, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [753, 5209, 64, 64],
    -** Processing line: ~    [1299, 5206, 64, 64],~
    +    [9388, 999, 64, 64],
    +** Processing line: ~    [9414, 953, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [1299, 5206, 64, 64],
    -** Processing line: ~    [1238, 5204, 64, 64],~
    +    [9414, 953, 64, 64],
    +** Processing line: ~    [9389, 953, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [1238, 5204, 64, 64],
    -** Processing line: ~    [1178, 5203, 64, 64],~
    +    [9389, 953, 64, 64],
    +** Processing line: ~    [9294, 1194, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [1178, 5203, 64, 64],
    -** Processing line: ~    [1124, 5204, 64, 64],~
    +    [9294, 1194, 64, 64],
    +** Processing line: ~    [9245, 1195, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [1124, 5204, 64, 64],
    -** Processing line: ~    [1065, 5206, 64, 64],~
    +    [9245, 1195, 64, 64],
    +** Processing line: ~    [9297, 1143, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [1065, 5206, 64, 64],
    -** Processing line: ~    [1008, 5203, 64, 64],~
    +    [9297, 1143, 64, 64],
    +** Processing line: ~    [9245, 1144, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [1008, 5203, 64, 64],
    -** Processing line: ~    [977, 5214, 64, 64],~
    +    [9245, 1144, 64, 64],
    +** Processing line: ~    [5575, 1781, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [977, 5214, 64, 64],
    -** Processing line: ~    [410, 5313, 64, 64],~
    +    [5575, 1781, 64, 64],
    +** Processing line: ~    [5574, 1753, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [410, 5313, 64, 64],
    -** Processing line: ~    [407, 5249, 64, 64],~
    +    [5574, 1753, 64, 64],
    +** Processing line: ~    [5522, 1782, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [407, 5249, 64, 64],
    -** Processing line: ~    [411, 5225, 64, 64],~
    +    [5522, 1782, 64, 64],
    +** Processing line: ~    [5518, 1753, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [411, 5225, 64, 64],
    -** Processing line: ~    [397, 5217, 64, 64],~
    +    [5518, 1753, 64, 64],
    +** Processing line: ~    [5472, 1783, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [397, 5217, 64, 64],
    -** Processing line: ~    [378, 5209, 64, 64],~
    +    [5472, 1783, 64, 64],
    +** Processing line: ~    [5471, 1751, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [378, 5209, 64, 64],
    -** Processing line: ~    [358, 5312, 64, 64],~
    +    [5471, 1751, 64, 64],
    +** Processing line: ~    [5419, 1781, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [358, 5312, 64, 64],
    -** Processing line: ~    [287, 5427, 64, 64],~
    +    [5419, 1781, 64, 64],
    +** Processing line: ~    [5421, 1749, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [287, 5427, 64, 64],
    -** Processing line: ~    [286, 5364, 64, 64],~
    +    [5421, 1749, 64, 64],
    +** Processing line: ~    [500, 3207, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [286, 5364, 64, 64],
    -** Processing line: ~    [300, 5313, 64, 64],~
    +    [500, 3207, 64, 64],
    +** Processing line: ~    [477, 3205, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [300, 5313, 64, 64],
    -** Processing line: ~    [242, 5427, 64, 64],~
    +    [477, 3205, 64, 64],
    +** Processing line: ~    [1282, 3214, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [242, 5427, 64, 64],
    -** Processing line: ~    [229, 5420, 64, 64],~
    +    [1282, 3214, 64, 64],
    +** Processing line: ~    [1221, 3214, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [229, 5420, 64, 64],
    -** Processing line: ~    [217, 5416, 64, 64],~
    +    [1221, 3214, 64, 64],
    +** Processing line: ~    [1188, 3215, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [217, 5416, 64, 64],
    -** Processing line: ~    [215, 5364, 64, 64],~
    +    [1188, 3215, 64, 64],
    +** Processing line: ~    [1345, 3103, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [215, 5364, 64, 64],
    -** Processing line: ~    [174, 5311, 64, 64],~
    +    [1345, 3103, 64, 64],
    +** Processing line: ~    [1288, 3103, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [174, 5311, 64, 64],
    -** Processing line: ~    [165, 5308, 64, 64],~
    +    [1288, 3103, 64, 64],
    +** Processing line: ~    [1231, 3104, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [165, 5308, 64, 64],
    -** Processing line: ~    [139, 5300, 64, 64],~
    +    [1231, 3104, 64, 64],
    +** Processing line: ~    [1190, 3153, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [139, 5300, 64, 64],
    -** Processing line: ~    [141, 5236, 64, 64],~
    +    [1190, 3153, 64, 64],
    +** Processing line: ~    [1189, 3105, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [141, 5236, 64, 64],
    -** Processing line: ~    [141, 5211, 64, 64],~
    +    [1189, 3105, 64, 64],
    +** Processing line: ~    [2255, 3508, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [141, 5211, 64, 64],
    -** Processing line: ~    [315, 5208, 64, 64],~
    +    [2255, 3508, 64, 64],
    +** Processing line: ~    [2206, 3510, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [315, 5208, 64, 64],
    -** Processing line: ~    [251, 5208, 64, 64],~
    +    [2206, 3510, 64, 64],
    +** Processing line: ~    [2254, 3458, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [251, 5208, 64, 64],
    -** Processing line: ~    [211, 5211, 64, 64],~
    +    [2254, 3458, 64, 64],
    +** Processing line: ~    [2202, 3458, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [211, 5211, 64, 64],
    -** Processing line: ~    [8050, 4060, 64, 64],~
    +    [2202, 3458, 64, 64],
    +** Processing line: ~    [2754, 2930, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [8050, 4060, 64, 64],
    -** Processing line: ~    [7992, 4060, 64, 64],~
    +    [2754, 2930, 64, 64],
    +** Processing line: ~    [2726, 2932, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [7992, 4060, 64, 64],
    -** Processing line: ~    [7929, 4060, 64, 64],~
    +    [2726, 2932, 64, 64],
    +** Processing line: ~    [3408, 2874, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [7929, 4060, 64, 64],
    -** Processing line: ~    [7866, 4061, 64, 64],~
    +    [3408, 2874, 64, 64],
    +** Processing line: ~    [3407, 2849, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [7866, 4061, 64, 64],
    -** Processing line: ~    [7828, 4063, 64, 64],~
    +    [3407, 2849, 64, 64],
    +** Processing line: ~    [3345, 2872, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [7828, 4063, 64, 64],
    -** Processing line: ~    [7934, 4001, 64, 64],~
    +    [3345, 2872, 64, 64],
    +** Processing line: ~    [3342, 2847, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [7934, 4001, 64, 64],
    -** Processing line: ~    [7935, 3936, 64, 64],~
    +    [3342, 2847, 64, 64],
    +** Processing line: ~    [3284, 2874, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [7935, 3936, 64, 64],
    -** Processing line: ~    [7935, 3875, 64, 64],~
    +    [3284, 2874, 64, 64],
    +** Processing line: ~    [3284, 2848, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [7935, 3875, 64, 64],
    -** Processing line: ~    [7622, 4111, 64, 64],~
    +    [3284, 2848, 64, 64],
    +** Processing line: ~    [3248, 2878, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [7622, 4111, 64, 64],
    -** Processing line: ~    [7623, 4049, 64, 64],~
    +    [3248, 2878, 64, 64],
    +** Processing line: ~    [3252, 2848, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [7623, 4049, 64, 64],
    -** Processing line: ~    [7707, 4018, 64, 64],~
    +    [3252, 2848, 64, 64],
    +** Processing line: ~    [3953, 3274, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [7707, 4018, 64, 64],
    -** Processing line: ~    [7663, 4019, 64, 64],~
    +    [3953, 3274, 64, 64],
    +** Processing line: ~    [3899, 3277, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [7663, 4019, 64, 64],
    -** Processing line: ~    [7623, 4017, 64, 64],~
    +    [3899, 3277, 64, 64],
    +** Processing line: ~    [3951, 3222, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [7623, 4017, 64, 64],
    -** Processing line: ~    [7193, 4060, 64, 64],~
    +    [3951, 3222, 64, 64],
    +** Processing line: ~    [3900, 3222, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [7193, 4060, 64, 64],
    -** Processing line: ~    [7131, 4059, 64, 64],~
    +    [3900, 3222, 64, 64],
    +** Processing line: ~    [4310, 2968, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [7131, 4059, 64, 64],
    -** Processing line: ~    [7070, 4057, 64, 64],~
    +    [4310, 2968, 64, 64],
    +** Processing line: ~    [4246, 2969, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [7070, 4057, 64, 64],
    -** Processing line: ~    [7008, 4060, 64, 64],~
    +    [4246, 2969, 64, 64],
    +** Processing line: ~    [4183, 2965, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [7008, 4060, 64, 64],
    -** Processing line: ~    [6977, 4060, 64, 64],~
    +    [4183, 2965, 64, 64],
    +** Processing line: ~    [4153, 2967, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [6977, 4060, 64, 64],
    -** Processing line: ~    [7080, 3998, 64, 64],~
    +    [4153, 2967, 64, 64],
    +** Processing line: ~    [4311, 2910, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [7080, 3998, 64, 64],
    -** Processing line: ~    [7081, 3935, 64, 64],~
    +    [4311, 2910, 64, 64],
    +** Processing line: ~    [4308, 2856, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [7081, 3935, 64, 64],
    -** Processing line: ~    [7080, 3873, 64, 64],~
    +    [4308, 2856, 64, 64],
    +** Processing line: ~    [4251, 2855, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [7080, 3873, 64, 64],
    -** Processing line: ~    [6855, 4019, 64, 64],~
    +    [4251, 2855, 64, 64],
    +** Processing line: ~    [4197, 2857, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [6855, 4019, 64, 64],
    -** Processing line: ~    [6790, 4018, 64, 64],~
    +    [4197, 2857, 64, 64],
    +** Processing line: ~    [5466, 3184, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [6790, 4018, 64, 64],
    -** Processing line: ~    [6770, 4114, 64, 64],~
    +    [5466, 3184, 64, 64],
    +** Processing line: ~    [5466, 3158, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [6770, 4114, 64, 64],
    -** Processing line: ~    [6770, 4060, 64, 64],~
    +    [5466, 3158, 64, 64],
    +** Processing line: ~    [5404, 3184, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [6770, 4060, 64, 64],
    -** Processing line: ~    [6768, 4013, 64, 64],~
    +    [5404, 3184, 64, 64],
    +** Processing line: ~    [5404, 3156, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [6768, 4013, 64, 64],
    -** Processing line: ~    [6345, 4060, 64, 64],~
    +    [5404, 3156, 64, 64],
    +** Processing line: ~    [5343, 3185, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [6345, 4060, 64, 64],
    -** Processing line: ~    [6284, 4062, 64, 64],~
    +    [5343, 3185, 64, 64],
    +** Processing line: ~    [5342, 3156, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [6284, 4062, 64, 64],
    -** Processing line: ~    [6222, 4061, 64, 64],~
    +    [5342, 3156, 64, 64],
    +** Processing line: ~    [5308, 3185, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [6222, 4061, 64, 64],
    -** Processing line: ~    [6166, 4061, 64, 64],~
    +    [5308, 3185, 64, 64],
    +** Processing line: ~    [5307, 3154, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [6166, 4061, 64, 64],
    -** Processing line: ~    [6124, 4066, 64, 64],~
    +    [5307, 3154, 64, 64],
    +** Processing line: ~    [6163, 2950, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [6124, 4066, 64, 64],
    -** Processing line: ~    [6226, 3995, 64, 64],~
    +    [6163, 2950, 64, 64],
    +** Processing line: ~    [6111, 2952, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [6226, 3995, 64, 64],
    -** Processing line: ~    [6226, 3933, 64, 64],~
    +    [6111, 2952, 64, 64],
    +** Processing line: ~    [6164, 2898, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [6226, 3933, 64, 64],
    -** Processing line: ~    [6228, 3868, 64, 64],~
    +    [6164, 2898, 64, 64],
    +** Processing line: ~    [6113, 2897, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [6228, 3868, 64, 64],
    -** Processing line: ~    [5916, 4113, 64, 64],~
    +    [6113, 2897, 64, 64],
    +** Processing line: ~    [7725, 3156, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [5916, 4113, 64, 64],
    -** Processing line: ~    [5918, 4052, 64, 64],~
    +    [7725, 3156, 64, 64],
    +** Processing line: ~    [7661, 3157, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [5918, 4052, 64, 64],
    -** Processing line: ~    [6001, 4018, 64, 64],~
    +    [7661, 3157, 64, 64],
    +** Processing line: ~    [7598, 3157, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [6001, 4018, 64, 64],
    -** Processing line: ~    [5941, 4019, 64, 64],~
    +    [7598, 3157, 64, 64],
    +** Processing line: ~    [7533, 3156, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [5941, 4019, 64, 64],
    -** Processing line: ~    [5918, 4020, 64, 64],~
    +    [7533, 3156, 64, 64],
    +** Processing line: ~    [7468, 3156, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [5918, 4020, 64, 64],
    -** Processing line: ~    [5501, 4059, 64, 64],~
    +    [7468, 3156, 64, 64],
    +** Processing line: ~    [7401, 3156, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [5501, 4059, 64, 64],
    -** Processing line: ~    [5439, 4061, 64, 64],~
    +    [7401, 3156, 64, 64],
    +** Processing line: ~    [7335, 3157, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [5439, 4061, 64, 64],
    -** Processing line: ~    [5376, 4059, 64, 64],~
    +    [7335, 3157, 64, 64],
    +** Processing line: ~    [7270, 3157, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [5376, 4059, 64, 64],
    -** Processing line: ~    [5312, 4058, 64, 64],~
    +    [7270, 3157, 64, 64],
    +** Processing line: ~    [7208, 3157, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [5312, 4058, 64, 64],
    -** Processing line: ~    [5285, 4062, 64, 64],~
    +    [7208, 3157, 64, 64],
    +** Processing line: ~    [7146, 3157, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [5285, 4062, 64, 64],
    -** Processing line: ~    [5388, 3999, 64, 64],~
    +    [7146, 3157, 64, 64],
    +** Processing line: ~    [7134, 3159, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [5388, 3999, 64, 64],
    -** Processing line: ~    [5385, 3941, 64, 64],~
    +    [7134, 3159, 64, 64],
    +** Processing line: ~    [6685, 3726, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [5385, 3941, 64, 64],
    -** Processing line: ~    [5384, 3874, 64, 64],~
    +    [6685, 3726, 64, 64],
    +** Processing line: ~    [6685, 3663, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [5384, 3874, 64, 64],
    -** Processing line: ~    [5075, 4112, 64, 64],~
    +    [6685, 3663, 64, 64],
    +** Processing line: ~    [6683, 3602, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [5075, 4112, 64, 64],
    -** Processing line: ~    [5074, 4051, 64, 64],~
    +    [6683, 3602, 64, 64],
    +** Processing line: ~    [6679, 3538, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [5074, 4051, 64, 64],
    -** Processing line: ~    [5158, 4018, 64, 64],~
    +    [6679, 3538, 64, 64],
    +** Processing line: ~    [6680, 3474, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [5158, 4018, 64, 64],
    -** Processing line: ~    [5095, 4020, 64, 64],~
    +    [6680, 3474, 64, 64],
    +** Processing line: ~    [6682, 3413, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [5095, 4020, 64, 64],
    -** Processing line: ~    [5073, 4018, 64, 64],~
    +    [6682, 3413, 64, 64],
    +** Processing line: ~    [6681, 3347, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [5073, 4018, 64, 64],
    -** Processing line: ~    [4549, 3998, 64, 64],~
    +    [6681, 3347, 64, 64],
    +** Processing line: ~    [6681, 3287, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [4549, 3998, 64, 64],
    -** Processing line: ~    [4393, 3996, 64, 64],~
    +    [6681, 3287, 64, 64],
    +** Processing line: ~    [6682, 3223, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [4393, 3996, 64, 64],
    -** Processing line: ~    [4547, 3938, 64, 64],~
    +    [6682, 3223, 64, 64],
    +** Processing line: ~    [6683, 3161, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [4547, 3938, 64, 64],
    -** Processing line: ~    [4547, 3886, 64, 64],~
    +    [6683, 3161, 64, 64],
    +** Processing line: ~    [6682, 3102, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [4547, 3886, 64, 64],
    -** Processing line: ~    [4488, 3885, 64, 64],~
    +    [6682, 3102, 64, 64],
    +** Processing line: ~    [6684, 3042, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [4488, 3885, 64, 64],
    -** Processing line: ~    [4427, 3885, 64, 64],~
    +    [6684, 3042, 64, 64],
    +** Processing line: ~    [6685, 2980, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [4427, 3885, 64, 64],
    -** Processing line: ~    [4395, 3938, 64, 64],~
    +    [6685, 2980, 64, 64],
    +** Processing line: ~    [6685, 2920, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [4395, 3938, 64, 64],
    -** Processing line: ~    [4395, 3885, 64, 64],~
    +    [6685, 2920, 64, 64],
    +** Processing line: ~    [6683, 2859, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [4395, 3885, 64, 64],
    -** Processing line: ~    [0, 0, 64, 64],~
    +    [6683, 2859, 64, 64],
    +** Processing line: ~    [6684, 2801, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [0, 0, 64, 64],
    -** Processing line: ~    [0, 1670, 64, 64],~
    +    [6684, 2801, 64, 64],
    +** Processing line: ~    [6686, 2743, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [0, 1670, 64, 64],
    -** Processing line: ~    [6691, 1653, 64, 64],~
    +    [6686, 2743, 64, 64],
    +** Processing line: ~    [6683, 2683, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [6691, 1653, 64, 64],
    -** Processing line: ~    [1521, 3792, 64, 64],~
    +    [6683, 2683, 64, 64],
    +** Processing line: ~    [6681, 2622, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [1521, 3792, 64, 64],
    -** Processing line: ~    [0, 5137, 64, 64],~
    +    [6681, 2622, 64, 64],
    +** Processing line: ~    [6682, 2559, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [0, 5137, 64, 64],
    -** Processing line: ~    [0, 0, 64, 64],~
    +    [6682, 2559, 64, 64],
    +** Processing line: ~    [6683, 2498, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [0, 0, 64, 64],
    -** Processing line: ~    [0, 1670, 64, 64],~
    +    [6683, 2498, 64, 64],
    +** Processing line: ~    [6685, 2434, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [0, 1670, 64, 64],
    -** Processing line: ~    [6691, 1653, 64, 64],~
    +    [6685, 2434, 64, 64],
    +** Processing line: ~    [6683, 2371, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [6691, 1653, 64, 64],
    -** Processing line: ~    [1521, 3792, 64, 64],~
    +    [6683, 2371, 64, 64],
    +** Processing line: ~    [6683, 2306, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [1521, 3792, 64, 64],
    -** Processing line: ~    [0, 5137, 64, 64],~
    +    [6683, 2306, 64, 64],
    +** Processing line: ~    [6684, 2242, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [0, 5137, 64, 64],
    -** Processing line: ~    [1215, 2421, 64, 64],~
    +    [6684, 2242, 64, 64],
    +** Processing line: ~    [6683, 2177, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [1215, 2421, 64, 64],
    -** Processing line: ~    [1214, 2360, 64, 64],~
    +    [6683, 2177, 64, 64],
    +** Processing line: ~    [6683, 2112, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [1214, 2360, 64, 64],
    -** Processing line: ~    [1211, 2300, 64, 64],~
    +    [6683, 2112, 64, 64],
    +** Processing line: ~    [6683, 2049, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [1211, 2300, 64, 64],
    -** Processing line: ~    [1211, 2291, 64, 64],~
    +    [6683, 2049, 64, 64],
    +** Processing line: ~    [6683, 1985, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [1211, 2291, 64, 64],
    -** Processing line: ~    [1158, 2420, 64, 64],~
    +    [6683, 1985, 64, 64],
    +** Processing line: ~    [6682, 1923, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [1158, 2420, 64, 64],
    -** Processing line: ~    [1156, 2358, 64, 64],~
    +    [6682, 1923, 64, 64],
    +** Processing line: ~    [6683, 1860, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [1156, 2358, 64, 64],
    -** Processing line: ~    [1149, 2291, 64, 64],~
    +    [6683, 1860, 64, 64],
    +** Processing line: ~    [6685, 1797, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [1149, 2291, 64, 64],
    -** Processing line: ~    [1095, 2420, 64, 64],~
    +    [6685, 1797, 64, 64],
    +** Processing line: ~    [6684, 1735, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [1095, 2420, 64, 64],
    -** Processing line: ~    [1030, 2418, 64, 64],~
    +    [6684, 1735, 64, 64],
    +** Processing line: ~    [6685, 1724, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [1030, 2418, 64, 64],
    -** Processing line: ~    [966, 2419, 64, 64],~
    +    [6685, 1724, 64, 64],
    +** Processing line: ~    [7088, 1967, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [966, 2419, 64, 64],
    -** Processing line: ~    [903, 2419, 64, 64],~
    +    [7088, 1967, 64, 64],
    +** Processing line: ~    [7026, 1966, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [903, 2419, 64, 64],
    -** Processing line: ~    [852, 2419, 64, 64],~
    +    [7026, 1966, 64, 64],
    +** Processing line: ~    [6964, 1967, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [852, 2419, 64, 64],
    -** Processing line: ~    [1087, 2291, 64, 64],~
    +    [6964, 1967, 64, 64],
    +** Processing line: ~    [6900, 1965, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [1087, 2291, 64, 64],
    -** Processing line: ~    [1023, 2291, 64, 64],~
    +    [6900, 1965, 64, 64],
    +** Processing line: ~    [6869, 1969, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [1023, 2291, 64, 64],
    -** Processing line: ~    [960, 2291, 64, 64],~
    +    [6869, 1969, 64, 64],
    +** Processing line: ~    [6972, 1904, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [960, 2291, 64, 64],
    -** Processing line: ~    [896, 2292, 64, 64],~
    +    [6972, 1904, 64, 64],
    +** Processing line: ~    [6974, 1840, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [896, 2292, 64, 64],
    -** Processing line: ~    [854, 2355, 64, 64],~
    +    [6974, 1840, 64, 64],
    +** Processing line: ~    [6971, 1776, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [854, 2355, 64, 64],
    -** Processing line: ~    [854, 2292, 64, 64],~
    +    [6971, 1776, 64, 64],
    +** Processing line: ~    [6971, 1716, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [854, 2292, 64, 64],
    -** Processing line: ~    [675, 3017, 64, 64],~
    +    [6971, 1716, 64, 64],
    +** Processing line: ~    [7168, 1979, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [675, 3017, 64, 64],
    -** Processing line: ~    [622, 3017, 64, 64],~
    +    [7168, 1979, 64, 64],
    +** Processing line: ~    [7170, 1919, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [622, 3017, 64, 64],
    -** Processing line: ~    [676, 2965, 64, 64],~
    +    [7170, 1919, 64, 64],
    +** Processing line: ~    [7169, 1882, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [676, 2965, 64, 64],
    -** Processing line: ~    [622, 2965, 64, 64],~
    +    [7169, 1882, 64, 64],
    +** Processing line: ~    [7115, 1880, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [622, 2965, 64, 64],
    -** Processing line: ~    [1560, 3212, 64, 64],~
    +    [7115, 1880, 64, 64],
    +** Processing line: ~    [7086, 1881, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [1560, 3212, 64, 64],
    -** Processing line: ~    [1496, 3212, 64, 64],~
    +    [7086, 1881, 64, 64],
    +** Processing line: ~    [7725, 1837, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [1496, 3212, 64, 64],
    -** Processing line: ~    [1430, 3211, 64, 64],~
    +    [7725, 1837, 64, 64],
    +** Processing line: ~    [7724, 1776, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [1430, 3211, 64, 64],
    -** Processing line: ~    [1346, 3214, 64, 64],~
    +    [7724, 1776, 64, 64],
    +** Processing line: ~    [7724, 1728, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [1346, 3214, 64, 64],
    -** Processing line: ~    [1410, 3213, 64, 64],~
    +    [7724, 1728, 64, 64],
    +** Processing line: ~    [7661, 1727, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [1410, 3213, 64, 64],
    -** Processing line: ~    [1560, 3147, 64, 64],~
    +    [7661, 1727, 64, 64],
    +** Processing line: ~    [7603, 1728, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [1560, 3147, 64, 64],
    -** Processing line: ~    [1559, 3105, 64, 64],~
    +    [7603, 1728, 64, 64],
    +** Processing line: ~    [7571, 1837, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [1559, 3105, 64, 64],
    -** Processing line: ~    [1496, 3105, 64, 64],~
    +    [7571, 1837, 64, 64],
    +** Processing line: ~    [7570, 1774, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [1496, 3105, 64, 64],
    -** Processing line: ~    [1442, 3105, 64, 64],~
    +    [7570, 1774, 64, 64],
    +** Processing line: ~    [7572, 1725, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [1442, 3105, 64, 64],
    -** Processing line: ~    [1412, 3106, 64, 64],~
    +    [7572, 1725, 64, 64],
    +** Processing line: ~    [7859, 2134, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [1412, 3106, 64, 64],
    -** Processing line: ~    [918, 4163, 64, 64],~
    +    [7859, 2134, 64, 64],
    +** Processing line: ~    [7858, 2070, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [918, 4163, 64, 64],
    -** Processing line: ~    [854, 4161, 64, 64],~
    +    [7858, 2070, 64, 64],
    +** Processing line: ~    [7858, 2008, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [854, 4161, 64, 64],
    -** Processing line: ~    [792, 4160, 64, 64],~
    +    [7858, 2008, 64, 64],
    +** Processing line: ~    [7860, 1942, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [792, 4160, 64, 64],
    -** Processing line: ~    [729, 4159, 64, 64],~
    +    [7860, 1942, 64, 64],
    +** Processing line: ~    [7856, 1878, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [729, 4159, 64, 64],
    -** Processing line: ~    [666, 4158, 64, 64],~
    +    [7856, 1878, 64, 64],
    +** Processing line: ~    [7860, 1813, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [666, 4158, 64, 64],
    -** Processing line: ~    [601, 4158, 64, 64],~
    +    [7860, 1813, 64, 64],
    +** Processing line: ~    [7859, 1750, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [601, 4158, 64, 64],
    -** Processing line: ~    [537, 4156, 64, 64],~
    +    [7859, 1750, 64, 64],
    +** Processing line: ~    [7856, 1724, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [537, 4156, 64, 64],
    -** Processing line: ~    [918, 4137, 64, 64],~
    +    [7856, 1724, 64, 64],
    +** Processing line: ~    [8155, 1837, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [918, 4137, 64, 64],
    -** Processing line: ~    [854, 4137, 64, 64],~
    +    [8155, 1837, 64, 64],
    +** Processing line: ~    [8092, 1839, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [854, 4137, 64, 64],
    -** Processing line: ~    [789, 4136, 64, 64],~
    +    [8092, 1839, 64, 64],
    +** Processing line: ~    [8032, 1838, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [789, 4136, 64, 64],
    -** Processing line: ~    [726, 4137, 64, 64],~
    +    [8032, 1838, 64, 64],
    +** Processing line: ~    [7999, 1839, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [726, 4137, 64, 64],
    -** Processing line: ~    [661, 4137, 64, 64],~
    +    [7999, 1839, 64, 64],
    +** Processing line: ~    [8153, 1773, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [661, 4137, 64, 64],
    -** Processing line: ~    [599, 4139, 64, 64],~
    +    [8153, 1773, 64, 64],
    +** Processing line: ~    [8154, 1731, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [599, 4139, 64, 64],
    -** Processing line: ~    [538, 4137, 64, 64],~
    +    [8154, 1731, 64, 64],
    +** Processing line: ~    [8090, 1730, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [538, 4137, 64, 64],
    -** Processing line: ~    [5378, 4254, 64, 64],~
    +    [8090, 1730, 64, 64],
    +** Processing line: ~    [8035, 1732, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [5378, 4254, 64, 64],
    -** Processing line: ~    [5440, 4204, 64, 64],~
    +    [8035, 1732, 64, 64],
    +** Processing line: ~    [8003, 1776, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [5440, 4204, 64, 64],
    -** Processing line: ~    [5405, 4214, 64, 64],~
    +    [8003, 1776, 64, 64],
    +** Processing line: ~    [8003, 1730, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [5405, 4214, 64, 64],
    -** Processing line: ~    [5350, 4254, 64, 64],~
    +    [8003, 1730, 64, 64],
    +** Processing line: ~    [8421, 1978, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [5350, 4254, 64, 64],
    -** Processing line: ~    [5439, 4177, 64, 64],~
    +    [8421, 1978, 64, 64],
    +** Processing line: ~    [8420, 1917, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [5439, 4177, 64, 64],
    -** Processing line: ~    [5413, 4173, 64, 64],~
    +    [8420, 1917, 64, 64],
    +** Processing line: ~    [8505, 1878, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [5413, 4173, 64, 64],
    -** Processing line: ~    [5399, 4128, 64, 64],~
    +    [8505, 1878, 64, 64],
    +** Processing line: ~    [8443, 1881, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [5399, 4128, 64, 64],
    -** Processing line: ~    [5352, 4200, 64, 64],~
    +    [8443, 1881, 64, 64],
    +** Processing line: ~    [8420, 1882, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [5352, 4200, 64, 64],
    -** Processing line: ~    [5352, 4158, 64, 64],~
    +    [8420, 1882, 64, 64],
    +** Processing line: ~    [8847, 1908, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [5352, 4158, 64, 64],
    -** Processing line: ~    [5392, 4130, 64, 64],~
    +    [8847, 1908, 64, 64],
    +** Processing line: ~    [8783, 1908, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [5392, 4130, 64, 64],
    -** Processing line: ~    [6216, 4251, 64, 64],~
    +    [8783, 1908, 64, 64],
    +** Processing line: ~    [8718, 1910, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [6216, 4251, 64, 64],
    -** Processing line: ~    [6190, 4251, 64, 64],~
    +    [8718, 1910, 64, 64],
    +** Processing line: ~    [8654, 1910, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [6190, 4251, 64, 64],
    -** Processing line: ~    [6279, 4200, 64, 64],~
    +    [8654, 1910, 64, 64],
    +** Processing line: ~    [8628, 1911, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [6279, 4200, 64, 64],
    -** Processing line: ~    [6262, 4205, 64, 64],~
    +    [8628, 1911, 64, 64],
    +** Processing line: ~    [8729, 1847, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [6262, 4205, 64, 64],
    -** Processing line: ~    [6233, 4214, 64, 64],~
    +    [8729, 1847, 64, 64],
    +** Processing line: ~    [8731, 1781, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [6233, 4214, 64, 64],
    -** Processing line: ~    [6280, 4172, 64, 64],~
    +    [8731, 1781, 64, 64],
    +** Processing line: ~    [8731, 1721, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [6280, 4172, 64, 64],
    -** Processing line: ~    [6256, 4169, 64, 64],~
    +    [8731, 1721, 64, 64],
    +** Processing line: ~    [9058, 2135, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [6256, 4169, 64, 64],
    -** Processing line: ~    [6239, 4128, 64, 64],~
    +    [9058, 2135, 64, 64],
    +** Processing line: ~    [9056, 2073, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [6239, 4128, 64, 64],
    -** Processing line: ~    [6231, 4128, 64, 64],~
    +    [9056, 2073, 64, 64],
    +** Processing line: ~    [9058, 2006, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [6231, 4128, 64, 64],
    -** Processing line: ~    [6191, 4195, 64, 64],~
    +    [9058, 2006, 64, 64],
    +** Processing line: ~    [9057, 1939, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [6191, 4195, 64, 64],
    -** Processing line: ~    [6190, 4158, 64, 64],~
    +    [9057, 1939, 64, 64],
    +** Processing line: ~    [9058, 1876, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [6190, 4158, 64, 64],
    -** Processing line: ~    [7072, 4250, 64, 64],~
    +    [9058, 1876, 64, 64],
    +** Processing line: ~    [9056, 1810, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [7072, 4250, 64, 64],
    -** Processing line: ~    [7046, 4250, 64, 64],~
    +    [9056, 1810, 64, 64],
    +** Processing line: ~    [9059, 1745, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [7046, 4250, 64, 64],
    -** Processing line: ~    [7133, 4202, 64, 64],~
    +    [9059, 1745, 64, 64],
    +** Processing line: ~    [9060, 1722, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [7133, 4202, 64, 64],
    -** Processing line: ~    [7107, 4209, 64, 64],~
    +    [9060, 1722, 64, 64],
    +** Processing line: ~    [9273, 1977, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [7107, 4209, 64, 64],
    -** Processing line: ~    [7086, 4214, 64, 64],~
    +    [9273, 1977, 64, 64],
    +** Processing line: ~    [9273, 1912, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [7086, 4214, 64, 64],
    -** Processing line: ~    [7133, 4173, 64, 64],~
    +    [9273, 1912, 64, 64],
    +** Processing line: ~    [9358, 1883, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [7133, 4173, 64, 64],
    -** Processing line: ~    [7108, 4169, 64, 64],~
    +    [9358, 1883, 64, 64],
    +** Processing line: ~    [9298, 1881, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [7108, 4169, 64, 64],
    -** Processing line: ~    [7092, 4127, 64, 64],~
    +    [9298, 1881, 64, 64],
    +** Processing line: ~    [9270, 1883, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [7092, 4127, 64, 64],
    -** Processing line: ~    [7084, 4128, 64, 64],~
    +    [9270, 1883, 64, 64],
    +** Processing line: ~    [9699, 1910, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [7084, 4128, 64, 64],
    -** Processing line: ~    [7047, 4191, 64, 64],~
    +    [9699, 1910, 64, 64],
    +** Processing line: ~    [9637, 1910, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [7047, 4191, 64, 64],
    -** Processing line: ~    [7047, 4156, 64, 64],~
    +    [9637, 1910, 64, 64],
    +** Processing line: ~    [9576, 1910, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [7047, 4156, 64, 64],
    -** Processing line: ~    [7926, 4252, 64, 64],~
    +    [9576, 1910, 64, 64],
    +** Processing line: ~    [9512, 1911, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [7926, 4252, 64, 64],
    -** Processing line: ~    [7900, 4253, 64, 64],~
    +    [9512, 1911, 64, 64],
    +** Processing line: ~    [9477, 1912, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [7900, 4253, 64, 64],
    -** Processing line: ~    [7987, 4202, 64, 64],~
    +    [9477, 1912, 64, 64],
    +** Processing line: ~    [9584, 1846, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [7987, 4202, 64, 64],
    -** Processing line: ~    [7965, 4209, 64, 64],~
    +    [9584, 1846, 64, 64],
    +** Processing line: ~    [9585, 1783, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [7965, 4209, 64, 64],
    -** Processing line: ~    [7942, 4216, 64, 64],~
    +    [9585, 1783, 64, 64],
    +** Processing line: ~    [9586, 1719, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [7942, 4216, 64, 64],
    -** Processing line: ~    [7989, 4174, 64, 64],~
    +    [9586, 1719, 64, 64],
    +** Processing line: ~    [8320, 2788, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [7989, 4174, 64, 64],
    -** Processing line: ~    [7970, 4170, 64, 64],~
    +    [8320, 2788, 64, 64],
    +** Processing line: ~    [8256, 2789, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [7970, 4170, 64, 64],
    -** Processing line: ~    [7949, 4126, 64, 64],~
    +    [8256, 2789, 64, 64],
    +** Processing line: ~    [8192, 2789, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [7949, 4126, 64, 64],
    -** Processing line: ~    [7901, 4196, 64, 64],~
    +    [8192, 2789, 64, 64],
    +** Processing line: ~    [8180, 2789, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [7901, 4196, 64, 64],
    -** Processing line: ~    [7900, 4159, 64, 64],~
    +    [8180, 2789, 64, 64],
    +** Processing line: ~    [8319, 2730, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [7900, 4159, 64, 64],
    -** Processing line: ~    [7941, 4130, 64, 64],~
    +    [8319, 2730, 64, 64],
    +** Processing line: ~    [8319, 2671, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [7941, 4130, 64, 64],
    -** Processing line: ~    [2847, 379, 64, 64],~
    +    [8319, 2671, 64, 64],
    +** Processing line: ~    [8319, 2639, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [2847, 379, 64, 64],
    -** Processing line: ~    [2825, 380, 64, 64],~
    +    [8319, 2639, 64, 64],
    +** Processing line: ~    [8259, 2639, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [2825, 380, 64, 64],
    -** Processing line: ~    [2845, 317, 64, 64],~
    +    [8259, 2639, 64, 64],
    +** Processing line: ~    [8202, 2639, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [2845, 317, 64, 64],
    -** Processing line: ~    [2829, 316, 64, 64],~
    +    [8202, 2639, 64, 64],
    +** Processing line: ~    [8179, 2727, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [2829, 316, 64, 64],
    -** Processing line: ~    [2845, 255, 64, 64],~
    +    [8179, 2727, 64, 64],
    +** Processing line: ~    [8178, 2665, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [2845, 255, 64, 64],
    -** Processing line: ~    [2830, 257, 64, 64],~
    +    [8178, 2665, 64, 64],
    +** Processing line: ~    [8177, 2636, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [2830, 257, 64, 64],
    -** Processing line: ~    [2845, 202, 64, 64],~
    +    [8177, 2636, 64, 64],
    +** Processing line: ~    [9360, 3138, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [2845, 202, 64, 64],
    -** Processing line: ~    [2829, 198, 64, 64],~
    +    [9360, 3138, 64, 64],
    +** Processing line: ~    [9296, 3137, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [2829, 198, 64, 64],
    -** Processing line: ~    [2770, 169, 64, 64],~
    +    [9296, 3137, 64, 64],
    +** Processing line: ~    [9235, 3139, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [2770, 169, 64, 64],
    -** Processing line: ~    [2708, 170, 64, 64],~
    +    [9235, 3139, 64, 64],
    +** Processing line: ~    [9174, 3139, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [2708, 170, 64, 64],
    -** Processing line: ~    [2646, 171, 64, 64],~
    +    [9174, 3139, 64, 64],
    +** Processing line: ~    [9113, 3138, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [2646, 171, 64, 64],
    -** Processing line: ~    [2582, 171, 64, 64],~
    +    [9113, 3138, 64, 64],
    +** Processing line: ~    [9050, 3138, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [2582, 171, 64, 64],
    -** Processing line: ~    [2518, 171, 64, 64],~
    +    [9050, 3138, 64, 64],
    +** Processing line: ~    [8988, 3138, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [2518, 171, 64, 64],
    -** Processing line: ~    [2454, 171, 64, 64],~
    +    [8988, 3138, 64, 64],
    +** Processing line: ~    [8925, 3138, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [2454, 171, 64, 64],
    -** Processing line: ~    [2391, 172, 64, 64],~
    +    [8925, 3138, 64, 64],
    +** Processing line: ~    [8860, 3136, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [2391, 172, 64, 64],
    -** Processing line: ~    [2332, 379, 64, 64],~
    +    [8860, 3136, 64, 64],
    +** Processing line: ~    [8797, 3136, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [2332, 379, 64, 64],
    -** Processing line: ~    [2315, 379, 64, 64],~
    +    [8797, 3136, 64, 64],
    +** Processing line: ~    [8770, 3138, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [2315, 379, 64, 64],
    -** Processing line: ~    [2334, 316, 64, 64],~
    +    [8770, 3138, 64, 64],
    +** Processing line: ~    [8827, 4171, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [2334, 316, 64, 64],
    -** Processing line: ~    [2315, 317, 64, 64],~
    +    [8827, 4171, 64, 64],
    +** Processing line: ~    [8827, 4107, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [2315, 317, 64, 64],
    -** Processing line: ~    [2332, 254, 64, 64],~
    +    [8827, 4107, 64, 64],
    +** Processing line: ~    [8827, 4043, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [2332, 254, 64, 64],
    -** Processing line: ~    [2314, 254, 64, 64],~
    +    [8827, 4043, 64, 64],
    +** Processing line: ~    [8827, 3978, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [2314, 254, 64, 64],
    -** Processing line: ~    [2335, 192, 64, 64],~
    +    [8827, 3978, 64, 64],
    +** Processing line: ~    [8825, 3914, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [2335, 192, 64, 64],
    -** Processing line: ~    [2311, 192, 64, 64],~
    +    [8825, 3914, 64, 64],
    +** Processing line: ~    [8824, 3858, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [2311, 192, 64, 64],
    -** Processing line: ~    [2846, 142, 64, 64],~
    +    [8824, 3858, 64, 64],
    +** Processing line: ~    [9635, 4234, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [2846, 142, 64, 64],
    -** Processing line: ~    [2784, 140, 64, 64],~
    +    [9635, 4234, 64, 64],
    +** Processing line: ~    [9584, 4235, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [2784, 140, 64, 64],
    -** Processing line: ~    [2846, 79, 64, 64],~
    +    [9584, 4235, 64, 64],
    +** Processing line: ~    [9634, 4187, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [2846, 79, 64, 64],
    -** Processing line: ~    [2847, 41, 64, 64],~
    +    [9634, 4187, 64, 64],
    +** Processing line: ~    [9582, 4183, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [2847, 41, 64, 64],
    -** Processing line: ~    [2783, 80, 64, 64],~
    +    [9582, 4183, 64, 64],
    +** Processing line: ~    [9402, 5114, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [2783, 80, 64, 64],
    -** Processing line: ~    [2790, 39, 64, 64],~
    +    [9402, 5114, 64, 64],
    +** Processing line: ~    [9402, 5087, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [2790, 39, 64, 64],
    -** Processing line: ~    [2727, 41, 64, 64],~
    +    [9402, 5087, 64, 64],
    +** Processing line: ~    [9347, 5113, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [2727, 41, 64, 64],
    -** Processing line: ~    [2665, 43, 64, 64],~
    +    [9347, 5113, 64, 64],
    +** Processing line: ~    [9345, 5086, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [2665, 43, 64, 64],
    -** Processing line: ~    [2605, 43, 64, 64],~
    +    [9345, 5086, 64, 64],
    +** Processing line: ~    [9287, 5114, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [2605, 43, 64, 64],
    -** Processing line: ~    [2543, 44, 64, 64],~
    +    [9287, 5114, 64, 64],
    +** Processing line: ~    [9285, 5085, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [2543, 44, 64, 64],
    -** Processing line: ~    [2480, 45, 64, 64],~
    +    [9285, 5085, 64, 64],
    +** Processing line: ~    [9245, 5114, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [2480, 45, 64, 64],
    -** Processing line: ~    [2419, 45, 64, 64],~
    +    [9245, 5114, 64, 64],
    +** Processing line: ~    [9244, 5086, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [2419, 45, 64, 64],
    -** Processing line: ~    [2357, 44, 64, 64],~
    +    [9244, 5086, 64, 64],
    +** Processing line: ~    [9336, 5445, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [2357, 44, 64, 64],
    -** Processing line: ~    [2313, 129, 64, 64],~
    +    [9336, 5445, 64, 64],
    +** Processing line: ~    [9285, 5445, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [2313, 129, 64, 64],
    -** Processing line: ~    [2313, 70, 64, 64],~
    +    [9285, 5445, 64, 64],
    +** Processing line: ~    [9337, 5395, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [2313, 70, 64, 64],
    -** Processing line: ~    [2314, 40, 64, 64],~
    +    [9337, 5395, 64, 64],
    +** Processing line: ~    [9283, 5393, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [2314, 40, 64, 64],
    -** Processing line: ~    [2517, 2385, 64, 64],~
    +    [9283, 5393, 64, 64],
    +** Processing line: ~    [8884, 4968, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [2517, 2385, 64, 64],
    -** Processing line: ~    [2452, 2385, 64, 64],~
    +    [8884, 4968, 64, 64],
    +** Processing line: ~    [8884, 4939, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [2452, 2385, 64, 64],
    -** Processing line: ~    [2390, 2386, 64, 64],~
    +    [8884, 4939, 64, 64],
    +** Processing line: ~    [8822, 4967, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [2390, 2386, 64, 64],
    -** Processing line: ~    [2328, 2386, 64, 64],~
    +    [8822, 4967, 64, 64],
    +** Processing line: ~    [8823, 4940, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [2328, 2386, 64, 64],
    -** Processing line: ~    [2264, 2386, 64, 64],~
    +    [8823, 4940, 64, 64],
    +** Processing line: ~    [8765, 4967, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [2264, 2386, 64, 64],
    -** Processing line: ~    [2200, 2386, 64, 64],~
    +    [8765, 4967, 64, 64],
    +** Processing line: ~    [8762, 4937, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [2200, 2386, 64, 64],
    -** Processing line: ~    [2137, 2387, 64, 64],~
    +    [8762, 4937, 64, 64],
    +** Processing line: ~    [8726, 4969, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [2137, 2387, 64, 64],
    -** Processing line: ~    [2071, 2385, 64, 64],~
    +    [8726, 4969, 64, 64],
    +** Processing line: ~    [8727, 4939, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [2071, 2385, 64, 64],
    -** Processing line: ~    [2016, 2389, 64, 64],~
    +    [8727, 4939, 64, 64],
    +** Processing line: ~    [7946, 5248, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [2016, 2389, 64, 64],
    -** Processing line: ~    [2517, 2341, 64, 64],~
    +    [7946, 5248, 64, 64],
    +** Processing line: ~    [7945, 5220, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [2517, 2341, 64, 64],
    -** Processing line: ~    [2518, 2316, 64, 64],~
    +    [7945, 5220, 64, 64],
    +** Processing line: ~    [7887, 5248, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [2518, 2316, 64, 64],
    -** Processing line: ~    [2456, 2316, 64, 64],~
    +    [7887, 5248, 64, 64],
    +** Processing line: ~    [7886, 5219, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [2456, 2316, 64, 64],
    -** Processing line: ~    [2393, 2316, 64, 64],~
    +    [7886, 5219, 64, 64],
    +** Processing line: ~    [7830, 5248, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [2393, 2316, 64, 64],
    -** Processing line: ~    [2328, 2317, 64, 64],~
    +    [7830, 5248, 64, 64],
    +** Processing line: ~    [7827, 5218, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [2328, 2317, 64, 64],
    -** Processing line: ~    [2264, 2316, 64, 64],~
    +    [7827, 5218, 64, 64],
    +** Processing line: ~    [7781, 5248, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [2264, 2316, 64, 64],
    -** Processing line: ~    [2207, 2318, 64, 64],~
    +    [7781, 5248, 64, 64],
    +** Processing line: ~    [7781, 5216, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [2207, 2318, 64, 64],
    -** Processing line: ~    [2144, 2317, 64, 64],~
    +    [7781, 5216, 64, 64],
    +** Processing line: ~    [6648, 4762, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [2144, 2317, 64, 64],
    -** Processing line: ~    [2081, 2316, 64, 64],~
    +    [6648, 4762, 64, 64],
    +** Processing line: ~    [6621, 4761, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [2081, 2316, 64, 64],
    -** Processing line: ~    [2015, 2342, 64, 64],~
    +    [6621, 4761, 64, 64],
    +** Processing line: ~    [5011, 4446, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [2015, 2342, 64, 64],
    -** Processing line: ~    [2016, 2315, 64, 64],~
    +    [5011, 4446, 64, 64],
    +** Processing line: ~    [4982, 4444, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [2016, 2315, 64, 64],
    -** Processing line: ~    [869, 3709, 64, 64],~
    +    [4982, 4444, 64, 64],
    +** Processing line: ~    [4146, 4641, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [869, 3709, 64, 64],
    -** Processing line: ~    [819, 3710, 64, 64],~
    +    [4146, 4641, 64, 64],
    +** Processing line: ~    [4092, 4643, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [819, 3710, 64, 64],
    -** Processing line: ~    [869, 3658, 64, 64],~
    +    [4092, 4643, 64, 64],
    +** Processing line: ~    [4145, 4589, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [869, 3658, 64, 64],
    -** Processing line: ~    [820, 3658, 64, 64],~
    +    [4145, 4589, 64, 64],
    +** Processing line: ~    [4091, 4590, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [820, 3658, 64, 64],
    -** Processing line: ~    [0, 0, 64, 64],~
    +    [4091, 4590, 64, 64],
    +** Processing line: ~    [4139, 4497, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [0, 0, 64, 64],
    -** Processing line: ~    [0, 1670, 64, 64],~
    +    [4139, 4497, 64, 64],
    +** Processing line: ~    [4135, 4437, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [0, 1670, 64, 64],
    -** Processing line: ~    [6691, 1653, 64, 64],~
    +    [4135, 4437, 64, 64],
    +** Processing line: ~    [4135, 4383, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [6691, 1653, 64, 64],
    -** Processing line: ~    [1521, 3792, 64, 64],~
    +    [4135, 4383, 64, 64],
    +** Processing line: ~    [4078, 4495, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [1521, 3792, 64, 64],
    -** Processing line: ~    [0, 5137, 64, 64],~
    +    [4078, 4495, 64, 64],
    +** Processing line: ~    [4014, 4494, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [0, 5137, 64, 64],
    -** Processing line: ~    [3898, 2400, 64, 64],~
    +    [4014, 4494, 64, 64],
    +** Processing line: ~    [3979, 4496, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [3898, 2400, 64, 64],
    -** Processing line: ~    [3835, 2400, 64, 64],~
    +    [3979, 4496, 64, 64],
    +** Processing line: ~    [4074, 4384, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [3835, 2400, 64, 64],
    -** Processing line: ~    [3771, 2400, 64, 64],~
    +    [4074, 4384, 64, 64],
    +** Processing line: ~    [4015, 4381, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [3771, 2400, 64, 64],
    -** Processing line: ~    [3708, 2401, 64, 64],~
    +    [4015, 4381, 64, 64],
    +** Processing line: ~    [3980, 4433, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [3708, 2401, 64, 64],
    -** Processing line: ~    [3646, 2401, 64, 64],~
    +    [3980, 4433, 64, 64],
    +** Processing line: ~    [3981, 4384, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [3646, 2401, 64, 64],
    -** Processing line: ~    [3587, 2401, 64, 64],~
    +    [3981, 4384, 64, 64],
    +** Processing line: ~    [3276, 4279, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [3587, 2401, 64, 64],
    -** Processing line: ~    [3530, 2401, 64, 64],~
    +    [3276, 4279, 64, 64],
    +** Processing line: ~    [3275, 4218, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [3530, 2401, 64, 64],
    -** Processing line: ~    [3897, 2340, 64, 64],~
    +    [3275, 4218, 64, 64],
    +** Processing line: ~    [3276, 4170, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [3897, 2340, 64, 64],
    -** Processing line: ~    [3897, 2295, 64, 64],~
    +    [3276, 4170, 64, 64],
    +** Processing line: ~    [3211, 4164, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [3897, 2295, 64, 64],
    -** Processing line: ~    [3834, 2296, 64, 64],~
    +    [3211, 4164, 64, 64],
    +** Processing line: ~    [3213, 4280, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [3834, 2296, 64, 64],
    -** Processing line: ~    [3773, 2295, 64, 64],~
    +    [3213, 4280, 64, 64],
    +** Processing line: ~    [3156, 4278, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [3773, 2295, 64, 64],
    -** Processing line: ~    [3710, 2296, 64, 64],~
    +    [3156, 4278, 64, 64],
    +** Processing line: ~    [3120, 4278, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [3710, 2296, 64, 64],
    -** Processing line: ~    [3656, 2295, 64, 64],~
    +    [3120, 4278, 64, 64],
    +** Processing line: ~    [3151, 4163, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [3656, 2295, 64, 64],
    -** Processing line: ~    [3593, 2294, 64, 64],~
    +    [3151, 4163, 64, 64],
    +** Processing line: ~    [3120, 4216, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [3593, 2294, 64, 64],
    -** Processing line: ~    [3527, 2339, 64, 64],~
    +    [3120, 4216, 64, 64],
    +** Processing line: ~    [3120, 4161, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [3527, 2339, 64, 64],
    -** Processing line: ~    [3531, 2293, 64, 64],~
    +    [3120, 4161, 64, 64],
    +** Processing line: ~    [1536, 4171, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [3531, 2293, 64, 64],
    -** Processing line: ~    [4152, 2903, 64, 64],~
    +    [1536, 4171, 64, 64],
    +** Processing line: ~    [1536, 4110, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [4152, 2903, 64, 64],
    -** Processing line: ~    [4155, 2858, 64, 64],~
    +    [1536, 4110, 64, 64],
    +** Processing line: ~    [1535, 4051, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [4155, 2858, 64, 64],
    -** Processing line: ~    [3942, 1306, 64, 64],~
    +    [1535, 4051, 64, 64],
    +** Processing line: ~    [1536, 3991, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [3942, 1306, 64, 64],
    -** Processing line: ~    [3942, 1279, 64, 64],~
    +    [1536, 3991, 64, 64],
    +** Processing line: ~    [1536, 3928, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [3942, 1279, 64, 64],
    -** Processing line: ~    [3879, 1306, 64, 64],~
    +    [1536, 3928, 64, 64],
    +** Processing line: ~    [1536, 3863, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [3879, 1306, 64, 64],
    -** Processing line: ~    [3881, 1278, 64, 64],~
    +    [1536, 3863, 64, 64],
    +** Processing line: ~    [1078, 4605, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [3881, 1278, 64, 64],
    -** Processing line: ~    [3819, 1305, 64, 64],~
    +    [1078, 4605, 64, 64],
    +** Processing line: ~    [1076, 4577, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [3819, 1305, 64, 64],
    -** Processing line: ~    [3819, 1277, 64, 64],~
    +    [1076, 4577, 64, 64],
    +** Processing line: ~    [1018, 4604, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [3819, 1277, 64, 64],
    -** Processing line: ~    [3756, 1306, 64, 64],~
    +    [1018, 4604, 64, 64],
    +** Processing line: ~    [1018, 4575, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [3756, 1306, 64, 64],
    -** Processing line: ~    [3756, 1277, 64, 64],~
    +    [1018, 4575, 64, 64],
    +** Processing line: ~    [957, 4606, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [3756, 1277, 64, 64],
    -** Processing line: ~    [3694, 1306, 64, 64],~
    +    [957, 4606, 64, 64],
    +** Processing line: ~    [960, 4575, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [3694, 1306, 64, 64],
    -** Processing line: ~    [3695, 1277, 64, 64],~
    +    [960, 4575, 64, 64],
    +** Processing line: ~    [918, 4602, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [918, 4602, 64, 64],
    +** Processing line: ~    [918, 4580, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [918, 4580, 64, 64],
    +** Processing line: ~    [394, 4164, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [394, 4164, 64, 64],
    +** Processing line: ~    [335, 4163, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [335, 4163, 64, 64],
    +** Processing line: ~    [274, 4161, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [274, 4161, 64, 64],
    +** Processing line: ~    [236, 4163, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [236, 4163, 64, 64],
    +** Processing line: ~    [394, 4140, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [394, 4140, 64, 64],
    +** Processing line: ~    [329, 4139, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [329, 4139, 64, 64],
    +** Processing line: ~    [268, 4139, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [268, 4139, 64, 64],
    +** Processing line: ~    [239, 4139, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [239, 4139, 64, 64],
    +** Processing line: ~    [4326, 5073, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [4326, 5073, 64, 64],
    +** Processing line: ~    [4324, 5042, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [4324, 5042, 64, 64],
    +** Processing line: ~    [4265, 5074, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [4265, 5074, 64, 64],
    +** Processing line: ~    [4263, 5042, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [4263, 5042, 64, 64],
    +** Processing line: ~    [4214, 5072, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [4214, 5072, 64, 64],
    +** Processing line: ~    [4211, 5043, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [4211, 5043, 64, 64],
    +** Processing line: ~    [4166, 5073, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [4166, 5073, 64, 64],
    +** Processing line: ~    [4164, 5041, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [4164, 5041, 64, 64],
    +** Processing line: ~    [4844, 5216, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [4844, 5216, 64, 64],
    +** Processing line: ~    [4844, 5189, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [4844, 5189, 64, 64],
    +** Processing line: ~    [4785, 5217, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [4785, 5217, 64, 64],
    +** Processing line: ~    [4790, 5187, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [4790, 5187, 64, 64],
    +** Processing line: ~    [4726, 5219, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [4726, 5219, 64, 64],
    +** Processing line: ~    [4728, 5185, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [4728, 5185, 64, 64],
    +** Processing line: ~    [4681, 5218, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [4681, 5218, 64, 64],
    +** Processing line: ~    [4684, 5186, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [4684, 5186, 64, 64],
    +** Processing line: ~    [4789, 4926, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [4789, 4926, 64, 64],
    +** Processing line: ~    [4734, 4928, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [4734, 4928, 64, 64],
    +** Processing line: ~    [4787, 4876, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [4787, 4876, 64, 64],
    +** Processing line: ~    [4738, 4874, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [4738, 4874, 64, 64],
    +** Processing line: ~    [4775, 5548, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [4775, 5548, 64, 64],
    +** Processing line: ~    [4775, 5495, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [4775, 5495, 64, 64],
    +** Processing line: ~    [4723, 5550, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [4723, 5550, 64, 64],
    +** Processing line: ~    [4725, 5494, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [4725, 5494, 64, 64],
    +** Processing line: ~    [1360, 5269, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [1360, 5269, 64, 64],
    +** Processing line: ~    [1362, 5218, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [1362, 5218, 64, 64],
    +** Processing line: ~    [1315, 5266, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [1315, 5266, 64, 64],
    +** Processing line: ~    [1282, 5266, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [1282, 5266, 64, 64],
    +** Processing line: ~    [1246, 5311, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [1246, 5311, 64, 64],
    +** Processing line: ~    [1190, 5312, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [1190, 5312, 64, 64],
    +** Processing line: ~    [1136, 5310, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [1136, 5310, 64, 64],
    +** Processing line: ~    [1121, 5427, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [1121, 5427, 64, 64],
    +** Processing line: ~    [1121, 5370, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [1121, 5370, 64, 64],
    +** Processing line: ~    [1074, 5427, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [1074, 5427, 64, 64],
    +** Processing line: ~    [1064, 5423, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [1064, 5423, 64, 64],
    +** Processing line: ~    [1052, 5417, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [1052, 5417, 64, 64],
    +** Processing line: ~    [1050, 5368, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [1050, 5368, 64, 64],
    +** Processing line: ~    [1008, 5314, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [1008, 5314, 64, 64],
    +** Processing line: ~    [997, 5307, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [997, 5307, 64, 64],
    +** Processing line: ~    [977, 5299, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [977, 5299, 64, 64],
    +** Processing line: ~    [976, 5248, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [976, 5248, 64, 64],
    +** Processing line: ~    [825, 5267, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [825, 5267, 64, 64],
    +** Processing line: ~    [826, 5213, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [826, 5213, 64, 64],
    +** Processing line: ~    [776, 5267, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [776, 5267, 64, 64],
    +** Processing line: ~    [768, 5261, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [768, 5261, 64, 64],
    +** Processing line: ~    [755, 5256, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [755, 5256, 64, 64],
    +** Processing line: ~    [753, 5209, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [753, 5209, 64, 64],
    +** Processing line: ~    [1299, 5206, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [1299, 5206, 64, 64],
    +** Processing line: ~    [1238, 5204, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [1238, 5204, 64, 64],
    +** Processing line: ~    [1178, 5203, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [1178, 5203, 64, 64],
    +** Processing line: ~    [1124, 5204, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [1124, 5204, 64, 64],
    +** Processing line: ~    [1065, 5206, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [1065, 5206, 64, 64],
    +** Processing line: ~    [1008, 5203, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [1008, 5203, 64, 64],
    +** Processing line: ~    [977, 5214, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [977, 5214, 64, 64],
    +** Processing line: ~    [410, 5313, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [410, 5313, 64, 64],
    +** Processing line: ~    [407, 5249, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [407, 5249, 64, 64],
    +** Processing line: ~    [411, 5225, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [411, 5225, 64, 64],
    +** Processing line: ~    [397, 5217, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [397, 5217, 64, 64],
    +** Processing line: ~    [378, 5209, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [378, 5209, 64, 64],
    +** Processing line: ~    [358, 5312, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [358, 5312, 64, 64],
    +** Processing line: ~    [287, 5427, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [287, 5427, 64, 64],
    +** Processing line: ~    [286, 5364, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [286, 5364, 64, 64],
    +** Processing line: ~    [300, 5313, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [300, 5313, 64, 64],
    +** Processing line: ~    [242, 5427, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [242, 5427, 64, 64],
    +** Processing line: ~    [229, 5420, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [229, 5420, 64, 64],
    +** Processing line: ~    [217, 5416, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [217, 5416, 64, 64],
    +** Processing line: ~    [215, 5364, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [215, 5364, 64, 64],
    +** Processing line: ~    [174, 5311, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [174, 5311, 64, 64],
    +** Processing line: ~    [165, 5308, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [165, 5308, 64, 64],
    +** Processing line: ~    [139, 5300, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [139, 5300, 64, 64],
    +** Processing line: ~    [141, 5236, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [141, 5236, 64, 64],
    +** Processing line: ~    [141, 5211, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [141, 5211, 64, 64],
    +** Processing line: ~    [315, 5208, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [315, 5208, 64, 64],
    +** Processing line: ~    [251, 5208, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [251, 5208, 64, 64],
    +** Processing line: ~    [211, 5211, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [211, 5211, 64, 64],
    +** Processing line: ~    [8050, 4060, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [8050, 4060, 64, 64],
    +** Processing line: ~    [7992, 4060, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [7992, 4060, 64, 64],
    +** Processing line: ~    [7929, 4060, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [7929, 4060, 64, 64],
    +** Processing line: ~    [7866, 4061, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [7866, 4061, 64, 64],
    +** Processing line: ~    [7828, 4063, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [7828, 4063, 64, 64],
    +** Processing line: ~    [7934, 4001, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [7934, 4001, 64, 64],
    +** Processing line: ~    [7935, 3936, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [7935, 3936, 64, 64],
    +** Processing line: ~    [7935, 3875, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [7935, 3875, 64, 64],
    +** Processing line: ~    [7622, 4111, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [7622, 4111, 64, 64],
    +** Processing line: ~    [7623, 4049, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [7623, 4049, 64, 64],
    +** Processing line: ~    [7707, 4018, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [7707, 4018, 64, 64],
    +** Processing line: ~    [7663, 4019, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [7663, 4019, 64, 64],
    +** Processing line: ~    [7623, 4017, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [7623, 4017, 64, 64],
    +** Processing line: ~    [7193, 4060, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [7193, 4060, 64, 64],
    +** Processing line: ~    [7131, 4059, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [7131, 4059, 64, 64],
    +** Processing line: ~    [7070, 4057, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [7070, 4057, 64, 64],
    +** Processing line: ~    [7008, 4060, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [7008, 4060, 64, 64],
    +** Processing line: ~    [6977, 4060, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [6977, 4060, 64, 64],
    +** Processing line: ~    [7080, 3998, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [7080, 3998, 64, 64],
    +** Processing line: ~    [7081, 3935, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [7081, 3935, 64, 64],
    +** Processing line: ~    [7080, 3873, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [7080, 3873, 64, 64],
    +** Processing line: ~    [6855, 4019, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [6855, 4019, 64, 64],
    +** Processing line: ~    [6790, 4018, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [6790, 4018, 64, 64],
    +** Processing line: ~    [6770, 4114, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [6770, 4114, 64, 64],
    +** Processing line: ~    [6770, 4060, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [6770, 4060, 64, 64],
    +** Processing line: ~    [6768, 4013, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [6768, 4013, 64, 64],
    +** Processing line: ~    [6345, 4060, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [6345, 4060, 64, 64],
    +** Processing line: ~    [6284, 4062, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [6284, 4062, 64, 64],
    +** Processing line: ~    [6222, 4061, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [6222, 4061, 64, 64],
    +** Processing line: ~    [6166, 4061, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [6166, 4061, 64, 64],
    +** Processing line: ~    [6124, 4066, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [6124, 4066, 64, 64],
    +** Processing line: ~    [6226, 3995, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [6226, 3995, 64, 64],
    +** Processing line: ~    [6226, 3933, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [6226, 3933, 64, 64],
    +** Processing line: ~    [6228, 3868, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [6228, 3868, 64, 64],
    +** Processing line: ~    [5916, 4113, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [5916, 4113, 64, 64],
    +** Processing line: ~    [5918, 4052, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [5918, 4052, 64, 64],
    +** Processing line: ~    [6001, 4018, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [6001, 4018, 64, 64],
    +** Processing line: ~    [5941, 4019, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [5941, 4019, 64, 64],
    +** Processing line: ~    [5918, 4020, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [5918, 4020, 64, 64],
    +** Processing line: ~    [5501, 4059, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [5501, 4059, 64, 64],
    +** Processing line: ~    [5439, 4061, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [5439, 4061, 64, 64],
    +** Processing line: ~    [5376, 4059, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [5376, 4059, 64, 64],
    +** Processing line: ~    [5312, 4058, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [5312, 4058, 64, 64],
    +** Processing line: ~    [5285, 4062, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [5285, 4062, 64, 64],
    +** Processing line: ~    [5388, 3999, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [5388, 3999, 64, 64],
    +** Processing line: ~    [5385, 3941, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [5385, 3941, 64, 64],
    +** Processing line: ~    [5384, 3874, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [5384, 3874, 64, 64],
    +** Processing line: ~    [5075, 4112, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [5075, 4112, 64, 64],
    +** Processing line: ~    [5074, 4051, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [5074, 4051, 64, 64],
    +** Processing line: ~    [5158, 4018, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [5158, 4018, 64, 64],
    +** Processing line: ~    [5095, 4020, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [5095, 4020, 64, 64],
    +** Processing line: ~    [5073, 4018, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [5073, 4018, 64, 64],
    +** Processing line: ~    [4549, 3998, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [4549, 3998, 64, 64],
    +** Processing line: ~    [4393, 3996, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [4393, 3996, 64, 64],
    +** Processing line: ~    [4547, 3938, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [4547, 3938, 64, 64],
    +** Processing line: ~    [4547, 3886, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [4547, 3886, 64, 64],
    +** Processing line: ~    [4488, 3885, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [4488, 3885, 64, 64],
    +** Processing line: ~    [4427, 3885, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [4427, 3885, 64, 64],
    +** Processing line: ~    [4395, 3938, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [4395, 3938, 64, 64],
    +** Processing line: ~    [4395, 3885, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [4395, 3885, 64, 64],
    +** Processing line: ~    [0, 0, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [0, 0, 64, 64],
    +** Processing line: ~    [0, 1670, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [0, 1670, 64, 64],
    +** Processing line: ~    [6691, 1653, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [6691, 1653, 64, 64],
    +** Processing line: ~    [1521, 3792, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [1521, 3792, 64, 64],
    +** Processing line: ~    [0, 5137, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [0, 5137, 64, 64],
    +** Processing line: ~    [0, 0, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [0, 0, 64, 64],
    +** Processing line: ~    [0, 1670, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [0, 1670, 64, 64],
    +** Processing line: ~    [6691, 1653, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [6691, 1653, 64, 64],
    +** Processing line: ~    [1521, 3792, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [1521, 3792, 64, 64],
    +** Processing line: ~    [0, 5137, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [0, 5137, 64, 64],
    +** Processing line: ~    [1215, 2421, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [1215, 2421, 64, 64],
    +** Processing line: ~    [1214, 2360, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [1214, 2360, 64, 64],
    +** Processing line: ~    [1211, 2300, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [1211, 2300, 64, 64],
    +** Processing line: ~    [1211, 2291, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [1211, 2291, 64, 64],
    +** Processing line: ~    [1158, 2420, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [1158, 2420, 64, 64],
    +** Processing line: ~    [1156, 2358, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [1156, 2358, 64, 64],
    +** Processing line: ~    [1149, 2291, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [1149, 2291, 64, 64],
    +** Processing line: ~    [1095, 2420, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [1095, 2420, 64, 64],
    +** Processing line: ~    [1030, 2418, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [1030, 2418, 64, 64],
    +** Processing line: ~    [966, 2419, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [966, 2419, 64, 64],
    +** Processing line: ~    [903, 2419, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [903, 2419, 64, 64],
    +** Processing line: ~    [852, 2419, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [852, 2419, 64, 64],
    +** Processing line: ~    [1087, 2291, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [1087, 2291, 64, 64],
    +** Processing line: ~    [1023, 2291, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [1023, 2291, 64, 64],
    +** Processing line: ~    [960, 2291, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [960, 2291, 64, 64],
    +** Processing line: ~    [896, 2292, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [896, 2292, 64, 64],
    +** Processing line: ~    [854, 2355, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [854, 2355, 64, 64],
    +** Processing line: ~    [854, 2292, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [854, 2292, 64, 64],
    +** Processing line: ~    [675, 3017, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [675, 3017, 64, 64],
    +** Processing line: ~    [622, 3017, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [622, 3017, 64, 64],
    +** Processing line: ~    [676, 2965, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [676, 2965, 64, 64],
    +** Processing line: ~    [622, 2965, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [622, 2965, 64, 64],
    +** Processing line: ~    [1560, 3212, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [1560, 3212, 64, 64],
    +** Processing line: ~    [1496, 3212, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [1496, 3212, 64, 64],
    +** Processing line: ~    [1430, 3211, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [1430, 3211, 64, 64],
    +** Processing line: ~    [1346, 3214, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [1346, 3214, 64, 64],
    +** Processing line: ~    [1410, 3213, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [1410, 3213, 64, 64],
    +** Processing line: ~    [1560, 3147, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [1560, 3147, 64, 64],
    +** Processing line: ~    [1559, 3105, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [1559, 3105, 64, 64],
    +** Processing line: ~    [1496, 3105, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [1496, 3105, 64, 64],
    +** Processing line: ~    [1442, 3105, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [1442, 3105, 64, 64],
    +** Processing line: ~    [1412, 3106, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [1412, 3106, 64, 64],
    +** Processing line: ~    [918, 4163, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [918, 4163, 64, 64],
    +** Processing line: ~    [854, 4161, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [854, 4161, 64, 64],
    +** Processing line: ~    [792, 4160, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [792, 4160, 64, 64],
    +** Processing line: ~    [729, 4159, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [729, 4159, 64, 64],
    +** Processing line: ~    [666, 4158, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [666, 4158, 64, 64],
    +** Processing line: ~    [601, 4158, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [601, 4158, 64, 64],
    +** Processing line: ~    [537, 4156, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [537, 4156, 64, 64],
    +** Processing line: ~    [918, 4137, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [918, 4137, 64, 64],
    +** Processing line: ~    [854, 4137, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [854, 4137, 64, 64],
    +** Processing line: ~    [789, 4136, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [789, 4136, 64, 64],
    +** Processing line: ~    [726, 4137, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [726, 4137, 64, 64],
    +** Processing line: ~    [661, 4137, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [661, 4137, 64, 64],
    +** Processing line: ~    [599, 4139, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [599, 4139, 64, 64],
    +** Processing line: ~    [538, 4137, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [538, 4137, 64, 64],
    +** Processing line: ~    [5378, 4254, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [5378, 4254, 64, 64],
    +** Processing line: ~    [5440, 4204, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [5440, 4204, 64, 64],
    +** Processing line: ~    [5405, 4214, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [5405, 4214, 64, 64],
    +** Processing line: ~    [5350, 4254, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [5350, 4254, 64, 64],
    +** Processing line: ~    [5439, 4177, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [5439, 4177, 64, 64],
    +** Processing line: ~    [5413, 4173, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [5413, 4173, 64, 64],
    +** Processing line: ~    [5399, 4128, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [5399, 4128, 64, 64],
    +** Processing line: ~    [5352, 4200, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [5352, 4200, 64, 64],
    +** Processing line: ~    [5352, 4158, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [5352, 4158, 64, 64],
    +** Processing line: ~    [5392, 4130, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [5392, 4130, 64, 64],
    +** Processing line: ~    [6216, 4251, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [6216, 4251, 64, 64],
    +** Processing line: ~    [6190, 4251, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [6190, 4251, 64, 64],
    +** Processing line: ~    [6279, 4200, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [6279, 4200, 64, 64],
    +** Processing line: ~    [6262, 4205, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [6262, 4205, 64, 64],
    +** Processing line: ~    [6233, 4214, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [6233, 4214, 64, 64],
    +** Processing line: ~    [6280, 4172, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [6280, 4172, 64, 64],
    +** Processing line: ~    [6256, 4169, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [6256, 4169, 64, 64],
    +** Processing line: ~    [6239, 4128, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [6239, 4128, 64, 64],
    +** Processing line: ~    [6231, 4128, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [6231, 4128, 64, 64],
    +** Processing line: ~    [6191, 4195, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [6191, 4195, 64, 64],
    +** Processing line: ~    [6190, 4158, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [6190, 4158, 64, 64],
    +** Processing line: ~    [7072, 4250, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [7072, 4250, 64, 64],
    +** Processing line: ~    [7046, 4250, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [7046, 4250, 64, 64],
    +** Processing line: ~    [7133, 4202, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [7133, 4202, 64, 64],
    +** Processing line: ~    [7107, 4209, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [7107, 4209, 64, 64],
    +** Processing line: ~    [7086, 4214, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [7086, 4214, 64, 64],
    +** Processing line: ~    [7133, 4173, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [7133, 4173, 64, 64],
    +** Processing line: ~    [7108, 4169, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [7108, 4169, 64, 64],
    +** Processing line: ~    [7092, 4127, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [7092, 4127, 64, 64],
    +** Processing line: ~    [7084, 4128, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [7084, 4128, 64, 64],
    +** Processing line: ~    [7047, 4191, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [7047, 4191, 64, 64],
    +** Processing line: ~    [7047, 4156, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [7047, 4156, 64, 64],
    +** Processing line: ~    [7926, 4252, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [7926, 4252, 64, 64],
    +** Processing line: ~    [7900, 4253, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [7900, 4253, 64, 64],
    +** Processing line: ~    [7987, 4202, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [7987, 4202, 64, 64],
    +** Processing line: ~    [7965, 4209, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [7965, 4209, 64, 64],
    +** Processing line: ~    [7942, 4216, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [7942, 4216, 64, 64],
    +** Processing line: ~    [7989, 4174, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [7989, 4174, 64, 64],
    +** Processing line: ~    [7970, 4170, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [7970, 4170, 64, 64],
    +** Processing line: ~    [7949, 4126, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [7949, 4126, 64, 64],
    +** Processing line: ~    [7901, 4196, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [7901, 4196, 64, 64],
    +** Processing line: ~    [7900, 4159, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [7900, 4159, 64, 64],
    +** Processing line: ~    [7941, 4130, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [7941, 4130, 64, 64],
    +** Processing line: ~    [2847, 379, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [2847, 379, 64, 64],
    +** Processing line: ~    [2825, 380, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [2825, 380, 64, 64],
    +** Processing line: ~    [2845, 317, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [2845, 317, 64, 64],
    +** Processing line: ~    [2829, 316, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [2829, 316, 64, 64],
    +** Processing line: ~    [2845, 255, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [2845, 255, 64, 64],
    +** Processing line: ~    [2830, 257, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [2830, 257, 64, 64],
    +** Processing line: ~    [2845, 202, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [2845, 202, 64, 64],
    +** Processing line: ~    [2829, 198, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [2829, 198, 64, 64],
    +** Processing line: ~    [2770, 169, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [2770, 169, 64, 64],
    +** Processing line: ~    [2708, 170, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [2708, 170, 64, 64],
    +** Processing line: ~    [2646, 171, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [2646, 171, 64, 64],
    +** Processing line: ~    [2582, 171, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [2582, 171, 64, 64],
    +** Processing line: ~    [2518, 171, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [2518, 171, 64, 64],
    +** Processing line: ~    [2454, 171, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [2454, 171, 64, 64],
    +** Processing line: ~    [2391, 172, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [2391, 172, 64, 64],
    +** Processing line: ~    [2332, 379, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [2332, 379, 64, 64],
    +** Processing line: ~    [2315, 379, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [2315, 379, 64, 64],
    +** Processing line: ~    [2334, 316, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [2334, 316, 64, 64],
    +** Processing line: ~    [2315, 317, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [2315, 317, 64, 64],
    +** Processing line: ~    [2332, 254, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [2332, 254, 64, 64],
    +** Processing line: ~    [2314, 254, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [2314, 254, 64, 64],
    +** Processing line: ~    [2335, 192, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [2335, 192, 64, 64],
    +** Processing line: ~    [2311, 192, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [2311, 192, 64, 64],
    +** Processing line: ~    [2846, 142, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [2846, 142, 64, 64],
    +** Processing line: ~    [2784, 140, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [2784, 140, 64, 64],
    +** Processing line: ~    [2846, 79, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [2846, 79, 64, 64],
    +** Processing line: ~    [2847, 41, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [2847, 41, 64, 64],
    +** Processing line: ~    [2783, 80, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [2783, 80, 64, 64],
    +** Processing line: ~    [2790, 39, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [2790, 39, 64, 64],
    +** Processing line: ~    [2727, 41, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [2727, 41, 64, 64],
    +** Processing line: ~    [2665, 43, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [2665, 43, 64, 64],
    +** Processing line: ~    [2605, 43, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [2605, 43, 64, 64],
    +** Processing line: ~    [2543, 44, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [2543, 44, 64, 64],
    +** Processing line: ~    [2480, 45, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [2480, 45, 64, 64],
    +** Processing line: ~    [2419, 45, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [2419, 45, 64, 64],
    +** Processing line: ~    [2357, 44, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [2357, 44, 64, 64],
    +** Processing line: ~    [2313, 129, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [2313, 129, 64, 64],
    +** Processing line: ~    [2313, 70, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [2313, 70, 64, 64],
    +** Processing line: ~    [2314, 40, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [2314, 40, 64, 64],
    +** Processing line: ~    [2517, 2385, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [2517, 2385, 64, 64],
    +** Processing line: ~    [2452, 2385, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [2452, 2385, 64, 64],
    +** Processing line: ~    [2390, 2386, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [2390, 2386, 64, 64],
    +** Processing line: ~    [2328, 2386, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [2328, 2386, 64, 64],
    +** Processing line: ~    [2264, 2386, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [2264, 2386, 64, 64],
    +** Processing line: ~    [2200, 2386, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [2200, 2386, 64, 64],
    +** Processing line: ~    [2137, 2387, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [2137, 2387, 64, 64],
    +** Processing line: ~    [2071, 2385, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [2071, 2385, 64, 64],
    +** Processing line: ~    [2016, 2389, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [2016, 2389, 64, 64],
    +** Processing line: ~    [2517, 2341, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [2517, 2341, 64, 64],
    +** Processing line: ~    [2518, 2316, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [2518, 2316, 64, 64],
    +** Processing line: ~    [2456, 2316, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [2456, 2316, 64, 64],
    +** Processing line: ~    [2393, 2316, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [2393, 2316, 64, 64],
    +** Processing line: ~    [2328, 2317, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [2328, 2317, 64, 64],
    +** Processing line: ~    [2264, 2316, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [2264, 2316, 64, 64],
    +** Processing line: ~    [2207, 2318, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [2207, 2318, 64, 64],
    +** Processing line: ~    [2144, 2317, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [2144, 2317, 64, 64],
    +** Processing line: ~    [2081, 2316, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [2081, 2316, 64, 64],
    +** Processing line: ~    [2015, 2342, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [2015, 2342, 64, 64],
    +** Processing line: ~    [2016, 2315, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [2016, 2315, 64, 64],
    +** Processing line: ~    [869, 3709, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [869, 3709, 64, 64],
    +** Processing line: ~    [819, 3710, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [819, 3710, 64, 64],
    +** Processing line: ~    [869, 3658, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [869, 3658, 64, 64],
    +** Processing line: ~    [820, 3658, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [820, 3658, 64, 64],
    +** Processing line: ~    [0, 0, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [0, 0, 64, 64],
    +** Processing line: ~    [0, 1670, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [0, 1670, 64, 64],
    +** Processing line: ~    [6691, 1653, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [6691, 1653, 64, 64],
    +** Processing line: ~    [1521, 3792, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [1521, 3792, 64, 64],
    +** Processing line: ~    [0, 5137, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [0, 5137, 64, 64],
    +** Processing line: ~    [3898, 2400, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [3898, 2400, 64, 64],
    +** Processing line: ~    [3835, 2400, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [3835, 2400, 64, 64],
    +** Processing line: ~    [3771, 2400, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [3771, 2400, 64, 64],
    +** Processing line: ~    [3708, 2401, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [3708, 2401, 64, 64],
    +** Processing line: ~    [3646, 2401, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [3646, 2401, 64, 64],
    +** Processing line: ~    [3587, 2401, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [3587, 2401, 64, 64],
    +** Processing line: ~    [3530, 2401, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [3530, 2401, 64, 64],
    +** Processing line: ~    [3897, 2340, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [3897, 2340, 64, 64],
    +** Processing line: ~    [3897, 2295, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [3897, 2295, 64, 64],
    +** Processing line: ~    [3834, 2296, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [3834, 2296, 64, 64],
    +** Processing line: ~    [3773, 2295, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [3773, 2295, 64, 64],
    +** Processing line: ~    [3710, 2296, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [3710, 2296, 64, 64],
    +** Processing line: ~    [3656, 2295, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [3656, 2295, 64, 64],
    +** Processing line: ~    [3593, 2294, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [3593, 2294, 64, 64],
    +** Processing line: ~    [3527, 2339, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [3527, 2339, 64, 64],
    +** Processing line: ~    [3531, 2293, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [3531, 2293, 64, 64],
    +** Processing line: ~    [4152, 2903, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [4152, 2903, 64, 64],
    +** Processing line: ~    [4155, 2858, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [4155, 2858, 64, 64],
    +** Processing line: ~    [3942, 1306, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [3942, 1306, 64, 64],
    +** Processing line: ~    [3942, 1279, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [3942, 1279, 64, 64],
    +** Processing line: ~    [3879, 1306, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [3879, 1306, 64, 64],
    +** Processing line: ~    [3881, 1278, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [3881, 1278, 64, 64],
    +** Processing line: ~    [3819, 1305, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [3819, 1305, 64, 64],
    +** Processing line: ~    [3819, 1277, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [3819, 1277, 64, 64],
    +** Processing line: ~    [3756, 1306, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [3756, 1306, 64, 64],
    +** Processing line: ~    [3756, 1277, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [3756, 1277, 64, 64],
    +** Processing line: ~    [3694, 1306, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [3694, 1306, 64, 64],
    +** Processing line: ~    [3695, 1277, 64, 64],~
     - Inside source: true
     *** True Line Result
         [3695, 1277, 64, 64],
     ** Processing line: ~    [3631, 1306, 64, 64],~
     - Inside source: true
     *** True Line Result
    -    [3631, 1306, 64, 64],
    -** Processing line: ~    [3632, 1278, 64, 64],~
    +    [3631, 1306, 64, 64],
    +** Processing line: ~    [3632, 1278, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [3632, 1278, 64, 64],
    +** Processing line: ~    [3565, 1306, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [3565, 1306, 64, 64],
    +** Processing line: ~    [3567, 1279, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [3567, 1279, 64, 64],
    +** Processing line: ~    [4432, 1165, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [4432, 1165, 64, 64],
    +** Processing line: ~    [4408, 1163, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [4408, 1163, 64, 64],
    +** Processing line: ~    [5123, 1003, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [5123, 1003, 64, 64],
    +** Processing line: ~    [5065, 1002, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [5065, 1002, 64, 64],
    +** Processing line: ~    [5042, 1002, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [5042, 1002, 64, 64],
    +** Processing line: ~    [6020, 1780, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [6020, 1780, 64, 64],
    +** Processing line: ~    [6020, 1756, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [6020, 1756, 64, 64],
    +** Processing line: ~    [5959, 1780, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [5959, 1780, 64, 64],
    +** Processing line: ~    [5959, 1752, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [5959, 1752, 64, 64],
    +** Processing line: ~    [5897, 1779, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [5897, 1779, 64, 64],
    +** Processing line: ~    [5899, 1752, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [5899, 1752, 64, 64],
    +** Processing line: ~    [5836, 1779, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [5836, 1779, 64, 64],
    +** Processing line: ~    [5836, 1751, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [5836, 1751, 64, 64],
    +** Processing line: ~    [5776, 1780, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [5776, 1780, 64, 64],
    +** Processing line: ~    [5776, 1754, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [5776, 1754, 64, 64],
    +** Processing line: ~    [5717, 1780, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [5717, 1780, 64, 64],
    +** Processing line: ~    [5716, 1752, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [5716, 1752, 64, 64],
    +** Processing line: ~    [5658, 1781, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [5658, 1781, 64, 64],
    +** Processing line: ~    [5658, 1755, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [5658, 1755, 64, 64],
    +** Processing line: ~    [5640, 1781, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [5640, 1781, 64, 64],
    +** Processing line: ~    [5640, 1754, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [5640, 1754, 64, 64],
    +** Processing line: ~    [5832, 2095, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [5832, 2095, 64, 64],
    +** Processing line: ~    [5782, 2093, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [5782, 2093, 64, 64],
    +** Processing line: ~    [5832, 2044, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [5832, 2044, 64, 64],
    +** Processing line: ~    [5777, 2043, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [5777, 2043, 64, 64],
    +** Processing line: ~    [4847, 2577, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [4847, 2577, 64, 64],
    +** Processing line: ~    [4795, 2577, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [4795, 2577, 64, 64],
    +** Processing line: ~    [4846, 2526, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [4846, 2526, 64, 64],
    +** Processing line: ~    [4794, 2526, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [4794, 2526, 64, 64],
    +** Processing line: ~    [8390, 923, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [8390, 923, 64, 64],
    +** Processing line: ~    [8363, 922, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [8363, 922, 64, 64],
    +** Processing line: ~    [7585, 1084, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [7585, 1084, 64, 64],
    +** Processing line: ~    [7582, 1058, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [7582, 1058, 64, 64],
    +** Processing line: ~    [7525, 1084, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [7525, 1084, 64, 64],
    +** Processing line: ~    [7524, 1056, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [7524, 1056, 64, 64],
    +** Processing line: ~    [7478, 1085, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [7478, 1085, 64, 64],
    +** Processing line: ~    [7476, 1055, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [7476, 1055, 64, 64],
    +** Processing line: ~    [7421, 1086, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [7421, 1086, 64, 64],
    +** Processing line: ~    [7421, 1052, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [7421, 1052, 64, 64],
    +** Processing line: ~    [7362, 1085, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [7362, 1085, 64, 64],
    +** Processing line: ~    [7361, 1053, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [7361, 1053, 64, 64],
    +** Processing line: ~    [7307, 1087, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [7307, 1087, 64, 64],
    +** Processing line: ~    [7307, 1054, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [7307, 1054, 64, 64],
    +** Processing line: ~    [7258, 1086, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [7258, 1086, 64, 64],
    +** Processing line: ~    [7255, 1058, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [7255, 1058, 64, 64],
    +** Processing line: ~    [7203, 1083, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [7203, 1083, 64, 64],
    +** Processing line: ~    [7203, 1055, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [7203, 1055, 64, 64],
    +** Processing line: ~    [7161, 1085, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [7161, 1085, 64, 64],
    +** Processing line: ~    [7158, 1057, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [7158, 1057, 64, 64],
    +** Processing line: ~    [7100, 1083, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [7100, 1083, 64, 64],
    +** Processing line: ~    [7099, 1058, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [7099, 1058, 64, 64],
    +** Processing line: ~    [7038, 1082, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [7038, 1082, 64, 64],
    +** Processing line: ~    [7038, 1058, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [7038, 1058, 64, 64],
    +** Processing line: ~    [6982, 1083, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [6982, 1083, 64, 64],
    +** Processing line: ~    [6984, 1057, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [6984, 1057, 64, 64],
    +** Processing line: ~    [0, 0, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [0, 0, 64, 64],
    +** Processing line: ~    [0, 1670, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [0, 1670, 64, 64],
    +** Processing line: ~    [6691, 1653, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [6691, 1653, 64, 64],
    +** Processing line: ~    [1521, 3792, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [1521, 3792, 64, 64],
    +** Processing line: ~    [0, 5137, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [0, 5137, 64, 64],
    +** Processing line: ~    [0, 0, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [0, 0, 64, 64],
    +** Processing line: ~    [0, 1670, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [0, 1670, 64, 64],
    +** Processing line: ~    [6691, 1653, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [6691, 1653, 64, 64],
    +** Processing line: ~    [1521, 3792, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [1521, 3792, 64, 64],
    +** Processing line: ~    [0, 5137, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [0, 5137, 64, 64],
    +** Processing line: ~    [0, 0, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [0, 0, 64, 64],
    +** Processing line: ~    [0, 1670, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [0, 1670, 64, 64],
    +** Processing line: ~    [6691, 1653, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [6691, 1653, 64, 64],
    +** Processing line: ~    [1521, 3792, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [1521, 3792, 64, 64],
    +** Processing line: ~    [0, 5137, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [0, 5137, 64, 64],
    +** Processing line: ~    [8346, 424, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [8346, 424, 64, 64],
    +** Processing line: ~    [8407, 376, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [8407, 376, 64, 64],
    +** Processing line: ~    [8375, 386, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [8375, 386, 64, 64],
    +** Processing line: ~    [8407, 347, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [8407, 347, 64, 64],
    +** Processing line: ~    [8388, 343, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [8388, 343, 64, 64],
    +** Processing line: ~    [8320, 423, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [8320, 423, 64, 64],
    +** Processing line: ~    [8319, 363, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [8319, 363, 64, 64],
    +** Processing line: ~    [8368, 303, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [8368, 303, 64, 64],
    +** Processing line: ~    [8359, 303, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [8359, 303, 64, 64],
    +** Processing line: ~    [8318, 330, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [8318, 330, 64, 64],
    +** Processing line: ~    [9369, 425, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [9369, 425, 64, 64],
    +** Processing line: ~    [9340, 425, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [9340, 425, 64, 64],
    +** Processing line: ~    [9431, 376, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [9431, 376, 64, 64],
    +** Processing line: ~    [9414, 382, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [9414, 382, 64, 64],
    +** Processing line: ~    [9387, 391, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [9387, 391, 64, 64],
    +** Processing line: ~    [9431, 349, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [9431, 349, 64, 64],
    +** Processing line: ~    [9412, 344, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [9412, 344, 64, 64],
    +** Processing line: ~    [9392, 305, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [9392, 305, 64, 64],
    +** Processing line: ~    [9339, 365, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [9339, 365, 64, 64],
    +** Processing line: ~    [9341, 333, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [9341, 333, 64, 64],
    +** Processing line: ~    [9384, 301, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [9384, 301, 64, 64],
    +** Processing line: ~    [7673, 1896, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [7673, 1896, 64, 64],
    +** Processing line: ~    [7642, 1834, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [7642, 1834, 64, 64],
    +** Processing line: ~    [7646, 1901, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [7646, 1901, 64, 64],
    +** Processing line: ~    [4500, 4054, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [4500, 4054, 64, 64],
    +** Processing line: ~    [4476, 4055, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [4476, 4055, 64, 64],
    +** Processing line: ~    [4459, 3997, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [4459, 3997, 64, 64],
    +** Processing line: ~    [76, 5215, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [76, 5215, 64, 64],
    +** Processing line: ~    [39, 5217, 64, 64],~
    +- Inside source: true
    +*** True Line Result
    +    [39, 5217, 64, 64],
    +** Processing line: ~    [0,       0, 10000, 40],~
    +- Inside source: true
    +*** True Line Result
    +    [0,       0, 10000, 40],
    +** Processing line: ~    [0,    1670, 3250, 60],~
    +- Inside source: true
    +*** True Line Result
    +    [0,    1670, 3250, 60],
    +** Processing line: ~    [6691, 1653, 3290, 60],~
    +- Inside source: true
    +*** True Line Result
    +    [6691, 1653, 3290, 60],
    +** Processing line: ~    [1521, 3792, 7370, 60],~
    +- Inside source: true
    +*** True Line Result
    +    [1521, 3792, 7370, 60],
    +** Processing line: ~    [0, 5137, 3290, 60]~
    +- Inside source: true
    +*** True Line Result
    +    [0, 5137, 3290, 60]
    +** Processing line: ~  ]~
    +- Inside source: true
    +*** True Line Result
    +  ]
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~  $mugs = [~
    +- Inside source: true
    +*** True Line Result
    +  $mugs = [
    +** Processing line: ~    [85, 87, 39, 43, "sprites/square-orange.png"],~
    +- Inside source: true
    +*** True Line Result
    +    [85, 87, 39, 43, "sprites/square-orange.png"],
    +** Processing line: ~    [958, 1967, 39, 43, "sprites/square-orange.png"],~
    +- Inside source: true
    +*** True Line Result
    +    [958, 1967, 39, 43, "sprites/square-orange.png"],
    +** Processing line: ~    [2537, 1734, 39, 43, "sprites/square-orange.png"],~
    +- Inside source: true
    +*** True Line Result
    +    [2537, 1734, 39, 43, "sprites/square-orange.png"],
    +** Processing line: ~    [3755, 2464, 39, 43, "sprites/square-orange.png"],~
    +- Inside source: true
    +*** True Line Result
    +    [3755, 2464, 39, 43, "sprites/square-orange.png"],
    +** Processing line: ~    [1548, 3273, 39, 43, "sprites/square-orange.png"],~
    +- Inside source: true
    +*** True Line Result
    +    [1548, 3273, 39, 43, "sprites/square-orange.png"],
    +** Processing line: ~    [2050, 220, 39, 43, "sprites/square-orange.png"],~
    +- Inside source: true
    +*** True Line Result
    +    [2050, 220, 39, 43, "sprites/square-orange.png"],
    +** Processing line: ~    [854, 297, 39, 43, "sprites/square-orange.png"],~
    +- Inside source: true
    +*** True Line Result
    +    [854, 297, 39, 43, "sprites/square-orange.png"],
    +** Processing line: ~    [343, 526, 39, 43, "sprites/square-orange.png"],~
    +- Inside source: true
    +*** True Line Result
    +    [343, 526, 39, 43, "sprites/square-orange.png"],
    +** Processing line: ~    [3454, 772, 39, 43, "sprites/square-orange.png"],~
    +- Inside source: true
    +*** True Line Result
    +    [3454, 772, 39, 43, "sprites/square-orange.png"],
    +** Processing line: ~    [5041, 298, 39, 43, "sprites/square-orange.png"],~
    +- Inside source: true
    +*** True Line Result
    +    [5041, 298, 39, 43, "sprites/square-orange.png"],
    +** Processing line: ~    [6089, 300, 39, 43, "sprites/square-orange.png"],~
    +- Inside source: true
    +*** True Line Result
    +    [6089, 300, 39, 43, "sprites/square-orange.png"],
    +** Processing line: ~    [6518, 295, 39, 43, "sprites/square-orange.png"],~
    +- Inside source: true
    +*** True Line Result
    +    [6518, 295, 39, 43, "sprites/square-orange.png"],
    +** Processing line: ~    [7661, 47, 39, 43, "sprites/square-orange.png"],~
    +- Inside source: true
    +*** True Line Result
    +    [7661, 47, 39, 43, "sprites/square-orange.png"],
    +** Processing line: ~    [9392, 1125, 39, 43, "sprites/square-orange.png"],~
    +- Inside source: true
    +*** True Line Result
    +    [9392, 1125, 39, 43, "sprites/square-orange.png"],
    +** Processing line: ~    [7298, 1152, 39, 43, "sprites/square-orange.png"],~
    +- Inside source: true
    +*** True Line Result
    +    [7298, 1152, 39, 43, "sprites/square-orange.png"],
    +** Processing line: ~    [5816, 1843, 39, 43, "sprites/square-orange.png"],~
    +- Inside source: true
    +*** True Line Result
    +    [5816, 1843, 39, 43, "sprites/square-orange.png"],
    +** Processing line: ~    [876, 3772, 39, 43, "sprites/square-orange.png"],~
    +- Inside source: true
    +*** True Line Result
    +    [876, 3772, 39, 43, "sprites/square-orange.png"],
    +** Processing line: ~    [1029, 4667, 39, 43, "sprites/square-orange.png"],~
    +- Inside source: true
    +*** True Line Result
    +    [1029, 4667, 39, 43, "sprites/square-orange.png"],
    +** Processing line: ~    [823, 5324, 39, 43, "sprites/square-orange.png"],~
    +- Inside source: true
    +*** True Line Result
    +    [823, 5324, 39, 43, "sprites/square-orange.png"],
    +** Processing line: ~    [3251, 5220, 39, 43, "sprites/square-orange.png"],~
    +- Inside source: true
    +*** True Line Result
    +    [3251, 5220, 39, 43, "sprites/square-orange.png"],
    +** Processing line: ~    [4747, 5282, 39, 43, "sprites/square-orange.png"],~
    +- Inside source: true
    +*** True Line Result
    +    [4747, 5282, 39, 43, "sprites/square-orange.png"],
    +** Processing line: ~    [9325, 5178, 39, 43, "sprites/square-orange.png"],~
    +- Inside source: true
    +*** True Line Result
    +    [9325, 5178, 39, 43, "sprites/square-orange.png"],
    +** Processing line: ~    [9635, 4298, 39, 43, "sprites/square-orange.png"],~
    +- Inside source: true
    +*** True Line Result
    +    [9635, 4298, 39, 43, "sprites/square-orange.png"],
    +** Processing line: ~    [7837, 4127, 39, 43, "sprites/square-orange.png"],~
    +- Inside source: true
    +*** True Line Result
    +    [7837, 4127, 39, 43, "sprites/square-orange.png"],
    +** Processing line: ~    [8651, 1971, 39, 43, "sprites/square-orange.png"],~
    +- Inside source: true
    +*** True Line Result
    +    [8651, 1971, 39, 43, "sprites/square-orange.png"],
    +** Processing line: ~    [6892, 2031, 39, 43, "sprites/square-orange.png"],~
    +- Inside source: true
    +*** True Line Result
    +    [6892, 2031, 39, 43, "sprites/square-orange.png"],
    +** Processing line: ~    [4626, 3882, 39, 43, "sprites/square-orange.png"],~
    +- Inside source: true
    +*** True Line Result
    +    [4626, 3882, 39, 43, "sprites/square-orange.png"],
    +** Processing line: ~    [4024, 4554, 39, 43, "sprites/square-orange.png"],~
    +- Inside source: true
    +*** True Line Result
    +    [4024, 4554, 39, 43, "sprites/square-orange.png"],
    +** Processing line: ~    [3925, 3337, 39, 43, "sprites/square-orange.png"],~
    +- Inside source: true
    +*** True Line Result
    +    [3925, 3337, 39, 43, "sprites/square-orange.png"],
    +** Processing line: ~    [5064, 1064, 39, 43, "sprites/square-orange.png"]~
    +- Inside source: true
    +*** True Line Result
    +    [5064, 1064, 39, 43, "sprites/square-orange.png"]
    +** Processing line: ~  ]~
    +- Inside source: true
    +*** True Line Result
    +  ]
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
    +*** True Line Result
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +
    +** Processing line: ~*** Platformer - Gorillas Basic - credits.txt~
    +- Header detected.
    +*** True Line Result
    +
    +*** True Line Result
    +*** Platformer - Gorillas Basic - credits.txt
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/99_genre_platformer/gorillas_basic/CREDITS.txt~
    +- Inside source: true
    +*** True Line Result
    +  # ./samples/99_genre_platformer/gorillas_basic/CREDITS.txt
    +** Processing line: ~  code: Amir Rajan, https://twitter.com/amirrajan~
    +- Inside source: true
    +*** True Line Result
    +  code: Amir Rajan, https://twitter.com/amirrajan
    +** Processing line: ~  graphics: Nick Culbertson, https://twitter.com/MobyPixel~
    +- Inside source: true
    +*** True Line Result
    +  graphics: Nick Culbertson, https://twitter.com/MobyPixel
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
    +*** True Line Result
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +
    +** Processing line: ~*** Platformer - Gorillas Basic - main.rb~
    +- Header detected.
    +*** True Line Result
    +
    +*** True Line Result
    +*** Platformer - Gorillas Basic - main.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/99_genre_platformer/gorillas_basic/app/main.rb~
    +- Inside source: true
    +*** True Line Result
    +  # ./samples/99_genre_platformer/gorillas_basic/app/main.rb
    +** Processing line: ~  class YouSoBasicGorillas~
    +- Inside source: true
    +*** True Line Result
    +  class YouSoBasicGorillas
    +** Processing line: ~    attr_accessor :outputs, :grid, :state, :inputs~
    +- Inside source: true
    +*** True Line Result
    +    attr_accessor :outputs, :grid, :state, :inputs
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    def tick~
    +- Inside source: true
    +*** True Line Result
    +    def tick
    +** Processing line: ~      defaults~
    +- Inside source: true
    +*** True Line Result
    +      defaults
    +** Processing line: ~      render~
    +- Inside source: true
    +*** True Line Result
    +      render
    +** Processing line: ~      calc~
    +- Inside source: true
    +*** True Line Result
    +      calc
    +** Processing line: ~      process_inputs~
    +- Inside source: true
    +*** True Line Result
    +      process_inputs
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    def defaults~
    +- Inside source: true
    +*** True Line Result
    +    def defaults
    +** Processing line: ~      outputs.background_color = [33, 32, 87]~
    +- Inside source: true
    +*** True Line Result
    +      outputs.background_color = [33, 32, 87]
    +** Processing line: ~      state.building_spacing       = 1~
    +- Inside source: true
    +*** True Line Result
    +      state.building_spacing       = 1
    +** Processing line: ~      state.building_room_spacing  = 15~
    +- Inside source: true
    +*** True Line Result
    +      state.building_room_spacing  = 15
    +** Processing line: ~      state.building_room_width    = 10~
    +- Inside source: true
    +*** True Line Result
    +      state.building_room_width    = 10
    +** Processing line: ~      state.building_room_height   = 15~
    +- Inside source: true
    +*** True Line Result
    +      state.building_room_height   = 15
    +** Processing line: ~      state.building_heights       = [4, 4, 6, 8, 15, 20, 18]~
    +- Inside source: true
    +*** True Line Result
    +      state.building_heights       = [4, 4, 6, 8, 15, 20, 18]
    +** Processing line: ~      state.building_room_sizes    = [5, 4, 6, 7]~
    +- Inside source: true
    +*** True Line Result
    +      state.building_room_sizes    = [5, 4, 6, 7]
    +** Processing line: ~      state.gravity                = 0.25~
    +- Inside source: true
    +*** True Line Result
    +      state.gravity                = 0.25
    +** Processing line: ~      state.first_strike         ||= :player_1~
    +- Inside source: true
    +*** True Line Result
    +      state.first_strike         ||= :player_1
    +** Processing line: ~      state.buildings            ||= []~
    +- Inside source: true
    +*** True Line Result
    +      state.buildings            ||= []
    +** Processing line: ~      state.holes                ||= []~
    +- Inside source: true
    +*** True Line Result
    +      state.holes                ||= []
    +** Processing line: ~      state.player_1_score       ||= 0~
    +- Inside source: true
    +*** True Line Result
    +      state.player_1_score       ||= 0
    +** Processing line: ~      state.player_2_score       ||= 0~
    +- Inside source: true
    +*** True Line Result
    +      state.player_2_score       ||= 0
    +** Processing line: ~      state.wind                 ||= 0~
    +- Inside source: true
    +*** True Line Result
    +      state.wind                 ||= 0
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    def render~
    +- Inside source: true
    +*** True Line Result
    +    def render
    +** Processing line: ~      render_stage~
    +- Inside source: true
    +*** True Line Result
    +      render_stage
    +** Processing line: ~      render_value_insertion~
    +- Inside source: true
    +*** True Line Result
    +      render_value_insertion
    +** Processing line: ~      render_gorillas~
    +- Inside source: true
    +*** True Line Result
    +      render_gorillas
    +** Processing line: ~      render_holes~
    +- Inside source: true
    +*** True Line Result
    +      render_holes
    +** Processing line: ~      render_banana~
    +- Inside source: true
    +*** True Line Result
    +      render_banana
    +** Processing line: ~      render_game_over~
    +- Inside source: true
    +*** True Line Result
    +      render_game_over
    +** Processing line: ~      render_score~
    +- Inside source: true
    +*** True Line Result
    +      render_score
    +** Processing line: ~      render_wind~
    +- Inside source: true
    +*** True Line Result
    +      render_wind
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    def render_score~
    +- Inside source: true
    +*** True Line Result
    +    def render_score
    +** Processing line: ~      outputs.primitives << [0, 0, 1280, 31, fancy_white].solid~
    +- Inside source: true
    +*** True Line Result
    +      outputs.primitives << [0, 0, 1280, 31, fancy_white].solid
    +** Processing line: ~      outputs.primitives << [1, 1, 1279, 29].solid~
    +- Inside source: true
    +*** True Line Result
    +      outputs.primitives << [1, 1, 1279, 29].solid
    +** Processing line: ~      outputs.labels << [  10, 25, "Score: #{state.player_1_score}", 0, 0, fancy_white]~
    +- Inside source: true
    +*** True Line Result
    +      outputs.labels << [  10, 25, "Score: #{state.player_1_score}", 0, 0, fancy_white]
    +** Processing line: ~      outputs.labels << [1270, 25, "Score: #{state.player_2_score}", 0, 2, fancy_white]~
    +- Inside source: true
    +*** True Line Result
    +      outputs.labels << [1270, 25, "Score: #{state.player_2_score}", 0, 2, fancy_white]
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    def render_wind~
    +- Inside source: true
    +*** True Line Result
    +    def render_wind
    +** Processing line: ~      outputs.primitives << [640, 12, state.wind * 500 + state.wind * 10 * rand, 4, 35, 136, 162].solid~
    +- Inside source: true
    +*** True Line Result
    +      outputs.primitives << [640, 12, state.wind * 500 + state.wind * 10 * rand, 4, 35, 136, 162].solid
    +** Processing line: ~      outputs.lines     <<  [640, 30, 640, 0, fancy_white]~
    +- Inside source: true
    +*** True Line Result
    +      outputs.lines     <<  [640, 30, 640, 0, fancy_white]
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    def render_game_over~
    +- Inside source: true
    +*** True Line Result
    +    def render_game_over
    +** Processing line: ~      return unless state.over~
    +- Inside source: true
    +*** True Line Result
    +      return unless state.over
    +** Processing line: ~      outputs.primitives << [grid.rect, 0, 0, 0, 200].solid~
    +- Inside source: true
    +*** True Line Result
    +      outputs.primitives << [grid.rect, 0, 0, 0, 200].solid
    +** Processing line: ~      outputs.primitives << [640, 370, "Game Over!!", 5, 1, fancy_white].label~
    +- Inside source: true
    +*** True Line Result
    +      outputs.primitives << [640, 370, "Game Over!!", 5, 1, fancy_white].label
    +** Processing line: ~      if state.winner == :player_1~
    +- Inside source: true
    +*** True Line Result
    +      if state.winner == :player_1
    +** Processing line: ~        outputs.primitives << [640, 340, "Player 1 Wins!!", 5, 1, fancy_white].label~
    +- Inside source: true
    +*** True Line Result
    +        outputs.primitives << [640, 340, "Player 1 Wins!!", 5, 1, fancy_white].label
    +** Processing line: ~      else~
    +- Inside source: true
    +*** True Line Result
    +      else
    +** Processing line: ~        outputs.primitives << [640, 340, "Player 2 Wins!!", 5, 1, fancy_white].label~
    +- Inside source: true
    +*** True Line Result
    +        outputs.primitives << [640, 340, "Player 2 Wins!!", 5, 1, fancy_white].label
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    def render_stage~
    +- Inside source: true
    +*** True Line Result
    +    def render_stage
    +** Processing line: ~      return unless state.stage_generated~
    +- Inside source: true
    +*** True Line Result
    +      return unless state.stage_generated
    +** Processing line: ~      return if state.stage_rendered~
    +- Inside source: true
    +*** True Line Result
    +      return if state.stage_rendered
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      outputs.static_solids << [grid.rect, 33, 32, 87]~
    +- Inside source: true
    +*** True Line Result
    +      outputs.static_solids << [grid.rect, 33, 32, 87]
    +** Processing line: ~      outputs.static_solids << state.buildings.map(&:solids)~
    +- Inside source: true
    +*** True Line Result
    +      outputs.static_solids << state.buildings.map(&:solids)
    +** Processing line: ~      state.stage_rendered = true~
    +- Inside source: true
    +*** True Line Result
    +      state.stage_rendered = true
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    def render_gorilla gorilla, id~
    +- Inside source: true
    +*** True Line Result
    +    def render_gorilla gorilla, id
    +** Processing line: ~      return unless gorilla~
    +- Inside source: true
    +*** True Line Result
    +      return unless gorilla
    +** Processing line: ~      if state.banana && state.banana.owner == gorilla~
    +- Inside source: true
    +*** True Line Result
    +      if state.banana && state.banana.owner == gorilla
    +** Processing line: ~        animation_index  = state.banana.created_at.frame_index(3, 5, false)~
    +- Inside source: true
    +*** True Line Result
    +        animation_index  = state.banana.created_at.frame_index(3, 5, false)
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~      if !animation_index~
    +- Inside source: true
    +*** True Line Result
    +      if !animation_index
    +** Processing line: ~        outputs.sprites << [gorilla.solid, "sprites/#{id}-idle.png"]~
    +- Inside source: true
    +*** True Line Result
    +        outputs.sprites << [gorilla.solid, "sprites/#{id}-idle.png"]
    +** Processing line: ~      else~
    +- Inside source: true
    +*** True Line Result
    +      else
    +** Processing line: ~        outputs.sprites << [gorilla.solid, "sprites/#{id}-#{animation_index}.png"]~
    +- Inside source: true
    +*** True Line Result
    +        outputs.sprites << [gorilla.solid, "sprites/#{id}-#{animation_index}.png"]
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    def render_gorillas~
    +- Inside source: true
    +*** True Line Result
    +    def render_gorillas
    +** Processing line: ~      render_gorilla state.player_1, :left~
    +- Inside source: true
    +*** True Line Result
    +      render_gorilla state.player_1, :left
    +** Processing line: ~      render_gorilla state.player_2, :right~
    +- Inside source: true
    +*** True Line Result
    +      render_gorilla state.player_2, :right
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    def render_value_insertion~
    +- Inside source: true
    +*** True Line Result
    +    def render_value_insertion
    +** Processing line: ~      return if state.banana~
    +- Inside source: true
    +*** True Line Result
    +      return if state.banana
    +** Processing line: ~      return if state.over~
    +- Inside source: true
    +*** True Line Result
    +      return if state.over
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      if    state.current_turn == :player_1_angle~
    +- Inside source: true
    +*** True Line Result
    +      if    state.current_turn == :player_1_angle
    +** Processing line: ~        outputs.labels << [  10, 710, "Angle:    #{state.player_1_angle}_",    fancy_white]~
    +- Inside source: true
    +*** True Line Result
    +        outputs.labels << [  10, 710, "Angle:    #{state.player_1_angle}_",    fancy_white]
    +** Processing line: ~      elsif state.current_turn == :player_1_velocity~
    +- Inside source: true
    +*** True Line Result
    +      elsif state.current_turn == :player_1_velocity
    +** Processing line: ~        outputs.labels << [  10, 710, "Angle:    #{state.player_1_angle}",     fancy_white]~
    +- Inside source: true
    +*** True Line Result
    +        outputs.labels << [  10, 710, "Angle:    #{state.player_1_angle}",     fancy_white]
    +** Processing line: ~        outputs.labels << [  10, 690, "Velocity: #{state.player_1_velocity}_", fancy_white]~
    +- Inside source: true
    +*** True Line Result
    +        outputs.labels << [  10, 690, "Velocity: #{state.player_1_velocity}_", fancy_white]
    +** Processing line: ~      elsif state.current_turn == :player_2_angle~
    +- Inside source: true
    +*** True Line Result
    +      elsif state.current_turn == :player_2_angle
    +** Processing line: ~        outputs.labels << [1120, 710, "Angle:    #{state.player_2_angle}_",    fancy_white]~
    +- Inside source: true
    +*** True Line Result
    +        outputs.labels << [1120, 710, "Angle:    #{state.player_2_angle}_",    fancy_white]
    +** Processing line: ~      elsif state.current_turn == :player_2_velocity~
    +- Inside source: true
    +*** True Line Result
    +      elsif state.current_turn == :player_2_velocity
    +** Processing line: ~        outputs.labels << [1120, 710, "Angle:    #{state.player_2_angle}",     fancy_white]~
    +- Inside source: true
    +*** True Line Result
    +        outputs.labels << [1120, 710, "Angle:    #{state.player_2_angle}",     fancy_white]
    +** Processing line: ~        outputs.labels << [1120, 690, "Velocity: #{state.player_2_velocity}_", fancy_white]~
    +- Inside source: true
    +*** True Line Result
    +        outputs.labels << [1120, 690, "Velocity: #{state.player_2_velocity}_", fancy_white]
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    def render_banana~
    +- Inside source: true
    +*** True Line Result
    +    def render_banana
    +** Processing line: ~      return unless state.banana~
    +- Inside source: true
    +*** True Line Result
    +      return unless state.banana
    +** Processing line: ~      rotation = state.tick_count.%(360) * 20~
    +- Inside source: true
    +*** True Line Result
    +      rotation = state.tick_count.%(360) * 20
    +** Processing line: ~      rotation *= -1 if state.banana.dx > 0~
    +- Inside source: true
    +*** True Line Result
    +      rotation *= -1 if state.banana.dx > 0
    +** Processing line: ~      outputs.sprites << [state.banana.x, state.banana.y, 15, 15, 'sprites/banana.png', rotation]~
    +- Inside source: true
    +*** True Line Result
    +      outputs.sprites << [state.banana.x, state.banana.y, 15, 15, 'sprites/banana.png', rotation]
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    def render_holes~
    +- Inside source: true
    +*** True Line Result
    +    def render_holes
    +** Processing line: ~      outputs.sprites << state.holes.map do |s|~
    +- Inside source: true
    +*** True Line Result
    +      outputs.sprites << state.holes.map do |s|
    +** Processing line: ~        animation_index = s.created_at.frame_index(7, 3, false)~
    +- Inside source: true
    +*** True Line Result
    +        animation_index = s.created_at.frame_index(7, 3, false)
    +** Processing line: ~        if animation_index~
    +- Inside source: true
    +*** True Line Result
    +        if animation_index
    +** Processing line: ~          [s.sprite, [s.sprite.rect, "sprites/explosion#{animation_index}.png" ]]~
    +- Inside source: true
    +*** True Line Result
    +          [s.sprite, [s.sprite.rect, "sprites/explosion#{animation_index}.png" ]]
    +** Processing line: ~        else~
    +- Inside source: true
    +*** True Line Result
    +        else
    +** Processing line: ~          s.sprite~
    +- Inside source: true
    +*** True Line Result
    +          s.sprite
    +** Processing line: ~        end~
    +- Inside source: true
    +*** True Line Result
    +        end
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    def calc~
    +- Inside source: true
    +*** True Line Result
    +    def calc
    +** Processing line: ~      calc_generate_stage~
    +- Inside source: true
    +*** True Line Result
    +      calc_generate_stage
    +** Processing line: ~      calc_current_turn~
    +- Inside source: true
    +*** True Line Result
    +      calc_current_turn
    +** Processing line: ~      calc_banana~
    +- Inside source: true
    +*** True Line Result
    +      calc_banana
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    def calc_current_turn~
    +- Inside source: true
    +*** True Line Result
    +    def calc_current_turn
    +** Processing line: ~      return if state.current_turn~
    +- Inside source: true
    +*** True Line Result
    +      return if state.current_turn
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      state.current_turn = :player_1_angle~
    +- Inside source: true
    +*** True Line Result
    +      state.current_turn = :player_1_angle
    +** Processing line: ~      state.current_turn = :player_2_angle if state.first_strike == :player_2~
    +- Inside source: true
    +*** True Line Result
    +      state.current_turn = :player_2_angle if state.first_strike == :player_2
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    def calc_generate_stage~
    +- Inside source: true
    +*** True Line Result
    +    def calc_generate_stage
    +** Processing line: ~      return if state.stage_generated~
    +- Inside source: true
    +*** True Line Result
    +      return if state.stage_generated
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      state.buildings << building_prefab(state.building_spacing + -20, *random_building_size)~
    +- Inside source: true
    +*** True Line Result
    +      state.buildings << building_prefab(state.building_spacing + -20, *random_building_size)
    +** Processing line: ~      8.numbers.inject(state.buildings) do |buildings, i|~
    +- Inside source: true
    +*** True Line Result
    +      8.numbers.inject(state.buildings) do |buildings, i|
    +** Processing line: ~        buildings <<~
    +- Inside source: true
    +*** True Line Result
    +        buildings <<
    +** Processing line: ~          building_prefab(state.building_spacing +~
    +- Inside source: true
    +*** True Line Result
    +          building_prefab(state.building_spacing +
    +** Processing line: ~                          state.buildings.last.right,~
    +- Inside source: true
    +*** True Line Result
    +                          state.buildings.last.right,
    +** Processing line: ~                          *random_building_size)~
    +- Inside source: true
    +*** True Line Result
    +                          *random_building_size)
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      building_two = state.buildings[1]~
    +- Inside source: true
    +*** True Line Result
    +      building_two = state.buildings[1]
    +** Processing line: ~      state.player_1 = new_player(building_two.x + building_two.w.fdiv(2),~
    +- Inside source: true
    +*** True Line Result
    +      state.player_1 = new_player(building_two.x + building_two.w.fdiv(2),
    +** Processing line: ~                                 building_two.h)~
    +- Inside source: true
    +*** True Line Result
    +                                 building_two.h)
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      building_nine = state.buildings[-3]~
    +- Inside source: true
    +*** True Line Result
    +      building_nine = state.buildings[-3]
    +** Processing line: ~      state.player_2 = new_player(building_nine.x + building_nine.w.fdiv(2),~
    +- Inside source: true
    +*** True Line Result
    +      state.player_2 = new_player(building_nine.x + building_nine.w.fdiv(2),
    +** Processing line: ~                                 building_nine.h)~
    +- Inside source: true
    +*** True Line Result
    +                                 building_nine.h)
    +** Processing line: ~      state.stage_generated = true~
    +- Inside source: true
    +*** True Line Result
    +      state.stage_generated = true
    +** Processing line: ~      state.wind = 1.randomize(:ratio, :sign)~
    +- Inside source: true
    +*** True Line Result
    +      state.wind = 1.randomize(:ratio, :sign)
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    def new_player x, y~
    +- Inside source: true
    +*** True Line Result
    +    def new_player x, y
    +** Processing line: ~      state.new_entity(:gorilla) do |p|~
    +- Inside source: true
    +*** True Line Result
    +      state.new_entity(:gorilla) do |p|
    +** Processing line: ~        p.x = x - 25~
    +- Inside source: true
    +*** True Line Result
    +        p.x = x - 25
    +** Processing line: ~        p.y = y~
    +- Inside source: true
    +*** True Line Result
    +        p.y = y
    +** Processing line: ~        p.solid = [p.x, p.y, 50, 50]~
    +- Inside source: true
    +*** True Line Result
    +        p.solid = [p.x, p.y, 50, 50]
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    def calc_banana~
    +- Inside source: true
    +*** True Line Result
    +    def calc_banana
    +** Processing line: ~      return unless state.banana~
    +- Inside source: true
    +*** True Line Result
    +      return unless state.banana
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      state.banana.x  += state.banana.dx~
    +- Inside source: true
    +*** True Line Result
    +      state.banana.x  += state.banana.dx
    +** Processing line: ~      state.banana.dx += state.wind.fdiv(50)~
    +- Inside source: true
    +*** True Line Result
    +      state.banana.dx += state.wind.fdiv(50)
    +** Processing line: ~      state.banana.y  += state.banana.dy~
    +- Inside source: true
    +*** True Line Result
    +      state.banana.y  += state.banana.dy
    +** Processing line: ~      state.banana.dy -= state.gravity~
    +- Inside source: true
    +*** True Line Result
    +      state.banana.dy -= state.gravity
    +** Processing line: ~      banana_collision = [state.banana.x, state.banana.y, 10, 10]~
    +- Inside source: true
    +*** True Line Result
    +      banana_collision = [state.banana.x, state.banana.y, 10, 10]
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      if state.player_1 && banana_collision.intersect_rect?(state.player_1.solid)~
    +- Inside source: true
    +*** True Line Result
    +      if state.player_1 && banana_collision.intersect_rect?(state.player_1.solid)
    +** Processing line: ~        state.over = true~
    +- Inside source: true
    +*** True Line Result
    +        state.over = true
    +** Processing line: ~        if state.banana.owner == state.player_2~
    +- Inside source: true
    +*** True Line Result
    +        if state.banana.owner == state.player_2
    +** Processing line: ~          state.winner = :player_2~
    +- Inside source: true
    +*** True Line Result
    +          state.winner = :player_2
    +** Processing line: ~        else~
    +- Inside source: true
    +*** True Line Result
    +        else
    +** Processing line: ~          state.winner = :player_1~
    +- Inside source: true
    +*** True Line Result
    +          state.winner = :player_1
    +** Processing line: ~        end~
    +- Inside source: true
    +*** True Line Result
    +        end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~        state.player_2_score += 1~
    +- Inside source: true
    +*** True Line Result
    +        state.player_2_score += 1
    +** Processing line: ~      elsif state.player_2 && banana_collision.intersect_rect?(state.player_2.solid)~
    +- Inside source: true
    +*** True Line Result
    +      elsif state.player_2 && banana_collision.intersect_rect?(state.player_2.solid)
    +** Processing line: ~        state.over = true~
    +- Inside source: true
    +*** True Line Result
    +        state.over = true
    +** Processing line: ~        if state.banana.owner == state.player_2~
    +- Inside source: true
    +*** True Line Result
    +        if state.banana.owner == state.player_2
    +** Processing line: ~          state.winner = :player_1~
    +- Inside source: true
    +*** True Line Result
    +          state.winner = :player_1
    +** Processing line: ~        else~
    +- Inside source: true
    +*** True Line Result
    +        else
    +** Processing line: ~          state.winner = :player_2~
    +- Inside source: true
    +*** True Line Result
    +          state.winner = :player_2
    +** Processing line: ~        end~
    +- Inside source: true
    +*** True Line Result
    +        end
    +** Processing line: ~        state.player_1_score += 1~
    +- Inside source: true
    +*** True Line Result
    +        state.player_1_score += 1
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      if state.over~
    +- Inside source: true
    +*** True Line Result
    +      if state.over
    +** Processing line: ~        place_hole~
    +- Inside source: true
    +*** True Line Result
    +        place_hole
    +** Processing line: ~        return~
    +- Inside source: true
    +*** True Line Result
    +        return
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      return if state.holes.any? do |h|~
    +- Inside source: true
    +*** True Line Result
    +      return if state.holes.any? do |h|
    +** Processing line: ~        h.sprite.scale_rect(0.8, 0.5, 0.5).intersect_rect? [state.banana.x, state.banana.y, 10, 10]~
    +- Inside source: true
    +*** True Line Result
    +        h.sprite.scale_rect(0.8, 0.5, 0.5).intersect_rect? [state.banana.x, state.banana.y, 10, 10]
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      return unless state.banana.y < 0 || state.buildings.any? do |b|~
    +- Inside source: true
    +*** True Line Result
    +      return unless state.banana.y < 0 || state.buildings.any? do |b|
    +** Processing line: ~        b.rect.intersect_rect? [state.banana.x, state.banana.y, 1, 1]~
     - Inside source: true
     *** True Line Result
    -    [3632, 1278, 64, 64],
    -** Processing line: ~    [3565, 1306, 64, 64],~
    +        b.rect.intersect_rect? [state.banana.x, state.banana.y, 1, 1]
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    [3565, 1306, 64, 64],
    -** Processing line: ~    [3567, 1279, 64, 64],~
    +      end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    [3567, 1279, 64, 64],
    -** Processing line: ~    [4432, 1165, 64, 64],~
    +
    +** Processing line: ~      place_hole~
     - Inside source: true
     *** True Line Result
    -    [4432, 1165, 64, 64],
    -** Processing line: ~    [4408, 1163, 64, 64],~
    +      place_hole
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    [4408, 1163, 64, 64],
    -** Processing line: ~    [5123, 1003, 64, 64],~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    [5123, 1003, 64, 64],
    -** Processing line: ~    [5065, 1002, 64, 64],~
    +
    +** Processing line: ~    def place_hole~
     - Inside source: true
     *** True Line Result
    -    [5065, 1002, 64, 64],
    -** Processing line: ~    [5042, 1002, 64, 64],~
    +    def place_hole
    +** Processing line: ~      return unless state.banana~
     - Inside source: true
     *** True Line Result
    -    [5042, 1002, 64, 64],
    -** Processing line: ~    [6020, 1780, 64, 64],~
    +      return unless state.banana
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    [6020, 1780, 64, 64],
    -** Processing line: ~    [6020, 1756, 64, 64],~
    +
    +** Processing line: ~      state.holes << state.new_entity(:banana) do |b|~
     - Inside source: true
     *** True Line Result
    -    [6020, 1756, 64, 64],
    -** Processing line: ~    [5959, 1780, 64, 64],~
    +      state.holes << state.new_entity(:banana) do |b|
    +** Processing line: ~        b.sprite = [state.banana.x - 20, state.banana.y - 20, 40, 40, 'sprites/hole.png']~
     - Inside source: true
     *** True Line Result
    -    [5959, 1780, 64, 64],
    -** Processing line: ~    [5959, 1752, 64, 64],~
    +        b.sprite = [state.banana.x - 20, state.banana.y - 20, 40, 40, 'sprites/hole.png']
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    [5959, 1752, 64, 64],
    -** Processing line: ~    [5897, 1779, 64, 64],~
    +      end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    [5897, 1779, 64, 64],
    -** Processing line: ~    [5899, 1752, 64, 64],~
    +
    +** Processing line: ~      state.banana = nil~
     - Inside source: true
     *** True Line Result
    -    [5899, 1752, 64, 64],
    -** Processing line: ~    [5836, 1779, 64, 64],~
    +      state.banana = nil
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    [5836, 1779, 64, 64],
    -** Processing line: ~    [5836, 1751, 64, 64],~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    [5836, 1751, 64, 64],
    -** Processing line: ~    [5776, 1780, 64, 64],~
    +
    +** Processing line: ~    def process_inputs_main~
     - Inside source: true
     *** True Line Result
    -    [5776, 1780, 64, 64],
    -** Processing line: ~    [5776, 1754, 64, 64],~
    +    def process_inputs_main
    +** Processing line: ~      return if state.banana~
     - Inside source: true
     *** True Line Result
    -    [5776, 1754, 64, 64],
    -** Processing line: ~    [5717, 1780, 64, 64],~
    +      return if state.banana
    +** Processing line: ~      return if state.over~
     - Inside source: true
     *** True Line Result
    -    [5717, 1780, 64, 64],
    -** Processing line: ~    [5716, 1752, 64, 64],~
    +      return if state.over
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    [5716, 1752, 64, 64],
    -** Processing line: ~    [5658, 1781, 64, 64],~
    +
    +** Processing line: ~      if inputs.keyboard.key_down.enter~
     - Inside source: true
     *** True Line Result
    -    [5658, 1781, 64, 64],
    -** Processing line: ~    [5658, 1755, 64, 64],~
    +      if inputs.keyboard.key_down.enter
    +** Processing line: ~        input_execute_turn~
     - Inside source: true
     *** True Line Result
    -    [5658, 1755, 64, 64],
    -** Processing line: ~    [5640, 1781, 64, 64],~
    +        input_execute_turn
    +** Processing line: ~      elsif inputs.keyboard.key_down.backspace~
     - Inside source: true
     *** True Line Result
    -    [5640, 1781, 64, 64],
    -** Processing line: ~    [5640, 1754, 64, 64],~
    +      elsif inputs.keyboard.key_down.backspace
    +** Processing line: ~        state.as_hash[state.current_turn] ||= ""~
     - Inside source: true
     *** True Line Result
    -    [5640, 1754, 64, 64],
    -** Processing line: ~    [5832, 2095, 64, 64],~
    +        state.as_hash[state.current_turn] ||= ""
    +** Processing line: ~        state.as_hash[state.current_turn]   = state.as_hash[state.current_turn][0..-2]~
     - Inside source: true
     *** True Line Result
    -    [5832, 2095, 64, 64],
    -** Processing line: ~    [5782, 2093, 64, 64],~
    +        state.as_hash[state.current_turn]   = state.as_hash[state.current_turn][0..-2]
    +** Processing line: ~      elsif inputs.keyboard.key_down.char~
     - Inside source: true
     *** True Line Result
    -    [5782, 2093, 64, 64],
    -** Processing line: ~    [5832, 2044, 64, 64],~
    +      elsif inputs.keyboard.key_down.char
    +** Processing line: ~        state.as_hash[state.current_turn] ||= ""~
     - Inside source: true
     *** True Line Result
    -    [5832, 2044, 64, 64],
    -** Processing line: ~    [5777, 2043, 64, 64],~
    +        state.as_hash[state.current_turn] ||= ""
    +** Processing line: ~        state.as_hash[state.current_turn]  += inputs.keyboard.key_down.char~
     - Inside source: true
     *** True Line Result
    -    [5777, 2043, 64, 64],
    -** Processing line: ~    [4847, 2577, 64, 64],~
    +        state.as_hash[state.current_turn]  += inputs.keyboard.key_down.char
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    [4847, 2577, 64, 64],
    -** Processing line: ~    [4795, 2577, 64, 64],~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    [4795, 2577, 64, 64],
    -** Processing line: ~    [4846, 2526, 64, 64],~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    [4846, 2526, 64, 64],
    -** Processing line: ~    [4794, 2526, 64, 64],~
    +
    +** Processing line: ~    def process_inputs_game_over~
     - Inside source: true
     *** True Line Result
    -    [4794, 2526, 64, 64],
    -** Processing line: ~    [8390, 923, 64, 64],~
    +    def process_inputs_game_over
    +** Processing line: ~      return unless state.over~
     - Inside source: true
     *** True Line Result
    -    [8390, 923, 64, 64],
    -** Processing line: ~    [8363, 922, 64, 64],~
    +      return unless state.over
    +** Processing line: ~      return unless inputs.keyboard.key_down.truthy_keys.any?~
     - Inside source: true
     *** True Line Result
    -    [8363, 922, 64, 64],
    -** Processing line: ~    [7585, 1084, 64, 64],~
    +      return unless inputs.keyboard.key_down.truthy_keys.any?
    +** Processing line: ~      state.over = false~
     - Inside source: true
     *** True Line Result
    -    [7585, 1084, 64, 64],
    -** Processing line: ~    [7582, 1058, 64, 64],~
    +      state.over = false
    +** Processing line: ~      outputs.static_solids.clear~
     - Inside source: true
     *** True Line Result
    -    [7582, 1058, 64, 64],
    -** Processing line: ~    [7525, 1084, 64, 64],~
    +      outputs.static_solids.clear
    +** Processing line: ~      state.buildings.clear~
     - Inside source: true
     *** True Line Result
    -    [7525, 1084, 64, 64],
    -** Processing line: ~    [7524, 1056, 64, 64],~
    +      state.buildings.clear
    +** Processing line: ~      state.holes.clear~
    +- Inside source: true
    +*** True Line Result
    +      state.holes.clear
    +** Processing line: ~      state.stage_generated = false~
    +- Inside source: true
    +*** True Line Result
    +      state.stage_generated = false
    +** Processing line: ~      state.stage_rendered = false~
    +- Inside source: true
    +*** True Line Result
    +      state.stage_rendered = false
    +** Processing line: ~      if state.first_strike == :player_1~
    +- Inside source: true
    +*** True Line Result
    +      if state.first_strike == :player_1
    +** Processing line: ~        state.first_strike = :player_2~
    +- Inside source: true
    +*** True Line Result
    +        state.first_strike = :player_2
    +** Processing line: ~      else~
    +- Inside source: true
    +*** True Line Result
    +      else
    +** Processing line: ~        state.first_strike = :player_1~
    +- Inside source: true
    +*** True Line Result
    +        state.first_strike = :player_1
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    def process_inputs~
    +- Inside source: true
    +*** True Line Result
    +    def process_inputs
    +** Processing line: ~      process_inputs_main~
    +- Inside source: true
    +*** True Line Result
    +      process_inputs_main
    +** Processing line: ~      process_inputs_game_over~
    +- Inside source: true
    +*** True Line Result
    +      process_inputs_game_over
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    def input_execute_turn~
    +- Inside source: true
    +*** True Line Result
    +    def input_execute_turn
    +** Processing line: ~      return if state.banana~
    +- Inside source: true
    +*** True Line Result
    +      return if state.banana
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      if state.current_turn == :player_1_angle && parse_or_clear!(:player_1_angle)~
    +- Inside source: true
    +*** True Line Result
    +      if state.current_turn == :player_1_angle && parse_or_clear!(:player_1_angle)
    +** Processing line: ~        state.current_turn = :player_1_velocity~
    +- Inside source: true
    +*** True Line Result
    +        state.current_turn = :player_1_velocity
    +** Processing line: ~      elsif state.current_turn == :player_1_velocity && parse_or_clear!(:player_1_velocity)~
    +- Inside source: true
    +*** True Line Result
    +      elsif state.current_turn == :player_1_velocity && parse_or_clear!(:player_1_velocity)
    +** Processing line: ~        state.current_turn = :player_2_angle~
    +- Inside source: true
    +*** True Line Result
    +        state.current_turn = :player_2_angle
    +** Processing line: ~        state.banana =~
    +- Inside source: true
    +*** True Line Result
    +        state.banana =
    +** Processing line: ~          new_banana(state.player_1,~
    +- Inside source: true
    +*** True Line Result
    +          new_banana(state.player_1,
    +** Processing line: ~                     state.player_1.x + 25,~
    +- Inside source: true
    +*** True Line Result
    +                     state.player_1.x + 25,
    +** Processing line: ~                     state.player_1.y + 60,~
    +- Inside source: true
    +*** True Line Result
    +                     state.player_1.y + 60,
    +** Processing line: ~                     state.player_1_angle,~
    +- Inside source: true
    +*** True Line Result
    +                     state.player_1_angle,
    +** Processing line: ~                     state.player_1_velocity)~
    +- Inside source: true
    +*** True Line Result
    +                     state.player_1_velocity)
    +** Processing line: ~      elsif state.current_turn == :player_2_angle && parse_or_clear!(:player_2_angle)~
    +- Inside source: true
    +*** True Line Result
    +      elsif state.current_turn == :player_2_angle && parse_or_clear!(:player_2_angle)
    +** Processing line: ~        state.current_turn = :player_2_velocity~
    +- Inside source: true
    +*** True Line Result
    +        state.current_turn = :player_2_velocity
    +** Processing line: ~      elsif state.current_turn == :player_2_velocity && parse_or_clear!(:player_2_velocity)~
    +- Inside source: true
    +*** True Line Result
    +      elsif state.current_turn == :player_2_velocity && parse_or_clear!(:player_2_velocity)
    +** Processing line: ~        state.current_turn = :player_1_angle~
    +- Inside source: true
    +*** True Line Result
    +        state.current_turn = :player_1_angle
    +** Processing line: ~        state.banana =~
    +- Inside source: true
    +*** True Line Result
    +        state.banana =
    +** Processing line: ~          new_banana(state.player_2,~
    +- Inside source: true
    +*** True Line Result
    +          new_banana(state.player_2,
    +** Processing line: ~                     state.player_2.x + 25,~
    +- Inside source: true
    +*** True Line Result
    +                     state.player_2.x + 25,
    +** Processing line: ~                     state.player_2.y + 60,~
    +- Inside source: true
    +*** True Line Result
    +                     state.player_2.y + 60,
    +** Processing line: ~                     180 - state.player_2_angle,~
    +- Inside source: true
    +*** True Line Result
    +                     180 - state.player_2_angle,
    +** Processing line: ~                     state.player_2_velocity)~
    +- Inside source: true
    +*** True Line Result
    +                     state.player_2_velocity)
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      if state.banana~
    +- Inside source: true
    +*** True Line Result
    +      if state.banana
    +** Processing line: ~        state.player_1_angle = nil~
    +- Inside source: true
    +*** True Line Result
    +        state.player_1_angle = nil
    +** Processing line: ~        state.player_1_velocity = nil~
    +- Inside source: true
    +*** True Line Result
    +        state.player_1_velocity = nil
    +** Processing line: ~        state.player_2_angle = nil~
    +- Inside source: true
    +*** True Line Result
    +        state.player_2_angle = nil
    +** Processing line: ~        state.player_2_velocity = nil~
    +- Inside source: true
    +*** True Line Result
    +        state.player_2_velocity = nil
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    def random_building_size~
    +- Inside source: true
    +*** True Line Result
    +    def random_building_size
    +** Processing line: ~      [state.building_heights.sample, state.building_room_sizes.sample]~
    +- Inside source: true
    +*** True Line Result
    +      [state.building_heights.sample, state.building_room_sizes.sample]
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    def int? v~
    +- Inside source: true
    +*** True Line Result
    +    def int? v
    +** Processing line: ~      v.to_i.to_s == v.to_s~
    +- Inside source: true
    +*** True Line Result
    +      v.to_i.to_s == v.to_s
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    def random_building_color~
    +- Inside source: true
    +*** True Line Result
    +    def random_building_color
    +** Processing line: ~      [[ 99,   0, 107],~
    +- Inside source: true
    +*** True Line Result
    +      [[ 99,   0, 107],
    +** Processing line: ~       [ 35,  64, 124],~
    +- Inside source: true
    +*** True Line Result
    +       [ 35,  64, 124],
    +** Processing line: ~       [ 35, 136, 162],~
    +- Inside source: true
    +*** True Line Result
    +       [ 35, 136, 162],
    +** Processing line: ~       ].sample~
    +- Inside source: true
    +*** True Line Result
    +       ].sample
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    def random_window_color~
    +- Inside source: true
    +*** True Line Result
    +    def random_window_color
    +** Processing line: ~      [[ 88,  62, 104],~
    +- Inside source: true
    +*** True Line Result
    +      [[ 88,  62, 104],
    +** Processing line: ~       [253, 224, 187]].sample~
    +- Inside source: true
    +*** True Line Result
    +       [253, 224, 187]].sample
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    def windows_for_building starting_x, floors, rooms~
    +- Inside source: true
    +*** True Line Result
    +    def windows_for_building starting_x, floors, rooms
    +** Processing line: ~      floors.-(1).combinations(rooms - 1).map do |floor, room|~
    +- Inside source: true
    +*** True Line Result
    +      floors.-(1).combinations(rooms - 1).map do |floor, room|
    +** Processing line: ~        [starting_x +~
    +- Inside source: true
    +*** True Line Result
    +        [starting_x +
    +** Processing line: ~         state.building_room_width.*(room) +~
    +- Inside source: true
    +*** True Line Result
    +         state.building_room_width.*(room) +
    +** Processing line: ~         state.building_room_spacing.*(room + 1),~
    +- Inside source: true
    +*** True Line Result
    +         state.building_room_spacing.*(room + 1),
    +** Processing line: ~         state.building_room_height.*(floor) +~
    +- Inside source: true
    +*** True Line Result
    +         state.building_room_height.*(floor) +
    +** Processing line: ~         state.building_room_spacing.*(floor + 1),~
    +- Inside source: true
    +*** True Line Result
    +         state.building_room_spacing.*(floor + 1),
    +** Processing line: ~         state.building_room_width,~
    +- Inside source: true
    +*** True Line Result
    +         state.building_room_width,
    +** Processing line: ~         state.building_room_height,~
    +- Inside source: true
    +*** True Line Result
    +         state.building_room_height,
    +** Processing line: ~         random_window_color]~
    +- Inside source: true
    +*** True Line Result
    +         random_window_color]
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    def building_prefab starting_x, floors, rooms~
    +- Inside source: true
    +*** True Line Result
    +    def building_prefab starting_x, floors, rooms
    +** Processing line: ~      state.new_entity(:building) do |b|~
    +- Inside source: true
    +*** True Line Result
    +      state.new_entity(:building) do |b|
    +** Processing line: ~        b.x      = starting_x~
    +- Inside source: true
    +*** True Line Result
    +        b.x      = starting_x
    +** Processing line: ~        b.y      = 0~
    +- Inside source: true
    +*** True Line Result
    +        b.y      = 0
    +** Processing line: ~        b.w      = state.building_room_width.*(rooms) +~
    +- Inside source: true
    +*** True Line Result
    +        b.w      = state.building_room_width.*(rooms) +
    +** Processing line: ~                   state.building_room_spacing.*(rooms + 1)~
    +- Inside source: true
    +*** True Line Result
    +                   state.building_room_spacing.*(rooms + 1)
    +** Processing line: ~        b.h      = state.building_room_height.*(floors) +~
    +- Inside source: true
    +*** True Line Result
    +        b.h      = state.building_room_height.*(floors) +
    +** Processing line: ~                   state.building_room_spacing.*(floors + 1)~
    +- Inside source: true
    +*** True Line Result
    +                   state.building_room_spacing.*(floors + 1)
    +** Processing line: ~        b.right  = b.x + b.w~
    +- Inside source: true
    +*** True Line Result
    +        b.right  = b.x + b.w
    +** Processing line: ~        b.rect   = [b.x, b.y, b.w, b.h]~
    +- Inside source: true
    +*** True Line Result
    +        b.rect   = [b.x, b.y, b.w, b.h]
    +** Processing line: ~        b.solids = [[b.x - 1, b.y, b.w + 2, b.h + 1, fancy_white],~
    +- Inside source: true
    +*** True Line Result
    +        b.solids = [[b.x - 1, b.y, b.w + 2, b.h + 1, fancy_white],
    +** Processing line: ~                    [b.x, b.y, b.w, b.h, random_building_color],~
    +- Inside source: true
    +*** True Line Result
    +                    [b.x, b.y, b.w, b.h, random_building_color],
    +** Processing line: ~                    windows_for_building(b.x, floors, rooms)]~
    +- Inside source: true
    +*** True Line Result
    +                    windows_for_building(b.x, floors, rooms)]
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    def parse_or_clear! game_prop~
    +- Inside source: true
    +*** True Line Result
    +    def parse_or_clear! game_prop
    +** Processing line: ~      if int? state.as_hash[game_prop]~
    +- Inside source: true
    +*** True Line Result
    +      if int? state.as_hash[game_prop]
    +** Processing line: ~        state.as_hash[game_prop] = state.as_hash[game_prop].to_i~
    +- Inside source: true
    +*** True Line Result
    +        state.as_hash[game_prop] = state.as_hash[game_prop].to_i
    +** Processing line: ~        return true~
    +- Inside source: true
    +*** True Line Result
    +        return true
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      state.as_hash[game_prop] = nil~
    +- Inside source: true
    +*** True Line Result
    +      state.as_hash[game_prop] = nil
    +** Processing line: ~      return false~
    +- Inside source: true
    +*** True Line Result
    +      return false
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    def new_banana owner, x, y, angle, velocity~
    +- Inside source: true
    +*** True Line Result
    +    def new_banana owner, x, y, angle, velocity
    +** Processing line: ~      state.new_entity(:banana) do |b|~
    +- Inside source: true
    +*** True Line Result
    +      state.new_entity(:banana) do |b|
    +** Processing line: ~        b.owner     = owner~
    +- Inside source: true
    +*** True Line Result
    +        b.owner     = owner
    +** Processing line: ~        b.x         = x~
    +- Inside source: true
    +*** True Line Result
    +        b.x         = x
    +** Processing line: ~        b.y         = y~
    +- Inside source: true
    +*** True Line Result
    +        b.y         = y
    +** Processing line: ~        b.angle     = angle % 360~
    +- Inside source: true
    +*** True Line Result
    +        b.angle     = angle % 360
    +** Processing line: ~        b.velocity  = velocity / 5~
    +- Inside source: true
    +*** True Line Result
    +        b.velocity  = velocity / 5
    +** Processing line: ~        b.dx        = b.angle.vector_x(b.velocity)~
    +- Inside source: true
    +*** True Line Result
    +        b.dx        = b.angle.vector_x(b.velocity)
    +** Processing line: ~        b.dy        = b.angle.vector_y(b.velocity)~
    +- Inside source: true
    +*** True Line Result
    +        b.dy        = b.angle.vector_y(b.velocity)
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    def fancy_white~
    +- Inside source: true
    +*** True Line Result
    +    def fancy_white
    +** Processing line: ~      [253, 252, 253]~
    +- Inside source: true
    +*** True Line Result
    +      [253, 252, 253]
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~  $you_so_basic_gorillas = YouSoBasicGorillas.new~
    +- Inside source: true
    +*** True Line Result
    +  $you_so_basic_gorillas = YouSoBasicGorillas.new
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~  def tick args~
    +- Inside source: true
    +*** True Line Result
    +  def tick args
    +** Processing line: ~    $you_so_basic_gorillas.outputs = args.outputs~
    +- Inside source: true
    +*** True Line Result
    +    $you_so_basic_gorillas.outputs = args.outputs
    +** Processing line: ~    $you_so_basic_gorillas.grid    = args.grid~
    +- Inside source: true
    +*** True Line Result
    +    $you_so_basic_gorillas.grid    = args.grid
    +** Processing line: ~    $you_so_basic_gorillas.state    = args.state~
    +- Inside source: true
    +*** True Line Result
    +    $you_so_basic_gorillas.state    = args.state
    +** Processing line: ~    $you_so_basic_gorillas.inputs  = args.inputs~
    +- Inside source: true
    +*** True Line Result
    +    $you_so_basic_gorillas.inputs  = args.inputs
    +** Processing line: ~    $you_so_basic_gorillas.tick~
    +- Inside source: true
    +*** True Line Result
    +    $you_so_basic_gorillas.tick
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
    +*** True Line Result
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +
    +** Processing line: ~*** Platformer - Gorillas Basic - tests.rb~
    +- Header detected.
    +*** True Line Result
    +
    +*** True Line Result
    +*** Platformer - Gorillas Basic - tests.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/99_genre_platformer/gorillas_basic/app/tests.rb~
    +- Inside source: true
    +*** True Line Result
    +  # ./samples/99_genre_platformer/gorillas_basic/app/tests.rb
    +** Processing line: ~  $gtk.reset 100~
    +- Inside source: true
    +*** True Line Result
    +  $gtk.reset 100
    +** Processing line: ~  $gtk.supress_framerate_warning = true~
    +- Inside source: true
    +*** True Line Result
    +  $gtk.supress_framerate_warning = true
    +** Processing line: ~  $gtk.require 'app/tests/building_generation_tests.rb'~
    +- Inside source: true
    +*** True Line Result
    +  $gtk.require 'app/tests/building_generation_tests.rb'
    +** Processing line: ~  $gtk.tests.start~
    +- Inside source: true
    +*** True Line Result
    +  $gtk.tests.start
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
    +*** True Line Result
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +
    +** Processing line: ~*** Platformer - Gorillas Basic - Tests - building_generation_tests.rb~
    +- Header detected.
    +*** True Line Result
    +
    +*** True Line Result
    +*** Platformer - Gorillas Basic - Tests - building_generation_tests.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/99_genre_platformer/gorillas_basic/app/tests/building_generation_tests.rb~
    +- Inside source: true
    +*** True Line Result
    +  # ./samples/99_genre_platformer/gorillas_basic/app/tests/building_generation_tests.rb
    +** Processing line: ~  def test_solids args, assert~
    +- Inside source: true
    +*** True Line Result
    +  def test_solids args, assert
    +** Processing line: ~    game = YouSoBasicGorillas.new~
    +- Inside source: true
    +*** True Line Result
    +    game = YouSoBasicGorillas.new
    +** Processing line: ~    game.outputs = args.outputs~
    +- Inside source: true
    +*** True Line Result
    +    game.outputs = args.outputs
    +** Processing line: ~    game.grid = args.grid~
    +- Inside source: true
    +*** True Line Result
    +    game.grid = args.grid
    +** Processing line: ~    game.state = args.state~
    +- Inside source: true
    +*** True Line Result
    +    game.state = args.state
    +** Processing line: ~    game.inputs = args.inputs~
    +- Inside source: true
    +*** True Line Result
    +    game.inputs = args.inputs
    +** Processing line: ~    game.tick~
    +- Inside source: true
    +*** True Line Result
    +    game.tick
    +** Processing line: ~    assert.true! args.state.stage_generated, "stage wasn't generated but it should have been"~
    +- Inside source: true
    +*** True Line Result
    +    assert.true! args.state.stage_generated, "stage wasn't generated but it should have been"
    +** Processing line: ~    game.tick~
    +- Inside source: true
    +*** True Line Result
    +    game.tick
    +** Processing line: ~    assert.true! args.outputs.static_solids.length > 0, "stage wasn't rendered"~
    +- Inside source: true
    +*** True Line Result
    +    assert.true! args.outputs.static_solids.length > 0, "stage wasn't rendered"
    +** Processing line: ~    number_of_building_components = (args.state.buildings.map { |b| 2 + b.solids[2].length }.inject do |sum, v| (sum || 0) + v end)~
    +- Inside source: true
    +*** True Line Result
    +    number_of_building_components = (args.state.buildings.map { |b| 2 + b.solids[2].length }.inject do |sum, v| (sum || 0) + v end)
    +** Processing line: ~    the_only_background = 1~
    +- Inside source: true
    +*** True Line Result
    +    the_only_background = 1
    +** Processing line: ~    static_solids = args.outputs.static_solids.length~
    +- Inside source: true
    +*** True Line Result
    +    static_solids = args.outputs.static_solids.length
    +** Processing line: ~    assert.true! static_solids == the_only_background.+(number_of_building_components), "not all parts of the buildings and background were rendered"~
    +- Inside source: true
    +*** True Line Result
    +    assert.true! static_solids == the_only_background.+(number_of_building_components), "not all parts of the buildings and background were rendered"
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
    +*** True Line Result
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +
    +** Processing line: ~*** Platformer - The Little Probe - main.rb~
    +- Header detected.
    +*** True Line Result
    +
    +*** True Line Result
    +*** Platformer - The Little Probe - main.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/99_genre_platformer/the_little_probe/app/main.rb~
    +- Inside source: true
    +*** True Line Result
    +  # ./samples/99_genre_platformer/the_little_probe/app/main.rb
    +** Processing line: ~  class FallingCircle~
    +- Inside source: true
    +*** True Line Result
    +  class FallingCircle
    +** Processing line: ~    attr_gtk~
    +- Inside source: true
    +*** True Line Result
    +    attr_gtk
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    def tick~
    +- Inside source: true
    +*** True Line Result
    +    def tick
    +** Processing line: ~      fiddle~
    +- Inside source: true
    +*** True Line Result
    +      fiddle
    +** Processing line: ~      defaults~
    +- Inside source: true
    +*** True Line Result
    +      defaults
    +** Processing line: ~      render~
    +- Inside source: true
    +*** True Line Result
    +      render
    +** Processing line: ~      input~
    +- Inside source: true
    +*** True Line Result
    +      input
    +** Processing line: ~      calc~
    +- Inside source: true
    +*** True Line Result
    +      calc
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    def fiddle~
    +- Inside source: true
    +*** True Line Result
    +    def fiddle
    +** Processing line: ~      state.gravity     = -0.02~
    +- Inside source: true
    +*** True Line Result
    +      state.gravity     = -0.02
    +** Processing line: ~      circle.radius     = 15~
    +- Inside source: true
    +*** True Line Result
    +      circle.radius     = 15
    +** Processing line: ~      circle.elasticity = 0.4~
    +- Inside source: true
    +*** True Line Result
    +      circle.elasticity = 0.4
    +** Processing line: ~      camera.follow_speed = 0.4 * 0.4~
    +- Inside source: true
    +*** True Line Result
    +      camera.follow_speed = 0.4 * 0.4
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    def render~
    +- Inside source: true
    +*** True Line Result
    +    def render
    +** Processing line: ~      render_stage_editor~
    +- Inside source: true
    +*** True Line Result
    +      render_stage_editor
    +** Processing line: ~      render_debug~
    +- Inside source: true
    +*** True Line Result
    +      render_debug
    +** Processing line: ~      render_game~
    +- Inside source: true
    +*** True Line Result
    +      render_game
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    def defaults~
    +- Inside source: true
    +*** True Line Result
    +    def defaults
    +** Processing line: ~      if state.tick_count == 0~
    +- Inside source: true
    +*** True Line Result
    +      if state.tick_count == 0
    +** Processing line: ~        outputs.sounds << "sounds/bg.ogg"~
    +- Inside source: true
    +*** True Line Result
    +        outputs.sounds << "sounds/bg.ogg"
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      state.storyline ||= [~
    +- Inside source: true
    +*** True Line Result
    +      state.storyline ||= [
    +** Processing line: ~        { text: "<- -> to aim, hold space to charge",                            distance_gate: 0 },~
    +- Inside source: true
    +*** True Line Result
    +        { text: "<- -> to aim, hold space to charge",                            distance_gate: 0 },
    +** Processing line: ~        { text: "the little probe - by @amirrajan, made with DragonRuby Game Toolkit", distance_gate: 0 },~
    +- Inside source: true
    +*** True Line Result
    +        { text: "the little probe - by @amirrajan, made with DragonRuby Game Toolkit", distance_gate: 0 },
    +** Processing line: ~        { text: "mission control, this is sasha. landing on europa successful.", distance_gate: 0 },~
    +- Inside source: true
    +*** True Line Result
    +        { text: "mission control, this is sasha. landing on europa successful.", distance_gate: 0 },
    +** Processing line: ~        { text: "operation \"find earth 2.0\", initiated at 8-29-2036 14:00.",   distance_gate: 0 },~
    +- Inside source: true
    +*** True Line Result
    +        { text: "operation \"find earth 2.0\", initiated at 8-29-2036 14:00.",   distance_gate: 0 },
    +** Processing line: ~        { text: "jupiter's sure is beautiful...",   distance_gate: 4000 },~
    +- Inside source: true
    +*** True Line Result
    +        { text: "jupiter's sure is beautiful...",   distance_gate: 4000 },
    +** Processing line: ~        { text: "hmm, it seems there's some kind of anomoly in the sky",   distance_gate: 7000 },~
    +- Inside source: true
    +*** True Line Result
    +        { text: "hmm, it seems there's some kind of anomoly in the sky",   distance_gate: 7000 },
    +** Processing line: ~        { text: "dancing lights, i'll call them whisps.",   distance_gate: 8000 },~
    +- Inside source: true
    +*** True Line Result
    +        { text: "dancing lights, i'll call them whisps.",   distance_gate: 8000 },
    +** Processing line: ~        { text: "#todo... look i ran out of time -_-",   distance_gate: 9000 },~
    +- Inside source: true
    +*** True Line Result
    +        { text: "#todo... look i ran out of time -_-",   distance_gate: 9000 },
    +** Processing line: ~        { text: "there's never enough time",   distance_gate: 9000 },~
    +- Inside source: true
    +*** True Line Result
    +        { text: "there's never enough time",   distance_gate: 9000 },
    +** Processing line: ~        { text: "the game jam was fun though ^_^",   distance_gate: 10000 },~
    +- Inside source: true
    +*** True Line Result
    +        { text: "the game jam was fun though ^_^",   distance_gate: 10000 },
    +** Processing line: ~      ]~
    +- Inside source: true
    +*** True Line Result
    +      ]
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      load_level force: args.state.tick_count == 0~
    +- Inside source: true
    +*** True Line Result
    +      load_level force: args.state.tick_count == 0
    +** Processing line: ~      state.line_mode            ||= :terrain~
    +- Inside source: true
    +*** True Line Result
    +      state.line_mode            ||= :terrain
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      state.sound_index          ||= 1~
     - Inside source: true
     *** True Line Result
    -    [7524, 1056, 64, 64],
    -** Processing line: ~    [7478, 1085, 64, 64],~
    +      state.sound_index          ||= 1
    +** Processing line: ~      circle.potential_lift      ||= 0~
     - Inside source: true
     *** True Line Result
    -    [7478, 1085, 64, 64],
    -** Processing line: ~    [7476, 1055, 64, 64],~
    +      circle.potential_lift      ||= 0
    +** Processing line: ~      circle.angle               ||= 90~
     - Inside source: true
     *** True Line Result
    -    [7476, 1055, 64, 64],
    -** Processing line: ~    [7421, 1086, 64, 64],~
    +      circle.angle               ||= 90
    +** Processing line: ~      circle.check_point_at      ||= -1000~
     - Inside source: true
     *** True Line Result
    -    [7421, 1086, 64, 64],
    -** Processing line: ~    [7421, 1052, 64, 64],~
    +      circle.check_point_at      ||= -1000
    +** Processing line: ~      circle.game_over_at        ||= -1000~
     - Inside source: true
     *** True Line Result
    -    [7421, 1052, 64, 64],
    -** Processing line: ~    [7362, 1085, 64, 64],~
    +      circle.game_over_at        ||= -1000
    +** Processing line: ~      circle.x                   ||= -485~
     - Inside source: true
     *** True Line Result
    -    [7362, 1085, 64, 64],
    -** Processing line: ~    [7361, 1053, 64, 64],~
    +      circle.x                   ||= -485
    +** Processing line: ~      circle.y                   ||= 12226~
     - Inside source: true
     *** True Line Result
    -    [7361, 1053, 64, 64],
    -** Processing line: ~    [7307, 1087, 64, 64],~
    +      circle.y                   ||= 12226
    +** Processing line: ~      circle.check_point_x       ||= circle.x~
     - Inside source: true
     *** True Line Result
    -    [7307, 1087, 64, 64],
    -** Processing line: ~    [7307, 1054, 64, 64],~
    +      circle.check_point_x       ||= circle.x
    +** Processing line: ~      circle.check_point_y       ||= circle.y~
     - Inside source: true
     *** True Line Result
    -    [7307, 1054, 64, 64],
    -** Processing line: ~    [7258, 1086, 64, 64],~
    +      circle.check_point_y       ||= circle.y
    +** Processing line: ~      circle.dy                  ||= 0~
     - Inside source: true
     *** True Line Result
    -    [7258, 1086, 64, 64],
    -** Processing line: ~    [7255, 1058, 64, 64],~
    +      circle.dy                  ||= 0
    +** Processing line: ~      circle.dx                  ||= 0~
     - Inside source: true
     *** True Line Result
    -    [7255, 1058, 64, 64],
    -** Processing line: ~    [7203, 1083, 64, 64],~
    +      circle.dx                  ||= 0
    +** Processing line: ~      circle.previous_dy         ||= 0~
     - Inside source: true
     *** True Line Result
    -    [7203, 1083, 64, 64],
    -** Processing line: ~    [7203, 1055, 64, 64],~
    +      circle.previous_dy         ||= 0
    +** Processing line: ~      circle.previous_dx         ||= 0~
     - Inside source: true
     *** True Line Result
    -    [7203, 1055, 64, 64],
    -** Processing line: ~    [7161, 1085, 64, 64],~
    +      circle.previous_dx         ||= 0
    +** Processing line: ~      circle.angle               ||= 0~
     - Inside source: true
     *** True Line Result
    -    [7161, 1085, 64, 64],
    -** Processing line: ~    [7158, 1057, 64, 64],~
    +      circle.angle               ||= 0
    +** Processing line: ~      circle.after_images        ||= []~
     - Inside source: true
     *** True Line Result
    -    [7158, 1057, 64, 64],
    -** Processing line: ~    [7100, 1083, 64, 64],~
    +      circle.after_images        ||= []
    +** Processing line: ~      circle.terrains_to_monitor ||= {}~
     - Inside source: true
     *** True Line Result
    -    [7100, 1083, 64, 64],
    -** Processing line: ~    [7099, 1058, 64, 64],~
    +      circle.terrains_to_monitor ||= {}
    +** Processing line: ~      circle.impact_history      ||= []~
     - Inside source: true
     *** True Line Result
    -    [7099, 1058, 64, 64],
    -** Processing line: ~    [7038, 1082, 64, 64],~
    +      circle.impact_history      ||= []
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    [7038, 1082, 64, 64],
    -** Processing line: ~    [7038, 1058, 64, 64],~
    +
    +** Processing line: ~      camera.x                   ||= 0~
     - Inside source: true
     *** True Line Result
    -    [7038, 1058, 64, 64],
    -** Processing line: ~    [6982, 1083, 64, 64],~
    +      camera.x                   ||= 0
    +** Processing line: ~      camera.y                   ||= 0~
     - Inside source: true
     *** True Line Result
    -    [6982, 1083, 64, 64],
    -** Processing line: ~    [6984, 1057, 64, 64],~
    +      camera.y                   ||= 0
    +** Processing line: ~      camera.target_x            ||= 0~
     - Inside source: true
     *** True Line Result
    -    [6984, 1057, 64, 64],
    -** Processing line: ~    [0, 0, 64, 64],~
    +      camera.target_x            ||= 0
    +** Processing line: ~      camera.target_y            ||= 0~
     - Inside source: true
     *** True Line Result
    -    [0, 0, 64, 64],
    -** Processing line: ~    [0, 1670, 64, 64],~
    +      camera.target_y            ||= 0
    +** Processing line: ~      state.snaps                ||= { }~
     - Inside source: true
     *** True Line Result
    -    [0, 1670, 64, 64],
    -** Processing line: ~    [6691, 1653, 64, 64],~
    +      state.snaps                ||= { }
    +** Processing line: ~      state.snap_number            = 10~
     - Inside source: true
     *** True Line Result
    -    [6691, 1653, 64, 64],
    -** Processing line: ~    [1521, 3792, 64, 64],~
    +      state.snap_number            = 10
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    [1521, 3792, 64, 64],
    -** Processing line: ~    [0, 5137, 64, 64],~
    +
    +** Processing line: ~      args.state.storyline_x ||= -1000~
     - Inside source: true
     *** True Line Result
    -    [0, 5137, 64, 64],
    -** Processing line: ~    [0, 0, 64, 64],~
    +      args.state.storyline_x ||= -1000
    +** Processing line: ~      args.state.storyline_y ||= -1000~
     - Inside source: true
     *** True Line Result
    -    [0, 0, 64, 64],
    -** Processing line: ~    [0, 1670, 64, 64],~
    +      args.state.storyline_y ||= -1000
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    [0, 1670, 64, 64],
    -** Processing line: ~    [6691, 1653, 64, 64],~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    [6691, 1653, 64, 64],
    -** Processing line: ~    [1521, 3792, 64, 64],~
    +
    +** Processing line: ~    def render_game~
     - Inside source: true
     *** True Line Result
    -    [1521, 3792, 64, 64],
    -** Processing line: ~    [0, 5137, 64, 64],~
    +    def render_game
    +** Processing line: ~      outputs.background_color = [0, 0, 0]~
     - Inside source: true
     *** True Line Result
    -    [0, 5137, 64, 64],
    -** Processing line: ~    [0, 0, 64, 64],~
    +      outputs.background_color = [0, 0, 0]
    +** Processing line: ~      outputs.sprites << [-circle.x + 1100,~
     - Inside source: true
     *** True Line Result
    -    [0, 0, 64, 64],
    -** Processing line: ~    [0, 1670, 64, 64],~
    +      outputs.sprites << [-circle.x + 1100,
    +** Processing line: ~                          -circle.y - 100,~
     - Inside source: true
     *** True Line Result
    -    [0, 1670, 64, 64],
    -** Processing line: ~    [6691, 1653, 64, 64],~
    +                          -circle.y - 100,
    +** Processing line: ~                          2416 * 4,~
     - Inside source: true
     *** True Line Result
    -    [6691, 1653, 64, 64],
    -** Processing line: ~    [1521, 3792, 64, 64],~
    +                          2416 * 4,
    +** Processing line: ~                          3574 * 4,~
     - Inside source: true
     *** True Line Result
    -    [1521, 3792, 64, 64],
    -** Processing line: ~    [0, 5137, 64, 64],~
    +                          3574 * 4,
    +** Processing line: ~                          'sprites/jupiter.png']~
     - Inside source: true
     *** True Line Result
    -    [0, 5137, 64, 64],
    -** Processing line: ~    [8346, 424, 64, 64],~
    +                          'sprites/jupiter.png']
    +** Processing line: ~      outputs.sprites << [-circle.x,~
     - Inside source: true
     *** True Line Result
    -    [8346, 424, 64, 64],
    -** Processing line: ~    [8407, 376, 64, 64],~
    +      outputs.sprites << [-circle.x,
    +** Processing line: ~                          -circle.y,~
     - Inside source: true
     *** True Line Result
    -    [8407, 376, 64, 64],
    -** Processing line: ~    [8375, 386, 64, 64],~
    +                          -circle.y,
    +** Processing line: ~                          2416 * 4,~
     - Inside source: true
     *** True Line Result
    -    [8375, 386, 64, 64],
    -** Processing line: ~    [8407, 347, 64, 64],~
    +                          2416 * 4,
    +** Processing line: ~                          3574 * 4,~
     - Inside source: true
     *** True Line Result
    -    [8407, 347, 64, 64],
    -** Processing line: ~    [8388, 343, 64, 64],~
    +                          3574 * 4,
    +** Processing line: ~                          'sprites/level.png']~
     - Inside source: true
     *** True Line Result
    -    [8388, 343, 64, 64],
    -** Processing line: ~    [8320, 423, 64, 64],~
    +                          'sprites/level.png']
    +** Processing line: ~      outputs.sprites << state.whisp_queue~
     - Inside source: true
     *** True Line Result
    -    [8320, 423, 64, 64],
    -** Processing line: ~    [8319, 363, 64, 64],~
    +      outputs.sprites << state.whisp_queue
    +** Processing line: ~      render_aiming_retical~
     - Inside source: true
     *** True Line Result
    -    [8319, 363, 64, 64],
    -** Processing line: ~    [8368, 303, 64, 64],~
    +      render_aiming_retical
    +** Processing line: ~      render_circle~
     - Inside source: true
     *** True Line Result
    -    [8368, 303, 64, 64],
    -** Processing line: ~    [8359, 303, 64, 64],~
    +      render_circle
    +** Processing line: ~      render_notification~
     - Inside source: true
     *** True Line Result
    -    [8359, 303, 64, 64],
    -** Processing line: ~    [8318, 330, 64, 64],~
    +      render_notification
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    [8318, 330, 64, 64],
    -** Processing line: ~    [9369, 425, 64, 64],~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    [9369, 425, 64, 64],
    -** Processing line: ~    [9340, 425, 64, 64],~
    +
    +** Processing line: ~    def render_notification~
     - Inside source: true
     *** True Line Result
    -    [9340, 425, 64, 64],
    -** Processing line: ~    [9431, 376, 64, 64],~
    +    def render_notification
    +** Processing line: ~      toast_length = 500~
     - Inside source: true
     *** True Line Result
    -    [9431, 376, 64, 64],
    -** Processing line: ~    [9414, 382, 64, 64],~
    +      toast_length = 500
    +** Processing line: ~      if circle.game_over_at.elapsed_time < toast_length~
     - Inside source: true
     *** True Line Result
    -    [9414, 382, 64, 64],
    -** Processing line: ~    [9387, 391, 64, 64],~
    +      if circle.game_over_at.elapsed_time < toast_length
    +** Processing line: ~        label_text = "..."~
     - Inside source: true
     *** True Line Result
    -    [9387, 391, 64, 64],
    -** Processing line: ~    [9431, 349, 64, 64],~
    +        label_text = "..."
    +** Processing line: ~      elsif circle.check_point_at.elapsed_time > toast_length~
     - Inside source: true
     *** True Line Result
    -    [9431, 349, 64, 64],
    -** Processing line: ~    [9412, 344, 64, 64],~
    +      elsif circle.check_point_at.elapsed_time > toast_length
    +** Processing line: ~        args.state.current_storyline = nil~
     - Inside source: true
     *** True Line Result
    -    [9412, 344, 64, 64],
    -** Processing line: ~    [9392, 305, 64, 64],~
    +        args.state.current_storyline = nil
    +** Processing line: ~        return~
     - Inside source: true
     *** True Line Result
    -    [9392, 305, 64, 64],
    -** Processing line: ~    [9339, 365, 64, 64],~
    +        return
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    [9339, 365, 64, 64],
    -** Processing line: ~    [9341, 333, 64, 64],~
    +      end
    +** Processing line: ~      if circle.check_point_at &&~
     - Inside source: true
     *** True Line Result
    -    [9341, 333, 64, 64],
    -** Processing line: ~    [9384, 301, 64, 64],~
    +      if circle.check_point_at &&
    +** Processing line: ~         circle.check_point_at.elapsed_time == 1 &&~
     - Inside source: true
     *** True Line Result
    -    [9384, 301, 64, 64],
    -** Processing line: ~    [7673, 1896, 64, 64],~
    +         circle.check_point_at.elapsed_time == 1 &&
    +** Processing line: ~         !args.state.current_storyline~
     - Inside source: true
     *** True Line Result
    -    [7673, 1896, 64, 64],
    -** Processing line: ~    [7642, 1834, 64, 64],~
    +         !args.state.current_storyline
    +** Processing line: ~         if args.state.storyline.length > 0 && args.state.distance_traveled > args.state.storyline[0][:distance_gate]~
     - Inside source: true
     *** True Line Result
    -    [7642, 1834, 64, 64],
    -** Processing line: ~    [7646, 1901, 64, 64],~
    +         if args.state.storyline.length > 0 && args.state.distance_traveled > args.state.storyline[0][:distance_gate]
    +** Processing line: ~           args.state.current_storyline = args.state.storyline.shift[:text]~
     - Inside source: true
     *** True Line Result
    -    [7646, 1901, 64, 64],
    -** Processing line: ~    [4500, 4054, 64, 64],~
    +           args.state.current_storyline = args.state.storyline.shift[:text]
    +** Processing line: ~           args.state.distance_traveled ||= 0~
     - Inside source: true
     *** True Line Result
    -    [4500, 4054, 64, 64],
    -** Processing line: ~    [4476, 4055, 64, 64],~
    +           args.state.distance_traveled ||= 0
    +** Processing line: ~           args.state.storyline_x = circle.x~
     - Inside source: true
     *** True Line Result
    -    [4476, 4055, 64, 64],
    -** Processing line: ~    [4459, 3997, 64, 64],~
    +           args.state.storyline_x = circle.x
    +** Processing line: ~           args.state.storyline_y = circle.y~
     - Inside source: true
     *** True Line Result
    -    [4459, 3997, 64, 64],
    -** Processing line: ~    [76, 5215, 64, 64],~
    +           args.state.storyline_y = circle.y
    +** Processing line: ~         end~
     - Inside source: true
     *** True Line Result
    -    [76, 5215, 64, 64],
    -** Processing line: ~    [39, 5217, 64, 64],~
    +         end
    +** Processing line: ~        return unless args.state.current_storyline~
     - Inside source: true
     *** True Line Result
    -    [39, 5217, 64, 64],
    -** Processing line: ~  ]~
    +        return unless args.state.current_storyline
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -  ]
    -** Processing line: ~~
    +      end
    +** Processing line: ~      label_text = args.state.current_storyline~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  $mugs = [~
    +      label_text = args.state.current_storyline
    +** Processing line: ~      return unless label_text~
     - Inside source: true
     *** True Line Result
    -  $mugs = [
    -** Processing line: ~    [85, 87, 39, 43, "sprites/square-orange.png"],~
    +      return unless label_text
    +** Processing line: ~      x = circle.x + camera.x~
     - Inside source: true
     *** True Line Result
    -    [85, 87, 39, 43, "sprites/square-orange.png"],
    -** Processing line: ~    [958, 1967, 39, 43, "sprites/square-orange.png"],~
    +      x = circle.x + camera.x
    +** Processing line: ~      y = circle.y + camera.y - 40~
     - Inside source: true
     *** True Line Result
    -    [958, 1967, 39, 43, "sprites/square-orange.png"],
    -** Processing line: ~    [2537, 1734, 39, 43, "sprites/square-orange.png"],~
    +      y = circle.y + camera.y - 40
    +** Processing line: ~      w = 900~
     - Inside source: true
     *** True Line Result
    -    [2537, 1734, 39, 43, "sprites/square-orange.png"],
    -** Processing line: ~    [3755, 2464, 39, 43, "sprites/square-orange.png"],~
    +      w = 900
    +** Processing line: ~      h = 30~
     - Inside source: true
     *** True Line Result
    -    [3755, 2464, 39, 43, "sprites/square-orange.png"],
    -** Processing line: ~    [1548, 3273, 39, 43, "sprites/square-orange.png"],~
    +      h = 30
    +** Processing line: ~      outputs.primitives << [x - w.idiv(2), y - h, w, h, 255, 255, 255, 255].solid~
     - Inside source: true
     *** True Line Result
    -    [1548, 3273, 39, 43, "sprites/square-orange.png"],
    -** Processing line: ~    [2050, 220, 39, 43, "sprites/square-orange.png"],~
    +      outputs.primitives << [x - w.idiv(2), y - h, w, h, 255, 255, 255, 255].solid
    +** Processing line: ~      outputs.primitives << [x - w.idiv(2), y - h, w, h, 0, 0, 0, 255].border~
     - Inside source: true
     *** True Line Result
    -    [2050, 220, 39, 43, "sprites/square-orange.png"],
    -** Processing line: ~    [854, 297, 39, 43, "sprites/square-orange.png"],~
    +      outputs.primitives << [x - w.idiv(2), y - h, w, h, 0, 0, 0, 255].border
    +** Processing line: ~      outputs.labels << [x, y - 4, label_text, 1, 1, 0, 0, 0, 255]~
     - Inside source: true
     *** True Line Result
    -    [854, 297, 39, 43, "sprites/square-orange.png"],
    -** Processing line: ~    [343, 526, 39, 43, "sprites/square-orange.png"],~
    +      outputs.labels << [x, y - 4, label_text, 1, 1, 0, 0, 0, 255]
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    [343, 526, 39, 43, "sprites/square-orange.png"],
    -** Processing line: ~    [3454, 772, 39, 43, "sprites/square-orange.png"],~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    [3454, 772, 39, 43, "sprites/square-orange.png"],
    -** Processing line: ~    [5041, 298, 39, 43, "sprites/square-orange.png"],~
    +
    +** Processing line: ~    def render_aiming_retical~
     - Inside source: true
     *** True Line Result
    -    [5041, 298, 39, 43, "sprites/square-orange.png"],
    -** Processing line: ~    [6089, 300, 39, 43, "sprites/square-orange.png"],~
    +    def render_aiming_retical
    +** Processing line: ~      outputs.sprites << [state.camera.x + circle.x + circle.angle.vector_x(circle.potential_lift * 10) - 5,~
     - Inside source: true
     *** True Line Result
    -    [6089, 300, 39, 43, "sprites/square-orange.png"],
    -** Processing line: ~    [6518, 295, 39, 43, "sprites/square-orange.png"],~
    +      outputs.sprites << [state.camera.x + circle.x + circle.angle.vector_x(circle.potential_lift * 10) - 5,
    +** Processing line: ~                          state.camera.y + circle.y + circle.angle.vector_y(circle.potential_lift * 10) - 5,~
     - Inside source: true
     *** True Line Result
    -    [6518, 295, 39, 43, "sprites/square-orange.png"],
    -** Processing line: ~    [7661, 47, 39, 43, "sprites/square-orange.png"],~
    +                          state.camera.y + circle.y + circle.angle.vector_y(circle.potential_lift * 10) - 5,
    +** Processing line: ~                          10, 10, 'sprites/circle-orange.png']~
     - Inside source: true
     *** True Line Result
    -    [7661, 47, 39, 43, "sprites/square-orange.png"],
    -** Processing line: ~    [9392, 1125, 39, 43, "sprites/square-orange.png"],~
    +                          10, 10, 'sprites/circle-orange.png']
    +** Processing line: ~      outputs.sprites << [state.camera.x + circle.x + circle.angle.vector_x(circle.radius * 3) - 5,~
     - Inside source: true
     *** True Line Result
    -    [9392, 1125, 39, 43, "sprites/square-orange.png"],
    -** Processing line: ~    [7298, 1152, 39, 43, "sprites/square-orange.png"],~
    +      outputs.sprites << [state.camera.x + circle.x + circle.angle.vector_x(circle.radius * 3) - 5,
    +** Processing line: ~                          state.camera.y + circle.y + circle.angle.vector_y(circle.radius * 3) - 5,~
     - Inside source: true
     *** True Line Result
    -    [7298, 1152, 39, 43, "sprites/square-orange.png"],
    -** Processing line: ~    [5816, 1843, 39, 43, "sprites/square-orange.png"],~
    +                          state.camera.y + circle.y + circle.angle.vector_y(circle.radius * 3) - 5,
    +** Processing line: ~                          10, 10, 'sprites/circle-orange.png', 0, 128]~
     - Inside source: true
     *** True Line Result
    -    [5816, 1843, 39, 43, "sprites/square-orange.png"],
    -** Processing line: ~    [876, 3772, 39, 43, "sprites/square-orange.png"],~
    +                          10, 10, 'sprites/circle-orange.png', 0, 128]
    +** Processing line: ~      if rand > 0.9~
     - Inside source: true
     *** True Line Result
    -    [876, 3772, 39, 43, "sprites/square-orange.png"],
    -** Processing line: ~    [1029, 4667, 39, 43, "sprites/square-orange.png"],~
    +      if rand > 0.9
    +** Processing line: ~        outputs.sprites << [state.camera.x + circle.x + circle.angle.vector_x(circle.radius * 3) - 5,~
     - Inside source: true
     *** True Line Result
    -    [1029, 4667, 39, 43, "sprites/square-orange.png"],
    -** Processing line: ~    [823, 5324, 39, 43, "sprites/square-orange.png"],~
    +        outputs.sprites << [state.camera.x + circle.x + circle.angle.vector_x(circle.radius * 3) - 5,
    +** Processing line: ~                            state.camera.y + circle.y + circle.angle.vector_y(circle.radius * 3) - 5,~
     - Inside source: true
     *** True Line Result
    -    [823, 5324, 39, 43, "sprites/square-orange.png"],
    -** Processing line: ~    [3251, 5220, 39, 43, "sprites/square-orange.png"],~
    +                            state.camera.y + circle.y + circle.angle.vector_y(circle.radius * 3) - 5,
    +** Processing line: ~                            10, 10, 'sprites/circle-white.png', 0, 128]~
     - Inside source: true
     *** True Line Result
    -    [3251, 5220, 39, 43, "sprites/square-orange.png"],
    -** Processing line: ~    [4747, 5282, 39, 43, "sprites/square-orange.png"],~
    +                            10, 10, 'sprites/circle-white.png', 0, 128]
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    [4747, 5282, 39, 43, "sprites/square-orange.png"],
    -** Processing line: ~    [9325, 5178, 39, 43, "sprites/square-orange.png"],~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    [9325, 5178, 39, 43, "sprites/square-orange.png"],
    -** Processing line: ~    [9635, 4298, 39, 43, "sprites/square-orange.png"],~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    [9635, 4298, 39, 43, "sprites/square-orange.png"],
    -** Processing line: ~    [7837, 4127, 39, 43, "sprites/square-orange.png"],~
    +
    +** Processing line: ~    def render_circle~
     - Inside source: true
     *** True Line Result
    -    [7837, 4127, 39, 43, "sprites/square-orange.png"],
    -** Processing line: ~    [8651, 1971, 39, 43, "sprites/square-orange.png"],~
    +    def render_circle
    +** Processing line: ~      outputs.sprites << circle.after_images.map do |ai|~
     - Inside source: true
     *** True Line Result
    -    [8651, 1971, 39, 43, "sprites/square-orange.png"],
    -** Processing line: ~    [6892, 2031, 39, 43, "sprites/square-orange.png"],~
    +      outputs.sprites << circle.after_images.map do |ai|
    +** Processing line: ~        ai.merge(x: ai.x + state.camera.x - circle.radius,~
     - Inside source: true
     *** True Line Result
    -    [6892, 2031, 39, 43, "sprites/square-orange.png"],
    -** Processing line: ~    [4626, 3882, 39, 43, "sprites/square-orange.png"],~
    +        ai.merge(x: ai.x + state.camera.x - circle.radius,
    +** Processing line: ~                 y: ai.y + state.camera.y - circle.radius,~
     - Inside source: true
     *** True Line Result
    -    [4626, 3882, 39, 43, "sprites/square-orange.png"],
    -** Processing line: ~    [4024, 4554, 39, 43, "sprites/square-orange.png"],~
    +                 y: ai.y + state.camera.y - circle.radius,
    +** Processing line: ~                 w: circle.radius * 2,~
     - Inside source: true
     *** True Line Result
    -    [4024, 4554, 39, 43, "sprites/square-orange.png"],
    -** Processing line: ~    [3925, 3337, 39, 43, "sprites/square-orange.png"],~
    +                 w: circle.radius * 2,
    +** Processing line: ~                 h: circle.radius * 2,~
     - Inside source: true
     *** True Line Result
    -    [3925, 3337, 39, 43, "sprites/square-orange.png"],
    -** Processing line: ~    [5064, 1064, 39, 43, "sprites/square-orange.png"]~
    +                 h: circle.radius * 2,
    +** Processing line: ~                 path: 'sprites/circle-white.png')~
     - Inside source: true
     *** True Line Result
    -    [5064, 1064, 39, 43, "sprites/square-orange.png"]
    -** Processing line: ~  ]~
    +                 path: 'sprites/circle-white.png')
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -  ]
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~#+end_src~
    -- Line was identified as the end of a code block.
    +** Processing line: ~      outputs.sprites << [(circle.x - circle.radius) + state.camera.x,~
    +- Inside source: true
     *** True Line Result
    -#+end_src
    -** Processing line: ~~
    -- End of paragraph detected.
    +      outputs.sprites << [(circle.x - circle.radius) + state.camera.x,
    +** Processing line: ~                          (circle.y - circle.radius) + state.camera.y,~
    +- Inside source: true
     *** True Line Result
    -
    -** Processing line: ~*** Platformer - Gorillas Basic - credits.txt~
    -- Header detected.
    +                          (circle.y - circle.radius) + state.camera.y,
    +** Processing line: ~                          circle.radius * 2,~
    +- Inside source: true
     *** True Line Result
    -
    +                          circle.radius * 2,
    +** Processing line: ~                          circle.radius * 2,~
    +- Inside source: true
     *** True Line Result
    -*** Platformer - Gorillas Basic - credits.txt
    -** Processing line: ~#+begin_src ruby~
    -- Line was identified as the beginning of a code block.
    +                          circle.radius * 2,
    +** Processing line: ~                          'sprites/probe.png']~
    +- Inside source: true
     *** True Line Result
    -
    +                          'sprites/probe.png']
    +** Processing line: ~    end~
    +- Inside source: true
     *** True Line Result
    -#+begin_src ruby
    -** Processing line: ~  # ./samples/99_genre_platformer/gorillas_basic/CREDITS.txt~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  # ./samples/99_genre_platformer/gorillas_basic/CREDITS.txt
    -** Processing line: ~  code: Amir Rajan, https://twitter.com/amirrajan~
    +
    +** Processing line: ~    def render_debug~
     - Inside source: true
     *** True Line Result
    -  code: Amir Rajan, https://twitter.com/amirrajan
    -** Processing line: ~  graphics: Nick Culbertson, https://twitter.com/MobyPixel~
    +    def render_debug
    +** Processing line: ~      return unless state.debug_mode~
     - Inside source: true
     *** True Line Result
    -  graphics: Nick Culbertson, https://twitter.com/MobyPixel
    +      return unless state.debug_mode
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~~
    +** Processing line: ~      outputs.labels << [10, 30, state.line_mode, 0, 0, 0, 0, 0]~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~#+end_src~
    -- Line was identified as the end of a code block.
    +      outputs.labels << [10, 30, state.line_mode, 0, 0, 0, 0, 0]
    +** Processing line: ~      outputs.labels << [12, 32, state.line_mode, 0, 0, 255, 255, 255]~
    +- Inside source: true
     *** True Line Result
    -#+end_src
    +      outputs.labels << [12, 32, state.line_mode, 0, 0, 255, 255, 255]
     ** Processing line: ~~
    -- End of paragraph detected.
    -*** True Line Result
    -
    -** Processing line: ~*** Platformer - Gorillas Basic - main.rb~
    -- Header detected.
    +- Inside source: true
     *** True Line Result
     
    +** Processing line: ~      args.outputs.lines << trajectory(circle).line.to_hash.tap do |h|~
    +- Inside source: true
     *** True Line Result
    -*** Platformer - Gorillas Basic - main.rb
    -** Processing line: ~#+begin_src ruby~
    -- Line was identified as the beginning of a code block.
    +      args.outputs.lines << trajectory(circle).line.to_hash.tap do |h|
    +** Processing line: ~        h[:x] += state.camera.x~
    +- Inside source: true
     *** True Line Result
    -
    +        h[:x] += state.camera.x
    +** Processing line: ~        h[:y] += state.camera.y~
    +- Inside source: true
     *** True Line Result
    -#+begin_src ruby
    -** Processing line: ~  # ./samples/99_genre_platformer/gorillas_basic/app/main.rb~
    +        h[:y] += state.camera.y
    +** Processing line: ~        h[:x2] += state.camera.x~
     - Inside source: true
     *** True Line Result
    -  # ./samples/99_genre_platformer/gorillas_basic/app/main.rb
    -** Processing line: ~  class YouSoBasicGorillas~
    +        h[:x2] += state.camera.x
    +** Processing line: ~        h[:y2] += state.camera.y~
     - Inside source: true
     *** True Line Result
    -  class YouSoBasicGorillas
    -** Processing line: ~    attr_accessor :outputs, :grid, :state, :inputs~
    +        h[:y2] += state.camera.y
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    attr_accessor :outputs, :grid, :state, :inputs
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def tick~
    +** Processing line: ~      outputs.primitives << state.terrain.find_all do |t|~
     - Inside source: true
     *** True Line Result
    -    def tick
    -** Processing line: ~      defaults~
    +      outputs.primitives << state.terrain.find_all do |t|
    +** Processing line: ~        circle.x.between?(t.x - 640, t.x2 + 640) || circle.y.between?(t.y - 360, t.y2 + 360)~
     - Inside source: true
     *** True Line Result
    -      defaults
    -** Processing line: ~      render~
    +        circle.x.between?(t.x - 640, t.x2 + 640) || circle.y.between?(t.y - 360, t.y2 + 360)
    +** Processing line: ~      end.map do |t|~
     - Inside source: true
     *** True Line Result
    -      render
    -** Processing line: ~      calc~
    +      end.map do |t|
    +** Processing line: ~        [~
     - Inside source: true
     *** True Line Result
    -      calc
    -** Processing line: ~      process_inputs~
    +        [
    +** Processing line: ~          t.line.associate(r: 0, g: 255, b: 0) do |h|~
     - Inside source: true
     *** True Line Result
    -      process_inputs
    -** Processing line: ~    end~
    +          t.line.associate(r: 0, g: 255, b: 0) do |h|
    +** Processing line: ~            h.x  += state.camera.x~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +            h.x  += state.camera.x
    +** Processing line: ~            h.y  += state.camera.y~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def defaults~
    +            h.y  += state.camera.y
    +** Processing line: ~            h.x2 += state.camera.x~
     - Inside source: true
     *** True Line Result
    -    def defaults
    -** Processing line: ~      outputs.background_color = [33, 32, 87]~
    +            h.x2 += state.camera.x
    +** Processing line: ~            h.y2 += state.camera.y~
     - Inside source: true
     *** True Line Result
    -      outputs.background_color = [33, 32, 87]
    -** Processing line: ~      state.building_spacing       = 1~
    +            h.y2 += state.camera.y
    +** Processing line: ~            if circle.rect.intersect_rect? t[:rect]~
     - Inside source: true
     *** True Line Result
    -      state.building_spacing       = 1
    -** Processing line: ~      state.building_room_spacing  = 15~
    +            if circle.rect.intersect_rect? t[:rect]
    +** Processing line: ~              h[:r] = 255~
     - Inside source: true
     *** True Line Result
    -      state.building_room_spacing  = 15
    -** Processing line: ~      state.building_room_width    = 10~
    +              h[:r] = 255
    +** Processing line: ~              h[:g] = 0~
     - Inside source: true
     *** True Line Result
    -      state.building_room_width    = 10
    -** Processing line: ~      state.building_room_height   = 15~
    +              h[:g] = 0
    +** Processing line: ~            end~
     - Inside source: true
     *** True Line Result
    -      state.building_room_height   = 15
    -** Processing line: ~      state.building_heights       = [4, 4, 6, 8, 15, 20, 18]~
    +            end
    +** Processing line: ~            h~
     - Inside source: true
     *** True Line Result
    -      state.building_heights       = [4, 4, 6, 8, 15, 20, 18]
    -** Processing line: ~      state.building_room_sizes    = [5, 4, 6, 7]~
    +            h
    +** Processing line: ~          end,~
     - Inside source: true
     *** True Line Result
    -      state.building_room_sizes    = [5, 4, 6, 7]
    -** Processing line: ~      state.gravity                = 0.25~
    +          end,
    +** Processing line: ~          t[:rect].border.associate(r: 255, g: 0, b: 0) do |h|~
     - Inside source: true
     *** True Line Result
    -      state.gravity                = 0.25
    -** Processing line: ~      state.first_strike         ||= :player_1~
    +          t[:rect].border.associate(r: 255, g: 0, b: 0) do |h|
    +** Processing line: ~            h.x += state.camera.x~
     - Inside source: true
     *** True Line Result
    -      state.first_strike         ||= :player_1
    -** Processing line: ~      state.buildings            ||= []~
    +            h.x += state.camera.x
    +** Processing line: ~            h.y += state.camera.y~
     - Inside source: true
     *** True Line Result
    -      state.buildings            ||= []
    -** Processing line: ~      state.holes                ||= []~
    +            h.y += state.camera.y
    +** Processing line: ~            h.b = 255 if line_near_rect? circle.rect, t~
     - Inside source: true
     *** True Line Result
    -      state.holes                ||= []
    -** Processing line: ~      state.player_1_score       ||= 0~
    +            h.b = 255 if line_near_rect? circle.rect, t
    +** Processing line: ~            h~
     - Inside source: true
     *** True Line Result
    -      state.player_1_score       ||= 0
    -** Processing line: ~      state.player_2_score       ||= 0~
    +            h
    +** Processing line: ~          end~
     - Inside source: true
     *** True Line Result
    -      state.player_2_score       ||= 0
    -** Processing line: ~      state.wind                 ||= 0~
    +          end
    +** Processing line: ~        ]~
     - Inside source: true
     *** True Line Result
    -      state.wind                 ||= 0
    -** Processing line: ~    end~
    +        ]
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    end
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def render~
    +** Processing line: ~      outputs.primitives << state.lava.find_all do |t|~
     - Inside source: true
     *** True Line Result
    -    def render
    -** Processing line: ~      render_stage~
    +      outputs.primitives << state.lava.find_all do |t|
    +** Processing line: ~        circle.x.between?(t.x - 640, t.x2 + 640) || circle.y.between?(t.y - 360, t.y2 + 360)~
     - Inside source: true
     *** True Line Result
    -      render_stage
    -** Processing line: ~      render_value_insertion~
    +        circle.x.between?(t.x - 640, t.x2 + 640) || circle.y.between?(t.y - 360, t.y2 + 360)
    +** Processing line: ~      end.map do |t|~
     - Inside source: true
     *** True Line Result
    -      render_value_insertion
    -** Processing line: ~      render_gorillas~
    +      end.map do |t|
    +** Processing line: ~        [~
     - Inside source: true
     *** True Line Result
    -      render_gorillas
    -** Processing line: ~      render_holes~
    +        [
    +** Processing line: ~          t.line.associate(r: 0, g: 0, b: 255) do |h|~
     - Inside source: true
     *** True Line Result
    -      render_holes
    -** Processing line: ~      render_banana~
    +          t.line.associate(r: 0, g: 0, b: 255) do |h|
    +** Processing line: ~            h.x  += state.camera.x~
     - Inside source: true
     *** True Line Result
    -      render_banana
    -** Processing line: ~      render_game_over~
    +            h.x  += state.camera.x
    +** Processing line: ~            h.y  += state.camera.y~
     - Inside source: true
     *** True Line Result
    -      render_game_over
    -** Processing line: ~      render_score~
    +            h.y  += state.camera.y
    +** Processing line: ~            h.x2 += state.camera.x~
     - Inside source: true
     *** True Line Result
    -      render_score
    -** Processing line: ~      render_wind~
    +            h.x2 += state.camera.x
    +** Processing line: ~            h.y2 += state.camera.y~
     - Inside source: true
     *** True Line Result
    -      render_wind
    -** Processing line: ~    end~
    +            h.y2 += state.camera.y
    +** Processing line: ~            if circle.rect.intersect_rect? t[:rect]~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +            if circle.rect.intersect_rect? t[:rect]
    +** Processing line: ~              h[:r] = 255~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def render_score~
    +              h[:r] = 255
    +** Processing line: ~              h[:b] = 0~
     - Inside source: true
     *** True Line Result
    -    def render_score
    -** Processing line: ~      outputs.primitives << [0, 0, 1280, 31, fancy_white].solid~
    +              h[:b] = 0
    +** Processing line: ~            end~
     - Inside source: true
     *** True Line Result
    -      outputs.primitives << [0, 0, 1280, 31, fancy_white].solid
    -** Processing line: ~      outputs.primitives << [1, 1, 1279, 29].solid~
    +            end
    +** Processing line: ~            h~
     - Inside source: true
     *** True Line Result
    -      outputs.primitives << [1, 1, 1279, 29].solid
    -** Processing line: ~      outputs.labels << [  10, 25, "Score: #{state.player_1_score}", 0, 0, fancy_white]~
    +            h
    +** Processing line: ~          end,~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << [  10, 25, "Score: #{state.player_1_score}", 0, 0, fancy_white]
    -** Processing line: ~      outputs.labels << [1270, 25, "Score: #{state.player_2_score}", 0, 2, fancy_white]~
    +          end,
    +** Processing line: ~          t[:rect].border.associate(r: 255, g: 0, b: 0) do |h|~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << [1270, 25, "Score: #{state.player_2_score}", 0, 2, fancy_white]
    -** Processing line: ~    end~
    +          t[:rect].border.associate(r: 255, g: 0, b: 0) do |h|
    +** Processing line: ~            h.x += state.camera.x~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +            h.x += state.camera.x
    +** Processing line: ~            h.y += state.camera.y~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def render_wind~
    +            h.y += state.camera.y
    +** Processing line: ~            h.b = 255 if line_near_rect? circle.rect, t~
     - Inside source: true
     *** True Line Result
    -    def render_wind
    -** Processing line: ~      outputs.primitives << [640, 12, state.wind * 500 + state.wind * 10 * rand, 4, 35, 136, 162].solid~
    +            h.b = 255 if line_near_rect? circle.rect, t
    +** Processing line: ~            h~
     - Inside source: true
     *** True Line Result
    -      outputs.primitives << [640, 12, state.wind * 500 + state.wind * 10 * rand, 4, 35, 136, 162].solid
    -** Processing line: ~      outputs.lines     <<  [640, 30, 640, 0, fancy_white]~
    +            h
    +** Processing line: ~          end~
     - Inside source: true
     *** True Line Result
    -      outputs.lines     <<  [640, 30, 640, 0, fancy_white]
    -** Processing line: ~    end~
    +          end
    +** Processing line: ~        ]~
     - Inside source: true
     *** True Line Result
    -    end
    +        ]
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def render_game_over~
    +** Processing line: ~      if state.god_mode~
     - Inside source: true
     *** True Line Result
    -    def render_game_over
    -** Processing line: ~      return unless state.over~
    +      if state.god_mode
    +** Processing line: ~        border = circle.rect.merge(x: circle.rect.x + state.camera.x,~
     - Inside source: true
     *** True Line Result
    -      return unless state.over
    -** Processing line: ~      outputs.primitives << [grid.rect, 0, 0, 0, 200].solid~
    +        border = circle.rect.merge(x: circle.rect.x + state.camera.x,
    +** Processing line: ~                                   y: circle.rect.y + state.camera.y,~
     - Inside source: true
     *** True Line Result
    -      outputs.primitives << [grid.rect, 0, 0, 0, 200].solid
    -** Processing line: ~      outputs.primitives << [640, 370, "Game Over!!", 5, 1, fancy_white].label~
    +                                   y: circle.rect.y + state.camera.y,
    +** Processing line: ~                                   g: 255)~
     - Inside source: true
     *** True Line Result
    -      outputs.primitives << [640, 370, "Game Over!!", 5, 1, fancy_white].label
    -** Processing line: ~      if state.winner == :player_1~
    +                                   g: 255)
    +** Processing line: ~      else~
     - Inside source: true
     *** True Line Result
    -      if state.winner == :player_1
    -** Processing line: ~        outputs.primitives << [640, 340, "Player 1 Wins!!", 5, 1, fancy_white].label~
    +      else
    +** Processing line: ~        border = circle.rect.merge(x: circle.rect.x + state.camera.x,~
     - Inside source: true
     *** True Line Result
    -        outputs.primitives << [640, 340, "Player 1 Wins!!", 5, 1, fancy_white].label
    -** Processing line: ~      else~
    +        border = circle.rect.merge(x: circle.rect.x + state.camera.x,
    +** Processing line: ~                                   y: circle.rect.y + state.camera.y,~
     - Inside source: true
     *** True Line Result
    -      else
    -** Processing line: ~        outputs.primitives << [640, 340, "Player 2 Wins!!", 5, 1, fancy_white].label~
    +                                   y: circle.rect.y + state.camera.y,
    +** Processing line: ~                                   b: 255)~
     - Inside source: true
     *** True Line Result
    -        outputs.primitives << [640, 340, "Player 2 Wins!!", 5, 1, fancy_white].label
    +                                   b: 255)
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
           end
    -** Processing line: ~    end~
    -- Inside source: true
    -*** True Line Result
    -    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def render_stage~
    +** Processing line: ~      outputs.borders << border~
     - Inside source: true
     *** True Line Result
    -    def render_stage
    -** Processing line: ~      return unless state.stage_generated~
    +      outputs.borders << border
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      return unless state.stage_generated
    -** Processing line: ~      return if state.stage_rendered~
    +
    +** Processing line: ~      overlapping ||= {}~
     - Inside source: true
     *** True Line Result
    -      return if state.stage_rendered
    +      overlapping ||= {}
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      outputs.static_solids << [grid.rect, 33, 32, 87]~
    +** Processing line: ~      circle.impact_history.each do |h|~
     - Inside source: true
     *** True Line Result
    -      outputs.static_solids << [grid.rect, 33, 32, 87]
    -** Processing line: ~      outputs.static_solids << state.buildings.map(&:solids)~
    +      circle.impact_history.each do |h|
    +** Processing line: ~        label_mod = 300~
     - Inside source: true
     *** True Line Result
    -      outputs.static_solids << state.buildings.map(&:solids)
    -** Processing line: ~      state.stage_rendered = true~
    +        label_mod = 300
    +** Processing line: ~        x = (h[:body][:x].-(150).idiv(label_mod)) * label_mod + camera.x~
     - Inside source: true
     *** True Line Result
    -      state.stage_rendered = true
    -** Processing line: ~    end~
    +        x = (h[:body][:x].-(150).idiv(label_mod)) * label_mod + camera.x
    +** Processing line: ~        y = (h[:body][:y].+(150).idiv(label_mod)) * label_mod + camera.y~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +        y = (h[:body][:y].+(150).idiv(label_mod)) * label_mod + camera.y
    +** Processing line: ~        10.times do~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def render_gorilla gorilla, id~
    +        10.times do
    +** Processing line: ~          if overlapping[x] && overlapping[x][y]~
     - Inside source: true
     *** True Line Result
    -    def render_gorilla gorilla, id
    -** Processing line: ~      return unless gorilla~
    +          if overlapping[x] && overlapping[x][y]
    +** Processing line: ~            y -= 52~
     - Inside source: true
     *** True Line Result
    -      return unless gorilla
    -** Processing line: ~      if state.banana && state.banana.owner == gorilla~
    +            y -= 52
    +** Processing line: ~          else~
     - Inside source: true
     *** True Line Result
    -      if state.banana && state.banana.owner == gorilla
    -** Processing line: ~        animation_index  = state.banana.created_at.frame_index(3, 5, false)~
    +          else
    +** Processing line: ~            break~
     - Inside source: true
     *** True Line Result
    -        animation_index  = state.banana.created_at.frame_index(3, 5, false)
    -** Processing line: ~      end~
    +            break
    +** Processing line: ~          end~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~      if !animation_index~
    +          end
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -      if !animation_index
    -** Processing line: ~        outputs.sprites << [gorilla.solid, "sprites/#{id}-idle.png"]~
    +        end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        outputs.sprites << [gorilla.solid, "sprites/#{id}-idle.png"]
    -** Processing line: ~      else~
    +
    +** Processing line: ~        overlapping[x] ||= {}~
     - Inside source: true
     *** True Line Result
    -      else
    -** Processing line: ~        outputs.sprites << [gorilla.solid, "sprites/#{id}-#{animation_index}.png"]~
    +        overlapping[x] ||= {}
    +** Processing line: ~        overlapping[x][y] ||= true~
     - Inside source: true
     *** True Line Result
    -        outputs.sprites << [gorilla.solid, "sprites/#{id}-#{animation_index}.png"]
    -** Processing line: ~      end~
    +        overlapping[x][y] ||= true
    +** Processing line: ~        outputs.primitives << [x, y - 25, 300, 50, 0, 0, 0, 128].solid~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +        outputs.primitives << [x, y - 25, 300, 50, 0, 0, 0, 128].solid
    +** Processing line: ~        outputs.labels << [x + 10, y + 24, "dy: %.2f" % h[:body][:new_dy], -2, 0, 255, 255, 255]~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +        outputs.labels << [x + 10, y + 24, "dy: %.2f" % h[:body][:new_dy], -2, 0, 255, 255, 255]
    +** Processing line: ~        outputs.labels << [x + 10, y +  9, "dx: %.2f" % h[:body][:new_dx], -2, 0, 255, 255, 255]~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def render_gorillas~
    +        outputs.labels << [x + 10, y +  9, "dx: %.2f" % h[:body][:new_dx], -2, 0, 255, 255, 255]
    +** Processing line: ~        outputs.labels << [x + 10, y -  5, " ?: #{h[:body][:new_reason]}", -2, 0, 255, 255, 255]~
     - Inside source: true
     *** True Line Result
    -    def render_gorillas
    -** Processing line: ~      render_gorilla state.player_1, :left~
    +        outputs.labels << [x + 10, y -  5, " ?: #{h[:body][:new_reason]}", -2, 0, 255, 255, 255]
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      render_gorilla state.player_1, :left
    -** Processing line: ~      render_gorilla state.player_2, :right~
    +
    +** Processing line: ~        outputs.labels << [x + 100, y + 24, "angle: %.2f" % h[:impact][:angle], -2, 0, 255, 255, 255]~
     - Inside source: true
     *** True Line Result
    -      render_gorilla state.player_2, :right
    -** Processing line: ~    end~
    +        outputs.labels << [x + 100, y + 24, "angle: %.2f" % h[:impact][:angle], -2, 0, 255, 255, 255]
    +** Processing line: ~        outputs.labels << [x + 100, y + 9, "m(l): %.2f" % h[:terrain][:slope], -2, 0, 255, 255, 255]~
     - Inside source: true
     *** True Line Result
    -    end
    +        outputs.labels << [x + 100, y + 9, "m(l): %.2f" % h[:terrain][:slope], -2, 0, 255, 255, 255]
    +** Processing line: ~        outputs.labels << [x + 100, y - 5, "m(c): %.2f" % h[:body][:slope], -2, 0, 255, 255, 255]~
    +- Inside source: true
    +*** True Line Result
    +        outputs.labels << [x + 100, y - 5, "m(c): %.2f" % h[:body][:slope], -2, 0, 255, 255, 255]
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def render_value_insertion~
    +** Processing line: ~        outputs.labels << [x + 200, y + 24, "ray: #{h[:impact][:ray]}", -2, 0, 255, 255, 255]~
     - Inside source: true
     *** True Line Result
    -    def render_value_insertion
    -** Processing line: ~      return if state.banana~
    +        outputs.labels << [x + 200, y + 24, "ray: #{h[:impact][:ray]}", -2, 0, 255, 255, 255]
    +** Processing line: ~        outputs.labels << [x + 200, y +  9, "nxt: #{h[:impact][:ray_next]}", -2, 0, 255, 255, 255]~
     - Inside source: true
     *** True Line Result
    -      return if state.banana
    -** Processing line: ~      return if state.over~
    +        outputs.labels << [x + 200, y +  9, "nxt: #{h[:impact][:ray_next]}", -2, 0, 255, 255, 255]
    +** Processing line: ~        outputs.labels << [x + 200, y -  5, "typ: #{h[:impact][:type]}", -2, 0, 255, 255, 255]~
     - Inside source: true
     *** True Line Result
    -      return if state.over
    +        outputs.labels << [x + 200, y -  5, "typ: #{h[:impact][:type]}", -2, 0, 255, 255, 255]
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      if    state.current_turn == :player_1_angle~
    +** Processing line: ~      if circle.floor~
     - Inside source: true
     *** True Line Result
    -      if    state.current_turn == :player_1_angle
    -** Processing line: ~        outputs.labels << [  10, 710, "Angle:    #{state.player_1_angle}_",    fancy_white]~
    +      if circle.floor
    +** Processing line: ~        outputs.labels << [circle.x + camera.x + 30, circle.y + camera.y + 100, "point: #{circle.floor_point.slice(:x, :y).values}", -2, 0]~
     - Inside source: true
     *** True Line Result
    -        outputs.labels << [  10, 710, "Angle:    #{state.player_1_angle}_",    fancy_white]
    -** Processing line: ~      elsif state.current_turn == :player_1_velocity~
    +        outputs.labels << [circle.x + camera.x + 30, circle.y + camera.y + 100, "point: #{circle.floor_point.slice(:x, :y).values}", -2, 0]
    +** Processing line: ~        outputs.labels << [circle.x + camera.x + 31, circle.y + camera.y + 101, "point: #{circle.floor_point.slice(:x, :y).values}", -2, 0, 255, 255, 255]~
     - Inside source: true
     *** True Line Result
    -      elsif state.current_turn == :player_1_velocity
    -** Processing line: ~        outputs.labels << [  10, 710, "Angle:    #{state.player_1_angle}",     fancy_white]~
    +        outputs.labels << [circle.x + camera.x + 31, circle.y + camera.y + 101, "point: #{circle.floor_point.slice(:x, :y).values}", -2, 0, 255, 255, 255]
    +** Processing line: ~        outputs.labels << [circle.x + camera.x + 30, circle.y + camera.y +  85, "circle: #{circle.as_hash.slice(:x, :y).values}", -2, 0]~
     - Inside source: true
     *** True Line Result
    -        outputs.labels << [  10, 710, "Angle:    #{state.player_1_angle}",     fancy_white]
    -** Processing line: ~        outputs.labels << [  10, 690, "Velocity: #{state.player_1_velocity}_", fancy_white]~
    +        outputs.labels << [circle.x + camera.x + 30, circle.y + camera.y +  85, "circle: #{circle.as_hash.slice(:x, :y).values}", -2, 0]
    +** Processing line: ~        outputs.labels << [circle.x + camera.x + 31, circle.y + camera.y +  86, "circle: #{circle.as_hash.slice(:x, :y).values}", -2, 0, 255, 255, 255]~
     - Inside source: true
     *** True Line Result
    -        outputs.labels << [  10, 690, "Velocity: #{state.player_1_velocity}_", fancy_white]
    -** Processing line: ~      elsif state.current_turn == :player_2_angle~
    +        outputs.labels << [circle.x + camera.x + 31, circle.y + camera.y +  86, "circle: #{circle.as_hash.slice(:x, :y).values}", -2, 0, 255, 255, 255]
    +** Processing line: ~        outputs.labels << [circle.x + camera.x + 30, circle.y + camera.y +  70, "rel: #{circle.floor_relative_x} #{circle.floor_relative_y}", -2, 0]~
     - Inside source: true
     *** True Line Result
    -      elsif state.current_turn == :player_2_angle
    -** Processing line: ~        outputs.labels << [1120, 710, "Angle:    #{state.player_2_angle}_",    fancy_white]~
    +        outputs.labels << [circle.x + camera.x + 30, circle.y + camera.y +  70, "rel: #{circle.floor_relative_x} #{circle.floor_relative_y}", -2, 0]
    +** Processing line: ~        outputs.labels << [circle.x + camera.x + 31, circle.y + camera.y +  71, "rel: #{circle.floor_relative_x} #{circle.floor_relative_y}", -2, 0, 255, 255, 255]~
     - Inside source: true
     *** True Line Result
    -        outputs.labels << [1120, 710, "Angle:    #{state.player_2_angle}_",    fancy_white]
    -** Processing line: ~      elsif state.current_turn == :player_2_velocity~
    +        outputs.labels << [circle.x + camera.x + 31, circle.y + camera.y +  71, "rel: #{circle.floor_relative_x} #{circle.floor_relative_y}", -2, 0, 255, 255, 255]
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -      elsif state.current_turn == :player_2_velocity
    -** Processing line: ~        outputs.labels << [1120, 710, "Angle:    #{state.player_2_angle}",     fancy_white]~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -        outputs.labels << [1120, 710, "Angle:    #{state.player_2_angle}",     fancy_white]
    -** Processing line: ~        outputs.labels << [1120, 690, "Velocity: #{state.player_2_velocity}_", fancy_white]~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        outputs.labels << [1120, 690, "Velocity: #{state.player_2_velocity}_", fancy_white]
    -** Processing line: ~      end~
    +
    +** Processing line: ~    def render_stage_editor~
     - Inside source: true
     *** True Line Result
    -      end
    +    def render_stage_editor
    +** Processing line: ~      return unless state.god_mode~
    +- Inside source: true
    +*** True Line Result
    +      return unless state.god_mode
    +** Processing line: ~      return unless state.point_one~
    +- Inside source: true
    +*** True Line Result
    +      return unless state.point_one
    +** Processing line: ~      args.lines << [state.point_one, inputs.mouse.point, 0, 255, 255]~
    +- Inside source: true
    +*** True Line Result
    +      args.lines << [state.point_one, inputs.mouse.point, 0, 255, 255]
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -122143,26 +127507,30 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def render_banana~
    +** Processing line: ~    def trajectory body~
     - Inside source: true
     *** True Line Result
    -    def render_banana
    -** Processing line: ~      return unless state.banana~
    +    def trajectory body
    +** Processing line: ~      [body.x + body.dx,~
     - Inside source: true
     *** True Line Result
    -      return unless state.banana
    -** Processing line: ~      rotation = state.tick_count.%(360) * 20~
    +      [body.x + body.dx,
    +** Processing line: ~       body.y + body.dy,~
     - Inside source: true
     *** True Line Result
    -      rotation = state.tick_count.%(360) * 20
    -** Processing line: ~      rotation *= -1 if state.banana.dx > 0~
    +       body.y + body.dy,
    +** Processing line: ~       body.x + body.dx * 1000,~
     - Inside source: true
     *** True Line Result
    -      rotation *= -1 if state.banana.dx > 0
    -** Processing line: ~      outputs.sprites << [state.banana.x, state.banana.y, 15, 15, 'sprites/banana.png', rotation]~
    +       body.x + body.dx * 1000,
    +** Processing line: ~       body.y + body.dy * 1000,~
     - Inside source: true
     *** True Line Result
    -      outputs.sprites << [state.banana.x, state.banana.y, 15, 15, 'sprites/banana.png', rotation]
    +       body.y + body.dy * 1000,
    +** Processing line: ~       0, 255, 255]~
    +- Inside source: true
    +*** True Line Result
    +       0, 255, 255]
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -122171,38 +127539,34 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def render_holes~
    -- Inside source: true
    -*** True Line Result
    -    def render_holes
    -** Processing line: ~      outputs.sprites << state.holes.map do |s|~
    +** Processing line: ~    def lengthen_line line, num~
     - Inside source: true
     *** True Line Result
    -      outputs.sprites << state.holes.map do |s|
    -** Processing line: ~        animation_index = s.created_at.frame_index(7, 3, false)~
    +    def lengthen_line line, num
    +** Processing line: ~      line = normalize_line(line)~
     - Inside source: true
     *** True Line Result
    -        animation_index = s.created_at.frame_index(7, 3, false)
    -** Processing line: ~        if animation_index~
    +      line = normalize_line(line)
    +** Processing line: ~      slope = geometry.line_slope(line, replace_infinity: 10).abs~
     - Inside source: true
     *** True Line Result
    -        if animation_index
    -** Processing line: ~          [s.sprite, [s.sprite.rect, "sprites/explosion#{animation_index}.png" ]]~
    +      slope = geometry.line_slope(line, replace_infinity: 10).abs
    +** Processing line: ~      if slope < 2~
     - Inside source: true
     *** True Line Result
    -          [s.sprite, [s.sprite.rect, "sprites/explosion#{animation_index}.png" ]]
    -** Processing line: ~        else~
    +      if slope < 2
    +** Processing line: ~        [line.x - num, line.y, line.x2 + num, line.y2].line.to_hash~
     - Inside source: true
     *** True Line Result
    -        else
    -** Processing line: ~          s.sprite~
    +        [line.x - num, line.y, line.x2 + num, line.y2].line.to_hash
    +** Processing line: ~      else~
     - Inside source: true
     *** True Line Result
    -          s.sprite
    -** Processing line: ~        end~
    +      else
    +** Processing line: ~        [line.x, line.y, line.x2, line.y2].line.to_hash~
     - Inside source: true
     *** True Line Result
    -        end
    +        [line.x, line.y, line.x2, line.y2].line.to_hash
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    @@ -122215,50 +127579,58 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def calc~
    +** Processing line: ~    def normalize_line line~
     - Inside source: true
     *** True Line Result
    -    def calc
    -** Processing line: ~      calc_generate_stage~
    +    def normalize_line line
    +** Processing line: ~      if line.x > line.x2~
     - Inside source: true
     *** True Line Result
    -      calc_generate_stage
    -** Processing line: ~      calc_current_turn~
    +      if line.x > line.x2
    +** Processing line: ~        x  = line.x2~
     - Inside source: true
     *** True Line Result
    -      calc_current_turn
    -** Processing line: ~      calc_banana~
    +        x  = line.x2
    +** Processing line: ~        y  = line.y2~
     - Inside source: true
     *** True Line Result
    -      calc_banana
    -** Processing line: ~    end~
    +        y  = line.y2
    +** Processing line: ~        x2 = line.x~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +        x2 = line.x
    +** Processing line: ~        y2 = line.y~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def calc_current_turn~
    +        y2 = line.y
    +** Processing line: ~      else~
     - Inside source: true
     *** True Line Result
    -    def calc_current_turn
    -** Processing line: ~      return if state.current_turn~
    +      else
    +** Processing line: ~        x  = line.x~
     - Inside source: true
     *** True Line Result
    -      return if state.current_turn
    -** Processing line: ~~
    +        x  = line.x
    +** Processing line: ~        y  = line.y~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      state.current_turn = :player_1_angle~
    +        y  = line.y
    +** Processing line: ~        x2 = line.x2~
     - Inside source: true
     *** True Line Result
    -      state.current_turn = :player_1_angle
    -** Processing line: ~      state.current_turn = :player_2_angle if state.first_strike == :player_2~
    +        x2 = line.x2
    +** Processing line: ~        y2 = line.y2~
     - Inside source: true
     *** True Line Result
    -      state.current_turn = :player_2_angle if state.first_strike == :player_2
    +        y2 = line.y2
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~      [x, y, x2, y2]~
    +- Inside source: true
    +*** True Line Result
    +      [x, y, x2, y2]
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -122267,42 +127639,50 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def calc_generate_stage~
    +** Processing line: ~    def rect_for_line line~
     - Inside source: true
     *** True Line Result
    -    def calc_generate_stage
    -** Processing line: ~      return if state.stage_generated~
    +    def rect_for_line line
    +** Processing line: ~      if line.x > line.x2~
     - Inside source: true
     *** True Line Result
    -      return if state.stage_generated
    -** Processing line: ~~
    +      if line.x > line.x2
    +** Processing line: ~        x  = line.x2~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      state.buildings << building_prefab(state.building_spacing + -20, *random_building_size)~
    +        x  = line.x2
    +** Processing line: ~        y  = line.y2~
     - Inside source: true
     *** True Line Result
    -      state.buildings << building_prefab(state.building_spacing + -20, *random_building_size)
    -** Processing line: ~      8.numbers.inject(state.buildings) do |buildings, i|~
    +        y  = line.y2
    +** Processing line: ~        x2 = line.x~
     - Inside source: true
     *** True Line Result
    -      8.numbers.inject(state.buildings) do |buildings, i|
    -** Processing line: ~        buildings <<~
    +        x2 = line.x
    +** Processing line: ~        y2 = line.y~
     - Inside source: true
     *** True Line Result
    -        buildings <<
    -** Processing line: ~          building_prefab(state.building_spacing +~
    +        y2 = line.y
    +** Processing line: ~      else~
     - Inside source: true
     *** True Line Result
    -          building_prefab(state.building_spacing +
    -** Processing line: ~                          state.buildings.last.right,~
    +      else
    +** Processing line: ~        x  = line.x~
     - Inside source: true
     *** True Line Result
    -                          state.buildings.last.right,
    -** Processing line: ~                          *random_building_size)~
    +        x  = line.x
    +** Processing line: ~        y  = line.y~
    +- Inside source: true
    +*** True Line Result
    +        y  = line.y
    +** Processing line: ~        x2 = line.x2~
    +- Inside source: true
    +*** True Line Result
    +        x2 = line.x2
    +** Processing line: ~        y2 = line.y2~
     - Inside source: true
     *** True Line Result
    -                          *random_building_size)
    +        y2 = line.y2
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    @@ -122311,186 +127691,174 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      building_two = state.buildings[1]~
    -- Inside source: true
    -*** True Line Result
    -      building_two = state.buildings[1]
    -** Processing line: ~      state.player_1 = new_player(building_two.x + building_two.w.fdiv(2),~
    +** Processing line: ~      w = x2 - x~
     - Inside source: true
     *** True Line Result
    -      state.player_1 = new_player(building_two.x + building_two.w.fdiv(2),
    -** Processing line: ~                                 building_two.h)~
    +      w = x2 - x
    +** Processing line: ~      h = y2 - y~
     - Inside source: true
     *** True Line Result
    -                                 building_two.h)
    +      h = y2 - y
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      building_nine = state.buildings[-3]~
    +** Processing line: ~      if h < 0~
     - Inside source: true
     *** True Line Result
    -      building_nine = state.buildings[-3]
    -** Processing line: ~      state.player_2 = new_player(building_nine.x + building_nine.w.fdiv(2),~
    +      if h < 0
    +** Processing line: ~        y += h~
     - Inside source: true
     *** True Line Result
    -      state.player_2 = new_player(building_nine.x + building_nine.w.fdiv(2),
    -** Processing line: ~                                 building_nine.h)~
    +        y += h
    +** Processing line: ~        h = h.abs~
     - Inside source: true
     *** True Line Result
    -                                 building_nine.h)
    -** Processing line: ~      state.stage_generated = true~
    +        h = h.abs
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -      state.stage_generated = true
    -** Processing line: ~      state.wind = 1.randomize(:ratio, :sign)~
    +      end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      state.wind = 1.randomize(:ratio, :sign)
    -** Processing line: ~    end~
    +
    +** Processing line: ~      if w < circle.radius~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +      if w < circle.radius
    +** Processing line: ~        x -= circle.radius~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def new_player x, y~
    +        x -= circle.radius
    +** Processing line: ~        w = circle.radius * 2~
     - Inside source: true
     *** True Line Result
    -    def new_player x, y
    -** Processing line: ~      state.new_entity(:gorilla) do |p|~
    +        w = circle.radius * 2
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -      state.new_entity(:gorilla) do |p|
    -** Processing line: ~        p.x = x - 25~
    +      end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        p.x = x - 25
    -** Processing line: ~        p.y = y~
    +
    +** Processing line: ~      if h < circle.radius~
     - Inside source: true
     *** True Line Result
    -        p.y = y
    -** Processing line: ~        p.solid = [p.x, p.y, 50, 50]~
    +      if h < circle.radius
    +** Processing line: ~        y -= circle.radius~
     - Inside source: true
     *** True Line Result
    -        p.solid = [p.x, p.y, 50, 50]
    -** Processing line: ~      end~
    +        y -= circle.radius
    +** Processing line: ~        h = circle.radius * 2~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +        h = circle.radius * 2
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    end
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def calc_banana~
    +** Processing line: ~      { x: x, y: y, w: w, h: h }~
     - Inside source: true
     *** True Line Result
    -    def calc_banana
    -** Processing line: ~      return unless state.banana~
    +      { x: x, y: y, w: w, h: h }
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      return unless state.banana
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      state.banana.x  += state.banana.dx~
    -- Inside source: true
    -*** True Line Result
    -      state.banana.x  += state.banana.dx
    -** Processing line: ~      state.banana.dx += state.wind.fdiv(50)~
    +** Processing line: ~    def snap_to_grid x, y, snaps~
     - Inside source: true
     *** True Line Result
    -      state.banana.dx += state.wind.fdiv(50)
    -** Processing line: ~      state.banana.y  += state.banana.dy~
    +    def snap_to_grid x, y, snaps
    +** Processing line: ~      snap_number = 10~
     - Inside source: true
     *** True Line Result
    -      state.banana.y  += state.banana.dy
    -** Processing line: ~      state.banana.dy -= state.gravity~
    +      snap_number = 10
    +** Processing line: ~      x = x.to_i~
     - Inside source: true
     *** True Line Result
    -      state.banana.dy -= state.gravity
    -** Processing line: ~      banana_collision = [state.banana.x, state.banana.y, 10, 10]~
    +      x = x.to_i
    +** Processing line: ~      y = y.to_i~
     - Inside source: true
     *** True Line Result
    -      banana_collision = [state.banana.x, state.banana.y, 10, 10]
    +      y = y.to_i
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      if state.player_1 && banana_collision.intersect_rect?(state.player_1.solid)~
    +** Processing line: ~      x_floor = x.idiv(snap_number) * snap_number~
     - Inside source: true
     *** True Line Result
    -      if state.player_1 && banana_collision.intersect_rect?(state.player_1.solid)
    -** Processing line: ~        state.over = true~
    +      x_floor = x.idiv(snap_number) * snap_number
    +** Processing line: ~      x_mod   = x % snap_number~
     - Inside source: true
     *** True Line Result
    -        state.over = true
    -** Processing line: ~        if state.banana.owner == state.player_2~
    +      x_mod   = x % snap_number
    +** Processing line: ~      x_ceil  = (x.idiv(snap_number) + 1) * snap_number~
     - Inside source: true
     *** True Line Result
    -        if state.banana.owner == state.player_2
    -** Processing line: ~          state.winner = :player_2~
    +      x_ceil  = (x.idiv(snap_number) + 1) * snap_number
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          state.winner = :player_2
    -** Processing line: ~        else~
    +
    +** Processing line: ~      y_floor = y.idiv(snap_number) * snap_number~
     - Inside source: true
     *** True Line Result
    -        else
    -** Processing line: ~          state.winner = :player_1~
    +      y_floor = y.idiv(snap_number) * snap_number
    +** Processing line: ~      y_mod   = y % snap_number~
     - Inside source: true
     *** True Line Result
    -          state.winner = :player_1
    -** Processing line: ~        end~
    +      y_mod   = y % snap_number
    +** Processing line: ~      y_ceil  = (y.idiv(snap_number) + 1) * snap_number~
     - Inside source: true
     *** True Line Result
    -        end
    +      y_ceil  = (y.idiv(snap_number) + 1) * snap_number
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~        state.player_2_score += 1~
    -- Inside source: true
    -*** True Line Result
    -        state.player_2_score += 1
    -** Processing line: ~      elsif state.player_2 && banana_collision.intersect_rect?(state.player_2.solid)~
    +** Processing line: ~      if snaps[x_floor]~
     - Inside source: true
     *** True Line Result
    -      elsif state.player_2 && banana_collision.intersect_rect?(state.player_2.solid)
    -** Processing line: ~        state.over = true~
    +      if snaps[x_floor]
    +** Processing line: ~        x_result = x_floor~
     - Inside source: true
     *** True Line Result
    -        state.over = true
    -** Processing line: ~        if state.banana.owner == state.player_2~
    +        x_result = x_floor
    +** Processing line: ~      elsif snaps[x_ceil]~
     - Inside source: true
     *** True Line Result
    -        if state.banana.owner == state.player_2
    -** Processing line: ~          state.winner = :player_1~
    +      elsif snaps[x_ceil]
    +** Processing line: ~        x_result = x_ceil~
     - Inside source: true
     *** True Line Result
    -          state.winner = :player_1
    -** Processing line: ~        else~
    +        x_result = x_ceil
    +** Processing line: ~      elsif x_mod < snap_number.idiv(2)~
     - Inside source: true
     *** True Line Result
    -        else
    -** Processing line: ~          state.winner = :player_2~
    +      elsif x_mod < snap_number.idiv(2)
    +** Processing line: ~        x_result = x_floor~
     - Inside source: true
     *** True Line Result
    -          state.winner = :player_2
    -** Processing line: ~        end~
    +        x_result = x_floor
    +** Processing line: ~      else~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~        state.player_1_score += 1~
    +      else
    +** Processing line: ~        x_result = x_ceil~
     - Inside source: true
     *** True Line Result
    -        state.player_1_score += 1
    +        x_result = x_ceil
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    @@ -122499,34 +127867,46 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      if state.over~
    +** Processing line: ~      snaps[x_result] ||= {}~
     - Inside source: true
     *** True Line Result
    -      if state.over
    -** Processing line: ~        place_hole~
    +      snaps[x_result] ||= {}
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        place_hole
    -** Processing line: ~        return~
    +
    +** Processing line: ~      if snaps[x_result][y_floor]~
     - Inside source: true
     *** True Line Result
    -        return
    -** Processing line: ~      end~
    +      if snaps[x_result][y_floor]
    +** Processing line: ~        y_result = y_floor~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +        y_result = y_floor
    +** Processing line: ~      elsif snaps[x_result][y_ceil]~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      return if state.holes.any? do |h|~
    +      elsif snaps[x_result][y_ceil]
    +** Processing line: ~        y_result = y_ceil~
     - Inside source: true
     *** True Line Result
    -      return if state.holes.any? do |h|
    -** Processing line: ~        h.sprite.scale_rect(0.8, 0.5, 0.5).intersect_rect? [state.banana.x, state.banana.y, 10, 10]~
    +        y_result = y_ceil
    +** Processing line: ~      elsif y_mod < snap_number.idiv(2)~
     - Inside source: true
     *** True Line Result
    -        h.sprite.scale_rect(0.8, 0.5, 0.5).intersect_rect? [state.banana.x, state.banana.y, 10, 10]
    +      elsif y_mod < snap_number.idiv(2)
    +** Processing line: ~        y_result = y_floor~
    +- Inside source: true
    +*** True Line Result
    +        y_result = y_floor
    +** Processing line: ~      else~
    +- Inside source: true
    +*** True Line Result
    +      else
    +** Processing line: ~        y_result = y_ceil~
    +- Inside source: true
    +*** True Line Result
    +        y_result = y_ceil
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    @@ -122535,26 +127915,34 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      return unless state.banana.y < 0 || state.buildings.any? do |b|~
    +** Processing line: ~      snaps[x_result][y_result] = true~
     - Inside source: true
     *** True Line Result
    -      return unless state.banana.y < 0 || state.buildings.any? do |b|
    -** Processing line: ~        b.rect.intersect_rect? [state.banana.x, state.banana.y, 1, 1]~
    +      snaps[x_result][y_result] = true
    +** Processing line: ~      return [x_result, y_result]~
     - Inside source: true
     *** True Line Result
    -        b.rect.intersect_rect? [state.banana.x, state.banana.y, 1, 1]
    -** Processing line: ~      end~
    +      return [x_result, y_result]
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      end
    +
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      place_hole~
    +** Processing line: ~    def snap_line line~
     - Inside source: true
     *** True Line Result
    -      place_hole
    +    def snap_line line
    +** Processing line: ~      x, y, x2, y2 = line~
    +- Inside source: true
    +*** True Line Result
    +      x, y, x2, y2 = line
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -122563,26 +127951,30 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def place_hole~
    +** Processing line: ~    def string_to_line s~
     - Inside source: true
     *** True Line Result
    -    def place_hole
    -** Processing line: ~      return unless state.banana~
    +    def string_to_line s
    +** Processing line: ~      x, y, x2, y2 = s.split(',').map(&:to_f)~
     - Inside source: true
     *** True Line Result
    -      return unless state.banana
    +      x, y, x2, y2 = s.split(',').map(&:to_f)
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      state.holes << state.new_entity(:banana) do |b|~
    +** Processing line: ~      if x > x2~
     - Inside source: true
     *** True Line Result
    -      state.holes << state.new_entity(:banana) do |b|
    -** Processing line: ~        b.sprite = [state.banana.x - 20, state.banana.y - 20, 40, 40, 'sprites/hole.png']~
    +      if x > x2
    +** Processing line: ~        x2, x = x, x2~
     - Inside source: true
     *** True Line Result
    -        b.sprite = [state.banana.x - 20, state.banana.y - 20, 40, 40, 'sprites/hole.png']
    +        x2, x = x, x2
    +** Processing line: ~        y2, y = y, y2~
    +- Inside source: true
    +*** True Line Result
    +        y2, y = y, y2
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    @@ -122591,70 +127983,70 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      state.banana = nil~
    +** Processing line: ~      x, y = snap_to_grid x, y, state.snaps~
     - Inside source: true
     *** True Line Result
    -      state.banana = nil
    -** Processing line: ~    end~
    +      x, y = snap_to_grid x, y, state.snaps
    +** Processing line: ~      x2, y2 = snap_to_grid x2, y2, state.snaps~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +      x2, y2 = snap_to_grid x2, y2, state.snaps
    +** Processing line: ~      [x, y, x2, y2].line.to_hash~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def process_inputs_main~
    +      [x, y, x2, y2].line.to_hash
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    def process_inputs_main
    -** Processing line: ~      return if state.banana~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      return if state.banana
    -** Processing line: ~      return if state.over~
    +
    +** Processing line: ~    def load_lines file~
     - Inside source: true
     *** True Line Result
    -      return if state.over
    -** Processing line: ~~
    +    def load_lines file
    +** Processing line: ~      return unless state.snaps~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      if inputs.keyboard.key_down.enter~
    +      return unless state.snaps
    +** Processing line: ~      data = gtk.read_file(file) || ""~
     - Inside source: true
     *** True Line Result
    -      if inputs.keyboard.key_down.enter
    -** Processing line: ~        input_execute_turn~
    +      data = gtk.read_file(file) || ""
    +** Processing line: ~      data.each_line~
     - Inside source: true
     *** True Line Result
    -        input_execute_turn
    -** Processing line: ~      elsif inputs.keyboard.key_down.backspace~
    +      data.each_line
    +** Processing line: ~          .reject { |l| l.strip.length == 0 }~
     - Inside source: true
     *** True Line Result
    -      elsif inputs.keyboard.key_down.backspace
    -** Processing line: ~        state.as_hash[state.current_turn] ||= ""~
    +          .reject { |l| l.strip.length == 0 }
    +** Processing line: ~          .map { |l| string_to_line l }~
     - Inside source: true
     *** True Line Result
    -        state.as_hash[state.current_turn] ||= ""
    -** Processing line: ~        state.as_hash[state.current_turn]   = state.as_hash[state.current_turn][0..-2]~
    +          .map { |l| string_to_line l }
    +** Processing line: ~          .map { |h| h.merge(rect: rect_for_line(h))  }~
     - Inside source: true
     *** True Line Result
    -        state.as_hash[state.current_turn]   = state.as_hash[state.current_turn][0..-2]
    -** Processing line: ~      elsif inputs.keyboard.key_down.char~
    +          .map { |h| h.merge(rect: rect_for_line(h))  }
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      elsif inputs.keyboard.key_down.char
    -** Processing line: ~        state.as_hash[state.current_turn] ||= ""~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        state.as_hash[state.current_turn] ||= ""
    -** Processing line: ~        state.as_hash[state.current_turn]  += inputs.keyboard.key_down.char~
    +
    +** Processing line: ~    def load_terrain~
     - Inside source: true
     *** True Line Result
    -        state.as_hash[state.current_turn]  += inputs.keyboard.key_down.char
    -** Processing line: ~      end~
    +    def load_terrain
    +** Processing line: ~      load_lines 'data/level.txt'~
     - Inside source: true
     *** True Line Result
    -      end
    +      load_lines 'data/level.txt'
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -122663,58 +128055,54 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def process_inputs_game_over~
    -- Inside source: true
    -*** True Line Result
    -    def process_inputs_game_over
    -** Processing line: ~      return unless state.over~
    -- Inside source: true
    -*** True Line Result
    -      return unless state.over
    -** Processing line: ~      return unless inputs.keyboard.key_down.truthy_keys.any?~
    +** Processing line: ~    def load_lava~
     - Inside source: true
     *** True Line Result
    -      return unless inputs.keyboard.key_down.truthy_keys.any?
    -** Processing line: ~      state.over = false~
    +    def load_lava
    +** Processing line: ~      load_lines 'data/level_lava.txt'~
     - Inside source: true
     *** True Line Result
    -      state.over = false
    -** Processing line: ~      outputs.static_solids.clear~
    +      load_lines 'data/level_lava.txt'
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      outputs.static_solids.clear
    -** Processing line: ~      state.buildings.clear~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      state.buildings.clear
    -** Processing line: ~      state.holes.clear~
    +
    +** Processing line: ~    def load_level force: false~
     - Inside source: true
     *** True Line Result
    -      state.holes.clear
    -** Processing line: ~      state.stage_generated = false~
    +    def load_level force: false
    +** Processing line: ~      if force~
     - Inside source: true
     *** True Line Result
    -      state.stage_generated = false
    -** Processing line: ~      state.stage_rendered = false~
    +      if force
    +** Processing line: ~        state.snaps = {}~
     - Inside source: true
     *** True Line Result
    -      state.stage_rendered = false
    -** Processing line: ~      if state.first_strike == :player_1~
    +        state.snaps = {}
    +** Processing line: ~        state.terrain = load_terrain~
     - Inside source: true
     *** True Line Result
    -      if state.first_strike == :player_1
    -** Processing line: ~        state.first_strike = :player_2~
    +        state.terrain = load_terrain
    +** Processing line: ~        state.lava = load_lava~
     - Inside source: true
     *** True Line Result
    -        state.first_strike = :player_2
    +        state.lava = load_lava
     ** Processing line: ~      else~
     - Inside source: true
     *** True Line Result
           else
    -** Processing line: ~        state.first_strike = :player_1~
    +** Processing line: ~        state.terrain ||= load_terrain~
     - Inside source: true
     *** True Line Result
    -        state.first_strike = :player_1
    +        state.terrain ||= load_terrain
    +** Processing line: ~        state.lava ||= load_lava~
    +- Inside source: true
    +*** True Line Result
    +        state.lava ||= load_lava
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    @@ -122727,18 +128115,26 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def process_inputs~
    +** Processing line: ~    def save_lines lines, file~
     - Inside source: true
     *** True Line Result
    -    def process_inputs
    -** Processing line: ~      process_inputs_main~
    +    def save_lines lines, file
    +** Processing line: ~      s = lines.map do |l|~
     - Inside source: true
     *** True Line Result
    -      process_inputs_main
    -** Processing line: ~      process_inputs_game_over~
    +      s = lines.map do |l|
    +** Processing line: ~        "#{l.x1},#{l.y1},#{l.x2},#{l.y2}"~
     - Inside source: true
     *** True Line Result
    -      process_inputs_game_over
    +        "#{l.x1},#{l.y1},#{l.x2},#{l.y2}"
    +** Processing line: ~      end.join("\n")~
    +- Inside source: true
    +*** True Line Result
    +      end.join("\n")
    +** Processing line: ~      gtk.write_file(file, s)~
    +- Inside source: true
    +*** True Line Result
    +      gtk.write_file(file, s)
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -122747,162 +128143,174 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def input_execute_turn~
    +** Processing line: ~    def save_level~
     - Inside source: true
     *** True Line Result
    -    def input_execute_turn
    -** Processing line: ~      return if state.banana~
    +    def save_level
    +** Processing line: ~      save_lines(state.terrain, 'level.txt')~
     - Inside source: true
     *** True Line Result
    -      return if state.banana
    -** Processing line: ~~
    +      save_lines(state.terrain, 'level.txt')
    +** Processing line: ~      save_lines(state.lava, 'level_lava.txt')~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      if state.current_turn == :player_1_angle && parse_or_clear!(:player_1_angle)~
    +      save_lines(state.lava, 'level_lava.txt')
    +** Processing line: ~      load_level force: true~
     - Inside source: true
     *** True Line Result
    -      if state.current_turn == :player_1_angle && parse_or_clear!(:player_1_angle)
    -** Processing line: ~        state.current_turn = :player_1_velocity~
    +      load_level force: true
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -        state.current_turn = :player_1_velocity
    -** Processing line: ~      elsif state.current_turn == :player_1_velocity && parse_or_clear!(:player_1_velocity)~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      elsif state.current_turn == :player_1_velocity && parse_or_clear!(:player_1_velocity)
    -** Processing line: ~        state.current_turn = :player_2_angle~
    +
    +** Processing line: ~    def line_near_rect? rect, terrain~
     - Inside source: true
     *** True Line Result
    -        state.current_turn = :player_2_angle
    -** Processing line: ~        state.banana =~
    +    def line_near_rect? rect, terrain
    +** Processing line: ~      geometry.intersect_rect?(rect, terrain[:rect])~
     - Inside source: true
     *** True Line Result
    -        state.banana =
    -** Processing line: ~          new_banana(state.player_1,~
    +      geometry.intersect_rect?(rect, terrain[:rect])
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -          new_banana(state.player_1,
    -** Processing line: ~                     state.player_1.x + 25,~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -                     state.player_1.x + 25,
    -** Processing line: ~                     state.player_1.y + 60,~
    +
    +** Processing line: ~    def point_within_line? point, line~
     - Inside source: true
     *** True Line Result
    -                     state.player_1.y + 60,
    -** Processing line: ~                     state.player_1_angle,~
    +    def point_within_line? point, line
    +** Processing line: ~      return false if !point~
     - Inside source: true
     *** True Line Result
    -                     state.player_1_angle,
    -** Processing line: ~                     state.player_1_velocity)~
    +      return false if !point
    +** Processing line: ~      return false if !line~
     - Inside source: true
     *** True Line Result
    -                     state.player_1_velocity)
    -** Processing line: ~      elsif state.current_turn == :player_2_angle && parse_or_clear!(:player_2_angle)~
    +      return false if !line
    +** Processing line: ~      return true~
     - Inside source: true
     *** True Line Result
    -      elsif state.current_turn == :player_2_angle && parse_or_clear!(:player_2_angle)
    -** Processing line: ~        state.current_turn = :player_2_velocity~
    +      return true
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -        state.current_turn = :player_2_velocity
    -** Processing line: ~      elsif state.current_turn == :player_2_velocity && parse_or_clear!(:player_2_velocity)~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      elsif state.current_turn == :player_2_velocity && parse_or_clear!(:player_2_velocity)
    -** Processing line: ~        state.current_turn = :player_1_angle~
    +
    +** Processing line: ~    def calc_impacts x, dx, y, dy, radius~
     - Inside source: true
     *** True Line Result
    -        state.current_turn = :player_1_angle
    -** Processing line: ~        state.banana =~
    +    def calc_impacts x, dx, y, dy, radius
    +** Processing line: ~      results = { }~
     - Inside source: true
     *** True Line Result
    -        state.banana =
    -** Processing line: ~          new_banana(state.player_2,~
    +      results = { }
    +** Processing line: ~      results[:x] = x~
     - Inside source: true
     *** True Line Result
    -          new_banana(state.player_2,
    -** Processing line: ~                     state.player_2.x + 25,~
    +      results[:x] = x
    +** Processing line: ~      results[:y] = y~
     - Inside source: true
     *** True Line Result
    -                     state.player_2.x + 25,
    -** Processing line: ~                     state.player_2.y + 60,~
    +      results[:y] = y
    +** Processing line: ~      results[:dx] = x~
     - Inside source: true
     *** True Line Result
    -                     state.player_2.y + 60,
    -** Processing line: ~                     180 - state.player_2_angle,~
    +      results[:dx] = x
    +** Processing line: ~      results[:dy] = y~
     - Inside source: true
     *** True Line Result
    -                     180 - state.player_2_angle,
    -** Processing line: ~                     state.player_2_velocity)~
    +      results[:dy] = y
    +** Processing line: ~      results[:point] = { x: x, y: y }~
     - Inside source: true
     *** True Line Result
    -                     state.player_2_velocity)
    -** Processing line: ~      end~
    +      results[:point] = { x: x, y: y }
    +** Processing line: ~      results[:rect] = { x: x - radius, y: y - radius, w: radius * 2, h: radius * 2 }~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +      results[:rect] = { x: x - radius, y: y - radius, w: radius * 2, h: radius * 2 }
    +** Processing line: ~      results[:trajectory] = trajectory(results)~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      if state.banana~
    +      results[:trajectory] = trajectory(results)
    +** Processing line: ~      results[:impacts] = terrain.find_all { |t| t && (line_near_rect? results[:rect], t) }.map do |t|~
     - Inside source: true
     *** True Line Result
    -      if state.banana
    -** Processing line: ~        state.player_1_angle = nil~
    +      results[:impacts] = terrain.find_all { |t| t && (line_near_rect? results[:rect], t) }.map do |t|
    +** Processing line: ~        {~
     - Inside source: true
     *** True Line Result
    -        state.player_1_angle = nil
    -** Processing line: ~        state.player_1_velocity = nil~
    +        {
    +** Processing line: ~          terrain: t,~
     - Inside source: true
     *** True Line Result
    -        state.player_1_velocity = nil
    -** Processing line: ~        state.player_2_angle = nil~
    +          terrain: t,
    +** Processing line: ~          point: geometry.line_intersect(results[:trajectory], t, replace_infinity: 1000),~
     - Inside source: true
     *** True Line Result
    -        state.player_2_angle = nil
    -** Processing line: ~        state.player_2_velocity = nil~
    +          point: geometry.line_intersect(results[:trajectory], t, replace_infinity: 1000),
    +** Processing line: ~          type: :terrain~
     - Inside source: true
     *** True Line Result
    -        state.player_2_velocity = nil
    -** Processing line: ~      end~
    +          type: :terrain
    +** Processing line: ~        }~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +        }
    +** Processing line: ~      end.reject { |t| !point_within_line? t[:point], t[:terrain] }~
     - Inside source: true
     *** True Line Result
    -    end
    +      end.reject { |t| !point_within_line? t[:point], t[:terrain] }
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def random_building_size~
    +** Processing line: ~      results[:impacts] += lava.find_all { |t| line_near_rect? results[:rect], t }.map do |t|~
     - Inside source: true
     *** True Line Result
    -    def random_building_size
    -** Processing line: ~      [state.building_heights.sample, state.building_room_sizes.sample]~
    +      results[:impacts] += lava.find_all { |t| line_near_rect? results[:rect], t }.map do |t|
    +** Processing line: ~        {~
     - Inside source: true
     *** True Line Result
    -      [state.building_heights.sample, state.building_room_sizes.sample]
    -** Processing line: ~    end~
    +        {
    +** Processing line: ~          terrain: t,~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +          terrain: t,
    +** Processing line: ~          point: geometry.line_intersect(results[:trajectory], t, replace_infinity: 1000),~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def int? v~
    +          point: geometry.line_intersect(results[:trajectory], t, replace_infinity: 1000),
    +** Processing line: ~          type: :lava~
     - Inside source: true
     *** True Line Result
    -    def int? v
    -** Processing line: ~      v.to_i.to_s == v.to_s~
    +          type: :lava
    +** Processing line: ~        }~
     - Inside source: true
     *** True Line Result
    -      v.to_i.to_s == v.to_s
    +        }
    +** Processing line: ~      end.reject { |t| !t || (!point_within_line? t[:point], t[:terrain]) }~
    +- Inside source: true
    +*** True Line Result
    +      end.reject { |t| !t || (!point_within_line? t[:point], t[:terrain]) }
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~      results~
    +- Inside source: true
    +*** True Line Result
    +      results
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -122911,26 +128319,26 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def random_building_color~
    +** Processing line: ~    def calc_potential_impacts~
     - Inside source: true
     *** True Line Result
    -    def random_building_color
    -** Processing line: ~      [[ 99,   0, 107],~
    +    def calc_potential_impacts
    +** Processing line: ~      impact_results = calc_impacts circle.x, circle.dx, circle.y, circle.dy, circle.radius~
     - Inside source: true
     *** True Line Result
    -      [[ 99,   0, 107],
    -** Processing line: ~       [ 35,  64, 124],~
    +      impact_results = calc_impacts circle.x, circle.dx, circle.y, circle.dy, circle.radius
    +** Processing line: ~      circle.rect = impact_results[:rect]~
     - Inside source: true
     *** True Line Result
    -       [ 35,  64, 124],
    -** Processing line: ~       [ 35, 136, 162],~
    +      circle.rect = impact_results[:rect]
    +** Processing line: ~      circle.trajectory = impact_results[:trajectory]~
     - Inside source: true
     *** True Line Result
    -       [ 35, 136, 162],
    -** Processing line: ~       ].sample~
    +      circle.trajectory = impact_results[:trajectory]
    +** Processing line: ~      circle.impacts = impact_results[:impacts]~
     - Inside source: true
     *** True Line Result
    -       ].sample
    +      circle.impacts = impact_results[:impacts]
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -122939,66 +128347,66 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def random_window_color~
    +** Processing line: ~    def calc_terrains_to_monitor~
     - Inside source: true
     *** True Line Result
    -    def random_window_color
    -** Processing line: ~      [[ 88,  62, 104],~
    +    def calc_terrains_to_monitor
    +** Processing line: ~      return unless circle.impacts~
     - Inside source: true
     *** True Line Result
    -      [[ 88,  62, 104],
    -** Processing line: ~       [253, 224, 187]].sample~
    +      return unless circle.impacts
    +** Processing line: ~      circle.impact = nil~
     - Inside source: true
     *** True Line Result
    -       [253, 224, 187]].sample
    -** Processing line: ~    end~
    +      circle.impact = nil
    +** Processing line: ~      circle.impacts.each do |i|~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +      circle.impacts.each do |i|
    +** Processing line: ~        circle.terrains_to_monitor[i[:terrain]] ||= {~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def windows_for_building starting_x, floors, rooms~
    +        circle.terrains_to_monitor[i[:terrain]] ||= {
    +** Processing line: ~          ray_start: geometry.ray_test(circle, i[:terrain]),~
     - Inside source: true
     *** True Line Result
    -    def windows_for_building starting_x, floors, rooms
    -** Processing line: ~      floors.-(1).combinations(rooms - 1).map do |floor, room|~
    +          ray_start: geometry.ray_test(circle, i[:terrain]),
    +** Processing line: ~        }~
     - Inside source: true
     *** True Line Result
    -      floors.-(1).combinations(rooms - 1).map do |floor, room|
    -** Processing line: ~        [starting_x +~
    +        }
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        [starting_x +
    -** Processing line: ~         state.building_room_width.*(room) +~
    +
    +** Processing line: ~        circle.terrains_to_monitor[i[:terrain]][:ray_current] = geometry.ray_test(circle, i[:terrain])~
     - Inside source: true
     *** True Line Result
    -         state.building_room_width.*(room) +
    -** Processing line: ~         state.building_room_spacing.*(room + 1),~
    +        circle.terrains_to_monitor[i[:terrain]][:ray_current] = geometry.ray_test(circle, i[:terrain])
    +** Processing line: ~        if circle.terrains_to_monitor[i[:terrain]][:ray_start] != circle.terrains_to_monitor[i[:terrain]][:ray_current]~
     - Inside source: true
     *** True Line Result
    -         state.building_room_spacing.*(room + 1),
    -** Processing line: ~         state.building_room_height.*(floor) +~
    +        if circle.terrains_to_monitor[i[:terrain]][:ray_start] != circle.terrains_to_monitor[i[:terrain]][:ray_current]
    +** Processing line: ~          if circle.x.between?(i[:terrain].x, i[:terrain].x2) || circle.y.between?(i[:terrain].y, i[:terrain].y2)~
     - Inside source: true
     *** True Line Result
    -         state.building_room_height.*(floor) +
    -** Processing line: ~         state.building_room_spacing.*(floor + 1),~
    +          if circle.x.between?(i[:terrain].x, i[:terrain].x2) || circle.y.between?(i[:terrain].y, i[:terrain].y2)
    +** Processing line: ~            circle.impact = i~
     - Inside source: true
     *** True Line Result
    -         state.building_room_spacing.*(floor + 1),
    -** Processing line: ~         state.building_room_width,~
    +            circle.impact = i
    +** Processing line: ~            circle.ray_current = circle.terrains_to_monitor[i[:terrain]][:ray_current]~
     - Inside source: true
     *** True Line Result
    -         state.building_room_width,
    -** Processing line: ~         state.building_room_height,~
    +            circle.ray_current = circle.terrains_to_monitor[i[:terrain]][:ray_current]
    +** Processing line: ~          end~
     - Inside source: true
     *** True Line Result
    -         state.building_room_height,
    -** Processing line: ~         random_window_color]~
    +          end
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -         random_window_color]
    +        end
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    @@ -123011,438 +128419,486 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def building_prefab starting_x, floors, rooms~
    +** Processing line: ~    def impact_result body, impact~
     - Inside source: true
     *** True Line Result
    -    def building_prefab starting_x, floors, rooms
    -** Processing line: ~      state.new_entity(:building) do |b|~
    +    def impact_result body, impact
    +** Processing line: ~      infinity_alias = 1000~
     - Inside source: true
     *** True Line Result
    -      state.new_entity(:building) do |b|
    -** Processing line: ~        b.x      = starting_x~
    +      infinity_alias = 1000
    +** Processing line: ~      r = {~
     - Inside source: true
     *** True Line Result
    -        b.x      = starting_x
    -** Processing line: ~        b.y      = 0~
    +      r = {
    +** Processing line: ~        body: {},~
     - Inside source: true
     *** True Line Result
    -        b.y      = 0
    -** Processing line: ~        b.w      = state.building_room_width.*(rooms) +~
    +        body: {},
    +** Processing line: ~        terrain: {},~
     - Inside source: true
     *** True Line Result
    -        b.w      = state.building_room_width.*(rooms) +
    -** Processing line: ~                   state.building_room_spacing.*(rooms + 1)~
    +        terrain: {},
    +** Processing line: ~        impact: {}~
     - Inside source: true
     *** True Line Result
    -                   state.building_room_spacing.*(rooms + 1)
    -** Processing line: ~        b.h      = state.building_room_height.*(floors) +~
    +        impact: {}
    +** Processing line: ~      }~
     - Inside source: true
     *** True Line Result
    -        b.h      = state.building_room_height.*(floors) +
    -** Processing line: ~                   state.building_room_spacing.*(floors + 1)~
    +      }
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -                   state.building_room_spacing.*(floors + 1)
    -** Processing line: ~        b.right  = b.x + b.w~
    +
    +** Processing line: ~      r[:body][:line] = body.trajectory.dup~
     - Inside source: true
     *** True Line Result
    -        b.right  = b.x + b.w
    -** Processing line: ~        b.rect   = [b.x, b.y, b.w, b.h]~
    +      r[:body][:line] = body.trajectory.dup
    +** Processing line: ~      r[:body][:slope] = geometry.line_slope(body.trajectory, replace_infinity: infinity_alias)~
     - Inside source: true
     *** True Line Result
    -        b.rect   = [b.x, b.y, b.w, b.h]
    -** Processing line: ~        b.solids = [[b.x - 1, b.y, b.w + 2, b.h + 1, fancy_white],~
    +      r[:body][:slope] = geometry.line_slope(body.trajectory, replace_infinity: infinity_alias)
    +** Processing line: ~      r[:body][:slope_sign] = r[:body][:slope].sign~
     - Inside source: true
     *** True Line Result
    -        b.solids = [[b.x - 1, b.y, b.w + 2, b.h + 1, fancy_white],
    -** Processing line: ~                    [b.x, b.y, b.w, b.h, random_building_color],~
    +      r[:body][:slope_sign] = r[:body][:slope].sign
    +** Processing line: ~      r[:body][:x] = body.x~
     - Inside source: true
     *** True Line Result
    -                    [b.x, b.y, b.w, b.h, random_building_color],
    -** Processing line: ~                    windows_for_building(b.x, floors, rooms)]~
    +      r[:body][:x] = body.x
    +** Processing line: ~      r[:body][:y] = body.y~
     - Inside source: true
     *** True Line Result
    -                    windows_for_building(b.x, floors, rooms)]
    -** Processing line: ~      end~
    +      r[:body][:y] = body.y
    +** Processing line: ~      r[:body][:dy] = body.dy~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +      r[:body][:dy] = body.dy
    +** Processing line: ~      r[:body][:dx] = body.dx~
     - Inside source: true
     *** True Line Result
    -    end
    +      r[:body][:dx] = body.dx
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def parse_or_clear! game_prop~
    +** Processing line: ~      r[:terrain][:line] = impact[:terrain].dup~
     - Inside source: true
     *** True Line Result
    -    def parse_or_clear! game_prop
    -** Processing line: ~      if int? state.as_hash[game_prop]~
    +      r[:terrain][:line] = impact[:terrain].dup
    +** Processing line: ~      r[:terrain][:slope] = geometry.line_slope(impact[:terrain], replace_infinity: infinity_alias)~
     - Inside source: true
     *** True Line Result
    -      if int? state.as_hash[game_prop]
    -** Processing line: ~        state.as_hash[game_prop] = state.as_hash[game_prop].to_i~
    +      r[:terrain][:slope] = geometry.line_slope(impact[:terrain], replace_infinity: infinity_alias)
    +** Processing line: ~      r[:terrain][:slope_sign] = r[:terrain][:slope].sign~
     - Inside source: true
     *** True Line Result
    -        state.as_hash[game_prop] = state.as_hash[game_prop].to_i
    -** Processing line: ~        return true~
    +      r[:terrain][:slope_sign] = r[:terrain][:slope].sign
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        return true
    -** Processing line: ~      end~
    +
    +** Processing line: ~      r[:impact][:angle] = geometry.angle_between_lines(body.trajectory, impact[:terrain], replace_infinity: infinity_alias)~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +      r[:impact][:angle] = geometry.angle_between_lines(body.trajectory, impact[:terrain], replace_infinity: infinity_alias)
    +** Processing line: ~      r[:impact][:point] = { x: impact[:point].x, y: impact[:point].y }~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      state.as_hash[game_prop] = nil~
    +      r[:impact][:point] = { x: impact[:point].x, y: impact[:point].y }
    +** Processing line: ~      r[:impact][:same_slope_sign] = r[:body][:slope_sign] == r[:terrain][:slope_sign]~
     - Inside source: true
     *** True Line Result
    -      state.as_hash[game_prop] = nil
    -** Processing line: ~      return false~
    +      r[:impact][:same_slope_sign] = r[:body][:slope_sign] == r[:terrain][:slope_sign]
    +** Processing line: ~      r[:impact][:ray] = body.ray_current~
     - Inside source: true
     *** True Line Result
    -      return false
    -** Processing line: ~    end~
    +      r[:impact][:ray] = body.ray_current
    +** Processing line: ~      r[:body][:new_on_floor] = body.on_floor~
     - Inside source: true
     *** True Line Result
    -    end
    +      r[:body][:new_on_floor] = body.on_floor
    +** Processing line: ~      r[:body][:new_floor] = r[:terrain][:line]~
    +- Inside source: true
    +*** True Line Result
    +      r[:body][:new_floor] = r[:terrain][:line]
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def new_banana owner, x, y, angle, velocity~
    +** Processing line: ~      if r[:impact][:angle].abs < 90 && r[:terrain][:slope].abs < 3~
     - Inside source: true
     *** True Line Result
    -    def new_banana owner, x, y, angle, velocity
    -** Processing line: ~      state.new_entity(:banana) do |b|~
    +      if r[:impact][:angle].abs < 90 && r[:terrain][:slope].abs < 3
    +** Processing line: ~        play_sound~
     - Inside source: true
     *** True Line Result
    -      state.new_entity(:banana) do |b|
    -** Processing line: ~        b.owner     = owner~
    +        play_sound
    +** Processing line: ~        r[:body][:new_dy] = r[:body][:dy] * circle.elasticity * -1~
     - Inside source: true
     *** True Line Result
    -        b.owner     = owner
    -** Processing line: ~        b.x         = x~
    +        r[:body][:new_dy] = r[:body][:dy] * circle.elasticity * -1
    +** Processing line: ~        r[:body][:new_dx] = r[:body][:dx] * circle.elasticity~
     - Inside source: true
     *** True Line Result
    -        b.x         = x
    -** Processing line: ~        b.y         = y~
    +        r[:body][:new_dx] = r[:body][:dx] * circle.elasticity
    +** Processing line: ~        r[:impact][:type] = :horizontal~
     - Inside source: true
     *** True Line Result
    -        b.y         = y
    -** Processing line: ~        b.angle     = angle % 360~
    +        r[:impact][:type] = :horizontal
    +** Processing line: ~        r[:body][:new_reason] = "-"~
     - Inside source: true
     *** True Line Result
    -        b.angle     = angle % 360
    -** Processing line: ~        b.velocity  = velocity / 5~
    +        r[:body][:new_reason] = "-"
    +** Processing line: ~      elsif r[:impact][:angle].abs < 90 && r[:terrain][:slope].abs > 3~
     - Inside source: true
     *** True Line Result
    -        b.velocity  = velocity / 5
    -** Processing line: ~        b.dx        = b.angle.vector_x(b.velocity)~
    +      elsif r[:impact][:angle].abs < 90 && r[:terrain][:slope].abs > 3
    +** Processing line: ~        play_sound~
     - Inside source: true
     *** True Line Result
    -        b.dx        = b.angle.vector_x(b.velocity)
    -** Processing line: ~        b.dy        = b.angle.vector_y(b.velocity)~
    +        play_sound
    +** Processing line: ~        r[:body][:new_dy] = r[:body][:dy] * 1.1~
     - Inside source: true
     *** True Line Result
    -        b.dy        = b.angle.vector_y(b.velocity)
    -** Processing line: ~      end~
    +        r[:body][:new_dy] = r[:body][:dy] * 1.1
    +** Processing line: ~        r[:body][:new_dx] = r[:body][:dx] * -circle.elasticity~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +        r[:body][:new_dx] = r[:body][:dx] * -circle.elasticity
    +** Processing line: ~        r[:impact][:type] = :vertical~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +        r[:impact][:type] = :vertical
    +** Processing line: ~        r[:body][:new_reason] = "|"~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def fancy_white~
    +        r[:body][:new_reason] = "|"
    +** Processing line: ~      else~
     - Inside source: true
     *** True Line Result
    -    def fancy_white
    -** Processing line: ~      [253, 252, 253]~
    +      else
    +** Processing line: ~        play_sound~
     - Inside source: true
     *** True Line Result
    -      [253, 252, 253]
    -** Processing line: ~    end~
    +        play_sound
    +** Processing line: ~        r[:body][:new_dx] = r[:body][:dx] * -circle.elasticity~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~  end~
    +        r[:body][:new_dx] = r[:body][:dx] * -circle.elasticity
    +** Processing line: ~        r[:body][:new_dy] = r[:body][:dy] * -circle.elasticity~
     - Inside source: true
     *** True Line Result
    -  end
    +        r[:body][:new_dy] = r[:body][:dy] * -circle.elasticity
    +** Processing line: ~        r[:impact][:type] = :slanted~
    +- Inside source: true
    +*** True Line Result
    +        r[:impact][:type] = :slanted
    +** Processing line: ~        r[:body][:new_reason] = "/"~
    +- Inside source: true
    +*** True Line Result
    +        r[:body][:new_reason] = "/"
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  $you_so_basic_gorillas = YouSoBasicGorillas.new~
    +** Processing line: ~      r[:impact][:energy] = r[:body][:new_dx].abs + r[:body][:new_dy].abs~
     - Inside source: true
     *** True Line Result
    -  $you_so_basic_gorillas = YouSoBasicGorillas.new
    +      r[:impact][:energy] = r[:body][:new_dx].abs + r[:body][:new_dy].abs
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def tick args~
    +** Processing line: ~      if r[:impact][:energy] <= 0.3 && r[:terrain][:slope].abs < 4~
     - Inside source: true
     *** True Line Result
    -  def tick args
    -** Processing line: ~    $you_so_basic_gorillas.outputs = args.outputs~
    +      if r[:impact][:energy] <= 0.3 && r[:terrain][:slope].abs < 4
    +** Processing line: ~        r[:body][:new_dx] = 0~
     - Inside source: true
     *** True Line Result
    -    $you_so_basic_gorillas.outputs = args.outputs
    -** Processing line: ~    $you_so_basic_gorillas.grid    = args.grid~
    +        r[:body][:new_dx] = 0
    +** Processing line: ~        r[:body][:new_dy] = 0~
     - Inside source: true
     *** True Line Result
    -    $you_so_basic_gorillas.grid    = args.grid
    -** Processing line: ~    $you_so_basic_gorillas.state    = args.state~
    +        r[:body][:new_dy] = 0
    +** Processing line: ~        r[:impact][:energy] = 0~
     - Inside source: true
     *** True Line Result
    -    $you_so_basic_gorillas.state    = args.state
    -** Processing line: ~    $you_so_basic_gorillas.inputs  = args.inputs~
    +        r[:impact][:energy] = 0
    +** Processing line: ~        r[:body][:new_on_floor] = true~
     - Inside source: true
     *** True Line Result
    -    $you_so_basic_gorillas.inputs  = args.inputs
    -** Processing line: ~    $you_so_basic_gorillas.tick~
    +        r[:body][:new_on_floor] = true
    +** Processing line: ~        r[:body][:new_floor] = r[:terrain][:line]~
     - Inside source: true
     *** True Line Result
    -    $you_so_basic_gorillas.tick
    -** Processing line: ~  end~
    +        r[:body][:new_floor] = r[:terrain][:line]
    +** Processing line: ~        r[:body][:new_reason] = "0"~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +        r[:body][:new_reason] = "0"
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~#+end_src~
    -- Line was identified as the end of a code block.
    -*** True Line Result
    -#+end_src
    +      end
     ** Processing line: ~~
    -- End of paragraph detected.
    +- Inside source: true
     *** True Line Result
     
    -** Processing line: ~*** Platformer - Gorillas Basic - tests.rb~
    -- Header detected.
    +** Processing line: ~      r[:impact][:ray_next] = geometry.ray_test({ x: r[:body][:x] - (r[:body][:dx] * 1.1) + r[:body][:new_dx],~
    +- Inside source: true
     *** True Line Result
    -
    +      r[:impact][:ray_next] = geometry.ray_test({ x: r[:body][:x] - (r[:body][:dx] * 1.1) + r[:body][:new_dx],
    +** Processing line: ~                                                  y: r[:body][:y] - (r[:body][:dy] * 1.1) + r[:body][:new_dy] + state.gravity },~
    +- Inside source: true
     *** True Line Result
    -*** Platformer - Gorillas Basic - tests.rb
    -** Processing line: ~#+begin_src ruby~
    -- Line was identified as the beginning of a code block.
    +                                                  y: r[:body][:y] - (r[:body][:dy] * 1.1) + r[:body][:new_dy] + state.gravity },
    +** Processing line: ~                                                r[:terrain][:line])~
    +- Inside source: true
     *** True Line Result
    -
    +                                                r[:terrain][:line])
    +** Processing line: ~~
    +- Inside source: true
     *** True Line Result
    -#+begin_src ruby
    -** Processing line: ~  # ./samples/99_genre_platformer/gorillas_basic/app/tests.rb~
    +
    +** Processing line: ~      if r[:impact][:ray_next] == r[:impact][:ray]~
     - Inside source: true
     *** True Line Result
    -  # ./samples/99_genre_platformer/gorillas_basic/app/tests.rb
    -** Processing line: ~  $gtk.reset 100~
    +      if r[:impact][:ray_next] == r[:impact][:ray]
    +** Processing line: ~        r[:body][:new_dx] *= -1~
     - Inside source: true
     *** True Line Result
    -  $gtk.reset 100
    -** Processing line: ~  $gtk.supress_framerate_warning = true~
    +        r[:body][:new_dx] *= -1
    +** Processing line: ~        r[:body][:new_dy] *= -1~
     - Inside source: true
     *** True Line Result
    -  $gtk.supress_framerate_warning = true
    -** Processing line: ~  $gtk.require 'app/tests/building_generation_tests.rb'~
    +        r[:body][:new_dy] *= -1
    +** Processing line: ~        r[:body][:new_reason] = "clip"~
     - Inside source: true
     *** True Line Result
    -  $gtk.require 'app/tests/building_generation_tests.rb'
    -** Processing line: ~  $gtk.tests.start~
    +        r[:body][:new_reason] = "clip"
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -  $gtk.tests.start
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~#+end_src~
    -- Line was identified as the end of a code block.
    +** Processing line: ~      r~
    +- Inside source: true
     *** True Line Result
    -#+end_src
    +      r
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
     ** Processing line: ~~
    -- End of paragraph detected.
    +- Inside source: true
     *** True Line Result
     
    -** Processing line: ~*** Platformer - Gorillas Basic - Tests - building_generation_tests.rb~
    -- Header detected.
    +** Processing line: ~    def game_over!~
    +- Inside source: true
     *** True Line Result
    -
    +    def game_over!
    +** Processing line: ~      circle.x = circle.check_point_x~
    +- Inside source: true
     *** True Line Result
    -*** Platformer - Gorillas Basic - Tests - building_generation_tests.rb
    -** Processing line: ~#+begin_src ruby~
    -- Line was identified as the beginning of a code block.
    +      circle.x = circle.check_point_x
    +** Processing line: ~      circle.y = circle.check_point_y~
    +- Inside source: true
     *** True Line Result
    -
    +      circle.y = circle.check_point_y
    +** Processing line: ~      circle.dx = 0~
    +- Inside source: true
     *** True Line Result
    -#+begin_src ruby
    -** Processing line: ~  # ./samples/99_genre_platformer/gorillas_basic/app/tests/building_generation_tests.rb~
    +      circle.dx = 0
    +** Processing line: ~      circle.dy = 0~
     - Inside source: true
     *** True Line Result
    -  # ./samples/99_genre_platformer/gorillas_basic/app/tests/building_generation_tests.rb
    -** Processing line: ~  def test_solids args, assert~
    +      circle.dy = 0
    +** Processing line: ~      circle.game_over_at = state.tick_count~
     - Inside source: true
     *** True Line Result
    -  def test_solids args, assert
    -** Processing line: ~    game = YouSoBasicGorillas.new~
    +      circle.game_over_at = state.tick_count
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    game = YouSoBasicGorillas.new
    -** Processing line: ~    game.outputs = args.outputs~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    game.outputs = args.outputs
    -** Processing line: ~    game.grid = args.grid~
    +
    +** Processing line: ~    def not_game_over!~
     - Inside source: true
     *** True Line Result
    -    game.grid = args.grid
    -** Processing line: ~    game.state = args.state~
    +    def not_game_over!
    +** Processing line: ~      impact_history_entry = impact_result circle, circle.impact~
     - Inside source: true
     *** True Line Result
    -    game.state = args.state
    -** Processing line: ~    game.inputs = args.inputs~
    +      impact_history_entry = impact_result circle, circle.impact
    +** Processing line: ~      circle.impact_history << impact_history_entry~
     - Inside source: true
     *** True Line Result
    -    game.inputs = args.inputs
    -** Processing line: ~    game.tick~
    +      circle.impact_history << impact_history_entry
    +** Processing line: ~      circle.x -= circle.dx * 1.1~
     - Inside source: true
     *** True Line Result
    -    game.tick
    -** Processing line: ~    assert.true! args.state.stage_generated, "stage wasn't generated but it should have been"~
    +      circle.x -= circle.dx * 1.1
    +** Processing line: ~      circle.y -= circle.dy * 1.1~
     - Inside source: true
     *** True Line Result
    -    assert.true! args.state.stage_generated, "stage wasn't generated but it should have been"
    -** Processing line: ~    game.tick~
    +      circle.y -= circle.dy * 1.1
    +** Processing line: ~      circle.dx = impact_history_entry[:body][:new_dx]~
     - Inside source: true
     *** True Line Result
    -    game.tick
    -** Processing line: ~    assert.true! args.outputs.static_solids.length > 0, "stage wasn't rendered"~
    +      circle.dx = impact_history_entry[:body][:new_dx]
    +** Processing line: ~      circle.dy = impact_history_entry[:body][:new_dy]~
     - Inside source: true
     *** True Line Result
    -    assert.true! args.outputs.static_solids.length > 0, "stage wasn't rendered"
    -** Processing line: ~    number_of_building_components = (args.state.buildings.map { |b| 2 + b.solids[2].length }.inject do |sum, v| (sum || 0) + v end)~
    +      circle.dy = impact_history_entry[:body][:new_dy]
    +** Processing line: ~      circle.on_floor = impact_history_entry[:body][:new_on_floor]~
     - Inside source: true
     *** True Line Result
    -    number_of_building_components = (args.state.buildings.map { |b| 2 + b.solids[2].length }.inject do |sum, v| (sum || 0) + v end)
    -** Processing line: ~    the_only_background = 1~
    +      circle.on_floor = impact_history_entry[:body][:new_on_floor]
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    the_only_background = 1
    -** Processing line: ~    static_solids = args.outputs.static_solids.length~
    +
    +** Processing line: ~      if circle.on_floor~
     - Inside source: true
     *** True Line Result
    -    static_solids = args.outputs.static_solids.length
    -** Processing line: ~    assert.true! static_solids == the_only_background.+(number_of_building_components), "not all parts of the buildings and background were rendered"~
    +      if circle.on_floor
    +** Processing line: ~        circle.check_point_at = state.tick_count~
     - Inside source: true
     *** True Line Result
    -    assert.true! static_solids == the_only_background.+(number_of_building_components), "not all parts of the buildings and background were rendered"
    -** Processing line: ~  end~
    +        circle.check_point_at = state.tick_count
    +** Processing line: ~        circle.check_point_x = circle.x~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +        circle.check_point_x = circle.x
    +** Processing line: ~        circle.check_point_y = circle.y~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~#+end_src~
    -- Line was identified as the end of a code block.
    +        circle.check_point_y = circle.y
    +** Processing line: ~      end~
    +- Inside source: true
     *** True Line Result
    -#+end_src
    +      end
     ** Processing line: ~~
    -- End of paragraph detected.
    +- Inside source: true
     *** True Line Result
     
    -** Processing line: ~*** Platformer - The Little Probe - main.rb~
    -- Header detected.
    +** Processing line: ~      circle.previous_floor = circle.floor || {}~
    +- Inside source: true
     *** True Line Result
    -
    +      circle.previous_floor = circle.floor || {}
    +** Processing line: ~      circle.floor = impact_history_entry[:body][:new_floor] || {}~
    +- Inside source: true
     *** True Line Result
    -*** Platformer - The Little Probe - main.rb
    -** Processing line: ~#+begin_src ruby~
    -- Line was identified as the beginning of a code block.
    +      circle.floor = impact_history_entry[:body][:new_floor] || {}
    +** Processing line: ~      circle.floor_point = impact_history_entry[:impact][:point]~
    +- Inside source: true
     *** True Line Result
    -
    +      circle.floor_point = impact_history_entry[:impact][:point]
    +** Processing line: ~      if circle.floor.slice(:x, :y, :x2, :y2) != circle.previous_floor.slice(:x, :y, :x2, :y2)~
    +- Inside source: true
     *** True Line Result
    -#+begin_src ruby
    -** Processing line: ~  # ./samples/99_genre_platformer/the_little_probe/app/main.rb~
    +      if circle.floor.slice(:x, :y, :x2, :y2) != circle.previous_floor.slice(:x, :y, :x2, :y2)
    +** Processing line: ~        new_relative_x = if circle.dx > 0~
     - Inside source: true
     *** True Line Result
    -  # ./samples/99_genre_platformer/the_little_probe/app/main.rb
    -** Processing line: ~  class FallingCircle~
    +        new_relative_x = if circle.dx > 0
    +** Processing line: ~                           :right~
     - Inside source: true
     *** True Line Result
    -  class FallingCircle
    -** Processing line: ~    attr_gtk~
    +                           :right
    +** Processing line: ~                         elsif circle.dx < 0~
    +- Inside source: true
    +*** True Line Result
    +                         elsif circle.dx < 0
    +** Processing line: ~                           :left~
    +- Inside source: true
    +*** True Line Result
    +                           :left
    +** Processing line: ~                         else~
    +- Inside source: true
    +*** True Line Result
    +                         else
    +** Processing line: ~                           nil~
    +- Inside source: true
    +*** True Line Result
    +                           nil
    +** Processing line: ~                         end~
     - Inside source: true
     *** True Line Result
    -    attr_gtk
    +                         end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def tick~
    +** Processing line: ~        new_relative_y = if circle.dy > 0~
     - Inside source: true
     *** True Line Result
    -    def tick
    -** Processing line: ~      fiddle~
    +        new_relative_y = if circle.dy > 0
    +** Processing line: ~                           :above~
     - Inside source: true
     *** True Line Result
    -      fiddle
    -** Processing line: ~      defaults~
    +                           :above
    +** Processing line: ~                         elsif circle.dy < 0~
     - Inside source: true
     *** True Line Result
    -      defaults
    -** Processing line: ~      render~
    +                         elsif circle.dy < 0
    +** Processing line: ~                           :below~
     - Inside source: true
     *** True Line Result
    -      render
    -** Processing line: ~      input~
    +                           :below
    +** Processing line: ~                         else~
     - Inside source: true
     *** True Line Result
    -      input
    -** Processing line: ~      calc~
    +                         else
    +** Processing line: ~                           nil~
     - Inside source: true
     *** True Line Result
    -      calc
    -** Processing line: ~    end~
    +                           nil
    +** Processing line: ~                         end~
     - Inside source: true
     *** True Line Result
    -    end
    +                         end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def fiddle~
    +** Processing line: ~        circle.floor_relative_x = new_relative_x~
     - Inside source: true
     *** True Line Result
    -    def fiddle
    -** Processing line: ~      state.gravity     = -0.02~
    +        circle.floor_relative_x = new_relative_x
    +** Processing line: ~        circle.floor_relative_y = new_relative_y~
     - Inside source: true
     *** True Line Result
    -      state.gravity     = -0.02
    -** Processing line: ~      circle.radius     = 15~
    +        circle.floor_relative_y = new_relative_y
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -      circle.radius     = 15
    -** Processing line: ~      circle.elasticity = 0.4~
    +      end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      circle.elasticity = 0.4
    -** Processing line: ~      camera.follow_speed = 0.4 * 0.4~
    +
    +** Processing line: ~      circle.impact = nil~
     - Inside source: true
     *** True Line Result
    -      camera.follow_speed = 0.4 * 0.4
    +      circle.impact = nil
    +** Processing line: ~      circle.terrains_to_monitor.clear~
    +- Inside source: true
    +*** True Line Result
    +      circle.terrains_to_monitor.clear
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -123451,42 +128907,46 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def render~
    +** Processing line: ~    def calc_physics~
     - Inside source: true
     *** True Line Result
    -    def render
    -** Processing line: ~      render_stage_editor~
    +    def calc_physics
    +** Processing line: ~      if args.state.god_mode~
     - Inside source: true
     *** True Line Result
    -      render_stage_editor
    -** Processing line: ~      render_debug~
    +      if args.state.god_mode
    +** Processing line: ~        calc_potential_impacts~
     - Inside source: true
     *** True Line Result
    -      render_debug
    -** Processing line: ~      render_game~
    +        calc_potential_impacts
    +** Processing line: ~        calc_terrains_to_monitor~
     - Inside source: true
     *** True Line Result
    -      render_game
    -** Processing line: ~    end~
    +        calc_terrains_to_monitor
    +** Processing line: ~        return~
     - Inside source: true
     *** True Line Result
    -    end
    +        return
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def defaults~
    +** Processing line: ~      if circle.y < -700~
     - Inside source: true
     *** True Line Result
    -    def defaults
    -** Processing line: ~      if state.tick_count == 0~
    +      if circle.y < -700
    +** Processing line: ~        game_over~
     - Inside source: true
     *** True Line Result
    -      if state.tick_count == 0
    -** Processing line: ~        outputs.sounds << "sounds/bg.ogg"~
    +        game_over
    +** Processing line: ~        return~
     - Inside source: true
     *** True Line Result
    -        outputs.sounds << "sounds/bg.ogg"
    +        return
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    @@ -123495,422 +128955,422 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      state.storyline ||= [~
    +** Processing line: ~      return if state.game_over~
     - Inside source: true
     *** True Line Result
    -      state.storyline ||= [
    -** Processing line: ~        { text: "<- -> to aim, hold space to charge",                            distance_gate: 0 },~
    +      return if state.game_over
    +** Processing line: ~      return if circle.on_floor~
     - Inside source: true
     *** True Line Result
    -        { text: "<- -> to aim, hold space to charge",                            distance_gate: 0 },
    -** Processing line: ~        { text: "the little probe - by @amirrajan, made with DragonRuby Game Toolkit", distance_gate: 0 },~
    +      return if circle.on_floor
    +** Processing line: ~      circle.previous_dy = circle.dy~
     - Inside source: true
     *** True Line Result
    -        { text: "the little probe - by @amirrajan, made with DragonRuby Game Toolkit", distance_gate: 0 },
    -** Processing line: ~        { text: "mission control, this is sasha. landing on europa successful.", distance_gate: 0 },~
    +      circle.previous_dy = circle.dy
    +** Processing line: ~      circle.previous_dx = circle.dx~
     - Inside source: true
     *** True Line Result
    -        { text: "mission control, this is sasha. landing on europa successful.", distance_gate: 0 },
    -** Processing line: ~        { text: "operation \"find earth 2.0\", initiated at 8-29-2036 14:00.",   distance_gate: 0 },~
    +      circle.previous_dx = circle.dx
    +** Processing line: ~      circle.x  += circle.dx~
     - Inside source: true
     *** True Line Result
    -        { text: "operation \"find earth 2.0\", initiated at 8-29-2036 14:00.",   distance_gate: 0 },
    -** Processing line: ~        { text: "jupiter's sure is beautiful...",   distance_gate: 4000 },~
    +      circle.x  += circle.dx
    +** Processing line: ~      circle.y  += circle.dy~
     - Inside source: true
     *** True Line Result
    -        { text: "jupiter's sure is beautiful...",   distance_gate: 4000 },
    -** Processing line: ~        { text: "hmm, it seems there's some kind of anomoly in the sky",   distance_gate: 7000 },~
    +      circle.y  += circle.dy
    +** Processing line: ~      args.state.distance_traveled ||= 0~
     - Inside source: true
     *** True Line Result
    -        { text: "hmm, it seems there's some kind of anomoly in the sky",   distance_gate: 7000 },
    -** Processing line: ~        { text: "dancing lights, i'll call them whisps.",   distance_gate: 8000 },~
    +      args.state.distance_traveled ||= 0
    +** Processing line: ~      args.state.distance_traveled += circle.dx.abs + circle.dy.abs~
     - Inside source: true
     *** True Line Result
    -        { text: "dancing lights, i'll call them whisps.",   distance_gate: 8000 },
    -** Processing line: ~        { text: "#todo... look i ran out of time -_-",   distance_gate: 9000 },~
    +      args.state.distance_traveled += circle.dx.abs + circle.dy.abs
    +** Processing line: ~      circle.dy += state.gravity~
     - Inside source: true
     *** True Line Result
    -        { text: "#todo... look i ran out of time -_-",   distance_gate: 9000 },
    -** Processing line: ~        { text: "there's never enough time",   distance_gate: 9000 },~
    +      circle.dy += state.gravity
    +** Processing line: ~      calc_potential_impacts~
     - Inside source: true
     *** True Line Result
    -        { text: "there's never enough time",   distance_gate: 9000 },
    -** Processing line: ~        { text: "the game jam was fun though ^_^",   distance_gate: 10000 },~
    +      calc_potential_impacts
    +** Processing line: ~      calc_terrains_to_monitor~
     - Inside source: true
     *** True Line Result
    -        { text: "the game jam was fun though ^_^",   distance_gate: 10000 },
    -** Processing line: ~      ]~
    +      calc_terrains_to_monitor
    +** Processing line: ~      return unless circle.impact~
     - Inside source: true
     *** True Line Result
    -      ]
    -** Processing line: ~~
    +      return unless circle.impact
    +** Processing line: ~      if circle.impact && circle.impact[:type] == :lava~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      load_level force: args.state.tick_count == 0~
    +      if circle.impact && circle.impact[:type] == :lava
    +** Processing line: ~        game_over!~
     - Inside source: true
     *** True Line Result
    -      load_level force: args.state.tick_count == 0
    -** Processing line: ~      state.line_mode            ||= :terrain~
    +        game_over!
    +** Processing line: ~      else~
     - Inside source: true
     *** True Line Result
    -      state.line_mode            ||= :terrain
    -** Processing line: ~~
    +      else
    +** Processing line: ~        not_game_over!~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      state.sound_index          ||= 1~
    +        not_game_over!
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -      state.sound_index          ||= 1
    -** Processing line: ~      circle.potential_lift      ||= 0~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      circle.potential_lift      ||= 0
    -** Processing line: ~      circle.angle               ||= 90~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      circle.angle               ||= 90
    -** Processing line: ~      circle.check_point_at      ||= -1000~
    +
    +** Processing line: ~    def input_god_mode~
     - Inside source: true
     *** True Line Result
    -      circle.check_point_at      ||= -1000
    -** Processing line: ~      circle.game_over_at        ||= -1000~
    +    def input_god_mode
    +** Processing line: ~      state.debug_mode = !state.debug_mode if inputs.keyboard.key_down.forward_slash~
     - Inside source: true
     *** True Line Result
    -      circle.game_over_at        ||= -1000
    -** Processing line: ~      circle.x                   ||= -485~
    +      state.debug_mode = !state.debug_mode if inputs.keyboard.key_down.forward_slash
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      circle.x                   ||= -485
    -** Processing line: ~      circle.y                   ||= 12226~
    +
    +** Processing line: ~      # toggle god mode~
     - Inside source: true
     *** True Line Result
    -      circle.y                   ||= 12226
    -** Processing line: ~      circle.check_point_x       ||= circle.x~
    +      # toggle god mode
    +** Processing line: ~      if inputs.keyboard.key_down.g~
     - Inside source: true
     *** True Line Result
    -      circle.check_point_x       ||= circle.x
    -** Processing line: ~      circle.check_point_y       ||= circle.y~
    +      if inputs.keyboard.key_down.g
    +** Processing line: ~        state.god_mode = !state.god_mode~
     - Inside source: true
     *** True Line Result
    -      circle.check_point_y       ||= circle.y
    -** Processing line: ~      circle.dy                  ||= 0~
    +        state.god_mode = !state.god_mode
    +** Processing line: ~        state.potential_lift = 0~
     - Inside source: true
     *** True Line Result
    -      circle.dy                  ||= 0
    -** Processing line: ~      circle.dx                  ||= 0~
    +        state.potential_lift = 0
    +** Processing line: ~        circle.floor = nil~
     - Inside source: true
     *** True Line Result
    -      circle.dx                  ||= 0
    -** Processing line: ~      circle.previous_dy         ||= 0~
    +        circle.floor = nil
    +** Processing line: ~        circle.floor_point = nil~
     - Inside source: true
     *** True Line Result
    -      circle.previous_dy         ||= 0
    -** Processing line: ~      circle.previous_dx         ||= 0~
    +        circle.floor_point = nil
    +** Processing line: ~        circle.floor_relative_x = nil~
     - Inside source: true
     *** True Line Result
    -      circle.previous_dx         ||= 0
    -** Processing line: ~      circle.angle               ||= 0~
    +        circle.floor_relative_x = nil
    +** Processing line: ~        circle.floor_relative_y = nil~
     - Inside source: true
     *** True Line Result
    -      circle.angle               ||= 0
    -** Processing line: ~      circle.after_images        ||= []~
    +        circle.floor_relative_y = nil
    +** Processing line: ~        circle.impact = nil~
     - Inside source: true
     *** True Line Result
    -      circle.after_images        ||= []
    -** Processing line: ~      circle.terrains_to_monitor ||= {}~
    +        circle.impact = nil
    +** Processing line: ~        circle.terrains_to_monitor.clear~
     - Inside source: true
     *** True Line Result
    -      circle.terrains_to_monitor ||= {}
    -** Processing line: ~      circle.impact_history      ||= []~
    +        circle.terrains_to_monitor.clear
    +** Processing line: ~        return~
     - Inside source: true
     *** True Line Result
    -      circle.impact_history      ||= []
    +        return
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      camera.x                   ||= 0~
    +** Processing line: ~      return unless state.god_mode~
     - Inside source: true
     *** True Line Result
    -      camera.x                   ||= 0
    -** Processing line: ~      camera.y                   ||= 0~
    +      return unless state.god_mode
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      camera.y                   ||= 0
    -** Processing line: ~      camera.target_x            ||= 0~
    +
    +** Processing line: ~      circle.x = circle.x.to_i~
     - Inside source: true
     *** True Line Result
    -      camera.target_x            ||= 0
    -** Processing line: ~      camera.target_y            ||= 0~
    +      circle.x = circle.x.to_i
    +** Processing line: ~      circle.y = circle.y.to_i~
     - Inside source: true
     *** True Line Result
    -      camera.target_y            ||= 0
    -** Processing line: ~      state.snaps                ||= { }~
    +      circle.y = circle.y.to_i
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      state.snaps                ||= { }
    -** Processing line: ~      state.snap_number            = 10~
    +
    +** Processing line: ~      # move god circle~
     - Inside source: true
     *** True Line Result
    -      state.snap_number            = 10
    -** Processing line: ~~
    +      # move god circle
    +** Processing line: ~      if inputs.keyboard.left || inputs.keyboard.a~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      args.state.storyline_x ||= -1000~
    +      if inputs.keyboard.left || inputs.keyboard.a
    +** Processing line: ~        circle.x -= 20~
     - Inside source: true
     *** True Line Result
    -      args.state.storyline_x ||= -1000
    -** Processing line: ~      args.state.storyline_y ||= -1000~
    +        circle.x -= 20
    +** Processing line: ~      elsif inputs.keyboard.right || inputs.keyboard.d || inputs.keyboard.f~
     - Inside source: true
     *** True Line Result
    -      args.state.storyline_y ||= -1000
    -** Processing line: ~    end~
    +      elsif inputs.keyboard.right || inputs.keyboard.d || inputs.keyboard.f
    +** Processing line: ~        circle.x += 20~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +        circle.x += 20
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def render_game~
    +      end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    def render_game
    -** Processing line: ~      outputs.background_color = [0, 0, 0]~
    +
    +** Processing line: ~      if inputs.keyboard.up || inputs.keyboard.w~
     - Inside source: true
     *** True Line Result
    -      outputs.background_color = [0, 0, 0]
    -** Processing line: ~      outputs.sprites << [-circle.x + 1100,~
    +      if inputs.keyboard.up || inputs.keyboard.w
    +** Processing line: ~        circle.y += 20~
     - Inside source: true
     *** True Line Result
    -      outputs.sprites << [-circle.x + 1100,
    -** Processing line: ~                          -circle.y - 100,~
    +        circle.y += 20
    +** Processing line: ~      elsif inputs.keyboard.down || inputs.keyboard.s~
     - Inside source: true
     *** True Line Result
    -                          -circle.y - 100,
    -** Processing line: ~                          2416 * 4,~
    +      elsif inputs.keyboard.down || inputs.keyboard.s
    +** Processing line: ~        circle.y -= 20~
     - Inside source: true
     *** True Line Result
    -                          2416 * 4,
    -** Processing line: ~                          3574 * 4,~
    +        circle.y -= 20
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -                          3574 * 4,
    -** Processing line: ~                          'sprites/jupiter.png']~
    +      end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -                          'sprites/jupiter.png']
    -** Processing line: ~      outputs.sprites << [-circle.x,~
    +
    +** Processing line: ~      # delete terrain~
     - Inside source: true
     *** True Line Result
    -      outputs.sprites << [-circle.x,
    -** Processing line: ~                          -circle.y,~
    +      # delete terrain
    +** Processing line: ~      if inputs.keyboard.key_down.x~
     - Inside source: true
     *** True Line Result
    -                          -circle.y,
    -** Processing line: ~                          2416 * 4,~
    +      if inputs.keyboard.key_down.x
    +** Processing line: ~        calc_terrains_to_monitor~
     - Inside source: true
     *** True Line Result
    -                          2416 * 4,
    -** Processing line: ~                          3574 * 4,~
    +        calc_terrains_to_monitor
    +** Processing line: ~        state.terrain = state.terrain.reject do |t|~
     - Inside source: true
     *** True Line Result
    -                          3574 * 4,
    -** Processing line: ~                          'sprites/level.png']~
    +        state.terrain = state.terrain.reject do |t|
    +** Processing line: ~          t[:rect].intersect_rect? circle.rect~
     - Inside source: true
     *** True Line Result
    -                          'sprites/level.png']
    -** Processing line: ~      outputs.sprites << state.whisp_queue~
    +          t[:rect].intersect_rect? circle.rect
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -      outputs.sprites << state.whisp_queue
    -** Processing line: ~      render_aiming_retical~
    +        end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      render_aiming_retical
    -** Processing line: ~      render_circle~
    +
    +** Processing line: ~        state.lava = state.lava.reject do |t|~
     - Inside source: true
     *** True Line Result
    -      render_circle
    -** Processing line: ~      render_notification~
    +        state.lava = state.lava.reject do |t|
    +** Processing line: ~          t[:rect].intersect_rect? circle.rect~
     - Inside source: true
     *** True Line Result
    -      render_notification
    -** Processing line: ~    end~
    +          t[:rect].intersect_rect? circle.rect
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -    end
    +        end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def render_notification~
    -- Inside source: true
    -*** True Line Result
    -    def render_notification
    -** Processing line: ~      toast_length = 500~
    +** Processing line: ~        calc_potential_impacts~
     - Inside source: true
     *** True Line Result
    -      toast_length = 500
    -** Processing line: ~      if circle.game_over_at.elapsed_time < toast_length~
    +        calc_potential_impacts
    +** Processing line: ~        save_level~
     - Inside source: true
     *** True Line Result
    -      if circle.game_over_at.elapsed_time < toast_length
    -** Processing line: ~        label_text = "..."~
    +        save_level
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -        label_text = "..."
    -** Processing line: ~      elsif circle.check_point_at.elapsed_time > toast_length~
    +      end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      elsif circle.check_point_at.elapsed_time > toast_length
    -** Processing line: ~        args.state.current_storyline = nil~
    +
    +** Processing line: ~      # change terrain type~
     - Inside source: true
     *** True Line Result
    -        args.state.current_storyline = nil
    -** Processing line: ~        return~
    +      # change terrain type
    +** Processing line: ~      if inputs.keyboard.key_down.l~
     - Inside source: true
     *** True Line Result
    -        return
    -** Processing line: ~      end~
    +      if inputs.keyboard.key_down.l
    +** Processing line: ~        if state.line_mode == :terrain~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~      if circle.check_point_at &&~
    +        if state.line_mode == :terrain
    +** Processing line: ~          state.line_mode = :lava~
     - Inside source: true
     *** True Line Result
    -      if circle.check_point_at &&
    -** Processing line: ~         circle.check_point_at.elapsed_time == 1 &&~
    +          state.line_mode = :lava
    +** Processing line: ~        else~
     - Inside source: true
     *** True Line Result
    -         circle.check_point_at.elapsed_time == 1 &&
    -** Processing line: ~         !args.state.current_storyline~
    +        else
    +** Processing line: ~          state.line_mode = :terrain~
     - Inside source: true
     *** True Line Result
    -         !args.state.current_storyline
    -** Processing line: ~         if args.state.storyline.length > 0 && args.state.distance_traveled > args.state.storyline[0][:distance_gate]~
    +          state.line_mode = :terrain
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -         if args.state.storyline.length > 0 && args.state.distance_traveled > args.state.storyline[0][:distance_gate]
    -** Processing line: ~           args.state.current_storyline = args.state.storyline.shift[:text]~
    +        end
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -           args.state.current_storyline = args.state.storyline.shift[:text]
    -** Processing line: ~           args.state.distance_traveled ||= 0~
    +      end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -           args.state.distance_traveled ||= 0
    -** Processing line: ~           args.state.storyline_x = circle.x~
    +
    +** Processing line: ~      if inputs.mouse.click && !state.point_one~
     - Inside source: true
     *** True Line Result
    -           args.state.storyline_x = circle.x
    -** Processing line: ~           args.state.storyline_y = circle.y~
    +      if inputs.mouse.click && !state.point_one
    +** Processing line: ~        state.point_one = inputs.mouse.click.point~
     - Inside source: true
     *** True Line Result
    -           args.state.storyline_y = circle.y
    -** Processing line: ~         end~
    +        state.point_one = inputs.mouse.click.point
    +** Processing line: ~      elsif inputs.mouse.click && state.point_one~
     - Inside source: true
     *** True Line Result
    -         end
    -** Processing line: ~        return unless args.state.current_storyline~
    +      elsif inputs.mouse.click && state.point_one
    +** Processing line: ~        l = [*state.point_one, *inputs.mouse.click.point]~
     - Inside source: true
     *** True Line Result
    -        return unless args.state.current_storyline
    -** Processing line: ~      end~
    +        l = [*state.point_one, *inputs.mouse.click.point]
    +** Processing line: ~        l = [l.x  - state.camera.x,~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~      label_text = args.state.current_storyline~
    +        l = [l.x  - state.camera.x,
    +** Processing line: ~             l.y  - state.camera.y,~
     - Inside source: true
     *** True Line Result
    -      label_text = args.state.current_storyline
    -** Processing line: ~      return unless label_text~
    +             l.y  - state.camera.y,
    +** Processing line: ~             l.x2 - state.camera.x,~
     - Inside source: true
     *** True Line Result
    -      return unless label_text
    -** Processing line: ~      x = circle.x + camera.x~
    +             l.x2 - state.camera.x,
    +** Processing line: ~             l.y2 - state.camera.y].line.to_hash~
     - Inside source: true
     *** True Line Result
    -      x = circle.x + camera.x
    -** Processing line: ~      y = circle.y + camera.y - 40~
    +             l.y2 - state.camera.y].line.to_hash
    +** Processing line: ~        l[:rect] = rect_for_line l~
     - Inside source: true
     *** True Line Result
    -      y = circle.y + camera.y - 40
    -** Processing line: ~      w = 900~
    +        l[:rect] = rect_for_line l
    +** Processing line: ~        if state.line_mode == :terrain~
     - Inside source: true
     *** True Line Result
    -      w = 900
    -** Processing line: ~      h = 30~
    +        if state.line_mode == :terrain
    +** Processing line: ~          state.terrain << l~
     - Inside source: true
     *** True Line Result
    -      h = 30
    -** Processing line: ~      outputs.primitives << [x - w.idiv(2), y - h, w, h, 255, 255, 255, 255].solid~
    +          state.terrain << l
    +** Processing line: ~        else~
     - Inside source: true
     *** True Line Result
    -      outputs.primitives << [x - w.idiv(2), y - h, w, h, 255, 255, 255, 255].solid
    -** Processing line: ~      outputs.primitives << [x - w.idiv(2), y - h, w, h, 0, 0, 0, 255].border~
    +        else
    +** Processing line: ~          state.lava << l~
     - Inside source: true
     *** True Line Result
    -      outputs.primitives << [x - w.idiv(2), y - h, w, h, 0, 0, 0, 255].border
    -** Processing line: ~      outputs.labels << [x, y - 4, label_text, 1, 1, 0, 0, 0, 255]~
    +          state.lava << l
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << [x, y - 4, label_text, 1, 1, 0, 0, 0, 255]
    -** Processing line: ~    end~
    +        end
    +** Processing line: ~        save_level~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +        save_level
    +** Processing line: ~        next_x = inputs.mouse.click.point.x - 640~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def render_aiming_retical~
    +        next_x = inputs.mouse.click.point.x - 640
    +** Processing line: ~        next_y = inputs.mouse.click.point.y - 360~
     - Inside source: true
     *** True Line Result
    -    def render_aiming_retical
    -** Processing line: ~      outputs.sprites << [state.camera.x + circle.x + circle.angle.vector_x(circle.potential_lift * 10) - 5,~
    +        next_y = inputs.mouse.click.point.y - 360
    +** Processing line: ~        circle.x += next_x~
     - Inside source: true
     *** True Line Result
    -      outputs.sprites << [state.camera.x + circle.x + circle.angle.vector_x(circle.potential_lift * 10) - 5,
    -** Processing line: ~                          state.camera.y + circle.y + circle.angle.vector_y(circle.potential_lift * 10) - 5,~
    +        circle.x += next_x
    +** Processing line: ~        circle.y += next_y~
     - Inside source: true
     *** True Line Result
    -                          state.camera.y + circle.y + circle.angle.vector_y(circle.potential_lift * 10) - 5,
    -** Processing line: ~                          10, 10, 'sprites/circle-orange.png']~
    +        circle.y += next_y
    +** Processing line: ~        state.point_one = nil~
     - Inside source: true
     *** True Line Result
    -                          10, 10, 'sprites/circle-orange.png']
    -** Processing line: ~      outputs.sprites << [state.camera.x + circle.x + circle.angle.vector_x(circle.radius * 3) - 5,~
    +        state.point_one = nil
    +** Processing line: ~      elsif inputs.keyboard.one~
     - Inside source: true
     *** True Line Result
    -      outputs.sprites << [state.camera.x + circle.x + circle.angle.vector_x(circle.radius * 3) - 5,
    -** Processing line: ~                          state.camera.y + circle.y + circle.angle.vector_y(circle.radius * 3) - 5,~
    +      elsif inputs.keyboard.one
    +** Processing line: ~        state.point_one = [circle.x + camera.x, circle.y+ camera.y]~
     - Inside source: true
     *** True Line Result
    -                          state.camera.y + circle.y + circle.angle.vector_y(circle.radius * 3) - 5,
    -** Processing line: ~                          10, 10, 'sprites/circle-orange.png', 0, 128]~
    +        state.point_one = [circle.x + camera.x, circle.y+ camera.y]
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -                          10, 10, 'sprites/circle-orange.png', 0, 128]
    -** Processing line: ~      if rand > 0.9~
    +      end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      if rand > 0.9
    -** Processing line: ~        outputs.sprites << [state.camera.x + circle.x + circle.angle.vector_x(circle.radius * 3) - 5,~
    +
    +** Processing line: ~      # cancel chain lines~
     - Inside source: true
     *** True Line Result
    -        outputs.sprites << [state.camera.x + circle.x + circle.angle.vector_x(circle.radius * 3) - 5,
    -** Processing line: ~                            state.camera.y + circle.y + circle.angle.vector_y(circle.radius * 3) - 5,~
    +      # cancel chain lines
    +** Processing line: ~      if inputs.keyboard.key_down.nine || inputs.keyboard.key_down.escape || inputs.keyboard.key_up.six || inputs.keyboard.key_up.one~
     - Inside source: true
     *** True Line Result
    -                            state.camera.y + circle.y + circle.angle.vector_y(circle.radius * 3) - 5,
    -** Processing line: ~                            10, 10, 'sprites/circle-white.png', 0, 128]~
    +      if inputs.keyboard.key_down.nine || inputs.keyboard.key_down.escape || inputs.keyboard.key_up.six || inputs.keyboard.key_up.one
    +** Processing line: ~        state.point_one = nil~
     - Inside source: true
     *** True Line Result
    -                            10, 10, 'sprites/circle-white.png', 0, 128]
    +        state.point_one = nil
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    @@ -123923,114 +129383,138 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def render_circle~
    +** Processing line: ~    def play_sound~
     - Inside source: true
     *** True Line Result
    -    def render_circle
    -** Processing line: ~      outputs.sprites << circle.after_images.map do |ai|~
    +    def play_sound
    +** Processing line: ~      return if state.sound_debounce > 0~
     - Inside source: true
     *** True Line Result
    -      outputs.sprites << circle.after_images.map do |ai|
    -** Processing line: ~        ai.merge(x: ai.x + state.camera.x - circle.radius,~
    +      return if state.sound_debounce > 0
    +** Processing line: ~      state.sound_debounce = 5~
     - Inside source: true
     *** True Line Result
    -        ai.merge(x: ai.x + state.camera.x - circle.radius,
    -** Processing line: ~                 y: ai.y + state.camera.y - circle.radius,~
    +      state.sound_debounce = 5
    +** Processing line: ~      outputs.sounds << "sounds/03#{"%02d" % state.sound_index}.wav"~
     - Inside source: true
     *** True Line Result
    -                 y: ai.y + state.camera.y - circle.radius,
    -** Processing line: ~                 w: circle.radius * 2,~
    +      outputs.sounds << "sounds/03#{"%02d" % state.sound_index}.wav"
    +** Processing line: ~      state.sound_index += 1~
     - Inside source: true
     *** True Line Result
    -                 w: circle.radius * 2,
    -** Processing line: ~                 h: circle.radius * 2,~
    +      state.sound_index += 1
    +** Processing line: ~      if state.sound_index > 21~
     - Inside source: true
     *** True Line Result
    -                 h: circle.radius * 2,
    -** Processing line: ~                 path: 'sprites/circle-white.png')~
    +      if state.sound_index > 21
    +** Processing line: ~        state.sound_index = 1~
     - Inside source: true
     *** True Line Result
    -                 path: 'sprites/circle-white.png')
    +        state.sound_index = 1
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
           end
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      outputs.sprites << [(circle.x - circle.radius) + state.camera.x,~
    +** Processing line: ~    def input_game~
     - Inside source: true
     *** True Line Result
    -      outputs.sprites << [(circle.x - circle.radius) + state.camera.x,
    -** Processing line: ~                          (circle.y - circle.radius) + state.camera.y,~
    +    def input_game
    +** Processing line: ~      if inputs.keyboard.down || inputs.keyboard.space~
     - Inside source: true
     *** True Line Result
    -                          (circle.y - circle.radius) + state.camera.y,
    -** Processing line: ~                          circle.radius * 2,~
    +      if inputs.keyboard.down || inputs.keyboard.space
    +** Processing line: ~        circle.potential_lift += 0.03~
     - Inside source: true
     *** True Line Result
    -                          circle.radius * 2,
    -** Processing line: ~                          circle.radius * 2,~
    +        circle.potential_lift += 0.03
    +** Processing line: ~        circle.potential_lift = circle.potential_lift.lesser(10)~
     - Inside source: true
     *** True Line Result
    -                          circle.radius * 2,
    -** Processing line: ~                          'sprites/probe.png']~
    +        circle.potential_lift = circle.potential_lift.lesser(10)
    +** Processing line: ~      elsif inputs.keyboard.key_up.down || inputs.keyboard.key_up.space~
     - Inside source: true
     *** True Line Result
    -                          'sprites/probe.png']
    -** Processing line: ~    end~
    +      elsif inputs.keyboard.key_up.down || inputs.keyboard.key_up.space
    +** Processing line: ~        play_sound~
     - Inside source: true
     *** True Line Result
    -    end
    +        play_sound
    +** Processing line: ~        circle.dy += circle.angle.vector_y circle.potential_lift~
    +- Inside source: true
    +*** True Line Result
    +        circle.dy += circle.angle.vector_y circle.potential_lift
    +** Processing line: ~        circle.dx += circle.angle.vector_x circle.potential_lift~
    +- Inside source: true
    +*** True Line Result
    +        circle.dx += circle.angle.vector_x circle.potential_lift
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def render_debug~
    +** Processing line: ~        if circle.on_floor~
     - Inside source: true
     *** True Line Result
    -    def render_debug
    -** Processing line: ~      return unless state.debug_mode~
    +        if circle.on_floor
    +** Processing line: ~          if circle.floor_relative_y == :above~
     - Inside source: true
     *** True Line Result
    -      return unless state.debug_mode
    -** Processing line: ~~
    +          if circle.floor_relative_y == :above
    +** Processing line: ~            circle.y += circle.potential_lift.abs * 2~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      outputs.labels << [10, 30, state.line_mode, 0, 0, 0, 0, 0]~
    +            circle.y += circle.potential_lift.abs * 2
    +** Processing line: ~          elsif circle.floor_relative_y == :below~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << [10, 30, state.line_mode, 0, 0, 0, 0, 0]
    -** Processing line: ~      outputs.labels << [12, 32, state.line_mode, 0, 0, 255, 255, 255]~
    +          elsif circle.floor_relative_y == :below
    +** Processing line: ~            circle.y -= circle.potential_lift.abs * 2~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << [12, 32, state.line_mode, 0, 0, 255, 255, 255]
    +            circle.y -= circle.potential_lift.abs * 2
    +** Processing line: ~          end~
    +- Inside source: true
    +*** True Line Result
    +          end
    +** Processing line: ~        end~
    +- Inside source: true
    +*** True Line Result
    +        end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      args.outputs.lines << trajectory(circle).line.to_hash.tap do |h|~
    +** Processing line: ~        circle.on_floor = false~
     - Inside source: true
     *** True Line Result
    -      args.outputs.lines << trajectory(circle).line.to_hash.tap do |h|
    -** Processing line: ~        h[:x] += state.camera.x~
    +        circle.on_floor = false
    +** Processing line: ~        circle.potential_lift = 0~
     - Inside source: true
     *** True Line Result
    -        h[:x] += state.camera.x
    -** Processing line: ~        h[:y] += state.camera.y~
    +        circle.potential_lift = 0
    +** Processing line: ~        circle.terrains_to_monitor.clear~
     - Inside source: true
     *** True Line Result
    -        h[:y] += state.camera.y
    -** Processing line: ~        h[:x2] += state.camera.x~
    +        circle.terrains_to_monitor.clear
    +** Processing line: ~        circle.impact_history.clear~
     - Inside source: true
     *** True Line Result
    -        h[:x2] += state.camera.x
    -** Processing line: ~        h[:y2] += state.camera.y~
    +        circle.impact_history.clear
    +** Processing line: ~        circle.impact = nil~
     - Inside source: true
     *** True Line Result
    -        h[:y2] += state.camera.y
    +        circle.impact = nil
    +** Processing line: ~        calc_physics~
    +- Inside source: true
    +*** True Line Result
    +        calc_physics
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    @@ -124039,190 +129523,190 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      outputs.primitives << state.terrain.find_all do |t|~
    +** Processing line: ~      # aim probe~
     - Inside source: true
     *** True Line Result
    -      outputs.primitives << state.terrain.find_all do |t|
    -** Processing line: ~        circle.x.between?(t.x - 640, t.x2 + 640) || circle.y.between?(t.y - 360, t.y2 + 360)~
    +      # aim probe
    +** Processing line: ~      if inputs.keyboard.right || inputs.keyboard.a~
     - Inside source: true
     *** True Line Result
    -        circle.x.between?(t.x - 640, t.x2 + 640) || circle.y.between?(t.y - 360, t.y2 + 360)
    -** Processing line: ~      end.map do |t|~
    +      if inputs.keyboard.right || inputs.keyboard.a
    +** Processing line: ~        circle.angle -= 2~
     - Inside source: true
     *** True Line Result
    -      end.map do |t|
    -** Processing line: ~        [~
    +        circle.angle -= 2
    +** Processing line: ~      elsif inputs.keyboard.left || inputs.keyboard.d~
     - Inside source: true
     *** True Line Result
    -        [
    -** Processing line: ~          t.line.associate(r: 0, g: 255, b: 0) do |h|~
    +      elsif inputs.keyboard.left || inputs.keyboard.d
    +** Processing line: ~        circle.angle += 2~
     - Inside source: true
     *** True Line Result
    -          t.line.associate(r: 0, g: 255, b: 0) do |h|
    -** Processing line: ~            h.x  += state.camera.x~
    +        circle.angle += 2
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -            h.x  += state.camera.x
    -** Processing line: ~            h.y  += state.camera.y~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -            h.y  += state.camera.y
    -** Processing line: ~            h.x2 += state.camera.x~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -            h.x2 += state.camera.x
    -** Processing line: ~            h.y2 += state.camera.y~
    +
    +** Processing line: ~    def input~
     - Inside source: true
     *** True Line Result
    -            h.y2 += state.camera.y
    -** Processing line: ~            if circle.rect.intersect_rect? t[:rect]~
    +    def input
    +** Processing line: ~      input_god_mode~
     - Inside source: true
     *** True Line Result
    -            if circle.rect.intersect_rect? t[:rect]
    -** Processing line: ~              h[:r] = 255~
    +      input_god_mode
    +** Processing line: ~      input_game~
     - Inside source: true
     *** True Line Result
    -              h[:r] = 255
    -** Processing line: ~              h[:g] = 0~
    +      input_game
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -              h[:g] = 0
    -** Processing line: ~            end~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -            end
    -** Processing line: ~            h~
    +
    +** Processing line: ~    def calc_camera~
     - Inside source: true
     *** True Line Result
    -            h
    -** Processing line: ~          end,~
    +    def calc_camera
    +** Processing line: ~      state.camera.target_x = 640 - circle.x~
     - Inside source: true
     *** True Line Result
    -          end,
    -** Processing line: ~          t[:rect].border.associate(r: 255, g: 0, b: 0) do |h|~
    +      state.camera.target_x = 640 - circle.x
    +** Processing line: ~      state.camera.target_y = 360 - circle.y~
     - Inside source: true
     *** True Line Result
    -          t[:rect].border.associate(r: 255, g: 0, b: 0) do |h|
    -** Processing line: ~            h.x += state.camera.x~
    +      state.camera.target_y = 360 - circle.y
    +** Processing line: ~      xdiff = state.camera.target_x - state.camera.x~
     - Inside source: true
     *** True Line Result
    -            h.x += state.camera.x
    -** Processing line: ~            h.y += state.camera.y~
    +      xdiff = state.camera.target_x - state.camera.x
    +** Processing line: ~      ydiff = state.camera.target_y - state.camera.y~
     - Inside source: true
     *** True Line Result
    -            h.y += state.camera.y
    -** Processing line: ~            h.b = 255 if line_near_rect? circle.rect, t~
    +      ydiff = state.camera.target_y - state.camera.y
    +** Processing line: ~      state.camera.x += xdiff * camera.follow_speed~
     - Inside source: true
     *** True Line Result
    -            h.b = 255 if line_near_rect? circle.rect, t
    -** Processing line: ~            h~
    +      state.camera.x += xdiff * camera.follow_speed
    +** Processing line: ~      state.camera.y += ydiff * camera.follow_speed~
     - Inside source: true
     *** True Line Result
    -            h
    -** Processing line: ~          end~
    +      state.camera.y += ydiff * camera.follow_speed
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -          end
    -** Processing line: ~        ]~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        ]
    -** Processing line: ~      end~
    +
    +** Processing line: ~    def calc~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +    def calc
    +** Processing line: ~      state.sound_debounce ||= 0~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      outputs.primitives << state.lava.find_all do |t|~
    +      state.sound_debounce ||= 0
    +** Processing line: ~      state.sound_debounce -= 1~
     - Inside source: true
     *** True Line Result
    -      outputs.primitives << state.lava.find_all do |t|
    -** Processing line: ~        circle.x.between?(t.x - 640, t.x2 + 640) || circle.y.between?(t.y - 360, t.y2 + 360)~
    +      state.sound_debounce -= 1
    +** Processing line: ~      state.sound_debounce = 0 if state.sound_debounce < 0~
     - Inside source: true
     *** True Line Result
    -        circle.x.between?(t.x - 640, t.x2 + 640) || circle.y.between?(t.y - 360, t.y2 + 360)
    -** Processing line: ~      end.map do |t|~
    +      state.sound_debounce = 0 if state.sound_debounce < 0
    +** Processing line: ~      if state.god_mode~
     - Inside source: true
     *** True Line Result
    -      end.map do |t|
    -** Processing line: ~        [~
    +      if state.god_mode
    +** Processing line: ~        circle.dy *= 0.1~
     - Inside source: true
     *** True Line Result
    -        [
    -** Processing line: ~          t.line.associate(r: 0, g: 0, b: 255) do |h|~
    +        circle.dy *= 0.1
    +** Processing line: ~        circle.dx *= 0.1~
     - Inside source: true
     *** True Line Result
    -          t.line.associate(r: 0, g: 0, b: 255) do |h|
    -** Processing line: ~            h.x  += state.camera.x~
    +        circle.dx *= 0.1
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -            h.x  += state.camera.x
    -** Processing line: ~            h.y  += state.camera.y~
    +      end
    +** Processing line: ~      calc_camera~
     - Inside source: true
     *** True Line Result
    -            h.y  += state.camera.y
    -** Processing line: ~            h.x2 += state.camera.x~
    +      calc_camera
    +** Processing line: ~      state.whisp_queue ||= []~
     - Inside source: true
     *** True Line Result
    -            h.x2 += state.camera.x
    -** Processing line: ~            h.y2 += state.camera.y~
    +      state.whisp_queue ||= []
    +** Processing line: ~      if state.tick_count.mod_zero?(4)~
     - Inside source: true
     *** True Line Result
    -            h.y2 += state.camera.y
    -** Processing line: ~            if circle.rect.intersect_rect? t[:rect]~
    +      if state.tick_count.mod_zero?(4)
    +** Processing line: ~        state.whisp_queue << {~
     - Inside source: true
     *** True Line Result
    -            if circle.rect.intersect_rect? t[:rect]
    -** Processing line: ~              h[:r] = 255~
    +        state.whisp_queue << {
    +** Processing line: ~          x: -300,~
     - Inside source: true
     *** True Line Result
    -              h[:r] = 255
    -** Processing line: ~              h[:b] = 0~
    +          x: -300,
    +** Processing line: ~          y: 1400 * rand,~
     - Inside source: true
     *** True Line Result
    -              h[:b] = 0
    -** Processing line: ~            end~
    +          y: 1400 * rand,
    +** Processing line: ~          speed: 2.randomize(:ratio) + 3,~
     - Inside source: true
     *** True Line Result
    -            end
    -** Processing line: ~            h~
    +          speed: 2.randomize(:ratio) + 3,
    +** Processing line: ~          w: 20,~
     - Inside source: true
     *** True Line Result
    -            h
    -** Processing line: ~          end,~
    +          w: 20,
    +** Processing line: ~          h: 20, path: 'sprites/whisp.png',~
     - Inside source: true
     *** True Line Result
    -          end,
    -** Processing line: ~          t[:rect].border.associate(r: 255, g: 0, b: 0) do |h|~
    +          h: 20, path: 'sprites/whisp.png',
    +** Processing line: ~          a: 0,~
     - Inside source: true
     *** True Line Result
    -          t[:rect].border.associate(r: 255, g: 0, b: 0) do |h|
    -** Processing line: ~            h.x += state.camera.x~
    +          a: 0,
    +** Processing line: ~          created_at: state.tick_count,~
     - Inside source: true
     *** True Line Result
    -            h.x += state.camera.x
    -** Processing line: ~            h.y += state.camera.y~
    +          created_at: state.tick_count,
    +** Processing line: ~          angle: 0,~
     - Inside source: true
     *** True Line Result
    -            h.y += state.camera.y
    -** Processing line: ~            h.b = 255 if line_near_rect? circle.rect, t~
    +          angle: 0,
    +** Processing line: ~          r: 100,~
     - Inside source: true
     *** True Line Result
    -            h.b = 255 if line_near_rect? circle.rect, t
    -** Processing line: ~            h~
    +          r: 100,
    +** Processing line: ~          g: 128 + 128 * rand,~
     - Inside source: true
     *** True Line Result
    -            h
    -** Processing line: ~          end~
    +          g: 128 + 128 * rand,
    +** Processing line: ~          b: 128 + 128 * rand~
     - Inside source: true
     *** True Line Result
    -          end
    -** Processing line: ~        ]~
    +          b: 128 + 128 * rand
    +** Processing line: ~        }~
     - Inside source: true
     *** True Line Result
    -        ]
    +        }
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    @@ -124231,38 +129715,34 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      if state.god_mode~
    -- Inside source: true
    -*** True Line Result
    -      if state.god_mode
    -** Processing line: ~        border = circle.rect.merge(x: circle.rect.x + state.camera.x,~
    +** Processing line: ~      state.whisp_queue.each do |w|~
     - Inside source: true
     *** True Line Result
    -        border = circle.rect.merge(x: circle.rect.x + state.camera.x,
    -** Processing line: ~                                   y: circle.rect.y + state.camera.y,~
    +      state.whisp_queue.each do |w|
    +** Processing line: ~        w.x += w[:speed] * 2~
     - Inside source: true
     *** True Line Result
    -                                   y: circle.rect.y + state.camera.y,
    -** Processing line: ~                                   g: 255)~
    +        w.x += w[:speed] * 2
    +** Processing line: ~        w.x -= circle.dx * 0.3~
     - Inside source: true
     *** True Line Result
    -                                   g: 255)
    -** Processing line: ~      else~
    +        w.x -= circle.dx * 0.3
    +** Processing line: ~        w.y -= w[:speed]~
     - Inside source: true
     *** True Line Result
    -      else
    -** Processing line: ~        border = circle.rect.merge(x: circle.rect.x + state.camera.x,~
    +        w.y -= w[:speed]
    +** Processing line: ~        w.y -= circle.dy * 0.3~
     - Inside source: true
     *** True Line Result
    -        border = circle.rect.merge(x: circle.rect.x + state.camera.x,
    -** Processing line: ~                                   y: circle.rect.y + state.camera.y,~
    +        w.y -= circle.dy * 0.3
    +** Processing line: ~        w.angle += w[:speed]~
     - Inside source: true
     *** True Line Result
    -                                   y: circle.rect.y + state.camera.y,
    -** Processing line: ~                                   b: 255)~
    +        w.angle += w[:speed]
    +** Processing line: ~        w.a = w[:created_at].ease(30) * 255~
     - Inside source: true
     *** True Line Result
    -                                   b: 255)
    +        w.a = w[:created_at].ease(30) * 255
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    @@ -124271,166 +129751,130 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      outputs.borders << border~
    -- Inside source: true
    -*** True Line Result
    -      outputs.borders << border
    -** Processing line: ~~
    -- Inside source: true
    -*** True Line Result
    -
    -** Processing line: ~      overlapping ||= {}~
    +** Processing line: ~      state.whisp_queue = state.whisp_queue.reject { |w| w[:x] > 1280 }~
     - Inside source: true
     *** True Line Result
    -      overlapping ||= {}
    +      state.whisp_queue = state.whisp_queue.reject { |w| w[:x] > 1280 }
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      circle.impact_history.each do |h|~
    -- Inside source: true
    -*** True Line Result
    -      circle.impact_history.each do |h|
    -** Processing line: ~        label_mod = 300~
    +** Processing line: ~      if state.tick_count.mod_zero?(2) && (circle.dx != 0 || circle.dy != 0)~
     - Inside source: true
     *** True Line Result
    -        label_mod = 300
    -** Processing line: ~        x = (h[:body][:x].-(150).idiv(label_mod)) * label_mod + camera.x~
    +      if state.tick_count.mod_zero?(2) && (circle.dx != 0 || circle.dy != 0)
    +** Processing line: ~        circle.after_images << {~
     - Inside source: true
     *** True Line Result
    -        x = (h[:body][:x].-(150).idiv(label_mod)) * label_mod + camera.x
    -** Processing line: ~        y = (h[:body][:y].+(150).idiv(label_mod)) * label_mod + camera.y~
    +        circle.after_images << {
    +** Processing line: ~          x: circle.x,~
     - Inside source: true
     *** True Line Result
    -        y = (h[:body][:y].+(150).idiv(label_mod)) * label_mod + camera.y
    -** Processing line: ~        10.times do~
    +          x: circle.x,
    +** Processing line: ~          y: circle.y,~
     - Inside source: true
     *** True Line Result
    -        10.times do
    -** Processing line: ~          if overlapping[x] && overlapping[x][y]~
    +          y: circle.y,
    +** Processing line: ~          w: circle.radius,~
     - Inside source: true
     *** True Line Result
    -          if overlapping[x] && overlapping[x][y]
    -** Processing line: ~            y -= 52~
    +          w: circle.radius,
    +** Processing line: ~          h: circle.radius,~
     - Inside source: true
     *** True Line Result
    -            y -= 52
    -** Processing line: ~          else~
    +          h: circle.radius,
    +** Processing line: ~          a: 255,~
     - Inside source: true
     *** True Line Result
    -          else
    -** Processing line: ~            break~
    +          a: 255,
    +** Processing line: ~          created_at: state.tick_count~
     - Inside source: true
     *** True Line Result
    -            break
    -** Processing line: ~          end~
    +          created_at: state.tick_count
    +** Processing line: ~        }~
     - Inside source: true
     *** True Line Result
    -          end
    -** Processing line: ~        end~
    +        }
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -        end
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~        overlapping[x] ||= {}~
    -- Inside source: true
    -*** True Line Result
    -        overlapping[x] ||= {}
    -** Processing line: ~        overlapping[x][y] ||= true~
    -- Inside source: true
    -*** True Line Result
    -        overlapping[x][y] ||= true
    -** Processing line: ~        outputs.primitives << [x, y - 25, 300, 50, 0, 0, 0, 128].solid~
    -- Inside source: true
    -*** True Line Result
    -        outputs.primitives << [x, y - 25, 300, 50, 0, 0, 0, 128].solid
    -** Processing line: ~        outputs.labels << [x + 10, y + 24, "dy: %.2f" % h[:body][:new_dy], -2, 0, 255, 255, 255]~
    +** Processing line: ~      circle.after_images.each do |ai|~
     - Inside source: true
     *** True Line Result
    -        outputs.labels << [x + 10, y + 24, "dy: %.2f" % h[:body][:new_dy], -2, 0, 255, 255, 255]
    -** Processing line: ~        outputs.labels << [x + 10, y +  9, "dx: %.2f" % h[:body][:new_dx], -2, 0, 255, 255, 255]~
    +      circle.after_images.each do |ai|
    +** Processing line: ~        ai.a = ai[:created_at].ease(10, :flip) * 255~
     - Inside source: true
     *** True Line Result
    -        outputs.labels << [x + 10, y +  9, "dx: %.2f" % h[:body][:new_dx], -2, 0, 255, 255, 255]
    -** Processing line: ~        outputs.labels << [x + 10, y -  5, " ?: #{h[:body][:new_reason]}", -2, 0, 255, 255, 255]~
    +        ai.a = ai[:created_at].ease(10, :flip) * 255
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -        outputs.labels << [x + 10, y -  5, " ?: #{h[:body][:new_reason]}", -2, 0, 255, 255, 255]
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~        outputs.labels << [x + 100, y + 24, "angle: %.2f" % h[:impact][:angle], -2, 0, 255, 255, 255]~
    +** Processing line: ~      circle.after_images = circle.after_images.reject { |ai| ai[:created_at].elapsed_time > 10 }~
     - Inside source: true
     *** True Line Result
    -        outputs.labels << [x + 100, y + 24, "angle: %.2f" % h[:impact][:angle], -2, 0, 255, 255, 255]
    -** Processing line: ~        outputs.labels << [x + 100, y + 9, "m(l): %.2f" % h[:terrain][:slope], -2, 0, 255, 255, 255]~
    +      circle.after_images = circle.after_images.reject { |ai| ai[:created_at].elapsed_time > 10 }
    +** Processing line: ~      calc_physics~
     - Inside source: true
     *** True Line Result
    -        outputs.labels << [x + 100, y + 9, "m(l): %.2f" % h[:terrain][:slope], -2, 0, 255, 255, 255]
    -** Processing line: ~        outputs.labels << [x + 100, y - 5, "m(c): %.2f" % h[:body][:slope], -2, 0, 255, 255, 255]~
    +      calc_physics
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -        outputs.labels << [x + 100, y - 5, "m(c): %.2f" % h[:body][:slope], -2, 0, 255, 255, 255]
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~        outputs.labels << [x + 200, y + 24, "ray: #{h[:impact][:ray]}", -2, 0, 255, 255, 255]~
    -- Inside source: true
    -*** True Line Result
    -        outputs.labels << [x + 200, y + 24, "ray: #{h[:impact][:ray]}", -2, 0, 255, 255, 255]
    -** Processing line: ~        outputs.labels << [x + 200, y +  9, "nxt: #{h[:impact][:ray_next]}", -2, 0, 255, 255, 255]~
    +** Processing line: ~    def circle~
     - Inside source: true
     *** True Line Result
    -        outputs.labels << [x + 200, y +  9, "nxt: #{h[:impact][:ray_next]}", -2, 0, 255, 255, 255]
    -** Processing line: ~        outputs.labels << [x + 200, y -  5, "typ: #{h[:impact][:type]}", -2, 0, 255, 255, 255]~
    +    def circle
    +** Processing line: ~      state.circle~
     - Inside source: true
     *** True Line Result
    -        outputs.labels << [x + 200, y -  5, "typ: #{h[:impact][:type]}", -2, 0, 255, 255, 255]
    -** Processing line: ~      end~
    +      state.circle
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      end
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      if circle.floor~
    -- Inside source: true
    -*** True Line Result
    -      if circle.floor
    -** Processing line: ~        outputs.labels << [circle.x + camera.x + 30, circle.y + camera.y + 100, "point: #{circle.floor_point.slice(:x, :y).values}", -2, 0]~
    -- Inside source: true
    -*** True Line Result
    -        outputs.labels << [circle.x + camera.x + 30, circle.y + camera.y + 100, "point: #{circle.floor_point.slice(:x, :y).values}", -2, 0]
    -** Processing line: ~        outputs.labels << [circle.x + camera.x + 31, circle.y + camera.y + 101, "point: #{circle.floor_point.slice(:x, :y).values}", -2, 0, 255, 255, 255]~
    +** Processing line: ~    def camera~
     - Inside source: true
     *** True Line Result
    -        outputs.labels << [circle.x + camera.x + 31, circle.y + camera.y + 101, "point: #{circle.floor_point.slice(:x, :y).values}", -2, 0, 255, 255, 255]
    -** Processing line: ~        outputs.labels << [circle.x + camera.x + 30, circle.y + camera.y +  85, "circle: #{circle.as_hash.slice(:x, :y).values}", -2, 0]~
    +    def camera
    +** Processing line: ~      state.camera~
     - Inside source: true
     *** True Line Result
    -        outputs.labels << [circle.x + camera.x + 30, circle.y + camera.y +  85, "circle: #{circle.as_hash.slice(:x, :y).values}", -2, 0]
    -** Processing line: ~        outputs.labels << [circle.x + camera.x + 31, circle.y + camera.y +  86, "circle: #{circle.as_hash.slice(:x, :y).values}", -2, 0, 255, 255, 255]~
    +      state.camera
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -        outputs.labels << [circle.x + camera.x + 31, circle.y + camera.y +  86, "circle: #{circle.as_hash.slice(:x, :y).values}", -2, 0, 255, 255, 255]
    -** Processing line: ~        outputs.labels << [circle.x + camera.x + 30, circle.y + camera.y +  70, "rel: #{circle.floor_relative_x} #{circle.floor_relative_y}", -2, 0]~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        outputs.labels << [circle.x + camera.x + 30, circle.y + camera.y +  70, "rel: #{circle.floor_relative_x} #{circle.floor_relative_y}", -2, 0]
    -** Processing line: ~        outputs.labels << [circle.x + camera.x + 31, circle.y + camera.y +  71, "rel: #{circle.floor_relative_x} #{circle.floor_relative_y}", -2, 0, 255, 255, 255]~
    +
    +** Processing line: ~    def terrain~
     - Inside source: true
     *** True Line Result
    -        outputs.labels << [circle.x + camera.x + 31, circle.y + camera.y +  71, "rel: #{circle.floor_relative_x} #{circle.floor_relative_y}", -2, 0, 255, 255, 255]
    -** Processing line: ~      end~
    +    def terrain
    +** Processing line: ~      state.terrain~
     - Inside source: true
     *** True Line Result
    -      end
    +      state.terrain
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -124439,9578 +129883,9674 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def render_stage_editor~
    -- Inside source: true
    -*** True Line Result
    -    def render_stage_editor
    -** Processing line: ~      return unless state.god_mode~
    -- Inside source: true
    -*** True Line Result
    -      return unless state.god_mode
    -** Processing line: ~      return unless state.point_one~
    +** Processing line: ~    def lava~
     - Inside source: true
     *** True Line Result
    -      return unless state.point_one
    -** Processing line: ~      args.lines << [state.point_one, inputs.mouse.point, 0, 255, 255]~
    +    def lava
    +** Processing line: ~      state.lava~
     - Inside source: true
     *** True Line Result
    -      args.lines << [state.point_one, inputs.mouse.point, 0, 255, 255]
    +      state.lava
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
         end
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def trajectory body~
    +** Processing line: ~  # $gtk.reset~
     - Inside source: true
     *** True Line Result
    -    def trajectory body
    -** Processing line: ~      [body.x + body.dx,~
    +  # $gtk.reset
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      [body.x + body.dx,
    -** Processing line: ~       body.y + body.dy,~
    +
    +** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
    -       body.y + body.dy,
    -** Processing line: ~       body.x + body.dx * 1000,~
    +  def tick args
    +** Processing line: ~    args.outputs.background_color = [0, 0, 0]~
     - Inside source: true
     *** True Line Result
    -       body.x + body.dx * 1000,
    -** Processing line: ~       body.y + body.dy * 1000,~
    +    args.outputs.background_color = [0, 0, 0]
    +** Processing line: ~    if args.inputs.keyboard.r~
     - Inside source: true
     *** True Line Result
    -       body.y + body.dy * 1000,
    -** Processing line: ~       0, 255, 255]~
    +    if args.inputs.keyboard.r
    +** Processing line: ~      args.gtk.reset~
     - Inside source: true
     *** True Line Result
    -       0, 255, 255]
    +      args.gtk.reset
    +** Processing line: ~      return~
    +- Inside source: true
    +*** True Line Result
    +      return
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
         end
    -** Processing line: ~~
    +** Processing line: ~    # uncomment the line below to slow down the game so you~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def lengthen_line line, num~
    +    # uncomment the line below to slow down the game so you
    +** Processing line: ~    # can see each tick as it passes~
     - Inside source: true
     *** True Line Result
    -    def lengthen_line line, num
    -** Processing line: ~      line = normalize_line(line)~
    +    # can see each tick as it passes
    +** Processing line: ~    # args.gtk.slowmo! 30~
     - Inside source: true
     *** True Line Result
    -      line = normalize_line(line)
    -** Processing line: ~      slope = geometry.line_slope(line, replace_infinity: 10).abs~
    +    # args.gtk.slowmo! 30
    +** Processing line: ~    $game ||= FallingCircle.new~
     - Inside source: true
     *** True Line Result
    -      slope = geometry.line_slope(line, replace_infinity: 10).abs
    -** Processing line: ~      if slope < 2~
    +    $game ||= FallingCircle.new
    +** Processing line: ~    $game.args = args~
     - Inside source: true
     *** True Line Result
    -      if slope < 2
    -** Processing line: ~        [line.x - num, line.y, line.x2 + num, line.y2].line.to_hash~
    +    $game.args = args
    +** Processing line: ~    $game.tick~
     - Inside source: true
     *** True Line Result
    -        [line.x - num, line.y, line.x2 + num, line.y2].line.to_hash
    -** Processing line: ~      else~
    +    $game.tick
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -      else
    -** Processing line: ~        [line.x, line.y, line.x2, line.y2].line.to_hash~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        [line.x, line.y, line.x2, line.y2].line.to_hash
    -** Processing line: ~      end~
    +
    +** Processing line: ~  def reset~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +  def reset
    +** Processing line: ~    $game = nil~
     - Inside source: true
     *** True Line Result
    -    end
    +    $game = nil
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def normalize_line line~
    -- Inside source: true
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
     *** True Line Result
    -    def normalize_line line
    -** Processing line: ~      if line.x > line.x2~
    -- Inside source: true
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
     *** True Line Result
    -      if line.x > line.x2
    -** Processing line: ~        x  = line.x2~
    -- Inside source: true
    +
    +** Processing line: ~*** Platformer - The Little Probe - Data - level.txt~
    +- Header detected.
     *** True Line Result
    -        x  = line.x2
    -** Processing line: ~        y  = line.y2~
    -- Inside source: true
    +
     *** True Line Result
    -        y  = line.y2
    -** Processing line: ~        x2 = line.x~
    +*** Platformer - The Little Probe - Data - level.txt
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/99_genre_platformer/the_little_probe/data/level.txt~
     - Inside source: true
     *** True Line Result
    -        x2 = line.x
    -** Processing line: ~        y2 = line.y~
    +  # ./samples/99_genre_platformer/the_little_probe/data/level.txt
    +** Processing line: ~  640,8840,1180,8840~
     - Inside source: true
     *** True Line Result
    -        y2 = line.y
    -** Processing line: ~      else~
    +  640,8840,1180,8840
    +** Processing line: ~  -60,10220,0,9960~
     - Inside source: true
     *** True Line Result
    -      else
    -** Processing line: ~        x  = line.x~
    +  -60,10220,0,9960
    +** Processing line: ~  -60,10220,0,10500~
     - Inside source: true
     *** True Line Result
    -        x  = line.x
    -** Processing line: ~        y  = line.y~
    +  -60,10220,0,10500
    +** Processing line: ~  0,10500,0,10780~
     - Inside source: true
     *** True Line Result
    -        y  = line.y
    -** Processing line: ~        x2 = line.x2~
    +  0,10500,0,10780
    +** Processing line: ~  0,10780,40,10900~
     - Inside source: true
     *** True Line Result
    -        x2 = line.x2
    -** Processing line: ~        y2 = line.y2~
    +  0,10780,40,10900
    +** Processing line: ~  500,10920,760,10960~
     - Inside source: true
     *** True Line Result
    -        y2 = line.y2
    -** Processing line: ~      end~
    +  500,10920,760,10960
    +** Processing line: ~  300,10560,820,10600~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~      [x, y, x2, y2]~
    +  300,10560,820,10600
    +** Processing line: ~  420,10320,700,10300~
     - Inside source: true
     *** True Line Result
    -      [x, y, x2, y2]
    -** Processing line: ~    end~
    +  420,10320,700,10300
    +** Processing line: ~  820,10600,1500,10600~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +  820,10600,1500,10600
    +** Processing line: ~  1500,10600,1940,10600~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def rect_for_line line~
    +  1500,10600,1940,10600
    +** Processing line: ~  1940,10600,2380,10580~
     - Inside source: true
     *** True Line Result
    -    def rect_for_line line
    -** Processing line: ~      if line.x > line.x2~
    +  1940,10600,2380,10580
    +** Processing line: ~  2380,10580,2800,10620~
     - Inside source: true
     *** True Line Result
    -      if line.x > line.x2
    -** Processing line: ~        x  = line.x2~
    +  2380,10580,2800,10620
    +** Processing line: ~  2240,11080,2480,11020~
     - Inside source: true
     *** True Line Result
    -        x  = line.x2
    -** Processing line: ~        y  = line.y2~
    +  2240,11080,2480,11020
    +** Processing line: ~  2000,11120,2240,11080~
     - Inside source: true
     *** True Line Result
    -        y  = line.y2
    -** Processing line: ~        x2 = line.x~
    +  2000,11120,2240,11080
    +** Processing line: ~  1760,11180,2000,11120~
     - Inside source: true
     *** True Line Result
    -        x2 = line.x
    -** Processing line: ~        y2 = line.y~
    +  1760,11180,2000,11120
    +** Processing line: ~  1620,11180,1760,11180~
     - Inside source: true
     *** True Line Result
    -        y2 = line.y
    -** Processing line: ~      else~
    +  1620,11180,1760,11180
    +** Processing line: ~  1500,11220,1620,11180~
     - Inside source: true
     *** True Line Result
    -      else
    -** Processing line: ~        x  = line.x~
    +  1500,11220,1620,11180
    +** Processing line: ~  1180,11280,1340,11220~
     - Inside source: true
     *** True Line Result
    -        x  = line.x
    -** Processing line: ~        y  = line.y~
    +  1180,11280,1340,11220
    +** Processing line: ~  1040,11240,1180,11280~
     - Inside source: true
     *** True Line Result
    -        y  = line.y
    -** Processing line: ~        x2 = line.x2~
    +  1040,11240,1180,11280
    +** Processing line: ~  840,11280,1040,11240~
     - Inside source: true
     *** True Line Result
    -        x2 = line.x2
    -** Processing line: ~        y2 = line.y2~
    +  840,11280,1040,11240
    +** Processing line: ~  640,11280,840,11280~
     - Inside source: true
     *** True Line Result
    -        y2 = line.y2
    -** Processing line: ~      end~
    +  640,11280,840,11280
    +** Processing line: ~  500,11220,640,11280~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +  500,11220,640,11280
    +** Processing line: ~  420,11140,500,11220~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      w = x2 - x~
    +  420,11140,500,11220
    +** Processing line: ~  240,11100,420,11140~
     - Inside source: true
     *** True Line Result
    -      w = x2 - x
    -** Processing line: ~      h = y2 - y~
    +  240,11100,420,11140
    +** Processing line: ~  100,11120,240,11100~
     - Inside source: true
     *** True Line Result
    -      h = y2 - y
    -** Processing line: ~~
    +  100,11120,240,11100
    +** Processing line: ~  0,11180,100,11120~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      if h < 0~
    +  0,11180,100,11120
    +** Processing line: ~  -160,11220,0,11180~
     - Inside source: true
     *** True Line Result
    -      if h < 0
    -** Processing line: ~        y += h~
    +  -160,11220,0,11180
    +** Processing line: ~  -260,11240,-160,11220~
     - Inside source: true
     *** True Line Result
    -        y += h
    -** Processing line: ~        h = h.abs~
    +  -260,11240,-160,11220
    +** Processing line: ~  1340,11220,1500,11220~
     - Inside source: true
     *** True Line Result
    -        h = h.abs
    -** Processing line: ~      end~
    +  1340,11220,1500,11220
    +** Processing line: ~  960,13300,1280,13060~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +  960,13300,1280,13060
    +** Processing line: ~  1280,13060,1540,12860~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      if w < circle.radius~
    +  1280,13060,1540,12860
    +** Processing line: ~  1540,12860,1820,12700~
     - Inside source: true
     *** True Line Result
    -      if w < circle.radius
    -** Processing line: ~        x -= circle.radius~
    +  1540,12860,1820,12700
    +** Processing line: ~  1820,12700,2080,12520~
     - Inside source: true
     *** True Line Result
    -        x -= circle.radius
    -** Processing line: ~        w = circle.radius * 2~
    +  1820,12700,2080,12520
    +** Processing line: ~  2080,12520,2240,12400~
     - Inside source: true
     *** True Line Result
    -        w = circle.radius * 2
    -** Processing line: ~      end~
    +  2080,12520,2240,12400
    +** Processing line: ~  2240,12400,2240,12240~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +  2240,12400,2240,12240
    +** Processing line: ~  2240,12240,2400,12080~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      if h < circle.radius~
    +  2240,12240,2400,12080
    +** Processing line: ~  2400,12080,2560,11920~
     - Inside source: true
     *** True Line Result
    -      if h < circle.radius
    -** Processing line: ~        y -= circle.radius~
    +  2400,12080,2560,11920
    +** Processing line: ~  2560,11920,2640,11740~
     - Inside source: true
     *** True Line Result
    -        y -= circle.radius
    -** Processing line: ~        h = circle.radius * 2~
    +  2560,11920,2640,11740
    +** Processing line: ~  2640,11740,2740,11580~
     - Inside source: true
     *** True Line Result
    -        h = circle.radius * 2
    -** Processing line: ~      end~
    +  2640,11740,2740,11580
    +** Processing line: ~  2740,11580,2800,11400~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +  2740,11580,2800,11400
    +** Processing line: ~  2800,11400,2800,11240~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      { x: x, y: y, w: w, h: h }~
    +  2800,11400,2800,11240
    +** Processing line: ~  2740,11140,2800,11240~
     - Inside source: true
     *** True Line Result
    -      { x: x, y: y, w: w, h: h }
    -** Processing line: ~    end~
    +  2740,11140,2800,11240
    +** Processing line: ~  2700,11040,2740,11140~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +  2700,11040,2740,11140
    +** Processing line: ~  2700,11040,2740,10960~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def snap_to_grid x, y, snaps~
    +  2700,11040,2740,10960
    +** Processing line: ~  2740,10960,2740,10920~
     - Inside source: true
     *** True Line Result
    -    def snap_to_grid x, y, snaps
    -** Processing line: ~      snap_number = 10~
    +  2740,10960,2740,10920
    +** Processing line: ~  2700,10900,2740,10920~
     - Inside source: true
     *** True Line Result
    -      snap_number = 10
    -** Processing line: ~      x = x.to_i~
    +  2700,10900,2740,10920
    +** Processing line: ~  2380,10900,2700,10900~
     - Inside source: true
     *** True Line Result
    -      x = x.to_i
    -** Processing line: ~      y = y.to_i~
    +  2380,10900,2700,10900
    +** Processing line: ~  2040,10920,2380,10900~
     - Inside source: true
     *** True Line Result
    -      y = y.to_i
    -** Processing line: ~~
    +  2040,10920,2380,10900
    +** Processing line: ~  1720,10940,2040,10920~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      x_floor = x.idiv(snap_number) * snap_number~
    +  1720,10940,2040,10920
    +** Processing line: ~  1380,11000,1720,10940~
     - Inside source: true
     *** True Line Result
    -      x_floor = x.idiv(snap_number) * snap_number
    -** Processing line: ~      x_mod   = x % snap_number~
    +  1380,11000,1720,10940
    +** Processing line: ~  1180,10980,1380,11000~
     - Inside source: true
     *** True Line Result
    -      x_mod   = x % snap_number
    -** Processing line: ~      x_ceil  = (x.idiv(snap_number) + 1) * snap_number~
    +  1180,10980,1380,11000
    +** Processing line: ~  900,10980,1180,10980~
     - Inside source: true
     *** True Line Result
    -      x_ceil  = (x.idiv(snap_number) + 1) * snap_number
    -** Processing line: ~~
    +  900,10980,1180,10980
    +** Processing line: ~  760,10960,900,10980~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      y_floor = y.idiv(snap_number) * snap_number~
    +  760,10960,900,10980
    +** Processing line: ~  240,10960,500,10920~
     - Inside source: true
     *** True Line Result
    -      y_floor = y.idiv(snap_number) * snap_number
    -** Processing line: ~      y_mod   = y % snap_number~
    +  240,10960,500,10920
    +** Processing line: ~  40,10900,240,10960~
     - Inside source: true
     *** True Line Result
    -      y_mod   = y % snap_number
    -** Processing line: ~      y_ceil  = (y.idiv(snap_number) + 1) * snap_number~
    +  40,10900,240,10960
    +** Processing line: ~  0,9700,0,9960~
     - Inside source: true
     *** True Line Result
    -      y_ceil  = (y.idiv(snap_number) + 1) * snap_number
    -** Processing line: ~~
    +  0,9700,0,9960
    +** Processing line: ~  -60,9500,0,9700~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      if snaps[x_floor]~
    +  -60,9500,0,9700
    +** Processing line: ~  -60,9420,-60,9500~
     - Inside source: true
     *** True Line Result
    -      if snaps[x_floor]
    -** Processing line: ~        x_result = x_floor~
    +  -60,9420,-60,9500
    +** Processing line: ~  -60,9420,-60,9340~
     - Inside source: true
     *** True Line Result
    -        x_result = x_floor
    -** Processing line: ~      elsif snaps[x_ceil]~
    +  -60,9420,-60,9340
    +** Processing line: ~  -60,9340,-60,9280~
     - Inside source: true
     *** True Line Result
    -      elsif snaps[x_ceil]
    -** Processing line: ~        x_result = x_ceil~
    +  -60,9340,-60,9280
    +** Processing line: ~  -60,9120,-60,9280~
     - Inside source: true
     *** True Line Result
    -        x_result = x_ceil
    -** Processing line: ~      elsif x_mod < snap_number.idiv(2)~
    +  -60,9120,-60,9280
    +** Processing line: ~  -60,8940,-60,9120~
     - Inside source: true
     *** True Line Result
    -      elsif x_mod < snap_number.idiv(2)
    -** Processing line: ~        x_result = x_floor~
    +  -60,8940,-60,9120
    +** Processing line: ~  -60,8940,-60,8780~
     - Inside source: true
     *** True Line Result
    -        x_result = x_floor
    -** Processing line: ~      else~
    +  -60,8940,-60,8780
    +** Processing line: ~  -60,8780,0,8700~
     - Inside source: true
     *** True Line Result
    -      else
    -** Processing line: ~        x_result = x_ceil~
    +  -60,8780,0,8700
    +** Processing line: ~  0,8700,40,8680~
     - Inside source: true
     *** True Line Result
    -        x_result = x_ceil
    -** Processing line: ~      end~
    +  0,8700,40,8680
    +** Processing line: ~  40,8680,240,8700~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +  40,8680,240,8700
    +** Processing line: ~  240,8700,360,8780~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      snaps[x_result] ||= {}~
    +  240,8700,360,8780
    +** Processing line: ~  360,8780,640,8840~
     - Inside source: true
     *** True Line Result
    -      snaps[x_result] ||= {}
    -** Processing line: ~~
    +  360,8780,640,8840
    +** Processing line: ~  1420,8400,1540,8480~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      if snaps[x_result][y_floor]~
    +  1420,8400,1540,8480
    +** Processing line: ~  1540,8480,1680,8500~
     - Inside source: true
     *** True Line Result
    -      if snaps[x_result][y_floor]
    -** Processing line: ~        y_result = y_floor~
    +  1540,8480,1680,8500
    +** Processing line: ~  1680,8500,1940,8460~
     - Inside source: true
     *** True Line Result
    -        y_result = y_floor
    -** Processing line: ~      elsif snaps[x_result][y_ceil]~
    +  1680,8500,1940,8460
    +** Processing line: ~  1180,8840,1280,8880~
     - Inside source: true
     *** True Line Result
    -      elsif snaps[x_result][y_ceil]
    -** Processing line: ~        y_result = y_ceil~
    +  1180,8840,1280,8880
    +** Processing line: ~  1280,8880,1340,8860~
     - Inside source: true
     *** True Line Result
    -        y_result = y_ceil
    -** Processing line: ~      elsif y_mod < snap_number.idiv(2)~
    +  1280,8880,1340,8860
    +** Processing line: ~  1340,8860,1720,8860~
     - Inside source: true
     *** True Line Result
    -      elsif y_mod < snap_number.idiv(2)
    -** Processing line: ~        y_result = y_floor~
    +  1340,8860,1720,8860
    +** Processing line: ~  1720,8860,1820,8920~
     - Inside source: true
     *** True Line Result
    -        y_result = y_floor
    -** Processing line: ~      else~
    +  1720,8860,1820,8920
    +** Processing line: ~  1820,8920,1820,9140~
     - Inside source: true
     *** True Line Result
    -      else
    -** Processing line: ~        y_result = y_ceil~
    +  1820,8920,1820,9140
    +** Processing line: ~  1820,9140,1820,9280~
     - Inside source: true
     *** True Line Result
    -        y_result = y_ceil
    -** Processing line: ~      end~
    +  1820,9140,1820,9280
    +** Processing line: ~  1820,9460,1820,9280~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +  1820,9460,1820,9280
    +** Processing line: ~  1760,9480,1820,9460~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      snaps[x_result][y_result] = true~
    +  1760,9480,1820,9460
    +** Processing line: ~  1640,9480,1760,9480~
     - Inside source: true
     *** True Line Result
    -      snaps[x_result][y_result] = true
    -** Processing line: ~      return [x_result, y_result]~
    +  1640,9480,1760,9480
    +** Processing line: ~  1540,9500,1640,9480~
     - Inside source: true
     *** True Line Result
    -      return [x_result, y_result]
    -** Processing line: ~~
    +  1540,9500,1640,9480
    +** Processing line: ~  1340,9500,1540,9500~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    end~
    +  1340,9500,1540,9500
    +** Processing line: ~  1100,9500,1340,9500~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +  1100,9500,1340,9500
    +** Processing line: ~  1040,9540,1100,9500~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def snap_line line~
    +  1040,9540,1100,9500
    +** Processing line: ~  960,9540,1040,9540~
     - Inside source: true
     *** True Line Result
    -    def snap_line line
    -** Processing line: ~      x, y, x2, y2 = line~
    +  960,9540,1040,9540
    +** Processing line: ~  300,9420,360,9460~
     - Inside source: true
     *** True Line Result
    -      x, y, x2, y2 = line
    -** Processing line: ~    end~
    +  300,9420,360,9460
    +** Processing line: ~  240,9440,300,9420~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +  240,9440,300,9420
    +** Processing line: ~  180,9600,240,9440~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def string_to_line s~
    +  180,9600,240,9440
    +** Processing line: ~  120,9660,180,9600~
     - Inside source: true
     *** True Line Result
    -    def string_to_line s
    -** Processing line: ~      x, y, x2, y2 = s.split(',').map(&:to_f)~
    +  120,9660,180,9600
    +** Processing line: ~  100,9820,120,9660~
     - Inside source: true
     *** True Line Result
    -      x, y, x2, y2 = s.split(',').map(&:to_f)
    -** Processing line: ~~
    +  100,9820,120,9660
    +** Processing line: ~  100,9820,120,9860~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      if x > x2~
    +  100,9820,120,9860
    +** Processing line: ~  120,9860,140,9900~
     - Inside source: true
     *** True Line Result
    -      if x > x2
    -** Processing line: ~        x2, x = x, x2~
    +  120,9860,140,9900
    +** Processing line: ~  140,9900,140,10000~
     - Inside source: true
     *** True Line Result
    -        x2, x = x, x2
    -** Processing line: ~        y2, y = y, y2~
    +  140,9900,140,10000
    +** Processing line: ~  140,10440,180,10540~
     - Inside source: true
     *** True Line Result
    -        y2, y = y, y2
    -** Processing line: ~      end~
    +  140,10440,180,10540
    +** Processing line: ~  100,10080,140,10000~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +  100,10080,140,10000
    +** Processing line: ~  100,10080,140,10100~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      x, y = snap_to_grid x, y, state.snaps~
    +  100,10080,140,10100
    +** Processing line: ~  140,10100,140,10440~
     - Inside source: true
     *** True Line Result
    -      x, y = snap_to_grid x, y, state.snaps
    -** Processing line: ~      x2, y2 = snap_to_grid x2, y2, state.snaps~
    +  140,10100,140,10440
    +** Processing line: ~  180,10540,300,10560~
     - Inside source: true
     *** True Line Result
    -      x2, y2 = snap_to_grid x2, y2, state.snaps
    -** Processing line: ~      [x, y, x2, y2].line.to_hash~
    +  180,10540,300,10560
    +** Processing line: ~  2140,9560,2140,9640~
     - Inside source: true
     *** True Line Result
    -      [x, y, x2, y2].line.to_hash
    -** Processing line: ~    end~
    +  2140,9560,2140,9640
    +** Processing line: ~  2140,9720,2140,9640~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +  2140,9720,2140,9640
    +** Processing line: ~  1880,9780,2140,9720~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def load_lines file~
    +  1880,9780,2140,9720
    +** Processing line: ~  1720,9780,1880,9780~
     - Inside source: true
     *** True Line Result
    -    def load_lines file
    -** Processing line: ~      data = gtk.read_file(file) || ""~
    +  1720,9780,1880,9780
    +** Processing line: ~  1620,9740,1720,9780~
     - Inside source: true
     *** True Line Result
    -      data = gtk.read_file(file) || ""
    -** Processing line: ~      data.each_line~
    +  1620,9740,1720,9780
    +** Processing line: ~  1500,9780,1620,9740~
     - Inside source: true
     *** True Line Result
    -      data.each_line
    -** Processing line: ~          .reject { |l| l.strip.length == 0 }~
    +  1500,9780,1620,9740
    +** Processing line: ~  1380,9780,1500,9780~
     - Inside source: true
     *** True Line Result
    -          .reject { |l| l.strip.length == 0 }
    -** Processing line: ~          .map { |l| string_to_line l }~
    +  1380,9780,1500,9780
    +** Processing line: ~  1340,9820,1380,9780~
     - Inside source: true
     *** True Line Result
    -          .map { |l| string_to_line l }
    -** Processing line: ~          .map { |h| h.merge(rect: rect_for_line(h))  }~
    +  1340,9820,1380,9780
    +** Processing line: ~  1200,9820,1340,9820~
     - Inside source: true
     *** True Line Result
    -          .map { |h| h.merge(rect: rect_for_line(h))  }
    -** Processing line: ~    end~
    +  1200,9820,1340,9820
    +** Processing line: ~  1100,9780,1200,9820~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +  1100,9780,1200,9820
    +** Processing line: ~  900,9780,1100,9780~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def load_terrain~
    +  900,9780,1100,9780
    +** Processing line: ~  820,9720,900,9780~
     - Inside source: true
     *** True Line Result
    -    def load_terrain
    -** Processing line: ~      load_lines 'data/level.txt'~
    +  820,9720,900,9780
    +** Processing line: ~  540,9720,820,9720~
     - Inside source: true
     *** True Line Result
    -      load_lines 'data/level.txt'
    -** Processing line: ~    end~
    +  540,9720,820,9720
    +** Processing line: ~  360,9840,540,9720~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +  360,9840,540,9720
    +** Processing line: ~  360,9840,360,9960~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def load_lava~
    +  360,9840,360,9960
    +** Processing line: ~  360,9960,360,10080~
     - Inside source: true
     *** True Line Result
    -    def load_lava
    -** Processing line: ~      load_lines 'data/level_lava.txt'~
    +  360,9960,360,10080
    +** Processing line: ~  360,10140,360,10080~
     - Inside source: true
     *** True Line Result
    -      load_lines 'data/level_lava.txt'
    -** Processing line: ~    end~
    +  360,10140,360,10080
    +** Processing line: ~  360,10140,360,10240~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +  360,10140,360,10240
    +** Processing line: ~  360,10240,420,10320~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def load_level force: false~
    +  360,10240,420,10320
    +** Processing line: ~  700,10300,820,10280~
     - Inside source: true
     *** True Line Result
    -    def load_level force: false
    -** Processing line: ~      if force~
    +  700,10300,820,10280
    +** Processing line: ~  820,10280,820,10280~
     - Inside source: true
     *** True Line Result
    -      if force
    -** Processing line: ~        state.snaps = {}~
    +  820,10280,820,10280
    +** Processing line: ~  820,10280,900,10320~
     - Inside source: true
     *** True Line Result
    -        state.snaps = {}
    -** Processing line: ~        state.terrain = load_terrain~
    +  820,10280,900,10320
    +** Processing line: ~  900,10320,1040,10300~
     - Inside source: true
     *** True Line Result
    -        state.terrain = load_terrain
    -** Processing line: ~        state.lava = load_lava~
    +  900,10320,1040,10300
    +** Processing line: ~  1040,10300,1200,10320~
     - Inside source: true
     *** True Line Result
    -        state.lava = load_lava
    -** Processing line: ~      else~
    +  1040,10300,1200,10320
    +** Processing line: ~  1200,10320,1380,10280~
     - Inside source: true
     *** True Line Result
    -      else
    -** Processing line: ~        state.terrain ||= load_terrain~
    +  1200,10320,1380,10280
    +** Processing line: ~  1380,10280,1500,10300~
     - Inside source: true
     *** True Line Result
    -        state.terrain ||= load_terrain
    -** Processing line: ~        state.lava ||= load_lava~
    +  1380,10280,1500,10300
    +** Processing line: ~  1500,10300,1760,10300~
     - Inside source: true
     *** True Line Result
    -        state.lava ||= load_lava
    -** Processing line: ~      end~
    +  1500,10300,1760,10300
    +** Processing line: ~  2800,10620,2840,10600~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +  2800,10620,2840,10600
    +** Processing line: ~  2840,10600,2900,10600~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +  2840,10600,2900,10600
    +** Processing line: ~  2900,10600,3000,10620~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def save_lines lines, file~
    +  2900,10600,3000,10620
    +** Processing line: ~  3000,10620,3080,10620~
     - Inside source: true
     *** True Line Result
    -    def save_lines lines, file
    -** Processing line: ~      s = lines.map do |l|~
    +  3000,10620,3080,10620
    +** Processing line: ~  3080,10620,3140,10600~
     - Inside source: true
     *** True Line Result
    -      s = lines.map do |l|
    -** Processing line: ~        "#{l.x1},#{l.y1},#{l.x2},#{l.y2}"~
    +  3080,10620,3140,10600
    +** Processing line: ~  3140,10540,3140,10600~
     - Inside source: true
     *** True Line Result
    -        "#{l.x1},#{l.y1},#{l.x2},#{l.y2}"
    -** Processing line: ~      end.join("\n")~
    +  3140,10540,3140,10600
    +** Processing line: ~  3140,10540,3140,10460~
     - Inside source: true
     *** True Line Result
    -      end.join("\n")
    -** Processing line: ~      gtk.write_file(file, s)~
    +  3140,10540,3140,10460
    +** Processing line: ~  3140,10460,3140,10360~
     - Inside source: true
     *** True Line Result
    -      gtk.write_file(file, s)
    -** Processing line: ~    end~
    +  3140,10460,3140,10360
    +** Processing line: ~  3140,10360,3140,10260~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +  3140,10360,3140,10260
    +** Processing line: ~  3140,10260,3140,10140~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def save_level~
    +  3140,10260,3140,10140
    +** Processing line: ~  3140,10140,3140,10000~
     - Inside source: true
     *** True Line Result
    -    def save_level
    -** Processing line: ~      save_lines(state.terrain, 'level.txt')~
    +  3140,10140,3140,10000
    +** Processing line: ~  3140,10000,3140,9860~
     - Inside source: true
     *** True Line Result
    -      save_lines(state.terrain, 'level.txt')
    -** Processing line: ~      save_lines(state.lava, 'level_lava.txt')~
    +  3140,10000,3140,9860
    +** Processing line: ~  3140,9860,3160,9720~
     - Inside source: true
     *** True Line Result
    -      save_lines(state.lava, 'level_lava.txt')
    -** Processing line: ~      load_level force: true~
    +  3140,9860,3160,9720
    +** Processing line: ~  3160,9720,3160,9580~
     - Inside source: true
     *** True Line Result
    -      load_level force: true
    -** Processing line: ~    end~
    +  3160,9720,3160,9580
    +** Processing line: ~  3160,9580,3160,9440~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +  3160,9580,3160,9440
    +** Processing line: ~  3160,9300,3160,9440~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def line_near_rect? rect, terrain~
    +  3160,9300,3160,9440
    +** Processing line: ~  3160,9300,3160,9140~
     - Inside source: true
     *** True Line Result
    -    def line_near_rect? rect, terrain
    -** Processing line: ~      geometry.intersect_rect?(rect, terrain[:rect])~
    +  3160,9300,3160,9140
    +** Processing line: ~  3160,9140,3160,8980~
     - Inside source: true
     *** True Line Result
    -      geometry.intersect_rect?(rect, terrain[:rect])
    -** Processing line: ~    end~
    +  3160,9140,3160,8980
    +** Processing line: ~  3160,8980,3160,8820~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +  3160,8980,3160,8820
    +** Processing line: ~  3160,8820,3160,8680~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def point_within_line? point, line~
    +  3160,8820,3160,8680
    +** Processing line: ~  3160,8680,3160,8520~
     - Inside source: true
     *** True Line Result
    -    def point_within_line? point, line
    -** Processing line: ~      return false if !point~
    +  3160,8680,3160,8520
    +** Processing line: ~  1760,10300,1880,10300~
     - Inside source: true
     *** True Line Result
    -      return false if !point
    -** Processing line: ~      return false if !line~
    +  1760,10300,1880,10300
    +** Processing line: ~  660,9500,960,9540~
     - Inside source: true
     *** True Line Result
    -      return false if !line
    -** Processing line: ~      return true~
    +  660,9500,960,9540
    +** Processing line: ~  640,9460,660,9500~
     - Inside source: true
     *** True Line Result
    -      return true
    -** Processing line: ~    end~
    +  640,9460,660,9500
    +** Processing line: ~  360,9460,640,9460~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +  360,9460,640,9460
    +** Processing line: ~  -480,10760,-440,10880~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def calc_impacts x, dx, y, dy, radius~
    +  -480,10760,-440,10880
    +** Processing line: ~  -480,11020,-440,10880~
     - Inside source: true
     *** True Line Result
    -    def calc_impacts x, dx, y, dy, radius
    -** Processing line: ~      results = { }~
    +  -480,11020,-440,10880
    +** Processing line: ~  -480,11160,-260,11240~
     - Inside source: true
     *** True Line Result
    -      results = { }
    -** Processing line: ~      results[:x] = x~
    +  -480,11160,-260,11240
    +** Processing line: ~  -480,11020,-480,11160~
     - Inside source: true
     *** True Line Result
    -      results[:x] = x
    -** Processing line: ~      results[:y] = y~
    +  -480,11020,-480,11160
    +** Processing line: ~  -600,11420,-380,11320~
     - Inside source: true
     *** True Line Result
    -      results[:y] = y
    -** Processing line: ~      results[:dx] = x~
    +  -600,11420,-380,11320
    +** Processing line: ~  -380,11320,-200,11340~
     - Inside source: true
     *** True Line Result
    -      results[:dx] = x
    -** Processing line: ~      results[:dy] = y~
    +  -380,11320,-200,11340
    +** Processing line: ~  -200,11340,0,11340~
     - Inside source: true
     *** True Line Result
    -      results[:dy] = y
    -** Processing line: ~      results[:point] = { x: x, y: y }~
    +  -200,11340,0,11340
    +** Processing line: ~  0,11340,180,11340~
     - Inside source: true
     *** True Line Result
    -      results[:point] = { x: x, y: y }
    -** Processing line: ~      results[:rect] = { x: x - radius, y: y - radius, w: radius * 2, h: radius * 2 }~
    +  0,11340,180,11340
    +** Processing line: ~  960,13420,960,13300~
     - Inside source: true
     *** True Line Result
    -      results[:rect] = { x: x - radius, y: y - radius, w: radius * 2, h: radius * 2 }
    -** Processing line: ~      results[:trajectory] = trajectory(results)~
    +  960,13420,960,13300
    +** Processing line: ~  960,13420,960,13520~
     - Inside source: true
     *** True Line Result
    -      results[:trajectory] = trajectory(results)
    -** Processing line: ~      results[:impacts] = terrain.find_all { |t| line_near_rect? results[:rect], t }.map do |t|~
    +  960,13420,960,13520
    +** Processing line: ~  960,13520,1000,13560~
     - Inside source: true
     *** True Line Result
    -      results[:impacts] = terrain.find_all { |t| line_near_rect? results[:rect], t }.map do |t|
    -** Processing line: ~        {~
    +  960,13520,1000,13560
    +** Processing line: ~  1000,13560,1040,13540~
     - Inside source: true
     *** True Line Result
    -        {
    -** Processing line: ~          terrain: t,~
    +  1000,13560,1040,13540
    +** Processing line: ~  1040,13540,1200,13440~
     - Inside source: true
     *** True Line Result
    -          terrain: t,
    -** Processing line: ~          point: geometry.line_intersect(results[:trajectory], t),~
    +  1040,13540,1200,13440
    +** Processing line: ~  1200,13440,1380,13380~
     - Inside source: true
     *** True Line Result
    -          point: geometry.line_intersect(results[:trajectory], t),
    -** Processing line: ~          type: :terrain~
    +  1200,13440,1380,13380
    +** Processing line: ~  1380,13380,1620,13300~
     - Inside source: true
     *** True Line Result
    -          type: :terrain
    -** Processing line: ~        }~
    +  1380,13380,1620,13300
    +** Processing line: ~  1620,13300,1820,13220~
     - Inside source: true
     *** True Line Result
    -        }
    -** Processing line: ~      end.reject { |t| !point_within_line? t[:point], t[:terrain] }~
    +  1620,13300,1820,13220
    +** Processing line: ~  1820,13220,2000,13200~
     - Inside source: true
     *** True Line Result
    -      end.reject { |t| !point_within_line? t[:point], t[:terrain] }
    -** Processing line: ~~
    +  1820,13220,2000,13200
    +** Processing line: ~  2000,13200,2240,13200~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      results[:impacts] += lava.find_all { |t| line_near_rect? results[:rect], t }.map do |t|~
    +  2000,13200,2240,13200
    +** Processing line: ~  2240,13200,2440,13160~
     - Inside source: true
     *** True Line Result
    -      results[:impacts] += lava.find_all { |t| line_near_rect? results[:rect], t }.map do |t|
    -** Processing line: ~        {~
    +  2240,13200,2440,13160
    +** Processing line: ~  2440,13160,2640,13040~
     - Inside source: true
     *** True Line Result
    -        {
    -** Processing line: ~          terrain: t,~
    +  2440,13160,2640,13040
    +** Processing line: ~  -480,10760,-440,10620~
     - Inside source: true
     *** True Line Result
    -          terrain: t,
    -** Processing line: ~          point: geometry.line_intersect(results[:trajectory], t),~
    +  -480,10760,-440,10620
    +** Processing line: ~  -440,10620,-360,10560~
     - Inside source: true
     *** True Line Result
    -          point: geometry.line_intersect(results[:trajectory], t),
    -** Processing line: ~          type: :lava~
    +  -440,10620,-360,10560
    +** Processing line: ~  -380,10460,-360,10560~
     - Inside source: true
     *** True Line Result
    -          type: :lava
    -** Processing line: ~        }~
    +  -380,10460,-360,10560
    +** Processing line: ~  -380,10460,-360,10300~
     - Inside source: true
     *** True Line Result
    -        }
    -** Processing line: ~      end.reject { |t| !point_within_line? t[:point], t[:terrain] }~
    +  -380,10460,-360,10300
    +** Processing line: ~  -380,10140,-360,10300~
     - Inside source: true
     *** True Line Result
    -      end.reject { |t| !point_within_line? t[:point], t[:terrain] }
    -** Processing line: ~~
    +  -380,10140,-360,10300
    +** Processing line: ~  -380,10140,-380,10040~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      results~
    +  -380,10140,-380,10040
    +** Processing line: ~  -380,9880,-380,10040~
     - Inside source: true
     *** True Line Result
    -      results
    -** Processing line: ~    end~
    +  -380,9880,-380,10040
    +** Processing line: ~  -380,9720,-380,9880~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +  -380,9720,-380,9880
    +** Processing line: ~  -380,9720,-380,9540~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def calc_potential_impacts~
    +  -380,9720,-380,9540
    +** Processing line: ~  -380,9360,-380,9540~
     - Inside source: true
     *** True Line Result
    -    def calc_potential_impacts
    -** Processing line: ~      impact_results = calc_impacts circle.x, circle.dx, circle.y, circle.dy, circle.radius~
    +  -380,9360,-380,9540
    +** Processing line: ~  -380,9180,-380,9360~
     - Inside source: true
     *** True Line Result
    -      impact_results = calc_impacts circle.x, circle.dx, circle.y, circle.dy, circle.radius
    -** Processing line: ~      circle.rect = impact_results[:rect]~
    +  -380,9180,-380,9360
    +** Processing line: ~  -380,9180,-380,9000~
     - Inside source: true
     *** True Line Result
    -      circle.rect = impact_results[:rect]
    -** Processing line: ~      circle.trajectory = impact_results[:trajectory]~
    +  -380,9180,-380,9000
    +** Processing line: ~  -380,8840,-380,9000~
     - Inside source: true
     *** True Line Result
    -      circle.trajectory = impact_results[:trajectory]
    -** Processing line: ~      circle.impacts = impact_results[:impacts]~
    +  -380,8840,-380,9000
    +** Processing line: ~  -380,8840,-380,8760~
     - Inside source: true
     *** True Line Result
    -      circle.impacts = impact_results[:impacts]
    -** Processing line: ~    end~
    +  -380,8840,-380,8760
    +** Processing line: ~  -380,8760,-380,8620~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +  -380,8760,-380,8620
    +** Processing line: ~  -380,8620,-380,8520~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def calc_terrains_to_monitor~
    +  -380,8620,-380,8520
    +** Processing line: ~  -380,8520,-360,8400~
     - Inside source: true
     *** True Line Result
    -    def calc_terrains_to_monitor
    -** Processing line: ~      circle.impact = nil~
    +  -380,8520,-360,8400
    +** Processing line: ~  -360,8400,-100,8400~
     - Inside source: true
     *** True Line Result
    -      circle.impact = nil
    -** Processing line: ~      circle.impacts.each do |i|~
    +  -360,8400,-100,8400
    +** Processing line: ~  -100,8400,-60,8420~
     - Inside source: true
     *** True Line Result
    -      circle.impacts.each do |i|
    -** Processing line: ~        circle.terrains_to_monitor[i[:terrain]] ||= {~
    +  -100,8400,-60,8420
    +** Processing line: ~  -60,8420,240,8440~
     - Inside source: true
     *** True Line Result
    -        circle.terrains_to_monitor[i[:terrain]] ||= {
    -** Processing line: ~          ray_start: geometry.ray_test(circle, i[:terrain]),~
    +  -60,8420,240,8440
    +** Processing line: ~  240,8440,240,8380~
     - Inside source: true
     *** True Line Result
    -          ray_start: geometry.ray_test(circle, i[:terrain]),
    -** Processing line: ~        }~
    +  240,8440,240,8380
    +** Processing line: ~  240,8380,500,8440~
     - Inside source: true
     *** True Line Result
    -        }
    -** Processing line: ~~
    +  240,8380,500,8440
    +** Processing line: ~  500,8440,760,8460~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~        circle.terrains_to_monitor[i[:terrain]][:ray_current] = geometry.ray_test(circle, i[:terrain])~
    +  500,8440,760,8460
    +** Processing line: ~  760,8460,1000,8400~
     - Inside source: true
     *** True Line Result
    -        circle.terrains_to_monitor[i[:terrain]][:ray_current] = geometry.ray_test(circle, i[:terrain])
    -** Processing line: ~        if circle.terrains_to_monitor[i[:terrain]][:ray_start] != circle.terrains_to_monitor[i[:terrain]][:ray_current]~
    +  760,8460,1000,8400
    +** Processing line: ~  1000,8400,1180,8420~
     - Inside source: true
     *** True Line Result
    -        if circle.terrains_to_monitor[i[:terrain]][:ray_start] != circle.terrains_to_monitor[i[:terrain]][:ray_current]
    -** Processing line: ~          if circle.x.between?(i[:terrain].x, i[:terrain].x2) || circle.y.between?(i[:terrain].y, i[:terrain].y2)~
    +  1000,8400,1180,8420
    +** Processing line: ~  1180,8420,1420,8400~
     - Inside source: true
     *** True Line Result
    -          if circle.x.between?(i[:terrain].x, i[:terrain].x2) || circle.y.between?(i[:terrain].y, i[:terrain].y2)
    -** Processing line: ~            circle.impact = i~
    +  1180,8420,1420,8400
    +** Processing line: ~  1940,8460,2140,8420~
     - Inside source: true
     *** True Line Result
    -            circle.impact = i
    -** Processing line: ~            circle.ray_current = circle.terrains_to_monitor[i[:terrain]][:ray_current]~
    +  1940,8460,2140,8420
    +** Processing line: ~  2140,8420,2200,8520~
     - Inside source: true
     *** True Line Result
    -            circle.ray_current = circle.terrains_to_monitor[i[:terrain]][:ray_current]
    -** Processing line: ~          end~
    +  2140,8420,2200,8520
    +** Processing line: ~  2200,8680,2200,8520~
     - Inside source: true
     *** True Line Result
    -          end
    -** Processing line: ~        end~
    +  2200,8680,2200,8520
    +** Processing line: ~  2140,8840,2200,8680~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~      end~
    +  2140,8840,2200,8680
    +** Processing line: ~  2140,8840,2140,9020~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +  2140,8840,2140,9020
    +** Processing line: ~  2140,9100,2140,9020~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +  2140,9100,2140,9020
    +** Processing line: ~  2140,9200,2140,9100~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def impact_result body, impact~
    +  2140,9200,2140,9100
    +** Processing line: ~  2140,9200,2200,9320~
     - Inside source: true
     *** True Line Result
    -    def impact_result body, impact
    -** Processing line: ~      infinity_alias = 1000~
    +  2140,9200,2200,9320
    +** Processing line: ~  2200,9320,2200,9440~
     - Inside source: true
     *** True Line Result
    -      infinity_alias = 1000
    -** Processing line: ~      r = {~
    +  2200,9320,2200,9440
    +** Processing line: ~  2140,9560,2200,9440~
     - Inside source: true
     *** True Line Result
    -      r = {
    -** Processing line: ~        body: {},~
    +  2140,9560,2200,9440
    +** Processing line: ~  1880,10300,2200,10280~
     - Inside source: true
     *** True Line Result
    -        body: {},
    -** Processing line: ~        terrain: {},~
    +  1880,10300,2200,10280
    +** Processing line: ~  2200,10280,2480,10260~
     - Inside source: true
     *** True Line Result
    -        terrain: {},
    -** Processing line: ~        impact: {}~
    +  2200,10280,2480,10260
    +** Processing line: ~  2480,10260,2700,10240~
     - Inside source: true
     *** True Line Result
    -        impact: {}
    -** Processing line: ~      }~
    +  2480,10260,2700,10240
    +** Processing line: ~  2700,10240,2840,10180~
     - Inside source: true
     *** True Line Result
    -      }
    -** Processing line: ~~
    +  2700,10240,2840,10180
    +** Processing line: ~  2840,10180,2900,10060~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      r[:body][:line] = body.trajectory.dup~
    +  2840,10180,2900,10060
    +** Processing line: ~  2900,9860,2900,10060~
     - Inside source: true
     *** True Line Result
    -      r[:body][:line] = body.trajectory.dup
    -** Processing line: ~      r[:body][:slope] = geometry.line_slope(body.trajectory, replace_infinity: infinity_alias)~
    +  2900,9860,2900,10060
    +** Processing line: ~  2900,9640,2900,9860~
     - Inside source: true
     *** True Line Result
    -      r[:body][:slope] = geometry.line_slope(body.trajectory, replace_infinity: infinity_alias)
    -** Processing line: ~      r[:body][:slope_sign] = r[:body][:slope].sign~
    +  2900,9640,2900,9860
    +** Processing line: ~  2900,9640,2900,9500~
     - Inside source: true
     *** True Line Result
    -      r[:body][:slope_sign] = r[:body][:slope].sign
    -** Processing line: ~      r[:body][:x] = body.x~
    +  2900,9640,2900,9500
    +** Processing line: ~  2900,9460,2900,9500~
     - Inside source: true
     *** True Line Result
    -      r[:body][:x] = body.x
    -** Processing line: ~      r[:body][:y] = body.y~
    +  2900,9460,2900,9500
    +** Processing line: ~  2740,9460,2900,9460~
     - Inside source: true
     *** True Line Result
    -      r[:body][:y] = body.y
    -** Processing line: ~      r[:body][:dy] = body.dy~
    +  2740,9460,2900,9460
    +** Processing line: ~  2700,9460,2740,9460~
     - Inside source: true
     *** True Line Result
    -      r[:body][:dy] = body.dy
    -** Processing line: ~      r[:body][:dx] = body.dx~
    +  2700,9460,2740,9460
    +** Processing line: ~  2700,9360,2700,9460~
     - Inside source: true
     *** True Line Result
    -      r[:body][:dx] = body.dx
    -** Processing line: ~~
    +  2700,9360,2700,9460
    +** Processing line: ~  2700,9320,2700,9360~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      r[:terrain][:line] = impact[:terrain].dup~
    +  2700,9320,2700,9360
    +** Processing line: ~  2600,9320,2700,9320~
     - Inside source: true
     *** True Line Result
    -      r[:terrain][:line] = impact[:terrain].dup
    -** Processing line: ~      r[:terrain][:slope] = geometry.line_slope(impact[:terrain], replace_infinity: infinity_alias)~
    +  2600,9320,2700,9320
    +** Processing line: ~  2600,9260,2600,9320~
     - Inside source: true
     *** True Line Result
    -      r[:terrain][:slope] = geometry.line_slope(impact[:terrain], replace_infinity: infinity_alias)
    -** Processing line: ~      r[:terrain][:slope_sign] = r[:terrain][:slope].sign~
    +  2600,9260,2600,9320
    +** Processing line: ~  2600,9200,2600,9260~
     - Inside source: true
     *** True Line Result
    -      r[:terrain][:slope_sign] = r[:terrain][:slope].sign
    -** Processing line: ~~
    +  2600,9200,2600,9260
    +** Processing line: ~  2480,9120,2600,9200~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      r[:impact][:angle] = geometry.angle_between_lines(body.trajectory, impact[:terrain], replace_infinity: infinity_alias)~
    +  2480,9120,2600,9200
    +** Processing line: ~  2440,9080,2480,9120~
     - Inside source: true
     *** True Line Result
    -      r[:impact][:angle] = geometry.angle_between_lines(body.trajectory, impact[:terrain], replace_infinity: infinity_alias)
    -** Processing line: ~      r[:impact][:point] = { x: impact[:point].x, y: impact[:point].y }~
    +  2440,9080,2480,9120
    +** Processing line: ~  2380,9080,2440,9080~
     - Inside source: true
     *** True Line Result
    -      r[:impact][:point] = { x: impact[:point].x, y: impact[:point].y }
    -** Processing line: ~      r[:impact][:same_slope_sign] = r[:body][:slope_sign] == r[:terrain][:slope_sign]~
    +  2380,9080,2440,9080
    +** Processing line: ~  2320,9060,2380,9080~
     - Inside source: true
     *** True Line Result
    -      r[:impact][:same_slope_sign] = r[:body][:slope_sign] == r[:terrain][:slope_sign]
    -** Processing line: ~      r[:impact][:ray] = body.ray_current~
    +  2320,9060,2380,9080
    +** Processing line: ~  2320,8860,2320,9060~
     - Inside source: true
     *** True Line Result
    -      r[:impact][:ray] = body.ray_current
    -** Processing line: ~      r[:body][:new_on_floor] = body.on_floor~
    +  2320,8860,2320,9060
    +** Processing line: ~  2320,8860,2380,8840~
     - Inside source: true
     *** True Line Result
    -      r[:body][:new_on_floor] = body.on_floor
    -** Processing line: ~      r[:body][:new_floor] = r[:terrain][:line]~
    +  2320,8860,2380,8840
    +** Processing line: ~  2380,8840,2480,8860~
     - Inside source: true
     *** True Line Result
    -      r[:body][:new_floor] = r[:terrain][:line]
    -** Processing line: ~~
    +  2380,8840,2480,8860
    +** Processing line: ~  2480,8860,2600,8840~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      if r[:impact][:angle].abs < 90 && r[:terrain][:slope].abs < 3~
    +  2480,8860,2600,8840
    +** Processing line: ~  2600,8840,2740,8840~
     - Inside source: true
     *** True Line Result
    -      if r[:impact][:angle].abs < 90 && r[:terrain][:slope].abs < 3
    -** Processing line: ~        play_sound~
    +  2600,8840,2740,8840
    +** Processing line: ~  2740,8840,2840,8800~
     - Inside source: true
     *** True Line Result
    -        play_sound
    -** Processing line: ~        r[:body][:new_dy] = r[:body][:dy] * circle.elasticity * -1~
    +  2740,8840,2840,8800
    +** Processing line: ~  2840,8800,2900,8700~
     - Inside source: true
     *** True Line Result
    -        r[:body][:new_dy] = r[:body][:dy] * circle.elasticity * -1
    -** Processing line: ~        r[:body][:new_dx] = r[:body][:dx] * circle.elasticity~
    +  2840,8800,2900,8700
    +** Processing line: ~  2900,8600,2900,8700~
     - Inside source: true
     *** True Line Result
    -        r[:body][:new_dx] = r[:body][:dx] * circle.elasticity
    -** Processing line: ~        r[:impact][:type] = :horizontal~
    +  2900,8600,2900,8700
    +** Processing line: ~  2900,8480,2900,8600~
     - Inside source: true
     *** True Line Result
    -        r[:impact][:type] = :horizontal
    -** Processing line: ~        r[:body][:new_reason] = "-"~
    +  2900,8480,2900,8600
    +** Processing line: ~  2900,8380,2900,8480~
     - Inside source: true
     *** True Line Result
    -        r[:body][:new_reason] = "-"
    -** Processing line: ~      elsif r[:impact][:angle].abs < 90 && r[:terrain][:slope].abs > 3~
    +  2900,8380,2900,8480
    +** Processing line: ~  2900,8380,2900,8260~
     - Inside source: true
     *** True Line Result
    -      elsif r[:impact][:angle].abs < 90 && r[:terrain][:slope].abs > 3
    -** Processing line: ~        play_sound~
    +  2900,8380,2900,8260
    +** Processing line: ~  2900,8260,2900,8140~
     - Inside source: true
     *** True Line Result
    -        play_sound
    -** Processing line: ~        r[:body][:new_dy] = r[:body][:dy] * 1.1~
    +  2900,8260,2900,8140
    +** Processing line: ~  2900,8140,2900,8020~
     - Inside source: true
     *** True Line Result
    -        r[:body][:new_dy] = r[:body][:dy] * 1.1
    -** Processing line: ~        r[:body][:new_dx] = r[:body][:dx] * -circle.elasticity~
    +  2900,8140,2900,8020
    +** Processing line: ~  2900,8020,2900,7900~
     - Inside source: true
     *** True Line Result
    -        r[:body][:new_dx] = r[:body][:dx] * -circle.elasticity
    -** Processing line: ~        r[:impact][:type] = :vertical~
    +  2900,8020,2900,7900
    +** Processing line: ~  2900,7820,2900,7900~
     - Inside source: true
     *** True Line Result
    -        r[:impact][:type] = :vertical
    -** Processing line: ~        r[:body][:new_reason] = "|"~
    +  2900,7820,2900,7900
    +** Processing line: ~  2900,7820,2900,7740~
     - Inside source: true
     *** True Line Result
    -        r[:body][:new_reason] = "|"
    -** Processing line: ~      else~
    +  2900,7820,2900,7740
    +** Processing line: ~  2900,7660,2900,7740~
     - Inside source: true
     *** True Line Result
    -      else
    -** Processing line: ~        play_sound~
    +  2900,7660,2900,7740
    +** Processing line: ~  2900,7560,2900,7660~
     - Inside source: true
     *** True Line Result
    -        play_sound
    -** Processing line: ~        r[:body][:new_dx] = r[:body][:dx] * -circle.elasticity~
    +  2900,7560,2900,7660
    +** Processing line: ~  2900,7460,2900,7560~
     - Inside source: true
     *** True Line Result
    -        r[:body][:new_dx] = r[:body][:dx] * -circle.elasticity
    -** Processing line: ~        r[:body][:new_dy] = r[:body][:dy] * -circle.elasticity~
    +  2900,7460,2900,7560
    +** Processing line: ~  2900,7460,2900,7360~
     - Inside source: true
     *** True Line Result
    -        r[:body][:new_dy] = r[:body][:dy] * -circle.elasticity
    -** Processing line: ~        r[:impact][:type] = :slanted~
    +  2900,7460,2900,7360
    +** Processing line: ~  2900,7260,2900,7360~
     - Inside source: true
     *** True Line Result
    -        r[:impact][:type] = :slanted
    -** Processing line: ~        r[:body][:new_reason] = "/"~
    +  2900,7260,2900,7360
    +** Processing line: ~  2840,7160,2900,7260~
     - Inside source: true
     *** True Line Result
    -        r[:body][:new_reason] = "/"
    -** Processing line: ~      end~
    +  2840,7160,2900,7260
    +** Processing line: ~  2800,7080,2840,7160~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +  2800,7080,2840,7160
    +** Processing line: ~  2700,7100,2800,7080~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      r[:impact][:energy] = r[:body][:new_dx].abs + r[:body][:new_dy].abs~
    +  2700,7100,2800,7080
    +** Processing line: ~  2560,7120,2700,7100~
     - Inside source: true
     *** True Line Result
    -      r[:impact][:energy] = r[:body][:new_dx].abs + r[:body][:new_dy].abs
    -** Processing line: ~~
    +  2560,7120,2700,7100
    +** Processing line: ~  2400,7100,2560,7120~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      if r[:impact][:energy] <= 0.3 && r[:terrain][:slope].abs < 4~
    +  2400,7100,2560,7120
    +** Processing line: ~  2320,7100,2400,7100~
     - Inside source: true
     *** True Line Result
    -      if r[:impact][:energy] <= 0.3 && r[:terrain][:slope].abs < 4
    -** Processing line: ~        r[:body][:new_dx] = 0~
    +  2320,7100,2400,7100
    +** Processing line: ~  2140,7100,2320,7100~
     - Inside source: true
     *** True Line Result
    -        r[:body][:new_dx] = 0
    -** Processing line: ~        r[:body][:new_dy] = 0~
    +  2140,7100,2320,7100
    +** Processing line: ~  2040,7080,2140,7100~
     - Inside source: true
     *** True Line Result
    -        r[:body][:new_dy] = 0
    -** Processing line: ~        r[:impact][:energy] = 0~
    +  2040,7080,2140,7100
    +** Processing line: ~  1940,7080,2040,7080~
     - Inside source: true
     *** True Line Result
    -        r[:impact][:energy] = 0
    -** Processing line: ~        r[:body][:new_on_floor] = true~
    +  1940,7080,2040,7080
    +** Processing line: ~  1820,7140,1940,7080~
     - Inside source: true
     *** True Line Result
    -        r[:body][:new_on_floor] = true
    -** Processing line: ~        r[:body][:new_floor] = r[:terrain][:line]~
    +  1820,7140,1940,7080
    +** Processing line: ~  1680,7140,1820,7140~
     - Inside source: true
     *** True Line Result
    -        r[:body][:new_floor] = r[:terrain][:line]
    -** Processing line: ~        r[:body][:new_reason] = "0"~
    +  1680,7140,1820,7140
    +** Processing line: ~  1540,7140,1680,7140~
     - Inside source: true
     *** True Line Result
    -        r[:body][:new_reason] = "0"
    -** Processing line: ~      end~
    +  1540,7140,1680,7140
    +** Processing line: ~  1420,7220,1540,7140~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +  1420,7220,1540,7140
    +** Processing line: ~  1280,7220,1380,7220~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      r[:impact][:ray_next] = geometry.ray_test({ x: r[:body][:x] - (r[:body][:dx] * 1.1) + r[:body][:new_dx],~
    +  1280,7220,1380,7220
    +** Processing line: ~  1140,7200,1280,7220~
     - Inside source: true
     *** True Line Result
    -      r[:impact][:ray_next] = geometry.ray_test({ x: r[:body][:x] - (r[:body][:dx] * 1.1) + r[:body][:new_dx],
    -** Processing line: ~                                                  y: r[:body][:y] - (r[:body][:dy] * 1.1) + r[:body][:new_dy] + state.gravity },~
    +  1140,7200,1280,7220
    +** Processing line: ~  1000,7220,1140,7200~
     - Inside source: true
     *** True Line Result
    -                                                  y: r[:body][:y] - (r[:body][:dy] * 1.1) + r[:body][:new_dy] + state.gravity },
    -** Processing line: ~                                                r[:terrain][:line])~
    +  1000,7220,1140,7200
    +** Processing line: ~  760,7280,900,7320~
     - Inside source: true
     *** True Line Result
    -                                                r[:terrain][:line])
    -** Processing line: ~~
    +  760,7280,900,7320
    +** Processing line: ~  540,7220,760,7280~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      if r[:impact][:ray_next] == r[:impact][:ray]~
    +  540,7220,760,7280
    +** Processing line: ~  300,7180,540,7220~
     - Inside source: true
     *** True Line Result
    -      if r[:impact][:ray_next] == r[:impact][:ray]
    -** Processing line: ~        r[:body][:new_dx] *= -1~
    +  300,7180,540,7220
    +** Processing line: ~  180,7120,180,7160~
     - Inside source: true
     *** True Line Result
    -        r[:body][:new_dx] *= -1
    -** Processing line: ~        r[:body][:new_dy] *= -1~
    +  180,7120,180,7160
    +** Processing line: ~  40,7140,180,7120~
     - Inside source: true
     *** True Line Result
    -        r[:body][:new_dy] *= -1
    -** Processing line: ~        r[:body][:new_reason] = "clip"~
    +  40,7140,180,7120
    +** Processing line: ~  -60,7160,40,7140~
     - Inside source: true
     *** True Line Result
    -        r[:body][:new_reason] = "clip"
    -** Processing line: ~      end~
    +  -60,7160,40,7140
    +** Processing line: ~  -200,7120,-60,7160~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +  -200,7120,-60,7160
    +** Processing line: ~  180,7160,300,7180~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      r~
    +  180,7160,300,7180
    +** Processing line: ~  -260,7060,-200,7120~
     - Inside source: true
     *** True Line Result
    -      r
    -** Processing line: ~    end~
    +  -260,7060,-200,7120
    +** Processing line: ~  -260,6980,-260,7060~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +  -260,6980,-260,7060
    +** Processing line: ~  -260,6880,-260,6980~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def game_over!~
    +  -260,6880,-260,6980
    +** Processing line: ~  -260,6880,-260,6820~
     - Inside source: true
     *** True Line Result
    -    def game_over!
    -** Processing line: ~      circle.x = circle.check_point_x~
    +  -260,6880,-260,6820
    +** Processing line: ~  -260,6820,-200,6760~
     - Inside source: true
     *** True Line Result
    -      circle.x = circle.check_point_x
    -** Processing line: ~      circle.y = circle.check_point_y~
    +  -260,6820,-200,6760
    +** Processing line: ~  -200,6760,-100,6740~
     - Inside source: true
     *** True Line Result
    -      circle.y = circle.check_point_y
    -** Processing line: ~      circle.dx = 0~
    +  -200,6760,-100,6740
    +** Processing line: ~  -100,6740,-60,6740~
     - Inside source: true
     *** True Line Result
    -      circle.dx = 0
    -** Processing line: ~      circle.dy = 0~
    +  -100,6740,-60,6740
    +** Processing line: ~  -60,6740,40,6740~
     - Inside source: true
     *** True Line Result
    -      circle.dy = 0
    -** Processing line: ~      circle.game_over_at = state.tick_count~
    +  -60,6740,40,6740
    +** Processing line: ~  40,6740,300,6800~
     - Inside source: true
     *** True Line Result
    -      circle.game_over_at = state.tick_count
    -** Processing line: ~    end~
    +  40,6740,300,6800
    +** Processing line: ~  300,6800,420,6760~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +  300,6800,420,6760
    +** Processing line: ~  420,6760,500,6740~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def not_game_over!~
    +  420,6760,500,6740
    +** Processing line: ~  500,6740,540,6760~
     - Inside source: true
     *** True Line Result
    -    def not_game_over!
    -** Processing line: ~      impact_history_entry = impact_result circle, circle.impact~
    +  500,6740,540,6760
    +** Processing line: ~  540,6760,540,6760~
     - Inside source: true
     *** True Line Result
    -      impact_history_entry = impact_result circle, circle.impact
    -** Processing line: ~      circle.impact_history << impact_history_entry~
    +  540,6760,540,6760
    +** Processing line: ~  540,6760,640,6780~
     - Inside source: true
     *** True Line Result
    -      circle.impact_history << impact_history_entry
    -** Processing line: ~      circle.x -= circle.dx * 1.1~
    +  540,6760,640,6780
    +** Processing line: ~  640,6660,640,6780~
     - Inside source: true
     *** True Line Result
    -      circle.x -= circle.dx * 1.1
    -** Processing line: ~      circle.y -= circle.dy * 1.1~
    +  640,6660,640,6780
    +** Processing line: ~  580,6580,640,6660~
     - Inside source: true
     *** True Line Result
    -      circle.y -= circle.dy * 1.1
    -** Processing line: ~      circle.dx = impact_history_entry[:body][:new_dx]~
    +  580,6580,640,6660
    +** Processing line: ~  580,6440,580,6580~
     - Inside source: true
     *** True Line Result
    -      circle.dx = impact_history_entry[:body][:new_dx]
    -** Processing line: ~      circle.dy = impact_history_entry[:body][:new_dy]~
    +  580,6440,580,6580
    +** Processing line: ~  580,6440,640,6320~
     - Inside source: true
     *** True Line Result
    -      circle.dy = impact_history_entry[:body][:new_dy]
    -** Processing line: ~      circle.on_floor = impact_history_entry[:body][:new_on_floor]~
    +  580,6440,640,6320
    +** Processing line: ~  640,6320,640,6180~
     - Inside source: true
     *** True Line Result
    -      circle.on_floor = impact_history_entry[:body][:new_on_floor]
    -** Processing line: ~~
    +  640,6320,640,6180
    +** Processing line: ~  580,6080,640,6180~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      if circle.on_floor~
    +  580,6080,640,6180
    +** Processing line: ~  580,6080,640,5960~
     - Inside source: true
     *** True Line Result
    -      if circle.on_floor
    -** Processing line: ~        circle.check_point_at = state.tick_count~
    +  580,6080,640,5960
    +** Processing line: ~  640,5960,640,5840~
     - Inside source: true
     *** True Line Result
    -        circle.check_point_at = state.tick_count
    -** Processing line: ~        circle.check_point_x = circle.x~
    +  640,5960,640,5840
    +** Processing line: ~  640,5840,640,5700~
     - Inside source: true
     *** True Line Result
    -        circle.check_point_x = circle.x
    -** Processing line: ~        circle.check_point_y = circle.y~
    +  640,5840,640,5700
    +** Processing line: ~  640,5700,660,5560~
     - Inside source: true
     *** True Line Result
    -        circle.check_point_y = circle.y
    -** Processing line: ~      end~
    +  640,5700,660,5560
    +** Processing line: ~  660,5560,660,5440~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +  660,5560,660,5440
    +** Processing line: ~  660,5440,660,5300~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      circle.previous_floor = circle.floor || {}~
    +  660,5440,660,5300
    +** Processing line: ~  660,5140,660,5300~
     - Inside source: true
     *** True Line Result
    -      circle.previous_floor = circle.floor || {}
    -** Processing line: ~      circle.floor = impact_history_entry[:body][:new_floor] || {}~
    +  660,5140,660,5300
    +** Processing line: ~  660,5140,660,5000~
     - Inside source: true
     *** True Line Result
    -      circle.floor = impact_history_entry[:body][:new_floor] || {}
    -** Processing line: ~      circle.floor_point = impact_history_entry[:impact][:point]~
    +  660,5140,660,5000
    +** Processing line: ~  660,5000,660,4880~
     - Inside source: true
     *** True Line Result
    -      circle.floor_point = impact_history_entry[:impact][:point]
    -** Processing line: ~      if circle.floor.slice(:x, :y, :x2, :y2) != circle.previous_floor.slice(:x, :y, :x2, :y2)~
    +  660,5000,660,4880
    +** Processing line: ~  660,4880,820,4860~
     - Inside source: true
     *** True Line Result
    -      if circle.floor.slice(:x, :y, :x2, :y2) != circle.previous_floor.slice(:x, :y, :x2, :y2)
    -** Processing line: ~        new_relative_x = if circle.dx > 0~
    +  660,4880,820,4860
    +** Processing line: ~  820,4860,1000,4840~
     - Inside source: true
     *** True Line Result
    -        new_relative_x = if circle.dx > 0
    -** Processing line: ~                           :right~
    +  820,4860,1000,4840
    +** Processing line: ~  1000,4840,1100,4860~
     - Inside source: true
     *** True Line Result
    -                           :right
    -** Processing line: ~                         elsif circle.dx < 0~
    +  1000,4840,1100,4860
    +** Processing line: ~  1100,4860,1280,4860~
     - Inside source: true
     *** True Line Result
    -                         elsif circle.dx < 0
    -** Processing line: ~                           :left~
    +  1100,4860,1280,4860
    +** Processing line: ~  1280,4860,1420,4840~
     - Inside source: true
     *** True Line Result
    -                           :left
    -** Processing line: ~                         else~
    +  1280,4860,1420,4840
    +** Processing line: ~  1420,4840,1580,4860~
     - Inside source: true
     *** True Line Result
    -                         else
    -** Processing line: ~                           nil~
    +  1420,4840,1580,4860
    +** Processing line: ~  1580,4860,1720,4820~
     - Inside source: true
     *** True Line Result
    -                           nil
    -** Processing line: ~                         end~
    +  1580,4860,1720,4820
    +** Processing line: ~  1720,4820,1880,4860~
     - Inside source: true
     *** True Line Result
    -                         end
    -** Processing line: ~~
    +  1720,4820,1880,4860
    +** Processing line: ~  1880,4860,2000,4840~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~        new_relative_y = if circle.dy > 0~
    +  1880,4860,2000,4840
    +** Processing line: ~  2000,4840,2140,4840~
     - Inside source: true
     *** True Line Result
    -        new_relative_y = if circle.dy > 0
    -** Processing line: ~                           :above~
    +  2000,4840,2140,4840
    +** Processing line: ~  2140,4840,2320,4860~
     - Inside source: true
     *** True Line Result
    -                           :above
    -** Processing line: ~                         elsif circle.dy < 0~
    +  2140,4840,2320,4860
    +** Processing line: ~  2320,4860,2440,4880~
     - Inside source: true
     *** True Line Result
    -                         elsif circle.dy < 0
    -** Processing line: ~                           :below~
    +  2320,4860,2440,4880
    +** Processing line: ~  2440,4880,2600,4880~
     - Inside source: true
     *** True Line Result
    -                           :below
    -** Processing line: ~                         else~
    +  2440,4880,2600,4880
    +** Processing line: ~  2600,4880,2800,4880~
     - Inside source: true
     *** True Line Result
    -                         else
    -** Processing line: ~                           nil~
    +  2600,4880,2800,4880
    +** Processing line: ~  2800,4880,2900,4880~
     - Inside source: true
     *** True Line Result
    -                           nil
    -** Processing line: ~                         end~
    +  2800,4880,2900,4880
    +** Processing line: ~  2900,4880,2900,4820~
     - Inside source: true
     *** True Line Result
    -                         end
    -** Processing line: ~~
    +  2900,4880,2900,4820
    +** Processing line: ~  2900,4740,2900,4820~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~        circle.floor_relative_x = new_relative_x~
    +  2900,4740,2900,4820
    +** Processing line: ~  2800,4700,2900,4740~
     - Inside source: true
     *** True Line Result
    -        circle.floor_relative_x = new_relative_x
    -** Processing line: ~        circle.floor_relative_y = new_relative_y~
    +  2800,4700,2900,4740
    +** Processing line: ~  2520,4680,2800,4700~
     - Inside source: true
     *** True Line Result
    -        circle.floor_relative_y = new_relative_y
    -** Processing line: ~      end~
    +  2520,4680,2800,4700
    +** Processing line: ~  2240,4660,2520,4680~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +  2240,4660,2520,4680
    +** Processing line: ~  1940,4620,2240,4660~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      circle.impact = nil~
    +  1940,4620,2240,4660
    +** Processing line: ~  1820,4580,1940,4620~
     - Inside source: true
     *** True Line Result
    -      circle.impact = nil
    -** Processing line: ~      circle.terrains_to_monitor.clear~
    +  1820,4580,1940,4620
    +** Processing line: ~  1820,4500,1820,4580~
     - Inside source: true
     *** True Line Result
    -      circle.terrains_to_monitor.clear
    -** Processing line: ~    end~
    +  1820,4500,1820,4580
    +** Processing line: ~  1820,4500,1880,4420~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +  1820,4500,1880,4420
    +** Processing line: ~  1880,4420,2000,4420~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def calc_physics~
    +  1880,4420,2000,4420
    +** Processing line: ~  2000,4420,2200,4420~
     - Inside source: true
     *** True Line Result
    -    def calc_physics
    -** Processing line: ~      if args.state.god_mode~
    +  2000,4420,2200,4420
    +** Processing line: ~  2200,4420,2400,4440~
     - Inside source: true
     *** True Line Result
    -      if args.state.god_mode
    -** Processing line: ~        calc_potential_impacts~
    +  2200,4420,2400,4440
    +** Processing line: ~  2400,4440,2600,4440~
     - Inside source: true
     *** True Line Result
    -        calc_potential_impacts
    -** Processing line: ~        calc_terrains_to_monitor~
    +  2400,4440,2600,4440
    +** Processing line: ~  2600,4440,2840,4440~
     - Inside source: true
     *** True Line Result
    -        calc_terrains_to_monitor
    -** Processing line: ~        return~
    +  2600,4440,2840,4440
    +** Processing line: ~  2840,4440,2900,4400~
     - Inside source: true
     *** True Line Result
    -        return
    -** Processing line: ~      end~
    +  2840,4440,2900,4400
    +** Processing line: ~  2740,4260,2900,4280~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +  2740,4260,2900,4280
    +** Processing line: ~  2600,4240,2740,4260~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      if circle.y < -700~
    +  2600,4240,2740,4260
    +** Processing line: ~  2480,4280,2600,4240~
     - Inside source: true
     *** True Line Result
    -      if circle.y < -700
    -** Processing line: ~        game_over~
    +  2480,4280,2600,4240
    +** Processing line: ~  2320,4240,2480,4280~
     - Inside source: true
     *** True Line Result
    -        game_over
    -** Processing line: ~        return~
    +  2320,4240,2480,4280
    +** Processing line: ~  2140,4220,2320,4240~
     - Inside source: true
     *** True Line Result
    -        return
    -** Processing line: ~      end~
    +  2140,4220,2320,4240
    +** Processing line: ~  1940,4220,2140,4220~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +  1940,4220,2140,4220
    +** Processing line: ~  1880,4160,1940,4220~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      return if state.game_over~
    +  1880,4160,1940,4220
    +** Processing line: ~  1880,4160,1880,4080~
     - Inside source: true
     *** True Line Result
    -      return if state.game_over
    -** Processing line: ~      return if circle.on_floor~
    +  1880,4160,1880,4080
    +** Processing line: ~  1880,4080,2040,4040~
     - Inside source: true
     *** True Line Result
    -      return if circle.on_floor
    -** Processing line: ~      circle.previous_dy = circle.dy~
    +  1880,4080,2040,4040
    +** Processing line: ~  2040,4040,2240,4060~
     - Inside source: true
     *** True Line Result
    -      circle.previous_dy = circle.dy
    -** Processing line: ~      circle.previous_dx = circle.dx~
    +  2040,4040,2240,4060
    +** Processing line: ~  2240,4060,2400,4040~
     - Inside source: true
     *** True Line Result
    -      circle.previous_dx = circle.dx
    -** Processing line: ~      circle.x  += circle.dx~
    +  2240,4060,2400,4040
    +** Processing line: ~  2400,4040,2600,4060~
     - Inside source: true
     *** True Line Result
    -      circle.x  += circle.dx
    -** Processing line: ~      circle.y  += circle.dy~
    +  2400,4040,2600,4060
    +** Processing line: ~  2600,4060,2740,4020~
     - Inside source: true
     *** True Line Result
    -      circle.y  += circle.dy
    -** Processing line: ~      args.state.distance_traveled ||= 0~
    +  2600,4060,2740,4020
    +** Processing line: ~  2740,4020,2840,3940~
     - Inside source: true
     *** True Line Result
    -      args.state.distance_traveled ||= 0
    -** Processing line: ~      args.state.distance_traveled += circle.dx.abs + circle.dy.abs~
    +  2740,4020,2840,3940
    +** Processing line: ~  2840,3780,2840,3940~
     - Inside source: true
     *** True Line Result
    -      args.state.distance_traveled += circle.dx.abs + circle.dy.abs
    -** Processing line: ~      circle.dy += state.gravity~
    +  2840,3780,2840,3940
    +** Processing line: ~  2740,3660,2840,3780~
     - Inside source: true
     *** True Line Result
    -      circle.dy += state.gravity
    -** Processing line: ~      calc_potential_impacts~
    +  2740,3660,2840,3780
    +** Processing line: ~  2700,3680,2740,3660~
     - Inside source: true
     *** True Line Result
    -      calc_potential_impacts
    -** Processing line: ~      calc_terrains_to_monitor~
    +  2700,3680,2740,3660
    +** Processing line: ~  2520,3700,2700,3680~
     - Inside source: true
     *** True Line Result
    -      calc_terrains_to_monitor
    -** Processing line: ~      return unless circle.impact~
    +  2520,3700,2700,3680
    +** Processing line: ~  2380,3700,2520,3700~
     - Inside source: true
     *** True Line Result
    -      return unless circle.impact
    -** Processing line: ~      if circle.impact && circle.impact[:type] == :lava~
    +  2380,3700,2520,3700
    +** Processing line: ~  2200,3720,2380,3700~
     - Inside source: true
     *** True Line Result
    -      if circle.impact && circle.impact[:type] == :lava
    -** Processing line: ~        game_over!~
    +  2200,3720,2380,3700
    +** Processing line: ~  2040,3720,2200,3720~
     - Inside source: true
     *** True Line Result
    -        game_over!
    -** Processing line: ~      else~
    +  2040,3720,2200,3720
    +** Processing line: ~  1880,3700,2040,3720~
     - Inside source: true
     *** True Line Result
    -      else
    -** Processing line: ~        not_game_over!~
    +  1880,3700,2040,3720
    +** Processing line: ~  1820,3680,1880,3700~
     - Inside source: true
     *** True Line Result
    -        not_game_over!
    -** Processing line: ~      end~
    +  1820,3680,1880,3700
    +** Processing line: ~  1760,3600,1820,3680~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +  1760,3600,1820,3680
    +** Processing line: ~  1760,3600,1820,3480~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +  1760,3600,1820,3480
    +** Processing line: ~  1820,3480,1880,3440~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def input_god_mode~
    +  1820,3480,1880,3440
    +** Processing line: ~  1880,3440,1960,3460~
     - Inside source: true
     *** True Line Result
    -    def input_god_mode
    -** Processing line: ~      state.debug_mode = !state.debug_mode if inputs.keyboard.key_down.forward_slash~
    +  1880,3440,1960,3460
    +** Processing line: ~  1960,3460,2140,3460~
     - Inside source: true
     *** True Line Result
    -      state.debug_mode = !state.debug_mode if inputs.keyboard.key_down.forward_slash
    -** Processing line: ~~
    +  1960,3460,2140,3460
    +** Processing line: ~  2140,3460,2380,3460~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      # toggle god mode~
    +  2140,3460,2380,3460
    +** Processing line: ~  2380,3460,2640,3440~
     - Inside source: true
     *** True Line Result
    -      # toggle god mode
    -** Processing line: ~      if inputs.keyboard.key_down.g~
    +  2380,3460,2640,3440
    +** Processing line: ~  2640,3440,2900,3380~
     - Inside source: true
     *** True Line Result
    -      if inputs.keyboard.key_down.g
    -** Processing line: ~        state.god_mode = !state.god_mode~
    +  2640,3440,2900,3380
    +** Processing line: ~  2840,3280,2900,3380~
     - Inside source: true
     *** True Line Result
    -        state.god_mode = !state.god_mode
    -** Processing line: ~        state.potential_lift = 0~
    +  2840,3280,2900,3380
    +** Processing line: ~  2840,3280,2900,3200~
     - Inside source: true
     *** True Line Result
    -        state.potential_lift = 0
    -** Processing line: ~        circle.floor = nil~
    +  2840,3280,2900,3200
    +** Processing line: ~  2900,3200,2900,3140~
     - Inside source: true
     *** True Line Result
    -        circle.floor = nil
    -** Processing line: ~        circle.floor_point = nil~
    +  2900,3200,2900,3140
    +** Processing line: ~  2840,3020,2900,3140~
     - Inside source: true
     *** True Line Result
    -        circle.floor_point = nil
    -** Processing line: ~        circle.floor_relative_x = nil~
    +  2840,3020,2900,3140
    +** Processing line: ~  2800,2960,2840,3020~
     - Inside source: true
     *** True Line Result
    -        circle.floor_relative_x = nil
    -** Processing line: ~        circle.floor_relative_y = nil~
    +  2800,2960,2840,3020
    +** Processing line: ~  2700,3000,2800,2960~
     - Inside source: true
     *** True Line Result
    -        circle.floor_relative_y = nil
    -** Processing line: ~        circle.impact = nil~
    +  2700,3000,2800,2960
    +** Processing line: ~  2600,2980,2700,3000~
     - Inside source: true
     *** True Line Result
    -        circle.impact = nil
    -** Processing line: ~        circle.terrains_to_monitor.clear~
    +  2600,2980,2700,3000
    +** Processing line: ~  2380,3000,2600,2980~
     - Inside source: true
     *** True Line Result
    -        circle.terrains_to_monitor.clear
    -** Processing line: ~        return~
    +  2380,3000,2600,2980
    +** Processing line: ~  2140,3000,2380,3000~
     - Inside source: true
     *** True Line Result
    -        return
    -** Processing line: ~      end~
    +  2140,3000,2380,3000
    +** Processing line: ~  1880,3000,2140,3000~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +  1880,3000,2140,3000
    +** Processing line: ~  1720,3040,1880,3000~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      return unless state.god_mode~
    +  1720,3040,1880,3000
    +** Processing line: ~  1640,2960,1720,3040~
     - Inside source: true
     *** True Line Result
    -      return unless state.god_mode
    -** Processing line: ~~
    +  1640,2960,1720,3040
    +** Processing line: ~  1500,2940,1640,2960~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      circle.x = circle.x.to_i~
    +  1500,2940,1640,2960
    +** Processing line: ~  1340,3000,1500,2940~
     - Inside source: true
     *** True Line Result
    -      circle.x = circle.x.to_i
    -** Processing line: ~      circle.y = circle.y.to_i~
    +  1340,3000,1500,2940
    +** Processing line: ~  1240,3000,1340,3000~
     - Inside source: true
     *** True Line Result
    -      circle.y = circle.y.to_i
    -** Processing line: ~~
    +  1240,3000,1340,3000
    +** Processing line: ~  1140,3020,1240,3000~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      # move god circle~
    +  1140,3020,1240,3000
    +** Processing line: ~  1040,3000,1140,3020~
     - Inside source: true
     *** True Line Result
    -      # move god circle
    -** Processing line: ~      if inputs.keyboard.left || inputs.keyboard.a~
    +  1040,3000,1140,3020
    +** Processing line: ~  960,2960,1040,3000~
     - Inside source: true
     *** True Line Result
    -      if inputs.keyboard.left || inputs.keyboard.a
    -** Processing line: ~        circle.x -= 20~
    +  960,2960,1040,3000
    +** Processing line: ~  900,2960,960,2960~
     - Inside source: true
     *** True Line Result
    -        circle.x -= 20
    -** Processing line: ~      elsif inputs.keyboard.right || inputs.keyboard.d || inputs.keyboard.f~
    +  900,2960,960,2960
    +** Processing line: ~  840,2840,900,2960~
     - Inside source: true
     *** True Line Result
    -      elsif inputs.keyboard.right || inputs.keyboard.d || inputs.keyboard.f
    -** Processing line: ~        circle.x += 20~
    +  840,2840,900,2960
    +** Processing line: ~  700,2820,840,2840~
     - Inside source: true
     *** True Line Result
    -        circle.x += 20
    -** Processing line: ~      end~
    +  700,2820,840,2840
    +** Processing line: ~  540,2820,700,2820~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +  540,2820,700,2820
    +** Processing line: ~  420,2820,540,2820~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      if inputs.keyboard.up || inputs.keyboard.w~
    +  420,2820,540,2820
    +** Processing line: ~  180,2800,420,2820~
     - Inside source: true
     *** True Line Result
    -      if inputs.keyboard.up || inputs.keyboard.w
    -** Processing line: ~        circle.y += 20~
    +  180,2800,420,2820
    +** Processing line: ~  60,2780,180,2800~
     - Inside source: true
     *** True Line Result
    -        circle.y += 20
    -** Processing line: ~      elsif inputs.keyboard.down || inputs.keyboard.s~
    +  60,2780,180,2800
    +** Processing line: ~  -60,2800,60,2780~
     - Inside source: true
     *** True Line Result
    -      elsif inputs.keyboard.down || inputs.keyboard.s
    -** Processing line: ~        circle.y -= 20~
    +  -60,2800,60,2780
    +** Processing line: ~  -160,2760,-60,2800~
     - Inside source: true
     *** True Line Result
    -        circle.y -= 20
    -** Processing line: ~      end~
    +  -160,2760,-60,2800
    +** Processing line: ~  -260,2740,-160,2760~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +  -260,2740,-160,2760
    +** Processing line: ~  -300,2640,-260,2740~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      # delete terrain~
    +  -300,2640,-260,2740
    +** Processing line: ~  -360,2560,-300,2640~
     - Inside source: true
     *** True Line Result
    -      # delete terrain
    -** Processing line: ~      if inputs.keyboard.key_down.x~
    +  -360,2560,-300,2640
    +** Processing line: ~  -380,2460,-360,2560~
     - Inside source: true
     *** True Line Result
    -      if inputs.keyboard.key_down.x
    -** Processing line: ~        calc_terrains_to_monitor~
    +  -380,2460,-360,2560
    +** Processing line: ~  -380,2460,-300,2380~
     - Inside source: true
     *** True Line Result
    -        calc_terrains_to_monitor
    -** Processing line: ~        state.terrain = state.terrain.reject do |t|~
    +  -380,2460,-300,2380
    +** Processing line: ~  -300,2300,-300,2380~
     - Inside source: true
     *** True Line Result
    -        state.terrain = state.terrain.reject do |t|
    -** Processing line: ~          t[:rect].intersect_rect? circle.rect~
    +  -300,2300,-300,2380
    +** Processing line: ~  -300,2300,-300,2220~
     - Inside source: true
     *** True Line Result
    -          t[:rect].intersect_rect? circle.rect
    -** Processing line: ~        end~
    +  -300,2300,-300,2220
    +** Processing line: ~  -300,2100,-300,2220~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~~
    +  -300,2100,-300,2220
    +** Processing line: ~  -300,2100,-300,2040~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~        state.lava = state.lava.reject do |t|~
    +  -300,2100,-300,2040
    +** Processing line: ~  -300,2040,-160,2040~
     - Inside source: true
     *** True Line Result
    -        state.lava = state.lava.reject do |t|
    -** Processing line: ~          t[:rect].intersect_rect? circle.rect~
    +  -300,2040,-160,2040
    +** Processing line: ~  -160,2040,-60,2040~
     - Inside source: true
     *** True Line Result
    -          t[:rect].intersect_rect? circle.rect
    -** Processing line: ~        end~
    +  -160,2040,-60,2040
    +** Processing line: ~  -60,2040,60,2040~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~~
    +  -60,2040,60,2040
    +** Processing line: ~  60,2040,180,2040~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~        calc_potential_impacts~
    +  60,2040,180,2040
    +** Processing line: ~  180,2040,360,2040~
     - Inside source: true
     *** True Line Result
    -        calc_potential_impacts
    -** Processing line: ~        save_level~
    +  180,2040,360,2040
    +** Processing line: ~  360,2040,540,2040~
     - Inside source: true
     *** True Line Result
    -        save_level
    -** Processing line: ~      end~
    +  360,2040,540,2040
    +** Processing line: ~  540,2040,700,2080~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +  540,2040,700,2080
    +** Processing line: ~  660,2160,700,2080~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      # change terrain type~
    +  660,2160,700,2080
    +** Processing line: ~  660,2160,700,2260~
     - Inside source: true
     *** True Line Result
    -      # change terrain type
    -** Processing line: ~      if inputs.keyboard.key_down.l~
    +  660,2160,700,2260
    +** Processing line: ~  660,2380,700,2260~
     - Inside source: true
     *** True Line Result
    -      if inputs.keyboard.key_down.l
    -** Processing line: ~        if state.line_mode == :terrain~
    +  660,2380,700,2260
    +** Processing line: ~  500,2340,660,2380~
     - Inside source: true
     *** True Line Result
    -        if state.line_mode == :terrain
    -** Processing line: ~          state.line_mode = :lava~
    +  500,2340,660,2380
    +** Processing line: ~  360,2340,500,2340~
     - Inside source: true
     *** True Line Result
    -          state.line_mode = :lava
    -** Processing line: ~        else~
    +  360,2340,500,2340
    +** Processing line: ~  240,2340,360,2340~
     - Inside source: true
     *** True Line Result
    -        else
    -** Processing line: ~          state.line_mode = :terrain~
    +  240,2340,360,2340
    +** Processing line: ~  40,2320,240,2340~
     - Inside source: true
     *** True Line Result
    -          state.line_mode = :terrain
    -** Processing line: ~        end~
    +  40,2320,240,2340
    +** Processing line: ~  -60,2320,40,2320~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~      end~
    +  -60,2320,40,2320
    +** Processing line: ~  -100,2380,-60,2320~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +  -100,2380,-60,2320
    +** Processing line: ~  -100,2380,-100,2460~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      if inputs.mouse.click && !state.point_one~
    +  -100,2380,-100,2460
    +** Processing line: ~  -100,2460,-100,2540~
     - Inside source: true
     *** True Line Result
    -      if inputs.mouse.click && !state.point_one
    -** Processing line: ~        state.point_one = inputs.mouse.click.point~
    +  -100,2460,-100,2540
    +** Processing line: ~  -100,2540,0,2560~
     - Inside source: true
     *** True Line Result
    -        state.point_one = inputs.mouse.click.point
    -** Processing line: ~      elsif inputs.mouse.click && state.point_one~
    +  -100,2540,0,2560
    +** Processing line: ~  0,2560,140,2600~
     - Inside source: true
     *** True Line Result
    -      elsif inputs.mouse.click && state.point_one
    -** Processing line: ~        l = [*state.point_one, *inputs.mouse.click.point]~
    +  0,2560,140,2600
    +** Processing line: ~  140,2600,300,2600~
     - Inside source: true
     *** True Line Result
    -        l = [*state.point_one, *inputs.mouse.click.point]
    -** Processing line: ~        l = [l.x  - state.camera.x,~
    +  140,2600,300,2600
    +** Processing line: ~  300,2600,460,2600~
     - Inside source: true
     *** True Line Result
    -        l = [l.x  - state.camera.x,
    -** Processing line: ~             l.y  - state.camera.y,~
    +  300,2600,460,2600
    +** Processing line: ~  460,2600,640,2600~
     - Inside source: true
     *** True Line Result
    -             l.y  - state.camera.y,
    -** Processing line: ~             l.x2 - state.camera.x,~
    +  460,2600,640,2600
    +** Processing line: ~  640,2600,760,2580~
     - Inside source: true
     *** True Line Result
    -             l.x2 - state.camera.x,
    -** Processing line: ~             l.y2 - state.camera.y].line.to_hash~
    +  640,2600,760,2580
    +** Processing line: ~  760,2580,820,2560~
     - Inside source: true
     *** True Line Result
    -             l.y2 - state.camera.y].line.to_hash
    -** Processing line: ~        l[:rect] = rect_for_line l~
    +  760,2580,820,2560
    +** Processing line: ~  820,2560,820,2500~
     - Inside source: true
     *** True Line Result
    -        l[:rect] = rect_for_line l
    -** Processing line: ~        if state.line_mode == :terrain~
    +  820,2560,820,2500
    +** Processing line: ~  820,2500,820,2400~
     - Inside source: true
     *** True Line Result
    -        if state.line_mode == :terrain
    -** Processing line: ~          state.terrain << l~
    +  820,2500,820,2400
    +** Processing line: ~  820,2400,840,2320~
     - Inside source: true
     *** True Line Result
    -          state.terrain << l
    -** Processing line: ~        else~
    +  820,2400,840,2320
    +** Processing line: ~  840,2320,840,2240~
     - Inside source: true
     *** True Line Result
    -        else
    -** Processing line: ~          state.lava << l~
    +  840,2320,840,2240
    +** Processing line: ~  820,2120,840,2240~
     - Inside source: true
     *** True Line Result
    -          state.lava << l
    -** Processing line: ~        end~
    +  820,2120,840,2240
    +** Processing line: ~  820,2020,820,2120~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~        save_level~
    +  820,2020,820,2120
    +** Processing line: ~  820,1900,820,2020~
     - Inside source: true
     *** True Line Result
    -        save_level
    -** Processing line: ~        next_x = inputs.mouse.click.point.x - 640~
    +  820,1900,820,2020
    +** Processing line: ~  760,1840,820,1900~
     - Inside source: true
     *** True Line Result
    -        next_x = inputs.mouse.click.point.x - 640
    -** Processing line: ~        next_y = inputs.mouse.click.point.y - 360~
    +  760,1840,820,1900
    +** Processing line: ~  640,1840,760,1840~
     - Inside source: true
     *** True Line Result
    -        next_y = inputs.mouse.click.point.y - 360
    -** Processing line: ~        circle.x += next_x~
    +  640,1840,760,1840
    +** Processing line: ~  500,1840,640,1840~
     - Inside source: true
     *** True Line Result
    -        circle.x += next_x
    -** Processing line: ~        circle.y += next_y~
    +  500,1840,640,1840
    +** Processing line: ~  300,1860,420,1880~
     - Inside source: true
     *** True Line Result
    -        circle.y += next_y
    -** Processing line: ~        state.point_one = nil~
    +  300,1860,420,1880
    +** Processing line: ~  180,1840,300,1860~
     - Inside source: true
     *** True Line Result
    -        state.point_one = nil
    -** Processing line: ~      elsif inputs.keyboard.one~
    +  180,1840,300,1860
    +** Processing line: ~  420,1880,500,1840~
     - Inside source: true
     *** True Line Result
    -      elsif inputs.keyboard.one
    -** Processing line: ~        state.point_one = [circle.x + camera.x, circle.y+ camera.y]~
    +  420,1880,500,1840
    +** Processing line: ~  0,1840,180,1840~
     - Inside source: true
     *** True Line Result
    -        state.point_one = [circle.x + camera.x, circle.y+ camera.y]
    -** Processing line: ~      end~
    +  0,1840,180,1840
    +** Processing line: ~  -60,1860,0,1840~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +  -60,1860,0,1840
    +** Processing line: ~  -160,1840,-60,1860~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      # cancel chain lines~
    +  -160,1840,-60,1860
    +** Processing line: ~  -200,1800,-160,1840~
     - Inside source: true
     *** True Line Result
    -      # cancel chain lines
    -** Processing line: ~      if inputs.keyboard.key_down.nine || inputs.keyboard.key_down.escape || inputs.keyboard.key_up.six || inputs.keyboard.key_up.one~
    +  -200,1800,-160,1840
    +** Processing line: ~  -260,1760,-200,1800~
     - Inside source: true
     *** True Line Result
    -      if inputs.keyboard.key_down.nine || inputs.keyboard.key_down.escape || inputs.keyboard.key_up.six || inputs.keyboard.key_up.one
    -** Processing line: ~        state.point_one = nil~
    +  -260,1760,-200,1800
    +** Processing line: ~  -260,1680,-260,1760~
     - Inside source: true
     *** True Line Result
    -        state.point_one = nil
    -** Processing line: ~      end~
    +  -260,1680,-260,1760
    +** Processing line: ~  -260,1620,-260,1680~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +  -260,1620,-260,1680
    +** Processing line: ~  -260,1540,-260,1620~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +  -260,1540,-260,1620
    +** Processing line: ~  -260,1540,-260,1460~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def play_sound~
    +  -260,1540,-260,1460
    +** Processing line: ~  -300,1420,-260,1460~
     - Inside source: true
     *** True Line Result
    -    def play_sound
    -** Processing line: ~      return if state.sound_debounce > 0~
    +  -300,1420,-260,1460
    +** Processing line: ~  -300,1420,-300,1340~
     - Inside source: true
     *** True Line Result
    -      return if state.sound_debounce > 0
    -** Processing line: ~      state.sound_debounce = 5~
    +  -300,1420,-300,1340
    +** Processing line: ~  -300,1340,-260,1260~
     - Inside source: true
     *** True Line Result
    -      state.sound_debounce = 5
    -** Processing line: ~      outputs.sounds << "sounds/03#{"%02d" % state.sound_index}.wav"~
    +  -300,1340,-260,1260
    +** Processing line: ~  -260,1260,-260,1160~
     - Inside source: true
     *** True Line Result
    -      outputs.sounds << "sounds/03#{"%02d" % state.sound_index}.wav"
    -** Processing line: ~      state.sound_index += 1~
    +  -260,1260,-260,1160
    +** Processing line: ~  -260,1060,-260,1160~
     - Inside source: true
     *** True Line Result
    -      state.sound_index += 1
    -** Processing line: ~      if state.sound_index > 21~
    +  -260,1060,-260,1160
    +** Processing line: ~  -260,1060,-260,960~
     - Inside source: true
     *** True Line Result
    -      if state.sound_index > 21
    -** Processing line: ~        state.sound_index = 1~
    +  -260,1060,-260,960
    +** Processing line: ~  -260,880,-260,960~
     - Inside source: true
     *** True Line Result
    -        state.sound_index = 1
    -** Processing line: ~      end~
    +  -260,880,-260,960
    +** Processing line: ~  -260,880,-260,780~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +  -260,880,-260,780
    +** Processing line: ~  -260,780,-260,680~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +  -260,780,-260,680
    +** Processing line: ~  -300,580,-260,680~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def input_game~
    +  -300,580,-260,680
    +** Processing line: ~  -300,580,-300,480~
     - Inside source: true
     *** True Line Result
    -    def input_game
    -** Processing line: ~      if inputs.keyboard.down || inputs.keyboard.space~
    +  -300,580,-300,480
    +** Processing line: ~  -300,480,-260,400~
     - Inside source: true
     *** True Line Result
    -      if inputs.keyboard.down || inputs.keyboard.space
    -** Processing line: ~        circle.potential_lift += 0.03~
    +  -300,480,-260,400
    +** Processing line: ~  -300,320,-260,400~
     - Inside source: true
     *** True Line Result
    -        circle.potential_lift += 0.03
    -** Processing line: ~        circle.potential_lift = circle.potential_lift.lesser(10)~
    +  -300,320,-260,400
    +** Processing line: ~  -300,320,-300,240~
     - Inside source: true
     *** True Line Result
    -        circle.potential_lift = circle.potential_lift.lesser(10)
    -** Processing line: ~      elsif inputs.keyboard.key_up.down || inputs.keyboard.key_up.space~
    +  -300,320,-300,240
    +** Processing line: ~  -300,240,-200,220~
     - Inside source: true
     *** True Line Result
    -      elsif inputs.keyboard.key_up.down || inputs.keyboard.key_up.space
    -** Processing line: ~        play_sound~
    +  -300,240,-200,220
    +** Processing line: ~  -200,220,-200,160~
     - Inside source: true
     *** True Line Result
    -        play_sound
    -** Processing line: ~        circle.dy += circle.angle.vector_y circle.potential_lift~
    +  -200,220,-200,160
    +** Processing line: ~  -200,160,-100,140~
     - Inside source: true
     *** True Line Result
    -        circle.dy += circle.angle.vector_y circle.potential_lift
    -** Processing line: ~        circle.dx += circle.angle.vector_x circle.potential_lift~
    +  -200,160,-100,140
    +** Processing line: ~  -100,140,0,120~
     - Inside source: true
     *** True Line Result
    -        circle.dx += circle.angle.vector_x circle.potential_lift
    -** Processing line: ~~
    +  -100,140,0,120
    +** Processing line: ~  0,120,60,120~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~        if circle.on_floor~
    +  0,120,60,120
    +** Processing line: ~  60,120,180,120~
     - Inside source: true
     *** True Line Result
    -        if circle.on_floor
    -** Processing line: ~          if circle.floor_relative_y == :above~
    +  60,120,180,120
    +** Processing line: ~  180,120,300,120~
     - Inside source: true
     *** True Line Result
    -          if circle.floor_relative_y == :above
    -** Processing line: ~            circle.y += circle.potential_lift.abs * 2~
    +  180,120,300,120
    +** Processing line: ~  300,120,420,140~
     - Inside source: true
     *** True Line Result
    -            circle.y += circle.potential_lift.abs * 2
    -** Processing line: ~          elsif circle.floor_relative_y == :below~
    +  300,120,420,140
    +** Processing line: ~  420,140,580,180~
     - Inside source: true
     *** True Line Result
    -          elsif circle.floor_relative_y == :below
    -** Processing line: ~            circle.y -= circle.potential_lift.abs * 2~
    +  420,140,580,180
    +** Processing line: ~  580,180,760,180~
     - Inside source: true
     *** True Line Result
    -            circle.y -= circle.potential_lift.abs * 2
    -** Processing line: ~          end~
    +  580,180,760,180
    +** Processing line: ~  760,180,900,180~
     - Inside source: true
     *** True Line Result
    -          end
    -** Processing line: ~        end~
    +  760,180,900,180
    +** Processing line: ~  960,180,1100,180~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~~
    +  960,180,1100,180
    +** Processing line: ~  1100,180,1340,200~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~        circle.on_floor = false~
    +  1100,180,1340,200
    +** Processing line: ~  1340,200,1580,200~
     - Inside source: true
     *** True Line Result
    -        circle.on_floor = false
    -** Processing line: ~        circle.potential_lift = 0~
    +  1340,200,1580,200
    +** Processing line: ~  1580,200,1720,180~
     - Inside source: true
     *** True Line Result
    -        circle.potential_lift = 0
    -** Processing line: ~        circle.terrains_to_monitor.clear~
    +  1580,200,1720,180
    +** Processing line: ~  1720,180,2000,140~
     - Inside source: true
     *** True Line Result
    -        circle.terrains_to_monitor.clear
    -** Processing line: ~        circle.impact_history.clear~
    +  1720,180,2000,140
    +** Processing line: ~  2000,140,2240,140~
     - Inside source: true
     *** True Line Result
    -        circle.impact_history.clear
    -** Processing line: ~        circle.impact = nil~
    +  2000,140,2240,140
    +** Processing line: ~  2240,140,2480,140~
     - Inside source: true
     *** True Line Result
    -        circle.impact = nil
    -** Processing line: ~        calc_physics~
    +  2240,140,2480,140
    +** Processing line: ~  2520,140,2800,160~
     - Inside source: true
     *** True Line Result
    -        calc_physics
    -** Processing line: ~      end~
    +  2520,140,2800,160
    +** Processing line: ~  2800,160,3000,160~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +  2800,160,3000,160
    +** Processing line: ~  3000,160,3140,160~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      # aim probe~
    +  3000,160,3140,160
    +** Processing line: ~  3140,260,3140,160~
     - Inside source: true
     *** True Line Result
    -      # aim probe
    -** Processing line: ~      if inputs.keyboard.right || inputs.keyboard.a~
    +  3140,260,3140,160
    +** Processing line: ~  3140,260,3140,380~
     - Inside source: true
     *** True Line Result
    -      if inputs.keyboard.right || inputs.keyboard.a
    -** Processing line: ~        circle.angle -= 2~
    +  3140,260,3140,380
    +** Processing line: ~  3080,500,3140,380~
     - Inside source: true
     *** True Line Result
    -        circle.angle -= 2
    -** Processing line: ~      elsif inputs.keyboard.left || inputs.keyboard.d~
    +  3080,500,3140,380
    +** Processing line: ~  3080,620,3080,500~
     - Inside source: true
     *** True Line Result
    -      elsif inputs.keyboard.left || inputs.keyboard.d
    -** Processing line: ~        circle.angle += 2~
    +  3080,620,3080,500
    +** Processing line: ~  3080,620,3080,740~
     - Inside source: true
     *** True Line Result
    -        circle.angle += 2
    -** Processing line: ~      end~
    +  3080,620,3080,740
    +** Processing line: ~  3080,740,3080,840~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +  3080,740,3080,840
    +** Processing line: ~  3080,960,3080,840~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +  3080,960,3080,840
    +** Processing line: ~  3080,1080,3080,960~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def input~
    +  3080,1080,3080,960
    +** Processing line: ~  3080,1080,3080,1200~
     - Inside source: true
     *** True Line Result
    -    def input
    -** Processing line: ~      input_god_mode~
    +  3080,1080,3080,1200
    +** Processing line: ~  3080,1200,3080,1340~
     - Inside source: true
     *** True Line Result
    -      input_god_mode
    -** Processing line: ~      input_game~
    +  3080,1200,3080,1340
    +** Processing line: ~  3080,1340,3080,1460~
     - Inside source: true
     *** True Line Result
    -      input_game
    -** Processing line: ~    end~
    +  3080,1340,3080,1460
    +** Processing line: ~  3080,1580,3080,1460~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +  3080,1580,3080,1460
    +** Processing line: ~  3080,1700,3080,1580~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def calc_camera~
    +  3080,1700,3080,1580
    +** Processing line: ~  3080,1700,3080,1760~
     - Inside source: true
     *** True Line Result
    -    def calc_camera
    -** Processing line: ~      state.camera.target_x = 640 - circle.x~
    +  3080,1700,3080,1760
    +** Processing line: ~  3080,1760,3200,1760~
     - Inside source: true
     *** True Line Result
    -      state.camera.target_x = 640 - circle.x
    -** Processing line: ~      state.camera.target_y = 360 - circle.y~
    +  3080,1760,3200,1760
    +** Processing line: ~  3200,1760,3320,1760~
     - Inside source: true
     *** True Line Result
    -      state.camera.target_y = 360 - circle.y
    -** Processing line: ~      xdiff = state.camera.target_x - state.camera.x~
    +  3200,1760,3320,1760
    +** Processing line: ~  3320,1760,3520,1760~
     - Inside source: true
     *** True Line Result
    -      xdiff = state.camera.target_x - state.camera.x
    -** Processing line: ~      ydiff = state.camera.target_y - state.camera.y~
    +  3320,1760,3520,1760
    +** Processing line: ~  3520,1760,3680,1740~
     - Inside source: true
     *** True Line Result
    -      ydiff = state.camera.target_y - state.camera.y
    -** Processing line: ~      state.camera.x += xdiff * camera.follow_speed~
    +  3520,1760,3680,1740
    +** Processing line: ~  3680,1740,3780,1700~
     - Inside source: true
     *** True Line Result
    -      state.camera.x += xdiff * camera.follow_speed
    -** Processing line: ~      state.camera.y += ydiff * camera.follow_speed~
    +  3680,1740,3780,1700
    +** Processing line: ~  3780,1700,3840,1620~
     - Inside source: true
     *** True Line Result
    -      state.camera.y += ydiff * camera.follow_speed
    -** Processing line: ~    end~
    +  3780,1700,3840,1620
    +** Processing line: ~  3840,1620,3840,1520~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +  3840,1620,3840,1520
    +** Processing line: ~  3840,1520,3840,1420~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def calc~
    +  3840,1520,3840,1420
    +** Processing line: ~  3840,1320,3840,1420~
     - Inside source: true
     *** True Line Result
    -    def calc
    -** Processing line: ~      state.sound_debounce ||= 0~
    +  3840,1320,3840,1420
    +** Processing line: ~  3840,1120,3840,1320~
     - Inside source: true
     *** True Line Result
    -      state.sound_debounce ||= 0
    -** Processing line: ~      state.sound_debounce -= 1~
    +  3840,1120,3840,1320
    +** Processing line: ~  3840,1120,3840,940~
     - Inside source: true
     *** True Line Result
    -      state.sound_debounce -= 1
    -** Processing line: ~      state.sound_debounce = 0 if state.sound_debounce < 0~
    +  3840,1120,3840,940
    +** Processing line: ~  3840,940,3840,760~
     - Inside source: true
     *** True Line Result
    -      state.sound_debounce = 0 if state.sound_debounce < 0
    -** Processing line: ~      if state.god_mode~
    +  3840,940,3840,760
    +** Processing line: ~  3780,600,3840,760~
     - Inside source: true
     *** True Line Result
    -      if state.god_mode
    -** Processing line: ~        circle.dy *= 0.1~
    +  3780,600,3840,760
    +** Processing line: ~  3780,600,3780,440~
     - Inside source: true
     *** True Line Result
    -        circle.dy *= 0.1
    -** Processing line: ~        circle.dx *= 0.1~
    +  3780,600,3780,440
    +** Processing line: ~  3780,320,3780,440~
     - Inside source: true
     *** True Line Result
    -        circle.dx *= 0.1
    -** Processing line: ~      end~
    +  3780,320,3780,440
    +** Processing line: ~  3780,320,3780,160~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~      calc_camera~
    +  3780,320,3780,160
    +** Processing line: ~  3780,60,3780,160~
     - Inside source: true
     *** True Line Result
    -      calc_camera
    -** Processing line: ~      state.whisp_queue ||= []~
    +  3780,60,3780,160
    +** Processing line: ~  3780,60,4020,60~
     - Inside source: true
     *** True Line Result
    -      state.whisp_queue ||= []
    -** Processing line: ~      if state.tick_count.mod_zero?(4)~
    +  3780,60,4020,60
    +** Processing line: ~  4020,60,4260,40~
     - Inside source: true
     *** True Line Result
    -      if state.tick_count.mod_zero?(4)
    -** Processing line: ~        state.whisp_queue << {~
    +  4020,60,4260,40
    +** Processing line: ~  4260,40,4500,40~
     - Inside source: true
     *** True Line Result
    -        state.whisp_queue << {
    -** Processing line: ~          x: -300,~
    +  4260,40,4500,40
    +** Processing line: ~  4500,40,4740,40~
     - Inside source: true
     *** True Line Result
    -          x: -300,
    -** Processing line: ~          y: 1400 * rand,~
    +  4500,40,4740,40
    +** Processing line: ~  4740,40,4840,20~
     - Inside source: true
     *** True Line Result
    -          y: 1400 * rand,
    -** Processing line: ~          speed: 2.randomize(:ratio) + 3,~
    +  4740,40,4840,20
    +** Processing line: ~  4840,20,4880,80~
     - Inside source: true
     *** True Line Result
    -          speed: 2.randomize(:ratio) + 3,
    -** Processing line: ~          w: 20,~
    +  4840,20,4880,80
    +** Processing line: ~  4880,80,5080,40~
     - Inside source: true
     *** True Line Result
    -          w: 20,
    -** Processing line: ~          h: 20, path: 'sprites/whisp.png',~
    +  4880,80,5080,40
    +** Processing line: ~  5080,40,5280,20~
     - Inside source: true
     *** True Line Result
    -          h: 20, path: 'sprites/whisp.png',
    -** Processing line: ~          a: 0,~
    +  5080,40,5280,20
    +** Processing line: ~  5280,20,5500,0~
     - Inside source: true
     *** True Line Result
    -          a: 0,
    -** Processing line: ~          created_at: state.tick_count,~
    +  5280,20,5500,0
    +** Processing line: ~  5500,0,5720,0~
     - Inside source: true
     *** True Line Result
    -          created_at: state.tick_count,
    -** Processing line: ~          angle: 0,~
    +  5500,0,5720,0
    +** Processing line: ~  5720,0,5940,60~
     - Inside source: true
     *** True Line Result
    -          angle: 0,
    -** Processing line: ~          r: 100,~
    +  5720,0,5940,60
    +** Processing line: ~  5940,60,6240,60~
     - Inside source: true
     *** True Line Result
    -          r: 100,
    -** Processing line: ~          g: 128 + 128 * rand,~
    +  5940,60,6240,60
    +** Processing line: ~  6240,60,6540,20~
     - Inside source: true
     *** True Line Result
    -          g: 128 + 128 * rand,
    -** Processing line: ~          b: 128 + 128 * rand~
    +  6240,60,6540,20
    +** Processing line: ~  6540,20,6840,20~
     - Inside source: true
     *** True Line Result
    -          b: 128 + 128 * rand
    -** Processing line: ~        }~
    +  6540,20,6840,20
    +** Processing line: ~  6840,20,7040,0~
     - Inside source: true
     *** True Line Result
    -        }
    -** Processing line: ~      end~
    +  6840,20,7040,0
    +** Processing line: ~  7040,0,7140,0~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +  7040,0,7140,0
    +** Processing line: ~  7140,0,7400,20~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      state.whisp_queue.each do |w|~
    +  7140,0,7400,20
    +** Processing line: ~  7400,20,7680,0~
     - Inside source: true
     *** True Line Result
    -      state.whisp_queue.each do |w|
    -** Processing line: ~        w.x += w[:speed] * 2~
    +  7400,20,7680,0
    +** Processing line: ~  7680,0,7940,0~
     - Inside source: true
     *** True Line Result
    -        w.x += w[:speed] * 2
    -** Processing line: ~        w.x -= circle.dx * 0.3~
    +  7680,0,7940,0
    +** Processing line: ~  7940,0,8200,-20~
     - Inside source: true
     *** True Line Result
    -        w.x -= circle.dx * 0.3
    -** Processing line: ~        w.y -= w[:speed]~
    +  7940,0,8200,-20
    +** Processing line: ~  8200,-20,8360,20~
     - Inside source: true
     *** True Line Result
    -        w.y -= w[:speed]
    -** Processing line: ~        w.y -= circle.dy * 0.3~
    +  8200,-20,8360,20
    +** Processing line: ~  8360,20,8560,-40~
     - Inside source: true
     *** True Line Result
    -        w.y -= circle.dy * 0.3
    -** Processing line: ~        w.angle += w[:speed]~
    +  8360,20,8560,-40
    +** Processing line: ~  8560,-40,8760,0~
     - Inside source: true
     *** True Line Result
    -        w.angle += w[:speed]
    -** Processing line: ~        w.a = w[:created_at].ease(30) * 255~
    +  8560,-40,8760,0
    +** Processing line: ~  8760,0,8880,40~
     - Inside source: true
     *** True Line Result
    -        w.a = w[:created_at].ease(30) * 255
    -** Processing line: ~      end~
    +  8760,0,8880,40
    +** Processing line: ~  8880,120,8880,40~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +  8880,120,8880,40
    +** Processing line: ~  8840,220,8840,120~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      state.whisp_queue = state.whisp_queue.reject { |w| w[:x] > 1280 }~
    +  8840,220,8840,120
    +** Processing line: ~  8620,240,8840,220~
     - Inside source: true
     *** True Line Result
    -      state.whisp_queue = state.whisp_queue.reject { |w| w[:x] > 1280 }
    -** Processing line: ~~
    +  8620,240,8840,220
    +** Processing line: ~  8420,260,8620,240~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      if state.tick_count.mod_zero?(2) && (circle.dx != 0 || circle.dy != 0)~
    +  8420,260,8620,240
    +** Processing line: ~  8200,280,8420,260~
     - Inside source: true
     *** True Line Result
    -      if state.tick_count.mod_zero?(2) && (circle.dx != 0 || circle.dy != 0)
    -** Processing line: ~        circle.after_images << {~
    +  8200,280,8420,260
    +** Processing line: ~  7940,280,8200,280~
     - Inside source: true
     *** True Line Result
    -        circle.after_images << {
    -** Processing line: ~          x: circle.x,~
    +  7940,280,8200,280
    +** Processing line: ~  7760,240,7940,280~
     - Inside source: true
     *** True Line Result
    -          x: circle.x,
    -** Processing line: ~          y: circle.y,~
    +  7760,240,7940,280
    +** Processing line: ~  7560,220,7760,240~
     - Inside source: true
     *** True Line Result
    -          y: circle.y,
    -** Processing line: ~          w: circle.radius,~
    +  7560,220,7760,240
    +** Processing line: ~  7360,280,7560,220~
     - Inside source: true
     *** True Line Result
    -          w: circle.radius,
    -** Processing line: ~          h: circle.radius,~
    +  7360,280,7560,220
    +** Processing line: ~  7140,260,7360,280~
     - Inside source: true
     *** True Line Result
    -          h: circle.radius,
    -** Processing line: ~          a: 255,~
    +  7140,260,7360,280
    +** Processing line: ~  6940,240,7140,260~
     - Inside source: true
     *** True Line Result
    -          a: 255,
    -** Processing line: ~          created_at: state.tick_count~
    +  6940,240,7140,260
    +** Processing line: ~  6720,220,6940,240~
     - Inside source: true
     *** True Line Result
    -          created_at: state.tick_count
    -** Processing line: ~        }~
    +  6720,220,6940,240
    +** Processing line: ~  6480,220,6720,220~
     - Inside source: true
     *** True Line Result
    -        }
    -** Processing line: ~      end~
    +  6480,220,6720,220
    +** Processing line: ~  6360,300,6480,220~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +  6360,300,6480,220
    +** Processing line: ~  6240,300,6360,300~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      circle.after_images.each do |ai|~
    +  6240,300,6360,300
    +** Processing line: ~  6200,500,6240,300~
     - Inside source: true
     *** True Line Result
    -      circle.after_images.each do |ai|
    -** Processing line: ~        ai.a = ai[:created_at].ease(10, :flip) * 255~
    +  6200,500,6240,300
    +** Processing line: ~  6200,500,6360,540~
     - Inside source: true
     *** True Line Result
    -        ai.a = ai[:created_at].ease(10, :flip) * 255
    -** Processing line: ~      end~
    +  6200,500,6360,540
    +** Processing line: ~  6360,540,6540,520~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +  6360,540,6540,520
    +** Processing line: ~  6540,520,6720,480~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      circle.after_images = circle.after_images.reject { |ai| ai[:created_at].elapsed_time > 10 }~
    +  6540,520,6720,480
    +** Processing line: ~  6720,480,6880,460~
     - Inside source: true
     *** True Line Result
    -      circle.after_images = circle.after_images.reject { |ai| ai[:created_at].elapsed_time > 10 }
    -** Processing line: ~      calc_physics~
    +  6720,480,6880,460
    +** Processing line: ~  6880,460,7080,500~
     - Inside source: true
     *** True Line Result
    -      calc_physics
    -** Processing line: ~    end~
    +  6880,460,7080,500
    +** Processing line: ~  7080,500,7320,500~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +  7080,500,7320,500
    +** Processing line: ~  7320,500,7680,500~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def circle~
    +  7320,500,7680,500
    +** Processing line: ~  7680,620,7680,500~
     - Inside source: true
     *** True Line Result
    -    def circle
    -** Processing line: ~      state.circle~
    +  7680,620,7680,500
    +** Processing line: ~  7520,640,7680,620~
     - Inside source: true
     *** True Line Result
    -      state.circle
    -** Processing line: ~    end~
    +  7520,640,7680,620
    +** Processing line: ~  7360,640,7520,640~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +  7360,640,7520,640
    +** Processing line: ~  7200,640,7360,640~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def camera~
    +  7200,640,7360,640
    +** Processing line: ~  7040,660,7200,640~
     - Inside source: true
     *** True Line Result
    -    def camera
    -** Processing line: ~      state.camera~
    +  7040,660,7200,640
    +** Processing line: ~  6880,720,7040,660~
     - Inside source: true
     *** True Line Result
    -      state.camera
    -** Processing line: ~    end~
    +  6880,720,7040,660
    +** Processing line: ~  6720,700,6880,720~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +  6720,700,6880,720
    +** Processing line: ~  6540,700,6720,700~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def terrain~
    +  6540,700,6720,700
    +** Processing line: ~  6420,760,6540,700~
     - Inside source: true
     *** True Line Result
    -    def terrain
    -** Processing line: ~      state.terrain~
    +  6420,760,6540,700
    +** Processing line: ~  6280,740,6420,760~
     - Inside source: true
     *** True Line Result
    -      state.terrain
    -** Processing line: ~    end~
    +  6280,740,6420,760
    +** Processing line: ~  6240,760,6280,740~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +  6240,760,6280,740
    +** Processing line: ~  6200,920,6240,760~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def lava~
    +  6200,920,6240,760
    +** Processing line: ~  6200,920,6360,960~
     - Inside source: true
     *** True Line Result
    -    def lava
    -** Processing line: ~      state.lava~
    +  6200,920,6360,960
    +** Processing line: ~  6360,960,6540,960~
     - Inside source: true
     *** True Line Result
    -      state.lava
    -** Processing line: ~    end~
    +  6360,960,6540,960
    +** Processing line: ~  6540,960,6720,960~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~  end~
    +  6540,960,6720,960
    +** Processing line: ~  6720,960,6760,980~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +  6720,960,6760,980
    +** Processing line: ~  6760,980,6880,940~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  # $gtk.reset~
    +  6760,980,6880,940
    +** Processing line: ~  6880,940,7080,940~
     - Inside source: true
     *** True Line Result
    -  # $gtk.reset
    -** Processing line: ~~
    +  6880,940,7080,940
    +** Processing line: ~  7080,940,7280,940~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def tick args~
    +  7080,940,7280,940
    +** Processing line: ~  7280,940,7520,920~
     - Inside source: true
     *** True Line Result
    -  def tick args
    -** Processing line: ~    args.outputs.background_color = [0, 0, 0]~
    +  7280,940,7520,920
    +** Processing line: ~  7520,920,7760,900~
     - Inside source: true
     *** True Line Result
    -    args.outputs.background_color = [0, 0, 0]
    -** Processing line: ~    if args.inputs.keyboard.r~
    +  7520,920,7760,900
    +** Processing line: ~  7760,900,7980,860~
     - Inside source: true
     *** True Line Result
    -    if args.inputs.keyboard.r
    -** Processing line: ~      args.gtk.reset~
    +  7760,900,7980,860
    +** Processing line: ~  7980,860,8100,880~
     - Inside source: true
     *** True Line Result
    -      args.gtk.reset
    -** Processing line: ~      return~
    +  7980,860,8100,880
    +** Processing line: ~  8100,880,8280,900~
     - Inside source: true
     *** True Line Result
    -      return
    -** Processing line: ~    end~
    +  8100,880,8280,900
    +** Processing line: ~  8280,900,8500,820~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~    # uncomment the line below to slow down the game so you~
    +  8280,900,8500,820
    +** Processing line: ~  8500,820,8700,820~
     - Inside source: true
     *** True Line Result
    -    # uncomment the line below to slow down the game so you
    -** Processing line: ~    # can see each tick as it passes~
    +  8500,820,8700,820
    +** Processing line: ~  8700,820,8760,840~
     - Inside source: true
     *** True Line Result
    -    # can see each tick as it passes
    -** Processing line: ~    # args.gtk.slowmo! 30~
    +  8700,820,8760,840
    +** Processing line: ~  8760,960,8760,840~
     - Inside source: true
     *** True Line Result
    -    # args.gtk.slowmo! 30
    -** Processing line: ~    $game ||= FallingCircle.new~
    +  8760,960,8760,840
    +** Processing line: ~  8700,1040,8760,960~
     - Inside source: true
     *** True Line Result
    -    $game ||= FallingCircle.new
    -** Processing line: ~    $game.args = args~
    +  8700,1040,8760,960
    +** Processing line: ~  8560,1060,8700,1040~
     - Inside source: true
     *** True Line Result
    -    $game.args = args
    -** Processing line: ~    $game.tick~
    +  8560,1060,8700,1040
    +** Processing line: ~  8460,1080,8560,1060~
     - Inside source: true
     *** True Line Result
    -    $game.tick
    -** Processing line: ~  end~
    +  8460,1080,8560,1060
    +** Processing line: ~  8360,1040,8460,1080~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +  8360,1040,8460,1080
    +** Processing line: ~  8280,1080,8360,1040~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def reset~
    +  8280,1080,8360,1040
    +** Processing line: ~  8160,1120,8280,1080~
     - Inside source: true
     *** True Line Result
    -  def reset
    -** Processing line: ~    $game = nil~
    +  8160,1120,8280,1080
    +** Processing line: ~  8040,1120,8160,1120~
     - Inside source: true
     *** True Line Result
    -    $game = nil
    -** Processing line: ~  end~
    +  8040,1120,8160,1120
    +** Processing line: ~  7940,1100,8040,1120~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +  7940,1100,8040,1120
    +** Processing line: ~  7800,1120,7940,1100~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~#+end_src~
    -- Line was identified as the end of a code block.
    +  7800,1120,7940,1100
    +** Processing line: ~  7680,1120,7800,1120~
    +- Inside source: true
     *** True Line Result
    -#+end_src
    -** Processing line: ~~
    -- End of paragraph detected.
    +  7680,1120,7800,1120
    +** Processing line: ~  7520,1100,7680,1120~
    +- Inside source: true
     *** True Line Result
    -
    -** Processing line: ~*** Platformer - The Little Probe - Data - level.txt~
    -- Header detected.
    +  7520,1100,7680,1120
    +** Processing line: ~  7360,1100,7520,1100~
    +- Inside source: true
     *** True Line Result
    -
    +  7360,1100,7520,1100
    +** Processing line: ~  7200,1120,7360,1100~
    +- Inside source: true
     *** True Line Result
    -*** Platformer - The Little Probe - Data - level.txt
    -** Processing line: ~#+begin_src ruby~
    -- Line was identified as the beginning of a code block.
    +  7200,1120,7360,1100
    +** Processing line: ~  7040,1180,7200,1120~
    +- Inside source: true
     *** True Line Result
    -
    +  7040,1180,7200,1120
    +** Processing line: ~  6880,1160,7040,1180~
    +- Inside source: true
     *** True Line Result
    -#+begin_src ruby
    -** Processing line: ~  # ./samples/99_genre_platformer/the_little_probe/data/level.txt~
    +  6880,1160,7040,1180
    +** Processing line: ~  6720,1160,6880,1160~
     - Inside source: true
     *** True Line Result
    -  # ./samples/99_genre_platformer/the_little_probe/data/level.txt
    -** Processing line: ~  640,8840,1180,8840~
    +  6720,1160,6880,1160
    +** Processing line: ~  6540,1160,6720,1160~
     - Inside source: true
     *** True Line Result
    -  640,8840,1180,8840
    -** Processing line: ~  -60,10220,0,9960~
    +  6540,1160,6720,1160
    +** Processing line: ~  6360,1160,6540,1160~
     - Inside source: true
     *** True Line Result
    -  -60,10220,0,9960
    -** Processing line: ~  -60,10220,0,10500~
    +  6360,1160,6540,1160
    +** Processing line: ~  6200,1160,6360,1160~
     - Inside source: true
     *** True Line Result
    -  -60,10220,0,10500
    -** Processing line: ~  0,10500,0,10780~
    +  6200,1160,6360,1160
    +** Processing line: ~  6040,1220,6200,1160~
     - Inside source: true
     *** True Line Result
    -  0,10500,0,10780
    -** Processing line: ~  0,10780,40,10900~
    +  6040,1220,6200,1160
    +** Processing line: ~  6040,1220,6040,1400~
     - Inside source: true
     *** True Line Result
    -  0,10780,40,10900
    -** Processing line: ~  500,10920,760,10960~
    +  6040,1220,6040,1400
    +** Processing line: ~  6040,1400,6200,1440~
     - Inside source: true
     *** True Line Result
    -  500,10920,760,10960
    -** Processing line: ~  300,10560,820,10600~
    +  6040,1400,6200,1440
    +** Processing line: ~  6200,1440,6320,1440~
     - Inside source: true
     *** True Line Result
    -  300,10560,820,10600
    -** Processing line: ~  420,10320,700,10300~
    +  6200,1440,6320,1440
    +** Processing line: ~  6320,1440,6440,1440~
     - Inside source: true
     *** True Line Result
    -  420,10320,700,10300
    -** Processing line: ~  820,10600,1500,10600~
    +  6320,1440,6440,1440
    +** Processing line: ~  6600,1440,6760,1440~
     - Inside source: true
     *** True Line Result
    -  820,10600,1500,10600
    -** Processing line: ~  1500,10600,1940,10600~
    +  6600,1440,6760,1440
    +** Processing line: ~  6760,1440,6940,1420~
     - Inside source: true
     *** True Line Result
    -  1500,10600,1940,10600
    -** Processing line: ~  1940,10600,2380,10580~
    +  6760,1440,6940,1420
    +** Processing line: ~  6440,1440,6600,1440~
     - Inside source: true
     *** True Line Result
    -  1940,10600,2380,10580
    -** Processing line: ~  2380,10580,2800,10620~
    +  6440,1440,6600,1440
    +** Processing line: ~  6940,1420,7280,1400~
     - Inside source: true
     *** True Line Result
    -  2380,10580,2800,10620
    -** Processing line: ~  2240,11080,2480,11020~
    +  6940,1420,7280,1400
    +** Processing line: ~  7280,1400,7560,1400~
     - Inside source: true
     *** True Line Result
    -  2240,11080,2480,11020
    -** Processing line: ~  2000,11120,2240,11080~
    +  7280,1400,7560,1400
    +** Processing line: ~  7560,1400,7760,1400~
     - Inside source: true
     *** True Line Result
    -  2000,11120,2240,11080
    -** Processing line: ~  1760,11180,2000,11120~
    +  7560,1400,7760,1400
    +** Processing line: ~  7760,1400,7940,1360~
     - Inside source: true
     *** True Line Result
    -  1760,11180,2000,11120
    -** Processing line: ~  1620,11180,1760,11180~
    +  7760,1400,7940,1360
    +** Processing line: ~  7940,1360,8100,1380~
     - Inside source: true
     *** True Line Result
    -  1620,11180,1760,11180
    -** Processing line: ~  1500,11220,1620,11180~
    +  7940,1360,8100,1380
    +** Processing line: ~  8100,1380,8280,1340~
     - Inside source: true
     *** True Line Result
    -  1500,11220,1620,11180
    -** Processing line: ~  1180,11280,1340,11220~
    +  8100,1380,8280,1340
    +** Processing line: ~  8280,1340,8460,1320~
     - Inside source: true
     *** True Line Result
    -  1180,11280,1340,11220
    -** Processing line: ~  1040,11240,1180,11280~
    +  8280,1340,8460,1320
    +** Processing line: ~  8660,1300,8760,1360~
     - Inside source: true
     *** True Line Result
    -  1040,11240,1180,11280
    -** Processing line: ~  840,11280,1040,11240~
    +  8660,1300,8760,1360
    +** Processing line: ~  8460,1320,8660,1300~
     - Inside source: true
     *** True Line Result
    -  840,11280,1040,11240
    -** Processing line: ~  640,11280,840,11280~
    +  8460,1320,8660,1300
    +** Processing line: ~  8760,1360,8800,1500~
     - Inside source: true
     *** True Line Result
    -  640,11280,840,11280
    -** Processing line: ~  500,11220,640,11280~
    +  8760,1360,8800,1500
    +** Processing line: ~  8800,1660,8800,1500~
     - Inside source: true
     *** True Line Result
    -  500,11220,640,11280
    -** Processing line: ~  420,11140,500,11220~
    +  8800,1660,8800,1500
    +** Processing line: ~  8800,1660,8800,1820~
     - Inside source: true
     *** True Line Result
    -  420,11140,500,11220
    -** Processing line: ~  240,11100,420,11140~
    +  8800,1660,8800,1820
    +** Processing line: ~  8700,1840,8800,1820~
     - Inside source: true
     *** True Line Result
    -  240,11100,420,11140
    -** Processing line: ~  100,11120,240,11100~
    +  8700,1840,8800,1820
    +** Processing line: ~  8620,1860,8700,1840~
     - Inside source: true
     *** True Line Result
    -  100,11120,240,11100
    -** Processing line: ~  0,11180,100,11120~
    +  8620,1860,8700,1840
    +** Processing line: ~  8560,1800,8620,1860~
     - Inside source: true
     *** True Line Result
    -  0,11180,100,11120
    -** Processing line: ~  -160,11220,0,11180~
    +  8560,1800,8620,1860
    +** Processing line: ~  8560,1800,8620,1680~
     - Inside source: true
     *** True Line Result
    -  -160,11220,0,11180
    -** Processing line: ~  -260,11240,-160,11220~
    +  8560,1800,8620,1680
    +** Processing line: ~  8500,1640,8620,1680~
     - Inside source: true
     *** True Line Result
    -  -260,11240,-160,11220
    -** Processing line: ~  1340,11220,1500,11220~
    +  8500,1640,8620,1680
    +** Processing line: ~  8420,1680,8500,1640~
     - Inside source: true
     *** True Line Result
    -  1340,11220,1500,11220
    -** Processing line: ~  960,13300,1280,13060~
    +  8420,1680,8500,1640
    +** Processing line: ~  8280,1680,8420,1680~
     - Inside source: true
     *** True Line Result
    -  960,13300,1280,13060
    -** Processing line: ~  1280,13060,1540,12860~
    +  8280,1680,8420,1680
    +** Processing line: ~  8160,1680,8280,1680~
     - Inside source: true
     *** True Line Result
    -  1280,13060,1540,12860
    -** Processing line: ~  1540,12860,1820,12700~
    +  8160,1680,8280,1680
    +** Processing line: ~  7900,1680,8160,1680~
     - Inside source: true
     *** True Line Result
    -  1540,12860,1820,12700
    -** Processing line: ~  1820,12700,2080,12520~
    +  7900,1680,8160,1680
    +** Processing line: ~  7680,1680,7900,1680~
     - Inside source: true
     *** True Line Result
    -  1820,12700,2080,12520
    -** Processing line: ~  2080,12520,2240,12400~
    +  7680,1680,7900,1680
    +** Processing line: ~  7400,1660,7680,1680~
     - Inside source: true
     *** True Line Result
    -  2080,12520,2240,12400
    -** Processing line: ~  2240,12400,2240,12240~
    +  7400,1660,7680,1680
    +** Processing line: ~  7140,1680,7400,1660~
     - Inside source: true
     *** True Line Result
    -  2240,12400,2240,12240
    -** Processing line: ~  2240,12240,2400,12080~
    +  7140,1680,7400,1660
    +** Processing line: ~  6880,1640,7140,1680~
     - Inside source: true
     *** True Line Result
    -  2240,12240,2400,12080
    -** Processing line: ~  2400,12080,2560,11920~
    +  6880,1640,7140,1680
    +** Processing line: ~  6040,1820,6320,1780~
     - Inside source: true
     *** True Line Result
    -  2400,12080,2560,11920
    -** Processing line: ~  2560,11920,2640,11740~
    +  6040,1820,6320,1780
    +** Processing line: ~  5900,1840,6040,1820~
     - Inside source: true
     *** True Line Result
    -  2560,11920,2640,11740
    -** Processing line: ~  2640,11740,2740,11580~
    +  5900,1840,6040,1820
    +** Processing line: ~  6640,1700,6880,1640~
     - Inside source: true
     *** True Line Result
    -  2640,11740,2740,11580
    -** Processing line: ~  2740,11580,2800,11400~
    +  6640,1700,6880,1640
    +** Processing line: ~  6320,1780,6640,1700~
     - Inside source: true
     *** True Line Result
    -  2740,11580,2800,11400
    -** Processing line: ~  2800,11400,2800,11240~
    +  6320,1780,6640,1700
    +** Processing line: ~  5840,2040,5900,1840~
     - Inside source: true
     *** True Line Result
    -  2800,11400,2800,11240
    -** Processing line: ~  2740,11140,2800,11240~
    +  5840,2040,5900,1840
    +** Processing line: ~  5840,2040,5840,2220~
     - Inside source: true
     *** True Line Result
    -  2740,11140,2800,11240
    -** Processing line: ~  2700,11040,2740,11140~
    +  5840,2040,5840,2220
    +** Processing line: ~  5840,2220,5840,2320~
     - Inside source: true
     *** True Line Result
    -  2700,11040,2740,11140
    -** Processing line: ~  2700,11040,2740,10960~
    +  5840,2220,5840,2320
    +** Processing line: ~  5840,2460,5840,2320~
     - Inside source: true
     *** True Line Result
    -  2700,11040,2740,10960
    -** Processing line: ~  2740,10960,2740,10920~
    +  5840,2460,5840,2320
    +** Processing line: ~  5840,2560,5840,2460~
     - Inside source: true
     *** True Line Result
    -  2740,10960,2740,10920
    -** Processing line: ~  2700,10900,2740,10920~
    +  5840,2560,5840,2460
    +** Processing line: ~  5840,2560,5960,2620~
     - Inside source: true
     *** True Line Result
    -  2700,10900,2740,10920
    -** Processing line: ~  2380,10900,2700,10900~
    +  5840,2560,5960,2620
    +** Processing line: ~  5960,2620,6200,2620~
     - Inside source: true
     *** True Line Result
    -  2380,10900,2700,10900
    -** Processing line: ~  2040,10920,2380,10900~
    +  5960,2620,6200,2620
    +** Processing line: ~  6200,2620,6380,2600~
     - Inside source: true
     *** True Line Result
    -  2040,10920,2380,10900
    -** Processing line: ~  1720,10940,2040,10920~
    +  6200,2620,6380,2600
    +** Processing line: ~  6380,2600,6600,2580~
     - Inside source: true
     *** True Line Result
    -  1720,10940,2040,10920
    -** Processing line: ~  1380,11000,1720,10940~
    +  6380,2600,6600,2580
    +** Processing line: ~  6600,2580,6800,2600~
     - Inside source: true
     *** True Line Result
    -  1380,11000,1720,10940
    -** Processing line: ~  1180,10980,1380,11000~
    +  6600,2580,6800,2600
    +** Processing line: ~  6800,2600,7040,2580~
     - Inside source: true
     *** True Line Result
    -  1180,10980,1380,11000
    -** Processing line: ~  900,10980,1180,10980~
    +  6800,2600,7040,2580
    +** Processing line: ~  7040,2580,7280,2580~
     - Inside source: true
     *** True Line Result
    -  900,10980,1180,10980
    -** Processing line: ~  760,10960,900,10980~
    +  7040,2580,7280,2580
    +** Processing line: ~  7280,2580,7480,2560~
     - Inside source: true
     *** True Line Result
    -  760,10960,900,10980
    -** Processing line: ~  240,10960,500,10920~
    +  7280,2580,7480,2560
    +** Processing line: ~  7760,2540,7980,2520~
     - Inside source: true
     *** True Line Result
    -  240,10960,500,10920
    -** Processing line: ~  40,10900,240,10960~
    +  7760,2540,7980,2520
    +** Processing line: ~  7980,2520,8160,2500~
     - Inside source: true
     *** True Line Result
    -  40,10900,240,10960
    -** Processing line: ~  0,9700,0,9960~
    +  7980,2520,8160,2500
    +** Processing line: ~  7480,2560,7760,2540~
     - Inside source: true
     *** True Line Result
    -  0,9700,0,9960
    -** Processing line: ~  -60,9500,0,9700~
    +  7480,2560,7760,2540
    +** Processing line: ~  8160,2500,8160,2420~
     - Inside source: true
     *** True Line Result
    -  -60,9500,0,9700
    -** Processing line: ~  -60,9420,-60,9500~
    +  8160,2500,8160,2420
    +** Processing line: ~  8160,2420,8160,2320~
     - Inside source: true
     *** True Line Result
    -  -60,9420,-60,9500
    -** Processing line: ~  -60,9420,-60,9340~
    +  8160,2420,8160,2320
    +** Processing line: ~  8160,2180,8160,2320~
     - Inside source: true
     *** True Line Result
    -  -60,9420,-60,9340
    -** Processing line: ~  -60,9340,-60,9280~
    +  8160,2180,8160,2320
    +** Processing line: ~  7980,2160,8160,2180~
     - Inside source: true
     *** True Line Result
    -  -60,9340,-60,9280
    -** Processing line: ~  -60,9120,-60,9280~
    +  7980,2160,8160,2180
    +** Processing line: ~  7800,2180,7980,2160~
     - Inside source: true
     *** True Line Result
    -  -60,9120,-60,9280
    -** Processing line: ~  -60,8940,-60,9120~
    +  7800,2180,7980,2160
    +** Processing line: ~  7600,2200,7800,2180~
     - Inside source: true
     *** True Line Result
    -  -60,8940,-60,9120
    -** Processing line: ~  -60,8940,-60,8780~
    +  7600,2200,7800,2180
    +** Processing line: ~  7400,2200,7600,2200~
     - Inside source: true
     *** True Line Result
    -  -60,8940,-60,8780
    -** Processing line: ~  -60,8780,0,8700~
    +  7400,2200,7600,2200
    +** Processing line: ~  6960,2200,7200,2200~
     - Inside source: true
     *** True Line Result
    -  -60,8780,0,8700
    -** Processing line: ~  0,8700,40,8680~
    +  6960,2200,7200,2200
    +** Processing line: ~  7200,2200,7400,2200~
     - Inside source: true
     *** True Line Result
    -  0,8700,40,8680
    -** Processing line: ~  40,8680,240,8700~
    +  7200,2200,7400,2200
    +** Processing line: ~  6720,2200,6960,2200~
     - Inside source: true
     *** True Line Result
    -  40,8680,240,8700
    -** Processing line: ~  240,8700,360,8780~
    +  6720,2200,6960,2200
    +** Processing line: ~  6540,2180,6720,2200~
     - Inside source: true
     *** True Line Result
    -  240,8700,360,8780
    -** Processing line: ~  360,8780,640,8840~
    +  6540,2180,6720,2200
    +** Processing line: ~  6320,2200,6540,2180~
     - Inside source: true
     *** True Line Result
    -  360,8780,640,8840
    -** Processing line: ~  1420,8400,1540,8480~
    +  6320,2200,6540,2180
    +** Processing line: ~  6240,2160,6320,2200~
     - Inside source: true
     *** True Line Result
    -  1420,8400,1540,8480
    -** Processing line: ~  1540,8480,1680,8500~
    +  6240,2160,6320,2200
    +** Processing line: ~  6240,2160,6240,2040~
     - Inside source: true
     *** True Line Result
    -  1540,8480,1680,8500
    -** Processing line: ~  1680,8500,1940,8460~
    +  6240,2160,6240,2040
    +** Processing line: ~  6240,2040,6240,1940~
     - Inside source: true
     *** True Line Result
    -  1680,8500,1940,8460
    -** Processing line: ~  1180,8840,1280,8880~
    +  6240,2040,6240,1940
    +** Processing line: ~  6240,1940,6440,1940~
     - Inside source: true
     *** True Line Result
    -  1180,8840,1280,8880
    -** Processing line: ~  1280,8880,1340,8860~
    +  6240,1940,6440,1940
    +** Processing line: ~  6440,1940,6720,1940~
     - Inside source: true
     *** True Line Result
    -  1280,8880,1340,8860
    -** Processing line: ~  1340,8860,1720,8860~
    +  6440,1940,6720,1940
    +** Processing line: ~  6720,1940,6940,1920~
     - Inside source: true
     *** True Line Result
    -  1340,8860,1720,8860
    -** Processing line: ~  1720,8860,1820,8920~
    +  6720,1940,6940,1920
    +** Processing line: ~  7520,1920,7760,1920~
     - Inside source: true
     *** True Line Result
    -  1720,8860,1820,8920
    -** Processing line: ~  1820,8920,1820,9140~
    +  7520,1920,7760,1920
    +** Processing line: ~  6940,1920,7280,1920~
     - Inside source: true
     *** True Line Result
    -  1820,8920,1820,9140
    -** Processing line: ~  1820,9140,1820,9280~
    +  6940,1920,7280,1920
    +** Processing line: ~  7280,1920,7520,1920~
     - Inside source: true
     *** True Line Result
    -  1820,9140,1820,9280
    -** Processing line: ~  1820,9460,1820,9280~
    +  7280,1920,7520,1920
    +** Processing line: ~  7760,1920,8100,1900~
     - Inside source: true
     *** True Line Result
    -  1820,9460,1820,9280
    -** Processing line: ~  1760,9480,1820,9460~
    +  7760,1920,8100,1900
    +** Processing line: ~  8100,1900,8420,1900~
     - Inside source: true
     *** True Line Result
    -  1760,9480,1820,9460
    -** Processing line: ~  1640,9480,1760,9480~
    +  8100,1900,8420,1900
    +** Processing line: ~  8420,1900,8460,1940~
     - Inside source: true
     *** True Line Result
    -  1640,9480,1760,9480
    -** Processing line: ~  1540,9500,1640,9480~
    +  8420,1900,8460,1940
    +** Processing line: ~  8460,2120,8460,1940~
     - Inside source: true
     *** True Line Result
    -  1540,9500,1640,9480
    -** Processing line: ~  1340,9500,1540,9500~
    +  8460,2120,8460,1940
    +** Processing line: ~  8460,2280,8460,2120~
     - Inside source: true
     *** True Line Result
    -  1340,9500,1540,9500
    -** Processing line: ~  1100,9500,1340,9500~
    +  8460,2280,8460,2120
    +** Processing line: ~  8460,2280,8560,2420~
     - Inside source: true
     *** True Line Result
    -  1100,9500,1340,9500
    -** Processing line: ~  1040,9540,1100,9500~
    +  8460,2280,8560,2420
    +** Processing line: ~  8560,2420,8660,2380~
     - Inside source: true
     *** True Line Result
    -  1040,9540,1100,9500
    -** Processing line: ~  960,9540,1040,9540~
    +  8560,2420,8660,2380
    +** Processing line: ~  8660,2380,8800,2340~
     - Inside source: true
     *** True Line Result
    -  960,9540,1040,9540
    -** Processing line: ~  300,9420,360,9460~
    +  8660,2380,8800,2340
    +** Processing line: ~  8800,2340,8840,2400~
     - Inside source: true
     *** True Line Result
    -  300,9420,360,9460
    -** Processing line: ~  240,9440,300,9420~
    +  8800,2340,8840,2400
    +** Processing line: ~  8840,2520,8840,2400~
     - Inside source: true
     *** True Line Result
    -  240,9440,300,9420
    -** Processing line: ~  180,9600,240,9440~
    +  8840,2520,8840,2400
    +** Processing line: ~  8800,2620,8840,2520~
     - Inside source: true
     *** True Line Result
    -  180,9600,240,9440
    -** Processing line: ~  120,9660,180,9600~
    +  8800,2620,8840,2520
    +** Processing line: ~  8800,2740,8800,2620~
     - Inside source: true
     *** True Line Result
    -  120,9660,180,9600
    -** Processing line: ~  100,9820,120,9660~
    +  8800,2740,8800,2620
    +** Processing line: ~  8800,2860,8800,2740~
     - Inside source: true
     *** True Line Result
    -  100,9820,120,9660
    -** Processing line: ~  100,9820,120,9860~
    +  8800,2860,8800,2740
    +** Processing line: ~  8800,2940,8800,2860~
     - Inside source: true
     *** True Line Result
    -  100,9820,120,9860
    -** Processing line: ~  120,9860,140,9900~
    +  8800,2940,8800,2860
    +** Processing line: ~  8760,2980,8800,2940~
     - Inside source: true
     *** True Line Result
    -  120,9860,140,9900
    -** Processing line: ~  140,9900,140,10000~
    +  8760,2980,8800,2940
    +** Processing line: ~  8660,2980,8760,2980~
     - Inside source: true
     *** True Line Result
    -  140,9900,140,10000
    -** Processing line: ~  140,10440,180,10540~
    +  8660,2980,8760,2980
    +** Processing line: ~  8620,2960,8660,2980~
     - Inside source: true
     *** True Line Result
    -  140,10440,180,10540
    -** Processing line: ~  100,10080,140,10000~
    +  8620,2960,8660,2980
    +** Processing line: ~  8560,2880,8620,2960~
     - Inside source: true
     *** True Line Result
    -  100,10080,140,10000
    -** Processing line: ~  100,10080,140,10100~
    +  8560,2880,8620,2960
    +** Processing line: ~  8560,2880,8560,2780~
     - Inside source: true
     *** True Line Result
    -  100,10080,140,10100
    -** Processing line: ~  140,10100,140,10440~
    +  8560,2880,8560,2780
    +** Processing line: ~  8500,2740,8560,2780~
     - Inside source: true
     *** True Line Result
    -  140,10100,140,10440
    -** Processing line: ~  180,10540,300,10560~
    +  8500,2740,8560,2780
    +** Processing line: ~  8420,2760,8500,2740~
     - Inside source: true
     *** True Line Result
    -  180,10540,300,10560
    -** Processing line: ~  2140,9560,2140,9640~
    +  8420,2760,8500,2740
    +** Processing line: ~  8420,2840,8420,2760~
     - Inside source: true
     *** True Line Result
    -  2140,9560,2140,9640
    -** Processing line: ~  2140,9720,2140,9640~
    +  8420,2840,8420,2760
    +** Processing line: ~  8420,2840,8420,2940~
     - Inside source: true
     *** True Line Result
    -  2140,9720,2140,9640
    -** Processing line: ~  1880,9780,2140,9720~
    +  8420,2840,8420,2940
    +** Processing line: ~  8420,3040,8420,2940~
     - Inside source: true
     *** True Line Result
    -  1880,9780,2140,9720
    -** Processing line: ~  1720,9780,1880,9780~
    +  8420,3040,8420,2940
    +** Processing line: ~  8420,3160,8420,3040~
     - Inside source: true
     *** True Line Result
    -  1720,9780,1880,9780
    -** Processing line: ~  1620,9740,1720,9780~
    +  8420,3160,8420,3040
    +** Processing line: ~  8420,3280,8420,3380~
     - Inside source: true
     *** True Line Result
    -  1620,9740,1720,9780
    -** Processing line: ~  1500,9780,1620,9740~
    +  8420,3280,8420,3380
    +** Processing line: ~  8420,3280,8420,3160~
     - Inside source: true
     *** True Line Result
    -  1500,9780,1620,9740
    -** Processing line: ~  1380,9780,1500,9780~
    +  8420,3280,8420,3160
    +** Processing line: ~  8420,3380,8620,3460~
     - Inside source: true
     *** True Line Result
    -  1380,9780,1500,9780
    -** Processing line: ~  1340,9820,1380,9780~
    +  8420,3380,8620,3460
    +** Processing line: ~  8620,3460,8760,3460~
     - Inside source: true
     *** True Line Result
    -  1340,9820,1380,9780
    -** Processing line: ~  1200,9820,1340,9820~
    +  8620,3460,8760,3460
    +** Processing line: ~  8760,3460,8840,3400~
     - Inside source: true
     *** True Line Result
    -  1200,9820,1340,9820
    -** Processing line: ~  1100,9780,1200,9820~
    +  8760,3460,8840,3400
    +** Processing line: ~  8840,3400,8960,3400~
     - Inside source: true
     *** True Line Result
    -  1100,9780,1200,9820
    -** Processing line: ~  900,9780,1100,9780~
    +  8840,3400,8960,3400
    +** Processing line: ~  8960,3400,9000,3500~
     - Inside source: true
     *** True Line Result
    -  900,9780,1100,9780
    -** Processing line: ~  820,9720,900,9780~
    +  8960,3400,9000,3500
    +** Processing line: ~  9000,3700,9000,3500~
     - Inside source: true
     *** True Line Result
    -  820,9720,900,9780
    -** Processing line: ~  540,9720,820,9720~
    +  9000,3700,9000,3500
    +** Processing line: ~  9000,3900,9000,3700~
     - Inside source: true
     *** True Line Result
    -  540,9720,820,9720
    -** Processing line: ~  360,9840,540,9720~
    +  9000,3900,9000,3700
    +** Processing line: ~  9000,4080,9000,3900~
     - Inside source: true
     *** True Line Result
    -  360,9840,540,9720
    -** Processing line: ~  360,9840,360,9960~
    +  9000,4080,9000,3900
    +** Processing line: ~  9000,4280,9000,4080~
     - Inside source: true
     *** True Line Result
    -  360,9840,360,9960
    -** Processing line: ~  360,9960,360,10080~
    +  9000,4280,9000,4080
    +** Processing line: ~  9000,4500,9000,4280~
     - Inside source: true
     *** True Line Result
    -  360,9960,360,10080
    -** Processing line: ~  360,10140,360,10080~
    +  9000,4500,9000,4280
    +** Processing line: ~  9000,4620,9000,4500~
     - Inside source: true
     *** True Line Result
    -  360,10140,360,10080
    -** Processing line: ~  360,10140,360,10240~
    +  9000,4620,9000,4500
    +** Processing line: ~  9000,4780,9000,4620~
     - Inside source: true
     *** True Line Result
    -  360,10140,360,10240
    -** Processing line: ~  360,10240,420,10320~
    +  9000,4780,9000,4620
    +** Processing line: ~  9000,4780,9000,4960~
     - Inside source: true
     *** True Line Result
    -  360,10240,420,10320
    -** Processing line: ~  700,10300,820,10280~
    +  9000,4780,9000,4960
    +** Processing line: ~  9000,5120,9000,4960~
     - Inside source: true
     *** True Line Result
    -  700,10300,820,10280
    -** Processing line: ~  820,10280,820,10280~
    +  9000,5120,9000,4960
    +** Processing line: ~  9000,5120,9000,5300~
     - Inside source: true
     *** True Line Result
    -  820,10280,820,10280
    -** Processing line: ~  820,10280,900,10320~
    +  9000,5120,9000,5300
    +** Processing line: ~  8960,5460,9000,5300~
     - Inside source: true
     *** True Line Result
    -  820,10280,900,10320
    -** Processing line: ~  900,10320,1040,10300~
    +  8960,5460,9000,5300
    +** Processing line: ~  8920,5620,8960,5460~
     - Inside source: true
     *** True Line Result
    -  900,10320,1040,10300
    -** Processing line: ~  1040,10300,1200,10320~
    +  8920,5620,8960,5460
    +** Processing line: ~  8920,5620,8920,5800~
     - Inside source: true
     *** True Line Result
    -  1040,10300,1200,10320
    -** Processing line: ~  1200,10320,1380,10280~
    +  8920,5620,8920,5800
    +** Processing line: ~  8920,5800,8920,5960~
     - Inside source: true
     *** True Line Result
    -  1200,10320,1380,10280
    -** Processing line: ~  1380,10280,1500,10300~
    +  8920,5800,8920,5960
    +** Processing line: ~  8920,5960,8920,6120~
     - Inside source: true
     *** True Line Result
    -  1380,10280,1500,10300
    -** Processing line: ~  1500,10300,1760,10300~
    +  8920,5960,8920,6120
    +** Processing line: ~  8920,6120,8960,6300~
     - Inside source: true
     *** True Line Result
    -  1500,10300,1760,10300
    -** Processing line: ~  2800,10620,2840,10600~
    +  8920,6120,8960,6300
    +** Processing line: ~  8960,6300,8960,6480~
     - Inside source: true
     *** True Line Result
    -  2800,10620,2840,10600
    -** Processing line: ~  2840,10600,2900,10600~
    +  8960,6300,8960,6480
    +** Processing line: ~  8960,6660,8960,6480~
     - Inside source: true
     *** True Line Result
    -  2840,10600,2900,10600
    -** Processing line: ~  2900,10600,3000,10620~
    +  8960,6660,8960,6480
    +** Processing line: ~  8960,6860,8960,6660~
     - Inside source: true
     *** True Line Result
    -  2900,10600,3000,10620
    -** Processing line: ~  3000,10620,3080,10620~
    +  8960,6860,8960,6660
    +** Processing line: ~  8960,7040,8960,6860~
     - Inside source: true
     *** True Line Result
    -  3000,10620,3080,10620
    -** Processing line: ~  3080,10620,3140,10600~
    +  8960,7040,8960,6860
    +** Processing line: ~  8920,7420,8920,7220~
     - Inside source: true
     *** True Line Result
    -  3080,10620,3140,10600
    -** Processing line: ~  3140,10540,3140,10600~
    +  8920,7420,8920,7220
    +** Processing line: ~  8920,7420,8960,7620~
     - Inside source: true
     *** True Line Result
    -  3140,10540,3140,10600
    -** Processing line: ~  3140,10540,3140,10460~
    +  8920,7420,8960,7620
    +** Processing line: ~  8960,7620,8960,7800~
     - Inside source: true
     *** True Line Result
    -  3140,10540,3140,10460
    -** Processing line: ~  3140,10460,3140,10360~
    +  8960,7620,8960,7800
    +** Processing line: ~  8960,7800,8960,8000~
     - Inside source: true
     *** True Line Result
    -  3140,10460,3140,10360
    -** Processing line: ~  3140,10360,3140,10260~
    +  8960,7800,8960,8000
    +** Processing line: ~  8960,8000,8960,8180~
     - Inside source: true
     *** True Line Result
    -  3140,10360,3140,10260
    -** Processing line: ~  3140,10260,3140,10140~
    +  8960,8000,8960,8180
    +** Processing line: ~  8960,8180,8960,8380~
     - Inside source: true
     *** True Line Result
    -  3140,10260,3140,10140
    -** Processing line: ~  3140,10140,3140,10000~
    +  8960,8180,8960,8380
    +** Processing line: ~  8960,8580,8960,8380~
     - Inside source: true
     *** True Line Result
    -  3140,10140,3140,10000
    -** Processing line: ~  3140,10000,3140,9860~
    +  8960,8580,8960,8380
    +** Processing line: ~  8920,8800,8960,8580~
     - Inside source: true
     *** True Line Result
    -  3140,10000,3140,9860
    -** Processing line: ~  3140,9860,3160,9720~
    +  8920,8800,8960,8580
    +** Processing line: ~  8880,9000,8920,8800~
     - Inside source: true
     *** True Line Result
    -  3140,9860,3160,9720
    -** Processing line: ~  3160,9720,3160,9580~
    +  8880,9000,8920,8800
    +** Processing line: ~  8840,9180,8880,9000~
     - Inside source: true
     *** True Line Result
    -  3160,9720,3160,9580
    -** Processing line: ~  3160,9580,3160,9440~
    +  8840,9180,8880,9000
    +** Processing line: ~  8800,9220,8840,9180~
     - Inside source: true
     *** True Line Result
    -  3160,9580,3160,9440
    -** Processing line: ~  3160,9300,3160,9440~
    +  8800,9220,8840,9180
    +** Processing line: ~  8800,9220,8840,9340~
     - Inside source: true
     *** True Line Result
    -  3160,9300,3160,9440
    -** Processing line: ~  3160,9300,3160,9140~
    +  8800,9220,8840,9340
    +** Processing line: ~  8760,9380,8840,9340~
     - Inside source: true
     *** True Line Result
    -  3160,9300,3160,9140
    -** Processing line: ~  3160,9140,3160,8980~
    +  8760,9380,8840,9340
    +** Processing line: ~  8560,9340,8760,9380~
     - Inside source: true
     *** True Line Result
    -  3160,9140,3160,8980
    -** Processing line: ~  3160,8980,3160,8820~
    +  8560,9340,8760,9380
    +** Processing line: ~  8360,9360,8560,9340~
     - Inside source: true
     *** True Line Result
    -  3160,8980,3160,8820
    -** Processing line: ~  3160,8820,3160,8680~
    +  8360,9360,8560,9340
    +** Processing line: ~  8160,9360,8360,9360~
     - Inside source: true
     *** True Line Result
    -  3160,8820,3160,8680
    -** Processing line: ~  3160,8680,3160,8520~
    +  8160,9360,8360,9360
    +** Processing line: ~  8040,9340,8160,9360~
     - Inside source: true
     *** True Line Result
    -  3160,8680,3160,8520
    -** Processing line: ~  1760,10300,1880,10300~
    +  8040,9340,8160,9360
    +** Processing line: ~  7860,9360,8040,9340~
     - Inside source: true
     *** True Line Result
    -  1760,10300,1880,10300
    -** Processing line: ~  660,9500,960,9540~
    +  7860,9360,8040,9340
    +** Processing line: ~  7680,9360,7860,9360~
     - Inside source: true
     *** True Line Result
    -  660,9500,960,9540
    -** Processing line: ~  640,9460,660,9500~
    +  7680,9360,7860,9360
    +** Processing line: ~  7520,9360,7680,9360~
     - Inside source: true
     *** True Line Result
    -  640,9460,660,9500
    -** Processing line: ~  360,9460,640,9460~
    +  7520,9360,7680,9360
    +** Processing line: ~  7420,9260,7520,9360~
     - Inside source: true
     *** True Line Result
    -  360,9460,640,9460
    -** Processing line: ~  -480,10760,-440,10880~
    +  7420,9260,7520,9360
    +** Processing line: ~  7400,9080,7420,9260~
     - Inside source: true
     *** True Line Result
    -  -480,10760,-440,10880
    -** Processing line: ~  -480,11020,-440,10880~
    +  7400,9080,7420,9260
    +** Processing line: ~  7400,9080,7420,8860~
     - Inside source: true
     *** True Line Result
    -  -480,11020,-440,10880
    -** Processing line: ~  -480,11160,-260,11240~
    +  7400,9080,7420,8860
    +** Processing line: ~  7420,8860,7440,8720~
     - Inside source: true
     *** True Line Result
    -  -480,11160,-260,11240
    -** Processing line: ~  -480,11020,-480,11160~
    +  7420,8860,7440,8720
    +** Processing line: ~  7440,8720,7480,8660~
     - Inside source: true
     *** True Line Result
    -  -480,11020,-480,11160
    -** Processing line: ~  -600,11420,-380,11320~
    +  7440,8720,7480,8660
    +** Processing line: ~  7480,8660,7520,8540~
     - Inside source: true
     *** True Line Result
    -  -600,11420,-380,11320
    -** Processing line: ~  -380,11320,-200,11340~
    +  7480,8660,7520,8540
    +** Processing line: ~  7520,8540,7600,8460~
     - Inside source: true
     *** True Line Result
    -  -380,11320,-200,11340
    -** Processing line: ~  -200,11340,0,11340~
    +  7520,8540,7600,8460
    +** Processing line: ~  7600,8460,7800,8480~
     - Inside source: true
     *** True Line Result
    -  -200,11340,0,11340
    -** Processing line: ~  0,11340,180,11340~
    +  7600,8460,7800,8480
    +** Processing line: ~  7800,8480,8040,8480~
     - Inside source: true
     *** True Line Result
    -  0,11340,180,11340
    -** Processing line: ~  960,13420,960,13300~
    +  7800,8480,8040,8480
    +** Processing line: ~  8040,8480,8280,8480~
     - Inside source: true
     *** True Line Result
    -  960,13420,960,13300
    -** Processing line: ~  960,13420,960,13520~
    +  8040,8480,8280,8480
    +** Processing line: ~  8280,8480,8500,8460~
     - Inside source: true
     *** True Line Result
    -  960,13420,960,13520
    -** Processing line: ~  960,13520,1000,13560~
    +  8280,8480,8500,8460
    +** Processing line: ~  8500,8460,8620,8440~
     - Inside source: true
     *** True Line Result
    -  960,13520,1000,13560
    -** Processing line: ~  1000,13560,1040,13540~
    +  8500,8460,8620,8440
    +** Processing line: ~  8620,8440,8660,8340~
     - Inside source: true
     *** True Line Result
    -  1000,13560,1040,13540
    -** Processing line: ~  1040,13540,1200,13440~
    +  8620,8440,8660,8340
    +** Processing line: ~  8660,8340,8660,8220~
     - Inside source: true
     *** True Line Result
    -  1040,13540,1200,13440
    -** Processing line: ~  1200,13440,1380,13380~
    +  8660,8340,8660,8220
    +** Processing line: ~  8660,8220,8700,8080~
     - Inside source: true
     *** True Line Result
    -  1200,13440,1380,13380
    -** Processing line: ~  1380,13380,1620,13300~
    +  8660,8220,8700,8080
    +** Processing line: ~  8700,8080,8700,7920~
     - Inside source: true
     *** True Line Result
    -  1380,13380,1620,13300
    -** Processing line: ~  1620,13300,1820,13220~
    +  8700,8080,8700,7920
    +** Processing line: ~  8700,7920,8700,7760~
     - Inside source: true
     *** True Line Result
    -  1620,13300,1820,13220
    -** Processing line: ~  1820,13220,2000,13200~
    +  8700,7920,8700,7760
    +** Processing line: ~  8700,7760,8700,7620~
     - Inside source: true
     *** True Line Result
    -  1820,13220,2000,13200
    -** Processing line: ~  2000,13200,2240,13200~
    +  8700,7760,8700,7620
    +** Processing line: ~  8700,7480,8700,7620~
     - Inside source: true
     *** True Line Result
    -  2000,13200,2240,13200
    -** Processing line: ~  2240,13200,2440,13160~
    +  8700,7480,8700,7620
    +** Processing line: ~  8700,7480,8700,7320~
     - Inside source: true
     *** True Line Result
    -  2240,13200,2440,13160
    -** Processing line: ~  2440,13160,2640,13040~
    +  8700,7480,8700,7320
    +** Processing line: ~  8700,7160,8700,7320~
     - Inside source: true
     *** True Line Result
    -  2440,13160,2640,13040
    -** Processing line: ~  -480,10760,-440,10620~
    +  8700,7160,8700,7320
    +** Processing line: ~  8920,7220,8960,7040~
     - Inside source: true
     *** True Line Result
    -  -480,10760,-440,10620
    -** Processing line: ~  -440,10620,-360,10560~
    +  8920,7220,8960,7040
    +** Processing line: ~  8660,7040,8700,7160~
     - Inside source: true
     *** True Line Result
    -  -440,10620,-360,10560
    -** Processing line: ~  -380,10460,-360,10560~
    +  8660,7040,8700,7160
    +** Processing line: ~  8660,7040,8700,6880~
     - Inside source: true
     *** True Line Result
    -  -380,10460,-360,10560
    -** Processing line: ~  -380,10460,-360,10300~
    +  8660,7040,8700,6880
    +** Processing line: ~  8660,6700,8700,6880~
     - Inside source: true
     *** True Line Result
    -  -380,10460,-360,10300
    -** Processing line: ~  -380,10140,-360,10300~
    +  8660,6700,8700,6880
    +** Processing line: ~  8660,6700,8700,6580~
     - Inside source: true
     *** True Line Result
    -  -380,10140,-360,10300
    -** Processing line: ~  -380,10140,-380,10040~
    +  8660,6700,8700,6580
    +** Processing line: ~  8700,6460,8700,6580~
     - Inside source: true
     *** True Line Result
    -  -380,10140,-380,10040
    -** Processing line: ~  -380,9880,-380,10040~
    +  8700,6460,8700,6580
    +** Processing line: ~  8700,6460,8700,6320~
     - Inside source: true
     *** True Line Result
    -  -380,9880,-380,10040
    -** Processing line: ~  -380,9720,-380,9880~
    +  8700,6460,8700,6320
    +** Processing line: ~  8700,6160,8700,6320~
     - Inside source: true
     *** True Line Result
    -  -380,9720,-380,9880
    -** Processing line: ~  -380,9720,-380,9540~
    +  8700,6160,8700,6320
    +** Processing line: ~  8700,6160,8760,6020~
     - Inside source: true
     *** True Line Result
    -  -380,9720,-380,9540
    -** Processing line: ~  -380,9360,-380,9540~
    +  8700,6160,8760,6020
    +** Processing line: ~  8760,6020,8760,5860~
     - Inside source: true
     *** True Line Result
    -  -380,9360,-380,9540
    -** Processing line: ~  -380,9180,-380,9360~
    +  8760,6020,8760,5860
    +** Processing line: ~  8760,5860,8760,5700~
     - Inside source: true
     *** True Line Result
    -  -380,9180,-380,9360
    -** Processing line: ~  -380,9180,-380,9000~
    +  8760,5860,8760,5700
    +** Processing line: ~  8760,5700,8760,5540~
     - Inside source: true
     *** True Line Result
    -  -380,9180,-380,9000
    -** Processing line: ~  -380,8840,-380,9000~
    +  8760,5700,8760,5540
    +** Processing line: ~  8760,5540,8760,5360~
     - Inside source: true
     *** True Line Result
    -  -380,8840,-380,9000
    -** Processing line: ~  -380,8840,-380,8760~
    +  8760,5540,8760,5360
    +** Processing line: ~  8760,5360,8760,5180~
     - Inside source: true
     *** True Line Result
    -  -380,8840,-380,8760
    -** Processing line: ~  -380,8760,-380,8620~
    +  8760,5360,8760,5180
    +** Processing line: ~  8760,5000,8760,5180~
     - Inside source: true
     *** True Line Result
    -  -380,8760,-380,8620
    -** Processing line: ~  -380,8620,-380,8520~
    +  8760,5000,8760,5180
    +** Processing line: ~  8700,4820,8760,5000~
     - Inside source: true
     *** True Line Result
    -  -380,8620,-380,8520
    -** Processing line: ~  -380,8520,-360,8400~
    +  8700,4820,8760,5000
    +** Processing line: ~  8560,4740,8700,4820~
     - Inside source: true
     *** True Line Result
    -  -380,8520,-360,8400
    -** Processing line: ~  -360,8400,-100,8400~
    +  8560,4740,8700,4820
    +** Processing line: ~  8420,4700,8560,4740~
     - Inside source: true
     *** True Line Result
    -  -360,8400,-100,8400
    -** Processing line: ~  -100,8400,-60,8420~
    +  8420,4700,8560,4740
    +** Processing line: ~  8280,4700,8420,4700~
     - Inside source: true
     *** True Line Result
    -  -100,8400,-60,8420
    -** Processing line: ~  -60,8420,240,8440~
    +  8280,4700,8420,4700
    +** Processing line: ~  8100,4700,8280,4700~
     - Inside source: true
     *** True Line Result
    -  -60,8420,240,8440
    -** Processing line: ~  240,8440,240,8380~
    +  8100,4700,8280,4700
    +** Processing line: ~  7980,4700,8100,4700~
     - Inside source: true
     *** True Line Result
    -  240,8440,240,8380
    -** Processing line: ~  240,8380,500,8440~
    +  7980,4700,8100,4700
    +** Processing line: ~  7820,4740,7980,4700~
     - Inside source: true
     *** True Line Result
    -  240,8380,500,8440
    -** Processing line: ~  500,8440,760,8460~
    +  7820,4740,7980,4700
    +** Processing line: ~  7800,4920,7820,4740~
     - Inside source: true
     *** True Line Result
    -  500,8440,760,8460
    -** Processing line: ~  760,8460,1000,8400~
    +  7800,4920,7820,4740
    +** Processing line: ~  7800,4920,7900,4960~
     - Inside source: true
     *** True Line Result
    -  760,8460,1000,8400
    -** Processing line: ~  1000,8400,1180,8420~
    +  7800,4920,7900,4960
    +** Processing line: ~  7900,4960,8060,4980~
     - Inside source: true
     *** True Line Result
    -  1000,8400,1180,8420
    -** Processing line: ~  1180,8420,1420,8400~
    +  7900,4960,8060,4980
    +** Processing line: ~  8060,4980,8220,5000~
     - Inside source: true
     *** True Line Result
    -  1180,8420,1420,8400
    -** Processing line: ~  1940,8460,2140,8420~
    +  8060,4980,8220,5000
    +** Processing line: ~  8220,5000,8420,5040~
     - Inside source: true
     *** True Line Result
    -  1940,8460,2140,8420
    -** Processing line: ~  2140,8420,2200,8520~
    +  8220,5000,8420,5040
    +** Processing line: ~  8420,5040,8460,5120~
     - Inside source: true
     *** True Line Result
    -  2140,8420,2200,8520
    -** Processing line: ~  2200,8680,2200,8520~
    +  8420,5040,8460,5120
    +** Processing line: ~  8460,5180,8460,5120~
     - Inside source: true
     *** True Line Result
    -  2200,8680,2200,8520
    -** Processing line: ~  2140,8840,2200,8680~
    +  8460,5180,8460,5120
    +** Processing line: ~  8360,5200,8460,5180~
     - Inside source: true
     *** True Line Result
    -  2140,8840,2200,8680
    -** Processing line: ~  2140,8840,2140,9020~
    +  8360,5200,8460,5180
    +** Processing line: ~  8360,5280,8360,5200~
     - Inside source: true
     *** True Line Result
    -  2140,8840,2140,9020
    -** Processing line: ~  2140,9100,2140,9020~
    +  8360,5280,8360,5200
    +** Processing line: ~  8160,5300,8360,5280~
     - Inside source: true
     *** True Line Result
    -  2140,9100,2140,9020
    -** Processing line: ~  2140,9200,2140,9100~
    +  8160,5300,8360,5280
    +** Processing line: ~  8040,5260,8160,5300~
     - Inside source: true
     *** True Line Result
    -  2140,9200,2140,9100
    -** Processing line: ~  2140,9200,2200,9320~
    +  8040,5260,8160,5300
    +** Processing line: ~  7860,5220,8040,5260~
     - Inside source: true
     *** True Line Result
    -  2140,9200,2200,9320
    -** Processing line: ~  2200,9320,2200,9440~
    +  7860,5220,8040,5260
    +** Processing line: ~  7720,5160,7860,5220~
     - Inside source: true
     *** True Line Result
    -  2200,9320,2200,9440
    -** Processing line: ~  2140,9560,2200,9440~
    +  7720,5160,7860,5220
    +** Processing line: ~  7640,5120,7720,5160~
     - Inside source: true
     *** True Line Result
    -  2140,9560,2200,9440
    -** Processing line: ~  1880,10300,2200,10280~
    +  7640,5120,7720,5160
    +** Processing line: ~  7480,5120,7640,5120~
     - Inside source: true
     *** True Line Result
    -  1880,10300,2200,10280
    -** Processing line: ~  2200,10280,2480,10260~
    +  7480,5120,7640,5120
    +** Processing line: ~  7240,5120,7480,5120~
     - Inside source: true
     *** True Line Result
    -  2200,10280,2480,10260
    -** Processing line: ~  2480,10260,2700,10240~
    +  7240,5120,7480,5120
    +** Processing line: ~  7000,5120,7240,5120~
     - Inside source: true
     *** True Line Result
    -  2480,10260,2700,10240
    -** Processing line: ~  2700,10240,2840,10180~
    +  7000,5120,7240,5120
    +** Processing line: ~  6800,5160,7000,5120~
     - Inside source: true
     *** True Line Result
    -  2700,10240,2840,10180
    -** Processing line: ~  2840,10180,2900,10060~
    +  6800,5160,7000,5120
    +** Processing line: ~  6640,5220,6800,5160~
     - Inside source: true
     *** True Line Result
    -  2840,10180,2900,10060
    -** Processing line: ~  2900,9860,2900,10060~
    +  6640,5220,6800,5160
    +** Processing line: ~  6600,5360,6640,5220~
     - Inside source: true
     *** True Line Result
    -  2900,9860,2900,10060
    -** Processing line: ~  2900,9640,2900,9860~
    +  6600,5360,6640,5220
    +** Processing line: ~  6600,5460,6600,5360~
     - Inside source: true
     *** True Line Result
    -  2900,9640,2900,9860
    -** Processing line: ~  2900,9640,2900,9500~
    +  6600,5460,6600,5360
    +** Processing line: ~  6480,5520,6600,5460~
     - Inside source: true
     *** True Line Result
    -  2900,9640,2900,9500
    -** Processing line: ~  2900,9460,2900,9500~
    +  6480,5520,6600,5460
    +** Processing line: ~  6240,5540,6480,5520~
     - Inside source: true
     *** True Line Result
    -  2900,9460,2900,9500
    -** Processing line: ~  2740,9460,2900,9460~
    +  6240,5540,6480,5520
    +** Processing line: ~  5980,5540,6240,5540~
     - Inside source: true
     *** True Line Result
    -  2740,9460,2900,9460
    -** Processing line: ~  2700,9460,2740,9460~
    +  5980,5540,6240,5540
    +** Processing line: ~  5740,5540,5980,5540~
     - Inside source: true
     *** True Line Result
    -  2700,9460,2740,9460
    -** Processing line: ~  2700,9360,2700,9460~
    +  5740,5540,5980,5540
    +** Processing line: ~  5500,5520,5740,5540~
     - Inside source: true
     *** True Line Result
    -  2700,9360,2700,9460
    -** Processing line: ~  2700,9320,2700,9360~
    +  5500,5520,5740,5540
    +** Processing line: ~  5400,5520,5500,5520~
     - Inside source: true
     *** True Line Result
    -  2700,9320,2700,9360
    -** Processing line: ~  2600,9320,2700,9320~
    +  5400,5520,5500,5520
    +** Processing line: ~  5280,5540,5400,5520~
     - Inside source: true
     *** True Line Result
    -  2600,9320,2700,9320
    -** Processing line: ~  2600,9260,2600,9320~
    +  5280,5540,5400,5520
    +** Processing line: ~  5080,5540,5280,5540~
     - Inside source: true
     *** True Line Result
    -  2600,9260,2600,9320
    -** Processing line: ~  2600,9200,2600,9260~
    +  5080,5540,5280,5540
    +** Processing line: ~  4940,5540,5080,5540~
     - Inside source: true
     *** True Line Result
    -  2600,9200,2600,9260
    -** Processing line: ~  2480,9120,2600,9200~
    +  4940,5540,5080,5540
    +** Processing line: ~  4760,5540,4940,5540~
     - Inside source: true
     *** True Line Result
    -  2480,9120,2600,9200
    -** Processing line: ~  2440,9080,2480,9120~
    +  4760,5540,4940,5540
    +** Processing line: ~  4600,5540,4760,5540~
     - Inside source: true
     *** True Line Result
    -  2440,9080,2480,9120
    -** Processing line: ~  2380,9080,2440,9080~
    +  4600,5540,4760,5540
    +** Processing line: ~  4440,5560,4600,5540~
     - Inside source: true
     *** True Line Result
    -  2380,9080,2440,9080
    -** Processing line: ~  2320,9060,2380,9080~
    +  4440,5560,4600,5540
    +** Processing line: ~  4040,5580,4120,5520~
     - Inside source: true
     *** True Line Result
    -  2320,9060,2380,9080
    -** Processing line: ~  2320,8860,2320,9060~
    +  4040,5580,4120,5520
    +** Processing line: ~  4260,5540,4440,5560~
     - Inside source: true
     *** True Line Result
    -  2320,8860,2320,9060
    -** Processing line: ~  2320,8860,2380,8840~
    +  4260,5540,4440,5560
    +** Processing line: ~  4120,5520,4260,5540~
     - Inside source: true
     *** True Line Result
    -  2320,8860,2380,8840
    -** Processing line: ~  2380,8840,2480,8860~
    +  4120,5520,4260,5540
    +** Processing line: ~  4020,5720,4040,5580~
     - Inside source: true
     *** True Line Result
    -  2380,8840,2480,8860
    -** Processing line: ~  2480,8860,2600,8840~
    +  4020,5720,4040,5580
    +** Processing line: ~  4020,5840,4020,5720~
     - Inside source: true
     *** True Line Result
    -  2480,8860,2600,8840
    -** Processing line: ~  2600,8840,2740,8840~
    +  4020,5840,4020,5720
    +** Processing line: ~  4020,5840,4080,5940~
     - Inside source: true
     *** True Line Result
    -  2600,8840,2740,8840
    -** Processing line: ~  2740,8840,2840,8800~
    +  4020,5840,4080,5940
    +** Processing line: ~  4080,5940,4120,6040~
     - Inside source: true
     *** True Line Result
    -  2740,8840,2840,8800
    -** Processing line: ~  2840,8800,2900,8700~
    +  4080,5940,4120,6040
    +** Processing line: ~  4120,6040,4200,6080~
     - Inside source: true
     *** True Line Result
    -  2840,8800,2900,8700
    -** Processing line: ~  2900,8600,2900,8700~
    +  4120,6040,4200,6080
    +** Processing line: ~  4200,6080,4340,6080~
     - Inside source: true
     *** True Line Result
    -  2900,8600,2900,8700
    -** Processing line: ~  2900,8480,2900,8600~
    +  4200,6080,4340,6080
    +** Processing line: ~  4340,6080,4500,6060~
     - Inside source: true
     *** True Line Result
    -  2900,8480,2900,8600
    -** Processing line: ~  2900,8380,2900,8480~
    +  4340,6080,4500,6060
    +** Processing line: ~  4500,6060,4700,6060~
     - Inside source: true
     *** True Line Result
    -  2900,8380,2900,8480
    -** Processing line: ~  2900,8380,2900,8260~
    +  4500,6060,4700,6060
    +** Processing line: ~  4700,6060,4880,6060~
     - Inside source: true
     *** True Line Result
    -  2900,8380,2900,8260
    -** Processing line: ~  2900,8260,2900,8140~
    +  4700,6060,4880,6060
    +** Processing line: ~  4880,6060,5080,6060~
     - Inside source: true
     *** True Line Result
    -  2900,8260,2900,8140
    -** Processing line: ~  2900,8140,2900,8020~
    +  4880,6060,5080,6060
    +** Processing line: ~  5080,6060,5280,6080~
     - Inside source: true
     *** True Line Result
    -  2900,8140,2900,8020
    -** Processing line: ~  2900,8020,2900,7900~
    +  5080,6060,5280,6080
    +** Processing line: ~  5280,6080,5440,6100~
     - Inside source: true
     *** True Line Result
    -  2900,8020,2900,7900
    -** Processing line: ~  2900,7820,2900,7900~
    +  5280,6080,5440,6100
    +** Processing line: ~  5440,6100,5660,6100~
     - Inside source: true
     *** True Line Result
    -  2900,7820,2900,7900
    -** Processing line: ~  2900,7820,2900,7740~
    +  5440,6100,5660,6100
    +** Processing line: ~  5660,6100,5900,6080~
     - Inside source: true
     *** True Line Result
    -  2900,7820,2900,7740
    -** Processing line: ~  2900,7660,2900,7740~
    +  5660,6100,5900,6080
    +** Processing line: ~  5900,6080,6120,6080~
     - Inside source: true
     *** True Line Result
    -  2900,7660,2900,7740
    -** Processing line: ~  2900,7560,2900,7660~
    +  5900,6080,6120,6080
    +** Processing line: ~  6120,6080,6360,6080~
     - Inside source: true
     *** True Line Result
    -  2900,7560,2900,7660
    -** Processing line: ~  2900,7460,2900,7560~
    +  6120,6080,6360,6080
    +** Processing line: ~  6360,6080,6480,6100~
     - Inside source: true
     *** True Line Result
    -  2900,7460,2900,7560
    -** Processing line: ~  2900,7460,2900,7360~
    +  6360,6080,6480,6100
    +** Processing line: ~  6480,6100,6540,6060~
     - Inside source: true
     *** True Line Result
    -  2900,7460,2900,7360
    -** Processing line: ~  2900,7260,2900,7360~
    +  6480,6100,6540,6060
    +** Processing line: ~  6540,6060,6720,6060~
     - Inside source: true
     *** True Line Result
    -  2900,7260,2900,7360
    -** Processing line: ~  2840,7160,2900,7260~
    +  6540,6060,6720,6060
    +** Processing line: ~  6720,6060,6940,6060~
     - Inside source: true
     *** True Line Result
    -  2840,7160,2900,7260
    -** Processing line: ~  2800,7080,2840,7160~
    +  6720,6060,6940,6060
    +** Processing line: ~  6940,6060,7140,6060~
     - Inside source: true
     *** True Line Result
    -  2800,7080,2840,7160
    -** Processing line: ~  2700,7100,2800,7080~
    +  6940,6060,7140,6060
    +** Processing line: ~  7400,6060,7600,6060~
     - Inside source: true
     *** True Line Result
    -  2700,7100,2800,7080
    -** Processing line: ~  2560,7120,2700,7100~
    +  7400,6060,7600,6060
    +** Processing line: ~  7140,6060,7400,6060~
     - Inside source: true
     *** True Line Result
    -  2560,7120,2700,7100
    -** Processing line: ~  2400,7100,2560,7120~
    +  7140,6060,7400,6060
    +** Processing line: ~  7600,6060,7800,6060~
     - Inside source: true
     *** True Line Result
    -  2400,7100,2560,7120
    -** Processing line: ~  2320,7100,2400,7100~
    +  7600,6060,7800,6060
    +** Processing line: ~  7800,6060,7860,6080~
     - Inside source: true
     *** True Line Result
    -  2320,7100,2400,7100
    -** Processing line: ~  2140,7100,2320,7100~
    +  7800,6060,7860,6080
    +** Processing line: ~  7860,6080,8060,6080~
     - Inside source: true
     *** True Line Result
    -  2140,7100,2320,7100
    -** Processing line: ~  2040,7080,2140,7100~
    +  7860,6080,8060,6080
    +** Processing line: ~  8060,6080,8220,6080~
     - Inside source: true
     *** True Line Result
    -  2040,7080,2140,7100
    -** Processing line: ~  1940,7080,2040,7080~
    +  8060,6080,8220,6080
    +** Processing line: ~  8220,6080,8320,6140~
     - Inside source: true
     *** True Line Result
    -  1940,7080,2040,7080
    -** Processing line: ~  1820,7140,1940,7080~
    +  8220,6080,8320,6140
    +** Processing line: ~  8320,6140,8360,6300~
     - Inside source: true
     *** True Line Result
    -  1820,7140,1940,7080
    -** Processing line: ~  1680,7140,1820,7140~
    +  8320,6140,8360,6300
    +** Processing line: ~  8320,6460,8360,6300~
     - Inside source: true
     *** True Line Result
    -  1680,7140,1820,7140
    -** Processing line: ~  1540,7140,1680,7140~
    +  8320,6460,8360,6300
    +** Processing line: ~  8320,6620,8320,6460~
     - Inside source: true
     *** True Line Result
    -  1540,7140,1680,7140
    -** Processing line: ~  1420,7220,1540,7140~
    +  8320,6620,8320,6460
    +** Processing line: ~  8320,6800,8320,6620~
     - Inside source: true
     *** True Line Result
    -  1420,7220,1540,7140
    -** Processing line: ~  1280,7220,1380,7220~
    +  8320,6800,8320,6620
    +** Processing line: ~  8320,6960,8320,6800~
     - Inside source: true
     *** True Line Result
    -  1280,7220,1380,7220
    -** Processing line: ~  1140,7200,1280,7220~
    +  8320,6960,8320,6800
    +** Processing line: ~  8320,6960,8360,7120~
     - Inside source: true
     *** True Line Result
    -  1140,7200,1280,7220
    -** Processing line: ~  1000,7220,1140,7200~
    +  8320,6960,8360,7120
    +** Processing line: ~  8320,7280,8360,7120~
     - Inside source: true
     *** True Line Result
    -  1000,7220,1140,7200
    -** Processing line: ~  760,7280,900,7320~
    +  8320,7280,8360,7120
    +** Processing line: ~  8320,7440,8320,7280~
     - Inside source: true
     *** True Line Result
    -  760,7280,900,7320
    -** Processing line: ~  540,7220,760,7280~
    +  8320,7440,8320,7280
    +** Processing line: ~  8320,7600,8320,7440~
     - Inside source: true
     *** True Line Result
    -  540,7220,760,7280
    -** Processing line: ~  300,7180,540,7220~
    +  8320,7600,8320,7440
    +** Processing line: ~  8100,7580,8220,7600~
     - Inside source: true
     *** True Line Result
    -  300,7180,540,7220
    -** Processing line: ~  180,7120,180,7160~
    +  8100,7580,8220,7600
    +** Processing line: ~  8220,7600,8320,7600~
     - Inside source: true
     *** True Line Result
    -  180,7120,180,7160
    -** Processing line: ~  40,7140,180,7120~
    +  8220,7600,8320,7600
    +** Processing line: ~  7900,7560,8100,7580~
     - Inside source: true
     *** True Line Result
    -  40,7140,180,7120
    -** Processing line: ~  -60,7160,40,7140~
    +  7900,7560,8100,7580
    +** Processing line: ~  7680,7560,7900,7560~
     - Inside source: true
     *** True Line Result
    -  -60,7160,40,7140
    -** Processing line: ~  -200,7120,-60,7160~
    +  7680,7560,7900,7560
    +** Processing line: ~  7480,7580,7680,7560~
     - Inside source: true
     *** True Line Result
    -  -200,7120,-60,7160
    -** Processing line: ~  180,7160,300,7180~
    +  7480,7580,7680,7560
    +** Processing line: ~  7280,7580,7480,7580~
     - Inside source: true
     *** True Line Result
    -  180,7160,300,7180
    -** Processing line: ~  -260,7060,-200,7120~
    +  7280,7580,7480,7580
    +** Processing line: ~  7080,7580,7280,7580~
     - Inside source: true
     *** True Line Result
    -  -260,7060,-200,7120
    -** Processing line: ~  -260,6980,-260,7060~
    +  7080,7580,7280,7580
    +** Processing line: ~  7000,7600,7080,7580~
     - Inside source: true
     *** True Line Result
    -  -260,6980,-260,7060
    -** Processing line: ~  -260,6880,-260,6980~
    +  7000,7600,7080,7580
    +** Processing line: ~  6880,7600,7000,7600~
     - Inside source: true
     *** True Line Result
    -  -260,6880,-260,6980
    -** Processing line: ~  -260,6880,-260,6820~
    +  6880,7600,7000,7600
    +** Processing line: ~  6800,7580,6880,7600~
     - Inside source: true
     *** True Line Result
    -  -260,6880,-260,6820
    -** Processing line: ~  -260,6820,-200,6760~
    +  6800,7580,6880,7600
    +** Processing line: ~  6640,7580,6800,7580~
     - Inside source: true
     *** True Line Result
    -  -260,6820,-200,6760
    -** Processing line: ~  -200,6760,-100,6740~
    +  6640,7580,6800,7580
    +** Processing line: ~  6540,7580,6640,7580~
     - Inside source: true
     *** True Line Result
    -  -200,6760,-100,6740
    -** Processing line: ~  -100,6740,-60,6740~
    +  6540,7580,6640,7580
    +** Processing line: ~  6380,7600,6540,7580~
     - Inside source: true
     *** True Line Result
    -  -100,6740,-60,6740
    -** Processing line: ~  -60,6740,40,6740~
    +  6380,7600,6540,7580
    +** Processing line: ~  6280,7620,6380,7600~
     - Inside source: true
     *** True Line Result
    -  -60,6740,40,6740
    -** Processing line: ~  40,6740,300,6800~
    +  6280,7620,6380,7600
    +** Processing line: ~  6240,7700,6280,7620~
     - Inside source: true
     *** True Line Result
    -  40,6740,300,6800
    -** Processing line: ~  300,6800,420,6760~
    +  6240,7700,6280,7620
    +** Processing line: ~  6240,7700,6240,7800~
     - Inside source: true
     *** True Line Result
    -  300,6800,420,6760
    -** Processing line: ~  420,6760,500,6740~
    +  6240,7700,6240,7800
    +** Processing line: ~  6240,7840,6240,7800~
     - Inside source: true
     *** True Line Result
    -  420,6760,500,6740
    -** Processing line: ~  500,6740,540,6760~
    +  6240,7840,6240,7800
    +** Processing line: ~  6080,7840,6240,7840~
     - Inside source: true
     *** True Line Result
    -  500,6740,540,6760
    -** Processing line: ~  540,6760,540,6760~
    +  6080,7840,6240,7840
    +** Processing line: ~  5960,7820,6080,7840~
     - Inside source: true
     *** True Line Result
    -  540,6760,540,6760
    -** Processing line: ~  540,6760,640,6780~
    +  5960,7820,6080,7840
    +** Processing line: ~  5660,7840,5800,7840~
     - Inside source: true
     *** True Line Result
    -  540,6760,640,6780
    -** Processing line: ~  640,6660,640,6780~
    +  5660,7840,5800,7840
    +** Processing line: ~  5500,7800,5660,7840~
     - Inside source: true
     *** True Line Result
    -  640,6660,640,6780
    -** Processing line: ~  580,6580,640,6660~
    +  5500,7800,5660,7840
    +** Processing line: ~  5440,7700,5500,7800~
     - Inside source: true
     *** True Line Result
    -  580,6580,640,6660
    -** Processing line: ~  580,6440,580,6580~
    +  5440,7700,5500,7800
    +** Processing line: ~  5800,7840,5960,7820~
     - Inside source: true
     *** True Line Result
    -  580,6440,580,6580
    -** Processing line: ~  580,6440,640,6320~
    +  5800,7840,5960,7820
    +** Processing line: ~  5440,7540,5440,7700~
     - Inside source: true
     *** True Line Result
    -  580,6440,640,6320
    -** Processing line: ~  640,6320,640,6180~
    +  5440,7540,5440,7700
    +** Processing line: ~  5440,7440,5440,7540~
     - Inside source: true
     *** True Line Result
    -  640,6320,640,6180
    -** Processing line: ~  580,6080,640,6180~
    +  5440,7440,5440,7540
    +** Processing line: ~  5440,7320,5440,7440~
     - Inside source: true
     *** True Line Result
    -  580,6080,640,6180
    -** Processing line: ~  580,6080,640,5960~
    +  5440,7320,5440,7440
    +** Processing line: ~  5400,7320,5440,7320~
     - Inside source: true
     *** True Line Result
    -  580,6080,640,5960
    -** Processing line: ~  640,5960,640,5840~
    +  5400,7320,5440,7320
    +** Processing line: ~  5340,7400,5400,7320~
     - Inside source: true
     *** True Line Result
    -  640,5960,640,5840
    -** Processing line: ~  640,5840,640,5700~
    +  5340,7400,5400,7320
    +** Processing line: ~  5340,7400,5340,7500~
     - Inside source: true
     *** True Line Result
    -  640,5840,640,5700
    -** Processing line: ~  640,5700,660,5560~
    +  5340,7400,5340,7500
    +** Processing line: ~  5340,7600,5340,7500~
     - Inside source: true
     *** True Line Result
    -  640,5700,660,5560
    -** Processing line: ~  660,5560,660,5440~
    +  5340,7600,5340,7500
    +** Processing line: ~  5340,7600,5340,7720~
     - Inside source: true
     *** True Line Result
    -  660,5560,660,5440
    -** Processing line: ~  660,5440,660,5300~
    +  5340,7600,5340,7720
    +** Processing line: ~  5340,7720,5340,7860~
     - Inside source: true
     *** True Line Result
    -  660,5440,660,5300
    -** Processing line: ~  660,5140,660,5300~
    +  5340,7720,5340,7860
    +** Processing line: ~  5340,7860,5340,7960~
     - Inside source: true
     *** True Line Result
    -  660,5140,660,5300
    -** Processing line: ~  660,5140,660,5000~
    +  5340,7860,5340,7960
    +** Processing line: ~  5340,7960,5440,8020~
     - Inside source: true
     *** True Line Result
    -  660,5140,660,5000
    -** Processing line: ~  660,5000,660,4880~
    +  5340,7960,5440,8020
    +** Processing line: ~  5440,8020,5560,8020~
     - Inside source: true
     *** True Line Result
    -  660,5000,660,4880
    -** Processing line: ~  660,4880,820,4860~
    +  5440,8020,5560,8020
    +** Processing line: ~  5560,8020,5720,8040~
     - Inside source: true
     *** True Line Result
    -  660,4880,820,4860
    -** Processing line: ~  820,4860,1000,4840~
    +  5560,8020,5720,8040
    +** Processing line: ~  5720,8040,5900,8060~
     - Inside source: true
     *** True Line Result
    -  820,4860,1000,4840
    -** Processing line: ~  1000,4840,1100,4860~
    +  5720,8040,5900,8060
    +** Processing line: ~  5900,8060,6080,8060~
     - Inside source: true
     *** True Line Result
    -  1000,4840,1100,4860
    -** Processing line: ~  1100,4860,1280,4860~
    +  5900,8060,6080,8060
    +** Processing line: ~  6080,8060,6240,8060~
     - Inside source: true
     *** True Line Result
    -  1100,4860,1280,4860
    -** Processing line: ~  1280,4860,1420,4840~
    +  6080,8060,6240,8060
    +** Processing line: ~  6720,8040,6840,8060~
     - Inside source: true
     *** True Line Result
    -  1280,4860,1420,4840
    -** Processing line: ~  1420,4840,1580,4860~
    +  6720,8040,6840,8060
    +** Processing line: ~  6240,8060,6480,8040~
     - Inside source: true
     *** True Line Result
    -  1420,4840,1580,4860
    -** Processing line: ~  1580,4860,1720,4820~
    +  6240,8060,6480,8040
    +** Processing line: ~  6480,8040,6720,8040~
     - Inside source: true
     *** True Line Result
    -  1580,4860,1720,4820
    -** Processing line: ~  1720,4820,1880,4860~
    +  6480,8040,6720,8040
    +** Processing line: ~  6840,8060,6940,8060~
     - Inside source: true
     *** True Line Result
    -  1720,4820,1880,4860
    -** Processing line: ~  1880,4860,2000,4840~
    +  6840,8060,6940,8060
    +** Processing line: ~  6940,8060,7080,8120~
     - Inside source: true
     *** True Line Result
    -  1880,4860,2000,4840
    -** Processing line: ~  2000,4840,2140,4840~
    +  6940,8060,7080,8120
    +** Processing line: ~  7080,8120,7140,8180~
     - Inside source: true
     *** True Line Result
    -  2000,4840,2140,4840
    -** Processing line: ~  2140,4840,2320,4860~
    +  7080,8120,7140,8180
    +** Processing line: ~  7140,8460,7140,8320~
     - Inside source: true
     *** True Line Result
    -  2140,4840,2320,4860
    -** Processing line: ~  2320,4860,2440,4880~
    +  7140,8460,7140,8320
    +** Processing line: ~  7140,8620,7140,8460~
     - Inside source: true
     *** True Line Result
    -  2320,4860,2440,4880
    -** Processing line: ~  2440,4880,2600,4880~
    +  7140,8620,7140,8460
    +** Processing line: ~  7140,8620,7140,8740~
     - Inside source: true
     *** True Line Result
    -  2440,4880,2600,4880
    -** Processing line: ~  2600,4880,2800,4880~
    +  7140,8620,7140,8740
    +** Processing line: ~  7140,8860,7140,8740~
     - Inside source: true
     *** True Line Result
    -  2600,4880,2800,4880
    -** Processing line: ~  2800,4880,2900,4880~
    +  7140,8860,7140,8740
    +** Processing line: ~  7140,8960,7140,8860~
     - Inside source: true
     *** True Line Result
    -  2800,4880,2900,4880
    -** Processing line: ~  2900,4880,2900,4820~
    +  7140,8960,7140,8860
    +** Processing line: ~  7140,8960,7200,9080~
     - Inside source: true
     *** True Line Result
    -  2900,4880,2900,4820
    -** Processing line: ~  2900,4740,2900,4820~
    +  7140,8960,7200,9080
    +** Processing line: ~  7140,9200,7200,9080~
     - Inside source: true
     *** True Line Result
    -  2900,4740,2900,4820
    -** Processing line: ~  2800,4700,2900,4740~
    +  7140,9200,7200,9080
    +** Processing line: ~  7140,9200,7200,9320~
     - Inside source: true
     *** True Line Result
    -  2800,4700,2900,4740
    -** Processing line: ~  2520,4680,2800,4700~
    +  7140,9200,7200,9320
    +** Processing line: ~  7200,9320,7200,9460~
     - Inside source: true
     *** True Line Result
    -  2520,4680,2800,4700
    -** Processing line: ~  2240,4660,2520,4680~
    +  7200,9320,7200,9460
    +** Processing line: ~  7200,9760,7200,9900~
     - Inside source: true
     *** True Line Result
    -  2240,4660,2520,4680
    -** Processing line: ~  1940,4620,2240,4660~
    +  7200,9760,7200,9900
    +** Processing line: ~  7200,9620,7200,9460~
     - Inside source: true
     *** True Line Result
    -  1940,4620,2240,4660
    -** Processing line: ~  1820,4580,1940,4620~
    +  7200,9620,7200,9460
    +** Processing line: ~  7200,9620,7200,9760~
     - Inside source: true
     *** True Line Result
    -  1820,4580,1940,4620
    -** Processing line: ~  1820,4500,1820,4580~
    +  7200,9620,7200,9760
    +** Processing line: ~  7200,9900,7200,10060~
     - Inside source: true
     *** True Line Result
    -  1820,4500,1820,4580
    -** Processing line: ~  1820,4500,1880,4420~
    +  7200,9900,7200,10060
    +** Processing line: ~  7200,10220,7200,10060~
     - Inside source: true
     *** True Line Result
    -  1820,4500,1880,4420
    -** Processing line: ~  1880,4420,2000,4420~
    +  7200,10220,7200,10060
    +** Processing line: ~  7200,10360,7200,10220~
     - Inside source: true
     *** True Line Result
    -  1880,4420,2000,4420
    -** Processing line: ~  2000,4420,2200,4420~
    +  7200,10360,7200,10220
    +** Processing line: ~  7140,10400,7200,10360~
     - Inside source: true
     *** True Line Result
    -  2000,4420,2200,4420
    -** Processing line: ~  2200,4420,2400,4440~
    +  7140,10400,7200,10360
    +** Processing line: ~  6880,10400,7140,10400~
     - Inside source: true
     *** True Line Result
    -  2200,4420,2400,4440
    -** Processing line: ~  2400,4440,2600,4440~
    +  6880,10400,7140,10400
    +** Processing line: ~  6640,10360,6880,10400~
     - Inside source: true
     *** True Line Result
    -  2400,4440,2600,4440
    -** Processing line: ~  2600,4440,2840,4440~
    +  6640,10360,6880,10400
    +** Processing line: ~  6420,10360,6640,10360~
     - Inside source: true
     *** True Line Result
    -  2600,4440,2840,4440
    -** Processing line: ~  2840,4440,2900,4400~
    +  6420,10360,6640,10360
    +** Processing line: ~  6160,10380,6420,10360~
     - Inside source: true
     *** True Line Result
    -  2840,4440,2900,4400
    -** Processing line: ~  2740,4260,2900,4280~
    +  6160,10380,6420,10360
    +** Processing line: ~  5940,10340,6160,10380~
     - Inside source: true
     *** True Line Result
    -  2740,4260,2900,4280
    -** Processing line: ~  2600,4240,2740,4260~
    +  5940,10340,6160,10380
    +** Processing line: ~  5720,10320,5940,10340~
     - Inside source: true
     *** True Line Result
    -  2600,4240,2740,4260
    -** Processing line: ~  2480,4280,2600,4240~
    +  5720,10320,5940,10340
    +** Processing line: ~  5500,10340,5720,10320~
     - Inside source: true
     *** True Line Result
    -  2480,4280,2600,4240
    -** Processing line: ~  2320,4240,2480,4280~
    +  5500,10340,5720,10320
    +** Processing line: ~  5280,10300,5500,10340~
     - Inside source: true
     *** True Line Result
    -  2320,4240,2480,4280
    -** Processing line: ~  2140,4220,2320,4240~
    +  5280,10300,5500,10340
    +** Processing line: ~  5080,10300,5280,10300~
     - Inside source: true
     *** True Line Result
    -  2140,4220,2320,4240
    -** Processing line: ~  1940,4220,2140,4220~
    +  5080,10300,5280,10300
    +** Processing line: ~  4840,10280,5080,10300~
     - Inside source: true
     *** True Line Result
    -  1940,4220,2140,4220
    -** Processing line: ~  1880,4160,1940,4220~
    +  4840,10280,5080,10300
    +** Processing line: ~  4700,10280,4840,10280~
     - Inside source: true
     *** True Line Result
    -  1880,4160,1940,4220
    -** Processing line: ~  1880,4160,1880,4080~
    +  4700,10280,4840,10280
    +** Processing line: ~  4540,10280,4700,10280~
     - Inside source: true
     *** True Line Result
    -  1880,4160,1880,4080
    -** Processing line: ~  1880,4080,2040,4040~
    +  4540,10280,4700,10280
    +** Processing line: ~  4360,10280,4540,10280~
     - Inside source: true
     *** True Line Result
    -  1880,4080,2040,4040
    -** Processing line: ~  2040,4040,2240,4060~
    +  4360,10280,4540,10280
    +** Processing line: ~  4200,10300,4360,10280~
     - Inside source: true
     *** True Line Result
    -  2040,4040,2240,4060
    -** Processing line: ~  2240,4060,2400,4040~
    +  4200,10300,4360,10280
    +** Processing line: ~  4040,10380,4200,10300~
     - Inside source: true
     *** True Line Result
    -  2240,4060,2400,4040
    -** Processing line: ~  2400,4040,2600,4060~
    +  4040,10380,4200,10300
    +** Processing line: ~  4020,10500,4040,10380~
     - Inside source: true
     *** True Line Result
    -  2400,4040,2600,4060
    -** Processing line: ~  2600,4060,2740,4020~
    +  4020,10500,4040,10380
    +** Processing line: ~  3980,10640,4020,10500~
     - Inside source: true
     *** True Line Result
    -  2600,4060,2740,4020
    -** Processing line: ~  2740,4020,2840,3940~
    +  3980,10640,4020,10500
    +** Processing line: ~  3980,10640,3980,10760~
     - Inside source: true
     *** True Line Result
    -  2740,4020,2840,3940
    -** Processing line: ~  2840,3780,2840,3940~
    +  3980,10640,3980,10760
    +** Processing line: ~  3980,10760,4020,10920~
     - Inside source: true
     *** True Line Result
    -  2840,3780,2840,3940
    -** Processing line: ~  2740,3660,2840,3780~
    +  3980,10760,4020,10920
    +** Processing line: ~  4020,10920,4080,11000~
     - Inside source: true
     *** True Line Result
    -  2740,3660,2840,3780
    -** Processing line: ~  2700,3680,2740,3660~
    +  4020,10920,4080,11000
    +** Processing line: ~  4080,11000,4340,11020~
     - Inside source: true
     *** True Line Result
    -  2700,3680,2740,3660
    -** Processing line: ~  2520,3700,2700,3680~
    +  4080,11000,4340,11020
    +** Processing line: ~  4340,11020,4600,11060~
     - Inside source: true
     *** True Line Result
    -  2520,3700,2700,3680
    -** Processing line: ~  2380,3700,2520,3700~
    +  4340,11020,4600,11060
    +** Processing line: ~  4600,11060,4840,11040~
     - Inside source: true
     *** True Line Result
    -  2380,3700,2520,3700
    -** Processing line: ~  2200,3720,2380,3700~
    +  4600,11060,4840,11040
    +** Processing line: ~  4840,11040,4880,10960~
     - Inside source: true
     *** True Line Result
    -  2200,3720,2380,3700
    -** Processing line: ~  2040,3720,2200,3720~
    +  4840,11040,4880,10960
    +** Processing line: ~  4880,10740,4880,10960~
     - Inside source: true
     *** True Line Result
    -  2040,3720,2200,3720
    -** Processing line: ~  1880,3700,2040,3720~
    +  4880,10740,4880,10960
    +** Processing line: ~  4880,10740,4880,10600~
     - Inside source: true
     *** True Line Result
    -  1880,3700,2040,3720
    -** Processing line: ~  1820,3680,1880,3700~
    +  4880,10740,4880,10600
    +** Processing line: ~  4880,10600,5080,10560~
     - Inside source: true
     *** True Line Result
    -  1820,3680,1880,3700
    -** Processing line: ~  1760,3600,1820,3680~
    +  4880,10600,5080,10560
    +** Processing line: ~  5080,10560,5340,10620~
     - Inside source: true
     *** True Line Result
    -  1760,3600,1820,3680
    -** Processing line: ~  1760,3600,1820,3480~
    +  5080,10560,5340,10620
    +** Processing line: ~  5340,10620,5660,10620~
     - Inside source: true
     *** True Line Result
    -  1760,3600,1820,3480
    -** Processing line: ~  1820,3480,1880,3440~
    +  5340,10620,5660,10620
    +** Processing line: ~  5660,10620,6040,10600~
     - Inside source: true
     *** True Line Result
    -  1820,3480,1880,3440
    -** Processing line: ~  1880,3440,1960,3460~
    +  5660,10620,6040,10600
    +** Processing line: ~  6040,10600,6120,10620~
     - Inside source: true
     *** True Line Result
    -  1880,3440,1960,3460
    -** Processing line: ~  1960,3460,2140,3460~
    +  6040,10600,6120,10620
    +** Processing line: ~  6120,10620,6240,10720~
     - Inside source: true
     *** True Line Result
    -  1960,3460,2140,3460
    -** Processing line: ~  2140,3460,2380,3460~
    +  6120,10620,6240,10720
    +** Processing line: ~  6240,10720,6420,10740~
     - Inside source: true
     *** True Line Result
    -  2140,3460,2380,3460
    -** Processing line: ~  2380,3460,2640,3440~
    +  6240,10720,6420,10740
    +** Processing line: ~  6420,10740,6640,10760~
     - Inside source: true
     *** True Line Result
    -  2380,3460,2640,3440
    -** Processing line: ~  2640,3440,2900,3380~
    +  6420,10740,6640,10760
    +** Processing line: ~  6640,10760,6880,10780~
     - Inside source: true
     *** True Line Result
    -  2640,3440,2900,3380
    -** Processing line: ~  2840,3280,2900,3380~
    +  6640,10760,6880,10780
    +** Processing line: ~  7140,10780,7400,10780~
     - Inside source: true
     *** True Line Result
    -  2840,3280,2900,3380
    -** Processing line: ~  2840,3280,2900,3200~
    +  7140,10780,7400,10780
    +** Processing line: ~  6880,10780,7140,10780~
     - Inside source: true
     *** True Line Result
    -  2840,3280,2900,3200
    -** Processing line: ~  2900,3200,2900,3140~
    +  6880,10780,7140,10780
    +** Processing line: ~  7400,10780,7680,10780~
     - Inside source: true
     *** True Line Result
    -  2900,3200,2900,3140
    -** Processing line: ~  2840,3020,2900,3140~
    +  7400,10780,7680,10780
    +** Processing line: ~  7680,10780,8100,10760~
     - Inside source: true
     *** True Line Result
    -  2840,3020,2900,3140
    -** Processing line: ~  2800,2960,2840,3020~
    +  7680,10780,8100,10760
    +** Processing line: ~  8100,10760,8460,10740~
     - Inside source: true
     *** True Line Result
    -  2800,2960,2840,3020
    -** Processing line: ~  2700,3000,2800,2960~
    +  8100,10760,8460,10740
    +** Processing line: ~  8460,10740,8700,10760~
     - Inside source: true
     *** True Line Result
    -  2700,3000,2800,2960
    -** Processing line: ~  2600,2980,2700,3000~
    +  8460,10740,8700,10760
    +** Processing line: ~  8800,10840,8800,10980~
     - Inside source: true
     *** True Line Result
    -  2600,2980,2700,3000
    -** Processing line: ~  2380,3000,2600,2980~
    +  8800,10840,8800,10980
    +** Processing line: ~  8700,10760,8800,10840~
     - Inside source: true
     *** True Line Result
    -  2380,3000,2600,2980
    -** Processing line: ~  2140,3000,2380,3000~
    +  8700,10760,8800,10840
    +** Processing line: ~  8760,11200,8800,10980~
     - Inside source: true
     *** True Line Result
    -  2140,3000,2380,3000
    -** Processing line: ~  1880,3000,2140,3000~
    +  8760,11200,8800,10980
    +** Processing line: ~  8760,11200,8760,11380~
     - Inside source: true
     *** True Line Result
    -  1880,3000,2140,3000
    -** Processing line: ~  1720,3040,1880,3000~
    +  8760,11200,8760,11380
    +** Processing line: ~  8760,11380,8800,11560~
     - Inside source: true
     *** True Line Result
    -  1720,3040,1880,3000
    -** Processing line: ~  1640,2960,1720,3040~
    +  8760,11380,8800,11560
    +** Processing line: ~  8760,11680,8800,11560~
     - Inside source: true
     *** True Line Result
    -  1640,2960,1720,3040
    -** Processing line: ~  1500,2940,1640,2960~
    +  8760,11680,8800,11560
    +** Processing line: ~  8760,11760,8760,11680~
     - Inside source: true
     *** True Line Result
    -  1500,2940,1640,2960
    -** Processing line: ~  1340,3000,1500,2940~
    +  8760,11760,8760,11680
    +** Processing line: ~  8760,11760,8760,11920~
     - Inside source: true
     *** True Line Result
    -  1340,3000,1500,2940
    -** Processing line: ~  1240,3000,1340,3000~
    +  8760,11760,8760,11920
    +** Processing line: ~  8760,11920,8800,12080~
     - Inside source: true
     *** True Line Result
    -  1240,3000,1340,3000
    -** Processing line: ~  1140,3020,1240,3000~
    +  8760,11920,8800,12080
    +** Processing line: ~  8800,12200,8800,12080~
     - Inside source: true
     *** True Line Result
    -  1140,3020,1240,3000
    -** Processing line: ~  1040,3000,1140,3020~
    +  8800,12200,8800,12080
    +** Processing line: ~  8700,12240,8800,12200~
     - Inside source: true
     *** True Line Result
    -  1040,3000,1140,3020
    -** Processing line: ~  960,2960,1040,3000~
    +  8700,12240,8800,12200
    +** Processing line: ~  8560,12220,8700,12240~
     - Inside source: true
     *** True Line Result
    -  960,2960,1040,3000
    -** Processing line: ~  900,2960,960,2960~
    +  8560,12220,8700,12240
    +** Processing line: ~  8360,12220,8560,12220~
     - Inside source: true
     *** True Line Result
    -  900,2960,960,2960
    -** Processing line: ~  840,2840,900,2960~
    +  8360,12220,8560,12220
    +** Processing line: ~  8160,12240,8360,12220~
     - Inside source: true
     *** True Line Result
    -  840,2840,900,2960
    -** Processing line: ~  700,2820,840,2840~
    +  8160,12240,8360,12220
    +** Processing line: ~  7720,12220,7980,12220~
     - Inside source: true
     *** True Line Result
    -  700,2820,840,2840
    -** Processing line: ~  540,2820,700,2820~
    +  7720,12220,7980,12220
    +** Processing line: ~  7980,12220,8160,12240~
     - Inside source: true
     *** True Line Result
    -  540,2820,700,2820
    -** Processing line: ~  420,2820,540,2820~
    +  7980,12220,8160,12240
    +** Processing line: ~  7400,12200,7720,12220~
     - Inside source: true
     *** True Line Result
    -  420,2820,540,2820
    -** Processing line: ~  180,2800,420,2820~
    +  7400,12200,7720,12220
    +** Processing line: ~  7200,12180,7400,12200~
     - Inside source: true
     *** True Line Result
    -  180,2800,420,2820
    -** Processing line: ~  60,2780,180,2800~
    +  7200,12180,7400,12200
    +** Processing line: ~  7000,12160,7200,12180~
     - Inside source: true
     *** True Line Result
    -  60,2780,180,2800
    -** Processing line: ~  -60,2800,60,2780~
    +  7000,12160,7200,12180
    +** Processing line: ~  6800,12160,7000,12160~
     - Inside source: true
     *** True Line Result
    -  -60,2800,60,2780
    -** Processing line: ~  -160,2760,-60,2800~
    +  6800,12160,7000,12160
    +** Processing line: ~  6280,12140,6380,12180~
     - Inside source: true
     *** True Line Result
    -  -160,2760,-60,2800
    -** Processing line: ~  -260,2740,-160,2760~
    +  6280,12140,6380,12180
    +** Processing line: ~  6120,12180,6280,12140~
     - Inside source: true
     *** True Line Result
    -  -260,2740,-160,2760
    -** Processing line: ~  -300,2640,-260,2740~
    +  6120,12180,6280,12140
    +** Processing line: ~  6540,12180,6800,12160~
     - Inside source: true
     *** True Line Result
    -  -300,2640,-260,2740
    -** Processing line: ~  -360,2560,-300,2640~
    +  6540,12180,6800,12160
    +** Processing line: ~  6380,12180,6540,12180~
     - Inside source: true
     *** True Line Result
    -  -360,2560,-300,2640
    -** Processing line: ~  -380,2460,-360,2560~
    +  6380,12180,6540,12180
    +** Processing line: ~  5900,12200,6120,12180~
     - Inside source: true
     *** True Line Result
    -  -380,2460,-360,2560
    -** Processing line: ~  -380,2460,-300,2380~
    +  5900,12200,6120,12180
    +** Processing line: ~  5620,12180,5900,12200~
     - Inside source: true
     *** True Line Result
    -  -380,2460,-300,2380
    -** Processing line: ~  -300,2300,-300,2380~
    +  5620,12180,5900,12200
    +** Processing line: ~  5340,12120,5620,12180~
     - Inside source: true
     *** True Line Result
    -  -300,2300,-300,2380
    -** Processing line: ~  -300,2300,-300,2220~
    +  5340,12120,5620,12180
    +** Processing line: ~  5140,12100,5340,12120~
     - Inside source: true
     *** True Line Result
    -  -300,2300,-300,2220
    -** Processing line: ~  -300,2100,-300,2220~
    +  5140,12100,5340,12120
    +** Processing line: ~  4980,12120,5140,12100~
     - Inside source: true
     *** True Line Result
    -  -300,2100,-300,2220
    -** Processing line: ~  -300,2100,-300,2040~
    +  4980,12120,5140,12100
    +** Processing line: ~  4840,12120,4980,12120~
     - Inside source: true
     *** True Line Result
    -  -300,2100,-300,2040
    -** Processing line: ~  -300,2040,-160,2040~
    +  4840,12120,4980,12120
    +** Processing line: ~  4700,12200,4840,12120~
     - Inside source: true
     *** True Line Result
    -  -300,2040,-160,2040
    -** Processing line: ~  -160,2040,-60,2040~
    +  4700,12200,4840,12120
    +** Processing line: ~  4700,12380,4700,12200~
     - Inside source: true
     *** True Line Result
    -  -160,2040,-60,2040
    -** Processing line: ~  -60,2040,60,2040~
    +  4700,12380,4700,12200
    +** Processing line: ~  4740,12480,4940,12520~
     - Inside source: true
     *** True Line Result
    -  -60,2040,60,2040
    -** Processing line: ~  60,2040,180,2040~
    +  4740,12480,4940,12520
    +** Processing line: ~  4700,12380,4740,12480~
     - Inside source: true
     *** True Line Result
    -  60,2040,180,2040
    -** Processing line: ~  180,2040,360,2040~
    +  4700,12380,4740,12480
    +** Processing line: ~  4940,12520,5160,12560~
     - Inside source: true
     *** True Line Result
    -  180,2040,360,2040
    -** Processing line: ~  360,2040,540,2040~
    +  4940,12520,5160,12560
    +** Processing line: ~  5160,12560,5340,12600~
     - Inside source: true
     *** True Line Result
    -  360,2040,540,2040
    -** Processing line: ~  540,2040,700,2080~
    +  5160,12560,5340,12600
    +** Processing line: ~  5340,12600,5400,12600~
     - Inside source: true
     *** True Line Result
    -  540,2040,700,2080
    -** Processing line: ~  660,2160,700,2080~
    +  5340,12600,5400,12600
    +** Processing line: ~  5400,12600,5500,12600~
     - Inside source: true
     *** True Line Result
    -  660,2160,700,2080
    -** Processing line: ~  660,2160,700,2260~
    +  5400,12600,5500,12600
    +** Processing line: ~  5500,12600,5620,12600~
     - Inside source: true
     *** True Line Result
    -  660,2160,700,2260
    -** Processing line: ~  660,2380,700,2260~
    +  5500,12600,5620,12600
    +** Processing line: ~  5620,12600,5720,12560~
     - Inside source: true
     *** True Line Result
    -  660,2380,700,2260
    -** Processing line: ~  500,2340,660,2380~
    +  5620,12600,5720,12560
    +** Processing line: ~  5720,12560,5800,12440~
     - Inside source: true
     *** True Line Result
    -  500,2340,660,2380
    -** Processing line: ~  360,2340,500,2340~
    +  5720,12560,5800,12440
    +** Processing line: ~  5800,12440,5900,12380~
     - Inside source: true
     *** True Line Result
    -  360,2340,500,2340
    -** Processing line: ~  240,2340,360,2340~
    +  5800,12440,5900,12380
    +** Processing line: ~  5900,12380,6120,12420~
     - Inside source: true
     *** True Line Result
    -  240,2340,360,2340
    -** Processing line: ~  40,2320,240,2340~
    +  5900,12380,6120,12420
    +** Processing line: ~  6120,12420,6380,12440~
     - Inside source: true
     *** True Line Result
    -  40,2320,240,2340
    -** Processing line: ~  -60,2320,40,2320~
    +  6120,12420,6380,12440
    +** Processing line: ~  6380,12440,6600,12460~
     - Inside source: true
     *** True Line Result
    -  -60,2320,40,2320
    -** Processing line: ~  -100,2380,-60,2320~
    +  6380,12440,6600,12460
    +** Processing line: ~  6720,12460,6840,12520~
     - Inside source: true
     *** True Line Result
    -  -100,2380,-60,2320
    -** Processing line: ~  -100,2380,-100,2460~
    +  6720,12460,6840,12520
    +** Processing line: ~  6840,12520,6960,12520~
     - Inside source: true
     *** True Line Result
    -  -100,2380,-100,2460
    -** Processing line: ~  -100,2460,-100,2540~
    +  6840,12520,6960,12520
    +** Processing line: ~  6600,12460,6720,12460~
     - Inside source: true
     *** True Line Result
    -  -100,2460,-100,2540
    -** Processing line: ~  -100,2540,0,2560~
    +  6600,12460,6720,12460
    +** Processing line: ~  6960,12520,7040,12500~
     - Inside source: true
     *** True Line Result
    -  -100,2540,0,2560
    -** Processing line: ~  0,2560,140,2600~
    +  6960,12520,7040,12500
    +** Processing line: ~  7040,12500,7140,12440~
     - Inside source: true
     *** True Line Result
    -  0,2560,140,2600
    -** Processing line: ~  140,2600,300,2600~
    +  7040,12500,7140,12440
    +** Processing line: ~  7200,12440,7360,12500~
     - Inside source: true
     *** True Line Result
    -  140,2600,300,2600
    -** Processing line: ~  300,2600,460,2600~
    +  7200,12440,7360,12500
    +** Processing line: ~  7360,12500,7600,12560~
     - Inside source: true
     *** True Line Result
    -  300,2600,460,2600
    -** Processing line: ~  460,2600,640,2600~
    +  7360,12500,7600,12560
    +** Processing line: ~  7600,12560,7860,12600~
     - Inside source: true
     *** True Line Result
    -  460,2600,640,2600
    -** Processing line: ~  640,2600,760,2580~
    +  7600,12560,7860,12600
    +** Processing line: ~  7860,12600,8060,12500~
     - Inside source: true
     *** True Line Result
    -  640,2600,760,2580
    -** Processing line: ~  760,2580,820,2560~
    +  7860,12600,8060,12500
    +** Processing line: ~  8100,12500,8200,12340~
     - Inside source: true
     *** True Line Result
    -  760,2580,820,2560
    -** Processing line: ~  820,2560,820,2500~
    +  8100,12500,8200,12340
    +** Processing line: ~  8200,12340,8360,12360~
     - Inside source: true
     *** True Line Result
    -  820,2560,820,2500
    -** Processing line: ~  820,2500,820,2400~
    +  8200,12340,8360,12360
    +** Processing line: ~  8360,12360,8560,12400~
     - Inside source: true
     *** True Line Result
    -  820,2500,820,2400
    -** Processing line: ~  820,2400,840,2320~
    +  8360,12360,8560,12400
    +** Processing line: ~  8560,12400,8660,12420~
     - Inside source: true
     *** True Line Result
    -  820,2400,840,2320
    -** Processing line: ~  840,2320,840,2240~
    +  8560,12400,8660,12420
    +** Processing line: ~  8660,12420,8840,12400~
     - Inside source: true
     *** True Line Result
    -  840,2320,840,2240
    -** Processing line: ~  820,2120,840,2240~
    +  8660,12420,8840,12400
    +** Processing line: ~  8840,12400,9000,12360~
     - Inside source: true
     *** True Line Result
    -  820,2120,840,2240
    -** Processing line: ~  820,2020,820,2120~
    +  8840,12400,9000,12360
    +** Processing line: ~  9000,12360,9000,12360~
     - Inside source: true
     *** True Line Result
    -  820,2020,820,2120
    -** Processing line: ~  820,1900,820,2020~
    +  9000,12360,9000,12360
    +** Processing line: ~  2900,4400,2900,4280~
     - Inside source: true
     *** True Line Result
    -  820,1900,820,2020
    -** Processing line: ~  760,1840,820,1900~
    +  2900,4400,2900,4280
    +** Processing line: ~  900,7320,1000,7220~
     - Inside source: true
     *** True Line Result
    -  760,1840,820,1900
    -** Processing line: ~  640,1840,760,1840~
    +  900,7320,1000,7220
    +** Processing line: ~  2640,13040,2900,12920~
     - Inside source: true
     *** True Line Result
    -  640,1840,760,1840
    -** Processing line: ~  500,1840,640,1840~
    +  2640,13040,2900,12920
    +** Processing line: ~  2900,12920,3160,12840~
     - Inside source: true
     *** True Line Result
    -  500,1840,640,1840
    -** Processing line: ~  300,1860,420,1880~
    +  2900,12920,3160,12840
    +** Processing line: ~  3480,12760,3780,12620~
     - Inside source: true
     *** True Line Result
    -  300,1860,420,1880
    -** Processing line: ~  180,1840,300,1860~
    +  3480,12760,3780,12620
    +** Processing line: ~  3780,12620,4020,12460~
     - Inside source: true
     *** True Line Result
    -  180,1840,300,1860
    -** Processing line: ~  420,1880,500,1840~
    +  3780,12620,4020,12460
    +** Processing line: ~  4300,12360,4440,12260~
     - Inside source: true
     *** True Line Result
    -  420,1880,500,1840
    -** Processing line: ~  0,1840,180,1840~
    +  4300,12360,4440,12260
    +** Processing line: ~  4020,12460,4300,12360~
     - Inside source: true
     *** True Line Result
    -  0,1840,180,1840
    -** Processing line: ~  -60,1860,0,1840~
    +  4020,12460,4300,12360
    +** Processing line: ~  3160,12840,3480,12760~
     - Inside source: true
     *** True Line Result
    -  -60,1860,0,1840
    -** Processing line: ~  -160,1840,-60,1860~
    +  3160,12840,3480,12760
    +** Processing line: ~  4440,12080,4440,12260~
     - Inside source: true
     *** True Line Result
    -  -160,1840,-60,1860
    -** Processing line: ~  -200,1800,-160,1840~
    +  4440,12080,4440,12260
    +** Processing line: ~  4440,12080,4440,11880~
     - Inside source: true
     *** True Line Result
    -  -200,1800,-160,1840
    -** Processing line: ~  -260,1760,-200,1800~
    +  4440,12080,4440,11880
    +** Processing line: ~  4440,11880,4440,11720~
     - Inside source: true
     *** True Line Result
    -  -260,1760,-200,1800
    -** Processing line: ~  -260,1680,-260,1760~
    +  4440,11880,4440,11720
    +** Processing line: ~  4440,11720,4600,11720~
     - Inside source: true
     *** True Line Result
    -  -260,1680,-260,1760
    -** Processing line: ~  -260,1620,-260,1680~
    +  4440,11720,4600,11720
    +** Processing line: ~  4600,11720,4760,11740~
     - Inside source: true
     *** True Line Result
    -  -260,1620,-260,1680
    -** Processing line: ~  -260,1540,-260,1620~
    +  4600,11720,4760,11740
    +** Processing line: ~  4760,11740,4980,11760~
     - Inside source: true
     *** True Line Result
    -  -260,1540,-260,1620
    -** Processing line: ~  -260,1540,-260,1460~
    +  4760,11740,4980,11760
    +** Processing line: ~  4980,11760,5160,11760~
     - Inside source: true
     *** True Line Result
    -  -260,1540,-260,1460
    -** Processing line: ~  -300,1420,-260,1460~
    +  4980,11760,5160,11760
    +** Processing line: ~  5160,11760,5340,11780~
     - Inside source: true
     *** True Line Result
    -  -300,1420,-260,1460
    -** Processing line: ~  -300,1420,-300,1340~
    +  5160,11760,5340,11780
    +** Processing line: ~  6000,11860,6120,11820~
     - Inside source: true
     *** True Line Result
    -  -300,1420,-300,1340
    -** Processing line: ~  -300,1340,-260,1260~
    +  6000,11860,6120,11820
    +** Processing line: ~  5340,11780,5620,11820~
     - Inside source: true
     *** True Line Result
    -  -300,1340,-260,1260
    -** Processing line: ~  -260,1260,-260,1160~
    +  5340,11780,5620,11820
    +** Processing line: ~  5620,11820,6000,11860~
     - Inside source: true
     *** True Line Result
    -  -260,1260,-260,1160
    -** Processing line: ~  -260,1060,-260,1160~
    +  5620,11820,6000,11860
    +** Processing line: ~  6120,11820,6360,11820~
     - Inside source: true
     *** True Line Result
    -  -260,1060,-260,1160
    -** Processing line: ~  -260,1060,-260,960~
    +  6120,11820,6360,11820
    +** Processing line: ~  6360,11820,6640,11860~
     - Inside source: true
     *** True Line Result
    -  -260,1060,-260,960
    -** Processing line: ~  -260,880,-260,960~
    +  6360,11820,6640,11860
    +** Processing line: ~  6940,11920,7240,11940~
     - Inside source: true
     *** True Line Result
    -  -260,880,-260,960
    -** Processing line: ~  -260,880,-260,780~
    +  6940,11920,7240,11940
    +** Processing line: ~  7240,11940,7520,11960~
     - Inside source: true
     *** True Line Result
    -  -260,880,-260,780
    -** Processing line: ~  -260,780,-260,680~
    +  7240,11940,7520,11960
    +** Processing line: ~  7520,11960,7860,11960~
     - Inside source: true
     *** True Line Result
    -  -260,780,-260,680
    -** Processing line: ~  -300,580,-260,680~
    +  7520,11960,7860,11960
    +** Processing line: ~  7860,11960,8100,11920~
     - Inside source: true
     *** True Line Result
    -  -300,580,-260,680
    -** Processing line: ~  -300,580,-300,480~
    +  7860,11960,8100,11920
    +** Processing line: ~  8100,11920,8420,11940~
     - Inside source: true
     *** True Line Result
    -  -300,580,-300,480
    -** Processing line: ~  -300,480,-260,400~
    +  8100,11920,8420,11940
    +** Processing line: ~  8420,11940,8460,11960~
     - Inside source: true
     *** True Line Result
    -  -300,480,-260,400
    -** Processing line: ~  -300,320,-260,400~
    +  8420,11940,8460,11960
    +** Processing line: ~  8460,11960,8500,11860~
     - Inside source: true
     *** True Line Result
    -  -300,320,-260,400
    -** Processing line: ~  -300,320,-300,240~
    +  8460,11960,8500,11860
    +** Processing line: ~  8460,11760,8500,11860~
     - Inside source: true
     *** True Line Result
    -  -300,320,-300,240
    -** Processing line: ~  -300,240,-200,220~
    +  8460,11760,8500,11860
    +** Processing line: ~  8320,11720,8460,11760~
     - Inside source: true
     *** True Line Result
    -  -300,240,-200,220
    -** Processing line: ~  -200,220,-200,160~
    +  8320,11720,8460,11760
    +** Processing line: ~  8160,11720,8320,11720~
     - Inside source: true
     *** True Line Result
    -  -200,220,-200,160
    -** Processing line: ~  -200,160,-100,140~
    +  8160,11720,8320,11720
    +** Processing line: ~  7940,11720,8160,11720~
     - Inside source: true
     *** True Line Result
    -  -200,160,-100,140
    -** Processing line: ~  -100,140,0,120~
    +  7940,11720,8160,11720
    +** Processing line: ~  7720,11700,7940,11720~
     - Inside source: true
     *** True Line Result
    -  -100,140,0,120
    -** Processing line: ~  0,120,60,120~
    +  7720,11700,7940,11720
    +** Processing line: ~  7520,11680,7720,11700~
     - Inside source: true
     *** True Line Result
    -  0,120,60,120
    -** Processing line: ~  60,120,180,120~
    +  7520,11680,7720,11700
    +** Processing line: ~  7320,11680,7520,11680~
     - Inside source: true
     *** True Line Result
    -  60,120,180,120
    -** Processing line: ~  180,120,300,120~
    +  7320,11680,7520,11680
    +** Processing line: ~  7200,11620,7320,11680~
     - Inside source: true
     *** True Line Result
    -  180,120,300,120
    -** Processing line: ~  300,120,420,140~
    +  7200,11620,7320,11680
    +** Processing line: ~  7200,11620,7200,11500~
     - Inside source: true
     *** True Line Result
    -  300,120,420,140
    -** Processing line: ~  420,140,580,180~
    +  7200,11620,7200,11500
    +** Processing line: ~  7200,11500,7280,11440~
     - Inside source: true
     *** True Line Result
    -  420,140,580,180
    -** Processing line: ~  580,180,760,180~
    +  7200,11500,7280,11440
    +** Processing line: ~  7280,11440,7420,11440~
     - Inside source: true
     *** True Line Result
    -  580,180,760,180
    -** Processing line: ~  760,180,900,180~
    +  7280,11440,7420,11440
    +** Processing line: ~  7420,11440,7600,11440~
     - Inside source: true
     *** True Line Result
    -  760,180,900,180
    -** Processing line: ~  960,180,1100,180~
    +  7420,11440,7600,11440
    +** Processing line: ~  7600,11440,7980,11460~
     - Inside source: true
     *** True Line Result
    -  960,180,1100,180
    -** Processing line: ~  1100,180,1340,200~
    +  7600,11440,7980,11460
    +** Processing line: ~  7980,11460,8160,11460~
     - Inside source: true
     *** True Line Result
    -  1100,180,1340,200
    -** Processing line: ~  1340,200,1580,200~
    +  7980,11460,8160,11460
    +** Processing line: ~  8160,11460,8360,11460~
     - Inside source: true
     *** True Line Result
    -  1340,200,1580,200
    -** Processing line: ~  1580,200,1720,180~
    +  8160,11460,8360,11460
    +** Processing line: ~  8360,11460,8460,11400~
     - Inside source: true
     *** True Line Result
    -  1580,200,1720,180
    -** Processing line: ~  1720,180,2000,140~
    +  8360,11460,8460,11400
    +** Processing line: ~  8420,11060,8500,11200~
     - Inside source: true
     *** True Line Result
    -  1720,180,2000,140
    -** Processing line: ~  2000,140,2240,140~
    +  8420,11060,8500,11200
    +** Processing line: ~  8280,11040,8420,11060~
     - Inside source: true
     *** True Line Result
    -  2000,140,2240,140
    -** Processing line: ~  2240,140,2480,140~
    +  8280,11040,8420,11060
    +** Processing line: ~  8100,11060,8280,11040~
     - Inside source: true
     *** True Line Result
    -  2240,140,2480,140
    -** Processing line: ~  2520,140,2800,160~
    +  8100,11060,8280,11040
    +** Processing line: ~  8460,11400,8500,11200~
     - Inside source: true
     *** True Line Result
    -  2520,140,2800,160
    -** Processing line: ~  2800,160,3000,160~
    +  8460,11400,8500,11200
    +** Processing line: ~  7800,11060,8100,11060~
     - Inside source: true
     *** True Line Result
    -  2800,160,3000,160
    -** Processing line: ~  3000,160,3140,160~
    +  7800,11060,8100,11060
    +** Processing line: ~  7520,11060,7800,11060~
     - Inside source: true
     *** True Line Result
    -  3000,160,3140,160
    -** Processing line: ~  3140,260,3140,160~
    +  7520,11060,7800,11060
    +** Processing line: ~  7240,11060,7520,11060~
     - Inside source: true
     *** True Line Result
    -  3140,260,3140,160
    -** Processing line: ~  3140,260,3140,380~
    +  7240,11060,7520,11060
    +** Processing line: ~  6940,11040,7240,11060~
     - Inside source: true
     *** True Line Result
    -  3140,260,3140,380
    -** Processing line: ~  3080,500,3140,380~
    +  6940,11040,7240,11060
    +** Processing line: ~  6640,11000,6940,11040~
     - Inside source: true
     *** True Line Result
    -  3080,500,3140,380
    -** Processing line: ~  3080,620,3080,500~
    +  6640,11000,6940,11040
    +** Processing line: ~  6420,10980,6640,11000~
     - Inside source: true
     *** True Line Result
    -  3080,620,3080,500
    -** Processing line: ~  3080,620,3080,740~
    +  6420,10980,6640,11000
    +** Processing line: ~  6360,11060,6420,10980~
     - Inside source: true
     *** True Line Result
    -  3080,620,3080,740
    -** Processing line: ~  3080,740,3080,840~
    +  6360,11060,6420,10980
    +** Processing line: ~  6360,11180,6360,11060~
     - Inside source: true
     *** True Line Result
    -  3080,740,3080,840
    -** Processing line: ~  3080,960,3080,840~
    +  6360,11180,6360,11060
    +** Processing line: ~  6200,11280,6360,11180~
     - Inside source: true
     *** True Line Result
    -  3080,960,3080,840
    -** Processing line: ~  3080,1080,3080,960~
    +  6200,11280,6360,11180
    +** Processing line: ~  5960,11300,6200,11280~
     - Inside source: true
     *** True Line Result
    -  3080,1080,3080,960
    -** Processing line: ~  3080,1080,3080,1200~
    +  5960,11300,6200,11280
    +** Processing line: ~  5720,11280,5960,11300~
     - Inside source: true
     *** True Line Result
    -  3080,1080,3080,1200
    -** Processing line: ~  3080,1200,3080,1340~
    +  5720,11280,5960,11300
    +** Processing line: ~  5500,11280,5720,11280~
     - Inside source: true
     *** True Line Result
    -  3080,1200,3080,1340
    -** Processing line: ~  3080,1340,3080,1460~
    +  5500,11280,5720,11280
    +** Processing line: ~  4940,11300,5200,11280~
     - Inside source: true
     *** True Line Result
    -  3080,1340,3080,1460
    -** Processing line: ~  3080,1580,3080,1460~
    +  4940,11300,5200,11280
    +** Processing line: ~  4660,11260,4940,11300~
     - Inside source: true
     *** True Line Result
    -  3080,1580,3080,1460
    -** Processing line: ~  3080,1700,3080,1580~
    +  4660,11260,4940,11300
    +** Processing line: ~  4440,11280,4660,11260~
     - Inside source: true
     *** True Line Result
    -  3080,1700,3080,1580
    -** Processing line: ~  3080,1700,3080,1760~
    +  4440,11280,4660,11260
    +** Processing line: ~  4260,11280,4440,11280~
     - Inside source: true
     *** True Line Result
    -  3080,1700,3080,1760
    -** Processing line: ~  3080,1760,3200,1760~
    +  4260,11280,4440,11280
    +** Processing line: ~  4220,11220,4260,11280~
     - Inside source: true
     *** True Line Result
    -  3080,1760,3200,1760
    -** Processing line: ~  3200,1760,3320,1760~
    +  4220,11220,4260,11280
    +** Processing line: ~  4080,11280,4220,11220~
     - Inside source: true
     *** True Line Result
    -  3200,1760,3320,1760
    -** Processing line: ~  3320,1760,3520,1760~
    +  4080,11280,4220,11220
    +** Processing line: ~  3980,11420,4080,11280~
     - Inside source: true
     *** True Line Result
    -  3320,1760,3520,1760
    -** Processing line: ~  3520,1760,3680,1740~
    +  3980,11420,4080,11280
    +** Processing line: ~  3980,11420,4040,11620~
     - Inside source: true
     *** True Line Result
    -  3520,1760,3680,1740
    -** Processing line: ~  3680,1740,3780,1700~
    +  3980,11420,4040,11620
    +** Processing line: ~  4040,11620,4040,11820~
     - Inside source: true
     *** True Line Result
    -  3680,1740,3780,1700
    -** Processing line: ~  3780,1700,3840,1620~
    +  4040,11620,4040,11820
    +** Processing line: ~  3980,11960,4040,11820~
     - Inside source: true
     *** True Line Result
    -  3780,1700,3840,1620
    -** Processing line: ~  3840,1620,3840,1520~
    +  3980,11960,4040,11820
    +** Processing line: ~  3840,12000,3980,11960~
     - Inside source: true
     *** True Line Result
    -  3840,1620,3840,1520
    -** Processing line: ~  3840,1520,3840,1420~
    +  3840,12000,3980,11960
    +** Processing line: ~  3720,11940,3840,12000~
     - Inside source: true
     *** True Line Result
    -  3840,1520,3840,1420
    -** Processing line: ~  3840,1320,3840,1420~
    +  3720,11940,3840,12000
    +** Processing line: ~  3680,11800,3720,11940~
     - Inside source: true
     *** True Line Result
    -  3840,1320,3840,1420
    -** Processing line: ~  3840,1120,3840,1320~
    +  3680,11800,3720,11940
    +** Processing line: ~  3680,11580,3680,11800~
     - Inside source: true
     *** True Line Result
    -  3840,1120,3840,1320
    -** Processing line: ~  3840,1120,3840,940~
    +  3680,11580,3680,11800
    +** Processing line: ~  3680,11360,3680,11580~
     - Inside source: true
     *** True Line Result
    -  3840,1120,3840,940
    -** Processing line: ~  3840,940,3840,760~
    +  3680,11360,3680,11580
    +** Processing line: ~  3680,11360,3680,11260~
     - Inside source: true
     *** True Line Result
    -  3840,940,3840,760
    -** Processing line: ~  3780,600,3840,760~
    +  3680,11360,3680,11260
    +** Processing line: ~  3680,11080,3680,11260~
     - Inside source: true
     *** True Line Result
    -  3780,600,3840,760
    -** Processing line: ~  3780,600,3780,440~
    +  3680,11080,3680,11260
    +** Processing line: ~  3680,11080,3680,10880~
     - Inside source: true
     *** True Line Result
    -  3780,600,3780,440
    -** Processing line: ~  3780,320,3780,440~
    +  3680,11080,3680,10880
    +** Processing line: ~  3680,10700,3680,10880~
     - Inside source: true
     *** True Line Result
    -  3780,320,3780,440
    -** Processing line: ~  3780,320,3780,160~
    +  3680,10700,3680,10880
    +** Processing line: ~  3680,10700,3680,10620~
     - Inside source: true
     *** True Line Result
    -  3780,320,3780,160
    -** Processing line: ~  3780,60,3780,160~
    +  3680,10700,3680,10620
    +** Processing line: ~  3680,10480,3680,10620~
     - Inside source: true
     *** True Line Result
    -  3780,60,3780,160
    -** Processing line: ~  3780,60,4020,60~
    +  3680,10480,3680,10620
    +** Processing line: ~  3680,10480,3680,10300~
     - Inside source: true
     *** True Line Result
    -  3780,60,4020,60
    -** Processing line: ~  4020,60,4260,40~
    +  3680,10480,3680,10300
    +** Processing line: ~  3680,10300,3680,10100~
     - Inside source: true
     *** True Line Result
    -  4020,60,4260,40
    -** Processing line: ~  4260,40,4500,40~
    +  3680,10300,3680,10100
    +** Processing line: ~  3680,10100,3680,9940~
     - Inside source: true
     *** True Line Result
    -  4260,40,4500,40
    -** Processing line: ~  4500,40,4740,40~
    +  3680,10100,3680,9940
    +** Processing line: ~  3680,9940,3720,9860~
     - Inside source: true
     *** True Line Result
    -  4500,40,4740,40
    -** Processing line: ~  4740,40,4840,20~
    +  3680,9940,3720,9860
    +** Processing line: ~  3720,9860,3920,9900~
     - Inside source: true
     *** True Line Result
    -  4740,40,4840,20
    -** Processing line: ~  4840,20,4880,80~
    +  3720,9860,3920,9900
    +** Processing line: ~  3920,9900,4220,9880~
     - Inside source: true
     *** True Line Result
    -  4840,20,4880,80
    -** Processing line: ~  4880,80,5080,40~
    +  3920,9900,4220,9880
    +** Processing line: ~  4980,9940,5340,9960~
     - Inside source: true
     *** True Line Result
    -  4880,80,5080,40
    -** Processing line: ~  5080,40,5280,20~
    +  4980,9940,5340,9960
    +** Processing line: ~  4220,9880,4540,9900~
     - Inside source: true
     *** True Line Result
    -  5080,40,5280,20
    -** Processing line: ~  5280,20,5500,0~
    +  4220,9880,4540,9900
    +** Processing line: ~  4540,9900,4980,9940~
     - Inside source: true
     *** True Line Result
    -  5280,20,5500,0
    -** Processing line: ~  5500,0,5720,0~
    +  4540,9900,4980,9940
    +** Processing line: ~  5340,9960,5620,9960~
     - Inside source: true
     *** True Line Result
    -  5500,0,5720,0
    -** Processing line: ~  5720,0,5940,60~
    +  5340,9960,5620,9960
    +** Processing line: ~  5620,9960,5900,9960~
     - Inside source: true
     *** True Line Result
    -  5720,0,5940,60
    -** Processing line: ~  5940,60,6240,60~
    +  5620,9960,5900,9960
    +** Processing line: ~  5900,9960,6160,10000~
     - Inside source: true
     *** True Line Result
    -  5940,60,6240,60
    -** Processing line: ~  6240,60,6540,20~
    +  5900,9960,6160,10000
    +** Processing line: ~  6160,10000,6480,10000~
     - Inside source: true
     *** True Line Result
    -  6240,60,6540,20
    -** Processing line: ~  6540,20,6840,20~
    +  6160,10000,6480,10000
    +** Processing line: ~  6480,10000,6720,10000~
     - Inside source: true
     *** True Line Result
    -  6540,20,6840,20
    -** Processing line: ~  6840,20,7040,0~
    +  6480,10000,6720,10000
    +** Processing line: ~  6720,10000,6880,9860~
     - Inside source: true
     *** True Line Result
    -  6840,20,7040,0
    -** Processing line: ~  7040,0,7140,0~
    +  6720,10000,6880,9860
    +** Processing line: ~  6880,9860,6880,9520~
     - Inside source: true
     *** True Line Result
    -  7040,0,7140,0
    -** Processing line: ~  7140,0,7400,20~
    +  6880,9860,6880,9520
    +** Processing line: ~  6880,9520,6940,9340~
     - Inside source: true
     *** True Line Result
    -  7140,0,7400,20
    -** Processing line: ~  7400,20,7680,0~
    +  6880,9520,6940,9340
    +** Processing line: ~  6940,9120,6940,9340~
     - Inside source: true
     *** True Line Result
    -  7400,20,7680,0
    -** Processing line: ~  7680,0,7940,0~
    +  6940,9120,6940,9340
    +** Processing line: ~  6940,9120,6940,8920~
     - Inside source: true
     *** True Line Result
    -  7680,0,7940,0
    -** Processing line: ~  7940,0,8200,-20~
    +  6940,9120,6940,8920
    +** Processing line: ~  6940,8700,6940,8920~
     - Inside source: true
     *** True Line Result
    -  7940,0,8200,-20
    -** Processing line: ~  8200,-20,8360,20~
    +  6940,8700,6940,8920
    +** Processing line: ~  6880,8500,6940,8700~
     - Inside source: true
     *** True Line Result
    -  8200,-20,8360,20
    -** Processing line: ~  8360,20,8560,-40~
    +  6880,8500,6940,8700
    +** Processing line: ~  6880,8320,6880,8500~
     - Inside source: true
     *** True Line Result
    -  8360,20,8560,-40
    -** Processing line: ~  8560,-40,8760,0~
    +  6880,8320,6880,8500
    +** Processing line: ~  7140,8320,7140,8180~
     - Inside source: true
     *** True Line Result
    -  8560,-40,8760,0
    -** Processing line: ~  8760,0,8880,40~
    +  7140,8320,7140,8180
    +** Processing line: ~  6760,8260,6880,8320~
     - Inside source: true
     *** True Line Result
    -  8760,0,8880,40
    -** Processing line: ~  8880,120,8880,40~
    +  6760,8260,6880,8320
    +** Processing line: ~  6540,8240,6760,8260~
     - Inside source: true
     *** True Line Result
    -  8880,120,8880,40
    -** Processing line: ~  8840,220,8840,120~
    +  6540,8240,6760,8260
    +** Processing line: ~  6420,8180,6540,8240~
     - Inside source: true
     *** True Line Result
    -  8840,220,8840,120
    -** Processing line: ~  8620,240,8840,220~
    +  6420,8180,6540,8240
    +** Processing line: ~  6280,8240,6420,8180~
     - Inside source: true
     *** True Line Result
    -  8620,240,8840,220
    -** Processing line: ~  8420,260,8620,240~
    +  6280,8240,6420,8180
    +** Processing line: ~  6160,8300,6280,8240~
     - Inside source: true
     *** True Line Result
    -  8420,260,8620,240
    -** Processing line: ~  8200,280,8420,260~
    +  6160,8300,6280,8240
    +** Processing line: ~  6120,8400,6160,8300~
     - Inside source: true
     *** True Line Result
    -  8200,280,8420,260
    -** Processing line: ~  7940,280,8200,280~
    +  6120,8400,6160,8300
    +** Processing line: ~  6080,8520,6120,8400~
     - Inside source: true
     *** True Line Result
    -  7940,280,8200,280
    -** Processing line: ~  7760,240,7940,280~
    +  6080,8520,6120,8400
    +** Processing line: ~  5840,8480,6080,8520~
     - Inside source: true
     *** True Line Result
    -  7760,240,7940,280
    -** Processing line: ~  7560,220,7760,240~
    +  5840,8480,6080,8520
    +** Processing line: ~  5620,8500,5840,8480~
     - Inside source: true
     *** True Line Result
    -  7560,220,7760,240
    -** Processing line: ~  7360,280,7560,220~
    +  5620,8500,5840,8480
    +** Processing line: ~  5500,8500,5620,8500~
     - Inside source: true
     *** True Line Result
    -  7360,280,7560,220
    -** Processing line: ~  7140,260,7360,280~
    +  5500,8500,5620,8500
    +** Processing line: ~  5340,8560,5500,8500~
     - Inside source: true
     *** True Line Result
    -  7140,260,7360,280
    -** Processing line: ~  6940,240,7140,260~
    +  5340,8560,5500,8500
    +** Processing line: ~  5160,8540,5340,8560~
     - Inside source: true
     *** True Line Result
    -  6940,240,7140,260
    -** Processing line: ~  6720,220,6940,240~
    +  5160,8540,5340,8560
    +** Processing line: ~  4620,8520,4880,8520~
     - Inside source: true
     *** True Line Result
    -  6720,220,6940,240
    -** Processing line: ~  6480,220,6720,220~
    +  4620,8520,4880,8520
    +** Processing line: ~  4360,8480,4620,8520~
     - Inside source: true
     *** True Line Result
    -  6480,220,6720,220
    -** Processing line: ~  6360,300,6480,220~
    +  4360,8480,4620,8520
    +** Processing line: ~  4880,8520,5160,8540~
     - Inside source: true
     *** True Line Result
    -  6360,300,6480,220
    -** Processing line: ~  6240,300,6360,300~
    +  4880,8520,5160,8540
    +** Processing line: ~  4140,8440,4360,8480~
     - Inside source: true
     *** True Line Result
    -  6240,300,6360,300
    -** Processing line: ~  6200,500,6240,300~
    +  4140,8440,4360,8480
    +** Processing line: ~  3920,8460,4140,8440~
     - Inside source: true
     *** True Line Result
    -  6200,500,6240,300
    -** Processing line: ~  6200,500,6360,540~
    +  3920,8460,4140,8440
    +** Processing line: ~  3720,8380,3920,8460~
     - Inside source: true
     *** True Line Result
    -  6200,500,6360,540
    -** Processing line: ~  6360,540,6540,520~
    +  3720,8380,3920,8460
    +** Processing line: ~  3680,8160,3720,8380~
     - Inside source: true
     *** True Line Result
    -  6360,540,6540,520
    -** Processing line: ~  6540,520,6720,480~
    +  3680,8160,3720,8380
    +** Processing line: ~  3680,8160,3720,7940~
     - Inside source: true
     *** True Line Result
    -  6540,520,6720,480
    -** Processing line: ~  6720,480,6880,460~
    +  3680,8160,3720,7940
    +** Processing line: ~  3720,7720,3720,7940~
     - Inside source: true
     *** True Line Result
    -  6720,480,6880,460
    -** Processing line: ~  6880,460,7080,500~
    +  3720,7720,3720,7940
    +** Processing line: ~  3680,7580,3720,7720~
     - Inside source: true
     *** True Line Result
    -  6880,460,7080,500
    -** Processing line: ~  7080,500,7320,500~
    +  3680,7580,3720,7720
    +** Processing line: ~  3680,7580,3720,7440~
     - Inside source: true
     *** True Line Result
    -  7080,500,7320,500
    -** Processing line: ~  7320,500,7680,500~
    +  3680,7580,3720,7440
    +** Processing line: ~  3720,7440,3720,7300~
     - Inside source: true
     *** True Line Result
    -  7320,500,7680,500
    -** Processing line: ~  7680,620,7680,500~
    +  3720,7440,3720,7300
    +** Processing line: ~  3720,7160,3720,7300~
     - Inside source: true
     *** True Line Result
    -  7680,620,7680,500
    -** Processing line: ~  7520,640,7680,620~
    +  3720,7160,3720,7300
    +** Processing line: ~  3720,7160,3720,7020~
     - Inside source: true
     *** True Line Result
    -  7520,640,7680,620
    -** Processing line: ~  7360,640,7520,640~
    +  3720,7160,3720,7020
    +** Processing line: ~  3720,7020,3780,6900~
     - Inside source: true
     *** True Line Result
    -  7360,640,7520,640
    -** Processing line: ~  7200,640,7360,640~
    +  3720,7020,3780,6900
    +** Processing line: ~  3780,6900,4080,6940~
     - Inside source: true
     *** True Line Result
    -  7200,640,7360,640
    -** Processing line: ~  7040,660,7200,640~
    +  3780,6900,4080,6940
    +** Processing line: ~  4080,6940,4340,6980~
     - Inside source: true
     *** True Line Result
    -  7040,660,7200,640
    -** Processing line: ~  6880,720,7040,660~
    +  4080,6940,4340,6980
    +** Processing line: ~  4340,6980,4600,6980~
     - Inside source: true
     *** True Line Result
    -  6880,720,7040,660
    -** Processing line: ~  6720,700,6880,720~
    +  4340,6980,4600,6980
    +** Processing line: ~  4600,6980,4880,6980~
     - Inside source: true
     *** True Line Result
    -  6720,700,6880,720
    -** Processing line: ~  6540,700,6720,700~
    +  4600,6980,4880,6980
    +** Processing line: ~  4880,6980,5160,6980~
     - Inside source: true
     *** True Line Result
    -  6540,700,6720,700
    -** Processing line: ~  6420,760,6540,700~
    +  4880,6980,5160,6980
    +** Processing line: ~  5160,6980,5400,7000~
     - Inside source: true
     *** True Line Result
    -  6420,760,6540,700
    -** Processing line: ~  6280,740,6420,760~
    +  5160,6980,5400,7000
    +** Processing line: ~  5400,7000,5560,7020~
     - Inside source: true
     *** True Line Result
    -  6280,740,6420,760
    -** Processing line: ~  6240,760,6280,740~
    +  5400,7000,5560,7020
    +** Processing line: ~  5560,7020,5660,7080~
     - Inside source: true
     *** True Line Result
    -  6240,760,6280,740
    -** Processing line: ~  6200,920,6240,760~
    +  5560,7020,5660,7080
    +** Processing line: ~  5660,7080,5660,7280~
     - Inside source: true
     *** True Line Result
    -  6200,920,6240,760
    -** Processing line: ~  6200,920,6360,960~
    +  5660,7080,5660,7280
    +** Processing line: ~  5660,7280,5660,7440~
     - Inside source: true
     *** True Line Result
    -  6200,920,6360,960
    -** Processing line: ~  6360,960,6540,960~
    +  5660,7280,5660,7440
    +** Processing line: ~  5660,7440,5740,7520~
     - Inside source: true
     *** True Line Result
    -  6360,960,6540,960
    -** Processing line: ~  6540,960,6720,960~
    +  5660,7440,5740,7520
    +** Processing line: ~  5740,7520,5740,7600~
     - Inside source: true
     *** True Line Result
    -  6540,960,6720,960
    -** Processing line: ~  6720,960,6760,980~
    +  5740,7520,5740,7600
    +** Processing line: ~  5740,7600,5900,7600~
     - Inside source: true
     *** True Line Result
    -  6720,960,6760,980
    -** Processing line: ~  6760,980,6880,940~
    +  5740,7600,5900,7600
    +** Processing line: ~  5900,7600,6040,7540~
     - Inside source: true
     *** True Line Result
    -  6760,980,6880,940
    -** Processing line: ~  6880,940,7080,940~
    +  5900,7600,6040,7540
    +** Processing line: ~  6040,7540,6040,7320~
     - Inside source: true
     *** True Line Result
    -  6880,940,7080,940
    -** Processing line: ~  7080,940,7280,940~
    +  6040,7540,6040,7320
    +** Processing line: ~  6040,7320,6120,7200~
     - Inside source: true
     *** True Line Result
    -  7080,940,7280,940
    -** Processing line: ~  7280,940,7520,920~
    +  6040,7320,6120,7200
    +** Processing line: ~  6120,7200,6120,7040~
     - Inside source: true
     *** True Line Result
    -  7280,940,7520,920
    -** Processing line: ~  7520,920,7760,900~
    +  6120,7200,6120,7040
    +** Processing line: ~  6120,7040,6240,7000~
     - Inside source: true
     *** True Line Result
    -  7520,920,7760,900
    -** Processing line: ~  7760,900,7980,860~
    +  6120,7040,6240,7000
    +** Processing line: ~  6240,7000,6480,7060~
     - Inside source: true
     *** True Line Result
    -  7760,900,7980,860
    -** Processing line: ~  7980,860,8100,880~
    +  6240,7000,6480,7060
    +** Processing line: ~  6480,7060,6800,7060~
     - Inside source: true
     *** True Line Result
    -  7980,860,8100,880
    -** Processing line: ~  8100,880,8280,900~
    +  6480,7060,6800,7060
    +** Processing line: ~  6800,7060,7080,7080~
     - Inside source: true
     *** True Line Result
    -  8100,880,8280,900
    -** Processing line: ~  8280,900,8500,820~
    +  6800,7060,7080,7080
    +** Processing line: ~  7080,7080,7320,7100~
     - Inside source: true
     *** True Line Result
    -  8280,900,8500,820
    -** Processing line: ~  8500,820,8700,820~
    +  7080,7080,7320,7100
    +** Processing line: ~  7940,7100,7980,6920~
     - Inside source: true
     *** True Line Result
    -  8500,820,8700,820
    -** Processing line: ~  8700,820,8760,840~
    +  7940,7100,7980,6920
    +** Processing line: ~  7860,6860,7980,6920~
     - Inside source: true
     *** True Line Result
    -  8700,820,8760,840
    -** Processing line: ~  8760,960,8760,840~
    +  7860,6860,7980,6920
    +** Processing line: ~  7640,6860,7860,6860~
     - Inside source: true
     *** True Line Result
    -  8760,960,8760,840
    -** Processing line: ~  8700,1040,8760,960~
    +  7640,6860,7860,6860
    +** Processing line: ~  7400,6840,7640,6860~
     - Inside source: true
     *** True Line Result
    -  8700,1040,8760,960
    -** Processing line: ~  8560,1060,8700,1040~
    +  7400,6840,7640,6860
    +** Processing line: ~  7320,7100,7560,7120~
     - Inside source: true
     *** True Line Result
    -  8560,1060,8700,1040
    -** Processing line: ~  8460,1080,8560,1060~
    +  7320,7100,7560,7120
    +** Processing line: ~  7560,7120,7760,7120~
     - Inside source: true
     *** True Line Result
    -  8460,1080,8560,1060
    -** Processing line: ~  8360,1040,8460,1080~
    +  7560,7120,7760,7120
    +** Processing line: ~  7760,7120,7940,7100~
     - Inside source: true
     *** True Line Result
    -  8360,1040,8460,1080
    -** Processing line: ~  8280,1080,8360,1040~
    +  7760,7120,7940,7100
    +** Processing line: ~  7200,6820,7400,6840~
     - Inside source: true
     *** True Line Result
    -  8280,1080,8360,1040
    -** Processing line: ~  8160,1120,8280,1080~
    +  7200,6820,7400,6840
    +** Processing line: ~  7040,6820,7200,6820~
     - Inside source: true
     *** True Line Result
    -  8160,1120,8280,1080
    -** Processing line: ~  8040,1120,8160,1120~
    +  7040,6820,7200,6820
    +** Processing line: ~  6600,6840,6840,6840~
     - Inside source: true
     *** True Line Result
    -  8040,1120,8160,1120
    -** Processing line: ~  7940,1100,8040,1120~
    +  6600,6840,6840,6840
    +** Processing line: ~  6380,6800,6600,6840~
     - Inside source: true
     *** True Line Result
    -  7940,1100,8040,1120
    -** Processing line: ~  7800,1120,7940,1100~
    +  6380,6800,6600,6840
    +** Processing line: ~  6120,6800,6380,6800~
     - Inside source: true
     *** True Line Result
    -  7800,1120,7940,1100
    -** Processing line: ~  7680,1120,7800,1120~
    +  6120,6800,6380,6800
    +** Processing line: ~  5900,6840,6120,6800~
     - Inside source: true
     *** True Line Result
    -  7680,1120,7800,1120
    -** Processing line: ~  7520,1100,7680,1120~
    +  5900,6840,6120,6800
    +** Processing line: ~  5620,6820,5900,6840~
     - Inside source: true
     *** True Line Result
    -  7520,1100,7680,1120
    -** Processing line: ~  7360,1100,7520,1100~
    +  5620,6820,5900,6840
    +** Processing line: ~  5400,6800,5620,6820~
     - Inside source: true
     *** True Line Result
    -  7360,1100,7520,1100
    -** Processing line: ~  7200,1120,7360,1100~
    +  5400,6800,5620,6820
    +** Processing line: ~  5140,6800,5400,6800~
     - Inside source: true
     *** True Line Result
    -  7200,1120,7360,1100
    -** Processing line: ~  7040,1180,7200,1120~
    +  5140,6800,5400,6800
    +** Processing line: ~  4880,6780,5140,6800~
     - Inside source: true
     *** True Line Result
    -  7040,1180,7200,1120
    -** Processing line: ~  6880,1160,7040,1180~
    +  4880,6780,5140,6800
    +** Processing line: ~  4600,6760,4880,6780~
     - Inside source: true
     *** True Line Result
    -  6880,1160,7040,1180
    -** Processing line: ~  6720,1160,6880,1160~
    +  4600,6760,4880,6780
    +** Processing line: ~  4340,6760,4600,6760~
     - Inside source: true
     *** True Line Result
    -  6720,1160,6880,1160
    -** Processing line: ~  6540,1160,6720,1160~
    +  4340,6760,4600,6760
    +** Processing line: ~  4080,6760,4340,6760~
     - Inside source: true
     *** True Line Result
    -  6540,1160,6720,1160
    -** Processing line: ~  6360,1160,6540,1160~
    +  4080,6760,4340,6760
    +** Processing line: ~  3840,6740,4080,6760~
     - Inside source: true
     *** True Line Result
    -  6360,1160,6540,1160
    -** Processing line: ~  6200,1160,6360,1160~
    +  3840,6740,4080,6760
    +** Processing line: ~  3680,6720,3840,6740~
     - Inside source: true
     *** True Line Result
    -  6200,1160,6360,1160
    -** Processing line: ~  6040,1220,6200,1160~
    +  3680,6720,3840,6740
    +** Processing line: ~  3680,6720,3680,6560~
     - Inside source: true
     *** True Line Result
    -  6040,1220,6200,1160
    -** Processing line: ~  6040,1220,6040,1400~
    +  3680,6720,3680,6560
    +** Processing line: ~  3680,6560,3720,6400~
     - Inside source: true
     *** True Line Result
    -  6040,1220,6040,1400
    -** Processing line: ~  6040,1400,6200,1440~
    +  3680,6560,3720,6400
    +** Processing line: ~  3720,6400,3720,6200~
     - Inside source: true
     *** True Line Result
    -  6040,1400,6200,1440
    -** Processing line: ~  6200,1440,6320,1440~
    +  3720,6400,3720,6200
    +** Processing line: ~  3720,6200,3780,6000~
     - Inside source: true
     *** True Line Result
    -  6200,1440,6320,1440
    -** Processing line: ~  6320,1440,6440,1440~
    +  3720,6200,3780,6000
    +** Processing line: ~  3720,5780,3780,6000~
     - Inside source: true
     *** True Line Result
    -  6320,1440,6440,1440
    -** Processing line: ~  6600,1440,6760,1440~
    +  3720,5780,3780,6000
    +** Processing line: ~  3720,5580,3720,5780~
     - Inside source: true
     *** True Line Result
    -  6600,1440,6760,1440
    -** Processing line: ~  6760,1440,6940,1420~
    +  3720,5580,3720,5780
    +** Processing line: ~  3720,5360,3720,5580~
     - Inside source: true
     *** True Line Result
    -  6760,1440,6940,1420
    -** Processing line: ~  6440,1440,6600,1440~
    +  3720,5360,3720,5580
    +** Processing line: ~  3720,5360,3840,5240~
     - Inside source: true
     *** True Line Result
    -  6440,1440,6600,1440
    -** Processing line: ~  6940,1420,7280,1400~
    +  3720,5360,3840,5240
    +** Processing line: ~  3840,5240,4200,5260~
     - Inside source: true
     *** True Line Result
    -  6940,1420,7280,1400
    -** Processing line: ~  7280,1400,7560,1400~
    +  3840,5240,4200,5260
    +** Processing line: ~  4200,5260,4600,5280~
     - Inside source: true
     *** True Line Result
    -  7280,1400,7560,1400
    -** Processing line: ~  7560,1400,7760,1400~
    +  4200,5260,4600,5280
    +** Processing line: ~  4600,5280,4880,5280~
     - Inside source: true
     *** True Line Result
    -  7560,1400,7760,1400
    -** Processing line: ~  7760,1400,7940,1360~
    +  4600,5280,4880,5280
    +** Processing line: ~  4880,5280,5140,5200~
     - Inside source: true
     *** True Line Result
    -  7760,1400,7940,1360
    -** Processing line: ~  7940,1360,8100,1380~
    +  4880,5280,5140,5200
    +** Processing line: ~  5140,5200,5220,5100~
     - Inside source: true
     *** True Line Result
    -  7940,1360,8100,1380
    -** Processing line: ~  8100,1380,8280,1340~
    +  5140,5200,5220,5100
    +** Processing line: ~  5220,5100,5280,4900~
     - Inside source: true
     *** True Line Result
    -  8100,1380,8280,1340
    -** Processing line: ~  8280,1340,8460,1320~
    +  5220,5100,5280,4900
    +** Processing line: ~  5280,4900,5340,4840~
     - Inside source: true
     *** True Line Result
    -  8280,1340,8460,1320
    -** Processing line: ~  8660,1300,8760,1360~
    +  5280,4900,5340,4840
    +** Processing line: ~  5340,4840,5720,4880~
     - Inside source: true
     *** True Line Result
    -  8660,1300,8760,1360
    -** Processing line: ~  8460,1320,8660,1300~
    +  5340,4840,5720,4880
    +** Processing line: ~  6120,4880,6480,4860~
     - Inside source: true
     *** True Line Result
    -  8460,1320,8660,1300
    -** Processing line: ~  8760,1360,8800,1500~
    +  6120,4880,6480,4860
    +** Processing line: ~  6880,4840,7200,4860~
     - Inside source: true
     *** True Line Result
    -  8760,1360,8800,1500
    -** Processing line: ~  8800,1660,8800,1500~
    +  6880,4840,7200,4860
    +** Processing line: ~  6480,4860,6880,4840~
     - Inside source: true
     *** True Line Result
    -  8800,1660,8800,1500
    -** Processing line: ~  8800,1660,8800,1820~
    +  6480,4860,6880,4840
    +** Processing line: ~  7200,4860,7320,4860~
     - Inside source: true
     *** True Line Result
    -  8800,1660,8800,1820
    -** Processing line: ~  8700,1840,8800,1820~
    +  7200,4860,7320,4860
    +** Processing line: ~  7320,4860,7360,4740~
     - Inside source: true
     *** True Line Result
    -  8700,1840,8800,1820
    -** Processing line: ~  8620,1860,8700,1840~
    +  7320,4860,7360,4740
    +** Processing line: ~  7360,4600,7440,4520~
     - Inside source: true
     *** True Line Result
    -  8620,1860,8700,1840
    -** Processing line: ~  8560,1800,8620,1860~
    +  7360,4600,7440,4520
    +** Processing line: ~  7360,4600,7360,4740~
     - Inside source: true
     *** True Line Result
    -  8560,1800,8620,1860
    -** Processing line: ~  8560,1800,8620,1680~
    +  7360,4600,7360,4740
    +** Processing line: ~  7440,4520,7640,4520~
     - Inside source: true
     *** True Line Result
    -  8560,1800,8620,1680
    -** Processing line: ~  8500,1640,8620,1680~
    +  7440,4520,7640,4520
    +** Processing line: ~  7640,4520,7800,4480~
     - Inside source: true
     *** True Line Result
    -  8500,1640,8620,1680
    -** Processing line: ~  8420,1680,8500,1640~
    +  7640,4520,7800,4480
    +** Processing line: ~  7800,4480,7800,4280~
     - Inside source: true
     *** True Line Result
    -  8420,1680,8500,1640
    -** Processing line: ~  8280,1680,8420,1680~
    +  7800,4480,7800,4280
    +** Processing line: ~  7800,4280,7800,4040~
     - Inside source: true
     *** True Line Result
    -  8280,1680,8420,1680
    -** Processing line: ~  8160,1680,8280,1680~
    +  7800,4280,7800,4040
    +** Processing line: ~  7800,4040,7800,3780~
     - Inside source: true
     *** True Line Result
    -  8160,1680,8280,1680
    -** Processing line: ~  7900,1680,8160,1680~
    +  7800,4040,7800,3780
    +** Processing line: ~  7800,3560,7800,3780~
     - Inside source: true
     *** True Line Result
    -  7900,1680,8160,1680
    -** Processing line: ~  7680,1680,7900,1680~
    +  7800,3560,7800,3780
    +** Processing line: ~  7800,3560,7860,3440~
     - Inside source: true
     *** True Line Result
    -  7680,1680,7900,1680
    -** Processing line: ~  7400,1660,7680,1680~
    +  7800,3560,7860,3440
    +** Processing line: ~  7860,3440,8060,3460~
     - Inside source: true
     *** True Line Result
    -  7400,1660,7680,1680
    -** Processing line: ~  7140,1680,7400,1660~
    +  7860,3440,8060,3460
    +** Processing line: ~  8060,3460,8160,3340~
     - Inside source: true
     *** True Line Result
    -  7140,1680,7400,1660
    -** Processing line: ~  6880,1640,7140,1680~
    +  8060,3460,8160,3340
    +** Processing line: ~  8160,3340,8160,3140~
     - Inside source: true
     *** True Line Result
    -  6880,1640,7140,1680
    -** Processing line: ~  6040,1820,6320,1780~
    +  8160,3340,8160,3140
    +** Processing line: ~  8160,3140,8160,2960~
     - Inside source: true
     *** True Line Result
    -  6040,1820,6320,1780
    -** Processing line: ~  5900,1840,6040,1820~
    +  8160,3140,8160,2960
    +** Processing line: ~  8000,2900,8160,2960~
     - Inside source: true
     *** True Line Result
    -  5900,1840,6040,1820
    -** Processing line: ~  6640,1700,6880,1640~
    +  8000,2900,8160,2960
    +** Processing line: ~  7860,2900,8000,2900~
     - Inside source: true
     *** True Line Result
    -  6640,1700,6880,1640
    -** Processing line: ~  6320,1780,6640,1700~
    +  7860,2900,8000,2900
    +** Processing line: ~  7640,2940,7860,2900~
     - Inside source: true
     *** True Line Result
    -  6320,1780,6640,1700
    -** Processing line: ~  5840,2040,5900,1840~
    +  7640,2940,7860,2900
    +** Processing line: ~  7400,2980,7640,2940~
     - Inside source: true
     *** True Line Result
    -  5840,2040,5900,1840
    -** Processing line: ~  5840,2040,5840,2220~
    +  7400,2980,7640,2940
    +** Processing line: ~  7100,2980,7400,2980~
     - Inside source: true
     *** True Line Result
    -  5840,2040,5840,2220
    -** Processing line: ~  5840,2220,5840,2320~
    +  7100,2980,7400,2980
    +** Processing line: ~  6840,3000,7100,2980~
     - Inside source: true
     *** True Line Result
    -  5840,2220,5840,2320
    -** Processing line: ~  5840,2460,5840,2320~
    +  6840,3000,7100,2980
    +** Processing line: ~  5620,2980,5840,2980~
     - Inside source: true
     *** True Line Result
    -  5840,2460,5840,2320
    -** Processing line: ~  5840,2560,5840,2460~
    +  5620,2980,5840,2980
    +** Processing line: ~  5840,2980,6500,3000~
     - Inside source: true
     *** True Line Result
    -  5840,2560,5840,2460
    -** Processing line: ~  5840,2560,5960,2620~
    +  5840,2980,6500,3000
    +** Processing line: ~  6500,3000,6840,3000~
     - Inside source: true
     *** True Line Result
    -  5840,2560,5960,2620
    -** Processing line: ~  5960,2620,6200,2620~
    +  6500,3000,6840,3000
    +** Processing line: ~  5560,2780,5620,2980~
     - Inside source: true
     *** True Line Result
    -  5960,2620,6200,2620
    -** Processing line: ~  6200,2620,6380,2600~
    +  5560,2780,5620,2980
    +** Processing line: ~  5560,2780,5560,2580~
     - Inside source: true
     *** True Line Result
    -  6200,2620,6380,2600
    -** Processing line: ~  6380,2600,6600,2580~
    +  5560,2780,5560,2580
    +** Processing line: ~  5560,2580,5560,2380~
     - Inside source: true
     *** True Line Result
    -  6380,2600,6600,2580
    -** Processing line: ~  6600,2580,6800,2600~
    +  5560,2580,5560,2380
    +** Processing line: ~  5560,2140,5560,2380~
     - Inside source: true
     *** True Line Result
    -  6600,2580,6800,2600
    -** Processing line: ~  6800,2600,7040,2580~
    +  5560,2140,5560,2380
    +** Processing line: ~  5560,2140,5560,1900~
     - Inside source: true
     *** True Line Result
    -  6800,2600,7040,2580
    -** Processing line: ~  7040,2580,7280,2580~
    +  5560,2140,5560,1900
    +** Processing line: ~  5560,1900,5620,1660~
     - Inside source: true
     *** True Line Result
    -  7040,2580,7280,2580
    -** Processing line: ~  7280,2580,7480,2560~
    +  5560,1900,5620,1660
    +** Processing line: ~  5620,1660,5660,1460~
     - Inside source: true
     *** True Line Result
    -  7280,2580,7480,2560
    -** Processing line: ~  7760,2540,7980,2520~
    +  5620,1660,5660,1460
    +** Processing line: ~  5660,1460,5660,1300~
     - Inside source: true
     *** True Line Result
    -  7760,2540,7980,2520
    -** Processing line: ~  7980,2520,8160,2500~
    +  5660,1460,5660,1300
    +** Processing line: ~  5500,1260,5660,1300~
     - Inside source: true
     *** True Line Result
    -  7980,2520,8160,2500
    -** Processing line: ~  7480,2560,7760,2540~
    +  5500,1260,5660,1300
    +** Processing line: ~  5340,1260,5500,1260~
     - Inside source: true
     *** True Line Result
    -  7480,2560,7760,2540
    -** Processing line: ~  8160,2500,8160,2420~
    +  5340,1260,5500,1260
    +** Processing line: ~  4600,1220,4840,1240~
     - Inside source: true
     *** True Line Result
    -  8160,2500,8160,2420
    -** Processing line: ~  8160,2420,8160,2320~
    +  4600,1220,4840,1240
    +** Processing line: ~  4440,1220,4600,1220~
     - Inside source: true
     *** True Line Result
    -  8160,2420,8160,2320
    -** Processing line: ~  8160,2180,8160,2320~
    +  4440,1220,4600,1220
    +** Processing line: ~  4440,1080,4440,1220~
     - Inside source: true
     *** True Line Result
    -  8160,2180,8160,2320
    -** Processing line: ~  7980,2160,8160,2180~
    +  4440,1080,4440,1220
    +** Processing line: ~  4440,1080,4600,1020~
     - Inside source: true
     *** True Line Result
    -  7980,2160,8160,2180
    -** Processing line: ~  7800,2180,7980,2160~
    +  4440,1080,4600,1020
    +** Processing line: ~  5080,1260,5340,1260~
     - Inside source: true
     *** True Line Result
    -  7800,2180,7980,2160
    -** Processing line: ~  7600,2200,7800,2180~
    +  5080,1260,5340,1260
    +** Processing line: ~  4840,1240,5080,1260~
     - Inside source: true
     *** True Line Result
    -  7600,2200,7800,2180
    -** Processing line: ~  7400,2200,7600,2200~
    +  4840,1240,5080,1260
    +** Processing line: ~  4600,1020,4940,1020~
     - Inside source: true
     *** True Line Result
    -  7400,2200,7600,2200
    -** Processing line: ~  6960,2200,7200,2200~
    +  4600,1020,4940,1020
    +** Processing line: ~  4940,1020,5220,1020~
     - Inside source: true
     *** True Line Result
    -  6960,2200,7200,2200
    -** Processing line: ~  7200,2200,7400,2200~
    +  4940,1020,5220,1020
    +** Processing line: ~  5220,1020,5560,960~
     - Inside source: true
     *** True Line Result
    -  7200,2200,7400,2200
    -** Processing line: ~  6720,2200,6960,2200~
    +  5220,1020,5560,960
    +** Processing line: ~  5560,960,5660,860~
     - Inside source: true
     *** True Line Result
    -  6720,2200,6960,2200
    -** Processing line: ~  6540,2180,6720,2200~
    +  5560,960,5660,860
    +** Processing line: ~  5660,740,5660,860~
     - Inside source: true
     *** True Line Result
    -  6540,2180,6720,2200
    -** Processing line: ~  6320,2200,6540,2180~
    +  5660,740,5660,860
    +** Processing line: ~  5280,740,5660,740~
     - Inside source: true
     *** True Line Result
    -  6320,2200,6540,2180
    -** Processing line: ~  6240,2160,6320,2200~
    +  5280,740,5660,740
    +** Processing line: ~  4940,780,5280,740~
     - Inside source: true
     *** True Line Result
    -  6240,2160,6320,2200
    -** Processing line: ~  6240,2160,6240,2040~
    +  4940,780,5280,740
    +** Processing line: ~  4660,760,4940,780~
     - Inside source: true
     *** True Line Result
    -  6240,2160,6240,2040
    -** Processing line: ~  6240,2040,6240,1940~
    +  4660,760,4940,780
    +** Processing line: ~  4500,700,4660,760~
     - Inside source: true
     *** True Line Result
    -  6240,2040,6240,1940
    -** Processing line: ~  6240,1940,6440,1940~
    +  4500,700,4660,760
    +** Processing line: ~  4500,520,4500,700~
     - Inside source: true
     *** True Line Result
    -  6240,1940,6440,1940
    -** Processing line: ~  6440,1940,6720,1940~
    +  4500,520,4500,700
    +** Processing line: ~  4500,520,4700,460~
     - Inside source: true
     *** True Line Result
    -  6440,1940,6720,1940
    -** Processing line: ~  6720,1940,6940,1920~
    +  4500,520,4700,460
    +** Processing line: ~  4700,460,5080,440~
     - Inside source: true
     *** True Line Result
    -  6720,1940,6940,1920
    -** Processing line: ~  7520,1920,7760,1920~
    +  4700,460,5080,440
    +** Processing line: ~  5440,420,5740,420~
     - Inside source: true
     *** True Line Result
    -  7520,1920,7760,1920
    -** Processing line: ~  6940,1920,7280,1920~
    +  5440,420,5740,420
    +** Processing line: ~  5080,440,5440,420~
     - Inside source: true
     *** True Line Result
    -  6940,1920,7280,1920
    -** Processing line: ~  7280,1920,7520,1920~
    +  5080,440,5440,420
    +** Processing line: ~  5740,420,5840,360~
     - Inside source: true
     *** True Line Result
    -  7280,1920,7520,1920
    -** Processing line: ~  7760,1920,8100,1900~
    +  5740,420,5840,360
    +** Processing line: ~  5800,280,5840,360~
     - Inside source: true
     *** True Line Result
    -  7760,1920,8100,1900
    -** Processing line: ~  8100,1900,8420,1900~
    +  5800,280,5840,360
    +** Processing line: ~  5560,280,5800,280~
     - Inside source: true
     *** True Line Result
    -  8100,1900,8420,1900
    -** Processing line: ~  8420,1900,8460,1940~
    +  5560,280,5800,280
    +** Processing line: ~  4980,300,5280,320~
     - Inside source: true
     *** True Line Result
    -  8420,1900,8460,1940
    -** Processing line: ~  8460,2120,8460,1940~
    +  4980,300,5280,320
    +** Processing line: ~  4360,320,4660,300~
     - Inside source: true
     *** True Line Result
    -  8460,2120,8460,1940
    -** Processing line: ~  8460,2280,8460,2120~
    +  4360,320,4660,300
    +** Processing line: ~  4200,360,4360,320~
     - Inside source: true
     *** True Line Result
    -  8460,2280,8460,2120
    -** Processing line: ~  8460,2280,8560,2420~
    +  4200,360,4360,320
    +** Processing line: ~  5280,320,5560,280~
     - Inside source: true
     *** True Line Result
    -  8460,2280,8560,2420
    -** Processing line: ~  8560,2420,8660,2380~
    +  5280,320,5560,280
    +** Processing line: ~  4660,300,4980,300~
     - Inside source: true
     *** True Line Result
    -  8560,2420,8660,2380
    -** Processing line: ~  8660,2380,8800,2340~
    +  4660,300,4980,300
    +** Processing line: ~  4140,480,4200,360~
     - Inside source: true
     *** True Line Result
    -  8660,2380,8800,2340
    -** Processing line: ~  8800,2340,8840,2400~
    +  4140,480,4200,360
    +** Processing line: ~  4140,480,4140,640~
     - Inside source: true
     *** True Line Result
    -  8800,2340,8840,2400
    -** Processing line: ~  8840,2520,8840,2400~
    +  4140,480,4140,640
    +** Processing line: ~  4140,640,4200,780~
     - Inside source: true
     *** True Line Result
    -  8840,2520,8840,2400
    -** Processing line: ~  8800,2620,8840,2520~
    +  4140,640,4200,780
    +** Processing line: ~  4200,780,4200,980~
     - Inside source: true
     *** True Line Result
    -  8800,2620,8840,2520
    -** Processing line: ~  8800,2740,8800,2620~
    +  4200,780,4200,980
    +** Processing line: ~  4200,980,4220,1180~
     - Inside source: true
     *** True Line Result
    -  8800,2740,8800,2620
    -** Processing line: ~  8800,2860,8800,2740~
    +  4200,980,4220,1180
    +** Processing line: ~  4220,1400,4220,1180~
     - Inside source: true
     *** True Line Result
    -  8800,2860,8800,2740
    -** Processing line: ~  8800,2940,8800,2860~
    +  4220,1400,4220,1180
    +** Processing line: ~  4220,1400,4260,1540~
     - Inside source: true
     *** True Line Result
    -  8800,2940,8800,2860
    -** Processing line: ~  8760,2980,8800,2940~
    +  4220,1400,4260,1540
    +** Processing line: ~  4260,1540,4500,1540~
     - Inside source: true
     *** True Line Result
    -  8760,2980,8800,2940
    -** Processing line: ~  8660,2980,8760,2980~
    +  4260,1540,4500,1540
    +** Processing line: ~  4500,1540,4700,1520~
     - Inside source: true
     *** True Line Result
    -  8660,2980,8760,2980
    -** Processing line: ~  8620,2960,8660,2980~
    +  4500,1540,4700,1520
    +** Processing line: ~  4700,1520,4980,1540~
     - Inside source: true
     *** True Line Result
    -  8620,2960,8660,2980
    -** Processing line: ~  8560,2880,8620,2960~
    +  4700,1520,4980,1540
    +** Processing line: ~  5280,1560,5400,1560~
     - Inside source: true
     *** True Line Result
    -  8560,2880,8620,2960
    -** Processing line: ~  8560,2880,8560,2780~
    +  5280,1560,5400,1560
    +** Processing line: ~  4980,1540,5280,1560~
     - Inside source: true
     *** True Line Result
    -  8560,2880,8560,2780
    -** Processing line: ~  8500,2740,8560,2780~
    +  4980,1540,5280,1560
    +** Processing line: ~  5400,1560,5400,1700~
     - Inside source: true
     *** True Line Result
    -  8500,2740,8560,2780
    -** Processing line: ~  8420,2760,8500,2740~
    +  5400,1560,5400,1700
    +** Processing line: ~  5400,1780,5400,1700~
     - Inside source: true
     *** True Line Result
    -  8420,2760,8500,2740
    -** Processing line: ~  8420,2840,8420,2760~
    +  5400,1780,5400,1700
    +** Processing line: ~  5340,1900,5400,1780~
     - Inside source: true
     *** True Line Result
    -  8420,2840,8420,2760
    -** Processing line: ~  8420,2840,8420,2940~
    +  5340,1900,5400,1780
    +** Processing line: ~  5340,2020,5340,1900~
     - Inside source: true
     *** True Line Result
    -  8420,2840,8420,2940
    -** Processing line: ~  8420,3040,8420,2940~
    +  5340,2020,5340,1900
    +** Processing line: ~  5340,2220,5340,2020~
     - Inside source: true
     *** True Line Result
    -  8420,3040,8420,2940
    -** Processing line: ~  8420,3160,8420,3040~
    +  5340,2220,5340,2020
    +** Processing line: ~  5340,2220,5340,2420~
     - Inside source: true
     *** True Line Result
    -  8420,3160,8420,3040
    -** Processing line: ~  8420,3280,8420,3380~
    +  5340,2220,5340,2420
    +** Processing line: ~  5340,2420,5340,2520~
     - Inside source: true
     *** True Line Result
    -  8420,3280,8420,3380
    -** Processing line: ~  8420,3280,8420,3160~
    +  5340,2420,5340,2520
    +** Processing line: ~  5080,2600,5220,2580~
     - Inside source: true
     *** True Line Result
    -  8420,3280,8420,3160
    -** Processing line: ~  8420,3380,8620,3460~
    +  5080,2600,5220,2580
    +** Processing line: ~  5220,2580,5340,2520~
     - Inside source: true
     *** True Line Result
    -  8420,3380,8620,3460
    -** Processing line: ~  8620,3460,8760,3460~
    +  5220,2580,5340,2520
    +** Processing line: ~  4900,2580,5080,2600~
     - Inside source: true
     *** True Line Result
    -  8620,3460,8760,3460
    -** Processing line: ~  8760,3460,8840,3400~
    +  4900,2580,5080,2600
    +** Processing line: ~  4700,2540,4900,2580~
     - Inside source: true
     *** True Line Result
    -  8760,3460,8840,3400
    -** Processing line: ~  8840,3400,8960,3400~
    +  4700,2540,4900,2580
    +** Processing line: ~  4500,2540,4700,2540~
     - Inside source: true
     *** True Line Result
    -  8840,3400,8960,3400
    -** Processing line: ~  8960,3400,9000,3500~
    +  4500,2540,4700,2540
    +** Processing line: ~  4220,2580,4340,2540~
     - Inside source: true
     *** True Line Result
    -  8960,3400,9000,3500
    -** Processing line: ~  9000,3700,9000,3500~
    +  4220,2580,4340,2540
    +** Processing line: ~  4200,2700,4220,2580~
     - Inside source: true
     *** True Line Result
    -  9000,3700,9000,3500
    -** Processing line: ~  9000,3900,9000,3700~
    +  4200,2700,4220,2580
    +** Processing line: ~  4340,2540,4500,2540~
     - Inside source: true
     *** True Line Result
    -  9000,3900,9000,3700
    -** Processing line: ~  9000,4080,9000,3900~
    +  4340,2540,4500,2540
    +** Processing line: ~  3980,2740,4200,2700~
     - Inside source: true
     *** True Line Result
    -  9000,4080,9000,3900
    -** Processing line: ~  9000,4280,9000,4080~
    +  3980,2740,4200,2700
    +** Processing line: ~  3840,2740,3980,2740~
     - Inside source: true
     *** True Line Result
    -  9000,4280,9000,4080
    -** Processing line: ~  9000,4500,9000,4280~
    +  3840,2740,3980,2740
    +** Processing line: ~  3780,2640,3840,2740~
     - Inside source: true
     *** True Line Result
    -  9000,4500,9000,4280
    -** Processing line: ~  9000,4620,9000,4500~
    +  3780,2640,3840,2740
    +** Processing line: ~  3780,2640,3780,2460~
     - Inside source: true
     *** True Line Result
    -  9000,4620,9000,4500
    -** Processing line: ~  9000,4780,9000,4620~
    +  3780,2640,3780,2460
    +** Processing line: ~  3780,2280,3780,2460~
     - Inside source: true
     *** True Line Result
    -  9000,4780,9000,4620
    -** Processing line: ~  9000,4780,9000,4960~
    +  3780,2280,3780,2460
    +** Processing line: ~  3620,2020,3780,2100~
     - Inside source: true
     *** True Line Result
    -  9000,4780,9000,4960
    -** Processing line: ~  9000,5120,9000,4960~
    +  3620,2020,3780,2100
    +** Processing line: ~  3780,2280,3780,2100~
     - Inside source: true
     *** True Line Result
    -  9000,5120,9000,4960
    -** Processing line: ~  9000,5120,9000,5300~
    +  3780,2280,3780,2100
    +** Processing line: ~  3360,2040,3620,2020~
     - Inside source: true
     *** True Line Result
    -  9000,5120,9000,5300
    -** Processing line: ~  8960,5460,9000,5300~
    +  3360,2040,3620,2020
    +** Processing line: ~  3080,2040,3360,2040~
     - Inside source: true
     *** True Line Result
    -  8960,5460,9000,5300
    -** Processing line: ~  8920,5620,8960,5460~
    +  3080,2040,3360,2040
    +** Processing line: ~  2840,2020,3080,2040~
     - Inside source: true
     *** True Line Result
    -  8920,5620,8960,5460
    -** Processing line: ~  8920,5620,8920,5800~
    +  2840,2020,3080,2040
    +** Processing line: ~  2740,1940,2840,2020~
     - Inside source: true
     *** True Line Result
    -  8920,5620,8920,5800
    -** Processing line: ~  8920,5800,8920,5960~
    +  2740,1940,2840,2020
    +** Processing line: ~  2740,1940,2800,1800~
     - Inside source: true
     *** True Line Result
    -  8920,5800,8920,5960
    -** Processing line: ~  8920,5960,8920,6120~
    +  2740,1940,2800,1800
    +** Processing line: ~  2800,1640,2800,1800~
     - Inside source: true
     *** True Line Result
    -  8920,5960,8920,6120
    -** Processing line: ~  8920,6120,8960,6300~
    +  2800,1640,2800,1800
    +** Processing line: ~  2800,1640,2800,1460~
     - Inside source: true
     *** True Line Result
    -  8920,6120,8960,6300
    -** Processing line: ~  8960,6300,8960,6480~
    +  2800,1640,2800,1460
    +** Processing line: ~  2800,1300,2800,1460~
     - Inside source: true
     *** True Line Result
    -  8960,6300,8960,6480
    -** Processing line: ~  8960,6660,8960,6480~
    +  2800,1300,2800,1460
    +** Processing line: ~  2700,1180,2800,1300~
     - Inside source: true
     *** True Line Result
    -  8960,6660,8960,6480
    -** Processing line: ~  8960,6860,8960,6660~
    +  2700,1180,2800,1300
    +** Processing line: ~  2480,1140,2700,1180~
     - Inside source: true
     *** True Line Result
    -  8960,6860,8960,6660
    -** Processing line: ~  8960,7040,8960,6860~
    +  2480,1140,2700,1180
    +** Processing line: ~  1580,1200,1720,1200~
     - Inside source: true
     *** True Line Result
    -  8960,7040,8960,6860
    -** Processing line: ~  8920,7420,8920,7220~
    +  1580,1200,1720,1200
    +** Processing line: ~  2240,1180,2480,1140~
     - Inside source: true
     *** True Line Result
    -  8920,7420,8920,7220
    -** Processing line: ~  8920,7420,8960,7620~
    +  2240,1180,2480,1140
    +** Processing line: ~  1960,1180,2240,1180~
     - Inside source: true
     *** True Line Result
    -  8920,7420,8960,7620
    -** Processing line: ~  8960,7620,8960,7800~
    +  1960,1180,2240,1180
    +** Processing line: ~  1720,1200,1960,1180~
     - Inside source: true
     *** True Line Result
    -  8960,7620,8960,7800
    -** Processing line: ~  8960,7800,8960,8000~
    +  1720,1200,1960,1180
    +** Processing line: ~  1500,1320,1580,1200~
     - Inside source: true
     *** True Line Result
    -  8960,7800,8960,8000
    -** Processing line: ~  8960,8000,8960,8180~
    +  1500,1320,1580,1200
    +** Processing line: ~  1500,1440,1500,1320~
     - Inside source: true
     *** True Line Result
    -  8960,8000,8960,8180
    -** Processing line: ~  8960,8180,8960,8380~
    +  1500,1440,1500,1320
    +** Processing line: ~  1500,1440,1760,1480~
     - Inside source: true
     *** True Line Result
    -  8960,8180,8960,8380
    -** Processing line: ~  8960,8580,8960,8380~
    +  1500,1440,1760,1480
    +** Processing line: ~  1760,1480,1940,1480~
     - Inside source: true
     *** True Line Result
    -  8960,8580,8960,8380
    -** Processing line: ~  8920,8800,8960,8580~
    +  1760,1480,1940,1480
    +** Processing line: ~  1940,1480,2140,1500~
     - Inside source: true
     *** True Line Result
    -  8920,8800,8960,8580
    -** Processing line: ~  8880,9000,8920,8800~
    +  1940,1480,2140,1500
    +** Processing line: ~  2140,1500,2320,1520~
     - Inside source: true
     *** True Line Result
    -  8880,9000,8920,8800
    -** Processing line: ~  8840,9180,8880,9000~
    +  2140,1500,2320,1520
    +** Processing line: ~  2400,1560,2400,1700~
     - Inside source: true
     *** True Line Result
    -  8840,9180,8880,9000
    -** Processing line: ~  8800,9220,8840,9180~
    +  2400,1560,2400,1700
    +** Processing line: ~  2280,1820,2380,1780~
     - Inside source: true
     *** True Line Result
    -  8800,9220,8840,9180
    -** Processing line: ~  8800,9220,8840,9340~
    +  2280,1820,2380,1780
    +** Processing line: ~  2320,1520,2400,1560~
     - Inside source: true
     *** True Line Result
    -  8800,9220,8840,9340
    -** Processing line: ~  8760,9380,8840,9340~
    +  2320,1520,2400,1560
    +** Processing line: ~  2380,1780,2400,1700~
     - Inside source: true
     *** True Line Result
    -  8760,9380,8840,9340
    -** Processing line: ~  8560,9340,8760,9380~
    +  2380,1780,2400,1700
    +** Processing line: ~  2080,1840,2280,1820~
     - Inside source: true
     *** True Line Result
    -  8560,9340,8760,9380
    -** Processing line: ~  8360,9360,8560,9340~
    +  2080,1840,2280,1820
    +** Processing line: ~  1720,1820,2080,1840~
     - Inside source: true
     *** True Line Result
    -  8360,9360,8560,9340
    -** Processing line: ~  8160,9360,8360,9360~
    +  1720,1820,2080,1840
    +** Processing line: ~  1420,1800,1720,1820~
     - Inside source: true
     *** True Line Result
    -  8160,9360,8360,9360
    -** Processing line: ~  8040,9340,8160,9360~
    +  1420,1800,1720,1820
    +** Processing line: ~  1280,1800,1420,1800~
     - Inside source: true
     *** True Line Result
    -  8040,9340,8160,9360
    -** Processing line: ~  7860,9360,8040,9340~
    +  1280,1800,1420,1800
    +** Processing line: ~  1240,1720,1280,1800~
     - Inside source: true
     *** True Line Result
    -  7860,9360,8040,9340
    -** Processing line: ~  7680,9360,7860,9360~
    +  1240,1720,1280,1800
    +** Processing line: ~  1240,1720,1240,1600~
     - Inside source: true
     *** True Line Result
    -  7680,9360,7860,9360
    -** Processing line: ~  7520,9360,7680,9360~
    +  1240,1720,1240,1600
    +** Processing line: ~  1240,1600,1280,1480~
     - Inside source: true
     *** True Line Result
    -  7520,9360,7680,9360
    -** Processing line: ~  7420,9260,7520,9360~
    +  1240,1600,1280,1480
    +** Processing line: ~  1280,1340,1280,1480~
     - Inside source: true
     *** True Line Result
    -  7420,9260,7520,9360
    -** Processing line: ~  7400,9080,7420,9260~
    +  1280,1340,1280,1480
    +** Processing line: ~  1180,1280,1280,1340~
     - Inside source: true
     *** True Line Result
    -  7400,9080,7420,9260
    -** Processing line: ~  7400,9080,7420,8860~
    +  1180,1280,1280,1340
    +** Processing line: ~  1000,1280,1180,1280~
     - Inside source: true
     *** True Line Result
    -  7400,9080,7420,8860
    -** Processing line: ~  7420,8860,7440,8720~
    +  1000,1280,1180,1280
    +** Processing line: ~  760,1280,1000,1280~
     - Inside source: true
     *** True Line Result
    -  7420,8860,7440,8720
    -** Processing line: ~  7440,8720,7480,8660~
    +  760,1280,1000,1280
    +** Processing line: ~  360,1240,540,1260~
     - Inside source: true
     *** True Line Result
    -  7440,8720,7480,8660
    -** Processing line: ~  7480,8660,7520,8540~
    +  360,1240,540,1260
    +** Processing line: ~  180,1220,360,1240~
     - Inside source: true
     *** True Line Result
    -  7480,8660,7520,8540
    -** Processing line: ~  7520,8540,7600,8460~
    +  180,1220,360,1240
    +** Processing line: ~  540,1260,760,1280~
     - Inside source: true
     *** True Line Result
    -  7520,8540,7600,8460
    -** Processing line: ~  7600,8460,7800,8480~
    +  540,1260,760,1280
    +** Processing line: ~  180,1080,180,1220~
     - Inside source: true
     *** True Line Result
    -  7600,8460,7800,8480
    -** Processing line: ~  7800,8480,8040,8480~
    +  180,1080,180,1220
    +** Processing line: ~  180,1080,180,1000~
     - Inside source: true
     *** True Line Result
    -  7800,8480,8040,8480
    -** Processing line: ~  8040,8480,8280,8480~
    +  180,1080,180,1000
    +** Processing line: ~  180,1000,360,940~
     - Inside source: true
     *** True Line Result
    -  8040,8480,8280,8480
    -** Processing line: ~  8280,8480,8500,8460~
    +  180,1000,360,940
    +** Processing line: ~  360,940,540,960~
     - Inside source: true
     *** True Line Result
    -  8280,8480,8500,8460
    -** Processing line: ~  8500,8460,8620,8440~
    +  360,940,540,960
    +** Processing line: ~  540,960,820,980~
     - Inside source: true
     *** True Line Result
    -  8500,8460,8620,8440
    -** Processing line: ~  8620,8440,8660,8340~
    +  540,960,820,980
    +** Processing line: ~  1100,980,1200,920~
     - Inside source: true
     *** True Line Result
    -  8620,8440,8660,8340
    -** Processing line: ~  8660,8340,8660,8220~
    +  1100,980,1200,920
    +** Processing line: ~  820,980,1100,980~
     - Inside source: true
     *** True Line Result
    -  8660,8340,8660,8220
    -** Processing line: ~  8660,8220,8700,8080~
    +  820,980,1100,980
    +** Processing line: ~  6640,11860,6940,11920~
     - Inside source: true
     *** True Line Result
    -  8660,8220,8700,8080
    -** Processing line: ~  8700,8080,8700,7920~
    +  6640,11860,6940,11920
    +** Processing line: ~  5200,11280,5500,11280~
     - Inside source: true
     *** True Line Result
    -  8700,8080,8700,7920
    -** Processing line: ~  8700,7920,8700,7760~
    +  5200,11280,5500,11280
    +** Processing line: ~  4120,7330,4120,7230~
     - Inside source: true
     *** True Line Result
    -  8700,7920,8700,7760
    -** Processing line: ~  8700,7760,8700,7620~
    +  4120,7330,4120,7230
    +** Processing line: ~  4120,7230,4660,7250~
     - Inside source: true
     *** True Line Result
    -  8700,7760,8700,7620
    -** Processing line: ~  8700,7480,8700,7620~
    +  4120,7230,4660,7250
    +** Processing line: ~  4660,7250,4940,7250~
     - Inside source: true
     *** True Line Result
    -  8700,7480,8700,7620
    -** Processing line: ~  8700,7480,8700,7320~
    +  4660,7250,4940,7250
    +** Processing line: ~  4940,7250,5050,7340~
     - Inside source: true
     *** True Line Result
    -  8700,7480,8700,7320
    -** Processing line: ~  8700,7160,8700,7320~
    +  4940,7250,5050,7340
    +** Processing line: ~  5010,7400,5050,7340~
     - Inside source: true
     *** True Line Result
    -  8700,7160,8700,7320
    -** Processing line: ~  8920,7220,8960,7040~
    +  5010,7400,5050,7340
    +** Processing line: ~  4680,7380,5010,7400~
     - Inside source: true
     *** True Line Result
    -  8920,7220,8960,7040
    -** Processing line: ~  8660,7040,8700,7160~
    +  4680,7380,5010,7400
    +** Processing line: ~  4380,7370,4680,7380~
     - Inside source: true
     *** True Line Result
    -  8660,7040,8700,7160
    -** Processing line: ~  8660,7040,8700,6880~
    +  4380,7370,4680,7380
    +** Processing line: ~  4120,7330,4360,7370~
     - Inside source: true
     *** True Line Result
    -  8660,7040,8700,6880
    -** Processing line: ~  8660,6700,8700,6880~
    +  4120,7330,4360,7370
    +** Processing line: ~  4120,7670,4120,7760~
     - Inside source: true
     *** True Line Result
    -  8660,6700,8700,6880
    -** Processing line: ~  8660,6700,8700,6580~
    +  4120,7670,4120,7760
    +** Processing line: ~  4120,7670,4280,7650~
     - Inside source: true
     *** True Line Result
    -  8660,6700,8700,6580
    -** Processing line: ~  8700,6460,8700,6580~
    +  4120,7670,4280,7650
    +** Processing line: ~  4280,7650,4540,7660~
     - Inside source: true
     *** True Line Result
    -  8700,6460,8700,6580
    -** Processing line: ~  8700,6460,8700,6320~
    +  4280,7650,4540,7660
    +** Processing line: ~  4550,7660,4820,7680~
     - Inside source: true
     *** True Line Result
    -  8700,6460,8700,6320
    -** Processing line: ~  8700,6160,8700,6320~
    +  4550,7660,4820,7680
    +** Processing line: ~  4820,7680,4900,7730~
     - Inside source: true
     *** True Line Result
    -  8700,6160,8700,6320
    -** Processing line: ~  8700,6160,8760,6020~
    +  4820,7680,4900,7730
    +** Processing line: ~  4880,7800,4900,7730~
     - Inside source: true
     *** True Line Result
    -  8700,6160,8760,6020
    -** Processing line: ~  8760,6020,8760,5860~
    +  4880,7800,4900,7730
    +** Processing line: ~  4620,7820,4880,7800~
     - Inside source: true
     *** True Line Result
    -  8760,6020,8760,5860
    -** Processing line: ~  8760,5860,8760,5700~
    +  4620,7820,4880,7800
    +** Processing line: ~  4360,7790,4620,7820~
     - Inside source: true
     *** True Line Result
    -  8760,5860,8760,5700
    -** Processing line: ~  8760,5700,8760,5540~
    +  4360,7790,4620,7820
    +** Processing line: ~  4120,7760,4360,7790~
     - Inside source: true
     *** True Line Result
    -  8760,5700,8760,5540
    -** Processing line: ~  8760,5540,8760,5360~
    +  4120,7760,4360,7790
    +** Processing line: ~  6840,6840,7040,6820~
     - Inside source: true
     *** True Line Result
    -  8760,5540,8760,5360
    -** Processing line: ~  8760,5360,8760,5180~
    +  6840,6840,7040,6820
    +** Processing line: ~  5720,4880,6120,4880~
     - Inside source: true
     *** True Line Result
    -  8760,5360,8760,5180
    -** Processing line: ~  8760,5000,8760,5180~
    +  5720,4880,6120,4880
    +** Processing line: ~  1200,920,1340,810~
     - Inside source: true
     *** True Line Result
    -  8760,5000,8760,5180
    -** Processing line: ~  8700,4820,8760,5000~
    +  1200,920,1340,810
    +** Processing line: ~  1340,810,1520,790~
     - Inside source: true
     *** True Line Result
    -  8700,4820,8760,5000
    -** Processing line: ~  8560,4740,8700,4820~
    +  1340,810,1520,790
    +** Processing line: ~  1520,790,1770,800~
     - Inside source: true
     *** True Line Result
    -  8560,4740,8700,4820
    -** Processing line: ~  8420,4700,8560,4740~
    +  1520,790,1770,800
    +** Processing line: ~  2400,790,2600,750~
     - Inside source: true
     *** True Line Result
    -  8420,4700,8560,4740
    -** Processing line: ~  8280,4700,8420,4700~
    +  2400,790,2600,750
    +** Processing line: ~  2600,750,2640,520~
     - Inside source: true
     *** True Line Result
    -  8280,4700,8420,4700
    -** Processing line: ~  8100,4700,8280,4700~
    +  2600,750,2640,520
    +** Processing line: ~  2520,470,2640,520~
     - Inside source: true
     *** True Line Result
    -  8100,4700,8280,4700
    -** Processing line: ~  7980,4700,8100,4700~
    +  2520,470,2640,520
    +** Processing line: ~  2140,470,2520,470~
     - Inside source: true
     *** True Line Result
    -  7980,4700,8100,4700
    -** Processing line: ~  7820,4740,7980,4700~
    +  2140,470,2520,470
    +** Processing line: ~  1760,800,2090,800~
     - Inside source: true
     *** True Line Result
    -  7820,4740,7980,4700
    -** Processing line: ~  7800,4920,7820,4740~
    +  1760,800,2090,800
    +** Processing line: ~  2080,800,2400,790~
     - Inside source: true
     *** True Line Result
    -  7800,4920,7820,4740
    -** Processing line: ~  7800,4920,7900,4960~
    +  2080,800,2400,790
    +** Processing line: ~  1760,450,2140,470~
     - Inside source: true
     *** True Line Result
    -  7800,4920,7900,4960
    -** Processing line: ~  7900,4960,8060,4980~
    +  1760,450,2140,470
    +** Processing line: ~  1420,450,1760,450~
     - Inside source: true
     *** True Line Result
    -  7900,4960,8060,4980
    -** Processing line: ~  8060,4980,8220,5000~
    +  1420,450,1760,450
    +** Processing line: ~  1180,440,1420,450~
     - Inside source: true
     *** True Line Result
    -  8060,4980,8220,5000
    -** Processing line: ~  8220,5000,8420,5040~
    +  1180,440,1420,450
    +** Processing line: ~  900,480,1180,440~
     - Inside source: true
     *** True Line Result
    -  8220,5000,8420,5040
    -** Processing line: ~  8420,5040,8460,5120~
    +  900,480,1180,440
    +** Processing line: ~  640,450,900,480~
     - Inside source: true
     *** True Line Result
    -  8420,5040,8460,5120
    -** Processing line: ~  8460,5180,8460,5120~
    +  640,450,900,480
    +** Processing line: ~  360,440,620,450~
     - Inside source: true
     *** True Line Result
    -  8460,5180,8460,5120
    -** Processing line: ~  8360,5200,8460,5180~
    +  360,440,620,450
    +** Processing line: ~  120,430,360,440~
     - Inside source: true
     *** True Line Result
    -  8360,5200,8460,5180
    -** Processing line: ~  8360,5280,8360,5200~
    +  120,430,360,440
    +** Processing line: ~  0,520,120,430~
     - Inside source: true
     *** True Line Result
    -  8360,5280,8360,5200
    -** Processing line: ~  8160,5300,8360,5280~
    +  0,520,120,430
    +** Processing line: ~  -20,780,0,520~
     - Inside source: true
     *** True Line Result
    -  8160,5300,8360,5280
    -** Processing line: ~  8040,5260,8160,5300~
    +  -20,780,0,520
    +** Processing line: ~  -20,780,-20,1020~
     - Inside source: true
     *** True Line Result
    -  8040,5260,8160,5300
    -** Processing line: ~  7860,5220,8040,5260~
    +  -20,780,-20,1020
    +** Processing line: ~  -20,1020,-20,1150~
     - Inside source: true
     *** True Line Result
    -  7860,5220,8040,5260
    -** Processing line: ~  7720,5160,7860,5220~
    +  -20,1020,-20,1150
    +** Processing line: ~  -20,1150,0,1300~
     - Inside source: true
     *** True Line Result
    -  7720,5160,7860,5220
    -** Processing line: ~  7640,5120,7720,5160~
    +  -20,1150,0,1300
    +** Processing line: ~  0,1470,60,1530~
     - Inside source: true
     *** True Line Result
    -  7640,5120,7720,5160
    -** Processing line: ~  7480,5120,7640,5120~
    +  0,1470,60,1530
    +** Processing line: ~  0,1300,0,1470~
     - Inside source: true
     *** True Line Result
    -  7480,5120,7640,5120
    -** Processing line: ~  7240,5120,7480,5120~
    +  0,1300,0,1470
    +** Processing line: ~  60,1530,360,1530~
     - Inside source: true
     *** True Line Result
    -  7240,5120,7480,5120
    -** Processing line: ~  7000,5120,7240,5120~
    +  60,1530,360,1530
    +** Processing line: ~  360,1530,660,1520~
     - Inside source: true
     *** True Line Result
    -  7000,5120,7240,5120
    -** Processing line: ~  6800,5160,7000,5120~
    +  360,1530,660,1520
    +** Processing line: ~  660,1520,980,1520~
     - Inside source: true
     *** True Line Result
    -  6800,5160,7000,5120
    -** Processing line: ~  6640,5220,6800,5160~
    +  660,1520,980,1520
    +** Processing line: ~  980,1520,1040,1520~
     - Inside source: true
     *** True Line Result
    -  6640,5220,6800,5160
    -** Processing line: ~  6600,5360,6640,5220~
    +  980,1520,1040,1520
    +** Processing line: ~  1040,1520,1070,1560~
     - Inside source: true
     *** True Line Result
    -  6600,5360,6640,5220
    -** Processing line: ~  6600,5460,6600,5360~
    +  1040,1520,1070,1560
    +** Processing line: ~  1070,1770,1070,1560~
     - Inside source: true
     *** True Line Result
    -  6600,5460,6600,5360
    -** Processing line: ~  6480,5520,6600,5460~
    +  1070,1770,1070,1560
    +** Processing line: ~  1070,1770,1100,2010~
     - Inside source: true
     *** True Line Result
    -  6480,5520,6600,5460
    -** Processing line: ~  6240,5540,6480,5520~
    +  1070,1770,1100,2010
    +** Processing line: ~  1070,2230,1100,2010~
     - Inside source: true
     *** True Line Result
    -  6240,5540,6480,5520
    -** Processing line: ~  5980,5540,6240,5540~
    +  1070,2230,1100,2010
    +** Processing line: ~  1070,2240,1180,2340~
     - Inside source: true
     *** True Line Result
    -  5980,5540,6240,5540
    -** Processing line: ~  5740,5540,5980,5540~
    +  1070,2240,1180,2340
    +** Processing line: ~  1180,2340,1580,2340~
     - Inside source: true
     *** True Line Result
    -  5740,5540,5980,5540
    -** Processing line: ~  5500,5520,5740,5540~
    +  1180,2340,1580,2340
    +** Processing line: ~  1580,2340,1940,2350~
     - Inside source: true
     *** True Line Result
    -  5500,5520,5740,5540
    -** Processing line: ~  5400,5520,5500,5520~
    +  1580,2340,1940,2350
    +** Processing line: ~  1940,2350,2440,2350~
     - Inside source: true
     *** True Line Result
    -  5400,5520,5500,5520
    -** Processing line: ~  5280,5540,5400,5520~
    +  1940,2350,2440,2350
    +** Processing line: ~  2440,2350,2560,2380~
     - Inside source: true
     *** True Line Result
    -  5280,5540,5400,5520
    -** Processing line: ~  5080,5540,5280,5540~
    +  2440,2350,2560,2380
    +** Processing line: ~  2560,2380,2600,2540~
     - Inside source: true
     *** True Line Result
    -  5080,5540,5280,5540
    -** Processing line: ~  4940,5540,5080,5540~
    +  2560,2380,2600,2540
    +** Processing line: ~  2810,2640,3140,2680~
     - Inside source: true
     *** True Line Result
    -  4940,5540,5080,5540
    -** Processing line: ~  4760,5540,4940,5540~
    +  2810,2640,3140,2680
    +** Processing line: ~  2600,2540,2810,2640~
     - Inside source: true
     *** True Line Result
    -  4760,5540,4940,5540
    -** Processing line: ~  4600,5540,4760,5540~
    +  2600,2540,2810,2640
    +** Processing line: ~  3140,2680,3230,2780~
     - Inside source: true
     *** True Line Result
    -  4600,5540,4760,5540
    -** Processing line: ~  4440,5560,4600,5540~
    +  3140,2680,3230,2780
    +** Processing line: ~  3230,2780,3260,2970~
     - Inside source: true
     *** True Line Result
    -  4440,5560,4600,5540
    -** Processing line: ~  4040,5580,4120,5520~
    +  3230,2780,3260,2970
    +** Processing line: ~  3230,3220,3260,2970~
     - Inside source: true
     *** True Line Result
    -  4040,5580,4120,5520
    -** Processing line: ~  4260,5540,4440,5560~
    +  3230,3220,3260,2970
    +** Processing line: ~  3200,3470,3230,3220~
     - Inside source: true
     *** True Line Result
    -  4260,5540,4440,5560
    -** Processing line: ~  4120,5520,4260,5540~
    +  3200,3470,3230,3220
    +** Processing line: ~  3200,3480,3210,3760~
     - Inside source: true
     *** True Line Result
    -  4120,5520,4260,5540
    -** Processing line: ~  4020,5720,4040,5580~
    +  3200,3480,3210,3760
    +** Processing line: ~  3210,3760,3210,4040~
     - Inside source: true
     *** True Line Result
    -  4020,5720,4040,5580
    -** Processing line: ~  4020,5840,4020,5720~
    +  3210,3760,3210,4040
    +** Processing line: ~  3200,4040,3230,4310~
     - Inside source: true
     *** True Line Result
    -  4020,5840,4020,5720
    -** Processing line: ~  4020,5840,4080,5940~
    +  3200,4040,3230,4310
    +** Processing line: ~  3210,4530,3230,4310~
     - Inside source: true
     *** True Line Result
    -  4020,5840,4080,5940
    -** Processing line: ~  4080,5940,4120,6040~
    +  3210,4530,3230,4310
    +** Processing line: ~  3210,4530,3230,4730~
     - Inside source: true
     *** True Line Result
    -  4080,5940,4120,6040
    -** Processing line: ~  4120,6040,4200,6080~
    +  3210,4530,3230,4730
    +** Processing line: ~  3230,4960,3230,4730~
     - Inside source: true
     *** True Line Result
    -  4120,6040,4200,6080
    -** Processing line: ~  4200,6080,4340,6080~
    +  3230,4960,3230,4730
    +** Processing line: ~  3230,4960,3260,5190~
     - Inside source: true
     *** True Line Result
    -  4200,6080,4340,6080
    -** Processing line: ~  4340,6080,4500,6060~
    +  3230,4960,3260,5190
    +** Processing line: ~  3170,5330,3260,5190~
     - Inside source: true
     *** True Line Result
    -  4340,6080,4500,6060
    -** Processing line: ~  4500,6060,4700,6060~
    +  3170,5330,3260,5190
    +** Processing line: ~  2920,5330,3170,5330~
     - Inside source: true
     *** True Line Result
    -  4500,6060,4700,6060
    -** Processing line: ~  4700,6060,4880,6060~
    +  2920,5330,3170,5330
    +** Processing line: ~  2660,5360,2920,5330~
     - Inside source: true
     *** True Line Result
    -  4700,6060,4880,6060
    -** Processing line: ~  4880,6060,5080,6060~
    +  2660,5360,2920,5330
    +** Processing line: ~  2420,5330,2660,5360~
     - Inside source: true
     *** True Line Result
    -  4880,6060,5080,6060
    -** Processing line: ~  5080,6060,5280,6080~
    +  2420,5330,2660,5360
    +** Processing line: ~  2200,5280,2400,5330~
     - Inside source: true
     *** True Line Result
    -  5080,6060,5280,6080
    -** Processing line: ~  5280,6080,5440,6100~
    +  2200,5280,2400,5330
    +** Processing line: ~  2020,5280,2200,5280~
     - Inside source: true
     *** True Line Result
    -  5280,6080,5440,6100
    -** Processing line: ~  5440,6100,5660,6100~
    +  2020,5280,2200,5280
    +** Processing line: ~  1840,5260,2020,5280~
     - Inside source: true
     *** True Line Result
    -  5440,6100,5660,6100
    -** Processing line: ~  5660,6100,5900,6080~
    +  1840,5260,2020,5280
    +** Processing line: ~  1660,5280,1840,5260~
     - Inside source: true
     *** True Line Result
    -  5660,6100,5900,6080
    -** Processing line: ~  5900,6080,6120,6080~
    +  1660,5280,1840,5260
    +** Processing line: ~  1500,5300,1660,5280~
     - Inside source: true
     *** True Line Result
    -  5900,6080,6120,6080
    -** Processing line: ~  6120,6080,6360,6080~
    +  1500,5300,1660,5280
    +** Processing line: ~  1360,5270,1500,5300~
     - Inside source: true
     *** True Line Result
    -  6120,6080,6360,6080
    -** Processing line: ~  6360,6080,6480,6100~
    +  1360,5270,1500,5300
    +** Processing line: ~  1200,5290,1340,5270~
     - Inside source: true
     *** True Line Result
    -  6360,6080,6480,6100
    -** Processing line: ~  6480,6100,6540,6060~
    +  1200,5290,1340,5270
    +** Processing line: ~  1070,5400,1200,5290~
     - Inside source: true
     *** True Line Result
    -  6480,6100,6540,6060
    -** Processing line: ~  6540,6060,6720,6060~
    +  1070,5400,1200,5290
    +** Processing line: ~  1040,5630,1070,5400~
     - Inside source: true
     *** True Line Result
    -  6540,6060,6720,6060
    -** Processing line: ~  6720,6060,6940,6060~
    +  1040,5630,1070,5400
    +** Processing line: ~  1000,5900,1040,5630~
     - Inside source: true
     *** True Line Result
    -  6720,6060,6940,6060
    -** Processing line: ~  6940,6060,7140,6060~
    +  1000,5900,1040,5630
    +** Processing line: ~  980,6170,1000,5900~
     - Inside source: true
     *** True Line Result
    -  6940,6060,7140,6060
    -** Processing line: ~  7400,6060,7600,6060~
    +  980,6170,1000,5900
    +** Processing line: ~  980,6280,980,6170~
     - Inside source: true
     *** True Line Result
    -  7400,6060,7600,6060
    -** Processing line: ~  7140,6060,7400,6060~
    +  980,6280,980,6170
    +** Processing line: ~  980,6540,980,6280~
     - Inside source: true
     *** True Line Result
    -  7140,6060,7400,6060
    -** Processing line: ~  7600,6060,7800,6060~
    +  980,6540,980,6280
    +** Processing line: ~  980,6540,1040,6720~
     - Inside source: true
     *** True Line Result
    -  7600,6060,7800,6060
    -** Processing line: ~  7800,6060,7860,6080~
    +  980,6540,1040,6720
    +** Processing line: ~  1040,6720,1360,6730~
     - Inside source: true
     *** True Line Result
    -  7800,6060,7860,6080
    -** Processing line: ~  7860,6080,8060,6080~
    +  1040,6720,1360,6730
    +** Processing line: ~  1360,6730,1760,6710~
     - Inside source: true
     *** True Line Result
    -  7860,6080,8060,6080
    -** Processing line: ~  8060,6080,8220,6080~
    +  1360,6730,1760,6710
    +** Processing line: ~  2110,6720,2420,6730~
     - Inside source: true
     *** True Line Result
    -  8060,6080,8220,6080
    -** Processing line: ~  8220,6080,8320,6140~
    +  2110,6720,2420,6730
    +** Processing line: ~  1760,6710,2110,6720~
     - Inside source: true
     *** True Line Result
    -  8220,6080,8320,6140
    -** Processing line: ~  8320,6140,8360,6300~
    +  1760,6710,2110,6720
    +** Processing line: ~  2420,6730,2640,6720~
     - Inside source: true
     *** True Line Result
    -  8320,6140,8360,6300
    -** Processing line: ~  8320,6460,8360,6300~
    +  2420,6730,2640,6720
    +** Processing line: ~  2640,6720,2970,6720~
     - Inside source: true
     *** True Line Result
    -  8320,6460,8360,6300
    -** Processing line: ~  8320,6620,8320,6460~
    +  2640,6720,2970,6720
    +** Processing line: ~  2970,6720,3160,6700~
     - Inside source: true
     *** True Line Result
    -  8320,6620,8320,6460
    -** Processing line: ~  8320,6800,8320,6620~
    +  2970,6720,3160,6700
    +** Processing line: ~  3160,6700,3240,6710~
     - Inside source: true
     *** True Line Result
    -  8320,6800,8320,6620
    -** Processing line: ~  8320,6960,8320,6800~
    +  3160,6700,3240,6710
    +** Processing line: ~  3240,6710,3260,6890~
     - Inside source: true
     *** True Line Result
    -  8320,6960,8320,6800
    -** Processing line: ~  8320,6960,8360,7120~
    +  3240,6710,3260,6890
    +** Processing line: ~  3260,7020,3260,6890~
     - Inside source: true
     *** True Line Result
    -  8320,6960,8360,7120
    -** Processing line: ~  8320,7280,8360,7120~
    +  3260,7020,3260,6890
    +** Processing line: ~  3230,7180,3260,7020~
     - Inside source: true
     *** True Line Result
    -  8320,7280,8360,7120
    -** Processing line: ~  8320,7440,8320,7280~
    +  3230,7180,3260,7020
    +** Processing line: ~  3230,7350,3230,7180~
     - Inside source: true
     *** True Line Result
    -  8320,7440,8320,7280
    -** Processing line: ~  8320,7600,8320,7440~
    +  3230,7350,3230,7180
    +** Processing line: ~  3210,7510,3230,7350~
     - Inside source: true
     *** True Line Result
    -  8320,7600,8320,7440
    -** Processing line: ~  8100,7580,8220,7600~
    +  3210,7510,3230,7350
    +** Processing line: ~  3210,7510,3210,7690~
     - Inside source: true
     *** True Line Result
    -  8100,7580,8220,7600
    -** Processing line: ~  8220,7600,8320,7600~
    +  3210,7510,3210,7690
    +** Processing line: ~  3210,7870,3210,7690~
     - Inside source: true
     *** True Line Result
    -  8220,7600,8320,7600
    -** Processing line: ~  7900,7560,8100,7580~
    +  3210,7870,3210,7690
    +** Processing line: ~  3210,7870,3210,7980~
     - Inside source: true
     *** True Line Result
    -  7900,7560,8100,7580
    -** Processing line: ~  7680,7560,7900,7560~
    +  3210,7870,3210,7980
    +** Processing line: ~  3200,8120,3210,7980~
     - Inside source: true
     *** True Line Result
    -  7680,7560,7900,7560
    -** Processing line: ~  7480,7580,7680,7560~
    +  3200,8120,3210,7980
    +** Processing line: ~  3200,8330,3200,8120~
     - Inside source: true
     *** True Line Result
    -  7480,7580,7680,7560
    -** Processing line: ~  7280,7580,7480,7580~
    +  3200,8330,3200,8120
    +** Processing line: ~  3160,8520,3200,8330~
     - Inside source: true
     *** True Line Result
    -  7280,7580,7480,7580
    -** Processing line: ~  7080,7580,7280,7580~
    +  3160,8520,3200,8330
    +** Processing line: ~  2460,11100,2480,11020~
     - Inside source: true
     *** True Line Result
    -  7080,7580,7280,7580
    -** Processing line: ~  7000,7600,7080,7580~
    +  2460,11100,2480,11020
    +** Processing line: ~  2200,11180,2460,11100~
     - Inside source: true
     *** True Line Result
    -  7000,7600,7080,7580
    -** Processing line: ~  6880,7600,7000,7600~
    +  2200,11180,2460,11100
    +** Processing line: ~  1260,11350,1600,11320~
     - Inside source: true
     *** True Line Result
    -  6880,7600,7000,7600
    -** Processing line: ~  6800,7580,6880,7600~
    +  1260,11350,1600,11320
    +** Processing line: ~  600,11430,930,11400~
     - Inside source: true
     *** True Line Result
    -  6800,7580,6880,7600
    -** Processing line: ~  6640,7580,6800,7580~
    +  600,11430,930,11400
    +** Processing line: ~  180,11340,620,11430~
     - Inside source: true
     *** True Line Result
    -  6640,7580,6800,7580
    -** Processing line: ~  6540,7580,6640,7580~
    +  180,11340,620,11430
    +** Processing line: ~  1600,11320,1910,11280~
     - Inside source: true
     *** True Line Result
    -  6540,7580,6640,7580
    -** Processing line: ~  6380,7600,6540,7580~
    +  1600,11320,1910,11280
    +** Processing line: ~  1910,11280,2200,11180~
     - Inside source: true
     *** True Line Result
    -  6380,7600,6540,7580
    -** Processing line: ~  6280,7620,6380,7600~
    +  1910,11280,2200,11180
    +** Processing line: ~  923.0029599285435,11398.99893503157,1264.002959928544,11351.99893503157~
     - Inside source: true
     *** True Line Result
    -  6280,7620,6380,7600
    -** Processing line: ~  6240,7700,6280,7620~
    +  923.0029599285435,11398.99893503157,1264.002959928544,11351.99893503157
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
    +*** True Line Result
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +
    +** Processing line: ~*** Platformer - The Little Probe - Data - level_lava.txt~
    +- Header detected.
    +*** True Line Result
    +
    +*** True Line Result
    +*** Platformer - The Little Probe - Data - level_lava.txt
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/99_genre_platformer/the_little_probe/data/level_lava.txt~
     - Inside source: true
     *** True Line Result
    -  6240,7700,6280,7620
    -** Processing line: ~  6240,7700,6240,7800~
    +  # ./samples/99_genre_platformer/the_little_probe/data/level_lava.txt
    +** Processing line: ~  100,10740,500,10780~
     - Inside source: true
     *** True Line Result
    -  6240,7700,6240,7800
    -** Processing line: ~  6240,7840,6240,7800~
    +  100,10740,500,10780
    +** Processing line: ~  500,10780,960,10760~
     - Inside source: true
     *** True Line Result
    -  6240,7840,6240,7800
    -** Processing line: ~  6080,7840,6240,7840~
    +  500,10780,960,10760
    +** Processing line: ~  960,10760,1340,10760~
     - Inside source: true
     *** True Line Result
    -  6080,7840,6240,7840
    -** Processing line: ~  5960,7820,6080,7840~
    +  960,10760,1340,10760
    +** Processing line: ~  1380,10760,1820,10780~
     - Inside source: true
     *** True Line Result
    -  5960,7820,6080,7840
    -** Processing line: ~  5660,7840,5800,7840~
    +  1380,10760,1820,10780
    +** Processing line: ~  1820,10780,2240,10780~
     - Inside source: true
     *** True Line Result
    -  5660,7840,5800,7840
    -** Processing line: ~  5500,7800,5660,7840~
    +  1820,10780,2240,10780
    +** Processing line: ~  2280,10780,2740,10740~
     - Inside source: true
     *** True Line Result
    -  5500,7800,5660,7840
    -** Processing line: ~  5440,7700,5500,7800~
    +  2280,10780,2740,10740
    +** Processing line: ~  2740,10740,3000,10780~
     - Inside source: true
     *** True Line Result
    -  5440,7700,5500,7800
    -** Processing line: ~  5800,7840,5960,7820~
    +  2740,10740,3000,10780
    +** Processing line: ~  3000,10780,3140,11020~
     - Inside source: true
     *** True Line Result
    -  5800,7840,5960,7820
    -** Processing line: ~  5440,7540,5440,7700~
    +  3000,10780,3140,11020
    +** Processing line: ~  -520,8820,-480,9160~
     - Inside source: true
     *** True Line Result
    -  5440,7540,5440,7700
    -** Processing line: ~  5440,7440,5440,7540~
    +  -520,8820,-480,9160
    +** Processing line: ~  -520,8480,-520,8820~
     - Inside source: true
     *** True Line Result
    -  5440,7440,5440,7540
    -** Processing line: ~  5440,7320,5440,7440~
    +  -520,8480,-520,8820
    +** Processing line: ~  -520,8480,-480,8180~
     - Inside source: true
     *** True Line Result
    -  5440,7320,5440,7440
    -** Processing line: ~  5400,7320,5440,7320~
    +  -520,8480,-480,8180
    +** Processing line: ~  -480,8180,-200,8120~
     - Inside source: true
     *** True Line Result
    -  5400,7320,5440,7320
    -** Processing line: ~  5340,7400,5400,7320~
    +  -480,8180,-200,8120
    +** Processing line: ~  -200,8120,100,8220~
     - Inside source: true
     *** True Line Result
    -  5340,7400,5400,7320
    -** Processing line: ~  5340,7400,5340,7500~
    +  -200,8120,100,8220
    +** Processing line: ~  100,8220,420,8240~
     - Inside source: true
     *** True Line Result
    -  5340,7400,5340,7500
    -** Processing line: ~  5340,7600,5340,7500~
    +  100,8220,420,8240
    +** Processing line: ~  420,8240,760,8260~
     - Inside source: true
     *** True Line Result
    -  5340,7600,5340,7500
    -** Processing line: ~  5340,7600,5340,7720~
    +  420,8240,760,8260
    +** Processing line: ~  760,8260,1140,8280~
     - Inside source: true
     *** True Line Result
    -  5340,7600,5340,7720
    -** Processing line: ~  5340,7720,5340,7860~
    +  760,8260,1140,8280
    +** Processing line: ~  1140,8280,1500,8200~
     - Inside source: true
     *** True Line Result
    -  5340,7720,5340,7860
    -** Processing line: ~  5340,7860,5340,7960~
    +  1140,8280,1500,8200
    +** Processing line: ~  1500,8200,1880,8240~
     - Inside source: true
     *** True Line Result
    -  5340,7860,5340,7960
    -** Processing line: ~  5340,7960,5440,8020~
    +  1500,8200,1880,8240
    +** Processing line: ~  1880,8240,2240,8260~
     - Inside source: true
     *** True Line Result
    -  5340,7960,5440,8020
    -** Processing line: ~  5440,8020,5560,8020~
    +  1880,8240,2240,8260
    +** Processing line: ~  2240,8260,2320,8480~
     - Inside source: true
     *** True Line Result
    -  5440,8020,5560,8020
    -** Processing line: ~  5560,8020,5720,8040~
    +  2240,8260,2320,8480
    +** Processing line: ~  2320,8480,2380,8680~
     - Inside source: true
     *** True Line Result
    -  5560,8020,5720,8040
    -** Processing line: ~  5720,8040,5900,8060~
    +  2320,8480,2380,8680
    +** Processing line: ~  2240,8860,2380,8680~
     - Inside source: true
     *** True Line Result
    -  5720,8040,5900,8060
    -** Processing line: ~  5900,8060,6080,8060~
    +  2240,8860,2380,8680
    +** Processing line: ~  2240,9080,2240,8860~
     - Inside source: true
     *** True Line Result
    -  5900,8060,6080,8060
    -** Processing line: ~  6080,8060,6240,8060~
    +  2240,9080,2240,8860
    +** Processing line: ~  2240,9080,2320,9260~
     - Inside source: true
     *** True Line Result
    -  6080,8060,6240,8060
    -** Processing line: ~  6720,8040,6840,8060~
    +  2240,9080,2320,9260
    +** Processing line: ~  2320,9260,2480,9440~
     - Inside source: true
     *** True Line Result
    -  6720,8040,6840,8060
    -** Processing line: ~  6240,8060,6480,8040~
    +  2320,9260,2480,9440
    +** Processing line: ~  2480,9440,2600,9640~
     - Inside source: true
     *** True Line Result
    -  6240,8060,6480,8040
    -** Processing line: ~  6480,8040,6720,8040~
    +  2480,9440,2600,9640
    +** Processing line: ~  2480,9840,2600,9640~
     - Inside source: true
     *** True Line Result
    -  6480,8040,6720,8040
    -** Processing line: ~  6840,8060,6940,8060~
    +  2480,9840,2600,9640
    +** Processing line: ~  2400,10020,2480,9840~
     - Inside source: true
     *** True Line Result
    -  6840,8060,6940,8060
    -** Processing line: ~  6940,8060,7080,8120~
    +  2400,10020,2480,9840
    +** Processing line: ~  2240,10080,2400,10020~
     - Inside source: true
     *** True Line Result
    -  6940,8060,7080,8120
    -** Processing line: ~  7080,8120,7140,8180~
    +  2240,10080,2400,10020
    +** Processing line: ~  1960,10080,2240,10080~
     - Inside source: true
     *** True Line Result
    -  7080,8120,7140,8180
    -** Processing line: ~  7140,8460,7140,8320~
    +  1960,10080,2240,10080
    +** Processing line: ~  1720,10080,1960,10080~
     - Inside source: true
     *** True Line Result
    -  7140,8460,7140,8320
    -** Processing line: ~  7140,8620,7140,8460~
    +  1720,10080,1960,10080
    +** Processing line: ~  1460,10080,1720,10080~
     - Inside source: true
     *** True Line Result
    -  7140,8620,7140,8460
    -** Processing line: ~  7140,8620,7140,8740~
    +  1460,10080,1720,10080
    +** Processing line: ~  1180,10080,1420,10080~
     - Inside source: true
     *** True Line Result
    -  7140,8620,7140,8740
    -** Processing line: ~  7140,8860,7140,8740~
    +  1180,10080,1420,10080
    +** Processing line: ~  900,10080,1180,10080~
     - Inside source: true
     *** True Line Result
    -  7140,8860,7140,8740
    -** Processing line: ~  7140,8960,7140,8860~
    +  900,10080,1180,10080
    +** Processing line: ~  640,10080,900,10080~
     - Inside source: true
     *** True Line Result
    -  7140,8960,7140,8860
    -** Processing line: ~  7140,8960,7200,9080~
    +  640,10080,900,10080
    +** Processing line: ~  640,10080,640,9900~
     - Inside source: true
     *** True Line Result
    -  7140,8960,7200,9080
    -** Processing line: ~  7140,9200,7200,9080~
    +  640,10080,640,9900
    +** Processing line: ~  60,10520,100,10740~
     - Inside source: true
     *** True Line Result
    -  7140,9200,7200,9080
    -** Processing line: ~  7140,9200,7200,9320~
    +  60,10520,100,10740
    +** Processing line: ~  40,10240,60,10520~
     - Inside source: true
     *** True Line Result
    -  7140,9200,7200,9320
    -** Processing line: ~  7200,9320,7200,9460~
    +  40,10240,60,10520
    +** Processing line: ~  40,10240,40,9960~
     - Inside source: true
     *** True Line Result
    -  7200,9320,7200,9460
    -** Processing line: ~  7200,9760,7200,9900~
    +  40,10240,40,9960
    +** Processing line: ~  40,9960,40,9680~
     - Inside source: true
     *** True Line Result
    -  7200,9760,7200,9900
    -** Processing line: ~  7200,9620,7200,9460~
    +  40,9960,40,9680
    +** Processing line: ~  40,9680,40,9360~
     - Inside source: true
     *** True Line Result
    -  7200,9620,7200,9460
    -** Processing line: ~  7200,9620,7200,9760~
    +  40,9680,40,9360
    +** Processing line: ~  40,9360,60,9080~
     - Inside source: true
     *** True Line Result
    -  7200,9620,7200,9760
    -** Processing line: ~  7200,9900,7200,10060~
    +  40,9360,60,9080
    +** Processing line: ~  60,9080,100,8860~
     - Inside source: true
     *** True Line Result
    -  7200,9900,7200,10060
    -** Processing line: ~  7200,10220,7200,10060~
    +  60,9080,100,8860
    +** Processing line: ~  100,8860,460,9040~
     - Inside source: true
     *** True Line Result
    -  7200,10220,7200,10060
    -** Processing line: ~  7200,10360,7200,10220~
    +  100,8860,460,9040
    +** Processing line: ~  460,9040,760,9220~
     - Inside source: true
     *** True Line Result
    -  7200,10360,7200,10220
    -** Processing line: ~  7140,10400,7200,10360~
    +  460,9040,760,9220
    +** Processing line: ~  760,9220,1140,9220~
     - Inside source: true
     *** True Line Result
    -  7140,10400,7200,10360
    -** Processing line: ~  6880,10400,7140,10400~
    +  760,9220,1140,9220
    +** Processing line: ~  1140,9220,1720,9200~
     - Inside source: true
     *** True Line Result
    -  6880,10400,7140,10400
    -** Processing line: ~  6640,10360,6880,10400~
    +  1140,9220,1720,9200
    +** Processing line: ~  -660,11580,-600,11420~
     - Inside source: true
     *** True Line Result
    -  6640,10360,6880,10400
    -** Processing line: ~  6420,10360,6640,10360~
    +  -660,11580,-600,11420
    +** Processing line: ~  -660,11800,-660,11580~
     - Inside source: true
     *** True Line Result
    -  6420,10360,6640,10360
    -** Processing line: ~  6160,10380,6420,10360~
    +  -660,11800,-660,11580
    +** Processing line: ~  -660,12000,-660,11800~
     - Inside source: true
     *** True Line Result
    -  6160,10380,6420,10360
    -** Processing line: ~  5940,10340,6160,10380~
    +  -660,12000,-660,11800
    +** Processing line: ~  -660,12000,-600,12220~
     - Inside source: true
     *** True Line Result
    -  5940,10340,6160,10380
    -** Processing line: ~  5720,10320,5940,10340~
    +  -660,12000,-600,12220
    +** Processing line: ~  -600,12220,-600,12440~
     - Inside source: true
     *** True Line Result
    -  5720,10320,5940,10340
    -** Processing line: ~  5500,10340,5720,10320~
    +  -600,12220,-600,12440
    +** Processing line: ~  -600,12440,-600,12640~
     - Inside source: true
     *** True Line Result
    -  5500,10340,5720,10320
    -** Processing line: ~  5280,10300,5500,10340~
    +  -600,12440,-600,12640
    +** Processing line: ~  -600,11240,-260,11280~
     - Inside source: true
     *** True Line Result
    -  5280,10300,5500,10340
    -** Processing line: ~  5080,10300,5280,10300~
    +  -600,11240,-260,11280
    +** Processing line: ~  -260,11280,100,11240~
     - Inside source: true
     *** True Line Result
    -  5080,10300,5280,10300
    -** Processing line: ~  4840,10280,5080,10300~
    +  -260,11280,100,11240
    +** Processing line: ~  9000,12360,9020,12400~
     - Inside source: true
     *** True Line Result
    -  4840,10280,5080,10300
    -** Processing line: ~  4700,10280,4840,10280~
    +  9000,12360,9020,12400
    +** Processing line: ~  9020,12620,9020,12400~
     - Inside source: true
     *** True Line Result
    -  4700,10280,4840,10280
    -** Processing line: ~  4540,10280,4700,10280~
    +  9020,12620,9020,12400
    +** Processing line: ~  9020,12840,9020,12620~
     - Inside source: true
     *** True Line Result
    -  4540,10280,4700,10280
    -** Processing line: ~  4360,10280,4540,10280~
    +  9020,12840,9020,12620
    +** Processing line: ~  9020,13060,9020,12840~
     - Inside source: true
     *** True Line Result
    -  4360,10280,4540,10280
    -** Processing line: ~  4200,10300,4360,10280~
    +  9020,13060,9020,12840
    +** Processing line: ~  9020,13060,9020,13240~
     - Inside source: true
     *** True Line Result
    -  4200,10300,4360,10280
    -** Processing line: ~  4040,10380,4200,10300~
    +  9020,13060,9020,13240
    +** Processing line: ~  9020,13240,9020,13420~
     - Inside source: true
     *** True Line Result
    -  4040,10380,4200,10300
    -** Processing line: ~  4020,10500,4040,10380~
    +  9020,13240,9020,13420
    +** Processing line: ~  9020,13420,9020,13600~
     - Inside source: true
     *** True Line Result
    -  4020,10500,4040,10380
    -** Processing line: ~  3980,10640,4020,10500~
    +  9020,13420,9020,13600
    +** Processing line: ~  9020,13600,9020,13780~
     - Inside source: true
     *** True Line Result
    -  3980,10640,4020,10500
    -** Processing line: ~  3980,10640,3980,10760~
    +  9020,13600,9020,13780
    +** Processing line: ~  8880,13900,9020,13780~
     - Inside source: true
     *** True Line Result
    -  3980,10640,3980,10760
    -** Processing line: ~  3980,10760,4020,10920~
    +  8880,13900,9020,13780
    +** Processing line: ~  8560,13800,8880,13900~
     - Inside source: true
     *** True Line Result
    -  3980,10760,4020,10920
    -** Processing line: ~  4020,10920,4080,11000~
    +  8560,13800,8880,13900
    +** Processing line: ~  8220,13780,8560,13800~
     - Inside source: true
     *** True Line Result
    -  4020,10920,4080,11000
    -** Processing line: ~  4080,11000,4340,11020~
    +  8220,13780,8560,13800
    +** Processing line: ~  7860,13760,8220,13780~
     - Inside source: true
     *** True Line Result
    -  4080,11000,4340,11020
    -** Processing line: ~  4340,11020,4600,11060~
    +  7860,13760,8220,13780
    +** Processing line: ~  7640,13780,7860,13760~
     - Inside source: true
     *** True Line Result
    -  4340,11020,4600,11060
    -** Processing line: ~  4600,11060,4840,11040~
    +  7640,13780,7860,13760
    +** Processing line: ~  7360,13800,7640,13780~
     - Inside source: true
     *** True Line Result
    -  4600,11060,4840,11040
    -** Processing line: ~  4840,11040,4880,10960~
    +  7360,13800,7640,13780
    +** Processing line: ~  7100,13800,7360,13800~
     - Inside source: true
     *** True Line Result
    -  4840,11040,4880,10960
    -** Processing line: ~  4880,10740,4880,10960~
    +  7100,13800,7360,13800
    +** Processing line: ~  6540,13760,6800,13780~
     - Inside source: true
     *** True Line Result
    -  4880,10740,4880,10960
    -** Processing line: ~  4880,10740,4880,10600~
    +  6540,13760,6800,13780
    +** Processing line: ~  6800,13780,7100,13800~
     - Inside source: true
     *** True Line Result
    -  4880,10740,4880,10600
    -** Processing line: ~  4880,10600,5080,10560~
    +  6800,13780,7100,13800
    +** Processing line: ~  6280,13760,6540,13760~
     - Inside source: true
     *** True Line Result
    -  4880,10600,5080,10560
    -** Processing line: ~  5080,10560,5340,10620~
    +  6280,13760,6540,13760
    +** Processing line: ~  5760,13760,6280,13760~
     - Inside source: true
     *** True Line Result
    -  5080,10560,5340,10620
    -** Processing line: ~  5340,10620,5660,10620~
    +  5760,13760,6280,13760
    +** Processing line: ~  5220,13780,5760,13760~
     - Inside source: true
     *** True Line Result
    -  5340,10620,5660,10620
    -** Processing line: ~  5660,10620,6040,10600~
    +  5220,13780,5760,13760
    +** Processing line: ~  4700,13760,5220,13780~
     - Inside source: true
     *** True Line Result
    -  5660,10620,6040,10600
    -** Processing line: ~  6040,10600,6120,10620~
    +  4700,13760,5220,13780
    +** Processing line: ~  4200,13740,4700,13760~
     - Inside source: true
     *** True Line Result
    -  6040,10600,6120,10620
    -** Processing line: ~  6120,10620,6240,10720~
    +  4200,13740,4700,13760
    +** Processing line: ~  3680,13720,4200,13740~
     - Inside source: true
     *** True Line Result
    -  6120,10620,6240,10720
    -** Processing line: ~  6240,10720,6420,10740~
    +  3680,13720,4200,13740
    +** Processing line: ~  3140,13700,3680,13720~
     - Inside source: true
     *** True Line Result
    -  6240,10720,6420,10740
    -** Processing line: ~  6420,10740,6640,10760~
    +  3140,13700,3680,13720
    +** Processing line: ~  2600,13680,3140,13700~
     - Inside source: true
     *** True Line Result
    -  6420,10740,6640,10760
    -** Processing line: ~  6640,10760,6880,10780~
    +  2600,13680,3140,13700
    +** Processing line: ~  2040,13940,2600,13680~
     - Inside source: true
     *** True Line Result
    -  6640,10760,6880,10780
    -** Processing line: ~  7140,10780,7400,10780~
    +  2040,13940,2600,13680
    +** Processing line: ~  1640,13940,2040,13940~
     - Inside source: true
     *** True Line Result
    -  7140,10780,7400,10780
    -** Processing line: ~  6880,10780,7140,10780~
    +  1640,13940,2040,13940
    +** Processing line: ~  1200,13960,1640,13940~
     - Inside source: true
     *** True Line Result
    -  6880,10780,7140,10780
    -** Processing line: ~  7400,10780,7680,10780~
    +  1200,13960,1640,13940
    +** Processing line: ~  840,14000,1200,13960~
     - Inside source: true
     *** True Line Result
    -  7400,10780,7680,10780
    -** Processing line: ~  7680,10780,8100,10760~
    +  840,14000,1200,13960
    +** Processing line: ~  300,13960,840,14000~
     - Inside source: true
     *** True Line Result
    -  7680,10780,8100,10760
    -** Processing line: ~  8100,10760,8460,10740~
    +  300,13960,840,14000
    +** Processing line: ~  -200,13900,300,13960~
     - Inside source: true
     *** True Line Result
    -  8100,10760,8460,10740
    -** Processing line: ~  8460,10740,8700,10760~
    +  -200,13900,300,13960
    +** Processing line: ~  -600,12840,-600,12640~
     - Inside source: true
     *** True Line Result
    -  8460,10740,8700,10760
    -** Processing line: ~  8800,10840,8800,10980~
    +  -600,12840,-600,12640
    +** Processing line: ~  -600,13140,-600,12840~
     - Inside source: true
     *** True Line Result
    -  8800,10840,8800,10980
    -** Processing line: ~  8700,10760,8800,10840~
    +  -600,13140,-600,12840
    +** Processing line: ~  -600,13140,-600,13420~
     - Inside source: true
     *** True Line Result
    -  8700,10760,8800,10840
    -** Processing line: ~  8760,11200,8800,10980~
    +  -600,13140,-600,13420
    +** Processing line: ~  -600,13700,-600,13420~
     - Inside source: true
     *** True Line Result
    -  8760,11200,8800,10980
    -** Processing line: ~  8760,11200,8760,11380~
    +  -600,13700,-600,13420
    +** Processing line: ~  -600,13700,-600,13820~
     - Inside source: true
     *** True Line Result
    -  8760,11200,8760,11380
    -** Processing line: ~  8760,11380,8800,11560~
    +  -600,13700,-600,13820
    +** Processing line: ~  -600,13820,-200,13900~
     - Inside source: true
     *** True Line Result
    -  8760,11380,8800,11560
    -** Processing line: ~  8760,11680,8800,11560~
    +  -600,13820,-200,13900
    +** Processing line: ~  -600,11240,-560,11000~
     - Inside source: true
     *** True Line Result
    -  8760,11680,8800,11560
    -** Processing line: ~  8760,11760,8760,11680~
    +  -600,11240,-560,11000
    +** Processing line: ~  -560,11000,-480,10840~
     - Inside source: true
     *** True Line Result
    -  8760,11760,8760,11680
    -** Processing line: ~  8760,11760,8760,11920~
    +  -560,11000,-480,10840
    +** Processing line: ~  -520,10660,-480,10840~
     - Inside source: true
     *** True Line Result
    -  8760,11760,8760,11920
    -** Processing line: ~  8760,11920,8800,12080~
    +  -520,10660,-480,10840
    +** Processing line: ~  -520,10660,-520,10480~
     - Inside source: true
     *** True Line Result
    -  8760,11920,8800,12080
    -** Processing line: ~  8800,12200,8800,12080~
    +  -520,10660,-520,10480
    +** Processing line: ~  -520,10480,-520,10300~
     - Inside source: true
     *** True Line Result
    -  8800,12200,8800,12080
    -** Processing line: ~  8700,12240,8800,12200~
    +  -520,10480,-520,10300
    +** Processing line: ~  -520,10260,-480,10080~
     - Inside source: true
     *** True Line Result
    -  8700,12240,8800,12200
    -** Processing line: ~  8560,12220,8700,12240~
    +  -520,10260,-480,10080
    +** Processing line: ~  -480,9880,-440,10060~
     - Inside source: true
     *** True Line Result
    -  8560,12220,8700,12240
    -** Processing line: ~  8360,12220,8560,12220~
    +  -480,9880,-440,10060
    +** Processing line: ~  -520,9680,-480,9880~
     - Inside source: true
     *** True Line Result
    -  8360,12220,8560,12220
    -** Processing line: ~  8160,12240,8360,12220~
    +  -520,9680,-480,9880
    +** Processing line: ~  -520,9680,-480,9400~
     - Inside source: true
     *** True Line Result
    -  8160,12240,8360,12220
    -** Processing line: ~  7720,12220,7980,12220~
    +  -520,9680,-480,9400
    +** Processing line: ~  -480,9400,-480,9160~
     - Inside source: true
     *** True Line Result
    -  7720,12220,7980,12220
    -** Processing line: ~  7980,12220,8160,12240~
    +  -480,9400,-480,9160
    +** Processing line: ~  1820,9880,2140,9800~
     - Inside source: true
     *** True Line Result
    -  7980,12220,8160,12240
    -** Processing line: ~  7400,12200,7720,12220~
    +  1820,9880,2140,9800
    +** Processing line: ~  1540,9880,1820,9880~
     - Inside source: true
     *** True Line Result
    -  7400,12200,7720,12220
    -** Processing line: ~  7200,12180,7400,12200~
    +  1540,9880,1820,9880
    +** Processing line: ~  1200,9920,1500,9880~
     - Inside source: true
     *** True Line Result
    -  7200,12180,7400,12200
    -** Processing line: ~  7000,12160,7200,12180~
    +  1200,9920,1500,9880
    +** Processing line: ~  900,9880,1200,9920~
     - Inside source: true
     *** True Line Result
    -  7000,12160,7200,12180
    -** Processing line: ~  6800,12160,7000,12160~
    +  900,9880,1200,9920
    +** Processing line: ~  640,9900,840,9880~
     - Inside source: true
     *** True Line Result
    -  6800,12160,7000,12160
    -** Processing line: ~  6280,12140,6380,12180~
    +  640,9900,840,9880
    +** Processing line: ~  2380,8760,2800,8760~
     - Inside source: true
     *** True Line Result
    -  6280,12140,6380,12180
    -** Processing line: ~  6120,12180,6280,12140~
    +  2380,8760,2800,8760
    +** Processing line: ~  2800,8760,2840,8660~
     - Inside source: true
     *** True Line Result
    -  6120,12180,6280,12140
    -** Processing line: ~  6540,12180,6800,12160~
    +  2800,8760,2840,8660
    +** Processing line: ~  2840,8660,2840,8420~
     - Inside source: true
     *** True Line Result
    -  6540,12180,6800,12160
    -** Processing line: ~  6380,12180,6540,12180~
    +  2840,8660,2840,8420
    +** Processing line: ~  2840,8160,2840,8420~
     - Inside source: true
     *** True Line Result
    -  6380,12180,6540,12180
    -** Processing line: ~  5900,12200,6120,12180~
    +  2840,8160,2840,8420
    +** Processing line: ~  2800,7900,2840,8160~
     - Inside source: true
     *** True Line Result
    -  5900,12200,6120,12180
    -** Processing line: ~  5620,12180,5900,12200~
    +  2800,7900,2840,8160
    +** Processing line: ~  2800,7900,2800,7720~
     - Inside source: true
     *** True Line Result
    -  5620,12180,5900,12200
    -** Processing line: ~  5340,12120,5620,12180~
    +  2800,7900,2800,7720
    +** Processing line: ~  2800,7540,2800,7720~
     - Inside source: true
     *** True Line Result
    -  5340,12120,5620,12180
    -** Processing line: ~  5140,12100,5340,12120~
    +  2800,7540,2800,7720
    +** Processing line: ~  2800,7540,2800,7360~
     - Inside source: true
     *** True Line Result
    -  5140,12100,5340,12120
    -** Processing line: ~  4980,12120,5140,12100~
    +  2800,7540,2800,7360
    +** Processing line: ~  2700,7220,2800,7360~
     - Inside source: true
     *** True Line Result
    -  4980,12120,5140,12100
    -** Processing line: ~  4840,12120,4980,12120~
    +  2700,7220,2800,7360
    +** Processing line: ~  2400,7220,2700,7220~
     - Inside source: true
     *** True Line Result
    -  4840,12120,4980,12120
    -** Processing line: ~  4700,12200,4840,12120~
    +  2400,7220,2700,7220
    +** Processing line: ~  2080,7240,2400,7220~
     - Inside source: true
     *** True Line Result
    -  4700,12200,4840,12120
    -** Processing line: ~  4700,12380,4700,12200~
    +  2080,7240,2400,7220
    +** Processing line: ~  1760,7320,2080,7240~
     - Inside source: true
     *** True Line Result
    -  4700,12380,4700,12200
    -** Processing line: ~  4740,12480,4940,12520~
    +  1760,7320,2080,7240
    +** Processing line: ~  1380,7360,1720,7320~
     - Inside source: true
     *** True Line Result
    -  4740,12480,4940,12520
    -** Processing line: ~  4700,12380,4740,12480~
    +  1380,7360,1720,7320
    +** Processing line: ~  1040,7400,1340,7360~
     - Inside source: true
     *** True Line Result
    -  4700,12380,4740,12480
    -** Processing line: ~  4940,12520,5160,12560~
    +  1040,7400,1340,7360
    +** Processing line: ~  640,7400,1000,7420~
     - Inside source: true
     *** True Line Result
    -  4940,12520,5160,12560
    -** Processing line: ~  5160,12560,5340,12600~
    +  640,7400,1000,7420
    +** Processing line: ~  300,7380,640,7400~
     - Inside source: true
     *** True Line Result
    -  5160,12560,5340,12600
    -** Processing line: ~  5340,12600,5400,12600~
    +  300,7380,640,7400
    +** Processing line: ~  0,7300,240,7380~
     - Inside source: true
     *** True Line Result
    -  5340,12600,5400,12600
    -** Processing line: ~  5400,12600,5500,12600~
    +  0,7300,240,7380
    +** Processing line: ~  -300,7180,-60,7300~
     - Inside source: true
     *** True Line Result
    -  5400,12600,5500,12600
    -** Processing line: ~  5500,12600,5620,12600~
    +  -300,7180,-60,7300
    +** Processing line: ~  -380,6860,-360,7180~
     - Inside source: true
     *** True Line Result
    -  5500,12600,5620,12600
    -** Processing line: ~  5620,12600,5720,12560~
    +  -380,6860,-360,7180
    +** Processing line: ~  -380,6880,-360,6700~
     - Inside source: true
     *** True Line Result
    -  5620,12600,5720,12560
    -** Processing line: ~  5720,12560,5800,12440~
    +  -380,6880,-360,6700
    +** Processing line: ~  -360,6700,-260,6540~
     - Inside source: true
     *** True Line Result
    -  5720,12560,5800,12440
    -** Processing line: ~  5800,12440,5900,12380~
    +  -360,6700,-260,6540
    +** Processing line: ~  -260,6540,0,6520~
     - Inside source: true
     *** True Line Result
    -  5800,12440,5900,12380
    -** Processing line: ~  5900,12380,6120,12420~
    +  -260,6540,0,6520
    +** Processing line: ~  0,6520,240,6640~
     - Inside source: true
     *** True Line Result
    -  5900,12380,6120,12420
    -** Processing line: ~  6120,12420,6380,12440~
    +  0,6520,240,6640
    +** Processing line: ~  240,6640,460,6640~
     - Inside source: true
     *** True Line Result
    -  6120,12420,6380,12440
    -** Processing line: ~  6380,12440,6600,12460~
    +  240,6640,460,6640
    +** Processing line: ~  460,6640,500,6480~
     - Inside source: true
     *** True Line Result
    -  6380,12440,6600,12460
    -** Processing line: ~  6720,12460,6840,12520~
    +  460,6640,500,6480
    +** Processing line: ~  500,6260,500,6480~
     - Inside source: true
     *** True Line Result
    -  6720,12460,6840,12520
    -** Processing line: ~  6840,12520,6960,12520~
    +  500,6260,500,6480
    +** Processing line: ~  460,6060,500,6260~
     - Inside source: true
     *** True Line Result
    -  6840,12520,6960,12520
    -** Processing line: ~  6600,12460,6720,12460~
    +  460,6060,500,6260
    +** Processing line: ~  460,5860,460,6060~
     - Inside source: true
     *** True Line Result
    -  6600,12460,6720,12460
    -** Processing line: ~  6960,12520,7040,12500~
    +  460,5860,460,6060
    +** Processing line: ~  460,5860,500,5640~
     - Inside source: true
     *** True Line Result
    -  6960,12520,7040,12500
    -** Processing line: ~  7040,12500,7140,12440~
    +  460,5860,500,5640
    +** Processing line: ~  500,5640,540,5440~
     - Inside source: true
     *** True Line Result
    -  7040,12500,7140,12440
    -** Processing line: ~  7200,12440,7360,12500~
    +  500,5640,540,5440
    +** Processing line: ~  540,5440,580,5220~
     - Inside source: true
     *** True Line Result
    -  7200,12440,7360,12500
    -** Processing line: ~  7360,12500,7600,12560~
    +  540,5440,580,5220
    +** Processing line: ~  580,5220,580,5000~
     - Inside source: true
     *** True Line Result
    -  7360,12500,7600,12560
    -** Processing line: ~  7600,12560,7860,12600~
    +  580,5220,580,5000
    +** Processing line: ~  580,4960,580,4740~
     - Inside source: true
     *** True Line Result
    -  7600,12560,7860,12600
    -** Processing line: ~  7860,12600,8060,12500~
    +  580,4960,580,4740
    +** Processing line: ~  580,4740,960,4700~
     - Inside source: true
     *** True Line Result
    -  7860,12600,8060,12500
    -** Processing line: ~  8100,12500,8200,12340~
    +  580,4740,960,4700
    +** Processing line: ~  960,4700,1140,4760~
     - Inside source: true
     *** True Line Result
    -  8100,12500,8200,12340
    -** Processing line: ~  8200,12340,8360,12360~
    +  960,4700,1140,4760
    +** Processing line: ~  1140,4760,1420,4740~
     - Inside source: true
     *** True Line Result
    -  8200,12340,8360,12360
    -** Processing line: ~  8360,12360,8560,12400~
    +  1140,4760,1420,4740
    +** Processing line: ~  1420,4740,1720,4700~
     - Inside source: true
     *** True Line Result
    -  8360,12360,8560,12400
    -** Processing line: ~  8560,12400,8660,12420~
    +  1420,4740,1720,4700
    +** Processing line: ~  1720,4700,2000,4740~
     - Inside source: true
     *** True Line Result
    -  8560,12400,8660,12420
    -** Processing line: ~  8660,12420,8840,12400~
    +  1720,4700,2000,4740
    +** Processing line: ~  2000,4740,2380,4760~
     - Inside source: true
     *** True Line Result
    -  8660,12420,8840,12400
    -** Processing line: ~  8840,12400,9000,12360~
    +  2000,4740,2380,4760
    +** Processing line: ~  2380,4760,2700,4800~
     - Inside source: true
     *** True Line Result
    -  8840,12400,9000,12360
    -** Processing line: ~  9000,12360,9000,12360~
    +  2380,4760,2700,4800
    +** Processing line: ~  1720,4600,1760,4300~
     - Inside source: true
     *** True Line Result
    -  9000,12360,9000,12360
    -** Processing line: ~  2900,4400,2900,4280~
    +  1720,4600,1760,4300
    +** Processing line: ~  1760,4300,2200,4340~
     - Inside source: true
     *** True Line Result
    -  2900,4400,2900,4280
    -** Processing line: ~  900,7320,1000,7220~
    +  1760,4300,2200,4340
    +** Processing line: ~  2200,4340,2560,4340~
     - Inside source: true
     *** True Line Result
    -  900,7320,1000,7220
    -** Processing line: ~  2640,13040,2900,12920~
    +  2200,4340,2560,4340
    +** Processing line: ~  2560,4340,2740,4340~
     - Inside source: true
     *** True Line Result
    -  2640,13040,2900,12920
    -** Processing line: ~  2900,12920,3160,12840~
    +  2560,4340,2740,4340
    +** Processing line: ~  2160,12580,2440,12400~
     - Inside source: true
     *** True Line Result
    -  2900,12920,3160,12840
    -** Processing line: ~  3480,12760,3780,12620~
    +  2160,12580,2440,12400
    +** Processing line: ~  1820,12840,2160,12580~
     - Inside source: true
     *** True Line Result
    -  3480,12760,3780,12620
    -** Processing line: ~  3780,12620,4020,12460~
    +  1820,12840,2160,12580
    +** Processing line: ~  1500,13080,1820,12840~
     - Inside source: true
     *** True Line Result
    -  3780,12620,4020,12460
    -** Processing line: ~  4300,12360,4440,12260~
    +  1500,13080,1820,12840
    +** Processing line: ~  1140,13340,1500,13080~
     - Inside source: true
     *** True Line Result
    -  4300,12360,4440,12260
    -** Processing line: ~  4020,12460,4300,12360~
    +  1140,13340,1500,13080
    +** Processing line: ~  1140,13340,1580,13220~
     - Inside source: true
     *** True Line Result
    -  4020,12460,4300,12360
    -** Processing line: ~  3160,12840,3480,12760~
    +  1140,13340,1580,13220
    +** Processing line: ~  2110,13080,2520,13000~
     - Inside source: true
     *** True Line Result
    -  3160,12840,3480,12760
    -** Processing line: ~  4440,12080,4440,12260~
    +  2110,13080,2520,13000
    +** Processing line: ~  2520,13000,2900,12800~
     - Inside source: true
     *** True Line Result
    -  4440,12080,4440,12260
    -** Processing line: ~  4440,12080,4440,11880~
    +  2520,13000,2900,12800
    +** Processing line: ~  1580,13220,2110,13080~
     - Inside source: true
     *** True Line Result
    -  4440,12080,4440,11880
    -** Processing line: ~  4440,11880,4440,11720~
    +  1580,13220,2110,13080
    +** Processing line: ~  2900,12800,3200,12680~
     - Inside source: true
     *** True Line Result
    -  4440,11880,4440,11720
    -** Processing line: ~  4440,11720,4600,11720~
    +  2900,12800,3200,12680
    +** Processing line: ~  3200,12680,3440,12640~
     - Inside source: true
     *** True Line Result
    -  4440,11720,4600,11720
    -** Processing line: ~  4600,11720,4760,11740~
    +  3200,12680,3440,12640
    +** Processing line: ~  3440,12640,3720,12460~
     - Inside source: true
     *** True Line Result
    -  4600,11720,4760,11740
    -** Processing line: ~  4760,11740,4980,11760~
    +  3440,12640,3720,12460
    +** Processing line: ~  3720,12460,4040,12320~
     - Inside source: true
     *** True Line Result
    -  4760,11740,4980,11760
    -** Processing line: ~  4980,11760,5160,11760~
    +  3720,12460,4040,12320
    +** Processing line: ~  4040,12320,4360,12200~
     - Inside source: true
     *** True Line Result
    -  4980,11760,5160,11760
    -** Processing line: ~  5160,11760,5340,11780~
    +  4040,12320,4360,12200
    +** Processing line: ~  4360,11940,4380,12180~
     - Inside source: true
     *** True Line Result
    -  5160,11760,5340,11780
    -** Processing line: ~  6000,11860,6120,11820~
    +  4360,11940,4380,12180
    +** Processing line: ~  4360,11700,4360,11940~
     - Inside source: true
     *** True Line Result
    -  6000,11860,6120,11820
    -** Processing line: ~  5340,11780,5620,11820~
    +  4360,11700,4360,11940
    +** Processing line: ~  4360,11700,4540,11500~
     - Inside source: true
     *** True Line Result
    -  5340,11780,5620,11820
    -** Processing line: ~  5620,11820,6000,11860~
    +  4360,11700,4540,11500
    +** Processing line: ~  4540,11500,4880,11540~
     - Inside source: true
     *** True Line Result
    -  5620,11820,6000,11860
    -** Processing line: ~  6120,11820,6360,11820~
    +  4540,11500,4880,11540
    +** Processing line: ~  6000,11660,6280,11640~
     - Inside source: true
     *** True Line Result
    -  6120,11820,6360,11820
    -** Processing line: ~  6360,11820,6640,11860~
    +  6000,11660,6280,11640
    +** Processing line: ~  5440,11600,5720,11610~
     - Inside source: true
     *** True Line Result
    -  6360,11820,6640,11860
    -** Processing line: ~  6940,11920,7240,11940~
    +  5440,11600,5720,11610
    +** Processing line: ~  5720,11610,6000,11660~
     - Inside source: true
     *** True Line Result
    -  6940,11920,7240,11940
    -** Processing line: ~  7240,11940,7520,11960~
    +  5720,11610,6000,11660
    +** Processing line: ~  6280,11640,6760,11720~
     - Inside source: true
     *** True Line Result
    -  7240,11940,7520,11960
    -** Processing line: ~  7520,11960,7860,11960~
    +  6280,11640,6760,11720
    +** Processing line: ~  6760,11720,7060,11780~
     - Inside source: true
     *** True Line Result
    -  7520,11960,7860,11960
    -** Processing line: ~  7860,11960,8100,11920~
    +  6760,11720,7060,11780
    +** Processing line: ~  7060,11780,7360,11810~
     - Inside source: true
     *** True Line Result
    -  7860,11960,8100,11920
    -** Processing line: ~  8100,11920,8420,11940~
    +  7060,11780,7360,11810
    +** Processing line: ~  7360,11810,7640,11840~
     - Inside source: true
     *** True Line Result
    -  8100,11920,8420,11940
    -** Processing line: ~  8420,11940,8460,11960~
    +  7360,11810,7640,11840
    +** Processing line: ~  7640,11840,8000,11830~
     - Inside source: true
     *** True Line Result
    -  8420,11940,8460,11960
    -** Processing line: ~  8460,11960,8500,11860~
    +  7640,11840,8000,11830
    +** Processing line: ~  8000,11830,8320,11850~
     - Inside source: true
     *** True Line Result
    -  8460,11960,8500,11860
    -** Processing line: ~  8460,11760,8500,11860~
    +  8000,11830,8320,11850
    +** Processing line: ~  8320,11850,8390,11800~
     - Inside source: true
     *** True Line Result
    -  8460,11760,8500,11860
    -** Processing line: ~  8320,11720,8460,11760~
    +  8320,11850,8390,11800
    +** Processing line: ~  8330,11760,8390,11800~
     - Inside source: true
     *** True Line Result
    -  8320,11720,8460,11760
    -** Processing line: ~  8160,11720,8320,11720~
    +  8330,11760,8390,11800
    +** Processing line: ~  8160,11760,8330,11760~
     - Inside source: true
     *** True Line Result
    -  8160,11720,8320,11720
    -** Processing line: ~  7940,11720,8160,11720~
    +  8160,11760,8330,11760
    +** Processing line: ~  7910,11750,8160,11760~
     - Inside source: true
     *** True Line Result
    -  7940,11720,8160,11720
    -** Processing line: ~  7720,11700,7940,11720~
    +  7910,11750,8160,11760
    +** Processing line: ~  7660,11740,7900,11750~
     - Inside source: true
     *** True Line Result
    -  7720,11700,7940,11720
    -** Processing line: ~  7520,11680,7720,11700~
    +  7660,11740,7900,11750
    +** Processing line: ~  7400,11730,7660,11740~
     - Inside source: true
     *** True Line Result
    -  7520,11680,7720,11700
    -** Processing line: ~  7320,11680,7520,11680~
    +  7400,11730,7660,11740
    +** Processing line: ~  7160,11680,7400,11730~
     - Inside source: true
     *** True Line Result
    -  7320,11680,7520,11680
    -** Processing line: ~  7200,11620,7320,11680~
    +  7160,11680,7400,11730
    +** Processing line: ~  7080,11570,7160,11680~
     - Inside source: true
     *** True Line Result
    -  7200,11620,7320,11680
    -** Processing line: ~  7200,11620,7200,11500~
    +  7080,11570,7160,11680
    +** Processing line: ~  7080,11570,7100,11350~
     - Inside source: true
     *** True Line Result
    -  7200,11620,7200,11500
    -** Processing line: ~  7200,11500,7280,11440~
    +  7080,11570,7100,11350
    +** Processing line: ~  7100,11350,7440,11280~
     - Inside source: true
     *** True Line Result
    -  7200,11500,7280,11440
    -** Processing line: ~  7280,11440,7420,11440~
    +  7100,11350,7440,11280
    +** Processing line: ~  7440,11280,7940,11280~
     - Inside source: true
     *** True Line Result
    -  7280,11440,7420,11440
    -** Processing line: ~  7420,11440,7600,11440~
    +  7440,11280,7940,11280
    +** Processing line: ~  7960,11280,8360,11280~
     - Inside source: true
     *** True Line Result
    -  7420,11440,7600,11440
    -** Processing line: ~  7600,11440,7980,11460~
    +  7960,11280,8360,11280
    +** Processing line: ~  5840,11540,6650,11170~
     - Inside source: true
     *** True Line Result
    -  7600,11440,7980,11460
    -** Processing line: ~  7980,11460,8160,11460~
    +  5840,11540,6650,11170
    +** Processing line: ~  4880,11540,5440,11600~
     - Inside source: true
     *** True Line Result
    -  7980,11460,8160,11460
    -** Processing line: ~  8160,11460,8360,11460~
    +  4880,11540,5440,11600
    +** Processing line: ~  3410,11830,3420,11300~
     - Inside source: true
     *** True Line Result
    -  8160,11460,8360,11460
    -** Processing line: ~  8360,11460,8460,11400~
    +  3410,11830,3420,11300
    +** Processing line: ~  3410,11260,3520,10920~
     - Inside source: true
     *** True Line Result
    -  8360,11460,8460,11400
    -** Processing line: ~  8420,11060,8500,11200~
    +  3410,11260,3520,10920
    +** Processing line: ~  3520,10590,3520,10920~
     - Inside source: true
     *** True Line Result
    -  8420,11060,8500,11200
    -** Processing line: ~  8280,11040,8420,11060~
    +  3520,10590,3520,10920
    +** Processing line: ~  3520,10590,3540,10260~
     - Inside source: true
     *** True Line Result
    -  8280,11040,8420,11060
    -** Processing line: ~  8100,11060,8280,11040~
    +  3520,10590,3540,10260
    +** Processing line: ~  3520,9900,3540,10240~
     - Inside source: true
     *** True Line Result
    -  8100,11060,8280,11040
    -** Processing line: ~  8460,11400,8500,11200~
    +  3520,9900,3540,10240
    +** Processing line: ~  3520,9900,3640,9590~
     - Inside source: true
     *** True Line Result
    -  8460,11400,8500,11200
    -** Processing line: ~  7800,11060,8100,11060~
    +  3520,9900,3640,9590
    +** Processing line: ~  3640,9570,4120,9590~
     - Inside source: true
     *** True Line Result
    -  7800,11060,8100,11060
    -** Processing line: ~  7520,11060,7800,11060~
    +  3640,9570,4120,9590
    +** Processing line: ~  4140,9590,4600,9680~
     - Inside source: true
     *** True Line Result
    -  7520,11060,7800,11060
    -** Processing line: ~  7240,11060,7520,11060~
    +  4140,9590,4600,9680
    +** Processing line: ~  4620,9680,5030,9730~
     - Inside source: true
     *** True Line Result
    -  7240,11060,7520,11060
    -** Processing line: ~  6940,11040,7240,11060~
    +  4620,9680,5030,9730
    +** Processing line: ~  5120,9750,5520,9800~
     - Inside source: true
     *** True Line Result
    -  6940,11040,7240,11060
    -** Processing line: ~  6640,11000,6940,11040~
    +  5120,9750,5520,9800
    +** Processing line: ~  5620,9820,6080,9800~
     - Inside source: true
     *** True Line Result
    -  6640,11000,6940,11040
    -** Processing line: ~  6420,10980,6640,11000~
    +  5620,9820,6080,9800
    +** Processing line: ~  6130,9810,6580,9820~
     - Inside source: true
     *** True Line Result
    -  6420,10980,6640,11000
    -** Processing line: ~  6360,11060,6420,10980~
    +  6130,9810,6580,9820
    +** Processing line: ~  6640,9820,6800,9700~
     - Inside source: true
     *** True Line Result
    -  6360,11060,6420,10980
    -** Processing line: ~  6360,11180,6360,11060~
    +  6640,9820,6800,9700
    +** Processing line: ~  6780,9400,6800,9700~
     - Inside source: true
     *** True Line Result
    -  6360,11180,6360,11060
    -** Processing line: ~  6200,11280,6360,11180~
    +  6780,9400,6800,9700
    +** Processing line: ~  6780,9400,6840,9140~
     - Inside source: true
     *** True Line Result
    -  6200,11280,6360,11180
    -** Processing line: ~  5960,11300,6200,11280~
    +  6780,9400,6840,9140
    +** Processing line: ~  6820,8860,6840,9120~
     - Inside source: true
     *** True Line Result
    -  5960,11300,6200,11280
    -** Processing line: ~  5720,11280,5960,11300~
    +  6820,8860,6840,9120
    +** Processing line: ~  6780,8600,6820,8830~
     - Inside source: true
     *** True Line Result
    -  5720,11280,5960,11300
    -** Processing line: ~  5500,11280,5720,11280~
    +  6780,8600,6820,8830
    +** Processing line: ~  6720,8350,6780,8570~
     - Inside source: true
     *** True Line Result
    -  5500,11280,5720,11280
    -** Processing line: ~  4940,11300,5200,11280~
    +  6720,8350,6780,8570
    +** Processing line: ~  6480,8340,6720,8320~
     - Inside source: true
     *** True Line Result
    -  4940,11300,5200,11280
    -** Processing line: ~  4660,11260,4940,11300~
    +  6480,8340,6720,8320
    +** Processing line: ~  6260,8400,6480,8340~
     - Inside source: true
     *** True Line Result
    -  4660,11260,4940,11300
    -** Processing line: ~  4440,11280,4660,11260~
    +  6260,8400,6480,8340
    +** Processing line: ~  6050,8580,6240,8400~
     - Inside source: true
     *** True Line Result
    -  4440,11280,4660,11260
    -** Processing line: ~  4260,11280,4440,11280~
    +  6050,8580,6240,8400
    +** Processing line: ~  5760,8630,6040,8590~
     - Inside source: true
     *** True Line Result
    -  4260,11280,4440,11280
    -** Processing line: ~  4220,11220,4260,11280~
    +  5760,8630,6040,8590
    +** Processing line: ~  5520,8690,5740,8630~
     - Inside source: true
     *** True Line Result
    -  4220,11220,4260,11280
    -** Processing line: ~  4080,11280,4220,11220~
    +  5520,8690,5740,8630
    +** Processing line: ~  5120,8690,5450,8700~
     - Inside source: true
     *** True Line Result
    -  4080,11280,4220,11220
    -** Processing line: ~  3980,11420,4080,11280~
    +  5120,8690,5450,8700
    +** Processing line: ~  4570,8670,5080,8690~
     - Inside source: true
     *** True Line Result
    -  3980,11420,4080,11280
    -** Processing line: ~  3980,11420,4040,11620~
    +  4570,8670,5080,8690
    +** Processing line: ~  4020,8610,4540,8670~
     - Inside source: true
     *** True Line Result
    -  3980,11420,4040,11620
    -** Processing line: ~  4040,11620,4040,11820~
    +  4020,8610,4540,8670
    +** Processing line: ~  3540,8480,4020,8610~
     - Inside source: true
     *** True Line Result
    -  4040,11620,4040,11820
    -** Processing line: ~  3980,11960,4040,11820~
    +  3540,8480,4020,8610
    +** Processing line: ~  3520,8230,3520,8480~
     - Inside source: true
     *** True Line Result
    -  3980,11960,4040,11820
    -** Processing line: ~  3840,12000,3980,11960~
    +  3520,8230,3520,8480
    +** Processing line: ~  3520,7930,3520,8230~
     - Inside source: true
     *** True Line Result
    -  3840,12000,3980,11960
    -** Processing line: ~  3720,11940,3840,12000~
    +  3520,7930,3520,8230
    +** Processing line: ~  3520,7930,3540,7630~
     - Inside source: true
     *** True Line Result
    -  3720,11940,3840,12000
    -** Processing line: ~  3680,11800,3720,11940~
    +  3520,7930,3540,7630
    +** Processing line: ~  3480,7320,3540,7610~
     - Inside source: true
     *** True Line Result
    -  3680,11800,3720,11940
    -** Processing line: ~  3680,11580,3680,11800~
    +  3480,7320,3540,7610
    +** Processing line: ~  3480,7280,3500,7010~
     - Inside source: true
     *** True Line Result
    -  3680,11580,3680,11800
    -** Processing line: ~  3680,11360,3680,11580~
    +  3480,7280,3500,7010
    +** Processing line: ~  3500,6980,3680,6850~
     - Inside source: true
     *** True Line Result
    -  3680,11360,3680,11580
    -** Processing line: ~  3680,11360,3680,11260~
    +  3500,6980,3680,6850
    +** Processing line: ~  3680,6850,4220,6840~
     - Inside source: true
     *** True Line Result
    -  3680,11360,3680,11260
    -** Processing line: ~  3680,11080,3680,11260~
    +  3680,6850,4220,6840
    +** Processing line: ~  4230,6840,4760,6850~
     - Inside source: true
     *** True Line Result
    -  3680,11080,3680,11260
    -** Processing line: ~  3680,11080,3680,10880~
    +  4230,6840,4760,6850
    +** Processing line: ~  4780,6850,5310,6860~
     - Inside source: true
     *** True Line Result
    -  3680,11080,3680,10880
    -** Processing line: ~  3680,10700,3680,10880~
    +  4780,6850,5310,6860
    +** Processing line: ~  5310,6860,5720,6940~
     - Inside source: true
     *** True Line Result
    -  3680,10700,3680,10880
    -** Processing line: ~  3680,10700,3680,10620~
    +  5310,6860,5720,6940
    +** Processing line: ~  5720,6940,5880,7250~
     - Inside source: true
     *** True Line Result
    -  3680,10700,3680,10620
    -** Processing line: ~  3680,10480,3680,10620~
    +  5720,6940,5880,7250
    +** Processing line: ~  5880,7250,5900,7520~
     - Inside source: true
     *** True Line Result
    -  3680,10480,3680,10620
    -** Processing line: ~  3680,10480,3680,10300~
    +  5880,7250,5900,7520
    +** Processing line: ~  100,11240,440,11300~
     - Inside source: true
     *** True Line Result
    -  3680,10480,3680,10300
    -** Processing line: ~  3680,10300,3680,10100~
    +  100,11240,440,11300
    +** Processing line: ~  440,11300,760,11330~
     - Inside source: true
     *** True Line Result
    -  3680,10300,3680,10100
    -** Processing line: ~  3680,10100,3680,9940~
    +  440,11300,760,11330
    +** Processing line: ~  1480,11280,1840,11230~
     - Inside source: true
     *** True Line Result
    -  3680,10100,3680,9940
    -** Processing line: ~  3680,9940,3720,9860~
    +  1480,11280,1840,11230
    +** Processing line: ~  2200,11130,2360,11090~
     - Inside source: true
     *** True Line Result
    -  3680,9940,3720,9860
    -** Processing line: ~  3720,9860,3920,9900~
    +  2200,11130,2360,11090
    +** Processing line: ~  1840,11230,2200,11130~
     - Inside source: true
     *** True Line Result
    -  3720,9860,3920,9900
    -** Processing line: ~  3920,9900,4220,9880~
    +  1840,11230,2200,11130
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
    +*** True Line Result
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +
    +** Processing line: ~*** Rpg Narrative - Choose Your Own Adventure - decision.rb~
    +- Header detected.
    +*** True Line Result
    +
    +*** True Line Result
    +*** Rpg Narrative - Choose Your Own Adventure - decision.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/99_genre_rpg_narrative/choose_your_own_adventure/app/decision.rb~
     - Inside source: true
     *** True Line Result
    -  3920,9900,4220,9880
    -** Processing line: ~  4980,9940,5340,9960~
    +  # ./samples/99_genre_rpg_narrative/choose_your_own_adventure/app/decision.rb
    +** Processing line: ~  # Hey there! Welcome to Four Decisions. Here is how you~
     - Inside source: true
     *** True Line Result
    -  4980,9940,5340,9960
    -** Processing line: ~  4220,9880,4540,9900~
    +  # Hey there! Welcome to Four Decisions. Here is how you
    +** Processing line: ~  # create your decision tree. Remove =being and =end from the text to~
     - Inside source: true
     *** True Line Result
    -  4220,9880,4540,9900
    -** Processing line: ~  4540,9900,4980,9940~
    +  # create your decision tree. Remove =being and =end from the text to
    +** Processing line: ~  # enable the game (just save the file). Change stuff and see what happens!~
     - Inside source: true
     *** True Line Result
    -  4540,9900,4980,9940
    -** Processing line: ~  5340,9960,5620,9960~
    +  # enable the game (just save the file). Change stuff and see what happens!
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  5340,9960,5620,9960
    -** Processing line: ~  5620,9960,5900,9960~
    +
    +** Processing line: ~  def game~
     - Inside source: true
     *** True Line Result
    -  5620,9960,5900,9960
    -** Processing line: ~  5900,9960,6160,10000~
    +  def game
    +** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
    -  5900,9960,6160,10000
    -** Processing line: ~  6160,10000,6480,10000~
    +    {
    +** Processing line: ~      starting_decision: :stormy_night,~
     - Inside source: true
     *** True Line Result
    -  6160,10000,6480,10000
    -** Processing line: ~  6480,10000,6720,10000~
    +      starting_decision: :stormy_night,
    +** Processing line: ~      decisions: {~
     - Inside source: true
     *** True Line Result
    -  6480,10000,6720,10000
    -** Processing line: ~  6720,10000,6880,9860~
    +      decisions: {
    +** Processing line: ~        stormy_night: {~
     - Inside source: true
     *** True Line Result
    -  6720,10000,6880,9860
    -** Processing line: ~  6880,9860,6880,9520~
    +        stormy_night: {
    +** Processing line: ~          description: 'It was a dark and stormy night. (storyline located in decision.rb)',~
     - Inside source: true
     *** True Line Result
    -  6880,9860,6880,9520
    -** Processing line: ~  6880,9520,6940,9340~
    +          description: 'It was a dark and stormy night. (storyline located in decision.rb)',
    +** Processing line: ~          option_one: {~
     - Inside source: true
     *** True Line Result
    -  6880,9520,6940,9340
    -** Processing line: ~  6940,9120,6940,9340~
    +          option_one: {
    +** Processing line: ~            description: 'Go to sleep.',~
     - Inside source: true
     *** True Line Result
    -  6940,9120,6940,9340
    -** Processing line: ~  6940,9120,6940,8920~
    +            description: 'Go to sleep.',
    +** Processing line: ~            decision: :nap~
     - Inside source: true
     *** True Line Result
    -  6940,9120,6940,8920
    -** Processing line: ~  6940,8700,6940,8920~
    +            decision: :nap
    +** Processing line: ~          },~
     - Inside source: true
     *** True Line Result
    -  6940,8700,6940,8920
    -** Processing line: ~  6880,8500,6940,8700~
    +          },
    +** Processing line: ~          option_two: {~
     - Inside source: true
     *** True Line Result
    -  6880,8500,6940,8700
    -** Processing line: ~  6880,8320,6880,8500~
    +          option_two: {
    +** Processing line: ~            description: 'Watch a movie.',~
     - Inside source: true
     *** True Line Result
    -  6880,8320,6880,8500
    -** Processing line: ~  7140,8320,7140,8180~
    +            description: 'Watch a movie.',
    +** Processing line: ~            decision: :movie~
     - Inside source: true
     *** True Line Result
    -  7140,8320,7140,8180
    -** Processing line: ~  6760,8260,6880,8320~
    +            decision: :movie
    +** Processing line: ~          },~
     - Inside source: true
     *** True Line Result
    -  6760,8260,6880,8320
    -** Processing line: ~  6540,8240,6760,8260~
    +          },
    +** Processing line: ~          option_three: {~
     - Inside source: true
     *** True Line Result
    -  6540,8240,6760,8260
    -** Processing line: ~  6420,8180,6540,8240~
    +          option_three: {
    +** Processing line: ~            description: 'Go outside.',~
     - Inside source: true
     *** True Line Result
    -  6420,8180,6540,8240
    -** Processing line: ~  6280,8240,6420,8180~
    +            description: 'Go outside.',
    +** Processing line: ~            decision: :go_outside~
     - Inside source: true
     *** True Line Result
    -  6280,8240,6420,8180
    -** Processing line: ~  6160,8300,6280,8240~
    +            decision: :go_outside
    +** Processing line: ~          },~
     - Inside source: true
     *** True Line Result
    -  6160,8300,6280,8240
    -** Processing line: ~  6120,8400,6160,8300~
    +          },
    +** Processing line: ~          option_four: {~
     - Inside source: true
     *** True Line Result
    -  6120,8400,6160,8300
    -** Processing line: ~  6080,8520,6120,8400~
    +          option_four: {
    +** Processing line: ~            description: 'Get a snack.',~
     - Inside source: true
     *** True Line Result
    -  6080,8520,6120,8400
    -** Processing line: ~  5840,8480,6080,8520~
    +            description: 'Get a snack.',
    +** Processing line: ~            decision: :get_a_snack~
     - Inside source: true
     *** True Line Result
    -  5840,8480,6080,8520
    -** Processing line: ~  5620,8500,5840,8480~
    +            decision: :get_a_snack
    +** Processing line: ~          }~
     - Inside source: true
     *** True Line Result
    -  5620,8500,5840,8480
    -** Processing line: ~  5500,8500,5620,8500~
    +          }
    +** Processing line: ~        },~
     - Inside source: true
     *** True Line Result
    -  5500,8500,5620,8500
    -** Processing line: ~  5340,8560,5500,8500~
    +        },
    +** Processing line: ~        nap: {~
     - Inside source: true
     *** True Line Result
    -  5340,8560,5500,8500
    -** Processing line: ~  5160,8540,5340,8560~
    +        nap: {
    +** Processing line: ~          description: 'You took a nap. The end.',~
     - Inside source: true
     *** True Line Result
    -  5160,8540,5340,8560
    -** Processing line: ~  4620,8520,4880,8520~
    +          description: 'You took a nap. The end.',
    +** Processing line: ~          option_one: {~
     - Inside source: true
     *** True Line Result
    -  4620,8520,4880,8520
    -** Processing line: ~  4360,8480,4620,8520~
    +          option_one: {
    +** Processing line: ~            description: 'Start over.',~
     - Inside source: true
     *** True Line Result
    -  4360,8480,4620,8520
    -** Processing line: ~  4880,8520,5160,8540~
    +            description: 'Start over.',
    +** Processing line: ~            decision: :stormy_night~
     - Inside source: true
     *** True Line Result
    -  4880,8520,5160,8540
    -** Processing line: ~  4140,8440,4360,8480~
    +            decision: :stormy_night
    +** Processing line: ~          }~
     - Inside source: true
     *** True Line Result
    -  4140,8440,4360,8480
    -** Processing line: ~  3920,8460,4140,8440~
    +          }
    +** Processing line: ~        }~
     - Inside source: true
     *** True Line Result
    -  3920,8460,4140,8440
    -** Processing line: ~  3720,8380,3920,8460~
    +        }
    +** Processing line: ~      }~
     - Inside source: true
     *** True Line Result
    -  3720,8380,3920,8460
    -** Processing line: ~  3680,8160,3720,8380~
    +      }
    +** Processing line: ~    }~
     - Inside source: true
     *** True Line Result
    -  3680,8160,3720,8380
    -** Processing line: ~  3680,8160,3720,7940~
    +    }
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -  3680,8160,3720,7940
    -** Processing line: ~  3720,7720,3720,7940~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  3720,7720,3720,7940
    -** Processing line: ~  3680,7580,3720,7720~
    +
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
    +*** True Line Result
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +
    +** Processing line: ~*** Rpg Narrative - Choose Your Own Adventure - main.rb~
    +- Header detected.
    +*** True Line Result
    +
    +*** True Line Result
    +*** Rpg Narrative - Choose Your Own Adventure - main.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/99_genre_rpg_narrative/choose_your_own_adventure/app/main.rb~
     - Inside source: true
     *** True Line Result
    -  3680,7580,3720,7720
    -** Processing line: ~  3680,7580,3720,7440~
    +  # ./samples/99_genre_rpg_narrative/choose_your_own_adventure/app/main.rb
    +** Processing line: ~  =begin~
     - Inside source: true
     *** True Line Result
    -  3680,7580,3720,7440
    -** Processing line: ~  3720,7440,3720,7300~
    +  =begin
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  3720,7440,3720,7300
    -** Processing line: ~  3720,7160,3720,7300~
    +
    +** Processing line: ~   Reminders:~
     - Inside source: true
     *** True Line Result
    -  3720,7160,3720,7300
    -** Processing line: ~  3720,7160,3720,7020~
    +   Reminders:
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  3720,7160,3720,7020
    -** Processing line: ~  3720,7020,3780,6900~
    +
    +** Processing line: ~   - Hashes: Collection of unique keys and their corresponding values. The values can be found~
     - Inside source: true
     *** True Line Result
    -  3720,7020,3780,6900
    -** Processing line: ~  3780,6900,4080,6940~
    +   - Hashes: Collection of unique keys and their corresponding values. The values can be found
    +** Processing line: ~     using their keys.~
     - Inside source: true
     *** True Line Result
    -  3780,6900,4080,6940
    -** Processing line: ~  4080,6940,4340,6980~
    +     using their keys.
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  4080,6940,4340,6980
    -** Processing line: ~  4340,6980,4600,6980~
    +
    +** Processing line: ~     In this sample app, the decisions needed for the game are stored in a hash. In fact, the~
     - Inside source: true
     *** True Line Result
    -  4340,6980,4600,6980
    -** Processing line: ~  4600,6980,4880,6980~
    +     In this sample app, the decisions needed for the game are stored in a hash. In fact, the
    +** Processing line: ~     decision.rb file contains hashes inside of other hashes!~
     - Inside source: true
     *** True Line Result
    -  4600,6980,4880,6980
    -** Processing line: ~  4880,6980,5160,6980~
    +     decision.rb file contains hashes inside of other hashes!
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  4880,6980,5160,6980
    -** Processing line: ~  5160,6980,5400,7000~
    +
    +** Processing line: ~     Each option is a key in the first hash, but also contains a hash (description and~
     - Inside source: true
     *** True Line Result
    -  5160,6980,5400,7000
    -** Processing line: ~  5400,7000,5560,7020~
    +     Each option is a key in the first hash, but also contains a hash (description and
    +** Processing line: ~     decision being its keys) as its value.~
     - Inside source: true
     *** True Line Result
    -  5400,7000,5560,7020
    -** Processing line: ~  5560,7020,5660,7080~
    +     decision being its keys) as its value.
    +** Processing line: ~     Go into the decision.rb file and take a look before diving into the code below.~
     - Inside source: true
     *** True Line Result
    -  5560,7020,5660,7080
    -** Processing line: ~  5660,7080,5660,7280~
    +     Go into the decision.rb file and take a look before diving into the code below.
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  5660,7080,5660,7280
    -** Processing line: ~  5660,7280,5660,7440~
    +
    +** Processing line: ~   - args.outputs.labels: An array. The values generate a label.~
     - Inside source: true
     *** True Line Result
    -  5660,7280,5660,7440
    -** Processing line: ~  5660,7440,5740,7520~
    +   - args.outputs.labels: An array. The values generate a label.
    +** Processing line: ~     The parameters are [X, Y, TEXT, SIZE, ALIGNMENT, RED, GREEN, BLUE, ALPHA, FONT STYLE]~
     - Inside source: true
     *** True Line Result
    -  5660,7440,5740,7520
    -** Processing line: ~  5740,7520,5740,7600~
    +     The parameters are [X, Y, TEXT, SIZE, ALIGNMENT, RED, GREEN, BLUE, ALPHA, FONT STYLE]
    +** Processing line: ~     For more information about labels, go to mygame/documentation/02-labels.md.~
     - Inside source: true
     *** True Line Result
    -  5740,7520,5740,7600
    -** Processing line: ~  5740,7600,5900,7600~
    +     For more information about labels, go to mygame/documentation/02-labels.md.
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  5740,7600,5900,7600
    -** Processing line: ~  5900,7600,6040,7540~
    +
    +** Processing line: ~   - args.keyboard.key_down.KEY: Determines if a key is in the down state or pressed down.~
     - Inside source: true
     *** True Line Result
    -  5900,7600,6040,7540
    -** Processing line: ~  6040,7540,6040,7320~
    +   - args.keyboard.key_down.KEY: Determines if a key is in the down state or pressed down.
    +** Processing line: ~     For more information about the keyboard, go to mygame/documentation/06-keyboard.md.~
     - Inside source: true
     *** True Line Result
    -  6040,7540,6040,7320
    -** Processing line: ~  6040,7320,6120,7200~
    +     For more information about the keyboard, go to mygame/documentation/06-keyboard.md.
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  6040,7320,6120,7200
    -** Processing line: ~  6120,7200,6120,7040~
    +
    +** Processing line: ~   - String interpolation: uses #{} syntax; everything between the #{ and the } is evaluated~
     - Inside source: true
     *** True Line Result
    -  6120,7200,6120,7040
    -** Processing line: ~  6120,7040,6240,7000~
    +   - String interpolation: uses #{} syntax; everything between the #{ and the } is evaluated
    +** Processing line: ~     as Ruby code, and the placeholder is replaced with its corresponding value or result.~
     - Inside source: true
     *** True Line Result
    -  6120,7040,6240,7000
    -** Processing line: ~  6240,7000,6480,7060~
    +     as Ruby code, and the placeholder is replaced with its corresponding value or result.
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  6240,7000,6480,7060
    -** Processing line: ~  6480,7060,6800,7060~
    +
    +** Processing line: ~  =end~
     - Inside source: true
     *** True Line Result
    -  6480,7060,6800,7060
    -** Processing line: ~  6800,7060,7080,7080~
    +  =end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  6800,7060,7080,7080
    -** Processing line: ~  7080,7080,7320,7100~
    +
    +** Processing line: ~  # This sample app provides users with a story and multiple decisions that they can choose to make.~
     - Inside source: true
     *** True Line Result
    -  7080,7080,7320,7100
    -** Processing line: ~  7940,7100,7980,6920~
    +  # This sample app provides users with a story and multiple decisions that they can choose to make.
    +** Processing line: ~  # Users can make a decision using their keyboard, and the story will move forward based on user choices.~
     - Inside source: true
     *** True Line Result
    -  7940,7100,7980,6920
    -** Processing line: ~  7860,6860,7980,6920~
    +  # Users can make a decision using their keyboard, and the story will move forward based on user choices.
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  7860,6860,7980,6920
    -** Processing line: ~  7640,6860,7860,6860~
    +
    +** Processing line: ~  # The decisions available to users are stored in the decision.rb file.~
     - Inside source: true
     *** True Line Result
    -  7640,6860,7860,6860
    -** Processing line: ~  7400,6840,7640,6860~
    +  # The decisions available to users are stored in the decision.rb file.
    +** Processing line: ~  # We must have access to it for the game to function properly.~
     - Inside source: true
     *** True Line Result
    -  7400,6840,7640,6860
    -** Processing line: ~  7320,7100,7560,7120~
    +  # We must have access to it for the game to function properly.
    +** Processing line: ~  GAME_FILE = 'app/decision.rb' # found in app folder~
     - Inside source: true
     *** True Line Result
    -  7320,7100,7560,7120
    -** Processing line: ~  7560,7120,7760,7120~
    +  GAME_FILE = 'app/decision.rb' # found in app folder
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  7560,7120,7760,7120
    -** Processing line: ~  7760,7120,7940,7100~
    +
    +** Processing line: ~  require GAME_FILE # require used to load another file, import class/method definitions~
     - Inside source: true
     *** True Line Result
    -  7760,7120,7940,7100
    -** Processing line: ~  7200,6820,7400,6840~
    +  require GAME_FILE # require used to load another file, import class/method definitions
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  7200,6820,7400,6840
    -** Processing line: ~  7040,6820,7200,6820~
    +
    +** Processing line: ~  # Instructions are given using labels to users if they have not yet set up their story in the decision.rb file.~
     - Inside source: true
     *** True Line Result
    -  7040,6820,7200,6820
    -** Processing line: ~  6600,6840,6840,6840~
    +  # Instructions are given using labels to users if they have not yet set up their story in the decision.rb file.
    +** Processing line: ~  # Otherwise, the game is run.~
     - Inside source: true
     *** True Line Result
    -  6600,6840,6840,6840
    -** Processing line: ~  6380,6800,6600,6840~
    +  # Otherwise, the game is run.
    +** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
    -  6380,6800,6600,6840
    -** Processing line: ~  6120,6800,6380,6800~
    +  def tick args
    +** Processing line: ~    if !args.state.loaded && !respond_to?(:game) # if game is not loaded and not responding to game symbol's method~
     - Inside source: true
     *** True Line Result
    -  6120,6800,6380,6800
    -** Processing line: ~  5900,6840,6120,6800~
    +    if !args.state.loaded && !respond_to?(:game) # if game is not loaded and not responding to game symbol's method
    +** Processing line: ~      args.labels << [640, 370, 'Hey there! Welcome to Four Decisions.', 0, 1] # a welcome label is shown~
     - Inside source: true
     *** True Line Result
    -  5900,6840,6120,6800
    -** Processing line: ~  5620,6820,5900,6840~
    +      args.labels << [640, 370, 'Hey there! Welcome to Four Decisions.', 0, 1] # a welcome label is shown
    +** Processing line: ~      args.labels << [640, 340, 'Go to the file called decision.rb and tell me your story.', 0, 1]~
     - Inside source: true
     *** True Line Result
    -  5620,6820,5900,6840
    -** Processing line: ~  5400,6800,5620,6820~
    +      args.labels << [640, 340, 'Go to the file called decision.rb and tell me your story.', 0, 1]
    +** Processing line: ~    elsif respond_to?(:game) # otherwise, if responds to game~
     - Inside source: true
     *** True Line Result
    -  5400,6800,5620,6820
    -** Processing line: ~  5140,6800,5400,6800~
    +    elsif respond_to?(:game) # otherwise, if responds to game
    +** Processing line: ~      args.state.loaded = true~
     - Inside source: true
     *** True Line Result
    -  5140,6800,5400,6800
    -** Processing line: ~  4880,6780,5140,6800~
    +      args.state.loaded = true
    +** Processing line: ~      tick_game args # calls tick_game method, runs game~
     - Inside source: true
     *** True Line Result
    -  4880,6780,5140,6800
    -** Processing line: ~  4600,6760,4880,6780~
    +      tick_game args # calls tick_game method, runs game
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  4600,6760,4880,6780
    -** Processing line: ~  4340,6760,4600,6760~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  4340,6760,4600,6760
    -** Processing line: ~  4080,6760,4340,6760~
    +
    +** Processing line: ~    if args.state.tick_count.mod_zero? 60 # update every 60 frames~
     - Inside source: true
     *** True Line Result
    -  4080,6760,4340,6760
    -** Processing line: ~  3840,6740,4080,6760~
    +    if args.state.tick_count.mod_zero? 60 # update every 60 frames
    +** Processing line: ~      t = args.gtk.ffi_file.mtime GAME_FILE # mtime returns modification time for named file~
     - Inside source: true
     *** True Line Result
    -  3840,6740,4080,6760
    -** Processing line: ~  3680,6720,3840,6740~
    +      t = args.gtk.ffi_file.mtime GAME_FILE # mtime returns modification time for named file
    +** Processing line: ~      if t != args.state.mtime~
     - Inside source: true
     *** True Line Result
    -  3680,6720,3840,6740
    -** Processing line: ~  3680,6720,3680,6560~
    +      if t != args.state.mtime
    +** Processing line: ~        args.state.mtime = t~
     - Inside source: true
     *** True Line Result
    -  3680,6720,3680,6560
    -** Processing line: ~  3680,6560,3720,6400~
    +        args.state.mtime = t
    +** Processing line: ~        require GAME_FILE # require used to load file~
     - Inside source: true
     *** True Line Result
    -  3680,6560,3720,6400
    -** Processing line: ~  3720,6400,3720,6200~
    +        require GAME_FILE # require used to load file
    +** Processing line: ~        args.state.game_definition = nil # game definition and decision are empty~
     - Inside source: true
     *** True Line Result
    -  3720,6400,3720,6200
    -** Processing line: ~  3720,6200,3780,6000~
    +        args.state.game_definition = nil # game definition and decision are empty
    +** Processing line: ~        args.state.decision_id = nil~
     - Inside source: true
     *** True Line Result
    -  3720,6200,3780,6000
    -** Processing line: ~  3720,5780,3780,6000~
    +        args.state.decision_id = nil
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -  3720,5780,3780,6000
    -** Processing line: ~  3720,5580,3720,5780~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  3720,5580,3720,5780
    -** Processing line: ~  3720,5360,3720,5580~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -  3720,5360,3720,5580
    -** Processing line: ~  3720,5360,3840,5240~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  3720,5360,3840,5240
    -** Processing line: ~  3840,5240,4200,5260~
    +
    +** Processing line: ~  # Runs methods needed for game to function properly~
     - Inside source: true
     *** True Line Result
    -  3840,5240,4200,5260
    -** Processing line: ~  4200,5260,4600,5280~
    +  # Runs methods needed for game to function properly
    +** Processing line: ~  # Creates a rectangular border around the screen~
     - Inside source: true
     *** True Line Result
    -  4200,5260,4600,5280
    -** Processing line: ~  4600,5280,4880,5280~
    +  # Creates a rectangular border around the screen
    +** Processing line: ~  def tick_game args~
     - Inside source: true
     *** True Line Result
    -  4600,5280,4880,5280
    -** Processing line: ~  4880,5280,5140,5200~
    +  def tick_game args
    +** Processing line: ~    defaults args~
     - Inside source: true
     *** True Line Result
    -  4880,5280,5140,5200
    -** Processing line: ~  5140,5200,5220,5100~
    +    defaults args
    +** Processing line: ~    args.borders << args.grid.rect~
     - Inside source: true
     *** True Line Result
    -  5140,5200,5220,5100
    -** Processing line: ~  5220,5100,5280,4900~
    +    args.borders << args.grid.rect
    +** Processing line: ~    render_decision args~
     - Inside source: true
     *** True Line Result
    -  5220,5100,5280,4900
    -** Processing line: ~  5280,4900,5340,4840~
    +    render_decision args
    +** Processing line: ~    process_inputs args~
     - Inside source: true
     *** True Line Result
    -  5280,4900,5340,4840
    -** Processing line: ~  5340,4840,5720,4880~
    +    process_inputs args
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -  5340,4840,5720,4880
    -** Processing line: ~  6120,4880,6480,4860~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  6120,4880,6480,4860
    -** Processing line: ~  6880,4840,7200,4860~
    +
    +** Processing line: ~  # Sets default values and uses decision.rb file to define game and decision_id~
     - Inside source: true
     *** True Line Result
    -  6880,4840,7200,4860
    -** Processing line: ~  6480,4860,6880,4840~
    +  # Sets default values and uses decision.rb file to define game and decision_id
    +** Processing line: ~  # variable using the starting decision~
     - Inside source: true
     *** True Line Result
    -  6480,4860,6880,4840
    -** Processing line: ~  7200,4860,7320,4860~
    +  # variable using the starting decision
    +** Processing line: ~  def defaults args~
     - Inside source: true
     *** True Line Result
    -  7200,4860,7320,4860
    -** Processing line: ~  7320,4860,7360,4740~
    +  def defaults args
    +** Processing line: ~    args.state.game_definition ||= game~
     - Inside source: true
     *** True Line Result
    -  7320,4860,7360,4740
    -** Processing line: ~  7360,4600,7440,4520~
    +    args.state.game_definition ||= game
    +** Processing line: ~    args.state.decision_id ||= args.state.game_definition[:starting_decision]~
     - Inside source: true
     *** True Line Result
    -  7360,4600,7440,4520
    -** Processing line: ~  7360,4600,7360,4740~
    +    args.state.decision_id ||= args.state.game_definition[:starting_decision]
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -  7360,4600,7360,4740
    -** Processing line: ~  7440,4520,7640,4520~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  7440,4520,7640,4520
    -** Processing line: ~  7640,4520,7800,4480~
    +
    +** Processing line: ~  # Outputs the possible decision descriptions the user can choose onto the screen~
     - Inside source: true
     *** True Line Result
    -  7640,4520,7800,4480
    -** Processing line: ~  7800,4480,7800,4280~
    +  # Outputs the possible decision descriptions the user can choose onto the screen
    +** Processing line: ~  # as well as what key to press on their keyboard to make their decision~
     - Inside source: true
     *** True Line Result
    -  7800,4480,7800,4280
    -** Processing line: ~  7800,4280,7800,4040~
    +  # as well as what key to press on their keyboard to make their decision
    +** Processing line: ~  def render_decision args~
     - Inside source: true
     *** True Line Result
    -  7800,4280,7800,4040
    -** Processing line: ~  7800,4040,7800,3780~
    +  def render_decision args
    +** Processing line: ~    decision = current_decision args~
     - Inside source: true
     *** True Line Result
    -  7800,4040,7800,3780
    -** Processing line: ~  7800,3560,7800,3780~
    +    decision = current_decision args
    +** Processing line: ~    # text is either the value of decision's description key or warning that no description exists~
     - Inside source: true
     *** True Line Result
    -  7800,3560,7800,3780
    -** Processing line: ~  7800,3560,7860,3440~
    +    # text is either the value of decision's description key or warning that no description exists
    +** Processing line: ~    args.labels << [640, 360, decision[:description] || "No definition found for #{args.state.decision_id}. Please update decision.rb.", 0, 1] # uses string interpolation~
     - Inside source: true
     *** True Line Result
    -  7800,3560,7860,3440
    -** Processing line: ~  7860,3440,8060,3460~
    +    args.labels << [640, 360, decision[:description] || "No definition found for #{args.state.decision_id}. Please update decision.rb.", 0, 1] # uses string interpolation
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  7860,3440,8060,3460
    -** Processing line: ~  8060,3460,8160,3340~
    +
    +** Processing line: ~    # All decisions are stored in a hash~
     - Inside source: true
     *** True Line Result
    -  8060,3460,8160,3340
    -** Processing line: ~  8160,3340,8160,3140~
    +    # All decisions are stored in a hash
    +** Processing line: ~    # The descriptions output onto the screen are the values for the description keys of the hash.~
     - Inside source: true
     *** True Line Result
    -  8160,3340,8160,3140
    -** Processing line: ~  8160,3140,8160,2960~
    +    # The descriptions output onto the screen are the values for the description keys of the hash.
    +** Processing line: ~    if decision[:option_one]~
     - Inside source: true
     *** True Line Result
    -  8160,3140,8160,2960
    -** Processing line: ~  8000,2900,8160,2960~
    +    if decision[:option_one]
    +** Processing line: ~      args.labels << [10, 360, decision[:option_one][:description], 0, 0] # option one's description label~
     - Inside source: true
     *** True Line Result
    -  8000,2900,8160,2960
    -** Processing line: ~  7860,2900,8000,2900~
    +      args.labels << [10, 360, decision[:option_one][:description], 0, 0] # option one's description label
    +** Processing line: ~      args.labels << [10, 335, "(Press 'left' on the keyboard to select this decision)", -5, 0] # label of what key to press to select the decision~
     - Inside source: true
     *** True Line Result
    -  7860,2900,8000,2900
    -** Processing line: ~  7640,2940,7860,2900~
    +      args.labels << [10, 335, "(Press 'left' on the keyboard to select this decision)", -5, 0] # label of what key to press to select the decision
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  7640,2940,7860,2900
    -** Processing line: ~  7400,2980,7640,2940~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  7400,2980,7640,2940
    -** Processing line: ~  7100,2980,7400,2980~
    +
    +** Processing line: ~    if decision[:option_two]~
     - Inside source: true
     *** True Line Result
    -  7100,2980,7400,2980
    -** Processing line: ~  6840,3000,7100,2980~
    +    if decision[:option_two]
    +** Processing line: ~      args.labels << [1270, 360, decision[:option_two][:description], 0, 2] # option two's description~
     - Inside source: true
     *** True Line Result
    -  6840,3000,7100,2980
    -** Processing line: ~  5620,2980,5840,2980~
    +      args.labels << [1270, 360, decision[:option_two][:description], 0, 2] # option two's description
    +** Processing line: ~      args.labels << [1270, 335, "(Press 'right' on the keyboard to select this decision)", -5, 2]~
     - Inside source: true
     *** True Line Result
    -  5620,2980,5840,2980
    -** Processing line: ~  5840,2980,6500,3000~
    +      args.labels << [1270, 335, "(Press 'right' on the keyboard to select this decision)", -5, 2]
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  5840,2980,6500,3000
    -** Processing line: ~  6500,3000,6840,3000~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  6500,3000,6840,3000
    -** Processing line: ~  5560,2780,5620,2980~
    +
    +** Processing line: ~    if decision[:option_three]~
     - Inside source: true
     *** True Line Result
    -  5560,2780,5620,2980
    -** Processing line: ~  5560,2780,5560,2580~
    +    if decision[:option_three]
    +** Processing line: ~      args.labels << [640, 45, decision[:option_three][:description], 0, 1] # option three's description~
     - Inside source: true
     *** True Line Result
    -  5560,2780,5560,2580
    -** Processing line: ~  5560,2580,5560,2380~
    +      args.labels << [640, 45, decision[:option_three][:description], 0, 1] # option three's description
    +** Processing line: ~      args.labels << [640, 20, "(Press 'down' on the keyboard to select this decision)", -5, 1]~
     - Inside source: true
     *** True Line Result
    -  5560,2580,5560,2380
    -** Processing line: ~  5560,2140,5560,2380~
    +      args.labels << [640, 20, "(Press 'down' on the keyboard to select this decision)", -5, 1]
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  5560,2140,5560,2380
    -** Processing line: ~  5560,2140,5560,1900~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  5560,2140,5560,1900
    -** Processing line: ~  5560,1900,5620,1660~
    +
    +** Processing line: ~    if decision[:option_four]~
     - Inside source: true
     *** True Line Result
    -  5560,1900,5620,1660
    -** Processing line: ~  5620,1660,5660,1460~
    +    if decision[:option_four]
    +** Processing line: ~      args.labels << [640, 700, decision[:option_four][:description], 0, 1] # option four's description~
     - Inside source: true
     *** True Line Result
    -  5620,1660,5660,1460
    -** Processing line: ~  5660,1460,5660,1300~
    +      args.labels << [640, 700, decision[:option_four][:description], 0, 1] # option four's description
    +** Processing line: ~      args.labels << [640, 675, "(Press 'up' on the keyboard to select this decision)", -5, 1]~
     - Inside source: true
     *** True Line Result
    -  5660,1460,5660,1300
    -** Processing line: ~  5500,1260,5660,1300~
    +      args.labels << [640, 675, "(Press 'up' on the keyboard to select this decision)", -5, 1]
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  5500,1260,5660,1300
    -** Processing line: ~  5340,1260,5500,1260~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -  5340,1260,5500,1260
    -** Processing line: ~  4600,1220,4840,1240~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  4600,1220,4840,1240
    -** Processing line: ~  4440,1220,4600,1220~
    +
    +** Processing line: ~  # Uses keyboard input from the user to make a decision~
     - Inside source: true
     *** True Line Result
    -  4440,1220,4600,1220
    -** Processing line: ~  4440,1080,4440,1220~
    +  # Uses keyboard input from the user to make a decision
    +** Processing line: ~  # Assigns the decision as the value of the decision_id variable~
     - Inside source: true
     *** True Line Result
    -  4440,1080,4440,1220
    -** Processing line: ~  4440,1080,4600,1020~
    +  # Assigns the decision as the value of the decision_id variable
    +** Processing line: ~  def process_inputs args~
     - Inside source: true
     *** True Line Result
    -  4440,1080,4600,1020
    -** Processing line: ~  5080,1260,5340,1260~
    +  def process_inputs args
    +** Processing line: ~    decision = current_decision args # calls current_decision method~
     - Inside source: true
     *** True Line Result
    -  5080,1260,5340,1260
    -** Processing line: ~  4840,1240,5080,1260~
    +    decision = current_decision args # calls current_decision method
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  4840,1240,5080,1260
    -** Processing line: ~  4600,1020,4940,1020~
    +
    +** Processing line: ~    if args.keyboard.key_down.left! && decision[:option_one] # if left key pressed and option one exists~
     - Inside source: true
     *** True Line Result
    -  4600,1020,4940,1020
    -** Processing line: ~  4940,1020,5220,1020~
    +    if args.keyboard.key_down.left! && decision[:option_one] # if left key pressed and option one exists
    +** Processing line: ~      args.state.decision_id = decision[:option_one][:decision] # value of option one's decision hash key is set to decision_id~
     - Inside source: true
     *** True Line Result
    -  4940,1020,5220,1020
    -** Processing line: ~  5220,1020,5560,960~
    +      args.state.decision_id = decision[:option_one][:decision] # value of option one's decision hash key is set to decision_id
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  5220,1020,5560,960
    -** Processing line: ~  5560,960,5660,860~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  5560,960,5660,860
    -** Processing line: ~  5660,740,5660,860~
    +
    +** Processing line: ~    if args.keyboard.key_down.right! && decision[:option_two] # if right key pressed and option two exists~
     - Inside source: true
     *** True Line Result
    -  5660,740,5660,860
    -** Processing line: ~  5280,740,5660,740~
    +    if args.keyboard.key_down.right! && decision[:option_two] # if right key pressed and option two exists
    +** Processing line: ~      args.state.decision_id = decision[:option_two][:decision] # value of option two's decision hash key is set to decision_id~
     - Inside source: true
     *** True Line Result
    -  5280,740,5660,740
    -** Processing line: ~  4940,780,5280,740~
    +      args.state.decision_id = decision[:option_two][:decision] # value of option two's decision hash key is set to decision_id
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  4940,780,5280,740
    -** Processing line: ~  4660,760,4940,780~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  4660,760,4940,780
    -** Processing line: ~  4500,700,4660,760~
    +
    +** Processing line: ~    if args.keyboard.key_down.down! && decision[:option_three] # if down key pressed and option three exists~
     - Inside source: true
     *** True Line Result
    -  4500,700,4660,760
    -** Processing line: ~  4500,520,4500,700~
    +    if args.keyboard.key_down.down! && decision[:option_three] # if down key pressed and option three exists
    +** Processing line: ~      args.state.decision_id = decision[:option_three][:decision] # value of option three's decision hash key is set to decision_id~
     - Inside source: true
     *** True Line Result
    -  4500,520,4500,700
    -** Processing line: ~  4500,520,4700,460~
    +      args.state.decision_id = decision[:option_three][:decision] # value of option three's decision hash key is set to decision_id
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  4500,520,4700,460
    -** Processing line: ~  4700,460,5080,440~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  4700,460,5080,440
    -** Processing line: ~  5440,420,5740,420~
    +
    +** Processing line: ~    if args.keyboard.key_down.up! && decision[:option_four] # if up key pressed and option four exists~
     - Inside source: true
     *** True Line Result
    -  5440,420,5740,420
    -** Processing line: ~  5080,440,5440,420~
    +    if args.keyboard.key_down.up! && decision[:option_four] # if up key pressed and option four exists
    +** Processing line: ~      args.state.decision_id = decision[:option_four][:decision] # value of option four's decision hash key is set to decision_id~
     - Inside source: true
     *** True Line Result
    -  5080,440,5440,420
    -** Processing line: ~  5740,420,5840,360~
    +      args.state.decision_id = decision[:option_four][:decision] # value of option four's decision hash key is set to decision_id
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  5740,420,5840,360
    -** Processing line: ~  5800,280,5840,360~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -  5800,280,5840,360
    -** Processing line: ~  5560,280,5800,280~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  5560,280,5800,280
    -** Processing line: ~  4980,300,5280,320~
    +
    +** Processing line: ~  # Uses decision_id's value to keep track of current decision being made~
     - Inside source: true
     *** True Line Result
    -  4980,300,5280,320
    -** Processing line: ~  4360,320,4660,300~
    +  # Uses decision_id's value to keep track of current decision being made
    +** Processing line: ~  def current_decision args~
     - Inside source: true
     *** True Line Result
    -  4360,320,4660,300
    -** Processing line: ~  4200,360,4360,320~
    +  def current_decision args
    +** Processing line: ~    args.state.game_definition[:decisions][args.state.decision_id] || {} # either has value or is empty~
     - Inside source: true
     *** True Line Result
    -  4200,360,4360,320
    -** Processing line: ~  5280,320,5560,280~
    +    args.state.game_definition[:decisions][args.state.decision_id] || {} # either has value or is empty
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -  5280,320,5560,280
    -** Processing line: ~  4660,300,4980,300~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  4660,300,4980,300
    -** Processing line: ~  4140,480,4200,360~
    +
    +** Processing line: ~  # Resets the game.~
     - Inside source: true
     *** True Line Result
    -  4140,480,4200,360
    -** Processing line: ~  4140,480,4140,640~
    +  # Resets the game.
    +** Processing line: ~  $gtk.reset~
     - Inside source: true
     *** True Line Result
    -  4140,480,4140,640
    -** Processing line: ~  4140,640,4200,780~
    +  $gtk.reset
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  4140,640,4200,780
    -** Processing line: ~  4200,780,4200,980~
    +
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
    +*** True Line Result
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +
    +** Processing line: ~*** Rpg Narrative - Return Of Serenity - lowrez_simulator.rb~
    +- Header detected.
    +*** True Line Result
    +
    +*** True Line Result
    +*** Rpg Narrative - Return Of Serenity - lowrez_simulator.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/99_genre_rpg_narrative/return_of_serenity/app/lowrez_simulator.rb~
     - Inside source: true
     *** True Line Result
    -  4200,780,4200,980
    -** Processing line: ~  4200,980,4220,1180~
    +  # ./samples/99_genre_rpg_narrative/return_of_serenity/app/lowrez_simulator.rb
    +** Processing line: ~  ###################################################################################~
     - Inside source: true
     *** True Line Result
    -  4200,980,4220,1180
    -** Processing line: ~  4220,1400,4220,1180~
    +  ###################################################################################
    +** Processing line: ~  # YOU CAN PLAY AROUND WITH THE CODE BELOW, BUT USE CAUTION AS THIS IS WHAT EMULATES~
     - Inside source: true
     *** True Line Result
    -  4220,1400,4220,1180
    -** Processing line: ~  4220,1400,4260,1540~
    +  # YOU CAN PLAY AROUND WITH THE CODE BELOW, BUT USE CAUTION AS THIS IS WHAT EMULATES
    +** Processing line: ~  # THE 64x64 CANVAS.~
     - Inside source: true
     *** True Line Result
    -  4220,1400,4260,1540
    -** Processing line: ~  4260,1540,4500,1540~
    +  # THE 64x64 CANVAS.
    +** Processing line: ~  ###################################################################################~
     - Inside source: true
     *** True Line Result
    -  4260,1540,4500,1540
    -** Processing line: ~  4500,1540,4700,1520~
    +  ###################################################################################
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  4500,1540,4700,1520
    -** Processing line: ~  4700,1520,4980,1540~
    +
    +** Processing line: ~  TINY_RESOLUTION       = 64~
     - Inside source: true
     *** True Line Result
    -  4700,1520,4980,1540
    -** Processing line: ~  5280,1560,5400,1560~
    +  TINY_RESOLUTION       = 64
    +** Processing line: ~  TINY_SCALE            = 720.fdiv(TINY_RESOLUTION + 5)~
     - Inside source: true
     *** True Line Result
    -  5280,1560,5400,1560
    -** Processing line: ~  4980,1540,5280,1560~
    +  TINY_SCALE            = 720.fdiv(TINY_RESOLUTION + 5)
    +** Processing line: ~  CENTER_OFFSET         = 10~
     - Inside source: true
     *** True Line Result
    -  4980,1540,5280,1560
    -** Processing line: ~  5400,1560,5400,1700~
    +  CENTER_OFFSET         = 10
    +** Processing line: ~  EMULATED_FONT_SIZE    = 20~
     - Inside source: true
     *** True Line Result
    -  5400,1560,5400,1700
    -** Processing line: ~  5400,1780,5400,1700~
    +  EMULATED_FONT_SIZE    = 20
    +** Processing line: ~  EMULATED_FONT_X_ZERO  = 0~
     - Inside source: true
     *** True Line Result
    -  5400,1780,5400,1700
    -** Processing line: ~  5340,1900,5400,1780~
    +  EMULATED_FONT_X_ZERO  = 0
    +** Processing line: ~  EMULATED_FONT_Y_ZERO  = 46~
     - Inside source: true
     *** True Line Result
    -  5340,1900,5400,1780
    -** Processing line: ~  5340,2020,5340,1900~
    +  EMULATED_FONT_Y_ZERO  = 46
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  5340,2020,5340,1900
    -** Processing line: ~  5340,2220,5340,2020~
    +
    +** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
    -  5340,2220,5340,2020
    -** Processing line: ~  5340,2220,5340,2420~
    +  def tick args
    +** Processing line: ~    sprites = []~
     - Inside source: true
     *** True Line Result
    -  5340,2220,5340,2420
    -** Processing line: ~  5340,2420,5340,2520~
    +    sprites = []
    +** Processing line: ~    labels = []~
     - Inside source: true
     *** True Line Result
    -  5340,2420,5340,2520
    -** Processing line: ~  5080,2600,5220,2580~
    +    labels = []
    +** Processing line: ~    borders = []~
     - Inside source: true
     *** True Line Result
    -  5080,2600,5220,2580
    -** Processing line: ~  5220,2580,5340,2520~
    +    borders = []
    +** Processing line: ~    solids = []~
     - Inside source: true
     *** True Line Result
    -  5220,2580,5340,2520
    -** Processing line: ~  4900,2580,5080,2600~
    +    solids = []
    +** Processing line: ~    mouse = emulate_lowrez_mouse args~
     - Inside source: true
     *** True Line Result
    -  4900,2580,5080,2600
    -** Processing line: ~  4700,2540,4900,2580~
    +    mouse = emulate_lowrez_mouse args
    +** Processing line: ~    args.state.show_gridlines = false~
     - Inside source: true
     *** True Line Result
    -  4700,2540,4900,2580
    -** Processing line: ~  4500,2540,4700,2540~
    +    args.state.show_gridlines = false
    +** Processing line: ~    lowrez_tick args, sprites, labels, borders, solids, mouse~
     - Inside source: true
     *** True Line Result
    -  4500,2540,4700,2540
    -** Processing line: ~  4220,2580,4340,2540~
    +    lowrez_tick args, sprites, labels, borders, solids, mouse
    +** Processing line: ~    render_gridlines_if_needed args~
     - Inside source: true
     *** True Line Result
    -  4220,2580,4340,2540
    -** Processing line: ~  4200,2700,4220,2580~
    +    render_gridlines_if_needed args
    +** Processing line: ~    render_mouse_crosshairs args, mouse~
     - Inside source: true
     *** True Line Result
    -  4200,2700,4220,2580
    -** Processing line: ~  4340,2540,4500,2540~
    +    render_mouse_crosshairs args, mouse
    +** Processing line: ~    emulate_lowrez_scene args, sprites, labels, borders, solids, mouse~
     - Inside source: true
     *** True Line Result
    -  4340,2540,4500,2540
    -** Processing line: ~  3980,2740,4200,2700~
    +    emulate_lowrez_scene args, sprites, labels, borders, solids, mouse
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -  3980,2740,4200,2700
    -** Processing line: ~  3840,2740,3980,2740~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  3840,2740,3980,2740
    -** Processing line: ~  3780,2640,3840,2740~
    +
    +** Processing line: ~  def emulate_lowrez_mouse args~
     - Inside source: true
     *** True Line Result
    -  3780,2640,3840,2740
    -** Processing line: ~  3780,2640,3780,2460~
    +  def emulate_lowrez_mouse args
    +** Processing line: ~    args.state.new_entity_strict(:lowrez_mouse) do |m|~
     - Inside source: true
     *** True Line Result
    -  3780,2640,3780,2460
    -** Processing line: ~  3780,2280,3780,2460~
    +    args.state.new_entity_strict(:lowrez_mouse) do |m|
    +** Processing line: ~      m.x = args.mouse.x.idiv(TINY_SCALE) - CENTER_OFFSET.idiv(TINY_SCALE) - 1~
     - Inside source: true
     *** True Line Result
    -  3780,2280,3780,2460
    -** Processing line: ~  3620,2020,3780,2100~
    +      m.x = args.mouse.x.idiv(TINY_SCALE) - CENTER_OFFSET.idiv(TINY_SCALE) - 1
    +** Processing line: ~      m.y = args.mouse.y.idiv(TINY_SCALE)~
     - Inside source: true
     *** True Line Result
    -  3620,2020,3780,2100
    -** Processing line: ~  3780,2280,3780,2100~
    +      m.y = args.mouse.y.idiv(TINY_SCALE)
    +** Processing line: ~      if args.mouse.click~
     - Inside source: true
     *** True Line Result
    -  3780,2280,3780,2100
    -** Processing line: ~  3360,2040,3620,2020~
    +      if args.mouse.click
    +** Processing line: ~        m.click = [~
     - Inside source: true
     *** True Line Result
    -  3360,2040,3620,2020
    -** Processing line: ~  3080,2040,3360,2040~
    +        m.click = [
    +** Processing line: ~          args.mouse.click.point.x.idiv(TINY_SCALE) - CENTER_OFFSET.idiv(TINY_SCALE) - 1,~
     - Inside source: true
     *** True Line Result
    -  3080,2040,3360,2040
    -** Processing line: ~  2840,2020,3080,2040~
    +          args.mouse.click.point.x.idiv(TINY_SCALE) - CENTER_OFFSET.idiv(TINY_SCALE) - 1,
    +** Processing line: ~          args.mouse.click.point.y.idiv(TINY_SCALE)~
     - Inside source: true
     *** True Line Result
    -  2840,2020,3080,2040
    -** Processing line: ~  2740,1940,2840,2020~
    +          args.mouse.click.point.y.idiv(TINY_SCALE)
    +** Processing line: ~        ]~
     - Inside source: true
     *** True Line Result
    -  2740,1940,2840,2020
    -** Processing line: ~  2740,1940,2800,1800~
    +        ]
    +** Processing line: ~        m.down = m.click~
     - Inside source: true
     *** True Line Result
    -  2740,1940,2800,1800
    -** Processing line: ~  2800,1640,2800,1800~
    +        m.down = m.click
    +** Processing line: ~      else~
     - Inside source: true
     *** True Line Result
    -  2800,1640,2800,1800
    -** Processing line: ~  2800,1640,2800,1460~
    +      else
    +** Processing line: ~        m.click = nil~
     - Inside source: true
     *** True Line Result
    -  2800,1640,2800,1460
    -** Processing line: ~  2800,1300,2800,1460~
    +        m.click = nil
    +** Processing line: ~        m.down = nil~
     - Inside source: true
     *** True Line Result
    -  2800,1300,2800,1460
    -** Processing line: ~  2700,1180,2800,1300~
    +        m.down = nil
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -  2700,1180,2800,1300
    -** Processing line: ~  2480,1140,2700,1180~
    +      end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  2480,1140,2700,1180
    -** Processing line: ~  1580,1200,1720,1200~
    +
    +** Processing line: ~      if args.mouse.up~
     - Inside source: true
     *** True Line Result
    -  1580,1200,1720,1200
    -** Processing line: ~  2240,1180,2480,1140~
    +      if args.mouse.up
    +** Processing line: ~        m.up = [~
     - Inside source: true
     *** True Line Result
    -  2240,1180,2480,1140
    -** Processing line: ~  1960,1180,2240,1180~
    +        m.up = [
    +** Processing line: ~          args.mouse.up.point.x.idiv(TINY_SCALE) - CENTER_OFFSET.idiv(TINY_SCALE) - 1,~
     - Inside source: true
     *** True Line Result
    -  1960,1180,2240,1180
    -** Processing line: ~  1720,1200,1960,1180~
    +          args.mouse.up.point.x.idiv(TINY_SCALE) - CENTER_OFFSET.idiv(TINY_SCALE) - 1,
    +** Processing line: ~          args.mouse.up.point.y.idiv(TINY_SCALE)~
     - Inside source: true
     *** True Line Result
    -  1720,1200,1960,1180
    -** Processing line: ~  1500,1320,1580,1200~
    +          args.mouse.up.point.y.idiv(TINY_SCALE)
    +** Processing line: ~        ]~
     - Inside source: true
     *** True Line Result
    -  1500,1320,1580,1200
    -** Processing line: ~  1500,1440,1500,1320~
    +        ]
    +** Processing line: ~      else~
     - Inside source: true
     *** True Line Result
    -  1500,1440,1500,1320
    -** Processing line: ~  1500,1440,1760,1480~
    +      else
    +** Processing line: ~        m.up = nil~
     - Inside source: true
     *** True Line Result
    -  1500,1440,1760,1480
    -** Processing line: ~  1760,1480,1940,1480~
    +        m.up = nil
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -  1760,1480,1940,1480
    -** Processing line: ~  1940,1480,2140,1500~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  1940,1480,2140,1500
    -** Processing line: ~  2140,1500,2320,1520~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -  2140,1500,2320,1520
    -** Processing line: ~  2400,1560,2400,1700~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  2400,1560,2400,1700
    -** Processing line: ~  2280,1820,2380,1780~
    +
    +** Processing line: ~  def render_mouse_crosshairs args, mouse~
     - Inside source: true
     *** True Line Result
    -  2280,1820,2380,1780
    -** Processing line: ~  2320,1520,2400,1560~
    +  def render_mouse_crosshairs args, mouse
    +** Processing line: ~    return unless args.state.show_gridlines~
     - Inside source: true
     *** True Line Result
    -  2320,1520,2400,1560
    -** Processing line: ~  2380,1780,2400,1700~
    +    return unless args.state.show_gridlines
    +** Processing line: ~    args.labels << [10, 25, "mouse: #{mouse.x} #{mouse.y}", 255, 255, 255]~
     - Inside source: true
     *** True Line Result
    -  2380,1780,2400,1700
    -** Processing line: ~  2080,1840,2280,1820~
    +    args.labels << [10, 25, "mouse: #{mouse.x} #{mouse.y}", 255, 255, 255]
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -  2080,1840,2280,1820
    -** Processing line: ~  1720,1820,2080,1840~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  1720,1820,2080,1840
    -** Processing line: ~  1420,1800,1720,1820~
    +
    +** Processing line: ~  def emulate_lowrez_scene args, sprites, labels, borders, solids, mouse~
     - Inside source: true
     *** True Line Result
    -  1420,1800,1720,1820
    -** Processing line: ~  1280,1800,1420,1800~
    +  def emulate_lowrez_scene args, sprites, labels, borders, solids, mouse
    +** Processing line: ~    args.render_target(:lowrez).solids  << [0, 0, 1280, 720]~
     - Inside source: true
     *** True Line Result
    -  1280,1800,1420,1800
    -** Processing line: ~  1240,1720,1280,1800~
    +    args.render_target(:lowrez).solids  << [0, 0, 1280, 720]
    +** Processing line: ~    args.render_target(:lowrez).sprites << sprites~
     - Inside source: true
     *** True Line Result
    -  1240,1720,1280,1800
    -** Processing line: ~  1240,1720,1240,1600~
    +    args.render_target(:lowrez).sprites << sprites
    +** Processing line: ~    args.render_target(:lowrez).borders << borders~
     - Inside source: true
     *** True Line Result
    -  1240,1720,1240,1600
    -** Processing line: ~  1240,1600,1280,1480~
    +    args.render_target(:lowrez).borders << borders
    +** Processing line: ~    args.render_target(:lowrez).solids  << solids~
     - Inside source: true
     *** True Line Result
    -  1240,1600,1280,1480
    -** Processing line: ~  1280,1340,1280,1480~
    +    args.render_target(:lowrez).solids  << solids
    +** Processing line: ~    args.outputs.primitives << labels.map do |l|~
     - Inside source: true
     *** True Line Result
    -  1280,1340,1280,1480
    -** Processing line: ~  1180,1280,1280,1340~
    +    args.outputs.primitives << labels.map do |l|
    +** Processing line: ~      as_label = l.label~
     - Inside source: true
     *** True Line Result
    -  1180,1280,1280,1340
    -** Processing line: ~  1000,1280,1180,1280~
    +      as_label = l.label
    +** Processing line: ~      l.text.each_char.each_with_index.map do |char, i|~
     - Inside source: true
     *** True Line Result
    -  1000,1280,1180,1280
    -** Processing line: ~  760,1280,1000,1280~
    +      l.text.each_char.each_with_index.map do |char, i|
    +** Processing line: ~        [CENTER_OFFSET + EMULATED_FONT_X_ZERO + (as_label.x * TINY_SCALE) + i * 5 * TINY_SCALE,~
     - Inside source: true
     *** True Line Result
    -  760,1280,1000,1280
    -** Processing line: ~  360,1240,540,1260~
    +        [CENTER_OFFSET + EMULATED_FONT_X_ZERO + (as_label.x * TINY_SCALE) + i * 5 * TINY_SCALE,
    +** Processing line: ~         EMULATED_FONT_Y_ZERO + (as_label.y * TINY_SCALE), char,~
     - Inside source: true
     *** True Line Result
    -  360,1240,540,1260
    -** Processing line: ~  180,1220,360,1240~
    +         EMULATED_FONT_Y_ZERO + (as_label.y * TINY_SCALE), char,
    +** Processing line: ~         EMULATED_FONT_SIZE, 0, as_label.r, as_label.g, as_label.b, as_label.a, 'fonts/dragonruby-gtk-4x4.ttf'].label~
     - Inside source: true
     *** True Line Result
    -  180,1220,360,1240
    -** Processing line: ~  540,1260,760,1280~
    +         EMULATED_FONT_SIZE, 0, as_label.r, as_label.g, as_label.b, as_label.a, 'fonts/dragonruby-gtk-4x4.ttf'].label
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -  540,1260,760,1280
    -** Processing line: ~  180,1080,180,1220~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  180,1080,180,1220
    -** Processing line: ~  180,1080,180,1000~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  180,1080,180,1000
    -** Processing line: ~  180,1000,360,940~
    +
    +** Processing line: ~    args.sprites    << [CENTER_OFFSET, 0, 1280 * TINY_SCALE, 720 * TINY_SCALE, :lowrez]~
     - Inside source: true
     *** True Line Result
    -  180,1000,360,940
    -** Processing line: ~  360,940,540,960~
    +    args.sprites    << [CENTER_OFFSET, 0, 1280 * TINY_SCALE, 720 * TINY_SCALE, :lowrez]
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -  360,940,540,960
    -** Processing line: ~  540,960,820,980~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  540,960,820,980
    -** Processing line: ~  1100,980,1200,920~
    +
    +** Processing line: ~  def render_gridlines_if_needed args~
     - Inside source: true
     *** True Line Result
    -  1100,980,1200,920
    -** Processing line: ~  820,980,1100,980~
    +  def render_gridlines_if_needed args
    +** Processing line: ~    if args.state.show_gridlines && args.static_lines.length == 0~
     - Inside source: true
     *** True Line Result
    -  820,980,1100,980
    -** Processing line: ~  6640,11860,6940,11920~
    +    if args.state.show_gridlines && args.static_lines.length == 0
    +** Processing line: ~      args.static_lines << 65.times.map do |i|~
     - Inside source: true
     *** True Line Result
    -  6640,11860,6940,11920
    -** Processing line: ~  5200,11280,5500,11280~
    +      args.static_lines << 65.times.map do |i|
    +** Processing line: ~        [~
     - Inside source: true
     *** True Line Result
    -  5200,11280,5500,11280
    -** Processing line: ~  4120,7330,4120,7230~
    +        [
    +** Processing line: ~          [CENTER_OFFSET + i * TINY_SCALE + 1,  0,~
     - Inside source: true
     *** True Line Result
    -  4120,7330,4120,7230
    -** Processing line: ~  4120,7230,4660,7250~
    +          [CENTER_OFFSET + i * TINY_SCALE + 1,  0,
    +** Processing line: ~           CENTER_OFFSET + i * TINY_SCALE + 1,  720,                128, 128, 128],~
     - Inside source: true
     *** True Line Result
    -  4120,7230,4660,7250
    -** Processing line: ~  4660,7250,4940,7250~
    +           CENTER_OFFSET + i * TINY_SCALE + 1,  720,                128, 128, 128],
    +** Processing line: ~          [CENTER_OFFSET + i * TINY_SCALE,      0,~
     - Inside source: true
     *** True Line Result
    -  4660,7250,4940,7250
    -** Processing line: ~  4940,7250,5050,7340~
    +          [CENTER_OFFSET + i * TINY_SCALE,      0,
    +** Processing line: ~           CENTER_OFFSET + i * TINY_SCALE,      720,                128, 128, 128],~
     - Inside source: true
     *** True Line Result
    -  4940,7250,5050,7340
    -** Processing line: ~  5010,7400,5050,7340~
    +           CENTER_OFFSET + i * TINY_SCALE,      720,                128, 128, 128],
    +** Processing line: ~          [CENTER_OFFSET,                       0 + i * TINY_SCALE,~
     - Inside source: true
     *** True Line Result
    -  5010,7400,5050,7340
    -** Processing line: ~  4680,7380,5010,7400~
    +          [CENTER_OFFSET,                       0 + i * TINY_SCALE,
    +** Processing line: ~           CENTER_OFFSET + 720,                 0 + i * TINY_SCALE, 128, 128, 128],~
     - Inside source: true
     *** True Line Result
    -  4680,7380,5010,7400
    -** Processing line: ~  4380,7370,4680,7380~
    +           CENTER_OFFSET + 720,                 0 + i * TINY_SCALE, 128, 128, 128],
    +** Processing line: ~          [CENTER_OFFSET,                       1 + i * TINY_SCALE,~
     - Inside source: true
     *** True Line Result
    -  4380,7370,4680,7380
    -** Processing line: ~  4120,7330,4360,7370~
    +          [CENTER_OFFSET,                       1 + i * TINY_SCALE,
    +** Processing line: ~           CENTER_OFFSET + 720,                 1 + i * TINY_SCALE, 128, 128, 128]~
     - Inside source: true
     *** True Line Result
    -  4120,7330,4360,7370
    -** Processing line: ~  4120,7670,4120,7760~
    +           CENTER_OFFSET + 720,                 1 + i * TINY_SCALE, 128, 128, 128]
    +** Processing line: ~        ]~
     - Inside source: true
     *** True Line Result
    -  4120,7670,4120,7760
    -** Processing line: ~  4120,7670,4280,7650~
    +        ]
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -  4120,7670,4280,7650
    -** Processing line: ~  4280,7650,4540,7660~
    +      end
    +** Processing line: ~    elsif !args.state.show_gridlines~
     - Inside source: true
     *** True Line Result
    -  4280,7650,4540,7660
    -** Processing line: ~  4550,7660,4820,7680~
    +    elsif !args.state.show_gridlines
    +** Processing line: ~      args.static_lines.clear~
     - Inside source: true
     *** True Line Result
    -  4550,7660,4820,7680
    -** Processing line: ~  4820,7680,4900,7730~
    +      args.static_lines.clear
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  4820,7680,4900,7730
    -** Processing line: ~  4880,7800,4900,7730~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -  4880,7800,4900,7730
    -** Processing line: ~  4620,7820,4880,7800~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  4620,7820,4880,7800
    -** Processing line: ~  4360,7790,4620,7820~
    +
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
    +*** True Line Result
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +
    +** Processing line: ~*** Rpg Narrative - Return Of Serenity - main.rb~
    +- Header detected.
    +*** True Line Result
    +
    +*** True Line Result
    +*** Rpg Narrative - Return Of Serenity - main.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/99_genre_rpg_narrative/return_of_serenity/app/main.rb~
     - Inside source: true
     *** True Line Result
    -  4360,7790,4620,7820
    -** Processing line: ~  4120,7760,4360,7790~
    +  # ./samples/99_genre_rpg_narrative/return_of_serenity/app/main.rb
    +** Processing line: ~  require 'app/require.rb'~
     - Inside source: true
     *** True Line Result
    -  4120,7760,4360,7790
    -** Processing line: ~  6840,6840,7040,6820~
    +  require 'app/require.rb'
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  6840,6840,7040,6820
    -** Processing line: ~  5720,4880,6120,4880~
    +
    +** Processing line: ~  def defaults args~
     - Inside source: true
     *** True Line Result
    -  5720,4880,6120,4880
    -** Processing line: ~  1200,920,1340,810~
    +  def defaults args
    +** Processing line: ~    args.outputs.background_color = [0, 0, 0]~
     - Inside source: true
     *** True Line Result
    -  1200,920,1340,810
    -** Processing line: ~  1340,810,1520,790~
    +    args.outputs.background_color = [0, 0, 0]
    +** Processing line: ~    args.state.last_story_line_text ||= ""~
     - Inside source: true
     *** True Line Result
    -  1340,810,1520,790
    -** Processing line: ~  1520,790,1770,800~
    +    args.state.last_story_line_text ||= ""
    +** Processing line: ~    args.state.scene_history ||= []~
     - Inside source: true
     *** True Line Result
    -  1520,790,1770,800
    -** Processing line: ~  2400,790,2600,750~
    +    args.state.scene_history ||= []
    +** Processing line: ~    args.state.storyline_history ||= []~
     - Inside source: true
     *** True Line Result
    -  2400,790,2600,750
    -** Processing line: ~  2600,750,2640,520~
    +    args.state.storyline_history ||= []
    +** Processing line: ~    args.state.word_delay ||= 8~
     - Inside source: true
     *** True Line Result
    -  2600,750,2640,520
    -** Processing line: ~  2520,470,2640,520~
    +    args.state.word_delay ||= 8
    +** Processing line: ~    if args.state.tick_count == 0~
     - Inside source: true
     *** True Line Result
    -  2520,470,2640,520
    -** Processing line: ~  2140,470,2520,470~
    +    if args.state.tick_count == 0
    +** Processing line: ~      args.gtk.stop_music~
     - Inside source: true
     *** True Line Result
    -  2140,470,2520,470
    -** Processing line: ~  1760,800,2090,800~
    +      args.gtk.stop_music
    +** Processing line: ~      args.outputs.sounds << 'sounds/static-loop.ogg'~
     - Inside source: true
     *** True Line Result
    -  1760,800,2090,800
    -** Processing line: ~  2080,800,2400,790~
    +      args.outputs.sounds << 'sounds/static-loop.ogg'
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  2080,800,2400,790
    -** Processing line: ~  1760,450,2140,470~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  1760,450,2140,470
    -** Processing line: ~  1420,450,1760,450~
    +
    +** Processing line: ~    if args.state.last_story_line_text~
     - Inside source: true
     *** True Line Result
    -  1420,450,1760,450
    -** Processing line: ~  1180,440,1420,450~
    +    if args.state.last_story_line_text
    +** Processing line: ~      lines = args.state~
     - Inside source: true
     *** True Line Result
    -  1180,440,1420,450
    -** Processing line: ~  900,480,1180,440~
    +      lines = args.state
    +** Processing line: ~                  .last_story_line_text~
     - Inside source: true
     *** True Line Result
    -  900,480,1180,440
    -** Processing line: ~  640,450,900,480~
    +                  .last_story_line_text
    +** Processing line: ~                  .gsub("-", "")~
     - Inside source: true
     *** True Line Result
    -  640,450,900,480
    -** Processing line: ~  360,440,620,450~
    +                  .gsub("-", "")
    +** Processing line: ~                  .gsub("~", "")~
     - Inside source: true
     *** True Line Result
    -  360,440,620,450
    -** Processing line: ~  120,430,360,440~
    +                  .gsub("~", "")
    +** Processing line: ~                  .wrapped_lines(50)~
     - Inside source: true
     *** True Line Result
    -  120,430,360,440
    -** Processing line: ~  0,520,120,430~
    +                  .wrapped_lines(50)
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  0,520,120,430
    -** Processing line: ~  -20,780,0,520~
    +
    +** Processing line: ~      args.outputs.labels << lines.map_with_index { |l, i| [690, 200 - (i * 25), l, 1, 0, 255, 255, 255] }~
     - Inside source: true
     *** True Line Result
    -  -20,780,0,520
    -** Processing line: ~  -20,780,-20,1020~
    +      args.outputs.labels << lines.map_with_index { |l, i| [690, 200 - (i * 25), l, 1, 0, 255, 255, 255] }
    +** Processing line: ~    elsif args.state.storyline_history[-1]~
     - Inside source: true
     *** True Line Result
    -  -20,780,-20,1020
    -** Processing line: ~  -20,1020,-20,1150~
    +    elsif args.state.storyline_history[-1]
    +** Processing line: ~      lines = args.state~
     - Inside source: true
     *** True Line Result
    -  -20,1020,-20,1150
    -** Processing line: ~  -20,1150,0,1300~
    +      lines = args.state
    +** Processing line: ~                  .storyline_history[-1]~
     - Inside source: true
     *** True Line Result
    -  -20,1150,0,1300
    -** Processing line: ~  0,1470,60,1530~
    +                  .storyline_history[-1]
    +** Processing line: ~                  .gsub("-", "")~
     - Inside source: true
     *** True Line Result
    -  0,1470,60,1530
    -** Processing line: ~  0,1300,0,1470~
    +                  .gsub("-", "")
    +** Processing line: ~                  .gsub("~", "")~
     - Inside source: true
     *** True Line Result
    -  0,1300,0,1470
    -** Processing line: ~  60,1530,360,1530~
    +                  .gsub("~", "")
    +** Processing line: ~                  .wrapped_lines(50)~
     - Inside source: true
     *** True Line Result
    -  60,1530,360,1530
    -** Processing line: ~  360,1530,660,1520~
    +                  .wrapped_lines(50)
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  360,1530,660,1520
    -** Processing line: ~  660,1520,980,1520~
    +
    +** Processing line: ~      args.outputs.labels << lines.map_with_index { |l, i| [690, 200 - (i * 25), l, 1, 0, 255, 255, 255] }~
     - Inside source: true
     *** True Line Result
    -  660,1520,980,1520
    -** Processing line: ~  980,1520,1040,1520~
    +      args.outputs.labels << lines.map_with_index { |l, i| [690, 200 - (i * 25), l, 1, 0, 255, 255, 255] }
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  980,1520,1040,1520
    -** Processing line: ~  1040,1520,1070,1560~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  1040,1520,1070,1560
    -** Processing line: ~  1070,1770,1070,1560~
    +
    +** Processing line: ~    return if args.state.current_scene~
     - Inside source: true
     *** True Line Result
    -  1070,1770,1070,1560
    -** Processing line: ~  1070,1770,1100,2010~
    +    return if args.state.current_scene
    +** Processing line: ~    set_scene(args, day_one_beginning(args))~
     - Inside source: true
     *** True Line Result
    -  1070,1770,1100,2010
    -** Processing line: ~  1070,2230,1100,2010~
    +    set_scene(args, day_one_beginning(args))
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -  1070,2230,1100,2010
    -** Processing line: ~  1070,2240,1180,2340~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  1070,2240,1180,2340
    -** Processing line: ~  1180,2340,1580,2340~
    +
    +** Processing line: ~  def inputs_move_player args~
     - Inside source: true
     *** True Line Result
    -  1180,2340,1580,2340
    -** Processing line: ~  1580,2340,1940,2350~
    +  def inputs_move_player args
    +** Processing line: ~    if args.state.scene_changed_at.elapsed_time > 5~
     - Inside source: true
     *** True Line Result
    -  1580,2340,1940,2350
    -** Processing line: ~  1940,2350,2440,2350~
    +    if args.state.scene_changed_at.elapsed_time > 5
    +** Processing line: ~      if args.keyboard.down  || args.keyboard.s || args.keyboard.j~
     - Inside source: true
     *** True Line Result
    -  1940,2350,2440,2350
    -** Processing line: ~  2440,2350,2560,2380~
    +      if args.keyboard.down  || args.keyboard.s || args.keyboard.j
    +** Processing line: ~        args.state.player.y -= 0.25~
     - Inside source: true
     *** True Line Result
    -  2440,2350,2560,2380
    -** Processing line: ~  2560,2380,2600,2540~
    +        args.state.player.y -= 0.25
    +** Processing line: ~      elsif args.keyboard.up || args.keyboard.w || args.keyboard.k~
     - Inside source: true
     *** True Line Result
    -  2560,2380,2600,2540
    -** Processing line: ~  2810,2640,3140,2680~
    +      elsif args.keyboard.up || args.keyboard.w || args.keyboard.k
    +** Processing line: ~        args.state.player.y += 0.25~
     - Inside source: true
     *** True Line Result
    -  2810,2640,3140,2680
    -** Processing line: ~  2600,2540,2810,2640~
    +        args.state.player.y += 0.25
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -  2600,2540,2810,2640
    -** Processing line: ~  3140,2680,3230,2780~
    +      end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  3140,2680,3230,2780
    -** Processing line: ~  3230,2780,3260,2970~
    +
    +** Processing line: ~      if args.keyboard.left     || args.keyboard.a  || args.keyboard.h~
     - Inside source: true
     *** True Line Result
    -  3230,2780,3260,2970
    -** Processing line: ~  3230,3220,3260,2970~
    +      if args.keyboard.left     || args.keyboard.a  || args.keyboard.h
    +** Processing line: ~        args.state.player.x -= 0.25~
     - Inside source: true
     *** True Line Result
    -  3230,3220,3260,2970
    -** Processing line: ~  3200,3470,3230,3220~
    +        args.state.player.x -= 0.25
    +** Processing line: ~      elsif args.keyboard.right || args.keyboard.d  || args.keyboard.l~
     - Inside source: true
     *** True Line Result
    -  3200,3470,3230,3220
    -** Processing line: ~  3200,3480,3210,3760~
    +      elsif args.keyboard.right || args.keyboard.d  || args.keyboard.l
    +** Processing line: ~        args.state.player.x += 0.25~
     - Inside source: true
     *** True Line Result
    -  3200,3480,3210,3760
    -** Processing line: ~  3210,3760,3210,4040~
    +        args.state.player.x += 0.25
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -  3210,3760,3210,4040
    -** Processing line: ~  3200,4040,3230,4310~
    +      end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  3200,4040,3230,4310
    -** Processing line: ~  3210,4530,3230,4310~
    +
    +** Processing line: ~      args.state.player.y = 60 if args.state.player.y > 63~
     - Inside source: true
     *** True Line Result
    -  3210,4530,3230,4310
    -** Processing line: ~  3210,4530,3230,4730~
    +      args.state.player.y = 60 if args.state.player.y > 63
    +** Processing line: ~      args.state.player.y =  0 if args.state.player.y < -3~
     - Inside source: true
     *** True Line Result
    -  3210,4530,3230,4730
    -** Processing line: ~  3230,4960,3230,4730~
    +      args.state.player.y =  0 if args.state.player.y < -3
    +** Processing line: ~      args.state.player.x = 60 if args.state.player.x > 63~
     - Inside source: true
     *** True Line Result
    -  3230,4960,3230,4730
    -** Processing line: ~  3230,4960,3260,5190~
    +      args.state.player.x = 60 if args.state.player.x > 63
    +** Processing line: ~      args.state.player.x =  0 if args.state.player.x < -3~
     - Inside source: true
     *** True Line Result
    -  3230,4960,3260,5190
    -** Processing line: ~  3170,5330,3260,5190~
    +      args.state.player.x =  0 if args.state.player.x < -3
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  3170,5330,3260,5190
    -** Processing line: ~  2920,5330,3170,5330~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -  2920,5330,3170,5330
    -** Processing line: ~  2660,5360,2920,5330~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  2660,5360,2920,5330
    -** Processing line: ~  2420,5330,2660,5360~
    +
    +** Processing line: ~  def null_or_empty? ary~
     - Inside source: true
     *** True Line Result
    -  2420,5330,2660,5360
    -** Processing line: ~  2200,5280,2400,5330~
    +  def null_or_empty? ary
    +** Processing line: ~    return true unless ary~
     - Inside source: true
     *** True Line Result
    -  2200,5280,2400,5330
    -** Processing line: ~  2020,5280,2200,5280~
    +    return true unless ary
    +** Processing line: ~    return true if ary.length == 0~
     - Inside source: true
     *** True Line Result
    -  2020,5280,2200,5280
    -** Processing line: ~  1840,5260,2020,5280~
    +    return true if ary.length == 0
    +** Processing line: ~    return false~
     - Inside source: true
     *** True Line Result
    -  1840,5260,2020,5280
    -** Processing line: ~  1660,5280,1840,5260~
    +    return false
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -  1660,5280,1840,5260
    -** Processing line: ~  1500,5300,1660,5280~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  1500,5300,1660,5280
    -** Processing line: ~  1360,5270,1500,5300~
    +
    +** Processing line: ~  def calc_storyline_hotspot args~
     - Inside source: true
     *** True Line Result
    -  1360,5270,1500,5300
    -** Processing line: ~  1200,5290,1340,5270~
    +  def calc_storyline_hotspot args
    +** Processing line: ~    hotspots = args.state.storylines.find_all do |hs|~
     - Inside source: true
     *** True Line Result
    -  1200,5290,1340,5270
    -** Processing line: ~  1070,5400,1200,5290~
    +    hotspots = args.state.storylines.find_all do |hs|
    +** Processing line: ~      args.state.player.inside_rect?(hs.shift_rect(-2, 0))~
     - Inside source: true
     *** True Line Result
    -  1070,5400,1200,5290
    -** Processing line: ~  1040,5630,1070,5400~
    +      args.state.player.inside_rect?(hs.shift_rect(-2, 0))
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  1040,5630,1070,5400
    -** Processing line: ~  1000,5900,1040,5630~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  1000,5900,1040,5630
    -** Processing line: ~  980,6170,1000,5900~
    +
    +** Processing line: ~    if !null_or_empty?(hotspots) && !args.state.inside_storyline_hotspot~
     - Inside source: true
     *** True Line Result
    -  980,6170,1000,5900
    -** Processing line: ~  980,6280,980,6170~
    +    if !null_or_empty?(hotspots) && !args.state.inside_storyline_hotspot
    +** Processing line: ~      _, _, _, _, storyline = hotspots.first~
     - Inside source: true
     *** True Line Result
    -  980,6280,980,6170
    -** Processing line: ~  980,6540,980,6280~
    +      _, _, _, _, storyline = hotspots.first
    +** Processing line: ~      queue_storyline_text(args, storyline)~
     - Inside source: true
     *** True Line Result
    -  980,6540,980,6280
    -** Processing line: ~  980,6540,1040,6720~
    +      queue_storyline_text(args, storyline)
    +** Processing line: ~      args.state.inside_storyline_hotspot = true~
     - Inside source: true
     *** True Line Result
    -  980,6540,1040,6720
    -** Processing line: ~  1040,6720,1360,6730~
    +      args.state.inside_storyline_hotspot = true
    +** Processing line: ~    elsif null_or_empty?(hotspots)~
     - Inside source: true
     *** True Line Result
    -  1040,6720,1360,6730
    -** Processing line: ~  1360,6730,1760,6710~
    +    elsif null_or_empty?(hotspots)
    +** Processing line: ~      args.state.inside_storyline_hotspot = false~
     - Inside source: true
     *** True Line Result
    -  1360,6730,1760,6710
    -** Processing line: ~  2110,6720,2420,6730~
    +      args.state.inside_storyline_hotspot = false
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  2110,6720,2420,6730
    -** Processing line: ~  1760,6710,2110,6720~
    +
    +** Processing line: ~      args.state.storyline_queue_empty_at ||= args.state.tick_count~
     - Inside source: true
     *** True Line Result
    -  1760,6710,2110,6720
    -** Processing line: ~  2420,6730,2640,6720~
    +      args.state.storyline_queue_empty_at ||= args.state.tick_count
    +** Processing line: ~      args.state.is_storyline_dialog_active = false~
     - Inside source: true
     *** True Line Result
    -  2420,6730,2640,6720
    -** Processing line: ~  2640,6720,2970,6720~
    +      args.state.is_storyline_dialog_active = false
    +** Processing line: ~      args.state.scene_storyline_queue.clear~
     - Inside source: true
     *** True Line Result
    -  2640,6720,2970,6720
    -** Processing line: ~  2970,6720,3160,6700~
    +      args.state.scene_storyline_queue.clear
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  2970,6720,3160,6700
    -** Processing line: ~  3160,6700,3240,6710~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -  3160,6700,3240,6710
    -** Processing line: ~  3240,6710,3260,6890~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  3240,6710,3260,6890
    -** Processing line: ~  3260,7020,3260,6890~
    +
    +** Processing line: ~  def calc_scenes args~
     - Inside source: true
     *** True Line Result
    -  3260,7020,3260,6890
    -** Processing line: ~  3230,7180,3260,7020~
    +  def calc_scenes args
    +** Processing line: ~    hotspots = args.state.scenes.find_all do |hs|~
     - Inside source: true
     *** True Line Result
    -  3230,7180,3260,7020
    -** Processing line: ~  3230,7350,3230,7180~
    +    hotspots = args.state.scenes.find_all do |hs|
    +** Processing line: ~      args.state.player.inside_rect?(hs.shift_rect(-2, 0))~
     - Inside source: true
     *** True Line Result
    -  3230,7350,3230,7180
    -** Processing line: ~  3210,7510,3230,7350~
    +      args.state.player.inside_rect?(hs.shift_rect(-2, 0))
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  3210,7510,3230,7350
    -** Processing line: ~  3210,7510,3210,7690~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  3210,7510,3210,7690
    -** Processing line: ~  3210,7870,3210,7690~
    +
    +** Processing line: ~    if !null_or_empty?(hotspots) && !args.state.inside_scene_hotspot~
     - Inside source: true
     *** True Line Result
    -  3210,7870,3210,7690
    -** Processing line: ~  3210,7870,3210,7980~
    +    if !null_or_empty?(hotspots) && !args.state.inside_scene_hotspot
    +** Processing line: ~      _, _, _, _, scene_method_or_hash = hotspots.first~
     - Inside source: true
     *** True Line Result
    -  3210,7870,3210,7980
    -** Processing line: ~  3200,8120,3210,7980~
    +      _, _, _, _, scene_method_or_hash = hotspots.first
    +** Processing line: ~      if scene_method_or_hash.is_a? Symbol~
     - Inside source: true
     *** True Line Result
    -  3200,8120,3210,7980
    -** Processing line: ~  3200,8330,3200,8120~
    +      if scene_method_or_hash.is_a? Symbol
    +** Processing line: ~        set_scene(args, send(scene_method_or_hash, args))~
     - Inside source: true
     *** True Line Result
    -  3200,8330,3200,8120
    -** Processing line: ~  3160,8520,3200,8330~
    +        set_scene(args, send(scene_method_or_hash, args))
    +** Processing line: ~        args.state.last_hotspot_scene = scene_method_or_hash~
     - Inside source: true
     *** True Line Result
    -  3160,8520,3200,8330
    -** Processing line: ~  2460,11100,2480,11020~
    +        args.state.last_hotspot_scene = scene_method_or_hash
    +** Processing line: ~        args.state.scene_history << scene_method_or_hash~
     - Inside source: true
     *** True Line Result
    -  2460,11100,2480,11020
    -** Processing line: ~  2200,11180,2460,11100~
    +        args.state.scene_history << scene_method_or_hash
    +** Processing line: ~      else~
     - Inside source: true
     *** True Line Result
    -  2200,11180,2460,11100
    -** Processing line: ~  1260,11350,1600,11320~
    +      else
    +** Processing line: ~        set_scene(args, scene_method_or_hash)~
     - Inside source: true
     *** True Line Result
    -  1260,11350,1600,11320
    -** Processing line: ~  600,11430,930,11400~
    +        set_scene(args, scene_method_or_hash)
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -  600,11430,930,11400
    -** Processing line: ~  180,11340,620,11430~
    +      end
    +** Processing line: ~      args.state.inside_scene_hotspot = true~
     - Inside source: true
     *** True Line Result
    -  180,11340,620,11430
    -** Processing line: ~  1600,11320,1910,11280~
    +      args.state.inside_scene_hotspot = true
    +** Processing line: ~    elsif null_or_empty?(hotspots)~
     - Inside source: true
     *** True Line Result
    -  1600,11320,1910,11280
    -** Processing line: ~  1910,11280,2200,11180~
    +    elsif null_or_empty?(hotspots)
    +** Processing line: ~      args.state.inside_scene_hotspot = false~
     - Inside source: true
     *** True Line Result
    -  1910,11280,2200,11180
    -** Processing line: ~  923.0029599285435,11398.99893503157,1264.002959928544,11351.99893503157~
    +      args.state.inside_scene_hotspot = false
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  923.0029599285435,11398.99893503157,1264.002959928544,11351.99893503157
    -** Processing line: ~#+end_src~
    -- Line was identified as the end of a code block.
    +    end
    +** Processing line: ~  end~
    +- Inside source: true
     *** True Line Result
    -#+end_src
    +  end
     ** Processing line: ~~
    -- End of paragraph detected.
    -*** True Line Result
    -
    -** Processing line: ~*** Platformer - The Little Probe - Data - level_lava.txt~
    -- Header detected.
    -*** True Line Result
    -
    -*** True Line Result
    -*** Platformer - The Little Probe - Data - level_lava.txt
    -** Processing line: ~#+begin_src ruby~
    -- Line was identified as the beginning of a code block.
    +- Inside source: true
     *** True Line Result
     
    -*** True Line Result
    -#+begin_src ruby
    -** Processing line: ~  # ./samples/99_genre_platformer/the_little_probe/data/level_lava.txt~
    +** Processing line: ~  def null_or_whitespace? word~
     - Inside source: true
     *** True Line Result
    -  # ./samples/99_genre_platformer/the_little_probe/data/level_lava.txt
    -** Processing line: ~  100,10740,500,10780~
    +  def null_or_whitespace? word
    +** Processing line: ~    return true if !word~
     - Inside source: true
     *** True Line Result
    -  100,10740,500,10780
    -** Processing line: ~  500,10780,960,10760~
    +    return true if !word
    +** Processing line: ~    return true if word.strip.length == 0~
     - Inside source: true
     *** True Line Result
    -  500,10780,960,10760
    -** Processing line: ~  960,10760,1340,10760~
    +    return true if word.strip.length == 0
    +** Processing line: ~    return false~
     - Inside source: true
     *** True Line Result
    -  960,10760,1340,10760
    -** Processing line: ~  1380,10760,1820,10780~
    +    return false
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -  1380,10760,1820,10780
    -** Processing line: ~  1820,10780,2240,10780~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  1820,10780,2240,10780
    -** Processing line: ~  2280,10780,2740,10740~
    +
    +** Processing line: ~  def calc_storyline_presentation args~
     - Inside source: true
     *** True Line Result
    -  2280,10780,2740,10740
    -** Processing line: ~  2740,10740,3000,10780~
    +  def calc_storyline_presentation args
    +** Processing line: ~    return unless args.state.tick_count > args.state.next_storyline~
     - Inside source: true
     *** True Line Result
    -  2740,10740,3000,10780
    -** Processing line: ~  3000,10780,3140,11020~
    +    return unless args.state.tick_count > args.state.next_storyline
    +** Processing line: ~    return unless args.state.scene_storyline_queue~
     - Inside source: true
     *** True Line Result
    -  3000,10780,3140,11020
    -** Processing line: ~  -520,8820,-480,9160~
    +    return unless args.state.scene_storyline_queue
    +** Processing line: ~    next_storyline = args.state.scene_storyline_queue.shift~
     - Inside source: true
     *** True Line Result
    -  -520,8820,-480,9160
    -** Processing line: ~  -520,8480,-520,8820~
    +    next_storyline = args.state.scene_storyline_queue.shift
    +** Processing line: ~    if null_or_whitespace? next_storyline~
     - Inside source: true
     *** True Line Result
    -  -520,8480,-520,8820
    -** Processing line: ~  -520,8480,-480,8180~
    +    if null_or_whitespace? next_storyline
    +** Processing line: ~      args.state.storyline_queue_empty_at ||= args.state.tick_count~
     - Inside source: true
     *** True Line Result
    -  -520,8480,-480,8180
    -** Processing line: ~  -480,8180,-200,8120~
    +      args.state.storyline_queue_empty_at ||= args.state.tick_count
    +** Processing line: ~      args.state.is_storyline_dialog_active = false~
     - Inside source: true
     *** True Line Result
    -  -480,8180,-200,8120
    -** Processing line: ~  -200,8120,100,8220~
    +      args.state.is_storyline_dialog_active = false
    +** Processing line: ~      return~
     - Inside source: true
     *** True Line Result
    -  -200,8120,100,8220
    -** Processing line: ~  100,8220,420,8240~
    +      return
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  100,8220,420,8240
    -** Processing line: ~  420,8240,760,8260~
    +    end
    +** Processing line: ~    args.state.storyline_to_show = next_storyline~
     - Inside source: true
     *** True Line Result
    -  420,8240,760,8260
    -** Processing line: ~  760,8260,1140,8280~
    +    args.state.storyline_to_show = next_storyline
    +** Processing line: ~    args.state.is_storyline_dialog_active = true~
     - Inside source: true
     *** True Line Result
    -  760,8260,1140,8280
    -** Processing line: ~  1140,8280,1500,8200~
    +    args.state.is_storyline_dialog_active = true
    +** Processing line: ~    args.state.storyline_queue_empty_at = nil~
     - Inside source: true
     *** True Line Result
    -  1140,8280,1500,8200
    -** Processing line: ~  1500,8200,1880,8240~
    +    args.state.storyline_queue_empty_at = nil
    +** Processing line: ~    if next_storyline.end_with?(".") || next_storyline.end_with?("!") || next_storyline.end_with?("?") || next_storyline.end_with?("\"")~
     - Inside source: true
     *** True Line Result
    -  1500,8200,1880,8240
    -** Processing line: ~  1880,8240,2240,8260~
    +    if next_storyline.end_with?(".") || next_storyline.end_with?("!") || next_storyline.end_with?("?") || next_storyline.end_with?("\"")
    +** Processing line: ~      args.state.next_storyline += 60~
     - Inside source: true
     *** True Line Result
    -  1880,8240,2240,8260
    -** Processing line: ~  2240,8260,2320,8480~
    +      args.state.next_storyline += 60
    +** Processing line: ~    elsif next_storyline.end_with?(",")~
     - Inside source: true
     *** True Line Result
    -  2240,8260,2320,8480
    -** Processing line: ~  2320,8480,2380,8680~
    +    elsif next_storyline.end_with?(",")
    +** Processing line: ~      args.state.next_storyline += 50~
     - Inside source: true
     *** True Line Result
    -  2320,8480,2380,8680
    -** Processing line: ~  2240,8860,2380,8680~
    +      args.state.next_storyline += 50
    +** Processing line: ~    elsif next_storyline.end_with?(":")~
     - Inside source: true
     *** True Line Result
    -  2240,8860,2380,8680
    -** Processing line: ~  2240,9080,2240,8860~
    +    elsif next_storyline.end_with?(":")
    +** Processing line: ~      args.state.next_storyline += 60~
     - Inside source: true
     *** True Line Result
    -  2240,9080,2240,8860
    -** Processing line: ~  2240,9080,2320,9260~
    +      args.state.next_storyline += 60
    +** Processing line: ~    else~
     - Inside source: true
     *** True Line Result
    -  2240,9080,2320,9260
    -** Processing line: ~  2320,9260,2480,9440~
    +    else
    +** Processing line: ~      default_word_delay = 13 + args.state.word_delay - 8~
     - Inside source: true
     *** True Line Result
    -  2320,9260,2480,9440
    -** Processing line: ~  2480,9440,2600,9640~
    +      default_word_delay = 13 + args.state.word_delay - 8
    +** Processing line: ~      if next_storyline.gsub("-", "").gsub("~", "").length <= 4~
     - Inside source: true
     *** True Line Result
    -  2480,9440,2600,9640
    -** Processing line: ~  2480,9840,2600,9640~
    +      if next_storyline.gsub("-", "").gsub("~", "").length <= 4
    +** Processing line: ~        default_word_delay = 11 + args.state.word_delay - 8~
     - Inside source: true
     *** True Line Result
    -  2480,9840,2600,9640
    -** Processing line: ~  2400,10020,2480,9840~
    +        default_word_delay = 11 + args.state.word_delay - 8
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -  2400,10020,2480,9840
    -** Processing line: ~  2240,10080,2400,10020~
    +      end
    +** Processing line: ~      number_of_syllabals = next_storyline.length - next_storyline.gsub("-", "").length~
     - Inside source: true
     *** True Line Result
    -  2240,10080,2400,10020
    -** Processing line: ~  1960,10080,2240,10080~
    +      number_of_syllabals = next_storyline.length - next_storyline.gsub("-", "").length
    +** Processing line: ~      args.state.next_storyline += default_word_delay + number_of_syllabals * (args.state.word_delay + 1)~
     - Inside source: true
     *** True Line Result
    -  1960,10080,2240,10080
    -** Processing line: ~  1720,10080,1960,10080~
    +      args.state.next_storyline += default_word_delay + number_of_syllabals * (args.state.word_delay + 1)
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  1720,10080,1960,10080
    -** Processing line: ~  1460,10080,1720,10080~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -  1460,10080,1720,10080
    -** Processing line: ~  1180,10080,1420,10080~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  1180,10080,1420,10080
    -** Processing line: ~  900,10080,1180,10080~
    +
    +** Processing line: ~  def inputs_reload_current_scene args~
     - Inside source: true
     *** True Line Result
    -  900,10080,1180,10080
    -** Processing line: ~  640,10080,900,10080~
    +  def inputs_reload_current_scene args
    +** Processing line: ~    return~
     - Inside source: true
     *** True Line Result
    -  640,10080,900,10080
    -** Processing line: ~  640,10080,640,9900~
    +    return
    +** Processing line: ~    if args.inputs.keyboard.key_down.r!~
     - Inside source: true
     *** True Line Result
    -  640,10080,640,9900
    -** Processing line: ~  60,10520,100,10740~
    +    if args.inputs.keyboard.key_down.r!
    +** Processing line: ~      reload_current_scene~
     - Inside source: true
     *** True Line Result
    -  60,10520,100,10740
    -** Processing line: ~  40,10240,60,10520~
    +      reload_current_scene
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  40,10240,60,10520
    -** Processing line: ~  40,10240,40,9960~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -  40,10240,40,9960
    -** Processing line: ~  40,9960,40,9680~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  40,9960,40,9680
    -** Processing line: ~  40,9680,40,9360~
    +
    +** Processing line: ~  def inputs_dismiss_current_storyline args~
     - Inside source: true
     *** True Line Result
    -  40,9680,40,9360
    -** Processing line: ~  40,9360,60,9080~
    +  def inputs_dismiss_current_storyline args
    +** Processing line: ~    if args.inputs.keyboard.key_down.x!~
     - Inside source: true
     *** True Line Result
    -  40,9360,60,9080
    -** Processing line: ~  60,9080,100,8860~
    +    if args.inputs.keyboard.key_down.x!
    +** Processing line: ~      args.state.scene_storyline_queue.clear~
     - Inside source: true
     *** True Line Result
    -  60,9080,100,8860
    -** Processing line: ~  100,8860,460,9040~
    +      args.state.scene_storyline_queue.clear
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  100,8860,460,9040
    -** Processing line: ~  460,9040,760,9220~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -  460,9040,760,9220
    -** Processing line: ~  760,9220,1140,9220~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  760,9220,1140,9220
    -** Processing line: ~  1140,9220,1720,9200~
    +
    +** Processing line: ~  def inputs_restart_game args~
     - Inside source: true
     *** True Line Result
    -  1140,9220,1720,9200
    -** Processing line: ~  -660,11580,-600,11420~
    +  def inputs_restart_game args
    +** Processing line: ~    if args.inputs.keyboard.exclamation_point~
     - Inside source: true
     *** True Line Result
    -  -660,11580,-600,11420
    -** Processing line: ~  -660,11800,-660,11580~
    +    if args.inputs.keyboard.exclamation_point
    +** Processing line: ~      args.gtk.reset_state~
     - Inside source: true
     *** True Line Result
    -  -660,11800,-660,11580
    -** Processing line: ~  -660,12000,-660,11800~
    +      args.gtk.reset_state
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  -660,12000,-660,11800
    -** Processing line: ~  -660,12000,-600,12220~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -  -660,12000,-600,12220
    -** Processing line: ~  -600,12220,-600,12440~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  -600,12220,-600,12440
    -** Processing line: ~  -600,12440,-600,12640~
    +
    +** Processing line: ~  def inputs_change_word_delay args~
     - Inside source: true
     *** True Line Result
    -  -600,12440,-600,12640
    -** Processing line: ~  -600,11240,-260,11280~
    +  def inputs_change_word_delay args
    +** Processing line: ~    if args.inputs.keyboard.key_down.plus || args.inputs.keyboard.key_down.equal_sign~
     - Inside source: true
     *** True Line Result
    -  -600,11240,-260,11280
    -** Processing line: ~  -260,11280,100,11240~
    +    if args.inputs.keyboard.key_down.plus || args.inputs.keyboard.key_down.equal_sign
    +** Processing line: ~      args.state.word_delay -= 2~
     - Inside source: true
     *** True Line Result
    -  -260,11280,100,11240
    -** Processing line: ~  9000,12360,9020,12400~
    +      args.state.word_delay -= 2
    +** Processing line: ~      if args.state.word_delay < 0~
     - Inside source: true
     *** True Line Result
    -  9000,12360,9020,12400
    -** Processing line: ~  9020,12620,9020,12400~
    +      if args.state.word_delay < 0
    +** Processing line: ~        args.state.word_delay = 0~
     - Inside source: true
     *** True Line Result
    -  9020,12620,9020,12400
    -** Processing line: ~  9020,12840,9020,12620~
    +        args.state.word_delay = 0
    +** Processing line: ~        # queue_storyline_text args, "Text speed at MAXIMUM. Geez, how fast do you read?"~
     - Inside source: true
     *** True Line Result
    -  9020,12840,9020,12620
    -** Processing line: ~  9020,13060,9020,12840~
    +        # queue_storyline_text args, "Text speed at MAXIMUM. Geez, how fast do you read?"
    +** Processing line: ~      else~
     - Inside source: true
     *** True Line Result
    -  9020,13060,9020,12840
    -** Processing line: ~  9020,13060,9020,13240~
    +      else
    +** Processing line: ~        # queue_storyline_text args, "Text speed INCREASED."~
     - Inside source: true
     *** True Line Result
    -  9020,13060,9020,13240
    -** Processing line: ~  9020,13240,9020,13420~
    +        # queue_storyline_text args, "Text speed INCREASED."
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -  9020,13240,9020,13420
    -** Processing line: ~  9020,13420,9020,13600~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  9020,13420,9020,13600
    -** Processing line: ~  9020,13600,9020,13780~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  9020,13600,9020,13780
    -** Processing line: ~  8880,13900,9020,13780~
    +
    +** Processing line: ~    if args.inputs.keyboard.key_down.hyphen || args.inputs.keyboard.key_down.underscore~
     - Inside source: true
     *** True Line Result
    -  8880,13900,9020,13780
    -** Processing line: ~  8560,13800,8880,13900~
    +    if args.inputs.keyboard.key_down.hyphen || args.inputs.keyboard.key_down.underscore
    +** Processing line: ~      args.state.word_delay += 2~
     - Inside source: true
     *** True Line Result
    -  8560,13800,8880,13900
    -** Processing line: ~  8220,13780,8560,13800~
    +      args.state.word_delay += 2
    +** Processing line: ~      # queue_storyline_text args, "Text speed DECREASED."~
     - Inside source: true
     *** True Line Result
    -  8220,13780,8560,13800
    -** Processing line: ~  7860,13760,8220,13780~
    +      # queue_storyline_text args, "Text speed DECREASED."
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  7860,13760,8220,13780
    -** Processing line: ~  7640,13780,7860,13760~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -  7640,13780,7860,13760
    -** Processing line: ~  7360,13800,7640,13780~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  7360,13800,7640,13780
    -** Processing line: ~  7100,13800,7360,13800~
    +
    +** Processing line: ~  def multiple_lines args, x, y, texts, size = 0, minimum_alpha = nil~
     - Inside source: true
     *** True Line Result
    -  7100,13800,7360,13800
    -** Processing line: ~  6540,13760,6800,13780~
    +  def multiple_lines args, x, y, texts, size = 0, minimum_alpha = nil
    +** Processing line: ~    texts.each_with_index.map do |t, i|~
     - Inside source: true
     *** True Line Result
    -  6540,13760,6800,13780
    -** Processing line: ~  6800,13780,7100,13800~
    +    texts.each_with_index.map do |t, i|
    +** Processing line: ~      [x, y - i * (25 + size * 2), t, size, 0, 255, 255, 255, adornments_alpha(args, 255, minimum_alpha)]~
     - Inside source: true
     *** True Line Result
    -  6800,13780,7100,13800
    -** Processing line: ~  6280,13760,6540,13760~
    +      [x, y - i * (25 + size * 2), t, size, 0, 255, 255, 255, adornments_alpha(args, 255, minimum_alpha)]
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  6280,13760,6540,13760
    -** Processing line: ~  5760,13760,6280,13760~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -  5760,13760,6280,13760
    -** Processing line: ~  5220,13780,5760,13760~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  5220,13780,5760,13760
    -** Processing line: ~  4700,13760,5220,13780~
    +
    +** Processing line: ~  def lowrez_tick args, lowrez_sprites, lowrez_labels, lowrez_borders, lowrez_solids, lowrez_mouse~
     - Inside source: true
     *** True Line Result
    -  4700,13760,5220,13780
    -** Processing line: ~  4200,13740,4700,13760~
    +  def lowrez_tick args, lowrez_sprites, lowrez_labels, lowrez_borders, lowrez_solids, lowrez_mouse
    +** Processing line: ~    # args.state.show_gridlines = true~
     - Inside source: true
     *** True Line Result
    -  4200,13740,4700,13760
    -** Processing line: ~  3680,13720,4200,13740~
    +    # args.state.show_gridlines = true
    +** Processing line: ~    defaults args~
     - Inside source: true
     *** True Line Result
    -  3680,13720,4200,13740
    -** Processing line: ~  3140,13700,3680,13720~
    +    defaults args
    +** Processing line: ~    render_current_scene args, lowrez_sprites, lowrez_labels, lowrez_solids~
     - Inside source: true
     *** True Line Result
    -  3140,13700,3680,13720
    -** Processing line: ~  2600,13680,3140,13700~
    +    render_current_scene args, lowrez_sprites, lowrez_labels, lowrez_solids
    +** Processing line: ~    render_controller args, lowrez_borders~
     - Inside source: true
     *** True Line Result
    -  2600,13680,3140,13700
    -** Processing line: ~  2040,13940,2600,13680~
    +    render_controller args, lowrez_borders
    +** Processing line: ~    lowrez_solids << [0, 0, 64, 64, 0, 0, 0]~
     - Inside source: true
     *** True Line Result
    -  2040,13940,2600,13680
    -** Processing line: ~  1640,13940,2040,13940~
    +    lowrez_solids << [0, 0, 64, 64, 0, 0, 0]
    +** Processing line: ~    calc_storyline_presentation args~
     - Inside source: true
     *** True Line Result
    -  1640,13940,2040,13940
    -** Processing line: ~  1200,13960,1640,13940~
    +    calc_storyline_presentation args
    +** Processing line: ~    calc_scenes args~
     - Inside source: true
     *** True Line Result
    -  1200,13960,1640,13940
    -** Processing line: ~  840,14000,1200,13960~
    +    calc_scenes args
    +** Processing line: ~    calc_storyline_hotspot args~
     - Inside source: true
     *** True Line Result
    -  840,14000,1200,13960
    -** Processing line: ~  300,13960,840,14000~
    +    calc_storyline_hotspot args
    +** Processing line: ~    inputs_move_player args~
     - Inside source: true
     *** True Line Result
    -  300,13960,840,14000
    -** Processing line: ~  -200,13900,300,13960~
    +    inputs_move_player args
    +** Processing line: ~    inputs_print_mouse_rect args, lowrez_mouse~
     - Inside source: true
     *** True Line Result
    -  -200,13900,300,13960
    -** Processing line: ~  -600,12840,-600,12640~
    +    inputs_print_mouse_rect args, lowrez_mouse
    +** Processing line: ~    inputs_reload_current_scene args~
     - Inside source: true
     *** True Line Result
    -  -600,12840,-600,12640
    -** Processing line: ~  -600,13140,-600,12840~
    +    inputs_reload_current_scene args
    +** Processing line: ~    inputs_dismiss_current_storyline args~
     - Inside source: true
     *** True Line Result
    -  -600,13140,-600,12840
    -** Processing line: ~  -600,13140,-600,13420~
    +    inputs_dismiss_current_storyline args
    +** Processing line: ~    inputs_change_word_delay args~
     - Inside source: true
     *** True Line Result
    -  -600,13140,-600,13420
    -** Processing line: ~  -600,13700,-600,13420~
    +    inputs_change_word_delay args
    +** Processing line: ~    inputs_restart_game args~
     - Inside source: true
     *** True Line Result
    -  -600,13700,-600,13420
    -** Processing line: ~  -600,13700,-600,13820~
    +    inputs_restart_game args
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -  -600,13700,-600,13820
    -** Processing line: ~  -600,13820,-200,13900~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  -600,13820,-200,13900
    -** Processing line: ~  -600,11240,-560,11000~
    +
    +** Processing line: ~  def render_controller args, lowrez_borders~
     - Inside source: true
     *** True Line Result
    -  -600,11240,-560,11000
    -** Processing line: ~  -560,11000,-480,10840~
    +  def render_controller args, lowrez_borders
    +** Processing line: ~    args.state.up_button    = [85, 40, 15, 15, 255, 255, 255]~
     - Inside source: true
     *** True Line Result
    -  -560,11000,-480,10840
    -** Processing line: ~  -520,10660,-480,10840~
    +    args.state.up_button    = [85, 40, 15, 15, 255, 255, 255]
    +** Processing line: ~    args.state.down_button  = [85, 20, 15, 15, 255, 255, 255]~
     - Inside source: true
     *** True Line Result
    -  -520,10660,-480,10840
    -** Processing line: ~  -520,10660,-520,10480~
    +    args.state.down_button  = [85, 20, 15, 15, 255, 255, 255]
    +** Processing line: ~    args.state.left_button  = [65, 20, 15, 15, 255, 255, 255]~
     - Inside source: true
     *** True Line Result
    -  -520,10660,-520,10480
    -** Processing line: ~  -520,10480,-520,10300~
    +    args.state.left_button  = [65, 20, 15, 15, 255, 255, 255]
    +** Processing line: ~    args.state.right_button = [105, 20, 15, 15, 255, 255, 255]~
     - Inside source: true
     *** True Line Result
    -  -520,10480,-520,10300
    -** Processing line: ~  -520,10260,-480,10080~
    +    args.state.right_button = [105, 20, 15, 15, 255, 255, 255]
    +** Processing line: ~    lowrez_borders << args.state.up_button~
     - Inside source: true
     *** True Line Result
    -  -520,10260,-480,10080
    -** Processing line: ~  -480,9880,-440,10060~
    +    lowrez_borders << args.state.up_button
    +** Processing line: ~    lowrez_borders << args.state.down_button~
     - Inside source: true
     *** True Line Result
    -  -480,9880,-440,10060
    -** Processing line: ~  -520,9680,-480,9880~
    +    lowrez_borders << args.state.down_button
    +** Processing line: ~    lowrez_borders << args.state.left_button~
     - Inside source: true
     *** True Line Result
    -  -520,9680,-480,9880
    -** Processing line: ~  -520,9680,-480,9400~
    +    lowrez_borders << args.state.left_button
    +** Processing line: ~    lowrez_borders << args.state.right_button~
     - Inside source: true
     *** True Line Result
    -  -520,9680,-480,9400
    -** Processing line: ~  -480,9400,-480,9160~
    +    lowrez_borders << args.state.right_button
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -  -480,9400,-480,9160
    -** Processing line: ~  1820,9880,2140,9800~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  1820,9880,2140,9800
    -** Processing line: ~  1540,9880,1820,9880~
    +
    +** Processing line: ~  def inputs_print_mouse_rect args, lowrez_mouse~
     - Inside source: true
     *** True Line Result
    -  1540,9880,1820,9880
    -** Processing line: ~  1200,9920,1500,9880~
    +  def inputs_print_mouse_rect args, lowrez_mouse
    +** Processing line: ~    if lowrez_mouse.up~
     - Inside source: true
     *** True Line Result
    -  1200,9920,1500,9880
    -** Processing line: ~  900,9880,1200,9920~
    +    if lowrez_mouse.up
    +** Processing line: ~      args.state.mouse_held = false~
     - Inside source: true
     *** True Line Result
    -  900,9880,1200,9920
    -** Processing line: ~  640,9900,840,9880~
    +      args.state.mouse_held = false
    +** Processing line: ~    elsif lowrez_mouse.click~
     - Inside source: true
     *** True Line Result
    -  640,9900,840,9880
    -** Processing line: ~  2380,8760,2800,8760~
    +    elsif lowrez_mouse.click
    +** Processing line: ~      mouse_rect = [lowrez_mouse.x, lowrez_mouse.y, 1, 1]~
     - Inside source: true
     *** True Line Result
    -  2380,8760,2800,8760
    -** Processing line: ~  2800,8760,2840,8660~
    +      mouse_rect = [lowrez_mouse.x, lowrez_mouse.y, 1, 1]
    +** Processing line: ~      if args.state.up_button.intersect_rect? mouse_rect~
     - Inside source: true
     *** True Line Result
    -  2800,8760,2840,8660
    -** Processing line: ~  2840,8660,2840,8420~
    +      if args.state.up_button.intersect_rect? mouse_rect
    +** Processing line: ~        args.state.player.y += 1~
     - Inside source: true
     *** True Line Result
    -  2840,8660,2840,8420
    -** Processing line: ~  2840,8160,2840,8420~
    +        args.state.player.y += 1
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -  2840,8160,2840,8420
    -** Processing line: ~  2800,7900,2840,8160~
    +      end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  2800,7900,2840,8160
    -** Processing line: ~  2800,7900,2800,7720~
    +
    +** Processing line: ~      if args.state.down_button.intersect_rect? mouse_rect~
     - Inside source: true
     *** True Line Result
    -  2800,7900,2800,7720
    -** Processing line: ~  2800,7540,2800,7720~
    +      if args.state.down_button.intersect_rect? mouse_rect
    +** Processing line: ~        args.state.player.y -= 1~
     - Inside source: true
     *** True Line Result
    -  2800,7540,2800,7720
    -** Processing line: ~  2800,7540,2800,7360~
    +        args.state.player.y -= 1
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -  2800,7540,2800,7360
    -** Processing line: ~  2700,7220,2800,7360~
    +      end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  2700,7220,2800,7360
    -** Processing line: ~  2400,7220,2700,7220~
    +
    +** Processing line: ~      if args.state.left_button.intersect_rect? mouse_rect~
     - Inside source: true
     *** True Line Result
    -  2400,7220,2700,7220
    -** Processing line: ~  2080,7240,2400,7220~
    +      if args.state.left_button.intersect_rect? mouse_rect
    +** Processing line: ~        args.state.player.x -= 1~
     - Inside source: true
     *** True Line Result
    -  2080,7240,2400,7220
    -** Processing line: ~  1760,7320,2080,7240~
    +        args.state.player.x -= 1
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -  1760,7320,2080,7240
    -** Processing line: ~  1380,7360,1720,7320~
    +      end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  1380,7360,1720,7320
    -** Processing line: ~  1040,7400,1340,7360~
    +
    +** Processing line: ~      if args.state.right_button.intersect_rect? mouse_rect~
     - Inside source: true
     *** True Line Result
    -  1040,7400,1340,7360
    -** Processing line: ~  640,7400,1000,7420~
    +      if args.state.right_button.intersect_rect? mouse_rect
    +** Processing line: ~        args.state.player.x += 1~
     - Inside source: true
     *** True Line Result
    -  640,7400,1000,7420
    -** Processing line: ~  300,7380,640,7400~
    +        args.state.player.x += 1
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -  300,7380,640,7400
    -** Processing line: ~  0,7300,240,7380~
    +      end
    +** Processing line: ~      args.state.mouse_held = true~
     - Inside source: true
     *** True Line Result
    -  0,7300,240,7380
    -** Processing line: ~  -300,7180,-60,7300~
    +      args.state.mouse_held = true
    +** Processing line: ~    elsif args.state.mouse_held~
     - Inside source: true
     *** True Line Result
    -  -300,7180,-60,7300
    -** Processing line: ~  -380,6860,-360,7180~
    +    elsif args.state.mouse_held
    +** Processing line: ~      mouse_rect = [lowrez_mouse.x, lowrez_mouse.y, 1, 1]~
     - Inside source: true
     *** True Line Result
    -  -380,6860,-360,7180
    -** Processing line: ~  -380,6880,-360,6700~
    +      mouse_rect = [lowrez_mouse.x, lowrez_mouse.y, 1, 1]
    +** Processing line: ~      if args.state.up_button.intersect_rect? mouse_rect~
     - Inside source: true
     *** True Line Result
    -  -380,6880,-360,6700
    -** Processing line: ~  -360,6700,-260,6540~
    +      if args.state.up_button.intersect_rect? mouse_rect
    +** Processing line: ~        args.state.player.y += 0.25~
     - Inside source: true
     *** True Line Result
    -  -360,6700,-260,6540
    -** Processing line: ~  -260,6540,0,6520~
    +        args.state.player.y += 0.25
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -  -260,6540,0,6520
    -** Processing line: ~  0,6520,240,6640~
    +      end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  0,6520,240,6640
    -** Processing line: ~  240,6640,460,6640~
    +
    +** Processing line: ~      if args.state.down_button.intersect_rect? mouse_rect~
     - Inside source: true
     *** True Line Result
    -  240,6640,460,6640
    -** Processing line: ~  460,6640,500,6480~
    +      if args.state.down_button.intersect_rect? mouse_rect
    +** Processing line: ~        args.state.player.y -= 0.25~
     - Inside source: true
     *** True Line Result
    -  460,6640,500,6480
    -** Processing line: ~  500,6260,500,6480~
    +        args.state.player.y -= 0.25
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -  500,6260,500,6480
    -** Processing line: ~  460,6060,500,6260~
    +      end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  460,6060,500,6260
    -** Processing line: ~  460,5860,460,6060~
    +
    +** Processing line: ~      if args.state.left_button.intersect_rect? mouse_rect~
     - Inside source: true
     *** True Line Result
    -  460,5860,460,6060
    -** Processing line: ~  460,5860,500,5640~
    +      if args.state.left_button.intersect_rect? mouse_rect
    +** Processing line: ~        args.state.player.x -= 0.25~
     - Inside source: true
     *** True Line Result
    -  460,5860,500,5640
    -** Processing line: ~  500,5640,540,5440~
    +        args.state.player.x -= 0.25
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -  500,5640,540,5440
    -** Processing line: ~  540,5440,580,5220~
    +      end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  540,5440,580,5220
    -** Processing line: ~  580,5220,580,5000~
    +
    +** Processing line: ~      if args.state.right_button.intersect_rect? mouse_rect~
     - Inside source: true
     *** True Line Result
    -  580,5220,580,5000
    -** Processing line: ~  580,4960,580,4740~
    +      if args.state.right_button.intersect_rect? mouse_rect
    +** Processing line: ~        args.state.player.x += 0.25~
     - Inside source: true
     *** True Line Result
    -  580,4960,580,4740
    -** Processing line: ~  580,4740,960,4700~
    +        args.state.player.x += 0.25
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -  580,4740,960,4700
    -** Processing line: ~  960,4700,1140,4760~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  960,4700,1140,4760
    -** Processing line: ~  1140,4760,1420,4740~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  1140,4760,1420,4740
    -** Processing line: ~  1420,4740,1720,4700~
    +
    +** Processing line: ~    if lowrez_mouse.click~
     - Inside source: true
     *** True Line Result
    -  1420,4740,1720,4700
    -** Processing line: ~  1720,4700,2000,4740~
    +    if lowrez_mouse.click
    +** Processing line: ~      dx = lowrez_mouse.click.x - args.state.previous_mouse_click.x~
     - Inside source: true
     *** True Line Result
    -  1720,4700,2000,4740
    -** Processing line: ~  2000,4740,2380,4760~
    +      dx = lowrez_mouse.click.x - args.state.previous_mouse_click.x
    +** Processing line: ~      dy = lowrez_mouse.click.y - args.state.previous_mouse_click.y~
     - Inside source: true
     *** True Line Result
    -  2000,4740,2380,4760
    -** Processing line: ~  2380,4760,2700,4800~
    +      dy = lowrez_mouse.click.y - args.state.previous_mouse_click.y
    +** Processing line: ~      x, y, w, h = args.state.previous_mouse_click.x, args.state.previous_mouse_click.y, dx, dy~
     - Inside source: true
     *** True Line Result
    -  2380,4760,2700,4800
    -** Processing line: ~  1720,4600,1760,4300~
    +      x, y, w, h = args.state.previous_mouse_click.x, args.state.previous_mouse_click.y, dx, dy
    +** Processing line: ~      puts "x #{lowrez_mouse.click.x}, y: #{lowrez_mouse.click.y}"~
     - Inside source: true
     *** True Line Result
    -  1720,4600,1760,4300
    -** Processing line: ~  1760,4300,2200,4340~
    +      puts "x #{lowrez_mouse.click.x}, y: #{lowrez_mouse.click.y}"
    +** Processing line: ~      if args.state.previous_mouse_click~
     - Inside source: true
     *** True Line Result
    -  1760,4300,2200,4340
    -** Processing line: ~  2200,4340,2560,4340~
    +      if args.state.previous_mouse_click
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  2200,4340,2560,4340
    -** Processing line: ~  2560,4340,2740,4340~
    +
    +** Processing line: ~        if dx < 0 && dx < 0~
     - Inside source: true
     *** True Line Result
    -  2560,4340,2740,4340
    -** Processing line: ~  2160,12580,2440,12400~
    +        if dx < 0 && dx < 0
    +** Processing line: ~          x = x + w~
     - Inside source: true
     *** True Line Result
    -  2160,12580,2440,12400
    -** Processing line: ~  1820,12840,2160,12580~
    +          x = x + w
    +** Processing line: ~          w = w.abs~
     - Inside source: true
     *** True Line Result
    -  1820,12840,2160,12580
    -** Processing line: ~  1500,13080,1820,12840~
    +          w = w.abs
    +** Processing line: ~          y = y + h~
     - Inside source: true
     *** True Line Result
    -  1500,13080,1820,12840
    -** Processing line: ~  1140,13340,1500,13080~
    +          y = y + h
    +** Processing line: ~          h = h.abs~
     - Inside source: true
     *** True Line Result
    -  1140,13340,1500,13080
    -** Processing line: ~  1140,13340,1580,13220~
    +          h = h.abs
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -  1140,13340,1580,13220
    -** Processing line: ~  2110,13080,2520,13000~
    +        end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  2110,13080,2520,13000
    -** Processing line: ~  2520,13000,2900,12800~
    +
    +** Processing line: ~        w += 1~
     - Inside source: true
     *** True Line Result
    -  2520,13000,2900,12800
    -** Processing line: ~  1580,13220,2110,13080~
    +        w += 1
    +** Processing line: ~        h += 1~
     - Inside source: true
     *** True Line Result
    -  1580,13220,2110,13080
    -** Processing line: ~  2900,12800,3200,12680~
    +        h += 1
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  2900,12800,3200,12680
    -** Processing line: ~  3200,12680,3440,12640~
    +
    +** Processing line: ~        args.state.previous_mouse_click = nil~
     - Inside source: true
     *** True Line Result
    -  3200,12680,3440,12640
    -** Processing line: ~  3440,12640,3720,12460~
    +        args.state.previous_mouse_click = nil
    +** Processing line: ~      else~
     - Inside source: true
     *** True Line Result
    -  3440,12640,3720,12460
    -** Processing line: ~  3720,12460,4040,12320~
    +      else
    +** Processing line: ~        args.state.previous_mouse_click = lowrez_mouse.click~
     - Inside source: true
     *** True Line Result
    -  3720,12460,4040,12320
    -** Processing line: ~  4040,12320,4360,12200~
    +        args.state.previous_mouse_click = lowrez_mouse.click
    +** Processing line: ~        square_x, square_y = lowrez_mouse.click~
     - Inside source: true
     *** True Line Result
    -  4040,12320,4360,12200
    -** Processing line: ~  4360,11940,4380,12180~
    +        square_x, square_y = lowrez_mouse.click
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -  4360,11940,4380,12180
    -** Processing line: ~  4360,11700,4360,11940~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  4360,11700,4360,11940
    -** Processing line: ~  4360,11700,4540,11500~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -  4360,11700,4540,11500
    -** Processing line: ~  4540,11500,4880,11540~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  4540,11500,4880,11540
    -** Processing line: ~  6000,11660,6280,11640~
    +
    +** Processing line: ~  def try_centering! word~
     - Inside source: true
     *** True Line Result
    -  6000,11660,6280,11640
    -** Processing line: ~  5440,11600,5720,11610~
    +  def try_centering! word
    +** Processing line: ~    word ||= ""~
     - Inside source: true
     *** True Line Result
    -  5440,11600,5720,11610
    -** Processing line: ~  5720,11610,6000,11660~
    +    word ||= ""
    +** Processing line: ~    just_word = word.gsub("-", "").gsub(",", "").gsub(".", "").gsub("'", "").gsub('""', "\"-\"")~
     - Inside source: true
     *** True Line Result
    -  5720,11610,6000,11660
    -** Processing line: ~  6280,11640,6760,11720~
    +    just_word = word.gsub("-", "").gsub(",", "").gsub(".", "").gsub("'", "").gsub('""', "\"-\"")
    +** Processing line: ~    return word if just_word.strip.length == 0~
     - Inside source: true
     *** True Line Result
    -  6280,11640,6760,11720
    -** Processing line: ~  6760,11720,7060,11780~
    +    return word if just_word.strip.length == 0
    +** Processing line: ~    return word if just_word.include? "~"~
     - Inside source: true
     *** True Line Result
    -  6760,11720,7060,11780
    -** Processing line: ~  7060,11780,7360,11810~
    +    return word if just_word.include? "~"
    +** Processing line: ~    return "~#{word}" if just_word.length <= 2~
     - Inside source: true
     *** True Line Result
    -  7060,11780,7360,11810
    -** Processing line: ~  7360,11810,7640,11840~
    +    return "~#{word}" if just_word.length <= 2
    +** Processing line: ~    if just_word.length.mod_zero? 2~
     - Inside source: true
     *** True Line Result
    -  7360,11810,7640,11840
    -** Processing line: ~  7640,11840,8000,11830~
    +    if just_word.length.mod_zero? 2
    +** Processing line: ~      center_index = just_word.length.idiv(2) - 1~
     - Inside source: true
     *** True Line Result
    -  7640,11840,8000,11830
    -** Processing line: ~  8000,11830,8320,11850~
    +      center_index = just_word.length.idiv(2) - 1
    +** Processing line: ~    else~
     - Inside source: true
     *** True Line Result
    -  8000,11830,8320,11850
    -** Processing line: ~  8320,11850,8390,11800~
    +    else
    +** Processing line: ~      center_index = (just_word.length - 1).idiv(2)~
     - Inside source: true
     *** True Line Result
    -  8320,11850,8390,11800
    -** Processing line: ~  8330,11760,8390,11800~
    +      center_index = (just_word.length - 1).idiv(2)
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  8330,11760,8390,11800
    -** Processing line: ~  8160,11760,8330,11760~
    +    end
    +** Processing line: ~    return "#{word[0..center_index - 1]}~#{word[center_index]}#{word[center_index + 1..-1]}"~
     - Inside source: true
     *** True Line Result
    -  8160,11760,8330,11760
    -** Processing line: ~  7910,11750,8160,11760~
    +    return "#{word[0..center_index - 1]}~#{word[center_index]}#{word[center_index + 1..-1]}"
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -  7910,11750,8160,11760
    -** Processing line: ~  7660,11740,7900,11750~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  7660,11740,7900,11750
    -** Processing line: ~  7400,11730,7660,11740~
    +
    +** Processing line: ~  def queue_storyline args, scene~
     - Inside source: true
     *** True Line Result
    -  7400,11730,7660,11740
    -** Processing line: ~  7160,11680,7400,11730~
    +  def queue_storyline args, scene
    +** Processing line: ~    queue_storyline_text args, scene[:storyline]~
     - Inside source: true
     *** True Line Result
    -  7160,11680,7400,11730
    -** Processing line: ~  7080,11570,7160,11680~
    +    queue_storyline_text args, scene[:storyline]
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -  7080,11570,7160,11680
    -** Processing line: ~  7080,11570,7100,11350~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  7080,11570,7100,11350
    -** Processing line: ~  7100,11350,7440,11280~
    +
    +** Processing line: ~  def queue_storyline_text args, text~
     - Inside source: true
     *** True Line Result
    -  7100,11350,7440,11280
    -** Processing line: ~  7440,11280,7940,11280~
    +  def queue_storyline_text args, text
    +** Processing line: ~    args.state.last_story_line_text = text~
     - Inside source: true
     *** True Line Result
    -  7440,11280,7940,11280
    -** Processing line: ~  7960,11280,8360,11280~
    +    args.state.last_story_line_text = text
    +** Processing line: ~    args.state.storyline_history << text if text~
     - Inside source: true
     *** True Line Result
    -  7960,11280,8360,11280
    -** Processing line: ~  5840,11540,6650,11170~
    +    args.state.storyline_history << text if text
    +** Processing line: ~    words = (text || "").split(" ")~
     - Inside source: true
     *** True Line Result
    -  5840,11540,6650,11170
    -** Processing line: ~  4880,11540,5440,11600~
    +    words = (text || "").split(" ")
    +** Processing line: ~    words = words.map { |w| try_centering! w }~
     - Inside source: true
     *** True Line Result
    -  4880,11540,5440,11600
    -** Processing line: ~  3410,11830,3420,11300~
    +    words = words.map { |w| try_centering! w }
    +** Processing line: ~    args.state.scene_storyline_queue = words~
     - Inside source: true
     *** True Line Result
    -  3410,11830,3420,11300
    -** Processing line: ~  3410,11260,3520,10920~
    +    args.state.scene_storyline_queue = words
    +** Processing line: ~    if args.state.scene_storyline_queue.length != 0~
     - Inside source: true
     *** True Line Result
    -  3410,11260,3520,10920
    -** Processing line: ~  3520,10590,3520,10920~
    +    if args.state.scene_storyline_queue.length != 0
    +** Processing line: ~      args.state.scene_storyline_queue.unshift "~$--"~
     - Inside source: true
     *** True Line Result
    -  3520,10590,3520,10920
    -** Processing line: ~  3520,10590,3540,10260~
    +      args.state.scene_storyline_queue.unshift "~$--"
    +** Processing line: ~      args.state.storyline_to_show = "~."~
     - Inside source: true
     *** True Line Result
    -  3520,10590,3540,10260
    -** Processing line: ~  3520,9900,3540,10240~
    +      args.state.storyline_to_show = "~."
    +** Processing line: ~    else~
     - Inside source: true
     *** True Line Result
    -  3520,9900,3540,10240
    -** Processing line: ~  3520,9900,3640,9590~
    +    else
    +** Processing line: ~      args.state.storyline_to_show = ""~
     - Inside source: true
     *** True Line Result
    -  3520,9900,3640,9590
    -** Processing line: ~  3640,9570,4120,9590~
    +      args.state.storyline_to_show = ""
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  3640,9570,4120,9590
    -** Processing line: ~  4140,9590,4600,9680~
    +    end
    +** Processing line: ~    args.state.scene_storyline_queue << ""~
     - Inside source: true
     *** True Line Result
    -  4140,9590,4600,9680
    -** Processing line: ~  4620,9680,5030,9730~
    +    args.state.scene_storyline_queue << ""
    +** Processing line: ~    args.state.next_storyline = args.state.tick_count~
     - Inside source: true
     *** True Line Result
    -  4620,9680,5030,9730
    -** Processing line: ~  5120,9750,5520,9800~
    +    args.state.next_storyline = args.state.tick_count
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -  5120,9750,5520,9800
    -** Processing line: ~  5620,9820,6080,9800~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  5620,9820,6080,9800
    -** Processing line: ~  6130,9810,6580,9820~
    +
    +** Processing line: ~  def set_scene args, scene~
     - Inside source: true
     *** True Line Result
    -  6130,9810,6580,9820
    -** Processing line: ~  6640,9820,6800,9700~
    +  def set_scene args, scene
    +** Processing line: ~    args.state.current_scene = scene~
     - Inside source: true
     *** True Line Result
    -  6640,9820,6800,9700
    -** Processing line: ~  6780,9400,6800,9700~
    +    args.state.current_scene = scene
    +** Processing line: ~    args.state.background = scene[:background] ||  'sprites/todo.png'~
     - Inside source: true
     *** True Line Result
    -  6780,9400,6800,9700
    -** Processing line: ~  6780,9400,6840,9140~
    +    args.state.background = scene[:background] ||  'sprites/todo.png'
    +** Processing line: ~    args.state.scene_fade = scene[:fade] || 0~
     - Inside source: true
     *** True Line Result
    -  6780,9400,6840,9140
    -** Processing line: ~  6820,8860,6840,9120~
    +    args.state.scene_fade = scene[:fade] || 0
    +** Processing line: ~    args.state.scenes = (scene[:scenes] || []).reject { |s| !s }~
     - Inside source: true
     *** True Line Result
    -  6820,8860,6840,9120
    -** Processing line: ~  6780,8600,6820,8830~
    +    args.state.scenes = (scene[:scenes] || []).reject { |s| !s }
    +** Processing line: ~    args.state.scene_render_override = scene[:render_override]~
     - Inside source: true
     *** True Line Result
    -  6780,8600,6820,8830
    -** Processing line: ~  6720,8350,6780,8570~
    +    args.state.scene_render_override = scene[:render_override]
    +** Processing line: ~    args.state.storylines = (scene[:storylines] || []).reject { |s| !s }~
     - Inside source: true
     *** True Line Result
    -  6720,8350,6780,8570
    -** Processing line: ~  6480,8340,6720,8320~
    +    args.state.storylines = (scene[:storylines] || []).reject { |s| !s }
    +** Processing line: ~    args.state.scene_changed_at = args.state.tick_count~
     - Inside source: true
     *** True Line Result
    -  6480,8340,6720,8320
    -** Processing line: ~  6260,8400,6480,8340~
    +    args.state.scene_changed_at = args.state.tick_count
    +** Processing line: ~    if scene[:player]~
     - Inside source: true
     *** True Line Result
    -  6260,8400,6480,8340
    -** Processing line: ~  6050,8580,6240,8400~
    +    if scene[:player]
    +** Processing line: ~      args.state.player = scene[:player]~
     - Inside source: true
     *** True Line Result
    -  6050,8580,6240,8400
    -** Processing line: ~  5760,8630,6040,8590~
    +      args.state.player = scene[:player]
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  5760,8630,6040,8590
    -** Processing line: ~  5520,8690,5740,8630~
    +    end
    +** Processing line: ~    args.state.inside_scene_hotspot = false~
     - Inside source: true
     *** True Line Result
    -  5520,8690,5740,8630
    -** Processing line: ~  5120,8690,5450,8700~
    +    args.state.inside_scene_hotspot = false
    +** Processing line: ~    args.state.inside_storyline_hotspot = false~
     - Inside source: true
     *** True Line Result
    -  5120,8690,5450,8700
    -** Processing line: ~  4570,8670,5080,8690~
    +    args.state.inside_storyline_hotspot = false
    +** Processing line: ~    queue_storyline args, scene~
     - Inside source: true
     *** True Line Result
    -  4570,8670,5080,8690
    -** Processing line: ~  4020,8610,4540,8670~
    +    queue_storyline args, scene
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -  4020,8610,4540,8670
    -** Processing line: ~  3540,8480,4020,8610~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  3540,8480,4020,8610
    -** Processing line: ~  3520,8230,3520,8480~
    +
    +** Processing line: ~  def replay_storyline_rect~
     - Inside source: true
     *** True Line Result
    -  3520,8230,3520,8480
    -** Processing line: ~  3520,7930,3520,8230~
    +  def replay_storyline_rect
    +** Processing line: ~    [26, -1, 7, 4]~
     - Inside source: true
     *** True Line Result
    -  3520,7930,3520,8230
    -** Processing line: ~  3520,7930,3540,7630~
    +    [26, -1, 7, 4]
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -  3520,7930,3540,7630
    -** Processing line: ~  3480,7320,3540,7610~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  3480,7320,3540,7610
    -** Processing line: ~  3480,7280,3500,7010~
    +
    +** Processing line: ~  def labels_for_word word~
     - Inside source: true
     *** True Line Result
    -  3480,7280,3500,7010
    -** Processing line: ~  3500,6980,3680,6850~
    +  def labels_for_word word
    +** Processing line: ~    left_side_of_word = ""~
     - Inside source: true
     *** True Line Result
    -  3500,6980,3680,6850
    -** Processing line: ~  3680,6850,4220,6840~
    +    left_side_of_word = ""
    +** Processing line: ~    center_letter = ""~
     - Inside source: true
     *** True Line Result
    -  3680,6850,4220,6840
    -** Processing line: ~  4230,6840,4760,6850~
    +    center_letter = ""
    +** Processing line: ~    right_side_of_word = ""~
     - Inside source: true
     *** True Line Result
    -  4230,6840,4760,6850
    -** Processing line: ~  4780,6850,5310,6860~
    +    right_side_of_word = ""
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  4780,6850,5310,6860
    -** Processing line: ~  5310,6860,5720,6940~
    +
    +** Processing line: ~    if word[0] == "~"~
     - Inside source: true
     *** True Line Result
    -  5310,6860,5720,6940
    -** Processing line: ~  5720,6940,5880,7250~
    +    if word[0] == "~"
    +** Processing line: ~      left_side_of_word = ""~
     - Inside source: true
     *** True Line Result
    -  5720,6940,5880,7250
    -** Processing line: ~  5880,7250,5900,7520~
    +      left_side_of_word = ""
    +** Processing line: ~      center_letter = word[1]~
     - Inside source: true
     *** True Line Result
    -  5880,7250,5900,7520
    -** Processing line: ~  100,11240,440,11300~
    +      center_letter = word[1]
    +** Processing line: ~      right_side_of_word = word[2..-1]~
     - Inside source: true
     *** True Line Result
    -  100,11240,440,11300
    -** Processing line: ~  440,11300,760,11330~
    +      right_side_of_word = word[2..-1]
    +** Processing line: ~    elsif word.length > 0~
     - Inside source: true
     *** True Line Result
    -  440,11300,760,11330
    -** Processing line: ~  1480,11280,1840,11230~
    +    elsif word.length > 0
    +** Processing line: ~      left_side_of_word, right_side_of_word = word.split("~")~
     - Inside source: true
     *** True Line Result
    -  1480,11280,1840,11230
    -** Processing line: ~  2200,11130,2360,11090~
    +      left_side_of_word, right_side_of_word = word.split("~")
    +** Processing line: ~      center_letter = right_side_of_word[0]~
     - Inside source: true
     *** True Line Result
    -  2200,11130,2360,11090
    -** Processing line: ~  1840,11230,2200,11130~
    +      center_letter = right_side_of_word[0]
    +** Processing line: ~      right_side_of_word = right_side_of_word[1..-1]~
     - Inside source: true
     *** True Line Result
    -  1840,11230,2200,11130
    -** Processing line: ~#+end_src~
    -- Line was identified as the end of a code block.
    +      right_side_of_word = right_side_of_word[1..-1]
    +** Processing line: ~    end~
    +- Inside source: true
     *** True Line Result
    -#+end_src
    +    end
     ** Processing line: ~~
    -- End of paragraph detected.
    -*** True Line Result
    -
    -** Processing line: ~*** Rpg Narrative - Choose Your Own Adventure - decision.rb~
    -- Header detected.
    +- Inside source: true
     *** True Line Result
     
    +** Processing line: ~    right_side_of_word = right_side_of_word.gsub("-", "")~
    +- Inside source: true
     *** True Line Result
    -*** Rpg Narrative - Choose Your Own Adventure - decision.rb
    -** Processing line: ~#+begin_src ruby~
    -- Line was identified as the beginning of a code block.
    +    right_side_of_word = right_side_of_word.gsub("-", "")
    +** Processing line: ~~
    +- Inside source: true
     *** True Line Result
     
    -*** True Line Result
    -#+begin_src ruby
    -** Processing line: ~  # ./samples/99_genre_rpg_narrative/choose_your_own_adventure/app/decision.rb~
    +** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
    -  # ./samples/99_genre_rpg_narrative/choose_your_own_adventure/app/decision.rb
    -** Processing line: ~  # Hey there! Welcome to Four Decisions. Here is how you~
    +    {
    +** Processing line: ~      left:   [29 - left_side_of_word.length * 4 - 1 * left_side_of_word.length, 2, left_side_of_word],~
     - Inside source: true
     *** True Line Result
    -  # Hey there! Welcome to Four Decisions. Here is how you
    -** Processing line: ~  # create your decision tree. Remove =being and =end from the text to~
    +      left:   [29 - left_side_of_word.length * 4 - 1 * left_side_of_word.length, 2, left_side_of_word],
    +** Processing line: ~      center: [29, 2, center_letter, 255, 0, 0],~
     - Inside source: true
     *** True Line Result
    -  # create your decision tree. Remove =being and =end from the text to
    -** Processing line: ~  # enable the game (just save the file). Change stuff and see what happens!~
    +      center: [29, 2, center_letter, 255, 0, 0],
    +** Processing line: ~      right:  [34, 2, right_side_of_word]~
     - Inside source: true
     *** True Line Result
    -  # enable the game (just save the file). Change stuff and see what happens!
    -** Processing line: ~~
    +      right:  [34, 2, right_side_of_word]
    +** Processing line: ~    }~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def game~
    +    }
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -  def game
    -** Processing line: ~    {~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    {
    -** Processing line: ~      starting_decision: :stormy_night,~
    +
    +** Processing line: ~  def render_scenes args, lowrez_sprites~
     - Inside source: true
     *** True Line Result
    -      starting_decision: :stormy_night,
    -** Processing line: ~      decisions: {~
    +  def render_scenes args, lowrez_sprites
    +** Processing line: ~    lowrez_sprites << args.state.scenes.flat_map do |hs|~
     - Inside source: true
     *** True Line Result
    -      decisions: {
    -** Processing line: ~        stormy_night: {~
    +    lowrez_sprites << args.state.scenes.flat_map do |hs|
    +** Processing line: ~      hotspot_square args, hs.x, hs.y, hs.w, hs.h~
     - Inside source: true
     *** True Line Result
    -        stormy_night: {
    -** Processing line: ~          description: 'It was a dark and stormy night. (storyline located in decision.rb)',~
    +      hotspot_square args, hs.x, hs.y, hs.w, hs.h
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -          description: 'It was a dark and stormy night. (storyline located in decision.rb)',
    -** Processing line: ~          option_one: {~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -          option_one: {
    -** Processing line: ~            description: 'Go to sleep.',~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -            description: 'Go to sleep.',
    -** Processing line: ~            decision: :nap~
    +
    +** Processing line: ~  def render_storylines args, lowrez_sprites~
     - Inside source: true
     *** True Line Result
    -            decision: :nap
    -** Processing line: ~          },~
    +  def render_storylines args, lowrez_sprites
    +** Processing line: ~    lowrez_sprites << args.state.storylines.flat_map do |hs|~
     - Inside source: true
     *** True Line Result
    -          },
    -** Processing line: ~          option_two: {~
    +    lowrez_sprites << args.state.storylines.flat_map do |hs|
    +** Processing line: ~      hotspot_square args, hs.x, hs.y, hs.w, hs.h~
     - Inside source: true
     *** True Line Result
    -          option_two: {
    -** Processing line: ~            description: 'Watch a movie.',~
    +      hotspot_square args, hs.x, hs.y, hs.w, hs.h
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -            description: 'Watch a movie.',
    -** Processing line: ~            decision: :movie~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -            decision: :movie
    -** Processing line: ~          },~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          },
    -** Processing line: ~          option_three: {~
    +
    +** Processing line: ~  def adornments_alpha args, target_alpha = nil, minimum_alpha = nil~
     - Inside source: true
     *** True Line Result
    -          option_three: {
    -** Processing line: ~            description: 'Go outside.',~
    +  def adornments_alpha args, target_alpha = nil, minimum_alpha = nil
    +** Processing line: ~    return (minimum_alpha || 80) unless args.state.storyline_queue_empty_at~
     - Inside source: true
     *** True Line Result
    -            description: 'Go outside.',
    -** Processing line: ~            decision: :go_outside~
    +    return (minimum_alpha || 80) unless args.state.storyline_queue_empty_at
    +** Processing line: ~    target_alpha ||= 255~
     - Inside source: true
     *** True Line Result
    -            decision: :go_outside
    -** Processing line: ~          },~
    +    target_alpha ||= 255
    +** Processing line: ~    target_alpha * args.state.storyline_queue_empty_at.ease(60)~
     - Inside source: true
     *** True Line Result
    -          },
    -** Processing line: ~          option_four: {~
    +    target_alpha * args.state.storyline_queue_empty_at.ease(60)
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -          option_four: {
    -** Processing line: ~            description: 'Get a snack.',~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -            description: 'Get a snack.',
    -** Processing line: ~            decision: :get_a_snack~
    +
    +** Processing line: ~  def hotspot_square args, x, y, w, h~
     - Inside source: true
     *** True Line Result
    -            decision: :get_a_snack
    -** Processing line: ~          }~
    +  def hotspot_square args, x, y, w, h
    +** Processing line: ~    if w >= 3 && h >= 3~
     - Inside source: true
     *** True Line Result
    -          }
    -** Processing line: ~        },~
    +    if w >= 3 && h >= 3
    +** Processing line: ~      [~
     - Inside source: true
     *** True Line Result
    -        },
    -** Processing line: ~        nap: {~
    +      [
    +** Processing line: ~        [x + w.idiv(2) + 1, y, w.idiv(2), h, 'sprites/label-background.png', 0, adornments_alpha(args, 50), 23, 23, 23],~
     - Inside source: true
     *** True Line Result
    -        nap: {
    -** Processing line: ~          description: 'You took a nap. The end.',~
    +        [x + w.idiv(2) + 1, y, w.idiv(2), h, 'sprites/label-background.png', 0, adornments_alpha(args, 50), 23, 23, 23],
    +** Processing line: ~        [x, y, w.idiv(2), h, 'sprites/label-background.png', 0, adornments_alpha(args, 100), 223, 223, 223],~
     - Inside source: true
     *** True Line Result
    -          description: 'You took a nap. The end.',
    -** Processing line: ~          option_one: {~
    +        [x, y, w.idiv(2), h, 'sprites/label-background.png', 0, adornments_alpha(args, 100), 223, 223, 223],
    +** Processing line: ~        [x + 1, y + 1, w - 2, h - 2, 'sprites/label-background.png', 0, adornments_alpha(args, 200), 40, 140, 40],~
     - Inside source: true
     *** True Line Result
    -          option_one: {
    -** Processing line: ~            description: 'Start over.',~
    +        [x + 1, y + 1, w - 2, h - 2, 'sprites/label-background.png', 0, adornments_alpha(args, 200), 40, 140, 40],
    +** Processing line: ~      ]~
     - Inside source: true
     *** True Line Result
    -            description: 'Start over.',
    -** Processing line: ~            decision: :stormy_night~
    +      ]
    +** Processing line: ~    else~
     - Inside source: true
     *** True Line Result
    -            decision: :stormy_night
    -** Processing line: ~          }~
    +    else
    +** Processing line: ~      [~
     - Inside source: true
     *** True Line Result
    -          }
    -** Processing line: ~        }~
    +      [
    +** Processing line: ~        [x, y, w, h, 'sprites/label-background.png', 0, adornments_alpha(args, 200), 0, 140, 0],~
     - Inside source: true
     *** True Line Result
    -        }
    -** Processing line: ~      }~
    +        [x, y, w, h, 'sprites/label-background.png', 0, adornments_alpha(args, 200), 0, 140, 0],
    +** Processing line: ~      ]~
     - Inside source: true
     *** True Line Result
    -      }
    -** Processing line: ~    }~
    +      ]
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    }
    +    end
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -134019,242 +139559,274 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~#+end_src~
    -- Line was identified as the end of a code block.
    +** Processing line: ~  def render_storyline_dialog args, lowrez_labels, lowrez_sprites~
    +- Inside source: true
     *** True Line Result
    -#+end_src
    -** Processing line: ~~
    -- End of paragraph detected.
    +  def render_storyline_dialog args, lowrez_labels, lowrez_sprites
    +** Processing line: ~    return unless args.state.is_storyline_dialog_active~
    +- Inside source: true
     *** True Line Result
    -
    -** Processing line: ~*** Rpg Narrative - Choose Your Own Adventure - main.rb~
    -- Header detected.
    +    return unless args.state.is_storyline_dialog_active
    +** Processing line: ~    return unless args.state.storyline_to_show~
    +- Inside source: true
     *** True Line Result
    -
    +    return unless args.state.storyline_to_show
    +** Processing line: ~    labels = labels_for_word args.state.storyline_to_show~
    +- Inside source: true
     *** True Line Result
    -*** Rpg Narrative - Choose Your Own Adventure - main.rb
    -** Processing line: ~#+begin_src ruby~
    -- Line was identified as the beginning of a code block.
    +    labels = labels_for_word args.state.storyline_to_show
    +** Processing line: ~    if true # high rez version~
    +- Inside source: true
     *** True Line Result
    -
    +    if true # high rez version
    +** Processing line: ~      scale = 8.88~
    +- Inside source: true
     *** True Line Result
    -#+begin_src ruby
    -** Processing line: ~  # ./samples/99_genre_rpg_narrative/choose_your_own_adventure/app/main.rb~
    +      scale = 8.88
    +** Processing line: ~      offset = 45~
     - Inside source: true
     *** True Line Result
    -  # ./samples/99_genre_rpg_narrative/choose_your_own_adventure/app/main.rb
    -** Processing line: ~  =begin~
    +      offset = 45
    +** Processing line: ~      size = 25~
     - Inside source: true
     *** True Line Result
    -  =begin
    -** Processing line: ~~
    +      size = 25
    +** Processing line: ~      args.outputs.labels << [offset + labels[:left].x.-(1) * scale,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   Reminders:~
    +      args.outputs.labels << [offset + labels[:left].x.-(1) * scale,
    +** Processing line: ~                              labels[:left].y * TINY_SCALE + 55,~
     - Inside source: true
     *** True Line Result
    -   Reminders:
    -** Processing line: ~~
    +                              labels[:left].y * TINY_SCALE + 55,
    +** Processing line: ~                              labels[:left].text, size, 0, 0, 0, 0, 255,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   - Hashes: Collection of unique keys and their corresponding values. The values can be found~
    +                              labels[:left].text, size, 0, 0, 0, 0, 255,
    +** Processing line: ~                              'fonts/manaspc.ttf']~
     - Inside source: true
     *** True Line Result
    -   - Hashes: Collection of unique keys and their corresponding values. The values can be found
    -** Processing line: ~     using their keys.~
    +                              'fonts/manaspc.ttf']
    +** Processing line: ~      center_text = labels[:center].text~
     - Inside source: true
     *** True Line Result
    -     using their keys.
    -** Processing line: ~~
    +      center_text = labels[:center].text
    +** Processing line: ~      center_text = "|" if center_text == "$"~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~     In this sample app, the decisions needed for the game are stored in a hash. In fact, the~
    +      center_text = "|" if center_text == "$"
    +** Processing line: ~      args.outputs.labels << [offset + labels[:center].x * scale,~
     - Inside source: true
     *** True Line Result
    -     In this sample app, the decisions needed for the game are stored in a hash. In fact, the
    -** Processing line: ~     decision.rb file contains hashes inside of other hashes!~
    +      args.outputs.labels << [offset + labels[:center].x * scale,
    +** Processing line: ~                              labels[:center].y * TINY_SCALE + 55,~
     - Inside source: true
     *** True Line Result
    -     decision.rb file contains hashes inside of other hashes!
    -** Processing line: ~~
    +                              labels[:center].y * TINY_SCALE + 55,
    +** Processing line: ~                              center_text, size, 0, 255, 0, 0, 255,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~     Each option is a key in the first hash, but also contains a hash (description and~
    +                              center_text, size, 0, 255, 0, 0, 255,
    +** Processing line: ~                              'fonts/manaspc.ttf']~
     - Inside source: true
     *** True Line Result
    -     Each option is a key in the first hash, but also contains a hash (description and
    -** Processing line: ~     decision being its keys) as its value.~
    +                              'fonts/manaspc.ttf']
    +** Processing line: ~      args.outputs.labels << [offset + labels[:right].x * scale,~
     - Inside source: true
     *** True Line Result
    -     decision being its keys) as its value.
    -** Processing line: ~     Go into the decision.rb file and take a look before diving into the code below.~
    +      args.outputs.labels << [offset + labels[:right].x * scale,
    +** Processing line: ~                              labels[:right].y * TINY_SCALE + 55,~
     - Inside source: true
     *** True Line Result
    -     Go into the decision.rb file and take a look before diving into the code below.
    -** Processing line: ~~
    +                              labels[:right].y * TINY_SCALE + 55,
    +** Processing line: ~                              labels[:right].text, size, 0, 0, 0, 0, 255,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   - args.outputs.labels: An array. The values generate a label.~
    +                              labels[:right].text, size, 0, 0, 0, 0, 255,
    +** Processing line: ~                              'fonts/manaspc.ttf']~
     - Inside source: true
     *** True Line Result
    -   - args.outputs.labels: An array. The values generate a label.
    -** Processing line: ~     The parameters are [X, Y, TEXT, SIZE, ALIGNMENT, RED, GREEN, BLUE, ALPHA, FONT STYLE]~
    +                              'fonts/manaspc.ttf']
    +** Processing line: ~    else~
     - Inside source: true
     *** True Line Result
    -     The parameters are [X, Y, TEXT, SIZE, ALIGNMENT, RED, GREEN, BLUE, ALPHA, FONT STYLE]
    -** Processing line: ~     For more information about labels, go to mygame/documentation/02-labels.md.~
    +    else
    +** Processing line: ~      lowrez_labels << labels[:left]~
     - Inside source: true
     *** True Line Result
    -     For more information about labels, go to mygame/documentation/02-labels.md.
    -** Processing line: ~~
    +      lowrez_labels << labels[:left]
    +** Processing line: ~      lowrez_labels << labels[:center]~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   - args.keyboard.key_down.KEY: Determines if a key is in the down state or pressed down.~
    +      lowrez_labels << labels[:center]
    +** Processing line: ~      lowrez_labels << labels[:right]~
     - Inside source: true
     *** True Line Result
    -   - args.keyboard.key_down.KEY: Determines if a key is in the down state or pressed down.
    -** Processing line: ~     For more information about the keyboard, go to mygame/documentation/06-keyboard.md.~
    +      lowrez_labels << labels[:right]
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -     For more information about the keyboard, go to mygame/documentation/06-keyboard.md.
    -** Processing line: ~~
    +    end
    +** Processing line: ~    args.state.is_storyline_dialog_active = true~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   - String interpolation: uses #{} syntax; everything between the #{ and the } is evaluated~
    +    args.state.is_storyline_dialog_active = true
    +** Processing line: ~    render_player args, lowrez_sprites~
     - Inside source: true
     *** True Line Result
    -   - String interpolation: uses #{} syntax; everything between the #{ and the } is evaluated
    -** Processing line: ~     as Ruby code, and the placeholder is replaced with its corresponding value or result.~
    +    render_player args, lowrez_sprites
    +** Processing line: ~    lowrez_sprites <<  [0, 0, 64, 8, 'sprites/label-background.png']~
     - Inside source: true
     *** True Line Result
    -     as Ruby code, and the placeholder is replaced with its corresponding value or result.
    +    lowrez_sprites <<  [0, 0, 64, 8, 'sprites/label-background.png']
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  =end~
    +** Processing line: ~  def render_player args, lowrez_sprites~
     - Inside source: true
     *** True Line Result
    -  =end
    +  def render_player args, lowrez_sprites
    +** Processing line: ~    lowrez_sprites << player_md_down(args, *args.state.player)~
    +- Inside source: true
    +*** True Line Result
    +    lowrez_sprites << player_md_down(args, *args.state.player)
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # This sample app provides users with a story and multiple decisions that they can choose to make.~
    +** Processing line: ~  def render_adornments args, lowrez_sprites~
     - Inside source: true
     *** True Line Result
    -  # This sample app provides users with a story and multiple decisions that they can choose to make.
    -** Processing line: ~  # Users can make a decision using their keyboard, and the story will move forward based on user choices.~
    +  def render_adornments args, lowrez_sprites
    +** Processing line: ~    render_scenes args, lowrez_sprites~
     - Inside source: true
     *** True Line Result
    -  # Users can make a decision using their keyboard, and the story will move forward based on user choices.
    -** Processing line: ~~
    +    render_scenes args, lowrez_sprites
    +** Processing line: ~    render_storylines args, lowrez_sprites~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  # The decisions available to users are stored in the decision.rb file.~
    +    render_storylines args, lowrez_sprites
    +** Processing line: ~    return if args.state.is_storyline_dialog_active~
     - Inside source: true
     *** True Line Result
    -  # The decisions available to users are stored in the decision.rb file.
    -** Processing line: ~  # We must have access to it for the game to function properly.~
    +    return if args.state.is_storyline_dialog_active
    +** Processing line: ~    lowrez_sprites << player_md_down(args, *args.state.player)~
     - Inside source: true
     *** True Line Result
    -  # We must have access to it for the game to function properly.
    -** Processing line: ~  GAME_FILE = 'app/decision.rb' # found in app folder~
    +    lowrez_sprites << player_md_down(args, *args.state.player)
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -  GAME_FILE = 'app/decision.rb' # found in app folder
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  require GAME_FILE # require used to load another file, import class/method definitions~
    +** Processing line: ~  def global_alpha_percentage args, max_alpha = 255~
     - Inside source: true
     *** True Line Result
    -  require GAME_FILE # require used to load another file, import class/method definitions
    -** Processing line: ~~
    +  def global_alpha_percentage args, max_alpha = 255
    +** Processing line: ~    return 255 unless args.state.scene_changed_at~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  # Instructions are given using labels to users if they have not yet set up their story in the decision.rb file.~
    +    return 255 unless args.state.scene_changed_at
    +** Processing line: ~    return 255 unless args.state.scene_fade~
     - Inside source: true
     *** True Line Result
    -  # Instructions are given using labels to users if they have not yet set up their story in the decision.rb file.
    -** Processing line: ~  # Otherwise, the game is run.~
    +    return 255 unless args.state.scene_fade
    +** Processing line: ~    return 255 unless args.state.scene_fade > 0~
     - Inside source: true
     *** True Line Result
    -  # Otherwise, the game is run.
    -** Processing line: ~  def tick args~
    +    return 255 unless args.state.scene_fade > 0
    +** Processing line: ~    return max_alpha * args.state.scene_changed_at.ease(args.state.scene_fade)~
     - Inside source: true
     *** True Line Result
    -  def tick args
    -** Processing line: ~    if !args.state.loaded && !respond_to?(:game) # if game is not loaded and not responding to game symbol's method~
    +    return max_alpha * args.state.scene_changed_at.ease(args.state.scene_fade)
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    if !args.state.loaded && !respond_to?(:game) # if game is not loaded and not responding to game symbol's method
    -** Processing line: ~      args.labels << [640, 370, 'Hey there! Welcome to Four Decisions.', 0, 1] # a welcome label is shown~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      args.labels << [640, 370, 'Hey there! Welcome to Four Decisions.', 0, 1] # a welcome label is shown
    -** Processing line: ~      args.labels << [640, 340, 'Go to the file called decision.rb and tell me your story.', 0, 1]~
    +
    +** Processing line: ~  def render_current_scene args, lowrez_sprites, lowrez_labels, lowrez_solids~
     - Inside source: true
     *** True Line Result
    -      args.labels << [640, 340, 'Go to the file called decision.rb and tell me your story.', 0, 1]
    -** Processing line: ~    elsif respond_to?(:game) # otherwise, if responds to game~
    +  def render_current_scene args, lowrez_sprites, lowrez_labels, lowrez_solids
    +** Processing line: ~    lowrez_sprites << [0, 0, 64, 64, args.state.background, 0, (global_alpha_percentage args)]~
     - Inside source: true
     *** True Line Result
    -    elsif respond_to?(:game) # otherwise, if responds to game
    -** Processing line: ~      args.state.loaded = true~
    +    lowrez_sprites << [0, 0, 64, 64, args.state.background, 0, (global_alpha_percentage args)]
    +** Processing line: ~    if args.state.scene_render_override~
     - Inside source: true
     *** True Line Result
    -      args.state.loaded = true
    -** Processing line: ~      tick_game args # calls tick_game method, runs game~
    +    if args.state.scene_render_override
    +** Processing line: ~      send args.state.scene_render_override, args, lowrez_sprites, lowrez_labels, lowrez_solids~
     - Inside source: true
     *** True Line Result
    -      tick_game args # calls tick_game method, runs game
    +      send args.state.scene_render_override, args, lowrez_sprites, lowrez_labels, lowrez_solids
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
         end
    +** Processing line: ~    storyline_to_show = args.state.storyline_to_show || ""~
    +- Inside source: true
    +*** True Line Result
    +    storyline_to_show = args.state.storyline_to_show || ""
    +** Processing line: ~    render_adornments args, lowrez_sprites~
    +- Inside source: true
    +*** True Line Result
    +    render_adornments args, lowrez_sprites
    +** Processing line: ~    render_storyline_dialog args, lowrez_labels, lowrez_sprites~
    +- Inside source: true
    +*** True Line Result
    +    render_storyline_dialog args, lowrez_labels, lowrez_sprites
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    if args.state.tick_count.mod_zero? 60 # update every 60 frames~
    +** Processing line: ~    if args.state.background == 'sprites/tribute-game-over.png'~
     - Inside source: true
     *** True Line Result
    -    if args.state.tick_count.mod_zero? 60 # update every 60 frames
    -** Processing line: ~      t = args.gtk.ffi_file.mtime GAME_FILE # mtime returns modification time for named file~
    +    if args.state.background == 'sprites/tribute-game-over.png'
    +** Processing line: ~      lowrez_sprites << [0, 0, 64, 11, 'sprites/label-background.png', 0, adornments_alpha(args, 200), 0, 0, 0]~
     - Inside source: true
     *** True Line Result
    -      t = args.gtk.ffi_file.mtime GAME_FILE # mtime returns modification time for named file
    -** Processing line: ~      if t != args.state.mtime~
    +      lowrez_sprites << [0, 0, 64, 11, 'sprites/label-background.png', 0, adornments_alpha(args, 200), 0, 0, 0]
    +** Processing line: ~      lowrez_labels << [9, 6, 'Return of', 255, 255, 255]~
     - Inside source: true
     *** True Line Result
    -      if t != args.state.mtime
    -** Processing line: ~        args.state.mtime = t~
    +      lowrez_labels << [9, 6, 'Return of', 255, 255, 255]
    +** Processing line: ~      lowrez_labels << [9, 1, ' Serenity', 255, 255, 255]~
     - Inside source: true
     *** True Line Result
    -        args.state.mtime = t
    -** Processing line: ~        require GAME_FILE # require used to load file~
    +      lowrez_labels << [9, 1, ' Serenity', 255, 255, 255]
    +** Processing line: ~      if !args.state.ended~
     - Inside source: true
     *** True Line Result
    -        require GAME_FILE # require used to load file
    -** Processing line: ~        args.state.game_definition = nil # game definition and decision are empty~
    +      if !args.state.ended
    +** Processing line: ~        args.gtk.stop_music~
     - Inside source: true
     *** True Line Result
    -        args.state.game_definition = nil # game definition and decision are empty
    -** Processing line: ~        args.state.decision_id = nil~
    +        args.gtk.stop_music
    +** Processing line: ~        args.outputs.sounds << 'sounds/music-loop.ogg'~
     - Inside source: true
     *** True Line Result
    -        args.state.decision_id = nil
    +        args.outputs.sounds << 'sounds/music-loop.ogg'
    +** Processing line: ~        args.state.ended = true~
    +- Inside source: true
    +*** True Line Result
    +        args.state.ended = true
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    @@ -134271,34 +139843,30 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # Runs methods needed for game to function properly~
    -- Inside source: true
    -*** True Line Result
    -  # Runs methods needed for game to function properly
    -** Processing line: ~  # Creates a rectangular border around the screen~
    +** Processing line: ~  def player_md_right args, x, y~
     - Inside source: true
     *** True Line Result
    -  # Creates a rectangular border around the screen
    -** Processing line: ~  def tick_game args~
    +  def player_md_right args, x, y
    +** Processing line: ~    [x, y, 4, 11, 'sprites/player-right.png', 0, (global_alpha_percentage args)]~
     - Inside source: true
     *** True Line Result
    -  def tick_game args
    -** Processing line: ~    defaults args~
    +    [x, y, 4, 11, 'sprites/player-right.png', 0, (global_alpha_percentage args)]
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    defaults args
    -** Processing line: ~    args.borders << args.grid.rect~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    args.borders << args.grid.rect
    -** Processing line: ~    render_decision args~
    +
    +** Processing line: ~  def player_md_left args, x, y~
     - Inside source: true
     *** True Line Result
    -    render_decision args
    -** Processing line: ~    process_inputs args~
    +  def player_md_left args, x, y
    +** Processing line: ~    [x, y, 4, 11, 'sprites/player-left.png', 0, (global_alpha_percentage args)]~
     - Inside source: true
     *** True Line Result
    -    process_inputs args
    +    [x, y, 4, 11, 'sprites/player-left.png', 0, (global_alpha_percentage args)]
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -134307,26 +139875,30 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # Sets default values and uses decision.rb file to define game and decision_id~
    +** Processing line: ~  def player_md_up args, x, y~
     - Inside source: true
     *** True Line Result
    -  # Sets default values and uses decision.rb file to define game and decision_id
    -** Processing line: ~  # variable using the starting decision~
    +  def player_md_up args, x, y
    +** Processing line: ~    [x, y, 4, 11, 'sprites/player-up.png', 0, (global_alpha_percentage args)]~
     - Inside source: true
     *** True Line Result
    -  # variable using the starting decision
    -** Processing line: ~  def defaults args~
    +    [x, y, 4, 11, 'sprites/player-up.png', 0, (global_alpha_percentage args)]
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -  def defaults args
    -** Processing line: ~    args.state.game_definition ||= game~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    args.state.game_definition ||= game
    -** Processing line: ~    args.state.decision_id ||= args.state.game_definition[:starting_decision]~
    +
    +** Processing line: ~  def player_md_down args, x, y~
     - Inside source: true
     *** True Line Result
    -    args.state.decision_id ||= args.state.game_definition[:starting_decision]
    +  def player_md_down args, x, y
    +** Processing line: ~    [x, y, 4, 11, 'sprites/player-down.png', 0, (global_alpha_percentage args)]~
    +- Inside source: true
    +*** True Line Result
    +    [x, y, 4, 11, 'sprites/player-down.png', 0, (global_alpha_percentage args)]
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -134335,118 +139907,158 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # Outputs the possible decision descriptions the user can choose onto the screen~
    +** Processing line: ~  def player_sm args, x, y~
     - Inside source: true
     *** True Line Result
    -  # Outputs the possible decision descriptions the user can choose onto the screen
    -** Processing line: ~  # as well as what key to press on their keyboard to make their decision~
    +  def player_sm args, x, y
    +** Processing line: ~    [x, y, 3, 7, 'sprites/player-zoomed-out.png', 0, (global_alpha_percentage args)]~
     - Inside source: true
     *** True Line Result
    -  # as well as what key to press on their keyboard to make their decision
    -** Processing line: ~  def render_decision args~
    +    [x, y, 3, 7, 'sprites/player-zoomed-out.png', 0, (global_alpha_percentage args)]
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -  def render_decision args
    -** Processing line: ~    decision = current_decision args~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    decision = current_decision args
    -** Processing line: ~    # text is either the value of decision's description key or warning that no description exists~
    +
    +** Processing line: ~  def player_xs args, x, y~
     - Inside source: true
     *** True Line Result
    -    # text is either the value of decision's description key or warning that no description exists
    -** Processing line: ~    args.labels << [640, 360, decision[:description] || "No definition found for #{args.state.decision_id}. Please update decision.rb.", 0, 1] # uses string interpolation~
    +  def player_xs args, x, y
    +** Processing line: ~    [x, y, 1, 4, 'sprites/player-zoomed-out.png', 0, (global_alpha_percentage args)]~
     - Inside source: true
     *** True Line Result
    -    args.labels << [640, 360, decision[:description] || "No definition found for #{args.state.decision_id}. Please update decision.rb.", 0, 1] # uses string interpolation
    +    [x, y, 1, 4, 'sprites/player-zoomed-out.png', 0, (global_alpha_percentage args)]
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # All decisions are stored in a hash~
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
    +*** True Line Result
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +
    +** Processing line: ~*** Rpg Narrative - Return Of Serenity - require.rb~
    +- Header detected.
    +*** True Line Result
    +
    +*** True Line Result
    +*** Rpg Narrative - Return Of Serenity - require.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/99_genre_rpg_narrative/return_of_serenity/app/require.rb~
     - Inside source: true
     *** True Line Result
    -    # All decisions are stored in a hash
    -** Processing line: ~    # The descriptions output onto the screen are the values for the description keys of the hash.~
    +  # ./samples/99_genre_rpg_narrative/return_of_serenity/app/require.rb
    +** Processing line: ~  require 'app/lowrez_simulator.rb'~
     - Inside source: true
     *** True Line Result
    -    # The descriptions output onto the screen are the values for the description keys of the hash.
    -** Processing line: ~    if decision[:option_one]~
    +  require 'app/lowrez_simulator.rb'
    +** Processing line: ~  require 'app/storyline_day_one.rb'~
     - Inside source: true
     *** True Line Result
    -    if decision[:option_one]
    -** Processing line: ~      args.labels << [10, 360, decision[:option_one][:description], 0, 0] # option one's description label~
    +  require 'app/storyline_day_one.rb'
    +** Processing line: ~  require 'app/storyline_blinking_light.rb'~
     - Inside source: true
     *** True Line Result
    -      args.labels << [10, 360, decision[:option_one][:description], 0, 0] # option one's description label
    -** Processing line: ~      args.labels << [10, 335, "(Press 'left' on the keyboard to select this decision)", -5, 0] # label of what key to press to select the decision~
    +  require 'app/storyline_blinking_light.rb'
    +** Processing line: ~  require 'app/storyline_serenity_introduction.rb'~
     - Inside source: true
     *** True Line Result
    -      args.labels << [10, 335, "(Press 'left' on the keyboard to select this decision)", -5, 0] # label of what key to press to select the decision
    -** Processing line: ~    end~
    +  require 'app/storyline_serenity_introduction.rb'
    +** Processing line: ~  require 'app/storyline_speed_of_light.rb'~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +  require 'app/storyline_speed_of_light.rb'
    +** Processing line: ~  require 'app/storyline_serenity_alive.rb'~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    if decision[:option_two]~
    +  require 'app/storyline_serenity_alive.rb'
    +** Processing line: ~  require 'app/storyline_serenity_bio.rb'~
     - Inside source: true
     *** True Line Result
    -    if decision[:option_two]
    -** Processing line: ~      args.labels << [1270, 360, decision[:option_two][:description], 0, 2] # option two's description~
    +  require 'app/storyline_serenity_bio.rb'
    +** Processing line: ~  require 'app/storyline_anka.rb'~
     - Inside source: true
     *** True Line Result
    -      args.labels << [1270, 360, decision[:option_two][:description], 0, 2] # option two's description
    -** Processing line: ~      args.labels << [1270, 335, "(Press 'right' on the keyboard to select this decision)", -5, 2]~
    +  require 'app/storyline_anka.rb'
    +** Processing line: ~  require 'app/storyline_final_message.rb'~
     - Inside source: true
     *** True Line Result
    -      args.labels << [1270, 335, "(Press 'right' on the keyboard to select this decision)", -5, 2]
    -** Processing line: ~    end~
    +  require 'app/storyline_final_message.rb'
    +** Processing line: ~  require 'app/storyline_final_decision.rb'~
     - Inside source: true
     *** True Line Result
    -    end
    +  require 'app/storyline_final_decision.rb'
    +** Processing line: ~  require 'app/storyline.rb'~
    +- Inside source: true
    +*** True Line Result
    +  require 'app/storyline.rb'
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    if decision[:option_three]~
    -- Inside source: true
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
     *** True Line Result
    -    if decision[:option_three]
    -** Processing line: ~      args.labels << [640, 45, decision[:option_three][:description], 0, 1] # option three's description~
    -- Inside source: true
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
     *** True Line Result
    -      args.labels << [640, 45, decision[:option_three][:description], 0, 1] # option three's description
    -** Processing line: ~      args.labels << [640, 20, "(Press 'down' on the keyboard to select this decision)", -5, 1]~
    +
    +** Processing line: ~*** Rpg Narrative - Return Of Serenity - storyline.rb~
    +- Header detected.
    +*** True Line Result
    +
    +*** True Line Result
    +*** Rpg Narrative - Return Of Serenity - storyline.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/99_genre_rpg_narrative/return_of_serenity/app/storyline.rb~
     - Inside source: true
     *** True Line Result
    -      args.labels << [640, 20, "(Press 'down' on the keyboard to select this decision)", -5, 1]
    -** Processing line: ~    end~
    +  # ./samples/99_genre_rpg_narrative/return_of_serenity/app/storyline.rb
    +** Processing line: ~  def hotspot_top~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +  def hotspot_top
    +** Processing line: ~    [4, 61, 56, 3]~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    if decision[:option_four]~
    +    [4, 61, 56, 3]
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    if decision[:option_four]
    -** Processing line: ~      args.labels << [640, 700, decision[:option_four][:description], 0, 1] # option four's description~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      args.labels << [640, 700, decision[:option_four][:description], 0, 1] # option four's description
    -** Processing line: ~      args.labels << [640, 675, "(Press 'up' on the keyboard to select this decision)", -5, 1]~
    +
    +** Processing line: ~  def hotspot_bottom~
     - Inside source: true
     *** True Line Result
    -      args.labels << [640, 675, "(Press 'up' on the keyboard to select this decision)", -5, 1]
    -** Processing line: ~    end~
    +  def hotspot_bottom
    +** Processing line: ~    [4, 0, 56, 3]~
     - Inside source: true
     *** True Line Result
    -    end
    +    [4, 0, 56, 3]
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -134455,86 +140067,94 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # Uses keyboard input from the user to make a decision~
    -- Inside source: true
    -*** True Line Result
    -  # Uses keyboard input from the user to make a decision
    -** Processing line: ~  # Assigns the decision as the value of the decision_id variable~
    +** Processing line: ~  def hotspot_top_right~
     - Inside source: true
     *** True Line Result
    -  # Assigns the decision as the value of the decision_id variable
    -** Processing line: ~  def process_inputs args~
    +  def hotspot_top_right
    +** Processing line: ~    [62, 35, 3, 25]~
     - Inside source: true
     *** True Line Result
    -  def process_inputs args
    -** Processing line: ~    decision = current_decision args # calls current_decision method~
    +    [62, 35, 3, 25]
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    decision = current_decision args # calls current_decision method
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    if args.keyboard.key_down.left! && decision[:option_one] # if left key pressed and option one exists~
    +** Processing line: ~  def hotspot_bottom_right~
     - Inside source: true
     *** True Line Result
    -    if args.keyboard.key_down.left! && decision[:option_one] # if left key pressed and option one exists
    -** Processing line: ~      args.state.decision_id = decision[:option_one][:decision] # value of option one's decision hash key is set to decision_id~
    +  def hotspot_bottom_right
    +** Processing line: ~    [62, 0, 3, 25]~
     - Inside source: true
     *** True Line Result
    -      args.state.decision_id = decision[:option_one][:decision] # value of option one's decision hash key is set to decision_id
    -** Processing line: ~    end~
    +    [62, 0, 3, 25]
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    end
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    if args.keyboard.key_down.right! && decision[:option_two] # if right key pressed and option two exists~
    +** Processing line: ~  def storyline_history_include? args, text~
     - Inside source: true
     *** True Line Result
    -    if args.keyboard.key_down.right! && decision[:option_two] # if right key pressed and option two exists
    -** Processing line: ~      args.state.decision_id = decision[:option_two][:decision] # value of option two's decision hash key is set to decision_id~
    +  def storyline_history_include? args, text
    +** Processing line: ~    args.state.storyline_history.any? { |s| s.gsub("-", "").gsub(" ", "").include? text.gsub("-", "").gsub(" ", "") }~
     - Inside source: true
     *** True Line Result
    -      args.state.decision_id = decision[:option_two][:decision] # value of option two's decision hash key is set to decision_id
    -** Processing line: ~    end~
    +    args.state.storyline_history.any? { |s| s.gsub("-", "").gsub(" ", "").include? text.gsub("-", "").gsub(" ", "") }
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    end
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    if args.keyboard.key_down.down! && decision[:option_three] # if down key pressed and option three exists~
    +** Processing line: ~  def blinking_light_side_of_home_render args, lowrez_sprites, lowrez_labels, lowrez_solids~
     - Inside source: true
     *** True Line Result
    -    if args.keyboard.key_down.down! && decision[:option_three] # if down key pressed and option three exists
    -** Processing line: ~      args.state.decision_id = decision[:option_three][:decision] # value of option three's decision hash key is set to decision_id~
    +  def blinking_light_side_of_home_render args, lowrez_sprites, lowrez_labels, lowrez_solids
    +** Processing line: ~    lowrez_sprites << [48, 44, 5, 5, 'sprites/square.png', 0,  50 * (args.state.tick_count % 50).fdiv(50), 0, 255, 0]~
     - Inside source: true
     *** True Line Result
    -      args.state.decision_id = decision[:option_three][:decision] # value of option three's decision hash key is set to decision_id
    -** Processing line: ~    end~
    +    lowrez_sprites << [48, 44, 5, 5, 'sprites/square.png', 0,  50 * (args.state.tick_count % 50).fdiv(50), 0, 255, 0]
    +** Processing line: ~    lowrez_sprites << [49, 45, 3, 3, 'sprites/square.png', 0, 100 * (args.state.tick_count % 50).fdiv(50), 0, 255, 0]~
     - Inside source: true
     *** True Line Result
    -    end
    +    lowrez_sprites << [49, 45, 3, 3, 'sprites/square.png', 0, 100 * (args.state.tick_count % 50).fdiv(50), 0, 255, 0]
    +** Processing line: ~    lowrez_sprites << [50, 46, 1, 1, 'sprites/square.png', 0, 255 * (args.state.tick_count % 50).fdiv(50), 0, 255, 0]~
    +- Inside source: true
    +*** True Line Result
    +    lowrez_sprites << [50, 46, 1, 1, 'sprites/square.png', 0, 255 * (args.state.tick_count % 50).fdiv(50), 0, 255, 0]
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    if args.keyboard.key_down.up! && decision[:option_four] # if up key pressed and option four exists~
    +** Processing line: ~  def blinking_light_mountain_pass_render args, lowrez_sprites, lowrez_labels, lowrez_solids~
     - Inside source: true
     *** True Line Result
    -    if args.keyboard.key_down.up! && decision[:option_four] # if up key pressed and option four exists
    -** Processing line: ~      args.state.decision_id = decision[:option_four][:decision] # value of option four's decision hash key is set to decision_id~
    +  def blinking_light_mountain_pass_render args, lowrez_sprites, lowrez_labels, lowrez_solids
    +** Processing line: ~    lowrez_sprites << [18, 47, 5, 5, 'sprites/square.png', 0,  50 * (args.state.tick_count % 50).fdiv(50), 0, 255, 0]~
     - Inside source: true
     *** True Line Result
    -      args.state.decision_id = decision[:option_four][:decision] # value of option four's decision hash key is set to decision_id
    -** Processing line: ~    end~
    +    lowrez_sprites << [18, 47, 5, 5, 'sprites/square.png', 0,  50 * (args.state.tick_count % 50).fdiv(50), 0, 255, 0]
    +** Processing line: ~    lowrez_sprites << [19, 48, 3, 3, 'sprites/square.png', 0, 100 * (args.state.tick_count % 50).fdiv(50), 0, 255, 0]~
     - Inside source: true
     *** True Line Result
    -    end
    +    lowrez_sprites << [19, 48, 3, 3, 'sprites/square.png', 0, 100 * (args.state.tick_count % 50).fdiv(50), 0, 255, 0]
    +** Processing line: ~    lowrez_sprites << [20, 49, 1, 1, 'sprites/square.png', 0, 255 * (args.state.tick_count % 50).fdiv(50), 0, 255, 0]~
    +- Inside source: true
    +*** True Line Result
    +    lowrez_sprites << [20, 49, 1, 1, 'sprites/square.png', 0, 255 * (args.state.tick_count % 50).fdiv(50), 0, 255, 0]
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -134543,18 +140163,22 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # Uses decision_id's value to keep track of current decision being made~
    +** Processing line: ~  def blinking_light_path_to_observatory_render args, lowrez_sprites, lowrez_labels, lowrez_solids~
     - Inside source: true
     *** True Line Result
    -  # Uses decision_id's value to keep track of current decision being made
    -** Processing line: ~  def current_decision args~
    +  def blinking_light_path_to_observatory_render args, lowrez_sprites, lowrez_labels, lowrez_solids
    +** Processing line: ~    lowrez_sprites << [0, 26, 5, 5, 'sprites/square.png', 0,  50 * (args.state.tick_count % 50).fdiv(50), 0, 255, 0]~
     - Inside source: true
     *** True Line Result
    -  def current_decision args
    -** Processing line: ~    args.state.game_definition[:decisions][args.state.decision_id] || {} # either has value or is empty~
    +    lowrez_sprites << [0, 26, 5, 5, 'sprites/square.png', 0,  50 * (args.state.tick_count % 50).fdiv(50), 0, 255, 0]
    +** Processing line: ~    lowrez_sprites << [1, 27, 3, 3, 'sprites/square.png', 0, 100 * (args.state.tick_count % 50).fdiv(50), 0, 255, 0]~
     - Inside source: true
     *** True Line Result
    -    args.state.game_definition[:decisions][args.state.decision_id] || {} # either has value or is empty
    +    lowrez_sprites << [1, 27, 3, 3, 'sprites/square.png', 0, 100 * (args.state.tick_count % 50).fdiv(50), 0, 255, 0]
    +** Processing line: ~    lowrez_sprites << [2, 28, 1, 1, 'sprites/square.png', 0, 255 * (args.state.tick_count % 50).fdiv(50), 0, 255, 0]~
    +- Inside source: true
    +*** True Line Result
    +    lowrez_sprites << [2, 28, 1, 1, 'sprites/square.png', 0, 255 * (args.state.tick_count % 50).fdiv(50), 0, 255, 0]
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -134563,326 +140187,354 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # Resets the game.~
    +** Processing line: ~  def blinking_light_observatory_render args, lowrez_sprites, lowrez_labels, lowrez_solids~
     - Inside source: true
     *** True Line Result
    -  # Resets the game.
    -** Processing line: ~  $gtk.reset~
    +  def blinking_light_observatory_render args, lowrez_sprites, lowrez_labels, lowrez_solids
    +** Processing line: ~    lowrez_sprites << [23, 59, 5, 5, 'sprites/square.png', 0,  50 * (args.state.tick_count % 50).fdiv(50), 0, 255, 0]~
     - Inside source: true
     *** True Line Result
    -  $gtk.reset
    -** Processing line: ~~
    +    lowrez_sprites << [23, 59, 5, 5, 'sprites/square.png', 0,  50 * (args.state.tick_count % 50).fdiv(50), 0, 255, 0]
    +** Processing line: ~    lowrez_sprites << [24, 60, 3, 3, 'sprites/square.png', 0, 100 * (args.state.tick_count % 50).fdiv(50), 0, 255, 0]~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~#+end_src~
    -- Line was identified as the end of a code block.
    +    lowrez_sprites << [24, 60, 3, 3, 'sprites/square.png', 0, 100 * (args.state.tick_count % 50).fdiv(50), 0, 255, 0]
    +** Processing line: ~    lowrez_sprites << [25, 61, 1, 1, 'sprites/square.png', 0, 255 * (args.state.tick_count % 50).fdiv(50), 0, 255, 0]~
    +- Inside source: true
     *** True Line Result
    -#+end_src
    +    lowrez_sprites << [25, 61, 1, 1, 'sprites/square.png', 0, 255 * (args.state.tick_count % 50).fdiv(50), 0, 255, 0]
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
     ** Processing line: ~~
    -- End of paragraph detected.
    +- Inside source: true
     *** True Line Result
     
    -** Processing line: ~*** Rpg Narrative - Return Of Serenity - lowrez_simulator.rb~
    -- Header detected.
    +** Processing line: ~  def blinking_light_inside_observatory_render args, lowrez_sprites, lowrez_labels, lowrez_solids~
    +- Inside source: true
     *** True Line Result
    -
    +  def blinking_light_inside_observatory_render args, lowrez_sprites, lowrez_labels, lowrez_solids
    +** Processing line: ~    lowrez_sprites << [30, 30, 5, 5, 'sprites/square.png', 0,  50 * (args.state.tick_count % 50).fdiv(50), 0, 255, 0]~
    +- Inside source: true
     *** True Line Result
    -*** Rpg Narrative - Return Of Serenity - lowrez_simulator.rb
    -** Processing line: ~#+begin_src ruby~
    -- Line was identified as the beginning of a code block.
    +    lowrez_sprites << [30, 30, 5, 5, 'sprites/square.png', 0,  50 * (args.state.tick_count % 50).fdiv(50), 0, 255, 0]
    +** Processing line: ~    lowrez_sprites << [31, 31, 3, 3, 'sprites/square.png', 0, 100 * (args.state.tick_count % 50).fdiv(50), 0, 255, 0]~
    +- Inside source: true
     *** True Line Result
    -
    +    lowrez_sprites << [31, 31, 3, 3, 'sprites/square.png', 0, 100 * (args.state.tick_count % 50).fdiv(50), 0, 255, 0]
    +** Processing line: ~    lowrez_sprites << [32, 32, 1, 1, 'sprites/square.png', 0, 255 * (args.state.tick_count % 50).fdiv(50), 0, 255, 0]~
    +- Inside source: true
     *** True Line Result
    -#+begin_src ruby
    -** Processing line: ~  # ./samples/99_genre_rpg_narrative/return_of_serenity/app/lowrez_simulator.rb~
    +    lowrez_sprites << [32, 32, 1, 1, 'sprites/square.png', 0, 255 * (args.state.tick_count % 50).fdiv(50), 0, 255, 0]
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~  def decision_graph context_message, context_action, context_result_one, context_result_two, context_result_three = [], context_result_four = []~
     - Inside source: true
     *** True Line Result
    -  # ./samples/99_genre_rpg_narrative/return_of_serenity/app/lowrez_simulator.rb
    -** Processing line: ~  ###################################################################################~
    +  def decision_graph context_message, context_action, context_result_one, context_result_two, context_result_three = [], context_result_four = []
    +** Processing line: ~    result_one_scene, result_one_label, result_one_text = context_result_one~
     - Inside source: true
     *** True Line Result
    -  ###################################################################################
    -** Processing line: ~  # YOU CAN PLAY AROUND WITH THE CODE BELOW, BUT USE CAUTION AS THIS IS WHAT EMULATES~
    +    result_one_scene, result_one_label, result_one_text = context_result_one
    +** Processing line: ~    result_two_scene, result_two_label, result_two_text = context_result_two~
     - Inside source: true
     *** True Line Result
    -  # YOU CAN PLAY AROUND WITH THE CODE BELOW, BUT USE CAUTION AS THIS IS WHAT EMULATES
    -** Processing line: ~  # THE 64x64 CANVAS.~
    +    result_two_scene, result_two_label, result_two_text = context_result_two
    +** Processing line: ~    result_three_scene, result_three_label, result_three_text = context_result_three~
     - Inside source: true
     *** True Line Result
    -  # THE 64x64 CANVAS.
    -** Processing line: ~  ###################################################################################~
    +    result_three_scene, result_three_label, result_three_text = context_result_three
    +** Processing line: ~    result_four_scene, result_four_label, result_four_text = context_result_four~
     - Inside source: true
     *** True Line Result
    -  ###################################################################################
    +    result_four_scene, result_four_label, result_four_text = context_result_four
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  TINY_RESOLUTION       = 64~
    +** Processing line: ~    top_level_hash = {~
     - Inside source: true
     *** True Line Result
    -  TINY_RESOLUTION       = 64
    -** Processing line: ~  TINY_SCALE            = 720.fdiv(TINY_RESOLUTION + 5)~
    +    top_level_hash = {
    +** Processing line: ~      background: 'sprites/decision.png',~
     - Inside source: true
     *** True Line Result
    -  TINY_SCALE            = 720.fdiv(TINY_RESOLUTION + 5)
    -** Processing line: ~  CENTER_OFFSET         = 10~
    +      background: 'sprites/decision.png',
    +** Processing line: ~      fade: 60,~
     - Inside source: true
     *** True Line Result
    -  CENTER_OFFSET         = 10
    -** Processing line: ~  EMULATED_FONT_SIZE    = 20~
    +      fade: 60,
    +** Processing line: ~      player: [20, 36],~
     - Inside source: true
     *** True Line Result
    -  EMULATED_FONT_SIZE    = 20
    -** Processing line: ~  EMULATED_FONT_X_ZERO  = 0~
    +      player: [20, 36],
    +** Processing line: ~      storylines: [ ],~
     - Inside source: true
     *** True Line Result
    -  EMULATED_FONT_X_ZERO  = 0
    -** Processing line: ~  EMULATED_FONT_Y_ZERO  = 46~
    +      storylines: [ ],
    +** Processing line: ~      scenes: [ ]~
     - Inside source: true
     *** True Line Result
    -  EMULATED_FONT_Y_ZERO  = 46
    -** Processing line: ~~
    +      scenes: [ ]
    +** Processing line: ~    }~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def tick args~
    +    }
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  def tick args
    -** Processing line: ~    sprites = []~
    +
    +** Processing line: ~    confirmation_result_one_hash = {~
     - Inside source: true
     *** True Line Result
    -    sprites = []
    -** Processing line: ~    labels = []~
    +    confirmation_result_one_hash = {
    +** Processing line: ~      background: 'sprites/decision.png',~
     - Inside source: true
     *** True Line Result
    -    labels = []
    -** Processing line: ~    borders = []~
    +      background: 'sprites/decision.png',
    +** Processing line: ~      scenes: [ ],~
     - Inside source: true
     *** True Line Result
    -    borders = []
    -** Processing line: ~    solids = []~
    +      scenes: [ ],
    +** Processing line: ~      storylines: [ ]~
     - Inside source: true
     *** True Line Result
    -    solids = []
    -** Processing line: ~    mouse = emulate_lowrez_mouse args~
    +      storylines: [ ]
    +** Processing line: ~    }~
     - Inside source: true
     *** True Line Result
    -    mouse = emulate_lowrez_mouse args
    -** Processing line: ~    args.state.show_gridlines = false~
    +    }
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    args.state.show_gridlines = false
    -** Processing line: ~    lowrez_tick args, sprites, labels, borders, solids, mouse~
    +
    +** Processing line: ~    confirmation_result_two_hash = {~
     - Inside source: true
     *** True Line Result
    -    lowrez_tick args, sprites, labels, borders, solids, mouse
    -** Processing line: ~    render_gridlines_if_needed args~
    +    confirmation_result_two_hash = {
    +** Processing line: ~      background: 'sprites/decision.png',~
     - Inside source: true
     *** True Line Result
    -    render_gridlines_if_needed args
    -** Processing line: ~    render_mouse_crosshairs args, mouse~
    +      background: 'sprites/decision.png',
    +** Processing line: ~      scenes: [ ],~
     - Inside source: true
     *** True Line Result
    -    render_mouse_crosshairs args, mouse
    -** Processing line: ~    emulate_lowrez_scene args, sprites, labels, borders, solids, mouse~
    +      scenes: [ ],
    +** Processing line: ~      storylines: [ ]~
     - Inside source: true
     *** True Line Result
    -    emulate_lowrez_scene args, sprites, labels, borders, solids, mouse
    -** Processing line: ~  end~
    +      storylines: [ ]
    +** Processing line: ~    }~
     - Inside source: true
     *** True Line Result
    -  end
    +    }
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def emulate_lowrez_mouse args~
    +** Processing line: ~    confirmation_result_three_hash = {~
     - Inside source: true
     *** True Line Result
    -  def emulate_lowrez_mouse args
    -** Processing line: ~    args.state.new_entity_strict(:lowrez_mouse) do |m|~
    +    confirmation_result_three_hash = {
    +** Processing line: ~      background: 'sprites/decision.png',~
     - Inside source: true
     *** True Line Result
    -    args.state.new_entity_strict(:lowrez_mouse) do |m|
    -** Processing line: ~      m.x = args.mouse.x.idiv(TINY_SCALE) - CENTER_OFFSET.idiv(TINY_SCALE) - 1~
    +      background: 'sprites/decision.png',
    +** Processing line: ~      scenes: [ ],~
     - Inside source: true
     *** True Line Result
    -      m.x = args.mouse.x.idiv(TINY_SCALE) - CENTER_OFFSET.idiv(TINY_SCALE) - 1
    -** Processing line: ~      m.y = args.mouse.y.idiv(TINY_SCALE)~
    +      scenes: [ ],
    +** Processing line: ~      storylines: [ ]~
     - Inside source: true
     *** True Line Result
    -      m.y = args.mouse.y.idiv(TINY_SCALE)
    -** Processing line: ~      if args.mouse.click~
    +      storylines: [ ]
    +** Processing line: ~    }~
     - Inside source: true
     *** True Line Result
    -      if args.mouse.click
    -** Processing line: ~        m.click = [~
    +    }
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        m.click = [
    -** Processing line: ~          args.mouse.click.point.x.idiv(TINY_SCALE) - CENTER_OFFSET.idiv(TINY_SCALE) - 1,~
    +
    +** Processing line: ~    confirmation_result_four_hash = {~
     - Inside source: true
     *** True Line Result
    -          args.mouse.click.point.x.idiv(TINY_SCALE) - CENTER_OFFSET.idiv(TINY_SCALE) - 1,
    -** Processing line: ~          args.mouse.click.point.y.idiv(TINY_SCALE)~
    +    confirmation_result_four_hash = {
    +** Processing line: ~      background: 'sprites/decision.png',~
     - Inside source: true
     *** True Line Result
    -          args.mouse.click.point.y.idiv(TINY_SCALE)
    -** Processing line: ~        ]~
    +      background: 'sprites/decision.png',
    +** Processing line: ~      scenes: [ ],~
     - Inside source: true
     *** True Line Result
    -        ]
    -** Processing line: ~        m.down = m.click~
    +      scenes: [ ],
    +** Processing line: ~      storylines: [ ]~
     - Inside source: true
     *** True Line Result
    -        m.down = m.click
    -** Processing line: ~      else~
    +      storylines: [ ]
    +** Processing line: ~    }~
     - Inside source: true
     *** True Line Result
    -      else
    -** Processing line: ~        m.click = nil~
    +    }
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        m.click = nil
    -** Processing line: ~        m.down = nil~
    +
    +** Processing line: ~    top_level_hash[:storylines] << [ 5, 35, 4, 4, context_message]~
     - Inside source: true
     *** True Line Result
    -        m.down = nil
    -** Processing line: ~      end~
    +    top_level_hash[:storylines] << [ 5, 35, 4, 4, context_message]
    +** Processing line: ~    top_level_hash[:storylines] << [20, 35, 4, 4, context_action]~
     - Inside source: true
     *** True Line Result
    -      end
    +    top_level_hash[:storylines] << [20, 35, 4, 4, context_action]
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      if args.mouse.up~
    +** Processing line: ~    confirmation_result_one_hash[:scenes]       << [20, 35, 4, 4, top_level_hash]~
     - Inside source: true
     *** True Line Result
    -      if args.mouse.up
    -** Processing line: ~        m.up = [~
    +    confirmation_result_one_hash[:scenes]       << [20, 35, 4, 4, top_level_hash]
    +** Processing line: ~    confirmation_result_one_hash[:scenes]       << [60, 50, 4, 4, result_one_scene]~
     - Inside source: true
     *** True Line Result
    -        m.up = [
    -** Processing line: ~          args.mouse.up.point.x.idiv(TINY_SCALE) - CENTER_OFFSET.idiv(TINY_SCALE) - 1,~
    +    confirmation_result_one_hash[:scenes]       << [60, 50, 4, 4, result_one_scene]
    +** Processing line: ~    confirmation_result_one_hash[:storylines]   << [40, 50, 4, 4, "#{result_one_label}: \"#{result_one_text}\""]~
     - Inside source: true
     *** True Line Result
    -          args.mouse.up.point.x.idiv(TINY_SCALE) - CENTER_OFFSET.idiv(TINY_SCALE) - 1,
    -** Processing line: ~          args.mouse.up.point.y.idiv(TINY_SCALE)~
    +    confirmation_result_one_hash[:storylines]   << [40, 50, 4, 4, "#{result_one_label}: \"#{result_one_text}\""]
    +** Processing line: ~    confirmation_result_one_hash[:scenes]       << [40, 40, 4, 4, confirmation_result_four_hash] if result_four_scene~
     - Inside source: true
     *** True Line Result
    -          args.mouse.up.point.y.idiv(TINY_SCALE)
    -** Processing line: ~        ]~
    +    confirmation_result_one_hash[:scenes]       << [40, 40, 4, 4, confirmation_result_four_hash] if result_four_scene
    +** Processing line: ~    confirmation_result_one_hash[:scenes]       << [40, 30, 4, 4, confirmation_result_three_hash] if result_three_scene~
     - Inside source: true
     *** True Line Result
    -        ]
    -** Processing line: ~      else~
    +    confirmation_result_one_hash[:scenes]       << [40, 30, 4, 4, confirmation_result_three_hash] if result_three_scene
    +** Processing line: ~    confirmation_result_one_hash[:scenes]       << [40, 20, 4, 4, confirmation_result_two_hash]~
     - Inside source: true
     *** True Line Result
    -      else
    -** Processing line: ~        m.up = nil~
    +    confirmation_result_one_hash[:scenes]       << [40, 20, 4, 4, confirmation_result_two_hash]
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        m.up = nil
    -** Processing line: ~      end~
    +
    +** Processing line: ~    confirmation_result_two_hash[:scenes]       << [20, 35, 4, 4, top_level_hash]~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +    confirmation_result_two_hash[:scenes]       << [20, 35, 4, 4, top_level_hash]
    +** Processing line: ~    confirmation_result_two_hash[:scenes]       << [40, 50, 4, 4, confirmation_result_one_hash]~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~  end~
    +    confirmation_result_two_hash[:scenes]       << [40, 50, 4, 4, confirmation_result_one_hash]
    +** Processing line: ~    confirmation_result_two_hash[:scenes]       << [40, 40, 4, 4, confirmation_result_four_hash] if result_four_scene~
     - Inside source: true
     *** True Line Result
    -  end
    +    confirmation_result_two_hash[:scenes]       << [40, 40, 4, 4, confirmation_result_four_hash] if result_four_scene
    +** Processing line: ~    confirmation_result_two_hash[:scenes]       << [40, 30, 4, 4, confirmation_result_three_hash] if result_three_scene~
    +- Inside source: true
    +*** True Line Result
    +    confirmation_result_two_hash[:scenes]       << [40, 30, 4, 4, confirmation_result_three_hash] if result_three_scene
    +** Processing line: ~    confirmation_result_two_hash[:scenes]       << [60, 20, 4, 4, result_two_scene]~
    +- Inside source: true
    +*** True Line Result
    +    confirmation_result_two_hash[:scenes]       << [60, 20, 4, 4, result_two_scene]
    +** Processing line: ~    confirmation_result_two_hash[:storylines]   << [40, 20, 4, 4, "#{result_two_label}: \"#{result_two_text}\""]~
    +- Inside source: true
    +*** True Line Result
    +    confirmation_result_two_hash[:storylines]   << [40, 20, 4, 4, "#{result_two_label}: \"#{result_two_text}\""]
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def render_mouse_crosshairs args, mouse~
    +** Processing line: ~    confirmation_result_three_hash[:scenes]     << [20, 35, 4, 4, top_level_hash]~
     - Inside source: true
     *** True Line Result
    -  def render_mouse_crosshairs args, mouse
    -** Processing line: ~    return unless args.state.show_gridlines~
    +    confirmation_result_three_hash[:scenes]     << [20, 35, 4, 4, top_level_hash]
    +** Processing line: ~    confirmation_result_three_hash[:scenes]     << [40, 50, 4, 4, confirmation_result_one_hash]~
     - Inside source: true
     *** True Line Result
    -    return unless args.state.show_gridlines
    -** Processing line: ~    args.labels << [10, 25, "mouse: #{mouse.x} #{mouse.y}", 255, 255, 255]~
    +    confirmation_result_three_hash[:scenes]     << [40, 50, 4, 4, confirmation_result_one_hash]
    +** Processing line: ~    confirmation_result_three_hash[:scenes]     << [40, 40, 4, 4, confirmation_result_four_hash]~
     - Inside source: true
     *** True Line Result
    -    args.labels << [10, 25, "mouse: #{mouse.x} #{mouse.y}", 255, 255, 255]
    -** Processing line: ~  end~
    +    confirmation_result_three_hash[:scenes]     << [40, 40, 4, 4, confirmation_result_four_hash]
    +** Processing line: ~    confirmation_result_three_hash[:scenes]     << [60, 30, 4, 4, result_three_scene]~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +    confirmation_result_three_hash[:scenes]     << [60, 30, 4, 4, result_three_scene]
    +** Processing line: ~    confirmation_result_three_hash[:storylines] << [40, 30, 4, 4, "#{result_three_label}: \"#{result_three_text}\""]~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def emulate_lowrez_scene args, sprites, labels, borders, solids, mouse~
    +    confirmation_result_three_hash[:storylines] << [40, 30, 4, 4, "#{result_three_label}: \"#{result_three_text}\""]
    +** Processing line: ~    confirmation_result_three_hash[:scenes]     << [40, 20, 4, 4, confirmation_result_two_hash]~
     - Inside source: true
     *** True Line Result
    -  def emulate_lowrez_scene args, sprites, labels, borders, solids, mouse
    -** Processing line: ~    args.render_target(:lowrez).solids  << [0, 0, 1280, 720]~
    +    confirmation_result_three_hash[:scenes]     << [40, 20, 4, 4, confirmation_result_two_hash]
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    args.render_target(:lowrez).solids  << [0, 0, 1280, 720]
    -** Processing line: ~    args.render_target(:lowrez).sprites << sprites~
    +
    +** Processing line: ~    confirmation_result_four_hash[:scenes]      << [20, 35, 4, 4, top_level_hash]~
     - Inside source: true
     *** True Line Result
    -    args.render_target(:lowrez).sprites << sprites
    -** Processing line: ~    args.render_target(:lowrez).borders << borders~
    +    confirmation_result_four_hash[:scenes]      << [20, 35, 4, 4, top_level_hash]
    +** Processing line: ~    confirmation_result_four_hash[:scenes]      << [40, 50, 4, 4, confirmation_result_one_hash]~
     - Inside source: true
     *** True Line Result
    -    args.render_target(:lowrez).borders << borders
    -** Processing line: ~    args.render_target(:lowrez).solids  << solids~
    +    confirmation_result_four_hash[:scenes]      << [40, 50, 4, 4, confirmation_result_one_hash]
    +** Processing line: ~    confirmation_result_four_hash[:scenes]      << [60, 40, 4, 4, result_four_scene]~
     - Inside source: true
     *** True Line Result
    -    args.render_target(:lowrez).solids  << solids
    -** Processing line: ~    args.outputs.primitives << labels.map do |l|~
    +    confirmation_result_four_hash[:scenes]      << [60, 40, 4, 4, result_four_scene]
    +** Processing line: ~    confirmation_result_four_hash[:storylines]  << [40, 40, 4, 4, "#{result_four_label}: \"#{result_four_text}\""]~
     - Inside source: true
     *** True Line Result
    -    args.outputs.primitives << labels.map do |l|
    -** Processing line: ~      as_label = l.label~
    +    confirmation_result_four_hash[:storylines]  << [40, 40, 4, 4, "#{result_four_label}: \"#{result_four_text}\""]
    +** Processing line: ~    confirmation_result_four_hash[:scenes]      << [40, 30, 4, 4, confirmation_result_three_hash]~
     - Inside source: true
     *** True Line Result
    -      as_label = l.label
    -** Processing line: ~      l.text.each_char.each_with_index.map do |char, i|~
    +    confirmation_result_four_hash[:scenes]      << [40, 30, 4, 4, confirmation_result_three_hash]
    +** Processing line: ~    confirmation_result_four_hash[:scenes]      << [40, 20, 4, 4, confirmation_result_two_hash]~
     - Inside source: true
     *** True Line Result
    -      l.text.each_char.each_with_index.map do |char, i|
    -** Processing line: ~        [CENTER_OFFSET + EMULATED_FONT_X_ZERO + (as_label.x * TINY_SCALE) + i * 5 * TINY_SCALE,~
    +    confirmation_result_four_hash[:scenes]      << [40, 20, 4, 4, confirmation_result_two_hash]
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        [CENTER_OFFSET + EMULATED_FONT_X_ZERO + (as_label.x * TINY_SCALE) + i * 5 * TINY_SCALE,
    -** Processing line: ~         EMULATED_FONT_Y_ZERO + (as_label.y * TINY_SCALE), char,~
    +
    +** Processing line: ~    top_level_hash[:scenes]     << [40, 50, 4, 4, confirmation_result_one_hash]~
     - Inside source: true
     *** True Line Result
    -         EMULATED_FONT_Y_ZERO + (as_label.y * TINY_SCALE), char,
    -** Processing line: ~         EMULATED_FONT_SIZE, 0, as_label.r, as_label.g, as_label.b, as_label.a, 'fonts/dragonruby-gtk-4x4.ttf'].label~
    +    top_level_hash[:scenes]     << [40, 50, 4, 4, confirmation_result_one_hash]
    +** Processing line: ~    top_level_hash[:scenes]     << [40, 40, 4, 4, confirmation_result_four_hash] if result_four_scene~
     - Inside source: true
     *** True Line Result
    -         EMULATED_FONT_SIZE, 0, as_label.r, as_label.g, as_label.b, as_label.a, 'fonts/dragonruby-gtk-4x4.ttf'].label
    -** Processing line: ~      end~
    +    top_level_hash[:scenes]     << [40, 40, 4, 4, confirmation_result_four_hash] if result_four_scene
    +** Processing line: ~    top_level_hash[:scenes]     << [40, 30, 4, 4, confirmation_result_three_hash] if result_three_scene~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +    top_level_hash[:scenes]     << [40, 30, 4, 4, confirmation_result_three_hash] if result_three_scene
    +** Processing line: ~    top_level_hash[:scenes]     << [40, 20, 4, 4, confirmation_result_two_hash]~
     - Inside source: true
     *** True Line Result
    -    end
    +    top_level_hash[:scenes]     << [40, 20, 4, 4, confirmation_result_two_hash]
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    args.sprites    << [CENTER_OFFSET, 0, 1280 * TINY_SCALE, 720 * TINY_SCALE, :lowrez]~
    +** Processing line: ~    top_level_hash~
     - Inside source: true
     *** True Line Result
    -    args.sprites    << [CENTER_OFFSET, 0, 1280 * TINY_SCALE, 720 * TINY_SCALE, :lowrez]
    +    top_level_hash
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -134891,74 +140543,78 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def render_gridlines_if_needed args~
    +** Processing line: ~  def ship_control_hotspot offset_x, offset_y, a, b, c, d~
     - Inside source: true
     *** True Line Result
    -  def render_gridlines_if_needed args
    -** Processing line: ~    if args.state.show_gridlines && args.static_lines.length == 0~
    +  def ship_control_hotspot offset_x, offset_y, a, b, c, d
    +** Processing line: ~    results = []~
     - Inside source: true
     *** True Line Result
    -    if args.state.show_gridlines && args.static_lines.length == 0
    -** Processing line: ~      args.static_lines << 65.times.map do |i|~
    +    results = []
    +** Processing line: ~    results << [ 6 + offset_x, 0 + offset_y, 4, 4, a]  if a~
     - Inside source: true
     *** True Line Result
    -      args.static_lines << 65.times.map do |i|
    -** Processing line: ~        [~
    +    results << [ 6 + offset_x, 0 + offset_y, 4, 4, a]  if a
    +** Processing line: ~    results << [ 1 + offset_x, 5 + offset_y, 4, 4, b]  if b~
     - Inside source: true
     *** True Line Result
    -        [
    -** Processing line: ~          [CENTER_OFFSET + i * TINY_SCALE + 1,  0,~
    +    results << [ 1 + offset_x, 5 + offset_y, 4, 4, b]  if b
    +** Processing line: ~    results << [ 6 + offset_x, 5 + offset_y, 4, 4, c]  if c~
     - Inside source: true
     *** True Line Result
    -          [CENTER_OFFSET + i * TINY_SCALE + 1,  0,
    -** Processing line: ~           CENTER_OFFSET + i * TINY_SCALE + 1,  720,                128, 128, 128],~
    +    results << [ 6 + offset_x, 5 + offset_y, 4, 4, c]  if c
    +** Processing line: ~    results << [ 11 + offset_x, 5 + offset_y, 4, 4, d] if d~
     - Inside source: true
     *** True Line Result
    -           CENTER_OFFSET + i * TINY_SCALE + 1,  720,                128, 128, 128],
    -** Processing line: ~          [CENTER_OFFSET + i * TINY_SCALE,      0,~
    +    results << [ 11 + offset_x, 5 + offset_y, 4, 4, d] if d
    +** Processing line: ~    results~
     - Inside source: true
     *** True Line Result
    -          [CENTER_OFFSET + i * TINY_SCALE,      0,
    -** Processing line: ~           CENTER_OFFSET + i * TINY_SCALE,      720,                128, 128, 128],~
    +    results
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -           CENTER_OFFSET + i * TINY_SCALE,      720,                128, 128, 128],
    -** Processing line: ~          [CENTER_OFFSET,                       0 + i * TINY_SCALE,~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -          [CENTER_OFFSET,                       0 + i * TINY_SCALE,
    -** Processing line: ~           CENTER_OFFSET + 720,                 0 + i * TINY_SCALE, 128, 128, 128],~
    +
    +** Processing line: ~  def reload_current_scene~
     - Inside source: true
     *** True Line Result
    -           CENTER_OFFSET + 720,                 0 + i * TINY_SCALE, 128, 128, 128],
    -** Processing line: ~          [CENTER_OFFSET,                       1 + i * TINY_SCALE,~
    +  def reload_current_scene
    +** Processing line: ~    if $gtk.args.state.last_hotspot_scene~
     - Inside source: true
     *** True Line Result
    -          [CENTER_OFFSET,                       1 + i * TINY_SCALE,
    -** Processing line: ~           CENTER_OFFSET + 720,                 1 + i * TINY_SCALE, 128, 128, 128]~
    +    if $gtk.args.state.last_hotspot_scene
    +** Processing line: ~      set_scene $gtk.args, send($gtk.args.state.last_hotspot_scene, $gtk.args)~
     - Inside source: true
     *** True Line Result
    -           CENTER_OFFSET + 720,                 1 + i * TINY_SCALE, 128, 128, 128]
    -** Processing line: ~        ]~
    +      set_scene $gtk.args, send($gtk.args.state.last_hotspot_scene, $gtk.args)
    +** Processing line: ~      tick $gtk.args~
     - Inside source: true
     *** True Line Result
    -        ]
    -** Processing line: ~      end~
    +      tick $gtk.args
    +** Processing line: ~    elsif respond_to? :set_scene~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    elsif !args.state.show_gridlines~
    +    elsif respond_to? :set_scene
    +** Processing line: ~      set_scene $gtk.args, (replied_to_serenity_alive_firmly $gtk.args)~
     - Inside source: true
     *** True Line Result
    -    elsif !args.state.show_gridlines
    -** Processing line: ~      args.static_lines.clear~
    +      set_scene $gtk.args, (replied_to_serenity_alive_firmly $gtk.args)
    +** Processing line: ~      tick $gtk.args~
     - Inside source: true
     *** True Line Result
    -      args.static_lines.clear
    +      tick $gtk.args
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
         end
    +** Processing line: ~    $gtk.console.close~
    +- Inside source: true
    +*** True Line Result
    +    $gtk.console.close
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -134975,234 +140631,242 @@ Follows is a source code listing for all files that have been open sourced. This
     - End of paragraph detected.
     *** True Line Result
     
    -** Processing line: ~*** Rpg Narrative - Return Of Serenity - main.rb~
    +** Processing line: ~*** Rpg Narrative - Return Of Serenity - storyline_anka.rb~
     - Header detected.
     *** True Line Result
     
     *** True Line Result
    -*** Rpg Narrative - Return Of Serenity - main.rb
    +*** Rpg Narrative - Return Of Serenity - storyline_anka.rb
     ** Processing line: ~#+begin_src ruby~
     - Line was identified as the beginning of a code block.
     *** True Line Result
     
     *** True Line Result
     #+begin_src ruby
    -** Processing line: ~  # ./samples/99_genre_rpg_narrative/return_of_serenity/app/main.rb~
    +** Processing line: ~  # ./samples/99_genre_rpg_narrative/return_of_serenity/app/storyline_anka.rb~
     - Inside source: true
     *** True Line Result
    -  # ./samples/99_genre_rpg_narrative/return_of_serenity/app/main.rb
    -** Processing line: ~  require 'app/require.rb'~
    +  # ./samples/99_genre_rpg_narrative/return_of_serenity/app/storyline_anka.rb
    +** Processing line: ~  def anka_inside_room args~
     - Inside source: true
     *** True Line Result
    -  require 'app/require.rb'
    -** Processing line: ~~
    +  def anka_inside_room args
    +** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def defaults args~
    +    {
    +** Processing line: ~      background: 'sprites/inside-home.png',~
     - Inside source: true
     *** True Line Result
    -  def defaults args
    -** Processing line: ~    args.outputs.background_color = [0, 0, 0]~
    +      background: 'sprites/inside-home.png',
    +** Processing line: ~      player: [34, 35],~
     - Inside source: true
     *** True Line Result
    -    args.outputs.background_color = [0, 0, 0]
    -** Processing line: ~    args.state.last_story_line_text ||= ""~
    +      player: [34, 35],
    +** Processing line: ~      storylines: [~
     - Inside source: true
     *** True Line Result
    -    args.state.last_story_line_text ||= ""
    -** Processing line: ~    args.state.scene_history ||= []~
    +      storylines: [
    +** Processing line: ~        [34, 34, 4, 4, "Ahhhh!!! Oh god, it was just- a nightmare."],~
     - Inside source: true
     *** True Line Result
    -    args.state.scene_history ||= []
    -** Processing line: ~    args.state.storyline_history ||= []~
    +        [34, 34, 4, 4, "Ahhhh!!! Oh god, it was just- a nightmare."],
    +** Processing line: ~      ],~
     - Inside source: true
     *** True Line Result
    -    args.state.storyline_history ||= []
    -** Processing line: ~    args.state.word_delay ||= 8~
    +      ],
    +** Processing line: ~      scenes: [~
     - Inside source: true
     *** True Line Result
    -    args.state.word_delay ||= 8
    -** Processing line: ~    if args.state.tick_count == 0~
    +      scenes: [
    +** Processing line: ~        [32, -1, 8, 3, :anka_observatory]~
     - Inside source: true
     *** True Line Result
    -    if args.state.tick_count == 0
    -** Processing line: ~      args.gtk.stop_music~
    +        [32, -1, 8, 3, :anka_observatory]
    +** Processing line: ~      ]~
     - Inside source: true
     *** True Line Result
    -      args.gtk.stop_music
    -** Processing line: ~      args.outputs.sounds << 'sounds/static-loop.ogg'~
    +      ]
    +** Processing line: ~    }~
     - Inside source: true
     *** True Line Result
    -      args.outputs.sounds << 'sounds/static-loop.ogg'
    -** Processing line: ~    end~
    +    }
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    end
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    if args.state.last_story_line_text~
    +** Processing line: ~  def anka_observatory args~
     - Inside source: true
     *** True Line Result
    -    if args.state.last_story_line_text
    -** Processing line: ~      lines = args.state~
    +  def anka_observatory args
    +** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
    -      lines = args.state
    -** Processing line: ~                  .last_story_line_text~
    +    {
    +** Processing line: ~      background: 'sprites/inside-observatory.png',~
     - Inside source: true
     *** True Line Result
    -                  .last_story_line_text
    -** Processing line: ~                  .gsub("-", "")~
    +      background: 'sprites/inside-observatory.png',
    +** Processing line: ~      fade: 60,~
     - Inside source: true
     *** True Line Result
    -                  .gsub("-", "")
    -** Processing line: ~                  .gsub("~", "")~
    +      fade: 60,
    +** Processing line: ~      player: [51, 12],~
     - Inside source: true
     *** True Line Result
    -                  .gsub("~", "")
    -** Processing line: ~                  .wrapped_lines(50)~
    +      player: [51, 12],
    +** Processing line: ~      storylines: [~
     - Inside source: true
     *** True Line Result
    -                  .wrapped_lines(50)
    -** Processing line: ~~
    +      storylines: [
    +** Processing line: ~        [50, 10, 4, 4,   "Breathe, Hiro. Just see what's there... everything--- will- be okay."]~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      args.outputs.labels << lines.map_with_index { |l, i| [690, 200 - (i * 25), l, 1, 0, 255, 255, 255] }~
    +        [50, 10, 4, 4,   "Breathe, Hiro. Just see what's there... everything--- will- be okay."]
    +** Processing line: ~      ],~
     - Inside source: true
     *** True Line Result
    -      args.outputs.labels << lines.map_with_index { |l, i| [690, 200 - (i * 25), l, 1, 0, 255, 255, 255] }
    -** Processing line: ~    elsif args.state.storyline_history[-1]~
    +      ],
    +** Processing line: ~      scenes: [~
     - Inside source: true
     *** True Line Result
    -    elsif args.state.storyline_history[-1]
    -** Processing line: ~      lines = args.state~
    +      scenes: [
    +** Processing line: ~        [30, 18, 5, 12, :anka_inside_mainframe]~
     - Inside source: true
     *** True Line Result
    -      lines = args.state
    -** Processing line: ~                  .storyline_history[-1]~
    +        [30, 18, 5, 12, :anka_inside_mainframe]
    +** Processing line: ~      ],~
     - Inside source: true
     *** True Line Result
    -                  .storyline_history[-1]
    -** Processing line: ~                  .gsub("-", "")~
    +      ],
    +** Processing line: ~      render_override: :blinking_light_inside_observatory_render~
     - Inside source: true
     *** True Line Result
    -                  .gsub("-", "")
    -** Processing line: ~                  .gsub("~", "")~
    +      render_override: :blinking_light_inside_observatory_render
    +** Processing line: ~    }~
     - Inside source: true
     *** True Line Result
    -                  .gsub("~", "")
    -** Processing line: ~                  .wrapped_lines(50)~
    +    }
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -                  .wrapped_lines(50)
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      args.outputs.labels << lines.map_with_index { |l, i| [690, 200 - (i * 25), l, 1, 0, 255, 255, 255] }~
    +** Processing line: ~  def anka_inside_mainframe args~
     - Inside source: true
     *** True Line Result
    -      args.outputs.labels << lines.map_with_index { |l, i| [690, 200 - (i * 25), l, 1, 0, 255, 255, 255] }
    -** Processing line: ~    end~
    +  def anka_inside_mainframe args
    +** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +    {
    +** Processing line: ~      player: [32, 4],~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    return if args.state.current_scene~
    +      player: [32, 4],
    +** Processing line: ~      background: 'sprites/mainframe.png',~
     - Inside source: true
     *** True Line Result
    -    return if args.state.current_scene
    -** Processing line: ~    set_scene(args, day_one_beginning(args))~
    +      background: 'sprites/mainframe.png',
    +** Processing line: ~      fade: 60,~
     - Inside source: true
     *** True Line Result
    -    set_scene(args, day_one_beginning(args))
    -** Processing line: ~  end~
    +      fade: 60,
    +** Processing line: ~      storylines: [~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +      storylines: [
    +** Processing line: ~        [22, 45, 17, 4, (anka_last_reply args)],~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def inputs_move_player args~
    +        [22, 45, 17, 4, (anka_last_reply args)],
    +** Processing line: ~        [45, 45,  4, 4, (anka_current_reply args)],~
     - Inside source: true
     *** True Line Result
    -  def inputs_move_player args
    -** Processing line: ~    if args.state.scene_changed_at.elapsed_time > 5~
    +        [45, 45,  4, 4, (anka_current_reply args)],
    +** Processing line: ~      ],~
     - Inside source: true
     *** True Line Result
    -    if args.state.scene_changed_at.elapsed_time > 5
    -** Processing line: ~      if args.keyboard.down  || args.keyboard.s || args.keyboard.j~
    +      ],
    +** Processing line: ~      scenes: [~
     - Inside source: true
     *** True Line Result
    -      if args.keyboard.down  || args.keyboard.s || args.keyboard.j
    -** Processing line: ~        args.state.player.y -= 0.25~
    +      scenes: [
    +** Processing line: ~        [*hotspot_top_right, :reply_to_anka]~
     - Inside source: true
     *** True Line Result
    -        args.state.player.y -= 0.25
    -** Processing line: ~      elsif args.keyboard.up || args.keyboard.w || args.keyboard.k~
    +        [*hotspot_top_right, :reply_to_anka]
    +** Processing line: ~      ]~
     - Inside source: true
     *** True Line Result
    -      elsif args.keyboard.up || args.keyboard.w || args.keyboard.k
    -** Processing line: ~        args.state.player.y += 0.25~
    +      ]
    +** Processing line: ~    }~
     - Inside source: true
     *** True Line Result
    -        args.state.player.y += 0.25
    -** Processing line: ~      end~
    +    }
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -      end
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      if args.keyboard.left     || args.keyboard.a  || args.keyboard.h~
    +** Processing line: ~  def reply_to_anka args~
     - Inside source: true
     *** True Line Result
    -      if args.keyboard.left     || args.keyboard.a  || args.keyboard.h
    -** Processing line: ~        args.state.player.x -= 0.25~
    +  def reply_to_anka args
    +** Processing line: ~    decision_graph anka_current_reply(args),~
     - Inside source: true
     *** True Line Result
    -        args.state.player.x -= 0.25
    -** Processing line: ~      elsif args.keyboard.right || args.keyboard.d  || args.keyboard.l~
    +    decision_graph anka_current_reply(args),
    +** Processing line: ~                   "Matthew's-- wife is doing-- well. What's-- even-- better-- is that he's-- a dad, and he didn't-- even-- know it. Should- I- leave- out the part about-- the crew- being-- in hibernation-- for 20-- years? They- should- enter-- statis-- on a high- note... Right?",~
     - Inside source: true
     *** True Line Result
    -      elsif args.keyboard.right || args.keyboard.d  || args.keyboard.l
    -** Processing line: ~        args.state.player.x += 0.25~
    +                   "Matthew's-- wife is doing-- well. What's-- even-- better-- is that he's-- a dad, and he didn't-- even-- know it. Should- I- leave- out the part about-- the crew- being-- in hibernation-- for 20-- years? They- should- enter-- statis-- on a high- note... Right?",
    +** Processing line: ~                   [:replied_with_whole_truth, "Whole-- Truth--", anka_reply_whole_truth],~
     - Inside source: true
     *** True Line Result
    -        args.state.player.x += 0.25
    -** Processing line: ~      end~
    +                   [:replied_with_whole_truth, "Whole-- Truth--", anka_reply_whole_truth],
    +** Processing line: ~                   [:replied_with_half_truth, "Half-- Truth--", anka_reply_half_truth]~
     - Inside source: true
     *** True Line Result
    -      end
    +                   [:replied_with_half_truth, "Half-- Truth--", anka_reply_half_truth]
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      args.state.player.y = 60 if args.state.player.y > 63~
    +** Processing line: ~  def anka_last_reply args~
     - Inside source: true
     *** True Line Result
    -      args.state.player.y = 60 if args.state.player.y > 63
    -** Processing line: ~      args.state.player.y =  0 if args.state.player.y < -3~
    +  def anka_last_reply args
    +** Processing line: ~    if args.state.scene_history.include? :replied_to_serenity_alive_firmly~
     - Inside source: true
     *** True Line Result
    -      args.state.player.y =  0 if args.state.player.y < -3
    -** Processing line: ~      args.state.player.x = 60 if args.state.player.x > 63~
    +    if args.state.scene_history.include? :replied_to_serenity_alive_firmly
    +** Processing line: ~      return "Buffer--: #{serenity_alive_firm_reply.quote}"~
     - Inside source: true
     *** True Line Result
    -      args.state.player.x = 60 if args.state.player.x > 63
    -** Processing line: ~      args.state.player.x =  0 if args.state.player.x < -3~
    +      return "Buffer--: #{serenity_alive_firm_reply.quote}"
    +** Processing line: ~    else~
     - Inside source: true
     *** True Line Result
    -      args.state.player.x =  0 if args.state.player.x < -3
    +    else
    +** Processing line: ~      return "Buffer--: #{serenity_alive_sugarcoated_reply.quote}"~
    +- Inside source: true
    +*** True Line Result
    +      return "Buffer--: #{serenity_alive_sugarcoated_reply.quote}"
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -135215,22 +140879,14 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def null_or_empty? ary~
    -- Inside source: true
    -*** True Line Result
    -  def null_or_empty? ary
    -** Processing line: ~    return true unless ary~
    -- Inside source: true
    -*** True Line Result
    -    return true unless ary
    -** Processing line: ~    return true if ary.length == 0~
    +** Processing line: ~  def anka_reply_whole_truth~
     - Inside source: true
     *** True Line Result
    -    return true if ary.length == 0
    -** Processing line: ~    return false~
    +  def anka_reply_whole_truth
    +** Processing line: ~    "Matthew's wife is doing-- very-- well. In fact, she was pregnant. Matthew-- is a dad. He has a son. But, I need- all-- of-- you-- to brace-- yourselves. You've-- been in statis-- for 20 years. A lot has changed. Most of Earth's-- population--- didn't-- survive. Tell- Matthew-- that I'm-- sorry he didn't-- get to see- his- son grow- up."~
     - Inside source: true
     *** True Line Result
    -    return false
    +    "Matthew's wife is doing-- very-- well. In fact, she was pregnant. Matthew-- is a dad. He has a son. But, I need- all-- of-- you-- to brace-- yourselves. You've-- been in statis-- for 20 years. A lot has changed. Most of Earth's-- population--- didn't-- survive. Tell- Matthew-- that I'm-- sorry he didn't-- get to see- his- son grow- up."
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -135239,70 +140895,66 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def calc_storyline_hotspot args~
    -- Inside source: true
    -*** True Line Result
    -  def calc_storyline_hotspot args
    -** Processing line: ~    hotspots = args.state.storylines.find_all do |hs|~
    +** Processing line: ~  def anka_reply_half_truth~
     - Inside source: true
     *** True Line Result
    -    hotspots = args.state.storylines.find_all do |hs|
    -** Processing line: ~      args.state.player.inside_rect?(hs.shift_rect(-2, 0))~
    +  def anka_reply_half_truth
    +** Processing line: ~    "Matthew's--- wife- is doing-- very-- well. In fact, she was pregnant. Matthew is a dad! It's a boy! Tell- Matthew-- congrats-- for me. Hope-- to see- all of you- soon."~
     - Inside source: true
     *** True Line Result
    -      args.state.player.inside_rect?(hs.shift_rect(-2, 0))
    -** Processing line: ~    end~
    +    "Matthew's--- wife- is doing-- very-- well. In fact, she was pregnant. Matthew is a dad! It's a boy! Tell- Matthew-- congrats-- for me. Hope-- to see- all of you- soon."
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    end
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    if !null_or_empty?(hotspots) && !args.state.inside_storyline_hotspot~
    +** Processing line: ~  def replied_with_whole_truth args~
     - Inside source: true
     *** True Line Result
    -    if !null_or_empty?(hotspots) && !args.state.inside_storyline_hotspot
    -** Processing line: ~      _, _, _, _, storyline = hotspots.first~
    +  def replied_with_whole_truth args
    +** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
    -      _, _, _, _, storyline = hotspots.first
    -** Processing line: ~      queue_storyline_text(args, storyline)~
    +    {
    +** Processing line: ~      background: 'sprites/inside-observatory.png',~
     - Inside source: true
     *** True Line Result
    -      queue_storyline_text(args, storyline)
    -** Processing line: ~      args.state.inside_storyline_hotspot = true~
    +      background: 'sprites/inside-observatory.png',
    +** Processing line: ~      fade: 60,~
     - Inside source: true
     *** True Line Result
    -      args.state.inside_storyline_hotspot = true
    -** Processing line: ~    elsif null_or_empty?(hotspots)~
    +      fade: 60,
    +** Processing line: ~      player: [32, 21],~
     - Inside source: true
     *** True Line Result
    -    elsif null_or_empty?(hotspots)
    -** Processing line: ~      args.state.inside_storyline_hotspot = false~
    +      player: [32, 21],
    +** Processing line: ~      scenes: [[60, 0, 4, 32, :replied_to_anka_back_home]],~
     - Inside source: true
     *** True Line Result
    -      args.state.inside_storyline_hotspot = false
    -** Processing line: ~~
    +      scenes: [[60, 0, 4, 32, :replied_to_anka_back_home]],
    +** Processing line: ~      storylines: [~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      args.state.storyline_queue_empty_at ||= args.state.tick_count~
    +      storylines: [
    +** Processing line: ~        [30, 18, 5, 12, "Buffer-- has been set to: #{anka_reply_whole_truth.quote}"],~
     - Inside source: true
     *** True Line Result
    -      args.state.storyline_queue_empty_at ||= args.state.tick_count
    -** Processing line: ~      args.state.is_storyline_dialog_active = false~
    +        [30, 18, 5, 12, "Buffer-- has been set to: #{anka_reply_whole_truth.quote}"],
    +** Processing line: ~        [30, 10, 5, 4, "I- hope- I- did the right- thing- by laying-- it all- out- there."],~
     - Inside source: true
     *** True Line Result
    -      args.state.is_storyline_dialog_active = false
    -** Processing line: ~      args.state.scene_storyline_queue.clear~
    +        [30, 10, 5, 4, "I- hope- I- did the right- thing- by laying-- it all- out- there."],
    +** Processing line: ~      ]~
     - Inside source: true
     *** True Line Result
    -      args.state.scene_storyline_queue.clear
    -** Processing line: ~    end~
    +      ]
    +** Processing line: ~    }~
     - Inside source: true
     *** True Line Result
    -    end
    +    }
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -135311,74 +140963,78 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def calc_scenes args~
    +** Processing line: ~  def replied_with_half_truth args~
     - Inside source: true
     *** True Line Result
    -  def calc_scenes args
    -** Processing line: ~    hotspots = args.state.scenes.find_all do |hs|~
    +  def replied_with_half_truth args
    +** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
    -    hotspots = args.state.scenes.find_all do |hs|
    -** Processing line: ~      args.state.player.inside_rect?(hs.shift_rect(-2, 0))~
    +    {
    +** Processing line: ~      background: 'sprites/inside-observatory.png',~
     - Inside source: true
     *** True Line Result
    -      args.state.player.inside_rect?(hs.shift_rect(-2, 0))
    -** Processing line: ~    end~
    +      background: 'sprites/inside-observatory.png',
    +** Processing line: ~      fade: 60,~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +      fade: 60,
    +** Processing line: ~      player: [32, 21],~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    if !null_or_empty?(hotspots) && !args.state.inside_scene_hotspot~
    +      player: [32, 21],
    +** Processing line: ~      scenes: [[60, 0, 4, 32, :replied_to_anka_back_home]],~
     - Inside source: true
     *** True Line Result
    -    if !null_or_empty?(hotspots) && !args.state.inside_scene_hotspot
    -** Processing line: ~      _, _, _, _, scene_method_or_hash = hotspots.first~
    +      scenes: [[60, 0, 4, 32, :replied_to_anka_back_home]],
    +** Processing line: ~      storylines: [~
     - Inside source: true
     *** True Line Result
    -      _, _, _, _, scene_method_or_hash = hotspots.first
    -** Processing line: ~      if scene_method_or_hash.is_a? Symbol~
    +      storylines: [
    +** Processing line: ~        [30, 18, 5, 12, "Buffer-- has been set to: #{anka_reply_half_truth.quote}"],~
     - Inside source: true
     *** True Line Result
    -      if scene_method_or_hash.is_a? Symbol
    -** Processing line: ~        set_scene(args, send(scene_method_or_hash, args))~
    +        [30, 18, 5, 12, "Buffer-- has been set to: #{anka_reply_half_truth.quote}"],
    +** Processing line: ~        [30, 10, 5, 4, "I- hope- I- did the right- thing- by not giving-- them- the whole- truth."],~
     - Inside source: true
     *** True Line Result
    -        set_scene(args, send(scene_method_or_hash, args))
    -** Processing line: ~        args.state.last_hotspot_scene = scene_method_or_hash~
    +        [30, 10, 5, 4, "I- hope- I- did the right- thing- by not giving-- them- the whole- truth."],
    +** Processing line: ~      ]~
     - Inside source: true
     *** True Line Result
    -        args.state.last_hotspot_scene = scene_method_or_hash
    -** Processing line: ~        args.state.scene_history << scene_method_or_hash~
    +      ]
    +** Processing line: ~    }~
     - Inside source: true
     *** True Line Result
    -        args.state.scene_history << scene_method_or_hash
    -** Processing line: ~      else~
    +    }
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -      else
    -** Processing line: ~        set_scene(args, scene_method_or_hash)~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        set_scene(args, scene_method_or_hash)
    -** Processing line: ~      end~
    +
    +** Processing line: ~  def anka_current_reply args~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~      args.state.inside_scene_hotspot = true~
    +  def anka_current_reply args
    +** Processing line: ~    if args.state.scene_history.include? :replied_to_serenity_alive_firmly~
     - Inside source: true
     *** True Line Result
    -      args.state.inside_scene_hotspot = true
    -** Processing line: ~    elsif null_or_empty?(hotspots)~
    +    if args.state.scene_history.include? :replied_to_serenity_alive_firmly
    +** Processing line: ~      return "Hello. This is, Aanka. Sasha-- is still- trying-- to gather-- her wits about-- her, given- the gravity--- of your- last- reply. Thank- you- for being-- honest, and thank- you- for the help- with the ship- diagnostics. I was able-- to retrieve-- all of the navigation--- information---- after-- the battery--- swap. We- are ready-- to head back to Earth. Before-- we go- back- into-- statis, Matthew--- wanted-- to know- how his- wife- is doing. Please- reply-- as soon- as you can. He's-- not going-- to get- into-- the statis-- chamber-- until-- he knows- his wife is okay."~
     - Inside source: true
     *** True Line Result
    -    elsif null_or_empty?(hotspots)
    -** Processing line: ~      args.state.inside_scene_hotspot = false~
    +      return "Hello. This is, Aanka. Sasha-- is still- trying-- to gather-- her wits about-- her, given- the gravity--- of your- last- reply. Thank- you- for being-- honest, and thank- you- for the help- with the ship- diagnostics. I was able-- to retrieve-- all of the navigation--- information---- after-- the battery--- swap. We- are ready-- to head back to Earth. Before-- we go- back- into-- statis, Matthew--- wanted-- to know- how his- wife- is doing. Please- reply-- as soon- as you can. He's-- not going-- to get- into-- the statis-- chamber-- until-- he knows- his wife is okay."
    +** Processing line: ~    else~
     - Inside source: true
     *** True Line Result
    -      args.state.inside_scene_hotspot = false
    +    else
    +** Processing line: ~      return "Hello. This is, Aanka. Thank- you for the help- with the ship's-- diagnostics. I was able-- to retrieve-- all of the navigation--- information--- after-- the battery-- swap. I- know-- that- you didn't-- tell- the whole truth- about-- how far we are from- Earth. Don't-- worry. I understand-- why you did it. We- are ready-- to head back to Earth. Before-- we go- back- into-- statis, Matthew--- wanted-- to know- how his- wife- is doing. Please- reply-- as soon- as you can. He's-- not going-- to get- into-- the statis-- chamber-- until-- he knows- his wife is okay."~
    +- Inside source: true
    +*** True Line Result
    +      return "Hello. This is, Aanka. Thank- you for the help- with the ship's-- diagnostics. I was able-- to retrieve-- all of the navigation--- information--- after-- the battery-- swap. I- know-- that- you didn't-- tell- the whole truth- about-- how far we are from- Earth. Don't-- worry. I understand-- why you did it. We- are ready-- to head back to Earth. Before-- we go- back- into-- statis, Matthew--- wanted-- to know- how his- wife- is doing. Please- reply-- as soon- as you can. He's-- not going-- to get- into-- the statis-- chamber-- until-- he knows- his wife is okay."
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -135391,162 +141047,182 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def null_or_whitespace? word~
    +** Processing line: ~  def replied_to_anka_back_home args~
     - Inside source: true
     *** True Line Result
    -  def null_or_whitespace? word
    -** Processing line: ~    return true if !word~
    +  def replied_to_anka_back_home args
    +** Processing line: ~    if args.state.scene_history.include? :replied_with_whole_truth~
     - Inside source: true
     *** True Line Result
    -    return true if !word
    -** Processing line: ~    return true if word.strip.length == 0~
    +    if args.state.scene_history.include? :replied_with_whole_truth
    +** Processing line: ~      return {~
     - Inside source: true
     *** True Line Result
    -    return true if word.strip.length == 0
    -** Processing line: ~    return false~
    +      return {
    +** Processing line: ~        fade: 60,~
     - Inside source: true
     *** True Line Result
    -    return false
    -** Processing line: ~  end~
    +        fade: 60,
    +** Processing line: ~        background: 'sprites/inside-home.png',~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +        background: 'sprites/inside-home.png',
    +** Processing line: ~        player: [34, 4],~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def calc_storyline_presentation args~
    +        player: [34, 4],
    +** Processing line: ~        storylines: [~
     - Inside source: true
     *** True Line Result
    -  def calc_storyline_presentation args
    -** Processing line: ~    return unless args.state.tick_count > args.state.next_storyline~
    +        storylines: [
    +** Processing line: ~          [34, 4, 4, 4, "I- hope-- this pit in my stomach-- is gone-- by tomorrow---."],~
     - Inside source: true
     *** True Line Result
    -    return unless args.state.tick_count > args.state.next_storyline
    -** Processing line: ~    return unless args.state.scene_storyline_queue~
    +          [34, 4, 4, 4, "I- hope-- this pit in my stomach-- is gone-- by tomorrow---."],
    +** Processing line: ~        ],~
     - Inside source: true
     *** True Line Result
    -    return unless args.state.scene_storyline_queue
    -** Processing line: ~    next_storyline = args.state.scene_storyline_queue.shift~
    +        ],
    +** Processing line: ~        scenes: [~
     - Inside source: true
     *** True Line Result
    -    next_storyline = args.state.scene_storyline_queue.shift
    -** Processing line: ~    if null_or_whitespace? next_storyline~
    +        scenes: [
    +** Processing line: ~          [30, 38, 12, 13, :final_message_sad],~
     - Inside source: true
     *** True Line Result
    -    if null_or_whitespace? next_storyline
    -** Processing line: ~      args.state.storyline_queue_empty_at ||= args.state.tick_count~
    +          [30, 38, 12, 13, :final_message_sad],
    +** Processing line: ~        ]~
     - Inside source: true
     *** True Line Result
    -      args.state.storyline_queue_empty_at ||= args.state.tick_count
    -** Processing line: ~      args.state.is_storyline_dialog_active = false~
    +        ]
    +** Processing line: ~      }~
     - Inside source: true
     *** True Line Result
    -      args.state.is_storyline_dialog_active = false
    -** Processing line: ~      return~
    +      }
    +** Processing line: ~    else~
     - Inside source: true
     *** True Line Result
    -      return
    -** Processing line: ~    end~
    +    else
    +** Processing line: ~      return {~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~    args.state.storyline_to_show = next_storyline~
    +      return {
    +** Processing line: ~        fade: 60,~
     - Inside source: true
     *** True Line Result
    -    args.state.storyline_to_show = next_storyline
    -** Processing line: ~    args.state.is_storyline_dialog_active = true~
    +        fade: 60,
    +** Processing line: ~        background: 'sprites/inside-home.png',~
     - Inside source: true
     *** True Line Result
    -    args.state.is_storyline_dialog_active = true
    -** Processing line: ~    args.state.storyline_queue_empty_at = nil~
    +        background: 'sprites/inside-home.png',
    +** Processing line: ~        player: [34, 4],~
     - Inside source: true
     *** True Line Result
    -    args.state.storyline_queue_empty_at = nil
    -** Processing line: ~    if next_storyline.end_with?(".") || next_storyline.end_with?("!") || next_storyline.end_with?("?") || next_storyline.end_with?("\"")~
    +        player: [34, 4],
    +** Processing line: ~        storylines: [~
     - Inside source: true
     *** True Line Result
    -    if next_storyline.end_with?(".") || next_storyline.end_with?("!") || next_storyline.end_with?("?") || next_storyline.end_with?("\"")
    -** Processing line: ~      args.state.next_storyline += 60~
    +        storylines: [
    +** Processing line: ~          [34, 4, 4, 4, "I- get the feeling-- I'm going-- to sleep real well tonight--."],~
     - Inside source: true
     *** True Line Result
    -      args.state.next_storyline += 60
    -** Processing line: ~    elsif next_storyline.end_with?(",")~
    +          [34, 4, 4, 4, "I- get the feeling-- I'm going-- to sleep real well tonight--."],
    +** Processing line: ~        ],~
     - Inside source: true
     *** True Line Result
    -    elsif next_storyline.end_with?(",")
    -** Processing line: ~      args.state.next_storyline += 50~
    +        ],
    +** Processing line: ~        scenes: [~
     - Inside source: true
     *** True Line Result
    -      args.state.next_storyline += 50
    -** Processing line: ~    elsif next_storyline.end_with?(":")~
    +        scenes: [
    +** Processing line: ~          [30, 38, 12, 13, :final_message_happy],~
     - Inside source: true
     *** True Line Result
    -    elsif next_storyline.end_with?(":")
    -** Processing line: ~      args.state.next_storyline += 60~
    +          [30, 38, 12, 13, :final_message_happy],
    +** Processing line: ~        ]~
     - Inside source: true
     *** True Line Result
    -      args.state.next_storyline += 60
    -** Processing line: ~    else~
    +        ]
    +** Processing line: ~      }~
     - Inside source: true
     *** True Line Result
    -    else
    -** Processing line: ~      default_word_delay = 13 + args.state.word_delay - 8~
    +      }
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      default_word_delay = 13 + args.state.word_delay - 8
    -** Processing line: ~      if next_storyline.gsub("-", "").gsub("~", "").length <= 4~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -      if next_storyline.gsub("-", "").gsub("~", "").length <= 4
    -** Processing line: ~        default_word_delay = 11 + args.state.word_delay - 8~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        default_word_delay = 11 + args.state.word_delay - 8
    -** Processing line: ~      end~
    +
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
    +*** True Line Result
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +
    +** Processing line: ~*** Rpg Narrative - Return Of Serenity - storyline_blinking_light.rb~
    +- Header detected.
    +*** True Line Result
    +
    +*** True Line Result
    +*** Rpg Narrative - Return Of Serenity - storyline_blinking_light.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/99_genre_rpg_narrative/return_of_serenity/app/storyline_blinking_light.rb~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~      number_of_syllabals = next_storyline.length - next_storyline.gsub("-", "").length~
    +  # ./samples/99_genre_rpg_narrative/return_of_serenity/app/storyline_blinking_light.rb
    +** Processing line: ~  def the_blinking_light args~
     - Inside source: true
     *** True Line Result
    -      number_of_syllabals = next_storyline.length - next_storyline.gsub("-", "").length
    -** Processing line: ~      args.state.next_storyline += default_word_delay + number_of_syllabals * (args.state.word_delay + 1)~
    +  def the_blinking_light args
    +** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
    -      args.state.next_storyline += default_word_delay + number_of_syllabals * (args.state.word_delay + 1)
    -** Processing line: ~    end~
    +    {
    +** Processing line: ~      fade: 60,~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~  end~
    +      fade: 60,
    +** Processing line: ~      background: 'sprites/side-of-home.png',~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +      background: 'sprites/side-of-home.png',
    +** Processing line: ~      player: [16, 13],~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def inputs_reload_current_scene args~
    +      player: [16, 13],
    +** Processing line: ~      scenes: [~
     - Inside source: true
     *** True Line Result
    -  def inputs_reload_current_scene args
    -** Processing line: ~    return~
    +      scenes: [
    +** Processing line: ~        [52, 24, 11, 5, :blinking_light_mountain_pass],~
     - Inside source: true
     *** True Line Result
    -    return
    -** Processing line: ~    if args.inputs.keyboard.key_down.r!~
    +        [52, 24, 11, 5, :blinking_light_mountain_pass],
    +** Processing line: ~      ],~
     - Inside source: true
     *** True Line Result
    -    if args.inputs.keyboard.key_down.r!
    -** Processing line: ~      reload_current_scene~
    +      ],
    +** Processing line: ~      render_override: :blinking_light_side_of_home_render~
     - Inside source: true
     *** True Line Result
    -      reload_current_scene
    -** Processing line: ~    end~
    +      render_override: :blinking_light_side_of_home_render
    +** Processing line: ~    }~
     - Inside source: true
     *** True Line Result
    -    end
    +    }
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -135555,22 +141231,42 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def inputs_dismiss_current_storyline args~
    +** Processing line: ~  def blinking_light_mountain_pass args~
     - Inside source: true
     *** True Line Result
    -  def inputs_dismiss_current_storyline args
    -** Processing line: ~    if args.inputs.keyboard.key_down.x!~
    +  def blinking_light_mountain_pass args
    +** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
    -    if args.inputs.keyboard.key_down.x!
    -** Processing line: ~      args.state.scene_storyline_queue.clear~
    +    {
    +** Processing line: ~      background: 'sprites/mountain-pass-zoomed-out.png',~
     - Inside source: true
     *** True Line Result
    -      args.state.scene_storyline_queue.clear
    -** Processing line: ~    end~
    +      background: 'sprites/mountain-pass-zoomed-out.png',
    +** Processing line: ~      player: [4, 4],~
     - Inside source: true
     *** True Line Result
    -    end
    +      player: [4, 4],
    +** Processing line: ~      scenes: [~
    +- Inside source: true
    +*** True Line Result
    +      scenes: [
    +** Processing line: ~        [18, 47, 5, 5, :blinking_light_path_to_observatory]~
    +- Inside source: true
    +*** True Line Result
    +        [18, 47, 5, 5, :blinking_light_path_to_observatory]
    +** Processing line: ~      ],~
    +- Inside source: true
    +*** True Line Result
    +      ],
    +** Processing line: ~      render_override: :blinking_light_mountain_pass_render~
    +- Inside source: true
    +*** True Line Result
    +      render_override: :blinking_light_mountain_pass_render
    +** Processing line: ~    }~
    +- Inside source: true
    +*** True Line Result
    +    }
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -135579,22 +141275,42 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def inputs_restart_game args~
    +** Processing line: ~  def blinking_light_path_to_observatory args~
     - Inside source: true
     *** True Line Result
    -  def inputs_restart_game args
    -** Processing line: ~    if args.inputs.keyboard.exclamation_point~
    +  def blinking_light_path_to_observatory args
    +** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
    -    if args.inputs.keyboard.exclamation_point
    -** Processing line: ~      args.gtk.reset_state~
    +    {
    +** Processing line: ~      background: 'sprites/path-to-observatory.png',~
     - Inside source: true
     *** True Line Result
    -      args.gtk.reset_state
    -** Processing line: ~    end~
    +      background: 'sprites/path-to-observatory.png',
    +** Processing line: ~      player: [60, 4],~
     - Inside source: true
     *** True Line Result
    -    end
    +      player: [60, 4],
    +** Processing line: ~      scenes: [~
    +- Inside source: true
    +*** True Line Result
    +      scenes: [
    +** Processing line: ~        [0, 26, 5, 5, :blinking_light_observatory]~
    +- Inside source: true
    +*** True Line Result
    +        [0, 26, 5, 5, :blinking_light_observatory]
    +** Processing line: ~      ],~
    +- Inside source: true
    +*** True Line Result
    +      ],
    +** Processing line: ~      render_override: :blinking_light_path_to_observatory_render~
    +- Inside source: true
    +*** True Line Result
    +      render_override: :blinking_light_path_to_observatory_render
    +** Processing line: ~    }~
    +- Inside source: true
    +*** True Line Result
    +    }
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -135603,90 +141319,98 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def inputs_change_word_delay args~
    +** Processing line: ~  def blinking_light_observatory args~
     - Inside source: true
     *** True Line Result
    -  def inputs_change_word_delay args
    -** Processing line: ~    if args.inputs.keyboard.key_down.plus || args.inputs.keyboard.key_down.equal_sign~
    +  def blinking_light_observatory args
    +** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
    -    if args.inputs.keyboard.key_down.plus || args.inputs.keyboard.key_down.equal_sign
    -** Processing line: ~      args.state.word_delay -= 2~
    +    {
    +** Processing line: ~      background: 'sprites/observatory.png',~
     - Inside source: true
     *** True Line Result
    -      args.state.word_delay -= 2
    -** Processing line: ~      if args.state.word_delay < 0~
    +      background: 'sprites/observatory.png',
    +** Processing line: ~      player: [60, 2],~
     - Inside source: true
     *** True Line Result
    -      if args.state.word_delay < 0
    -** Processing line: ~        args.state.word_delay = 0~
    +      player: [60, 2],
    +** Processing line: ~      scenes: [~
     - Inside source: true
     *** True Line Result
    -        args.state.word_delay = 0
    -** Processing line: ~        # queue_storyline_text args, "Text speed at MAXIMUM. Geez, how fast do you read?"~
    +      scenes: [
    +** Processing line: ~        [28, 39, 4, 10, :blinking_light_inside_observatory]~
     - Inside source: true
     *** True Line Result
    -        # queue_storyline_text args, "Text speed at MAXIMUM. Geez, how fast do you read?"
    -** Processing line: ~      else~
    +        [28, 39, 4, 10, :blinking_light_inside_observatory]
    +** Processing line: ~      ],~
     - Inside source: true
     *** True Line Result
    -      else
    -** Processing line: ~        # queue_storyline_text args, "Text speed INCREASED."~
    +      ],
    +** Processing line: ~      render_override: :blinking_light_observatory_render~
     - Inside source: true
     *** True Line Result
    -        # queue_storyline_text args, "Text speed INCREASED."
    -** Processing line: ~      end~
    +      render_override: :blinking_light_observatory_render
    +** Processing line: ~    }~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +    }
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    end
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    if args.inputs.keyboard.key_down.hyphen || args.inputs.keyboard.key_down.underscore~
    +** Processing line: ~  def blinking_light_inside_observatory args~
     - Inside source: true
     *** True Line Result
    -    if args.inputs.keyboard.key_down.hyphen || args.inputs.keyboard.key_down.underscore
    -** Processing line: ~      args.state.word_delay += 2~
    +  def blinking_light_inside_observatory args
    +** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
    -      args.state.word_delay += 2
    -** Processing line: ~      # queue_storyline_text args, "Text speed DECREASED."~
    +    {
    +** Processing line: ~      background: 'sprites/inside-observatory.png',~
     - Inside source: true
     *** True Line Result
    -      # queue_storyline_text args, "Text speed DECREASED."
    -** Processing line: ~    end~
    +      background: 'sprites/inside-observatory.png',
    +** Processing line: ~      player: [60, 2],~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~  end~
    +      player: [60, 2],
    +** Processing line: ~      storylines: [~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +      storylines: [
    +** Processing line: ~        [50, 2, 4, 8,   "That's weird. I thought- this- mainframe-- was broken--."]~
    +- Inside source: true
    +*** True Line Result
    +        [50, 2, 4, 8,   "That's weird. I thought- this- mainframe-- was broken--."]
    +** Processing line: ~      ],~
    +- Inside source: true
    +*** True Line Result
    +      ],
    +** Processing line: ~      scenes: [~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def multiple_lines args, x, y, texts, size = 0, minimum_alpha = nil~
    +      scenes: [
    +** Processing line: ~        [30, 18, 5, 12, :blinking_light_inside_mainframe]~
     - Inside source: true
     *** True Line Result
    -  def multiple_lines args, x, y, texts, size = 0, minimum_alpha = nil
    -** Processing line: ~    texts.each_with_index.map do |t, i|~
    +        [30, 18, 5, 12, :blinking_light_inside_mainframe]
    +** Processing line: ~      ],~
     - Inside source: true
     *** True Line Result
    -    texts.each_with_index.map do |t, i|
    -** Processing line: ~      [x, y - i * (25 + size * 2), t, size, 0, 255, 255, 255, adornments_alpha(args, 255, minimum_alpha)]~
    +      ],
    +** Processing line: ~      render_override: :blinking_light_inside_observatory_render~
     - Inside source: true
     *** True Line Result
    -      [x, y - i * (25 + size * 2), t, size, 0, 255, 255, 255, adornments_alpha(args, 255, minimum_alpha)]
    -** Processing line: ~    end~
    +      render_override: :blinking_light_inside_observatory_render
    +** Processing line: ~    }~
     - Inside source: true
     *** True Line Result
    -    end
    +    }
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -135695,66 +141419,66 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def lowrez_tick args, lowrez_sprites, lowrez_labels, lowrez_borders, lowrez_solids, lowrez_mouse~
    +** Processing line: ~  def blinking_light_inside_mainframe args~
     - Inside source: true
     *** True Line Result
    -  def lowrez_tick args, lowrez_sprites, lowrez_labels, lowrez_borders, lowrez_solids, lowrez_mouse
    -** Processing line: ~    # args.state.show_gridlines = true~
    +  def blinking_light_inside_mainframe args
    +** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
    -    # args.state.show_gridlines = true
    -** Processing line: ~    defaults args~
    +    {
    +** Processing line: ~      background: 'sprites/mainframe.png',~
     - Inside source: true
     *** True Line Result
    -    defaults args
    -** Processing line: ~    render_current_scene args, lowrez_sprites, lowrez_labels, lowrez_solids~
    +      background: 'sprites/mainframe.png',
    +** Processing line: ~      fade: 60,~
     - Inside source: true
     *** True Line Result
    -    render_current_scene args, lowrez_sprites, lowrez_labels, lowrez_solids
    -** Processing line: ~    render_controller args, lowrez_borders~
    +      fade: 60,
    +** Processing line: ~      player: [30, 4],~
     - Inside source: true
     *** True Line Result
    -    render_controller args, lowrez_borders
    -** Processing line: ~    lowrez_solids << [0, 0, 64, 64, 0, 0, 0]~
    +      player: [30, 4],
    +** Processing line: ~      scenes: [~
     - Inside source: true
     *** True Line Result
    -    lowrez_solids << [0, 0, 64, 64, 0, 0, 0]
    -** Processing line: ~    calc_storyline_presentation args~
    +      scenes: [
    +** Processing line: ~        [62, 32, 4, 32, :reply_to_introduction]~
     - Inside source: true
     *** True Line Result
    -    calc_storyline_presentation args
    -** Processing line: ~    calc_scenes args~
    +        [62, 32, 4, 32, :reply_to_introduction]
    +** Processing line: ~      ],~
     - Inside source: true
     *** True Line Result
    -    calc_scenes args
    -** Processing line: ~    calc_storyline_hotspot args~
    +      ],
    +** Processing line: ~      storylines: [~
     - Inside source: true
     *** True Line Result
    -    calc_storyline_hotspot args
    -** Processing line: ~    inputs_move_player args~
    +      storylines: [
    +** Processing line: ~        [43, 43,  8, 8, "\"Mission-- control--, your- main- comm-- channels-- seem-- to be down. My apologies-- for- using-- this low- level-- exploit--. What's-- going-- on down there? We are ready-- for reentry--.\" Message--- Timestamp---: 4- hours-- 23--- minutes-- ago--."],~
     - Inside source: true
     *** True Line Result
    -    inputs_move_player args
    -** Processing line: ~    inputs_print_mouse_rect args, lowrez_mouse~
    +        [43, 43,  8, 8, "\"Mission-- control--, your- main- comm-- channels-- seem-- to be down. My apologies-- for- using-- this low- level-- exploit--. What's-- going-- on down there? We are ready-- for reentry--.\" Message--- Timestamp---: 4- hours-- 23--- minutes-- ago--."],
    +** Processing line: ~        [30, 30,  4, 4, "There's-- a low- level-- message-- here... NANI.T.F?"],~
     - Inside source: true
     *** True Line Result
    -    inputs_print_mouse_rect args, lowrez_mouse
    -** Processing line: ~    inputs_reload_current_scene args~
    +        [30, 30,  4, 4, "There's-- a low- level-- message-- here... NANI.T.F?"],
    +** Processing line: ~        [14, 10, 24, 4, "Oh interesting---. This transistor--- needed-- to be activated--- for the- mainframe-- to work."],~
     - Inside source: true
     *** True Line Result
    -    inputs_reload_current_scene args
    -** Processing line: ~    inputs_dismiss_current_storyline args~
    +        [14, 10, 24, 4, "Oh interesting---. This transistor--- needed-- to be activated--- for the- mainframe-- to work."],
    +** Processing line: ~        [14, 20, 24, 4, "What the heck activated--- this thing- though?"]~
     - Inside source: true
     *** True Line Result
    -    inputs_dismiss_current_storyline args
    -** Processing line: ~    inputs_change_word_delay args~
    +        [14, 20, 24, 4, "What the heck activated--- this thing- though?"]
    +** Processing line: ~      ]~
     - Inside source: true
     *** True Line Result
    -    inputs_change_word_delay args
    -** Processing line: ~    inputs_restart_game args~
    +      ]
    +** Processing line: ~    }~
     - Inside source: true
     *** True Line Result
    -    inputs_restart_game args
    +    }
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -135763,42 +141487,74 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def render_controller args, lowrez_borders~
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
    +*** True Line Result
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +
    +** Processing line: ~*** Rpg Narrative - Return Of Serenity - storyline_day_one.rb~
    +- Header detected.
    +*** True Line Result
    +
    +*** True Line Result
    +*** Rpg Narrative - Return Of Serenity - storyline_day_one.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/99_genre_rpg_narrative/return_of_serenity/app/storyline_day_one.rb~
     - Inside source: true
     *** True Line Result
    -  def render_controller args, lowrez_borders
    -** Processing line: ~    args.state.up_button    = [85, 40, 15, 15, 255, 255, 255]~
    +  # ./samples/99_genre_rpg_narrative/return_of_serenity/app/storyline_day_one.rb
    +** Processing line: ~  def day_one_beginning args~
     - Inside source: true
     *** True Line Result
    -    args.state.up_button    = [85, 40, 15, 15, 255, 255, 255]
    -** Processing line: ~    args.state.down_button  = [85, 20, 15, 15, 255, 255, 255]~
    +  def day_one_beginning args
    +** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
    -    args.state.down_button  = [85, 20, 15, 15, 255, 255, 255]
    -** Processing line: ~    args.state.left_button  = [65, 20, 15, 15, 255, 255, 255]~
    +    {
    +** Processing line: ~      background: 'sprites/side-of-home.png',~
     - Inside source: true
     *** True Line Result
    -    args.state.left_button  = [65, 20, 15, 15, 255, 255, 255]
    -** Processing line: ~    args.state.right_button = [105, 20, 15, 15, 255, 255, 255]~
    +      background: 'sprites/side-of-home.png',
    +** Processing line: ~      player: [16, 13],~
     - Inside source: true
     *** True Line Result
    -    args.state.right_button = [105, 20, 15, 15, 255, 255, 255]
    -** Processing line: ~    lowrez_borders << args.state.up_button~
    +      player: [16, 13],
    +** Processing line: ~      scenes: [~
     - Inside source: true
     *** True Line Result
    -    lowrez_borders << args.state.up_button
    -** Processing line: ~    lowrez_borders << args.state.down_button~
    +      scenes: [
    +** Processing line: ~        [0, 0, 64, 2, :day_one_infront_of_home],~
     - Inside source: true
     *** True Line Result
    -    lowrez_borders << args.state.down_button
    -** Processing line: ~    lowrez_borders << args.state.left_button~
    +        [0, 0, 64, 2, :day_one_infront_of_home],
    +** Processing line: ~      ],~
     - Inside source: true
     *** True Line Result
    -    lowrez_borders << args.state.left_button
    -** Processing line: ~    lowrez_borders << args.state.right_button~
    +      ],
    +** Processing line: ~      storylines: [~
     - Inside source: true
     *** True Line Result
    -    lowrez_borders << args.state.right_button
    +      storylines: [
    +** Processing line: ~        [35, 10, 6, 6,  "Man. Hard to believe- that today- is the 20th--- anniversary-- of The Impact."]~
    +- Inside source: true
    +*** True Line Result
    +        [35, 10, 6, 6,  "Man. Hard to believe- that today- is the 20th--- anniversary-- of The Impact."]
    +** Processing line: ~      ]~
    +- Inside source: true
    +*** True Line Result
    +      ]
    +** Processing line: ~    }~
    +- Inside source: true
    +*** True Line Result
    +    }
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -135807,258 +141563,266 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def inputs_print_mouse_rect args, lowrez_mouse~
    +** Processing line: ~  def day_one_infront_of_home args~
     - Inside source: true
     *** True Line Result
    -  def inputs_print_mouse_rect args, lowrez_mouse
    -** Processing line: ~    if lowrez_mouse.up~
    +  def day_one_infront_of_home args
    +** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
    -    if lowrez_mouse.up
    -** Processing line: ~      args.state.mouse_held = false~
    +    {
    +** Processing line: ~      background: 'sprites/front-of-home.png',~
     - Inside source: true
     *** True Line Result
    -      args.state.mouse_held = false
    -** Processing line: ~    elsif lowrez_mouse.click~
    +      background: 'sprites/front-of-home.png',
    +** Processing line: ~      player: [56, 23],~
     - Inside source: true
     *** True Line Result
    -    elsif lowrez_mouse.click
    -** Processing line: ~      mouse_rect = [lowrez_mouse.x, lowrez_mouse.y, 1, 1]~
    +      player: [56, 23],
    +** Processing line: ~      scenes: [~
     - Inside source: true
     *** True Line Result
    -      mouse_rect = [lowrez_mouse.x, lowrez_mouse.y, 1, 1]
    -** Processing line: ~      if args.state.up_button.intersect_rect? mouse_rect~
    +      scenes: [
    +** Processing line: ~        [43, 34, 10, 16, :day_one_home],~
     - Inside source: true
     *** True Line Result
    -      if args.state.up_button.intersect_rect? mouse_rect
    -** Processing line: ~        args.state.player.y += 1~
    +        [43, 34, 10, 16, :day_one_home],
    +** Processing line: ~        [62, 0,  3, 40, :day_one_beginning],~
     - Inside source: true
     *** True Line Result
    -        args.state.player.y += 1
    -** Processing line: ~      end~
    +        [62, 0,  3, 40, :day_one_beginning],
    +** Processing line: ~        [0, 4, 3, 20, :day_one_ceremony]~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +        [0, 4, 3, 20, :day_one_ceremony]
    +** Processing line: ~      ],~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      if args.state.down_button.intersect_rect? mouse_rect~
    +      ],
    +** Processing line: ~      storylines: [~
     - Inside source: true
     *** True Line Result
    -      if args.state.down_button.intersect_rect? mouse_rect
    -** Processing line: ~        args.state.player.y -= 1~
    +      storylines: [
    +** Processing line: ~        [40, 20, 4, 4, "It looks like everyone- is already- at the rememberance-- ceremony."],~
     - Inside source: true
     *** True Line Result
    -        args.state.player.y -= 1
    -** Processing line: ~      end~
    +        [40, 20, 4, 4, "It looks like everyone- is already- at the rememberance-- ceremony."],
    +** Processing line: ~      ]~
     - Inside source: true
     *** True Line Result
    -      end
    +      ]
    +** Processing line: ~    }~
    +- Inside source: true
    +*** True Line Result
    +    }
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      if args.state.left_button.intersect_rect? mouse_rect~
    +** Processing line: ~  def day_one_home args~
     - Inside source: true
     *** True Line Result
    -      if args.state.left_button.intersect_rect? mouse_rect
    -** Processing line: ~        args.state.player.x -= 1~
    +  def day_one_home args
    +** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
    -        args.state.player.x -= 1
    -** Processing line: ~      end~
    +    {
    +** Processing line: ~      background: 'sprites/inside-home.png',~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +      background: 'sprites/inside-home.png',
    +** Processing line: ~      player: [34, 3],~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      if args.state.right_button.intersect_rect? mouse_rect~
    +      player: [34, 3],
    +** Processing line: ~      scenes: [~
     - Inside source: true
     *** True Line Result
    -      if args.state.right_button.intersect_rect? mouse_rect
    -** Processing line: ~        args.state.player.x += 1~
    +      scenes: [
    +** Processing line: ~        [28, 0, 12, 2, :day_one_infront_of_home]~
     - Inside source: true
     *** True Line Result
    -        args.state.player.x += 1
    -** Processing line: ~      end~
    +        [28, 0, 12, 2, :day_one_infront_of_home]
    +** Processing line: ~      ],~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~      args.state.mouse_held = true~
    +      ],
    +** Processing line: ~      storylines: [~
     - Inside source: true
     *** True Line Result
    -      args.state.mouse_held = true
    -** Processing line: ~    elsif args.state.mouse_held~
    +      storylines: [
    +** Processing line: ~        [~
     - Inside source: true
     *** True Line Result
    -    elsif args.state.mouse_held
    -** Processing line: ~      mouse_rect = [lowrez_mouse.x, lowrez_mouse.y, 1, 1]~
    +        [
    +** Processing line: ~          38, 4, 4, 4, "My mansion- in all its glory! Okay yea, it's just a shipping- container-. Apparently-, it's nothing- like the luxuries- of the 2040's. But it's- all we have- in- this day and age. And it'll suffice."~
     - Inside source: true
     *** True Line Result
    -      mouse_rect = [lowrez_mouse.x, lowrez_mouse.y, 1, 1]
    -** Processing line: ~      if args.state.up_button.intersect_rect? mouse_rect~
    +          38, 4, 4, 4, "My mansion- in all its glory! Okay yea, it's just a shipping- container-. Apparently-, it's nothing- like the luxuries- of the 2040's. But it's- all we have- in- this day and age. And it'll suffice."
    +** Processing line: ~        ],~
     - Inside source: true
     *** True Line Result
    -      if args.state.up_button.intersect_rect? mouse_rect
    -** Processing line: ~        args.state.player.y += 0.25~
    +        ],
    +** Processing line: ~        [~
     - Inside source: true
     *** True Line Result
    -        args.state.player.y += 0.25
    -** Processing line: ~      end~
    +        [
    +** Processing line: ~          28, 7, 4, 7,~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +          28, 7, 4, 7,
    +** Processing line: ~          "Ahhh. My reading- couch. It's so comfortable--."~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      if args.state.down_button.intersect_rect? mouse_rect~
    +          "Ahhh. My reading- couch. It's so comfortable--."
    +** Processing line: ~        ],~
     - Inside source: true
     *** True Line Result
    -      if args.state.down_button.intersect_rect? mouse_rect
    -** Processing line: ~        args.state.player.y -= 0.25~
    +        ],
    +** Processing line: ~        [~
     - Inside source: true
     *** True Line Result
    -        args.state.player.y -= 0.25
    -** Processing line: ~      end~
    +        [
    +** Processing line: ~          38, 21, 4, 4,~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +          38, 21, 4, 4,
    +** Processing line: ~          "I'm- lucky- to have a computer--. I'm- one of the few people- with- the skills to put this- thing to good use."~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      if args.state.left_button.intersect_rect? mouse_rect~
    +          "I'm- lucky- to have a computer--. I'm- one of the few people- with- the skills to put this- thing to good use."
    +** Processing line: ~        ],~
     - Inside source: true
     *** True Line Result
    -      if args.state.left_button.intersect_rect? mouse_rect
    -** Processing line: ~        args.state.player.x -= 0.25~
    +        ],
    +** Processing line: ~        [~
     - Inside source: true
     *** True Line Result
    -        args.state.player.x -= 0.25
    -** Processing line: ~      end~
    +        [
    +** Processing line: ~          45, 37, 4, 8,~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +          45, 37, 4, 8,
    +** Processing line: ~          "This corner- of my home- is always- warmer-. It's cause of the ref~lected-- light- from the solar-- panels--, just on the other- side- of this wall. It's hard- to believe- there was o~nce-- an unlimited- amount- of electricity--."~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      if args.state.right_button.intersect_rect? mouse_rect~
    +          "This corner- of my home- is always- warmer-. It's cause of the ref~lected-- light- from the solar-- panels--, just on the other- side- of this wall. It's hard- to believe- there was o~nce-- an unlimited- amount- of electricity--."
    +** Processing line: ~        ],~
     - Inside source: true
     *** True Line Result
    -      if args.state.right_button.intersect_rect? mouse_rect
    -** Processing line: ~        args.state.player.x += 0.25~
    +        ],
    +** Processing line: ~        [~
     - Inside source: true
     *** True Line Result
    -        args.state.player.x += 0.25
    -** Processing line: ~      end~
    +        [
    +** Processing line: ~          32, 40, 8, 10,~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +          32, 40, 8, 10,
    +** Processing line: ~          "This isn't- a good time- to sleep. I- should probably- head to the ceremony-."~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +          "This isn't- a good time- to sleep. I- should probably- head to the ceremony-."
    +** Processing line: ~        ],~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    if lowrez_mouse.click~
    +        ],
    +** Processing line: ~        [~
     - Inside source: true
     *** True Line Result
    -    if lowrez_mouse.click
    -** Processing line: ~      dx = lowrez_mouse.click.x - args.state.previous_mouse_click.x~
    +        [
    +** Processing line: ~          25, 21, 5, 12,~
     - Inside source: true
     *** True Line Result
    -      dx = lowrez_mouse.click.x - args.state.previous_mouse_click.x
    -** Processing line: ~      dy = lowrez_mouse.click.y - args.state.previous_mouse_click.y~
    +          25, 21, 5, 12,
    +** Processing line: ~          "Fifteen-- years- of computer-- science-- notes, neatly-- organized. Compiler--- Theory--, Linear--- Algebra---, Game-- Development---... Every-- subject-- imaginable--."~
     - Inside source: true
     *** True Line Result
    -      dy = lowrez_mouse.click.y - args.state.previous_mouse_click.y
    -** Processing line: ~      x, y, w, h = args.state.previous_mouse_click.x, args.state.previous_mouse_click.y, dx, dy~
    +          "Fifteen-- years- of computer-- science-- notes, neatly-- organized. Compiler--- Theory--, Linear--- Algebra---, Game-- Development---... Every-- subject-- imaginable--."
    +** Processing line: ~        ]~
     - Inside source: true
     *** True Line Result
    -      x, y, w, h = args.state.previous_mouse_click.x, args.state.previous_mouse_click.y, dx, dy
    -** Processing line: ~      puts "x #{lowrez_mouse.click.x}, y: #{lowrez_mouse.click.y}"~
    +        ]
    +** Processing line: ~      ]~
     - Inside source: true
     *** True Line Result
    -      puts "x #{lowrez_mouse.click.x}, y: #{lowrez_mouse.click.y}"
    -** Processing line: ~      if args.state.previous_mouse_click~
    +      ]
    +** Processing line: ~    }~
     - Inside source: true
     *** True Line Result
    -      if args.state.previous_mouse_click
    -** Processing line: ~~
    +    }
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~        if dx < 0 && dx < 0~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        if dx < 0 && dx < 0
    -** Processing line: ~          x = x + w~
    +
    +** Processing line: ~  def day_one_ceremony args~
     - Inside source: true
     *** True Line Result
    -          x = x + w
    -** Processing line: ~          w = w.abs~
    +  def day_one_ceremony args
    +** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
    -          w = w.abs
    -** Processing line: ~          y = y + h~
    +    {
    +** Processing line: ~      background: 'sprites/tribute.png',~
     - Inside source: true
     *** True Line Result
    -          y = y + h
    -** Processing line: ~          h = h.abs~
    +      background: 'sprites/tribute.png',
    +** Processing line: ~      player: [57, 21],~
     - Inside source: true
     *** True Line Result
    -          h = h.abs
    -** Processing line: ~        end~
    +      player: [57, 21],
    +** Processing line: ~      scenes: [~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~~
    +      scenes: [
    +** Processing line: ~        [62, 0, 2, 40, :day_one_infront_of_home],~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~        w += 1~
    +        [62, 0, 2, 40, :day_one_infront_of_home],
    +** Processing line: ~        [0, 24, 2, 40, :day_one_infront_of_library]~
     - Inside source: true
     *** True Line Result
    -        w += 1
    -** Processing line: ~        h += 1~
    +        [0, 24, 2, 40, :day_one_infront_of_library]
    +** Processing line: ~      ],~
     - Inside source: true
     *** True Line Result
    -        h += 1
    -** Processing line: ~~
    +      ],
    +** Processing line: ~      storylines: [~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~        args.state.previous_mouse_click = nil~
    +      storylines: [
    +** Processing line: ~        [53, 12, 3,  8,  "It's- been twenty- years since The Impact. Twenty- years, since Halley's-- Comet-- set Earth's- blue- sky on fire."],~
     - Inside source: true
     *** True Line Result
    -        args.state.previous_mouse_click = nil
    -** Processing line: ~      else~
    +        [53, 12, 3,  8,  "It's- been twenty- years since The Impact. Twenty- years, since Halley's-- Comet-- set Earth's- blue- sky on fire."],
    +** Processing line: ~        [45, 12, 3,  8,  "The space mission- sent to prevent- Earth's- total- destruction--, was a success. Only- 99.9%------ of the world's- population-- died-- that day. Hey, it's- better-- than 100%---- of humanity-- dying."],~
     - Inside source: true
     *** True Line Result
    -      else
    -** Processing line: ~        args.state.previous_mouse_click = lowrez_mouse.click~
    +        [45, 12, 3,  8,  "The space mission- sent to prevent- Earth's- total- destruction--, was a success. Only- 99.9%------ of the world's- population-- died-- that day. Hey, it's- better-- than 100%---- of humanity-- dying."],
    +** Processing line: ~        [20, 12, 23, 4, "The monument--- reads:---- Here- stands- the tribute-- to Space- Mission-- Serenity--- and- its- crew. You- have- given-- humanity--- a second-- chance."],~
     - Inside source: true
     *** True Line Result
    -        args.state.previous_mouse_click = lowrez_mouse.click
    -** Processing line: ~        square_x, square_y = lowrez_mouse.click~
    +        [20, 12, 23, 4, "The monument--- reads:---- Here- stands- the tribute-- to Space- Mission-- Serenity--- and- its- crew. You- have- given-- humanity--- a second-- chance."],
    +** Processing line: ~        [15, 12, 3,  8, "Rest- in- peace--- Matthew----, Sasha----, Aanka----"],~
     - Inside source: true
     *** True Line Result
    -        square_x, square_y = lowrez_mouse.click
    -** Processing line: ~      end~
    +        [15, 12, 3,  8, "Rest- in- peace--- Matthew----, Sasha----, Aanka----"],
    +** Processing line: ~      ]~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +      ]
    +** Processing line: ~    }~
     - Inside source: true
     *** True Line Result
    -    end
    +    }
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -136067,54 +141831,54 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def try_centering! word~
    +** Processing line: ~  def day_one_infront_of_library args~
     - Inside source: true
     *** True Line Result
    -  def try_centering! word
    -** Processing line: ~    word ||= ""~
    +  def day_one_infront_of_library args
    +** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
    -    word ||= ""
    -** Processing line: ~    just_word = word.gsub("-", "").gsub(",", "").gsub(".", "").gsub("'", "").gsub('""', "\"-\"")~
    +    {
    +** Processing line: ~      background: 'sprites/outside-library.png',~
     - Inside source: true
     *** True Line Result
    -    just_word = word.gsub("-", "").gsub(",", "").gsub(".", "").gsub("'", "").gsub('""', "\"-\"")
    -** Processing line: ~    return word if just_word.strip.length == 0~
    +      background: 'sprites/outside-library.png',
    +** Processing line: ~      player: [57, 21],~
     - Inside source: true
     *** True Line Result
    -    return word if just_word.strip.length == 0
    -** Processing line: ~    return word if just_word.include? "~"~
    +      player: [57, 21],
    +** Processing line: ~      scenes: [~
     - Inside source: true
     *** True Line Result
    -    return word if just_word.include? "~"
    -** Processing line: ~    return "~#{word}" if just_word.length <= 2~
    +      scenes: [
    +** Processing line: ~        [62, 0, 2, 40, :day_one_ceremony],~
     - Inside source: true
     *** True Line Result
    -    return "~#{word}" if just_word.length <= 2
    -** Processing line: ~    if just_word.length.mod_zero? 2~
    +        [62, 0, 2, 40, :day_one_ceremony],
    +** Processing line: ~        [49, 39, 6, 9, :day_one_library]~
     - Inside source: true
     *** True Line Result
    -    if just_word.length.mod_zero? 2
    -** Processing line: ~      center_index = just_word.length.idiv(2) - 1~
    +        [49, 39, 6, 9, :day_one_library]
    +** Processing line: ~      ],~
     - Inside source: true
     *** True Line Result
    -      center_index = just_word.length.idiv(2) - 1
    -** Processing line: ~    else~
    +      ],
    +** Processing line: ~      storylines: [~
     - Inside source: true
     *** True Line Result
    -    else
    -** Processing line: ~      center_index = (just_word.length - 1).idiv(2)~
    +      storylines: [
    +** Processing line: ~        [50, 20, 4, 8,  "Shipping- containers-- as far- as the eye- can see. It's- rather- beautiful-- if you ask me. Even- though-- this- view- represents-- all- that's-- left- of humanity-."]~
     - Inside source: true
     *** True Line Result
    -      center_index = (just_word.length - 1).idiv(2)
    -** Processing line: ~    end~
    +        [50, 20, 4, 8,  "Shipping- containers-- as far- as the eye- can see. It's- rather- beautiful-- if you ask me. Even- though-- this- view- represents-- all- that's-- left- of humanity-."]
    +** Processing line: ~      ]~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~    return "#{word[0..center_index - 1]}~#{word[center_index]}#{word[center_index + 1..-1]}"~
    +      ]
    +** Processing line: ~    }~
     - Inside source: true
     *** True Line Result
    -    return "#{word[0..center_index - 1]}~#{word[center_index]}#{word[center_index + 1..-1]}"
    +    }
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -136123,158 +141887,162 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def queue_storyline args, scene~
    +** Processing line: ~  def day_one_library args~
     - Inside source: true
     *** True Line Result
    -  def queue_storyline args, scene
    -** Processing line: ~    queue_storyline_text args, scene[:storyline]~
    +  def day_one_library args
    +** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
    -    queue_storyline_text args, scene[:storyline]
    -** Processing line: ~  end~
    +    {
    +** Processing line: ~      background: 'sprites/library.png',~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +      background: 'sprites/library.png',
    +** Processing line: ~      player: [27, 4],~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def queue_storyline_text args, text~
    +      player: [27, 4],
    +** Processing line: ~      scenes: [~
     - Inside source: true
     *** True Line Result
    -  def queue_storyline_text args, text
    -** Processing line: ~    args.state.last_story_line_text = text~
    +      scenes: [
    +** Processing line: ~        [0, 0, 64, 2, :end_day_one_infront_of_library]~
     - Inside source: true
     *** True Line Result
    -    args.state.last_story_line_text = text
    -** Processing line: ~    args.state.storyline_history << text if text~
    +        [0, 0, 64, 2, :end_day_one_infront_of_library]
    +** Processing line: ~      ],~
     - Inside source: true
     *** True Line Result
    -    args.state.storyline_history << text if text
    -** Processing line: ~    words = (text || "").split(" ")~
    +      ],
    +** Processing line: ~      storylines: [~
     - Inside source: true
     *** True Line Result
    -    words = (text || "").split(" ")
    -** Processing line: ~    words = words.map { |w| try_centering! w }~
    +      storylines: [
    +** Processing line: ~        [28, 22, 8, 4,  "I grew- up- in this library. I've- read every- book- here. My favorites-- were- of course-- anything- computer-- related."],~
     - Inside source: true
     *** True Line Result
    -    words = words.map { |w| try_centering! w }
    -** Processing line: ~    args.state.scene_storyline_queue = words~
    +        [28, 22, 8, 4,  "I grew- up- in this library. I've- read every- book- here. My favorites-- were- of course-- anything- computer-- related."],
    +** Processing line: ~        [6, 32, 10, 6, "My favorite-- area--- of the library. The Science-- Section."]~
     - Inside source: true
     *** True Line Result
    -    args.state.scene_storyline_queue = words
    -** Processing line: ~    if args.state.scene_storyline_queue.length != 0~
    +        [6, 32, 10, 6, "My favorite-- area--- of the library. The Science-- Section."]
    +** Processing line: ~      ]~
     - Inside source: true
     *** True Line Result
    -    if args.state.scene_storyline_queue.length != 0
    -** Processing line: ~      args.state.scene_storyline_queue.unshift "~$--"~
    +      ]
    +** Processing line: ~    }~
     - Inside source: true
     *** True Line Result
    -      args.state.scene_storyline_queue.unshift "~$--"
    -** Processing line: ~      args.state.storyline_to_show = "~."~
    +    }
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -      args.state.storyline_to_show = "~."
    -** Processing line: ~    else~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    else
    -** Processing line: ~      args.state.storyline_to_show = ""~
    +
    +** Processing line: ~  def end_day_one_infront_of_library args~
     - Inside source: true
     *** True Line Result
    -      args.state.storyline_to_show = ""
    -** Processing line: ~    end~
    +  def end_day_one_infront_of_library args
    +** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~    args.state.scene_storyline_queue << ""~
    +    {
    +** Processing line: ~      background: 'sprites/outside-library.png',~
     - Inside source: true
     *** True Line Result
    -    args.state.scene_storyline_queue << ""
    -** Processing line: ~    args.state.next_storyline = args.state.tick_count~
    +      background: 'sprites/outside-library.png',
    +** Processing line: ~      player: [51, 33],~
     - Inside source: true
     *** True Line Result
    -    args.state.next_storyline = args.state.tick_count
    -** Processing line: ~  end~
    +      player: [51, 33],
    +** Processing line: ~      scenes: [~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +      scenes: [
    +** Processing line: ~        [49, 39, 6, 9, :day_one_library],~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def set_scene args, scene~
    +        [49, 39, 6, 9, :day_one_library],
    +** Processing line: ~        [62, 0, 2, 40, :end_day_one_monument],~
     - Inside source: true
     *** True Line Result
    -  def set_scene args, scene
    -** Processing line: ~    args.state.current_scene = scene~
    +        [62, 0, 2, 40, :end_day_one_monument],
    +** Processing line: ~      ],~
     - Inside source: true
     *** True Line Result
    -    args.state.current_scene = scene
    -** Processing line: ~    args.state.background = scene[:background] ||  'sprites/todo.png'~
    +      ],
    +** Processing line: ~      storylines: [~
     - Inside source: true
     *** True Line Result
    -    args.state.background = scene[:background] ||  'sprites/todo.png'
    -** Processing line: ~    args.state.scene_fade = scene[:fade] || 0~
    +      storylines: [
    +** Processing line: ~        [50, 27, 4, 4, "It's getting late. Better get some sleep."]~
     - Inside source: true
     *** True Line Result
    -    args.state.scene_fade = scene[:fade] || 0
    -** Processing line: ~    args.state.scenes = (scene[:scenes] || []).reject { |s| !s }~
    +        [50, 27, 4, 4, "It's getting late. Better get some sleep."]
    +** Processing line: ~      ]~
     - Inside source: true
     *** True Line Result
    -    args.state.scenes = (scene[:scenes] || []).reject { |s| !s }
    -** Processing line: ~    args.state.scene_render_override = scene[:render_override]~
    +      ]
    +** Processing line: ~    }~
     - Inside source: true
     *** True Line Result
    -    args.state.scene_render_override = scene[:render_override]
    -** Processing line: ~    args.state.storylines = (scene[:storylines] || []).reject { |s| !s }~
    +    }
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    args.state.storylines = (scene[:storylines] || []).reject { |s| !s }
    -** Processing line: ~    args.state.scene_changed_at = args.state.tick_count~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    args.state.scene_changed_at = args.state.tick_count
    -** Processing line: ~    if scene[:player]~
    +
    +** Processing line: ~  def end_day_one_monument args~
     - Inside source: true
     *** True Line Result
    -    if scene[:player]
    -** Processing line: ~      args.state.player = scene[:player]~
    +  def end_day_one_monument args
    +** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
    -      args.state.player = scene[:player]
    -** Processing line: ~    end~
    +    {
    +** Processing line: ~      background: 'sprites/tribute.png',~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~    args.state.inside_scene_hotspot = false~
    +      background: 'sprites/tribute.png',
    +** Processing line: ~      player: [2, 36],~
     - Inside source: true
     *** True Line Result
    -    args.state.inside_scene_hotspot = false
    -** Processing line: ~    args.state.inside_storyline_hotspot = false~
    +      player: [2, 36],
    +** Processing line: ~      scenes: [~
     - Inside source: true
     *** True Line Result
    -    args.state.inside_storyline_hotspot = false
    -** Processing line: ~    queue_storyline args, scene~
    +      scenes: [
    +** Processing line: ~        [62, 0, 2, 40, :end_day_one_infront_of_home],~
     - Inside source: true
     *** True Line Result
    -    queue_storyline args, scene
    -** Processing line: ~  end~
    +        [62, 0, 2, 40, :end_day_one_infront_of_home],
    +** Processing line: ~      ],~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +      ],
    +** Processing line: ~      storylines: [~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def replay_storyline_rect~
    +      storylines: [
    +** Processing line: ~        [50, 27, 4, 4, "It's getting late. Better get some sleep."],~
     - Inside source: true
     *** True Line Result
    -  def replay_storyline_rect
    -** Processing line: ~    [26, -1, 7, 4]~
    +        [50, 27, 4, 4, "It's getting late. Better get some sleep."],
    +** Processing line: ~      ]~
     - Inside source: true
     *** True Line Result
    -    [26, -1, 7, 4]
    +      ]
    +** Processing line: ~    }~
    +- Inside source: true
    +*** True Line Result
    +    }
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -136283,90 +142051,98 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def labels_for_word word~
    +** Processing line: ~  def end_day_one_infront_of_home args~
     - Inside source: true
     *** True Line Result
    -  def labels_for_word word
    -** Processing line: ~    left_side_of_word = ""~
    +  def end_day_one_infront_of_home args
    +** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
    -    left_side_of_word = ""
    -** Processing line: ~    center_letter = ""~
    +    {
    +** Processing line: ~      background: 'sprites/front-of-home.png',~
     - Inside source: true
     *** True Line Result
    -    center_letter = ""
    -** Processing line: ~    right_side_of_word = ""~
    +      background: 'sprites/front-of-home.png',
    +** Processing line: ~      player: [1, 17],~
     - Inside source: true
     *** True Line Result
    -    right_side_of_word = ""
    -** Processing line: ~~
    +      player: [1, 17],
    +** Processing line: ~      scenes: [~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    if word[0] == "~"~
    +      scenes: [
    +** Processing line: ~        [43, 34, 10, 16, :end_day_one_home],~
     - Inside source: true
     *** True Line Result
    -    if word[0] == "~"
    -** Processing line: ~      left_side_of_word = ""~
    +        [43, 34, 10, 16, :end_day_one_home],
    +** Processing line: ~      ],~
     - Inside source: true
     *** True Line Result
    -      left_side_of_word = ""
    -** Processing line: ~      center_letter = word[1]~
    +      ],
    +** Processing line: ~      storylines: [~
     - Inside source: true
     *** True Line Result
    -      center_letter = word[1]
    -** Processing line: ~      right_side_of_word = word[2..-1]~
    +      storylines: [
    +** Processing line: ~        [20, 10, 4, 4, "It's getting late. Better get some sleep."],~
     - Inside source: true
     *** True Line Result
    -      right_side_of_word = word[2..-1]
    -** Processing line: ~    elsif word.length > 0~
    +        [20, 10, 4, 4, "It's getting late. Better get some sleep."],
    +** Processing line: ~      ]~
     - Inside source: true
     *** True Line Result
    -    elsif word.length > 0
    -** Processing line: ~      left_side_of_word, right_side_of_word = word.split("~")~
    +      ]
    +** Processing line: ~    }~
     - Inside source: true
     *** True Line Result
    -      left_side_of_word, right_side_of_word = word.split("~")
    -** Processing line: ~      center_letter = right_side_of_word[0]~
    +    }
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -      center_letter = right_side_of_word[0]
    -** Processing line: ~      right_side_of_word = right_side_of_word[1..-1]~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      right_side_of_word = right_side_of_word[1..-1]
    -** Processing line: ~    end~
    +
    +** Processing line: ~  def end_day_one_home args~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +  def end_day_one_home args
    +** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    right_side_of_word = right_side_of_word.gsub("-", "")~
    +    {
    +** Processing line: ~      background: 'sprites/inside-home.png',~
     - Inside source: true
     *** True Line Result
    -    right_side_of_word = right_side_of_word.gsub("-", "")
    -** Processing line: ~~
    +      background: 'sprites/inside-home.png',
    +** Processing line: ~      player: [34, 3],~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    {~
    +      player: [34, 3],
    +** Processing line: ~      scenes: [~
     - Inside source: true
     *** True Line Result
    -    {
    -** Processing line: ~      left:   [29 - left_side_of_word.length * 4 - 1 * left_side_of_word.length, 2, left_side_of_word],~
    +      scenes: [
    +** Processing line: ~        [32, 40, 8, 10, :end_day_one_dream],~
     - Inside source: true
     *** True Line Result
    -      left:   [29 - left_side_of_word.length * 4 - 1 * left_side_of_word.length, 2, left_side_of_word],
    -** Processing line: ~      center: [29, 2, center_letter, 255, 0, 0],~
    +        [32, 40, 8, 10, :end_day_one_dream],
    +** Processing line: ~      ],~
     - Inside source: true
     *** True Line Result
    -      center: [29, 2, center_letter, 255, 0, 0],
    -** Processing line: ~      right:  [34, 2, right_side_of_word]~
    +      ],
    +** Processing line: ~      storylines: [~
     - Inside source: true
     *** True Line Result
    -      right:  [34, 2, right_side_of_word]
    +      storylines: [
    +** Processing line: ~        [38, 4, 4, 4, "It's getting late. Better get some sleep."],~
    +- Inside source: true
    +*** True Line Result
    +        [38, 4, 4, 4, "It's getting late. Better get some sleep."],
    +** Processing line: ~      ]~
    +- Inside source: true
    +*** True Line Result
    +      ]
     ** Processing line: ~    }~
     - Inside source: true
     *** True Line Result
    @@ -136379,70 +142155,62 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def render_scenes args, lowrez_sprites~
    -- Inside source: true
    -*** True Line Result
    -  def render_scenes args, lowrez_sprites
    -** Processing line: ~    lowrez_sprites << args.state.scenes.flat_map do |hs|~
    -- Inside source: true
    -*** True Line Result
    -    lowrez_sprites << args.state.scenes.flat_map do |hs|
    -** Processing line: ~      hotspot_square args, hs.x, hs.y, hs.w, hs.h~
    +** Processing line: ~  def end_day_one_dream args~
     - Inside source: true
     *** True Line Result
    -      hotspot_square args, hs.x, hs.y, hs.w, hs.h
    -** Processing line: ~    end~
    +  def end_day_one_dream args
    +** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~  end~
    +    {
    +** Processing line: ~      background: 'sprites/dream.png',~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +      background: 'sprites/dream.png',
    +** Processing line: ~      fade: 60,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def render_storylines args, lowrez_sprites~
    +      fade: 60,
    +** Processing line: ~      player: [4, 4],~
     - Inside source: true
     *** True Line Result
    -  def render_storylines args, lowrez_sprites
    -** Processing line: ~    lowrez_sprites << args.state.storylines.flat_map do |hs|~
    +      player: [4, 4],
    +** Processing line: ~      scenes: [~
     - Inside source: true
     *** True Line Result
    -    lowrez_sprites << args.state.storylines.flat_map do |hs|
    -** Processing line: ~      hotspot_square args, hs.x, hs.y, hs.w, hs.h~
    +      scenes: [
    +** Processing line: ~        [62, 0, 2, 64, :explaining_the_special_power]~
     - Inside source: true
     *** True Line Result
    -      hotspot_square args, hs.x, hs.y, hs.w, hs.h
    -** Processing line: ~    end~
    +        [62, 0, 2, 64, :explaining_the_special_power]
    +** Processing line: ~      ],~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~  end~
    +      ],
    +** Processing line: ~      storylines: [~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +      storylines: [
    +** Processing line: ~        [10, 10, 4, 4, "Why- does this- moment-- always- haunt- my dreams?"],~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def adornments_alpha args, target_alpha = nil, minimum_alpha = nil~
    +        [10, 10, 4, 4, "Why- does this- moment-- always- haunt- my dreams?"],
    +** Processing line: ~        [20, 10, 4, 4, "This kid- reads these computer--- science--- books- nonstop-. What's- wrong with him?"],~
     - Inside source: true
     *** True Line Result
    -  def adornments_alpha args, target_alpha = nil, minimum_alpha = nil
    -** Processing line: ~    return (minimum_alpha || 80) unless args.state.storyline_queue_empty_at~
    +        [20, 10, 4, 4, "This kid- reads these computer--- science--- books- nonstop-. What's- wrong with him?"],
    +** Processing line: ~        [30, 10, 4, 4, "There- is nothing-- wrong- with him. This behavior-- should be encouraged---! In fact-, I think- he's- special---. Have- you seen- him use- a computer---? It's-- almost-- as if he can- speak-- to it."]~
     - Inside source: true
     *** True Line Result
    -    return (minimum_alpha || 80) unless args.state.storyline_queue_empty_at
    -** Processing line: ~    target_alpha ||= 255~
    +        [30, 10, 4, 4, "There- is nothing-- wrong- with him. This behavior-- should be encouraged---! In fact-, I think- he's- special---. Have- you seen- him use- a computer---? It's-- almost-- as if he can- speak-- to it."]
    +** Processing line: ~      ]~
     - Inside source: true
     *** True Line Result
    -    target_alpha ||= 255
    -** Processing line: ~    target_alpha * args.state.storyline_queue_empty_at.ease(60)~
    +      ]
    +** Processing line: ~    }~
     - Inside source: true
     *** True Line Result
    -    target_alpha * args.state.storyline_queue_empty_at.ease(60)
    +    }
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -136451,54 +142219,50 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def hotspot_square args, x, y, w, h~
    -- Inside source: true
    -*** True Line Result
    -  def hotspot_square args, x, y, w, h
    -** Processing line: ~    if w >= 3 && h >= 3~
    +** Processing line: ~  def explaining_the_special_power args~
     - Inside source: true
     *** True Line Result
    -    if w >= 3 && h >= 3
    -** Processing line: ~      [~
    +  def explaining_the_special_power args
    +** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
    -      [
    -** Processing line: ~        [x + w.idiv(2) + 1, y, w.idiv(2), h, 'sprites/label-background.png', 0, adornments_alpha(args, 50), 23, 23, 23],~
    +    {
    +** Processing line: ~      fade: 60,~
     - Inside source: true
     *** True Line Result
    -        [x + w.idiv(2) + 1, y, w.idiv(2), h, 'sprites/label-background.png', 0, adornments_alpha(args, 50), 23, 23, 23],
    -** Processing line: ~        [x, y, w.idiv(2), h, 'sprites/label-background.png', 0, adornments_alpha(args, 100), 223, 223, 223],~
    +      fade: 60,
    +** Processing line: ~      background: 'sprites/inside-home.png',~
     - Inside source: true
     *** True Line Result
    -        [x, y, w.idiv(2), h, 'sprites/label-background.png', 0, adornments_alpha(args, 100), 223, 223, 223],
    -** Processing line: ~        [x + 1, y + 1, w - 2, h - 2, 'sprites/label-background.png', 0, adornments_alpha(args, 200), 40, 140, 40],~
    +      background: 'sprites/inside-home.png',
    +** Processing line: ~      player: [32, 30],~
     - Inside source: true
     *** True Line Result
    -        [x + 1, y + 1, w - 2, h - 2, 'sprites/label-background.png', 0, adornments_alpha(args, 200), 40, 140, 40],
    -** Processing line: ~      ]~
    +      player: [32, 30],
    +** Processing line: ~      scenes: [~
     - Inside source: true
     *** True Line Result
    -      ]
    -** Processing line: ~    else~
    +      scenes: [
    +** Processing line: ~        [~
     - Inside source: true
     *** True Line Result
    -    else
    -** Processing line: ~      [~
    +        [
    +** Processing line: ~          38, 21, 4, 4, :explaining_the_special_power_inside_computer~
     - Inside source: true
     *** True Line Result
    -      [
    -** Processing line: ~        [x, y, w, h, 'sprites/label-background.png', 0, adornments_alpha(args, 200), 0, 140, 0],~
    +          38, 21, 4, 4, :explaining_the_special_power_inside_computer
    +** Processing line: ~        ],~
     - Inside source: true
     *** True Line Result
    -        [x, y, w, h, 'sprites/label-background.png', 0, adornments_alpha(args, 200), 0, 140, 0],
    +        ],
     ** Processing line: ~      ]~
     - Inside source: true
     *** True Line Result
           ]
    -** Processing line: ~    end~
    +** Processing line: ~    }~
     - Inside source: true
     *** True Line Result
    -    end
    +    }
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -136507,126 +142271,150 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def render_storyline_dialog args, lowrez_labels, lowrez_sprites~
    +** Processing line: ~  def explaining_the_special_power_inside_computer args~
     - Inside source: true
     *** True Line Result
    -  def render_storyline_dialog args, lowrez_labels, lowrez_sprites
    -** Processing line: ~    return unless args.state.is_storyline_dialog_active~
    +  def explaining_the_special_power_inside_computer args
    +** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
    -    return unless args.state.is_storyline_dialog_active
    -** Processing line: ~    return unless args.state.storyline_to_show~
    +    {
    +** Processing line: ~      background: 'sprites/pc.png',~
     - Inside source: true
     *** True Line Result
    -    return unless args.state.storyline_to_show
    -** Processing line: ~    labels = labels_for_word args.state.storyline_to_show~
    +      background: 'sprites/pc.png',
    +** Processing line: ~      fade: 60,~
     - Inside source: true
     *** True Line Result
    -    labels = labels_for_word args.state.storyline_to_show
    -** Processing line: ~    if true # high rez version~
    +      fade: 60,
    +** Processing line: ~      player: [34, 4],~
     - Inside source: true
     *** True Line Result
    -    if true # high rez version
    -** Processing line: ~      scale = 8.88~
    +      player: [34, 4],
    +** Processing line: ~      scenes: [~
     - Inside source: true
     *** True Line Result
    -      scale = 8.88
    -** Processing line: ~      offset = 45~
    +      scenes: [
    +** Processing line: ~        [0, 62, 64, 3, :the_blinking_light]~
     - Inside source: true
     *** True Line Result
    -      offset = 45
    -** Processing line: ~      size = 25~
    +        [0, 62, 64, 3, :the_blinking_light]
    +** Processing line: ~      ],~
     - Inside source: true
     *** True Line Result
    -      size = 25
    -** Processing line: ~      args.outputs.labels << [offset + labels[:left].x.-(1) * scale,~
    +      ],
    +** Processing line: ~      storylines: [~
     - Inside source: true
     *** True Line Result
    -      args.outputs.labels << [offset + labels[:left].x.-(1) * scale,
    -** Processing line: ~                              labels[:left].y * TINY_SCALE + 55,~
    +      storylines: [
    +** Processing line: ~        [14, 20, 24, 4, "So... I have a special-- power--. I don't-- need a mouse-, keyboard--, or even-- a monitor--- to control-- a computer--."],~
     - Inside source: true
     *** True Line Result
    -                              labels[:left].y * TINY_SCALE + 55,
    -** Processing line: ~                              labels[:left].text, size, 0, 0, 0, 0, 255,~
    +        [14, 20, 24, 4, "So... I have a special-- power--. I don't-- need a mouse-, keyboard--, or even-- a monitor--- to control-- a computer--."],
    +** Processing line: ~        [14, 25, 24, 4, "I only-- pretend-- to use peripherals---, so as not- to freak- anyone--- out."],~
     - Inside source: true
     *** True Line Result
    -                              labels[:left].text, size, 0, 0, 0, 0, 255,
    -** Processing line: ~                              'fonts/manaspc.ttf']~
    +        [14, 25, 24, 4, "I only-- pretend-- to use peripherals---, so as not- to freak- anyone--- out."],
    +** Processing line: ~        [14, 30, 24, 4, "Inside-- this silicon--- Universe---, is the only-- place I- feel- at peace."],~
     - Inside source: true
     *** True Line Result
    -                              'fonts/manaspc.ttf']
    -** Processing line: ~      center_text = labels[:center].text~
    +        [14, 30, 24, 4, "Inside-- this silicon--- Universe---, is the only-- place I- feel- at peace."],
    +** Processing line: ~        [14, 35, 24, 4, "It's-- the only-- place where I don't-- feel alone."]~
     - Inside source: true
     *** True Line Result
    -      center_text = labels[:center].text
    -** Processing line: ~      center_text = "|" if center_text == "$"~
    +        [14, 35, 24, 4, "It's-- the only-- place where I don't-- feel alone."]
    +** Processing line: ~      ]~
     - Inside source: true
     *** True Line Result
    -      center_text = "|" if center_text == "$"
    -** Processing line: ~      args.outputs.labels << [offset + labels[:center].x * scale,~
    +      ]
    +** Processing line: ~    }~
     - Inside source: true
     *** True Line Result
    -      args.outputs.labels << [offset + labels[:center].x * scale,
    -** Processing line: ~                              labels[:center].y * TINY_SCALE + 55,~
    +    }
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -                              labels[:center].y * TINY_SCALE + 55,
    -** Processing line: ~                              center_text, size, 0, 255, 0, 0, 255,~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -                              center_text, size, 0, 255, 0, 0, 255,
    -** Processing line: ~                              'fonts/manaspc.ttf']~
    +
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
    +*** True Line Result
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +
    +** Processing line: ~*** Rpg Narrative - Return Of Serenity - storyline_final_decision.rb~
    +- Header detected.
    +*** True Line Result
    +
    +*** True Line Result
    +*** Rpg Narrative - Return Of Serenity - storyline_final_decision.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/99_genre_rpg_narrative/return_of_serenity/app/storyline_final_decision.rb~
     - Inside source: true
     *** True Line Result
    -                              'fonts/manaspc.ttf']
    -** Processing line: ~      args.outputs.labels << [offset + labels[:right].x * scale,~
    +  # ./samples/99_genre_rpg_narrative/return_of_serenity/app/storyline_final_decision.rb
    +** Processing line: ~  def final_decision_side_of_home args~
     - Inside source: true
     *** True Line Result
    -      args.outputs.labels << [offset + labels[:right].x * scale,
    -** Processing line: ~                              labels[:right].y * TINY_SCALE + 55,~
    +  def final_decision_side_of_home args
    +** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
    -                              labels[:right].y * TINY_SCALE + 55,
    -** Processing line: ~                              labels[:right].text, size, 0, 0, 0, 0, 255,~
    +    {
    +** Processing line: ~      fade: 120,~
     - Inside source: true
     *** True Line Result
    -                              labels[:right].text, size, 0, 0, 0, 0, 255,
    -** Processing line: ~                              'fonts/manaspc.ttf']~
    +      fade: 120,
    +** Processing line: ~      background: 'sprites/side-of-home.png',~
     - Inside source: true
     *** True Line Result
    -                              'fonts/manaspc.ttf']
    -** Processing line: ~    else~
    +      background: 'sprites/side-of-home.png',
    +** Processing line: ~      player: [16, 13],~
     - Inside source: true
     *** True Line Result
    -    else
    -** Processing line: ~      lowrez_labels << labels[:left]~
    +      player: [16, 13],
    +** Processing line: ~      scenes: [~
     - Inside source: true
     *** True Line Result
    -      lowrez_labels << labels[:left]
    -** Processing line: ~      lowrez_labels << labels[:center]~
    +      scenes: [
    +** Processing line: ~        [52, 24, 11, 5, :final_decision_mountain_pass],~
     - Inside source: true
     *** True Line Result
    -      lowrez_labels << labels[:center]
    -** Processing line: ~      lowrez_labels << labels[:right]~
    +        [52, 24, 11, 5, :final_decision_mountain_pass],
    +** Processing line: ~      ],~
     - Inside source: true
     *** True Line Result
    -      lowrez_labels << labels[:right]
    -** Processing line: ~    end~
    +      ],
    +** Processing line: ~      render_override: :blinking_light_side_of_home_render,~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~    args.state.is_storyline_dialog_active = true~
    +      render_override: :blinking_light_side_of_home_render,
    +** Processing line: ~      storylines: [~
     - Inside source: true
     *** True Line Result
    -    args.state.is_storyline_dialog_active = true
    -** Processing line: ~    render_player args, lowrez_sprites~
    +      storylines: [
    +** Processing line: ~        [28, 13, 8, 4,  "Man. Hard to believe- that today- is the 21st--- anniversary-- of The Impact. Serenity--- will- be- home- soon."]~
     - Inside source: true
     *** True Line Result
    -    render_player args, lowrez_sprites
    -** Processing line: ~    lowrez_sprites <<  [0, 0, 64, 8, 'sprites/label-background.png']~
    +        [28, 13, 8, 4,  "Man. Hard to believe- that today- is the 21st--- anniversary-- of The Impact. Serenity--- will- be- home- soon."]
    +** Processing line: ~      ]~
     - Inside source: true
     *** True Line Result
    -    lowrez_sprites <<  [0, 0, 64, 8, 'sprites/label-background.png']
    +      ]
    +** Processing line: ~    }~
    +- Inside source: true
    +*** True Line Result
    +    }
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -136635,42 +142423,42 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def render_player args, lowrez_sprites~
    +** Processing line: ~  def final_decision_mountain_pass args~
     - Inside source: true
     *** True Line Result
    -  def render_player args, lowrez_sprites
    -** Processing line: ~    lowrez_sprites << player_md_down(args, *args.state.player)~
    +  def final_decision_mountain_pass args
    +** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
    -    lowrez_sprites << player_md_down(args, *args.state.player)
    -** Processing line: ~  end~
    +    {
    +** Processing line: ~      background: 'sprites/mountain-pass-zoomed-out.png',~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +      background: 'sprites/mountain-pass-zoomed-out.png',
    +** Processing line: ~      player: [4, 4],~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def render_adornments args, lowrez_sprites~
    +      player: [4, 4],
    +** Processing line: ~      scenes: [~
     - Inside source: true
     *** True Line Result
    -  def render_adornments args, lowrez_sprites
    -** Processing line: ~    render_scenes args, lowrez_sprites~
    +      scenes: [
    +** Processing line: ~        [18, 47, 5, 5, :final_decision_path_to_observatory]~
     - Inside source: true
     *** True Line Result
    -    render_scenes args, lowrez_sprites
    -** Processing line: ~    render_storylines args, lowrez_sprites~
    +        [18, 47, 5, 5, :final_decision_path_to_observatory]
    +** Processing line: ~      ],~
     - Inside source: true
     *** True Line Result
    -    render_storylines args, lowrez_sprites
    -** Processing line: ~    return if args.state.is_storyline_dialog_active~
    +      ],
    +** Processing line: ~      render_override: :blinking_light_mountain_pass_render~
     - Inside source: true
     *** True Line Result
    -    return if args.state.is_storyline_dialog_active
    -** Processing line: ~    lowrez_sprites << player_md_down(args, *args.state.player)~
    +      render_override: :blinking_light_mountain_pass_render
    +** Processing line: ~    }~
     - Inside source: true
     *** True Line Result
    -    lowrez_sprites << player_md_down(args, *args.state.player)
    +    }
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -136679,26 +142467,42 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def global_alpha_percentage args, max_alpha = 255~
    +** Processing line: ~  def final_decision_path_to_observatory args~
     - Inside source: true
     *** True Line Result
    -  def global_alpha_percentage args, max_alpha = 255
    -** Processing line: ~    return 255 unless args.state.scene_changed_at~
    +  def final_decision_path_to_observatory args
    +** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
    -    return 255 unless args.state.scene_changed_at
    -** Processing line: ~    return 255 unless args.state.scene_fade~
    +    {
    +** Processing line: ~      background: 'sprites/path-to-observatory.png',~
     - Inside source: true
     *** True Line Result
    -    return 255 unless args.state.scene_fade
    -** Processing line: ~    return 255 unless args.state.scene_fade > 0~
    +      background: 'sprites/path-to-observatory.png',
    +** Processing line: ~      player: [60, 4],~
     - Inside source: true
     *** True Line Result
    -    return 255 unless args.state.scene_fade > 0
    -** Processing line: ~    return max_alpha * args.state.scene_changed_at.ease(args.state.scene_fade)~
    +      player: [60, 4],
    +** Processing line: ~      scenes: [~
     - Inside source: true
     *** True Line Result
    -    return max_alpha * args.state.scene_changed_at.ease(args.state.scene_fade)
    +      scenes: [
    +** Processing line: ~        [0, 26, 5, 5, :final_decision_observatory]~
    +- Inside source: true
    +*** True Line Result
    +        [0, 26, 5, 5, :final_decision_observatory]
    +** Processing line: ~      ],~
    +- Inside source: true
    +*** True Line Result
    +      ],
    +** Processing line: ~      render_override: :blinking_light_path_to_observatory_render~
    +- Inside source: true
    +*** True Line Result
    +      render_override: :blinking_light_path_to_observatory_render
    +** Processing line: ~    }~
    +- Inside source: true
    +*** True Line Result
    +    }
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -136707,82 +142511,90 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def render_current_scene args, lowrez_sprites, lowrez_labels, lowrez_solids~
    +** Processing line: ~  def final_decision_observatory args~
     - Inside source: true
     *** True Line Result
    -  def render_current_scene args, lowrez_sprites, lowrez_labels, lowrez_solids
    -** Processing line: ~    lowrez_sprites << [0, 0, 64, 64, args.state.background, 0, (global_alpha_percentage args)]~
    +  def final_decision_observatory args
    +** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
    -    lowrez_sprites << [0, 0, 64, 64, args.state.background, 0, (global_alpha_percentage args)]
    -** Processing line: ~    if args.state.scene_render_override~
    +    {
    +** Processing line: ~      background: 'sprites/observatory.png',~
     - Inside source: true
     *** True Line Result
    -    if args.state.scene_render_override
    -** Processing line: ~      send args.state.scene_render_override, args, lowrez_sprites, lowrez_labels, lowrez_solids~
    +      background: 'sprites/observatory.png',
    +** Processing line: ~      player: [60, 2],~
     - Inside source: true
     *** True Line Result
    -      send args.state.scene_render_override, args, lowrez_sprites, lowrez_labels, lowrez_solids
    -** Processing line: ~    end~
    +      player: [60, 2],
    +** Processing line: ~      scenes: [~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~    storyline_to_show = args.state.storyline_to_show || ""~
    +      scenes: [
    +** Processing line: ~        [28, 39, 4, 10, :final_decision_inside_observatory]~
     - Inside source: true
     *** True Line Result
    -    storyline_to_show = args.state.storyline_to_show || ""
    -** Processing line: ~    render_adornments args, lowrez_sprites~
    +        [28, 39, 4, 10, :final_decision_inside_observatory]
    +** Processing line: ~      ],~
     - Inside source: true
     *** True Line Result
    -    render_adornments args, lowrez_sprites
    -** Processing line: ~    render_storyline_dialog args, lowrez_labels, lowrez_sprites~
    +      ],
    +** Processing line: ~      render_override: :blinking_light_observatory_render~
     - Inside source: true
     *** True Line Result
    -    render_storyline_dialog args, lowrez_labels, lowrez_sprites
    +      render_override: :blinking_light_observatory_render
    +** Processing line: ~    }~
    +- Inside source: true
    +*** True Line Result
    +    }
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    if args.state.background == 'sprites/tribute-game-over.png'~
    +** Processing line: ~  def final_decision_inside_observatory args~
     - Inside source: true
     *** True Line Result
    -    if args.state.background == 'sprites/tribute-game-over.png'
    -** Processing line: ~      lowrez_sprites << [0, 0, 64, 11, 'sprites/label-background.png', 0, adornments_alpha(args, 200), 0, 0, 0]~
    +  def final_decision_inside_observatory args
    +** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
    -      lowrez_sprites << [0, 0, 64, 11, 'sprites/label-background.png', 0, adornments_alpha(args, 200), 0, 0, 0]
    -** Processing line: ~      lowrez_labels << [9, 6, 'Return of', 255, 255, 255]~
    +    {
    +** Processing line: ~      background: 'sprites/inside-observatory.png',~
     - Inside source: true
     *** True Line Result
    -      lowrez_labels << [9, 6, 'Return of', 255, 255, 255]
    -** Processing line: ~      lowrez_labels << [9, 1, ' Serenity', 255, 255, 255]~
    +      background: 'sprites/inside-observatory.png',
    +** Processing line: ~      player: [60, 2],~
     - Inside source: true
     *** True Line Result
    -      lowrez_labels << [9, 1, ' Serenity', 255, 255, 255]
    -** Processing line: ~      if !args.state.ended~
    +      player: [60, 2],
    +** Processing line: ~      storylines: [],~
     - Inside source: true
     *** True Line Result
    -      if !args.state.ended
    -** Processing line: ~        args.gtk.stop_music~
    +      storylines: [],
    +** Processing line: ~      scenes: [~
     - Inside source: true
     *** True Line Result
    -        args.gtk.stop_music
    -** Processing line: ~        args.outputs.sounds << 'sounds/music-loop.ogg'~
    +      scenes: [
    +** Processing line: ~        [30, 18, 5, 12, :final_decision_inside_mainframe]~
     - Inside source: true
     *** True Line Result
    -        args.outputs.sounds << 'sounds/music-loop.ogg'
    -** Processing line: ~        args.state.ended = true~
    +        [30, 18, 5, 12, :final_decision_inside_mainframe]
    +** Processing line: ~      ],~
     - Inside source: true
     *** True Line Result
    -        args.state.ended = true
    -** Processing line: ~      end~
    +      ],
    +** Processing line: ~      render_override: :blinking_light_inside_observatory_render~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +      render_override: :blinking_light_inside_observatory_render
    +** Processing line: ~    }~
     - Inside source: true
     *** True Line Result
    -    end
    +    }
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -136791,46 +142603,42 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def player_md_right args, x, y~
    -- Inside source: true
    -*** True Line Result
    -  def player_md_right args, x, y
    -** Processing line: ~    [x, y, 4, 11, 'sprites/player-right.png', 0, (global_alpha_percentage args)]~
    +** Processing line: ~  def final_decision_inside_mainframe args~
     - Inside source: true
     *** True Line Result
    -    [x, y, 4, 11, 'sprites/player-right.png', 0, (global_alpha_percentage args)]
    -** Processing line: ~  end~
    +  def final_decision_inside_mainframe args
    +** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +    {
    +** Processing line: ~      player: [32, 4],~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def player_md_left args, x, y~
    +      player: [32, 4],
    +** Processing line: ~      background: 'sprites/mainframe.png',~
     - Inside source: true
     *** True Line Result
    -  def player_md_left args, x, y
    -** Processing line: ~    [x, y, 4, 11, 'sprites/player-left.png', 0, (global_alpha_percentage args)]~
    +      background: 'sprites/mainframe.png',
    +** Processing line: ~      storylines: [],~
     - Inside source: true
     *** True Line Result
    -    [x, y, 4, 11, 'sprites/player-left.png', 0, (global_alpha_percentage args)]
    -** Processing line: ~  end~
    +      storylines: [],
    +** Processing line: ~      scenes: [~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +      scenes: [
    +** Processing line: ~        [*hotspot_top, :final_decision_ship_status],~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def player_md_up args, x, y~
    +        [*hotspot_top, :final_decision_ship_status],
    +** Processing line: ~      ]~
     - Inside source: true
     *** True Line Result
    -  def player_md_up args, x, y
    -** Processing line: ~    [x, y, 4, 11, 'sprites/player-up.png', 0, (global_alpha_percentage args)]~
    +      ]
    +** Processing line: ~    }~
     - Inside source: true
     *** True Line Result
    -    [x, y, 4, 11, 'sprites/player-up.png', 0, (global_alpha_percentage args)]
    +    }
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -136839,158 +142647,158 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def player_md_down args, x, y~
    +** Processing line: ~  def final_decision_ship_status args~
     - Inside source: true
     *** True Line Result
    -  def player_md_down args, x, y
    -** Processing line: ~    [x, y, 4, 11, 'sprites/player-down.png', 0, (global_alpha_percentage args)]~
    +  def final_decision_ship_status args
    +** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
    -    [x, y, 4, 11, 'sprites/player-down.png', 0, (global_alpha_percentage args)]
    -** Processing line: ~  end~
    +    {
    +** Processing line: ~      background: 'sprites/serenity.png',~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +      background: 'sprites/serenity.png',
    +** Processing line: ~      fade: 60,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def player_sm args, x, y~
    +      fade: 60,
    +** Processing line: ~      player: [30, 10],~
     - Inside source: true
     *** True Line Result
    -  def player_sm args, x, y
    -** Processing line: ~    [x, y, 3, 7, 'sprites/player-zoomed-out.png', 0, (global_alpha_percentage args)]~
    +      player: [30, 10],
    +** Processing line: ~      scenes: [~
     - Inside source: true
     *** True Line Result
    -    [x, y, 3, 7, 'sprites/player-zoomed-out.png', 0, (global_alpha_percentage args)]
    -** Processing line: ~  end~
    +      scenes: [
    +** Processing line: ~        [*hotspot_top_right, :final_decision]~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +        [*hotspot_top_right, :final_decision]
    +** Processing line: ~      ],~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def player_xs args, x, y~
    +      ],
    +** Processing line: ~      storylines: [~
     - Inside source: true
     *** True Line Result
    -  def player_xs args, x, y
    -** Processing line: ~    [x, y, 1, 4, 'sprites/player-zoomed-out.png', 0, (global_alpha_percentage args)]~
    +      storylines: [
    +** Processing line: ~        [30,  8, 4, 4, "????"],~
     - Inside source: true
     *** True Line Result
    -    [x, y, 1, 4, 'sprites/player-zoomed-out.png', 0, (global_alpha_percentage args)]
    -** Processing line: ~  end~
    +        [30,  8, 4, 4, "????"],
    +** Processing line: ~        *final_decision_ship_status_shared(args)~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +        *final_decision_ship_status_shared(args)
    +** Processing line: ~      ]~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~#+end_src~
    -- Line was identified as the end of a code block.
    +      ]
    +** Processing line: ~    }~
    +- Inside source: true
     *** True Line Result
    -#+end_src
    -** Processing line: ~~
    -- End of paragraph detected.
    +    }
    +** Processing line: ~  end~
    +- Inside source: true
     *** True Line Result
    -
    -** Processing line: ~*** Rpg Narrative - Return Of Serenity - require.rb~
    -- Header detected.
    +  end
    +** Processing line: ~~
    +- Inside source: true
     *** True Line Result
     
    +** Processing line: ~  def final_decision args~
    +- Inside source: true
     *** True Line Result
    -*** Rpg Narrative - Return Of Serenity - require.rb
    -** Processing line: ~#+begin_src ruby~
    -- Line was identified as the beginning of a code block.
    -*** True Line Result
    -
    +  def final_decision args
    +** Processing line: ~    decision_graph  "Stasis-- Chambers--: UNDERPOWERED, Life- forms-- will be terminated---- unless-- equilibrium----- is reached.",~
    +- Inside source: true
     *** True Line Result
    -#+begin_src ruby
    -** Processing line: ~  # ./samples/99_genre_rpg_narrative/return_of_serenity/app/require.rb~
    +    decision_graph  "Stasis-- Chambers--: UNDERPOWERED, Life- forms-- will be terminated---- unless-- equilibrium----- is reached.",
    +** Processing line: ~                    "I CAN'T DO THIS... But... If-- I-- don't--- bring-- the- chambers--- to- equilibrium-----, they all die...",~
     - Inside source: true
     *** True Line Result
    -  # ./samples/99_genre_rpg_narrative/return_of_serenity/app/require.rb
    -** Processing line: ~  require 'app/lowrez_simulator.rb'~
    +                    "I CAN'T DO THIS... But... If-- I-- don't--- bring-- the- chambers--- to- equilibrium-----, they all die...",
    +** Processing line: ~                    [:final_decision_game_over_noone, "Kill--- Everyone---", "DO--- NOTHING?"],~
     - Inside source: true
     *** True Line Result
    -  require 'app/lowrez_simulator.rb'
    -** Processing line: ~  require 'app/storyline_day_one.rb'~
    +                    [:final_decision_game_over_noone, "Kill--- Everyone---", "DO--- NOTHING?"],
    +** Processing line: ~                    [:final_decision_game_over_matthew, "Kill--- Sasha---", "KILL--- SASHA?"],~
     - Inside source: true
     *** True Line Result
    -  require 'app/storyline_day_one.rb'
    -** Processing line: ~  require 'app/storyline_blinking_light.rb'~
    +                    [:final_decision_game_over_matthew, "Kill--- Sasha---", "KILL--- SASHA?"],
    +** Processing line: ~                    [:final_decision_game_over_anka, "Kill--- Aanka---", "KILL--- AANKA?"],~
     - Inside source: true
     *** True Line Result
    -  require 'app/storyline_blinking_light.rb'
    -** Processing line: ~  require 'app/storyline_serenity_introduction.rb'~
    +                    [:final_decision_game_over_anka, "Kill--- Aanka---", "KILL--- AANKA?"],
    +** Processing line: ~                    [:final_decision_game_over_sasha, "Kill--- Matthew---", "KILL--- MATTHEW?"]~
     - Inside source: true
     *** True Line Result
    -  require 'app/storyline_serenity_introduction.rb'
    -** Processing line: ~  require 'app/storyline_speed_of_light.rb'~
    +                    [:final_decision_game_over_sasha, "Kill--- Matthew---", "KILL--- MATTHEW?"]
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -  require 'app/storyline_speed_of_light.rb'
    -** Processing line: ~  require 'app/storyline_serenity_alive.rb'~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  require 'app/storyline_serenity_alive.rb'
    -** Processing line: ~  require 'app/storyline_serenity_bio.rb'~
    +
    +** Processing line: ~  def final_decision_game_over_noone args~
     - Inside source: true
     *** True Line Result
    -  require 'app/storyline_serenity_bio.rb'
    -** Processing line: ~  require 'app/storyline_anka.rb'~
    +  def final_decision_game_over_noone args
    +** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
    -  require 'app/storyline_anka.rb'
    -** Processing line: ~  require 'app/storyline_final_message.rb'~
    +    {
    +** Processing line: ~      background: 'sprites/tribute-game-over.png',~
     - Inside source: true
     *** True Line Result
    -  require 'app/storyline_final_message.rb'
    -** Processing line: ~  require 'app/storyline_final_decision.rb'~
    +      background: 'sprites/tribute-game-over.png',
    +** Processing line: ~      player: [53, 14],~
     - Inside source: true
     *** True Line Result
    -  require 'app/storyline_final_decision.rb'
    -** Processing line: ~  require 'app/storyline.rb'~
    +      player: [53, 14],
    +** Processing line: ~      fade: 600~
     - Inside source: true
     *** True Line Result
    -  require 'app/storyline.rb'
    -** Processing line: ~~
    +      fade: 600
    +** Processing line: ~    }~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~#+end_src~
    -- Line was identified as the end of a code block.
    +    }
    +** Processing line: ~  end~
    +- Inside source: true
     *** True Line Result
    -#+end_src
    +  end
     ** Processing line: ~~
    -- End of paragraph detected.
    -*** True Line Result
    -
    -** Processing line: ~*** Rpg Narrative - Return Of Serenity - storyline.rb~
    -- Header detected.
    +- Inside source: true
     *** True Line Result
     
    +** Processing line: ~  def final_decision_game_over_matthew args~
    +- Inside source: true
     *** True Line Result
    -*** Rpg Narrative - Return Of Serenity - storyline.rb
    -** Processing line: ~#+begin_src ruby~
    -- Line was identified as the beginning of a code block.
    +  def final_decision_game_over_matthew args
    +** Processing line: ~    {~
    +- Inside source: true
     *** True Line Result
    -
    +    {
    +** Processing line: ~      background: 'sprites/tribute-game-over.png',~
    +- Inside source: true
     *** True Line Result
    -#+begin_src ruby
    -** Processing line: ~  # ./samples/99_genre_rpg_narrative/return_of_serenity/app/storyline.rb~
    +      background: 'sprites/tribute-game-over.png',
    +** Processing line: ~      player: [53, 14],~
     - Inside source: true
     *** True Line Result
    -  # ./samples/99_genre_rpg_narrative/return_of_serenity/app/storyline.rb
    -** Processing line: ~  def hotspot_top~
    +      player: [53, 14],
    +** Processing line: ~      fade: 600~
     - Inside source: true
     *** True Line Result
    -  def hotspot_top
    -** Processing line: ~    [4, 61, 56, 3]~
    +      fade: 600
    +** Processing line: ~    }~
     - Inside source: true
     *** True Line Result
    -    [4, 61, 56, 3]
    +    }
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -136999,30 +142807,30 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def hotspot_bottom~
    +** Processing line: ~  def final_decision_game_over_anka args~
     - Inside source: true
     *** True Line Result
    -  def hotspot_bottom
    -** Processing line: ~    [4, 0, 56, 3]~
    +  def final_decision_game_over_anka args
    +** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
    -    [4, 0, 56, 3]
    -** Processing line: ~  end~
    +    {
    +** Processing line: ~      background: 'sprites/tribute-game-over.png',~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +      background: 'sprites/tribute-game-over.png',
    +** Processing line: ~      player: [53, 14],~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def hotspot_top_right~
    +      player: [53, 14],
    +** Processing line: ~      fade: 600~
     - Inside source: true
     *** True Line Result
    -  def hotspot_top_right
    -** Processing line: ~    [62, 35, 3, 25]~
    +      fade: 600
    +** Processing line: ~    }~
     - Inside source: true
     *** True Line Result
    -    [62, 35, 3, 25]
    +    }
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -137031,30 +142839,30 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def hotspot_bottom_right~
    +** Processing line: ~  def final_decision_game_over_sasha args~
     - Inside source: true
     *** True Line Result
    -  def hotspot_bottom_right
    -** Processing line: ~    [62, 0, 3, 25]~
    +  def final_decision_game_over_sasha args
    +** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
    -    [62, 0, 3, 25]
    -** Processing line: ~  end~
    +    {
    +** Processing line: ~      background: 'sprites/tribute-game-over.png',~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +      background: 'sprites/tribute-game-over.png',
    +** Processing line: ~      player: [53, 14],~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def storyline_history_include? args, text~
    +      player: [53, 14],
    +** Processing line: ~      fade: 600~
     - Inside source: true
     *** True Line Result
    -  def storyline_history_include? args, text
    -** Processing line: ~    args.state.storyline_history.any? { |s| s.gsub("-", "").gsub(" ", "").include? text.gsub("-", "").gsub(" ", "") }~
    +      fade: 600
    +** Processing line: ~    }~
     - Inside source: true
     *** True Line Result
    -    args.state.storyline_history.any? { |s| s.gsub("-", "").gsub(" ", "").include? text.gsub("-", "").gsub(" ", "") }
    +    }
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -137063,46 +142871,38 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def blinking_light_side_of_home_render args, lowrez_sprites, lowrez_labels, lowrez_solids~
    -- Inside source: true
    -*** True Line Result
    -  def blinking_light_side_of_home_render args, lowrez_sprites, lowrez_labels, lowrez_solids
    -** Processing line: ~    lowrez_sprites << [48, 44, 5, 5, 'sprites/square.png', 0,  50 * (args.state.tick_count % 50).fdiv(50), 0, 255, 0]~
    -- Inside source: true
    -*** True Line Result
    -    lowrez_sprites << [48, 44, 5, 5, 'sprites/square.png', 0,  50 * (args.state.tick_count % 50).fdiv(50), 0, 255, 0]
    -** Processing line: ~    lowrez_sprites << [49, 45, 3, 3, 'sprites/square.png', 0, 100 * (args.state.tick_count % 50).fdiv(50), 0, 255, 0]~
    +** Processing line: ~  def final_decision_ship_status_shared args~
     - Inside source: true
     *** True Line Result
    -    lowrez_sprites << [49, 45, 3, 3, 'sprites/square.png', 0, 100 * (args.state.tick_count % 50).fdiv(50), 0, 255, 0]
    -** Processing line: ~    lowrez_sprites << [50, 46, 1, 1, 'sprites/square.png', 0, 255 * (args.state.tick_count % 50).fdiv(50), 0, 255, 0]~
    +  def final_decision_ship_status_shared args
    +** Processing line: ~    [~
     - Inside source: true
     *** True Line Result
    -    lowrez_sprites << [50, 46, 1, 1, 'sprites/square.png', 0, 255 * (args.state.tick_count % 50).fdiv(50), 0, 255, 0]
    -** Processing line: ~  end~
    +    [
    +** Processing line: ~      *ship_control_hotspot(24, 22,~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +      *ship_control_hotspot(24, 22,
    +** Processing line: ~                             "Stasis-- Chambers--: UNDERPOWERED, Life- forms-- will be terminated---- unless-- equilibrium----- is reached. WHAT?! NO!",~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def blinking_light_mountain_pass_render args, lowrez_sprites, lowrez_labels, lowrez_solids~
    +                             "Stasis-- Chambers--: UNDERPOWERED, Life- forms-- will be terminated---- unless-- equilibrium----- is reached. WHAT?! NO!",
    +** Processing line: ~                             "Matthew's--- Chamber--: UNDER-- THREAT-- OF-- TERMINATION. WHAT?! NO!",~
     - Inside source: true
     *** True Line Result
    -  def blinking_light_mountain_pass_render args, lowrez_sprites, lowrez_labels, lowrez_solids
    -** Processing line: ~    lowrez_sprites << [18, 47, 5, 5, 'sprites/square.png', 0,  50 * (args.state.tick_count % 50).fdiv(50), 0, 255, 0]~
    +                             "Matthew's--- Chamber--: UNDER-- THREAT-- OF-- TERMINATION. WHAT?! NO!",
    +** Processing line: ~                             "Aanka's--- Chamber--: UNDER-- THREAT-- OF-- TERMINATION.  WHAT?! NO!",~
     - Inside source: true
     *** True Line Result
    -    lowrez_sprites << [18, 47, 5, 5, 'sprites/square.png', 0,  50 * (args.state.tick_count % 50).fdiv(50), 0, 255, 0]
    -** Processing line: ~    lowrez_sprites << [19, 48, 3, 3, 'sprites/square.png', 0, 100 * (args.state.tick_count % 50).fdiv(50), 0, 255, 0]~
    +                             "Aanka's--- Chamber--: UNDER-- THREAT-- OF-- TERMINATION.  WHAT?! NO!",
    +** Processing line: ~                             "Sasha's--- Chamber--: UNDER-- THREAT-- OF-- TERMINATION. WHAT?! NO!"),~
     - Inside source: true
     *** True Line Result
    -    lowrez_sprites << [19, 48, 3, 3, 'sprites/square.png', 0, 100 * (args.state.tick_count % 50).fdiv(50), 0, 255, 0]
    -** Processing line: ~    lowrez_sprites << [20, 49, 1, 1, 'sprites/square.png', 0, 255 * (args.state.tick_count % 50).fdiv(50), 0, 255, 0]~
    +                             "Sasha's--- Chamber--: UNDER-- THREAT-- OF-- TERMINATION. WHAT?! NO!"),
    +** Processing line: ~    ]~
     - Inside source: true
     *** True Line Result
    -    lowrez_sprites << [20, 49, 1, 1, 'sprites/square.png', 0, 255 * (args.state.tick_count % 50).fdiv(50), 0, 255, 0]
    +    ]
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -137111,70 +142911,78 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def blinking_light_path_to_observatory_render args, lowrez_sprites, lowrez_labels, lowrez_solids~
    -- Inside source: true
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
     *** True Line Result
    -  def blinking_light_path_to_observatory_render args, lowrez_sprites, lowrez_labels, lowrez_solids
    -** Processing line: ~    lowrez_sprites << [0, 26, 5, 5, 'sprites/square.png', 0,  50 * (args.state.tick_count % 50).fdiv(50), 0, 255, 0]~
    -- Inside source: true
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
     *** True Line Result
    -    lowrez_sprites << [0, 26, 5, 5, 'sprites/square.png', 0,  50 * (args.state.tick_count % 50).fdiv(50), 0, 255, 0]
    -** Processing line: ~    lowrez_sprites << [1, 27, 3, 3, 'sprites/square.png', 0, 100 * (args.state.tick_count % 50).fdiv(50), 0, 255, 0]~
    -- Inside source: true
    +
    +** Processing line: ~*** Rpg Narrative - Return Of Serenity - storyline_final_message.rb~
    +- Header detected.
     *** True Line Result
    -    lowrez_sprites << [1, 27, 3, 3, 'sprites/square.png', 0, 100 * (args.state.tick_count % 50).fdiv(50), 0, 255, 0]
    -** Processing line: ~    lowrez_sprites << [2, 28, 1, 1, 'sprites/square.png', 0, 255 * (args.state.tick_count % 50).fdiv(50), 0, 255, 0]~
    +
    +*** True Line Result
    +*** Rpg Narrative - Return Of Serenity - storyline_final_message.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/99_genre_rpg_narrative/return_of_serenity/app/storyline_final_message.rb~
     - Inside source: true
     *** True Line Result
    -    lowrez_sprites << [2, 28, 1, 1, 'sprites/square.png', 0, 255 * (args.state.tick_count % 50).fdiv(50), 0, 255, 0]
    -** Processing line: ~  end~
    +  # ./samples/99_genre_rpg_narrative/return_of_serenity/app/storyline_final_message.rb
    +** Processing line: ~  def final_message_sad args~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +  def final_message_sad args
    +** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def blinking_light_observatory_render args, lowrez_sprites, lowrez_labels, lowrez_solids~
    +    {
    +** Processing line: ~      fade: 60,~
     - Inside source: true
     *** True Line Result
    -  def blinking_light_observatory_render args, lowrez_sprites, lowrez_labels, lowrez_solids
    -** Processing line: ~    lowrez_sprites << [23, 59, 5, 5, 'sprites/square.png', 0,  50 * (args.state.tick_count % 50).fdiv(50), 0, 255, 0]~
    +      fade: 60,
    +** Processing line: ~      background: 'sprites/inside-home.png',~
     - Inside source: true
     *** True Line Result
    -    lowrez_sprites << [23, 59, 5, 5, 'sprites/square.png', 0,  50 * (args.state.tick_count % 50).fdiv(50), 0, 255, 0]
    -** Processing line: ~    lowrez_sprites << [24, 60, 3, 3, 'sprites/square.png', 0, 100 * (args.state.tick_count % 50).fdiv(50), 0, 255, 0]~
    +      background: 'sprites/inside-home.png',
    +** Processing line: ~      player: [34, 35],~
     - Inside source: true
     *** True Line Result
    -    lowrez_sprites << [24, 60, 3, 3, 'sprites/square.png', 0, 100 * (args.state.tick_count % 50).fdiv(50), 0, 255, 0]
    -** Processing line: ~    lowrez_sprites << [25, 61, 1, 1, 'sprites/square.png', 0, 255 * (args.state.tick_count % 50).fdiv(50), 0, 255, 0]~
    +      player: [34, 35],
    +** Processing line: ~      storylines: [~
     - Inside source: true
     *** True Line Result
    -    lowrez_sprites << [25, 61, 1, 1, 'sprites/square.png', 0, 255 * (args.state.tick_count % 50).fdiv(50), 0, 255, 0]
    -** Processing line: ~  end~
    +      storylines: [
    +** Processing line: ~        [34, 34, 4, 4, "Another-- sleepless-- night..."],~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +        [34, 34, 4, 4, "Another-- sleepless-- night..."],
    +** Processing line: ~      ],~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def blinking_light_inside_observatory_render args, lowrez_sprites, lowrez_labels, lowrez_solids~
    +      ],
    +** Processing line: ~      scenes: [~
     - Inside source: true
     *** True Line Result
    -  def blinking_light_inside_observatory_render args, lowrez_sprites, lowrez_labels, lowrez_solids
    -** Processing line: ~    lowrez_sprites << [30, 30, 5, 5, 'sprites/square.png', 0,  50 * (args.state.tick_count % 50).fdiv(50), 0, 255, 0]~
    +      scenes: [
    +** Processing line: ~        [32, -1, 8, 3, :final_message_observatory]~
     - Inside source: true
     *** True Line Result
    -    lowrez_sprites << [30, 30, 5, 5, 'sprites/square.png', 0,  50 * (args.state.tick_count % 50).fdiv(50), 0, 255, 0]
    -** Processing line: ~    lowrez_sprites << [31, 31, 3, 3, 'sprites/square.png', 0, 100 * (args.state.tick_count % 50).fdiv(50), 0, 255, 0]~
    +        [32, -1, 8, 3, :final_message_observatory]
    +** Processing line: ~      ]~
     - Inside source: true
     *** True Line Result
    -    lowrez_sprites << [31, 31, 3, 3, 'sprites/square.png', 0, 100 * (args.state.tick_count % 50).fdiv(50), 0, 255, 0]
    -** Processing line: ~    lowrez_sprites << [32, 32, 1, 1, 'sprites/square.png', 0, 255 * (args.state.tick_count % 50).fdiv(50), 0, 255, 0]~
    +      ]
    +** Processing line: ~    }~
     - Inside source: true
     *** True Line Result
    -    lowrez_sprites << [32, 32, 1, 1, 'sprites/square.png', 0, 255 * (args.state.tick_count % 50).fdiv(50), 0, 255, 0]
    +    }
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -137183,342 +142991,334 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def decision_graph context_message, context_action, context_result_one, context_result_two, context_result_three = [], context_result_four = []~
    -- Inside source: true
    -*** True Line Result
    -  def decision_graph context_message, context_action, context_result_one, context_result_two, context_result_three = [], context_result_four = []
    -** Processing line: ~    result_one_scene, result_one_label, result_one_text = context_result_one~
    +** Processing line: ~  def final_message_happy args~
     - Inside source: true
     *** True Line Result
    -    result_one_scene, result_one_label, result_one_text = context_result_one
    -** Processing line: ~    result_two_scene, result_two_label, result_two_text = context_result_two~
    +  def final_message_happy args
    +** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
    -    result_two_scene, result_two_label, result_two_text = context_result_two
    -** Processing line: ~    result_three_scene, result_three_label, result_three_text = context_result_three~
    +    {
    +** Processing line: ~      fade: 60,~
     - Inside source: true
     *** True Line Result
    -    result_three_scene, result_three_label, result_three_text = context_result_three
    -** Processing line: ~    result_four_scene, result_four_label, result_four_text = context_result_four~
    +      fade: 60,
    +** Processing line: ~      background: 'sprites/inside-home.png',~
     - Inside source: true
     *** True Line Result
    -    result_four_scene, result_four_label, result_four_text = context_result_four
    -** Processing line: ~~
    +      background: 'sprites/inside-home.png',
    +** Processing line: ~      player: [34, 35],~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    top_level_hash = {~
    +      player: [34, 35],
    +** Processing line: ~      storylines: [~
     - Inside source: true
     *** True Line Result
    -    top_level_hash = {
    -** Processing line: ~      background: 'sprites/decision.png',~
    +      storylines: [
    +** Processing line: ~        [34, 34, 4, 4, "Oh man, I slept like rock!"],~
     - Inside source: true
     *** True Line Result
    -      background: 'sprites/decision.png',
    -** Processing line: ~      fade: 60,~
    +        [34, 34, 4, 4, "Oh man, I slept like rock!"],
    +** Processing line: ~      ],~
     - Inside source: true
     *** True Line Result
    -      fade: 60,
    -** Processing line: ~      player: [20, 36],~
    +      ],
    +** Processing line: ~      scenes: [~
     - Inside source: true
     *** True Line Result
    -      player: [20, 36],
    -** Processing line: ~      storylines: [ ],~
    +      scenes: [
    +** Processing line: ~        [32, -1, 8, 3, :final_message_observatory]~
     - Inside source: true
     *** True Line Result
    -      storylines: [ ],
    -** Processing line: ~      scenes: [ ]~
    +        [32, -1, 8, 3, :final_message_observatory]
    +** Processing line: ~      ]~
     - Inside source: true
     *** True Line Result
    -      scenes: [ ]
    +      ]
     ** Processing line: ~    }~
     - Inside source: true
     *** True Line Result
         }
    -** Processing line: ~~
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    confirmation_result_one_hash = {~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    confirmation_result_one_hash = {
    -** Processing line: ~      background: 'sprites/decision.png',~
    +
    +** Processing line: ~  def final_message_side_of_home args~
     - Inside source: true
     *** True Line Result
    -      background: 'sprites/decision.png',
    -** Processing line: ~      scenes: [ ],~
    +  def final_message_side_of_home args
    +** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
    -      scenes: [ ],
    -** Processing line: ~      storylines: [ ]~
    +    {
    +** Processing line: ~      fade: 60,~
     - Inside source: true
     *** True Line Result
    -      storylines: [ ]
    -** Processing line: ~    }~
    +      fade: 60,
    +** Processing line: ~      background: 'sprites/side-of-home.png',~
     - Inside source: true
     *** True Line Result
    -    }
    -** Processing line: ~~
    +      background: 'sprites/side-of-home.png',
    +** Processing line: ~      player: [16, 13],~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    confirmation_result_two_hash = {~
    +      player: [16, 13],
    +** Processing line: ~      scenes: [~
     - Inside source: true
     *** True Line Result
    -    confirmation_result_two_hash = {
    -** Processing line: ~      background: 'sprites/decision.png',~
    +      scenes: [
    +** Processing line: ~        [52, 24, 11, 5, :final_message_mountain_pass],~
     - Inside source: true
     *** True Line Result
    -      background: 'sprites/decision.png',
    -** Processing line: ~      scenes: [ ],~
    +        [52, 24, 11, 5, :final_message_mountain_pass],
    +** Processing line: ~      ],~
     - Inside source: true
     *** True Line Result
    -      scenes: [ ],
    -** Processing line: ~      storylines: [ ]~
    +      ],
    +** Processing line: ~      render_override: :blinking_light_side_of_home_render~
     - Inside source: true
     *** True Line Result
    -      storylines: [ ]
    +      render_override: :blinking_light_side_of_home_render
     ** Processing line: ~    }~
     - Inside source: true
     *** True Line Result
         }
    -** Processing line: ~~
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    confirmation_result_three_hash = {~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    confirmation_result_three_hash = {
    -** Processing line: ~      background: 'sprites/decision.png',~
    +
    +** Processing line: ~  def final_message_mountain_pass args~
     - Inside source: true
     *** True Line Result
    -      background: 'sprites/decision.png',
    -** Processing line: ~      scenes: [ ],~
    +  def final_message_mountain_pass args
    +** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
    -      scenes: [ ],
    -** Processing line: ~      storylines: [ ]~
    +    {
    +** Processing line: ~      background: 'sprites/mountain-pass-zoomed-out.png',~
     - Inside source: true
     *** True Line Result
    -      storylines: [ ]
    -** Processing line: ~    }~
    +      background: 'sprites/mountain-pass-zoomed-out.png',
    +** Processing line: ~      player: [4, 4],~
     - Inside source: true
     *** True Line Result
    -    }
    -** Processing line: ~~
    +      player: [4, 4],
    +** Processing line: ~      scenes: [~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    confirmation_result_four_hash = {~
    +      scenes: [
    +** Processing line: ~        [18, 47, 5, 5, :final_message_path_to_observatory],~
     - Inside source: true
     *** True Line Result
    -    confirmation_result_four_hash = {
    -** Processing line: ~      background: 'sprites/decision.png',~
    +        [18, 47, 5, 5, :final_message_path_to_observatory],
    +** Processing line: ~      ],~
     - Inside source: true
     *** True Line Result
    -      background: 'sprites/decision.png',
    -** Processing line: ~      scenes: [ ],~
    +      ],
    +** Processing line: ~      storylines: [~
     - Inside source: true
     *** True Line Result
    -      scenes: [ ],
    -** Processing line: ~      storylines: [ ]~
    +      storylines: [
    +** Processing line: ~        [18, 13, 5, 5, "Hnnnnnnnggg. My legs-- are still sore- from yesterday."]~
     - Inside source: true
     *** True Line Result
    -      storylines: [ ]
    -** Processing line: ~    }~
    +        [18, 13, 5, 5, "Hnnnnnnnggg. My legs-- are still sore- from yesterday."]
    +** Processing line: ~      ],~
     - Inside source: true
     *** True Line Result
    -    }
    -** Processing line: ~~
    +      ],
    +** Processing line: ~      render_override: :blinking_light_mountain_pass_render~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    top_level_hash[:storylines] << [ 5, 35, 4, 4, context_message]~
    +      render_override: :blinking_light_mountain_pass_render
    +** Processing line: ~    }~
     - Inside source: true
     *** True Line Result
    -    top_level_hash[:storylines] << [ 5, 35, 4, 4, context_message]
    -** Processing line: ~    top_level_hash[:storylines] << [20, 35, 4, 4, context_action]~
    +    }
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    top_level_hash[:storylines] << [20, 35, 4, 4, context_action]
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    confirmation_result_one_hash[:scenes]       << [20, 35, 4, 4, top_level_hash]~
    +** Processing line: ~  def final_message_path_to_observatory args~
     - Inside source: true
     *** True Line Result
    -    confirmation_result_one_hash[:scenes]       << [20, 35, 4, 4, top_level_hash]
    -** Processing line: ~    confirmation_result_one_hash[:scenes]       << [60, 50, 4, 4, result_one_scene]~
    +  def final_message_path_to_observatory args
    +** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
    -    confirmation_result_one_hash[:scenes]       << [60, 50, 4, 4, result_one_scene]
    -** Processing line: ~    confirmation_result_one_hash[:storylines]   << [40, 50, 4, 4, "#{result_one_label}: \"#{result_one_text}\""]~
    +    {
    +** Processing line: ~      background: 'sprites/path-to-observatory.png',~
     - Inside source: true
     *** True Line Result
    -    confirmation_result_one_hash[:storylines]   << [40, 50, 4, 4, "#{result_one_label}: \"#{result_one_text}\""]
    -** Processing line: ~    confirmation_result_one_hash[:scenes]       << [40, 40, 4, 4, confirmation_result_four_hash] if result_four_scene~
    +      background: 'sprites/path-to-observatory.png',
    +** Processing line: ~      player: [60, 4],~
     - Inside source: true
     *** True Line Result
    -    confirmation_result_one_hash[:scenes]       << [40, 40, 4, 4, confirmation_result_four_hash] if result_four_scene
    -** Processing line: ~    confirmation_result_one_hash[:scenes]       << [40, 30, 4, 4, confirmation_result_three_hash] if result_three_scene~
    +      player: [60, 4],
    +** Processing line: ~      scenes: [~
     - Inside source: true
     *** True Line Result
    -    confirmation_result_one_hash[:scenes]       << [40, 30, 4, 4, confirmation_result_three_hash] if result_three_scene
    -** Processing line: ~    confirmation_result_one_hash[:scenes]       << [40, 20, 4, 4, confirmation_result_two_hash]~
    +      scenes: [
    +** Processing line: ~        [0, 26, 5, 5, :final_message_observatory]~
     - Inside source: true
     *** True Line Result
    -    confirmation_result_one_hash[:scenes]       << [40, 20, 4, 4, confirmation_result_two_hash]
    -** Processing line: ~~
    +        [0, 26, 5, 5, :final_message_observatory]
    +** Processing line: ~      ],~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    confirmation_result_two_hash[:scenes]       << [20, 35, 4, 4, top_level_hash]~
    +      ],
    +** Processing line: ~      storylines: [~
     - Inside source: true
     *** True Line Result
    -    confirmation_result_two_hash[:scenes]       << [20, 35, 4, 4, top_level_hash]
    -** Processing line: ~    confirmation_result_two_hash[:scenes]       << [40, 50, 4, 4, confirmation_result_one_hash]~
    +      storylines: [
    +** Processing line: ~        [22, 20, 10, 10, "This spot--, on the mountain, right here, it's-- perfect. This- is where- I'll-- yeet-- the person-- who is playing-- this- prank- on me."]~
     - Inside source: true
     *** True Line Result
    -    confirmation_result_two_hash[:scenes]       << [40, 50, 4, 4, confirmation_result_one_hash]
    -** Processing line: ~    confirmation_result_two_hash[:scenes]       << [40, 40, 4, 4, confirmation_result_four_hash] if result_four_scene~
    +        [22, 20, 10, 10, "This spot--, on the mountain, right here, it's-- perfect. This- is where- I'll-- yeet-- the person-- who is playing-- this- prank- on me."]
    +** Processing line: ~      ],~
     - Inside source: true
     *** True Line Result
    -    confirmation_result_two_hash[:scenes]       << [40, 40, 4, 4, confirmation_result_four_hash] if result_four_scene
    -** Processing line: ~    confirmation_result_two_hash[:scenes]       << [40, 30, 4, 4, confirmation_result_three_hash] if result_three_scene~
    +      ],
    +** Processing line: ~      render_override: :blinking_light_path_to_observatory_render~
     - Inside source: true
     *** True Line Result
    -    confirmation_result_two_hash[:scenes]       << [40, 30, 4, 4, confirmation_result_three_hash] if result_three_scene
    -** Processing line: ~    confirmation_result_two_hash[:scenes]       << [60, 20, 4, 4, result_two_scene]~
    +      render_override: :blinking_light_path_to_observatory_render
    +** Processing line: ~    }~
     - Inside source: true
     *** True Line Result
    -    confirmation_result_two_hash[:scenes]       << [60, 20, 4, 4, result_two_scene]
    -** Processing line: ~    confirmation_result_two_hash[:storylines]   << [40, 20, 4, 4, "#{result_two_label}: \"#{result_two_text}\""]~
    +    }
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    confirmation_result_two_hash[:storylines]   << [40, 20, 4, 4, "#{result_two_label}: \"#{result_two_text}\""]
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    confirmation_result_three_hash[:scenes]     << [20, 35, 4, 4, top_level_hash]~
    -- Inside source: true
    -*** True Line Result
    -    confirmation_result_three_hash[:scenes]     << [20, 35, 4, 4, top_level_hash]
    -** Processing line: ~    confirmation_result_three_hash[:scenes]     << [40, 50, 4, 4, confirmation_result_one_hash]~
    +** Processing line: ~  def final_message_observatory args~
     - Inside source: true
     *** True Line Result
    -    confirmation_result_three_hash[:scenes]     << [40, 50, 4, 4, confirmation_result_one_hash]
    -** Processing line: ~    confirmation_result_three_hash[:scenes]     << [40, 40, 4, 4, confirmation_result_four_hash]~
    +  def final_message_observatory args
    +** Processing line: ~    if args.state.scene_history.include? :replied_with_whole_truth~
     - Inside source: true
     *** True Line Result
    -    confirmation_result_three_hash[:scenes]     << [40, 40, 4, 4, confirmation_result_four_hash]
    -** Processing line: ~    confirmation_result_three_hash[:scenes]     << [60, 30, 4, 4, result_three_scene]~
    +    if args.state.scene_history.include? :replied_with_whole_truth
    +** Processing line: ~      return {~
     - Inside source: true
     *** True Line Result
    -    confirmation_result_three_hash[:scenes]     << [60, 30, 4, 4, result_three_scene]
    -** Processing line: ~    confirmation_result_three_hash[:storylines] << [40, 30, 4, 4, "#{result_three_label}: \"#{result_three_text}\""]~
    +      return {
    +** Processing line: ~        background: 'sprites/inside-observatory.png',~
     - Inside source: true
     *** True Line Result
    -    confirmation_result_three_hash[:storylines] << [40, 30, 4, 4, "#{result_three_label}: \"#{result_three_text}\""]
    -** Processing line: ~    confirmation_result_three_hash[:scenes]     << [40, 20, 4, 4, confirmation_result_two_hash]~
    +        background: 'sprites/inside-observatory.png',
    +** Processing line: ~        fade: 60,~
     - Inside source: true
     *** True Line Result
    -    confirmation_result_three_hash[:scenes]     << [40, 20, 4, 4, confirmation_result_two_hash]
    -** Processing line: ~~
    +        fade: 60,
    +** Processing line: ~        player: [51, 12],~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    confirmation_result_four_hash[:scenes]      << [20, 35, 4, 4, top_level_hash]~
    +        player: [51, 12],
    +** Processing line: ~        storylines: [~
     - Inside source: true
     *** True Line Result
    -    confirmation_result_four_hash[:scenes]      << [20, 35, 4, 4, top_level_hash]
    -** Processing line: ~    confirmation_result_four_hash[:scenes]      << [40, 50, 4, 4, confirmation_result_one_hash]~
    +        storylines: [
    +** Processing line: ~          [50, 10, 4, 4, "Here-- we- go..."]~
     - Inside source: true
     *** True Line Result
    -    confirmation_result_four_hash[:scenes]      << [40, 50, 4, 4, confirmation_result_one_hash]
    -** Processing line: ~    confirmation_result_four_hash[:scenes]      << [60, 40, 4, 4, result_four_scene]~
    +          [50, 10, 4, 4, "Here-- we- go..."]
    +** Processing line: ~        ],~
     - Inside source: true
     *** True Line Result
    -    confirmation_result_four_hash[:scenes]      << [60, 40, 4, 4, result_four_scene]
    -** Processing line: ~    confirmation_result_four_hash[:storylines]  << [40, 40, 4, 4, "#{result_four_label}: \"#{result_four_text}\""]~
    +        ],
    +** Processing line: ~        scenes: [~
     - Inside source: true
     *** True Line Result
    -    confirmation_result_four_hash[:storylines]  << [40, 40, 4, 4, "#{result_four_label}: \"#{result_four_text}\""]
    -** Processing line: ~    confirmation_result_four_hash[:scenes]      << [40, 30, 4, 4, confirmation_result_three_hash]~
    +        scenes: [
    +** Processing line: ~          [30, 18, 5, 12, :final_message_inside_mainframe]~
     - Inside source: true
     *** True Line Result
    -    confirmation_result_four_hash[:scenes]      << [40, 30, 4, 4, confirmation_result_three_hash]
    -** Processing line: ~    confirmation_result_four_hash[:scenes]      << [40, 20, 4, 4, confirmation_result_two_hash]~
    +          [30, 18, 5, 12, :final_message_inside_mainframe]
    +** Processing line: ~        ],~
     - Inside source: true
     *** True Line Result
    -    confirmation_result_four_hash[:scenes]      << [40, 20, 4, 4, confirmation_result_two_hash]
    -** Processing line: ~~
    +        ],
    +** Processing line: ~        render_override: :blinking_light_inside_observatory_render~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    top_level_hash[:scenes]     << [40, 50, 4, 4, confirmation_result_one_hash]~
    +        render_override: :blinking_light_inside_observatory_render
    +** Processing line: ~      }~
     - Inside source: true
     *** True Line Result
    -    top_level_hash[:scenes]     << [40, 50, 4, 4, confirmation_result_one_hash]
    -** Processing line: ~    top_level_hash[:scenes]     << [40, 40, 4, 4, confirmation_result_four_hash] if result_four_scene~
    +      }
    +** Processing line: ~    else~
     - Inside source: true
     *** True Line Result
    -    top_level_hash[:scenes]     << [40, 40, 4, 4, confirmation_result_four_hash] if result_four_scene
    -** Processing line: ~    top_level_hash[:scenes]     << [40, 30, 4, 4, confirmation_result_three_hash] if result_three_scene~
    +    else
    +** Processing line: ~      return {~
     - Inside source: true
     *** True Line Result
    -    top_level_hash[:scenes]     << [40, 30, 4, 4, confirmation_result_three_hash] if result_three_scene
    -** Processing line: ~    top_level_hash[:scenes]     << [40, 20, 4, 4, confirmation_result_two_hash]~
    +      return {
    +** Processing line: ~        background: 'sprites/inside-observatory.png',~
     - Inside source: true
     *** True Line Result
    -    top_level_hash[:scenes]     << [40, 20, 4, 4, confirmation_result_two_hash]
    -** Processing line: ~~
    +        background: 'sprites/inside-observatory.png',
    +** Processing line: ~        fade: 60,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    top_level_hash~
    +        fade: 60,
    +** Processing line: ~        player: [51, 12],~
     - Inside source: true
     *** True Line Result
    -    top_level_hash
    -** Processing line: ~  end~
    +        player: [51, 12],
    +** Processing line: ~        storylines: [~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +        storylines: [
    +** Processing line: ~          [50, 10, 4, 4, "I feel like I'm-- walking-- on sunshine!"]~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def ship_control_hotspot offset_x, offset_y, a, b, c, d~
    +          [50, 10, 4, 4, "I feel like I'm-- walking-- on sunshine!"]
    +** Processing line: ~        ],~
     - Inside source: true
     *** True Line Result
    -  def ship_control_hotspot offset_x, offset_y, a, b, c, d
    -** Processing line: ~    results = []~
    +        ],
    +** Processing line: ~        scenes: [~
     - Inside source: true
     *** True Line Result
    -    results = []
    -** Processing line: ~    results << [ 6 + offset_x, 0 + offset_y, 4, 4, a]  if a~
    +        scenes: [
    +** Processing line: ~          [30, 18, 5, 12, :final_message_inside_mainframe]~
     - Inside source: true
     *** True Line Result
    -    results << [ 6 + offset_x, 0 + offset_y, 4, 4, a]  if a
    -** Processing line: ~    results << [ 1 + offset_x, 5 + offset_y, 4, 4, b]  if b~
    +          [30, 18, 5, 12, :final_message_inside_mainframe]
    +** Processing line: ~        ],~
     - Inside source: true
     *** True Line Result
    -    results << [ 1 + offset_x, 5 + offset_y, 4, 4, b]  if b
    -** Processing line: ~    results << [ 6 + offset_x, 5 + offset_y, 4, 4, c]  if c~
    +        ],
    +** Processing line: ~        render_override: :blinking_light_inside_observatory_render~
     - Inside source: true
     *** True Line Result
    -    results << [ 6 + offset_x, 5 + offset_y, 4, 4, c]  if c
    -** Processing line: ~    results << [ 11 + offset_x, 5 + offset_y, 4, 4, d] if d~
    +        render_override: :blinking_light_inside_observatory_render
    +** Processing line: ~      }~
     - Inside source: true
     *** True Line Result
    -    results << [ 11 + offset_x, 5 + offset_y, 4, 4, d] if d
    -** Processing line: ~    results~
    +      }
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    results
    +    end
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -137527,42 +143327,34 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def reload_current_scene~
    -- Inside source: true
    -*** True Line Result
    -  def reload_current_scene
    -** Processing line: ~    if $gtk.args.state.last_hotspot_scene~
    -- Inside source: true
    -*** True Line Result
    -    if $gtk.args.state.last_hotspot_scene
    -** Processing line: ~      set_scene $gtk.args, send($gtk.args.state.last_hotspot_scene, $gtk.args)~
    +** Processing line: ~  def final_message_inside_mainframe args~
     - Inside source: true
     *** True Line Result
    -      set_scene $gtk.args, send($gtk.args.state.last_hotspot_scene, $gtk.args)
    -** Processing line: ~      tick $gtk.args~
    +  def final_message_inside_mainframe args
    +** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
    -      tick $gtk.args
    -** Processing line: ~    elsif respond_to? :set_scene~
    +    {
    +** Processing line: ~      player: [32, 4],~
     - Inside source: true
     *** True Line Result
    -    elsif respond_to? :set_scene
    -** Processing line: ~      set_scene $gtk.args, (replied_to_serenity_alive_firmly $gtk.args)~
    +      player: [32, 4],
    +** Processing line: ~      background: 'sprites/mainframe.png',~
     - Inside source: true
     *** True Line Result
    -      set_scene $gtk.args, (replied_to_serenity_alive_firmly $gtk.args)
    -** Processing line: ~      tick $gtk.args~
    +      background: 'sprites/mainframe.png',
    +** Processing line: ~      fade: 60,~
     - Inside source: true
     *** True Line Result
    -      tick $gtk.args
    -** Processing line: ~    end~
    +      fade: 60,
    +** Processing line: ~      scenes: [[45, 45,  4, 4, :final_message_check_ship_status]]~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~    $gtk.console.close~
    +      scenes: [[45, 45,  4, 4, :final_message_check_ship_status]]
    +** Processing line: ~    }~
     - Inside source: true
     *** True Line Result
    -    $gtk.console.close
    +    }
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -137571,54 +143363,26 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~#+end_src~
    -- Line was identified as the end of a code block.
    -*** True Line Result
    -#+end_src
    -** Processing line: ~~
    -- End of paragraph detected.
    -*** True Line Result
    -
    -** Processing line: ~*** Rpg Narrative - Return Of Serenity - storyline_anka.rb~
    -- Header detected.
    -*** True Line Result
    -
    -*** True Line Result
    -*** Rpg Narrative - Return Of Serenity - storyline_anka.rb
    -** Processing line: ~#+begin_src ruby~
    -- Line was identified as the beginning of a code block.
    -*** True Line Result
    -
    -*** True Line Result
    -#+begin_src ruby
    -** Processing line: ~  # ./samples/99_genre_rpg_narrative/return_of_serenity/app/storyline_anka.rb~
    -- Inside source: true
    -*** True Line Result
    -  # ./samples/99_genre_rpg_narrative/return_of_serenity/app/storyline_anka.rb
    -** Processing line: ~  def anka_inside_room args~
    +** Processing line: ~  def final_message_check_ship_status args~
     - Inside source: true
     *** True Line Result
    -  def anka_inside_room args
    +  def final_message_check_ship_status args
     ** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
         {
    -** Processing line: ~      background: 'sprites/inside-home.png',~
    -- Inside source: true
    -*** True Line Result
    -      background: 'sprites/inside-home.png',
    -** Processing line: ~      player: [34, 35],~
    +** Processing line: ~      background: 'sprites/mainframe.png',~
     - Inside source: true
     *** True Line Result
    -      player: [34, 35],
    +      background: 'sprites/mainframe.png',
     ** Processing line: ~      storylines: [~
     - Inside source: true
     *** True Line Result
           storylines: [
    -** Processing line: ~        [34, 34, 4, 4, "Ahhhh!!! Oh god, it was just- a nightmare."],~
    +** Processing line: ~        [45, 45, 4, 4, (final_message_current args)],~
     - Inside source: true
     *** True Line Result
    -        [34, 34, 4, 4, "Ahhhh!!! Oh god, it was just- a nightmare."],
    +        [45, 45, 4, 4, (final_message_current args)],
     ** Processing line: ~      ],~
     - Inside source: true
     *** True Line Result
    @@ -137627,10 +143391,10 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
           scenes: [
    -** Processing line: ~        [32, -1, 8, 3, :anka_observatory]~
    +** Processing line: ~        [*hotspot_top, :final_message_ship_status],~
     - Inside source: true
     *** True Line Result
    -        [32, -1, 8, 3, :anka_observatory]
    +        [*hotspot_top, :final_message_ship_status],
     ** Processing line: ~      ]~
     - Inside source: true
     *** True Line Result
    @@ -137647,54 +143411,54 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def anka_observatory args~
    +** Processing line: ~  def final_message_ship_status args~
     - Inside source: true
     *** True Line Result
    -  def anka_observatory args
    +  def final_message_ship_status args
     ** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
         {
    -** Processing line: ~      background: 'sprites/inside-observatory.png',~
    +** Processing line: ~      background: 'sprites/serenity.png',~
     - Inside source: true
     *** True Line Result
    -      background: 'sprites/inside-observatory.png',
    +      background: 'sprites/serenity.png',
     ** Processing line: ~      fade: 60,~
     - Inside source: true
     *** True Line Result
           fade: 60,
    -** Processing line: ~      player: [51, 12],~
    +** Processing line: ~      player: [30, 10],~
     - Inside source: true
     *** True Line Result
    -      player: [51, 12],
    -** Processing line: ~      storylines: [~
    +      player: [30, 10],
    +** Processing line: ~      scenes: [~
     - Inside source: true
     *** True Line Result
    -      storylines: [
    -** Processing line: ~        [50, 10, 4, 4,   "Breathe, Hiro. Just see what's there... everything--- will- be okay."]~
    +      scenes: [
    +** Processing line: ~        [30, 50, 4, 4, :final_message_ship_status_reviewed]~
     - Inside source: true
     *** True Line Result
    -        [50, 10, 4, 4,   "Breathe, Hiro. Just see what's there... everything--- will- be okay."]
    +        [30, 50, 4, 4, :final_message_ship_status_reviewed]
     ** Processing line: ~      ],~
     - Inside source: true
     *** True Line Result
           ],
    -** Processing line: ~      scenes: [~
    +** Processing line: ~      storylines: [~
     - Inside source: true
     *** True Line Result
    -      scenes: [
    -** Processing line: ~        [30, 18, 5, 12, :anka_inside_mainframe]~
    +      storylines: [
    +** Processing line: ~        [30,  8, 4, 4, "Let me make- sure- everything--- looks good. It'll-- give me peace- of mind."],~
     - Inside source: true
     *** True Line Result
    -        [30, 18, 5, 12, :anka_inside_mainframe]
    -** Processing line: ~      ],~
    +        [30,  8, 4, 4, "Let me make- sure- everything--- looks good. It'll-- give me peace- of mind."],
    +** Processing line: ~        *final_message_ship_status_shared(args)~
     - Inside source: true
     *** True Line Result
    -      ],
    -** Processing line: ~      render_override: :blinking_light_inside_observatory_render~
    +        *final_message_ship_status_shared(args)
    +** Processing line: ~      ]~
     - Inside source: true
     *** True Line Result
    -      render_override: :blinking_light_inside_observatory_render
    +      ]
     ** Processing line: ~    }~
     - Inside source: true
     *** True Line Result
    @@ -137707,50 +143471,42 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def anka_inside_mainframe args~
    +** Processing line: ~  def final_message_ship_status_reviewed args~
     - Inside source: true
     *** True Line Result
    -  def anka_inside_mainframe args
    +  def final_message_ship_status_reviewed args
     ** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
         {
    -** Processing line: ~      player: [32, 4],~
    -- Inside source: true
    -*** True Line Result
    -      player: [32, 4],
    -** Processing line: ~      background: 'sprites/mainframe.png',~
    +** Processing line: ~      background: 'sprites/serenity.png',~
     - Inside source: true
     *** True Line Result
    -      background: 'sprites/mainframe.png',
    +      background: 'sprites/serenity.png',
     ** Processing line: ~      fade: 60,~
     - Inside source: true
     *** True Line Result
           fade: 60,
    -** Processing line: ~      storylines: [~
    -- Inside source: true
    -*** True Line Result
    -      storylines: [
    -** Processing line: ~        [22, 45, 17, 4, (anka_last_reply args)],~
    +** Processing line: ~      scenes: [~
     - Inside source: true
     *** True Line Result
    -        [22, 45, 17, 4, (anka_last_reply args)],
    -** Processing line: ~        [45, 45,  4, 4, (anka_current_reply args)],~
    +      scenes: [
    +** Processing line: ~        [*hotspot_bottom, :final_message_summary]~
     - Inside source: true
     *** True Line Result
    -        [45, 45,  4, 4, (anka_current_reply args)],
    +        [*hotspot_bottom, :final_message_summary]
     ** Processing line: ~      ],~
     - Inside source: true
     *** True Line Result
           ],
    -** Processing line: ~      scenes: [~
    +** Processing line: ~      storylines: [~
     - Inside source: true
     *** True Line Result
    -      scenes: [
    -** Processing line: ~        [*hotspot_top_right, :reply_to_anka]~
    +      storylines: [
    +** Processing line: ~        [0, 62, 62, 3, "Whew. Everyone-- is in their- chambers. The engines-- are roaring-- and Serenity-- is coming-- home."],~
     - Inside source: true
     *** True Line Result
    -        [*hotspot_top_right, :reply_to_anka]
    +        [0, 62, 62, 3, "Whew. Everyone-- is in their- chambers. The engines-- are roaring-- and Serenity-- is coming-- home."],
     ** Processing line: ~      ]~
     - Inside source: true
     *** True Line Result
    @@ -137767,194 +143523,150 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def reply_to_anka args~
    -- Inside source: true
    -*** True Line Result
    -  def reply_to_anka args
    -** Processing line: ~    decision_graph anka_current_reply(args),~
    -- Inside source: true
    -*** True Line Result
    -    decision_graph anka_current_reply(args),
    -** Processing line: ~                   "Matthew's-- wife is doing-- well. What's-- even-- better-- is that he's-- a dad, and he didn't-- even-- know it. Should- I- leave- out the part about-- the crew- being-- in hibernation-- for 20-- years? They- should- enter-- statis-- on a high- note... Right?",~
    -- Inside source: true
    -*** True Line Result
    -                   "Matthew's-- wife is doing-- well. What's-- even-- better-- is that he's-- a dad, and he didn't-- even-- know it. Should- I- leave- out the part about-- the crew- being-- in hibernation-- for 20-- years? They- should- enter-- statis-- on a high- note... Right?",
    -** Processing line: ~                   [:replied_with_whole_truth, "Whole-- Truth--", anka_reply_whole_truth],~
    -- Inside source: true
    -*** True Line Result
    -                   [:replied_with_whole_truth, "Whole-- Truth--", anka_reply_whole_truth],
    -** Processing line: ~                   [:replied_with_half_truth, "Half-- Truth--", anka_reply_half_truth]~
    -- Inside source: true
    -*** True Line Result
    -                   [:replied_with_half_truth, "Half-- Truth--", anka_reply_half_truth]
    -** Processing line: ~  end~
    -- Inside source: true
    -*** True Line Result
    -  end
    -** Processing line: ~~
    -- Inside source: true
    -*** True Line Result
    -
    -** Processing line: ~  def anka_last_reply args~
    -- Inside source: true
    -*** True Line Result
    -  def anka_last_reply args
    -** Processing line: ~    if args.state.scene_history.include? :replied_to_serenity_alive_firmly~
    -- Inside source: true
    -*** True Line Result
    -    if args.state.scene_history.include? :replied_to_serenity_alive_firmly
    -** Processing line: ~      return "Buffer--: #{serenity_alive_firm_reply.quote}"~
    -- Inside source: true
    -*** True Line Result
    -      return "Buffer--: #{serenity_alive_firm_reply.quote}"
    -** Processing line: ~    else~
    -- Inside source: true
    -*** True Line Result
    -    else
    -** Processing line: ~      return "Buffer--: #{serenity_alive_sugarcoated_reply.quote}"~
    +** Processing line: ~  def final_message_ship_status_shared args~
     - Inside source: true
     *** True Line Result
    -      return "Buffer--: #{serenity_alive_sugarcoated_reply.quote}"
    -** Processing line: ~    end~
    +  def final_message_ship_status_shared args
    +** Processing line: ~    [~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~  end~
    +    [
    +** Processing line: ~      *ship_control_hotspot( 0, 50,~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +      *ship_control_hotspot( 0, 50,
    +** Processing line: ~                             "Stasis-- Chambers--: Online, All chambers-- are powered. Battery--- Allocation---: 3--- of-- 3--.",~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def anka_reply_whole_truth~
    +                             "Stasis-- Chambers--: Online, All chambers-- are powered. Battery--- Allocation---: 3--- of-- 3--.",
    +** Processing line: ~                             "Matthew's--- Chamber--: OCCUPIED----",~
     - Inside source: true
     *** True Line Result
    -  def anka_reply_whole_truth
    -** Processing line: ~    "Matthew's wife is doing-- very-- well. In fact, she was pregnant. Matthew-- is a dad. He has a son. But, I need- all-- of-- you-- to brace-- yourselves. You've-- been in statis-- for 20 years. A lot has changed. Most of Earth's-- population--- didn't-- survive. Tell- Matthew-- that I'm-- sorry he didn't-- get to see- his- son grow- up."~
    +                             "Matthew's--- Chamber--: OCCUPIED----",
    +** Processing line: ~                             "Aanka's--- Chamber--: OCCUPIED----",~
     - Inside source: true
     *** True Line Result
    -    "Matthew's wife is doing-- very-- well. In fact, she was pregnant. Matthew-- is a dad. He has a son. But, I need- all-- of-- you-- to brace-- yourselves. You've-- been in statis-- for 20 years. A lot has changed. Most of Earth's-- population--- didn't-- survive. Tell- Matthew-- that I'm-- sorry he didn't-- get to see- his- son grow- up."
    -** Processing line: ~  end~
    +                             "Aanka's--- Chamber--: OCCUPIED----",
    +** Processing line: ~                             "Sasha's--- Chamber--: OCCUPIED----"),~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +                             "Sasha's--- Chamber--: OCCUPIED----"),
    +** Processing line: ~      *ship_control_hotspot(12, 35,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def anka_reply_half_truth~
    +      *ship_control_hotspot(12, 35,
    +** Processing line: ~                            "Life- Support--: Not-- Needed---",~
     - Inside source: true
     *** True Line Result
    -  def anka_reply_half_truth
    -** Processing line: ~    "Matthew's--- wife- is doing-- very-- well. In fact, she was pregnant. Matthew is a dad! It's a boy! Tell- Matthew-- congrats-- for me. Hope-- to see- all of you- soon."~
    +                            "Life- Support--: Not-- Needed---",
    +** Processing line: ~                            "O2--- Production---: OFF---",~
     - Inside source: true
     *** True Line Result
    -    "Matthew's--- wife- is doing-- very-- well. In fact, she was pregnant. Matthew is a dad! It's a boy! Tell- Matthew-- congrats-- for me. Hope-- to see- all of you- soon."
    -** Processing line: ~  end~
    +                            "O2--- Production---: OFF---",
    +** Processing line: ~                            "CO2--- Scrubbers---: OFF---",~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +                            "CO2--- Scrubbers---: OFF---",
    +** Processing line: ~                            "H2O--- Production---: OFF---"),~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def replied_with_whole_truth args~
    +                            "H2O--- Production---: OFF---"),
    +** Processing line: ~      *ship_control_hotspot(24, 20,~
     - Inside source: true
     *** True Line Result
    -  def replied_with_whole_truth args
    -** Processing line: ~    {~
    +      *ship_control_hotspot(24, 20,
    +** Processing line: ~                            "Navigation: Offline---",~
     - Inside source: true
     *** True Line Result
    -    {
    -** Processing line: ~      background: 'sprites/inside-observatory.png',~
    +                            "Navigation: Offline---",
    +** Processing line: ~                            "Sensor: OFF---",~
     - Inside source: true
     *** True Line Result
    -      background: 'sprites/inside-observatory.png',
    -** Processing line: ~      fade: 60,~
    +                            "Sensor: OFF---",
    +** Processing line: ~                            "Heads- Up- Display: DAMAGED---",~
     - Inside source: true
     *** True Line Result
    -      fade: 60,
    -** Processing line: ~      player: [32, 21],~
    +                            "Heads- Up- Display: DAMAGED---",
    +** Processing line: ~                            "Arithmetic--- Unit: DAMAGED----"),~
     - Inside source: true
     *** True Line Result
    -      player: [32, 21],
    -** Processing line: ~      scenes: [[60, 0, 4, 32, :replied_to_anka_back_home]],~
    +                            "Arithmetic--- Unit: DAMAGED----"),
    +** Processing line: ~      *ship_control_hotspot(36, 35,~
     - Inside source: true
     *** True Line Result
    -      scenes: [[60, 0, 4, 32, :replied_to_anka_back_home]],
    -** Processing line: ~      storylines: [~
    +      *ship_control_hotspot(36, 35,
    +** Processing line: ~                            "COMM: Underpowered----",~
     - Inside source: true
     *** True Line Result
    -      storylines: [
    -** Processing line: ~        [30, 18, 5, 12, "Buffer-- has been set to: #{anka_reply_whole_truth.quote}"],~
    +                            "COMM: Underpowered----",
    +** Processing line: ~                            "Text: ON---",~
     - Inside source: true
     *** True Line Result
    -        [30, 18, 5, 12, "Buffer-- has been set to: #{anka_reply_whole_truth.quote}"],
    -** Processing line: ~        [30, 10, 5, 4, "I- hope- I- did the right- thing- by laying-- it all- out- there."],~
    +                            "Text: ON---",
    +** Processing line: ~                            "Audio: SEGFAULT---",~
     - Inside source: true
     *** True Line Result
    -        [30, 10, 5, 4, "I- hope- I- did the right- thing- by laying-- it all- out- there."],
    -** Processing line: ~      ]~
    +                            "Audio: SEGFAULT---",
    +** Processing line: ~                            "Video: DAMAGED---"),~
     - Inside source: true
     *** True Line Result
    -      ]
    -** Processing line: ~    }~
    +                            "Video: DAMAGED---"),
    +** Processing line: ~      *ship_control_hotspot(48, 50,~
     - Inside source: true
     *** True Line Result
    -    }
    -** Processing line: ~  end~
    +      *ship_control_hotspot(48, 50,
    +** Processing line: ~                            "Engine: Online, Coordinates--- Set- for Earth. Battery--- Allocation---: 3--- of-- 3---",~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +                            "Engine: Online, Coordinates--- Set- for Earth. Battery--- Allocation---: 3--- of-- 3---",
    +** Processing line: ~                            "Engine I: ON---",~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def replied_with_half_truth args~
    +                            "Engine I: ON---",
    +** Processing line: ~                            "Engine II: ON---",~
     - Inside source: true
     *** True Line Result
    -  def replied_with_half_truth args
    -** Processing line: ~    {~
    +                            "Engine II: ON---",
    +** Processing line: ~                            "Engine III: ON---")~
     - Inside source: true
     *** True Line Result
    -    {
    -** Processing line: ~      background: 'sprites/inside-observatory.png',~
    +                            "Engine III: ON---")
    +** Processing line: ~    ]~
     - Inside source: true
     *** True Line Result
    -      background: 'sprites/inside-observatory.png',
    -** Processing line: ~      fade: 60,~
    +    ]
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -      fade: 60,
    -** Processing line: ~      player: [32, 21],~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      player: [32, 21],
    -** Processing line: ~      scenes: [[60, 0, 4, 32, :replied_to_anka_back_home]],~
    +
    +** Processing line: ~  def final_message_last_reply args~
     - Inside source: true
     *** True Line Result
    -      scenes: [[60, 0, 4, 32, :replied_to_anka_back_home]],
    -** Processing line: ~      storylines: [~
    +  def final_message_last_reply args
    +** Processing line: ~    if args.state.scene_history.include? :replied_with_whole_truth~
     - Inside source: true
     *** True Line Result
    -      storylines: [
    -** Processing line: ~        [30, 18, 5, 12, "Buffer-- has been set to: #{anka_reply_half_truth.quote}"],~
    +    if args.state.scene_history.include? :replied_with_whole_truth
    +** Processing line: ~      return "Buffer--: #{anka_reply_whole_truth.quote}"~
     - Inside source: true
     *** True Line Result
    -        [30, 18, 5, 12, "Buffer-- has been set to: #{anka_reply_half_truth.quote}"],
    -** Processing line: ~        [30, 10, 5, 4, "I- hope- I- did the right- thing- by not giving-- them- the whole- truth."],~
    +      return "Buffer--: #{anka_reply_whole_truth.quote}"
    +** Processing line: ~    else~
     - Inside source: true
     *** True Line Result
    -        [30, 10, 5, 4, "I- hope- I- did the right- thing- by not giving-- them- the whole- truth."],
    -** Processing line: ~      ]~
    +    else
    +** Processing line: ~      return "Buffer--: #{anka_reply_half_truth.quote}"~
     - Inside source: true
     *** True Line Result
    -      ]
    -** Processing line: ~    }~
    +      return "Buffer--: #{anka_reply_half_truth.quote}"
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    }
    +    end
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -137963,26 +143675,26 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def anka_current_reply args~
    +** Processing line: ~  def final_message_current args~
     - Inside source: true
     *** True Line Result
    -  def anka_current_reply args
    -** Processing line: ~    if args.state.scene_history.include? :replied_to_serenity_alive_firmly~
    +  def final_message_current args
    +** Processing line: ~    if args.state.scene_history.include? :replied_with_whole_truth~
     - Inside source: true
     *** True Line Result
    -    if args.state.scene_history.include? :replied_to_serenity_alive_firmly
    -** Processing line: ~      return "Hello. This is, Aanka. Sasha-- is still- trying-- to gather-- her wits about-- her, given- the gravity--- of your- last- reply. Thank- you- for being-- honest, and thank- you- for the help- with the ship- diagnostics. I was able-- to retrieve-- all of the navigation--- information---- after-- the battery--- swap. We- are ready-- to head back to Earth. Before-- we go- back- into-- statis, Matthew--- wanted-- to know- how his- wife- is doing. Please- reply-- as soon- as you can. He's-- not going-- to get- into-- the statis-- chamber-- until-- he knows- his wife is okay."~
    +    if args.state.scene_history.include? :replied_with_whole_truth
    +** Processing line: ~      return "Hey... It's-- me Sasha. Aanka-- is trying-- her best to comfort-- Matthew. This- is the first- time- I've-- ever-- seen-- Matthew-- cry. We'll-- probably-- be in stasis-- by the time you get this message--. Thank- you- again-- for all your help. I look forward-- to meeting-- you in person."~
     - Inside source: true
     *** True Line Result
    -      return "Hello. This is, Aanka. Sasha-- is still- trying-- to gather-- her wits about-- her, given- the gravity--- of your- last- reply. Thank- you- for being-- honest, and thank- you- for the help- with the ship- diagnostics. I was able-- to retrieve-- all of the navigation--- information---- after-- the battery--- swap. We- are ready-- to head back to Earth. Before-- we go- back- into-- statis, Matthew--- wanted-- to know- how his- wife- is doing. Please- reply-- as soon- as you can. He's-- not going-- to get- into-- the statis-- chamber-- until-- he knows- his wife is okay."
    +      return "Hey... It's-- me Sasha. Aanka-- is trying-- her best to comfort-- Matthew. This- is the first- time- I've-- ever-- seen-- Matthew-- cry. We'll-- probably-- be in stasis-- by the time you get this message--. Thank- you- again-- for all your help. I look forward-- to meeting-- you in person."
     ** Processing line: ~    else~
     - Inside source: true
     *** True Line Result
         else
    -** Processing line: ~      return "Hello. This is, Aanka. Thank- you for the help- with the ship's-- diagnostics. I was able-- to retrieve-- all of the navigation--- information--- after-- the battery-- swap. I- know-- that- you didn't-- tell- the whole truth- about-- how far we are from- Earth. Don't-- worry. I understand-- why you did it. We- are ready-- to head back to Earth. Before-- we go- back- into-- statis, Matthew--- wanted-- to know- how his- wife- is doing. Please- reply-- as soon- as you can. He's-- not going-- to get- into-- the statis-- chamber-- until-- he knows- his wife is okay."~
    +** Processing line: ~      return "Hey! It's-- me Sasha! LOL! Aanka-- and Matthew-- are dancing-- around-- like- goofballs--! They- are both- so adorable! Only-- this- tiny-- little-- genius-- can make-- a battle-- hardened-- general--- put- on a tiara-- and dance- around-- like a fairy-- princess-- XD------ Anyways, we are heading-- back into-- the chambers--. I hope our welcome-- home- parade-- has fireworks!"~
     - Inside source: true
     *** True Line Result
    -      return "Hello. This is, Aanka. Thank- you for the help- with the ship's-- diagnostics. I was able-- to retrieve-- all of the navigation--- information--- after-- the battery-- swap. I- know-- that- you didn't-- tell- the whole truth- about-- how far we are from- Earth. Don't-- worry. I understand-- why you did it. We- are ready-- to head back to Earth. Before-- we go- back- into-- statis, Matthew--- wanted-- to know- how his- wife- is doing. Please- reply-- as soon- as you can. He's-- not going-- to get- into-- the statis-- chamber-- until-- he knows- his wife is okay."
    +      return "Hey! It's-- me Sasha! LOL! Aanka-- and Matthew-- are dancing-- around-- like- goofballs--! They- are both- so adorable! Only-- this- tiny-- little-- genius-- can make-- a battle-- hardened-- general--- put- on a tiara-- and dance- around-- like a fairy-- princess-- XD------ Anyways, we are heading-- back into-- the chambers--. I hope our welcome-- home- parade-- has fireworks!"
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -137995,10 +143707,10 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def replied_to_anka_back_home args~
    +** Processing line: ~  def final_message_summary args~
     - Inside source: true
     *** True Line Result
    -  def replied_to_anka_back_home args
    +  def final_message_summary args
     ** Processing line: ~    if args.state.scene_history.include? :replied_with_whole_truth~
     - Inside source: true
     *** True Line Result
    @@ -138007,38 +143719,30 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
           return {
    +** Processing line: ~        background: 'sprites/inside-observatory.png',~
    +- Inside source: true
    +*** True Line Result
    +        background: 'sprites/inside-observatory.png',
     ** Processing line: ~        fade: 60,~
     - Inside source: true
     *** True Line Result
             fade: 60,
    -** Processing line: ~        background: 'sprites/inside-home.png',~
    +** Processing line: ~        player: [31, 11],~
     - Inside source: true
     *** True Line Result
    -        background: 'sprites/inside-home.png',
    -** Processing line: ~        player: [34, 4],~
    +        player: [31, 11],
    +** Processing line: ~        scenes: [[60, 0, 4, 32, :final_decision_side_of_home]],~
     - Inside source: true
     *** True Line Result
    -        player: [34, 4],
    +        scenes: [[60, 0, 4, 32, :final_decision_side_of_home]],
     ** Processing line: ~        storylines: [~
     - Inside source: true
     *** True Line Result
             storylines: [
    -** Processing line: ~          [34, 4, 4, 4, "I- hope-- this pit in my stomach-- is gone-- by tomorrow---."],~
    -- Inside source: true
    -*** True Line Result
    -          [34, 4, 4, 4, "I- hope-- this pit in my stomach-- is gone-- by tomorrow---."],
    -** Processing line: ~        ],~
    -- Inside source: true
    -*** True Line Result
    -        ],
    -** Processing line: ~        scenes: [~
    -- Inside source: true
    -*** True Line Result
    -        scenes: [
    -** Processing line: ~          [30, 38, 12, 13, :final_message_sad],~
    +** Processing line: ~          [30, 10, 5, 4, "I can't-- imagine-- what they are feeling-- right now. But at least- they- know everything---, and we can- concentrate-- on rebuilding--- this world-- right- off the bat. I can't-- wait to see the future-- they'll-- help- build."],~
     - Inside source: true
     *** True Line Result
    -          [30, 38, 12, 13, :final_message_sad],
    +          [30, 10, 5, 4, "I can't-- imagine-- what they are feeling-- right now. But at least- they- know everything---, and we can- concentrate-- on rebuilding--- this world-- right- off the bat. I can't-- wait to see the future-- they'll-- help- build."],
     ** Processing line: ~        ]~
     - Inside source: true
     *** True Line Result
    @@ -138055,38 +143759,30 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
           return {
    +** Processing line: ~        background: 'sprites/inside-observatory.png',~
    +- Inside source: true
    +*** True Line Result
    +        background: 'sprites/inside-observatory.png',
     ** Processing line: ~        fade: 60,~
     - Inside source: true
     *** True Line Result
             fade: 60,
    -** Processing line: ~        background: 'sprites/inside-home.png',~
    +** Processing line: ~        player: [31, 11],~
     - Inside source: true
     *** True Line Result
    -        background: 'sprites/inside-home.png',
    -** Processing line: ~        player: [34, 4],~
    +        player: [31, 11],
    +** Processing line: ~        scenes: [[60, 0, 4, 32, :final_decision_side_of_home]],~
     - Inside source: true
     *** True Line Result
    -        player: [34, 4],
    +        scenes: [[60, 0, 4, 32, :final_decision_side_of_home]],
     ** Processing line: ~        storylines: [~
     - Inside source: true
     *** True Line Result
             storylines: [
    -** Processing line: ~          [34, 4, 4, 4, "I- get the feeling-- I'm going-- to sleep real well tonight--."],~
    -- Inside source: true
    -*** True Line Result
    -          [34, 4, 4, 4, "I- get the feeling-- I'm going-- to sleep real well tonight--."],
    -** Processing line: ~        ],~
    -- Inside source: true
    -*** True Line Result
    -        ],
    -** Processing line: ~        scenes: [~
    -- Inside source: true
    -*** True Line Result
    -        scenes: [
    -** Processing line: ~          [30, 38, 12, 13, :final_message_happy],~
    +** Processing line: ~          [30, 10, 5, 4, "They all sounded-- so happy. I know- they'll-- be in for a tough- dose- of reality--- when they- arrive. But- at least- they'll-- be around-- all- of us. We'll-- help them- cope."],~
     - Inside source: true
     *** True Line Result
    -          [30, 38, 12, 13, :final_message_happy],
    +          [30, 10, 5, 4, "They all sounded-- so happy. I know- they'll-- be in for a tough- dose- of reality--- when they- arrive. But- at least- they'll-- be around-- all- of us. We'll-- help them- cope."],
     ** Processing line: ~        ]~
     - Inside source: true
     *** True Line Result
    @@ -138115,26 +143811,26 @@ Follows is a source code listing for all files that have been open sourced. This
     - End of paragraph detected.
     *** True Line Result
     
    -** Processing line: ~*** Rpg Narrative - Return Of Serenity - storyline_blinking_light.rb~
    +** Processing line: ~*** Rpg Narrative - Return Of Serenity - storyline_serenity_alive.rb~
     - Header detected.
     *** True Line Result
     
     *** True Line Result
    -*** Rpg Narrative - Return Of Serenity - storyline_blinking_light.rb
    +*** Rpg Narrative - Return Of Serenity - storyline_serenity_alive.rb
     ** Processing line: ~#+begin_src ruby~
     - Line was identified as the beginning of a code block.
     *** True Line Result
     
     *** True Line Result
     #+begin_src ruby
    -** Processing line: ~  # ./samples/99_genre_rpg_narrative/return_of_serenity/app/storyline_blinking_light.rb~
    +** Processing line: ~  # ./samples/99_genre_rpg_narrative/return_of_serenity/app/storyline_serenity_alive.rb~
     - Inside source: true
     *** True Line Result
    -  # ./samples/99_genre_rpg_narrative/return_of_serenity/app/storyline_blinking_light.rb
    -** Processing line: ~  def the_blinking_light args~
    +  # ./samples/99_genre_rpg_narrative/return_of_serenity/app/storyline_serenity_alive.rb
    +** Processing line: ~  def serenity_alive_side_of_home args~
     - Inside source: true
     *** True Line Result
    -  def the_blinking_light args
    +  def serenity_alive_side_of_home args
     ** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
    @@ -138155,10 +143851,10 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
           scenes: [
    -** Processing line: ~        [52, 24, 11, 5, :blinking_light_mountain_pass],~
    +** Processing line: ~        [52, 24, 11, 5, :serenity_alive_mountain_pass],~
     - Inside source: true
     *** True Line Result
    -        [52, 24, 11, 5, :blinking_light_mountain_pass],
    +        [52, 24, 11, 5, :serenity_alive_mountain_pass],
     ** Processing line: ~      ],~
     - Inside source: true
     *** True Line Result
    @@ -138179,10 +143875,10 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def blinking_light_mountain_pass args~
    +** Processing line: ~  def serenity_alive_mountain_pass args~
     - Inside source: true
     *** True Line Result
    -  def blinking_light_mountain_pass args
    +  def serenity_alive_mountain_pass args
     ** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
    @@ -138199,10 +143895,22 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
           scenes: [
    -** Processing line: ~        [18, 47, 5, 5, :blinking_light_path_to_observatory]~
    +** Processing line: ~        [18, 47, 5, 5, :serenity_alive_path_to_observatory],~
     - Inside source: true
     *** True Line Result
    -        [18, 47, 5, 5, :blinking_light_path_to_observatory]
    +        [18, 47, 5, 5, :serenity_alive_path_to_observatory],
    +** Processing line: ~      ],~
    +- Inside source: true
    +*** True Line Result
    +      ],
    +** Processing line: ~      storylines: [~
    +- Inside source: true
    +*** True Line Result
    +      storylines: [
    +** Processing line: ~        [18, 13, 5, 5, "Hnnnnnnnggg. My legs-- are still sore- from yesterday."]~
    +- Inside source: true
    +*** True Line Result
    +        [18, 13, 5, 5, "Hnnnnnnnggg. My legs-- are still sore- from yesterday."]
     ** Processing line: ~      ],~
     - Inside source: true
     *** True Line Result
    @@ -138223,10 +143931,10 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def blinking_light_path_to_observatory args~
    +** Processing line: ~  def serenity_alive_path_to_observatory args~
     - Inside source: true
     *** True Line Result
    -  def blinking_light_path_to_observatory args
    +  def serenity_alive_path_to_observatory args
     ** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
    @@ -138243,10 +143951,22 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
           scenes: [
    -** Processing line: ~        [0, 26, 5, 5, :blinking_light_observatory]~
    +** Processing line: ~        [0, 26, 5, 5, :serenity_alive_observatory]~
     - Inside source: true
     *** True Line Result
    -        [0, 26, 5, 5, :blinking_light_observatory]
    +        [0, 26, 5, 5, :serenity_alive_observatory]
    +** Processing line: ~      ],~
    +- Inside source: true
    +*** True Line Result
    +      ],
    +** Processing line: ~      storylines: [~
    +- Inside source: true
    +*** True Line Result
    +      storylines: [
    +** Processing line: ~        [22, 20, 10, 10, "This spot--, on the mountain, right here, it's-- perfect. This- is where- I'll-- yeet-- the person-- who is playing-- this- prank- on me."]~
    +- Inside source: true
    +*** True Line Result
    +        [22, 20, 10, 10, "This spot--, on the mountain, right here, it's-- perfect. This- is where- I'll-- yeet-- the person-- who is playing-- this- prank- on me."]
     ** Processing line: ~      ],~
     - Inside source: true
     *** True Line Result
    @@ -138267,10 +143987,10 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def blinking_light_observatory args~
    +** Processing line: ~  def serenity_alive_observatory args~
     - Inside source: true
     *** True Line Result
    -  def blinking_light_observatory args
    +  def serenity_alive_observatory args
     ** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
    @@ -138287,10 +144007,10 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
           scenes: [
    -** Processing line: ~        [28, 39, 4, 10, :blinking_light_inside_observatory]~
    +** Processing line: ~        [28, 39, 4, 10, :serenity_alive_inside_observatory]~
     - Inside source: true
     *** True Line Result
    -        [28, 39, 4, 10, :blinking_light_inside_observatory]
    +        [28, 39, 4, 10, :serenity_alive_inside_observatory]
     ** Processing line: ~      ],~
     - Inside source: true
     *** True Line Result
    @@ -138311,10 +144031,10 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def blinking_light_inside_observatory args~
    +** Processing line: ~  def serenity_alive_inside_observatory args~
     - Inside source: true
     *** True Line Result
    -  def blinking_light_inside_observatory args
    +  def serenity_alive_inside_observatory args
     ** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
    @@ -138327,26 +144047,18 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
           player: [60, 2],
    -** Processing line: ~      storylines: [~
    -- Inside source: true
    -*** True Line Result
    -      storylines: [
    -** Processing line: ~        [50, 2, 4, 8,   "That's weird. I thought- this- mainframe-- was broken--."]~
    -- Inside source: true
    -*** True Line Result
    -        [50, 2, 4, 8,   "That's weird. I thought- this- mainframe-- was broken--."]
    -** Processing line: ~      ],~
    +** Processing line: ~      storylines: [],~
     - Inside source: true
     *** True Line Result
    -      ],
    +      storylines: [],
     ** Processing line: ~      scenes: [~
     - Inside source: true
     *** True Line Result
           scenes: [
    -** Processing line: ~        [30, 18, 5, 12, :blinking_light_inside_mainframe]~
    +** Processing line: ~        [30, 18, 5, 12, :serenity_alive_inside_mainframe]~
     - Inside source: true
     *** True Line Result
    -        [30, 18, 5, 12, :blinking_light_inside_mainframe]
    +        [30, 18, 5, 12, :serenity_alive_inside_mainframe]
     ** Processing line: ~      ],~
     - Inside source: true
     *** True Line Result
    @@ -138367,10 +144079,10 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def blinking_light_inside_mainframe args~
    +** Processing line: ~  def serenity_alive_inside_mainframe args~
     - Inside source: true
     *** True Line Result
    -  def blinking_light_inside_mainframe args
    +  def serenity_alive_inside_mainframe args
     ** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
    @@ -138391,10 +144103,10 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
           scenes: [
    -** Processing line: ~        [62, 32, 4, 32, :reply_to_introduction]~
    +** Processing line: ~        [*hotspot_top, :serenity_alive_ship_status],~
     - Inside source: true
     *** True Line Result
    -        [62, 32, 4, 32, :reply_to_introduction]
    +        [*hotspot_top, :serenity_alive_ship_status],
     ** Processing line: ~      ],~
     - Inside source: true
     *** True Line Result
    @@ -138403,22 +144115,14 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
           storylines: [
    -** Processing line: ~        [43, 43,  8, 8, "\"Mission-- control--, your- main- comm-- channels-- seem-- to be down. My apologies-- for- using-- this low- level-- exploit--. What's-- going-- on down there? We are ready-- for reentry--.\" Message--- Timestamp---: 4- hours-- 23--- minutes-- ago--."],~
    -- Inside source: true
    -*** True Line Result
    -        [43, 43,  8, 8, "\"Mission-- control--, your- main- comm-- channels-- seem-- to be down. My apologies-- for- using-- this low- level-- exploit--. What's-- going-- on down there? We are ready-- for reentry--.\" Message--- Timestamp---: 4- hours-- 23--- minutes-- ago--."],
    -** Processing line: ~        [30, 30,  4, 4, "There's-- a low- level-- message-- here... NANI.T.F?"],~
    -- Inside source: true
    -*** True Line Result
    -        [30, 30,  4, 4, "There's-- a low- level-- message-- here... NANI.T.F?"],
    -** Processing line: ~        [14, 10, 24, 4, "Oh interesting---. This transistor--- needed-- to be activated--- for the- mainframe-- to work."],~
    +** Processing line: ~        [22, 45, 17, 4, (serenity_alive_last_reply args)],~
     - Inside source: true
     *** True Line Result
    -        [14, 10, 24, 4, "Oh interesting---. This transistor--- needed-- to be activated--- for the- mainframe-- to work."],
    -** Processing line: ~        [14, 20, 24, 4, "What the heck activated--- this thing- though?"]~
    +        [22, 45, 17, 4, (serenity_alive_last_reply args)],
    +** Processing line: ~        [45, 45,  4, 4, (serenity_alive_current_message args)],~
     - Inside source: true
     *** True Line Result
    -        [14, 20, 24, 4, "What the heck activated--- this thing- though?"]
    +        [45, 45,  4, 4, (serenity_alive_current_message args)],
     ** Processing line: ~      ]~
     - Inside source: true
     *** True Line Result
    @@ -138435,54 +144139,34 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~#+end_src~
    -- Line was identified as the end of a code block.
    -*** True Line Result
    -#+end_src
    -** Processing line: ~~
    -- End of paragraph detected.
    -*** True Line Result
    -
    -** Processing line: ~*** Rpg Narrative - Return Of Serenity - storyline_day_one.rb~
    -- Header detected.
    -*** True Line Result
    -
    -*** True Line Result
    -*** Rpg Narrative - Return Of Serenity - storyline_day_one.rb
    -** Processing line: ~#+begin_src ruby~
    -- Line was identified as the beginning of a code block.
    -*** True Line Result
    -
    -*** True Line Result
    -#+begin_src ruby
    -** Processing line: ~  # ./samples/99_genre_rpg_narrative/return_of_serenity/app/storyline_day_one.rb~
    -- Inside source: true
    -*** True Line Result
    -  # ./samples/99_genre_rpg_narrative/return_of_serenity/app/storyline_day_one.rb
    -** Processing line: ~  def day_one_beginning args~
    +** Processing line: ~  def serenity_alive_ship_status args~
     - Inside source: true
     *** True Line Result
    -  def day_one_beginning args
    +  def serenity_alive_ship_status args
     ** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
         {
    -** Processing line: ~      background: 'sprites/side-of-home.png',~
    +** Processing line: ~      background: 'sprites/serenity.png',~
     - Inside source: true
     *** True Line Result
    -      background: 'sprites/side-of-home.png',
    -** Processing line: ~      player: [16, 13],~
    +      background: 'sprites/serenity.png',
    +** Processing line: ~      fade: 60,~
     - Inside source: true
     *** True Line Result
    -      player: [16, 13],
    +      fade: 60,
    +** Processing line: ~      player: [30, 10],~
    +- Inside source: true
    +*** True Line Result
    +      player: [30, 10],
     ** Processing line: ~      scenes: [~
     - Inside source: true
     *** True Line Result
           scenes: [
    -** Processing line: ~        [0, 0, 64, 2, :day_one_infront_of_home],~
    +** Processing line: ~        [30, 50, 4, 4, :serenity_alive_ship_status_reviewed]~
     - Inside source: true
     *** True Line Result
    -        [0, 0, 64, 2, :day_one_infront_of_home],
    +        [30, 50, 4, 4, :serenity_alive_ship_status_reviewed]
     ** Processing line: ~      ],~
     - Inside source: true
     *** True Line Result
    @@ -138491,10 +144175,18 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
           storylines: [
    -** Processing line: ~        [35, 10, 6, 6,  "Man. Hard to believe- that today- is the 20th--- anniversary-- of The Impact."]~
    +** Processing line: ~        [30,  8, 4, 4, "Serenity? THE--- Mission-- Serenity?! How is that possible? They- are supposed-- to be dead."],~
     - Inside source: true
     *** True Line Result
    -        [35, 10, 6, 6,  "Man. Hard to believe- that today- is the 20th--- anniversary-- of The Impact."]
    +        [30,  8, 4, 4, "Serenity? THE--- Mission-- Serenity?! How is that possible? They- are supposed-- to be dead."],
    +** Processing line: ~        [30, 10, 4, 4, "I... can't-- believe-- it. I- can access-- Serenity's-- computer? I- guess my \"superpower----\" isn't limited-- by proximity-- to- a machine--."],~
    +- Inside source: true
    +*** True Line Result
    +        [30, 10, 4, 4, "I... can't-- believe-- it. I- can access-- Serenity's-- computer? I- guess my \"superpower----\" isn't limited-- by proximity-- to- a machine--."],
    +** Processing line: ~        *serenity_alive_shared_ship_status(args)~
    +- Inside source: true
    +*** True Line Result
    +        *serenity_alive_shared_ship_status(args)
     ** Processing line: ~      ]~
     - Inside source: true
     *** True Line Result
    @@ -138511,38 +144203,30 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def day_one_infront_of_home args~
    +** Processing line: ~  def serenity_alive_ship_status_reviewed args~
     - Inside source: true
     *** True Line Result
    -  def day_one_infront_of_home args
    +  def serenity_alive_ship_status_reviewed args
     ** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
         {
    -** Processing line: ~      background: 'sprites/front-of-home.png',~
    +** Processing line: ~      background: 'sprites/serenity.png',~
     - Inside source: true
     *** True Line Result
    -      background: 'sprites/front-of-home.png',
    -** Processing line: ~      player: [56, 23],~
    +      background: 'sprites/serenity.png',
    +** Processing line: ~      fade: 60,~
     - Inside source: true
     *** True Line Result
    -      player: [56, 23],
    +      fade: 60,
     ** Processing line: ~      scenes: [~
     - Inside source: true
     *** True Line Result
           scenes: [
    -** Processing line: ~        [43, 34, 10, 16, :day_one_home],~
    -- Inside source: true
    -*** True Line Result
    -        [43, 34, 10, 16, :day_one_home],
    -** Processing line: ~        [62, 0,  3, 40, :day_one_beginning],~
    -- Inside source: true
    -*** True Line Result
    -        [62, 0,  3, 40, :day_one_beginning],
    -** Processing line: ~        [0, 4, 3, 20, :day_one_ceremony]~
    +** Processing line: ~        [*hotspot_bottom, :serenity_alive_time_to_reply]~
     - Inside source: true
     *** True Line Result
    -        [0, 4, 3, 20, :day_one_ceremony]
    +        [*hotspot_bottom, :serenity_alive_time_to_reply]
     ** Processing line: ~      ],~
     - Inside source: true
     *** True Line Result
    @@ -138551,10 +144235,10 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
           storylines: [
    -** Processing line: ~        [40, 20, 4, 4, "It looks like everyone- is already- at the rememberance-- ceremony."],~
    +** Processing line: ~        [0, 62, 62, 3, "Okay. Reviewing-- everything--, it looks- like- I- can- take- the batteries--- from the Stasis--- Chambers--- and- Engine--- to keep- the crew-- alive-- and-- their-- location--- pinpointed---."],~
     - Inside source: true
     *** True Line Result
    -        [40, 20, 4, 4, "It looks like everyone- is already- at the rememberance-- ceremony."],
    +        [0, 62, 62, 3, "Okay. Reviewing-- everything--, it looks- like- I- can- take- the batteries--- from the Stasis--- Chambers--- and- Engine--- to keep- the crew-- alive-- and-- their-- location--- pinpointed---."],
     ** Processing line: ~      ]~
     - Inside source: true
     *** True Line Result
    @@ -138571,138 +144255,146 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def day_one_home args~
    +** Processing line: ~  def serenity_alive_time_to_reply args~
     - Inside source: true
     *** True Line Result
    -  def day_one_home args
    -** Processing line: ~    {~
    +  def serenity_alive_time_to_reply args
    +** Processing line: ~    decision_graph serenity_alive_current_message(args),~
     - Inside source: true
     *** True Line Result
    -    {
    -** Processing line: ~      background: 'sprites/inside-home.png',~
    +    decision_graph serenity_alive_current_message(args),
    +** Processing line: ~                    "Okay... time to deliver the bad news...",~
     - Inside source: true
     *** True Line Result
    -      background: 'sprites/inside-home.png',
    -** Processing line: ~      player: [34, 3],~
    +                    "Okay... time to deliver the bad news...",
    +** Processing line: ~                    [:replied_to_serenity_alive_firmly, "Firm-- Reply", serenity_alive_firm_reply],~
     - Inside source: true
     *** True Line Result
    -      player: [34, 3],
    -** Processing line: ~      scenes: [~
    +                    [:replied_to_serenity_alive_firmly, "Firm-- Reply", serenity_alive_firm_reply],
    +** Processing line: ~                    [:replied_to_serenity_alive_kindly, "Sugar-- Coated---- Reply", serenity_alive_sugarcoated_reply]~
     - Inside source: true
     *** True Line Result
    -      scenes: [
    -** Processing line: ~        [28, 0, 12, 2, :day_one_infront_of_home]~
    +                    [:replied_to_serenity_alive_kindly, "Sugar-- Coated---- Reply", serenity_alive_sugarcoated_reply]
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -        [28, 0, 12, 2, :day_one_infront_of_home]
    -** Processing line: ~      ],~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      ],
    -** Processing line: ~      storylines: [~
    +
    +** Processing line: ~  def serenity_alive_shared_ship_status args~
     - Inside source: true
     *** True Line Result
    -      storylines: [
    -** Processing line: ~        [~
    +  def serenity_alive_shared_ship_status args
    +** Processing line: ~    [~
     - Inside source: true
     *** True Line Result
    -        [
    -** Processing line: ~          38, 4, 4, 4, "My mansion- in all its glory! Okay yea, it's just a shipping- container-. Apparently-, it's nothing- like the luxuries- of the 2040's. But it's- all we have- in- this day and age. And it'll suffice."~
    +    [
    +** Processing line: ~      *ship_control_hotspot( 0, 50,~
     - Inside source: true
     *** True Line Result
    -          38, 4, 4, 4, "My mansion- in all its glory! Okay yea, it's just a shipping- container-. Apparently-, it's nothing- like the luxuries- of the 2040's. But it's- all we have- in- this day and age. And it'll suffice."
    -** Processing line: ~        ],~
    +      *ship_control_hotspot( 0, 50,
    +** Processing line: ~                             "Stasis-- Chambers--: Online, All chambers-- are powered. Battery--- Allocation---: 3--- of-- 3--, Hmmm. They don't-- need this to be powered-- right- now. Everyone-- is awake.",~
     - Inside source: true
     *** True Line Result
    -        ],
    -** Processing line: ~        [~
    +                             "Stasis-- Chambers--: Online, All chambers-- are powered. Battery--- Allocation---: 3--- of-- 3--, Hmmm. They don't-- need this to be powered-- right- now. Everyone-- is awake.",
    +** Processing line: ~                             nil,~
     - Inside source: true
     *** True Line Result
    -        [
    -** Processing line: ~          28, 7, 4, 7,~
    +                             nil,
    +** Processing line: ~                             nil,~
     - Inside source: true
     *** True Line Result
    -          28, 7, 4, 7,
    -** Processing line: ~          "Ahhh. My reading- couch. It's so comfortable--."~
    +                             nil,
    +** Processing line: ~                             nil),~
     - Inside source: true
     *** True Line Result
    -          "Ahhh. My reading- couch. It's so comfortable--."
    -** Processing line: ~        ],~
    +                             nil),
    +** Processing line: ~      *ship_control_hotspot(12, 35,~
     - Inside source: true
     *** True Line Result
    -        ],
    -** Processing line: ~        [~
    +      *ship_control_hotspot(12, 35,
    +** Processing line: ~                            "Life- Support--: Offline, Unable--- to- Sustain-- Life. Battery--- Allocation---: 0--- of-- 3---, Okay. That is definitely---- not a good thing.",~
     - Inside source: true
     *** True Line Result
    -        [
    -** Processing line: ~          38, 21, 4, 4,~
    +                            "Life- Support--: Offline, Unable--- to- Sustain-- Life. Battery--- Allocation---: 0--- of-- 3---, Okay. That is definitely---- not a good thing.",
    +** Processing line: ~                            nil,~
     - Inside source: true
     *** True Line Result
    -          38, 21, 4, 4,
    -** Processing line: ~          "I'm- lucky- to have a computer--. I'm- one of the few people- with- the skills to put this- thing to good use."~
    +                            nil,
    +** Processing line: ~                            nil,~
     - Inside source: true
     *** True Line Result
    -          "I'm- lucky- to have a computer--. I'm- one of the few people- with- the skills to put this- thing to good use."
    -** Processing line: ~        ],~
    +                            nil,
    +** Processing line: ~                            nil),~
     - Inside source: true
     *** True Line Result
    -        ],
    -** Processing line: ~        [~
    +                            nil),
    +** Processing line: ~      *ship_control_hotspot(24, 20,~
     - Inside source: true
     *** True Line Result
    -        [
    -** Processing line: ~          45, 37, 4, 8,~
    +      *ship_control_hotspot(24, 20,
    +** Processing line: ~                            "Navigation: Offline, Unable--- to- Calculate--- Location. Battery--- Allocation---: 0--- of-- 3---, Whelp. No wonder-- Sasha-- can't-- get- any-- readings. Their- Navigation--- is completely--- offline.",~
     - Inside source: true
     *** True Line Result
    -          45, 37, 4, 8,
    -** Processing line: ~          "This corner- of my home- is always- warmer-. It's cause of the ref~lected-- light- from the solar-- panels--, just on the other- side- of this wall. It's hard- to believe- there was o~nce-- an unlimited- amount- of electricity--."~
    +                            "Navigation: Offline, Unable--- to- Calculate--- Location. Battery--- Allocation---: 0--- of-- 3---, Whelp. No wonder-- Sasha-- can't-- get- any-- readings. Their- Navigation--- is completely--- offline.",
    +** Processing line: ~                            nil,~
     - Inside source: true
     *** True Line Result
    -          "This corner- of my home- is always- warmer-. It's cause of the ref~lected-- light- from the solar-- panels--, just on the other- side- of this wall. It's hard- to believe- there was o~nce-- an unlimited- amount- of electricity--."
    -** Processing line: ~        ],~
    +                            nil,
    +** Processing line: ~                            nil,~
     - Inside source: true
     *** True Line Result
    -        ],
    -** Processing line: ~        [~
    +                            nil,
    +** Processing line: ~                            nil),~
     - Inside source: true
     *** True Line Result
    -        [
    -** Processing line: ~          32, 40, 8, 10,~
    +                            nil),
    +** Processing line: ~      *ship_control_hotspot(36, 35,~
     - Inside source: true
     *** True Line Result
    -          32, 40, 8, 10,
    -** Processing line: ~          "This isn't- a good time- to sleep. I- should probably- head to the ceremony-."~
    +      *ship_control_hotspot(36, 35,
    +** Processing line: ~                            "COMM: Underpowered----, Limited--- to- Text-- Based-- COMM. Battery--- Allocation---: 1--- of-- 3---, It's-- lucky- that- their- COMM---- system was able to survive-- twenty-- years--. Just- barely-- it seems.",~
     - Inside source: true
     *** True Line Result
    -          "This isn't- a good time- to sleep. I- should probably- head to the ceremony-."
    -** Processing line: ~        ],~
    +                            "COMM: Underpowered----, Limited--- to- Text-- Based-- COMM. Battery--- Allocation---: 1--- of-- 3---, It's-- lucky- that- their- COMM---- system was able to survive-- twenty-- years--. Just- barely-- it seems.",
    +** Processing line: ~                            nil,~
     - Inside source: true
     *** True Line Result
    -        ],
    -** Processing line: ~        [~
    +                            nil,
    +** Processing line: ~                            nil,~
     - Inside source: true
     *** True Line Result
    -        [
    -** Processing line: ~          25, 21, 5, 12,~
    +                            nil,
    +** Processing line: ~                            nil),~
     - Inside source: true
     *** True Line Result
    -          25, 21, 5, 12,
    -** Processing line: ~          "Fifteen-- years- of computer-- science-- notes, neatly-- organized. Compiler--- Theory--, Linear--- Algebra---, Game-- Development---... Every-- subject-- imaginable--."~
    +                            nil),
    +** Processing line: ~      *ship_control_hotspot(48, 50,~
     - Inside source: true
     *** True Line Result
    -          "Fifteen-- years- of computer-- science-- notes, neatly-- organized. Compiler--- Theory--, Linear--- Algebra---, Game-- Development---... Every-- subject-- imaginable--."
    -** Processing line: ~        ]~
    +      *ship_control_hotspot(48, 50,
    +** Processing line: ~                            "Engine: Online, Full- Control-- Available. Battery--- Allocation---: 3--- of-- 3---, Hmmm. No point of having an engine-- online--, if you don't- know- where you're-- going.",~
     - Inside source: true
     *** True Line Result
    -        ]
    -** Processing line: ~      ]~
    +                            "Engine: Online, Full- Control-- Available. Battery--- Allocation---: 3--- of-- 3---, Hmmm. No point of having an engine-- online--, if you don't- know- where you're-- going.",
    +** Processing line: ~                            nil,~
     - Inside source: true
     *** True Line Result
    -      ]
    -** Processing line: ~    }~
    +                            nil,
    +** Processing line: ~                            nil,~
     - Inside source: true
     *** True Line Result
    -    }
    +                            nil,
    +** Processing line: ~                            nil)~
    +- Inside source: true
    +*** True Line Result
    +                            nil)
    +** Processing line: ~    ]~
    +- Inside source: true
    +*** True Line Result
    +    ]
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -138711,34 +144403,66 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def day_one_ceremony args~
    +** Processing line: ~  def serenity_alive_firm_reply~
     - Inside source: true
     *** True Line Result
    -  def day_one_ceremony args
    +  def serenity_alive_firm_reply
    +** Processing line: ~    "Serenity, you are at a distance-- farther-- than- Neptune. All- of the ship's-- systems-- are failing. Please- move the batteries---- from- the Stasis-- Chambers-- over- to- Life-- Support--. I also-- need- you to move-- the batteries---- from- the Engines--- to your Navigation---- System."~
    +- Inside source: true
    +*** True Line Result
    +    "Serenity, you are at a distance-- farther-- than- Neptune. All- of the ship's-- systems-- are failing. Please- move the batteries---- from- the Stasis-- Chambers-- over- to- Life-- Support--. I also-- need- you to move-- the batteries---- from- the Engines--- to your Navigation---- System."
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~  def serenity_alive_sugarcoated_reply~
    +- Inside source: true
    +*** True Line Result
    +  def serenity_alive_sugarcoated_reply
    +** Processing line: ~    "So... you- are- a teeny--- tiny--- bit--- farther-- from Earth- than you think. And you have a teeny--- tiny--- problem-- with your ship. Please-- move the batteries--- from the Stasis--- Chambers--- over to Life--- Support---. I also need you to move the batteries--- from the Engines--- to your- Navigation--- System. Don't-- worry-- Sasha. I'll-- get y'all-- home."~
    +- Inside source: true
    +*** True Line Result
    +    "So... you- are- a teeny--- tiny--- bit--- farther-- from Earth- than you think. And you have a teeny--- tiny--- problem-- with your ship. Please-- move the batteries--- from the Stasis--- Chambers--- over to Life--- Support---. I also need you to move the batteries--- from the Engines--- to your- Navigation--- System. Don't-- worry-- Sasha. I'll-- get y'all-- home."
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~  def replied_to_serenity_alive_firmly args~
    +- Inside source: true
    +*** True Line Result
    +  def replied_to_serenity_alive_firmly args
     ** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
         {
    -** Processing line: ~      background: 'sprites/tribute.png',~
    +** Processing line: ~      background: 'sprites/inside-observatory.png',~
     - Inside source: true
     *** True Line Result
    -      background: 'sprites/tribute.png',
    -** Processing line: ~      player: [57, 21],~
    +      background: 'sprites/inside-observatory.png',
    +** Processing line: ~      fade: 60,~
     - Inside source: true
     *** True Line Result
    -      player: [57, 21],
    -** Processing line: ~      scenes: [~
    +      fade: 60,
    +** Processing line: ~      player: [32, 21],~
     - Inside source: true
     *** True Line Result
    -      scenes: [
    -** Processing line: ~        [62, 0, 2, 40, :day_one_infront_of_home],~
    +      player: [32, 21],
    +** Processing line: ~      scenes: [~
     - Inside source: true
     *** True Line Result
    -        [62, 0, 2, 40, :day_one_infront_of_home],
    -** Processing line: ~        [0, 24, 2, 40, :day_one_infront_of_library]~
    +      scenes: [
    +** Processing line: ~        [*hotspot_bottom_right, :serenity_alive_path_from_observatory]~
     - Inside source: true
     *** True Line Result
    -        [0, 24, 2, 40, :day_one_infront_of_library]
    +        [*hotspot_bottom_right, :serenity_alive_path_from_observatory]
     ** Processing line: ~      ],~
     - Inside source: true
     *** True Line Result
    @@ -138747,22 +144471,14 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
           storylines: [
    -** Processing line: ~        [53, 12, 3,  8,  "It's- been twenty- years since The Impact. Twenty- years, since Halley's-- Comet-- set Earth's- blue- sky on fire."],~
    -- Inside source: true
    -*** True Line Result
    -        [53, 12, 3,  8,  "It's- been twenty- years since The Impact. Twenty- years, since Halley's-- Comet-- set Earth's- blue- sky on fire."],
    -** Processing line: ~        [45, 12, 3,  8,  "The space mission- sent to prevent- Earth's- total- destruction--, was a success. Only- 99.9%------ of the world's- population-- died-- that day. Hey, it's- better-- than 100%---- of humanity-- dying."],~
    -- Inside source: true
    -*** True Line Result
    -        [45, 12, 3,  8,  "The space mission- sent to prevent- Earth's- total- destruction--, was a success. Only- 99.9%------ of the world's- population-- died-- that day. Hey, it's- better-- than 100%---- of humanity-- dying."],
    -** Processing line: ~        [20, 12, 23, 4, "The monument--- reads:---- Here- stands- the tribute-- to Space- Mission-- Serenity--- and- its- crew. You- have- given-- humanity--- a second-- chance."],~
    +** Processing line: ~        [30, 18, 5, 12, "Buffer-- has been set to: #{serenity_alive_firm_reply.quote}"],~
     - Inside source: true
     *** True Line Result
    -        [20, 12, 23, 4, "The monument--- reads:---- Here- stands- the tribute-- to Space- Mission-- Serenity--- and- its- crew. You- have- given-- humanity--- a second-- chance."],
    -** Processing line: ~        [15, 12, 3,  8, "Rest- in- peace--- Matthew----, Sasha----, Aanka----"],~
    +        [30, 18, 5, 12, "Buffer-- has been set to: #{serenity_alive_firm_reply.quote}"],
    +** Processing line: ~        *serenity_alive_reply_completed_shared_hotspots(args),~
     - Inside source: true
     *** True Line Result
    -        [15, 12, 3,  8, "Rest- in- peace--- Matthew----, Sasha----, Aanka----"],
    +        *serenity_alive_reply_completed_shared_hotspots(args),
     ** Processing line: ~      ]~
     - Inside source: true
     *** True Line Result
    @@ -138779,34 +144495,34 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def day_one_infront_of_library args~
    +** Processing line: ~  def replied_to_serenity_alive_kindly args~
     - Inside source: true
     *** True Line Result
    -  def day_one_infront_of_library args
    +  def replied_to_serenity_alive_kindly args
     ** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
         {
    -** Processing line: ~      background: 'sprites/outside-library.png',~
    +** Processing line: ~      background: 'sprites/inside-observatory.png',~
     - Inside source: true
     *** True Line Result
    -      background: 'sprites/outside-library.png',
    -** Processing line: ~      player: [57, 21],~
    +      background: 'sprites/inside-observatory.png',
    +** Processing line: ~      fade: 60,~
     - Inside source: true
     *** True Line Result
    -      player: [57, 21],
    -** Processing line: ~      scenes: [~
    +      fade: 60,
    +** Processing line: ~      player: [32, 21],~
     - Inside source: true
     *** True Line Result
    -      scenes: [
    -** Processing line: ~        [62, 0, 2, 40, :day_one_ceremony],~
    +      player: [32, 21],
    +** Processing line: ~      scenes: [~
     - Inside source: true
     *** True Line Result
    -        [62, 0, 2, 40, :day_one_ceremony],
    -** Processing line: ~        [49, 39, 6, 9, :day_one_library]~
    +      scenes: [
    +** Processing line: ~        [*hotspot_bottom_right, :serenity_alive_path_from_observatory]~
     - Inside source: true
     *** True Line Result
    -        [49, 39, 6, 9, :day_one_library]
    +        [*hotspot_bottom_right, :serenity_alive_path_from_observatory]
     ** Processing line: ~      ],~
     - Inside source: true
     *** True Line Result
    @@ -138815,10 +144531,14 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
           storylines: [
    -** Processing line: ~        [50, 20, 4, 8,  "Shipping- containers-- as far- as the eye- can see. It's- rather- beautiful-- if you ask me. Even- though-- this- view- represents-- all- that's-- left- of humanity-."]~
    +** Processing line: ~        [30, 18, 5, 12, "Buffer-- has been set to: #{serenity_alive_sugarcoated_reply.quote}"],~
     - Inside source: true
     *** True Line Result
    -        [50, 20, 4, 8,  "Shipping- containers-- as far- as the eye- can see. It's- rather- beautiful-- if you ask me. Even- though-- this- view- represents-- all- that's-- left- of humanity-."]
    +        [30, 18, 5, 12, "Buffer-- has been set to: #{serenity_alive_sugarcoated_reply.quote}"],
    +** Processing line: ~        *serenity_alive_reply_completed_shared_hotspots(args),~
    +- Inside source: true
    +*** True Line Result
    +        *serenity_alive_reply_completed_shared_hotspots(args),
     ** Processing line: ~      ]~
     - Inside source: true
     *** True Line Result
    @@ -138835,30 +144555,34 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def day_one_library args~
    +** Processing line: ~  def serenity_alive_path_from_observatory args~
     - Inside source: true
     *** True Line Result
    -  def day_one_library args
    +  def serenity_alive_path_from_observatory args
     ** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
         {
    -** Processing line: ~      background: 'sprites/library.png',~
    +** Processing line: ~      fade: 60,~
     - Inside source: true
     *** True Line Result
    -      background: 'sprites/library.png',
    -** Processing line: ~      player: [27, 4],~
    +      fade: 60,
    +** Processing line: ~      background: 'sprites/path-to-observatory.png',~
     - Inside source: true
     *** True Line Result
    -      player: [27, 4],
    +      background: 'sprites/path-to-observatory.png',
    +** Processing line: ~      player: [4, 21],~
    +- Inside source: true
    +*** True Line Result
    +      player: [4, 21],
     ** Processing line: ~      scenes: [~
     - Inside source: true
     *** True Line Result
           scenes: [
    -** Processing line: ~        [0, 0, 64, 2, :end_day_one_infront_of_library]~
    +** Processing line: ~        [*hotspot_bottom_right, :serenity_bio_infront_of_home]~
     - Inside source: true
     *** True Line Result
    -        [0, 0, 64, 2, :end_day_one_infront_of_library]
    +        [*hotspot_bottom_right, :serenity_bio_infront_of_home]
     ** Processing line: ~      ],~
     - Inside source: true
     *** True Line Result
    @@ -138867,14 +144591,10 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
           storylines: [
    -** Processing line: ~        [28, 22, 8, 4,  "I grew- up- in this library. I've- read every- book- here. My favorites-- were- of course-- anything- computer-- related."],~
    -- Inside source: true
    -*** True Line Result
    -        [28, 22, 8, 4,  "I grew- up- in this library. I've- read every- book- here. My favorites-- were- of course-- anything- computer-- related."],
    -** Processing line: ~        [6, 32, 10, 6, "My favorite-- area--- of the library. The Science-- Section."]~
    +** Processing line: ~        [22, 20, 10, 10, "I'm not sure what's-- worse. Waiting-- for Sasha's-- reply. Or jumping-- off- from- right- here."]~
     - Inside source: true
     *** True Line Result
    -        [6, 32, 10, 6, "My favorite-- area--- of the library. The Science-- Section."]
    +        [22, 20, 10, 10, "I'm not sure what's-- worse. Waiting-- for Sasha's-- reply. Or jumping-- off- from- right- here."]
     ** Processing line: ~      ]~
     - Inside source: true
     *** True Line Result
    @@ -138891,54 +144611,62 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def end_day_one_infront_of_library args~
    +** Processing line: ~  def serenity_alive_reply_completed_shared_hotspots args~
     - Inside source: true
     *** True Line Result
    -  def end_day_one_infront_of_library args
    -** Processing line: ~    {~
    +  def serenity_alive_reply_completed_shared_hotspots args
    +** Processing line: ~    [~
     - Inside source: true
     *** True Line Result
    -    {
    -** Processing line: ~      background: 'sprites/outside-library.png',~
    +    [
    +** Processing line: ~      [30, 10, 5, 4, "I guess it wasn't-- a joke- after-- all."],~
     - Inside source: true
     *** True Line Result
    -      background: 'sprites/outside-library.png',
    -** Processing line: ~      player: [51, 33],~
    +      [30, 10, 5, 4, "I guess it wasn't-- a joke- after-- all."],
    +** Processing line: ~      [40, 10, 5, 4, "I barely-- remember--- the- history----- of the crew."],~
     - Inside source: true
     *** True Line Result
    -      player: [51, 33],
    -** Processing line: ~      scenes: [~
    +      [40, 10, 5, 4, "I barely-- remember--- the- history----- of the crew."],
    +** Processing line: ~      [50, 10, 5, 4, "It probably--- wouldn't-- hurt- to- refresh-- my memory--."]~
     - Inside source: true
     *** True Line Result
    -      scenes: [
    -** Processing line: ~        [49, 39, 6, 9, :day_one_library],~
    +      [50, 10, 5, 4, "It probably--- wouldn't-- hurt- to- refresh-- my memory--."]
    +** Processing line: ~    ]~
     - Inside source: true
     *** True Line Result
    -        [49, 39, 6, 9, :day_one_library],
    -** Processing line: ~        [62, 0, 2, 40, :end_day_one_monument],~
    +    ]
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -        [62, 0, 2, 40, :end_day_one_monument],
    -** Processing line: ~      ],~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      ],
    -** Processing line: ~      storylines: [~
    +
    +** Processing line: ~  def serenity_alive_last_reply args~
     - Inside source: true
     *** True Line Result
    -      storylines: [
    -** Processing line: ~        [50, 27, 4, 4, "It's getting late. Better get some sleep."]~
    +  def serenity_alive_last_reply args
    +** Processing line: ~    if args.state.scene_history.include? :replied_to_introduction_seriously~
     - Inside source: true
     *** True Line Result
    -        [50, 27, 4, 4, "It's getting late. Better get some sleep."]
    -** Processing line: ~      ]~
    +    if args.state.scene_history.include? :replied_to_introduction_seriously
    +** Processing line: ~      return "Buffer--: \"Hello, Who- is sending-- this message--?\""~
     - Inside source: true
     *** True Line Result
    -      ]
    -** Processing line: ~    }~
    +      return "Buffer--: \"Hello, Who- is sending-- this message--?\""
    +** Processing line: ~    else~
     - Inside source: true
     *** True Line Result
    -    }
    +    else
    +** Processing line: ~      return "Buffer--: \"New- phone. Who dis?\""~
    +- Inside source: true
    +*** True Line Result
    +      return "Buffer--: \"New- phone. Who dis?\""
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -138947,42 +144675,94 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def end_day_one_monument args~
    +** Processing line: ~  def serenity_alive_current_message args~
     - Inside source: true
     *** True Line Result
    -  def end_day_one_monument args
    -** Processing line: ~    {~
    +  def serenity_alive_current_message args
    +** Processing line: ~    if args.state.scene_history.include? :replied_to_introduction_seriously~
     - Inside source: true
     *** True Line Result
    -    {
    -** Processing line: ~      background: 'sprites/tribute.png',~
    +    if args.state.scene_history.include? :replied_to_introduction_seriously
    +** Processing line: ~      "This- is Sasha. The Serenity--- crew-- is out of hibernation---- and ready-- for Earth reentry--. But, it seems like we are having-- trouble-- with our Navigation---- systems. Please advise.".quote~
     - Inside source: true
     *** True Line Result
    -      background: 'sprites/tribute.png',
    -** Processing line: ~      player: [2, 36],~
    +      "This- is Sasha. The Serenity--- crew-- is out of hibernation---- and ready-- for Earth reentry--. But, it seems like we are having-- trouble-- with our Navigation---- systems. Please advise.".quote
    +** Processing line: ~    else~
     - Inside source: true
     *** True Line Result
    -      player: [2, 36],
    -** Processing line: ~      scenes: [~
    +    else
    +** Processing line: ~      "LOL! Thanks for the laugh. I needed that. This- is Sasha. The Serenity--- crew-- is out of hibernation---- and ready-- for Earth reentry--. But, it seems like we are having-- trouble-- with our Navigation---- systems. Can you help me out- babe?".quote~
     - Inside source: true
     *** True Line Result
    -      scenes: [
    -** Processing line: ~        [62, 0, 2, 40, :end_day_one_infront_of_home],~
    +      "LOL! Thanks for the laugh. I needed that. This- is Sasha. The Serenity--- crew-- is out of hibernation---- and ready-- for Earth reentry--. But, it seems like we are having-- trouble-- with our Navigation---- systems. Can you help me out- babe?".quote
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -        [62, 0, 2, 40, :end_day_one_infront_of_home],
    -** Processing line: ~      ],~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -      ],
    -** Processing line: ~      storylines: [~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      storylines: [
    -** Processing line: ~        [50, 27, 4, 4, "It's getting late. Better get some sleep."],~
    +
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
    +*** True Line Result
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +
    +** Processing line: ~*** Rpg Narrative - Return Of Serenity - storyline_serenity_bio.rb~
    +- Header detected.
    +*** True Line Result
    +
    +*** True Line Result
    +*** Rpg Narrative - Return Of Serenity - storyline_serenity_bio.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/99_genre_rpg_narrative/return_of_serenity/app/storyline_serenity_bio.rb~
     - Inside source: true
     *** True Line Result
    -        [50, 27, 4, 4, "It's getting late. Better get some sleep."],
    +  # ./samples/99_genre_rpg_narrative/return_of_serenity/app/storyline_serenity_bio.rb
    +** Processing line: ~  def serenity_bio_infront_of_home args~
    +- Inside source: true
    +*** True Line Result
    +  def serenity_bio_infront_of_home args
    +** Processing line: ~    {~
    +- Inside source: true
    +*** True Line Result
    +    {
    +** Processing line: ~      fade: 60,~
    +- Inside source: true
    +*** True Line Result
    +      fade: 60,
    +** Processing line: ~      background: 'sprites/front-of-home.png',~
    +- Inside source: true
    +*** True Line Result
    +      background: 'sprites/front-of-home.png',
    +** Processing line: ~      player: [54, 23],~
    +- Inside source: true
    +*** True Line Result
    +      player: [54, 23],
    +** Processing line: ~      scenes: [~
    +- Inside source: true
    +*** True Line Result
    +      scenes: [
    +** Processing line: ~        [44, 34, 8, 14, :serenity_bio_inside_home],~
    +- Inside source: true
    +*** True Line Result
    +        [44, 34, 8, 14, :serenity_bio_inside_home],
    +** Processing line: ~        [0, 3, 3, 22, :serenity_bio_library]~
    +- Inside source: true
    +*** True Line Result
    +        [0, 3, 3, 22, :serenity_bio_library]
     ** Processing line: ~      ]~
     - Inside source: true
     *** True Line Result
    @@ -138999,42 +144779,46 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def end_day_one_infront_of_home args~
    +** Processing line: ~  def serenity_bio_inside_home args~
     - Inside source: true
     *** True Line Result
    -  def end_day_one_infront_of_home args
    +  def serenity_bio_inside_home args
     ** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
         {
    -** Processing line: ~      background: 'sprites/front-of-home.png',~
    +** Processing line: ~      background: 'sprites/inside-home.png',~
     - Inside source: true
     *** True Line Result
    -      background: 'sprites/front-of-home.png',
    -** Processing line: ~      player: [1, 17],~
    +      background: 'sprites/inside-home.png',
    +** Processing line: ~      player: [34, 4],~
     - Inside source: true
     *** True Line Result
    -      player: [1, 17],
    -** Processing line: ~      scenes: [~
    +      player: [34, 4],
    +** Processing line: ~      storylines: [~
     - Inside source: true
     *** True Line Result
    -      scenes: [
    -** Processing line: ~        [43, 34, 10, 16, :end_day_one_home],~
    +      storylines: [
    +** Processing line: ~        [34, 4, 4, 4, "I'm--- completely--- exhausted."],~
     - Inside source: true
     *** True Line Result
    -        [43, 34, 10, 16, :end_day_one_home],
    +        [34, 4, 4, 4, "I'm--- completely--- exhausted."],
     ** Processing line: ~      ],~
     - Inside source: true
     *** True Line Result
           ],
    -** Processing line: ~      storylines: [~
    +** Processing line: ~      scenes: [~
     - Inside source: true
     *** True Line Result
    -      storylines: [
    -** Processing line: ~        [20, 10, 4, 4, "It's getting late. Better get some sleep."],~
    +      scenes: [
    +** Processing line: ~        [30, 38, 12, 13, :serenity_bio_restless_sleep],~
     - Inside source: true
     *** True Line Result
    -        [20, 10, 4, 4, "It's getting late. Better get some sleep."],
    +        [30, 38, 12, 13, :serenity_bio_restless_sleep],
    +** Processing line: ~        [32, 0, 8, 3, :serenity_bio_infront_of_home],~
    +- Inside source: true
    +*** True Line Result
    +        [32, 0, 8, 3, :serenity_bio_infront_of_home],
     ** Processing line: ~      ]~
     - Inside source: true
     *** True Line Result
    @@ -139051,42 +144835,42 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def end_day_one_home args~
    +** Processing line: ~  def serenity_bio_restless_sleep args~
     - Inside source: true
     *** True Line Result
    -  def end_day_one_home args
    +  def serenity_bio_restless_sleep args
     ** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
         {
    -** Processing line: ~      background: 'sprites/inside-home.png',~
    +** Processing line: ~      fade: 60,~
     - Inside source: true
     *** True Line Result
    -      background: 'sprites/inside-home.png',
    -** Processing line: ~      player: [34, 3],~
    +      fade: 60,
    +** Processing line: ~      background: 'sprites/inside-home.png',~
     - Inside source: true
     *** True Line Result
    -      player: [34, 3],
    -** Processing line: ~      scenes: [~
    +      background: 'sprites/inside-home.png',
    +** Processing line: ~      storylines: [~
     - Inside source: true
     *** True Line Result
    -      scenes: [
    -** Processing line: ~        [32, 40, 8, 10, :end_day_one_dream],~
    +      storylines: [
    +** Processing line: ~        [32, 38, 10, 13, "I can't-- seem to sleep. I know nothing-- about the- crew-. Maybe- I- should- go read- up- on- them."],~
     - Inside source: true
     *** True Line Result
    -        [32, 40, 8, 10, :end_day_one_dream],
    +        [32, 38, 10, 13, "I can't-- seem to sleep. I know nothing-- about the- crew-. Maybe- I- should- go read- up- on- them."],
     ** Processing line: ~      ],~
     - Inside source: true
     *** True Line Result
           ],
    -** Processing line: ~      storylines: [~
    +** Processing line: ~      scenes: [~
     - Inside source: true
     *** True Line Result
    -      storylines: [
    -** Processing line: ~        [38, 4, 4, 4, "It's getting late. Better get some sleep."],~
    +      scenes: [
    +** Processing line: ~        [32, 0, 8, 3, :serenity_bio_infront_of_home],~
     - Inside source: true
     *** True Line Result
    -        [38, 4, 4, 4, "It's getting late. Better get some sleep."],
    +        [32, 0, 8, 3, :serenity_bio_infront_of_home],
     ** Processing line: ~      ]~
     - Inside source: true
     *** True Line Result
    @@ -139103,54 +144887,34 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def end_day_one_dream args~
    +** Processing line: ~  def serenity_bio_library args~
     - Inside source: true
     *** True Line Result
    -  def end_day_one_dream args
    +  def serenity_bio_library args
     ** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
         {
    -** Processing line: ~      background: 'sprites/dream.png',~
    +** Processing line: ~      background: 'sprites/library.png',~
     - Inside source: true
     *** True Line Result
    -      background: 'sprites/dream.png',
    +      background: 'sprites/library.png',
     ** Processing line: ~      fade: 60,~
     - Inside source: true
     *** True Line Result
           fade: 60,
    -** Processing line: ~      player: [4, 4],~
    +** Processing line: ~      player: [30, 7],~
     - Inside source: true
     *** True Line Result
    -      player: [4, 4],
    +      player: [30, 7],
     ** Processing line: ~      scenes: [~
     - Inside source: true
     *** True Line Result
           scenes: [
    -** Processing line: ~        [62, 0, 2, 64, :explaining_the_special_power]~
    -- Inside source: true
    -*** True Line Result
    -        [62, 0, 2, 64, :explaining_the_special_power]
    -** Processing line: ~      ],~
    -- Inside source: true
    -*** True Line Result
    -      ],
    -** Processing line: ~      storylines: [~
    -- Inside source: true
    -*** True Line Result
    -      storylines: [
    -** Processing line: ~        [10, 10, 4, 4, "Why- does this- moment-- always- haunt- my dreams?"],~
    -- Inside source: true
    -*** True Line Result
    -        [10, 10, 4, 4, "Why- does this- moment-- always- haunt- my dreams?"],
    -** Processing line: ~        [20, 10, 4, 4, "This kid- reads these computer--- science--- books- nonstop-. What's- wrong with him?"],~
    -- Inside source: true
    -*** True Line Result
    -        [20, 10, 4, 4, "This kid- reads these computer--- science--- books- nonstop-. What's- wrong with him?"],
    -** Processing line: ~        [30, 10, 4, 4, "There- is nothing-- wrong- with him. This behavior-- should be encouraged---! In fact-, I think- he's- special---. Have- you seen- him use- a computer---? It's-- almost-- as if he can- speak-- to it."]~
    +** Processing line: ~        [21, 35, 3, 18, :serenity_bio_book]~
     - Inside source: true
     *** True Line Result
    -        [30, 10, 4, 4, "There- is nothing-- wrong- with him. This behavior-- should be encouraged---! In fact-, I think- he's- special---. Have- you seen- him use- a computer---? It's-- almost-- as if he can- speak-- to it."]
    +        [21, 35, 3, 18, :serenity_bio_book]
     ** Processing line: ~      ]~
     - Inside source: true
     *** True Line Result
    @@ -139167,42 +144931,82 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def explaining_the_special_power args~
    +** Processing line: ~  def serenity_bio_book args~
     - Inside source: true
     *** True Line Result
    -  def explaining_the_special_power args
    +  def serenity_bio_book args
     ** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
         {
    +** Processing line: ~      background: 'sprites/book.png',~
    +- Inside source: true
    +*** True Line Result
    +      background: 'sprites/book.png',
     ** Processing line: ~      fade: 60,~
     - Inside source: true
     *** True Line Result
           fade: 60,
    -** Processing line: ~      background: 'sprites/inside-home.png',~
    +** Processing line: ~      player: [6, 52],~
     - Inside source: true
     *** True Line Result
    -      background: 'sprites/inside-home.png',
    -** Processing line: ~      player: [32, 30],~
    +      player: [6, 52],
    +** Processing line: ~      storylines: [~
     - Inside source: true
     *** True Line Result
    -      player: [32, 30],
    -** Processing line: ~      scenes: [~
    +      storylines: [
    +** Processing line: ~        [ 4, 50, 56, 4, "The Title-- Reads: Never-- Forget-- Mission-- Serenity---"],~
     - Inside source: true
     *** True Line Result
    -      scenes: [
    -** Processing line: ~        [~
    +        [ 4, 50, 56, 4, "The Title-- Reads: Never-- Forget-- Mission-- Serenity---"],
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        [
    -** Processing line: ~          38, 21, 4, 4, :explaining_the_special_power_inside_computer~
    +
    +** Processing line: ~        [ 4, 38,  8, 8, "Name: Matthew--- R. Sex: Male--- Age-- at-- Departure: 36-----"],~
     - Inside source: true
     *** True Line Result
    -          38, 21, 4, 4, :explaining_the_special_power_inside_computer
    -** Processing line: ~        ],~
    +        [ 4, 38,  8, 8, "Name: Matthew--- R. Sex: Male--- Age-- at-- Departure: 36-----"],
    +** Processing line: ~        [14, 38, 46, 8, "Tribute-- Text: Matthew graduated-- Magna-- Cum-- Laude-- from MIT--- with-- a- PHD---- in Aero-- Nautical--- Engineering. He was immensely--- competitive, and had an insatiable---- thirst- for aerial-- battle. From the age of twenty, he remained-- undefeated--- in the Israeli-- Air- Force- \"Blue Flag\" combat-- exercises. By the age of 29--- he had already-- risen through- the ranks, and became-- the Lieutenant--- General--- of Lufwaffe. Matthew-- volenteered-- to- pilot-- Mission-- Serenity. To- this day, his wife- and son- are pillars-- of strength- for us. Rest- in Peace- Matthew, we are sorry-- that- news of the pregancy-- never-- reached- you. Please forgive us."],~
     - Inside source: true
     *** True Line Result
    -        ],
    +        [14, 38, 46, 8, "Tribute-- Text: Matthew graduated-- Magna-- Cum-- Laude-- from MIT--- with-- a- PHD---- in Aero-- Nautical--- Engineering. He was immensely--- competitive, and had an insatiable---- thirst- for aerial-- battle. From the age of twenty, he remained-- undefeated--- in the Israeli-- Air- Force- \"Blue Flag\" combat-- exercises. By the age of 29--- he had already-- risen through- the ranks, and became-- the Lieutenant--- General--- of Lufwaffe. Matthew-- volenteered-- to- pilot-- Mission-- Serenity. To- this day, his wife- and son- are pillars-- of strength- for us. Rest- in Peace- Matthew, we are sorry-- that- news of the pregancy-- never-- reached- you. Please forgive us."],
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~        [4,  26,  8, 8, "Name: Aanka--- P. Sex: Female--- Age-- at-- Departure: 9-----"],~
    +- Inside source: true
    +*** True Line Result
    +        [4,  26,  8, 8, "Name: Aanka--- P. Sex: Female--- Age-- at-- Departure: 9-----"],
    +** Processing line: ~        [14, 26, 46, 8, "Tribute-- Text: Aanka--- gratuated--- Magna-- Cum- Laude-- from MIT, at- the- age- of eight, with a- PHD---- in Astro-- Physics. Her-- IQ--- was over 390, the highest-- ever- recorded--- IQ-- in- human-- history. She changed- the landscape-- of Physics-- with her efforts- in- unravelling--- the mysteries--- of- Dark- Matter--. Anka discovered-- the threat- of Halley's-- Comet-- collision--- with Earth. She spear headed-- the global-- effort-- for Misson-- Serenity. Her- multilingual--- address-- to- the world-- brought- us all hope."],~
    +- Inside source: true
    +*** True Line Result
    +        [14, 26, 46, 8, "Tribute-- Text: Aanka--- gratuated--- Magna-- Cum- Laude-- from MIT, at- the- age- of eight, with a- PHD---- in Astro-- Physics. Her-- IQ--- was over 390, the highest-- ever- recorded--- IQ-- in- human-- history. She changed- the landscape-- of Physics-- with her efforts- in- unravelling--- the mysteries--- of- Dark- Matter--. Anka discovered-- the threat- of Halley's-- Comet-- collision--- with Earth. She spear headed-- the global-- effort-- for Misson-- Serenity. Her- multilingual--- address-- to- the world-- brought- us all hope."],
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~        [4,  14,  8, 8, "Name: Sasha--- N. Sex: Female--- Age-- at-- Departure: 29-----"],~
    +- Inside source: true
    +*** True Line Result
    +        [4,  14,  8, 8, "Name: Sasha--- N. Sex: Female--- Age-- at-- Departure: 29-----"],
    +** Processing line: ~        [14, 14, 46, 8, "Tribute-- Text: Sasha gratuated-- Magna-- Cum- Laude-- from MIT--- with-- a- PHD---- in Computer---- Science----. She-- was-- brilliant--, strong- willed--, and-- a-- stunningly--- beautiful--- woman---. Sasha---- is- the- creator--- of the world's--- first- Ruby--- Quantum-- Machine---. After-- much- critical--- acclaim--, the Quantum-- Computer-- was placed in MIT's---- Museam-- next- to- Richard--- G. and Thomas--- K.'s---- Lisp-- Machine---. Her- engineering--- skills-- were-- paramount--- for Mission--- Serenity's--- success. Humanity-- misses-- you-- dearly,-- Sasha--. Life-- shines-- a dimmer-- light-- now- that- your- angelic- voice-- can never- be heard- again."],~
    +- Inside source: true
    +*** True Line Result
    +        [14, 14, 46, 8, "Tribute-- Text: Sasha gratuated-- Magna-- Cum- Laude-- from MIT--- with-- a- PHD---- in Computer---- Science----. She-- was-- brilliant--, strong- willed--, and-- a-- stunningly--- beautiful--- woman---. Sasha---- is- the- creator--- of the world's--- first- Ruby--- Quantum-- Machine---. After-- much- critical--- acclaim--, the Quantum-- Computer-- was placed in MIT's---- Museam-- next- to- Richard--- G. and Thomas--- K.'s---- Lisp-- Machine---. Her- engineering--- skills-- were-- paramount--- for Mission--- Serenity's--- success. Humanity-- misses-- you-- dearly,-- Sasha--. Life-- shines-- a dimmer-- light-- now- that- your- angelic- voice-- can never- be heard- again."],
    +** Processing line: ~      ],~
    +- Inside source: true
    +*** True Line Result
    +      ],
    +** Processing line: ~      scenes: [~
    +- Inside source: true
    +*** True Line Result
    +      scenes: [
    +** Processing line: ~        [*hotspot_bottom, :serenity_bio_finally_to_bed]~
    +- Inside source: true
    +*** True Line Result
    +        [*hotspot_bottom, :serenity_bio_finally_to_bed]
     ** Processing line: ~      ]~
     - Inside source: true
     *** True Line Result
    @@ -139219,58 +145023,46 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def explaining_the_special_power_inside_computer args~
    +** Processing line: ~  def serenity_bio_finally_to_bed args~
     - Inside source: true
     *** True Line Result
    -  def explaining_the_special_power_inside_computer args
    +  def serenity_bio_finally_to_bed args
     ** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
         {
    -** Processing line: ~      background: 'sprites/pc.png',~
    -- Inside source: true
    -*** True Line Result
    -      background: 'sprites/pc.png',
     ** Processing line: ~      fade: 60,~
     - Inside source: true
     *** True Line Result
           fade: 60,
    -** Processing line: ~      player: [34, 4],~
    -- Inside source: true
    -*** True Line Result
    -      player: [34, 4],
    -** Processing line: ~      scenes: [~
    -- Inside source: true
    -*** True Line Result
    -      scenes: [
    -** Processing line: ~        [0, 62, 64, 3, :the_blinking_light]~
    +** Processing line: ~      background: 'sprites/inside-home.png',~
     - Inside source: true
     *** True Line Result
    -        [0, 62, 64, 3, :the_blinking_light]
    -** Processing line: ~      ],~
    +      background: 'sprites/inside-home.png',
    +** Processing line: ~      player: [35, 3],~
     - Inside source: true
     *** True Line Result
    -      ],
    +      player: [35, 3],
     ** Processing line: ~      storylines: [~
     - Inside source: true
     *** True Line Result
           storylines: [
    -** Processing line: ~        [14, 20, 24, 4, "So... I have a special-- power--. I don't-- need a mouse-, keyboard--, or even-- a monitor--- to control-- a computer--."],~
    +** Processing line: ~        [34, 4, 4, 4, "Maybe-- I'll-- be able-- to sleep- now..."],~
     - Inside source: true
     *** True Line Result
    -        [14, 20, 24, 4, "So... I have a special-- power--. I don't-- need a mouse-, keyboard--, or even-- a monitor--- to control-- a computer--."],
    -** Processing line: ~        [14, 25, 24, 4, "I only-- pretend-- to use peripherals---, so as not- to freak- anyone--- out."],~
    +        [34, 4, 4, 4, "Maybe-- I'll-- be able-- to sleep- now..."],
    +** Processing line: ~      ],~
     - Inside source: true
     *** True Line Result
    -        [14, 25, 24, 4, "I only-- pretend-- to use peripherals---, so as not- to freak- anyone--- out."],
    -** Processing line: ~        [14, 30, 24, 4, "Inside-- this silicon--- Universe---, is the only-- place I- feel- at peace."],~
    +      ],
    +** Processing line: ~      scenes: [~
     - Inside source: true
     *** True Line Result
    -        [14, 30, 24, 4, "Inside-- this silicon--- Universe---, is the only-- place I- feel- at peace."],
    -** Processing line: ~        [14, 35, 24, 4, "It's-- the only-- place where I don't-- feel alone."]~
    +      scenes: [
    +** Processing line: ~        [32, 38, 10, 13, :bad_dream],~
     - Inside source: true
     *** True Line Result
    -        [14, 35, 24, 4, "It's-- the only-- place where I don't-- feel alone."]
    +        [32, 38, 10, 13, :bad_dream],
     ** Processing line: ~      ]~
     - Inside source: true
     *** True Line Result
    @@ -139287,78 +145079,110 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~#+end_src~
    -- Line was identified as the end of a code block.
    +** Processing line: ~  def bad_dream args~
    +- Inside source: true
     *** True Line Result
    -#+end_src
    -** Processing line: ~~
    -- End of paragraph detected.
    +  def bad_dream args
    +** Processing line: ~    {~
    +- Inside source: true
     *** True Line Result
    -
    -** Processing line: ~*** Rpg Narrative - Return Of Serenity - storyline_final_decision.rb~
    -- Header detected.
    +    {
    +** Processing line: ~      fade: 120,~
    +- Inside source: true
     *** True Line Result
    -
    +      fade: 120,
    +** Processing line: ~      background: 'sprites/inside-home.png',~
    +- Inside source: true
     *** True Line Result
    -*** Rpg Narrative - Return Of Serenity - storyline_final_decision.rb
    -** Processing line: ~#+begin_src ruby~
    -- Line was identified as the beginning of a code block.
    +      background: 'sprites/inside-home.png',
    +** Processing line: ~      player: [34, 35],~
    +- Inside source: true
    +*** True Line Result
    +      player: [34, 35],
    +** Processing line: ~      storylines: [~
    +- Inside source: true
    +*** True Line Result
    +      storylines: [
    +** Processing line: ~        [34, 34, 4, 4, "Man. I did not- sleep- well- at all..."],~
    +- Inside source: true
    +*** True Line Result
    +        [34, 34, 4, 4, "Man. I did not- sleep- well- at all..."],
    +** Processing line: ~      ],~
    +- Inside source: true
    +*** True Line Result
    +      ],
    +** Processing line: ~      scenes: [~
    +- Inside source: true
    +*** True Line Result
    +      scenes: [
    +** Processing line: ~        [32, -1, 8, 3, :bad_dream_observatory]~
    +- Inside source: true
    +*** True Line Result
    +        [32, -1, 8, 3, :bad_dream_observatory]
    +** Processing line: ~      ]~
    +- Inside source: true
    +*** True Line Result
    +      ]
    +** Processing line: ~    }~
    +- Inside source: true
     *** True Line Result
    -
    +    }
    +** Processing line: ~  end~
    +- Inside source: true
     *** True Line Result
    -#+begin_src ruby
    -** Processing line: ~  # ./samples/99_genre_rpg_narrative/return_of_serenity/app/storyline_final_decision.rb~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  # ./samples/99_genre_rpg_narrative/return_of_serenity/app/storyline_final_decision.rb
    -** Processing line: ~  def final_decision_side_of_home args~
    +
    +** Processing line: ~  def bad_dream_observatory args~
     - Inside source: true
     *** True Line Result
    -  def final_decision_side_of_home args
    +  def bad_dream_observatory args
     ** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
         {
    -** Processing line: ~      fade: 120,~
    +** Processing line: ~      background: 'sprites/inside-observatory.png',~
     - Inside source: true
     *** True Line Result
    -      fade: 120,
    -** Processing line: ~      background: 'sprites/side-of-home.png',~
    +      background: 'sprites/inside-observatory.png',
    +** Processing line: ~      fade: 120,~
     - Inside source: true
     *** True Line Result
    -      background: 'sprites/side-of-home.png',
    -** Processing line: ~      player: [16, 13],~
    +      fade: 120,
    +** Processing line: ~      player: [51, 12],~
     - Inside source: true
     *** True Line Result
    -      player: [16, 13],
    -** Processing line: ~      scenes: [~
    +      player: [51, 12],
    +** Processing line: ~      storylines: [~
     - Inside source: true
     *** True Line Result
    -      scenes: [
    -** Processing line: ~        [52, 24, 11, 5, :final_decision_mountain_pass],~
    +      storylines: [
    +** Processing line: ~        [50, 10, 4, 4,   "Breathe, Hiro. Just see what's there... everything--- will- be okay."]~
     - Inside source: true
     *** True Line Result
    -        [52, 24, 11, 5, :final_decision_mountain_pass],
    +        [50, 10, 4, 4,   "Breathe, Hiro. Just see what's there... everything--- will- be okay."]
     ** Processing line: ~      ],~
     - Inside source: true
     *** True Line Result
           ],
    -** Processing line: ~      render_override: :blinking_light_side_of_home_render,~
    +** Processing line: ~      scenes: [~
     - Inside source: true
     *** True Line Result
    -      render_override: :blinking_light_side_of_home_render,
    -** Processing line: ~      storylines: [~
    +      scenes: [
    +** Processing line: ~        [30, 18, 5, 12, :bad_dream_inside_mainframe]~
     - Inside source: true
     *** True Line Result
    -      storylines: [
    -** Processing line: ~        [28, 13, 8, 4,  "Man. Hard to believe- that today- is the 21st--- anniversary-- of The Impact. Serenity--- will- be- home- soon."]~
    +        [30, 18, 5, 12, :bad_dream_inside_mainframe]
    +** Processing line: ~      ],~
     - Inside source: true
     *** True Line Result
    -        [28, 13, 8, 4,  "Man. Hard to believe- that today- is the 21st--- anniversary-- of The Impact. Serenity--- will- be- home- soon."]
    -** Processing line: ~      ]~
    +      ],
    +** Processing line: ~      render_override: :blinking_light_inside_observatory_render~
     - Inside source: true
     *** True Line Result
    -      ]
    +      render_override: :blinking_light_inside_observatory_render
     ** Processing line: ~    }~
     - Inside source: true
     *** True Line Result
    @@ -139371,38 +145195,50 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def final_decision_mountain_pass args~
    +** Processing line: ~  def bad_dream_inside_mainframe args~
     - Inside source: true
     *** True Line Result
    -  def final_decision_mountain_pass args
    +  def bad_dream_inside_mainframe args
     ** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
         {
    -** Processing line: ~      background: 'sprites/mountain-pass-zoomed-out.png',~
    +** Processing line: ~      player: [32, 4],~
     - Inside source: true
     *** True Line Result
    -      background: 'sprites/mountain-pass-zoomed-out.png',
    -** Processing line: ~      player: [4, 4],~
    +      player: [32, 4],
    +** Processing line: ~      background: 'sprites/mainframe.png',~
     - Inside source: true
     *** True Line Result
    -      player: [4, 4],
    -** Processing line: ~      scenes: [~
    +      background: 'sprites/mainframe.png',
    +** Processing line: ~      fade: 120,~
     - Inside source: true
     *** True Line Result
    -      scenes: [
    -** Processing line: ~        [18, 47, 5, 5, :final_decision_path_to_observatory]~
    +      fade: 120,
    +** Processing line: ~      storylines: [~
     - Inside source: true
     *** True Line Result
    -        [18, 47, 5, 5, :final_decision_path_to_observatory]
    +      storylines: [
    +** Processing line: ~        [22, 45, 17, 4, (bad_dream_last_reply args)],~
    +- Inside source: true
    +*** True Line Result
    +        [22, 45, 17, 4, (bad_dream_last_reply args)],
     ** Processing line: ~      ],~
     - Inside source: true
     *** True Line Result
           ],
    -** Processing line: ~      render_override: :blinking_light_mountain_pass_render~
    +** Processing line: ~      scenes: [~
     - Inside source: true
     *** True Line Result
    -      render_override: :blinking_light_mountain_pass_render
    +      scenes: [
    +** Processing line: ~        [45, 45,  4, 4, :bad_dream_everyone_dead],~
    +- Inside source: true
    +*** True Line Result
    +        [45, 45,  4, 4, :bad_dream_everyone_dead],
    +** Processing line: ~      ]~
    +- Inside source: true
    +*** True Line Result
    +      ]
     ** Processing line: ~    }~
     - Inside source: true
     *** True Line Result
    @@ -139415,38 +145251,50 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def final_decision_path_to_observatory args~
    +** Processing line: ~  def bad_dream_everyone_dead args~
     - Inside source: true
     *** True Line Result
    -  def final_decision_path_to_observatory args
    +  def bad_dream_everyone_dead args
     ** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
         {
    -** Processing line: ~      background: 'sprites/path-to-observatory.png',~
    +** Processing line: ~      background: 'sprites/mainframe.png',~
     - Inside source: true
     *** True Line Result
    -      background: 'sprites/path-to-observatory.png',
    -** Processing line: ~      player: [60, 4],~
    +      background: 'sprites/mainframe.png',
    +** Processing line: ~      storylines: [~
     - Inside source: true
     *** True Line Result
    -      player: [60, 4],
    -** Processing line: ~      scenes: [~
    +      storylines: [
    +** Processing line: ~        [22, 45, 17, 4, (bad_dream_last_reply args)],~
     - Inside source: true
     *** True Line Result
    -      scenes: [
    -** Processing line: ~        [0, 26, 5, 5, :final_decision_observatory]~
    +        [22, 45, 17, 4, (bad_dream_last_reply args)],
    +** Processing line: ~        [45, 45,  4, 4, "Hi-- Hiro. This is Sasha. By the time- you get this- message, chances-- are we will- already-- be- dead. The batteries--- got- damaged-- during-- removal. And- we don't-- have enough-- power-- for Life-- Support. The air-- is- already--- starting-- to taste- bad. It... would- have been- nice... to go- on a date--- with- you-- when-- I- got- back- to Earth. Anyways, good-- bye-- Hiro-- XOXOXO----"],~
     - Inside source: true
     *** True Line Result
    -        [0, 26, 5, 5, :final_decision_observatory]
    +        [45, 45,  4, 4, "Hi-- Hiro. This is Sasha. By the time- you get this- message, chances-- are we will- already-- be- dead. The batteries--- got- damaged-- during-- removal. And- we don't-- have enough-- power-- for Life-- Support. The air-- is- already--- starting-- to taste- bad. It... would- have been- nice... to go- on a date--- with- you-- when-- I- got- back- to Earth. Anyways, good-- bye-- Hiro-- XOXOXO----"],
    +** Processing line: ~        [22,  5, 17, 4, "Meh. Whatever, I didn't-- want to save them anyways. What- a pain- in my ass."],~
    +- Inside source: true
    +*** True Line Result
    +        [22,  5, 17, 4, "Meh. Whatever, I didn't-- want to save them anyways. What- a pain- in my ass."],
     ** Processing line: ~      ],~
     - Inside source: true
     *** True Line Result
           ],
    -** Processing line: ~      render_override: :blinking_light_path_to_observatory_render~
    +** Processing line: ~      scenes: [~
     - Inside source: true
     *** True Line Result
    -      render_override: :blinking_light_path_to_observatory_render
    +      scenes: [
    +** Processing line: ~        [*hotspot_bottom, :anka_inside_room]~
    +- Inside source: true
    +*** True Line Result
    +        [*hotspot_bottom, :anka_inside_room]
    +** Processing line: ~      ]~
    +- Inside source: true
    +*** True Line Result
    +      ]
     ** Processing line: ~    }~
     - Inside source: true
     *** True Line Result
    @@ -139459,42 +145307,30 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def final_decision_observatory args~
    -- Inside source: true
    -*** True Line Result
    -  def final_decision_observatory args
    -** Processing line: ~    {~
    -- Inside source: true
    -*** True Line Result
    -    {
    -** Processing line: ~      background: 'sprites/observatory.png',~
    -- Inside source: true
    -*** True Line Result
    -      background: 'sprites/observatory.png',
    -** Processing line: ~      player: [60, 2],~
    +** Processing line: ~  def bad_dream_last_reply args~
     - Inside source: true
     *** True Line Result
    -      player: [60, 2],
    -** Processing line: ~      scenes: [~
    +  def bad_dream_last_reply args
    +** Processing line: ~    if args.state.scene_history.include? :replied_to_serenity_alive_firmly~
     - Inside source: true
     *** True Line Result
    -      scenes: [
    -** Processing line: ~        [28, 39, 4, 10, :final_decision_inside_observatory]~
    +    if args.state.scene_history.include? :replied_to_serenity_alive_firmly
    +** Processing line: ~      return "Buffer--: #{serenity_alive_firm_reply.quote}"~
     - Inside source: true
     *** True Line Result
    -        [28, 39, 4, 10, :final_decision_inside_observatory]
    -** Processing line: ~      ],~
    +      return "Buffer--: #{serenity_alive_firm_reply.quote}"
    +** Processing line: ~    else~
     - Inside source: true
     *** True Line Result
    -      ],
    -** Processing line: ~      render_override: :blinking_light_observatory_render~
    +    else
    +** Processing line: ~      return "Buffer--: #{serenity_alive_sugarcoated_reply.quote}"~
     - Inside source: true
     *** True Line Result
    -      render_override: :blinking_light_observatory_render
    -** Processing line: ~    }~
    +      return "Buffer--: #{serenity_alive_sugarcoated_reply.quote}"
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    }
    +    end
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -139503,46 +145339,66 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def final_decision_inside_observatory args~
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
    +*** True Line Result
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +
    +** Processing line: ~*** Rpg Narrative - Return Of Serenity - storyline_serenity_introduction.rb~
    +- Header detected.
    +*** True Line Result
    +
    +*** True Line Result
    +*** Rpg Narrative - Return Of Serenity - storyline_serenity_introduction.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/99_genre_rpg_narrative/return_of_serenity/app/storyline_serenity_introduction.rb~
     - Inside source: true
     *** True Line Result
    -  def final_decision_inside_observatory args
    -** Processing line: ~    {~
    +  # ./samples/99_genre_rpg_narrative/return_of_serenity/app/storyline_serenity_introduction.rb
    +** Processing line: ~  # decision_graph "Message from Sasha",~
     - Inside source: true
     *** True Line Result
    -    {
    -** Processing line: ~      background: 'sprites/inside-observatory.png',~
    +  # decision_graph "Message from Sasha",
    +** Processing line: ~  #                "I should reply.",~
     - Inside source: true
     *** True Line Result
    -      background: 'sprites/inside-observatory.png',
    -** Processing line: ~      player: [60, 2],~
    +  #                "I should reply.",
    +** Processing line: ~  #                [:replied_to_introduction_seriously,  "Reply Seriously", "Who is this?"],~
     - Inside source: true
     *** True Line Result
    -      player: [60, 2],
    -** Processing line: ~      storylines: [],~
    +  #                [:replied_to_introduction_seriously,  "Reply Seriously", "Who is this?"],
    +** Processing line: ~  # [:replied_to_introduction_humorously, "Reply Humorously", "New phone who dis?"]~
     - Inside source: true
     *** True Line Result
    -      storylines: [],
    -** Processing line: ~      scenes: [~
    +  # [:replied_to_introduction_humorously, "Reply Humorously", "New phone who dis?"]
    +** Processing line: ~  def reply_to_introduction args~
     - Inside source: true
     *** True Line Result
    -      scenes: [
    -** Processing line: ~        [30, 18, 5, 12, :final_decision_inside_mainframe]~
    +  def reply_to_introduction args
    +** Processing line: ~    decision_graph  "\"Mission-- control--, your- main- comm-- channels-- seem-- to be down. My apologies-- for- using-- this low- level-- exploit--. What's-- going-- on down there? We are ready-- for reentry--.\" Message--- Timestamp---: 4- hours-- 23--- minutes-- ago--.",~
     - Inside source: true
     *** True Line Result
    -        [30, 18, 5, 12, :final_decision_inside_mainframe]
    -** Processing line: ~      ],~
    +    decision_graph  "\"Mission-- control--, your- main- comm-- channels-- seem-- to be down. My apologies-- for- using-- this low- level-- exploit--. What's-- going-- on down there? We are ready-- for reentry--.\" Message--- Timestamp---: 4- hours-- 23--- minutes-- ago--.",
    +** Processing line: ~                    "Whoever-- pulled- off this exploit-- knows their stuff. I should reply--.",~
     - Inside source: true
     *** True Line Result
    -      ],
    -** Processing line: ~      render_override: :blinking_light_inside_observatory_render~
    +                    "Whoever-- pulled- off this exploit-- knows their stuff. I should reply--.",
    +** Processing line: ~                    [:replied_to_introduction_seriously,  "Serious Reply",  "Hello, Who- is sending-- this message--?"],~
     - Inside source: true
     *** True Line Result
    -      render_override: :blinking_light_inside_observatory_render
    -** Processing line: ~    }~
    +                    [:replied_to_introduction_seriously,  "Serious Reply",  "Hello, Who- is sending-- this message--?"],
    +** Processing line: ~                    [:replied_to_introduction_humorously, "Humorous Reply", "New phone, who dis?"]~
     - Inside source: true
     *** True Line Result
    -    }
    +                    [:replied_to_introduction_humorously, "Humorous Reply", "New phone, who dis?"]
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -139551,34 +145407,50 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def final_decision_inside_mainframe args~
    +** Processing line: ~  def replied_to_introduction_seriously args~
     - Inside source: true
     *** True Line Result
    -  def final_decision_inside_mainframe args
    +  def replied_to_introduction_seriously args
     ** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
         {
    -** Processing line: ~      player: [32, 4],~
    +** Processing line: ~      background: 'sprites/inside-observatory.png',~
     - Inside source: true
     *** True Line Result
    -      player: [32, 4],
    -** Processing line: ~      background: 'sprites/mainframe.png',~
    +      background: 'sprites/inside-observatory.png',
    +** Processing line: ~      fade: 60,~
     - Inside source: true
     *** True Line Result
    -      background: 'sprites/mainframe.png',
    -** Processing line: ~      storylines: [],~
    +      fade: 60,
    +** Processing line: ~      player: [32, 21],~
     - Inside source: true
     *** True Line Result
    -      storylines: [],
    +      player: [32, 21],
     ** Processing line: ~      scenes: [~
     - Inside source: true
     *** True Line Result
           scenes: [
    -** Processing line: ~        [*hotspot_top, :final_decision_ship_status],~
    +** Processing line: ~        *replied_to_introduction_shared_scenes(args)~
     - Inside source: true
     *** True Line Result
    -        [*hotspot_top, :final_decision_ship_status],
    +        *replied_to_introduction_shared_scenes(args)
    +** Processing line: ~      ],~
    +- Inside source: true
    +*** True Line Result
    +      ],
    +** Processing line: ~      storylines: [~
    +- Inside source: true
    +*** True Line Result
    +      storylines: [
    +** Processing line: ~        [30, 18, 5, 12, "Buffer-- has been set to: \"Hello, Who- is sending-- this message--?\""],~
    +- Inside source: true
    +*** True Line Result
    +        [30, 18, 5, 12, "Buffer-- has been set to: \"Hello, Who- is sending-- this message--?\""],
    +** Processing line: ~        *replied_to_introduction_shared_storylines(args)~
    +- Inside source: true
    +*** True Line Result
    +        *replied_to_introduction_shared_storylines(args)
     ** Processing line: ~      ]~
     - Inside source: true
     *** True Line Result
    @@ -139595,34 +145467,34 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def final_decision_ship_status args~
    +** Processing line: ~  def replied_to_introduction_humorously args~
     - Inside source: true
     *** True Line Result
    -  def final_decision_ship_status args
    +  def replied_to_introduction_humorously args
     ** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
         {
    -** Processing line: ~      background: 'sprites/serenity.png',~
    +** Processing line: ~      background: 'sprites/inside-observatory.png',~
     - Inside source: true
     *** True Line Result
    -      background: 'sprites/serenity.png',
    +      background: 'sprites/inside-observatory.png',
     ** Processing line: ~      fade: 60,~
     - Inside source: true
     *** True Line Result
           fade: 60,
    -** Processing line: ~      player: [30, 10],~
    +** Processing line: ~      player: [32, 21],~
     - Inside source: true
     *** True Line Result
    -      player: [30, 10],
    +      player: [32, 21],
     ** Processing line: ~      scenes: [~
     - Inside source: true
     *** True Line Result
           scenes: [
    -** Processing line: ~        [*hotspot_top_right, :final_decision]~
    +** Processing line: ~        *replied_to_introduction_shared_scenes(args)~
     - Inside source: true
     *** True Line Result
    -        [*hotspot_top_right, :final_decision]
    +        *replied_to_introduction_shared_scenes(args)
     ** Processing line: ~      ],~
     - Inside source: true
     *** True Line Result
    @@ -139631,14 +145503,14 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
           storylines: [
    -** Processing line: ~        [30,  8, 4, 4, "????"],~
    +** Processing line: ~        [30, 18, 5, 12, "Buffer-- has been set to: \"New- phone. Who dis?\""],~
     - Inside source: true
     *** True Line Result
    -        [30,  8, 4, 4, "????"],
    -** Processing line: ~        *final_decision_ship_status_shared(args)~
    +        [30, 18, 5, 12, "Buffer-- has been set to: \"New- phone. Who dis?\""],
    +** Processing line: ~        *replied_to_introduction_shared_storylines(args)~
     - Inside source: true
     *** True Line Result
    -        *final_decision_ship_status_shared(args)
    +        *replied_to_introduction_shared_storylines(args)
     ** Processing line: ~      ]~
     - Inside source: true
     *** True Line Result
    @@ -139655,34 +145527,30 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def final_decision args~
    -- Inside source: true
    -*** True Line Result
    -  def final_decision args
    -** Processing line: ~    decision_graph  "Stasis-- Chambers--: UNDERPOWERED, Life- forms-- will be terminated---- unless-- equilibrium----- is reached.",~
    +** Processing line: ~  def replied_to_introduction_shared_storylines args~
     - Inside source: true
     *** True Line Result
    -    decision_graph  "Stasis-- Chambers--: UNDERPOWERED, Life- forms-- will be terminated---- unless-- equilibrium----- is reached.",
    -** Processing line: ~                    "I CAN'T DO THIS... But... If-- I-- don't--- bring-- the- chambers--- to- equilibrium-----, they all die...",~
    +  def replied_to_introduction_shared_storylines args
    +** Processing line: ~    [~
     - Inside source: true
     *** True Line Result
    -                    "I CAN'T DO THIS... But... If-- I-- don't--- bring-- the- chambers--- to- equilibrium-----, they all die...",
    -** Processing line: ~                    [:final_decision_game_over_noone, "Kill--- Everyone---", "DO--- NOTHING?"],~
    +    [
    +** Processing line: ~      [30, 10, 5, 4, "It's-- going-- to take a while-- for this reply-- to make it's-- way back."],~
     - Inside source: true
     *** True Line Result
    -                    [:final_decision_game_over_noone, "Kill--- Everyone---", "DO--- NOTHING?"],
    -** Processing line: ~                    [:final_decision_game_over_matthew, "Kill--- Sasha---", "KILL--- SASHA?"],~
    +      [30, 10, 5, 4, "It's-- going-- to take a while-- for this reply-- to make it's-- way back."],
    +** Processing line: ~      [40, 10, 5, 4, "4- hours-- to send a message-- at light speed?! How far away-- is the sender--?"],~
     - Inside source: true
     *** True Line Result
    -                    [:final_decision_game_over_matthew, "Kill--- Sasha---", "KILL--- SASHA?"],
    -** Processing line: ~                    [:final_decision_game_over_anka, "Kill--- Aanka---", "KILL--- AANKA?"],~
    +      [40, 10, 5, 4, "4- hours-- to send a message-- at light speed?! How far away-- is the sender--?"],
    +** Processing line: ~      [50, 10, 5, 4, "I know- I've-- read about-- light- speed- travel-- before--. Maybe-- the library--- still has that- poster."]~
     - Inside source: true
     *** True Line Result
    -                    [:final_decision_game_over_anka, "Kill--- Aanka---", "KILL--- AANKA?"],
    -** Processing line: ~                    [:final_decision_game_over_sasha, "Kill--- Matthew---", "KILL--- MATTHEW?"]~
    +      [50, 10, 5, 4, "I know- I've-- read about-- light- speed- travel-- before--. Maybe-- the library--- still has that- poster."]
    +** Processing line: ~    ]~
     - Inside source: true
     *** True Line Result
    -                    [:final_decision_game_over_sasha, "Kill--- Matthew---", "KILL--- MATTHEW?"]
    +    ]
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -139691,30 +145559,14 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def final_decision_game_over_noone args~
    -- Inside source: true
    -*** True Line Result
    -  def final_decision_game_over_noone args
    -** Processing line: ~    {~
    -- Inside source: true
    -*** True Line Result
    -    {
    -** Processing line: ~      background: 'sprites/tribute-game-over.png',~
    -- Inside source: true
    -*** True Line Result
    -      background: 'sprites/tribute-game-over.png',
    -** Processing line: ~      player: [53, 14],~
    -- Inside source: true
    -*** True Line Result
    -      player: [53, 14],
    -** Processing line: ~      fade: 600~
    +** Processing line: ~  def replied_to_introduction_shared_scenes args~
     - Inside source: true
     *** True Line Result
    -      fade: 600
    -** Processing line: ~    }~
    +  def replied_to_introduction_shared_scenes args
    +** Processing line: ~    [[60, 0, 4, 32, :replied_to_introduction_observatory]]~
     - Inside source: true
     *** True Line Result
    -    }
    +    [[60, 0, 4, 32, :replied_to_introduction_observatory]]
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -139723,26 +145575,34 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def final_decision_game_over_matthew args~
    +** Processing line: ~  def replied_to_introduction_observatory args~
     - Inside source: true
     *** True Line Result
    -  def final_decision_game_over_matthew args
    +  def replied_to_introduction_observatory args
     ** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
         {
    -** Processing line: ~      background: 'sprites/tribute-game-over.png',~
    +** Processing line: ~      background: 'sprites/observatory.png',~
     - Inside source: true
     *** True Line Result
    -      background: 'sprites/tribute-game-over.png',
    -** Processing line: ~      player: [53, 14],~
    +      background: 'sprites/observatory.png',
    +** Processing line: ~      player: [28, 39],~
     - Inside source: true
     *** True Line Result
    -      player: [53, 14],
    -** Processing line: ~      fade: 600~
    +      player: [28, 39],
    +** Processing line: ~      scenes: [~
     - Inside source: true
     *** True Line Result
    -      fade: 600
    +      scenes: [
    +** Processing line: ~        [60, 0, 4, 32, :replied_to_introduction_path_to_observatory]~
    +- Inside source: true
    +*** True Line Result
    +        [60, 0, 4, 32, :replied_to_introduction_path_to_observatory]
    +** Processing line: ~      ]~
    +- Inside source: true
    +*** True Line Result
    +      ]
     ** Processing line: ~    }~
     - Inside source: true
     *** True Line Result
    @@ -139755,26 +145615,34 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def final_decision_game_over_anka args~
    +** Processing line: ~  def replied_to_introduction_path_to_observatory args~
     - Inside source: true
     *** True Line Result
    -  def final_decision_game_over_anka args
    +  def replied_to_introduction_path_to_observatory args
     ** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
         {
    -** Processing line: ~      background: 'sprites/tribute-game-over.png',~
    +** Processing line: ~      background: 'sprites/path-to-observatory.png',~
     - Inside source: true
     *** True Line Result
    -      background: 'sprites/tribute-game-over.png',
    -** Processing line: ~      player: [53, 14],~
    +      background: 'sprites/path-to-observatory.png',
    +** Processing line: ~      player: [0, 26],~
     - Inside source: true
     *** True Line Result
    -      player: [53, 14],
    -** Processing line: ~      fade: 600~
    +      player: [0, 26],
    +** Processing line: ~      scenes: [~
     - Inside source: true
     *** True Line Result
    -      fade: 600
    +      scenes: [
    +** Processing line: ~        [60, 0, 4, 20, :replied_to_introduction_mountain_pass]~
    +- Inside source: true
    +*** True Line Result
    +        [60, 0, 4, 20, :replied_to_introduction_mountain_pass]
    +** Processing line: ~      ],~
    +- Inside source: true
    +*** True Line Result
    +      ],
     ** Processing line: ~    }~
     - Inside source: true
     *** True Line Result
    @@ -139787,26 +145655,46 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def final_decision_game_over_sasha args~
    +** Processing line: ~  def replied_to_introduction_mountain_pass args~
     - Inside source: true
     *** True Line Result
    -  def final_decision_game_over_sasha args
    +  def replied_to_introduction_mountain_pass args
     ** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
         {
    -** Processing line: ~      background: 'sprites/tribute-game-over.png',~
    +** Processing line: ~      background: 'sprites/mountain-pass-zoomed-out.png',~
     - Inside source: true
     *** True Line Result
    -      background: 'sprites/tribute-game-over.png',
    -** Processing line: ~      player: [53, 14],~
    +      background: 'sprites/mountain-pass-zoomed-out.png',
    +** Processing line: ~      player: [21, 48],~
     - Inside source: true
     *** True Line Result
    -      player: [53, 14],
    -** Processing line: ~      fade: 600~
    +      player: [21, 48],
    +** Processing line: ~      scenes: [~
     - Inside source: true
     *** True Line Result
    -      fade: 600
    +      scenes: [
    +** Processing line: ~        [0, 0, 15, 4, :replied_to_introduction_side_of_home]~
    +- Inside source: true
    +*** True Line Result
    +        [0, 0, 15, 4, :replied_to_introduction_side_of_home]
    +** Processing line: ~      ],~
    +- Inside source: true
    +*** True Line Result
    +      ],
    +** Processing line: ~      storylines: [~
    +- Inside source: true
    +*** True Line Result
    +      storylines: [
    +** Processing line: ~        [15, 28, 5, 3, "At least I'm-- getting-- my- exercise-- in- for- today--."]~
    +- Inside source: true
    +*** True Line Result
    +        [15, 28, 5, 3, "At least I'm-- getting-- my- exercise-- in- for- today--."]
    +** Processing line: ~      ]~
    +- Inside source: true
    +*** True Line Result
    +      ]
     ** Processing line: ~    }~
     - Inside source: true
     *** True Line Result
    @@ -139819,38 +145707,38 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def final_decision_ship_status_shared args~
    +** Processing line: ~  def replied_to_introduction_side_of_home args~
     - Inside source: true
     *** True Line Result
    -  def final_decision_ship_status_shared args
    -** Processing line: ~    [~
    +  def replied_to_introduction_side_of_home args
    +** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
    -    [
    -** Processing line: ~      *ship_control_hotspot(24, 22,~
    +    {
    +** Processing line: ~      background: 'sprites/side-of-home.png',~
     - Inside source: true
     *** True Line Result
    -      *ship_control_hotspot(24, 22,
    -** Processing line: ~                             "Stasis-- Chambers--: UNDERPOWERED, Life- forms-- will be terminated---- unless-- equilibrium----- is reached. WHAT?! NO!",~
    +      background: 'sprites/side-of-home.png',
    +** Processing line: ~      player: [58, 29],~
     - Inside source: true
     *** True Line Result
    -                             "Stasis-- Chambers--: UNDERPOWERED, Life- forms-- will be terminated---- unless-- equilibrium----- is reached. WHAT?! NO!",
    -** Processing line: ~                             "Matthew's--- Chamber--: UNDER-- THREAT-- OF-- TERMINATION. WHAT?! NO!",~
    +      player: [58, 29],
    +** Processing line: ~      scenes: [~
     - Inside source: true
     *** True Line Result
    -                             "Matthew's--- Chamber--: UNDER-- THREAT-- OF-- TERMINATION. WHAT?! NO!",
    -** Processing line: ~                             "Aanka's--- Chamber--: UNDER-- THREAT-- OF-- TERMINATION.  WHAT?! NO!",~
    +      scenes: [
    +** Processing line: ~        [2, 0, 61, 2, :speed_of_light_front_of_home]~
     - Inside source: true
     *** True Line Result
    -                             "Aanka's--- Chamber--: UNDER-- THREAT-- OF-- TERMINATION.  WHAT?! NO!",
    -** Processing line: ~                             "Sasha's--- Chamber--: UNDER-- THREAT-- OF-- TERMINATION. WHAT?! NO!"),~
    +        [2, 0, 61, 2, :speed_of_light_front_of_home]
    +** Processing line: ~      ],~
     - Inside source: true
     *** True Line Result
    -                             "Sasha's--- Chamber--: UNDER-- THREAT-- OF-- TERMINATION. WHAT?! NO!"),
    -** Processing line: ~    ]~
    +      ],
    +** Processing line: ~    }~
     - Inside source: true
     *** True Line Result
    -    ]
    +    }
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -139867,62 +145755,50 @@ Follows is a source code listing for all files that have been open sourced. This
     - End of paragraph detected.
     *** True Line Result
     
    -** Processing line: ~*** Rpg Narrative - Return Of Serenity - storyline_final_message.rb~
    +** Processing line: ~*** Rpg Narrative - Return Of Serenity - storyline_speed_of_light.rb~
     - Header detected.
     *** True Line Result
     
     *** True Line Result
    -*** Rpg Narrative - Return Of Serenity - storyline_final_message.rb
    +*** Rpg Narrative - Return Of Serenity - storyline_speed_of_light.rb
     ** Processing line: ~#+begin_src ruby~
     - Line was identified as the beginning of a code block.
     *** True Line Result
     
     *** True Line Result
     #+begin_src ruby
    -** Processing line: ~  # ./samples/99_genre_rpg_narrative/return_of_serenity/app/storyline_final_message.rb~
    +** Processing line: ~  # ./samples/99_genre_rpg_narrative/return_of_serenity/app/storyline_speed_of_light.rb~
     - Inside source: true
     *** True Line Result
    -  # ./samples/99_genre_rpg_narrative/return_of_serenity/app/storyline_final_message.rb
    -** Processing line: ~  def final_message_sad args~
    +  # ./samples/99_genre_rpg_narrative/return_of_serenity/app/storyline_speed_of_light.rb
    +** Processing line: ~  def speed_of_light_front_of_home args~
     - Inside source: true
     *** True Line Result
    -  def final_message_sad args
    +  def speed_of_light_front_of_home args
     ** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
         {
    -** Processing line: ~      fade: 60,~
    -- Inside source: true
    -*** True Line Result
    -      fade: 60,
    -** Processing line: ~      background: 'sprites/inside-home.png',~
    -- Inside source: true
    -*** True Line Result
    -      background: 'sprites/inside-home.png',
    -** Processing line: ~      player: [34, 35],~
    -- Inside source: true
    -*** True Line Result
    -      player: [34, 35],
    -** Processing line: ~      storylines: [~
    -- Inside source: true
    -*** True Line Result
    -      storylines: [
    -** Processing line: ~        [34, 34, 4, 4, "Another-- sleepless-- night..."],~
    +** Processing line: ~      background: 'sprites/front-of-home.png',~
     - Inside source: true
     *** True Line Result
    -        [34, 34, 4, 4, "Another-- sleepless-- night..."],
    -** Processing line: ~      ],~
    +      background: 'sprites/front-of-home.png',
    +** Processing line: ~      player: [54, 23],~
     - Inside source: true
     *** True Line Result
    -      ],
    +      player: [54, 23],
     ** Processing line: ~      scenes: [~
     - Inside source: true
     *** True Line Result
           scenes: [
    -** Processing line: ~        [32, -1, 8, 3, :final_message_observatory]~
    +** Processing line: ~        [44, 34, 8, 14, :speed_of_light_inside_home],~
     - Inside source: true
     *** True Line Result
    -        [32, -1, 8, 3, :final_message_observatory]
    +        [44, 34, 8, 14, :speed_of_light_inside_home],
    +** Processing line: ~        [0, 3, 3, 22, :speed_of_light_outside_library]~
    +- Inside source: true
    +*** True Line Result
    +        [0, 3, 3, 22, :speed_of_light_outside_library]
     ** Processing line: ~      ]~
     - Inside source: true
     *** True Line Result
    @@ -139939,34 +145815,30 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def final_message_happy args~
    +** Processing line: ~  def speed_of_light_inside_home args~
     - Inside source: true
     *** True Line Result
    -  def final_message_happy args
    +  def speed_of_light_inside_home args
     ** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
         {
    -** Processing line: ~      fade: 60,~
    -- Inside source: true
    -*** True Line Result
    -      fade: 60,
     ** Processing line: ~      background: 'sprites/inside-home.png',~
     - Inside source: true
     *** True Line Result
           background: 'sprites/inside-home.png',
    -** Processing line: ~      player: [34, 35],~
    +** Processing line: ~      player: [35, 4],~
     - Inside source: true
     *** True Line Result
    -      player: [34, 35],
    +      player: [35, 4],
     ** Processing line: ~      storylines: [~
     - Inside source: true
     *** True Line Result
           storylines: [
    -** Processing line: ~        [34, 34, 4, 4, "Oh man, I slept like rock!"],~
    +** Processing line: ~        [30, 38, 12, 13, "Can't- sleep right now. I have to- find- out- why- it took- over-- 4- hours-- to receive-- that message."]~
     - Inside source: true
     *** True Line Result
    -        [34, 34, 4, 4, "Oh man, I slept like rock!"],
    +        [30, 38, 12, 13, "Can't- sleep right now. I have to- find- out- why- it took- over-- 4- hours-- to receive-- that message."]
     ** Processing line: ~      ],~
     - Inside source: true
     *** True Line Result
    @@ -139975,10 +145847,10 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
           scenes: [
    -** Processing line: ~        [32, -1, 8, 3, :final_message_observatory]~
    +** Processing line: ~        [32, 0, 8, 3, :speed_of_light_front_of_home],~
     - Inside source: true
     *** True Line Result
    -        [32, -1, 8, 3, :final_message_observatory]
    +        [32, 0, 8, 3, :speed_of_light_front_of_home],
     ** Processing line: ~      ]~
     - Inside source: true
     *** True Line Result
    @@ -139995,42 +145867,38 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def final_message_side_of_home args~
    +** Processing line: ~  def speed_of_light_outside_library args~
     - Inside source: true
     *** True Line Result
    -  def final_message_side_of_home args
    +  def speed_of_light_outside_library args
     ** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
         {
    -** Processing line: ~      fade: 60,~
    -- Inside source: true
    -*** True Line Result
    -      fade: 60,
    -** Processing line: ~      background: 'sprites/side-of-home.png',~
    +** Processing line: ~      background: 'sprites/outside-library.png',~
     - Inside source: true
     *** True Line Result
    -      background: 'sprites/side-of-home.png',
    -** Processing line: ~      player: [16, 13],~
    +      background: 'sprites/outside-library.png',
    +** Processing line: ~      player: [55, 19],~
     - Inside source: true
     *** True Line Result
    -      player: [16, 13],
    +      player: [55, 19],
     ** Processing line: ~      scenes: [~
     - Inside source: true
     *** True Line Result
           scenes: [
    -** Processing line: ~        [52, 24, 11, 5, :final_message_mountain_pass],~
    +** Processing line: ~        [49, 39, 6, 10, :speed_of_light_library],~
     - Inside source: true
     *** True Line Result
    -        [52, 24, 11, 5, :final_message_mountain_pass],
    -** Processing line: ~      ],~
    +        [49, 39, 6, 10, :speed_of_light_library],
    +** Processing line: ~        [61, 11, 3, 20, :speed_of_light_front_of_home]~
     - Inside source: true
     *** True Line Result
    -      ],
    -** Processing line: ~      render_override: :blinking_light_side_of_home_render~
    +        [61, 11, 3, 20, :speed_of_light_front_of_home]
    +** Processing line: ~      ]~
     - Inside source: true
     *** True Line Result
    -      render_override: :blinking_light_side_of_home_render
    +      ]
     ** Processing line: ~    }~
     - Inside source: true
     *** True Line Result
    @@ -140043,50 +145911,34 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def final_message_mountain_pass args~
    +** Processing line: ~  def speed_of_light_library args~
     - Inside source: true
     *** True Line Result
    -  def final_message_mountain_pass args
    +  def speed_of_light_library args
     ** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
         {
    -** Processing line: ~      background: 'sprites/mountain-pass-zoomed-out.png',~
    +** Processing line: ~      background: 'sprites/library.png',~
     - Inside source: true
     *** True Line Result
    -      background: 'sprites/mountain-pass-zoomed-out.png',
    -** Processing line: ~      player: [4, 4],~
    +      background: 'sprites/library.png',
    +** Processing line: ~      player: [30, 7],~
     - Inside source: true
     *** True Line Result
    -      player: [4, 4],
    +      player: [30, 7],
     ** Processing line: ~      scenes: [~
     - Inside source: true
     *** True Line Result
           scenes: [
    -** Processing line: ~        [18, 47, 5, 5, :final_message_path_to_observatory],~
    -- Inside source: true
    -*** True Line Result
    -        [18, 47, 5, 5, :final_message_path_to_observatory],
    -** Processing line: ~      ],~
    -- Inside source: true
    -*** True Line Result
    -      ],
    -** Processing line: ~      storylines: [~
    -- Inside source: true
    -*** True Line Result
    -      storylines: [
    -** Processing line: ~        [18, 13, 5, 5, "Hnnnnnnnggg. My legs-- are still sore- from yesterday."]~
    -- Inside source: true
    -*** True Line Result
    -        [18, 13, 5, 5, "Hnnnnnnnggg. My legs-- are still sore- from yesterday."]
    -** Processing line: ~      ],~
    +** Processing line: ~        [3, 50, 10, 3, :speed_of_light_celestial_bodies_diagram]~
     - Inside source: true
     *** True Line Result
    -      ],
    -** Processing line: ~      render_override: :blinking_light_mountain_pass_render~
    +        [3, 50, 10, 3, :speed_of_light_celestial_bodies_diagram]
    +** Processing line: ~      ]~
     - Inside source: true
     *** True Line Result
    -      render_override: :blinking_light_mountain_pass_render
    +      ]
     ** Processing line: ~    }~
     - Inside source: true
     *** True Line Result
    @@ -140099,30 +145951,34 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def final_message_path_to_observatory args~
    +** Processing line: ~  def speed_of_light_celestial_bodies_diagram args~
     - Inside source: true
     *** True Line Result
    -  def final_message_path_to_observatory args
    +  def speed_of_light_celestial_bodies_diagram args
     ** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
         {
    -** Processing line: ~      background: 'sprites/path-to-observatory.png',~
    +** Processing line: ~      background: 'sprites/planets.png',~
     - Inside source: true
     *** True Line Result
    -      background: 'sprites/path-to-observatory.png',
    -** Processing line: ~      player: [60, 4],~
    +      background: 'sprites/planets.png',
    +** Processing line: ~      fade: 60,~
     - Inside source: true
     *** True Line Result
    -      player: [60, 4],
    +      fade: 60,
    +** Processing line: ~      player: [30, 3],~
    +- Inside source: true
    +*** True Line Result
    +      player: [30, 3],
     ** Processing line: ~      scenes: [~
     - Inside source: true
     *** True Line Result
           scenes: [
    -** Processing line: ~        [0, 26, 5, 5, :final_message_observatory]~
    +** Processing line: ~        [56 - 2, 10, 5, 5, :speed_of_light_distance_discovered]~
     - Inside source: true
     *** True Line Result
    -        [0, 26, 5, 5, :final_message_observatory]
    +        [56 - 2, 10, 5, 5, :speed_of_light_distance_discovered]
     ** Processing line: ~      ],~
     - Inside source: true
     *** True Line Result
    @@ -140131,142 +145987,146 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
           storylines: [
    -** Processing line: ~        [22, 20, 10, 10, "This spot--, on the mountain, right here, it's-- perfect. This- is where- I'll-- yeet-- the person-- who is playing-- this- prank- on me."]~
    +** Processing line: ~        [30, 2, 4, 4, "Here- it is! This is a diagram--- of the solar-- system--. It was printed-- over-- fifty-- years- ago. Geez-- that's-- old."],~
     - Inside source: true
     *** True Line Result
    -        [22, 20, 10, 10, "This spot--, on the mountain, right here, it's-- perfect. This- is where- I'll-- yeet-- the person-- who is playing-- this- prank- on me."]
    -** Processing line: ~      ],~
    +        [30, 2, 4, 4, "Here- it is! This is a diagram--- of the solar-- system--. It was printed-- over-- fifty-- years- ago. Geez-- that's-- old."],
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      ],
    -** Processing line: ~      render_override: :blinking_light_path_to_observatory_render~
    +
    +** Processing line: ~        [ 0 - 2, 10, 5, 5, "The label- reads: Sun. The length- of the Astronomical-------- Unit-- (AU), is the distance-- from the Sun- to the Earth. Which is about 150--- million--- kilometers----."],~
     - Inside source: true
     *** True Line Result
    -      render_override: :blinking_light_path_to_observatory_render
    -** Processing line: ~    }~
    +        [ 0 - 2, 10, 5, 5, "The label- reads: Sun. The length- of the Astronomical-------- Unit-- (AU), is the distance-- from the Sun- to the Earth. Which is about 150--- million--- kilometers----."],
    +** Processing line: ~        [ 7 - 2, 10, 5, 5, "The label- reads: Mercury. Distance from Sun: 0.39AU------------ or- 3----- light-- minutes--."],~
     - Inside source: true
     *** True Line Result
    -    }
    -** Processing line: ~  end~
    +        [ 7 - 2, 10, 5, 5, "The label- reads: Mercury. Distance from Sun: 0.39AU------------ or- 3----- light-- minutes--."],
    +** Processing line: ~        [14 - 2, 10, 5, 5, "The label- reads: Venus. Distance from Sun: 0.72AU------------ or- 6----- light-- minutes--."],~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +        [14 - 2, 10, 5, 5, "The label- reads: Venus. Distance from Sun: 0.72AU------------ or- 6----- light-- minutes--."],
    +** Processing line: ~        [21 - 2, 10, 5, 5, "The label- reads: Earth. Distance from Sun: 1.00AU------------ or- 8----- light-- minutes--."],~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def final_message_observatory args~
    +        [21 - 2, 10, 5, 5, "The label- reads: Earth. Distance from Sun: 1.00AU------------ or- 8----- light-- minutes--."],
    +** Processing line: ~        [28 - 2, 10, 5, 5, "The label- reads: Mars. Distance from Sun: 1.52AU------------ or- 12----- light-- minutes--."],~
     - Inside source: true
     *** True Line Result
    -  def final_message_observatory args
    -** Processing line: ~    if args.state.scene_history.include? :replied_with_whole_truth~
    +        [28 - 2, 10, 5, 5, "The label- reads: Mars. Distance from Sun: 1.52AU------------ or- 12----- light-- minutes--."],
    +** Processing line: ~        [35 - 2, 10, 5, 5, "The label- reads: Jupiter. Distance from Sun: 5.20AU------------ or- 45----- light-- minutes--."],~
     - Inside source: true
     *** True Line Result
    -    if args.state.scene_history.include? :replied_with_whole_truth
    -** Processing line: ~      return {~
    +        [35 - 2, 10, 5, 5, "The label- reads: Jupiter. Distance from Sun: 5.20AU------------ or- 45----- light-- minutes--."],
    +** Processing line: ~        [42 - 2, 10, 5, 5, "The label- reads: Saturn. Distance from Sun: 9.53AU------------ or- 79----- light-- minutes--."],~
     - Inside source: true
     *** True Line Result
    -      return {
    -** Processing line: ~        background: 'sprites/inside-observatory.png',~
    +        [42 - 2, 10, 5, 5, "The label- reads: Saturn. Distance from Sun: 9.53AU------------ or- 79----- light-- minutes--."],
    +** Processing line: ~        [49 - 2, 10, 5, 5, "The label- reads: Uranus. Distance from Sun: 19.81AU------------ or- 159----- light-- minutes--."],~
     - Inside source: true
     *** True Line Result
    -        background: 'sprites/inside-observatory.png',
    -** Processing line: ~        fade: 60,~
    +        [49 - 2, 10, 5, 5, "The label- reads: Uranus. Distance from Sun: 19.81AU------------ or- 159----- light-- minutes--."],
    +** Processing line: ~        # [56 - 2, 15, 4, 4, "The label- reads: Neptune. Distance from Sun: 30.05AU------------ or- 4.1----- light-- hours--."],~
     - Inside source: true
     *** True Line Result
    -        fade: 60,
    -** Processing line: ~        player: [51, 12],~
    +        # [56 - 2, 15, 4, 4, "The label- reads: Neptune. Distance from Sun: 30.05AU------------ or- 4.1----- light-- hours--."],
    +** Processing line: ~        [63 - 2, 10, 5, 5, "The label- reads: Pluto. Wait. WTF? Pluto-- isn't-- a planet."],~
     - Inside source: true
     *** True Line Result
    -        player: [51, 12],
    -** Processing line: ~        storylines: [~
    +        [63 - 2, 10, 5, 5, "The label- reads: Pluto. Wait. WTF? Pluto-- isn't-- a planet."],
    +** Processing line: ~      ]~
     - Inside source: true
     *** True Line Result
    -        storylines: [
    -** Processing line: ~          [50, 10, 4, 4, "Here-- we- go..."]~
    +      ]
    +** Processing line: ~    }~
     - Inside source: true
     *** True Line Result
    -          [50, 10, 4, 4, "Here-- we- go..."]
    -** Processing line: ~        ],~
    +    }
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -        ],
    -** Processing line: ~        scenes: [~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        scenes: [
    -** Processing line: ~          [30, 18, 5, 12, :final_message_inside_mainframe]~
    +
    +** Processing line: ~  def speed_of_light_distance_discovered args~
     - Inside source: true
     *** True Line Result
    -          [30, 18, 5, 12, :final_message_inside_mainframe]
    -** Processing line: ~        ],~
    +  def speed_of_light_distance_discovered args
    +** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
    -        ],
    -** Processing line: ~        render_override: :blinking_light_inside_observatory_render~
    +    {
    +** Processing line: ~      background: 'sprites/planets.png',~
     - Inside source: true
     *** True Line Result
    -        render_override: :blinking_light_inside_observatory_render
    -** Processing line: ~      }~
    +      background: 'sprites/planets.png',
    +** Processing line: ~      scenes: [~
     - Inside source: true
     *** True Line Result
    -      }
    -** Processing line: ~    else~
    +      scenes: [
    +** Processing line: ~        [13, 0, 44, 3, :speed_of_light_end_of_day]~
     - Inside source: true
     *** True Line Result
    -    else
    -** Processing line: ~      return {~
    +        [13, 0, 44, 3, :speed_of_light_end_of_day]
    +** Processing line: ~      ],~
     - Inside source: true
     *** True Line Result
    -      return {
    -** Processing line: ~        background: 'sprites/inside-observatory.png',~
    +      ],
    +** Processing line: ~      storylines: [~
     - Inside source: true
     *** True Line Result
    -        background: 'sprites/inside-observatory.png',
    -** Processing line: ~        fade: 60,~
    +      storylines: [
    +** Processing line: ~        [ 0 - 2, 10, 5, 5, "The label- reads: Sun. The length- of the Astronomical-------- Unit-- (AU), is the distance-- from the Sun- to the Earth. Which is about 150--- million--- kilometers----."],~
     - Inside source: true
     *** True Line Result
    -        fade: 60,
    -** Processing line: ~        player: [51, 12],~
    +        [ 0 - 2, 10, 5, 5, "The label- reads: Sun. The length- of the Astronomical-------- Unit-- (AU), is the distance-- from the Sun- to the Earth. Which is about 150--- million--- kilometers----."],
    +** Processing line: ~        [ 7 - 2, 10, 5, 5, "The label- reads: Mercury. Distance from Sun: 0.39AU------------ or- 3----- light-- minutes--."],~
     - Inside source: true
     *** True Line Result
    -        player: [51, 12],
    -** Processing line: ~        storylines: [~
    +        [ 7 - 2, 10, 5, 5, "The label- reads: Mercury. Distance from Sun: 0.39AU------------ or- 3----- light-- minutes--."],
    +** Processing line: ~        [14 - 2, 10, 5, 5, "The label- reads: Venus. Distance from Sun: 0.72AU------------ or- 6----- light-- minutes--."],~
     - Inside source: true
     *** True Line Result
    -        storylines: [
    -** Processing line: ~          [50, 10, 4, 4, "I feel like I'm-- walking-- on sunshine!"]~
    +        [14 - 2, 10, 5, 5, "The label- reads: Venus. Distance from Sun: 0.72AU------------ or- 6----- light-- minutes--."],
    +** Processing line: ~        [21 - 2, 10, 5, 5, "The label- reads: Earth. Distance from Sun: 1.00AU------------ or- 8----- light-- minutes--."],~
     - Inside source: true
     *** True Line Result
    -          [50, 10, 4, 4, "I feel like I'm-- walking-- on sunshine!"]
    -** Processing line: ~        ],~
    +        [21 - 2, 10, 5, 5, "The label- reads: Earth. Distance from Sun: 1.00AU------------ or- 8----- light-- minutes--."],
    +** Processing line: ~        [28 - 2, 10, 5, 5, "The label- reads: Mars. Distance from Sun: 1.52AU------------ or- 12----- light-- minutes--."],~
     - Inside source: true
     *** True Line Result
    -        ],
    -** Processing line: ~        scenes: [~
    +        [28 - 2, 10, 5, 5, "The label- reads: Mars. Distance from Sun: 1.52AU------------ or- 12----- light-- minutes--."],
    +** Processing line: ~        [35 - 2, 10, 5, 5, "The label- reads: Jupiter. Distance from Sun: 5.20AU------------ or- 45----- light-- minutes--."],~
     - Inside source: true
     *** True Line Result
    -        scenes: [
    -** Processing line: ~          [30, 18, 5, 12, :final_message_inside_mainframe]~
    +        [35 - 2, 10, 5, 5, "The label- reads: Jupiter. Distance from Sun: 5.20AU------------ or- 45----- light-- minutes--."],
    +** Processing line: ~        [42 - 2, 10, 5, 5, "The label- reads: Saturn. Distance from Sun: 9.53AU------------ or- 79----- light-- minutes--."],~
     - Inside source: true
     *** True Line Result
    -          [30, 18, 5, 12, :final_message_inside_mainframe]
    -** Processing line: ~        ],~
    +        [42 - 2, 10, 5, 5, "The label- reads: Saturn. Distance from Sun: 9.53AU------------ or- 79----- light-- minutes--."],
    +** Processing line: ~        [49 - 2, 10, 5, 5, "The label- reads: Uranus. Distance from Sun: 19.81AU------------ or- 159----- light-- minutes--."],~
     - Inside source: true
     *** True Line Result
    -        ],
    -** Processing line: ~        render_override: :blinking_light_inside_observatory_render~
    +        [49 - 2, 10, 5, 5, "The label- reads: Uranus. Distance from Sun: 19.81AU------------ or- 159----- light-- minutes--."],
    +** Processing line: ~        [56 - 2, 10, 5, 5, "The label- reads: Neptune. Distance from Sun: 30.05AU------------ or- 4.1----- light-- hours--. What?! The message--- I received-- was from a source-- farther-- than-- Neptune?!"],~
     - Inside source: true
     *** True Line Result
    -        render_override: :blinking_light_inside_observatory_render
    -** Processing line: ~      }~
    +        [56 - 2, 10, 5, 5, "The label- reads: Neptune. Distance from Sun: 30.05AU------------ or- 4.1----- light-- hours--. What?! The message--- I received-- was from a source-- farther-- than-- Neptune?!"],
    +** Processing line: ~        [63 - 2, 10, 5, 5, "The label- reads: Pluto. Dista- Wait... Pluto-- isn't-- a planet. People-- thought- Pluto-- was a planet-- back- then?--"],~
     - Inside source: true
     *** True Line Result
    -      }
    -** Processing line: ~    end~
    +        [63 - 2, 10, 5, 5, "The label- reads: Pluto. Dista- Wait... Pluto-- isn't-- a planet. People-- thought- Pluto-- was a planet-- back- then?--"],
    +** Processing line: ~      ]~
     - Inside source: true
     *** True Line Result
    -    end
    +      ]
    +** Processing line: ~    }~
    +- Inside source: true
    +*** True Line Result
    +    }
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -140275,30 +146135,50 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def final_message_inside_mainframe args~
    +** Processing line: ~  def speed_of_light_end_of_day args~
     - Inside source: true
     *** True Line Result
    -  def final_message_inside_mainframe args
    +  def speed_of_light_end_of_day args
     ** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
         {
    -** Processing line: ~      player: [32, 4],~
    +** Processing line: ~      fade: 60,~
     - Inside source: true
     *** True Line Result
    -      player: [32, 4],
    -** Processing line: ~      background: 'sprites/mainframe.png',~
    +      fade: 60,
    +** Processing line: ~      background: 'sprites/inside-home.png',~
     - Inside source: true
     *** True Line Result
    -      background: 'sprites/mainframe.png',
    -** Processing line: ~      fade: 60,~
    +      background: 'sprites/inside-home.png',
    +** Processing line: ~      player: [35, 0],~
     - Inside source: true
     *** True Line Result
    -      fade: 60,
    -** Processing line: ~      scenes: [[45, 45,  4, 4, :final_message_check_ship_status]]~
    +      player: [35, 0],
    +** Processing line: ~      storylines: [~
     - Inside source: true
     *** True Line Result
    -      scenes: [[45, 45,  4, 4, :final_message_check_ship_status]]
    +      storylines: [
    +** Processing line: ~        [35, 10, 4, 4, "Wonder-- what the reply-- will be. Who- the hell is contacting--- me from beyond-- Neptune? This- has to be some- kind- of- joke."]~
    +- Inside source: true
    +*** True Line Result
    +        [35, 10, 4, 4, "Wonder-- what the reply-- will be. Who- the hell is contacting--- me from beyond-- Neptune? This- has to be some- kind- of- joke."]
    +** Processing line: ~      ],~
    +- Inside source: true
    +*** True Line Result
    +      ],
    +** Processing line: ~      scenes: [~
    +- Inside source: true
    +*** True Line Result
    +      scenes: [
    +** Processing line: ~        [31, 38, 10, 12, :serenity_alive_side_of_home]~
    +- Inside source: true
    +*** True Line Result
    +        [31, 38, 10, 12, :serenity_alive_side_of_home]
    +** Processing line: ~      ]~
    +- Inside source: true
    +*** True Line Result
    +      ]
     ** Processing line: ~    }~
     - Inside source: true
     *** True Line Result
    @@ -140311,278 +146191,406 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def final_message_check_ship_status args~
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
    +*** True Line Result
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +
    +** Processing line: ~*** Rpg Roguelike - Roguelike Starting Point - constants.rb~
    +- Header detected.
    +*** True Line Result
    +
    +*** True Line Result
    +*** Rpg Roguelike - Roguelike Starting Point - constants.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/99_genre_rpg_roguelike/01_roguelike_starting_point/app/constants.rb~
     - Inside source: true
     *** True Line Result
    -  def final_message_check_ship_status args
    -** Processing line: ~    {~
    +  # ./samples/99_genre_rpg_roguelike/01_roguelike_starting_point/app/constants.rb
    +** Processing line: ~  SHOW_LEGEND = true~
     - Inside source: true
     *** True Line Result
    -    {
    -** Processing line: ~      background: 'sprites/mainframe.png',~
    +  SHOW_LEGEND = true
    +** Processing line: ~  SOURCE_TILE_SIZE = 16~
     - Inside source: true
     *** True Line Result
    -      background: 'sprites/mainframe.png',
    -** Processing line: ~      storylines: [~
    +  SOURCE_TILE_SIZE = 16
    +** Processing line: ~  DESTINATION_TILE_SIZE = 16~
     - Inside source: true
     *** True Line Result
    -      storylines: [
    -** Processing line: ~        [45, 45, 4, 4, (final_message_current args)],~
    +  DESTINATION_TILE_SIZE = 16
    +** Processing line: ~  TILE_SHEET_SIZE = 256~
     - Inside source: true
     *** True Line Result
    -        [45, 45, 4, 4, (final_message_current args)],
    -** Processing line: ~      ],~
    +  TILE_SHEET_SIZE = 256
    +** Processing line: ~  TILE_R = 0~
     - Inside source: true
     *** True Line Result
    -      ],
    -** Processing line: ~      scenes: [~
    +  TILE_R = 0
    +** Processing line: ~  TILE_G = 0~
     - Inside source: true
     *** True Line Result
    -      scenes: [
    -** Processing line: ~        [*hotspot_top, :final_message_ship_status],~
    +  TILE_G = 0
    +** Processing line: ~  TILE_B = 0~
     - Inside source: true
     *** True Line Result
    -        [*hotspot_top, :final_message_ship_status],
    -** Processing line: ~      ]~
    +  TILE_B = 0
    +** Processing line: ~  TILE_A = 255~
     - Inside source: true
     *** True Line Result
    -      ]
    -** Processing line: ~    }~
    +  TILE_A = 255
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    }
    -** Processing line: ~  end~
    +
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
    +*** True Line Result
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +
    +** Processing line: ~*** Rpg Roguelike - Roguelike Starting Point - legend.rb~
    +- Header detected.
    +*** True Line Result
    +
    +*** True Line Result
    +*** Rpg Roguelike - Roguelike Starting Point - legend.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/99_genre_rpg_roguelike/01_roguelike_starting_point/app/legend.rb~
     - Inside source: true
     *** True Line Result
    -  end
    +  # ./samples/99_genre_rpg_roguelike/01_roguelike_starting_point/app/legend.rb
    +** Processing line: ~  def tick_legend args~
    +- Inside source: true
    +*** True Line Result
    +  def tick_legend args
    +** Processing line: ~    return unless SHOW_LEGEND~
    +- Inside source: true
    +*** True Line Result
    +    return unless SHOW_LEGEND
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def final_message_ship_status args~
    +** Processing line: ~    legend_padding = 16~
     - Inside source: true
     *** True Line Result
    -  def final_message_ship_status args
    -** Processing line: ~    {~
    +    legend_padding = 16
    +** Processing line: ~    legend_x = 1280 - TILE_SHEET_SIZE - legend_padding~
     - Inside source: true
     *** True Line Result
    -    {
    -** Processing line: ~      background: 'sprites/serenity.png',~
    +    legend_x = 1280 - TILE_SHEET_SIZE - legend_padding
    +** Processing line: ~    legend_y =  720 - TILE_SHEET_SIZE - legend_padding~
     - Inside source: true
     *** True Line Result
    -      background: 'sprites/serenity.png',
    -** Processing line: ~      fade: 60,~
    +    legend_y =  720 - TILE_SHEET_SIZE - legend_padding
    +** Processing line: ~    tile_sheet_sprite = [legend_x,~
     - Inside source: true
     *** True Line Result
    -      fade: 60,
    -** Processing line: ~      player: [30, 10],~
    +    tile_sheet_sprite = [legend_x,
    +** Processing line: ~                         legend_y,~
     - Inside source: true
     *** True Line Result
    -      player: [30, 10],
    -** Processing line: ~      scenes: [~
    +                         legend_y,
    +** Processing line: ~                         TILE_SHEET_SIZE,~
     - Inside source: true
     *** True Line Result
    -      scenes: [
    -** Processing line: ~        [30, 50, 4, 4, :final_message_ship_status_reviewed]~
    +                         TILE_SHEET_SIZE,
    +** Processing line: ~                         TILE_SHEET_SIZE,~
     - Inside source: true
     *** True Line Result
    -        [30, 50, 4, 4, :final_message_ship_status_reviewed]
    -** Processing line: ~      ],~
    +                         TILE_SHEET_SIZE,
    +** Processing line: ~                         'sprites/simple-mood-16x16.png', 0,~
     - Inside source: true
     *** True Line Result
    -      ],
    -** Processing line: ~      storylines: [~
    +                         'sprites/simple-mood-16x16.png', 0,
    +** Processing line: ~                         TILE_A,~
     - Inside source: true
     *** True Line Result
    -      storylines: [
    -** Processing line: ~        [30,  8, 4, 4, "Let me make- sure- everything--- looks good. It'll-- give me peace- of mind."],~
    +                         TILE_A,
    +** Processing line: ~                         TILE_R,~
     - Inside source: true
     *** True Line Result
    -        [30,  8, 4, 4, "Let me make- sure- everything--- looks good. It'll-- give me peace- of mind."],
    -** Processing line: ~        *final_message_ship_status_shared(args)~
    +                         TILE_R,
    +** Processing line: ~                         TILE_G,~
     - Inside source: true
     *** True Line Result
    -        *final_message_ship_status_shared(args)
    -** Processing line: ~      ]~
    +                         TILE_G,
    +** Processing line: ~                         TILE_B]~
     - Inside source: true
     *** True Line Result
    -      ]
    -** Processing line: ~    }~
    +                         TILE_B]
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    }
    -** Processing line: ~  end~
    +
    +** Processing line: ~    if args.inputs.mouse.point.inside_rect? tile_sheet_sprite~
     - Inside source: true
     *** True Line Result
    -  end
    +    if args.inputs.mouse.point.inside_rect? tile_sheet_sprite
    +** Processing line: ~      mouse_row = args.inputs.mouse.point.y.idiv(SOURCE_TILE_SIZE)~
    +- Inside source: true
    +*** True Line Result
    +      mouse_row = args.inputs.mouse.point.y.idiv(SOURCE_TILE_SIZE)
    +** Processing line: ~      tile_row = 15 - (mouse_row - legend_y.idiv(SOURCE_TILE_SIZE))~
    +- Inside source: true
    +*** True Line Result
    +      tile_row = 15 - (mouse_row - legend_y.idiv(SOURCE_TILE_SIZE))
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def final_message_ship_status_reviewed args~
    +** Processing line: ~      mouse_col = args.inputs.mouse.point.x.idiv(SOURCE_TILE_SIZE)~
     - Inside source: true
     *** True Line Result
    -  def final_message_ship_status_reviewed args
    -** Processing line: ~    {~
    +      mouse_col = args.inputs.mouse.point.x.idiv(SOURCE_TILE_SIZE)
    +** Processing line: ~      tile_col = (mouse_col - legend_x.idiv(SOURCE_TILE_SIZE))~
     - Inside source: true
     *** True Line Result
    -    {
    -** Processing line: ~      background: 'sprites/serenity.png',~
    +      tile_col = (mouse_col - legend_x.idiv(SOURCE_TILE_SIZE))
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      background: 'sprites/serenity.png',
    -** Processing line: ~      fade: 60,~
    +
    +** Processing line: ~      args.outputs.primitives << [legend_x - legend_padding * 2,~
     - Inside source: true
     *** True Line Result
    -      fade: 60,
    -** Processing line: ~      scenes: [~
    +      args.outputs.primitives << [legend_x - legend_padding * 2,
    +** Processing line: ~                                  mouse_row * SOURCE_TILE_SIZE, 256 + legend_padding * 2, 16, 128, 128, 128, 64].solid~
     - Inside source: true
     *** True Line Result
    -      scenes: [
    -** Processing line: ~        [*hotspot_bottom, :final_message_summary]~
    +                                  mouse_row * SOURCE_TILE_SIZE, 256 + legend_padding * 2, 16, 128, 128, 128, 64].solid
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        [*hotspot_bottom, :final_message_summary]
    -** Processing line: ~      ],~
    +
    +** Processing line: ~      args.outputs.primitives << [mouse_col * SOURCE_TILE_SIZE,~
     - Inside source: true
     *** True Line Result
    -      ],
    -** Processing line: ~      storylines: [~
    +      args.outputs.primitives << [mouse_col * SOURCE_TILE_SIZE,
    +** Processing line: ~                                  legend_y - legend_padding * 2, 16, 256 + legend_padding * 2, 128, 128, 128, 64].solid~
     - Inside source: true
     *** True Line Result
    -      storylines: [
    -** Processing line: ~        [0, 62, 62, 3, "Whew. Everyone-- is in their- chambers. The engines-- are roaring-- and Serenity-- is coming-- home."],~
    +                                  legend_y - legend_padding * 2, 16, 256 + legend_padding * 2, 128, 128, 128, 64].solid
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        [0, 62, 62, 3, "Whew. Everyone-- is in their- chambers. The engines-- are roaring-- and Serenity-- is coming-- home."],
    -** Processing line: ~      ]~
    +
    +** Processing line: ~      sprite_key = sprite_lookup.find { |k, v| v == [tile_row, tile_col] }~
    +- Inside source: true
    +*** True Line Result
    +      sprite_key = sprite_lookup.find { |k, v| v == [tile_row, tile_col] }
    +** Processing line: ~      if sprite_key~
    +- Inside source: true
    +*** True Line Result
    +      if sprite_key
    +** Processing line: ~        member_name, _ = sprite_key~
    +- Inside source: true
    +*** True Line Result
    +        member_name, _ = sprite_key
    +** Processing line: ~        member_name = member_name_as_code member_name~
    +- Inside source: true
    +*** True Line Result
    +        member_name = member_name_as_code member_name
    +** Processing line: ~        args.outputs.labels << [660, 70, "# CODE SAMPLE (place in the tick_game method located in main.rb)", -1, 0]~
    +- Inside source: true
    +*** True Line Result
    +        args.outputs.labels << [660, 70, "# CODE SAMPLE (place in the tick_game method located in main.rb)", -1, 0]
    +** Processing line: ~        args.outputs.labels << [660, 50, "#                                    GRID_X, GRID_Y, TILE_KEY", -1, 0]~
    +- Inside source: true
    +*** True Line Result
    +        args.outputs.labels << [660, 50, "#                                    GRID_X, GRID_Y, TILE_KEY", -1, 0]
    +** Processing line: ~        args.outputs.labels << [660, 30, "args.outputs.sprites << tile_in_game(     5,      6, #{member_name}    )", -1, 0]~
    +- Inside source: true
    +*** True Line Result
    +        args.outputs.labels << [660, 30, "args.outputs.sprites << tile_in_game(     5,      6, #{member_name}    )", -1, 0]
    +** Processing line: ~      else~
    +- Inside source: true
    +*** True Line Result
    +      else
    +** Processing line: ~        args.outputs.labels << [660, 50, "Tile [#{tile_row}, #{tile_col}] not found. Add a key and value to app/sprite_lookup.rb:", -1, 0]~
    +- Inside source: true
    +*** True Line Result
    +        args.outputs.labels << [660, 50, "Tile [#{tile_row}, #{tile_col}] not found. Add a key and value to app/sprite_lookup.rb:", -1, 0]
    +** Processing line: ~        args.outputs.labels << [660, 30, "{ \"some_string\" => [#{tile_row}, #{tile_col}] } OR { some_symbol: [#{tile_row}, #{tile_col}] }.", -1, 0]~
    +- Inside source: true
    +*** True Line Result
    +        args.outputs.labels << [660, 30, "{ \"some_string\" => [#{tile_row}, #{tile_col}] } OR { some_symbol: [#{tile_row}, #{tile_col}] }.", -1, 0]
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~    # render the sprite in the top right with a padding to the top and right so it's~
     - Inside source: true
     *** True Line Result
    -      ]
    -** Processing line: ~    }~
    +    # render the sprite in the top right with a padding to the top and right so it's
    +** Processing line: ~    # not flush against the edge~
     - Inside source: true
     *** True Line Result
    -    }
    -** Processing line: ~  end~
    +    # not flush against the edge
    +** Processing line: ~    args.outputs.sprites << tile_sheet_sprite~
     - Inside source: true
     *** True Line Result
    -  end
    +    args.outputs.sprites << tile_sheet_sprite
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def final_message_ship_status_shared args~
    +** Processing line: ~    # carefully place some ascii arrows to show the legend labels~
     - Inside source: true
     *** True Line Result
    -  def final_message_ship_status_shared args
    -** Processing line: ~    [~
    +    # carefully place some ascii arrows to show the legend labels
    +** Processing line: ~    args.outputs.labels  <<  [895, 707, "ROW --->"]~
     - Inside source: true
     *** True Line Result
    -    [
    -** Processing line: ~      *ship_control_hotspot( 0, 50,~
    +    args.outputs.labels  <<  [895, 707, "ROW --->"]
    +** Processing line: ~    args.outputs.labels  <<  [943, 412, "       ^"]~
     - Inside source: true
     *** True Line Result
    -      *ship_control_hotspot( 0, 50,
    -** Processing line: ~                             "Stasis-- Chambers--: Online, All chambers-- are powered. Battery--- Allocation---: 3--- of-- 3--.",~
    +    args.outputs.labels  <<  [943, 412, "       ^"]
    +** Processing line: ~    args.outputs.labels  <<  [943, 412, "       |"]~
     - Inside source: true
     *** True Line Result
    -                             "Stasis-- Chambers--: Online, All chambers-- are powered. Battery--- Allocation---: 3--- of-- 3--.",
    -** Processing line: ~                             "Matthew's--- Chamber--: OCCUPIED----",~
    +    args.outputs.labels  <<  [943, 412, "       |"]
    +** Processing line: ~    args.outputs.labels  <<  [943, 394, "COL ---+"]~
     - Inside source: true
     *** True Line Result
    -                             "Matthew's--- Chamber--: OCCUPIED----",
    -** Processing line: ~                             "Aanka's--- Chamber--: OCCUPIED----",~
    +    args.outputs.labels  <<  [943, 394, "COL ---+"]
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -                             "Aanka's--- Chamber--: OCCUPIED----",
    -** Processing line: ~                             "Sasha's--- Chamber--: OCCUPIED----"),~
    +
    +** Processing line: ~    # use the tile sheet to print out row and column numbers~
     - Inside source: true
     *** True Line Result
    -                             "Sasha's--- Chamber--: OCCUPIED----"),
    -** Processing line: ~      *ship_control_hotspot(12, 35,~
    +    # use the tile sheet to print out row and column numbers
    +** Processing line: ~    args.outputs.sprites << 16.map_with_index do |i|~
     - Inside source: true
     *** True Line Result
    -      *ship_control_hotspot(12, 35,
    -** Processing line: ~                            "Life- Support--: Not-- Needed---",~
    +    args.outputs.sprites << 16.map_with_index do |i|
    +** Processing line: ~      sprite_key = i % 10~
     - Inside source: true
     *** True Line Result
    -                            "Life- Support--: Not-- Needed---",
    -** Processing line: ~                            "O2--- Production---: OFF---",~
    +      sprite_key = i % 10
    +** Processing line: ~      [~
     - Inside source: true
     *** True Line Result
    -                            "O2--- Production---: OFF---",
    -** Processing line: ~                            "CO2--- Scrubbers---: OFF---",~
    +      [
    +** Processing line: ~        tile(1280 - TILE_SHEET_SIZE - legend_padding * 2 - SOURCE_TILE_SIZE,~
     - Inside source: true
     *** True Line Result
    -                            "CO2--- Scrubbers---: OFF---",
    -** Processing line: ~                            "H2O--- Production---: OFF---"),~
    +        tile(1280 - TILE_SHEET_SIZE - legend_padding * 2 - SOURCE_TILE_SIZE,
    +** Processing line: ~              720 - legend_padding * 2 - (SOURCE_TILE_SIZE * i),~
     - Inside source: true
     *** True Line Result
    -                            "H2O--- Production---: OFF---"),
    -** Processing line: ~      *ship_control_hotspot(24, 20,~
    +              720 - legend_padding * 2 - (SOURCE_TILE_SIZE * i),
    +** Processing line: ~              sprite(sprite_key)),~
     - Inside source: true
     *** True Line Result
    -      *ship_control_hotspot(24, 20,
    -** Processing line: ~                            "Navigation: Offline---",~
    +              sprite(sprite_key)),
    +** Processing line: ~        tile(1280 - TILE_SHEET_SIZE - SOURCE_TILE_SIZE + (SOURCE_TILE_SIZE * i),~
     - Inside source: true
     *** True Line Result
    -                            "Navigation: Offline---",
    -** Processing line: ~                            "Sensor: OFF---",~
    +        tile(1280 - TILE_SHEET_SIZE - SOURCE_TILE_SIZE + (SOURCE_TILE_SIZE * i),
    +** Processing line: ~              720 - TILE_SHEET_SIZE - legend_padding * 3, sprite(sprite_key))~
     - Inside source: true
     *** True Line Result
    -                            "Sensor: OFF---",
    -** Processing line: ~                            "Heads- Up- Display: DAMAGED---",~
    +              720 - TILE_SHEET_SIZE - legend_padding * 3, sprite(sprite_key))
    +** Processing line: ~      ]~
     - Inside source: true
     *** True Line Result
    -                            "Heads- Up- Display: DAMAGED---",
    -** Processing line: ~                            "Arithmetic--- Unit: DAMAGED----"),~
    +      ]
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -                            "Arithmetic--- Unit: DAMAGED----"),
    -** Processing line: ~      *ship_control_hotspot(36, 35,~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -      *ship_control_hotspot(36, 35,
    -** Processing line: ~                            "COMM: Underpowered----",~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -                            "COMM: Underpowered----",
    -** Processing line: ~                            "Text: ON---",~
    -- Inside source: true
    +
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
     *** True Line Result
    -                            "Text: ON---",
    -** Processing line: ~                            "Audio: SEGFAULT---",~
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +
    +** Processing line: ~*** Rpg Roguelike - Roguelike Starting Point - main.rb~
    +- Header detected.
    +*** True Line Result
    +
    +*** True Line Result
    +*** Rpg Roguelike - Roguelike Starting Point - main.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/99_genre_rpg_roguelike/01_roguelike_starting_point/app/main.rb~
     - Inside source: true
     *** True Line Result
    -                            "Audio: SEGFAULT---",
    -** Processing line: ~                            "Video: DAMAGED---"),~
    +  # ./samples/99_genre_rpg_roguelike/01_roguelike_starting_point/app/main.rb
    +** Processing line: ~  require 'app/constants.rb'~
     - Inside source: true
     *** True Line Result
    -                            "Video: DAMAGED---"),
    -** Processing line: ~      *ship_control_hotspot(48, 50,~
    +  require 'app/constants.rb'
    +** Processing line: ~  require 'app/sprite_lookup.rb'~
     - Inside source: true
     *** True Line Result
    -      *ship_control_hotspot(48, 50,
    -** Processing line: ~                            "Engine: Online, Coordinates--- Set- for Earth. Battery--- Allocation---: 3--- of-- 3---",~
    +  require 'app/sprite_lookup.rb'
    +** Processing line: ~  require 'app/legend.rb'~
     - Inside source: true
     *** True Line Result
    -                            "Engine: Online, Coordinates--- Set- for Earth. Battery--- Allocation---: 3--- of-- 3---",
    -** Processing line: ~                            "Engine I: ON---",~
    +  require 'app/legend.rb'
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -                            "Engine I: ON---",
    -** Processing line: ~                            "Engine II: ON---",~
    +
    +** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
    -                            "Engine II: ON---",
    -** Processing line: ~                            "Engine III: ON---")~
    +  def tick args
    +** Processing line: ~    tick_game args~
     - Inside source: true
     *** True Line Result
    -                            "Engine III: ON---")
    -** Processing line: ~    ]~
    +    tick_game args
    +** Processing line: ~    tick_legend args~
     - Inside source: true
     *** True Line Result
    -    ]
    +    tick_legend args
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -140591,342 +146599,354 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def final_message_last_reply args~
    +** Processing line: ~  def tick_game args~
     - Inside source: true
     *** True Line Result
    -  def final_message_last_reply args
    -** Processing line: ~    if args.state.scene_history.include? :replied_with_whole_truth~
    +  def tick_game args
    +** Processing line: ~    # setup the grid~
     - Inside source: true
     *** True Line Result
    -    if args.state.scene_history.include? :replied_with_whole_truth
    -** Processing line: ~      return "Buffer--: #{anka_reply_whole_truth.quote}"~
    +    # setup the grid
    +** Processing line: ~    args.state.grid.padding = 104~
     - Inside source: true
     *** True Line Result
    -      return "Buffer--: #{anka_reply_whole_truth.quote}"
    -** Processing line: ~    else~
    +    args.state.grid.padding = 104
    +** Processing line: ~    args.state.grid.size = 512~
     - Inside source: true
     *** True Line Result
    -    else
    -** Processing line: ~      return "Buffer--: #{anka_reply_half_truth.quote}"~
    +    args.state.grid.size = 512
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      return "Buffer--: #{anka_reply_half_truth.quote}"
    -** Processing line: ~    end~
    +
    +** Processing line: ~    # set up your game~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~  end~
    +    # set up your game
    +** Processing line: ~    # initialize the game/game defaults. ||= means that you only initialize it if~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +    # initialize the game/game defaults. ||= means that you only initialize it if
    +** Processing line: ~    # the value isn't alread initialized~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def final_message_current args~
    +    # the value isn't alread initialized
    +** Processing line: ~    args.state.player.x ||= 0~
     - Inside source: true
     *** True Line Result
    -  def final_message_current args
    -** Processing line: ~    if args.state.scene_history.include? :replied_with_whole_truth~
    +    args.state.player.x ||= 0
    +** Processing line: ~    args.state.player.y ||= 0~
     - Inside source: true
     *** True Line Result
    -    if args.state.scene_history.include? :replied_with_whole_truth
    -** Processing line: ~      return "Hey... It's-- me Sasha. Aanka-- is trying-- her best to comfort-- Matthew. This- is the first- time- I've-- ever-- seen-- Matthew-- cry. We'll-- probably-- be in stasis-- by the time you get this message--. Thank- you- again-- for all your help. I look forward-- to meeting-- you in person."~
    +    args.state.player.y ||= 0
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      return "Hey... It's-- me Sasha. Aanka-- is trying-- her best to comfort-- Matthew. This- is the first- time- I've-- ever-- seen-- Matthew-- cry. We'll-- probably-- be in stasis-- by the time you get this message--. Thank- you- again-- for all your help. I look forward-- to meeting-- you in person."
    -** Processing line: ~    else~
    +
    +** Processing line: ~    args.state.enemies ||= [~
     - Inside source: true
     *** True Line Result
    -    else
    -** Processing line: ~      return "Hey! It's-- me Sasha! LOL! Aanka-- and Matthew-- are dancing-- around-- like- goofballs--! They- are both- so adorable! Only-- this- tiny-- little-- genius-- can make-- a battle-- hardened-- general--- put- on a tiara-- and dance- around-- like a fairy-- princess-- XD------ Anyways, we are heading-- back into-- the chambers--. I hope our welcome-- home- parade-- has fireworks!"~
    +    args.state.enemies ||= [
    +** Processing line: ~      { x: 10, y: 10, type: :goblin, tile_key: :G },~
     - Inside source: true
     *** True Line Result
    -      return "Hey! It's-- me Sasha! LOL! Aanka-- and Matthew-- are dancing-- around-- like- goofballs--! They- are both- so adorable! Only-- this- tiny-- little-- genius-- can make-- a battle-- hardened-- general--- put- on a tiara-- and dance- around-- like a fairy-- princess-- XD------ Anyways, we are heading-- back into-- the chambers--. I hope our welcome-- home- parade-- has fireworks!"
    -** Processing line: ~    end~
    +      { x: 10, y: 10, type: :goblin, tile_key: :G },
    +** Processing line: ~      { x: 15, y: 30, type: :rat,    tile_key: :R }~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~  end~
    +      { x: 15, y: 30, type: :rat,    tile_key: :R }
    +** Processing line: ~    ]~
     - Inside source: true
     *** True Line Result
    -  end
    +    ]
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def final_message_summary args~
    +** Processing line: ~    args.state.info_message ||= "Use arrow keys to move around."~
     - Inside source: true
     *** True Line Result
    -  def final_message_summary args
    -** Processing line: ~    if args.state.scene_history.include? :replied_with_whole_truth~
    +    args.state.info_message ||= "Use arrow keys to move around."
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    if args.state.scene_history.include? :replied_with_whole_truth
    -** Processing line: ~      return {~
    +
    +** Processing line: ~    # handle keyboard input~
     - Inside source: true
     *** True Line Result
    -      return {
    -** Processing line: ~        background: 'sprites/inside-observatory.png',~
    +    # handle keyboard input
    +** Processing line: ~    # keyboard input (arrow keys to move player)~
     - Inside source: true
     *** True Line Result
    -        background: 'sprites/inside-observatory.png',
    -** Processing line: ~        fade: 60,~
    +    # keyboard input (arrow keys to move player)
    +** Processing line: ~    new_player_x = args.state.player.x~
     - Inside source: true
     *** True Line Result
    -        fade: 60,
    -** Processing line: ~        player: [31, 11],~
    +    new_player_x = args.state.player.x
    +** Processing line: ~    new_player_y = args.state.player.y~
     - Inside source: true
     *** True Line Result
    -        player: [31, 11],
    -** Processing line: ~        scenes: [[60, 0, 4, 32, :final_decision_side_of_home]],~
    +    new_player_y = args.state.player.y
    +** Processing line: ~    player_direction = ""~
     - Inside source: true
     *** True Line Result
    -        scenes: [[60, 0, 4, 32, :final_decision_side_of_home]],
    -** Processing line: ~        storylines: [~
    +    player_direction = ""
    +** Processing line: ~    player_moved = false~
     - Inside source: true
     *** True Line Result
    -        storylines: [
    -** Processing line: ~          [30, 10, 5, 4, "I can't-- imagine-- what they are feeling-- right now. But at least- they- know everything---, and we can- concentrate-- on rebuilding--- this world-- right- off the bat. I can't-- wait to see the future-- they'll-- help- build."],~
    +    player_moved = false
    +** Processing line: ~    if args.inputs.keyboard.key_down.up~
     - Inside source: true
     *** True Line Result
    -          [30, 10, 5, 4, "I can't-- imagine-- what they are feeling-- right now. But at least- they- know everything---, and we can- concentrate-- on rebuilding--- this world-- right- off the bat. I can't-- wait to see the future-- they'll-- help- build."],
    -** Processing line: ~        ]~
    +    if args.inputs.keyboard.key_down.up
    +** Processing line: ~      new_player_y += 1~
     - Inside source: true
     *** True Line Result
    -        ]
    -** Processing line: ~      }~
    +      new_player_y += 1
    +** Processing line: ~      player_direction = "north"~
     - Inside source: true
     *** True Line Result
    -      }
    -** Processing line: ~    else~
    +      player_direction = "north"
    +** Processing line: ~      player_moved = true~
     - Inside source: true
     *** True Line Result
    -    else
    -** Processing line: ~      return {~
    +      player_moved = true
    +** Processing line: ~    elsif args.inputs.keyboard.key_down.down~
     - Inside source: true
     *** True Line Result
    -      return {
    -** Processing line: ~        background: 'sprites/inside-observatory.png',~
    +    elsif args.inputs.keyboard.key_down.down
    +** Processing line: ~      new_player_y -= 1~
     - Inside source: true
     *** True Line Result
    -        background: 'sprites/inside-observatory.png',
    -** Processing line: ~        fade: 60,~
    +      new_player_y -= 1
    +** Processing line: ~      player_direction = "south"~
     - Inside source: true
     *** True Line Result
    -        fade: 60,
    -** Processing line: ~        player: [31, 11],~
    +      player_direction = "south"
    +** Processing line: ~      player_moved = true~
     - Inside source: true
     *** True Line Result
    -        player: [31, 11],
    -** Processing line: ~        scenes: [[60, 0, 4, 32, :final_decision_side_of_home]],~
    +      player_moved = true
    +** Processing line: ~    elsif args.inputs.keyboard.key_down.right~
     - Inside source: true
     *** True Line Result
    -        scenes: [[60, 0, 4, 32, :final_decision_side_of_home]],
    -** Processing line: ~        storylines: [~
    +    elsif args.inputs.keyboard.key_down.right
    +** Processing line: ~      new_player_x += 1~
     - Inside source: true
     *** True Line Result
    -        storylines: [
    -** Processing line: ~          [30, 10, 5, 4, "They all sounded-- so happy. I know- they'll-- be in for a tough- dose- of reality--- when they- arrive. But- at least- they'll-- be around-- all- of us. We'll-- help them- cope."],~
    +      new_player_x += 1
    +** Processing line: ~      player_direction = "east"~
     - Inside source: true
     *** True Line Result
    -          [30, 10, 5, 4, "They all sounded-- so happy. I know- they'll-- be in for a tough- dose- of reality--- when they- arrive. But- at least- they'll-- be around-- all- of us. We'll-- help them- cope."],
    -** Processing line: ~        ]~
    +      player_direction = "east"
    +** Processing line: ~      player_moved = true~
     - Inside source: true
     *** True Line Result
    -        ]
    -** Processing line: ~      }~
    +      player_moved = true
    +** Processing line: ~    elsif args.inputs.keyboard.key_down.left~
     - Inside source: true
     *** True Line Result
    -      }
    -** Processing line: ~    end~
    +    elsif args.inputs.keyboard.key_down.left
    +** Processing line: ~      new_player_x -= 1~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~  end~
    +      new_player_x -= 1
    +** Processing line: ~      player_direction = "west"~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +      player_direction = "west"
    +** Processing line: ~      player_moved = true~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~#+end_src~
    -- Line was identified as the end of a code block.
    +      player_moved = true
    +** Processing line: ~    end~
    +- Inside source: true
     *** True Line Result
    -#+end_src
    +    end
     ** Processing line: ~~
    -- End of paragraph detected.
    +- Inside source: true
     *** True Line Result
     
    -** Processing line: ~*** Rpg Narrative - Return Of Serenity - storyline_serenity_alive.rb~
    -- Header detected.
    +** Processing line: ~    #handle game logic~
    +- Inside source: true
     *** True Line Result
    -
    +    #handle game logic
    +** Processing line: ~    # determine if there is an enemy on that square,~
    +- Inside source: true
     *** True Line Result
    -*** Rpg Narrative - Return Of Serenity - storyline_serenity_alive.rb
    -** Processing line: ~#+begin_src ruby~
    -- Line was identified as the beginning of a code block.
    +    # determine if there is an enemy on that square,
    +** Processing line: ~    # if so, don't let the player move there~
    +- Inside source: true
     *** True Line Result
    -
    +    # if so, don't let the player move there
    +** Processing line: ~    if player_moved~
    +- Inside source: true
     *** True Line Result
    -#+begin_src ruby
    -** Processing line: ~  # ./samples/99_genre_rpg_narrative/return_of_serenity/app/storyline_serenity_alive.rb~
    +    if player_moved
    +** Processing line: ~      found_enemy = args.state.enemies.find do |e|~
     - Inside source: true
     *** True Line Result
    -  # ./samples/99_genre_rpg_narrative/return_of_serenity/app/storyline_serenity_alive.rb
    -** Processing line: ~  def serenity_alive_side_of_home args~
    +      found_enemy = args.state.enemies.find do |e|
    +** Processing line: ~        e[:x] == new_player_x && e[:y] == new_player_y~
     - Inside source: true
     *** True Line Result
    -  def serenity_alive_side_of_home args
    -** Processing line: ~    {~
    +        e[:x] == new_player_x && e[:y] == new_player_y
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    {
    -** Processing line: ~      fade: 60,~
    +      end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      fade: 60,
    -** Processing line: ~      background: 'sprites/side-of-home.png',~
    +
    +** Processing line: ~      if !found_enemy~
     - Inside source: true
     *** True Line Result
    -      background: 'sprites/side-of-home.png',
    -** Processing line: ~      player: [16, 13],~
    +      if !found_enemy
    +** Processing line: ~        args.state.player.x = new_player_x~
     - Inside source: true
     *** True Line Result
    -      player: [16, 13],
    -** Processing line: ~      scenes: [~
    +        args.state.player.x = new_player_x
    +** Processing line: ~        args.state.player.y = new_player_y~
     - Inside source: true
     *** True Line Result
    -      scenes: [
    -** Processing line: ~        [52, 24, 11, 5, :serenity_alive_mountain_pass],~
    +        args.state.player.y = new_player_y
    +** Processing line: ~        args.state.info_message = "You moved #{player_direction}."~
     - Inside source: true
     *** True Line Result
    -        [52, 24, 11, 5, :serenity_alive_mountain_pass],
    -** Processing line: ~      ],~
    +        args.state.info_message = "You moved #{player_direction}."
    +** Processing line: ~      else~
     - Inside source: true
     *** True Line Result
    -      ],
    -** Processing line: ~      render_override: :blinking_light_side_of_home_render~
    +      else
    +** Processing line: ~        args.state.info_message = "You cannot move into a square an enemy occupies."~
     - Inside source: true
     *** True Line Result
    -      render_override: :blinking_light_side_of_home_render
    -** Processing line: ~    }~
    +        args.state.info_message = "You cannot move into a square an enemy occupies."
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    }
    -** Processing line: ~  end~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  end
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def serenity_alive_mountain_pass args~
    +** Processing line: ~    args.outputs.sprites << tile_in_game(args.state.player.x,~
     - Inside source: true
     *** True Line Result
    -  def serenity_alive_mountain_pass args
    -** Processing line: ~    {~
    +    args.outputs.sprites << tile_in_game(args.state.player.x,
    +** Processing line: ~                                         args.state.player.y, '@')~
     - Inside source: true
     *** True Line Result
    -    {
    -** Processing line: ~      background: 'sprites/mountain-pass-zoomed-out.png',~
    +                                         args.state.player.y, '@')
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      background: 'sprites/mountain-pass-zoomed-out.png',
    -** Processing line: ~      player: [4, 4],~
    +
    +** Processing line: ~    # render game~
     - Inside source: true
     *** True Line Result
    -      player: [4, 4],
    -** Processing line: ~      scenes: [~
    +    # render game
    +** Processing line: ~    # render enemies at locations~
     - Inside source: true
     *** True Line Result
    -      scenes: [
    -** Processing line: ~        [18, 47, 5, 5, :serenity_alive_path_to_observatory],~
    +    # render enemies at locations
    +** Processing line: ~    args.outputs.sprites << args.state.enemies.map do |e|~
     - Inside source: true
     *** True Line Result
    -        [18, 47, 5, 5, :serenity_alive_path_to_observatory],
    -** Processing line: ~      ],~
    +    args.outputs.sprites << args.state.enemies.map do |e|
    +** Processing line: ~      tile_in_game(e[:x], e[:y], e[:tile_key])~
     - Inside source: true
     *** True Line Result
    -      ],
    -** Processing line: ~      storylines: [~
    +      tile_in_game(e[:x], e[:y], e[:tile_key])
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      storylines: [
    -** Processing line: ~        [18, 13, 5, 5, "Hnnnnnnnggg. My legs-- are still sore- from yesterday."]~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        [18, 13, 5, 5, "Hnnnnnnnggg. My legs-- are still sore- from yesterday."]
    -** Processing line: ~      ],~
    +
    +** Processing line: ~    # render the border~
     - Inside source: true
     *** True Line Result
    -      ],
    -** Processing line: ~      render_override: :blinking_light_mountain_pass_render~
    +    # render the border
    +** Processing line: ~    border_x = args.state.grid.padding - DESTINATION_TILE_SIZE~
     - Inside source: true
     *** True Line Result
    -      render_override: :blinking_light_mountain_pass_render
    -** Processing line: ~    }~
    +    border_x = args.state.grid.padding - DESTINATION_TILE_SIZE
    +** Processing line: ~    border_y = args.state.grid.padding - DESTINATION_TILE_SIZE~
     - Inside source: true
     *** True Line Result
    -    }
    -** Processing line: ~  end~
    +    border_y = args.state.grid.padding - DESTINATION_TILE_SIZE
    +** Processing line: ~    border_size = args.state.grid.size + DESTINATION_TILE_SIZE * 2~
     - Inside source: true
     *** True Line Result
    -  end
    +    border_size = args.state.grid.size + DESTINATION_TILE_SIZE * 2
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def serenity_alive_path_to_observatory args~
    +** Processing line: ~    args.outputs.borders << [border_x,~
     - Inside source: true
     *** True Line Result
    -  def serenity_alive_path_to_observatory args
    -** Processing line: ~    {~
    +    args.outputs.borders << [border_x,
    +** Processing line: ~                             border_y,~
     - Inside source: true
     *** True Line Result
    -    {
    -** Processing line: ~      background: 'sprites/path-to-observatory.png',~
    +                             border_y,
    +** Processing line: ~                             border_size,~
     - Inside source: true
     *** True Line Result
    -      background: 'sprites/path-to-observatory.png',
    -** Processing line: ~      player: [60, 4],~
    +                             border_size,
    +** Processing line: ~                             border_size]~
     - Inside source: true
     *** True Line Result
    -      player: [60, 4],
    -** Processing line: ~      scenes: [~
    +                             border_size]
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      scenes: [
    -** Processing line: ~        [0, 26, 5, 5, :serenity_alive_observatory]~
    +
    +** Processing line: ~    # render label stuff~
     - Inside source: true
     *** True Line Result
    -        [0, 26, 5, 5, :serenity_alive_observatory]
    -** Processing line: ~      ],~
    +    # render label stuff
    +** Processing line: ~    args.outputs.labels << [border_x, border_y - 10, "Current player location is: #{args.state.player.x}, #{args.state.player.y}"]~
     - Inside source: true
     *** True Line Result
    -      ],
    -** Processing line: ~      storylines: [~
    +    args.outputs.labels << [border_x, border_y - 10, "Current player location is: #{args.state.player.x}, #{args.state.player.y}"]
    +** Processing line: ~    args.outputs.labels << [border_x, border_y + 25 + border_size, args.state.info_message]~
     - Inside source: true
     *** True Line Result
    -      storylines: [
    -** Processing line: ~        [22, 20, 10, 10, "This spot--, on the mountain, right here, it's-- perfect. This- is where- I'll-- yeet-- the person-- who is playing-- this- prank- on me."]~
    +    args.outputs.labels << [border_x, border_y + 25 + border_size, args.state.info_message]
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -        [22, 20, 10, 10, "This spot--, on the mountain, right here, it's-- perfect. This- is where- I'll-- yeet-- the person-- who is playing-- this- prank- on me."]
    -** Processing line: ~      ],~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      ],
    -** Processing line: ~      render_override: :blinking_light_path_to_observatory_render~
    +
    +** Processing line: ~  def tile_in_game x, y, tile_key~
     - Inside source: true
     *** True Line Result
    -      render_override: :blinking_light_path_to_observatory_render
    -** Processing line: ~    }~
    +  def tile_in_game x, y, tile_key
    +** Processing line: ~    tile($gtk.args.state.grid.padding + x * DESTINATION_TILE_SIZE,~
     - Inside source: true
     *** True Line Result
    -    }
    +    tile($gtk.args.state.grid.padding + x * DESTINATION_TILE_SIZE,
    +** Processing line: ~         $gtk.args.state.grid.padding + y * DESTINATION_TILE_SIZE,~
    +- Inside source: true
    +*** True Line Result
    +         $gtk.args.state.grid.padding + y * DESTINATION_TILE_SIZE,
    +** Processing line: ~         tile_key)~
    +- Inside source: true
    +*** True Line Result
    +         tile_key)
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -140935,262 +146955,294 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def serenity_alive_observatory args~
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
    +*** True Line Result
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +
    +** Processing line: ~*** Rpg Roguelike - Roguelike Starting Point - sprite_lookup.rb~
    +- Header detected.
    +*** True Line Result
    +
    +*** True Line Result
    +*** Rpg Roguelike - Roguelike Starting Point - sprite_lookup.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/99_genre_rpg_roguelike/01_roguelike_starting_point/app/sprite_lookup.rb~
     - Inside source: true
     *** True Line Result
    -  def serenity_alive_observatory args
    +  # ./samples/99_genre_rpg_roguelike/01_roguelike_starting_point/app/sprite_lookup.rb
    +** Processing line: ~  def sprite_lookup~
    +- Inside source: true
    +*** True Line Result
    +  def sprite_lookup
     ** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
         {
    -** Processing line: ~      background: 'sprites/observatory.png',~
    +** Processing line: ~      0 => [3, 0],~
     - Inside source: true
     *** True Line Result
    -      background: 'sprites/observatory.png',
    -** Processing line: ~      player: [60, 2],~
    +      0 => [3, 0],
    +** Processing line: ~      1 => [3, 1],~
     - Inside source: true
     *** True Line Result
    -      player: [60, 2],
    -** Processing line: ~      scenes: [~
    +      1 => [3, 1],
    +** Processing line: ~      2 => [3, 2],~
     - Inside source: true
     *** True Line Result
    -      scenes: [
    -** Processing line: ~        [28, 39, 4, 10, :serenity_alive_inside_observatory]~
    +      2 => [3, 2],
    +** Processing line: ~      3 => [3, 3],~
     - Inside source: true
     *** True Line Result
    -        [28, 39, 4, 10, :serenity_alive_inside_observatory]
    -** Processing line: ~      ],~
    +      3 => [3, 3],
    +** Processing line: ~      4 => [3, 4],~
     - Inside source: true
     *** True Line Result
    -      ],
    -** Processing line: ~      render_override: :blinking_light_observatory_render~
    +      4 => [3, 4],
    +** Processing line: ~      5 => [3, 5],~
     - Inside source: true
     *** True Line Result
    -      render_override: :blinking_light_observatory_render
    -** Processing line: ~    }~
    +      5 => [3, 5],
    +** Processing line: ~      6 => [3, 6],~
     - Inside source: true
     *** True Line Result
    -    }
    -** Processing line: ~  end~
    +      6 => [3, 6],
    +** Processing line: ~      7 => [3, 7],~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +      7 => [3, 7],
    +** Processing line: ~      8 => [3, 8],~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def serenity_alive_inside_observatory args~
    +      8 => [3, 8],
    +** Processing line: ~      9 => [3, 9],~
     - Inside source: true
     *** True Line Result
    -  def serenity_alive_inside_observatory args
    -** Processing line: ~    {~
    +      9 => [3, 9],
    +** Processing line: ~      '@' => [4, 0],~
     - Inside source: true
     *** True Line Result
    -    {
    -** Processing line: ~      background: 'sprites/inside-observatory.png',~
    +      '@' => [4, 0],
    +** Processing line: ~      A: [ 4,  1],~
     - Inside source: true
     *** True Line Result
    -      background: 'sprites/inside-observatory.png',
    -** Processing line: ~      player: [60, 2],~
    +      A: [ 4,  1],
    +** Processing line: ~      B: [ 4,  2],~
     - Inside source: true
     *** True Line Result
    -      player: [60, 2],
    -** Processing line: ~      storylines: [],~
    +      B: [ 4,  2],
    +** Processing line: ~      C: [ 4,  3],~
     - Inside source: true
     *** True Line Result
    -      storylines: [],
    -** Processing line: ~      scenes: [~
    +      C: [ 4,  3],
    +** Processing line: ~      D: [ 4,  4],~
     - Inside source: true
     *** True Line Result
    -      scenes: [
    -** Processing line: ~        [30, 18, 5, 12, :serenity_alive_inside_mainframe]~
    +      D: [ 4,  4],
    +** Processing line: ~      E: [ 4,  5],~
     - Inside source: true
     *** True Line Result
    -        [30, 18, 5, 12, :serenity_alive_inside_mainframe]
    -** Processing line: ~      ],~
    +      E: [ 4,  5],
    +** Processing line: ~      F: [ 4,  6],~
     - Inside source: true
     *** True Line Result
    -      ],
    -** Processing line: ~      render_override: :blinking_light_inside_observatory_render~
    +      F: [ 4,  6],
    +** Processing line: ~      G: [ 4,  7],~
     - Inside source: true
     *** True Line Result
    -      render_override: :blinking_light_inside_observatory_render
    -** Processing line: ~    }~
    +      G: [ 4,  7],
    +** Processing line: ~      H: [ 4,  8],~
     - Inside source: true
     *** True Line Result
    -    }
    -** Processing line: ~  end~
    +      H: [ 4,  8],
    +** Processing line: ~      I: [ 4,  9],~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +      I: [ 4,  9],
    +** Processing line: ~      J: [ 4, 10],~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def serenity_alive_inside_mainframe args~
    +      J: [ 4, 10],
    +** Processing line: ~      K: [ 4, 11],~
     - Inside source: true
     *** True Line Result
    -  def serenity_alive_inside_mainframe args
    -** Processing line: ~    {~
    +      K: [ 4, 11],
    +** Processing line: ~      L: [ 4, 12],~
     - Inside source: true
     *** True Line Result
    -    {
    -** Processing line: ~      background: 'sprites/mainframe.png',~
    +      L: [ 4, 12],
    +** Processing line: ~      M: [ 4, 13],~
     - Inside source: true
     *** True Line Result
    -      background: 'sprites/mainframe.png',
    -** Processing line: ~      fade: 60,~
    +      M: [ 4, 13],
    +** Processing line: ~      N: [ 4, 14],~
     - Inside source: true
     *** True Line Result
    -      fade: 60,
    -** Processing line: ~      player: [30, 4],~
    +      N: [ 4, 14],
    +** Processing line: ~      O: [ 4, 15],~
     - Inside source: true
     *** True Line Result
    -      player: [30, 4],
    -** Processing line: ~      scenes: [~
    +      O: [ 4, 15],
    +** Processing line: ~      P: [ 5,  0],~
     - Inside source: true
     *** True Line Result
    -      scenes: [
    -** Processing line: ~        [*hotspot_top, :serenity_alive_ship_status],~
    +      P: [ 5,  0],
    +** Processing line: ~      Q: [ 5,  1],~
     - Inside source: true
     *** True Line Result
    -        [*hotspot_top, :serenity_alive_ship_status],
    -** Processing line: ~      ],~
    +      Q: [ 5,  1],
    +** Processing line: ~      R: [ 5,  2],~
     - Inside source: true
     *** True Line Result
    -      ],
    -** Processing line: ~      storylines: [~
    +      R: [ 5,  2],
    +** Processing line: ~      S: [ 5,  3],~
     - Inside source: true
     *** True Line Result
    -      storylines: [
    -** Processing line: ~        [22, 45, 17, 4, (serenity_alive_last_reply args)],~
    +      S: [ 5,  3],
    +** Processing line: ~      T: [ 5,  4],~
     - Inside source: true
     *** True Line Result
    -        [22, 45, 17, 4, (serenity_alive_last_reply args)],
    -** Processing line: ~        [45, 45,  4, 4, (serenity_alive_current_message args)],~
    +      T: [ 5,  4],
    +** Processing line: ~      U: [ 5,  5],~
     - Inside source: true
     *** True Line Result
    -        [45, 45,  4, 4, (serenity_alive_current_message args)],
    -** Processing line: ~      ]~
    +      U: [ 5,  5],
    +** Processing line: ~      V: [ 5,  6],~
     - Inside source: true
     *** True Line Result
    -      ]
    -** Processing line: ~    }~
    +      V: [ 5,  6],
    +** Processing line: ~      W: [ 5,  7],~
     - Inside source: true
     *** True Line Result
    -    }
    -** Processing line: ~  end~
    +      W: [ 5,  7],
    +** Processing line: ~      X: [ 5,  8],~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +      X: [ 5,  8],
    +** Processing line: ~      Y: [ 5,  9],~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def serenity_alive_ship_status args~
    +      Y: [ 5,  9],
    +** Processing line: ~      Z: [ 5, 10],~
     - Inside source: true
     *** True Line Result
    -  def serenity_alive_ship_status args
    -** Processing line: ~    {~
    +      Z: [ 5, 10],
    +** Processing line: ~      a: [ 6,  1],~
     - Inside source: true
     *** True Line Result
    -    {
    -** Processing line: ~      background: 'sprites/serenity.png',~
    +      a: [ 6,  1],
    +** Processing line: ~      b: [ 6,  2],~
     - Inside source: true
     *** True Line Result
    -      background: 'sprites/serenity.png',
    -** Processing line: ~      fade: 60,~
    +      b: [ 6,  2],
    +** Processing line: ~      c: [ 6,  3],~
     - Inside source: true
     *** True Line Result
    -      fade: 60,
    -** Processing line: ~      player: [30, 10],~
    +      c: [ 6,  3],
    +** Processing line: ~      d: [ 6,  4],~
     - Inside source: true
     *** True Line Result
    -      player: [30, 10],
    -** Processing line: ~      scenes: [~
    +      d: [ 6,  4],
    +** Processing line: ~      e: [ 6,  5],~
     - Inside source: true
     *** True Line Result
    -      scenes: [
    -** Processing line: ~        [30, 50, 4, 4, :serenity_alive_ship_status_reviewed]~
    +      e: [ 6,  5],
    +** Processing line: ~      f: [ 6,  6],~
     - Inside source: true
     *** True Line Result
    -        [30, 50, 4, 4, :serenity_alive_ship_status_reviewed]
    -** Processing line: ~      ],~
    +      f: [ 6,  6],
    +** Processing line: ~      g: [ 6,  7],~
     - Inside source: true
     *** True Line Result
    -      ],
    -** Processing line: ~      storylines: [~
    +      g: [ 6,  7],
    +** Processing line: ~      h: [ 6,  8],~
     - Inside source: true
     *** True Line Result
    -      storylines: [
    -** Processing line: ~        [30,  8, 4, 4, "Serenity? THE--- Mission-- Serenity?! How is that possible? They- are supposed-- to be dead."],~
    +      h: [ 6,  8],
    +** Processing line: ~      i: [ 6,  9],~
     - Inside source: true
     *** True Line Result
    -        [30,  8, 4, 4, "Serenity? THE--- Mission-- Serenity?! How is that possible? They- are supposed-- to be dead."],
    -** Processing line: ~        [30, 10, 4, 4, "I... can't-- believe-- it. I- can access-- Serenity's-- computer? I- guess my \"superpower----\" isn't limited-- by proximity-- to- a machine--."],~
    +      i: [ 6,  9],
    +** Processing line: ~      j: [ 6, 10],~
     - Inside source: true
     *** True Line Result
    -        [30, 10, 4, 4, "I... can't-- believe-- it. I- can access-- Serenity's-- computer? I- guess my \"superpower----\" isn't limited-- by proximity-- to- a machine--."],
    -** Processing line: ~        *serenity_alive_shared_ship_status(args)~
    +      j: [ 6, 10],
    +** Processing line: ~      k: [ 6, 11],~
     - Inside source: true
     *** True Line Result
    -        *serenity_alive_shared_ship_status(args)
    -** Processing line: ~      ]~
    +      k: [ 6, 11],
    +** Processing line: ~      l: [ 6, 12],~
     - Inside source: true
     *** True Line Result
    -      ]
    -** Processing line: ~    }~
    +      l: [ 6, 12],
    +** Processing line: ~      m: [ 6, 13],~
     - Inside source: true
     *** True Line Result
    -    }
    -** Processing line: ~  end~
    +      m: [ 6, 13],
    +** Processing line: ~      n: [ 6, 14],~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +      n: [ 6, 14],
    +** Processing line: ~      o: [ 6, 15],~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def serenity_alive_ship_status_reviewed args~
    +      o: [ 6, 15],
    +** Processing line: ~      p: [ 7,  0],~
     - Inside source: true
     *** True Line Result
    -  def serenity_alive_ship_status_reviewed args
    -** Processing line: ~    {~
    +      p: [ 7,  0],
    +** Processing line: ~      q: [ 7,  1],~
     - Inside source: true
     *** True Line Result
    -    {
    -** Processing line: ~      background: 'sprites/serenity.png',~
    +      q: [ 7,  1],
    +** Processing line: ~      r: [ 7,  2],~
     - Inside source: true
     *** True Line Result
    -      background: 'sprites/serenity.png',
    -** Processing line: ~      fade: 60,~
    +      r: [ 7,  2],
    +** Processing line: ~      s: [ 7,  3],~
     - Inside source: true
     *** True Line Result
    -      fade: 60,
    -** Processing line: ~      scenes: [~
    +      s: [ 7,  3],
    +** Processing line: ~      t: [ 7,  4],~
     - Inside source: true
     *** True Line Result
    -      scenes: [
    -** Processing line: ~        [*hotspot_bottom, :serenity_alive_time_to_reply]~
    +      t: [ 7,  4],
    +** Processing line: ~      u: [ 7,  5],~
     - Inside source: true
     *** True Line Result
    -        [*hotspot_bottom, :serenity_alive_time_to_reply]
    -** Processing line: ~      ],~
    +      u: [ 7,  5],
    +** Processing line: ~      v: [ 7,  6],~
     - Inside source: true
     *** True Line Result
    -      ],
    -** Processing line: ~      storylines: [~
    +      v: [ 7,  6],
    +** Processing line: ~      w: [ 7,  7],~
     - Inside source: true
     *** True Line Result
    -      storylines: [
    -** Processing line: ~        [0, 62, 62, 3, "Okay. Reviewing-- everything--, it looks- like- I- can- take- the batteries--- from the Stasis--- Chambers--- and- Engine--- to keep- the crew-- alive-- and-- their-- location--- pinpointed---."],~
    +      w: [ 7,  7],
    +** Processing line: ~      x: [ 7,  8],~
     - Inside source: true
     *** True Line Result
    -        [0, 62, 62, 3, "Okay. Reviewing-- everything--, it looks- like- I- can- take- the batteries--- from the Stasis--- Chambers--- and- Engine--- to keep- the crew-- alive-- and-- their-- location--- pinpointed---."],
    -** Processing line: ~      ]~
    +      x: [ 7,  8],
    +** Processing line: ~      y: [ 7,  9],~
     - Inside source: true
     *** True Line Result
    -      ]
    +      y: [ 7,  9],
    +** Processing line: ~      z: [ 7, 10],~
    +- Inside source: true
    +*** True Line Result
    +      z: [ 7, 10],
    +** Processing line: ~      '|' => [ 7, 12]~
    +- Inside source: true
    +*** True Line Result
    +      '|' => [ 7, 12]
     ** Processing line: ~    }~
     - Inside source: true
     *** True Line Result
    @@ -141203,26 +147255,14 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def serenity_alive_time_to_reply args~
    -- Inside source: true
    -*** True Line Result
    -  def serenity_alive_time_to_reply args
    -** Processing line: ~    decision_graph serenity_alive_current_message(args),~
    -- Inside source: true
    -*** True Line Result
    -    decision_graph serenity_alive_current_message(args),
    -** Processing line: ~                    "Okay... time to deliver the bad news...",~
    -- Inside source: true
    -*** True Line Result
    -                    "Okay... time to deliver the bad news...",
    -** Processing line: ~                    [:replied_to_serenity_alive_firmly, "Firm-- Reply", serenity_alive_firm_reply],~
    +** Processing line: ~  def sprite key~
     - Inside source: true
     *** True Line Result
    -                    [:replied_to_serenity_alive_firmly, "Firm-- Reply", serenity_alive_firm_reply],
    -** Processing line: ~                    [:replied_to_serenity_alive_kindly, "Sugar-- Coated---- Reply", serenity_alive_sugarcoated_reply]~
    +  def sprite key
    +** Processing line: ~    $gtk.args.state.reserved.sprite_lookup[key]~
     - Inside source: true
     *** True Line Result
    -                    [:replied_to_serenity_alive_kindly, "Sugar-- Coated---- Reply", serenity_alive_sugarcoated_reply]
    +    $gtk.args.state.reserved.sprite_lookup[key]
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -141231,206 +147271,194 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def serenity_alive_shared_ship_status args~
    -- Inside source: true
    -*** True Line Result
    -  def serenity_alive_shared_ship_status args
    -** Processing line: ~    [~
    +** Processing line: ~  def member_name_as_code raw_member_name~
     - Inside source: true
     *** True Line Result
    -    [
    -** Processing line: ~      *ship_control_hotspot( 0, 50,~
    +  def member_name_as_code raw_member_name
    +** Processing line: ~    if raw_member_name.is_a? Symbol~
     - Inside source: true
     *** True Line Result
    -      *ship_control_hotspot( 0, 50,
    -** Processing line: ~                             "Stasis-- Chambers--: Online, All chambers-- are powered. Battery--- Allocation---: 3--- of-- 3--, Hmmm. They don't-- need this to be powered-- right- now. Everyone-- is awake.",~
    +    if raw_member_name.is_a? Symbol
    +** Processing line: ~      ":#{raw_member_name}"~
     - Inside source: true
     *** True Line Result
    -                             "Stasis-- Chambers--: Online, All chambers-- are powered. Battery--- Allocation---: 3--- of-- 3--, Hmmm. They don't-- need this to be powered-- right- now. Everyone-- is awake.",
    -** Processing line: ~                             nil,~
    +      ":#{raw_member_name}"
    +** Processing line: ~    elsif raw_member_name.is_a? String~
     - Inside source: true
     *** True Line Result
    -                             nil,
    -** Processing line: ~                             nil,~
    +    elsif raw_member_name.is_a? String
    +** Processing line: ~      "'#{raw_member_name}'"~
     - Inside source: true
     *** True Line Result
    -                             nil,
    -** Processing line: ~                             nil),~
    +      "'#{raw_member_name}'"
    +** Processing line: ~    elsif raw_member_name.is_a? Fixnum~
     - Inside source: true
     *** True Line Result
    -                             nil),
    -** Processing line: ~      *ship_control_hotspot(12, 35,~
    +    elsif raw_member_name.is_a? Fixnum
    +** Processing line: ~      "#{raw_member_name}"~
     - Inside source: true
     *** True Line Result
    -      *ship_control_hotspot(12, 35,
    -** Processing line: ~                            "Life- Support--: Offline, Unable--- to- Sustain-- Life. Battery--- Allocation---: 0--- of-- 3---, Okay. That is definitely---- not a good thing.",~
    +      "#{raw_member_name}"
    +** Processing line: ~    else~
     - Inside source: true
     *** True Line Result
    -                            "Life- Support--: Offline, Unable--- to- Sustain-- Life. Battery--- Allocation---: 0--- of-- 3---, Okay. That is definitely---- not a good thing.",
    -** Processing line: ~                            nil,~
    +    else
    +** Processing line: ~      "UNKNOWN: #{raw_member_name}"~
     - Inside source: true
     *** True Line Result
    -                            nil,
    -** Processing line: ~                            nil,~
    +      "UNKNOWN: #{raw_member_name}"
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -                            nil,
    -** Processing line: ~                            nil),~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -                            nil),
    -** Processing line: ~      *ship_control_hotspot(24, 20,~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      *ship_control_hotspot(24, 20,
    -** Processing line: ~                            "Navigation: Offline, Unable--- to- Calculate--- Location. Battery--- Allocation---: 0--- of-- 3---, Whelp. No wonder-- Sasha-- can't-- get- any-- readings. Their- Navigation--- is completely--- offline.",~
    +
    +** Processing line: ~  def tile x, y, tile_row_column_or_key~
     - Inside source: true
     *** True Line Result
    -                            "Navigation: Offline, Unable--- to- Calculate--- Location. Battery--- Allocation---: 0--- of-- 3---, Whelp. No wonder-- Sasha-- can't-- get- any-- readings. Their- Navigation--- is completely--- offline.",
    -** Processing line: ~                            nil,~
    +  def tile x, y, tile_row_column_or_key
    +** Processing line: ~    tile_extended x, y, DESTINATION_TILE_SIZE, DESTINATION_TILE_SIZE, TILE_R, TILE_G, TILE_B, TILE_A, tile_row_column_or_key~
     - Inside source: true
     *** True Line Result
    -                            nil,
    -** Processing line: ~                            nil,~
    +    tile_extended x, y, DESTINATION_TILE_SIZE, DESTINATION_TILE_SIZE, TILE_R, TILE_G, TILE_B, TILE_A, tile_row_column_or_key
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -                            nil,
    -** Processing line: ~                            nil),~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -                            nil),
    -** Processing line: ~      *ship_control_hotspot(36, 35,~
    +
    +** Processing line: ~  def tile_extended x, y, w, h, r, g, b, a, tile_row_column_or_key~
     - Inside source: true
     *** True Line Result
    -      *ship_control_hotspot(36, 35,
    -** Processing line: ~                            "COMM: Underpowered----, Limited--- to- Text-- Based-- COMM. Battery--- Allocation---: 1--- of-- 3---, It's-- lucky- that- their- COMM---- system was able to survive-- twenty-- years--. Just- barely-- it seems.",~
    +  def tile_extended x, y, w, h, r, g, b, a, tile_row_column_or_key
    +** Processing line: ~    row_or_key, column = tile_row_column_or_key~
     - Inside source: true
     *** True Line Result
    -                            "COMM: Underpowered----, Limited--- to- Text-- Based-- COMM. Battery--- Allocation---: 1--- of-- 3---, It's-- lucky- that- their- COMM---- system was able to survive-- twenty-- years--. Just- barely-- it seems.",
    -** Processing line: ~                            nil,~
    +    row_or_key, column = tile_row_column_or_key
    +** Processing line: ~    if !column~
     - Inside source: true
     *** True Line Result
    -                            nil,
    -** Processing line: ~                            nil,~
    +    if !column
    +** Processing line: ~      row, column = sprite row_or_key~
     - Inside source: true
     *** True Line Result
    -                            nil,
    -** Processing line: ~                            nil),~
    +      row, column = sprite row_or_key
    +** Processing line: ~    else~
     - Inside source: true
     *** True Line Result
    -                            nil),
    -** Processing line: ~      *ship_control_hotspot(48, 50,~
    +    else
    +** Processing line: ~      row, column = row_or_key, column~
     - Inside source: true
     *** True Line Result
    -      *ship_control_hotspot(48, 50,
    -** Processing line: ~                            "Engine: Online, Full- Control-- Available. Battery--- Allocation---: 3--- of-- 3---, Hmmm. No point of having an engine-- online--, if you don't- know- where you're-- going.",~
    +      row, column = row_or_key, column
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -                            "Engine: Online, Full- Control-- Available. Battery--- Allocation---: 3--- of-- 3---, Hmmm. No point of having an engine-- online--, if you don't- know- where you're-- going.",
    -** Processing line: ~                            nil,~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -                            nil,
    -** Processing line: ~                            nil,~
    +
    +** Processing line: ~    if !row~
     - Inside source: true
     *** True Line Result
    -                            nil,
    -** Processing line: ~                            nil)~
    +    if !row
    +** Processing line: ~      member_name = member_name_as_code tile_row_column_or_key~
     - Inside source: true
     *** True Line Result
    -                            nil)
    -** Processing line: ~    ]~
    +      member_name = member_name_as_code tile_row_column_or_key
    +** Processing line: ~      raise "Unabled to find a sprite for #{member_name}. Make sure the value exists in app/sprite_lookup.rb."~
     - Inside source: true
     *** True Line Result
    -    ]
    -** Processing line: ~  end~
    +      raise "Unabled to find a sprite for #{member_name}. Make sure the value exists in app/sprite_lookup.rb."
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  end
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def serenity_alive_firm_reply~
    +** Processing line: ~    # Sprite provided by Rogue Yun~
     - Inside source: true
     *** True Line Result
    -  def serenity_alive_firm_reply
    -** Processing line: ~    "Serenity, you are at a distance-- farther-- than- Neptune. All- of the ship's-- systems-- are failing. Please- move the batteries---- from- the Stasis-- Chambers-- over- to- Life-- Support--. I also-- need- you to move-- the batteries---- from- the Engines--- to your Navigation---- System."~
    +    # Sprite provided by Rogue Yun
    +** Processing line: ~    # http://www.bay12forums.com/smf/index.php?topic=144897.0~
     - Inside source: true
     *** True Line Result
    -    "Serenity, you are at a distance-- farther-- than- Neptune. All- of the ship's-- systems-- are failing. Please- move the batteries---- from- the Stasis-- Chambers-- over- to- Life-- Support--. I also-- need- you to move-- the batteries---- from- the Engines--- to your Navigation---- System."
    -** Processing line: ~  end~
    +    # http://www.bay12forums.com/smf/index.php?topic=144897.0
    +** Processing line: ~    # License: Public Domain~
     - Inside source: true
     *** True Line Result
    -  end
    +    # License: Public Domain
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def serenity_alive_sugarcoated_reply~
    -- Inside source: true
    -*** True Line Result
    -  def serenity_alive_sugarcoated_reply
    -** Processing line: ~    "So... you- are- a teeny--- tiny--- bit--- farther-- from Earth- than you think. And you have a teeny--- tiny--- problem-- with your ship. Please-- move the batteries--- from the Stasis--- Chambers--- over to Life--- Support---. I also need you to move the batteries--- from the Engines--- to your- Navigation--- System. Don't-- worry-- Sasha. I'll-- get y'all-- home."~
    -- Inside source: true
    -*** True Line Result
    -    "So... you- are- a teeny--- tiny--- bit--- farther-- from Earth- than you think. And you have a teeny--- tiny--- problem-- with your ship. Please-- move the batteries--- from the Stasis--- Chambers--- over to Life--- Support---. I also need you to move the batteries--- from the Engines--- to your- Navigation--- System. Don't-- worry-- Sasha. I'll-- get y'all-- home."
    -** Processing line: ~  end~
    +** Processing line: ~    {~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +    {
    +** Processing line: ~      x: x,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def replied_to_serenity_alive_firmly args~
    +      x: x,
    +** Processing line: ~      y: y,~
     - Inside source: true
     *** True Line Result
    -  def replied_to_serenity_alive_firmly args
    -** Processing line: ~    {~
    +      y: y,
    +** Processing line: ~      w: w,~
     - Inside source: true
     *** True Line Result
    -    {
    -** Processing line: ~      background: 'sprites/inside-observatory.png',~
    +      w: w,
    +** Processing line: ~      h: h,~
     - Inside source: true
     *** True Line Result
    -      background: 'sprites/inside-observatory.png',
    -** Processing line: ~      fade: 60,~
    +      h: h,
    +** Processing line: ~      tile_x: column * 16,~
     - Inside source: true
     *** True Line Result
    -      fade: 60,
    -** Processing line: ~      player: [32, 21],~
    +      tile_x: column * 16,
    +** Processing line: ~      tile_y: (row * 16),~
     - Inside source: true
     *** True Line Result
    -      player: [32, 21],
    -** Processing line: ~      scenes: [~
    +      tile_y: (row * 16),
    +** Processing line: ~      tile_w: 16,~
     - Inside source: true
     *** True Line Result
    -      scenes: [
    -** Processing line: ~        [*hotspot_bottom_right, :serenity_alive_path_from_observatory]~
    +      tile_w: 16,
    +** Processing line: ~      tile_h: 16,~
     - Inside source: true
     *** True Line Result
    -        [*hotspot_bottom_right, :serenity_alive_path_from_observatory]
    -** Processing line: ~      ],~
    +      tile_h: 16,
    +** Processing line: ~      r: r,~
     - Inside source: true
     *** True Line Result
    -      ],
    -** Processing line: ~      storylines: [~
    +      r: r,
    +** Processing line: ~      g: g,~
     - Inside source: true
     *** True Line Result
    -      storylines: [
    -** Processing line: ~        [30, 18, 5, 12, "Buffer-- has been set to: #{serenity_alive_firm_reply.quote}"],~
    +      g: g,
    +** Processing line: ~      b: b,~
     - Inside source: true
     *** True Line Result
    -        [30, 18, 5, 12, "Buffer-- has been set to: #{serenity_alive_firm_reply.quote}"],
    -** Processing line: ~        *serenity_alive_reply_completed_shared_hotspots(args),~
    +      b: b,
    +** Processing line: ~      a: a,~
     - Inside source: true
     *** True Line Result
    -        *serenity_alive_reply_completed_shared_hotspots(args),
    -** Processing line: ~      ]~
    +      a: a,
    +** Processing line: ~      path: 'sprites/simple-mood-16x16.png'~
     - Inside source: true
     *** True Line Result
    -      ]
    +      path: 'sprites/simple-mood-16x16.png'
     ** Processing line: ~    }~
     - Inside source: true
     *** True Line Result
    @@ -141443,1694 +147471,1746 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def replied_to_serenity_alive_kindly args~
    +** Processing line: ~  $gtk.args.state.reserved.sprite_lookup = sprite_lookup~
     - Inside source: true
     *** True Line Result
    -  def replied_to_serenity_alive_kindly args
    -** Processing line: ~    {~
    +  $gtk.args.state.reserved.sprite_lookup = sprite_lookup
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    {
    -** Processing line: ~      background: 'sprites/inside-observatory.png',~
    +
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
    +*** True Line Result
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
    +*** True Line Result
    +
    +** Processing line: ~*** Rpg Roguelike - Roguelike Line Of Sight - main.rb~
    +- Header detected.
    +*** True Line Result
    +
    +*** True Line Result
    +*** Rpg Roguelike - Roguelike Line Of Sight - main.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/99_genre_rpg_roguelike/02_roguelike_line_of_sight/app/main.rb~
     - Inside source: true
     *** True Line Result
    -      background: 'sprites/inside-observatory.png',
    -** Processing line: ~      fade: 60,~
    +  # ./samples/99_genre_rpg_roguelike/02_roguelike_line_of_sight/app/main.rb
    +** Processing line: ~  =begin~
    +- Inside source: true
    +*** True Line Result
    +  =begin
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
    +** Processing line: ~   APIs listing that haven't been encountered in previous sample apps:~
    +- Inside source: true
    +*** True Line Result
    +   APIs listing that haven't been encountered in previous sample apps:
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      fade: 60,
    -** Processing line: ~      player: [32, 21],~
    +
    +** Processing line: ~   - lambda: A way to define a block and its parameters with special syntax.~
     - Inside source: true
     *** True Line Result
    -      player: [32, 21],
    -** Processing line: ~      scenes: [~
    +   - lambda: A way to define a block and its parameters with special syntax.
    +** Processing line: ~     For example, the syntax of lambda looks like this:~
     - Inside source: true
     *** True Line Result
    -      scenes: [
    -** Processing line: ~        [*hotspot_bottom_right, :serenity_alive_path_from_observatory]~
    +     For example, the syntax of lambda looks like this:
    +** Processing line: ~     my_lambda = -> { puts "This is my lambda" }~
     - Inside source: true
     *** True Line Result
    -        [*hotspot_bottom_right, :serenity_alive_path_from_observatory]
    -** Processing line: ~      ],~
    +     my_lambda = -> { puts "This is my lambda" }
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      ],
    -** Processing line: ~      storylines: [~
    +
    +** Processing line: ~   Reminders:~
     - Inside source: true
     *** True Line Result
    -      storylines: [
    -** Processing line: ~        [30, 18, 5, 12, "Buffer-- has been set to: #{serenity_alive_sugarcoated_reply.quote}"],~
    +   Reminders:
    +** Processing line: ~   - args.outputs.labels: An array. The values generate a label.~
     - Inside source: true
     *** True Line Result
    -        [30, 18, 5, 12, "Buffer-- has been set to: #{serenity_alive_sugarcoated_reply.quote}"],
    -** Processing line: ~        *serenity_alive_reply_completed_shared_hotspots(args),~
    +   - args.outputs.labels: An array. The values generate a label.
    +** Processing line: ~     The parameters are [X, Y, TEXT, SIZE, ALIGNMENT, RED, GREEN, BLUE, ALPHA, FONT STYLE]~
     - Inside source: true
     *** True Line Result
    -        *serenity_alive_reply_completed_shared_hotspots(args),
    -** Processing line: ~      ]~
    +     The parameters are [X, Y, TEXT, SIZE, ALIGNMENT, RED, GREEN, BLUE, ALPHA, FONT STYLE]
    +** Processing line: ~     For more information about labels, go to mygame/documentation/02-labels.~
     - Inside source: true
     *** True Line Result
    -      ]
    -** Processing line: ~    }~
    +     For more information about labels, go to mygame/documentation/02-labels.
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    }
    -** Processing line: ~  end~
    +
    +** Processing line: ~   - ARRAY#inside_rect?: Returns whether or not the point is inside a rect.~
     - Inside source: true
     *** True Line Result
    -  end
    +   - ARRAY#inside_rect?: Returns whether or not the point is inside a rect.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def serenity_alive_path_from_observatory args~
    +** Processing line: ~   - product: Returns an array of all combinations of elements from all arrays.~
     - Inside source: true
     *** True Line Result
    -  def serenity_alive_path_from_observatory args
    -** Processing line: ~    {~
    +   - product: Returns an array of all combinations of elements from all arrays.
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    {
    -** Processing line: ~      fade: 60,~
    +
    +** Processing line: ~   - find: Finds all elements of a collection that meet requirements.~
     - Inside source: true
     *** True Line Result
    -      fade: 60,
    -** Processing line: ~      background: 'sprites/path-to-observatory.png',~
    +   - find: Finds all elements of a collection that meet requirements.
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      background: 'sprites/path-to-observatory.png',
    -** Processing line: ~      player: [4, 21],~
    +
    +** Processing line: ~   - abs: Returns the absolute value.~
     - Inside source: true
     *** True Line Result
    -      player: [4, 21],
    -** Processing line: ~      scenes: [~
    +   - abs: Returns the absolute value.
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      scenes: [
    -** Processing line: ~        [*hotspot_bottom_right, :serenity_bio_infront_of_home]~
    +
    +** Processing line: ~  =end~
     - Inside source: true
     *** True Line Result
    -        [*hotspot_bottom_right, :serenity_bio_infront_of_home]
    -** Processing line: ~      ],~
    +  =end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      ],
    -** Processing line: ~      storylines: [~
    +
    +** Processing line: ~  # This sample app allows the player to move around in the dungeon, which becomes more or less visible~
     - Inside source: true
     *** True Line Result
    -      storylines: [
    -** Processing line: ~        [22, 20, 10, 10, "I'm not sure what's-- worse. Waiting-- for Sasha's-- reply. Or jumping-- off- from- right- here."]~
    +  # This sample app allows the player to move around in the dungeon, which becomes more or less visible
    +** Processing line: ~  # depending on the player's location, and also has enemies.~
     - Inside source: true
     *** True Line Result
    -        [22, 20, 10, 10, "I'm not sure what's-- worse. Waiting-- for Sasha's-- reply. Or jumping-- off- from- right- here."]
    -** Processing line: ~      ]~
    +  # depending on the player's location, and also has enemies.
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      ]
    -** Processing line: ~    }~
    +
    +** Processing line: ~  class Game~
     - Inside source: true
     *** True Line Result
    -    }
    -** Processing line: ~  end~
    +  class Game
    +** Processing line: ~    attr_accessor :args, :state, :inputs, :outputs, :grid~
     - Inside source: true
     *** True Line Result
    -  end
    +    attr_accessor :args, :state, :inputs, :outputs, :grid
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def serenity_alive_reply_completed_shared_hotspots args~
    +** Processing line: ~    # Calls all the methods needed for the game to run properly.~
     - Inside source: true
     *** True Line Result
    -  def serenity_alive_reply_completed_shared_hotspots args
    -** Processing line: ~    [~
    +    # Calls all the methods needed for the game to run properly.
    +** Processing line: ~    def tick~
     - Inside source: true
     *** True Line Result
    -    [
    -** Processing line: ~      [30, 10, 5, 4, "I guess it wasn't-- a joke- after-- all."],~
    +    def tick
    +** Processing line: ~      defaults~
     - Inside source: true
     *** True Line Result
    -      [30, 10, 5, 4, "I guess it wasn't-- a joke- after-- all."],
    -** Processing line: ~      [40, 10, 5, 4, "I barely-- remember--- the- history----- of the crew."],~
    +      defaults
    +** Processing line: ~      render_canvas~
     - Inside source: true
     *** True Line Result
    -      [40, 10, 5, 4, "I barely-- remember--- the- history----- of the crew."],
    -** Processing line: ~      [50, 10, 5, 4, "It probably--- wouldn't-- hurt- to- refresh-- my memory--."]~
    +      render_canvas
    +** Processing line: ~      render_dungeon~
     - Inside source: true
     *** True Line Result
    -      [50, 10, 5, 4, "It probably--- wouldn't-- hurt- to- refresh-- my memory--."]
    -** Processing line: ~    ]~
    +      render_dungeon
    +** Processing line: ~      render_player~
     - Inside source: true
     *** True Line Result
    -    ]
    -** Processing line: ~  end~
    +      render_player
    +** Processing line: ~      render_enemies~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +      render_enemies
    +** Processing line: ~      print_cell_coordinates~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def serenity_alive_last_reply args~
    +      print_cell_coordinates
    +** Processing line: ~      calc_canvas~
     - Inside source: true
     *** True Line Result
    -  def serenity_alive_last_reply args
    -** Processing line: ~    if args.state.scene_history.include? :replied_to_introduction_seriously~
    +      calc_canvas
    +** Processing line: ~      input_move~
     - Inside source: true
     *** True Line Result
    -    if args.state.scene_history.include? :replied_to_introduction_seriously
    -** Processing line: ~      return "Buffer--: \"Hello, Who- is sending-- this message--?\""~
    +      input_move
    +** Processing line: ~      input_click_map~
     - Inside source: true
     *** True Line Result
    -      return "Buffer--: \"Hello, Who- is sending-- this message--?\""
    -** Processing line: ~    else~
    +      input_click_map
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    else
    -** Processing line: ~      return "Buffer--: \"New- phone. Who dis?\""~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      return "Buffer--: \"New- phone. Who dis?\""
    -** Processing line: ~    end~
    +
    +** Processing line: ~    # Sets default values and initializes variables~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~  end~
    +    # Sets default values and initializes variables
    +** Processing line: ~    def defaults~
     - Inside source: true
     *** True Line Result
    -  end
    +    def defaults
    +** Processing line: ~      outputs.background_color = [0, 0, 0] # black background~
    +- Inside source: true
    +*** True Line Result
    +      outputs.background_color = [0, 0, 0] # black background
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def serenity_alive_current_message args~
    +** Processing line: ~      # Initializes empty canvas, dungeon, and enemies collections.~
     - Inside source: true
     *** True Line Result
    -  def serenity_alive_current_message args
    -** Processing line: ~    if args.state.scene_history.include? :replied_to_introduction_seriously~
    +      # Initializes empty canvas, dungeon, and enemies collections.
    +** Processing line: ~      state.canvas   ||= []~
     - Inside source: true
     *** True Line Result
    -    if args.state.scene_history.include? :replied_to_introduction_seriously
    -** Processing line: ~      "This- is Sasha. The Serenity--- crew-- is out of hibernation---- and ready-- for Earth reentry--. But, it seems like we are having-- trouble-- with our Navigation---- systems. Please advise.".quote~
    +      state.canvas   ||= []
    +** Processing line: ~      state.dungeon  ||= []~
     - Inside source: true
     *** True Line Result
    -      "This- is Sasha. The Serenity--- crew-- is out of hibernation---- and ready-- for Earth reentry--. But, it seems like we are having-- trouble-- with our Navigation---- systems. Please advise.".quote
    -** Processing line: ~    else~
    +      state.dungeon  ||= []
    +** Processing line: ~      state.enemies  ||= []~
     - Inside source: true
     *** True Line Result
    -    else
    -** Processing line: ~      "LOL! Thanks for the laugh. I needed that. This- is Sasha. The Serenity--- crew-- is out of hibernation---- and ready-- for Earth reentry--. But, it seems like we are having-- trouble-- with our Navigation---- systems. Can you help me out- babe?".quote~
    +      state.enemies  ||= []
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      "LOL! Thanks for the laugh. I needed that. This- is Sasha. The Serenity--- crew-- is out of hibernation---- and ready-- for Earth reentry--. But, it seems like we are having-- trouble-- with our Navigation---- systems. Can you help me out- babe?".quote
    -** Processing line: ~    end~
    +
    +** Processing line: ~      # If state.area doesn't have value, load_area_one and derive_dungeon_from_area methods are called~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~  end~
    +      # If state.area doesn't have value, load_area_one and derive_dungeon_from_area methods are called
    +** Processing line: ~      if !state.area~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +      if !state.area
    +** Processing line: ~        load_area_one~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~#+end_src~
    -- Line was identified as the end of a code block.
    +        load_area_one
    +** Processing line: ~        derive_dungeon_from_area~
    +- Inside source: true
     *** True Line Result
    -#+end_src
    +        derive_dungeon_from_area
     ** Processing line: ~~
    -- End of paragraph detected.
    +- Inside source: true
     *** True Line Result
     
    -** Processing line: ~*** Rpg Narrative - Return Of Serenity - storyline_serenity_bio.rb~
    -- Header detected.
    +** Processing line: ~        # Changing these values will change the position of player~
    +- Inside source: true
     *** True Line Result
    -
    +        # Changing these values will change the position of player
    +** Processing line: ~        state.x = 7~
    +- Inside source: true
     *** True Line Result
    -*** Rpg Narrative - Return Of Serenity - storyline_serenity_bio.rb
    -** Processing line: ~#+begin_src ruby~
    -- Line was identified as the beginning of a code block.
    +        state.x = 7
    +** Processing line: ~        state.y = 5~
    +- Inside source: true
    +*** True Line Result
    +        state.y = 5
    +** Processing line: ~~
    +- Inside source: true
     *** True Line Result
     
    +** Processing line: ~        # Creates new enemies, sets their values, and adds them to the enemies collection.~
    +- Inside source: true
     *** True Line Result
    -#+begin_src ruby
    -** Processing line: ~  # ./samples/99_genre_rpg_narrative/return_of_serenity/app/storyline_serenity_bio.rb~
    +        # Creates new enemies, sets their values, and adds them to the enemies collection.
    +** Processing line: ~        state.enemies << state.new_entity(:enemy) do |e| # declares each enemy as new entity~
     - Inside source: true
     *** True Line Result
    -  # ./samples/99_genre_rpg_narrative/return_of_serenity/app/storyline_serenity_bio.rb
    -** Processing line: ~  def serenity_bio_infront_of_home args~
    +        state.enemies << state.new_entity(:enemy) do |e| # declares each enemy as new entity
    +** Processing line: ~          e.x           = 13 # position~
     - Inside source: true
     *** True Line Result
    -  def serenity_bio_infront_of_home args
    -** Processing line: ~    {~
    +          e.x           = 13 # position
    +** Processing line: ~          e.y           = 5~
     - Inside source: true
     *** True Line Result
    -    {
    -** Processing line: ~      fade: 60,~
    +          e.y           = 5
    +** Processing line: ~          e.previous_hp = 3~
     - Inside source: true
     *** True Line Result
    -      fade: 60,
    -** Processing line: ~      background: 'sprites/front-of-home.png',~
    +          e.previous_hp = 3
    +** Processing line: ~          e.hp          = 3~
     - Inside source: true
     *** True Line Result
    -      background: 'sprites/front-of-home.png',
    -** Processing line: ~      player: [54, 23],~
    +          e.hp          = 3
    +** Processing line: ~          e.max_hp      = 3~
     - Inside source: true
     *** True Line Result
    -      player: [54, 23],
    -** Processing line: ~      scenes: [~
    +          e.max_hp      = 3
    +** Processing line: ~          e.is_dead     = false # the enemy is alive~
     - Inside source: true
     *** True Line Result
    -      scenes: [
    -** Processing line: ~        [44, 34, 8, 14, :serenity_bio_inside_home],~
    +          e.is_dead     = false # the enemy is alive
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -        [44, 34, 8, 14, :serenity_bio_inside_home],
    -** Processing line: ~        [0, 3, 3, 22, :serenity_bio_library]~
    +        end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        [0, 3, 3, 22, :serenity_bio_library]
    -** Processing line: ~      ]~
    +
    +** Processing line: ~        update_line_of_sight # updates line of sight by adding newly visible cells~
     - Inside source: true
     *** True Line Result
    -      ]
    -** Processing line: ~    }~
    +        update_line_of_sight # updates line of sight by adding newly visible cells
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    }
    -** Processing line: ~  end~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  end
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def serenity_bio_inside_home args~
    +** Processing line: ~    # Adds elements into the state.area collection~
     - Inside source: true
     *** True Line Result
    -  def serenity_bio_inside_home args
    -** Processing line: ~    {~
    +    # Adds elements into the state.area collection
    +** Processing line: ~    # The dungeon is derived using the coordinates of this collection~
     - Inside source: true
     *** True Line Result
    -    {
    -** Processing line: ~      background: 'sprites/inside-home.png',~
    +    # The dungeon is derived using the coordinates of this collection
    +** Processing line: ~    def load_area_one~
     - Inside source: true
     *** True Line Result
    -      background: 'sprites/inside-home.png',
    -** Processing line: ~      player: [34, 4],~
    +    def load_area_one
    +** Processing line: ~      state.area ||= []~
     - Inside source: true
     *** True Line Result
    -      player: [34, 4],
    -** Processing line: ~      storylines: [~
    +      state.area ||= []
    +** Processing line: ~      state.area << [8, 6]~
     - Inside source: true
     *** True Line Result
    -      storylines: [
    -** Processing line: ~        [34, 4, 4, 4, "I'm--- completely--- exhausted."],~
    +      state.area << [8, 6]
    +** Processing line: ~      state.area << [7, 6]~
     - Inside source: true
     *** True Line Result
    -        [34, 4, 4, 4, "I'm--- completely--- exhausted."],
    -** Processing line: ~      ],~
    +      state.area << [7, 6]
    +** Processing line: ~      state.area << [7, 7]~
     - Inside source: true
     *** True Line Result
    -      ],
    -** Processing line: ~      scenes: [~
    +      state.area << [7, 7]
    +** Processing line: ~      state.area << [8, 9]~
     - Inside source: true
     *** True Line Result
    -      scenes: [
    -** Processing line: ~        [30, 38, 12, 13, :serenity_bio_restless_sleep],~
    +      state.area << [8, 9]
    +** Processing line: ~      state.area << [7, 8]~
     - Inside source: true
     *** True Line Result
    -        [30, 38, 12, 13, :serenity_bio_restless_sleep],
    -** Processing line: ~        [32, 0, 8, 3, :serenity_bio_infront_of_home],~
    +      state.area << [7, 8]
    +** Processing line: ~      state.area << [7, 9]~
     - Inside source: true
     *** True Line Result
    -        [32, 0, 8, 3, :serenity_bio_infront_of_home],
    -** Processing line: ~      ]~
    +      state.area << [7, 9]
    +** Processing line: ~      state.area << [6, 4]~
     - Inside source: true
     *** True Line Result
    -      ]
    -** Processing line: ~    }~
    +      state.area << [6, 4]
    +** Processing line: ~      state.area << [7, 3]~
     - Inside source: true
     *** True Line Result
    -    }
    -** Processing line: ~  end~
    +      state.area << [7, 3]
    +** Processing line: ~      state.area << [7, 4]~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +      state.area << [7, 4]
    +** Processing line: ~      state.area << [6, 5]~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def serenity_bio_restless_sleep args~
    +      state.area << [6, 5]
    +** Processing line: ~      state.area << [7, 5]~
     - Inside source: true
     *** True Line Result
    -  def serenity_bio_restless_sleep args
    -** Processing line: ~    {~
    +      state.area << [7, 5]
    +** Processing line: ~      state.area << [8, 5]~
     - Inside source: true
     *** True Line Result
    -    {
    -** Processing line: ~      fade: 60,~
    +      state.area << [8, 5]
    +** Processing line: ~      state.area << [8, 4]~
     - Inside source: true
     *** True Line Result
    -      fade: 60,
    -** Processing line: ~      background: 'sprites/inside-home.png',~
    +      state.area << [8, 4]
    +** Processing line: ~      state.area << [1, 1]~
     - Inside source: true
     *** True Line Result
    -      background: 'sprites/inside-home.png',
    -** Processing line: ~      storylines: [~
    +      state.area << [1, 1]
    +** Processing line: ~      state.area << [0, 1]~
     - Inside source: true
     *** True Line Result
    -      storylines: [
    -** Processing line: ~        [32, 38, 10, 13, "I can't-- seem to sleep. I know nothing-- about the- crew-. Maybe- I- should- go read- up- on- them."],~
    +      state.area << [0, 1]
    +** Processing line: ~      state.area << [0, 2]~
     - Inside source: true
     *** True Line Result
    -        [32, 38, 10, 13, "I can't-- seem to sleep. I know nothing-- about the- crew-. Maybe- I- should- go read- up- on- them."],
    -** Processing line: ~      ],~
    +      state.area << [0, 2]
    +** Processing line: ~      state.area << [1, 2]~
     - Inside source: true
     *** True Line Result
    -      ],
    -** Processing line: ~      scenes: [~
    +      state.area << [1, 2]
    +** Processing line: ~      state.area << [2, 2]~
     - Inside source: true
     *** True Line Result
    -      scenes: [
    -** Processing line: ~        [32, 0, 8, 3, :serenity_bio_infront_of_home],~
    +      state.area << [2, 2]
    +** Processing line: ~      state.area << [2, 1]~
     - Inside source: true
     *** True Line Result
    -        [32, 0, 8, 3, :serenity_bio_infront_of_home],
    -** Processing line: ~      ]~
    +      state.area << [2, 1]
    +** Processing line: ~      state.area << [2, 3]~
     - Inside source: true
     *** True Line Result
    -      ]
    -** Processing line: ~    }~
    +      state.area << [2, 3]
    +** Processing line: ~      state.area << [1, 3]~
     - Inside source: true
     *** True Line Result
    -    }
    -** Processing line: ~  end~
    +      state.area << [1, 3]
    +** Processing line: ~      state.area << [1, 4]~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +      state.area << [1, 4]
    +** Processing line: ~      state.area << [2, 4]~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def serenity_bio_library args~
    +      state.area << [2, 4]
    +** Processing line: ~      state.area << [2, 5]~
     - Inside source: true
     *** True Line Result
    -  def serenity_bio_library args
    -** Processing line: ~    {~
    +      state.area << [2, 5]
    +** Processing line: ~      state.area << [1, 5]~
     - Inside source: true
     *** True Line Result
    -    {
    -** Processing line: ~      background: 'sprites/library.png',~
    +      state.area << [1, 5]
    +** Processing line: ~      state.area << [2, 6]~
     - Inside source: true
     *** True Line Result
    -      background: 'sprites/library.png',
    -** Processing line: ~      fade: 60,~
    +      state.area << [2, 6]
    +** Processing line: ~      state.area << [3, 6]~
     - Inside source: true
     *** True Line Result
    -      fade: 60,
    -** Processing line: ~      player: [30, 7],~
    +      state.area << [3, 6]
    +** Processing line: ~      state.area << [4, 6]~
     - Inside source: true
     *** True Line Result
    -      player: [30, 7],
    -** Processing line: ~      scenes: [~
    +      state.area << [4, 6]
    +** Processing line: ~      state.area << [4, 7]~
     - Inside source: true
     *** True Line Result
    -      scenes: [
    -** Processing line: ~        [21, 35, 3, 18, :serenity_bio_book]~
    +      state.area << [4, 7]
    +** Processing line: ~      state.area << [4, 8]~
     - Inside source: true
     *** True Line Result
    -        [21, 35, 3, 18, :serenity_bio_book]
    -** Processing line: ~      ]~
    +      state.area << [4, 8]
    +** Processing line: ~      state.area << [5, 8]~
     - Inside source: true
     *** True Line Result
    -      ]
    -** Processing line: ~    }~
    +      state.area << [5, 8]
    +** Processing line: ~      state.area << [5, 9]~
     - Inside source: true
     *** True Line Result
    -    }
    -** Processing line: ~  end~
    +      state.area << [5, 9]
    +** Processing line: ~      state.area << [6, 9]~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +      state.area << [6, 9]
    +** Processing line: ~      state.area << [7, 10]~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def serenity_bio_book args~
    +      state.area << [7, 10]
    +** Processing line: ~      state.area << [7, 11]~
     - Inside source: true
     *** True Line Result
    -  def serenity_bio_book args
    -** Processing line: ~    {~
    +      state.area << [7, 11]
    +** Processing line: ~      state.area << [7, 12]~
     - Inside source: true
     *** True Line Result
    -    {
    -** Processing line: ~      background: 'sprites/book.png',~
    +      state.area << [7, 12]
    +** Processing line: ~      state.area << [7, 12]~
     - Inside source: true
     *** True Line Result
    -      background: 'sprites/book.png',
    -** Processing line: ~      fade: 60,~
    +      state.area << [7, 12]
    +** Processing line: ~      state.area << [7, 13]~
     - Inside source: true
     *** True Line Result
    -      fade: 60,
    -** Processing line: ~      player: [6, 52],~
    +      state.area << [7, 13]
    +** Processing line: ~      state.area << [8, 13]~
     - Inside source: true
     *** True Line Result
    -      player: [6, 52],
    -** Processing line: ~      storylines: [~
    +      state.area << [8, 13]
    +** Processing line: ~      state.area << [9, 13]~
     - Inside source: true
     *** True Line Result
    -      storylines: [
    -** Processing line: ~        [ 4, 50, 56, 4, "The Title-- Reads: Never-- Forget-- Mission-- Serenity---"],~
    +      state.area << [9, 13]
    +** Processing line: ~      state.area << [10, 13]~
     - Inside source: true
     *** True Line Result
    -        [ 4, 50, 56, 4, "The Title-- Reads: Never-- Forget-- Mission-- Serenity---"],
    -** Processing line: ~~
    +      state.area << [10, 13]
    +** Processing line: ~      state.area << [11, 13]~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~        [ 4, 38,  8, 8, "Name: Matthew--- R. Sex: Male--- Age-- at-- Departure: 36-----"],~
    +      state.area << [11, 13]
    +** Processing line: ~      state.area << [12, 13]~
     - Inside source: true
     *** True Line Result
    -        [ 4, 38,  8, 8, "Name: Matthew--- R. Sex: Male--- Age-- at-- Departure: 36-----"],
    -** Processing line: ~        [14, 38, 46, 8, "Tribute-- Text: Matthew graduated-- Magna-- Cum-- Laude-- from MIT--- with-- a- PHD---- in Aero-- Nautical--- Engineering. He was immensely--- competitive, and had an insatiable---- thirst- for aerial-- battle. From the age of twenty, he remained-- undefeated--- in the Israeli-- Air- Force- \"Blue Flag\" combat-- exercises. By the age of 29--- he had already-- risen through- the ranks, and became-- the Lieutenant--- General--- of Lufwaffe. Matthew-- volenteered-- to- pilot-- Mission-- Serenity. To- this day, his wife- and son- are pillars-- of strength- for us. Rest- in Peace- Matthew, we are sorry-- that- news of the pregancy-- never-- reached- you. Please forgive us."],~
    +      state.area << [12, 13]
    +** Processing line: ~      state.area << [12, 12]~
     - Inside source: true
     *** True Line Result
    -        [14, 38, 46, 8, "Tribute-- Text: Matthew graduated-- Magna-- Cum-- Laude-- from MIT--- with-- a- PHD---- in Aero-- Nautical--- Engineering. He was immensely--- competitive, and had an insatiable---- thirst- for aerial-- battle. From the age of twenty, he remained-- undefeated--- in the Israeli-- Air- Force- \"Blue Flag\" combat-- exercises. By the age of 29--- he had already-- risen through- the ranks, and became-- the Lieutenant--- General--- of Lufwaffe. Matthew-- volenteered-- to- pilot-- Mission-- Serenity. To- this day, his wife- and son- are pillars-- of strength- for us. Rest- in Peace- Matthew, we are sorry-- that- news of the pregancy-- never-- reached- you. Please forgive us."],
    -** Processing line: ~~
    +      state.area << [12, 12]
    +** Processing line: ~      state.area << [8, 12]~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~        [4,  26,  8, 8, "Name: Aanka--- P. Sex: Female--- Age-- at-- Departure: 9-----"],~
    +      state.area << [8, 12]
    +** Processing line: ~      state.area << [9, 12]~
     - Inside source: true
     *** True Line Result
    -        [4,  26,  8, 8, "Name: Aanka--- P. Sex: Female--- Age-- at-- Departure: 9-----"],
    -** Processing line: ~        [14, 26, 46, 8, "Tribute-- Text: Aanka--- gratuated--- Magna-- Cum- Laude-- from MIT, at- the- age- of eight, with a- PHD---- in Astro-- Physics. Her-- IQ--- was over 390, the highest-- ever- recorded--- IQ-- in- human-- history. She changed- the landscape-- of Physics-- with her efforts- in- unravelling--- the mysteries--- of- Dark- Matter--. Anka discovered-- the threat- of Halley's-- Comet-- collision--- with Earth. She spear headed-- the global-- effort-- for Misson-- Serenity. Her- multilingual--- address-- to- the world-- brought- us all hope."],~
    +      state.area << [9, 12]
    +** Processing line: ~      state.area << [10, 12]~
     - Inside source: true
     *** True Line Result
    -        [14, 26, 46, 8, "Tribute-- Text: Aanka--- gratuated--- Magna-- Cum- Laude-- from MIT, at- the- age- of eight, with a- PHD---- in Astro-- Physics. Her-- IQ--- was over 390, the highest-- ever- recorded--- IQ-- in- human-- history. She changed- the landscape-- of Physics-- with her efforts- in- unravelling--- the mysteries--- of- Dark- Matter--. Anka discovered-- the threat- of Halley's-- Comet-- collision--- with Earth. She spear headed-- the global-- effort-- for Misson-- Serenity. Her- multilingual--- address-- to- the world-- brought- us all hope."],
    -** Processing line: ~~
    +      state.area << [10, 12]
    +** Processing line: ~      state.area << [11, 12]~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~        [4,  14,  8, 8, "Name: Sasha--- N. Sex: Female--- Age-- at-- Departure: 29-----"],~
    +      state.area << [11, 12]
    +** Processing line: ~      state.area << [12, 11]~
     - Inside source: true
     *** True Line Result
    -        [4,  14,  8, 8, "Name: Sasha--- N. Sex: Female--- Age-- at-- Departure: 29-----"],
    -** Processing line: ~        [14, 14, 46, 8, "Tribute-- Text: Sasha gratuated-- Magna-- Cum- Laude-- from MIT--- with-- a- PHD---- in Computer---- Science----. She-- was-- brilliant--, strong- willed--, and-- a-- stunningly--- beautiful--- woman---. Sasha---- is- the- creator--- of the world's--- first- Ruby--- Quantum-- Machine---. After-- much- critical--- acclaim--, the Quantum-- Computer-- was placed in MIT's---- Museam-- next- to- Richard--- G. and Thomas--- K.'s---- Lisp-- Machine---. Her- engineering--- skills-- were-- paramount--- for Mission--- Serenity's--- success. Humanity-- misses-- you-- dearly,-- Sasha--. Life-- shines-- a dimmer-- light-- now- that- your- angelic- voice-- can never- be heard- again."],~
    +      state.area << [12, 11]
    +** Processing line: ~      state.area << [13, 11]~
     - Inside source: true
     *** True Line Result
    -        [14, 14, 46, 8, "Tribute-- Text: Sasha gratuated-- Magna-- Cum- Laude-- from MIT--- with-- a- PHD---- in Computer---- Science----. She-- was-- brilliant--, strong- willed--, and-- a-- stunningly--- beautiful--- woman---. Sasha---- is- the- creator--- of the world's--- first- Ruby--- Quantum-- Machine---. After-- much- critical--- acclaim--, the Quantum-- Computer-- was placed in MIT's---- Museam-- next- to- Richard--- G. and Thomas--- K.'s---- Lisp-- Machine---. Her- engineering--- skills-- were-- paramount--- for Mission--- Serenity's--- success. Humanity-- misses-- you-- dearly,-- Sasha--. Life-- shines-- a dimmer-- light-- now- that- your- angelic- voice-- can never- be heard- again."],
    -** Processing line: ~      ],~
    +      state.area << [13, 11]
    +** Processing line: ~      state.area << [13, 10]~
     - Inside source: true
     *** True Line Result
    -      ],
    -** Processing line: ~      scenes: [~
    +      state.area << [13, 10]
    +** Processing line: ~      state.area << [13, 9]~
     - Inside source: true
     *** True Line Result
    -      scenes: [
    -** Processing line: ~        [*hotspot_bottom, :serenity_bio_finally_to_bed]~
    +      state.area << [13, 9]
    +** Processing line: ~      state.area << [13, 8]~
     - Inside source: true
     *** True Line Result
    -        [*hotspot_bottom, :serenity_bio_finally_to_bed]
    -** Processing line: ~      ]~
    +      state.area << [13, 8]
    +** Processing line: ~      state.area << [13, 7]~
     - Inside source: true
     *** True Line Result
    -      ]
    -** Processing line: ~    }~
    +      state.area << [13, 7]
    +** Processing line: ~      state.area << [13, 6]~
     - Inside source: true
     *** True Line Result
    -    }
    -** Processing line: ~  end~
    +      state.area << [13, 6]
    +** Processing line: ~      state.area << [12, 6]~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +      state.area << [12, 6]
    +** Processing line: ~      state.area << [14, 6]~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def serenity_bio_finally_to_bed args~
    +      state.area << [14, 6]
    +** Processing line: ~      state.area << [14, 5]~
     - Inside source: true
     *** True Line Result
    -  def serenity_bio_finally_to_bed args
    -** Processing line: ~    {~
    +      state.area << [14, 5]
    +** Processing line: ~      state.area << [13, 5]~
     - Inside source: true
     *** True Line Result
    -    {
    -** Processing line: ~      fade: 60,~
    +      state.area << [13, 5]
    +** Processing line: ~      state.area << [12, 5]~
     - Inside source: true
     *** True Line Result
    -      fade: 60,
    -** Processing line: ~      background: 'sprites/inside-home.png',~
    +      state.area << [12, 5]
    +** Processing line: ~      state.area << [12, 4]~
     - Inside source: true
     *** True Line Result
    -      background: 'sprites/inside-home.png',
    -** Processing line: ~      player: [35, 3],~
    +      state.area << [12, 4]
    +** Processing line: ~      state.area << [13, 4]~
     - Inside source: true
     *** True Line Result
    -      player: [35, 3],
    -** Processing line: ~      storylines: [~
    +      state.area << [13, 4]
    +** Processing line: ~      state.area << [14, 4]~
     - Inside source: true
     *** True Line Result
    -      storylines: [
    -** Processing line: ~        [34, 4, 4, 4, "Maybe-- I'll-- be able-- to sleep- now..."],~
    +      state.area << [14, 4]
    +** Processing line: ~      state.area << [1, 6]~
     - Inside source: true
     *** True Line Result
    -        [34, 4, 4, 4, "Maybe-- I'll-- be able-- to sleep- now..."],
    -** Processing line: ~      ],~
    +      state.area << [1, 6]
    +** Processing line: ~      state.area << [6, 6]~
     - Inside source: true
     *** True Line Result
    -      ],
    -** Processing line: ~      scenes: [~
    +      state.area << [6, 6]
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      scenes: [
    -** Processing line: ~        [32, 38, 10, 13, :bad_dream],~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        [32, 38, 10, 13, :bad_dream],
    -** Processing line: ~      ]~
    +
    +** Processing line: ~    # Starts with an empty dungeon collection, and adds dungeon cells into it.~
     - Inside source: true
     *** True Line Result
    -      ]
    -** Processing line: ~    }~
    +    # Starts with an empty dungeon collection, and adds dungeon cells into it.
    +** Processing line: ~    def derive_dungeon_from_area~
     - Inside source: true
     *** True Line Result
    -    }
    -** Processing line: ~  end~
    +    def derive_dungeon_from_area
    +** Processing line: ~      state.dungeon = [] # starts as empty collection~
     - Inside source: true
     *** True Line Result
    -  end
    +      state.dungeon = [] # starts as empty collection
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def bad_dream args~
    +** Processing line: ~      state.area.each do |a| # for each element of the area collection~
     - Inside source: true
     *** True Line Result
    -  def bad_dream args
    -** Processing line: ~    {~
    +      state.area.each do |a| # for each element of the area collection
    +** Processing line: ~        state.dungeon << state.new_entity(:dungeon_cell) do |d| # declares each dungeon cell as new entity~
     - Inside source: true
     *** True Line Result
    -    {
    -** Processing line: ~      fade: 120,~
    +        state.dungeon << state.new_entity(:dungeon_cell) do |d| # declares each dungeon cell as new entity
    +** Processing line: ~          d.x = a.x # dungeon cell position using coordinates from area~
     - Inside source: true
     *** True Line Result
    -      fade: 120,
    -** Processing line: ~      background: 'sprites/inside-home.png',~
    +          d.x = a.x # dungeon cell position using coordinates from area
    +** Processing line: ~          d.y = a.y~
     - Inside source: true
     *** True Line Result
    -      background: 'sprites/inside-home.png',
    -** Processing line: ~      player: [34, 35],~
    +          d.y = a.y
    +** Processing line: ~          d.is_visible = false # cell is not visible~
     - Inside source: true
     *** True Line Result
    -      player: [34, 35],
    -** Processing line: ~      storylines: [~
    +          d.is_visible = false # cell is not visible
    +** Processing line: ~          d.alpha = 0 # not transparent at all~
     - Inside source: true
     *** True Line Result
    -      storylines: [
    -** Processing line: ~        [34, 34, 4, 4, "Man. I did not- sleep- well- at all..."],~
    +          d.alpha = 0 # not transparent at all
    +** Processing line: ~          d.border = [left_margin   + a.x * grid_size,~
     - Inside source: true
     *** True Line Result
    -        [34, 34, 4, 4, "Man. I did not- sleep- well- at all..."],
    -** Processing line: ~      ],~
    +          d.border = [left_margin   + a.x * grid_size,
    +** Processing line: ~                      bottom_margin + a.y * grid_size,~
     - Inside source: true
     *** True Line Result
    -      ],
    -** Processing line: ~      scenes: [~
    +                      bottom_margin + a.y * grid_size,
    +** Processing line: ~                      grid_size,~
     - Inside source: true
     *** True Line Result
    -      scenes: [
    -** Processing line: ~        [32, -1, 8, 3, :bad_dream_observatory]~
    +                      grid_size,
    +** Processing line: ~                      grid_size,~
     - Inside source: true
     *** True Line Result
    -        [32, -1, 8, 3, :bad_dream_observatory]
    -** Processing line: ~      ]~
    +                      grid_size,
    +** Processing line: ~                      *blue,~
     - Inside source: true
     *** True Line Result
    -      ]
    -** Processing line: ~    }~
    +                      *blue,
    +** Processing line: ~                      255] # sets border definition for dungeon cell~
     - Inside source: true
     *** True Line Result
    -    }
    -** Processing line: ~  end~
    +                      255] # sets border definition for dungeon cell
    +** Processing line: ~          d # returns dungeon cell~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +          d # returns dungeon cell
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def bad_dream_observatory args~
    +        end
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -  def bad_dream_observatory args
    -** Processing line: ~    {~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    {
    -** Processing line: ~      background: 'sprites/inside-observatory.png',~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      background: 'sprites/inside-observatory.png',
    -** Processing line: ~      fade: 120,~
    +
    +** Processing line: ~    def left_margin~
     - Inside source: true
     *** True Line Result
    -      fade: 120,
    -** Processing line: ~      player: [51, 12],~
    +    def left_margin
    +** Processing line: ~      40  # sets left margin~
     - Inside source: true
     *** True Line Result
    -      player: [51, 12],
    -** Processing line: ~      storylines: [~
    +      40  # sets left margin
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      storylines: [
    -** Processing line: ~        [50, 10, 4, 4,   "Breathe, Hiro. Just see what's there... everything--- will- be okay."]~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        [50, 10, 4, 4,   "Breathe, Hiro. Just see what's there... everything--- will- be okay."]
    -** Processing line: ~      ],~
    +
    +** Processing line: ~    def bottom_margin~
     - Inside source: true
     *** True Line Result
    -      ],
    -** Processing line: ~      scenes: [~
    +    def bottom_margin
    +** Processing line: ~      60 # sets bottom margin~
     - Inside source: true
     *** True Line Result
    -      scenes: [
    -** Processing line: ~        [30, 18, 5, 12, :bad_dream_inside_mainframe]~
    +      60 # sets bottom margin
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -        [30, 18, 5, 12, :bad_dream_inside_mainframe]
    -** Processing line: ~      ],~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      ],
    -** Processing line: ~      render_override: :blinking_light_inside_observatory_render~
    +
    +** Processing line: ~    def grid_size~
     - Inside source: true
     *** True Line Result
    -      render_override: :blinking_light_inside_observatory_render
    -** Processing line: ~    }~
    +    def grid_size
    +** Processing line: ~      40 # sets size of grid square~
     - Inside source: true
     *** True Line Result
    -    }
    -** Processing line: ~  end~
    +      40 # sets size of grid square
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  end
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def bad_dream_inside_mainframe args~
    +** Processing line: ~    # Updates the line of sight by calling the thick_line_of_sight method and~
     - Inside source: true
     *** True Line Result
    -  def bad_dream_inside_mainframe args
    -** Processing line: ~    {~
    +    # Updates the line of sight by calling the thick_line_of_sight method and
    +** Processing line: ~    # adding dungeon cells to the newly_visible collection~
     - Inside source: true
     *** True Line Result
    -    {
    -** Processing line: ~      player: [32, 4],~
    +    # adding dungeon cells to the newly_visible collection
    +** Processing line: ~    def update_line_of_sight~
     - Inside source: true
     *** True Line Result
    -      player: [32, 4],
    -** Processing line: ~      background: 'sprites/mainframe.png',~
    +    def update_line_of_sight
    +** Processing line: ~      variations = [-1, 0, 1]~
     - Inside source: true
     *** True Line Result
    -      background: 'sprites/mainframe.png',
    -** Processing line: ~      fade: 120,~
    +      variations = [-1, 0, 1]
    +** Processing line: ~      # creates collection of newly visible dungeon cells~
     - Inside source: true
     *** True Line Result
    -      fade: 120,
    -** Processing line: ~      storylines: [~
    +      # creates collection of newly visible dungeon cells
    +** Processing line: ~      newly_visible = variations.product(variations).flat_map do |rise, run| # combo of all elements~
     - Inside source: true
     *** True Line Result
    -      storylines: [
    -** Processing line: ~        [22, 45, 17, 4, (bad_dream_last_reply args)],~
    +      newly_visible = variations.product(variations).flat_map do |rise, run| # combo of all elements
    +** Processing line: ~        thick_line_of_sight state.x, state.y, rise, run, 15, # calls thick_line_of_sight method~
     - Inside source: true
     *** True Line Result
    -        [22, 45, 17, 4, (bad_dream_last_reply args)],
    -** Processing line: ~      ],~
    +        thick_line_of_sight state.x, state.y, rise, run, 15, # calls thick_line_of_sight method
    +** Processing line: ~                            lambda { |x, y| dungeon_cell_exists? x, y } # checks whether or not cell exists~
     - Inside source: true
     *** True Line Result
    -      ],
    -** Processing line: ~      scenes: [~
    +                            lambda { |x, y| dungeon_cell_exists? x, y } # checks whether or not cell exists
    +** Processing line: ~      end.uniq# removes duplicates~
     - Inside source: true
     *** True Line Result
    -      scenes: [
    -** Processing line: ~        [45, 45,  4, 4, :bad_dream_everyone_dead],~
    +      end.uniq# removes duplicates
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        [45, 45,  4, 4, :bad_dream_everyone_dead],
    -** Processing line: ~      ]~
    +
    +** Processing line: ~      state.dungeon.each do |d| # perform action on each element of dungeons collection~
     - Inside source: true
     *** True Line Result
    -      ]
    -** Processing line: ~    }~
    +      state.dungeon.each do |d| # perform action on each element of dungeons collection
    +** Processing line: ~        d.is_visible = newly_visible.find { |v| v.x == d.x && v.y == d.y } # finds match inside newly_visible collection~
     - Inside source: true
     *** True Line Result
    -    }
    -** Processing line: ~  end~
    +        d.is_visible = newly_visible.find { |v| v.x == d.x && v.y == d.y } # finds match inside newly_visible collection
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -  end
    +      end
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def bad_dream_everyone_dead args~
    +** Processing line: ~    #Returns a boolean value~
     - Inside source: true
     *** True Line Result
    -  def bad_dream_everyone_dead args
    -** Processing line: ~    {~
    +    #Returns a boolean value
    +** Processing line: ~    def dungeon_cell_exists? x, y~
     - Inside source: true
     *** True Line Result
    -    {
    -** Processing line: ~      background: 'sprites/mainframe.png',~
    +    def dungeon_cell_exists? x, y
    +** Processing line: ~      # Finds cell coordinates inside dungeon collection to determine if dungeon cell exists~
     - Inside source: true
     *** True Line Result
    -      background: 'sprites/mainframe.png',
    -** Processing line: ~      storylines: [~
    +      # Finds cell coordinates inside dungeon collection to determine if dungeon cell exists
    +** Processing line: ~      state.dungeon.find { |d| d.x == x && d.y == y }~
     - Inside source: true
     *** True Line Result
    -      storylines: [
    -** Processing line: ~        [22, 45, 17, 4, (bad_dream_last_reply args)],~
    +      state.dungeon.find { |d| d.x == x && d.y == y }
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -        [22, 45, 17, 4, (bad_dream_last_reply args)],
    -** Processing line: ~        [45, 45,  4, 4, "Hi-- Hiro. This is Sasha. By the time- you get this- message, chances-- are we will- already-- be- dead. The batteries--- got- damaged-- during-- removal. And- we don't-- have enough-- power-- for Life-- Support. The air-- is- already--- starting-- to taste- bad. It... would- have been- nice... to go- on a date--- with- you-- when-- I- got- back- to Earth. Anyways, good-- bye-- Hiro-- XOXOXO----"],~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        [45, 45,  4, 4, "Hi-- Hiro. This is Sasha. By the time- you get this- message, chances-- are we will- already-- be- dead. The batteries--- got- damaged-- during-- removal. And- we don't-- have enough-- power-- for Life-- Support. The air-- is- already--- starting-- to taste- bad. It... would- have been- nice... to go- on a date--- with- you-- when-- I- got- back- to Earth. Anyways, good-- bye-- Hiro-- XOXOXO----"],
    -** Processing line: ~        [22,  5, 17, 4, "Meh. Whatever, I didn't-- want to save them anyways. What- a pain- in my ass."],~
    +
    +** Processing line: ~    # Calls line_of_sight method to add elements to result collection~
     - Inside source: true
     *** True Line Result
    -        [22,  5, 17, 4, "Meh. Whatever, I didn't-- want to save them anyways. What- a pain- in my ass."],
    -** Processing line: ~      ],~
    +    # Calls line_of_sight method to add elements to result collection
    +** Processing line: ~    def thick_line_of_sight start_x, start_y, rise, run, distance, cell_exists_lambda~
     - Inside source: true
     *** True Line Result
    -      ],
    -** Processing line: ~      scenes: [~
    +    def thick_line_of_sight start_x, start_y, rise, run, distance, cell_exists_lambda
    +** Processing line: ~      result = []~
     - Inside source: true
     *** True Line Result
    -      scenes: [
    -** Processing line: ~        [*hotspot_bottom, :anka_inside_room]~
    +      result = []
    +** Processing line: ~      result += line_of_sight start_x, start_y, rise, run, distance, cell_exists_lambda~
     - Inside source: true
     *** True Line Result
    -        [*hotspot_bottom, :anka_inside_room]
    -** Processing line: ~      ]~
    +      result += line_of_sight start_x, start_y, rise, run, distance, cell_exists_lambda
    +** Processing line: ~      result += line_of_sight start_x - 1, start_y, rise, run, distance, cell_exists_lambda # one left~
     - Inside source: true
     *** True Line Result
    -      ]
    -** Processing line: ~    }~
    +      result += line_of_sight start_x - 1, start_y, rise, run, distance, cell_exists_lambda # one left
    +** Processing line: ~      result += line_of_sight start_x + 1, start_y, rise, run, distance, cell_exists_lambda # one right~
     - Inside source: true
     *** True Line Result
    -    }
    -** Processing line: ~  end~
    +      result += line_of_sight start_x + 1, start_y, rise, run, distance, cell_exists_lambda # one right
    +** Processing line: ~      result~
     - Inside source: true
     *** True Line Result
    -  end
    +      result
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def bad_dream_last_reply args~
    +** Processing line: ~    # Adds points to the result collection to create the player's line of sight~
     - Inside source: true
     *** True Line Result
    -  def bad_dream_last_reply args
    -** Processing line: ~    if args.state.scene_history.include? :replied_to_serenity_alive_firmly~
    +    # Adds points to the result collection to create the player's line of sight
    +** Processing line: ~    def line_of_sight start_x, start_y, rise, run, distance, cell_exists_lambda~
     - Inside source: true
     *** True Line Result
    -    if args.state.scene_history.include? :replied_to_serenity_alive_firmly
    -** Processing line: ~      return "Buffer--: #{serenity_alive_firm_reply.quote}"~
    +    def line_of_sight start_x, start_y, rise, run, distance, cell_exists_lambda
    +** Processing line: ~      result = [] # starts as empty collection~
     - Inside source: true
     *** True Line Result
    -      return "Buffer--: #{serenity_alive_firm_reply.quote}"
    -** Processing line: ~    else~
    +      result = [] # starts as empty collection
    +** Processing line: ~      points = points_on_line start_x, start_y, rise, run, distance # calls points_on_line method~
     - Inside source: true
     *** True Line Result
    -    else
    -** Processing line: ~      return "Buffer--: #{serenity_alive_sugarcoated_reply.quote}"~
    +      points = points_on_line start_x, start_y, rise, run, distance # calls points_on_line method
    +** Processing line: ~      points.each do |p| # for each point in collection~
     - Inside source: true
     *** True Line Result
    -      return "Buffer--: #{serenity_alive_sugarcoated_reply.quote}"
    -** Processing line: ~    end~
    +      points.each do |p| # for each point in collection
    +** Processing line: ~        if cell_exists_lambda.call(p.x, p.y) # if the cell exists~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~  end~
    +        if cell_exists_lambda.call(p.x, p.y) # if the cell exists
    +** Processing line: ~          result << p # add it to result collection~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +          result << p # add it to result collection
    +** Processing line: ~        else # if cell does not exist~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~#+end_src~
    -- Line was identified as the end of a code block.
    -*** True Line Result
    -#+end_src
    -** Processing line: ~~
    -- End of paragraph detected.
    +        else # if cell does not exist
    +** Processing line: ~          return result # return result collection as it is~
    +- Inside source: true
     *** True Line Result
    -
    -** Processing line: ~*** Rpg Narrative - Return Of Serenity - storyline_serenity_introduction.rb~
    -- Header detected.
    +          return result # return result collection as it is
    +** Processing line: ~        end~
    +- Inside source: true
     *** True Line Result
    -
    +        end
    +** Processing line: ~      end~
    +- Inside source: true
     *** True Line Result
    -*** Rpg Narrative - Return Of Serenity - storyline_serenity_introduction.rb
    -** Processing line: ~#+begin_src ruby~
    -- Line was identified as the beginning of a code block.
    +      end
    +** Processing line: ~~
    +- Inside source: true
     *** True Line Result
     
    -*** True Line Result
    -#+begin_src ruby
    -** Processing line: ~  # ./samples/99_genre_rpg_narrative/return_of_serenity/app/storyline_serenity_introduction.rb~
    +** Processing line: ~      result # return result collection~
     - Inside source: true
     *** True Line Result
    -  # ./samples/99_genre_rpg_narrative/return_of_serenity/app/storyline_serenity_introduction.rb
    -** Processing line: ~  # decision_graph "Message from Sasha",~
    +      result # return result collection
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  # decision_graph "Message from Sasha",
    -** Processing line: ~  #                "I should reply.",~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  #                "I should reply.",
    -** Processing line: ~  #                [:replied_to_introduction_seriously,  "Reply Seriously", "Who is this?"],~
    +
    +** Processing line: ~    # Finds the coordinates of the points on the line by performing calculations~
     - Inside source: true
     *** True Line Result
    -  #                [:replied_to_introduction_seriously,  "Reply Seriously", "Who is this?"],
    -** Processing line: ~  # [:replied_to_introduction_humorously, "Reply Humorously", "New phone who dis?"]~
    +    # Finds the coordinates of the points on the line by performing calculations
    +** Processing line: ~    def points_on_line start_x, start_y, rise, run, distance~
     - Inside source: true
     *** True Line Result
    -  # [:replied_to_introduction_humorously, "Reply Humorously", "New phone who dis?"]
    -** Processing line: ~  def reply_to_introduction args~
    +    def points_on_line start_x, start_y, rise, run, distance
    +** Processing line: ~      distance.times.map do |i| # perform an action~
     - Inside source: true
     *** True Line Result
    -  def reply_to_introduction args
    -** Processing line: ~    decision_graph  "\"Mission-- control--, your- main- comm-- channels-- seem-- to be down. My apologies-- for- using-- this low- level-- exploit--. What's-- going-- on down there? We are ready-- for reentry--.\" Message--- Timestamp---: 4- hours-- 23--- minutes-- ago--.",~
    +      distance.times.map do |i| # perform an action
    +** Processing line: ~        [start_x + run * i, start_y + rise * i] # definition of point~
     - Inside source: true
     *** True Line Result
    -    decision_graph  "\"Mission-- control--, your- main- comm-- channels-- seem-- to be down. My apologies-- for- using-- this low- level-- exploit--. What's-- going-- on down there? We are ready-- for reentry--.\" Message--- Timestamp---: 4- hours-- 23--- minutes-- ago--.",
    -** Processing line: ~                    "Whoever-- pulled- off this exploit-- knows their stuff. I should reply--.",~
    +        [start_x + run * i, start_y + rise * i] # definition of point
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -                    "Whoever-- pulled- off this exploit-- knows their stuff. I should reply--.",
    -** Processing line: ~                    [:replied_to_introduction_seriously,  "Serious Reply",  "Hello, Who- is sending-- this message--?"],~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -                    [:replied_to_introduction_seriously,  "Serious Reply",  "Hello, Who- is sending-- this message--?"],
    -** Processing line: ~                    [:replied_to_introduction_humorously, "Humorous Reply", "New phone, who dis?"]~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -                    [:replied_to_introduction_humorously, "Humorous Reply", "New phone, who dis?"]
    -** Processing line: ~  end~
    +
    +** Processing line: ~    def render_canvas~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +    def render_canvas
    +** Processing line: ~      return~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def replied_to_introduction_seriously args~
    +      return
    +** Processing line: ~      outputs.borders << state.canvas.map do |c| # on each element of canvas collection~
     - Inside source: true
     *** True Line Result
    -  def replied_to_introduction_seriously args
    -** Processing line: ~    {~
    +      outputs.borders << state.canvas.map do |c| # on each element of canvas collection
    +** Processing line: ~        c.border # outputs border~
     - Inside source: true
     *** True Line Result
    -    {
    -** Processing line: ~      background: 'sprites/inside-observatory.png',~
    +        c.border # outputs border
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -      background: 'sprites/inside-observatory.png',
    -** Processing line: ~      fade: 60,~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      fade: 60,
    -** Processing line: ~      player: [32, 21],~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      player: [32, 21],
    -** Processing line: ~      scenes: [~
    +
    +** Processing line: ~    # Outputs the dungeon cells.~
     - Inside source: true
     *** True Line Result
    -      scenes: [
    -** Processing line: ~        *replied_to_introduction_shared_scenes(args)~
    +    # Outputs the dungeon cells.
    +** Processing line: ~    def render_dungeon~
     - Inside source: true
     *** True Line Result
    -        *replied_to_introduction_shared_scenes(args)
    -** Processing line: ~      ],~
    +    def render_dungeon
    +** Processing line: ~      outputs.solids << [0, 0, grid.w, grid.h] # outputs black background for grid~
     - Inside source: true
     *** True Line Result
    -      ],
    -** Processing line: ~      storylines: [~
    +      outputs.solids << [0, 0, grid.w, grid.h] # outputs black background for grid
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      storylines: [
    -** Processing line: ~        [30, 18, 5, 12, "Buffer-- has been set to: \"Hello, Who- is sending-- this message--?\""],~
    +
    +** Processing line: ~      # Sets the alpha value (opacity) for each dungeon cell and calls the cell_border method.~
     - Inside source: true
     *** True Line Result
    -        [30, 18, 5, 12, "Buffer-- has been set to: \"Hello, Who- is sending-- this message--?\""],
    -** Processing line: ~        *replied_to_introduction_shared_storylines(args)~
    +      # Sets the alpha value (opacity) for each dungeon cell and calls the cell_border method.
    +** Processing line: ~      outputs.borders << state.dungeon.map do |d| # for each element in dungeon collection~
     - Inside source: true
     *** True Line Result
    -        *replied_to_introduction_shared_storylines(args)
    -** Processing line: ~      ]~
    +      outputs.borders << state.dungeon.map do |d| # for each element in dungeon collection
    +** Processing line: ~        d.alpha += if d.is_visible # if cell is visible~
     - Inside source: true
     *** True Line Result
    -      ]
    -** Processing line: ~    }~
    +        d.alpha += if d.is_visible # if cell is visible
    +** Processing line: ~                   255.fdiv(30) # increment opacity (transparency)~
     - Inside source: true
     *** True Line Result
    -    }
    -** Processing line: ~  end~
    +                   255.fdiv(30) # increment opacity (transparency)
    +** Processing line: ~                 else # if cell is not visible~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +                 else # if cell is not visible
    +** Processing line: ~                   255.fdiv(600) * -1 # decrease opacity~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def replied_to_introduction_humorously args~
    +                   255.fdiv(600) * -1 # decrease opacity
    +** Processing line: ~                 end~
     - Inside source: true
     *** True Line Result
    -  def replied_to_introduction_humorously args
    -** Processing line: ~    {~
    +                 end
    +** Processing line: ~        d.alpha = d.alpha.cap_min_max(0, 255)~
     - Inside source: true
     *** True Line Result
    -    {
    -** Processing line: ~      background: 'sprites/inside-observatory.png',~
    +        d.alpha = d.alpha.cap_min_max(0, 255)
    +** Processing line: ~        cell_border d.x, d.y, [*blue, d.alpha] # sets blue border using alpha value~
     - Inside source: true
     *** True Line Result
    -      background: 'sprites/inside-observatory.png',
    -** Processing line: ~      fade: 60,~
    +        cell_border d.x, d.y, [*blue, d.alpha] # sets blue border using alpha value
    +** Processing line: ~      end.reject_nil~
     - Inside source: true
     *** True Line Result
    -      fade: 60,
    -** Processing line: ~      player: [32, 21],~
    +      end.reject_nil
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      player: [32, 21],
    -** Processing line: ~      scenes: [~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      scenes: [
    -** Processing line: ~        *replied_to_introduction_shared_scenes(args)~
    +
    +** Processing line: ~    # Sets definition of a cell border using the parameters~
     - Inside source: true
     *** True Line Result
    -        *replied_to_introduction_shared_scenes(args)
    -** Processing line: ~      ],~
    +    # Sets definition of a cell border using the parameters
    +** Processing line: ~    def cell_border x, y, color = nil~
     - Inside source: true
     *** True Line Result
    -      ],
    -** Processing line: ~      storylines: [~
    +    def cell_border x, y, color = nil
    +** Processing line: ~      [left_margin   + x * grid_size,~
     - Inside source: true
     *** True Line Result
    -      storylines: [
    -** Processing line: ~        [30, 18, 5, 12, "Buffer-- has been set to: \"New- phone. Who dis?\""],~
    +      [left_margin   + x * grid_size,
    +** Processing line: ~      bottom_margin + y * grid_size,~
     - Inside source: true
     *** True Line Result
    -        [30, 18, 5, 12, "Buffer-- has been set to: \"New- phone. Who dis?\""],
    -** Processing line: ~        *replied_to_introduction_shared_storylines(args)~
    +      bottom_margin + y * grid_size,
    +** Processing line: ~      grid_size,~
     - Inside source: true
     *** True Line Result
    -        *replied_to_introduction_shared_storylines(args)
    -** Processing line: ~      ]~
    +      grid_size,
    +** Processing line: ~      grid_size,~
     - Inside source: true
     *** True Line Result
    -      ]
    -** Processing line: ~    }~
    +      grid_size,
    +** Processing line: ~      *color]~
     - Inside source: true
     *** True Line Result
    -    }
    -** Processing line: ~  end~
    +      *color]
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  end
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def replied_to_introduction_shared_storylines args~
    +** Processing line: ~    # Sets the values for the player and outputs it as a label~
     - Inside source: true
     *** True Line Result
    -  def replied_to_introduction_shared_storylines args
    -** Processing line: ~    [~
    +    # Sets the values for the player and outputs it as a label
    +** Processing line: ~    def render_player~
     - Inside source: true
     *** True Line Result
    -    [
    -** Processing line: ~      [30, 10, 5, 4, "It's-- going-- to take a while-- for this reply-- to make it's-- way back."],~
    +    def render_player
    +** Processing line: ~      outputs.labels << [grid_x(state.x) + 20, # positions "@" text in center of grid square~
     - Inside source: true
     *** True Line Result
    -      [30, 10, 5, 4, "It's-- going-- to take a while-- for this reply-- to make it's-- way back."],
    -** Processing line: ~      [40, 10, 5, 4, "4- hours-- to send a message-- at light speed?! How far away-- is the sender--?"],~
    +      outputs.labels << [grid_x(state.x) + 20, # positions "@" text in center of grid square
    +** Processing line: ~                       grid_y(state.y) + 35,~
     - Inside source: true
     *** True Line Result
    -      [40, 10, 5, 4, "4- hours-- to send a message-- at light speed?! How far away-- is the sender--?"],
    -** Processing line: ~      [50, 10, 5, 4, "I know- I've-- read about-- light- speed- travel-- before--. Maybe-- the library--- still has that- poster."]~
    +                       grid_y(state.y) + 35,
    +** Processing line: ~                       "@", # player is represented by a white "@" character~
     - Inside source: true
     *** True Line Result
    -      [50, 10, 5, 4, "I know- I've-- read about-- light- speed- travel-- before--. Maybe-- the library--- still has that- poster."]
    -** Processing line: ~    ]~
    +                       "@", # player is represented by a white "@" character
    +** Processing line: ~                       1, 1, *white]~
     - Inside source: true
     *** True Line Result
    -    ]
    -** Processing line: ~  end~
    +                       1, 1, *white]
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  end
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def replied_to_introduction_shared_scenes args~
    +** Processing line: ~    def grid_x x~
     - Inside source: true
     *** True Line Result
    -  def replied_to_introduction_shared_scenes args
    -** Processing line: ~    [[60, 0, 4, 32, :replied_to_introduction_observatory]]~
    +    def grid_x x
    +** Processing line: ~      left_margin + x * grid_size # positions horizontally on grid~
     - Inside source: true
     *** True Line Result
    -    [[60, 0, 4, 32, :replied_to_introduction_observatory]]
    -** Processing line: ~  end~
    +      left_margin + x * grid_size # positions horizontally on grid
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  end
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def replied_to_introduction_observatory args~
    -- Inside source: true
    -*** True Line Result
    -  def replied_to_introduction_observatory args
    -** Processing line: ~    {~
    +** Processing line: ~    def grid_y y~
     - Inside source: true
     *** True Line Result
    -    {
    -** Processing line: ~      background: 'sprites/observatory.png',~
    +    def grid_y y
    +** Processing line: ~      bottom_margin + y * grid_size # positions vertically on grid~
     - Inside source: true
     *** True Line Result
    -      background: 'sprites/observatory.png',
    -** Processing line: ~      player: [28, 39],~
    +      bottom_margin + y * grid_size # positions vertically on grid
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      player: [28, 39],
    -** Processing line: ~      scenes: [~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      scenes: [
    -** Processing line: ~        [60, 0, 4, 32, :replied_to_introduction_path_to_observatory]~
    +
    +** Processing line: ~    # Outputs enemies onto the screen.~
     - Inside source: true
     *** True Line Result
    -        [60, 0, 4, 32, :replied_to_introduction_path_to_observatory]
    -** Processing line: ~      ]~
    +    # Outputs enemies onto the screen.
    +** Processing line: ~    def render_enemies~
     - Inside source: true
     *** True Line Result
    -      ]
    -** Processing line: ~    }~
    +    def render_enemies
    +** Processing line: ~      state.enemies.map do |e| # for each enemy in the collection~
     - Inside source: true
     *** True Line Result
    -    }
    -** Processing line: ~  end~
    +      state.enemies.map do |e| # for each enemy in the collection
    +** Processing line: ~        alpha = 255 # set opacity (full transparency)~
     - Inside source: true
     *** True Line Result
    -  end
    +        alpha = 255 # set opacity (full transparency)
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def replied_to_introduction_path_to_observatory args~
    +** Processing line: ~        # Outputs an enemy using a label.~
     - Inside source: true
     *** True Line Result
    -  def replied_to_introduction_path_to_observatory args
    -** Processing line: ~    {~
    +        # Outputs an enemy using a label.
    +** Processing line: ~        outputs.labels << [~
     - Inside source: true
     *** True Line Result
    -    {
    -** Processing line: ~      background: 'sprites/path-to-observatory.png',~
    +        outputs.labels << [
    +** Processing line: ~                     left_margin + 20 +  e.x * grid_size, # positions enemy's "r" text in center of grid square~
     - Inside source: true
     *** True Line Result
    -      background: 'sprites/path-to-observatory.png',
    -** Processing line: ~      player: [0, 26],~
    +                     left_margin + 20 +  e.x * grid_size, # positions enemy's "r" text in center of grid square
    +** Processing line: ~                     bottom_margin + 35 + e.y * grid_size,~
     - Inside source: true
     *** True Line Result
    -      player: [0, 26],
    -** Processing line: ~      scenes: [~
    +                     bottom_margin + 35 + e.y * grid_size,
    +** Processing line: ~                     "r", # enemy's text~
     - Inside source: true
     *** True Line Result
    -      scenes: [
    -** Processing line: ~        [60, 0, 4, 20, :replied_to_introduction_mountain_pass]~
    +                     "r", # enemy's text
    +** Processing line: ~                     1, 1, *white, alpha]~
     - Inside source: true
     *** True Line Result
    -        [60, 0, 4, 20, :replied_to_introduction_mountain_pass]
    -** Processing line: ~      ],~
    +                     1, 1, *white, alpha]
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      ],
    -** Processing line: ~    }~
    +
    +** Processing line: ~        # Creates a red border around an enemy.~
     - Inside source: true
     *** True Line Result
    -    }
    -** Processing line: ~  end~
    +        # Creates a red border around an enemy.
    +** Processing line: ~        outputs.borders << [grid_x(e.x), grid_y(e.y), grid_size, grid_size, *red]~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +        outputs.borders << [grid_x(e.x), grid_y(e.y), grid_size, grid_size, *red]
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def replied_to_introduction_mountain_pass args~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  def replied_to_introduction_mountain_pass args
    -** Processing line: ~    {~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    {
    -** Processing line: ~      background: 'sprites/mountain-pass-zoomed-out.png',~
    +
    +** Processing line: ~    #White labels are output for the cell coordinates of each element in the dungeon collection.~
     - Inside source: true
     *** True Line Result
    -      background: 'sprites/mountain-pass-zoomed-out.png',
    -** Processing line: ~      player: [21, 48],~
    +    #White labels are output for the cell coordinates of each element in the dungeon collection.
    +** Processing line: ~    def print_cell_coordinates~
     - Inside source: true
     *** True Line Result
    -      player: [21, 48],
    -** Processing line: ~      scenes: [~
    +    def print_cell_coordinates
    +** Processing line: ~      return unless state.debug~
     - Inside source: true
     *** True Line Result
    -      scenes: [
    -** Processing line: ~        [0, 0, 15, 4, :replied_to_introduction_side_of_home]~
    +      return unless state.debug
    +** Processing line: ~      state.dungeon.each do |d|~
     - Inside source: true
     *** True Line Result
    -        [0, 0, 15, 4, :replied_to_introduction_side_of_home]
    -** Processing line: ~      ],~
    +      state.dungeon.each do |d|
    +** Processing line: ~        outputs.labels << [grid_x(d.x) + 2,~
     - Inside source: true
     *** True Line Result
    -      ],
    -** Processing line: ~      storylines: [~
    +        outputs.labels << [grid_x(d.x) + 2,
    +** Processing line: ~                           grid_y(d.y) - 2,~
     - Inside source: true
     *** True Line Result
    -      storylines: [
    -** Processing line: ~        [15, 28, 5, 3, "At least I'm-- getting-- my- exercise-- in- for- today--."]~
    +                           grid_y(d.y) - 2,
    +** Processing line: ~                           "#{d.x},#{d.y}",~
     - Inside source: true
     *** True Line Result
    -        [15, 28, 5, 3, "At least I'm-- getting-- my- exercise-- in- for- today--."]
    -** Processing line: ~      ]~
    +                           "#{d.x},#{d.y}",
    +** Processing line: ~                           -2, 0, *white]~
     - Inside source: true
     *** True Line Result
    -      ]
    -** Processing line: ~    }~
    +                           -2, 0, *white]
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    }
    -** Processing line: ~  end~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  end
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def replied_to_introduction_side_of_home args~
    +** Processing line: ~    # Adds new elements into the canvas collection and sets their values.~
     - Inside source: true
     *** True Line Result
    -  def replied_to_introduction_side_of_home args
    -** Processing line: ~    {~
    +    # Adds new elements into the canvas collection and sets their values.
    +** Processing line: ~    def calc_canvas~
     - Inside source: true
     *** True Line Result
    -    {
    -** Processing line: ~      background: 'sprites/side-of-home.png',~
    +    def calc_canvas
    +** Processing line: ~      return if state.canvas.length > 0 # return if canvas collection has at least one element~
     - Inside source: true
     *** True Line Result
    -      background: 'sprites/side-of-home.png',
    -** Processing line: ~      player: [58, 29],~
    +      return if state.canvas.length > 0 # return if canvas collection has at least one element
    +** Processing line: ~      15.times do |x| # 15 times perform an action~
     - Inside source: true
     *** True Line Result
    -      player: [58, 29],
    -** Processing line: ~      scenes: [~
    +      15.times do |x| # 15 times perform an action
    +** Processing line: ~        15.times do |y|~
     - Inside source: true
     *** True Line Result
    -      scenes: [
    -** Processing line: ~        [2, 0, 61, 2, :speed_of_light_front_of_home]~
    +        15.times do |y|
    +** Processing line: ~          state.canvas << state.new_entity(:canvas) do |c| # declare canvas element as new entity~
     - Inside source: true
     *** True Line Result
    -        [2, 0, 61, 2, :speed_of_light_front_of_home]
    -** Processing line: ~      ],~
    +          state.canvas << state.new_entity(:canvas) do |c| # declare canvas element as new entity
    +** Processing line: ~            c.x = x # set position~
     - Inside source: true
     *** True Line Result
    -      ],
    -** Processing line: ~    }~
    +            c.x = x # set position
    +** Processing line: ~            c.y = y~
     - Inside source: true
     *** True Line Result
    -    }
    -** Processing line: ~  end~
    +            c.y = y
    +** Processing line: ~            c.border = [left_margin   + x * grid_size,~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +            c.border = [left_margin   + x * grid_size,
    +** Processing line: ~                        bottom_margin + y * grid_size,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~#+end_src~
    -- Line was identified as the end of a code block.
    -*** True Line Result
    -#+end_src
    -** Processing line: ~~
    -- End of paragraph detected.
    -*** True Line Result
    -
    -** Processing line: ~*** Rpg Narrative - Return Of Serenity - storyline_speed_of_light.rb~
    -- Header detected.
    -*** True Line Result
    -
    +                        bottom_margin + y * grid_size,
    +** Processing line: ~                        grid_size,~
    +- Inside source: true
     *** True Line Result
    -*** Rpg Narrative - Return Of Serenity - storyline_speed_of_light.rb
    -** Processing line: ~#+begin_src ruby~
    -- Line was identified as the beginning of a code block.
    +                        grid_size,
    +** Processing line: ~                        grid_size,~
    +- Inside source: true
     *** True Line Result
    -
    +                        grid_size,
    +** Processing line: ~                        *white, 30] # sets border definition~
    +- Inside source: true
     *** True Line Result
    -#+begin_src ruby
    -** Processing line: ~  # ./samples/99_genre_rpg_narrative/return_of_serenity/app/storyline_speed_of_light.rb~
    +                        *white, 30] # sets border definition
    +** Processing line: ~          end~
     - Inside source: true
     *** True Line Result
    -  # ./samples/99_genre_rpg_narrative/return_of_serenity/app/storyline_speed_of_light.rb
    -** Processing line: ~  def speed_of_light_front_of_home args~
    +          end
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -  def speed_of_light_front_of_home args
    -** Processing line: ~    {~
    +        end
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    {
    -** Processing line: ~      background: 'sprites/front-of-home.png',~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      background: 'sprites/front-of-home.png',
    -** Processing line: ~      player: [54, 23],~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      player: [54, 23],
    -** Processing line: ~      scenes: [~
    +
    +** Processing line: ~    # Updates x and y values of the player, and updates player's line of sight~
     - Inside source: true
     *** True Line Result
    -      scenes: [
    -** Processing line: ~        [44, 34, 8, 14, :speed_of_light_inside_home],~
    +    # Updates x and y values of the player, and updates player's line of sight
    +** Processing line: ~    def input_move~
     - Inside source: true
     *** True Line Result
    -        [44, 34, 8, 14, :speed_of_light_inside_home],
    -** Processing line: ~        [0, 3, 3, 22, :speed_of_light_outside_library]~
    +    def input_move
    +** Processing line: ~      x, y, x_diff, y_diff = input_target_cell~
     - Inside source: true
     *** True Line Result
    -        [0, 3, 3, 22, :speed_of_light_outside_library]
    -** Processing line: ~      ]~
    +      x, y, x_diff, y_diff = input_target_cell
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      ]
    -** Processing line: ~    }~
    +
    +** Processing line: ~      return unless dungeon_cell_exists? x, y # player can't move there if a dungeon cell doesn't exist in that location~
     - Inside source: true
     *** True Line Result
    -    }
    -** Processing line: ~  end~
    +      return unless dungeon_cell_exists? x, y # player can't move there if a dungeon cell doesn't exist in that location
    +** Processing line: ~      return if enemy_at x, y # player can't move there if there is an enemy in that location~
     - Inside source: true
     *** True Line Result
    -  end
    +      return if enemy_at x, y # player can't move there if there is an enemy in that location
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def speed_of_light_inside_home args~
    +** Processing line: ~      state.x += x_diff # increments x by x_diff (so player moves left or right)~
     - Inside source: true
     *** True Line Result
    -  def speed_of_light_inside_home args
    -** Processing line: ~    {~
    +      state.x += x_diff # increments x by x_diff (so player moves left or right)
    +** Processing line: ~      state.y += y_diff # same with y and y_diff ( so player moves up or down)~
     - Inside source: true
     *** True Line Result
    -    {
    -** Processing line: ~      background: 'sprites/inside-home.png',~
    +      state.y += y_diff # same with y and y_diff ( so player moves up or down)
    +** Processing line: ~      update_line_of_sight # updates visible cells~
     - Inside source: true
     *** True Line Result
    -      background: 'sprites/inside-home.png',
    -** Processing line: ~      player: [35, 4],~
    +      update_line_of_sight # updates visible cells
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      player: [35, 4],
    -** Processing line: ~      storylines: [~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      storylines: [
    -** Processing line: ~        [30, 38, 12, 13, "Can't- sleep right now. I have to- find- out- why- it took- over-- 4- hours-- to receive-- that message."]~
    +
    +** Processing line: ~    def enemy_at x, y~
     - Inside source: true
     *** True Line Result
    -        [30, 38, 12, 13, "Can't- sleep right now. I have to- find- out- why- it took- over-- 4- hours-- to receive-- that message."]
    -** Processing line: ~      ],~
    +    def enemy_at x, y
    +** Processing line: ~      # Finds if coordinates exist in enemies collection and enemy is not dead~
     - Inside source: true
     *** True Line Result
    -      ],
    -** Processing line: ~      scenes: [~
    +      # Finds if coordinates exist in enemies collection and enemy is not dead
    +** Processing line: ~      state.enemies.find { |e| e.x == x && e.y == y && !e.is_dead }~
     - Inside source: true
     *** True Line Result
    -      scenes: [
    -** Processing line: ~        [32, 0, 8, 3, :speed_of_light_front_of_home],~
    +      state.enemies.find { |e| e.x == x && e.y == y && !e.is_dead }
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -        [32, 0, 8, 3, :speed_of_light_front_of_home],
    -** Processing line: ~      ]~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      ]
    -** Processing line: ~    }~
    +
    +** Processing line: ~    #M oves the user based on their keyboard input and sets values for target cell~
     - Inside source: true
     *** True Line Result
    -    }
    -** Processing line: ~  end~
    +    #M oves the user based on their keyboard input and sets values for target cell
    +** Processing line: ~    def input_target_cell~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +    def input_target_cell
    +** Processing line: ~      if inputs.keyboard.key_down.up # if "up" key is in "down" state~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def speed_of_light_outside_library args~
    +      if inputs.keyboard.key_down.up # if "up" key is in "down" state
    +** Processing line: ~        [state.x, state.y + 1,  0,  1] # user moves up~
     - Inside source: true
     *** True Line Result
    -  def speed_of_light_outside_library args
    -** Processing line: ~    {~
    +        [state.x, state.y + 1,  0,  1] # user moves up
    +** Processing line: ~      elsif inputs.keyboard.key_down.down # if "down" key is pressed~
     - Inside source: true
     *** True Line Result
    -    {
    -** Processing line: ~      background: 'sprites/outside-library.png',~
    +      elsif inputs.keyboard.key_down.down # if "down" key is pressed
    +** Processing line: ~        [state.x, state.y - 1,  0, -1] # user moves down~
     - Inside source: true
     *** True Line Result
    -      background: 'sprites/outside-library.png',
    -** Processing line: ~      player: [55, 19],~
    +        [state.x, state.y - 1,  0, -1] # user moves down
    +** Processing line: ~      elsif inputs.keyboard.key_down.left # if "left" key is pressed~
     - Inside source: true
     *** True Line Result
    -      player: [55, 19],
    -** Processing line: ~      scenes: [~
    +      elsif inputs.keyboard.key_down.left # if "left" key is pressed
    +** Processing line: ~        [state.x - 1, state.y, -1,  0] # user moves left~
     - Inside source: true
     *** True Line Result
    -      scenes: [
    -** Processing line: ~        [49, 39, 6, 10, :speed_of_light_library],~
    +        [state.x - 1, state.y, -1,  0] # user moves left
    +** Processing line: ~      elsif inputs.keyboard.key_down.right # if "right" key is pressed~
     - Inside source: true
     *** True Line Result
    -        [49, 39, 6, 10, :speed_of_light_library],
    -** Processing line: ~        [61, 11, 3, 20, :speed_of_light_front_of_home]~
    +      elsif inputs.keyboard.key_down.right # if "right" key is pressed
    +** Processing line: ~        [state.x + 1, state.y,  1,  0] # user moves right~
     - Inside source: true
     *** True Line Result
    -        [61, 11, 3, 20, :speed_of_light_front_of_home]
    -** Processing line: ~      ]~
    +        [state.x + 1, state.y,  1,  0] # user moves right
    +** Processing line: ~      else~
     - Inside source: true
     *** True Line Result
    -      ]
    -** Processing line: ~    }~
    +      else
    +** Processing line: ~        nil  # otherwise, empty~
     - Inside source: true
     *** True Line Result
    -    }
    -** Processing line: ~  end~
    +        nil  # otherwise, empty
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def speed_of_light_library args~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  def speed_of_light_library args
    -** Processing line: ~    {~
    +
    +** Processing line: ~    # Goes through the canvas collection to find if the mouse was clicked inside of the borders of an element.~
     - Inside source: true
     *** True Line Result
    -    {
    -** Processing line: ~      background: 'sprites/library.png',~
    +    # Goes through the canvas collection to find if the mouse was clicked inside of the borders of an element.
    +** Processing line: ~    def input_click_map~
     - Inside source: true
     *** True Line Result
    -      background: 'sprites/library.png',
    -** Processing line: ~      player: [30, 7],~
    +    def input_click_map
    +** Processing line: ~      return unless inputs.mouse.click # return unless the mouse is clicked~
     - Inside source: true
     *** True Line Result
    -      player: [30, 7],
    -** Processing line: ~      scenes: [~
    +      return unless inputs.mouse.click # return unless the mouse is clicked
    +** Processing line: ~      canvas_entry = state.canvas.find do |c| # find element from canvas collection that meets requirements~
     - Inside source: true
     *** True Line Result
    -      scenes: [
    -** Processing line: ~        [3, 50, 10, 3, :speed_of_light_celestial_bodies_diagram]~
    +      canvas_entry = state.canvas.find do |c| # find element from canvas collection that meets requirements
    +** Processing line: ~        inputs.mouse.click.inside_rect? c.border # find border that mouse was clicked inside of~
     - Inside source: true
     *** True Line Result
    -        [3, 50, 10, 3, :speed_of_light_celestial_bodies_diagram]
    -** Processing line: ~      ]~
    +        inputs.mouse.click.inside_rect? c.border # find border that mouse was clicked inside of
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -      ]
    -** Processing line: ~    }~
    +      end
    +** Processing line: ~      puts canvas_entry # prints canvas_entry value~
     - Inside source: true
     *** True Line Result
    -    }
    -** Processing line: ~  end~
    +      puts canvas_entry # prints canvas_entry value
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -  end
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def speed_of_light_celestial_bodies_diagram args~
    -- Inside source: true
    -*** True Line Result
    -  def speed_of_light_celestial_bodies_diagram args
    -** Processing line: ~    {~
    +** Processing line: ~    # Sets the definition of a label using the parameters.~
     - Inside source: true
     *** True Line Result
    -    {
    -** Processing line: ~      background: 'sprites/planets.png',~
    +    # Sets the definition of a label using the parameters.
    +** Processing line: ~    def label text, x, y, color = nil~
     - Inside source: true
     *** True Line Result
    -      background: 'sprites/planets.png',
    -** Processing line: ~      fade: 60,~
    +    def label text, x, y, color = nil
    +** Processing line: ~      color ||= white # color is initialized to white~
     - Inside source: true
     *** True Line Result
    -      fade: 60,
    -** Processing line: ~      player: [30, 3],~
    +      color ||= white # color is initialized to white
    +** Processing line: ~      [x, y, text, 1, 1, *color] # sets label definition~
     - Inside source: true
     *** True Line Result
    -      player: [30, 3],
    -** Processing line: ~      scenes: [~
    +      [x, y, text, 1, 1, *color] # sets label definition
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      scenes: [
    -** Processing line: ~        [56 - 2, 10, 5, 5, :speed_of_light_distance_discovered]~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        [56 - 2, 10, 5, 5, :speed_of_light_distance_discovered]
    -** Processing line: ~      ],~
    +
    +** Processing line: ~    def green~
     - Inside source: true
     *** True Line Result
    -      ],
    -** Processing line: ~      storylines: [~
    +    def green
    +** Processing line: ~      [60, 200, 100] # sets color saturation to shade of green~
     - Inside source: true
     *** True Line Result
    -      storylines: [
    -** Processing line: ~        [30, 2, 4, 4, "Here- it is! This is a diagram--- of the solar-- system--. It was printed-- over-- fifty-- years- ago. Geez-- that's-- old."],~
    +      [60, 200, 100] # sets color saturation to shade of green
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -        [30, 2, 4, 4, "Here- it is! This is a diagram--- of the solar-- system--. It was printed-- over-- fifty-- years- ago. Geez-- that's-- old."],
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~        [ 0 - 2, 10, 5, 5, "The label- reads: Sun. The length- of the Astronomical-------- Unit-- (AU), is the distance-- from the Sun- to the Earth. Which is about 150--- million--- kilometers----."],~
    +** Processing line: ~    def blue~
     - Inside source: true
     *** True Line Result
    -        [ 0 - 2, 10, 5, 5, "The label- reads: Sun. The length- of the Astronomical-------- Unit-- (AU), is the distance-- from the Sun- to the Earth. Which is about 150--- million--- kilometers----."],
    -** Processing line: ~        [ 7 - 2, 10, 5, 5, "The label- reads: Mercury. Distance from Sun: 0.39AU------------ or- 3----- light-- minutes--."],~
    +    def blue
    +** Processing line: ~      [50, 50, 210] # sets color saturation to shade of blue~
     - Inside source: true
     *** True Line Result
    -        [ 7 - 2, 10, 5, 5, "The label- reads: Mercury. Distance from Sun: 0.39AU------------ or- 3----- light-- minutes--."],
    -** Processing line: ~        [14 - 2, 10, 5, 5, "The label- reads: Venus. Distance from Sun: 0.72AU------------ or- 6----- light-- minutes--."],~
    +      [50, 50, 210] # sets color saturation to shade of blue
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -        [14 - 2, 10, 5, 5, "The label- reads: Venus. Distance from Sun: 0.72AU------------ or- 6----- light-- minutes--."],
    -** Processing line: ~        [21 - 2, 10, 5, 5, "The label- reads: Earth. Distance from Sun: 1.00AU------------ or- 8----- light-- minutes--."],~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        [21 - 2, 10, 5, 5, "The label- reads: Earth. Distance from Sun: 1.00AU------------ or- 8----- light-- minutes--."],
    -** Processing line: ~        [28 - 2, 10, 5, 5, "The label- reads: Mars. Distance from Sun: 1.52AU------------ or- 12----- light-- minutes--."],~
    +
    +** Processing line: ~    def white~
     - Inside source: true
     *** True Line Result
    -        [28 - 2, 10, 5, 5, "The label- reads: Mars. Distance from Sun: 1.52AU------------ or- 12----- light-- minutes--."],
    -** Processing line: ~        [35 - 2, 10, 5, 5, "The label- reads: Jupiter. Distance from Sun: 5.20AU------------ or- 45----- light-- minutes--."],~
    +    def white
    +** Processing line: ~      [255, 255, 255] # sets color saturation to white~
     - Inside source: true
     *** True Line Result
    -        [35 - 2, 10, 5, 5, "The label- reads: Jupiter. Distance from Sun: 5.20AU------------ or- 45----- light-- minutes--."],
    -** Processing line: ~        [42 - 2, 10, 5, 5, "The label- reads: Saturn. Distance from Sun: 9.53AU------------ or- 79----- light-- minutes--."],~
    +      [255, 255, 255] # sets color saturation to white
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -        [42 - 2, 10, 5, 5, "The label- reads: Saturn. Distance from Sun: 9.53AU------------ or- 79----- light-- minutes--."],
    -** Processing line: ~        [49 - 2, 10, 5, 5, "The label- reads: Uranus. Distance from Sun: 19.81AU------------ or- 159----- light-- minutes--."],~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        [49 - 2, 10, 5, 5, "The label- reads: Uranus. Distance from Sun: 19.81AU------------ or- 159----- light-- minutes--."],
    -** Processing line: ~        # [56 - 2, 15, 4, 4, "The label- reads: Neptune. Distance from Sun: 30.05AU------------ or- 4.1----- light-- hours--."],~
    +
    +** Processing line: ~    def red~
     - Inside source: true
     *** True Line Result
    -        # [56 - 2, 15, 4, 4, "The label- reads: Neptune. Distance from Sun: 30.05AU------------ or- 4.1----- light-- hours--."],
    -** Processing line: ~        [63 - 2, 10, 5, 5, "The label- reads: Pluto. Wait. WTF? Pluto-- isn't-- a planet."],~
    +    def red
    +** Processing line: ~      [230, 80, 80] # sets color saturation to shade of red~
     - Inside source: true
     *** True Line Result
    -        [63 - 2, 10, 5, 5, "The label- reads: Pluto. Wait. WTF? Pluto-- isn't-- a planet."],
    -** Processing line: ~      ]~
    +      [230, 80, 80] # sets color saturation to shade of red
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      ]
    -** Processing line: ~    }~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    }
    -** Processing line: ~  end~
    +
    +** Processing line: ~    def orange~
     - Inside source: true
     *** True Line Result
    -  end
    +    def orange
    +** Processing line: ~      [255, 80, 60] # sets color saturation to shade of orange~
    +- Inside source: true
    +*** True Line Result
    +      [255, 80, 60] # sets color saturation to shade of orange
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def speed_of_light_distance_discovered args~
    +** Processing line: ~    def pink~
     - Inside source: true
     *** True Line Result
    -  def speed_of_light_distance_discovered args
    -** Processing line: ~    {~
    +    def pink
    +** Processing line: ~      [255, 0, 200] # sets color saturation to shade of pink~
     - Inside source: true
     *** True Line Result
    -    {
    -** Processing line: ~      background: 'sprites/planets.png',~
    +      [255, 0, 200] # sets color saturation to shade of pink
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      background: 'sprites/planets.png',
    -** Processing line: ~      scenes: [~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      scenes: [
    -** Processing line: ~        [13, 0, 44, 3, :speed_of_light_end_of_day]~
    +
    +** Processing line: ~    def gray~
     - Inside source: true
     *** True Line Result
    -        [13, 0, 44, 3, :speed_of_light_end_of_day]
    -** Processing line: ~      ],~
    +    def gray
    +** Processing line: ~      [75, 75, 75] # sets color saturation to shade of gray~
     - Inside source: true
     *** True Line Result
    -      ],
    -** Processing line: ~      storylines: [~
    +      [75, 75, 75] # sets color saturation to shade of gray
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      storylines: [
    -** Processing line: ~        [ 0 - 2, 10, 5, 5, "The label- reads: Sun. The length- of the Astronomical-------- Unit-- (AU), is the distance-- from the Sun- to the Earth. Which is about 150--- million--- kilometers----."],~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        [ 0 - 2, 10, 5, 5, "The label- reads: Sun. The length- of the Astronomical-------- Unit-- (AU), is the distance-- from the Sun- to the Earth. Which is about 150--- million--- kilometers----."],
    -** Processing line: ~        [ 7 - 2, 10, 5, 5, "The label- reads: Mercury. Distance from Sun: 0.39AU------------ or- 3----- light-- minutes--."],~
    +
    +** Processing line: ~    # Recolors the border using the parameters.~
     - Inside source: true
     *** True Line Result
    -        [ 7 - 2, 10, 5, 5, "The label- reads: Mercury. Distance from Sun: 0.39AU------------ or- 3----- light-- minutes--."],
    -** Processing line: ~        [14 - 2, 10, 5, 5, "The label- reads: Venus. Distance from Sun: 0.72AU------------ or- 6----- light-- minutes--."],~
    +    # Recolors the border using the parameters.
    +** Processing line: ~    def recolor_border border, r, g, b~
     - Inside source: true
     *** True Line Result
    -        [14 - 2, 10, 5, 5, "The label- reads: Venus. Distance from Sun: 0.72AU------------ or- 6----- light-- minutes--."],
    -** Processing line: ~        [21 - 2, 10, 5, 5, "The label- reads: Earth. Distance from Sun: 1.00AU------------ or- 8----- light-- minutes--."],~
    +    def recolor_border border, r, g, b
    +** Processing line: ~      border[4] = r~
     - Inside source: true
     *** True Line Result
    -        [21 - 2, 10, 5, 5, "The label- reads: Earth. Distance from Sun: 1.00AU------------ or- 8----- light-- minutes--."],
    -** Processing line: ~        [28 - 2, 10, 5, 5, "The label- reads: Mars. Distance from Sun: 1.52AU------------ or- 12----- light-- minutes--."],~
    +      border[4] = r
    +** Processing line: ~      border[5] = g~
     - Inside source: true
     *** True Line Result
    -        [28 - 2, 10, 5, 5, "The label- reads: Mars. Distance from Sun: 1.52AU------------ or- 12----- light-- minutes--."],
    -** Processing line: ~        [35 - 2, 10, 5, 5, "The label- reads: Jupiter. Distance from Sun: 5.20AU------------ or- 45----- light-- minutes--."],~
    +      border[5] = g
    +** Processing line: ~      border[6] = b~
     - Inside source: true
     *** True Line Result
    -        [35 - 2, 10, 5, 5, "The label- reads: Jupiter. Distance from Sun: 5.20AU------------ or- 45----- light-- minutes--."],
    -** Processing line: ~        [42 - 2, 10, 5, 5, "The label- reads: Saturn. Distance from Sun: 9.53AU------------ or- 79----- light-- minutes--."],~
    +      border[6] = b
    +** Processing line: ~      border~
     - Inside source: true
     *** True Line Result
    -        [42 - 2, 10, 5, 5, "The label- reads: Saturn. Distance from Sun: 9.53AU------------ or- 79----- light-- minutes--."],
    -** Processing line: ~        [49 - 2, 10, 5, 5, "The label- reads: Uranus. Distance from Sun: 19.81AU------------ or- 159----- light-- minutes--."],~
    +      border
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -        [49 - 2, 10, 5, 5, "The label- reads: Uranus. Distance from Sun: 19.81AU------------ or- 159----- light-- minutes--."],
    -** Processing line: ~        [56 - 2, 10, 5, 5, "The label- reads: Neptune. Distance from Sun: 30.05AU------------ or- 4.1----- light-- hours--. What?! The message--- I received-- was from a source-- farther-- than-- Neptune?!"],~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        [56 - 2, 10, 5, 5, "The label- reads: Neptune. Distance from Sun: 30.05AU------------ or- 4.1----- light-- hours--. What?! The message--- I received-- was from a source-- farther-- than-- Neptune?!"],
    -** Processing line: ~        [63 - 2, 10, 5, 5, "The label- reads: Pluto. Dista- Wait... Pluto-- isn't-- a planet. People-- thought- Pluto-- was a planet-- back- then?--"],~
    +
    +** Processing line: ~    # Returns a boolean value.~
     - Inside source: true
     *** True Line Result
    -        [63 - 2, 10, 5, 5, "The label- reads: Pluto. Dista- Wait... Pluto-- isn't-- a planet. People-- thought- Pluto-- was a planet-- back- then?--"],
    -** Processing line: ~      ]~
    +    # Returns a boolean value.
    +** Processing line: ~    def visible? cell~
     - Inside source: true
     *** True Line Result
    -      ]
    -** Processing line: ~    }~
    +    def visible? cell
    +** Processing line: ~      # finds cell's coordinates inside visible_cells collections to determine if cell is visible~
     - Inside source: true
     *** True Line Result
    -    }
    -** Processing line: ~  end~
    +      # finds cell's coordinates inside visible_cells collections to determine if cell is visible
    +** Processing line: ~      state.visible_cells.find { |c| c.x == cell.x && c.y == cell.y}~
     - Inside source: true
     *** True Line Result
    -  end
    +      state.visible_cells.find { |c| c.x == cell.x && c.y == cell.y}
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def speed_of_light_end_of_day args~
    +** Processing line: ~    # Exports dungeon by printing dungeon cell coordinates~
     - Inside source: true
     *** True Line Result
    -  def speed_of_light_end_of_day args
    -** Processing line: ~    {~
    +    # Exports dungeon by printing dungeon cell coordinates
    +** Processing line: ~    def export_dungeon~
     - Inside source: true
     *** True Line Result
    -    {
    -** Processing line: ~      fade: 60,~
    +    def export_dungeon
    +** Processing line: ~      state.dungeon.each do |d| # on each element of dungeon collection~
     - Inside source: true
     *** True Line Result
    -      fade: 60,
    -** Processing line: ~      background: 'sprites/inside-home.png',~
    +      state.dungeon.each do |d| # on each element of dungeon collection
    +** Processing line: ~        puts "state.dungeon << [#{d.x}, #{d.y}]" # prints cell coordinates~
     - Inside source: true
     *** True Line Result
    -      background: 'sprites/inside-home.png',
    -** Processing line: ~      player: [35, 0],~
    +        puts "state.dungeon << [#{d.x}, #{d.y}]" # prints cell coordinates
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -      player: [35, 0],
    -** Processing line: ~      storylines: [~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      storylines: [
    -** Processing line: ~        [35, 10, 4, 4, "Wonder-- what the reply-- will be. Who- the hell is contacting--- me from beyond-- Neptune? This- has to be some- kind- of- joke."]~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        [35, 10, 4, 4, "Wonder-- what the reply-- will be. Who- the hell is contacting--- me from beyond-- Neptune? This- has to be some- kind- of- joke."]
    -** Processing line: ~      ],~
    +
    +** Processing line: ~    def distance_to_cell cell~
     - Inside source: true
     *** True Line Result
    -      ],
    -** Processing line: ~      scenes: [~
    +    def distance_to_cell cell
    +** Processing line: ~      distance_to state.x, cell.x, state.y, cell.y # calls distance_to method~
     - Inside source: true
     *** True Line Result
    -      scenes: [
    -** Processing line: ~        [31, 38, 10, 12, :serenity_alive_side_of_home]~
    +      distance_to state.x, cell.x, state.y, cell.y # calls distance_to method
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -        [31, 38, 10, 12, :serenity_alive_side_of_home]
    -** Processing line: ~      ]~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      ]
    -** Processing line: ~    }~
    +
    +** Processing line: ~    def distance_to from_x, x, from_y, y~
     - Inside source: true
     *** True Line Result
    -    }
    +    def distance_to from_x, x, from_y, y
    +** Processing line: ~      (from_x - x).abs + (from_y - y).abs # finds distance between two cells using coordinates~
    +- Inside source: true
    +*** True Line Result
    +      (from_x - x).abs + (from_y - y).abs # finds distance between two cells using coordinates
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -143139,62 +149219,46 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~#+end_src~
    -- Line was identified as the end of a code block.
    +** Processing line: ~  $game = Game.new~
    +- Inside source: true
     *** True Line Result
    -#+end_src
    +  $game = Game.new
     ** Processing line: ~~
    -- End of paragraph detected.
    -*** True Line Result
    -
    -** Processing line: ~*** Rpg Roguelike - Roguelike Starting Point - constants.rb~
    -- Header detected.
    -*** True Line Result
    -
    -*** True Line Result
    -*** Rpg Roguelike - Roguelike Starting Point - constants.rb
    -** Processing line: ~#+begin_src ruby~
    -- Line was identified as the beginning of a code block.
    -*** True Line Result
    -
    -*** True Line Result
    -#+begin_src ruby
    -** Processing line: ~  # ./samples/99_genre_rpg_roguelike/01_roguelike_starting_point/app/constants.rb~
     - Inside source: true
     *** True Line Result
    -  # ./samples/99_genre_rpg_roguelike/01_roguelike_starting_point/app/constants.rb
    -** Processing line: ~  SHOW_LEGEND = true~
    +
    +** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
    -  SHOW_LEGEND = true
    -** Processing line: ~  SOURCE_TILE_SIZE = 16~
    +  def tick args
    +** Processing line: ~    $game.args    = args~
     - Inside source: true
     *** True Line Result
    -  SOURCE_TILE_SIZE = 16
    -** Processing line: ~  DESTINATION_TILE_SIZE = 16~
    +    $game.args    = args
    +** Processing line: ~    $game.state   = args.state~
     - Inside source: true
     *** True Line Result
    -  DESTINATION_TILE_SIZE = 16
    -** Processing line: ~  TILE_SHEET_SIZE = 256~
    +    $game.state   = args.state
    +** Processing line: ~    $game.inputs  = args.inputs~
     - Inside source: true
     *** True Line Result
    -  TILE_SHEET_SIZE = 256
    -** Processing line: ~  TILE_R = 0~
    +    $game.inputs  = args.inputs
    +** Processing line: ~    $game.outputs = args.outputs~
     - Inside source: true
     *** True Line Result
    -  TILE_R = 0
    -** Processing line: ~  TILE_G = 0~
    +    $game.outputs = args.outputs
    +** Processing line: ~    $game.grid    = args.grid~
     - Inside source: true
     *** True Line Result
    -  TILE_G = 0
    -** Processing line: ~  TILE_B = 0~
    +    $game.grid    = args.grid
    +** Processing line: ~    $game.tick~
     - Inside source: true
     *** True Line Result
    -  TILE_B = 0
    -** Processing line: ~  TILE_A = 255~
    +    $game.tick
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -  TILE_A = 255
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
    @@ -143207,278 +149271,282 @@ Follows is a source code listing for all files that have been open sourced. This
     - End of paragraph detected.
     *** True Line Result
     
    -** Processing line: ~*** Rpg Roguelike - Roguelike Starting Point - legend.rb~
    +** Processing line: ~*** Rpg Tactical - Hexagonal Grid - main.rb~
     - Header detected.
     *** True Line Result
     
     *** True Line Result
    -*** Rpg Roguelike - Roguelike Starting Point - legend.rb
    +*** Rpg Tactical - Hexagonal Grid - main.rb
     ** Processing line: ~#+begin_src ruby~
     - Line was identified as the beginning of a code block.
     *** True Line Result
     
     *** True Line Result
     #+begin_src ruby
    -** Processing line: ~  # ./samples/99_genre_rpg_roguelike/01_roguelike_starting_point/app/legend.rb~
    +** Processing line: ~  # ./samples/99_genre_rpg_tactical/hexagonal_grid/app/main.rb~
     - Inside source: true
     *** True Line Result
    -  # ./samples/99_genre_rpg_roguelike/01_roguelike_starting_point/app/legend.rb
    -** Processing line: ~  def tick_legend args~
    +  # ./samples/99_genre_rpg_tactical/hexagonal_grid/app/main.rb
    +** Processing line: ~  class HexagonTileGame~
     - Inside source: true
     *** True Line Result
    -  def tick_legend args
    -** Processing line: ~    return unless SHOW_LEGEND~
    +  class HexagonTileGame
    +** Processing line: ~    attr_gtk~
     - Inside source: true
     *** True Line Result
    -    return unless SHOW_LEGEND
    +    attr_gtk
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    legend_padding = 16~
    +** Processing line: ~    def defaults~
     - Inside source: true
     *** True Line Result
    -    legend_padding = 16
    -** Processing line: ~    legend_x = 1280 - TILE_SHEET_SIZE - legend_padding~
    +    def defaults
    +** Processing line: ~      state.tile_scale      = 1.3~
     - Inside source: true
     *** True Line Result
    -    legend_x = 1280 - TILE_SHEET_SIZE - legend_padding
    -** Processing line: ~    legend_y =  720 - TILE_SHEET_SIZE - legend_padding~
    +      state.tile_scale      = 1.3
    +** Processing line: ~      state.tile_size       = 80~
     - Inside source: true
     *** True Line Result
    -    legend_y =  720 - TILE_SHEET_SIZE - legend_padding
    -** Processing line: ~    tile_sheet_sprite = [legend_x,~
    +      state.tile_size       = 80
    +** Processing line: ~      state.tile_w          = Math.sqrt(3) * state.tile_size.half~
     - Inside source: true
     *** True Line Result
    -    tile_sheet_sprite = [legend_x,
    -** Processing line: ~                         legend_y,~
    +      state.tile_w          = Math.sqrt(3) * state.tile_size.half
    +** Processing line: ~      state.tile_h          = state.tile_size * 3/4~
     - Inside source: true
     *** True Line Result
    -                         legend_y,
    -** Processing line: ~                         TILE_SHEET_SIZE,~
    +      state.tile_h          = state.tile_size * 3/4
    +** Processing line: ~      state.tiles_x_count   = 1280.idiv(state.tile_w) - 1~
     - Inside source: true
     *** True Line Result
    -                         TILE_SHEET_SIZE,
    -** Processing line: ~                         TILE_SHEET_SIZE,~
    +      state.tiles_x_count   = 1280.idiv(state.tile_w) - 1
    +** Processing line: ~      state.tiles_y_count   = 720.idiv(state.tile_h) - 1~
     - Inside source: true
     *** True Line Result
    -                         TILE_SHEET_SIZE,
    -** Processing line: ~                         'sprites/simple-mood-16x16.png', 0,~
    +      state.tiles_y_count   = 720.idiv(state.tile_h) - 1
    +** Processing line: ~      state.world_width_px  = state.tiles_x_count * state.tile_w~
     - Inside source: true
     *** True Line Result
    -                         'sprites/simple-mood-16x16.png', 0,
    -** Processing line: ~                         TILE_A,~
    +      state.world_width_px  = state.tiles_x_count * state.tile_w
    +** Processing line: ~      state.world_height_px = state.tiles_y_count * state.tile_h~
     - Inside source: true
     *** True Line Result
    -                         TILE_A,
    -** Processing line: ~                         TILE_R,~
    +      state.world_height_px = state.tiles_y_count * state.tile_h
    +** Processing line: ~      state.world_x_offset  = (1280 - state.world_width_px).half~
     - Inside source: true
     *** True Line Result
    -                         TILE_R,
    -** Processing line: ~                         TILE_G,~
    +      state.world_x_offset  = (1280 - state.world_width_px).half
    +** Processing line: ~      state.world_y_offset  = (720 - state.world_height_px).half~
     - Inside source: true
     *** True Line Result
    -                         TILE_G,
    -** Processing line: ~                         TILE_B]~
    +      state.world_y_offset  = (720 - state.world_height_px).half
    +** Processing line: ~      state.tiles         ||= state.tiles_x_count.map_with_ys(state.tiles_y_count) do |ordinal_x, ordinal_y|~
     - Inside source: true
     *** True Line Result
    -                         TILE_B]
    -** Processing line: ~~
    +      state.tiles         ||= state.tiles_x_count.map_with_ys(state.tiles_y_count) do |ordinal_x, ordinal_y|
    +** Processing line: ~        {~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    if args.inputs.mouse.point.inside_rect? tile_sheet_sprite~
    +        {
    +** Processing line: ~          ordinal_x: ordinal_x,~
     - Inside source: true
     *** True Line Result
    -    if args.inputs.mouse.point.inside_rect? tile_sheet_sprite
    -** Processing line: ~      mouse_row = args.inputs.mouse.point.y.idiv(SOURCE_TILE_SIZE)~
    +          ordinal_x: ordinal_x,
    +** Processing line: ~          ordinal_y: ordinal_y,~
     - Inside source: true
     *** True Line Result
    -      mouse_row = args.inputs.mouse.point.y.idiv(SOURCE_TILE_SIZE)
    -** Processing line: ~      tile_row = 15 - (mouse_row - legend_y.idiv(SOURCE_TILE_SIZE))~
    +          ordinal_y: ordinal_y,
    +** Processing line: ~          offset_x: (ordinal_y.even?) ?~
     - Inside source: true
     *** True Line Result
    -      tile_row = 15 - (mouse_row - legend_y.idiv(SOURCE_TILE_SIZE))
    -** Processing line: ~~
    +          offset_x: (ordinal_y.even?) ?
    +** Processing line: ~                    (state.world_x_offset + state.tile_w.half.half) :~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      mouse_col = args.inputs.mouse.point.x.idiv(SOURCE_TILE_SIZE)~
    +                    (state.world_x_offset + state.tile_w.half.half) :
    +** Processing line: ~                    (state.world_x_offset - state.tile_w.half.half),~
     - Inside source: true
     *** True Line Result
    -      mouse_col = args.inputs.mouse.point.x.idiv(SOURCE_TILE_SIZE)
    -** Processing line: ~      tile_col = (mouse_col - legend_x.idiv(SOURCE_TILE_SIZE))~
    +                    (state.world_x_offset - state.tile_w.half.half),
    +** Processing line: ~          offset_y: state.world_y_offset,~
     - Inside source: true
     *** True Line Result
    -      tile_col = (mouse_col - legend_x.idiv(SOURCE_TILE_SIZE))
    -** Processing line: ~~
    +          offset_y: state.world_y_offset,
    +** Processing line: ~          w: state.tile_w,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      args.outputs.primitives << [legend_x - legend_padding * 2,~
    +          w: state.tile_w,
    +** Processing line: ~          h: state.tile_h,~
     - Inside source: true
     *** True Line Result
    -      args.outputs.primitives << [legend_x - legend_padding * 2,
    -** Processing line: ~                                  mouse_row * SOURCE_TILE_SIZE, 256 + legend_padding * 2, 16, 128, 128, 128, 64].solid~
    +          h: state.tile_h,
    +** Processing line: ~          type: :blank,~
     - Inside source: true
     *** True Line Result
    -                                  mouse_row * SOURCE_TILE_SIZE, 256 + legend_padding * 2, 16, 128, 128, 128, 64].solid
    -** Processing line: ~~
    +          type: :blank,
    +** Processing line: ~          path: "sprites/hexagon-gray.png",~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      args.outputs.primitives << [mouse_col * SOURCE_TILE_SIZE,~
    +          path: "sprites/hexagon-gray.png",
    +** Processing line: ~          a: 20~
     - Inside source: true
     *** True Line Result
    -      args.outputs.primitives << [mouse_col * SOURCE_TILE_SIZE,
    -** Processing line: ~                                  legend_y - legend_padding * 2, 16, 256 + legend_padding * 2, 128, 128, 128, 64].solid~
    +          a: 20
    +** Processing line: ~        }.associate do |h|~
     - Inside source: true
     *** True Line Result
    -                                  legend_y - legend_padding * 2, 16, 256 + legend_padding * 2, 128, 128, 128, 64].solid
    -** Processing line: ~~
    +        }.associate do |h|
    +** Processing line: ~          h.merge(x: h[:offset_x] + h[:ordinal_x] * h[:w],~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      sprite_key = sprite_lookup.find { |k, v| v == [tile_row, tile_col] }~
    +          h.merge(x: h[:offset_x] + h[:ordinal_x] * h[:w],
    +** Processing line: ~                  y: h[:offset_y] + h[:ordinal_y] * h[:h]).scale_rect(state.tile_scale)~
     - Inside source: true
     *** True Line Result
    -      sprite_key = sprite_lookup.find { |k, v| v == [tile_row, tile_col] }
    -** Processing line: ~      if sprite_key~
    +                  y: h[:offset_y] + h[:ordinal_y] * h[:h]).scale_rect(state.tile_scale)
    +** Processing line: ~        end.associate do |h|~
     - Inside source: true
     *** True Line Result
    -      if sprite_key
    -** Processing line: ~        member_name, _ = sprite_key~
    +        end.associate do |h|
    +** Processing line: ~          h.merge(center: {~
     - Inside source: true
     *** True Line Result
    -        member_name, _ = sprite_key
    -** Processing line: ~        member_name = member_name_as_code member_name~
    +          h.merge(center: {
    +** Processing line: ~                    x: h[:x] + h[:w].half,~
     - Inside source: true
     *** True Line Result
    -        member_name = member_name_as_code member_name
    -** Processing line: ~        args.outputs.labels << [660, 70, "# CODE SAMPLE (place in the tick_game method located in main.rb)", -1, 0]~
    +                    x: h[:x] + h[:w].half,
    +** Processing line: ~                    y: h[:y] + h[:h].half~
     - Inside source: true
     *** True Line Result
    -        args.outputs.labels << [660, 70, "# CODE SAMPLE (place in the tick_game method located in main.rb)", -1, 0]
    -** Processing line: ~        args.outputs.labels << [660, 50, "#                                    GRID_X, GRID_Y, TILE_KEY", -1, 0]~
    +                    y: h[:y] + h[:h].half
    +** Processing line: ~                  }, radius: [h[:w].half, h[:h].half].max)~
     - Inside source: true
     *** True Line Result
    -        args.outputs.labels << [660, 50, "#                                    GRID_X, GRID_Y, TILE_KEY", -1, 0]
    -** Processing line: ~        args.outputs.labels << [660, 30, "args.outputs.sprites << tile_in_game(     5,      6, #{member_name}    )", -1, 0]~
    +                  }, radius: [h[:w].half, h[:h].half].max)
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -        args.outputs.labels << [660, 30, "args.outputs.sprites << tile_in_game(     5,      6, #{member_name}    )", -1, 0]
    -** Processing line: ~      else~
    +        end
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -      else
    -** Processing line: ~        args.outputs.labels << [660, 50, "Tile [#{tile_row}, #{tile_col}] not found. Add a key and value to app/sprite_lookup.rb:", -1, 0]~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -        args.outputs.labels << [660, 50, "Tile [#{tile_row}, #{tile_col}] not found. Add a key and value to app/sprite_lookup.rb:", -1, 0]
    -** Processing line: ~        args.outputs.labels << [660, 30, "{ \"some_string\" => [#{tile_row}, #{tile_col}] } OR { some_symbol: [#{tile_row}, #{tile_col}] }.", -1, 0]~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        args.outputs.labels << [660, 30, "{ \"some_string\" => [#{tile_row}, #{tile_col}] } OR { some_symbol: [#{tile_row}, #{tile_col}] }.", -1, 0]
    -** Processing line: ~      end~
    +
    +** Processing line: ~    def input~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +    def input
    +** Processing line: ~      if inputs.click~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    end~
    +      if inputs.click
    +** Processing line: ~        tile = state.tiles.find { |t| inputs.click.point_inside_circle? t[:center], t[:radius] }~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +        tile = state.tiles.find { |t| inputs.click.point_inside_circle? t[:center], t[:radius] }
    +** Processing line: ~        if tile~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # render the sprite in the top right with a padding to the top and right so it's~
    +        if tile
    +** Processing line: ~          tile[:a] = 255~
     - Inside source: true
     *** True Line Result
    -    # render the sprite in the top right with a padding to the top and right so it's
    -** Processing line: ~    # not flush against the edge~
    +          tile[:a] = 255
    +** Processing line: ~          tile[:path] = "sprites/hexagon-black.png"~
     - Inside source: true
     *** True Line Result
    -    # not flush against the edge
    -** Processing line: ~    args.outputs.sprites << tile_sheet_sprite~
    +          tile[:path] = "sprites/hexagon-black.png"
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -    args.outputs.sprites << tile_sheet_sprite
    +        end
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # carefully place some ascii arrows to show the legend labels~
    +** Processing line: ~    def tick~
     - Inside source: true
     *** True Line Result
    -    # carefully place some ascii arrows to show the legend labels
    -** Processing line: ~    args.outputs.labels  <<  [895, 707, "ROW --->"]~
    +    def tick
    +** Processing line: ~      defaults~
     - Inside source: true
     *** True Line Result
    -    args.outputs.labels  <<  [895, 707, "ROW --->"]
    -** Processing line: ~    args.outputs.labels  <<  [943, 412, "       ^"]~
    +      defaults
    +** Processing line: ~      input~
     - Inside source: true
     *** True Line Result
    -    args.outputs.labels  <<  [943, 412, "       ^"]
    -** Processing line: ~    args.outputs.labels  <<  [943, 412, "       |"]~
    +      input
    +** Processing line: ~      render~
     - Inside source: true
     *** True Line Result
    -    args.outputs.labels  <<  [943, 412, "       |"]
    -** Processing line: ~    args.outputs.labels  <<  [943, 394, "COL ---+"]~
    +      render
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -    args.outputs.labels  <<  [943, 394, "COL ---+"]
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # use the tile sheet to print out row and column numbers~
    -- Inside source: true
    -*** True Line Result
    -    # use the tile sheet to print out row and column numbers
    -** Processing line: ~    args.outputs.sprites << 16.map_with_index do |i|~
    +** Processing line: ~    def render~
     - Inside source: true
     *** True Line Result
    -    args.outputs.sprites << 16.map_with_index do |i|
    -** Processing line: ~      sprite_key = i % 10~
    +    def render
    +** Processing line: ~      outputs.sprites << state.tiles~
     - Inside source: true
     *** True Line Result
    -      sprite_key = i % 10
    -** Processing line: ~      [~
    +      outputs.sprites << state.tiles
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      [
    -** Processing line: ~        tile(1280 - TILE_SHEET_SIZE - legend_padding * 2 - SOURCE_TILE_SIZE,~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -        tile(1280 - TILE_SHEET_SIZE - legend_padding * 2 - SOURCE_TILE_SIZE,
    -** Processing line: ~              720 - legend_padding * 2 - (SOURCE_TILE_SIZE * i),~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -              720 - legend_padding * 2 - (SOURCE_TILE_SIZE * i),
    -** Processing line: ~              sprite(sprite_key)),~
    +
    +** Processing line: ~  $game = HexagonTileGame.new~
     - Inside source: true
     *** True Line Result
    -              sprite(sprite_key)),
    -** Processing line: ~        tile(1280 - TILE_SHEET_SIZE - SOURCE_TILE_SIZE + (SOURCE_TILE_SIZE * i),~
    +  $game = HexagonTileGame.new
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        tile(1280 - TILE_SHEET_SIZE - SOURCE_TILE_SIZE + (SOURCE_TILE_SIZE * i),
    -** Processing line: ~              720 - TILE_SHEET_SIZE - legend_padding * 3, sprite(sprite_key))~
    +
    +** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
    -              720 - TILE_SHEET_SIZE - legend_padding * 3, sprite(sprite_key))
    -** Processing line: ~      ]~
    +  def tick args
    +** Processing line: ~    $game.args = args~
     - Inside source: true
     *** True Line Result
    -      ]
    -** Processing line: ~    end~
    +    $game.args = args
    +** Processing line: ~    $game.tick~
     - Inside source: true
     *** True Line Result
    -    end
    +    $game.tick
     ** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    @@ -143487,6 +149555,14 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    +** Processing line: ~  $gtk.reset~
    +- Inside source: true
    +*** True Line Result
    +  $gtk.reset
    +** Processing line: ~~
    +- Inside source: true
    +*** True Line Result
    +
     ** Processing line: ~#+end_src~
     - Line was identified as the end of a code block.
     *** True Line Result
    @@ -143495,250 +149571,270 @@ Follows is a source code listing for all files that have been open sourced. This
     - End of paragraph detected.
     *** True Line Result
     
    -** Processing line: ~*** Rpg Roguelike - Roguelike Starting Point - main.rb~
    +** Processing line: ~*** Rpg Tactical - Isometric Grid - main.rb~
     - Header detected.
     *** True Line Result
     
     *** True Line Result
    -*** Rpg Roguelike - Roguelike Starting Point - main.rb
    +*** Rpg Tactical - Isometric Grid - main.rb
     ** Processing line: ~#+begin_src ruby~
     - Line was identified as the beginning of a code block.
     *** True Line Result
     
     *** True Line Result
     #+begin_src ruby
    -** Processing line: ~  # ./samples/99_genre_rpg_roguelike/01_roguelike_starting_point/app/main.rb~
    -- Inside source: true
    -*** True Line Result
    -  # ./samples/99_genre_rpg_roguelike/01_roguelike_starting_point/app/main.rb
    -** Processing line: ~  require 'app/constants.rb'~
    +** Processing line: ~  # ./samples/99_genre_rpg_tactical/isometric_grid/app/main.rb~
     - Inside source: true
     *** True Line Result
    -  require 'app/constants.rb'
    -** Processing line: ~  require 'app/sprite_lookup.rb'~
    +  # ./samples/99_genre_rpg_tactical/isometric_grid/app/main.rb
    +** Processing line: ~  class Isometric~
     - Inside source: true
     *** True Line Result
    -  require 'app/sprite_lookup.rb'
    -** Processing line: ~  require 'app/legend.rb'~
    +  class Isometric
    +** Processing line: ~      attr_accessor :grid, :inputs, :state, :outputs~
     - Inside source: true
     *** True Line Result
    -  require 'app/legend.rb'
    +      attr_accessor :grid, :inputs, :state, :outputs
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def tick args~
    +** Processing line: ~      def tick~
     - Inside source: true
     *** True Line Result
    -  def tick args
    -** Processing line: ~    tick_game args~
    +      def tick
    +** Processing line: ~          defaults~
     - Inside source: true
     *** True Line Result
    -    tick_game args
    -** Processing line: ~    tick_legend args~
    +          defaults
    +** Processing line: ~          render~
     - Inside source: true
     *** True Line Result
    -    tick_legend args
    -** Processing line: ~  end~
    +          render
    +** Processing line: ~          calc~
     - Inside source: true
     *** True Line Result
    -  end
    +          calc
    +** Processing line: ~          process_inputs~
    +- Inside source: true
    +*** True Line Result
    +          process_inputs
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def tick_game args~
    +** Processing line: ~      def defaults~
     - Inside source: true
     *** True Line Result
    -  def tick_game args
    -** Processing line: ~    # setup the grid~
    +      def defaults
    +** Processing line: ~          state.quantity              ||= 6                                                        #Size of grid~
     - Inside source: true
     *** True Line Result
    -    # setup the grid
    -** Processing line: ~    args.state.grid.padding = 104~
    +          state.quantity              ||= 6                                                        #Size of grid
    +** Processing line: ~          state.tileSize              ||= [262 / 2, 194 / 2]                                       #width and heigth of orange tiles~
    +- Inside source: true
    +*** True Line Result
    +          state.tileSize              ||= [262 / 2, 194 / 2]                                       #width and heigth of orange tiles
    +** Processing line: ~          state.tileGrid              ||= []                                                       #Holds ordering of tiles~
    +- Inside source: true
    +*** True Line Result
    +          state.tileGrid              ||= []                                                       #Holds ordering of tiles
    +** Processing line: ~          state.currentSpriteLocation ||= -1                                                       #Current Sprite hovering location~
    +- Inside source: true
    +*** True Line Result
    +          state.currentSpriteLocation ||= -1                                                       #Current Sprite hovering location
    +** Processing line: ~          state.tileCords             ||= []                                                       #Physical, rendering cordinates~
    +- Inside source: true
    +*** True Line Result
    +          state.tileCords             ||= []                                                       #Physical, rendering cordinates
    +** Processing line: ~          state.initCords             ||= [640 - (state.quantity / 2 * state.tileSize[0]), 330]    #Location of tile (0, 0)~
     - Inside source: true
     *** True Line Result
    -    args.state.grid.padding = 104
    -** Processing line: ~    args.state.grid.size = 512~
    +          state.initCords             ||= [640 - (state.quantity / 2 * state.tileSize[0]), 330]    #Location of tile (0, 0)
    +** Processing line: ~          state.sideSize              ||= [state.tileSize[0] / 2, 242 / 2]                         #Purple & green cube face size~
     - Inside source: true
     *** True Line Result
    -    args.state.grid.size = 512
    -** Processing line: ~~
    +          state.sideSize              ||= [state.tileSize[0] / 2, 242 / 2]                         #Purple & green cube face size
    +** Processing line: ~          state.mode                  ||= :delete                                                  #Switches between :delete and :insert~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # set up your game~
    +          state.mode                  ||= :delete                                                  #Switches between :delete and :insert
    +** Processing line: ~          state.spriteSelection       ||= [['river',    0, 0, 262 / 2, 194 / 2],~
     - Inside source: true
     *** True Line Result
    -    # set up your game
    -** Processing line: ~    # initialize the game/game defaults. ||= means that you only initialize it if~
    +          state.spriteSelection       ||= [['river',    0, 0, 262 / 2, 194 / 2],
    +** Processing line: ~                                           ['mountain', 0, 0, 262 / 2, 245 / 2],~
     - Inside source: true
     *** True Line Result
    -    # initialize the game/game defaults. ||= means that you only initialize it if
    -** Processing line: ~    # the value isn't alread initialized~
    +                                           ['mountain', 0, 0, 262 / 2, 245 / 2],
    +** Processing line: ~                                           ['ocean',    0, 0, 262 / 2, 194 / 2]]             #Storage for sprite information~
     - Inside source: true
     *** True Line Result
    -    # the value isn't alread initialized
    -** Processing line: ~    args.state.player.x ||= 0~
    +                                           ['ocean',    0, 0, 262 / 2, 194 / 2]]             #Storage for sprite information
    +** Processing line: ~                                                                                             #['name', deltaX, deltaY, sizeW, sizeH]~
     - Inside source: true
     *** True Line Result
    -    args.state.player.x ||= 0
    -** Processing line: ~    args.state.player.y ||= 0~
    +                                                                                             #['name', deltaX, deltaY, sizeW, sizeH]
    +** Processing line: ~                                                                                             #^delta refers to distance from tile cords~
     - Inside source: true
     *** True Line Result
    -    args.state.player.y ||= 0
    +                                                                                             #^delta refers to distance from tile cords
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    args.state.enemies ||= [~
    +** Processing line: ~          #Orders tiles based on tile placement and fancy math. Very left: 0,0. Very bottom: quantity-1, 0, etc~
     - Inside source: true
     *** True Line Result
    -    args.state.enemies ||= [
    -** Processing line: ~      { x: 10, y: 10, type: :goblin, tile_key: :G },~
    +          #Orders tiles based on tile placement and fancy math. Very left: 0,0. Very bottom: quantity-1, 0, etc
    +** Processing line: ~          if state.tileGrid == []~
     - Inside source: true
     *** True Line Result
    -      { x: 10, y: 10, type: :goblin, tile_key: :G },
    -** Processing line: ~      { x: 15, y: 30, type: :rat,    tile_key: :R }~
    +          if state.tileGrid == []
    +** Processing line: ~              tempX = 0~
     - Inside source: true
     *** True Line Result
    -      { x: 15, y: 30, type: :rat,    tile_key: :R }
    -** Processing line: ~    ]~
    +              tempX = 0
    +** Processing line: ~              tempY = 0~
     - Inside source: true
     *** True Line Result
    -    ]
    -** Processing line: ~~
    +              tempY = 0
    +** Processing line: ~              tempLeft = false~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    args.state.info_message ||= "Use arrow keys to move around."~
    +              tempLeft = false
    +** Processing line: ~              tempRight = false~
     - Inside source: true
     *** True Line Result
    -    args.state.info_message ||= "Use arrow keys to move around."
    -** Processing line: ~~
    +              tempRight = false
    +** Processing line: ~              count = 0~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # handle keyboard input~
    +              count = 0
    +** Processing line: ~              (state.quantity * state.quantity).times do~
     - Inside source: true
     *** True Line Result
    -    # handle keyboard input
    -** Processing line: ~    # keyboard input (arrow keys to move player)~
    +              (state.quantity * state.quantity).times do
    +** Processing line: ~                  if tempY == 0~
     - Inside source: true
     *** True Line Result
    -    # keyboard input (arrow keys to move player)
    -** Processing line: ~    new_player_x = args.state.player.x~
    +                  if tempY == 0
    +** Processing line: ~                      tempLeft = true~
     - Inside source: true
     *** True Line Result
    -    new_player_x = args.state.player.x
    -** Processing line: ~    new_player_y = args.state.player.y~
    +                      tempLeft = true
    +** Processing line: ~                  end~
     - Inside source: true
     *** True Line Result
    -    new_player_y = args.state.player.y
    -** Processing line: ~    player_direction = ""~
    +                  end
    +** Processing line: ~                  if tempX == (state.quantity - 1)~
     - Inside source: true
     *** True Line Result
    -    player_direction = ""
    -** Processing line: ~    player_moved = false~
    +                  if tempX == (state.quantity - 1)
    +** Processing line: ~                      tempRight = true~
     - Inside source: true
     *** True Line Result
    -    player_moved = false
    -** Processing line: ~    if args.inputs.keyboard.key_down.up~
    +                      tempRight = true
    +** Processing line: ~                  end~
     - Inside source: true
     *** True Line Result
    -    if args.inputs.keyboard.key_down.up
    -** Processing line: ~      new_player_y += 1~
    +                  end
    +** Processing line: ~                  state.tileGrid.push([tempX, tempY, true, tempLeft, tempRight, count])~
     - Inside source: true
     *** True Line Result
    -      new_player_y += 1
    -** Processing line: ~      player_direction = "north"~
    +                  state.tileGrid.push([tempX, tempY, true, tempLeft, tempRight, count])
    +** Processing line: ~                      #orderX, orderY, exists?, leftSide, rightSide, order~
     - Inside source: true
     *** True Line Result
    -      player_direction = "north"
    -** Processing line: ~      player_moved = true~
    +                      #orderX, orderY, exists?, leftSide, rightSide, order
    +** Processing line: ~                  tempX += 1~
     - Inside source: true
     *** True Line Result
    -      player_moved = true
    -** Processing line: ~    elsif args.inputs.keyboard.key_down.down~
    +                  tempX += 1
    +** Processing line: ~                  if tempX == state.quantity~
     - Inside source: true
     *** True Line Result
    -    elsif args.inputs.keyboard.key_down.down
    -** Processing line: ~      new_player_y -= 1~
    +                  if tempX == state.quantity
    +** Processing line: ~                      tempX = 0~
     - Inside source: true
     *** True Line Result
    -      new_player_y -= 1
    -** Processing line: ~      player_direction = "south"~
    +                      tempX = 0
    +** Processing line: ~                      tempY += 1~
     - Inside source: true
     *** True Line Result
    -      player_direction = "south"
    -** Processing line: ~      player_moved = true~
    +                      tempY += 1
    +** Processing line: ~                  end~
     - Inside source: true
     *** True Line Result
    -      player_moved = true
    -** Processing line: ~    elsif args.inputs.keyboard.key_down.right~
    +                  end
    +** Processing line: ~                  tempLeft = false~
     - Inside source: true
     *** True Line Result
    -    elsif args.inputs.keyboard.key_down.right
    -** Processing line: ~      new_player_x += 1~
    +                  tempLeft = false
    +** Processing line: ~                  tempRight = false~
     - Inside source: true
     *** True Line Result
    -      new_player_x += 1
    -** Processing line: ~      player_direction = "east"~
    +                  tempRight = false
    +** Processing line: ~                  count += 1~
     - Inside source: true
     *** True Line Result
    -      player_direction = "east"
    -** Processing line: ~      player_moved = true~
    +                  count += 1
    +** Processing line: ~              end~
     - Inside source: true
     *** True Line Result
    -      player_moved = true
    -** Processing line: ~    elsif args.inputs.keyboard.key_down.left~
    +              end
    +** Processing line: ~          end~
     - Inside source: true
     *** True Line Result
    -    elsif args.inputs.keyboard.key_down.left
    -** Processing line: ~      new_player_x -= 1~
    +          end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      new_player_x -= 1
    -** Processing line: ~      player_direction = "west"~
    +
    +** Processing line: ~          #Calculates physical cordinates for tiles~
     - Inside source: true
     *** True Line Result
    -      player_direction = "west"
    -** Processing line: ~      player_moved = true~
    +          #Calculates physical cordinates for tiles
    +** Processing line: ~          if state.tileCords == []~
     - Inside source: true
     *** True Line Result
    -      player_moved = true
    -** Processing line: ~    end~
    +          if state.tileCords == []
    +** Processing line: ~              state.tileCords = state.tileGrid.map do~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +              state.tileCords = state.tileGrid.map do
    +** Processing line: ~                  |val|~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    #handle game logic~
    +                  |val|
    +** Processing line: ~                  x = (state.initCords[0]) + ((val[0] + val[1]) * state.tileSize[0] / 2)~
     - Inside source: true
     *** True Line Result
    -    #handle game logic
    -** Processing line: ~    # determine if there is an enemy on that square,~
    +                  x = (state.initCords[0]) + ((val[0] + val[1]) * state.tileSize[0] / 2)
    +** Processing line: ~                  y = (state.initCords[1]) + (-1 * val[0] * state.tileSize[1] / 2) + (val[1] * state.tileSize[1] / 2)~
     - Inside source: true
     *** True Line Result
    -    # determine if there is an enemy on that square,
    -** Processing line: ~    # if so, don't let the player move there~
    +                  y = (state.initCords[1]) + (-1 * val[0] * state.tileSize[1] / 2) + (val[1] * state.tileSize[1] / 2)
    +** Processing line: ~                  [x, y, val[2], val[3], val[4], val[5], -1] #-1 represents sprite on top of tile. -1 for now~
     - Inside source: true
     *** True Line Result
    -    # if so, don't let the player move there
    -** Processing line: ~    if player_moved~
    +                  [x, y, val[2], val[3], val[4], val[5], -1] #-1 represents sprite on top of tile. -1 for now
    +** Processing line: ~              end~
     - Inside source: true
     *** True Line Result
    -    if player_moved
    -** Processing line: ~      found_enemy = args.state.enemies.find do |e|~
    +              end
    +** Processing line: ~          end~
     - Inside source: true
     *** True Line Result
    -      found_enemy = args.state.enemies.find do |e|
    -** Processing line: ~        e[:x] == new_player_x && e[:y] == new_player_y~
    +          end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        e[:x] == new_player_x && e[:y] == new_player_y
    +
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    @@ -143747,994 +149843,1062 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      if !found_enemy~
    +** Processing line: ~      def render~
     - Inside source: true
     *** True Line Result
    -      if !found_enemy
    -** Processing line: ~        args.state.player.x = new_player_x~
    +      def render
    +** Processing line: ~          renderBackground~
     - Inside source: true
     *** True Line Result
    -        args.state.player.x = new_player_x
    -** Processing line: ~        args.state.player.y = new_player_y~
    +          renderBackground
    +** Processing line: ~          renderLeft~
     - Inside source: true
     *** True Line Result
    -        args.state.player.y = new_player_y
    -** Processing line: ~        args.state.info_message = "You moved #{player_direction}."~
    +          renderLeft
    +** Processing line: ~          renderRight~
     - Inside source: true
     *** True Line Result
    -        args.state.info_message = "You moved #{player_direction}."
    -** Processing line: ~      else~
    +          renderRight
    +** Processing line: ~          renderTiles~
     - Inside source: true
     *** True Line Result
    -      else
    -** Processing line: ~        args.state.info_message = "You cannot move into a square an enemy occupies."~
    +          renderTiles
    +** Processing line: ~          renderObjects~
     - Inside source: true
     *** True Line Result
    -        args.state.info_message = "You cannot move into a square an enemy occupies."
    -** Processing line: ~      end~
    +          renderObjects
    +** Processing line: ~          renderLabels~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +          renderLabels
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    end
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    args.outputs.sprites << tile_in_game(args.state.player.x,~
    +** Processing line: ~      def renderBackground~
     - Inside source: true
     *** True Line Result
    -    args.outputs.sprites << tile_in_game(args.state.player.x,
    -** Processing line: ~                                         args.state.player.y, '@')~
    +      def renderBackground
    +** Processing line: ~          outputs.solids << [0, 0, 1280, 720, 0, 0, 0]   #Background color~
     - Inside source: true
     *** True Line Result
    -                                         args.state.player.y, '@')
    +          outputs.solids << [0, 0, 1280, 720, 0, 0, 0]   #Background color
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # render game~
    +** Processing line: ~      def renderLeft~
     - Inside source: true
     *** True Line Result
    -    # render game
    -** Processing line: ~    # render enemies at locations~
    +      def renderLeft
    +** Processing line: ~          #Shows the pink left cube face~
     - Inside source: true
     *** True Line Result
    -    # render enemies at locations
    -** Processing line: ~    args.outputs.sprites << args.state.enemies.map do |e|~
    +          #Shows the pink left cube face
    +** Processing line: ~          outputs.sprites << state.tileCords.map do~
     - Inside source: true
     *** True Line Result
    -    args.outputs.sprites << args.state.enemies.map do |e|
    -** Processing line: ~      tile_in_game(e[:x], e[:y], e[:tile_key])~
    +          outputs.sprites << state.tileCords.map do
    +** Processing line: ~              |val|~
     - Inside source: true
     *** True Line Result
    -      tile_in_game(e[:x], e[:y], e[:tile_key])
    -** Processing line: ~    end~
    +              |val|
    +** Processing line: ~              if val[2] == true && val[3] == true       #Checks if the tile exists and right face needs to be rendered~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +              if val[2] == true && val[3] == true       #Checks if the tile exists and right face needs to be rendered
    +** Processing line: ~                  [val[0], val[1] + (state.tileSize[1] / 2) - state.sideSize[1], state.sideSize[0],~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # render the border~
    +                  [val[0], val[1] + (state.tileSize[1] / 2) - state.sideSize[1], state.sideSize[0],
    +** Processing line: ~                  state.sideSize[1], 'sprites/leftSide.png']~
     - Inside source: true
     *** True Line Result
    -    # render the border
    -** Processing line: ~    border_x = args.state.grid.padding - DESTINATION_TILE_SIZE~
    +                  state.sideSize[1], 'sprites/leftSide.png']
    +** Processing line: ~              end~
     - Inside source: true
     *** True Line Result
    -    border_x = args.state.grid.padding - DESTINATION_TILE_SIZE
    -** Processing line: ~    border_y = args.state.grid.padding - DESTINATION_TILE_SIZE~
    +              end
    +** Processing line: ~          end~
     - Inside source: true
     *** True Line Result
    -    border_y = args.state.grid.padding - DESTINATION_TILE_SIZE
    -** Processing line: ~    border_size = args.state.grid.size + DESTINATION_TILE_SIZE * 2~
    +          end
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    border_size = args.state.grid.size + DESTINATION_TILE_SIZE * 2
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    args.outputs.borders << [border_x,~
    +** Processing line: ~      def renderRight~
     - Inside source: true
     *** True Line Result
    -    args.outputs.borders << [border_x,
    -** Processing line: ~                             border_y,~
    +      def renderRight
    +** Processing line: ~          #Shows the green right cube face~
     - Inside source: true
     *** True Line Result
    -                             border_y,
    -** Processing line: ~                             border_size,~
    +          #Shows the green right cube face
    +** Processing line: ~          outputs.sprites << state.tileCords.map do~
     - Inside source: true
     *** True Line Result
    -                             border_size,
    -** Processing line: ~                             border_size]~
    +          outputs.sprites << state.tileCords.map do
    +** Processing line: ~              |val|~
     - Inside source: true
     *** True Line Result
    -                             border_size]
    -** Processing line: ~~
    +              |val|
    +** Processing line: ~              if val[2] == true && val[4] == true        #Checks if it exists & checks if right face needs to be rendered~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # render label stuff~
    +              if val[2] == true && val[4] == true        #Checks if it exists & checks if right face needs to be rendered
    +** Processing line: ~                  [val[0] + state.tileSize[0] / 2, val[1] + (state.tileSize[1] / 2) - state.sideSize[1], state.sideSize[0],~
     - Inside source: true
     *** True Line Result
    -    # render label stuff
    -** Processing line: ~    args.outputs.labels << [border_x, border_y - 10, "Current player location is: #{args.state.player.x}, #{args.state.player.y}"]~
    +                  [val[0] + state.tileSize[0] / 2, val[1] + (state.tileSize[1] / 2) - state.sideSize[1], state.sideSize[0],
    +** Processing line: ~                  state.sideSize[1], 'sprites/rightSide.png']~
     - Inside source: true
     *** True Line Result
    -    args.outputs.labels << [border_x, border_y - 10, "Current player location is: #{args.state.player.x}, #{args.state.player.y}"]
    -** Processing line: ~    args.outputs.labels << [border_x, border_y + 25 + border_size, args.state.info_message]~
    +                  state.sideSize[1], 'sprites/rightSide.png']
    +** Processing line: ~              end~
     - Inside source: true
     *** True Line Result
    -    args.outputs.labels << [border_x, border_y + 25 + border_size, args.state.info_message]
    -** Processing line: ~  end~
    +              end
    +** Processing line: ~          end~
     - Inside source: true
     *** True Line Result
    -  end
    +          end
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def tile_in_game x, y, tile_key~
    +** Processing line: ~      def renderTiles~
     - Inside source: true
     *** True Line Result
    -  def tile_in_game x, y, tile_key
    -** Processing line: ~    tile($gtk.args.state.grid.padding + x * DESTINATION_TILE_SIZE,~
    +      def renderTiles
    +** Processing line: ~          #Shows the tile itself. Important that it's rendered after the two above!~
     - Inside source: true
     *** True Line Result
    -    tile($gtk.args.state.grid.padding + x * DESTINATION_TILE_SIZE,
    -** Processing line: ~         $gtk.args.state.grid.padding + y * DESTINATION_TILE_SIZE,~
    +          #Shows the tile itself. Important that it's rendered after the two above!
    +** Processing line: ~          outputs.sprites << state.tileCords.map do~
     - Inside source: true
     *** True Line Result
    -         $gtk.args.state.grid.padding + y * DESTINATION_TILE_SIZE,
    -** Processing line: ~         tile_key)~
    +          outputs.sprites << state.tileCords.map do
    +** Processing line: ~              |val|~
     - Inside source: true
     *** True Line Result
    -         tile_key)
    -** Processing line: ~  end~
    +              |val|
    +** Processing line: ~              if val[2] == true     #Chcekcs if tile needs to be rendered~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +              if val[2] == true     #Chcekcs if tile needs to be rendered
    +** Processing line: ~                if val[5] == state.currentSpriteLocation~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~#+end_src~
    -- Line was identified as the end of a code block.
    -*** True Line Result
    -#+end_src
    -** Processing line: ~~
    -- End of paragraph detected.
    +                if val[5] == state.currentSpriteLocation
    +** Processing line: ~                  [val[0], val[1], state.tileSize[0], state.tileSize[1], 'sprites/selectedTile.png']~
    +- Inside source: true
     *** True Line Result
    -
    -** Processing line: ~*** Rpg Roguelike - Roguelike Starting Point - sprite_lookup.rb~
    -- Header detected.
    +                  [val[0], val[1], state.tileSize[0], state.tileSize[1], 'sprites/selectedTile.png']
    +** Processing line: ~                else~
    +- Inside source: true
     *** True Line Result
    -
    +                else
    +** Processing line: ~                  [val[0], val[1], state.tileSize[0], state.tileSize[1], 'sprites/tile.png']~
    +- Inside source: true
     *** True Line Result
    -*** Rpg Roguelike - Roguelike Starting Point - sprite_lookup.rb
    -** Processing line: ~#+begin_src ruby~
    -- Line was identified as the beginning of a code block.
    +                  [val[0], val[1], state.tileSize[0], state.tileSize[1], 'sprites/tile.png']
    +** Processing line: ~                end~
    +- Inside source: true
     *** True Line Result
    -
    +                end
    +** Processing line: ~              end~
    +- Inside source: true
     *** True Line Result
    -#+begin_src ruby
    -** Processing line: ~  # ./samples/99_genre_rpg_roguelike/01_roguelike_starting_point/app/sprite_lookup.rb~
    +              end
    +** Processing line: ~          end~
     - Inside source: true
     *** True Line Result
    -  # ./samples/99_genre_rpg_roguelike/01_roguelike_starting_point/app/sprite_lookup.rb
    -** Processing line: ~  def sprite_lookup~
    +          end
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -  def sprite_lookup
    -** Processing line: ~    {~
    +      end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    {
    -** Processing line: ~      0 => [3, 0],~
    +
    +** Processing line: ~      def renderObjects~
     - Inside source: true
     *** True Line Result
    -      0 => [3, 0],
    -** Processing line: ~      1 => [3, 1],~
    +      def renderObjects
    +** Processing line: ~          #Renders the sprites on top of the tiles. Order of rendering: top corner to right corner and cascade down until left corner~
     - Inside source: true
     *** True Line Result
    -      1 => [3, 1],
    -** Processing line: ~      2 => [3, 2],~
    +          #Renders the sprites on top of the tiles. Order of rendering: top corner to right corner and cascade down until left corner
    +** Processing line: ~          #to bottom corner.~
     - Inside source: true
     *** True Line Result
    -      2 => [3, 2],
    -** Processing line: ~      3 => [3, 3],~
    +          #to bottom corner.
    +** Processing line: ~          a = (state.quantity * state.quantity) - state.quantity~
     - Inside source: true
     *** True Line Result
    -      3 => [3, 3],
    -** Processing line: ~      4 => [3, 4],~
    +          a = (state.quantity * state.quantity) - state.quantity
    +** Processing line: ~          iter = 0~
     - Inside source: true
     *** True Line Result
    -      4 => [3, 4],
    -** Processing line: ~      5 => [3, 5],~
    +          iter = 0
    +** Processing line: ~          loop do~
     - Inside source: true
     *** True Line Result
    -      5 => [3, 5],
    -** Processing line: ~      6 => [3, 6],~
    +          loop do
    +** Processing line: ~              if state.tileCords[a][2] == true && state.tileCords[a][6] != -1~
     - Inside source: true
     *** True Line Result
    -      6 => [3, 6],
    -** Processing line: ~      7 => [3, 7],~
    +              if state.tileCords[a][2] == true && state.tileCords[a][6] != -1
    +** Processing line: ~                  outputs.sprites << [state.tileCords[a][0] + state.spriteSelection[state.tileCords[a][6]][1],~
     - Inside source: true
     *** True Line Result
    -      7 => [3, 7],
    -** Processing line: ~      8 => [3, 8],~
    +                  outputs.sprites << [state.tileCords[a][0] + state.spriteSelection[state.tileCords[a][6]][1],
    +** Processing line: ~                                      state.tileCords[a][1] + state.spriteSelection[state.tileCords[a][6]][2],~
     - Inside source: true
     *** True Line Result
    -      8 => [3, 8],
    -** Processing line: ~      9 => [3, 9],~
    +                                      state.tileCords[a][1] + state.spriteSelection[state.tileCords[a][6]][2],
    +** Processing line: ~                                      state.spriteSelection[state.tileCords[a][6]][3], state.spriteSelection[state.tileCords[a][6]][4],~
     - Inside source: true
     *** True Line Result
    -      9 => [3, 9],
    -** Processing line: ~      '@' => [4, 0],~
    +                                      state.spriteSelection[state.tileCords[a][6]][3], state.spriteSelection[state.tileCords[a][6]][4],
    +** Processing line: ~                                      'sprites/' + state.spriteSelection[state.tileCords[a][6]][0] + '.png']~
     - Inside source: true
     *** True Line Result
    -      '@' => [4, 0],
    -** Processing line: ~      A: [ 4,  1],~
    +                                      'sprites/' + state.spriteSelection[state.tileCords[a][6]][0] + '.png']
    +** Processing line: ~              end~
     - Inside source: true
     *** True Line Result
    -      A: [ 4,  1],
    -** Processing line: ~      B: [ 4,  2],~
    +              end
    +** Processing line: ~              iter += 1~
     - Inside source: true
     *** True Line Result
    -      B: [ 4,  2],
    -** Processing line: ~      C: [ 4,  3],~
    +              iter += 1
    +** Processing line: ~              a    += 1~
     - Inside source: true
     *** True Line Result
    -      C: [ 4,  3],
    -** Processing line: ~      D: [ 4,  4],~
    +              a    += 1
    +** Processing line: ~              a -= state.quantity * 2 if iter == state.quantity~
     - Inside source: true
     *** True Line Result
    -      D: [ 4,  4],
    -** Processing line: ~      E: [ 4,  5],~
    +              a -= state.quantity * 2 if iter == state.quantity
    +** Processing line: ~              iter = 0                if iter == state.quantity~
     - Inside source: true
     *** True Line Result
    -      E: [ 4,  5],
    -** Processing line: ~      F: [ 4,  6],~
    +              iter = 0                if iter == state.quantity
    +** Processing line: ~              break if a < 0~
     - Inside source: true
     *** True Line Result
    -      F: [ 4,  6],
    -** Processing line: ~      G: [ 4,  7],~
    +              break if a < 0
    +** Processing line: ~          end~
     - Inside source: true
     *** True Line Result
    -      G: [ 4,  7],
    -** Processing line: ~      H: [ 4,  8],~
    +          end
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -      H: [ 4,  8],
    -** Processing line: ~      I: [ 4,  9],~
    +      end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      I: [ 4,  9],
    -** Processing line: ~      J: [ 4, 10],~
    +
    +** Processing line: ~      def renderLabels~
     - Inside source: true
     *** True Line Result
    -      J: [ 4, 10],
    -** Processing line: ~      K: [ 4, 11],~
    +      def renderLabels
    +** Processing line: ~          #Labels~
     - Inside source: true
     *** True Line Result
    -      K: [ 4, 11],
    -** Processing line: ~      L: [ 4, 12],~
    +          #Labels
    +** Processing line: ~          outputs.labels << [50, 680, 'Click to delete!',             5, 0, 255, 255, 255, 255] if state.mode == :delete~
     - Inside source: true
     *** True Line Result
    -      L: [ 4, 12],
    -** Processing line: ~      M: [ 4, 13],~
    +          outputs.labels << [50, 680, 'Click to delete!',             5, 0, 255, 255, 255, 255] if state.mode == :delete
    +** Processing line: ~          outputs.labels << [50, 640, 'Press \'i\' for insert mode!', 5, 0, 255, 255, 255, 255] if state.mode == :delete~
     - Inside source: true
     *** True Line Result
    -      M: [ 4, 13],
    -** Processing line: ~      N: [ 4, 14],~
    +          outputs.labels << [50, 640, 'Press \'i\' for insert mode!', 5, 0, 255, 255, 255, 255] if state.mode == :delete
    +** Processing line: ~          outputs.labels << [50, 680, 'Click to insert!',             5, 0, 255, 255, 255, 255] if state.mode == :insert~
     - Inside source: true
     *** True Line Result
    -      N: [ 4, 14],
    -** Processing line: ~      O: [ 4, 15],~
    +          outputs.labels << [50, 680, 'Click to insert!',             5, 0, 255, 255, 255, 255] if state.mode == :insert
    +** Processing line: ~          outputs.labels << [50, 640, 'Press \'d\' for delete mode!', 5, 0, 255, 255, 255, 255] if state.mode == :insert~
     - Inside source: true
     *** True Line Result
    -      O: [ 4, 15],
    -** Processing line: ~      P: [ 5,  0],~
    +          outputs.labels << [50, 640, 'Press \'d\' for delete mode!', 5, 0, 255, 255, 255, 255] if state.mode == :insert
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -      P: [ 5,  0],
    -** Processing line: ~      Q: [ 5,  1],~
    +      end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      Q: [ 5,  1],
    -** Processing line: ~      R: [ 5,  2],~
    +
    +** Processing line: ~      def calc~
     - Inside source: true
     *** True Line Result
    -      R: [ 5,  2],
    -** Processing line: ~      S: [ 5,  3],~
    +      def calc
    +** Processing line: ~          calcCurrentHover~
     - Inside source: true
     *** True Line Result
    -      S: [ 5,  3],
    -** Processing line: ~      T: [ 5,  4],~
    +          calcCurrentHover
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -      T: [ 5,  4],
    -** Processing line: ~      U: [ 5,  5],~
    +      end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      U: [ 5,  5],
    -** Processing line: ~      V: [ 5,  6],~
    +
    +** Processing line: ~      def calcCurrentHover~
     - Inside source: true
     *** True Line Result
    -      V: [ 5,  6],
    -** Processing line: ~      W: [ 5,  7],~
    +      def calcCurrentHover
    +** Processing line: ~          #This determines what tile the mouse is hovering (or last hovering) over~
     - Inside source: true
     *** True Line Result
    -      W: [ 5,  7],
    -** Processing line: ~      X: [ 5,  8],~
    +          #This determines what tile the mouse is hovering (or last hovering) over
    +** Processing line: ~          x = inputs.mouse.position.x~
     - Inside source: true
     *** True Line Result
    -      X: [ 5,  8],
    -** Processing line: ~      Y: [ 5,  9],~
    +          x = inputs.mouse.position.x
    +** Processing line: ~          y = inputs.mouse.position.y~
     - Inside source: true
     *** True Line Result
    -      Y: [ 5,  9],
    -** Processing line: ~      Z: [ 5, 10],~
    +          y = inputs.mouse.position.y
    +** Processing line: ~          m = (state.tileSize[1] / state.tileSize[0])   #slope~
     - Inside source: true
     *** True Line Result
    -      Z: [ 5, 10],
    -** Processing line: ~      a: [ 6,  1],~
    +          m = (state.tileSize[1] / state.tileSize[0])   #slope
    +** Processing line: ~          state.tileCords.map do~
     - Inside source: true
     *** True Line Result
    -      a: [ 6,  1],
    -** Processing line: ~      b: [ 6,  2],~
    +          state.tileCords.map do
    +** Processing line: ~              |val|~
     - Inside source: true
     *** True Line Result
    -      b: [ 6,  2],
    -** Processing line: ~      c: [ 6,  3],~
    +              |val|
    +** Processing line: ~              #Conditions that makes runtime faster. Checks if the mouse click was between tile dimensions (rectangle collision)~
     - Inside source: true
     *** True Line Result
    -      c: [ 6,  3],
    -** Processing line: ~      d: [ 6,  4],~
    +              #Conditions that makes runtime faster. Checks if the mouse click was between tile dimensions (rectangle collision)
    +** Processing line: ~              next unless val[0] < x && x < val[0] + state.tileSize[0]~
     - Inside source: true
     *** True Line Result
    -      d: [ 6,  4],
    -** Processing line: ~      e: [ 6,  5],~
    +              next unless val[0] < x && x < val[0] + state.tileSize[0]
    +** Processing line: ~              next unless val[1] < y && y < val[1] + state.tileSize[1]~
     - Inside source: true
     *** True Line Result
    -      e: [ 6,  5],
    -** Processing line: ~      f: [ 6,  6],~
    +              next unless val[1] < y && y < val[1] + state.tileSize[1]
    +** Processing line: ~              next unless val[2] == true~
     - Inside source: true
     *** True Line Result
    -      f: [ 6,  6],
    -** Processing line: ~      g: [ 6,  7],~
    +              next unless val[2] == true
    +** Processing line: ~              tempBool = false~
     - Inside source: true
     *** True Line Result
    -      g: [ 6,  7],
    -** Processing line: ~      h: [ 6,  8],~
    +              tempBool = false
    +** Processing line: ~              if x == val[0] + (state.tileSize[0] / 2)~
     - Inside source: true
     *** True Line Result
    -      h: [ 6,  8],
    -** Processing line: ~      i: [ 6,  9],~
    +              if x == val[0] + (state.tileSize[0] / 2)
    +** Processing line: ~                  #The height of a diamond is the height of the diamond, so if x equals that exact point, it must be inside the diamond~
     - Inside source: true
     *** True Line Result
    -      i: [ 6,  9],
    -** Processing line: ~      j: [ 6, 10],~
    +                  #The height of a diamond is the height of the diamond, so if x equals that exact point, it must be inside the diamond
    +** Processing line: ~                  tempBool = true~
     - Inside source: true
     *** True Line Result
    -      j: [ 6, 10],
    -** Processing line: ~      k: [ 6, 11],~
    +                  tempBool = true
    +** Processing line: ~              elsif x < state.tileSize[0] / 2 + val[0]~
     - Inside source: true
     *** True Line Result
    -      k: [ 6, 11],
    -** Processing line: ~      l: [ 6, 12],~
    +              elsif x < state.tileSize[0] / 2 + val[0]
    +** Processing line: ~                  #Uses y = (m) * (x - x1) + y1 to determine the y values for the two diamond lines on the left half of diamond~
     - Inside source: true
     *** True Line Result
    -      l: [ 6, 12],
    -** Processing line: ~      m: [ 6, 13],~
    +                  #Uses y = (m) * (x - x1) + y1 to determine the y values for the two diamond lines on the left half of diamond
    +** Processing line: ~                  tempY1 =      (m * (x - val[0])) + val[1] + (state.tileSize[1] / 2)~
     - Inside source: true
     *** True Line Result
    -      m: [ 6, 13],
    -** Processing line: ~      n: [ 6, 14],~
    +                  tempY1 =      (m * (x - val[0])) + val[1] + (state.tileSize[1] / 2)
    +** Processing line: ~                  tempY2 = (-1 * m * (x - val[0])) + val[1] + (state.tileSize[1] / 2)~
     - Inside source: true
     *** True Line Result
    -      n: [ 6, 14],
    -** Processing line: ~      o: [ 6, 15],~
    +                  tempY2 = (-1 * m * (x - val[0])) + val[1] + (state.tileSize[1] / 2)
    +** Processing line: ~                  #Checks to see if the mouse click y value is between those temp y values~
     - Inside source: true
     *** True Line Result
    -      o: [ 6, 15],
    -** Processing line: ~      p: [ 7,  0],~
    +                  #Checks to see if the mouse click y value is between those temp y values
    +** Processing line: ~                  tempBool = true if y < tempY1 && y > tempY2~
     - Inside source: true
     *** True Line Result
    -      p: [ 7,  0],
    -** Processing line: ~      q: [ 7,  1],~
    +                  tempBool = true if y < tempY1 && y > tempY2
    +** Processing line: ~              elsif x > state.tileSize[0] / 2 + val[0]~
     - Inside source: true
     *** True Line Result
    -      q: [ 7,  1],
    -** Processing line: ~      r: [ 7,  2],~
    +              elsif x > state.tileSize[0] / 2 + val[0]
    +** Processing line: ~                  #Uses y = (m) * (x - x1) + y1 to determine the y values for the two diamond lines on the right half of diamond~
     - Inside source: true
     *** True Line Result
    -      r: [ 7,  2],
    -** Processing line: ~      s: [ 7,  3],~
    +                  #Uses y = (m) * (x - x1) + y1 to determine the y values for the two diamond lines on the right half of diamond
    +** Processing line: ~                  tempY1 =      (m * (x - val[0] - (state.tileSize[0] / 2))) + val[1]~
     - Inside source: true
     *** True Line Result
    -      s: [ 7,  3],
    -** Processing line: ~      t: [ 7,  4],~
    +                  tempY1 =      (m * (x - val[0] - (state.tileSize[0] / 2))) + val[1]
    +** Processing line: ~                  tempY2 = (-1 * m * (x - val[0] - (state.tileSize[0] / 2))) + val[1] + state.tileSize[1]~
     - Inside source: true
     *** True Line Result
    -      t: [ 7,  4],
    -** Processing line: ~      u: [ 7,  5],~
    +                  tempY2 = (-1 * m * (x - val[0] - (state.tileSize[0] / 2))) + val[1] + state.tileSize[1]
    +** Processing line: ~                  #Checks to see if the mouse click y value is between those temp y values~
     - Inside source: true
     *** True Line Result
    -      u: [ 7,  5],
    -** Processing line: ~      v: [ 7,  6],~
    +                  #Checks to see if the mouse click y value is between those temp y values
    +** Processing line: ~                  tempBool = true if y > tempY1 && y < tempY2~
     - Inside source: true
     *** True Line Result
    -      v: [ 7,  6],
    -** Processing line: ~      w: [ 7,  7],~
    +                  tempBool = true if y > tempY1 && y < tempY2
    +** Processing line: ~              end~
     - Inside source: true
     *** True Line Result
    -      w: [ 7,  7],
    -** Processing line: ~      x: [ 7,  8],~
    +              end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      x: [ 7,  8],
    -** Processing line: ~      y: [ 7,  9],~
    +
    +** Processing line: ~              if tempBool == true~
     - Inside source: true
     *** True Line Result
    -      y: [ 7,  9],
    -** Processing line: ~      z: [ 7, 10],~
    +              if tempBool == true
    +** Processing line: ~                  state.currentSpriteLocation = val[5]         #Current sprite location set to the order value~
     - Inside source: true
     *** True Line Result
    -      z: [ 7, 10],
    -** Processing line: ~      '|' => [ 7, 12]~
    +                  state.currentSpriteLocation = val[5]         #Current sprite location set to the order value
    +** Processing line: ~              end~
     - Inside source: true
     *** True Line Result
    -      '|' => [ 7, 12]
    -** Processing line: ~    }~
    +              end
    +** Processing line: ~          end~
     - Inside source: true
     *** True Line Result
    -    }
    -** Processing line: ~  end~
    +          end
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -  end
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def sprite key~
    +** Processing line: ~      def process_inputs~
     - Inside source: true
     *** True Line Result
    -  def sprite key
    -** Processing line: ~    $gtk.args.state.reserved.sprite_lookup[key]~
    +      def process_inputs
    +** Processing line: ~          #Makes development much faster and easier~
     - Inside source: true
     *** True Line Result
    -    $gtk.args.state.reserved.sprite_lookup[key]
    -** Processing line: ~  end~
    +          #Makes development much faster and easier
    +** Processing line: ~          if inputs.keyboard.key_up.r~
     - Inside source: true
     *** True Line Result
    -  end
    +          if inputs.keyboard.key_up.r
    +** Processing line: ~              $dragon.reset~
    +- Inside source: true
    +*** True Line Result
    +              $dragon.reset
    +** Processing line: ~          end~
    +- Inside source: true
    +*** True Line Result
    +          end
    +** Processing line: ~          checkTileSelected~
    +- Inside source: true
    +*** True Line Result
    +          checkTileSelected
    +** Processing line: ~          switchModes~
    +- Inside source: true
    +*** True Line Result
    +          switchModes
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  def member_name_as_code raw_member_name~
    +** Processing line: ~      def checkTileSelected~
     - Inside source: true
     *** True Line Result
    -  def member_name_as_code raw_member_name
    -** Processing line: ~    if raw_member_name.is_a? Symbol~
    +      def checkTileSelected
    +** Processing line: ~          if inputs.mouse.down~
     - Inside source: true
     *** True Line Result
    -    if raw_member_name.is_a? Symbol
    -** Processing line: ~      ":#{raw_member_name}"~
    +          if inputs.mouse.down
    +** Processing line: ~              x = inputs.mouse.down.point.x~
     - Inside source: true
     *** True Line Result
    -      ":#{raw_member_name}"
    -** Processing line: ~    elsif raw_member_name.is_a? String~
    +              x = inputs.mouse.down.point.x
    +** Processing line: ~              y = inputs.mouse.down.point.y~
     - Inside source: true
     *** True Line Result
    -    elsif raw_member_name.is_a? String
    -** Processing line: ~      "'#{raw_member_name}'"~
    +              y = inputs.mouse.down.point.y
    +** Processing line: ~              m = (state.tileSize[1] / state.tileSize[0])   #slope~
     - Inside source: true
     *** True Line Result
    -      "'#{raw_member_name}'"
    -** Processing line: ~    elsif raw_member_name.is_a? Fixnum~
    +              m = (state.tileSize[1] / state.tileSize[0])   #slope
    +** Processing line: ~              state.tileCords.map do~
     - Inside source: true
     *** True Line Result
    -    elsif raw_member_name.is_a? Fixnum
    -** Processing line: ~      "#{raw_member_name}"~
    +              state.tileCords.map do
    +** Processing line: ~                  |val|~
     - Inside source: true
     *** True Line Result
    -      "#{raw_member_name}"
    -** Processing line: ~    else~
    +                  |val|
    +** Processing line: ~                  #Conditions that makes runtime faster. Checks if the mouse click was between tile dimensions (rectangle collision)~
     - Inside source: true
     *** True Line Result
    -    else
    -** Processing line: ~      "UNKNOWN: #{raw_member_name}"~
    +                  #Conditions that makes runtime faster. Checks if the mouse click was between tile dimensions (rectangle collision)
    +** Processing line: ~                  next unless val[0] < x && x < val[0] + state.tileSize[0]~
     - Inside source: true
     *** True Line Result
    -      "UNKNOWN: #{raw_member_name}"
    -** Processing line: ~    end~
    +                  next unless val[0] < x && x < val[0] + state.tileSize[0]
    +** Processing line: ~                  next unless val[1] < y && y < val[1] + state.tileSize[1]~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~  end~
    +                  next unless val[1] < y && y < val[1] + state.tileSize[1]
    +** Processing line: ~                  next unless val[2] == true~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +                  next unless val[2] == true
    +** Processing line: ~                  tempBool = false~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def tile x, y, tile_row_column_or_key~
    +                  tempBool = false
    +** Processing line: ~                  if x == val[0] + (state.tileSize[0] / 2)~
     - Inside source: true
     *** True Line Result
    -  def tile x, y, tile_row_column_or_key
    -** Processing line: ~    tile_extended x, y, DESTINATION_TILE_SIZE, DESTINATION_TILE_SIZE, TILE_R, TILE_G, TILE_B, TILE_A, tile_row_column_or_key~
    +                  if x == val[0] + (state.tileSize[0] / 2)
    +** Processing line: ~                      #The height of a diamond is the height of the diamond, so if x equals that exact point, it must be inside the diamond~
     - Inside source: true
     *** True Line Result
    -    tile_extended x, y, DESTINATION_TILE_SIZE, DESTINATION_TILE_SIZE, TILE_R, TILE_G, TILE_B, TILE_A, tile_row_column_or_key
    -** Processing line: ~  end~
    +                      #The height of a diamond is the height of the diamond, so if x equals that exact point, it must be inside the diamond
    +** Processing line: ~                      tempBool = true~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +                      tempBool = true
    +** Processing line: ~                  elsif x < state.tileSize[0] / 2 + val[0]~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def tile_extended x, y, w, h, r, g, b, a, tile_row_column_or_key~
    +                  elsif x < state.tileSize[0] / 2 + val[0]
    +** Processing line: ~                      #Uses y = (m) * (x - x1) + y1 to determine the y values for the two diamond lines on the left half of diamond~
     - Inside source: true
     *** True Line Result
    -  def tile_extended x, y, w, h, r, g, b, a, tile_row_column_or_key
    -** Processing line: ~    row_or_key, column = tile_row_column_or_key~
    +                      #Uses y = (m) * (x - x1) + y1 to determine the y values for the two diamond lines on the left half of diamond
    +** Processing line: ~                      tempY1 =      (m * (x - val[0])) + val[1] + (state.tileSize[1] / 2)~
     - Inside source: true
     *** True Line Result
    -    row_or_key, column = tile_row_column_or_key
    -** Processing line: ~    if !column~
    +                      tempY1 =      (m * (x - val[0])) + val[1] + (state.tileSize[1] / 2)
    +** Processing line: ~                      tempY2 = (-1 * m * (x - val[0])) + val[1] + (state.tileSize[1] / 2)~
     - Inside source: true
     *** True Line Result
    -    if !column
    -** Processing line: ~      row, column = sprite row_or_key~
    +                      tempY2 = (-1 * m * (x - val[0])) + val[1] + (state.tileSize[1] / 2)
    +** Processing line: ~                      #Checks to see if the mouse click y value is between those temp y values~
     - Inside source: true
     *** True Line Result
    -      row, column = sprite row_or_key
    -** Processing line: ~    else~
    +                      #Checks to see if the mouse click y value is between those temp y values
    +** Processing line: ~                      tempBool = true if y < tempY1 && y > tempY2~
     - Inside source: true
     *** True Line Result
    -    else
    -** Processing line: ~      row, column = row_or_key, column~
    +                      tempBool = true if y < tempY1 && y > tempY2
    +** Processing line: ~                  elsif x > state.tileSize[0] / 2 + val[0]~
     - Inside source: true
     *** True Line Result
    -      row, column = row_or_key, column
    -** Processing line: ~    end~
    +                  elsif x > state.tileSize[0] / 2 + val[0]
    +** Processing line: ~                      #Uses y = (m) * (x - x1) + y1 to determine the y values for the two diamond lines on the right half of diamond~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +                      #Uses y = (m) * (x - x1) + y1 to determine the y values for the two diamond lines on the right half of diamond
    +** Processing line: ~                      tempY1 =      (m * (x - val[0] - (state.tileSize[0] / 2))) + val[1]~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    if !row~
    +                      tempY1 =      (m * (x - val[0] - (state.tileSize[0] / 2))) + val[1]
    +** Processing line: ~                      tempY2 = (-1 * m * (x - val[0] - (state.tileSize[0] / 2))) + val[1] + state.tileSize[1]~
     - Inside source: true
     *** True Line Result
    -    if !row
    -** Processing line: ~      member_name = member_name_as_code tile_row_column_or_key~
    +                      tempY2 = (-1 * m * (x - val[0] - (state.tileSize[0] / 2))) + val[1] + state.tileSize[1]
    +** Processing line: ~                      #Checks to see if the mouse click y value is between those temp y values~
     - Inside source: true
     *** True Line Result
    -      member_name = member_name_as_code tile_row_column_or_key
    -** Processing line: ~      raise "Unabled to find a sprite for #{member_name}. Make sure the value exists in app/sprite_lookup.rb."~
    +                      #Checks to see if the mouse click y value is between those temp y values
    +** Processing line: ~                      tempBool = true if y > tempY1 && y < tempY2~
     - Inside source: true
     *** True Line Result
    -      raise "Unabled to find a sprite for #{member_name}. Make sure the value exists in app/sprite_lookup.rb."
    -** Processing line: ~    end~
    +                      tempBool = true if y > tempY1 && y < tempY2
    +** Processing line: ~                  end~
     - Inside source: true
     *** True Line Result
    -    end
    +                  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Sprite provided by Rogue Yun~
    +** Processing line: ~                  if tempBool == true~
     - Inside source: true
     *** True Line Result
    -    # Sprite provided by Rogue Yun
    -** Processing line: ~    # http://www.bay12forums.com/smf/index.php?topic=144897.0~
    +                  if tempBool == true
    +** Processing line: ~                      if state.mode == :delete~
     - Inside source: true
     *** True Line Result
    -    # http://www.bay12forums.com/smf/index.php?topic=144897.0
    -** Processing line: ~    # License: Public Domain~
    +                      if state.mode == :delete
    +** Processing line: ~                          val[2] = false~
     - Inside source: true
     *** True Line Result
    -    # License: Public Domain
    -** Processing line: ~~
    +                          val[2] = false
    +** Processing line: ~                          state.tileGrid[val[5]][2]  = false      #Unnecessary because never used again but eh, I like consistency~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    {~
    +                          state.tileGrid[val[5]][2]  = false      #Unnecessary because never used again but eh, I like consistency
    +** Processing line: ~                          state.tileCords[val[5]][2] = false      #Ensures that the tile isn't rendered~
     - Inside source: true
     *** True Line Result
    -    {
    -** Processing line: ~      x: x,~
    +                          state.tileCords[val[5]][2] = false      #Ensures that the tile isn't rendered
    +** Processing line: ~                          unless state.tileGrid[val[5]][0] == 0   #If tile is the left most tile in the row, right doesn't get rendered~
     - Inside source: true
     *** True Line Result
    -      x: x,
    -** Processing line: ~      y: y,~
    +                          unless state.tileGrid[val[5]][0] == 0   #If tile is the left most tile in the row, right doesn't get rendered
    +** Processing line: ~                              state.tileGrid[val[5] - 1][4] = true            #Why the order value is amazing~
     - Inside source: true
     *** True Line Result
    -      y: y,
    -** Processing line: ~      w: w,~
    +                              state.tileGrid[val[5] - 1][4] = true            #Why the order value is amazing
    +** Processing line: ~                              state.tileCords[val[5] - 1][4] = true~
     - Inside source: true
     *** True Line Result
    -      w: w,
    -** Processing line: ~      h: h,~
    +                              state.tileCords[val[5] - 1][4] = true
    +** Processing line: ~                          end~
     - Inside source: true
     *** True Line Result
    -      h: h,
    -** Processing line: ~      tile_x: column * 16,~
    +                          end
    +** Processing line: ~                          unless state.tileGrid[val[5]][1] == state.quantity - 1     #Same but left side~
     - Inside source: true
     *** True Line Result
    -      tile_x: column * 16,
    -** Processing line: ~      tile_y: (row * 16),~
    +                          unless state.tileGrid[val[5]][1] == state.quantity - 1     #Same but left side
    +** Processing line: ~                              state.tileGrid[val[5] + state.quantity][3] = true~
     - Inside source: true
     *** True Line Result
    -      tile_y: (row * 16),
    -** Processing line: ~      tile_w: 16,~
    +                              state.tileGrid[val[5] + state.quantity][3] = true
    +** Processing line: ~                              state.tileCords[val[5] + state.quantity][3] = true~
     - Inside source: true
     *** True Line Result
    -      tile_w: 16,
    -** Processing line: ~      tile_h: 16,~
    +                              state.tileCords[val[5] + state.quantity][3] = true
    +** Processing line: ~                          end~
     - Inside source: true
     *** True Line Result
    -      tile_h: 16,
    -** Processing line: ~      r: r,~
    +                          end
    +** Processing line: ~                      elsif state.mode == :insert~
     - Inside source: true
     *** True Line Result
    -      r: r,
    -** Processing line: ~      g: g,~
    +                      elsif state.mode == :insert
    +** Processing line: ~                          #adds the current sprite value selected to tileCords. (changes from the -1 earlier)~
     - Inside source: true
     *** True Line Result
    -      g: g,
    -** Processing line: ~      b: b,~
    +                          #adds the current sprite value selected to tileCords. (changes from the -1 earlier)
    +** Processing line: ~                          val[6] = rand(state.spriteSelection.length)~
     - Inside source: true
     *** True Line Result
    -      b: b,
    -** Processing line: ~      a: a,~
    +                          val[6] = rand(state.spriteSelection.length)
    +** Processing line: ~                      end~
     - Inside source: true
     *** True Line Result
    -      a: a,
    -** Processing line: ~      path: 'sprites/simple-mood-16x16.png'~
    +                      end
    +** Processing line: ~                  end~
     - Inside source: true
     *** True Line Result
    -      path: 'sprites/simple-mood-16x16.png'
    -** Processing line: ~    }~
    +                  end
    +** Processing line: ~              end~
     - Inside source: true
     *** True Line Result
    -    }
    -** Processing line: ~  end~
    +              end
    +** Processing line: ~          end~
     - Inside source: true
     *** True Line Result
    -  end
    +          end
    +** Processing line: ~      end~
    +- Inside source: true
    +*** True Line Result
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  $gtk.args.state.reserved.sprite_lookup = sprite_lookup~
    +** Processing line: ~      def switchModes~
     - Inside source: true
     *** True Line Result
    -  $gtk.args.state.reserved.sprite_lookup = sprite_lookup
    -** Processing line: ~~
    +      def switchModes
    +** Processing line: ~          #Switches between insert and delete modes~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~#+end_src~
    -- Line was identified as the end of a code block.
    +          #Switches between insert and delete modes
    +** Processing line: ~          if inputs.keyboard.key_up.i && state.mode == :delete~
    +- Inside source: true
     *** True Line Result
    -#+end_src
    -** Processing line: ~~
    -- End of paragraph detected.
    +          if inputs.keyboard.key_up.i && state.mode == :delete
    +** Processing line: ~              state.mode = :insert~
    +- Inside source: true
     *** True Line Result
    -
    -** Processing line: ~*** Rpg Roguelike - Roguelike Line Of Sight - main.rb~
    -- Header detected.
    +              state.mode = :insert
    +** Processing line: ~              inputs.keyboard.clear~
    +- Inside source: true
     *** True Line Result
    -
    +              inputs.keyboard.clear
    +** Processing line: ~          elsif inputs.keyboard.key_up.d && state.mode == :insert~
    +- Inside source: true
     *** True Line Result
    -*** Rpg Roguelike - Roguelike Line Of Sight - main.rb
    -** Processing line: ~#+begin_src ruby~
    -- Line was identified as the beginning of a code block.
    +          elsif inputs.keyboard.key_up.d && state.mode == :insert
    +** Processing line: ~              state.mode = :delete~
    +- Inside source: true
     *** True Line Result
    -
    +              state.mode = :delete
    +** Processing line: ~              inputs.keyboard.clear~
    +- Inside source: true
     *** True Line Result
    -#+begin_src ruby
    -** Processing line: ~  # ./samples/99_genre_rpg_roguelike/02_roguelike_line_of_sight/app/main.rb~
    +              inputs.keyboard.clear
    +** Processing line: ~          end~
     - Inside source: true
     *** True Line Result
    -  # ./samples/99_genre_rpg_roguelike/02_roguelike_line_of_sight/app/main.rb
    -** Processing line: ~  =begin~
    +          end
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -  =begin
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~   APIs listing that haven't been encountered in previous sample apps:~
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -   APIs listing that haven't been encountered in previous sample apps:
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~   - lambda: A way to define a block and its parameters with special syntax.~
    +** Processing line: ~  $isometric = Isometric.new~
     - Inside source: true
     *** True Line Result
    -   - lambda: A way to define a block and its parameters with special syntax.
    -** Processing line: ~     For example, the syntax of lambda looks like this:~
    +  $isometric = Isometric.new
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -     For example, the syntax of lambda looks like this:
    -** Processing line: ~     my_lambda = -> { puts "This is my lambda" }~
    +
    +** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
    -     my_lambda = -> { puts "This is my lambda" }
    -** Processing line: ~~
    +  def tick args
    +** Processing line: ~      $isometric.grid    = args.grid~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   Reminders:~
    +      $isometric.grid    = args.grid
    +** Processing line: ~      $isometric.inputs  = args.inputs~
     - Inside source: true
     *** True Line Result
    -   Reminders:
    -** Processing line: ~   - args.outputs.labels: An array. The values generate a label.~
    +      $isometric.inputs  = args.inputs
    +** Processing line: ~      $isometric.state   = args.state~
     - Inside source: true
     *** True Line Result
    -   - args.outputs.labels: An array. The values generate a label.
    -** Processing line: ~     The parameters are [X, Y, TEXT, SIZE, ALIGNMENT, RED, GREEN, BLUE, ALPHA, FONT STYLE]~
    +      $isometric.state   = args.state
    +** Processing line: ~      $isometric.outputs = args.outputs~
     - Inside source: true
     *** True Line Result
    -     The parameters are [X, Y, TEXT, SIZE, ALIGNMENT, RED, GREEN, BLUE, ALPHA, FONT STYLE]
    -** Processing line: ~     For more information about labels, go to mygame/documentation/02-labels.~
    +      $isometric.outputs = args.outputs
    +** Processing line: ~      $isometric.tick~
     - Inside source: true
     *** True Line Result
    -     For more information about labels, go to mygame/documentation/02-labels.
    +      $isometric.tick
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~   - ARRAY#inside_rect?: Returns whether or not the point is inside a rect.~
    -- Inside source: true
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
     *** True Line Result
    -   - ARRAY#inside_rect?: Returns whether or not the point is inside a rect.
    +#+end_src
     ** Processing line: ~~
    -- Inside source: true
    +- End of paragraph detected.
     *** True Line Result
     
    -** Processing line: ~   - product: Returns an array of all combinations of elements from all arrays.~
    -- Inside source: true
    +** Processing line: ~*** Rpg Topdown - Topdown Casino - main.rb~
    +- Header detected.
     *** True Line Result
    -   - product: Returns an array of all combinations of elements from all arrays.
    -** Processing line: ~~
    -- Inside source: true
    +
    +*** True Line Result
    +*** Rpg Topdown - Topdown Casino - main.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
     *** True Line Result
     
    -** Processing line: ~   - find: Finds all elements of a collection that meet requirements.~
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/99_genre_rpg_topdown/topdown_casino/app/main.rb~
     - Inside source: true
     *** True Line Result
    -   - find: Finds all elements of a collection that meet requirements.
    +  # ./samples/99_genre_rpg_topdown/topdown_casino/app/main.rb
    +** Processing line: ~  $gtk.reset~
    +- Inside source: true
    +*** True Line Result
    +  $gtk.reset
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~   - abs: Returns the absolute value.~
    +** Processing line: ~  def coinflip~
     - Inside source: true
     *** True Line Result
    -   - abs: Returns the absolute value.
    -** Processing line: ~~
    +  def coinflip
    +** Processing line: ~    rand < 0.5~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  =end~
    +    rand < 0.5
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -  =end
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # This sample app allows the player to move around in the dungeon, which becomes more or less visible~
    +** Processing line: ~  class Game~
     - Inside source: true
     *** True Line Result
    -  # This sample app allows the player to move around in the dungeon, which becomes more or less visible
    -** Processing line: ~  # depending on the player's location, and also has enemies.~
    +  class Game
    +** Processing line: ~    attr_accessor :args~
     - Inside source: true
     *** True Line Result
    -  # depending on the player's location, and also has enemies.
    +    attr_accessor :args
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  class Game~
    +** Processing line: ~    def text_font~
     - Inside source: true
     *** True Line Result
    -  class Game
    -** Processing line: ~    attr_accessor :args, :state, :inputs, :outputs, :grid~
    +    def text_font
    +** Processing line: ~      return nil #"rpg.ttf"~
     - Inside source: true
     *** True Line Result
    -    attr_accessor :args, :state, :inputs, :outputs, :grid
    +      return nil #"rpg.ttf"
    +** Processing line: ~    end~
    +- Inside source: true
    +*** True Line Result
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Calls all the methods needed for the game to run properly.~
    +** Processing line: ~    def text_color~
     - Inside source: true
     *** True Line Result
    -    # Calls all the methods needed for the game to run properly.
    -** Processing line: ~    def tick~
    +    def text_color
    +** Processing line: ~      [ 255, 255, 255, 255 ]~
     - Inside source: true
     *** True Line Result
    -    def tick
    -** Processing line: ~      defaults~
    +      [ 255, 255, 255, 255 ]
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      defaults
    -** Processing line: ~      render_canvas~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      render_canvas
    -** Processing line: ~      render_dungeon~
    +
    +** Processing line: ~    def set_gem_values~
     - Inside source: true
     *** True Line Result
    -      render_dungeon
    -** Processing line: ~      render_player~
    +    def set_gem_values
    +** Processing line: ~      @args.state.gem0 = ((coinflip) ?  100 : 20)~
     - Inside source: true
     *** True Line Result
    -      render_player
    -** Processing line: ~      render_enemies~
    +      @args.state.gem0 = ((coinflip) ?  100 : 20)
    +** Processing line: ~      @args.state.gem1 = ((coinflip) ? -10 : -50)~
     - Inside source: true
     *** True Line Result
    -      render_enemies
    -** Processing line: ~      print_cell_coordinates~
    +      @args.state.gem1 = ((coinflip) ? -10 : -50)
    +** Processing line: ~      @args.state.gem2 = ((coinflip) ? -10 : -30)~
    +- Inside source: true
    +*** True Line Result
    +      @args.state.gem2 = ((coinflip) ? -10 : -30)
    +** Processing line: ~      if coinflip~
    +- Inside source: true
    +*** True Line Result
    +      if coinflip
    +** Processing line: ~        tmp = @args.state.gem0~
    +- Inside source: true
    +*** True Line Result
    +        tmp = @args.state.gem0
    +** Processing line: ~        @args.state.gem0 = @args.state.gem1~
     - Inside source: true
     *** True Line Result
    -      print_cell_coordinates
    -** Processing line: ~      calc_canvas~
    +        @args.state.gem0 = @args.state.gem1
    +** Processing line: ~        @args.state.gem1 = tmp~
     - Inside source: true
     *** True Line Result
    -      calc_canvas
    -** Processing line: ~      input_move~
    +        @args.state.gem1 = tmp
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -      input_move
    -** Processing line: ~      input_click_map~
    +      end
    +** Processing line: ~      if coinflip~
     - Inside source: true
     *** True Line Result
    -      input_click_map
    -** Processing line: ~    end~
    +      if coinflip
    +** Processing line: ~        tmp = @args.state.gem1~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +        tmp = @args.state.gem1
    +** Processing line: ~        @args.state.gem1 = @args.state.gem2~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # Sets default values and initializes variables~
    +        @args.state.gem1 = @args.state.gem2
    +** Processing line: ~        @args.state.gem2 = tmp~
     - Inside source: true
     *** True Line Result
    -    # Sets default values and initializes variables
    -** Processing line: ~    def defaults~
    +        @args.state.gem2 = tmp
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    def defaults
    -** Processing line: ~      outputs.background_color = [0, 0, 0] # black background~
    +      end
    +** Processing line: ~      if coinflip~
     - Inside source: true
     *** True Line Result
    -      outputs.background_color = [0, 0, 0] # black background
    -** Processing line: ~~
    +      if coinflip
    +** Processing line: ~        tmp = @args.state.gem0~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      # Initializes empty canvas, dungeon, and enemies collections.~
    +        tmp = @args.state.gem0
    +** Processing line: ~        @args.state.gem0 = @args.state.gem2~
     - Inside source: true
     *** True Line Result
    -      # Initializes empty canvas, dungeon, and enemies collections.
    -** Processing line: ~      state.canvas   ||= []~
    +        @args.state.gem0 = @args.state.gem2
    +** Processing line: ~        @args.state.gem2 = tmp~
     - Inside source: true
     *** True Line Result
    -      state.canvas   ||= []
    -** Processing line: ~      state.dungeon  ||= []~
    +        @args.state.gem2 = tmp
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -      state.dungeon  ||= []
    -** Processing line: ~      state.enemies  ||= []~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      state.enemies  ||= []
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      # If state.area doesn't have value, load_area_one and derive_dungeon_from_area methods are called~
    -- Inside source: true
    -*** True Line Result
    -      # If state.area doesn't have value, load_area_one and derive_dungeon_from_area methods are called
    -** Processing line: ~      if !state.area~
    +** Processing line: ~    def initialize args~
     - Inside source: true
     *** True Line Result
    -      if !state.area
    -** Processing line: ~        load_area_one~
    +    def initialize args
    +** Processing line: ~      @args = args~
     - Inside source: true
     *** True Line Result
    -        load_area_one
    -** Processing line: ~        derive_dungeon_from_area~
    +      @args = args
    +** Processing line: ~      @args.state.animticks = 0~
     - Inside source: true
     *** True Line Result
    -        derive_dungeon_from_area
    -** Processing line: ~~
    +      @args.state.animticks = 0
    +** Processing line: ~      @args.state.score = 0~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~        # Changing these values will change the position of player~
    +      @args.state.score = 0
    +** Processing line: ~      @args.state.gem_chosen = false~
     - Inside source: true
     *** True Line Result
    -        # Changing these values will change the position of player
    -** Processing line: ~        state.x = 7~
    +      @args.state.gem_chosen = false
    +** Processing line: ~      @args.state.round_finished = false~
     - Inside source: true
     *** True Line Result
    -        state.x = 7
    -** Processing line: ~        state.y = 5~
    +      @args.state.round_finished = false
    +** Processing line: ~      @args.state.gem0_x = 197~
     - Inside source: true
     *** True Line Result
    -        state.y = 5
    -** Processing line: ~~
    +      @args.state.gem0_x = 197
    +** Processing line: ~      @args.state.gem0_y = 720-274~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~        # Creates new enemies, sets their values, and adds them to the enemies collection.~
    +      @args.state.gem0_y = 720-274
    +** Processing line: ~      @args.state.gem1_x = 623~
     - Inside source: true
     *** True Line Result
    -        # Creates new enemies, sets their values, and adds them to the enemies collection.
    -** Processing line: ~        state.enemies << state.new_entity(:enemy) do |e| # declares each enemy as new entity~
    +      @args.state.gem1_x = 623
    +** Processing line: ~      @args.state.gem1_y = 720-274~
     - Inside source: true
     *** True Line Result
    -        state.enemies << state.new_entity(:enemy) do |e| # declares each enemy as new entity
    -** Processing line: ~          e.x           = 13 # position~
    +      @args.state.gem1_y = 720-274
    +** Processing line: ~      @args.state.gem2_x = 1049~
     - Inside source: true
     *** True Line Result
    -          e.x           = 13 # position
    -** Processing line: ~          e.y           = 5~
    +      @args.state.gem2_x = 1049
    +** Processing line: ~      @args.state.gem2_y = 720-274~
     - Inside source: true
     *** True Line Result
    -          e.y           = 5
    -** Processing line: ~          e.previous_hp = 3~
    +      @args.state.gem2_y = 720-274
    +** Processing line: ~      @args.state.hero_sprite = "sprites/herodown100.png"~
     - Inside source: true
     *** True Line Result
    -          e.previous_hp = 3
    -** Processing line: ~          e.hp          = 3~
    +      @args.state.hero_sprite = "sprites/herodown100.png"
    +** Processing line: ~      @args.state.hero_x = 608~
     - Inside source: true
     *** True Line Result
    -          e.hp          = 3
    -** Processing line: ~          e.max_hp      = 3~
    +      @args.state.hero_x = 608
    +** Processing line: ~      @args.state.hero_y = 720-656~
     - Inside source: true
     *** True Line Result
    -          e.max_hp      = 3
    -** Processing line: ~          e.is_dead     = false # the enemy is alive~
    +      @args.state.hero_y = 720-656
    +** Processing line: ~      set_gem_values~
     - Inside source: true
     *** True Line Result
    -          e.is_dead     = false # the enemy is alive
    -** Processing line: ~        end~
    +      set_gem_values
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -        end
    +    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~        update_line_of_sight # updates line of sight by adding newly visible cells~
    +** Processing line: ~    def render_gem_value x, y, gem~
     - Inside source: true
     *** True Line Result
    -        update_line_of_sight # updates line of sight by adding newly visible cells
    +    def render_gem_value x, y, gem
    +** Processing line: ~      if @args.state.gem_chosen~
    +- Inside source: true
    +*** True Line Result
    +      if @args.state.gem_chosen
    +** Processing line: ~        @args.outputs.labels << [ x, y + 96, gem.to_s, 1, 1, *text_color, text_font ]~
    +- Inside source: true
    +*** True Line Result
    +        @args.outputs.labels << [ x, y + 96, gem.to_s, 1, 1, *text_color, text_font ]
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    @@ -144747,474 +150911,502 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Adds elements into the state.area collection~
    +** Processing line: ~    def render~
     - Inside source: true
     *** True Line Result
    -    # Adds elements into the state.area collection
    -** Processing line: ~    # The dungeon is derived using the coordinates of this collection~
    +    def render
    +** Processing line: ~      gemsprite = ((@args.state.animticks % 400) < 200) ? 'sprites/gem200.png' : 'sprites/gem400.png'~
     - Inside source: true
     *** True Line Result
    -    # The dungeon is derived using the coordinates of this collection
    -** Processing line: ~    def load_area_one~
    +      gemsprite = ((@args.state.animticks % 400) < 200) ? 'sprites/gem200.png' : 'sprites/gem400.png'
    +** Processing line: ~      @args.outputs.background_color = [ 0, 0, 0, 255 ]~
     - Inside source: true
     *** True Line Result
    -    def load_area_one
    -** Processing line: ~      state.area ||= []~
    +      @args.outputs.background_color = [ 0, 0, 0, 255 ]
    +** Processing line: ~      @args.outputs.sprites << [608, 720-150, 64, 64, 'sprites/oldman.png']~
     - Inside source: true
     *** True Line Result
    -      state.area ||= []
    -** Processing line: ~      state.area << [8, 6]~
    +      @args.outputs.sprites << [608, 720-150, 64, 64, 'sprites/oldman.png']
    +** Processing line: ~      @args.outputs.sprites << [300, 720-150, 64, 64, 'sprites/fire.png']~
     - Inside source: true
     *** True Line Result
    -      state.area << [8, 6]
    -** Processing line: ~      state.area << [7, 6]~
    +      @args.outputs.sprites << [300, 720-150, 64, 64, 'sprites/fire.png']
    +** Processing line: ~      @args.outputs.sprites << [900, 720-150, 64, 64, 'sprites/fire.png']~
     - Inside source: true
     *** True Line Result
    -      state.area << [7, 6]
    -** Processing line: ~      state.area << [7, 7]~
    +      @args.outputs.sprites << [900, 720-150, 64, 64, 'sprites/fire.png']
    +** Processing line: ~      @args.outputs.sprites << [@args.state.gem0_x, @args.state.gem0_y, 32, 64, gemsprite]~
     - Inside source: true
     *** True Line Result
    -      state.area << [7, 7]
    -** Processing line: ~      state.area << [8, 9]~
    +      @args.outputs.sprites << [@args.state.gem0_x, @args.state.gem0_y, 32, 64, gemsprite]
    +** Processing line: ~      @args.outputs.sprites << [@args.state.gem1_x, @args.state.gem1_y, 32, 64, gemsprite]~
     - Inside source: true
     *** True Line Result
    -      state.area << [8, 9]
    -** Processing line: ~      state.area << [7, 8]~
    +      @args.outputs.sprites << [@args.state.gem1_x, @args.state.gem1_y, 32, 64, gemsprite]
    +** Processing line: ~      @args.outputs.sprites << [@args.state.gem2_x, @args.state.gem2_y, 32, 64, gemsprite]~
     - Inside source: true
     *** True Line Result
    -      state.area << [7, 8]
    -** Processing line: ~      state.area << [7, 9]~
    +      @args.outputs.sprites << [@args.state.gem2_x, @args.state.gem2_y, 32, 64, gemsprite]
    +** Processing line: ~      @args.outputs.sprites << [@args.state.hero_x, @args.state.hero_y, 64, 64, @args.state.hero_sprite]~
     - Inside source: true
     *** True Line Result
    -      state.area << [7, 9]
    -** Processing line: ~      state.area << [6, 4]~
    +      @args.outputs.sprites << [@args.state.hero_x, @args.state.hero_y, 64, 64, @args.state.hero_sprite]
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      state.area << [6, 4]
    -** Processing line: ~      state.area << [7, 3]~
    +
    +** Processing line: ~      @args.outputs.labels << [ 630, 720-30, "IT'S A SECRET TO EVERYONE.", 1, 1, *text_color, text_font ]~
     - Inside source: true
     *** True Line Result
    -      state.area << [7, 3]
    -** Processing line: ~      state.area << [7, 4]~
    +      @args.outputs.labels << [ 630, 720-30, "IT'S A SECRET TO EVERYONE.", 1, 1, *text_color, text_font ]
    +** Processing line: ~      @args.outputs.labels << [ 50, 720-85, @args.state.score.to_s, 1, 1, *text_color, text_font ]~
     - Inside source: true
     *** True Line Result
    -      state.area << [7, 4]
    -** Processing line: ~      state.area << [6, 5]~
    +      @args.outputs.labels << [ 50, 720-85, @args.state.score.to_s, 1, 1, *text_color, text_font ]
    +** Processing line: ~      render_gem_value @args.state.gem0_x, @args.state.gem0_y, @args.state.gem0~
     - Inside source: true
     *** True Line Result
    -      state.area << [6, 5]
    -** Processing line: ~      state.area << [7, 5]~
    +      render_gem_value @args.state.gem0_x, @args.state.gem0_y, @args.state.gem0
    +** Processing line: ~      render_gem_value @args.state.gem1_x, @args.state.gem1_y, @args.state.gem1~
     - Inside source: true
     *** True Line Result
    -      state.area << [7, 5]
    -** Processing line: ~      state.area << [8, 5]~
    +      render_gem_value @args.state.gem1_x, @args.state.gem1_y, @args.state.gem1
    +** Processing line: ~      render_gem_value @args.state.gem2_x, @args.state.gem2_y, @args.state.gem2~
     - Inside source: true
     *** True Line Result
    -      state.area << [8, 5]
    -** Processing line: ~      state.area << [8, 4]~
    +      render_gem_value @args.state.gem2_x, @args.state.gem2_y, @args.state.gem2
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      state.area << [8, 4]
    -** Processing line: ~      state.area << [1, 1]~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      state.area << [1, 1]
    -** Processing line: ~      state.area << [0, 1]~
    +
    +** Processing line: ~    def calc~
     - Inside source: true
     *** True Line Result
    -      state.area << [0, 1]
    -** Processing line: ~      state.area << [0, 2]~
    +    def calc
    +** Processing line: ~      @args.state.animticks += 16~
     - Inside source: true
     *** True Line Result
    -      state.area << [0, 2]
    -** Processing line: ~      state.area << [1, 2]~
    +      @args.state.animticks += 16
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      state.area << [1, 2]
    -** Processing line: ~      state.area << [2, 2]~
    +
    +** Processing line: ~      return unless @args.state.gem_chosen~
     - Inside source: true
     *** True Line Result
    -      state.area << [2, 2]
    -** Processing line: ~      state.area << [2, 1]~
    +      return unless @args.state.gem_chosen
    +** Processing line: ~      @args.state.round_finished_debounce ||= 60 * 3~
     - Inside source: true
     *** True Line Result
    -      state.area << [2, 1]
    -** Processing line: ~      state.area << [2, 3]~
    +      @args.state.round_finished_debounce ||= 60 * 3
    +** Processing line: ~      @args.state.round_finished_debounce -= 1~
     - Inside source: true
     *** True Line Result
    -      state.area << [2, 3]
    -** Processing line: ~      state.area << [1, 3]~
    +      @args.state.round_finished_debounce -= 1
    +** Processing line: ~      return if @args.state.round_finished_debounce > 0~
     - Inside source: true
     *** True Line Result
    -      state.area << [1, 3]
    -** Processing line: ~      state.area << [1, 4]~
    +      return if @args.state.round_finished_debounce > 0
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      state.area << [1, 4]
    -** Processing line: ~      state.area << [2, 4]~
    +
    +** Processing line: ~      @args.state.gem_chosen = false~
     - Inside source: true
     *** True Line Result
    -      state.area << [2, 4]
    -** Processing line: ~      state.area << [2, 5]~
    +      @args.state.gem_chosen = false
    +** Processing line: ~      @args.state.hero.sprite[0] = 'sprites/herodown100.png'~
     - Inside source: true
     *** True Line Result
    -      state.area << [2, 5]
    -** Processing line: ~      state.area << [1, 5]~
    +      @args.state.hero.sprite[0] = 'sprites/herodown100.png'
    +** Processing line: ~      @args.state.hero.sprite[1] = 608~
     - Inside source: true
     *** True Line Result
    -      state.area << [1, 5]
    -** Processing line: ~      state.area << [2, 6]~
    +      @args.state.hero.sprite[1] = 608
    +** Processing line: ~      @args.state.hero.sprite[2] = 656~
     - Inside source: true
     *** True Line Result
    -      state.area << [2, 6]
    -** Processing line: ~      state.area << [3, 6]~
    +      @args.state.hero.sprite[2] = 656
    +** Processing line: ~      @args.state.round_finished_debounce = nil~
     - Inside source: true
     *** True Line Result
    -      state.area << [3, 6]
    -** Processing line: ~      state.area << [4, 6]~
    +      @args.state.round_finished_debounce = nil
    +** Processing line: ~      set_gem_values~
     - Inside source: true
     *** True Line Result
    -      state.area << [4, 6]
    -** Processing line: ~      state.area << [4, 7]~
    +      set_gem_values
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      state.area << [4, 7]
    -** Processing line: ~      state.area << [4, 8]~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      state.area << [4, 8]
    -** Processing line: ~      state.area << [5, 8]~
    +
    +** Processing line: ~    def walk xdir, ydir, anim~
     - Inside source: true
     *** True Line Result
    -      state.area << [5, 8]
    -** Processing line: ~      state.area << [5, 9]~
    +    def walk xdir, ydir, anim
    +** Processing line: ~      @args.state.hero_sprite = "sprites/#{anim}#{(((@args.state.animticks % 200) < 100) ? '100' : '200')}.png"~
     - Inside source: true
     *** True Line Result
    -      state.area << [5, 9]
    -** Processing line: ~      state.area << [6, 9]~
    +      @args.state.hero_sprite = "sprites/#{anim}#{(((@args.state.animticks % 200) < 100) ? '100' : '200')}.png"
    +** Processing line: ~      @args.state.hero_x += 5 * xdir~
     - Inside source: true
     *** True Line Result
    -      state.area << [6, 9]
    -** Processing line: ~      state.area << [7, 10]~
    +      @args.state.hero_x += 5 * xdir
    +** Processing line: ~      @args.state.hero_y += 5 * ydir~
     - Inside source: true
     *** True Line Result
    -      state.area << [7, 10]
    -** Processing line: ~      state.area << [7, 11]~
    +      @args.state.hero_y += 5 * ydir
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      state.area << [7, 11]
    -** Processing line: ~      state.area << [7, 12]~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      state.area << [7, 12]
    -** Processing line: ~      state.area << [7, 12]~
    +
    +** Processing line: ~    def check_gem_touching gem_x, gem_y, gem~
     - Inside source: true
     *** True Line Result
    -      state.area << [7, 12]
    -** Processing line: ~      state.area << [7, 13]~
    +    def check_gem_touching gem_x, gem_y, gem
    +** Processing line: ~      return if @args.state.gem_chosen~
     - Inside source: true
     *** True Line Result
    -      state.area << [7, 13]
    -** Processing line: ~      state.area << [8, 13]~
    +      return if @args.state.gem_chosen
    +** Processing line: ~      herorect = [ @args.state.hero_x, @args.state.hero_y, 64, 64 ]~
     - Inside source: true
     *** True Line Result
    -      state.area << [8, 13]
    -** Processing line: ~      state.area << [9, 13]~
    +      herorect = [ @args.state.hero_x, @args.state.hero_y, 64, 64 ]
    +** Processing line: ~      return if !herorect.intersect_rect?([gem_x, gem_y, 32, 64])~
     - Inside source: true
     *** True Line Result
    -      state.area << [9, 13]
    -** Processing line: ~      state.area << [10, 13]~
    +      return if !herorect.intersect_rect?([gem_x, gem_y, 32, 64])
    +** Processing line: ~      @args.state.gem_chosen = true~
     - Inside source: true
     *** True Line Result
    -      state.area << [10, 13]
    -** Processing line: ~      state.area << [11, 13]~
    +      @args.state.gem_chosen = true
    +** Processing line: ~      @args.state.score += gem~
     - Inside source: true
     *** True Line Result
    -      state.area << [11, 13]
    -** Processing line: ~      state.area << [12, 13]~
    +      @args.state.score += gem
    +** Processing line: ~      @args.outputs.sounds << ((gem < 0) ? 'sounds/lose.wav' : 'sounds/win.wav')~
     - Inside source: true
     *** True Line Result
    -      state.area << [12, 13]
    -** Processing line: ~      state.area << [12, 12]~
    +      @args.outputs.sounds << ((gem < 0) ? 'sounds/lose.wav' : 'sounds/win.wav')
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      state.area << [12, 12]
    -** Processing line: ~      state.area << [8, 12]~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      state.area << [8, 12]
    -** Processing line: ~      state.area << [9, 12]~
    +
    +** Processing line: ~    def input~
     - Inside source: true
     *** True Line Result
    -      state.area << [9, 12]
    -** Processing line: ~      state.area << [10, 12]~
    +    def input
    +** Processing line: ~      if @args.inputs.keyboard.key_held.left~
     - Inside source: true
     *** True Line Result
    -      state.area << [10, 12]
    -** Processing line: ~      state.area << [11, 12]~
    +      if @args.inputs.keyboard.key_held.left
    +** Processing line: ~        walk(-1.0, 0.0, 'heroleft')~
     - Inside source: true
     *** True Line Result
    -      state.area << [11, 12]
    -** Processing line: ~      state.area << [12, 11]~
    +        walk(-1.0, 0.0, 'heroleft')
    +** Processing line: ~      elsif @args.inputs.keyboard.key_held.right~
     - Inside source: true
     *** True Line Result
    -      state.area << [12, 11]
    -** Processing line: ~      state.area << [13, 11]~
    +      elsif @args.inputs.keyboard.key_held.right
    +** Processing line: ~        walk(1.0, 0.0, 'heroright')~
     - Inside source: true
     *** True Line Result
    -      state.area << [13, 11]
    -** Processing line: ~      state.area << [13, 10]~
    +        walk(1.0, 0.0, 'heroright')
    +** Processing line: ~      elsif @args.inputs.keyboard.key_held.up~
     - Inside source: true
     *** True Line Result
    -      state.area << [13, 10]
    -** Processing line: ~      state.area << [13, 9]~
    +      elsif @args.inputs.keyboard.key_held.up
    +** Processing line: ~        walk(0.0, 1.0, 'heroup')~
     - Inside source: true
     *** True Line Result
    -      state.area << [13, 9]
    -** Processing line: ~      state.area << [13, 8]~
    +        walk(0.0, 1.0, 'heroup')
    +** Processing line: ~      elsif @args.inputs.keyboard.key_held.down~
     - Inside source: true
     *** True Line Result
    -      state.area << [13, 8]
    -** Processing line: ~      state.area << [13, 7]~
    +      elsif @args.inputs.keyboard.key_held.down
    +** Processing line: ~        walk(0.0, -1.0, 'herodown')~
     - Inside source: true
     *** True Line Result
    -      state.area << [13, 7]
    -** Processing line: ~      state.area << [13, 6]~
    +        walk(0.0, -1.0, 'herodown')
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -      state.area << [13, 6]
    -** Processing line: ~      state.area << [12, 6]~
    +      end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      state.area << [12, 6]
    -** Processing line: ~      state.area << [14, 6]~
    +
    +** Processing line: ~      check_gem_touching(@args.state.gem0_x, @args.state.gem0_y, @args.state.gem0)~
     - Inside source: true
     *** True Line Result
    -      state.area << [14, 6]
    -** Processing line: ~      state.area << [14, 5]~
    +      check_gem_touching(@args.state.gem0_x, @args.state.gem0_y, @args.state.gem0)
    +** Processing line: ~      check_gem_touching(@args.state.gem1_x, @args.state.gem1_y, @args.state.gem1)~
     - Inside source: true
     *** True Line Result
    -      state.area << [14, 5]
    -** Processing line: ~      state.area << [13, 5]~
    +      check_gem_touching(@args.state.gem1_x, @args.state.gem1_y, @args.state.gem1)
    +** Processing line: ~      check_gem_touching(@args.state.gem2_x, @args.state.gem2_y, @args.state.gem2)~
     - Inside source: true
     *** True Line Result
    -      state.area << [13, 5]
    -** Processing line: ~      state.area << [12, 5]~
    +      check_gem_touching(@args.state.gem2_x, @args.state.gem2_y, @args.state.gem2)
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      state.area << [12, 5]
    -** Processing line: ~      state.area << [12, 4]~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      state.area << [12, 4]
    -** Processing line: ~      state.area << [13, 4]~
    +
    +** Processing line: ~    def tick~
     - Inside source: true
     *** True Line Result
    -      state.area << [13, 4]
    -** Processing line: ~      state.area << [14, 4]~
    +    def tick
    +** Processing line: ~      input~
     - Inside source: true
     *** True Line Result
    -      state.area << [14, 4]
    -** Processing line: ~      state.area << [1, 6]~
    +      input
    +** Processing line: ~      calc~
     - Inside source: true
     *** True Line Result
    -      state.area << [1, 6]
    -** Processing line: ~      state.area << [6, 6]~
    +      calc
    +** Processing line: ~      render~
     - Inside source: true
     *** True Line Result
    -      state.area << [6, 6]
    +      render
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
         end
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Starts with an empty dungeon collection, and adds dungeon cells into it.~
    +** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
    -    # Starts with an empty dungeon collection, and adds dungeon cells into it.
    -** Processing line: ~    def derive_dungeon_from_area~
    +  def tick args
    +** Processing line: ~      args.state.game ||= Game.new args~
     - Inside source: true
     *** True Line Result
    -    def derive_dungeon_from_area
    -** Processing line: ~      state.dungeon = [] # starts as empty collection~
    +      args.state.game ||= Game.new args
    +** Processing line: ~      args.state.game.args = args~
     - Inside source: true
     *** True Line Result
    -      state.dungeon = [] # starts as empty collection
    -** Processing line: ~~
    +      args.state.game.args = args
    +** Processing line: ~      args.state.game.tick~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      state.area.each do |a| # for each element of the area collection~
    +      args.state.game.tick
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -      state.area.each do |a| # for each element of the area collection
    -** Processing line: ~        state.dungeon << state.new_entity(:dungeon_cell) do |d| # declares each dungeon cell as new entity~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        state.dungeon << state.new_entity(:dungeon_cell) do |d| # declares each dungeon cell as new entity
    -** Processing line: ~          d.x = a.x # dungeon cell position using coordinates from area~
    -- Inside source: true
    +
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
     *** True Line Result
    -          d.x = a.x # dungeon cell position using coordinates from area
    -** Processing line: ~          d.y = a.y~
    -- Inside source: true
    +#+end_src
    +** Processing line: ~~
    +- End of paragraph detected.
     *** True Line Result
    -          d.y = a.y
    -** Processing line: ~          d.is_visible = false # cell is not visible~
    -- Inside source: true
    +
    +** Processing line: ~*** Rpg Topdown - Topdown Starting Point - main.rb~
    +- Header detected.
     *** True Line Result
    -          d.is_visible = false # cell is not visible
    -** Processing line: ~          d.alpha = 0 # not transparent at all~
    +
    +*** True Line Result
    +*** Rpg Topdown - Topdown Starting Point - main.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/99_genre_rpg_topdown/topdown_starting_point/app/main.rb~
     - Inside source: true
     *** True Line Result
    -          d.alpha = 0 # not transparent at all
    -** Processing line: ~          d.border = [left_margin   + a.x * grid_size,~
    +  # ./samples/99_genre_rpg_topdown/topdown_starting_point/app/main.rb
    +** Processing line: ~  =begin~
     - Inside source: true
     *** True Line Result
    -          d.border = [left_margin   + a.x * grid_size,
    -** Processing line: ~                      bottom_margin + a.y * grid_size,~
    +  =begin
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -                      bottom_margin + a.y * grid_size,
    -** Processing line: ~                      grid_size,~
    +
    +** Processing line: ~   APIs listing that haven't been encountered in previous sample apps:~
     - Inside source: true
     *** True Line Result
    -                      grid_size,
    -** Processing line: ~                      grid_size,~
    +   APIs listing that haven't been encountered in previous sample apps:
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -                      grid_size,
    -** Processing line: ~                      *blue,~
    +
    +** Processing line: ~   - reverse: Returns a new string with the characters from original string in reverse order.~
     - Inside source: true
     *** True Line Result
    -                      *blue,
    -** Processing line: ~                      255] # sets border definition for dungeon cell~
    +   - reverse: Returns a new string with the characters from original string in reverse order.
    +** Processing line: ~     For example, the command~
     - Inside source: true
     *** True Line Result
    -                      255] # sets border definition for dungeon cell
    -** Processing line: ~          d # returns dungeon cell~
    +     For example, the command
    +** Processing line: ~     "dragonruby".reverse~
     - Inside source: true
     *** True Line Result
    -          d # returns dungeon cell
    -** Processing line: ~        end~
    +     "dragonruby".reverse
    +** Processing line: ~     would return the string~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~      end~
    +     would return the string
    +** Processing line: ~     "yburnogard".~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +     "yburnogard".
    +** Processing line: ~     Reverse is not only limited to strings, but can be applied to arrays and other collections.~
     - Inside source: true
     *** True Line Result
    -    end
    +     Reverse is not only limited to strings, but can be applied to arrays and other collections.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def left_margin~
    +** Processing line: ~   Reminders:~
     - Inside source: true
     *** True Line Result
    -    def left_margin
    -** Processing line: ~      40  # sets left margin~
    +   Reminders:
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      40  # sets left margin
    -** Processing line: ~    end~
    +
    +** Processing line: ~   - ARRAY#intersect_rect?: Returns true or false depending on if two rectangles intersect.~
     - Inside source: true
     *** True Line Result
    -    end
    +   - ARRAY#intersect_rect?: Returns true or false depending on if two rectangles intersect.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def bottom_margin~
    +** Processing line: ~   - args.outputs.labels: An array. The values generate a label.~
     - Inside source: true
     *** True Line Result
    -    def bottom_margin
    -** Processing line: ~      60 # sets bottom margin~
    +   - args.outputs.labels: An array. The values generate a label.
    +** Processing line: ~     The parameters are [X, Y, TEXT, SIZE, ALIGNMENT, RED, GREEN, BLUE, ALPHA, FONT STYLE]~
     - Inside source: true
     *** True Line Result
    -      60 # sets bottom margin
    -** Processing line: ~    end~
    +     The parameters are [X, Y, TEXT, SIZE, ALIGNMENT, RED, GREEN, BLUE, ALPHA, FONT STYLE]
    +** Processing line: ~     For more information about labels, go to mygame/documentation/02-labels.md.~
     - Inside source: true
     *** True Line Result
    -    end
    +     For more information about labels, go to mygame/documentation/02-labels.md.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def grid_size~
    +** Processing line: ~  =end~
     - Inside source: true
     *** True Line Result
    -    def grid_size
    -** Processing line: ~      40 # sets size of grid square~
    +  =end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      40 # sets size of grid square
    -** Processing line: ~    end~
    +
    +** Processing line: ~  # This code shows a maze and uses input from the keyboard to move the user around the screen.~
     - Inside source: true
     *** True Line Result
    -    end
    +  # This code shows a maze and uses input from the keyboard to move the user around the screen.
    +** Processing line: ~  # The objective is to reach the goal.~
    +- Inside source: true
    +*** True Line Result
    +  # The objective is to reach the goal.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Updates the line of sight by calling the thick_line_of_sight method and~
    +** Processing line: ~  # Sets values of tile size and player's movement speed~
     - Inside source: true
     *** True Line Result
    -    # Updates the line of sight by calling the thick_line_of_sight method and
    -** Processing line: ~    # adding dungeon cells to the newly_visible collection~
    +  # Sets values of tile size and player's movement speed
    +** Processing line: ~  # Also creates tile or box for player and generates map~
     - Inside source: true
     *** True Line Result
    -    # adding dungeon cells to the newly_visible collection
    -** Processing line: ~    def update_line_of_sight~
    +  # Also creates tile or box for player and generates map
    +** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
    -    def update_line_of_sight
    -** Processing line: ~      variations = [-1, 0, 1]~
    +  def tick args
    +** Processing line: ~    args.state.tile_size     = 80~
     - Inside source: true
     *** True Line Result
    -      variations = [-1, 0, 1]
    -** Processing line: ~      # creates collection of newly visible dungeon cells~
    +    args.state.tile_size     = 80
    +** Processing line: ~    args.state.player_speed  = 4~
     - Inside source: true
     *** True Line Result
    -      # creates collection of newly visible dungeon cells
    -** Processing line: ~      newly_visible = variations.product(variations).flat_map do |rise, run| # combo of all elements~
    +    args.state.player_speed  = 4
    +** Processing line: ~    args.state.player      ||= tile(args, 7, 3, 0, 128, 180)~
     - Inside source: true
     *** True Line Result
    -      newly_visible = variations.product(variations).flat_map do |rise, run| # combo of all elements
    -** Processing line: ~        thick_line_of_sight state.x, state.y, rise, run, 15, # calls thick_line_of_sight method~
    +    args.state.player      ||= tile(args, 7, 3, 0, 128, 180)
    +** Processing line: ~    generate_map args~
     - Inside source: true
     *** True Line Result
    -        thick_line_of_sight state.x, state.y, rise, run, 15, # calls thick_line_of_sight method
    -** Processing line: ~                            lambda { |x, y| dungeon_cell_exists? x, y } # checks whether or not cell exists~
    +    generate_map args
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -                            lambda { |x, y| dungeon_cell_exists? x, y } # checks whether or not cell exists
    -** Processing line: ~      end.uniq# removes duplicates~
    +
    +** Processing line: ~    # Adds walls, goal, and player to args.outputs.solids so they appear on screen~
     - Inside source: true
     *** True Line Result
    -      end.uniq# removes duplicates
    +    # Adds walls, goal, and player to args.outputs.solids so they appear on screen
    +** Processing line: ~    args.outputs.solids << args.state.walls~
    +- Inside source: true
    +*** True Line Result
    +    args.outputs.solids << args.state.walls
    +** Processing line: ~    args.outputs.solids << args.state.goal~
    +- Inside source: true
    +*** True Line Result
    +    args.outputs.solids << args.state.goal
    +** Processing line: ~    args.outputs.solids << args.state.player~
    +- Inside source: true
    +*** True Line Result
    +    args.outputs.solids << args.state.player
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      state.dungeon.each do |d| # perform action on each element of dungeons collection~
    +** Processing line: ~    # If player's box intersects with goal, a label is output onto the screen~
     - Inside source: true
     *** True Line Result
    -      state.dungeon.each do |d| # perform action on each element of dungeons collection
    -** Processing line: ~        d.is_visible = newly_visible.find { |v| v.x == d.x && v.y == d.y } # finds match inside newly_visible collection~
    +    # If player's box intersects with goal, a label is output onto the screen
    +** Processing line: ~    if args.state.player.intersect_rect? args.state.goal~
     - Inside source: true
     *** True Line Result
    -        d.is_visible = newly_visible.find { |v| v.x == d.x && v.y == d.y } # finds match inside newly_visible collection
    -** Processing line: ~      end~
    +    if args.state.player.intersect_rect? args.state.goal
    +** Processing line: ~      args.outputs.labels << [30, 720 - 30, "You're a wizard Harry!!"] # 30 pixels lower than top of screen~
     - Inside source: true
     *** True Line Result
    -      end
    +      args.outputs.labels << [30, 720 - 30, "You're a wizard Harry!!"] # 30 pixels lower than top of screen
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -145223,790 +151415,790 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    #Returns a boolean value~
    +** Processing line: ~    move_player args, -1,  0 if args.inputs.keyboard.left # x position decreases by 1 if left key is pressed~
     - Inside source: true
     *** True Line Result
    -    #Returns a boolean value
    -** Processing line: ~    def dungeon_cell_exists? x, y~
    +    move_player args, -1,  0 if args.inputs.keyboard.left # x position decreases by 1 if left key is pressed
    +** Processing line: ~    move_player args,  1,  0 if args.inputs.keyboard.right # x position increases by 1 if right key is pressed~
     - Inside source: true
     *** True Line Result
    -    def dungeon_cell_exists? x, y
    -** Processing line: ~      # Finds cell coordinates inside dungeon collection to determine if dungeon cell exists~
    +    move_player args,  1,  0 if args.inputs.keyboard.right # x position increases by 1 if right key is pressed
    +** Processing line: ~    move_player args,  0,  1 if args.inputs.keyboard.up # y position increases by 1 if up is pressed~
     - Inside source: true
     *** True Line Result
    -      # Finds cell coordinates inside dungeon collection to determine if dungeon cell exists
    -** Processing line: ~      state.dungeon.find { |d| d.x == x && d.y == y }~
    +    move_player args,  0,  1 if args.inputs.keyboard.up # y position increases by 1 if up is pressed
    +** Processing line: ~    move_player args,  0, -1 if args.inputs.keyboard.down # y position decreases by 1 if down is pressed~
     - Inside source: true
     *** True Line Result
    -      state.dungeon.find { |d| d.x == x && d.y == y }
    -** Processing line: ~    end~
    +    move_player args,  0, -1 if args.inputs.keyboard.down # y position decreases by 1 if down is pressed
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    end
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Calls line_of_sight method to add elements to result collection~
    +** Processing line: ~  # Sets position, size, and color of the tile~
     - Inside source: true
     *** True Line Result
    -    # Calls line_of_sight method to add elements to result collection
    -** Processing line: ~    def thick_line_of_sight start_x, start_y, rise, run, distance, cell_exists_lambda~
    +  # Sets position, size, and color of the tile
    +** Processing line: ~  def tile args, x, y, *color~
     - Inside source: true
     *** True Line Result
    -    def thick_line_of_sight start_x, start_y, rise, run, distance, cell_exists_lambda
    -** Processing line: ~      result = []~
    +  def tile args, x, y, *color
    +** Processing line: ~    [x * args.state.tile_size, # sets definition for array using method parameters~
     - Inside source: true
     *** True Line Result
    -      result = []
    -** Processing line: ~      result += line_of_sight start_x, start_y, rise, run, distance, cell_exists_lambda~
    +    [x * args.state.tile_size, # sets definition for array using method parameters
    +** Processing line: ~     y * args.state.tile_size, # multiplying by tile_size sets x and y to correct position using pixel values~
     - Inside source: true
     *** True Line Result
    -      result += line_of_sight start_x, start_y, rise, run, distance, cell_exists_lambda
    -** Processing line: ~      result += line_of_sight start_x - 1, start_y, rise, run, distance, cell_exists_lambda # one left~
    +     y * args.state.tile_size, # multiplying by tile_size sets x and y to correct position using pixel values
    +** Processing line: ~     args.state.tile_size,~
     - Inside source: true
     *** True Line Result
    -      result += line_of_sight start_x - 1, start_y, rise, run, distance, cell_exists_lambda # one left
    -** Processing line: ~      result += line_of_sight start_x + 1, start_y, rise, run, distance, cell_exists_lambda # one right~
    +     args.state.tile_size,
    +** Processing line: ~     args.state.tile_size,~
     - Inside source: true
     *** True Line Result
    -      result += line_of_sight start_x + 1, start_y, rise, run, distance, cell_exists_lambda # one right
    -** Processing line: ~      result~
    +     args.state.tile_size,
    +** Processing line: ~     *color]~
     - Inside source: true
     *** True Line Result
    -      result
    -** Processing line: ~    end~
    +     *color]
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    end
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Adds points to the result collection to create the player's line of sight~
    +** Processing line: ~  # Creates map by adding tiles to the wall, as well as a goal (that the player needs to reach)~
     - Inside source: true
     *** True Line Result
    -    # Adds points to the result collection to create the player's line of sight
    -** Processing line: ~    def line_of_sight start_x, start_y, rise, run, distance, cell_exists_lambda~
    +  # Creates map by adding tiles to the wall, as well as a goal (that the player needs to reach)
    +** Processing line: ~  def generate_map args~
     - Inside source: true
     *** True Line Result
    -    def line_of_sight start_x, start_y, rise, run, distance, cell_exists_lambda
    -** Processing line: ~      result = [] # starts as empty collection~
    +  def generate_map args
    +** Processing line: ~    return if args.state.area~
     - Inside source: true
     *** True Line Result
    -      result = [] # starts as empty collection
    -** Processing line: ~      points = points_on_line start_x, start_y, rise, run, distance # calls points_on_line method~
    +    return if args.state.area
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      points = points_on_line start_x, start_y, rise, run, distance # calls points_on_line method
    -** Processing line: ~      points.each do |p| # for each point in collection~
    +
    +** Processing line: ~    # Creates the area of the map. There are 9 rows running horizontally across the screen~
     - Inside source: true
     *** True Line Result
    -      points.each do |p| # for each point in collection
    -** Processing line: ~        if cell_exists_lambda.call(p.x, p.y) # if the cell exists~
    +    # Creates the area of the map. There are 9 rows running horizontally across the screen
    +** Processing line: ~    # and 16 columns running vertically on the screen. Any spot with a "1" is not~
     - Inside source: true
     *** True Line Result
    -        if cell_exists_lambda.call(p.x, p.y) # if the cell exists
    -** Processing line: ~          result << p # add it to result collection~
    +    # and 16 columns running vertically on the screen. Any spot with a "1" is not
    +** Processing line: ~    # open for the player to move into (and is green), and any spot with a "0" is available~
     - Inside source: true
     *** True Line Result
    -          result << p # add it to result collection
    -** Processing line: ~        else # if cell does not exist~
    +    # open for the player to move into (and is green), and any spot with a "0" is available
    +** Processing line: ~    # for the player to move in.~
     - Inside source: true
     *** True Line Result
    -        else # if cell does not exist
    -** Processing line: ~          return result # return result collection as it is~
    +    # for the player to move in.
    +** Processing line: ~    args.state.area = [~
     - Inside source: true
     *** True Line Result
    -          return result # return result collection as it is
    -** Processing line: ~        end~
    +    args.state.area = [
    +** Processing line: ~      [1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1,],~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~      end~
    +      [1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1,],
    +** Processing line: ~      [1, 1, 1, 2, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1,], # the "2" represents the goal~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~~
    +      [1, 1, 1, 2, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1,], # the "2" represents the goal
    +** Processing line: ~      [1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1,],~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      result # return result collection~
    +      [1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1,],
    +** Processing line: ~      [1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1,],~
     - Inside source: true
     *** True Line Result
    -      result # return result collection
    -** Processing line: ~    end~
    +      [1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1,],
    +** Processing line: ~      [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,],~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +      [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,],
    +** Processing line: ~      [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1,],~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # Finds the coordinates of the points on the line by performing calculations~
    +      [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1,],
    +** Processing line: ~      [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1,],~
     - Inside source: true
     *** True Line Result
    -    # Finds the coordinates of the points on the line by performing calculations
    -** Processing line: ~    def points_on_line start_x, start_y, rise, run, distance~
    +      [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1,],
    +** Processing line: ~      [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,],~
     - Inside source: true
     *** True Line Result
    -    def points_on_line start_x, start_y, rise, run, distance
    -** Processing line: ~      distance.times.map do |i| # perform an action~
    +      [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,],
    +** Processing line: ~      [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ],~
     - Inside source: true
     *** True Line Result
    -      distance.times.map do |i| # perform an action
    -** Processing line: ~        [start_x + run * i, start_y + rise * i] # definition of point~
    +      [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ],
    +** Processing line: ~    ].reverse # reverses the order of the area collection~
     - Inside source: true
     *** True Line Result
    -        [start_x + run * i, start_y + rise * i] # definition of point
    -** Processing line: ~      end~
    +    ].reverse # reverses the order of the area collection
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +
    +** Processing line: ~    # By reversing the order, the way that the area appears above is how it appears~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +    # By reversing the order, the way that the area appears above is how it appears
    +** Processing line: ~    # on the screen in the game. If we did not reverse, the map would appear inverted.~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def render_canvas~
    +    # on the screen in the game. If we did not reverse, the map would appear inverted.
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    def render_canvas
    -** Processing line: ~      return~
    +
    +** Processing line: ~    #The wall starts off with no tiles.~
     - Inside source: true
     *** True Line Result
    -      return
    -** Processing line: ~      outputs.borders << state.canvas.map do |c| # on each element of canvas collection~
    +    #The wall starts off with no tiles.
    +** Processing line: ~    args.state.walls = []~
     - Inside source: true
     *** True Line Result
    -      outputs.borders << state.canvas.map do |c| # on each element of canvas collection
    -** Processing line: ~        c.border # outputs border~
    +    args.state.walls = []
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        c.border # outputs border
    -** Processing line: ~      end~
    +
    +** Processing line: ~    # If v is 1, a green tile is added to args.state.walls.~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +    # If v is 1, a green tile is added to args.state.walls.
    +** Processing line: ~    # If v is 2, a black tile is created as the goal.~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +    # If v is 2, a black tile is created as the goal.
    +** Processing line: ~    args.state.area.map_2d do |y, x, v|~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # Outputs the dungeon cells.~
    +    args.state.area.map_2d do |y, x, v|
    +** Processing line: ~      if    v == 1~
     - Inside source: true
     *** True Line Result
    -    # Outputs the dungeon cells.
    -** Processing line: ~    def render_dungeon~
    +      if    v == 1
    +** Processing line: ~        args.state.walls << tile(args, x, y, 0, 255, 0) # green tile~
     - Inside source: true
     *** True Line Result
    -    def render_dungeon
    -** Processing line: ~      outputs.solids << [0, 0, grid.w, grid.h] # outputs black background for grid~
    +        args.state.walls << tile(args, x, y, 0, 255, 0) # green tile
    +** Processing line: ~      elsif v == 2 # notice there is only one "2" above because there is only one single goal~
     - Inside source: true
     *** True Line Result
    -      outputs.solids << [0, 0, grid.w, grid.h] # outputs black background for grid
    -** Processing line: ~~
    +      elsif v == 2 # notice there is only one "2" above because there is only one single goal
    +** Processing line: ~        args.state.goal   = tile(args, x, y, 0,   0, 0) # black tile~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      # Sets the alpha value (opacity) for each dungeon cell and calls the cell_border method.~
    +        args.state.goal   = tile(args, x, y, 0,   0, 0) # black tile
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -      # Sets the alpha value (opacity) for each dungeon cell and calls the cell_border method.
    -** Processing line: ~      outputs.borders << state.dungeon.map do |d| # for each element in dungeon collection~
    +      end
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -      outputs.borders << state.dungeon.map do |d| # for each element in dungeon collection
    -** Processing line: ~        d.alpha += if d.is_visible # if cell is visible~
    +    end
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -        d.alpha += if d.is_visible # if cell is visible
    -** Processing line: ~                   255.fdiv(30) # increment opacity (transparency)~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -                   255.fdiv(30) # increment opacity (transparency)
    -** Processing line: ~                 else # if cell is not visible~
    +
    +** Processing line: ~  # Allows the player to move their box around the screen~
     - Inside source: true
     *** True Line Result
    -                 else # if cell is not visible
    -** Processing line: ~                   255.fdiv(600) * -1 # decrease opacity~
    +  # Allows the player to move their box around the screen
    +** Processing line: ~  def move_player args, *vector~
     - Inside source: true
     *** True Line Result
    -                   255.fdiv(600) * -1 # decrease opacity
    -** Processing line: ~                 end~
    +  def move_player args, *vector
    +** Processing line: ~    box = args.state.player.shift_rect(vector) # box is able to move at an angle~
     - Inside source: true
     *** True Line Result
    -                 end
    -** Processing line: ~        d.alpha = d.alpha.cap_min_max(0, 255)~
    +    box = args.state.player.shift_rect(vector) # box is able to move at an angle
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        d.alpha = d.alpha.cap_min_max(0, 255)
    -** Processing line: ~        cell_border d.x, d.y, [*blue, d.alpha] # sets blue border using alpha value~
    +
    +** Processing line: ~    # If the player's box hits a wall, it is not able to move further in that direction~
     - Inside source: true
     *** True Line Result
    -        cell_border d.x, d.y, [*blue, d.alpha] # sets blue border using alpha value
    -** Processing line: ~      end.reject_nil~
    +    # If the player's box hits a wall, it is not able to move further in that direction
    +** Processing line: ~    return if args.state.walls~
     - Inside source: true
     *** True Line Result
    -      end.reject_nil
    -** Processing line: ~    end~
    +    return if args.state.walls
    +** Processing line: ~                  .any_intersect_rect?(box)~
     - Inside source: true
     *** True Line Result
    -    end
    +                  .any_intersect_rect?(box)
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Sets definition of a cell border using the parameters~
    +** Processing line: ~    # Player's box is able to move at angles (not just the four general directions) fast~
     - Inside source: true
     *** True Line Result
    -    # Sets definition of a cell border using the parameters
    -** Processing line: ~    def cell_border x, y, color = nil~
    +    # Player's box is able to move at angles (not just the four general directions) fast
    +** Processing line: ~    args.state.player =~
     - Inside source: true
     *** True Line Result
    -    def cell_border x, y, color = nil
    -** Processing line: ~      [left_margin   + x * grid_size,~
    +    args.state.player =
    +** Processing line: ~      args.state.player~
     - Inside source: true
     *** True Line Result
    -      [left_margin   + x * grid_size,
    -** Processing line: ~      bottom_margin + y * grid_size,~
    +      args.state.player
    +** Processing line: ~          .shift_rect(vector.x * args.state.player_speed, # if we don't multiply by speed, then~
     - Inside source: true
     *** True Line Result
    -      bottom_margin + y * grid_size,
    -** Processing line: ~      grid_size,~
    +          .shift_rect(vector.x * args.state.player_speed, # if we don't multiply by speed, then
    +** Processing line: ~                      vector.y * args.state.player_speed) # the box will move extremely slow~
     - Inside source: true
     *** True Line Result
    -      grid_size,
    -** Processing line: ~      grid_size,~
    +                      vector.y * args.state.player_speed) # the box will move extremely slow
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -      grid_size,
    -** Processing line: ~      *color]~
    +  end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      *color]
    -** Processing line: ~    end~
    -- Inside source: true
    +
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
     *** True Line Result
    -    end
    +#+end_src
     ** Processing line: ~~
    -- Inside source: true
    +- End of paragraph detected.
     *** True Line Result
     
    -** Processing line: ~    # Sets the values for the player and outputs it as a label~
    +** Processing line: ~*** Teenytiny - Teenytiny Starting Point - main.rb~
    +- Header detected.
    +*** True Line Result
    +
    +*** True Line Result
    +*** Teenytiny - Teenytiny Starting Point - main.rb
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/99_genre_teenytiny/teenytiny_starting_point/app/main.rb~
     - Inside source: true
     *** True Line Result
    -    # Sets the values for the player and outputs it as a label
    -** Processing line: ~    def render_player~
    +  # ./samples/99_genre_teenytiny/teenytiny_starting_point/app/main.rb
    +** Processing line: ~  # full documenation is at http://docs.dragonruby.org~
     - Inside source: true
     *** True Line Result
    -    def render_player
    -** Processing line: ~      outputs.labels << [grid_x(state.x) + 20, # positions "@" text in center of grid square~
    +  # full documenation is at http://docs.dragonruby.org
    +** Processing line: ~  # be sure to come to the discord if you hit any snags: http://discord.dragonruby.org~
     - Inside source: true
     *** True Line Result
    -      outputs.labels << [grid_x(state.x) + 20, # positions "@" text in center of grid square
    -** Processing line: ~                       grid_y(state.y) + 35,~
    +  # be sure to come to the discord if you hit any snags: http://discord.dragonruby.org
    +** Processing line: ~  def tick args~
     - Inside source: true
     *** True Line Result
    -                       grid_y(state.y) + 35,
    -** Processing line: ~                       "@", # player is represented by a white "@" character~
    +  def tick args
    +** Processing line: ~    # ====================================================~
     - Inside source: true
     *** True Line Result
    -                       "@", # player is represented by a white "@" character
    -** Processing line: ~                       1, 1, *white]~
    +    # ====================================================
    +** Processing line: ~    # initialize default variables~
     - Inside source: true
     *** True Line Result
    -                       1, 1, *white]
    -** Processing line: ~    end~
    +    # initialize default variables
    +** Processing line: ~    # ====================================================~
     - Inside source: true
     *** True Line Result
    -    end
    +    # ====================================================
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def grid_x x~
    +** Processing line: ~    # ruby has an operator called ||= which means "only initialize this if it's nil"~
     - Inside source: true
     *** True Line Result
    -    def grid_x x
    -** Processing line: ~      left_margin + x * grid_size # positions horizontally on grid~
    +    # ruby has an operator called ||= which means "only initialize this if it's nil"
    +** Processing line: ~    args.state.count_down   ||= 20 * 60 # set the count down to 20 seconds~
     - Inside source: true
     *** True Line Result
    -      left_margin + x * grid_size # positions horizontally on grid
    -** Processing line: ~    end~
    +    args.state.count_down   ||= 20 * 60 # set the count down to 20 seconds
    +** Processing line: ~    # set the initial position of the target~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +    # set the initial position of the target
    +** Processing line: ~    args.state.target       ||= { x: args.grid.w.half,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def grid_y y~
    +    args.state.target       ||= { x: args.grid.w.half,
    +** Processing line: ~                                  y: args.grid.h.half,~
     - Inside source: true
     *** True Line Result
    -    def grid_y y
    -** Processing line: ~      bottom_margin + y * grid_size # positions vertically on grid~
    +                                  y: args.grid.h.half,
    +** Processing line: ~                                  w: 20,~
     - Inside source: true
     *** True Line Result
    -      bottom_margin + y * grid_size # positions vertically on grid
    -** Processing line: ~    end~
    +                                  w: 20,
    +** Processing line: ~                                  h: 20 }~
     - Inside source: true
     *** True Line Result
    -    end
    +                                  h: 20 }
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Outputs enemies onto the screen.~
    +** Processing line: ~    # set the initial position of the player~
     - Inside source: true
     *** True Line Result
    -    # Outputs enemies onto the screen.
    -** Processing line: ~    def render_enemies~
    +    # set the initial position of the player
    +** Processing line: ~    args.state.player       ||= { x: 50,~
     - Inside source: true
     *** True Line Result
    -    def render_enemies
    -** Processing line: ~      state.enemies.map do |e| # for each enemy in the collection~
    +    args.state.player       ||= { x: 50,
    +** Processing line: ~                                  y: 50,~
     - Inside source: true
     *** True Line Result
    -      state.enemies.map do |e| # for each enemy in the collection
    -** Processing line: ~        alpha = 255 # set opacity (full transparency)~
    +                                  y: 50,
    +** Processing line: ~                                  w: 20,~
     - Inside source: true
     *** True Line Result
    -        alpha = 255 # set opacity (full transparency)
    +                                  w: 20,
    +** Processing line: ~                                  h: 20 }~
    +- Inside source: true
    +*** True Line Result
    +                                  h: 20 }
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~        # Outputs an enemy using a label.~
    +** Processing line: ~    # set the player movement speed~
     - Inside source: true
     *** True Line Result
    -        # Outputs an enemy using a label.
    -** Processing line: ~        outputs.labels << [~
    +    # set the player movement speed
    +** Processing line: ~    args.state.player_speed ||= 5~
     - Inside source: true
     *** True Line Result
    -        outputs.labels << [
    -** Processing line: ~                     left_margin + 20 +  e.x * grid_size, # positions enemy's "r" text in center of grid square~
    +    args.state.player_speed ||= 5
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -                     left_margin + 20 +  e.x * grid_size, # positions enemy's "r" text in center of grid square
    -** Processing line: ~                     bottom_margin + 35 + e.y * grid_size,~
    +
    +** Processing line: ~    # set the score~
     - Inside source: true
     *** True Line Result
    -                     bottom_margin + 35 + e.y * grid_size,
    -** Processing line: ~                     "r", # enemy's text~
    +    # set the score
    +** Processing line: ~    args.state.score        ||= 0~
     - Inside source: true
     *** True Line Result
    -                     "r", # enemy's text
    -** Processing line: ~                     1, 1, *white, alpha]~
    +    args.state.score        ||= 0
    +** Processing line: ~    args.state.teleports    ||= 3~
     - Inside source: true
     *** True Line Result
    -                     1, 1, *white, alpha]
    +    args.state.teleports    ||= 3
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~        # Creates a red border around an enemy.~
    -- Inside source: true
    -*** True Line Result
    -        # Creates a red border around an enemy.
    -** Processing line: ~        outputs.borders << [grid_x(e.x), grid_y(e.y), grid_size, grid_size, *red]~
    -- Inside source: true
    -*** True Line Result
    -        outputs.borders << [grid_x(e.x), grid_y(e.y), grid_size, grid_size, *red]
    -** Processing line: ~      end~
    +** Processing line: ~    # set the instructions~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +    # set the instructions
    +** Processing line: ~    args.state.instructions ||= "Get to the red goal! Use arrow keys to move. Spacebar to teleport (use them carefully)!"~
     - Inside source: true
     *** True Line Result
    -    end
    +    args.state.instructions ||= "Get to the red goal! Use arrow keys to move. Spacebar to teleport (use them carefully)!"
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    #White labels are output for the cell coordinates of each element in the dungeon collection.~
    -- Inside source: true
    -*** True Line Result
    -    #White labels are output for the cell coordinates of each element in the dungeon collection.
    -** Processing line: ~    def print_cell_coordinates~
    -- Inside source: true
    -*** True Line Result
    -    def print_cell_coordinates
    -** Processing line: ~      return unless state.debug~
    +** Processing line: ~    # ====================================================~
     - Inside source: true
     *** True Line Result
    -      return unless state.debug
    -** Processing line: ~      state.dungeon.each do |d|~
    +    # ====================================================
    +** Processing line: ~    # render the game~
     - Inside source: true
     *** True Line Result
    -      state.dungeon.each do |d|
    -** Processing line: ~        outputs.labels << [grid_x(d.x) + 2,~
    +    # render the game
    +** Processing line: ~    # ====================================================~
     - Inside source: true
     *** True Line Result
    -        outputs.labels << [grid_x(d.x) + 2,
    -** Processing line: ~                           grid_y(d.y) - 2,~
    +    # ====================================================
    +** Processing line: ~    args.outputs.labels  << { x: args.grid.w.half, y: args.grid.h - 10,~
     - Inside source: true
     *** True Line Result
    -                           grid_y(d.y) - 2,
    -** Processing line: ~                           "#{d.x},#{d.y}",~
    +    args.outputs.labels  << { x: args.grid.w.half, y: args.grid.h - 10,
    +** Processing line: ~                              text: args.state.instructions,~
     - Inside source: true
     *** True Line Result
    -                           "#{d.x},#{d.y}",
    -** Processing line: ~                           -2, 0, *white]~
    +                              text: args.state.instructions,
    +** Processing line: ~                              alignment_enum: 1 }~
     - Inside source: true
     *** True Line Result
    -                           -2, 0, *white]
    -** Processing line: ~      end~
    +                              alignment_enum: 1 }
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +
    +** Processing line: ~    # check if it's game over. if so, then render game over~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +    # check if it's game over. if so, then render game over
    +** Processing line: ~    # otherwise render the current time left~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # Adds new elements into the canvas collection and sets their values.~
    +    # otherwise render the current time left
    +** Processing line: ~    if game_over? args~
     - Inside source: true
     *** True Line Result
    -    # Adds new elements into the canvas collection and sets their values.
    -** Processing line: ~    def calc_canvas~
    +    if game_over? args
    +** Processing line: ~      args.outputs.labels  << { x: args.grid.w.half,~
     - Inside source: true
     *** True Line Result
    -    def calc_canvas
    -** Processing line: ~      return if state.canvas.length > 0 # return if canvas collection has at least one element~
    +      args.outputs.labels  << { x: args.grid.w.half,
    +** Processing line: ~                                y: args.grid.h - 40,~
     - Inside source: true
     *** True Line Result
    -      return if state.canvas.length > 0 # return if canvas collection has at least one element
    -** Processing line: ~      15.times do |x| # 15 times perform an action~
    +                                y: args.grid.h - 40,
    +** Processing line: ~                                text: "game over! (press r to start over)",~
     - Inside source: true
     *** True Line Result
    -      15.times do |x| # 15 times perform an action
    -** Processing line: ~        15.times do |y|~
    +                                text: "game over! (press r to start over)",
    +** Processing line: ~                                alignment_enum: 1 }~
     - Inside source: true
     *** True Line Result
    -        15.times do |y|
    -** Processing line: ~          state.canvas << state.new_entity(:canvas) do |c| # declare canvas element as new entity~
    +                                alignment_enum: 1 }
    +** Processing line: ~    else~
     - Inside source: true
     *** True Line Result
    -          state.canvas << state.new_entity(:canvas) do |c| # declare canvas element as new entity
    -** Processing line: ~            c.x = x # set position~
    +    else
    +** Processing line: ~      args.outputs.labels  << { x: args.grid.w.half,~
     - Inside source: true
     *** True Line Result
    -            c.x = x # set position
    -** Processing line: ~            c.y = y~
    +      args.outputs.labels  << { x: args.grid.w.half,
    +** Processing line: ~                                y: args.grid.h - 40,~
     - Inside source: true
     *** True Line Result
    -            c.y = y
    -** Processing line: ~            c.border = [left_margin   + x * grid_size,~
    +                                y: args.grid.h - 40,
    +** Processing line: ~                                text: "time left: #{(args.state.count_down.idiv 60) + 1}",~
     - Inside source: true
     *** True Line Result
    -            c.border = [left_margin   + x * grid_size,
    -** Processing line: ~                        bottom_margin + y * grid_size,~
    +                                text: "time left: #{(args.state.count_down.idiv 60) + 1}",
    +** Processing line: ~                                alignment_enum: 1 }~
     - Inside source: true
     *** True Line Result
    -                        bottom_margin + y * grid_size,
    -** Processing line: ~                        grid_size,~
    +                                alignment_enum: 1 }
    +** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    -                        grid_size,
    -** Processing line: ~                        grid_size,~
    +    end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -                        grid_size,
    -** Processing line: ~                        *white, 30] # sets border definition~
    +
    +** Processing line: ~    # render the score~
     - Inside source: true
     *** True Line Result
    -                        *white, 30] # sets border definition
    -** Processing line: ~          end~
    +    # render the score
    +** Processing line: ~    args.outputs.labels  << { x: args.grid.w.half,~
     - Inside source: true
     *** True Line Result
    -          end
    -** Processing line: ~        end~
    +    args.outputs.labels  << { x: args.grid.w.half,
    +** Processing line: ~                              y: args.grid.h - 70,~
     - Inside source: true
     *** True Line Result
    -        end
    -** Processing line: ~      end~
    +                              y: args.grid.h - 70,
    +** Processing line: ~                              text: "score: #{args.state.score}",~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +                              text: "score: #{args.state.score}",
    +** Processing line: ~                              alignment_enum: 1 }~
     - Inside source: true
     *** True Line Result
    -    end
    +                              alignment_enum: 1 }
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Updates x and y values of the player, and updates player's line of sight~
    +** Processing line: ~    # render the player with teleport count~
     - Inside source: true
     *** True Line Result
    -    # Updates x and y values of the player, and updates player's line of sight
    -** Processing line: ~    def input_move~
    +    # render the player with teleport count
    +** Processing line: ~    args.outputs.sprites << { x: args.state.player.x,~
     - Inside source: true
     *** True Line Result
    -    def input_move
    -** Processing line: ~      x, y, x_diff, y_diff = input_target_cell~
    +    args.outputs.sprites << { x: args.state.player.x,
    +** Processing line: ~                              y: args.state.player.y,~
     - Inside source: true
     *** True Line Result
    -      x, y, x_diff, y_diff = input_target_cell
    -** Processing line: ~~
    +                              y: args.state.player.y,
    +** Processing line: ~                              w: args.state.player.w,~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~      return unless dungeon_cell_exists? x, y # player can't move there if a dungeon cell doesn't exist in that location~
    +                              w: args.state.player.w,
    +** Processing line: ~                              h: args.state.player.h,~
     - Inside source: true
     *** True Line Result
    -      return unless dungeon_cell_exists? x, y # player can't move there if a dungeon cell doesn't exist in that location
    -** Processing line: ~      return if enemy_at x, y # player can't move there if there is an enemy in that location~
    +                              h: args.state.player.h,
    +** Processing line: ~                              path: 'sprites/square-green.png' }~
     - Inside source: true
     *** True Line Result
    -      return if enemy_at x, y # player can't move there if there is an enemy in that location
    +                              path: 'sprites/square-green.png' }
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~      state.x += x_diff # increments x by x_diff (so player moves left or right)~
    +** Processing line: ~    args.outputs.labels << { x: args.state.player.x + 10,~
     - Inside source: true
     *** True Line Result
    -      state.x += x_diff # increments x by x_diff (so player moves left or right)
    -** Processing line: ~      state.y += y_diff # same with y and y_diff ( so player moves up or down)~
    +    args.outputs.labels << { x: args.state.player.x + 10,
    +** Processing line: ~                             y: args.state.player.y + 40,~
     - Inside source: true
     *** True Line Result
    -      state.y += y_diff # same with y and y_diff ( so player moves up or down)
    -** Processing line: ~      update_line_of_sight # updates visible cells~
    +                             y: args.state.player.y + 40,
    +** Processing line: ~                             text: "teleports: #{args.state.teleports}",~
     - Inside source: true
     *** True Line Result
    -      update_line_of_sight # updates visible cells
    -** Processing line: ~    end~
    +                             text: "teleports: #{args.state.teleports}",
    +** Processing line: ~                             alignment_enum: 1, size_enum: -2 }~
     - Inside source: true
     *** True Line Result
    -    end
    +                             alignment_enum: 1, size_enum: -2 }
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def enemy_at x, y~
    +** Processing line: ~    # render the target~
     - Inside source: true
     *** True Line Result
    -    def enemy_at x, y
    -** Processing line: ~      # Finds if coordinates exist in enemies collection and enemy is not dead~
    +    # render the target
    +** Processing line: ~    args.outputs.sprites << { x: args.state.target.x,~
     - Inside source: true
     *** True Line Result
    -      # Finds if coordinates exist in enemies collection and enemy is not dead
    -** Processing line: ~      state.enemies.find { |e| e.x == x && e.y == y && !e.is_dead }~
    +    args.outputs.sprites << { x: args.state.target.x,
    +** Processing line: ~                              y: args.state.target.y,~
     - Inside source: true
     *** True Line Result
    -      state.enemies.find { |e| e.x == x && e.y == y && !e.is_dead }
    -** Processing line: ~    end~
    +                              y: args.state.target.y,
    +** Processing line: ~                              w: args.state.target.w,~
     - Inside source: true
     *** True Line Result
    -    end
    +                              w: args.state.target.w,
    +** Processing line: ~                              h: args.state.target.h,~
    +- Inside source: true
    +*** True Line Result
    +                              h: args.state.target.h,
    +** Processing line: ~                              path: 'sprites/square-red.png' }~
    +- Inside source: true
    +*** True Line Result
    +                              path: 'sprites/square-red.png' }
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    #M oves the user based on their keyboard input and sets values for target cell~
    +** Processing line: ~    # ====================================================~
     - Inside source: true
     *** True Line Result
    -    #M oves the user based on their keyboard input and sets values for target cell
    -** Processing line: ~    def input_target_cell~
    +    # ====================================================
    +** Processing line: ~    # run simulation~
     - Inside source: true
     *** True Line Result
    -    def input_target_cell
    -** Processing line: ~      if inputs.keyboard.key_down.up # if "up" key is in "down" state~
    +    # run simulation
    +** Processing line: ~    # ====================================================~
     - Inside source: true
     *** True Line Result
    -      if inputs.keyboard.key_down.up # if "up" key is in "down" state
    -** Processing line: ~        [state.x, state.y + 1,  0,  1] # user moves up~
    +    # ====================================================
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        [state.x, state.y + 1,  0,  1] # user moves up
    -** Processing line: ~      elsif inputs.keyboard.key_down.down # if "down" key is pressed~
    +
    +** Processing line: ~    # count down calculation~
     - Inside source: true
     *** True Line Result
    -      elsif inputs.keyboard.key_down.down # if "down" key is pressed
    -** Processing line: ~        [state.x, state.y - 1,  0, -1] # user moves down~
    +    # count down calculation
    +** Processing line: ~    args.state.count_down -= 1~
     - Inside source: true
     *** True Line Result
    -        [state.x, state.y - 1,  0, -1] # user moves down
    -** Processing line: ~      elsif inputs.keyboard.key_down.left # if "left" key is pressed~
    +    args.state.count_down -= 1
    +** Processing line: ~    args.state.count_down = -1 if args.state.count_down < -1~
     - Inside source: true
     *** True Line Result
    -      elsif inputs.keyboard.key_down.left # if "left" key is pressed
    -** Processing line: ~        [state.x - 1, state.y, -1,  0] # user moves left~
    +    args.state.count_down = -1 if args.state.count_down < -1
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -        [state.x - 1, state.y, -1,  0] # user moves left
    -** Processing line: ~      elsif inputs.keyboard.key_down.right # if "right" key is pressed~
    +
    +** Processing line: ~    # ====================================================~
     - Inside source: true
     *** True Line Result
    -      elsif inputs.keyboard.key_down.right # if "right" key is pressed
    -** Processing line: ~        [state.x + 1, state.y,  1,  0] # user moves right~
    +    # ====================================================
    +** Processing line: ~    # process player input~
     - Inside source: true
     *** True Line Result
    -        [state.x + 1, state.y,  1,  0] # user moves right
    -** Processing line: ~      else~
    +    # process player input
    +** Processing line: ~    # ====================================================~
     - Inside source: true
     *** True Line Result
    -      else
    -** Processing line: ~        nil  # otherwise, empty~
    +    # ====================================================
    +** Processing line: ~    # if it isn't game over let them move~
     - Inside source: true
     *** True Line Result
    -        nil  # otherwise, empty
    -** Processing line: ~      end~
    +    # if it isn't game over let them move
    +** Processing line: ~    if !game_over? args~
     - Inside source: true
     *** True Line Result
    -      end
    -** Processing line: ~    end~
    +    if !game_over? args
    +** Processing line: ~      dir_y = 0~
     - Inside source: true
     *** True Line Result
    -    end
    +      dir_y = 0
    +** Processing line: ~      dir_x = 0~
    +- Inside source: true
    +*** True Line Result
    +      dir_x = 0
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Goes through the canvas collection to find if the mouse was clicked inside of the borders of an element.~
    +** Processing line: ~      # determine the change horizontally~
     - Inside source: true
     *** True Line Result
    -    # Goes through the canvas collection to find if the mouse was clicked inside of the borders of an element.
    -** Processing line: ~    def input_click_map~
    +      # determine the change horizontally
    +** Processing line: ~      if args.inputs.keyboard.up~
     - Inside source: true
     *** True Line Result
    -    def input_click_map
    -** Processing line: ~      return unless inputs.mouse.click # return unless the mouse is clicked~
    +      if args.inputs.keyboard.up
    +** Processing line: ~        dir_y += args.state.player_speed~
     - Inside source: true
     *** True Line Result
    -      return unless inputs.mouse.click # return unless the mouse is clicked
    -** Processing line: ~      canvas_entry = state.canvas.find do |c| # find element from canvas collection that meets requirements~
    +        dir_y += args.state.player_speed
    +** Processing line: ~      elsif args.inputs.keyboard.down~
     - Inside source: true
     *** True Line Result
    -      canvas_entry = state.canvas.find do |c| # find element from canvas collection that meets requirements
    -** Processing line: ~        inputs.mouse.click.inside_rect? c.border # find border that mouse was clicked inside of~
    +      elsif args.inputs.keyboard.down
    +** Processing line: ~        dir_y -= args.state.player_speed~
     - Inside source: true
     *** True Line Result
    -        inputs.mouse.click.inside_rect? c.border # find border that mouse was clicked inside of
    +        dir_y -= args.state.player_speed
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
           end
    -** Processing line: ~      puts canvas_entry # prints canvas_entry value~
    -- Inside source: true
    -*** True Line Result
    -      puts canvas_entry # prints canvas_entry value
    -** Processing line: ~    end~
    -- Inside source: true
    -*** True Line Result
    -    end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Sets the definition of a label using the parameters.~
    +** Processing line: ~      # determine the change vertically~
     - Inside source: true
     *** True Line Result
    -    # Sets the definition of a label using the parameters.
    -** Processing line: ~    def label text, x, y, color = nil~
    +      # determine the change vertically
    +** Processing line: ~      if args.inputs.keyboard.left~
     - Inside source: true
     *** True Line Result
    -    def label text, x, y, color = nil
    -** Processing line: ~      color ||= white # color is initialized to white~
    +      if args.inputs.keyboard.left
    +** Processing line: ~        dir_x -= args.state.player_speed~
     - Inside source: true
     *** True Line Result
    -      color ||= white # color is initialized to white
    -** Processing line: ~      [x, y, text, 1, 1, *color] # sets label definition~
    +        dir_x -= args.state.player_speed
    +** Processing line: ~      elsif args.inputs.keyboard.right~
     - Inside source: true
     *** True Line Result
    -      [x, y, text, 1, 1, *color] # sets label definition
    -** Processing line: ~    end~
    +      elsif args.inputs.keyboard.right
    +** Processing line: ~        dir_x += args.state.player_speed~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +        dir_x += args.state.player_speed
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def green~
    +      end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    def green
    -** Processing line: ~      [60, 200, 100] # sets color saturation to shade of green~
    +
    +** Processing line: ~      # determine if teleport can be used~
     - Inside source: true
     *** True Line Result
    -      [60, 200, 100] # sets color saturation to shade of green
    -** Processing line: ~    end~
    +      # determine if teleport can be used
    +** Processing line: ~      if args.inputs.keyboard.key_down.space && args.state.teleports > 0~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +      if args.inputs.keyboard.key_down.space && args.state.teleports > 0
    +** Processing line: ~        args.state.teleports -= 1~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def blue~
    +        args.state.teleports -= 1
    +** Processing line: ~        dir_x *= 20~
     - Inside source: true
     *** True Line Result
    -    def blue
    -** Processing line: ~      [50, 50, 210] # sets color saturation to shade of blue~
    +        dir_x *= 20
    +** Processing line: ~        dir_y *= 20~
     - Inside source: true
     *** True Line Result
    -      [50, 50, 210] # sets color saturation to shade of blue
    -** Processing line: ~    end~
    +        dir_y *= 20
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    end
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def white~
    -- Inside source: true
    -*** True Line Result
    -    def white
    -** Processing line: ~      [255, 255, 255] # sets color saturation to white~
    +** Processing line: ~      # apply change to player~
     - Inside source: true
     *** True Line Result
    -      [255, 255, 255] # sets color saturation to white
    -** Processing line: ~    end~
    +      # apply change to player
    +** Processing line: ~      args.state.player.x += dir_x~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +      args.state.player.x += dir_x
    +** Processing line: ~      args.state.player.y += dir_y~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def red~
    +      args.state.player.y += dir_y
    +** Processing line: ~    else~
     - Inside source: true
     *** True Line Result
    -    def red
    -** Processing line: ~      [230, 80, 80] # sets color saturation to shade of red~
    +    else
    +** Processing line: ~      # if r is pressed, reset the game~
     - Inside source: true
     *** True Line Result
    -      [230, 80, 80] # sets color saturation to shade of red
    -** Processing line: ~    end~
    +      # if r is pressed, reset the game
    +** Processing line: ~      if args.inputs.keyboard.key_down.r~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~~
    +      if args.inputs.keyboard.key_down.r
    +** Processing line: ~        $gtk.reset~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def orange~
    +        $gtk.reset
    +** Processing line: ~        return~
     - Inside source: true
     *** True Line Result
    -    def orange
    -** Processing line: ~      [255, 80, 60] # sets color saturation to shade of orange~
    +        return
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -      [255, 80, 60] # sets color saturation to shade of orange
    +      end
     ** Processing line: ~    end~
     - Inside source: true
     *** True Line Result
    @@ -146015,110 +152207,118 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def pink~
    +** Processing line: ~    # ====================================================~
     - Inside source: true
     *** True Line Result
    -    def pink
    -** Processing line: ~      [255, 0, 200] # sets color saturation to shade of pink~
    +    # ====================================================
    +** Processing line: ~    # determine score~
     - Inside source: true
     *** True Line Result
    -      [255, 0, 200] # sets color saturation to shade of pink
    -** Processing line: ~    end~
    +    # determine score
    +** Processing line: ~    # ====================================================~
     - Inside source: true
     *** True Line Result
    -    end
    +    # ====================================================
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def gray~
    -- Inside source: true
    -*** True Line Result
    -    def gray
    -** Processing line: ~      [75, 75, 75] # sets color saturation to shade of gray~
    +** Processing line: ~    # calculate new score if the player is at goal~
     - Inside source: true
     *** True Line Result
    -      [75, 75, 75] # sets color saturation to shade of gray
    -** Processing line: ~    end~
    +    # calculate new score if the player is at goal
    +** Processing line: ~    if !game_over? args~
     - Inside source: true
     *** True Line Result
    -    end
    +    if !game_over? args
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Recolors the border using the parameters.~
    +** Processing line: ~      # if the player is at the goal, then move the goal~
     - Inside source: true
     *** True Line Result
    -    # Recolors the border using the parameters.
    -** Processing line: ~    def recolor_border border, r, g, b~
    +      # if the player is at the goal, then move the goal
    +** Processing line: ~      if args.state.player.intersect_rect? args.state.target~
     - Inside source: true
     *** True Line Result
    -    def recolor_border border, r, g, b
    -** Processing line: ~      border[4] = r~
    +      if args.state.player.intersect_rect? args.state.target
    +** Processing line: ~        # increment the goal~
     - Inside source: true
     *** True Line Result
    -      border[4] = r
    -** Processing line: ~      border[5] = g~
    +        # increment the goal
    +** Processing line: ~        args.state.score += 1~
     - Inside source: true
     *** True Line Result
    -      border[5] = g
    -** Processing line: ~      border[6] = b~
    +        args.state.score += 1
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      border[6] = b
    -** Processing line: ~      border~
    +
    +** Processing line: ~        # move the goal to a random location~
     - Inside source: true
     *** True Line Result
    -      border
    -** Processing line: ~    end~
    +        # move the goal to a random location
    +** Processing line: ~        args.state.target = { x: (rand args.grid.w), y: (rand args.grid.h), w: 20, h: 20 }~
     - Inside source: true
     *** True Line Result
    -    end
    +        args.state.target = { x: (rand args.grid.w), y: (rand args.grid.h), w: 20, h: 20 }
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Returns a boolean value.~
    +** Processing line: ~        # make sure the goal is inside the view area~
     - Inside source: true
     *** True Line Result
    -    # Returns a boolean value.
    -** Processing line: ~    def visible? cell~
    +        # make sure the goal is inside the view area
    +** Processing line: ~        if args.state.target.x < 0~
     - Inside source: true
     *** True Line Result
    -    def visible? cell
    -** Processing line: ~      # finds cell's coordinates inside visible_cells collections to determine if cell is visible~
    +        if args.state.target.x < 0
    +** Processing line: ~          args.state.target.x += 20~
     - Inside source: true
     *** True Line Result
    -      # finds cell's coordinates inside visible_cells collections to determine if cell is visible
    -** Processing line: ~      state.visible_cells.find { |c| c.x == cell.x && c.y == cell.y}~
    +          args.state.target.x += 20
    +** Processing line: ~        elsif args.state.target.x > 1280~
     - Inside source: true
     *** True Line Result
    -      state.visible_cells.find { |c| c.x == cell.x && c.y == cell.y}
    -** Processing line: ~    end~
    +        elsif args.state.target.x > 1280
    +** Processing line: ~          args.state.target.x -= 20~
     - Inside source: true
     *** True Line Result
    -    end
    +          args.state.target.x -= 20
    +** Processing line: ~        end~
    +- Inside source: true
    +*** True Line Result
    +        end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Exports dungeon by printing dungeon cell coordinates~
    +** Processing line: ~        # make sure the goal is inside the view area~
     - Inside source: true
     *** True Line Result
    -    # Exports dungeon by printing dungeon cell coordinates
    -** Processing line: ~    def export_dungeon~
    +        # make sure the goal is inside the view area
    +** Processing line: ~        if args.state.target.y < 0~
     - Inside source: true
     *** True Line Result
    -    def export_dungeon
    -** Processing line: ~      state.dungeon.each do |d| # on each element of dungeon collection~
    +        if args.state.target.y < 0
    +** Processing line: ~          args.state.target.y += 20~
     - Inside source: true
     *** True Line Result
    -      state.dungeon.each do |d| # on each element of dungeon collection
    -** Processing line: ~        puts "state.dungeon << [#{d.x}, #{d.y}]" # prints cell coordinates~
    +          args.state.target.y += 20
    +** Processing line: ~        elsif args.state.target.y > 720~
     - Inside source: true
     *** True Line Result
    -        puts "state.dungeon << [#{d.x}, #{d.y}]" # prints cell coordinates
    +        elsif args.state.target.y > 720
    +** Processing line: ~          args.state.target.y -= 20~
    +- Inside source: true
    +*** True Line Result
    +          args.state.target.y -= 20
    +** Processing line: ~        end~
    +- Inside source: true
    +*** True Line Result
    +        end
     ** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    @@ -146127,86 +152327,98 @@ Follows is a source code listing for all files that have been open sourced. This
     - Inside source: true
     *** True Line Result
         end
    +** Processing line: ~  end~
    +- Inside source: true
    +*** True Line Result
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def distance_to_cell cell~
    +** Processing line: ~  def game_over? args~
     - Inside source: true
     *** True Line Result
    -    def distance_to_cell cell
    -** Processing line: ~      distance_to state.x, cell.x, state.y, cell.y # calls distance_to method~
    +  def game_over? args
    +** Processing line: ~    args.state.count_down < 0~
     - Inside source: true
     *** True Line Result
    -      distance_to state.x, cell.x, state.y, cell.y # calls distance_to method
    -** Processing line: ~    end~
    +    args.state.count_down < 0
    +** Processing line: ~  end~
     - Inside source: true
     *** True Line Result
    -    end
    +  end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    def distance_to from_x, x, from_y, y~
    -- Inside source: true
    -*** True Line Result
    -    def distance_to from_x, x, from_y, y
    -** Processing line: ~      (from_x - x).abs + (from_y - y).abs # finds distance between two cells using coordinates~
    +** Processing line: ~  $gtk.reset~
     - Inside source: true
     *** True Line Result
    -      (from_x - x).abs + (from_y - y).abs # finds distance between two cells using coordinates
    -** Processing line: ~    end~
    +  $gtk.reset
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    end
    -** Processing line: ~  end~
    -- Inside source: true
    +
    +** Processing line: ~#+end_src~
    +- Line was identified as the end of a code block.
     *** True Line Result
    -  end
    +#+end_src
     ** Processing line: ~~
    -- Inside source: true
    +- End of paragraph detected.
     *** True Line Result
     
    -** Processing line: ~  $game = Game.new~
    +** Processing line: ~*** Teenytiny - Teenytiny Starting Point - license.txt~
    +- Header detected.
    +*** True Line Result
    +
    +*** True Line Result
    +*** Teenytiny - Teenytiny Starting Point - license.txt
    +** Processing line: ~#+begin_src ruby~
    +- Line was identified as the beginning of a code block.
    +*** True Line Result
    +
    +*** True Line Result
    +#+begin_src ruby
    +** Processing line: ~  # ./samples/99_genre_teenytiny/teenytiny_starting_point/license.txt~
     - Inside source: true
     *** True Line Result
    -  $game = Game.new
    -** Processing line: ~~
    +  # ./samples/99_genre_teenytiny/teenytiny_starting_point/license.txt
    +** Processing line: ~  Copyright 2019 DragonRuby LLC~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~  def tick args~
    +  Copyright 2019 DragonRuby LLC
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -  def tick args
    -** Processing line: ~    $game.args    = args~
    +
    +** Processing line: ~  MIT License~
     - Inside source: true
     *** True Line Result
    -    $game.args    = args
    -** Processing line: ~    $game.state   = args.state~
    +  MIT License
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    $game.state   = args.state
    -** Processing line: ~    $game.inputs  = args.inputs~
    +
    +** Processing line: ~  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:~
     - Inside source: true
     *** True Line Result
    -    $game.inputs  = args.inputs
    -** Processing line: ~    $game.outputs = args.outputs~
    +  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    $game.outputs = args.outputs
    -** Processing line: ~    $game.grid    = args.grid~
    +
    +** Processing line: ~  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.~
     - Inside source: true
     *** True Line Result
    -    $game.grid    = args.grid
    -** Processing line: ~    $game.tick~
    +  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -    $game.tick
    -** Processing line: ~  end~
    +
    +** Processing line: ~  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.~
     - Inside source: true
     *** True Line Result
    -  end
    +  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
    @@ -146219,354 +152431,373 @@ Follows is a source code listing for all files that have been open sourced. This
     - End of paragraph detected.
     *** True Line Result
     
    -** Processing line: ~*** Rpg Tactical - Hexagonal Grid - main.rb~
    +** Processing line: ~** OSS~
     - Header detected.
     *** True Line Result
     
     *** True Line Result
    -*** Rpg Tactical - Hexagonal Grid - main.rb
    +** OSS
    +** Processing line: ~Follows is a source code listing for all files that have been open sourced. This code can be found online at [[https://github.com/DragonRuby/dragonruby-game-toolkit-contrib/]].~
    +** Processing line: ~*** api.rb~
    +- Header detected.
    +*** True Line Result
    +Follows is a source code listing for all files that have been open sourced. This code can be found online at [[https://github.com/DragonRuby/dragonruby-game-toolkit-contrib/]].
    +*** True Line Result
    +*** api.rb
     ** Processing line: ~#+begin_src ruby~
     - Line was identified as the beginning of a code block.
     *** True Line Result
     
     *** True Line Result
     #+begin_src ruby
    -** Processing line: ~  # ./samples/99_genre_rpg_tactical/hexagonal_grid/app/main.rb~
    +** Processing line: ~  # ./dragon/api.rb~
     - Inside source: true
     *** True Line Result
    -  # ./samples/99_genre_rpg_tactical/hexagonal_grid/app/main.rb
    -** Processing line: ~  class HexagonTileGame~
    +  # ./dragon/api.rb
    +** Processing line: ~  # coding: utf-8~
     - Inside source: true
     *** True Line Result
    -  class HexagonTileGame
    -** Processing line: ~    attr_gtk~
    +  # coding: utf-8
    +** Processing line: ~  # Copyright 2019 DragonRuby LLC~
     - Inside source: true
     *** True Line Result
    -    attr_gtk
    -** Processing line: ~~
    +  # Copyright 2019 DragonRuby LLC
    +** Processing line: ~  # MIT License~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    def defaults~
    +  # MIT License
    +** Processing line: ~  # api.rb has been released under MIT (*only this file*).~
     - Inside source: true
     *** True Line Result
    -    def defaults
    -** Processing line: ~      state.tile_scale      = 1.3~
    +  # api.rb has been released under MIT (*only this file*).
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      state.tile_scale      = 1.3
    -** Processing line: ~      state.tile_size       = 80~
    +
    +** Processing line: ~  module GTK~
     - Inside source: true
     *** True Line Result
    -      state.tile_size       = 80
    -** Processing line: ~      state.tile_w          = Math.sqrt(3) * state.tile_size.half~
    +  module GTK
    +** Processing line: ~    class Api~
     - Inside source: true
     *** True Line Result
    -      state.tile_w          = Math.sqrt(3) * state.tile_size.half
    -** Processing line: ~      state.tile_h          = state.tile_size * 3/4~
    +    class Api
    +** Processing line: ~      def initialize~
     - Inside source: true
     *** True Line Result
    -      state.tile_h          = state.tile_size * 3/4
    -** Processing line: ~      state.tiles_x_count   = 1280.idiv(state.tile_w) - 1~
    +      def initialize
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -      state.tiles_x_count   = 1280.idiv(state.tile_w) - 1
    -** Processing line: ~      state.tiles_y_count   = 720.idiv(state.tile_h) - 1~
    +      end
    +** Processing line: ~~
     - Inside source: true
     *** True Line Result
    -      state.tiles_y_count   = 720.idiv(state.tile_h) - 1
    -** Processing line: ~      state.world_width_px  = state.tiles_x_count * state.tile_w~
    +
    +** Processing line: ~      def get_api_autocomplete args, req~
     - Inside source: true
     *** True Line Result
    -      state.world_width_px  = state.tiles_x_count * state.tile_w
    -** Processing line: ~      state.world_height_px = state.tiles_y_count * state.tile_h~
    +      def get_api_autocomplete args, req
    +** Processing line: ~        html = <<-S~
     - Inside source: true
     *** True Line Result
    -      state.world_height_px = state.tiles_y_count * state.tile_h
    -** Processing line: ~      state.world_x_offset  = (1280 - state.world_width_px).half~
    +        html = <<-S
    +** Processing line: ~  ~
     - Inside source: true
     *** True Line Result
    -      state.world_x_offset  = (1280 - state.world_width_px).half
    -** Processing line: ~      state.world_y_offset  = (720 - state.world_height_px).half~
    +  
    +** Processing line: ~    ~
     - Inside source: true
     *** True Line Result
    -      state.world_y_offset  = (720 - state.world_height_px).half
    -** Processing line: ~      state.tiles         ||= state.tiles_x_count.map_with_ys(state.tiles_y_count) do |ordinal_x, ordinal_y|~
    +    
    +** Processing line: ~      ~
     - Inside source: true
     *** True Line Result
    -      state.tiles         ||= state.tiles_x_count.map_with_ys(state.tiles_y_count) do |ordinal_x, ordinal_y|
    -** Processing line: ~        {~
    +      
    +** Processing line: ~      DragonRuby Game Toolkit Documentation~
     - Inside source: true
     *** True Line Result
    -        {
    -** Processing line: ~          ordinal_x: ordinal_x,~
    +      DragonRuby Game Toolkit Documentation
    +** Processing line: ~      ~
     - Inside source: true
     *** True Line Result
    -        }.associate do |h|
    -** Processing line: ~          h.merge(x: h[:offset_x] + h[:ordinal_x] * h[:w],~
    +      
    +** Processing line: ~    ~
     - Inside source: true
     *** True Line Result
    -          h.merge(x: h[:offset_x] + h[:ordinal_x] * h[:w],
    -** Processing line: ~                  y: h[:offset_y] + h[:ordinal_y] * h[:h]).scale_rect(state.tile_scale)~
    +    
    +** Processing line: ~    ~
     - Inside source: true
     *** True Line Result
    -                  y: h[:offset_y] + h[:ordinal_y] * h[:h]).scale_rect(state.tile_scale)
    -** Processing line: ~        end.associate do |h|~
    +    
    +** Processing line: ~        ~
     - Inside source: true
     *** True Line Result
    -      if inputs.click
    -** Processing line: ~        tile = state.tiles.find { |t| inputs.click.point_inside_circle? t[:center], t[:radius] }~
    +        
    +** Processing line: ~        
    ~ - Inside source: true *** True Line Result - tile = state.tiles.find { |t| inputs.click.point_inside_circle? t[:center], t[:radius] } -** Processing line: ~ if tile~ + +** Processing line: ~
    index
    ~ - Inside source: true *** True Line Result - if tile -** Processing line: ~ tile[:a] = 255~ +
    index
    +** Processing line: ~ ~ - Inside source: true *** True Line Result - tile[:a] = 255 -** Processing line: ~ tile[:path] = "sprites/hexagon-black.png"~ + +** Processing line: ~
    code
    ~ - Inside source: true *** True Line Result - tile[:path] = "sprites/hexagon-black.png" -** Processing line: ~ end~ +
    code
    +** Processing line: ~ ~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + end +** Processing line: ~
    ~ - Inside source: true *** True Line Result - -** Processing line: ~ def tick~ +
    +** Processing line: ~ ~ - Inside source: true *** True Line Result - def tick -** Processing line: ~ defaults~ + +** Processing line: ~ ~ - Inside source: true *** True Line Result - defaults -** Processing line: ~ input~ + +** Processing line: ~
    ~ - Inside source: true *** True Line Result - input -** Processing line: ~ render~ + +** Processing line: ~
    ~
     - Inside source: true
     *** True Line Result
    -      render
    -** Processing line: ~    end~
    +        
    +** Processing line: ~        
    ~ - Inside source: true *** True Line Result - end +
    ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def render~ +** Processing line: ~ #{links}~ - Inside source: true *** True Line Result - def render -** Processing line: ~ outputs.sprites << state.tiles~ + #{links} +** Processing line: ~ ~ - Inside source: true *** True Line Result - outputs.sprites << state.tiles -** Processing line: ~ end~ + +** Processing line: ~ ~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + +** Processing line: ~ S~ - Inside source: true *** True Line Result - end + S ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ $game = HexagonTileGame.new~ +** Processing line: ~ req.respond 200,~ - Inside source: true *** True Line Result - $game = HexagonTileGame.new + req.respond 200, +** Processing line: ~ html,~ +- Inside source: true +*** True Line Result + html, +** Processing line: ~ { 'Content-Type' => 'text/html' }~ +- Inside source: true +*** True Line Result + { 'Content-Type' => 'text/html' } +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def tick args~ +** Processing line: ~ def post_api_autocomplete args, req~ - Inside source: true *** True Line Result - def tick args -** Processing line: ~ $game.args = args~ + def post_api_autocomplete args, req +** Processing line: ~ json = ($gtk.parse_json req.body)~ - Inside source: true *** True Line Result - $game.args = args -** Processing line: ~ $game.tick~ + json = ($gtk.parse_json req.body) +** Processing line: ~ index = json["index"].to_i~ - Inside source: true *** True Line Result - $game.tick -** Processing line: ~ end~ + index = json["index"].to_i +** Processing line: ~ text = json["text"]~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + text = json["text"] +** Processing line: ~ suggestions = args.gtk.suggest_autocompletion index: index, text: text~ - Inside source: true *** True Line Result - -** Processing line: ~ $gtk.reset~ + suggestions = args.gtk.suggest_autocompletion index: index, text: text +** Processing line: ~ list_as_string = suggestions.join("\n")~ - Inside source: true *** True Line Result - $gtk.reset -** Processing line: ~~ + list_as_string = suggestions.join("\n") +** Processing line: ~ req.respond 200, list_as_string, { 'Content-Type' => 'text/plain' }~ - Inside source: true *** True Line Result - -** Processing line: ~#+end_src~ -- Line was identified as the end of a code block. + req.respond 200, list_as_string, { 'Content-Type' => 'text/plain' } +** Processing line: ~ end~ +- Inside source: true *** True Line Result -#+end_src + end ** Processing line: ~~ -- End of paragraph detected. -*** True Line Result - -** Processing line: ~*** Rpg Tactical - Isometric Grid - main.rb~ -- Header detected. +- Inside source: true *** True Line Result +** Processing line: ~ define_method :links do~ +- Inside source: true *** True Line Result -*** Rpg Tactical - Isometric Grid - main.rb -** Processing line: ~#+begin_src ruby~ -- Line was identified as the beginning of a code block. + define_method :links do +** Processing line: ~ <<-S~ +- Inside source: true *** True Line Result - + <<-S +** Processing line: ~
      ~ +- Inside source: true *** True Line Result -#+begin_src ruby -** Processing line: ~ # ./samples/99_genre_rpg_tactical/isometric_grid/app/main.rb~ +
        +** Processing line: ~
      • Home
      • ~ - Inside source: true *** True Line Result - # ./samples/99_genre_rpg_tactical/isometric_grid/app/main.rb -** Processing line: ~ class Isometric~ +
      • Home
      • +** Processing line: ~
      • Docs
      • ~ - Inside source: true *** True Line Result - class Isometric -** Processing line: ~ attr_accessor :grid, :inputs, :state, :outputs~ +
      • Docs
      • +** Processing line: ~
      • Control Panel
      • ~ - Inside source: true *** True Line Result - attr_accessor :grid, :inputs, :state, :outputs -** Processing line: ~~ +
      • Control Panel
      • +** Processing line: ~
      • Console
      • ~ - Inside source: true *** True Line Result - -** Processing line: ~ def tick~ +
      • Console
      • +** Processing line: ~
      • Logs
      • ~ - Inside source: true *** True Line Result - def tick -** Processing line: ~ defaults~ +
      • Logs
      • +** Processing line: ~
      • Puts
      • ~ - Inside source: true *** True Line Result - defaults -** Processing line: ~ render~ +
      • Puts
      • +** Processing line: ~
      • Code
      • ~ - Inside source: true *** True Line Result - render -** Processing line: ~ calc~ +
      • Code
      • +** Processing line: ~
      ~ - Inside source: true *** True Line Result - calc -** Processing line: ~ process_inputs~ +
    +** Processing line: ~ S~ - Inside source: true *** True Line Result - process_inputs + S ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -146575,310 +152806,310 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def defaults~ -- Inside source: true -*** True Line Result - def defaults -** Processing line: ~ state.quantity ||= 6 #Size of grid~ +** Processing line: ~ def get_index args, req~ - Inside source: true *** True Line Result - state.quantity ||= 6 #Size of grid -** Processing line: ~ state.tileSize ||= [262 / 2, 194 / 2] #width and heigth of orange tiles~ + def get_index args, req +** Processing line: ~ req.respond 200, <<-S, { 'Content-Type' => 'text/html' }~ - Inside source: true *** True Line Result - state.tileSize ||= [262 / 2, 194 / 2] #width and heigth of orange tiles -** Processing line: ~ state.tileGrid ||= [] #Holds ordering of tiles~ + req.respond 200, <<-S, { 'Content-Type' => 'text/html' } +** Processing line: ~ ~ - Inside source: true *** True Line Result - state.tileGrid ||= [] #Holds ordering of tiles -** Processing line: ~ state.currentSpriteLocation ||= -1 #Current Sprite hovering location~ + +** Processing line: ~ ~ - Inside source: true *** True Line Result - state.currentSpriteLocation ||= -1 #Current Sprite hovering location -** Processing line: ~ state.tileCords ||= [] #Physical, rendering cordinates~ + +** Processing line: ~ ~ - Inside source: true *** True Line Result - state.tileCords ||= [] #Physical, rendering cordinates -** Processing line: ~ state.initCords ||= [640 - (state.quantity / 2 * state.tileSize[0]), 330] #Location of tile (0, 0)~ + +** Processing line: ~ DragonRuby Game Toolkit Documentation~ - Inside source: true *** True Line Result - state.initCords ||= [640 - (state.quantity / 2 * state.tileSize[0]), 330] #Location of tile (0, 0) -** Processing line: ~ state.sideSize ||= [state.tileSize[0] / 2, 242 / 2] #Purple & green cube face size~ + DragonRuby Game Toolkit Documentation +** Processing line: ~ ~ - Inside source: true *** True Line Result - state.sideSize ||= [state.tileSize[0] / 2, 242 / 2] #Purple & green cube face size -** Processing line: ~ state.mode ||= :delete #Switches between :delete and :insert~ + +** Processing line: ~ ~ - Inside source: true *** True Line Result - state.mode ||= :delete #Switches between :delete and :insert -** Processing line: ~ state.spriteSelection ||= [['river', 0, 0, 262 / 2, 194 / 2],~ + +** Processing line: ~ #{links}~ - Inside source: true *** True Line Result - state.spriteSelection ||= [['river', 0, 0, 262 / 2, 194 / 2], -** Processing line: ~ ['mountain', 0, 0, 262 / 2, 245 / 2],~ + #{links} +** Processing line: ~ ~ - Inside source: true *** True Line Result - ['mountain', 0, 0, 262 / 2, 245 / 2], -** Processing line: ~ ['ocean', 0, 0, 262 / 2, 194 / 2]] #Storage for sprite information~ + +** Processing line: ~ ~ - Inside source: true *** True Line Result - ['ocean', 0, 0, 262 / 2, 194 / 2]] #Storage for sprite information -** Processing line: ~ #['name', deltaX, deltaY, sizeW, sizeH]~ + +** Processing line: ~ S~ - Inside source: true *** True Line Result - #['name', deltaX, deltaY, sizeW, sizeH] -** Processing line: ~ #^delta refers to distance from tile cords~ + S +** Processing line: ~ end~ - Inside source: true *** True Line Result - #^delta refers to distance from tile cords + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ #Orders tiles based on tile placement and fancy math. Very left: 0,0. Very bottom: quantity-1, 0, etc~ +** Processing line: ~ def source_code_links args~ - Inside source: true *** True Line Result - #Orders tiles based on tile placement and fancy math. Very left: 0,0. Very bottom: quantity-1, 0, etc -** Processing line: ~ if state.tileGrid == []~ + def source_code_links args +** Processing line: ~ links = args.gtk.reload_list_history.keys.map do |f|~ - Inside source: true *** True Line Result - if state.tileGrid == [] -** Processing line: ~ tempX = 0~ + links = args.gtk.reload_list_history.keys.map do |f| +** Processing line: ~ "
  • #{f}
  • "~ - Inside source: true *** True Line Result - tempX = 0 -** Processing line: ~ tempY = 0~ + "
  • #{f}
  • " +** Processing line: ~ end~ - Inside source: true *** True Line Result - tempY = 0 -** Processing line: ~ tempLeft = false~ + end +** Processing line: ~ <<-S~ - Inside source: true *** True Line Result - tempLeft = false -** Processing line: ~ tempRight = false~ + <<-S +** Processing line: ~
      ~ - Inside source: true *** True Line Result - tempRight = false -** Processing line: ~ count = 0~ +
        +** Processing line: ~ #{links.join("\n")}~ - Inside source: true *** True Line Result - count = 0 -** Processing line: ~ (state.quantity * state.quantity).times do~ + #{links.join("\n")} +** Processing line: ~
      ~ - Inside source: true *** True Line Result - (state.quantity * state.quantity).times do -** Processing line: ~ if tempY == 0~ +
    +** Processing line: ~ S~ - Inside source: true *** True Line Result - if tempY == 0 -** Processing line: ~ tempLeft = true~ + S +** Processing line: ~ end~ - Inside source: true *** True Line Result - tempLeft = true -** Processing line: ~ end~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - end -** Processing line: ~ if tempX == (state.quantity - 1)~ + +** Processing line: ~ def get_api_code args, req~ - Inside source: true *** True Line Result - if tempX == (state.quantity - 1) -** Processing line: ~ tempRight = true~ + def get_api_code args, req +** Processing line: ~ view = <<-S~ - Inside source: true *** True Line Result - tempRight = true -** Processing line: ~ end~ + view = <<-S +** Processing line: ~ ~ - Inside source: true *** True Line Result - end -** Processing line: ~ state.tileGrid.push([tempX, tempY, true, tempLeft, tempRight, count])~ + +** Processing line: ~ ~ - Inside source: true *** True Line Result - state.tileGrid.push([tempX, tempY, true, tempLeft, tempRight, count]) -** Processing line: ~ #orderX, orderY, exists?, leftSide, rightSide, order~ + +** Processing line: ~ ~ - Inside source: true *** True Line Result - #orderX, orderY, exists?, leftSide, rightSide, order -** Processing line: ~ tempX += 1~ + +** Processing line: ~ DragonRuby Game Toolkit Documentation~ - Inside source: true *** True Line Result - tempX += 1 -** Processing line: ~ if tempX == state.quantity~ + DragonRuby Game Toolkit Documentation +** Processing line: ~ ~ - Inside source: true *** True Line Result - if tempX == state.quantity -** Processing line: ~ tempX = 0~ + +** Processing line: ~ ~ - Inside source: true *** True Line Result - tempX = 0 -** Processing line: ~ tempY += 1~ + +** Processing line: ~ #{source_code_links args}~ - Inside source: true *** True Line Result - tempY += 1 -** Processing line: ~ end~ + #{source_code_links args} +** Processing line: ~~ - Inside source: true *** True Line Result - end -** Processing line: ~ tempLeft = false~ + +** Processing line: ~ #{links}~ - Inside source: true *** True Line Result - tempLeft = false -** Processing line: ~ tempRight = false~ + #{links} +** Processing line: ~ ~ - Inside source: true *** True Line Result - tempRight = false -** Processing line: ~ count += 1~ + +** Processing line: ~ ~ - Inside source: true *** True Line Result - count += 1 -** Processing line: ~ end~ + +** Processing line: ~ S~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + S +** Processing line: ~ req.respond 200,~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + req.respond 200, +** Processing line: ~ view,~ - Inside source: true *** True Line Result - -** Processing line: ~ #Calculates physical cordinates for tiles~ + view, +** Processing line: ~ { 'Content-Type' => 'text/html' }~ - Inside source: true *** True Line Result - #Calculates physical cordinates for tiles -** Processing line: ~ if state.tileCords == []~ + { 'Content-Type' => 'text/html' } +** Processing line: ~ end~ - Inside source: true *** True Line Result - if state.tileCords == [] -** Processing line: ~ state.tileCords = state.tileGrid.map do~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - state.tileCords = state.tileGrid.map do -** Processing line: ~ |val|~ + +** Processing line: ~ def code_edit_view args, file~ - Inside source: true *** True Line Result - |val| -** Processing line: ~ x = (state.initCords[0]) + ((val[0] + val[1]) * state.tileSize[0] / 2)~ + def code_edit_view args, file +** Processing line: ~ view = <<-S~ - Inside source: true *** True Line Result - x = (state.initCords[0]) + ((val[0] + val[1]) * state.tileSize[0] / 2) -** Processing line: ~ y = (state.initCords[1]) + (-1 * val[0] * state.tileSize[1] / 2) + (val[1] * state.tileSize[1] / 2)~ + view = <<-S +** Processing line: ~ ~ - Inside source: true *** True Line Result - y = (state.initCords[1]) + (-1 * val[0] * state.tileSize[1] / 2) + (val[1] * state.tileSize[1] / 2) -** Processing line: ~ [x, y, val[2], val[3], val[4], val[5], -1] #-1 represents sprite on top of tile. -1 for now~ + +** Processing line: ~ ~ - Inside source: true *** True Line Result - [x, y, val[2], val[3], val[4], val[5], -1] #-1 represents sprite on top of tile. -1 for now -** Processing line: ~ end~ + +** Processing line: ~ ~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + +** Processing line: ~ DragonRuby Game Toolkit Documentation~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + DragonRuby Game Toolkit Documentation +** Processing line: ~ ~ - Inside source: true *** True Line Result - -** Processing line: ~ end~ + +** Processing line: ~ ~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + +** Processing line: ~ ~ - Inside source: true *** True Line Result - def renderBackground -** Processing line: ~ outputs.solids << [0, 0, 1280, 720, 0, 0, 0] #Background color~ + +** Processing line: ~
    ~ - Inside source: true *** True Line Result - outputs.solids << [0, 0, 1280, 720, 0, 0, 0] #Background color -** Processing line: ~ end~ + +** Processing line: ~
    #{file}:
    ~ - Inside source: true *** True Line Result - end -** Processing line: ~~ +
    #{file}:
    +** Processing line: ~ ~ - Inside source: true *** True Line Result - -** Processing line: ~ def renderLeft~ + +** Processing line: ~
    ~ - Inside source: true *** True Line Result - def renderLeft -** Processing line: ~ #Shows the pink left cube face~ +
    +** Processing line: ~ ~ - Inside source: true *** True Line Result - #Shows the pink left cube face -** Processing line: ~ outputs.sprites << state.tileCords.map do~ + +** Processing line: ~ ~ - Inside source: true *** True Line Result - outputs.sprites << state.tileCords.map do -** Processing line: ~ |val|~ + +** Processing line: ~
    ~ - Inside source: true *** True Line Result - |val| -** Processing line: ~ if val[2] == true && val[3] == true #Checks if the tile exists and right face needs to be rendered~ + +** Processing line: ~ #{source_code_links args}~ - Inside source: true *** True Line Result - if val[2] == true && val[3] == true #Checks if the tile exists and right face needs to be rendered -** Processing line: ~ [val[0], val[1] + (state.tileSize[1] / 2) - state.sideSize[1], state.sideSize[0],~ + #{source_code_links args} +** Processing line: ~~ - Inside source: true *** True Line Result - [val[0], val[1] + (state.tileSize[1] / 2) - state.sideSize[1], state.sideSize[0], -** Processing line: ~ state.sideSize[1], 'sprites/leftSide.png']~ + +** Processing line: ~ #{links}~ - Inside source: true *** True Line Result - state.sideSize[1], 'sprites/leftSide.png'] -** Processing line: ~ end~ + #{links} +** Processing line: ~ ~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + +** Processing line: ~ ~ - Inside source: true *** True Line Result - end + +** Processing line: ~ S~ +- Inside source: true +*** True Line Result + S ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -146887,42 +153118,30 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def renderRight~ -- Inside source: true -*** True Line Result - def renderRight -** Processing line: ~ #Shows the green right cube face~ -- Inside source: true -*** True Line Result - #Shows the green right cube face -** Processing line: ~ outputs.sprites << state.tileCords.map do~ -- Inside source: true -*** True Line Result - outputs.sprites << state.tileCords.map do -** Processing line: ~ |val|~ +** Processing line: ~ def get_api_code_edit args, req~ - Inside source: true *** True Line Result - |val| -** Processing line: ~ if val[2] == true && val[4] == true #Checks if it exists & checks if right face needs to be rendered~ + def get_api_code_edit args, req +** Processing line: ~ file = req.uri.split('?').last.gsub("file=", "")~ - Inside source: true *** True Line Result - if val[2] == true && val[4] == true #Checks if it exists & checks if right face needs to be rendered -** Processing line: ~ [val[0] + state.tileSize[0] / 2, val[1] + (state.tileSize[1] / 2) - state.sideSize[1], state.sideSize[0],~ + file = req.uri.split('?').last.gsub("file=", "") +** Processing line: ~ view = code_edit_view args, file~ - Inside source: true *** True Line Result - [val[0] + state.tileSize[0] / 2, val[1] + (state.tileSize[1] / 2) - state.sideSize[1], state.sideSize[0], -** Processing line: ~ state.sideSize[1], 'sprites/rightSide.png']~ + view = code_edit_view args, file +** Processing line: ~ req.respond 200,~ - Inside source: true *** True Line Result - state.sideSize[1], 'sprites/rightSide.png'] -** Processing line: ~ end~ + req.respond 200, +** Processing line: ~ view,~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + view, +** Processing line: ~ { 'Content-Type' => 'text/html' }~ - Inside source: true *** True Line Result - end + { 'Content-Type' => 'text/html' } ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -146931,54 +153150,38 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def renderTiles~ -- Inside source: true -*** True Line Result - def renderTiles -** Processing line: ~ #Shows the tile itself. Important that it's rendered after the two above!~ -- Inside source: true -*** True Line Result - #Shows the tile itself. Important that it's rendered after the two above! -** Processing line: ~ outputs.sprites << state.tileCords.map do~ -- Inside source: true -*** True Line Result - outputs.sprites << state.tileCords.map do -** Processing line: ~ |val|~ -- Inside source: true -*** True Line Result - |val| -** Processing line: ~ if val[2] == true #Chcekcs if tile needs to be rendered~ +** Processing line: ~ def post_api_code_update args, req~ - Inside source: true *** True Line Result - if val[2] == true #Chcekcs if tile needs to be rendered -** Processing line: ~ if val[5] == state.currentSpriteLocation~ + def post_api_code_update args, req +** Processing line: ~ file = req.uri.split('?').last.gsub("file=", "")~ - Inside source: true *** True Line Result - if val[5] == state.currentSpriteLocation -** Processing line: ~ [val[0], val[1], state.tileSize[0], state.tileSize[1], 'sprites/selectedTile.png']~ + file = req.uri.split('?').last.gsub("file=", "") +** Processing line: ~ code = ($gtk.parse_json req.body)["code"]~ - Inside source: true *** True Line Result - [val[0], val[1], state.tileSize[0], state.tileSize[1], 'sprites/selectedTile.png'] -** Processing line: ~ else~ + code = ($gtk.parse_json req.body)["code"] +** Processing line: ~ args.gtk.write_file file, code~ - Inside source: true *** True Line Result - else -** Processing line: ~ [val[0], val[1], state.tileSize[0], state.tileSize[1], 'sprites/tile.png']~ + args.gtk.write_file file, code +** Processing line: ~ view = code_edit_view args, file~ - Inside source: true *** True Line Result - [val[0], val[1], state.tileSize[0], state.tileSize[1], 'sprites/tile.png'] -** Processing line: ~ end~ + view = code_edit_view args, file +** Processing line: ~ req.respond 200,~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + req.respond 200, +** Processing line: ~ view,~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + view, +** Processing line: ~ { 'Content-Type' => 'text/html' }~ - Inside source: true *** True Line Result - end + { 'Content-Type' => 'text/html' } ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -146987,78 +153190,70 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def renderObjects~ -- Inside source: true -*** True Line Result - def renderObjects -** Processing line: ~ #Renders the sprites on top of the tiles. Order of rendering: top corner to right corner and cascade down until left corner~ -- Inside source: true -*** True Line Result - #Renders the sprites on top of the tiles. Order of rendering: top corner to right corner and cascade down until left corner -** Processing line: ~ #to bottom corner.~ +** Processing line: ~ def get_api_boot args, req~ - Inside source: true *** True Line Result - #to bottom corner. -** Processing line: ~ a = (state.quantity * state.quantity) - state.quantity~ + def get_api_boot args, req +** Processing line: ~ req.respond 200,~ - Inside source: true *** True Line Result - a = (state.quantity * state.quantity) - state.quantity -** Processing line: ~ iter = 0~ + req.respond 200, +** Processing line: ~ args.gtk.read_file("tmp/src_backup/boot.txt"),~ - Inside source: true *** True Line Result - iter = 0 -** Processing line: ~ loop do~ + args.gtk.read_file("tmp/src_backup/boot.txt"), +** Processing line: ~ { 'Content-Type' => 'text/plain' }~ - Inside source: true *** True Line Result - loop do -** Processing line: ~ if state.tileCords[a][2] == true && state.tileCords[a][6] != -1~ + { 'Content-Type' => 'text/plain' } +** Processing line: ~ end~ - Inside source: true *** True Line Result - if state.tileCords[a][2] == true && state.tileCords[a][6] != -1 -** Processing line: ~ outputs.sprites << [state.tileCords[a][0] + state.spriteSelection[state.tileCords[a][6]][1],~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - outputs.sprites << [state.tileCords[a][0] + state.spriteSelection[state.tileCords[a][6]][1], -** Processing line: ~ state.tileCords[a][1] + state.spriteSelection[state.tileCords[a][6]][2],~ + +** Processing line: ~ def get_api_trace args, req~ - Inside source: true *** True Line Result - state.tileCords[a][1] + state.spriteSelection[state.tileCords[a][6]][2], -** Processing line: ~ state.spriteSelection[state.tileCords[a][6]][3], state.spriteSelection[state.tileCords[a][6]][4],~ + def get_api_trace args, req +** Processing line: ~ req.respond 200,~ - Inside source: true *** True Line Result - state.spriteSelection[state.tileCords[a][6]][3], state.spriteSelection[state.tileCords[a][6]][4], -** Processing line: ~ 'sprites/' + state.spriteSelection[state.tileCords[a][6]][0] + '.png']~ + req.respond 200, +** Processing line: ~ args.gtk.read_file("logs/trace.txt"),~ - Inside source: true *** True Line Result - 'sprites/' + state.spriteSelection[state.tileCords[a][6]][0] + '.png'] -** Processing line: ~ end~ + args.gtk.read_file("logs/trace.txt"), +** Processing line: ~ { 'Content-Type' => 'text/plain' }~ - Inside source: true *** True Line Result - end -** Processing line: ~ iter += 1~ + { 'Content-Type' => 'text/plain' } +** Processing line: ~ end~ - Inside source: true *** True Line Result - iter += 1 -** Processing line: ~ a += 1~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - a += 1 -** Processing line: ~ a -= state.quantity * 2 if iter == state.quantity~ + +** Processing line: ~ def get_api_log args, req~ - Inside source: true *** True Line Result - a -= state.quantity * 2 if iter == state.quantity -** Processing line: ~ iter = 0 if iter == state.quantity~ + def get_api_log args, req +** Processing line: ~ req.respond 200,~ - Inside source: true *** True Line Result - iter = 0 if iter == state.quantity -** Processing line: ~ break if a < 0~ + req.respond 200, +** Processing line: ~ args.gtk.read_file("logs/log.txt"),~ - Inside source: true *** True Line Result - break if a < 0 -** Processing line: ~ end~ + args.gtk.read_file("logs/log.txt"), +** Processing line: ~ { 'Content-Type' => 'text/plain' }~ - Inside source: true *** True Line Result - end + { 'Content-Type' => 'text/plain' } ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -147067,30 +153262,30 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def renderLabels~ +** Processing line: ~ def post_api_log args, req~ - Inside source: true *** True Line Result - def renderLabels -** Processing line: ~ #Labels~ + def post_api_log args, req +** Processing line: ~ Log.log req.body~ - Inside source: true *** True Line Result - #Labels -** Processing line: ~ outputs.labels << [50, 680, 'Click to delete!', 5, 0, 255, 255, 255, 255] if state.mode == :delete~ + Log.log req.body +** Processing line: ~~ - Inside source: true *** True Line Result - outputs.labels << [50, 680, 'Click to delete!', 5, 0, 255, 255, 255, 255] if state.mode == :delete -** Processing line: ~ outputs.labels << [50, 640, 'Press \'i\' for insert mode!', 5, 0, 255, 255, 255, 255] if state.mode == :delete~ + +** Processing line: ~ req.respond 200,~ - Inside source: true *** True Line Result - outputs.labels << [50, 640, 'Press \'i\' for insert mode!', 5, 0, 255, 255, 255, 255] if state.mode == :delete -** Processing line: ~ outputs.labels << [50, 680, 'Click to insert!', 5, 0, 255, 255, 255, 255] if state.mode == :insert~ + req.respond 200, +** Processing line: ~ "ok",~ - Inside source: true *** True Line Result - outputs.labels << [50, 680, 'Click to insert!', 5, 0, 255, 255, 255, 255] if state.mode == :insert -** Processing line: ~ outputs.labels << [50, 640, 'Press \'d\' for delete mode!', 5, 0, 255, 255, 255, 255] if state.mode == :insert~ + "ok", +** Processing line: ~ { 'Content-Type' => 'text/plain' }~ - Inside source: true *** True Line Result - outputs.labels << [50, 640, 'Press \'d\' for delete mode!', 5, 0, 255, 255, 255, 255] if state.mode == :insert + { 'Content-Type' => 'text/plain' } ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -147099,154 +153294,150 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def calc~ -- Inside source: true -*** True Line Result - def calc -** Processing line: ~ calcCurrentHover~ +** Processing line: ~ def get_api_puts args, req~ - Inside source: true *** True Line Result - calcCurrentHover -** Processing line: ~ end~ + def get_api_puts args, req +** Processing line: ~ req.respond 200,~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + req.respond 200, +** Processing line: ~ args.gtk.read_file("logs/puts.txt"),~ - Inside source: true *** True Line Result - -** Processing line: ~ def calcCurrentHover~ + args.gtk.read_file("logs/puts.txt"), +** Processing line: ~ { 'Content-Type' => 'text/plain' }~ - Inside source: true *** True Line Result - def calcCurrentHover -** Processing line: ~ #This determines what tile the mouse is hovering (or last hovering) over~ + { 'Content-Type' => 'text/plain' } +** Processing line: ~ end~ - Inside source: true *** True Line Result - #This determines what tile the mouse is hovering (or last hovering) over -** Processing line: ~ x = inputs.mouse.position.x~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - x = inputs.mouse.position.x -** Processing line: ~ y = inputs.mouse.position.y~ + +** Processing line: ~ def get_api_changes args, req~ - Inside source: true *** True Line Result - y = inputs.mouse.position.y -** Processing line: ~ m = (state.tileSize[1] / state.tileSize[0]) #slope~ + def get_api_changes args, req +** Processing line: ~ req.respond 200,~ - Inside source: true *** True Line Result - m = (state.tileSize[1] / state.tileSize[0]) #slope -** Processing line: ~ state.tileCords.map do~ + req.respond 200, +** Processing line: ~ args.gtk.read_file("tmp/src_backup/src_backup_changes.txt"),~ - Inside source: true *** True Line Result - state.tileCords.map do -** Processing line: ~ |val|~ + args.gtk.read_file("tmp/src_backup/src_backup_changes.txt"), +** Processing line: ~ { 'Content-Type' => 'text/plain' }~ - Inside source: true *** True Line Result - |val| -** Processing line: ~ #Conditions that makes runtime faster. Checks if the mouse click was between tile dimensions (rectangle collision)~ + { 'Content-Type' => 'text/plain' } +** Processing line: ~ end~ - Inside source: true *** True Line Result - #Conditions that makes runtime faster. Checks if the mouse click was between tile dimensions (rectangle collision) -** Processing line: ~ next unless val[0] < x && x < val[0] + state.tileSize[0]~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - next unless val[0] < x && x < val[0] + state.tileSize[0] -** Processing line: ~ next unless val[1] < y && y < val[1] + state.tileSize[1]~ + +** Processing line: ~ def get_favicon_ico args, req~ - Inside source: true *** True Line Result - next unless val[1] < y && y < val[1] + state.tileSize[1] -** Processing line: ~ next unless val[2] == true~ + def get_favicon_ico args, req +** Processing line: ~ @favicon ||= args.gtk.read_file('docs/favicon.ico')~ - Inside source: true *** True Line Result - next unless val[2] == true -** Processing line: ~ tempBool = false~ + @favicon ||= args.gtk.read_file('docs/favicon.ico') +** Processing line: ~ req.respond 200, @favicon, { "Content-Type" => 'image/x-icon' }~ - Inside source: true *** True Line Result - tempBool = false -** Processing line: ~ if x == val[0] + (state.tileSize[0] / 2)~ + req.respond 200, @favicon, { "Content-Type" => 'image/x-icon' } +** Processing line: ~ end~ - Inside source: true *** True Line Result - if x == val[0] + (state.tileSize[0] / 2) -** Processing line: ~ #The height of a diamond is the height of the diamond, so if x equals that exact point, it must be inside the diamond~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - #The height of a diamond is the height of the diamond, so if x equals that exact point, it must be inside the diamond -** Processing line: ~ tempBool = true~ + +** Processing line: ~ def get_src_backup args, req~ - Inside source: true *** True Line Result - tempBool = true -** Processing line: ~ elsif x < state.tileSize[0] / 2 + val[0]~ + def get_src_backup args, req +** Processing line: ~ file_name = req.uri.gsub("/dragon/", "")~ - Inside source: true *** True Line Result - elsif x < state.tileSize[0] / 2 + val[0] -** Processing line: ~ #Uses y = (m) * (x - x1) + y1 to determine the y values for the two diamond lines on the left half of diamond~ + file_name = req.uri.gsub("/dragon/", "") +** Processing line: ~ req.respond 200,~ - Inside source: true *** True Line Result - #Uses y = (m) * (x - x1) + y1 to determine the y values for the two diamond lines on the left half of diamond -** Processing line: ~ tempY1 = (m * (x - val[0])) + val[1] + (state.tileSize[1] / 2)~ + req.respond 200, +** Processing line: ~ args.gtk.read_file("tmp/src_backup/#{file_name}"),~ - Inside source: true *** True Line Result - tempY1 = (m * (x - val[0])) + val[1] + (state.tileSize[1] / 2) -** Processing line: ~ tempY2 = (-1 * m * (x - val[0])) + val[1] + (state.tileSize[1] / 2)~ + args.gtk.read_file("tmp/src_backup/#{file_name}"), +** Processing line: ~ { 'Content-Type' => 'text/plain' }~ - Inside source: true *** True Line Result - tempY2 = (-1 * m * (x - val[0])) + val[1] + (state.tileSize[1] / 2) -** Processing line: ~ #Checks to see if the mouse click y value is between those temp y values~ + { 'Content-Type' => 'text/plain' } +** Processing line: ~ end~ - Inside source: true *** True Line Result - #Checks to see if the mouse click y value is between those temp y values -** Processing line: ~ tempBool = true if y < tempY1 && y > tempY2~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - tempBool = true if y < tempY1 && y > tempY2 -** Processing line: ~ elsif x > state.tileSize[0] / 2 + val[0]~ + +** Processing line: ~ def get_not_found args, req~ - Inside source: true *** True Line Result - elsif x > state.tileSize[0] / 2 + val[0] -** Processing line: ~ #Uses y = (m) * (x - x1) + y1 to determine the y values for the two diamond lines on the right half of diamond~ + def get_not_found args, req +** Processing line: ~ puts("METHOD: #{req.method}");~ - Inside source: true *** True Line Result - #Uses y = (m) * (x - x1) + y1 to determine the y values for the two diamond lines on the right half of diamond -** Processing line: ~ tempY1 = (m * (x - val[0] - (state.tileSize[0] / 2))) + val[1]~ + puts("METHOD: #{req.method}"); +** Processing line: ~ puts("URI: #{req.uri}");~ - Inside source: true *** True Line Result - tempY1 = (m * (x - val[0] - (state.tileSize[0] / 2))) + val[1] -** Processing line: ~ tempY2 = (-1 * m * (x - val[0] - (state.tileSize[0] / 2))) + val[1] + state.tileSize[1]~ + puts("URI: #{req.uri}"); +** Processing line: ~ puts("HEADERS:");~ - Inside source: true *** True Line Result - tempY2 = (-1 * m * (x - val[0] - (state.tileSize[0] / 2))) + val[1] + state.tileSize[1] -** Processing line: ~ #Checks to see if the mouse click y value is between those temp y values~ + puts("HEADERS:"); +** Processing line: ~ req.headers.each { |k,v| puts(" #{k}: #{v}") }~ - Inside source: true *** True Line Result - #Checks to see if the mouse click y value is between those temp y values -** Processing line: ~ tempBool = true if y > tempY1 && y < tempY2~ + req.headers.each { |k,v| puts(" #{k}: #{v}") } +** Processing line: ~ req.respond 404, "not found: #{req.uri}", { }~ - Inside source: true *** True Line Result - tempBool = true if y > tempY1 && y < tempY2 -** Processing line: ~ end~ + req.respond 404, "not found: #{req.uri}", { } +** Processing line: ~ end~ - Inside source: true *** True Line Result - end + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ if tempBool == true~ +** Processing line: ~ def get_docs_html args, req~ - Inside source: true *** True Line Result - if tempBool == true -** Processing line: ~ state.currentSpriteLocation = val[5] #Current sprite location set to the order value~ + def get_docs_html args, req +** Processing line: ~ req.respond 200,~ - Inside source: true *** True Line Result - state.currentSpriteLocation = val[5] #Current sprite location set to the order value -** Processing line: ~ end~ + req.respond 200, +** Processing line: ~ args.gtk.read_file("docs/docs.html"),~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + args.gtk.read_file("docs/docs.html"), +** Processing line: ~ { 'Content-Type' => 'text/html' }~ - Inside source: true *** True Line Result - end + { 'Content-Type' => 'text/html' } ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -147255,34 +153446,22 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def process_inputs~ -- Inside source: true -*** True Line Result - def process_inputs -** Processing line: ~ #Makes development much faster and easier~ -- Inside source: true -*** True Line Result - #Makes development much faster and easier -** Processing line: ~ if inputs.keyboard.key_up.r~ +** Processing line: ~ def get_docs_css args, req~ - Inside source: true *** True Line Result - if inputs.keyboard.key_up.r -** Processing line: ~ $dragon.reset~ -- Inside source: true -*** True Line Result - $dragon.reset -** Processing line: ~ end~ + def get_docs_css args, req +** Processing line: ~ req.respond 200,~ - Inside source: true *** True Line Result - end -** Processing line: ~ checkTileSelected~ + req.respond 200, +** Processing line: ~ args.gtk.read_file("docs/docs.css"),~ - Inside source: true *** True Line Result - checkTileSelected -** Processing line: ~ switchModes~ + args.gtk.read_file("docs/docs.css"), +** Processing line: ~ { 'Content-Type' => 'text/css' }~ - Inside source: true *** True Line Result - switchModes + { 'Content-Type' => 'text/css' } ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -147291,1394 +153470,1430 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def checkTileSelected~ +** Processing line: ~ def get_docs_search_gif args, req~ - Inside source: true *** True Line Result - def checkTileSelected -** Processing line: ~ if inputs.mouse.down~ + def get_docs_search_gif args, req +** Processing line: ~ req.respond 200,~ - Inside source: true *** True Line Result - if inputs.mouse.down -** Processing line: ~ x = inputs.mouse.down.point.x~ + req.respond 200, +** Processing line: ~ args.gtk.read_file("docs/docs_search.gif"),~ - Inside source: true *** True Line Result - x = inputs.mouse.down.point.x -** Processing line: ~ y = inputs.mouse.down.point.y~ + args.gtk.read_file("docs/docs_search.gif"), +** Processing line: ~ { 'Content-Type' => 'image/gif' }~ - Inside source: true *** True Line Result - y = inputs.mouse.down.point.y -** Processing line: ~ m = (state.tileSize[1] / state.tileSize[0]) #slope~ + { 'Content-Type' => 'image/gif' } +** Processing line: ~ end~ - Inside source: true *** True Line Result - m = (state.tileSize[1] / state.tileSize[0]) #slope -** Processing line: ~ state.tileCords.map do~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - state.tileCords.map do -** Processing line: ~ |val|~ + +** Processing line: ~ def get_src_backup_index_html args, req~ - Inside source: true *** True Line Result - |val| -** Processing line: ~ #Conditions that makes runtime faster. Checks if the mouse click was between tile dimensions (rectangle collision)~ + def get_src_backup_index_html args, req +** Processing line: ~ req.respond 200,~ - Inside source: true *** True Line Result - #Conditions that makes runtime faster. Checks if the mouse click was between tile dimensions (rectangle collision) -** Processing line: ~ next unless val[0] < x && x < val[0] + state.tileSize[0]~ + req.respond 200, +** Processing line: ~ args.gtk.read_file("/tmp/src_backup/src_backup_index.html"),~ - Inside source: true *** True Line Result - next unless val[0] < x && x < val[0] + state.tileSize[0] -** Processing line: ~ next unless val[1] < y && y < val[1] + state.tileSize[1]~ + args.gtk.read_file("/tmp/src_backup/src_backup_index.html"), +** Processing line: ~ { 'Content-Type' => 'text/html' }~ - Inside source: true *** True Line Result - next unless val[1] < y && y < val[1] + state.tileSize[1] -** Processing line: ~ next unless val[2] == true~ + { 'Content-Type' => 'text/html' } +** Processing line: ~ end~ - Inside source: true *** True Line Result - next unless val[2] == true -** Processing line: ~ tempBool = false~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - tempBool = false -** Processing line: ~ if x == val[0] + (state.tileSize[0] / 2)~ + +** Processing line: ~ def get_src_backup_index_txt args, req~ - Inside source: true *** True Line Result - if x == val[0] + (state.tileSize[0] / 2) -** Processing line: ~ #The height of a diamond is the height of the diamond, so if x equals that exact point, it must be inside the diamond~ + def get_src_backup_index_txt args, req +** Processing line: ~ req.respond 200,~ +- Inside source: true +*** True Line Result + req.respond 200, +** Processing line: ~ args.gtk.read_file("/tmp/src_backup/src_backup_index.txt"),~ - Inside source: true *** True Line Result - #The height of a diamond is the height of the diamond, so if x equals that exact point, it must be inside the diamond -** Processing line: ~ tempBool = true~ + args.gtk.read_file("/tmp/src_backup/src_backup_index.txt"), +** Processing line: ~ { 'Content-Type' => 'text/txt' }~ - Inside source: true *** True Line Result - tempBool = true -** Processing line: ~ elsif x < state.tileSize[0] / 2 + val[0]~ + { 'Content-Type' => 'text/txt' } +** Processing line: ~ end~ - Inside source: true *** True Line Result - elsif x < state.tileSize[0] / 2 + val[0] -** Processing line: ~ #Uses y = (m) * (x - x1) + y1 to determine the y values for the two diamond lines on the left half of diamond~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - #Uses y = (m) * (x - x1) + y1 to determine the y values for the two diamond lines on the left half of diamond -** Processing line: ~ tempY1 = (m * (x - val[0])) + val[1] + (state.tileSize[1] / 2)~ + +** Processing line: ~ def get_src_backup_css args, req~ - Inside source: true *** True Line Result - tempY1 = (m * (x - val[0])) + val[1] + (state.tileSize[1] / 2) -** Processing line: ~ tempY2 = (-1 * m * (x - val[0])) + val[1] + (state.tileSize[1] / 2)~ + def get_src_backup_css args, req +** Processing line: ~ req.respond 200,~ - Inside source: true *** True Line Result - tempY2 = (-1 * m * (x - val[0])) + val[1] + (state.tileSize[1] / 2) -** Processing line: ~ #Checks to see if the mouse click y value is between those temp y values~ + req.respond 200, +** Processing line: ~ args.gtk.read_file("/tmp/src_backup/src_backup.css"),~ - Inside source: true *** True Line Result - #Checks to see if the mouse click y value is between those temp y values -** Processing line: ~ tempBool = true if y < tempY1 && y > tempY2~ + args.gtk.read_file("/tmp/src_backup/src_backup.css"), +** Processing line: ~ { 'Content-Type' => 'text/css' }~ - Inside source: true *** True Line Result - tempBool = true if y < tempY1 && y > tempY2 -** Processing line: ~ elsif x > state.tileSize[0] / 2 + val[0]~ + { 'Content-Type' => 'text/css' } +** Processing line: ~ end~ - Inside source: true *** True Line Result - elsif x > state.tileSize[0] / 2 + val[0] -** Processing line: ~ #Uses y = (m) * (x - x1) + y1 to determine the y values for the two diamond lines on the right half of diamond~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - #Uses y = (m) * (x - x1) + y1 to determine the y values for the two diamond lines on the right half of diamond -** Processing line: ~ tempY1 = (m * (x - val[0] - (state.tileSize[0] / 2))) + val[1]~ + +** Processing line: ~ def get_src_backup_changes_html args, req~ - Inside source: true *** True Line Result - tempY1 = (m * (x - val[0] - (state.tileSize[0] / 2))) + val[1] -** Processing line: ~ tempY2 = (-1 * m * (x - val[0] - (state.tileSize[0] / 2))) + val[1] + state.tileSize[1]~ + def get_src_backup_changes_html args, req +** Processing line: ~ req.respond 200,~ - Inside source: true *** True Line Result - tempY2 = (-1 * m * (x - val[0] - (state.tileSize[0] / 2))) + val[1] + state.tileSize[1] -** Processing line: ~ #Checks to see if the mouse click y value is between those temp y values~ + req.respond 200, +** Processing line: ~ args.gtk.read_file("/tmp/src_backup/src_backup_changes.html"),~ - Inside source: true *** True Line Result - #Checks to see if the mouse click y value is between those temp y values -** Processing line: ~ tempBool = true if y > tempY1 && y < tempY2~ + args.gtk.read_file("/tmp/src_backup/src_backup_changes.html"), +** Processing line: ~ { 'Content-Type' => 'text/html' }~ - Inside source: true *** True Line Result - tempBool = true if y > tempY1 && y < tempY2 -** Processing line: ~ end~ + { 'Content-Type' => 'text/html' } +** Processing line: ~ end~ - Inside source: true *** True Line Result - end + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ if tempBool == true~ +** Processing line: ~ def get_src_backup_changes_txt args, req~ - Inside source: true *** True Line Result - if tempBool == true -** Processing line: ~ if state.mode == :delete~ + def get_src_backup_changes_txt args, req +** Processing line: ~ req.respond 200,~ - Inside source: true *** True Line Result - if state.mode == :delete -** Processing line: ~ val[2] = false~ + req.respond 200, +** Processing line: ~ args.gtk.read_file("/tmp/src_backup/src_backup_changes.txt"),~ - Inside source: true *** True Line Result - val[2] = false -** Processing line: ~ state.tileGrid[val[5]][2] = false #Unnecessary because never used again but eh, I like consistency~ + args.gtk.read_file("/tmp/src_backup/src_backup_changes.txt"), +** Processing line: ~ { 'Content-Type' => 'text/txt' }~ - Inside source: true *** True Line Result - state.tileGrid[val[5]][2] = false #Unnecessary because never used again but eh, I like consistency -** Processing line: ~ state.tileCords[val[5]][2] = false #Ensures that the tile isn't rendered~ + { 'Content-Type' => 'text/txt' } +** Processing line: ~ end~ - Inside source: true *** True Line Result - state.tileCords[val[5]][2] = false #Ensures that the tile isn't rendered -** Processing line: ~ unless state.tileGrid[val[5]][0] == 0 #If tile is the left most tile in the row, right doesn't get rendered~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - unless state.tileGrid[val[5]][0] == 0 #If tile is the left most tile in the row, right doesn't get rendered -** Processing line: ~ state.tileGrid[val[5] - 1][4] = true #Why the order value is amazing~ + +** Processing line: ~ def get_api_eval args, req~ - Inside source: true *** True Line Result - state.tileGrid[val[5] - 1][4] = true #Why the order value is amazing -** Processing line: ~ state.tileCords[val[5] - 1][4] = true~ + def get_api_eval args, req +** Processing line: ~ eval_view = <<-S~ - Inside source: true *** True Line Result - state.tileCords[val[5] - 1][4] = true -** Processing line: ~ end~ + eval_view = <<-S +** Processing line: ~ ~ - Inside source: true *** True Line Result - end -** Processing line: ~ unless state.tileGrid[val[5]][1] == state.quantity - 1 #Same but left side~ + +** Processing line: ~ Eval~ - Inside source: true *** True Line Result - unless state.tileGrid[val[5]][1] == state.quantity - 1 #Same but left side -** Processing line: ~ state.tileGrid[val[5] + state.quantity][3] = true~ + Eval +** Processing line: ~ ~ - Inside source: true *** True Line Result - -** Processing line: ~ def switchModes~ + +** Processing line: ~ ~ - Inside source: true *** True Line Result - def switchModes -** Processing line: ~ #Switches between insert and delete modes~ + +** Processing line: ~ ~ - Inside source: true *** True Line Result - -** Processing line: ~ end~ + +** Processing line: ~
    ~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + +** Processing line: ~ ~ - Inside source: true *** True Line Result - -** Processing line: ~ $isometric = Isometric.new~ + +** Processing line: ~
    ~ - Inside source: true *** True Line Result - $isometric = Isometric.new -** Processing line: ~~ +
    +** Processing line: ~ ~ - Inside source: true *** True Line Result - -** Processing line: ~ def tick args~ + +** Processing line: ~
    ~ - Inside source: true *** True Line Result - def tick args -** Processing line: ~ $isometric.grid = args.grid~ + +** Processing line: ~
    curl -H "Content-Type: application/json" --data '{ "code": "$result = $args.state" }' -X POST http://localhost:9001/dragon/eval/
    ~ - Inside source: true *** True Line Result - $isometric.grid = args.grid -** Processing line: ~ $isometric.inputs = args.inputs~ +
    curl -H "Content-Type: application/json" --data '{ "code": "$result = $args.state" }' -X POST http://localhost:9001/dragon/eval/
    +** Processing line: ~
    Eval Result:
    ~ - Inside source: true *** True Line Result - $isometric.inputs = args.inputs -** Processing line: ~ $isometric.state = args.state~ +
    Eval Result:
    +** Processing line: ~
    ~
     - Inside source: true
     *** True Line Result
    -      $isometric.state   = args.state
    -** Processing line: ~      $isometric.outputs = args.outputs~
    +      
    
    +** Processing line: ~      #{links}~
     - Inside source: true
     *** True Line Result
    -      $isometric.outputs = args.outputs
    -** Processing line: ~      $isometric.tick~
    +      #{links}
    +** Processing line: ~    ~
     - Inside source: true
     *** True Line Result
    -      $isometric.tick
    -** Processing line: ~  end~
    +    
    +** Processing line: ~  ~
     - Inside source: true
     *** True Line Result
    -  end
    -** Processing line: ~~
    +  
    +** Processing line: ~  S~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~#+end_src~
    -- Line was identified as the end of a code block.
    +  S
    +** Processing line: ~        req.respond 200,~
    +- Inside source: true
     *** True Line Result
    -#+end_src
    -** Processing line: ~~
    -- End of paragraph detected.
    +        req.respond 200,
    +** Processing line: ~                    eval_view,~
    +- Inside source: true
     *** True Line Result
    -
    -** Processing line: ~*** Rpg Topdown - Topdown Starting Point - main.rb~
    -- Header detected.
    +                    eval_view,
    +** Processing line: ~                    { 'Content-Type' => 'text/html' }~
    +- Inside source: true
     *** True Line Result
    -
    +                    { 'Content-Type' => 'text/html' }
    +** Processing line: ~      end~
    +- Inside source: true
     *** True Line Result
    -*** Rpg Topdown - Topdown Starting Point - main.rb
    -** Processing line: ~#+begin_src ruby~
    -- Line was identified as the beginning of a code block.
    +      end
    +** Processing line: ~~
    +- Inside source: true
     *** True Line Result
     
    +** Processing line: ~      def post_api_eval args, req~
    +- Inside source: true
     *** True Line Result
    -#+begin_src ruby
    -** Processing line: ~  # ./samples/99_genre_rpg_topdown/topdown_starting_point/app/main.rb~
    +      def post_api_eval args, req
    +** Processing line: ~        if json? req~
     - Inside source: true
     *** True Line Result
    -  # ./samples/99_genre_rpg_topdown/topdown_starting_point/app/main.rb
    -** Processing line: ~  =begin~
    +        if json? req
    +** Processing line: ~          code = ($gtk.parse_json req.body)["code"]~
     - Inside source: true
     *** True Line Result
    -  =begin
    -** Processing line: ~~
    +          code = ($gtk.parse_json req.body)["code"]
    +** Processing line: ~          code = code.gsub("$result", "$eval_result")~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   APIs listing that haven't been encountered in previous sample apps:~
    +          code = code.gsub("$result", "$eval_result")
    +** Processing line: ~          Object.new.instance_eval do~
     - Inside source: true
     *** True Line Result
    -   APIs listing that haven't been encountered in previous sample apps:
    -** Processing line: ~~
    +          Object.new.instance_eval do
    +** Processing line: ~            begin~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   - reverse: Returns a new string with the characters from original string in reverse order.~
    +            begin
    +** Processing line: ~              Kernel.eval code~
     - Inside source: true
     *** True Line Result
    -   - reverse: Returns a new string with the characters from original string in reverse order.
    -** Processing line: ~     For example, the command~
    +              Kernel.eval code
    +** Processing line: ~            rescue Exception => e~
     - Inside source: true
     *** True Line Result
    -     For example, the command
    -** Processing line: ~     "dragonruby".reverse~
    +            rescue Exception => e
    +** Processing line: ~              $eval_result = e~
     - Inside source: true
     *** True Line Result
    -     "dragonruby".reverse
    -** Processing line: ~     would return the string~
    +              $eval_result = e
    +** Processing line: ~            end~
     - Inside source: true
     *** True Line Result
    -     would return the string
    -** Processing line: ~     "yburnogard".~
    +            end
    +** Processing line: ~          end~
     - Inside source: true
     *** True Line Result
    -     "yburnogard".
    -** Processing line: ~     Reverse is not only limited to strings, but can be applied to arrays and other collections.~
    +          end
    +** Processing line: ~        end~
     - Inside source: true
     *** True Line Result
    -     Reverse is not only limited to strings, but can be applied to arrays and other collections.
    +        end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~   Reminders:~
    +** Processing line: ~        req.respond 200,~
     - Inside source: true
     *** True Line Result
    -   Reminders:
    -** Processing line: ~~
    +        req.respond 200,
    +** Processing line: ~                    "#{$eval_result || $eval_results || "nil"}",~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~   - ARRAY#intersect_rect?: Returns true or false depending on if two rectangles intersect.~
    +                    "#{$eval_result || $eval_results || "nil"}",
    +** Processing line: ~                    { 'Content-Type' => 'text/plain' }~
     - Inside source: true
     *** True Line Result
    -   - ARRAY#intersect_rect?: Returns true or false depending on if two rectangles intersect.
    +                    { 'Content-Type' => 'text/plain' }
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~   - args.outputs.labels: An array. The values generate a label.~
    +** Processing line: ~        $eval_result  = nil~
     - Inside source: true
     *** True Line Result
    -   - args.outputs.labels: An array. The values generate a label.
    -** Processing line: ~     The parameters are [X, Y, TEXT, SIZE, ALIGNMENT, RED, GREEN, BLUE, ALPHA, FONT STYLE]~
    +        $eval_result  = nil
    +** Processing line: ~        $eval_results = nil~
     - Inside source: true
     *** True Line Result
    -     The parameters are [X, Y, TEXT, SIZE, ALIGNMENT, RED, GREEN, BLUE, ALPHA, FONT STYLE]
    -** Processing line: ~     For more information about labels, go to mygame/documentation/02-labels.md.~
    +        $eval_results = nil
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -     For more information about labels, go to mygame/documentation/02-labels.md.
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  =end~
    +** Processing line: ~      def api_css_string~
     - Inside source: true
     *** True Line Result
    -  =end
    +      def api_css_string
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # This code shows a maze and uses input from the keyboard to move the user around the screen.~
    -- Inside source: true
    -*** True Line Result
    -  # This code shows a maze and uses input from the keyboard to move the user around the screen.
    -** Processing line: ~  # The objective is to reach the goal.~
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -  # The objective is to reach the goal.
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~  # Sets values of tile size and player's movement speed~
    -- Inside source: true
    -*** True Line Result
    -  # Sets values of tile size and player's movement speed
    -** Processing line: ~  # Also creates tile or box for player and generates map~
    +** Processing line: ~      def get_api_console args, req~
     - Inside source: true
     *** True Line Result
    -  # Also creates tile or box for player and generates map
    -** Processing line: ~  def tick args~
    +      def get_api_console args, req
    +** Processing line: ~        html = console_view "# write your code here and set $result.\n$result = $gtk.args.state"~
     - Inside source: true
     *** True Line Result
    -  def tick args
    -** Processing line: ~    args.state.tile_size     = 80~
    +        html = console_view "# write your code here and set $result.\n$result = $gtk.args.state"
    +** Processing line: ~        req.respond 200,~
     - Inside source: true
     *** True Line Result
    -    args.state.tile_size     = 80
    -** Processing line: ~    args.state.player_speed  = 4~
    +        req.respond 200,
    +** Processing line: ~                    html,~
     - Inside source: true
     *** True Line Result
    -    args.state.player_speed  = 4
    -** Processing line: ~    args.state.player      ||= tile(args, 7, 3, 0, 128, 180)~
    +                    html,
    +** Processing line: ~                    { 'Content-Type' => 'text/html' }~
     - Inside source: true
     *** True Line Result
    -    args.state.player      ||= tile(args, 7, 3, 0, 128, 180)
    -** Processing line: ~    generate_map args~
    +                    { 'Content-Type' => 'text/html' }
    +** Processing line: ~      end~
     - Inside source: true
     *** True Line Result
    -    generate_map args
    +      end
     ** Processing line: ~~
     - Inside source: true
     *** True Line Result
     
    -** Processing line: ~    # Adds walls, goal, and player to args.outputs.solids so they appear on screen~
    -- Inside source: true
    -*** True Line Result
    -    # Adds walls, goal, and player to args.outputs.solids so they appear on screen
    -** Processing line: ~    args.outputs.solids << args.state.walls~
    +** Processing line: ~      def control_panel_view~
     - Inside source: true
     *** True Line Result
    -    args.outputs.solids << args.state.walls
    -** Processing line: ~    args.outputs.solids << args.state.goal~
    +      def control_panel_view
    +** Processing line: ~        <<-S~
     - Inside source: true
     *** True Line Result
    -    args.outputs.solids << args.state.goal
    -** Processing line: ~    args.outputs.solids << args.state.player~
    +        <<-S
    +** Processing line: ~  ~
     - Inside source: true
     *** True Line Result
    -    args.outputs.solids << args.state.player
    -** Processing line: ~~
    +  
    +** Processing line: ~    console~
     - Inside source: true
     *** True Line Result
    -
    -** Processing line: ~    # If player's box intersects with goal, a label is output onto the screen~
    +    console
    +** Processing line: ~    ~
     - Inside source: true
     *** True Line Result
    -    # If player's box intersects with goal, a label is output onto the screen
    -** Processing line: ~    if args.state.player.intersect_rect? args.state.goal~
    +    
    +** Processing line: ~      ~
     - Inside source: true
     *** True Line Result
    -  # Sets position, size, and color of the tile
    -** Processing line: ~  def tile args, x, y, *color~
    +      
    +** Processing line: ~      
    ~ - Inside source: true *** True Line Result - def tile args, x, y, *color -** Processing line: ~ [x * args.state.tile_size, # sets definition for array using method parameters~ + +** Processing line: ~ ~ - Inside source: true *** True Line Result - [x * args.state.tile_size, # sets definition for array using method parameters -** Processing line: ~ y * args.state.tile_size, # multiplying by tile_size sets x and y to correct position using pixel values~ + +** Processing line: ~
    ~ - Inside source: true *** True Line Result - y * args.state.tile_size, # multiplying by tile_size sets x and y to correct position using pixel values -** Processing line: ~ args.state.tile_size,~ + +** Processing line: ~
    ~ - Inside source: true *** True Line Result - args.state.tile_size, -** Processing line: ~ args.state.tile_size,~ + +** Processing line: ~ ~ - Inside source: true *** True Line Result - args.state.tile_size, -** Processing line: ~ *color]~ + +** Processing line: ~
    ~ - Inside source: true *** True Line Result - *color] -** Processing line: ~ end~ + +** Processing line: ~
    ~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + +** Processing line: ~ ~ - Inside source: true *** True Line Result - -** Processing line: ~ # Creates map by adding tiles to the wall, as well as a goal (that the player needs to reach)~ + +** Processing line: ~
    ~ - Inside source: true *** True Line Result - # Creates map by adding tiles to the wall, as well as a goal (that the player needs to reach) -** Processing line: ~ def generate_map args~ + +** Processing line: ~
    ~ - Inside source: true *** True Line Result - def generate_map args -** Processing line: ~ return if args.state.area~ + +** Processing line: ~ ~ - Inside source: true *** True Line Result - return if args.state.area -** Processing line: ~~ + +** Processing line: ~
    ~ - Inside source: true *** True Line Result - -** Processing line: ~ # Creates the area of the map. There are 9 rows running horizontally across the screen~ + +** Processing line: ~
    ~ - Inside source: true *** True Line Result - # Creates the area of the map. There are 9 rows running horizontally across the screen -** Processing line: ~ # and 16 columns running vertically on the screen. Any spot with a "1" is not~ + +** Processing line: ~ ~ - Inside source: true *** True Line Result - # and 16 columns running vertically on the screen. Any spot with a "1" is not -** Processing line: ~ # open for the player to move into (and is green), and any spot with a "0" is available~ + +** Processing line: ~
    ~ - Inside source: true *** True Line Result - # open for the player to move into (and is green), and any spot with a "0" is available -** Processing line: ~ # for the player to move in.~ + +** Processing line: ~
    ~ - Inside source: true *** True Line Result - # for the player to move in. -** Processing line: ~ args.state.area = [~ +
    +** Processing line: ~ #{links}~ - Inside source: true *** True Line Result - args.state.area = [ -** Processing line: ~ [1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1,],~ + #{links} +** Processing line: ~ ~ - Inside source: true *** True Line Result - [1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1,], -** Processing line: ~ [1, 1, 1, 2, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1,], # the "2" represents the goal~ + +** Processing line: ~ ~ - Inside source: true *** True Line Result - [1, 1, 1, 2, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1,], # the "2" represents the goal -** Processing line: ~ [1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1,],~ + +** Processing line: ~ S~ - Inside source: true *** True Line Result - [1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1,], -** Processing line: ~ [1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1,],~ + S +** Processing line: ~ end~ - Inside source: true *** True Line Result - [1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1,], -** Processing line: ~ [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,],~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,], -** Processing line: ~ [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1,],~ + +** Processing line: ~ def get_api_control_panel args, req~ - Inside source: true *** True Line Result - [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1,], -** Processing line: ~ [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1,],~ + def get_api_control_panel args, req +** Processing line: ~ req.respond 200,~ - Inside source: true *** True Line Result - [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1,], -** Processing line: ~ [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,],~ + req.respond 200, +** Processing line: ~ control_panel_view,~ - Inside source: true *** True Line Result - [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,], -** Processing line: ~ [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ],~ + control_panel_view, +** Processing line: ~ { 'Content-Type' => 'text/html' }~ - Inside source: true *** True Line Result - [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], -** Processing line: ~ ].reverse # reverses the order of the area collection~ + { 'Content-Type' => 'text/html' } +** Processing line: ~ end~ - Inside source: true *** True Line Result - ].reverse # reverses the order of the area collection + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # By reversing the order, the way that the area appears above is how it appears~ +** Processing line: ~ def json? req~ - Inside source: true *** True Line Result - # By reversing the order, the way that the area appears above is how it appears -** Processing line: ~ # on the screen in the game. If we did not reverse, the map would appear inverted.~ + def json? req +** Processing line: ~ req.headers.find { |k, v| k == "Content-Type" && (v.include? "application/json") }~ - Inside source: true *** True Line Result - # on the screen in the game. If we did not reverse, the map would appear inverted. + req.headers.find { |k, v| k == "Content-Type" && (v.include? "application/json") } +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ #The wall starts off with no tiles.~ +** Processing line: ~ def post_api_reset args, req~ - Inside source: true *** True Line Result - #The wall starts off with no tiles. -** Processing line: ~ args.state.walls = []~ + def post_api_reset args, req +** Processing line: ~ $gtk.reset if json? req~ - Inside source: true *** True Line Result - args.state.walls = [] -** Processing line: ~~ + $gtk.reset if json? req +** Processing line: ~ req.respond 200,~ - Inside source: true *** True Line Result - -** Processing line: ~ # If v is 1, a green tile is added to args.state.walls.~ + req.respond 200, +** Processing line: ~ control_panel_view,~ - Inside source: true *** True Line Result - # If v is 1, a green tile is added to args.state.walls. -** Processing line: ~ # If v is 2, a black tile is created as the goal.~ + control_panel_view, +** Processing line: ~ { 'Content-Type' => 'text/html' }~ - Inside source: true *** True Line Result - # If v is 2, a black tile is created as the goal. -** Processing line: ~ args.state.area.map_2d do |y, x, v|~ + { 'Content-Type' => 'text/html' } +** Processing line: ~ end~ - Inside source: true *** True Line Result - args.state.area.map_2d do |y, x, v| -** Processing line: ~ if v == 1~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - if v == 1 -** Processing line: ~ args.state.walls << tile(args, x, y, 0, 255, 0) # green tile~ + +** Processing line: ~ def post_api_record args, req~ - Inside source: true *** True Line Result - args.state.walls << tile(args, x, y, 0, 255, 0) # green tile -** Processing line: ~ elsif v == 2 # notice there is only one "2" above because there is only one single goal~ + def post_api_record args, req +** Processing line: ~ $recording.start 100 if json? req~ - Inside source: true *** True Line Result - elsif v == 2 # notice there is only one "2" above because there is only one single goal -** Processing line: ~ args.state.goal = tile(args, x, y, 0, 0, 0) # black tile~ + $recording.start 100 if json? req +** Processing line: ~ req.respond 200,~ - Inside source: true *** True Line Result - args.state.goal = tile(args, x, y, 0, 0, 0) # black tile -** Processing line: ~ end~ + req.respond 200, +** Processing line: ~ control_panel_view,~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + control_panel_view, +** Processing line: ~ { 'Content-Type' => 'text/html' }~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + { 'Content-Type' => 'text/html' } +** Processing line: ~ end~ - Inside source: true *** True Line Result - end + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Allows the player to move their box around the screen~ +** Processing line: ~ def post_api_record_stop args, req~ - Inside source: true *** True Line Result - # Allows the player to move their box around the screen -** Processing line: ~ def move_player args, *vector~ -- Inside source: true -*** True Line Result - def move_player args, *vector -** Processing line: ~ box = args.state.player.shift_rect(vector) # box is able to move at an angle~ + def post_api_record_stop args, req +** Processing line: ~ $recording.stop 'replay.txt' if json? req~ - Inside source: true *** True Line Result - box = args.state.player.shift_rect(vector) # box is able to move at an angle -** Processing line: ~~ + $recording.stop 'replay.txt' if json? req +** Processing line: ~ req.respond 200,~ - Inside source: true *** True Line Result - -** Processing line: ~ # If the player's box hits a wall, it is not able to move further in that direction~ + req.respond 200, +** Processing line: ~ control_panel_view,~ - Inside source: true *** True Line Result - # If the player's box hits a wall, it is not able to move further in that direction -** Processing line: ~ return if args.state.walls~ + control_panel_view, +** Processing line: ~ { 'Content-Type' => 'text/html' }~ - Inside source: true *** True Line Result - return if args.state.walls -** Processing line: ~ .any_intersect_rect?(box)~ + { 'Content-Type' => 'text/html' } +** Processing line: ~ end~ - Inside source: true *** True Line Result - .any_intersect_rect?(box) + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Player's box is able to move at angles (not just the four general directions) fast~ +** Processing line: ~ def post_api_replay args, req~ - Inside source: true *** True Line Result - # Player's box is able to move at angles (not just the four general directions) fast -** Processing line: ~ args.state.player =~ + def post_api_replay args, req +** Processing line: ~ $replay.start 'replay.txt' if json? req~ - Inside source: true *** True Line Result - args.state.player = -** Processing line: ~ args.state.player~ + $replay.start 'replay.txt' if json? req +** Processing line: ~ req.respond 200,~ - Inside source: true *** True Line Result - args.state.player -** Processing line: ~ .shift_rect(vector.x * args.state.player_speed, # if we don't multiply by speed, then~ + req.respond 200, +** Processing line: ~ control_panel_view,~ - Inside source: true *** True Line Result - .shift_rect(vector.x * args.state.player_speed, # if we don't multiply by speed, then -** Processing line: ~ vector.y * args.state.player_speed) # the box will move extremely slow~ + control_panel_view, +** Processing line: ~ { 'Content-Type' => 'text/html' }~ - Inside source: true *** True Line Result - vector.y * args.state.player_speed) # the box will move extremely slow -** Processing line: ~ end~ + { 'Content-Type' => 'text/html' } +** Processing line: ~ end~ - Inside source: true *** True Line Result - end + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~#+end_src~ -- Line was identified as the end of a code block. +** Processing line: ~ def post_api_show_console args, req~ +- Inside source: true *** True Line Result -#+end_src + def post_api_show_console args, req +** Processing line: ~ $gtk.console.show if json? req~ +- Inside source: true +*** True Line Result + $gtk.console.show if json? req +** Processing line: ~ req.respond 200,~ +- Inside source: true +*** True Line Result + req.respond 200, +** Processing line: ~ control_panel_view,~ +- Inside source: true +*** True Line Result + control_panel_view, +** Processing line: ~ { 'Content-Type' => 'text/html' }~ +- Inside source: true +*** True Line Result + { 'Content-Type' => 'text/html' } +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ -- End of paragraph detected. +- Inside source: true *** True Line Result -** Processing line: ~*** Teentiny - main.rb~ -- Header detected. +** Processing line: ~ def tick args~ +- Inside source: true *** True Line Result - + def tick args +** Processing line: ~ args.inputs.http_requests.each do |req|~ +- Inside source: true *** True Line Result -*** Teentiny - main.rb -** Processing line: ~#+begin_src ruby~ -- Line was identified as the beginning of a code block. + args.inputs.http_requests.each do |req| +** Processing line: ~ match_candidate = { method: req.method.downcase.to_sym,~ +- Inside source: true *** True Line Result - + match_candidate = { method: req.method.downcase.to_sym, +** Processing line: ~ uri: req.uri,~ +- Inside source: true *** True Line Result -#+begin_src ruby -** Processing line: ~ # ./samples/99_genre_teentiny/app/main.rb~ + uri: req.uri, +** Processing line: ~ uri_without_query_string: (req.uri.split '?').first,~ - Inside source: true *** True Line Result - # ./samples/99_genre_teentiny/app/main.rb -** Processing line: ~ # full documenation is at http://docs.dragonruby.org~ + uri_without_query_string: (req.uri.split '?').first, +** Processing line: ~ query_string: (req.uri.split '?').last,~ - Inside source: true *** True Line Result - # full documenation is at http://docs.dragonruby.org -** Processing line: ~ # be sure to come to the discord if you hit any snags: http://discord.dragonruby.org~ + query_string: (req.uri.split '?').last, +** Processing line: ~ has_query_string: !!(req.uri.split '?').last,~ - Inside source: true *** True Line Result - # be sure to come to the discord if you hit any snags: http://discord.dragonruby.org -** Processing line: ~ def tick args~ + has_query_string: !!(req.uri.split '?').last, +** Processing line: ~ has_api_prefix: (req.uri.start_with? "/dragon"),~ - Inside source: true *** True Line Result - def tick args -** Processing line: ~ # ====================================================~ + has_api_prefix: (req.uri.start_with? "/dragon"), +** Processing line: ~ end_with_rb: (req.uri.end_with? ".rb"),~ - Inside source: true *** True Line Result - # ==================================================== -** Processing line: ~ # initialize default variables~ + end_with_rb: (req.uri.end_with? ".rb"), +** Processing line: ~ has_file_extension: file_extensions.find { |f| req.uri.include? f },~ - Inside source: true *** True Line Result - # initialize default variables -** Processing line: ~ # ====================================================~ + has_file_extension: file_extensions.find { |f| req.uri.include? f }, +** Processing line: ~ has_trailing_slash: (req.uri.split('?').first.end_with? "/") }~ - Inside source: true *** True Line Result - # ==================================================== + has_trailing_slash: (req.uri.split('?').first.end_with? "/") } ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # ruby has an operator called ||= which means "only initialize this if it's nil"~ +** Processing line: ~ if !match_candidate[:has_file_extension]~ - Inside source: true *** True Line Result - # ruby has an operator called ||= which means "only initialize this if it's nil" -** Processing line: ~ args.state.count_down ||= 20 * 60 # set the count down to 20 seconds~ + if !match_candidate[:has_file_extension] +** Processing line: ~ if !match_candidate[:has_trailing_slash]~ - Inside source: true *** True Line Result - args.state.count_down ||= 20 * 60 # set the count down to 20 seconds -** Processing line: ~ # set the initial position of the target~ + if !match_candidate[:has_trailing_slash] +** Processing line: ~ match_candidate[:uri] = match_candidate[:uri_without_query_string] + "/"~ - Inside source: true *** True Line Result - # set the initial position of the target -** Processing line: ~ args.state.target ||= { x: args.grid.w.half,~ + match_candidate[:uri] = match_candidate[:uri_without_query_string] + "/" +** Processing line: ~ if match_candidate[:query_string]~ - Inside source: true *** True Line Result - args.state.target ||= { x: args.grid.w.half, -** Processing line: ~ y: args.grid.h.half,~ + if match_candidate[:query_string] +** Processing line: ~ match_candidate[:uri] += "?#{match_candidate[:query_string]}"~ - Inside source: true *** True Line Result - y: args.grid.h.half, -** Processing line: ~ w: 20,~ + match_candidate[:uri] += "?#{match_candidate[:query_string]}" +** Processing line: ~ end~ - Inside source: true *** True Line Result - w: 20, -** Processing line: ~ h: 20 }~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - h: 20 } + end +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # set the initial position of the player~ +** Processing line: ~ context = { args: args, req: req, match_candidate: match_candidate }~ - Inside source: true *** True Line Result - # set the initial position of the player -** Processing line: ~ args.state.player ||= { x: 50,~ + context = { args: args, req: req, match_candidate: match_candidate } +** Processing line: ~~ - Inside source: true *** True Line Result - args.state.player ||= { x: 50, -** Processing line: ~ y: 50,~ + +** Processing line: ~ process! context: context, routes: routes~ - Inside source: true *** True Line Result - y: 50, -** Processing line: ~ w: 20,~ + process! context: context, routes: routes +** Processing line: ~ end~ - Inside source: true *** True Line Result - w: 20, -** Processing line: ~ h: 20 }~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - h: 20 } + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # set the player movement speed~ +** Processing line: ~ def url_decode args, string~ - Inside source: true *** True Line Result - # set the player movement speed -** Processing line: ~ args.state.player_speed ||= 5~ + def url_decode args, string +** Processing line: ~ args.fn.gsub string,~ - Inside source: true *** True Line Result - args.state.player_speed ||= 5 -** Processing line: ~~ + args.fn.gsub string, +** Processing line: ~ '+', " ",~ - Inside source: true *** True Line Result - -** Processing line: ~ # set the score~ + '+', " ", +** Processing line: ~ '%27', "'",~ - Inside source: true *** True Line Result - # set the score -** Processing line: ~ args.state.score ||= 0~ + '%27', "'", +** Processing line: ~ '%22', '"',~ - Inside source: true *** True Line Result - args.state.score ||= 0 -** Processing line: ~ args.state.teleports ||= 3~ + '%22', '"', +** Processing line: ~ '%0D%0A', "\n",~ - Inside source: true *** True Line Result - args.state.teleports ||= 3 -** Processing line: ~~ + '%0D%0A', "\n", +** Processing line: ~ '%3D', "=",~ - Inside source: true *** True Line Result - -** Processing line: ~ # set the instructions~ + '%3D', "=", +** Processing line: ~ '%3B', ";",~ - Inside source: true *** True Line Result - # set the instructions -** Processing line: ~ args.state.instructions ||= "Get to the red goal! Use arrow keys to move. Spacebar to teleport (use them carefully)!"~ + '%3B', ";", +** Processing line: ~ '%7C', "|",~ - Inside source: true *** True Line Result - args.state.instructions ||= "Get to the red goal! Use arrow keys to move. Spacebar to teleport (use them carefully)!" -** Processing line: ~~ + '%7C', "|", +** Processing line: ~ '%28', "(",~ - Inside source: true *** True Line Result - -** Processing line: ~ # ====================================================~ + '%28', "(", +** Processing line: ~ '%29', ")",~ - Inside source: true *** True Line Result - # ==================================================== -** Processing line: ~ # render the game~ + '%29', ")", +** Processing line: ~ '%7B', "{",~ - Inside source: true *** True Line Result - # render the game -** Processing line: ~ # ====================================================~ + '%7B', "{", +** Processing line: ~ '%7D', "}",~ - Inside source: true *** True Line Result - # ==================================================== -** Processing line: ~ args.outputs.labels << { x: args.grid.w.half, y: args.grid.h - 10,~ + '%7D', "}", +** Processing line: ~ '%2C', ",",~ - Inside source: true *** True Line Result - args.outputs.labels << { x: args.grid.w.half, y: args.grid.h - 10, -** Processing line: ~ text: args.state.instructions,~ + '%2C', ",", +** Processing line: ~ '%3A', ":",~ - Inside source: true *** True Line Result - text: args.state.instructions, -** Processing line: ~ alignment_enum: 1 }~ + '%3A', ":", +** Processing line: ~ '%5B', "[",~ - Inside source: true *** True Line Result - alignment_enum: 1 } -** Processing line: ~~ + '%5B', "[", +** Processing line: ~ '%5D', "]",~ - Inside source: true *** True Line Result - -** Processing line: ~ # check if it's game over. if so, then render game over~ + '%5D', "]", +** Processing line: ~ '%23', "#",~ - Inside source: true *** True Line Result - # check if it's game over. if so, then render game over -** Processing line: ~ # otherwise render the current time left~ + '%23', "#", +** Processing line: ~ '%21', "!",~ - Inside source: true *** True Line Result - # otherwise render the current time left -** Processing line: ~ if game_over? args~ + '%21', "!", +** Processing line: ~ '%3C', "<",~ - Inside source: true *** True Line Result - if game_over? args -** Processing line: ~ args.outputs.labels << { x: args.grid.w.half,~ + '%3C', "<", +** Processing line: ~ '%3E', ">",~ - Inside source: true *** True Line Result - args.outputs.labels << { x: args.grid.w.half, -** Processing line: ~ y: args.grid.h - 40,~ + '%3E', ">", +** Processing line: ~ '%2B', "+",~ - Inside source: true *** True Line Result - y: args.grid.h - 40, -** Processing line: ~ text: "game over! (press r to start over)",~ + '%2B', "+", +** Processing line: ~ '%2F', "/",~ - Inside source: true *** True Line Result - text: "game over! (press r to start over)", -** Processing line: ~ alignment_enum: 1 }~ + '%2F', "/", +** Processing line: ~ '%40', "@",~ - Inside source: true *** True Line Result - alignment_enum: 1 } -** Processing line: ~ else~ + '%40', "@", +** Processing line: ~ '%3F', "?",~ - Inside source: true *** True Line Result - else -** Processing line: ~ args.outputs.labels << { x: args.grid.w.half,~ + '%3F', "?", +** Processing line: ~ '%26', "&",~ - Inside source: true *** True Line Result - args.outputs.labels << { x: args.grid.w.half, -** Processing line: ~ y: args.grid.h - 40,~ + '%26', "&", +** Processing line: ~ '%24', "$",~ - Inside source: true *** True Line Result - y: args.grid.h - 40, -** Processing line: ~ text: "time left: #{(args.state.count_down.idiv 60) + 1}",~ + '%24', "$", +** Processing line: ~ '%5C', "\\",~ - Inside source: true *** True Line Result - text: "time left: #{(args.state.count_down.idiv 60) + 1}", -** Processing line: ~ alignment_enum: 1 }~ + '%5C', "\\", +** Processing line: ~ '%60', "`",~ - Inside source: true *** True Line Result - alignment_enum: 1 } -** Processing line: ~ end~ + '%60', "`", +** Processing line: ~ '%7E', "~",~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + '%7E', "~", +** Processing line: ~ '%C2%B2', "²",~ - Inside source: true *** True Line Result - -** Processing line: ~ # render the score~ + '%C2%B2', "²", +** Processing line: ~ '%5E', "^",~ - Inside source: true *** True Line Result - # render the score -** Processing line: ~ args.outputs.labels << { x: args.grid.w.half,~ + '%5E', "^", +** Processing line: ~ '%C2%BA', "º",~ - Inside source: true *** True Line Result - args.outputs.labels << { x: args.grid.w.half, -** Processing line: ~ y: args.grid.h - 70,~ + '%C2%BA', "º", +** Processing line: ~ '%C2%A7', "§",~ - Inside source: true *** True Line Result - y: args.grid.h - 70, -** Processing line: ~ text: "score: #{args.state.score}",~ + '%C2%A7', "§", +** Processing line: ~ '%20', " ",~ - Inside source: true *** True Line Result - text: "score: #{args.state.score}", -** Processing line: ~ alignment_enum: 1 }~ + '%20', " ", +** Processing line: ~ '%0A', "\n",~ - Inside source: true *** True Line Result - alignment_enum: 1 } -** Processing line: ~~ + '%0A', "\n", +** Processing line: ~ '%25', "%",~ - Inside source: true *** True Line Result - -** Processing line: ~ # render the player with teleport count~ + '%25', "%", +** Processing line: ~ '%2A', "*"~ - Inside source: true *** True Line Result - # render the player with teleport count -** Processing line: ~ args.outputs.sprites << { x: args.state.player.x,~ + '%2A', "*" +** Processing line: ~ end~ - Inside source: true *** True Line Result - args.outputs.sprites << { x: args.state.player.x, -** Processing line: ~ y: args.state.player.y,~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - y: args.state.player.y, -** Processing line: ~ w: args.state.player.w,~ + +** Processing line: ~ def file_extensions~ - Inside source: true *** True Line Result - w: args.state.player.w, -** Processing line: ~ h: args.state.player.h,~ + def file_extensions +** Processing line: ~ [".html", ".css", ".gif", ".txt", ".ico", ".rb"]~ - Inside source: true *** True Line Result - h: args.state.player.h, -** Processing line: ~ path: 'sprites/square-green.png' }~ + [".html", ".css", ".gif", ".txt", ".ico", ".rb"] +** Processing line: ~ end~ - Inside source: true *** True Line Result - path: 'sprites/square-green.png' } + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ args.outputs.labels << { x: args.state.player.x + 10,~ +** Processing line: ~ def routes~ - Inside source: true *** True Line Result - args.outputs.labels << { x: args.state.player.x + 10, -** Processing line: ~ y: args.state.player.y + 40,~ + def routes +** Processing line: ~ [{ match_criteria: { method: :get, uri: "/" },~ - Inside source: true *** True Line Result - y: args.state.player.y + 40, -** Processing line: ~ text: "teleports: #{args.state.teleports}",~ + [{ match_criteria: { method: :get, uri: "/" }, +** Processing line: ~ handler: :get_index },~ - Inside source: true *** True Line Result - text: "teleports: #{args.state.teleports}", -** Processing line: ~ alignment_enum: 1, size_enum: -2 }~ + handler: :get_index }, +** Processing line: ~ { match_criteria: { method: :get, uri: "/dragon/" },~ - Inside source: true *** True Line Result - alignment_enum: 1, size_enum: -2 } -** Processing line: ~~ + { match_criteria: { method: :get, uri: "/dragon/" }, +** Processing line: ~ handler: :get_index },~ - Inside source: true *** True Line Result - -** Processing line: ~ # render the target~ + handler: :get_index }, +** Processing line: ~~ - Inside source: true *** True Line Result - # render the target -** Processing line: ~ args.outputs.sprites << { x: args.state.target.x,~ + +** Processing line: ~ { match_criteria: { method: :get, uri: "/dragon/boot/" },~ - Inside source: true *** True Line Result - args.outputs.sprites << { x: args.state.target.x, -** Processing line: ~ y: args.state.target.y,~ + { match_criteria: { method: :get, uri: "/dragon/boot/" }, +** Processing line: ~ handler: :get_api_boot },~ - Inside source: true *** True Line Result - y: args.state.target.y, -** Processing line: ~ w: args.state.target.w,~ + handler: :get_api_boot }, +** Processing line: ~ { match_criteria: { method: :get, uri: "/dragon/trace/" },~ - Inside source: true *** True Line Result - w: args.state.target.w, -** Processing line: ~ h: args.state.target.h,~ + { match_criteria: { method: :get, uri: "/dragon/trace/" }, +** Processing line: ~ handler: :get_api_trace },~ - Inside source: true *** True Line Result - h: args.state.target.h, -** Processing line: ~ path: 'sprites/square-red.png' }~ + handler: :get_api_trace }, +** Processing line: ~ { match_criteria: { method: :get, uri: "/dragon/puts/" },~ - Inside source: true *** True Line Result - path: 'sprites/square-red.png' } -** Processing line: ~~ + { match_criteria: { method: :get, uri: "/dragon/puts/" }, +** Processing line: ~ handler: :get_api_puts },~ - Inside source: true *** True Line Result - -** Processing line: ~ # ====================================================~ + handler: :get_api_puts }, +** Processing line: ~ { match_criteria: { method: :get, uri: "/dragon/log/" },~ - Inside source: true *** True Line Result - # ==================================================== -** Processing line: ~ # run simulation~ + { match_criteria: { method: :get, uri: "/dragon/log/" }, +** Processing line: ~ handler: :get_api_log },~ - Inside source: true *** True Line Result - # run simulation -** Processing line: ~ # ====================================================~ + handler: :get_api_log }, +** Processing line: ~ { match_criteria: { method: :post, uri: "/dragon/log/" },~ - Inside source: true *** True Line Result - # ==================================================== -** Processing line: ~~ + { match_criteria: { method: :post, uri: "/dragon/log/" }, +** Processing line: ~ handler: :post_api_log },~ - Inside source: true *** True Line Result - -** Processing line: ~ # count down calculation~ + handler: :post_api_log }, +** Processing line: ~ { match_criteria: { method: :get, uri: "/dragon/changes/" },~ - Inside source: true *** True Line Result - # count down calculation -** Processing line: ~ args.state.count_down -= 1~ + { match_criteria: { method: :get, uri: "/dragon/changes/" }, +** Processing line: ~ handler: :get_api_changes },~ - Inside source: true *** True Line Result - args.state.count_down -= 1 -** Processing line: ~ args.state.count_down = -1 if args.state.count_down < -1~ + handler: :get_api_changes }, +** Processing line: ~ { match_criteria: { method: :get, uri: "/dragon/eval/" },~ - Inside source: true *** True Line Result - args.state.count_down = -1 if args.state.count_down < -1 -** Processing line: ~~ + { match_criteria: { method: :get, uri: "/dragon/eval/" }, +** Processing line: ~ handler: :get_api_eval },~ - Inside source: true *** True Line Result - -** Processing line: ~ # ====================================================~ + handler: :get_api_eval }, +** Processing line: ~ { match_criteria: { method: :post, uri: "/dragon/eval/" },~ - Inside source: true *** True Line Result - # ==================================================== -** Processing line: ~ # process player input~ + { match_criteria: { method: :post, uri: "/dragon/eval/" }, +** Processing line: ~ handler: :post_api_eval },~ - Inside source: true *** True Line Result - # process player input -** Processing line: ~ # ====================================================~ + handler: :post_api_eval }, +** Processing line: ~ { match_criteria: { method: :get, uri: "/dragon/console/" },~ - Inside source: true *** True Line Result - # ==================================================== -** Processing line: ~ # if it isn't game over let them move~ + { match_criteria: { method: :get, uri: "/dragon/console/" }, +** Processing line: ~ handler: :get_api_console },~ - Inside source: true *** True Line Result - # if it isn't game over let them move -** Processing line: ~ if !game_over? args~ + handler: :get_api_console }, +** Processing line: ~ { match_criteria: { method: :post, uri: "/dragon/console/" },~ - Inside source: true *** True Line Result - if !game_over? args -** Processing line: ~ dir_y = 0~ + { match_criteria: { method: :post, uri: "/dragon/console/" }, +** Processing line: ~ handler: :post_api_console },~ - Inside source: true *** True Line Result - dir_y = 0 -** Processing line: ~ dir_x = 0~ + handler: :post_api_console }, +** Processing line: ~ { match_criteria: { method: :get, uri: "/dragon/control_panel/" },~ - Inside source: true *** True Line Result - dir_x = 0 -** Processing line: ~~ + { match_criteria: { method: :get, uri: "/dragon/control_panel/" }, +** Processing line: ~ handler: :get_api_control_panel },~ - Inside source: true *** True Line Result - -** Processing line: ~ # determine the change horizontally~ + handler: :get_api_control_panel }, +** Processing line: ~ { match_criteria: { method: :post, uri: "/dragon/reset/" },~ - Inside source: true *** True Line Result - # determine the change horizontally -** Processing line: ~ if args.inputs.keyboard.up~ + { match_criteria: { method: :post, uri: "/dragon/reset/" }, +** Processing line: ~ handler: :post_api_reset },~ - Inside source: true *** True Line Result - if args.inputs.keyboard.up -** Processing line: ~ dir_y += args.state.player_speed~ + handler: :post_api_reset }, +** Processing line: ~ { match_criteria: { method: :post, uri: "/dragon/record/" },~ - Inside source: true *** True Line Result - dir_y += args.state.player_speed -** Processing line: ~ elsif args.inputs.keyboard.down~ + { match_criteria: { method: :post, uri: "/dragon/record/" }, +** Processing line: ~ handler: :post_api_record },~ - Inside source: true *** True Line Result - elsif args.inputs.keyboard.down -** Processing line: ~ dir_y -= args.state.player_speed~ + handler: :post_api_record }, +** Processing line: ~ { match_criteria: { method: :post, uri: "/dragon/record_stop/" },~ - Inside source: true *** True Line Result - dir_y -= args.state.player_speed -** Processing line: ~ end~ + { match_criteria: { method: :post, uri: "/dragon/record_stop/" }, +** Processing line: ~ handler: :post_api_record_stop },~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + handler: :post_api_record_stop }, +** Processing line: ~ { match_criteria: { method: :post, uri: "/dragon/replay/" },~ - Inside source: true *** True Line Result - -** Processing line: ~ # determine the change vertically~ + { match_criteria: { method: :post, uri: "/dragon/replay/" }, +** Processing line: ~ handler: :post_api_replay },~ - Inside source: true *** True Line Result - # determine the change vertically -** Processing line: ~ if args.inputs.keyboard.left~ + handler: :post_api_replay }, +** Processing line: ~ { match_criteria: { method: :post, uri: "/dragon/show_console/" },~ - Inside source: true *** True Line Result - if args.inputs.keyboard.left -** Processing line: ~ dir_x -= args.state.player_speed~ + { match_criteria: { method: :post, uri: "/dragon/show_console/" }, +** Processing line: ~ handler: :post_api_show_console },~ - Inside source: true *** True Line Result - dir_x -= args.state.player_speed -** Processing line: ~ elsif args.inputs.keyboard.right~ + handler: :post_api_show_console }, +** Processing line: ~ { match_criteria: { method: :get, uri: "/dragon/code/" },~ - Inside source: true *** True Line Result - elsif args.inputs.keyboard.right -** Processing line: ~ dir_x += args.state.player_speed~ + { match_criteria: { method: :get, uri: "/dragon/code/" }, +** Processing line: ~ handler: :get_api_code },~ - Inside source: true *** True Line Result - dir_x += args.state.player_speed -** Processing line: ~ end~ + handler: :get_api_code }, +** Processing line: ~ { match_criteria: { method: :get, uri: "/dragon/autocomplete/" },~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + { match_criteria: { method: :get, uri: "/dragon/autocomplete/" }, +** Processing line: ~ handler: :get_api_autocomplete },~ - Inside source: true *** True Line Result - -** Processing line: ~ # determine if teleport can be used~ + handler: :get_api_autocomplete }, +** Processing line: ~ { match_criteria: { method: :post, uri: "/dragon/autocomplete/" },~ - Inside source: true *** True Line Result - # determine if teleport can be used -** Processing line: ~ if args.inputs.keyboard.key_down.space && args.state.teleports > 0~ + { match_criteria: { method: :post, uri: "/dragon/autocomplete/" }, +** Processing line: ~ handler: :post_api_autocomplete },~ - Inside source: true *** True Line Result - if args.inputs.keyboard.key_down.space && args.state.teleports > 0 -** Processing line: ~ args.state.teleports -= 1~ + handler: :post_api_autocomplete }, +** Processing line: ~ { match_criteria: { method: :get, uri_without_query_string: "/dragon/code/edit/", has_query_string: true },~ - Inside source: true *** True Line Result - args.state.teleports -= 1 -** Processing line: ~ dir_x *= 20~ + { match_criteria: { method: :get, uri_without_query_string: "/dragon/code/edit/", has_query_string: true }, +** Processing line: ~ handler: :get_api_code_edit },~ - Inside source: true *** True Line Result - dir_x *= 20 -** Processing line: ~ dir_y *= 20~ + handler: :get_api_code_edit }, +** Processing line: ~ { match_criteria: { method: :post, uri_without_query_string: "/dragon/code/update/", has_query_string: true },~ - Inside source: true *** True Line Result - dir_y *= 20 -** Processing line: ~ end~ + { match_criteria: { method: :post, uri_without_query_string: "/dragon/code/update/", has_query_string: true }, +** Processing line: ~ handler: :post_api_code_update },~ - Inside source: true *** True Line Result - end + handler: :post_api_code_update }, ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # apply change to player~ +** Processing line: ~~ - Inside source: true *** True Line Result - # apply change to player -** Processing line: ~ args.state.player.x += dir_x~ + +** Processing line: ~ { match_criteria: { method: :get, uri: "/docs.html" },~ - Inside source: true *** True Line Result - args.state.player.x += dir_x -** Processing line: ~ args.state.player.y += dir_y~ + { match_criteria: { method: :get, uri: "/docs.html" }, +** Processing line: ~ handler: :get_docs_html },~ - Inside source: true *** True Line Result - args.state.player.y += dir_y -** Processing line: ~ else~ + handler: :get_docs_html }, +** Processing line: ~ { match_criteria: { method: :get, uri_without_query_string: "/docs.css" },~ - Inside source: true *** True Line Result - else -** Processing line: ~ # if r is pressed, reset the game~ + { match_criteria: { method: :get, uri_without_query_string: "/docs.css" }, +** Processing line: ~ handler: :get_docs_css },~ - Inside source: true *** True Line Result - # if r is pressed, reset the game -** Processing line: ~ if args.inputs.keyboard.key_down.r~ + handler: :get_docs_css }, +** Processing line: ~ { match_criteria: { method: :get, uri: "/docs_search.gif" },~ - Inside source: true *** True Line Result - if args.inputs.keyboard.key_down.r -** Processing line: ~ $gtk.reset~ + { match_criteria: { method: :get, uri: "/docs_search.gif" }, +** Processing line: ~ handler: :get_docs_search_gif },~ - Inside source: true *** True Line Result - $gtk.reset -** Processing line: ~ return~ + handler: :get_docs_search_gif }, +** Processing line: ~~ - Inside source: true *** True Line Result - return -** Processing line: ~ end~ + +** Processing line: ~ { match_criteria: { method: :get, uri: "/src_backup_index.html" },~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + { match_criteria: { method: :get, uri: "/src_backup_index.html" }, +** Processing line: ~ handler: :get_src_backup_index_html },~ - Inside source: true *** True Line Result - end + handler: :get_src_backup_index_html }, ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # ====================================================~ -- Inside source: true -*** True Line Result - # ==================================================== -** Processing line: ~ # determine score~ +** Processing line: ~ { match_criteria: { method: :get, uri: "/src_backup_index.txt" },~ - Inside source: true *** True Line Result - # determine score -** Processing line: ~ # ====================================================~ + { match_criteria: { method: :get, uri: "/src_backup_index.txt" }, +** Processing line: ~ handler: :get_src_backup_index_txt },~ - Inside source: true *** True Line Result - # ==================================================== + handler: :get_src_backup_index_txt }, ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # calculate new score if the player is at goal~ +** Processing line: ~ { match_criteria: { method: :get, uri: "/src_backup_changes.html" },~ - Inside source: true *** True Line Result - # calculate new score if the player is at goal -** Processing line: ~ if !game_over? args~ + { match_criteria: { method: :get, uri: "/src_backup_changes.html" }, +** Processing line: ~ handler: :get_src_backup_changes_html },~ - Inside source: true *** True Line Result - if !game_over? args + handler: :get_src_backup_changes_html }, ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # if the player is at the goal, then move the goal~ +** Processing line: ~ { match_criteria: { method: :get, uri: "/src_backup_changes.txt" },~ - Inside source: true *** True Line Result - # if the player is at the goal, then move the goal -** Processing line: ~ if args.state.player.intersect_rect? args.state.target~ + { match_criteria: { method: :get, uri: "/src_backup_changes.txt" }, +** Processing line: ~ handler: :get_src_backup_changes_txt },~ - Inside source: true *** True Line Result - if args.state.player.intersect_rect? args.state.target -** Processing line: ~ # increment the goal~ + handler: :get_src_backup_changes_txt }, +** Processing line: ~~ - Inside source: true *** True Line Result - # increment the goal -** Processing line: ~ args.state.score += 1~ + +** Processing line: ~ { match_criteria: { method: :get, uri: "/src_backup.css" },~ - Inside source: true *** True Line Result - args.state.score += 1 + { match_criteria: { method: :get, uri: "/src_backup.css" }, +** Processing line: ~ handler: :get_src_backup_css },~ +- Inside source: true +*** True Line Result + handler: :get_src_backup_css }, ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # move the goal to a random location~ +** Processing line: ~ { match_criteria: { method: :get, uri: "/favicon.ico" },~ - Inside source: true *** True Line Result - # move the goal to a random location -** Processing line: ~ args.state.target = { x: (rand args.grid.w), y: (rand args.grid.h), w: 20, h: 20 }~ + { match_criteria: { method: :get, uri: "/favicon.ico" }, +** Processing line: ~ handler: :get_favicon_ico },~ - Inside source: true *** True Line Result - args.state.target = { x: (rand args.grid.w), y: (rand args.grid.h), w: 20, h: 20 } + handler: :get_favicon_ico }, ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # make sure the goal is inside the view area~ +** Processing line: ~ { match_criteria: { method: :get, end_with_rb: true },~ - Inside source: true *** True Line Result - # make sure the goal is inside the view area -** Processing line: ~ if args.state.target.x < 0~ + { match_criteria: { method: :get, end_with_rb: true }, +** Processing line: ~ handler: :get_src_backup },~ - Inside source: true *** True Line Result - if args.state.target.x < 0 -** Processing line: ~ args.state.target.x += 20~ + handler: :get_src_backup }, +** Processing line: ~~ - Inside source: true *** True Line Result - args.state.target.x += 20 -** Processing line: ~ elsif args.state.target.x > 1280~ + +** Processing line: ~ { match_criteria: { method: :get, end_with_rb: true },~ - Inside source: true *** True Line Result - elsif args.state.target.x > 1280 -** Processing line: ~ args.state.target.x -= 20~ + { match_criteria: { method: :get, end_with_rb: true }, +** Processing line: ~ handler: :get_src_backup }~ - Inside source: true *** True Line Result - args.state.target.x -= 20 -** Processing line: ~ end~ + handler: :get_src_backup } +** Processing line: ~~ - Inside source: true *** True Line Result - end + +** Processing line: ~ ]~ +- Inside source: true +*** True Line Result + ] +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # make sure the goal is inside the view area~ +** Processing line: ~ def process! opts~ - Inside source: true *** True Line Result - # make sure the goal is inside the view area -** Processing line: ~ if args.state.target.y < 0~ + def process! opts +** Processing line: ~ routes = opts[:routes]~ - Inside source: true *** True Line Result - if args.state.target.y < 0 -** Processing line: ~ args.state.target.y += 20~ + routes = opts[:routes] +** Processing line: ~ context = opts[:context]~ - Inside source: true *** True Line Result - args.state.target.y += 20 -** Processing line: ~ elsif args.state.target.y > 720~ + context = opts[:context] +** Processing line: ~ routes.each do |route|~ - Inside source: true *** True Line Result - elsif args.state.target.y > 720 -** Processing line: ~ args.state.target.y -= 20~ + routes.each do |route| +** Processing line: ~ match_found = (process_single! route: route, context: context)~ - Inside source: true *** True Line Result - args.state.target.y -= 20 + match_found = (process_single! route: route, context: context) +** Processing line: ~ return if match_found~ +- Inside source: true +*** True Line Result + return if match_found ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -148687,102 +154902,94 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result end -** Processing line: ~ end~ +** Processing line: ~~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + +** Processing line: ~ def process_single! opts~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + def process_single! opts +** Processing line: ~ match_criteria = opts[:route][:match_criteria]~ - Inside source: true *** True Line Result - -** Processing line: ~ def game_over? args~ + match_criteria = opts[:route][:match_criteria] +** Processing line: ~ m = opts[:route][:handler]~ - Inside source: true *** True Line Result - def game_over? args -** Processing line: ~ args.state.count_down < 0~ + m = opts[:route][:handler] +** Processing line: ~ args = opts[:context][:args]~ - Inside source: true *** True Line Result - args.state.count_down < 0 -** Processing line: ~ end~ + args = opts[:context][:args] +** Processing line: ~ req = opts[:context][:req]~ - Inside source: true *** True Line Result - end -** Processing line: ~~ + req = opts[:context][:req] +** Processing line: ~ match_candidate = opts[:context][:match_candidate]~ - Inside source: true *** True Line Result - -** Processing line: ~ $gtk.reset~ + match_candidate = opts[:context][:match_candidate] +** Processing line: ~ match_criteria.each do |k, v|~ - Inside source: true *** True Line Result - $gtk.reset -** Processing line: ~~ + match_criteria.each do |k, v| +** Processing line: ~ return false if match_candidate[k] != v~ - Inside source: true *** True Line Result - -** Processing line: ~#+end_src~ -- Line was identified as the end of a code block. + return false if match_candidate[k] != v +** Processing line: ~ end~ +- Inside source: true *** True Line Result -#+end_src + end ** Processing line: ~~ -- End of paragraph detected. -*** True Line Result - -** Processing line: ~*** Teentiny - license.txt~ -- Header detected. -*** True Line Result - -*** True Line Result -*** Teentiny - license.txt -** Processing line: ~#+begin_src ruby~ -- Line was identified as the beginning of a code block. +- Inside source: true *** True Line Result +** Processing line: ~ begin~ +- Inside source: true *** True Line Result -#+begin_src ruby -** Processing line: ~ # ./samples/99_genre_teentiny/license.txt~ + begin +** Processing line: ~ send m, args, req~ - Inside source: true *** True Line Result - # ./samples/99_genre_teentiny/license.txt -** Processing line: ~ Copyright 2019 DragonRuby LLC~ + send m, args, req +** Processing line: ~ rescue Exception => e~ - Inside source: true *** True Line Result - Copyright 2019 DragonRuby LLC -** Processing line: ~~ + rescue Exception => e +** Processing line: ~ req.respond 200,~ - Inside source: true *** True Line Result - -** Processing line: ~ MIT License~ + req.respond 200, +** Processing line: ~ "#{e}\n#{e.__backtrace_to_org__}",~ - Inside source: true *** True Line Result - MIT License -** Processing line: ~~ + "#{e}\n#{e.__backtrace_to_org__}", +** Processing line: ~ { 'Content-Type' => 'text/plain' }~ - Inside source: true *** True Line Result - -** Processing line: ~ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:~ + { 'Content-Type' => 'text/plain' } +** Processing line: ~ end~ - Inside source: true *** True Line Result - Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -** Processing line: ~~ + end +** Processing line: ~ return true~ - Inside source: true *** True Line Result - -** Processing line: ~ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.~ + return true +** Processing line: ~ end~ - Inside source: true *** True Line Result - The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -** Processing line: ~~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - -** Processing line: ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + end ** Processing line: ~~ - Inside source: true *** True Line Result @@ -148795,17 +155002,10 @@ Follows is a source code listing for all files that have been open sourced. This - End of paragraph detected. *** True Line Result -** Processing line: ~** OSS~ -- Header detected. -*** True Line Result - -*** True Line Result -** OSS -** Processing line: ~Follows is a source code listing for all files that have been open sourced. This code can be found online at [[https://github.com/DragonRuby/dragonruby-game-toolkit-contrib/]].~ ** Processing line: ~*** args.rb~ - Header detected. *** True Line Result -Follows is a source code listing for all files that have been open sourced. This code can be found online at [[https://github.com/DragonRuby/dragonruby-game-toolkit-contrib/]]. + *** True Line Result *** args.rb ** Processing line: ~#+begin_src ruby~ @@ -148866,6 +155066,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result include Serialize +** Processing line: ~ attr_accessor :cvars~ +- Inside source: true +*** True Line Result + attr_accessor :cvars ** Processing line: ~ attr_accessor :inputs~ - Inside source: true *** True Line Result @@ -148946,6 +155150,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result @outputs = Outputs.new args: self +** Processing line: ~ @cvars = {}~ +- Inside source: true +*** True Line Result + @cvars = {} ** Processing line: ~ @audio = {}~ - Inside source: true *** True Line Result @@ -150890,26 +157098,26 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ attr_accessor :show_reason, :log, :logo, :background_color,~ +** Processing line: ~ attr_accessor :show_reason, :log, :logo,~ - Inside source: true *** True Line Result - attr_accessor :show_reason, :log, :logo, :background_color, -** Processing line: ~ :text_color, :animation_duration,~ + attr_accessor :show_reason, :log, :logo, +** Processing line: ~ :animation_duration,~ - Inside source: true *** True Line Result - :text_color, :animation_duration, + :animation_duration, ** Processing line: ~ :max_log_lines, :max_history, :log,~ - Inside source: true *** True Line Result :max_log_lines, :max_history, :log, -** Processing line: ~ :last_command_errored, :last_command, :error_color, :shown_at,~ +** Processing line: ~ :last_command_errored, :last_command, :shown_at,~ - Inside source: true *** True Line Result - :last_command_errored, :last_command, :error_color, :shown_at, -** Processing line: ~ :header_color, :archived_log, :last_log_lines, :last_log_lines_count,~ + :last_command_errored, :last_command, :shown_at, +** Processing line: ~ :archived_log, :last_log_lines, :last_log_lines_count,~ - Inside source: true *** True Line Result - :header_color, :archived_log, :last_log_lines, :last_log_lines_count, + :archived_log, :last_log_lines, :last_log_lines_count, ** Processing line: ~ :suppress_left_arrow_behavior, :command_set_at,~ - Inside source: true *** True Line Result @@ -150918,10 +157126,22 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result :toast_ids, :bottom, -** Processing line: ~ :font_style, :menu~ +** Processing line: ~ :font_style, :menu,~ - Inside source: true *** True Line Result - :font_style, :menu + :font_style, :menu, +** Processing line: ~ :background_color, :spam_color, :text_color, :warn_color,~ +- Inside source: true +*** True Line Result + :background_color, :spam_color, :text_color, :warn_color, +** Processing line: ~ :error_color, :header_color, :code_color, :comment_color,~ +- Inside source: true +*** True Line Result + :error_color, :header_color, :code_color, :comment_color, +** Processing line: ~ :debug_color, :unfiltered_color~ +- Inside source: true +*** True Line Result + :debug_color, :unfiltered_color ** Processing line: ~~ - Inside source: true *** True Line Result @@ -150990,22 +157210,14 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result @logo = 'console-logo.png' -** Processing line: ~ @history_fname = 'console_history.txt'~ +** Processing line: ~ @history_fname = 'logs/console_history.txt'~ - Inside source: true *** True Line Result - @history_fname = 'console_history.txt' + @history_fname = 'logs/console_history.txt' ** Processing line: ~ @background_color = Color.new [0, 0, 0, 224]~ - Inside source: true *** True Line Result @background_color = Color.new [0, 0, 0, 224] -** Processing line: ~ @text_color = Color.new [255, 255, 255]~ -- Inside source: true -*** True Line Result - @text_color = Color.new [255, 255, 255] -** Processing line: ~ @error_color = Color.new [200, 50, 50]~ -- Inside source: true -*** True Line Result - @error_color = Color.new [200, 50, 50] ** Processing line: ~ @header_color = Color.new [100, 200, 220]~ - Inside source: true *** True Line Result @@ -151014,10 +157226,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result @code_color = Color.new [210, 168, 255] -** Processing line: ~ @comment_color = Color.new [0, 200, 100]~ +** Processing line: ~ @comment_color = Color.new [0, 200, 100]~ - Inside source: true *** True Line Result - @comment_color = Color.new [0, 200, 100] + @comment_color = Color.new [0, 200, 100] ** Processing line: ~ @animation_duration = 1.seconds~ - Inside source: true *** True Line Result @@ -151026,6 +157238,42 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result @shown_at = -1 +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ # these are the colors for text at various log levels.~ +- Inside source: true +*** True Line Result + # these are the colors for text at various log levels. +** Processing line: ~ @spam_color = Color.new [160, 160, 160]~ +- Inside source: true +*** True Line Result + @spam_color = Color.new [160, 160, 160] +** Processing line: ~ @debug_color = Color.new [0, 255, 0]~ +- Inside source: true +*** True Line Result + @debug_color = Color.new [0, 255, 0] +** Processing line: ~ @text_color = Color.new [255, 255, 255]~ +- Inside source: true +*** True Line Result + @text_color = Color.new [255, 255, 255] +** Processing line: ~ @warn_color = Color.new [255, 255, 0]~ +- Inside source: true +*** True Line Result + @warn_color = Color.new [255, 255, 0] +** Processing line: ~ @error_color = Color.new [200, 50, 50]~ +- Inside source: true +*** True Line Result + @error_color = Color.new [200, 50, 50] +** Processing line: ~ @unfiltered_color = Color.new [0, 255, 255]~ +- Inside source: true +*** True Line Result + @unfiltered_color = Color.new [0, 255, 255] +** Processing line: ~~ +- Inside source: true +*** True Line Result + ** Processing line: ~ load_history~ - Inside source: true *** True Line Result @@ -151286,10 +157534,34 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def add_text obj~ +** Processing line: ~ def add_text obj, loglevel=-1~ +- Inside source: true +*** True Line Result + def add_text obj, loglevel=-1 +** Processing line: ~ # loglevel is one of the values of LogLevel in logging.h, or -1 to say "we don't care, colorize it with your special string parsing magic"~ +- Inside source: true +*** True Line Result + # loglevel is one of the values of LogLevel in logging.h, or -1 to say "we don't care, colorize it with your special string parsing magic" +** Processing line: ~ loglevel = -1 if loglevel < 0~ +- Inside source: true +*** True Line Result + loglevel = -1 if loglevel < 0 +** Processing line: ~ loglevel = 5 if loglevel > 5 # 5 == unfiltered (it's 0x7FFFFFFE in C, clamp it down)~ +- Inside source: true +*** True Line Result + loglevel = 5 if loglevel > 5 # 5 == unfiltered (it's 0x7FFFFFFE in C, clamp it down) +** Processing line: ~ loglevel = 2 if (loglevel == -1) && obj.start_with?('!c!') # oh well~ - Inside source: true *** True Line Result - def add_text obj + loglevel = 2 if (loglevel == -1) && obj.start_with?('!c!') # oh well +** Processing line: ~ colorstr = (loglevel != -1) ? "!c!#{loglevel}" : nil~ +- Inside source: true +*** True Line Result + colorstr = (loglevel != -1) ? "!c!#{loglevel}" : nil +** Processing line: ~~ +- Inside source: true +*** True Line Result + ** Processing line: ~ @last_log_lines_count ||= 1~ - Inside source: true *** True Line Result @@ -151322,14 +157594,38 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result str.each_line do |s| -** Processing line: ~ s.wrapped_lines(self.console_text_width).each do |l|~ +** Processing line: ~ if colorstr.nil?~ +- Inside source: true +*** True Line Result + if colorstr.nil? +** Processing line: ~ s.wrapped_lines(self.console_text_width).each do |l|~ +- Inside source: true +*** True Line Result + s.wrapped_lines(self.console_text_width).each do |l| +** Processing line: ~ log_lines << l~ +- Inside source: true +*** True Line Result + log_lines << l +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~ else~ +- Inside source: true +*** True Line Result + else +** Processing line: ~ s.wrapped_lines(self.console_text_width).each do |l|~ - Inside source: true *** True Line Result - s.wrapped_lines(self.console_text_width).each do |l| -** Processing line: ~ log_lines << l~ + s.wrapped_lines(self.console_text_width).each do |l| +** Processing line: ~ log_lines << "#{colorstr}#{l}"~ - Inside source: true *** True Line Result - log_lines << l + log_lines << "#{colorstr}#{l}" +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -151342,10 +157638,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ if log_lines == @last_log_lines~ +** Processing line: ~ if log_lines == @last_log_lines && log_lines.length != 0~ - Inside source: true *** True Line Result - if log_lines == @last_log_lines + if log_lines == @last_log_lines && log_lines.length != 0 ** Processing line: ~ @last_log_lines_count += 1~ - Inside source: true *** True Line Result @@ -152442,22 +158738,30 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ if args.inputs.mouse.wheel && args.inputs.mouse.wheel.y > 0~ +** Processing line: ~ if args.inputs.mouse.wheel~ - Inside source: true *** True Line Result - if args.inputs.mouse.wheel && args.inputs.mouse.wheel.y > 0 -** Processing line: ~ @inertia = 1~ + if args.inputs.mouse.wheel +** Processing line: ~ if args.inputs.mouse.wheel.y > 0~ - Inside source: true *** True Line Result - @inertia = 1 -** Processing line: ~ elsif args.inputs.mouse.wheel && args.inputs.mouse.wheel.y < 0~ + if args.inputs.mouse.wheel.y > 0 +** Processing line: ~ @inertia = 1~ - Inside source: true *** True Line Result - elsif args.inputs.mouse.wheel && args.inputs.mouse.wheel.y < 0 -** Processing line: ~ @inertia = -1~ + @inertia = 1 +** Processing line: ~ elsif args.inputs.mouse.wheel.y < 0~ - Inside source: true *** True Line Result - @inertia = -1 + elsif args.inputs.mouse.wheel.y < 0 +** Processing line: ~ @inertia = -1~ +- Inside source: true +*** True Line Result + @inertia = -1 +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -152490,34 +158794,26 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ if @inertia != 0~ -- Inside source: true -*** True Line Result - if @inertia != 0 -** Processing line: ~ @inertia = (@inertia * 0.7)~ +** Processing line: ~ @inertia = (@inertia * 0.7)~ - Inside source: true *** True Line Result - @inertia = (@inertia * 0.7) -** Processing line: ~ if @inertia > 0~ + @inertia = (@inertia * 0.7) +** Processing line: ~ if @inertia > 0~ - Inside source: true *** True Line Result - if @inertia > 0 -** Processing line: ~ @log_offset -= 1~ + if @inertia > 0 +** Processing line: ~ @log_offset += 1~ - Inside source: true *** True Line Result - @log_offset -= 1 -** Processing line: ~ elsif @inertia < 0~ + @log_offset += 1 +** Processing line: ~ elsif @inertia < 0~ - Inside source: true *** True Line Result - elsif @inertia < 0 -** Processing line: ~ @log_offset += 1~ + elsif @inertia < 0 +** Processing line: ~ @log_offset -= 1~ - Inside source: true *** True Line Result - @log_offset += 1 -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end + @log_offset -= 1 ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -152978,10 +159274,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result color = color.mult_alpha(0.5) if archived -** Processing line: ~~ +** Processing line: ~ str = str[4..-1] if str.start_with?('!c!') # chop off loglevel color~ - Inside source: true *** True Line Result - + str = str[4..-1] if str.start_with?('!c!') # chop off loglevel color ** Processing line: ~ args.outputs.reserved << font_style.label(x: left.shift_right(10), y: y, text: str, color: color)~ - Inside source: true *** True Line Result @@ -153922,10 +160218,18 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def color_for_log_entry(log_entry)~ +** Processing line: ~ def color_for_plain_text log_entry~ - Inside source: true *** True Line Result - def color_for_log_entry(log_entry) + def color_for_plain_text log_entry +** Processing line: ~ log_entry = log_entry[4..-1] if log_entry.start_with? "!c!"~ +- Inside source: true +*** True Line Result + log_entry = log_entry[4..-1] if log_entry.start_with? "!c!" +** Processing line: ~~ +- Inside source: true +*** True Line Result + ** Processing line: ~ if code? log_entry~ - Inside source: true *** True Line Result @@ -154002,6 +160306,98 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result +** Processing line: ~ def color_for_log_entry(log_entry)~ +- Inside source: true +*** True Line Result + def color_for_log_entry(log_entry) +** Processing line: ~ if log_entry.start_with?('!c!') # loglevel color specified.~ +- Inside source: true +*** True Line Result + if log_entry.start_with?('!c!') # loglevel color specified. +** Processing line: ~ return case log_entry[3..3].to_i~ +- Inside source: true +*** True Line Result + return case log_entry[3..3].to_i +** Processing line: ~ when 0 # spam~ +- Inside source: true +*** True Line Result + when 0 # spam +** Processing line: ~ @spam_color~ +- Inside source: true +*** True Line Result + @spam_color +** Processing line: ~ when 1 # debug~ +- Inside source: true +*** True Line Result + when 1 # debug +** Processing line: ~ @debug_color~ +- Inside source: true +*** True Line Result + @debug_color +** Processing line: ~ #when 2 # info (caught by the `else` block.)~ +- Inside source: true +*** True Line Result + #when 2 # info (caught by the `else` block.) +** Processing line: ~ # @text_color~ +- Inside source: true +*** True Line Result + # @text_color +** Processing line: ~ when 3 # warn~ +- Inside source: true +*** True Line Result + when 3 # warn +** Processing line: ~ @warn_color~ +- Inside source: true +*** True Line Result + @warn_color +** Processing line: ~ when 4 # error~ +- Inside source: true +*** True Line Result + when 4 # error +** Processing line: ~ @error_color~ +- Inside source: true +*** True Line Result + @error_color +** Processing line: ~ when 5 # unfiltered~ +- Inside source: true +*** True Line Result + when 5 # unfiltered +** Processing line: ~ @unfiltered_color~ +- Inside source: true +*** True Line Result + @unfiltered_color +** Processing line: ~ else~ +- Inside source: true +*** True Line Result + else +** Processing line: ~ color_for_plain_text log_entry~ +- Inside source: true +*** True Line Result + color_for_plain_text log_entry +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ return color_for_plain_text log_entry~ +- Inside source: true +*** True Line Result + return color_for_plain_text log_entry +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + ** Processing line: ~ def prompt~ - Inside source: true *** True Line Result @@ -155822,10 +162218,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result items.each_slice(columns).each_with_index do |cells, i| -** Processing line: ~ pretty_print_row_seperator string_width, cell_width, column_width, columns~ +** Processing line: ~ pretty_print_row_separator string_width, cell_width, column_width, columns~ - Inside source: true *** True Line Result - pretty_print_row_seperator string_width, cell_width, column_width, columns + pretty_print_row_separator string_width, cell_width, column_width, columns ** Processing line: ~ pretty_print_row cells, string_width, cell_width, column_width, columns~ - Inside source: true *** True Line Result @@ -155838,10 +162234,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ pretty_print_row_seperator string_width, cell_width, column_width, columns~ +** Processing line: ~ pretty_print_row_separator string_width, cell_width, column_width, columns~ - Inside source: true *** True Line Result - pretty_print_row_seperator string_width, cell_width, column_width, columns + pretty_print_row_separator string_width, cell_width, column_width, columns ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -159206,14 +165602,14 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result start_tick + duration, -** Processing line: ~ (initial_value *definitions),~ +** Processing line: ~ initial_value(*definitions),~ - Inside source: true *** True Line Result - (initial_value *definitions), -** Processing line: ~ (final_value *definitions),~ + initial_value(*definitions), +** Processing line: ~ final_value(*definitions),~ - Inside source: true *** True Line Result - (final_value *definitions), + final_value(*definitions), ** Processing line: ~ *definitions~ - Inside source: true *** True Line Result @@ -159998,14 +166394,14 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result def self.rotate_point point, angle, around = nil -** Processing line: ~ s = Math.sin a.to_radians~ +** Processing line: ~ s = Math.sin angle.to_radians~ - Inside source: true *** True Line Result - s = Math.sin a.to_radians -** Processing line: ~ c = Math.cos a.to_radians~ + s = Math.sin angle.to_radians +** Processing line: ~ c = Math.cos angle.to_radians~ - Inside source: true *** True Line Result - c = Math.cos a.to_radians + c = Math.cos angle.to_radians ** Processing line: ~ px = point.x~ - Inside source: true *** True Line Result @@ -160726,14 +167122,46 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result # @gtk -** Processing line: ~ def self.line_y_intercept line~ +** Processing line: ~ def self.line_y_intercept line, replace_infinity: nil~ +- Inside source: true +*** True Line Result + def self.line_y_intercept line, replace_infinity: nil +** Processing line: ~ line.y - line_slope(line, replace_infinity: replace_infinity) * line.x~ +- Inside source: true +*** True Line Result + line.y - line_slope(line, replace_infinity: replace_infinity) * line.x +** Processing line: ~ rescue Exception => e~ +- Inside source: true +*** True Line Result + rescue Exception => e +** Processing line: ~ raise <<-S~ - Inside source: true *** True Line Result - def self.line_y_intercept line -** Processing line: ~ line.y - line_slope(line) * line.x~ + raise <<-S +** Processing line: ~ * ERROR: ~Geometry::line_y_intercept~~ - Inside source: true *** True Line Result - line.y - line_slope(line) * line.x + * ERROR: ~Geometry::line_y_intercept~ +** Processing line: ~ The following exception was thrown for line: #{line}~ +- Inside source: true +*** True Line Result + The following exception was thrown for line: #{line} +** Processing line: ~ #{e}~ +- Inside source: true +*** True Line Result + #{e} +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ Consider passing in ~replace_infinity: VALUE~ to handle for vertical lines.~ +- Inside source: true +*** True Line Result + Consider passing in ~replace_infinity: VALUE~ to handle for vertical lines. +** Processing line: ~ S~ +- Inside source: true +*** True Line Result + S ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -161034,26 +167462,26 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result # @gtk -** Processing line: ~ def self.line_intersect line_one, line_two~ +** Processing line: ~ def self.line_intersect line_one, line_two, replace_infinity: nil~ - Inside source: true *** True Line Result - def self.line_intersect line_one, line_two -** Processing line: ~ m1 = line_slope(line_one)~ + def self.line_intersect line_one, line_two, replace_infinity: nil +** Processing line: ~ m1 = line_slope(line_one, replace_infinity: replace_infinity)~ - Inside source: true *** True Line Result - m1 = line_slope(line_one) -** Processing line: ~ m2 = line_slope(line_two)~ + m1 = line_slope(line_one, replace_infinity: replace_infinity) +** Processing line: ~ m2 = line_slope(line_two, replace_infinity: replace_infinity)~ - Inside source: true *** True Line Result - m2 = line_slope(line_two) -** Processing line: ~ b1 = line_y_intercept(line_one)~ + m2 = line_slope(line_two, replace_infinity: replace_infinity) +** Processing line: ~ b1 = line_y_intercept(line_one, replace_infinity: replace_infinity)~ - Inside source: true *** True Line Result - b1 = line_y_intercept(line_one) -** Processing line: ~ b2 = line_y_intercept(line_two)~ + b1 = line_y_intercept(line_one, replace_infinity: replace_infinity) +** Processing line: ~ b2 = line_y_intercept(line_two, replace_infinity: replace_infinity)~ - Inside source: true *** True Line Result - b2 = line_y_intercept(line_two) + b2 = line_y_intercept(line_two, replace_infinity: replace_infinity) ** Processing line: ~ x = (b1 - b2) / (m2 - m1)~ - Inside source: true *** True Line Result @@ -161066,6 +167494,38 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result [x, y] +** Processing line: ~ rescue Exception => e~ +- Inside source: true +*** True Line Result + rescue Exception => e +** Processing line: ~ raise <<-S~ +- Inside source: true +*** True Line Result + raise <<-S +** Processing line: ~ * ERROR: ~Geometry::line_intersect~~ +- Inside source: true +*** True Line Result + * ERROR: ~Geometry::line_intersect~ +** Processing line: ~ The following exception was thrown for line_one: #{line_one}, line_two: #{line_two}~ +- Inside source: true +*** True Line Result + The following exception was thrown for line_one: #{line_one}, line_two: #{line_two} +** Processing line: ~ #{e}~ +- Inside source: true +*** True Line Result + #{e} +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ Consider passing in ~replace_infinity: VALUE~ to handle for vertical lines.~ +- Inside source: true +*** True Line Result + Consider passing in ~replace_infinity: VALUE~ to handle for vertical lines. +** Processing line: ~ S~ +- Inside source: true +*** True Line Result + S ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -163810,10 +170270,14 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result collection.each do |m| -** Processing line: ~ self.instance_variable_set("@#{m.to_s}".to_sym, value)~ +** Processing line: ~ m_to_s = m.to_s~ +- Inside source: true +*** True Line Result + m_to_s = m.to_s +** Processing line: ~ self.instance_variable_set("@#{m_to_s}".to_sym, value) if m_to_s.strip.length > 0~ - Inside source: true *** True Line Result - self.instance_variable_set("@#{m.to_s}".to_sym, value) + self.instance_variable_set("@#{m_to_s}".to_sym, value) if m_to_s.strip.length > 0 ** Processing line: ~ rescue Exception => e~ - Inside source: true *** True Line Result @@ -165990,6 +172454,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result *app_metadata_retrieval_steps, +** Processing line: ~ :determine_devcert,~ +- Inside source: true +*** True Line Result + :determine_devcert, ** Processing line: ~~ - Inside source: true *** True Line Result @@ -166102,6 +172570,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result *app_metadata_retrieval_steps, +** Processing line: ~ :determine_prodcert,~ +- Inside source: true +*** True Line Result + :determine_prodcert, ** Processing line: ~~ - Inside source: true *** True Line Result @@ -166878,6 +173350,22 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result appname= +** Processing line: ~ # devcert is the certificate to use for development/deploying to your local device~ +- Inside source: true +*** True Line Result + # devcert is the certificate to use for development/deploying to your local device +** Processing line: ~ devcert=~ +- Inside source: true +*** True Line Result + devcert= +** Processing line: ~ # prodcert is the certificate to use for distribution to the app store~ +- Inside source: true +*** True Line Result + # prodcert is the certificate to use for distribution to the app store +** Processing line: ~ prodcert=~ +- Inside source: true +*** True Line Result + prodcert= ** Processing line: ~ S~ - Inside source: true *** True Line Result @@ -167018,10 +173506,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result "* mygame/metadata/ios_metadata.txt needs to be filled out.", -** Processing line: ~ "You need to update metadata/ios_metadata.txt with a valid teamid, appname, and appid.",~ +** Processing line: ~ "You need to update metadata/ios_metadata.txt with a valid teamid, appname, appid, devcert, and prodcert.",~ - Inside source: true *** True Line Result - "You need to update metadata/ios_metadata.txt with a valid teamid, appname, and appid.", + "You need to update metadata/ios_metadata.txt with a valid teamid, appname, appid, devcert, and prodcert.", ** Processing line: ~ "Instructions for where the values should come from are within metadata/ios_metadata.txt."~ - Inside source: true *** True Line Result @@ -167178,10 +173666,58 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result raise_ios_metadata_required if @app_id.strip.length == 0 -** Processing line: ~ log_info "App Identifier is set to : #{@app_id}"~ +** Processing line: ~ log_info "App Identifier is set to: #{@app_id}"~ +- Inside source: true +*** True Line Result + log_info "App Identifier is set to: #{@app_id}" +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ def determine_devcert~ +- Inside source: true +*** True Line Result + def determine_devcert +** Processing line: ~ @certificate_name = ios_metadata.devcert~ +- Inside source: true +*** True Line Result + @certificate_name = ios_metadata.devcert +** Processing line: ~ raise_ios_metadata_required if @certificate_name.strip.length == 0~ +- Inside source: true +*** True Line Result + raise_ios_metadata_required if @certificate_name.strip.length == 0 +** Processing line: ~ log_info "Dev Certificate is set to: #{@certificate_name}"~ +- Inside source: true +*** True Line Result + log_info "Dev Certificate is set to: #{@certificate_name}" +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ def determine_prodcert~ +- Inside source: true +*** True Line Result + def determine_prodcert +** Processing line: ~ @certificate_name = ios_metadata.prodcert~ +- Inside source: true +*** True Line Result + @certificate_name = ios_metadata.prodcert +** Processing line: ~ raise_ios_metadata_required if @certificate_name.strip.length == 0~ +- Inside source: true +*** True Line Result + raise_ios_metadata_required if @certificate_name.strip.length == 0 +** Processing line: ~ log_info "Production (Distribution) Certificate is set to: #{@certificate_name}"~ - Inside source: true *** True Line Result - log_info "App Identifier is set to : #{@app_id}" + log_info "Production (Distribution) Certificate is set to: #{@certificate_name}" ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -167266,30 +173802,6 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def stage_app~ -- Inside source: true -*** True Line Result - def stage_app -** Processing line: ~ log_info "Staging."~ -- Inside source: true -*** True Line Result - log_info "Staging." -** Processing line: ~ sh "mkdir -p #{tmp_directory}"~ -- Inside source: true -*** True Line Result - sh "mkdir -p #{tmp_directory}" -** Processing line: ~ sh "cp -R #{relative_path}/dragonruby-ios.app \"#{tmp_directory}/#{@app_name}.app\""~ -- Inside source: true -*** True Line Result - sh "cp -R #{relative_path}/dragonruby-ios.app \"#{tmp_directory}/#{@app_name}.app\"" -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end -** Processing line: ~~ -- Inside source: true -*** True Line Result - ** Processing line: ~ def set_app_id id~ - Inside source: true *** True Line Result @@ -167410,118 +173922,34 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ if !cli_app_exist?(security_cli_app)~ -- Inside source: true -*** True Line Result - if !cli_app_exist?(security_cli_app) -** Processing line: ~ raise WizardException.new(~ -- Inside source: true -*** True Line Result - raise WizardException.new( -** Processing line: ~ "* It doesn't look like you have #{security_cli_app}.",~ -- Inside source: true -*** True Line Result - "* It doesn't look like you have #{security_cli_app}.", -** Processing line: ~ "** 1. Open Disk Utility and run First Aid.",~ -- Inside source: true -*** True Line Result - "** 1. Open Disk Utility and run First Aid.", -** Processing line: ~ { w: 700, h: 148, path: get_reserved_sprite("disk-utility.png") },~ -- Inside source: true -*** True Line Result - { w: 700, h: 148, path: get_reserved_sprite("disk-utility.png") }, -** Processing line: ~ )~ -- Inside source: true -*** True Line Result - ) -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ if valid_certs.length == 0~ -- Inside source: true -*** True Line Result - if valid_certs.length == 0 -** Processing line: ~ raise WizardException.new(~ -- Inside source: true -*** True Line Result - raise WizardException.new( -** Processing line: ~ "* It doesn't look like you have any valid certs installed.",~ -- Inside source: true -*** True Line Result - "* It doesn't look like you have any valid certs installed.", -** Processing line: ~ "** 1. Open Xcode.",~ -- Inside source: true -*** True Line Result - "** 1. Open Xcode.", -** Processing line: ~ "** 2. Log into your developer account. Xcode -> Preferences -> Accounts.",~ -- Inside source: true -*** True Line Result - "** 2. Log into your developer account. Xcode -> Preferences -> Accounts.", -** Processing line: ~ { w: 700, h: 98, path: get_reserved_sprite("login-xcode.png") },~ -- Inside source: true -*** True Line Result - { w: 700, h: 98, path: get_reserved_sprite("login-xcode.png") }, -** Processing line: ~ "** 3. After loggin in, select Manage Certificates...",~ -- Inside source: true -*** True Line Result - "** 3. After loggin in, select Manage Certificates...", -** Processing line: ~ { w: 700, h: 115, path: get_reserved_sprite("manage-certificates.png") },~ -- Inside source: true -*** True Line Result - { w: 700, h: 115, path: get_reserved_sprite("manage-certificates.png") }, -** Processing line: ~ "** 4. Add a certificate for Apple Development.",~ -- Inside source: true -*** True Line Result - "** 4. Add a certificate for Apple Development.", -** Processing line: ~ { w: 700, h: 217, path: get_reserved_sprite("add-cert.png") },~ -- Inside source: true -*** True Line Result - { w: 700, h: 217, path: get_reserved_sprite("add-cert.png") }, -** Processing line: ~ )~ -- Inside source: true -*** True Line Result - ) -** Processing line: ~ raise "You do not have any Apple development certs on this computer."~ -- Inside source: true -*** True Line Result - raise "You do not have any Apple development certs on this computer." -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end -** Processing line: ~~ -- Inside source: true -*** True Line Result - ** Processing line: ~ if @production_build~ - Inside source: true *** True Line Result if @production_build -** Processing line: ~ @certificate_name = valid_certs.find_all { |f| f[:name].include? "Distribution" }.first[:name]~ +** Processing line: ~ @certificate_name = ios_metadata[:prodcert]~ - Inside source: true *** True Line Result - @certificate_name = valid_certs.find_all { |f| f[:name].include? "Distribution" }.first[:name] + @certificate_name = ios_metadata[:prodcert] ** Processing line: ~ else~ - Inside source: true *** True Line Result else -** Processing line: ~ @certificate_name = valid_certs.find_all { |f| f[:name].include? "Development" }.first[:name]~ +** Processing line: ~ @certificate_name = ios_metadata[:devcert]~ - Inside source: true *** True Line Result - @certificate_name = valid_certs.find_all { |f| f[:name].include? "Development" }.first[:name] + @certificate_name = ios_metadata[:devcert] ** Processing line: ~ end~ - Inside source: true *** True Line Result end -** Processing line: ~ log_info "I will be using Certificate: '#{@certificate_name}'."~ +** Processing line: ~~ - Inside source: true *** True Line Result - log_info "I will be using Certificate: '#{@certificate_name}'." + +** Processing line: ~ log_info "I will be using certificate: '#{@certificate_name}'."~ +- Inside source: true +*** True Line Result + log_info "I will be using certificate: '#{@certificate_name}'." ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -167578,78 +174006,6 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def valid_certs~ -- Inside source: true -*** True Line Result - def valid_certs -** Processing line: ~ certs = sh("#{security_cli_app} -q find-identity -p codesigning -v").each_line.map do |l|~ -- Inside source: true -*** True Line Result - certs = sh("#{security_cli_app} -q find-identity -p codesigning -v").each_line.map do |l| -** Processing line: ~ if l.include?(")") && !l.include?("Developer ID") && (l.include?("Development") || l.include?("Distribution"))~ -- Inside source: true -*** True Line Result - if l.include?(")") && !l.include?("Developer ID") && (l.include?("Development") || l.include?("Distribution")) -** Processing line: ~ l.strip~ -- Inside source: true -*** True Line Result - l.strip -** Processing line: ~ else~ -- Inside source: true -*** True Line Result - else -** Processing line: ~ nil~ -- Inside source: true -*** True Line Result - nil -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end -** Processing line: ~ end.reject_nil.map do |l|~ -- Inside source: true -*** True Line Result - end.reject_nil.map do |l| -** Processing line: ~ number, id, name = l.split(' ', 3)~ -- Inside source: true -*** True Line Result - number, id, name = l.split(' ', 3) -** Processing line: ~ name = name.gsub("\"", "") if name~ -- Inside source: true -*** True Line Result - name = name.gsub("\"", "") if name -** Processing line: ~ {~ -- Inside source: true -*** True Line Result - { -** Processing line: ~ number: 1,~ -- Inside source: true -*** True Line Result - number: 1, -** Processing line: ~ id: id,~ -- Inside source: true -*** True Line Result - id: id, -** Processing line: ~ name: name~ -- Inside source: true -*** True Line Result - name: name -** Processing line: ~ }~ -- Inside source: true -*** True Line Result - } -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end -** Processing line: ~~ -- Inside source: true -*** True Line Result - ** Processing line: ~ def connected_devices~ - Inside source: true *** True Line Result @@ -169766,6 +176122,18 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result def stage_app +** Processing line: ~ log_info "Staging."~ +- Inside source: true +*** True Line Result + log_info "Staging." +** Processing line: ~ sh "mkdir -p #{tmp_directory}"~ +- Inside source: true +*** True Line Result + sh "mkdir -p #{tmp_directory}" +** Processing line: ~ sh "cp -R #{relative_path}/dragonruby-ios.app \"#{tmp_directory}/#{@app_name}.app\""~ +- Inside source: true +*** True Line Result + sh "cp -R #{relative_path}/dragonruby-ios.app \"#{tmp_directory}/#{@app_name}.app\"" ** Processing line: ~ sh %Q[cp -r "#{root_folder}/app/" "#{app_path}/app/"]~ - Inside source: true *** True Line Result @@ -177134,86 +183502,6 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def >= other~ -- Inside source: true -*** True Line Result - def >= other -** Processing line: ~ return false if !other~ -- Inside source: true -*** True Line Result - return false if !other -** Processing line: ~ return gte other~ -- Inside source: true -*** True Line Result - return gte other -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ def > other~ -- Inside source: true -*** True Line Result - def > other -** Processing line: ~ return false if !other~ -- Inside source: true -*** True Line Result - return false if !other -** Processing line: ~ return gt other~ -- Inside source: true -*** True Line Result - return gt other -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ def <= other~ -- Inside source: true -*** True Line Result - def <= other -** Processing line: ~ return false if !other~ -- Inside source: true -*** True Line Result - return false if !other -** Processing line: ~ return lte other~ -- Inside source: true -*** True Line Result - return lte other -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ def < other~ -- Inside source: true -*** True Line Result - def < other -** Processing line: ~ return false if !other~ -- Inside source: true -*** True Line Result - return false if !other -** Processing line: ~ return gt other~ -- Inside source: true -*** True Line Result - return gt other -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end -** Processing line: ~~ -- Inside source: true -*** True Line Result - ** Processing line: ~ # @gtk~ - Inside source: true *** True Line Result @@ -177554,118 +183842,6 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def - other~ -- Inside source: true -*** True Line Result - def - other -** Processing line: ~ return self unless other~ -- Inside source: true -*** True Line Result - return self unless other -** Processing line: ~ self - other~ -- Inside source: true -*** True Line Result - self - other -** Processing line: ~ rescue Exception => e~ -- Inside source: true -*** True Line Result - rescue Exception => e -** Processing line: ~ __raise_arithmetic_exception__ other, :-, e~ -- Inside source: true -*** True Line Result - __raise_arithmetic_exception__ other, :-, e -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ def + other~ -- Inside source: true -*** True Line Result - def + other -** Processing line: ~ return self unless other~ -- Inside source: true -*** True Line Result - return self unless other -** Processing line: ~ self + other~ -- Inside source: true -*** True Line Result - self + other -** Processing line: ~ rescue Exception => e~ -- Inside source: true -*** True Line Result - rescue Exception => e -** Processing line: ~ __raise_arithmetic_exception__ other, :+, e~ -- Inside source: true -*** True Line Result - __raise_arithmetic_exception__ other, :+, e -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ def * other~ -- Inside source: true -*** True Line Result - def * other -** Processing line: ~ return self unless other~ -- Inside source: true -*** True Line Result - return self unless other -** Processing line: ~ self * other~ -- Inside source: true -*** True Line Result - self * other -** Processing line: ~ rescue Exception => e~ -- Inside source: true -*** True Line Result - rescue Exception => e -** Processing line: ~ __raise_arithmetic_exception__ other, :*, e~ -- Inside source: true -*** True Line Result - __raise_arithmetic_exception__ other, :*, e -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end -** Processing line: ~~ -- Inside source: true -*** True Line Result - -** Processing line: ~ def / other~ -- Inside source: true -*** True Line Result - def / other -** Processing line: ~ return self unless other~ -- Inside source: true -*** True Line Result - return self unless other -** Processing line: ~ self / other~ -- Inside source: true -*** True Line Result - self / other -** Processing line: ~ rescue Exception => e~ -- Inside source: true -*** True Line Result - rescue Exception => e -** Processing line: ~ __raise_arithmetic_exception__ other, :/, e~ -- Inside source: true -*** True Line Result - __raise_arithmetic_exception__ other, :/, e -** Processing line: ~ end~ -- Inside source: true -*** True Line Result - end -** Processing line: ~~ -- Inside source: true -*** True Line Result - ** Processing line: ~ def serialize~ - Inside source: true *** True Line Result @@ -177882,26 +184058,38 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def + other~ +** Processing line: ~ # Returns `-1` if the number is less than `0`. `+1` if the number~ +- Inside source: true +*** True Line Result + # Returns `-1` if the number is less than `0`. `+1` if the number +** Processing line: ~ # is greater than `0`. Returns `0` if the number is equal to `0`.~ - Inside source: true *** True Line Result - def + other -** Processing line: ~ return self unless other~ + # is greater than `0`. Returns `0` if the number is equal to `0`. +** Processing line: ~ #~ - Inside source: true *** True Line Result - return self unless other -** Processing line: ~ self + other~ + # +** Processing line: ~ # @gtk~ - Inside source: true *** True Line Result - self + other -** Processing line: ~ rescue Exception => e~ + # @gtk +** Processing line: ~ def sign~ - Inside source: true *** True Line Result - rescue Exception => e -** Processing line: ~ __raise_arithmetic_exception__ other, :+, e~ + def sign +** Processing line: ~ return -1 if self < 0~ +- Inside source: true +*** True Line Result + return -1 if self < 0 +** Processing line: ~ return 1 if self > 0~ - Inside source: true *** True Line Result - __raise_arithmetic_exception__ other, :+, e + return 1 if self > 0 +** Processing line: ~ return 0~ +- Inside source: true +*** True Line Result + return 0 ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -177910,26 +184098,26 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def * other~ +** Processing line: ~ # Returns `true` if number is greater than `0`.~ - Inside source: true *** True Line Result - def * other -** Processing line: ~ return self unless other~ + # Returns `true` if number is greater than `0`. +** Processing line: ~ #~ - Inside source: true *** True Line Result - return self unless other -** Processing line: ~ self * other~ + # +** Processing line: ~ # @gtk~ - Inside source: true *** True Line Result - self * other -** Processing line: ~ rescue Exception => e~ + # @gtk +** Processing line: ~ def pos?~ - Inside source: true *** True Line Result - rescue Exception => e -** Processing line: ~ __raise_arithmetic_exception__ other, :*, e~ + def pos? +** Processing line: ~ sign > 0~ - Inside source: true *** True Line Result - __raise_arithmetic_exception__ other, :*, e + sign > 0 ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -177938,26 +184126,26 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def / other~ +** Processing line: ~ # Returns `true` if number is less than `0`.~ - Inside source: true *** True Line Result - def / other -** Processing line: ~ return self unless other~ + # Returns `true` if number is less than `0`. +** Processing line: ~ #~ - Inside source: true *** True Line Result - return self unless other -** Processing line: ~ self / other~ + # +** Processing line: ~ # @gtk~ - Inside source: true *** True Line Result - self / other -** Processing line: ~ rescue Exception => e~ + # @gtk +** Processing line: ~ def neg?~ - Inside source: true *** True Line Result - rescue Exception => e -** Processing line: ~ __raise_arithmetic_exception__ other, :/, e~ + def neg? +** Processing line: ~ sign < 0~ - Inside source: true *** True Line Result - __raise_arithmetic_exception__ other, :/, e + sign < 0 ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -177966,26 +184154,26 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def - other~ +** Processing line: ~ # Returns the cosine of a represented in degrees (NOT radians).~ - Inside source: true *** True Line Result - def - other -** Processing line: ~ return self unless other~ + # Returns the cosine of a represented in degrees (NOT radians). +** Processing line: ~ #~ - Inside source: true *** True Line Result - return self unless other -** Processing line: ~ self - other~ + # +** Processing line: ~ # @gtk~ - Inside source: true *** True Line Result - self - other -** Processing line: ~ rescue Exception => e~ + # @gtk +** Processing line: ~ def cos~ - Inside source: true *** True Line Result - rescue Exception => e -** Processing line: ~ __raise_arithmetic_exception__ other, :-, e~ + def cos +** Processing line: ~ Math.cos(self.to_radians)~ - Inside source: true *** True Line Result - __raise_arithmetic_exception__ other, :-, e + Math.cos(self.to_radians) ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -177994,14 +184182,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Returns `-1` if the number is less than `0`. `+1` if the number~ -- Inside source: true -*** True Line Result - # Returns `-1` if the number is less than `0`. `+1` if the number -** Processing line: ~ # is greater than `0`. Returns `0` if the number is equal to `0`.~ +** Processing line: ~ # Returns the cosine of a represented in degrees (NOT radians).~ - Inside source: true *** True Line Result - # is greater than `0`. Returns `0` if the number is equal to `0`. + # Returns the cosine of a represented in degrees (NOT radians). ** Processing line: ~ #~ - Inside source: true *** True Line Result @@ -178010,22 +184194,30 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result # @gtk -** Processing line: ~ def sign~ +** Processing line: ~ def sin~ - Inside source: true *** True Line Result - def sign -** Processing line: ~ return -1 if self < 0~ + def sin +** Processing line: ~ Math.sin(self.to_radians)~ - Inside source: true *** True Line Result - return -1 if self < 0 -** Processing line: ~ return 1 if self > 0~ + Math.sin(self.to_radians) +** Processing line: ~ end~ - Inside source: true *** True Line Result - return 1 if self > 0 -** Processing line: ~ return 0~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - return 0 + +** Processing line: ~ def to_sf~ +- Inside source: true +*** True Line Result + def to_sf +** Processing line: ~ "%.2f" % self~ +- Inside source: true +*** True Line Result + "%.2f" % self ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -178034,54 +184226,66 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Returns `true` if number is greater than `0`.~ +** Processing line: ~ def ifloor int~ - Inside source: true *** True Line Result - # Returns `true` if number is greater than `0`. -** Processing line: ~ #~ + def ifloor int +** Processing line: ~ (self.idiv int.to_i) * int.to_i~ - Inside source: true *** True Line Result - # -** Processing line: ~ # @gtk~ + (self.idiv int.to_i) * int.to_i +** Processing line: ~ end~ - Inside source: true *** True Line Result - # @gtk -** Processing line: ~ def pos?~ + end +** Processing line: ~ end~ - Inside source: true *** True Line Result - def pos? -** Processing line: ~ sign > 0~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - sign > 0 -** Processing line: ~ end~ + +** Processing line: ~ class Float~ - Inside source: true *** True Line Result - end + class Float +** Processing line: ~ include ValueType~ +- Inside source: true +*** True Line Result + include ValueType ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # Returns `true` if number is less than `0`.~ +** Processing line: ~ alias_method :__original_add__, :+ unless Float.instance_methods.include? :__original_add__~ - Inside source: true *** True Line Result - # Returns `true` if number is less than `0`. -** Processing line: ~ #~ + alias_method :__original_add__, :+ unless Float.instance_methods.include? :__original_add__ +** Processing line: ~ alias_method :__original_subtract__, :- unless Float.instance_methods.include? :__original_subtract__~ - Inside source: true *** True Line Result - # -** Processing line: ~ # @gtk~ + alias_method :__original_subtract__, :- unless Float.instance_methods.include? :__original_subtract__ +** Processing line: ~ alias_method :__original_multiply__, :* unless Float.instance_methods.include? :__original_multiply__~ - Inside source: true *** True Line Result - # @gtk -** Processing line: ~ def neg?~ + alias_method :__original_multiply__, :* unless Float.instance_methods.include? :__original_multiply__ +** Processing line: ~ alias_method :__original_divide__, :- unless Float.instance_methods.include? :__original_divide__~ - Inside source: true *** True Line Result - def neg? -** Processing line: ~ sign < 0~ + alias_method :__original_divide__, :- unless Float.instance_methods.include? :__original_divide__ +** Processing line: ~~ - Inside source: true *** True Line Result - sign < 0 + +** Processing line: ~ def serialize~ +- Inside source: true +*** True Line Result + def serialize +** Processing line: ~ self~ +- Inside source: true +*** True Line Result + self ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -178090,26 +184294,26 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Returns the cosine of a represented in degrees (NOT radians).~ +** Processing line: ~ # @gtk~ - Inside source: true *** True Line Result - # Returns the cosine of a represented in degrees (NOT radians). -** Processing line: ~ #~ + # @gtk +** Processing line: ~ def sign~ - Inside source: true *** True Line Result - # -** Processing line: ~ # @gtk~ + def sign +** Processing line: ~ return -1 if self < 0~ - Inside source: true *** True Line Result - # @gtk -** Processing line: ~ def cos~ + return -1 if self < 0 +** Processing line: ~ return 1 if self > 0~ - Inside source: true *** True Line Result - def cos -** Processing line: ~ Math.cos(self.to_radians)~ + return 1 if self > 0 +** Processing line: ~ return 0~ - Inside source: true *** True Line Result - Math.cos(self.to_radians) + return 0 ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -178118,26 +184322,26 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ # Returns the cosine of a represented in degrees (NOT radians).~ +** Processing line: ~ def replace_infinity scalar~ - Inside source: true *** True Line Result - # Returns the cosine of a represented in degrees (NOT radians). -** Processing line: ~ #~ + def replace_infinity scalar +** Processing line: ~ return self if !scalar~ - Inside source: true *** True Line Result - # -** Processing line: ~ # @gtk~ + return self if !scalar +** Processing line: ~ return self unless self.infinite?~ - Inside source: true *** True Line Result - # @gtk -** Processing line: ~ def sin~ + return self unless self.infinite? +** Processing line: ~ return -scalar if self < 0~ - Inside source: true *** True Line Result - def sin -** Processing line: ~ Math.sin(self.to_radians)~ + return -scalar if self < 0 +** Processing line: ~ return scalar if self > 0~ - Inside source: true *** True Line Result - Math.sin(self.to_radians) + return scalar if self > 0 ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -178182,86 +184386,182 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ class Float~ +** Processing line: ~ class Integer~ - Inside source: true *** True Line Result - class Float -** Processing line: ~ include ValueType~ + class Integer +** Processing line: ~ alias_method :__original_round__, :round unless Integer.instance_methods.include? :__original_round__~ - Inside source: true *** True Line Result - include ValueType -** Processing line: ~~ + alias_method :__original_round__, :round unless Integer.instance_methods.include? :__original_round__ +** Processing line: ~ alias_method :__original_add__, :+ unless Integer.instance_methods.include? :__original_add__~ - Inside source: true *** True Line Result - -** Processing line: ~ alias_method :__original_add__, :+ unless Float.instance_methods.include? :__original_add__~ + alias_method :__original_add__, :+ unless Integer.instance_methods.include? :__original_add__ +** Processing line: ~ alias_method :__original_subtract__, :- unless Integer.instance_methods.include? :__original_subtract__~ - Inside source: true *** True Line Result - alias_method :__original_add__, :+ unless Float.instance_methods.include? :__original_add__ -** Processing line: ~ alias_method :__original_subtract__, :- unless Float.instance_methods.include? :__original_subtract__~ + alias_method :__original_subtract__, :- unless Integer.instance_methods.include? :__original_subtract__ +** Processing line: ~ alias_method :__original_multiply__, :* unless Integer.instance_methods.include? :__original_multiply__~ - Inside source: true *** True Line Result - alias_method :__original_subtract__, :- unless Float.instance_methods.include? :__original_subtract__ -** Processing line: ~ alias_method :__original_multiply__, :* unless Float.instance_methods.include? :__original_multiply__~ + alias_method :__original_multiply__, :* unless Integer.instance_methods.include? :__original_multiply__ +** Processing line: ~ alias_method :__original_divide__, :- unless Integer.instance_methods.include? :__original_divide__~ - Inside source: true *** True Line Result - alias_method :__original_multiply__, :* unless Float.instance_methods.include? :__original_multiply__ -** Processing line: ~ alias_method :__original_divide__, :- unless Float.instance_methods.include? :__original_divide__~ + alias_method :__original_divide__, :- unless Integer.instance_methods.include? :__original_divide__ +** Processing line: ~~ - Inside source: true *** True Line Result - alias_method :__original_divide__, :- unless Float.instance_methods.include? :__original_divide__ + +** Processing line: ~ def round *args~ +- Inside source: true +*** True Line Result + def round *args +** Processing line: ~ __original_round__~ +- Inside source: true +*** True Line Result + __original_round__ +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def - other~ +** Processing line: ~ def nan?~ +- Inside source: true +*** True Line Result + def nan? +** Processing line: ~ false~ - Inside source: true *** True Line Result - def - other -** Processing line: ~ return self unless other~ + false +** Processing line: ~ end~ - Inside source: true *** True Line Result - return self unless other -** Processing line: ~ super~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - super -** Processing line: ~ rescue Exception => e~ + +** Processing line: ~ def center other~ - Inside source: true *** True Line Result - rescue Exception => e -** Processing line: ~ __raise_arithmetic_exception__ other, :-, e~ + def center other +** Processing line: ~ (self - other).abs.fdiv(2)~ - Inside source: true *** True Line Result - __raise_arithmetic_exception__ other, :-, e + (self - other).abs.fdiv(2) ** Processing line: ~ end~ - Inside source: true *** True Line Result end +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def + other~ +** Processing line: ~#+end_src~ +- Line was identified as the end of a code block. +*** True Line Result +#+end_src +** Processing line: ~~ +- End of paragraph detected. +*** True Line Result + +** Processing line: ~*** recording.rb~ +- Header detected. +*** True Line Result + +*** True Line Result +*** recording.rb +** Processing line: ~#+begin_src ruby~ +- Line was identified as the beginning of a code block. +*** True Line Result + +*** True Line Result +#+begin_src ruby +** Processing line: ~ # ./dragon/recording.rb~ - Inside source: true *** True Line Result - def + other -** Processing line: ~ return self unless other~ + # ./dragon/recording.rb +** Processing line: ~ # coding: utf-8~ - Inside source: true *** True Line Result - return self unless other -** Processing line: ~ super~ + # coding: utf-8 +** Processing line: ~ # Copyright 2019 DragonRuby LLC~ - Inside source: true *** True Line Result - super -** Processing line: ~ rescue Exception => e~ + # Copyright 2019 DragonRuby LLC +** Processing line: ~ # MIT License~ - Inside source: true *** True Line Result - rescue Exception => e -** Processing line: ~ __raise_arithmetic_exception__ other, :+, e~ + # MIT License +** Processing line: ~ # recording.rb has been released under MIT (*only this file*).~ +- Inside source: true +*** True Line Result + # recording.rb has been released under MIT (*only this file*). +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ module GTK~ - Inside source: true *** True Line Result - __raise_arithmetic_exception__ other, :+, e + module GTK +** Processing line: ~ # FIXME: Gross~ +- Inside source: true +*** True Line Result + # FIXME: Gross +** Processing line: ~ # @gtk~ +- Inside source: true +*** True Line Result + # @gtk +** Processing line: ~ class Replay~ +- Inside source: true +*** True Line Result + class Replay +** Processing line: ~ # @gtk~ +- Inside source: true +*** True Line Result + # @gtk +** Processing line: ~ def self.start file_name = nil~ +- Inside source: true +*** True Line Result + def self.start file_name = nil +** Processing line: ~ $recording.start_replay file_name~ +- Inside source: true +*** True Line Result + $recording.start_replay file_name +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ # @gtk~ +- Inside source: true +*** True Line Result + # @gtk +** Processing line: ~ def self.stop~ +- Inside source: true +*** True Line Result + def self.stop +** Processing line: ~ $recording.stop_replay~ +- Inside source: true +*** True Line Result + $recording.stop_replay +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -178270,238 +184570,958 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ def * other~ +** Processing line: ~ # @gtk~ - Inside source: true *** True Line Result - def * other -** Processing line: ~ return self unless other~ + # @gtk +** Processing line: ~ class Recording~ - Inside source: true *** True Line Result - return self unless other -** Processing line: ~ super~ + class Recording +** Processing line: ~ def initialize runtime~ - Inside source: true *** True Line Result - super -** Processing line: ~ rescue Exception => e~ + def initialize runtime +** Processing line: ~ @runtime = runtime~ - Inside source: true *** True Line Result - rescue Exception => e -** Processing line: ~ __raise_arithmetic_exception__ other, :*, e~ + @runtime = runtime +** Processing line: ~ @tick_count = 0~ - Inside source: true *** True Line Result - __raise_arithmetic_exception__ other, :*, e -** Processing line: ~ end~ + @tick_count = 0 +** Processing line: ~ @global_input_order = 1~ - Inside source: true *** True Line Result - end + @global_input_order = 1 +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def / other~ +** Processing line: ~ def tick~ - Inside source: true *** True Line Result - def / other -** Processing line: ~ return self unless other~ + def tick +** Processing line: ~ @tick_count += 1~ - Inside source: true *** True Line Result - return self unless other -** Processing line: ~ super~ + @tick_count += 1 +** Processing line: ~ end~ - Inside source: true *** True Line Result - super -** Processing line: ~ rescue Exception => e~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - rescue Exception => e -** Processing line: ~ __raise_arithmetic_exception__ other, :/, e~ + +** Processing line: ~ def start_recording seed_number = nil~ - Inside source: true *** True Line Result - __raise_arithmetic_exception__ other, :/, e -** Processing line: ~ end~ + def start_recording seed_number = nil +** Processing line: ~ if !seed_number~ - Inside source: true *** True Line Result - end + if !seed_number +** Processing line: ~ log <<-S~ +- Inside source: true +*** True Line Result + log <<-S +** Processing line: ~ * ERROR:~ +- Inside source: true +*** True Line Result + * ERROR: +** Processing line: ~ To start recording, you must provide an integer value to~ +- Inside source: true +*** True Line Result + To start recording, you must provide an integer value to +** Processing line: ~ seed random number generation.~ +- Inside source: true +*** True Line Result + seed random number generation. +** Processing line: ~ S~ +- Inside source: true +*** True Line Result + S +** Processing line: ~ $console.set_command "$recording.start SEED_NUMBER"~ +- Inside source: true +*** True Line Result + $console.set_command "$recording.start SEED_NUMBER" +** Processing line: ~ return~ +- Inside source: true +*** True Line Result + return +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def serialize~ +** Processing line: ~ if @is_recording~ - Inside source: true *** True Line Result - def serialize -** Processing line: ~ self~ + if @is_recording +** Processing line: ~ log <<-S~ - Inside source: true *** True Line Result - self -** Processing line: ~ end~ + log <<-S +** Processing line: ~ * ERROR:~ - Inside source: true *** True Line Result - end + * ERROR: +** Processing line: ~ You are already recording, first cancel (or stop) the current recording.~ +- Inside source: true +*** True Line Result + You are already recording, first cancel (or stop) the current recording. +** Processing line: ~ S~ +- Inside source: true +*** True Line Result + S +** Processing line: ~ $console.set_command "$recording.cancel"~ +- Inside source: true +*** True Line Result + $console.set_command "$recording.cancel" +** Processing line: ~ return~ +- Inside source: true +*** True Line Result + return +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ # @gtk~ +** Processing line: ~ if @is_replaying~ - Inside source: true *** True Line Result - # @gtk -** Processing line: ~ def sign~ + if @is_replaying +** Processing line: ~ log <<-S~ - Inside source: true *** True Line Result - def sign -** Processing line: ~ return -1 if self < 0~ + log <<-S +** Processing line: ~ * ERROR:~ - Inside source: true *** True Line Result - return -1 if self < 0 -** Processing line: ~ return 1 if self > 0~ + * ERROR: +** Processing line: ~ You are currently replaying a recording, first stop the replay.~ - Inside source: true *** True Line Result - return 1 if self > 0 -** Processing line: ~ return 0~ + You are currently replaying a recording, first stop the replay. +** Processing line: ~ S~ - Inside source: true *** True Line Result - return 0 -** Processing line: ~ end~ + S +** Processing line: ~ return~ - Inside source: true *** True Line Result - end + return +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def replace_infinity scalar~ +** Processing line: ~ log_info <<-S~ - Inside source: true *** True Line Result - def replace_infinity scalar -** Processing line: ~ return self if !scalar~ + log_info <<-S +** Processing line: ~ Recording has begun with RNG seed value set to #{seed_number}.~ - Inside source: true *** True Line Result - return self if !scalar -** Processing line: ~ return self unless self.infinite?~ + Recording has begun with RNG seed value set to #{seed_number}. +** Processing line: ~ To stop recording use stop_recording(filename).~ - Inside source: true *** True Line Result - return self unless self.infinite? -** Processing line: ~ return -scalar if self < 0~ + To stop recording use stop_recording(filename). +** Processing line: ~ The recording will stop without saving a file if a filename is nil.~ - Inside source: true *** True Line Result - return -scalar if self < 0 -** Processing line: ~ return scalar if self > 0~ + The recording will stop without saving a file if a filename is nil. +** Processing line: ~ S~ - Inside source: true *** True Line Result - return scalar if self > 0 -** Processing line: ~ end~ + S +** Processing line: ~~ - Inside source: true *** True Line Result - end + +** Processing line: ~ $console.set_command "$recording.stop 'replay.txt'"~ +- Inside source: true +*** True Line Result + $console.set_command "$recording.stop 'replay.txt'" +** Processing line: ~ @runtime.__reset__~ +- Inside source: true +*** True Line Result + @runtime.__reset__ +** Processing line: ~ @seed_number = seed_number~ +- Inside source: true +*** True Line Result + @seed_number = seed_number +** Processing line: ~ @runtime.set_rng seed_number~ +- Inside source: true +*** True Line Result + @runtime.set_rng seed_number ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def to_sf~ +** Processing line: ~ @tick_count = 0~ - Inside source: true *** True Line Result - def to_sf -** Processing line: ~ "%.2f" % self~ + @tick_count = 0 +** Processing line: ~ @global_input_order = 1~ - Inside source: true *** True Line Result - "%.2f" % self -** Processing line: ~ end~ + @global_input_order = 1 +** Processing line: ~ @is_recording = true~ - Inside source: true *** True Line Result - end + @is_recording = true +** Processing line: ~ @input_history = []~ +- Inside source: true +*** True Line Result + @input_history = [] +** Processing line: ~ @runtime.notify! "Recording started. When completed, open the console to save it using $recording.stop FILE_NAME (or cancel).", 300~ +- Inside source: true +*** True Line Result + @runtime.notify! "Recording started. When completed, open the console to save it using $recording.stop FILE_NAME (or cancel).", 300 +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def ifloor int~ +** Processing line: ~ # @gtk~ - Inside source: true *** True Line Result - def ifloor int -** Processing line: ~ (self.idiv int.to_i) * int.to_i~ + # @gtk +** Processing line: ~ def start seed_number = nil~ - Inside source: true *** True Line Result - (self.idiv int.to_i) * int.to_i -** Processing line: ~ end~ + def start seed_number = nil +** Processing line: ~ start_recording seed_number~ - Inside source: true *** True Line Result - end -** Processing line: ~ end~ + start_recording seed_number +** Processing line: ~ end~ - Inside source: true *** True Line Result - end + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ class Integer~ +** Processing line: ~ def is_replaying?~ - Inside source: true *** True Line Result - class Integer -** Processing line: ~ alias_method :__original_round__, :round unless Integer.instance_methods.include? :__original_round__~ + def is_replaying? +** Processing line: ~ @is_replaying~ - Inside source: true *** True Line Result - alias_method :__original_round__, :round unless Integer.instance_methods.include? :__original_round__ -** Processing line: ~ alias_method :__original_add__, :+ unless Integer.instance_methods.include? :__original_add__~ + @is_replaying +** Processing line: ~ end~ - Inside source: true *** True Line Result - alias_method :__original_add__, :+ unless Integer.instance_methods.include? :__original_add__ -** Processing line: ~ alias_method :__original_subtract__, :- unless Integer.instance_methods.include? :__original_subtract__~ + end +** Processing line: ~~ - Inside source: true *** True Line Result - alias_method :__original_subtract__, :- unless Integer.instance_methods.include? :__original_subtract__ -** Processing line: ~ alias_method :__original_multiply__, :* unless Integer.instance_methods.include? :__original_multiply__~ + +** Processing line: ~ def is_recording?~ - Inside source: true *** True Line Result - alias_method :__original_multiply__, :* unless Integer.instance_methods.include? :__original_multiply__ -** Processing line: ~ alias_method :__original_divide__, :- unless Integer.instance_methods.include? :__original_divide__~ + def is_recording? +** Processing line: ~ @is_recording~ - Inside source: true *** True Line Result - alias_method :__original_divide__, :- unless Integer.instance_methods.include? :__original_divide__ + @is_recording +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def round *args~ +** Processing line: ~ # @gtk~ - Inside source: true *** True Line Result - def round *args -** Processing line: ~ __original_round__~ + # @gtk +** Processing line: ~ def stop file_name = nil~ - Inside source: true *** True Line Result - __original_round__ -** Processing line: ~ end~ + def stop file_name = nil +** Processing line: ~ stop_recording file_name~ - Inside source: true *** True Line Result - end + stop_recording file_name +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def nan?~ +** Processing line: ~ # @gtk~ - Inside source: true *** True Line Result - def nan? -** Processing line: ~ false~ + # @gtk +** Processing line: ~ def cancel~ - Inside source: true *** True Line Result - false -** Processing line: ~ end~ + def cancel +** Processing line: ~ stop_recording_core~ - Inside source: true *** True Line Result - end + stop_recording_core +** Processing line: ~ @runtime.notify! "Recording cancelled."~ +- Inside source: true +*** True Line Result + @runtime.notify! "Recording cancelled." +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~~ - Inside source: true *** True Line Result -** Processing line: ~ def center other~ +** Processing line: ~ def stop_recording file_name = nil~ - Inside source: true *** True Line Result - def center other -** Processing line: ~ (self - other).abs.fdiv(2)~ + def stop_recording file_name = nil +** Processing line: ~ if !file_name~ - Inside source: true *** True Line Result - (self - other).abs.fdiv(2) + if !file_name +** Processing line: ~ log <<-S~ +- Inside source: true +*** True Line Result + log <<-S +** Processing line: ~ * ERROR:~ +- Inside source: true +*** True Line Result + * ERROR: +** Processing line: ~ To please specify a file name when calling:~ +- Inside source: true +*** True Line Result + To please specify a file name when calling: +** Processing line: ~ $recording.stop FILE_NAME~ +- Inside source: true +*** True Line Result + $recording.stop FILE_NAME +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ If you do NOT want to save the recording, call:~ +- Inside source: true +*** True Line Result + If you do NOT want to save the recording, call: +** Processing line: ~ $recording.cancel~ +- Inside source: true +*** True Line Result + $recording.cancel +** Processing line: ~ S~ +- Inside source: true +*** True Line Result + S +** Processing line: ~ $console.set_command "$recording.stop 'replay.txt'"~ +- Inside source: true +*** True Line Result + $console.set_command "$recording.stop 'replay.txt'" +** Processing line: ~ return~ +- Inside source: true +*** True Line Result + return +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ if !@is_recording~ +- Inside source: true +*** True Line Result + if !@is_recording +** Processing line: ~ log_info "You are not currently recording. Use start_recording(seed_number) to start recording."~ +- Inside source: true +*** True Line Result + log_info "You are not currently recording. Use start_recording(seed_number) to start recording." +** Processing line: ~ $console.set_command "$recording.start"~ +- Inside source: true +*** True Line Result + $console.set_command "$recording.start" +** Processing line: ~ return~ +- Inside source: true +*** True Line Result + return +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ if file_name~ +- Inside source: true +*** True Line Result + if file_name +** Processing line: ~ text = "replay_version 2.0\n"~ +- Inside source: true +*** True Line Result + text = "replay_version 2.0\n" +** Processing line: ~ text << "stopped_at #{@tick_count}\n"~ +- Inside source: true +*** True Line Result + text << "stopped_at #{@tick_count}\n" +** Processing line: ~ text << "seed #{@seed_number}\n"~ +- Inside source: true +*** True Line Result + text << "seed #{@seed_number}\n" +** Processing line: ~ text << "recorded_at #{Time.now.to_s}\n"~ +- Inside source: true +*** True Line Result + text << "recorded_at #{Time.now.to_s}\n" +** Processing line: ~ @input_history.each do |items|~ +- Inside source: true +*** True Line Result + @input_history.each do |items| +** Processing line: ~ text << "#{items}\n"~ +- Inside source: true +*** True Line Result + text << "#{items}\n" +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~ @runtime.write_file file_name, text~ +- Inside source: true +*** True Line Result + @runtime.write_file file_name, text +** Processing line: ~ @runtime.write_file 'last_replay.txt', text~ +- Inside source: true +*** True Line Result + @runtime.write_file 'last_replay.txt', text +** Processing line: ~ log_info "The recording has been saved successfully at #{file_name}. You can use start_replay(\"#{file_name}\") to replay the recording."~ +- Inside source: true +*** True Line Result + log_info "The recording has been saved successfully at #{file_name}. You can use start_replay(\"#{file_name}\") to replay the recording." +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ $console.set_command "$replay.start '#{file_name}'"~ +- Inside source: true +*** True Line Result + $console.set_command "$replay.start '#{file_name}'" +** Processing line: ~ stop_recording_core~ +- Inside source: true +*** True Line Result + stop_recording_core +** Processing line: ~ @runtime.notify! "Recording saved to #{file_name}. To replay it: $replay.start \"#{file_name}\"."~ +- Inside source: true +*** True Line Result + @runtime.notify! "Recording saved to #{file_name}. To replay it: $replay.start \"#{file_name}\"." +** Processing line: ~ log_info "You can run the replay later on startup using: ./dragonruby mygame --replay #{@replay_file_name}"~ +- Inside source: true +*** True Line Result + log_info "You can run the replay later on startup using: ./dragonruby mygame --replay #{@replay_file_name}" +** Processing line: ~ nil~ +- Inside source: true +*** True Line Result + nil +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ def stop_recording_core~ +- Inside source: true +*** True Line Result + def stop_recording_core +** Processing line: ~ @is_recording = false~ +- Inside source: true +*** True Line Result + @is_recording = false +** Processing line: ~ @input_history = nil~ +- Inside source: true +*** True Line Result + @input_history = nil +** Processing line: ~ @last_history = nil~ +- Inside source: true +*** True Line Result + @last_history = nil +** Processing line: ~ @runtime.__reset__~ +- Inside source: true +*** True Line Result + @runtime.__reset__ +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ def start_replay file_name = nil~ +- Inside source: true +*** True Line Result + def start_replay file_name = nil +** Processing line: ~ if !file_name~ +- Inside source: true +*** True Line Result + if !file_name +** Processing line: ~ log <<-S~ +- Inside source: true +*** True Line Result + log <<-S +** Processing line: ~ * ERROR:~ +- Inside source: true +*** True Line Result + * ERROR: +** Processing line: ~ Please provide a file name to $recording.start.~ +- Inside source: true +*** True Line Result + Please provide a file name to $recording.start. +** Processing line: ~ S~ +- Inside source: true +*** True Line Result + S +** Processing line: ~ $console.set_command "$replay.start 'replay.txt'"~ +- Inside source: true +*** True Line Result + $console.set_command "$replay.start 'replay.txt'" +** Processing line: ~ return~ +- Inside source: true +*** True Line Result + return +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ text = @runtime.read_file file_name~ +- Inside source: true +*** True Line Result + text = @runtime.read_file file_name +** Processing line: ~ return false unless text~ +- Inside source: true +*** True Line Result + return false unless text +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ if text.each_line.first.strip != "replay_version 2.0"~ +- Inside source: true +*** True Line Result + if text.each_line.first.strip != "replay_version 2.0" +** Processing line: ~ raise "The replay file #{file_name} is not compatible with this version of DragonRuby Game Toolkit. Please recreate the replay (sorry)."~ +- Inside source: true +*** True Line Result + raise "The replay file #{file_name} is not compatible with this version of DragonRuby Game Toolkit. Please recreate the replay (sorry)." +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ @replay_file_name = file_name~ +- Inside source: true +*** True Line Result + @replay_file_name = file_name +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ $replay_data = { input_history: { } }~ +- Inside source: true +*** True Line Result + $replay_data = { input_history: { } } +** Processing line: ~ text.each_line do |l|~ +- Inside source: true +*** True Line Result + text.each_line do |l| +** Processing line: ~ if l.strip.length == 0~ +- Inside source: true +*** True Line Result + if l.strip.length == 0 +** Processing line: ~ next~ +- Inside source: true +*** True Line Result + next +** Processing line: ~ elsif l.start_with? 'replay_version'~ +- Inside source: true +*** True Line Result + elsif l.start_with? 'replay_version' +** Processing line: ~ next~ +- Inside source: true +*** True Line Result + next +** Processing line: ~ elsif l.start_with? 'seed'~ +- Inside source: true +*** True Line Result + elsif l.start_with? 'seed' +** Processing line: ~ $replay_data[:seed] = l.split(' ').last.to_i~ +- Inside source: true +*** True Line Result + $replay_data[:seed] = l.split(' ').last.to_i +** Processing line: ~ elsif l.start_with? 'stopped_at'~ +- Inside source: true +*** True Line Result + elsif l.start_with? 'stopped_at' +** Processing line: ~ $replay_data[:stopped_at] = l.split(' ').last.to_i~ +- Inside source: true +*** True Line Result + $replay_data[:stopped_at] = l.split(' ').last.to_i +** Processing line: ~ elsif l.start_with? 'recorded_at'~ +- Inside source: true +*** True Line Result + elsif l.start_with? 'recorded_at' +** Processing line: ~ $replay_data[:recorded_at] = l.split(' ')[1..-1].join(' ')~ +- Inside source: true +*** True Line Result + $replay_data[:recorded_at] = l.split(' ')[1..-1].join(' ') +** Processing line: ~ elsif l.start_with? '['~ +- Inside source: true +*** True Line Result + elsif l.start_with? '[' +** Processing line: ~ name, value_1, value_2, value_count, id, tick_count = l.strip.gsub('[', '').gsub(']', '').split(',')~ +- Inside source: true +*** True Line Result + name, value_1, value_2, value_count, id, tick_count = l.strip.gsub('[', '').gsub(']', '').split(',') +** Processing line: ~ $replay_data[:input_history][tick_count.to_i] ||= []~ +- Inside source: true +*** True Line Result + $replay_data[:input_history][tick_count.to_i] ||= [] +** Processing line: ~ $replay_data[:input_history][tick_count.to_i] << {~ +- Inside source: true +*** True Line Result + $replay_data[:input_history][tick_count.to_i] << { +** Processing line: ~ id: id.to_i,~ +- Inside source: true +*** True Line Result + id: id.to_i, +** Processing line: ~ name: name.gsub(':', '').to_sym,~ +- Inside source: true +*** True Line Result + name: name.gsub(':', '').to_sym, +** Processing line: ~ value_1: value_1.to_f,~ +- Inside source: true +*** True Line Result + value_1: value_1.to_f, +** Processing line: ~ value_2: value_2.to_f,~ +- Inside source: true +*** True Line Result + value_2: value_2.to_f, +** Processing line: ~ value_count: value_count.to_i~ +- Inside source: true +*** True Line Result + value_count: value_count.to_i +** Processing line: ~ }~ +- Inside source: true +*** True Line Result + } +** Processing line: ~ else~ +- Inside source: true +*** True Line Result + else +** Processing line: ~ raise "Replay data seems corrupt. I don't know how to parse #{l}."~ +- Inside source: true +*** True Line Result + raise "Replay data seems corrupt. I don't know how to parse #{l}." +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ $replay_data[:input_history].keys.each do |key|~ +- Inside source: true +*** True Line Result + $replay_data[:input_history].keys.each do |key| +** Processing line: ~ $replay_data[:input_history][key] = $replay_data[:input_history][key].sort_by {|input| input[:id]}~ +- Inside source: true +*** True Line Result + $replay_data[:input_history][key] = $replay_data[:input_history][key].sort_by {|input| input[:id]} +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ @runtime.__reset__~ +- Inside source: true +*** True Line Result + @runtime.__reset__ +** Processing line: ~ @runtime.set_rng $replay_data[:seed]~ +- Inside source: true +*** True Line Result + @runtime.set_rng $replay_data[:seed] +** Processing line: ~ @tick_count = 0~ +- Inside source: true +*** True Line Result + @tick_count = 0 +** Processing line: ~ @is_replaying = true~ +- Inside source: true +*** True Line Result + @is_replaying = true +** Processing line: ~ log_info "Replay has been started."~ +- Inside source: true +*** True Line Result + log_info "Replay has been started." +** Processing line: ~ @runtime.notify! "Replay started [#{@replay_file_name}]."~ +- Inside source: true +*** True Line Result + @runtime.notify! "Replay started [#{@replay_file_name}]." +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ def stop_replay notification_message = "Replay has been stopped."~ +- Inside source: true +*** True Line Result + def stop_replay notification_message = "Replay has been stopped." +** Processing line: ~ if !is_replaying?~ +- Inside source: true +*** True Line Result + if !is_replaying? +** Processing line: ~ log <<-S~ +- Inside source: true +*** True Line Result + log <<-S +** Processing line: ~ * ERROR:~ +- Inside source: true +*** True Line Result + * ERROR: +** Processing line: ~ No replay is currently running. Call $replay.start FILE_NAME to start a replay.~ +- Inside source: true +*** True Line Result + No replay is currently running. Call $replay.start FILE_NAME to start a replay. +** Processing line: ~ S~ +- Inside source: true +*** True Line Result + S +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ $console.set_command "$replay.start 'replay.txt'"~ +- Inside source: true +*** True Line Result + $console.set_command "$replay.start 'replay.txt'" +** Processing line: ~ return~ +- Inside source: true +*** True Line Result + return +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~ log_info notification_message~ +- Inside source: true +*** True Line Result + log_info notification_message +** Processing line: ~ @is_replaying = false~ +- Inside source: true +*** True Line Result + @is_replaying = false +** Processing line: ~ $replay_data = nil~ +- Inside source: true +*** True Line Result + $replay_data = nil +** Processing line: ~ @tick_count = 0~ +- Inside source: true +*** True Line Result + @tick_count = 0 +** Processing line: ~ @global_input_order = 1~ +- Inside source: true +*** True Line Result + @global_input_order = 1 +** Processing line: ~ $console.set_command_silent "$replay.start '#{@replay_file_name}'"~ +- Inside source: true +*** True Line Result + $console.set_command_silent "$replay.start '#{@replay_file_name}'" +** Processing line: ~ @runtime.__reset__~ +- Inside source: true +*** True Line Result + @runtime.__reset__ +** Processing line: ~ @runtime.notify! notification_message~ +- Inside source: true +*** True Line Result + @runtime.notify! notification_message +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ def record_input_history name, value_1, value_2, value_count, clear_cache = false~ +- Inside source: true +*** True Line Result + def record_input_history name, value_1, value_2, value_count, clear_cache = false +** Processing line: ~ return if @is_replaying~ +- Inside source: true +*** True Line Result + return if @is_replaying +** Processing line: ~ return unless @is_recording~ +- Inside source: true +*** True Line Result + return unless @is_recording +** Processing line: ~ @input_history << [name, value_1, value_2, value_count, @global_input_order, @tick_count]~ +- Inside source: true +*** True Line Result + @input_history << [name, value_1, value_2, value_count, @global_input_order, @tick_count] +** Processing line: ~ @global_input_order += 1~ +- Inside source: true +*** True Line Result + @global_input_order += 1 +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ def stage_replay_values~ +- Inside source: true +*** True Line Result + def stage_replay_values +** Processing line: ~ return unless @is_replaying~ +- Inside source: true +*** True Line Result + return unless @is_replaying +** Processing line: ~ return unless $replay_data~ +- Inside source: true +*** True Line Result + return unless $replay_data +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ if $replay_data[:stopped_at] <= @tick_count~ +- Inside source: true +*** True Line Result + if $replay_data[:stopped_at] <= @tick_count +** Processing line: ~ stop_replay "Replay completed [#{@replay_file_name}]. To rerun, bring up the Console and press enter."~ +- Inside source: true +*** True Line Result + stop_replay "Replay completed [#{@replay_file_name}]. To rerun, bring up the Console and press enter." +** Processing line: ~ return~ +- Inside source: true +*** True Line Result + return +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ inputs_this_tick = $replay_data[:input_history][@tick_count]~ +- Inside source: true +*** True Line Result + inputs_this_tick = $replay_data[:input_history][@tick_count] +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ if @tick_count.zmod? 60~ +- Inside source: true +*** True Line Result + if @tick_count.zmod? 60 +** Processing line: ~ log_info "Replay ends in #{($replay_data[:stopped_at] - @tick_count).idiv 60} second(s)."~ +- Inside source: true +*** True Line Result + log_info "Replay ends in #{($replay_data[:stopped_at] - @tick_count).idiv 60} second(s)." +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ return unless inputs_this_tick~ +- Inside source: true +*** True Line Result + return unless inputs_this_tick +** Processing line: ~ inputs_this_tick.each do |v|~ +- Inside source: true +*** True Line Result + inputs_this_tick.each do |v| +** Processing line: ~ args = []~ +- Inside source: true +*** True Line Result + args = [] +** Processing line: ~ args << v[:value_1] if v[:value_count] >= 1~ +- Inside source: true +*** True Line Result + args << v[:value_1] if v[:value_count] >= 1 +** Processing line: ~ args << v[:value_2] if v[:value_count] >= 2~ +- Inside source: true +*** True Line Result + args << v[:value_2] if v[:value_count] >= 2 +** Processing line: ~ args << :replay~ +- Inside source: true +*** True Line Result + args << :replay +** Processing line: ~ $gtk.send v[:name], *args~ +- Inside source: true +*** True Line Result + $gtk.send v[:name], *args +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end +** Processing line: ~ end~ +- Inside source: true +*** True Line Result + end ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -180018,10 +187038,6 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result S -** Processing line: ~ time_start = Time.now~ -- Inside source: true -*** True Line Result - time_start = Time.now ** Processing line: ~ idx = 0~ - Inside source: true *** True Line Result @@ -180030,6 +187046,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result r = nil +** Processing line: ~ time_start = Time.now~ +- Inside source: true +*** True Line Result + time_start = Time.now ** Processing line: ~ while idx < iterations~ - Inside source: true *** True Line Result @@ -180046,10 +187066,6 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result end -** Processing line: ~~ -- Inside source: true -*** True Line Result - ** Processing line: ~ result = (Time.now - time_start).round 3~ - Inside source: true *** True Line Result @@ -180550,10 +187566,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result -** Processing line: ~ if !$gtk.production~ +** Processing line: ~ if !self.production~ - Inside source: true *** True Line Result - if !$gtk.production + if !self.production ** Processing line: ~ fn.each_send pass.debug, self, :draw_primitive~ - Inside source: true *** True Line Result @@ -180618,6 +187634,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result else +** Processing line: ~ s = s.as_hash if s.is_a? OpenEntity~ +- Inside source: true +*** True Line Result + s = s.as_hash if s.is_a? OpenEntity ** Processing line: ~ @ffi_draw.draw_solid_2 s.x, s.y, s.w, s.h,~ - Inside source: true *** True Line Result @@ -180670,6 +187690,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result else +** Processing line: ~ s = s.as_hash if s.is_a? OpenEntity~ +- Inside source: true +*** True Line Result + s = s.as_hash if s.is_a? OpenEntity ** Processing line: ~ @ffi_draw.draw_sprite_4 s.x, s.y, s.w, s.h,~ - Inside source: true *** True Line Result @@ -180746,6 +187770,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result else +** Processing line: ~ s = s.as_hash if s.is_a? OpenEntity~ +- Inside source: true +*** True Line Result + s = s.as_hash if s.is_a? OpenEntity ** Processing line: ~ @ffi_draw.draw_screenshot (s.path || '').to_s,~ - Inside source: true *** True Line Result @@ -180818,6 +187846,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result else +** Processing line: ~ l = l.as_hash if l.is_a? OpenEntity~ +- Inside source: true +*** True Line Result + l = l.as_hash if l.is_a? OpenEntity ** Processing line: ~ @ffi_draw.draw_label_3 l.x, l.y,~ - Inside source: true *** True Line Result @@ -180886,6 +187918,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result else +** Processing line: ~ l = l.as_hash if l.is_a? OpenEntity~ +- Inside source: true +*** True Line Result + l = l.as_hash if l.is_a? OpenEntity ** Processing line: ~ if l.x2~ - Inside source: true *** True Line Result @@ -180986,6 +188022,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result else +** Processing line: ~ s = s.as_hash if s.is_a? OpenEntity~ +- Inside source: true +*** True Line Result + s = s.as_hash if s.is_a? OpenEntity ** Processing line: ~ @ffi_draw.draw_border_2 s.x, s.y, s.w, s.h,~ - Inside source: true *** True Line Result @@ -181258,10 +188298,10 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result @last_framerate = current_framerate -** Processing line: ~ if !@console.visible?~ +** Processing line: ~ if !@console.visible? && !@recording.is_replaying?~ - Inside source: true *** True Line Result - if !@console.visible? + if !@console.visible? && !@recording.is_replaying? ** Processing line: ~ log framerate_warning_message~ - Inside source: true *** True Line Result @@ -184914,18 +191954,18 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result if (os.first.is_a? Numeric) -** Processing line: ~ sld! *os~ +** Processing line: ~ sld!(*os)~ - Inside source: true *** True Line Result - sld! *os + sld!(*os) ** Processing line: ~ else~ - Inside source: true *** True Line Result else -** Processing line: ~ os.each { |o| sld! *o }~ +** Processing line: ~ os.each { |o| sld!(*o) }~ - Inside source: true *** True Line Result - os.each { |o| sld! *o } + os.each { |o| sld!(*o) } ** Processing line: ~ end~ - Inside source: true *** True Line Result @@ -185114,6 +192154,106 @@ Follows is a source code listing for all files that have been open sourced. This - Inside source: true *** True Line Result +** Processing line: ~ =begin~ +- Inside source: true +*** True Line Result + =begin +** Processing line: ~ wht = [255] * 3~ +- Inside source: true +*** True Line Result + wht = [255] * 3 +** Processing line: ~ red = [255, 0, 0]~ +- Inside source: true +*** True Line Result + red = [255, 0, 0] +** Processing line: ~ blu = [0, 130, 255]~ +- Inside source: true +*** True Line Result + blu = [0, 130, 255] +** Processing line: ~ purp = [150, 80, 255]~ +- Inside source: true +*** True Line Result + purp = [150, 80, 255] +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ TICK {~ +- Inside source: true +*** True Line Result + TICK { +** Processing line: ~ bg! 0~ +- Inside source: true +*** True Line Result + bg! 0 +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ slds << [0, 0, 3, 3, 0, 255, 0, 255]~ +- Inside source: true +*** True Line Result + slds << [0, 0, 3, 3, 0, 255, 0, 255] +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ sld! 10, 10~ +- Inside source: true +*** True Line Result + sld! 10, 10 +** Processing line: ~ sld! 20, 20, 3, 2~ +- Inside source: true +*** True Line Result + sld! 20, 20, 3, 2 +** Processing line: ~ sld! 30, 30, 2, 2, red~ +- Inside source: true +*** True Line Result + sld! 30, 30, 2, 2, red +** Processing line: ~ sld! 35, 35, blu~ +- Inside source: true +*** True Line Result + sld! 35, 35, blu +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ slds! 40, 40~ +- Inside source: true +*** True Line Result + slds! 40, 40 +** Processing line: ~~ +- Inside source: true +*** True Line Result + +** Processing line: ~ slds! [50, 50],~ +- Inside source: true +*** True Line Result + slds! [50, 50], +** Processing line: ~ [60, 60, purp],~ +- Inside source: true +*** True Line Result + [60, 60, purp], +** Processing line: ~ [70, 70, 10, 10, wht],~ +- Inside source: true +*** True Line Result + [70, 70, 10, 10, wht], +** Processing line: ~ [80, 80, 4, 4, 255, 0, 255]~ +- Inside source: true +*** True Line Result + [80, 80, 4, 4, 255, 0, 255] +** Processing line: ~ }~ +- Inside source: true +*** True Line Result + } +** Processing line: ~ =end~ +- Inside source: true +*** True Line Result + =end +** Processing line: ~~ +- Inside source: true +*** True Line Result + ** Processing line: ~#+end_src~ - Line was identified as the end of a code block. *** True Line Result @@ -192219,6 +199359,28 @@ Follows is a source code listing for all files that have been open sourced. This - Formatting line: ~Hides the mouse cursor.~ - Line's tilde count is: 0 - Line contains link marker: false +** Processing line: ~*** ~.set_cursor path, dx, dy~~ +- H3 detected. +- Determining if line is a header. +- Line contains ~*** ~... gsub-ing empty string +- Formatting line: ~~.set_cursor path, dx, dy~~ +- Line's tilde count is: 2 +- Line contains link marker: false +- CODE detected. +- Determining if line is a header. +- Line contains ~*** ~... gsub-ing empty string +- Formatting line: ~~.set_cursor path, dx, dy~~ +- Line's tilde count is: 2 +- Line contains link marker: false +- CODE detected. +** Processing line: ~Sets the system cursor to a sprite ~path~ with an offset of ~dx~ and ~dy~.~ +- P detected. +- Determining if line is a header. +- Line does not appear to be a header. +- Formatting line: ~Sets the system cursor to a sprite ~path~ with an offset of ~dx~ and ~dy~.~ +- Line's tilde count is: 6 +- Line contains link marker: false +- CODE detected. ** Processing line: ~*** ~.cursor_shown?~~ - H3 detected. - Determining if line is a header. @@ -192397,6 +199559,50 @@ Follows is a source code listing for all files that have been open sourced. This - PRE end detected. ** Processing line: ~~ ** Processing line: ~~ +** Processing line: ~* DOCS: ~GTK::Runtime#benchmark~~ +- H1 detected. +- Determining if line is a header. +- Line contains ~* ~... gsub-ing empty string +- Formatting line: ~DOCS: ~GTK::Runtime#benchmark~~ +- Line's tilde count is: 2 +- Line contains link marker: false +- CODE detected. +** Processing line: ~You can use this function to compare the relative performance of methods.~ +- P detected. +- Determining if line is a header. +- Line does not appear to be a header. +- Formatting line: ~You can use this function to compare the relative performance of methods.~ +- Line's tilde count is: 0 +- Line contains link marker: false +** Processing line: ~~ +** Processing line: ~#+begin_src ruby~ +- PRE start detected. +** Processing line: ~ def tick args~ +** Processing line: ~ # press r to run benchmark~ +** Processing line: ~ if args.inputs.keyboard.key_down.r~ +** Processing line: ~ args.gtk.console.show~ +** Processing line: ~ args.gtk.benchmark iterations: 1000, # number of iterations~ +** Processing line: ~ # label for experiment~ +** Processing line: ~ using_numeric_map: -> () {~ +** Processing line: ~ # experiment body~ +** Processing line: ~ v = 100.map do |i|~ +** Processing line: ~ i * 100~ +** Processing line: ~ end~ +** Processing line: ~ },~ +** Processing line: ~ # label for experiment~ +** Processing line: ~ using_numeric_times: -> () {~ +** Processing line: ~ # experiment body~ +** Processing line: ~ v = []~ +** Processing line: ~ 100.times do |i|~ +** Processing line: ~ v << i * 100~ +** Processing line: ~ end~ +** Processing line: ~ }~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~#+end_src~ +- PRE end detected. +** Processing line: ~~ +** Processing line: ~~ ** Processing line: ~* DOCS: ~Array~~ - H1 detected. - Determining if line is a header. @@ -196288,7 +203494,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ # Use args.inputs.mouse.click.created_at~ ** Processing line: ~~ ** Processing line: ~ # To see how many frames its been since the click occurred~ -** Processing line: ~ # Use args.inputs.mouse.click.creat_at_elapsed~ +** Processing line: ~ # Use args.inputs.mouse.click.created_at_elapsed~ ** Processing line: ~~ ** Processing line: ~ # Saving the click in args.state can be quite useful~ ** Processing line: ~~ @@ -199139,17 +206345,17 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ def calc_player_dx~ -** Processing line: ~ player.y += player.dy~ -** Processing line: ~ player.dy += state.gravity~ -** Processing line: ~ player.dy += player.dy * state.drag ** 2 * -1~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ def calc_player_dy~ ** Processing line: ~ player.dx = player.dx.clamp(-5, 5)~ ** Processing line: ~ player.dx *= 0.9~ ** Processing line: ~ player.x += player.dx~ ** Processing line: ~ end~ ** Processing line: ~~ +** Processing line: ~ def calc_player_dy~ +** Processing line: ~ player.y += player.dy~ +** Processing line: ~ player.dy += state.gravity~ +** Processing line: ~ player.dy += player.dy * state.drag ** 2 * -1~ +** Processing line: ~ end~ +** Processing line: ~~ ** Processing line: ~ def reset_player~ ** Processing line: ~ player.x = 100~ ** Processing line: ~ player.y = 720~ @@ -199308,8 +206514,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ input~ ** Processing line: ~ end~ ** Processing line: ~~ -** Processing line: ~ # Sets default values~ -** Processing line: ~ def defaults~ +** Processing line: ~ def init_game~ ** Processing line: ~ s.platforms ||= [ # initializes platforms collection with two platforms using hashes~ ** Processing line: ~ new_platform(x: 0, y: 0, w: 700, h: 32, dx: 1, speed: 0, rect: nil),~ ** Processing line: ~ new_platform(x: 0, y: 300, w: 700, h: 32, dx: 1, speed: 0, rect: nil), # 300 pixels higher~ @@ -199332,6 +206537,11 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ s.camera ||= { y: -100 } # shows view on screen (as the player moves upward, the camera does too)~ ** Processing line: ~ end~ ** Processing line: ~~ +** Processing line: ~ # Sets default values~ +** Processing line: ~ def defaults~ +** Processing line: ~ init_game~ +** Processing line: ~ end~ +** Processing line: ~~ ** Processing line: ~ # Outputs objects onto the screen~ ** Processing line: ~ def render~ ** Processing line: ~ outputs.solids << s.platforms.map do |p| # outputs platforms onto screen~ @@ -199419,7 +206629,9 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ rect: nil)~ ** Processing line: ~ end~ ** Processing line: ~ else~ +** Processing line: ~ # game over~ ** Processing line: ~ s.as_hash.clear # otherwise clear the hash (no new platform is necessary)~ +** Processing line: ~ init_game~ ** Processing line: ~ end~ ** Processing line: ~ end~ ** Processing line: ~~ @@ -202435,12 +209647,23 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ # Starts the game with player x's turn and creates an array (to_a) for space combinations.~ ** Processing line: ~ # Calls methods necessary for the game to run properly.~ ** Processing line: ~ def tick~ -** Processing line: ~ state.current_turn ||= :x~ -** Processing line: ~ state.space_combinations = [-1, 0, 1].product([-1, 0, 1]).to_a~ +** Processing line: ~ init_new_game~ ** Processing line: ~ render_board~ ** Processing line: ~ input_board~ ** Processing line: ~ end~ ** Processing line: ~~ +** Processing line: ~ def init_new_game~ +** Processing line: ~ state.current_turn ||= :x~ +** Processing line: ~ state.space_combinations ||= [-1, 0, 1].product([-1, 0, 1]).to_a~ +** Processing line: ~~ +** Processing line: ~ state.spaces ||= {}~ +** Processing line: ~~ +** Processing line: ~ state.space_combinations.each do |x, y|~ +** Processing line: ~ state.spaces[x] ||= {}~ +** Processing line: ~ state.spaces[x][y] ||= state.new_entity(:space)~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ ** Processing line: ~ # Uses borders to create grid squares for the game's board. Also outputs the game pieces using labels.~ ** Processing line: ~ def render_board~ ** Processing line: ~ square_size = 80~ @@ -202516,6 +209739,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ def input_restart_game~ ** Processing line: ~ return unless state.game_over~ ** Processing line: ~ gtk.reset~ +** Processing line: ~ init_new_game~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ # Checks if x or o won the game.~ @@ -202847,7 +210071,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ def calc_kill_zombie~ ** Processing line: ~~ ** Processing line: ~ # Find all zombies that intersect with the player. They are considered killed.~ -** Processing line: ~ killed_this_frame = state.zombies.find_all { |z| z.sprite.intersect_rect? state.player_sprite }~ +** Processing line: ~ killed_this_frame = state.zombies.find_all { |z| z.sprite && (z.sprite.intersect_rect? state.player_sprite) }~ ** Processing line: ~ state.zombies = state.zombies - killed_this_frame # remove newly killed zombies from zombies collection~ ** Processing line: ~ state.killed_zombies += killed_this_frame # add newly killed zombies to killed zombies~ ** Processing line: ~~ @@ -203811,6 +211035,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ def playtime_str t~ +** Processing line: ~ return "" unless t~ ** Processing line: ~ minutes = (t / 60.0).floor~ ** Processing line: ~ seconds = t - (minutes * 60.0).to_f~ ** Processing line: ~ return minutes.to_s + ':' + seconds.floor.to_s + ((seconds - seconds.floor).to_s + "000")[1..3]~ @@ -203923,7 +211148,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ results.playtime_slider_rect = progress_bar(args: args,~ ** Processing line: ~ row: 2.5,~ ** Processing line: ~ col: 2,~ -** Processing line: ~ percentage: audio_entry.playtime / audio_entry.length_,~ +** Processing line: ~ percentage: (audio_entry.playtime || 1) / (audio_entry.length_ || 1),~ ** Processing line: ~ text: "#{playtime_str(audio_entry.playtime)} / #{playtime_str(audio_entry.length_)}")~ ** Processing line: ~~ ** Processing line: ~ results.primitives << results.playtime_slider_rect.primitives~ @@ -204060,7 +211285,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ args.state.sound_files ||= [~ ** Processing line: ~ { name: :tada, path: "sounds/tada.wav" },~ ** Processing line: ~ { name: :splash, path: "sounds/splash.wav" },~ -** Processing line: ~ { name: :drum, path: "sounds/drum.wav" },~ +** Processing line: ~ { name: :drum, path: "sounds/drum.mp3" },~ ** Processing line: ~ { name: :spring, path: "sounds/spring.wav" },~ ** Processing line: ~ { name: :music, path: "sounds/music.ogg" }~ ** Processing line: ~ ]~ @@ -204140,36 +211365,6 @@ Follows is a source code listing for all files that have been open sourced. This - PRE end detected. ** Processing line: ~~ ** Processing line: ~~ -** Processing line: ~*** Advanced Audio - Audio Mixer - Metadata - ios_metadata.txt~ -- H3 detected. -- Determining if line is a header. -- Line contains ~*** ~... gsub-ing empty string -- Formatting line: ~Advanced Audio - Audio Mixer - Metadata - ios_metadata.txt~ -- Line's tilde count is: 0 -- Line contains link marker: false -- Determining if line is a header. -- Line contains ~*** ~... gsub-ing empty string -- Formatting line: ~Advanced Audio - Audio Mixer - Metadata - ios_metadata.txt~ -- Line's tilde count is: 0 -- Line contains link marker: false -** Processing line: ~~ -** Processing line: ~#+begin_src ruby~ -- PRE start detected. -** Processing line: ~ # ./samples/07_advanced_audio/01_audio_mixer/metadata/ios_metadata.txt~ -** Processing line: ~ # ios_metadata.txt is used by the Pro version of DragonRuby Game Toolkit to create iOS apps.~ -** Processing line: ~ # Information about the Pro version can be found at: http://dragonruby.org/toolkit/game#purchase~ -** Processing line: ~~ -** Processing line: ~ # teamid needs to be set to your assigned Team Id which can be found at https://developer.apple.com/account/#/membership/~ -** Processing line: ~ teamid=~ -** Processing line: ~ # appid needs to be set to your application identifier which can be found at https://developer.apple.com/account/resources/identifiers/list~ -** Processing line: ~ appid=~ -** Processing line: ~ # appname is the name you want to show up underneath the app icon on the device. Keep it under 10 characters.~ -** Processing line: ~ appname=~ -** Processing line: ~~ -** Processing line: ~#+end_src~ -- PRE end detected. -** Processing line: ~~ -** Processing line: ~~ ** Processing line: ~*** Advanced Audio - Sound Synthesis - main.rb~ - H3 detected. - Determining if line is a header. @@ -204784,6 +211979,168 @@ Follows is a source code listing for all files that have been open sourced. This - PRE end detected. ** Processing line: ~~ ** Processing line: ~~ +** Processing line: ~*** Advanced Rendering - Labels With Wrapped Text - main.rb~ +- H3 detected. +- Determining if line is a header. +- Line contains ~*** ~... gsub-ing empty string +- Formatting line: ~Advanced Rendering - Labels With Wrapped Text - main.rb~ +- Line's tilde count is: 0 +- Line contains link marker: false +- Determining if line is a header. +- Line contains ~*** ~... gsub-ing empty string +- Formatting line: ~Advanced Rendering - Labels With Wrapped Text - main.rb~ +- Line's tilde count is: 0 +- Line contains link marker: false +** Processing line: ~~ +** Processing line: ~#+begin_src ruby~ +- PRE start detected. +** Processing line: ~ # ./samples/07_advanced_rendering/00_labels_with_wrapped_text/app/main.rb~ +** Processing line: ~ def tick args~ +** Processing line: ~ # defaults~ +** Processing line: ~ args.state.scroll_location ||= 0~ +** Processing line: ~ args.state.textbox.messages ||= []~ +** Processing line: ~ args.state.textbox.scroll ||= 0~ +** Processing line: ~~ +** Processing line: ~ # render~ +** Processing line: ~ args.outputs.background_color = [0, 0, 0, 255]~ +** Processing line: ~ render_messages args~ +** Processing line: ~ render_instructions args~ +** Processing line: ~~ +** Processing line: ~ # inputs~ +** Processing line: ~ if args.inputs.keyboard.key_down.one~ +** Processing line: ~ queue_message args, "Hello there neighbour! my name is mark, how is your day today?"~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ if args.inputs.keyboard.key_down.two~ +** Processing line: ~ queue_message args, "I'm doing great sir, actually I'm having a picnic today"~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ if args.inputs.keyboard.key_down.three~ +** Processing line: ~ queue_message args, "Well that sounds wonderful!"~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ if args.inputs.keyboard.key_down.home~ +** Processing line: ~ args.state.scroll_location = 1~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ if args.inputs.keyboard.key_down.delete~ +** Processing line: ~ clear_message_queue args~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def queue_message args, msg~ +** Processing line: ~ args.state.textbox.messages.concat msg.wrapped_lines 50~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def clear_message_queue args~ +** Processing line: ~ args.state.textbox.messages = nil~ +** Processing line: ~ args.state.textbox.scroll = 0~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def render_messages args~ +** Processing line: ~ args.outputs[:textbox].w = 400~ +** Processing line: ~ args.outputs[:textbox].h = 720~ +** Processing line: ~~ +** Processing line: ~ args.outputs.primitives << args.state.textbox.messages.each_with_index.map do |s, idx|~ +** Processing line: ~ {~ +** Processing line: ~ x: 0,~ +** Processing line: ~ y: 20 * (args.state.textbox.messages.size - idx) + args.state.textbox.scroll * 20,~ +** Processing line: ~ text: s,~ +** Processing line: ~ size_enum: -3,~ +** Processing line: ~ alignment_enum: 0,~ +** Processing line: ~ r: 255, g:255, b: 255, a: 255~ +** Processing line: ~ }~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ args.outputs[:textbox].labels << args.state.textbox.messages.each_with_index.map do |s, idx|~ +** Processing line: ~ {~ +** Processing line: ~ x: 0,~ +** Processing line: ~ y: 20 * (args.state.textbox.messages.size - idx) + args.state.textbox.scroll * 20,~ +** Processing line: ~ text: s,~ +** Processing line: ~ size_enum: -3,~ +** Processing line: ~ alignment_enum: 0,~ +** Processing line: ~ r: 255, g:255, b: 255, a: 255~ +** Processing line: ~ }~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ args.outputs[:textbox].borders << [0, 0, args.outputs[:textbox].w, 720]~ +** Processing line: ~~ +** Processing line: ~ args.state.textbox.scroll += args.inputs.mouse.wheel.y unless args.inputs.mouse.wheel.nil?~ +** Processing line: ~~ +** Processing line: ~ if args.state.scroll_location > 0~ +** Processing line: ~ args.state.textbox.scroll = 0~ +** Processing line: ~ args.state.scroll_location = 0~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ args.outputs.sprites << [900, 0, args.outputs[:textbox].w, 720, :textbox]~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def render_instructions args~ +** Processing line: ~ args.outputs.labels << [30,~ +** Processing line: ~ 30.from_top,~ +** Processing line: ~ "press 1, 2, 3 to display messages, MOUSE WHEEL to scroll, HOME to go to top, BACKSPACE to delete.",~ +** Processing line: ~ 0, 255, 255]~ +** Processing line: ~~ +** Processing line: ~ args.outputs.primitives << [0, 55.from_top, 1280, 30, :pixel, 0, 255, 0, 0, 0].sprite~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~#+end_src~ +- PRE end detected. +** Processing line: ~~ +** Processing line: ~~ +** Processing line: ~*** Advanced Rendering - Rotating Label - main.rb~ +- H3 detected. +- Determining if line is a header. +- Line contains ~*** ~... gsub-ing empty string +- Formatting line: ~Advanced Rendering - Rotating Label - main.rb~ +- Line's tilde count is: 0 +- Line contains link marker: false +- Determining if line is a header. +- Line contains ~*** ~... gsub-ing empty string +- Formatting line: ~Advanced Rendering - Rotating Label - main.rb~ +- Line's tilde count is: 0 +- Line contains link marker: false +** Processing line: ~~ +** Processing line: ~#+begin_src ruby~ +- PRE start detected. +** Processing line: ~ # ./samples/07_advanced_rendering/00_rotating_label/app/main.rb~ +** Processing line: ~ def tick args~ +** Processing line: ~ # set the render target width and height to match the label~ +** Processing line: ~ args.outputs[:scene].w = 220~ +** Processing line: ~ args.outputs[:scene].h = 30~ +** Processing line: ~~ +** Processing line: ~~ +** Processing line: ~ # make the background transparent~ +** Processing line: ~ args.outputs[:scene].background_color = [255, 255, 255, 0]~ +** Processing line: ~~ +** Processing line: ~ # set the blendmode of the label to 0 (no blending)~ +** Processing line: ~ # center it inside of the scene~ +** Processing line: ~ # set the vertical_alignment_enum to 1 (center)~ +** Processing line: ~ args.outputs[:scene].labels << { x: 0,~ +** Processing line: ~ y: 15,~ +** Processing line: ~ text: "label in render target",~ +** Processing line: ~ blendmode_enum: 0,~ +** Processing line: ~ vertical_alignment_enum: 1 }~ +** Processing line: ~~ +** Processing line: ~ # add a border to the render target~ +** Processing line: ~ args.outputs[:scene].borders << { x: 0,~ +** Processing line: ~ y: 0,~ +** Processing line: ~ w: args.outputs[:scene].w,~ +** Processing line: ~ h: args.outputs[:scene].h }~ +** Processing line: ~~ +** Processing line: ~ # add the rendertarget to the main output as a sprite~ +** Processing line: ~ args.outputs.sprites << { x: 640 - args.outputs[:scene].w.half,~ +** Processing line: ~ y: 360 - args.outputs[:scene].h.half,~ +** Processing line: ~ w: args.outputs[:scene].w,~ +** Processing line: ~ h: args.outputs[:scene].h,~ +** Processing line: ~ angle: args.state.tick_count,~ +** Processing line: ~ path: :scene }~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~#+end_src~ +- PRE end detected. +** Processing line: ~~ +** Processing line: ~~ ** Processing line: ~*** Advanced Rendering - Simple Render Targets - main.rb~ - H3 detected. - Determining if line is a header. @@ -206155,6 +213512,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ default_camera(0,0,1280,720)~ ** Processing line: ~ end~ ** Processing line: ~~ +** Processing line: ~~ ** Processing line: ~ def new_room~ ** Processing line: ~ default_floor_tile(0,0,1024,1024,'sprites/rooms/camera_room.png')~ ** Processing line: ~ end~ @@ -207410,6 +214768,109 @@ Follows is a source code listing for all files that have been open sourced. This - PRE end detected. ** Processing line: ~~ ** Processing line: ~~ +** Processing line: ~*** Performance - Sprites As Struct - main.rb~ +- H3 detected. +- Determining if line is a header. +- Line contains ~*** ~... gsub-ing empty string +- Formatting line: ~Performance - Sprites As Struct - main.rb~ +- Line's tilde count is: 0 +- Line contains link marker: false +- Determining if line is a header. +- Line contains ~*** ~... gsub-ing empty string +- Formatting line: ~Performance - Sprites As Struct - main.rb~ +- Line's tilde count is: 0 +- Line contains link marker: false +** Processing line: ~~ +** Processing line: ~#+begin_src ruby~ +- PRE start detected. +** Processing line: ~ # ./samples/09_performance/03_sprites_as_struct/app/main.rb~ +** Processing line: ~ # create a Struct variant that allows for named parameters on construction.~ +** Processing line: ~ class NamedStruct < Struct~ +** Processing line: ~ def initialize **opts~ +** Processing line: ~ super(*members.map { |k| opts[k] })~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ # create a Star NamedStruct~ +** Processing line: ~ Star = NamedStruct.new(:x, :y, :w, :h, :path, :s,~ +** Processing line: ~ :angle, :angle_anchor_x, :angle_anchor_y,~ +** Processing line: ~ :r, :g, :b, :a,~ +** Processing line: ~ :tile_x, :tile_y,~ +** Processing line: ~ :tile_w, :tile_h,~ +** Processing line: ~ :source_x, :source_y,~ +** Processing line: ~ :source_w, :source_h,~ +** Processing line: ~ :flip_horizontally, :flip_vertically,~ +** Processing line: ~ :blendmode_enum)~ +** Processing line: ~~ +** Processing line: ~ # Sprites represented as Structs. They require a little bit more code than Hashes,~ +** Processing line: ~ # but are the a little faster to render too.~ +** Processing line: ~ def random_x args~ +** Processing line: ~ (args.grid.w.randomize :ratio) * -1~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def random_y args~ +** Processing line: ~ (args.grid.h.randomize :ratio) * -1~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def random_speed~ +** Processing line: ~ 1 + (4.randomize :ratio)~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def new_star args~ +** Processing line: ~ Star.new x: (random_x args),~ +** Processing line: ~ y: (random_y args),~ +** Processing line: ~ w: 4, h: 4,~ +** Processing line: ~ path: 'sprites/tiny-star.png',~ +** Processing line: ~ s: random_speed~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def move_star args, star~ +** Processing line: ~ star.x += star[:s]~ +** Processing line: ~ star.y += star[:s]~ +** Processing line: ~ if star.x > args.grid.w || star.y > args.grid.h~ +** Processing line: ~ star.x = (random_x args)~ +** Processing line: ~ star.y = (random_y args)~ +** Processing line: ~ star[:s] = random_speed~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def tick args~ +** Processing line: ~ args.state.star_count ||= 0~ +** Processing line: ~~ +** Processing line: ~ # sets console command when sample app initially opens~ +** Processing line: ~ if Kernel.global_tick_count == 0~ +** Processing line: ~ puts ""~ +** Processing line: ~ puts ""~ +** Processing line: ~ puts "========================================================="~ +** Processing line: ~ puts "* INFO: Sprites, Structs"~ +** Processing line: ~ puts "* INFO: Please specify the number of sprites to render."~ +** Processing line: ~ args.gtk.console.set_command "reset_with count: 100"~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ # init~ +** Processing line: ~ if args.state.tick_count == 0~ +** Processing line: ~ args.state.stars = args.state.star_count.map { |i| new_star args }~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ # update~ +** Processing line: ~ args.state.stars.each { |s| move_star args, s }~ +** Processing line: ~~ +** Processing line: ~ # render~ +** Processing line: ~ args.outputs.sprites << args.state.stars~ +** Processing line: ~ args.outputs.background_color = [0, 0, 0]~ +** Processing line: ~ args.outputs.primitives << args.gtk.current_framerate_primitives~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ # resets game, and assigns star count given by user~ +** Processing line: ~ def reset_with count: count~ +** Processing line: ~ $gtk.reset~ +** Processing line: ~ $gtk.args.state.star_count = count~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~#+end_src~ +- PRE end detected. +** Processing line: ~~ +** Processing line: ~~ ** Processing line: ~*** Performance - Sprites As Strict Entities - main.rb~ - H3 detected. - Determining if line is a header. @@ -207425,7 +214886,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~~ ** Processing line: ~#+begin_src ruby~ - PRE start detected. -** Processing line: ~ # ./samples/09_performance/03_sprites_as_strict_entities/app/main.rb~ +** Processing line: ~ # ./samples/09_performance/04_sprites_as_strict_entities/app/main.rb~ ** Processing line: ~ # Sprites represented as StrictEntities using the queue ~args.outputs.sprites~~ ** Processing line: ~ # yields apis access similar to Entities, but all properties that can be set on the~ ** Processing line: ~ # entity must be predefined with a default value. Strict entities do not support the~ @@ -207518,7 +214979,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~~ ** Processing line: ~#+begin_src ruby~ - PRE start detected. -** Processing line: ~ # ./samples/09_performance/04_sprites_as_classes/app/main.rb~ +** Processing line: ~ # ./samples/09_performance/05_sprites_as_classes/app/main.rb~ ** Processing line: ~ # Sprites represented as Classes using the queue ~args.outputs.sprites~.~ ** Processing line: ~ # gives you full control of property declaration and method invocation.~ ** Processing line: ~ # They are more performant than OpenEntities and StrictEntities, but more code upfront.~ @@ -207594,7 +215055,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~~ ** Processing line: ~#+begin_src ruby~ - PRE start detected. -** Processing line: ~ # ./samples/09_performance/05_static_sprites_as_classes/app/main.rb~ +** Processing line: ~ # ./samples/09_performance/06_static_sprites_as_classes/app/main.rb~ ** Processing line: ~ # Sprites represented as Classes using the queue ~args.outputs.static_sprites~.~ ** Processing line: ~ # bypasses the queue behavior of ~args.outputs.sprites~. All instances are held~ ** Processing line: ~ # by reference. You get better performance, but you are mutating state of held objects~ @@ -207671,7 +215132,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~~ ** Processing line: ~#+begin_src ruby~ - PRE start detected. -** Processing line: ~ # ./samples/09_performance/06_static_sprites_as_classes_with_custom_drawing/app/main.rb~ +** Processing line: ~ # ./samples/09_performance/07_static_sprites_as_classes_with_custom_drawing/app/main.rb~ ** Processing line: ~ # Sprites represented as Classes, with a draw_override method, and using the queue ~args.outputs.static_sprites~.~ ** Processing line: ~ # is the fastest approach. This is comparable to what other game engines set as the default behavior.~ ** Processing line: ~ # There are tradeoffs for all this speed if the creation of a full blown class, and bypassing~ @@ -207780,7 +215241,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~~ ** Processing line: ~#+begin_src ruby~ - PRE start detected. -** Processing line: ~ # ./samples/09_performance/07_collision_limits/app/main.rb~ +** Processing line: ~ # ./samples/09_performance/08_collision_limits/app/main.rb~ ** Processing line: ~ =begin~ ** Processing line: ~~ ** Processing line: ~ Reminders:~ @@ -207841,6 +215302,46 @@ Follows is a source code listing for all files that have been open sourced. This - PRE end detected. ** Processing line: ~~ ** Processing line: ~~ +** Processing line: ~*** Advanced Debugging - Logging - main.rb~ +- H3 detected. +- Determining if line is a header. +- Line contains ~*** ~... gsub-ing empty string +- Formatting line: ~Advanced Debugging - Logging - main.rb~ +- Line's tilde count is: 0 +- Line contains link marker: false +- Determining if line is a header. +- Line contains ~*** ~... gsub-ing empty string +- Formatting line: ~Advanced Debugging - Logging - main.rb~ +- Line's tilde count is: 0 +- Line contains link marker: false +** Processing line: ~~ +** Processing line: ~#+begin_src ruby~ +- PRE start detected. +** Processing line: ~ # ./samples/10_advanced_debugging/00_logging/app/main.rb~ +** Processing line: ~ def tick args~ +** Processing line: ~ args.outputs.background_color = [255, 255, 255, 0]~ +** Processing line: ~ if args.state.tick_count == 0~ +** Processing line: ~ args.gtk.log_spam "log level spam"~ +** Processing line: ~ args.gtk.log_debug "log level debug"~ +** Processing line: ~ args.gtk.log_info "log level info"~ +** Processing line: ~ args.gtk.log_warn "log level warn"~ +** Processing line: ~ args.gtk.log_error "log level error"~ +** Processing line: ~ args.gtk.log_unfiltered "log level unfiltered"~ +** Processing line: ~ puts "This is a puts call"~ +** Processing line: ~ args.gtk.console.show~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ if args.state.tick_count == 60~ +** Processing line: ~ puts "This is a puts call on tick 60"~ +** Processing line: ~ elsif args.state.tick_count == 120~ +** Processing line: ~ puts "This is a puts call on tick 120"~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~#+end_src~ +- PRE end detected. +** Processing line: ~~ +** Processing line: ~~ ** Processing line: ~*** Advanced Debugging - Trace Debugging - main.rb~ - H3 detected. - Determining if line is a header. @@ -209222,11 +216723,13 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~#+begin_src ruby~ - PRE start detected. ** Processing line: ~ # ./samples/11_http/01_retrieve_images/app/main.rb~ +** Processing line: ~ $gtk.register_cvar 'app.warn_seconds', "seconds to wait before starting", :uint, 11~ +** Processing line: ~~ ** Processing line: ~ def tick args~ ** Processing line: ~ args.outputs.background_color = [0, 0, 0]~ ** Processing line: ~~ ** Processing line: ~ # Show a warning at the start.~ -** Processing line: ~ args.state.warning_debounce ||= 11 * 60~ +** Processing line: ~ args.state.warning_debounce ||= args.cvars['app.warn_seconds'].value * 60~ ** Processing line: ~ if args.state.warning_debounce > 0~ ** Processing line: ~ args.state.warning_debounce -= 1~ ** Processing line: ~ args.outputs.labels << [640, 600, "This app shows random images from the Internet.", 10, 1, 255, 255, 255]~ @@ -209280,24 +216783,25 @@ Follows is a source code listing for all files that have been open sourced. This - PRE end detected. ** Processing line: ~~ ** Processing line: ~~ -** Processing line: ~*** Http - Web Server - main.rb~ +** Processing line: ~*** Http - In Game Web Server Http Get - main.rb~ - H3 detected. - Determining if line is a header. - Line contains ~*** ~... gsub-ing empty string -- Formatting line: ~Http - Web Server - main.rb~ +- Formatting line: ~Http - In Game Web Server Http Get - main.rb~ - Line's tilde count is: 0 - Line contains link marker: false - Determining if line is a header. - Line contains ~*** ~... gsub-ing empty string -- Formatting line: ~Http - Web Server - main.rb~ +- Formatting line: ~Http - In Game Web Server Http Get - main.rb~ - Line's tilde count is: 0 - Line contains link marker: false ** Processing line: ~~ ** Processing line: ~#+begin_src ruby~ - PRE start detected. -** Processing line: ~ # ./samples/11_http/02_web_server/app/main.rb~ +** Processing line: ~ # ./samples/11_http/02_in_game_web_server_http_get/app/main.rb~ ** Processing line: ~ def tick args~ ** Processing line: ~ args.state.port ||= 3000~ +** Processing line: ~ args.state.reqnum ||= 0~ ** Processing line: ~ # by default the embedded webserver runs on port 9001 (the port number is over 9000) and is disabled in a production build~ ** Processing line: ~ # to enable the http server in a production build, you need to manually start~ ** Processing line: ~ # the server up:~ @@ -209328,6 +216832,99 @@ Follows is a source code listing for all files that have been open sourced. This - PRE end detected. ** Processing line: ~~ ** Processing line: ~~ +** Processing line: ~*** Http - In Game Web Server Http Post - main.rb~ +- H3 detected. +- Determining if line is a header. +- Line contains ~*** ~... gsub-ing empty string +- Formatting line: ~Http - In Game Web Server Http Post - main.rb~ +- Line's tilde count is: 0 +- Line contains link marker: false +- Determining if line is a header. +- Line contains ~*** ~... gsub-ing empty string +- Formatting line: ~Http - In Game Web Server Http Post - main.rb~ +- Line's tilde count is: 0 +- Line contains link marker: false +** Processing line: ~~ +** Processing line: ~#+begin_src ruby~ +- PRE start detected. +** Processing line: ~ # ./samples/11_http/03_in_game_web_server_http_post/app/main.rb~ +** Processing line: ~ def tick args~ +** Processing line: ~ # defaults~ +** Processing line: ~ args.state.post_button = args.layout.rect(row: 0, col: 0, w: 5, h: 1).merge(text: "execute http_post")~ +** Processing line: ~ args.state.post_body_button = args.layout.rect(row: 1, col: 0, w: 5, h: 1).merge(text: "execute http_post_body")~ +** Processing line: ~ args.state.request_to_s ||= ""~ +** Processing line: ~ args.state.request_body ||= ""~ +** Processing line: ~~ +** Processing line: ~ # render~ +** Processing line: ~ args.state.post_button.yield_self do |b|~ +** Processing line: ~ args.outputs.borders << b~ +** Processing line: ~ args.outputs.labels << b.merge(text: b.text,~ +** Processing line: ~ y: b.y + 30,~ +** Processing line: ~ x: b.x + 10)~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ args.state.post_body_button.yield_self do |b|~ +** Processing line: ~ args.outputs.borders << b~ +** Processing line: ~ args.outputs.labels << b.merge(text: b.text,~ +** Processing line: ~ y: b.y + 30,~ +** Processing line: ~ x: b.x + 10)~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ draw_label args, 0, 6, "Request:", args.state.request_to_s~ +** Processing line: ~ draw_label args, 0, 14, "Request Body Unaltered:", args.state.request_body~ +** Processing line: ~~ +** Processing line: ~ # input~ +** Processing line: ~ if args.inputs.mouse.click~ +** Processing line: ~ # ============= HTTP_POST =============~ +** Processing line: ~ if (args.inputs.mouse.inside_rect? args.state.post_button)~ +** Processing line: ~ # ========= DATA TO SEND ===========~ +** Processing line: ~ form_fields = { "userId" => "#{Time.now.to_i}" }~ +** Processing line: ~ # ==================================~ +** Processing line: ~~ +** Processing line: ~ args.gtk.http_post "http://localhost:9001/testing",~ +** Processing line: ~ form_fields,~ +** Processing line: ~ ["Content-Type: application/x-www-form-urlencoded"]~ +** Processing line: ~~ +** Processing line: ~ args.gtk.notify! "http_post"~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ # ============= HTTP_POST_BODY =============~ +** Processing line: ~ if (args.inputs.mouse.inside_rect? args.state.post_body_button)~ +** Processing line: ~ # =========== DATA TO SEND ==============~ +** Processing line: ~ json = "{ \"userId\": \"#{Time.now.to_i}\"}"~ +** Processing line: ~ # ==================================~ +** Processing line: ~~ +** Processing line: ~ args.gtk.http_post_body "http://localhost:9001/testing",~ +** Processing line: ~ json,~ +** Processing line: ~ ["Content-Type: application/json", "Content-Length: #{json.length}"]~ +** Processing line: ~~ +** Processing line: ~ args.gtk.notify! "http_post_body"~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ # calc~ +** Processing line: ~ args.inputs.http_requests.each do |r|~ +** Processing line: ~ puts "#{r}"~ +** Processing line: ~ if r.uri == "/testing"~ +** Processing line: ~ puts r~ +** Processing line: ~ args.state.request_to_s = "#{r}"~ +** Processing line: ~ args.state.request_body = r.raw_body~ +** Processing line: ~ r.respond 200, "ok"~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def draw_label args, row, col, header, text~ +** Processing line: ~ label_pos = args.layout.rect(row: row, col: col, w: 0, h: 0)~ +** Processing line: ~ args.outputs.labels << "#{header}\n\n#{text}".wrapped_lines(80).map_with_index do |l, i|~ +** Processing line: ~ { x: label_pos.x, y: label_pos.y - (i * 15), text: l, size_enum: -2 }~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~#+end_src~ +- PRE end detected. +** Processing line: ~~ +** Processing line: ~~ ** Processing line: ~*** C Extensions - Basics - main.rb~ - H3 detected. - Determining if line is a header. @@ -211360,7 +218957,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ # Every tick, new args are passed, and the Breadth First Search tick is called~ -** Processing line: ~ $breadcrumbs ||= Breadcrumbs.new(args)~ +** Processing line: ~ $breadcrumbs ||= Breadcrumbs.new~ ** Processing line: ~ $breadcrumbs.args = args~ ** Processing line: ~ $breadcrumbs.tick~ ** Processing line: ~ end~ @@ -212026,7 +219623,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ # Every tick, new args are passed, and the Breadth First Search tick is called~ -** Processing line: ~ $early_exit_breadth_first_search ||= EarlyExitBreadthFirstSearch.new(args)~ +** Processing line: ~ $early_exit_breadth_first_search ||= EarlyExitBreadthFirstSearch.new~ ** Processing line: ~ $early_exit_breadth_first_search.args = args~ ** Processing line: ~ $early_exit_breadth_first_search.tick~ ** Processing line: ~ end~ @@ -212891,7 +220488,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ # Every tick, new args are passed, and the Dijkstra tick method is called~ -** Processing line: ~ $movement_costs ||= Movement_Costs.new(args)~ +** Processing line: ~ $movement_costs ||= Movement_Costs.new~ ** Processing line: ~ $movement_costs.args = args~ ** Processing line: ~ $movement_costs.tick~ ** Processing line: ~ end~ @@ -213892,7 +221489,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ # Every tick, new args are passed, and the Breadth First Search tick is called~ -** Processing line: ~ $heuristic_with_walls ||= Heuristic_With_Walls.new(args)~ +** Processing line: ~ $heuristic_with_walls ||= Heuristic_With_Walls.new~ ** Processing line: ~ $heuristic_with_walls.args = args~ ** Processing line: ~ $heuristic_with_walls.tick~ ** Processing line: ~ end~ @@ -214926,7 +222523,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ # Every tick, new args are passed, and the Breadth First Search tick is called~ -** Processing line: ~ $heuristic ||= Heuristic.new(args)~ +** Processing line: ~ $heuristic ||= Heuristic.new~ ** Processing line: ~ $heuristic.args = args~ ** Processing line: ~ $heuristic.tick~ ** Processing line: ~ end~ @@ -215976,7 +223573,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ # Every tick, new args are passed, and the Breadth First Search tick is called~ -** Processing line: ~ $a_star_algorithm ||= A_Star_Algorithm.new(args)~ +** Processing line: ~ $a_star_algorithm ||= A_Star_Algorithm.new~ ** Processing line: ~ $a_star_algorithm.args = args~ ** Processing line: ~ $a_star_algorithm.tick~ ** Processing line: ~ end~ @@ -216574,6 +224171,378 @@ Follows is a source code listing for all files that have been open sourced. This - PRE end detected. ** Processing line: ~~ ** Processing line: ~~ +** Processing line: ~*** 3d - Yaw Pitch Roll - main.rb~ +- H3 detected. +- Determining if line is a header. +- Line contains ~*** ~... gsub-ing empty string +- Formatting line: ~3d - Yaw Pitch Roll - main.rb~ +- Line's tilde count is: 0 +- Line contains link marker: false +- Determining if line is a header. +- Line contains ~*** ~... gsub-ing empty string +- Formatting line: ~3d - Yaw Pitch Roll - main.rb~ +- Line's tilde count is: 0 +- Line contains link marker: false +** Processing line: ~~ +** Processing line: ~#+begin_src ruby~ +- PRE start detected. +** Processing line: ~ # ./samples/99_genre_3d/03_yaw_pitch_roll/app/main.rb~ +** Processing line: ~ class Game~ +** Processing line: ~ attr_gtk~ +** Processing line: ~~ +** Processing line: ~ def tick~ +** Processing line: ~ defaults~ +** Processing line: ~ render~ +** Processing line: ~ input~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def matrix_mul m, v~ +** Processing line: ~ (hmap x: ((m.x.x * v.x) + (m.x.y * v.y) + (m.x.z * v.z) + (m.x.w * v.w)),~ +** Processing line: ~ y: ((m.y.x * v.x) + (m.y.y * v.y) + (m.y.z * v.z) + (m.y.w * v.w)),~ +** Processing line: ~ z: ((m.z.x * v.x) + (m.z.y * v.y) + (m.z.z * v.z) + (m.z.w * v.w)),~ +** Processing line: ~ w: ((m.w.x * v.x) + (m.w.y * v.y) + (m.w.z * v.z) + (m.w.w * v.w)))~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def player_ship~ +** Processing line: ~ [~ +** Processing line: ~ # engine back~ +** Processing line: ~ { x: -1, y: -1, z: 1, w: 0 },~ +** Processing line: ~ { x: -1, y: 1, z: 1, w: 0 },~ +** Processing line: ~~ +** Processing line: ~ { x: -1, y: 1, z: 1, w: 0 },~ +** Processing line: ~ { x: 1, y: 1, z: 1, w: 0 },~ +** Processing line: ~~ +** Processing line: ~ { x: 1, y: 1, z: 1, w: 0 },~ +** Processing line: ~ { x: 1, y: -1, z: 1, w: 0 },~ +** Processing line: ~~ +** Processing line: ~ { x: 1, y: -1, z: 1, w: 0 },~ +** Processing line: ~ { x: -1, y: -1, z: 1, w: 0 },~ +** Processing line: ~~ +** Processing line: ~ # engine front~ +** Processing line: ~ { x: -1, y: -1, z: -1, w: 0 },~ +** Processing line: ~ { x: -1, y: 1, z: -1, w: 0 },~ +** Processing line: ~~ +** Processing line: ~ { x: -1, y: 1, z: -1, w: 0 },~ +** Processing line: ~ { x: 1, y: 1, z: -1, w: 0 },~ +** Processing line: ~~ +** Processing line: ~ { x: 1, y: 1, z: -1, w: 0 },~ +** Processing line: ~ { x: 1, y: -1, z: -1, w: 0 },~ +** Processing line: ~~ +** Processing line: ~ { x: 1, y: -1, z: -1, w: 0 },~ +** Processing line: ~ { x: -1, y: -1, z: -1, w: 0 },~ +** Processing line: ~~ +** Processing line: ~ # engine left~ +** Processing line: ~ { x: -1, z: -1, y: -1, w: 0 },~ +** Processing line: ~ { x: -1, z: -1, y: 1, w: 0 },~ +** Processing line: ~~ +** Processing line: ~ { x: -1, z: -1, y: 1, w: 0 },~ +** Processing line: ~ { x: -1, z: 1, y: 1, w: 0 },~ +** Processing line: ~~ +** Processing line: ~ { x: -1, z: 1, y: 1, w: 0 },~ +** Processing line: ~ { x: -1, z: 1, y: -1, w: 0 },~ +** Processing line: ~~ +** Processing line: ~ { x: -1, z: 1, y: -1, w: 0 },~ +** Processing line: ~ { x: -1, z: -1, y: -1, w: 0 },~ +** Processing line: ~~ +** Processing line: ~ # engine right~ +** Processing line: ~ { x: 1, z: -1, y: -1, w: 0 },~ +** Processing line: ~ { x: 1, z: -1, y: 1, w: 0 },~ +** Processing line: ~~ +** Processing line: ~ { x: 1, z: -1, y: 1, w: 0 },~ +** Processing line: ~ { x: 1, z: 1, y: 1, w: 0 },~ +** Processing line: ~~ +** Processing line: ~ { x: 1, z: 1, y: 1, w: 0 },~ +** Processing line: ~ { x: 1, z: 1, y: -1, w: 0 },~ +** Processing line: ~~ +** Processing line: ~ { x: 1, z: 1, y: -1, w: 0 },~ +** Processing line: ~ { x: 1, z: -1, y: -1, w: 0 },~ +** Processing line: ~~ +** Processing line: ~ # top front of engine to front of ship~ +** Processing line: ~ { x: 1, y: 1, z: 1, w: 0 },~ +** Processing line: ~ { x: 0, y: -1, z: 9, w: 0 },~ +** Processing line: ~~ +** Processing line: ~ { x: 0, y: -1, z: 9, w: 0 },~ +** Processing line: ~ { x: -1, y: 1, z: 1, w: 0 },~ +** Processing line: ~~ +** Processing line: ~ # bottom front of engine~ +** Processing line: ~ { x: 1, y: -1, z: 1, w: 0 },~ +** Processing line: ~ { x: 0, y: -1, z: 9, w: 0 },~ +** Processing line: ~~ +** Processing line: ~ { x: -1, y: -1, z: 1, w: 0 },~ +** Processing line: ~ { x: 0, y: -1, z: 9, w: 0 },~ +** Processing line: ~~ +** Processing line: ~ # right wing~ +** Processing line: ~ # front of wing~ +** Processing line: ~ { x: 1, y: 0.10, z: 1, w: 0 },~ +** Processing line: ~ { x: 9, y: 0.10, z: -1, w: 0 },~ +** Processing line: ~~ +** Processing line: ~ { x: 9, y: 0.10, z: -1, w: 0 },~ +** Processing line: ~ { x: 10, y: 0.10, z: -2, w: 0 },~ +** Processing line: ~~ +** Processing line: ~ # back of wing~ +** Processing line: ~ { x: 1, y: 0.10, z: -1, w: 0 },~ +** Processing line: ~ { x: 9, y: 0.10, z: -1, w: 0 },~ +** Processing line: ~~ +** Processing line: ~ { x: 10, y: 0.10, z: -2, w: 0 },~ +** Processing line: ~ { x: 8, y: 0.10, z: -1, w: 0 },~ +** Processing line: ~~ +** Processing line: ~ # front of wing~ +** Processing line: ~ { x: 1, y: -0.10, z: 1, w: 0 },~ +** Processing line: ~ { x: 9, y: -0.10, z: -1, w: 0 },~ +** Processing line: ~~ +** Processing line: ~ { x: 9, y: -0.10, z: -1, w: 0 },~ +** Processing line: ~ { x: 10, y: -0.10, z: -2, w: 0 },~ +** Processing line: ~~ +** Processing line: ~ # back of wing~ +** Processing line: ~ { x: 1, y: -0.10, z: -1, w: 0 },~ +** Processing line: ~ { x: 9, y: -0.10, z: -1, w: 0 },~ +** Processing line: ~~ +** Processing line: ~ { x: 10, y: -0.10, z: -2, w: 0 },~ +** Processing line: ~ { x: 8, y: -0.10, z: -1, w: 0 },~ +** Processing line: ~~ +** Processing line: ~ # left wing~ +** Processing line: ~ # front of wing~ +** Processing line: ~ { x: -1, y: 0.10, z: 1, w: 0 },~ +** Processing line: ~ { x: -9, y: 0.10, z: -1, w: 0 },~ +** Processing line: ~~ +** Processing line: ~ { x: -9, y: 0.10, z: -1, w: 0 },~ +** Processing line: ~ { x: -10, y: 0.10, z: -2, w: 0 },~ +** Processing line: ~~ +** Processing line: ~ # back of wing~ +** Processing line: ~ { x: -1, y: 0.10, z: -1, w: 0 },~ +** Processing line: ~ { x: -9, y: 0.10, z: -1, w: 0 },~ +** Processing line: ~~ +** Processing line: ~ { x: -10, y: 0.10, z: -2, w: 0 },~ +** Processing line: ~ { x: -8, y: 0.10, z: -1, w: 0 },~ +** Processing line: ~~ +** Processing line: ~ # front of wing~ +** Processing line: ~ { x: -1, y: -0.10, z: 1, w: 0 },~ +** Processing line: ~ { x: -9, y: -0.10, z: -1, w: 0 },~ +** Processing line: ~~ +** Processing line: ~ { x: -9, y: -0.10, z: -1, w: 0 },~ +** Processing line: ~ { x: -10, y: -0.10, z: -2, w: 0 },~ +** Processing line: ~~ +** Processing line: ~ # back of wing~ +** Processing line: ~ { x: -1, y: -0.10, z: -1, w: 0 },~ +** Processing line: ~ { x: -9, y: -0.10, z: -1, w: 0 },~ +** Processing line: ~~ +** Processing line: ~ { x: -10, y: -0.10, z: -2, w: 0 },~ +** Processing line: ~ { x: -8, y: -0.10, z: -1, w: 0 },~ +** Processing line: ~~ +** Processing line: ~ # left fin~ +** Processing line: ~ # top~ +** Processing line: ~ { x: -1, y: 0.10, z: 1, w: 0 },~ +** Processing line: ~ { x: -1, y: 3, z: -3, w: 0 },~ +** Processing line: ~~ +** Processing line: ~ { x: -1, y: 0.10, z: -1, w: 0 },~ +** Processing line: ~ { x: -1, y: 3, z: -3, w: 0 },~ +** Processing line: ~~ +** Processing line: ~ { x: -1.1, y: 0.10, z: 1, w: 0 },~ +** Processing line: ~ { x: -1.1, y: 3, z: -3, w: 0 },~ +** Processing line: ~~ +** Processing line: ~ { x: -1.1, y: 0.10, z: -1, w: 0 },~ +** Processing line: ~ { x: -1.1, y: 3, z: -3, w: 0 },~ +** Processing line: ~~ +** Processing line: ~ # bottom~ +** Processing line: ~ { x: -1, y: -0.10, z: 1, w: 0 },~ +** Processing line: ~ { x: -1, y: -2, z: -2, w: 0 },~ +** Processing line: ~~ +** Processing line: ~ { x: -1, y: -0.10, z: -1, w: 0 },~ +** Processing line: ~ { x: -1, y: -2, z: -2, w: 0 },~ +** Processing line: ~~ +** Processing line: ~ { x: -1.1, y: -0.10, z: 1, w: 0 },~ +** Processing line: ~ { x: -1.1, y: -2, z: -2, w: 0 },~ +** Processing line: ~~ +** Processing line: ~ { x: -1.1, y: -0.10, z: -1, w: 0 },~ +** Processing line: ~ { x: -1.1, y: -2, z: -2, w: 0 },~ +** Processing line: ~~ +** Processing line: ~ # right fin~ +** Processing line: ~ { x: 1, y: 0.10, z: 1, w: 0 },~ +** Processing line: ~ { x: 1, y: 3, z: -3, w: 0 },~ +** Processing line: ~~ +** Processing line: ~ { x: 1, y: 0.10, z: -1, w: 0 },~ +** Processing line: ~ { x: 1, y: 3, z: -3, w: 0 },~ +** Processing line: ~~ +** Processing line: ~ { x: 1.1, y: 0.10, z: 1, w: 0 },~ +** Processing line: ~ { x: 1.1, y: 3, z: -3, w: 0 },~ +** Processing line: ~~ +** Processing line: ~ { x: 1.1, y: 0.10, z: -1, w: 0 },~ +** Processing line: ~ { x: 1.1, y: 3, z: -3, w: 0 },~ +** Processing line: ~~ +** Processing line: ~ # bottom~ +** Processing line: ~ { x: 1, y: -0.10, z: 1, w: 0 },~ +** Processing line: ~ { x: 1, y: -2, z: -2, w: 0 },~ +** Processing line: ~~ +** Processing line: ~ { x: 1, y: -0.10, z: -1, w: 0 },~ +** Processing line: ~ { x: 1, y: -2, z: -2, w: 0 },~ +** Processing line: ~~ +** Processing line: ~ { x: 1.1, y: -0.10, z: 1, w: 0 },~ +** Processing line: ~ { x: 1.1, y: -2, z: -2, w: 0 },~ +** Processing line: ~~ +** Processing line: ~ { x: 1.1, y: -0.10, z: -1, w: 0 },~ +** Processing line: ~ { x: 1.1, y: -2, z: -2, w: 0 },~ +** Processing line: ~ ]~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def defaults~ +** Processing line: ~ state.points ||= player_ship~ +** Processing line: ~ state.shifted_points ||= state.points.map { |point| point }~ +** Processing line: ~~ +** Processing line: ~ state.scale ||= 1~ +** Processing line: ~ state.angle_x ||= 0~ +** Processing line: ~ state.angle_y ||= 0~ +** Processing line: ~ state.angle_z ||= 0~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def matrix_new x0, y0, z0, w0, x1, y1, z1, w1, x2, y2, z2, w2, x3, y3, z3, w3~ +** Processing line: ~ (hmap x: (hmap x: x0, y: y0, z: z0, w: w0),~ +** Processing line: ~ y: (hmap x: x1, y: y1, z: z1, w: w1),~ +** Processing line: ~ z: (hmap x: x2, y: y2, z: z2, w: w2),~ +** Processing line: ~ w: (hmap x: x3, y: y3, z: z3, w: w3))~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def angle_z_matrix degrees~ +** Processing line: ~ cos_t = Math.cos degrees.to_radians~ +** Processing line: ~ sin_t = Math.sin degrees.to_radians~ +** Processing line: ~ (matrix_new cos_t, -sin_t, 0, 0,~ +** Processing line: ~ sin_t, cos_t, 0, 0,~ +** Processing line: ~ 0, 0, 1, 0,~ +** Processing line: ~ 0, 0, 0, 1)~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def angle_y_matrix degrees~ +** Processing line: ~ cos_t = Math.cos degrees.to_radians~ +** Processing line: ~ sin_t = Math.sin degrees.to_radians~ +** Processing line: ~ (matrix_new cos_t, 0, sin_t, 0,~ +** Processing line: ~ 0, 1, 0, 0,~ +** Processing line: ~ -sin_t, 0, cos_t, 0,~ +** Processing line: ~ 0, 0, 0, 1)~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def angle_x_matrix degrees~ +** Processing line: ~ cos_t = Math.cos degrees.to_radians~ +** Processing line: ~ sin_t = Math.sin degrees.to_radians~ +** Processing line: ~ (matrix_new 1, 0, 0, 0,~ +** Processing line: ~ 0, cos_t, -sin_t, 0,~ +** Processing line: ~ 0, sin_t, cos_t, 0,~ +** Processing line: ~ 0, 0, 0, 1)~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def scale_matrix factor~ +** Processing line: ~ (matrix_new factor, 0, 0, 0,~ +** Processing line: ~ 0, factor, 0, 0,~ +** Processing line: ~ 0, 0, factor, 0,~ +** Processing line: ~ 0, 0, 0, 1)~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def input~ +** Processing line: ~ if (inputs.keyboard.shift && inputs.keyboard.p)~ +** Processing line: ~ state.scale -= 0.1~ +** Processing line: ~ elsif inputs.keyboard.p~ +** Processing line: ~ state.scale += 0.1~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ if inputs.mouse.wheel~ +** Processing line: ~ state.scale += inputs.mouse.wheel.y~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ state.scale = state.scale.clamp(0.1, 1000)~ +** Processing line: ~~ +** Processing line: ~ if (inputs.keyboard.shift && inputs.keyboard.y) || inputs.keyboard.right~ +** Processing line: ~ state.angle_y += 1~ +** Processing line: ~ elsif (inputs.keyboard.y) || inputs.keyboard.left~ +** Processing line: ~ state.angle_y -= 1~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ if (inputs.keyboard.shift && inputs.keyboard.x) || inputs.keyboard.down~ +** Processing line: ~ state.angle_x -= 1~ +** Processing line: ~ elsif (inputs.keyboard.x || inputs.keyboard.up)~ +** Processing line: ~ state.angle_x += 1~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ if inputs.keyboard.shift && inputs.keyboard.z~ +** Processing line: ~ state.angle_z += 1~ +** Processing line: ~ elsif inputs.keyboard.z~ +** Processing line: ~ state.angle_z -= 1~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ if inputs.keyboard.zero~ +** Processing line: ~ state.angle_x = 0~ +** Processing line: ~ state.angle_y = 0~ +** Processing line: ~ state.angle_z = 0~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ angle_x = state.angle_x~ +** Processing line: ~ angle_y = state.angle_y~ +** Processing line: ~ angle_z = state.angle_z~ +** Processing line: ~ scale = state.scale~ +** Processing line: ~~ +** Processing line: ~ s_matrix = scale_matrix state.scale~ +** Processing line: ~ x_matrix = angle_z_matrix angle_z~ +** Processing line: ~ y_matrix = angle_y_matrix angle_y~ +** Processing line: ~ z_matrix = angle_x_matrix angle_x~ +** Processing line: ~~ +** Processing line: ~ state.shifted_points = state.points.map do |point|~ +** Processing line: ~ (matrix_mul s_matrix,~ +** Processing line: ~ (matrix_mul z_matrix,~ +** Processing line: ~ (matrix_mul x_matrix,~ +** Processing line: ~ (matrix_mul y_matrix, point)))).merge(original: point)~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def thick_line line~ +** Processing line: ~ [~ +** Processing line: ~ line.merge(y: line.y - 1, y2: line.y2 - 1, r: 0, g: 0, b: 0),~ +** Processing line: ~ line.merge(x: line.x - 1, x2: line.x2 - 1, r: 0, g: 0, b: 0),~ +** Processing line: ~ line.merge(x: line.x - 0, x2: line.x2 - 0, r: 0, g: 0, b: 0),~ +** Processing line: ~ line.merge(y: line.y + 1, y2: line.y2 + 1, r: 0, g: 0, b: 0),~ +** Processing line: ~ line.merge(x: line.x + 1, x2: line.x2 + 1, r: 0, g: 0, b: 0)~ +** Processing line: ~ ]~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def render~ +** Processing line: ~ outputs.lines << state.shifted_points.each_slice(2).map do |(p1, p2)|~ +** Processing line: ~ perc = 0~ +** Processing line: ~ thick_line({ x: p1.x.*(10) + 640, y: p1.y.*(10) + 320,~ +** Processing line: ~ x2: p2.x.*(10) + 640, y2: p2.y.*(10) + 320,~ +** Processing line: ~ r: 255 * perc,~ +** Processing line: ~ g: 255 * perc,~ +** Processing line: ~ b: 255 * perc })~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ outputs.labels << [ 10, 700, "angle_x: #{state.angle_x.to_sf}", 0]~ +** Processing line: ~ outputs.labels << [ 10, 670, "x, shift+x", 0]~ +** Processing line: ~~ +** Processing line: ~ outputs.labels << [210, 700, "angle_y: #{state.angle_y.to_sf}", 0]~ +** Processing line: ~ outputs.labels << [210, 670, "y, shift+y", 0]~ +** Processing line: ~~ +** Processing line: ~ outputs.labels << [410, 700, "angle_z: #{state.angle_z.to_sf}", 0]~ +** Processing line: ~ outputs.labels << [410, 670, "z, shift+z", 0]~ +** Processing line: ~~ +** Processing line: ~ outputs.labels << [610, 700, "scale: #{state.scale.to_sf}", 0]~ +** Processing line: ~ outputs.labels << [610, 670, "p, shift+p", 0]~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ $game = Game.new~ +** Processing line: ~~ +** Processing line: ~ def tick args~ +** Processing line: ~ $game.args = args~ +** Processing line: ~ $game.tick~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def set_angles x, y, z~ +** Processing line: ~ $game.state.angle_x = x~ +** Processing line: ~ $game.state.angle_y = y~ +** Processing line: ~ $game.state.angle_z = z~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ $gtk.reset~ +** Processing line: ~~ +** Processing line: ~#+end_src~ +- PRE end detected. +** Processing line: ~~ +** Processing line: ~~ ** Processing line: ~*** Arcade - Bullet Hell - main.rb~ - H3 detected. - Determining if line is a header. @@ -217250,31 +225219,36 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ def render_score~ -** Processing line: ~ outputs.primitives << [10, 710, "HI SCORE: #{state.hi_score}", large_white_typeset].label~ -** Processing line: ~ outputs.primitives << [10, 680, "SCORE: #{state.score}", large_white_typeset].label~ -** Processing line: ~ outputs.primitives << [10, 650, "DIFFICULTY: #{state.difficulty.upcase}", large_white_typeset].label~ +** Processing line: ~ outputs.primitives << { x: 10, y: 710, text: "HI SCORE: #{state.hi_score}", **large_white_typeset }~ +** Processing line: ~ outputs.primitives << { x: 10, y: 680, text: "SCORE: #{state.score}", **large_white_typeset }~ +** Processing line: ~ outputs.primitives << { x: 10, y: 650, text: "DIFFICULTY: #{state.difficulty.upcase}", **large_white_typeset }~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ def render_menu~ ** Processing line: ~ return unless state.scene == :menu~ ** Processing line: ~ render_overlay~ ** Processing line: ~~ -** Processing line: ~ outputs.labels << [640, 700, "Flappy Dragon", 50, 1, 255, 255, 255]~ -** Processing line: ~ outputs.labels << [640, 500, "Instructions: Press Spacebar to flap. Don't die.", 4, 1, 255, 255, 255]~ -** Processing line: ~ outputs.labels << [430, 430, "[Tab] Change difficulty", 4, 0, 255, 255, 255]~ -** Processing line: ~ outputs.labels << [430, 400, "[Enter] Start at New Difficulty ", 4, 0, 255, 255, 255]~ -** Processing line: ~ outputs.labels << [430, 370, "[Escape] Cancel/Resume ", 4, 0, 255, 255, 255]~ -** Processing line: ~ outputs.labels << [640, 300, "(mouse, touch, and game controllers work, too!) ", 4, 1, 255, 255, 255]~ -** Processing line: ~ outputs.labels << [640, 200, "Difficulty: #{state.new_difficulty.capitalize}", 4, 1, 255, 255, 255]~ +** Processing line: ~ outputs.labels << { x: 640, y: 700, text: "Flappy Dragon", size_enum: 50, alignment_enum: 1, **white }~ +** Processing line: ~ outputs.labels << { x: 640, y: 500, text: "Instructions: Press Spacebar to flap. Don't die.", size_enum: 4, alignment_enum: 1, **white }~ +** Processing line: ~ outputs.labels << { x: 430, y: 430, text: "[Tab] Change difficulty", size_enum: 4, alignment_enum: 0, **white }~ +** Processing line: ~ outputs.labels << { x: 430, y: 400, text: "[Enter] Start at New Difficulty ", size_enum: 4, alignment_enum: 0, **white }~ +** Processing line: ~ outputs.labels << { x: 430, y: 370, text: "[Escape] Cancel/Resume ", size_enum: 4, alignment_enum: 0, **white }~ +** Processing line: ~ outputs.labels << { x: 640, y: 300, text: "(mouse, touch, and game controllers work, too!) ", size_enum: 4, alignment_enum: 1, **white }~ +** Processing line: ~ outputs.labels << { x: 640, y: 200, text: "Difficulty: #{state.new_difficulty.capitalize}", size_enum: 4, alignment_enum: 1, **white }~ ** Processing line: ~~ -** Processing line: ~ outputs.labels << [10, 100, "Code: @amirrajan", 255, 255, 255]~ -** Processing line: ~ outputs.labels << [10, 80, "Art: @mobypixel", 255, 255, 255]~ -** Processing line: ~ outputs.labels << [10, 60, "Music: @mobypixel", 255, 255, 255]~ -** Processing line: ~ outputs.labels << [10, 40, "Engine: DragonRuby GTK", 255, 255, 255]~ +** Processing line: ~ outputs.labels << { x: 10, y: 100, text: "Code: @amirrajan", **white }~ +** Processing line: ~ outputs.labels << { x: 10, y: 80, text: "Art: @mobypixel", **white }~ +** Processing line: ~ outputs.labels << { x: 10, y: 60, text: "Music: @mobypixel", **white }~ +** Processing line: ~ outputs.labels << { x: 10, y: 40, text: "Engine: DragonRuby GTK", **white }~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ def render_overlay~ -** Processing line: ~ outputs.primitives << [grid.rect.scale_rect(1.1, 0, 0), 0, 0, 0, 230].solid~ +** Processing line: ~ overlay_rect = grid.rect.scale_rect(1.1, 0, 0)~ +** Processing line: ~ outputs.primitives << { x: overlay_rect.x,~ +** Processing line: ~ y: overlay_rect.y,~ +** Processing line: ~ w: overlay_rect.w,~ +** Processing line: ~ h: overlay_rect.h,~ +** Processing line: ~ r: 0, g: 0, b: 0, a: 230 }.solid!~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ def render_game~ @@ -217287,14 +225261,14 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~~ ** Processing line: ~ def render_game_over~ ** Processing line: ~ return unless state.scene == :game~ -** Processing line: ~ outputs.labels << [638, 358, score_text, 20, 1]~ -** Processing line: ~ outputs.labels << [635, 360, score_text, 20, 1, 255, 255, 255]~ -** Processing line: ~ outputs.labels << [638, 428, countdown_text, 20, 1]~ -** Processing line: ~ outputs.labels << [635, 430, countdown_text, 20, 1, 255, 255, 255]~ +** Processing line: ~ outputs.labels << { x: 638, y: 358, text: score_text, size_enum: 20, alignment_enum: 1 }~ +** Processing line: ~ outputs.labels << { x: 635, y: 360, text: score_text, size_enum: 20, alignment_enum: 1, r: 255, g: 255, b: 255 }~ +** Processing line: ~ outputs.labels << { x: 638, y: 428, text: countdown_text, size_enum: 20, alignment_enum: 1 }~ +** Processing line: ~ outputs.labels << { x: 635, y: 430, text: countdown_text, size_enum: 20, alignment_enum: 1, r: 255, g: 255, b: 255 }~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ def render_background~ -** Processing line: ~ outputs.sprites << [0, 0, 1280, 720, 'sprites/background.png']~ +** Processing line: ~ outputs.sprites << { x: 0, y: 0, w: 1280, h: 720, path: 'sprites/background.png' }~ ** Processing line: ~~ ** Processing line: ~ scroll_point_at = state.tick_count~ ** Processing line: ~ scroll_point_at = state.scene_at if state.scene == :menu~ @@ -217306,11 +225280,18 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ outputs.sprites << scrolling_background(scroll_point_at, 'sprites/parallax_front.png', 1.00, -80)~ ** Processing line: ~ end~ ** Processing line: ~~ +** Processing line: ~ def scrolling_background at, path, rate, y = 0~ +** Processing line: ~ [~ +** Processing line: ~ { x: 0 - at.*(rate) % 1440, y: y, w: 1440, h: 720, path: path },~ +** Processing line: ~ { x: 1440 - at.*(rate) % 1440, y: y, w: 1440, h: 720, path: path }~ +** Processing line: ~ ]~ +** Processing line: ~ end~ +** Processing line: ~~ ** Processing line: ~ def render_walls~ ** Processing line: ~ state.walls.each do |w|~ ** Processing line: ~ w.sprites = [~ -** Processing line: ~ [w.x, w.bottom_height - 720, 100, 720, 'sprites/wall.png', 180],~ -** Processing line: ~ [w.x, w.top_y, 100, 720, 'sprites/wallbottom.png', 0]~ +** Processing line: ~ { x: w.x, y: w.bottom_height - 720, w: 100, h: 720, path: 'sprites/wall.png', angle: 180 },~ +** Processing line: ~ { x: w.x, y: w.top_y, w: 100, h: 720, path: 'sprites/wallbottom.png', angle: 0 }~ ** Processing line: ~ ]~ ** Processing line: ~ end~ ** Processing line: ~ outputs.sprites << state.walls.map(&:sprites)~ @@ -217319,15 +225300,13 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ def render_dragon~ ** Processing line: ~ state.show_death = true if state.countdown == 3.seconds~ ** Processing line: ~~ -** Processing line: ~ render_debug_hitbox false~ -** Processing line: ~~ ** Processing line: ~ if state.show_death == false || !state.death_at~ ** Processing line: ~ animation_index = state.flapped_at.frame_index 6, 2, false if state.flapped_at~ ** Processing line: ~ sprite_name = "sprites/dragon_fly#{animation_index.or(0) + 1}.png"~ -** Processing line: ~ state.dragon_sprite = [state.x, state.y, 100, 80, sprite_name, state.dy * 1.2]~ +** Processing line: ~ state.dragon_sprite = { x: state.x, y: state.y, w: 100, h: 80, path: sprite_name, angle: state.dy * 1.2 }~ ** Processing line: ~ else~ ** Processing line: ~ sprite_name = "sprites/dragon_die.png"~ -** Processing line: ~ state.dragon_sprite = [state.x, state.y, 100, 80, sprite_name, state.dy * 1.2]~ +** Processing line: ~ state.dragon_sprite = { x: state.x, y: state.y, w: 100, h: 80, path: sprite_name, angle: state.dy * 1.2 }~ ** Processing line: ~ sprite_changed_elapsed = state.death_at.elapsed_time - 1.seconds~ ** Processing line: ~ state.dragon_sprite.angle += (sprite_changed_elapsed ** 1.3) * state.death_fall_direction * -1~ ** Processing line: ~ state.dragon_sprite.x += (sprite_changed_elapsed ** 1.2) * state.death_fall_direction~ @@ -217337,20 +225316,12 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ outputs.sprites << state.dragon_sprite~ ** Processing line: ~ end~ ** Processing line: ~~ -** Processing line: ~ def render_debug_hitbox show~ -** Processing line: ~ return unless show~ -** Processing line: ~ outputs.borders << [dragon_collision_box.rect, 255, 0, 0] if state.dragon_sprite~ -** Processing line: ~ outputs.borders << state.walls.flat_map do |w|~ -** Processing line: ~ w.sprites.map { |s| [s.rect, 255, 0, 0] }~ -** Processing line: ~ end~ -** Processing line: ~ end~ -** Processing line: ~~ ** Processing line: ~ def render_flash~ ** Processing line: ~ return unless state.flash_at~ ** Processing line: ~~ -** Processing line: ~ outputs.primitives << [grid.rect,~ -** Processing line: ~ white,~ -** Processing line: ~ 255 * state.flash_at.ease(20, :flip)].solid~ +** Processing line: ~ outputs.primitives << { **grid.rect.to_hash,~ +** Processing line: ~ **white,~ +** Processing line: ~ a: 255 * state.flash_at.ease(20, :flip) }.solid!~ ** Processing line: ~~ ** Processing line: ~ state.flash_at = 0 if state.flash_at.elapsed_time > 20~ ** Processing line: ~ end~ @@ -217470,19 +225441,12 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ end~ ** Processing line: ~ end~ ** Processing line: ~~ -** Processing line: ~ def scrolling_background at, path, rate, y = 0~ -** Processing line: ~ [~ -** Processing line: ~ [ 0 - at.*(rate) % 1440, y, 1440, 720, path],~ -** Processing line: ~ [1440 - at.*(rate) % 1440, y, 1440, 720, path]~ -** Processing line: ~ ]~ -** Processing line: ~ end~ -** Processing line: ~~ ** Processing line: ~ def white~ -** Processing line: ~ [255, 255, 255]~ +** Processing line: ~ { r: 255, g: 255, b: 255 }~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ def large_white_typeset~ -** Processing line: ~ [5, 0, 255, 255, 255]~ +** Processing line: ~ { size_enum: 5, alignment_enum: 0, r: 255, g: 255, b: 255 }~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ def at_beginning?~ @@ -217491,9 +225455,9 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~~ ** Processing line: ~ def dragon_collision_box~ ** Processing line: ~ state.dragon_sprite~ -** Processing line: ~ .scale_rect(1.0 - collision_forgiveness, 0.5, 0.5)~ -** Processing line: ~ .rect_shift_right(10)~ -** Processing line: ~ .rect_shift_up(state.dy * 2)~ +** Processing line: ~ .scale_rect(1.0 - collision_forgiveness, 0.5, 0.5)~ +** Processing line: ~ .rect_shift_right(10)~ +** Processing line: ~ .rect_shift_up(state.dy * 2)~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ def game_over?~ @@ -217502,7 +225466,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ state.walls~ ** Processing line: ~ .flat_map { |w| w.sprites }~ ** Processing line: ~ .any? do |s|~ -** Processing line: ~ s.intersect_rect?(dragon_collision_box)~ +** Processing line: ~ s && s.intersect_rect?(dragon_collision_box)~ ** Processing line: ~ end~ ** Processing line: ~ end~ ** Processing line: ~~ @@ -219001,334 +226965,6 @@ Follows is a source code listing for all files that have been open sourced. This - PRE end detected. ** Processing line: ~~ ** Processing line: ~~ -** Processing line: ~*** Crafting - Farming Game Starting Point - repl.rb~ -- H3 detected. -- Determining if line is a header. -- Line contains ~*** ~... gsub-ing empty string -- Formatting line: ~Crafting - Farming Game Starting Point - repl.rb~ -- Line's tilde count is: 0 -- Line contains link marker: false -- Determining if line is a header. -- Line contains ~*** ~... gsub-ing empty string -- Formatting line: ~Crafting - Farming Game Starting Point - repl.rb~ -- Line's tilde count is: 0 -- Line contains link marker: false -** Processing line: ~~ -** Processing line: ~#+begin_src ruby~ -- PRE start detected. -** Processing line: ~ # ./samples/99_genre_crafting/farming_game_starting_point/app/repl.rb~ -** Processing line: ~ # ===============================================================~ -** Processing line: ~ # Welcome to repl.rb~ -** Processing line: ~ # ===============================================================~ -** Processing line: ~ # You can experiement with code within this file. Code in this~ -** Processing line: ~ # file is only executed when you save (and only excecuted ONCE).~ -** Processing line: ~ # ===============================================================~ -** Processing line: ~~ -** Processing line: ~ # ===============================================================~ -** Processing line: ~ # REMOVE the "x" from the word "xrepl" and save the file to RUN~ -** Processing line: ~ # the code in between the do/end block delimiters.~ -** Processing line: ~ # ===============================================================~ -** Processing line: ~~ -** Processing line: ~ # ===============================================================~ -** Processing line: ~ # ADD the "x" to the word "repl" (make it xrepl) and save the~ -** Processing line: ~ # file to IGNORE the code in between the do/end block delimiters.~ -** Processing line: ~ # ===============================================================~ -** Processing line: ~~ -** Processing line: ~ # Remove the x from xrepl to run the code. Add the x back to ignore to code.~ -** Processing line: ~ xrepl do~ -** Processing line: ~ puts "The result of 1 + 2 is: #{1 + 2}"~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ # ====================================================================================~ -** Processing line: ~ # Ruby Crash Course:~ -** Processing line: ~ # Strings, Numeric, Booleans, Conditionals, Looping, Enumerables, Arrays~ -** Processing line: ~ # ====================================================================================~ -** Processing line: ~~ -** Processing line: ~ # ====================================================================================~ -** Processing line: ~ # Strings~ -** Processing line: ~ # ====================================================================================~ -** Processing line: ~ # Remove the x from xrepl to run the code. Add the x back to ignore to code.~ -** Processing line: ~ xrepl do~ -** Processing line: ~ message = "Hello World"~ -** Processing line: ~ puts "The value of message is: " + message~ -** Processing line: ~ puts "Any value can be interpolated within a string using \#{}."~ -** Processing line: ~ puts "Interpolated message: #{message}."~ -** Processing line: ~ puts 'This #{message} is not interpolated because the string uses single quotes.'~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ # ====================================================================================~ -** Processing line: ~ # Numerics~ -** Processing line: ~ # ====================================================================================~ -** Processing line: ~ # Remove the x from xrepl to run the code. Add the x back to ignore to code.~ -** Processing line: ~ xrepl do~ -** Processing line: ~ a = 10~ -** Processing line: ~ puts "The value of a is: #{a}"~ -** Processing line: ~ puts "a + 1 is: #{a + 1}"~ -** Processing line: ~ puts "a / 3 is: #{a / 3}"~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ # Remove the x from xrepl to run the code. Add the x back to ignore to code.~ -** Processing line: ~ xrepl do~ -** Processing line: ~ b = 10.12~ -** Processing line: ~ puts "The value of b is: #{b}"~ -** Processing line: ~ puts "b + 1 is: #{b + 1}"~ -** Processing line: ~ puts "b as an integer is: #{b.to_i}"~ -** Processing line: ~ puts ''~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ # ====================================================================================~ -** Processing line: ~ # Booleans~ -** Processing line: ~ # ====================================================================================~ -** Processing line: ~ # Remove the x from xrepl to run the code. Add the x back to ignore to code.~ -** Processing line: ~ xrepl do~ -** Processing line: ~ c = 30~ -** Processing line: ~ puts "The value of c is #{c}."~ -** Processing line: ~~ -** Processing line: ~ if c~ -** Processing line: ~ puts "This if statement ran because c is truthy."~ -** Processing line: ~ end~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ # Remove the x from xrepl to run the code. Add the x back to ignore to code.~ -** Processing line: ~ xrepl do~ -** Processing line: ~ d = false~ -** Processing line: ~ puts "The value of d is #{d}."~ -** Processing line: ~~ -** Processing line: ~ if !d~ -** Processing line: ~ puts "This if statement ran because d is falsey, using the not operator (!) makes d evaluate to true."~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ e = nil~ -** Processing line: ~ puts "Nil is also considered falsey. The value of e is: #{e}."~ -** Processing line: ~~ -** Processing line: ~ if !e~ -** Processing line: ~ puts "This if statement ran because e is nil (a falsey value)."~ -** Processing line: ~ end~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ # ====================================================================================~ -** Processing line: ~ # Conditionals~ -** Processing line: ~ # ====================================================================================~ -** Processing line: ~ # Remove the x from xrepl to run the code. Add the x back to ignore to code.~ -** Processing line: ~ xrepl do~ -** Processing line: ~ i_am_true = true~ -** Processing line: ~ i_am_nil = nil~ -** Processing line: ~ i_am_false = false~ -** Processing line: ~ i_am_hi = "hi"~ -** Processing line: ~~ -** Processing line: ~ puts "======== if statement"~ -** Processing line: ~ i_am_one = 1~ -** Processing line: ~ if i_am_one~ -** Processing line: ~ puts "This was printed because i_am_one is truthy."~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ puts "======== if/else statement"~ -** Processing line: ~ if i_am_false~ -** Processing line: ~ puts "This will NOT get printed because i_am_false is false."~ -** Processing line: ~ else~ -** Processing line: ~ puts "This was printed because i_am_false is false."~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ puts "======== if/elsif/else statement"~ -** Processing line: ~ if i_am_false~ -** Processing line: ~ puts "This will NOT get printed because i_am_false is false."~ -** Processing line: ~ elsif i_am_true~ -** Processing line: ~ puts "This was printed because i_am_true is true."~ -** Processing line: ~ else~ -** Processing line: ~ puts "This will NOT get printed i_am_true was true."~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ puts "======== case statement "~ -** Processing line: ~ i_am_one = 1~ -** Processing line: ~ case i_am_one~ -** Processing line: ~ when 10~ -** Processing line: ~ puts "case equaled: 10"~ -** Processing line: ~ when 9~ -** Processing line: ~ puts "case equaled: 9"~ -** Processing line: ~ when 5~ -** Processing line: ~ puts "case equaled: 5"~ -** Processing line: ~ when 1~ -** Processing line: ~ puts "case equaled: 1"~ -** Processing line: ~ else~ -** Processing line: ~ puts "Value wasn't cased."~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ puts "======== different types of comparisons"~ -** Processing line: ~ if 4 == 4~ -** Processing line: ~ puts "equal (4 == 4)"~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ if 4 != 3~ -** Processing line: ~ puts "not equal (4 != 3)"~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ if 3 < 4~ -** Processing line: ~ puts "less than (3 < 4)"~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ if 4 > 3~ -** Processing line: ~ puts "greater than (4 > 3)"~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ if ((4 > 3) || (3 < 4) || false)~ -** Processing line: ~ puts "or statement ((4 > 3) || (3 < 4) || false)"~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ if ((4 > 3) && (3 < 4))~ -** Processing line: ~ puts "and statement ((4 > 3) && (3 < 4))"~ -** Processing line: ~ end~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ # ====================================================================================~ -** Processing line: ~ # Looping~ -** Processing line: ~ # ====================================================================================~ -** Processing line: ~ # Remove the x from xrepl to run the code. Add the x back to ignore to code.~ -** Processing line: ~ xrepl do~ -** Processing line: ~ puts "======== times block"~ -** Processing line: ~ 3.times do |i|~ -** Processing line: ~ puts i~ -** Processing line: ~ end~ -** Processing line: ~ puts "======== range block exclusive"~ -** Processing line: ~ (0...3).each do |i|~ -** Processing line: ~ puts i~ -** Processing line: ~ end~ -** Processing line: ~ puts "======== range block inclusive"~ -** Processing line: ~ (0..3).each do |i|~ -** Processing line: ~ puts i~ -** Processing line: ~ end~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ # ====================================================================================~ -** Processing line: ~ # Enumerables~ -** Processing line: ~ # ====================================================================================~ -** Processing line: ~ # Remove the x from xrepl to run the code. Add the x back to ignore to code.~ -** Processing line: ~ xrepl do~ -** Processing line: ~ puts "======== array each"~ -** Processing line: ~ colors = ["red", "blue", "yellow"]~ -** Processing line: ~ colors.each do |color|~ -** Processing line: ~ puts color~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ puts '======== array each_with_index'~ -** Processing line: ~ colors = ["red", "blue", "yellow"]~ -** Processing line: ~ colors.each_with_index do |color, i|~ -** Processing line: ~ puts "#{color} at index #{i}"~ -** Processing line: ~ end~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ # Remove the x from xrepl to run the code. Add the x back to ignore to code.~ -** Processing line: ~ xrepl do~ -** Processing line: ~ puts "======== single parameter function"~ -** Processing line: ~ def add_one_to n~ -** Processing line: ~ n + 5~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ puts add_one_to(3)~ -** Processing line: ~~ -** Processing line: ~ puts "======== function with default value"~ -** Processing line: ~ def function_with_default_value v = 10~ -** Processing line: ~ v * 10~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ puts "passing three: #{function_with_default_value(3)}"~ -** Processing line: ~ puts "passing nil: #{function_with_default_value}"~ -** Processing line: ~~ -** Processing line: ~ puts "======== Or Equal (||=) operator for nil values"~ -** Processing line: ~ def function_with_nil_default_with_local a = nil~ -** Processing line: ~ result = a~ -** Processing line: ~ result ||= "or equal operator was exected and set a default value"~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ puts "passing 'hi': #{function_with_nil_default_with_local 'hi'}"~ -** Processing line: ~ puts "passing nil: #{function_with_nil_default_with_local}"~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ # ====================================================================================~ -** Processing line: ~ # Arrays~ -** Processing line: ~ # ====================================================================================~ -** Processing line: ~ # Remove the x from xrepl to run the code. Add the x back to ignore to code.~ -** Processing line: ~ xrepl do~ -** Processing line: ~ puts "======== Create an array with the numbers 1 to 10."~ -** Processing line: ~ one_to_ten = (1..10).to_a~ -** Processing line: ~ puts one_to_ten~ -** Processing line: ~~ -** Processing line: ~ puts "======== Create a new array that only contains even numbers from the previous array."~ -** Processing line: ~ one_to_ten = (1..10).to_a~ -** Processing line: ~ evens = one_to_ten.find_all do |number|~ -** Processing line: ~ number % 2 == 0~ -** Processing line: ~ end~ -** Processing line: ~ puts evens~ -** Processing line: ~~ -** Processing line: ~ puts "======== Create a new array that rejects odd numbers."~ -** Processing line: ~ one_to_ten = (1..10).to_a~ -** Processing line: ~ also_even = one_to_ten.reject do |number|~ -** Processing line: ~ number % 2 != 0~ -** Processing line: ~ end~ -** Processing line: ~ puts also_even~ -** Processing line: ~~ -** Processing line: ~ puts "======== Create an array that doubles every number."~ -** Processing line: ~ one_to_ten = (1..10).to_a~ -** Processing line: ~ doubled = one_to_ten.map do |number|~ -** Processing line: ~ number * 2~ -** Processing line: ~ end~ -** Processing line: ~ puts doubled~ -** Processing line: ~~ -** Processing line: ~ puts "======== Create an array that selects only odd numbers and then multiply those by 10."~ -** Processing line: ~ one_to_ten = (1..10).to_a~ -** Processing line: ~ odd_doubled = one_to_ten.find_all do |number|~ -** Processing line: ~ number % 2 != 0~ -** Processing line: ~ end.map do |odd_number|~ -** Processing line: ~ odd_number * 10~ -** Processing line: ~ end~ -** Processing line: ~ puts odd_doubled~ -** Processing line: ~~ -** Processing line: ~ puts "======== All combination of numbers 1 to 10."~ -** Processing line: ~ one_to_ten = (1..10).to_a~ -** Processing line: ~ all_combinations = one_to_ten.product(one_to_ten)~ -** Processing line: ~ puts all_combinations~ -** Processing line: ~~ -** Processing line: ~ puts "======== All uniq combinations of numbers. For example: [1, 2] is the same as [2, 1]."~ -** Processing line: ~ one_to_ten = (1..10).to_a~ -** Processing line: ~ uniq_combinations =~ -** Processing line: ~ one_to_ten.product(one_to_ten)~ -** Processing line: ~ .map do |unsorted_number|~ -** Processing line: ~ unsorted_number.sort~ -** Processing line: ~ end.uniq~ -** Processing line: ~ puts uniq_combinations~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ # ====================================================================================~ -** Processing line: ~ # Advanced Arrays~ -** Processing line: ~ # ====================================================================================~ -** Processing line: ~ # Remove the x from xrepl to run the code. Add the x back to ignore to code.~ -** Processing line: ~ xrepl do~ -** Processing line: ~ puts "======== All unique Pythagorean Triples between 1 and 40 sorted by area of the triangle."~ -** Processing line: ~~ -** Processing line: ~ one_to_hundred = (1..40).to_a~ -** Processing line: ~ triples =~ -** Processing line: ~ one_to_hundred.product(one_to_hundred).map do |width, height|~ -** Processing line: ~ [width, height, Math.sqrt(width ** 2 + height ** 2)]~ -** Processing line: ~ end.find_all do |_, _, hypotenuse|~ -** Processing line: ~ hypotenuse.to_i == hypotenuse~ -** Processing line: ~ end.map do |triangle|~ -** Processing line: ~ triangle.map(&:to_i)~ -** Processing line: ~ end.uniq do |triangle|~ -** Processing line: ~ triangle.sort~ -** Processing line: ~ end.map do |width, height, hypotenuse|~ -** Processing line: ~ [width, height, hypotenuse, (width * height) / 2]~ -** Processing line: ~ end.sort_by do |_, _, _, area|~ -** Processing line: ~ area~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ triples.each do |width, height, hypotenuse, area|~ -** Processing line: ~ puts "(#{width}, #{height}, #{hypotenuse}) = #{area}"~ -** Processing line: ~ end~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~#+end_src~ -- PRE end detected. -** Processing line: ~~ -** Processing line: ~~ ** Processing line: ~*** Crafting - Farming Game Starting Point - tests.rb~ - H3 detected. - Determining if line is a header. @@ -222639,6 +230275,407 @@ Follows is a source code listing for all files that have been open sourced. This - PRE end detected. ** Processing line: ~~ ** Processing line: ~~ +** Processing line: ~*** Mario - Jumping - main.rb~ +- H3 detected. +- Determining if line is a header. +- Line contains ~*** ~... gsub-ing empty string +- Formatting line: ~Mario - Jumping - main.rb~ +- Line's tilde count is: 0 +- Line contains link marker: false +- Determining if line is a header. +- Line contains ~*** ~... gsub-ing empty string +- Formatting line: ~Mario - Jumping - main.rb~ +- Line's tilde count is: 0 +- Line contains link marker: false +** Processing line: ~~ +** Processing line: ~#+begin_src ruby~ +- PRE start detected. +** Processing line: ~ # ./samples/99_genre_mario/01_jumping/app/main.rb~ +** Processing line: ~ def tick args~ +** Processing line: ~ defaults args~ +** Processing line: ~ render args~ +** Processing line: ~ input args~ +** Processing line: ~ calc args~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def defaults args~ +** Processing line: ~ args.state.player.x ||= args.grid.w.half~ +** Processing line: ~ args.state.player.y ||= 0~ +** Processing line: ~ args.state.player.size ||= 100~ +** Processing line: ~ args.state.player.dy ||= 0~ +** Processing line: ~ args.state.player.action ||= :jumping~ +** Processing line: ~ args.state.jump.power = 20~ +** Processing line: ~ args.state.jump.increase_frames = 10~ +** Processing line: ~ args.state.jump.increase_power = 1~ +** Processing line: ~ args.state.gravity = -1~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def render args~ +** Processing line: ~ args.outputs.sprites << {~ +** Processing line: ~ x: args.state.player.x -~ +** Processing line: ~ args.state.player.size.half,~ +** Processing line: ~ y: args.state.player.y,~ +** Processing line: ~ w: args.state.player.size,~ +** Processing line: ~ h: args.state.player.size,~ +** Processing line: ~ path: 'sprites/square/red.png'~ +** Processing line: ~ }~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def input args~ +** Processing line: ~ if args.inputs.keyboard.key_down.space~ +** Processing line: ~ if args.state.player.action == :standing~ +** Processing line: ~ args.state.player.action = :jumping~ +** Processing line: ~ args.state.player.dy = args.state.jump.power~ +** Processing line: ~~ +** Processing line: ~ # record when the action took place~ +** Processing line: ~ current_frame = args.state.tick_count~ +** Processing line: ~ args.state.player.action_at = current_frame~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ # if the space bar is being held~ +** Processing line: ~ if args.inputs.keyboard.key_held.space~ +** Processing line: ~ # is the player jumping~ +** Processing line: ~ is_jumping = args.state.player.action == :jumping~ +** Processing line: ~~ +** Processing line: ~ # when was the jump performed~ +** Processing line: ~ time_of_jump = args.state.player.action_at~ +** Processing line: ~~ +** Processing line: ~ # how much time has passed since the jump~ +** Processing line: ~ jump_elapsed_time = time_of_jump.elapsed_time~ +** Processing line: ~~ +** Processing line: ~ # how much time is allowed for increasing power~ +** Processing line: ~ time_allowed = args.state.jump.increase_frames~ +** Processing line: ~~ +** Processing line: ~ # if the player is jumping~ +** Processing line: ~ # and the elapsed time is less than~ +** Processing line: ~ # the allowed time~ +** Processing line: ~ if is_jumping && jump_elapsed_time < time_allowed~ +** Processing line: ~ # increase the dy by the increase power~ +** Processing line: ~ power_to_add = args.state.jump.increase_power~ +** Processing line: ~ args.state.player.dy += power_to_add~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def calc args~ +** Processing line: ~ if args.state.player.action == :jumping~ +** Processing line: ~ args.state.player.y += args.state.player.dy~ +** Processing line: ~ args.state.player.dy += args.state.gravity~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ if args.state.player.y < 0~ +** Processing line: ~ args.state.player.y = 0~ +** Processing line: ~ args.state.player.action = :standing~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~#+end_src~ +- PRE end detected. +** Processing line: ~~ +** Processing line: ~~ +** Processing line: ~*** Mario - Jumping And Collisions - main.rb~ +- H3 detected. +- Determining if line is a header. +- Line contains ~*** ~... gsub-ing empty string +- Formatting line: ~Mario - Jumping And Collisions - main.rb~ +- Line's tilde count is: 0 +- Line contains link marker: false +- Determining if line is a header. +- Line contains ~*** ~... gsub-ing empty string +- Formatting line: ~Mario - Jumping And Collisions - main.rb~ +- Line's tilde count is: 0 +- Line contains link marker: false +** Processing line: ~~ +** Processing line: ~#+begin_src ruby~ +- PRE start detected. +** Processing line: ~ # ./samples/99_genre_mario/02_jumping_and_collisions/app/main.rb~ +** Processing line: ~ class Game~ +** Processing line: ~ attr_gtk~ +** Processing line: ~~ +** Processing line: ~ def tick~ +** Processing line: ~ defaults~ +** Processing line: ~ render~ +** Processing line: ~ input~ +** Processing line: ~ calc~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def defaults~ +** Processing line: ~ return if state.tick_count != 0~ +** Processing line: ~~ +** Processing line: ~ player.x = 64~ +** Processing line: ~ player.y = 800~ +** Processing line: ~ player.size = 50~ +** Processing line: ~ player.dx = 0~ +** Processing line: ~ player.dy = 0~ +** Processing line: ~ player.action = :falling~ +** Processing line: ~~ +** Processing line: ~ player.max_speed = 20~ +** Processing line: ~ player.jump_power = 15~ +** Processing line: ~ player.jump_air_time = 15~ +** Processing line: ~ player.jump_increase_power = 1~ +** Processing line: ~~ +** Processing line: ~ state.gravity = -1~ +** Processing line: ~ state.drag = 0.001~ +** Processing line: ~ state.tile_size = 64~ +** Processing line: ~ state.tiles ||= [~ +** Processing line: ~ { ordinal_x: 0, ordinal_y: 0 },~ +** Processing line: ~ { ordinal_x: 1, ordinal_y: 0 },~ +** Processing line: ~ { ordinal_x: 2, ordinal_y: 0 },~ +** Processing line: ~ { ordinal_x: 3, ordinal_y: 0 },~ +** Processing line: ~ { ordinal_x: 4, ordinal_y: 0 },~ +** Processing line: ~ { ordinal_x: 5, ordinal_y: 0 },~ +** Processing line: ~ { ordinal_x: 6, ordinal_y: 0 },~ +** Processing line: ~ { ordinal_x: 7, ordinal_y: 0 },~ +** Processing line: ~ { ordinal_x: 8, ordinal_y: 0 },~ +** Processing line: ~ { ordinal_x: 9, ordinal_y: 0 },~ +** Processing line: ~ { ordinal_x: 10, ordinal_y: 0 },~ +** Processing line: ~ { ordinal_x: 11, ordinal_y: 0 },~ +** Processing line: ~ { ordinal_x: 12, ordinal_y: 0 },~ +** Processing line: ~~ +** Processing line: ~ { ordinal_x: 9, ordinal_y: 3 },~ +** Processing line: ~ { ordinal_x: 10, ordinal_y: 3 },~ +** Processing line: ~ { ordinal_x: 11, ordinal_y: 3 },~ +** Processing line: ~ ]~ +** Processing line: ~~ +** Processing line: ~ tiles.each do |t|~ +** Processing line: ~ t.rect = { x: t.ordinal_x * 64,~ +** Processing line: ~ y: t.ordinal_y * 64,~ +** Processing line: ~ w: 64,~ +** Processing line: ~ h: 64 }~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def render~ +** Processing line: ~ render_player~ +** Processing line: ~ render_tiles~ +** Processing line: ~ # render_grid~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def input~ +** Processing line: ~ input_jump~ +** Processing line: ~ input_move~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def calc~ +** Processing line: ~ calc_player_rect~ +** Processing line: ~ calc_left~ +** Processing line: ~ calc_right~ +** Processing line: ~ calc_below~ +** Processing line: ~ calc_above~ +** Processing line: ~ calc_player_dy~ +** Processing line: ~ calc_player_dx~ +** Processing line: ~ calc_game_over~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def render_player~ +** Processing line: ~ outputs.sprites << {~ +** Processing line: ~ x: player.x,~ +** Processing line: ~ y: player.y,~ +** Processing line: ~ w: player.size,~ +** Processing line: ~ h: player.size,~ +** Processing line: ~ path: 'sprites/square/red.png'~ +** Processing line: ~ }~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def render_tiles~ +** Processing line: ~ outputs.sprites << state.tiles.map do |t|~ +** Processing line: ~ t.merge path: 'sprites/square/white.png',~ +** Processing line: ~ x: t.ordinal_x * 64,~ +** Processing line: ~ y: t.ordinal_y * 64,~ +** Processing line: ~ w: 64,~ +** Processing line: ~ h: 64~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def render_grid~ +** Processing line: ~ if state.tick_count == 0~ +** Processing line: ~ outputs[:grid].background_color = [0, 0, 0, 0]~ +** Processing line: ~ outputs[:grid].borders << available_brick_locations~ +** Processing line: ~ outputs[:grid].labels << available_brick_locations.map do |b|~ +** Processing line: ~ [~ +** Processing line: ~ b.merge(text: "#{b.ordinal_x},#{b.ordinal_y}",~ +** Processing line: ~ x: b.x + 2,~ +** Processing line: ~ y: b.y + 2,~ +** Processing line: ~ size_enum: -3,~ +** Processing line: ~ vertical_alignment_enum: 0,~ +** Processing line: ~ blendmode_enum: 0),~ +** Processing line: ~ b.merge(text: "#{b.x},#{b.y}",~ +** Processing line: ~ x: b.x + 2,~ +** Processing line: ~ y: b.y + 2 + 20,~ +** Processing line: ~ size_enum: -3,~ +** Processing line: ~ vertical_alignment_enum: 0,~ +** Processing line: ~ blendmode_enum: 0)~ +** Processing line: ~ ]~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ outputs.sprites << { x: 0, y: 0, w: 1280, h: 720, path: :grid }~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def input_jump~ +** Processing line: ~ if inputs.keyboard.key_down.space~ +** Processing line: ~ player_jump~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ if inputs.keyboard.key_held.space~ +** Processing line: ~ player_jump_increase_air_time~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def input_move~ +** Processing line: ~ if player.dx.abs < 20~ +** Processing line: ~ if inputs.keyboard.left~ +** Processing line: ~ player.dx -= 2~ +** Processing line: ~ elsif inputs.keyboard.right~ +** Processing line: ~ player.dx += 2~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def calc_game_over~ +** Processing line: ~ if player.y < -64~ +** Processing line: ~ player.x = 64~ +** Processing line: ~ player.y = 800~ +** Processing line: ~ player.dx = 0~ +** Processing line: ~ player.dy = 0~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def calc_player_rect~ +** Processing line: ~ player.rect = player_current_rect~ +** Processing line: ~ player.next_rect = player_next_rect~ +** Processing line: ~ player.prev_rect = player_prev_rect~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def calc_player_dx~ +** Processing line: ~ player.dx = player_next_dx~ +** Processing line: ~ player.x += player.dx~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def calc_player_dy~ +** Processing line: ~ player.y += player.dy~ +** Processing line: ~ player.dy = player_next_dy~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def calc_below~ +** Processing line: ~ return unless player.dy < 0~ +** Processing line: ~ tiles_below = tiles_find { |t| t.rect.top <= player.prev_rect.y }~ +** Processing line: ~ collision = tiles_find_colliding tiles_below, (player.rect.merge y: player.next_rect.y)~ +** Processing line: ~ if collision~ +** Processing line: ~ player.y = collision.rect.y + state.tile_size~ +** Processing line: ~ player.dy = 0~ +** Processing line: ~ player.action = :standing~ +** Processing line: ~ else~ +** Processing line: ~ player.action = :falling~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def calc_left~ +** Processing line: ~ return unless player.dx < 0 && player_next_dx < 0~ +** Processing line: ~ tiles_left = tiles_find { |t| t.rect.right <= player.prev_rect.left }~ +** Processing line: ~ collision = tiles_find_colliding tiles_left, (player.rect.merge x: player.next_rect.x)~ +** Processing line: ~ return unless collision~ +** Processing line: ~ player.x = collision.rect.right~ +** Processing line: ~ player.dx = 0~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def calc_right~ +** Processing line: ~ return unless player.dx > 0 && player_next_dx > 0~ +** Processing line: ~ tiles_right = tiles_find { |t| t.rect.left >= player.prev_rect.right }~ +** Processing line: ~ collision = tiles_find_colliding tiles_right, (player.rect.merge x: player.next_rect.x)~ +** Processing line: ~ return unless collision~ +** Processing line: ~ player.x = collision.rect.left - player.rect.w~ +** Processing line: ~ player.dx = 0~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def calc_above~ +** Processing line: ~ return unless player.dy > 0~ +** Processing line: ~ tiles_above = tiles_find { |t| t.rect.y >= player.prev_rect.y }~ +** Processing line: ~ collision = tiles_find_colliding tiles_above, (player.rect.merge y: player.next_rect.y)~ +** Processing line: ~ return unless collision~ +** Processing line: ~ player.dy = 0~ +** Processing line: ~ player.y = collision.rect.bottom - player.rect.h~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def player_current_rect~ +** Processing line: ~ { x: player.x, y: player.y, w: player.size, h: player.size }~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def available_brick_locations~ +** Processing line: ~ (0..19).to_a~ +** Processing line: ~ .product(0..11)~ +** Processing line: ~ .map do |(ordinal_x, ordinal_y)|~ +** Processing line: ~ { ordinal_x: ordinal_x,~ +** Processing line: ~ ordinal_y: ordinal_y,~ +** Processing line: ~ x: ordinal_x * 64,~ +** Processing line: ~ y: ordinal_y * 64,~ +** Processing line: ~ w: 64,~ +** Processing line: ~ h: 64 }~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def player~ +** Processing line: ~ state.player ||= args.state.new_entity :player~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def player_next_dy~ +** Processing line: ~ player.dy + state.gravity + state.drag ** 2 * -1~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def player_next_dx~ +** Processing line: ~ player.dx * 0.8~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def player_next_rect~ +** Processing line: ~ player.rect.merge x: player.x + player_next_dx,~ +** Processing line: ~ y: player.y + player_next_dy~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def player_prev_rect~ +** Processing line: ~ player.rect.merge x: player.x - player.dx,~ +** Processing line: ~ y: player.y - player.dy~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def player_jump~ +** Processing line: ~ return if player.action != :standing~ +** Processing line: ~ player.action = :jumping~ +** Processing line: ~ player.dy = state.player.jump_power~ +** Processing line: ~ current_frame = state.tick_count~ +** Processing line: ~ player.action_at = current_frame~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def player_jump_increase_air_time~ +** Processing line: ~ return if player.action != :jumping~ +** Processing line: ~ return if player.action_at.elapsed_time >= player.jump_air_time~ +** Processing line: ~ player.dy += player.jump_increase_power~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def tiles~ +** Processing line: ~ state.tiles~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def tiles_find_colliding tiles, target~ +** Processing line: ~ tiles.find { |t| t.rect.intersect_rect? target }~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def tiles_find &block~ +** Processing line: ~ tiles.find_all(&block)~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def tick args~ +** Processing line: ~ $game ||= Game.new~ +** Processing line: ~ $game.args = args~ +** Processing line: ~ $game.tick~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ $gtk.reset~ +** Processing line: ~~ +** Processing line: ~#+end_src~ +- PRE end detected. +** Processing line: ~~ +** Processing line: ~~ ** Processing line: ~*** Platformer - Clepto Frog - main.rb~ - H3 detected. - Determining if line is a header. @@ -222655,7 +230692,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~#+begin_src ruby~ - PRE start detected. ** Processing line: ~ # ./samples/99_genre_platformer/clepto_frog/app/main.rb~ -** Processing line: ~ MAP_FILE_PATH = 'app/map.txt'~ +** Processing line: ~ MAP_FILE_PATH = 'map.txt'~ ** Processing line: ~~ ** Processing line: ~ require 'app/map.rb'~ ** Processing line: ~~ @@ -222710,35 +230747,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~~ ** Processing line: ~ def render_intro~ ** Processing line: ~ outputs.labels << [640, 700, "Clepto Frog", 4, 1]~ -** Processing line: ~ if state.tick_count >= 120~ -** Processing line: ~ outputs.labels << [640, 620, "\"Uh... your office has a pet frog?\" - New Guy",~ -** Processing line: ~ 4, 1, 0, 0, 0, 255 * 120.ease(60)]~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ if state.tick_count >= 240~ -** Processing line: ~ outputs.labels << [640, 580, "\"Yep! His name is Clepto.\" - Jim",~ -** Processing line: ~ 4, 1, 0, 0, 0, 255 * 240.ease(60)]~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ if state.tick_count >= 360~ -** Processing line: ~ outputs.labels << [640, 540, "\"Uh...\" - New Guy",~ -** Processing line: ~ 4, 1, 0, 0, 0, 255 * 360.ease(60)]~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ if state.tick_count >= 480~ -** Processing line: ~ outputs.labels << [640, 500, "\"He steals mugs while we're away...\" - Jim",~ -** Processing line: ~ 4, 1, 0, 0, 0, 255 * 480.ease(60)]~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ if state.tick_count >= 600~ -** Processing line: ~ outputs.labels << [640, 460, "\"It's not a big deal, we take them back in the morning.\" - Jim",~ -** Processing line: ~ 4, 1, 0, 0, 0, 255 * 600.ease(60)]~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ outputs.sprites << [640 - 50, 360 - 50, 100, 100,~ -** Processing line: ~ "sprites/square-green.png"]~ -** Processing line: ~~ -** Processing line: ~ if state.tick_count == 800~ +** Processing line: ~ if state.tick_count == 120~ ** Processing line: ~ state.scene = :game~ ** Processing line: ~ state.game_start_at = state.tick_count~ ** Processing line: ~ end~ @@ -222746,7 +230755,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~~ ** Processing line: ~ def tick~ ** Processing line: ~ defaults~ -** Processing line: ~ if state.scene == :intro && state.tick_count <= 800~ +** Processing line: ~ if state.scene == :intro && state.tick_count <= 120~ ** Processing line: ~ render_intro~ ** Processing line: ~ elsif state.scene == :ending~ ** Processing line: ~ render_ending~ @@ -222849,15 +230858,15 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~~ ** Processing line: ~ if state.god_mode~ ** Processing line: ~ # SHOW HIDE COLLISIONS~ -** Processing line: ~ outputs.sprites << state.world.map do |x, y, w, h|~ -** Processing line: ~ x = vx(x)~ -** Processing line: ~ y = vy(y)~ +** Processing line: ~ outputs.sprites << state.world.map do |rect|~ +** Processing line: ~ x = vx(rect.x)~ +** Processing line: ~ y = vy(rect.y)~ ** Processing line: ~ if x > -80 && x < 1280 && y > -80 && y < 720~ ** Processing line: ~ {~ ** Processing line: ~ x: x,~ ** Processing line: ~ y: y,~ -** Processing line: ~ w: vw(w || state.tile_size),~ -** Processing line: ~ h: vh(h || state.tile_size),~ +** Processing line: ~ w: vw(rect.w || state.tile_size),~ +** Processing line: ~ h: vh(rect.h || state.tile_size),~ ** Processing line: ~ path: 'sprites/square-gray.png',~ ** Processing line: ~ a: 128~ ** Processing line: ~ }~ @@ -222880,8 +230889,10 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~~ ** Processing line: ~~ ** Processing line: ~ # Creates sprite following mouse to help indicate which sprite you have selected~ -** Processing line: ~ outputs.primitives << [inputs.mouse.position.x, inputs.mouse.position.y,~ -** Processing line: ~ state.tile_size, state.tile_size, 'sprites/square-indigo.png', 0, 100].sprite~ +** Processing line: ~ outputs.primitives << [inputs.mouse.position.x - 32 * state.camera_scale,~ +** Processing line: ~ inputs.mouse.position.y - 32 * state.camera_scale,~ +** Processing line: ~ state.tile_size * state.camera_scale,~ +** Processing line: ~ state.tile_size * state.camera_scale, 'sprites/square-indigo.png', 0, 100].sprite~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ render_mini_map~ @@ -222962,6 +230973,29 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ set_camera_scale 1~ ** Processing line: ~ end~ ** Processing line: ~~ +** Processing line: ~ if inputs.mouse.click~ +** Processing line: ~ state.id_seed += 1~ +** Processing line: ~ id = state.id_seed~ +** Processing line: ~ x = state.camera_x + (inputs.mouse.click.x.fdiv(state.camera_scale) - 32)~ +** Processing line: ~ y = state.camera_y + (inputs.mouse.click.y.fdiv(state.camera_scale) - 32)~ +** Processing line: ~ x = ((x + 2).idiv 4) * 4~ +** Processing line: ~ y = ((y + 2).idiv 4) * 4~ +** Processing line: ~ w = 64~ +** Processing line: ~ h = 64~ +** Processing line: ~ candidate_rect = { id: id, x: x, y: y, w: w, h: h }~ +** Processing line: ~ scaled_candidate_rect = { x: x + 30, y: y + 30, w: w - 60, h: h - 60 }~ +** Processing line: ~ to_remove = state.world.find { |r| r.intersect_rect? scaled_candidate_rect }~ +** Processing line: ~ if to_remove && args.inputs.keyboard.x~ +** Processing line: ~ state.world.reject! { |r| r.id == to_remove.id }~ +** Processing line: ~ else~ +** Processing line: ~ state.world << candidate_rect~ +** Processing line: ~ end~ +** Processing line: ~ export_map~ +** Processing line: ~ state.world_lookup = {}~ +** Processing line: ~ state.world_collision_rects = nil~ +** Processing line: ~ calc_world_lookup~ +** Processing line: ~ end~ +** Processing line: ~~ ** Processing line: ~ if input_up?~ ** Processing line: ~ state.y += 10~ ** Processing line: ~ state.dy = 0~ @@ -222983,12 +231017,6 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ if state.scene == :game~ ** Processing line: ~ process_inputs_player_movement~ ** Processing line: ~ process_inputs_god_mode~ -** Processing line: ~ elsif state.scene == :intro~ -** Processing line: ~ if args.inputs.keyboard.key_down.enter || args.inputs.keyboard.key_down.space~ -** Processing line: ~ if Kernel.tick_count < 600~ -** Processing line: ~ Kernel.tick_count = 600~ -** Processing line: ~ end~ -** Processing line: ~ end~ ** Processing line: ~ end~ ** Processing line: ~ end~ ** Processing line: ~~ @@ -223086,17 +231114,6 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ end~ ** Processing line: ~ end~ ** Processing line: ~~ -** Processing line: ~ def add_floors~ -** Processing line: ~ # floors~ -** Processing line: ~ state.world += [~ -** Processing line: ~ [0, 0, 10000, 40],~ -** Processing line: ~ [0, 1670, 3250, 60],~ -** Processing line: ~ [6691, 1653, 3290, 60],~ -** Processing line: ~ [1521, 3792, 7370, 60],~ -** Processing line: ~ [0, 5137, 3290, 60]~ -** Processing line: ~ ]~ -** Processing line: ~ end~ -** Processing line: ~~ ** Processing line: ~ def attempt_load_world_from_file~ ** Processing line: ~ return if state.world~ ** Processing line: ~ # exported_world = gtk.read_file(MAP_FILE_PATH)~ @@ -223104,26 +231121,11 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ state.objects = []~ ** Processing line: ~~ ** Processing line: ~ if $collisions~ -** Processing line: ~ $collisions.map do |x, y, w, h|~ -** Processing line: ~ state.world << [x, y, w, h]~ +** Processing line: ~ state.id_seed ||= 0~ +** Processing line: ~ $collisions.each do |x, y, w, h|~ +** Processing line: ~ state.id_seed += 1~ +** Processing line: ~ state.world << { id: state.id_seed, x: x, y: y, w: w, h: h }~ ** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ add_floors~ -** Processing line: ~ # elsif exported_world~ -** Processing line: ~ # exported_world.each_line.map do |l|~ -** Processing line: ~ # tokens = l.strip.split(',')~ -** Processing line: ~ # x = tokens[0].to_i~ -** Processing line: ~ # y = tokens[1].to_i~ -** Processing line: ~ # type = tokens[2].to_i~ -** Processing line: ~ # if type == 1~ -** Processing line: ~ # state.world << [x, y, state.tile_size, state.tile_size]~ -** Processing line: ~ # elsif type == 2~ -** Processing line: ~ # w, h, path = tokens[3..-1]~ -** Processing line: ~ # state.objects << [x, y, w.to_i, h.to_i, path]~ -** Processing line: ~ # end~ -** Processing line: ~ # end~ -** Processing line: ~~ -** Processing line: ~ # add_floors~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ if $mugs~ @@ -223144,23 +231146,24 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~~ ** Processing line: ~ # Searches through the world and finds the cordinates that exist~ ** Processing line: ~ state.world_lookup = {}~ -** Processing line: ~ state.world.each do |x, y, w, h|~ -** Processing line: ~ state.world_lookup[[x, y, w || state.tile_size, h || state.tile_size]] = true~ +** Processing line: ~ state.world.each do |rect|~ +** Processing line: ~ state.world_lookup[rect.id] = rect~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ # Assigns collision rects for every sprite drawn~ ** Processing line: ~ state.world_collision_rects =~ ** Processing line: ~ state.world_lookup~ ** Processing line: ~ .keys~ -** Processing line: ~ .map do |x, y, w, h|~ +** Processing line: ~ .map do |key|~ +** Processing line: ~ rect = state.world_lookup[key]~ ** Processing line: ~ s = state.tile_size~ -** Processing line: ~ w ||= s~ -** Processing line: ~ h ||= s~ +** Processing line: ~ rect.w ||= s~ +** Processing line: ~ rect.h ||= s~ ** Processing line: ~ {~ -** Processing line: ~ args: [x, y, w, h],~ -** Processing line: ~ left_right: [x, y + 4, w, h - 6],~ -** Processing line: ~ top: [x + 4, y + 6, w - 8, h - 6],~ -** Processing line: ~ bottom: [x + 1, y - 1, w - 2, h - 8],~ +** Processing line: ~ args: rect,~ +** Processing line: ~ left_right: { x: rect.x, y: rect.y + 4, w: rect.w, h: rect.h - 6 },~ +** Processing line: ~ top: { x: rect.x + 4, y: rect.y + 6, w: rect.w - 8, h: rect.h - 6 },~ +** Processing line: ~ bottom: { x: rect.x + 1, y: rect.y - 1, w: rect.w - 2, h: rect.h - 8 },~ ** Processing line: ~ }~ ** Processing line: ~ end~ ** Processing line: ~~ @@ -223216,12 +231219,21 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~~ ** Processing line: ~ def end_of_tongue~ ** Processing line: ~ p = state.tongue_angle.vector(state.tongue_length)~ -** Processing line: ~ [start_of_tongue.x + p.x, start_of_tongue.y + p.y]~ +** Processing line: ~ { x: start_of_tongue.x + p.x, y: start_of_tongue.y + p.y }~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ def calc_shooting~ +** Processing line: ~ calc_shooting_increment~ +** Processing line: ~ calc_shooting_increment~ +** Processing line: ~ calc_shooting_increment~ +** Processing line: ~ calc_shooting_increment~ +** Processing line: ~ calc_shooting_increment~ +** Processing line: ~ calc_shooting_increment~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def calc_shooting_increment~ ** Processing line: ~ return unless state.action == :shooting~ -** Processing line: ~ state.tongue_length += 30~ +** Processing line: ~ state.tongue_length += 5~ ** Processing line: ~ potential_anchor = end_of_tongue~ ** Processing line: ~ if potential_anchor.x <= 0~ ** Processing line: ~ state.anchor_point = potential_anchor~ @@ -223240,9 +231252,9 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ state.action = :anchored~ ** Processing line: ~ outputs.sounds << 'sounds/attached.wav'~ ** Processing line: ~ else~ -** Processing line: ~ anchor_rect = [potential_anchor.x - 5, potential_anchor.y - 5, 10, 10]~ +** Processing line: ~ anchor_rect = { x: potential_anchor.x - 5, y: potential_anchor.y - 5, w: 10, h: 10 }~ ** Processing line: ~ collision = state.world_collision_rects.find_all do |v|~ -** Processing line: ~ [v[:args].x, v[:args].y, v[:args].w, v[:args].h].intersect_rect?(anchor_rect)~ +** Processing line: ~ v[:args].intersect_rect?(anchor_rect)~ ** Processing line: ~ end.first~ ** Processing line: ~ if collision~ ** Processing line: ~ state.anchor_point = potential_anchor~ @@ -223338,7 +231350,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ .first~ ** Processing line: ~~ ** Processing line: ~ return unless left_side_collisions~ -** Processing line: ~ state.x = left_side_collisions[:left_right].right~ +** Processing line: ~ state.x = left_side_collisions[:left_right].right + 1~ ** Processing line: ~ state.dx = state.dy.abs * 0.8~ ** Processing line: ~ state.collision_on_x = true~ ** Processing line: ~ end~ @@ -223353,7 +231365,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ .first~ ** Processing line: ~~ ** Processing line: ~ return unless right_side_collisions~ -** Processing line: ~ state.x = right_side_collisions[:left_right].left - state.tile_size~ +** Processing line: ~ state.x = right_side_collisions[:left_right].left - state.tile_size - 1~ ** Processing line: ~ state.dx = state.dx.abs * 0.8 * -1~ ** Processing line: ~ state.collision_on_x = true~ ** Processing line: ~ end~ @@ -223369,7 +231381,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ .first~ ** Processing line: ~~ ** Processing line: ~ return unless ceil_collisions~ -** Processing line: ~ state.y = ceil_collisions[:bottom].y - state.tile_size~ +** Processing line: ~ state.y = ceil_collisions[:bottom].y - state.tile_size - 1~ ** Processing line: ~ state.dy = state.dy.abs * 0.8 * -1~ ** Processing line: ~ state.collision_on_y = true~ ** Processing line: ~ end~ @@ -223382,13 +231394,17 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ def export_map~ -** Processing line: ~ export_string = state.world.map do |x, y|~ -** Processing line: ~ "#{x},#{y},1"~ -** Processing line: ~ end~ +** Processing line: ~ export_string = "$collisions = [\n"~ +** Processing line: ~ export_string += state.world.map do |rect|~ +** Processing line: ~ "[#{rect.x},#{rect.y},#{rect.w},#{rect.h}],"~ +** Processing line: ~ end.join "\n"~ +** Processing line: ~ export_string += "\n]\n\n"~ +** Processing line: ~ export_string += "$mugs = [\n"~ ** Processing line: ~ export_string += state.objects.map do |x, y, w, h, path|~ -** Processing line: ~ "#{x},#{y},2,#{w},#{h},#{path}"~ -** Processing line: ~ end~ -** Processing line: ~ gtk.write_file(MAP_FILE_PATH, export_string.join("\n"))~ +** Processing line: ~ "[#{x},#{y},#{w},#{h},'#{path}'],"~ +** Processing line: ~ end.join "\n"~ +** Processing line: ~ export_string += "\n]\n\n"~ +** Processing line: ~ gtk.write_file(MAP_FILE_PATH, export_string)~ ** Processing line: ~ state.map_saved_at = state.tick_count~ ** Processing line: ~ end~ ** Processing line: ~~ @@ -224531,6 +232547,11 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ [4459, 3997, 64, 64],~ ** Processing line: ~ [76, 5215, 64, 64],~ ** Processing line: ~ [39, 5217, 64, 64],~ +** Processing line: ~ [0, 0, 10000, 40],~ +** Processing line: ~ [0, 1670, 3250, 60],~ +** Processing line: ~ [6691, 1653, 3290, 60],~ +** Processing line: ~ [1521, 3792, 7370, 60],~ +** Processing line: ~ [0, 5137, 3290, 60]~ ** Processing line: ~ ]~ ** Processing line: ~~ ** Processing line: ~ $mugs = [~ @@ -225461,6 +233482,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ def load_lines file~ +** Processing line: ~ return unless state.snaps~ ** Processing line: ~ data = gtk.read_file(file) || ""~ ** Processing line: ~ data.each_line~ ** Processing line: ~ .reject { |l| l.strip.length == 0 }~ @@ -225519,10 +233541,10 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ results[:point] = { x: x, y: y }~ ** Processing line: ~ results[:rect] = { x: x - radius, y: y - radius, w: radius * 2, h: radius * 2 }~ ** Processing line: ~ results[:trajectory] = trajectory(results)~ -** Processing line: ~ results[:impacts] = terrain.find_all { |t| line_near_rect? results[:rect], t }.map do |t|~ +** Processing line: ~ results[:impacts] = terrain.find_all { |t| t && (line_near_rect? results[:rect], t) }.map do |t|~ ** Processing line: ~ {~ ** Processing line: ~ terrain: t,~ -** Processing line: ~ point: geometry.line_intersect(results[:trajectory], t),~ +** Processing line: ~ point: geometry.line_intersect(results[:trajectory], t, replace_infinity: 1000),~ ** Processing line: ~ type: :terrain~ ** Processing line: ~ }~ ** Processing line: ~ end.reject { |t| !point_within_line? t[:point], t[:terrain] }~ @@ -225530,10 +233552,10 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ results[:impacts] += lava.find_all { |t| line_near_rect? results[:rect], t }.map do |t|~ ** Processing line: ~ {~ ** Processing line: ~ terrain: t,~ -** Processing line: ~ point: geometry.line_intersect(results[:trajectory], t),~ +** Processing line: ~ point: geometry.line_intersect(results[:trajectory], t, replace_infinity: 1000),~ ** Processing line: ~ type: :lava~ ** Processing line: ~ }~ -** Processing line: ~ end.reject { |t| !point_within_line? t[:point], t[:terrain] }~ +** Processing line: ~ end.reject { |t| !t || (!point_within_line? t[:point], t[:terrain]) }~ ** Processing line: ~~ ** Processing line: ~ results~ ** Processing line: ~ end~ @@ -225546,6 +233568,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ def calc_terrains_to_monitor~ +** Processing line: ~ return unless circle.impacts~ ** Processing line: ~ circle.impact = nil~ ** Processing line: ~ circle.impacts.each do |i|~ ** Processing line: ~ circle.terrains_to_monitor[i[:terrain]] ||= {~ @@ -231457,6 +239480,166 @@ Follows is a source code listing for all files that have been open sourced. This - PRE end detected. ** Processing line: ~~ ** Processing line: ~~ +** Processing line: ~*** Rpg Topdown - Topdown Casino - main.rb~ +- H3 detected. +- Determining if line is a header. +- Line contains ~*** ~... gsub-ing empty string +- Formatting line: ~Rpg Topdown - Topdown Casino - main.rb~ +- Line's tilde count is: 0 +- Line contains link marker: false +- Determining if line is a header. +- Line contains ~*** ~... gsub-ing empty string +- Formatting line: ~Rpg Topdown - Topdown Casino - main.rb~ +- Line's tilde count is: 0 +- Line contains link marker: false +** Processing line: ~~ +** Processing line: ~#+begin_src ruby~ +- PRE start detected. +** Processing line: ~ # ./samples/99_genre_rpg_topdown/topdown_casino/app/main.rb~ +** Processing line: ~ $gtk.reset~ +** Processing line: ~~ +** Processing line: ~ def coinflip~ +** Processing line: ~ rand < 0.5~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ class Game~ +** Processing line: ~ attr_accessor :args~ +** Processing line: ~~ +** Processing line: ~ def text_font~ +** Processing line: ~ return nil #"rpg.ttf"~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def text_color~ +** Processing line: ~ [ 255, 255, 255, 255 ]~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def set_gem_values~ +** Processing line: ~ @args.state.gem0 = ((coinflip) ? 100 : 20)~ +** Processing line: ~ @args.state.gem1 = ((coinflip) ? -10 : -50)~ +** Processing line: ~ @args.state.gem2 = ((coinflip) ? -10 : -30)~ +** Processing line: ~ if coinflip~ +** Processing line: ~ tmp = @args.state.gem0~ +** Processing line: ~ @args.state.gem0 = @args.state.gem1~ +** Processing line: ~ @args.state.gem1 = tmp~ +** Processing line: ~ end~ +** Processing line: ~ if coinflip~ +** Processing line: ~ tmp = @args.state.gem1~ +** Processing line: ~ @args.state.gem1 = @args.state.gem2~ +** Processing line: ~ @args.state.gem2 = tmp~ +** Processing line: ~ end~ +** Processing line: ~ if coinflip~ +** Processing line: ~ tmp = @args.state.gem0~ +** Processing line: ~ @args.state.gem0 = @args.state.gem2~ +** Processing line: ~ @args.state.gem2 = tmp~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def initialize args~ +** Processing line: ~ @args = args~ +** Processing line: ~ @args.state.animticks = 0~ +** Processing line: ~ @args.state.score = 0~ +** Processing line: ~ @args.state.gem_chosen = false~ +** Processing line: ~ @args.state.round_finished = false~ +** Processing line: ~ @args.state.gem0_x = 197~ +** Processing line: ~ @args.state.gem0_y = 720-274~ +** Processing line: ~ @args.state.gem1_x = 623~ +** Processing line: ~ @args.state.gem1_y = 720-274~ +** Processing line: ~ @args.state.gem2_x = 1049~ +** Processing line: ~ @args.state.gem2_y = 720-274~ +** Processing line: ~ @args.state.hero_sprite = "sprites/herodown100.png"~ +** Processing line: ~ @args.state.hero_x = 608~ +** Processing line: ~ @args.state.hero_y = 720-656~ +** Processing line: ~ set_gem_values~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def render_gem_value x, y, gem~ +** Processing line: ~ if @args.state.gem_chosen~ +** Processing line: ~ @args.outputs.labels << [ x, y + 96, gem.to_s, 1, 1, *text_color, text_font ]~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def render~ +** Processing line: ~ gemsprite = ((@args.state.animticks % 400) < 200) ? 'sprites/gem200.png' : 'sprites/gem400.png'~ +** Processing line: ~ @args.outputs.background_color = [ 0, 0, 0, 255 ]~ +** Processing line: ~ @args.outputs.sprites << [608, 720-150, 64, 64, 'sprites/oldman.png']~ +** Processing line: ~ @args.outputs.sprites << [300, 720-150, 64, 64, 'sprites/fire.png']~ +** Processing line: ~ @args.outputs.sprites << [900, 720-150, 64, 64, 'sprites/fire.png']~ +** Processing line: ~ @args.outputs.sprites << [@args.state.gem0_x, @args.state.gem0_y, 32, 64, gemsprite]~ +** Processing line: ~ @args.outputs.sprites << [@args.state.gem1_x, @args.state.gem1_y, 32, 64, gemsprite]~ +** Processing line: ~ @args.outputs.sprites << [@args.state.gem2_x, @args.state.gem2_y, 32, 64, gemsprite]~ +** Processing line: ~ @args.outputs.sprites << [@args.state.hero_x, @args.state.hero_y, 64, 64, @args.state.hero_sprite]~ +** Processing line: ~~ +** Processing line: ~ @args.outputs.labels << [ 630, 720-30, "IT'S A SECRET TO EVERYONE.", 1, 1, *text_color, text_font ]~ +** Processing line: ~ @args.outputs.labels << [ 50, 720-85, @args.state.score.to_s, 1, 1, *text_color, text_font ]~ +** Processing line: ~ render_gem_value @args.state.gem0_x, @args.state.gem0_y, @args.state.gem0~ +** Processing line: ~ render_gem_value @args.state.gem1_x, @args.state.gem1_y, @args.state.gem1~ +** Processing line: ~ render_gem_value @args.state.gem2_x, @args.state.gem2_y, @args.state.gem2~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def calc~ +** Processing line: ~ @args.state.animticks += 16~ +** Processing line: ~~ +** Processing line: ~ return unless @args.state.gem_chosen~ +** Processing line: ~ @args.state.round_finished_debounce ||= 60 * 3~ +** Processing line: ~ @args.state.round_finished_debounce -= 1~ +** Processing line: ~ return if @args.state.round_finished_debounce > 0~ +** Processing line: ~~ +** Processing line: ~ @args.state.gem_chosen = false~ +** Processing line: ~ @args.state.hero.sprite[0] = 'sprites/herodown100.png'~ +** Processing line: ~ @args.state.hero.sprite[1] = 608~ +** Processing line: ~ @args.state.hero.sprite[2] = 656~ +** Processing line: ~ @args.state.round_finished_debounce = nil~ +** Processing line: ~ set_gem_values~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def walk xdir, ydir, anim~ +** Processing line: ~ @args.state.hero_sprite = "sprites/#{anim}#{(((@args.state.animticks % 200) < 100) ? '100' : '200')}.png"~ +** Processing line: ~ @args.state.hero_x += 5 * xdir~ +** Processing line: ~ @args.state.hero_y += 5 * ydir~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def check_gem_touching gem_x, gem_y, gem~ +** Processing line: ~ return if @args.state.gem_chosen~ +** Processing line: ~ herorect = [ @args.state.hero_x, @args.state.hero_y, 64, 64 ]~ +** Processing line: ~ return if !herorect.intersect_rect?([gem_x, gem_y, 32, 64])~ +** Processing line: ~ @args.state.gem_chosen = true~ +** Processing line: ~ @args.state.score += gem~ +** Processing line: ~ @args.outputs.sounds << ((gem < 0) ? 'sounds/lose.wav' : 'sounds/win.wav')~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def input~ +** Processing line: ~ if @args.inputs.keyboard.key_held.left~ +** Processing line: ~ walk(-1.0, 0.0, 'heroleft')~ +** Processing line: ~ elsif @args.inputs.keyboard.key_held.right~ +** Processing line: ~ walk(1.0, 0.0, 'heroright')~ +** Processing line: ~ elsif @args.inputs.keyboard.key_held.up~ +** Processing line: ~ walk(0.0, 1.0, 'heroup')~ +** Processing line: ~ elsif @args.inputs.keyboard.key_held.down~ +** Processing line: ~ walk(0.0, -1.0, 'herodown')~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ check_gem_touching(@args.state.gem0_x, @args.state.gem0_y, @args.state.gem0)~ +** Processing line: ~ check_gem_touching(@args.state.gem1_x, @args.state.gem1_y, @args.state.gem1)~ +** Processing line: ~ check_gem_touching(@args.state.gem2_x, @args.state.gem2_y, @args.state.gem2)~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def tick~ +** Processing line: ~ input~ +** Processing line: ~ calc~ +** Processing line: ~ render~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def tick args~ +** Processing line: ~ args.state.game ||= Game.new args~ +** Processing line: ~ args.state.game.args = args~ +** Processing line: ~ args.state.game.tick~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~#+end_src~ +- PRE end detected. +** Processing line: ~~ +** Processing line: ~~ ** Processing line: ~*** Rpg Topdown - Topdown Starting Point - main.rb~ - H3 detected. - Determining if line is a header. @@ -231586,22 +239769,22 @@ Follows is a source code listing for all files that have been open sourced. This - PRE end detected. ** Processing line: ~~ ** Processing line: ~~ -** Processing line: ~*** Teentiny - main.rb~ +** Processing line: ~*** Teenytiny - Teenytiny Starting Point - main.rb~ - H3 detected. - Determining if line is a header. - Line contains ~*** ~... gsub-ing empty string -- Formatting line: ~Teentiny - main.rb~ +- Formatting line: ~Teenytiny - Teenytiny Starting Point - main.rb~ - Line's tilde count is: 0 - Line contains link marker: false - Determining if line is a header. - Line contains ~*** ~... gsub-ing empty string -- Formatting line: ~Teentiny - main.rb~ +- Formatting line: ~Teenytiny - Teenytiny Starting Point - main.rb~ - Line's tilde count is: 0 - Line contains link marker: false ** Processing line: ~~ ** Processing line: ~#+begin_src ruby~ - PRE start detected. -** Processing line: ~ # ./samples/99_genre_teentiny/app/main.rb~ +** Processing line: ~ # ./samples/99_genre_teenytiny/teenytiny_starting_point/app/main.rb~ ** Processing line: ~ # full documenation is at http://docs.dragonruby.org~ ** Processing line: ~ # be sure to come to the discord if you hit any snags: http://discord.dragonruby.org~ ** Processing line: ~ def tick args~ @@ -231769,22 +239952,22 @@ Follows is a source code listing for all files that have been open sourced. This - PRE end detected. ** Processing line: ~~ ** Processing line: ~~ -** Processing line: ~*** Teentiny - license.txt~ +** Processing line: ~*** Teenytiny - Teenytiny Starting Point - license.txt~ - H3 detected. - Determining if line is a header. - Line contains ~*** ~... gsub-ing empty string -- Formatting line: ~Teentiny - license.txt~ +- Formatting line: ~Teenytiny - Teenytiny Starting Point - license.txt~ - Line's tilde count is: 0 - Line contains link marker: false - Determining if line is a header. - Line contains ~*** ~... gsub-ing empty string -- Formatting line: ~Teentiny - license.txt~ +- Formatting line: ~Teenytiny - Teenytiny Starting Point - license.txt~ - Line's tilde count is: 0 - Line contains link marker: false ** Processing line: ~~ ** Processing line: ~#+begin_src ruby~ - PRE start detected. -** Processing line: ~ # ./samples/99_genre_teentiny/license.txt~ +** Processing line: ~ # ./samples/99_genre_teenytiny/teenytiny_starting_point/license.txt~ ** Processing line: ~ Copyright 2019 DragonRuby LLC~ ** Processing line: ~~ ** Processing line: ~ MIT License~ @@ -231819,6 +240002,661 @@ Follows is a source code listing for all files that have been open sourced. This - Line's tilde count is: 0 - Line contains link marker: true - LINK detected. +** Processing line: ~*** api.rb~ +- H3 detected. +- Determining if line is a header. +- Line contains ~*** ~... gsub-ing empty string +- Formatting line: ~api.rb~ +- Line's tilde count is: 0 +- Line contains link marker: false +- Determining if line is a header. +- Line contains ~*** ~... gsub-ing empty string +- Formatting line: ~api.rb~ +- Line's tilde count is: 0 +- Line contains link marker: false +** Processing line: ~~ +** Processing line: ~#+begin_src ruby~ +- PRE start detected. +** Processing line: ~ # ./dragon/api.rb~ +** Processing line: ~ # coding: utf-8~ +** Processing line: ~ # Copyright 2019 DragonRuby LLC~ +** Processing line: ~ # MIT License~ +** Processing line: ~ # api.rb has been released under MIT (*only this file*).~ +** Processing line: ~~ +** Processing line: ~ module GTK~ +** Processing line: ~ class Api~ +** Processing line: ~ def initialize~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def get_api_autocomplete args, req~ +** Processing line: ~ html = <<-S~ +** Processing line: ~ ~ +** Processing line: ~ ~ +** Processing line: ~ ~ +** Processing line: ~ DragonRuby Game Toolkit Documentation~ +** Processing line: ~ ~ +** Processing line: ~ ~ +** Processing line: ~ ~ +** Processing line: ~ ~ +** Processing line: ~
    ~ +** Processing line: ~
    index
    ~ +** Processing line: ~ ~ +** Processing line: ~
    code
    ~ +** Processing line: ~ ~ +** Processing line: ~
    ~ +** Processing line: ~ ~ +** Processing line: ~ ~ +** Processing line: ~
    ~ +** Processing line: ~
    ~
    +** Processing line: ~        
    ~ +** Processing line: ~~ +** Processing line: ~ #{links}~ +** Processing line: ~ ~ +** Processing line: ~ ~ +** Processing line: ~ S~ +** Processing line: ~~ +** Processing line: ~ req.respond 200,~ +** Processing line: ~ html,~ +** Processing line: ~ { 'Content-Type' => 'text/html' }~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def post_api_autocomplete args, req~ +** Processing line: ~ json = ($gtk.parse_json req.body)~ +** Processing line: ~ index = json["index"].to_i~ +** Processing line: ~ text = json["text"]~ +** Processing line: ~ suggestions = args.gtk.suggest_autocompletion index: index, text: text~ +** Processing line: ~ list_as_string = suggestions.join("\n")~ +** Processing line: ~ req.respond 200, list_as_string, { 'Content-Type' => 'text/plain' }~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ define_method :links do~ +** Processing line: ~ <<-S~ +** Processing line: ~
      ~ +** Processing line: ~
    • Home
    • ~ +** Processing line: ~
    • Docs
    • ~ +** Processing line: ~
    • Control Panel
    • ~ +** Processing line: ~
    • Console
    • ~ +** Processing line: ~
    • Logs
    • ~ +** Processing line: ~
    • Puts
    • ~ +** Processing line: ~
    • Code
    • ~ +** Processing line: ~
    ~ +** Processing line: ~ S~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def get_index args, req~ +** Processing line: ~ req.respond 200, <<-S, { 'Content-Type' => 'text/html' }~ +** Processing line: ~ ~ +** Processing line: ~ ~ +** Processing line: ~ ~ +** Processing line: ~ DragonRuby Game Toolkit Documentation~ +** Processing line: ~ ~ +** Processing line: ~ ~ +** Processing line: ~ #{links}~ +** Processing line: ~ ~ +** Processing line: ~ ~ +** Processing line: ~ S~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def source_code_links args~ +** Processing line: ~ links = args.gtk.reload_list_history.keys.map do |f|~ +** Processing line: ~ "
  • #{f}
  • "~ +** Processing line: ~ end~ +** Processing line: ~ <<-S~ +** Processing line: ~
      ~ +** Processing line: ~ #{links.join("\n")}~ +** Processing line: ~
    ~ +** Processing line: ~ S~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def get_api_code args, req~ +** Processing line: ~ view = <<-S~ +** Processing line: ~ ~ +** Processing line: ~ ~ +** Processing line: ~ ~ +** Processing line: ~ DragonRuby Game Toolkit Documentation~ +** Processing line: ~ ~ +** Processing line: ~ ~ +** Processing line: ~ #{source_code_links args}~ +** Processing line: ~~ +** Processing line: ~ #{links}~ +** Processing line: ~ ~ +** Processing line: ~ ~ +** Processing line: ~ S~ +** Processing line: ~ req.respond 200,~ +** Processing line: ~ view,~ +** Processing line: ~ { 'Content-Type' => 'text/html' }~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def code_edit_view args, file~ +** Processing line: ~ view = <<-S~ +** Processing line: ~ ~ +** Processing line: ~ ~ +** Processing line: ~ ~ +** Processing line: ~ DragonRuby Game Toolkit Documentation~ +** Processing line: ~ ~ +** Processing line: ~ ~ +** Processing line: ~ ~ +** Processing line: ~
    ~ +** Processing line: ~
    #{file}:
    ~ +** Processing line: ~ ~ +** Processing line: ~
    ~ +** Processing line: ~ ~ +** Processing line: ~ ~ +** Processing line: ~
    ~ +** Processing line: ~ #{source_code_links args}~ +** Processing line: ~~ +** Processing line: ~ #{links}~ +** Processing line: ~ ~ +** Processing line: ~ ~ +** Processing line: ~ S~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def get_api_code_edit args, req~ +** Processing line: ~ file = req.uri.split('?').last.gsub("file=", "")~ +** Processing line: ~ view = code_edit_view args, file~ +** Processing line: ~ req.respond 200,~ +** Processing line: ~ view,~ +** Processing line: ~ { 'Content-Type' => 'text/html' }~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def post_api_code_update args, req~ +** Processing line: ~ file = req.uri.split('?').last.gsub("file=", "")~ +** Processing line: ~ code = ($gtk.parse_json req.body)["code"]~ +** Processing line: ~ args.gtk.write_file file, code~ +** Processing line: ~ view = code_edit_view args, file~ +** Processing line: ~ req.respond 200,~ +** Processing line: ~ view,~ +** Processing line: ~ { 'Content-Type' => 'text/html' }~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def get_api_boot args, req~ +** Processing line: ~ req.respond 200,~ +** Processing line: ~ args.gtk.read_file("tmp/src_backup/boot.txt"),~ +** Processing line: ~ { 'Content-Type' => 'text/plain' }~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def get_api_trace args, req~ +** Processing line: ~ req.respond 200,~ +** Processing line: ~ args.gtk.read_file("logs/trace.txt"),~ +** Processing line: ~ { 'Content-Type' => 'text/plain' }~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def get_api_log args, req~ +** Processing line: ~ req.respond 200,~ +** Processing line: ~ args.gtk.read_file("logs/log.txt"),~ +** Processing line: ~ { 'Content-Type' => 'text/plain' }~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def post_api_log args, req~ +** Processing line: ~ Log.log req.body~ +** Processing line: ~~ +** Processing line: ~ req.respond 200,~ +** Processing line: ~ "ok",~ +** Processing line: ~ { 'Content-Type' => 'text/plain' }~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def get_api_puts args, req~ +** Processing line: ~ req.respond 200,~ +** Processing line: ~ args.gtk.read_file("logs/puts.txt"),~ +** Processing line: ~ { 'Content-Type' => 'text/plain' }~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def get_api_changes args, req~ +** Processing line: ~ req.respond 200,~ +** Processing line: ~ args.gtk.read_file("tmp/src_backup/src_backup_changes.txt"),~ +** Processing line: ~ { 'Content-Type' => 'text/plain' }~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def get_favicon_ico args, req~ +** Processing line: ~ @favicon ||= args.gtk.read_file('docs/favicon.ico')~ +** Processing line: ~ req.respond 200, @favicon, { "Content-Type" => 'image/x-icon' }~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def get_src_backup args, req~ +** Processing line: ~ file_name = req.uri.gsub("/dragon/", "")~ +** Processing line: ~ req.respond 200,~ +** Processing line: ~ args.gtk.read_file("tmp/src_backup/#{file_name}"),~ +** Processing line: ~ { 'Content-Type' => 'text/plain' }~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def get_not_found args, req~ +** Processing line: ~ puts("METHOD: #{req.method}");~ +** Processing line: ~ puts("URI: #{req.uri}");~ +** Processing line: ~ puts("HEADERS:");~ +** Processing line: ~ req.headers.each { |k,v| puts(" #{k}: #{v}") }~ +** Processing line: ~ req.respond 404, "not found: #{req.uri}", { }~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def get_docs_html args, req~ +** Processing line: ~ req.respond 200,~ +** Processing line: ~ args.gtk.read_file("docs/docs.html"),~ +** Processing line: ~ { 'Content-Type' => 'text/html' }~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def get_docs_css args, req~ +** Processing line: ~ req.respond 200,~ +** Processing line: ~ args.gtk.read_file("docs/docs.css"),~ +** Processing line: ~ { 'Content-Type' => 'text/css' }~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def get_docs_search_gif args, req~ +** Processing line: ~ req.respond 200,~ +** Processing line: ~ args.gtk.read_file("docs/docs_search.gif"),~ +** Processing line: ~ { 'Content-Type' => 'image/gif' }~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def get_src_backup_index_html args, req~ +** Processing line: ~ req.respond 200,~ +** Processing line: ~ args.gtk.read_file("/tmp/src_backup/src_backup_index.html"),~ +** Processing line: ~ { 'Content-Type' => 'text/html' }~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def get_src_backup_index_txt args, req~ +** Processing line: ~ req.respond 200,~ +** Processing line: ~ args.gtk.read_file("/tmp/src_backup/src_backup_index.txt"),~ +** Processing line: ~ { 'Content-Type' => 'text/txt' }~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def get_src_backup_css args, req~ +** Processing line: ~ req.respond 200,~ +** Processing line: ~ args.gtk.read_file("/tmp/src_backup/src_backup.css"),~ +** Processing line: ~ { 'Content-Type' => 'text/css' }~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def get_src_backup_changes_html args, req~ +** Processing line: ~ req.respond 200,~ +** Processing line: ~ args.gtk.read_file("/tmp/src_backup/src_backup_changes.html"),~ +** Processing line: ~ { 'Content-Type' => 'text/html' }~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def get_src_backup_changes_txt args, req~ +** Processing line: ~ req.respond 200,~ +** Processing line: ~ args.gtk.read_file("/tmp/src_backup/src_backup_changes.txt"),~ +** Processing line: ~ { 'Content-Type' => 'text/txt' }~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def get_api_eval args, req~ +** Processing line: ~ eval_view = <<-S~ +** Processing line: ~ ~ +** Processing line: ~ Eval~ +** Processing line: ~ ~ +** Processing line: ~ ~ +** Processing line: ~ ~ +** Processing line: ~
    ~ +** Processing line: ~ ~ +** Processing line: ~
    ~ +** Processing line: ~ ~ +** Processing line: ~
    ~ +** Processing line: ~
    curl -H "Content-Type: application/json" --data '{ "code": "$result = $args.state" }' -X POST http://localhost:9001/dragon/eval/
    ~ +** Processing line: ~
    Eval Result:
    ~ +** Processing line: ~
    ~
    +** Processing line: ~      #{links}~
    +** Processing line: ~    ~
    +** Processing line: ~  ~
    +** Processing line: ~  S~
    +** Processing line: ~        req.respond 200,~
    +** Processing line: ~                    eval_view,~
    +** Processing line: ~                    { 'Content-Type' => 'text/html' }~
    +** Processing line: ~      end~
    +** Processing line: ~~
    +** Processing line: ~      def post_api_eval args, req~
    +** Processing line: ~        if json? req~
    +** Processing line: ~          code = ($gtk.parse_json req.body)["code"]~
    +** Processing line: ~          code = code.gsub("$result", "$eval_result")~
    +** Processing line: ~          Object.new.instance_eval do~
    +** Processing line: ~            begin~
    +** Processing line: ~              Kernel.eval code~
    +** Processing line: ~            rescue Exception => e~
    +** Processing line: ~              $eval_result = e~
    +** Processing line: ~            end~
    +** Processing line: ~          end~
    +** Processing line: ~        end~
    +** Processing line: ~~
    +** Processing line: ~        req.respond 200,~
    +** Processing line: ~                    "#{$eval_result || $eval_results || "nil"}",~
    +** Processing line: ~                    { 'Content-Type' => 'text/plain' }~
    +** Processing line: ~~
    +** Processing line: ~        $eval_result  = nil~
    +** Processing line: ~        $eval_results = nil~
    +** Processing line: ~      end~
    +** Processing line: ~~
    +** Processing line: ~      def api_css_string~
    +** Processing line: ~~
    +** Processing line: ~      end~
    +** Processing line: ~~
    +** Processing line: ~      def get_api_console args, req~
    +** Processing line: ~        html = console_view "# write your code here and set $result.\n$result = $gtk.args.state"~
    +** Processing line: ~        req.respond 200,~
    +** Processing line: ~                    html,~
    +** Processing line: ~                    { 'Content-Type' => 'text/html' }~
    +** Processing line: ~      end~
    +** Processing line: ~~
    +** Processing line: ~      def control_panel_view~
    +** Processing line: ~        <<-S~
    +** Processing line: ~  ~
    +** Processing line: ~    console~
    +** Processing line: ~    ~
    +** Processing line: ~      ~
    +** Processing line: ~      
    ~ +** Processing line: ~ ~ +** Processing line: ~
    ~ +** Processing line: ~
    ~ +** Processing line: ~ ~ +** Processing line: ~
    ~ +** Processing line: ~
    ~ +** Processing line: ~ ~ +** Processing line: ~
    ~ +** Processing line: ~
    ~ +** Processing line: ~ ~ +** Processing line: ~
    ~ +** Processing line: ~
    ~ +** Processing line: ~ ~ +** Processing line: ~
    ~ +** Processing line: ~
    ~ +** Processing line: ~ #{links}~ +** Processing line: ~ ~ +** Processing line: ~ ~ +** Processing line: ~ S~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def get_api_control_panel args, req~ +** Processing line: ~ req.respond 200,~ +** Processing line: ~ control_panel_view,~ +** Processing line: ~ { 'Content-Type' => 'text/html' }~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def json? req~ +** Processing line: ~ req.headers.find { |k, v| k == "Content-Type" && (v.include? "application/json") }~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def post_api_reset args, req~ +** Processing line: ~ $gtk.reset if json? req~ +** Processing line: ~ req.respond 200,~ +** Processing line: ~ control_panel_view,~ +** Processing line: ~ { 'Content-Type' => 'text/html' }~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def post_api_record args, req~ +** Processing line: ~ $recording.start 100 if json? req~ +** Processing line: ~ req.respond 200,~ +** Processing line: ~ control_panel_view,~ +** Processing line: ~ { 'Content-Type' => 'text/html' }~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def post_api_record_stop args, req~ +** Processing line: ~ $recording.stop 'replay.txt' if json? req~ +** Processing line: ~ req.respond 200,~ +** Processing line: ~ control_panel_view,~ +** Processing line: ~ { 'Content-Type' => 'text/html' }~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def post_api_replay args, req~ +** Processing line: ~ $replay.start 'replay.txt' if json? req~ +** Processing line: ~ req.respond 200,~ +** Processing line: ~ control_panel_view,~ +** Processing line: ~ { 'Content-Type' => 'text/html' }~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def post_api_show_console args, req~ +** Processing line: ~ $gtk.console.show if json? req~ +** Processing line: ~ req.respond 200,~ +** Processing line: ~ control_panel_view,~ +** Processing line: ~ { 'Content-Type' => 'text/html' }~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def tick args~ +** Processing line: ~ args.inputs.http_requests.each do |req|~ +** Processing line: ~ match_candidate = { method: req.method.downcase.to_sym,~ +** Processing line: ~ uri: req.uri,~ +** Processing line: ~ uri_without_query_string: (req.uri.split '?').first,~ +** Processing line: ~ query_string: (req.uri.split '?').last,~ +** Processing line: ~ has_query_string: !!(req.uri.split '?').last,~ +** Processing line: ~ has_api_prefix: (req.uri.start_with? "/dragon"),~ +** Processing line: ~ end_with_rb: (req.uri.end_with? ".rb"),~ +** Processing line: ~ has_file_extension: file_extensions.find { |f| req.uri.include? f },~ +** Processing line: ~ has_trailing_slash: (req.uri.split('?').first.end_with? "/") }~ +** Processing line: ~~ +** Processing line: ~ if !match_candidate[:has_file_extension]~ +** Processing line: ~ if !match_candidate[:has_trailing_slash]~ +** Processing line: ~ match_candidate[:uri] = match_candidate[:uri_without_query_string] + "/"~ +** Processing line: ~ if match_candidate[:query_string]~ +** Processing line: ~ match_candidate[:uri] += "?#{match_candidate[:query_string]}"~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ context = { args: args, req: req, match_candidate: match_candidate }~ +** Processing line: ~~ +** Processing line: ~ process! context: context, routes: routes~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def url_decode args, string~ +** Processing line: ~ args.fn.gsub string,~ +** Processing line: ~ '+', " ",~ +** Processing line: ~ '%27', "'",~ +** Processing line: ~ '%22', '"',~ +** Processing line: ~ '%0D%0A', "\n",~ +** Processing line: ~ '%3D', "=",~ +** Processing line: ~ '%3B', ";",~ +** Processing line: ~ '%7C', "|",~ +** Processing line: ~ '%28', "(",~ +** Processing line: ~ '%29', ")",~ +** Processing line: ~ '%7B', "{",~ +** Processing line: ~ '%7D', "}",~ +** Processing line: ~ '%2C', ",",~ +** Processing line: ~ '%3A', ":",~ +** Processing line: ~ '%5B', "[",~ +** Processing line: ~ '%5D', "]",~ +** Processing line: ~ '%23', "#",~ +** Processing line: ~ '%21', "!",~ +** Processing line: ~ '%3C', "<",~ +** Processing line: ~ '%3E', ">",~ +** Processing line: ~ '%2B', "+",~ +** Processing line: ~ '%2F', "/",~ +** Processing line: ~ '%40', "@",~ +** Processing line: ~ '%3F', "?",~ +** Processing line: ~ '%26', "&",~ +** Processing line: ~ '%24', "$",~ +** Processing line: ~ '%5C', "\\",~ +** Processing line: ~ '%60', "`",~ +** Processing line: ~ '%7E', "~",~ +** Processing line: ~ '%C2%B2', "²",~ +** Processing line: ~ '%5E', "^",~ +** Processing line: ~ '%C2%BA', "º",~ +** Processing line: ~ '%C2%A7', "§",~ +** Processing line: ~ '%20', " ",~ +** Processing line: ~ '%0A', "\n",~ +** Processing line: ~ '%25', "%",~ +** Processing line: ~ '%2A', "*"~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def file_extensions~ +** Processing line: ~ [".html", ".css", ".gif", ".txt", ".ico", ".rb"]~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def routes~ +** Processing line: ~ [{ match_criteria: { method: :get, uri: "/" },~ +** Processing line: ~ handler: :get_index },~ +** Processing line: ~ { match_criteria: { method: :get, uri: "/dragon/" },~ +** Processing line: ~ handler: :get_index },~ +** Processing line: ~~ +** Processing line: ~ { match_criteria: { method: :get, uri: "/dragon/boot/" },~ +** Processing line: ~ handler: :get_api_boot },~ +** Processing line: ~ { match_criteria: { method: :get, uri: "/dragon/trace/" },~ +** Processing line: ~ handler: :get_api_trace },~ +** Processing line: ~ { match_criteria: { method: :get, uri: "/dragon/puts/" },~ +** Processing line: ~ handler: :get_api_puts },~ +** Processing line: ~ { match_criteria: { method: :get, uri: "/dragon/log/" },~ +** Processing line: ~ handler: :get_api_log },~ +** Processing line: ~ { match_criteria: { method: :post, uri: "/dragon/log/" },~ +** Processing line: ~ handler: :post_api_log },~ +** Processing line: ~ { match_criteria: { method: :get, uri: "/dragon/changes/" },~ +** Processing line: ~ handler: :get_api_changes },~ +** Processing line: ~ { match_criteria: { method: :get, uri: "/dragon/eval/" },~ +** Processing line: ~ handler: :get_api_eval },~ +** Processing line: ~ { match_criteria: { method: :post, uri: "/dragon/eval/" },~ +** Processing line: ~ handler: :post_api_eval },~ +** Processing line: ~ { match_criteria: { method: :get, uri: "/dragon/console/" },~ +** Processing line: ~ handler: :get_api_console },~ +** Processing line: ~ { match_criteria: { method: :post, uri: "/dragon/console/" },~ +** Processing line: ~ handler: :post_api_console },~ +** Processing line: ~ { match_criteria: { method: :get, uri: "/dragon/control_panel/" },~ +** Processing line: ~ handler: :get_api_control_panel },~ +** Processing line: ~ { match_criteria: { method: :post, uri: "/dragon/reset/" },~ +** Processing line: ~ handler: :post_api_reset },~ +** Processing line: ~ { match_criteria: { method: :post, uri: "/dragon/record/" },~ +** Processing line: ~ handler: :post_api_record },~ +** Processing line: ~ { match_criteria: { method: :post, uri: "/dragon/record_stop/" },~ +** Processing line: ~ handler: :post_api_record_stop },~ +** Processing line: ~ { match_criteria: { method: :post, uri: "/dragon/replay/" },~ +** Processing line: ~ handler: :post_api_replay },~ +** Processing line: ~ { match_criteria: { method: :post, uri: "/dragon/show_console/" },~ +** Processing line: ~ handler: :post_api_show_console },~ +** Processing line: ~ { match_criteria: { method: :get, uri: "/dragon/code/" },~ +** Processing line: ~ handler: :get_api_code },~ +** Processing line: ~ { match_criteria: { method: :get, uri: "/dragon/autocomplete/" },~ +** Processing line: ~ handler: :get_api_autocomplete },~ +** Processing line: ~ { match_criteria: { method: :post, uri: "/dragon/autocomplete/" },~ +** Processing line: ~ handler: :post_api_autocomplete },~ +** Processing line: ~ { match_criteria: { method: :get, uri_without_query_string: "/dragon/code/edit/", has_query_string: true },~ +** Processing line: ~ handler: :get_api_code_edit },~ +** Processing line: ~ { match_criteria: { method: :post, uri_without_query_string: "/dragon/code/update/", has_query_string: true },~ +** Processing line: ~ handler: :post_api_code_update },~ +** Processing line: ~~ +** Processing line: ~~ +** Processing line: ~ { match_criteria: { method: :get, uri: "/docs.html" },~ +** Processing line: ~ handler: :get_docs_html },~ +** Processing line: ~ { match_criteria: { method: :get, uri_without_query_string: "/docs.css" },~ +** Processing line: ~ handler: :get_docs_css },~ +** Processing line: ~ { match_criteria: { method: :get, uri: "/docs_search.gif" },~ +** Processing line: ~ handler: :get_docs_search_gif },~ +** Processing line: ~~ +** Processing line: ~ { match_criteria: { method: :get, uri: "/src_backup_index.html" },~ +** Processing line: ~ handler: :get_src_backup_index_html },~ +** Processing line: ~~ +** Processing line: ~ { match_criteria: { method: :get, uri: "/src_backup_index.txt" },~ +** Processing line: ~ handler: :get_src_backup_index_txt },~ +** Processing line: ~~ +** Processing line: ~ { match_criteria: { method: :get, uri: "/src_backup_changes.html" },~ +** Processing line: ~ handler: :get_src_backup_changes_html },~ +** Processing line: ~~ +** Processing line: ~ { match_criteria: { method: :get, uri: "/src_backup_changes.txt" },~ +** Processing line: ~ handler: :get_src_backup_changes_txt },~ +** Processing line: ~~ +** Processing line: ~ { match_criteria: { method: :get, uri: "/src_backup.css" },~ +** Processing line: ~ handler: :get_src_backup_css },~ +** Processing line: ~~ +** Processing line: ~ { match_criteria: { method: :get, uri: "/favicon.ico" },~ +** Processing line: ~ handler: :get_favicon_ico },~ +** Processing line: ~~ +** Processing line: ~ { match_criteria: { method: :get, end_with_rb: true },~ +** Processing line: ~ handler: :get_src_backup },~ +** Processing line: ~~ +** Processing line: ~ { match_criteria: { method: :get, end_with_rb: true },~ +** Processing line: ~ handler: :get_src_backup }~ +** Processing line: ~~ +** Processing line: ~ ]~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def process! opts~ +** Processing line: ~ routes = opts[:routes]~ +** Processing line: ~ context = opts[:context]~ +** Processing line: ~ routes.each do |route|~ +** Processing line: ~ match_found = (process_single! route: route, context: context)~ +** Processing line: ~ return if match_found~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def process_single! opts~ +** Processing line: ~ match_criteria = opts[:route][:match_criteria]~ +** Processing line: ~ m = opts[:route][:handler]~ +** Processing line: ~ args = opts[:context][:args]~ +** Processing line: ~ req = opts[:context][:req]~ +** Processing line: ~ match_candidate = opts[:context][:match_candidate]~ +** Processing line: ~ match_criteria.each do |k, v|~ +** Processing line: ~ return false if match_candidate[k] != v~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ begin~ +** Processing line: ~ send m, args, req~ +** Processing line: ~ rescue Exception => e~ +** Processing line: ~ req.respond 200,~ +** Processing line: ~ "#{e}\n#{e.__backtrace_to_org__}",~ +** Processing line: ~ { 'Content-Type' => 'text/plain' }~ +** Processing line: ~ end~ +** Processing line: ~ return true~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~#+end_src~ +- PRE end detected. +** Processing line: ~~ +** Processing line: ~~ ** Processing line: ~*** args.rb~ - H3 detected. - Determining if line is a header. @@ -231847,6 +240685,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ class Args~ ** Processing line: ~ include ArgsDeprecated~ ** Processing line: ~ include Serialize~ +** Processing line: ~ attr_accessor :cvars~ ** Processing line: ~ attr_accessor :inputs~ ** Processing line: ~ attr_accessor :outputs~ ** Processing line: ~ attr_accessor :audio~ @@ -231867,6 +240706,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ def initialize runtime, recording~ ** Processing line: ~ @inputs = Inputs.new~ ** Processing line: ~ @outputs = Outputs.new args: self~ +** Processing line: ~ @cvars = {}~ ** Processing line: ~ @audio = {}~ ** Processing line: ~ @passes = []~ ** Processing line: ~ @state = OpenEntity.new~ @@ -232409,14 +241249,17 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ class Console~ ** Processing line: ~ include ConsoleDeprecated~ ** Processing line: ~~ -** Processing line: ~ attr_accessor :show_reason, :log, :logo, :background_color,~ -** Processing line: ~ :text_color, :animation_duration,~ +** Processing line: ~ attr_accessor :show_reason, :log, :logo,~ +** Processing line: ~ :animation_duration,~ ** Processing line: ~ :max_log_lines, :max_history, :log,~ -** Processing line: ~ :last_command_errored, :last_command, :error_color, :shown_at,~ -** Processing line: ~ :header_color, :archived_log, :last_log_lines, :last_log_lines_count,~ +** Processing line: ~ :last_command_errored, :last_command, :shown_at,~ +** Processing line: ~ :archived_log, :last_log_lines, :last_log_lines_count,~ ** Processing line: ~ :suppress_left_arrow_behavior, :command_set_at,~ ** Processing line: ~ :toast_ids, :bottom,~ -** Processing line: ~ :font_style, :menu~ +** Processing line: ~ :font_style, :menu,~ +** Processing line: ~ :background_color, :spam_color, :text_color, :warn_color,~ +** Processing line: ~ :error_color, :header_color, :code_color, :comment_color,~ +** Processing line: ~ :debug_color, :unfiltered_color~ ** Processing line: ~~ ** Processing line: ~ def initialize~ ** Processing line: ~ @font_style = FontStyle.new(font: 'font.ttf', size_enum: -1.5, line_height: 1.1)~ @@ -232434,15 +241277,22 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ @command_history_index = -1~ ** Processing line: ~ @nonhistory_input = ''~ ** Processing line: ~ @logo = 'console-logo.png'~ -** Processing line: ~ @history_fname = 'console_history.txt'~ +** Processing line: ~ @history_fname = 'logs/console_history.txt'~ ** Processing line: ~ @background_color = Color.new [0, 0, 0, 224]~ -** Processing line: ~ @text_color = Color.new [255, 255, 255]~ -** Processing line: ~ @error_color = Color.new [200, 50, 50]~ ** Processing line: ~ @header_color = Color.new [100, 200, 220]~ ** Processing line: ~ @code_color = Color.new [210, 168, 255]~ -** Processing line: ~ @comment_color = Color.new [0, 200, 100]~ +** Processing line: ~ @comment_color = Color.new [0, 200, 100]~ ** Processing line: ~ @animation_duration = 1.seconds~ ** Processing line: ~ @shown_at = -1~ +** Processing line: ~~ +** Processing line: ~ # these are the colors for text at various log levels.~ +** Processing line: ~ @spam_color = Color.new [160, 160, 160]~ +** Processing line: ~ @debug_color = Color.new [0, 255, 0]~ +** Processing line: ~ @text_color = Color.new [255, 255, 255]~ +** Processing line: ~ @warn_color = Color.new [255, 255, 0]~ +** Processing line: ~ @error_color = Color.new [200, 50, 50]~ +** Processing line: ~ @unfiltered_color = Color.new [0, 255, 255]~ +** Processing line: ~~ ** Processing line: ~ load_history~ ** Processing line: ~ end~ ** Processing line: ~~ @@ -232508,7 +241358,13 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ nil~ ** Processing line: ~ end~ ** Processing line: ~~ -** Processing line: ~ def add_text obj~ +** Processing line: ~ def add_text obj, loglevel=-1~ +** Processing line: ~ # loglevel is one of the values of LogLevel in logging.h, or -1 to say "we don't care, colorize it with your special string parsing magic"~ +** Processing line: ~ loglevel = -1 if loglevel < 0~ +** Processing line: ~ loglevel = 5 if loglevel > 5 # 5 == unfiltered (it's 0x7FFFFFFE in C, clamp it down)~ +** Processing line: ~ loglevel = 2 if (loglevel == -1) && obj.start_with?('!c!') # oh well~ +** Processing line: ~ colorstr = (loglevel != -1) ? "!c!#{loglevel}" : nil~ +** Processing line: ~~ ** Processing line: ~ @last_log_lines_count ||= 1~ ** Processing line: ~ @log_invocation_count += 1~ ** Processing line: ~~ @@ -232517,12 +241373,18 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ log_lines = []~ ** Processing line: ~~ ** Processing line: ~ str.each_line do |s|~ -** Processing line: ~ s.wrapped_lines(self.console_text_width).each do |l|~ -** Processing line: ~ log_lines << l~ +** Processing line: ~ if colorstr.nil?~ +** Processing line: ~ s.wrapped_lines(self.console_text_width).each do |l|~ +** Processing line: ~ log_lines << l~ +** Processing line: ~ end~ +** Processing line: ~ else~ +** Processing line: ~ s.wrapped_lines(self.console_text_width).each do |l|~ +** Processing line: ~ log_lines << "#{colorstr}#{l}"~ +** Processing line: ~ end~ ** Processing line: ~ end~ ** Processing line: ~ end~ ** Processing line: ~~ -** Processing line: ~ if log_lines == @last_log_lines~ +** Processing line: ~ if log_lines == @last_log_lines && log_lines.length != 0~ ** Processing line: ~ @last_log_lines_count += 1~ ** Processing line: ~ new_log_line_with_count = @last_log_lines.last + " (#{@last_log_lines_count})"~ ** Processing line: ~ if log_lines.length > 1~ @@ -232797,10 +241659,12 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ def mouse_wheel_scroll args~ ** Processing line: ~ @inertia ||= 0~ ** Processing line: ~~ -** Processing line: ~ if args.inputs.mouse.wheel && args.inputs.mouse.wheel.y > 0~ -** Processing line: ~ @inertia = 1~ -** Processing line: ~ elsif args.inputs.mouse.wheel && args.inputs.mouse.wheel.y < 0~ -** Processing line: ~ @inertia = -1~ +** Processing line: ~ if args.inputs.mouse.wheel~ +** Processing line: ~ if args.inputs.mouse.wheel.y > 0~ +** Processing line: ~ @inertia = 1~ +** Processing line: ~ elsif args.inputs.mouse.wheel.y < 0~ +** Processing line: ~ @inertia = -1~ +** Processing line: ~ end~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ if args.inputs.mouse.click~ @@ -232809,13 +241673,11 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~~ ** Processing line: ~ return if @inertia == 0~ ** Processing line: ~~ -** Processing line: ~ if @inertia != 0~ -** Processing line: ~ @inertia = (@inertia * 0.7)~ -** Processing line: ~ if @inertia > 0~ -** Processing line: ~ @log_offset -= 1~ -** Processing line: ~ elsif @inertia < 0~ -** Processing line: ~ @log_offset += 1~ -** Processing line: ~ end~ +** Processing line: ~ @inertia = (@inertia * 0.7)~ +** Processing line: ~ if @inertia > 0~ +** Processing line: ~ @log_offset += 1~ +** Processing line: ~ elsif @inertia < 0~ +** Processing line: ~ @log_offset -= 1~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ if @inertia.abs < 0.01~ @@ -232931,7 +241793,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ def write_line(args, left, y, str, archived: false)~ ** Processing line: ~ color = color_for_log_entry(str)~ ** Processing line: ~ color = color.mult_alpha(0.5) if archived~ -** Processing line: ~~ +** Processing line: ~ str = str[4..-1] if str.start_with?('!c!') # chop off loglevel color~ ** Processing line: ~ args.outputs.reserved << font_style.label(x: left.shift_right(10), y: y, text: str, color: color)~ ** Processing line: ~ end~ ** Processing line: ~~ @@ -233167,7 +242029,9 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ return false~ ** Processing line: ~ end~ ** Processing line: ~~ -** Processing line: ~ def color_for_log_entry(log_entry)~ +** Processing line: ~ def color_for_plain_text log_entry~ +** Processing line: ~ log_entry = log_entry[4..-1] if log_entry.start_with? "!c!"~ +** Processing line: ~~ ** Processing line: ~ if code? log_entry~ ** Processing line: ~ @code_color~ ** Processing line: ~ elsif code_comment? log_entry~ @@ -233187,6 +242051,29 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ end~ ** Processing line: ~ end~ ** Processing line: ~~ +** Processing line: ~ def color_for_log_entry(log_entry)~ +** Processing line: ~ if log_entry.start_with?('!c!') # loglevel color specified.~ +** Processing line: ~ return case log_entry[3..3].to_i~ +** Processing line: ~ when 0 # spam~ +** Processing line: ~ @spam_color~ +** Processing line: ~ when 1 # debug~ +** Processing line: ~ @debug_color~ +** Processing line: ~ #when 2 # info (caught by the `else` block.)~ +** Processing line: ~ # @text_color~ +** Processing line: ~ when 3 # warn~ +** Processing line: ~ @warn_color~ +** Processing line: ~ when 4 # error~ +** Processing line: ~ @error_color~ +** Processing line: ~ when 5 # unfiltered~ +** Processing line: ~ @unfiltered_color~ +** Processing line: ~ else~ +** Processing line: ~ color_for_plain_text log_entry~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ return color_for_plain_text log_entry~ +** Processing line: ~ end~ +** Processing line: ~~ ** Processing line: ~ def prompt~ ** Processing line: ~ @prompt ||= Prompt.new(font_style: font_style, text_color: @text_color, console_text_width: console_text_width)~ ** Processing line: ~ end~ @@ -233698,11 +242585,11 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~~ ** Processing line: ~ # partition the original list of items into a string to be printed~ ** Processing line: ~ items.each_slice(columns).each_with_index do |cells, i|~ -** Processing line: ~ pretty_print_row_seperator string_width, cell_width, column_width, columns~ +** Processing line: ~ pretty_print_row_separator string_width, cell_width, column_width, columns~ ** Processing line: ~ pretty_print_row cells, string_width, cell_width, column_width, columns~ ** Processing line: ~ end~ ** Processing line: ~~ -** Processing line: ~ pretty_print_row_seperator string_width, cell_width, column_width, columns~ +** Processing line: ~ pretty_print_row_separator string_width, cell_width, column_width, columns~ ** Processing line: ~ end~ ** Processing line: ~ end~ ** Processing line: ~~ @@ -234614,8 +243501,8 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ ease_extended start_tick,~ ** Processing line: ~ current_tick,~ ** Processing line: ~ start_tick + duration,~ -** Processing line: ~ (initial_value *definitions),~ -** Processing line: ~ (final_value *definitions),~ +** Processing line: ~ initial_value(*definitions),~ +** Processing line: ~ final_value(*definitions),~ ** Processing line: ~ *definitions~ ** Processing line: ~ end~ ** Processing line: ~~ @@ -234840,8 +243727,8 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ module GTK~ ** Processing line: ~ module Geometry~ ** Processing line: ~ def self.rotate_point point, angle, around = nil~ -** Processing line: ~ s = Math.sin a.to_radians~ -** Processing line: ~ c = Math.cos a.to_radians~ +** Processing line: ~ s = Math.sin angle.to_radians~ +** Processing line: ~ c = Math.cos angle.to_radians~ ** Processing line: ~ px = point.x~ ** Processing line: ~ py = point.y~ ** Processing line: ~ cx = 0~ @@ -235022,8 +243909,16 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ # @gtk~ -** Processing line: ~ def self.line_y_intercept line~ -** Processing line: ~ line.y - line_slope(line) * line.x~ +** Processing line: ~ def self.line_y_intercept line, replace_infinity: nil~ +** Processing line: ~ line.y - line_slope(line, replace_infinity: replace_infinity) * line.x~ +** Processing line: ~ rescue Exception => e~ +** Processing line: ~ raise <<-S~ +** Processing line: ~ * ERROR: ~Geometry::line_y_intercept~~ +** Processing line: ~ The following exception was thrown for line: #{line}~ +** Processing line: ~ #{e}~ +** Processing line: ~~ +** Processing line: ~ Consider passing in ~replace_infinity: VALUE~ to handle for vertical lines.~ +** Processing line: ~ S~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ # @gtk~ @@ -235099,14 +243994,22 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ # @gtk~ -** Processing line: ~ def self.line_intersect line_one, line_two~ -** Processing line: ~ m1 = line_slope(line_one)~ -** Processing line: ~ m2 = line_slope(line_two)~ -** Processing line: ~ b1 = line_y_intercept(line_one)~ -** Processing line: ~ b2 = line_y_intercept(line_two)~ +** Processing line: ~ def self.line_intersect line_one, line_two, replace_infinity: nil~ +** Processing line: ~ m1 = line_slope(line_one, replace_infinity: replace_infinity)~ +** Processing line: ~ m2 = line_slope(line_two, replace_infinity: replace_infinity)~ +** Processing line: ~ b1 = line_y_intercept(line_one, replace_infinity: replace_infinity)~ +** Processing line: ~ b2 = line_y_intercept(line_two, replace_infinity: replace_infinity)~ ** Processing line: ~ x = (b1 - b2) / (m2 - m1)~ ** Processing line: ~ y = (-b2.fdiv(m2) + b1.fdiv(m1)).fdiv(1.fdiv(m1) - 1.fdiv(m2))~ ** Processing line: ~ [x, y]~ +** Processing line: ~ rescue Exception => e~ +** Processing line: ~ raise <<-S~ +** Processing line: ~ * ERROR: ~Geometry::line_intersect~~ +** Processing line: ~ The following exception was thrown for line_one: #{line_one}, line_two: #{line_two}~ +** Processing line: ~ #{e}~ +** Processing line: ~~ +** Processing line: ~ Consider passing in ~replace_infinity: VALUE~ to handle for vertical lines.~ +** Processing line: ~ S~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ def self.contract_intersect_rect?~ @@ -235821,7 +244724,8 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ value = Kernel.tick_count if value~ ** Processing line: ~~ ** Processing line: ~ collection.each do |m|~ -** Processing line: ~ self.instance_variable_set("@#{m.to_s}".to_sym, value)~ +** Processing line: ~ m_to_s = m.to_s~ +** Processing line: ~ self.instance_variable_set("@#{m_to_s}".to_sym, value) if m_to_s.strip.length > 0~ ** Processing line: ~ rescue Exception => e~ ** Processing line: ~ raise e, <<-S~ ** Processing line: ~ * ERROR:~ @@ -236380,6 +245284,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ :check_for_dev_profile,~ ** Processing line: ~~ ** Processing line: ~ *app_metadata_retrieval_steps,~ +** Processing line: ~ :determine_devcert,~ ** Processing line: ~~ ** Processing line: ~ :clear_tmp_directory,~ ** Processing line: ~ :stage_app,~ @@ -236408,6 +245313,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ :determine_app_version,~ ** Processing line: ~~ ** Processing line: ~ *app_metadata_retrieval_steps,~ +** Processing line: ~ :determine_prodcert,~ ** Processing line: ~~ ** Processing line: ~ :clear_tmp_directory,~ ** Processing line: ~ :stage_app,~ @@ -236602,6 +245508,10 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ appid=~ ** Processing line: ~ # appname is the name you want to show up underneath the app icon on the device. Keep it under 10 characters.~ ** Processing line: ~ appname=~ +** Processing line: ~ # devcert is the certificate to use for development/deploying to your local device~ +** Processing line: ~ devcert=~ +** Processing line: ~ # prodcert is the certificate to use for distribution to the app store~ +** Processing line: ~ prodcert=~ ** Processing line: ~ S~ ** Processing line: ~ end~ ** Processing line: ~~ @@ -236637,7 +245547,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ def raise_ios_metadata_required~ ** Processing line: ~ raise WizardException.new(~ ** Processing line: ~ "* mygame/metadata/ios_metadata.txt needs to be filled out.",~ -** Processing line: ~ "You need to update metadata/ios_metadata.txt with a valid teamid, appname, and appid.",~ +** Processing line: ~ "You need to update metadata/ios_metadata.txt with a valid teamid, appname, appid, devcert, and prodcert.",~ ** Processing line: ~ "Instructions for where the values should come from are within metadata/ios_metadata.txt."~ ** Processing line: ~ )~ ** Processing line: ~ end~ @@ -236677,7 +245587,19 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ def determine_app_id~ ** Processing line: ~ @app_id = ios_metadata.appid~ ** Processing line: ~ raise_ios_metadata_required if @app_id.strip.length == 0~ -** Processing line: ~ log_info "App Identifier is set to : #{@app_id}"~ +** Processing line: ~ log_info "App Identifier is set to: #{@app_id}"~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def determine_devcert~ +** Processing line: ~ @certificate_name = ios_metadata.devcert~ +** Processing line: ~ raise_ios_metadata_required if @certificate_name.strip.length == 0~ +** Processing line: ~ log_info "Dev Certificate is set to: #{@certificate_name}"~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def determine_prodcert~ +** Processing line: ~ @certificate_name = ios_metadata.prodcert~ +** Processing line: ~ raise_ios_metadata_required if @certificate_name.strip.length == 0~ +** Processing line: ~ log_info "Production (Distribution) Certificate is set to: #{@certificate_name}"~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ def set_app_name name~ @@ -236699,12 +245621,6 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ sh "rm -rf #{tmp_directory}"~ ** Processing line: ~ end~ ** Processing line: ~~ -** Processing line: ~ def stage_app~ -** Processing line: ~ log_info "Staging."~ -** Processing line: ~ sh "mkdir -p #{tmp_directory}"~ -** Processing line: ~ sh "cp -R #{relative_path}/dragonruby-ios.app \"#{tmp_directory}/#{@app_name}.app\""~ -** Processing line: ~ end~ -** Processing line: ~~ ** Processing line: ~ def set_app_id id~ ** Processing line: ~ log_info = "App Id set to: #{id}"~ ** Processing line: ~ @app_id = id~ @@ -236735,34 +245651,13 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ def check_for_certs~ ** Processing line: ~ log_info "Attempting to find certificates on your computer."~ ** Processing line: ~~ -** Processing line: ~ if !cli_app_exist?(security_cli_app)~ -** Processing line: ~ raise WizardException.new(~ -** Processing line: ~ "* It doesn't look like you have #{security_cli_app}.",~ -** Processing line: ~ "** 1. Open Disk Utility and run First Aid.",~ -** Processing line: ~ { w: 700, h: 148, path: get_reserved_sprite("disk-utility.png") },~ -** Processing line: ~ )~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ if valid_certs.length == 0~ -** Processing line: ~ raise WizardException.new(~ -** Processing line: ~ "* It doesn't look like you have any valid certs installed.",~ -** Processing line: ~ "** 1. Open Xcode.",~ -** Processing line: ~ "** 2. Log into your developer account. Xcode -> Preferences -> Accounts.",~ -** Processing line: ~ { w: 700, h: 98, path: get_reserved_sprite("login-xcode.png") },~ -** Processing line: ~ "** 3. After loggin in, select Manage Certificates...",~ -** Processing line: ~ { w: 700, h: 115, path: get_reserved_sprite("manage-certificates.png") },~ -** Processing line: ~ "** 4. Add a certificate for Apple Development.",~ -** Processing line: ~ { w: 700, h: 217, path: get_reserved_sprite("add-cert.png") },~ -** Processing line: ~ )~ -** Processing line: ~ raise "You do not have any Apple development certs on this computer."~ -** Processing line: ~ end~ -** Processing line: ~~ ** Processing line: ~ if @production_build~ -** Processing line: ~ @certificate_name = valid_certs.find_all { |f| f[:name].include? "Distribution" }.first[:name]~ +** Processing line: ~ @certificate_name = ios_metadata[:prodcert]~ ** Processing line: ~ else~ -** Processing line: ~ @certificate_name = valid_certs.find_all { |f| f[:name].include? "Development" }.first[:name]~ +** Processing line: ~ @certificate_name = ios_metadata[:devcert]~ ** Processing line: ~ end~ -** Processing line: ~ log_info "I will be using Certificate: '#{@certificate_name}'."~ +** Processing line: ~~ +** Processing line: ~ log_info "I will be using certificate: '#{@certificate_name}'."~ ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ def idevice_id_cli_app~ @@ -236777,24 +245672,6 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ "xcodebuild"~ ** Processing line: ~ end~ ** Processing line: ~~ -** Processing line: ~ def valid_certs~ -** Processing line: ~ certs = sh("#{security_cli_app} -q find-identity -p codesigning -v").each_line.map do |l|~ -** Processing line: ~ if l.include?(")") && !l.include?("Developer ID") && (l.include?("Development") || l.include?("Distribution"))~ -** Processing line: ~ l.strip~ -** Processing line: ~ else~ -** Processing line: ~ nil~ -** Processing line: ~ end~ -** Processing line: ~ end.reject_nil.map do |l|~ -** Processing line: ~ number, id, name = l.split(' ', 3)~ -** Processing line: ~ name = name.gsub("\"", "") if name~ -** Processing line: ~ {~ -** Processing line: ~ number: 1,~ -** Processing line: ~ id: id,~ -** Processing line: ~ name: name~ -** Processing line: ~ }~ -** Processing line: ~ end~ -** Processing line: ~ end~ -** Processing line: ~~ ** Processing line: ~ def connected_devices~ ** Processing line: ~ sh("idevice_id -l").strip.each_line.map do |l|~ ** Processing line: ~ l.strip~ @@ -237324,6 +246201,9 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ end~ ** Processing line: ~~ ** Processing line: ~ def stage_app~ +** Processing line: ~ log_info "Staging."~ +** Processing line: ~ sh "mkdir -p #{tmp_directory}"~ +** Processing line: ~ sh "cp -R #{relative_path}/dragonruby-ios.app \"#{tmp_directory}/#{@app_name}.app\""~ ** Processing line: ~ sh %Q[cp -r "#{root_folder}/app/" "#{app_path}/app/"]~ ** Processing line: ~ sh %Q[cp -r "#{root_folder}/sounds/" "#{app_path}/sounds/"]~ ** Processing line: ~ sh %Q[cp -r "#{root_folder}/sprites/" "#{app_path}/sprites/"]~ @@ -239236,26 +248116,6 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ (0..self).to_a~ ** Processing line: ~ end~ ** Processing line: ~~ -** Processing line: ~ def >= other~ -** Processing line: ~ return false if !other~ -** Processing line: ~ return gte other~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ def > other~ -** Processing line: ~ return false if !other~ -** Processing line: ~ return gt other~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ def <= other~ -** Processing line: ~ return false if !other~ -** Processing line: ~ return lte other~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ def < other~ -** Processing line: ~ return false if !other~ -** Processing line: ~ return gt other~ -** Processing line: ~ end~ -** Processing line: ~~ ** Processing line: ~ # @gtk~ ** Processing line: ~ def map~ ** Processing line: ~ unless block_given?~ @@ -239341,34 +248201,6 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ S~ ** Processing line: ~ end~ ** Processing line: ~~ -** Processing line: ~ def - other~ -** Processing line: ~ return self unless other~ -** Processing line: ~ self - other~ -** Processing line: ~ rescue Exception => e~ -** Processing line: ~ __raise_arithmetic_exception__ other, :-, e~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ def + other~ -** Processing line: ~ return self unless other~ -** Processing line: ~ self + other~ -** Processing line: ~ rescue Exception => e~ -** Processing line: ~ __raise_arithmetic_exception__ other, :+, e~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ def * other~ -** Processing line: ~ return self unless other~ -** Processing line: ~ self * other~ -** Processing line: ~ rescue Exception => e~ -** Processing line: ~ __raise_arithmetic_exception__ other, :*, e~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ def / other~ -** Processing line: ~ return self unless other~ -** Processing line: ~ self / other~ -** Processing line: ~ rescue Exception => e~ -** Processing line: ~ __raise_arithmetic_exception__ other, :/, e~ -** Processing line: ~ end~ -** Processing line: ~~ ** Processing line: ~ def serialize~ ** Processing line: ~ self~ ** Processing line: ~ end~ @@ -239423,34 +248255,6 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ return !even?~ ** Processing line: ~ end~ ** Processing line: ~~ -** Processing line: ~ def + other~ -** Processing line: ~ return self unless other~ -** Processing line: ~ self + other~ -** Processing line: ~ rescue Exception => e~ -** Processing line: ~ __raise_arithmetic_exception__ other, :+, e~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ def * other~ -** Processing line: ~ return self unless other~ -** Processing line: ~ self * other~ -** Processing line: ~ rescue Exception => e~ -** Processing line: ~ __raise_arithmetic_exception__ other, :*, e~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ def / other~ -** Processing line: ~ return self unless other~ -** Processing line: ~ self / other~ -** Processing line: ~ rescue Exception => e~ -** Processing line: ~ __raise_arithmetic_exception__ other, :/, e~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ def - other~ -** Processing line: ~ return self unless other~ -** Processing line: ~ self - other~ -** Processing line: ~ rescue Exception => e~ -** Processing line: ~ __raise_arithmetic_exception__ other, :-, e~ -** Processing line: ~ end~ -** Processing line: ~~ ** Processing line: ~ # Returns `-1` if the number is less than `0`. `+1` if the number~ ** Processing line: ~ # is greater than `0`. Returns `0` if the number is equal to `0`.~ ** Processing line: ~ #~ @@ -239506,34 +248310,6 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ alias_method :__original_multiply__, :* unless Float.instance_methods.include? :__original_multiply__~ ** Processing line: ~ alias_method :__original_divide__, :- unless Float.instance_methods.include? :__original_divide__~ ** Processing line: ~~ -** Processing line: ~ def - other~ -** Processing line: ~ return self unless other~ -** Processing line: ~ super~ -** Processing line: ~ rescue Exception => e~ -** Processing line: ~ __raise_arithmetic_exception__ other, :-, e~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ def + other~ -** Processing line: ~ return self unless other~ -** Processing line: ~ super~ -** Processing line: ~ rescue Exception => e~ -** Processing line: ~ __raise_arithmetic_exception__ other, :+, e~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ def * other~ -** Processing line: ~ return self unless other~ -** Processing line: ~ super~ -** Processing line: ~ rescue Exception => e~ -** Processing line: ~ __raise_arithmetic_exception__ other, :*, e~ -** Processing line: ~ end~ -** Processing line: ~~ -** Processing line: ~ def / other~ -** Processing line: ~ return self unless other~ -** Processing line: ~ super~ -** Processing line: ~ rescue Exception => e~ -** Processing line: ~ __raise_arithmetic_exception__ other, :/, e~ -** Processing line: ~ end~ -** Processing line: ~~ ** Processing line: ~ def serialize~ ** Processing line: ~ self~ ** Processing line: ~ end~ @@ -239585,6 +248361,287 @@ Follows is a source code listing for all files that have been open sourced. This - PRE end detected. ** Processing line: ~~ ** Processing line: ~~ +** Processing line: ~*** recording.rb~ +- H3 detected. +- Determining if line is a header. +- Line contains ~*** ~... gsub-ing empty string +- Formatting line: ~recording.rb~ +- Line's tilde count is: 0 +- Line contains link marker: false +- Determining if line is a header. +- Line contains ~*** ~... gsub-ing empty string +- Formatting line: ~recording.rb~ +- Line's tilde count is: 0 +- Line contains link marker: false +** Processing line: ~~ +** Processing line: ~#+begin_src ruby~ +- PRE start detected. +** Processing line: ~ # ./dragon/recording.rb~ +** Processing line: ~ # coding: utf-8~ +** Processing line: ~ # Copyright 2019 DragonRuby LLC~ +** Processing line: ~ # MIT License~ +** Processing line: ~ # recording.rb has been released under MIT (*only this file*).~ +** Processing line: ~~ +** Processing line: ~ module GTK~ +** Processing line: ~ # FIXME: Gross~ +** Processing line: ~ # @gtk~ +** Processing line: ~ class Replay~ +** Processing line: ~ # @gtk~ +** Processing line: ~ def self.start file_name = nil~ +** Processing line: ~ $recording.start_replay file_name~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ # @gtk~ +** Processing line: ~ def self.stop~ +** Processing line: ~ $recording.stop_replay~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ # @gtk~ +** Processing line: ~ class Recording~ +** Processing line: ~ def initialize runtime~ +** Processing line: ~ @runtime = runtime~ +** Processing line: ~ @tick_count = 0~ +** Processing line: ~ @global_input_order = 1~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def tick~ +** Processing line: ~ @tick_count += 1~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def start_recording seed_number = nil~ +** Processing line: ~ if !seed_number~ +** Processing line: ~ log <<-S~ +** Processing line: ~ * ERROR:~ +** Processing line: ~ To start recording, you must provide an integer value to~ +** Processing line: ~ seed random number generation.~ +** Processing line: ~ S~ +** Processing line: ~ $console.set_command "$recording.start SEED_NUMBER"~ +** Processing line: ~ return~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ if @is_recording~ +** Processing line: ~ log <<-S~ +** Processing line: ~ * ERROR:~ +** Processing line: ~ You are already recording, first cancel (or stop) the current recording.~ +** Processing line: ~ S~ +** Processing line: ~ $console.set_command "$recording.cancel"~ +** Processing line: ~ return~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ if @is_replaying~ +** Processing line: ~ log <<-S~ +** Processing line: ~ * ERROR:~ +** Processing line: ~ You are currently replaying a recording, first stop the replay.~ +** Processing line: ~ S~ +** Processing line: ~ return~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ log_info <<-S~ +** Processing line: ~ Recording has begun with RNG seed value set to #{seed_number}.~ +** Processing line: ~ To stop recording use stop_recording(filename).~ +** Processing line: ~ The recording will stop without saving a file if a filename is nil.~ +** Processing line: ~ S~ +** Processing line: ~~ +** Processing line: ~ $console.set_command "$recording.stop 'replay.txt'"~ +** Processing line: ~ @runtime.__reset__~ +** Processing line: ~ @seed_number = seed_number~ +** Processing line: ~ @runtime.set_rng seed_number~ +** Processing line: ~~ +** Processing line: ~ @tick_count = 0~ +** Processing line: ~ @global_input_order = 1~ +** Processing line: ~ @is_recording = true~ +** Processing line: ~ @input_history = []~ +** Processing line: ~ @runtime.notify! "Recording started. When completed, open the console to save it using $recording.stop FILE_NAME (or cancel).", 300~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ # @gtk~ +** Processing line: ~ def start seed_number = nil~ +** Processing line: ~ start_recording seed_number~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def is_replaying?~ +** Processing line: ~ @is_replaying~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def is_recording?~ +** Processing line: ~ @is_recording~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ # @gtk~ +** Processing line: ~ def stop file_name = nil~ +** Processing line: ~ stop_recording file_name~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ # @gtk~ +** Processing line: ~ def cancel~ +** Processing line: ~ stop_recording_core~ +** Processing line: ~ @runtime.notify! "Recording cancelled."~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def stop_recording file_name = nil~ +** Processing line: ~ if !file_name~ +** Processing line: ~ log <<-S~ +** Processing line: ~ * ERROR:~ +** Processing line: ~ To please specify a file name when calling:~ +** Processing line: ~ $recording.stop FILE_NAME~ +** Processing line: ~~ +** Processing line: ~ If you do NOT want to save the recording, call:~ +** Processing line: ~ $recording.cancel~ +** Processing line: ~ S~ +** Processing line: ~ $console.set_command "$recording.stop 'replay.txt'"~ +** Processing line: ~ return~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ if !@is_recording~ +** Processing line: ~ log_info "You are not currently recording. Use start_recording(seed_number) to start recording."~ +** Processing line: ~ $console.set_command "$recording.start"~ +** Processing line: ~ return~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ if file_name~ +** Processing line: ~ text = "replay_version 2.0\n"~ +** Processing line: ~ text << "stopped_at #{@tick_count}\n"~ +** Processing line: ~ text << "seed #{@seed_number}\n"~ +** Processing line: ~ text << "recorded_at #{Time.now.to_s}\n"~ +** Processing line: ~ @input_history.each do |items|~ +** Processing line: ~ text << "#{items}\n"~ +** Processing line: ~ end~ +** Processing line: ~ @runtime.write_file file_name, text~ +** Processing line: ~ @runtime.write_file 'last_replay.txt', text~ +** Processing line: ~ log_info "The recording has been saved successfully at #{file_name}. You can use start_replay(\"#{file_name}\") to replay the recording."~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ $console.set_command "$replay.start '#{file_name}'"~ +** Processing line: ~ stop_recording_core~ +** Processing line: ~ @runtime.notify! "Recording saved to #{file_name}. To replay it: $replay.start \"#{file_name}\"."~ +** Processing line: ~ log_info "You can run the replay later on startup using: ./dragonruby mygame --replay #{@replay_file_name}"~ +** Processing line: ~ nil~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def stop_recording_core~ +** Processing line: ~ @is_recording = false~ +** Processing line: ~ @input_history = nil~ +** Processing line: ~ @last_history = nil~ +** Processing line: ~ @runtime.__reset__~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def start_replay file_name = nil~ +** Processing line: ~ if !file_name~ +** Processing line: ~ log <<-S~ +** Processing line: ~ * ERROR:~ +** Processing line: ~ Please provide a file name to $recording.start.~ +** Processing line: ~ S~ +** Processing line: ~ $console.set_command "$replay.start 'replay.txt'"~ +** Processing line: ~ return~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ text = @runtime.read_file file_name~ +** Processing line: ~ return false unless text~ +** Processing line: ~~ +** Processing line: ~ if text.each_line.first.strip != "replay_version 2.0"~ +** Processing line: ~ raise "The replay file #{file_name} is not compatible with this version of DragonRuby Game Toolkit. Please recreate the replay (sorry)."~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ @replay_file_name = file_name~ +** Processing line: ~~ +** Processing line: ~ $replay_data = { input_history: { } }~ +** Processing line: ~ text.each_line do |l|~ +** Processing line: ~ if l.strip.length == 0~ +** Processing line: ~ next~ +** Processing line: ~ elsif l.start_with? 'replay_version'~ +** Processing line: ~ next~ +** Processing line: ~ elsif l.start_with? 'seed'~ +** Processing line: ~ $replay_data[:seed] = l.split(' ').last.to_i~ +** Processing line: ~ elsif l.start_with? 'stopped_at'~ +** Processing line: ~ $replay_data[:stopped_at] = l.split(' ').last.to_i~ +** Processing line: ~ elsif l.start_with? 'recorded_at'~ +** Processing line: ~ $replay_data[:recorded_at] = l.split(' ')[1..-1].join(' ')~ +** Processing line: ~ elsif l.start_with? '['~ +** Processing line: ~ name, value_1, value_2, value_count, id, tick_count = l.strip.gsub('[', '').gsub(']', '').split(',')~ +** Processing line: ~ $replay_data[:input_history][tick_count.to_i] ||= []~ +** Processing line: ~ $replay_data[:input_history][tick_count.to_i] << {~ +** Processing line: ~ id: id.to_i,~ +** Processing line: ~ name: name.gsub(':', '').to_sym,~ +** Processing line: ~ value_1: value_1.to_f,~ +** Processing line: ~ value_2: value_2.to_f,~ +** Processing line: ~ value_count: value_count.to_i~ +** Processing line: ~ }~ +** Processing line: ~ else~ +** Processing line: ~ raise "Replay data seems corrupt. I don't know how to parse #{l}."~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ $replay_data[:input_history].keys.each do |key|~ +** Processing line: ~ $replay_data[:input_history][key] = $replay_data[:input_history][key].sort_by {|input| input[:id]}~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ @runtime.__reset__~ +** Processing line: ~ @runtime.set_rng $replay_data[:seed]~ +** Processing line: ~ @tick_count = 0~ +** Processing line: ~ @is_replaying = true~ +** Processing line: ~ log_info "Replay has been started."~ +** Processing line: ~ @runtime.notify! "Replay started [#{@replay_file_name}]."~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def stop_replay notification_message = "Replay has been stopped."~ +** Processing line: ~ if !is_replaying?~ +** Processing line: ~ log <<-S~ +** Processing line: ~ * ERROR:~ +** Processing line: ~ No replay is currently running. Call $replay.start FILE_NAME to start a replay.~ +** Processing line: ~ S~ +** Processing line: ~~ +** Processing line: ~ $console.set_command "$replay.start 'replay.txt'"~ +** Processing line: ~ return~ +** Processing line: ~ end~ +** Processing line: ~ log_info notification_message~ +** Processing line: ~ @is_replaying = false~ +** Processing line: ~ $replay_data = nil~ +** Processing line: ~ @tick_count = 0~ +** Processing line: ~ @global_input_order = 1~ +** Processing line: ~ $console.set_command_silent "$replay.start '#{@replay_file_name}'"~ +** Processing line: ~ @runtime.__reset__~ +** Processing line: ~ @runtime.notify! notification_message~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def record_input_history name, value_1, value_2, value_count, clear_cache = false~ +** Processing line: ~ return if @is_replaying~ +** Processing line: ~ return unless @is_recording~ +** Processing line: ~ @input_history << [name, value_1, value_2, value_count, @global_input_order, @tick_count]~ +** Processing line: ~ @global_input_order += 1~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ def stage_replay_values~ +** Processing line: ~ return unless @is_replaying~ +** Processing line: ~ return unless $replay_data~ +** Processing line: ~~ +** Processing line: ~ if $replay_data[:stopped_at] <= @tick_count~ +** Processing line: ~ stop_replay "Replay completed [#{@replay_file_name}]. To rerun, bring up the Console and press enter."~ +** Processing line: ~ return~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ inputs_this_tick = $replay_data[:input_history][@tick_count]~ +** Processing line: ~~ +** Processing line: ~ if @tick_count.zmod? 60~ +** Processing line: ~ log_info "Replay ends in #{($replay_data[:stopped_at] - @tick_count).idiv 60} second(s)."~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~ return unless inputs_this_tick~ +** Processing line: ~ inputs_this_tick.each do |v|~ +** Processing line: ~ args = []~ +** Processing line: ~ args << v[:value_1] if v[:value_count] >= 1~ +** Processing line: ~ args << v[:value_2] if v[:value_count] >= 2~ +** Processing line: ~ args << :replay~ +** Processing line: ~ $gtk.send v[:name], *args~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~ end~ +** Processing line: ~~ +** Processing line: ~#+end_src~ +- PRE end detected. +** Processing line: ~~ +** Processing line: ~~ ** Processing line: ~*** remote_hotload_client.rb~ - H3 detected. - Determining if line is a header. @@ -239999,14 +249056,13 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ log <<-S~ ** Processing line: ~ ** Invoking :#{name}...~ ** Processing line: ~ S~ -** Processing line: ~ time_start = Time.now~ ** Processing line: ~ idx = 0~ ** Processing line: ~ r = nil~ +** Processing line: ~ time_start = Time.now~ ** Processing line: ~ while idx < iterations~ ** Processing line: ~ r = proc.call~ ** Processing line: ~ idx += 1~ ** Processing line: ~ end~ -** Processing line: ~~ ** Processing line: ~ result = (Time.now - time_start).round 3~ ** Processing line: ~~ ** Processing line: ~ { name: name,~ @@ -240146,7 +249202,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ fn.each_send pass.borders, self, :draw_border~ ** Processing line: ~ fn.each_send pass.static_borders, self, :draw_border~ ** Processing line: ~~ -** Processing line: ~ if !$gtk.production~ +** Processing line: ~ if !self.production~ ** Processing line: ~ fn.each_send pass.debug, self, :draw_primitive~ ** Processing line: ~ fn.each_send pass.static_debug, self, :draw_primitive~ ** Processing line: ~ end~ @@ -240163,6 +249219,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ if s.respond_to? :draw_override~ ** Processing line: ~ s.draw_override @ffi_draw~ ** Processing line: ~ else~ +** Processing line: ~ s = s.as_hash if s.is_a? OpenEntity~ ** Processing line: ~ @ffi_draw.draw_solid_2 s.x, s.y, s.w, s.h,~ ** Processing line: ~ s.r, s.g, s.b, s.a,~ ** Processing line: ~ (s.blendmode_enum || 1)~ @@ -240176,6 +249233,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ if s.respond_to? :draw_override~ ** Processing line: ~ s.draw_override @ffi_draw~ ** Processing line: ~ else~ +** Processing line: ~ s = s.as_hash if s.is_a? OpenEntity~ ** Processing line: ~ @ffi_draw.draw_sprite_4 s.x, s.y, s.w, s.h,~ ** Processing line: ~ (s.path || '').to_s,~ ** Processing line: ~ s.angle,~ @@ -240195,6 +249253,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ if s.respond_to? :draw_override~ ** Processing line: ~ s.draw_override @ffi_draw~ ** Processing line: ~ else~ +** Processing line: ~ s = s.as_hash if s.is_a? OpenEntity~ ** Processing line: ~ @ffi_draw.draw_screenshot (s.path || '').to_s,~ ** Processing line: ~ s.x, s.y, s.w, s.h,~ ** Processing line: ~ s.angle,~ @@ -240213,6 +249272,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ if l.respond_to? :draw_override~ ** Processing line: ~ l.draw_override @ffi_draw~ ** Processing line: ~ else~ +** Processing line: ~ l = l.as_hash if l.is_a? OpenEntity~ ** Processing line: ~ @ffi_draw.draw_label_3 l.x, l.y,~ ** Processing line: ~ (l.text || '').to_s,~ ** Processing line: ~ l.size_enum, l.alignment_enum,~ @@ -240230,6 +249290,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ if l.respond_to? :draw_override~ ** Processing line: ~ l.draw_override @ffi_draw~ ** Processing line: ~ else~ +** Processing line: ~ l = l.as_hash if l.is_a? OpenEntity~ ** Processing line: ~ if l.x2~ ** Processing line: ~ @ffi_draw.draw_line_2 l.x, l.y, l.x2, l.y2,~ ** Processing line: ~ l.r, l.g, l.b, l.a,~ @@ -240255,6 +249316,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ if s.respond_to? :draw_override~ ** Processing line: ~ s.draw_override @ffi_draw~ ** Processing line: ~ else~ +** Processing line: ~ s = s.as_hash if s.is_a? OpenEntity~ ** Processing line: ~ @ffi_draw.draw_border_2 s.x, s.y, s.w, s.h,~ ** Processing line: ~ s.r, s.g, s.b, s.a,~ ** Processing line: ~ (s.blendmode_enum || 1)~ @@ -240337,7 +249399,7 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ if @tick_speed_count > 60 * 2~ ** Processing line: ~ if framerate_below_threshold?~ ** Processing line: ~ @last_framerate = current_framerate~ -** Processing line: ~ if !@console.visible?~ +** Processing line: ~ if !@console.visible? && !@recording.is_replaying?~ ** Processing line: ~ log framerate_warning_message~ ** Processing line: ~ end~ ** Processing line: ~ end~ @@ -241335,9 +250397,9 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~~ ** Processing line: ~ def $top_level.slds! *os~ ** Processing line: ~ if (os.first.is_a? Numeric)~ -** Processing line: ~ sld! *os~ +** Processing line: ~ sld!(*os)~ ** Processing line: ~ else~ -** Processing line: ~ os.each { |o| sld! *o }~ +** Processing line: ~ os.each { |o| sld!(*o) }~ ** Processing line: ~ end~ ** Processing line: ~ end~ ** Processing line: ~~ @@ -241385,6 +250447,31 @@ Follows is a source code listing for all files that have been open sourced. This ** Processing line: ~ end~ ** Processing line: ~ end~ ** Processing line: ~~ +** Processing line: ~ =begin~ +** Processing line: ~ wht = [255] * 3~ +** Processing line: ~ red = [255, 0, 0]~ +** Processing line: ~ blu = [0, 130, 255]~ +** Processing line: ~ purp = [150, 80, 255]~ +** Processing line: ~~ +** Processing line: ~ TICK {~ +** Processing line: ~ bg! 0~ +** Processing line: ~~ +** Processing line: ~ slds << [0, 0, 3, 3, 0, 255, 0, 255]~ +** Processing line: ~~ +** Processing line: ~ sld! 10, 10~ +** Processing line: ~ sld! 20, 20, 3, 2~ +** Processing line: ~ sld! 30, 30, 2, 2, red~ +** Processing line: ~ sld! 35, 35, blu~ +** Processing line: ~~ +** Processing line: ~ slds! 40, 40~ +** Processing line: ~~ +** Processing line: ~ slds! [50, 50],~ +** Processing line: ~ [60, 60, purp],~ +** Processing line: ~ [70, 70, 10, 10, wht],~ +** Processing line: ~ [80, 80, 4, 4, 255, 0, 255]~ +** Processing line: ~ }~ +** Processing line: ~ =end~ +** Processing line: ~~ ** Processing line: ~#+end_src~ - PRE end detected. ** Processing line: ~~ diff --git a/docs/todo/05-sprites.md b/docs/todo/05-sprites.md index e2be250..e8030ab 100644 --- a/docs/todo/05-sprites.md +++ b/docs/todo/05-sprites.md @@ -179,14 +179,26 @@ args.outputs.sprites << { ## Duck Typing (Advanced) -You can also create a class with sprite properties and render it as a primitive, -using the `attr_sprite` helper. +You can also create a class with sprite properties and render it as a primitive. +ALL properties must on the class. ADDITIONALLY, a method called `primitive_marker` +must be defined on the class. Here is an example: ```ruby -class PlayerSprite - attr_sprite +# Create type with ALL sprite properties AND primitive_marker +class Sprite + attr_accessor :x, :y, :w, :h, :path, :angle, :a, :r, :g, :b, :source_x, + :source_y, :source_w, :source_h, :flip_horizontally, + :flip_vertically, :angle_anchor_x, :angle_anchor_y + + def primitive_marker + :sprite + end +end + +# Inherit from type +class PlayerSprite < Sprite # constructor def initialize x, y, w, h diff --git a/dragon/args.rb b/dragon/args.rb index 5bb0ccf..d13d867 100644 --- a/dragon/args.rb +++ b/dragon/args.rb @@ -10,6 +10,7 @@ module GTK class Args include ArgsDeprecated include Serialize + attr_accessor :cvars attr_accessor :inputs attr_accessor :outputs attr_accessor :audio @@ -30,6 +31,7 @@ module GTK def initialize runtime, recording @inputs = Inputs.new @outputs = Outputs.new args: self + @cvars = {} @audio = {} @passes = [] @state = OpenEntity.new diff --git a/dragon/benchmark.rb b/dragon/benchmark.rb index d7e8945..38ea991 100644 --- a/dragon/benchmark.rb +++ b/dragon/benchmark.rb @@ -10,14 +10,13 @@ module GTK log <<-S ** Invoking :#{name}... S - time_start = Time.now idx = 0 r = nil + time_start = Time.now while idx < iterations r = proc.call idx += 1 end - result = (Time.now - time_start).round 3 { name: name, diff --git a/dragon/console.rb b/dragon/console.rb index 34183ae..6d9733d 100644 --- a/dragon/console.rb +++ b/dragon/console.rb @@ -10,14 +10,17 @@ module GTK class Console include ConsoleDeprecated - attr_accessor :show_reason, :log, :logo, :background_color, - :text_color, :animation_duration, + attr_accessor :show_reason, :log, :logo, + :animation_duration, :max_log_lines, :max_history, :log, - :last_command_errored, :last_command, :error_color, :shown_at, - :header_color, :archived_log, :last_log_lines, :last_log_lines_count, + :last_command_errored, :last_command, :shown_at, + :archived_log, :last_log_lines, :last_log_lines_count, :suppress_left_arrow_behavior, :command_set_at, :toast_ids, :bottom, - :font_style, :menu + :font_style, :menu, + :background_color, :spam_color, :text_color, :warn_color, + :error_color, :header_color, :code_color, :comment_color, + :debug_color, :unfiltered_color def initialize @font_style = FontStyle.new(font: 'font.ttf', size_enum: -1.5, line_height: 1.1) @@ -35,15 +38,22 @@ module GTK @command_history_index = -1 @nonhistory_input = '' @logo = 'console-logo.png' - @history_fname = 'console_history.txt' + @history_fname = 'logs/console_history.txt' @background_color = Color.new [0, 0, 0, 224] - @text_color = Color.new [255, 255, 255] - @error_color = Color.new [200, 50, 50] @header_color = Color.new [100, 200, 220] @code_color = Color.new [210, 168, 255] - @comment_color = Color.new [0, 200, 100] + @comment_color = Color.new [0, 200, 100] @animation_duration = 1.seconds @shown_at = -1 + + # these are the colors for text at various log levels. + @spam_color = Color.new [160, 160, 160] + @debug_color = Color.new [0, 255, 0] + @text_color = Color.new [255, 255, 255] + @warn_color = Color.new [255, 255, 0] + @error_color = Color.new [200, 50, 50] + @unfiltered_color = Color.new [0, 255, 255] + load_history end @@ -109,7 +119,13 @@ module GTK nil end - def add_text obj + def add_text obj, loglevel=-1 + # loglevel is one of the values of LogLevel in logging.h, or -1 to say "we don't care, colorize it with your special string parsing magic" + loglevel = -1 if loglevel < 0 + loglevel = 5 if loglevel > 5 # 5 == unfiltered (it's 0x7FFFFFFE in C, clamp it down) + loglevel = 2 if (loglevel == -1) && obj.start_with?('!c!') # oh well + colorstr = (loglevel != -1) ? "!c!#{loglevel}" : nil + @last_log_lines_count ||= 1 @log_invocation_count += 1 @@ -118,12 +134,18 @@ module GTK log_lines = [] str.each_line do |s| - s.wrapped_lines(self.console_text_width).each do |l| - log_lines << l + if colorstr.nil? + s.wrapped_lines(self.console_text_width).each do |l| + log_lines << l + end + else + s.wrapped_lines(self.console_text_width).each do |l| + log_lines << "#{colorstr}#{l}" + end end end - if log_lines == @last_log_lines + if log_lines == @last_log_lines && log_lines.length != 0 @last_log_lines_count += 1 new_log_line_with_count = @last_log_lines.last + " (#{@last_log_lines_count})" if log_lines.length > 1 @@ -398,10 +420,12 @@ S def mouse_wheel_scroll args @inertia ||= 0 - if args.inputs.mouse.wheel && args.inputs.mouse.wheel.y > 0 - @inertia = 1 - elsif args.inputs.mouse.wheel && args.inputs.mouse.wheel.y < 0 - @inertia = -1 + if args.inputs.mouse.wheel + if args.inputs.mouse.wheel.y > 0 + @inertia = 1 + elsif args.inputs.mouse.wheel.y < 0 + @inertia = -1 + end end if args.inputs.mouse.click @@ -410,13 +434,11 @@ S return if @inertia == 0 - if @inertia != 0 - @inertia = (@inertia * 0.7) - if @inertia > 0 - @log_offset -= 1 - elsif @inertia < 0 - @log_offset += 1 - end + @inertia = (@inertia * 0.7) + if @inertia > 0 + @log_offset += 1 + elsif @inertia < 0 + @log_offset -= 1 end if @inertia.abs < 0.01 @@ -532,7 +554,7 @@ S def write_line(args, left, y, str, archived: false) color = color_for_log_entry(str) color = color.mult_alpha(0.5) if archived - + str = str[4..-1] if str.start_with?('!c!') # chop off loglevel color args.outputs.reserved << font_style.label(x: left.shift_right(10), y: y, text: str, color: color) end @@ -768,7 +790,9 @@ S return false end - def color_for_log_entry(log_entry) + def color_for_plain_text log_entry + log_entry = log_entry[4..-1] if log_entry.start_with? "!c!" + if code? log_entry @code_color elsif code_comment? log_entry @@ -788,6 +812,29 @@ S end end + def color_for_log_entry(log_entry) + if log_entry.start_with?('!c!') # loglevel color specified. + return case log_entry[3..3].to_i + when 0 # spam + @spam_color + when 1 # debug + @debug_color + #when 2 # info (caught by the `else` block.) + # @text_color + when 3 # warn + @warn_color + when 4 # error + @error_color + when 5 # unfiltered + @unfiltered_color + else + color_for_plain_text log_entry + end + end + + return color_for_plain_text log_entry + end + def prompt @prompt ||= Prompt.new(font_style: font_style, text_color: @text_color, console_text_width: console_text_width) end diff --git a/dragon/docs.rb b/dragon/docs.rb index cd39483..17a6e9a 100644 --- a/dragon/docs.rb +++ b/dragon/docs.rb @@ -260,7 +260,7 @@ S -
    +
    S html_toc_end_to_content_start = <<-S
    diff --git a/dragon/draw.rb b/dragon/draw.rb index 7136994..2963315 100644 --- a/dragon/draw.rb +++ b/dragon/draw.rb @@ -24,7 +24,7 @@ module GTK fn.each_send pass.borders, self, :draw_border fn.each_send pass.static_borders, self, :draw_border - if !$gtk.production + if !self.production fn.each_send pass.debug, self, :draw_primitive fn.each_send pass.static_debug, self, :draw_primitive end @@ -41,6 +41,7 @@ module GTK if s.respond_to? :draw_override s.draw_override @ffi_draw else + s = s.as_hash if s.is_a? OpenEntity @ffi_draw.draw_solid_2 s.x, s.y, s.w, s.h, s.r, s.g, s.b, s.a, (s.blendmode_enum || 1) @@ -54,6 +55,7 @@ module GTK if s.respond_to? :draw_override s.draw_override @ffi_draw else + s = s.as_hash if s.is_a? OpenEntity @ffi_draw.draw_sprite_4 s.x, s.y, s.w, s.h, (s.path || '').to_s, s.angle, @@ -73,6 +75,7 @@ module GTK if s.respond_to? :draw_override s.draw_override @ffi_draw else + s = s.as_hash if s.is_a? OpenEntity @ffi_draw.draw_screenshot (s.path || '').to_s, s.x, s.y, s.w, s.h, s.angle, @@ -91,6 +94,7 @@ module GTK if l.respond_to? :draw_override l.draw_override @ffi_draw else + l = l.as_hash if l.is_a? OpenEntity @ffi_draw.draw_label_3 l.x, l.y, (l.text || '').to_s, l.size_enum, l.alignment_enum, @@ -108,6 +112,7 @@ module GTK if l.respond_to? :draw_override l.draw_override @ffi_draw else + l = l.as_hash if l.is_a? OpenEntity if l.x2 @ffi_draw.draw_line_2 l.x, l.y, l.x2, l.y2, l.r, l.g, l.b, l.a, @@ -133,6 +138,7 @@ module GTK if s.respond_to? :draw_override s.draw_override @ffi_draw else + s = s.as_hash if s.is_a? OpenEntity @ffi_draw.draw_border_2 s.x, s.y, s.w, s.h, s.r, s.g, s.b, s.a, (s.blendmode_enum || 1) diff --git a/dragon/easing.rb b/dragon/easing.rb index ef8ca0c..8b41fa6 100644 --- a/dragon/easing.rb +++ b/dragon/easing.rb @@ -9,8 +9,8 @@ module GTK ease_extended start_tick, current_tick, start_tick + duration, - (initial_value *definitions), - (final_value *definitions), + initial_value(*definitions), + final_value(*definitions), *definitions end diff --git a/dragon/framerate.rb b/dragon/framerate.rb index ff2f1c5..478b340 100644 --- a/dragon/framerate.rb +++ b/dragon/framerate.rb @@ -34,7 +34,7 @@ module GTK if @tick_speed_count > 60 * 2 if framerate_below_threshold? @last_framerate = current_framerate - if !@console.visible? + if !@console.visible? && !@recording.is_replaying? log framerate_warning_message end end diff --git a/dragon/geometry.rb b/dragon/geometry.rb index 6bceea8..d7c8ffc 100644 --- a/dragon/geometry.rb +++ b/dragon/geometry.rb @@ -6,8 +6,8 @@ module GTK module Geometry def self.rotate_point point, angle, around = nil - s = Math.sin a.to_radians - c = Math.cos a.to_radians + s = Math.sin angle.to_radians + c = Math.cos angle.to_radians px = point.x py = point.y cx = 0 @@ -188,8 +188,16 @@ S end # @gtk - def self.line_y_intercept line - line.y - line_slope(line) * line.x + def self.line_y_intercept line, replace_infinity: nil + line.y - line_slope(line, replace_infinity: replace_infinity) * line.x + rescue Exception => e +raise <<-S +* ERROR: ~Geometry::line_y_intercept~ +The following exception was thrown for line: #{line} +#{e} + +Consider passing in ~replace_infinity: VALUE~ to handle for vertical lines. +S end # @gtk @@ -265,14 +273,22 @@ S end # @gtk - def self.line_intersect line_one, line_two - m1 = line_slope(line_one) - m2 = line_slope(line_two) - b1 = line_y_intercept(line_one) - b2 = line_y_intercept(line_two) + def self.line_intersect line_one, line_two, replace_infinity: nil + m1 = line_slope(line_one, replace_infinity: replace_infinity) + m2 = line_slope(line_two, replace_infinity: replace_infinity) + b1 = line_y_intercept(line_one, replace_infinity: replace_infinity) + b2 = line_y_intercept(line_two, replace_infinity: replace_infinity) x = (b1 - b2) / (m2 - m1) y = (-b2.fdiv(m2) + b1.fdiv(m1)).fdiv(1.fdiv(m1) - 1.fdiv(m2)) [x, y] + rescue Exception => e +raise <<-S +* ERROR: ~Geometry::line_intersect~ +The following exception was thrown for line_one: #{line_one}, line_two: #{line_two} +#{e} + +Consider passing in ~replace_infinity: VALUE~ to handle for vertical lines. +S end def self.contract_intersect_rect? diff --git a/dragon/inputs.rb b/dragon/inputs.rb index 163fc16..8be97f9 100644 --- a/dragon/inputs.rb +++ b/dragon/inputs.rb @@ -313,7 +313,8 @@ module GTK value = Kernel.tick_count if value collection.each do |m| - self.instance_variable_set("@#{m.to_s}".to_sym, value) + m_to_s = m.to_s + self.instance_variable_set("@#{m_to_s}".to_sym, value) if m_to_s.strip.length > 0 rescue Exception => e raise e, <<-S * ERROR: diff --git a/dragon/ios_wizard.rb b/dragon/ios_wizard.rb index a64cdc9..c040dea 100644 --- a/dragon/ios_wizard.rb +++ b/dragon/ios_wizard.rb @@ -42,6 +42,7 @@ class IOSWizard < Wizard :check_for_dev_profile, *app_metadata_retrieval_steps, + :determine_devcert, :clear_tmp_directory, :stage_app, @@ -70,6 +71,7 @@ class IOSWizard < Wizard :determine_app_version, *app_metadata_retrieval_steps, + :determine_prodcert, :clear_tmp_directory, :stage_app, @@ -264,6 +266,10 @@ teamid= appid= # appname is the name you want to show up underneath the app icon on the device. Keep it under 10 characters. appname= +# devcert is the certificate to use for development/deploying to your local device +devcert= +# prodcert is the certificate to use for distribution to the app store +prodcert= S end @@ -299,7 +305,7 @@ S def raise_ios_metadata_required raise WizardException.new( "* mygame/metadata/ios_metadata.txt needs to be filled out.", - "You need to update metadata/ios_metadata.txt with a valid teamid, appname, and appid.", + "You need to update metadata/ios_metadata.txt with a valid teamid, appname, appid, devcert, and prodcert.", "Instructions for where the values should come from are within metadata/ios_metadata.txt." ) end @@ -339,7 +345,19 @@ S def determine_app_id @app_id = ios_metadata.appid raise_ios_metadata_required if @app_id.strip.length == 0 - log_info "App Identifier is set to : #{@app_id}" + log_info "App Identifier is set to: #{@app_id}" + end + + def determine_devcert + @certificate_name = ios_metadata.devcert + raise_ios_metadata_required if @certificate_name.strip.length == 0 + log_info "Dev Certificate is set to: #{@certificate_name}" + end + + def determine_prodcert + @certificate_name = ios_metadata.prodcert + raise_ios_metadata_required if @certificate_name.strip.length == 0 + log_info "Production (Distribution) Certificate is set to: #{@certificate_name}" end def set_app_name name @@ -361,12 +379,6 @@ S sh "rm -rf #{tmp_directory}" end - def stage_app - log_info "Staging." - sh "mkdir -p #{tmp_directory}" - sh "cp -R #{relative_path}/dragonruby-ios.app \"#{tmp_directory}/#{@app_name}.app\"" - end - def set_app_id id log_info = "App Id set to: #{id}" @app_id = id @@ -397,34 +409,13 @@ S def check_for_certs log_info "Attempting to find certificates on your computer." - if !cli_app_exist?(security_cli_app) - raise WizardException.new( - "* It doesn't look like you have #{security_cli_app}.", - "** 1. Open Disk Utility and run First Aid.", - { w: 700, h: 148, path: get_reserved_sprite("disk-utility.png") }, - ) - end - - if valid_certs.length == 0 - raise WizardException.new( - "* It doesn't look like you have any valid certs installed.", - "** 1. Open Xcode.", - "** 2. Log into your developer account. Xcode -> Preferences -> Accounts.", - { w: 700, h: 98, path: get_reserved_sprite("login-xcode.png") }, - "** 3. After loggin in, select Manage Certificates...", - { w: 700, h: 115, path: get_reserved_sprite("manage-certificates.png") }, - "** 4. Add a certificate for Apple Development.", - { w: 700, h: 217, path: get_reserved_sprite("add-cert.png") }, - ) - raise "You do not have any Apple development certs on this computer." - end - if @production_build - @certificate_name = valid_certs.find_all { |f| f[:name].include? "Distribution" }.first[:name] + @certificate_name = ios_metadata[:prodcert] else - @certificate_name = valid_certs.find_all { |f| f[:name].include? "Development" }.first[:name] + @certificate_name = ios_metadata[:devcert] end - log_info "I will be using Certificate: '#{@certificate_name}'." + + log_info "I will be using certificate: '#{@certificate_name}'." end def idevice_id_cli_app @@ -439,24 +430,6 @@ S "xcodebuild" end - def valid_certs - certs = sh("#{security_cli_app} -q find-identity -p codesigning -v").each_line.map do |l| - if l.include?(")") && !l.include?("Developer ID") && (l.include?("Development") || l.include?("Distribution")) - l.strip - else - nil - end - end.reject_nil.map do |l| - number, id, name = l.split(' ', 3) - name = name.gsub("\"", "") if name - { - number: 1, - id: id, - name: name - } - end - end - def connected_devices sh("idevice_id -l").strip.each_line.map do |l| l.strip @@ -986,6 +959,9 @@ XML end def stage_app + log_info "Staging." + sh "mkdir -p #{tmp_directory}" + sh "cp -R #{relative_path}/dragonruby-ios.app \"#{tmp_directory}/#{@app_name}.app\"" sh %Q[cp -r "#{root_folder}/app/" "#{app_path}/app/"] sh %Q[cp -r "#{root_folder}/sounds/" "#{app_path}/sounds/"] sh %Q[cp -r "#{root_folder}/sprites/" "#{app_path}/sprites/"] diff --git a/dragon/numeric.rb b/dragon/numeric.rb index 27cf02e..52ddf61 100644 --- a/dragon/numeric.rb +++ b/dragon/numeric.rb @@ -472,26 +472,6 @@ S (0..self).to_a end - def >= other - return false if !other - return gte other - end - - def > other - return false if !other - return gt other - end - - def <= other - return false if !other - return lte other - end - - def < other - return false if !other - return gt other - end - # @gtk def map unless block_given? @@ -577,34 +557,6 @@ The object above is not a Numeric. S end - def - other - return self unless other - self - other - rescue Exception => e - __raise_arithmetic_exception__ other, :-, e - end - - def + other - return self unless other - self + other - rescue Exception => e - __raise_arithmetic_exception__ other, :+, e - end - - def * other - return self unless other - self * other - rescue Exception => e - __raise_arithmetic_exception__ other, :*, e - end - - def / other - return self unless other - self / other - rescue Exception => e - __raise_arithmetic_exception__ other, :/, e - end - def serialize self end @@ -659,34 +611,6 @@ class Fixnum return !even? end - def + other - return self unless other - self + other - rescue Exception => e - __raise_arithmetic_exception__ other, :+, e - end - - def * other - return self unless other - self * other - rescue Exception => e - __raise_arithmetic_exception__ other, :*, e - end - - def / other - return self unless other - self / other - rescue Exception => e - __raise_arithmetic_exception__ other, :/, e - end - - def - other - return self unless other - self - other - rescue Exception => e - __raise_arithmetic_exception__ other, :-, e - end - # Returns `-1` if the number is less than `0`. `+1` if the number # is greater than `0`. Returns `0` if the number is equal to `0`. # @@ -742,34 +666,6 @@ class Float alias_method :__original_multiply__, :* unless Float.instance_methods.include? :__original_multiply__ alias_method :__original_divide__, :- unless Float.instance_methods.include? :__original_divide__ - def - other - return self unless other - super - rescue Exception => e - __raise_arithmetic_exception__ other, :-, e - end - - def + other - return self unless other - super - rescue Exception => e - __raise_arithmetic_exception__ other, :+, e - end - - def * other - return self unless other - super - rescue Exception => e - __raise_arithmetic_exception__ other, :*, e - end - - def / other - return self unless other - super - rescue Exception => e - __raise_arithmetic_exception__ other, :/, e - end - def serialize self end diff --git a/dragon/outputs_docs.rb b/dragon/outputs_docs.rb index 776d850..db15989 100644 --- a/dragon/outputs_docs.rb +++ b/dragon/outputs_docs.rb @@ -206,21 +206,27 @@ be provided in any order. end #+end_src -** Rendering a sprite using a Class +** Rendering a solid using a Class -You can also create a class with sprite properties and render it as a primitive. +You can also create a class with solid/border properties and render it as a primitive. +ALL properties must be on the class. *Additionally*, a method called ~primitive_marker~ +must be defined on the class. Here is an example: #+begin_src - # Create type with ALL sprite properties + # Create type with ALL sprite properties AND primitive_marker class Sprite - attr_sprite + attr_accessor :x, :y, :w, :h, :path, :angle, :angle_anchor_x, :angle_anchor_y, :tile_x, :tile_y, :tile_w, :tile_h, :source_x, :source_y, :source_w, :source_h, :flip_horizontally, :flip_vertically, :a, :r, :g, :b + + def primitive_marker + :sprite + end end # Inherit from type class Circle < Sprite - # constructor + # constructor def initialize x, y, size, path self.x = x self.y = y diff --git a/dragon/runtime_docs.rb b/dragon/runtime_docs.rb index 6da72d0..1f4a509 100644 --- a/dragon/runtime_docs.rb +++ b/dragon/runtime_docs.rb @@ -12,7 +12,8 @@ module RuntimeDocs :docs_api_summary, :docs_reset, :docs_calcstringbox, - :docs_write_file + :docs_write_file, + :docs_benchmark ] end @@ -485,6 +486,8 @@ Invalids the texture cache of a sprite. Shows the mouse cursor. *** ~.hide_cursor~ Hides the mouse cursor. +*** ~.set_cursor path, dx, dy~ +Sets the system cursor to a sprite ~path~ with an offset of ~dx~ and ~dy~. *** ~.cursor_shown?~ Returns ~true~ if the mouse cursor is shown. *** ~.set_window_fullscreen enabled~ @@ -538,6 +541,39 @@ is currently in the file. Use ~GTK::Runtime#append_file~ to append to the file a #+end_src S end + + def docs_benchmark +<<-S +* DOCS: ~GTK::Runtime#benchmark~ +You can use this function to compare the relative performance of methods. + +#+begin_src ruby + def tick args + # press r to run benchmark + if args.inputs.keyboard.key_down.r + args.gtk.console.show + args.gtk.benchmark iterations: 1000, # number of iterations + # label for experiment + using_numeric_map: -> () { + # experiment body + v = 100.map do |i| + i * 100 + end + }, + # label for experiment + using_numeric_times: -> () { + # experiment body + v = [] + 100.times do |i| + v << i * 100 + end + } + end + end +#+end_src +S + end + end class GTK::Runtime diff --git a/dragon/tweetcart.rb b/dragon/tweetcart.rb index 9e278b3..67e950e 100644 --- a/dragon/tweetcart.rb +++ b/dragon/tweetcart.rb @@ -26,9 +26,9 @@ def $top_level.TICK &block def $top_level.slds! *os if (os.first.is_a? Numeric) - sld! *os + sld!(*os) else - os.each { |o| sld! *o } + os.each { |o| sld!(*o) } end end diff --git a/samples/02_input_basics/01_moving_a_sprite/replay.txt b/samples/02_input_basics/01_moving_a_sprite/replay.txt new file mode 100644 index 0000000..1ec5f3a --- /dev/null +++ b/samples/02_input_basics/01_moving_a_sprite/replay.txt @@ -0,0 +1,73 @@ +replay_version 2.0 +stopped_at 442 +seed 100 +recorded_at 2021-11-20 11:06:58 -0600 +[:mouse_button_up, 1, 0, 1, 1, 5] +[:key_down_raw, 1073741903, 0, 2, 2, 147] +[:key_down_raw, 1073741903, 0, 2, 3, 162] +[:key_down_raw, 1073741903, 0, 2, 4, 164] +[:key_down_raw, 1073741903, 0, 2, 5, 166] +[:key_down_raw, 1073741903, 0, 2, 6, 168] +[:key_down_raw, 1073741903, 0, 2, 7, 170] +[:key_down_raw, 1073741903, 0, 2, 8, 172] +[:key_down_raw, 1073741906, 0, 2, 9, 172] +[:key_down_raw, 1073741905, 0, 2, 10, 182] +[:key_up_raw, 1073741903, 0, 2, 11, 185] +[:key_up_raw, 1073741906, 0, 2, 12, 188] +[:key_down_raw, 1073741904, 0, 2, 13, 195] +[:key_up_raw, 1073741905, 0, 2, 14, 202] +[:key_up_raw, 1073741904, 0, 2, 15, 208] +[:key_down_raw, 1073741903, 0, 2, 16, 210] +[:key_down_raw, 1073741903, 0, 2, 17, 225] +[:key_down_raw, 1073741903, 0, 2, 18, 227] +[:key_down_raw, 1073741903, 0, 2, 19, 229] +[:key_down_raw, 1073741903, 0, 2, 20, 231] +[:key_down_raw, 1073741903, 0, 2, 21, 233] +[:key_down_raw, 1073741903, 0, 2, 22, 235] +[:key_down_raw, 1073741903, 0, 2, 23, 237] +[:key_down_raw, 1073741903, 0, 2, 24, 239] +[:key_down_raw, 1073741903, 0, 2, 25, 241] +[:key_down_raw, 1073741903, 0, 2, 26, 243] +[:key_down_raw, 1073741903, 0, 2, 27, 245] +[:key_down_raw, 1073741903, 0, 2, 28, 247] +[:key_down_raw, 1073741903, 0, 2, 29, 249] +[:key_down_raw, 1073741903, 0, 2, 30, 251] +[:key_down_raw, 1073741903, 0, 2, 31, 253] +[:key_down_raw, 1073741903, 0, 2, 32, 255] +[:key_down_raw, 1073741903, 0, 2, 33, 257] +[:key_down_raw, 1073741903, 0, 2, 34, 259] +[:key_down_raw, 1073741903, 0, 2, 35, 261] +[:key_down_raw, 1073741903, 0, 2, 36, 263] +[:key_down_raw, 1073741903, 0, 2, 37, 265] +[:key_down_raw, 1073741903, 0, 2, 38, 267] +[:key_down_raw, 1073741903, 0, 2, 39, 269] +[:key_down_raw, 1073741903, 0, 2, 40, 271] +[:key_down_raw, 1073741906, 0, 2, 41, 271] +[:key_up_raw, 1073741903, 0, 2, 42, 282] +[:key_down_raw, 1073741906, 0, 2, 43, 286] +[:key_down_raw, 1073741906, 0, 2, 44, 288] +[:key_down_raw, 1073741906, 0, 2, 45, 290] +[:key_down_raw, 1073741906, 0, 2, 46, 292] +[:key_down_raw, 1073741906, 0, 2, 47, 294] +[:key_down_raw, 1073741906, 0, 2, 48, 296] +[:key_down_raw, 1073741906, 0, 2, 49, 298] +[:key_down_raw, 1073741906, 0, 2, 50, 301] +[:key_down_raw, 1073741905, 0, 2, 51, 302] +[:key_up_raw, 1073741906, 0, 2, 52, 313] +[:key_down_raw, 1073741904, 0, 2, 53, 315] +[:key_up_raw, 1073741905, 0, 2, 54, 322] +[:key_down_raw, 1073741904, 0, 2, 55, 330] +[:key_down_raw, 1073741904, 0, 2, 56, 332] +[:key_down_raw, 1073741904, 0, 2, 57, 334] +[:key_down_raw, 1073741904, 0, 2, 58, 336] +[:key_down_raw, 1073741904, 0, 2, 59, 338] +[:key_down_raw, 1073741904, 0, 2, 60, 340] +[:key_down_raw, 1073741904, 0, 2, 61, 342] +[:key_down_raw, 1073741904, 0, 2, 62, 344] +[:key_down_raw, 1073741904, 0, 2, 63, 346] +[:key_down_raw, 1073741904, 0, 2, 64, 348] +[:key_down_raw, 1073741904, 0, 2, 65, 350] +[:key_up_raw, 1073741904, 0, 2, 66, 351] +[:key_down_raw, 96, 0, 2, 67, 359] +[:key_up_raw, 96, 0, 2, 68, 364] +[:key_down_raw, 13, 0, 2, 69, 442] diff --git a/samples/04_physics_and_collisions/06_box_collision_3/app/main.rb b/samples/04_physics_and_collisions/06_box_collision_3/app/main.rb index ae447fd..e2210c2 100644 --- a/samples/04_physics_and_collisions/06_box_collision_3/app/main.rb +++ b/samples/04_physics_and_collisions/06_box_collision_3/app/main.rb @@ -152,17 +152,17 @@ class Game end def calc_player_dx - player.y += player.dy - player.dy += state.gravity - player.dy += player.dy * state.drag ** 2 * -1 - end - - def calc_player_dy player.dx = player.dx.clamp(-5, 5) player.dx *= 0.9 player.x += player.dx end + def calc_player_dy + player.y += player.dy + player.dy += state.gravity + player.dy += player.dy * state.drag ** 2 * -1 + end + def reset_player player.x = 100 player.y = 720 diff --git a/samples/04_physics_and_collisions/07_jump_physics/app/main.rb b/samples/04_physics_and_collisions/07_jump_physics/app/main.rb index 3fcb9e9..8db98be 100644 --- a/samples/04_physics_and_collisions/07_jump_physics/app/main.rb +++ b/samples/04_physics_and_collisions/07_jump_physics/app/main.rb @@ -45,8 +45,7 @@ class VerticalPlatformer input end - # Sets default values - def defaults + def init_game s.platforms ||= [ # initializes platforms collection with two platforms using hashes new_platform(x: 0, y: 0, w: 700, h: 32, dx: 1, speed: 0, rect: nil), new_platform(x: 0, y: 300, w: 700, h: 32, dx: 1, speed: 0, rect: nil), # 300 pixels higher @@ -69,6 +68,11 @@ class VerticalPlatformer s.camera ||= { y: -100 } # shows view on screen (as the player moves upward, the camera does too) end + # Sets default values + def defaults + init_game + end + # Outputs objects onto the screen def render outputs.solids << s.platforms.map do |p| # outputs platforms onto screen @@ -156,7 +160,9 @@ class VerticalPlatformer rect: nil) end else + # game over s.as_hash.clear # otherwise clear the hash (no new platform is necessary) + init_game end end diff --git a/samples/05_mouse/01_mouse_click/app/main.rb b/samples/05_mouse/01_mouse_click/app/main.rb index 8969a6e..e37a753 100644 --- a/samples/05_mouse/01_mouse_click/app/main.rb +++ b/samples/05_mouse/01_mouse_click/app/main.rb @@ -49,12 +49,23 @@ class TicTacToe # Starts the game with player x's turn and creates an array (to_a) for space combinations. # Calls methods necessary for the game to run properly. def tick - state.current_turn ||= :x - state.space_combinations = [-1, 0, 1].product([-1, 0, 1]).to_a + init_new_game render_board input_board end + def init_new_game + state.current_turn ||= :x + state.space_combinations ||= [-1, 0, 1].product([-1, 0, 1]).to_a + + state.spaces ||= {} + + state.space_combinations.each do |x, y| + state.spaces[x] ||= {} + state.spaces[x][y] ||= state.new_entity(:space) + end + end + # Uses borders to create grid squares for the game's board. Also outputs the game pieces using labels. def render_board square_size = 80 @@ -130,6 +141,7 @@ class TicTacToe def input_restart_game return unless state.game_over gtk.reset + init_new_game end # Checks if x or o won the game. diff --git a/samples/05_mouse/02_mouse_move/app/main.rb b/samples/05_mouse/02_mouse_move/app/main.rb index 97edbe7..d9387dc 100644 --- a/samples/05_mouse/02_mouse_move/app/main.rb +++ b/samples/05_mouse/02_mouse_move/app/main.rb @@ -196,7 +196,7 @@ class ProtectThePuppiesFromTheZombies def calc_kill_zombie # Find all zombies that intersect with the player. They are considered killed. - killed_this_frame = state.zombies.find_all { |z| z.sprite.intersect_rect? state.player_sprite } + killed_this_frame = state.zombies.find_all { |z| z.sprite && (z.sprite.intersect_rect? state.player_sprite) } state.zombies = state.zombies - killed_this_frame # remove newly killed zombies from zombies collection state.killed_zombies += killed_this_frame # add newly killed zombies to killed zombies diff --git a/samples/05_mouse/04_coordinate_systems/app/main.rb b/samples/05_mouse/04_coordinate_systems/app/main.rb index cbf3329..fcfa090 100644 --- a/samples/05_mouse/04_coordinate_systems/app/main.rb +++ b/samples/05_mouse/04_coordinate_systems/app/main.rb @@ -2,7 +2,7 @@ APIs listing that haven't been encountered in previous sample apps: - - args.inputs.mouse.position: Coordinates of the mouse's position on the screen. + - args.inputs.mouse.click.position: Coordinates of the mouse's position on the screen. Unlike args.inputs.mouse.click.point, the mouse does not need to be pressed down for position to know the mouse's coordinates. For more information about the mouse, go to mygame/documentation/07-mouse.md. @@ -43,7 +43,7 @@ def tick args # ensure that the outputs don't overlap each other. Try removing them and see what happens. pos = args.inputs.mouse.position # stores coordinates of mouse's position args.outputs.labels << [pos.x + 10, pos.y + 10, "#{pos}"] # outputs label of coordinates - args.outputs.solids << [pos.x - 2, pos.y - 2, 5, 5] # outputs small black box placed where mouse is hovering + args.outputs.solids << [pos.x - 2, pos.y - 2, 5, 5] # outputs small blackk box placed where mouse is hovering button = [0, 0, 370, 50] # sets definition of toggle button args.outputs.borders << button # outputs button as border (not filled in) diff --git a/samples/07_advanced_audio/01_audio_mixer/app/main.rb b/samples/07_advanced_audio/01_audio_mixer/app/main.rb index 3a85d47..9cdc62f 100644 --- a/samples/07_advanced_audio/01_audio_mixer/app/main.rb +++ b/samples/07_advanced_audio/01_audio_mixer/app/main.rb @@ -71,6 +71,7 @@ def render_sources args end def playtime_str t + return "" unless t minutes = (t / 60.0).floor seconds = t - (minutes * 60.0).to_f return minutes.to_s + ':' + seconds.floor.to_s + ((seconds - seconds.floor).to_s + "000")[1..3] @@ -183,7 +184,7 @@ def panel_primitives args, audio_entry results.playtime_slider_rect = progress_bar(args: args, row: 2.5, col: 2, - percentage: audio_entry.playtime / audio_entry.length_, + percentage: (audio_entry.playtime || 1) / (audio_entry.length_ || 1), text: "#{playtime_str(audio_entry.playtime)} / #{playtime_str(audio_entry.length_)}") results.primitives << results.playtime_slider_rect.primitives @@ -320,7 +321,7 @@ def defaults args args.state.sound_files ||= [ { name: :tada, path: "sounds/tada.wav" }, { name: :splash, path: "sounds/splash.wav" }, - { name: :drum, path: "sounds/drum.wav" }, + { name: :drum, path: "sounds/drum.mp3" }, { name: :spring, path: "sounds/spring.wav" }, { name: :music, path: "sounds/music.ogg" } ] diff --git a/samples/07_advanced_audio/01_audio_mixer/sounds/drum.mp3 b/samples/07_advanced_audio/01_audio_mixer/sounds/drum.mp3 new file mode 100644 index 0000000..e41e671 Binary files /dev/null and b/samples/07_advanced_audio/01_audio_mixer/sounds/drum.mp3 differ diff --git a/samples/07_advanced_rendering/00_labels_with_wrapped_text/app/main.rb b/samples/07_advanced_rendering/00_labels_with_wrapped_text/app/main.rb new file mode 100644 index 0000000..71eefa9 --- /dev/null +++ b/samples/07_advanced_rendering/00_labels_with_wrapped_text/app/main.rb @@ -0,0 +1,88 @@ +def tick args + # defaults + args.state.scroll_location ||= 0 + args.state.textbox.messages ||= [] + args.state.textbox.scroll ||= 0 + + # render + args.outputs.background_color = [0, 0, 0, 255] + render_messages args + render_instructions args + + # inputs + if args.inputs.keyboard.key_down.one + queue_message args, "Hello there neighbour! my name is mark, how is your day today?" + end + + if args.inputs.keyboard.key_down.two + queue_message args, "I'm doing great sir, actually I'm having a picnic today" + end + + if args.inputs.keyboard.key_down.three + queue_message args, "Well that sounds wonderful!" + end + + if args.inputs.keyboard.key_down.home + args.state.scroll_location = 1 + end + + if args.inputs.keyboard.key_down.delete + clear_message_queue args + end +end + +def queue_message args, msg + args.state.textbox.messages.concat msg.wrapped_lines 50 +end + +def clear_message_queue args + args.state.textbox.messages = nil + args.state.textbox.scroll = 0 +end + +def render_messages args + args.outputs[:textbox].w = 400 + args.outputs[:textbox].h = 720 + + args.outputs.primitives << args.state.textbox.messages.each_with_index.map do |s, idx| + { + x: 0, + y: 20 * (args.state.textbox.messages.size - idx) + args.state.textbox.scroll * 20, + text: s, + size_enum: -3, + alignment_enum: 0, + r: 255, g:255, b: 255, a: 255 + } + end + + args.outputs[:textbox].labels << args.state.textbox.messages.each_with_index.map do |s, idx| + { + x: 0, + y: 20 * (args.state.textbox.messages.size - idx) + args.state.textbox.scroll * 20, + text: s, + size_enum: -3, + alignment_enum: 0, + r: 255, g:255, b: 255, a: 255 + } + end + + args.outputs[:textbox].borders << [0, 0, args.outputs[:textbox].w, 720] + + args.state.textbox.scroll += args.inputs.mouse.wheel.y unless args.inputs.mouse.wheel.nil? + + if args.state.scroll_location > 0 + args.state.textbox.scroll = 0 + args.state.scroll_location = 0 + end + + args.outputs.sprites << [900, 0, args.outputs[:textbox].w, 720, :textbox] +end + +def render_instructions args + args.outputs.labels << [30, + 30.from_top, + "press 1, 2, 3 to display messages, MOUSE WHEEL to scroll, HOME to go to top, BACKSPACE to delete.", + 0, 255, 255] + + args.outputs.primitives << [0, 55.from_top, 1280, 30, :pixel, 0, 255, 0, 0, 0].sprite +end diff --git a/samples/07_advanced_rendering/00_labels_with_wrapped_text/replay.txt b/samples/07_advanced_rendering/00_labels_with_wrapped_text/replay.txt new file mode 100644 index 0000000..8153881 --- /dev/null +++ b/samples/07_advanced_rendering/00_labels_with_wrapped_text/replay.txt @@ -0,0 +1,93 @@ +replay_version 2.0 +stopped_at 461 +seed 100 +recorded_at 2021-11-20 11:11:30 -0600 +[:mouse_button_up, 1, 0, 1, 1, 5] +[:mouse_move, 789, 84, 2, 2, 33] +[:mouse_move, 790, 84, 2, 3, 35] +[:mouse_move, 791, 84, 2, 4, 37] +[:key_down_raw, 49, 0, 2, 5, 72] +[:key_up_raw, 49, 0, 2, 6, 78] +[:key_down_raw, 50, 0, 2, 7, 90] +[:key_up_raw, 50, 0, 2, 8, 97] +[:mouse_move, 789, 85, 2, 9, 108] +[:mouse_move, 784, 86, 2, 10, 109] +[:mouse_move, 780, 88, 2, 11, 110] +[:mouse_move, 780, 89, 2, 12, 112] +[:mouse_move, 780, 90, 2, 13, 114] +[:mouse_move, 780, 91, 2, 14, 115] +[:key_down_raw, 49, 0, 2, 15, 123] +[:key_up_raw, 49, 0, 2, 16, 131] +[:key_down_raw, 49, 0, 2, 17, 150] +[:key_up_raw, 49, 0, 2, 18, 157] +[:key_down_raw, 50, 0, 2, 19, 161] +[:key_up_raw, 50, 0, 2, 20, 169] +[:key_down_raw, 51, 0, 2, 21, 179] +[:key_up_raw, 51, 0, 2, 22, 186] +[:mouse_move, 780, 92, 2, 23, 186] +[:mouse_move, 781, 92, 2, 24, 187] +[:mouse_move, 777, 92, 2, 25, 225] +[:mouse_move, 769, 94, 2, 26, 226] +[:mouse_move, 761, 96, 2, 27, 227] +[:mouse_move, 759, 97, 2, 28, 228] +[:mouse_move, 760, 99, 2, 29, 231] +[:mouse_move, 762, 101, 2, 30, 232] +[:mouse_move, 768, 112, 2, 31, 233] +[:mouse_move, 769, 112, 2, 32, 234] +[:mouse_wheel, 0, 1, 2, 33, 234] +[:mouse_move, 769, 113, 2, 34, 234] +[:mouse_wheel, 0, 2, 2, 35, 235] +[:mouse_move, 770, 114, 2, 36, 235] +[:mouse_wheel, 0, 4, 2, 37, 236] +[:mouse_move, 771, 115, 2, 38, 237] +[:mouse_wheel, 0, 6, 2, 39, 237] +[:mouse_move, 771, 116, 2, 40, 239] +[:mouse_wheel, 0, 7, 2, 41, 239] +[:mouse_move, 772, 119, 2, 42, 240] +[:mouse_move, 773, 120, 2, 43, 241] +[:mouse_move, 773, 121, 2, 44, 242] +[:mouse_move, 774, 121, 2, 45, 243] +[:mouse_move, 774, 122, 2, 46, 244] +[:mouse_move, 775, 124, 2, 47, 246] +[:mouse_move, 780, 132, 2, 48, 247] +[:mouse_move, 784, 142, 2, 49, 248] +[:mouse_move, 788, 149, 2, 50, 249] +[:mouse_move, 789, 150, 2, 51, 250] +[:mouse_move, 789, 151, 2, 52, 251] +[:mouse_move, 790, 151, 2, 53, 252] +[:mouse_move, 790, 152, 2, 54, 262] +[:mouse_wheel, 0, 1, 2, 55, 273] +[:mouse_wheel, 0, 1, 2, 56, 274] +[:mouse_wheel, 0, 4, 2, 57, 275] +[:mouse_wheel, 0, 6, 2, 58, 277] +[:mouse_move, 790, 151, 2, 59, 288] +[:mouse_wheel, 0, -1, 2, 60, 297] +[:mouse_wheel, 0, -1, 2, 61, 299] +[:mouse_wheel, 0, -4, 2, 62, 300] +[:mouse_wheel, 0, -6, 2, 63, 301] +[:mouse_wheel, 0, -1, 2, 64, 317] +[:mouse_wheel, 0, -1, 2, 65, 318] +[:mouse_wheel, 0, -4, 2, 66, 319] +[:mouse_wheel, 0, -6, 2, 67, 320] +[:mouse_wheel, 0, -7, 2, 68, 321] +[:mouse_move, 791, 151, 2, 69, 322] +[:key_down_raw, 49, 0, 2, 70, 339] +[:key_up_raw, 49, 0, 2, 71, 343] +[:mouse_move, 791, 150, 2, 72, 343] +[:key_down_raw, 49, 0, 2, 73, 348] +[:key_up_raw, 49, 0, 2, 74, 351] +[:key_down_raw, 49, 0, 2, 75, 356] +[:key_up_raw, 49, 0, 2, 76, 361] +[:key_down_raw, 96, 0, 2, 77, 388] +[:mouse_move, 792, 150, 2, 78, 389] +[:key_up_raw, 96, 0, 2, 79, 392] +[:mouse_move, 792, 149, 2, 80, 394] +[:mouse_move, 787, 157, 2, 81, 418] +[:mouse_move, 776, 165, 2, 82, 419] +[:mouse_move, 768, 168, 2, 83, 420] +[:mouse_move, 766, 168, 2, 84, 421] +[:mouse_move, 767, 168, 2, 85, 424] +[:mouse_move, 772, 168, 2, 86, 425] +[:mouse_move, 777, 168, 2, 87, 426] +[:mouse_move, 778, 168, 2, 88, 427] +[:key_down_raw, 13, 0, 2, 89, 461] diff --git a/samples/07_advanced_rendering/00_rotating_label/app/main.rb b/samples/07_advanced_rendering/00_rotating_label/app/main.rb new file mode 100644 index 0000000..8b21fb8 --- /dev/null +++ b/samples/07_advanced_rendering/00_rotating_label/app/main.rb @@ -0,0 +1,32 @@ +def tick args + # set the render target width and height to match the label + args.outputs[:scene].w = 220 + args.outputs[:scene].h = 30 + + + # make the background transparent + args.outputs[:scene].background_color = [255, 255, 255, 0] + + # set the blendmode of the label to 0 (no blending) + # center it inside of the scene + # set the vertical_alignment_enum to 1 (center) + args.outputs[:scene].labels << { x: 0, + y: 15, + text: "label in render target", + blendmode_enum: 0, + vertical_alignment_enum: 1 } + + # add a border to the render target + args.outputs[:scene].borders << { x: 0, + y: 0, + w: args.outputs[:scene].w, + h: args.outputs[:scene].h } + + # add the rendertarget to the main output as a sprite + args.outputs.sprites << { x: 640 - args.outputs[:scene].w.half, + y: 360 - args.outputs[:scene].h.half, + w: args.outputs[:scene].w, + h: args.outputs[:scene].h, + angle: args.state.tick_count, + path: :scene } +end diff --git a/samples/07_advanced_rendering/08_splitscreen_camera/app/main.rb b/samples/07_advanced_rendering/08_splitscreen_camera/app/main.rb index 9b08e1e..9d22918 100644 --- a/samples/07_advanced_rendering/08_splitscreen_camera/app/main.rb +++ b/samples/07_advanced_rendering/08_splitscreen_camera/app/main.rb @@ -6,7 +6,7 @@ class CameraMovement def serialize {state: state, inputs: inputs, outputs: outputs, grid: grid } end - + def inspect serialize.to_s end @@ -76,12 +76,12 @@ class CameraMovement default_player(0, 0, 64, 64, "sprites/player/player_#{state.player_cyan.orientation}_standing.png") end - + def new_player_magenta default_player(64, 0, 64, 64, "sprites/player/player_#{state.player_magenta.orientation}_standing.png") end - + def new_camera_magenta default_camera(0,0,720,720) end @@ -93,7 +93,8 @@ class CameraMovement def new_camera_center default_camera(0,0,1280,720) end - + + def new_room default_floor_tile(0,0,1024,1024,'sprites/rooms/camera_room.png') end @@ -118,7 +119,7 @@ class CameraMovement state.player_cyan.x += state.player_cyan.dx state.player_cyan.y += state.player_cyan.dy end - + def calc_player_magenta state.player_magenta.x += state.player_magenta.dx state.player_magenta.y += state.player_magenta.dy @@ -133,7 +134,7 @@ class CameraMovement state.camera_center.x += (targetX - state.camera_center.x) * 0.1 * timeScale state.camera_center.y += (targetY - state.camera_center.y) * 0.1 * timeScale end - + def calc_camera_magenta timeScale = 1 @@ -170,7 +171,7 @@ class CameraMovement def calc_trauma_decay state.trauma = state.trauma * 0.9 end - + def calc_random_float_range(min, max) rand * (max-min) + min end @@ -198,7 +199,7 @@ class CameraMovement g: 255, b: 255} end - + def render_player_magenta outputs[:scene].sprites << {x: state.player_magenta.x, y: state.player_magenta.y, @@ -244,16 +245,16 @@ class CameraMovement render_camera_magenta_scene render_camera_cyan_scene - angle = Math.atan((state.player_magenta.y - state.player_cyan.y)/(state.player_magenta.x- state.player_cyan.x)) * 180/Math::PI + angle = Math.atan((state.player_magenta.y - state.player_cyan.y)/(state.player_magenta.x- state.player_cyan.x)) * 180/Math::PI output_split_camera angle - + end def render_camera_magenta_scene zoomFactor = 1 offsetX = 32 offsetY = 32 - + outputs[:scene_magenta].sprites << {x: (-state.camera_magenta.x*2), y: (-state.camera_magenta.y), w: outputs[:scene].width*2, @@ -279,7 +280,7 @@ class CameraMovement outputs.labels << [128,64,"#{quadrant}",8,2,255,0,255,255] if quadrant == 1 set_camera_attributes(w: 640, h: 720, m_x: 640, m_y: 0, c_x: 0, c_y: 0) - + elsif quadrant == 2 set_camera_attributes(w: 1280, h: 360, m_x: 0, m_y: 360, c_x: 0, c_y: 0) @@ -297,7 +298,7 @@ class CameraMovement state.camera_cyan.h = h + 64 outputs[:scene_cyan].width = (w) * 2 outputs[:scene_cyan].height = h - + state.camera_magenta.w = w + 64 state.camera_magenta.h = h + 64 outputs[:scene_magenta].width = (w) * 2 @@ -309,7 +310,7 @@ class CameraMovement path: :scene_magenta} outputs.sprites << {x: c_x, y: c_y, - w: w, + w: w, h: h, path: :scene_cyan} end @@ -317,7 +318,7 @@ class CameraMovement def add_trauma amount state.trauma = [state.trauma + amount, 1.0].min end - + def remove_trauma amount state.trauma = [state.trauma - amount, 0.0].max end @@ -357,7 +358,7 @@ class CameraMovement outputs.labels << [128,512,"#{state.player_cyan.x.round()}",8,2,0,255,255,255] outputs.labels << [128,480,"#{state.player_cyan.y.round()}",8,2,0,255,255,255] end - + def input_move_magenta if inputs.keyboard.key_held.w state.player_magenta.dy = 5 @@ -391,5 +392,5 @@ def tick args $camera_movement.outputs = args.outputs $camera_movement.state = args.state $camera_movement.grid = args.grid - $camera_movement.tick + $camera_movement.tick end diff --git a/samples/09_performance/03_sprites_as_struct/app/main.rb b/samples/09_performance/03_sprites_as_struct/app/main.rb new file mode 100644 index 0000000..7b738b7 --- /dev/null +++ b/samples/09_performance/03_sprites_as_struct/app/main.rb @@ -0,0 +1,82 @@ +# create a Struct variant that allows for named parameters on construction. +class NamedStruct < Struct + def initialize **opts + super(*members.map { |k| opts[k] }) + end +end + +# create a Star NamedStruct +Star = NamedStruct.new(:x, :y, :w, :h, :path, :s, + :angle, :angle_anchor_x, :angle_anchor_y, + :r, :g, :b, :a, + :tile_x, :tile_y, + :tile_w, :tile_h, + :source_x, :source_y, + :source_w, :source_h, + :flip_horizontally, :flip_vertically, + :blendmode_enum) + +# Sprites represented as Structs. They require a little bit more code than Hashes, +# but are the a little faster to render too. +def random_x args + (args.grid.w.randomize :ratio) * -1 +end + +def random_y args + (args.grid.h.randomize :ratio) * -1 +end + +def random_speed + 1 + (4.randomize :ratio) +end + +def new_star args + Star.new x: (random_x args), + y: (random_y args), + w: 4, h: 4, + path: 'sprites/tiny-star.png', + s: random_speed +end + +def move_star args, star + star.x += star[:s] + star.y += star[:s] + if star.x > args.grid.w || star.y > args.grid.h + star.x = (random_x args) + star.y = (random_y args) + star[:s] = random_speed + end +end + +def tick args + args.state.star_count ||= 0 + + # sets console command when sample app initially opens + if Kernel.global_tick_count == 0 + puts "" + puts "" + puts "=========================================================" + puts "* INFO: Sprites, Structs" + puts "* INFO: Please specify the number of sprites to render." + args.gtk.console.set_command "reset_with count: 100" + end + + # init + if args.state.tick_count == 0 + args.state.stars = args.state.star_count.map { |i| new_star args } + end + + # update + args.state.stars.each { |s| move_star args, s } + + # render + args.outputs.sprites << args.state.stars + args.outputs.background_color = [0, 0, 0] + args.outputs.primitives << args.gtk.current_framerate_primitives +end + +# resets game, and assigns star count given by user +def reset_with count: count + $gtk.reset + $gtk.args.state.star_count = count +end diff --git a/samples/09_performance/03_sprites_as_struct/license-for-sample.txt b/samples/09_performance/03_sprites_as_struct/license-for-sample.txt new file mode 100644 index 0000000..175ac25 --- /dev/null +++ b/samples/09_performance/03_sprites_as_struct/license-for-sample.txt @@ -0,0 +1,9 @@ +Copyright 2021 DragonRuby LLC + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/samples/09_performance/03_sprites_as_struct/sprites/tiny-star.png b/samples/09_performance/03_sprites_as_struct/sprites/tiny-star.png new file mode 100644 index 0000000..e04786a Binary files /dev/null and b/samples/09_performance/03_sprites_as_struct/sprites/tiny-star.png differ diff --git a/samples/09_performance/04_sprites_as_strict_entities/app/main.rb b/samples/09_performance/04_sprites_as_strict_entities/app/main.rb new file mode 100644 index 0000000..a2688c2 --- /dev/null +++ b/samples/09_performance/04_sprites_as_strict_entities/app/main.rb @@ -0,0 +1,72 @@ +# Sprites represented as StrictEntities using the queue ~args.outputs.sprites~ +# yields apis access similar to Entities, but all properties that can be set on the +# entity must be predefined with a default value. Strict entities do not support the +# addition of new properties after the fact. They are more performant than OpenEntities +# because of this constraint. +def random_x args + (args.grid.w.randomize :ratio) * -1 +end + +def random_y args + (args.grid.h.randomize :ratio) * -1 +end + +def random_speed + 1 + (4.randomize :ratio) +end + +def new_star args + args.state.new_entity_strict(:star, + x: (random_x args), + y: (random_y args), + w: 4, h: 4, + path: 'sprites/tiny-star.png', + s: random_speed) do |entity| + # invoke attr_sprite so that it responds to + # all properties that are required to render a sprite + entity.attr_sprite + end +end + +def move_star args, star + star.x += star.s + star.y += star.s + if star.x > args.grid.w || star.y > args.grid.h + star.x = (random_x args) + star.y = (random_y args) + star.s = random_speed + end +end + +def tick args + args.state.star_count ||= 0 + + # sets console command when sample app initially opens + if Kernel.global_tick_count == 0 + puts "" + puts "" + puts "=========================================================" + puts "* INFO: Sprites, Strict Entities" + puts "* INFO: Please specify the number of sprites to render." + args.gtk.console.set_command "reset_with count: 100" + end + + # init + if args.state.tick_count == 0 + args.state.stars = args.state.star_count.map { |i| new_star args } + end + + # update + args.state.stars.each { |s| move_star args, s } + + # render + args.outputs.sprites << args.state.stars + args.outputs.background_color = [0, 0, 0] + args.outputs.primitives << args.gtk.current_framerate_primitives +end + +# resets game, and assigns star count given by user +def reset_with count: count + $gtk.reset + $gtk.args.state.star_count = count +end diff --git a/samples/09_performance/04_sprites_as_strict_entities/license-for-sample.txt b/samples/09_performance/04_sprites_as_strict_entities/license-for-sample.txt new file mode 100644 index 0000000..100dcec --- /dev/null +++ b/samples/09_performance/04_sprites_as_strict_entities/license-for-sample.txt @@ -0,0 +1,9 @@ +Copyright 2019 DragonRuby LLC + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/samples/09_performance/04_sprites_as_strict_entities/sprites/tiny-star.png b/samples/09_performance/04_sprites_as_strict_entities/sprites/tiny-star.png new file mode 100644 index 0000000..e04786a Binary files /dev/null and b/samples/09_performance/04_sprites_as_strict_entities/sprites/tiny-star.png differ diff --git a/samples/09_performance/05_sprites_as_classes/app/main.rb b/samples/09_performance/05_sprites_as_classes/app/main.rb new file mode 100644 index 0000000..67cde79 --- /dev/null +++ b/samples/09_performance/05_sprites_as_classes/app/main.rb @@ -0,0 +1,55 @@ +# Sprites represented as Classes using the queue ~args.outputs.sprites~. +# gives you full control of property declaration and method invocation. +# They are more performant than OpenEntities and StrictEntities, but more code upfront. +class Star + attr_sprite + + def initialize grid + @grid = grid + @x = (rand @grid.w) * -1 + @y = (rand @grid.h) * -1 + @w = 4 + @h = 4 + @s = 1 + (4.randomize :ratio) + @path = 'sprites/tiny-star.png' + end + + def move + @x += @s + @y += @s + @x = (rand @grid.w) * -1 if @x > @grid.right + @y = (rand @grid.h) * -1 if @y > @grid.top + end +end + +# calls methods needed for game to run properly +def tick args + # sets console command when sample app initially opens + if Kernel.global_tick_count == 0 + puts "" + puts "" + puts "=========================================================" + puts "* INFO: Sprites, Classes" + puts "* INFO: Please specify the number of sprites to render." + args.gtk.console.set_command "reset_with count: 100" + end + + # init + if args.state.tick_count == 0 + args.state.stars = args.state.star_count.map { |i| Star.new args.grid } + end + + # update + args.state.stars.each(&:move) + + # render + args.outputs.sprites << args.state.stars + args.outputs.background_color = [0, 0, 0] + args.outputs.primitives << args.gtk.current_framerate_primitives +end + +# resets game, and assigns star count given by user +def reset_with count: count + $gtk.reset + $gtk.args.state.star_count = count +end diff --git a/samples/09_performance/05_sprites_as_classes/license-for-sample.txt b/samples/09_performance/05_sprites_as_classes/license-for-sample.txt new file mode 100644 index 0000000..100dcec --- /dev/null +++ b/samples/09_performance/05_sprites_as_classes/license-for-sample.txt @@ -0,0 +1,9 @@ +Copyright 2019 DragonRuby LLC + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/samples/09_performance/05_sprites_as_classes/sprites/tiny-star.png b/samples/09_performance/05_sprites_as_classes/sprites/tiny-star.png new file mode 100644 index 0000000..e04786a Binary files /dev/null and b/samples/09_performance/05_sprites_as_classes/sprites/tiny-star.png differ diff --git a/samples/09_performance/06_static_sprites_as_classes/app/main.rb b/samples/09_performance/06_static_sprites_as_classes/app/main.rb new file mode 100644 index 0000000..db5bf8e --- /dev/null +++ b/samples/09_performance/06_static_sprites_as_classes/app/main.rb @@ -0,0 +1,56 @@ +# Sprites represented as Classes using the queue ~args.outputs.static_sprites~. +# bypasses the queue behavior of ~args.outputs.sprites~. All instances are held +# by reference. You get better performance, but you are mutating state of held objects +# which is less functional/data oriented. +class Star + attr_sprite + + def initialize grid + @grid = grid + @x = (rand @grid.w) * -1 + @y = (rand @grid.h) * -1 + @w = 4 + @h = 4 + @s = 1 + (4.randomize :ratio) + @path = 'sprites/tiny-star.png' + end + + def move + @x += @s + @y += @s + @x = (rand @grid.w) * -1 if @x > @grid.right + @y = (rand @grid.h) * -1 if @y > @grid.top + end +end + +# calls methods needed for game to run properly +def tick args + # sets console command when sample app initially opens + if Kernel.global_tick_count == 0 + puts "" + puts "" + puts "=========================================================" + puts "* INFO: Static Sprites, Classes" + puts "* INFO: Please specify the number of sprites to render." + args.gtk.console.set_command "reset_with count: 100" + end + + # init + if args.state.tick_count == 0 + args.state.stars = args.state.star_count.map { |i| Star.new args.grid } + args.outputs.static_sprites << args.state.stars + end + + # update + args.state.stars.each(&:move) + + # render + args.outputs.background_color = [0, 0, 0] + args.outputs.primitives << args.gtk.current_framerate_primitives +end + +# resets game, and assigns star count given by user +def reset_with count: count + $gtk.reset + $gtk.args.state.star_count = count +end diff --git a/samples/09_performance/06_static_sprites_as_classes/license-for-sample.txt b/samples/09_performance/06_static_sprites_as_classes/license-for-sample.txt new file mode 100644 index 0000000..100dcec --- /dev/null +++ b/samples/09_performance/06_static_sprites_as_classes/license-for-sample.txt @@ -0,0 +1,9 @@ +Copyright 2019 DragonRuby LLC + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/samples/09_performance/06_static_sprites_as_classes/sprites/tiny-star.png b/samples/09_performance/06_static_sprites_as_classes/sprites/tiny-star.png new file mode 100644 index 0000000..e04786a Binary files /dev/null and b/samples/09_performance/06_static_sprites_as_classes/sprites/tiny-star.png differ diff --git a/samples/09_performance/07_static_sprites_as_classes_with_custom_drawing/app/main.rb b/samples/09_performance/07_static_sprites_as_classes_with_custom_drawing/app/main.rb new file mode 100644 index 0000000..3291f5e --- /dev/null +++ b/samples/09_performance/07_static_sprites_as_classes_with_custom_drawing/app/main.rb @@ -0,0 +1,88 @@ +# Sprites represented as Classes, with a draw_override method, and using the queue ~args.outputs.static_sprites~. +# is the fastest approach. This is comparable to what other game engines set as the default behavior. +# There are tradeoffs for all this speed if the creation of a full blown class, and bypassing +# functional/data-oriented practices. +class Star + def initialize grid + @grid = grid + @x = (rand @grid.w) * -1 + @y = (rand @grid.h) * -1 + @w = 4 + @h = 4 + @s = 1 + (4.randomize :ratio) + @path = 'sprites/tiny-star.png' + end + + def move + @x += @s + @y += @s + @x = (rand @grid.w) * -1 if @x > @grid.right + @y = (rand @grid.h) * -1 if @y > @grid.top + end + + # if the object that is in args.outputs.sprites (or static_sprites) + # respond_to? :draw_override, then the method is invoked giving you + # access to the class used to draw to the canvas. + def draw_override ffi_draw + # first move then draw + move + + # The argument order for ffi.draw_sprite is: + # x, y, w, h, path + ffi_draw.draw_sprite @x, @y, @w, @h, @path + + # The argument order for ffi_draw.draw_sprite_2 is (pass in nil for default value): + # x, y, w, h, path, + # angle, alpha + + # The argument order for ffi_draw.draw_sprite_3 is: + # x, y, w, h, + # path, + # angle, + # alpha, red_saturation, green_saturation, blue_saturation + # tile_x, tile_y, tile_w, tile_h, + # flip_horizontally, flip_vertically, + # angle_anchor_x, angle_anchor_y, + # source_x, source_y, source_w, source_h + + # The argument order for ffi_draw.draw_sprite_4 is: + # x, y, w, h, + # path, + # angle, + # alpha, red_saturation, green_saturation, blue_saturation + # tile_x, tile_y, tile_w, tile_h, + # flip_horizontally, flip_vertically, + # angle_anchor_x, angle_anchor_y, + # source_x, source_y, source_w, source_h, + # blendmode_enum + end +end + +# calls methods needed for game to run properly +def tick args + # sets console command when sample app initially opens + if Kernel.global_tick_count == 0 + puts "" + puts "" + puts "=========================================================" + puts "* INFO: Static Sprites, Classes, Draw Override" + puts "* INFO: Please specify the number of sprites to render." + args.gtk.console.set_command "reset_with count: 100" + end + + # init + if args.state.tick_count == 0 + args.state.stars = args.state.star_count.map { |i| Star.new args.grid } + args.outputs.static_sprites << args.state.stars + end + + # render framerate + args.outputs.background_color = [0, 0, 0] + args.outputs.primitives << args.gtk.current_framerate_primitives +end + +# resets game, and assigns star count given by user +def reset_with count: count + $gtk.reset + $gtk.args.state.star_count = count +end diff --git a/samples/09_performance/07_static_sprites_as_classes_with_custom_drawing/license-for-sample.txt b/samples/09_performance/07_static_sprites_as_classes_with_custom_drawing/license-for-sample.txt new file mode 100644 index 0000000..100dcec --- /dev/null +++ b/samples/09_performance/07_static_sprites_as_classes_with_custom_drawing/license-for-sample.txt @@ -0,0 +1,9 @@ +Copyright 2019 DragonRuby LLC + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/samples/09_performance/07_static_sprites_as_classes_with_custom_drawing/sprites/tiny-star.png b/samples/09_performance/07_static_sprites_as_classes_with_custom_drawing/sprites/tiny-star.png new file mode 100644 index 0000000..e04786a Binary files /dev/null and b/samples/09_performance/07_static_sprites_as_classes_with_custom_drawing/sprites/tiny-star.png differ diff --git a/samples/09_performance/08_collision_limits/app/main.rb b/samples/09_performance/08_collision_limits/app/main.rb new file mode 100644 index 0000000..01ad308 --- /dev/null +++ b/samples/09_performance/08_collision_limits/app/main.rb @@ -0,0 +1,55 @@ +=begin + + Reminders: + - find_all: Finds all elements of a collection that meet certain requirements. + In this sample app, we're finding all bodies that intersect with the center body. + + - args.outputs.solids: An array. The values generate a solid. + The parameters are [X, Y, WIDTH, HEIGHT, RED, GREEN, BLUE] + For more information about solids, go to mygame/documentation/03-solids-and-borders.md. + + - args.outputs.labels: An array. The values generate a label. + The parameters are [X, Y, TEXT, SIZE, ALIGNMENT, RED, GREEN, BLUE, ALPHA, FONT STYLE] + For more information about labels, go to mygame/documentation/02-labels.md. + + - ARRAY#intersect_rect?: Returns true or false depending on if two rectangles intersect. + +=end + +# This code demonstrates moving objects that loop around once they exceed the scope of the screen, +# which has dimensions of 1280 by 720, and also detects collisions between objects called "bodies". + +def body_count num + $gtk.args.state.other_bodies = num.map { [1280 * rand, 720 * rand, 10, 10] } # other_bodies set using num collection +end + +def tick args + + # Center body's values are set using an array + # Map is used to set values of 2000 other bodies + # All bodies that intersect with center body are stored in collisions collection + args.state.center_body ||= [640 - 100, 360 - 100, 200, 200] # calculations done to place body in center + args.state.other_bodies ||= 2000.map { [1280 * rand, 720 * rand, 10, 10] } # 2000 bodies given random position on screen + + # finds all bodies that intersect with center body, stores them in collisions + collisions = args.state.other_bodies.find_all { |b| b.intersect_rect? args.state.center_body } + + args.borders << args.state.center_body # outputs center body as a black border + + # transparency changes based on number of collisions; the more collisions, the redder (more transparent) the box becomes + args.solids << [args.state.center_body, 255, 0, 0, collisions.length * 5] # center body is red solid + args.solids << args.state.other_bodies # other bodies are output as (black) solids, as well + + args.labels << [10, 30, args.gtk.current_framerate] # outputs frame rate in bottom left corner + + # Bodies are returned to bottom left corner if positions exceed scope of screen + args.state.other_bodies.each do |b| # for each body in the other_bodies collection + b.x += 5 # x and y are both incremented by 5 + b.y += 5 + b.x = 0 if b.x > 1280 # x becomes 0 if star exceeds scope of screen (goes too far right) + b.y = 0 if b.y > 720 # y becomes 0 if star exceeds scope of screen (goes too far up) + end +end + +# Resets the game. +$gtk.reset diff --git a/samples/09_performance/08_collision_limits/license-for-sample.txt b/samples/09_performance/08_collision_limits/license-for-sample.txt new file mode 100644 index 0000000..100dcec --- /dev/null +++ b/samples/09_performance/08_collision_limits/license-for-sample.txt @@ -0,0 +1,9 @@ +Copyright 2019 DragonRuby LLC + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/samples/10_advanced_debugging/00_logging/app/main.rb b/samples/10_advanced_debugging/00_logging/app/main.rb new file mode 100644 index 0000000..f97b9d8 --- /dev/null +++ b/samples/10_advanced_debugging/00_logging/app/main.rb @@ -0,0 +1,19 @@ +def tick args + args.outputs.background_color = [255, 255, 255, 0] + if args.state.tick_count == 0 + args.gtk.log_spam "log level spam" + args.gtk.log_debug "log level debug" + args.gtk.log_info "log level info" + args.gtk.log_warn "log level warn" + args.gtk.log_error "log level error" + args.gtk.log_unfiltered "log level unfiltered" + puts "This is a puts call" + args.gtk.console.show + end + + if args.state.tick_count == 60 + puts "This is a puts call on tick 60" + elsif args.state.tick_count == 120 + puts "This is a puts call on tick 120" + end +end diff --git a/samples/11_http/01_retrieve_images/app/main.rb b/samples/11_http/01_retrieve_images/app/main.rb index 53ece84..2a6a294 100644 --- a/samples/11_http/01_retrieve_images/app/main.rb +++ b/samples/11_http/01_retrieve_images/app/main.rb @@ -1,8 +1,10 @@ +$gtk.register_cvar 'app.warn_seconds', "seconds to wait before starting", :uint, 11 + def tick args args.outputs.background_color = [0, 0, 0] # Show a warning at the start. - args.state.warning_debounce ||= 11 * 60 + args.state.warning_debounce ||= args.cvars['app.warn_seconds'].value * 60 if args.state.warning_debounce > 0 args.state.warning_debounce -= 1 args.outputs.labels << [640, 600, "This app shows random images from the Internet.", 10, 1, 255, 255, 255] diff --git a/samples/11_http/02_in_game_web_server_http_get/app/main.rb b/samples/11_http/02_in_game_web_server_http_get/app/main.rb new file mode 100644 index 0000000..7fd67f7 --- /dev/null +++ b/samples/11_http/02_in_game_web_server_http_get/app/main.rb @@ -0,0 +1,28 @@ +def tick args + args.state.port ||= 3000 + args.state.reqnum ||= 0 + # by default the embedded webserver runs on port 9001 (the port number is over 9000) and is disabled in a production build + # to enable the http server in a production build, you need to manually start + # the server up: + args.gtk.start_server! port: args.state.port, enable_in_prod: true + args.outputs.background_color = [0, 0, 0] + args.outputs.labels << [640, 600, "Point your web browser at http://localhost:#{args.state.port}/", 10, 1, 255, 255, 255] + + args.inputs.http_requests.each { |req| + puts("METHOD: #{req.method}"); + puts("URI: #{req.uri}"); + puts("HEADERS:"); + req.headers.each { |k,v| puts(" #{k}: #{v}") } + + if (req.uri == '/') + # headers and body can be nil if you don't care about them. + # If you don't set the Content-Type, it will default to + # "text/html; charset=utf-8". + # Don't set Content-Length; we'll ignore it and calculate it for you + args.state.reqnum += 1 + req.respond 200, "hello

    This #{req.method} was request number #{args.state.reqnum}!

    \n", { 'X-DRGTK-header' => 'Powered by DragonRuby!' } + else + req.reject + end + } +end diff --git a/samples/11_http/02_in_game_web_server_http_get/license-for-sample.txt b/samples/11_http/02_in_game_web_server_http_get/license-for-sample.txt new file mode 100644 index 0000000..175ac25 --- /dev/null +++ b/samples/11_http/02_in_game_web_server_http_get/license-for-sample.txt @@ -0,0 +1,9 @@ +Copyright 2021 DragonRuby LLC + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/samples/11_http/03_in_game_web_server_http_post/app/main.rb b/samples/11_http/03_in_game_web_server_http_post/app/main.rb new file mode 100644 index 0000000..8116358 --- /dev/null +++ b/samples/11_http/03_in_game_web_server_http_post/app/main.rb @@ -0,0 +1,72 @@ +def tick args + # defaults + args.state.post_button = args.layout.rect(row: 0, col: 0, w: 5, h: 1).merge(text: "execute http_post") + args.state.post_body_button = args.layout.rect(row: 1, col: 0, w: 5, h: 1).merge(text: "execute http_post_body") + args.state.request_to_s ||= "" + args.state.request_body ||= "" + + # render + args.state.post_button.yield_self do |b| + args.outputs.borders << b + args.outputs.labels << b.merge(text: b.text, + y: b.y + 30, + x: b.x + 10) + end + + args.state.post_body_button.yield_self do |b| + args.outputs.borders << b + args.outputs.labels << b.merge(text: b.text, + y: b.y + 30, + x: b.x + 10) + end + + draw_label args, 0, 6, "Request:", args.state.request_to_s + draw_label args, 0, 14, "Request Body Unaltered:", args.state.request_body + + # input + if args.inputs.mouse.click + # ============= HTTP_POST ============= + if (args.inputs.mouse.inside_rect? args.state.post_button) + # ========= DATA TO SEND =========== + form_fields = { "userId" => "#{Time.now.to_i}" } + # ================================== + + args.gtk.http_post "http://localhost:9001/testing", + form_fields, + ["Content-Type: application/x-www-form-urlencoded"] + + args.gtk.notify! "http_post" + end + + # ============= HTTP_POST_BODY ============= + if (args.inputs.mouse.inside_rect? args.state.post_body_button) + # =========== DATA TO SEND ============== + json = "{ \"userId\": \"#{Time.now.to_i}\"}" + # ================================== + + args.gtk.http_post_body "http://localhost:9001/testing", + json, + ["Content-Type: application/json", "Content-Length: #{json.length}"] + + args.gtk.notify! "http_post_body" + end + end + + # calc + args.inputs.http_requests.each do |r| + puts "#{r}" + if r.uri == "/testing" + puts r + args.state.request_to_s = "#{r}" + args.state.request_body = r.raw_body + r.respond 200, "ok" + end + end +end + +def draw_label args, row, col, header, text + label_pos = args.layout.rect(row: row, col: col, w: 0, h: 0) + args.outputs.labels << "#{header}\n\n#{text}".wrapped_lines(80).map_with_index do |l, i| + { x: label_pos.x, y: label_pos.y - (i * 15), text: l, size_enum: -2 } + end +end diff --git a/samples/11_http/03_in_game_web_server_http_post/replay.txt b/samples/11_http/03_in_game_web_server_http_post/replay.txt new file mode 100644 index 0000000..527f46d --- /dev/null +++ b/samples/11_http/03_in_game_web_server_http_post/replay.txt @@ -0,0 +1,415 @@ +replay_version 2.0 +stopped_at 680 +seed 100 +recorded_at 2021-11-20 11:16:26 -0600 +[:mouse_button_up, 1, 0, 1, 1, 3] +[:mouse_move, 782, 90, 2, 2, 12] +[:mouse_move, 780, 90, 2, 3, 13] +[:mouse_move, 771, 90, 2, 4, 14] +[:mouse_move, 759, 90, 2, 5, 15] +[:mouse_move, 739, 90, 2, 6, 16] +[:mouse_move, 703, 90, 2, 7, 17] +[:mouse_move, 681, 94, 2, 8, 18] +[:mouse_move, 657, 95, 2, 9, 19] +[:mouse_move, 631, 99, 2, 10, 20] +[:mouse_move, 599, 99, 2, 11, 21] +[:mouse_move, 560, 99, 2, 12, 22] +[:mouse_move, 518, 97, 2, 13, 23] +[:mouse_move, 476, 92, 2, 14, 24] +[:mouse_move, 435, 90, 2, 15, 25] +[:mouse_move, 391, 90, 2, 16, 26] +[:mouse_move, 345, 90, 2, 17, 27] +[:mouse_move, 304, 90, 2, 18, 28] +[:mouse_move, 254, 90, 2, 19, 29] +[:mouse_move, 230, 90, 2, 20, 30] +[:mouse_move, 213, 90, 2, 21, 31] +[:mouse_move, 207, 90, 2, 22, 32] +[:mouse_move, 207, 89, 2, 23, 34] +[:mouse_move, 207, 87, 2, 24, 35] +[:mouse_move, 209, 84, 2, 25, 36] +[:mouse_move, 210, 82, 2, 26, 37] +[:mouse_move, 211, 82, 2, 27, 38] +[:mouse_move, 211, 81, 2, 28, 40] +[:mouse_move, 212, 80, 2, 29, 41] +[:mouse_move, 212, 79, 2, 30, 42] +[:mouse_button_pressed, 1, 0, 1, 31, 89] +[:mouse_button_up, 1, 0, 1, 32, 93] +[:mouse_move, 212, 83, 2, 33, 151] +[:mouse_move, 216, 104, 2, 34, 152] +[:mouse_move, 229, 135, 2, 35, 153] +[:mouse_move, 242, 168, 2, 36, 154] +[:mouse_move, 250, 197, 2, 37, 155] +[:mouse_move, 254, 218, 2, 38, 156] +[:mouse_move, 264, 240, 2, 39, 157] +[:mouse_move, 274, 266, 2, 40, 158] +[:mouse_move, 285, 293, 2, 41, 159] +[:mouse_move, 295, 316, 2, 42, 160] +[:mouse_move, 304, 345, 2, 43, 161] +[:mouse_move, 308, 358, 2, 44, 162] +[:mouse_move, 316, 381, 2, 45, 163] +[:mouse_move, 328, 408, 2, 46, 164] +[:mouse_move, 333, 431, 2, 47, 165] +[:mouse_move, 336, 447, 2, 48, 166] +[:mouse_move, 337, 455, 2, 49, 167] +[:mouse_move, 337, 459, 2, 50, 168] +[:mouse_move, 336, 459, 2, 51, 175] +[:mouse_move, 336, 460, 2, 52, 177] +[:mouse_move, 336, 461, 2, 53, 178] +[:mouse_move, 334, 462, 2, 54, 179] +[:mouse_move, 331, 462, 2, 55, 180] +[:mouse_move, 328, 462, 2, 56, 181] +[:mouse_move, 323, 462, 2, 57, 182] +[:mouse_move, 318, 455, 2, 58, 183] +[:mouse_move, 310, 438, 2, 59, 184] +[:mouse_move, 306, 414, 2, 60, 185] +[:mouse_move, 306, 405, 2, 61, 186] +[:mouse_move, 307, 402, 2, 62, 187] +[:mouse_move, 310, 395, 2, 63, 188] +[:mouse_move, 318, 384, 2, 64, 189] +[:mouse_move, 327, 374, 2, 65, 190] +[:mouse_move, 338, 364, 2, 66, 191] +[:mouse_move, 351, 355, 2, 67, 192] +[:mouse_move, 367, 347, 2, 68, 193] +[:mouse_move, 385, 340, 2, 69, 194] +[:mouse_move, 406, 335, 2, 70, 195] +[:mouse_move, 431, 330, 2, 71, 196] +[:mouse_move, 471, 330, 2, 72, 197] +[:mouse_move, 491, 335, 2, 73, 198] +[:mouse_move, 505, 339, 2, 74, 199] +[:mouse_move, 514, 342, 2, 75, 200] +[:mouse_move, 520, 346, 2, 76, 201] +[:mouse_move, 526, 352, 2, 77, 202] +[:mouse_move, 530, 363, 2, 78, 203] +[:mouse_move, 530, 378, 2, 79, 204] +[:mouse_move, 530, 396, 2, 80, 205] +[:mouse_move, 530, 415, 2, 81, 206] +[:mouse_move, 524, 434, 2, 82, 207] +[:mouse_move, 517, 446, 2, 83, 208] +[:mouse_move, 509, 458, 2, 84, 209] +[:mouse_move, 503, 466, 2, 85, 210] +[:mouse_move, 499, 472, 2, 86, 211] +[:mouse_move, 496, 478, 2, 87, 212] +[:mouse_move, 493, 486, 2, 88, 213] +[:mouse_move, 488, 493, 2, 89, 214] +[:mouse_move, 476, 501, 2, 90, 215] +[:mouse_move, 465, 509, 2, 91, 216] +[:mouse_move, 453, 515, 2, 92, 217] +[:mouse_move, 441, 521, 2, 93, 218] +[:mouse_move, 426, 524, 2, 94, 219] +[:mouse_move, 410, 524, 2, 95, 220] +[:mouse_move, 391, 527, 2, 96, 221] +[:mouse_move, 379, 527, 2, 97, 222] +[:mouse_move, 368, 527, 2, 98, 223] +[:mouse_move, 360, 528, 2, 99, 224] +[:mouse_move, 359, 528, 2, 100, 225] +[:mouse_move, 358, 528, 2, 101, 226] +[:mouse_move, 364, 529, 2, 102, 232] +[:mouse_move, 387, 533, 2, 103, 233] +[:mouse_move, 410, 535, 2, 104, 234] +[:mouse_move, 434, 535, 2, 105, 235] +[:mouse_move, 468, 535, 2, 106, 236] +[:mouse_move, 506, 535, 2, 107, 237] +[:mouse_move, 546, 535, 2, 108, 238] +[:mouse_move, 582, 535, 2, 109, 239] +[:mouse_move, 614, 531, 2, 110, 240] +[:mouse_move, 647, 521, 2, 111, 241] +[:mouse_move, 679, 510, 2, 112, 242] +[:mouse_move, 705, 496, 2, 113, 243] +[:mouse_move, 722, 479, 2, 114, 244] +[:mouse_move, 727, 447, 2, 115, 245] +[:mouse_move, 715, 426, 2, 116, 246] +[:mouse_move, 692, 401, 2, 117, 247] +[:mouse_move, 665, 382, 2, 118, 248] +[:mouse_move, 641, 371, 2, 119, 249] +[:mouse_move, 601, 361, 2, 120, 250] +[:mouse_move, 582, 358, 2, 121, 251] +[:mouse_move, 510, 350, 2, 122, 252] +[:mouse_move, 486, 350, 2, 123, 253] +[:mouse_move, 439, 350, 2, 124, 254] +[:mouse_move, 395, 350, 2, 125, 255] +[:mouse_move, 362, 355, 2, 126, 256] +[:mouse_move, 322, 370, 2, 127, 257] +[:mouse_move, 306, 380, 2, 128, 258] +[:mouse_move, 298, 395, 2, 129, 259] +[:mouse_move, 296, 420, 2, 130, 260] +[:mouse_move, 303, 439, 2, 131, 261] +[:mouse_move, 310, 450, 2, 132, 262] +[:mouse_move, 345, 476, 2, 133, 263] +[:mouse_move, 376, 489, 2, 134, 264] +[:mouse_move, 408, 495, 2, 135, 265] +[:mouse_move, 447, 498, 2, 136, 266] +[:mouse_move, 487, 498, 2, 137, 267] +[:mouse_move, 526, 492, 2, 138, 268] +[:mouse_move, 588, 476, 2, 139, 269] +[:mouse_move, 630, 455, 2, 140, 270] +[:mouse_move, 682, 424, 2, 141, 271] +[:mouse_move, 733, 384, 2, 142, 272] +[:mouse_move, 774, 341, 2, 143, 273] +[:mouse_move, 811, 302, 2, 144, 274] +[:mouse_move, 825, 270, 2, 145, 275] +[:mouse_move, 828, 240, 2, 146, 276] +[:mouse_move, 824, 211, 2, 147, 277] +[:mouse_move, 810, 185, 2, 148, 278] +[:mouse_move, 799, 170, 2, 149, 279] +[:mouse_move, 793, 165, 2, 150, 280] +[:mouse_move, 787, 162, 2, 151, 281] +[:mouse_move, 779, 158, 2, 152, 282] +[:mouse_move, 768, 154, 2, 153, 283] +[:mouse_move, 759, 151, 2, 154, 284] +[:mouse_move, 757, 150, 2, 155, 285] +[:mouse_move, 757, 151, 2, 156, 288] +[:mouse_move, 765, 159, 2, 157, 289] +[:mouse_move, 775, 168, 2, 158, 290] +[:mouse_move, 790, 172, 2, 159, 291] +[:mouse_move, 812, 177, 2, 160, 292] +[:mouse_move, 859, 180, 2, 161, 293] +[:mouse_move, 902, 180, 2, 162, 294] +[:mouse_move, 944, 178, 2, 163, 295] +[:mouse_move, 985, 172, 2, 164, 296] +[:mouse_move, 1025, 163, 2, 165, 297] +[:mouse_move, 1053, 152, 2, 166, 298] +[:mouse_move, 1075, 142, 2, 167, 299] +[:mouse_move, 1090, 131, 2, 168, 300] +[:mouse_move, 1096, 121, 2, 169, 301] +[:mouse_move, 1096, 110, 2, 170, 302] +[:mouse_move, 1088, 96, 2, 171, 303] +[:mouse_move, 1065, 77, 2, 172, 304] +[:mouse_move, 1030, 58, 2, 173, 305] +[:mouse_move, 1014, 54, 2, 174, 306] +[:mouse_move, 999, 50, 2, 175, 307] +[:mouse_move, 978, 45, 2, 176, 308] +[:mouse_move, 951, 41, 2, 177, 309] +[:mouse_move, 912, 36, 2, 178, 310] +[:mouse_move, 870, 33, 2, 179, 311] +[:mouse_move, 833, 33, 2, 180, 312] +[:mouse_move, 809, 39, 2, 181, 313] +[:mouse_move, 793, 45, 2, 182, 314] +[:mouse_move, 782, 51, 2, 183, 315] +[:mouse_move, 777, 55, 2, 184, 316] +[:mouse_move, 776, 70, 2, 185, 317] +[:mouse_move, 784, 90, 2, 186, 318] +[:mouse_move, 802, 114, 2, 187, 319] +[:mouse_move, 827, 138, 2, 188, 320] +[:mouse_move, 865, 156, 2, 189, 321] +[:mouse_move, 905, 168, 2, 190, 322] +[:mouse_move, 942, 171, 2, 191, 323] +[:mouse_move, 972, 171, 2, 192, 324] +[:mouse_move, 992, 167, 2, 193, 325] +[:mouse_move, 1000, 157, 2, 194, 326] +[:mouse_move, 1000, 140, 2, 195, 327] +[:mouse_move, 982, 117, 2, 196, 328] +[:mouse_move, 958, 99, 2, 197, 329] +[:mouse_move, 903, 81, 2, 198, 330] +[:mouse_move, 880, 75, 2, 199, 331] +[:mouse_move, 763, 60, 2, 200, 332] +[:mouse_move, 716, 58, 2, 201, 333] +[:mouse_move, 604, 58, 2, 202, 334] +[:mouse_move, 440, 65, 2, 203, 335] +[:mouse_move, 355, 82, 2, 204, 336] +[:mouse_move, 282, 95, 2, 205, 337] +[:mouse_move, 221, 103, 2, 206, 338] +[:mouse_move, 179, 109, 2, 207, 339] +[:mouse_move, 146, 109, 2, 208, 340] +[:mouse_move, 128, 109, 2, 209, 341] +[:mouse_move, 116, 109, 2, 210, 342] +[:mouse_move, 112, 108, 2, 211, 343] +[:mouse_move, 115, 111, 2, 212, 349] +[:mouse_move, 117, 113, 2, 213, 350] +[:mouse_move, 118, 115, 2, 214, 351] +[:mouse_move, 118, 116, 2, 215, 352] +[:mouse_move, 119, 117, 2, 216, 353] +[:mouse_move, 123, 119, 2, 217, 354] +[:mouse_move, 127, 120, 2, 218, 355] +[:mouse_move, 128, 120, 2, 219, 356] +[:mouse_button_pressed, 1, 0, 1, 220, 369] +[:mouse_button_up, 1, 0, 1, 221, 372] +[:mouse_move, 131, 121, 2, 222, 399] +[:mouse_move, 147, 128, 2, 223, 400] +[:mouse_move, 165, 133, 2, 224, 401] +[:mouse_move, 186, 138, 2, 225, 402] +[:mouse_move, 210, 145, 2, 226, 403] +[:mouse_move, 231, 151, 2, 227, 404] +[:mouse_move, 252, 160, 2, 228, 405] +[:mouse_move, 276, 176, 2, 229, 406] +[:mouse_move, 304, 197, 2, 230, 407] +[:mouse_move, 332, 224, 2, 231, 408] +[:mouse_move, 352, 261, 2, 232, 409] +[:mouse_move, 360, 293, 2, 233, 410] +[:mouse_move, 365, 322, 2, 234, 411] +[:mouse_move, 366, 351, 2, 235, 412] +[:mouse_move, 358, 385, 2, 236, 413] +[:mouse_move, 344, 403, 2, 237, 414] +[:mouse_move, 331, 412, 2, 238, 415] +[:mouse_move, 318, 417, 2, 239, 416] +[:mouse_move, 307, 420, 2, 240, 417] +[:mouse_move, 303, 422, 2, 241, 418] +[:mouse_move, 302, 422, 2, 242, 419] +[:mouse_move, 301, 422, 2, 243, 421] +[:mouse_move, 298, 418, 2, 244, 422] +[:mouse_move, 295, 410, 2, 245, 423] +[:mouse_move, 295, 407, 2, 246, 424] +[:mouse_move, 293, 403, 2, 247, 425] +[:mouse_move, 293, 399, 2, 248, 426] +[:mouse_move, 293, 396, 2, 249, 427] +[:mouse_move, 294, 391, 2, 250, 428] +[:mouse_move, 300, 380, 2, 251, 429] +[:mouse_move, 306, 370, 2, 252, 430] +[:mouse_move, 315, 361, 2, 253, 431] +[:mouse_move, 318, 360, 2, 254, 432] +[:mouse_move, 319, 360, 2, 255, 433] +[:mouse_move, 321, 362, 2, 256, 434] +[:mouse_move, 321, 363, 2, 257, 435] +[:mouse_move, 322, 364, 2, 258, 439] +[:mouse_move, 333, 367, 2, 259, 440] +[:mouse_move, 357, 372, 2, 260, 441] +[:mouse_move, 387, 375, 2, 261, 442] +[:mouse_move, 426, 380, 2, 262, 443] +[:mouse_move, 468, 387, 2, 263, 444] +[:mouse_move, 506, 389, 2, 264, 445] +[:mouse_move, 539, 389, 2, 265, 446] +[:mouse_move, 570, 387, 2, 266, 447] +[:mouse_move, 593, 381, 2, 267, 448] +[:mouse_move, 614, 376, 2, 268, 449] +[:mouse_move, 622, 376, 2, 269, 450] +[:mouse_move, 626, 377, 2, 270, 451] +[:mouse_move, 628, 379, 2, 271, 452] +[:mouse_move, 628, 382, 2, 272, 453] +[:mouse_move, 627, 388, 2, 273, 454] +[:mouse_move, 621, 400, 2, 274, 455] +[:mouse_move, 609, 411, 2, 275, 456] +[:mouse_move, 594, 422, 2, 276, 457] +[:mouse_move, 573, 429, 2, 277, 458] +[:mouse_move, 551, 433, 2, 278, 459] +[:mouse_move, 523, 437, 2, 279, 460] +[:mouse_move, 481, 440, 2, 280, 461] +[:mouse_move, 453, 439, 2, 281, 462] +[:mouse_move, 425, 432, 2, 282, 463] +[:mouse_move, 393, 423, 2, 283, 464] +[:mouse_move, 368, 416, 2, 284, 465] +[:mouse_move, 353, 415, 2, 285, 466] +[:mouse_move, 343, 413, 2, 286, 467] +[:mouse_move, 337, 409, 2, 287, 468] +[:mouse_move, 332, 405, 2, 288, 469] +[:mouse_move, 327, 395, 2, 289, 470] +[:mouse_move, 324, 382, 2, 290, 471] +[:mouse_move, 324, 375, 2, 291, 472] +[:mouse_move, 336, 367, 2, 292, 473] +[:mouse_move, 351, 361, 2, 293, 474] +[:mouse_move, 369, 357, 2, 294, 475] +[:mouse_move, 388, 356, 2, 295, 476] +[:mouse_move, 405, 353, 2, 296, 477] +[:mouse_move, 423, 352, 2, 297, 478] +[:mouse_move, 441, 355, 2, 298, 479] +[:mouse_move, 464, 367, 2, 299, 480] +[:mouse_move, 482, 380, 2, 300, 481] +[:mouse_move, 494, 395, 2, 301, 482] +[:mouse_move, 496, 405, 2, 302, 483] +[:mouse_move, 491, 413, 2, 303, 484] +[:mouse_move, 467, 428, 2, 304, 485] +[:mouse_move, 447, 439, 2, 305, 486] +[:mouse_move, 427, 447, 2, 306, 487] +[:mouse_move, 407, 450, 2, 307, 488] +[:mouse_move, 385, 450, 2, 308, 489] +[:mouse_move, 361, 449, 2, 309, 490] +[:mouse_move, 345, 447, 2, 310, 491] +[:mouse_move, 332, 441, 2, 311, 492] +[:mouse_move, 321, 434, 2, 312, 493] +[:mouse_move, 312, 424, 2, 313, 494] +[:mouse_move, 307, 412, 2, 314, 495] +[:mouse_move, 306, 401, 2, 315, 496] +[:mouse_move, 310, 384, 2, 316, 497] +[:mouse_move, 322, 369, 2, 317, 498] +[:mouse_move, 346, 357, 2, 318, 499] +[:mouse_move, 388, 346, 2, 319, 500] +[:mouse_move, 434, 332, 2, 320, 501] +[:mouse_move, 500, 314, 2, 321, 502] +[:mouse_move, 564, 295, 2, 322, 503] +[:mouse_move, 630, 276, 2, 323, 504] +[:mouse_move, 676, 262, 2, 324, 505] +[:mouse_move, 716, 248, 2, 325, 506] +[:mouse_move, 753, 232, 2, 326, 507] +[:mouse_move, 785, 217, 2, 327, 508] +[:mouse_move, 820, 194, 2, 328, 509] +[:mouse_move, 831, 186, 2, 329, 510] +[:mouse_move, 832, 185, 2, 330, 511] +[:mouse_move, 833, 184, 2, 331, 512] +[:mouse_move, 834, 186, 2, 332, 518] +[:mouse_move, 835, 189, 2, 333, 519] +[:mouse_move, 833, 190, 2, 334, 521] +[:mouse_move, 821, 188, 2, 335, 522] +[:mouse_move, 793, 174, 2, 336, 523] +[:mouse_move, 753, 152, 2, 337, 524] +[:mouse_move, 725, 132, 2, 338, 525] +[:mouse_move, 715, 117, 2, 339, 526] +[:mouse_move, 710, 93, 2, 340, 527] +[:mouse_move, 709, 69, 2, 341, 528] +[:mouse_move, 713, 47, 2, 342, 529] +[:mouse_move, 730, 29, 2, 343, 530] +[:mouse_move, 763, 18, 2, 344, 531] +[:mouse_move, 812, 16, 2, 345, 532] +[:mouse_move, 894, 24, 2, 346, 533] +[:mouse_move, 965, 43, 2, 347, 534] +[:mouse_move, 1015, 64, 2, 348, 535] +[:mouse_move, 1049, 80, 2, 349, 536] +[:mouse_move, 1070, 97, 2, 350, 537] +[:mouse_move, 1079, 114, 2, 351, 538] +[:mouse_move, 1079, 126, 2, 352, 539] +[:mouse_move, 1071, 139, 2, 353, 540] +[:mouse_move, 1052, 147, 2, 354, 541] +[:mouse_move, 1026, 151, 2, 355, 542] +[:mouse_move, 986, 152, 2, 356, 543] +[:mouse_move, 937, 152, 2, 357, 544] +[:mouse_move, 835, 143, 2, 358, 545] +[:mouse_move, 768, 125, 2, 359, 546] +[:mouse_move, 711, 105, 2, 360, 547] +[:mouse_move, 667, 86, 2, 361, 548] +[:mouse_move, 639, 74, 2, 362, 549] +[:mouse_move, 630, 69, 2, 363, 550] +[:mouse_move, 630, 64, 2, 364, 551] +[:mouse_move, 638, 53, 2, 365, 552] +[:mouse_move, 659, 41, 2, 366, 553] +[:mouse_move, 688, 33, 2, 367, 554] +[:mouse_move, 723, 23, 2, 368, 555] +[:mouse_move, 759, 19, 2, 369, 556] +[:mouse_move, 810, 19, 2, 370, 557] +[:mouse_move, 840, 25, 2, 371, 558] +[:mouse_move, 866, 37, 2, 372, 559] +[:mouse_move, 878, 47, 2, 373, 560] +[:mouse_move, 878, 57, 2, 374, 561] +[:mouse_move, 866, 69, 2, 375, 562] +[:mouse_move, 835, 76, 2, 376, 563] +[:mouse_move, 783, 77, 2, 377, 564] +[:mouse_move, 722, 77, 2, 378, 565] +[:mouse_move, 652, 77, 2, 379, 566] +[:mouse_move, 559, 67, 2, 380, 567] +[:mouse_move, 445, 36, 2, 381, 568] +[:mouse_move, 274, 0, 2, 382, 569] +[:mouse_move, 110, 0, 2, 383, 598] +[:mouse_move, 131, 5, 2, 384, 599] +[:mouse_move, 162, 14, 2, 385, 600] +[:mouse_move, 201, 24, 2, 386, 601] +[:mouse_move, 244, 32, 2, 387, 602] +[:key_down_raw, 96, 0, 2, 388, 602] +[:mouse_move, 288, 38, 2, 389, 603] +[:mouse_move, 338, 46, 2, 390, 604] +[:mouse_move, 422, 70, 2, 391, 605] +[:mouse_move, 490, 90, 2, 392, 606] +[:mouse_move, 553, 113, 2, 393, 607] +[:key_up_raw, 96, 0, 2, 394, 608] +[:mouse_move, 600, 129, 2, 395, 608] +[:mouse_move, 638, 146, 2, 396, 609] +[:mouse_move, 663, 159, 2, 397, 610] +[:mouse_move, 686, 168, 2, 398, 611] +[:mouse_move, 708, 177, 2, 399, 612] +[:mouse_move, 725, 184, 2, 400, 613] +[:mouse_move, 733, 189, 2, 401, 614] +[:mouse_move, 735, 189, 2, 402, 615] +[:mouse_move, 729, 189, 2, 403, 616] +[:mouse_move, 704, 185, 2, 404, 617] +[:mouse_move, 721, 189, 2, 405, 628] +[:mouse_move, 744, 191, 2, 406, 629] +[:mouse_move, 745, 191, 2, 407, 630] +[:mouse_move, 744, 191, 2, 408, 637] +[:mouse_move, 743, 191, 2, 409, 638] +[:mouse_move, 744, 191, 2, 410, 665] +[:key_down_raw, 13, 0, 2, 411, 680] diff --git a/samples/12_c_extensions/.gitignore b/samples/12_c_extensions/.gitignore new file mode 100644 index 0000000..a90a836 --- /dev/null +++ b/samples/12_c_extensions/.gitignore @@ -0,0 +1,2 @@ +ext.dylib + diff --git a/samples/12_c_extensions/01_basics/native/ext-bindings.c b/samples/12_c_extensions/01_basics/native/ext-bindings.c index c805961..86b7090 100644 --- a/samples/12_c_extensions/01_basics/native/ext-bindings.c +++ b/samples/12_c_extensions/01_basics/native/ext-bindings.c @@ -14,7 +14,13 @@ #undef mrb_int #endif +void *(*drb_symbol_lookup)(const char *sym) = NULL; + static void (*drb_free_foreign_object_f)(mrb_state *, void *); +static void (*drb_typecheck_float_f)(mrb_state *, mrb_value); +static void (*drb_typecheck_int_f)(mrb_state *, mrb_value); +static void (*drb_typecheck_bool_f)(mrb_state *, mrb_value); +static void (*drb_typecheck_aggregate_f)(mrb_state *, mrb_value, struct RClass *, mrb_data_type *); static struct RClass *(*mrb_module_get_f)(mrb_state *, const char *); static mrb_int (*mrb_get_args_f)(mrb_state *, mrb_args_format, ...); static struct RClass *(*mrb_module_get_under_f)(mrb_state *, struct RClass *, const char *); @@ -27,7 +33,13 @@ static void (*mrb_define_class_method_f)(mrb_state *, struct RClass *, const cha static struct RData *(*mrb_data_object_alloc_f)(mrb_state *, struct RClass *, void *, const mrb_data_type *); static mrb_value (*mrb_str_new_cstr_f)(mrb_state *, const char *); static void (*mrb_raise_f)(mrb_state *, struct RClass *, const char *); +static mrb_value (*drb_float_value_f)(mrb_state *, mrb_float); +static struct RClass *(*drb_getruntime_error_f)(mrb_state *); +static void drb_free_foreign_object_indirect(mrb_state *state, void *pointer) { + drb_free_foreign_object_f(state, pointer); +} static int drb_ffi__ZTSi_FromRuby(mrb_state *state, mrb_value self) { + drb_typecheck_int_f(state, self); return mrb_fixnum(self); } static mrb_value drb_ffi__ZTSi_ToRuby(mrb_state *state, int value) { @@ -51,18 +63,25 @@ void drb_register_c_extensions(void *(*lookup)(const char *), mrb_state *state, mrb_define_module_function_f(state, module, "square", drb_ffi_square_Binding, MRB_ARGS_REQ(1)); } static int drb_ffi_init_indirect_functions(void *(*lookup)(const char *fnname)) { - if (!(mrb_raise_f = (void (*)(mrb_state *, struct RClass *, const char *)) lookup("mrb_raise"))) return -1; - if (!(mrb_module_get_f = (struct RClass *(*)(mrb_state *, const char *)) lookup("mrb_module_get"))) return -1; - if (!(mrb_class_get_under_f = (struct RClass *(*)(mrb_state *, struct RClass *, const char *)) lookup("mrb_class_get_under"))) return -1; - if (!(mrb_get_args_f = (mrb_int (*)(mrb_state *, mrb_args_format, ...)) lookup("mrb_get_args"))) return -1; + drb_symbol_lookup = lookup; + if (!(drb_float_value_f = (mrb_value (*)(mrb_state *, mrb_float)) lookup("drb_float_value"))) return -1; if (!(drb_free_foreign_object_f = (void (*)(mrb_state *, void *)) lookup("drb_free_foreign_object"))) return -1; - if (!(mrb_define_module_under_f = (struct RClass *(*)(mrb_state *, struct RClass *, const char *)) lookup("mrb_define_module_under"))) return -1; - if (!(mrb_str_new_cstr_f = (mrb_value (*)(mrb_state *, const char *)) lookup("mrb_str_new_cstr"))) return -1; + if (!(drb_getruntime_error_f = (struct RClass *(*)(mrb_state *)) lookup("drb_getruntime_error"))) return -1; + if (!(drb_typecheck_aggregate_f = (void (*)(mrb_state *, mrb_value, struct RClass *, mrb_data_type *)) lookup("drb_typecheck_aggregate"))) return -1; + if (!(drb_typecheck_bool_f = (void (*)(mrb_state *, mrb_value)) lookup("drb_typecheck_bool"))) return -1; + if (!(drb_typecheck_float_f = (void (*)(mrb_state *, mrb_value)) lookup("drb_typecheck_float"))) return -1; + if (!(drb_typecheck_int_f = (void (*)(mrb_state *, mrb_value)) lookup("drb_typecheck_int"))) return -1; + if (!(mrb_class_get_under_f = (struct RClass *(*)(mrb_state *, struct RClass *, const char *)) lookup("mrb_class_get_under"))) return -1; + if (!(mrb_data_object_alloc_f = (struct RData *(*)(mrb_state *, struct RClass *, void *, const mrb_data_type *)) lookup("mrb_data_object_alloc"))) return -1; + if (!(mrb_define_class_method_f = (void (*)(mrb_state *, struct RClass *, const char *, mrb_func_t, mrb_aspec)) lookup("mrb_define_class_method"))) return -1; if (!(mrb_define_class_under_f = (struct RClass *(*)(mrb_state *, struct RClass *, const char *, struct RClass *)) lookup("mrb_define_class_under"))) return -1; + if (!(mrb_define_method_f = (void (*)(mrb_state *, struct RClass *, const char *, mrb_func_t, mrb_aspec)) lookup("mrb_define_method"))) return -1; if (!(mrb_define_module_function_f = (void (*)(mrb_state *, struct RClass *, const char *, mrb_func_t, mrb_aspec)) lookup("mrb_define_module_function"))) return -1; - if (!(mrb_data_object_alloc_f = (struct RData *(*)(mrb_state *, struct RClass *, void *, const mrb_data_type *)) lookup("mrb_data_object_alloc"))) return -1; + if (!(mrb_define_module_under_f = (struct RClass *(*)(mrb_state *, struct RClass *, const char *)) lookup("mrb_define_module_under"))) return -1; + if (!(mrb_get_args_f = (mrb_int (*)(mrb_state *, mrb_args_format, ...)) lookup("mrb_get_args"))) return -1; + if (!(mrb_module_get_f = (struct RClass *(*)(mrb_state *, const char *)) lookup("mrb_module_get"))) return -1; if (!(mrb_module_get_under_f = (struct RClass *(*)(mrb_state *, struct RClass *, const char *)) lookup("mrb_module_get_under"))) return -1; - if (!(mrb_define_method_f = (void (*)(mrb_state *, struct RClass *, const char *, mrb_func_t, mrb_aspec)) lookup("mrb_define_method"))) return -1; - if (!(mrb_define_class_method_f = (void (*)(mrb_state *, struct RClass *, const char *, mrb_func_t, mrb_aspec)) lookup("mrb_define_class_method"))) return -1; + if (!(mrb_raise_f = (void (*)(mrb_state *, struct RClass *, const char *)) lookup("mrb_raise"))) return -1; + if (!(mrb_str_new_cstr_f = (mrb_value (*)(mrb_state *, const char *)) lookup("mrb_str_new_cstr"))) return -1; return 0; } diff --git a/samples/12_c_extensions/02_intermediate/native/re-bindings.c b/samples/12_c_extensions/02_intermediate/native/re-bindings.c index 6aa5630..6bd9869 100644 --- a/samples/12_c_extensions/02_intermediate/native/re-bindings.c +++ b/samples/12_c_extensions/02_intermediate/native/re-bindings.c @@ -14,7 +14,13 @@ #undef mrb_int #endif +void *(*drb_symbol_lookup)(const char *sym) = NULL; + static void (*drb_free_foreign_object_f)(mrb_state *, void *); +static void (*drb_typecheck_float_f)(mrb_state *, mrb_value); +static void (*drb_typecheck_int_f)(mrb_state *, mrb_value); +static void (*drb_typecheck_bool_f)(mrb_state *, mrb_value); +static void (*drb_typecheck_aggregate_f)(mrb_state *, mrb_value, struct RClass *, mrb_data_type *); static struct RClass *(*mrb_module_get_f)(mrb_state *, const char *); static mrb_int (*mrb_get_args_f)(mrb_state *, mrb_args_format, ...); static struct RClass *(*mrb_module_get_under_f)(mrb_state *, struct RClass *, const char *); @@ -27,10 +33,18 @@ static void (*mrb_define_class_method_f)(mrb_state *, struct RClass *, const cha static struct RData *(*mrb_data_object_alloc_f)(mrb_state *, struct RClass *, void *, const mrb_data_type *); static mrb_value (*mrb_str_new_cstr_f)(mrb_state *, const char *); static void (*mrb_raise_f)(mrb_state *, struct RClass *, const char *); -static struct RClass *(*mrb_exc_get_f)(mrb_state *, const char *); +static mrb_value (*drb_float_value_f)(mrb_state *, mrb_float); +static struct RClass *(*drb_getruntime_error_f)(mrb_state *); static void drb_free_foreign_object_indirect(mrb_state *state, void *pointer) { drb_free_foreign_object_f(state, pointer); } +static int drb_ffi__ZTSi_FromRuby(mrb_state *state, mrb_value self) { + drb_typecheck_int_f(state, self); + return mrb_fixnum(self); +} +static mrb_value drb_ffi__ZTSi_ToRuby(mrb_state *state, int value) { + return mrb_fixnum_value(value); +} struct drb_foreign_object_ZTSP7regex_t { drb_foreign_object_kind kind; struct regex_t *value; @@ -40,6 +54,10 @@ static mrb_data_type ForeignObjectType_ZTSP7regex_t = {"regex_t*", drb_free_fore static struct regex_t *drb_ffi__ZTSP7regex_t_FromRuby(mrb_state *state, mrb_value self) { if (mrb_nil_p(self)) return 0; + struct RClass *FFI = mrb_module_get_f(state, "FFI"); + struct RClass *module = mrb_module_get_under_f(state, FFI, "RE"); + struct RClass *klass = mrb_class_get_under_f(state, module, "Regex_tPointer"); + drb_typecheck_aggregate_f(state, self, klass, &ForeignObjectType_ZTSP7regex_t); return ((struct drb_foreign_object_ZTSP7regex_t *)DATA_PTR(self))->value; } static mrb_value drb_ffi__ZTSP7regex_t_ToRuby(mrb_state *state, struct regex_t *value) { @@ -63,6 +81,10 @@ static char *drb_ffi__ZTSPc_FromRuby(mrb_state *state, mrb_value self) { return 0; if (mrb_type(self) == MRB_TT_STRING) return RSTRING_PTR(self); + struct RClass *FFI = mrb_module_get_f(state, "FFI"); + struct RClass *module = mrb_module_get_under_f(state, FFI, "RE"); + struct RClass *klass = mrb_class_get_under_f(state, module, "CharPointer"); + drb_typecheck_aggregate_f(state, self, klass, &ForeignObjectType_ZTSPc); return ((struct drb_foreign_object_ZTSPc *)DATA_PTR(self))->value; } static mrb_value drb_ffi__ZTSPc_ToRuby(mrb_state *state, char *value) { @@ -75,12 +97,6 @@ static mrb_value drb_ffi__ZTSPc_ToRuby(mrb_state *state, char *value) { struct RData *rdata = mrb_data_object_alloc_f(state, klass, ptr, &ForeignObjectType_ZTSPc); return mrb_obj_value(rdata); } -static int drb_ffi__ZTSi_FromRuby(mrb_state *state, mrb_value self) { - return mrb_fixnum(self); -} -static mrb_value drb_ffi__ZTSi_ToRuby(mrb_state *state, int value) { - return mrb_fixnum_value(value); -} struct drb_foreign_object_ZTSPi { drb_foreign_object_kind kind; int *value; @@ -90,6 +106,10 @@ static mrb_data_type ForeignObjectType_ZTSPi = {"int*", drb_free_foreign_object_ static int *drb_ffi__ZTSPi_FromRuby(mrb_state *state, mrb_value self) { if (mrb_nil_p(self)) return 0; + struct RClass *FFI = mrb_module_get_f(state, "FFI"); + struct RClass *module = mrb_module_get_under_f(state, FFI, "RE"); + struct RClass *klass = mrb_class_get_under_f(state, module, "IntPointer"); + drb_typecheck_aggregate_f(state, self, klass, &ForeignObjectType_ZTSPi); return ((struct drb_foreign_object_ZTSPi *)DATA_PTR(self))->value; } static mrb_value drb_ffi__ZTSPi_ToRuby(mrb_state *state, int *value) { @@ -103,17 +123,18 @@ static mrb_value drb_ffi__ZTSPi_ToRuby(mrb_state *state, int *value) { return mrb_obj_value(rdata); } static char drb_ffi__ZTSc_FromRuby(mrb_state *state, mrb_value self) { + drb_typecheck_int_f(state, self); return mrb_fixnum(self); } static mrb_value drb_ffi__ZTSc_ToRuby(mrb_state *state, char value) { return mrb_fixnum_value(value); } static mrb_value drb_ffi__ZTSP7regex_t_New(mrb_state *mrb, mrb_value self) { - mrb_raise_f(mrb, mrb_exc_get_f(mrb, "RuntimeError"), "Cannot allocate pointer of incomplete type"); + mrb_raise_f(mrb, drb_getruntime_error_f(mrb), "Cannot allocate pointer of incomplete type"); return mrb_nil_value(); } static mrb_value drb_ffi__ZTSP7regex_t_GetValue(mrb_state *mrb, mrb_value value) { - mrb_raise_f(mrb, mrb_exc_get_f(mrb, "RuntimeError"), "Cannot access value of incomplete type"); + mrb_raise_f(mrb, drb_getruntime_error_f(mrb), "Cannot access value of incomplete type"); return mrb_nil_value(); } static mrb_value drb_ffi__ZTSP7regex_t_IsNil(mrb_state *state, mrb_value self) { @@ -123,11 +144,11 @@ static mrb_value drb_ffi__ZTSP7regex_t_IsNil(mrb_state *state, mrb_value self) { return mrb_false_value(); } static mrb_value drb_ffi__ZTSP7regex_t_GetAt(mrb_state *mrb, mrb_value self) { - mrb_raise_f(mrb, mrb_exc_get_f(mrb, "RuntimeError"), "Cannot access value of incomplete type"); + mrb_raise_f(mrb, drb_getruntime_error_f(mrb), "Cannot access value of incomplete type"); return mrb_nil_value(); } static mrb_value drb_ffi__ZTSP7regex_t_SetAt(mrb_state *mrb, mrb_value self) { - mrb_raise_f(mrb, mrb_exc_get_f(mrb, "RuntimeError"), "Cannot change value of incomplete type"); + mrb_raise_f(mrb, drb_getruntime_error_f(mrb), "Cannot change value of incomplete type"); return mrb_nil_value(); } static mrb_value drb_ffi__ZTSPc_New(mrb_state *mrb, mrb_value self) { @@ -264,19 +285,25 @@ void drb_register_c_extensions(void *(*lookup)(const char *), mrb_state *state, mrb_define_method_f(state, IntPointerClass, "nil?", drb_ffi__ZTSPi_IsNil, MRB_ARGS_REQ(0)); } static int drb_ffi_init_indirect_functions(void *(*lookup)(const char *fnname)) { - if (!(mrb_raise_f = (void (*)(mrb_state *, struct RClass *, const char *)) lookup("mrb_raise"))) return -1; - if (!(mrb_str_new_cstr_f = (mrb_value (*)(mrb_state *, const char *)) lookup("mrb_str_new_cstr"))) return -1; - if (!(mrb_define_class_under_f = (struct RClass *(*)(mrb_state *, struct RClass *, const char *, struct RClass *)) lookup("mrb_define_class_under"))) return -1; - if (!(mrb_define_class_method_f = (void (*)(mrb_state *, struct RClass *, const char *, mrb_func_t, mrb_aspec)) lookup("mrb_define_class_method"))) return -1; - if (!(mrb_class_get_under_f = (struct RClass *(*)(mrb_state *, struct RClass *, const char *)) lookup("mrb_class_get_under"))) return -1; - if (!(mrb_module_get_under_f = (struct RClass *(*)(mrb_state *, struct RClass *, const char *)) lookup("mrb_module_get_under"))) return -1; + drb_symbol_lookup = lookup; + if (!(drb_float_value_f = (mrb_value (*)(mrb_state *, mrb_float)) lookup("drb_float_value"))) return -1; if (!(drb_free_foreign_object_f = (void (*)(mrb_state *, void *)) lookup("drb_free_foreign_object"))) return -1; + if (!(drb_getruntime_error_f = (struct RClass *(*)(mrb_state *)) lookup("drb_getruntime_error"))) return -1; + if (!(drb_typecheck_aggregate_f = (void (*)(mrb_state *, mrb_value, struct RClass *, mrb_data_type *)) lookup("drb_typecheck_aggregate"))) return -1; + if (!(drb_typecheck_bool_f = (void (*)(mrb_state *, mrb_value)) lookup("drb_typecheck_bool"))) return -1; + if (!(drb_typecheck_float_f = (void (*)(mrb_state *, mrb_value)) lookup("drb_typecheck_float"))) return -1; + if (!(drb_typecheck_int_f = (void (*)(mrb_state *, mrb_value)) lookup("drb_typecheck_int"))) return -1; + if (!(mrb_class_get_under_f = (struct RClass *(*)(mrb_state *, struct RClass *, const char *)) lookup("mrb_class_get_under"))) return -1; if (!(mrb_data_object_alloc_f = (struct RData *(*)(mrb_state *, struct RClass *, void *, const mrb_data_type *)) lookup("mrb_data_object_alloc"))) return -1; - if (!(mrb_get_args_f = (mrb_int (*)(mrb_state *, mrb_args_format, ...)) lookup("mrb_get_args"))) return -1; - if (!(mrb_module_get_f = (struct RClass *(*)(mrb_state *, const char *)) lookup("mrb_module_get"))) return -1; + if (!(mrb_define_class_method_f = (void (*)(mrb_state *, struct RClass *, const char *, mrb_func_t, mrb_aspec)) lookup("mrb_define_class_method"))) return -1; + if (!(mrb_define_class_under_f = (struct RClass *(*)(mrb_state *, struct RClass *, const char *, struct RClass *)) lookup("mrb_define_class_under"))) return -1; if (!(mrb_define_method_f = (void (*)(mrb_state *, struct RClass *, const char *, mrb_func_t, mrb_aspec)) lookup("mrb_define_method"))) return -1; - if (!(mrb_exc_get_f = (struct RClass *(*)(mrb_state *, const char *)) lookup("mrb_exc_get"))) return -1; if (!(mrb_define_module_function_f = (void (*)(mrb_state *, struct RClass *, const char *, mrb_func_t, mrb_aspec)) lookup("mrb_define_module_function"))) return -1; if (!(mrb_define_module_under_f = (struct RClass *(*)(mrb_state *, struct RClass *, const char *)) lookup("mrb_define_module_under"))) return -1; + if (!(mrb_get_args_f = (mrb_int (*)(mrb_state *, mrb_args_format, ...)) lookup("mrb_get_args"))) return -1; + if (!(mrb_module_get_f = (struct RClass *(*)(mrb_state *, const char *)) lookup("mrb_module_get"))) return -1; + if (!(mrb_module_get_under_f = (struct RClass *(*)(mrb_state *, struct RClass *, const char *)) lookup("mrb_module_get_under"))) return -1; + if (!(mrb_raise_f = (void (*)(mrb_state *, struct RClass *, const char *)) lookup("mrb_raise"))) return -1; + if (!(mrb_str_new_cstr_f = (mrb_value (*)(mrb_state *, const char *)) lookup("mrb_str_new_cstr"))) return -1; return 0; } diff --git a/samples/12_c_extensions/03_native_pixel_arrays/native/ext-bindings.c b/samples/12_c_extensions/03_native_pixel_arrays/native/ext-bindings.c index c0a923c..bdba6e7 100644 --- a/samples/12_c_extensions/03_native_pixel_arrays/native/ext-bindings.c +++ b/samples/12_c_extensions/03_native_pixel_arrays/native/ext-bindings.c @@ -17,6 +17,10 @@ void *(*drb_symbol_lookup)(const char *sym) = NULL; static void (*drb_free_foreign_object_f)(mrb_state *, void *); +static void (*drb_typecheck_float_f)(mrb_state *, mrb_value); +static void (*drb_typecheck_int_f)(mrb_state *, mrb_value); +static void (*drb_typecheck_bool_f)(mrb_state *, mrb_value); +static void (*drb_typecheck_aggregate_f)(mrb_state *, mrb_value, struct RClass *, mrb_data_type *); static struct RClass *(*mrb_module_get_f)(mrb_state *, const char *); static mrb_int (*mrb_get_args_f)(mrb_state *, mrb_args_format, ...); static struct RClass *(*mrb_module_get_under_f)(mrb_state *, struct RClass *, const char *); @@ -29,10 +33,18 @@ static void (*mrb_define_class_method_f)(mrb_state *, struct RClass *, const cha static struct RData *(*mrb_data_object_alloc_f)(mrb_state *, struct RClass *, void *, const mrb_data_type *); static mrb_value (*mrb_str_new_cstr_f)(mrb_state *, const char *); static void (*mrb_raise_f)(mrb_state *, struct RClass *, const char *); -static struct RClass *(*mrb_exc_get_f)(mrb_state *, const char *); +static mrb_value (*drb_float_value_f)(mrb_state *, mrb_float); +static struct RClass *(*drb_getruntime_error_f)(mrb_state *); static void drb_free_foreign_object_indirect(mrb_state *state, void *pointer) { drb_free_foreign_object_f(state, pointer); } +static int drb_ffi__ZTSi_FromRuby(mrb_state *state, mrb_value self) { + drb_typecheck_int_f(state, self); + return mrb_fixnum(self); +} +static mrb_value drb_ffi__ZTSi_ToRuby(mrb_state *state, int value) { + return mrb_fixnum_value(value); +} static mrb_value drb_ffi_update_scanner_texture_Binding(mrb_state *state, mrb_value value) { update_scanner_texture(); return mrb_nil_value(); @@ -48,19 +60,24 @@ void drb_register_c_extensions(void *(*lookup)(const char *), mrb_state *state, } static int drb_ffi_init_indirect_functions(void *(*lookup)(const char *fnname)) { drb_symbol_lookup = lookup; - if (!(mrb_exc_get_f = (struct RClass *(*)(mrb_state *, const char *)) lookup("mrb_exc_get"))) return -1; - if (!(mrb_raise_f = (void (*)(mrb_state *, struct RClass *, const char *)) lookup("mrb_raise"))) return -1; - if (!(mrb_class_get_under_f = (struct RClass *(*)(mrb_state *, struct RClass *, const char *)) lookup("mrb_class_get_under"))) return -1; - if (!(mrb_module_get_under_f = (struct RClass *(*)(mrb_state *, struct RClass *, const char *)) lookup("mrb_module_get_under"))) return -1; + if (!(drb_float_value_f = (mrb_value (*)(mrb_state *, mrb_float)) lookup("drb_float_value"))) return -1; if (!(drb_free_foreign_object_f = (void (*)(mrb_state *, void *)) lookup("drb_free_foreign_object"))) return -1; - if (!(mrb_module_get_f = (struct RClass *(*)(mrb_state *, const char *)) lookup("mrb_module_get"))) return -1; - if (!(mrb_define_module_under_f = (struct RClass *(*)(mrb_state *, struct RClass *, const char *)) lookup("mrb_define_module_under"))) return -1; + if (!(drb_getruntime_error_f = (struct RClass *(*)(mrb_state *)) lookup("drb_getruntime_error"))) return -1; + if (!(drb_typecheck_aggregate_f = (void (*)(mrb_state *, mrb_value, struct RClass *, mrb_data_type *)) lookup("drb_typecheck_aggregate"))) return -1; + if (!(drb_typecheck_bool_f = (void (*)(mrb_state *, mrb_value)) lookup("drb_typecheck_bool"))) return -1; + if (!(drb_typecheck_float_f = (void (*)(mrb_state *, mrb_value)) lookup("drb_typecheck_float"))) return -1; + if (!(drb_typecheck_int_f = (void (*)(mrb_state *, mrb_value)) lookup("drb_typecheck_int"))) return -1; + if (!(mrb_class_get_under_f = (struct RClass *(*)(mrb_state *, struct RClass *, const char *)) lookup("mrb_class_get_under"))) return -1; if (!(mrb_data_object_alloc_f = (struct RData *(*)(mrb_state *, struct RClass *, void *, const mrb_data_type *)) lookup("mrb_data_object_alloc"))) return -1; + if (!(mrb_define_class_method_f = (void (*)(mrb_state *, struct RClass *, const char *, mrb_func_t, mrb_aspec)) lookup("mrb_define_class_method"))) return -1; + if (!(mrb_define_class_under_f = (struct RClass *(*)(mrb_state *, struct RClass *, const char *, struct RClass *)) lookup("mrb_define_class_under"))) return -1; + if (!(mrb_define_method_f = (void (*)(mrb_state *, struct RClass *, const char *, mrb_func_t, mrb_aspec)) lookup("mrb_define_method"))) return -1; if (!(mrb_define_module_function_f = (void (*)(mrb_state *, struct RClass *, const char *, mrb_func_t, mrb_aspec)) lookup("mrb_define_module_function"))) return -1; + if (!(mrb_define_module_under_f = (struct RClass *(*)(mrb_state *, struct RClass *, const char *)) lookup("mrb_define_module_under"))) return -1; if (!(mrb_get_args_f = (mrb_int (*)(mrb_state *, mrb_args_format, ...)) lookup("mrb_get_args"))) return -1; - if (!(mrb_define_method_f = (void (*)(mrb_state *, struct RClass *, const char *, mrb_func_t, mrb_aspec)) lookup("mrb_define_method"))) return -1; - if (!(mrb_define_class_method_f = (void (*)(mrb_state *, struct RClass *, const char *, mrb_func_t, mrb_aspec)) lookup("mrb_define_class_method"))) return -1; + if (!(mrb_module_get_f = (struct RClass *(*)(mrb_state *, const char *)) lookup("mrb_module_get"))) return -1; + if (!(mrb_module_get_under_f = (struct RClass *(*)(mrb_state *, struct RClass *, const char *)) lookup("mrb_module_get_under"))) return -1; + if (!(mrb_raise_f = (void (*)(mrb_state *, struct RClass *, const char *)) lookup("mrb_raise"))) return -1; if (!(mrb_str_new_cstr_f = (mrb_value (*)(mrb_state *, const char *)) lookup("mrb_str_new_cstr"))) return -1; - if (!(mrb_define_class_under_f = (struct RClass *(*)(mrb_state *, struct RClass *, const char *, struct RClass *)) lookup("mrb_define_class_under"))) return -1; return 0; } diff --git a/samples/13_path_finding_algorithms/01_breadth_first_search/replay.txt b/samples/13_path_finding_algorithms/01_breadth_first_search/replay.txt new file mode 100644 index 0000000..62f4aca --- /dev/null +++ b/samples/13_path_finding_algorithms/01_breadth_first_search/replay.txt @@ -0,0 +1,203 @@ +replay_version 2.0 +stopped_at 213 +seed 100 +recorded_at 2021-11-20 11:17:21 -0600 +[:mouse_button_up, 1, 0, 1, 1, 4] +[:mouse_move, 780, 95, 2, 2, 11] +[:mouse_move, 781, 95, 2, 3, 12] +[:mouse_move, 782, 95, 2, 4, 13] +[:mouse_move, 783, 95, 2, 5, 14] +[:mouse_move, 771, 95, 2, 6, 32] +[:mouse_move, 752, 95, 2, 7, 32] +[:mouse_move, 718, 95, 2, 8, 34] +[:mouse_move, 652, 95, 2, 9, 34] +[:mouse_move, 549, 95, 2, 10, 35] +[:mouse_move, 462, 101, 2, 11, 36] +[:mouse_move, 425, 106, 2, 12, 37] +[:mouse_move, 405, 108, 2, 13, 38] +[:mouse_move, 406, 109, 2, 14, 39] +[:mouse_move, 412, 111, 2, 15, 40] +[:mouse_move, 429, 111, 2, 16, 41] +[:mouse_move, 450, 109, 2, 17, 42] +[:mouse_move, 460, 107, 2, 18, 42] +[:mouse_move, 460, 106, 2, 19, 43] +[:mouse_move, 460, 105, 2, 20, 45] +[:mouse_move, 460, 104, 2, 21, 46] +[:mouse_move, 456, 104, 2, 22, 47] +[:mouse_move, 469, 104, 2, 23, 49] +[:mouse_move, 489, 103, 2, 24, 50] +[:mouse_move, 512, 100, 2, 25, 51] +[:mouse_move, 536, 96, 2, 26, 52] +[:mouse_move, 565, 92, 2, 27, 52] +[:mouse_move, 587, 92, 2, 28, 53] +[:mouse_move, 597, 92, 2, 29, 54] +[:mouse_move, 599, 92, 2, 30, 55] +[:mouse_button_pressed, 1, 0, 1, 31, 59] +[:mouse_button_up, 1, 0, 1, 32, 62] +[:mouse_move, 599, 91, 2, 33, 65] +[:mouse_move, 590, 86, 2, 34, 65] +[:mouse_move, 570, 78, 2, 35, 66] +[:mouse_move, 543, 70, 2, 36, 66] +[:mouse_move, 516, 65, 2, 37, 67] +[:mouse_move, 481, 61, 2, 38, 68] +[:mouse_move, 449, 59, 2, 39, 69] +[:mouse_move, 429, 57, 2, 40, 69] +[:mouse_move, 424, 56, 2, 41, 70] +[:mouse_move, 426, 56, 2, 42, 74] +[:mouse_move, 429, 56, 2, 43, 75] +[:mouse_move, 431, 56, 2, 44, 75] +[:mouse_move, 433, 56, 2, 45, 76] +[:mouse_move, 435, 55, 2, 46, 77] +[:mouse_move, 437, 55, 2, 47, 78] +[:mouse_move, 440, 55, 2, 48, 78] +[:mouse_move, 444, 55, 2, 49, 79] +[:mouse_move, 445, 54, 2, 50, 79] +[:mouse_move, 444, 53, 2, 51, 81] +[:mouse_move, 444, 52, 2, 52, 82] +[:mouse_move, 443, 51, 2, 53, 89] +[:mouse_button_pressed, 1, 0, 1, 54, 89] +[:mouse_move, 442, 51, 2, 55, 89] +[:mouse_move, 436, 51, 2, 56, 90] +[:mouse_move, 432, 49, 2, 57, 91] +[:mouse_move, 431, 49, 2, 58, 91] +[:mouse_move, 429, 49, 2, 59, 92] +[:mouse_move, 428, 49, 2, 60, 93] +[:mouse_move, 426, 49, 2, 61, 94] +[:mouse_move, 425, 49, 2, 62, 94] +[:mouse_move, 424, 49, 2, 63, 95] +[:mouse_move, 423, 49, 2, 64, 96] +[:mouse_move, 422, 49, 2, 65, 98] +[:mouse_move, 421, 49, 2, 66, 99] +[:mouse_move, 420, 49, 2, 67, 99] +[:mouse_move, 419, 49, 2, 68, 100] +[:mouse_move, 417, 49, 2, 69, 100] +[:mouse_move, 415, 49, 2, 70, 101] +[:mouse_move, 414, 49, 2, 71, 102] +[:mouse_move, 413, 49, 2, 72, 108] +[:mouse_move, 415, 49, 2, 73, 124] +[:mouse_move, 416, 49, 2, 74, 125] +[:mouse_move, 420, 49, 2, 75, 126] +[:mouse_move, 424, 49, 2, 76, 127] +[:mouse_move, 429, 49, 2, 77, 128] +[:mouse_move, 433, 49, 2, 78, 128] +[:mouse_move, 441, 49, 2, 79, 129] +[:mouse_move, 450, 49, 2, 80, 129] +[:mouse_move, 460, 49, 2, 81, 130] +[:mouse_move, 472, 49, 2, 82, 131] +[:mouse_move, 480, 49, 2, 83, 131] +[:mouse_move, 486, 49, 2, 84, 132] +[:mouse_move, 488, 49, 2, 85, 132] +[:mouse_move, 492, 49, 2, 86, 132] +[:mouse_move, 498, 49, 2, 87, 133] +[:mouse_move, 507, 49, 2, 88, 133] +[:mouse_move, 513, 48, 2, 89, 134] +[:mouse_move, 518, 47, 2, 90, 134] +[:mouse_move, 523, 47, 2, 91, 134] +[:mouse_move, 529, 46, 2, 92, 135] +[:mouse_move, 533, 46, 2, 93, 135] +[:mouse_move, 538, 46, 2, 94, 135] +[:mouse_move, 543, 46, 2, 95, 136] +[:mouse_move, 545, 46, 2, 96, 136] +[:mouse_move, 546, 46, 2, 97, 136] +[:mouse_move, 551, 46, 2, 98, 137] +[:mouse_move, 558, 46, 2, 99, 137] +[:mouse_move, 567, 46, 2, 100, 138] +[:mouse_move, 573, 46, 2, 101, 138] +[:mouse_move, 576, 45, 2, 102, 138] +[:mouse_move, 579, 45, 2, 103, 138] +[:mouse_move, 581, 45, 2, 104, 138] +[:mouse_move, 584, 45, 2, 105, 139] +[:mouse_move, 590, 45, 2, 106, 139] +[:mouse_move, 597, 45, 2, 107, 139] +[:mouse_move, 602, 45, 2, 108, 140] +[:mouse_move, 606, 45, 2, 109, 140] +[:mouse_move, 611, 45, 2, 110, 140] +[:mouse_move, 617, 45, 2, 111, 140] +[:mouse_move, 625, 45, 2, 112, 140] +[:mouse_move, 632, 45, 2, 113, 140] +[:mouse_move, 638, 45, 2, 114, 141] +[:mouse_move, 643, 45, 2, 115, 141] +[:mouse_move, 644, 44, 2, 116, 141] +[:mouse_move, 646, 44, 2, 117, 141] +[:mouse_move, 647, 44, 2, 118, 142] +[:mouse_move, 650, 44, 2, 119, 142] +[:mouse_move, 653, 44, 2, 120, 142] +[:mouse_move, 656, 44, 2, 121, 142] +[:mouse_move, 658, 43, 2, 122, 142] +[:mouse_move, 659, 43, 2, 123, 143] +[:mouse_move, 663, 43, 2, 124, 143] +[:mouse_move, 665, 43, 2, 125, 143] +[:mouse_move, 667, 43, 2, 126, 143] +[:mouse_move, 669, 43, 2, 127, 143] +[:mouse_move, 670, 43, 2, 128, 143] +[:mouse_move, 671, 43, 2, 129, 143] +[:mouse_move, 672, 43, 2, 130, 144] +[:mouse_move, 674, 43, 2, 131, 144] +[:mouse_move, 677, 43, 2, 132, 144] +[:mouse_move, 679, 43, 2, 133, 144] +[:mouse_move, 680, 43, 2, 134, 144] +[:mouse_move, 681, 43, 2, 135, 144] +[:mouse_move, 683, 43, 2, 136, 145] +[:mouse_move, 684, 43, 2, 137, 145] +[:mouse_move, 685, 43, 2, 138, 145] +[:mouse_move, 686, 43, 2, 139, 145] +[:mouse_move, 687, 43, 2, 140, 145] +[:mouse_move, 688, 43, 2, 141, 146] +[:mouse_button_up, 1, 0, 1, 142, 150] +[:mouse_move, 688, 44, 2, 143, 150] +[:mouse_move, 685, 45, 2, 144, 150] +[:mouse_move, 674, 47, 2, 145, 150] +[:mouse_move, 657, 52, 2, 146, 150] +[:mouse_move, 621, 57, 2, 147, 151] +[:mouse_move, 593, 62, 2, 148, 151] +[:mouse_move, 568, 65, 2, 149, 151] +[:mouse_move, 550, 68, 2, 150, 151] +[:mouse_move, 542, 69, 2, 151, 152] +[:mouse_move, 539, 69, 2, 152, 152] +[:mouse_move, 536, 70, 2, 153, 152] +[:mouse_move, 534, 70, 2, 154, 153] +[:mouse_move, 531, 72, 2, 155, 153] +[:mouse_move, 528, 73, 2, 156, 153] +[:mouse_move, 522, 75, 2, 157, 154] +[:mouse_move, 515, 80, 2, 158, 154] +[:mouse_move, 514, 81, 2, 159, 154] +[:mouse_move, 513, 81, 2, 160, 154] +[:mouse_move, 509, 84, 2, 161, 156] +[:mouse_move, 502, 88, 2, 162, 156] +[:mouse_move, 491, 93, 2, 163, 156] +[:mouse_move, 487, 97, 2, 164, 156] +[:mouse_move, 486, 97, 2, 165, 156] +[:mouse_move, 487, 96, 2, 166, 157] +[:mouse_button_pressed, 1, 0, 1, 167, 159] +[:mouse_button_up, 1, 0, 1, 168, 160] +[:mouse_button_pressed, 1, 0, 1, 169, 161] +[:mouse_move, 488, 96, 2, 170, 161] +[:mouse_button_up, 1, 0, 1, 171, 161] +[:mouse_move, 488, 97, 2, 172, 166] +[:mouse_move, 487, 97, 2, 173, 166] +[:mouse_move, 486, 97, 2, 174, 167] +[:mouse_move, 485, 97, 2, 175, 167] +[:mouse_move, 484, 97, 2, 176, 168] +[:mouse_button_pressed, 1, 0, 1, 177, 172] +[:mouse_button_up, 1, 0, 1, 178, 173] +[:mouse_move, 485, 97, 2, 179, 185] +[:key_down_raw, 96, 0, 2, 180, 191] +[:mouse_move, 486, 96, 2, 181, 192] +[:mouse_move, 488, 96, 2, 182, 192] +[:mouse_move, 495, 94, 2, 183, 192] +[:key_up_raw, 96, 0, 2, 184, 192] +[:mouse_move, 503, 93, 2, 185, 193] +[:mouse_move, 514, 92, 2, 186, 193] +[:mouse_move, 544, 92, 2, 187, 193] +[:mouse_move, 573, 92, 2, 188, 194] +[:mouse_move, 607, 92, 2, 189, 194] +[:mouse_move, 641, 89, 2, 190, 194] +[:mouse_move, 674, 89, 2, 191, 194] +[:mouse_move, 705, 89, 2, 192, 194] +[:mouse_move, 735, 89, 2, 193, 195] +[:mouse_move, 759, 89, 2, 194, 195] +[:mouse_move, 776, 89, 2, 195, 195] +[:mouse_move, 784, 89, 2, 196, 195] +[:mouse_move, 786, 89, 2, 197, 196] +[:mouse_move, 786, 90, 2, 198, 204] +[:key_down_raw, 13, 0, 2, 199, 213] diff --git a/samples/13_path_finding_algorithms/02_detailed_breadth_first_search/replay.txt b/samples/13_path_finding_algorithms/02_detailed_breadth_first_search/replay.txt new file mode 100644 index 0000000..aa8719b --- /dev/null +++ b/samples/13_path_finding_algorithms/02_detailed_breadth_first_search/replay.txt @@ -0,0 +1,241 @@ +replay_version 2.0 +stopped_at 435 +seed 100 +recorded_at 2021-11-20 11:18:03 -0600 +[:mouse_button_up, 1, 0, 1, 1, 4] +[:mouse_move, 789, 89, 2, 2, 27] +[:mouse_move, 785, 90, 2, 3, 28] +[:mouse_move, 768, 94, 2, 4, 29] +[:mouse_move, 752, 99, 2, 5, 30] +[:mouse_move, 737, 104, 2, 6, 31] +[:mouse_move, 729, 104, 2, 7, 32] +[:mouse_move, 724, 104, 2, 8, 33] +[:mouse_move, 720, 103, 2, 9, 34] +[:mouse_move, 711, 103, 2, 10, 35] +[:mouse_move, 702, 103, 2, 11, 36] +[:mouse_move, 698, 103, 2, 12, 37] +[:mouse_move, 697, 103, 2, 13, 38] +[:mouse_move, 696, 103, 2, 14, 40] +[:mouse_move, 694, 104, 2, 15, 41] +[:mouse_move, 684, 104, 2, 16, 42] +[:mouse_move, 666, 104, 2, 17, 43] +[:mouse_move, 645, 105, 2, 18, 44] +[:mouse_move, 626, 106, 2, 19, 45] +[:mouse_move, 615, 106, 2, 20, 46] +[:mouse_move, 609, 106, 2, 21, 47] +[:mouse_move, 606, 106, 2, 22, 48] +[:mouse_move, 605, 106, 2, 23, 49] +[:mouse_move, 600, 104, 2, 24, 50] +[:mouse_move, 590, 100, 2, 25, 51] +[:mouse_move, 579, 97, 2, 26, 52] +[:mouse_move, 575, 96, 2, 27, 53] +[:mouse_move, 581, 96, 2, 28, 58] +[:mouse_move, 596, 98, 2, 29, 59] +[:mouse_move, 614, 98, 2, 30, 60] +[:mouse_move, 635, 97, 2, 31, 61] +[:mouse_move, 652, 94, 2, 32, 62] +[:mouse_move, 657, 93, 2, 33, 63] +[:mouse_move, 658, 92, 2, 34, 64] +[:mouse_button_pressed, 1, 0, 1, 35, 70] +[:mouse_move, 659, 92, 2, 36, 70] +[:mouse_button_up, 1, 0, 1, 37, 74] +[:mouse_move, 660, 92, 2, 38, 87] +[:mouse_button_pressed, 1, 0, 1, 39, 92] +[:mouse_button_up, 1, 0, 1, 40, 98] +[:mouse_move, 661, 92, 2, 41, 101] +[:mouse_button_pressed, 1, 0, 1, 42, 103] +[:mouse_button_up, 1, 0, 1, 43, 108] +[:mouse_move, 662, 92, 2, 44, 112] +[:mouse_button_pressed, 1, 0, 1, 45, 113] +[:mouse_button_up, 1, 0, 1, 46, 119] +[:mouse_move, 657, 92, 2, 47, 125] +[:mouse_move, 641, 92, 2, 48, 126] +[:mouse_move, 623, 93, 2, 49, 127] +[:mouse_move, 610, 95, 2, 50, 128] +[:mouse_move, 599, 97, 2, 51, 129] +[:mouse_move, 588, 98, 2, 52, 130] +[:mouse_move, 584, 99, 2, 53, 131] +[:mouse_move, 581, 99, 2, 54, 132] +[:mouse_move, 580, 99, 2, 55, 133] +[:mouse_move, 575, 99, 2, 56, 134] +[:mouse_move, 572, 99, 2, 57, 135] +[:mouse_move, 570, 99, 2, 58, 136] +[:mouse_move, 564, 101, 2, 59, 137] +[:mouse_move, 559, 101, 2, 60, 138] +[:mouse_move, 557, 101, 2, 61, 139] +[:mouse_move, 555, 102, 2, 62, 140] +[:mouse_move, 554, 102, 2, 63, 141] +[:mouse_button_pressed, 1, 0, 1, 64, 145] +[:mouse_button_up, 1, 0, 1, 65, 149] +[:mouse_button_pressed, 1, 0, 1, 66, 154] +[:mouse_move, 555, 102, 2, 67, 154] +[:mouse_button_up, 1, 0, 1, 68, 159] +[:mouse_button_pressed, 1, 0, 1, 69, 163] +[:mouse_button_up, 1, 0, 1, 70, 168] +[:mouse_move, 555, 103, 2, 71, 168] +[:mouse_move, 539, 103, 2, 72, 169] +[:mouse_move, 519, 100, 2, 73, 170] +[:mouse_move, 498, 95, 2, 74, 171] +[:mouse_move, 488, 90, 2, 75, 172] +[:mouse_move, 484, 88, 2, 76, 173] +[:mouse_move, 475, 81, 2, 77, 174] +[:mouse_move, 460, 73, 2, 78, 175] +[:mouse_move, 441, 64, 2, 79, 176] +[:mouse_move, 424, 57, 2, 80, 177] +[:mouse_move, 413, 53, 2, 81, 178] +[:mouse_move, 408, 50, 2, 82, 179] +[:mouse_move, 407, 49, 2, 83, 182] +[:mouse_move, 405, 47, 2, 84, 183] +[:mouse_move, 404, 46, 2, 85, 184] +[:mouse_move, 404, 45, 2, 86, 185] +[:mouse_move, 403, 45, 2, 87, 186] +[:mouse_button_pressed, 1, 0, 1, 88, 195] +[:mouse_move, 406, 45, 2, 89, 197] +[:mouse_move, 413, 45, 2, 90, 198] +[:mouse_move, 423, 45, 2, 91, 199] +[:mouse_move, 434, 45, 2, 92, 200] +[:mouse_move, 446, 45, 2, 93, 201] +[:mouse_move, 461, 45, 2, 94, 202] +[:mouse_move, 472, 45, 2, 95, 203] +[:mouse_move, 480, 45, 2, 96, 204] +[:mouse_move, 486, 45, 2, 97, 205] +[:mouse_move, 492, 45, 2, 98, 206] +[:mouse_move, 495, 45, 2, 99, 207] +[:mouse_move, 496, 45, 2, 100, 208] +[:mouse_move, 497, 45, 2, 101, 209] +[:mouse_move, 498, 45, 2, 102, 210] +[:mouse_move, 501, 45, 2, 103, 211] +[:mouse_move, 507, 45, 2, 104, 212] +[:mouse_move, 512, 45, 2, 105, 213] +[:mouse_move, 516, 45, 2, 106, 214] +[:mouse_move, 518, 45, 2, 107, 215] +[:mouse_move, 519, 45, 2, 108, 216] +[:mouse_move, 520, 45, 2, 109, 217] +[:mouse_move, 522, 45, 2, 110, 218] +[:mouse_move, 525, 45, 2, 111, 219] +[:mouse_move, 533, 45, 2, 112, 220] +[:mouse_move, 537, 45, 2, 113, 221] +[:mouse_move, 541, 45, 2, 114, 222] +[:mouse_move, 545, 45, 2, 115, 223] +[:mouse_move, 546, 45, 2, 116, 224] +[:mouse_move, 547, 45, 2, 117, 226] +[:mouse_move, 549, 45, 2, 118, 227] +[:mouse_move, 554, 45, 2, 119, 228] +[:mouse_move, 556, 45, 2, 120, 229] +[:mouse_move, 560, 45, 2, 121, 230] +[:mouse_move, 566, 45, 2, 122, 231] +[:mouse_move, 570, 45, 2, 123, 232] +[:mouse_move, 577, 45, 2, 124, 233] +[:mouse_move, 585, 45, 2, 125, 234] +[:mouse_move, 593, 46, 2, 126, 235] +[:mouse_move, 602, 48, 2, 127, 236] +[:mouse_move, 609, 48, 2, 128, 237] +[:mouse_move, 614, 48, 2, 129, 238] +[:mouse_move, 619, 48, 2, 130, 239] +[:mouse_move, 625, 49, 2, 131, 240] +[:mouse_move, 633, 49, 2, 132, 241] +[:mouse_move, 643, 49, 2, 133, 242] +[:mouse_move, 651, 49, 2, 134, 243] +[:mouse_move, 658, 49, 2, 135, 243] +[:mouse_move, 664, 49, 2, 136, 244] +[:mouse_move, 669, 49, 2, 137, 245] +[:mouse_move, 675, 49, 2, 138, 246] +[:mouse_move, 679, 49, 2, 139, 247] +[:mouse_move, 682, 49, 2, 140, 248] +[:mouse_move, 686, 49, 2, 141, 249] +[:mouse_move, 689, 49, 2, 142, 250] +[:mouse_move, 691, 49, 2, 143, 251] +[:mouse_move, 697, 49, 2, 144, 252] +[:mouse_move, 706, 49, 2, 145, 253] +[:mouse_move, 715, 49, 2, 146, 254] +[:mouse_move, 723, 49, 2, 147, 255] +[:mouse_move, 730, 49, 2, 148, 256] +[:mouse_move, 733, 49, 2, 149, 256] +[:mouse_move, 734, 49, 2, 150, 257] +[:mouse_move, 737, 49, 2, 151, 258] +[:mouse_move, 742, 49, 2, 152, 259] +[:mouse_move, 749, 49, 2, 153, 260] +[:mouse_move, 755, 49, 2, 154, 261] +[:mouse_move, 758, 49, 2, 155, 262] +[:mouse_move, 760, 49, 2, 156, 263] +[:mouse_move, 761, 49, 2, 157, 264] +[:mouse_move, 762, 49, 2, 158, 266] +[:mouse_move, 763, 49, 2, 159, 268] +[:mouse_move, 763, 48, 2, 160, 269] +[:mouse_move, 757, 48, 2, 161, 290] +[:mouse_move, 746, 48, 2, 162, 291] +[:mouse_move, 732, 48, 2, 163, 291] +[:mouse_move, 716, 48, 2, 164, 292] +[:mouse_move, 698, 48, 2, 165, 293] +[:mouse_move, 684, 47, 2, 166, 294] +[:mouse_move, 673, 46, 2, 167, 295] +[:mouse_move, 665, 44, 2, 168, 296] +[:mouse_move, 660, 44, 2, 169, 297] +[:mouse_move, 656, 44, 2, 170, 297] +[:mouse_move, 652, 44, 2, 171, 298] +[:mouse_move, 648, 44, 2, 172, 299] +[:mouse_move, 637, 44, 2, 173, 300] +[:mouse_move, 628, 44, 2, 174, 301] +[:mouse_move, 618, 44, 2, 175, 302] +[:mouse_move, 609, 44, 2, 176, 303] +[:mouse_move, 602, 44, 2, 177, 304] +[:mouse_move, 598, 43, 2, 178, 305] +[:mouse_move, 596, 43, 2, 179, 306] +[:mouse_move, 595, 43, 2, 180, 307] +[:mouse_move, 594, 42, 2, 181, 308] +[:mouse_move, 593, 42, 2, 182, 308] +[:mouse_move, 591, 42, 2, 183, 309] +[:mouse_move, 588, 42, 2, 184, 310] +[:mouse_move, 586, 42, 2, 185, 311] +[:mouse_move, 584, 42, 2, 186, 312] +[:mouse_move, 582, 42, 2, 187, 313] +[:mouse_move, 576, 42, 2, 188, 314] +[:mouse_move, 570, 42, 2, 189, 315] +[:mouse_move, 562, 42, 2, 190, 316] +[:mouse_move, 554, 42, 2, 191, 317] +[:mouse_move, 547, 42, 2, 192, 318] +[:mouse_move, 537, 42, 2, 193, 319] +[:mouse_move, 532, 42, 2, 194, 320] +[:mouse_move, 528, 42, 2, 195, 321] +[:mouse_move, 527, 42, 2, 196, 322] +[:mouse_move, 526, 42, 2, 197, 323] +[:mouse_move, 525, 42, 2, 198, 324] +[:mouse_move, 524, 42, 2, 199, 325] +[:mouse_move, 522, 42, 2, 200, 326] +[:mouse_move, 521, 42, 2, 201, 327] +[:mouse_move, 520, 42, 2, 202, 328] +[:mouse_move, 519, 42, 2, 203, 329] +[:mouse_move, 516, 42, 2, 204, 330] +[:mouse_move, 513, 42, 2, 205, 331] +[:mouse_move, 512, 42, 2, 206, 332] +[:mouse_move, 509, 42, 2, 207, 333] +[:mouse_move, 497, 42, 2, 208, 334] +[:mouse_move, 490, 42, 2, 209, 335] +[:mouse_move, 486, 42, 2, 210, 336] +[:mouse_move, 483, 42, 2, 211, 337] +[:mouse_move, 482, 42, 2, 212, 338] +[:mouse_move, 481, 42, 2, 213, 339] +[:mouse_button_up, 1, 0, 1, 214, 354] +[:mouse_move, 484, 43, 2, 215, 361] +[:mouse_move, 497, 47, 2, 216, 362] +[:mouse_move, 513, 51, 2, 217, 363] +[:mouse_move, 530, 55, 2, 218, 364] +[:mouse_move, 544, 58, 2, 219, 365] +[:mouse_move, 562, 63, 2, 220, 366] +[:mouse_move, 589, 71, 2, 221, 367] +[:mouse_move, 623, 81, 2, 222, 368] +[:mouse_move, 656, 91, 2, 223, 369] +[:mouse_move, 687, 95, 2, 224, 370] +[:mouse_move, 731, 102, 2, 225, 371] +[:mouse_move, 762, 110, 2, 226, 372] +[:mouse_move, 792, 117, 2, 227, 373] +[:mouse_move, 819, 123, 2, 228, 374] +[:key_down_raw, 96, 0, 2, 229, 375] +[:mouse_move, 842, 125, 2, 230, 375] +[:mouse_move, 859, 128, 2, 231, 376] +[:mouse_move, 871, 130, 2, 232, 377] +[:mouse_move, 878, 131, 2, 233, 378] +[:mouse_move, 879, 131, 2, 234, 379] +[:key_up_raw, 96, 0, 2, 235, 379] +[:mouse_move, 878, 131, 2, 236, 411] +[:key_down_raw, 13, 0, 2, 237, 435] 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] diff --git a/samples/13_path_finding_algorithms/04_early_exit/app/main.rb b/samples/13_path_finding_algorithms/04_early_exit/app/main.rb index 1e9305b..40a3ba5 100644 --- a/samples/13_path_finding_algorithms/04_early_exit/app/main.rb +++ b/samples/13_path_finding_algorithms/04_early_exit/app/main.rb @@ -26,8 +26,8 @@ class EarlyExitBreadthFirstSearch # And calculate the path calc_path end - render - input + render + input end def defaults @@ -43,14 +43,14 @@ class EarlyExitBreadthFirstSearch # This step is roughly the grid's width * height # When anim_steps equals max_steps no more calculations will occur # and the slider will be at the end - state.max_steps ||= args.state.grid.width * args.state.grid.height + state.max_steps ||= args.state.grid.width * args.state.grid.height # The location of the star and walls of the grid # They can be modified to have a different initial grid # Walls are stored in a hash for quick look up when doing the search state.star ||= [2, 8] state.target ||= [10, 5] - state.walls ||= {} + state.walls ||= {} # Variables that are used by the breadth first search # Storing cells that the search has visited, prevents unnecessary steps @@ -73,12 +73,12 @@ class EarlyExitBreadthFirstSearch # 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 # Draws everything onto the screen def render - render_background + render_background render_heat_map render_walls render_path @@ -91,8 +91,8 @@ class EarlyExitBreadthFirstSearch # 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 @@ -109,7 +109,7 @@ class EarlyExitBreadthFirstSearch end for y in 0..grid.height - outputs.lines << horizontal_line(y) + outputs.lines << horizontal_line(y) outputs.lines << early_exit_horizontal_line(y) end end @@ -136,7 +136,7 @@ class EarlyExitBreadthFirstSearch # Draws the walls on both grids def render_walls - state.walls.each_key do |wall| + state.walls.each_key do |wall| outputs.solids << [scale_up(wall), wall_color] outputs.solids << [early_exit_scale_up(wall), wall_color] end @@ -146,13 +146,13 @@ class EarlyExitBreadthFirstSearch def render_star outputs.sprites << [scale_up(state.star), 'star.png'] outputs.sprites << [early_exit_scale_up(state.star), 'star.png'] - end + end # Renders the target on both grids def render_target outputs.sprites << [scale_up(state.target), 'target.png'] outputs.sprites << [early_exit_scale_up(state.target), 'target.png'] - end + end # Labels the grids def render_labels @@ -244,8 +244,8 @@ class EarlyExitBreadthFirstSearch # 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 end # Determines what the user is editing and stores the value @@ -253,53 +253,53 @@ class EarlyExitBreadthFirstSearch # 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 star in the second grid is clicked - elsif star2_clicked? - state.current_input = :star2 + elsif star2_clicked? + state.current_input = :star2 # 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 the target in the second grid is clicked - elsif target2_clicked? - state.current_input = :target2 + elsif target2_clicked? + state.current_input = :target2 # 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 a wall in the second grid is clicked - elsif wall2_clicked? + elsif wall2_clicked? state.current_input = :remove_wall2 # When the first grid is clicked - elsif grid_clicked? + elsif grid_clicked? state.current_input = :add_wall # When the second grid is clicked - elsif grid2_clicked? + elsif grid2_clicked? state.current_input = :add_wall2 end end # Processes click and drag based on what the user is currently dragging def process_input - if state.current_input == :star - input_star + if state.current_input == :star + input_star elsif state.current_input == :star2 - input_star2 - elsif state.current_input == :target - input_target - elsif state.current_input == :target2 - input_target2 - elsif state.current_input == :remove_wall - input_remove_wall + input_star2 + elsif state.current_input == :target + input_target + elsif state.current_input == :target2 + input_target2 + elsif state.current_input == :remove_wall + input_remove_wall elsif state.current_input == :remove_wall2 - input_remove_wall2 - elsif state.current_input == :add_wall - input_add_wall - elsif state.current_input == :add_wall2 - input_add_wall2 + input_remove_wall2 + elsif state.current_input == :add_wall + input_add_wall + elsif state.current_input == :add_wall2 + input_add_wall2 end end @@ -307,10 +307,10 @@ class EarlyExitBreadthFirstSearch # 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 = state.star.clone + old_star = state.star.clone state.star = cell_closest_to_mouse - unless old_star == state.star - reset_search + unless old_star == state.star + reset_search end end @@ -318,10 +318,10 @@ class EarlyExitBreadthFirstSearch # Only resets the search if the star changes position # Called whenever the user is editing the star (puts mouse down on star) def input_star2 - old_star = state.star.clone + old_star = state.star.clone state.star = cell_closest_to_mouse2 - unless old_star == state.star - reset_search + unless old_star == state.star + reset_search end end @@ -329,10 +329,10 @@ class EarlyExitBreadthFirstSearch # 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 = state.target.clone + old_target = state.target.clone state.target = cell_closest_to_mouse - unless old_target == state.target - reset_search + unless old_target == state.target + reset_search end end @@ -340,10 +340,10 @@ class EarlyExitBreadthFirstSearch # 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_target2 - old_target = state.target.clone + old_target = state.target.clone state.target = cell_closest_to_mouse2 - unless old_target == state.target - reset_search + unless old_target == state.target + reset_search end end @@ -352,10 +352,10 @@ class EarlyExitBreadthFirstSearch # 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 state.walls.has_key?(cell_closest_to_mouse) - state.walls.delete(cell_closest_to_mouse) - reset_search + state.walls.delete(cell_closest_to_mouse) + reset_search end end end @@ -365,31 +365,31 @@ class EarlyExitBreadthFirstSearch # 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_grid2? + if mouse_inside_grid2? if state.walls.has_key?(cell_closest_to_mouse2) - state.walls.delete(cell_closest_to_mouse2) - reset_search + state.walls.delete(cell_closest_to_mouse2) + 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 state.walls.has_key?(cell_closest_to_mouse) - state.walls[cell_closest_to_mouse] = true - reset_search + state.walls[cell_closest_to_mouse] = true + reset_search end end end - + # Adds a wall in the second grid in the cell the mouse is over def input_add_wall2 - if mouse_inside_grid2? + if mouse_inside_grid2? unless state.walls.has_key?(cell_closest_to_mouse2) - state.walls[cell_closest_to_mouse2] = true - reset_search + state.walls[cell_closest_to_mouse2] = true + reset_search end end end @@ -399,10 +399,10 @@ class EarlyExitBreadthFirstSearch # with the current grid as the initial state of the grid def reset_search # Reset_Searchs the search - state.frontier = [] - state.visited = {} - state.early_exit_visited = {} - state.came_from = {} + state.frontier = [] + state.visited = {} + state.early_exit_visited = {} + state.came_from = {} state.path = {} end @@ -410,23 +410,23 @@ class EarlyExitBreadthFirstSearch def step # The setup to the search # Runs once when there are no visited cells - if state.visited.empty? - state.visited[state.star] = true - state.early_exit_visited[state.star] = true - state.frontier << state.star + if state.visited.empty? + state.visited[state.star] = true + state.early_exit_visited[state.star] = true + state.frontier << state.star state.came_from[state.star] = nil end # A step in the search - unless state.frontier.empty? + unless state.frontier.empty? # Takes the next frontier cell - new_frontier = state.frontier.shift + new_frontier = state.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 state.visited.has_key?(neighbor) || state.walls.has_key?(neighbor) + unless state.visited.has_key?(neighbor) || state.walls.has_key?(neighbor) # Add them to the frontier and mark them as visited in the first grid - state.visited[neighbor] = true + state.visited[neighbor] = true # Unless the target has been visited unless state.visited.has_key?(state.target) # Mark the neighbor as visited in the second grid as well @@ -434,32 +434,32 @@ class EarlyExitBreadthFirstSearch end # Add the neighbor to the frontier and remember which cell it came from - state.frontier << neighbor + state.frontier << neighbor state.came_from[neighbor] = new_frontier end end end end - + # 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 @@ -484,13 +484,13 @@ class EarlyExitBreadthFirstSearch # 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 # When the user grabs the star and puts their cursor to the far right @@ -498,15 +498,15 @@ class EarlyExitBreadthFirstSearch # Finding the cell closest to the mouse in the second grid helps with this def cell_closest_to_mouse2 # Closest cell grid to the mouse in the second - 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 # Translate the cell to the first grid x -= grid.width + 1 # Bound x and y to the first 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 @@ -585,12 +585,12 @@ class EarlyExitBreadthFirstSearch # Light brown def unvisited_color - [221, 212, 213] + [221, 212, 213] end # Camo Green def wall_color - [134, 134, 120] + [134, 134, 120] end # Pastel White @@ -620,7 +620,7 @@ def tick args end # Every tick, new args are passed, and the Breadth First Search tick is called - $early_exit_breadth_first_search ||= EarlyExitBreadthFirstSearch.new(args) + $early_exit_breadth_first_search ||= EarlyExitBreadthFirstSearch.new $early_exit_breadth_first_search.args = args $early_exit_breadth_first_search.tick end diff --git a/samples/13_path_finding_algorithms/04_early_exit/replay.txt b/samples/13_path_finding_algorithms/04_early_exit/replay.txt new file mode 100644 index 0000000..3ec9254 --- /dev/null +++ b/samples/13_path_finding_algorithms/04_early_exit/replay.txt @@ -0,0 +1,364 @@ +replay_version 2.0 +stopped_at 322 +seed 100 +recorded_at 2021-11-20 11:19:30 -0600 +[:mouse_button_up, 1, 0, 1, 1, 1] +[:mouse_move, 806, 92, 2, 2, 12] +[:mouse_move, 799, 105, 2, 3, 13] +[:mouse_move, 786, 126, 2, 4, 13] +[:mouse_move, 761, 154, 2, 5, 13] +[:mouse_move, 722, 199, 2, 6, 14] +[:mouse_move, 692, 230, 2, 7, 14] +[:mouse_move, 659, 263, 2, 8, 14] +[:mouse_move, 629, 297, 2, 9, 14] +[:mouse_move, 598, 337, 2, 10, 15] +[:mouse_move, 569, 376, 2, 11, 15] +[:mouse_move, 538, 412, 2, 12, 15] +[:mouse_move, 510, 438, 2, 13, 16] +[:mouse_move, 488, 456, 2, 14, 16] +[:mouse_move, 471, 467, 2, 15, 16] +[:mouse_move, 459, 477, 2, 16, 17] +[:mouse_move, 455, 481, 2, 17, 17] +[:mouse_move, 455, 484, 2, 18, 18] +[:mouse_move, 454, 485, 2, 19, 18] +[:mouse_move, 464, 481, 2, 20, 23] +[:mouse_move, 482, 477, 2, 21, 23] +[:mouse_move, 490, 470, 2, 22, 23] +[:mouse_move, 491, 469, 2, 23, 24] +[:mouse_move, 492, 467, 2, 24, 24] +[:mouse_move, 493, 466, 2, 25, 25] +[:mouse_move, 485, 466, 2, 26, 26] +[:mouse_move, 474, 468, 2, 27, 27] +[:mouse_move, 460, 472, 2, 28, 27] +[:mouse_move, 441, 476, 2, 29, 27] +[:mouse_move, 419, 479, 2, 30, 27] +[:mouse_move, 392, 480, 2, 31, 28] +[:mouse_move, 359, 480, 2, 32, 28] +[:mouse_move, 329, 483, 2, 33, 29] +[:mouse_move, 306, 486, 2, 34, 29] +[:mouse_move, 281, 493, 2, 35, 30] +[:mouse_move, 271, 496, 2, 36, 30] +[:mouse_move, 270, 496, 2, 37, 30] +[:mouse_move, 272, 496, 2, 38, 32] +[:mouse_move, 275, 496, 2, 39, 32] +[:mouse_move, 279, 495, 2, 40, 32] +[:mouse_move, 283, 494, 2, 41, 33] +[:mouse_move, 289, 494, 2, 42, 33] +[:mouse_move, 292, 494, 2, 43, 34] +[:mouse_move, 293, 495, 2, 44, 35] +[:mouse_button_pressed, 1, 0, 1, 45, 39] +[:mouse_button_up, 1, 0, 1, 46, 40] +[:mouse_move, 294, 495, 2, 47, 49] +[:mouse_move, 294, 494, 2, 48, 50] +[:mouse_move, 295, 491, 2, 49, 50] +[:mouse_move, 296, 488, 2, 50, 50] +[:mouse_move, 297, 484, 2, 51, 50] +[:mouse_move, 297, 481, 2, 52, 51] +[:mouse_move, 298, 477, 2, 53, 51] +[:mouse_move, 298, 476, 2, 54, 51] +[:mouse_move, 299, 475, 2, 55, 52] +[:mouse_move, 300, 473, 2, 56, 52] +[:mouse_move, 300, 472, 2, 57, 53] +[:mouse_move, 300, 471, 2, 58, 55] +[:mouse_move, 300, 470, 2, 59, 56] +[:mouse_move, 300, 469, 2, 60, 57] +[:mouse_move, 300, 467, 2, 61, 57] +[:mouse_move, 300, 466, 2, 62, 57] +[:mouse_button_pressed, 1, 0, 1, 63, 59] +[:mouse_button_up, 1, 0, 1, 64, 61] +[:mouse_move, 300, 465, 2, 65, 61] +[:mouse_move, 300, 462, 2, 66, 62] +[:mouse_move, 300, 456, 2, 67, 62] +[:mouse_move, 300, 449, 2, 68, 62] +[:mouse_move, 300, 443, 2, 69, 63] +[:mouse_move, 299, 441, 2, 70, 63] +[:mouse_move, 299, 440, 2, 71, 63] +[:mouse_move, 299, 438, 2, 72, 64] +[:mouse_move, 299, 437, 2, 73, 65] +[:mouse_move, 299, 436, 2, 74, 65] +[:mouse_move, 299, 434, 2, 75, 65] +[:mouse_move, 299, 432, 2, 76, 65] +[:mouse_move, 299, 431, 2, 77, 67] +[:mouse_move, 299, 430, 2, 78, 67] +[:mouse_move, 299, 429, 2, 79, 68] +[:mouse_move, 299, 428, 2, 80, 68] +[:mouse_move, 299, 424, 2, 81, 68] +[:mouse_move, 300, 417, 2, 82, 69] +[:mouse_move, 301, 413, 2, 83, 69] +[:mouse_move, 302, 412, 2, 84, 70] +[:mouse_button_pressed, 1, 0, 1, 85, 72] +[:mouse_move, 302, 411, 2, 86, 72] +[:mouse_button_up, 1, 0, 1, 87, 74] +[:mouse_move, 302, 408, 2, 88, 94] +[:mouse_move, 302, 396, 2, 89, 94] +[:mouse_move, 302, 383, 2, 90, 95] +[:mouse_move, 302, 375, 2, 91, 95] +[:mouse_move, 303, 374, 2, 92, 95] +[:mouse_move, 303, 373, 2, 93, 95] +[:mouse_move, 303, 374, 2, 94, 99] +[:mouse_button_pressed, 1, 0, 1, 95, 101] +[:mouse_button_up, 1, 0, 1, 96, 103] +[:mouse_move, 303, 375, 2, 97, 103] +[:mouse_move, 306, 375, 2, 98, 132] +[:mouse_move, 317, 376, 2, 99, 132] +[:mouse_move, 333, 380, 2, 100, 133] +[:mouse_move, 352, 384, 2, 101, 133] +[:mouse_move, 374, 385, 2, 102, 133] +[:mouse_move, 401, 390, 2, 103, 134] +[:mouse_move, 424, 392, 2, 104, 134] +[:mouse_move, 442, 395, 2, 105, 134] +[:mouse_move, 455, 397, 2, 106, 135] +[:mouse_move, 458, 398, 2, 107, 135] +[:mouse_move, 460, 398, 2, 108, 136] +[:mouse_move, 466, 398, 2, 109, 136] +[:mouse_move, 473, 398, 2, 110, 136] +[:mouse_move, 477, 398, 2, 111, 136] +[:mouse_move, 478, 397, 2, 112, 136] +[:mouse_move, 479, 397, 2, 113, 137] +[:mouse_move, 480, 396, 2, 114, 137] +[:mouse_move, 480, 395, 2, 115, 138] +[:mouse_move, 480, 396, 2, 116, 138] +[:mouse_move, 478, 404, 2, 117, 139] +[:mouse_move, 474, 418, 2, 118, 139] +[:mouse_move, 472, 426, 2, 119, 139] +[:mouse_move, 466, 438, 2, 120, 140] +[:mouse_move, 461, 453, 2, 121, 140] +[:mouse_move, 453, 466, 2, 122, 140] +[:mouse_move, 448, 473, 2, 123, 141] +[:mouse_move, 446, 475, 2, 124, 141] +[:mouse_move, 444, 477, 2, 125, 142] +[:mouse_move, 441, 481, 2, 126, 142] +[:mouse_move, 435, 489, 2, 127, 142] +[:mouse_move, 426, 496, 2, 128, 143] +[:mouse_move, 422, 498, 2, 129, 143] +[:mouse_move, 422, 499, 2, 130, 143] +[:mouse_move, 421, 499, 2, 131, 145] +[:mouse_move, 420, 499, 2, 132, 145] +[:mouse_button_pressed, 1, 0, 1, 133, 147] +[:mouse_move, 419, 499, 2, 134, 148] +[:mouse_move, 419, 497, 2, 135, 148] +[:mouse_move, 421, 494, 2, 136, 149] +[:mouse_move, 426, 484, 2, 137, 149] +[:mouse_move, 432, 472, 2, 138, 149] +[:mouse_move, 439, 460, 2, 139, 150] +[:mouse_move, 445, 450, 2, 140, 150] +[:mouse_move, 456, 434, 2, 141, 150] +[:mouse_move, 466, 422, 2, 142, 150] +[:mouse_move, 474, 411, 2, 143, 151] +[:mouse_move, 480, 403, 2, 144, 151] +[:mouse_move, 485, 397, 2, 145, 151] +[:mouse_move, 489, 392, 2, 146, 151] +[:mouse_move, 491, 389, 2, 147, 151] +[:mouse_move, 494, 384, 2, 148, 151] +[:mouse_move, 495, 381, 2, 149, 152] +[:mouse_move, 497, 378, 2, 150, 152] +[:mouse_move, 499, 376, 2, 151, 152] +[:mouse_move, 500, 373, 2, 152, 152] +[:mouse_move, 501, 372, 2, 153, 152] +[:mouse_move, 501, 371, 2, 154, 152] +[:mouse_move, 502, 370, 2, 155, 153] +[:mouse_move, 502, 369, 2, 156, 153] +[:mouse_move, 503, 369, 2, 157, 157] +[:mouse_move, 504, 369, 2, 158, 158] +[:mouse_move, 505, 368, 2, 159, 158] +[:mouse_move, 508, 366, 2, 160, 158] +[:mouse_move, 512, 364, 2, 161, 159] +[:mouse_move, 513, 364, 2, 162, 159] +[:mouse_move, 514, 364, 2, 163, 159] +[:mouse_move, 515, 364, 2, 164, 160] +[:mouse_move, 519, 364, 2, 165, 161] +[:mouse_move, 526, 366, 2, 166, 161] +[:mouse_move, 538, 372, 2, 167, 161] +[:mouse_move, 550, 382, 2, 168, 161] +[:mouse_move, 563, 397, 2, 169, 162] +[:mouse_move, 570, 411, 2, 170, 162] +[:mouse_move, 574, 425, 2, 171, 162] +[:mouse_move, 576, 439, 2, 172, 163] +[:mouse_move, 576, 448, 2, 173, 163] +[:mouse_move, 576, 459, 2, 174, 163] +[:mouse_move, 576, 470, 2, 175, 163] +[:mouse_move, 576, 477, 2, 176, 163] +[:mouse_move, 576, 481, 2, 177, 163] +[:mouse_move, 576, 483, 2, 178, 163] +[:mouse_move, 576, 485, 2, 179, 164] +[:mouse_move, 576, 488, 2, 180, 164] +[:mouse_move, 576, 494, 2, 181, 164] +[:mouse_move, 577, 500, 2, 182, 164] +[:mouse_move, 577, 501, 2, 183, 164] +[:mouse_move, 579, 504, 2, 184, 164] +[:mouse_move, 579, 505, 2, 185, 164] +[:mouse_move, 581, 509, 2, 186, 165] +[:mouse_move, 583, 512, 2, 187, 165] +[:mouse_move, 584, 514, 2, 188, 165] +[:mouse_move, 585, 516, 2, 189, 165] +[:mouse_move, 586, 519, 2, 190, 165] +[:mouse_move, 587, 521, 2, 191, 165] +[:mouse_move, 588, 523, 2, 192, 166] +[:mouse_move, 588, 524, 2, 193, 166] +[:mouse_move, 588, 525, 2, 194, 166] +[:mouse_move, 588, 526, 2, 195, 167] +[:mouse_move, 588, 527, 2, 196, 167] +[:mouse_move, 588, 526, 2, 197, 173] +[:mouse_move, 586, 521, 2, 198, 173] +[:mouse_move, 586, 516, 2, 199, 174] +[:mouse_move, 585, 508, 2, 200, 174] +[:mouse_move, 582, 500, 2, 201, 174] +[:mouse_move, 578, 489, 2, 202, 174] +[:mouse_move, 573, 476, 2, 203, 175] +[:mouse_move, 568, 466, 2, 204, 175] +[:mouse_move, 566, 461, 2, 205, 176] +[:mouse_move, 565, 460, 2, 206, 176] +[:mouse_move, 564, 460, 2, 207, 176] +[:mouse_move, 563, 459, 2, 208, 176] +[:mouse_move, 562, 459, 2, 209, 177] +[:mouse_move, 561, 459, 2, 210, 177] +[:mouse_move, 549, 459, 2, 211, 177] +[:mouse_move, 522, 456, 2, 212, 177] +[:mouse_move, 484, 456, 2, 213, 177] +[:mouse_move, 423, 456, 2, 214, 177] +[:mouse_move, 385, 454, 2, 215, 177] +[:mouse_move, 359, 454, 2, 216, 178] +[:mouse_move, 345, 452, 2, 217, 178] +[:mouse_move, 343, 452, 2, 218, 178] +[:mouse_move, 342, 451, 2, 219, 180] +[:mouse_move, 343, 451, 2, 220, 180] +[:mouse_move, 344, 449, 2, 221, 180] +[:mouse_move, 348, 446, 2, 222, 180] +[:mouse_move, 352, 444, 2, 223, 180] +[:mouse_move, 362, 442, 2, 224, 181] +[:mouse_move, 369, 441, 2, 225, 181] +[:mouse_move, 376, 440, 2, 226, 181] +[:mouse_move, 381, 439, 2, 227, 182] +[:mouse_move, 385, 438, 2, 228, 182] +[:mouse_move, 386, 438, 2, 229, 182] +[:mouse_move, 387, 437, 2, 230, 183] +[:mouse_move, 387, 436, 2, 231, 183] +[:mouse_move, 388, 434, 2, 232, 183] +[:mouse_move, 388, 430, 2, 233, 183] +[:mouse_move, 387, 428, 2, 234, 183] +[:mouse_move, 387, 427, 2, 235, 183] +[:mouse_move, 386, 425, 2, 236, 184] +[:mouse_move, 383, 425, 2, 237, 184] +[:mouse_move, 382, 425, 2, 238, 185] +[:mouse_move, 381, 425, 2, 239, 185] +[:mouse_move, 380, 424, 2, 240, 185] +[:mouse_move, 379, 424, 2, 241, 187] +[:mouse_move, 378, 424, 2, 242, 189] +[:mouse_move, 377, 424, 2, 243, 192] +[:mouse_move, 376, 424, 2, 244, 192] +[:mouse_move, 375, 424, 2, 245, 194] +[:mouse_move, 374, 424, 2, 246, 195] +[:mouse_move, 373, 424, 2, 247, 196] +[:mouse_move, 372, 424, 2, 248, 197] +[:mouse_move, 370, 425, 2, 249, 197] +[:mouse_move, 368, 425, 2, 250, 198] +[:mouse_move, 367, 425, 2, 251, 198] +[:mouse_move, 366, 425, 2, 252, 198] +[:mouse_button_up, 1, 0, 1, 253, 203] +[:mouse_move, 365, 423, 2, 254, 204] +[:mouse_move, 360, 418, 2, 255, 204] +[:mouse_move, 356, 413, 2, 256, 205] +[:mouse_move, 350, 407, 2, 257, 205] +[:mouse_move, 344, 401, 2, 258, 205] +[:mouse_move, 337, 396, 2, 259, 206] +[:mouse_move, 326, 390, 2, 260, 206] +[:mouse_move, 311, 381, 2, 261, 207] +[:mouse_move, 303, 377, 2, 262, 207] +[:mouse_move, 297, 374, 2, 263, 207] +[:mouse_move, 296, 374, 2, 264, 207] +[:mouse_button_pressed, 1, 0, 1, 265, 211] +[:mouse_button_up, 1, 0, 1, 266, 212] +[:mouse_move, 297, 374, 2, 267, 213] +[:mouse_move, 298, 374, 2, 268, 220] +[:mouse_move, 300, 378, 2, 269, 221] +[:mouse_move, 301, 384, 2, 270, 221] +[:mouse_move, 301, 393, 2, 271, 222] +[:mouse_move, 301, 401, 2, 272, 222] +[:mouse_move, 301, 409, 2, 273, 223] +[:mouse_move, 301, 412, 2, 274, 223] +[:mouse_move, 301, 413, 2, 275, 224] +[:mouse_move, 301, 415, 2, 276, 224] +[:mouse_move, 302, 418, 2, 277, 225] +[:mouse_move, 303, 419, 2, 278, 225] +[:mouse_move, 303, 420, 2, 279, 226] +[:mouse_button_pressed, 1, 0, 1, 280, 228] +[:mouse_button_up, 1, 0, 1, 281, 230] +[:mouse_move, 303, 421, 2, 282, 230] +[:mouse_move, 303, 422, 2, 283, 231] +[:mouse_move, 303, 426, 2, 284, 231] +[:mouse_move, 302, 429, 2, 285, 232] +[:mouse_move, 302, 430, 2, 286, 232] +[:mouse_move, 302, 432, 2, 287, 232] +[:mouse_move, 302, 436, 2, 288, 233] +[:mouse_move, 302, 438, 2, 289, 233] +[:mouse_move, 302, 440, 2, 290, 233] +[:mouse_move, 302, 441, 2, 291, 234] +[:mouse_move, 302, 442, 2, 292, 234] +[:mouse_move, 302, 443, 2, 293, 235] +[:mouse_move, 302, 444, 2, 294, 236] +[:mouse_move, 302, 445, 2, 295, 236] +[:mouse_move, 303, 447, 2, 296, 237] +[:mouse_move, 304, 451, 2, 297, 237] +[:mouse_move, 304, 454, 2, 298, 237] +[:mouse_move, 304, 456, 2, 299, 238] +[:mouse_move, 304, 458, 2, 300, 238] +[:mouse_move, 304, 460, 2, 301, 238] +[:mouse_move, 304, 463, 2, 302, 239] +[:mouse_button_pressed, 1, 0, 1, 303, 242] +[:mouse_button_up, 1, 0, 1, 304, 244] +[:mouse_move, 304, 464, 2, 305, 244] +[:mouse_move, 304, 465, 2, 306, 245] +[:mouse_move, 304, 470, 2, 307, 246] +[:mouse_move, 304, 476, 2, 308, 246] +[:mouse_move, 303, 485, 2, 309, 246] +[:mouse_move, 301, 495, 2, 310, 247] +[:mouse_move, 300, 500, 2, 311, 247] +[:mouse_move, 300, 503, 2, 312, 247] +[:mouse_move, 300, 506, 2, 313, 248] +[:mouse_move, 301, 508, 2, 314, 248] +[:mouse_move, 302, 510, 2, 315, 248] +[:mouse_move, 302, 511, 2, 316, 249] +[:mouse_move, 303, 512, 2, 317, 249] +[:mouse_move, 303, 513, 2, 318, 251] +[:mouse_button_pressed, 1, 0, 1, 319, 253] +[:mouse_button_up, 1, 0, 1, 320, 255] +[:mouse_move, 303, 512, 2, 321, 255] +[:mouse_move, 304, 511, 2, 322, 265] +[:mouse_move, 305, 511, 2, 323, 265] +[:mouse_move, 307, 510, 2, 324, 266] +[:mouse_move, 311, 509, 2, 325, 266] +[:mouse_move, 315, 505, 2, 326, 266] +[:mouse_move, 317, 504, 2, 327, 267] +[:mouse_move, 317, 503, 2, 328, 268] +[:mouse_move, 316, 503, 2, 329, 269] +[:mouse_move, 316, 502, 2, 330, 289] +[:mouse_move, 317, 501, 2, 331, 291] +[:mouse_move, 318, 501, 2, 332, 292] +[:mouse_move, 319, 501, 2, 333, 302] +[:mouse_move, 319, 500, 2, 334, 303] +[:key_down_raw, 96, 0, 2, 335, 303] +[:mouse_move, 320, 500, 2, 336, 304] +[:mouse_move, 323, 498, 2, 337, 304] +[:mouse_move, 331, 496, 2, 338, 305] +[:key_up_raw, 96, 0, 2, 339, 305] +[:mouse_move, 341, 493, 2, 340, 305] +[:mouse_move, 351, 489, 2, 341, 305] +[:mouse_move, 363, 484, 2, 342, 306] +[:mouse_move, 372, 482, 2, 343, 306] +[:mouse_move, 384, 479, 2, 344, 306] +[:mouse_move, 395, 479, 2, 345, 307] +[:mouse_move, 402, 477, 2, 346, 307] +[:mouse_move, 406, 475, 2, 347, 308] +[:mouse_move, 403, 475, 2, 348, 308] +[:mouse_move, 397, 473, 2, 349, 309] +[:mouse_move, 394, 467, 2, 350, 311] +[:mouse_move, 393, 467, 2, 351, 311] +[:mouse_move, 397, 466, 2, 352, 312] +[:mouse_move, 398, 465, 2, 353, 313] +[:mouse_move, 399, 465, 2, 354, 313] +[:mouse_move, 399, 464, 2, 355, 313] +[:mouse_move, 400, 464, 2, 356, 314] +[:mouse_move, 400, 463, 2, 357, 316] +[:mouse_move, 401, 463, 2, 358, 318] +[:mouse_move, 401, 462, 2, 359, 319] +[:key_down_raw, 13, 0, 2, 360, 322] diff --git a/samples/13_path_finding_algorithms/05_dijkstra/app/main.rb b/samples/13_path_finding_algorithms/05_dijkstra/app/main.rb index b335447..1223779 100644 --- a/samples/13_path_finding_algorithms/05_dijkstra/app/main.rb +++ b/samples/13_path_finding_algorithms/05_dijkstra/app/main.rb @@ -19,8 +19,8 @@ class Movement_Costs # The next step in the search is calculated def tick defaults - render - input + render + input calc end @@ -37,7 +37,7 @@ class Movement_Costs # Walls are stored in a hash for quick look up when doing the search state.star ||= [1, 5] state.target ||= [8, 4] - state.walls ||= {[1, 1] => true, [2, 1] => true, [3, 1] => true, [1, 2] => true, [2, 2] => true, [3, 2] => true} + state.walls ||= {[1, 1] => true, [2, 1] => true, [3, 1] => true, [1, 2] => true, [2, 2] => true, [3, 2] => true} state.hills ||= { [4, 1] => true, [5, 1] => true, @@ -72,7 +72,7 @@ class Movement_Costs # 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.user_input ||= :none + state.user_input ||= :none # Values that are used for the breadth first search # Keeping track of what cells were visited prevents counting cells multiple times @@ -96,7 +96,7 @@ class Movement_Costs # Draws everything onto the screen def render - render_background + render_background render_heat_maps @@ -111,8 +111,8 @@ class Movement_Costs # Draws what the grid looks like with nothing on it def render_background - render_unvisited - render_grid_lines + render_unvisited + render_grid_lines render_labels end @@ -131,7 +131,7 @@ class Movement_Costs end for y in 0..grid.height - outputs.lines << horizontal_line(y) + outputs.lines << horizontal_line(y) outputs.lines << shifted_horizontal_line(y) end end @@ -244,16 +244,16 @@ class Movement_Costs def render_star outputs.sprites << [scale_up(state.star), 'star.png'] outputs.sprites << [move_and_scale_up(state.star), 'star.png'] - end + end # Renders the target on both grids def render_target outputs.sprites << [scale_up(state.target), 'target.png'] outputs.sprites << [move_and_scale_up(state.target), 'target.png'] - end + end def render_hills - state.hills.each_key do |hill| + state.hills.each_key do |hill| outputs.solids << [scale_up(hill), hill_color] outputs.solids << [move_and_scale_up(hill), hill_color] end @@ -261,7 +261,7 @@ class Movement_Costs # Draws the walls on both grids def render_walls - state.walls.each_key do |wall| + state.walls.each_key do |wall| outputs.solids << [scale_up(wall), wall_color] outputs.solids << [move_and_scale_up(wall), wall_color] end @@ -344,7 +344,7 @@ class Movement_Costs # If the mouse was clicked this tick if inputs.mouse.down # Determine what the user is editing and edit the state.user_input variable - determine_input + determine_input end # Process user input based on user_input variable and current mouse position @@ -357,43 +357,43 @@ class Movement_Costs # mouse left click is held def determine_input # If the mouse is over the star in the first grid - if mouse_over_star? + if mouse_over_star? # The user is editing the star from the first grid - state.user_input = :star + state.user_input = :star # If the mouse is over the star in the second grid - elsif mouse_over_star2? + elsif mouse_over_star2? # The user is editing the star from the second grid - state.user_input = :star2 + state.user_input = :star2 # If the mouse is over the target in the first grid - elsif mouse_over_target? + elsif mouse_over_target? # The user is editing the target from the first grid - state.user_input = :target + state.user_input = :target # If the mouse is over the target in the second grid - elsif mouse_over_target2? + elsif mouse_over_target2? # The user is editing the target from the second grid - state.user_input = :target2 + state.user_input = :target2 # If the mouse is over a wall in the first grid - elsif mouse_over_wall? + elsif mouse_over_wall? # The user is removing a wall from the first grid - state.user_input = :remove_wall + state.user_input = :remove_wall # If the mouse is over a wall in the second grid - elsif mouse_over_wall2? + elsif mouse_over_wall2? # The user is removing a wall from the second grid state.user_input = :remove_wall2 # If the mouse is over a hill in the first grid - elsif mouse_over_hill? + elsif mouse_over_hill? # The user is adding a wall from the first grid - state.user_input = :add_wall + state.user_input = :add_wall # If the mouse is over a hill in the second grid - elsif mouse_over_hill2? + elsif mouse_over_hill2? # The user is adding a wall from the second grid state.user_input = :add_wall2 # If the mouse is over the first grid - elsif mouse_over_grid? + elsif mouse_over_grid? # The user is adding a hill from the first grid state.user_input = :add_hill # If the mouse is over the second grid - elsif mouse_over_grid2? + elsif mouse_over_grid2? # The user is adding a hill from the second grid state.user_input = :add_hill2 end @@ -401,26 +401,26 @@ class Movement_Costs # Processes click and drag based on what the user is currently dragging def process_input - if state.user_input == :star - input_star + if state.user_input == :star + input_star elsif state.user_input == :star2 - input_star2 - elsif state.user_input == :target - input_target - elsif state.user_input == :target2 - input_target2 - elsif state.user_input == :remove_wall - input_remove_wall + input_star2 + elsif state.user_input == :target + input_target + elsif state.user_input == :target2 + input_target2 + elsif state.user_input == :remove_wall + input_remove_wall elsif state.user_input == :remove_wall2 - input_remove_wall2 - elsif state.user_input == :add_hill - input_add_hill - elsif state.user_input == :add_hill2 - input_add_hill2 - elsif state.user_input == :add_wall - input_add_wall - elsif state.user_input == :add_wall2 - input_add_wall2 + input_remove_wall2 + elsif state.user_input == :add_hill + input_add_hill + elsif state.user_input == :add_hill2 + input_add_hill2 + elsif state.user_input == :add_wall + input_add_wall + elsif state.user_input == :add_wall2 + input_add_wall2 end end @@ -433,26 +433,26 @@ class Movement_Costs calc_dijkstra end end - + def calc_breadth_first # Sets up the Breadth First Search - breadth_first_search.visited[state.star] = true - breadth_first_search.frontier << state.star + breadth_first_search.visited[state.star] = true + breadth_first_search.frontier << state.star breadth_first_search.came_from[state.star] = nil until breadth_first_search.frontier.empty? return if breadth_first_search.visited.has_key?(state.target) # A step in the search # Takes the next frontier cell - new_frontier = breadth_first_search.frontier.shift + new_frontier = breadth_first_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 breadth_first_search.visited.has_key?(neighbor) || state.walls.has_key?(neighbor) + unless breadth_first_search.visited.has_key?(neighbor) || state.walls.has_key?(neighbor) # Add them to the frontier and mark them as visited in the first grid - breadth_first_search.visited[neighbor] = true - breadth_first_search.frontier << neighbor + breadth_first_search.visited[neighbor] = true + breadth_first_search.frontier << neighbor # Remember which cell the neighbor came from breadth_first_search.came_from[neighbor] = new_frontier end @@ -512,12 +512,12 @@ class Movement_Costs # 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 = state.star.clone + old_star = state.star.clone unless cell_closest_to_mouse == state.target - state.star = cell_closest_to_mouse + state.star = cell_closest_to_mouse end - unless old_star == state.star - reset_search + unless old_star == state.star + reset_search end end @@ -525,12 +525,12 @@ class Movement_Costs # Only resets the search if the star changes position # Called whenever the user is editing the star (puts mouse down on star) def input_star2 - old_star = state.star.clone + old_star = state.star.clone unless cell_closest_to_mouse2 == state.target state.star = cell_closest_to_mouse2 end - unless old_star == state.star - reset_search + unless old_star == state.star + reset_search end end @@ -538,12 +538,12 @@ class Movement_Costs # 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 = state.target.clone + old_target = state.target.clone unless cell_closest_to_mouse == state.star state.target = cell_closest_to_mouse end - unless old_target == state.target - reset_search + unless old_target == state.target + reset_search end end @@ -551,12 +551,12 @@ class Movement_Costs # 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_target2 - old_target = state.target.clone + old_target = state.target.clone unless cell_closest_to_mouse2 == state.star state.target = cell_closest_to_mouse2 end - unless old_target == state.target - reset_search + unless old_target == state.target + reset_search end end @@ -565,11 +565,11 @@ class Movement_Costs # 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_over_grid? + if mouse_over_grid? if state.walls.has_key?(cell_closest_to_mouse) or state.hills.has_key?(cell_closest_to_mouse) - state.walls.delete(cell_closest_to_mouse) - state.hills.delete(cell_closest_to_mouse) - reset_search + state.walls.delete(cell_closest_to_mouse) + state.hills.delete(cell_closest_to_mouse) + reset_search end end end @@ -579,21 +579,21 @@ class Movement_Costs # 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_over_grid2? + if mouse_over_grid2? if state.walls.has_key?(cell_closest_to_mouse2) or state.hills.has_key?(cell_closest_to_mouse2) - state.walls.delete(cell_closest_to_mouse2) - state.hills.delete(cell_closest_to_mouse2) - reset_search + state.walls.delete(cell_closest_to_mouse2) + state.hills.delete(cell_closest_to_mouse2) + reset_search end end end # Adds a hill in the first grid in the cell the mouse is over def input_add_hill - if mouse_over_grid? + if mouse_over_grid? unless state.hills.has_key?(cell_closest_to_mouse) - state.hills[cell_closest_to_mouse] = true - reset_search + state.hills[cell_closest_to_mouse] = true + reset_search end end end @@ -601,32 +601,32 @@ class Movement_Costs # Adds a hill in the second grid in the cell the mouse is over def input_add_hill2 - if mouse_over_grid2? + if mouse_over_grid2? unless state.hills.has_key?(cell_closest_to_mouse2) - state.hills[cell_closest_to_mouse2] = true - reset_search + state.hills[cell_closest_to_mouse2] = true + 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_over_grid? + if mouse_over_grid? unless state.walls.has_key?(cell_closest_to_mouse) - state.hills.delete(cell_closest_to_mouse) - state.walls[cell_closest_to_mouse] = true - reset_search + state.hills.delete(cell_closest_to_mouse) + state.walls[cell_closest_to_mouse] = true + reset_search end end end # Adds a wall in the second grid in the cell the mouse is over def input_add_wall2 - if mouse_over_grid2? + if mouse_over_grid2? unless state.walls.has_key?(cell_closest_to_mouse2) - state.hills.delete(cell_closest_to_mouse2) - state.walls[cell_closest_to_mouse2] = true - reset_search + state.hills.delete(cell_closest_to_mouse2) + state.walls[cell_closest_to_mouse2] = true + reset_search end end end @@ -649,21 +649,21 @@ class Movement_Costs # 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 @@ -688,13 +688,13 @@ class Movement_Costs # 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 # When the user grabs the star and puts their cursor to the far right @@ -702,17 +702,17 @@ class Movement_Costs # Finding the cell closest to the mouse in the second grid helps with this def cell_closest_to_mouse2 # Closest cell grid to the mouse in the second - 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 # Translate the cell to the first grid x -= grid.width + 1 # Bound x and y to the first grid x = 0 if x < 0 y = 0 if y < 0 - 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 @@ -785,12 +785,12 @@ class Movement_Costs # Light brown def unvisited_color - [221, 212, 213] + [221, 212, 213] end # Camo Green def wall_color - [134, 134, 120] + [134, 134, 120] end # Pastel White @@ -833,7 +833,7 @@ def tick args end # Every tick, new args are passed, and the Dijkstra tick method is called - $movement_costs ||= Movement_Costs.new(args) + $movement_costs ||= Movement_Costs.new $movement_costs.args = args $movement_costs.tick end diff --git a/samples/13_path_finding_algorithms/05_dijkstra/replay.txt b/samples/13_path_finding_algorithms/05_dijkstra/replay.txt new file mode 100644 index 0000000..a459873 --- /dev/null +++ b/samples/13_path_finding_algorithms/05_dijkstra/replay.txt @@ -0,0 +1,686 @@ +replay_version 2.0 +stopped_at 730 +seed 100 +recorded_at 2021-11-20 11:20:27 -0600 +[:mouse_button_up, 1, 0, 1, 1, 1] +[:mouse_move, 782, 97, 2, 2, 14] +[:mouse_move, 782, 98, 2, 3, 15] +[:mouse_move, 782, 99, 2, 4, 15] +[:mouse_move, 782, 100, 2, 5, 16] +[:mouse_move, 780, 102, 2, 6, 16] +[:mouse_move, 773, 111, 2, 7, 17] +[:mouse_move, 768, 123, 2, 8, 17] +[:mouse_move, 759, 142, 2, 9, 18] +[:mouse_move, 740, 166, 2, 10, 18] +[:mouse_move, 718, 196, 2, 11, 19] +[:mouse_move, 699, 232, 2, 12, 19] +[:mouse_move, 686, 272, 2, 13, 20] +[:mouse_move, 673, 314, 2, 14, 20] +[:mouse_move, 648, 355, 2, 15, 21] +[:mouse_move, 594, 404, 2, 16, 21] +[:mouse_move, 562, 427, 2, 17, 22] +[:mouse_move, 532, 446, 2, 18, 22] +[:mouse_move, 509, 458, 2, 19, 23] +[:mouse_move, 490, 464, 2, 20, 23] +[:mouse_move, 482, 466, 2, 21, 23] +[:mouse_move, 481, 466, 2, 22, 24] +[:mouse_move, 481, 460, 2, 23, 25] +[:mouse_move, 490, 451, 2, 24, 26] +[:mouse_move, 501, 443, 2, 25, 26] +[:mouse_move, 506, 441, 2, 26, 26] +[:mouse_move, 506, 442, 2, 27, 29] +[:mouse_move, 507, 442, 2, 28, 31] +[:mouse_move, 508, 442, 2, 29, 32] +[:mouse_move, 509, 442, 2, 30, 37] +[:mouse_move, 510, 442, 2, 31, 48] +[:mouse_move, 507, 442, 2, 32, 63] +[:mouse_move, 500, 444, 2, 33, 63] +[:mouse_move, 488, 446, 2, 34, 64] +[:mouse_move, 476, 447, 2, 35, 64] +[:mouse_move, 466, 449, 2, 36, 65] +[:mouse_move, 459, 450, 2, 37, 65] +[:mouse_move, 449, 452, 2, 38, 66] +[:mouse_move, 440, 453, 2, 39, 66] +[:mouse_move, 433, 454, 2, 40, 67] +[:mouse_move, 432, 454, 2, 41, 67] +[:mouse_move, 436, 455, 2, 42, 69] +[:mouse_move, 442, 455, 2, 43, 69] +[:mouse_move, 446, 455, 2, 44, 70] +[:mouse_move, 450, 455, 2, 45, 70] +[:mouse_move, 456, 448, 2, 46, 70] +[:mouse_move, 458, 437, 2, 47, 71] +[:mouse_move, 458, 422, 2, 48, 72] +[:mouse_move, 451, 402, 2, 49, 72] +[:mouse_move, 440, 376, 2, 50, 72] +[:mouse_move, 414, 334, 2, 51, 73] +[:mouse_move, 393, 303, 2, 52, 74] +[:mouse_move, 378, 280, 2, 53, 74] +[:mouse_move, 367, 265, 2, 54, 75] +[:mouse_move, 358, 255, 2, 55, 75] +[:mouse_move, 353, 251, 2, 56, 75] +[:mouse_move, 349, 248, 2, 57, 76] +[:mouse_move, 348, 248, 2, 58, 76] +[:mouse_move, 345, 249, 2, 59, 77] +[:mouse_move, 344, 249, 2, 60, 78] +[:mouse_move, 338, 246, 2, 61, 79] +[:mouse_move, 332, 240, 2, 62, 79] +[:mouse_move, 328, 231, 2, 63, 80] +[:mouse_move, 326, 222, 2, 64, 80] +[:mouse_move, 326, 214, 2, 65, 81] +[:mouse_move, 331, 208, 2, 66, 81] +[:mouse_move, 340, 204, 2, 67, 82] +[:mouse_move, 348, 202, 2, 68, 82] +[:mouse_move, 357, 202, 2, 69, 83] +[:mouse_move, 363, 202, 2, 70, 84] +[:mouse_move, 365, 202, 2, 71, 84] +[:mouse_move, 366, 202, 2, 72, 84] +[:mouse_move, 374, 203, 2, 73, 85] +[:mouse_move, 380, 204, 2, 74, 85] +[:mouse_move, 382, 204, 2, 75, 86] +[:mouse_move, 383, 204, 2, 76, 86] +[:mouse_button_pressed, 1, 0, 1, 77, 88] +[:mouse_button_up, 1, 0, 1, 78, 89] +[:mouse_move, 384, 204, 2, 79, 99] +[:mouse_move, 384, 205, 2, 80, 100] +[:mouse_move, 389, 210, 2, 81, 101] +[:mouse_move, 394, 214, 2, 82, 101] +[:mouse_move, 399, 220, 2, 83, 101] +[:mouse_move, 405, 228, 2, 84, 102] +[:mouse_move, 410, 242, 2, 85, 103] +[:mouse_move, 416, 261, 2, 86, 103] +[:mouse_move, 422, 276, 2, 87, 104] +[:mouse_move, 428, 284, 2, 88, 104] +[:mouse_move, 430, 287, 2, 89, 104] +[:mouse_move, 431, 288, 2, 90, 105] +[:mouse_move, 433, 290, 2, 91, 105] +[:mouse_move, 434, 295, 2, 92, 106] +[:mouse_move, 435, 306, 2, 93, 106] +[:mouse_move, 436, 311, 2, 94, 107] +[:mouse_move, 436, 312, 2, 95, 108] +[:mouse_move, 438, 314, 2, 96, 112] +[:mouse_move, 441, 320, 2, 97, 113] +[:mouse_move, 447, 341, 2, 98, 113] +[:mouse_move, 453, 376, 2, 99, 114] +[:mouse_move, 456, 413, 2, 100, 114] +[:mouse_move, 456, 445, 2, 101, 115] +[:mouse_move, 455, 475, 2, 102, 115] +[:mouse_move, 450, 498, 2, 103, 116] +[:mouse_move, 446, 519, 2, 104, 116] +[:mouse_move, 446, 541, 2, 105, 117] +[:mouse_move, 452, 559, 2, 106, 117] +[:mouse_move, 458, 569, 2, 107, 117] +[:mouse_move, 464, 573, 2, 108, 118] +[:mouse_move, 468, 573, 2, 109, 119] +[:mouse_move, 471, 570, 2, 110, 119] +[:mouse_move, 474, 559, 2, 111, 120] +[:mouse_move, 476, 539, 2, 112, 120] +[:mouse_move, 483, 527, 2, 113, 120] +[:mouse_move, 489, 519, 2, 114, 121] +[:mouse_move, 493, 515, 2, 115, 121] +[:mouse_move, 493, 511, 2, 116, 122] +[:mouse_move, 493, 505, 2, 117, 122] +[:mouse_move, 493, 499, 2, 118, 123] +[:mouse_move, 490, 496, 2, 119, 123] +[:mouse_move, 488, 493, 2, 120, 124] +[:mouse_move, 487, 493, 2, 121, 124] +[:mouse_move, 484, 493, 2, 122, 125] +[:mouse_move, 482, 493, 2, 123, 125] +[:mouse_move, 479, 494, 2, 124, 126] +[:mouse_move, 474, 495, 2, 125, 126] +[:mouse_move, 470, 499, 2, 126, 127] +[:mouse_move, 470, 503, 2, 127, 127] +[:mouse_move, 470, 506, 2, 128, 128] +[:mouse_button_pressed, 1, 0, 1, 129, 131] +[:mouse_button_up, 1, 0, 1, 130, 132] +[:mouse_move, 470, 503, 2, 131, 135] +[:mouse_move, 470, 495, 2, 132, 135] +[:mouse_move, 470, 488, 2, 133, 135] +[:mouse_move, 472, 478, 2, 134, 136] +[:mouse_move, 473, 470, 2, 135, 137] +[:mouse_move, 474, 459, 2, 136, 137] +[:mouse_move, 474, 450, 2, 137, 138] +[:mouse_move, 474, 445, 2, 138, 138] +[:mouse_move, 472, 441, 2, 139, 138] +[:mouse_move, 470, 439, 2, 140, 139] +[:mouse_move, 467, 438, 2, 141, 139] +[:mouse_move, 465, 438, 2, 142, 140] +[:mouse_move, 464, 438, 2, 143, 140] +[:mouse_move, 463, 438, 2, 144, 141] +[:mouse_move, 460, 438, 2, 145, 141] +[:mouse_move, 459, 438, 2, 146, 142] +[:mouse_button_pressed, 1, 0, 1, 147, 144] +[:mouse_button_up, 1, 0, 1, 148, 145] +[:mouse_move, 459, 439, 2, 149, 153] +[:mouse_move, 459, 438, 2, 150, 164] +[:mouse_move, 458, 434, 2, 151, 164] +[:mouse_move, 458, 426, 2, 152, 165] +[:mouse_move, 458, 414, 2, 153, 165] +[:mouse_move, 461, 400, 2, 154, 166] +[:mouse_move, 461, 397, 2, 155, 166] +[:mouse_move, 461, 396, 2, 156, 166] +[:mouse_move, 461, 395, 2, 157, 167] +[:mouse_button_pressed, 1, 0, 1, 158, 170] +[:mouse_button_up, 1, 0, 1, 159, 171] +[:mouse_move, 461, 394, 2, 160, 174] +[:mouse_move, 461, 391, 2, 161, 175] +[:mouse_move, 461, 387, 2, 162, 175] +[:mouse_move, 461, 381, 2, 163, 176] +[:mouse_move, 461, 379, 2, 164, 176] +[:mouse_move, 461, 378, 2, 165, 177] +[:mouse_move, 461, 377, 2, 166, 177] +[:mouse_move, 461, 375, 2, 167, 179] +[:mouse_move, 461, 374, 2, 168, 179] +[:mouse_move, 461, 373, 2, 169, 180] +[:mouse_move, 461, 372, 2, 170, 181] +[:mouse_move, 461, 370, 2, 171, 181] +[:mouse_move, 460, 365, 2, 172, 182] +[:mouse_move, 460, 362, 2, 173, 182] +[:mouse_move, 460, 359, 2, 174, 182] +[:mouse_move, 460, 358, 2, 175, 184] +[:mouse_move, 459, 356, 2, 176, 185] +[:mouse_move, 459, 355, 2, 177, 186] +[:mouse_move, 459, 352, 2, 178, 186] +[:mouse_move, 459, 351, 2, 179, 187] +[:mouse_move, 458, 350, 2, 180, 187] +[:mouse_move, 458, 349, 2, 181, 187] +[:mouse_move, 457, 352, 2, 182, 191] +[:mouse_move, 456, 369, 2, 183, 192] +[:mouse_move, 456, 381, 2, 184, 192] +[:mouse_move, 456, 393, 2, 185, 193] +[:mouse_move, 460, 412, 2, 186, 193] +[:mouse_move, 466, 429, 2, 187, 193] +[:mouse_move, 471, 448, 2, 188, 194] +[:mouse_move, 472, 464, 2, 189, 194] +[:mouse_move, 473, 477, 2, 190, 195] +[:mouse_move, 474, 488, 2, 191, 196] +[:mouse_move, 474, 497, 2, 192, 196] +[:mouse_move, 474, 499, 2, 193, 196] +[:mouse_move, 472, 504, 2, 194, 197] +[:mouse_move, 470, 513, 2, 195, 197] +[:mouse_move, 470, 516, 2, 196, 197] +[:mouse_move, 470, 517, 2, 197, 198] +[:mouse_move, 470, 519, 2, 198, 199] +[:mouse_move, 470, 521, 2, 199, 199] +[:mouse_move, 470, 522, 2, 200, 200] +[:mouse_move, 470, 523, 2, 201, 201] +[:mouse_move, 467, 521, 2, 202, 203] +[:mouse_move, 464, 518, 2, 203, 203] +[:mouse_move, 462, 515, 2, 204, 204] +[:mouse_move, 461, 511, 2, 205, 205] +[:mouse_button_pressed, 1, 0, 1, 206, 210] +[:mouse_button_up, 1, 0, 1, 207, 211] +[:mouse_move, 462, 511, 2, 208, 218] +[:mouse_move, 465, 510, 2, 209, 218] +[:mouse_move, 470, 508, 2, 210, 218] +[:mouse_move, 475, 505, 2, 211, 219] +[:mouse_move, 483, 502, 2, 212, 219] +[:mouse_move, 493, 498, 2, 213, 220] +[:mouse_move, 506, 491, 2, 214, 221] +[:mouse_move, 517, 479, 2, 215, 221] +[:mouse_move, 521, 471, 2, 216, 221] +[:mouse_move, 523, 467, 2, 217, 222] +[:mouse_move, 523, 464, 2, 218, 222] +[:mouse_move, 522, 464, 2, 219, 227] +[:mouse_move, 521, 464, 2, 220, 227] +[:mouse_move, 518, 464, 2, 221, 228] +[:mouse_move, 513, 460, 2, 222, 228] +[:mouse_move, 513, 459, 2, 223, 228] +[:mouse_move, 512, 459, 2, 224, 229] +[:mouse_move, 512, 458, 2, 225, 229] +[:mouse_button_pressed, 1, 0, 1, 226, 232] +[:mouse_move, 513, 458, 2, 227, 233] +[:mouse_move, 514, 458, 2, 228, 234] +[:mouse_move, 516, 458, 2, 229, 234] +[:mouse_move, 517, 458, 2, 230, 235] +[:mouse_move, 523, 453, 2, 231, 235] +[:mouse_move, 531, 444, 2, 232, 235] +[:mouse_move, 537, 436, 2, 233, 236] +[:mouse_move, 541, 428, 2, 234, 236] +[:mouse_move, 543, 421, 2, 235, 237] +[:mouse_move, 545, 413, 2, 236, 237] +[:mouse_move, 546, 405, 2, 237, 237] +[:mouse_move, 547, 396, 2, 238, 237] +[:mouse_move, 547, 389, 2, 239, 237] +[:mouse_move, 547, 383, 2, 240, 237] +[:mouse_move, 547, 379, 2, 241, 238] +[:mouse_move, 547, 378, 2, 242, 238] +[:mouse_move, 547, 376, 2, 243, 238] +[:mouse_move, 546, 375, 2, 244, 238] +[:mouse_move, 546, 374, 2, 245, 238] +[:mouse_move, 546, 372, 2, 246, 239] +[:mouse_move, 545, 368, 2, 247, 239] +[:mouse_move, 544, 366, 2, 248, 239] +[:mouse_move, 543, 363, 2, 249, 240] +[:mouse_move, 540, 357, 2, 250, 240] +[:mouse_move, 534, 350, 2, 251, 241] +[:mouse_move, 528, 344, 2, 252, 241] +[:mouse_move, 520, 339, 2, 253, 241] +[:mouse_move, 517, 339, 2, 254, 241] +[:mouse_move, 514, 337, 2, 255, 241] +[:mouse_move, 513, 337, 2, 256, 242] +[:mouse_move, 511, 336, 2, 257, 242] +[:mouse_move, 509, 336, 2, 258, 242] +[:mouse_move, 508, 336, 2, 259, 242] +[:mouse_move, 507, 336, 2, 260, 242] +[:mouse_move, 505, 335, 2, 261, 242] +[:mouse_move, 502, 335, 2, 262, 243] +[:mouse_move, 498, 335, 2, 263, 244] +[:mouse_move, 494, 335, 2, 264, 244] +[:mouse_move, 484, 335, 2, 265, 244] +[:mouse_move, 475, 335, 2, 266, 245] +[:mouse_move, 469, 335, 2, 267, 245] +[:mouse_move, 459, 338, 2, 268, 246] +[:mouse_move, 451, 342, 2, 269, 246] +[:mouse_move, 441, 347, 2, 270, 246] +[:mouse_move, 430, 352, 2, 271, 246] +[:mouse_move, 421, 357, 2, 272, 247] +[:mouse_move, 408, 366, 2, 273, 247] +[:mouse_move, 398, 375, 2, 274, 247] +[:mouse_move, 390, 386, 2, 275, 248] +[:mouse_move, 380, 402, 2, 276, 248] +[:mouse_move, 374, 412, 2, 277, 248] +[:mouse_move, 368, 420, 2, 278, 248] +[:mouse_move, 364, 427, 2, 279, 248] +[:mouse_move, 362, 437, 2, 280, 249] +[:mouse_move, 362, 448, 2, 281, 249] +[:mouse_move, 362, 455, 2, 282, 249] +[:mouse_move, 362, 463, 2, 283, 249] +[:mouse_move, 362, 467, 2, 284, 249] +[:mouse_move, 362, 473, 2, 285, 250] +[:mouse_move, 364, 483, 2, 286, 250] +[:mouse_move, 368, 490, 2, 287, 251] +[:mouse_move, 372, 496, 2, 288, 251] +[:mouse_move, 379, 505, 2, 289, 251] +[:mouse_move, 384, 509, 2, 290, 251] +[:mouse_move, 385, 511, 2, 291, 251] +[:mouse_move, 387, 511, 2, 292, 252] +[:mouse_move, 387, 512, 2, 293, 252] +[:mouse_move, 388, 512, 2, 294, 253] +[:mouse_move, 390, 514, 2, 295, 254] +[:mouse_move, 392, 516, 2, 296, 254] +[:mouse_move, 392, 517, 2, 297, 254] +[:mouse_move, 393, 518, 2, 298, 255] +[:mouse_move, 394, 520, 2, 299, 255] +[:mouse_move, 395, 523, 2, 300, 256] +[:mouse_move, 395, 527, 2, 301, 257] +[:mouse_move, 395, 533, 2, 302, 257] +[:mouse_move, 392, 542, 2, 303, 258] +[:mouse_move, 392, 555, 2, 304, 258] +[:mouse_move, 392, 567, 2, 305, 258] +[:mouse_move, 392, 576, 2, 306, 259] +[:mouse_move, 392, 583, 2, 307, 259] +[:mouse_move, 392, 587, 2, 308, 259] +[:mouse_move, 392, 590, 2, 309, 259] +[:mouse_move, 392, 592, 2, 310, 260] +[:mouse_move, 391, 594, 2, 311, 260] +[:mouse_move, 391, 595, 2, 312, 261] +[:mouse_move, 389, 597, 2, 313, 262] +[:mouse_move, 382, 602, 2, 314, 262] +[:mouse_move, 372, 608, 2, 315, 263] +[:mouse_move, 359, 612, 2, 316, 263] +[:mouse_move, 345, 619, 2, 317, 263] +[:mouse_move, 329, 626, 2, 318, 263] +[:mouse_move, 314, 633, 2, 319, 263] +[:mouse_move, 301, 639, 2, 320, 263] +[:mouse_move, 286, 643, 2, 321, 264] +[:mouse_move, 270, 646, 2, 322, 264] +[:mouse_move, 255, 647, 2, 323, 264] +[:mouse_move, 236, 650, 2, 324, 264] +[:mouse_move, 227, 650, 2, 325, 265] +[:mouse_move, 216, 650, 2, 326, 265] +[:mouse_move, 207, 650, 2, 327, 265] +[:mouse_move, 203, 651, 2, 328, 265] +[:mouse_move, 202, 651, 2, 329, 265] +[:mouse_move, 201, 651, 2, 330, 265] +[:mouse_move, 200, 651, 2, 331, 267] +[:mouse_move, 199, 651, 2, 332, 267] +[:mouse_move, 198, 651, 2, 333, 268] +[:mouse_move, 195, 652, 2, 334, 268] +[:mouse_move, 194, 653, 2, 335, 269] +[:mouse_move, 193, 654, 2, 336, 269] +[:mouse_move, 193, 655, 2, 337, 272] +[:mouse_move, 192, 655, 2, 338, 272] +[:mouse_move, 192, 656, 2, 339, 274] +[:mouse_move, 192, 658, 2, 340, 275] +[:mouse_move, 192, 661, 2, 341, 275] +[:mouse_move, 192, 662, 2, 342, 275] +[:mouse_move, 192, 664, 2, 343, 276] +[:mouse_move, 192, 665, 2, 344, 277] +[:mouse_button_up, 1, 0, 1, 345, 329] +[:mouse_move, 192, 664, 2, 346, 337] +[:mouse_move, 193, 664, 2, 347, 354] +[:mouse_move, 195, 663, 2, 348, 355] +[:mouse_move, 201, 662, 2, 349, 355] +[:mouse_move, 211, 660, 2, 350, 356] +[:mouse_move, 227, 659, 2, 351, 357] +[:mouse_move, 283, 651, 2, 352, 357] +[:mouse_move, 348, 641, 2, 353, 358] +[:mouse_move, 431, 632, 2, 354, 358] +[:mouse_move, 522, 622, 2, 355, 359] +[:mouse_move, 605, 609, 2, 356, 359] +[:mouse_move, 661, 603, 2, 357, 360] +[:mouse_move, 687, 599, 2, 358, 361] +[:mouse_move, 702, 596, 2, 359, 361] +[:mouse_move, 708, 595, 2, 360, 362] +[:mouse_move, 711, 593, 2, 361, 362] +[:mouse_move, 712, 592, 2, 362, 364] +[:mouse_move, 714, 590, 2, 363, 364] +[:mouse_move, 715, 589, 2, 364, 365] +[:mouse_move, 715, 587, 2, 365, 365] +[:mouse_move, 713, 584, 2, 366, 366] +[:mouse_move, 712, 584, 2, 367, 367] +[:mouse_move, 711, 583, 2, 368, 368] +[:mouse_move, 712, 582, 2, 369, 369] +[:mouse_move, 716, 579, 2, 370, 370] +[:mouse_move, 719, 578, 2, 371, 371] +[:mouse_move, 740, 571, 2, 372, 372] +[:mouse_move, 757, 569, 2, 373, 372] +[:mouse_move, 764, 568, 2, 374, 372] +[:mouse_move, 764, 567, 2, 375, 374] +[:mouse_button_pressed, 1, 0, 1, 376, 376] +[:mouse_button_up, 1, 0, 1, 377, 377] +[:mouse_move, 764, 571, 2, 378, 390] +[:mouse_move, 764, 579, 2, 379, 391] +[:mouse_move, 764, 584, 2, 380, 391] +[:mouse_move, 763, 586, 2, 381, 392] +[:mouse_move, 760, 592, 2, 382, 393] +[:mouse_move, 755, 600, 2, 383, 393] +[:mouse_move, 752, 606, 2, 384, 393] +[:mouse_move, 750, 607, 2, 385, 394] +[:mouse_move, 750, 608, 2, 386, 395] +[:mouse_move, 750, 610, 2, 387, 396] +[:mouse_move, 750, 614, 2, 388, 396] +[:mouse_move, 750, 615, 2, 389, 396] +[:mouse_move, 750, 617, 2, 390, 397] +[:mouse_move, 750, 618, 2, 391, 398] +[:mouse_move, 750, 620, 2, 392, 399] +[:mouse_move, 749, 622, 2, 393, 400] +[:mouse_button_pressed, 1, 0, 1, 394, 401] +[:mouse_button_up, 1, 0, 1, 395, 403] +[:mouse_move, 749, 623, 2, 396, 408] +[:mouse_move, 750, 623, 2, 397, 410] +[:mouse_move, 754, 624, 2, 398, 410] +[:mouse_move, 760, 625, 2, 399, 411] +[:mouse_move, 769, 628, 2, 400, 411] +[:mouse_move, 785, 630, 2, 401, 412] +[:mouse_move, 791, 631, 2, 402, 413] +[:mouse_move, 792, 631, 2, 403, 414] +[:mouse_move, 793, 631, 2, 404, 414] +[:mouse_move, 794, 631, 2, 405, 415] +[:mouse_move, 795, 631, 2, 406, 415] +[:mouse_move, 796, 631, 2, 407, 416] +[:mouse_move, 798, 631, 2, 408, 417] +[:mouse_move, 799, 631, 2, 409, 422] +[:mouse_move, 799, 630, 2, 410, 423] +[:mouse_move, 800, 627, 2, 411, 426] +[:mouse_move, 802, 621, 2, 412, 427] +[:mouse_move, 804, 609, 2, 413, 427] +[:mouse_move, 806, 601, 2, 414, 428] +[:mouse_move, 804, 595, 2, 415, 429] +[:mouse_move, 799, 591, 2, 416, 430] +[:mouse_move, 796, 591, 2, 417, 430] +[:mouse_move, 792, 591, 2, 418, 430] +[:mouse_move, 786, 593, 2, 419, 431] +[:mouse_move, 775, 597, 2, 420, 432] +[:mouse_move, 766, 600, 2, 421, 433] +[:mouse_move, 763, 600, 2, 422, 434] +[:mouse_move, 762, 600, 2, 423, 434] +[:mouse_move, 761, 599, 2, 424, 435] +[:mouse_move, 759, 592, 2, 425, 435] +[:mouse_move, 756, 578, 2, 426, 436] +[:mouse_move, 755, 571, 2, 427, 437] +[:mouse_move, 755, 566, 2, 428, 437] +[:mouse_button_pressed, 1, 0, 1, 429, 440] +[:mouse_button_up, 1, 0, 1, 430, 442] +[:mouse_move, 755, 567, 2, 431, 443] +[:mouse_move, 756, 567, 2, 432, 444] +[:mouse_move, 756, 568, 2, 433, 446] +[:mouse_move, 756, 573, 2, 434, 446] +[:mouse_move, 756, 582, 2, 435, 447] +[:mouse_move, 756, 592, 2, 436, 448] +[:mouse_move, 758, 599, 2, 437, 448] +[:mouse_move, 758, 604, 2, 438, 449] +[:mouse_move, 759, 607, 2, 439, 449] +[:mouse_move, 760, 610, 2, 440, 450] +[:mouse_move, 760, 611, 2, 441, 451] +[:mouse_move, 760, 612, 2, 442, 451] +[:mouse_move, 760, 613, 2, 443, 452] +[:mouse_move, 760, 614, 2, 444, 452] +[:mouse_move, 760, 615, 2, 445, 454] +[:mouse_move, 759, 616, 2, 446, 455] +[:mouse_move, 759, 617, 2, 447, 455] +[:mouse_move, 759, 618, 2, 448, 456] +[:mouse_move, 759, 619, 2, 449, 457] +[:mouse_move, 759, 621, 2, 450, 459] +[:mouse_move, 758, 621, 2, 451, 460] +[:mouse_move, 758, 622, 2, 452, 463] +[:mouse_move, 758, 623, 2, 453, 464] +[:mouse_move, 759, 623, 2, 454, 467] +[:mouse_move, 759, 624, 2, 455, 468] +[:mouse_move, 767, 624, 2, 456, 468] +[:mouse_move, 776, 625, 2, 457, 469] +[:mouse_move, 787, 627, 2, 458, 469] +[:mouse_move, 795, 629, 2, 459, 470] +[:mouse_move, 797, 630, 2, 460, 470] +[:mouse_move, 798, 630, 2, 461, 471] +[:mouse_button_pressed, 1, 0, 1, 462, 476] +[:mouse_move, 799, 630, 2, 463, 476] +[:mouse_button_up, 1, 0, 1, 464, 478] +[:mouse_move, 799, 625, 2, 465, 478] +[:mouse_move, 800, 615, 2, 466, 479] +[:mouse_move, 801, 602, 2, 467, 480] +[:mouse_move, 801, 590, 2, 468, 481] +[:mouse_move, 801, 580, 2, 469, 481] +[:mouse_move, 801, 571, 2, 470, 482] +[:mouse_move, 801, 570, 2, 471, 482] +[:mouse_move, 801, 569, 2, 472, 483] +[:mouse_move, 801, 568, 2, 473, 485] +[:mouse_move, 802, 567, 2, 474, 487] +[:mouse_move, 803, 567, 2, 475, 488] +[:mouse_button_pressed, 1, 0, 1, 476, 491] +[:mouse_button_up, 1, 0, 1, 477, 493] +[:mouse_move, 804, 567, 2, 478, 494] +[:mouse_move, 811, 567, 2, 479, 495] +[:mouse_move, 822, 567, 2, 480, 495] +[:mouse_move, 837, 567, 2, 481, 496] +[:mouse_move, 850, 567, 2, 482, 496] +[:mouse_move, 861, 567, 2, 483, 497] +[:mouse_move, 873, 568, 2, 484, 497] +[:mouse_move, 875, 568, 2, 485, 498] +[:mouse_move, 876, 568, 2, 486, 500] +[:mouse_move, 877, 568, 2, 487, 501] +[:mouse_move, 877, 569, 2, 488, 501] +[:mouse_move, 868, 570, 2, 489, 516] +[:mouse_move, 850, 574, 2, 490, 516] +[:mouse_move, 835, 577, 2, 491, 517] +[:mouse_move, 818, 577, 2, 492, 517] +[:mouse_move, 810, 577, 2, 493, 518] +[:mouse_move, 810, 578, 2, 494, 519] +[:mouse_move, 813, 578, 2, 495, 520] +[:mouse_move, 816, 578, 2, 496, 521] +[:mouse_move, 819, 578, 2, 497, 521] +[:mouse_move, 820, 578, 2, 498, 522] +[:mouse_button_pressed, 1, 0, 1, 499, 526] +[:mouse_button_up, 1, 0, 1, 500, 527] +[:mouse_move, 822, 579, 2, 501, 529] +[:mouse_move, 823, 581, 2, 502, 530] +[:mouse_move, 824, 581, 2, 503, 531] +[:mouse_move, 825, 581, 2, 504, 531] +[:mouse_move, 829, 581, 2, 505, 531] +[:mouse_move, 836, 581, 2, 506, 532] +[:mouse_move, 843, 580, 2, 507, 533] +[:mouse_move, 852, 577, 2, 508, 534] +[:mouse_move, 862, 574, 2, 509, 534] +[:mouse_move, 864, 574, 2, 510, 535] +[:mouse_move, 865, 574, 2, 511, 541] +[:mouse_button_pressed, 1, 0, 1, 512, 542] +[:mouse_button_up, 1, 0, 1, 513, 544] +[:mouse_move, 866, 581, 2, 514, 545] +[:mouse_move, 868, 587, 2, 515, 545] +[:mouse_move, 870, 592, 2, 516, 546] +[:mouse_move, 871, 595, 2, 517, 546] +[:mouse_move, 873, 598, 2, 518, 547] +[:mouse_move, 874, 602, 2, 519, 548] +[:mouse_move, 875, 608, 2, 520, 548] +[:mouse_move, 875, 610, 2, 521, 549] +[:mouse_move, 875, 613, 2, 522, 549] +[:mouse_move, 875, 616, 2, 523, 550] +[:mouse_move, 875, 617, 2, 524, 551] +[:mouse_move, 875, 618, 2, 525, 552] +[:mouse_move, 874, 620, 2, 526, 553] +[:mouse_move, 872, 625, 2, 527, 553] +[:mouse_move, 871, 627, 2, 528, 554] +[:mouse_move, 871, 628, 2, 529, 554] +[:mouse_move, 871, 629, 2, 530, 555] +[:mouse_move, 870, 630, 2, 531, 556] +[:mouse_button_pressed, 1, 0, 1, 532, 558] +[:mouse_move, 871, 630, 2, 533, 558] +[:mouse_button_up, 1, 0, 1, 534, 560] +[:mouse_move, 869, 630, 2, 535, 564] +[:mouse_move, 864, 631, 2, 536, 565] +[:mouse_move, 857, 632, 2, 537, 566] +[:mouse_move, 845, 633, 2, 538, 567] +[:mouse_move, 830, 635, 2, 539, 567] +[:mouse_move, 815, 636, 2, 540, 568] +[:mouse_move, 800, 636, 2, 541, 568] +[:mouse_move, 782, 636, 2, 542, 569] +[:mouse_move, 773, 636, 2, 543, 570] +[:mouse_move, 764, 636, 2, 544, 570] +[:mouse_move, 757, 636, 2, 545, 571] +[:mouse_move, 748, 636, 2, 546, 571] +[:mouse_move, 741, 634, 2, 547, 572] +[:mouse_move, 734, 634, 2, 548, 573] +[:mouse_move, 728, 634, 2, 549, 574] +[:mouse_move, 720, 634, 2, 550, 574] +[:mouse_move, 713, 633, 2, 551, 575] +[:mouse_move, 723, 632, 2, 552, 579] +[:mouse_move, 734, 629, 2, 553, 580] +[:mouse_move, 745, 626, 2, 554, 581] +[:mouse_move, 761, 623, 2, 555, 581] +[:mouse_move, 784, 617, 2, 556, 582] +[:mouse_move, 811, 610, 2, 557, 582] +[:mouse_move, 834, 601, 2, 558, 583] +[:mouse_move, 850, 594, 2, 559, 584] +[:mouse_move, 857, 590, 2, 560, 584] +[:mouse_move, 858, 589, 2, 561, 585] +[:mouse_move, 858, 588, 2, 562, 585] +[:mouse_move, 858, 587, 2, 563, 586] +[:mouse_move, 858, 586, 2, 564, 587] +[:mouse_move, 858, 585, 2, 565, 588] +[:mouse_move, 858, 584, 2, 566, 593] +[:mouse_button_pressed, 1, 0, 1, 567, 595] +[:mouse_button_up, 1, 0, 1, 568, 597] +[:mouse_move, 851, 587, 2, 569, 599] +[:mouse_move, 840, 590, 2, 570, 599] +[:mouse_move, 825, 594, 2, 571, 600] +[:mouse_move, 803, 600, 2, 572, 600] +[:mouse_move, 777, 605, 2, 573, 601] +[:mouse_move, 751, 607, 2, 574, 602] +[:mouse_move, 729, 611, 2, 575, 602] +[:mouse_move, 713, 614, 2, 576, 603] +[:mouse_move, 701, 615, 2, 577, 603] +[:mouse_move, 695, 615, 2, 578, 604] +[:mouse_move, 694, 616, 2, 579, 605] +[:mouse_move, 692, 615, 2, 580, 605] +[:mouse_move, 690, 614, 2, 581, 606] +[:mouse_move, 689, 614, 2, 582, 607] +[:mouse_move, 688, 613, 2, 583, 607] +[:mouse_move, 688, 610, 2, 584, 608] +[:mouse_move, 687, 605, 2, 585, 608] +[:mouse_move, 686, 598, 2, 586, 609] +[:mouse_move, 686, 589, 2, 587, 610] +[:mouse_move, 686, 582, 2, 588, 610] +[:mouse_move, 687, 576, 2, 589, 611] +[:mouse_move, 688, 576, 2, 590, 611] +[:mouse_move, 688, 575, 2, 591, 612] +[:mouse_move, 689, 574, 2, 592, 613] +[:mouse_move, 689, 573, 2, 593, 613] +[:mouse_move, 690, 573, 2, 594, 614] +[:mouse_button_pressed, 1, 0, 1, 595, 615] +[:mouse_move, 690, 572, 2, 596, 616] +[:mouse_button_up, 1, 0, 1, 597, 617] +[:mouse_move, 690, 573, 2, 598, 617] +[:mouse_move, 690, 574, 2, 599, 619] +[:mouse_move, 690, 575, 2, 600, 620] +[:mouse_move, 690, 576, 2, 601, 621] +[:mouse_move, 690, 578, 2, 602, 621] +[:mouse_move, 690, 579, 2, 603, 622] +[:mouse_move, 690, 583, 2, 604, 622] +[:mouse_move, 691, 594, 2, 605, 622] +[:mouse_move, 693, 605, 2, 606, 623] +[:mouse_move, 696, 614, 2, 607, 624] +[:mouse_move, 698, 619, 2, 608, 625] +[:mouse_move, 699, 621, 2, 609, 625] +[:mouse_move, 700, 622, 2, 610, 626] +[:mouse_move, 701, 622, 2, 611, 634] +[:mouse_move, 702, 622, 2, 612, 649] +[:mouse_move, 702, 621, 2, 613, 656] +[:mouse_move, 705, 620, 2, 614, 656] +[:mouse_move, 718, 614, 2, 615, 657] +[:mouse_move, 750, 600, 2, 616, 657] +[:mouse_move, 811, 576, 2, 617, 658] +[:mouse_move, 895, 538, 2, 618, 659] +[:mouse_move, 984, 489, 2, 619, 659] +[:mouse_move, 1076, 432, 2, 620, 660] +[:mouse_move, 1151, 376, 2, 621, 661] +[:mouse_move, 1205, 336, 2, 622, 661] +[:mouse_move, 1232, 312, 2, 623, 662] +[:mouse_move, 1244, 292, 2, 624, 662] +[:mouse_move, 1244, 286, 2, 625, 663] +[:mouse_move, 1243, 284, 2, 626, 663] +[:mouse_move, 1244, 284, 2, 627, 667] +[:key_down_raw, 96, 0, 2, 628, 675] +[:mouse_move, 1243, 284, 2, 629, 676] +[:mouse_move, 1243, 283, 2, 630, 676] +[:mouse_move, 1243, 282, 2, 631, 676] +[:mouse_move, 1243, 281, 2, 632, 677] +[:key_up_raw, 96, 0, 2, 633, 677] +[:mouse_move, 1243, 280, 2, 634, 677] +[:mouse_move, 1242, 279, 2, 635, 678] +[:mouse_move, 1242, 277, 2, 636, 678] +[:mouse_move, 1242, 274, 2, 637, 679] +[:mouse_move, 1241, 271, 2, 638, 679] +[:mouse_move, 1239, 268, 2, 639, 680] +[:mouse_move, 1237, 264, 2, 640, 680] +[:mouse_move, 1233, 261, 2, 641, 681] +[:mouse_move, 1231, 259, 2, 642, 682] +[:mouse_move, 1231, 258, 2, 643, 682] +[:mouse_move, 1230, 256, 2, 644, 683] +[:mouse_move, 1229, 255, 2, 645, 683] +[:mouse_move, 1227, 252, 2, 646, 684] +[:mouse_move, 1222, 247, 2, 647, 685] +[:mouse_move, 1219, 244, 2, 648, 685] +[:mouse_move, 1217, 242, 2, 649, 685] +[:mouse_move, 1216, 241, 2, 650, 686] +[:mouse_move, 1214, 240, 2, 651, 686] +[:mouse_move, 1206, 237, 2, 652, 687] +[:mouse_move, 1194, 232, 2, 653, 688] +[:mouse_move, 1176, 228, 2, 654, 688] +[:mouse_move, 1161, 224, 2, 655, 688] +[:mouse_move, 1157, 224, 2, 656, 689] +[:mouse_move, 1154, 222, 2, 657, 689] +[:mouse_move, 1148, 217, 2, 658, 690] +[:mouse_move, 1139, 205, 2, 659, 691] +[:mouse_move, 1127, 186, 2, 660, 691] +[:mouse_move, 1118, 165, 2, 661, 691] +[:mouse_move, 1109, 140, 2, 662, 692] +[:mouse_move, 1105, 120, 2, 663, 692] +[:mouse_move, 1107, 107, 2, 664, 693] +[:mouse_move, 1108, 105, 2, 665, 693] +[:mouse_move, 1108, 104, 2, 666, 694] +[:mouse_move, 1100, 103, 2, 667, 697] +[:mouse_move, 1085, 101, 2, 668, 697] +[:mouse_move, 1067, 99, 2, 669, 698] +[:mouse_move, 1051, 96, 2, 670, 698] +[:mouse_move, 1026, 94, 2, 671, 698] +[:mouse_move, 988, 90, 2, 672, 699] +[:mouse_move, 919, 86, 2, 673, 700] +[:mouse_move, 868, 83, 2, 674, 700] +[:mouse_move, 822, 83, 2, 675, 701] +[:mouse_move, 796, 85, 2, 676, 701] +[:mouse_move, 787, 87, 2, 677, 701] +[:mouse_move, 786, 88, 2, 678, 702] +[:mouse_move, 787, 88, 2, 679, 710] +[:mouse_move, 789, 88, 2, 680, 718] +[:mouse_move, 790, 89, 2, 681, 720] +[:key_down_raw, 13, 0, 2, 682, 730] diff --git a/samples/13_path_finding_algorithms/06_heuristic/app/main.rb b/samples/13_path_finding_algorithms/06_heuristic/app/main.rb index cbdfca7..ad4c5ce 100644 --- a/samples/13_path_finding_algorithms/06_heuristic/app/main.rb +++ b/samples/13_path_finding_algorithms/06_heuristic/app/main.rb @@ -969,7 +969,7 @@ def tick args end # Every tick, new args are passed, and the Breadth First Search tick is called - $heuristic_with_walls ||= Heuristic_With_Walls.new(args) + $heuristic_with_walls ||= Heuristic_With_Walls.new $heuristic_with_walls.args = args $heuristic_with_walls.tick end diff --git a/samples/13_path_finding_algorithms/06_heuristic/replay.txt b/samples/13_path_finding_algorithms/06_heuristic/replay.txt new file mode 100644 index 0000000..1683449 --- /dev/null +++ b/samples/13_path_finding_algorithms/06_heuristic/replay.txt @@ -0,0 +1,719 @@ +replay_version 2.0 +stopped_at 1004 +seed 100 +recorded_at 2021-11-20 11:21:45 -0600 +[:mouse_button_up, 1, 0, 1, 1, 3] +[:mouse_move, 767, 87, 2, 2, 22] +[:mouse_move, 742, 87, 2, 3, 22] +[:mouse_move, 713, 87, 2, 4, 23] +[:mouse_move, 685, 87, 2, 5, 24] +[:mouse_move, 656, 87, 2, 6, 25] +[:mouse_move, 633, 87, 2, 7, 26] +[:mouse_move, 616, 87, 2, 8, 27] +[:mouse_move, 603, 85, 2, 9, 28] +[:mouse_move, 587, 77, 2, 10, 29] +[:mouse_move, 567, 69, 2, 11, 30] +[:mouse_move, 543, 60, 2, 12, 31] +[:mouse_move, 528, 55, 2, 13, 31] +[:mouse_move, 517, 53, 2, 14, 32] +[:mouse_move, 513, 51, 2, 15, 33] +[:mouse_move, 511, 50, 2, 16, 34] +[:mouse_move, 506, 49, 2, 17, 35] +[:mouse_move, 501, 48, 2, 18, 36] +[:mouse_move, 497, 46, 2, 19, 36] +[:mouse_move, 496, 46, 2, 20, 37] +[:mouse_move, 495, 46, 2, 21, 38] +[:mouse_move, 490, 46, 2, 22, 39] +[:mouse_move, 483, 46, 2, 23, 40] +[:mouse_move, 470, 46, 2, 24, 41] +[:mouse_move, 461, 46, 2, 25, 41] +[:mouse_move, 456, 46, 2, 26, 42] +[:mouse_move, 457, 46, 2, 27, 55] +[:mouse_button_pressed, 1, 0, 1, 28, 58] +[:mouse_move, 458, 46, 2, 29, 59] +[:mouse_move, 460, 46, 2, 30, 62] +[:mouse_move, 461, 46, 2, 31, 62] +[:mouse_move, 463, 46, 2, 32, 63] +[:mouse_move, 464, 46, 2, 33, 64] +[:mouse_move, 465, 46, 2, 34, 64] +[:mouse_move, 466, 46, 2, 35, 65] +[:mouse_move, 467, 46, 2, 36, 65] +[:mouse_move, 469, 46, 2, 37, 66] +[:mouse_move, 470, 46, 2, 38, 66] +[:mouse_move, 472, 46, 2, 39, 67] +[:mouse_move, 473, 46, 2, 40, 67] +[:mouse_move, 474, 46, 2, 41, 68] +[:mouse_move, 477, 46, 2, 42, 68] +[:mouse_move, 479, 46, 2, 43, 68] +[:mouse_move, 480, 46, 2, 44, 69] +[:mouse_move, 481, 46, 2, 45, 70] +[:mouse_move, 483, 46, 2, 46, 71] +[:mouse_move, 484, 46, 2, 47, 71] +[:mouse_move, 485, 46, 2, 48, 71] +[:mouse_move, 487, 46, 2, 49, 72] +[:mouse_move, 489, 46, 2, 50, 72] +[:mouse_move, 492, 46, 2, 51, 72] +[:mouse_move, 496, 46, 2, 52, 72] +[:mouse_move, 502, 47, 2, 53, 73] +[:mouse_move, 507, 47, 2, 54, 73] +[:mouse_move, 513, 47, 2, 55, 73] +[:mouse_move, 519, 47, 2, 56, 73] +[:mouse_move, 521, 47, 2, 57, 74] +[:mouse_move, 524, 47, 2, 58, 74] +[:mouse_move, 527, 47, 2, 59, 74] +[:mouse_move, 531, 47, 2, 60, 74] +[:mouse_move, 535, 47, 2, 61, 75] +[:mouse_move, 539, 47, 2, 62, 75] +[:mouse_move, 542, 47, 2, 63, 75] +[:mouse_move, 544, 47, 2, 64, 75] +[:mouse_move, 546, 47, 2, 65, 76] +[:mouse_move, 550, 47, 2, 66, 76] +[:mouse_move, 552, 47, 2, 67, 76] +[:mouse_move, 553, 47, 2, 68, 76] +[:mouse_move, 555, 47, 2, 69, 76] +[:mouse_move, 556, 47, 2, 70, 77] +[:mouse_move, 557, 47, 2, 71, 77] +[:mouse_move, 558, 47, 2, 72, 77] +[:mouse_move, 561, 47, 2, 73, 77] +[:mouse_move, 563, 47, 2, 74, 78] +[:mouse_move, 564, 47, 2, 75, 78] +[:mouse_move, 566, 47, 2, 76, 78] +[:mouse_move, 570, 47, 2, 77, 78] +[:mouse_move, 571, 47, 2, 78, 78] +[:mouse_move, 572, 47, 2, 79, 79] +[:mouse_move, 573, 47, 2, 80, 79] +[:mouse_move, 575, 47, 2, 81, 79] +[:mouse_move, 581, 47, 2, 82, 80] +[:mouse_move, 582, 47, 2, 83, 80] +[:mouse_move, 585, 47, 2, 84, 80] +[:mouse_move, 586, 47, 2, 85, 80] +[:mouse_move, 588, 47, 2, 86, 80] +[:mouse_move, 589, 47, 2, 87, 81] +[:mouse_move, 591, 47, 2, 88, 81] +[:mouse_move, 593, 47, 2, 89, 81] +[:mouse_move, 594, 47, 2, 90, 81] +[:mouse_move, 595, 47, 2, 91, 81] +[:mouse_move, 596, 47, 2, 92, 82] +[:mouse_move, 600, 47, 2, 93, 82] +[:mouse_move, 602, 47, 2, 94, 82] +[:mouse_move, 607, 47, 2, 95, 82] +[:mouse_move, 611, 46, 2, 96, 82] +[:mouse_move, 613, 46, 2, 97, 82] +[:mouse_move, 614, 46, 2, 98, 83] +[:mouse_move, 617, 46, 2, 99, 83] +[:mouse_move, 621, 46, 2, 100, 83] +[:mouse_move, 623, 46, 2, 101, 83] +[:mouse_move, 625, 46, 2, 102, 83] +[:mouse_move, 626, 46, 2, 103, 83] +[:mouse_move, 627, 46, 2, 104, 84] +[:mouse_move, 629, 46, 2, 105, 84] +[:mouse_move, 632, 46, 2, 106, 84] +[:mouse_move, 634, 46, 2, 107, 84] +[:mouse_move, 636, 46, 2, 108, 84] +[:mouse_move, 637, 46, 2, 109, 84] +[:mouse_move, 639, 45, 2, 110, 85] +[:mouse_move, 641, 45, 2, 111, 85] +[:mouse_move, 643, 45, 2, 112, 85] +[:mouse_move, 646, 44, 2, 113, 85] +[:mouse_move, 648, 43, 2, 114, 85] +[:mouse_move, 650, 43, 2, 115, 85] +[:mouse_move, 652, 43, 2, 116, 85] +[:mouse_move, 654, 43, 2, 117, 86] +[:mouse_move, 661, 42, 2, 118, 86] +[:mouse_move, 667, 42, 2, 119, 86] +[:mouse_move, 676, 42, 2, 120, 86] +[:mouse_move, 682, 42, 2, 121, 86] +[:mouse_move, 691, 41, 2, 122, 86] +[:mouse_move, 694, 41, 2, 123, 86] +[:mouse_move, 697, 41, 2, 124, 87] +[:mouse_move, 700, 41, 2, 125, 87] +[:mouse_move, 703, 41, 2, 126, 87] +[:mouse_move, 704, 41, 2, 127, 87] +[:mouse_move, 706, 41, 2, 128, 87] +[:mouse_move, 707, 41, 2, 129, 87] +[:mouse_move, 709, 41, 2, 130, 87] +[:mouse_move, 710, 41, 2, 131, 87] +[:mouse_move, 713, 41, 2, 132, 88] +[:mouse_move, 717, 41, 2, 133, 88] +[:mouse_move, 721, 41, 2, 134, 88] +[:mouse_move, 725, 41, 2, 135, 88] +[:mouse_move, 726, 41, 2, 136, 88] +[:mouse_move, 728, 41, 2, 137, 88] +[:mouse_move, 732, 41, 2, 138, 88] +[:mouse_move, 742, 41, 2, 139, 88] +[:mouse_move, 754, 43, 2, 140, 89] +[:mouse_move, 769, 45, 2, 141, 89] +[:mouse_move, 772, 45, 2, 142, 89] +[:mouse_move, 776, 45, 2, 143, 89] +[:mouse_move, 777, 45, 2, 144, 89] +[:mouse_move, 778, 45, 2, 145, 91] +[:mouse_move, 778, 44, 2, 146, 91] +[:mouse_move, 779, 44, 2, 147, 91] +[:mouse_move, 780, 44, 2, 148, 91] +[:mouse_move, 781, 44, 2, 149, 91] +[:mouse_move, 782, 44, 2, 150, 92] +[:mouse_move, 784, 44, 2, 151, 92] +[:mouse_move, 785, 44, 2, 152, 92] +[:mouse_move, 786, 44, 2, 153, 92] +[:mouse_move, 787, 44, 2, 154, 92] +[:mouse_move, 788, 44, 2, 155, 92] +[:mouse_move, 789, 44, 2, 156, 93] +[:mouse_move, 790, 44, 2, 157, 93] +[:mouse_move, 790, 43, 2, 158, 93] +[:mouse_move, 791, 43, 2, 159, 93] +[:mouse_move, 792, 43, 2, 160, 93] +[:mouse_move, 793, 43, 2, 161, 93] +[:mouse_move, 791, 43, 2, 162, 94] +[:mouse_move, 790, 43, 2, 163, 95] +[:mouse_move, 785, 43, 2, 164, 95] +[:mouse_move, 775, 43, 2, 165, 95] +[:mouse_move, 762, 43, 2, 166, 95] +[:mouse_move, 745, 43, 2, 167, 95] +[:mouse_move, 727, 43, 2, 168, 95] +[:mouse_move, 704, 43, 2, 169, 95] +[:mouse_move, 680, 43, 2, 170, 95] +[:mouse_move, 653, 43, 2, 171, 95] +[:mouse_move, 628, 43, 2, 172, 95] +[:mouse_move, 606, 43, 2, 173, 96] +[:mouse_move, 589, 43, 2, 174, 96] +[:mouse_move, 577, 43, 2, 175, 96] +[:mouse_move, 568, 43, 2, 176, 96] +[:mouse_move, 558, 43, 2, 177, 96] +[:mouse_move, 552, 43, 2, 178, 96] +[:mouse_move, 544, 43, 2, 179, 96] +[:mouse_move, 532, 43, 2, 180, 97] +[:mouse_move, 523, 43, 2, 181, 97] +[:mouse_move, 517, 43, 2, 182, 97] +[:mouse_move, 512, 43, 2, 183, 97] +[:mouse_move, 508, 43, 2, 184, 97] +[:mouse_move, 506, 43, 2, 185, 98] +[:mouse_move, 503, 43, 2, 186, 98] +[:mouse_move, 501, 43, 2, 187, 98] +[:mouse_move, 500, 43, 2, 188, 98] +[:mouse_move, 498, 43, 2, 189, 98] +[:mouse_move, 495, 43, 2, 190, 99] +[:mouse_move, 492, 43, 2, 191, 99] +[:mouse_move, 489, 43, 2, 192, 99] +[:mouse_move, 485, 43, 2, 193, 99] +[:mouse_move, 480, 43, 2, 194, 100] +[:mouse_move, 476, 43, 2, 195, 100] +[:mouse_move, 472, 43, 2, 196, 100] +[:mouse_move, 471, 43, 2, 197, 101] +[:mouse_move, 470, 43, 2, 198, 102] +[:mouse_move, 469, 43, 2, 199, 102] +[:mouse_move, 468, 43, 2, 200, 103] +[:mouse_move, 467, 43, 2, 201, 105] +[:mouse_move, 467, 44, 2, 202, 111] +[:mouse_move, 468, 43, 2, 203, 114] +[:mouse_move, 469, 43, 2, 204, 115] +[:mouse_move, 474, 43, 2, 205, 115] +[:mouse_move, 479, 43, 2, 206, 116] +[:mouse_move, 482, 43, 2, 207, 116] +[:mouse_move, 484, 42, 2, 208, 117] +[:mouse_move, 486, 42, 2, 209, 118] +[:mouse_move, 488, 42, 2, 210, 118] +[:mouse_move, 490, 42, 2, 211, 118] +[:mouse_move, 492, 42, 2, 212, 118] +[:mouse_move, 493, 42, 2, 213, 120] +[:mouse_button_up, 1, 0, 1, 214, 123] +[:mouse_move, 495, 47, 2, 215, 127] +[:mouse_move, 498, 56, 2, 216, 128] +[:mouse_move, 500, 63, 2, 217, 128] +[:mouse_move, 500, 71, 2, 218, 129] +[:mouse_move, 500, 73, 2, 219, 129] +[:mouse_move, 500, 75, 2, 220, 130] +[:mouse_move, 499, 78, 2, 221, 131] +[:mouse_move, 497, 80, 2, 222, 131] +[:mouse_move, 495, 82, 2, 223, 132] +[:mouse_move, 494, 83, 2, 224, 132] +[:mouse_move, 493, 83, 2, 225, 133] +[:mouse_move, 493, 84, 2, 226, 141] +[:mouse_move, 498, 90, 2, 227, 141] +[:mouse_move, 506, 95, 2, 228, 142] +[:mouse_move, 509, 98, 2, 229, 142] +[:mouse_move, 510, 98, 2, 230, 143] +[:mouse_move, 509, 98, 2, 231, 147] +[:mouse_move, 507, 98, 2, 232, 148] +[:mouse_move, 506, 97, 2, 233, 151] +[:mouse_button_pressed, 1, 0, 1, 234, 152] +[:mouse_button_up, 1, 0, 1, 235, 154] +[:mouse_button_pressed, 1, 0, 1, 236, 170] +[:mouse_move, 507, 97, 2, 237, 170] +[:mouse_button_up, 1, 0, 1, 238, 173] +[:mouse_button_pressed, 1, 0, 1, 239, 174] +[:mouse_button_up, 1, 0, 1, 240, 178] +[:mouse_button_pressed, 1, 0, 1, 241, 180] +[:mouse_button_up, 1, 0, 1, 242, 183] +[:mouse_button_pressed, 1, 0, 1, 243, 185] +[:mouse_button_up, 1, 0, 1, 244, 189] +[:mouse_button_pressed, 1, 0, 1, 245, 190] +[:mouse_button_up, 1, 0, 1, 246, 195] +[:mouse_button_pressed, 1, 0, 1, 247, 196] +[:mouse_button_up, 1, 0, 1, 248, 199] +[:mouse_button_pressed, 1, 0, 1, 249, 201] +[:mouse_button_up, 1, 0, 1, 250, 203] +[:mouse_move, 508, 97, 2, 251, 205] +[:mouse_button_pressed, 1, 0, 1, 252, 205] +[:mouse_button_up, 1, 0, 1, 253, 209] +[:mouse_button_pressed, 1, 0, 1, 254, 210] +[:mouse_button_up, 1, 0, 1, 255, 214] +[:mouse_button_pressed, 1, 0, 1, 256, 215] +[:mouse_button_up, 1, 0, 1, 257, 219] +[:mouse_button_pressed, 1, 0, 1, 258, 222] +[:mouse_button_up, 1, 0, 1, 259, 226] +[:mouse_move, 508, 98, 2, 260, 226] +[:mouse_button_pressed, 1, 0, 1, 261, 229] +[:mouse_button_up, 1, 0, 1, 262, 232] +[:mouse_move, 509, 98, 2, 263, 235] +[:mouse_move, 509, 97, 2, 264, 237] +[:mouse_move, 515, 96, 2, 265, 238] +[:mouse_move, 529, 94, 2, 266, 239] +[:mouse_move, 573, 93, 2, 267, 240] +[:mouse_move, 609, 93, 2, 268, 242] +[:mouse_move, 639, 93, 2, 269, 242] +[:mouse_move, 663, 93, 2, 270, 243] +[:mouse_move, 680, 93, 2, 271, 244] +[:mouse_move, 691, 93, 2, 272, 245] +[:mouse_move, 695, 93, 2, 273, 246] +[:mouse_move, 696, 93, 2, 274, 247] +[:mouse_move, 698, 93, 2, 275, 248] +[:mouse_move, 701, 94, 2, 276, 249] +[:mouse_move, 702, 94, 2, 277, 250] +[:mouse_move, 703, 94, 2, 278, 251] +[:mouse_move, 705, 94, 2, 279, 256] +[:mouse_move, 707, 94, 2, 280, 256] +[:mouse_move, 712, 94, 2, 281, 257] +[:mouse_move, 718, 94, 2, 282, 258] +[:mouse_move, 727, 94, 2, 283, 259] +[:mouse_move, 734, 94, 2, 284, 260] +[:mouse_move, 736, 94, 2, 285, 261] +[:mouse_move, 737, 94, 2, 286, 265] +[:mouse_move, 738, 94, 2, 287, 271] +[:mouse_button_pressed, 1, 0, 1, 288, 272] +[:mouse_button_up, 1, 0, 1, 289, 275] +[:mouse_button_pressed, 1, 0, 1, 290, 280] +[:mouse_button_up, 1, 0, 1, 291, 284] +[:mouse_move, 739, 94, 2, 292, 287] +[:mouse_button_pressed, 1, 0, 1, 293, 288] +[:mouse_button_up, 1, 0, 1, 294, 292] +[:mouse_button_pressed, 1, 0, 1, 295, 296] +[:mouse_button_up, 1, 0, 1, 296, 300] +[:mouse_button_pressed, 1, 0, 1, 297, 303] +[:mouse_button_up, 1, 0, 1, 298, 306] +[:mouse_move, 740, 94, 2, 299, 308] +[:mouse_button_pressed, 1, 0, 1, 300, 309] +[:mouse_button_up, 1, 0, 1, 301, 312] +[:mouse_button_pressed, 1, 0, 1, 302, 317] +[:mouse_button_up, 1, 0, 1, 303, 319] +[:mouse_move, 733, 100, 2, 304, 321] +[:mouse_move, 716, 115, 2, 305, 322] +[:mouse_move, 694, 133, 2, 306, 322] +[:mouse_move, 669, 152, 2, 307, 323] +[:mouse_move, 645, 172, 2, 308, 324] +[:mouse_move, 618, 207, 2, 309, 325] +[:mouse_move, 602, 229, 2, 310, 325] +[:mouse_move, 586, 244, 2, 311, 326] +[:mouse_move, 571, 255, 2, 312, 326] +[:mouse_move, 560, 263, 2, 313, 327] +[:mouse_move, 558, 268, 2, 314, 328] +[:mouse_move, 557, 274, 2, 315, 329] +[:mouse_move, 559, 279, 2, 316, 329] +[:mouse_move, 559, 284, 2, 317, 329] +[:mouse_move, 553, 295, 2, 318, 330] +[:mouse_move, 538, 310, 2, 319, 331] +[:mouse_move, 515, 328, 2, 320, 332] +[:mouse_move, 476, 357, 2, 321, 332] +[:mouse_move, 448, 381, 2, 322, 333] +[:mouse_move, 423, 406, 2, 323, 333] +[:mouse_move, 404, 428, 2, 324, 334] +[:mouse_move, 381, 448, 2, 325, 335] +[:mouse_move, 354, 469, 2, 326, 336] +[:mouse_move, 325, 492, 2, 327, 336] +[:mouse_move, 297, 512, 2, 328, 337] +[:mouse_move, 274, 526, 2, 329, 337] +[:mouse_move, 252, 535, 2, 330, 338] +[:mouse_move, 237, 544, 2, 331, 339] +[:mouse_move, 227, 553, 2, 332, 340] +[:mouse_move, 226, 555, 2, 333, 340] +[:mouse_move, 226, 556, 2, 334, 341] +[:mouse_move, 228, 557, 2, 335, 342] +[:mouse_move, 239, 558, 2, 336, 343] +[:mouse_move, 266, 563, 2, 337, 343] +[:mouse_move, 303, 568, 2, 338, 344] +[:mouse_move, 333, 575, 2, 339, 344] +[:mouse_move, 356, 581, 2, 340, 345] +[:mouse_move, 375, 587, 2, 341, 346] +[:mouse_move, 390, 591, 2, 342, 347] +[:mouse_move, 407, 598, 2, 343, 347] +[:mouse_move, 414, 600, 2, 344, 348] +[:mouse_move, 415, 600, 2, 345, 348] +[:mouse_move, 416, 601, 2, 346, 349] +[:mouse_move, 419, 602, 2, 347, 350] +[:mouse_move, 420, 602, 2, 348, 350] +[:mouse_button_pressed, 1, 0, 1, 349, 352] +[:mouse_button_up, 1, 0, 1, 350, 354] +[:mouse_move, 421, 602, 2, 351, 354] +[:mouse_move, 422, 602, 2, 352, 356] +[:mouse_move, 422, 603, 2, 353, 370] +[:mouse_move, 422, 602, 2, 354, 373] +[:mouse_move, 423, 595, 2, 355, 374] +[:mouse_move, 426, 589, 2, 356, 374] +[:mouse_move, 429, 583, 2, 357, 375] +[:mouse_move, 429, 582, 2, 358, 376] +[:mouse_move, 424, 580, 2, 359, 377] +[:mouse_move, 416, 580, 2, 360, 378] +[:mouse_move, 410, 579, 2, 361, 378] +[:mouse_move, 406, 577, 2, 362, 379] +[:mouse_move, 401, 575, 2, 363, 380] +[:mouse_move, 392, 573, 2, 364, 380] +[:mouse_move, 381, 571, 2, 365, 381] +[:mouse_move, 369, 571, 2, 366, 382] +[:mouse_move, 354, 571, 2, 367, 382] +[:mouse_move, 333, 571, 2, 368, 383] +[:mouse_move, 306, 571, 2, 369, 383] +[:mouse_move, 281, 576, 2, 370, 384] +[:mouse_move, 249, 585, 2, 371, 385] +[:mouse_move, 230, 586, 2, 372, 385] +[:mouse_move, 213, 590, 2, 373, 386] +[:mouse_move, 201, 593, 2, 374, 386] +[:mouse_move, 192, 597, 2, 375, 387] +[:mouse_move, 188, 599, 2, 376, 388] +[:mouse_move, 186, 601, 2, 377, 388] +[:mouse_move, 185, 601, 2, 378, 391] +[:mouse_move, 183, 599, 2, 379, 391] +[:mouse_move, 183, 598, 2, 380, 393] +[:mouse_move, 184, 596, 2, 381, 393] +[:mouse_move, 188, 594, 2, 382, 394] +[:mouse_move, 199, 591, 2, 383, 395] +[:mouse_move, 221, 586, 2, 384, 395] +[:mouse_move, 246, 578, 2, 385, 395] +[:mouse_move, 262, 574, 2, 386, 396] +[:mouse_move, 266, 573, 2, 387, 397] +[:mouse_move, 271, 573, 2, 388, 398] +[:mouse_move, 279, 573, 2, 389, 398] +[:mouse_move, 285, 573, 2, 390, 399] +[:mouse_move, 293, 574, 2, 391, 399] +[:mouse_move, 302, 576, 2, 392, 400] +[:mouse_move, 316, 580, 2, 393, 401] +[:mouse_move, 333, 583, 2, 394, 402] +[:mouse_move, 351, 583, 2, 395, 402] +[:mouse_move, 363, 583, 2, 396, 403] +[:mouse_move, 369, 583, 2, 397, 403] +[:mouse_move, 379, 583, 2, 398, 404] +[:mouse_move, 385, 583, 2, 399, 404] +[:mouse_move, 390, 583, 2, 400, 405] +[:mouse_move, 392, 583, 2, 401, 406] +[:mouse_move, 394, 583, 2, 402, 406] +[:mouse_move, 395, 583, 2, 403, 407] +[:mouse_move, 395, 580, 2, 404, 408] +[:mouse_move, 395, 578, 2, 405, 408] +[:mouse_move, 395, 572, 2, 406, 409] +[:mouse_move, 396, 565, 2, 407, 410] +[:mouse_move, 402, 560, 2, 408, 410] +[:mouse_move, 404, 559, 2, 409, 411] +[:mouse_move, 405, 559, 2, 410, 413] +[:mouse_move, 406, 559, 2, 411, 414] +[:mouse_move, 407, 560, 2, 412, 416] +[:mouse_move, 407, 561, 2, 413, 417] +[:mouse_move, 408, 561, 2, 414, 418] +[:mouse_move, 409, 563, 2, 415, 419] +[:mouse_move, 410, 564, 2, 416, 420] +[:mouse_move, 411, 565, 2, 417, 421] +[:mouse_move, 411, 566, 2, 418, 423] +[:mouse_button_pressed, 1, 0, 1, 419, 424] +[:mouse_button_up, 1, 0, 1, 420, 425] +[:mouse_move, 411, 562, 2, 421, 426] +[:mouse_move, 411, 547, 2, 422, 426] +[:mouse_move, 411, 532, 2, 423, 427] +[:mouse_move, 417, 513, 2, 424, 427] +[:mouse_move, 421, 503, 2, 425, 428] +[:mouse_move, 424, 496, 2, 426, 429] +[:mouse_move, 425, 494, 2, 427, 430] +[:mouse_move, 425, 493, 2, 428, 430] +[:mouse_move, 426, 492, 2, 429, 432] +[:mouse_move, 426, 493, 2, 430, 436] +[:mouse_move, 426, 494, 2, 431, 437] +[:mouse_move, 426, 495, 2, 432, 438] +[:mouse_move, 426, 496, 2, 433, 438] +[:mouse_move, 425, 498, 2, 434, 440] +[:mouse_move, 423, 503, 2, 435, 441] +[:mouse_move, 422, 506, 2, 436, 441] +[:mouse_move, 422, 507, 2, 437, 442] +[:mouse_move, 422, 508, 2, 438, 446] +[:mouse_move, 422, 514, 2, 439, 447] +[:mouse_move, 421, 525, 2, 440, 448] +[:mouse_move, 418, 533, 2, 441, 448] +[:mouse_move, 416, 536, 2, 442, 449] +[:mouse_move, 415, 537, 2, 443, 449] +[:mouse_move, 415, 538, 2, 444, 450] +[:mouse_button_pressed, 1, 0, 1, 445, 455] +[:mouse_move, 414, 538, 2, 446, 456] +[:mouse_button_up, 1, 0, 1, 447, 456] +[:mouse_move, 412, 535, 2, 448, 456] +[:mouse_move, 409, 529, 2, 449, 456] +[:mouse_move, 408, 514, 2, 450, 457] +[:mouse_move, 408, 502, 2, 451, 458] +[:mouse_move, 411, 497, 2, 452, 458] +[:mouse_move, 413, 492, 2, 453, 459] +[:mouse_move, 415, 491, 2, 454, 460] +[:mouse_move, 415, 490, 2, 455, 460] +[:mouse_move, 415, 489, 2, 456, 461] +[:mouse_move, 416, 489, 2, 457, 461] +[:mouse_move, 416, 488, 2, 458, 462] +[:mouse_move, 416, 487, 2, 459, 464] +[:mouse_button_pressed, 1, 0, 1, 460, 465] +[:mouse_button_up, 1, 0, 1, 461, 468] +[:mouse_move, 417, 487, 2, 462, 470] +[:mouse_move, 417, 486, 2, 463, 471] +[:mouse_move, 418, 486, 2, 464, 471] +[:mouse_move, 418, 485, 2, 465, 472] +[:mouse_move, 418, 483, 2, 466, 473] +[:mouse_move, 418, 478, 2, 467, 474] +[:mouse_move, 418, 473, 2, 468, 474] +[:mouse_move, 419, 471, 2, 469, 475] +[:mouse_move, 420, 470, 2, 470, 475] +[:mouse_move, 420, 469, 2, 471, 477] +[:mouse_move, 420, 468, 2, 472, 477] +[:mouse_move, 421, 467, 2, 473, 479] +[:mouse_move, 421, 464, 2, 474, 479] +[:mouse_move, 421, 462, 2, 475, 480] +[:mouse_move, 422, 460, 2, 476, 480] +[:mouse_button_pressed, 1, 0, 1, 477, 482] +[:mouse_button_up, 1, 0, 1, 478, 484] +[:mouse_move, 422, 459, 2, 479, 484] +[:mouse_move, 422, 451, 2, 480, 484] +[:mouse_move, 424, 443, 2, 481, 485] +[:mouse_move, 428, 436, 2, 482, 486] +[:mouse_move, 431, 431, 2, 483, 487] +[:mouse_move, 433, 428, 2, 484, 487] +[:mouse_move, 435, 424, 2, 485, 488] +[:mouse_move, 435, 422, 2, 486, 488] +[:mouse_move, 435, 420, 2, 487, 489] +[:mouse_move, 435, 419, 2, 488, 490] +[:mouse_move, 435, 418, 2, 489, 490] +[:mouse_button_pressed, 1, 0, 1, 490, 494] +[:mouse_button_up, 1, 0, 1, 491, 497] +[:mouse_move, 435, 415, 2, 492, 501] +[:mouse_move, 435, 408, 2, 493, 502] +[:mouse_move, 435, 401, 2, 494, 503] +[:mouse_move, 435, 398, 2, 495, 503] +[:mouse_move, 435, 396, 2, 496, 504] +[:mouse_move, 435, 395, 2, 497, 504] +[:mouse_move, 435, 394, 2, 498, 507] +[:mouse_move, 434, 393, 2, 499, 507] +[:mouse_move, 434, 389, 2, 500, 508] +[:mouse_move, 433, 388, 2, 501, 509] +[:mouse_move, 433, 385, 2, 502, 509] +[:mouse_move, 433, 384, 2, 503, 510] +[:mouse_button_pressed, 1, 0, 1, 504, 514] +[:mouse_button_up, 1, 0, 1, 505, 516] +[:mouse_move, 433, 383, 2, 506, 517] +[:mouse_move, 433, 377, 2, 507, 518] +[:mouse_move, 433, 372, 2, 508, 518] +[:mouse_move, 433, 365, 2, 509, 519] +[:mouse_move, 433, 360, 2, 510, 520] +[:mouse_move, 433, 353, 2, 511, 520] +[:mouse_move, 433, 346, 2, 512, 520] +[:mouse_move, 432, 338, 2, 513, 521] +[:mouse_move, 431, 331, 2, 514, 522] +[:mouse_move, 431, 328, 2, 515, 523] +[:mouse_move, 431, 326, 2, 516, 523] +[:mouse_move, 431, 325, 2, 517, 524] +[:mouse_move, 430, 324, 2, 518, 524] +[:mouse_button_pressed, 1, 0, 1, 519, 528] +[:mouse_button_up, 1, 0, 1, 520, 531] +[:mouse_move, 430, 323, 2, 521, 533] +[:mouse_move, 430, 322, 2, 522, 534] +[:mouse_move, 430, 321, 2, 523, 534] +[:mouse_move, 429, 319, 2, 524, 535] +[:mouse_move, 428, 316, 2, 525, 536] +[:mouse_move, 428, 315, 2, 526, 537] +[:mouse_move, 428, 314, 2, 527, 540] +[:mouse_move, 428, 313, 2, 528, 540] +[:mouse_move, 427, 309, 2, 529, 540] +[:mouse_move, 427, 308, 2, 530, 541] +[:mouse_move, 426, 306, 2, 531, 542] +[:mouse_move, 426, 304, 2, 532, 543] +[:mouse_move, 426, 303, 2, 533, 543] +[:mouse_button_pressed, 1, 0, 1, 534, 544] +[:mouse_button_up, 1, 0, 1, 535, 546] +[:mouse_move, 426, 302, 2, 536, 548] +[:mouse_move, 426, 299, 2, 537, 548] +[:mouse_move, 426, 294, 2, 538, 549] +[:mouse_move, 426, 288, 2, 539, 550] +[:mouse_move, 426, 282, 2, 540, 550] +[:mouse_move, 426, 276, 2, 541, 550] +[:mouse_move, 426, 273, 2, 542, 551] +[:mouse_move, 426, 272, 2, 543, 552] +[:mouse_move, 426, 271, 2, 544, 553] +[:mouse_button_pressed, 1, 0, 1, 545, 556] +[:mouse_button_up, 1, 0, 1, 546, 557] +[:mouse_move, 426, 269, 2, 547, 558] +[:mouse_move, 426, 266, 2, 548, 559] +[:mouse_move, 426, 263, 2, 549, 559] +[:mouse_move, 426, 258, 2, 550, 560] +[:mouse_move, 425, 256, 2, 551, 561] +[:mouse_move, 424, 251, 2, 552, 561] +[:mouse_move, 424, 246, 2, 553, 562] +[:mouse_move, 424, 244, 2, 554, 563] +[:mouse_move, 424, 241, 2, 555, 563] +[:mouse_move, 424, 238, 2, 556, 563] +[:mouse_move, 423, 236, 2, 557, 564] +[:mouse_move, 423, 235, 2, 558, 565] +[:mouse_button_pressed, 1, 0, 1, 559, 568] +[:mouse_button_up, 1, 0, 1, 560, 569] +[:mouse_move, 423, 233, 2, 561, 570] +[:mouse_move, 423, 228, 2, 562, 570] +[:mouse_move, 423, 224, 2, 563, 571] +[:mouse_move, 423, 218, 2, 564, 572] +[:mouse_move, 423, 214, 2, 565, 572] +[:mouse_move, 423, 210, 2, 566, 573] +[:mouse_move, 423, 209, 2, 567, 573] +[:mouse_move, 423, 208, 2, 568, 574] +[:mouse_move, 423, 207, 2, 569, 575] +[:mouse_move, 423, 206, 2, 570, 577] +[:mouse_button_pressed, 1, 0, 1, 571, 582] +[:mouse_button_up, 1, 0, 1, 572, 583] +[:mouse_move, 423, 205, 2, 573, 586] +[:mouse_move, 423, 204, 2, 574, 587] +[:mouse_move, 423, 201, 2, 575, 587] +[:mouse_move, 423, 197, 2, 576, 588] +[:mouse_move, 422, 195, 2, 577, 589] +[:mouse_move, 422, 191, 2, 578, 589] +[:mouse_move, 422, 189, 2, 579, 589] +[:mouse_move, 422, 188, 2, 580, 590] +[:mouse_move, 422, 187, 2, 581, 591] +[:mouse_move, 422, 186, 2, 582, 592] +[:mouse_move, 422, 188, 2, 583, 606] +[:mouse_move, 422, 193, 2, 584, 607] +[:mouse_move, 423, 202, 2, 585, 608] +[:mouse_move, 425, 216, 2, 586, 609] +[:mouse_move, 426, 223, 2, 587, 609] +[:mouse_move, 426, 225, 2, 588, 609] +[:mouse_button_pressed, 1, 0, 1, 589, 613] +[:mouse_button_up, 1, 0, 1, 590, 615] +[:mouse_move, 426, 224, 2, 591, 615] +[:mouse_move, 424, 220, 2, 592, 615] +[:mouse_move, 424, 209, 2, 593, 616] +[:mouse_move, 421, 192, 2, 594, 617] +[:mouse_move, 419, 182, 2, 595, 617] +[:mouse_move, 418, 180, 2, 596, 618] +[:mouse_move, 418, 179, 2, 597, 618] +[:mouse_button_pressed, 1, 0, 1, 598, 624] +[:mouse_button_up, 1, 0, 1, 599, 625] +[:mouse_move, 418, 178, 2, 600, 626] +[:mouse_move, 418, 174, 2, 601, 627] +[:mouse_move, 418, 171, 2, 602, 628] +[:mouse_move, 418, 164, 2, 603, 628] +[:mouse_move, 417, 161, 2, 604, 629] +[:mouse_move, 415, 156, 2, 605, 630] +[:mouse_move, 415, 155, 2, 606, 631] +[:mouse_move, 415, 154, 2, 607, 633] +[:mouse_move, 415, 153, 2, 608, 634] +[:mouse_move, 415, 152, 2, 609, 635] +[:mouse_move, 416, 151, 2, 610, 635] +[:mouse_move, 416, 150, 2, 611, 636] +[:mouse_move, 416, 149, 2, 612, 637] +[:mouse_move, 417, 147, 2, 613, 638] +[:mouse_move, 418, 144, 2, 614, 639] +[:mouse_move, 418, 142, 2, 615, 640] +[:mouse_move, 419, 141, 2, 616, 640] +[:mouse_move, 419, 139, 2, 617, 641] +[:mouse_move, 420, 138, 2, 618, 642] +[:mouse_move, 420, 137, 2, 619, 642] +[:mouse_button_pressed, 1, 0, 1, 620, 643] +[:mouse_button_up, 1, 0, 1, 621, 645] +[:mouse_move, 420, 138, 2, 622, 649] +[:mouse_move, 420, 141, 2, 623, 650] +[:mouse_move, 421, 142, 2, 624, 651] +[:mouse_move, 421, 147, 2, 625, 652] +[:mouse_move, 421, 148, 2, 626, 653] +[:mouse_move, 421, 149, 2, 627, 653] +[:mouse_move, 421, 148, 2, 628, 674] +[:mouse_move, 420, 147, 2, 629, 675] +[:mouse_move, 420, 146, 2, 630, 675] +[:mouse_move, 420, 142, 2, 631, 677] +[:mouse_move, 422, 139, 2, 632, 677] +[:mouse_move, 422, 138, 2, 633, 681] +[:mouse_move, 421, 138, 2, 634, 686] +[:mouse_move, 441, 132, 2, 635, 691] +[:mouse_move, 483, 120, 2, 636, 692] +[:mouse_move, 539, 103, 2, 637, 693] +[:mouse_move, 590, 85, 2, 638, 693] +[:mouse_move, 658, 61, 2, 639, 694] +[:mouse_move, 677, 52, 2, 640, 694] +[:mouse_move, 725, 34, 2, 641, 695] +[:mouse_move, 739, 30, 2, 642, 696] +[:mouse_move, 775, 26, 2, 643, 697] +[:mouse_move, 791, 26, 2, 644, 697] +[:mouse_move, 796, 26, 2, 645, 698] +[:mouse_move, 801, 25, 2, 646, 699] +[:mouse_move, 802, 25, 2, 647, 700] +[:mouse_move, 803, 25, 2, 648, 701] +[:mouse_move, 804, 25, 2, 649, 702] +[:mouse_move, 804, 28, 2, 650, 703] +[:mouse_move, 804, 33, 2, 651, 704] +[:mouse_move, 793, 48, 2, 652, 705] +[:mouse_move, 787, 54, 2, 653, 705] +[:mouse_move, 769, 66, 2, 654, 706] +[:mouse_move, 766, 69, 2, 655, 707] +[:mouse_move, 759, 75, 2, 656, 708] +[:mouse_move, 756, 78, 2, 657, 708] +[:mouse_move, 754, 82, 2, 658, 709] +[:mouse_move, 750, 88, 2, 659, 710] +[:mouse_move, 747, 97, 2, 660, 710] +[:mouse_move, 747, 98, 2, 661, 711] +[:mouse_move, 747, 100, 2, 662, 712] +[:mouse_move, 747, 101, 2, 663, 717] +[:mouse_button_pressed, 1, 0, 1, 664, 717] +[:mouse_button_up, 1, 0, 1, 665, 720] +[:mouse_button_pressed, 1, 0, 1, 666, 723] +[:mouse_button_up, 1, 0, 1, 667, 727] +[:mouse_button_pressed, 1, 0, 1, 668, 731] +[:mouse_move, 747, 100, 2, 669, 731] +[:mouse_button_up, 1, 0, 1, 670, 734] +[:mouse_button_pressed, 1, 0, 1, 671, 737] +[:mouse_button_up, 1, 0, 1, 672, 741] +[:mouse_button_pressed, 1, 0, 1, 673, 744] +[:mouse_button_up, 1, 0, 1, 674, 747] +[:mouse_button_pressed, 1, 0, 1, 675, 751] +[:mouse_button_up, 1, 0, 1, 676, 753] +[:mouse_button_pressed, 1, 0, 1, 677, 757] +[:mouse_move, 748, 100, 2, 678, 757] +[:mouse_button_up, 1, 0, 1, 679, 760] +[:mouse_button_pressed, 1, 0, 1, 680, 764] +[:mouse_button_up, 1, 0, 1, 681, 766] +[:mouse_button_pressed, 1, 0, 1, 682, 769] +[:mouse_button_up, 1, 0, 1, 683, 772] +[:mouse_button_pressed, 1, 0, 1, 684, 775] +[:mouse_button_up, 1, 0, 1, 685, 778] +[:mouse_move, 748, 99, 2, 686, 779] +[:mouse_move, 749, 99, 2, 687, 781] +[:mouse_button_pressed, 1, 0, 1, 688, 781] +[:mouse_button_up, 1, 0, 1, 689, 785] +[:mouse_button_pressed, 1, 0, 1, 690, 788] +[:mouse_button_up, 1, 0, 1, 691, 790] +[:mouse_button_pressed, 1, 0, 1, 692, 795] +[:mouse_button_up, 1, 0, 1, 693, 797] +[:mouse_button_pressed, 1, 0, 1, 694, 800] +[:mouse_button_up, 1, 0, 1, 695, 802] +[:mouse_move, 748, 99, 2, 696, 802] +[:mouse_move, 738, 99, 2, 697, 803] +[:mouse_move, 729, 99, 2, 698, 803] +[:mouse_move, 709, 99, 2, 699, 804] +[:mouse_move, 689, 96, 2, 700, 805] +[:mouse_move, 674, 95, 2, 701, 806] +[:mouse_move, 654, 92, 2, 702, 806] +[:mouse_move, 629, 90, 2, 703, 806] +[:mouse_move, 623, 90, 2, 704, 807] +[:mouse_move, 611, 90, 2, 705, 808] +[:mouse_move, 610, 90, 2, 706, 808] +[:mouse_move, 609, 90, 2, 707, 809] +[:mouse_move, 611, 90, 2, 708, 811] +[:mouse_button_pressed, 1, 0, 1, 709, 811] +[:mouse_move, 612, 90, 2, 710, 811] +[:mouse_button_up, 1, 0, 1, 711, 813] +[:mouse_move, 613, 90, 2, 712, 813] +[:key_down_raw, 96, 0, 2, 713, 986] +[:key_up_raw, 96, 0, 2, 714, 987] +[:key_down_raw, 13, 0, 2, 715, 1004] diff --git a/samples/13_path_finding_algorithms/07_heuristic_with_walls/app/main.rb b/samples/13_path_finding_algorithms/07_heuristic_with_walls/app/main.rb index b106e34..2dc3e74 100644 --- a/samples/13_path_finding_algorithms/07_heuristic_with_walls/app/main.rb +++ b/samples/13_path_finding_algorithms/07_heuristic_with_walls/app/main.rb @@ -1002,7 +1002,7 @@ def tick args end # Every tick, new args are passed, and the Breadth First Search tick is called - $heuristic ||= Heuristic.new(args) + $heuristic ||= Heuristic.new $heuristic.args = args $heuristic.tick end diff --git a/samples/13_path_finding_algorithms/07_heuristic_with_walls/replay.txt b/samples/13_path_finding_algorithms/07_heuristic_with_walls/replay.txt new file mode 100644 index 0000000..4c5a2a6 --- /dev/null +++ b/samples/13_path_finding_algorithms/07_heuristic_with_walls/replay.txt @@ -0,0 +1,352 @@ +replay_version 2.0 +stopped_at 637 +seed 100 +recorded_at 2021-11-20 11:23:35 -0600 +[:mouse_button_up, 1, 0, 1, 1, 2] +[:mouse_move, 777, 81, 2, 2, 5] +[:mouse_move, 778, 83, 2, 3, 23] +[:mouse_move, 778, 91, 2, 4, 24] +[:mouse_move, 778, 97, 2, 5, 25] +[:mouse_move, 778, 101, 2, 6, 26] +[:mouse_move, 777, 106, 2, 7, 26] +[:mouse_move, 774, 112, 2, 8, 27] +[:mouse_move, 769, 116, 2, 9, 28] +[:mouse_move, 765, 119, 2, 10, 29] +[:mouse_move, 763, 120, 2, 11, 29] +[:mouse_move, 762, 120, 2, 12, 30] +[:mouse_move, 761, 121, 2, 13, 31] +[:mouse_move, 761, 122, 2, 14, 32] +[:mouse_move, 760, 123, 2, 15, 32] +[:mouse_move, 760, 124, 2, 16, 33] +[:mouse_move, 759, 125, 2, 17, 34] +[:mouse_move, 758, 126, 2, 18, 36] +[:mouse_move, 757, 126, 2, 19, 37] +[:mouse_move, 754, 127, 2, 20, 38] +[:mouse_move, 753, 127, 2, 21, 39] +[:mouse_move, 752, 127, 2, 22, 40] +[:mouse_move, 753, 127, 2, 23, 56] +[:mouse_move, 752, 127, 2, 24, 65] +[:mouse_move, 745, 127, 2, 25, 66] +[:mouse_move, 737, 127, 2, 26, 67] +[:mouse_move, 726, 125, 2, 27, 68] +[:mouse_move, 716, 122, 2, 28, 68] +[:mouse_move, 709, 120, 2, 29, 69] +[:mouse_move, 697, 117, 2, 30, 70] +[:mouse_move, 691, 115, 2, 31, 71] +[:mouse_move, 689, 114, 2, 32, 72] +[:mouse_move, 686, 113, 2, 33, 72] +[:mouse_move, 686, 112, 2, 34, 73] +[:mouse_move, 685, 112, 2, 35, 74] +[:mouse_move, 684, 112, 2, 36, 75] +[:mouse_move, 683, 112, 2, 37, 76] +[:mouse_move, 682, 111, 2, 38, 77] +[:mouse_move, 679, 110, 2, 39, 77] +[:mouse_move, 674, 108, 2, 40, 78] +[:mouse_move, 665, 104, 2, 41, 79] +[:mouse_move, 660, 101, 2, 42, 80] +[:mouse_move, 657, 101, 2, 43, 81] +[:mouse_move, 657, 100, 2, 44, 89] +[:mouse_button_pressed, 1, 0, 1, 45, 109] +[:mouse_button_up, 1, 0, 1, 46, 113] +[:mouse_button_pressed, 1, 0, 1, 47, 228] +[:mouse_button_up, 1, 0, 1, 48, 229] +[:mouse_move, 657, 99, 2, 49, 240] +[:mouse_move, 656, 96, 2, 50, 240] +[:mouse_move, 655, 95, 2, 51, 240] +[:mouse_move, 654, 94, 2, 52, 241] +[:mouse_move, 654, 87, 2, 53, 242] +[:mouse_move, 654, 80, 2, 54, 242] +[:mouse_move, 654, 74, 2, 55, 242] +[:mouse_move, 654, 69, 2, 56, 242] +[:mouse_move, 654, 67, 2, 57, 243] +[:mouse_move, 654, 63, 2, 58, 243] +[:mouse_move, 654, 62, 2, 59, 244] +[:mouse_move, 653, 61, 2, 60, 244] +[:mouse_move, 651, 61, 2, 61, 245] +[:mouse_move, 648, 60, 2, 62, 246] +[:mouse_move, 645, 60, 2, 63, 246] +[:mouse_move, 637, 57, 2, 64, 246] +[:mouse_move, 633, 55, 2, 65, 246] +[:mouse_move, 626, 53, 2, 66, 247] +[:mouse_move, 620, 51, 2, 67, 247] +[:mouse_move, 593, 47, 2, 68, 247] +[:mouse_move, 580, 45, 2, 69, 248] +[:mouse_move, 577, 45, 2, 70, 248] +[:mouse_move, 576, 45, 2, 71, 248] +[:mouse_move, 576, 44, 2, 72, 251] +[:mouse_button_pressed, 1, 0, 1, 73, 251] +[:mouse_button_up, 1, 0, 1, 74, 253] +[:mouse_move, 577, 44, 2, 75, 257] +[:mouse_move, 578, 45, 2, 76, 257] +[:mouse_move, 584, 45, 2, 77, 258] +[:mouse_move, 594, 47, 2, 78, 258] +[:mouse_move, 606, 48, 2, 79, 258] +[:mouse_move, 619, 50, 2, 80, 259] +[:mouse_move, 627, 50, 2, 81, 259] +[:mouse_move, 629, 50, 2, 82, 259] +[:mouse_move, 630, 50, 2, 83, 259] +[:mouse_move, 631, 50, 2, 84, 260] +[:mouse_move, 632, 50, 2, 85, 261] +[:mouse_button_pressed, 1, 0, 1, 86, 263] +[:mouse_move, 629, 50, 2, 87, 264] +[:mouse_move, 624, 50, 2, 88, 264] +[:mouse_move, 617, 50, 2, 89, 264] +[:mouse_move, 612, 50, 2, 90, 264] +[:mouse_move, 609, 50, 2, 91, 264] +[:mouse_move, 607, 50, 2, 92, 264] +[:mouse_move, 603, 49, 2, 93, 264] +[:mouse_move, 600, 49, 2, 94, 264] +[:mouse_move, 597, 48, 2, 95, 265] +[:mouse_move, 595, 48, 2, 96, 265] +[:mouse_move, 594, 48, 2, 97, 265] +[:mouse_move, 593, 48, 2, 98, 265] +[:mouse_move, 592, 48, 2, 99, 265] +[:mouse_move, 590, 48, 2, 100, 265] +[:mouse_move, 587, 48, 2, 101, 265] +[:mouse_move, 582, 48, 2, 102, 265] +[:mouse_move, 575, 48, 2, 103, 265] +[:mouse_move, 571, 47, 2, 104, 265] +[:mouse_move, 568, 47, 2, 105, 265] +[:mouse_move, 567, 47, 2, 106, 266] +[:mouse_move, 566, 47, 2, 107, 266] +[:mouse_move, 565, 46, 2, 108, 266] +[:mouse_move, 564, 46, 2, 109, 266] +[:mouse_move, 563, 46, 2, 110, 266] +[:mouse_move, 562, 46, 2, 111, 266] +[:mouse_move, 561, 46, 2, 112, 266] +[:mouse_move, 560, 46, 2, 113, 267] +[:mouse_move, 559, 46, 2, 114, 267] +[:mouse_move, 558, 46, 2, 115, 267] +[:mouse_move, 555, 46, 2, 116, 268] +[:mouse_move, 551, 46, 2, 117, 268] +[:mouse_move, 549, 46, 2, 118, 268] +[:mouse_move, 548, 46, 2, 119, 268] +[:mouse_move, 547, 46, 2, 120, 268] +[:mouse_move, 546, 46, 2, 121, 269] +[:mouse_move, 545, 46, 2, 122, 269] +[:mouse_move, 540, 46, 2, 123, 269] +[:mouse_move, 534, 46, 2, 124, 269] +[:mouse_move, 531, 46, 2, 125, 269] +[:mouse_move, 527, 46, 2, 126, 269] +[:mouse_move, 525, 46, 2, 127, 269] +[:mouse_button_up, 1, 0, 1, 128, 276] +[:mouse_move, 526, 47, 2, 129, 287] +[:mouse_move, 527, 47, 2, 130, 288] +[:mouse_move, 528, 48, 2, 131, 290] +[:mouse_move, 531, 51, 2, 132, 290] +[:mouse_move, 534, 54, 2, 133, 290] +[:mouse_move, 539, 61, 2, 134, 291] +[:mouse_move, 548, 71, 2, 135, 291] +[:mouse_move, 558, 81, 2, 136, 292] +[:mouse_move, 570, 94, 2, 137, 292] +[:mouse_move, 585, 110, 2, 138, 293] +[:mouse_move, 595, 123, 2, 139, 293] +[:mouse_move, 607, 136, 2, 140, 293] +[:mouse_move, 618, 146, 2, 141, 294] +[:mouse_move, 626, 154, 2, 142, 295] +[:mouse_move, 632, 161, 2, 143, 295] +[:mouse_move, 633, 162, 2, 144, 296] +[:mouse_move, 633, 163, 2, 145, 296] +[:mouse_move, 634, 164, 2, 146, 296] +[:mouse_move, 634, 165, 2, 147, 297] +[:mouse_move, 635, 168, 2, 148, 297] +[:mouse_move, 635, 172, 2, 149, 298] +[:mouse_move, 635, 178, 2, 150, 299] +[:mouse_move, 635, 182, 2, 151, 299] +[:mouse_move, 635, 183, 2, 152, 299] +[:mouse_move, 635, 184, 2, 153, 300] +[:mouse_move, 634, 187, 2, 154, 300] +[:mouse_move, 632, 191, 2, 155, 301] +[:mouse_move, 629, 193, 2, 156, 301] +[:mouse_move, 627, 194, 2, 157, 302] +[:mouse_move, 625, 194, 2, 158, 302] +[:mouse_move, 625, 195, 2, 159, 303] +[:mouse_move, 624, 195, 2, 160, 304] +[:mouse_move, 619, 195, 2, 161, 305] +[:mouse_move, 608, 195, 2, 162, 305] +[:mouse_move, 597, 194, 2, 163, 305] +[:mouse_move, 584, 188, 2, 164, 306] +[:mouse_move, 572, 180, 2, 165, 307] +[:mouse_move, 563, 173, 2, 166, 307] +[:mouse_move, 556, 166, 2, 167, 308] +[:mouse_move, 550, 160, 2, 168, 308] +[:mouse_move, 548, 157, 2, 169, 308] +[:mouse_move, 547, 154, 2, 170, 309] +[:mouse_move, 542, 149, 2, 171, 309] +[:mouse_move, 538, 142, 2, 172, 310] +[:mouse_move, 533, 134, 2, 173, 310] +[:mouse_move, 531, 132, 2, 174, 311] +[:mouse_move, 530, 132, 2, 175, 311] +[:mouse_move, 530, 131, 2, 176, 312] +[:mouse_move, 528, 129, 2, 177, 312] +[:mouse_move, 524, 127, 2, 178, 312] +[:mouse_move, 523, 126, 2, 179, 313] +[:mouse_move, 522, 126, 2, 180, 314] +[:mouse_move, 520, 124, 2, 181, 314] +[:mouse_move, 512, 118, 2, 182, 315] +[:mouse_move, 502, 112, 2, 183, 316] +[:mouse_move, 498, 108, 2, 184, 316] +[:mouse_move, 495, 107, 2, 185, 317] +[:mouse_move, 495, 106, 2, 186, 317] +[:mouse_move, 493, 105, 2, 187, 317] +[:mouse_move, 493, 104, 2, 188, 318] +[:mouse_move, 492, 104, 2, 189, 318] +[:mouse_move, 492, 103, 2, 190, 319] +[:mouse_button_pressed, 1, 0, 1, 191, 326] +[:mouse_button_up, 1, 0, 1, 192, 328] +[:mouse_button_pressed, 1, 0, 1, 193, 339] +[:mouse_button_up, 1, 0, 1, 194, 342] +[:mouse_button_pressed, 1, 0, 1, 195, 343] +[:mouse_button_up, 1, 0, 1, 196, 344] +[:mouse_button_pressed, 1, 0, 1, 197, 345] +[:mouse_button_up, 1, 0, 1, 198, 347] +[:mouse_move, 493, 103, 2, 199, 348] +[:mouse_move, 497, 103, 2, 200, 348] +[:mouse_move, 507, 103, 2, 201, 348] +[:mouse_move, 522, 103, 2, 202, 349] +[:mouse_move, 542, 103, 2, 203, 349] +[:mouse_move, 566, 103, 2, 204, 350] +[:mouse_move, 595, 103, 2, 205, 350] +[:mouse_move, 627, 103, 2, 206, 351] +[:mouse_move, 655, 103, 2, 207, 351] +[:mouse_move, 678, 103, 2, 208, 352] +[:mouse_move, 693, 103, 2, 209, 352] +[:mouse_move, 698, 103, 2, 210, 353] +[:mouse_move, 699, 103, 2, 211, 353] +[:mouse_move, 702, 103, 2, 212, 354] +[:mouse_move, 704, 103, 2, 213, 354] +[:mouse_move, 708, 103, 2, 214, 354] +[:mouse_move, 709, 103, 2, 215, 355] +[:mouse_move, 711, 103, 2, 216, 356] +[:mouse_move, 714, 103, 2, 217, 357] +[:mouse_move, 715, 103, 2, 218, 357] +[:mouse_move, 719, 103, 2, 219, 357] +[:mouse_move, 721, 103, 2, 220, 358] +[:mouse_move, 723, 103, 2, 221, 359] +[:mouse_move, 724, 103, 2, 222, 359] +[:mouse_move, 725, 103, 2, 223, 364] +[:mouse_move, 729, 101, 2, 224, 365] +[:mouse_move, 732, 101, 2, 225, 365] +[:mouse_move, 734, 100, 2, 226, 366] +[:mouse_move, 735, 99, 2, 227, 367] +[:mouse_button_pressed, 1, 0, 1, 228, 368] +[:mouse_button_up, 1, 0, 1, 229, 371] +[:mouse_button_pressed, 1, 0, 1, 230, 373] +[:mouse_button_up, 1, 0, 1, 231, 375] +[:mouse_button_pressed, 1, 0, 1, 232, 378] +[:mouse_button_up, 1, 0, 1, 233, 380] +[:mouse_button_pressed, 1, 0, 1, 234, 383] +[:mouse_button_up, 1, 0, 1, 235, 385] +[:mouse_button_pressed, 1, 0, 1, 236, 387] +[:mouse_button_up, 1, 0, 1, 237, 389] +[:mouse_move, 736, 99, 2, 238, 390] +[:mouse_button_pressed, 1, 0, 1, 239, 392] +[:mouse_button_up, 1, 0, 1, 240, 395] +[:mouse_button_pressed, 1, 0, 1, 241, 432] +[:mouse_button_up, 1, 0, 1, 242, 434] +[:mouse_move, 736, 103, 2, 243, 446] +[:mouse_move, 736, 113, 2, 244, 446] +[:mouse_move, 734, 125, 2, 245, 447] +[:mouse_move, 732, 140, 2, 246, 447] +[:mouse_move, 726, 158, 2, 247, 448] +[:mouse_move, 718, 174, 2, 248, 448] +[:mouse_move, 712, 193, 2, 249, 448] +[:mouse_move, 709, 203, 2, 250, 449] +[:mouse_move, 709, 208, 2, 251, 449] +[:mouse_move, 708, 211, 2, 252, 450] +[:mouse_move, 708, 212, 2, 253, 451] +[:mouse_move, 708, 213, 2, 254, 451] +[:mouse_move, 707, 215, 2, 255, 451] +[:mouse_move, 704, 217, 2, 256, 452] +[:mouse_move, 700, 221, 2, 257, 452] +[:mouse_move, 698, 223, 2, 258, 453] +[:mouse_move, 697, 223, 2, 259, 454] +[:mouse_move, 699, 223, 2, 260, 455] +[:mouse_move, 700, 222, 2, 261, 455] +[:mouse_move, 701, 222, 2, 262, 456] +[:mouse_move, 702, 222, 2, 263, 456] +[:mouse_move, 702, 221, 2, 264, 457] +[:mouse_button_pressed, 1, 0, 1, 265, 458] +[:mouse_button_up, 1, 0, 1, 266, 459] +[:mouse_move, 695, 221, 2, 267, 468] +[:mouse_move, 684, 221, 2, 268, 469] +[:mouse_move, 673, 221, 2, 269, 469] +[:mouse_move, 663, 221, 2, 270, 470] +[:mouse_move, 656, 221, 2, 271, 470] +[:mouse_move, 655, 221, 2, 272, 471] +[:mouse_button_pressed, 1, 0, 1, 273, 475] +[:mouse_button_up, 1, 0, 1, 274, 476] +[:mouse_move, 657, 218, 2, 275, 479] +[:mouse_move, 661, 213, 2, 276, 479] +[:mouse_move, 670, 201, 2, 277, 479] +[:mouse_move, 679, 190, 2, 278, 479] +[:mouse_move, 687, 178, 2, 279, 480] +[:mouse_move, 695, 165, 2, 280, 481] +[:mouse_move, 703, 151, 2, 281, 481] +[:mouse_move, 712, 139, 2, 282, 482] +[:mouse_move, 720, 129, 2, 283, 482] +[:mouse_move, 727, 121, 2, 284, 482] +[:mouse_move, 735, 111, 2, 285, 483] +[:mouse_move, 737, 108, 2, 286, 483] +[:mouse_move, 739, 105, 2, 287, 484] +[:mouse_move, 739, 104, 2, 288, 484] +[:mouse_move, 740, 103, 2, 289, 485] +[:mouse_move, 740, 102, 2, 290, 485] +[:mouse_move, 740, 101, 2, 291, 486] +[:mouse_move, 740, 100, 2, 292, 488] +[:mouse_button_pressed, 1, 0, 1, 293, 489] +[:mouse_move, 740, 99, 2, 294, 490] +[:mouse_button_up, 1, 0, 1, 295, 491] +[:mouse_button_pressed, 1, 0, 1, 296, 493] +[:mouse_move, 740, 100, 2, 297, 493] +[:mouse_button_up, 1, 0, 1, 298, 496] +[:mouse_button_pressed, 1, 0, 1, 299, 498] +[:mouse_button_up, 1, 0, 1, 300, 500] +[:mouse_button_pressed, 1, 0, 1, 301, 502] +[:mouse_button_up, 1, 0, 1, 302, 505] +[:mouse_button_pressed, 1, 0, 1, 303, 508] +[:mouse_button_up, 1, 0, 1, 304, 509] +[:mouse_button_pressed, 1, 0, 1, 305, 511] +[:mouse_button_up, 1, 0, 1, 306, 514] +[:mouse_button_pressed, 1, 0, 1, 307, 516] +[:mouse_button_up, 1, 0, 1, 308, 518] +[:mouse_button_pressed, 1, 0, 1, 309, 520] +[:mouse_button_up, 1, 0, 1, 310, 522] +[:mouse_button_pressed, 1, 0, 1, 311, 524] +[:mouse_button_up, 1, 0, 1, 312, 526] +[:mouse_move, 738, 100, 2, 313, 528] +[:mouse_move, 732, 101, 2, 314, 528] +[:mouse_move, 715, 101, 2, 315, 529] +[:mouse_move, 690, 101, 2, 316, 529] +[:mouse_move, 677, 101, 2, 317, 530] +[:mouse_move, 666, 101, 2, 318, 530] +[:mouse_move, 662, 101, 2, 319, 531] +[:mouse_move, 661, 101, 2, 320, 531] +[:mouse_button_pressed, 1, 0, 1, 321, 534] +[:mouse_button_up, 1, 0, 1, 322, 536] +[:mouse_move, 660, 100, 2, 323, 550] +[:mouse_move, 661, 100, 2, 324, 550] +[:mouse_move, 662, 100, 2, 325, 553] +[:key_down_raw, 96, 0, 2, 326, 615] +[:key_up_raw, 96, 0, 2, 327, 616] +[:mouse_move, 660, 102, 2, 328, 625] +[:mouse_move, 657, 104, 2, 329, 626] +[:mouse_move, 655, 107, 2, 330, 626] +[:mouse_move, 653, 110, 2, 331, 626] +[:mouse_move, 653, 117, 2, 332, 626] +[:mouse_move, 655, 122, 2, 333, 626] +[:mouse_move, 658, 124, 2, 334, 627] +[:mouse_move, 664, 126, 2, 335, 627] +[:mouse_move, 671, 128, 2, 336, 627] +[:mouse_move, 681, 133, 2, 337, 627] +[:mouse_move, 693, 141, 2, 338, 628] +[:mouse_move, 710, 154, 2, 339, 628] +[:mouse_move, 731, 167, 2, 340, 628] +[:mouse_move, 753, 176, 2, 341, 628] +[:mouse_move, 772, 181, 2, 342, 629] +[:mouse_move, 786, 182, 2, 343, 629] +[:mouse_move, 791, 184, 2, 344, 629] +[:mouse_move, 790, 185, 2, 345, 629] +[:mouse_move, 789, 187, 2, 346, 630] +[:mouse_move, 788, 187, 2, 347, 630] +[:key_down_raw, 13, 0, 2, 348, 637] diff --git a/samples/13_path_finding_algorithms/08_a_star/app/main.rb b/samples/13_path_finding_algorithms/08_a_star/app/main.rb index e9fcb8c..eaf7e09 100644 --- a/samples/13_path_finding_algorithms/08_a_star/app/main.rb +++ b/samples/13_path_finding_algorithms/08_a_star/app/main.rb @@ -11,8 +11,8 @@ class A_Star_Algorithm def tick defaults - render - input + render + input if dijkstra.came_from.empty? calc_searches @@ -65,7 +65,7 @@ class A_Star_Algorithm # 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.user_input ||= :none + state.user_input ||= :none # These variables allow the breadth first search to take place # Came_from is a hash with a key of a cell and a value of the cell that was expanded from to find the key. @@ -143,7 +143,7 @@ class A_Star_Algorithm # If the mouse was clicked this tick if inputs.mouse.down # Determine what the user is editing and appropriately edit the state.user_input variable - determine_input + determine_input end # Process user input based on user_input variable and current mouse position @@ -154,51 +154,51 @@ class A_Star_Algorithm # This method is called when the mouse is clicked down def determine_input # If the mouse is over the star in the first grid - if dijkstra_mouse_over_star? + if dijkstra_mouse_over_star? # The user is editing the star from the first grid - state.user_input = :dijkstra_star + state.user_input = :dijkstra_star # If the mouse is over the star in the second grid - elsif greedy_mouse_over_star? + elsif greedy_mouse_over_star? # The user is editing the star from the second grid - state.user_input = :greedy_star + state.user_input = :greedy_star # If the mouse is over the star in the third grid - elsif a_star_mouse_over_star? + elsif a_star_mouse_over_star? # The user is editing the star from the third grid - state.user_input = :a_star_star + state.user_input = :a_star_star # If the mouse is over the target in the first grid - elsif dijkstra_mouse_over_target? + elsif dijkstra_mouse_over_target? # The user is editing the target from the first grid - state.user_input = :dijkstra_target + state.user_input = :dijkstra_target # If the mouse is over the target in the second grid - elsif greedy_mouse_over_target? + elsif greedy_mouse_over_target? # The user is editing the target from the second grid - state.user_input = :greedy_target + state.user_input = :greedy_target # If the mouse is over the target in the third grid - elsif a_star_mouse_over_target? + elsif a_star_mouse_over_target? # The user is editing the target from the third grid - state.user_input = :a_star_target + state.user_input = :a_star_target # If the mouse is over a wall in the first grid - elsif dijkstra_mouse_over_wall? + elsif dijkstra_mouse_over_wall? # The user is removing a wall from the first grid - state.user_input = :dijkstra_remove_wall + state.user_input = :dijkstra_remove_wall # If the mouse is over a wall in the second grid - elsif greedy_mouse_over_wall? + elsif greedy_mouse_over_wall? # The user is removing a wall from the second grid state.user_input = :greedy_remove_wall # If the mouse is over a wall in the third grid - elsif a_star_mouse_over_wall? + elsif a_star_mouse_over_wall? # The user is removing a wall from the third grid state.user_input = :a_star_remove_wall # If the mouse is over the first grid - elsif dijkstra_mouse_over_grid? + elsif dijkstra_mouse_over_grid? # The user is adding a wall from the first grid state.user_input = :dijkstra_add_wall # If the mouse is over the second grid - elsif greedy_mouse_over_grid? + elsif greedy_mouse_over_grid? # The user is adding a wall from the second grid state.user_input = :greedy_add_wall # If the mouse is over the third grid - elsif a_star_mouse_over_grid? + elsif a_star_mouse_over_grid? # The user is adding a wall from the third grid state.user_input = :a_star_add_wall end @@ -206,30 +206,30 @@ class A_Star_Algorithm # Processes click and drag based on what the user is currently dragging def process_input - if state.user_input == :dijkstra_star - process_input_dijkstra_star + if state.user_input == :dijkstra_star + process_input_dijkstra_star elsif state.user_input == :greedy_star - process_input_greedy_star + process_input_greedy_star elsif state.user_input == :a_star_star - process_input_a_star_star - elsif state.user_input == :dijkstra_target - process_input_dijkstra_target - elsif state.user_input == :greedy_target - process_input_greedy_target - elsif state.user_input == :a_star_target - process_input_a_star_target - elsif state.user_input == :dijkstra_remove_wall - process_input_dijkstra_remove_wall + process_input_a_star_star + elsif state.user_input == :dijkstra_target + process_input_dijkstra_target + elsif state.user_input == :greedy_target + process_input_greedy_target + elsif state.user_input == :a_star_target + process_input_a_star_target + elsif state.user_input == :dijkstra_remove_wall + process_input_dijkstra_remove_wall elsif state.user_input == :greedy_remove_wall - process_input_greedy_remove_wall + process_input_greedy_remove_wall elsif state.user_input == :a_star_remove_wall - process_input_a_star_remove_wall - elsif state.user_input == :dijkstra_add_wall - process_input_dijkstra_add_wall - elsif state.user_input == :greedy_add_wall - process_input_greedy_add_wall - elsif state.user_input == :a_star_add_wall - process_input_a_star_add_wall + process_input_a_star_remove_wall + elsif state.user_input == :dijkstra_add_wall + process_input_dijkstra_add_wall + elsif state.user_input == :greedy_add_wall + process_input_greedy_add_wall + elsif state.user_input == :a_star_add_wall + process_input_a_star_add_wall end end @@ -244,7 +244,7 @@ class A_Star_Algorithm # The horizontal grid lines for y in 0..grid.height - outputs.lines << dijkstra_horizontal_line(y) + outputs.lines << dijkstra_horizontal_line(y) end end @@ -259,7 +259,7 @@ class A_Star_Algorithm # The horizontal grid lines for y in 0..grid.height - outputs.lines << greedy_horizontal_line(y) + outputs.lines << greedy_horizontal_line(y) end end @@ -274,10 +274,10 @@ class A_Star_Algorithm # The horizontal grid lines for y in 0..grid.height - outputs.lines << a_star_horizontal_line(y) + outputs.lines << a_star_horizontal_line(y) end end - + # Returns a vertical line for a column of the first grid def dijkstra_vertical_line column dijkstra_scale_up([column, 0, column, grid.height]) @@ -327,7 +327,7 @@ class A_Star_Algorithm def render_dijkstra_target outputs.sprites << [dijkstra_scale_up(grid.target), 'target.png'] end - + # Renders the target on the second grid def render_greedy_target outputs.sprites << [greedy_scale_up(grid.target), 'target.png'] @@ -340,21 +340,21 @@ class A_Star_Algorithm # Renders the walls on the first grid def render_dijkstra_walls - grid.walls.each_key do | wall | + grid.walls.each_key do | wall | outputs.solids << [dijkstra_scale_up(wall), wall_color] end end # Renders the walls on the second grid def render_greedy_walls - grid.walls.each_key do | wall | + grid.walls.each_key do | wall | outputs.solids << [greedy_scale_up(wall), wall_color] end end # Renders the walls on the third grid def render_a_star_walls - grid.walls.each_key do | wall | + grid.walls.each_key do | wall | outputs.solids << [a_star_scale_up(wall), wall_color] end end @@ -554,12 +554,12 @@ class A_Star_Algorithm # Only resets the search if the star changes position # Called whenever the user is editing the star (puts mouse down on star) def process_input_dijkstra_star - old_star = grid.star.clone + old_star = grid.star.clone unless dijkstra_cell_closest_to_mouse == grid.target - grid.star = dijkstra_cell_closest_to_mouse + grid.star = dijkstra_cell_closest_to_mouse end - unless old_star == grid.star - reset_searches + unless old_star == grid.star + reset_searches end end @@ -567,12 +567,12 @@ class A_Star_Algorithm # Only resets the search if the star changes position # Called whenever the user is editing the star (puts mouse down on star) def process_input_greedy_star - old_star = grid.star.clone + old_star = grid.star.clone unless greedy_cell_closest_to_mouse == grid.target grid.star = greedy_cell_closest_to_mouse end - unless old_star == grid.star - reset_searches + unless old_star == grid.star + reset_searches end end @@ -580,12 +580,12 @@ class A_Star_Algorithm # Only resets the search if the star changes position # Called whenever the user is editing the star (puts mouse down on star) def process_input_a_star_star - old_star = grid.star.clone + old_star = grid.star.clone unless a_star_cell_closest_to_mouse == grid.target grid.star = a_star_cell_closest_to_mouse end - unless old_star == grid.star - reset_searches + unless old_star == grid.star + reset_searches end end @@ -593,12 +593,12 @@ class A_Star_Algorithm # Only reset_searchess the search if the target changes position # Called whenever the user is editing the target (puts mouse down on target) def process_input_dijkstra_target - old_target = grid.target.clone + old_target = grid.target.clone unless dijkstra_cell_closest_to_mouse == grid.star grid.target = dijkstra_cell_closest_to_mouse end - unless old_target == grid.target - reset_searches + unless old_target == grid.target + reset_searches end end @@ -606,12 +606,12 @@ class A_Star_Algorithm # Only reset_searchess the search if the target changes position # Called whenever the user is editing the target (puts mouse down on target) def process_input_greedy_target - old_target = grid.target.clone + old_target = grid.target.clone unless greedy_cell_closest_to_mouse == grid.star grid.target = greedy_cell_closest_to_mouse end - unless old_target == grid.target - reset_searches + unless old_target == grid.target + reset_searches end end @@ -619,12 +619,12 @@ class A_Star_Algorithm # Only reset_searchess the search if the target changes position # Called whenever the user is editing the target (puts mouse down on target) def process_input_a_star_target - old_target = grid.target.clone + old_target = grid.target.clone unless a_star_cell_closest_to_mouse == grid.star grid.target = a_star_cell_closest_to_mouse end - unless old_target == grid.target - reset_searches + unless old_target == grid.target + reset_searches end end @@ -633,10 +633,10 @@ class A_Star_Algorithm # 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 dijkstra_mouse_over_grid? + if dijkstra_mouse_over_grid? if grid.walls.has_key?(dijkstra_cell_closest_to_mouse) - grid.walls.delete(dijkstra_cell_closest_to_mouse) - reset_searches + grid.walls.delete(dijkstra_cell_closest_to_mouse) + reset_searches end end end @@ -646,10 +646,10 @@ class A_Star_Algorithm # 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 greedy_mouse_over_grid? + if greedy_mouse_over_grid? if grid.walls.has_key?(greedy_cell_closest_to_mouse) - grid.walls.delete(greedy_cell_closest_to_mouse) - reset_searches + grid.walls.delete(greedy_cell_closest_to_mouse) + reset_searches end end end @@ -659,40 +659,40 @@ class A_Star_Algorithm # 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 a_star_mouse_over_grid? + if a_star_mouse_over_grid? if grid.walls.has_key?(a_star_cell_closest_to_mouse) - grid.walls.delete(a_star_cell_closest_to_mouse) - reset_searches + grid.walls.delete(a_star_cell_closest_to_mouse) + reset_searches end end end # Adds a wall in the first grid in the cell the mouse is over def process_input_dijkstra_add_wall - if dijkstra_mouse_over_grid? + if dijkstra_mouse_over_grid? unless grid.walls.has_key?(dijkstra_cell_closest_to_mouse) - grid.walls[dijkstra_cell_closest_to_mouse] = true - reset_searches + grid.walls[dijkstra_cell_closest_to_mouse] = true + reset_searches end end end # Adds a wall in the second grid in the cell the mouse is over def process_input_greedy_add_wall - if greedy_mouse_over_grid? + if greedy_mouse_over_grid? unless grid.walls.has_key?(greedy_cell_closest_to_mouse) - grid.walls[greedy_cell_closest_to_mouse] = true - reset_searches + grid.walls[greedy_cell_closest_to_mouse] = true + reset_searches end end end # Adds a wall in the third grid in the cell the mouse is over def process_input_a_star_add_wall - if a_star_mouse_over_grid? + if a_star_mouse_over_grid? unless grid.walls.has_key?(a_star_cell_closest_to_mouse) - grid.walls[a_star_cell_closest_to_mouse] = true - reset_searches + grid.walls[a_star_cell_closest_to_mouse] = true + reset_searches end end end @@ -702,13 +702,13 @@ class A_Star_Algorithm # Finding the cell closest to the mouse helps with this def dijkstra_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 # When the user grabs the star and puts their cursor to the far right @@ -716,17 +716,17 @@ class A_Star_Algorithm # Finding the cell closest to the mouse in the second grid helps with this def greedy_cell_closest_to_mouse # Closest cell grid to the mouse in the second - 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 # Translate the cell to the first grid x -= grid.width + 1 # Bound x and y to the first grid x = 0 if x < 0 y = 0 if y < 0 - 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 # When the user grabs the star and puts their cursor to the far right @@ -734,17 +734,17 @@ class A_Star_Algorithm # Finding the cell closest to the mouse in the third grid helps with this def a_star_cell_closest_to_mouse # Closest cell grid to the mouse in the second - 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 # Translate the cell to the first grid x -= (grid.width + 1) * 2 # Bound x and y to the first grid x = 0 if x < 0 y = 0 if y < 0 - 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 def reset_searches @@ -772,21 +772,21 @@ class A_Star_Algorithm def calc_dijkstra # Sets up the search to begin from the star - dijkstra.frontier << grid.star - dijkstra.came_from[grid.star] = nil - dijkstra.cost_so_far[grid.star] = 0 + dijkstra.frontier << grid.star + dijkstra.came_from[grid.star] = nil + dijkstra.cost_so_far[grid.star] = 0 # Until the target is found or there are no more cells to explore from until dijkstra.came_from.has_key?(grid.target) or dijkstra.frontier.empty? # Take the next frontier cell. The first element is the cell, the second is the priority. new_frontier = dijkstra.frontier.shift#[0] # 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 dijkstra.came_from.has_key?(neighbor) or grid.walls.has_key?(neighbor) + unless dijkstra.came_from.has_key?(neighbor) or grid.walls.has_key?(neighbor) # Add them to the frontier and mark them as visited dijkstra.frontier << neighbor - dijkstra.came_from[neighbor] = new_frontier + dijkstra.came_from[neighbor] = new_frontier dijkstra.cost_so_far[neighbor] = dijkstra.cost_so_far[new_frontier] + 1 end end @@ -807,20 +807,20 @@ class A_Star_Algorithm def calc_greedy # Sets up the search to begin from the star - greedy.frontier << grid.star - greedy.came_from[grid.star] = nil + greedy.frontier << grid.star + greedy.came_from[grid.star] = nil # Until the target is found or there are no more cells to explore from until greedy.came_from.has_key?(grid.target) or greedy.frontier.empty? # Take the next frontier cell - new_frontier = greedy.frontier.shift + new_frontier = greedy.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 greedy.came_from.has_key?(neighbor) or grid.walls.has_key?(neighbor) + unless greedy.came_from.has_key?(neighbor) or grid.walls.has_key?(neighbor) # Add them to the frontier and mark them as visited - greedy.frontier << neighbor - greedy.came_from[neighbor] = new_frontier + greedy.frontier << neighbor + greedy.came_from[neighbor] = new_frontier end end # Sort the frontier so that cells that are in a zigzag pattern are prioritized over those in an line @@ -850,12 +850,12 @@ class A_Star_Algorithm current_frontier = a_star.frontier.shift # For each of that cells neighbors - adjacent_neighbors(current_frontier).each do | neighbor | + adjacent_neighbors(current_frontier).each do | neighbor | # That have not been visited and are not walls - unless a_star.came_from.has_key?(neighbor) or grid.walls.has_key?(neighbor) + unless a_star.came_from.has_key?(neighbor) or grid.walls.has_key?(neighbor) # Add them to the frontier and mark them as visited - a_star.frontier << neighbor - a_star.came_from[neighbor] = current_frontier + a_star.frontier << neighbor + a_star.came_from[neighbor] = current_frontier a_star.cost_so_far[neighbor] = a_star.cost_so_far[current_frontier] + 1 end end @@ -937,16 +937,16 @@ class A_Star_Algorithm # 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 - neighbors + neighbors end # Finds the vertical and horizontal distance of a cell from the star @@ -991,11 +991,11 @@ class A_Star_Algorithm def wall_color [134, 134, 120] # Camo Green end - + def visited_color [204, 191, 179] # Dark Brown end - + def path_color [231, 230, 228] # Pastel White end @@ -1018,7 +1018,7 @@ def tick args end # Every tick, new args are passed, and the Breadth First Search tick is called - $a_star_algorithm ||= A_Star_Algorithm.new(args) + $a_star_algorithm ||= A_Star_Algorithm.new $a_star_algorithm.args = args $a_star_algorithm.tick end diff --git a/samples/13_path_finding_algorithms/08_a_star/replay.txt b/samples/13_path_finding_algorithms/08_a_star/replay.txt new file mode 100644 index 0000000..001a564 --- /dev/null +++ b/samples/13_path_finding_algorithms/08_a_star/replay.txt @@ -0,0 +1,434 @@ +replay_version 2.0 +stopped_at 341 +seed 100 +recorded_at 2021-11-20 11:24:45 -0600 +[:mouse_button_up, 1, 0, 1, 1, 1] +[:mouse_move, 769, 97, 2, 2, 8] +[:mouse_move, 763, 101, 2, 3, 8] +[:mouse_move, 755, 109, 2, 4, 8] +[:mouse_move, 748, 123, 2, 5, 8] +[:mouse_move, 746, 148, 2, 6, 9] +[:mouse_move, 742, 180, 2, 7, 9] +[:mouse_move, 733, 215, 2, 8, 9] +[:mouse_move, 719, 278, 2, 9, 9] +[:mouse_move, 712, 336, 2, 10, 9] +[:mouse_move, 701, 397, 2, 11, 10] +[:mouse_move, 685, 440, 2, 12, 10] +[:mouse_move, 667, 472, 2, 13, 10] +[:mouse_move, 654, 493, 2, 14, 10] +[:mouse_move, 644, 506, 2, 15, 11] +[:mouse_move, 637, 514, 2, 16, 11] +[:mouse_move, 635, 516, 2, 17, 11] +[:mouse_move, 634, 517, 2, 18, 11] +[:mouse_move, 630, 518, 2, 19, 12] +[:mouse_move, 624, 524, 2, 20, 12] +[:mouse_move, 619, 537, 2, 21, 12] +[:mouse_move, 612, 553, 2, 22, 13] +[:mouse_move, 609, 561, 2, 23, 13] +[:mouse_move, 608, 565, 2, 24, 13] +[:mouse_move, 613, 565, 2, 25, 14] +[:mouse_move, 627, 565, 2, 26, 14] +[:mouse_move, 641, 565, 2, 27, 14] +[:mouse_move, 654, 565, 2, 28, 14] +[:mouse_move, 658, 565, 2, 29, 15] +[:mouse_move, 659, 565, 2, 30, 15] +[:mouse_move, 662, 565, 2, 31, 15] +[:mouse_move, 667, 566, 2, 32, 15] +[:mouse_move, 671, 566, 2, 33, 16] +[:mouse_move, 676, 566, 2, 34, 16] +[:mouse_move, 685, 566, 2, 35, 16] +[:mouse_move, 701, 565, 2, 36, 16] +[:mouse_move, 719, 562, 2, 37, 17] +[:mouse_move, 731, 560, 2, 38, 17] +[:mouse_move, 744, 559, 2, 39, 17] +[:mouse_move, 750, 559, 2, 40, 17] +[:mouse_move, 757, 559, 2, 41, 17] +[:mouse_move, 763, 559, 2, 42, 17] +[:mouse_move, 767, 559, 2, 43, 18] +[:mouse_move, 769, 559, 2, 44, 18] +[:mouse_move, 770, 558, 2, 45, 18] +[:mouse_move, 774, 557, 2, 46, 18] +[:mouse_move, 784, 555, 2, 47, 18] +[:mouse_move, 796, 551, 2, 48, 19] +[:mouse_move, 804, 550, 2, 49, 19] +[:mouse_move, 810, 548, 2, 50, 19] +[:mouse_move, 814, 547, 2, 51, 20] +[:mouse_move, 817, 547, 2, 52, 20] +[:mouse_move, 818, 547, 2, 53, 20] +[:mouse_move, 819, 547, 2, 54, 20] +[:mouse_move, 819, 546, 2, 55, 20] +[:mouse_move, 819, 545, 2, 56, 20] +[:mouse_move, 820, 545, 2, 57, 21] +[:mouse_move, 820, 544, 2, 58, 21] +[:mouse_move, 820, 543, 2, 59, 21] +[:mouse_move, 820, 542, 2, 60, 22] +[:mouse_move, 820, 541, 2, 61, 22] +[:mouse_move, 820, 540, 2, 62, 23] +[:mouse_move, 819, 540, 2, 63, 23] +[:mouse_button_pressed, 1, 0, 1, 64, 24] +[:mouse_button_up, 1, 0, 1, 65, 25] +[:mouse_move, 820, 540, 2, 66, 29] +[:mouse_move, 820, 541, 2, 67, 29] +[:mouse_move, 820, 542, 2, 68, 29] +[:mouse_move, 820, 543, 2, 69, 30] +[:mouse_move, 819, 543, 2, 70, 31] +[:mouse_move, 818, 543, 2, 71, 31] +[:mouse_move, 817, 542, 2, 72, 31] +[:mouse_move, 816, 542, 2, 73, 32] +[:mouse_move, 812, 542, 2, 74, 32] +[:mouse_move, 808, 542, 2, 75, 32] +[:mouse_move, 802, 542, 2, 76, 33] +[:mouse_move, 796, 542, 2, 77, 33] +[:mouse_move, 790, 542, 2, 78, 33] +[:mouse_move, 784, 540, 2, 79, 33] +[:mouse_move, 783, 540, 2, 80, 34] +[:mouse_move, 782, 538, 2, 81, 34] +[:mouse_move, 782, 533, 2, 82, 34] +[:mouse_move, 785, 525, 2, 83, 34] +[:mouse_move, 788, 512, 2, 84, 34] +[:mouse_move, 791, 494, 2, 85, 35] +[:mouse_move, 791, 469, 2, 86, 35] +[:mouse_move, 785, 442, 2, 87, 35] +[:mouse_move, 776, 417, 2, 88, 35] +[:mouse_move, 767, 398, 2, 89, 36] +[:mouse_move, 759, 381, 2, 90, 36] +[:mouse_move, 747, 365, 2, 91, 36] +[:mouse_move, 737, 356, 2, 92, 36] +[:mouse_move, 718, 345, 2, 93, 36] +[:mouse_move, 702, 337, 2, 94, 37] +[:mouse_move, 693, 333, 2, 95, 37] +[:mouse_move, 689, 331, 2, 96, 37] +[:mouse_move, 688, 331, 2, 97, 38] +[:mouse_move, 687, 331, 2, 98, 38] +[:mouse_move, 686, 342, 2, 99, 38] +[:mouse_move, 684, 352, 2, 100, 39] +[:mouse_move, 682, 359, 2, 101, 39] +[:mouse_move, 682, 362, 2, 102, 39] +[:mouse_move, 682, 364, 2, 103, 40] +[:mouse_move, 683, 364, 2, 104, 40] +[:mouse_move, 686, 364, 2, 105, 40] +[:mouse_move, 688, 363, 2, 106, 40] +[:mouse_move, 692, 362, 2, 107, 40] +[:mouse_move, 698, 362, 2, 108, 41] +[:mouse_move, 702, 362, 2, 109, 41] +[:mouse_move, 705, 362, 2, 110, 41] +[:mouse_move, 706, 362, 2, 111, 42] +[:mouse_move, 706, 361, 2, 112, 42] +[:mouse_move, 707, 361, 2, 113, 42] +[:mouse_move, 708, 360, 2, 114, 42] +[:mouse_move, 709, 359, 2, 115, 43] +[:mouse_move, 709, 358, 2, 116, 43] +[:mouse_move, 710, 358, 2, 117, 43] +[:mouse_button_pressed, 1, 0, 1, 118, 44] +[:mouse_button_up, 1, 0, 1, 119, 45] +[:mouse_move, 710, 357, 2, 120, 56] +[:mouse_move, 713, 357, 2, 121, 56] +[:mouse_move, 715, 357, 2, 122, 57] +[:mouse_move, 716, 357, 2, 123, 57] +[:mouse_move, 717, 357, 2, 124, 57] +[:mouse_move, 719, 357, 2, 125, 58] +[:mouse_move, 720, 357, 2, 126, 58] +[:mouse_move, 720, 356, 2, 127, 59] +[:mouse_move, 721, 356, 2, 128, 59] +[:mouse_move, 723, 356, 2, 129, 59] +[:mouse_move, 724, 356, 2, 130, 59] +[:mouse_move, 727, 356, 2, 131, 59] +[:mouse_move, 728, 356, 2, 132, 59] +[:mouse_move, 730, 356, 2, 133, 60] +[:mouse_move, 731, 355, 2, 134, 60] +[:mouse_move, 732, 355, 2, 135, 60] +[:mouse_move, 734, 355, 2, 136, 60] +[:mouse_move, 735, 355, 2, 137, 60] +[:mouse_button_pressed, 1, 0, 1, 138, 62] +[:mouse_move, 737, 358, 2, 139, 63] +[:mouse_move, 739, 364, 2, 140, 63] +[:mouse_move, 739, 372, 2, 141, 63] +[:mouse_move, 739, 381, 2, 142, 64] +[:mouse_move, 740, 390, 2, 143, 64] +[:mouse_move, 742, 403, 2, 144, 64] +[:mouse_move, 744, 415, 2, 145, 64] +[:mouse_move, 744, 426, 2, 146, 64] +[:mouse_move, 745, 438, 2, 147, 64] +[:mouse_move, 746, 445, 2, 148, 64] +[:mouse_move, 747, 449, 2, 149, 64] +[:mouse_move, 747, 450, 2, 150, 64] +[:mouse_move, 747, 451, 2, 151, 64] +[:mouse_move, 748, 452, 2, 152, 64] +[:mouse_move, 749, 452, 2, 153, 64] +[:mouse_move, 750, 452, 2, 154, 64] +[:mouse_move, 751, 452, 2, 155, 64] +[:mouse_move, 753, 454, 2, 156, 64] +[:mouse_move, 754, 455, 2, 157, 64] +[:mouse_move, 756, 456, 2, 158, 64] +[:mouse_move, 759, 459, 2, 159, 64] +[:mouse_move, 765, 465, 2, 160, 64] +[:mouse_move, 769, 469, 2, 161, 64] +[:mouse_move, 773, 474, 2, 162, 64] +[:mouse_move, 776, 479, 2, 163, 64] +[:mouse_move, 781, 486, 2, 164, 64] +[:mouse_move, 782, 490, 2, 165, 65] +[:mouse_move, 783, 494, 2, 166, 65] +[:mouse_move, 783, 498, 2, 167, 65] +[:mouse_move, 784, 506, 2, 168, 65] +[:mouse_move, 786, 515, 2, 169, 65] +[:mouse_move, 789, 526, 2, 170, 65] +[:mouse_move, 791, 534, 2, 171, 65] +[:mouse_move, 795, 549, 2, 172, 65] +[:mouse_move, 798, 556, 2, 173, 65] +[:mouse_move, 799, 561, 2, 174, 65] +[:mouse_move, 799, 564, 2, 175, 65] +[:mouse_move, 801, 570, 2, 176, 65] +[:mouse_move, 802, 577, 2, 177, 65] +[:mouse_move, 804, 583, 2, 178, 65] +[:mouse_move, 804, 587, 2, 179, 65] +[:mouse_move, 805, 590, 2, 180, 65] +[:mouse_move, 807, 594, 2, 181, 65] +[:mouse_move, 809, 598, 2, 182, 65] +[:mouse_move, 811, 601, 2, 183, 65] +[:mouse_move, 812, 602, 2, 184, 65] +[:mouse_move, 812, 603, 2, 185, 65] +[:mouse_move, 813, 604, 2, 186, 65] +[:mouse_move, 814, 604, 2, 187, 65] +[:mouse_move, 817, 599, 2, 188, 65] +[:mouse_move, 819, 595, 2, 189, 65] +[:mouse_move, 820, 594, 2, 190, 65] +[:mouse_move, 819, 594, 2, 191, 77] +[:mouse_button_up, 1, 0, 1, 192, 77] +[:mouse_move, 818, 594, 2, 193, 77] +[:mouse_move, 817, 594, 2, 194, 78] +[:mouse_move, 816, 594, 2, 195, 79] +[:mouse_move, 815, 593, 2, 196, 109] +[:mouse_move, 812, 592, 2, 197, 109] +[:mouse_move, 808, 592, 2, 198, 109] +[:mouse_move, 799, 591, 2, 199, 109] +[:mouse_move, 780, 588, 2, 200, 110] +[:mouse_move, 758, 584, 2, 201, 110] +[:mouse_move, 738, 584, 2, 202, 110] +[:mouse_move, 724, 584, 2, 203, 110] +[:mouse_move, 710, 584, 2, 204, 110] +[:mouse_move, 691, 583, 2, 205, 111] +[:mouse_move, 668, 579, 2, 206, 111] +[:mouse_move, 647, 577, 2, 207, 111] +[:mouse_move, 630, 577, 2, 208, 111] +[:mouse_move, 610, 577, 2, 209, 112] +[:mouse_move, 602, 577, 2, 210, 112] +[:mouse_move, 597, 576, 2, 211, 112] +[:mouse_move, 595, 575, 2, 212, 112] +[:mouse_move, 603, 575, 2, 213, 114] +[:mouse_move, 626, 575, 2, 214, 114] +[:mouse_move, 651, 575, 2, 215, 114] +[:mouse_move, 680, 579, 2, 216, 114] +[:mouse_move, 723, 583, 2, 217, 114] +[:mouse_move, 745, 585, 2, 218, 114] +[:mouse_move, 756, 585, 2, 219, 115] +[:mouse_move, 758, 585, 2, 220, 115] +[:mouse_move, 759, 585, 2, 221, 115] +[:mouse_move, 760, 584, 2, 222, 115] +[:mouse_move, 761, 584, 2, 223, 116] +[:mouse_move, 764, 584, 2, 224, 116] +[:mouse_move, 767, 584, 2, 225, 116] +[:mouse_move, 769, 584, 2, 226, 116] +[:mouse_move, 773, 584, 2, 227, 117] +[:mouse_move, 791, 588, 2, 228, 117] +[:mouse_move, 803, 596, 2, 229, 117] +[:mouse_move, 807, 599, 2, 230, 118] +[:mouse_move, 808, 599, 2, 231, 118] +[:mouse_move, 809, 599, 2, 232, 119] +[:mouse_move, 812, 599, 2, 233, 120] +[:mouse_move, 813, 599, 2, 234, 120] +[:mouse_move, 814, 599, 2, 235, 120] +[:mouse_move, 815, 599, 2, 236, 122] +[:mouse_move, 816, 598, 2, 237, 122] +[:mouse_move, 817, 598, 2, 238, 123] +[:mouse_button_pressed, 1, 0, 1, 239, 123] +[:mouse_move, 805, 598, 2, 240, 124] +[:mouse_move, 777, 598, 2, 241, 124] +[:mouse_move, 748, 598, 2, 242, 124] +[:mouse_move, 722, 598, 2, 243, 124] +[:mouse_move, 692, 598, 2, 244, 124] +[:mouse_move, 668, 598, 2, 245, 124] +[:mouse_move, 648, 598, 2, 246, 125] +[:mouse_move, 624, 598, 2, 247, 125] +[:mouse_move, 615, 598, 2, 248, 125] +[:mouse_move, 610, 598, 2, 249, 125] +[:mouse_move, 609, 598, 2, 250, 125] +[:mouse_move, 607, 598, 2, 251, 125] +[:mouse_move, 606, 598, 2, 252, 125] +[:mouse_move, 604, 595, 2, 253, 127] +[:mouse_move, 598, 590, 2, 254, 128] +[:mouse_move, 592, 584, 2, 255, 128] +[:mouse_move, 588, 581, 2, 256, 129] +[:mouse_move, 588, 580, 2, 257, 129] +[:mouse_move, 587, 580, 2, 258, 129] +[:mouse_move, 586, 579, 2, 259, 130] +[:mouse_move, 585, 579, 2, 260, 130] +[:mouse_move, 584, 578, 2, 261, 131] +[:mouse_move, 584, 577, 2, 262, 131] +[:mouse_move, 584, 576, 2, 263, 132] +[:mouse_move, 583, 576, 2, 264, 133] +[:mouse_move, 584, 576, 2, 265, 135] +[:mouse_button_up, 1, 0, 1, 266, 147] +[:mouse_move, 585, 575, 2, 267, 153] +[:mouse_move, 585, 571, 2, 268, 196] +[:mouse_move, 585, 568, 2, 269, 197] +[:mouse_move, 586, 563, 2, 270, 197] +[:mouse_move, 587, 558, 2, 271, 197] +[:mouse_move, 587, 557, 2, 272, 198] +[:mouse_move, 587, 555, 2, 273, 199] +[:mouse_move, 588, 555, 2, 274, 200] +[:mouse_move, 588, 554, 2, 275, 200] +[:mouse_move, 588, 550, 2, 276, 235] +[:mouse_move, 594, 541, 2, 277, 236] +[:mouse_move, 605, 525, 2, 278, 236] +[:mouse_move, 622, 502, 2, 279, 236] +[:mouse_move, 654, 458, 2, 280, 237] +[:mouse_move, 672, 425, 2, 281, 237] +[:mouse_move, 682, 391, 2, 282, 238] +[:mouse_move, 688, 358, 2, 283, 239] +[:mouse_move, 692, 333, 2, 284, 239] +[:mouse_move, 694, 319, 2, 285, 239] +[:mouse_move, 697, 308, 2, 286, 240] +[:mouse_move, 698, 303, 2, 287, 240] +[:mouse_move, 700, 299, 2, 288, 241] +[:mouse_move, 702, 295, 2, 289, 241] +[:mouse_move, 703, 291, 2, 290, 242] +[:mouse_move, 704, 289, 2, 291, 242] +[:mouse_move, 705, 288, 2, 292, 243] +[:mouse_move, 706, 288, 2, 293, 245] +[:mouse_move, 706, 291, 2, 294, 246] +[:mouse_move, 706, 294, 2, 295, 246] +[:mouse_move, 706, 298, 2, 296, 247] +[:mouse_move, 706, 303, 2, 297, 247] +[:mouse_move, 707, 308, 2, 298, 247] +[:mouse_move, 709, 315, 2, 299, 248] +[:mouse_move, 710, 321, 2, 300, 248] +[:mouse_move, 711, 324, 2, 301, 249] +[:mouse_move, 711, 325, 2, 302, 249] +[:mouse_move, 712, 325, 2, 303, 250] +[:mouse_move, 713, 325, 2, 304, 252] +[:mouse_move, 713, 324, 2, 305, 252] +[:mouse_move, 714, 324, 2, 306, 253] +[:mouse_button_pressed, 1, 0, 1, 307, 254] +[:mouse_button_up, 1, 0, 1, 308, 255] +[:mouse_move, 714, 325, 2, 309, 263] +[:mouse_move, 714, 331, 2, 310, 263] +[:mouse_move, 714, 344, 2, 311, 264] +[:mouse_move, 714, 365, 2, 312, 264] +[:mouse_move, 710, 394, 2, 313, 264] +[:mouse_move, 696, 432, 2, 314, 265] +[:mouse_move, 678, 472, 2, 315, 265] +[:mouse_move, 654, 506, 2, 316, 266] +[:mouse_move, 637, 532, 2, 317, 267] +[:mouse_move, 624, 549, 2, 318, 267] +[:mouse_move, 615, 559, 2, 319, 267] +[:mouse_move, 612, 562, 2, 320, 268] +[:mouse_move, 609, 563, 2, 321, 268] +[:mouse_move, 608, 564, 2, 322, 269] +[:mouse_move, 606, 566, 2, 323, 269] +[:mouse_move, 606, 568, 2, 324, 270] +[:mouse_move, 606, 572, 2, 325, 270] +[:mouse_move, 606, 573, 2, 326, 271] +[:mouse_move, 606, 574, 2, 327, 271] +[:mouse_move, 605, 573, 2, 328, 273] +[:mouse_move, 606, 571, 2, 329, 273] +[:mouse_move, 606, 566, 2, 330, 274] +[:mouse_move, 606, 565, 2, 331, 274] +[:mouse_move, 605, 565, 2, 332, 275] +[:mouse_move, 601, 565, 2, 333, 275] +[:mouse_move, 593, 565, 2, 334, 276] +[:mouse_move, 583, 565, 2, 335, 276] +[:mouse_move, 573, 567, 2, 336, 277] +[:mouse_move, 570, 567, 2, 337, 278] +[:mouse_move, 569, 567, 2, 338, 278] +[:mouse_move, 570, 568, 2, 339, 284] +[:mouse_move, 572, 568, 2, 340, 284] +[:mouse_move, 573, 568, 2, 341, 286] +[:mouse_button_pressed, 1, 0, 1, 342, 290] +[:mouse_move, 574, 568, 2, 343, 290] +[:mouse_move, 576, 568, 2, 344, 291] +[:mouse_move, 586, 564, 2, 345, 292] +[:mouse_move, 601, 560, 2, 346, 292] +[:mouse_move, 622, 552, 2, 347, 292] +[:mouse_move, 648, 544, 2, 348, 293] +[:mouse_move, 675, 537, 2, 349, 293] +[:mouse_move, 702, 533, 2, 350, 293] +[:mouse_move, 726, 530, 2, 351, 293] +[:mouse_move, 747, 526, 2, 352, 293] +[:mouse_move, 771, 518, 2, 353, 293] +[:mouse_move, 786, 514, 2, 354, 293] +[:mouse_move, 802, 511, 2, 355, 294] +[:mouse_move, 815, 508, 2, 356, 294] +[:mouse_move, 827, 505, 2, 357, 294] +[:mouse_move, 833, 504, 2, 358, 294] +[:mouse_move, 835, 503, 2, 359, 294] +[:mouse_move, 832, 503, 2, 360, 294] +[:mouse_move, 830, 504, 2, 361, 294] +[:mouse_move, 826, 506, 2, 362, 294] +[:mouse_move, 822, 508, 2, 363, 294] +[:mouse_move, 818, 511, 2, 364, 294] +[:mouse_move, 816, 511, 2, 365, 294] +[:mouse_move, 813, 513, 2, 366, 294] +[:mouse_move, 813, 514, 2, 367, 294] +[:mouse_move, 812, 515, 2, 368, 294] +[:mouse_move, 812, 516, 2, 369, 294] +[:mouse_move, 812, 517, 2, 370, 294] +[:mouse_move, 813, 518, 2, 371, 295] +[:mouse_move, 814, 518, 2, 372, 295] +[:mouse_move, 815, 518, 2, 373, 295] +[:mouse_move, 816, 518, 2, 374, 295] +[:mouse_move, 817, 518, 2, 375, 295] +[:mouse_button_up, 1, 0, 1, 376, 302] +[:mouse_move, 817, 517, 2, 377, 313] +[:key_down_raw, 96, 0, 2, 378, 320] +[:key_up_raw, 96, 0, 2, 379, 321] +[:mouse_move, 817, 518, 2, 380, 323] +[:mouse_move, 819, 515, 2, 381, 324] +[:mouse_move, 819, 510, 2, 382, 324] +[:mouse_move, 811, 498, 2, 383, 324] +[:mouse_move, 797, 486, 2, 384, 324] +[:mouse_move, 786, 482, 2, 385, 324] +[:mouse_move, 780, 479, 2, 386, 324] +[:mouse_move, 779, 478, 2, 387, 324] +[:mouse_move, 778, 479, 2, 388, 327] +[:mouse_move, 779, 484, 2, 389, 327] +[:mouse_move, 780, 487, 2, 390, 327] +[:mouse_move, 781, 488, 2, 391, 327] +[:mouse_move, 782, 488, 2, 392, 327] +[:mouse_move, 782, 487, 2, 393, 328] +[:mouse_move, 789, 485, 2, 394, 328] +[:mouse_move, 800, 481, 2, 395, 328] +[:mouse_move, 816, 472, 2, 396, 328] +[:mouse_move, 839, 456, 2, 397, 328] +[:mouse_move, 870, 434, 2, 398, 329] +[:mouse_move, 904, 409, 2, 399, 329] +[:mouse_move, 944, 380, 2, 400, 329] +[:mouse_move, 996, 331, 2, 401, 329] +[:mouse_move, 1011, 312, 2, 402, 329] +[:mouse_move, 1042, 278, 2, 403, 329] +[:mouse_move, 1081, 231, 2, 404, 329] +[:mouse_move, 1101, 213, 2, 405, 330] +[:mouse_move, 1114, 202, 2, 406, 330] +[:mouse_move, 1118, 196, 2, 407, 330] +[:mouse_move, 1118, 195, 2, 408, 330] +[:mouse_move, 1117, 194, 2, 409, 331] +[:mouse_move, 1115, 194, 2, 410, 331] +[:mouse_move, 1110, 193, 2, 411, 331] +[:mouse_move, 1102, 189, 2, 412, 331] +[:mouse_move, 1084, 184, 2, 413, 331] +[:mouse_move, 1052, 175, 2, 414, 332] +[:mouse_move, 1005, 162, 2, 415, 332] +[:mouse_move, 938, 144, 2, 416, 332] +[:mouse_move, 892, 138, 2, 417, 332] +[:mouse_move, 860, 134, 2, 418, 332] +[:mouse_move, 833, 128, 2, 419, 333] +[:mouse_move, 809, 120, 2, 420, 333] +[:mouse_move, 782, 108, 2, 421, 333] +[:mouse_move, 772, 104, 2, 422, 333] +[:mouse_move, 770, 103, 2, 423, 333] +[:mouse_move, 769, 103, 2, 424, 333] +[:mouse_move, 766, 101, 2, 425, 334] +[:mouse_move, 764, 100, 2, 426, 334] +[:mouse_move, 763, 100, 2, 427, 334] +[:mouse_move, 761, 99, 2, 428, 334] +[:mouse_move, 760, 98, 2, 429, 334] +[:key_down_raw, 13, 0, 2, 430, 341] diff --git a/samples/99_genre_3d/02_wireframe/replay.txt b/samples/99_genre_3d/02_wireframe/replay.txt new file mode 100644 index 0000000..2786904 --- /dev/null +++ b/samples/99_genre_3d/02_wireframe/replay.txt @@ -0,0 +1,242 @@ +replay_version 2.0 +stopped_at 706 +seed 100 +recorded_at 2021-11-20 11:26:04 -0600 +[:mouse_button_up, 1, 0, 1, 1, 4] +[:key_down_raw, 1073741906, 0, 2, 2, 63] +[:key_down_raw, 1073741906, 0, 2, 3, 77] +[:key_down_raw, 1073741906, 0, 2, 4, 79] +[:key_down_raw, 1073741906, 0, 2, 5, 81] +[:key_down_raw, 1073741906, 0, 2, 6, 84] +[:key_down_raw, 1073741906, 0, 2, 7, 85] +[:key_down_raw, 1073741906, 0, 2, 8, 87] +[:key_down_raw, 1073741906, 0, 2, 9, 90] +[:key_down_raw, 1073741906, 0, 2, 10, 92] +[:key_down_raw, 1073741906, 0, 2, 11, 94] +[:key_down_raw, 1073741906, 0, 2, 12, 96] +[:key_down_raw, 1073741906, 0, 2, 13, 98] +[:key_down_raw, 1073741906, 0, 2, 14, 100] +[:key_down_raw, 1073741906, 0, 2, 15, 102] +[:key_up_raw, 1073741906, 0, 2, 16, 103] +[:key_down_raw, 1073741905, 0, 2, 17, 110] +[:key_down_raw, 1073741905, 0, 2, 18, 125] +[:key_down_raw, 1073741905, 0, 2, 19, 127] +[:key_down_raw, 1073741905, 0, 2, 20, 129] +[:key_down_raw, 1073741905, 0, 2, 21, 131] +[:key_down_raw, 1073741905, 0, 2, 22, 133] +[:key_down_raw, 1073741905, 0, 2, 23, 135] +[:key_down_raw, 1073741905, 0, 2, 24, 137] +[:key_down_raw, 1073741905, 0, 2, 25, 139] +[:key_down_raw, 1073741905, 0, 2, 26, 141] +[:key_down_raw, 1073741905, 0, 2, 27, 143] +[:key_down_raw, 1073741905, 0, 2, 28, 145] +[:key_down_raw, 1073741905, 0, 2, 29, 147] +[:key_down_raw, 1073741905, 0, 2, 30, 149] +[:key_down_raw, 1073741905, 0, 2, 31, 151] +[:key_down_raw, 1073741905, 0, 2, 32, 153] +[:key_down_raw, 1073741905, 0, 2, 33, 155] +[:key_down_raw, 1073741905, 0, 2, 34, 157] +[:key_down_raw, 1073741905, 0, 2, 35, 159] +[:key_down_raw, 1073741905, 0, 2, 36, 161] +[:key_down_raw, 1073741905, 0, 2, 37, 163] +[:key_down_raw, 1073741905, 0, 2, 38, 165] +[:key_down_raw, 1073741905, 0, 2, 39, 167] +[:key_down_raw, 1073741905, 0, 2, 40, 169] +[:key_down_raw, 1073741905, 0, 2, 41, 171] +[:key_up_raw, 1073741905, 0, 2, 42, 171] +[:key_down_raw, 1073741904, 0, 2, 43, 175] +[:key_down_raw, 1073741904, 0, 2, 44, 190] +[:key_down_raw, 1073741904, 0, 2, 45, 192] +[:key_down_raw, 1073741904, 0, 2, 46, 194] +[:key_down_raw, 1073741904, 0, 2, 47, 196] +[:key_down_raw, 1073741904, 0, 2, 48, 198] +[:key_down_raw, 1073741904, 0, 2, 49, 200] +[:key_down_raw, 1073741904, 0, 2, 50, 202] +[:key_down_raw, 1073741904, 0, 2, 51, 204] +[:key_down_raw, 1073741904, 0, 2, 52, 206] +[:key_down_raw, 1073741904, 0, 2, 53, 208] +[:key_down_raw, 1073741904, 0, 2, 54, 210] +[:key_down_raw, 1073741904, 0, 2, 55, 212] +[:key_down_raw, 1073741903, 0, 2, 56, 214] +[:key_down_raw, 1073741903, 0, 2, 57, 229] +[:key_down_raw, 1073741903, 0, 2, 58, 231] +[:key_down_raw, 1073741903, 0, 2, 59, 233] +[:key_down_raw, 1073741906, 0, 2, 60, 234] +[:key_up_raw, 1073741904, 0, 2, 61, 238] +[:key_down_raw, 1073741906, 0, 2, 62, 249] +[:key_down_raw, 1073741906, 0, 2, 63, 251] +[:key_down_raw, 1073741906, 0, 2, 64, 253] +[:key_down_raw, 1073741906, 0, 2, 65, 255] +[:key_down_raw, 1073741906, 0, 2, 66, 257] +[:key_down_raw, 1073741906, 0, 2, 67, 259] +[:key_down_raw, 1073741906, 0, 2, 68, 261] +[:key_down_raw, 1073741906, 0, 2, 69, 263] +[:key_down_raw, 1073741906, 0, 2, 70, 265] +[:key_down_raw, 1073741906, 0, 2, 71, 267] +[:key_down_raw, 1073741906, 0, 2, 72, 269] +[:key_down_raw, 1073741906, 0, 2, 73, 271] +[:key_down_raw, 1073741906, 0, 2, 74, 273] +[:key_down_raw, 1073741906, 0, 2, 75, 275] +[:key_down_raw, 1073741906, 0, 2, 76, 277] +[:key_down_raw, 1073741906, 0, 2, 77, 279] +[:key_down_raw, 1073741906, 0, 2, 78, 281] +[:key_down_raw, 1073741906, 0, 2, 79, 283] +[:key_down_raw, 1073741906, 0, 2, 80, 285] +[:key_down_raw, 1073741906, 0, 2, 81, 287] +[:key_down_raw, 1073741906, 0, 2, 82, 289] +[:key_down_raw, 1073741906, 0, 2, 83, 291] +[:key_down_raw, 1073741906, 0, 2, 84, 293] +[:key_down_raw, 1073741906, 0, 2, 85, 295] +[:key_down_raw, 1073741906, 0, 2, 86, 297] +[:key_down_raw, 1073741906, 0, 2, 87, 299] +[:key_down_raw, 1073741906, 0, 2, 88, 301] +[:key_down_raw, 1073741905, 0, 2, 89, 301] +[:key_up_raw, 1073741906, 0, 2, 90, 310] +[:key_up_raw, 1073741903, 0, 2, 91, 310] +[:key_down_raw, 1073741904, 0, 2, 92, 316] +[:key_down_raw, 1073741904, 0, 2, 93, 331] +[:key_down_raw, 1073741904, 0, 2, 94, 333] +[:key_down_raw, 1073741904, 0, 2, 95, 335] +[:key_down_raw, 1073741904, 0, 2, 96, 337] +[:key_down_raw, 1073741904, 0, 2, 97, 339] +[:key_down_raw, 1073741904, 0, 2, 98, 341] +[:key_down_raw, 1073741904, 0, 2, 99, 343] +[:key_down_raw, 1073741904, 0, 2, 100, 345] +[:key_down_raw, 1073741904, 0, 2, 101, 347] +[:key_down_raw, 1073741904, 0, 2, 102, 349] +[:key_down_raw, 1073741904, 0, 2, 103, 351] +[:key_down_raw, 1073741904, 0, 2, 104, 353] +[:key_down_raw, 1073741904, 0, 2, 105, 355] +[:key_down_raw, 1073741904, 0, 2, 106, 357] +[:key_down_raw, 1073741904, 0, 2, 107, 359] +[:key_down_raw, 1073741904, 0, 2, 108, 361] +[:key_up_raw, 1073741905, 0, 2, 109, 363] +[:key_down_raw, 1073741904, 0, 2, 110, 363] +[:key_down_raw, 1073741904, 0, 2, 111, 365] +[:key_down_raw, 1073741904, 0, 2, 112, 367] +[:key_down_raw, 1073741904, 0, 2, 113, 369] +[:key_down_raw, 1073741904, 0, 2, 114, 371] +[:key_down_raw, 1073741904, 0, 2, 115, 373] +[:key_down_raw, 1073741904, 0, 2, 116, 375] +[:key_down_raw, 1073741904, 0, 2, 117, 377] +[:key_down_raw, 1073741904, 0, 2, 118, 379] +[:key_down_raw, 1073741904, 0, 2, 119, 381] +[:key_down_raw, 1073741904, 0, 2, 120, 383] +[:key_down_raw, 1073741904, 0, 2, 121, 385] +[:key_down_raw, 1073741904, 0, 2, 122, 387] +[:key_down_raw, 1073741904, 0, 2, 123, 389] +[:key_down_raw, 1073741904, 0, 2, 124, 391] +[:key_down_raw, 1073741904, 0, 2, 125, 393] +[:key_down_raw, 1073741904, 0, 2, 126, 395] +[:key_down_raw, 1073741904, 0, 2, 127, 397] +[:key_up_raw, 1073741904, 0, 2, 128, 399] +[:key_down_raw, 1073741903, 0, 2, 129, 400] +[:key_down_raw, 1073741903, 0, 2, 130, 415] +[:key_down_raw, 1073741903, 0, 2, 131, 417] +[:key_down_raw, 1073741903, 0, 2, 132, 419] +[:key_down_raw, 1073741903, 0, 2, 133, 421] +[:key_down_raw, 1073741903, 0, 2, 134, 423] +[:key_down_raw, 1073741903, 0, 2, 135, 425] +[:key_down_raw, 1073741903, 0, 2, 136, 427] +[:key_down_raw, 1073741903, 0, 2, 137, 429] +[:key_down_raw, 1073741903, 0, 2, 138, 431] +[:key_down_raw, 1073741903, 0, 2, 139, 433] +[:key_down_raw, 1073741903, 0, 2, 140, 435] +[:key_down_raw, 1073741903, 0, 2, 141, 437] +[:key_down_raw, 1073741903, 0, 2, 142, 439] +[:key_down_raw, 1073741903, 0, 2, 143, 441] +[:key_down_raw, 1073741903, 0, 2, 144, 443] +[:key_down_raw, 1073741903, 0, 2, 145, 445] +[:key_down_raw, 1073741903, 0, 2, 146, 447] +[:key_down_raw, 1073741903, 0, 2, 147, 449] +[:key_down_raw, 1073741903, 0, 2, 148, 451] +[:key_down_raw, 1073741903, 0, 2, 149, 453] +[:key_down_raw, 1073741903, 0, 2, 150, 455] +[:key_down_raw, 1073741903, 0, 2, 151, 457] +[:key_down_raw, 1073741903, 0, 2, 152, 459] +[:key_down_raw, 1073741903, 0, 2, 153, 461] +[:key_down_raw, 1073741903, 0, 2, 154, 463] +[:key_down_raw, 1073741903, 0, 2, 155, 465] +[:key_down_raw, 1073741903, 0, 2, 156, 467] +[:key_down_raw, 1073741903, 0, 2, 157, 469] +[:key_down_raw, 1073741903, 0, 2, 158, 471] +[:key_down_raw, 1073741903, 0, 2, 159, 473] +[:key_down_raw, 1073741903, 0, 2, 160, 475] +[:key_down_raw, 1073741903, 0, 2, 161, 477] +[:key_down_raw, 1073741903, 0, 2, 162, 479] +[:key_down_raw, 1073741903, 0, 2, 163, 481] +[:key_down_raw, 1073741903, 0, 2, 164, 483] +[:key_down_raw, 1073741903, 0, 2, 165, 485] +[:key_down_raw, 1073741903, 0, 2, 166, 487] +[:key_down_raw, 1073741903, 0, 2, 167, 489] +[:key_down_raw, 1073741903, 0, 2, 168, 491] +[:key_down_raw, 1073741903, 0, 2, 169, 493] +[:key_down_raw, 1073741903, 0, 2, 170, 495] +[:key_down_raw, 1073741903, 0, 2, 171, 497] +[:key_down_raw, 1073741905, 0, 2, 172, 498] +[:key_down_raw, 1073741905, 0, 2, 173, 513] +[:key_down_raw, 1073741905, 0, 2, 174, 515] +[:key_down_raw, 1073741905, 0, 2, 175, 517] +[:key_down_raw, 1073741905, 0, 2, 176, 519] +[:key_down_raw, 1073741905, 0, 2, 177, 521] +[:key_down_raw, 1073741905, 0, 2, 178, 523] +[:key_down_raw, 1073741905, 0, 2, 179, 525] +[:key_down_raw, 1073741905, 0, 2, 180, 527] +[:key_down_raw, 1073741905, 0, 2, 181, 529] +[:key_down_raw, 1073741905, 0, 2, 182, 531] +[:key_down_raw, 1073741905, 0, 2, 183, 533] +[:key_down_raw, 1073741905, 0, 2, 184, 535] +[:key_down_raw, 1073741905, 0, 2, 185, 537] +[:key_down_raw, 1073741905, 0, 2, 186, 539] +[:key_down_raw, 1073741905, 0, 2, 187, 541] +[:key_down_raw, 1073741905, 0, 2, 188, 543] +[:key_up_raw, 1073741905, 0, 2, 189, 543] +[:key_up_raw, 1073741903, 0, 2, 190, 544] +[:key_down_raw, 1073741906, 0, 2, 191, 547] +[:key_down_raw, 1073741906, 0, 2, 192, 562] +[:key_down_raw, 1073741906, 0, 2, 193, 564] +[:key_down_raw, 1073741906, 0, 2, 194, 566] +[:key_down_raw, 1073741906, 0, 2, 195, 568] +[:key_down_raw, 1073741906, 0, 2, 196, 570] +[:key_down_raw, 1073741906, 0, 2, 197, 572] +[:key_down_raw, 1073741906, 0, 2, 198, 574] +[:key_down_raw, 1073741906, 0, 2, 199, 576] +[:key_down_raw, 1073741906, 0, 2, 200, 578] +[:key_down_raw, 1073741906, 0, 2, 201, 580] +[:key_down_raw, 1073741906, 0, 2, 202, 582] +[:key_down_raw, 1073741906, 0, 2, 203, 584] +[:key_down_raw, 1073741906, 0, 2, 204, 586] +[:key_down_raw, 1073741906, 0, 2, 205, 588] +[:key_down_raw, 1073741906, 0, 2, 206, 590] +[:key_down_raw, 1073741906, 0, 2, 207, 592] +[:key_down_raw, 1073741906, 0, 2, 208, 594] +[:key_down_raw, 1073741906, 0, 2, 209, 596] +[:key_down_raw, 1073741906, 0, 2, 210, 598] +[:key_down_raw, 1073741906, 0, 2, 211, 600] +[:key_down_raw, 1073741906, 0, 2, 212, 602] +[:key_down_raw, 1073741906, 0, 2, 213, 604] +[:key_down_raw, 1073741906, 0, 2, 214, 606] +[:key_down_raw, 1073741906, 0, 2, 215, 608] +[:key_down_raw, 1073741906, 0, 2, 216, 610] +[:key_down_raw, 1073741906, 0, 2, 217, 612] +[:key_down_raw, 1073741906, 0, 2, 218, 614] +[:key_down_raw, 1073741906, 0, 2, 219, 616] +[:key_down_raw, 1073741906, 0, 2, 220, 618] +[:key_down_raw, 1073741906, 0, 2, 221, 620] +[:key_down_raw, 1073741906, 0, 2, 222, 622] +[:key_down_raw, 1073741906, 0, 2, 223, 624] +[:key_down_raw, 1073741906, 0, 2, 224, 626] +[:key_down_raw, 1073741906, 0, 2, 225, 628] +[:key_down_raw, 1073741906, 0, 2, 226, 630] +[:key_down_raw, 1073741906, 0, 2, 227, 632] +[:key_down_raw, 1073741906, 0, 2, 228, 634] +[:key_up_raw, 1073741906, 0, 2, 229, 634] +[:key_down_raw, 96, 0, 2, 230, 648] +[:key_up_raw, 96, 0, 2, 231, 652] +[:mouse_move, 800, 84, 2, 232, 674] +[:mouse_move, 782, 88, 2, 233, 675] +[:mouse_move, 764, 94, 2, 234, 676] +[:mouse_move, 760, 94, 2, 235, 677] +[:mouse_move, 761, 94, 2, 236, 679] +[:mouse_move, 762, 93, 2, 237, 680] +[:key_down_raw, 13, 0, 2, 238, 706] diff --git a/samples/99_genre_3d/03_yaw_pitch_roll/app/main.rb b/samples/99_genre_3d/03_yaw_pitch_roll/app/main.rb new file mode 100644 index 0000000..52b5962 --- /dev/null +++ b/samples/99_genre_3d/03_yaw_pitch_roll/app/main.rb @@ -0,0 +1,351 @@ +class Game + attr_gtk + + def tick + defaults + render + input + end + + def matrix_mul m, v + (hmap x: ((m.x.x * v.x) + (m.x.y * v.y) + (m.x.z * v.z) + (m.x.w * v.w)), + y: ((m.y.x * v.x) + (m.y.y * v.y) + (m.y.z * v.z) + (m.y.w * v.w)), + z: ((m.z.x * v.x) + (m.z.y * v.y) + (m.z.z * v.z) + (m.z.w * v.w)), + w: ((m.w.x * v.x) + (m.w.y * v.y) + (m.w.z * v.z) + (m.w.w * v.w))) + end + + def player_ship + [ + # engine back + { x: -1, y: -1, z: 1, w: 0 }, + { x: -1, y: 1, z: 1, w: 0 }, + + { x: -1, y: 1, z: 1, w: 0 }, + { x: 1, y: 1, z: 1, w: 0 }, + + { x: 1, y: 1, z: 1, w: 0 }, + { x: 1, y: -1, z: 1, w: 0 }, + + { x: 1, y: -1, z: 1, w: 0 }, + { x: -1, y: -1, z: 1, w: 0 }, + + # engine front + { x: -1, y: -1, z: -1, w: 0 }, + { x: -1, y: 1, z: -1, w: 0 }, + + { x: -1, y: 1, z: -1, w: 0 }, + { x: 1, y: 1, z: -1, w: 0 }, + + { x: 1, y: 1, z: -1, w: 0 }, + { x: 1, y: -1, z: -1, w: 0 }, + + { x: 1, y: -1, z: -1, w: 0 }, + { x: -1, y: -1, z: -1, w: 0 }, + + # engine left + { x: -1, z: -1, y: -1, w: 0 }, + { x: -1, z: -1, y: 1, w: 0 }, + + { x: -1, z: -1, y: 1, w: 0 }, + { x: -1, z: 1, y: 1, w: 0 }, + + { x: -1, z: 1, y: 1, w: 0 }, + { x: -1, z: 1, y: -1, w: 0 }, + + { x: -1, z: 1, y: -1, w: 0 }, + { x: -1, z: -1, y: -1, w: 0 }, + + # engine right + { x: 1, z: -1, y: -1, w: 0 }, + { x: 1, z: -1, y: 1, w: 0 }, + + { x: 1, z: -1, y: 1, w: 0 }, + { x: 1, z: 1, y: 1, w: 0 }, + + { x: 1, z: 1, y: 1, w: 0 }, + { x: 1, z: 1, y: -1, w: 0 }, + + { x: 1, z: 1, y: -1, w: 0 }, + { x: 1, z: -1, y: -1, w: 0 }, + + # top front of engine to front of ship + { x: 1, y: 1, z: 1, w: 0 }, + { x: 0, y: -1, z: 9, w: 0 }, + + { x: 0, y: -1, z: 9, w: 0 }, + { x: -1, y: 1, z: 1, w: 0 }, + + # bottom front of engine + { x: 1, y: -1, z: 1, w: 0 }, + { x: 0, y: -1, z: 9, w: 0 }, + + { x: -1, y: -1, z: 1, w: 0 }, + { x: 0, y: -1, z: 9, w: 0 }, + + # right wing + # front of wing + { x: 1, y: 0.10, z: 1, w: 0 }, + { x: 9, y: 0.10, z: -1, w: 0 }, + + { x: 9, y: 0.10, z: -1, w: 0 }, + { x: 10, y: 0.10, z: -2, w: 0 }, + + # back of wing + { x: 1, y: 0.10, z: -1, w: 0 }, + { x: 9, y: 0.10, z: -1, w: 0 }, + + { x: 10, y: 0.10, z: -2, w: 0 }, + { x: 8, y: 0.10, z: -1, w: 0 }, + + # front of wing + { x: 1, y: -0.10, z: 1, w: 0 }, + { x: 9, y: -0.10, z: -1, w: 0 }, + + { x: 9, y: -0.10, z: -1, w: 0 }, + { x: 10, y: -0.10, z: -2, w: 0 }, + + # back of wing + { x: 1, y: -0.10, z: -1, w: 0 }, + { x: 9, y: -0.10, z: -1, w: 0 }, + + { x: 10, y: -0.10, z: -2, w: 0 }, + { x: 8, y: -0.10, z: -1, w: 0 }, + + # left wing + # front of wing + { x: -1, y: 0.10, z: 1, w: 0 }, + { x: -9, y: 0.10, z: -1, w: 0 }, + + { x: -9, y: 0.10, z: -1, w: 0 }, + { x: -10, y: 0.10, z: -2, w: 0 }, + + # back of wing + { x: -1, y: 0.10, z: -1, w: 0 }, + { x: -9, y: 0.10, z: -1, w: 0 }, + + { x: -10, y: 0.10, z: -2, w: 0 }, + { x: -8, y: 0.10, z: -1, w: 0 }, + + # front of wing + { x: -1, y: -0.10, z: 1, w: 0 }, + { x: -9, y: -0.10, z: -1, w: 0 }, + + { x: -9, y: -0.10, z: -1, w: 0 }, + { x: -10, y: -0.10, z: -2, w: 0 }, + + # back of wing + { x: -1, y: -0.10, z: -1, w: 0 }, + { x: -9, y: -0.10, z: -1, w: 0 }, + + { x: -10, y: -0.10, z: -2, w: 0 }, + { x: -8, y: -0.10, z: -1, w: 0 }, + + # left fin + # top + { x: -1, y: 0.10, z: 1, w: 0 }, + { x: -1, y: 3, z: -3, w: 0 }, + + { x: -1, y: 0.10, z: -1, w: 0 }, + { x: -1, y: 3, z: -3, w: 0 }, + + { x: -1.1, y: 0.10, z: 1, w: 0 }, + { x: -1.1, y: 3, z: -3, w: 0 }, + + { x: -1.1, y: 0.10, z: -1, w: 0 }, + { x: -1.1, y: 3, z: -3, w: 0 }, + + # bottom + { x: -1, y: -0.10, z: 1, w: 0 }, + { x: -1, y: -2, z: -2, w: 0 }, + + { x: -1, y: -0.10, z: -1, w: 0 }, + { x: -1, y: -2, z: -2, w: 0 }, + + { x: -1.1, y: -0.10, z: 1, w: 0 }, + { x: -1.1, y: -2, z: -2, w: 0 }, + + { x: -1.1, y: -0.10, z: -1, w: 0 }, + { x: -1.1, y: -2, z: -2, w: 0 }, + + # right fin + { x: 1, y: 0.10, z: 1, w: 0 }, + { x: 1, y: 3, z: -3, w: 0 }, + + { x: 1, y: 0.10, z: -1, w: 0 }, + { x: 1, y: 3, z: -3, w: 0 }, + + { x: 1.1, y: 0.10, z: 1, w: 0 }, + { x: 1.1, y: 3, z: -3, w: 0 }, + + { x: 1.1, y: 0.10, z: -1, w: 0 }, + { x: 1.1, y: 3, z: -3, w: 0 }, + + # bottom + { x: 1, y: -0.10, z: 1, w: 0 }, + { x: 1, y: -2, z: -2, w: 0 }, + + { x: 1, y: -0.10, z: -1, w: 0 }, + { x: 1, y: -2, z: -2, w: 0 }, + + { x: 1.1, y: -0.10, z: 1, w: 0 }, + { x: 1.1, y: -2, z: -2, w: 0 }, + + { x: 1.1, y: -0.10, z: -1, w: 0 }, + { x: 1.1, y: -2, z: -2, w: 0 }, + ] + end + + def defaults + state.points ||= player_ship + state.shifted_points ||= state.points.map { |point| point } + + state.scale ||= 1 + state.angle_x ||= 0 + state.angle_y ||= 0 + state.angle_z ||= 0 + end + + def matrix_new x0, y0, z0, w0, x1, y1, z1, w1, x2, y2, z2, w2, x3, y3, z3, w3 + (hmap x: (hmap x: x0, y: y0, z: z0, w: w0), + y: (hmap x: x1, y: y1, z: z1, w: w1), + z: (hmap x: x2, y: y2, z: z2, w: w2), + w: (hmap x: x3, y: y3, z: z3, w: w3)) + end + + def angle_z_matrix degrees + cos_t = Math.cos degrees.to_radians + sin_t = Math.sin degrees.to_radians + (matrix_new cos_t, -sin_t, 0, 0, + sin_t, cos_t, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1) + end + + def angle_y_matrix degrees + cos_t = Math.cos degrees.to_radians + sin_t = Math.sin degrees.to_radians + (matrix_new cos_t, 0, sin_t, 0, + 0, 1, 0, 0, + -sin_t, 0, cos_t, 0, + 0, 0, 0, 1) + end + + def angle_x_matrix degrees + cos_t = Math.cos degrees.to_radians + sin_t = Math.sin degrees.to_radians + (matrix_new 1, 0, 0, 0, + 0, cos_t, -sin_t, 0, + 0, sin_t, cos_t, 0, + 0, 0, 0, 1) + end + + def scale_matrix factor + (matrix_new factor, 0, 0, 0, + 0, factor, 0, 0, + 0, 0, factor, 0, + 0, 0, 0, 1) + end + + def input + if (inputs.keyboard.shift && inputs.keyboard.p) + state.scale -= 0.1 + elsif inputs.keyboard.p + state.scale += 0.1 + end + + if inputs.mouse.wheel + state.scale += inputs.mouse.wheel.y + end + + state.scale = state.scale.clamp(0.1, 1000) + + if (inputs.keyboard.shift && inputs.keyboard.y) || inputs.keyboard.right + state.angle_y += 1 + elsif (inputs.keyboard.y) || inputs.keyboard.left + state.angle_y -= 1 + end + + if (inputs.keyboard.shift && inputs.keyboard.x) || inputs.keyboard.down + state.angle_x -= 1 + elsif (inputs.keyboard.x || inputs.keyboard.up) + state.angle_x += 1 + end + + if inputs.keyboard.shift && inputs.keyboard.z + state.angle_z += 1 + elsif inputs.keyboard.z + state.angle_z -= 1 + end + + if inputs.keyboard.zero + state.angle_x = 0 + state.angle_y = 0 + state.angle_z = 0 + end + + angle_x = state.angle_x + angle_y = state.angle_y + angle_z = state.angle_z + scale = state.scale + + s_matrix = scale_matrix state.scale + x_matrix = angle_z_matrix angle_z + y_matrix = angle_y_matrix angle_y + z_matrix = angle_x_matrix angle_x + + state.shifted_points = state.points.map do |point| + (matrix_mul s_matrix, + (matrix_mul z_matrix, + (matrix_mul x_matrix, + (matrix_mul y_matrix, point)))).merge(original: point) + end + end + + def thick_line line + [ + line.merge(y: line.y - 1, y2: line.y2 - 1, r: 0, g: 0, b: 0), + line.merge(x: line.x - 1, x2: line.x2 - 1, r: 0, g: 0, b: 0), + line.merge(x: line.x - 0, x2: line.x2 - 0, r: 0, g: 0, b: 0), + line.merge(y: line.y + 1, y2: line.y2 + 1, r: 0, g: 0, b: 0), + line.merge(x: line.x + 1, x2: line.x2 + 1, r: 0, g: 0, b: 0) + ] + end + + def render + outputs.lines << state.shifted_points.each_slice(2).map do |(p1, p2)| + perc = 0 + thick_line({ x: p1.x.*(10) + 640, y: p1.y.*(10) + 320, + x2: p2.x.*(10) + 640, y2: p2.y.*(10) + 320, + r: 255 * perc, + g: 255 * perc, + b: 255 * perc }) + end + + outputs.labels << [ 10, 700, "angle_x: #{state.angle_x.to_sf}", 0] + outputs.labels << [ 10, 670, "x, shift+x", 0] + + outputs.labels << [210, 700, "angle_y: #{state.angle_y.to_sf}", 0] + outputs.labels << [210, 670, "y, shift+y", 0] + + outputs.labels << [410, 700, "angle_z: #{state.angle_z.to_sf}", 0] + outputs.labels << [410, 670, "z, shift+z", 0] + + outputs.labels << [610, 700, "scale: #{state.scale.to_sf}", 0] + outputs.labels << [610, 670, "p, shift+p", 0] + end +end + +$game = Game.new + +def tick args + $game.args = args + $game.tick +end + +def set_angles x, y, z + $game.state.angle_x = x + $game.state.angle_y = y + $game.state.angle_z = z +end + +$gtk.reset diff --git a/samples/99_genre_3d/03_yaw_pitch_roll/replay.txt b/samples/99_genre_3d/03_yaw_pitch_roll/replay.txt new file mode 100644 index 0000000..918fc9e --- /dev/null +++ b/samples/99_genre_3d/03_yaw_pitch_roll/replay.txt @@ -0,0 +1,361 @@ +replay_version 2.0 +stopped_at 493 +seed 100 +recorded_at 2021-10-18 16:32:03 -0500 +[:mouse_button_up, 1, 0, 1, 1, 1] +[:mouse_move, 813, 82, 2, 2, 9] +[:mouse_move, 813, 83, 2, 3, 17] +[:mouse_move, 812, 84, 2, 4, 17] +[:mouse_move, 809, 86, 2, 5, 17] +[:mouse_move, 803, 91, 2, 6, 18] +[:mouse_move, 795, 96, 2, 7, 18] +[:mouse_move, 792, 98, 2, 8, 19] +[:mouse_move, 791, 106, 2, 9, 19] +[:mouse_move, 791, 120, 2, 10, 19] +[:mouse_move, 791, 138, 2, 11, 20] +[:mouse_move, 794, 157, 2, 12, 20] +[:mouse_move, 795, 175, 2, 13, 21] +[:mouse_move, 795, 193, 2, 14, 21] +[:mouse_move, 795, 211, 2, 15, 21] +[:mouse_move, 795, 225, 2, 16, 22] +[:mouse_move, 795, 233, 2, 17, 22] +[:mouse_move, 795, 236, 2, 18, 23] +[:mouse_move, 795, 237, 2, 19, 23] +[:mouse_move, 795, 238, 2, 20, 24] +[:mouse_move, 795, 239, 2, 21, 24] +[:mouse_move, 795, 240, 2, 22, 25] +[:mouse_move, 794, 241, 2, 23, 26] +[:mouse_button_pressed, 1, 0, 1, 24, 29] +[:mouse_button_up, 1, 0, 1, 25, 31] +[:key_down_raw, 120, 0, 2, 26, 49] +[:key_down_raw, 120, 0, 2, 27, 55] +[:key_down_raw, 120, 0, 2, 28, 56] +[:key_down_raw, 120, 0, 2, 29, 56] +[:key_down_raw, 120, 0, 2, 30, 57] +[:key_down_raw, 120, 0, 2, 31, 58] +[:key_down_raw, 120, 0, 2, 32, 59] +[:key_down_raw, 120, 0, 2, 33, 60] +[:key_down_raw, 120, 0, 2, 34, 60] +[:key_down_raw, 120, 0, 2, 35, 61] +[:key_down_raw, 120, 0, 2, 36, 62] +[:key_down_raw, 120, 0, 2, 37, 63] +[:key_down_raw, 120, 0, 2, 38, 64] +[:key_down_raw, 120, 0, 2, 39, 65] +[:key_down_raw, 120, 0, 2, 40, 66] +[:key_down_raw, 120, 0, 2, 41, 66] +[:key_down_raw, 120, 0, 2, 42, 67] +[:key_down_raw, 120, 0, 2, 43, 68] +[:key_down_raw, 120, 0, 2, 44, 69] +[:key_down_raw, 120, 0, 2, 45, 70] +[:key_down_raw, 120, 0, 2, 46, 70] +[:key_down_raw, 120, 0, 2, 47, 71] +[:key_down_raw, 120, 0, 2, 48, 72] +[:key_down_raw, 120, 0, 2, 49, 73] +[:key_down_raw, 120, 0, 2, 50, 74] +[:key_down_raw, 120, 0, 2, 51, 75] +[:key_up_raw, 120, 0, 2, 52, 75] +[:key_down_raw, 1073742053, 2, 2, 53, 81] +[:key_down_raw, 120, 2, 2, 54, 83] +[:key_down_raw, 120, 2, 2, 55, 89] +[:key_down_raw, 120, 2, 2, 56, 90] +[:key_down_raw, 120, 2, 2, 57, 91] +[:key_down_raw, 120, 2, 2, 58, 92] +[:key_down_raw, 120, 2, 2, 59, 93] +[:key_down_raw, 120, 2, 2, 60, 93] +[:key_down_raw, 120, 2, 2, 61, 94] +[:key_down_raw, 120, 2, 2, 62, 95] +[:key_down_raw, 120, 2, 2, 63, 96] +[:key_down_raw, 120, 2, 2, 64, 97] +[:key_down_raw, 120, 2, 2, 65, 97] +[:key_down_raw, 120, 2, 2, 66, 98] +[:key_down_raw, 120, 2, 2, 67, 99] +[:key_down_raw, 120, 2, 2, 68, 100] +[:key_down_raw, 120, 2, 2, 69, 101] +[:key_down_raw, 120, 2, 2, 70, 102] +[:key_down_raw, 120, 2, 2, 71, 102] +[:key_down_raw, 120, 2, 2, 72, 103] +[:key_down_raw, 120, 2, 2, 73, 104] +[:key_down_raw, 120, 2, 2, 74, 105] +[:key_down_raw, 120, 2, 2, 75, 106] +[:key_down_raw, 120, 2, 2, 76, 107] +[:key_down_raw, 120, 2, 2, 77, 107] +[:key_down_raw, 120, 2, 2, 78, 108] +[:key_down_raw, 120, 2, 2, 79, 109] +[:key_down_raw, 120, 2, 2, 80, 110] +[:key_down_raw, 120, 2, 2, 81, 111] +[:key_down_raw, 120, 2, 2, 82, 111] +[:key_down_raw, 120, 2, 2, 83, 112] +[:key_down_raw, 120, 2, 2, 84, 113] +[:key_down_raw, 120, 2, 2, 85, 114] +[:key_down_raw, 120, 2, 2, 86, 115] +[:key_down_raw, 120, 2, 2, 87, 116] +[:key_down_raw, 120, 2, 2, 88, 117] +[:key_down_raw, 120, 2, 2, 89, 117] +[:key_down_raw, 120, 2, 2, 90, 118] +[:key_down_raw, 120, 2, 2, 91, 119] +[:key_down_raw, 120, 2, 2, 92, 120] +[:key_down_raw, 120, 2, 2, 93, 121] +[:key_down_raw, 120, 2, 2, 94, 122] +[:key_down_raw, 120, 2, 2, 95, 122] +[:key_down_raw, 120, 2, 2, 96, 123] +[:key_down_raw, 120, 2, 2, 97, 124] +[:key_down_raw, 120, 2, 2, 98, 125] +[:key_down_raw, 120, 2, 2, 99, 126] +[:key_down_raw, 120, 2, 2, 100, 127] +[:key_down_raw, 120, 2, 2, 101, 127] +[:key_down_raw, 120, 2, 2, 102, 128] +[:key_down_raw, 120, 2, 2, 103, 129] +[:key_down_raw, 120, 2, 2, 104, 130] +[:key_down_raw, 120, 2, 2, 105, 131] +[:key_down_raw, 120, 2, 2, 106, 131] +[:key_down_raw, 120, 2, 2, 107, 132] +[:key_down_raw, 120, 2, 2, 108, 133] +[:key_down_raw, 120, 2, 2, 109, 134] +[:key_down_raw, 120, 2, 2, 110, 135] +[:key_down_raw, 120, 2, 2, 111, 136] +[:key_down_raw, 120, 2, 2, 112, 136] +[:key_down_raw, 120, 2, 2, 113, 137] +[:key_down_raw, 120, 2, 2, 114, 138] +[:key_down_raw, 120, 2, 2, 115, 139] +[:key_down_raw, 120, 2, 2, 116, 140] +[:key_down_raw, 120, 2, 2, 117, 140] +[:key_down_raw, 120, 2, 2, 118, 141] +[:key_down_raw, 120, 2, 2, 119, 142] +[:key_down_raw, 120, 2, 2, 120, 143] +[:key_down_raw, 120, 2, 2, 121, 144] +[:key_up_raw, 1073742053, 0, 2, 122, 144] +[:key_down_raw, 120, 0, 2, 123, 145] +[:key_up_raw, 120, 0, 2, 124, 145] +[:key_down_raw, 121, 0, 2, 125, 158] +[:key_down_raw, 121, 0, 2, 126, 165] +[:key_down_raw, 121, 0, 2, 127, 166] +[:key_down_raw, 121, 0, 2, 128, 166] +[:key_down_raw, 121, 0, 2, 129, 167] +[:key_down_raw, 121, 0, 2, 130, 168] +[:key_down_raw, 121, 0, 2, 131, 169] +[:key_down_raw, 121, 0, 2, 132, 170] +[:key_down_raw, 121, 0, 2, 133, 171] +[:key_down_raw, 121, 0, 2, 134, 171] +[:key_down_raw, 121, 0, 2, 135, 172] +[:key_down_raw, 121, 0, 2, 136, 173] +[:key_down_raw, 121, 0, 2, 137, 174] +[:key_down_raw, 121, 0, 2, 138, 175] +[:key_down_raw, 121, 0, 2, 139, 175] +[:key_down_raw, 121, 0, 2, 140, 176] +[:key_down_raw, 121, 0, 2, 141, 177] +[:key_down_raw, 121, 0, 2, 142, 178] +[:key_down_raw, 121, 0, 2, 143, 179] +[:key_down_raw, 121, 0, 2, 144, 180] +[:key_down_raw, 121, 0, 2, 145, 180] +[:key_down_raw, 121, 0, 2, 146, 181] +[:key_down_raw, 121, 0, 2, 147, 182] +[:key_down_raw, 121, 0, 2, 148, 183] +[:key_down_raw, 121, 0, 2, 149, 184] +[:key_down_raw, 121, 0, 2, 150, 185] +[:key_down_raw, 121, 0, 2, 151, 185] +[:key_down_raw, 121, 0, 2, 152, 186] +[:key_down_raw, 121, 0, 2, 153, 187] +[:key_down_raw, 121, 0, 2, 154, 188] +[:key_down_raw, 121, 0, 2, 155, 189] +[:key_down_raw, 121, 0, 2, 156, 190] +[:key_down_raw, 121, 0, 2, 157, 190] +[:key_up_raw, 121, 0, 2, 158, 191] +[:key_down_raw, 1073742053, 2, 2, 159, 198] +[:key_down_raw, 121, 2, 2, 160, 203] +[:key_down_raw, 121, 2, 2, 161, 209] +[:key_down_raw, 121, 2, 2, 162, 210] +[:key_down_raw, 121, 2, 2, 163, 211] +[:key_down_raw, 121, 2, 2, 164, 212] +[:key_down_raw, 121, 2, 2, 165, 213] +[:key_down_raw, 121, 2, 2, 166, 213] +[:key_down_raw, 121, 2, 2, 167, 214] +[:key_down_raw, 121, 2, 2, 168, 215] +[:key_down_raw, 121, 2, 2, 169, 216] +[:key_down_raw, 121, 2, 2, 170, 217] +[:key_down_raw, 121, 2, 2, 171, 217] +[:key_down_raw, 121, 2, 2, 172, 219] +[:key_down_raw, 121, 2, 2, 173, 220] +[:key_down_raw, 121, 2, 2, 174, 220] +[:key_down_raw, 121, 2, 2, 175, 221] +[:key_down_raw, 121, 2, 2, 176, 222] +[:key_down_raw, 121, 2, 2, 177, 223] +[:key_down_raw, 121, 2, 2, 178, 224] +[:key_down_raw, 121, 2, 2, 179, 224] +[:key_down_raw, 121, 2, 2, 180, 225] +[:key_down_raw, 121, 2, 2, 181, 226] +[:key_down_raw, 121, 2, 2, 182, 227] +[:key_down_raw, 121, 2, 2, 183, 228] +[:key_down_raw, 121, 2, 2, 184, 229] +[:key_down_raw, 121, 2, 2, 185, 229] +[:key_down_raw, 121, 2, 2, 186, 230] +[:key_down_raw, 121, 2, 2, 187, 231] +[:key_down_raw, 121, 2, 2, 188, 232] +[:key_down_raw, 121, 2, 2, 189, 233] +[:key_down_raw, 121, 2, 2, 190, 233] +[:key_down_raw, 121, 2, 2, 191, 234] +[:key_down_raw, 121, 2, 2, 192, 235] +[:key_down_raw, 121, 2, 2, 193, 236] +[:key_down_raw, 121, 2, 2, 194, 237] +[:key_down_raw, 121, 2, 2, 195, 238] +[:key_down_raw, 121, 2, 2, 196, 238] +[:key_down_raw, 121, 2, 2, 197, 239] +[:key_down_raw, 121, 2, 2, 198, 240] +[:key_down_raw, 121, 2, 2, 199, 241] +[:key_down_raw, 121, 2, 2, 200, 242] +[:key_down_raw, 121, 2, 2, 201, 242] +[:key_down_raw, 121, 2, 2, 202, 243] +[:key_down_raw, 121, 2, 2, 203, 244] +[:key_down_raw, 121, 2, 2, 204, 245] +[:key_down_raw, 121, 2, 2, 205, 246] +[:key_down_raw, 121, 2, 2, 206, 247] +[:key_down_raw, 121, 2, 2, 207, 247] +[:key_down_raw, 121, 2, 2, 208, 248] +[:key_down_raw, 121, 2, 2, 209, 249] +[:key_down_raw, 121, 2, 2, 210, 250] +[:key_down_raw, 121, 2, 2, 211, 251] +[:key_down_raw, 121, 2, 2, 212, 251] +[:key_down_raw, 121, 2, 2, 213, 252] +[:key_down_raw, 121, 2, 2, 214, 253] +[:key_down_raw, 121, 2, 2, 215, 254] +[:key_down_raw, 121, 2, 2, 216, 255] +[:key_down_raw, 121, 2, 2, 217, 255] +[:key_down_raw, 121, 2, 2, 218, 256] +[:key_down_raw, 121, 2, 2, 219, 257] +[:key_down_raw, 121, 2, 2, 220, 258] +[:key_down_raw, 121, 2, 2, 221, 259] +[:key_down_raw, 121, 2, 2, 222, 260] +[:key_down_raw, 121, 2, 2, 223, 260] +[:key_down_raw, 121, 2, 2, 224, 261] +[:key_down_raw, 121, 2, 2, 225, 262] +[:key_down_raw, 121, 2, 2, 226, 263] +[:key_up_raw, 121, 2, 2, 227, 263] +[:key_up_raw, 1073742053, 0, 2, 228, 266] +[:key_down_raw, 122, 0, 2, 229, 270] +[:key_up_raw, 122, 0, 2, 230, 272] +[:key_down_raw, 122, 0, 2, 231, 289] +[:key_down_raw, 122, 0, 2, 232, 295] +[:key_down_raw, 122, 0, 2, 233, 296] +[:key_down_raw, 122, 0, 2, 234, 297] +[:key_down_raw, 122, 0, 2, 235, 297] +[:key_down_raw, 122, 0, 2, 236, 298] +[:key_down_raw, 122, 0, 2, 237, 299] +[:key_down_raw, 122, 0, 2, 238, 300] +[:key_down_raw, 122, 0, 2, 239, 301] +[:key_down_raw, 122, 0, 2, 240, 302] +[:key_down_raw, 122, 0, 2, 241, 302] +[:key_down_raw, 122, 0, 2, 242, 303] +[:key_down_raw, 122, 0, 2, 243, 304] +[:key_down_raw, 122, 0, 2, 244, 305] +[:key_down_raw, 122, 0, 2, 245, 306] +[:key_down_raw, 122, 0, 2, 246, 306] +[:key_down_raw, 122, 0, 2, 247, 307] +[:key_down_raw, 122, 0, 2, 248, 308] +[:key_down_raw, 122, 0, 2, 249, 309] +[:key_down_raw, 122, 0, 2, 250, 310] +[:key_up_raw, 122, 0, 2, 251, 310] +[:key_down_raw, 1073742053, 2, 2, 252, 319] +[:key_down_raw, 122, 2, 2, 253, 322] +[:key_down_raw, 122, 2, 2, 254, 328] +[:key_down_raw, 122, 2, 2, 255, 329] +[:key_down_raw, 122, 2, 2, 256, 330] +[:key_down_raw, 122, 2, 2, 257, 331] +[:key_down_raw, 122, 2, 2, 258, 332] +[:key_down_raw, 122, 2, 2, 259, 333] +[:key_down_raw, 122, 2, 2, 260, 333] +[:key_down_raw, 122, 2, 2, 261, 334] +[:key_down_raw, 122, 2, 2, 262, 335] +[:key_down_raw, 122, 2, 2, 263, 336] +[:key_down_raw, 122, 2, 2, 264, 337] +[:key_down_raw, 122, 2, 2, 265, 338] +[:key_down_raw, 122, 2, 2, 266, 339] +[:key_down_raw, 122, 2, 2, 267, 340] +[:key_down_raw, 122, 2, 2, 268, 341] +[:key_down_raw, 122, 2, 2, 269, 341] +[:key_down_raw, 122, 2, 2, 270, 342] +[:key_down_raw, 122, 2, 2, 271, 343] +[:key_down_raw, 122, 2, 2, 272, 344] +[:key_down_raw, 122, 2, 2, 273, 345] +[:key_down_raw, 122, 2, 2, 274, 346] +[:key_down_raw, 122, 2, 2, 275, 346] +[:key_down_raw, 122, 2, 2, 276, 347] +[:key_down_raw, 122, 2, 2, 277, 348] +[:key_down_raw, 122, 2, 2, 278, 349] +[:key_down_raw, 122, 2, 2, 279, 350] +[:key_down_raw, 122, 2, 2, 280, 350] +[:key_down_raw, 122, 2, 2, 281, 351] +[:key_down_raw, 122, 2, 2, 282, 352] +[:key_down_raw, 122, 2, 2, 283, 353] +[:key_down_raw, 122, 2, 2, 284, 354] +[:key_down_raw, 122, 2, 2, 285, 355] +[:key_down_raw, 122, 2, 2, 286, 355] +[:key_down_raw, 122, 2, 2, 287, 356] +[:key_down_raw, 122, 2, 2, 288, 357] +[:key_down_raw, 122, 2, 2, 289, 358] +[:key_down_raw, 122, 2, 2, 290, 359] +[:key_down_raw, 122, 2, 2, 291, 360] +[:key_down_raw, 122, 2, 2, 292, 360] +[:key_down_raw, 122, 2, 2, 293, 361] +[:key_down_raw, 122, 2, 2, 294, 362] +[:key_down_raw, 122, 2, 2, 295, 363] +[:key_up_raw, 122, 2, 2, 296, 363] +[:key_up_raw, 1073742053, 0, 2, 297, 366] +[:key_down_raw, 112, 0, 2, 298, 370] +[:key_down_raw, 112, 0, 2, 299, 376] +[:key_down_raw, 112, 0, 2, 300, 377] +[:key_down_raw, 112, 0, 2, 301, 378] +[:key_down_raw, 112, 0, 2, 302, 379] +[:key_down_raw, 112, 0, 2, 303, 380] +[:key_down_raw, 112, 0, 2, 304, 381] +[:key_down_raw, 112, 0, 2, 305, 381] +[:key_down_raw, 112, 0, 2, 306, 382] +[:key_down_raw, 112, 0, 2, 307, 383] +[:key_down_raw, 112, 0, 2, 308, 384] +[:key_down_raw, 112, 0, 2, 309, 385] +[:key_down_raw, 112, 0, 2, 310, 386] +[:key_down_raw, 112, 0, 2, 311, 386] +[:key_down_raw, 112, 0, 2, 312, 387] +[:key_down_raw, 112, 0, 2, 313, 388] +[:key_down_raw, 112, 0, 2, 314, 389] +[:key_down_raw, 112, 0, 2, 315, 390] +[:key_down_raw, 112, 0, 2, 316, 391] +[:key_down_raw, 112, 0, 2, 317, 391] +[:key_down_raw, 112, 0, 2, 318, 392] +[:key_down_raw, 112, 0, 2, 319, 393] +[:key_down_raw, 112, 0, 2, 320, 394] +[:key_down_raw, 112, 0, 2, 321, 395] +[:key_up_raw, 112, 0, 2, 322, 395] +[:key_down_raw, 1073742049, 1, 2, 323, 402] +[:key_down_raw, 112, 1, 2, 324, 402] +[:key_down_raw, 112, 1, 2, 325, 409] +[:key_down_raw, 112, 1, 2, 326, 410] +[:key_down_raw, 112, 1, 2, 327, 410] +[:key_down_raw, 112, 1, 2, 328, 411] +[:key_down_raw, 112, 1, 2, 329, 412] +[:key_down_raw, 112, 1, 2, 330, 413] +[:key_down_raw, 112, 1, 2, 331, 414] +[:key_down_raw, 112, 1, 2, 332, 415] +[:key_down_raw, 112, 1, 2, 333, 415] +[:key_down_raw, 112, 1, 2, 334, 416] +[:key_down_raw, 112, 1, 2, 335, 417] +[:key_down_raw, 112, 1, 2, 336, 418] +[:key_down_raw, 112, 1, 2, 337, 419] +[:key_down_raw, 112, 1, 2, 338, 420] +[:key_down_raw, 112, 1, 2, 339, 420] +[:key_down_raw, 112, 1, 2, 340, 421] +[:key_down_raw, 112, 1, 2, 341, 422] +[:key_down_raw, 112, 1, 2, 342, 423] +[:key_down_raw, 112, 1, 2, 343, 424] +[:key_down_raw, 112, 1, 2, 344, 424] +[:key_down_raw, 112, 1, 2, 345, 425] +[:key_down_raw, 112, 1, 2, 346, 426] +[:key_down_raw, 112, 1, 2, 347, 427] +[:key_down_raw, 112, 1, 2, 348, 428] +[:key_down_raw, 112, 1, 2, 349, 429] +[:key_down_raw, 112, 1, 2, 350, 429] +[:key_down_raw, 112, 1, 2, 351, 430] +[:key_down_raw, 112, 1, 2, 352, 431] +[:key_up_raw, 112, 1, 2, 353, 432] +[:key_up_raw, 1073742049, 0, 2, 354, 433] +[:key_down_raw, 96, 0, 2, 355, 439] +[:key_up_raw, 96, 0, 2, 356, 441] +[:key_down_raw, 13, 0, 2, 357, 493] diff --git a/samples/99_genre_arcade/bullet_hell/replay.txt b/samples/99_genre_arcade/bullet_hell/replay.txt new file mode 100644 index 0000000..49a22d1 --- /dev/null +++ b/samples/99_genre_arcade/bullet_hell/replay.txt @@ -0,0 +1,126 @@ +replay_version 2.0 +stopped_at 718 +seed 100 +recorded_at 2021-11-20 11:26:42 -0600 +[:mouse_button_up, 1, 0, 1, 1, 4] +[:mouse_move, 824, 91, 2, 2, 27] +[:key_down_raw, 1073741903, 0, 2, 3, 64] +[:key_down_raw, 1073741903, 0, 2, 4, 78] +[:key_down_raw, 1073741903, 0, 2, 5, 80] +[:key_down_raw, 1073741903, 0, 2, 6, 82] +[:key_down_raw, 1073741903, 0, 2, 7, 84] +[:key_down_raw, 1073741903, 0, 2, 8, 86] +[:key_down_raw, 1073741903, 0, 2, 9, 88] +[:key_down_raw, 1073741903, 0, 2, 10, 90] +[:key_down_raw, 1073741903, 0, 2, 11, 92] +[:key_down_raw, 1073741903, 0, 2, 12, 94] +[:key_down_raw, 1073741903, 0, 2, 13, 96] +[:key_down_raw, 1073741903, 0, 2, 14, 98] +[:key_down_raw, 1073741903, 0, 2, 15, 100] +[:key_down_raw, 1073741903, 0, 2, 16, 102] +[:key_down_raw, 1073741903, 0, 2, 17, 104] +[:key_down_raw, 1073741903, 0, 2, 18, 106] +[:key_down_raw, 1073741903, 0, 2, 19, 108] +[:key_down_raw, 32, 0, 2, 20, 108] +[:key_up_raw, 1073741903, 0, 2, 21, 108] +[:key_up_raw, 32, 0, 2, 22, 114] +[:key_down_raw, 32, 0, 2, 23, 120] +[:key_up_raw, 32, 0, 2, 24, 126] +[:key_down_raw, 1073741903, 0, 2, 25, 127] +[:key_down_raw, 1073741903, 0, 2, 26, 142] +[:key_up_raw, 1073741903, 0, 2, 27, 143] +[:key_down_raw, 32, 0, 2, 28, 144] +[:key_up_raw, 32, 0, 2, 29, 152] +[:key_down_raw, 32, 0, 2, 30, 156] +[:key_down_raw, 1073741904, 0, 2, 31, 159] +[:key_up_raw, 32, 0, 2, 32, 163] +[:key_down_raw, 1073741904, 0, 2, 33, 174] +[:key_down_raw, 1073741904, 0, 2, 34, 176] +[:key_down_raw, 1073741904, 0, 2, 35, 178] +[:key_down_raw, 1073741904, 0, 2, 36, 180] +[:key_down_raw, 1073741904, 0, 2, 37, 182] +[:key_down_raw, 32, 0, 2, 38, 183] +[:key_up_raw, 1073741904, 0, 2, 39, 186] +[:key_up_raw, 32, 0, 2, 40, 191] +[:key_down_raw, 32, 0, 2, 41, 195] +[:key_up_raw, 32, 0, 2, 42, 203] +[:key_down_raw, 1073741904, 0, 2, 43, 228] +[:key_down_raw, 1073741904, 0, 2, 44, 243] +[:key_down_raw, 1073741904, 0, 2, 45, 245] +[:key_down_raw, 1073741904, 0, 2, 46, 247] +[:key_down_raw, 1073741904, 0, 2, 47, 249] +[:key_down_raw, 1073741904, 0, 2, 48, 251] +[:key_down_raw, 1073741904, 0, 2, 49, 253] +[:key_down_raw, 32, 0, 2, 50, 253] +[:key_up_raw, 1073741904, 0, 2, 51, 255] +[:key_up_raw, 32, 0, 2, 52, 260] +[:key_down_raw, 32, 0, 2, 53, 265] +[:key_up_raw, 32, 0, 2, 54, 270] +[:key_down_raw, 1073741904, 0, 2, 55, 278] +[:key_down_raw, 1073741904, 0, 2, 56, 293] +[:key_down_raw, 1073741904, 0, 2, 57, 295] +[:key_down_raw, 1073741904, 0, 2, 58, 297] +[:key_down_raw, 1073741904, 0, 2, 59, 299] +[:key_down_raw, 1073741904, 0, 2, 60, 301] +[:key_down_raw, 1073741904, 0, 2, 61, 303] +[:key_up_raw, 1073741904, 0, 2, 62, 305] +[:key_down_raw, 32, 0, 2, 63, 307] +[:key_up_raw, 32, 0, 2, 64, 314] +[:key_down_raw, 32, 0, 2, 65, 319] +[:key_up_raw, 32, 0, 2, 66, 326] +[:key_down_raw, 32, 0, 2, 67, 331] +[:key_up_raw, 32, 0, 2, 68, 337] +[:key_down_raw, 1073741904, 0, 2, 69, 339] +[:key_down_raw, 1073741904, 0, 2, 70, 354] +[:key_down_raw, 1073741904, 0, 2, 71, 356] +[:key_down_raw, 1073741904, 0, 2, 72, 358] +[:key_down_raw, 1073741904, 0, 2, 73, 360] +[:key_down_raw, 32, 0, 2, 74, 361] +[:key_up_raw, 1073741904, 0, 2, 75, 361] +[:key_up_raw, 32, 0, 2, 76, 368] +[:key_down_raw, 32, 0, 2, 77, 373] +[:key_up_raw, 32, 0, 2, 78, 379] +[:key_down_raw, 1073741903, 0, 2, 79, 397] +[:key_down_raw, 1073741903, 0, 2, 80, 412] +[:key_down_raw, 1073741903, 0, 2, 81, 414] +[:key_down_raw, 1073741903, 0, 2, 82, 416] +[:key_down_raw, 1073741903, 0, 2, 83, 418] +[:key_down_raw, 1073741903, 0, 2, 84, 420] +[:key_down_raw, 1073741903, 0, 2, 85, 422] +[:key_down_raw, 1073741903, 0, 2, 86, 424] +[:key_down_raw, 1073741903, 0, 2, 87, 426] +[:key_down_raw, 1073741903, 0, 2, 88, 428] +[:key_down_raw, 32, 0, 2, 89, 428] +[:key_up_raw, 1073741903, 0, 2, 90, 429] +[:key_up_raw, 32, 0, 2, 91, 435] +[:key_down_raw, 1073741903, 0, 2, 92, 456] +[:key_down_raw, 32, 0, 2, 93, 468] +[:key_up_raw, 1073741903, 0, 2, 94, 468] +[:key_up_raw, 32, 0, 2, 95, 475] +[:key_down_raw, 32, 0, 2, 96, 480] +[:key_up_raw, 32, 0, 2, 97, 487] +[:key_down_raw, 32, 0, 2, 98, 493] +[:key_up_raw, 32, 0, 2, 99, 499] +[:key_down_raw, 1073741903, 0, 2, 100, 516] +[:key_down_raw, 32, 0, 2, 101, 522] +[:key_up_raw, 32, 0, 2, 102, 529] +[:key_up_raw, 1073741903, 0, 2, 103, 529] +[:key_down_raw, 32, 0, 2, 104, 535] +[:key_up_raw, 32, 0, 2, 105, 542] +[:key_down_raw, 1073741903, 0, 2, 106, 582] +[:key_up_raw, 1073741903, 0, 2, 107, 591] +[:key_down_raw, 96, 0, 2, 108, 652] +[:mouse_move, 824, 90, 2, 109, 656] +[:key_up_raw, 96, 0, 2, 110, 658] +[:mouse_move, 833, 91, 2, 111, 684] +[:mouse_move, 852, 92, 2, 112, 685] +[:mouse_move, 873, 95, 2, 113, 686] +[:mouse_move, 895, 98, 2, 114, 687] +[:mouse_move, 914, 101, 2, 115, 688] +[:mouse_move, 921, 102, 2, 116, 689] +[:mouse_move, 922, 102, 2, 117, 690] +[:mouse_move, 913, 106, 2, 118, 692] +[:mouse_move, 902, 110, 2, 119, 693] +[:mouse_move, 892, 114, 2, 120, 694] +[:mouse_move, 890, 114, 2, 121, 695] +[:key_down_raw, 13, 0, 2, 122, 718] diff --git a/samples/99_genre_arcade/flappy_dragon/app/main.rb b/samples/99_genre_arcade/flappy_dragon/app/main.rb index 56ce3ec..7ddc5a0 100644 --- a/samples/99_genre_arcade/flappy_dragon/app/main.rb +++ b/samples/99_genre_arcade/flappy_dragon/app/main.rb @@ -38,31 +38,36 @@ class FlappyDragon end def render_score - outputs.primitives << [10, 710, "HI SCORE: #{state.hi_score}", large_white_typeset].label - outputs.primitives << [10, 680, "SCORE: #{state.score}", large_white_typeset].label - outputs.primitives << [10, 650, "DIFFICULTY: #{state.difficulty.upcase}", large_white_typeset].label + outputs.primitives << { x: 10, y: 710, text: "HI SCORE: #{state.hi_score}", **large_white_typeset } + outputs.primitives << { x: 10, y: 680, text: "SCORE: #{state.score}", **large_white_typeset } + outputs.primitives << { x: 10, y: 650, text: "DIFFICULTY: #{state.difficulty.upcase}", **large_white_typeset } end def render_menu return unless state.scene == :menu render_overlay - outputs.labels << [640, 700, "Flappy Dragon", 50, 1, 255, 255, 255] - outputs.labels << [640, 500, "Instructions: Press Spacebar to flap. Don't die.", 4, 1, 255, 255, 255] - outputs.labels << [430, 430, "[Tab] Change difficulty", 4, 0, 255, 255, 255] - outputs.labels << [430, 400, "[Enter] Start at New Difficulty ", 4, 0, 255, 255, 255] - outputs.labels << [430, 370, "[Escape] Cancel/Resume ", 4, 0, 255, 255, 255] - outputs.labels << [640, 300, "(mouse, touch, and game controllers work, too!) ", 4, 1, 255, 255, 255] - outputs.labels << [640, 200, "Difficulty: #{state.new_difficulty.capitalize}", 4, 1, 255, 255, 255] - - outputs.labels << [10, 100, "Code: @amirrajan", 255, 255, 255] - outputs.labels << [10, 80, "Art: @mobypixel", 255, 255, 255] - outputs.labels << [10, 60, "Music: @mobypixel", 255, 255, 255] - outputs.labels << [10, 40, "Engine: DragonRuby GTK", 255, 255, 255] + outputs.labels << { x: 640, y: 700, text: "Flappy Dragon", size_enum: 50, alignment_enum: 1, **white } + outputs.labels << { x: 640, y: 500, text: "Instructions: Press Spacebar to flap. Don't die.", size_enum: 4, alignment_enum: 1, **white } + outputs.labels << { x: 430, y: 430, text: "[Tab] Change difficulty", size_enum: 4, alignment_enum: 0, **white } + outputs.labels << { x: 430, y: 400, text: "[Enter] Start at New Difficulty ", size_enum: 4, alignment_enum: 0, **white } + outputs.labels << { x: 430, y: 370, text: "[Escape] Cancel/Resume ", size_enum: 4, alignment_enum: 0, **white } + outputs.labels << { x: 640, y: 300, text: "(mouse, touch, and game controllers work, too!) ", size_enum: 4, alignment_enum: 1, **white } + outputs.labels << { x: 640, y: 200, text: "Difficulty: #{state.new_difficulty.capitalize}", size_enum: 4, alignment_enum: 1, **white } + + outputs.labels << { x: 10, y: 100, text: "Code: @amirrajan", **white } + outputs.labels << { x: 10, y: 80, text: "Art: @mobypixel", **white } + outputs.labels << { x: 10, y: 60, text: "Music: @mobypixel", **white } + outputs.labels << { x: 10, y: 40, text: "Engine: DragonRuby GTK", **white } end def render_overlay - outputs.primitives << [grid.rect.scale_rect(1.1, 0, 0), 0, 0, 0, 230].solid + overlay_rect = grid.rect.scale_rect(1.1, 0, 0) + outputs.primitives << { x: overlay_rect.x, + y: overlay_rect.y, + w: overlay_rect.w, + h: overlay_rect.h, + r: 0, g: 0, b: 0, a: 230 }.solid! end def render_game @@ -75,14 +80,14 @@ class FlappyDragon def render_game_over return unless state.scene == :game - outputs.labels << [638, 358, score_text, 20, 1] - outputs.labels << [635, 360, score_text, 20, 1, 255, 255, 255] - outputs.labels << [638, 428, countdown_text, 20, 1] - outputs.labels << [635, 430, countdown_text, 20, 1, 255, 255, 255] + outputs.labels << { x: 638, y: 358, text: score_text, size_enum: 20, alignment_enum: 1 } + outputs.labels << { x: 635, y: 360, text: score_text, size_enum: 20, alignment_enum: 1, r: 255, g: 255, b: 255 } + outputs.labels << { x: 638, y: 428, text: countdown_text, size_enum: 20, alignment_enum: 1 } + outputs.labels << { x: 635, y: 430, text: countdown_text, size_enum: 20, alignment_enum: 1, r: 255, g: 255, b: 255 } end def render_background - outputs.sprites << [0, 0, 1280, 720, 'sprites/background.png'] + outputs.sprites << { x: 0, y: 0, w: 1280, h: 720, path: 'sprites/background.png' } scroll_point_at = state.tick_count scroll_point_at = state.scene_at if state.scene == :menu @@ -94,11 +99,18 @@ class FlappyDragon outputs.sprites << scrolling_background(scroll_point_at, 'sprites/parallax_front.png', 1.00, -80) end + def scrolling_background at, path, rate, y = 0 + [ + { x: 0 - at.*(rate) % 1440, y: y, w: 1440, h: 720, path: path }, + { x: 1440 - at.*(rate) % 1440, y: y, w: 1440, h: 720, path: path } + ] + end + def render_walls state.walls.each do |w| w.sprites = [ - [w.x, w.bottom_height - 720, 100, 720, 'sprites/wall.png', 180], - [w.x, w.top_y, 100, 720, 'sprites/wallbottom.png', 0] + { x: w.x, y: w.bottom_height - 720, w: 100, h: 720, path: 'sprites/wall.png', angle: 180 }, + { x: w.x, y: w.top_y, w: 100, h: 720, path: 'sprites/wallbottom.png', angle: 0 } ] end outputs.sprites << state.walls.map(&:sprites) @@ -107,15 +119,13 @@ class FlappyDragon def render_dragon state.show_death = true if state.countdown == 3.seconds - render_debug_hitbox false - if state.show_death == false || !state.death_at animation_index = state.flapped_at.frame_index 6, 2, false if state.flapped_at sprite_name = "sprites/dragon_fly#{animation_index.or(0) + 1}.png" - state.dragon_sprite = [state.x, state.y, 100, 80, sprite_name, state.dy * 1.2] + state.dragon_sprite = { x: state.x, y: state.y, w: 100, h: 80, path: sprite_name, angle: state.dy * 1.2 } else sprite_name = "sprites/dragon_die.png" - state.dragon_sprite = [state.x, state.y, 100, 80, sprite_name, state.dy * 1.2] + state.dragon_sprite = { x: state.x, y: state.y, w: 100, h: 80, path: sprite_name, angle: state.dy * 1.2 } sprite_changed_elapsed = state.death_at.elapsed_time - 1.seconds state.dragon_sprite.angle += (sprite_changed_elapsed ** 1.3) * state.death_fall_direction * -1 state.dragon_sprite.x += (sprite_changed_elapsed ** 1.2) * state.death_fall_direction @@ -125,20 +135,12 @@ class FlappyDragon outputs.sprites << state.dragon_sprite end - def render_debug_hitbox show - return unless show - outputs.borders << [dragon_collision_box.rect, 255, 0, 0] if state.dragon_sprite - outputs.borders << state.walls.flat_map do |w| - w.sprites.map { |s| [s.rect, 255, 0, 0] } - end - end - def render_flash return unless state.flash_at - outputs.primitives << [grid.rect, - white, - 255 * state.flash_at.ease(20, :flip)].solid + outputs.primitives << { **grid.rect.to_hash, + **white, + a: 255 * state.flash_at.ease(20, :flip) }.solid! state.flash_at = 0 if state.flash_at.elapsed_time > 20 end @@ -258,19 +260,12 @@ class FlappyDragon end end - def scrolling_background at, path, rate, y = 0 - [ - [ 0 - at.*(rate) % 1440, y, 1440, 720, path], - [1440 - at.*(rate) % 1440, y, 1440, 720, path] - ] - end - def white - [255, 255, 255] + { r: 255, g: 255, b: 255 } end def large_white_typeset - [5, 0, 255, 255, 255] + { size_enum: 5, alignment_enum: 0, r: 255, g: 255, b: 255 } end def at_beginning? @@ -279,9 +274,9 @@ class FlappyDragon def dragon_collision_box state.dragon_sprite - .scale_rect(1.0 - collision_forgiveness, 0.5, 0.5) - .rect_shift_right(10) - .rect_shift_up(state.dy * 2) + .scale_rect(1.0 - collision_forgiveness, 0.5, 0.5) + .rect_shift_right(10) + .rect_shift_up(state.dy * 2) end def game_over? @@ -290,7 +285,7 @@ class FlappyDragon state.walls .flat_map { |w| w.sprites } .any? do |s| - s.intersect_rect?(dragon_collision_box) + s && s.intersect_rect?(dragon_collision_box) end end diff --git a/samples/99_genre_arcade/twinstick/replay.txt b/samples/99_genre_arcade/twinstick/replay.txt new file mode 100644 index 0000000..e05480f --- /dev/null +++ b/samples/99_genre_arcade/twinstick/replay.txt @@ -0,0 +1,174 @@ +replay_version 2.0 +stopped_at 819 +seed 100 +recorded_at 2021-11-20 11:29:24 -0600 +[:mouse_button_up, 1, 0, 1, 1, 3] +[:key_down_raw, 1073741903, 0, 2, 2, 89] +[:key_down_raw, 1073741903, 0, 2, 3, 104] +[:key_down_raw, 1073741903, 0, 2, 4, 106] +[:key_down_raw, 1073741903, 0, 2, 5, 108] +[:key_down_raw, 1073741903, 0, 2, 6, 110] +[:key_down_raw, 1073741903, 0, 2, 7, 112] +[:key_down_raw, 1073741903, 0, 2, 8, 114] +[:key_down_raw, 1073741903, 0, 2, 9, 116] +[:key_up_raw, 1073741903, 0, 2, 10, 117] +[:key_down_raw, 115, 0, 2, 11, 121] +[:key_down_raw, 1073741905, 0, 2, 12, 133] +[:key_down_raw, 1073741905, 0, 2, 13, 148] +[:key_down_raw, 1073741905, 0, 2, 14, 150] +[:key_down_raw, 1073741905, 0, 2, 15, 152] +[:key_down_raw, 1073741904, 0, 2, 16, 152] +[:key_up_raw, 1073741904, 0, 2, 17, 158] +[:key_up_raw, 1073741905, 0, 2, 18, 159] +[:key_down_raw, 1073741906, 0, 2, 19, 163] +[:key_down_raw, 1073741903, 0, 2, 20, 178] +[:key_up_raw, 1073741903, 0, 2, 21, 185] +[:key_down_raw, 100, 0, 2, 22, 195] +[:key_up_raw, 1073741906, 0, 2, 23, 195] +[:key_up_raw, 115, 0, 2, 24, 195] +[:key_down_raw, 1073741904, 0, 2, 25, 209] +[:key_down_raw, 1073741904, 0, 2, 26, 224] +[:key_down_raw, 1073741904, 0, 2, 27, 226] +[:key_down_raw, 1073741904, 0, 2, 28, 228] +[:key_down_raw, 1073741904, 0, 2, 29, 230] +[:key_down_raw, 119, 0, 2, 30, 230] +[:key_down_raw, 1073741906, 0, 2, 31, 237] +[:key_up_raw, 100, 0, 2, 32, 251] +[:key_down_raw, 1073741906, 0, 2, 33, 252] +[:key_down_raw, 1073741906, 0, 2, 34, 254] +[:key_down_raw, 1073741906, 0, 2, 35, 256] +[:key_down_raw, 1073741906, 0, 2, 36, 258] +[:key_down_raw, 97, 0, 2, 37, 259] +[:key_up_raw, 119, 0, 2, 38, 267] +[:key_up_raw, 1073741906, 0, 2, 39, 268] +[:key_down_raw, 1073741903, 0, 2, 40, 269] +[:key_up_raw, 1073741904, 0, 2, 41, 270] +[:key_down_raw, 1073741903, 0, 2, 42, 284] +[:key_down_raw, 1073741903, 0, 2, 43, 286] +[:key_down_raw, 1073741903, 0, 2, 44, 288] +[:key_down_raw, 1073741903, 0, 2, 45, 290] +[:key_down_raw, 1073741903, 0, 2, 46, 292] +[:key_down_raw, 1073741903, 0, 2, 47, 294] +[:key_down_raw, 1073741903, 0, 2, 48, 296] +[:key_down_raw, 1073741903, 0, 2, 49, 298] +[:key_down_raw, 1073741903, 0, 2, 50, 300] +[:key_down_raw, 1073741903, 0, 2, 51, 302] +[:key_down_raw, 1073741903, 0, 2, 52, 304] +[:key_down_raw, 119, 0, 2, 53, 304] +[:key_down_raw, 1073741906, 0, 2, 54, 311] +[:key_down_raw, 1073741906, 0, 2, 55, 326] +[:key_down_raw, 1073741906, 0, 2, 56, 328] +[:key_down_raw, 1073741906, 0, 2, 57, 330] +[:key_down_raw, 1073741906, 0, 2, 58, 332] +[:key_down_raw, 1073741906, 0, 2, 59, 334] +[:key_down_raw, 1073741906, 0, 2, 60, 336] +[:key_up_raw, 1073741903, 0, 2, 61, 336] +[:key_down_raw, 1073741906, 0, 2, 62, 338] +[:key_down_raw, 1073741906, 0, 2, 63, 340] +[:key_down_raw, 1073741906, 0, 2, 64, 342] +[:key_down_raw, 1073741906, 0, 2, 65, 344] +[:key_up_raw, 119, 0, 2, 66, 344] +[:key_down_raw, 1073741906, 0, 2, 67, 346] +[:key_up_raw, 1073741906, 0, 2, 68, 347] +[:key_down_raw, 1073741903, 0, 2, 69, 347] +[:key_down_raw, 115, 0, 2, 70, 353] +[:key_down_raw, 1073741906, 0, 2, 71, 355] +[:key_up_raw, 97, 0, 2, 72, 356] +[:key_up_raw, 1073741903, 0, 2, 73, 360] +[:key_down_raw, 1073741906, 0, 2, 74, 370] +[:key_down_raw, 1073741906, 0, 2, 75, 372] +[:key_down_raw, 1073741906, 0, 2, 76, 374] +[:key_down_raw, 1073741906, 0, 2, 77, 376] +[:key_down_raw, 1073741906, 0, 2, 78, 378] +[:key_down_raw, 1073741906, 0, 2, 79, 380] +[:key_down_raw, 97, 0, 2, 80, 381] +[:key_up_raw, 115, 0, 2, 81, 385] +[:key_down_raw, 1073741903, 0, 2, 82, 386] +[:key_up_raw, 1073741906, 0, 2, 83, 391] +[:key_down_raw, 1073741903, 0, 2, 84, 401] +[:key_down_raw, 1073741903, 0, 2, 85, 403] +[:key_down_raw, 1073741903, 0, 2, 86, 405] +[:key_down_raw, 1073741903, 0, 2, 87, 407] +[:key_down_raw, 1073741903, 0, 2, 88, 409] +[:key_down_raw, 1073741903, 0, 2, 89, 411] +[:key_down_raw, 1073741903, 0, 2, 90, 413] +[:key_down_raw, 1073741903, 0, 2, 91, 415] +[:key_down_raw, 1073741903, 0, 2, 92, 417] +[:key_down_raw, 1073741903, 0, 2, 93, 419] +[:key_down_raw, 1073741903, 0, 2, 94, 421] +[:key_down_raw, 1073741903, 0, 2, 95, 423] +[:key_down_raw, 1073741903, 0, 2, 96, 425] +[:key_down_raw, 1073741903, 0, 2, 97, 428] +[:key_down_raw, 1073741903, 0, 2, 98, 430] +[:key_up_raw, 97, 0, 2, 99, 430] +[:key_down_raw, 1073741903, 0, 2, 100, 432] +[:key_down_raw, 1073741903, 0, 2, 101, 434] +[:key_down_raw, 1073741903, 0, 2, 102, 436] +[:key_up_raw, 1073741903, 0, 2, 103, 436] +[:key_down_raw, 100, 0, 2, 104, 447] +[:key_down_raw, 1073741904, 0, 2, 105, 447] +[:key_down_raw, 1073741904, 0, 2, 106, 462] +[:key_down_raw, 1073741904, 0, 2, 107, 464] +[:key_down_raw, 1073741904, 0, 2, 108, 466] +[:key_down_raw, 1073741904, 0, 2, 109, 468] +[:key_down_raw, 1073741904, 0, 2, 110, 470] +[:key_down_raw, 1073741904, 0, 2, 111, 472] +[:key_down_raw, 1073741904, 0, 2, 112, 474] +[:key_down_raw, 1073741904, 0, 2, 113, 476] +[:key_down_raw, 1073741904, 0, 2, 114, 478] +[:key_down_raw, 1073741904, 0, 2, 115, 480] +[:key_down_raw, 1073741904, 0, 2, 116, 482] +[:key_down_raw, 1073741904, 0, 2, 117, 484] +[:key_down_raw, 1073741904, 0, 2, 118, 486] +[:key_down_raw, 1073741904, 0, 2, 119, 488] +[:key_down_raw, 1073741904, 0, 2, 120, 490] +[:key_down_raw, 1073741904, 0, 2, 121, 492] +[:key_down_raw, 1073741904, 0, 2, 122, 494] +[:key_down_raw, 1073741904, 0, 2, 123, 496] +[:key_down_raw, 1073741904, 0, 2, 124, 498] +[:key_down_raw, 1073741904, 0, 2, 125, 500] +[:key_down_raw, 1073741904, 0, 2, 126, 502] +[:key_down_raw, 1073741904, 0, 2, 127, 504] +[:key_down_raw, 1073741904, 0, 2, 128, 506] +[:key_down_raw, 1073741904, 0, 2, 129, 508] +[:key_up_raw, 100, 0, 2, 130, 508] +[:key_down_raw, 1073741904, 0, 2, 131, 510] +[:key_down_raw, 1073741904, 0, 2, 132, 512] +[:key_up_raw, 1073741904, 0, 2, 133, 513] +[:key_down_raw, 1073741906, 0, 2, 134, 569] +[:key_down_raw, 1073741903, 0, 2, 135, 570] +[:key_down_raw, 1073741903, 0, 2, 136, 585] +[:key_down_raw, 1073741903, 0, 2, 137, 587] +[:key_up_raw, 1073741903, 0, 2, 138, 588] +[:key_down_raw, 1073741903, 0, 2, 139, 597] +[:key_up_raw, 1073741906, 0, 2, 140, 600] +[:key_up_raw, 1073741903, 0, 2, 141, 608] +[:key_down_raw, 1073741906, 0, 2, 142, 610] +[:key_up_raw, 1073741906, 0, 2, 143, 615] +[:key_down_raw, 1073741906, 0, 2, 144, 619] +[:key_down_raw, 119, 0, 2, 145, 621] +[:key_up_raw, 1073741906, 0, 2, 146, 623] +[:key_down_raw, 119, 0, 2, 147, 636] +[:key_down_raw, 119, 0, 2, 148, 638] +[:key_down_raw, 119, 0, 2, 149, 640] +[:key_down_raw, 119, 0, 2, 150, 642] +[:key_up_raw, 119, 0, 2, 151, 642] +[:key_down_raw, 100, 0, 2, 152, 653] +[:key_down_raw, 100, 0, 2, 153, 668] +[:key_down_raw, 100, 0, 2, 154, 670] +[:key_down_raw, 100, 0, 2, 155, 672] +[:key_down_raw, 100, 0, 2, 156, 674] +[:key_down_raw, 100, 0, 2, 157, 676] +[:key_down_raw, 100, 0, 2, 158, 678] +[:key_down_raw, 100, 0, 2, 159, 680] +[:key_down_raw, 100, 0, 2, 160, 682] +[:key_down_raw, 100, 0, 2, 161, 684] +[:key_down_raw, 100, 0, 2, 162, 686] +[:key_down_raw, 115, 0, 2, 163, 686] +[:key_up_raw, 100, 0, 2, 164, 697] +[:key_down_raw, 97, 0, 2, 165, 699] +[:key_up_raw, 115, 0, 2, 166, 704] +[:key_up_raw, 97, 0, 2, 167, 714] +[:key_down_raw, 96, 0, 2, 168, 769] +[:key_up_raw, 96, 0, 2, 169, 774] +[:key_down_raw, 13, 0, 2, 170, 819] diff --git a/samples/99_genre_crafting/farming_game_starting_point/replay.txt b/samples/99_genre_crafting/farming_game_starting_point/replay.txt new file mode 100644 index 0000000..740810d --- /dev/null +++ b/samples/99_genre_crafting/farming_game_starting_point/replay.txt @@ -0,0 +1,170 @@ +replay_version 2.0 +stopped_at 851 +seed 100 +recorded_at 2021-11-20 11:30:20 -0600 +[:mouse_button_up, 1, 0, 1, 1, 4] +[:key_down_raw, 1073741904, 0, 2, 2, 69] +[:key_down_raw, 1073741904, 0, 2, 3, 83] +[:key_up_raw, 1073741904, 0, 2, 4, 84] +[:key_down_raw, 1073741906, 0, 2, 5, 89] +[:key_down_raw, 1073741903, 0, 2, 6, 95] +[:key_up_raw, 1073741906, 0, 2, 7, 103] +[:key_down_raw, 1073741903, 0, 2, 8, 110] +[:key_down_raw, 1073741903, 0, 2, 9, 112] +[:key_down_raw, 1073741903, 0, 2, 10, 114] +[:key_down_raw, 1073741903, 0, 2, 11, 116] +[:key_down_raw, 1073741903, 0, 2, 12, 118] +[:key_down_raw, 1073741903, 0, 2, 13, 120] +[:key_down_raw, 1073741903, 0, 2, 14, 122] +[:key_down_raw, 1073741903, 0, 2, 15, 124] +[:key_up_raw, 1073741903, 0, 2, 16, 125] +[:key_down_raw, 106, 0, 2, 17, 147] +[:key_up_raw, 106, 0, 2, 18, 156] +[:key_down_raw, 1073741904, 0, 2, 19, 180] +[:key_down_raw, 1073741904, 0, 2, 20, 195] +[:key_down_raw, 1073741904, 0, 2, 21, 197] +[:key_down_raw, 1073741904, 0, 2, 22, 199] +[:key_down_raw, 1073741904, 0, 2, 23, 201] +[:key_down_raw, 1073741904, 0, 2, 24, 203] +[:key_down_raw, 1073741904, 0, 2, 25, 205] +[:key_up_raw, 1073741904, 0, 2, 26, 207] +[:key_down_raw, 1073741903, 0, 2, 27, 208] +[:key_down_raw, 1073741903, 0, 2, 28, 223] +[:key_down_raw, 1073741903, 0, 2, 29, 225] +[:key_down_raw, 1073741903, 0, 2, 30, 227] +[:key_down_raw, 1073741903, 0, 2, 31, 229] +[:key_down_raw, 1073741903, 0, 2, 32, 231] +[:key_down_raw, 1073741903, 0, 2, 33, 233] +[:key_down_raw, 1073741903, 0, 2, 34, 235] +[:key_down_raw, 1073741903, 0, 2, 35, 237] +[:key_down_raw, 1073741903, 0, 2, 36, 239] +[:key_down_raw, 1073741903, 0, 2, 37, 241] +[:key_down_raw, 1073741903, 0, 2, 38, 243] +[:key_down_raw, 1073741903, 0, 2, 39, 245] +[:key_down_raw, 1073741903, 0, 2, 40, 247] +[:key_down_raw, 1073741903, 0, 2, 41, 249] +[:key_down_raw, 1073741903, 0, 2, 42, 251] +[:key_down_raw, 1073741903, 0, 2, 43, 253] +[:key_down_raw, 1073741903, 0, 2, 44, 255] +[:key_down_raw, 1073741906, 0, 2, 45, 257] +[:key_up_raw, 1073741903, 0, 2, 46, 258] +[:key_down_raw, 1073741906, 0, 2, 47, 271] +[:key_down_raw, 1073741906, 0, 2, 48, 274] +[:key_down_raw, 1073741906, 0, 2, 49, 276] +[:key_down_raw, 1073741906, 0, 2, 50, 278] +[:key_down_raw, 1073741906, 0, 2, 51, 280] +[:key_up_raw, 1073741906, 0, 2, 52, 280] +[:key_down_raw, 1073741903, 0, 2, 53, 280] +[:key_down_raw, 1073741903, 0, 2, 54, 296] +[:key_down_raw, 1073741903, 0, 2, 55, 298] +[:key_down_raw, 1073741905, 0, 2, 56, 298] +[:key_up_raw, 1073741903, 0, 2, 57, 300] +[:key_down_raw, 1073741905, 0, 2, 58, 313] +[:key_down_raw, 1073741905, 0, 2, 59, 315] +[:key_down_raw, 1073741905, 0, 2, 60, 317] +[:key_down_raw, 1073741905, 0, 2, 61, 319] +[:key_down_raw, 1073741905, 0, 2, 62, 321] +[:key_down_raw, 1073741905, 0, 2, 63, 323] +[:key_down_raw, 1073741905, 0, 2, 64, 325] +[:key_down_raw, 1073741905, 0, 2, 65, 327] +[:key_down_raw, 1073741905, 0, 2, 66, 329] +[:key_down_raw, 1073741904, 0, 2, 67, 330] +[:key_up_raw, 1073741905, 0, 2, 68, 332] +[:key_down_raw, 1073741904, 0, 2, 69, 345] +[:key_down_raw, 1073741904, 0, 2, 70, 347] +[:key_down_raw, 1073741904, 0, 2, 71, 349] +[:key_down_raw, 1073741904, 0, 2, 72, 351] +[:key_up_raw, 1073741904, 0, 2, 73, 353] +[:key_down_raw, 1073741903, 0, 2, 74, 354] +[:key_down_raw, 1073741903, 0, 2, 75, 369] +[:key_down_raw, 1073741903, 0, 2, 76, 371] +[:key_down_raw, 1073741903, 0, 2, 77, 373] +[:key_down_raw, 1073741903, 0, 2, 78, 375] +[:key_down_raw, 1073741903, 0, 2, 79, 377] +[:key_down_raw, 1073741903, 0, 2, 80, 379] +[:key_down_raw, 1073741903, 0, 2, 81, 382] +[:key_down_raw, 1073741903, 0, 2, 82, 383] +[:key_down_raw, 1073741903, 0, 2, 83, 385] +[:key_down_raw, 1073741903, 0, 2, 84, 387] +[:key_down_raw, 1073741903, 0, 2, 85, 390] +[:key_down_raw, 1073741903, 0, 2, 86, 392] +[:key_down_raw, 1073741903, 0, 2, 87, 394] +[:key_down_raw, 1073741905, 0, 2, 88, 395] +[:key_up_raw, 1073741903, 0, 2, 89, 400] +[:key_down_raw, 1073741904, 0, 2, 90, 405] +[:key_up_raw, 1073741905, 0, 2, 91, 416] +[:key_down_raw, 1073741904, 0, 2, 92, 420] +[:key_down_raw, 1073741904, 0, 2, 93, 422] +[:key_down_raw, 1073741904, 0, 2, 94, 424] +[:key_down_raw, 1073741904, 0, 2, 95, 426] +[:key_down_raw, 1073741904, 0, 2, 96, 428] +[:key_down_raw, 1073741904, 0, 2, 97, 430] +[:key_down_raw, 1073741904, 0, 2, 98, 432] +[:key_down_raw, 1073741904, 0, 2, 99, 434] +[:key_down_raw, 1073741904, 0, 2, 100, 436] +[:key_down_raw, 1073741904, 0, 2, 101, 438] +[:key_down_raw, 1073741904, 0, 2, 102, 440] +[:key_down_raw, 1073741904, 0, 2, 103, 442] +[:key_down_raw, 1073741904, 0, 2, 104, 444] +[:key_up_raw, 1073741904, 0, 2, 105, 444] +[:key_down_raw, 1073741906, 0, 2, 106, 445] +[:key_up_raw, 1073741906, 0, 2, 107, 448] +[:key_down_raw, 1073741905, 0, 2, 108, 452] +[:key_down_raw, 1073741905, 0, 2, 109, 467] +[:key_down_raw, 1073741905, 0, 2, 110, 469] +[:key_up_raw, 1073741905, 0, 2, 111, 470] +[:key_down_raw, 1073741906, 0, 2, 112, 484] +[:key_up_raw, 1073741906, 0, 2, 113, 496] +[:key_down_raw, 32, 0, 2, 114, 499] +[:key_up_raw, 32, 0, 2, 115, 505] +[:key_down_raw, 1073741903, 0, 2, 116, 538] +[:key_up_raw, 1073741903, 0, 2, 117, 553] +[:key_down_raw, 106, 0, 2, 118, 604] +[:key_up_raw, 106, 0, 2, 119, 608] +[:key_down_raw, 1073741903, 0, 2, 120, 640] +[:key_down_raw, 1073741906, 0, 2, 121, 654] +[:key_up_raw, 1073741903, 0, 2, 122, 654] +[:key_down_raw, 1073741906, 0, 2, 123, 669] +[:key_down_raw, 1073741906, 0, 2, 124, 671] +[:key_down_raw, 1073741906, 0, 2, 125, 673] +[:key_down_raw, 1073741906, 0, 2, 126, 675] +[:key_up_raw, 1073741906, 0, 2, 127, 677] +[:key_down_raw, 1073741903, 0, 2, 128, 677] +[:key_down_raw, 1073741903, 0, 2, 129, 692] +[:key_down_raw, 1073741903, 0, 2, 130, 694] +[:key_down_raw, 1073741905, 0, 2, 131, 694] +[:key_up_raw, 1073741903, 0, 2, 132, 696] +[:key_down_raw, 1073741905, 0, 2, 133, 709] +[:key_down_raw, 1073741905, 0, 2, 134, 711] +[:key_down_raw, 1073741905, 0, 2, 135, 713] +[:key_down_raw, 1073741905, 0, 2, 136, 715] +[:key_down_raw, 1073741905, 0, 2, 137, 717] +[:key_down_raw, 1073741904, 0, 2, 138, 719] +[:key_up_raw, 1073741905, 0, 2, 139, 721] +[:key_down_raw, 1073741904, 0, 2, 140, 734] +[:key_down_raw, 1073741904, 0, 2, 141, 736] +[:key_down_raw, 1073741904, 0, 2, 142, 738] +[:key_down_raw, 1073741904, 0, 2, 143, 740] +[:key_down_raw, 1073741904, 0, 2, 144, 742] +[:key_down_raw, 1073741904, 0, 2, 145, 744] +[:key_down_raw, 1073741904, 0, 2, 146, 746] +[:key_down_raw, 1073741904, 0, 2, 147, 748] +[:key_up_raw, 1073741904, 0, 2, 148, 748] +[:key_down_raw, 96, 0, 2, 149, 778] +[:key_up_raw, 96, 0, 2, 150, 782] +[:mouse_move, 782, 86, 2, 151, 822] +[:mouse_move, 774, 93, 2, 152, 823] +[:mouse_move, 764, 101, 2, 153, 824] +[:mouse_move, 752, 113, 2, 154, 825] +[:mouse_move, 732, 126, 2, 155, 826] +[:mouse_move, 716, 141, 2, 156, 827] +[:mouse_move, 705, 152, 2, 157, 828] +[:mouse_move, 699, 162, 2, 158, 829] +[:mouse_move, 693, 172, 2, 159, 830] +[:mouse_move, 690, 177, 2, 160, 831] +[:mouse_move, 690, 176, 2, 161, 839] +[:mouse_move, 691, 175, 2, 162, 840] +[:mouse_move, 693, 173, 2, 163, 841] +[:mouse_move, 695, 173, 2, 164, 842] +[:mouse_move, 695, 172, 2, 165, 844] +[:key_down_raw, 13, 0, 2, 166, 851] diff --git a/samples/99_genre_crafting/replay.txt b/samples/99_genre_crafting/replay.txt new file mode 100644 index 0000000..740810d --- /dev/null +++ b/samples/99_genre_crafting/replay.txt @@ -0,0 +1,170 @@ +replay_version 2.0 +stopped_at 851 +seed 100 +recorded_at 2021-11-20 11:30:20 -0600 +[:mouse_button_up, 1, 0, 1, 1, 4] +[:key_down_raw, 1073741904, 0, 2, 2, 69] +[:key_down_raw, 1073741904, 0, 2, 3, 83] +[:key_up_raw, 1073741904, 0, 2, 4, 84] +[:key_down_raw, 1073741906, 0, 2, 5, 89] +[:key_down_raw, 1073741903, 0, 2, 6, 95] +[:key_up_raw, 1073741906, 0, 2, 7, 103] +[:key_down_raw, 1073741903, 0, 2, 8, 110] +[:key_down_raw, 1073741903, 0, 2, 9, 112] +[:key_down_raw, 1073741903, 0, 2, 10, 114] +[:key_down_raw, 1073741903, 0, 2, 11, 116] +[:key_down_raw, 1073741903, 0, 2, 12, 118] +[:key_down_raw, 1073741903, 0, 2, 13, 120] +[:key_down_raw, 1073741903, 0, 2, 14, 122] +[:key_down_raw, 1073741903, 0, 2, 15, 124] +[:key_up_raw, 1073741903, 0, 2, 16, 125] +[:key_down_raw, 106, 0, 2, 17, 147] +[:key_up_raw, 106, 0, 2, 18, 156] +[:key_down_raw, 1073741904, 0, 2, 19, 180] +[:key_down_raw, 1073741904, 0, 2, 20, 195] +[:key_down_raw, 1073741904, 0, 2, 21, 197] +[:key_down_raw, 1073741904, 0, 2, 22, 199] +[:key_down_raw, 1073741904, 0, 2, 23, 201] +[:key_down_raw, 1073741904, 0, 2, 24, 203] +[:key_down_raw, 1073741904, 0, 2, 25, 205] +[:key_up_raw, 1073741904, 0, 2, 26, 207] +[:key_down_raw, 1073741903, 0, 2, 27, 208] +[:key_down_raw, 1073741903, 0, 2, 28, 223] +[:key_down_raw, 1073741903, 0, 2, 29, 225] +[:key_down_raw, 1073741903, 0, 2, 30, 227] +[:key_down_raw, 1073741903, 0, 2, 31, 229] +[:key_down_raw, 1073741903, 0, 2, 32, 231] +[:key_down_raw, 1073741903, 0, 2, 33, 233] +[:key_down_raw, 1073741903, 0, 2, 34, 235] +[:key_down_raw, 1073741903, 0, 2, 35, 237] +[:key_down_raw, 1073741903, 0, 2, 36, 239] +[:key_down_raw, 1073741903, 0, 2, 37, 241] +[:key_down_raw, 1073741903, 0, 2, 38, 243] +[:key_down_raw, 1073741903, 0, 2, 39, 245] +[:key_down_raw, 1073741903, 0, 2, 40, 247] +[:key_down_raw, 1073741903, 0, 2, 41, 249] +[:key_down_raw, 1073741903, 0, 2, 42, 251] +[:key_down_raw, 1073741903, 0, 2, 43, 253] +[:key_down_raw, 1073741903, 0, 2, 44, 255] +[:key_down_raw, 1073741906, 0, 2, 45, 257] +[:key_up_raw, 1073741903, 0, 2, 46, 258] +[:key_down_raw, 1073741906, 0, 2, 47, 271] +[:key_down_raw, 1073741906, 0, 2, 48, 274] +[:key_down_raw, 1073741906, 0, 2, 49, 276] +[:key_down_raw, 1073741906, 0, 2, 50, 278] +[:key_down_raw, 1073741906, 0, 2, 51, 280] +[:key_up_raw, 1073741906, 0, 2, 52, 280] +[:key_down_raw, 1073741903, 0, 2, 53, 280] +[:key_down_raw, 1073741903, 0, 2, 54, 296] +[:key_down_raw, 1073741903, 0, 2, 55, 298] +[:key_down_raw, 1073741905, 0, 2, 56, 298] +[:key_up_raw, 1073741903, 0, 2, 57, 300] +[:key_down_raw, 1073741905, 0, 2, 58, 313] +[:key_down_raw, 1073741905, 0, 2, 59, 315] +[:key_down_raw, 1073741905, 0, 2, 60, 317] +[:key_down_raw, 1073741905, 0, 2, 61, 319] +[:key_down_raw, 1073741905, 0, 2, 62, 321] +[:key_down_raw, 1073741905, 0, 2, 63, 323] +[:key_down_raw, 1073741905, 0, 2, 64, 325] +[:key_down_raw, 1073741905, 0, 2, 65, 327] +[:key_down_raw, 1073741905, 0, 2, 66, 329] +[:key_down_raw, 1073741904, 0, 2, 67, 330] +[:key_up_raw, 1073741905, 0, 2, 68, 332] +[:key_down_raw, 1073741904, 0, 2, 69, 345] +[:key_down_raw, 1073741904, 0, 2, 70, 347] +[:key_down_raw, 1073741904, 0, 2, 71, 349] +[:key_down_raw, 1073741904, 0, 2, 72, 351] +[:key_up_raw, 1073741904, 0, 2, 73, 353] +[:key_down_raw, 1073741903, 0, 2, 74, 354] +[:key_down_raw, 1073741903, 0, 2, 75, 369] +[:key_down_raw, 1073741903, 0, 2, 76, 371] +[:key_down_raw, 1073741903, 0, 2, 77, 373] +[:key_down_raw, 1073741903, 0, 2, 78, 375] +[:key_down_raw, 1073741903, 0, 2, 79, 377] +[:key_down_raw, 1073741903, 0, 2, 80, 379] +[:key_down_raw, 1073741903, 0, 2, 81, 382] +[:key_down_raw, 1073741903, 0, 2, 82, 383] +[:key_down_raw, 1073741903, 0, 2, 83, 385] +[:key_down_raw, 1073741903, 0, 2, 84, 387] +[:key_down_raw, 1073741903, 0, 2, 85, 390] +[:key_down_raw, 1073741903, 0, 2, 86, 392] +[:key_down_raw, 1073741903, 0, 2, 87, 394] +[:key_down_raw, 1073741905, 0, 2, 88, 395] +[:key_up_raw, 1073741903, 0, 2, 89, 400] +[:key_down_raw, 1073741904, 0, 2, 90, 405] +[:key_up_raw, 1073741905, 0, 2, 91, 416] +[:key_down_raw, 1073741904, 0, 2, 92, 420] +[:key_down_raw, 1073741904, 0, 2, 93, 422] +[:key_down_raw, 1073741904, 0, 2, 94, 424] +[:key_down_raw, 1073741904, 0, 2, 95, 426] +[:key_down_raw, 1073741904, 0, 2, 96, 428] +[:key_down_raw, 1073741904, 0, 2, 97, 430] +[:key_down_raw, 1073741904, 0, 2, 98, 432] +[:key_down_raw, 1073741904, 0, 2, 99, 434] +[:key_down_raw, 1073741904, 0, 2, 100, 436] +[:key_down_raw, 1073741904, 0, 2, 101, 438] +[:key_down_raw, 1073741904, 0, 2, 102, 440] +[:key_down_raw, 1073741904, 0, 2, 103, 442] +[:key_down_raw, 1073741904, 0, 2, 104, 444] +[:key_up_raw, 1073741904, 0, 2, 105, 444] +[:key_down_raw, 1073741906, 0, 2, 106, 445] +[:key_up_raw, 1073741906, 0, 2, 107, 448] +[:key_down_raw, 1073741905, 0, 2, 108, 452] +[:key_down_raw, 1073741905, 0, 2, 109, 467] +[:key_down_raw, 1073741905, 0, 2, 110, 469] +[:key_up_raw, 1073741905, 0, 2, 111, 470] +[:key_down_raw, 1073741906, 0, 2, 112, 484] +[:key_up_raw, 1073741906, 0, 2, 113, 496] +[:key_down_raw, 32, 0, 2, 114, 499] +[:key_up_raw, 32, 0, 2, 115, 505] +[:key_down_raw, 1073741903, 0, 2, 116, 538] +[:key_up_raw, 1073741903, 0, 2, 117, 553] +[:key_down_raw, 106, 0, 2, 118, 604] +[:key_up_raw, 106, 0, 2, 119, 608] +[:key_down_raw, 1073741903, 0, 2, 120, 640] +[:key_down_raw, 1073741906, 0, 2, 121, 654] +[:key_up_raw, 1073741903, 0, 2, 122, 654] +[:key_down_raw, 1073741906, 0, 2, 123, 669] +[:key_down_raw, 1073741906, 0, 2, 124, 671] +[:key_down_raw, 1073741906, 0, 2, 125, 673] +[:key_down_raw, 1073741906, 0, 2, 126, 675] +[:key_up_raw, 1073741906, 0, 2, 127, 677] +[:key_down_raw, 1073741903, 0, 2, 128, 677] +[:key_down_raw, 1073741903, 0, 2, 129, 692] +[:key_down_raw, 1073741903, 0, 2, 130, 694] +[:key_down_raw, 1073741905, 0, 2, 131, 694] +[:key_up_raw, 1073741903, 0, 2, 132, 696] +[:key_down_raw, 1073741905, 0, 2, 133, 709] +[:key_down_raw, 1073741905, 0, 2, 134, 711] +[:key_down_raw, 1073741905, 0, 2, 135, 713] +[:key_down_raw, 1073741905, 0, 2, 136, 715] +[:key_down_raw, 1073741905, 0, 2, 137, 717] +[:key_down_raw, 1073741904, 0, 2, 138, 719] +[:key_up_raw, 1073741905, 0, 2, 139, 721] +[:key_down_raw, 1073741904, 0, 2, 140, 734] +[:key_down_raw, 1073741904, 0, 2, 141, 736] +[:key_down_raw, 1073741904, 0, 2, 142, 738] +[:key_down_raw, 1073741904, 0, 2, 143, 740] +[:key_down_raw, 1073741904, 0, 2, 144, 742] +[:key_down_raw, 1073741904, 0, 2, 145, 744] +[:key_down_raw, 1073741904, 0, 2, 146, 746] +[:key_down_raw, 1073741904, 0, 2, 147, 748] +[:key_up_raw, 1073741904, 0, 2, 148, 748] +[:key_down_raw, 96, 0, 2, 149, 778] +[:key_up_raw, 96, 0, 2, 150, 782] +[:mouse_move, 782, 86, 2, 151, 822] +[:mouse_move, 774, 93, 2, 152, 823] +[:mouse_move, 764, 101, 2, 153, 824] +[:mouse_move, 752, 113, 2, 154, 825] +[:mouse_move, 732, 126, 2, 155, 826] +[:mouse_move, 716, 141, 2, 156, 827] +[:mouse_move, 705, 152, 2, 157, 828] +[:mouse_move, 699, 162, 2, 158, 829] +[:mouse_move, 693, 172, 2, 159, 830] +[:mouse_move, 690, 177, 2, 160, 831] +[:mouse_move, 690, 176, 2, 161, 839] +[:mouse_move, 691, 175, 2, 162, 840] +[:mouse_move, 693, 173, 2, 163, 841] +[:mouse_move, 695, 173, 2, 164, 842] +[:mouse_move, 695, 172, 2, 165, 844] +[:key_down_raw, 13, 0, 2, 166, 851] diff --git a/samples/99_genre_dungeon_crawl/classics_jam/replay.txt b/samples/99_genre_dungeon_crawl/classics_jam/replay.txt new file mode 100644 index 0000000..eab6ec5 --- /dev/null +++ b/samples/99_genre_dungeon_crawl/classics_jam/replay.txt @@ -0,0 +1,197 @@ +replay_version 2.0 +stopped_at 873 +seed 100 +recorded_at 2021-11-20 11:38:43 -0600 +[:mouse_button_up, 1, 0, 1, 1, 4] +[:key_down_raw, 1073741905, 0, 2, 2, 99] +[:key_down_raw, 1073741905, 0, 2, 3, 113] +[:key_down_raw, 1073741905, 0, 2, 4, 115] +[:key_down_raw, 1073741905, 0, 2, 5, 117] +[:key_down_raw, 1073741905, 0, 2, 6, 119] +[:key_down_raw, 1073741905, 0, 2, 7, 121] +[:key_down_raw, 1073741905, 0, 2, 8, 123] +[:key_down_raw, 1073741905, 0, 2, 9, 125] +[:key_down_raw, 1073741905, 0, 2, 10, 127] +[:key_down_raw, 1073741905, 0, 2, 11, 129] +[:key_down_raw, 1073741905, 0, 2, 12, 131] +[:key_down_raw, 1073741905, 0, 2, 13, 133] +[:key_down_raw, 1073741905, 0, 2, 14, 135] +[:key_down_raw, 1073741905, 0, 2, 15, 137] +[:key_down_raw, 1073741905, 0, 2, 16, 139] +[:key_down_raw, 1073741905, 0, 2, 17, 141] +[:key_down_raw, 1073741905, 0, 2, 18, 143] +[:key_down_raw, 1073741905, 0, 2, 19, 145] +[:key_down_raw, 1073741905, 0, 2, 20, 147] +[:key_down_raw, 1073741905, 0, 2, 21, 149] +[:key_down_raw, 1073741905, 0, 2, 22, 151] +[:key_down_raw, 1073741905, 0, 2, 23, 153] +[:key_down_raw, 1073741905, 0, 2, 24, 155] +[:key_down_raw, 1073741905, 0, 2, 25, 157] +[:key_down_raw, 1073741905, 0, 2, 26, 159] +[:key_down_raw, 1073741905, 0, 2, 27, 161] +[:key_down_raw, 1073741905, 0, 2, 28, 163] +[:key_down_raw, 1073741905, 0, 2, 29, 165] +[:key_down_raw, 1073741905, 0, 2, 30, 167] +[:key_down_raw, 1073741905, 0, 2, 31, 169] +[:key_down_raw, 1073741905, 0, 2, 32, 171] +[:key_down_raw, 1073741905, 0, 2, 33, 173] +[:key_down_raw, 1073741905, 0, 2, 34, 175] +[:key_down_raw, 1073741905, 0, 2, 35, 177] +[:key_down_raw, 1073741905, 0, 2, 36, 179] +[:key_down_raw, 1073741905, 0, 2, 37, 181] +[:key_down_raw, 1073741905, 0, 2, 38, 183] +[:key_down_raw, 1073741905, 0, 2, 39, 185] +[:key_down_raw, 1073741905, 0, 2, 40, 187] +[:key_down_raw, 1073741905, 0, 2, 41, 189] +[:key_down_raw, 1073741905, 0, 2, 42, 191] +[:key_down_raw, 1073741905, 0, 2, 43, 193] +[:key_down_raw, 1073741905, 0, 2, 44, 195] +[:key_down_raw, 1073741904, 0, 2, 45, 196] +[:key_up_raw, 1073741905, 0, 2, 46, 196] +[:key_up_raw, 1073741904, 0, 2, 47, 205] +[:key_down_raw, 32, 0, 2, 48, 206] +[:key_up_raw, 32, 0, 2, 49, 212] +[:key_down_raw, 32, 0, 2, 50, 217] +[:key_up_raw, 32, 0, 2, 51, 222] +[:key_down_raw, 32, 0, 2, 52, 227] +[:key_up_raw, 32, 0, 2, 53, 233] +[:key_down_raw, 32, 0, 2, 54, 237] +[:key_up_raw, 32, 0, 2, 55, 243] +[:key_down_raw, 32, 0, 2, 56, 266] +[:key_up_raw, 32, 0, 2, 57, 271] +[:key_down_raw, 32, 0, 2, 58, 276] +[:key_up_raw, 32, 0, 2, 59, 282] +[:key_down_raw, 32, 0, 2, 60, 294] +[:key_up_raw, 32, 0, 2, 61, 300] +[:key_down_raw, 32, 0, 2, 62, 305] +[:key_down_raw, 1073741904, 0, 2, 63, 306] +[:key_up_raw, 32, 0, 2, 64, 310] +[:key_down_raw, 1073741904, 0, 2, 65, 322] +[:key_down_raw, 1073741904, 0, 2, 66, 324] +[:key_down_raw, 1073741904, 0, 2, 67, 326] +[:key_down_raw, 1073741904, 0, 2, 68, 328] +[:key_down_raw, 1073741904, 0, 2, 69, 330] +[:key_down_raw, 1073741904, 0, 2, 70, 332] +[:key_down_raw, 1073741904, 0, 2, 71, 334] +[:key_down_raw, 1073741904, 0, 2, 72, 336] +[:key_down_raw, 1073741904, 0, 2, 73, 338] +[:key_down_raw, 1073741904, 0, 2, 74, 340] +[:key_down_raw, 1073741904, 0, 2, 75, 342] +[:key_down_raw, 1073741904, 0, 2, 76, 344] +[:key_down_raw, 1073741904, 0, 2, 77, 346] +[:key_down_raw, 1073741904, 0, 2, 78, 348] +[:key_down_raw, 1073741904, 0, 2, 79, 350] +[:key_down_raw, 1073741904, 0, 2, 80, 352] +[:key_down_raw, 1073741904, 0, 2, 81, 354] +[:key_down_raw, 1073741904, 0, 2, 82, 356] +[:key_down_raw, 1073741904, 0, 2, 83, 358] +[:key_down_raw, 1073741904, 0, 2, 84, 360] +[:key_down_raw, 1073741904, 0, 2, 85, 362] +[:key_down_raw, 1073741904, 0, 2, 86, 364] +[:key_down_raw, 1073741904, 0, 2, 87, 366] +[:key_down_raw, 1073741904, 0, 2, 88, 368] +[:key_down_raw, 1073741904, 0, 2, 89, 370] +[:key_down_raw, 1073741904, 0, 2, 90, 372] +[:key_down_raw, 1073741904, 0, 2, 91, 374] +[:key_down_raw, 1073741904, 0, 2, 92, 376] +[:key_down_raw, 1073741904, 0, 2, 93, 378] +[:key_down_raw, 1073741904, 0, 2, 94, 380] +[:key_down_raw, 1073741904, 0, 2, 95, 382] +[:key_down_raw, 1073741904, 0, 2, 96, 384] +[:key_down_raw, 1073741904, 0, 2, 97, 386] +[:key_down_raw, 1073741904, 0, 2, 98, 388] +[:key_down_raw, 1073741904, 0, 2, 99, 390] +[:key_down_raw, 1073741904, 0, 2, 100, 392] +[:key_down_raw, 1073741904, 0, 2, 101, 394] +[:key_down_raw, 1073741904, 0, 2, 102, 396] +[:key_down_raw, 1073741904, 0, 2, 103, 398] +[:key_down_raw, 1073741904, 0, 2, 104, 400] +[:key_down_raw, 1073741904, 0, 2, 105, 402] +[:key_down_raw, 1073741904, 0, 2, 106, 404] +[:key_down_raw, 1073741904, 0, 2, 107, 406] +[:key_down_raw, 1073741904, 0, 2, 108, 408] +[:key_down_raw, 1073741904, 0, 2, 109, 410] +[:key_down_raw, 1073741904, 0, 2, 110, 412] +[:key_down_raw, 1073741904, 0, 2, 111, 414] +[:key_down_raw, 1073741904, 0, 2, 112, 416] +[:key_down_raw, 1073741904, 0, 2, 113, 418] +[:key_down_raw, 1073741904, 0, 2, 114, 420] +[:key_down_raw, 1073741904, 0, 2, 115, 422] +[:key_down_raw, 1073741904, 0, 2, 116, 424] +[:key_down_raw, 1073741904, 0, 2, 117, 426] +[:key_down_raw, 1073741904, 0, 2, 118, 428] +[:key_down_raw, 1073741904, 0, 2, 119, 430] +[:key_down_raw, 1073741904, 0, 2, 120, 432] +[:key_down_raw, 1073741904, 0, 2, 121, 434] +[:key_down_raw, 1073741904, 0, 2, 122, 436] +[:key_down_raw, 1073741904, 0, 2, 123, 438] +[:key_down_raw, 1073741904, 0, 2, 124, 440] +[:key_up_raw, 1073741904, 0, 2, 125, 442] +[:key_down_raw, 1073741903, 0, 2, 126, 461] +[:key_down_raw, 1073741903, 0, 2, 127, 476] +[:key_down_raw, 1073741903, 0, 2, 128, 478] +[:key_down_raw, 1073741903, 0, 2, 129, 480] +[:key_down_raw, 1073741903, 0, 2, 130, 482] +[:key_down_raw, 1073741903, 0, 2, 131, 484] +[:key_down_raw, 1073741903, 0, 2, 132, 486] +[:key_down_raw, 1073741903, 0, 2, 133, 488] +[:key_down_raw, 1073741903, 0, 2, 134, 490] +[:key_down_raw, 1073741903, 0, 2, 135, 492] +[:key_down_raw, 1073741903, 0, 2, 136, 494] +[:key_down_raw, 1073741903, 0, 2, 137, 496] +[:key_down_raw, 1073741903, 0, 2, 138, 498] +[:key_down_raw, 1073741903, 0, 2, 139, 500] +[:key_down_raw, 1073741903, 0, 2, 140, 502] +[:key_down_raw, 1073741903, 0, 2, 141, 504] +[:key_down_raw, 1073741903, 0, 2, 142, 506] +[:key_down_raw, 1073741903, 0, 2, 143, 508] +[:key_down_raw, 1073741903, 0, 2, 144, 510] +[:key_down_raw, 1073741903, 0, 2, 145, 512] +[:key_down_raw, 1073741903, 0, 2, 146, 514] +[:key_down_raw, 1073741903, 0, 2, 147, 516] +[:key_down_raw, 1073741903, 0, 2, 148, 518] +[:key_down_raw, 1073741903, 0, 2, 149, 520] +[:key_down_raw, 1073741903, 0, 2, 150, 522] +[:key_down_raw, 1073741903, 0, 2, 151, 524] +[:key_down_raw, 1073741903, 0, 2, 152, 526] +[:key_down_raw, 1073741903, 0, 2, 153, 528] +[:key_down_raw, 1073741904, 0, 2, 154, 528] +[:key_up_raw, 1073741903, 0, 2, 155, 528] +[:key_down_raw, 32, 0, 2, 156, 534] +[:key_up_raw, 32, 0, 2, 157, 539] +[:key_down_raw, 32, 0, 2, 158, 545] +[:key_up_raw, 32, 0, 2, 159, 549] +[:key_down_raw, 32, 0, 2, 160, 554] +[:key_up_raw, 32, 0, 2, 161, 560] +[:key_down_raw, 32, 0, 2, 162, 564] +[:key_up_raw, 32, 0, 2, 163, 570] +[:key_down_raw, 32, 0, 2, 164, 575] +[:key_up_raw, 32, 0, 2, 165, 581] +[:key_down_raw, 32, 0, 2, 166, 585] +[:key_up_raw, 32, 0, 2, 167, 590] +[:key_down_raw, 32, 0, 2, 168, 594] +[:key_up_raw, 32, 0, 2, 169, 600] +[:key_down_raw, 32, 0, 2, 170, 605] +[:key_up_raw, 32, 0, 2, 171, 610] +[:key_down_raw, 32, 0, 2, 172, 615] +[:key_up_raw, 32, 0, 2, 173, 620] +[:key_down_raw, 32, 0, 2, 174, 624] +[:key_up_raw, 32, 0, 2, 175, 630] +[:key_up_raw, 1073741904, 0, 2, 176, 631] +[:key_down_raw, 32, 0, 2, 177, 634] +[:key_up_raw, 32, 0, 2, 178, 639] +[:key_down_raw, 32, 0, 2, 179, 644] +[:key_up_raw, 32, 0, 2, 180, 649] +[:key_down_raw, 32, 0, 2, 181, 654] +[:key_up_raw, 32, 0, 2, 182, 659] +[:key_down_raw, 32, 0, 2, 183, 664] +[:key_up_raw, 32, 0, 2, 184, 669] +[:key_down_raw, 32, 0, 2, 185, 674] +[:key_up_raw, 32, 0, 2, 186, 679] +[:key_down_raw, 32, 0, 2, 187, 684] +[:key_up_raw, 32, 0, 2, 188, 689] +[:key_down_raw, 32, 0, 2, 189, 694] +[:key_up_raw, 32, 0, 2, 190, 699] +[:key_down_raw, 96, 0, 2, 191, 823] +[:key_up_raw, 96, 0, 2, 192, 828] +[:key_down_raw, 13, 0, 2, 193, 873] diff --git a/samples/99_genre_mario/01_jumping/app/main.rb b/samples/99_genre_mario/01_jumping/app/main.rb new file mode 100644 index 0000000..2d12a22 --- /dev/null +++ b/samples/99_genre_mario/01_jumping/app/main.rb @@ -0,0 +1,78 @@ +def tick args + defaults args + render args + input args + calc args +end + +def defaults args + args.state.player.x ||= args.grid.w.half + args.state.player.y ||= 0 + args.state.player.size ||= 100 + args.state.player.dy ||= 0 + args.state.player.action ||= :jumping + args.state.jump.power = 20 + args.state.jump.increase_frames = 10 + args.state.jump.increase_power = 1 + args.state.gravity = -1 +end + +def render args + args.outputs.sprites << { + x: args.state.player.x - + args.state.player.size.half, + y: args.state.player.y, + w: args.state.player.size, + h: args.state.player.size, + path: 'sprites/square/red.png' + } +end + +def input args + if args.inputs.keyboard.key_down.space + if args.state.player.action == :standing + args.state.player.action = :jumping + args.state.player.dy = args.state.jump.power + + # record when the action took place + current_frame = args.state.tick_count + args.state.player.action_at = current_frame + end + end + + # if the space bar is being held + if args.inputs.keyboard.key_held.space + # is the player jumping + is_jumping = args.state.player.action == :jumping + + # when was the jump performed + time_of_jump = args.state.player.action_at + + # how much time has passed since the jump + jump_elapsed_time = time_of_jump.elapsed_time + + # how much time is allowed for increasing power + time_allowed = args.state.jump.increase_frames + + # if the player is jumping + # and the elapsed time is less than + # the allowed time + if is_jumping && jump_elapsed_time < time_allowed + # increase the dy by the increase power + power_to_add = args.state.jump.increase_power + args.state.player.dy += power_to_add + end + end +end + +def calc args + if args.state.player.action == :jumping + args.state.player.y += args.state.player.dy + args.state.player.dy += args.state.gravity + end + + if args.state.player.y < 0 + args.state.player.y = 0 + args.state.player.action = :standing + end +end diff --git a/samples/99_genre_mario/01_jumping/replay.txt b/samples/99_genre_mario/01_jumping/replay.txt new file mode 100644 index 0000000..d56d585 --- /dev/null +++ b/samples/99_genre_mario/01_jumping/replay.txt @@ -0,0 +1,52 @@ +replay_version 2.0 +stopped_at 574 +seed 100 +recorded_at 2021-11-20 16:44:37 -0600 +[:mouse_button_up, 1, 0, 1, 1, 3] +[:key_down_raw, 32, 0, 2, 2, 89] +[:key_up_raw, 32, 0, 2, 3, 92] +[:key_down_raw, 32, 0, 2, 4, 193] +[:key_up_raw, 32, 0, 2, 5, 195] +[:key_down_raw, 32, 0, 2, 6, 258] +[:key_down_raw, 32, 0, 2, 7, 273] +[:key_down_raw, 32, 0, 2, 8, 275] +[:key_down_raw, 32, 0, 2, 9, 277] +[:key_down_raw, 32, 0, 2, 10, 279] +[:key_down_raw, 32, 0, 2, 11, 281] +[:key_down_raw, 32, 0, 2, 12, 283] +[:key_down_raw, 32, 0, 2, 13, 285] +[:key_down_raw, 32, 0, 2, 14, 287] +[:key_down_raw, 32, 0, 2, 15, 289] +[:key_down_raw, 32, 0, 2, 16, 291] +[:key_down_raw, 32, 0, 2, 17, 293] +[:key_down_raw, 32, 0, 2, 18, 295] +[:key_down_raw, 32, 0, 2, 19, 297] +[:key_down_raw, 32, 0, 2, 20, 299] +[:key_down_raw, 32, 0, 2, 21, 301] +[:key_down_raw, 32, 0, 2, 22, 303] +[:key_down_raw, 32, 0, 2, 23, 305] +[:key_down_raw, 32, 0, 2, 24, 307] +[:key_up_raw, 32, 0, 2, 25, 307] +[:key_down_raw, 32, 0, 2, 26, 336] +[:key_up_raw, 32, 0, 2, 27, 339] +[:key_down_raw, 32, 0, 2, 28, 389] +[:key_up_raw, 32, 0, 2, 29, 392] +[:key_down_raw, 32, 0, 2, 30, 444] +[:key_down_raw, 32, 0, 2, 31, 459] +[:key_down_raw, 32, 0, 2, 32, 461] +[:key_down_raw, 32, 0, 2, 33, 463] +[:key_down_raw, 32, 0, 2, 34, 465] +[:key_down_raw, 32, 0, 2, 35, 467] +[:key_down_raw, 32, 0, 2, 36, 469] +[:key_down_raw, 32, 0, 2, 37, 471] +[:key_down_raw, 32, 0, 2, 38, 473] +[:key_down_raw, 32, 0, 2, 39, 475] +[:key_down_raw, 32, 0, 2, 40, 477] +[:key_down_raw, 32, 0, 2, 41, 479] +[:key_down_raw, 32, 0, 2, 42, 481] +[:key_down_raw, 32, 0, 2, 43, 483] +[:key_down_raw, 32, 0, 2, 44, 485] +[:key_up_raw, 32, 0, 2, 45, 485] +[:key_down_raw, 96, 0, 2, 46, 509] +[:key_up_raw, 96, 0, 2, 47, 512] +[:key_down_raw, 13, 0, 2, 48, 574] diff --git a/samples/99_genre_mario/01_jumping/sprites/square/red.png b/samples/99_genre_mario/01_jumping/sprites/square/red.png new file mode 100644 index 0000000..a59443e Binary files /dev/null and b/samples/99_genre_mario/01_jumping/sprites/square/red.png differ diff --git a/samples/99_genre_mario/02_jumping_and_collisions/app/main.rb b/samples/99_genre_mario/02_jumping_and_collisions/app/main.rb new file mode 100644 index 0000000..52d9135 --- /dev/null +++ b/samples/99_genre_mario/02_jumping_and_collisions/app/main.rb @@ -0,0 +1,281 @@ +class Game + attr_gtk + + def tick + defaults + render + input + calc + end + + def defaults + return if state.tick_count != 0 + + player.x = 64 + player.y = 800 + player.size = 50 + player.dx = 0 + player.dy = 0 + player.action = :falling + + player.max_speed = 20 + player.jump_power = 15 + player.jump_air_time = 15 + player.jump_increase_power = 1 + + state.gravity = -1 + state.drag = 0.001 + state.tile_size = 64 + state.tiles ||= [ + { ordinal_x: 0, ordinal_y: 0 }, + { ordinal_x: 1, ordinal_y: 0 }, + { ordinal_x: 2, ordinal_y: 0 }, + { ordinal_x: 3, ordinal_y: 0 }, + { ordinal_x: 4, ordinal_y: 0 }, + { ordinal_x: 5, ordinal_y: 0 }, + { ordinal_x: 6, ordinal_y: 0 }, + { ordinal_x: 7, ordinal_y: 0 }, + { ordinal_x: 8, ordinal_y: 0 }, + { ordinal_x: 9, ordinal_y: 0 }, + { ordinal_x: 10, ordinal_y: 0 }, + { ordinal_x: 11, ordinal_y: 0 }, + { ordinal_x: 12, ordinal_y: 0 }, + + { ordinal_x: 9, ordinal_y: 3 }, + { ordinal_x: 10, ordinal_y: 3 }, + { ordinal_x: 11, ordinal_y: 3 }, + ] + + tiles.each do |t| + t.rect = { x: t.ordinal_x * 64, + y: t.ordinal_y * 64, + w: 64, + h: 64 } + end + end + + def render + render_player + render_tiles + # render_grid + end + + def input + input_jump + input_move + end + + def calc + calc_player_rect + calc_left + calc_right + calc_below + calc_above + calc_player_dy + calc_player_dx + calc_game_over + end + + def render_player + outputs.sprites << { + x: player.x, + y: player.y, + w: player.size, + h: player.size, + path: 'sprites/square/red.png' + } + end + + def render_tiles + outputs.sprites << state.tiles.map do |t| + t.merge path: 'sprites/square/white.png', + x: t.ordinal_x * 64, + y: t.ordinal_y * 64, + w: 64, + h: 64 + end + end + + def render_grid + if state.tick_count == 0 + outputs[:grid].background_color = [0, 0, 0, 0] + outputs[:grid].borders << available_brick_locations + outputs[:grid].labels << available_brick_locations.map do |b| + [ + b.merge(text: "#{b.ordinal_x},#{b.ordinal_y}", + x: b.x + 2, + y: b.y + 2, + size_enum: -3, + vertical_alignment_enum: 0, + blendmode_enum: 0), + b.merge(text: "#{b.x},#{b.y}", + x: b.x + 2, + y: b.y + 2 + 20, + size_enum: -3, + vertical_alignment_enum: 0, + blendmode_enum: 0) + ] + end + end + + outputs.sprites << { x: 0, y: 0, w: 1280, h: 720, path: :grid } + end + + def input_jump + if inputs.keyboard.key_down.space + player_jump + end + + if inputs.keyboard.key_held.space + player_jump_increase_air_time + end + end + + def input_move + if player.dx.abs < 20 + if inputs.keyboard.left + player.dx -= 2 + elsif inputs.keyboard.right + player.dx += 2 + end + end + end + + def calc_game_over + if player.y < -64 + player.x = 64 + player.y = 800 + player.dx = 0 + player.dy = 0 + end + end + + def calc_player_rect + player.rect = player_current_rect + player.next_rect = player_next_rect + player.prev_rect = player_prev_rect + end + + def calc_player_dx + player.dx = player_next_dx + player.x += player.dx + end + + def calc_player_dy + player.y += player.dy + player.dy = player_next_dy + end + + def calc_below + return unless player.dy < 0 + tiles_below = tiles_find { |t| t.rect.top <= player.prev_rect.y } + collision = tiles_find_colliding tiles_below, (player.rect.merge y: player.next_rect.y) + if collision + player.y = collision.rect.y + state.tile_size + player.dy = 0 + player.action = :standing + else + player.action = :falling + end + end + + def calc_left + return unless player.dx < 0 && player_next_dx < 0 + tiles_left = tiles_find { |t| t.rect.right <= player.prev_rect.left } + collision = tiles_find_colliding tiles_left, (player.rect.merge x: player.next_rect.x) + return unless collision + player.x = collision.rect.right + player.dx = 0 + end + + def calc_right + return unless player.dx > 0 && player_next_dx > 0 + tiles_right = tiles_find { |t| t.rect.left >= player.prev_rect.right } + collision = tiles_find_colliding tiles_right, (player.rect.merge x: player.next_rect.x) + return unless collision + player.x = collision.rect.left - player.rect.w + player.dx = 0 + end + + def calc_above + return unless player.dy > 0 + tiles_above = tiles_find { |t| t.rect.y >= player.prev_rect.y } + collision = tiles_find_colliding tiles_above, (player.rect.merge y: player.next_rect.y) + return unless collision + player.dy = 0 + player.y = collision.rect.bottom - player.rect.h + end + + def player_current_rect + { x: player.x, y: player.y, w: player.size, h: player.size } + end + + def available_brick_locations + (0..19).to_a + .product(0..11) + .map do |(ordinal_x, ordinal_y)| + { ordinal_x: ordinal_x, + ordinal_y: ordinal_y, + x: ordinal_x * 64, + y: ordinal_y * 64, + w: 64, + h: 64 } + end + end + + def player + state.player ||= args.state.new_entity :player + end + + def player_next_dy + player.dy + state.gravity + state.drag ** 2 * -1 + end + + def player_next_dx + player.dx * 0.8 + end + + def player_next_rect + player.rect.merge x: player.x + player_next_dx, + y: player.y + player_next_dy + end + + def player_prev_rect + player.rect.merge x: player.x - player.dx, + y: player.y - player.dy + end + + def player_jump + return if player.action != :standing + player.action = :jumping + player.dy = state.player.jump_power + current_frame = state.tick_count + player.action_at = current_frame + end + + def player_jump_increase_air_time + return if player.action != :jumping + return if player.action_at.elapsed_time >= player.jump_air_time + player.dy += player.jump_increase_power + end + + def tiles + state.tiles + end + + def tiles_find_colliding tiles, target + tiles.find { |t| t.rect.intersect_rect? target } + end + + def tiles_find &block + tiles.find_all(&block) + end +end + +def tick args + $game ||= Game.new + $game.args = args + $game.tick +end + +$gtk.reset diff --git a/samples/99_genre_mario/02_jumping_and_collisions/replay.txt b/samples/99_genre_mario/02_jumping_and_collisions/replay.txt new file mode 100644 index 0000000..17e610f --- /dev/null +++ b/samples/99_genre_mario/02_jumping_and_collisions/replay.txt @@ -0,0 +1,159 @@ +replay_version 2.0 +stopped_at 913 +seed 100 +recorded_at 2021-11-20 17:04:30 -0600 +[:mouse_move, 784, 90, 2, 1, 1] +[:mouse_button_up, 1, 0, 1, 2, 4] +[:mouse_move, 785, 90, 2, 3, 7] +[:key_down_raw, 1073741903, 0, 2, 4, 63] +[:key_down_raw, 1073741903, 0, 2, 5, 78] +[:key_down_raw, 1073741903, 0, 2, 6, 81] +[:key_down_raw, 1073741903, 0, 2, 7, 83] +[:key_down_raw, 1073741903, 0, 2, 8, 85] +[:key_down_raw, 1073741903, 0, 2, 9, 87] +[:key_down_raw, 1073741903, 0, 2, 10, 89] +[:key_down_raw, 1073741903, 0, 2, 11, 91] +[:key_down_raw, 1073741903, 0, 2, 12, 93] +[:key_down_raw, 1073741903, 0, 2, 13, 95] +[:key_down_raw, 1073741903, 0, 2, 14, 97] +[:key_down_raw, 1073741903, 0, 2, 15, 99] +[:key_down_raw, 1073741903, 0, 2, 16, 101] +[:key_down_raw, 1073741903, 0, 2, 17, 103] +[:key_down_raw, 1073741903, 0, 2, 18, 105] +[:key_down_raw, 1073741903, 0, 2, 19, 107] +[:key_down_raw, 1073741903, 0, 2, 20, 109] +[:key_down_raw, 1073741903, 0, 2, 21, 111] +[:key_down_raw, 1073741903, 0, 2, 22, 113] +[:key_down_raw, 1073741903, 0, 2, 23, 115] +[:key_down_raw, 1073741903, 0, 2, 24, 117] +[:key_down_raw, 1073741903, 0, 2, 25, 119] +[:key_down_raw, 1073741903, 0, 2, 26, 121] +[:key_up_raw, 1073741903, 0, 2, 27, 121] +[:key_down_raw, 1073741904, 0, 2, 28, 155] +[:key_up_raw, 1073741904, 0, 2, 29, 159] +[:key_down_raw, 32, 0, 2, 30, 170] +[:key_up_raw, 32, 0, 2, 31, 176] +[:key_down_raw, 1073741903, 0, 2, 32, 189] +[:key_up_raw, 1073741903, 0, 2, 33, 199] +[:key_down_raw, 1073741904, 0, 2, 34, 235] +[:key_up_raw, 1073741904, 0, 2, 35, 249] +[:key_down_raw, 32, 0, 2, 36, 258] +[:key_down_raw, 1073741903, 0, 2, 37, 262] +[:key_down_raw, 1073741903, 0, 2, 38, 277] +[:key_down_raw, 1073741903, 0, 2, 39, 279] +[:key_down_raw, 1073741903, 0, 2, 40, 281] +[:key_down_raw, 1073741903, 0, 2, 41, 283] +[:key_down_raw, 1073741903, 0, 2, 42, 285] +[:key_down_raw, 1073741903, 0, 2, 43, 287] +[:key_up_raw, 32, 0, 2, 44, 288] +[:key_down_raw, 1073741903, 0, 2, 45, 289] +[:key_up_raw, 1073741903, 0, 2, 46, 290] +[:key_down_raw, 1073741904, 0, 2, 47, 309] +[:key_down_raw, 32, 0, 2, 48, 320] +[:key_up_raw, 32, 0, 2, 49, 330] +[:key_down_raw, 32, 0, 2, 50, 335] +[:key_up_raw, 32, 0, 2, 51, 339] +[:key_up_raw, 1073741904, 0, 2, 52, 355] +[:key_down_raw, 1073741903, 0, 2, 53, 361] +[:key_down_raw, 1073741903, 0, 2, 54, 376] +[:key_down_raw, 1073741903, 0, 2, 55, 378] +[:key_down_raw, 1073741903, 0, 2, 56, 380] +[:key_down_raw, 1073741903, 0, 2, 57, 382] +[:key_down_raw, 1073741903, 0, 2, 58, 384] +[:key_down_raw, 1073741903, 0, 2, 59, 386] +[:key_down_raw, 1073741903, 0, 2, 60, 388] +[:key_down_raw, 1073741903, 0, 2, 61, 390] +[:key_down_raw, 1073741903, 0, 2, 62, 392] +[:key_down_raw, 1073741903, 0, 2, 63, 394] +[:key_down_raw, 1073741903, 0, 2, 64, 396] +[:key_down_raw, 1073741903, 0, 2, 65, 398] +[:key_down_raw, 1073741903, 0, 2, 66, 400] +[:key_down_raw, 1073741903, 0, 2, 67, 402] +[:key_up_raw, 1073741903, 0, 2, 68, 403] +[:key_down_raw, 32, 0, 2, 69, 408] +[:key_up_raw, 32, 0, 2, 70, 415] +[:key_down_raw, 32, 0, 2, 71, 435] +[:key_up_raw, 32, 0, 2, 72, 450] +[:key_down_raw, 32, 0, 2, 73, 461] +[:key_up_raw, 32, 0, 2, 74, 473] +[:key_down_raw, 1073741903, 0, 2, 75, 480] +[:key_up_raw, 1073741903, 0, 2, 76, 491] +[:key_down_raw, 32, 0, 2, 77, 495] +[:key_down_raw, 32, 0, 2, 78, 509] +[:key_down_raw, 32, 0, 2, 79, 511] +[:key_down_raw, 32, 0, 2, 80, 515] +[:key_down_raw, 32, 0, 2, 81, 515] +[:key_down_raw, 32, 0, 2, 82, 517] +[:key_up_raw, 32, 0, 2, 83, 519] +[:key_down_raw, 1073741903, 0, 2, 84, 525] +[:key_down_raw, 32, 0, 2, 85, 537] +[:key_up_raw, 1073741903, 0, 2, 86, 539] +[:key_up_raw, 32, 0, 2, 87, 549] +[:key_down_raw, 1073741904, 0, 2, 88, 567] +[:key_down_raw, 1073741904, 0, 2, 89, 582] +[:key_down_raw, 1073741904, 0, 2, 90, 584] +[:key_down_raw, 1073741904, 0, 2, 91, 586] +[:key_down_raw, 1073741904, 0, 2, 92, 588] +[:key_down_raw, 1073741904, 0, 2, 93, 591] +[:key_down_raw, 1073741904, 0, 2, 94, 593] +[:key_down_raw, 1073741904, 0, 2, 95, 594] +[:key_up_raw, 1073741904, 0, 2, 96, 595] +[:key_down_raw, 1073741904, 0, 2, 97, 623] +[:key_down_raw, 1073741904, 0, 2, 98, 640] +[:key_down_raw, 1073741904, 0, 2, 99, 640] +[:key_down_raw, 1073741904, 0, 2, 100, 642] +[:key_down_raw, 1073741904, 0, 2, 101, 645] +[:key_down_raw, 1073741904, 0, 2, 102, 647] +[:key_down_raw, 1073741904, 0, 2, 103, 649] +[:key_down_raw, 1073741904, 0, 2, 104, 651] +[:key_up_raw, 1073741904, 0, 2, 105, 652] +[:key_down_raw, 1073741903, 0, 2, 106, 683] +[:key_down_raw, 1073741903, 0, 2, 107, 698] +[:key_down_raw, 1073741903, 0, 2, 108, 700] +[:key_down_raw, 1073741903, 0, 2, 109, 702] +[:key_down_raw, 1073741903, 0, 2, 110, 704] +[:key_down_raw, 1073741903, 0, 2, 111, 706] +[:key_down_raw, 1073741903, 0, 2, 112, 708] +[:key_down_raw, 1073741903, 0, 2, 113, 710] +[:key_down_raw, 1073741903, 0, 2, 114, 712] +[:key_down_raw, 1073741903, 0, 2, 115, 714] +[:key_down_raw, 1073741903, 0, 2, 116, 716] +[:key_down_raw, 1073741903, 0, 2, 117, 718] +[:key_down_raw, 1073741903, 0, 2, 118, 720] +[:key_down_raw, 1073741903, 0, 2, 119, 722] +[:key_down_raw, 1073741903, 0, 2, 120, 724] +[:key_down_raw, 1073741903, 0, 2, 121, 726] +[:key_down_raw, 1073741903, 0, 2, 122, 728] +[:key_down_raw, 1073741903, 0, 2, 123, 730] +[:key_down_raw, 1073741903, 0, 2, 124, 732] +[:key_down_raw, 1073741903, 0, 2, 125, 734] +[:key_down_raw, 1073741903, 0, 2, 126, 736] +[:key_down_raw, 1073741903, 0, 2, 127, 738] +[:key_down_raw, 1073741903, 0, 2, 128, 740] +[:key_down_raw, 1073741903, 0, 2, 129, 742] +[:key_down_raw, 1073741903, 0, 2, 130, 744] +[:key_down_raw, 1073741903, 0, 2, 131, 746] +[:key_down_raw, 1073741903, 0, 2, 132, 748] +[:key_down_raw, 32, 0, 2, 133, 748] +[:key_down_raw, 32, 0, 2, 134, 763] +[:key_down_raw, 32, 0, 2, 135, 765] +[:key_down_raw, 32, 0, 2, 136, 767] +[:key_down_raw, 32, 0, 2, 137, 769] +[:key_down_raw, 32, 0, 2, 138, 771] +[:key_up_raw, 32, 0, 2, 139, 773] +[:key_down_raw, 1073741904, 0, 2, 140, 775] +[:key_up_raw, 1073741903, 0, 2, 141, 776] +[:key_down_raw, 1073741904, 0, 2, 142, 790] +[:key_down_raw, 1073741904, 0, 2, 143, 792] +[:key_down_raw, 1073741904, 0, 2, 144, 794] +[:key_down_raw, 1073741904, 0, 2, 145, 796] +[:key_down_raw, 1073741904, 0, 2, 146, 798] +[:key_down_raw, 1073741904, 0, 2, 147, 801] +[:key_down_raw, 1073741904, 0, 2, 148, 803] +[:key_down_raw, 1073741904, 0, 2, 149, 804] +[:key_down_raw, 1073741904, 0, 2, 150, 807] +[:key_down_raw, 1073741904, 0, 2, 151, 809] +[:key_up_raw, 1073741904, 0, 2, 152, 810] +[:key_down_raw, 96, 0, 2, 153, 854] +[:key_up_raw, 96, 0, 2, 154, 858] +[:key_down_raw, 13, 0, 2, 155, 913] diff --git a/samples/99_genre_mario/02_jumping_and_collisions/sprites/square/red.png b/samples/99_genre_mario/02_jumping_and_collisions/sprites/square/red.png new file mode 100644 index 0000000..a59443e Binary files /dev/null and b/samples/99_genre_mario/02_jumping_and_collisions/sprites/square/red.png differ diff --git a/samples/99_genre_mario/02_jumping_and_collisions/sprites/square/white.png b/samples/99_genre_mario/02_jumping_and_collisions/sprites/square/white.png new file mode 100644 index 0000000..7a233ea Binary files /dev/null and b/samples/99_genre_mario/02_jumping_and_collisions/sprites/square/white.png differ diff --git a/samples/99_genre_platformer/clepto_frog/app/main.rb b/samples/99_genre_platformer/clepto_frog/app/main.rb index a4eb069..a3a237e 100644 --- a/samples/99_genre_platformer/clepto_frog/app/main.rb +++ b/samples/99_genre_platformer/clepto_frog/app/main.rb @@ -1,4 +1,4 @@ -MAP_FILE_PATH = 'app/map.txt' +MAP_FILE_PATH = 'map.txt' require 'app/map.rb' @@ -53,35 +53,7 @@ class CleptoFrog def render_intro outputs.labels << [640, 700, "Clepto Frog", 4, 1] - if state.tick_count >= 120 - outputs.labels << [640, 620, "\"Uh... your office has a pet frog?\" - New Guy", - 4, 1, 0, 0, 0, 255 * 120.ease(60)] - end - - if state.tick_count >= 240 - outputs.labels << [640, 580, "\"Yep! His name is Clepto.\" - Jim", - 4, 1, 0, 0, 0, 255 * 240.ease(60)] - end - - if state.tick_count >= 360 - outputs.labels << [640, 540, "\"Uh...\" - New Guy", - 4, 1, 0, 0, 0, 255 * 360.ease(60)] - end - - if state.tick_count >= 480 - outputs.labels << [640, 500, "\"He steals mugs while we're away...\" - Jim", - 4, 1, 0, 0, 0, 255 * 480.ease(60)] - end - - if state.tick_count >= 600 - outputs.labels << [640, 460, "\"It's not a big deal, we take them back in the morning.\" - Jim", - 4, 1, 0, 0, 0, 255 * 600.ease(60)] - end - - outputs.sprites << [640 - 50, 360 - 50, 100, 100, - "sprites/square-green.png"] - - if state.tick_count == 800 + if state.tick_count == 120 state.scene = :game state.game_start_at = state.tick_count end @@ -89,7 +61,7 @@ class CleptoFrog def tick defaults - if state.scene == :intro && state.tick_count <= 800 + if state.scene == :intro && state.tick_count <= 120 render_intro elsif state.scene == :ending render_ending @@ -192,15 +164,15 @@ class CleptoFrog if state.god_mode # SHOW HIDE COLLISIONS - outputs.sprites << state.world.map do |x, y, w, h| - x = vx(x) - y = vy(y) + outputs.sprites << state.world.map do |rect| + x = vx(rect.x) + y = vy(rect.y) if x > -80 && x < 1280 && y > -80 && y < 720 { x: x, y: y, - w: vw(w || state.tile_size), - h: vh(h || state.tile_size), + w: vw(rect.w || state.tile_size), + h: vh(rect.h || state.tile_size), path: 'sprites/square-gray.png', a: 128 } @@ -223,8 +195,10 @@ class CleptoFrog # Creates sprite following mouse to help indicate which sprite you have selected - outputs.primitives << [inputs.mouse.position.x, inputs.mouse.position.y, - state.tile_size, state.tile_size, 'sprites/square-indigo.png', 0, 100].sprite + outputs.primitives << [inputs.mouse.position.x - 32 * state.camera_scale, + inputs.mouse.position.y - 32 * state.camera_scale, + state.tile_size * state.camera_scale, + state.tile_size * state.camera_scale, 'sprites/square-indigo.png', 0, 100].sprite end render_mini_map @@ -305,6 +279,29 @@ class CleptoFrog set_camera_scale 1 end + if inputs.mouse.click + state.id_seed += 1 + id = state.id_seed + x = state.camera_x + (inputs.mouse.click.x.fdiv(state.camera_scale) - 32) + y = state.camera_y + (inputs.mouse.click.y.fdiv(state.camera_scale) - 32) + x = ((x + 2).idiv 4) * 4 + y = ((y + 2).idiv 4) * 4 + w = 64 + h = 64 + candidate_rect = { id: id, x: x, y: y, w: w, h: h } + scaled_candidate_rect = { x: x + 30, y: y + 30, w: w - 60, h: h - 60 } + to_remove = state.world.find { |r| r.intersect_rect? scaled_candidate_rect } + if to_remove && args.inputs.keyboard.x + state.world.reject! { |r| r.id == to_remove.id } + else + state.world << candidate_rect + end + export_map + state.world_lookup = {} + state.world_collision_rects = nil + calc_world_lookup + end + if input_up? state.y += 10 state.dy = 0 @@ -326,12 +323,6 @@ class CleptoFrog if state.scene == :game process_inputs_player_movement process_inputs_god_mode - elsif state.scene == :intro - if args.inputs.keyboard.key_down.enter || args.inputs.keyboard.key_down.space - if Kernel.tick_count < 600 - Kernel.tick_count = 600 - end - end end end @@ -429,17 +420,6 @@ class CleptoFrog end end - def add_floors - # floors - state.world += [ - [0, 0, 10000, 40], - [0, 1670, 3250, 60], - [6691, 1653, 3290, 60], - [1521, 3792, 7370, 60], - [0, 5137, 3290, 60] - ] - end - def attempt_load_world_from_file return if state.world # exported_world = gtk.read_file(MAP_FILE_PATH) @@ -447,26 +427,11 @@ class CleptoFrog state.objects = [] if $collisions - $collisions.map do |x, y, w, h| - state.world << [x, y, w, h] + state.id_seed ||= 0 + $collisions.each do |x, y, w, h| + state.id_seed += 1 + state.world << { id: state.id_seed, x: x, y: y, w: w, h: h } end - - add_floors - # elsif exported_world - # exported_world.each_line.map do |l| - # tokens = l.strip.split(',') - # x = tokens[0].to_i - # y = tokens[1].to_i - # type = tokens[2].to_i - # if type == 1 - # state.world << [x, y, state.tile_size, state.tile_size] - # elsif type == 2 - # w, h, path = tokens[3..-1] - # state.objects << [x, y, w.to_i, h.to_i, path] - # end - # end - - # add_floors end if $mugs @@ -487,23 +452,24 @@ class CleptoFrog # Searches through the world and finds the cordinates that exist state.world_lookup = {} - state.world.each do |x, y, w, h| - state.world_lookup[[x, y, w || state.tile_size, h || state.tile_size]] = true + state.world.each do |rect| + state.world_lookup[rect.id] = rect end # Assigns collision rects for every sprite drawn state.world_collision_rects = state.world_lookup .keys - .map do |x, y, w, h| + .map do |key| + rect = state.world_lookup[key] s = state.tile_size - w ||= s - h ||= s + rect.w ||= s + rect.h ||= s { - args: [x, y, w, h], - left_right: [x, y + 4, w, h - 6], - top: [x + 4, y + 6, w - 8, h - 6], - bottom: [x + 1, y - 1, w - 2, h - 8], + args: rect, + left_right: { x: rect.x, y: rect.y + 4, w: rect.w, h: rect.h - 6 }, + top: { x: rect.x + 4, y: rect.y + 6, w: rect.w - 8, h: rect.h - 6 }, + bottom: { x: rect.x + 1, y: rect.y - 1, w: rect.w - 2, h: rect.h - 8 }, } end @@ -559,12 +525,21 @@ class CleptoFrog def end_of_tongue p = state.tongue_angle.vector(state.tongue_length) - [start_of_tongue.x + p.x, start_of_tongue.y + p.y] + { x: start_of_tongue.x + p.x, y: start_of_tongue.y + p.y } end def calc_shooting + calc_shooting_increment + calc_shooting_increment + calc_shooting_increment + calc_shooting_increment + calc_shooting_increment + calc_shooting_increment + end + + def calc_shooting_increment return unless state.action == :shooting - state.tongue_length += 30 + state.tongue_length += 5 potential_anchor = end_of_tongue if potential_anchor.x <= 0 state.anchor_point = potential_anchor @@ -583,9 +558,9 @@ class CleptoFrog state.action = :anchored outputs.sounds << 'sounds/attached.wav' else - anchor_rect = [potential_anchor.x - 5, potential_anchor.y - 5, 10, 10] + anchor_rect = { x: potential_anchor.x - 5, y: potential_anchor.y - 5, w: 10, h: 10 } collision = state.world_collision_rects.find_all do |v| - [v[:args].x, v[:args].y, v[:args].w, v[:args].h].intersect_rect?(anchor_rect) + v[:args].intersect_rect?(anchor_rect) end.first if collision state.anchor_point = potential_anchor @@ -681,7 +656,7 @@ class CleptoFrog .first return unless left_side_collisions - state.x = left_side_collisions[:left_right].right + state.x = left_side_collisions[:left_right].right + 1 state.dx = state.dy.abs * 0.8 state.collision_on_x = true end @@ -696,7 +671,7 @@ class CleptoFrog .first return unless right_side_collisions - state.x = right_side_collisions[:left_right].left - state.tile_size + state.x = right_side_collisions[:left_right].left - state.tile_size - 1 state.dx = state.dx.abs * 0.8 * -1 state.collision_on_x = true end @@ -712,7 +687,7 @@ class CleptoFrog .first return unless ceil_collisions - state.y = ceil_collisions[:bottom].y - state.tile_size + state.y = ceil_collisions[:bottom].y - state.tile_size - 1 state.dy = state.dy.abs * 0.8 * -1 state.collision_on_y = true end @@ -725,13 +700,17 @@ class CleptoFrog end def export_map - export_string = state.world.map do |x, y| - "#{x},#{y},1" - end + export_string = "$collisions = [\n" + export_string += state.world.map do |rect| + "[#{rect.x},#{rect.y},#{rect.w},#{rect.h}]," + end.join "\n" + export_string += "\n]\n\n" + export_string += "$mugs = [\n" export_string += state.objects.map do |x, y, w, h, path| - "#{x},#{y},2,#{w},#{h},#{path}" - end - gtk.write_file(MAP_FILE_PATH, export_string.join("\n")) + "[#{x},#{y},#{w},#{h},'#{path}']," + end.join "\n" + export_string += "\n]\n\n" + gtk.write_file(MAP_FILE_PATH, export_string) state.map_saved_at = state.tick_count end diff --git a/samples/99_genre_platformer/clepto_frog/app/map.rb b/samples/99_genre_platformer/clepto_frog/app/map.rb index c048c82..a504ff9 100644 --- a/samples/99_genre_platformer/clepto_frog/app/map.rb +++ b/samples/99_genre_platformer/clepto_frog/app/map.rb @@ -989,6 +989,11 @@ $collisions = [ [4459, 3997, 64, 64], [76, 5215, 64, 64], [39, 5217, 64, 64], + [0, 0, 10000, 40], + [0, 1670, 3250, 60], + [6691, 1653, 3290, 60], + [1521, 3792, 7370, 60], + [0, 5137, 3290, 60] ] $mugs = [ diff --git a/samples/99_genre_platformer/clepto_frog/replay.txt b/samples/99_genre_platformer/clepto_frog/replay.txt new file mode 100644 index 0000000..8662d31 --- /dev/null +++ b/samples/99_genre_platformer/clepto_frog/replay.txt @@ -0,0 +1,249 @@ +replay_version 2.0 +stopped_at 1097 +seed 100 +recorded_at 2021-11-20 11:32:38 -0600 +[:mouse_button_up, 1, 0, 1, 1, 4] +[:key_down_raw, 1073741903, 0, 2, 2, 157] +[:key_down_raw, 1073741903, 0, 2, 3, 171] +[:key_down_raw, 1073741903, 0, 2, 4, 174] +[:key_down_raw, 1073741903, 0, 2, 5, 176] +[:key_down_raw, 1073741903, 0, 2, 6, 177] +[:key_down_raw, 1073741903, 0, 2, 7, 179] +[:key_down_raw, 1073741903, 0, 2, 8, 181] +[:key_down_raw, 1073741903, 0, 2, 9, 182] +[:key_down_raw, 1073741903, 0, 2, 10, 185] +[:key_up_raw, 1073741903, 0, 2, 11, 185] +[:key_down_raw, 32, 0, 2, 12, 187] +[:key_up_raw, 32, 0, 2, 13, 190] +[:key_down_raw, 1073741906, 0, 2, 14, 231] +[:key_down_raw, 1073741903, 0, 2, 15, 239] +[:key_down_raw, 1073741903, 0, 2, 16, 252] +[:key_down_raw, 1073741903, 0, 2, 17, 254] +[:key_down_raw, 1073741903, 0, 2, 18, 256] +[:key_down_raw, 1073741903, 0, 2, 19, 258] +[:key_down_raw, 1073741903, 0, 2, 20, 259] +[:key_down_raw, 1073741903, 0, 2, 21, 261] +[:key_down_raw, 1073741903, 0, 2, 22, 263] +[:key_down_raw, 1073741903, 0, 2, 23, 265] +[:key_down_raw, 1073741903, 0, 2, 24, 267] +[:key_down_raw, 1073741903, 0, 2, 25, 269] +[:key_down_raw, 1073741903, 0, 2, 26, 271] +[:key_down_raw, 1073741903, 0, 2, 27, 273] +[:key_down_raw, 1073741903, 0, 2, 28, 274] +[:key_down_raw, 1073741903, 0, 2, 29, 276] +[:key_down_raw, 1073741903, 0, 2, 30, 278] +[:key_down_raw, 1073741903, 0, 2, 31, 280] +[:key_down_raw, 1073741903, 0, 2, 32, 282] +[:key_down_raw, 1073741903, 0, 2, 33, 284] +[:key_down_raw, 1073741903, 0, 2, 34, 286] +[:key_down_raw, 1073741903, 0, 2, 35, 287] +[:key_down_raw, 1073741903, 0, 2, 36, 289] +[:key_down_raw, 1073741903, 0, 2, 37, 291] +[:key_down_raw, 1073741903, 0, 2, 38, 293] +[:key_down_raw, 1073741903, 0, 2, 39, 295] +[:key_down_raw, 1073741903, 0, 2, 40, 296] +[:key_down_raw, 1073741903, 0, 2, 41, 298] +[:key_down_raw, 1073741903, 0, 2, 42, 300] +[:key_down_raw, 1073741903, 0, 2, 43, 302] +[:key_down_raw, 1073741903, 0, 2, 44, 303] +[:key_down_raw, 1073741903, 0, 2, 45, 305] +[:key_down_raw, 1073741903, 0, 2, 46, 307] +[:key_down_raw, 1073741903, 0, 2, 47, 309] +[:key_down_raw, 1073741903, 0, 2, 48, 310] +[:key_down_raw, 1073741903, 0, 2, 49, 312] +[:key_down_raw, 1073741903, 0, 2, 50, 314] +[:key_down_raw, 1073741903, 0, 2, 51, 316] +[:key_down_raw, 1073741903, 0, 2, 52, 318] +[:key_down_raw, 1073741903, 0, 2, 53, 320] +[:key_down_raw, 1073741903, 0, 2, 54, 322] +[:key_down_raw, 1073741903, 0, 2, 55, 324] +[:key_down_raw, 1073741903, 0, 2, 56, 326] +[:key_down_raw, 1073741903, 0, 2, 57, 328] +[:key_down_raw, 1073741903, 0, 2, 58, 330] +[:key_down_raw, 1073741903, 0, 2, 59, 332] +[:key_down_raw, 1073741903, 0, 2, 60, 334] +[:key_down_raw, 1073741903, 0, 2, 61, 336] +[:key_down_raw, 1073741903, 0, 2, 62, 338] +[:key_down_raw, 1073741903, 0, 2, 63, 340] +[:key_down_raw, 1073741903, 0, 2, 64, 342] +[:key_down_raw, 1073741903, 0, 2, 65, 344] +[:key_down_raw, 1073741903, 0, 2, 66, 345] +[:key_down_raw, 1073741903, 0, 2, 67, 347] +[:key_down_raw, 1073741903, 0, 2, 68, 349] +[:key_up_raw, 1073741906, 0, 2, 69, 351] +[:key_down_raw, 1073741903, 0, 2, 70, 351] +[:key_down_raw, 1073741903, 0, 2, 71, 353] +[:key_down_raw, 1073741903, 0, 2, 72, 355] +[:key_down_raw, 1073741903, 0, 2, 73, 357] +[:key_down_raw, 1073741903, 0, 2, 74, 359] +[:key_down_raw, 1073741903, 0, 2, 75, 361] +[:key_down_raw, 1073741903, 0, 2, 76, 363] +[:key_down_raw, 1073741903, 0, 2, 77, 365] +[:key_down_raw, 1073741903, 0, 2, 78, 367] +[:key_down_raw, 1073741903, 0, 2, 79, 369] +[:key_down_raw, 1073741903, 0, 2, 80, 371] +[:key_down_raw, 1073741903, 0, 2, 81, 373] +[:key_down_raw, 1073741903, 0, 2, 82, 375] +[:key_down_raw, 1073741903, 0, 2, 83, 376] +[:key_down_raw, 1073741903, 0, 2, 84, 378] +[:key_down_raw, 1073741903, 0, 2, 85, 380] +[:key_down_raw, 1073741903, 0, 2, 86, 382] +[:key_down_raw, 1073741903, 0, 2, 87, 384] +[:key_down_raw, 1073741903, 0, 2, 88, 386] +[:key_down_raw, 1073741906, 0, 2, 89, 386] +[:key_down_raw, 1073741906, 0, 2, 90, 400] +[:key_down_raw, 1073741906, 0, 2, 91, 402] +[:key_down_raw, 1073741906, 0, 2, 92, 404] +[:key_down_raw, 1073741906, 0, 2, 93, 405] +[:key_down_raw, 1073741906, 0, 2, 94, 407] +[:key_down_raw, 1073741906, 0, 2, 95, 409] +[:key_down_raw, 1073741906, 0, 2, 96, 411] +[:key_down_raw, 1073741906, 0, 2, 97, 413] +[:key_down_raw, 1073741906, 0, 2, 98, 415] +[:key_down_raw, 1073741906, 0, 2, 99, 417] +[:key_down_raw, 1073741906, 0, 2, 100, 419] +[:key_down_raw, 1073741906, 0, 2, 101, 421] +[:key_down_raw, 1073741906, 0, 2, 102, 422] +[:key_down_raw, 1073741906, 0, 2, 103, 424] +[:key_down_raw, 1073741906, 0, 2, 104, 426] +[:key_down_raw, 1073741906, 0, 2, 105, 428] +[:key_down_raw, 1073741906, 0, 2, 106, 430] +[:key_down_raw, 1073741906, 0, 2, 107, 432] +[:key_down_raw, 1073741906, 0, 2, 108, 434] +[:key_down_raw, 32, 0, 2, 109, 434] +[:key_up_raw, 32, 0, 2, 110, 442] +[:key_up_raw, 1073741906, 0, 2, 111, 460] +[:key_up_raw, 1073741903, 0, 2, 112, 576] +[:key_down_raw, 1073741903, 0, 2, 113, 588] +[:key_down_raw, 1073741903, 0, 2, 114, 602] +[:key_down_raw, 1073741903, 0, 2, 115, 604] +[:key_down_raw, 1073741903, 0, 2, 116, 606] +[:key_down_raw, 1073741903, 0, 2, 117, 608] +[:key_down_raw, 1073741903, 0, 2, 118, 610] +[:key_down_raw, 1073741903, 0, 2, 119, 612] +[:key_down_raw, 1073741903, 0, 2, 120, 614] +[:key_down_raw, 1073741903, 0, 2, 121, 616] +[:key_down_raw, 1073741903, 0, 2, 122, 617] +[:key_down_raw, 1073741903, 0, 2, 123, 619] +[:key_down_raw, 1073741903, 0, 2, 124, 621] +[:key_down_raw, 1073741903, 0, 2, 125, 623] +[:key_down_raw, 1073741903, 0, 2, 126, 624] +[:key_down_raw, 1073741903, 0, 2, 127, 626] +[:key_down_raw, 1073741903, 0, 2, 128, 628] +[:key_down_raw, 1073741903, 0, 2, 129, 630] +[:key_down_raw, 1073741903, 0, 2, 130, 632] +[:key_down_raw, 1073741903, 0, 2, 131, 634] +[:key_down_raw, 1073741903, 0, 2, 132, 636] +[:key_down_raw, 1073741903, 0, 2, 133, 638] +[:key_down_raw, 1073741903, 0, 2, 134, 640] +[:key_down_raw, 1073741903, 0, 2, 135, 641] +[:key_down_raw, 1073741903, 0, 2, 136, 643] +[:key_down_raw, 1073741903, 0, 2, 137, 645] +[:key_down_raw, 1073741903, 0, 2, 138, 647] +[:key_down_raw, 1073741903, 0, 2, 139, 649] +[:key_down_raw, 1073741903, 0, 2, 140, 651] +[:key_down_raw, 1073741903, 0, 2, 141, 653] +[:key_down_raw, 1073741903, 0, 2, 142, 655] +[:key_down_raw, 1073741903, 0, 2, 143, 656] +[:key_down_raw, 1073741903, 0, 2, 144, 658] +[:key_down_raw, 1073741903, 0, 2, 145, 660] +[:key_down_raw, 1073741903, 0, 2, 146, 662] +[:key_down_raw, 1073741903, 0, 2, 147, 664] +[:key_down_raw, 1073741903, 0, 2, 148, 666] +[:key_down_raw, 1073741903, 0, 2, 149, 668] +[:key_down_raw, 1073741903, 0, 2, 150, 670] +[:key_down_raw, 1073741903, 0, 2, 151, 672] +[:key_down_raw, 1073741903, 0, 2, 152, 674] +[:key_down_raw, 1073741903, 0, 2, 153, 676] +[:key_down_raw, 1073741903, 0, 2, 154, 678] +[:key_down_raw, 1073741903, 0, 2, 155, 680] +[:key_down_raw, 1073741903, 0, 2, 156, 681] +[:key_down_raw, 1073741903, 0, 2, 157, 683] +[:key_down_raw, 32, 0, 2, 158, 684] +[:key_up_raw, 1073741903, 0, 2, 159, 686] +[:key_up_raw, 32, 0, 2, 160, 689] +[:key_down_raw, 1073741904, 0, 2, 161, 692] +[:key_down_raw, 1073741904, 0, 2, 162, 704] +[:key_down_raw, 1073741904, 0, 2, 163, 706] +[:key_down_raw, 1073741904, 0, 2, 164, 707] +[:key_down_raw, 1073741904, 0, 2, 165, 709] +[:key_down_raw, 1073741904, 0, 2, 166, 711] +[:key_down_raw, 1073741904, 0, 2, 167, 713] +[:key_down_raw, 1073741904, 0, 2, 168, 715] +[:key_up_raw, 1073741904, 0, 2, 169, 717] +[:key_down_raw, 32, 0, 2, 170, 769] +[:key_up_raw, 32, 0, 2, 171, 775] +[:key_down_raw, 1073741904, 0, 2, 172, 785] +[:key_down_raw, 1073741904, 0, 2, 173, 799] +[:key_down_raw, 1073741904, 0, 2, 174, 801] +[:key_down_raw, 1073741904, 0, 2, 175, 803] +[:key_down_raw, 1073741904, 0, 2, 176, 805] +[:key_down_raw, 1073741904, 0, 2, 177, 807] +[:key_down_raw, 1073741904, 0, 2, 178, 810] +[:key_down_raw, 1073741904, 0, 2, 179, 812] +[:key_down_raw, 1073741904, 0, 2, 180, 814] +[:key_down_raw, 1073741904, 0, 2, 181, 816] +[:key_down_raw, 1073741904, 0, 2, 182, 818] +[:key_down_raw, 1073741904, 0, 2, 183, 820] +[:key_down_raw, 1073741904, 0, 2, 184, 822] +[:key_down_raw, 1073741904, 0, 2, 185, 824] +[:key_down_raw, 1073741904, 0, 2, 186, 826] +[:key_down_raw, 1073741904, 0, 2, 187, 828] +[:key_down_raw, 1073741904, 0, 2, 188, 830] +[:key_down_raw, 1073741904, 0, 2, 189, 832] +[:key_down_raw, 1073741904, 0, 2, 190, 834] +[:key_down_raw, 1073741904, 0, 2, 191, 836] +[:key_down_raw, 1073741904, 0, 2, 192, 838] +[:key_down_raw, 1073741904, 0, 2, 193, 840] +[:key_down_raw, 1073741904, 0, 2, 194, 841] +[:key_down_raw, 1073741904, 0, 2, 195, 843] +[:key_down_raw, 1073741904, 0, 2, 196, 845] +[:key_down_raw, 1073741904, 0, 2, 197, 847] +[:key_down_raw, 1073741904, 0, 2, 198, 849] +[:key_down_raw, 1073741904, 0, 2, 199, 851] +[:key_down_raw, 1073741904, 0, 2, 200, 853] +[:key_down_raw, 1073741904, 0, 2, 201, 855] +[:key_down_raw, 1073741904, 0, 2, 202, 857] +[:key_down_raw, 1073741904, 0, 2, 203, 859] +[:key_down_raw, 1073741904, 0, 2, 204, 861] +[:key_down_raw, 1073741904, 0, 2, 205, 863] +[:key_down_raw, 1073741904, 0, 2, 206, 864] +[:key_down_raw, 1073741904, 0, 2, 207, 866] +[:key_down_raw, 1073741904, 0, 2, 208, 868] +[:key_down_raw, 1073741904, 0, 2, 209, 870] +[:key_down_raw, 1073741904, 0, 2, 210, 872] +[:key_down_raw, 1073741904, 0, 2, 211, 874] +[:key_down_raw, 1073741904, 0, 2, 212, 876] +[:key_down_raw, 1073741904, 0, 2, 213, 878] +[:key_down_raw, 1073741904, 0, 2, 214, 880] +[:key_down_raw, 1073741904, 0, 2, 215, 882] +[:key_down_raw, 1073741904, 0, 2, 216, 884] +[:key_down_raw, 1073741904, 0, 2, 217, 886] +[:key_down_raw, 1073741904, 0, 2, 218, 887] +[:key_down_raw, 1073741904, 0, 2, 219, 889] +[:key_down_raw, 1073741904, 0, 2, 220, 891] +[:key_down_raw, 1073741904, 0, 2, 221, 893] +[:key_down_raw, 1073741904, 0, 2, 222, 895] +[:key_down_raw, 1073741904, 0, 2, 223, 897] +[:key_down_raw, 1073741904, 0, 2, 224, 899] +[:key_down_raw, 1073741904, 0, 2, 225, 901] +[:key_down_raw, 1073741904, 0, 2, 226, 903] +[:key_down_raw, 1073741904, 0, 2, 227, 905] +[:key_down_raw, 1073741904, 0, 2, 228, 907] +[:key_down_raw, 1073741904, 0, 2, 229, 909] +[:key_down_raw, 1073741904, 0, 2, 230, 911] +[:key_down_raw, 1073741904, 0, 2, 231, 913] +[:key_down_raw, 1073741904, 0, 2, 232, 915] +[:key_down_raw, 1073741904, 0, 2, 233, 917] +[:key_down_raw, 1073741904, 0, 2, 234, 919] +[:key_down_raw, 1073741904, 0, 2, 235, 921] +[:key_down_raw, 1073741904, 0, 2, 236, 923] +[:key_down_raw, 1073741904, 0, 2, 237, 925] +[:key_down_raw, 1073741904, 0, 2, 238, 927] +[:key_down_raw, 1073741904, 0, 2, 239, 929] +[:key_up_raw, 1073741904, 0, 2, 240, 930] +[:key_down_raw, 1073741904, 0, 2, 241, 1024] +[:key_up_raw, 1073741904, 0, 2, 242, 1036] +[:key_down_raw, 96, 0, 2, 243, 1046] +[:key_up_raw, 96, 0, 2, 244, 1050] +[:key_down_raw, 13, 0, 2, 245, 1097] diff --git a/samples/99_genre_platformer/the_little_probe/app/main.rb b/samples/99_genre_platformer/the_little_probe/app/main.rb index 8fcf279..9d43ce6 100644 --- a/samples/99_genre_platformer/the_little_probe/app/main.rb +++ b/samples/99_genre_platformer/the_little_probe/app/main.rb @@ -394,6 +394,7 @@ class FallingCircle end def load_lines file + return unless state.snaps data = gtk.read_file(file) || "" data.each_line .reject { |l| l.strip.length == 0 } @@ -452,10 +453,10 @@ class FallingCircle results[:point] = { x: x, y: y } results[:rect] = { x: x - radius, y: y - radius, w: radius * 2, h: radius * 2 } results[:trajectory] = trajectory(results) - results[:impacts] = terrain.find_all { |t| line_near_rect? results[:rect], t }.map do |t| + results[:impacts] = terrain.find_all { |t| t && (line_near_rect? results[:rect], t) }.map do |t| { terrain: t, - point: geometry.line_intersect(results[:trajectory], t), + point: geometry.line_intersect(results[:trajectory], t, replace_infinity: 1000), type: :terrain } end.reject { |t| !point_within_line? t[:point], t[:terrain] } @@ -463,10 +464,10 @@ class FallingCircle results[:impacts] += lava.find_all { |t| line_near_rect? results[:rect], t }.map do |t| { terrain: t, - point: geometry.line_intersect(results[:trajectory], t), + point: geometry.line_intersect(results[:trajectory], t, replace_infinity: 1000), type: :lava } - end.reject { |t| !point_within_line? t[:point], t[:terrain] } + end.reject { |t| !t || (!point_within_line? t[:point], t[:terrain]) } results end @@ -479,6 +480,7 @@ class FallingCircle end def calc_terrains_to_monitor + return unless circle.impacts circle.impact = nil circle.impacts.each do |i| circle.terrains_to_monitor[i[:terrain]] ||= { diff --git a/samples/99_genre_platformer/the_little_probe/bug-replay.txt b/samples/99_genre_platformer/the_little_probe/bug-replay.txt new file mode 100644 index 0000000..378d3c3 --- /dev/null +++ b/samples/99_genre_platformer/the_little_probe/bug-replay.txt @@ -0,0 +1,205 @@ +replay_version 2.0 +stopped_at 2085 +seed 100 +recorded_at 2021-11-20 11:34:07 -0600 +[:mouse_button_up, 1, 0, 1, 1, 1] +[:mouse_move, 803, 93, 2, 2, 31] +[:mouse_move, 811, 93, 2, 3, 32] +[:key_down_raw, 1073741903, 0, 2, 4, 123] +[:key_down_raw, 1073741903, 0, 2, 5, 137] +[:key_down_raw, 1073741903, 0, 2, 6, 139] +[:key_down_raw, 1073741903, 0, 2, 7, 141] +[:key_down_raw, 1073741903, 0, 2, 8, 143] +[:key_down_raw, 1073741903, 0, 2, 9, 145] +[:key_down_raw, 1073741903, 0, 2, 10, 147] +[:key_down_raw, 1073741903, 0, 2, 11, 149] +[:key_up_raw, 1073741903, 0, 2, 12, 150] +[:key_down_raw, 32, 0, 2, 13, 171] +[:key_down_raw, 32, 0, 2, 14, 186] +[:key_down_raw, 32, 0, 2, 15, 189] +[:key_down_raw, 32, 0, 2, 16, 190] +[:key_down_raw, 32, 0, 2, 17, 192] +[:key_down_raw, 32, 0, 2, 18, 194] +[:key_down_raw, 32, 0, 2, 19, 196] +[:key_down_raw, 32, 0, 2, 20, 198] +[:key_down_raw, 32, 0, 2, 21, 200] +[:key_down_raw, 32, 0, 2, 22, 202] +[:key_down_raw, 32, 0, 2, 23, 204] +[:key_down_raw, 32, 0, 2, 24, 206] +[:key_down_raw, 32, 0, 2, 25, 208] +[:key_down_raw, 32, 0, 2, 26, 210] +[:key_down_raw, 32, 0, 2, 27, 212] +[:key_down_raw, 32, 0, 2, 28, 214] +[:key_down_raw, 32, 0, 2, 29, 216] +[:key_down_raw, 32, 0, 2, 30, 218] +[:key_down_raw, 32, 0, 2, 31, 221] +[:key_down_raw, 32, 0, 2, 32, 222] +[:key_down_raw, 32, 0, 2, 33, 224] +[:key_down_raw, 32, 0, 2, 34, 227] +[:key_down_raw, 32, 0, 2, 35, 229] +[:key_down_raw, 32, 0, 2, 36, 231] +[:key_down_raw, 32, 0, 2, 37, 233] +[:key_down_raw, 32, 0, 2, 38, 235] +[:key_down_raw, 32, 0, 2, 39, 237] +[:key_down_raw, 32, 0, 2, 40, 239] +[:key_down_raw, 32, 0, 2, 41, 241] +[:key_down_raw, 32, 0, 2, 42, 243] +[:key_down_raw, 32, 0, 2, 43, 245] +[:key_down_raw, 32, 0, 2, 44, 247] +[:key_down_raw, 32, 0, 2, 45, 249] +[:key_down_raw, 32, 0, 2, 46, 251] +[:key_down_raw, 32, 0, 2, 47, 253] +[:key_down_raw, 32, 0, 2, 48, 255] +[:key_down_raw, 32, 0, 2, 49, 257] +[:key_down_raw, 32, 0, 2, 50, 259] +[:key_down_raw, 32, 0, 2, 51, 261] +[:key_down_raw, 32, 0, 2, 52, 263] +[:key_down_raw, 32, 0, 2, 53, 265] +[:key_down_raw, 32, 0, 2, 54, 267] +[:key_down_raw, 32, 0, 2, 55, 269] +[:key_down_raw, 32, 0, 2, 56, 271] +[:key_down_raw, 1073741903, 0, 2, 57, 272] +[:key_up_raw, 1073741903, 0, 2, 58, 284] +[:key_up_raw, 32, 0, 2, 59, 350] +[:key_down_raw, 1073741904, 0, 2, 60, 611] +[:key_down_raw, 1073741904, 0, 2, 61, 626] +[:key_down_raw, 1073741904, 0, 2, 62, 628] +[:key_down_raw, 1073741904, 0, 2, 63, 630] +[:key_down_raw, 1073741904, 0, 2, 64, 632] +[:key_down_raw, 1073741904, 0, 2, 65, 634] +[:key_down_raw, 1073741904, 0, 2, 66, 636] +[:key_up_raw, 1073741904, 0, 2, 67, 636] +[:key_down_raw, 32, 0, 2, 68, 640] +[:key_down_raw, 32, 0, 2, 69, 655] +[:key_down_raw, 32, 0, 2, 70, 657] +[:key_down_raw, 32, 0, 2, 71, 659] +[:key_down_raw, 32, 0, 2, 72, 661] +[:key_down_raw, 32, 0, 2, 73, 663] +[:key_down_raw, 32, 0, 2, 74, 665] +[:key_down_raw, 1073741903, 0, 2, 75, 666] +[:key_up_raw, 1073741903, 0, 2, 76, 672] +[:key_down_raw, 1073741903, 0, 2, 77, 703] +[:key_down_raw, 1073741903, 0, 2, 78, 717] +[:key_up_raw, 1073741903, 0, 2, 79, 717] +[:key_down_raw, 1073741903, 0, 2, 80, 736] +[:key_up_raw, 1073741903, 0, 2, 81, 741] +[:key_up_raw, 32, 0, 2, 82, 798] +[:key_down_raw, 1073741903, 0, 2, 83, 861] +[:key_down_raw, 1073741903, 0, 2, 84, 876] +[:key_down_raw, 1073741903, 0, 2, 85, 878] +[:key_down_raw, 1073741903, 0, 2, 86, 880] +[:key_down_raw, 1073741903, 0, 2, 87, 882] +[:key_down_raw, 1073741903, 0, 2, 88, 884] +[:key_up_raw, 1073741903, 0, 2, 89, 886] +[:key_down_raw, 1073741903, 0, 2, 90, 1063] +[:key_down_raw, 1073741903, 0, 2, 91, 1079] +[:key_down_raw, 1073741903, 0, 2, 92, 1081] +[:key_down_raw, 1073741903, 0, 2, 93, 1083] +[:key_down_raw, 1073741903, 0, 2, 94, 1085] +[:key_down_raw, 1073741903, 0, 2, 95, 1086] +[:key_down_raw, 1073741903, 0, 2, 96, 1088] +[:key_down_raw, 1073741903, 0, 2, 97, 1090] +[:key_down_raw, 1073741903, 0, 2, 98, 1092] +[:key_down_raw, 1073741903, 0, 2, 99, 1094] +[:key_down_raw, 1073741903, 0, 2, 100, 1096] +[:key_down_raw, 1073741903, 0, 2, 101, 1098] +[:key_down_raw, 1073741903, 0, 2, 102, 1100] +[:key_down_raw, 1073741903, 0, 2, 103, 1102] +[:key_down_raw, 1073741903, 0, 2, 104, 1104] +[:key_down_raw, 1073741903, 0, 2, 105, 1106] +[:key_down_raw, 1073741903, 0, 2, 106, 1109] +[:key_down_raw, 1073741903, 0, 2, 107, 1111] +[:key_down_raw, 1073741903, 0, 2, 108, 1113] +[:key_down_raw, 1073741903, 0, 2, 109, 1115] +[:key_down_raw, 1073741903, 0, 2, 110, 1117] +[:key_down_raw, 1073741903, 0, 2, 111, 1119] +[:key_down_raw, 1073741903, 0, 2, 112, 1121] +[:key_down_raw, 1073741903, 0, 2, 113, 1122] +[:key_down_raw, 1073741903, 0, 2, 114, 1125] +[:key_down_raw, 1073741903, 0, 2, 115, 1127] +[:key_down_raw, 1073741903, 0, 2, 116, 1128] +[:key_down_raw, 1073741903, 0, 2, 117, 1131] +[:key_down_raw, 1073741903, 0, 2, 118, 1132] +[:key_down_raw, 1073741903, 0, 2, 119, 1134] +[:key_down_raw, 1073741903, 0, 2, 120, 1136] +[:key_down_raw, 1073741903, 0, 2, 121, 1138] +[:key_down_raw, 1073741903, 0, 2, 122, 1140] +[:key_down_raw, 1073741903, 0, 2, 123, 1142] +[:key_up_raw, 1073741903, 0, 2, 124, 1142] +[:key_down_raw, 32, 0, 2, 125, 1208] +[:key_down_raw, 32, 0, 2, 126, 1223] +[:key_down_raw, 32, 0, 2, 127, 1225] +[:key_down_raw, 1073741903, 0, 2, 128, 1226] +[:key_up_raw, 1073741903, 0, 2, 129, 1236] +[:key_down_raw, 1073741904, 0, 2, 130, 1253] +[:key_up_raw, 1073741904, 0, 2, 131, 1266] +[:key_down_raw, 1073741903, 0, 2, 132, 1324] +[:key_up_raw, 1073741903, 0, 2, 133, 1330] +[:key_down_raw, 1073741903, 0, 2, 134, 1414] +[:key_up_raw, 1073741903, 0, 2, 135, 1417] +[:key_up_raw, 32, 0, 2, 136, 1441] +[:mouse_move, 812, 92, 2, 137, 1607] +[:mouse_move, 818, 92, 2, 138, 1608] +[:mouse_move, 818, 91, 2, 139, 1614] +[:mouse_move, 818, 90, 2, 140, 1622] +[:mouse_move, 813, 89, 2, 141, 1623] +[:mouse_move, 801, 86, 2, 142, 1624] +[:mouse_move, 786, 83, 2, 143, 1625] +[:mouse_move, 770, 82, 2, 144, 1626] +[:mouse_move, 756, 82, 2, 145, 1627] +[:mouse_move, 745, 82, 2, 146, 1628] +[:mouse_move, 738, 82, 2, 147, 1629] +[:mouse_move, 731, 83, 2, 148, 1630] +[:mouse_move, 724, 84, 2, 149, 1631] +[:mouse_move, 712, 85, 2, 150, 1632] +[:mouse_move, 707, 87, 2, 151, 1633] +[:mouse_move, 702, 89, 2, 152, 1634] +[:mouse_move, 699, 95, 2, 153, 1635] +[:mouse_move, 693, 102, 2, 154, 1636] +[:mouse_move, 687, 110, 2, 155, 1637] +[:mouse_move, 680, 118, 2, 156, 1638] +[:mouse_move, 671, 125, 2, 157, 1639] +[:mouse_move, 659, 132, 2, 158, 1640] +[:mouse_move, 645, 142, 2, 159, 1641] +[:mouse_move, 632, 153, 2, 160, 1642] +[:mouse_move, 616, 164, 2, 161, 1643] +[:mouse_move, 583, 184, 2, 162, 1644] +[:mouse_move, 554, 198, 2, 163, 1645] +[:mouse_move, 519, 212, 2, 164, 1646] +[:mouse_move, 480, 224, 2, 165, 1647] +[:mouse_move, 445, 234, 2, 166, 1648] +[:mouse_move, 414, 246, 2, 167, 1649] +[:mouse_move, 393, 265, 2, 168, 1650] +[:mouse_move, 388, 276, 2, 169, 1651] +[:mouse_move, 386, 272, 2, 170, 1665] +[:mouse_move, 380, 272, 2, 171, 1666] +[:mouse_move, 366, 272, 2, 172, 1667] +[:mouse_move, 336, 266, 2, 173, 1668] +[:mouse_move, 313, 262, 2, 174, 1669] +[:mouse_move, 294, 258, 2, 175, 1670] +[:mouse_move, 278, 255, 2, 176, 1671] +[:mouse_move, 268, 254, 2, 177, 1672] +[:mouse_move, 263, 253, 2, 178, 1673] +[:mouse_move, 261, 252, 2, 179, 1674] +[:mouse_move, 260, 251, 2, 180, 1675] +[:mouse_move, 258, 250, 2, 181, 1676] +[:mouse_move, 256, 249, 2, 182, 1677] +[:mouse_move, 252, 249, 2, 183, 1678] +[:mouse_move, 251, 249, 2, 184, 1679] +[:mouse_move, 248, 249, 2, 185, 1680] +[:mouse_move, 246, 248, 2, 186, 1681] +[:mouse_move, 242, 247, 2, 187, 1682] +[:mouse_move, 234, 247, 2, 188, 1683] +[:mouse_move, 231, 247, 2, 189, 1684] +[:mouse_move, 230, 247, 2, 190, 1685] +[:mouse_move, 230, 246, 2, 191, 1688] +[:mouse_move, 229, 246, 2, 192, 1691] +[:mouse_move, 228, 246, 2, 193, 1692] +[:mouse_move, 227, 246, 2, 194, 1702] +[:mouse_move, 228, 246, 2, 195, 1834] +[:mouse_move, 229, 246, 2, 196, 1898] +[:mouse_move, 229, 245, 2, 197, 1968] +[:key_down_raw, 96, 0, 2, 198, 2024] +[:mouse_move, 230, 245, 2, 199, 2027] +[:key_up_raw, 96, 0, 2, 200, 2028] +[:key_down_raw, 13, 0, 2, 201, 2085] diff --git a/samples/99_genre_rpg_roguelike/01_roguelike_starting_point/replay.txt b/samples/99_genre_rpg_roguelike/01_roguelike_starting_point/replay.txt new file mode 100644 index 0000000..d75d454 --- /dev/null +++ b/samples/99_genre_rpg_roguelike/01_roguelike_starting_point/replay.txt @@ -0,0 +1,196 @@ +replay_version 2.0 +stopped_at 697 +seed 100 +recorded_at 2021-11-20 11:36:12 -0600 +[:mouse_button_up, 1, 0, 1, 1, 4] +[:mouse_move, 793, 90, 2, 2, 24] +[:mouse_move, 799, 95, 2, 3, 25] +[:mouse_move, 809, 104, 2, 4, 26] +[:mouse_move, 818, 111, 2, 5, 27] +[:mouse_move, 832, 118, 2, 6, 28] +[:mouse_move, 843, 123, 2, 7, 29] +[:mouse_move, 849, 126, 2, 8, 30] +[:key_down_raw, 1073741903, 0, 2, 9, 89] +[:key_up_raw, 1073741903, 0, 2, 10, 94] +[:key_down_raw, 1073741903, 0, 2, 11, 98] +[:key_up_raw, 1073741903, 0, 2, 12, 105] +[:key_down_raw, 1073741903, 0, 2, 13, 108] +[:key_down_raw, 1073741906, 0, 2, 14, 116] +[:key_up_raw, 1073741903, 0, 2, 15, 117] +[:key_up_raw, 1073741906, 0, 2, 16, 121] +[:key_down_raw, 1073741906, 0, 2, 17, 126] +[:key_up_raw, 1073741906, 0, 2, 18, 128] +[:key_down_raw, 1073741906, 0, 2, 19, 135] +[:key_up_raw, 1073741906, 0, 2, 20, 138] +[:key_down_raw, 1073741906, 0, 2, 21, 143] +[:key_up_raw, 1073741906, 0, 2, 22, 147] +[:key_down_raw, 1073741906, 0, 2, 23, 152] +[:key_up_raw, 1073741906, 0, 2, 24, 156] +[:key_down_raw, 1073741906, 0, 2, 25, 162] +[:key_up_raw, 1073741906, 0, 2, 26, 167] +[:key_down_raw, 1073741903, 0, 2, 27, 171] +[:key_up_raw, 1073741903, 0, 2, 28, 177] +[:key_down_raw, 1073741903, 0, 2, 29, 181] +[:key_up_raw, 1073741903, 0, 2, 30, 187] +[:key_down_raw, 1073741903, 0, 2, 31, 190] +[:key_up_raw, 1073741903, 0, 2, 32, 197] +[:key_down_raw, 1073741903, 0, 2, 33, 200] +[:key_up_raw, 1073741903, 0, 2, 34, 212] +[:key_down_raw, 1073741906, 0, 2, 35, 214] +[:key_up_raw, 1073741906, 0, 2, 36, 218] +[:key_down_raw, 1073741906, 0, 2, 37, 224] +[:key_up_raw, 1073741906, 0, 2, 38, 227] +[:key_down_raw, 1073741906, 0, 2, 39, 233] +[:key_up_raw, 1073741906, 0, 2, 40, 238] +[:key_down_raw, 1073741906, 0, 2, 41, 243] +[:key_up_raw, 1073741906, 0, 2, 42, 247] +[:key_down_raw, 1073741903, 0, 2, 43, 252] +[:key_up_raw, 1073741903, 0, 2, 44, 259] +[:key_down_raw, 1073741903, 0, 2, 45, 264] +[:key_up_raw, 1073741903, 0, 2, 46, 269] +[:key_down_raw, 1073741903, 0, 2, 47, 274] +[:key_up_raw, 1073741903, 0, 2, 48, 279] +[:key_down_raw, 1073741903, 0, 2, 49, 283] +[:key_up_raw, 1073741903, 0, 2, 50, 289] +[:key_down_raw, 1073741903, 0, 2, 51, 294] +[:key_up_raw, 1073741903, 0, 2, 52, 300] +[:key_down_raw, 1073741905, 0, 2, 53, 308] +[:key_up_raw, 1073741905, 0, 2, 54, 313] +[:key_down_raw, 1073741903, 0, 2, 55, 323] +[:key_up_raw, 1073741903, 0, 2, 56, 333] +[:key_down_raw, 1073741906, 0, 2, 57, 360] +[:key_up_raw, 1073741906, 0, 2, 58, 364] +[:key_down_raw, 1073741906, 0, 2, 59, 369] +[:key_up_raw, 1073741906, 0, 2, 60, 374] +[:key_down_raw, 1073741906, 0, 2, 61, 379] +[:key_up_raw, 1073741906, 0, 2, 62, 383] +[:mouse_move, 868, 122, 2, 63, 418] +[:mouse_move, 879, 121, 2, 64, 419] +[:mouse_move, 882, 120, 2, 65, 420] +[:mouse_move, 876, 120, 2, 66, 426] +[:mouse_move, 853, 119, 2, 67, 427] +[:mouse_move, 830, 117, 2, 68, 428] +[:mouse_move, 799, 112, 2, 69, 429] +[:mouse_move, 750, 105, 2, 70, 430] +[:mouse_move, 659, 100, 2, 71, 431] +[:mouse_move, 544, 100, 2, 72, 432] +[:mouse_move, 447, 100, 2, 73, 433] +[:mouse_move, 383, 100, 2, 74, 434] +[:mouse_move, 336, 100, 2, 75, 435] +[:mouse_move, 290, 100, 2, 76, 436] +[:mouse_move, 251, 100, 2, 77, 437] +[:mouse_move, 205, 100, 2, 78, 438] +[:mouse_move, 181, 100, 2, 79, 439] +[:mouse_move, 159, 102, 2, 80, 440] +[:mouse_move, 137, 106, 2, 81, 441] +[:mouse_move, 124, 111, 2, 82, 442] +[:mouse_move, 120, 113, 2, 83, 443] +[:mouse_move, 134, 117, 2, 84, 446] +[:mouse_move, 167, 127, 2, 85, 447] +[:mouse_move, 208, 137, 2, 86, 448] +[:mouse_move, 255, 142, 2, 87, 449] +[:mouse_move, 356, 155, 2, 88, 450] +[:mouse_move, 439, 159, 2, 89, 451] +[:mouse_move, 522, 159, 2, 90, 452] +[:mouse_move, 576, 151, 2, 91, 453] +[:mouse_move, 606, 139, 2, 92, 454] +[:mouse_move, 622, 128, 2, 93, 455] +[:mouse_move, 630, 120, 2, 94, 456] +[:mouse_move, 630, 117, 2, 95, 457] +[:mouse_move, 620, 104, 2, 96, 458] +[:mouse_move, 592, 85, 2, 97, 459] +[:mouse_move, 544, 64, 2, 98, 460] +[:mouse_move, 465, 35, 2, 99, 461] +[:mouse_move, 377, 15, 2, 100, 462] +[:mouse_move, 209, 0, 2, 101, 463] +[:mouse_move, 10, 66, 2, 102, 473] +[:mouse_move, 39, 76, 2, 103, 474] +[:mouse_move, 66, 80, 2, 104, 475] +[:mouse_move, 96, 81, 2, 105, 476] +[:mouse_move, 125, 81, 2, 106, 477] +[:mouse_move, 149, 80, 2, 107, 478] +[:mouse_move, 173, 76, 2, 108, 479] +[:mouse_move, 192, 74, 2, 109, 480] +[:mouse_move, 209, 71, 2, 110, 481] +[:mouse_move, 213, 71, 2, 111, 482] +[:mouse_move, 212, 72, 2, 112, 486] +[:mouse_move, 212, 75, 2, 113, 487] +[:mouse_move, 217, 79, 2, 114, 488] +[:mouse_move, 218, 80, 2, 115, 489] +[:key_down_raw, 1073741905, 0, 2, 116, 517] +[:key_up_raw, 1073741905, 0, 2, 117, 522] +[:key_down_raw, 1073741905, 0, 2, 118, 526] +[:key_up_raw, 1073741905, 0, 2, 119, 530] +[:key_down_raw, 1073741905, 0, 2, 120, 535] +[:key_up_raw, 1073741905, 0, 2, 121, 539] +[:key_down_raw, 1073741905, 0, 2, 122, 544] +[:key_up_raw, 1073741905, 0, 2, 123, 549] +[:mouse_move, 217, 80, 2, 124, 582] +[:mouse_move, 214, 80, 2, 125, 583] +[:mouse_move, 205, 80, 2, 126, 584] +[:mouse_move, 190, 80, 2, 127, 585] +[:mouse_move, 168, 80, 2, 128, 586] +[:mouse_move, 145, 80, 2, 129, 587] +[:mouse_move, 123, 80, 2, 130, 588] +[:mouse_move, 95, 80, 2, 131, 589] +[:mouse_move, 64, 80, 2, 132, 590] +[:mouse_move, 43, 82, 2, 133, 591] +[:mouse_move, 29, 82, 2, 134, 592] +[:mouse_move, 22, 83, 2, 135, 593] +[:mouse_move, 19, 83, 2, 136, 594] +[:mouse_move, 19, 85, 2, 137, 596] +[:mouse_move, 22, 98, 2, 138, 597] +[:mouse_move, 35, 116, 2, 139, 598] +[:mouse_move, 55, 135, 2, 140, 599] +[:mouse_move, 79, 147, 2, 141, 600] +[:mouse_move, 106, 152, 2, 142, 601] +[:mouse_move, 140, 153, 2, 143, 602] +[:mouse_move, 182, 151, 2, 144, 603] +[:mouse_move, 220, 141, 2, 145, 604] +[:mouse_move, 247, 127, 2, 146, 605] +[:mouse_move, 272, 103, 2, 147, 606] +[:mouse_move, 274, 90, 2, 148, 607] +[:mouse_move, 271, 77, 2, 149, 608] +[:mouse_move, 254, 64, 2, 150, 609] +[:mouse_move, 222, 50, 2, 151, 610] +[:mouse_move, 181, 37, 2, 152, 611] +[:mouse_move, 141, 32, 2, 153, 612] +[:mouse_move, 102, 30, 2, 154, 613] +[:mouse_move, 69, 30, 2, 155, 614] +[:mouse_move, 40, 34, 2, 156, 615] +[:mouse_move, 20, 43, 2, 157, 616] +[:mouse_move, 5, 54, 2, 158, 617] +[:mouse_move, 0, 77, 2, 159, 618] +[:mouse_move, 6, 99, 2, 160, 619] +[:mouse_move, 25, 120, 2, 161, 620] +[:mouse_move, 51, 134, 2, 162, 621] +[:mouse_move, 83, 139, 2, 163, 622] +[:mouse_move, 119, 142, 2, 164, 623] +[:mouse_move, 156, 142, 2, 165, 624] +[:mouse_move, 189, 142, 2, 166, 625] +[:mouse_move, 209, 138, 2, 167, 626] +[:mouse_move, 222, 132, 2, 168, 627] +[:mouse_move, 227, 126, 2, 169, 628] +[:mouse_move, 229, 120, 2, 170, 629] +[:mouse_move, 231, 113, 2, 171, 630] +[:mouse_move, 232, 113, 2, 172, 631] +[:mouse_move, 235, 113, 2, 173, 651] +[:mouse_move, 236, 113, 2, 174, 652] +[:mouse_move, 237, 113, 2, 175, 653] +[:mouse_move, 242, 113, 2, 176, 654] +[:mouse_move, 252, 115, 2, 177, 655] +[:mouse_move, 277, 116, 2, 178, 656] +[:key_down_raw, 96, 0, 2, 179, 656] +[:mouse_move, 316, 116, 2, 180, 657] +[:mouse_move, 372, 116, 2, 181, 658] +[:mouse_move, 445, 117, 2, 182, 659] +[:mouse_move, 513, 123, 2, 183, 660] +[:key_up_raw, 96, 0, 2, 184, 661] +[:mouse_move, 572, 131, 2, 185, 661] +[:mouse_move, 622, 135, 2, 186, 662] +[:mouse_move, 669, 135, 2, 187, 663] +[:mouse_move, 704, 135, 2, 188, 664] +[:mouse_move, 724, 135, 2, 189, 665] +[:mouse_move, 728, 135, 2, 190, 666] +[:mouse_move, 727, 135, 2, 191, 670] +[:key_down_raw, 13, 0, 2, 192, 697] diff --git a/samples/99_genre_rpg_topdown/topdown_casino/app/main.rb b/samples/99_genre_rpg_topdown/topdown_casino/app/main.rb new file mode 100644 index 0000000..eccf744 --- /dev/null +++ b/samples/99_genre_rpg_topdown/topdown_casino/app/main.rb @@ -0,0 +1,139 @@ +$gtk.reset + +def coinflip + rand < 0.5 +end + +class Game + attr_accessor :args + + def text_font + return nil #"rpg.ttf" + end + + def text_color + [ 255, 255, 255, 255 ] + end + + def set_gem_values + @args.state.gem0 = ((coinflip) ? 100 : 20) + @args.state.gem1 = ((coinflip) ? -10 : -50) + @args.state.gem2 = ((coinflip) ? -10 : -30) + if coinflip + tmp = @args.state.gem0 + @args.state.gem0 = @args.state.gem1 + @args.state.gem1 = tmp + end + if coinflip + tmp = @args.state.gem1 + @args.state.gem1 = @args.state.gem2 + @args.state.gem2 = tmp + end + if coinflip + tmp = @args.state.gem0 + @args.state.gem0 = @args.state.gem2 + @args.state.gem2 = tmp + end + end + + def initialize args + @args = args + @args.state.animticks = 0 + @args.state.score = 0 + @args.state.gem_chosen = false + @args.state.round_finished = false + @args.state.gem0_x = 197 + @args.state.gem0_y = 720-274 + @args.state.gem1_x = 623 + @args.state.gem1_y = 720-274 + @args.state.gem2_x = 1049 + @args.state.gem2_y = 720-274 + @args.state.hero_sprite = "sprites/herodown100.png" + @args.state.hero_x = 608 + @args.state.hero_y = 720-656 + set_gem_values + end + + def render_gem_value x, y, gem + if @args.state.gem_chosen + @args.outputs.labels << [ x, y + 96, gem.to_s, 1, 1, *text_color, text_font ] + end + end + + def render + gemsprite = ((@args.state.animticks % 400) < 200) ? 'sprites/gem200.png' : 'sprites/gem400.png' + @args.outputs.background_color = [ 0, 0, 0, 255 ] + @args.outputs.sprites << [608, 720-150, 64, 64, 'sprites/oldman.png'] + @args.outputs.sprites << [300, 720-150, 64, 64, 'sprites/fire.png'] + @args.outputs.sprites << [900, 720-150, 64, 64, 'sprites/fire.png'] + @args.outputs.sprites << [@args.state.gem0_x, @args.state.gem0_y, 32, 64, gemsprite] + @args.outputs.sprites << [@args.state.gem1_x, @args.state.gem1_y, 32, 64, gemsprite] + @args.outputs.sprites << [@args.state.gem2_x, @args.state.gem2_y, 32, 64, gemsprite] + @args.outputs.sprites << [@args.state.hero_x, @args.state.hero_y, 64, 64, @args.state.hero_sprite] + + @args.outputs.labels << [ 630, 720-30, "IT'S A SECRET TO EVERYONE.", 1, 1, *text_color, text_font ] + @args.outputs.labels << [ 50, 720-85, @args.state.score.to_s, 1, 1, *text_color, text_font ] + render_gem_value @args.state.gem0_x, @args.state.gem0_y, @args.state.gem0 + render_gem_value @args.state.gem1_x, @args.state.gem1_y, @args.state.gem1 + render_gem_value @args.state.gem2_x, @args.state.gem2_y, @args.state.gem2 + end + + def calc + @args.state.animticks += 16 + + return unless @args.state.gem_chosen + @args.state.round_finished_debounce ||= 60 * 3 + @args.state.round_finished_debounce -= 1 + return if @args.state.round_finished_debounce > 0 + + @args.state.gem_chosen = false + @args.state.hero.sprite[0] = 'sprites/herodown100.png' + @args.state.hero.sprite[1] = 608 + @args.state.hero.sprite[2] = 656 + @args.state.round_finished_debounce = nil + set_gem_values + end + + def walk xdir, ydir, anim + @args.state.hero_sprite = "sprites/#{anim}#{(((@args.state.animticks % 200) < 100) ? '100' : '200')}.png" + @args.state.hero_x += 5 * xdir + @args.state.hero_y += 5 * ydir + end + + def check_gem_touching gem_x, gem_y, gem + return if @args.state.gem_chosen + herorect = [ @args.state.hero_x, @args.state.hero_y, 64, 64 ] + return if !herorect.intersect_rect?([gem_x, gem_y, 32, 64]) + @args.state.gem_chosen = true + @args.state.score += gem + @args.outputs.sounds << ((gem < 0) ? 'sounds/lose.wav' : 'sounds/win.wav') + end + + def input + if @args.inputs.keyboard.key_held.left + walk(-1.0, 0.0, 'heroleft') + elsif @args.inputs.keyboard.key_held.right + walk(1.0, 0.0, 'heroright') + elsif @args.inputs.keyboard.key_held.up + walk(0.0, 1.0, 'heroup') + elsif @args.inputs.keyboard.key_held.down + walk(0.0, -1.0, 'herodown') + end + + check_gem_touching(@args.state.gem0_x, @args.state.gem0_y, @args.state.gem0) + check_gem_touching(@args.state.gem1_x, @args.state.gem1_y, @args.state.gem1) + check_gem_touching(@args.state.gem2_x, @args.state.gem2_y, @args.state.gem2) + end + + def tick + input + calc + render + end +end + +def tick args + args.state.game ||= Game.new args + args.state.game.args = args + args.state.game.tick +end diff --git a/samples/99_genre_rpg_topdown/topdown_casino/license-for-sample.txt b/samples/99_genre_rpg_topdown/topdown_casino/license-for-sample.txt new file mode 100644 index 0000000..c25563f --- /dev/null +++ b/samples/99_genre_rpg_topdown/topdown_casino/license-for-sample.txt @@ -0,0 +1,9 @@ +Copyright 2019 DragonRuby LLC (code), Nick Culbertson @mobypixel (art/music) + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/samples/99_genre_rpg_topdown/topdown_casino/replay.txt b/samples/99_genre_rpg_topdown/topdown_casino/replay.txt new file mode 100644 index 0000000..e4d52d7 --- /dev/null +++ b/samples/99_genre_rpg_topdown/topdown_casino/replay.txt @@ -0,0 +1,123 @@ +replay_version 2.0 +stopped_at 871 +seed 100 +recorded_at 2021-11-20 11:37:50 -0600 +[:mouse_button_up, 1, 0, 1, 1, 4] +[:mouse_move, 802, 86, 2, 2, 21] +[:key_down_raw, 1073741906, 0, 2, 3, 105] +[:key_down_raw, 1073741906, 0, 2, 4, 119] +[:key_down_raw, 1073741906, 0, 2, 5, 121] +[:key_down_raw, 1073741906, 0, 2, 6, 123] +[:key_down_raw, 1073741906, 0, 2, 7, 125] +[:key_down_raw, 1073741906, 0, 2, 8, 127] +[:key_down_raw, 1073741906, 0, 2, 9, 129] +[:key_down_raw, 1073741906, 0, 2, 10, 131] +[:key_down_raw, 1073741906, 0, 2, 11, 133] +[:key_down_raw, 1073741906, 0, 2, 12, 135] +[:key_down_raw, 1073741906, 0, 2, 13, 137] +[:key_down_raw, 1073741906, 0, 2, 14, 139] +[:key_up_raw, 1073741906, 0, 2, 15, 140] +[:key_down_raw, 1073741903, 0, 2, 16, 141] +[:key_down_raw, 1073741906, 0, 2, 17, 153] +[:key_up_raw, 1073741903, 0, 2, 18, 160] +[:key_down_raw, 1073741906, 0, 2, 19, 168] +[:key_down_raw, 1073741906, 0, 2, 20, 170] +[:key_down_raw, 1073741906, 0, 2, 21, 172] +[:key_down_raw, 1073741906, 0, 2, 22, 174] +[:key_down_raw, 1073741906, 0, 2, 23, 176] +[:key_down_raw, 1073741906, 0, 2, 24, 178] +[:key_down_raw, 1073741906, 0, 2, 25, 180] +[:key_down_raw, 1073741906, 0, 2, 26, 182] +[:key_down_raw, 1073741906, 0, 2, 27, 184] +[:key_down_raw, 1073741906, 0, 2, 28, 186] +[:key_down_raw, 1073741906, 0, 2, 29, 188] +[:key_down_raw, 1073741906, 0, 2, 30, 190] +[:key_down_raw, 1073741906, 0, 2, 31, 192] +[:key_down_raw, 1073741906, 0, 2, 32, 194] +[:key_down_raw, 1073741906, 0, 2, 33, 196] +[:key_up_raw, 1073741906, 0, 2, 34, 196] +[:key_down_raw, 1073741904, 0, 2, 35, 225] +[:key_down_raw, 1073741904, 0, 2, 36, 240] +[:key_down_raw, 1073741904, 0, 2, 37, 242] +[:key_down_raw, 1073741904, 0, 2, 38, 244] +[:key_up_raw, 1073741904, 0, 2, 39, 244] +[:key_down_raw, 1073741905, 0, 2, 40, 297] +[:key_down_raw, 1073741905, 0, 2, 41, 312] +[:key_down_raw, 1073741905, 0, 2, 42, 314] +[:key_down_raw, 1073741905, 0, 2, 43, 316] +[:key_down_raw, 1073741905, 0, 2, 44, 318] +[:key_down_raw, 1073741905, 0, 2, 45, 320] +[:key_down_raw, 1073741905, 0, 2, 46, 322] +[:key_down_raw, 1073741905, 0, 2, 47, 324] +[:key_up_raw, 1073741905, 0, 2, 48, 326] +[:key_down_raw, 1073741904, 0, 2, 49, 355] +[:key_down_raw, 1073741904, 0, 2, 50, 370] +[:key_down_raw, 1073741904, 0, 2, 51, 372] +[:key_down_raw, 1073741904, 0, 2, 52, 374] +[:key_down_raw, 1073741904, 0, 2, 53, 376] +[:key_down_raw, 1073741904, 0, 2, 54, 378] +[:key_up_raw, 1073741904, 0, 2, 55, 379] +[:key_down_raw, 1073741906, 0, 2, 56, 393] +[:key_down_raw, 1073741906, 0, 2, 57, 408] +[:key_down_raw, 1073741906, 0, 2, 58, 410] +[:key_down_raw, 1073741906, 0, 2, 59, 412] +[:key_down_raw, 1073741906, 0, 2, 60, 414] +[:key_down_raw, 1073741906, 0, 2, 61, 416] +[:key_down_raw, 1073741906, 0, 2, 62, 418] +[:key_down_raw, 1073741906, 0, 2, 63, 421] +[:key_up_raw, 1073741906, 0, 2, 64, 421] +[:key_down_raw, 1073741906, 0, 2, 65, 454] +[:key_down_raw, 1073741906, 0, 2, 66, 468] +[:key_down_raw, 1073741906, 0, 2, 67, 470] +[:key_down_raw, 1073741906, 0, 2, 68, 472] +[:key_down_raw, 1073741906, 0, 2, 69, 474] +[:key_up_raw, 1073741906, 0, 2, 70, 475] +[:key_down_raw, 1073741904, 0, 2, 71, 476] +[:key_down_raw, 1073741904, 0, 2, 72, 491] +[:key_down_raw, 1073741904, 0, 2, 73, 493] +[:key_down_raw, 1073741904, 0, 2, 74, 495] +[:key_down_raw, 1073741906, 0, 2, 75, 496] +[:key_down_raw, 1073741906, 0, 2, 76, 511] +[:key_down_raw, 1073741906, 0, 2, 77, 513] +[:key_down_raw, 1073741906, 0, 2, 78, 515] +[:key_up_raw, 1073741906, 0, 2, 79, 515] +[:key_down_raw, 1073741905, 0, 2, 80, 524] +[:key_up_raw, 1073741904, 0, 2, 81, 526] +[:key_up_raw, 1073741905, 0, 2, 82, 532] +[:key_down_raw, 1073741906, 0, 2, 83, 570] +[:key_down_raw, 1073741906, 0, 2, 84, 585] +[:key_up_raw, 1073741906, 0, 2, 85, 586] +[:key_down_raw, 1073741903, 0, 2, 86, 591] +[:key_up_raw, 1073741903, 0, 2, 87, 605] +[:key_down_raw, 1073741905, 0, 2, 88, 608] +[:key_down_raw, 1073741905, 0, 2, 89, 623] +[:key_down_raw, 1073741904, 0, 2, 90, 625] +[:key_up_raw, 1073741905, 0, 2, 91, 627] +[:key_down_raw, 1073741904, 0, 2, 92, 640] +[:key_down_raw, 1073741904, 0, 2, 93, 642] +[:key_down_raw, 1073741904, 0, 2, 94, 644] +[:key_down_raw, 1073741904, 0, 2, 95, 646] +[:key_down_raw, 1073741904, 0, 2, 96, 648] +[:key_up_raw, 1073741904, 0, 2, 97, 650] +[:key_down_raw, 1073741903, 0, 2, 98, 705] +[:key_down_raw, 1073741903, 0, 2, 99, 720] +[:key_down_raw, 1073741903, 0, 2, 100, 722] +[:key_down_raw, 1073741903, 0, 2, 101, 724] +[:key_down_raw, 1073741903, 0, 2, 102, 726] +[:key_down_raw, 1073741903, 0, 2, 103, 729] +[:key_down_raw, 1073741903, 0, 2, 104, 731] +[:key_down_raw, 1073741903, 0, 2, 105, 733] +[:key_down_raw, 1073741903, 0, 2, 106, 735] +[:key_down_raw, 1073741903, 0, 2, 107, 737] +[:key_down_raw, 1073741903, 0, 2, 108, 739] +[:key_down_raw, 1073741903, 0, 2, 109, 741] +[:key_down_raw, 1073741903, 0, 2, 110, 743] +[:key_down_raw, 1073741903, 0, 2, 111, 745] +[:key_down_raw, 1073741903, 0, 2, 112, 747] +[:key_down_raw, 1073741903, 0, 2, 113, 749] +[:key_down_raw, 1073741903, 0, 2, 114, 751] +[:key_down_raw, 1073741903, 0, 2, 115, 753] +[:key_up_raw, 1073741903, 0, 2, 116, 753] +[:key_down_raw, 96, 0, 2, 117, 818] +[:key_up_raw, 96, 0, 2, 118, 823] +[:key_down_raw, 13, 0, 2, 119, 871] diff --git a/samples/99_genre_rpg_topdown/topdown_casino/sprites/fire.png b/samples/99_genre_rpg_topdown/topdown_casino/sprites/fire.png new file mode 100644 index 0000000..ed4b2f0 Binary files /dev/null and b/samples/99_genre_rpg_topdown/topdown_casino/sprites/fire.png differ diff --git a/samples/99_genre_rpg_topdown/topdown_casino/sprites/gem200.png b/samples/99_genre_rpg_topdown/topdown_casino/sprites/gem200.png new file mode 100644 index 0000000..f643db9 Binary files /dev/null and b/samples/99_genre_rpg_topdown/topdown_casino/sprites/gem200.png differ diff --git a/samples/99_genre_rpg_topdown/topdown_casino/sprites/gem400.png b/samples/99_genre_rpg_topdown/topdown_casino/sprites/gem400.png new file mode 100644 index 0000000..f872e06 Binary files /dev/null and b/samples/99_genre_rpg_topdown/topdown_casino/sprites/gem400.png differ diff --git a/samples/99_genre_rpg_topdown/topdown_casino/sprites/herodown100.png b/samples/99_genre_rpg_topdown/topdown_casino/sprites/herodown100.png new file mode 100644 index 0000000..116d406 Binary files /dev/null and b/samples/99_genre_rpg_topdown/topdown_casino/sprites/herodown100.png differ diff --git a/samples/99_genre_rpg_topdown/topdown_casino/sprites/herodown200.png b/samples/99_genre_rpg_topdown/topdown_casino/sprites/herodown200.png new file mode 100644 index 0000000..116d406 Binary files /dev/null and b/samples/99_genre_rpg_topdown/topdown_casino/sprites/herodown200.png differ diff --git a/samples/99_genre_rpg_topdown/topdown_casino/sprites/heroleft100.png b/samples/99_genre_rpg_topdown/topdown_casino/sprites/heroleft100.png new file mode 100644 index 0000000..116d406 Binary files /dev/null and b/samples/99_genre_rpg_topdown/topdown_casino/sprites/heroleft100.png differ diff --git a/samples/99_genre_rpg_topdown/topdown_casino/sprites/heroleft200.png b/samples/99_genre_rpg_topdown/topdown_casino/sprites/heroleft200.png new file mode 100644 index 0000000..116d406 Binary files /dev/null and b/samples/99_genre_rpg_topdown/topdown_casino/sprites/heroleft200.png differ diff --git a/samples/99_genre_rpg_topdown/topdown_casino/sprites/heroright100.png b/samples/99_genre_rpg_topdown/topdown_casino/sprites/heroright100.png new file mode 100644 index 0000000..116d406 Binary files /dev/null and b/samples/99_genre_rpg_topdown/topdown_casino/sprites/heroright100.png differ diff --git a/samples/99_genre_rpg_topdown/topdown_casino/sprites/heroright200.png b/samples/99_genre_rpg_topdown/topdown_casino/sprites/heroright200.png new file mode 100644 index 0000000..116d406 Binary files /dev/null and b/samples/99_genre_rpg_topdown/topdown_casino/sprites/heroright200.png differ diff --git a/samples/99_genre_rpg_topdown/topdown_casino/sprites/heroup100.png b/samples/99_genre_rpg_topdown/topdown_casino/sprites/heroup100.png new file mode 100644 index 0000000..116d406 Binary files /dev/null and b/samples/99_genre_rpg_topdown/topdown_casino/sprites/heroup100.png differ diff --git a/samples/99_genre_rpg_topdown/topdown_casino/sprites/heroup200.png b/samples/99_genre_rpg_topdown/topdown_casino/sprites/heroup200.png new file mode 100644 index 0000000..116d406 Binary files /dev/null and b/samples/99_genre_rpg_topdown/topdown_casino/sprites/heroup200.png differ diff --git a/samples/99_genre_rpg_topdown/topdown_casino/sprites/oldman.png b/samples/99_genre_rpg_topdown/topdown_casino/sprites/oldman.png new file mode 100644 index 0000000..a9bb758 Binary files /dev/null and b/samples/99_genre_rpg_topdown/topdown_casino/sprites/oldman.png differ diff --git a/samples/99_genre_teenytiny/teenytiny_starting_point/app/main.rb b/samples/99_genre_teenytiny/teenytiny_starting_point/app/main.rb new file mode 100644 index 0000000..a542a93 --- /dev/null +++ b/samples/99_genre_teenytiny/teenytiny_starting_point/app/main.rb @@ -0,0 +1,162 @@ +# full documenation is at http://docs.dragonruby.org +# be sure to come to the discord if you hit any snags: http://discord.dragonruby.org +def tick args + # ==================================================== + # initialize default variables + # ==================================================== + + # ruby has an operator called ||= which means "only initialize this if it's nil" + args.state.count_down ||= 20 * 60 # set the count down to 20 seconds + # set the initial position of the target + args.state.target ||= { x: args.grid.w.half, + y: args.grid.h.half, + w: 20, + h: 20 } + + # set the initial position of the player + args.state.player ||= { x: 50, + y: 50, + w: 20, + h: 20 } + + # set the player movement speed + args.state.player_speed ||= 5 + + # set the score + args.state.score ||= 0 + args.state.teleports ||= 3 + + # set the instructions + args.state.instructions ||= "Get to the red goal! Use arrow keys to move. Spacebar to teleport (use them carefully)!" + + # ==================================================== + # render the game + # ==================================================== + args.outputs.labels << { x: args.grid.w.half, y: args.grid.h - 10, + text: args.state.instructions, + alignment_enum: 1 } + + # check if it's game over. if so, then render game over + # otherwise render the current time left + if game_over? args + args.outputs.labels << { x: args.grid.w.half, + y: args.grid.h - 40, + text: "game over! (press r to start over)", + alignment_enum: 1 } + else + args.outputs.labels << { x: args.grid.w.half, + y: args.grid.h - 40, + text: "time left: #{(args.state.count_down.idiv 60) + 1}", + alignment_enum: 1 } + end + + # render the score + args.outputs.labels << { x: args.grid.w.half, + y: args.grid.h - 70, + text: "score: #{args.state.score}", + alignment_enum: 1 } + + # render the player with teleport count + args.outputs.sprites << { x: args.state.player.x, + y: args.state.player.y, + w: args.state.player.w, + h: args.state.player.h, + path: 'sprites/square-green.png' } + + args.outputs.labels << { x: args.state.player.x + 10, + y: args.state.player.y + 40, + text: "teleports: #{args.state.teleports}", + alignment_enum: 1, size_enum: -2 } + + # render the target + args.outputs.sprites << { x: args.state.target.x, + y: args.state.target.y, + w: args.state.target.w, + h: args.state.target.h, + path: 'sprites/square-red.png' } + + # ==================================================== + # run simulation + # ==================================================== + + # count down calculation + args.state.count_down -= 1 + args.state.count_down = -1 if args.state.count_down < -1 + + # ==================================================== + # process player input + # ==================================================== + # if it isn't game over let them move + if !game_over? args + dir_y = 0 + dir_x = 0 + + # determine the change horizontally + if args.inputs.keyboard.up + dir_y += args.state.player_speed + elsif args.inputs.keyboard.down + dir_y -= args.state.player_speed + end + + # determine the change vertically + if args.inputs.keyboard.left + dir_x -= args.state.player_speed + elsif args.inputs.keyboard.right + dir_x += args.state.player_speed + end + + # determine if teleport can be used + if args.inputs.keyboard.key_down.space && args.state.teleports > 0 + args.state.teleports -= 1 + dir_x *= 20 + dir_y *= 20 + end + + # apply change to player + args.state.player.x += dir_x + args.state.player.y += dir_y + else + # if r is pressed, reset the game + if args.inputs.keyboard.key_down.r + $gtk.reset + return + end + end + + # ==================================================== + # determine score + # ==================================================== + + # calculate new score if the player is at goal + if !game_over? args + + # if the player is at the goal, then move the goal + if args.state.player.intersect_rect? args.state.target + # increment the goal + args.state.score += 1 + + # move the goal to a random location + args.state.target = { x: (rand args.grid.w), y: (rand args.grid.h), w: 20, h: 20 } + + # make sure the goal is inside the view area + if args.state.target.x < 0 + args.state.target.x += 20 + elsif args.state.target.x > 1280 + args.state.target.x -= 20 + end + + # make sure the goal is inside the view area + if args.state.target.y < 0 + args.state.target.y += 20 + elsif args.state.target.y > 720 + args.state.target.y -= 20 + end + end + end +end + +def game_over? args + args.state.count_down < 0 +end + +$gtk.reset diff --git a/samples/99_genre_teenytiny/teenytiny_starting_point/license.txt b/samples/99_genre_teenytiny/teenytiny_starting_point/license.txt new file mode 100644 index 0000000..100dcec --- /dev/null +++ b/samples/99_genre_teenytiny/teenytiny_starting_point/license.txt @@ -0,0 +1,9 @@ +Copyright 2019 DragonRuby LLC + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/samples/99_genre_teenytiny/teenytiny_starting_point/sprites/square-green.png b/samples/99_genre_teenytiny/teenytiny_starting_point/sprites/square-green.png new file mode 100644 index 0000000..5ef7f75 Binary files /dev/null and b/samples/99_genre_teenytiny/teenytiny_starting_point/sprites/square-green.png differ diff --git a/samples/99_genre_teenytiny/teenytiny_starting_point/sprites/square-red.png b/samples/99_genre_teenytiny/teenytiny_starting_point/sprites/square-red.png new file mode 100644 index 0000000..3ed5f13 Binary files /dev/null and b/samples/99_genre_teenytiny/teenytiny_starting_point/sprites/square-red.png differ -- cgit v1.2.3